From 80fb4509afc1277d09655bc3ea39ec7dad4d77c6 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 8 Mar 2019 22:04:20 +0100 Subject: [PATCH 001/119] Runtime experiment --- std/assembly/internal/runtime.ts | 144 +++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 std/assembly/internal/runtime.ts diff --git a/std/assembly/internal/runtime.ts b/std/assembly/internal/runtime.ts new file mode 100644 index 0000000000..cd9d018d5e --- /dev/null +++ b/std/assembly/internal/runtime.ts @@ -0,0 +1,144 @@ +import { AL_MASK } from "./allocator"; + +/** Common runtime header used by all objects. */ +@unmanaged +export class HEADER { + /** Unique id of the respective class. Not yet registered with GC if zero.*/ + classId: u32; + /** Size of the allocated payload. */ + payloadSize: u32; + /** Reserved field for use by GC. */ + reserved1: usize; // itcm: tagged next + /** Reserved field for use by GC. */ + reserved2: usize; // itcm: prev +} + +/** Size of the common runtime header. */ +@inline export const HEADER_SIZE: usize = (offsetof() + AL_MASK) & ~AL_MASK; +/** Magic value used to validate common headers. */ +@inline export const HEADER_MAGIC: usize = 0xA55E4B17; + +/** Aligns an allocation to actual block size. */ +function ALIGN(payloadSize: usize): usize { + // round up to power of 2, e.g. with HEADER_SIZE=8: + // 0 -> 2^3 = 8 + // 1..8 -> 2^4 = 16 + // 9..24 -> 2^5 = 32 + // ... + // MAX_LENGTH -> 2^30 = 0x40000000 (MAX_SIZE_32) + return 1 << (32 - clz(payloadSize + HEADER_SIZE - 1)); +} + +/** Gets to the common runtime header of the specified reference. */ +function UNREF(ref: usize): HEADER { + assert(ref >= HEAP_BASE + HEADER_SIZE); // must be a heap object + var header = changetype
(ref - HEADER_SIZE); + assert(!header.classId && header.reserved2 == HEADER_MAGIC); // must be unregistered + return header; +} + +// === General allocation/deallocation ============================================================ + +/** Allocates a new object and returns a pointer to its payload. */ +export function ALLOC(payloadSize: u32): usize { + var header = changetype
(memory.allocate(ALIGN(payloadSize))); + header.classId = 0; + header.payloadSize = payloadSize; + header.reserved1 = 0; + header.reserved2 = HEADER_MAGIC; + var ref = changetype(header) + HEADER_SIZE; + memory.fill(ref, 0, payloadSize); + return ref; +} + +/** Reallocates an object if necessary. Returns a pointer to its (moved) payload. */ +export function REALLOC(ref: usize, newPayloadSize: u32): usize { + var header = UNREF(ref); + var payloadSize = header.payloadSize; + if (payloadSize < newPayloadSize) { + let newAlignedSize = ALIGN(newPayloadSize); + if (ALIGN(payloadSize) < newAlignedSize) { + // move if the allocation isn't large enough to hold the new payload + let newHeader = changetype
(memory.allocate(newAlignedSize)); + newHeader.classId = 0; + newHeader.reserved1 = 0; + newHeader.reserved2 = HEADER_MAGIC; + let newRef = changetype(newHeader) + HEADER_SIZE; + memory.copy(newRef, ref, payloadSize); + memory.fill(newRef + payloadSize, 0, newPayloadSize - payloadSize); + memory.free(changetype(header)); + header = newHeader; + ref = newRef; + } else { + // otherwise just clear additional memory within this block + memory.fill(ref + payloadSize, 0, newPayloadSize - payloadSize); + } + } else { + // if the size is the same or less, just update the header accordingly. + // it is not necessary to free unused space here because it is cleared + // when grown again anyway. + } + header.payloadSize = newPayloadSize; + return ref; +} + +/** Frees an object. Must not have been registered with GC yet. */ +export function FREE(ref: usize): void { + var header = UNREF(ref); + memory.free(changetype(header)); +} + +/** Registers a managed object with GC. */ +export function REGISTER(ref: usize): void { + var header = UNREF(ref); + header.classId = /* TODO: CLASSID() */ 1; + header.reserved2 = 0; + // TODO +} + +// === ArrayBuffer ================================================================================ + +/** Size of a buffer header, excl. common runtime header. */ +@inline export const BUFFER_HEADER_SIZE: usize = (offsetof() + AL_MASK) & ~AL_MASK; + +/** Allocates a new ArrayBuffer and returns a pointer to it. */ +@inline export function ALLOC_BUFFER(byteLength: u32): ArrayBuffer { + return changetype(ALLOC(BUFFER_HEADER_SIZE + byteLength)); +} + +/** Reallocates an ArrayBuffer if necessary. Returns a pointer to it. */ +@inline export function REALLOC_BUFFER(ref: usize, byteLength: u32): ArrayBuffer { + return changetype(REALLOC(ref, BUFFER_HEADER_SIZE + byteLength)); +} + +/** Loads a value from a backing ArrayBuffer. */ +@inline export function LOAD_BUFFER(buffer: ArrayBuffer, index: i32, byteOffset: i32 = 0): TOut { + return load( + changetype(buffer) + (index << alignof()) + byteOffset, + BUFFER_HEADER_SIZE + ); +} + +/** Stores a value to a backing ArrayBuffer. */ +@inline export function STORE_BUFFER(buffer: ArrayBuffer, index: i32, value: TIn, byteOffset: i32 = 0): void { + store( + changetype(buffer) + (index << alignof()) + byteOffset, + value, + BUFFER_HEADER_SIZE + ); +} + +// === String ===================================================================================== + +/** Size of a string header, excl. common runtime header. */ +@inline export const STRING_HEADER_SIZE: usize = (offsetof() + AL_MASK) & ~AL_MASK; + +/** Allocates a new String and returns a pointer to it. */ +@inline export function ALLOC_STRING(length: u32): String { + return changetype(ALLOC(STRING_HEADER_SIZE + (length << 1))); +} + +/** Reallocates a String if necessary. Returns a pointer to it. */ +@inline export function REALLOC_STRING(ref: usize, length: u32): String { + return changetype(REALLOC(ref, STRING_HEADER_SIZE + (length << 1))); +} From 878ee3f13b4fc6213cdb5ede766c39644f153195 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 8 Mar 2019 22:08:28 +0100 Subject: [PATCH 002/119] fix --- std/assembly/internal/runtime.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/std/assembly/internal/runtime.ts b/std/assembly/internal/runtime.ts index cd9d018d5e..efe879850e 100644 --- a/std/assembly/internal/runtime.ts +++ b/std/assembly/internal/runtime.ts @@ -14,7 +14,7 @@ export class HEADER { } /** Size of the common runtime header. */ -@inline export const HEADER_SIZE: usize = (offsetof() + AL_MASK) & ~AL_MASK; +@inline export const HEADER_SIZE: usize = (offsetof
() + AL_MASK) & ~AL_MASK; /** Magic value used to validate common headers. */ @inline export const HEADER_MAGIC: usize = 0xA55E4B17; @@ -131,7 +131,7 @@ export function REGISTER(ref: usize): void { // === String ===================================================================================== /** Size of a string header, excl. common runtime header. */ -@inline export const STRING_HEADER_SIZE: usize = (offsetof() + AL_MASK) & ~AL_MASK; +@inline export const STRING_HEADER_SIZE: usize = (offsetof() + 1) & ~1; // 2 byte aligned /** Allocates a new String and returns a pointer to it. */ @inline export function ALLOC_STRING(length: u32): String { @@ -142,3 +142,5 @@ export function REGISTER(ref: usize): void { @inline export function REALLOC_STRING(ref: usize, length: u32): String { return changetype(REALLOC(ref, STRING_HEADER_SIZE + (length << 1))); } + +// ... From 979a0b8f237319ab7f6d6a921e58e98d58553ec0 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 8 Mar 2019 22:33:05 +0100 Subject: [PATCH 003/119] simplify --- std/assembly/internal/runtime.ts | 53 +++++++------------------------- 1 file changed, 11 insertions(+), 42 deletions(-) diff --git a/std/assembly/internal/runtime.ts b/std/assembly/internal/runtime.ts index efe879850e..4f154847ec 100644 --- a/std/assembly/internal/runtime.ts +++ b/std/assembly/internal/runtime.ts @@ -89,7 +89,7 @@ export function FREE(ref: usize): void { } /** Registers a managed object with GC. */ -export function REGISTER(ref: usize): void { +export function REGISTER(ref: usize, parentRef: usize): void { var header = UNREF(ref); header.classId = /* TODO: CLASSID() */ 1; header.reserved2 = 0; @@ -98,49 +98,18 @@ export function REGISTER(ref: usize): void { // === ArrayBuffer ================================================================================ -/** Size of a buffer header, excl. common runtime header. */ -@inline export const BUFFER_HEADER_SIZE: usize = (offsetof() + AL_MASK) & ~AL_MASK; - -/** Allocates a new ArrayBuffer and returns a pointer to it. */ -@inline export function ALLOC_BUFFER(byteLength: u32): ArrayBuffer { - return changetype(ALLOC(BUFFER_HEADER_SIZE + byteLength)); -} - -/** Reallocates an ArrayBuffer if necessary. Returns a pointer to it. */ -@inline export function REALLOC_BUFFER(ref: usize, byteLength: u32): ArrayBuffer { - return changetype(REALLOC(ref, BUFFER_HEADER_SIZE + byteLength)); -} - -/** Loads a value from a backing ArrayBuffer. */ -@inline export function LOAD_BUFFER(buffer: ArrayBuffer, index: i32, byteOffset: i32 = 0): TOut { - return load( - changetype(buffer) + (index << alignof()) + byteOffset, - BUFFER_HEADER_SIZE - ); -} - -/** Stores a value to a backing ArrayBuffer. */ -@inline export function STORE_BUFFER(buffer: ArrayBuffer, index: i32, value: TIn, byteOffset: i32 = 0): void { - store( - changetype(buffer) + (index << alignof()) + byteOffset, - value, - BUFFER_HEADER_SIZE - ); +export abstract class ArrayBufferBase { + get byteLength(): i32 { + var header = changetype
(changetype(this) - HEADER_SIZE); + return header.payloadSize; + } } // === String ===================================================================================== -/** Size of a string header, excl. common runtime header. */ -@inline export const STRING_HEADER_SIZE: usize = (offsetof() + 1) & ~1; // 2 byte aligned - -/** Allocates a new String and returns a pointer to it. */ -@inline export function ALLOC_STRING(length: u32): String { - return changetype(ALLOC(STRING_HEADER_SIZE + (length << 1))); -} - -/** Reallocates a String if necessary. Returns a pointer to it. */ -@inline export function REALLOC_STRING(ref: usize, length: u32): String { - return changetype(REALLOC(ref, STRING_HEADER_SIZE + (length << 1))); +export abstract class StringBase { + get length(): i32 { + var header = changetype
(changetype(this) - HEADER_SIZE); + return header.payloadSize >>> 1; + } } - -// ... From dd5430aa76d06042b536fa4f9d8621cb0fa29ea7 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 8 Mar 2019 22:50:30 +0100 Subject: [PATCH 004/119] simplify more --- std/assembly/internal/runtime.ts | 49 ++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/std/assembly/internal/runtime.ts b/std/assembly/internal/runtime.ts index 4f154847ec..b338bc0144 100644 --- a/std/assembly/internal/runtime.ts +++ b/std/assembly/internal/runtime.ts @@ -1,22 +1,28 @@ import { AL_MASK } from "./allocator"; -/** Common runtime header used by all objects. */ +/** Common runtime header of all objects. */ @unmanaged export class HEADER { - /** Unique id of the respective class. Not yet registered with GC if zero.*/ + /** Unique id of the respective class or a magic value if not yet registered.*/ classId: u32; /** Size of the allocated payload. */ payloadSize: u32; - /** Reserved field for use by GC. */ + /** Reserved field for use by GC. Only present if GC is. */ reserved1: usize; // itcm: tagged next - /** Reserved field for use by GC. */ + /** Reserved field for use by GC. Only present if GC is. */ reserved2: usize; // itcm: prev } +/** Whether a GC is present or not. */ +@inline export const GC = true; + /** Size of the common runtime header. */ -@inline export const HEADER_SIZE: usize = (offsetof
() + AL_MASK) & ~AL_MASK; -/** Magic value used to validate common headers. */ -@inline export const HEADER_MAGIC: usize = 0xA55E4B17; +@inline export const HEADER_SIZE: usize = GC + ? (offsetof
( ) + AL_MASK) & ~AL_MASK // full header if GC is present + : (offsetof
("reserved1") + AL_MASK) & ~AL_MASK; // half header if GC is absent + +/** Magic value used to validate common runtime headers. */ +@inline export const HEADER_MAGIC: u32 = 0xA55E4B17; /** Aligns an allocation to actual block size. */ function ALIGN(payloadSize: usize): usize { @@ -33,19 +39,19 @@ function ALIGN(payloadSize: usize): usize { function UNREF(ref: usize): HEADER { assert(ref >= HEAP_BASE + HEADER_SIZE); // must be a heap object var header = changetype
(ref - HEADER_SIZE); - assert(!header.classId && header.reserved2 == HEADER_MAGIC); // must be unregistered + assert(header.classId == HEADER_MAGIC); // must be unregistered return header; } -// === General allocation/deallocation ============================================================ - /** Allocates a new object and returns a pointer to its payload. */ export function ALLOC(payloadSize: u32): usize { var header = changetype
(memory.allocate(ALIGN(payloadSize))); - header.classId = 0; + header.classId = HEADER_MAGIC; header.payloadSize = payloadSize; - header.reserved1 = 0; - header.reserved2 = HEADER_MAGIC; + if (GC) { + header.reserved1 = 0; + header.reserved2 = 0; + } var ref = changetype(header) + HEADER_SIZE; memory.fill(ref, 0, payloadSize); return ref; @@ -60,9 +66,11 @@ export function REALLOC(ref: usize, newPayloadSize: u32): usize { if (ALIGN(payloadSize) < newAlignedSize) { // move if the allocation isn't large enough to hold the new payload let newHeader = changetype
(memory.allocate(newAlignedSize)); - newHeader.classId = 0; - newHeader.reserved1 = 0; - newHeader.reserved2 = HEADER_MAGIC; + newHeader.classId = HEADER_MAGIC; + if (GC) { + newHeader.reserved1 = 0; + newHeader.reserved2 = 0; + } let newRef = changetype(newHeader) + HEADER_SIZE; memory.copy(newRef, ref, payloadSize); memory.fill(newRef + payloadSize, 0, newPayloadSize - payloadSize); @@ -91,13 +99,11 @@ export function FREE(ref: usize): void { /** Registers a managed object with GC. */ export function REGISTER(ref: usize, parentRef: usize): void { var header = UNREF(ref); - header.classId = /* TODO: CLASSID() */ 1; - header.reserved2 = 0; + header.classId = /* TODO: CLASSID() */ 1; // TODO } -// === ArrayBuffer ================================================================================ - +/** ArrayBuffer base class. */ export abstract class ArrayBufferBase { get byteLength(): i32 { var header = changetype
(changetype(this) - HEADER_SIZE); @@ -105,8 +111,7 @@ export abstract class ArrayBufferBase { } } -// === String ===================================================================================== - +/** String base class. */ export abstract class StringBase { get length(): i32 { var header = changetype
(changetype(this) - HEADER_SIZE); From 911a4bbaf26f3568ec1b9a532f5a3d9358dad57e Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 8 Mar 2019 23:12:23 +0100 Subject: [PATCH 005/119] design --- std/assembly/internal/runtime.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/std/assembly/internal/runtime.ts b/std/assembly/internal/runtime.ts index b338bc0144..377b4e6a97 100644 --- a/std/assembly/internal/runtime.ts +++ b/std/assembly/internal/runtime.ts @@ -14,7 +14,7 @@ export class HEADER { } /** Whether a GC is present or not. */ -@inline export const GC = true; +@inline export const GC = isDefined(__REGISTER_IMPL); /** Size of the common runtime header. */ @inline export const HEADER_SIZE: usize = GC @@ -96,11 +96,15 @@ export function FREE(ref: usize): void { memory.free(changetype(header)); } -/** Registers a managed object with GC. */ +function CLASSID(): u32 { + return 1; +} + +/** Registers a managed object with GC. Cannot be changed anymore afterwards. */ export function REGISTER(ref: usize, parentRef: usize): void { var header = UNREF(ref); - header.classId = /* TODO: CLASSID() */ 1; - // TODO + header.classId = CLASSID(); + if (GC) __REGISTER_IMPL(ref, parentRef); } /** ArrayBuffer base class. */ From 0ad9d560e0e155a2f32d58303734b56212b77193 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 9 Mar 2019 00:40:03 +0100 Subject: [PATCH 006/119] integrate --- src/builtins.ts | 15 +++++++++++++-- src/program.ts | 9 ++++++++- std/assembly/builtins.ts | 3 +++ std/assembly/collector/itcm.ts | 5 ++--- std/assembly/gc.ts | 2 -- std/assembly/internal/runtime.ts | 10 +++------- std/portable/index.d.ts | 8 ++++---- 7 files changed, 33 insertions(+), 19 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index dec904e3f0..a0fbbbd115 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -474,6 +474,9 @@ export namespace BuiltinSymbols { export const memory_fill = "~lib/memory/memory.fill"; // std/gc.ts export const iterateRoots = "~lib/gc/iterateRoots"; + // internals + export const rt_classid = "~lib/builtins/__rt_classid"; + export const rt_iterateroots = "~lib/builtins/__rt_iterateroots"; } /** Compiles a call to a built-in function. */ @@ -3591,9 +3594,17 @@ export function compileCall( return module.createUnary(op, arg0); } - // === GC integration ========================================================================= + // === Internal runtime ======================================================================= - case BuiltinSymbols.iterateRoots: { + case BuiltinSymbols.rt_classid: { + let type = evaluateConstantType(compiler, typeArguments, operands, reportNode); + compiler.currentType = Type.u32; + if (!type) return module.createUnreachable(); + let classReference = type.classReference; + if (!classReference) return module.createUnreachable(); + return module.createI32(classReference.prototype.classId); + } + case BuiltinSymbols.rt_iterateroots: { if ( checkTypeAbsent(typeArguments, reportNode, prototype) | checkArgsRequired(operands, 1, reportNode, compiler) diff --git a/src/program.ts b/src/program.ts index fee9a60ad2..a66f5c7a13 100644 --- a/src/program.ts +++ b/src/program.ts @@ -344,6 +344,9 @@ export class Program extends DiagnosticEmitter { /** Memory allocation function. */ memoryAllocateInstance: Function | null = null; + /** Next class id. */ + nextClassId: u32 = 1; + // gc integration /** Whether a garbage collector is present or not. */ @@ -2355,7 +2358,7 @@ export class FunctionPrototype extends DeclaredElement { /** Constructs a new function prototype. */ constructor( - /** Simple na,e */ + /** Simple name */ name: string, /** Parent element, usually a file, namespace or class (if a method). */ parent: Element, @@ -2792,6 +2795,8 @@ export class ClassPrototype extends DeclaredElement { overloadPrototypes: Map = new Map(); /** Already resolved instances. */ instances: Map | null = null; + /** Unique class id. */ + classId: u32 = 0; constructor( /** Simple name. */ @@ -2813,6 +2818,8 @@ export class ClassPrototype extends DeclaredElement { declaration ); this.decoratorFlags = decoratorFlags; + this.classId = u32(this.program.nextClassId++); + assert(this.classId); // must not wrap around to 0 } /** Gets the associated type parameter nodes. */ diff --git a/std/assembly/builtins.ts b/std/assembly/builtins.ts index 3b5fc1c7d9..bd9c55fe3f 100644 --- a/std/assembly/builtins.ts +++ b/std/assembly/builtins.ts @@ -501,3 +501,6 @@ export namespace v8x16 { } @builtin export declare function start(): void; + +@builtin export declare function __rt_classid(): u32; +@builtin export declare function __rt_iterateroots(fn: (ref: usize) => void): void; diff --git a/std/assembly/collector/itcm.ts b/std/assembly/collector/itcm.ts index 0dbeb5487c..95ae1e2490 100644 --- a/std/assembly/collector/itcm.ts +++ b/std/assembly/collector/itcm.ts @@ -12,7 +12,6 @@ @inline export const HEADER_SIZE: usize = (offsetof() + AL_MASK) & ~AL_MASK; import { AL_MASK, MAX_SIZE_32 } from "../internal/allocator"; -import { iterateRoots } from "../gc"; /** Collector states. */ const enum State { @@ -142,7 +141,7 @@ function step(): void { } case State.IDLE: { if (TRACE) trace("gc~step/IDLE"); - iterateRoots(__gc_mark); + __rt_iterateroots(__gc_mark); state = State.MARK; if (TRACE) trace("gc~state = MARK"); break; @@ -163,7 +162,7 @@ function step(): void { obj.hookFn(objToRef(obj)); } else { if (TRACE) trace("gc~step/MARK finish"); - iterateRoots(__gc_mark); + __rt_iterateroots(__gc_mark); obj = iter.next; if (obj === toSpace) { let from = fromSpace; diff --git a/std/assembly/gc.ts b/std/assembly/gc.ts index ceaf6d98ec..895e47a84e 100644 --- a/std/assembly/gc.ts +++ b/std/assembly/gc.ts @@ -1,7 +1,5 @@ /* tslint:disable */ -@builtin export declare function iterateRoots(fn: (ref: usize) => void): void; - export namespace gc { export function collect(): void { diff --git a/std/assembly/internal/runtime.ts b/std/assembly/internal/runtime.ts index 377b4e6a97..37a9c4af7b 100644 --- a/std/assembly/internal/runtime.ts +++ b/std/assembly/internal/runtime.ts @@ -25,7 +25,7 @@ export class HEADER { @inline export const HEADER_MAGIC: u32 = 0xA55E4B17; /** Aligns an allocation to actual block size. */ -function ALIGN(payloadSize: usize): usize { +export function ALIGN(payloadSize: usize): usize { // round up to power of 2, e.g. with HEADER_SIZE=8: // 0 -> 2^3 = 8 // 1..8 -> 2^4 = 16 @@ -36,7 +36,7 @@ function ALIGN(payloadSize: usize): usize { } /** Gets to the common runtime header of the specified reference. */ -function UNREF(ref: usize): HEADER { +export function UNREF(ref: usize): HEADER { assert(ref >= HEAP_BASE + HEADER_SIZE); // must be a heap object var header = changetype
(ref - HEADER_SIZE); assert(header.classId == HEADER_MAGIC); // must be unregistered @@ -96,14 +96,10 @@ export function FREE(ref: usize): void { memory.free(changetype(header)); } -function CLASSID(): u32 { - return 1; -} - /** Registers a managed object with GC. Cannot be changed anymore afterwards. */ export function REGISTER(ref: usize, parentRef: usize): void { var header = UNREF(ref); - header.classId = CLASSID(); + header.classId = __rt_classid(); if (GC) __REGISTER_IMPL(ref, parentRef); } diff --git a/std/portable/index.d.ts b/std/portable/index.d.ts index 1fbc7e41e0..8ce84c9d39 100644 --- a/std/portable/index.d.ts +++ b/std/portable/index.d.ts @@ -142,7 +142,7 @@ declare namespace i8 { export function parseInt(string: string, radix?: i32): i8; } /** Converts any other numeric value to a 16-bit signed integer. */ -declare function i16(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): i8; +declare function i16(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): i16; declare namespace i16 { /** Smallest representable value. */ export const MIN_VALUE: i16; @@ -178,7 +178,7 @@ declare namespace isize { export function parseInt(string: string, radix?: i32): isize; } /** Converts any other numeric value to an 8-bit unsigned integer. */ -declare function u8(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): i8; +declare function u8(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): u8; declare namespace u8 { /** Smallest representable value. */ export const MIN_VALUE: u8; @@ -190,7 +190,7 @@ declare namespace u8 { export function parseInt(string: string, radix?: i32): u8; } /** Converts any other numeric value to a 16-bit unsigned integer. */ -declare function u16(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): i8; +declare function u16(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): u16; declare namespace u16 { /** Smallest representable value. */ export const MIN_VALUE: u16; @@ -202,7 +202,7 @@ declare namespace u16 { export function parseInt(string: string, radix?: i32): u16; } /** Converts any other numeric value to a 32-bit unsigned integer. */ -declare function u32(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): i32; +declare function u32(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): u32; declare namespace u32 { /** Smallest representable value. */ export const MIN_VALUE: u32; From 4f1a971a61d9985a8f70b218b1ddbb0a15b2f190 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 9 Mar 2019 01:06:45 +0100 Subject: [PATCH 007/119] make it test again --- std/assembly/collector/itcm.ts | 1 + std/assembly/internal/runtime.ts | 3 ++- tests/compiler/std/gc-integration.optimized.wat | 2 +- tests/compiler/std/gc-integration.ts | 4 +++- tests/compiler/std/gc-integration.untouched.wat | 14 +++++++++++++- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/std/assembly/collector/itcm.ts b/std/assembly/collector/itcm.ts index 95ae1e2490..bd1d37f916 100644 --- a/std/assembly/collector/itcm.ts +++ b/std/assembly/collector/itcm.ts @@ -12,6 +12,7 @@ @inline export const HEADER_SIZE: usize = (offsetof() + AL_MASK) & ~AL_MASK; import { AL_MASK, MAX_SIZE_32 } from "../internal/allocator"; +import { __rt_iterateroots } from "../builtins"; /** Collector states. */ const enum State { diff --git a/std/assembly/internal/runtime.ts b/std/assembly/internal/runtime.ts index 37a9c4af7b..3841fd8bfc 100644 --- a/std/assembly/internal/runtime.ts +++ b/std/assembly/internal/runtime.ts @@ -1,4 +1,5 @@ import { AL_MASK } from "./allocator"; +import { __rt_classid } from "../builtins"; /** Common runtime header of all objects. */ @unmanaged @@ -100,7 +101,7 @@ export function FREE(ref: usize): void { export function REGISTER(ref: usize, parentRef: usize): void { var header = UNREF(ref); header.classId = __rt_classid(); - if (GC) __REGISTER_IMPL(ref, parentRef); + if (GC) __REGISTER_IMPL(ref, parentRef); // tslint:disable-line } /** ArrayBuffer base class. */ diff --git a/tests/compiler/std/gc-integration.optimized.wat b/tests/compiler/std/gc-integration.optimized.wat index c26e47ddde..e884820744 100644 --- a/tests/compiler/std/gc-integration.optimized.wat +++ b/tests/compiler/std/gc-integration.optimized.wat @@ -28,7 +28,7 @@ i32.const 0 i32.const 8 i32.const 18 - i32.const 37 + i32.const 42 call $~lib/env/abort unreachable end diff --git a/tests/compiler/std/gc-integration.ts b/tests/compiler/std/gc-integration.ts index bbb92c7076..2510e497ba 100644 --- a/tests/compiler/std/gc-integration.ts +++ b/tests/compiler/std/gc-integration.ts @@ -15,5 +15,7 @@ var a_ref: A | null = changetype(24); // global root, nullable var b_ref: B = changetype(32); // global root, non-nullable var i: i32 = 0; -iterateRoots((ref: usize): void => { assert(ref == ++i << 3); }); +__rt_iterateroots((ref: usize): void => { assert(ref == ++i << 3); }); assert(i == 4); + +assert(__rt_classid() != __rt_classid()); diff --git a/tests/compiler/std/gc-integration.untouched.wat b/tests/compiler/std/gc-integration.untouched.wat index af4c2a2503..3257d4566c 100644 --- a/tests/compiler/std/gc-integration.untouched.wat +++ b/tests/compiler/std/gc-integration.untouched.wat @@ -34,7 +34,7 @@ i32.const 0 i32.const 8 i32.const 18 - i32.const 37 + i32.const 42 call $~lib/env/abort unreachable end @@ -58,6 +58,18 @@ call $~lib/env/abort unreachable end + i32.const 43 + i32.const 44 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 21 + i32.const 0 + call $~lib/env/abort + unreachable + end ) (func $start (; 3 ;) (type $FUNCSIG$v) call $start:std/gc-integration From 0c537c3363a26449bf0c0480e1e8c61cac5491e3 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 9 Mar 2019 02:04:08 +0100 Subject: [PATCH 008/119] test a few things --- std/assembly/internal/runtime.ts | 20 +- tests/compiler/std/gc-integration.ts | 2 - .../compiler/std/gc-integration.untouched.wat | 12 - tests/compiler/std/runtime.optimized.wat | 3002 +++++++++++++ tests/compiler/std/runtime.ts | 60 + tests/compiler/std/runtime.untouched.wat | 3733 +++++++++++++++++ 6 files changed, 6803 insertions(+), 26 deletions(-) create mode 100644 tests/compiler/std/runtime.optimized.wat create mode 100644 tests/compiler/std/runtime.ts create mode 100644 tests/compiler/std/runtime.untouched.wat diff --git a/std/assembly/internal/runtime.ts b/std/assembly/internal/runtime.ts index 3841fd8bfc..a979094ad9 100644 --- a/std/assembly/internal/runtime.ts +++ b/std/assembly/internal/runtime.ts @@ -25,7 +25,7 @@ export class HEADER { /** Magic value used to validate common runtime headers. */ @inline export const HEADER_MAGIC: u32 = 0xA55E4B17; -/** Aligns an allocation to actual block size. */ +/** Aligns an allocation to actual block size. Primarily targets TLSF. */ export function ALIGN(payloadSize: usize): usize { // round up to power of 2, e.g. with HEADER_SIZE=8: // 0 -> 2^3 = 8 @@ -36,14 +36,6 @@ export function ALIGN(payloadSize: usize): usize { return 1 << (32 - clz(payloadSize + HEADER_SIZE - 1)); } -/** Gets to the common runtime header of the specified reference. */ -export function UNREF(ref: usize): HEADER { - assert(ref >= HEAP_BASE + HEADER_SIZE); // must be a heap object - var header = changetype
(ref - HEADER_SIZE); - assert(header.classId == HEADER_MAGIC); // must be unregistered - return header; -} - /** Allocates a new object and returns a pointer to its payload. */ export function ALLOC(payloadSize: u32): usize { var header = changetype
(memory.allocate(ALIGN(payloadSize))); @@ -60,7 +52,7 @@ export function ALLOC(payloadSize: u32): usize { /** Reallocates an object if necessary. Returns a pointer to its (moved) payload. */ export function REALLOC(ref: usize, newPayloadSize: u32): usize { - var header = UNREF(ref); + var header = changetype
(ref - HEADER_SIZE); var payloadSize = header.payloadSize; if (payloadSize < newPayloadSize) { let newAlignedSize = ALIGN(newPayloadSize); @@ -93,13 +85,17 @@ export function REALLOC(ref: usize, newPayloadSize: u32): usize { /** Frees an object. Must not have been registered with GC yet. */ export function FREE(ref: usize): void { - var header = UNREF(ref); + assert(ref >= HEAP_BASE + HEADER_SIZE); // must be a heap object + var header = changetype
(ref - HEADER_SIZE); + assert(header.classId == HEADER_MAGIC); // must be unregistered memory.free(changetype(header)); } /** Registers a managed object with GC. Cannot be changed anymore afterwards. */ export function REGISTER(ref: usize, parentRef: usize): void { - var header = UNREF(ref); + assert(ref >= HEAP_BASE + HEADER_SIZE); // must be a heap object + var header = changetype
(ref - HEADER_SIZE); + assert(header.classId == HEADER_MAGIC); // must be unregistered header.classId = __rt_classid(); if (GC) __REGISTER_IMPL(ref, parentRef); // tslint:disable-line } diff --git a/tests/compiler/std/gc-integration.ts b/tests/compiler/std/gc-integration.ts index 2510e497ba..f89638759e 100644 --- a/tests/compiler/std/gc-integration.ts +++ b/tests/compiler/std/gc-integration.ts @@ -17,5 +17,3 @@ var b_ref: B = changetype(32); // global root, non-nullable var i: i32 = 0; __rt_iterateroots((ref: usize): void => { assert(ref == ++i << 3); }); assert(i == 4); - -assert(__rt_classid() != __rt_classid()); diff --git a/tests/compiler/std/gc-integration.untouched.wat b/tests/compiler/std/gc-integration.untouched.wat index 3257d4566c..7bd4f80b4e 100644 --- a/tests/compiler/std/gc-integration.untouched.wat +++ b/tests/compiler/std/gc-integration.untouched.wat @@ -58,18 +58,6 @@ call $~lib/env/abort unreachable end - i32.const 43 - i32.const 44 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 8 - i32.const 21 - i32.const 0 - call $~lib/env/abort - unreachable - end ) (func $start (; 3 ;) (type $FUNCSIG$v) call $start:std/gc-integration diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat new file mode 100644 index 0000000000..8f2431175a --- /dev/null +++ b/tests/compiler/std/runtime.optimized.wat @@ -0,0 +1,3002 @@ +(module + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\16\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 56) "\0e\00\00\00s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 88) "\08\00\00\00b\00a\00r\00r\00i\00e\00r\001") + (data (i32.const 112) "\08\00\00\00b\00a\00r\00r\00i\00e\00r\002") + (data (i32.const 136) "\08\00\00\00b\00a\00r\00r\00i\00e\00r\003") + (data (i32.const 160) "\18\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $std/runtime/barrier1 (mut i32) (i32.const 0)) + (global $std/runtime/barrier2 (mut i32) (i32.const 0)) + (global $std/runtime/barrier3 (mut i32) (i32.const 0)) + (global $std/runtime/ref1 (mut i32) (i32.const 0)) + (global $std/runtime/header1 (mut i32) (i32.const 0)) + (global $std/runtime/ref2 (mut i32) (i32.const 0)) + (global $std/runtime/header2 (mut i32) (i32.const 0)) + (global $std/runtime/ref3 (mut i32) (i32.const 0)) + (global $std/runtime/ref4 (mut i32) (i32.const 0)) + (global $std/runtime/called (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (start $start) + (func $~lib/allocator/tlsf/Root#setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 8 + i32.const 144 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/allocator/tlsf/Root#setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 8 + i32.const 167 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 32 + i32.ge_u + if + i32.const 0 + i32.const 8 + i32.const 168 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/allocator/tlsf/Block#get:right (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + i32.const -4 + i32.and + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 89 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 8 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 90 + i32.const 11 + call $~lib/env/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/fls (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 428 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $~lib/allocator/tlsf/Root#getHead (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 8 + i32.const 158 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 32 + i32.ge_u + if + i32.const 0 + i32.const 8 + i32.const 159 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load offset=96 + ) + (func $~lib/allocator/tlsf/Root#getSLMap (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 8 + i32.const 138 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load offset=4 + ) + (func $~lib/allocator/tlsf/Root#remove (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.tee $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 258 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $3 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 260 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + i32.const 256 + i32.lt_u + if (result i32) + local.get $3 + i32.const 8 + i32.div_u + local.set $3 + i32.const 0 + else + local.get $3 + local.get $3 + call $~lib/allocator/tlsf/fls + local.tee $4 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $3 + local.get $4 + i32.const 7 + i32.sub + end + local.set $4 + local.get $1 + i32.load offset=8 + local.set $2 + local.get $1 + i32.load offset=4 + local.tee $5 + if + local.get $5 + local.get $2 + i32.store offset=8 + end + local.get $2 + if + local.get $2 + local.get $5 + i32.store offset=4 + end + local.get $0 + local.get $4 + local.get $3 + call $~lib/allocator/tlsf/Root#getHead + local.get $1 + i32.eq + if + local.get $0 + local.get $4 + local.get $3 + local.get $2 + call $~lib/allocator/tlsf/Root#setHead + local.get $2 + i32.eqz + if + local.get $0 + local.get $4 + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $3 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $2 + call $~lib/allocator/tlsf/Root#setSLMap + local.get $2 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $4 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/allocator/tlsf/Block#get:left (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 81 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 82 + i32.const 11 + call $~lib/env/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/Root#setJump (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + i32.load + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 334 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/Block#get:right + local.get $1 + i32.ne + if + i32.const 0 + i32.const 8 + i32.const 335 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 336 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 4 + i32.sub + local.get $0 + i32.store + ) + (func $~lib/allocator/tlsf/Root#insert (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 189 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.tee $5 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 191 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $3 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 193 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $2 + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 197 + i32.const 23 + call $~lib/env/abort + unreachable + end + local.get $2 + local.tee $3 + i32.load + local.tee $6 + i32.const 1 + i32.and + if + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $6 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $5 + i32.add + local.tee $5 + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $3 + i32.load + local.set $6 + end + local.get $5 + i32.const 2 + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.tee $2 + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 211 + i32.const 24 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.load + local.tee $4 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 213 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#remove + local.get $2 + local.get $5 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $4 + i32.add + local.tee $4 + i32.store + local.get $4 + local.set $5 + local.get $2 + local.set $1 + end + local.get $3 + local.get $6 + i32.const 2 + i32.or + i32.store + local.get $1 + local.get $3 + call $~lib/allocator/tlsf/Root#setJump + local.get $5 + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + local.tee $4 + if + local.get $3 + i32.const 1073741824 + i32.lt_u + local.set $4 + end + local.get $4 + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 226 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $3 + i32.const 256 + i32.lt_u + if (result i32) + local.get $3 + i32.const 8 + i32.div_u + local.set $4 + i32.const 0 + else + local.get $3 + local.get $3 + call $~lib/allocator/tlsf/fls + local.tee $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $4 + local.get $2 + i32.const 7 + i32.sub + end + local.tee $2 + local.get $4 + call $~lib/allocator/tlsf/Root#getHead + local.set $5 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $5 + i32.store offset=8 + local.get $5 + if + local.get $5 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $2 + local.get $4 + local.get $1 + call $~lib/allocator/tlsf/Root#setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $2 + i32.shl + i32.or + i32.store + local.get $0 + local.get $2 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $4 + i32.shl + i32.or + call $~lib/allocator/tlsf/Root#setSLMap + ) + (func $~lib/allocator/tlsf/Root#addMemory (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + local.get $2 + i32.gt_u + if + i32.const 0 + i32.const 8 + i32.const 377 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 8 + i32.const 378 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 8 + i32.const 379 + i32.const 4 + call $~lib/env/abort + unreachable + end + i32.const 2912 + i32.load + local.tee $3 + if + local.get $1 + local.get $3 + i32.const 4 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 8 + i32.const 384 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 8 + i32.sub + local.get $3 + i32.eq + if + local.get $3 + i32.load + local.set $4 + local.get $1 + i32.const 8 + i32.sub + local.set $1 + end + else + local.get $1 + local.get $0 + i32.const 2916 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 8 + i32.const 393 + i32.const 6 + call $~lib/env/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.tee $2 + i32.const 32 + i32.lt_u + if + return + end + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $2 + i32.const 16 + i32.sub + i32.const 1 + i32.or + i32.or + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.tee $2 + i32.const 2 + i32.store + i32.const 2912 + local.get $2 + i32.store + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#insert + ) + (func $~lib/allocator/tlsf/ffs (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 422 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/Root#search (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $1 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $1 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 296 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 256 + i32.lt_u + if (result i32) + i32.const 0 + local.set $2 + local.get $1 + i32.const 8 + i32.div_u + else + local.get $1 + local.get $1 + call $~lib/allocator/tlsf/fls + local.tee $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $1 + local.get $2 + i32.const 7 + i32.sub + local.set $2 + local.get $1 + i32.const 31 + i32.lt_u + if (result i32) + local.get $1 + i32.const 1 + i32.add + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + i32.const 0 + end + end + local.set $1 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const -1 + local.get $1 + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + else + local.get $0 + i32.load + i32.const -1 + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.tee $2 + if (result i32) + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/ffs + local.tee $2 + call $~lib/allocator/tlsf/Root#getSLMap + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 323 + i32.const 16 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + else + i32.const 0 + end + end + ) + (func $~lib/allocator/tlsf/Root#use (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.tee $4 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 348 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 16 + i32.ge_u + local.tee $3 + if + local.get $2 + i32.const 1073741824 + i32.lt_u + local.set $3 + end + local.get $3 + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 349 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 8 + i32.const 350 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $4 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $5 + i32.const 24 + i32.ge_u + if + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $2 + i32.or + i32.store + local.get $1 + i32.const 8 + i32.add + local.get $2 + i32.add + local.tee $3 + local.get $5 + i32.const 8 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#insert + else + local.get $1 + local.get $4 + i32.const -2 + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $3 + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 368 + i32.const 25 + call $~lib/env/abort + unreachable + end + local.get $3 + local.get $3 + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 + i32.const 8 + i32.add + ) + (func $~lib/allocator/tlsf/__memory_allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + global.get $~lib/allocator/tlsf/ROOT + local.tee $3 + i32.eqz + if + i32.const 1 + current_memory + local.tee $4 + i32.gt_s + local.tee $1 + if (result i32) + i32.const 1 + local.get $4 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + local.get $1 + end + if + unreachable + end + i32.const 216 + local.set $3 + i32.const 216 + global.set $~lib/allocator/tlsf/ROOT + i32.const 2912 + i32.const 0 + i32.store + i32.const 216 + i32.const 0 + i32.store + i32.const 0 + local.set $1 + loop $repeat|0 + local.get $1 + i32.const 22 + i32.lt_u + if + i32.const 216 + local.get $1 + i32.const 0 + call $~lib/allocator/tlsf/Root#setSLMap + i32.const 0 + local.set $2 + loop $repeat|1 + local.get $2 + i32.const 32 + i32.lt_u + if + i32.const 216 + local.get $1 + local.get $2 + i32.const 0 + call $~lib/allocator/tlsf/Root#setHead + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|1 + end + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end + end + i32.const 216 + i32.const 3136 + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + end + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + block (result i32) + local.get $3 + local.get $0 + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $0 + call $~lib/allocator/tlsf/Root#search + local.tee $1 + i32.eqz + if + current_memory + local.tee $2 + local.get $0 + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $4 + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $4 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $3 + local.get $2 + i32.const 16 + i32.shl + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + local.get $3 + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.tee $2 + if (result i32) + local.get $2 + else + i32.const 0 + i32.const 8 + i32.const 480 + i32.const 12 + call $~lib/env/abort + unreachable + end + local.set $1 + end + local.get $1 + i32.load + i32.const -4 + i32.and + local.get $0 + i32.lt_u + end + if + i32.const 0 + i32.const 8 + i32.const 483 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $3 + local.get $1 + local.get $0 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/internal/memory/memset (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $1 + i32.eqz + if + return + end + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 1 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + i32.const 1 + i32.add + i32.const 0 + i32.store8 + local.get $0 + i32.const 2 + i32.add + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 2 + i32.sub + i32.const 0 + i32.store8 + local.get $2 + i32.const 3 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + i32.const 3 + i32.add + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 4 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 8 + i32.le_u + if + return + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $2 + local.get $0 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $1 + local.get $2 + i32.sub + i32.const -4 + i32.and + local.tee $1 + local.get $0 + i32.add + i32.const 4 + i32.sub + i32.const 0 + i32.store + local.get $1 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 4 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 8 + i32.add + i32.const 0 + i32.store + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 12 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 8 + i32.sub + i32.const 0 + i32.store + local.get $1 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + i32.const 12 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 16 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 20 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 24 + i32.add + i32.const 0 + i32.store + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 28 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 24 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 20 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 16 + i32.sub + i32.const 0 + i32.store + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $2 + local.get $0 + i32.add + local.set $0 + local.get $1 + local.get $2 + i32.sub + local.set $1 + loop $continue|0 + 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 + ) + (func $~lib/internal/runtime/ALLOC (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/tlsf/__memory_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 + i32.add + local.tee $1 + local.get $0 + call $~lib/internal/memory/memset + local.get $1 + ) + (func $~lib/internal/memory/memcpy (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + loop $continue|0 + local.get $1 + i32.const 3 + i32.and + local.get $2 + local.get $2 + select + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|0 + end + end + local.get $0 + i32.const 3 + i32.and + i32.eqz + if + loop $continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|1 + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 8 + i32.add + local.set $0 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $1 + i32.const 4 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.add + local.set $0 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $1 + i32.const 2 + i32.add + local.set $1 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + local.get $0 + i32.const 3 + i32.and + local.tee $3 + i32.const 1 + i32.ne + if + local.get $3 + i32.const 2 + i32.eq + br_if $case1|2 + local.get $3 + i32.const 3 + i32.eq + br_if $case2|2 + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.get $1 + local.tee $3 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $1 + local.set $0 + local.get $1 + local.get $3 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + loop $continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + local.get $5 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 5 + i32.add + i32.load + local.tee $5 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 9 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + local.get $5 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 13 + i32.add + i32.load + local.tee $5 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|3 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + loop $continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 2 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 6 + i32.add + i32.load + local.tee $5 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 10 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 14 + i32.add + i32.load + local.tee $5 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|4 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + loop $continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 3 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + local.get $5 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 7 + i32.add + i32.load + local.tee $5 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 11 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + local.get $5 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 15 + i32.add + i32.load + local.tee $5 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|5 + end + end + end + end + local.get $2 + i32.const 16 + i32.and + if + local.get $0 + local.get $1 + local.tee $3 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $1 + local.set $0 + local.get $1 + local.get $3 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + local.tee $3 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $1 + local.set $0 + local.get $1 + local.get $3 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + local.tee $3 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $1 + local.set $0 + local.get $1 + local.get $3 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + end + ) + (func $~lib/internal/memory/memmove (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + local.tee $3 + i32.eqz + if + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + local.set $3 + end + local.get $3 + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/internal/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + br $continue|0 + end + end + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 + end + end + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end + end + end + loop $continue|5 + local.get $2 + if + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + ) + (func $~lib/allocator/tlsf/__memory_free (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.tee $1 + if + local.get $0 + i32.const 8 + i32.sub + local.tee $2 + i32.load + local.tee $3 + i32.const 1 + i32.and + if + i32.const 0 + i32.const 8 + i32.const 494 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + i32.const 1 + i32.or + i32.store + local.get $1 + local.get $0 + i32.const 8 + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/internal/runtime/REALLOC (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.const 16 + i32.sub + local.tee $5 + 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 15 + i32.add + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.const 32 + local.get $1 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + local.tee $3 + i32.lt_u + if + local.get $3 + call $~lib/allocator/tlsf/__memory_allocate + local.tee $4 + i32.const -1520547049 + i32.store + local.get $4 + i32.const 0 + i32.store offset=8 + local.get $4 + i32.const 0 + i32.store offset=12 + local.get $4 + i32.const 16 + i32.add + local.tee $3 + local.get $0 + local.get $2 + call $~lib/internal/memory/memmove + local.get $2 + local.get $3 + i32.add + local.get $1 + local.get $2 + i32.sub + call $~lib/internal/memory/memset + local.get $5 + call $~lib/allocator/tlsf/__memory_free + local.get $4 + local.set $5 + local.get $3 + local.set $0 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.sub + call $~lib/internal/memory/memset + end + end + local.get $5 + local.get $1 + i32.store offset=4 + local.get $0 + ) + (func $~lib/internal/runtime/FREE (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 228 + i32.lt_u + if + i32.const 0 + i32.const 160 + i32.const 88 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 90 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/__memory_free + ) + (func $std/runtime/__REGISTER_IMPL (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + global.get $std/runtime/ref4 + i32.ne + if + i32.const 0 + i32.const 56 + i32.const 53 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $1 + global.get $std/runtime/ref3 + i32.ne + if + i32.const 0 + i32.const 56 + i32.const 54 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 43 + i32.ne + if + i32.const 0 + i32.const 56 + i32.const 56 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 1 + global.set $std/runtime/called + ) + (func $~lib/internal/runtime/REGISTER (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.const 228 + i32.lt_u + if + i32.const 0 + i32.const 160 + i32.const 96 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 98 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 43 + i32.store + local.get $0 + local.get $1 + call $std/runtime/__REGISTER_IMPL + ) + (func $start:std/runtime (; 26 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + loop $repeat|0 + local.get $0 + i32.const 9000 + i32.lt_s + if + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + local.tee $1 + i32.const 0 + i32.ne + local.tee $2 + if (result i32) + local.get $1 + i32.const 1 + i32.sub + local.get $1 + i32.and + i32.eqz + else + local.get $2 + end + if + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $repeat|0 + else + i32.const 0 + i32.const 56 + i32.const 23 + i32.const 2 + call $~lib/env/abort + unreachable + end + unreachable + end + end + i32.const 16 + global.set $std/runtime/barrier1 + global.get $std/runtime/barrier1 + i32.const 1 + i32.add + global.set $std/runtime/barrier2 + loop $continue|1 + i32.const 1 + i32.const 32 + global.get $std/runtime/barrier2 + i32.const 16 + i32.add + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.const 32 + global.get $std/runtime/barrier2 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + i32.eq + if + global.get $std/runtime/barrier2 + i32.const 1 + i32.add + global.set $std/runtime/barrier2 + br $continue|1 + end + end + global.get $std/runtime/barrier2 + i32.const 1 + i32.add + global.set $std/runtime/barrier3 + loop $continue|2 + i32.const 1 + i32.const 32 + global.get $std/runtime/barrier3 + i32.const 16 + i32.add + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.const 32 + global.get $std/runtime/barrier3 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + i32.eq + if + global.get $std/runtime/barrier3 + i32.const 1 + i32.add + global.set $std/runtime/barrier3 + br $continue|2 + end + end + i32.const 88 + i32.const 1 + global.get $std/runtime/barrier1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + i32.const 112 + i32.const 1 + global.get $std/runtime/barrier2 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + i32.const 136 + i32.const 1 + global.get $std/runtime/barrier3 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + i32.const 1 + call $~lib/internal/runtime/ALLOC + global.set $std/runtime/ref1 + global.get $std/runtime/ref1 + i32.const 16 + i32.sub + global.set $std/runtime/header1 + global.get $std/runtime/header1 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 56 + i32.const 38 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/header1 + i32.load offset=4 + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 56 + i32.const 39 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/ref1 + local.tee $0 + local.get $0 + global.get $std/runtime/barrier1 + call $~lib/internal/runtime/REALLOC + i32.ne + if + i32.const 0 + i32.const 56 + i32.const 40 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/barrier1 + global.get $std/runtime/header1 + i32.load offset=4 + i32.ne + if + i32.const 0 + i32.const 56 + i32.const 41 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/ref1 + global.get $std/runtime/barrier2 + call $~lib/internal/runtime/REALLOC + global.set $std/runtime/ref2 + global.get $std/runtime/ref1 + global.get $std/runtime/ref2 + i32.eq + if + i32.const 0 + i32.const 56 + i32.const 43 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/ref2 + i32.const 16 + i32.sub + global.set $std/runtime/header2 + global.get $std/runtime/barrier2 + global.get $std/runtime/header2 + i32.load offset=4 + i32.ne + if + i32.const 0 + i32.const 56 + i32.const 45 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/ref2 + call $~lib/internal/runtime/FREE + global.get $std/runtime/barrier2 + call $~lib/internal/runtime/ALLOC + global.set $std/runtime/ref3 + global.get $std/runtime/ref1 + global.get $std/runtime/ref3 + i32.ne + if + i32.const 0 + i32.const 56 + i32.const 48 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/barrier1 + call $~lib/internal/runtime/ALLOC + global.set $std/runtime/ref4 + global.get $std/runtime/ref4 + global.get $std/runtime/ref3 + call $~lib/internal/runtime/REGISTER + global.get $std/runtime/called + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 60 + i32.const 0 + call $~lib/env/abort + unreachable + end + ) + (func $start (; 27 ;) (type $FUNCSIG$v) + call $start:std/runtime + ) + (func $null (; 28 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/std/runtime.ts b/tests/compiler/std/runtime.ts new file mode 100644 index 0000000000..dd89399e2b --- /dev/null +++ b/tests/compiler/std/runtime.ts @@ -0,0 +1,60 @@ +import "allocator/tlsf"; +import { + HEADER, + HEADER_SIZE, + HEADER_MAGIC, + ALIGN, + ALLOC, + REALLOC, + FREE, + REGISTER +} from "internal/runtime"; + +class A {} +class B {} +assert(__rt_classid() != __rt_classid()); + +function isPowerOf2(x: i32): bool { + return x != 0 && (x & (x - 1)) == 0; +} + +assert(ALIGN(0) > 0); +for (let i = 0; i < 9000; ++i) { + assert(isPowerOf2(ALIGN(i))); +} + +var barrier1 = ALIGN(0); +var barrier2 = barrier1 + 1; +while (ALIGN(barrier2 + 1) == ALIGN(barrier2)) ++barrier2; +var barrier3 = barrier2 + 1; +while (ALIGN(barrier3 + 1) == ALIGN(barrier3)) ++barrier3; + +trace("barrier1", 1, barrier1); +trace("barrier2", 1, barrier2); +trace("barrier3", 1, barrier3); + +var ref1 = ALLOC(1); +var header1 = changetype
(ref1 - HEADER_SIZE); +assert(header1.classId == HEADER_MAGIC); +assert(header1.payloadSize == 1); +assert(ref1 == REALLOC(ref1, barrier1)); // same segment +assert(header1.payloadSize == barrier1); +var ref2 = REALLOC(ref1, barrier2); +assert(ref1 != ref2); // moves +var header2 = changetype
(ref2 - HEADER_SIZE); +assert(header2.payloadSize == barrier2); +FREE(ref2); +var ref3 = ALLOC(barrier2); +assert(ref1 == ref3); // reuses space of ref1 (free'd in realloc), ref2 (explicitly free'd) + +var ref4 = ALLOC(barrier1); +var called = false; +@global function __REGISTER_IMPL(ref: usize, parentRef: usize): void { + assert(ref == ref4); + assert(parentRef == ref3); + var header = changetype
(ref - HEADER_SIZE); + assert(header.classId == __rt_classid()); + called = true; +} +REGISTER(ref4, ref3); // TODO +assert(called); diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat new file mode 100644 index 0000000000..9de6f5ea48 --- /dev/null +++ b/tests/compiler/std/runtime.untouched.wat @@ -0,0 +1,3733 @@ +(module + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\16\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 56) "\0e\00\00\00s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 88) "\08\00\00\00b\00a\00r\00r\00i\00e\00r\001\00") + (data (i32.const 112) "\08\00\00\00b\00a\00r\00r\00i\00e\00r\002\00") + (data (i32.const 136) "\08\00\00\00b\00a\00r\00r\00i\00e\00r\003\00") + (data (i32.const 160) "\18\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) + (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) + (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) + (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) + (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) + (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) + (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) + (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) + (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) + (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) + (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) + (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) + (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) + (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) + (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $std/runtime/barrier1 (mut i32) (i32.const 0)) + (global $std/runtime/barrier2 (mut i32) (i32.const 0)) + (global $std/runtime/barrier3 (mut i32) (i32.const 0)) + (global $std/runtime/ref1 (mut i32) (i32.const 0)) + (global $std/runtime/header1 (mut i32) (i32.const 0)) + (global $std/runtime/ref2 (mut i32) (i32.const 0)) + (global $std/runtime/header2 (mut i32) (i32.const 0)) + (global $std/runtime/ref3 (mut i32) (i32.const 0)) + (global $std/runtime/ref4 (mut i32) (i32.const 0)) + (global $std/runtime/called (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 212)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (start $start) + (func $start:~lib/allocator/tlsf (; 2 ;) (type $FUNCSIG$v) + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.const 32 + i32.le_s + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 122 + i32.const 0 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/internal/runtime/ALIGN (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 16 + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $std/runtime/isPowerOf2 (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 0 + i32.ne + local.tee $1 + if (result i32) + local.get $0 + local.get $0 + i32.const 1 + i32.sub + i32.and + i32.const 0 + i32.eq + else + local.get $1 + end + ) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 0 + local.get $1 + i32.store offset=2912 + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 144 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 4 + i32.mul + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/allocator/tlsf/Root#setHead (; 7 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 167 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 168 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + i32.load offset=2912 + ) + (func $~lib/allocator/tlsf/Block#get:right (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 89 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 8 + i32.const 90 + i32.const 11 + call $~lib/env/abort + unreachable + else + local.get $1 + end + ) + (func $~lib/allocator/tlsf/fls (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 428 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $~lib/allocator/tlsf/Root#getHead (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 158 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 159 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + i32.load offset=96 + ) + (func $~lib/allocator/tlsf/Root#getSLMap (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 138 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 4 + i32.mul + i32.add + i32.load offset=4 + ) + (func $~lib/allocator/tlsf/Root#remove (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + i32.load + local.set $2 + local.get $2 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 258 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 260 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $5 + local.get $3 + i32.const 8 + i32.div_u + local.set $6 + else + local.get $3 + call $~lib/allocator/tlsf/fls + local.set $5 + local.get $3 + local.get $5 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $6 + local.get $5 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $5 + end + local.get $1 + i32.load offset=4 + local.set $7 + local.get $1 + i32.load offset=8 + local.set $8 + local.get $7 + if + local.get $7 + local.get $8 + i32.store offset=8 + end + local.get $8 + if + local.get $8 + local.get $7 + i32.store offset=4 + end + local.get $1 + local.get $0 + local.get $5 + local.get $6 + call $~lib/allocator/tlsf/Root#getHead + i32.eq + if + local.get $0 + local.get $5 + local.get $6 + local.get $8 + call $~lib/allocator/tlsf/Root#setHead + local.get $8 + i32.eqz + if + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#getSLMap + local.set $4 + local.get $0 + local.get $5 + local.get $4 + i32.const 1 + local.get $6 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $4 + call $~lib/allocator/tlsf/Root#setSLMap + local.get $4 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $5 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/allocator/tlsf/Block#get:left (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 81 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 8 + i32.const 82 + i32.const 11 + call $~lib/env/abort + unreachable + else + local.get $1 + end + ) + (func $~lib/allocator/tlsf/Root#setJump (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.load + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 334 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.get $2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 335 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 336 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 4 + i32.sub + local.get $1 + i32.store + ) + (func $~lib/allocator/tlsf/Root#insert (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 189 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.set $2 + local.get $2 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 191 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.tee $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 193 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 8 + i32.const 197 + i32.const 23 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $5 + local.get $5 + i32.load + local.set $6 + local.get $6 + global.get $~lib/allocator/tlsf/FREE + i32.and + if + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $2 + global.get $~lib/allocator/tlsf/Block.INFO + local.get $6 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $2 + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.set $5 + local.get $5 + i32.load + local.set $6 + end + local.get $2 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 8 + i32.const 211 + i32.const 24 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $4 + local.get $4 + i32.load + local.set $7 + local.get $7 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 213 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#remove + local.get $4 + local.get $7 + global.get $~lib/allocator/tlsf/Block.INFO + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $7 + i32.store + local.get $4 + local.set $1 + local.get $7 + local.set $2 + end + local.get $5 + local.get $6 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.or + i32.store + local.get $0 + local.get $1 + local.get $5 + call $~lib/allocator/tlsf/Root#setJump + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $7 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $7 + end + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 226 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $8 + local.get $3 + i32.const 8 + i32.div_u + local.set $9 + else + local.get $3 + call $~lib/allocator/tlsf/fls + local.set $8 + local.get $3 + local.get $8 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $9 + local.get $8 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $8 + end + local.get $0 + local.get $8 + local.get $9 + call $~lib/allocator/tlsf/Root#getHead + local.set $10 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $10 + i32.store offset=8 + local.get $10 + if + local.get $10 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $8 + local.get $9 + local.get $1 + call $~lib/allocator/tlsf/Root#setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $8 + i32.shl + i32.or + i32.store + local.get $0 + local.get $8 + local.get $0 + local.get $8 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $9 + i32.shl + i32.or + call $~lib/allocator/tlsf/Root#setSLMap + ) + (func $~lib/allocator/tlsf/Root#addMemory (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + local.get $2 + i32.le_u + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 377 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 378 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 379 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/Root#get:tailRef + local.set $3 + i32.const 0 + local.set $4 + local.get $3 + if + local.get $1 + local.get $3 + i32.const 4 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 384 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.get $3 + i32.eq + if + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $1 + local.get $3 + i32.load + local.set $4 + end + else + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 393 + i32.const 6 + call $~lib/env/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.set $5 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.add + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + i32.lt_u + if + i32.const 0 + return + end + local.get $5 + i32.const 2 + global.get $~lib/allocator/tlsf/Block.INFO + i32.mul + i32.sub + local.set $6 + local.get $1 + local.set $7 + local.get $7 + local.get $6 + global.get $~lib/allocator/tlsf/FREE + i32.or + local.get $4 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.or + i32.store + local.get $7 + i32.const 0 + i32.store offset=4 + local.get $7 + i32.const 0 + i32.store offset=8 + local.get $1 + local.get $5 + i32.add + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $8 + local.get $8 + i32.const 0 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.or + i32.store + local.get $0 + local.get $8 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $0 + local.get $7 + call $~lib/allocator/tlsf/Root#insert + i32.const 1 + ) + (func $~lib/allocator/tlsf/ffs (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 422 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/ffs (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 422 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/Root#search (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $1 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $2 + if (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $2 + end + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 296 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $3 + local.get $1 + i32.const 8 + i32.div_u + local.set $4 + else + local.get $1 + call $~lib/allocator/tlsf/fls + local.set $3 + local.get $1 + local.get $3 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $4 + local.get $3 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $3 + local.get $4 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 1 + i32.sub + i32.lt_u + if + local.get $4 + i32.const 1 + i32.add + local.set $4 + else + local.get $3 + i32.const 1 + i32.add + local.set $3 + i32.const 0 + local.set $4 + end + end + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 0 + i32.const -1 + i32.xor + local.get $4 + i32.shl + i32.and + local.set $5 + local.get $5 + i32.eqz + if + local.get $0 + i32.load + i32.const 0 + i32.const -1 + i32.xor + local.get $3 + i32.const 1 + i32.add + i32.shl + i32.and + local.set $2 + local.get $2 + i32.eqz + if + i32.const 0 + local.set $6 + else + local.get $2 + call $~lib/allocator/tlsf/ffs + local.set $3 + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#getSLMap + local.tee $7 + if (result i32) + local.get $7 + else + i32.const 0 + i32.const 8 + i32.const 323 + i32.const 16 + call $~lib/env/abort + unreachable + end + local.set $5 + local.get $0 + local.get $3 + local.get $5 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $6 + end + else + local.get $0 + local.get $3 + local.get $5 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $6 + end + local.get $6 + ) + (func $~lib/allocator/tlsf/Root#use (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 348 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $2 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 349 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 350 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $3 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.sub + local.set $5 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.add + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.or + i32.store + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + local.get $2 + i32.add + local.set $4 + local.get $4 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#insert + else + local.get $1 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.const -1 + i32.xor + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 8 + i32.const 368 + i32.const 25 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $4 + local.get $4 + local.get $4 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const -1 + i32.xor + i32.and + i32.store + end + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + ) + (func $~lib/allocator/tlsf/__memory_allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + i32.eqz + if + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $2 + current_memory + local.set $3 + local.get $2 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $4 + local.get $4 + local.get $3 + i32.gt_s + local.tee $5 + if (result i32) + local.get $4 + local.get $3 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + local.get $5 + end + if + unreachable + end + local.get $2 + local.tee $1 + global.set $~lib/allocator/tlsf/ROOT + local.get $1 + i32.const 0 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $1 + i32.const 0 + i32.store + block $break|0 + i32.const 0 + local.set $5 + loop $repeat|0 + local.get $5 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + br_if $break|0 + block + local.get $1 + local.get $5 + i32.const 0 + call $~lib/allocator/tlsf/Root#setSLMap + block $break|1 + i32.const 0 + local.set $6 + loop $repeat|1 + local.get $6 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + br_if $break|1 + local.get $1 + local.get $5 + local.get $6 + i32.const 0 + call $~lib/allocator/tlsf/Root#setHead + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $repeat|1 + unreachable + end + unreachable + end + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $repeat|0 + unreachable + end + unreachable + end + local.get $1 + local.get $2 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + end + local.get $0 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.gt_u + if + unreachable + end + local.get $0 + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.tee $4 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + local.tee $3 + local.get $4 + local.get $3 + i32.gt_u + select + local.set $0 + local.get $1 + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.set $7 + local.get $7 + i32.eqz + if + current_memory + local.set $4 + local.get $0 + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $3 + local.get $4 + local.tee $2 + local.get $3 + local.tee $5 + local.get $2 + local.get $5 + i32.gt_s + select + local.set $2 + local.get $2 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + current_memory + local.set $5 + local.get $1 + local.get $4 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + local.get $1 + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.tee $6 + i32.eqz + if (result i32) + i32.const 0 + i32.const 8 + i32.const 480 + i32.const 12 + call $~lib/env/abort + unreachable + else + local.get $6 + end + local.set $7 + end + local.get $7 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.get $0 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 483 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $1 + local.get $7 + local.get $0 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/internal/memory/memset (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i64) + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + i32.const 1 + i32.add + local.get $1 + i32.store8 + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $4 + local.get $0 + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 12 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 24 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 20 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.get $4 + i32.store + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $4 + i64.extend_i32_u + local.get $4 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $5 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $5 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $5 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + end + br $continue|0 + end + end + end + ) + (func $~lib/internal/runtime/ALLOC (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/memory/memory.allocate|inlined.0 (result i32) + local.get $0 + call $~lib/internal/runtime/ALIGN + local.set $1 + local.get $1 + call $~lib/allocator/tlsf/__memory_allocate + br $~lib/memory/memory.allocate|inlined.0 + end + local.set $2 + local.get $2 + i32.const -1520547049 + i32.store + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + i32.const 0 + i32.store offset=8 + local.get $2 + i32.const 0 + i32.store offset=12 + local.get $2 + i32.const 16 + i32.add + local.set $3 + block $~lib/memory/memory.fill|inlined.0 + local.get $3 + local.set $1 + i32.const 0 + local.set $4 + local.get $0 + local.set $5 + local.get $1 + local.get $4 + local.get $5 + call $~lib/internal/memory/memset + end + local.get $3 + ) + (func $~lib/internal/memory/memcpy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $break|0 + loop $continue|0 + local.get $2 + if (result i32) + local.get $1 + i32.const 3 + i32.and + else + local.get $2 + end + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|0 + end + end + end + local.get $0 + i32.const 3 + i32.and + i32.const 0 + i32.eq + if + block $break|1 + loop $continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + block + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|1 + end + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.set $0 + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $0 + i32.const 2 + i32.add + local.set $0 + local.get $1 + i32.const 2 + i32.add + local.set $1 + end + local.get $2 + i32.const 1 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + block $case0|2 + local.get $0 + i32.const 3 + i32.and + local.set $5 + local.get $5 + i32.const 1 + i32.eq + br_if $case0|2 + local.get $5 + i32.const 2 + i32.eq + br_if $case1|2 + local.get $5 + i32.const 3 + i32.eq + br_if $case2|2 + br $break|2 + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + block $break|3 + loop $continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + block + local.get $1 + i32.const 1 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 5 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 9 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 13 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|3 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + block $break|4 + loop $continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + block + local.get $1 + i32.const 2 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 6 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 10 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 14 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|4 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block $break|5 + loop $continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + block + local.get $1 + i32.const 3 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 7 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 11 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 15 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|5 + end + end + end + br $break|2 + unreachable + end + unreachable + end + end + local.get $2 + i32.const 16 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + ) + (func $~lib/internal/memory/memmove (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + local.tee $3 + if (result i32) + local.get $3 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/internal/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + end + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 + if + block + block (result i32) + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + end + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|2 + end + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + ) + (func $~lib/allocator/tlsf/__memory_free (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + if + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $2 + local.get $2 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 8 + i32.const 494 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/internal/runtime/REALLOC (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + local.get $0 + i32.const 16 + i32.sub + local.set $2 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $3 + local.get $1 + i32.lt_u + if + local.get $1 + call $~lib/internal/runtime/ALIGN + local.set $4 + local.get $3 + call $~lib/internal/runtime/ALIGN + local.get $4 + i32.lt_u + if + block $~lib/memory/memory.allocate|inlined.1 (result i32) + local.get $4 + local.set $5 + local.get $5 + call $~lib/allocator/tlsf/__memory_allocate + br $~lib/memory/memory.allocate|inlined.1 + end + local.set $5 + local.get $5 + i32.const -1520547049 + i32.store + local.get $5 + i32.const 0 + i32.store offset=8 + local.get $5 + i32.const 0 + i32.store offset=12 + local.get $5 + i32.const 16 + i32.add + local.set $6 + block $~lib/memory/memory.copy|inlined.0 + local.get $6 + local.set $7 + local.get $0 + local.set $8 + local.get $3 + local.set $9 + local.get $7 + local.get $8 + local.get $9 + call $~lib/internal/memory/memmove + end + block $~lib/memory/memory.fill|inlined.1 + local.get $6 + local.get $3 + i32.add + local.set $9 + i32.const 0 + local.set $8 + local.get $1 + local.get $3 + i32.sub + local.set $7 + local.get $9 + local.get $8 + local.get $7 + call $~lib/internal/memory/memset + end + block $~lib/memory/memory.free|inlined.0 + local.get $2 + local.set $7 + local.get $7 + call $~lib/allocator/tlsf/__memory_free + br $~lib/memory/memory.free|inlined.0 + end + local.get $5 + local.set $2 + local.get $6 + local.set $0 + else + local.get $0 + local.get $3 + i32.add + local.set $6 + i32.const 0 + local.set $5 + local.get $1 + local.get $3 + i32.sub + local.set $7 + local.get $6 + local.get $5 + local.get $7 + call $~lib/internal/memory/memset + end + else + nop + end + local.get $2 + local.get $1 + i32.store offset=4 + local.get $0 + ) + (func $~lib/internal/runtime/FREE (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.const 16 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 88 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.set $1 + local.get $1 + i32.load + i32.const -1520547049 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 90 + i32.const 2 + call $~lib/env/abort + unreachable + end + block $~lib/memory/memory.free|inlined.1 + local.get $1 + local.set $2 + local.get $2 + call $~lib/allocator/tlsf/__memory_free + br $~lib/memory/memory.free|inlined.1 + end + ) + (func $std/runtime/__REGISTER_IMPL (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + global.get $std/runtime/ref4 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 53 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $1 + global.get $std/runtime/ref3 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 54 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.set $2 + local.get $2 + i32.load + i32.const 43 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 56 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 1 + global.set $std/runtime/called + ) + (func $~lib/internal/runtime/REGISTER (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.const 16 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 96 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.set $2 + local.get $2 + i32.load + i32.const -1520547049 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 98 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 43 + i32.store + local.get $0 + local.get $1 + call $std/runtime/__REGISTER_IMPL + ) + (func $start:std/runtime (; 32 ;) (type $FUNCSIG$v) + (local $0 i32) + call $start:~lib/allocator/tlsf + i32.const 43 + i32.const 44 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 15 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 0 + call $~lib/internal/runtime/ALIGN + i32.const 0 + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 21 + i32.const 0 + call $~lib/env/abort + unreachable + end + block $break|0 + i32.const 0 + local.set $0 + loop $repeat|0 + local.get $0 + i32.const 9000 + i32.lt_s + i32.eqz + br_if $break|0 + local.get $0 + call $~lib/internal/runtime/ALIGN + call $std/runtime/isPowerOf2 + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 23 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $repeat|0 + unreachable + end + unreachable + end + i32.const 0 + call $~lib/internal/runtime/ALIGN + global.set $std/runtime/barrier1 + global.get $std/runtime/barrier1 + i32.const 1 + i32.add + global.set $std/runtime/barrier2 + block $break|1 + loop $continue|1 + global.get $std/runtime/barrier2 + i32.const 1 + i32.add + call $~lib/internal/runtime/ALIGN + global.get $std/runtime/barrier2 + call $~lib/internal/runtime/ALIGN + i32.eq + if + global.get $std/runtime/barrier2 + i32.const 1 + i32.add + global.set $std/runtime/barrier2 + br $continue|1 + end + end + end + global.get $std/runtime/barrier2 + i32.const 1 + i32.add + global.set $std/runtime/barrier3 + block $break|2 + loop $continue|2 + global.get $std/runtime/barrier3 + i32.const 1 + i32.add + call $~lib/internal/runtime/ALIGN + global.get $std/runtime/barrier3 + call $~lib/internal/runtime/ALIGN + i32.eq + if + global.get $std/runtime/barrier3 + i32.const 1 + i32.add + global.set $std/runtime/barrier3 + br $continue|2 + end + end + end + i32.const 88 + i32.const 1 + global.get $std/runtime/barrier1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + i32.const 112 + i32.const 1 + global.get $std/runtime/barrier2 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + i32.const 136 + i32.const 1 + global.get $std/runtime/barrier3 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + i32.const 1 + call $~lib/internal/runtime/ALLOC + global.set $std/runtime/ref1 + global.get $std/runtime/ref1 + i32.const 16 + i32.sub + global.set $std/runtime/header1 + global.get $std/runtime/header1 + i32.load + i32.const -1520547049 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 38 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/header1 + i32.load offset=4 + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 39 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/ref1 + global.get $std/runtime/ref1 + global.get $std/runtime/barrier1 + call $~lib/internal/runtime/REALLOC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 40 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/header1 + i32.load offset=4 + global.get $std/runtime/barrier1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 41 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/ref1 + global.get $std/runtime/barrier2 + call $~lib/internal/runtime/REALLOC + global.set $std/runtime/ref2 + global.get $std/runtime/ref1 + global.get $std/runtime/ref2 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 43 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/ref2 + i32.const 16 + i32.sub + global.set $std/runtime/header2 + global.get $std/runtime/header2 + i32.load offset=4 + global.get $std/runtime/barrier2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 45 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/ref2 + call $~lib/internal/runtime/FREE + global.get $std/runtime/barrier2 + call $~lib/internal/runtime/ALLOC + global.set $std/runtime/ref3 + global.get $std/runtime/ref1 + global.get $std/runtime/ref3 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 48 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/barrier1 + call $~lib/internal/runtime/ALLOC + global.set $std/runtime/ref4 + global.get $std/runtime/ref4 + global.get $std/runtime/ref3 + call $~lib/internal/runtime/REGISTER + global.get $std/runtime/called + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 60 + i32.const 0 + call $~lib/env/abort + unreachable + end + ) + (func $start (; 33 ;) (type $FUNCSIG$v) + call $start:std/runtime + ) + (func $null (; 34 ;) (type $FUNCSIG$v) + ) +) From 661e239fcb25f2be3a0a3be17251c16a2e0a603c Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 9 Mar 2019 02:37:05 +0100 Subject: [PATCH 009/119] refactor --- .../{internal/runtime.ts => runtime/index.ts} | 29 +- tests/compiler/std/runtime.optimized.wat | 231 ++++++++-------- tests/compiler/std/runtime.ts | 27 +- tests/compiler/std/runtime.untouched.wat | 247 +++++++++--------- 4 files changed, 255 insertions(+), 279 deletions(-) rename std/assembly/{internal/runtime.ts => runtime/index.ts} (87%) diff --git a/std/assembly/internal/runtime.ts b/std/assembly/runtime/index.ts similarity index 87% rename from std/assembly/internal/runtime.ts rename to std/assembly/runtime/index.ts index a979094ad9..184c9ae829 100644 --- a/std/assembly/internal/runtime.ts +++ b/std/assembly/runtime/index.ts @@ -1,9 +1,8 @@ -import { AL_MASK } from "./allocator"; +import { AL_MASK } from "../internal/allocator"; import { __rt_classid } from "../builtins"; /** Common runtime header of all objects. */ -@unmanaged -export class HEADER { +@unmanaged export class HEADER { /** Unique id of the respective class or a magic value if not yet registered.*/ classId: u32; /** Size of the allocated payload. */ @@ -67,7 +66,10 @@ export function REALLOC(ref: usize, newPayloadSize: u32): usize { let newRef = changetype(newHeader) + HEADER_SIZE; memory.copy(newRef, ref, payloadSize); memory.fill(newRef + payloadSize, 0, newPayloadSize - payloadSize); - memory.free(changetype(header)); + if (header.classId == HEADER_MAGIC) { + // free right away if not registered yet + memory.free(changetype(header)); + } header = newHeader; ref = newRef; } else { @@ -83,20 +85,21 @@ export function REALLOC(ref: usize, newPayloadSize: u32): usize { return ref; } -/** Frees an object. Must not have been registered with GC yet. */ -export function FREE(ref: usize): void { +function ensureUnregistered(ref: usize): HEADER { assert(ref >= HEAP_BASE + HEADER_SIZE); // must be a heap object var header = changetype
(ref - HEADER_SIZE); assert(header.classId == HEADER_MAGIC); // must be unregistered - memory.free(changetype(header)); + return header; } -/** Registers a managed object with GC. Cannot be changed anymore afterwards. */ -export function REGISTER(ref: usize, parentRef: usize): void { - assert(ref >= HEAP_BASE + HEADER_SIZE); // must be a heap object - var header = changetype
(ref - HEADER_SIZE); - assert(header.classId == HEADER_MAGIC); // must be unregistered - header.classId = __rt_classid(); +/** Frees an object. Must not have been registered with GC yet. */ +export function FREE(ref: usize): void { + memory.free(changetype(ensureUnregistered(ref))); +} + +/** Registers a managed object with GC. Cannot be free'd anymore afterwards. */ +@inline export function REGISTER(ref: usize, parentRef: usize): void { + ensureUnregistered(ref).classId = __rt_classid(); if (GC) __REGISTER_IMPL(ref, parentRef); // tslint:disable-line } diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 8f2431175a..a1cb1be969 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -16,10 +16,12 @@ (data (i32.const 88) "\08\00\00\00b\00a\00r\00r\00i\00e\00r\001") (data (i32.const 112) "\08\00\00\00b\00a\00r\00r\00i\00e\00r\002") (data (i32.const 136) "\08\00\00\00b\00a\00r\00r\00i\00e\00r\003") - (data (i32.const 160) "\18\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 160) "\15\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00/\00i\00n\00d\00e\00x\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $std/runtime/register_ref (mut i32) (i32.const 0)) + (global $std/runtime/register_parentRef (mut i32) (i32.const 0)) (global $std/runtime/barrier1 (mut i32) (i32.const 0)) (global $std/runtime/barrier2 (mut i32) (i32.const 0)) (global $std/runtime/barrier3 (mut i32) (i32.const 0)) @@ -29,7 +31,7 @@ (global $std/runtime/header2 (mut i32) (i32.const 0)) (global $std/runtime/ref3 (mut i32) (i32.const 0)) (global $std/runtime/ref4 (mut i32) (i32.const 0)) - (global $std/runtime/called (mut i32) (i32.const 0)) + (global $std/runtime/header4 (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -1019,14 +1021,14 @@ if unreachable end - i32.const 216 + i32.const 208 local.set $3 - i32.const 216 + i32.const 208 global.set $~lib/allocator/tlsf/ROOT i32.const 2912 i32.const 0 i32.store - i32.const 216 + i32.const 208 i32.const 0 i32.store i32.const 0 @@ -1036,7 +1038,7 @@ i32.const 22 i32.lt_u if - i32.const 216 + i32.const 208 local.get $1 i32.const 0 call $~lib/allocator/tlsf/Root#setSLMap @@ -1047,7 +1049,7 @@ i32.const 32 i32.lt_u if - i32.const 216 + i32.const 208 local.get $1 local.get $2 i32.const 0 @@ -1066,8 +1068,8 @@ br $repeat|0 end end - i32.const 216 - i32.const 3136 + i32.const 208 + i32.const 3128 current_memory i32.const 16 i32.shl @@ -1387,7 +1389,7 @@ end end ) - (func $~lib/internal/runtime/ALLOC (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/index/ALLOC (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -2551,7 +2553,7 @@ end end ) - (func $~lib/internal/runtime/REALLOC (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/index/REALLOC (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2559,7 +2561,7 @@ local.get $0 i32.const 16 i32.sub - local.tee $5 + local.tee $3 i32.load offset=4 local.tee $2 local.get $1 @@ -2581,39 +2583,45 @@ i32.clz i32.sub i32.shl - local.tee $3 + local.tee $4 i32.lt_u if - local.get $3 + local.get $4 call $~lib/allocator/tlsf/__memory_allocate - local.tee $4 + local.tee $5 i32.const -1520547049 i32.store - local.get $4 + local.get $5 i32.const 0 i32.store offset=8 - local.get $4 + local.get $5 i32.const 0 i32.store offset=12 - local.get $4 + local.get $5 i32.const 16 i32.add - local.tee $3 + local.tee $4 local.get $0 local.get $2 call $~lib/internal/memory/memmove local.get $2 - local.get $3 + local.get $4 i32.add local.get $1 local.get $2 i32.sub call $~lib/internal/memory/memset + local.get $3 + i32.load + i32.const -1520547049 + i32.eq + if + local.get $3 + call $~lib/allocator/tlsf/__memory_free + end local.get $5 - call $~lib/allocator/tlsf/__memory_free + local.set $3 local.get $4 - local.set $5 - local.get $3 local.set $0 else local.get $0 @@ -2625,19 +2633,19 @@ call $~lib/internal/memory/memset end end - local.get $5 + local.get $3 local.get $1 i32.store offset=4 local.get $0 ) - (func $~lib/internal/runtime/FREE (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/index/ensureUnregistered (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 228 + i32.const 224 i32.lt_u if i32.const 0 i32.const 160 - i32.const 88 + i32.const 89 i32.const 2 call $~lib/env/abort unreachable @@ -2652,90 +2660,14 @@ if i32.const 0 i32.const 160 - i32.const 90 + i32.const 91 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - call $~lib/allocator/tlsf/__memory_free ) - (func $std/runtime/__REGISTER_IMPL (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - global.get $std/runtime/ref4 - i32.ne - if - i32.const 0 - i32.const 56 - i32.const 53 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $1 - global.get $std/runtime/ref3 - i32.ne - if - i32.const 0 - i32.const 56 - i32.const 54 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 43 - i32.ne - if - i32.const 0 - i32.const 56 - i32.const 56 - i32.const 2 - call $~lib/env/abort - unreachable - end - i32.const 1 - global.set $std/runtime/called - ) - (func $~lib/internal/runtime/REGISTER (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.const 228 - i32.lt_u - if - i32.const 0 - i32.const 160 - i32.const 96 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.tee $2 - i32.load - i32.const -1520547049 - i32.ne - if - i32.const 0 - i32.const 160 - i32.const 98 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 43 - i32.store - local.get $0 - local.get $1 - call $std/runtime/__REGISTER_IMPL - ) - (func $start:std/runtime (; 26 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 24 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2775,7 +2707,7 @@ else i32.const 0 i32.const 56 - i32.const 23 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -2873,7 +2805,7 @@ f64.const 0 call $~lib/env/trace i32.const 1 - call $~lib/internal/runtime/ALLOC + call $~lib/runtime/index/ALLOC global.set $std/runtime/ref1 global.get $std/runtime/ref1 i32.const 16 @@ -2886,7 +2818,7 @@ if i32.const 0 i32.const 56 - i32.const 38 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -2898,7 +2830,7 @@ if i32.const 0 i32.const 56 - i32.const 39 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -2907,12 +2839,12 @@ local.tee $0 local.get $0 global.get $std/runtime/barrier1 - call $~lib/internal/runtime/REALLOC + call $~lib/runtime/index/REALLOC i32.ne if i32.const 0 i32.const 56 - i32.const 40 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -2924,14 +2856,14 @@ if i32.const 0 i32.const 56 - i32.const 41 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref1 global.get $std/runtime/barrier2 - call $~lib/internal/runtime/REALLOC + call $~lib/runtime/index/REALLOC global.set $std/runtime/ref2 global.get $std/runtime/ref1 global.get $std/runtime/ref2 @@ -2939,7 +2871,7 @@ if i32.const 0 i32.const 56 - i32.const 43 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -2955,15 +2887,16 @@ if i32.const 0 i32.const 56 - i32.const 45 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref2 - call $~lib/internal/runtime/FREE + call $~lib/runtime/index/ensureUnregistered + call $~lib/allocator/tlsf/__memory_free global.get $std/runtime/barrier2 - call $~lib/internal/runtime/ALLOC + call $~lib/runtime/index/ALLOC global.set $std/runtime/ref3 global.get $std/runtime/ref1 global.get $std/runtime/ref3 @@ -2971,32 +2904,80 @@ if i32.const 0 i32.const 56 - i32.const 48 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/barrier1 - call $~lib/internal/runtime/ALLOC + call $~lib/runtime/index/ALLOC global.set $std/runtime/ref4 + global.get $std/runtime/ref3 + local.set $1 + global.get $std/runtime/ref4 + local.tee $0 + call $~lib/runtime/index/ensureUnregistered + i32.const 43 + i32.store + local.get $0 + global.set $std/runtime/register_ref + local.get $1 + global.set $std/runtime/register_parentRef + global.get $std/runtime/register_ref global.get $std/runtime/ref4 + i32.ne + if + i32.const 0 + i32.const 56 + i32.const 61 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/register_parentRef global.get $std/runtime/ref3 - call $~lib/internal/runtime/REGISTER - global.get $std/runtime/called - i32.eqz + i32.ne + if + i32.const 0 + i32.const 56 + i32.const 62 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/register_ref + i32.const 16 + i32.sub + global.set $std/runtime/header4 + global.get $std/runtime/header4 + i32.load + i32.const 43 + i32.ne + if + i32.const 0 + i32.const 56 + i32.const 64 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/barrier1 + global.get $std/runtime/header4 + i32.load offset=4 + i32.ne if i32.const 0 i32.const 56 - i32.const 60 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 27 ;) (type $FUNCSIG$v) + (func $start (; 25 ;) (type $FUNCSIG$v) call $start:std/runtime ) - (func $null (; 28 ;) (type $FUNCSIG$v) + (func $null (; 26 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/runtime.ts b/tests/compiler/std/runtime.ts index dd89399e2b..f2e233c96e 100644 --- a/tests/compiler/std/runtime.ts +++ b/tests/compiler/std/runtime.ts @@ -1,4 +1,13 @@ import "allocator/tlsf"; + +var register_ref: usize = 0; +var register_parentRef: usize = 0; + +@global function __REGISTER_IMPL(ref: usize, parentRef: usize): void { + register_ref = ref; + register_parentRef = parentRef; +} + import { HEADER, HEADER_SIZE, @@ -8,7 +17,7 @@ import { REALLOC, FREE, REGISTER -} from "internal/runtime"; +} from "runtime"; class A {} class B {} @@ -48,13 +57,9 @@ var ref3 = ALLOC(barrier2); assert(ref1 == ref3); // reuses space of ref1 (free'd in realloc), ref2 (explicitly free'd) var ref4 = ALLOC(barrier1); -var called = false; -@global function __REGISTER_IMPL(ref: usize, parentRef: usize): void { - assert(ref == ref4); - assert(parentRef == ref3); - var header = changetype
(ref - HEADER_SIZE); - assert(header.classId == __rt_classid()); - called = true; -} -REGISTER(ref4, ref3); // TODO -assert(called); +REGISTER(ref4, ref3); // sets up ref4 and then calls __REGISTER_IMPL +assert(register_ref == ref4); +assert(register_parentRef == ref3); +var header4 = changetype
(register_ref - HEADER_SIZE); +assert(header4.classId == __rt_classid()); +assert(header4.payloadSize == barrier1); diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 9de6f5ea48..ccd59de163 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -16,7 +16,7 @@ (data (i32.const 88) "\08\00\00\00b\00a\00r\00r\00i\00e\00r\001\00") (data (i32.const 112) "\08\00\00\00b\00a\00r\00r\00i\00e\00r\002\00") (data (i32.const 136) "\08\00\00\00b\00a\00r\00r\00i\00e\00r\003\00") - (data (i32.const 160) "\18\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 160) "\15\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00/\00i\00n\00d\00e\00x\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) @@ -36,6 +36,8 @@ (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $std/runtime/register_ref (mut i32) (i32.const 0)) + (global $std/runtime/register_parentRef (mut i32) (i32.const 0)) (global $std/runtime/barrier1 (mut i32) (i32.const 0)) (global $std/runtime/barrier2 (mut i32) (i32.const 0)) (global $std/runtime/barrier3 (mut i32) (i32.const 0)) @@ -45,8 +47,8 @@ (global $std/runtime/header2 (mut i32) (i32.const 0)) (global $std/runtime/ref3 (mut i32) (i32.const 0)) (global $std/runtime/ref4 (mut i32) (i32.const 0)) - (global $std/runtime/called (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 212)) + (global $std/runtime/header4 (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 208)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -66,7 +68,7 @@ unreachable end ) - (func $~lib/internal/runtime/ALIGN (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/index/ALIGN (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -1710,7 +1712,7 @@ end end ) - (func $~lib/internal/runtime/ALLOC (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/index/ALLOC (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1718,7 +1720,7 @@ (local $5 i32) block $~lib/memory/memory.allocate|inlined.0 (result i32) local.get $0 - call $~lib/internal/runtime/ALIGN + call $~lib/runtime/index/ALIGN local.set $1 local.get $1 call $~lib/allocator/tlsf/__memory_allocate @@ -3226,7 +3228,7 @@ end end ) - (func $~lib/internal/runtime/REALLOC (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/index/REALLOC (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3247,10 +3249,10 @@ i32.lt_u if local.get $1 - call $~lib/internal/runtime/ALIGN + call $~lib/runtime/index/ALIGN local.set $4 local.get $3 - call $~lib/internal/runtime/ALIGN + call $~lib/runtime/index/ALIGN local.get $4 i32.lt_u if @@ -3303,12 +3305,18 @@ local.get $7 call $~lib/internal/memory/memset end - block $~lib/memory/memory.free|inlined.0 - local.get $2 - local.set $7 - local.get $7 - call $~lib/allocator/tlsf/__memory_free - br $~lib/memory/memory.free|inlined.0 + local.get $2 + i32.load + i32.const -1520547049 + i32.eq + if + block $~lib/memory/memory.free|inlined.0 + local.get $2 + local.set $7 + local.get $7 + call $~lib/allocator/tlsf/__memory_free + br $~lib/memory/memory.free|inlined.0 + end end local.get $5 local.set $2 @@ -3338,9 +3346,8 @@ i32.store offset=4 local.get $0 ) - (func $~lib/internal/runtime/FREE (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/index/ensureUnregistered (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.const 16 @@ -3350,7 +3357,7 @@ if i32.const 0 i32.const 160 - i32.const 88 + i32.const 89 i32.const 2 call $~lib/env/abort unreachable @@ -3367,107 +3374,33 @@ if i32.const 0 i32.const 160 - i32.const 90 + i32.const 91 i32.const 2 call $~lib/env/abort unreachable end + local.get $1 + ) + (func $~lib/runtime/index/FREE (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) block $~lib/memory/memory.free|inlined.1 + local.get $0 + call $~lib/runtime/index/ensureUnregistered + local.set $1 local.get $1 - local.set $2 - local.get $2 call $~lib/allocator/tlsf/__memory_free br $~lib/memory/memory.free|inlined.1 end ) - (func $std/runtime/__REGISTER_IMPL (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $std/runtime/__REGISTER_IMPL (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 - global.get $std/runtime/ref4 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 53 - i32.const 2 - call $~lib/env/abort - unreachable - end + global.set $std/runtime/register_ref local.get $1 - global.get $std/runtime/ref3 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 54 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.set $2 - local.get $2 - i32.load - i32.const 43 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 56 - i32.const 2 - call $~lib/env/abort - unreachable - end - i32.const 1 - global.set $std/runtime/called - ) - (func $~lib/internal/runtime/REGISTER (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.const 16 - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 96 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.set $2 - local.get $2 - i32.load - i32.const -1520547049 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 160 - i32.const 98 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 43 - i32.store - local.get $0 - local.get $1 - call $std/runtime/__REGISTER_IMPL + global.set $std/runtime/register_parentRef ) (func $start:std/runtime (; 32 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) call $start:~lib/allocator/tlsf i32.const 43 i32.const 44 @@ -3476,20 +3409,20 @@ if i32.const 0 i32.const 56 - i32.const 15 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable end i32.const 0 - call $~lib/internal/runtime/ALIGN + call $~lib/runtime/index/ALIGN i32.const 0 i32.gt_u i32.eqz if i32.const 0 i32.const 56 - i32.const 21 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -3504,13 +3437,13 @@ i32.eqz br_if $break|0 local.get $0 - call $~lib/internal/runtime/ALIGN + call $~lib/runtime/index/ALIGN call $std/runtime/isPowerOf2 i32.eqz if i32.const 0 i32.const 56 - i32.const 23 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -3525,7 +3458,7 @@ unreachable end i32.const 0 - call $~lib/internal/runtime/ALIGN + call $~lib/runtime/index/ALIGN global.set $std/runtime/barrier1 global.get $std/runtime/barrier1 i32.const 1 @@ -3536,9 +3469,9 @@ global.get $std/runtime/barrier2 i32.const 1 i32.add - call $~lib/internal/runtime/ALIGN + call $~lib/runtime/index/ALIGN global.get $std/runtime/barrier2 - call $~lib/internal/runtime/ALIGN + call $~lib/runtime/index/ALIGN i32.eq if global.get $std/runtime/barrier2 @@ -3558,9 +3491,9 @@ global.get $std/runtime/barrier3 i32.const 1 i32.add - call $~lib/internal/runtime/ALIGN + call $~lib/runtime/index/ALIGN global.get $std/runtime/barrier3 - call $~lib/internal/runtime/ALIGN + call $~lib/runtime/index/ALIGN i32.eq if global.get $std/runtime/barrier3 @@ -3599,7 +3532,7 @@ f64.const 0 call $~lib/env/trace i32.const 1 - call $~lib/internal/runtime/ALLOC + call $~lib/runtime/index/ALLOC global.set $std/runtime/ref1 global.get $std/runtime/ref1 i32.const 16 @@ -3613,7 +3546,7 @@ if i32.const 0 i32.const 56 - i32.const 38 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -3626,7 +3559,7 @@ if i32.const 0 i32.const 56 - i32.const 39 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -3634,13 +3567,13 @@ global.get $std/runtime/ref1 global.get $std/runtime/ref1 global.get $std/runtime/barrier1 - call $~lib/internal/runtime/REALLOC + call $~lib/runtime/index/REALLOC i32.eq i32.eqz if i32.const 0 i32.const 56 - i32.const 40 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -3653,14 +3586,14 @@ if i32.const 0 i32.const 56 - i32.const 41 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref1 global.get $std/runtime/barrier2 - call $~lib/internal/runtime/REALLOC + call $~lib/runtime/index/REALLOC global.set $std/runtime/ref2 global.get $std/runtime/ref1 global.get $std/runtime/ref2 @@ -3669,7 +3602,7 @@ if i32.const 0 i32.const 56 - i32.const 43 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -3686,15 +3619,15 @@ if i32.const 0 i32.const 56 - i32.const 45 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref2 - call $~lib/internal/runtime/FREE + call $~lib/runtime/index/FREE global.get $std/runtime/barrier2 - call $~lib/internal/runtime/ALLOC + call $~lib/runtime/index/ALLOC global.set $std/runtime/ref3 global.get $std/runtime/ref1 global.get $std/runtime/ref3 @@ -3703,23 +3636,77 @@ if i32.const 0 i32.const 56 - i32.const 48 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/barrier1 - call $~lib/internal/runtime/ALLOC + call $~lib/runtime/index/ALLOC global.set $std/runtime/ref4 + block $~lib/runtime/index/REGISTER|inlined.0 + global.get $std/runtime/ref4 + local.set $0 + global.get $std/runtime/ref3 + local.set $1 + local.get $0 + call $~lib/runtime/index/ensureUnregistered + i32.const 43 + i32.store + local.get $0 + local.get $1 + call $std/runtime/__REGISTER_IMPL + end + global.get $std/runtime/register_ref global.get $std/runtime/ref4 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 61 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/register_parentRef global.get $std/runtime/ref3 - call $~lib/internal/runtime/REGISTER - global.get $std/runtime/called + i32.eq + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 62 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/register_ref + i32.const 16 + i32.sub + global.set $std/runtime/header4 + global.get $std/runtime/header4 + i32.load + i32.const 43 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 64 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/header4 + i32.load offset=4 + global.get $std/runtime/barrier1 + i32.eq i32.eqz if i32.const 0 i32.const 56 - i32.const 60 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable From 5c25b0cb72034acfa0baf65d8831688e8fe9eda8 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 9 Mar 2019 02:44:46 +0100 Subject: [PATCH 010/119] refactor --- std/assembly/runtime/index.ts | 6 +- tests/compiler/std/runtime.optimized.wat | 58 ++++++++++++++---- tests/compiler/std/runtime.ts | 8 ++- tests/compiler/std/runtime.untouched.wat | 78 ++++++++++++++++++------ 4 files changed, 116 insertions(+), 34 deletions(-) diff --git a/std/assembly/runtime/index.ts b/std/assembly/runtime/index.ts index 184c9ae829..497c089127 100644 --- a/std/assembly/runtime/index.ts +++ b/std/assembly/runtime/index.ts @@ -106,15 +106,13 @@ export function FREE(ref: usize): void { /** ArrayBuffer base class. */ export abstract class ArrayBufferBase { get byteLength(): i32 { - var header = changetype
(changetype(this) - HEADER_SIZE); - return header.payloadSize; + return changetype
(changetype(this) - HEADER_SIZE).payloadSize; } } /** String base class. */ export abstract class StringBase { get length(): i32 { - var header = changetype
(changetype(this) - HEADER_SIZE); - return header.payloadSize >>> 1; + return changetype
(changetype(this) - HEADER_SIZE).payloadSize >> 1; } } diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index a1cb1be969..4444ad5519 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -32,6 +32,7 @@ (global $std/runtime/ref3 (mut i32) (i32.const 0)) (global $std/runtime/ref4 (mut i32) (i32.const 0)) (global $std/runtime/header4 (mut i32) (i32.const 0)) + (global $std/runtime/ref5 (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -2707,7 +2708,7 @@ else i32.const 0 i32.const 56 - i32.const 32 + i32.const 34 i32.const 2 call $~lib/env/abort unreachable @@ -2818,7 +2819,7 @@ if i32.const 0 i32.const 56 - i32.const 47 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -2830,7 +2831,7 @@ if i32.const 0 i32.const 56 - i32.const 48 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -2844,7 +2845,7 @@ if i32.const 0 i32.const 56 - i32.const 49 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -2856,7 +2857,7 @@ if i32.const 0 i32.const 56 - i32.const 50 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -2871,7 +2872,7 @@ if i32.const 0 i32.const 56 - i32.const 52 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -2887,7 +2888,7 @@ if i32.const 0 i32.const 56 - i32.const 54 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -2904,7 +2905,7 @@ if i32.const 0 i32.const 56 - i32.const 57 + i32.const 59 i32.const 0 call $~lib/env/abort unreachable @@ -2929,7 +2930,7 @@ if i32.const 0 i32.const 56 - i32.const 61 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -2940,7 +2941,7 @@ if i32.const 0 i32.const 56 - i32.const 62 + i32.const 64 i32.const 0 call $~lib/env/abort unreachable @@ -2956,7 +2957,7 @@ if i32.const 0 i32.const 56 - i32.const 64 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable @@ -2968,7 +2969,40 @@ if i32.const 0 i32.const 56 - i32.const 65 + i32.const 67 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 10 + call $~lib/runtime/index/ALLOC + global.set $std/runtime/ref5 + global.get $std/runtime/ref5 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 56 + i32.const 70 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/ref5 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 56 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.ts b/tests/compiler/std/runtime.ts index f2e233c96e..08a82443d4 100644 --- a/tests/compiler/std/runtime.ts +++ b/tests/compiler/std/runtime.ts @@ -16,7 +16,9 @@ import { ALLOC, REALLOC, FREE, - REGISTER + REGISTER, + ArrayBufferBase, + StringBase } from "runtime"; class A {} @@ -63,3 +65,7 @@ assert(register_parentRef == ref3); var header4 = changetype
(register_ref - HEADER_SIZE); assert(header4.classId == __rt_classid()); assert(header4.payloadSize == barrier1); + +var ref5 = ALLOC(10); +assert(changetype(ref5).byteLength == 10); +assert(changetype(ref5).length == 5); diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index ccd59de163..2725add6a6 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -48,6 +48,7 @@ (global $std/runtime/ref3 (mut i32) (i32.const 0)) (global $std/runtime/ref4 (mut i32) (i32.const 0)) (global $std/runtime/header4 (mut i32) (i32.const 0)) + (global $std/runtime/ref5 (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 208)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -3398,7 +3399,21 @@ local.get $1 global.set $std/runtime/register_parentRef ) - (func $start:std/runtime (; 32 ;) (type $FUNCSIG$v) + (func $~lib/runtime/index/ArrayBufferBase#get:byteLength (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/index/StringBase#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + ) + (func $start:std/runtime (; 34 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $start:~lib/allocator/tlsf @@ -3409,7 +3424,7 @@ if i32.const 0 i32.const 56 - i32.const 24 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -3422,7 +3437,7 @@ if i32.const 0 i32.const 56 - i32.const 30 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -3443,7 +3458,7 @@ if i32.const 0 i32.const 56 - i32.const 32 + i32.const 34 i32.const 2 call $~lib/env/abort unreachable @@ -3546,7 +3561,7 @@ if i32.const 0 i32.const 56 - i32.const 47 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -3559,7 +3574,7 @@ if i32.const 0 i32.const 56 - i32.const 48 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -3573,7 +3588,7 @@ if i32.const 0 i32.const 56 - i32.const 49 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -3586,7 +3601,7 @@ if i32.const 0 i32.const 56 - i32.const 50 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -3602,7 +3617,7 @@ if i32.const 0 i32.const 56 - i32.const 52 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -3619,7 +3634,7 @@ if i32.const 0 i32.const 56 - i32.const 54 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -3636,7 +3651,7 @@ if i32.const 0 i32.const 56 - i32.const 57 + i32.const 59 i32.const 0 call $~lib/env/abort unreachable @@ -3664,7 +3679,7 @@ if i32.const 0 i32.const 56 - i32.const 61 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -3676,7 +3691,7 @@ if i32.const 0 i32.const 56 - i32.const 62 + i32.const 64 i32.const 0 call $~lib/env/abort unreachable @@ -3693,7 +3708,7 @@ if i32.const 0 i32.const 56 - i32.const 64 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable @@ -3706,15 +3721,44 @@ if i32.const 0 i32.const 56 - i32.const 65 + i32.const 67 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 10 + call $~lib/runtime/index/ALLOC + global.set $std/runtime/ref5 + global.get $std/runtime/ref5 + call $~lib/runtime/index/ArrayBufferBase#get:byteLength + i32.const 10 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 70 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/runtime/ref5 + call $~lib/runtime/index/StringBase#get:length + i32.const 5 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 33 ;) (type $FUNCSIG$v) + (func $start (; 35 ;) (type $FUNCSIG$v) call $start:std/runtime ) - (func $null (; 34 ;) (type $FUNCSIG$v) + (func $null (; 36 ;) (type $FUNCSIG$v) ) ) From 5a2ab3d7ecc7ecb49c62892bad0b4bf5ebede038 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 10 Mar 2019 02:57:05 +0100 Subject: [PATCH 011/119] what std/string would look like --- std/assembly/runtime/index.ts | 48 ++- std/assembly/runtime/itcm.ts | 8 + std/assembly/string.ts | 431 ++++++++++++----------- tests/compiler/std/runtime.optimized.wat | 42 +-- tests/compiler/std/runtime.ts | 7 +- tests/compiler/std/runtime.untouched.wat | 51 +-- 6 files changed, 302 insertions(+), 285 deletions(-) create mode 100644 std/assembly/runtime/itcm.ts diff --git a/std/assembly/runtime/index.ts b/std/assembly/runtime/index.ts index 497c089127..57ce74418b 100644 --- a/std/assembly/runtime/index.ts +++ b/std/assembly/runtime/index.ts @@ -1,4 +1,4 @@ -import { AL_MASK } from "../internal/allocator"; +import { AL_MASK, MAX_SIZE_32 } from "../internal/allocator"; import { __rt_classid } from "../builtins"; /** Common runtime header of all objects. */ @@ -8,18 +8,22 @@ import { __rt_classid } from "../builtins"; /** Size of the allocated payload. */ payloadSize: u32; /** Reserved field for use by GC. Only present if GC is. */ - reserved1: usize; // itcm: tagged next + gc1: usize; // itcm: tagged next /** Reserved field for use by GC. Only present if GC is. */ - reserved2: usize; // itcm: prev + gc2: usize; // itcm: prev } +// Note that header data and layout isn't quite optimal depending on which allocator one +// decides to use, but it's done this way for maximum flexibility. Also remember that the +// runtime will most likely change significantly once reftypes and WASM GC are a thing. + /** Whether a GC is present or not. */ -@inline export const GC = isDefined(__REGISTER_IMPL); +@inline export const GC = isDefined(gc); /** Size of the common runtime header. */ @inline export const HEADER_SIZE: usize = GC - ? (offsetof
( ) + AL_MASK) & ~AL_MASK // full header if GC is present - : (offsetof
("reserved1") + AL_MASK) & ~AL_MASK; // half header if GC is absent + ? (offsetof
( ) + AL_MASK) & ~AL_MASK // full header if GC is present + : (offsetof
("gc1") + AL_MASK) & ~AL_MASK; // half header if GC is absent /** Magic value used to validate common runtime headers. */ @inline export const HEADER_MAGIC: u32 = 0xA55E4B17; @@ -41,8 +45,8 @@ export function ALLOC(payloadSize: u32): usize { header.classId = HEADER_MAGIC; header.payloadSize = payloadSize; if (GC) { - header.reserved1 = 0; - header.reserved2 = 0; + header.gc1 = 0; + header.gc2 = 0; } var ref = changetype(header) + HEADER_SIZE; memory.fill(ref, 0, payloadSize); @@ -60,8 +64,8 @@ export function REALLOC(ref: usize, newPayloadSize: u32): usize { let newHeader = changetype
(memory.allocate(newAlignedSize)); newHeader.classId = HEADER_MAGIC; if (GC) { - newHeader.reserved1 = 0; - newHeader.reserved2 = 0; + newHeader.gc1 = 0; + newHeader.gc2 = 0; } let newRef = changetype(newHeader) + HEADER_SIZE; memory.copy(newRef, ref, payloadSize); @@ -85,7 +89,7 @@ export function REALLOC(ref: usize, newPayloadSize: u32): usize { return ref; } -function ensureUnregistered(ref: usize): HEADER { +function unref(ref: usize): HEADER { assert(ref >= HEAP_BASE + HEADER_SIZE); // must be a heap object var header = changetype
(ref - HEADER_SIZE); assert(header.classId == HEADER_MAGIC); // must be unregistered @@ -94,17 +98,28 @@ function ensureUnregistered(ref: usize): HEADER { /** Frees an object. Must not have been registered with GC yet. */ export function FREE(ref: usize): void { - memory.free(changetype(ensureUnregistered(ref))); + memory.free(changetype(unref(ref))); +} + +/** Registers a managed object. Cannot be free'd anymore afterwards. */ +@inline export function REGISTER(ref: usize): T { + // inline this because it's generic so we don't get a bunch of functions + unref(ref).classId = __rt_classid(); + if (GC) gc.register(ref); + return changetype(ref); } -/** Registers a managed object with GC. Cannot be free'd anymore afterwards. */ -@inline export function REGISTER(ref: usize, parentRef: usize): void { - ensureUnregistered(ref).classId = __rt_classid(); - if (GC) __REGISTER_IMPL(ref, parentRef); // tslint:disable-line +/** Links a managed object with its managed parent. */ +export function LINK(ref: usize, parentRef: usize): void { + assert(ref >= HEAP_BASE + HEADER_SIZE); // must be a heap object + var header = changetype
(ref - HEADER_SIZE); + assert(header.classId != HEADER_MAGIC && header.gc1 != 0 && header.gc2 != 0); // must be registered + if (GC) gc.link(ref, parentRef); // tslint:disable-line } /** ArrayBuffer base class. */ export abstract class ArrayBufferBase { + static readonly MAX_BYTELENGTH: i32 = MAX_SIZE_32 - HEADER_SIZE; get byteLength(): i32 { return changetype
(changetype(this) - HEADER_SIZE).payloadSize; } @@ -112,6 +127,7 @@ export abstract class ArrayBufferBase { /** String base class. */ export abstract class StringBase { + static readonly MAX_LENGTH: i32 = (MAX_SIZE_32 - HEADER_SIZE) >> 1; get length(): i32 { return changetype
(changetype(this) - HEADER_SIZE).payloadSize >> 1; } diff --git a/std/assembly/runtime/itcm.ts b/std/assembly/runtime/itcm.ts new file mode 100644 index 0000000000..19da440b9f --- /dev/null +++ b/std/assembly/runtime/itcm.ts @@ -0,0 +1,8 @@ +@global namespace gc { + @unsafe export function register(ref: usize): void { + } + @unsafe export function link(ref: usize, parentRef: usize): void { + } + export function collect(): void { + } +} diff --git a/std/assembly/string.ts b/std/assembly/string.ts index b6ca9f7367..816bab4ff2 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -1,11 +1,10 @@ import { - HEADER_SIZE, - MAX_LENGTH, - allocateUnsafe, - compareUnsafe, - repeatUnsafe, - copyUnsafe, - isWhiteSpaceOrLineTerminator, + ALLOC, + REGISTER, + StringBase +} from "./runtime"; + +import { CharCode, parse } from "./internal/string"; @@ -14,94 +13,141 @@ import { STORE } from "./internal/arraybuffer"; -@sealed -export class String { +function compareImpl(str1: String, offset1: usize, str2: String, offset2: usize, len: usize): i32 { + var result: i32 = 0; + var ptr1 = changetype(str1) + (offset1 << 1); + var ptr2 = changetype(str2) + (offset2 << 1); + while (len && !(result = load(ptr1) - load(ptr2))) { + --len, ptr1 += 2, ptr2 += 2; + } + return result; +} + +function repeatImpl(dst: usize, dstIndex: usize, src: String, count: i32): void { + var length = src.length; + if (ASC_SHRINK_LEVEL > 1) { + let strLen = length << 1; + let to = changetype(dst) + (dstIndex << 1); + let from = changetype(src); + for (let i = 0, len = strLen * count; i < len; i += strLen) { + memory.copy(to + i, from, strLen); + } + } else { + switch (length) { + case 0: break; + case 1: { + let cc = load(changetype(src)); + let out = changetype(dst) + (dstIndex << 1); + for (let i = 0; i < count; ++i) { + store(out + (i << 1), cc); + } + break; + } + case 2: { + let cc = load(changetype(src)); + let out = changetype(dst) + (dstIndex << 1); + for (let i = 0; i < count; ++i) { + store(out + (i << 2), cc); + } + break; + } + case 3: { + let cc1 = load(changetype(src)); + let cc2 = load(changetype(src), 4); + let out = changetype(dst) + (dstIndex << 1); + for (let i = 0; i < count; ++i) { + store(out + (i << 2), cc1); + store(out + (i << 1), cc2, 4); + } + break; + } + case 4: { + let cc = load(changetype(src)); + let out = changetype(dst) + (dstIndex << 1); + for (let i = 0; i < count; ++i) { + store(out + (i << 3), cc); + } + break; + } + default: { + let strLen = length << 1; + let to = changetype(dst) + (dstIndex << 1); + let from = changetype(src); + for (let i = 0, len = strLen * count; i < len; i += strLen) { + memory.copy(to + i, from, strLen); + } + break; + } + } + } +} - readonly length: i32; // capped to [0, MAX_LENGTH] +function isWhiteSpaceOrLineTerminator(c: u16): bool { + switch (c) { + case 9: // + case 10: // + case 13: // + case 11: // + case 12: // + case 32: // + case 160: // + case 8232: // + case 8233: // + case 65279: return true; // + default: return false; + } +} + +@sealed +export class String extends StringBase { // TODO Add and handle second argument static fromCharCode(code: i32): String { - var out = allocateUnsafe(1); - store( - changetype(out), - code, - HEADER_SIZE - ); - return out; + var out = ALLOC(2); + store(out, code); + return REGISTER(out); } static fromCodePoint(code: i32): String { assert(code <= 0x10FFFF); var sur = code > 0xFFFF; - var out = allocateUnsafe(sur + 1); + var out = ALLOC((sur + 1) << 1); if (!sur) { - store( - changetype(out), - code, - HEADER_SIZE - ); + store(out, code); } else { code -= 0x10000; let hi: u32 = (code >>> 10) + 0xD800; let lo: u32 = (code & 0x3FF) + 0xDC00; - store( - changetype(out), - (hi << 16) | lo, - HEADER_SIZE - ); + store(out, (hi << 16) | lo); } - return out; + return REGISTER(out); } - @operator("[]") - charAt(pos: i32): String { + @operator("[]") charAt(pos: i32): String { assert(this !== null); - if (pos >= this.length) return changetype(""); - - var out = allocateUnsafe(1); - store( - changetype(out), - load( - changetype(this) + (pos << 1), - HEADER_SIZE - ), - HEADER_SIZE - ); - return out; + var out = ALLOC(2); + store(out, load(changetype(this) + (pos << 1))); + return REGISTER(out); } charCodeAt(pos: i32): i32 { assert(this !== null); if (pos >= this.length) return -1; // (NaN) - - return load( - changetype(this) + (pos << 1), - HEADER_SIZE - ); + return load(changetype(this) + (pos << 1)); } codePointAt(pos: i32): i32 { assert(this !== null); if (pos >= this.length) return -1; // (undefined) - - var first = load( - changetype(this) + (pos << 1), - HEADER_SIZE - ); - if (first < 0xD800 || first > 0xDBFF || pos + 1 == this.length) { - return first; - } - var second = load( - changetype(this) + ((pos + 1) << 1), - HEADER_SIZE - ); + var first = load(changetype(this) + (pos << 1)); + if (first < 0xD800 || first > 0xDBFF || pos + 1 == this.length) return first; + var second = load(changetype(this) + ((pos + 1) << 1)); if (second < 0xDC00 || second > 0xDFFF) return first; return ((first - 0xD800) << 10) + (second - 0xDC00) + 0x10000; } - @operator("+") - private static __concat(left: String, right: String): String { + @operator("+") static concat(left: String, right: String): String { if (!changetype(left)) left = changetype("null"); return left.concat(right); } @@ -109,90 +155,71 @@ export class String { concat(other: String): String { assert(this !== null); if (other === null) other = changetype("null"); - - var thisLen: isize = this.length; - var otherLen: isize = other.length; - var outLen: usize = thisLen + otherLen; - if (outLen == 0) return changetype(""); - var out = allocateUnsafe(outLen); - copyUnsafe(out, 0, this, 0, thisLen); - copyUnsafe(out, thisLen, other, 0, otherLen); - return out; + var thisSize: isize = this.length << 1; + var otherSize: isize = other.length << 1; + var outSize: usize = thisSize + otherSize; + if (outSize == 0) return changetype(""); + var out = ALLOC(outSize); + memory.copy(out, changetype(this), thisSize); + memory.copy(out + thisSize, changetype(other), otherSize); + return REGISTER(out); } - endsWith(searchString: String, endPosition: i32 = MAX_LENGTH): bool { + endsWith(searchString: String, endPosition: i32 = String.MAX_LENGTH): bool { assert(this !== null); if (searchString === null) return false; var end = min(max(endPosition, 0), this.length); var searchLength: isize = searchString.length; var start: isize = end - searchLength; if (start < 0) return false; - return !compareUnsafe(this, start, searchString, 0, searchLength); + return !compareImpl(this, start, searchString, 0, searchLength); } - @operator("==") - private static __eq(left: String, right: String): bool { + @operator("==") static eq(left: String, right: String): bool { if (left === right) return true; if (left === null || right === null) return false; - var leftLength = left.length; if (leftLength != right.length) return false; - - return !compareUnsafe(left, 0, right, 0, leftLength); + return !compareImpl(left, 0, right, 0, leftLength); } - @operator("!=") - private static __ne(left: String, right: String): bool { - return !this.__eq(left, right); + @operator("!=") static ne(left: String, right: String): bool { + return !this.eq(left, right); } - @operator(">") - private static __gt(left: String, right: String): bool { + @operator(">") static gt(left: String, right: String): bool { if (left === right || left === null || right === null) return false; - var leftLength = left.length; var rightLength = right.length; - if (!leftLength) return false; if (!rightLength) return true; - - var length = min(leftLength, rightLength); - return compareUnsafe(left, 0, right, 0, length) > 0; + return compareImpl(left, 0, right, 0, min(leftLength, rightLength)) > 0; } - @operator(">=") - private static __gte(left: String, right: String): bool { - return !this.__lt(left, right); + @operator(">=") static gte(left: String, right: String): bool { + return !this.lt(left, right); } - @operator("<") - private static __lt(left: String, right: String): bool { + @operator("<") static lt(left: String, right: String): bool { if (left === right || left === null || right === null) return false; - var leftLength = left.length; var rightLength = right.length; - if (!rightLength) return false; if (!leftLength) return true; - - var length = min(leftLength, rightLength); - return compareUnsafe(left, 0, right, 0, length) < 0; + return compareImpl(left, 0, right, 0, min(leftLength, rightLength)) < 0; } - @operator("<=") - private static __lte(left: String, right: String): bool { - return !this.__gt(left, right); + @operator("<=") static lte(left: String, right: String): bool { + return !this.gt(left, right); } - @inline - includes(searchString: String, position: i32 = 0): bool { + @inline includes(searchString: String, position: i32 = 0): bool { return this.indexOf(searchString, position) != -1; } indexOf(searchString: String, fromIndex: i32 = 0): i32 { assert(this !== null); if (searchString === null) searchString = changetype("null"); - var searchLen: isize = searchString.length; if (!searchLen) return 0; var len: isize = this.length; @@ -200,7 +227,7 @@ export class String { var start = min(max(fromIndex, 0), len); len -= searchLen; for (let k: isize = start; k <= len; ++k) { - if (!compareUnsafe(this, k, searchString, 0, searchLen)) return k; + if (!compareImpl(this, k, searchString, 0, searchLen)) return k; } return -1; } @@ -208,14 +235,13 @@ export class String { lastIndexOf(searchString: String, fromIndex: i32 = i32.MAX_VALUE): i32 { assert(this !== null); if (searchString === null) searchString = changetype("null"); - var len: isize = this.length; var searchLen: isize = searchString.length; if (!searchLen) return len; if (!len) return -1; var start = min(max(fromIndex, 0), len - searchLen); for (let k = start; k >= 0; --k) { - if (!compareUnsafe(this, k, searchString, 0, searchLen)) return k; + if (!compareImpl(this, k, searchString, 0, searchLen)) return k; } return -1; } @@ -223,13 +249,12 @@ export class String { startsWith(searchString: String, position: i32 = 0): bool { assert(this !== null); if (searchString === null) searchString = changetype("null"); - var pos: isize = position; var len: isize = this.length; var start = min(max(pos, 0), len); var searchLength: isize = searchString.length; if (searchLength + start > len) return false; - return !compareUnsafe(this, start, searchString, 0, searchLength); + return !compareImpl(this, start, searchString, 0, searchLength); } substr(start: i32, length: i32 = i32.MAX_VALUE): String { @@ -240,52 +265,52 @@ export class String { if (intStart < 0) intStart = max(size + intStart, 0); var resultLength = min(max(end, 0), size - intStart); if (resultLength <= 0) return changetype(""); - var out = allocateUnsafe(resultLength); - copyUnsafe(out, 0, this, intStart, resultLength); - return out; + var out = ALLOC(resultLength << 1); + memory.copy(out, changetype(this) + intStart, resultLength); + return REGISTER(out); } substring(start: i32, end: i32 = i32.MAX_VALUE): String { assert(this !== null); - var len = this.length; - var finalStart = min(max(start, 0), len); - var finalEnd = min(max(end, 0), len); - var from = min(finalStart, finalEnd); - var to = max(finalStart, finalEnd); - len = to - from; + var len: isize = this.length; + var finalStart = min(max(start, 0), len); + var finalEnd = min(max(end, 0), len); + var fromPos = min(finalStart, finalEnd) << 1; + var toPos = max(finalStart, finalEnd) << 1; + len = toPos - fromPos; if (!len) return changetype(""); - if (!from && to == this.length) return this; - var out = allocateUnsafe(len); - copyUnsafe(out, 0, this, from, len); - return out; + if (!fromPos && toPos == this.length) return this; + var out = ALLOC(len); + memory.copy(out, changetype(this) + fromPos, len); + return REGISTER(out); } trim(): String { assert(this !== null); - var length: usize = this.length; - + var length = this.length; + var size: usize = length << 1; while ( - length && + size && isWhiteSpaceOrLineTerminator( - load(changetype(this) + (length << 1), HEADER_SIZE) + load(changetype(this) + size) ) ) { - --length; + size -= 2; } - var start: usize = 0; + var offset: usize = 0; while ( - start < length && + offset < size && isWhiteSpaceOrLineTerminator( - load(changetype(this) + (start << 1), HEADER_SIZE) + load(changetype(this) + offset) ) ) { - ++start, --length; + offset += 2; size -= 2; } - if (!length) return changetype(""); - if (!start && length == this.length) return this; - var out = allocateUnsafe(length); - copyUnsafe(out, 0, this, start, length); - return out; + if (!size) return changetype(""); + if (!start && size == length << 1) return this; + var out = ALLOC(size); + memory.copy(out, changetype(this) + offset, size); + return REGISTER(out); } @inline @@ -300,40 +325,41 @@ export class String { trimStart(): String { assert(this !== null); - var start: isize = 0; - var len: isize = this.length; + var size = this.length << 1; + var offset: usize = 0; while ( - start < len && + offset < size && isWhiteSpaceOrLineTerminator( - load(changetype(this) + (start << 1), HEADER_SIZE) + load(changetype(this) + offset) ) ) { - ++start; + offset += 2; } - if (!start) return this; - var outLen = len - start; - if (!outLen) return changetype(""); - var out = allocateUnsafe(outLen); - copyUnsafe(out, 0, this, start, outLen); - return out; + if (!offset) return this; + size -= offset; + if (!size) return changetype(""); + var out = ALLOC(size); + memory.copy(out, changetype(this) + offset, size); + return REGISTER(out); } trimEnd(): String { assert(this !== null); - var len: isize = this.length; + var originalSize = this.length << 1; + var size = originalSize; while ( - len > 0 && + size && isWhiteSpaceOrLineTerminator( - load(changetype(this) + (len << 1), HEADER_SIZE) + load(changetype(this) + size) ) ) { - --len; + size -= 2; } - if (len <= 0) return changetype(""); - if (len == this.length) return this; - var out = allocateUnsafe(len); - copyUnsafe(out, 0, this, 0, len); - return out; + if (!size) return changetype(""); + if (size == originalSize) return this; + var out = ALLOC(size); + memory.copy(out, changetype(this), size); + return REGISTER(out); } padStart(targetLength: i32, padString: String = changetype(" ")): String { @@ -342,18 +368,22 @@ export class String { var padLen = padString.length; if (targetLength < length || !padLen) return this; var len = targetLength - length; - var out = allocateUnsafe(targetLength); + var out = ALLOC(targetLength << 1); if (len > padLen) { let count = (len - 1) / padLen; let base = count * padLen; let rest = len - base; - repeatUnsafe(out, 0, padString, count); - if (rest) copyUnsafe(out, base, padString, 0, rest); + repeatImpl(out, 0, padString, count); + if (rest) { + memory.copy(out + (base << 1), changetype(padString), rest << 1); + } } else { - copyUnsafe(out, 0, padString, 0, len); + memory.copy(out, changetype(padString), len << 1); } - if (length) copyUnsafe(out, len, this, 0, length); - return out; + if (length) { + memory.copy(out + (len << 1), changetype(this), length << 1); + } + return REGISTER(out); } padEnd(targetLength: i32, padString: String = changetype(" ")): String { @@ -362,18 +392,22 @@ export class String { var padLen = padString.length; if (targetLength < length || !padLen) return this; var len = targetLength - length; - var out = allocateUnsafe(targetLength); - if (length) copyUnsafe(out, 0, this, 0, length); + var out = ALLOC(targetLength); + if (length) { + memory.copy(out, changetype(this), length << 1); + } if (len > padLen) { let count = (len - 1) / padLen; let base = count * padLen; let rest = len - base; - repeatUnsafe(out, length, padString, count); - if (rest) copyUnsafe(out, base + length, padString, 0, rest); + repeatImpl(out, length, padString, count); + if (rest) { + memory.copy(out + ((base + length) << 1), changetype(padString), rest << 1); + } } else { - copyUnsafe(out, length, padString, 0, len); + memory.copy(out + (length << 1), changetype(padString), len << 1); } - return out; + return REGISTER(out); } repeat(count: i32 = 0): String { @@ -387,10 +421,9 @@ export class String { if (count == 0 || !length) return changetype(""); if (count == 1) return this; - - var result = allocateUnsafe(length * count); - repeatUnsafe(result, 0, this, count); - return result; + var out = ALLOC(length * count); + repeatImpl(out, 0, this, count); + return REGISTER(out); } slice(beginIndex: i32, endIndex: i32 = i32.MAX_VALUE): String { @@ -399,12 +432,12 @@ export class String { var end = endIndex < 0 ? max(endIndex + len, 0) : min(endIndex, len); len = end - begin; if (len <= 0) return changetype(""); - var out = allocateUnsafe(len); - copyUnsafe(out, 0, this, begin, len); - return out; + var out = ALLOC(len); + memory.copy(out, changetype(this) + (begin << 1), len << 1); + return REGISTER(out); } - split(separator: String = null, limit: i32 = i32.MAX_VALUE): String[] { + split(separator: String | null = null, limit: i32 = i32.MAX_VALUE): String[] { assert(this !== null); if (!limit) return new Array(); if (separator === null) return [this]; @@ -418,16 +451,14 @@ export class String { let result = new Array(length); let buffer = result.buffer_; for (let i: isize = 0; i < length; ++i) { - let char = allocateUnsafe(1); + let char = ALLOC(2); store( changetype(char), load( - changetype(this) + (i << 1), - HEADER_SIZE - ), - HEADER_SIZE + changetype(this) + (i << 1) + ) ); - STORE(buffer, i, char); + STORE(buffer, i, char); // FIXME: use store once AB is done as well } return result; } else if (!length) { @@ -440,9 +471,9 @@ export class String { while ((end = this.indexOf(separator, start)) != -1) { let len = end - start; if (len > 0) { - let out = allocateUnsafe(len); - copyUnsafe(out, 0, this, start, len); - result.push(out); + let out = ALLOC(len << 1); + memory.copy(out, changetype(this) + (start << 1), len << 1); + result.push(REGISTER(out)); } else { result.push(changetype("")); } @@ -456,9 +487,9 @@ export class String { } var len = length - start; if (len > 0) { - let out = allocateUnsafe(len); - copyUnsafe(out, 0, this, start, len); - result.push(out); + let out = ALLOC(len << 1); + memory.copy(out, changetype(this) + (start << 1), len << 1); + result.push(REGISTER(out)); } else { result.push(changetype("")); } @@ -474,7 +505,7 @@ export class String { var pos: usize = 0; var end = this.length; while (pos < end) { - let c = load(changetype(this) + (pos << 1), HEADER_SIZE); + let c = load(changetype(this) + (pos << 1)); if (c < 128) { len += 1; ++pos; } else if (c < 2048) { @@ -482,7 +513,7 @@ export class String { } else { if ( (c & 0xFC00) == 0xD800 && pos + 1 < end && - (load(changetype(this) + ((pos + 1) << 1), HEADER_SIZE) & 0xFC00) == 0xDC00 + (load(changetype(this) + ((pos + 1) << 1)) & 0xFC00) == 0xDC00 ) { len += 4; pos += 2; } else { @@ -530,10 +561,10 @@ export class String { } } assert(ptrPos == len); - var str = allocateUnsafe((bufPos >> 1)); - memory.copy(changetype(str) + HEADER_SIZE, buf, bufPos); + var out = ALLOC((bufPos >> 1)); + memory.copy(changetype(out), buf, bufPos); memory.free(buf); - return str; + return REGISTER(out); } toUTF8(): usize { @@ -542,7 +573,7 @@ export class String { var end = this.length; var off: usize = 0; while (pos < end) { - let c1 = load(changetype(this) + (pos << 1), HEADER_SIZE); + let c1 = load(changetype(this) + (pos << 1)); if (c1 < 128) { store(buf + off, c1); ++off; ++pos; @@ -554,7 +585,7 @@ export class String { } else { let ptr = buf + off; if ((c1 & 0xFC00) == 0xD800 && pos + 1 < end) { - let c2 = load(changetype(this) + ((pos + 1) << 1), HEADER_SIZE); + let c2 = load(changetype(this) + ((pos + 1) << 1)); if ((c2 & 0xFC00) == 0xDC00) { c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); store(ptr, c1 >> 18 | 240); @@ -596,17 +627,17 @@ export function parseFloat(str: String): f64 { if (!len) return NaN; var ptr = changetype(str) /* + HEAD -> offset */; - var code = load(ptr, HEADER_SIZE); + var code = load(ptr); // determine sign var sign: f64; if (code == CharCode.MINUS) { if (!--len) return NaN; - code = load(ptr += 2, HEADER_SIZE); + code = load(ptr += 2); sign = -1; } else if (code == CharCode.PLUS) { if (!--len) return NaN; - code = load(ptr += 2, HEADER_SIZE); + code = load(ptr += 2); sign = 1; } else { sign = 1; @@ -615,12 +646,12 @@ export function parseFloat(str: String): f64 { // calculate value var num: f64 = 0; while (len--) { - code = load(ptr, HEADER_SIZE); + code = load(ptr); if (code == CharCode.DOT) { ptr += 2; let fac: f64 = 0.1; // precision :( while (len--) { - code = load(ptr, HEADER_SIZE); + code = load(ptr); if (code == CharCode.E || code == CharCode.e) { assert(false); // TODO } diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 4444ad5519..aa243d2204 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -21,7 +21,6 @@ (elem (i32.const 0) $null) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $std/runtime/register_ref (mut i32) (i32.const 0)) - (global $std/runtime/register_parentRef (mut i32) (i32.const 0)) (global $std/runtime/barrier1 (mut i32) (i32.const 0)) (global $std/runtime/barrier2 (mut i32) (i32.const 0)) (global $std/runtime/barrier3 (mut i32) (i32.const 0)) @@ -2708,7 +2707,7 @@ else i32.const 0 i32.const 56 - i32.const 34 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -2819,7 +2818,7 @@ if i32.const 0 i32.const 56 - i32.const 49 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -2831,7 +2830,7 @@ if i32.const 0 i32.const 56 - i32.const 50 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -2845,7 +2844,7 @@ if i32.const 0 i32.const 56 - i32.const 51 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -2857,7 +2856,7 @@ if i32.const 0 i32.const 56 - i32.const 52 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -2872,7 +2871,7 @@ if i32.const 0 i32.const 56 - i32.const 54 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -2888,7 +2887,7 @@ if i32.const 0 i32.const 56 - i32.const 56 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -2905,7 +2904,7 @@ if i32.const 0 i32.const 56 - i32.const 59 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -2913,8 +2912,6 @@ global.get $std/runtime/barrier1 call $~lib/runtime/index/ALLOC global.set $std/runtime/ref4 - global.get $std/runtime/ref3 - local.set $1 global.get $std/runtime/ref4 local.tee $0 call $~lib/runtime/index/ensureUnregistered @@ -2922,26 +2919,13 @@ i32.store local.get $0 global.set $std/runtime/register_ref - local.get $1 - global.set $std/runtime/register_parentRef global.get $std/runtime/register_ref global.get $std/runtime/ref4 i32.ne if i32.const 0 i32.const 56 - i32.const 63 - i32.const 0 - call $~lib/env/abort - unreachable - end - global.get $std/runtime/register_parentRef - global.get $std/runtime/ref3 - i32.ne - if - i32.const 0 - i32.const 56 - i32.const 64 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -2957,7 +2941,7 @@ if i32.const 0 i32.const 56 - i32.const 66 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -2969,7 +2953,7 @@ if i32.const 0 i32.const 56 - i32.const 67 + i32.const 64 i32.const 0 call $~lib/env/abort unreachable @@ -2986,7 +2970,7 @@ if i32.const 0 i32.const 56 - i32.const 70 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -3002,7 +2986,7 @@ if i32.const 0 i32.const 56 - i32.const 71 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.ts b/tests/compiler/std/runtime.ts index 08a82443d4..3b952392b9 100644 --- a/tests/compiler/std/runtime.ts +++ b/tests/compiler/std/runtime.ts @@ -1,11 +1,9 @@ import "allocator/tlsf"; var register_ref: usize = 0; -var register_parentRef: usize = 0; -@global function __REGISTER_IMPL(ref: usize, parentRef: usize): void { +@global function __REGISTER_IMPL(ref: usize): void { register_ref = ref; - register_parentRef = parentRef; } import { @@ -59,9 +57,8 @@ var ref3 = ALLOC(barrier2); assert(ref1 == ref3); // reuses space of ref1 (free'd in realloc), ref2 (explicitly free'd) var ref4 = ALLOC(barrier1); -REGISTER(ref4, ref3); // sets up ref4 and then calls __REGISTER_IMPL +REGISTER(ref4); // should call __REGISTER_IMPL assert(register_ref == ref4); -assert(register_parentRef == ref3); var header4 = changetype
(register_ref - HEADER_SIZE); assert(header4.classId == __rt_classid()); assert(header4.payloadSize == barrier1); diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 2725add6a6..c4fd9d9ed0 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -37,7 +37,6 @@ (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $std/runtime/register_ref (mut i32) (i32.const 0)) - (global $std/runtime/register_parentRef (mut i32) (i32.const 0)) (global $std/runtime/barrier1 (mut i32) (i32.const 0)) (global $std/runtime/barrier2 (mut i32) (i32.const 0)) (global $std/runtime/barrier3 (mut i32) (i32.const 0)) @@ -3393,11 +3392,9 @@ br $~lib/memory/memory.free|inlined.1 end ) - (func $std/runtime/__REGISTER_IMPL (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/runtime/__REGISTER_IMPL (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $std/runtime/register_ref - local.get $1 - global.set $std/runtime/register_parentRef ) (func $~lib/runtime/index/ArrayBufferBase#get:byteLength (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -3415,7 +3412,6 @@ ) (func $start:std/runtime (; 34 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) call $start:~lib/allocator/tlsf i32.const 43 i32.const 44 @@ -3424,7 +3420,7 @@ if i32.const 0 i32.const 56 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -3437,7 +3433,7 @@ if i32.const 0 i32.const 56 - i32.const 32 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -3458,7 +3454,7 @@ if i32.const 0 i32.const 56 - i32.const 34 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -3561,7 +3557,7 @@ if i32.const 0 i32.const 56 - i32.const 49 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -3574,7 +3570,7 @@ if i32.const 0 i32.const 56 - i32.const 50 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -3588,7 +3584,7 @@ if i32.const 0 i32.const 56 - i32.const 51 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -3601,7 +3597,7 @@ if i32.const 0 i32.const 56 - i32.const 52 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -3617,7 +3613,7 @@ if i32.const 0 i32.const 56 - i32.const 54 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -3634,7 +3630,7 @@ if i32.const 0 i32.const 56 - i32.const 56 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -3651,7 +3647,7 @@ if i32.const 0 i32.const 56 - i32.const 59 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -3662,14 +3658,11 @@ block $~lib/runtime/index/REGISTER|inlined.0 global.get $std/runtime/ref4 local.set $0 - global.get $std/runtime/ref3 - local.set $1 local.get $0 call $~lib/runtime/index/ensureUnregistered i32.const 43 i32.store local.get $0 - local.get $1 call $std/runtime/__REGISTER_IMPL end global.get $std/runtime/register_ref @@ -3679,19 +3672,7 @@ if i32.const 0 i32.const 56 - i32.const 63 - i32.const 0 - call $~lib/env/abort - unreachable - end - global.get $std/runtime/register_parentRef - global.get $std/runtime/ref3 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 64 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -3708,7 +3689,7 @@ if i32.const 0 i32.const 56 - i32.const 66 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -3721,7 +3702,7 @@ if i32.const 0 i32.const 56 - i32.const 67 + i32.const 64 i32.const 0 call $~lib/env/abort unreachable @@ -3737,7 +3718,7 @@ if i32.const 0 i32.const 56 - i32.const 70 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -3750,7 +3731,7 @@ if i32.const 0 i32.const 56 - i32.const 71 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable From cb77760562f59e1a4ed72f2b99f5bf09b476323a Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 10 Mar 2019 21:38:15 +0100 Subject: [PATCH 012/119] unsafe, stub --- src/ast.ts | 6 +- src/builtins.ts | 41 ++- src/compiler.ts | 42 +-- src/program.ts | 85 +++-- std/assembly/allocator/arena.ts | 38 +- std/assembly/allocator/buddy.ts | 344 ++++++++--------- std/assembly/allocator/emscripten.ts | 14 +- std/assembly/allocator/system.ts | 12 +- std/assembly/allocator/tlsf.ts | 105 +++--- std/assembly/builtins.ts | 4 +- std/assembly/gc.ts | 10 - std/assembly/index.d.ts | 4 + std/assembly/memory.ts | 55 --- std/assembly/{runtime/index.ts => runtime.ts} | 105 ++++-- std/assembly/runtime/itcm.ts | 8 - std/assembly/string.ts | 73 +--- tests/compiler/std/runtime.optimized.wat | 248 +++++++------ tests/compiler/std/runtime.ts | 24 +- tests/compiler/std/runtime.untouched.wat | 345 +++++++++--------- 19 files changed, 784 insertions(+), 779 deletions(-) delete mode 100644 std/assembly/gc.ts delete mode 100644 std/assembly/memory.ts rename std/assembly/{runtime/index.ts => runtime.ts} (50%) delete mode 100644 std/assembly/runtime/itcm.ts diff --git a/src/ast.ts b/src/ast.ts index b0fdd9db55..52bbbb719c 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -1162,7 +1162,9 @@ export enum DecoratorKind { EXTERNAL, BUILTIN, LAZY, - START + START, + UNSAFE, + STUB } /** Returns the kind of the specified decorator. Defaults to {@link DecoratorKind.CUSTOM}. */ @@ -1199,10 +1201,12 @@ export function decoratorNameToKind(name: Expression): DecoratorKind { case CharCode.s: { if (nameStr == "sealed") return DecoratorKind.SEALED; if (nameStr == "start") return DecoratorKind.START; + if (nameStr == "stub") return DecoratorKind.STUB; break; } case CharCode.u: { if (nameStr == "unmanaged") return DecoratorKind.UNMANAGED; + if (nameStr == "unsafe") return DecoratorKind.UNSAFE; break; } } diff --git a/src/builtins.ts b/src/builtins.ts index a0fbbbd115..9944c5c84b 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -96,6 +96,7 @@ export namespace BuiltinSymbols { export const isFunction = "~lib/builtins/isFunction"; export const isNullable = "~lib/builtins/isNullable"; export const isDefined = "~lib/builtins/isDefined"; + export const isImplemented = "~lib/builtins/isImplemented"; export const isConstant = "~lib/builtins/isConstant"; export const isManaged = "~lib/builtins/isManaged"; @@ -466,17 +467,15 @@ export namespace BuiltinSymbols { export const ERROR = "~lib/diagnostics/ERROR"; export const WARNING = "~lib/diagnostics/WARNING"; export const INFO = "~lib/diagnostics/INFO"; - // std/memory.ts - export const HEAP_BASE = "~lib/memory/HEAP_BASE"; - export const memory_size = "~lib/memory/memory.size"; - export const memory_grow = "~lib/memory/memory.grow"; - export const memory_copy = "~lib/memory/memory.copy"; - export const memory_fill = "~lib/memory/memory.fill"; - // std/gc.ts - export const iterateRoots = "~lib/gc/iterateRoots"; - // internals - export const rt_classid = "~lib/builtins/__rt_classid"; - export const rt_iterateroots = "~lib/builtins/__rt_iterateroots"; + + // std/runtime.ts + export const HEAP_BASE = "~lib/runtime/HEAP_BASE"; + export const memory_size = "~lib/runtime/memory.size"; + export const memory_grow = "~lib/runtime/memory.grow"; + export const memory_copy = "~lib/runtime/memory.copy"; + export const memory_fill = "~lib/runtime/memory.fill"; + export const gc_classId = "~lib/runtime/gc.classId"; + export const gc_iterateRoots = "~lib/runtime/gc.iterateRoots"; } /** Compiles a call to a built-in function. */ @@ -605,6 +604,20 @@ export function compileCall( ); return module.createI32(element ? 1 : 0); } + case BuiltinSymbols.isImplemented: { // isImplemented(expression) -> bool + compiler.currentType = Type.bool; + if ( + checkTypeAbsent(typeArguments, reportNode, prototype) | + checkArgsRequired(operands, 1, reportNode, compiler) + ) return module.createUnreachable(); + let element = compiler.resolver.resolveExpression( + operands[0], + compiler.currentFlow, + Type.void, + ReportMode.SWALLOW + ); + return module.createI32(element && !element.hasDecorator(DecoratorFlags.STUB) ? 1 : 0); + } case BuiltinSymbols.isConstant: { // isConstant(expression) -> bool compiler.currentType = Type.bool; if ( @@ -3596,15 +3609,15 @@ export function compileCall( // === Internal runtime ======================================================================= - case BuiltinSymbols.rt_classid: { + case BuiltinSymbols.gc_classId: { let type = evaluateConstantType(compiler, typeArguments, operands, reportNode); compiler.currentType = Type.u32; if (!type) return module.createUnreachable(); let classReference = type.classReference; if (!classReference) return module.createUnreachable(); - return module.createI32(classReference.prototype.classId); + return module.createI32(classReference.id); } - case BuiltinSymbols.rt_iterateroots: { + case BuiltinSymbols.gc_iterateRoots: { if ( checkTypeAbsent(typeArguments, reportNode, prototype) | checkArgsRequired(operands, 1, reportNode, compiler) diff --git a/src/compiler.ts b/src/compiler.ts index 59b12553ab..5b9dfb21f0 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -6364,51 +6364,29 @@ export class Compiler extends DiagnosticEmitter { /** Ensures that the specified string exists in static memory and returns a pointer to it. */ ensureStaticString(stringValue: string): ExpressionRef { var program = this.program; - var hasGC = program.hasGC; - var gcHeaderSize = program.gcHeaderSize; - + var rtHeaderSize = program.runtimeHeaderSize; var stringInstance = assert(program.stringInstance); var stringSegment: MemorySegment; - - // if the string already exists, reuse it var segments = this.stringSegments; if (segments.has(stringValue)) { - stringSegment = segments.get(stringValue); - - // otherwise create it + stringSegment = segments.get(stringValue)!; // reuse } else { let length = stringValue.length; - let headerSize = (stringInstance.currentMemoryOffset + 1) & ~1; - let totalSize = headerSize + length * 2; - - let buf: Uint8Array; - let pos: u32; - - if (hasGC) { - buf = new Uint8Array(gcHeaderSize + totalSize); - pos = gcHeaderSize; - writeI32(ensureGCHook(this, stringInstance), buf, program.gcHookOffset); - } else { - buf = new Uint8Array(totalSize); - pos = 0; - } - writeI32(length, buf, pos + stringInstance.offsetof(LibrarySymbols.length)); - pos += headerSize; + let buffer = new Uint8Array(rtHeaderSize + (length << 1)); + program.writeRuntimeHeader(buffer, 0, stringInstance, length << 1); for (let i = 0; i < length; ++i) { - writeI16(stringValue.charCodeAt(i), buf, pos + (i << 1)); + writeI16(stringValue.charCodeAt(i), buffer, rtHeaderSize + (i << 1)); } - stringSegment = this.addMemorySegment(buf); + stringSegment = this.addMemorySegment(buffer); segments.set(stringValue, stringSegment); } - var stringOffset = stringSegment.offset; - if (hasGC) stringOffset = i64_add(stringOffset, i64_new(gcHeaderSize)); - + var ref = i64_add(stringSegment.offset, i64_new(rtHeaderSize)); this.currentType = stringInstance.type; if (this.options.isWasm64) { - return this.module.createI64(i64_low(stringOffset), i64_high(stringOffset)); + return this.module.createI64(i64_low(ref), i64_high(ref)); } else { - assert(i64_is_u32(stringOffset)); - return this.module.createI32(i64_low(stringOffset)); + assert(i64_is_u32(ref)); + return this.module.createI32(i64_low(ref)); } } diff --git a/src/program.ts b/src/program.ts index a66f5c7a13..8da3db04b5 100644 --- a/src/program.ts +++ b/src/program.ts @@ -84,7 +84,7 @@ import { } from "./module"; import { - CharCode + CharCode, writeI32 } from "./util"; import { @@ -376,6 +376,17 @@ export class Program extends DiagnosticEmitter { this.resolver = new Resolver(this); } + /** Gets the size of a common runtime header. */ + get runtimeHeaderSize(): i32 { + return this.hasGC ? 16 : 8; + } + + /** Writes a common runtime header to the specified buffer. */ + writeRuntimeHeader(buffer: Uint8Array, offset: i32, classInstance: Class, payloadSize: u32): void { + writeI32(classInstance.id, buffer, offset); + writeI32(payloadSize, buffer, offset + 4); + } + /** Creates a native variable declaration. */ makeNativeVariableDeclaration( /** The simple name of the variable */ @@ -911,7 +922,7 @@ export class Program extends DiagnosticEmitter { } /** Ensures that the given global element exists. Attempts to merge duplicates. */ - ensureGlobal(name: string, element: DeclaredElement): void { + ensureGlobal(name: string, element: DeclaredElement): DeclaredElement { var elementsByName = this.elementsByName; if (elementsByName.has(name)) { let actual = elementsByName.get(name); @@ -927,12 +938,13 @@ export class Program extends DiagnosticEmitter { DiagnosticCode.Duplicate_identifier_0, element.identifierNode.range, name ); - return; + return element; } element = merged; } } elementsByName.set(name, element); + return element; } /** Looks up the element of the specified name in the global scope. */ @@ -1532,7 +1544,7 @@ export class Program extends DiagnosticEmitter { parent: Element ): void { var name = declaration.name.text; - var validDecorators = DecoratorFlags.NONE; + var validDecorators = DecoratorFlags.UNSAFE | DecoratorFlags.STUB; if (declaration.is(CommonFlags.AMBIENT)) { validDecorators |= DecoratorFlags.EXTERNAL; } else { @@ -1615,44 +1627,50 @@ export class Program extends DiagnosticEmitter { queuedImplements: ClassPrototype[] ): void { var name = declaration.name.text; - var element = new Namespace(name, parent, declaration); - if (!parent.add(name, element)) return; - element = assert(parent.lookupInSelf(name)); // possibly merged + var original = new Namespace( + name, + parent, + declaration, + this.checkDecorators(declaration.decorators, DecoratorFlags.GLOBAL) + ); + if (!parent.add(name, original)) return; + var element = assert(parent.lookupInSelf(name)); // possibly merged var members = declaration.members; for (let i = 0, k = members.length; i < k; ++i) { let member = members[i]; switch (member.kind) { case NodeKind.CLASSDECLARATION: { - this.initializeClass(member, element, queuedExtends, queuedImplements); + this.initializeClass(member, original, queuedExtends, queuedImplements); break; } case NodeKind.ENUMDECLARATION: { - this.initializeEnum(member, element); + this.initializeEnum(member, original); break; } case NodeKind.FUNCTIONDECLARATION: { - this.initializeFunction(member, element); + this.initializeFunction(member, original); break; } case NodeKind.INTERFACEDECLARATION: { - this.initializeInterface(member, element); + this.initializeInterface(member, original); break; } case NodeKind.NAMESPACEDECLARATION: { - this.initializeNamespace(member, element, queuedExtends, queuedImplements); + this.initializeNamespace(member, original, queuedExtends, queuedImplements); break; } case NodeKind.TYPEDECLARATION: { - this.initializeTypeDefinition(member, element); + this.initializeTypeDefinition(member, original); break; } case NodeKind.VARIABLE: { - this.initializeVariables(member, element); + this.initializeVariables(member, original); break; } default: assert(false); // namespace member expected } } + if (original != element) copyMembers(original, element); // retain original parent } /** Initializes a `type` definition. */ @@ -1766,7 +1784,11 @@ export enum DecoratorFlags { /** Is compiled lazily. */ LAZY = 1 << 9, /** Is the explicit start function. */ - START = 1 << 10 + START = 1 << 10, + /** Is considered unsafe code. */ + UNSAFE = 1 << 11, + /** Is a stub that can be overridden. */ + STUB = 1 << 12 } /** Translates a decorator kind to the respective decorator flag. */ @@ -1784,6 +1806,8 @@ export function decoratorKindToFlag(kind: DecoratorKind): DecoratorFlags { case DecoratorKind.BUILTIN: return DecoratorFlags.BUILTIN; case DecoratorKind.LAZY: return DecoratorFlags.LAZY; case DecoratorKind.START: return DecoratorFlags.START; + case DecoratorKind.UNSAFE: return DecoratorFlags.UNSAFE; + case DecoratorKind.STUB: return DecoratorFlags.STUB; default: return DecoratorFlags.NONE; } } @@ -1859,8 +1883,8 @@ export abstract class Element { if (!members) this.members = members = new Map(); else if (members.has(name)) { let actual = members.get(name)!; - if (actual.parent !== this) { - // override non-own element + if (actual.parent !== this || actual.hasDecorator(DecoratorFlags.STUB)) { + // override non-own or stub element } else { let merged = tryMerge(actual, element); if (merged) { @@ -1987,15 +2011,17 @@ export class File extends Element { /* @override */ add(name: string, element: DeclaredElement, isImport: bool = false): bool { + if (element.hasDecorator(DecoratorFlags.GLOBAL)) { + element = this.program.ensureGlobal(name, element); // possibly merged globally + } if (!super.add(name, element)) return false; - element = assert(this.lookupInSelf(name)); // possibly merged + element = assert(this.lookupInSelf(name)); // possibly merged locally if (element.is(CommonFlags.EXPORT) && !isImport) { this.ensureExport( element.name, element ); } - if (element.hasDecorator(DecoratorFlags.GLOBAL)) this.program.ensureGlobal(name, element); return true; } @@ -2117,7 +2143,9 @@ export class Namespace extends DeclaredElement { /** Parent element, usually a file or another namespace. */ parent: Element, /** Declaration reference. */ - declaration: NamespaceDeclaration + declaration: NamespaceDeclaration, + /** Pre-checked flags indicating built-in decorators. */ + decoratorFlags: DecoratorFlags = DecoratorFlags.NONE ) { super( ElementKind.NAMESPACE, @@ -2127,6 +2155,7 @@ export class Namespace extends DeclaredElement { parent, declaration ); + this.decoratorFlags = decoratorFlags; } /* @override */ @@ -2795,8 +2824,6 @@ export class ClassPrototype extends DeclaredElement { overloadPrototypes: Map = new Map(); /** Already resolved instances. */ instances: Map | null = null; - /** Unique class id. */ - classId: u32 = 0; constructor( /** Simple name. */ @@ -2818,8 +2845,6 @@ export class ClassPrototype extends DeclaredElement { declaration ); this.decoratorFlags = decoratorFlags; - this.classId = u32(this.program.nextClassId++); - assert(this.classId); // must not wrap around to 0 } /** Gets the associated type parameter nodes. */ @@ -2908,6 +2933,14 @@ export class Class extends TypedElement { overloads: Map | null = null; /** Function index of the GC hook. */ gcHookIndex: u32 = -1; + /** Unique class id. */ + private _id: u32 = 0; + /** Gets the unique id of this class. */ + get id(): u32 { + var id = this._id; + if (!id) this._id = id = this.program.nextClassId++; + return id; + } /** Constructs a new class. */ constructor( @@ -3151,7 +3184,9 @@ function tryMerge(older: Element, newer: Element): DeclaredElement | null { } } if (merged) { - if (older.is(CommonFlags.EXPORT) != newer.is(CommonFlags.EXPORT)) { + let olderIsExport = older.is(CommonFlags.EXPORT) || older.hasDecorator(DecoratorFlags.GLOBAL); + let newerIsExport = newer.is(CommonFlags.EXPORT) || newer.hasDecorator(DecoratorFlags.GLOBAL); + if (olderIsExport != newerIsExport) { older.program.error( DiagnosticCode.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, merged.identifierNode.range, merged.identifierNode.text diff --git a/std/assembly/allocator/arena.ts b/std/assembly/allocator/arena.ts index 5d74b56c93..7a5b036471 100644 --- a/std/assembly/allocator/arena.ts +++ b/std/assembly/allocator/arena.ts @@ -12,28 +12,30 @@ import { AL_MASK, MAX_SIZE_32 } from "../internal/allocator"; var startOffset: usize = (HEAP_BASE + AL_MASK) & ~AL_MASK; var offset: usize = startOffset; -// Memory allocator interface +// Memory allocator implementation +@global namespace memory { -@global export function __memory_allocate(size: usize): usize { - if (size > MAX_SIZE_32) unreachable(); - var ptr = offset; - var newPtr = (ptr + max(size, 1) + AL_MASK) & ~AL_MASK; - var pagesBefore = memory.size(); - if (newPtr > pagesBefore << 16) { - let pagesNeeded = ((newPtr - ptr + 0xffff) & ~0xffff) >>> 16; - let pagesWanted = max(pagesBefore, pagesNeeded); // double memory - if (memory.grow(pagesWanted) < 0) { - if (memory.grow(pagesNeeded) < 0) { - unreachable(); // out of memory + export function allocate(size: usize): usize { + if (size > MAX_SIZE_32) unreachable(); + var ptr = offset; + var newPtr = (ptr + max(size, 1) + AL_MASK) & ~AL_MASK; + var pagesBefore = memory.size(); + if (newPtr > pagesBefore << 16) { + let pagesNeeded = ((newPtr - ptr + 0xffff) & ~0xffff) >>> 16; + let pagesWanted = max(pagesBefore, pagesNeeded); // double memory + if (memory.grow(pagesWanted) < 0) { + if (memory.grow(pagesNeeded) < 0) { + unreachable(); // out of memory + } } } + offset = newPtr; + return ptr; } - offset = newPtr; - return ptr; -} -@global export function __memory_free(ptr: usize): void { /* nop */ } + export function free(ptr: usize): void { /* nop */ } -@global export function __memory_reset(): void { - offset = startOffset; + export function reset(): void { + offset = startOffset; + } } diff --git a/std/assembly/allocator/buddy.ts b/std/assembly/allocator/buddy.ts index 2aea2240ba..cec54d040e 100644 --- a/std/assembly/allocator/buddy.ts +++ b/std/assembly/allocator/buddy.ts @@ -338,203 +338,205 @@ function lower_bucket_limit(bucket: usize): u32 { return 1; } -// Memory allocator interface - -@global export function __memory_allocate(request: usize): usize { - var original_bucket: usize, bucket: usize; - - /* - * Make sure it's possible for an allocation of this size to succeed. There's - * a hard-coded limit on the maximum allocation size because of the way this - * allocator works. - */ - if (request > MAX_ALLOC - HEADER_SIZE) unreachable(); - - /* - * Initialize our global state if this is the first call to "malloc". At the - * beginning, the tree has a single node that represents the smallest - * possible allocation size. More memory will be reserved later as needed. - */ - if (base_ptr == 0) { - // base_ptr = max_ptr = (uint8_t *)sbrk(0); - base_ptr = (NODE_IS_SPLIT_END + 7) & ~7; // must be aligned - max_ptr = memory.size() << 16; // must grow first - bucket_limit = BUCKET_COUNT - 1; - if (!update_max_ptr(base_ptr + List.SIZE)) { - return 0; - } - list_init(buckets$get(BUCKET_COUNT - 1)); - list_push(buckets$get(BUCKET_COUNT - 1), changetype(base_ptr)); - } +// Memory allocator implementation +@global namespace memory { - /* - * Find the smallest bucket that will fit this request. This doesn't check - * that there's space for the request yet. - */ - bucket = bucket_for_request(request + HEADER_SIZE); - original_bucket = bucket; - - /* - * Search for a bucket with a non-empty free list that's as large or larger - * than what we need. If there isn't an exact match, we'll need to split a - * larger one to get a match. - */ - while (bucket + 1 != 0) { - let size: usize, bytes_needed: usize, i: usize; - let ptr: usize; + export function allocate(request: usize): usize { + var original_bucket: usize, bucket: usize; /* - * We may need to grow the tree to be able to fit an allocation of this - * size. Try to grow the tree and stop here if we can't. - */ - if (!lower_bucket_limit(bucket)) { - return 0; + * Make sure it's possible for an allocation of this size to succeed. There's + * a hard-coded limit on the maximum allocation size because of the way this + * allocator works. + */ + if (request > MAX_ALLOC - HEADER_SIZE) unreachable(); + + /* + * Initialize our global state if this is the first call to "malloc". At the + * beginning, the tree has a single node that represents the smallest + * possible allocation size. More memory will be reserved later as needed. + */ + if (base_ptr == 0) { + // base_ptr = max_ptr = (uint8_t *)sbrk(0); + base_ptr = (NODE_IS_SPLIT_END + 7) & ~7; // must be aligned + max_ptr = memory.size() << 16; // must grow first + bucket_limit = BUCKET_COUNT - 1; + if (!update_max_ptr(base_ptr + List.SIZE)) { + return 0; + } + list_init(buckets$get(BUCKET_COUNT - 1)); + list_push(buckets$get(BUCKET_COUNT - 1), changetype(base_ptr)); } /* - * Try to pop a block off the free list for this bucket. If the free list - * is empty, we're going to have to split a larger block instead. - */ - ptr = changetype(list_pop(buckets$get(bucket))); - if (!ptr) { + * Find the smallest bucket that will fit this request. This doesn't check + * that there's space for the request yet. + */ + bucket = bucket_for_request(request + HEADER_SIZE); + original_bucket = bucket; + + /* + * Search for a bucket with a non-empty free list that's as large or larger + * than what we need. If there isn't an exact match, we'll need to split a + * larger one to get a match. + */ + while (bucket + 1 != 0) { + let size: usize, bytes_needed: usize, i: usize; + let ptr: usize; + + /* + * We may need to grow the tree to be able to fit an allocation of this + * size. Try to grow the tree and stop here if we can't. + */ + if (!lower_bucket_limit(bucket)) { + return 0; + } + /* - * If we're not at the root of the tree or it's impossible to grow the - * tree any more, continue on to the next bucket. - */ - if (bucket != bucket_limit || bucket == 0) { - bucket--; - continue; + * Try to pop a block off the free list for this bucket. If the free list + * is empty, we're going to have to split a larger block instead. + */ + ptr = changetype(list_pop(buckets$get(bucket))); + if (!ptr) { + /* + * If we're not at the root of the tree or it's impossible to grow the + * tree any more, continue on to the next bucket. + */ + if (bucket != bucket_limit || bucket == 0) { + bucket--; + continue; + } + + /* + * Otherwise, grow the tree one more level and then pop a block off the + * free list again. Since we know the root of the tree is used (because + * the free list was empty), this will add a parent above this node in + * the SPLIT state and then add the new right child node to the free list + * for this bucket. Popping the free list will give us this right child. + */ + if (!lower_bucket_limit(bucket - 1)) { + return 0; + } + ptr = changetype(list_pop(buckets$get(bucket))); } /* - * Otherwise, grow the tree one more level and then pop a block off the - * free list again. Since we know the root of the tree is used (because - * the free list was empty), this will add a parent above this node in - * the SPLIT state and then add the new right child node to the free list - * for this bucket. Popping the free list will give us this right child. - */ - if (!lower_bucket_limit(bucket - 1)) { + * Try to expand the address space first before going any further. If we + * have run out of space, put this block back on the free list and fail. + */ + size = 1 << (MAX_ALLOC_LOG2 - bucket); + bytes_needed = bucket < original_bucket ? size / 2 + List.SIZE : size; + if (!update_max_ptr(ptr + bytes_needed)) { + list_push(buckets$get(bucket), changetype(ptr)); return 0; } - ptr = changetype(list_pop(buckets$get(bucket))); - } - /* - * Try to expand the address space first before going any further. If we - * have run out of space, put this block back on the free list and fail. - */ - size = 1 << (MAX_ALLOC_LOG2 - bucket); - bytes_needed = bucket < original_bucket ? size / 2 + List.SIZE : size; - if (!update_max_ptr(ptr + bytes_needed)) { - list_push(buckets$get(bucket), changetype(ptr)); - return 0; - } + /* + * If we got a node off the free list, change the node from UNUSED to USED. + * This involves flipping our parent's "is split" bit because that bit is + * the exclusive-or of the UNUSED flags of both children, and our UNUSED + * flag (which isn't ever stored explicitly) has just changed. + * + * Note that we shouldn't ever need to flip the "is split" bit of our + * grandparent because we know our buddy is USED so it's impossible for our + * grandparent to be UNUSED (if our buddy chunk was UNUSED, our parent + * wouldn't ever have been split in the first place). + */ + i = node_for_ptr(ptr, bucket); + if (i != 0) { + flip_parent_is_split(i); + } - /* - * If we got a node off the free list, change the node from UNUSED to USED. - * This involves flipping our parent's "is split" bit because that bit is - * the exclusive-or of the UNUSED flags of both children, and our UNUSED - * flag (which isn't ever stored explicitly) has just changed. - * - * Note that we shouldn't ever need to flip the "is split" bit of our - * grandparent because we know our buddy is USED so it's impossible for our - * grandparent to be UNUSED (if our buddy chunk was UNUSED, our parent - * wouldn't ever have been split in the first place). - */ - i = node_for_ptr(ptr, bucket); - if (i != 0) { - flip_parent_is_split(i); - } + /* + * If the node we got is larger than we need, split it down to the correct + * size and put the new unused child nodes on the free list in the + * corresponding bucket. This is done by repeatedly moving to the left + * child, splitting the parent, and then adding the right child to the free + * list. + */ + while (bucket < original_bucket) { + i = i * 2 + 1; + bucket++; + flip_parent_is_split(i); + list_push( + buckets$get(bucket), + changetype(ptr_for_node(i + 1, bucket)) + ); + } - /* - * If the node we got is larger than we need, split it down to the correct - * size and put the new unused child nodes on the free list in the - * corresponding bucket. This is done by repeatedly moving to the left - * child, splitting the parent, and then adding the right child to the free - * list. - */ - while (bucket < original_bucket) { - i = i * 2 + 1; - bucket++; - flip_parent_is_split(i); - list_push( - buckets$get(bucket), - changetype(ptr_for_node(i + 1, bucket)) - ); + /* + * Now that we have a memory address, write the block header (just the size + * of the allocation) and return the address immediately after the header. + */ + store(ptr, request); + return ptr + HEADER_SIZE; } - /* - * Now that we have a memory address, write the block header (just the size - * of the allocation) and return the address immediately after the header. - */ - store(ptr, request); - return ptr + HEADER_SIZE; + return 0; } - return 0; -} - -@global export function __memory_free(ptr: usize): void { - var bucket: usize, i: usize; + export function free(ptr: usize): void { + var bucket: usize, i: usize; - /* - * Ignore any attempts to free a NULL pointer. - */ - if (!ptr) { - return; - } + /* + * Ignore any attempts to free a NULL pointer. + */ + if (!ptr) { + return; + } - /* - * We were given the address returned by "malloc" so get back to the actual - * address of the node by subtracting off the size of the block header. Then - * look up the index of the node corresponding to this address. - */ - ptr = ptr - HEADER_SIZE; - bucket = bucket_for_request(load(ptr) + HEADER_SIZE); - i = node_for_ptr(ptr, bucket); - - /* - * Traverse up to the root node, flipping USED blocks to UNUSED and merging - * UNUSED buddies together into a single UNUSED parent. - */ - while (i != 0) { /* - * Change this node from UNUSED to USED. This involves flipping our - * parent's "is split" bit because that bit is the exclusive-or of the - * UNUSED flags of both children, and our UNUSED flag (which isn't ever - * stored explicitly) has just changed. - */ - flip_parent_is_split(i); + * We were given the address returned by "malloc" so get back to the actual + * address of the node by subtracting off the size of the block header. Then + * look up the index of the node corresponding to this address. + */ + ptr = ptr - HEADER_SIZE; + bucket = bucket_for_request(load(ptr) + HEADER_SIZE); + i = node_for_ptr(ptr, bucket); /* - * If the parent is now SPLIT, that means our buddy is USED, so don't merge - * with it. Instead, stop the iteration here and add ourselves to the free - * list for our bucket. - * - * Also stop here if we're at the current root node, even if that root node - * is now UNUSED. Root nodes don't have a buddy so we can't merge with one. - */ - if (parent_is_split(i) || bucket == bucket_limit) { - break; + * Traverse up to the root node, flipping USED blocks to UNUSED and merging + * UNUSED buddies together into a single UNUSED parent. + */ + while (i != 0) { + /* + * Change this node from UNUSED to USED. This involves flipping our + * parent's "is split" bit because that bit is the exclusive-or of the + * UNUSED flags of both children, and our UNUSED flag (which isn't ever + * stored explicitly) has just changed. + */ + flip_parent_is_split(i); + + /* + * If the parent is now SPLIT, that means our buddy is USED, so don't merge + * with it. Instead, stop the iteration here and add ourselves to the free + * list for our bucket. + * + * Also stop here if we're at the current root node, even if that root node + * is now UNUSED. Root nodes don't have a buddy so we can't merge with one. + */ + if (parent_is_split(i) || bucket == bucket_limit) { + break; + } + + /* + * If we get here, we know our buddy is UNUSED. In this case we should + * merge with that buddy and continue traversing up to the root node. We + * need to remove the buddy from its free list here but we don't need to + * add the merged parent to its free list yet. That will be done once after + * this loop is finished. + */ + list_remove(changetype(ptr_for_node(((i - 1) ^ 1) + 1, bucket))); + i = (i - 1) / 2; + bucket--; } /* - * If we get here, we know our buddy is UNUSED. In this case we should - * merge with that buddy and continue traversing up to the root node. We - * need to remove the buddy from its free list here but we don't need to - * add the merged parent to its free list yet. That will be done once after - * this loop is finished. - */ - list_remove(changetype(ptr_for_node(((i - 1) ^ 1) + 1, bucket))); - i = (i - 1) / 2; - bucket--; + * Add ourselves to the free list for our bucket. We add to the back of the + * list because "malloc" takes from the back of the list and we want a "free" + * followed by a "malloc" of the same size to ideally use the same address + * for better memory locality. + */ + list_push(buckets$get(bucket), changetype(ptr_for_node(i, bucket))); } - - /* - * Add ourselves to the free list for our bucket. We add to the back of the - * list because "malloc" takes from the back of the list and we want a "free" - * followed by a "malloc" of the same size to ideally use the same address - * for better memory locality. - */ - list_push(buckets$get(bucket), changetype(ptr_for_node(i, bucket))); } diff --git a/std/assembly/allocator/emscripten.ts b/std/assembly/allocator/emscripten.ts index 92956b764d..e34a4bd93a 100644 --- a/std/assembly/allocator/emscripten.ts +++ b/std/assembly/allocator/emscripten.ts @@ -11,12 +11,14 @@ declare function _malloc(size: usize): usize; declare function _free(ptr: usize): void; -// Memory allocator interface +// Memory allocator implementation +@global namespace memory { -@global export function __memory_allocate(size: usize): usize { - return _malloc(size); -} + @inline export function allocate(size: usize): usize { + return _malloc(size); + } -@global export function __memory_free(ptr: usize): void { - _free(ptr); + @inline export function free(ptr: usize): void { + _free(ptr); + } } diff --git a/std/assembly/allocator/system.ts b/std/assembly/allocator/system.ts index 76b3293b0c..46dd382738 100644 --- a/std/assembly/allocator/system.ts +++ b/std/assembly/allocator/system.ts @@ -11,11 +11,13 @@ declare function malloc(size: usize): usize; declare function free(ptr: usize): void; // Memory allocator interface +@global namespace memory { -@global export function __memory_allocate(size: usize): usize { - return malloc(size); -} + @inline export function allocate(size: usize): usize { + return malloc(size); + } -@global export function __memory_free(ptr: usize): void { - free(ptr); + @inline export function free(ptr: usize): void { + free(ptr); + } } diff --git a/std/assembly/allocator/tlsf.ts b/std/assembly/allocator/tlsf.ts index 04b027dc55..ad625041dd 100644 --- a/std/assembly/allocator/tlsf.ts +++ b/std/assembly/allocator/tlsf.ts @@ -434,70 +434,67 @@ function fls(word: T): T { var ROOT: Root = changetype(0); // Memory allocator interface - -/** Allocates a chunk of memory. */ -@global export function __memory_allocate(size: usize): usize { - - // initialize if necessary - var root = ROOT; - if (!root) { - let rootOffset = (HEAP_BASE + AL_MASK) & ~AL_MASK; - let pagesBefore = memory.size(); - let pagesNeeded = ((((rootOffset + Root.SIZE) + 0xffff) & ~0xffff) >>> 16); - if (pagesNeeded > pagesBefore && memory.grow(pagesNeeded - pagesBefore) < 0) unreachable(); - ROOT = root = changetype(rootOffset); - root.tailRef = 0; - root.flMap = 0; - for (let fl: usize = 0; fl < FL_BITS; ++fl) { - root.setSLMap(fl, 0); - for (let sl: u32 = 0; sl < SL_SIZE; ++sl) { - root.setHead(fl, sl, null); +@global namespace memory { + + /** Allocates a chunk of memory. */ + export function allocate(size: usize): usize { + // initialize if necessary + var root = ROOT; + if (!root) { + let rootOffset = (HEAP_BASE + AL_MASK) & ~AL_MASK; + let pagesBefore = memory.size(); + let pagesNeeded = ((((rootOffset + Root.SIZE) + 0xffff) & ~0xffff) >>> 16); + if (pagesNeeded > pagesBefore && memory.grow(pagesNeeded - pagesBefore) < 0) unreachable(); + ROOT = root = changetype(rootOffset); + root.tailRef = 0; + root.flMap = 0; + for (let fl: usize = 0; fl < FL_BITS; ++fl) { + root.setSLMap(fl, 0); + for (let sl: u32 = 0; sl < SL_SIZE; ++sl) { + root.setHead(fl, sl, null); + } } + root.addMemory((rootOffset + Root.SIZE + AL_MASK) & ~AL_MASK, memory.size() << 16); } - root.addMemory((rootOffset + Root.SIZE + AL_MASK) & ~AL_MASK, memory.size() << 16); - } - // search for a suitable block - if (size > Block.MAX_SIZE) unreachable(); + // search for a suitable block + if (size > Block.MAX_SIZE) unreachable(); - // 32-bit MAX_SIZE is 1 << 30 and itself aligned, hence the following can't overflow MAX_SIZE - size = max((size + AL_MASK) & ~AL_MASK, Block.MIN_SIZE); + // 32-bit MAX_SIZE is 1 << 30 and itself aligned, hence the following can't overflow MAX_SIZE + size = max((size + AL_MASK) & ~AL_MASK, Block.MIN_SIZE); - var block = root.search(size); - if (!block) { + var block = root.search(size); + if (!block) { - // request more memory - let pagesBefore = memory.size(); - let pagesNeeded = (((size + 0xffff) & ~0xffff) >>> 16); - let pagesWanted = max(pagesBefore, pagesNeeded); // double memory - if (memory.grow(pagesWanted) < 0) { - if (memory.grow(pagesNeeded) < 0) { - unreachable(); // out of memory + // request more memory + let pagesBefore = memory.size(); + let pagesNeeded = (((size + 0xffff) & ~0xffff) >>> 16); + let pagesWanted = max(pagesBefore, pagesNeeded); // double memory + if (memory.grow(pagesWanted) < 0) { + if (memory.grow(pagesNeeded) < 0) { + unreachable(); // out of memory + } } + let pagesAfter = memory.size(); + root.addMemory(pagesBefore << 16, pagesAfter << 16); + block = assert(root.search(size)); // must be found now } - let pagesAfter = memory.size(); - root.addMemory(pagesBefore << 16, pagesAfter << 16); - block = assert(root.search(size)); // must be found now - } - assert((block.info & ~TAGS) >= size); - return root.use(block, size); -} + assert((block.info & ~TAGS) >= size); + return root.use(block, size); + } -/** Frees the chunk of memory at the specified address. */ -@global export function __memory_free(data: usize): void { - if (data) { - let root = ROOT; - if (root) { - let block = changetype(data - Block.INFO); - let blockInfo = block.info; - assert(!(blockInfo & FREE)); // must be used - block.info = blockInfo | FREE; - root.insert(changetype(data - Block.INFO)); + /** Frees the chunk of memory at the specified address. */ + export function free(data: usize): void { + if (data) { + let root = ROOT; + if (root) { + let block = changetype(data - Block.INFO); + let blockInfo = block.info; + assert(!(blockInfo & FREE)); // must be used + block.info = blockInfo | FREE; + root.insert(changetype(data - Block.INFO)); + } } } } - -@global export function __memory_reset(): void { - unreachable(); -} diff --git a/std/assembly/builtins.ts b/std/assembly/builtins.ts index bd9c55fe3f..df7f0acbdf 100644 --- a/std/assembly/builtins.ts +++ b/std/assembly/builtins.ts @@ -13,6 +13,7 @@ @builtin export declare function isFunction(value?: T): bool; @builtin export declare function isNullable(value?: T): bool; @builtin export declare function isDefined(expression: void): bool; +@builtin export declare function isImplemented(expression: void): bool; @builtin export declare function isConstant(expression: void): bool; @builtin export declare function isManaged(value?: T): bool; @inline export function isNaN(value: T): bool { return value != value; } @@ -501,6 +502,3 @@ export namespace v8x16 { } @builtin export declare function start(): void; - -@builtin export declare function __rt_classid(): u32; -@builtin export declare function __rt_iterateroots(fn: (ref: usize) => void): void; diff --git a/std/assembly/gc.ts b/std/assembly/gc.ts deleted file mode 100644 index 895e47a84e..0000000000 --- a/std/assembly/gc.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* tslint:disable */ - -export namespace gc { - - export function collect(): void { - if (isDefined(__gc_collect)) { __gc_collect(); return; } - WARNING("Calling 'gc.collect' requires a garbage collector to be present."); - unreachable(); - } -} diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index d103983f97..cdcb2b57a0 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -144,6 +144,8 @@ declare function isFunction(value?: any): value is (...args: any) => any; declare function isNullable(value?: any): bool; /** Tests if the specified expression resolves to a defined element. Compiles to a constant. */ declare function isDefined(expression: any): bool; +/** Tests if the specified expression resolves to an implemented (non-stub) element. Compiles to a constant. */ +declare function isImplemented(expression: any): bool; /** Tests if the specified expression evaluates to a constant value. Compiles to a constant. */ declare function isConstant(expression: any): bool; /** Tests if the specified type *or* expression is of a managed type. Compiles to a constant. */ @@ -980,6 +982,8 @@ declare namespace memory { export function fill(dst: usize, value: u8, count: usize): void; /** Copies n bytes from the specified source to the specified destination in memory. These regions may overlap. */ export function copy(dst: usize, src: usize, n: usize): void; + /** Repeats `src` of length `srcLength` `count` times at `dst`. */ + export function repeat(dst: usize, src: usize, srcLength: usize, count: usize): void; /** Copies elements from a passive element segment to a table. */ // export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void; /** Prevents further use of a passive element segment. */ diff --git a/std/assembly/memory.ts b/std/assembly/memory.ts deleted file mode 100644 index 7c92f50e46..0000000000 --- a/std/assembly/memory.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { memcmp, memmove, memset } from "./internal/memory"; - -@builtin export declare const HEAP_BASE: usize; // tslint:disable-line - -/* tslint:disable */ - -export namespace memory { - - @builtin export declare function size(): i32; - - @builtin export declare function grow(pages: i32): i32; - - @builtin @inline - export function fill(dest: usize, c: u8, n: usize): void { // see: musl/src/string/memset - memset(dest, c, n); // fallback if "bulk-memory" isn't enabled - } - - @builtin @inline - export function copy(dest: usize, src: usize, n: usize): void { // see: musl/src/string/memmove.c - memmove(dest, src, n); // fallback if "bulk-memory" isn't enabled - } - - @inline export function compare(vl: usize, vr: usize, n: usize): i32 { // see: musl/src/string/memcmp.c - return memcmp(vl, vr, n); - } - - // Passive segments - - // export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void { - // __memory_init(segmentIndex, srcOffset, dstOffset); - // } - - // export function drop(segmentIndex: u32): void { - // __memory_drop(segmentIndex); - // } - - // Allocator - - @inline export function allocate(size: usize): usize { - if (isDefined(__memory_allocate)) return __memory_allocate(size); - WARNING("Calling 'memory.allocate' requires a memory manager to be present."); - return unreachable(); - } - - @inline export function free(ptr: usize): void { - if (isDefined(__memory_free)) { __memory_free(ptr); return; } - WARNING("Calling 'memory.free' requires a memory manager to be present."); - unreachable(); - } - - @inline export function reset(): void { - if (isDefined(__memory_reset)) { __memory_reset(); return; } - unreachable(); - } -} diff --git a/std/assembly/runtime/index.ts b/std/assembly/runtime.ts similarity index 50% rename from std/assembly/runtime/index.ts rename to std/assembly/runtime.ts index 57ce74418b..157ce44086 100644 --- a/std/assembly/runtime/index.ts +++ b/std/assembly/runtime.ts @@ -1,5 +1,9 @@ -import { AL_MASK, MAX_SIZE_32 } from "../internal/allocator"; -import { __rt_classid } from "../builtins"; +import { + AL_MASK, + MAX_SIZE_32 +} from "./internal/allocator"; + +@builtin export declare const HEAP_BASE: usize; /** Common runtime header of all objects. */ @unmanaged export class HEADER { @@ -18,7 +22,7 @@ import { __rt_classid } from "../builtins"; // runtime will most likely change significantly once reftypes and WASM GC are a thing. /** Whether a GC is present or not. */ -@inline export const GC = isDefined(gc); +@inline export const GC = isImplemented(gc.register) && isImplemented(gc.link); /** Size of the common runtime header. */ @inline export const HEADER_SIZE: usize = GC @@ -28,8 +32,8 @@ import { __rt_classid } from "../builtins"; /** Magic value used to validate common runtime headers. */ @inline export const HEADER_MAGIC: u32 = 0xA55E4B17; -/** Aligns an allocation to actual block size. Primarily targets TLSF. */ -export function ALIGN(payloadSize: usize): usize { +/** Adjusts an allocation to actual block size. Primarily targets TLSF. */ +export function ADJUST(payloadSize: usize): usize { // round up to power of 2, e.g. with HEADER_SIZE=8: // 0 -> 2^3 = 8 // 1..8 -> 2^4 = 16 @@ -40,8 +44,8 @@ export function ALIGN(payloadSize: usize): usize { } /** Allocates a new object and returns a pointer to its payload. */ -export function ALLOC(payloadSize: u32): usize { - var header = changetype
(memory.allocate(ALIGN(payloadSize))); +@unsafe export function ALLOC(payloadSize: u32): usize { + var header = changetype
(memory.allocate(ADJUST(payloadSize))); header.classId = HEADER_MAGIC; header.payloadSize = payloadSize; if (GC) { @@ -54,14 +58,18 @@ export function ALLOC(payloadSize: u32): usize { } /** Reallocates an object if necessary. Returns a pointer to its (moved) payload. */ -export function REALLOC(ref: usize, newPayloadSize: u32): usize { +@unsafe export function REALLOC(ref: usize, newPayloadSize: u32): usize { + // Background: When managed objects are allocated these aren't immediately registered with GC + // but can be used as scratch objects while unregistered. This is useful in situations where + // the object must be reallocated multiple times because its final size isn't known beforehand, + // e.g. in Array#filter, with only the final object making it into GC'ed userland. var header = changetype
(ref - HEADER_SIZE); var payloadSize = header.payloadSize; if (payloadSize < newPayloadSize) { - let newAlignedSize = ALIGN(newPayloadSize); - if (ALIGN(payloadSize) < newAlignedSize) { - // move if the allocation isn't large enough to hold the new payload - let newHeader = changetype
(memory.allocate(newAlignedSize)); + let newAdjustedSize = ADJUST(newPayloadSize); + if (select(ADJUST(payloadSize), 0, ref > HEAP_BASE) < newAdjustedSize) { + // move if the allocation isn't large enough or not a heap object + let newHeader = changetype
(memory.allocate(newAdjustedSize)); newHeader.classId = HEADER_MAGIC; if (GC) { newHeader.gc1 = 0; @@ -72,6 +80,7 @@ export function REALLOC(ref: usize, newPayloadSize: u32): usize { memory.fill(newRef + payloadSize, 0, newPayloadSize - payloadSize); if (header.classId == HEADER_MAGIC) { // free right away if not registered yet + assert(ref > HEAP_BASE); // static objects aren't scratch objects memory.free(changetype(header)); } header = newHeader; @@ -82,8 +91,7 @@ export function REALLOC(ref: usize, newPayloadSize: u32): usize { } } else { // if the size is the same or less, just update the header accordingly. - // it is not necessary to free unused space here because it is cleared - // when grown again anyway. + // unused space is cleared when grown, so no need to do this here. } header.payloadSize = newPayloadSize; return ref; @@ -97,20 +105,21 @@ function unref(ref: usize): HEADER { } /** Frees an object. Must not have been registered with GC yet. */ -export function FREE(ref: usize): void { +@unsafe export function FREE(ref: usize): void { memory.free(changetype(unref(ref))); } /** Registers a managed object. Cannot be free'd anymore afterwards. */ -@inline export function REGISTER(ref: usize): T { - // inline this because it's generic so we don't get a bunch of functions - unref(ref).classId = __rt_classid(); +@unsafe @inline export function REGISTER(ref: usize): T { + // see comment in REALLOC why this is useful. also inline this because + // it's generic so we don't get a bunch of functions. + unref(ref).classId = gc.classId(); if (GC) gc.register(ref); return changetype(ref); } /** Links a managed object with its managed parent. */ -export function LINK(ref: usize, parentRef: usize): void { +@unsafe export function LINK(ref: usize, parentRef: usize): void { assert(ref >= HEAP_BASE + HEADER_SIZE); // must be a heap object var header = changetype
(ref - HEADER_SIZE); assert(header.classId != HEADER_MAGIC && header.gc1 != 0 && header.gc2 != 0); // must be registered @@ -119,7 +128,7 @@ export function LINK(ref: usize, parentRef: usize): void { /** ArrayBuffer base class. */ export abstract class ArrayBufferBase { - static readonly MAX_BYTELENGTH: i32 = MAX_SIZE_32 - HEADER_SIZE; + @lazy static readonly MAX_BYTELENGTH: i32 = MAX_SIZE_32 - HEADER_SIZE; get byteLength(): i32 { return changetype
(changetype(this) - HEADER_SIZE).payloadSize; } @@ -127,8 +136,62 @@ export abstract class ArrayBufferBase { /** String base class. */ export abstract class StringBase { - static readonly MAX_LENGTH: i32 = (MAX_SIZE_32 - HEADER_SIZE) >> 1; + @lazy static readonly MAX_LENGTH: i32 = (MAX_SIZE_32 - HEADER_SIZE) >> 1; get length(): i32 { return changetype
(changetype(this) - HEADER_SIZE).payloadSize >> 1; } } + +import { memcmp, memmove, memset } from "./internal/memory"; + +/** Memory manager interface. */ +export namespace memory { + @builtin export declare function size(): i32; + @builtin @unsafe export declare function grow(pages: i32): i32; + @builtin @unsafe @inline export function fill(dst: usize, c: u8, n: usize): void { + memset(dst, c, n); // fallback if "bulk-memory" isn't enabled + } + @builtin @unsafe @inline export function copy(dst: usize, src: usize, n: usize): void { + memmove(dst, src, n); // fallback if "bulk-memory" isn't enabled + } + @unsafe export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void { + ERROR("not implemented"); + } + @unsafe export function drop(segmentIndex: u32): void { + ERROR("not implemented"); + } + @stub @inline export function allocate(size: usize): usize { + ERROR("stub: missing memory manager"); + return unreachable(); + } + @stub @unsafe @inline export function free(ptr: usize): void { + ERROR("stub: missing memory manager"); + } + @stub @unsafe @inline export function reset(): void { + ERROR("stub: not supported by memory manager"); + } + @inline export function compare(vl: usize, vr: usize, n: usize): i32 { + return memcmp(vl, vr, n); + } + @unsafe export function repeat(dst: usize, src: usize, srcLength: usize, count: usize): void { + var index: usize = 0; + var total = srcLength * count; + while (index < total) { + memory.copy(dst + index, src, srcLength); + index += srcLength; + } + } +} + +/** Garbage collector interface. */ +export namespace gc { + @builtin @unsafe export declare function classId(): u32; + @builtin @unsafe export declare function iterateRoots(fn: (ref: usize) => void): void; + @stub @unsafe export function register(ref: usize): void { + ERROR("stub: missing garbage collector"); + } + @stub @unsafe export function link(ref: usize, parentRef: usize): void { + ERROR("stub: missing garbage collector"); + } + @stub export function collect(): void {} +} diff --git a/std/assembly/runtime/itcm.ts b/std/assembly/runtime/itcm.ts deleted file mode 100644 index 19da440b9f..0000000000 --- a/std/assembly/runtime/itcm.ts +++ /dev/null @@ -1,8 +0,0 @@ -@global namespace gc { - @unsafe export function register(ref: usize): void { - } - @unsafe export function link(ref: usize, parentRef: usize): void { - } - export function collect(): void { - } -} diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 816bab4ff2..c13959dbd5 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -13,75 +13,16 @@ import { STORE } from "./internal/arraybuffer"; -function compareImpl(str1: String, offset1: usize, str2: String, offset2: usize, len: usize): i32 { +function compareImpl(str1: String, index1: usize, str2: String, index2: usize, len: usize): i32 { var result: i32 = 0; - var ptr1 = changetype(str1) + (offset1 << 1); - var ptr2 = changetype(str2) + (offset2 << 1); + var ptr1 = changetype(str1) + (index1 << 1); + var ptr2 = changetype(str2) + (index2 << 1); while (len && !(result = load(ptr1) - load(ptr2))) { --len, ptr1 += 2, ptr2 += 2; } return result; } -function repeatImpl(dst: usize, dstIndex: usize, src: String, count: i32): void { - var length = src.length; - if (ASC_SHRINK_LEVEL > 1) { - let strLen = length << 1; - let to = changetype(dst) + (dstIndex << 1); - let from = changetype(src); - for (let i = 0, len = strLen * count; i < len; i += strLen) { - memory.copy(to + i, from, strLen); - } - } else { - switch (length) { - case 0: break; - case 1: { - let cc = load(changetype(src)); - let out = changetype(dst) + (dstIndex << 1); - for (let i = 0; i < count; ++i) { - store(out + (i << 1), cc); - } - break; - } - case 2: { - let cc = load(changetype(src)); - let out = changetype(dst) + (dstIndex << 1); - for (let i = 0; i < count; ++i) { - store(out + (i << 2), cc); - } - break; - } - case 3: { - let cc1 = load(changetype(src)); - let cc2 = load(changetype(src), 4); - let out = changetype(dst) + (dstIndex << 1); - for (let i = 0; i < count; ++i) { - store(out + (i << 2), cc1); - store(out + (i << 1), cc2, 4); - } - break; - } - case 4: { - let cc = load(changetype(src)); - let out = changetype(dst) + (dstIndex << 1); - for (let i = 0; i < count; ++i) { - store(out + (i << 3), cc); - } - break; - } - default: { - let strLen = length << 1; - let to = changetype(dst) + (dstIndex << 1); - let from = changetype(src); - for (let i = 0, len = strLen * count; i < len; i += strLen) { - memory.copy(to + i, from, strLen); - } - break; - } - } - } -} - function isWhiteSpaceOrLineTerminator(c: u16): bool { switch (c) { case 9: // @@ -373,7 +314,7 @@ export class String extends StringBase { let count = (len - 1) / padLen; let base = count * padLen; let rest = len - base; - repeatImpl(out, 0, padString, count); + memory.repeat(out, changetype(padString), padString.length << 1, count); if (rest) { memory.copy(out + (base << 1), changetype(padString), rest << 1); } @@ -400,7 +341,7 @@ export class String extends StringBase { let count = (len - 1) / padLen; let base = count * padLen; let rest = len - base; - repeatImpl(out, length, padString, count); + memory.repeat(out + (length << 1), changetype(padString), padString.length << 1, count); if (rest) { memory.copy(out + ((base + length) << 1), changetype(padString), rest << 1); } @@ -422,7 +363,7 @@ export class String extends StringBase { if (count == 0 || !length) return changetype(""); if (count == 1) return this; var out = ALLOC(length * count); - repeatImpl(out, 0, this, count); + memory.repeat(out, changetype(this), length << 1, count); return REGISTER(out); } @@ -468,7 +409,7 @@ export class String extends StringBase { } var result = new Array(); var end = 0, start = 0, i = 0; - while ((end = this.indexOf(separator, start)) != -1) { + while ((end = this.indexOf(separator!, start)) != -1) { let len = end - start; if (len > 0) { let out = ALLOC(len << 1); diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index aa243d2204..2dcfc063c3 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -11,14 +11,14 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\16\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 56) "\0e\00\00\00s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 88) "\08\00\00\00b\00a\00r\00r\00i\00e\00r\001") - (data (i32.const 112) "\08\00\00\00b\00a\00r\00r\00i\00e\00r\002") - (data (i32.const 136) "\08\00\00\00b\00a\00r\00r\00i\00e\00r\003") - (data (i32.const 160) "\15\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00/\00i\00n\00d\00e\00x\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00,\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 64) "\01\00\00\00\1c\00\00\00s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 104) "\01\00\00\00\10\00\00\00b\00a\00r\00r\00i\00e\00r\001") + (data (i32.const 128) "\01\00\00\00\10\00\00\00b\00a\00r\00r\00i\00e\00r\002") + (data (i32.const 152) "\01\00\00\00\10\00\00\00b\00a\00r\00r\00i\00e\00r\003") + (data (i32.const 176) "\01\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) - (elem (i32.const 0) $null) + (elem (i32.const 0) $~lib/runtime/gc.collect) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $std/runtime/register_ref (mut i32) (i32.const 0)) (global $std/runtime/barrier1 (mut i32) (i32.const 0)) @@ -34,6 +34,9 @@ (global $std/runtime/ref5 (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) + (export "gc.register" (func $std/runtime/gc.register)) + (export "gc.link" (func $std/runtime/gc.link)) + (export "gc.collect" (func $~lib/runtime/gc.collect)) (start $start) (func $~lib/allocator/tlsf/Root#setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 @@ -41,7 +44,7 @@ i32.ge_u if i32.const 0 - i32.const 8 + i32.const 16 i32.const 144 i32.const 4 call $~lib/env/abort @@ -61,7 +64,7 @@ i32.ge_u if i32.const 0 - i32.const 8 + i32.const 16 i32.const 167 i32.const 4 call $~lib/env/abort @@ -72,7 +75,7 @@ i32.ge_u if i32.const 0 - i32.const 8 + i32.const 16 i32.const 168 i32.const 4 call $~lib/env/abort @@ -98,7 +101,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 89 i32.const 4 call $~lib/env/abort @@ -116,7 +119,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 90 i32.const 11 call $~lib/env/abort @@ -129,7 +132,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 428 i32.const 2 call $~lib/env/abort @@ -146,7 +149,7 @@ i32.ge_u if i32.const 0 - i32.const 8 + i32.const 16 i32.const 158 i32.const 4 call $~lib/env/abort @@ -157,7 +160,7 @@ i32.ge_u if i32.const 0 - i32.const 8 + i32.const 16 i32.const 159 i32.const 4 call $~lib/env/abort @@ -180,7 +183,7 @@ i32.ge_u if i32.const 0 - i32.const 8 + i32.const 16 i32.const 138 i32.const 4 call $~lib/env/abort @@ -206,7 +209,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 258 i32.const 4 call $~lib/env/abort @@ -229,7 +232,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 260 i32.const 4 call $~lib/env/abort @@ -330,7 +333,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 81 i32.const 4 call $~lib/env/abort @@ -344,7 +347,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 82 i32.const 11 call $~lib/env/abort @@ -360,7 +363,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 334 i32.const 4 call $~lib/env/abort @@ -372,7 +375,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 4 call $~lib/env/abort @@ -385,7 +388,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 336 i32.const 4 call $~lib/env/abort @@ -407,7 +410,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 189 i32.const 4 call $~lib/env/abort @@ -421,7 +424,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 191 i32.const 4 call $~lib/env/abort @@ -445,7 +448,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 193 i32.const 4 call $~lib/env/abort @@ -457,7 +460,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 197 i32.const 23 call $~lib/env/abort @@ -499,7 +502,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 211 i32.const 24 call $~lib/env/abort @@ -513,7 +516,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 213 i32.const 6 call $~lib/env/abort @@ -562,7 +565,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 226 i32.const 4 call $~lib/env/abort @@ -641,7 +644,7 @@ i32.gt_u if i32.const 0 - i32.const 8 + i32.const 16 i32.const 377 i32.const 4 call $~lib/env/abort @@ -652,7 +655,7 @@ i32.and if i32.const 0 - i32.const 8 + i32.const 16 i32.const 378 i32.const 4 call $~lib/env/abort @@ -663,7 +666,7 @@ i32.and if i32.const 0 - i32.const 8 + i32.const 16 i32.const 379 i32.const 4 call $~lib/env/abort @@ -680,7 +683,7 @@ i32.lt_u if i32.const 0 - i32.const 8 + i32.const 16 i32.const 384 i32.const 6 call $~lib/env/abort @@ -708,7 +711,7 @@ i32.lt_u if i32.const 0 - i32.const 8 + i32.const 16 i32.const 393 i32.const 6 call $~lib/env/abort @@ -761,7 +764,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 422 i32.const 2 call $~lib/env/abort @@ -786,7 +789,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 296 i32.const 4 call $~lib/env/abort @@ -866,7 +869,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 323 i32.const 16 call $~lib/env/abort @@ -894,7 +897,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 348 i32.const 4 call $~lib/env/abort @@ -914,7 +917,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 349 i32.const 4 call $~lib/env/abort @@ -925,7 +928,7 @@ i32.and if i32.const 0 - i32.const 8 + i32.const 16 i32.const 350 i32.const 4 call $~lib/env/abort @@ -977,7 +980,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 368 i32.const 25 call $~lib/env/abort @@ -994,7 +997,7 @@ i32.const 8 i32.add ) - (func $~lib/allocator/tlsf/__memory_allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/memory.allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1021,14 +1024,14 @@ if unreachable end - i32.const 208 + i32.const 216 local.set $3 - i32.const 208 + i32.const 216 global.set $~lib/allocator/tlsf/ROOT i32.const 2912 i32.const 0 i32.store - i32.const 208 + i32.const 216 i32.const 0 i32.store i32.const 0 @@ -1038,7 +1041,7 @@ i32.const 22 i32.lt_u if - i32.const 208 + i32.const 216 local.get $1 i32.const 0 call $~lib/allocator/tlsf/Root#setSLMap @@ -1049,7 +1052,7 @@ i32.const 32 i32.lt_u if - i32.const 208 + i32.const 216 local.get $1 local.get $2 i32.const 0 @@ -1068,8 +1071,8 @@ br $repeat|0 end end - i32.const 208 - i32.const 3128 + i32.const 216 + i32.const 3136 current_memory i32.const 16 i32.shl @@ -1142,9 +1145,9 @@ local.get $2 else i32.const 0 - i32.const 8 + i32.const 16 i32.const 480 - i32.const 12 + i32.const 14 call $~lib/env/abort unreachable end @@ -1159,9 +1162,9 @@ end if i32.const 0 - i32.const 8 + i32.const 16 i32.const 483 - i32.const 2 + i32.const 4 call $~lib/env/abort unreachable end @@ -1389,7 +1392,7 @@ end end ) - (func $~lib/runtime/index/ALLOC (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOC (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -1399,7 +1402,7 @@ i32.clz i32.sub i32.shl - call $~lib/allocator/tlsf/__memory_allocate + call $~lib/allocator/tlsf/memory.allocate local.tee $1 i32.const -1520547049 i32.store @@ -2515,7 +2518,7 @@ end end ) - (func $~lib/allocator/tlsf/__memory_free (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/memory.free (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2534,9 +2537,9 @@ i32.and if i32.const 0 - i32.const 8 + i32.const 16 i32.const 494 - i32.const 6 + i32.const 8 call $~lib/env/abort unreachable end @@ -2553,7 +2556,7 @@ end end ) - (func $~lib/runtime/index/REALLOC (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/REALLOC (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2575,6 +2578,11 @@ i32.clz i32.sub i32.shl + i32.const 0 + local.get $0 + i32.const 216 + i32.gt_u + select i32.const 1 i32.const 32 local.get $1 @@ -2587,7 +2595,7 @@ i32.lt_u if local.get $4 - call $~lib/allocator/tlsf/__memory_allocate + call $~lib/allocator/tlsf/memory.allocate local.tee $5 i32.const -1520547049 i32.store @@ -2616,8 +2624,19 @@ i32.const -1520547049 i32.eq if + local.get $0 + i32.const 216 + i32.le_u + if + i32.const 0 + i32.const 184 + i32.const 83 + i32.const 8 + call $~lib/env/abort + unreachable + end local.get $3 - call $~lib/allocator/tlsf/__memory_free + call $~lib/allocator/tlsf/memory.free end local.get $5 local.set $3 @@ -2638,14 +2657,14 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/index/ensureUnregistered (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/unref (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 224 + i32.const 232 i32.lt_u if i32.const 0 - i32.const 160 - i32.const 89 + i32.const 184 + i32.const 101 i32.const 2 call $~lib/env/abort unreachable @@ -2659,15 +2678,19 @@ i32.ne if i32.const 0 - i32.const 160 - i32.const 91 + i32.const 184 + i32.const 103 i32.const 2 call $~lib/env/abort unreachable end local.get $0 ) - (func $start:std/runtime (; 24 ;) (type $FUNCSIG$v) + (func $std/runtime/gc.register (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.set $std/runtime/register_ref + ) + (func $start:std/runtime (; 25 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2706,8 +2729,8 @@ br $repeat|0 else i32.const 0 - i32.const 56 - i32.const 32 + i32.const 72 + i32.const 36 i32.const 2 call $~lib/env/abort unreachable @@ -2777,7 +2800,7 @@ br $continue|2 end end - i32.const 88 + i32.const 112 i32.const 1 global.get $std/runtime/barrier1 f64.convert_i32_u @@ -2786,7 +2809,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 112 + i32.const 136 i32.const 1 global.get $std/runtime/barrier2 f64.convert_i32_u @@ -2795,7 +2818,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 136 + i32.const 160 i32.const 1 global.get $std/runtime/barrier3 f64.convert_i32_u @@ -2805,7 +2828,7 @@ f64.const 0 call $~lib/env/trace i32.const 1 - call $~lib/runtime/index/ALLOC + call $~lib/runtime/ALLOC global.set $std/runtime/ref1 global.get $std/runtime/ref1 i32.const 16 @@ -2817,8 +2840,8 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 47 + i32.const 72 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -2829,8 +2852,8 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 48 + i32.const 72 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -2839,12 +2862,12 @@ local.tee $0 local.get $0 global.get $std/runtime/barrier1 - call $~lib/runtime/index/REALLOC + call $~lib/runtime/REALLOC i32.ne if i32.const 0 - i32.const 56 - i32.const 49 + i32.const 72 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable @@ -2855,23 +2878,23 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 50 + i32.const 72 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref1 global.get $std/runtime/barrier2 - call $~lib/runtime/index/REALLOC + call $~lib/runtime/REALLOC global.set $std/runtime/ref2 global.get $std/runtime/ref1 global.get $std/runtime/ref2 i32.eq if i32.const 0 + i32.const 72 i32.const 56 - i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -2886,36 +2909,36 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 54 + i32.const 72 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref2 - call $~lib/runtime/index/ensureUnregistered - call $~lib/allocator/tlsf/__memory_free + call $~lib/runtime/unref + call $~lib/allocator/tlsf/memory.free global.get $std/runtime/barrier2 - call $~lib/runtime/index/ALLOC + call $~lib/runtime/ALLOC global.set $std/runtime/ref3 global.get $std/runtime/ref1 global.get $std/runtime/ref3 i32.ne if i32.const 0 - i32.const 56 - i32.const 57 + i32.const 72 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/barrier1 - call $~lib/runtime/index/ALLOC + call $~lib/runtime/ALLOC global.set $std/runtime/ref4 global.get $std/runtime/ref4 local.tee $0 - call $~lib/runtime/index/ensureUnregistered - i32.const 43 + call $~lib/runtime/unref + i32.const 2 i32.store local.get $0 global.set $std/runtime/register_ref @@ -2924,8 +2947,8 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 61 + i32.const 72 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable @@ -2936,12 +2959,12 @@ global.set $std/runtime/header4 global.get $std/runtime/header4 i32.load - i32.const 43 + i32.const 2 i32.ne if i32.const 0 - i32.const 56 - i32.const 63 + i32.const 72 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -2952,14 +2975,14 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 64 + i32.const 72 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable end i32.const 10 - call $~lib/runtime/index/ALLOC + call $~lib/runtime/ALLOC global.set $std/runtime/ref5 global.get $std/runtime/ref5 i32.const 16 @@ -2969,8 +2992,8 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 67 + i32.const 72 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable @@ -2985,17 +3008,20 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 68 + i32.const 72 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 25 ;) (type $FUNCSIG$v) - call $start:std/runtime + (func $std/runtime/gc.link (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop ) - (func $null (; 26 ;) (type $FUNCSIG$v) + (func $~lib/runtime/gc.collect (; 27 ;) (type $FUNCSIG$v) nop ) + (func $start (; 28 ;) (type $FUNCSIG$v) + call $start:std/runtime + ) ) diff --git a/tests/compiler/std/runtime.ts b/tests/compiler/std/runtime.ts index 3b952392b9..d1fba50a57 100644 --- a/tests/compiler/std/runtime.ts +++ b/tests/compiler/std/runtime.ts @@ -2,15 +2,19 @@ import "allocator/tlsf"; var register_ref: usize = 0; -@global function __REGISTER_IMPL(ref: usize): void { - register_ref = ref; +@global namespace gc { + export function register(ref: usize): void { + register_ref = ref; + } + export function link(ref: usize, parentRef: usize): void { + } } import { HEADER, HEADER_SIZE, HEADER_MAGIC, - ALIGN, + ADJUST, ALLOC, REALLOC, FREE, @@ -21,22 +25,22 @@ import { class A {} class B {} -assert(__rt_classid() != __rt_classid()); +assert(gc.classId() != gc.classId()); function isPowerOf2(x: i32): bool { return x != 0 && (x & (x - 1)) == 0; } -assert(ALIGN(0) > 0); +assert(ADJUST(0) > 0); for (let i = 0; i < 9000; ++i) { - assert(isPowerOf2(ALIGN(i))); + assert(isPowerOf2(ADJUST(i))); } -var barrier1 = ALIGN(0); +var barrier1 = ADJUST(0); var barrier2 = barrier1 + 1; -while (ALIGN(barrier2 + 1) == ALIGN(barrier2)) ++barrier2; +while (ADJUST(barrier2 + 1) == ADJUST(barrier2)) ++barrier2; var barrier3 = barrier2 + 1; -while (ALIGN(barrier3 + 1) == ALIGN(barrier3)) ++barrier3; +while (ADJUST(barrier3 + 1) == ADJUST(barrier3)) ++barrier3; trace("barrier1", 1, barrier1); trace("barrier2", 1, barrier2); @@ -60,7 +64,7 @@ var ref4 = ALLOC(barrier1); REGISTER(ref4); // should call __REGISTER_IMPL assert(register_ref == ref4); var header4 = changetype
(register_ref - HEADER_SIZE); -assert(header4.classId == __rt_classid()); +assert(header4.classId == gc.classId()); assert(header4.payloadSize == barrier1); var ref5 = ALLOC(10); diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index c4fd9d9ed0..69d6344da5 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -11,12 +11,12 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\16\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") - (data (i32.const 56) "\0e\00\00\00s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 88) "\08\00\00\00b\00a\00r\00r\00i\00e\00r\001\00") - (data (i32.const 112) "\08\00\00\00b\00a\00r\00r\00i\00e\00r\002\00") - (data (i32.const 136) "\08\00\00\00b\00a\00r\00r\00i\00e\00r\003\00") - (data (i32.const 160) "\15\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00/\00i\00n\00d\00e\00x\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00,\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 64) "\01\00\00\00\1c\00\00\00s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 104) "\01\00\00\00\10\00\00\00b\00a\00r\00r\00i\00e\00r\001\00") + (data (i32.const 128) "\01\00\00\00\10\00\00\00b\00a\00r\00r\00i\00e\00r\002\00") + (data (i32.const 152) "\01\00\00\00\10\00\00\00b\00a\00r\00r\00i\00e\00r\003\00") + (data (i32.const 176) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) @@ -48,9 +48,12 @@ (global $std/runtime/ref4 (mut i32) (i32.const 0)) (global $std/runtime/header4 (mut i32) (i32.const 0)) (global $std/runtime/ref5 (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 208)) + (global $~lib/runtime/HEAP_BASE i32 (i32.const 216)) (export "memory" (memory $0)) (export "table" (table $0)) + (export "gc.register" (func $std/runtime/gc.register)) + (export "gc.link" (func $std/runtime/gc.link)) + (export "gc.collect" (func $~lib/runtime/gc.collect)) (start $start) (func $start:~lib/allocator/tlsf (; 2 ;) (type $FUNCSIG$v) i32.const 1 @@ -61,14 +64,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 122 i32.const 0 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/index/ALIGN (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUST (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -110,7 +113,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 144 i32.const 4 call $~lib/env/abort @@ -131,7 +134,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 167 i32.const 4 call $~lib/env/abort @@ -143,7 +146,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 168 i32.const 4 call $~lib/env/abort @@ -176,7 +179,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 89 i32.const 4 call $~lib/env/abort @@ -196,7 +199,7 @@ i32.eqz if (result i32) i32.const 0 - i32.const 8 + i32.const 16 i32.const 90 i32.const 11 call $~lib/env/abort @@ -212,7 +215,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 428 i32.const 2 call $~lib/env/abort @@ -230,7 +233,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 158 i32.const 4 call $~lib/env/abort @@ -242,7 +245,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 159 i32.const 4 call $~lib/env/abort @@ -266,7 +269,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 138 i32.const 4 call $~lib/env/abort @@ -296,7 +299,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 258 i32.const 4 call $~lib/env/abort @@ -322,7 +325,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 260 i32.const 4 call $~lib/env/abort @@ -433,7 +436,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 81 i32.const 4 call $~lib/env/abort @@ -447,7 +450,7 @@ i32.eqz if (result i32) i32.const 0 - i32.const 8 + i32.const 16 i32.const 82 i32.const 11 call $~lib/env/abort @@ -464,7 +467,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 334 i32.const 4 call $~lib/env/abort @@ -477,7 +480,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 4 call $~lib/env/abort @@ -490,7 +493,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 336 i32.const 4 call $~lib/env/abort @@ -516,7 +519,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 189 i32.const 4 call $~lib/env/abort @@ -531,7 +534,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 191 i32.const 4 call $~lib/env/abort @@ -557,7 +560,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 193 i32.const 4 call $~lib/env/abort @@ -569,7 +572,7 @@ i32.eqz if (result i32) i32.const 0 - i32.const 8 + i32.const 16 i32.const 197 i32.const 23 call $~lib/env/abort @@ -617,7 +620,7 @@ i32.eqz if (result i32) i32.const 0 - i32.const 8 + i32.const 16 i32.const 211 i32.const 24 call $~lib/env/abort @@ -635,7 +638,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 213 i32.const 6 call $~lib/env/abort @@ -690,7 +693,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 226 i32.const 4 call $~lib/env/abort @@ -781,7 +784,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 377 i32.const 4 call $~lib/env/abort @@ -794,7 +797,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 378 i32.const 4 call $~lib/env/abort @@ -807,7 +810,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 379 i32.const 4 call $~lib/env/abort @@ -828,7 +831,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 384 i32.const 6 call $~lib/env/abort @@ -857,7 +860,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 393 i32.const 6 call $~lib/env/abort @@ -928,7 +931,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 422 i32.const 2 call $~lib/env/abort @@ -944,7 +947,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 422 i32.const 2 call $~lib/env/abort @@ -974,7 +977,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 296 i32.const 4 call $~lib/env/abort @@ -1070,7 +1073,7 @@ local.get $7 else i32.const 0 - i32.const 8 + i32.const 16 i32.const 323 i32.const 16 call $~lib/env/abort @@ -1107,7 +1110,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 348 i32.const 4 call $~lib/env/abort @@ -1127,7 +1130,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 349 i32.const 4 call $~lib/env/abort @@ -1140,7 +1143,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 350 i32.const 4 call $~lib/env/abort @@ -1200,7 +1203,7 @@ i32.eqz if (result i32) i32.const 0 - i32.const 8 + i32.const 16 i32.const 368 i32.const 25 call $~lib/env/abort @@ -1222,7 +1225,7 @@ global.get $~lib/allocator/tlsf/Block.INFO i32.add ) - (func $~lib/allocator/tlsf/__memory_allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/memory.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1235,7 +1238,7 @@ local.get $1 i32.eqz if - global.get $~lib/memory/HEAP_BASE + global.get $~lib/runtime/HEAP_BASE i32.const 7 i32.add i32.const 7 @@ -1426,9 +1429,9 @@ i32.eqz if (result i32) i32.const 0 - i32.const 8 + i32.const 16 i32.const 480 - i32.const 12 + i32.const 14 call $~lib/env/abort unreachable else @@ -1447,9 +1450,9 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 483 - i32.const 2 + i32.const 4 call $~lib/env/abort unreachable end @@ -1712,50 +1715,45 @@ end end ) - (func $~lib/runtime/index/ALLOC (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOC (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/runtime/index/ALIGN - local.set $1 - local.get $1 - call $~lib/allocator/tlsf/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end - local.set $2 - local.get $2 + local.get $0 + call $~lib/runtime/ADJUST + call $~lib/allocator/tlsf/memory.allocate + local.set $1 + local.get $1 i32.const -1520547049 i32.store - local.get $2 + local.get $1 local.get $0 i32.store offset=4 - local.get $2 + local.get $1 i32.const 0 i32.store offset=8 - local.get $2 + local.get $1 i32.const 0 i32.store offset=12 - local.get $2 + local.get $1 i32.const 16 i32.add - local.set $3 - block $~lib/memory/memory.fill|inlined.0 - local.get $3 - local.set $1 + local.set $2 + block $~lib/runtime/memory.fill|inlined.0 + local.get $2 + local.set $3 i32.const 0 local.set $4 local.get $0 local.set $5 - local.get $1 + local.get $3 local.get $4 local.get $5 call $~lib/internal/memory/memset end - local.get $3 + local.get $2 ) (func $~lib/internal/memory/memcpy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -3185,7 +3183,7 @@ end end ) - (func $~lib/allocator/tlsf/__memory_free (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/memory.free (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3209,9 +3207,9 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 494 - i32.const 6 + i32.const 8 call $~lib/env/abort unreachable end @@ -3228,7 +3226,7 @@ end end ) - (func $~lib/runtime/index/REALLOC (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/REALLOC (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3249,20 +3247,20 @@ i32.lt_u if local.get $1 - call $~lib/runtime/index/ALIGN + call $~lib/runtime/ADJUST local.set $4 local.get $3 - call $~lib/runtime/index/ALIGN + call $~lib/runtime/ADJUST + i32.const 0 + local.get $0 + global.get $~lib/runtime/HEAP_BASE + i32.gt_u + select local.get $4 i32.lt_u if - block $~lib/memory/memory.allocate|inlined.1 (result i32) - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/tlsf/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 - end + local.get $4 + call $~lib/allocator/tlsf/memory.allocate local.set $5 local.get $5 i32.const -1520547049 @@ -3277,7 +3275,7 @@ i32.const 16 i32.add local.set $6 - block $~lib/memory/memory.copy|inlined.0 + block $~lib/runtime/memory.copy|inlined.0 local.get $6 local.set $7 local.get $0 @@ -3289,7 +3287,7 @@ local.get $9 call $~lib/internal/memory/memmove end - block $~lib/memory/memory.fill|inlined.1 + block $~lib/runtime/memory.fill|inlined.1 local.get $6 local.get $3 i32.add @@ -3310,13 +3308,20 @@ i32.const -1520547049 i32.eq if - block $~lib/memory/memory.free|inlined.0 - local.get $2 - local.set $7 - local.get $7 - call $~lib/allocator/tlsf/__memory_free - br $~lib/memory/memory.free|inlined.0 + local.get $0 + global.get $~lib/runtime/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 184 + i32.const 83 + i32.const 8 + call $~lib/env/abort + unreachable end + local.get $2 + call $~lib/allocator/tlsf/memory.free end local.get $5 local.set $2 @@ -3346,18 +3351,18 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/index/ensureUnregistered (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/unref (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - global.get $~lib/memory/HEAP_BASE + global.get $~lib/runtime/HEAP_BASE i32.const 16 i32.add i32.ge_u i32.eqz if i32.const 0 - i32.const 160 - i32.const 89 + i32.const 184 + i32.const 101 i32.const 2 call $~lib/env/abort unreachable @@ -3373,36 +3378,30 @@ i32.eqz if i32.const 0 - i32.const 160 - i32.const 91 + i32.const 184 + i32.const 103 i32.const 2 call $~lib/env/abort unreachable end local.get $1 ) - (func $~lib/runtime/index/FREE (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - block $~lib/memory/memory.free|inlined.1 - local.get $0 - call $~lib/runtime/index/ensureUnregistered - local.set $1 - local.get $1 - call $~lib/allocator/tlsf/__memory_free - br $~lib/memory/memory.free|inlined.1 - end + (func $~lib/runtime/FREE (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/runtime/unref + call $~lib/allocator/tlsf/memory.free ) - (func $std/runtime/__REGISTER_IMPL (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/runtime/gc.register (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $std/runtime/register_ref ) - (func $~lib/runtime/index/ArrayBufferBase#get:byteLength (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferBase#get:byteLength (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub i32.load offset=4 ) - (func $~lib/runtime/index/StringBase#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/StringBase#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -3413,27 +3412,27 @@ (func $start:std/runtime (; 34 ;) (type $FUNCSIG$v) (local $0 i32) call $start:~lib/allocator/tlsf - i32.const 43 - i32.const 44 + i32.const 2 + i32.const 3 i32.ne i32.eqz if i32.const 0 - i32.const 56 - i32.const 24 + i32.const 72 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable end i32.const 0 - call $~lib/runtime/index/ALIGN + call $~lib/runtime/ADJUST i32.const 0 i32.gt_u i32.eqz if i32.const 0 - i32.const 56 - i32.const 30 + i32.const 72 + i32.const 34 i32.const 0 call $~lib/env/abort unreachable @@ -3448,13 +3447,13 @@ i32.eqz br_if $break|0 local.get $0 - call $~lib/runtime/index/ALIGN + call $~lib/runtime/ADJUST call $std/runtime/isPowerOf2 i32.eqz if i32.const 0 - i32.const 56 - i32.const 32 + i32.const 72 + i32.const 36 i32.const 2 call $~lib/env/abort unreachable @@ -3469,7 +3468,7 @@ unreachable end i32.const 0 - call $~lib/runtime/index/ALIGN + call $~lib/runtime/ADJUST global.set $std/runtime/barrier1 global.get $std/runtime/barrier1 i32.const 1 @@ -3480,9 +3479,9 @@ global.get $std/runtime/barrier2 i32.const 1 i32.add - call $~lib/runtime/index/ALIGN + call $~lib/runtime/ADJUST global.get $std/runtime/barrier2 - call $~lib/runtime/index/ALIGN + call $~lib/runtime/ADJUST i32.eq if global.get $std/runtime/barrier2 @@ -3502,9 +3501,9 @@ global.get $std/runtime/barrier3 i32.const 1 i32.add - call $~lib/runtime/index/ALIGN + call $~lib/runtime/ADJUST global.get $std/runtime/barrier3 - call $~lib/runtime/index/ALIGN + call $~lib/runtime/ADJUST i32.eq if global.get $std/runtime/barrier3 @@ -3515,7 +3514,7 @@ end end end - i32.const 88 + i32.const 112 i32.const 1 global.get $std/runtime/barrier1 f64.convert_i32_u @@ -3524,7 +3523,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 112 + i32.const 136 i32.const 1 global.get $std/runtime/barrier2 f64.convert_i32_u @@ -3533,7 +3532,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 136 + i32.const 160 i32.const 1 global.get $std/runtime/barrier3 f64.convert_i32_u @@ -3543,7 +3542,7 @@ f64.const 0 call $~lib/env/trace i32.const 1 - call $~lib/runtime/index/ALLOC + call $~lib/runtime/ALLOC global.set $std/runtime/ref1 global.get $std/runtime/ref1 i32.const 16 @@ -3556,8 +3555,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 47 + i32.const 72 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -3569,8 +3568,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 48 + i32.const 72 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -3578,13 +3577,13 @@ global.get $std/runtime/ref1 global.get $std/runtime/ref1 global.get $std/runtime/barrier1 - call $~lib/runtime/index/REALLOC + call $~lib/runtime/REALLOC i32.eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 49 + i32.const 72 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable @@ -3596,15 +3595,15 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 50 + i32.const 72 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref1 global.get $std/runtime/barrier2 - call $~lib/runtime/index/REALLOC + call $~lib/runtime/REALLOC global.set $std/runtime/ref2 global.get $std/runtime/ref1 global.get $std/runtime/ref2 @@ -3612,8 +3611,8 @@ i32.eqz if i32.const 0 + i32.const 72 i32.const 56 - i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -3629,16 +3628,16 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 54 + i32.const 72 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref2 - call $~lib/runtime/index/FREE + call $~lib/runtime/FREE global.get $std/runtime/barrier2 - call $~lib/runtime/index/ALLOC + call $~lib/runtime/ALLOC global.set $std/runtime/ref3 global.get $std/runtime/ref1 global.get $std/runtime/ref3 @@ -3646,33 +3645,35 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 57 + i32.const 72 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/barrier1 - call $~lib/runtime/index/ALLOC + call $~lib/runtime/ALLOC global.set $std/runtime/ref4 - block $~lib/runtime/index/REGISTER|inlined.0 + block $~lib/runtime/REGISTER|inlined.0 (result i32) global.get $std/runtime/ref4 local.set $0 local.get $0 - call $~lib/runtime/index/ensureUnregistered - i32.const 43 + call $~lib/runtime/unref + i32.const 2 i32.store local.get $0 - call $std/runtime/__REGISTER_IMPL + call $std/runtime/gc.register + local.get $0 end + drop global.get $std/runtime/register_ref global.get $std/runtime/ref4 i32.eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 61 + i32.const 72 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable @@ -3683,13 +3684,13 @@ global.set $std/runtime/header4 global.get $std/runtime/header4 i32.load - i32.const 43 + i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 63 + i32.const 72 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -3701,45 +3702,51 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 64 + i32.const 72 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable end i32.const 10 - call $~lib/runtime/index/ALLOC + call $~lib/runtime/ALLOC global.set $std/runtime/ref5 global.get $std/runtime/ref5 - call $~lib/runtime/index/ArrayBufferBase#get:byteLength + call $~lib/runtime/ArrayBufferBase#get:byteLength i32.const 10 i32.eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 67 + i32.const 72 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref5 - call $~lib/runtime/index/StringBase#get:length + call $~lib/runtime/StringBase#get:length i32.const 5 i32.eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 68 + i32.const 72 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 35 ;) (type $FUNCSIG$v) + (func $std/runtime/gc.link (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/runtime/gc.collect (; 36 ;) (type $FUNCSIG$v) + nop + ) + (func $start (; 37 ;) (type $FUNCSIG$v) call $start:std/runtime ) - (func $null (; 36 ;) (type $FUNCSIG$v) + (func $null (; 38 ;) (type $FUNCSIG$v) ) ) From 85b740d670d26721fd64c19f81c37a0031f92d08 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 10 Mar 2019 21:42:18 +0100 Subject: [PATCH 013/119] fix --- std/assembly/string.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/std/assembly/string.ts b/std/assembly/string.ts index c13959dbd5..bc74f1700b 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -220,7 +220,7 @@ export class String extends StringBase { var toPos = max(finalStart, finalEnd) << 1; len = toPos - fromPos; if (!len) return changetype(""); - if (!fromPos && toPos == this.length) return this; + if (!fromPos && toPos == this.length << 1) return this; var out = ALLOC(len); memory.copy(out, changetype(this) + fromPos, len); return REGISTER(out); From f076826e590eb0be9d65097b4ac9b5ffd3f344e3 Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 11 Mar 2019 00:35:17 +0100 Subject: [PATCH 014/119] update std/string --- std/assembly/internal/number.ts | 133 +- std/assembly/string.ts | 8 +- tests/compiler/std/string.optimized.wat | 3902 ++++++++++++----------- tests/compiler/std/string.untouched.wat | 3885 +++++++++++----------- 4 files changed, 4008 insertions(+), 3920 deletions(-) diff --git a/std/assembly/internal/number.ts b/std/assembly/internal/number.ts index e254aecea5..0cc7ac21f3 100644 --- a/std/assembly/internal/number.ts +++ b/std/assembly/internal/number.ts @@ -1,10 +1,13 @@ import { - CharCode, - allocateUnsafe as allocateUnsafeString, - freeUnsafe as freeUnsafeString, - HEADER_SIZE as STRING_HEADER_SIZE + CharCode } from "./string"; +import { + ALLOC, + REGISTER, + FREE +} from "../runtime"; + import { LOAD } from "./arraybuffer"; @@ -175,7 +178,7 @@ function utoa32_lut(buffer: usize, num: u32, offset: usize): void { let digits2 = LOAD(lutbuf, d2); offset -= 4; - store(buffer + (offset << 1), digits1 | (digits2 << 32), STRING_HEADER_SIZE); + store(buffer + (offset << 1), digits1 | (digits2 << 32)); } if (num >= 100) { @@ -184,17 +187,17 @@ function utoa32_lut(buffer: usize, num: u32, offset: usize): void { num = t; offset -= 2; let digits = LOAD(lutbuf, d1); - store(buffer + (offset << 1), digits, STRING_HEADER_SIZE); + store(buffer + (offset << 1), digits); } if (num >= 10) { offset -= 2; let digits = LOAD(lutbuf, num); - store(buffer + (offset << 1), digits, STRING_HEADER_SIZE); + store(buffer + (offset << 1), digits); } else { offset -= 1; let digit = CharCode._0 + num; - store(buffer + (offset << 1), digit, STRING_HEADER_SIZE); + store(buffer + (offset << 1), digit); } } @@ -218,13 +221,13 @@ function utoa64_lut(buffer: usize, num: u64, offset: usize): void { let digits2 = LOAD(lutbuf, c2); offset -= 4; - store(buffer + (offset << 1), digits1 | (digits2 << 32), STRING_HEADER_SIZE); + store(buffer + (offset << 1), digits1 | (digits2 << 32)); digits1 = LOAD(lutbuf, b1); digits2 = LOAD(lutbuf, b2); offset -= 4; - store(buffer + (offset << 1), digits1 | (digits2 << 32), STRING_HEADER_SIZE); + store(buffer + (offset << 1), digits1 | (digits2 << 32)); } utoa32_lut(buffer, num, offset); @@ -236,7 +239,7 @@ function utoa_simple(buffer: usize, num: T, offset: usize): void { let r = (num % 10); num = t; offset -= 1; - store(buffer + (offset << 1), CharCode._0 + r, STRING_HEADER_SIZE); + store(buffer + (offset << 1), CharCode._0 + r); } while (num); } @@ -262,10 +265,10 @@ export function utoa32(value: u32): String { if (!value) return "0"; var decimals = decimalCount32(value); - var buffer = allocateUnsafeString(decimals); + var out = ALLOC(decimals << 1); - utoa32_core(changetype(buffer), value, decimals); - return buffer; + utoa32_core(changetype(out), value, decimals); + return REGISTER(out); } export function itoa32(value: i32): String { @@ -275,29 +278,29 @@ export function itoa32(value: i32): String { if (sign) value = -value; var decimals = decimalCount32(value) + sign; - var buffer = allocateUnsafeString(decimals); + var out = ALLOC(decimals << 1); - utoa32_core(changetype(buffer), value, decimals); - if (sign) store(changetype(buffer), CharCode.MINUS, STRING_HEADER_SIZE); + utoa32_core(changetype(out), value, decimals); + if (sign) store(changetype(out), CharCode.MINUS); - return buffer; + return REGISTER(out); } export function utoa64(value: u64): String { if (!value) return "0"; - var buffer: String; + var out: usize; if (value <= u32.MAX_VALUE) { let val32 = value; let decimals = decimalCount32(val32); - buffer = allocateUnsafeString(decimals); - utoa32_core(changetype(buffer), val32, decimals); + out = ALLOC(decimals << 1); + utoa32_core(out, val32, decimals); } else { let decimals = decimalCount64(value); - buffer = allocateUnsafeString(decimals); - utoa64_core(changetype(buffer), value, decimals); + out = ALLOC(decimals << 1); + utoa64_core(changetype(out), value, decimals); } - return buffer; + return REGISTER(out); } export function itoa64(value: i64): String { @@ -306,20 +309,20 @@ export function itoa64(value: i64): String { var sign = value < 0; if (sign) value = -value; - var buffer: String; + var out: usize; if (value <= u32.MAX_VALUE) { let val32 = value; let decimals = decimalCount32(val32) + sign; - buffer = allocateUnsafeString(decimals); - utoa32_core(changetype(buffer), val32, decimals); + out = ALLOC(decimals << 1); + utoa32_core(changetype(out), val32, decimals); } else { let decimals = decimalCount64(value) + sign; - buffer = allocateUnsafeString(decimals); - utoa64_core(changetype(buffer), value, decimals); + out = ALLOC(decimals << 1); + utoa64_core(changetype(out), value, decimals); } - if (sign) store(changetype(buffer), CharCode.MINUS, STRING_HEADER_SIZE); + if (sign) store(changetype(out), CharCode.MINUS); - return buffer; + return REGISTER(out); } export function itoa(value: T): String { @@ -393,7 +396,7 @@ function normalizedBoundaries(f: u64, e: i32): void { @inline function grisuRound(buffer: usize, len: i32, delta: u64, rest: u64, ten_kappa: u64, wp_w: u64): void { var lastp = buffer + ((len - 1) << 1); - var digit = load(lastp, STRING_HEADER_SIZE); + var digit = load(lastp); while ( rest < wp_w && delta - rest >= ten_kappa && ( @@ -404,7 +407,7 @@ function grisuRound(buffer: usize, len: i32, delta: u64, rest: u64, ten_kappa: u --digit; rest += ten_kappa; } - store(lastp, digit, STRING_HEADER_SIZE); + store(lastp, digit); } @inline @@ -487,7 +490,7 @@ function genDigits(buffer: usize, w_frc: u64, w_exp: i32, mp_frc: u64, mp_exp: i default: { d = 0; break; } } - if (d | len) store(buffer + (len++ << 1), CharCode._0 + d, STRING_HEADER_SIZE); + if (d | len) store(buffer + (len++ << 1), CharCode._0 + d); --kappa; let tmp = ((p1) << one_exp) + p2; @@ -503,7 +506,7 @@ function genDigits(buffer: usize, w_frc: u64, w_exp: i32, mp_frc: u64, mp_exp: i delta *= 10; let d = p2 >> one_exp; - if (d | len) store(buffer + (len++ << 1), CharCode._0 + d, STRING_HEADER_SIZE); + if (d | len) store(buffer + (len++ << 1), CharCode._0 + d); p2 &= mask; --kappa; @@ -524,13 +527,13 @@ function genExponent(buffer: usize, k: i32): i32 { if (sign) k = -k; var decimals = decimalCount32(k) + 1; utoa32_core(buffer, k, decimals); - store(buffer, select(CharCode.MINUS, CharCode.PLUS, sign), STRING_HEADER_SIZE); + store(buffer, select(CharCode.MINUS, CharCode.PLUS, sign)); return decimals; } function prettify(buffer: usize, length: i32, k: i32): i32 { if (!k) { - store(buffer + (length << 1), CharCode.DOT | (CharCode._0 << 16), STRING_HEADER_SIZE); + store(buffer + (length << 1), CharCode.DOT | (CharCode._0 << 16)); return length + 2; } @@ -538,47 +541,47 @@ function prettify(buffer: usize, length: i32, k: i32): i32 { if (length <= kk && kk <= 21) { // 1234e7 -> 12340000000 for (let i = length; i < kk; ++i) { - store(buffer + (i << 1), CharCode._0, STRING_HEADER_SIZE); + store(buffer + (i << 1), CharCode._0); } - store(buffer + (kk << 1), CharCode.DOT | (CharCode._0 << 16), STRING_HEADER_SIZE); + store(buffer + (kk << 1), CharCode.DOT | (CharCode._0 << 16)); return kk + 2; } else if (kk > 0 && kk <= 21) { // 1234e-2 -> 12.34 let ptr = buffer + (kk << 1); memory.copy( - ptr + STRING_HEADER_SIZE + 2, - ptr + STRING_HEADER_SIZE, + ptr + 2, + ptr, -k << 1 ); - store(buffer + (kk << 1), CharCode.DOT, STRING_HEADER_SIZE); + store(buffer + (kk << 1), CharCode.DOT); return length + 1; } else if (-6 < kk && kk <= 0) { // 1234e-6 -> 0.001234 let offset = 2 - kk; memory.copy( - buffer + STRING_HEADER_SIZE + (offset << 1), - buffer + STRING_HEADER_SIZE, + buffer + (offset << 1), + buffer, length << 1 ); - store(buffer, CharCode._0 | (CharCode.DOT << 16), STRING_HEADER_SIZE); + store(buffer, CharCode._0 | (CharCode.DOT << 16)); for (let i = 2; i < offset; ++i) { - store(buffer + (i << 1), CharCode._0, STRING_HEADER_SIZE); + store(buffer + (i << 1), CharCode._0); } return length + offset; } else if (length == 1) { // 1e30 - store(buffer, CharCode.e, STRING_HEADER_SIZE + 2); + store(buffer, CharCode.e, 2); length = genExponent(buffer + 4, kk - 1); return length + 2; } else { let len = length << 1; memory.copy( - buffer + STRING_HEADER_SIZE + 4, - buffer + STRING_HEADER_SIZE + 2, + buffer + 4, + buffer + 2, len - 2 ); - store(buffer, CharCode.DOT, STRING_HEADER_SIZE + 2); - store(buffer + len, CharCode.e, STRING_HEADER_SIZE + 2); + store(buffer, CharCode.DOT, 2); + store(buffer + len, CharCode.e, 2); length += genExponent(buffer + len + 4, kk - 1); return length + 2; } @@ -588,7 +591,7 @@ export function dtoa_core(buffer: usize, value: f64): i32 { var sign = (value < 0); if (sign) { value = -value; - store(buffer, CharCode.MINUS, STRING_HEADER_SIZE); + store(buffer, CharCode.MINUS); } // assert(value > 0 && value <= 1.7976931348623157e308); var len = grisu2(value, buffer, sign); @@ -602,17 +605,17 @@ export function dtoa(value: f64): String { if (isNaN(value)) return "NaN"; return select("-Infinity", "Infinity", value < 0); } - var buffer = allocateUnsafeString(MAX_DOUBLE_LENGTH); - var length = dtoa_core(changetype(buffer), value); - var result = buffer.substring(0, length); - freeUnsafeString(buffer); + var temp = ALLOC(MAX_DOUBLE_LENGTH << 1); + var length = dtoa_core(temp, value); + var result = changetype(temp).substring(0, length); + FREE(temp); return result; } export function itoa_stream(buffer: usize, offset: usize, value: T): u32 { buffer += (offset << 1); if (!value) { - store(buffer, CharCode._0, STRING_HEADER_SIZE); + store(buffer, CharCode._0); return 1; } var decimals: u32 = 0; @@ -632,7 +635,7 @@ export function itoa_stream(buffer: usize, offset: usize, value: T): u32 { utoa64_core(buffer, value, decimals); } } - if (sign) store(buffer, CharCode.MINUS, STRING_HEADER_SIZE); + if (sign) store(buffer, CharCode.MINUS); } else { if (sizeof() <= 4) { decimals = decimalCount32(value); @@ -654,22 +657,22 @@ export function itoa_stream(buffer: usize, offset: usize, value: T): u32 { export function dtoa_stream(buffer: usize, offset: usize, value: f64): u32 { buffer += (offset << 1); if (value == 0.0) { - store(buffer, CharCode._0, STRING_HEADER_SIZE + 0); - store(buffer, CharCode.DOT, STRING_HEADER_SIZE + 2); - store(buffer, CharCode._0, STRING_HEADER_SIZE + 4); + store(buffer, CharCode._0); + store(buffer, CharCode.DOT, 2); + store(buffer, CharCode._0, 4); return 3; } if (!isFinite(value)) { if (isNaN(value)) { - store(buffer, CharCode.N, STRING_HEADER_SIZE + 0); - store(buffer, CharCode.a, STRING_HEADER_SIZE + 2); - store(buffer, CharCode.N, STRING_HEADER_SIZE + 4); + store(buffer, CharCode.N); + store(buffer, CharCode.a, 2); + store(buffer, CharCode.N, 4); return 3; } else { let sign = (value < 0); let len = 8 + sign; let source = changetype(select("-Infinity", "Infinity", sign)); - memory.copy(buffer + STRING_HEADER_SIZE, source + STRING_HEADER_SIZE, len << 1); + memory.copy(buffer, source, len << 1); return len; } } diff --git a/std/assembly/string.ts b/std/assembly/string.ts index bc74f1700b..2a3a71f920 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -333,7 +333,7 @@ export class String extends StringBase { var padLen = padString.length; if (targetLength < length || !padLen) return this; var len = targetLength - length; - var out = ALLOC(targetLength); + var out = ALLOC(targetLength << 1); if (length) { memory.copy(out, changetype(this), length << 1); } @@ -356,13 +356,13 @@ export class String extends StringBase { var length = this.length; // Most browsers can't handle strings 1 << 28 chars or longer - if (count < 0 || length * count > (1 << 28)) { + if (count < 0 || length * count > (1 << 28)) { throw new RangeError("Invalid count value"); } if (count == 0 || !length) return changetype(""); if (count == 1) return this; - var out = ALLOC(length * count); + var out = ALLOC((length * count) << 1); memory.repeat(out, changetype(this), length << 1, count); return REGISTER(out); } @@ -373,7 +373,7 @@ export class String extends StringBase { var end = endIndex < 0 ? max(endIndex + len, 0) : min(endIndex, len); len = end - begin; if (len <= 0) return changetype(""); - var out = ALLOC(len); + var out = ALLOC(len << 1); memory.copy(out, changetype(this) + (begin << 1), len << 1); return REGISTER(out); } diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 24507556f4..4f9252e620 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1,11 +1,10 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 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$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiiii (func (param i32 i32 i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$di (func (param i32) (result f64))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) @@ -13,170 +12,171 @@ (type $FUNCSIG$iid (func (param i32 f64) (result i32))) (type $FUNCSIG$iijijiji (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00h\00i\00,\00 \00I\00\'\00m\00 \00a\00 \00s\00t\00r\00i\00n\00g") - (data (i32.const 48) "\0d\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 80) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 112) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 168) "\01") - (data (i32.const 176) "\01\00\00\006") - (data (i32.const 184) "\02\00\00\004\d8\06\df") - (data (i32.const 192) "\02\00\00\00h\00i") - (data (i32.const 200) "\04\00\00\00n\00u\00l\00l") - (data (i32.const 216) "\06\00\00\00s\00t\00r\00i\00n\00g") - (data (i32.const 232) "\03\00\00\00I\00\'\00m") - (data (i32.const 248) "\01\00\00\00 ") - (data (i32.const 264) "\03\00\00\00 \00 \00 ") - (data (i32.const 280) "\01\00\00\00a") - (data (i32.const 288) "\03\00\00\00a\00b\00c") - (data (i32.const 304) "\05\00\00\00 \00 \00a\00b\00c") - (data (i32.const 320) "\03\00\00\001\002\003") - (data (i32.const 336) "\06\00\00\001\002\003\00a\00b\00c") - (data (i32.const 352) "\08\00\00\001\002\003\001\002\00a\00b\00c") - (data (i32.const 376) "\05\00\00\00a\00b\00c\00 \00 ") - (data (i32.const 392) "\06\00\00\00a\00b\00c\00a\00b\00c") - (data (i32.const 408) "\08\00\00\00a\00b\00c\00a\00b\00c\00a\00b") - (data (i32.const 432) "\01\00\00\00,") - (data (i32.const 440) "\01\00\00\00x") - (data (i32.const 448) "\03\00\00\00,\00 \00I") - (data (i32.const 464) "\01\00\00\00g") - (data (i32.const 472) "\01\00\00\00i") - (data (i32.const 480) "\01\00\00\000") - (data (i32.const 488) "\01\00\00\001") - (data (i32.const 496) "\05\00\00\000\00b\001\000\001") - (data (i32.const 512) "\05\00\00\000\00o\007\000\007") - (data (i32.const 528) "\05\00\00\000\00x\00f\000\00f") - (data (i32.const 544) "\05\00\00\000\00x\00F\000\00F") - (data (i32.const 560) "\03\00\00\000\001\001") - (data (i32.const 576) "\04\00\00\000\00x\001\00g") - (data (i32.const 592) "\03\00\00\000\00.\001") - (data (i32.const 608) "\03\00\00\00.\002\005") - (data (i32.const 624) "\08\00\00\00.\001\00f\00o\00o\00b\00a\00r") - (data (i32.const 648) "\01\00\00\00b") - (data (i32.const 656) "\02\00\00\00a\00b") - (data (i32.const 664) "\04\00\00\00k\00e\00y\001") - (data (i32.const 680) "\04\00\00\00k\00e\00y\002") - (data (i32.const 696) "\03\00\00\00k\00e\001") - (data (i32.const 712) "\03\00\00\00k\00e\002") - (data (i32.const 728) "\05\00\00\00k\00e\00y\001\002") - (data (i32.const 744) "\05\00\00\00k\00e\00y\001\001") - (data (i32.const 760) "\07\00\00\00\a40\ed0\cf0\cb0\db0\d80\c80") - (data (i32.const 784) "\07\00\00\00\a60\f00\ce0\aa0\af0\e40\de0") - (data (i32.const 808) "\0b\00\00\00D\00\19 f\00h\00u\00a\00s\00c\00a\00i\00l") - (data (i32.const 840) "\n\00\00\00D\00\19 \1f\1eu\00a\00s\00c\00a\00i\00l") - (data (i32.const 864) "\02\00\00\00b\00a") - (data (i32.const 872) "\02\00\00\00a\00a") - (data (i32.const 880) "\03\00\00\00a\00a\00a") - (data (i32.const 896) "\08\00\00\00a\00b\00a\00b\00a\00b\00a\00b") - (data (i32.const 920) "\05\00\00\00a\00a\00a\00a\00a") - (data (i32.const 936) "\06\00\00\00a\00a\00a\00a\00a\00a") - (data (i32.const 952) "\07\00\00\00a\00a\00a\00a\00a\00a\00a") - (data (i32.const 976) "\0e\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n") - (data (i32.const 1008) "\01\00\00\00n") - (data (i32.const 1016) "\05\00\00\00j\00k\00l\00m\00n") - (data (i32.const 1032) "\05\00\00\00c\00d\00e\00f\00g") - (data (i32.const 1048) "\05\00\00\00d\00e\00f\00g\00h") - (data (i32.const 1064) "\0d\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m") - (data (i32.const 1096) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1128) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 1192) "\05\00\00\00a\00,\00b\00,\00c") - (data (i32.const 1208) "\01\00\00\00.") - (data (i32.const 1216) "\01\00\00\00c") - (data (i32.const 1224) "\07\00\00\00a\00,\00 \00b\00,\00 \00c") - (data (i32.const 1248) "\02\00\00\00,\00 ") - (data (i32.const 1256) "\06\00\00\00a\00,\00b\00,\00,\00c") - (data (i32.const 1272) "\06\00\00\00,\00a\00,\00b\00,\00c") - (data (i32.const 1288) "\06\00\00\00a\00,\00b\00,\00c\00,") - (data (i32.const 1304) "\90\01\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 1816) "\18\05\00\00d") - (data (i32.const 1824) "\01\00\00\008") - (data (i32.const 1832) "\05\00\00\00-\001\000\000\000") - (data (i32.const 1848) "\04\00\00\001\002\003\004") - (data (i32.const 1864) "\05\00\00\001\002\003\004\005") - (data (i32.const 1880) "\06\00\00\001\002\003\004\005\006") - (data (i32.const 1896) "\07\00\00\001\001\001\001\001\001\001") - (data (i32.const 1920) "\07\00\00\001\002\003\004\005\006\007") - (data (i32.const 1944) "\n\00\00\002\001\004\007\004\008\003\006\004\006") - (data (i32.const 1968) "\n\00\00\002\001\004\007\004\008\003\006\004\007") - (data (i32.const 1992) "\0b\00\00\00-\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 2024) "\02\00\00\00-\001") - (data (i32.const 2032) "\04\00\00\001\000\000\000") - (data (i32.const 2048) "\n\00\00\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 2072) "\n\00\00\004\002\009\004\009\006\007\002\009\005") - (data (i32.const 2096) "\08\00\00\009\009\009\009\009\009\009\009") - (data (i32.const 2120) "\t\00\00\001\000\000\000\000\000\000\000\000") - (data (i32.const 2144) "\0b\00\00\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2176) "\0c\00\00\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2208) "\0f\00\00\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2248) "\10\00\00\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2288) "\11\00\00\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2328) "\14\00\00\001\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005") - (data (i32.const 2376) "\05\00\00\00-\001\002\003\004") - (data (i32.const 2392) "\0b\00\00\00-\004\002\009\004\009\006\007\002\009\005") - (data (i32.const 2424) "\0c\00\00\00-\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2456) "\0d\00\00\00-\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2488) "\10\00\00\00-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2528) "\12\00\00\00-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2568) "\13\00\00\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007") - (data (i32.const 2616) "\14\00\00\00-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008") - (data (i32.const 2664) "\03\00\00\000\00.\000") - (data (i32.const 2680) "\03\00\00\00N\00a\00N") - (data (i32.const 2696) "\t\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 2720) "\08\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 2744) "\b8\02\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8 (; 21 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/internal/string/parse (; 22 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2256,7 +2404,11 @@ (local $5 f64) (local $6 f64) local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $3 i32.eqz if @@ -2265,7 +2417,7 @@ end local.get $0 local.tee $2 - i32.load16_u offset=4 + i32.load16_u local.tee $1 i32.const 45 i32.eq @@ -2283,7 +2435,7 @@ i32.const 2 i32.add local.tee $2 - i32.load16_u offset=4 + i32.load16_u local.set $1 f64.const -1 else @@ -2304,7 +2456,7 @@ i32.const 2 i32.add local.tee $2 - i32.load16_u offset=4 + i32.load16_u local.set $1 end f64.const 1 @@ -2314,13 +2466,13 @@ i32.const 48 i32.eq local.tee $0 - if (result i32) + if local.get $3 i32.const 2 i32.gt_s - else - local.get $0 + local.set $0 end + local.get $0 if (result i32) block $break|0 (result i32) block $case6|0 @@ -2330,7 +2482,7 @@ local.get $2 i32.const 2 i32.add - i32.load16_u offset=4 + i32.load16_u local.tee $0 i32.const 66 i32.eq @@ -2406,18 +2558,18 @@ local.get $0 if local.get $2 - i32.load16_u offset=4 + i32.load16_u local.tee $1 i32.const 48 i32.ge_s local.tee $0 - if (result i32) + if local.get $1 i32.const 57 i32.le_s - else - local.get $0 + local.set $0 end + local.get $0 if (result i32) local.get $1 i32.const 48 @@ -2427,13 +2579,13 @@ i32.const 65 i32.ge_s local.tee $0 - if (result i32) + if local.get $1 i32.const 90 i32.le_s - else - local.get $0 + local.set $0 end + local.get $0 if (result i32) local.get $1 i32.const 55 @@ -2443,13 +2595,13 @@ i32.const 97 i32.ge_s local.tee $0 - if (result i32) + if local.get $1 i32.const 122 i32.le_s - else - local.get $0 + local.set $0 end + local.get $0 i32.eqz br_if $break|1 local.get $1 @@ -2481,7 +2633,7 @@ local.get $5 f64.mul ) - (func $~lib/string/parseFloat (; 22 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 23 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2489,7 +2641,11 @@ (local $5 f64) (local $6 f64) local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $3 i32.eqz if @@ -2498,7 +2654,7 @@ end local.get $0 local.tee $1 - i32.load16_u offset=4 + i32.load16_u local.tee $2 i32.const 45 i32.eq @@ -2516,7 +2672,7 @@ i32.const 2 i32.add local.tee $1 - i32.load16_u offset=4 + i32.load16_u drop f64.const -1 else @@ -2537,7 +2693,7 @@ i32.const 2 i32.add local.tee $1 - i32.load16_u offset=4 + i32.load16_u drop end f64.const 1 @@ -2553,7 +2709,7 @@ local.get $0 if local.get $1 - i32.load16_u offset=4 + i32.load16_u local.tee $2 i32.const 46 i32.eq @@ -2574,23 +2730,22 @@ local.get $0 if local.get $1 - i32.load16_u offset=4 + i32.load16_u local.tee $2 i32.const 69 i32.eq local.tee $0 - i32.eqz - if + if (result i32) + local.get $0 + else local.get $2 i32.const 101 i32.eq - local.set $0 end - local.get $0 if i32.const 0 - i32.const 80 - i32.const 625 + i32.const 96 + i32.const 597 i32.const 10 call $~lib/env/abort unreachable @@ -2649,7 +2804,7 @@ local.get $4 f64.mul ) - (func $~lib/string/String#concat (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2657,89 +2812,113 @@ i32.eqz if i32.const 0 - i32.const 80 - i32.const 110 + i32.const 96 + i32.const 97 i32.const 4 call $~lib/env/abort unreachable end - local.get $0 - i32.load - local.tee $3 local.get $1 - i32.const 200 + i32.const 240 local.get $1 select local.tee $1 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl local.tee $4 + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $3 i32.add local.tee $2 i32.eqz if - i32.const 256 + i32.const 312 return end local.get $2 - call $~lib/internal/string/allocateUnsafe + call $~lib/runtime/ALLOC local.tee $2 - i32.const 0 local.get $0 - i32.const 0 local.get $3 - call $~lib/internal/string/copyUnsafe + call $~lib/internal/memory/memmove local.get $2 local.get $3 + i32.add local.get $1 - i32.const 0 local.get $4 - call $~lib/internal/string/copyUnsafe + call $~lib/internal/memory/memmove + local.get $2 + call $~lib/runtime/unref + i32.const 1 + i32.store local.get $2 ) - (func $~lib/string/String.__concat (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 200 + i32.const 240 local.get $0 select local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.__ne (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.ne (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 - call $~lib/string/String.__eq + call $~lib/string/String.eq i32.eqz ) - (func $~lib/string/String.__gt (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gt (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - local.get $0 - local.get $1 - i32.eq - local.tee $2 - i32.eqz - if + block (result i32) local.get $0 + local.get $1 + i32.eq + local.tee $2 + i32.eqz + if + local.get $0 + i32.eqz + local.set $2 + end + local.get $2 i32.eqz - local.set $2 end - local.get $2 - i32.eqz - if + if (result i32) local.get $1 i32.eqz - local.set $2 + else + local.get $2 end - local.get $2 if i32.const 0 return end local.get $1 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.set $3 local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $2 i32.eqz if @@ -2761,40 +2940,50 @@ local.get $3 i32.lt_s select - call $~lib/internal/string/compareUnsafe + call $~lib/string/compareImpl i32.const 0 i32.gt_s ) - (func $~lib/string/String.__lt (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.lt (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - local.get $0 - local.get $1 - i32.eq - local.tee $2 - i32.eqz - if + block (result i32) local.get $0 + local.get $1 + i32.eq + local.tee $2 + i32.eqz + if + local.get $0 + i32.eqz + local.set $2 + end + local.get $2 i32.eqz - local.set $2 end - local.get $2 - i32.eqz - if + if (result i32) local.get $1 i32.eqz - local.set $2 + else + local.get $2 end - local.get $2 if i32.const 0 return end local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.set $2 local.get $1 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $3 i32.eqz if @@ -2816,56 +3005,61 @@ local.get $3 i32.lt_s select - call $~lib/internal/string/compareUnsafe + call $~lib/string/compareImpl i32.const 0 i32.lt_s ) - (func $~lib/string/String.__gte (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gte (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 - call $~lib/string/String.__lt + call $~lib/string/String.lt i32.eqz ) - (func $~lib/string/String.__lte (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 256 + (func $~lib/string/String.lte (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 312 local.get $0 - call $~lib/string/String.__gt + call $~lib/string/String.gt i32.eqz ) - (func $~lib/string/String#repeat (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 i32.eqz if i32.const 0 - i32.const 80 - i32.const 380 + i32.const 96 + i32.const 355 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.set $3 local.get $1 i32.const 0 i32.lt_s local.tee $2 - i32.eqz - if - local.get $1 + if (result i32) + local.get $2 + else local.get $3 - i32.mul - i32.const 268435456 - i32.gt_s - local.set $2 + i64.extend_i32_s + local.get $1 + i64.extend_i32_s + i64.mul + i64.const 268435456 + i64.gt_u end - local.get $2 if i32.const 0 - i32.const 80 - i32.const 385 + i32.const 96 + i32.const 360 i32.const 6 call $~lib/env/abort unreachable @@ -2873,15 +3067,14 @@ local.get $1 i32.eqz local.tee $2 - i32.eqz - if + if (result i32) + local.get $2 + else local.get $3 i32.eqz - local.set $2 end - local.get $2 if - i32.const 256 + i32.const 312 return end local.get $1 @@ -2894,19 +3087,31 @@ local.get $1 local.get $3 i32.mul - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC local.tee $2 - i32.const 0 local.get $0 + local.get $3 + i32.const 1 + i32.shl local.get $1 - call $~lib/internal/string/repeatUnsafe + call $~lib/runtime/memory.repeat + local.get $2 + call $~lib/runtime/unref + i32.const 1 + i32.store local.get $2 ) - (func $~lib/string/String#slice (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.set $3 local.get $1 i32.const 0 @@ -2954,288 +3159,78 @@ end local.get $4 i32.sub - local.tee $3 - i32.const 0 - i32.le_s - if - i32.const 256 - return - end - local.get $3 - call $~lib/internal/string/allocateUnsafe - local.tee $1 - i32.const 0 - local.get $0 - local.get $4 - local.get $3 - call $~lib/internal/string/copyUnsafe - local.get $1 - ) - (func $~lib/string/String#slice|trampoline (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 2147483647 - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/string/String#slice - ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 1128 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - i32.const 1 - i32.const 32 - local.get $0 - i32.const 7 - i32.add - i32.clz - i32.sub - i32.shl - call $~lib/allocator/arena/__memory_allocate - local.tee $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/internal/memory/memset (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $1 - i32.eqz - if - return - end - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $2 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - local.get $0 - i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $1 - local.get $0 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 24 - i32.le_u + local.tee $3 + i32.const 0 + i32.le_s if + i32.const 312 return end + local.get $3 + i32.const 1 + i32.shl + local.tee $1 + call $~lib/runtime/ALLOC + local.tee $2 + local.get $4 + i32.const 1 + i32.shl 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 + call $~lib/internal/memory/memmove local.get $2 - i32.const 24 - i32.sub - i32.const 0 + call $~lib/runtime/unref + i32.const 1 i32.store local.get $2 - i32.const 20 - i32.sub - i32.const 0 - i32.store + ) + (func $~lib/string/String#slice|trampoline (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 2147483647 + local.set $2 + end + local.get $0 + local.get $1 local.get $2 - i32.const 16 - i32.sub - i32.const 0 - i32.store + call $~lib/string/String#slice + ) + (func $~lib/internal/arraybuffer/allocateUnsafe (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $2 + i32.const 1073741816 + i32.gt_u + if + i32.const 0 + i32.const 1432 + i32.const 26 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 1 + i32.const 32 local.get $0 + i32.const 7 i32.add - local.set $0 - local.get $1 - local.get $2 + i32.clz 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 + i32.shl + call $~lib/allocator/arena/memory.allocate + local.tee $1 + local.get $0 + i32.store + local.get $1 ) (func $~lib/array/Array#constructor (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -3246,7 +3241,7 @@ i32.gt_u if i32.const 0 - i32.const 1096 + i32.const 1392 i32.const 45 i32.const 39 call $~lib/env/abort @@ -3259,7 +3254,7 @@ call $~lib/internal/arraybuffer/allocateUnsafe local.set $2 i32.const 8 - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/memory.allocate local.tee $1 i32.const 0 i32.store @@ -3293,7 +3288,7 @@ i32.gt_s if i32.const 0 - i32.const 1128 + i32.const 1432 i32.const 40 i32.const 4 call $~lib/env/abort @@ -3348,7 +3343,7 @@ i32.lt_s if i32.const 0 - i32.const 1128 + i32.const 1432 i32.const 62 i32.const 4 call $~lib/env/abort @@ -3385,7 +3380,7 @@ i32.ge_u if i32.const 0 - i32.const 1096 + i32.const 1392 i32.const 182 i32.const 42 call $~lib/env/abort @@ -3424,8 +3419,8 @@ i32.eqz if i32.const 0 - i32.const 80 - i32.const 408 + i32.const 96 + i32.const 382 i32.const 4 call $~lib/env/abort unreachable @@ -3450,7 +3445,11 @@ return end local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.set $4 i32.const 2147483647 local.get $2 @@ -3459,10 +3458,16 @@ i32.lt_s select local.set $2 + local.get $1 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.tee $3 + local.set $9 block $folding-inner0 - local.get $1 - i32.load - local.tee $9 + local.get $3 if local.get $4 i32.eqz @@ -3471,7 +3476,7 @@ call $~lib/array/Array#constructor local.tee $3 i32.load - i32.const 256 + i32.const 312 i32.store offset=8 br $folding-inner0 end @@ -3494,7 +3499,7 @@ call $~lib/array/Array#constructor local.tee $3 i32.load - local.set $5 + local.set $7 i32.const 0 local.set $2 loop $repeat|0 @@ -3502,20 +3507,20 @@ local.get $4 i32.lt_s if - i32.const 1 - call $~lib/internal/string/allocateUnsafe + i32.const 2 + call $~lib/runtime/ALLOC local.tee $1 local.get $2 i32.const 1 i32.shl local.get $0 i32.add - i32.load16_u offset=4 - i32.store16 offset=4 + i32.load16_u + i32.store16 local.get $2 i32.const 2 i32.shl - local.get $5 + local.get $7 i32.add local.get $1 i32.store offset=8 @@ -3531,37 +3536,46 @@ end i32.const 0 call $~lib/array/Array#constructor - local.set $6 + local.set $5 loop $continue|1 local.get $0 local.get $1 - local.get $7 + local.get $6 call $~lib/string/String#indexOf local.tee $8 i32.const -1 i32.ne if local.get $8 - local.get $7 + local.get $6 i32.sub - local.tee $5 + local.tee $7 i32.const 0 i32.gt_s if - local.get $5 - call $~lib/internal/string/allocateUnsafe + local.get $7 + i32.const 1 + i32.shl + local.tee $7 + call $~lib/runtime/ALLOC local.tee $3 - i32.const 0 + local.get $6 + i32.const 1 + i32.shl local.get $0 + i32.add local.get $7 + call $~lib/internal/memory/memmove + local.get $3 + call $~lib/runtime/unref + i32.const 1 + i32.store local.get $5 - call $~lib/internal/string/copyUnsafe - local.get $6 local.get $3 call $~lib/array/Array#push else - local.get $6 - i32.const 256 + local.get $5 + i32.const 312 call $~lib/array/Array#push end local.get $10 @@ -3571,17 +3585,17 @@ local.get $2 i32.eq if - local.get $6 + local.get $5 return end local.get $8 local.get $9 i32.add - local.set $7 + local.set $6 br $continue|1 end end - local.get $7 + local.get $6 i32.eqz if i32.const 1 @@ -3593,29 +3607,38 @@ br $folding-inner0 end local.get $4 - local.get $7 + local.get $6 i32.sub local.tee $1 i32.const 0 i32.gt_s if local.get $1 - call $~lib/internal/string/allocateUnsafe - local.tee $5 - i32.const 0 + i32.const 1 + i32.shl + local.tee $1 + call $~lib/runtime/ALLOC + local.tee $3 + local.get $6 + i32.const 1 + i32.shl local.get $0 - local.get $7 + i32.add local.get $1 - call $~lib/internal/string/copyUnsafe - local.get $6 + call $~lib/internal/memory/memmove + local.get $3 + call $~lib/runtime/unref + i32.const 1 + i32.store local.get $5 + local.get $3 call $~lib/array/Array#push else - local.get $6 - i32.const 256 + local.get $5 + i32.const 312 call $~lib/array/Array#push end - local.get $6 + local.get $5 return end local.get $3 @@ -3703,7 +3726,7 @@ (func $~lib/internal/number/utoa32_lut (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - i32.const 1816 + i32.const 2168 i32.load local.set $3 loop $continue|0 @@ -3746,7 +3769,7 @@ i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store br $continue|0 end end @@ -3776,7 +3799,7 @@ i32.shl i32.add i32.load offset=8 - i32.store offset=4 + i32.store end local.get $1 i32.const 10 @@ -3795,7 +3818,7 @@ i32.shl i32.add i32.load offset=8 - i32.store offset=4 + i32.store else local.get $2 i32.const 1 @@ -3807,7 +3830,7 @@ local.get $1 i32.const 48 i32.add - i32.store16 offset=4 + i32.store16 end ) (func $~lib/internal/number/itoa32 (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -3817,13 +3840,13 @@ local.get $0 i32.eqz if - i32.const 480 + i32.const 608 return end local.get $0 i32.const 0 i32.lt_s - local.tee $1 + local.tee $2 if i32.const 0 local.get $0 @@ -3832,21 +3855,27 @@ end local.get $0 call $~lib/internal/number/decimalCount32 - local.get $1 + local.get $2 i32.add local.tee $3 - call $~lib/internal/string/allocateUnsafe - local.tee $2 + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC + local.tee $1 local.get $0 local.get $3 call $~lib/internal/number/utoa32_lut - local.get $1 + local.get $2 if - local.get $2 + local.get $1 i32.const 45 - i32.store16 offset=4 + i32.store16 end - local.get $2 + local.get $1 + call $~lib/runtime/unref + i32.const 1 + i32.store + local.get $1 ) (func $~lib/internal/number/utoa32 (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -3854,18 +3883,24 @@ local.get $0 i32.eqz if - i32.const 480 + i32.const 608 return end local.get $0 call $~lib/internal/number/decimalCount32 - local.tee $1 - call $~lib/internal/string/allocateUnsafe local.tee $2 + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC + local.tee $1 local.get $0 - local.get $1 - call $~lib/internal/number/utoa32_lut local.get $2 + call $~lib/internal/number/utoa32_lut + local.get $1 + call $~lib/runtime/unref + i32.const 1 + i32.store + local.get $1 ) (func $~lib/internal/number/decimalCount64 (; 44 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 @@ -3926,7 +3961,7 @@ (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 1816 + i32.const 2168 i32.load local.set $3 loop $continue|0 @@ -3984,7 +4019,7 @@ i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store local.get $2 i32.const 4 i32.sub @@ -4008,7 +4043,7 @@ i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store br $continue|0 end end @@ -4025,7 +4060,7 @@ local.get $0 i64.eqz if - i32.const 480 + i32.const 608 return end local.get $0 @@ -4037,7 +4072,9 @@ local.tee $3 call $~lib/internal/number/decimalCount32 local.tee $1 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC local.tee $2 local.get $3 local.get $1 @@ -4046,13 +4083,20 @@ local.get $0 call $~lib/internal/number/decimalCount64 local.tee $1 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC local.tee $2 local.get $0 local.get $1 call $~lib/internal/number/utoa64_lut end local.get $2 + local.tee $1 + call $~lib/runtime/unref + i32.const 1 + i32.store + local.get $1 ) (func $~lib/internal/number/itoa64 (; 47 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) @@ -4062,14 +4106,14 @@ local.get $0 i64.eqz if - i32.const 480 + i32.const 608 return end block (result i32) local.get $0 i64.const 0 i64.lt_s - local.tee $1 + local.tee $2 if i64.const 0 local.get $0 @@ -4085,33 +4129,42 @@ i32.wrap_i64 local.tee $4 call $~lib/internal/number/decimalCount32 - local.get $1 + local.get $2 i32.add - local.tee $2 - call $~lib/internal/string/allocateUnsafe + local.tee $1 + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC local.tee $3 local.get $4 - local.get $2 + local.get $1 call $~lib/internal/number/utoa32_lut else local.get $0 call $~lib/internal/number/decimalCount64 - local.get $1 + local.get $2 i32.add - local.tee $2 - call $~lib/internal/string/allocateUnsafe + local.tee $1 + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC local.tee $3 local.get $0 - local.get $2 + local.get $1 call $~lib/internal/number/utoa64_lut end - local.get $1 + local.get $2 if local.get $3 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $3 + local.tee $1 + call $~lib/runtime/unref + i32.const 1 + i32.store + local.get $1 ) (func $~lib/internal/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) @@ -4148,7 +4201,7 @@ local.tee $7 call $~lib/internal/number/decimalCount32 local.set $8 - i32.const 4104 + i32.const 4576 i32.load local.set $12 loop $continue|0 @@ -4295,7 +4348,7 @@ i32.and i32.const 48 i32.add - i32.store16 offset=4 + i32.store16 end local.get $8 i32.const 1 @@ -4341,7 +4394,7 @@ local.get $0 i32.add local.tee $2 - i32.load16_u offset=4 + i32.load16_u local.set $6 loop $continue|2 local.get $1 @@ -4393,7 +4446,7 @@ end local.get $2 local.get $6 - i32.store16 offset=4 + i32.store16 local.get $7 return end @@ -4435,7 +4488,7 @@ i32.and i32.const 48 i32.add - i32.store16 offset=4 + i32.store16 end local.get $8 i32.const 1 @@ -4475,7 +4528,7 @@ local.get $0 i32.add local.tee $4 - i32.load16_u offset=4 + i32.load16_u local.set $7 loop $continue|4 local.get $3 @@ -4527,7 +4580,7 @@ end local.get $4 local.get $7 - i32.store16 offset=4 + i32.store16 local.get $6 end ) @@ -4543,7 +4596,7 @@ local.get $0 i32.add i32.const 3145774 - i32.store offset=4 + i32.store local.get $1 i32.const 2 i32.add @@ -4578,7 +4631,7 @@ local.get $0 i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $4 i32.const 1 i32.add @@ -4592,7 +4645,7 @@ local.get $0 i32.add i32.const 3145774 - i32.store offset=4 + i32.store local.get $3 i32.const 2 i32.add @@ -4614,8 +4667,6 @@ i32.shl local.get $0 i32.add - i32.const 4 - i32.add local.tee $4 i32.const 2 i32.add @@ -4632,7 +4683,7 @@ local.get $0 i32.add i32.const 46 - i32.store16 offset=4 + i32.store16 local.get $1 i32.const 1 i32.add @@ -4649,25 +4700,22 @@ end local.get $4 if (result i32) - local.get $0 - i32.const 4 - i32.add - local.tee $2 i32.const 2 local.get $3 i32.sub local.tee $4 i32.const 1 i32.shl + local.get $0 i32.add - local.get $2 + local.get $0 local.get $1 i32.const 1 i32.shl call $~lib/internal/memory/memmove local.get $0 i32.const 3014704 - i32.store offset=4 + i32.store i32.const 2 local.set $3 loop $repeat|1 @@ -4682,7 +4730,7 @@ local.get $0 i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $3 i32.const 1 i32.add @@ -4700,7 +4748,7 @@ if (result i32) local.get $0 i32.const 101 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 4 i32.add @@ -4732,7 +4780,7 @@ i32.const 43 local.get $0 select - i32.store16 offset=4 + i32.store16 local.get $2 i32.const 2 i32.add @@ -4740,10 +4788,7 @@ local.get $0 i32.const 4 i32.add - local.tee $2 - i32.const 4 - i32.add - local.get $2 + local.get $0 i32.const 2 i32.add local.get $1 @@ -4755,13 +4800,13 @@ call $~lib/internal/memory/memmove local.get $0 i32.const 46 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 local.get $2 i32.add local.tee $0 i32.const 101 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 4 i32.add @@ -4793,7 +4838,7 @@ i32.const 43 local.get $0 select - i32.store16 offset=4 + i32.store16 local.get $1 local.get $2 i32.add @@ -4826,7 +4871,7 @@ if (result f64) local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 local.get $1 f64.neg else @@ -4925,10 +4970,10 @@ local.tee $14 i32.sub global.set $~lib/internal/number/_K - i32.const 4032 + i32.const 4504 i32.load local.set $7 - i32.const 3768 + i32.const 4240 i32.load local.get $14 i32.add @@ -5127,8 +5172,8 @@ i32.eqz if i32.const 0 - i32.const 80 - i32.const 249 + i32.const 96 + i32.const 215 i32.const 4 call $~lib/env/abort unreachable @@ -5141,7 +5186,11 @@ select local.tee $2 local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $3 local.get $2 local.get $3 @@ -5160,6 +5209,8 @@ local.get $1 i32.lt_s select + i32.const 1 + i32.shl local.set $4 local.get $2 local.get $1 @@ -5167,38 +5218,50 @@ local.get $1 i32.gt_s select + i32.const 1 + i32.shl local.tee $1 local.get $4 i32.sub local.tee $3 i32.eqz if - i32.const 256 + i32.const 312 return end local.get $4 i32.eqz local.tee $2 - if (result i32) + if local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl local.get $1 i32.eq - else - local.get $2 + local.set $2 end + local.get $2 if local.get $0 return end local.get $3 - call $~lib/internal/string/allocateUnsafe + call $~lib/runtime/ALLOC local.tee $2 - i32.const 0 local.get $0 local.get $4 + i32.add local.get $3 - call $~lib/internal/string/copyUnsafe + call $~lib/internal/memory/memmove + local.get $2 + call $~lib/runtime/unref + i32.const 1 + i32.store local.get $2 ) (func $~lib/internal/number/dtoa (; 52 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) @@ -5208,7 +5271,7 @@ f64.const 0 f64.eq if - i32.const 2664 + i32.const 3136 return end local.get $0 @@ -5221,19 +5284,19 @@ local.get $0 f64.ne if - i32.const 2680 + i32.const 3152 return end - i32.const 2696 - i32.const 2720 + i32.const 3168 + i32.const 3200 local.get $0 f64.const 0 f64.lt select return end - i32.const 28 - call $~lib/internal/string/allocateUnsafe + i32.const 56 + call $~lib/runtime/ALLOC local.tee $2 local.get $0 call $~lib/internal/number/dtoa_core @@ -5243,42 +5306,39 @@ call $~lib/string/String#substring local.set $1 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 112 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/unref + drop local.get $1 ) (func $start:std/string (; 53 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - i32.const 5360 + i32.const 6008 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset global.get $std/string/str - i32.const 8 + i32.const 16 i32.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 16 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u i32.const 16 i32.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 18 i32.const 0 call $~lib/env/abort @@ -5290,7 +5350,7 @@ i32.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 19 i32.const 0 call $~lib/env/abort @@ -5298,12 +5358,12 @@ end i32.const 0 call $~lib/string/String.fromCharCode - i32.const 168 - call $~lib/string/String.__eq + i32.const 176 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 21 i32.const 0 call $~lib/env/abort @@ -5311,12 +5371,12 @@ end i32.const 54 call $~lib/string/String.fromCharCode - i32.const 176 - call $~lib/string/String.__eq + i32.const 192 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 22 i32.const 0 call $~lib/env/abort @@ -5324,12 +5384,12 @@ end i32.const 65590 call $~lib/string/String.fromCharCode - i32.const 176 - call $~lib/string/String.__eq + i32.const 192 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 23 i32.const 0 call $~lib/env/abort @@ -5337,12 +5397,12 @@ end i32.const 0 call $~lib/string/String.fromCodePoint - i32.const 168 - call $~lib/string/String.__eq + i32.const 176 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 25 i32.const 0 call $~lib/env/abort @@ -5350,12 +5410,12 @@ end i32.const 54 call $~lib/string/String.fromCodePoint - i32.const 176 - call $~lib/string/String.__eq + i32.const 192 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 26 i32.const 0 call $~lib/env/abort @@ -5365,8 +5425,8 @@ call $~lib/string/String.fromCodePoint i32.eqz if - i32.const 184 - i32.const 48 + i32.const 208 + i32.const 56 i32.const 27 i32.const 0 call $~lib/env/abort @@ -5377,7 +5437,7 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 29 i32.const 0 call $~lib/env/abort @@ -5397,7 +5457,7 @@ end unreachable end - i32.const 536870910 + i32.const 536870908 local.set $0 end local.get $1 @@ -5406,21 +5466,21 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 30 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 232 + i32.const 280 i32.const 0 call $~lib/string/String#indexOf i32.const -1 i32.eq if i32.const 0 - i32.const 48 + i32.const 56 i32.const 31 i32.const 0 call $~lib/env/abort @@ -5432,11 +5492,11 @@ i32.const 0 call $~lib/string/String#padStart|trampoline global.get $std/string/str - call $~lib/string/String.__eq + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 33 i32.const 0 call $~lib/env/abort @@ -5448,11 +5508,11 @@ i32.const 15 call $~lib/string/String#padStart|trampoline global.get $std/string/str - call $~lib/string/String.__eq + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 34 i32.const 0 call $~lib/env/abort @@ -5460,45 +5520,45 @@ end i32.const 1 global.set $~lib/argc - i32.const 256 + i32.const 312 i32.const 3 call $~lib/string/String#padStart|trampoline - i32.const 264 - call $~lib/string/String.__eq + i32.const 320 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 35 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 + i32.const 312 i32.const 10 - i32.const 256 + i32.const 312 call $~lib/string/String#padStart - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 36 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 + i32.const 336 i32.const 100 - i32.const 256 + i32.const 312 call $~lib/string/String#padStart - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 37 i32.const 0 call $~lib/env/abort @@ -5506,45 +5566,45 @@ end i32.const 1 global.set $~lib/argc - i32.const 288 + i32.const 352 i32.const 5 call $~lib/string/String#padStart|trampoline - i32.const 304 - call $~lib/string/String.__eq + i32.const 368 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 38 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 + i32.const 352 i32.const 6 - i32.const 320 + i32.const 392 call $~lib/string/String#padStart - i32.const 336 - call $~lib/string/String.__eq + i32.const 408 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 39 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 + i32.const 352 i32.const 8 - i32.const 320 + i32.const 392 call $~lib/string/String#padStart - i32.const 352 - call $~lib/string/String.__eq + i32.const 432 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 40 i32.const 0 call $~lib/env/abort @@ -5556,11 +5616,11 @@ i32.const 0 call $~lib/string/String#padEnd|trampoline global.get $std/string/str - call $~lib/string/String.__eq + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 42 i32.const 0 call $~lib/env/abort @@ -5572,11 +5632,11 @@ i32.const 15 call $~lib/string/String#padEnd|trampoline global.get $std/string/str - call $~lib/string/String.__eq + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 43 i32.const 0 call $~lib/env/abort @@ -5584,45 +5644,45 @@ end i32.const 1 global.set $~lib/argc - i32.const 256 + i32.const 312 i32.const 3 call $~lib/string/String#padEnd|trampoline - i32.const 264 - call $~lib/string/String.__eq + i32.const 320 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 44 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 + i32.const 312 i32.const 10 - i32.const 256 + i32.const 312 call $~lib/string/String#padEnd - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 45 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 + i32.const 336 i32.const 100 - i32.const 256 + i32.const 312 call $~lib/string/String#padEnd - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 46 i32.const 0 call $~lib/env/abort @@ -5630,83 +5690,83 @@ end i32.const 1 global.set $~lib/argc - i32.const 288 + i32.const 352 i32.const 5 call $~lib/string/String#padEnd|trampoline - i32.const 376 - call $~lib/string/String.__eq + i32.const 456 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 47 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 + i32.const 352 i32.const 6 - i32.const 288 + i32.const 352 call $~lib/string/String#padEnd - i32.const 392 - call $~lib/string/String.__eq + i32.const 480 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 48 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 + i32.const 352 i32.const 8 - i32.const 288 + i32.const 352 call $~lib/string/String#padEnd - i32.const 408 - call $~lib/string/String.__eq + i32.const 504 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 49 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 - i32.const 256 + i32.const 312 + i32.const 312 i32.const 0 call $~lib/string/String#indexOf if i32.const 0 - i32.const 48 + i32.const 56 i32.const 51 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 - i32.const 192 + i32.const 312 + i32.const 224 i32.const 0 call $~lib/string/String#indexOf i32.const -1 i32.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 52 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 - i32.const 280 + i32.const 336 + i32.const 336 i32.const 0 call $~lib/string/String#indexOf if i32.const 0 - i32.const 48 + i32.const 56 i32.const 53 i32.const 0 call $~lib/env/abort @@ -5719,89 +5779,89 @@ call $~lib/string/String#indexOf if i32.const 0 - i32.const 48 + i32.const 56 i32.const 54 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 256 + i32.const 312 i32.const 0 call $~lib/string/String#indexOf if i32.const 0 - i32.const 48 + i32.const 56 i32.const 55 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 528 i32.const 0 call $~lib/string/String#indexOf i32.const 2 i32.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 56 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 440 + i32.const 544 i32.const 0 call $~lib/string/String#indexOf i32.const -1 i32.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 57 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 528 i32.const 2 call $~lib/string/String#indexOf i32.const 2 i32.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 58 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 528 i32.const 3 call $~lib/string/String#indexOf i32.const -1 i32.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 59 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 448 + i32.const 560 i32.const -1 call $~lib/string/String#indexOf i32.const 2 i32.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 60 i32.const 0 call $~lib/env/abort @@ -5809,12 +5869,12 @@ end i32.const 1 global.set $~lib/argc - i32.const 256 - i32.const 256 + i32.const 312 + i32.const 312 call $~lib/string/String#lastIndexOf|trampoline if i32.const 0 - i32.const 48 + i32.const 56 i32.const 62 i32.const 0 call $~lib/env/abort @@ -5822,14 +5882,14 @@ end i32.const 1 global.set $~lib/argc - i32.const 256 - i32.const 192 + i32.const 312 + i32.const 224 call $~lib/string/String#lastIndexOf|trampoline i32.const -1 i32.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 63 i32.const 0 call $~lib/env/abort @@ -5838,14 +5898,18 @@ i32.const 1 global.set $~lib/argc global.get $std/string/str - i32.const 256 + i32.const 312 call $~lib/string/String#lastIndexOf|trampoline global.get $std/string/str - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u i32.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 64 i32.const 0 call $~lib/env/abort @@ -5854,13 +5918,13 @@ i32.const 1 global.set $~lib/argc global.get $std/string/str - i32.const 432 + i32.const 528 call $~lib/string/String#lastIndexOf|trampoline i32.const 2 i32.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 65 i32.const 0 call $~lib/env/abort @@ -5869,13 +5933,13 @@ i32.const 1 global.set $~lib/argc global.get $std/string/str - i32.const 440 + i32.const 544 call $~lib/string/String#lastIndexOf|trampoline i32.const -1 i32.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 66 i32.const 0 call $~lib/env/abort @@ -5884,604 +5948,604 @@ i32.const 1 global.set $~lib/argc global.get $std/string/str - i32.const 464 + i32.const 576 call $~lib/string/String#lastIndexOf|trampoline i32.const 15 i32.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 67 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 528 i32.const 2 call $~lib/string/String#lastIndexOf i32.const 2 i32.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 68 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 528 i32.const 3 call $~lib/string/String#lastIndexOf i32.const 2 i32.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 69 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 448 + i32.const 560 i32.const -1 call $~lib/string/String#lastIndexOf i32.const -1 i32.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 70 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 472 + i32.const 592 i32.const 0 call $~lib/string/String#lastIndexOf i32.const -1 i32.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 71 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 192 + i32.const 224 i32.const 0 call $~lib/string/String#lastIndexOf if i32.const 0 - i32.const 48 + i32.const 56 i32.const 72 i32.const 0 call $~lib/env/abort unreachable end - i32.const 480 + i32.const 608 call $~lib/internal/string/parse f64.const 0 f64.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 78 i32.const 0 call $~lib/env/abort unreachable end - i32.const 488 + i32.const 624 call $~lib/internal/string/parse f64.const 1 f64.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 79 i32.const 0 call $~lib/env/abort unreachable end - i32.const 496 + i32.const 640 call $~lib/internal/string/parse f64.const 5 f64.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 80 i32.const 0 call $~lib/env/abort unreachable end - i32.const 512 + i32.const 664 call $~lib/internal/string/parse f64.const 455 f64.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 81 i32.const 0 call $~lib/env/abort unreachable end - i32.const 528 + i32.const 688 call $~lib/internal/string/parse f64.const 3855 f64.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 82 i32.const 0 call $~lib/env/abort unreachable end - i32.const 544 + i32.const 712 call $~lib/internal/string/parse f64.const 3855 f64.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 83 i32.const 0 call $~lib/env/abort unreachable end - i32.const 560 + i32.const 736 call $~lib/internal/string/parse f64.const 11 f64.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 84 i32.const 0 call $~lib/env/abort unreachable end - i32.const 576 + i32.const 752 call $~lib/internal/string/parse f64.const 1 f64.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 85 i32.const 0 call $~lib/env/abort unreachable end - i32.const 480 + i32.const 608 call $~lib/string/parseFloat f64.const 0 f64.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 87 i32.const 0 call $~lib/env/abort unreachable end - i32.const 488 + i32.const 624 call $~lib/string/parseFloat f64.const 1 f64.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 88 i32.const 0 call $~lib/env/abort unreachable end - i32.const 592 + i32.const 768 call $~lib/string/parseFloat f64.const 0.1 f64.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 89 i32.const 0 call $~lib/env/abort unreachable end - i32.const 608 + i32.const 784 call $~lib/string/parseFloat f64.const 0.25 f64.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 90 i32.const 0 call $~lib/env/abort unreachable end - i32.const 624 + i32.const 800 call $~lib/string/parseFloat f64.const 0.1 f64.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 91 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 - i32.const 648 - call $~lib/string/String.__concat + i32.const 336 + i32.const 824 + call $~lib/string/String.concat global.set $std/string/c global.get $std/string/c - i32.const 656 - call $~lib/string/String.__eq + i32.const 840 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 94 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/c - i32.const 280 - call $~lib/string/String.__ne + i32.const 336 + call $~lib/string/String.ne i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 95 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + i32.const 312 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 96 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 + i32.const 312 global.get $std/string/nullStr - call $~lib/string/String.__ne + call $~lib/string/String.ne i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 97 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/nullStr - i32.const 256 - call $~lib/string/String.__ne + i32.const 312 + call $~lib/string/String.ne i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 98 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 - i32.const 648 - call $~lib/string/String.__ne + i32.const 336 + i32.const 824 + call $~lib/string/String.ne i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 99 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + i32.const 336 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 100 i32.const 0 call $~lib/env/abort unreachable end - i32.const 664 - i32.const 680 - call $~lib/string/String.__ne + i32.const 856 + i32.const 872 + call $~lib/string/String.ne i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 101 i32.const 0 call $~lib/env/abort unreachable end - i32.const 664 - i32.const 664 - call $~lib/string/String.__eq + i32.const 856 + i32.const 856 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 102 i32.const 0 call $~lib/env/abort unreachable end - i32.const 696 - i32.const 712 - call $~lib/string/String.__ne + i32.const 888 + i32.const 904 + call $~lib/string/String.ne i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 103 i32.const 0 call $~lib/env/abort unreachable end - i32.const 728 - i32.const 744 - call $~lib/string/String.__ne + i32.const 920 + i32.const 944 + call $~lib/string/String.ne i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 104 i32.const 0 call $~lib/env/abort unreachable end - i32.const 760 - i32.const 760 - call $~lib/string/String.__eq + i32.const 968 + i32.const 968 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 105 i32.const 0 call $~lib/env/abort unreachable end - i32.const 760 - i32.const 784 - call $~lib/string/String.__ne + i32.const 968 + i32.const 992 + call $~lib/string/String.ne i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 106 i32.const 0 call $~lib/env/abort unreachable end - i32.const 808 - i32.const 840 - call $~lib/string/String.__ne + i32.const 1016 + i32.const 1048 + call $~lib/string/String.ne i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 107 i32.const 0 call $~lib/env/abort unreachable end - i32.const 648 - i32.const 280 - call $~lib/string/String.__gt + i32.const 824 + i32.const 336 + call $~lib/string/String.gt i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 109 i32.const 0 call $~lib/env/abort unreachable end - i32.const 864 - i32.const 280 - call $~lib/string/String.__gt + i32.const 1080 + i32.const 336 + call $~lib/string/String.gt i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 110 i32.const 0 call $~lib/env/abort unreachable end - i32.const 864 - i32.const 872 - call $~lib/string/String.__gte + i32.const 1080 + i32.const 1096 + call $~lib/string/String.gte i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 111 i32.const 0 call $~lib/env/abort unreachable end - i32.const 864 - i32.const 656 - call $~lib/string/String.__gt + i32.const 1080 + i32.const 840 + call $~lib/string/String.gt i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 112 i32.const 0 call $~lib/env/abort unreachable end - i32.const 864 - i32.const 656 - call $~lib/string/String.__lt + i32.const 1080 + i32.const 840 + call $~lib/string/String.lt if i32.const 0 - i32.const 48 + i32.const 56 i32.const 113 i32.const 0 call $~lib/env/abort unreachable end - i32.const 648 + i32.const 824 global.get $std/string/nullStr - call $~lib/string/String.__lt + call $~lib/string/String.lt if i32.const 0 - i32.const 48 + i32.const 56 i32.const 115 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/nullStr - i32.const 648 - call $~lib/string/String.__lt + i32.const 824 + call $~lib/string/String.lt if i32.const 0 - i32.const 48 + i32.const 56 i32.const 116 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 - i32.const 256 - call $~lib/string/String.__gt + i32.const 352 + i32.const 312 + call $~lib/string/String.gt i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 118 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 - i32.const 288 - call $~lib/string/String.__lt + i32.const 312 + i32.const 352 + call $~lib/string/String.lt i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 119 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 - i32.const 256 - call $~lib/string/String.__gte + i32.const 352 + i32.const 312 + call $~lib/string/String.gte i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 120 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 - call $~lib/string/String.__lte + i32.const 352 + call $~lib/string/String.lte i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 121 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 - i32.const 256 - call $~lib/string/String.__lt + i32.const 352 + i32.const 312 + call $~lib/string/String.lt if i32.const 0 - i32.const 48 + i32.const 56 i32.const 122 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 - i32.const 288 - call $~lib/string/String.__gt + i32.const 312 + i32.const 352 + call $~lib/string/String.gt if i32.const 0 - i32.const 48 + i32.const 56 i32.const 123 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 - i32.const 256 - call $~lib/string/String.__lt + i32.const 312 + i32.const 312 + call $~lib/string/String.lt if i32.const 0 - i32.const 48 + i32.const 56 i32.const 124 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 - i32.const 256 - call $~lib/string/String.__gt + i32.const 312 + i32.const 312 + call $~lib/string/String.gt if i32.const 0 - i32.const 48 + i32.const 56 i32.const 125 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 - i32.const 256 - call $~lib/string/String.__gte + i32.const 312 + i32.const 312 + call $~lib/string/String.gte i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 126 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 - call $~lib/string/String.__lte + i32.const 312 + call $~lib/string/String.lte i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 127 i32.const 0 call $~lib/env/abort @@ -6494,171 +6558,173 @@ call $~lib/string/String.fromCodePoint i32.const 56322 call $~lib/string/String.fromCodePoint - call $~lib/string/String.__concat + call $~lib/string/String.concat global.set $std/string/b global.get $std/string/a global.get $std/string/b - call $~lib/string/String.__gt + call $~lib/string/String.gt i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 131 i32.const 0 call $~lib/env/abort unreachable end - i32.const 320 + i32.const 388 i32.load + i32.const 1 + i32.shr_u i32.const 3 i32.ne if i32.const 0 - i32.const 48 + i32.const 56 i32.const 133 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 + i32.const 312 i32.const 100 call $~lib/string/String#repeat - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 135 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 + i32.const 336 i32.const 0 call $~lib/string/String#repeat - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 136 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 + i32.const 336 i32.const 1 call $~lib/string/String#repeat - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 137 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 + i32.const 336 i32.const 2 call $~lib/string/String#repeat - i32.const 872 - call $~lib/string/String.__eq + i32.const 1096 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 138 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 + i32.const 336 i32.const 3 call $~lib/string/String#repeat - i32.const 880 - call $~lib/string/String.__eq + i32.const 1112 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 139 i32.const 0 call $~lib/env/abort unreachable end - i32.const 656 + i32.const 840 i32.const 4 call $~lib/string/String#repeat - i32.const 896 - call $~lib/string/String.__eq + i32.const 1128 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 140 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 + i32.const 336 i32.const 5 call $~lib/string/String#repeat - i32.const 920 - call $~lib/string/String.__eq + i32.const 1152 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 141 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 + i32.const 336 i32.const 6 call $~lib/string/String#repeat - i32.const 936 - call $~lib/string/String.__eq + i32.const 1176 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 142 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 + i32.const 336 i32.const 7 call $~lib/string/String#repeat - i32.const 952 - call $~lib/string/String.__eq + i32.const 1200 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 143 i32.const 0 call $~lib/env/abort unreachable end - i32.const 976 + i32.const 1224 global.set $std/string/str i32.const 1 global.set $~lib/argc global.get $std/string/str i32.const 0 call $~lib/string/String#slice|trampoline - i32.const 976 - call $~lib/string/String.__eq + i32.const 1224 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 147 i32.const 0 call $~lib/env/abort @@ -6669,12 +6735,12 @@ global.get $std/string/str i32.const -1 call $~lib/string/String#slice|trampoline - i32.const 1008 - call $~lib/string/String.__eq + i32.const 1264 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 148 i32.const 0 call $~lib/env/abort @@ -6685,12 +6751,12 @@ global.get $std/string/str i32.const -5 call $~lib/string/String#slice|trampoline - i32.const 1016 - call $~lib/string/String.__eq + i32.const 1280 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 149 i32.const 0 call $~lib/env/abort @@ -6700,12 +6766,12 @@ i32.const 2 i32.const 7 call $~lib/string/String#slice - i32.const 1032 - call $~lib/string/String.__eq + i32.const 1304 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 150 i32.const 0 call $~lib/env/abort @@ -6715,12 +6781,12 @@ i32.const -11 i32.const -6 call $~lib/string/String#slice - i32.const 1048 - call $~lib/string/String.__eq + i32.const 1328 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 151 i32.const 0 call $~lib/env/abort @@ -6730,12 +6796,12 @@ i32.const 4 i32.const 3 call $~lib/string/String#slice - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 152 i32.const 0 call $~lib/env/abort @@ -6745,12 +6811,12 @@ i32.const 0 i32.const -1 call $~lib/string/String#slice - i32.const 1064 - call $~lib/string/String.__eq + i32.const 1352 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 153 i32.const 0 call $~lib/env/abort @@ -6758,7 +6824,7 @@ end i32.const 0 global.set $~lib/argc - i32.const 256 + i32.const 312 i32.const 0 call $~lib/string/String#split|trampoline global.set $std/string/sa @@ -6782,15 +6848,15 @@ else unreachable end - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq else local.get $0 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 158 i32.const 0 call $~lib/env/abort @@ -6798,15 +6864,15 @@ end i32.const 1 global.set $~lib/argc - i32.const 256 - i32.const 256 + i32.const 312 + i32.const 312 call $~lib/string/String#split|trampoline global.set $std/string/sa global.get $std/string/sa i32.load offset=4 if i32.const 0 - i32.const 48 + i32.const 56 i32.const 160 i32.const 0 call $~lib/env/abort @@ -6814,8 +6880,8 @@ end i32.const 1 global.set $~lib/argc - i32.const 256 - i32.const 432 + i32.const 312 + i32.const 528 call $~lib/string/String#split|trampoline global.set $std/string/sa global.get $std/string/sa @@ -6838,15 +6904,15 @@ else unreachable end - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq else local.get $0 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 162 i32.const 0 call $~lib/env/abort @@ -6854,8 +6920,8 @@ end i32.const 1 global.set $~lib/argc - i32.const 1192 - i32.const 1208 + i32.const 1496 + i32.const 1520 call $~lib/string/String#split|trampoline global.set $std/string/sa global.get $std/string/sa @@ -6878,15 +6944,15 @@ else unreachable end - i32.const 1192 - call $~lib/string/String.__eq + i32.const 1496 + call $~lib/string/String.eq else local.get $0 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 164 i32.const 0 call $~lib/env/abort @@ -6894,8 +6960,8 @@ end i32.const 1 global.set $~lib/argc - i32.const 1192 - i32.const 432 + i32.const 1496 + i32.const 528 call $~lib/string/String#split|trampoline global.set $std/string/sa block (result i32) @@ -6920,8 +6986,8 @@ else unreachable end - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -6943,8 +7009,8 @@ else unreachable end - i32.const 648 - call $~lib/string/String.__eq + i32.const 824 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -6966,15 +7032,15 @@ else unreachable end - i32.const 1216 - call $~lib/string/String.__eq + i32.const 1536 + call $~lib/string/String.eq else local.get $0 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 166 i32.const 0 call $~lib/env/abort @@ -6982,8 +7048,8 @@ end i32.const 1 global.set $~lib/argc - i32.const 1224 - i32.const 1248 + i32.const 1552 + i32.const 1576 call $~lib/string/String#split|trampoline global.set $std/string/sa block (result i32) @@ -7008,8 +7074,8 @@ else unreachable end - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -7031,8 +7097,8 @@ else unreachable end - i32.const 648 - call $~lib/string/String.__eq + i32.const 824 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -7054,15 +7120,15 @@ else unreachable end - i32.const 1216 - call $~lib/string/String.__eq + i32.const 1536 + call $~lib/string/String.eq else local.get $0 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 168 i32.const 0 call $~lib/env/abort @@ -7070,8 +7136,8 @@ end i32.const 1 global.set $~lib/argc - i32.const 1256 - i32.const 432 + i32.const 1592 + i32.const 528 call $~lib/string/String#split|trampoline global.set $std/string/sa block (result i32) @@ -7097,8 +7163,8 @@ else unreachable end - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -7120,8 +7186,8 @@ else unreachable end - i32.const 648 - call $~lib/string/String.__eq + i32.const 824 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -7143,8 +7209,8 @@ else unreachable end - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -7166,15 +7232,15 @@ else unreachable end - i32.const 1216 - call $~lib/string/String.__eq + i32.const 1536 + call $~lib/string/String.eq else local.get $0 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 170 i32.const 0 call $~lib/env/abort @@ -7182,8 +7248,8 @@ end i32.const 1 global.set $~lib/argc - i32.const 1272 - i32.const 432 + i32.const 1616 + i32.const 528 call $~lib/string/String#split|trampoline global.set $std/string/sa block (result i32) @@ -7209,8 +7275,8 @@ else unreachable end - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -7232,8 +7298,8 @@ else unreachable end - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -7255,8 +7321,8 @@ else unreachable end - i32.const 648 - call $~lib/string/String.__eq + i32.const 824 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -7278,15 +7344,15 @@ else unreachable end - i32.const 1216 - call $~lib/string/String.__eq + i32.const 1536 + call $~lib/string/String.eq else local.get $0 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 172 i32.const 0 call $~lib/env/abort @@ -7294,8 +7360,8 @@ end i32.const 1 global.set $~lib/argc - i32.const 1288 - i32.const 432 + i32.const 1640 + i32.const 528 call $~lib/string/String#split|trampoline global.set $std/string/sa block (result i32) @@ -7321,8 +7387,8 @@ else unreachable end - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -7344,8 +7410,8 @@ else unreachable end - i32.const 648 - call $~lib/string/String.__eq + i32.const 824 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -7367,8 +7433,8 @@ else unreachable end - i32.const 1216 - call $~lib/string/String.__eq + i32.const 1536 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -7390,15 +7456,15 @@ else unreachable end - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq else local.get $0 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 174 i32.const 0 call $~lib/env/abort @@ -7406,8 +7472,8 @@ end i32.const 1 global.set $~lib/argc - i32.const 288 - i32.const 256 + i32.const 352 + i32.const 312 call $~lib/string/String#split|trampoline global.set $std/string/sa block (result i32) @@ -7432,8 +7498,8 @@ else unreachable end - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -7455,8 +7521,8 @@ else unreachable end - i32.const 648 - call $~lib/string/String.__eq + i32.const 824 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -7478,22 +7544,22 @@ else unreachable end - i32.const 1216 - call $~lib/string/String.__eq + i32.const 1536 + call $~lib/string/String.eq else local.get $0 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 176 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 - i32.const 256 + i32.const 352 + i32.const 312 i32.const 0 call $~lib/string/String#split global.set $std/string/sa @@ -7501,14 +7567,14 @@ i32.load offset=4 if i32.const 0 - i32.const 48 + i32.const 56 i32.const 178 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 - i32.const 256 + i32.const 352 + i32.const 312 i32.const 1 call $~lib/string/String#split global.set $std/string/sa @@ -7532,22 +7598,22 @@ else unreachable end - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq else local.get $0 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 180 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1192 - i32.const 432 + i32.const 1496 + i32.const 528 i32.const 1 call $~lib/string/String#split global.set $std/string/sa @@ -7571,22 +7637,22 @@ else unreachable end - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq else local.get $0 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 182 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 - i32.const 256 + i32.const 352 + i32.const 312 i32.const 4 call $~lib/string/String#split global.set $std/string/sa @@ -7612,8 +7678,8 @@ else unreachable end - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -7635,8 +7701,8 @@ else unreachable end - i32.const 648 - call $~lib/string/String.__eq + i32.const 824 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -7658,22 +7724,22 @@ else unreachable end - i32.const 1216 - call $~lib/string/String.__eq + i32.const 1536 + call $~lib/string/String.eq else local.get $0 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 184 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 - i32.const 256 + i32.const 352 + i32.const 312 i32.const -1 call $~lib/string/String#split global.set $std/string/sa @@ -7699,8 +7765,8 @@ else unreachable end - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -7722,8 +7788,8 @@ else unreachable end - i32.const 648 - call $~lib/string/String.__eq + i32.const 824 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -7745,22 +7811,22 @@ else unreachable end - i32.const 1216 - call $~lib/string/String.__eq + i32.const 1536 + call $~lib/string/String.eq else local.get $0 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 186 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1192 - i32.const 432 + i32.const 1496 + i32.const 528 i32.const -1 call $~lib/string/String#split global.set $std/string/sa @@ -7786,8 +7852,8 @@ else unreachable end - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -7809,8 +7875,8 @@ else unreachable end - i32.const 648 - call $~lib/string/String.__eq + i32.const 824 + call $~lib/string/String.eq local.set $0 end local.get $0 @@ -7832,15 +7898,15 @@ else unreachable end - i32.const 1216 - call $~lib/string/String.__eq + i32.const 1536 + call $~lib/string/String.eq else local.get $0 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 188 i32.const 0 call $~lib/env/abort @@ -7848,12 +7914,12 @@ end i32.const 0 call $~lib/internal/number/itoa32 - i32.const 480 - call $~lib/string/String.__eq + i32.const 608 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 190 i32.const 0 call $~lib/env/abort @@ -7861,12 +7927,12 @@ end i32.const 1 call $~lib/internal/number/itoa32 - i32.const 488 - call $~lib/string/String.__eq + i32.const 624 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 191 i32.const 0 call $~lib/env/abort @@ -7874,12 +7940,12 @@ end i32.const 8 call $~lib/internal/number/itoa32 - i32.const 1824 - call $~lib/string/String.__eq + i32.const 2184 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 192 i32.const 0 call $~lib/env/abort @@ -7887,12 +7953,12 @@ end i32.const 123 call $~lib/internal/number/itoa32 - i32.const 320 - call $~lib/string/String.__eq + i32.const 392 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 193 i32.const 0 call $~lib/env/abort @@ -7900,12 +7966,12 @@ end i32.const -1000 call $~lib/internal/number/itoa32 - i32.const 1832 - call $~lib/string/String.__eq + i32.const 2200 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 194 i32.const 0 call $~lib/env/abort @@ -7913,12 +7979,12 @@ end i32.const 1234 call $~lib/internal/number/itoa32 - i32.const 1848 - call $~lib/string/String.__eq + i32.const 2224 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 195 i32.const 0 call $~lib/env/abort @@ -7926,12 +7992,12 @@ end i32.const 12345 call $~lib/internal/number/itoa32 - i32.const 1864 - call $~lib/string/String.__eq + i32.const 2240 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 196 i32.const 0 call $~lib/env/abort @@ -7939,12 +8005,12 @@ end i32.const 123456 call $~lib/internal/number/itoa32 - i32.const 1880 - call $~lib/string/String.__eq + i32.const 2264 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 197 i32.const 0 call $~lib/env/abort @@ -7952,12 +8018,12 @@ end i32.const 1111111 call $~lib/internal/number/itoa32 - i32.const 1896 - call $~lib/string/String.__eq + i32.const 2288 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 198 i32.const 0 call $~lib/env/abort @@ -7965,12 +8031,12 @@ end i32.const 1234567 call $~lib/internal/number/itoa32 - i32.const 1920 - call $~lib/string/String.__eq + i32.const 2312 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 199 i32.const 0 call $~lib/env/abort @@ -7978,12 +8044,12 @@ end i32.const 2147483646 call $~lib/internal/number/itoa32 - i32.const 1944 - call $~lib/string/String.__eq + i32.const 2336 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 200 i32.const 0 call $~lib/env/abort @@ -7991,12 +8057,12 @@ end i32.const 2147483647 call $~lib/internal/number/itoa32 - i32.const 1968 - call $~lib/string/String.__eq + i32.const 2368 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 201 i32.const 0 call $~lib/env/abort @@ -8004,12 +8070,12 @@ end i32.const -2147483648 call $~lib/internal/number/itoa32 - i32.const 1992 - call $~lib/string/String.__eq + i32.const 2400 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 202 i32.const 0 call $~lib/env/abort @@ -8017,12 +8083,12 @@ end i32.const -1 call $~lib/internal/number/itoa32 - i32.const 2024 - call $~lib/string/String.__eq + i32.const 2432 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 203 i32.const 0 call $~lib/env/abort @@ -8030,12 +8096,12 @@ end i32.const 0 call $~lib/internal/number/utoa32 - i32.const 480 - call $~lib/string/String.__eq + i32.const 608 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 205 i32.const 0 call $~lib/env/abort @@ -8043,12 +8109,12 @@ end i32.const 1000 call $~lib/internal/number/utoa32 - i32.const 2032 - call $~lib/string/String.__eq + i32.const 2448 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 206 i32.const 0 call $~lib/env/abort @@ -8056,12 +8122,12 @@ end i32.const 2147483647 call $~lib/internal/number/utoa32 - i32.const 1968 - call $~lib/string/String.__eq + i32.const 2368 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 207 i32.const 0 call $~lib/env/abort @@ -8069,12 +8135,12 @@ end i32.const -2147483648 call $~lib/internal/number/utoa32 - i32.const 2048 - call $~lib/string/String.__eq + i32.const 2464 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 208 i32.const 0 call $~lib/env/abort @@ -8082,12 +8148,12 @@ end i32.const -1 call $~lib/internal/number/utoa32 - i32.const 2072 - call $~lib/string/String.__eq + i32.const 2496 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 209 i32.const 0 call $~lib/env/abort @@ -8095,12 +8161,12 @@ end i64.const 0 call $~lib/internal/number/utoa64 - i32.const 480 - call $~lib/string/String.__eq + i32.const 608 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 211 i32.const 0 call $~lib/env/abort @@ -8108,12 +8174,12 @@ end i64.const 1234 call $~lib/internal/number/utoa64 - i32.const 1848 - call $~lib/string/String.__eq + i32.const 2224 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 212 i32.const 0 call $~lib/env/abort @@ -8121,12 +8187,12 @@ end i64.const 99999999 call $~lib/internal/number/utoa64 - i32.const 2096 - call $~lib/string/String.__eq + i32.const 2528 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 213 i32.const 0 call $~lib/env/abort @@ -8134,12 +8200,12 @@ end i64.const 100000000 call $~lib/internal/number/utoa64 - i32.const 2120 - call $~lib/string/String.__eq + i32.const 2552 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 214 i32.const 0 call $~lib/env/abort @@ -8147,12 +8213,12 @@ end i64.const 4294967295 call $~lib/internal/number/utoa64 - i32.const 2072 - call $~lib/string/String.__eq + i32.const 2496 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 215 i32.const 0 call $~lib/env/abort @@ -8160,12 +8226,12 @@ end i64.const 68719476735 call $~lib/internal/number/utoa64 - i32.const 2144 - call $~lib/string/String.__eq + i32.const 2584 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 216 i32.const 0 call $~lib/env/abort @@ -8173,12 +8239,12 @@ end i64.const 868719476735 call $~lib/internal/number/utoa64 - i32.const 2176 - call $~lib/string/String.__eq + i32.const 2616 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 217 i32.const 0 call $~lib/env/abort @@ -8186,12 +8252,12 @@ end i64.const 999868719476735 call $~lib/internal/number/utoa64 - i32.const 2208 - call $~lib/string/String.__eq + i32.const 2648 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 218 i32.const 0 call $~lib/env/abort @@ -8199,12 +8265,12 @@ end i64.const 9999868719476735 call $~lib/internal/number/utoa64 - i32.const 2248 - call $~lib/string/String.__eq + i32.const 2688 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 219 i32.const 0 call $~lib/env/abort @@ -8212,12 +8278,12 @@ end i64.const 19999868719476735 call $~lib/internal/number/utoa64 - i32.const 2288 - call $~lib/string/String.__eq + i32.const 2728 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 220 i32.const 0 call $~lib/env/abort @@ -8225,12 +8291,12 @@ end i64.const -1 call $~lib/internal/number/utoa64 - i32.const 2328 - call $~lib/string/String.__eq + i32.const 2776 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 221 i32.const 0 call $~lib/env/abort @@ -8238,12 +8304,12 @@ end i64.const 0 call $~lib/internal/number/itoa64 - i32.const 480 - call $~lib/string/String.__eq + i32.const 608 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 223 i32.const 0 call $~lib/env/abort @@ -8251,12 +8317,12 @@ end i64.const -1234 call $~lib/internal/number/itoa64 - i32.const 2376 - call $~lib/string/String.__eq + i32.const 2824 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 224 i32.const 0 call $~lib/env/abort @@ -8264,12 +8330,12 @@ end i64.const 4294967295 call $~lib/internal/number/itoa64 - i32.const 2072 - call $~lib/string/String.__eq + i32.const 2496 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 225 i32.const 0 call $~lib/env/abort @@ -8277,12 +8343,12 @@ end i64.const -4294967295 call $~lib/internal/number/itoa64 - i32.const 2392 - call $~lib/string/String.__eq + i32.const 2848 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 226 i32.const 0 call $~lib/env/abort @@ -8290,12 +8356,12 @@ end i64.const 68719476735 call $~lib/internal/number/itoa64 - i32.const 2144 - call $~lib/string/String.__eq + i32.const 2584 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 227 i32.const 0 call $~lib/env/abort @@ -8303,12 +8369,12 @@ end i64.const -68719476735 call $~lib/internal/number/itoa64 - i32.const 2424 - call $~lib/string/String.__eq + i32.const 2880 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 228 i32.const 0 call $~lib/env/abort @@ -8316,12 +8382,12 @@ end i64.const -868719476735 call $~lib/internal/number/itoa64 - i32.const 2456 - call $~lib/string/String.__eq + i32.const 2912 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 229 i32.const 0 call $~lib/env/abort @@ -8329,12 +8395,12 @@ end i64.const -999868719476735 call $~lib/internal/number/itoa64 - i32.const 2488 - call $~lib/string/String.__eq + i32.const 2952 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 230 i32.const 0 call $~lib/env/abort @@ -8342,12 +8408,12 @@ end i64.const -19999868719476735 call $~lib/internal/number/itoa64 - i32.const 2528 - call $~lib/string/String.__eq + i32.const 2992 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 231 i32.const 0 call $~lib/env/abort @@ -8355,12 +8421,12 @@ end i64.const 9223372036854775807 call $~lib/internal/number/itoa64 - i32.const 2568 - call $~lib/string/String.__eq + i32.const 3040 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 232 i32.const 0 call $~lib/env/abort @@ -8368,12 +8434,12 @@ end i64.const -9223372036854775808 call $~lib/internal/number/itoa64 - i32.const 2616 - call $~lib/string/String.__eq + i32.const 3088 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 233 i32.const 0 call $~lib/env/abort @@ -8381,12 +8447,12 @@ end f64.const 0 call $~lib/internal/number/dtoa - i32.const 2664 - call $~lib/string/String.__eq + i32.const 3136 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 236 i32.const 0 call $~lib/env/abort @@ -8394,12 +8460,12 @@ end f64.const -0 call $~lib/internal/number/dtoa - i32.const 2664 - call $~lib/string/String.__eq + i32.const 3136 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 237 i32.const 0 call $~lib/env/abort @@ -8407,12 +8473,12 @@ end f64.const nan:0x8000000000000 call $~lib/internal/number/dtoa - i32.const 2680 - call $~lib/string/String.__eq + i32.const 3152 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 238 i32.const 0 call $~lib/env/abort @@ -8420,12 +8486,12 @@ end f64.const inf call $~lib/internal/number/dtoa - i32.const 2720 - call $~lib/string/String.__eq + i32.const 3200 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 239 i32.const 0 call $~lib/env/abort @@ -8433,12 +8499,12 @@ end f64.const -inf call $~lib/internal/number/dtoa - i32.const 2696 - call $~lib/string/String.__eq + i32.const 3168 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 240 i32.const 0 call $~lib/env/abort @@ -8446,12 +8512,12 @@ end f64.const 2.220446049250313e-16 call $~lib/internal/number/dtoa - i32.const 4112 - call $~lib/string/String.__eq + i32.const 4592 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 241 i32.const 0 call $~lib/env/abort @@ -8459,12 +8525,12 @@ end f64.const -2.220446049250313e-16 call $~lib/internal/number/dtoa - i32.const 4160 - call $~lib/string/String.__eq + i32.const 4648 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 242 i32.const 0 call $~lib/env/abort @@ -8472,12 +8538,12 @@ end f64.const 1797693134862315708145274e284 call $~lib/internal/number/dtoa - i32.const 4208 - call $~lib/string/String.__eq + i32.const 4704 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 243 i32.const 0 call $~lib/env/abort @@ -8485,12 +8551,12 @@ end f64.const -1797693134862315708145274e284 call $~lib/internal/number/dtoa - i32.const 4264 - call $~lib/string/String.__eq + i32.const 4760 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 244 i32.const 0 call $~lib/env/abort @@ -8498,12 +8564,12 @@ end f64.const 4185580496821356722454785e274 call $~lib/internal/number/dtoa - i32.const 4320 - call $~lib/string/String.__eq + i32.const 4816 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 245 i32.const 0 call $~lib/env/abort @@ -8511,12 +8577,12 @@ end f64.const 2.2250738585072014e-308 call $~lib/internal/number/dtoa - i32.const 4368 - call $~lib/string/String.__eq + i32.const 4872 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 246 i32.const 0 call $~lib/env/abort @@ -8524,12 +8590,12 @@ end f64.const 4.940656e-318 call $~lib/internal/number/dtoa - i32.const 4424 - call $~lib/string/String.__eq + i32.const 4928 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 249 i32.const 0 call $~lib/env/abort @@ -8537,12 +8603,12 @@ end f64.const 9060801153433600 call $~lib/internal/number/dtoa - i32.const 4456 - call $~lib/string/String.__eq + i32.const 4968 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 250 i32.const 0 call $~lib/env/abort @@ -8550,12 +8616,12 @@ end f64.const 4708356024711512064 call $~lib/internal/number/dtoa - i32.const 4496 - call $~lib/string/String.__eq + i32.const 5016 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 251 i32.const 0 call $~lib/env/abort @@ -8563,12 +8629,12 @@ end f64.const 9409340012568248320 call $~lib/internal/number/dtoa - i32.const 4544 - call $~lib/string/String.__eq + i32.const 5072 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 252 i32.const 0 call $~lib/env/abort @@ -8576,12 +8642,12 @@ end f64.const 5e-324 call $~lib/internal/number/dtoa - i32.const 4592 - call $~lib/string/String.__eq + i32.const 5128 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 253 i32.const 0 call $~lib/env/abort @@ -8589,12 +8655,12 @@ end f64.const 1 call $~lib/internal/number/dtoa - i32.const 4608 - call $~lib/string/String.__eq + i32.const 5152 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 259 i32.const 0 call $~lib/env/abort @@ -8602,12 +8668,12 @@ end f64.const 0.1 call $~lib/internal/number/dtoa - i32.const 592 - call $~lib/string/String.__eq + i32.const 768 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 260 i32.const 0 call $~lib/env/abort @@ -8615,12 +8681,12 @@ end f64.const -1 call $~lib/internal/number/dtoa - i32.const 4624 - call $~lib/string/String.__eq + i32.const 5168 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 261 i32.const 0 call $~lib/env/abort @@ -8628,12 +8694,12 @@ end f64.const -0.1 call $~lib/internal/number/dtoa - i32.const 4640 - call $~lib/string/String.__eq + i32.const 5184 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 262 i32.const 0 call $~lib/env/abort @@ -8641,12 +8707,12 @@ end f64.const 1e6 call $~lib/internal/number/dtoa - i32.const 4656 - call $~lib/string/String.__eq + i32.const 5200 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 264 i32.const 0 call $~lib/env/abort @@ -8654,12 +8720,12 @@ end f64.const 1e-06 call $~lib/internal/number/dtoa - i32.const 4680 - call $~lib/string/String.__eq + i32.const 5232 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 265 i32.const 0 call $~lib/env/abort @@ -8667,12 +8733,12 @@ end f64.const -1e6 call $~lib/internal/number/dtoa - i32.const 4704 - call $~lib/string/String.__eq + i32.const 5256 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 266 i32.const 0 call $~lib/env/abort @@ -8680,12 +8746,12 @@ end f64.const -1e-06 call $~lib/internal/number/dtoa - i32.const 4728 - call $~lib/string/String.__eq + i32.const 5288 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 267 i32.const 0 call $~lib/env/abort @@ -8693,12 +8759,12 @@ end f64.const 1e7 call $~lib/internal/number/dtoa - i32.const 4752 - call $~lib/string/String.__eq + i32.const 5320 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 268 i32.const 0 call $~lib/env/abort @@ -8706,12 +8772,12 @@ end f64.const 1e-07 call $~lib/internal/number/dtoa - i32.const 4776 - call $~lib/string/String.__eq + i32.const 5352 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 269 i32.const 0 call $~lib/env/abort @@ -8719,12 +8785,12 @@ end f64.const 1.e+308 call $~lib/internal/number/dtoa - i32.const 4792 - call $~lib/string/String.__eq + i32.const 5368 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 271 i32.const 0 call $~lib/env/abort @@ -8732,12 +8798,12 @@ end f64.const -1.e+308 call $~lib/internal/number/dtoa - i32.const 4808 - call $~lib/string/String.__eq + i32.const 5392 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 272 i32.const 0 call $~lib/env/abort @@ -8745,12 +8811,12 @@ end f64.const inf call $~lib/internal/number/dtoa - i32.const 2720 - call $~lib/string/String.__eq + i32.const 3200 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 273 i32.const 0 call $~lib/env/abort @@ -8758,12 +8824,12 @@ end f64.const -inf call $~lib/internal/number/dtoa - i32.const 2696 - call $~lib/string/String.__eq + i32.const 3168 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 274 i32.const 0 call $~lib/env/abort @@ -8771,12 +8837,12 @@ end f64.const 1e-308 call $~lib/internal/number/dtoa - i32.const 4832 - call $~lib/string/String.__eq + i32.const 5416 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 275 i32.const 0 call $~lib/env/abort @@ -8784,12 +8850,12 @@ end f64.const -1e-308 call $~lib/internal/number/dtoa - i32.const 4848 - call $~lib/string/String.__eq + i32.const 5440 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 276 i32.const 0 call $~lib/env/abort @@ -8797,12 +8863,12 @@ end f64.const 1e-323 call $~lib/internal/number/dtoa - i32.const 4872 - call $~lib/string/String.__eq + i32.const 5464 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 277 i32.const 0 call $~lib/env/abort @@ -8810,12 +8876,12 @@ end f64.const -1e-323 call $~lib/internal/number/dtoa - i32.const 4888 - call $~lib/string/String.__eq + i32.const 5488 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 278 i32.const 0 call $~lib/env/abort @@ -8823,12 +8889,12 @@ end f64.const 0 call $~lib/internal/number/dtoa - i32.const 2664 - call $~lib/string/String.__eq + i32.const 3136 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 279 i32.const 0 call $~lib/env/abort @@ -8836,12 +8902,12 @@ end f64.const 4294967272 call $~lib/internal/number/dtoa - i32.const 4912 - call $~lib/string/String.__eq + i32.const 5512 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 281 i32.const 0 call $~lib/env/abort @@ -8849,12 +8915,12 @@ end f64.const 1.2312145673456234e-08 call $~lib/internal/number/dtoa - i32.const 4944 - call $~lib/string/String.__eq + i32.const 5544 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 282 i32.const 0 call $~lib/env/abort @@ -8862,12 +8928,12 @@ end f64.const 555555555.5555556 call $~lib/internal/number/dtoa - i32.const 4992 - call $~lib/string/String.__eq + i32.const 5600 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 284 i32.const 0 call $~lib/env/abort @@ -8875,12 +8941,12 @@ end f64.const 0.9999999999999999 call $~lib/internal/number/dtoa - i32.const 5032 - call $~lib/string/String.__eq + i32.const 5648 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 285 i32.const 0 call $~lib/env/abort @@ -8888,12 +8954,12 @@ end f64.const 1 call $~lib/internal/number/dtoa - i32.const 4608 - call $~lib/string/String.__eq + i32.const 5152 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 286 i32.const 0 call $~lib/env/abort @@ -8901,12 +8967,12 @@ end f64.const 12.34 call $~lib/internal/number/dtoa - i32.const 5072 - call $~lib/string/String.__eq + i32.const 5696 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 287 i32.const 0 call $~lib/env/abort @@ -8914,12 +8980,12 @@ end f64.const 0.3333333333333333 call $~lib/internal/number/dtoa - i32.const 5088 - call $~lib/string/String.__eq + i32.const 5720 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 289 i32.const 0 call $~lib/env/abort @@ -8927,12 +8993,12 @@ end f64.const 1234e17 call $~lib/internal/number/dtoa - i32.const 5128 - call $~lib/string/String.__eq + i32.const 5768 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 290 i32.const 0 call $~lib/env/abort @@ -8940,12 +9006,12 @@ end f64.const 1234e18 call $~lib/internal/number/dtoa - i32.const 5184 - call $~lib/string/String.__eq + i32.const 5824 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 291 i32.const 0 call $~lib/env/abort @@ -8953,12 +9019,12 @@ end f64.const 2.71828 call $~lib/internal/number/dtoa - i32.const 5208 - call $~lib/string/String.__eq + i32.const 5856 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 292 i32.const 0 call $~lib/env/abort @@ -8966,12 +9032,12 @@ end f64.const 0.0271828 call $~lib/internal/number/dtoa - i32.const 5232 - call $~lib/string/String.__eq + i32.const 5880 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 293 i32.const 0 call $~lib/env/abort @@ -8979,12 +9045,12 @@ end f64.const 271.828 call $~lib/internal/number/dtoa - i32.const 5256 - call $~lib/string/String.__eq + i32.const 5912 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 294 i32.const 0 call $~lib/env/abort @@ -8992,12 +9058,12 @@ end f64.const 1.1e+128 call $~lib/internal/number/dtoa - i32.const 5280 - call $~lib/string/String.__eq + i32.const 5936 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 295 i32.const 0 call $~lib/env/abort @@ -9005,12 +9071,12 @@ end f64.const 1.1e-64 call $~lib/internal/number/dtoa - i32.const 5304 - call $~lib/string/String.__eq + i32.const 5960 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 296 i32.const 0 call $~lib/env/abort @@ -9018,12 +9084,12 @@ end f64.const 0.000035689 call $~lib/internal/number/dtoa - i32.const 5328 - call $~lib/string/String.__eq + i32.const 5984 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 297 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 4aac63092b..4a5fee69de 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -1,12 +1,11 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiiii (func (param i32 i32 i32 i32 i32))) (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$di (func (param i32) (result f64))) (type $FUNCSIG$vi (func (param i32))) @@ -18,175 +17,176 @@ (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00h\00i\00,\00 \00I\00\'\00m\00 \00a\00 \00s\00t\00r\00i\00n\00g\00") - (data (i32.const 48) "\0d\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 80) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 112) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 168) "\01\00\00\00\00\00") - (data (i32.const 176) "\01\00\00\006\00") - (data (i32.const 184) "\02\00\00\004\d8\06\df") - (data (i32.const 192) "\02\00\00\00h\00i\00") - (data (i32.const 200) "\04\00\00\00n\00u\00l\00l\00") - (data (i32.const 216) "\06\00\00\00s\00t\00r\00i\00n\00g\00") - (data (i32.const 232) "\03\00\00\00I\00\'\00m\00") - (data (i32.const 248) "\01\00\00\00 \00") - (data (i32.const 256) "\00\00\00\00") - (data (i32.const 264) "\03\00\00\00 \00 \00 \00") - (data (i32.const 280) "\01\00\00\00a\00") - (data (i32.const 288) "\03\00\00\00a\00b\00c\00") - (data (i32.const 304) "\05\00\00\00 \00 \00a\00b\00c\00") - (data (i32.const 320) "\03\00\00\001\002\003\00") - (data (i32.const 336) "\06\00\00\001\002\003\00a\00b\00c\00") - (data (i32.const 352) "\08\00\00\001\002\003\001\002\00a\00b\00c\00") - (data (i32.const 376) "\05\00\00\00a\00b\00c\00 \00 \00") - (data (i32.const 392) "\06\00\00\00a\00b\00c\00a\00b\00c\00") - (data (i32.const 408) "\08\00\00\00a\00b\00c\00a\00b\00c\00a\00b\00") - (data (i32.const 432) "\01\00\00\00,\00") - (data (i32.const 440) "\01\00\00\00x\00") - (data (i32.const 448) "\03\00\00\00,\00 \00I\00") - (data (i32.const 464) "\01\00\00\00g\00") - (data (i32.const 472) "\01\00\00\00i\00") - (data (i32.const 480) "\01\00\00\000\00") - (data (i32.const 488) "\01\00\00\001\00") - (data (i32.const 496) "\05\00\00\000\00b\001\000\001\00") - (data (i32.const 512) "\05\00\00\000\00o\007\000\007\00") - (data (i32.const 528) "\05\00\00\000\00x\00f\000\00f\00") - (data (i32.const 544) "\05\00\00\000\00x\00F\000\00F\00") - (data (i32.const 560) "\03\00\00\000\001\001\00") - (data (i32.const 576) "\04\00\00\000\00x\001\00g\00") - (data (i32.const 592) "\03\00\00\000\00.\001\00") - (data (i32.const 608) "\03\00\00\00.\002\005\00") - (data (i32.const 624) "\08\00\00\00.\001\00f\00o\00o\00b\00a\00r\00") - (data (i32.const 648) "\01\00\00\00b\00") - (data (i32.const 656) "\02\00\00\00a\00b\00") - (data (i32.const 664) "\04\00\00\00k\00e\00y\001\00") - (data (i32.const 680) "\04\00\00\00k\00e\00y\002\00") - (data (i32.const 696) "\03\00\00\00k\00e\001\00") - (data (i32.const 712) "\03\00\00\00k\00e\002\00") - (data (i32.const 728) "\05\00\00\00k\00e\00y\001\002\00") - (data (i32.const 744) "\05\00\00\00k\00e\00y\001\001\00") - (data (i32.const 760) "\07\00\00\00\a40\ed0\cf0\cb0\db0\d80\c80") - (data (i32.const 784) "\07\00\00\00\a60\f00\ce0\aa0\af0\e40\de0") - (data (i32.const 808) "\0b\00\00\00D\00\19 f\00h\00u\00a\00s\00c\00a\00i\00l\00") - (data (i32.const 840) "\n\00\00\00D\00\19 \1f\1eu\00a\00s\00c\00a\00i\00l\00") - (data (i32.const 864) "\02\00\00\00b\00a\00") - (data (i32.const 872) "\02\00\00\00a\00a\00") - (data (i32.const 880) "\03\00\00\00a\00a\00a\00") - (data (i32.const 896) "\08\00\00\00a\00b\00a\00b\00a\00b\00a\00b\00") - (data (i32.const 920) "\05\00\00\00a\00a\00a\00a\00a\00") - (data (i32.const 936) "\06\00\00\00a\00a\00a\00a\00a\00a\00") - (data (i32.const 952) "\07\00\00\00a\00a\00a\00a\00a\00a\00a\00") - (data (i32.const 976) "\0e\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00") - (data (i32.const 1008) "\01\00\00\00n\00") - (data (i32.const 1016) "\05\00\00\00j\00k\00l\00m\00n\00") - (data (i32.const 1032) "\05\00\00\00c\00d\00e\00f\00g\00") - (data (i32.const 1048) "\05\00\00\00d\00e\00f\00g\00h\00") - (data (i32.const 1064) "\0d\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00") - (data (i32.const 1096) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 1128) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 1192) "\05\00\00\00a\00,\00b\00,\00c\00") - (data (i32.const 1208) "\01\00\00\00.\00") - (data (i32.const 1216) "\01\00\00\00c\00") - (data (i32.const 1224) "\07\00\00\00a\00,\00 \00b\00,\00 \00c\00") - (data (i32.const 1248) "\02\00\00\00,\00 \00") - (data (i32.const 1256) "\06\00\00\00a\00,\00b\00,\00,\00c\00") - (data (i32.const 1272) "\06\00\00\00,\00a\00,\00b\00,\00c\00") - (data (i32.const 1288) "\06\00\00\00a\00,\00b\00,\00c\00,\00") - (data (i32.const 1304) "\90\01\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1816) "\18\05\00\00d\00\00\00") - (data (i32.const 1824) "\01\00\00\008\00") - (data (i32.const 1832) "\05\00\00\00-\001\000\000\000\00") - (data (i32.const 1848) "\04\00\00\001\002\003\004\00") - (data (i32.const 1864) "\05\00\00\001\002\003\004\005\00") - (data (i32.const 1880) "\06\00\00\001\002\003\004\005\006\00") - (data (i32.const 1896) "\07\00\00\001\001\001\001\001\001\001\00") - (data (i32.const 1920) "\07\00\00\001\002\003\004\005\006\007\00") - (data (i32.const 1944) "\n\00\00\002\001\004\007\004\008\003\006\004\006\00") - (data (i32.const 1968) "\n\00\00\002\001\004\007\004\008\003\006\004\007\00") - (data (i32.const 1992) "\0b\00\00\00-\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 2024) "\02\00\00\00-\001\00") - (data (i32.const 2032) "\04\00\00\001\000\000\000\00") - (data (i32.const 2048) "\n\00\00\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 2072) "\n\00\00\004\002\009\004\009\006\007\002\009\005\00") - (data (i32.const 2096) "\08\00\00\009\009\009\009\009\009\009\009\00") - (data (i32.const 2120) "\t\00\00\001\000\000\000\000\000\000\000\000\00") - (data (i32.const 2144) "\0b\00\00\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2176) "\0c\00\00\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2208) "\0f\00\00\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2248) "\10\00\00\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2288) "\11\00\00\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2328) "\14\00\00\001\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005\00") - (data (i32.const 2376) "\05\00\00\00-\001\002\003\004\00") - (data (i32.const 2392) "\0b\00\00\00-\004\002\009\004\009\006\007\002\009\005\00") - (data (i32.const 2424) "\0c\00\00\00-\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2456) "\0d\00\00\00-\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2488) "\10\00\00\00-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2528) "\12\00\00\00-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2568) "\13\00\00\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007\00") - (data (i32.const 2616) "\14\00\00\00-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008\00") - (data (i32.const 2664) "\03\00\00\000\00.\000\00") - (data (i32.const 2680) "\03\00\00\00N\00a\00N\00") - (data (i32.const 2696) "\t\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 2720) "\08\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 2744) "\b8\02\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/runtime/unref + i32.const 1 + i32.store + local.get $2 + end ) - (func $~lib/internal/string/compareUnsafe (; 6 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (func $~lib/string/compareImpl (; 10 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -396,9 +708,9 @@ local.get $4 if (result i32) local.get $6 - i32.load16_u offset=4 + i32.load16_u local.get $7 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $5 i32.eqz @@ -426,7 +738,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.eq (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -452,11 +764,11 @@ return end local.get $0 - i32.load + call $~lib/runtime/StringBase#get:length local.set $3 local.get $3 local.get $1 - i32.load + call $~lib/runtime/StringBase#get:length i32.ne if i32.const 0 @@ -467,10 +779,10 @@ local.get $1 i32.const 0 local.get $3 - call $~lib/internal/string/compareUnsafe + call $~lib/string/compareImpl i32.eqz ) - (func $~lib/string/String.fromCodePoint (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -481,8 +793,8 @@ i32.eqz if i32.const 0 - i32.const 80 - i32.const 34 + i32.const 96 + i32.const 53 i32.const 4 call $~lib/env/abort unreachable @@ -494,14 +806,16 @@ local.get $1 i32.const 1 i32.add - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC local.set $2 local.get $1 i32.eqz if local.get $2 local.get $0 - i32.store16 offset=4 + i32.store16 else local.get $0 i32.const 65536 @@ -525,11 +839,19 @@ i32.shl local.get $4 i32.or - i32.store offset=4 + i32.store + end + block $~lib/runtime/REGISTER|inlined.1 (result i32) + local.get $2 + local.set $4 + local.get $4 + call $~lib/runtime/unref + i32.const 1 + i32.store + local.get $4 end - local.get $2 ) - (func $~lib/string/String#startsWith (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#startsWith (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -542,8 +864,8 @@ i32.eqz if i32.const 0 - i32.const 80 - i32.const 224 + i32.const 96 + i32.const 191 i32.const 4 call $~lib/env/abort unreachable @@ -552,13 +874,13 @@ i32.const 0 i32.eq if - i32.const 200 + i32.const 240 local.set $1 end local.get $2 local.set $3 local.get $0 - i32.load + call $~lib/runtime/StringBase#get:length local.set $4 local.get $3 local.tee $5 @@ -577,7 +899,7 @@ select local.set $7 local.get $1 - i32.load + call $~lib/runtime/StringBase#get:length local.set $8 local.get $8 local.get $7 @@ -593,10 +915,10 @@ local.get $1 i32.const 0 local.get $8 - call $~lib/internal/string/compareUnsafe + call $~lib/string/compareImpl i32.eqz ) - (func $~lib/string/String#endsWith (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#endsWith (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -608,8 +930,8 @@ i32.eqz if i32.const 0 - i32.const 80 - i32.const 124 + i32.const 96 + i32.const 110 i32.const 4 call $~lib/env/abort unreachable @@ -631,7 +953,7 @@ select local.tee $3 local.get $0 - i32.load + call $~lib/runtime/StringBase#get:length local.tee $4 local.get $3 local.get $4 @@ -639,7 +961,7 @@ select local.set $5 local.get $1 - i32.load + call $~lib/runtime/StringBase#get:length local.set $6 local.get $5 local.get $6 @@ -657,10 +979,10 @@ local.get $1 i32.const 0 local.get $6 - call $~lib/internal/string/compareUnsafe + call $~lib/string/compareImpl i32.eqz ) - (func $~lib/string/String#endsWith|trampoline (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#endsWith|trampoline (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -671,7 +993,7 @@ end unreachable end - i32.const 536870910 + global.get $~lib/runtime/StringBase.MAX_LENGTH local.set $2 end local.get $0 @@ -679,7 +1001,7 @@ local.get $2 call $~lib/string/String#endsWith ) - (func $~lib/string/String#indexOf (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#indexOf (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -691,8 +1013,8 @@ i32.eqz if i32.const 0 - i32.const 80 - i32.const 193 + i32.const 96 + i32.const 162 i32.const 4 call $~lib/env/abort unreachable @@ -701,11 +1023,11 @@ i32.const 0 i32.eq if - i32.const 200 + i32.const 240 local.set $1 end local.get $1 - i32.load + call $~lib/runtime/StringBase#get:length local.set $3 local.get $3 i32.eqz @@ -714,7 +1036,7 @@ return end local.get $0 - i32.load + call $~lib/runtime/StringBase#get:length local.set $4 local.get $4 i32.eqz @@ -756,7 +1078,7 @@ local.get $1 i32.const 0 local.get $3 - call $~lib/internal/string/compareUnsafe + call $~lib/string/compareImpl i32.eqz if local.get $5 @@ -773,7 +1095,7 @@ end i32.const -1 ) - (func $~lib/internal/memory/memcpy (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/memory/memcpy (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1974,7 +2296,7 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/memory/memmove (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 local.get $1 @@ -2185,332 +2507,66 @@ local.get $2 if local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - end - ) - (func $~lib/internal/string/repeatUnsafe (; 15 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - local.get $2 - i32.load - local.set $4 - block $break|0 - block $case5|0 - block $case4|0 - block $case3|0 - block $case2|0 - block $case1|0 - block $case0|0 - local.get $4 - local.set $5 - local.get $5 - i32.const 0 - i32.eq - br_if $case0|0 - local.get $5 - i32.const 1 - i32.eq - br_if $case1|0 - local.get $5 - i32.const 2 - i32.eq - br_if $case2|0 - local.get $5 - i32.const 3 - i32.eq - br_if $case3|0 - local.get $5 - i32.const 4 - i32.eq - br_if $case4|0 - br $case5|0 - end - br $break|0 - end - block - local.get $2 - i32.load16_u offset=4 - local.set $5 - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $6 - block $break|1 - i32.const 0 - local.set $7 - loop $repeat|1 - local.get $7 - local.get $3 - i32.lt_s - i32.eqz - br_if $break|1 - local.get $6 - local.get $7 - i32.const 1 - i32.shl - i32.add - local.get $5 - i32.store16 offset=4 - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $repeat|1 - unreachable - end - unreachable - end - br $break|0 - unreachable - end - unreachable - end - block - local.get $2 - i32.load offset=4 - local.set $6 - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $5 - block $break|2 - i32.const 0 - local.set $7 - loop $repeat|2 - local.get $7 - local.get $3 - i32.lt_s - i32.eqz - br_if $break|2 - local.get $5 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $repeat|2 - unreachable - end - unreachable - end - br $break|0 - unreachable - end - unreachable - end - block - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load16_u offset=8 - local.set $6 - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $7 - block $break|3 - i32.const 0 - local.set $8 - loop $repeat|3 - local.get $8 - local.get $3 - i32.lt_s - i32.eqz - br_if $break|3 - block - local.get $7 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.store offset=4 - local.get $7 - local.get $8 - i32.const 1 - i32.shl - i32.add - local.get $6 - i32.store16 offset=8 - end - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $repeat|3 - unreachable - end - unreachable - end - br $break|0 - unreachable - end - unreachable - end - block - local.get $2 - i64.load offset=4 - local.set $9 - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $7 - block $break|4 - i32.const 0 - local.set $6 - loop $repeat|4 - local.get $6 - local.get $3 - i32.lt_s - i32.eqz - br_if $break|4 - local.get $7 - local.get $6 - i32.const 3 - i32.shl - i32.add - local.get $9 - i64.store offset=4 - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $repeat|4 - unreachable - end - unreachable - end - br $break|0 - unreachable - end - unreachable - end - block - local.get $4 - i32.const 1 - i32.shl - local.set $7 - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $6 - local.get $2 - i32.const 4 - i32.add - local.set $5 - block $break|5 - block - i32.const 0 - local.set $8 - local.get $7 - local.get $3 - i32.mul - local.set $10 - end - loop $repeat|5 - local.get $8 - local.get $10 - i32.lt_s - i32.eqz - br_if $break|5 - block $~lib/memory/memory.copy|inlined.0 - local.get $6 - local.get $8 - i32.add - local.set $11 - local.get $5 - local.set $12 - local.get $7 - local.set $13 - local.get $11 - local.get $12 - local.get $13 - call $~lib/internal/memory/memmove - end - local.get $8 - local.get $7 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 i32.add - local.set $8 - br $repeat|5 - unreachable + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 end - unreachable end - br $break|0 - unreachable end - unreachable end ) - (func $~lib/internal/string/copyUnsafe (; 16 ;) (type $FUNCSIG$viiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (func $~lib/runtime/memory.repeat (; 19 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 4 - i32.add - local.set $5 + (local $8 i32) + i32.const 0 + local.set $4 local.get $2 local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 4 - i32.add - local.set $6 - local.get $4 - i32.const 1 - i32.shl - local.set $7 - local.get $5 - local.get $6 - local.get $7 - call $~lib/internal/memory/memmove + i32.mul + local.set $5 + block $break|0 + loop $continue|0 + local.get $4 + local.get $5 + i32.lt_u + if + block + block $~lib/runtime/memory.copy|inlined.0 + local.get $0 + local.get $4 + i32.add + local.set $6 + local.get $1 + local.set $7 + local.get $2 + local.set $8 + local.get $6 + local.get $7 + local.get $8 + call $~lib/internal/memory/memmove + end + local.get $4 + local.get $2 + i32.add + local.set $4 + end + br $continue|0 + end + end + end ) - (func $~lib/string/String#padStart (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padStart (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2518,23 +2574,26 @@ (local $7 i32) (local $8 i32) (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 80 - i32.const 340 + i32.const 96 + i32.const 307 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load + call $~lib/runtime/StringBase#get:length local.set $3 local.get $2 - i32.load + call $~lib/runtime/StringBase#get:length local.set $4 local.get $1 local.get $3 @@ -2555,7 +2614,9 @@ i32.sub local.set $6 local.get $1 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC local.set $7 local.get $6 local.get $4 @@ -2576,39 +2637,76 @@ i32.sub local.set $9 local.get $7 - i32.const 0 local.get $2 + local.get $2 + call $~lib/runtime/StringBase#get:length + i32.const 1 + i32.shl local.get $5 - call $~lib/internal/string/repeatUnsafe + call $~lib/runtime/memory.repeat local.get $9 if local.get $7 local.get $8 + i32.const 1 + i32.shl + i32.add + local.set $10 local.get $2 - i32.const 0 + local.set $11 local.get $9 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + local.set $12 + local.get $10 + local.get $11 + local.get $12 + call $~lib/internal/memory/memmove end else local.get $7 - i32.const 0 + local.set $9 local.get $2 - i32.const 0 + local.set $8 local.get $6 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + local.set $5 + local.get $9 + local.get $8 + local.get $5 + call $~lib/internal/memory/memmove end local.get $3 if local.get $7 local.get $6 + i32.const 1 + i32.shl + i32.add + local.set $5 local.get $0 - i32.const 0 + local.set $8 local.get $3 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + local.set $9 + local.get $5 + local.get $8 + local.get $9 + call $~lib/internal/memory/memmove + end + block $~lib/runtime/REGISTER|inlined.2 (result i32) + local.get $7 + local.set $9 + local.get $9 + call $~lib/runtime/unref + i32.const 1 + i32.store + local.get $9 end - local.get $7 ) - (func $~lib/string/String#padStart|trampoline (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padStart|trampoline (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2619,7 +2717,7 @@ end unreachable end - i32.const 248 + i32.const 296 local.set $2 end local.get $0 @@ -2627,7 +2725,7 @@ local.get $2 call $~lib/string/String#padStart ) - (func $~lib/string/String#padEnd (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2635,23 +2733,26 @@ (local $7 i32) (local $8 i32) (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 80 - i32.const 360 + i32.const 96 + i32.const 331 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load + call $~lib/runtime/StringBase#get:length local.set $3 local.get $2 - i32.load + call $~lib/runtime/StringBase#get:length local.set $4 local.get $1 local.get $3 @@ -2672,16 +2773,24 @@ i32.sub local.set $6 local.get $1 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC local.set $7 local.get $3 if local.get $7 - i32.const 0 + local.set $5 local.get $0 - i32.const 0 + local.set $8 local.get $3 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + local.set $9 + local.get $5 + local.get $8 + local.get $9 + call $~lib/internal/memory/memmove end local.get $6 local.get $4 @@ -2692,42 +2801,77 @@ i32.sub local.get $4 i32.div_s - local.set $5 - local.get $5 + local.set $9 + local.get $9 local.get $4 i32.mul local.set $8 local.get $6 local.get $8 i32.sub - local.set $9 + local.set $5 local.get $7 local.get $3 + i32.const 1 + i32.shl + i32.add local.get $2 - local.get $5 - call $~lib/internal/string/repeatUnsafe + local.get $2 + call $~lib/runtime/StringBase#get:length + i32.const 1 + i32.shl local.get $9 + call $~lib/runtime/memory.repeat + local.get $5 if local.get $7 local.get $8 local.get $3 i32.add + i32.const 1 + i32.shl + i32.add + local.set $10 local.get $2 - i32.const 0 - local.get $9 - call $~lib/internal/string/copyUnsafe + local.set $11 + local.get $5 + i32.const 1 + i32.shl + local.set $12 + local.get $10 + local.get $11 + local.get $12 + call $~lib/internal/memory/memmove end else local.get $7 local.get $3 + i32.const 1 + i32.shl + i32.add + local.set $5 local.get $2 - i32.const 0 + local.set $8 local.get $6 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + local.set $9 + local.get $5 + local.get $8 + local.get $9 + call $~lib/internal/memory/memmove + end + block $~lib/runtime/REGISTER|inlined.3 (result i32) + local.get $7 + local.set $9 + local.get $9 + call $~lib/runtime/unref + i32.const 1 + i32.store + local.get $9 end - local.get $7 ) - (func $~lib/string/String#padEnd|trampoline (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd|trampoline (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2738,7 +2882,7 @@ end unreachable end - i32.const 248 + i32.const 296 local.set $2 end local.get $0 @@ -2746,7 +2890,7 @@ local.get $2 call $~lib/string/String#padEnd ) - (func $~lib/string/String#lastIndexOf (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2758,8 +2902,8 @@ i32.eqz if i32.const 0 - i32.const 80 - i32.const 209 + i32.const 96 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -2768,14 +2912,14 @@ i32.const 0 i32.eq if - i32.const 200 + i32.const 240 local.set $1 end local.get $0 - i32.load + call $~lib/runtime/StringBase#get:length local.set $3 local.get $1 - i32.load + call $~lib/runtime/StringBase#get:length local.set $4 local.get $4 i32.eqz @@ -2821,7 +2965,7 @@ local.get $1 i32.const 0 local.get $4 - call $~lib/internal/string/compareUnsafe + call $~lib/string/compareImpl i32.eqz if local.get $5 @@ -2838,7 +2982,7 @@ end i32.const -1 ) - (func $~lib/string/String#lastIndexOf|trampoline (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf|trampoline (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2857,7 +3001,7 @@ local.get $2 call $~lib/string/String#lastIndexOf ) - (func $~lib/internal/string/parse (; 23 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/internal/string/parse (; 26 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2865,7 +3009,7 @@ (local $6 i32) (local $7 f64) local.get $0 - i32.load + call $~lib/runtime/StringBase#get:length local.set $2 local.get $2 i32.eqz @@ -2876,7 +3020,7 @@ local.get $0 local.set $3 local.get $3 - i32.load16_u offset=4 + i32.load16_u local.set $4 local.get $4 i32.const 45 @@ -2895,7 +3039,7 @@ i32.const 2 i32.add local.tee $3 - i32.load16_u offset=4 + i32.load16_u local.set $4 f64.const -1 local.set $5 @@ -2917,7 +3061,7 @@ i32.const 2 i32.add local.tee $3 - i32.load16_u offset=4 + i32.load16_u local.set $4 f64.const 1 local.set $5 @@ -2952,7 +3096,7 @@ local.get $3 i32.const 2 i32.add - i32.load16_u offset=4 + i32.load16_u local.set $6 local.get $6 i32.const 66 @@ -3070,7 +3214,7 @@ if block local.get $3 - i32.load16_u offset=4 + i32.load16_u local.set $4 local.get $4 i32.const 48 @@ -3158,12 +3302,12 @@ local.get $7 f64.mul ) - (func $~lib/string/parseInt (; 24 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/string/parseInt (; 27 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $0 local.get $1 call $~lib/internal/string/parse ) - (func $~lib/string/parseFloat (; 25 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 28 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3172,7 +3316,7 @@ (local $6 i32) (local $7 f64) local.get $0 - i32.load + call $~lib/runtime/StringBase#get:length local.set $1 local.get $1 i32.eqz @@ -3183,7 +3327,7 @@ local.get $0 local.set $2 local.get $2 - i32.load16_u offset=4 + i32.load16_u local.set $3 local.get $3 i32.const 45 @@ -3202,7 +3346,7 @@ i32.const 2 i32.add local.tee $2 - i32.load16_u offset=4 + i32.load16_u local.set $3 f64.const -1 local.set $4 @@ -3224,7 +3368,7 @@ i32.const 2 i32.add local.tee $2 - i32.load16_u offset=4 + i32.load16_u local.set $3 f64.const 1 local.set $4 @@ -3248,7 +3392,7 @@ if block local.get $2 - i32.load16_u offset=4 + i32.load16_u local.set $3 local.get $3 i32.const 46 @@ -3273,7 +3417,7 @@ if block local.get $2 - i32.load16_u offset=4 + i32.load16_u local.set $3 local.get $3 i32.const 69 @@ -3291,8 +3435,8 @@ i32.eqz if i32.const 0 - i32.const 80 - i32.const 625 + i32.const 96 + i32.const 597 i32.const 10 call $~lib/env/abort unreachable @@ -3360,19 +3504,22 @@ local.get $5 f64.mul ) - (func $~lib/string/String#concat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 80 - i32.const 110 + i32.const 96 + i32.const 97 i32.const 4 call $~lib/env/abort unreachable @@ -3381,14 +3528,18 @@ i32.const 0 i32.eq if - i32.const 200 + i32.const 240 local.set $1 end local.get $0 - i32.load + call $~lib/runtime/StringBase#get:length + i32.const 1 + i32.shl local.set $2 local.get $1 - i32.load + call $~lib/runtime/StringBase#get:length + i32.const 1 + i32.shl local.set $3 local.get $2 local.get $3 @@ -3398,49 +3549,70 @@ i32.const 0 i32.eq if - i32.const 256 + i32.const 312 return end local.get $4 - call $~lib/internal/string/allocateUnsafe + call $~lib/runtime/ALLOC local.set $5 - local.get $5 - i32.const 0 - local.get $0 - i32.const 0 - local.get $2 - call $~lib/internal/string/copyUnsafe - local.get $5 - local.get $2 - local.get $1 - i32.const 0 - local.get $3 - call $~lib/internal/string/copyUnsafe - local.get $5 + block $~lib/runtime/memory.copy|inlined.7 + local.get $5 + local.set $6 + local.get $0 + local.set $7 + local.get $2 + local.set $8 + local.get $6 + local.get $7 + local.get $8 + call $~lib/internal/memory/memmove + end + block $~lib/runtime/memory.copy|inlined.8 + local.get $5 + local.get $2 + i32.add + local.set $8 + local.get $1 + local.set $7 + local.get $3 + local.set $6 + local.get $8 + local.get $7 + local.get $6 + call $~lib/internal/memory/memmove + end + block $~lib/runtime/REGISTER|inlined.4 (result i32) + local.get $5 + local.set $6 + local.get $6 + call $~lib/runtime/unref + i32.const 1 + i32.store + local.get $6 + end ) - (func $~lib/string/String.__concat (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.concat (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if - i32.const 200 + i32.const 240 local.set $0 end local.get $0 local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.__ne (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.ne (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 - call $~lib/string/String.__eq + call $~lib/string/String.eq i32.eqz ) - (func $~lib/string/String.__gt (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gt (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 i32.eq @@ -3465,10 +3637,10 @@ return end local.get $0 - i32.load + call $~lib/runtime/StringBase#get:length local.set $3 local.get $1 - i32.load + call $~lib/runtime/StringBase#get:length local.set $4 local.get $3 i32.eqz @@ -3482,6 +3654,10 @@ i32.const 1 return end + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 local.get $3 local.tee $2 local.get $4 @@ -3490,22 +3666,15 @@ local.get $5 i32.lt_s select - local.set $6 - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/compareUnsafe + call $~lib/string/compareImpl i32.const 0 i32.gt_s ) - (func $~lib/string/String.__lt (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.lt (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 i32.eq @@ -3530,10 +3699,10 @@ return end local.get $0 - i32.load + call $~lib/runtime/StringBase#get:length local.set $3 local.get $1 - i32.load + call $~lib/runtime/StringBase#get:length local.set $4 local.get $4 i32.eqz @@ -3547,6 +3716,10 @@ i32.const 1 return end + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 local.get $3 local.tee $2 local.get $4 @@ -3555,29 +3728,23 @@ local.get $5 i32.lt_s select - local.set $6 - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/compareUnsafe + call $~lib/string/compareImpl i32.const 0 i32.lt_s ) - (func $~lib/string/String.__gte (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gte (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 - call $~lib/string/String.__lt + call $~lib/string/String.lt i32.eqz ) - (func $~lib/string/String.__lte (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.lte (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 - call $~lib/string/String.__gt + call $~lib/string/String.gt i32.eqz ) - (func $~lib/string/String#repeat (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3587,14 +3754,14 @@ i32.eqz if i32.const 0 - i32.const 80 - i32.const 380 + i32.const 96 + i32.const 355 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load + call $~lib/runtime/StringBase#get:length local.set $2 local.get $1 i32.const 0 @@ -3604,17 +3771,19 @@ local.get $3 else local.get $2 + i64.extend_i32_s local.get $1 - i32.mul - i32.const 1 - i32.const 28 - i32.shl - i32.gt_s + i64.extend_i32_s + i64.mul + i64.const 1 + i64.const 28 + i64.shl + i64.gt_u end if i32.const 0 - i32.const 80 - i32.const 385 + i32.const 96 + i32.const 360 i32.const 6 call $~lib/env/abort unreachable @@ -3630,7 +3799,7 @@ i32.eqz end if - i32.const 256 + i32.const 312 return end local.get $1 @@ -3643,24 +3812,37 @@ local.get $2 local.get $1 i32.mul - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC local.set $4 local.get $4 - i32.const 0 local.get $0 + local.get $2 + i32.const 1 + i32.shl local.get $1 - call $~lib/internal/string/repeatUnsafe - local.get $4 + call $~lib/runtime/memory.repeat + block $~lib/runtime/REGISTER|inlined.5 (result i32) + local.get $4 + local.set $3 + local.get $3 + call $~lib/runtime/unref + i32.const 1 + i32.store + local.get $3 + end ) - (func $~lib/string/String#slice (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) local.get $0 - i32.load + call $~lib/runtime/StringBase#get:length local.set $3 local.get $1 i32.const 0 @@ -3702,358 +3884,115 @@ i32.gt_s select else - local.get $2 - local.tee $4 - local.get $3 - local.tee $5 - local.get $4 - local.get $5 - i32.lt_s - select - end - local.set $7 - local.get $7 - local.get $6 - i32.sub - local.set $3 - local.get $3 - i32.const 0 - i32.le_s - if - i32.const 256 - return - end - local.get $3 - call $~lib/internal/string/allocateUnsafe - local.set $8 - local.get $8 - i32.const 0 - local.get $0 - local.get $6 - local.get $3 - call $~lib/internal/string/copyUnsafe - local.get $8 - ) - (func $~lib/string/String#slice|trampoline (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/string/String#slice - ) - (func $~lib/internal/arraybuffer/computeSize (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 8 - i32.add - i32.const 1 - i32.sub - i32.clz - i32.sub - i32.shl - ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 1128 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.1 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 - end - local.set $1 - local.get $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/memory/memory.allocate (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/arena/__memory_allocate - return - ) - (func $~lib/internal/memory/memset (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i64) - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 + local.get $2 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + end + local.set $7 + local.get $7 + local.get $6 i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u + local.set $3 + local.get $3 + i32.const 0 + i32.le_s if + i32.const 312 return end + local.get $3 + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC + local.set $8 + block $~lib/runtime/memory.copy|inlined.9 + local.get $8 + local.set $4 + local.get $0 + local.get $6 + i32.const 1 + i32.shl + i32.add + local.set $5 + local.get $3 + i32.const 1 + i32.shl + local.set $9 + local.get $4 + local.get $5 + local.get $9 + call $~lib/internal/memory/memmove + end + block $~lib/runtime/REGISTER|inlined.6 (result i32) + local.get $8 + local.set $9 + local.get $9 + call $~lib/runtime/unref + i32.const 1 + i32.store + local.get $9 + end + ) + (func $~lib/string/String#slice|trampoline (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + global.get $~lib/builtins/i32.MAX_VALUE + local.set $2 + end local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store + local.get $1 + local.get $2 + call $~lib/string/String#slice + ) + (func $~lib/internal/arraybuffer/computeSize (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 local.get $0 i32.const 8 i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 + i32.const 1 i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 + i32.clz i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 + i32.shl + ) + (func $~lib/internal/arraybuffer/allocateUnsafe (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 1073741816 i32.le_u + i32.eqz if - return + i32.const 0 + i32.const 1432 + i32.const 26 + i32.const 2 + call $~lib/env/abort + unreachable end local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store + call $~lib/internal/arraybuffer/computeSize + call $~lib/allocator/arena/memory.allocate + local.set $1 + local.get $1 local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - end - br $continue|0 - end - end - end + local.get $1 ) - (func $~lib/array/Array#constructor (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4064,7 +4003,7 @@ i32.gt_u if i32.const 0 - i32.const 1096 + i32.const 1392 i32.const 45 i32.const 39 call $~lib/env/abort @@ -4082,7 +4021,7 @@ i32.eqz if i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/memory.allocate local.set $0 end local.get $0 @@ -4098,7 +4037,7 @@ local.get $0 local.get $1 i32.store offset=4 - block $~lib/memory/memory.fill|inlined.0 + block $~lib/runtime/memory.fill|inlined.1 local.get $3 i32.const 8 i32.add @@ -4114,7 +4053,7 @@ end local.get $0 ) - (func $~lib/array/Array#__unchecked_set (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4138,7 +4077,7 @@ local.get $5 i32.store offset=8 ) - (func $~lib/array/Array#__unchecked_get (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4158,10 +4097,10 @@ i32.add i32.load offset=8 ) - (func $~lib/allocator/arena/__memory_free (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/memory.free (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/arraybuffer/reallocateUnsafe (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4180,7 +4119,7 @@ i32.eqz if i32.const 0 - i32.const 1128 + i32.const 1432 i32.const 40 i32.const 4 call $~lib/env/abort @@ -4200,7 +4139,7 @@ local.get $1 call $~lib/internal/arraybuffer/allocateUnsafe local.set $3 - block $~lib/memory/memory.copy|inlined.2 + block $~lib/runtime/memory.copy|inlined.11 local.get $3 i32.const 8 i32.add @@ -4216,17 +4155,12 @@ local.get $6 call $~lib/internal/memory/memmove end - block $~lib/memory/memory.free|inlined.0 - local.get $0 - local.set $6 - local.get $6 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 - end + local.get $0 + call $~lib/allocator/arena/memory.free local.get $3 local.set $0 end - block $~lib/memory/memory.fill|inlined.1 + block $~lib/runtime/memory.fill|inlined.2 local.get $0 i32.const 8 i32.add @@ -4255,7 +4189,7 @@ i32.eqz if i32.const 0 - i32.const 1128 + i32.const 1432 i32.const 62 i32.const 4 call $~lib/env/abort @@ -4268,7 +4202,7 @@ end local.get $0 ) - (func $~lib/array/Array#push (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4301,7 +4235,7 @@ i32.ge_u if i32.const 0 - i32.const 1096 + i32.const 1392 i32.const 182 i32.const 42 call $~lib/env/abort @@ -4320,7 +4254,7 @@ local.get $0 local.get $5 i32.store offset=4 - block $~lib/internal/arraybuffer/STORE|inlined.2 + block $~lib/internal/arraybuffer/STORE|inlined.1 local.get $3 local.set $6 local.get $2 @@ -4341,7 +4275,7 @@ end local.get $5 ) - (func $~lib/string/String#split (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4363,8 +4297,8 @@ i32.eqz if i32.const 0 - i32.const 80 - i32.const 408 + i32.const 96 + i32.const 382 i32.const 4 call $~lib/env/abort unreachable @@ -4395,10 +4329,10 @@ return end local.get $0 - i32.load + call $~lib/runtime/StringBase#get:length local.set $4 local.get $1 - i32.load + call $~lib/runtime/StringBase#get:length local.set $5 local.get $2 i32.const 0 @@ -4444,8 +4378,8 @@ i32.eqz br_if $break|0 block - i32.const 1 - call $~lib/internal/string/allocateUnsafe + i32.const 2 + call $~lib/runtime/ALLOC local.set $8 local.get $8 local.get $0 @@ -4453,9 +4387,9 @@ i32.const 1 i32.shl i32.add - i32.load16_u offset=4 - i32.store16 offset=4 - block $~lib/internal/arraybuffer/STORE|inlined.1 + i32.load16_u + i32.store16 + block $~lib/internal/arraybuffer/STORE|inlined.0 local.get $6 local.set $9 local.get $7 @@ -4499,7 +4433,7 @@ local.tee $3 i32.const 0 local.tee $7 - i32.const 256 + i32.const 312 call $~lib/array/Array#__unchecked_set local.get $3 local.get $7 @@ -4540,21 +4474,43 @@ i32.gt_s if local.get $6 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC local.set $3 - local.get $3 - i32.const 0 - local.get $0 - local.get $15 - local.get $6 - call $~lib/internal/string/copyUnsafe + block $~lib/runtime/memory.copy|inlined.10 + local.get $3 + local.set $7 + local.get $0 + local.get $15 + i32.const 1 + i32.shl + i32.add + local.set $8 + local.get $6 + i32.const 1 + i32.shl + local.set $12 + local.get $7 + local.get $8 + local.get $12 + call $~lib/internal/memory/memmove + end local.get $13 - local.get $3 + block $~lib/runtime/REGISTER|inlined.7 (result i32) + local.get $3 + local.set $12 + local.get $12 + call $~lib/runtime/unref + i32.const 1 + i32.store + local.get $12 + end call $~lib/array/Array#push drop else local.get $13 - i32.const 256 + i32.const 312 call $~lib/array/Array#push drop end @@ -4588,11 +4544,11 @@ local.get $6 local.tee $3 i32.const 0 - local.tee $7 + local.tee $12 local.get $0 call $~lib/array/Array#__unchecked_set local.get $3 - local.get $7 + local.get $12 call $~lib/array/Array#__unchecked_get end drop @@ -4608,27 +4564,49 @@ i32.gt_s if local.get $17 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC local.set $6 - local.get $6 - i32.const 0 - local.get $0 - local.get $15 - local.get $17 - call $~lib/internal/string/copyUnsafe + block $~lib/runtime/memory.copy|inlined.12 + local.get $6 + local.set $3 + local.get $0 + local.get $15 + i32.const 1 + i32.shl + i32.add + local.set $12 + local.get $17 + i32.const 1 + i32.shl + local.set $8 + local.get $3 + local.get $12 + local.get $8 + call $~lib/internal/memory/memmove + end local.get $13 - local.get $6 + block $~lib/runtime/REGISTER|inlined.8 (result i32) + local.get $6 + local.set $8 + local.get $8 + call $~lib/runtime/unref + i32.const 1 + i32.store + local.get $8 + end call $~lib/array/Array#push drop else local.get $13 - i32.const 256 + i32.const 312 call $~lib/array/Array#push drop end local.get $13 ) - (func $~lib/string/String#split|trampoline (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split|trampoline (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -4649,7 +4627,7 @@ local.get $2 call $~lib/string/String#split ) - (func $~lib/array/Array#__get (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4682,7 +4660,7 @@ unreachable end ) - (func $~lib/internal/number/decimalCount32 (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/number/decimalCount32 (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -4751,7 +4729,7 @@ unreachable unreachable ) - (func $~lib/internal/number/utoa32_lut (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/number/utoa32_lut (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4762,7 +4740,7 @@ (local $10 i32) (local $11 i64) (local $12 i64) - i32.const 1816 + i32.const 2168 i32.load local.set $3 block $break|0 @@ -4838,7 +4816,7 @@ i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store end br $continue|0 end @@ -4885,7 +4863,7 @@ i32.shl i32.add local.get $8 - i32.store offset=4 + i32.store end local.get $1 i32.const 10 @@ -4918,7 +4896,7 @@ i32.shl i32.add local.get $7 - i32.store offset=4 + i32.store else local.get $2 i32.const 1 @@ -4934,10 +4912,10 @@ i32.shl i32.add local.get $7 - i32.store16 offset=4 + i32.store16 end ) - (func $~lib/internal/number/itoa32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/number/itoa32 (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4947,7 +4925,7 @@ local.get $0 i32.eqz if - i32.const 480 + i32.const 608 return end local.get $0 @@ -4967,7 +4945,9 @@ i32.add local.set $2 local.get $2 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC local.set $3 block $~lib/internal/number/utoa32_core|inlined.0 local.get $3 @@ -4985,11 +4965,19 @@ if local.get $3 i32.const 45 - i32.store16 offset=4 + i32.store16 + end + block $~lib/runtime/REGISTER|inlined.9 (result i32) + local.get $3 + local.set $6 + local.get $6 + call $~lib/runtime/unref + i32.const 1 + i32.store + local.get $6 end - local.get $3 ) - (func $~lib/internal/number/utoa32 (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/number/utoa32 (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4998,14 +4986,16 @@ local.get $0 i32.eqz if - i32.const 480 + i32.const 608 return end local.get $0 call $~lib/internal/number/decimalCount32 local.set $1 local.get $1 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC local.set $2 block $~lib/internal/number/utoa32_core|inlined.1 local.get $2 @@ -5019,9 +5009,17 @@ local.get $5 call $~lib/internal/number/utoa32_lut end - local.get $2 + block $~lib/runtime/REGISTER|inlined.10 (result i32) + local.get $2 + local.set $5 + local.get $5 + call $~lib/runtime/unref + i32.const 1 + i32.store + local.get $5 + end ) - (func $~lib/internal/number/decimalCount64 (; 53 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/internal/number/decimalCount64 (; 54 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -5090,7 +5088,7 @@ unreachable unreachable ) - (func $~lib/internal/number/utoa64_lut (; 54 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/internal/number/utoa64_lut (; 55 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -5105,7 +5103,7 @@ (local $14 i32) (local $15 i64) (local $16 i64) - i32.const 1816 + i32.const 2168 i32.load local.set $3 block $break|0 @@ -5200,7 +5198,7 @@ i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store block $~lib/internal/arraybuffer/LOAD|inlined.4 (result i64) local.get $3 local.set $12 @@ -5249,7 +5247,7 @@ i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store end br $continue|0 end @@ -5261,7 +5259,7 @@ local.get $2 call $~lib/internal/number/utoa32_lut ) - (func $~lib/internal/number/utoa64 (; 55 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/internal/number/utoa64 (; 56 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5272,7 +5270,7 @@ local.get $0 i64.eqz if - i32.const 480 + i32.const 608 return end local.get $0 @@ -5287,7 +5285,9 @@ call $~lib/internal/number/decimalCount32 local.set $3 local.get $3 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC local.set $1 block $~lib/internal/number/utoa32_core|inlined.2 local.get $1 @@ -5306,7 +5306,9 @@ call $~lib/internal/number/decimalCount64 local.set $3 local.get $3 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC local.set $1 block $~lib/internal/number/utoa64_core|inlined.0 local.get $1 @@ -5321,9 +5323,17 @@ call $~lib/internal/number/utoa64_lut end end - local.get $1 + block $~lib/runtime/REGISTER|inlined.11 (result i32) + local.get $1 + local.set $3 + local.get $3 + call $~lib/runtime/unref + i32.const 1 + i32.store + local.get $3 + end ) - (func $~lib/internal/number/itoa64 (; 56 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/internal/number/itoa64 (; 57 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5335,7 +5345,7 @@ local.get $0 i64.eqz if - i32.const 480 + i32.const 608 return end local.get $0 @@ -5363,7 +5373,9 @@ i32.add local.set $4 local.get $4 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC local.set $2 block $~lib/internal/number/utoa32_core|inlined.3 local.get $2 @@ -5384,7 +5396,9 @@ i32.add local.set $4 local.get $4 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC local.set $2 block $~lib/internal/number/utoa64_core|inlined.1 local.get $2 @@ -5403,23 +5417,31 @@ if local.get $2 i32.const 45 - i32.store16 offset=4 + i32.store16 + end + block $~lib/runtime/REGISTER|inlined.12 (result i32) + local.get $2 + local.set $4 + local.get $4 + call $~lib/runtime/unref + i32.const 1 + i32.store + local.get $4 end - local.get $2 ) - (func $~lib/builtins/isFinite (; 57 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 58 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 58 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 59 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/internal/number/genDigits (; 59 ;) (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/internal/number/genDigits (; 60 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -5475,7 +5497,7 @@ local.set $14 local.get $6 local.set $15 - i32.const 4104 + i32.const 4576 i32.load local.set $16 block $break|0 @@ -5706,7 +5728,7 @@ i32.const 65535 i32.and i32.add - i32.store16 offset=4 + i32.store16 end local.get $14 i32.const 1 @@ -5768,7 +5790,7 @@ i32.add local.set $25 local.get $25 - i32.load16_u offset=4 + i32.load16_u local.set $24 block $break|2 loop $continue|2 @@ -5826,7 +5848,7 @@ end local.get $25 local.get $24 - i32.store16 offset=4 + i32.store16 end local.get $15 return @@ -5879,7 +5901,7 @@ i32.const 65535 i32.and i32.add - i32.store16 offset=4 + i32.store16 end local.get $13 local.get $9 @@ -5940,7 +5962,7 @@ i32.add local.set $17 local.get $17 - i32.load16_u offset=4 + i32.load16_u local.set $20 block $break|4 loop $continue|4 @@ -5998,7 +6020,7 @@ end local.get $17 local.get $20 - i32.store16 offset=4 + i32.store16 end local.get $15 return @@ -6010,7 +6032,7 @@ end local.get $15 ) - (func $~lib/internal/number/prettify (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/internal/number/prettify (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6033,7 +6055,7 @@ i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store local.get $1 i32.const 2 i32.add @@ -6070,7 +6092,7 @@ i32.shl i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $4 i32.const 1 i32.add @@ -6090,7 +6112,7 @@ i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store local.get $3 i32.const 2 i32.add @@ -6114,16 +6136,12 @@ i32.shl i32.add local.set $4 - block $~lib/memory/memory.copy|inlined.3 + block $~lib/runtime/memory.copy|inlined.13 local.get $4 - i32.const 4 - i32.add i32.const 2 i32.add local.set $5 local.get $4 - i32.const 4 - i32.add local.set $6 i32.const 0 local.get $2 @@ -6142,7 +6160,7 @@ i32.shl i32.add i32.const 46 - i32.store16 offset=4 + i32.store16 local.get $1 i32.const 1 i32.add @@ -6164,18 +6182,14 @@ local.get $3 i32.sub local.set $4 - block $~lib/memory/memory.copy|inlined.4 + block $~lib/runtime/memory.copy|inlined.14 local.get $0 - i32.const 4 - i32.add local.get $4 i32.const 1 i32.shl i32.add local.set $7 local.get $0 - i32.const 4 - i32.add local.set $6 local.get $1 i32.const 1 @@ -6192,7 +6206,7 @@ i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store block $break|1 i32.const 2 local.set $5 @@ -6208,7 +6222,7 @@ i32.shl i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $5 i32.const 1 i32.add @@ -6229,7 +6243,7 @@ if local.get $0 i32.const 101 - i32.store16 offset=6 + i32.store16 offset=2 block $~lib/internal/number/genExponent|inlined.0 (result i32) local.get $0 i32.const 4 @@ -6272,7 +6286,7 @@ i32.const 43 local.get $6 select - i32.store16 offset=4 + i32.store16 local.get $7 end local.set $1 @@ -6285,16 +6299,12 @@ i32.const 1 i32.shl local.set $7 - block $~lib/memory/memory.copy|inlined.5 + block $~lib/runtime/memory.copy|inlined.15 local.get $0 i32.const 4 i32.add - i32.const 4 - i32.add local.set $6 local.get $0 - i32.const 4 - i32.add i32.const 2 i32.add local.set $5 @@ -6309,12 +6319,12 @@ end local.get $0 i32.const 46 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 local.get $7 i32.add i32.const 101 - i32.store16 offset=6 + i32.store16 offset=2 local.get $1 block $~lib/internal/number/genExponent|inlined.1 (result i32) local.get $0 @@ -6360,7 +6370,7 @@ i32.const 43 local.get $6 select - i32.store16 offset=4 + i32.store16 local.get $10 end i32.add @@ -6379,7 +6389,7 @@ unreachable unreachable ) - (func $~lib/internal/number/dtoa_core (; 61 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/internal/number/dtoa_core (; 62 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -6421,7 +6431,7 @@ local.set $1 local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end block $~lib/internal/number/grisu2|inlined.0 (result i32) local.get $1 @@ -6551,10 +6561,10 @@ i32.shl i32.sub global.set $~lib/internal/number/_K - i32.const 3768 + i32.const 4240 i32.load local.set $11 - i32.const 4032 + i32.const 4504 i32.load local.set $17 block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) @@ -6852,7 +6862,7 @@ local.get $2 i32.add ) - (func $~lib/string/String#substring (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6861,20 +6871,21 @@ (local $8 i32) (local $9 i32) (local $10 i32) + (local $11 i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 80 - i32.const 249 + i32.const 96 + i32.const 215 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load + call $~lib/runtime/StringBase#get:length local.set $3 local.get $1 local.tee $4 @@ -6916,6 +6927,8 @@ local.get $5 i32.lt_s select + i32.const 1 + i32.shl local.set $8 local.get $6 local.tee $4 @@ -6925,6 +6938,8 @@ local.get $5 i32.gt_s select + i32.const 1 + i32.shl local.set $9 local.get $9 local.get $8 @@ -6933,7 +6948,7 @@ local.get $3 i32.eqz if - i32.const 256 + i32.const 312 return end local.get $8 @@ -6942,7 +6957,9 @@ if (result i32) local.get $9 local.get $0 - i32.load + call $~lib/runtime/StringBase#get:length + i32.const 1 + i32.shl i32.eq else local.get $4 @@ -6952,27 +6969,46 @@ return end local.get $3 - call $~lib/internal/string/allocateUnsafe + call $~lib/runtime/ALLOC local.set $10 - local.get $10 - i32.const 0 + block $~lib/runtime/memory.copy|inlined.16 + local.get $10 + local.set $4 + local.get $0 + local.get $8 + i32.add + local.set $5 + local.get $3 + local.set $11 + local.get $4 + local.get $5 + local.get $11 + call $~lib/internal/memory/memmove + end + block $~lib/runtime/REGISTER|inlined.13 (result i32) + local.get $10 + local.set $11 + local.get $11 + call $~lib/runtime/unref + i32.const 1 + i32.store + local.get $11 + end + ) + (func $~lib/runtime/FREE (; 64 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - local.get $8 - local.get $3 - call $~lib/internal/string/copyUnsafe - local.get $10 + call $~lib/runtime/unref + call $~lib/allocator/arena/memory.free ) - (func $~lib/internal/number/dtoa (; 63 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/internal/number/dtoa (; 65 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 f64.const 0 f64.eq if - i32.const 2664 + i32.const 3136 return end local.get $0 @@ -6982,11 +7018,11 @@ local.get $0 call $~lib/builtins/isNaN if - i32.const 2680 + i32.const 3152 return end - i32.const 2696 - i32.const 2720 + i32.const 3168 + i32.const 3200 local.get $0 f64.const 0 f64.lt @@ -6994,7 +7030,9 @@ return end i32.const 28 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/ALLOC local.set $1 local.get $1 local.get $0 @@ -7005,54 +7043,35 @@ local.get $2 call $~lib/string/String#substring local.set $3 - block $~lib/internal/string/freeUnsafe|inlined.0 - local.get $1 - local.set $4 - local.get $4 - i32.eqz - if - i32.const 0 - i32.const 112 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.1 - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.1 - end - end + local.get $1 + call $~lib/runtime/FREE local.get $3 ) - (func $start:std/string (; 64 ;) (type $FUNCSIG$v) + (func $start:std/string (; 66 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) call $start:~lib/allocator/arena global.get $std/string/str - i32.const 8 + i32.const 16 i32.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 16 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.load + call $~lib/runtime/StringBase#get:length i32.const 16 i32.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 18 i32.const 0 call $~lib/env/abort @@ -7066,7 +7085,7 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 19 i32.const 0 call $~lib/env/abort @@ -7074,12 +7093,12 @@ end i32.const 0 call $~lib/string/String.fromCharCode - i32.const 168 - call $~lib/string/String.__eq + i32.const 176 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 21 i32.const 0 call $~lib/env/abort @@ -7087,12 +7106,12 @@ end i32.const 54 call $~lib/string/String.fromCharCode - i32.const 176 - call $~lib/string/String.__eq + i32.const 192 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 22 i32.const 0 call $~lib/env/abort @@ -7102,12 +7121,12 @@ i32.const 54 i32.add call $~lib/string/String.fromCharCode - i32.const 176 - call $~lib/string/String.__eq + i32.const 192 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 23 i32.const 0 call $~lib/env/abort @@ -7115,12 +7134,12 @@ end i32.const 0 call $~lib/string/String.fromCodePoint - i32.const 168 - call $~lib/string/String.__eq + i32.const 176 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 25 i32.const 0 call $~lib/env/abort @@ -7128,12 +7147,12 @@ end i32.const 54 call $~lib/string/String.fromCodePoint - i32.const 176 - call $~lib/string/String.__eq + i32.const 192 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 26 i32.const 0 call $~lib/env/abort @@ -7143,21 +7162,21 @@ call $~lib/string/String.fromCodePoint i32.eqz if - i32.const 184 - i32.const 48 + i32.const 208 + i32.const 56 i32.const 27 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 192 + i32.const 224 i32.const 0 call $~lib/string/String#startsWith i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 29 i32.const 0 call $~lib/env/abort @@ -7167,14 +7186,14 @@ i32.const 1 global.set $~lib/argc global.get $std/string/str - i32.const 216 + i32.const 256 i32.const 0 call $~lib/string/String#endsWith|trampoline end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 30 i32.const 0 call $~lib/env/abort @@ -7183,7 +7202,7 @@ block $~lib/string/String#includes|inlined.0 (result i32) global.get $std/string/str local.set $0 - i32.const 232 + i32.const 280 local.set $1 i32.const 0 local.set $2 @@ -7199,7 +7218,7 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 31 i32.const 0 call $~lib/env/abort @@ -7214,11 +7233,11 @@ call $~lib/string/String#padStart|trampoline end global.get $std/string/str - call $~lib/string/String.__eq + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 33 i32.const 0 call $~lib/env/abort @@ -7233,11 +7252,11 @@ call $~lib/string/String#padStart|trampoline end global.get $std/string/str - call $~lib/string/String.__eq + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 34 i32.const 0 call $~lib/env/abort @@ -7246,47 +7265,47 @@ block (result i32) i32.const 1 global.set $~lib/argc - i32.const 256 + i32.const 312 i32.const 3 i32.const 0 call $~lib/string/String#padStart|trampoline end - i32.const 264 - call $~lib/string/String.__eq + i32.const 320 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 35 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 + i32.const 312 i32.const 10 - i32.const 256 + i32.const 312 call $~lib/string/String#padStart - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 36 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 + i32.const 336 i32.const 100 - i32.const 256 + i32.const 312 call $~lib/string/String#padStart - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 37 i32.const 0 call $~lib/env/abort @@ -7295,47 +7314,47 @@ block (result i32) i32.const 1 global.set $~lib/argc - i32.const 288 + i32.const 352 i32.const 5 i32.const 0 call $~lib/string/String#padStart|trampoline end - i32.const 304 - call $~lib/string/String.__eq + i32.const 368 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 38 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 + i32.const 352 i32.const 6 - i32.const 320 + i32.const 392 call $~lib/string/String#padStart - i32.const 336 - call $~lib/string/String.__eq + i32.const 408 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 39 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 + i32.const 352 i32.const 8 - i32.const 320 + i32.const 392 call $~lib/string/String#padStart - i32.const 352 - call $~lib/string/String.__eq + i32.const 432 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 40 i32.const 0 call $~lib/env/abort @@ -7350,11 +7369,11 @@ call $~lib/string/String#padEnd|trampoline end global.get $std/string/str - call $~lib/string/String.__eq + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 42 i32.const 0 call $~lib/env/abort @@ -7369,11 +7388,11 @@ call $~lib/string/String#padEnd|trampoline end global.get $std/string/str - call $~lib/string/String.__eq + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 43 i32.const 0 call $~lib/env/abort @@ -7382,47 +7401,47 @@ block (result i32) i32.const 1 global.set $~lib/argc - i32.const 256 + i32.const 312 i32.const 3 i32.const 0 call $~lib/string/String#padEnd|trampoline end - i32.const 264 - call $~lib/string/String.__eq + i32.const 320 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 44 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 + i32.const 312 i32.const 10 - i32.const 256 + i32.const 312 call $~lib/string/String#padEnd - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 45 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 + i32.const 336 i32.const 100 - i32.const 256 + i32.const 312 call $~lib/string/String#padEnd - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 46 i32.const 0 call $~lib/env/abort @@ -7431,54 +7450,54 @@ block (result i32) i32.const 1 global.set $~lib/argc - i32.const 288 + i32.const 352 i32.const 5 i32.const 0 call $~lib/string/String#padEnd|trampoline end - i32.const 376 - call $~lib/string/String.__eq + i32.const 456 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 47 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 + i32.const 352 i32.const 6 - i32.const 288 + i32.const 352 call $~lib/string/String#padEnd - i32.const 392 - call $~lib/string/String.__eq + i32.const 480 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 48 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 + i32.const 352 i32.const 8 - i32.const 288 + i32.const 352 call $~lib/string/String#padEnd - i32.const 408 - call $~lib/string/String.__eq + i32.const 504 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 49 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 - i32.const 256 + i32.const 312 + i32.const 312 i32.const 0 call $~lib/string/String#indexOf i32.const 0 @@ -7486,14 +7505,14 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 51 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 - i32.const 192 + i32.const 312 + i32.const 224 i32.const 0 call $~lib/string/String#indexOf i32.const -1 @@ -7501,14 +7520,14 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 52 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 - i32.const 280 + i32.const 336 + i32.const 336 i32.const 0 call $~lib/string/String#indexOf i32.const 0 @@ -7516,7 +7535,7 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 53 i32.const 0 call $~lib/env/abort @@ -7531,14 +7550,14 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 54 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 256 + i32.const 312 i32.const 0 call $~lib/string/String#indexOf i32.const 0 @@ -7546,14 +7565,14 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 55 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 528 i32.const 0 call $~lib/string/String#indexOf i32.const 2 @@ -7561,14 +7580,14 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 56 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 440 + i32.const 544 i32.const 0 call $~lib/string/String#indexOf i32.const -1 @@ -7576,14 +7595,14 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 57 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 528 i32.const 2 call $~lib/string/String#indexOf i32.const 2 @@ -7591,14 +7610,14 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 58 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 528 i32.const 3 call $~lib/string/String#indexOf i32.const -1 @@ -7606,14 +7625,14 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 59 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 448 + i32.const 560 i32.const -1 call $~lib/string/String#indexOf i32.const 2 @@ -7621,7 +7640,7 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 60 i32.const 0 call $~lib/env/abort @@ -7630,8 +7649,8 @@ block (result i32) i32.const 1 global.set $~lib/argc - i32.const 256 - i32.const 256 + i32.const 312 + i32.const 312 i32.const 0 call $~lib/string/String#lastIndexOf|trampoline end @@ -7640,7 +7659,7 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 62 i32.const 0 call $~lib/env/abort @@ -7649,8 +7668,8 @@ block (result i32) i32.const 1 global.set $~lib/argc - i32.const 256 - i32.const 192 + i32.const 312 + i32.const 224 i32.const 0 call $~lib/string/String#lastIndexOf|trampoline end @@ -7659,7 +7678,7 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 63 i32.const 0 call $~lib/env/abort @@ -7669,17 +7688,17 @@ i32.const 1 global.set $~lib/argc global.get $std/string/str - i32.const 256 + i32.const 312 i32.const 0 call $~lib/string/String#lastIndexOf|trampoline end global.get $std/string/str - i32.load + call $~lib/runtime/StringBase#get:length i32.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 64 i32.const 0 call $~lib/env/abort @@ -7689,7 +7708,7 @@ i32.const 1 global.set $~lib/argc global.get $std/string/str - i32.const 432 + i32.const 528 i32.const 0 call $~lib/string/String#lastIndexOf|trampoline end @@ -7698,7 +7717,7 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 65 i32.const 0 call $~lib/env/abort @@ -7708,7 +7727,7 @@ i32.const 1 global.set $~lib/argc global.get $std/string/str - i32.const 440 + i32.const 544 i32.const 0 call $~lib/string/String#lastIndexOf|trampoline end @@ -7717,7 +7736,7 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 66 i32.const 0 call $~lib/env/abort @@ -7727,7 +7746,7 @@ i32.const 1 global.set $~lib/argc global.get $std/string/str - i32.const 464 + i32.const 576 i32.const 0 call $~lib/string/String#lastIndexOf|trampoline end @@ -7736,14 +7755,14 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 67 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 528 i32.const 2 call $~lib/string/String#lastIndexOf i32.const 2 @@ -7751,14 +7770,14 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 68 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 528 i32.const 3 call $~lib/string/String#lastIndexOf i32.const 2 @@ -7766,14 +7785,14 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 69 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 448 + i32.const 560 i32.const -1 call $~lib/string/String#lastIndexOf i32.const -1 @@ -7781,14 +7800,14 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 70 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 472 + i32.const 592 i32.const 0 call $~lib/string/String#lastIndexOf i32.const -1 @@ -7796,14 +7815,14 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 71 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 192 + i32.const 224 i32.const 0 call $~lib/string/String#lastIndexOf i32.const 0 @@ -7811,13 +7830,13 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 72 i32.const 0 call $~lib/env/abort unreachable end - i32.const 480 + i32.const 608 i32.const 0 call $~lib/string/parseInt f64.const 0 @@ -7825,13 +7844,13 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 78 i32.const 0 call $~lib/env/abort unreachable end - i32.const 488 + i32.const 624 i32.const 0 call $~lib/string/parseInt f64.const 1 @@ -7839,13 +7858,13 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 79 i32.const 0 call $~lib/env/abort unreachable end - i32.const 496 + i32.const 640 i32.const 0 call $~lib/string/parseInt f64.const 5 @@ -7853,13 +7872,13 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 80 i32.const 0 call $~lib/env/abort unreachable end - i32.const 512 + i32.const 664 i32.const 0 call $~lib/string/parseInt f64.const 455 @@ -7867,13 +7886,13 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 81 i32.const 0 call $~lib/env/abort unreachable end - i32.const 528 + i32.const 688 i32.const 0 call $~lib/string/parseInt f64.const 3855 @@ -7881,13 +7900,13 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 82 i32.const 0 call $~lib/env/abort unreachable end - i32.const 544 + i32.const 712 i32.const 0 call $~lib/string/parseInt f64.const 3855 @@ -7895,13 +7914,13 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 83 i32.const 0 call $~lib/env/abort unreachable end - i32.const 560 + i32.const 736 i32.const 0 call $~lib/string/parseInt f64.const 11 @@ -7909,13 +7928,13 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 84 i32.const 0 call $~lib/env/abort unreachable end - i32.const 576 + i32.const 752 i32.const 0 call $~lib/string/parseInt f64.const 1 @@ -7923,455 +7942,455 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 85 i32.const 0 call $~lib/env/abort unreachable end - i32.const 480 + i32.const 608 call $~lib/string/parseFloat f64.const 0 f64.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 87 i32.const 0 call $~lib/env/abort unreachable end - i32.const 488 + i32.const 624 call $~lib/string/parseFloat f64.const 1 f64.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 88 i32.const 0 call $~lib/env/abort unreachable end - i32.const 592 + i32.const 768 call $~lib/string/parseFloat f64.const 0.1 f64.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 89 i32.const 0 call $~lib/env/abort unreachable end - i32.const 608 + i32.const 784 call $~lib/string/parseFloat f64.const 0.25 f64.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 90 i32.const 0 call $~lib/env/abort unreachable end - i32.const 624 + i32.const 800 call $~lib/string/parseFloat f64.const 0.1 f64.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 91 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 - i32.const 648 - call $~lib/string/String.__concat + i32.const 336 + i32.const 824 + call $~lib/string/String.concat global.set $std/string/c global.get $std/string/c - i32.const 656 - call $~lib/string/String.__eq + i32.const 840 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 94 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/c - i32.const 280 - call $~lib/string/String.__ne + i32.const 336 + call $~lib/string/String.ne i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 95 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + i32.const 312 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 96 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 + i32.const 312 global.get $std/string/nullStr - call $~lib/string/String.__ne + call $~lib/string/String.ne i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 97 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/nullStr - i32.const 256 - call $~lib/string/String.__ne + i32.const 312 + call $~lib/string/String.ne i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 98 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 - i32.const 648 - call $~lib/string/String.__ne + i32.const 336 + i32.const 824 + call $~lib/string/String.ne i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 99 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + i32.const 336 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 100 i32.const 0 call $~lib/env/abort unreachable end - i32.const 664 - i32.const 680 - call $~lib/string/String.__ne + i32.const 856 + i32.const 872 + call $~lib/string/String.ne i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 101 i32.const 0 call $~lib/env/abort unreachable end - i32.const 664 - i32.const 664 - call $~lib/string/String.__eq + i32.const 856 + i32.const 856 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 102 i32.const 0 call $~lib/env/abort unreachable end - i32.const 696 - i32.const 712 - call $~lib/string/String.__ne + i32.const 888 + i32.const 904 + call $~lib/string/String.ne i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 103 i32.const 0 call $~lib/env/abort unreachable end - i32.const 728 - i32.const 744 - call $~lib/string/String.__ne + i32.const 920 + i32.const 944 + call $~lib/string/String.ne i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 104 i32.const 0 call $~lib/env/abort unreachable end - i32.const 760 - i32.const 760 - call $~lib/string/String.__eq + i32.const 968 + i32.const 968 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 105 i32.const 0 call $~lib/env/abort unreachable end - i32.const 760 - i32.const 784 - call $~lib/string/String.__ne + i32.const 968 + i32.const 992 + call $~lib/string/String.ne i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 106 i32.const 0 call $~lib/env/abort unreachable end - i32.const 808 - i32.const 840 - call $~lib/string/String.__ne + i32.const 1016 + i32.const 1048 + call $~lib/string/String.ne i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 107 i32.const 0 call $~lib/env/abort unreachable end - i32.const 648 - i32.const 280 - call $~lib/string/String.__gt + i32.const 824 + i32.const 336 + call $~lib/string/String.gt i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 109 i32.const 0 call $~lib/env/abort unreachable end - i32.const 864 - i32.const 280 - call $~lib/string/String.__gt + i32.const 1080 + i32.const 336 + call $~lib/string/String.gt i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 110 i32.const 0 call $~lib/env/abort unreachable end - i32.const 864 - i32.const 872 - call $~lib/string/String.__gte + i32.const 1080 + i32.const 1096 + call $~lib/string/String.gte i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 111 i32.const 0 call $~lib/env/abort unreachable end - i32.const 864 - i32.const 656 - call $~lib/string/String.__gt + i32.const 1080 + i32.const 840 + call $~lib/string/String.gt i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 112 i32.const 0 call $~lib/env/abort unreachable end - i32.const 864 - i32.const 656 - call $~lib/string/String.__lt + i32.const 1080 + i32.const 840 + call $~lib/string/String.lt i32.eqz i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 113 i32.const 0 call $~lib/env/abort unreachable end - i32.const 648 + i32.const 824 global.get $std/string/nullStr - call $~lib/string/String.__lt + call $~lib/string/String.lt i32.eqz i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 115 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/nullStr - i32.const 648 - call $~lib/string/String.__lt + i32.const 824 + call $~lib/string/String.lt i32.eqz i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 116 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 - i32.const 256 - call $~lib/string/String.__gt + i32.const 352 + i32.const 312 + call $~lib/string/String.gt i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 118 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 - i32.const 288 - call $~lib/string/String.__lt + i32.const 312 + i32.const 352 + call $~lib/string/String.lt i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 119 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 - i32.const 256 - call $~lib/string/String.__gte + i32.const 352 + i32.const 312 + call $~lib/string/String.gte i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 120 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 - i32.const 288 - call $~lib/string/String.__lte + i32.const 312 + i32.const 352 + call $~lib/string/String.lte i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 121 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 - i32.const 256 - call $~lib/string/String.__lt + i32.const 352 + i32.const 312 + call $~lib/string/String.lt i32.eqz i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 122 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 - i32.const 288 - call $~lib/string/String.__gt + i32.const 312 + i32.const 352 + call $~lib/string/String.gt i32.eqz i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 123 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 - i32.const 256 - call $~lib/string/String.__lt + i32.const 312 + i32.const 312 + call $~lib/string/String.lt i32.eqz i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 124 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 - i32.const 256 - call $~lib/string/String.__gt + i32.const 312 + i32.const 312 + call $~lib/string/String.gt i32.eqz i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 125 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 - i32.const 256 - call $~lib/string/String.__gte + i32.const 312 + i32.const 312 + call $~lib/string/String.gte i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 126 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 - i32.const 256 - call $~lib/string/String.__lte + i32.const 312 + i32.const 312 + call $~lib/string/String.lte i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 127 i32.const 0 call $~lib/env/abort @@ -8384,160 +8403,160 @@ call $~lib/string/String.fromCodePoint i32.const 56322 call $~lib/string/String.fromCodePoint - call $~lib/string/String.__concat + call $~lib/string/String.concat global.set $std/string/b global.get $std/string/a global.get $std/string/b - call $~lib/string/String.__gt + call $~lib/string/String.gt i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 131 i32.const 0 call $~lib/env/abort unreachable end - i32.const 320 - i32.load + i32.const 392 + call $~lib/runtime/StringBase#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 133 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 + i32.const 312 i32.const 100 call $~lib/string/String#repeat - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 135 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 + i32.const 336 i32.const 0 call $~lib/string/String#repeat - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 136 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 + i32.const 336 i32.const 1 call $~lib/string/String#repeat - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 137 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 + i32.const 336 i32.const 2 call $~lib/string/String#repeat - i32.const 872 - call $~lib/string/String.__eq + i32.const 1096 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 138 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 + i32.const 336 i32.const 3 call $~lib/string/String#repeat - i32.const 880 - call $~lib/string/String.__eq + i32.const 1112 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 139 i32.const 0 call $~lib/env/abort unreachable end - i32.const 656 + i32.const 840 i32.const 4 call $~lib/string/String#repeat - i32.const 896 - call $~lib/string/String.__eq + i32.const 1128 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 140 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 + i32.const 336 i32.const 5 call $~lib/string/String#repeat - i32.const 920 - call $~lib/string/String.__eq + i32.const 1152 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 141 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 + i32.const 336 i32.const 6 call $~lib/string/String#repeat - i32.const 936 - call $~lib/string/String.__eq + i32.const 1176 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 142 i32.const 0 call $~lib/env/abort unreachable end - i32.const 280 + i32.const 336 i32.const 7 call $~lib/string/String#repeat - i32.const 952 - call $~lib/string/String.__eq + i32.const 1200 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 143 i32.const 0 call $~lib/env/abort unreachable end - i32.const 976 + i32.const 1224 global.set $std/string/str block (result i32) i32.const 1 @@ -8547,12 +8566,12 @@ i32.const 0 call $~lib/string/String#slice|trampoline end - i32.const 976 - call $~lib/string/String.__eq + i32.const 1224 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 147 i32.const 0 call $~lib/env/abort @@ -8566,12 +8585,12 @@ i32.const 0 call $~lib/string/String#slice|trampoline end - i32.const 1008 - call $~lib/string/String.__eq + i32.const 1264 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 148 i32.const 0 call $~lib/env/abort @@ -8585,12 +8604,12 @@ i32.const 0 call $~lib/string/String#slice|trampoline end - i32.const 1016 - call $~lib/string/String.__eq + i32.const 1280 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 149 i32.const 0 call $~lib/env/abort @@ -8600,12 +8619,12 @@ i32.const 2 i32.const 7 call $~lib/string/String#slice - i32.const 1032 - call $~lib/string/String.__eq + i32.const 1304 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 150 i32.const 0 call $~lib/env/abort @@ -8615,12 +8634,12 @@ i32.const -11 i32.const -6 call $~lib/string/String#slice - i32.const 1048 - call $~lib/string/String.__eq + i32.const 1328 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 151 i32.const 0 call $~lib/env/abort @@ -8630,12 +8649,12 @@ i32.const 4 i32.const 3 call $~lib/string/String#slice - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 152 i32.const 0 call $~lib/env/abort @@ -8645,12 +8664,12 @@ i32.const 0 i32.const -1 call $~lib/string/String#slice - i32.const 1064 - call $~lib/string/String.__eq + i32.const 1352 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 153 i32.const 0 call $~lib/env/abort @@ -8659,7 +8678,7 @@ block (result i32) i32.const 0 global.set $~lib/argc - i32.const 256 + i32.const 312 i32.const 0 i32.const 0 call $~lib/string/String#split|trampoline @@ -8678,15 +8697,15 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq else local.get $2 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 158 i32.const 0 call $~lib/env/abort @@ -8695,8 +8714,8 @@ block (result i32) i32.const 1 global.set $~lib/argc - i32.const 256 - i32.const 256 + i32.const 312 + i32.const 312 i32.const 0 call $~lib/string/String#split|trampoline end @@ -8712,7 +8731,7 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 160 i32.const 0 call $~lib/env/abort @@ -8721,8 +8740,8 @@ block (result i32) i32.const 1 global.set $~lib/argc - i32.const 256 - i32.const 432 + i32.const 312 + i32.const 528 i32.const 0 call $~lib/string/String#split|trampoline end @@ -8740,15 +8759,15 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq else local.get $2 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 162 i32.const 0 call $~lib/env/abort @@ -8757,8 +8776,8 @@ block (result i32) i32.const 1 global.set $~lib/argc - i32.const 1192 - i32.const 1208 + i32.const 1496 + i32.const 1520 i32.const 0 call $~lib/string/String#split|trampoline end @@ -8776,15 +8795,15 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 1192 - call $~lib/string/String.__eq + i32.const 1496 + call $~lib/string/String.eq else local.get $2 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 164 i32.const 0 call $~lib/env/abort @@ -8793,8 +8812,8 @@ block (result i32) i32.const 1 global.set $~lib/argc - i32.const 1192 - i32.const 432 + i32.const 1496 + i32.const 528 i32.const 0 call $~lib/string/String#split|trampoline end @@ -8812,8 +8831,8 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq else local.get $2 end @@ -8822,8 +8841,8 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 648 - call $~lib/string/String.__eq + i32.const 824 + call $~lib/string/String.eq else local.get $2 end @@ -8832,15 +8851,15 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1216 - call $~lib/string/String.__eq + i32.const 1536 + call $~lib/string/String.eq else local.get $2 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 166 i32.const 0 call $~lib/env/abort @@ -8849,8 +8868,8 @@ block (result i32) i32.const 1 global.set $~lib/argc - i32.const 1224 - i32.const 1248 + i32.const 1552 + i32.const 1576 i32.const 0 call $~lib/string/String#split|trampoline end @@ -8868,8 +8887,8 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq else local.get $2 end @@ -8878,8 +8897,8 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 648 - call $~lib/string/String.__eq + i32.const 824 + call $~lib/string/String.eq else local.get $2 end @@ -8888,15 +8907,15 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1216 - call $~lib/string/String.__eq + i32.const 1536 + call $~lib/string/String.eq else local.get $2 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 168 i32.const 0 call $~lib/env/abort @@ -8905,8 +8924,8 @@ block (result i32) i32.const 1 global.set $~lib/argc - i32.const 1256 - i32.const 432 + i32.const 1592 + i32.const 528 i32.const 0 call $~lib/string/String#split|trampoline end @@ -8924,8 +8943,8 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq else local.get $2 end @@ -8934,8 +8953,8 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 648 - call $~lib/string/String.__eq + i32.const 824 + call $~lib/string/String.eq else local.get $2 end @@ -8944,8 +8963,8 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq else local.get $2 end @@ -8954,15 +8973,15 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array#__get - i32.const 1216 - call $~lib/string/String.__eq + i32.const 1536 + call $~lib/string/String.eq else local.get $2 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 170 i32.const 0 call $~lib/env/abort @@ -8971,8 +8990,8 @@ block (result i32) i32.const 1 global.set $~lib/argc - i32.const 1272 - i32.const 432 + i32.const 1616 + i32.const 528 i32.const 0 call $~lib/string/String#split|trampoline end @@ -8990,8 +9009,8 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq else local.get $2 end @@ -9000,8 +9019,8 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq else local.get $2 end @@ -9010,8 +9029,8 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 648 - call $~lib/string/String.__eq + i32.const 824 + call $~lib/string/String.eq else local.get $2 end @@ -9020,15 +9039,15 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array#__get - i32.const 1216 - call $~lib/string/String.__eq + i32.const 1536 + call $~lib/string/String.eq else local.get $2 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 172 i32.const 0 call $~lib/env/abort @@ -9037,8 +9056,8 @@ block (result i32) i32.const 1 global.set $~lib/argc - i32.const 1288 - i32.const 432 + i32.const 1640 + i32.const 528 i32.const 0 call $~lib/string/String#split|trampoline end @@ -9056,8 +9075,8 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq else local.get $2 end @@ -9066,8 +9085,8 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 648 - call $~lib/string/String.__eq + i32.const 824 + call $~lib/string/String.eq else local.get $2 end @@ -9076,8 +9095,8 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1216 - call $~lib/string/String.__eq + i32.const 1536 + call $~lib/string/String.eq else local.get $2 end @@ -9086,15 +9105,15 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array#__get - i32.const 256 - call $~lib/string/String.__eq + i32.const 312 + call $~lib/string/String.eq else local.get $2 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 174 i32.const 0 call $~lib/env/abort @@ -9103,8 +9122,8 @@ block (result i32) i32.const 1 global.set $~lib/argc - i32.const 288 - i32.const 256 + i32.const 352 + i32.const 312 i32.const 0 call $~lib/string/String#split|trampoline end @@ -9122,8 +9141,8 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq else local.get $2 end @@ -9132,8 +9151,8 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 648 - call $~lib/string/String.__eq + i32.const 824 + call $~lib/string/String.eq else local.get $2 end @@ -9142,22 +9161,22 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1216 - call $~lib/string/String.__eq + i32.const 1536 + call $~lib/string/String.eq else local.get $2 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 176 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 - i32.const 256 + i32.const 352 + i32.const 312 i32.const 0 call $~lib/string/String#split global.set $std/string/sa @@ -9172,14 +9191,14 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 178 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 - i32.const 256 + i32.const 352 + i32.const 312 i32.const 1 call $~lib/string/String#split global.set $std/string/sa @@ -9196,22 +9215,22 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq else local.get $2 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 180 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1192 - i32.const 432 + i32.const 1496 + i32.const 528 i32.const 1 call $~lib/string/String#split global.set $std/string/sa @@ -9228,22 +9247,22 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq else local.get $2 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 182 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 - i32.const 256 + i32.const 352 + i32.const 312 i32.const 4 call $~lib/string/String#split global.set $std/string/sa @@ -9260,8 +9279,8 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq else local.get $2 end @@ -9270,8 +9289,8 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 648 - call $~lib/string/String.__eq + i32.const 824 + call $~lib/string/String.eq else local.get $2 end @@ -9280,22 +9299,22 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1216 - call $~lib/string/String.__eq + i32.const 1536 + call $~lib/string/String.eq else local.get $2 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 184 i32.const 0 call $~lib/env/abort unreachable end - i32.const 288 - i32.const 256 + i32.const 352 + i32.const 312 i32.const -1 call $~lib/string/String#split global.set $std/string/sa @@ -9312,8 +9331,8 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq else local.get $2 end @@ -9322,8 +9341,8 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 648 - call $~lib/string/String.__eq + i32.const 824 + call $~lib/string/String.eq else local.get $2 end @@ -9332,22 +9351,22 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1216 - call $~lib/string/String.__eq + i32.const 1536 + call $~lib/string/String.eq else local.get $2 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 186 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1192 - i32.const 432 + i32.const 1496 + i32.const 528 i32.const -1 call $~lib/string/String#split global.set $std/string/sa @@ -9364,8 +9383,8 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 280 - call $~lib/string/String.__eq + i32.const 336 + call $~lib/string/String.eq else local.get $2 end @@ -9374,8 +9393,8 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 648 - call $~lib/string/String.__eq + i32.const 824 + call $~lib/string/String.eq else local.get $2 end @@ -9384,15 +9403,15 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1216 - call $~lib/string/String.__eq + i32.const 1536 + call $~lib/string/String.eq else local.get $2 end i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 188 i32.const 0 call $~lib/env/abort @@ -9400,12 +9419,12 @@ end i32.const 0 call $~lib/internal/number/itoa32 - i32.const 480 - call $~lib/string/String.__eq + i32.const 608 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 190 i32.const 0 call $~lib/env/abort @@ -9413,12 +9432,12 @@ end i32.const 1 call $~lib/internal/number/itoa32 - i32.const 488 - call $~lib/string/String.__eq + i32.const 624 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 191 i32.const 0 call $~lib/env/abort @@ -9426,12 +9445,12 @@ end i32.const 8 call $~lib/internal/number/itoa32 - i32.const 1824 - call $~lib/string/String.__eq + i32.const 2184 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 192 i32.const 0 call $~lib/env/abort @@ -9439,12 +9458,12 @@ end i32.const 123 call $~lib/internal/number/itoa32 - i32.const 320 - call $~lib/string/String.__eq + i32.const 392 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 193 i32.const 0 call $~lib/env/abort @@ -9452,12 +9471,12 @@ end i32.const -1000 call $~lib/internal/number/itoa32 - i32.const 1832 - call $~lib/string/String.__eq + i32.const 2200 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 194 i32.const 0 call $~lib/env/abort @@ -9465,12 +9484,12 @@ end i32.const 1234 call $~lib/internal/number/itoa32 - i32.const 1848 - call $~lib/string/String.__eq + i32.const 2224 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 195 i32.const 0 call $~lib/env/abort @@ -9478,12 +9497,12 @@ end i32.const 12345 call $~lib/internal/number/itoa32 - i32.const 1864 - call $~lib/string/String.__eq + i32.const 2240 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 196 i32.const 0 call $~lib/env/abort @@ -9491,12 +9510,12 @@ end i32.const 123456 call $~lib/internal/number/itoa32 - i32.const 1880 - call $~lib/string/String.__eq + i32.const 2264 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 197 i32.const 0 call $~lib/env/abort @@ -9504,12 +9523,12 @@ end i32.const 1111111 call $~lib/internal/number/itoa32 - i32.const 1896 - call $~lib/string/String.__eq + i32.const 2288 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 198 i32.const 0 call $~lib/env/abort @@ -9517,12 +9536,12 @@ end i32.const 1234567 call $~lib/internal/number/itoa32 - i32.const 1920 - call $~lib/string/String.__eq + i32.const 2312 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 199 i32.const 0 call $~lib/env/abort @@ -9530,12 +9549,12 @@ end i32.const 2147483646 call $~lib/internal/number/itoa32 - i32.const 1944 - call $~lib/string/String.__eq + i32.const 2336 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 200 i32.const 0 call $~lib/env/abort @@ -9543,12 +9562,12 @@ end i32.const 2147483647 call $~lib/internal/number/itoa32 - i32.const 1968 - call $~lib/string/String.__eq + i32.const 2368 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 201 i32.const 0 call $~lib/env/abort @@ -9556,12 +9575,12 @@ end i32.const -2147483648 call $~lib/internal/number/itoa32 - i32.const 1992 - call $~lib/string/String.__eq + i32.const 2400 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 202 i32.const 0 call $~lib/env/abort @@ -9569,12 +9588,12 @@ end i32.const -1 call $~lib/internal/number/itoa32 - i32.const 2024 - call $~lib/string/String.__eq + i32.const 2432 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 203 i32.const 0 call $~lib/env/abort @@ -9582,12 +9601,12 @@ end i32.const 0 call $~lib/internal/number/utoa32 - i32.const 480 - call $~lib/string/String.__eq + i32.const 608 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 205 i32.const 0 call $~lib/env/abort @@ -9595,12 +9614,12 @@ end i32.const 1000 call $~lib/internal/number/utoa32 - i32.const 2032 - call $~lib/string/String.__eq + i32.const 2448 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 206 i32.const 0 call $~lib/env/abort @@ -9608,12 +9627,12 @@ end i32.const 2147483647 call $~lib/internal/number/utoa32 - i32.const 1968 - call $~lib/string/String.__eq + i32.const 2368 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 207 i32.const 0 call $~lib/env/abort @@ -9621,12 +9640,12 @@ end i32.const -2147483648 call $~lib/internal/number/utoa32 - i32.const 2048 - call $~lib/string/String.__eq + i32.const 2464 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 208 i32.const 0 call $~lib/env/abort @@ -9634,12 +9653,12 @@ end global.get $~lib/builtins/u32.MAX_VALUE call $~lib/internal/number/utoa32 - i32.const 2072 - call $~lib/string/String.__eq + i32.const 2496 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 209 i32.const 0 call $~lib/env/abort @@ -9647,12 +9666,12 @@ end i64.const 0 call $~lib/internal/number/utoa64 - i32.const 480 - call $~lib/string/String.__eq + i32.const 608 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 211 i32.const 0 call $~lib/env/abort @@ -9660,12 +9679,12 @@ end i64.const 1234 call $~lib/internal/number/utoa64 - i32.const 1848 - call $~lib/string/String.__eq + i32.const 2224 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 212 i32.const 0 call $~lib/env/abort @@ -9673,12 +9692,12 @@ end i64.const 99999999 call $~lib/internal/number/utoa64 - i32.const 2096 - call $~lib/string/String.__eq + i32.const 2528 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 213 i32.const 0 call $~lib/env/abort @@ -9686,12 +9705,12 @@ end i64.const 100000000 call $~lib/internal/number/utoa64 - i32.const 2120 - call $~lib/string/String.__eq + i32.const 2552 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 214 i32.const 0 call $~lib/env/abort @@ -9699,12 +9718,12 @@ end i64.const 4294967295 call $~lib/internal/number/utoa64 - i32.const 2072 - call $~lib/string/String.__eq + i32.const 2496 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 215 i32.const 0 call $~lib/env/abort @@ -9712,12 +9731,12 @@ end i64.const 68719476735 call $~lib/internal/number/utoa64 - i32.const 2144 - call $~lib/string/String.__eq + i32.const 2584 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 216 i32.const 0 call $~lib/env/abort @@ -9725,12 +9744,12 @@ end i64.const 868719476735 call $~lib/internal/number/utoa64 - i32.const 2176 - call $~lib/string/String.__eq + i32.const 2616 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 217 i32.const 0 call $~lib/env/abort @@ -9738,12 +9757,12 @@ end i64.const 999868719476735 call $~lib/internal/number/utoa64 - i32.const 2208 - call $~lib/string/String.__eq + i32.const 2648 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 218 i32.const 0 call $~lib/env/abort @@ -9751,12 +9770,12 @@ end i64.const 9999868719476735 call $~lib/internal/number/utoa64 - i32.const 2248 - call $~lib/string/String.__eq + i32.const 2688 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 219 i32.const 0 call $~lib/env/abort @@ -9764,12 +9783,12 @@ end i64.const 19999868719476735 call $~lib/internal/number/utoa64 - i32.const 2288 - call $~lib/string/String.__eq + i32.const 2728 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 220 i32.const 0 call $~lib/env/abort @@ -9777,12 +9796,12 @@ end global.get $~lib/builtins/u64.MAX_VALUE call $~lib/internal/number/utoa64 - i32.const 2328 - call $~lib/string/String.__eq + i32.const 2776 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 221 i32.const 0 call $~lib/env/abort @@ -9790,12 +9809,12 @@ end i64.const 0 call $~lib/internal/number/itoa64 - i32.const 480 - call $~lib/string/String.__eq + i32.const 608 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 223 i32.const 0 call $~lib/env/abort @@ -9803,12 +9822,12 @@ end i64.const -1234 call $~lib/internal/number/itoa64 - i32.const 2376 - call $~lib/string/String.__eq + i32.const 2824 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 224 i32.const 0 call $~lib/env/abort @@ -9816,12 +9835,12 @@ end i64.const 4294967295 call $~lib/internal/number/itoa64 - i32.const 2072 - call $~lib/string/String.__eq + i32.const 2496 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 225 i32.const 0 call $~lib/env/abort @@ -9829,12 +9848,12 @@ end i64.const -4294967295 call $~lib/internal/number/itoa64 - i32.const 2392 - call $~lib/string/String.__eq + i32.const 2848 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 226 i32.const 0 call $~lib/env/abort @@ -9842,12 +9861,12 @@ end i64.const 68719476735 call $~lib/internal/number/itoa64 - i32.const 2144 - call $~lib/string/String.__eq + i32.const 2584 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 227 i32.const 0 call $~lib/env/abort @@ -9855,12 +9874,12 @@ end i64.const -68719476735 call $~lib/internal/number/itoa64 - i32.const 2424 - call $~lib/string/String.__eq + i32.const 2880 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 228 i32.const 0 call $~lib/env/abort @@ -9868,12 +9887,12 @@ end i64.const -868719476735 call $~lib/internal/number/itoa64 - i32.const 2456 - call $~lib/string/String.__eq + i32.const 2912 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 229 i32.const 0 call $~lib/env/abort @@ -9881,12 +9900,12 @@ end i64.const -999868719476735 call $~lib/internal/number/itoa64 - i32.const 2488 - call $~lib/string/String.__eq + i32.const 2952 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 230 i32.const 0 call $~lib/env/abort @@ -9894,12 +9913,12 @@ end i64.const -19999868719476735 call $~lib/internal/number/itoa64 - i32.const 2528 - call $~lib/string/String.__eq + i32.const 2992 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 231 i32.const 0 call $~lib/env/abort @@ -9907,12 +9926,12 @@ end global.get $~lib/builtins/i64.MAX_VALUE call $~lib/internal/number/itoa64 - i32.const 2568 - call $~lib/string/String.__eq + i32.const 3040 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 232 i32.const 0 call $~lib/env/abort @@ -9920,12 +9939,12 @@ end global.get $~lib/builtins/i64.MIN_VALUE call $~lib/internal/number/itoa64 - i32.const 2616 - call $~lib/string/String.__eq + i32.const 3088 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 233 i32.const 0 call $~lib/env/abort @@ -9933,12 +9952,12 @@ end f64.const 0 call $~lib/internal/number/dtoa - i32.const 2664 - call $~lib/string/String.__eq + i32.const 3136 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 236 i32.const 0 call $~lib/env/abort @@ -9946,12 +9965,12 @@ end f64.const -0 call $~lib/internal/number/dtoa - i32.const 2664 - call $~lib/string/String.__eq + i32.const 3136 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 237 i32.const 0 call $~lib/env/abort @@ -9959,12 +9978,12 @@ end f64.const nan:0x8000000000000 call $~lib/internal/number/dtoa - i32.const 2680 - call $~lib/string/String.__eq + i32.const 3152 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 238 i32.const 0 call $~lib/env/abort @@ -9972,12 +9991,12 @@ end f64.const inf call $~lib/internal/number/dtoa - i32.const 2720 - call $~lib/string/String.__eq + i32.const 3200 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 239 i32.const 0 call $~lib/env/abort @@ -9986,12 +10005,12 @@ f64.const inf f64.neg call $~lib/internal/number/dtoa - i32.const 2696 - call $~lib/string/String.__eq + i32.const 3168 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 240 i32.const 0 call $~lib/env/abort @@ -9999,12 +10018,12 @@ end global.get $~lib/builtins/f64.EPSILON call $~lib/internal/number/dtoa - i32.const 4112 - call $~lib/string/String.__eq + i32.const 4592 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 241 i32.const 0 call $~lib/env/abort @@ -10013,12 +10032,12 @@ global.get $~lib/builtins/f64.EPSILON f64.neg call $~lib/internal/number/dtoa - i32.const 4160 - call $~lib/string/String.__eq + i32.const 4648 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 242 i32.const 0 call $~lib/env/abort @@ -10026,12 +10045,12 @@ end global.get $~lib/builtins/f64.MAX_VALUE call $~lib/internal/number/dtoa - i32.const 4208 - call $~lib/string/String.__eq + i32.const 4704 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 243 i32.const 0 call $~lib/env/abort @@ -10040,12 +10059,12 @@ global.get $~lib/builtins/f64.MAX_VALUE f64.neg call $~lib/internal/number/dtoa - i32.const 4264 - call $~lib/string/String.__eq + i32.const 4760 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 244 i32.const 0 call $~lib/env/abort @@ -10053,12 +10072,12 @@ end f64.const 4185580496821356722454785e274 call $~lib/internal/number/dtoa - i32.const 4320 - call $~lib/string/String.__eq + i32.const 4816 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 245 i32.const 0 call $~lib/env/abort @@ -10066,12 +10085,12 @@ end f64.const 2.2250738585072014e-308 call $~lib/internal/number/dtoa - i32.const 4368 - call $~lib/string/String.__eq + i32.const 4872 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 246 i32.const 0 call $~lib/env/abort @@ -10079,12 +10098,12 @@ end f64.const 4.940656e-318 call $~lib/internal/number/dtoa - i32.const 4424 - call $~lib/string/String.__eq + i32.const 4928 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 249 i32.const 0 call $~lib/env/abort @@ -10092,12 +10111,12 @@ end f64.const 9060801153433600 call $~lib/internal/number/dtoa - i32.const 4456 - call $~lib/string/String.__eq + i32.const 4968 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 250 i32.const 0 call $~lib/env/abort @@ -10105,12 +10124,12 @@ end f64.const 4708356024711512064 call $~lib/internal/number/dtoa - i32.const 4496 - call $~lib/string/String.__eq + i32.const 5016 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 251 i32.const 0 call $~lib/env/abort @@ -10118,12 +10137,12 @@ end f64.const 9409340012568248320 call $~lib/internal/number/dtoa - i32.const 4544 - call $~lib/string/String.__eq + i32.const 5072 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 252 i32.const 0 call $~lib/env/abort @@ -10131,12 +10150,12 @@ end f64.const 5e-324 call $~lib/internal/number/dtoa - i32.const 4592 - call $~lib/string/String.__eq + i32.const 5128 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 253 i32.const 0 call $~lib/env/abort @@ -10144,12 +10163,12 @@ end f64.const 1 call $~lib/internal/number/dtoa - i32.const 4608 - call $~lib/string/String.__eq + i32.const 5152 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 259 i32.const 0 call $~lib/env/abort @@ -10157,12 +10176,12 @@ end f64.const 0.1 call $~lib/internal/number/dtoa - i32.const 592 - call $~lib/string/String.__eq + i32.const 768 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 260 i32.const 0 call $~lib/env/abort @@ -10170,12 +10189,12 @@ end f64.const -1 call $~lib/internal/number/dtoa - i32.const 4624 - call $~lib/string/String.__eq + i32.const 5168 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 261 i32.const 0 call $~lib/env/abort @@ -10183,12 +10202,12 @@ end f64.const -0.1 call $~lib/internal/number/dtoa - i32.const 4640 - call $~lib/string/String.__eq + i32.const 5184 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 262 i32.const 0 call $~lib/env/abort @@ -10196,12 +10215,12 @@ end f64.const 1e6 call $~lib/internal/number/dtoa - i32.const 4656 - call $~lib/string/String.__eq + i32.const 5200 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 264 i32.const 0 call $~lib/env/abort @@ -10209,12 +10228,12 @@ end f64.const 1e-06 call $~lib/internal/number/dtoa - i32.const 4680 - call $~lib/string/String.__eq + i32.const 5232 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 265 i32.const 0 call $~lib/env/abort @@ -10222,12 +10241,12 @@ end f64.const -1e6 call $~lib/internal/number/dtoa - i32.const 4704 - call $~lib/string/String.__eq + i32.const 5256 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 266 i32.const 0 call $~lib/env/abort @@ -10235,12 +10254,12 @@ end f64.const -1e-06 call $~lib/internal/number/dtoa - i32.const 4728 - call $~lib/string/String.__eq + i32.const 5288 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 267 i32.const 0 call $~lib/env/abort @@ -10248,12 +10267,12 @@ end f64.const 1e7 call $~lib/internal/number/dtoa - i32.const 4752 - call $~lib/string/String.__eq + i32.const 5320 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 268 i32.const 0 call $~lib/env/abort @@ -10261,12 +10280,12 @@ end f64.const 1e-07 call $~lib/internal/number/dtoa - i32.const 4776 - call $~lib/string/String.__eq + i32.const 5352 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 269 i32.const 0 call $~lib/env/abort @@ -10274,12 +10293,12 @@ end f64.const 1.e+308 call $~lib/internal/number/dtoa - i32.const 4792 - call $~lib/string/String.__eq + i32.const 5368 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 271 i32.const 0 call $~lib/env/abort @@ -10287,12 +10306,12 @@ end f64.const -1.e+308 call $~lib/internal/number/dtoa - i32.const 4808 - call $~lib/string/String.__eq + i32.const 5392 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 272 i32.const 0 call $~lib/env/abort @@ -10300,12 +10319,12 @@ end f64.const inf call $~lib/internal/number/dtoa - i32.const 2720 - call $~lib/string/String.__eq + i32.const 3200 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 273 i32.const 0 call $~lib/env/abort @@ -10313,12 +10332,12 @@ end f64.const -inf call $~lib/internal/number/dtoa - i32.const 2696 - call $~lib/string/String.__eq + i32.const 3168 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 274 i32.const 0 call $~lib/env/abort @@ -10326,12 +10345,12 @@ end f64.const 1e-308 call $~lib/internal/number/dtoa - i32.const 4832 - call $~lib/string/String.__eq + i32.const 5416 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 275 i32.const 0 call $~lib/env/abort @@ -10339,12 +10358,12 @@ end f64.const -1e-308 call $~lib/internal/number/dtoa - i32.const 4848 - call $~lib/string/String.__eq + i32.const 5440 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 276 i32.const 0 call $~lib/env/abort @@ -10352,12 +10371,12 @@ end f64.const 1e-323 call $~lib/internal/number/dtoa - i32.const 4872 - call $~lib/string/String.__eq + i32.const 5464 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 277 i32.const 0 call $~lib/env/abort @@ -10365,12 +10384,12 @@ end f64.const -1e-323 call $~lib/internal/number/dtoa - i32.const 4888 - call $~lib/string/String.__eq + i32.const 5488 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 278 i32.const 0 call $~lib/env/abort @@ -10378,12 +10397,12 @@ end f64.const 0 call $~lib/internal/number/dtoa - i32.const 2664 - call $~lib/string/String.__eq + i32.const 3136 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 279 i32.const 0 call $~lib/env/abort @@ -10391,12 +10410,12 @@ end f64.const 4294967272 call $~lib/internal/number/dtoa - i32.const 4912 - call $~lib/string/String.__eq + i32.const 5512 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 281 i32.const 0 call $~lib/env/abort @@ -10404,12 +10423,12 @@ end f64.const 1.2312145673456234e-08 call $~lib/internal/number/dtoa - i32.const 4944 - call $~lib/string/String.__eq + i32.const 5544 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 282 i32.const 0 call $~lib/env/abort @@ -10417,12 +10436,12 @@ end f64.const 555555555.5555556 call $~lib/internal/number/dtoa - i32.const 4992 - call $~lib/string/String.__eq + i32.const 5600 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 284 i32.const 0 call $~lib/env/abort @@ -10430,12 +10449,12 @@ end f64.const 0.9999999999999999 call $~lib/internal/number/dtoa - i32.const 5032 - call $~lib/string/String.__eq + i32.const 5648 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 285 i32.const 0 call $~lib/env/abort @@ -10443,12 +10462,12 @@ end f64.const 1 call $~lib/internal/number/dtoa - i32.const 4608 - call $~lib/string/String.__eq + i32.const 5152 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 286 i32.const 0 call $~lib/env/abort @@ -10456,12 +10475,12 @@ end f64.const 12.34 call $~lib/internal/number/dtoa - i32.const 5072 - call $~lib/string/String.__eq + i32.const 5696 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 287 i32.const 0 call $~lib/env/abort @@ -10471,12 +10490,12 @@ f64.const 3 f64.div call $~lib/internal/number/dtoa - i32.const 5088 - call $~lib/string/String.__eq + i32.const 5720 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 289 i32.const 0 call $~lib/env/abort @@ -10484,12 +10503,12 @@ end f64.const 1234e17 call $~lib/internal/number/dtoa - i32.const 5128 - call $~lib/string/String.__eq + i32.const 5768 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 290 i32.const 0 call $~lib/env/abort @@ -10497,12 +10516,12 @@ end f64.const 1234e18 call $~lib/internal/number/dtoa - i32.const 5184 - call $~lib/string/String.__eq + i32.const 5824 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 291 i32.const 0 call $~lib/env/abort @@ -10510,12 +10529,12 @@ end f64.const 2.71828 call $~lib/internal/number/dtoa - i32.const 5208 - call $~lib/string/String.__eq + i32.const 5856 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 292 i32.const 0 call $~lib/env/abort @@ -10523,12 +10542,12 @@ end f64.const 0.0271828 call $~lib/internal/number/dtoa - i32.const 5232 - call $~lib/string/String.__eq + i32.const 5880 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 293 i32.const 0 call $~lib/env/abort @@ -10536,12 +10555,12 @@ end f64.const 271.828 call $~lib/internal/number/dtoa - i32.const 5256 - call $~lib/string/String.__eq + i32.const 5912 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 294 i32.const 0 call $~lib/env/abort @@ -10549,12 +10568,12 @@ end f64.const 1.1e+128 call $~lib/internal/number/dtoa - i32.const 5280 - call $~lib/string/String.__eq + i32.const 5936 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 295 i32.const 0 call $~lib/env/abort @@ -10562,12 +10581,12 @@ end f64.const 1.1e-64 call $~lib/internal/number/dtoa - i32.const 5304 - call $~lib/string/String.__eq + i32.const 5960 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 296 i32.const 0 call $~lib/env/abort @@ -10575,24 +10594,24 @@ end f64.const 0.000035689 call $~lib/internal/number/dtoa - i32.const 5328 - call $~lib/string/String.__eq + i32.const 5984 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 48 + i32.const 56 i32.const 297 i32.const 0 call $~lib/env/abort unreachable end ) - (func $std/string/getString (; 65 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 67 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 66 ;) (type $FUNCSIG$v) + (func $start (; 68 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 67 ;) (type $FUNCSIG$v) + (func $null (; 69 ;) (type $FUNCSIG$v) ) ) From ce82e5458ee878358244324ad116694b672c9fd2 Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 11 Mar 2019 01:16:05 +0100 Subject: [PATCH 015/119] unshiftify padEnd --- std/assembly/string.ts | 31 +++--- tests/compiler/std/string.optimized.wat | 110 ++++++++------------ tests/compiler/std/string.untouched.wat | 133 +++++++++++------------- 3 files changed, 123 insertions(+), 151 deletions(-) diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 2a3a71f920..5703c411b9 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -329,24 +329,23 @@ export class String extends StringBase { padEnd(targetLength: i32, padString: String = changetype(" ")): String { assert(this !== null); - var length = this.length; - var padLen = padString.length; - if (targetLength < length || !padLen) return this; - var len = targetLength - length; - var out = ALLOC(targetLength << 1); - if (length) { - memory.copy(out, changetype(this), length << 1); - } - if (len > padLen) { - let count = (len - 1) / padLen; - let base = count * padLen; - let rest = len - base; - memory.repeat(out + (length << 1), changetype(padString), padString.length << 1, count); - if (rest) { - memory.copy(out + ((base + length) << 1), changetype(padString), rest << 1); + var thisSize = this.length << 1; + var targetSize = targetLength << 1; + var padSize = padString.length << 1; + if (targetSize < thisSize || !padSize) return this; + var appendSize = targetSize - thisSize; + var out = ALLOC(targetSize); + memory.copy(out, changetype(this), thisSize); + if (appendSize > padSize) { + let repeatCount = (appendSize - 2) / padSize; + let restBase = repeatCount * padSize; + let restSize = appendSize - restBase; + memory.repeat(out + thisSize, changetype(padString), padSize, repeatCount); + if (restSize) { + memory.copy(out + thisSize + restBase, changetype(padString), restSize); } } else { - memory.copy(out + (length << 1), changetype(padString), len << 1); + memory.copy(out + thisSize, changetype(padString), appendSize); } return REGISTER(out); } diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 4f9252e620..eed043116f 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -2170,21 +2170,28 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $5 + i32.const 1 + i32.shl + local.set $4 local.get $1 + i32.const 1 + i32.shl + local.tee $1 local.get $0 i32.const 8 i32.sub i32.load offset=4 i32.const 1 i32.shr_u + i32.const 1 + i32.shl + local.tee $5 + i32.lt_u local.tee $3 - i32.lt_s - local.tee $4 if (result i32) - local.get $4 + local.get $3 else - local.get $5 + local.get $4 i32.eqz end if @@ -2192,86 +2199,61 @@ return end local.get $1 - local.get $3 - i32.sub - local.set $6 - local.get $1 - i32.const 1 - i32.shl call $~lib/runtime/ALLOC - local.set $1 - local.get $3 - if - local.get $1 - local.get $0 - local.get $3 - i32.const 1 - i32.shl - call $~lib/internal/memory/memmove - end - local.get $6 + local.tee $6 + local.get $0 local.get $5 - i32.gt_s + call $~lib/internal/memory/memmove + local.get $1 + local.get $5 + i32.sub + local.tee $3 + local.get $4 + i32.gt_u if - local.get $3 - i32.const 1 - i32.shl - local.get $1 + local.get $5 + local.get $6 i32.add local.get $2 - local.get $2 - i32.const 8 - i32.sub - i32.load offset=4 - i32.const 1 - i32.shr_u - i32.const 1 - i32.shl - local.get $6 - i32.const 1 + local.get $4 + local.get $3 + i32.const 2 i32.sub - local.get $5 - i32.div_s - local.tee $4 + local.get $4 + i32.div_u + local.tee $0 call $~lib/runtime/memory.repeat - local.get $6 + local.get $3 + local.get $0 local.get $4 - local.get $5 i32.mul - local.tee $0 + local.tee $1 i32.sub - local.tee $4 + local.tee $3 if - local.get $0 - local.get $3 + local.get $5 + local.get $6 i32.add - i32.const 1 - i32.shl local.get $1 i32.add local.get $2 - local.get $4 - i32.const 1 - i32.shl + local.get $3 call $~lib/internal/memory/memmove end else - local.get $3 - i32.const 1 - i32.shl - local.get $1 + local.get $5 + local.get $6 i32.add local.get $2 - local.get $6 - i32.const 1 - i32.shl + local.get $3 call $~lib/internal/memory/memmove end - local.get $1 + local.get $6 + local.tee $0 call $~lib/runtime/unref i32.const 1 i32.store - local.get $1 + local.get $0 ) (func $~lib/string/String#padEnd|trampoline (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -2745,7 +2727,7 @@ if i32.const 0 i32.const 96 - i32.const 597 + i32.const 596 i32.const 10 call $~lib/env/abort unreachable @@ -3029,7 +3011,7 @@ if i32.const 0 i32.const 96 - i32.const 355 + i32.const 354 i32.const 4 call $~lib/env/abort unreachable @@ -3059,7 +3041,7 @@ if i32.const 0 i32.const 96 - i32.const 360 + i32.const 359 i32.const 6 call $~lib/env/abort unreachable @@ -3420,7 +3402,7 @@ if i32.const 0 i32.const 96 - i32.const 382 + i32.const 381 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 4a5fee69de..b80e56b1ab 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -2736,6 +2736,7 @@ (local $10 i32) (local $11 i32) (local $12 i32) + (local $13 i32) local.get $0 i32.const 0 i32.ne @@ -2750,125 +2751,115 @@ end local.get $0 call $~lib/runtime/StringBase#get:length + i32.const 1 + i32.shl local.set $3 + local.get $1 + i32.const 1 + i32.shl + local.set $4 local.get $2 call $~lib/runtime/StringBase#get:length - local.set $4 - local.get $1 + i32.const 1 + i32.shl + local.set $5 + local.get $4 local.get $3 - i32.lt_s - local.tee $5 + i32.lt_u + local.tee $6 if (result i32) - local.get $5 + local.get $6 else - local.get $4 + local.get $5 i32.eqz end if local.get $0 return end - local.get $1 + local.get $4 local.get $3 i32.sub - local.set $6 - local.get $1 - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC local.set $7 - local.get $3 - if - local.get $7 - local.set $5 + local.get $4 + call $~lib/runtime/ALLOC + local.set $8 + block $~lib/runtime/memory.copy|inlined.4 + local.get $8 + local.set $6 local.get $0 - local.set $8 - local.get $3 - i32.const 1 - i32.shl local.set $9 - local.get $5 - local.get $8 + local.get $3 + local.set $10 + local.get $6 local.get $9 + local.get $10 call $~lib/internal/memory/memmove end - local.get $6 - local.get $4 - i32.gt_s + local.get $7 + local.get $5 + i32.gt_u if - local.get $6 - i32.const 1 + local.get $7 + i32.const 2 i32.sub - local.get $4 - i32.div_s + local.get $5 + i32.div_u + local.set $10 + local.get $10 + local.get $5 + i32.mul local.set $9 + local.get $7 local.get $9 - local.get $4 - i32.mul - local.set $8 - local.get $6 - local.get $8 i32.sub - local.set $5 - local.get $7 + local.set $6 + local.get $8 local.get $3 - i32.const 1 - i32.shl i32.add local.get $2 - local.get $2 - call $~lib/runtime/StringBase#get:length - i32.const 1 - i32.shl - local.get $9 - call $~lib/runtime/memory.repeat local.get $5 + local.get $10 + call $~lib/runtime/memory.repeat + local.get $6 if - local.get $7 local.get $8 local.get $3 i32.add - i32.const 1 - i32.shl + local.get $9 i32.add - local.set $10 - local.get $2 local.set $11 - local.get $5 - i32.const 1 - i32.shl + local.get $2 local.set $12 - local.get $10 + local.get $6 + local.set $13 local.get $11 local.get $12 + local.get $13 call $~lib/internal/memory/memmove end else - local.get $7 + local.get $8 local.get $3 - i32.const 1 - i32.shl i32.add - local.set $5 + local.set $6 local.get $2 - local.set $8 - local.get $6 - i32.const 1 - i32.shl local.set $9 - local.get $5 - local.get $8 + local.get $7 + local.set $10 + local.get $6 local.get $9 + local.get $10 call $~lib/internal/memory/memmove end block $~lib/runtime/REGISTER|inlined.3 (result i32) - local.get $7 - local.set $9 - local.get $9 + local.get $8 + local.set $10 + local.get $10 call $~lib/runtime/unref i32.const 1 i32.store - local.get $9 + local.get $10 end ) (func $~lib/string/String#padEnd|trampoline (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -3436,7 +3427,7 @@ if i32.const 0 i32.const 96 - i32.const 597 + i32.const 596 i32.const 10 call $~lib/env/abort unreachable @@ -3755,7 +3746,7 @@ if i32.const 0 i32.const 96 - i32.const 355 + i32.const 354 i32.const 4 call $~lib/env/abort unreachable @@ -3783,7 +3774,7 @@ if i32.const 0 i32.const 96 - i32.const 360 + i32.const 359 i32.const 6 call $~lib/env/abort unreachable @@ -4298,7 +4289,7 @@ if i32.const 0 i32.const 96 - i32.const 382 + i32.const 381 i32.const 4 call $~lib/env/abort unreachable From ebe92c62a8e61b9ca9ef7f8acaa28051f8f731d2 Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 11 Mar 2019 01:20:47 +0100 Subject: [PATCH 016/119] untrampoline padEnd --- std/assembly/string.ts | 2 +- tests/compiler/std/string.optimized.wat | 114 +++++++---------- tests/compiler/std/string.untouched.wat | 159 +++++++++--------------- 3 files changed, 108 insertions(+), 167 deletions(-) diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 5703c411b9..c855852f21 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -327,7 +327,7 @@ export class String extends StringBase { return REGISTER(out); } - padEnd(targetLength: i32, padString: String = changetype(" ")): String { + padEnd(targetLength: i32, padString: string = " "): String { assert(this !== null); var thisSize = this.length << 1; var targetSize = targetLength << 1; diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index eed043116f..a9d919c2b0 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -2255,27 +2255,7 @@ i32.store local.get $0 ) - (func $~lib/string/String#padEnd|trampoline (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 296 - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/string/String#padEnd - ) - (func $~lib/string/String#lastIndexOf (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2358,7 +2338,7 @@ end i32.const -1 ) - (func $~lib/string/String#lastIndexOf|trampoline (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#lastIndexOf|trampoline (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -2378,7 +2358,7 @@ local.get $2 call $~lib/string/String#lastIndexOf ) - (func $~lib/internal/string/parse (; 22 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/internal/string/parse (; 21 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2615,7 +2595,7 @@ local.get $5 f64.mul ) - (func $~lib/string/parseFloat (; 23 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 22 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2786,7 +2766,7 @@ local.get $4 f64.mul ) - (func $~lib/string/String#concat (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2847,7 +2827,7 @@ i32.store local.get $2 ) - (func $~lib/string/String.concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.concat (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 240 local.get $0 @@ -2855,13 +2835,13 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.ne (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.ne (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.eq i32.eqz ) - (func $~lib/string/String.gt (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gt (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block (result i32) @@ -2926,7 +2906,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.lt (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.lt (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block (result i32) @@ -2991,19 +2971,19 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String.gte (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gte (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.lt i32.eqz ) - (func $~lib/string/String.lte (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.lte (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 312 local.get $0 call $~lib/string/String.gt i32.eqz ) - (func $~lib/string/String#repeat (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3085,7 +3065,7 @@ i32.store local.get $2 ) - (func $~lib/string/String#slice (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3167,7 +3147,7 @@ i32.store local.get $2 ) - (func $~lib/string/String#slice|trampoline (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#slice|trampoline (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -3187,7 +3167,7 @@ local.get $2 call $~lib/string/String#slice ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocateUnsafe (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741816 @@ -3214,7 +3194,7 @@ i32.store local.get $1 ) - (func $~lib/array/Array#constructor (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3256,7 +3236,7 @@ call $~lib/internal/memory/memset local.get $1 ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/arraybuffer/reallocateUnsafe (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3338,7 +3318,7 @@ end local.get $0 ) - (func $~lib/array/Array#push (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3388,7 +3368,7 @@ local.get $1 i32.store offset=8 ) - (func $~lib/string/String#split (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3629,7 +3609,7 @@ drop local.get $3 ) - (func $~lib/string/String#split|trampoline (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#split|trampoline (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $2of2 block $1of2 @@ -3651,7 +3631,7 @@ local.get $2 call $~lib/string/String#split ) - (func $~lib/internal/number/decimalCount32 (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/number/decimalCount32 (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -3705,7 +3685,7 @@ end end ) - (func $~lib/internal/number/utoa32_lut (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/number/utoa32_lut (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) i32.const 2168 @@ -3815,7 +3795,7 @@ i32.store16 end ) - (func $~lib/internal/number/itoa32 (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/number/itoa32 (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3859,7 +3839,7 @@ i32.store local.get $1 ) - (func $~lib/internal/number/utoa32 (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/number/utoa32 (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3884,7 +3864,7 @@ i32.store local.get $1 ) - (func $~lib/internal/number/decimalCount64 (; 44 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/internal/number/decimalCount64 (; 43 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -3938,7 +3918,7 @@ end end ) - (func $~lib/internal/number/utoa64_lut (; 45 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/internal/number/utoa64_lut (; 44 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4035,7 +4015,7 @@ local.get $2 call $~lib/internal/number/utoa32_lut ) - (func $~lib/internal/number/utoa64 (; 46 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/internal/number/utoa64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4080,7 +4060,7 @@ i32.store local.get $1 ) - (func $~lib/internal/number/itoa64 (; 47 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/internal/number/itoa64 (; 46 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4148,7 +4128,7 @@ i32.store local.get $1 ) - (func $~lib/internal/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) + (func $~lib/internal/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) (local $7 i32) (local $8 i32) (local $9 i64) @@ -4566,7 +4546,7 @@ local.get $6 end ) - (func $~lib/internal/number/prettify (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/internal/number/prettify (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4831,7 +4811,7 @@ end end ) - (func $~lib/internal/number/dtoa_core (; 50 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/internal/number/dtoa_core (; 49 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) (local $4 i64) @@ -5146,7 +5126,7 @@ local.get $12 i32.add ) - (func $~lib/string/String#substring (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5246,7 +5226,7 @@ i32.store local.get $2 ) - (func $~lib/internal/number/dtoa (; 52 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/internal/number/dtoa (; 51 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5292,7 +5272,7 @@ drop local.get $1 ) - (func $start:std/string (; 53 ;) (type $FUNCSIG$v) + (func $start:std/string (; 52 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 6008 @@ -5592,11 +5572,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const 0 - call $~lib/string/String#padEnd|trampoline + i32.const 296 + call $~lib/string/String#padEnd global.get $std/string/str call $~lib/string/String.eq i32.eqz @@ -5608,11 +5587,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const 15 - call $~lib/string/String#padEnd|trampoline + i32.const 296 + call $~lib/string/String#padEnd global.get $std/string/str call $~lib/string/String.eq i32.eqz @@ -5624,11 +5602,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc i32.const 312 i32.const 3 - call $~lib/string/String#padEnd|trampoline + i32.const 296 + call $~lib/string/String#padEnd i32.const 320 call $~lib/string/String.eq i32.eqz @@ -5670,11 +5647,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc i32.const 352 i32.const 5 - call $~lib/string/String#padEnd|trampoline + i32.const 296 + call $~lib/string/String#padEnd i32.const 456 call $~lib/string/String.eq i32.eqz @@ -9078,13 +9054,13 @@ unreachable end ) - (func $std/string/getString (; 54 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 53 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 55 ;) (type $FUNCSIG$v) + (func $start (; 54 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 56 ;) (type $FUNCSIG$v) + (func $null (; 55 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index b80e56b1ab..a2d9dfe069 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -2862,26 +2862,7 @@ local.get $10 end ) - (func $~lib/string/String#padEnd|trampoline (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 296 - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/string/String#padEnd - ) - (func $~lib/string/String#lastIndexOf (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2973,7 +2954,7 @@ end i32.const -1 ) - (func $~lib/string/String#lastIndexOf|trampoline (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf|trampoline (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2992,7 +2973,7 @@ local.get $2 call $~lib/string/String#lastIndexOf ) - (func $~lib/internal/string/parse (; 26 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/internal/string/parse (; 25 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3293,12 +3274,12 @@ local.get $7 f64.mul ) - (func $~lib/string/parseInt (; 27 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/string/parseInt (; 26 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $0 local.get $1 call $~lib/internal/string/parse ) - (func $~lib/string/parseFloat (; 28 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 27 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3495,7 +3476,7 @@ local.get $5 f64.mul ) - (func $~lib/string/String#concat (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3582,7 +3563,7 @@ local.get $6 end ) - (func $~lib/string/String.concat (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.concat (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if @@ -3593,13 +3574,13 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.ne (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.ne (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.eq i32.eqz ) - (func $~lib/string/String.gt (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gt (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3661,7 +3642,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.lt (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.lt (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3723,19 +3704,19 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String.gte (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gte (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.lt i32.eqz ) - (func $~lib/string/String.lte (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.lte (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.gt i32.eqz ) - (func $~lib/string/String#repeat (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3824,7 +3805,7 @@ local.get $3 end ) - (func $~lib/string/String#slice (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3929,7 +3910,7 @@ local.get $9 end ) - (func $~lib/string/String#slice|trampoline (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice|trampoline (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -3948,7 +3929,7 @@ local.get $2 call $~lib/string/String#slice ) - (func $~lib/internal/arraybuffer/computeSize (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/computeSize (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -3960,7 +3941,7 @@ i32.sub i32.shl ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocateUnsafe (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741816 @@ -3983,7 +3964,7 @@ i32.store local.get $1 ) - (func $~lib/array/Array#constructor (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4044,7 +4025,7 @@ end local.get $0 ) - (func $~lib/array/Array#__unchecked_set (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4068,7 +4049,7 @@ local.get $5 i32.store offset=8 ) - (func $~lib/array/Array#__unchecked_get (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4088,10 +4069,10 @@ i32.add i32.load offset=8 ) - (func $~lib/allocator/arena/memory.free (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/memory.free (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/arraybuffer/reallocateUnsafe (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4193,7 +4174,7 @@ end local.get $0 ) - (func $~lib/array/Array#push (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4266,7 +4247,7 @@ end local.get $5 ) - (func $~lib/string/String#split (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4597,7 +4578,7 @@ end local.get $13 ) - (func $~lib/string/String#split|trampoline (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split|trampoline (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -4618,7 +4599,7 @@ local.get $2 call $~lib/string/String#split ) - (func $~lib/array/Array#__get (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4651,7 +4632,7 @@ unreachable end ) - (func $~lib/internal/number/decimalCount32 (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/number/decimalCount32 (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -4720,7 +4701,7 @@ unreachable unreachable ) - (func $~lib/internal/number/utoa32_lut (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/number/utoa32_lut (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4906,7 +4887,7 @@ i32.store16 end ) - (func $~lib/internal/number/itoa32 (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/number/itoa32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4968,7 +4949,7 @@ local.get $6 end ) - (func $~lib/internal/number/utoa32 (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/number/utoa32 (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5010,7 +4991,7 @@ local.get $5 end ) - (func $~lib/internal/number/decimalCount64 (; 54 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/internal/number/decimalCount64 (; 53 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -5079,7 +5060,7 @@ unreachable unreachable ) - (func $~lib/internal/number/utoa64_lut (; 55 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/internal/number/utoa64_lut (; 54 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -5250,7 +5231,7 @@ local.get $2 call $~lib/internal/number/utoa32_lut ) - (func $~lib/internal/number/utoa64 (; 56 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/internal/number/utoa64 (; 55 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5324,7 +5305,7 @@ local.get $3 end ) - (func $~lib/internal/number/itoa64 (; 57 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/internal/number/itoa64 (; 56 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5420,19 +5401,19 @@ local.get $4 end ) - (func $~lib/builtins/isFinite (; 58 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 57 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 59 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 58 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/internal/number/genDigits (; 60 ;) (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/internal/number/genDigits (; 59 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -6023,7 +6004,7 @@ end local.get $15 ) - (func $~lib/internal/number/prettify (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/internal/number/prettify (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6380,7 +6361,7 @@ unreachable unreachable ) - (func $~lib/internal/number/dtoa_core (; 62 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/internal/number/dtoa_core (; 61 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -6853,7 +6834,7 @@ local.get $2 i32.add ) - (func $~lib/string/String#substring (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6986,12 +6967,12 @@ local.get $11 end ) - (func $~lib/runtime/FREE (; 64 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/FREE (; 63 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/runtime/unref call $~lib/allocator/arena/memory.free ) - (func $~lib/internal/number/dtoa (; 65 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/internal/number/dtoa (; 64 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7038,7 +7019,7 @@ call $~lib/runtime/FREE local.get $3 ) - (func $start:std/string (; 66 ;) (type $FUNCSIG$v) + (func $start:std/string (; 65 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -7351,14 +7332,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 0 - i32.const 0 - call $~lib/string/String#padEnd|trampoline - end + global.get $std/string/str + i32.const 0 + i32.const 296 + call $~lib/string/String#padEnd global.get $std/string/str call $~lib/string/String.eq i32.eqz @@ -7370,14 +7347,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 15 - i32.const 0 - call $~lib/string/String#padEnd|trampoline - end + global.get $std/string/str + i32.const 15 + i32.const 296 + call $~lib/string/String#padEnd global.get $std/string/str call $~lib/string/String.eq i32.eqz @@ -7389,14 +7362,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 312 - i32.const 3 - i32.const 0 - call $~lib/string/String#padEnd|trampoline - end + i32.const 312 + i32.const 3 + i32.const 296 + call $~lib/string/String#padEnd i32.const 320 call $~lib/string/String.eq i32.eqz @@ -7438,14 +7407,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 352 - i32.const 5 - i32.const 0 - call $~lib/string/String#padEnd|trampoline - end + i32.const 352 + i32.const 5 + i32.const 296 + call $~lib/string/String#padEnd i32.const 456 call $~lib/string/String.eq i32.eqz @@ -10597,12 +10562,12 @@ unreachable end ) - (func $std/string/getString (; 67 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 66 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 68 ;) (type $FUNCSIG$v) + (func $start (; 67 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 69 ;) (type $FUNCSIG$v) + (func $null (; 68 ;) (type $FUNCSIG$v) ) ) From 1198e712362c7416ecfa010d47f776286d13861d Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 11 Mar 2019 01:29:12 +0100 Subject: [PATCH 017/119] same for padStart --- std/assembly/string.ts | 37 ++- tests/compiler/std/string.optimized.wat | 264 +++++++++------------ tests/compiler/std/string.untouched.wat | 292 ++++++++++-------------- 3 files changed, 248 insertions(+), 345 deletions(-) diff --git a/std/assembly/string.ts b/std/assembly/string.ts index c855852f21..adb77e95a5 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -303,27 +303,24 @@ export class String extends StringBase { return REGISTER(out); } - padStart(targetLength: i32, padString: String = changetype(" ")): String { + padStart(targetLength: i32, padString: string = " "): String { assert(this !== null); - var length = this.length; - var padLen = padString.length; - if (targetLength < length || !padLen) return this; - var len = targetLength - length; - var out = ALLOC(targetLength << 1); - if (len > padLen) { - let count = (len - 1) / padLen; - let base = count * padLen; - let rest = len - base; - memory.repeat(out, changetype(padString), padString.length << 1, count); - if (rest) { - memory.copy(out + (base << 1), changetype(padString), rest << 1); - } + var thisSize = this.length << 1; + var targetSize = targetLength << 1; + var padSize = padString.length << 1; + if (targetSize < thisSize || !padSize) return this; + var prependSize = targetSize - thisSize; + var out = ALLOC(targetSize); + if (prependSize > padSize) { + let repeatCount = (prependSize - 2) / padSize; + let restBase = repeatCount * padSize; + let restSize = prependSize - restBase; + memory.repeat(out, changetype(padString), padSize, repeatCount); + memory.copy(out + restBase, changetype(padString), restSize); } else { - memory.copy(out, changetype(padString), len << 1); - } - if (length) { - memory.copy(out + (len << 1), changetype(this), length << 1); + memory.copy(out, changetype(padString), prependSize); } + memory.copy(out + prependSize, changetype(this), thisSize); return REGISTER(out); } @@ -341,9 +338,7 @@ export class String extends StringBase { let restBase = repeatCount * padSize; let restSize = appendSize - restBase; memory.repeat(out + thisSize, changetype(padString), padSize, repeatCount); - if (restSize) { - memory.copy(out + thisSize + restBase, changetype(padString), restSize); - } + memory.copy(out + thisSize + restBase, changetype(padString), restSize); } else { memory.copy(out + thisSize, changetype(padString), appendSize); } diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index a9d919c2b0..b951d9c66c 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -2033,123 +2033,84 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $5 + i32.const 1 + i32.shl + local.set $4 local.get $1 + i32.const 1 + i32.shl + local.tee $5 local.get $0 i32.const 8 i32.sub i32.load offset=4 i32.const 1 i32.shr_u + i32.const 1 + i32.shl local.tee $7 - i32.lt_s - local.tee $4 + i32.lt_u + local.tee $1 if (result i32) - local.get $4 + local.get $1 else - local.get $5 + local.get $4 i32.eqz end if local.get $0 return end - local.get $1 - i32.const 1 - i32.shl + local.get $5 call $~lib/runtime/ALLOC local.set $3 - local.get $1 + local.get $5 local.get $7 i32.sub local.tee $6 - local.get $5 - i32.gt_s + local.get $4 + i32.gt_u if local.get $3 local.get $2 - local.get $2 - i32.const 8 - i32.sub - i32.load offset=4 - i32.const 1 - i32.shr_u - i32.const 1 - i32.shl + local.get $4 local.get $6 - i32.const 1 + i32.const 2 i32.sub - local.get $5 - i32.div_s - local.tee $4 + local.get $4 + i32.div_u + local.tee $1 call $~lib/runtime/memory.repeat - local.get $6 + local.get $1 local.get $4 - local.get $5 i32.mul - local.tee $1 + local.tee $5 + local.get $3 + i32.add + local.get $2 + local.get $6 + local.get $5 i32.sub - local.tee $4 - if - local.get $1 - i32.const 1 - i32.shl - local.get $3 - i32.add - local.get $2 - local.get $4 - i32.const 1 - i32.shl - call $~lib/internal/memory/memmove - end + call $~lib/internal/memory/memmove else local.get $3 local.get $2 local.get $6 - i32.const 1 - i32.shl call $~lib/internal/memory/memmove end + local.get $3 + local.get $6 + i32.add + local.get $0 local.get $7 - if - local.get $6 - i32.const 1 - i32.shl - local.get $3 - i32.add - local.get $0 - local.get $7 - i32.const 1 - i32.shl - call $~lib/internal/memory/memmove - end + call $~lib/internal/memory/memmove local.get $3 call $~lib/runtime/unref i32.const 1 i32.store local.get $3 ) - (func $~lib/string/String#padStart|trampoline (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 296 - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/string/String#padStart - ) - (func $~lib/string/String#padEnd (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2159,7 +2120,7 @@ if i32.const 0 i32.const 96 - i32.const 331 + i32.const 328 i32.const 4 call $~lib/env/abort unreachable @@ -2172,11 +2133,11 @@ i32.shr_u i32.const 1 i32.shl - local.set $4 + local.set $5 local.get $1 i32.const 1 i32.shl - local.tee $1 + local.tee $3 local.get $0 i32.const 8 i32.sub @@ -2185,63 +2146,58 @@ i32.shr_u i32.const 1 i32.shl - local.tee $5 + local.tee $4 i32.lt_u - local.tee $3 + local.tee $1 if (result i32) - local.get $3 + local.get $1 else - local.get $4 + local.get $5 i32.eqz end if local.get $0 return end - local.get $1 + local.get $3 call $~lib/runtime/ALLOC local.tee $6 local.get $0 - local.get $5 + local.get $4 call $~lib/internal/memory/memmove - local.get $1 - local.get $5 + local.get $3 + local.get $4 i32.sub local.tee $3 - local.get $4 + local.get $5 i32.gt_u if - local.get $5 + local.get $4 local.get $6 i32.add + local.tee $4 local.get $2 - local.get $4 + local.get $5 local.get $3 i32.const 2 i32.sub - local.get $4 + local.get $5 i32.div_u local.tee $0 call $~lib/runtime/memory.repeat - local.get $3 - local.get $0 local.get $4 + local.get $0 + local.get $5 i32.mul local.tee $1 + i32.add + local.get $2 + local.get $3 + local.get $1 i32.sub - local.tee $3 - if - local.get $5 - local.get $6 - i32.add - local.get $1 - i32.add - local.get $2 - local.get $3 - call $~lib/internal/memory/memmove - end + call $~lib/internal/memory/memmove else - local.get $5 + local.get $4 local.get $6 i32.add local.get $2 @@ -2255,7 +2211,7 @@ i32.store local.get $0 ) - (func $~lib/string/String#lastIndexOf (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2338,7 +2294,7 @@ end i32.const -1 ) - (func $~lib/string/String#lastIndexOf|trampoline (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#lastIndexOf|trampoline (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -2358,7 +2314,7 @@ local.get $2 call $~lib/string/String#lastIndexOf ) - (func $~lib/internal/string/parse (; 21 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/internal/string/parse (; 20 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2595,7 +2551,7 @@ local.get $5 f64.mul ) - (func $~lib/string/parseFloat (; 22 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 21 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2707,7 +2663,7 @@ if i32.const 0 i32.const 96 - i32.const 596 + i32.const 591 i32.const 10 call $~lib/env/abort unreachable @@ -2766,7 +2722,7 @@ local.get $4 f64.mul ) - (func $~lib/string/String#concat (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2827,7 +2783,7 @@ i32.store local.get $2 ) - (func $~lib/string/String.concat (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.concat (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 240 local.get $0 @@ -2835,13 +2791,13 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.ne (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.ne (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.eq i32.eqz ) - (func $~lib/string/String.gt (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gt (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block (result i32) @@ -2906,7 +2862,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.lt (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.lt (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block (result i32) @@ -2971,19 +2927,19 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String.gte (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gte (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.lt i32.eqz ) - (func $~lib/string/String.lte (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.lte (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 312 local.get $0 call $~lib/string/String.gt i32.eqz ) - (func $~lib/string/String#repeat (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2991,7 +2947,7 @@ if i32.const 0 i32.const 96 - i32.const 354 + i32.const 349 i32.const 4 call $~lib/env/abort unreachable @@ -3021,7 +2977,7 @@ if i32.const 0 i32.const 96 - i32.const 359 + i32.const 354 i32.const 6 call $~lib/env/abort unreachable @@ -3065,7 +3021,7 @@ i32.store local.get $2 ) - (func $~lib/string/String#slice (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3147,7 +3103,7 @@ i32.store local.get $2 ) - (func $~lib/string/String#slice|trampoline (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#slice|trampoline (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -3167,7 +3123,7 @@ local.get $2 call $~lib/string/String#slice ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocateUnsafe (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741816 @@ -3194,7 +3150,7 @@ i32.store local.get $1 ) - (func $~lib/array/Array#constructor (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3236,7 +3192,7 @@ call $~lib/internal/memory/memset local.get $1 ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/arraybuffer/reallocateUnsafe (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3318,7 +3274,7 @@ end local.get $0 ) - (func $~lib/array/Array#push (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3368,7 +3324,7 @@ local.get $1 i32.store offset=8 ) - (func $~lib/string/String#split (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3382,7 +3338,7 @@ if i32.const 0 i32.const 96 - i32.const 381 + i32.const 376 i32.const 4 call $~lib/env/abort unreachable @@ -3609,7 +3565,7 @@ drop local.get $3 ) - (func $~lib/string/String#split|trampoline (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#split|trampoline (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $2of2 block $1of2 @@ -3631,7 +3587,7 @@ local.get $2 call $~lib/string/String#split ) - (func $~lib/internal/number/decimalCount32 (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/number/decimalCount32 (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -3685,7 +3641,7 @@ end end ) - (func $~lib/internal/number/utoa32_lut (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/number/utoa32_lut (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) i32.const 2168 @@ -3795,7 +3751,7 @@ i32.store16 end ) - (func $~lib/internal/number/itoa32 (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/number/itoa32 (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3839,7 +3795,7 @@ i32.store local.get $1 ) - (func $~lib/internal/number/utoa32 (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/number/utoa32 (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3864,7 +3820,7 @@ i32.store local.get $1 ) - (func $~lib/internal/number/decimalCount64 (; 43 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/internal/number/decimalCount64 (; 42 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -3918,7 +3874,7 @@ end end ) - (func $~lib/internal/number/utoa64_lut (; 44 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/internal/number/utoa64_lut (; 43 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4015,7 +3971,7 @@ local.get $2 call $~lib/internal/number/utoa32_lut ) - (func $~lib/internal/number/utoa64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/internal/number/utoa64 (; 44 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4060,7 +4016,7 @@ i32.store local.get $1 ) - (func $~lib/internal/number/itoa64 (; 46 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/internal/number/itoa64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4128,7 +4084,7 @@ i32.store local.get $1 ) - (func $~lib/internal/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/internal/number/genDigits (; 46 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -4546,7 +4502,7 @@ local.get $6 end ) - (func $~lib/internal/number/prettify (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/internal/number/prettify (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4811,7 +4767,7 @@ end end ) - (func $~lib/internal/number/dtoa_core (; 49 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/internal/number/dtoa_core (; 48 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) (local $4 i64) @@ -5126,7 +5082,7 @@ local.get $12 i32.add ) - (func $~lib/string/String#substring (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5226,7 +5182,7 @@ i32.store local.get $2 ) - (func $~lib/internal/number/dtoa (; 51 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/internal/number/dtoa (; 50 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5272,7 +5228,7 @@ drop local.get $1 ) - (func $start:std/string (; 52 ;) (type $FUNCSIG$v) + (func $start:std/string (; 51 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 6008 @@ -5448,11 +5404,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const 0 - call $~lib/string/String#padStart|trampoline + i32.const 296 + call $~lib/string/String#padStart global.get $std/string/str call $~lib/string/String.eq i32.eqz @@ -5464,11 +5419,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const 15 - call $~lib/string/String#padStart|trampoline + i32.const 296 + call $~lib/string/String#padStart global.get $std/string/str call $~lib/string/String.eq i32.eqz @@ -5480,11 +5434,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc i32.const 312 i32.const 3 - call $~lib/string/String#padStart|trampoline + i32.const 296 + call $~lib/string/String#padStart i32.const 320 call $~lib/string/String.eq i32.eqz @@ -5526,11 +5479,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc i32.const 352 i32.const 5 - call $~lib/string/String#padStart|trampoline + i32.const 296 + call $~lib/string/String#padStart i32.const 368 call $~lib/string/String.eq i32.eqz @@ -9054,13 +9006,13 @@ unreachable end ) - (func $std/string/getString (; 53 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 52 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 54 ;) (type $FUNCSIG$v) + (func $start (; 53 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 55 ;) (type $FUNCSIG$v) + (func $null (; 54 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index a2d9dfe069..a2421f4596 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -2577,6 +2577,7 @@ (local $10 i32) (local $11 i32) (local $12 i32) + (local $13 i32) local.get $0 i32.const 0 i32.ne @@ -2591,141 +2592,113 @@ end local.get $0 call $~lib/runtime/StringBase#get:length + i32.const 1 + i32.shl local.set $3 + local.get $1 + i32.const 1 + i32.shl + local.set $4 local.get $2 call $~lib/runtime/StringBase#get:length - local.set $4 - local.get $1 + i32.const 1 + i32.shl + local.set $5 + local.get $4 local.get $3 - i32.lt_s - local.tee $5 + i32.lt_u + local.tee $6 if (result i32) - local.get $5 + local.get $6 else - local.get $4 + local.get $5 i32.eqz end if local.get $0 return end - local.get $1 + local.get $4 local.get $3 i32.sub - local.set $6 - local.get $1 - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC local.set $7 - local.get $6 local.get $4 - i32.gt_s + call $~lib/runtime/ALLOC + local.set $8 + local.get $7 + local.get $5 + i32.gt_u if - local.get $6 - i32.const 1 + local.get $7 + i32.const 2 i32.sub - local.get $4 - i32.div_s - local.set $5 local.get $5 - local.get $4 - i32.mul - local.set $8 + i32.div_u + local.set $6 local.get $6 - local.get $8 - i32.sub + local.get $5 + i32.mul local.set $9 local.get $7 + local.get $9 + i32.sub + local.set $10 + local.get $8 local.get $2 - local.get $2 - call $~lib/runtime/StringBase#get:length - i32.const 1 - i32.shl local.get $5 + local.get $6 call $~lib/runtime/memory.repeat - local.get $9 - if - local.get $7 + block $~lib/runtime/memory.copy|inlined.1 local.get $8 - i32.const 1 - i32.shl + local.get $9 i32.add - local.set $10 - local.get $2 local.set $11 - local.get $9 - i32.const 1 - i32.shl + local.get $2 local.set $12 local.get $10 + local.set $13 local.get $11 local.get $12 + local.get $13 call $~lib/internal/memory/memmove end else - local.get $7 - local.set $9 + local.get $8 + local.set $10 local.get $2 - local.set $8 - local.get $6 - i32.const 1 - i32.shl - local.set $5 + local.set $9 + local.get $7 + local.set $6 + local.get $10 local.get $9 - local.get $8 - local.get $5 + local.get $6 call $~lib/internal/memory/memmove end - local.get $3 - if + block $~lib/runtime/memory.copy|inlined.3 + local.get $8 local.get $7 - local.get $6 - i32.const 1 - i32.shl i32.add - local.set $5 + local.set $6 local.get $0 - local.set $8 - local.get $3 - i32.const 1 - i32.shl local.set $9 - local.get $5 - local.get $8 + local.get $3 + local.set $10 + local.get $6 local.get $9 + local.get $10 call $~lib/internal/memory/memmove end block $~lib/runtime/REGISTER|inlined.2 (result i32) - local.get $7 - local.set $9 - local.get $9 + local.get $8 + local.set $10 + local.get $10 call $~lib/runtime/unref i32.const 1 i32.store - local.get $9 - end - ) - (func $~lib/string/String#padStart|trampoline (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 296 - local.set $2 + local.get $10 end - local.get $0 - local.get $1 - local.get $2 - call $~lib/string/String#padStart ) - (func $~lib/string/String#padEnd (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2744,7 +2717,7 @@ if i32.const 0 i32.const 96 - i32.const 331 + i32.const 328 i32.const 4 call $~lib/env/abort unreachable @@ -2821,8 +2794,7 @@ local.get $5 local.get $10 call $~lib/runtime/memory.repeat - local.get $6 - if + block $~lib/runtime/memory.copy|inlined.5 local.get $8 local.get $3 i32.add @@ -2862,7 +2834,7 @@ local.get $10 end ) - (func $~lib/string/String#lastIndexOf (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2954,7 +2926,7 @@ end i32.const -1 ) - (func $~lib/string/String#lastIndexOf|trampoline (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf|trampoline (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2973,7 +2945,7 @@ local.get $2 call $~lib/string/String#lastIndexOf ) - (func $~lib/internal/string/parse (; 25 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/internal/string/parse (; 24 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3274,12 +3246,12 @@ local.get $7 f64.mul ) - (func $~lib/string/parseInt (; 26 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/string/parseInt (; 25 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $0 local.get $1 call $~lib/internal/string/parse ) - (func $~lib/string/parseFloat (; 27 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 26 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3408,7 +3380,7 @@ if i32.const 0 i32.const 96 - i32.const 596 + i32.const 591 i32.const 10 call $~lib/env/abort unreachable @@ -3476,7 +3448,7 @@ local.get $5 f64.mul ) - (func $~lib/string/String#concat (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3563,7 +3535,7 @@ local.get $6 end ) - (func $~lib/string/String.concat (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.concat (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if @@ -3574,13 +3546,13 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.ne (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.ne (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.eq i32.eqz ) - (func $~lib/string/String.gt (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gt (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3642,7 +3614,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.lt (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.lt (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3704,19 +3676,19 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String.gte (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gte (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.lt i32.eqz ) - (func $~lib/string/String.lte (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.lte (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.gt i32.eqz ) - (func $~lib/string/String#repeat (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3727,7 +3699,7 @@ if i32.const 0 i32.const 96 - i32.const 354 + i32.const 349 i32.const 4 call $~lib/env/abort unreachable @@ -3755,7 +3727,7 @@ if i32.const 0 i32.const 96 - i32.const 359 + i32.const 354 i32.const 6 call $~lib/env/abort unreachable @@ -3805,7 +3777,7 @@ local.get $3 end ) - (func $~lib/string/String#slice (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3910,7 +3882,7 @@ local.get $9 end ) - (func $~lib/string/String#slice|trampoline (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice|trampoline (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -3929,7 +3901,7 @@ local.get $2 call $~lib/string/String#slice ) - (func $~lib/internal/arraybuffer/computeSize (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/computeSize (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -3941,7 +3913,7 @@ i32.sub i32.shl ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocateUnsafe (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741816 @@ -3964,7 +3936,7 @@ i32.store local.get $1 ) - (func $~lib/array/Array#constructor (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4025,7 +3997,7 @@ end local.get $0 ) - (func $~lib/array/Array#__unchecked_set (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4049,7 +4021,7 @@ local.get $5 i32.store offset=8 ) - (func $~lib/array/Array#__unchecked_get (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4069,10 +4041,10 @@ i32.add i32.load offset=8 ) - (func $~lib/allocator/arena/memory.free (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/memory.free (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/arraybuffer/reallocateUnsafe (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4174,7 +4146,7 @@ end local.get $0 ) - (func $~lib/array/Array#push (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4247,7 +4219,7 @@ end local.get $5 ) - (func $~lib/string/String#split (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4270,7 +4242,7 @@ if i32.const 0 i32.const 96 - i32.const 381 + i32.const 376 i32.const 4 call $~lib/env/abort unreachable @@ -4578,7 +4550,7 @@ end local.get $13 ) - (func $~lib/string/String#split|trampoline (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split|trampoline (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -4599,7 +4571,7 @@ local.get $2 call $~lib/string/String#split ) - (func $~lib/array/Array#__get (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4632,7 +4604,7 @@ unreachable end ) - (func $~lib/internal/number/decimalCount32 (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/number/decimalCount32 (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -4701,7 +4673,7 @@ unreachable unreachable ) - (func $~lib/internal/number/utoa32_lut (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/number/utoa32_lut (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4887,7 +4859,7 @@ i32.store16 end ) - (func $~lib/internal/number/itoa32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/number/itoa32 (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4949,7 +4921,7 @@ local.get $6 end ) - (func $~lib/internal/number/utoa32 (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/internal/number/utoa32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4991,7 +4963,7 @@ local.get $5 end ) - (func $~lib/internal/number/decimalCount64 (; 53 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/internal/number/decimalCount64 (; 52 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -5060,7 +5032,7 @@ unreachable unreachable ) - (func $~lib/internal/number/utoa64_lut (; 54 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/internal/number/utoa64_lut (; 53 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -5231,7 +5203,7 @@ local.get $2 call $~lib/internal/number/utoa32_lut ) - (func $~lib/internal/number/utoa64 (; 55 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/internal/number/utoa64 (; 54 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5305,7 +5277,7 @@ local.get $3 end ) - (func $~lib/internal/number/itoa64 (; 56 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/internal/number/itoa64 (; 55 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5401,19 +5373,19 @@ local.get $4 end ) - (func $~lib/builtins/isFinite (; 57 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 56 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 58 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 57 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/internal/number/genDigits (; 59 ;) (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/internal/number/genDigits (; 58 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -6004,7 +5976,7 @@ end local.get $15 ) - (func $~lib/internal/number/prettify (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/internal/number/prettify (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6361,7 +6333,7 @@ unreachable unreachable ) - (func $~lib/internal/number/dtoa_core (; 61 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/internal/number/dtoa_core (; 60 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -6834,7 +6806,7 @@ local.get $2 i32.add ) - (func $~lib/string/String#substring (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6967,12 +6939,12 @@ local.get $11 end ) - (func $~lib/runtime/FREE (; 63 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/FREE (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/runtime/unref call $~lib/allocator/arena/memory.free ) - (func $~lib/internal/number/dtoa (; 64 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/internal/number/dtoa (; 63 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7019,7 +6991,7 @@ call $~lib/runtime/FREE local.get $3 ) - (func $start:std/string (; 65 ;) (type $FUNCSIG$v) + (func $start:std/string (; 64 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -7196,14 +7168,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 0 - i32.const 0 - call $~lib/string/String#padStart|trampoline - end + global.get $std/string/str + i32.const 0 + i32.const 296 + call $~lib/string/String#padStart global.get $std/string/str call $~lib/string/String.eq i32.eqz @@ -7215,14 +7183,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 15 - i32.const 0 - call $~lib/string/String#padStart|trampoline - end + global.get $std/string/str + i32.const 15 + i32.const 296 + call $~lib/string/String#padStart global.get $std/string/str call $~lib/string/String.eq i32.eqz @@ -7234,14 +7198,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 312 - i32.const 3 - i32.const 0 - call $~lib/string/String#padStart|trampoline - end + i32.const 312 + i32.const 3 + i32.const 296 + call $~lib/string/String#padStart i32.const 320 call $~lib/string/String.eq i32.eqz @@ -7283,14 +7243,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 352 - i32.const 5 - i32.const 0 - call $~lib/string/String#padStart|trampoline - end + i32.const 352 + i32.const 5 + i32.const 296 + call $~lib/string/String#padStart i32.const 368 call $~lib/string/String.eq i32.eqz @@ -10562,12 +10518,12 @@ unreachable end ) - (func $std/string/getString (; 66 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 65 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 67 ;) (type $FUNCSIG$v) + (func $start (; 66 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 68 ;) (type $FUNCSIG$v) + (func $null (; 67 ;) (type $FUNCSIG$v) ) ) From d9a56814895121c32297aa8225125f4181165dec Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 11 Mar 2019 07:45:47 +0100 Subject: [PATCH 018/119] arraybufferview --- src/builtins.ts | 224 +++++++++++++++++++- src/common.ts | 1 + src/compiler.ts | 32 ++- src/program.ts | 10 +- std/assembly/arraybuffer.ts | 35 +--- std/assembly/internal/typedarray.ts | 184 +++++++---------- std/assembly/runtime.ts | 50 ++++- std/assembly/typedarray.ts | 252 ++++++++++++++++++++--- tests/compiler/std/runtime.optimized.wat | 81 ++++---- tests/compiler/std/runtime.untouched.wat | 94 +++++---- 10 files changed, 699 insertions(+), 264 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index 9944c5c84b..5c282c295b 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -21,7 +21,8 @@ import { LiteralKind, LiteralExpression, StringLiteralExpression, - CallExpression + CallExpression, + ElementAccessExpression } from "./ast"; import { @@ -48,7 +49,10 @@ import { getConstValueI64Low, getConstValueI32, getConstValueF32, - getConstValueF64 + getConstValueF64, + getBinaryOp, + getBinaryLeft, + getBinaryRight } from "./module"; import { @@ -476,6 +480,19 @@ export namespace BuiltinSymbols { export const memory_fill = "~lib/runtime/memory.fill"; export const gc_classId = "~lib/runtime/gc.classId"; export const gc_iterateRoots = "~lib/runtime/gc.iterateRoots"; + + // std/typedarray.ts + export const Int8Array = "~lib/typedarray/Int8Array"; + export const Uint8Array = "~lib/typedarray/Uint8Array"; + export const Int16Array = "~lib/typedarray/Int16Array"; + export const Uint16Array = "~lib/typedarray/Uint16Array"; + export const Int32Array = "~lib/typedarray/Int32Array"; + export const Uint32Array = "~lib/typedarray/Uint32Array"; + export const Int64Array = "~lib/typedarray/Int64Array"; + export const Uint64Array = "~lib/typedarray/Uint64Array"; + export const Uint8ClampedArray = "~lib/typedarray/Uint8ClampedArray"; + export const Float32Array = "~lib/typedarray/Float32Array"; + export const Float64Array = "~lib/typedarray/Float64Array"; } /** Compiles a call to a built-in function. */ @@ -4081,6 +4098,209 @@ export function compileIterateRoots(compiler: Compiler): void { ); } +function typedArraySymbolToType(symbol: string): Type { + switch (symbol) { + default: assert(false); + case BuiltinSymbols.Int8Array: return Type.i8; + case BuiltinSymbols.Uint8ClampedArray: + case BuiltinSymbols.Uint8Array: return Type.u8; + case BuiltinSymbols.Int16Array: return Type.i16; + case BuiltinSymbols.Uint16Array: return Type.u16; + case BuiltinSymbols.Int32Array: return Type.i32; + case BuiltinSymbols.Uint32Array: return Type.u32; + case BuiltinSymbols.Int64Array: return Type.i64; + case BuiltinSymbols.Uint64Array: return Type.u64; + case BuiltinSymbols.Float32Array: return Type.f32; + case BuiltinSymbols.Float64Array: return Type.f64; + } +} + +export function compileTypedArrayGet( + compiler: Compiler, + target: Class, + thisExpression: Expression, + elementExpression: Expression, + contextualType: Type +): ExpressionRef { + var type = typedArraySymbolToType(target.internalName); + var module = compiler.module; + var outType = ( + type.is(TypeFlags.INTEGER) && + contextualType.is(TypeFlags.INTEGER) && + contextualType.size > type.size + ) ? contextualType : type; + + var bufferField = assert(target.lookupInSelf("buffer")); + assert(bufferField.kind == ElementKind.FIELD); + var dataStart = assert(target.lookupInSelf("dataStart")); + assert(dataStart.kind == ElementKind.FIELD); + var dataEnd = assert(target.lookupInSelf("dataEnd")); + assert(dataEnd.kind == ElementKind.FIELD); + + var constantOffset: i32 = 0; + var dynamicOffset = module.precomputeExpression(compiler.compileExpression( + elementExpression, + Type.i32, + ConversionKind.IMPLICIT, + WrapMode.NONE + )); + if (getExpressionId(dynamicOffset) == ExpressionId.Const) { + constantOffset = getConstValueI32(dynamicOffset); + dynamicOffset = 0; + } else if (getExpressionId(dynamicOffset) == ExpressionId.Binary) { + if (getBinaryOp(dynamicOffset) == BinaryOp.AddI32) { + let left = getBinaryLeft(dynamicOffset); + let right = getBinaryRight(dynamicOffset); + if (getExpressionId(left) == ExpressionId.Const) { + constantOffset = getConstValueI32(left); + dynamicOffset = right; + } else if (getExpressionId(right) == ExpressionId.Const) { + constantOffset = getConstValueI32(right); + dynamicOffset = left; + } + } + } + + var usizeType = compiler.options.usizeType; + var nativeSizeType = compiler.options.nativeSizeType; + var dataStartExpr = module.createLoad(usizeType.byteSize, true, + compiler.compileExpression( + thisExpression, + target.type, + ConversionKind.IMPLICIT, + WrapMode.NONE + ), + nativeSizeType, (dataStart).memoryOffset + ); + if (dynamicOffset) { + if (nativeSizeType == NativeType.I64) { + dataStartExpr = module.createBinary(BinaryOp.AddI64, + dataStartExpr, + module.createUnary(UnaryOp.ExtendU32, dynamicOffset) + ); + } else { + dataStartExpr = module.createBinary(BinaryOp.AddI32, + dataStartExpr, + dynamicOffset + ); + } + } + + // TODO: check offset + + compiler.currentType = outType; + return module.createLoad( + type.byteSize, + type.is(TypeFlags.SIGNED), + dataStartExpr, + outType.toNativeType(), + constantOffset + ); +} + +export function compileTypedArraySet( + compiler: Compiler, + target: Class, + thisExpression: Expression, + elementExpression: Expression, + valueExpression: Expression, + contextualType: Type +): ExpressionRef { + var type = typedArraySymbolToType(target.internalName); + var module = compiler.module; + + var bufferField = assert(target.lookupInSelf("buffer")); + assert(bufferField.kind == ElementKind.FIELD); + var dataStart = assert(target.lookupInSelf("dataStart")); + assert(dataStart.kind == ElementKind.FIELD); + var dataEnd = assert(target.lookupInSelf("dataEnd")); + assert(dataEnd.kind == ElementKind.FIELD); + + var constantOffset: i32 = 0; + var dynamicOffset = module.precomputeExpression(compiler.compileExpression( + elementExpression, + Type.i32, + ConversionKind.IMPLICIT, + WrapMode.NONE + )); + if (getExpressionId(dynamicOffset) == ExpressionId.Const) { + constantOffset = getConstValueI32(dynamicOffset); + dynamicOffset = 0; + } else if (getExpressionId(dynamicOffset) == ExpressionId.Binary) { + if (getBinaryOp(dynamicOffset) == BinaryOp.AddI32) { + let left = getBinaryLeft(dynamicOffset); + let right = getBinaryRight(dynamicOffset); + if (getExpressionId(left) == ExpressionId.Const) { + constantOffset = getConstValueI32(left); + dynamicOffset = right; + } else if (getExpressionId(right) == ExpressionId.Const) { + constantOffset = getConstValueI32(right); + dynamicOffset = left; + } + } + } + + var usizeType = compiler.options.usizeType; + var nativeSizeType = compiler.options.nativeSizeType; + var dataStartExpr = module.createLoad(usizeType.byteSize, true, + compiler.compileExpression( + thisExpression, + target.type, + ConversionKind.IMPLICIT, + WrapMode.NONE + ), + nativeSizeType, (dataStart).memoryOffset + ); + if (dynamicOffset) { + if (nativeSizeType == NativeType.I64) { + dataStartExpr = module.createBinary(BinaryOp.AddI64, + dataStartExpr, + module.createUnary(UnaryOp.ExtendU32, dynamicOffset) + ); + } else { + dataStartExpr = module.createBinary(BinaryOp.AddI32, + dataStartExpr, + dynamicOffset + ); + } + } + + var valueExpr = compiler.compileExpression( + valueExpression, + type.is(TypeFlags.SIGNED) ? Type.i32 : Type.u32, + ConversionKind.IMPLICIT, + WrapMode.NONE + ); + var nativeType = type.toNativeType(); + + // TODO: check offset, clamp + + if (contextualType == Type.void) { + compiler.currentType = Type.void; + return module.createStore( + type.byteSize, + dataStartExpr, + valueExpr, + nativeType, + constantOffset + ); + } else { + let flow = compiler.currentFlow; + let tempLocal = flow.getAndFreeTempLocal(type, false); + compiler.currentType = type; + return module.createBlock(null, [ + module.createStore( + type.byteSize, + dataStartExpr, + module.createTeeLocal(tempLocal.index, valueExpr), + nativeType, + constantOffset + ), + module.createGetLocal(tempLocal.index, nativeType) + ], nativeType); + } +} + /** Ensures that the specified class's GC hook exists and returns its function table index. */ export function ensureGCHook( compiler: Compiler, diff --git a/src/common.ts b/src/common.ts index e2518b28a3..f46ffff163 100644 --- a/src/common.ts +++ b/src/common.ts @@ -174,6 +174,7 @@ export namespace LibrarySymbols { export const V128 = "V128"; export const String = "String"; export const Array = "Array"; + export const ArrayBufferView = "ArrayBufferView"; export const ArrayBuffer = "ArrayBuffer"; export const Math = "Math"; export const Mathf = "Mathf"; diff --git a/src/compiler.ts b/src/compiler.ts index 5b9dfb21f0..81209c8d2c 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -8,7 +8,9 @@ import { compileAbort, compileIterateRoots, ensureGCHook, - BuiltinSymbols + BuiltinSymbols, + compileTypedArrayGet, + compileTypedArraySet } from "./builtins"; import { @@ -4683,7 +4685,21 @@ export class Compiler extends DiagnosticEmitter { break; } case ElementKind.CLASS: { - if (resolver.currentElementExpression) { // indexed access + let elementExpression = resolver.currentElementExpression; + if (elementExpression) { // indexed access + let arrayBufferView = this.program.arrayBufferView; + if (arrayBufferView) { + if ((target).prototype.extends(arrayBufferView.prototype)) { + return compileTypedArraySet( + this, + target, + assert(this.resolver.currentThisExpression), + elementExpression, + valueExpression, + contextualType + ); + } + } let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); let indexedSet = (target).lookupOverload(OperatorKind.INDEXED_SET, isUnchecked); if (!indexedSet) { @@ -5886,6 +5902,18 @@ export class Compiler extends DiagnosticEmitter { if (!target) return this.module.createUnreachable(); switch (target.kind) { case ElementKind.CLASS: { + let arrayBufferView = this.program.arrayBufferView; + if (arrayBufferView) { + if ((target).prototype.extends(arrayBufferView.prototype)) { + return compileTypedArrayGet( + this, + target, + expression.expression, + expression.elementExpression, + contextualType + ); + } + } let isUnchecked = this.currentFlow.is(FlowFlags.UNCHECKED_CONTEXT); let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); if (!indexedGet) { diff --git a/src/program.ts b/src/program.ts index 8da3db04b5..0d610f8b8c 100644 --- a/src/program.ts +++ b/src/program.ts @@ -333,6 +333,8 @@ export class Program extends DiagnosticEmitter { // runtime references + /** ArrayBufferView reference. */ + arrayBufferView: Class | null = null; /** ArrayBuffer instance reference. */ arrayBufferInstance: Class | null = null; /** Array prototype reference. */ @@ -770,6 +772,10 @@ export class Program extends DiagnosticEmitter { assert(element.kind == ElementKind.CLASS_PROTOTYPE); this.stringInstance = resolver.resolveClass(element, null); } + if (element = this.lookupGlobal(LibrarySymbols.ArrayBufferView)) { + assert(element.kind == ElementKind.CLASS_PROTOTYPE); + this.arrayBufferView = resolver.resolveClass(element, null); + } if (element = this.lookupGlobal(LibrarySymbols.ArrayBuffer)) { assert(element.kind == ElementKind.CLASS_PROTOTYPE); this.arrayBufferInstance = resolver.resolveClass(element, null); @@ -1145,7 +1151,7 @@ export class Program extends DiagnosticEmitter { (declaration.is(CommonFlags.READONLY) ? DecoratorFlags.INLINE : DecoratorFlags.NONE - ) | DecoratorFlags.LAZY + ) | DecoratorFlags.LAZY | DecoratorFlags.UNSAFE ), declaration ); @@ -1156,7 +1162,7 @@ export class Program extends DiagnosticEmitter { name, parent, declaration, - this.checkDecorators(decorators, DecoratorFlags.NONE) + this.checkDecorators(decorators, DecoratorFlags.UNSAFE) ); if (!parent.addInstance(name, element)) return; } diff --git a/std/assembly/arraybuffer.ts b/std/assembly/arraybuffer.ts index 9014d73bd3..d1cef3e176 100644 --- a/std/assembly/arraybuffer.ts +++ b/std/assembly/arraybuffer.ts @@ -1,8 +1,8 @@ import { - HEADER_SIZE, - MAX_BLENGTH, - allocateUnsafe -} from "./internal/arraybuffer"; + ALLOC_RAW, + REGISTER, + ArrayBufferBase +} from "./runtime"; import { Uint8ClampedArray, @@ -21,9 +21,7 @@ import { } from "./dataview"; @sealed -export class ArrayBuffer { - - readonly byteLength: i32; // capped to [0, MAX_LENGTH] +export class ArrayBuffer extends ArrayBufferBase { @inline static isView(value: T): bool { if (value === null) return false; @@ -40,28 +38,15 @@ export class ArrayBuffer { return false; } - // @unsafe - @inline get data(): usize { return changetype(this) + HEADER_SIZE; } - - constructor(length: i32, unsafe: bool = false) { - if (length > MAX_BLENGTH) throw new RangeError("Invalid array buffer length"); - var buffer = allocateUnsafe(length); - if (!unsafe) memory.fill(changetype(buffer) + HEADER_SIZE, 0, length); - return buffer; - } - - slice(begin: i32 = 0, end: i32 = MAX_BLENGTH): ArrayBuffer { + slice(begin: i32 = 0, end: i32 = ArrayBuffer.MAX_BYTELENGTH): ArrayBuffer { var len = this.byteLength; begin = begin < 0 ? max(len + begin, 0) : min(begin, len); end = end < 0 ? max(len + end, 0) : min(end, len); len = max(end - begin, 0); - var buffer = allocateUnsafe(len); - memory.copy( - changetype(buffer) + HEADER_SIZE, - changetype(this) + HEADER_SIZE + begin, - len - ); - return buffer; + var outSize = len; + var out = ALLOC_RAW(outSize); + memory.copy(out, changetype(this) + begin, outSize); + return REGISTER(out); } toString(): string { diff --git a/std/assembly/internal/typedarray.ts b/std/assembly/internal/typedarray.ts index 69d4d5b17a..db9f7d3fc7 100644 --- a/std/assembly/internal/typedarray.ts +++ b/std/assembly/internal/typedarray.ts @@ -1,10 +1,12 @@ import { - HEADER_SIZE as AB_HEADER_SIZE, - MAX_BLENGTH as AB_MAX_BLENGTH, - allocateUnsafe, - LOAD, - STORE -} from "./arraybuffer"; + ALLOC, + REGISTER, + LINK +} from "../runtime"; + +import { + ArrayBuffer +} from "../arraybuffer"; import { SORT as SORT_IMPL @@ -19,228 +21,184 @@ export abstract class TypedArray { readonly byteLength: i32; constructor(length: i32) { - const MAX_LENGTH = AB_MAX_BLENGTH / sizeof(); + const MAX_LENGTH = ArrayBuffer.MAX_BYTELENGTH / sizeof(); if (length > MAX_LENGTH) throw new RangeError("Invalid typed array length"); var byteLength = length << alignof(); - var buffer = allocateUnsafe(byteLength); - memory.fill(changetype(buffer) + AB_HEADER_SIZE, 0, byteLength); - this.buffer = buffer; + this.buffer = new ArrayBuffer(byteLength); this.byteOffset = 0; this.byteLength = byteLength; } - @inline get length(): i32 { return this.byteLength >>> alignof(); } - @operator("[]") - protected __get(index: i32): T { + // TODO: could compute load/store offset from index and emit an immediate -> make this a builtin? + + @operator("[]") protected __get(index: i32): T { if (index >= (this.byteLength >>> alignof())) throw new Error("Index out of bounds"); - return LOAD(this.buffer, index, this.byteOffset); + return load(changetype(this.buffer) + this.byteOffset, index << alignof()); } - @inline @operator("{}") - protected __unchecked_get(index: i32): T { - return LOAD(this.buffer, index, this.byteOffset); + @inline @operator("{}") protected __unchecked_get(index: i32): T { + return load(changetype(this.buffer) + this.byteOffset + (index << alignof())); } - @operator("[]=") - protected __set(index: i32, value: native): void { + @operator("[]=") protected __set(index: i32, value: native): void { if (index >= (this.byteLength >>> alignof())) throw new Error("Index out of bounds"); - STORE>(this.buffer, index, value, this.byteOffset); + store(changetype(this.buffer) + this.byteOffset + (index << alignof()), value); } - @inline @operator("{}=") - protected __unchecked_set(index: i32, value: native): void { - STORE>(this.buffer, index, value, this.byteOffset); + @inline @operator("{}=") protected __unchecked_set(index: i32, value: native): void { + store(changetype(this.buffer) + this.byteOffset + (index << alignof()), value); } // copyWithin(target: i32, start: i32, end: i32 = this.length): this } -@inline -export function FILL, T extends number>( +@inline export function FILL, T extends number>( array: TArray, value: native, start: i32, end: i32 ): TArray { - var buffer = array.buffer; - var byteOffset = array.byteOffset; + var base = changetype(array.buffer) + array.byteOffset; var len = array.length; start = start < 0 ? max(len + start, 0) : min(start, len); end = end < 0 ? max(len + end, 0) : min(end, len); if (sizeof() == 1) { - if (start < end) { - memory.fill( - changetype(buffer) + start + byteOffset + AB_HEADER_SIZE, - value, - (end - start) - ); - } + if (start < end) memory.fill(base + start, value, (end - start)); } else { for (; start < end; ++start) { - STORE>(buffer, start, value, byteOffset); + store(base + (start << alignof()), value); } } return array; } -@inline -export function SORT, T>( +@inline export function SORT, T>( array: TArray, comparator: (a: T, b: T) => i32 ): TArray { - var byteOffset = array.byteOffset; var length = array.length; + var offset = array.byteOffset; if (length <= 1) return array; - var buffer = array.buffer; + var buffer = changetype(array.buffer); if (length == 2) { - let a = LOAD(buffer, 1, byteOffset); - let b = LOAD(buffer, 0, byteOffset); + let a = load(buffer + offset, sizeof()); + let b = load(buffer + offset); if (comparator(a, b) < 0) { - STORE(buffer, 1, b, byteOffset); - STORE(buffer, 0, a, byteOffset); + store(buffer + offset, b, sizeof()); + store(buffer + offset, a); } return array; } - SORT_IMPL(buffer, byteOffset, length, comparator); + // TODO + // SORT_IMPL(buffer, byteOffset, length, comparator); return array; } -@inline -export function SUBARRAY, T>( +@inline export function SUBARRAY, T>( array: TArray, begin: i32, end: i32 ): TArray { + var buffer = changetype(array.buffer); var length = array.length; if (begin < 0) begin = max(length + begin, 0); else begin = min(begin, length); if (end < 0) end = max(length + end, begin); else end = max(min(end, length), begin); - var slice = memory.allocate(offsetof()); - store(slice, array.buffer, offsetof("buffer")); - store(slice, array.byteOffset + (begin << alignof()), offsetof("byteOffset")); - store(slice, (end - begin) << alignof(), offsetof("byteLength")); - return changetype(slice); + var out = ALLOC(offsetof()); + store(out, buffer, offsetof("buffer")); + store(out, array.byteOffset + (begin << alignof()), offsetof("byteOffset")); + store(out, (end - begin) << alignof(), offsetof("byteLength")); + LINK(buffer, REGISTER(out)); // register first, then link + return changetype(out); } -@inline -export function REDUCE, T, TRet>( +@inline export function REDUCE, T, TRet>( array: TArray, callbackfn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet, initialValue: TRet ): TRet { - var length = array.length; - var buffer = array.buffer; - var byteOffset = array.byteOffset; - for (let i = 0; i < length; i++) { - initialValue = callbackfn( - initialValue, - LOAD(buffer, i, byteOffset), - i, - array, - ); + var base = changetype(array.buffer) + array.byteOffset; + for (let i = 0, k = array.length; i < k; i++) { + initialValue = callbackfn(initialValue, load(base + (i << alignof())), i, array); } return initialValue; } -@inline -export function REDUCE_RIGHT, T, TRet>( +@inline export function REDUCE_RIGHT, T, TRet>( array: TArray, callbackfn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet, initialValue: TRet ): TRet { - var buffer = array.buffer; - var byteOffset = array.byteOffset; + var base = changetype(array.buffer) + array.byteOffset; for (let i = array.length - 1; i >= 0; i--) { - initialValue = callbackfn( - initialValue, - LOAD(buffer, i, byteOffset), - i, - array, - ); + initialValue = callbackfn(initialValue, load(base + (i << alignof())), i, array); } return initialValue; } -@inline -export function MAP, T>( +@inline export function MAP, T>( array: TArray, callbackfn: (value: T, index: i32, self: TArray) => T, ): TArray { var length = array.length; - var buffer = array.buffer; - var byteOffset = array.byteOffset; + var base = changetype(array.buffer) + array.byteOffset; var result = instantiate(length); - var resultBuffer = result.buffer; + var resultBase = changetype(result.buffer); // assumes byteOffset = 0 for (let i = 0; i < length; i++) { - STORE>(resultBuffer, i, >callbackfn(LOAD(buffer, i, byteOffset), i, array)); + store( + resultBase + (i << alignof()), + callbackfn(load(base + (i << alignof())), i, array) + ); } return result; } -@inline -export function FIND_INDEX, T>( +@inline export function FIND_INDEX, T>( array: TArray, callbackfn: (value: T, index: i32, array: TArray) => bool, ): i32 { - var length = array.length; - var buffer = array.buffer; - var byteOffset = array.byteOffset; - for (let i = 0; i < length; i++) { - if (callbackfn(LOAD(buffer, i, byteOffset), i, array)) { - return i; - } + var base = changetype(array.buffer) + array.byteOffset; + for (let i = 0, k = array.length; i < k; i++) { + if (callbackfn(load(base + (i << alignof())), i, array)) return i; } return -1; } -@inline -export function SOME, T>( +@inline export function SOME, T>( array: TArray, callbackfn: (value: T, index: i32, array: TArray) => bool, ): bool { - var length = array.length; - var buffer = array.buffer; - var byteOffset = array.byteOffset; - for (let i = 0; i < length; i++) { - if (callbackfn(LOAD(buffer, i, byteOffset), i, array)) { - return true; - } + var base = changetype(array.buffer) + array.byteOffset; + for (let i = 0, k = array.length; i < k; i++) { + if (callbackfn(load(base + (i << alignof())), i, array)) return true; } return false; } -@inline -export function EVERY, T>( +@inline export function EVERY, T>( array: TArray, callbackfn: (value: T, index: i32, array: TArray) => bool, ): bool { - var length = array.length; - var buffer = array.buffer; - var byteOffset = array.byteOffset; - for (let i = 0; i < length; i++) { - if (callbackfn(LOAD(buffer, i, byteOffset), i, array)) { - continue; - } + var base = changetype(array.buffer) + array.byteOffset; + for (let i = 0, k = array.length; i < k; i++) { + if (callbackfn(load(base + (i << alignof())), i, array)) continue; return false; } return true; } -@inline -export function FOREACH, T>( +@inline export function FOREACH, T>( array: TArray, callbackfn: (value: T, index: i32, array: TArray) => void, ): void { - var length = array.length; - var buffer = array.buffer; - var byteOffset = array.byteOffset; - for (let i = 0; i < length; i++) { - callbackfn(LOAD(buffer, i, byteOffset), i, array); + var base = changetype(array.buffer) + array.byteOffset; + for (let i = 0, k = array.length; i < k; i++) { + callbackfn(load(base + (i << alignof())), i, array); } } diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 157ce44086..d830bf590b 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -43,8 +43,8 @@ export function ADJUST(payloadSize: usize): usize { return 1 << (32 - clz(payloadSize + HEADER_SIZE - 1)); } -/** Allocates a new object and returns a pointer to its payload. */ -@unsafe export function ALLOC(payloadSize: u32): usize { +/** Allocates a new object and returns a pointer to its payload. Does not fill. */ +@unsafe export function ALLOC_RAW(payloadSize: u32): usize { var header = changetype
(memory.allocate(ADJUST(payloadSize))); header.classId = HEADER_MAGIC; header.payloadSize = payloadSize; @@ -52,7 +52,12 @@ export function ADJUST(payloadSize: usize): usize { header.gc1 = 0; header.gc2 = 0; } - var ref = changetype(header) + HEADER_SIZE; + return changetype(header) + HEADER_SIZE; +} + +/** Allocates a new object and returns a pointer to its payload. Fills with zeroes.*/ +@unsafe export function ALLOC(payloadSize: u32): usize { + var ref = ALLOC_RAW(payloadSize); memory.fill(ref, 0, payloadSize); return ref; } @@ -110,12 +115,12 @@ function unref(ref: usize): HEADER { } /** Registers a managed object. Cannot be free'd anymore afterwards. */ -@unsafe @inline export function REGISTER(ref: usize): T { +@unsafe @inline export function REGISTER(ref: usize): TRet { // see comment in REALLOC why this is useful. also inline this because // it's generic so we don't get a bunch of functions. unref(ref).classId = gc.classId(); if (GC) gc.register(ref); - return changetype(ref); + return changetype(ref); } /** Links a managed object with its managed parent. */ @@ -132,6 +137,41 @@ export abstract class ArrayBufferBase { get byteLength(): i32 { return changetype
(changetype(this) - HEADER_SIZE).payloadSize; } + constructor(length: i32) { + if (length > ArrayBufferBase.MAX_BYTELENGTH) throw new RangeError("Invalid array buffer length"); + return REGISTER(ALLOC(length)); + } +} + +/** Typed array base class. */ +export abstract class ArrayBufferView { + [key: number]: number; + readonly buffer: ArrayBuffer; + @unsafe dataStart: usize; + @unsafe dataEnd: usize; + + constructor(length: i32, alignLog2: i32) { + if (length > ArrayBufferBase.MAX_BYTELENGTH >> alignLog2) { + throw new RangeError("Invalid typed array length"); + } + var byteLength = length << alignLog2; + var buffer = new ArrayBuffer(byteLength); + this.buffer = buffer; + this.dataStart = changetype(buffer); + this.dataEnd = changetype(buffer) + length; + } + + get byteOffset(): i32 { + return this.dataStart - changetype(this.buffer); + } + + get byteLength(): i32 { + return this.dataEnd - this.dataStart; + } + + get length(): i32 { + return unreachable(); + } } /** String base class. */ diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index a894b66b47..bc3e0c2339 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -1,16 +1,9 @@ import { - TypedArray, - FILL, - SORT, - SUBARRAY, - REDUCE, - REDUCE_RIGHT, - MAP, - FIND_INDEX, - SOME, - EVERY, - FOREACH, -} from "./internal/typedarray"; + ALLOC, + REGISTER, + LINK, + ArrayBufferView +} from "./runtime"; import { COMPARATOR @@ -20,9 +13,15 @@ function clampToByte(value: i32): i32 { return ~(value >> 31) & (((255 - value) >> 31) | value); // & 255 } -export class Int8Array extends TypedArray { +export class Int8Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + constructor(length: i32) { + super(length, 0); + } + + get length(): i32 { return this.byteLength; } + fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int8Array { return FILL(this, value, start, end); } @@ -70,9 +69,15 @@ export class Int8Array extends TypedArray { } } -export class Uint8Array extends TypedArray { +export class Uint8Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + constructor(length: i32) { + super(length, 0); + } + + get length(): i32 { return this.byteLength; } + fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8Array { return FILL(this, value, start, end); } @@ -123,16 +128,6 @@ export class Uint8Array extends TypedArray { export class Uint8ClampedArray extends Uint8Array { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); - @inline @operator("[]=") - protected __set(index: i32, value: i32): void { - super.__set(index, clampToByte(value)); - } - - @inline @operator("{}=") - protected __unchecked_set(index: i32, value: i32): void { - super.__unchecked_set(index, clampToByte(value)); - } - fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8ClampedArray { return changetype(super.fill(value, start, end)); // safe because '.fill' reuses 'this' } @@ -180,9 +175,15 @@ export class Uint8ClampedArray extends Uint8Array { } } -export class Int16Array extends TypedArray { +export class Int16Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + constructor(length: i32) { + super(length, 1); + } + + get length(): i32 { return this.byteLength >>> 1; } + fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int16Array { return FILL(this, value, start, end); } @@ -230,9 +231,15 @@ export class Int16Array extends TypedArray { } } -export class Uint16Array extends TypedArray { +export class Uint16Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + constructor(length: i32) { + super(length, 1); + } + + get length(): i32 { return this.byteLength >>> 1; } + fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint16Array { return FILL(this, value, start, end); } @@ -280,9 +287,15 @@ export class Uint16Array extends TypedArray { } } -export class Int32Array extends TypedArray { +export class Int32Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + constructor(length: i32) { + super(length, 2); + } + + get length(): i32 { return this.byteLength >>> 2; } + fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int32Array { return FILL(this, value, start, end); } @@ -330,9 +343,15 @@ export class Int32Array extends TypedArray { } } -export class Uint32Array extends TypedArray { +export class Uint32Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + constructor(length: i32) { + super(length, 2); + } + + get length(): i32 { return this.byteLength >>> 2; } + fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint32Array { return FILL(this, value, start, end); } @@ -380,9 +399,15 @@ export class Uint32Array extends TypedArray { } } -export class Int64Array extends TypedArray { +export class Int64Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + constructor(length: i32) { + super(length, 3); + } + + get length(): i32 { return this.byteLength >>> 3; } + fill(value: i64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int64Array { return FILL(this, value, start, end); } @@ -430,9 +455,15 @@ export class Int64Array extends TypedArray { } } -export class Uint64Array extends TypedArray { +export class Uint64Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + constructor(length: i32) { + super(length, 3); + } + + get length(): i32 { return this.byteLength >>> 3; } + fill(value: u64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint64Array { return FILL(this, value, start, end); } @@ -480,9 +511,15 @@ export class Uint64Array extends TypedArray { } } -export class Float32Array extends TypedArray { +export class Float32Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + constructor(length: i32) { + super(length, 2); + } + + get length(): i32 { return this.byteLength >>> 2; } + fill(value: f32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float32Array { return FILL(this, value, start, end); } @@ -530,9 +567,15 @@ export class Float32Array extends TypedArray { } } -export class Float64Array extends TypedArray { +export class Float64Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + constructor(length: i32) { + super(length, 3); + } + + get length(): i32 { return this.byteLength >>> 3; } + fill(value: f64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float64Array { return FILL(this, value, start, end); } @@ -579,3 +622,148 @@ export class Float64Array extends TypedArray { FOREACH(this, callbackfn); } } + +@inline function FILL( + array: TArray, + value: native, + start: i32, + end: i32 +): TArray { + var dataStart = array.dataStart; + var length = array.length; + start = start < 0 ? max(length + start, 0) : min(start, length); + end = end < 0 ? max(length + end, 0) : min(end, length); + if (sizeof() == 1) { + if (start < end) memory.fill(dataStart + start, value, (end - start)); + } else { + for (; start < end; ++start) { + store(dataStart + (start << alignof()), value); + } + } + return array; +} + +@inline function SORT( + array: TArray, + comparator: (a: T, b: T) => i32 +): TArray { + var length = array.length; + if (length <= 1) return array; + var base = array.dataStart; + if (length == 2) { + let a = load(base, sizeof()); + let b = load(base); + if (comparator(a, b) < 0) { + store(base, b, sizeof()); + store(base, a); + } + return array; + } + // TODO + // SORT_IMPL(buffer, byteOffset, length, comparator); + return array; +} + +@inline function SUBARRAY( + array: TArray, + begin: i32, + end: i32 +): TArray { + var buffer = changetype(array.buffer); + var length = array.length; + if (begin < 0) begin = max(length + begin, 0); + else begin = min(begin, length); + if (end < 0) end = max(length + end, begin); + else end = max(min(end, length), begin); + var out = ALLOC(offsetof()); + store(out, buffer, offsetof("buffer")); + store(out, array.dataStart + (begin << alignof()) , offsetof("dataStart")); + store(out, array.dataEnd + ((end - begin) << alignof()), offsetof("dataEnd")); + LINK(buffer, REGISTER(out)); // register first, then link + return changetype(out); +} + +@inline function REDUCE( + array: TArray, + callbackfn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet, + initialValue: TRet +): TRet { + var dataStart = array.dataStart; + for (let i = 0, k = array.length; i < k; i++) { + initialValue = callbackfn(initialValue, load(dataStart + (i << alignof())), i, array); + } + return initialValue; +} + +@inline function REDUCE_RIGHT( + array: TArray, + callbackfn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet, + initialValue: TRet +): TRet { + var dataStart = array.dataStart; + for (let i = array.length - 1; i >= 0; i--) { + initialValue = callbackfn(initialValue, load(dataStart + (i << alignof())), i, array); + } + return initialValue; +} + +@inline function MAP( + array: TArray, + callbackfn: (value: T, index: i32, self: TArray) => T, +): TArray { + var length = array.length; + var dataStart = array.dataStart; + var out = instantiate(length); + var outDataStart = out.dataStart; + for (let i = 0; i < length; i++) { + store( + outDataStart + (i << alignof()), + callbackfn(load(dataStart + (i << alignof())), i, array) + ); + } + return out; +} + +@inline function FIND_INDEX( + array: TArray, + callbackfn: (value: T, index: i32, array: TArray) => bool, +): i32 { + var dataStart = array.dataStart; + for (let i = 0, k = array.length; i < k; i++) { + if (callbackfn(load(dataStart + (i << alignof())), i, array)) return i; + } + return -1; +} + +@inline function SOME( + array: TArray, + callbackfn: (value: T, index: i32, array: TArray) => bool, +): bool { + var dataStart = array.dataStart; + for (let i = 0, k = array.length; i < k; i++) { + if (callbackfn(load(dataStart + (i << alignof())), i, array)) return true; + } + return false; +} + +@inline function EVERY( + array: TArray, + callbackfn: (value: T, index: i32, array: TArray) => bool, +): bool { + var dataStart = array.dataStart; + for (let i = 0, k = array.length; i < k; i++) { + if (callbackfn(load(dataStart + (i << alignof())), i, array)) continue; + return false; + } + return true; +} + +@inline function FOREACH( + array: TArray, + callbackfn: (value: T, index: i32, array: TArray) => void, +): void { + var dataStart = array.dataStart; + for (let i = 0, k = array.length; i < k; i++) { + callbackfn(load(dataStart + (i << alignof())), i, array); + } +} diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 2dcfc063c3..edf175735a 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -1173,7 +1173,34 @@ local.get $0 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/internal/memory/memset (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/runtime/ALLOC_RAW (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/tlsf/memory.allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 + i32.add + ) + (func $~lib/internal/memory/memset (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 i32.eqz @@ -1392,38 +1419,16 @@ end end ) - (func $~lib/runtime/ALLOC (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOC (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 15 - i32.add - i32.clz - i32.sub - i32.shl - call $~lib/allocator/tlsf/memory.allocate - local.tee $1 - i32.const -1520547049 - i32.store - local.get $1 local.get $0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add + call $~lib/runtime/ALLOC_RAW local.tee $1 local.get $0 call $~lib/internal/memory/memset local.get $1 ) - (func $~lib/internal/memory/memcpy (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/memory/memcpy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2320,7 +2325,7 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/memory/memmove (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2518,7 +2523,7 @@ end end ) - (func $~lib/allocator/tlsf/memory.free (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/memory.free (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2556,7 +2561,7 @@ end end ) - (func $~lib/runtime/REALLOC (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/REALLOC (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2630,7 +2635,7 @@ if i32.const 0 i32.const 184 - i32.const 83 + i32.const 88 i32.const 8 call $~lib/env/abort unreachable @@ -2657,14 +2662,14 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/unref (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/unref (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 232 i32.lt_u if i32.const 0 i32.const 184 - i32.const 101 + i32.const 106 i32.const 2 call $~lib/env/abort unreachable @@ -2679,18 +2684,18 @@ if i32.const 0 i32.const 184 - i32.const 103 + i32.const 108 i32.const 2 call $~lib/env/abort unreachable end local.get $0 ) - (func $std/runtime/gc.register (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/runtime/gc.register (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $std/runtime/register_ref ) - (func $start:std/runtime (; 25 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 26 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3015,13 +3020,13 @@ unreachable end ) - (func $std/runtime/gc.link (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/runtime/gc.link (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/runtime/gc.collect (; 27 ;) (type $FUNCSIG$v) + (func $~lib/runtime/gc.collect (; 28 ;) (type $FUNCSIG$v) nop ) - (func $start (; 28 ;) (type $FUNCSIG$v) + (func $start (; 29 ;) (type $FUNCSIG$v) call $start:std/runtime ) ) diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 69d6344da5..76644b5c64 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -1461,7 +1461,29 @@ local.get $0 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/internal/memory/memset (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/runtime/ALLOC_RAW (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/ADJUST + call $~lib/allocator/tlsf/memory.allocate + local.set $1 + local.get $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 + i32.add + ) + (func $~lib/internal/memory/memset (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) @@ -1715,47 +1737,29 @@ end end ) - (func $~lib/runtime/ALLOC (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOC (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 - call $~lib/runtime/ADJUST - call $~lib/allocator/tlsf/memory.allocate + call $~lib/runtime/ALLOC_RAW local.set $1 - local.get $1 - i32.const -1520547049 - i32.store - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - local.set $2 block $~lib/runtime/memory.fill|inlined.0 - local.get $2 - local.set $3 + local.get $1 + local.set $2 i32.const 0 - local.set $4 + local.set $3 local.get $0 - local.set $5 + local.set $4 + local.get $2 local.get $3 local.get $4 - local.get $5 call $~lib/internal/memory/memset end - local.get $2 + local.get $1 ) - (func $~lib/internal/memory/memcpy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/memory/memcpy (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2956,7 +2960,7 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/memory/memmove (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 local.get $1 @@ -3183,7 +3187,7 @@ end end ) - (func $~lib/allocator/tlsf/memory.free (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/memory.free (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3226,7 +3230,7 @@ end end ) - (func $~lib/runtime/REALLOC (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/REALLOC (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3315,7 +3319,7 @@ if i32.const 0 i32.const 184 - i32.const 83 + i32.const 88 i32.const 8 call $~lib/env/abort unreachable @@ -3351,7 +3355,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/unref (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/unref (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 global.get $~lib/runtime/HEAP_BASE @@ -3362,7 +3366,7 @@ if i32.const 0 i32.const 184 - i32.const 101 + i32.const 106 i32.const 2 call $~lib/env/abort unreachable @@ -3379,29 +3383,29 @@ if i32.const 0 i32.const 184 - i32.const 103 + i32.const 108 i32.const 2 call $~lib/env/abort unreachable end local.get $1 ) - (func $~lib/runtime/FREE (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/FREE (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/runtime/unref call $~lib/allocator/tlsf/memory.free ) - (func $std/runtime/gc.register (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/runtime/gc.register (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $std/runtime/register_ref ) - (func $~lib/runtime/ArrayBufferBase#get:byteLength (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferBase#get:byteLength (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub i32.load offset=4 ) - (func $~lib/runtime/StringBase#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/StringBase#get:length (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -3409,7 +3413,7 @@ i32.const 1 i32.shr_u ) - (func $start:std/runtime (; 34 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 35 ;) (type $FUNCSIG$v) (local $0 i32) call $start:~lib/allocator/tlsf i32.const 2 @@ -3654,7 +3658,7 @@ global.get $std/runtime/barrier1 call $~lib/runtime/ALLOC global.set $std/runtime/ref4 - block $~lib/runtime/REGISTER|inlined.0 (result i32) + block $~lib/runtime/REGISTER|inlined.0 (result i32) global.get $std/runtime/ref4 local.set $0 local.get $0 @@ -3738,15 +3742,15 @@ unreachable end ) - (func $std/runtime/gc.link (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/runtime/gc.link (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/runtime/gc.collect (; 36 ;) (type $FUNCSIG$v) + (func $~lib/runtime/gc.collect (; 37 ;) (type $FUNCSIG$v) nop ) - (func $start (; 37 ;) (type $FUNCSIG$v) + (func $start (; 38 ;) (type $FUNCSIG$v) call $start:std/runtime ) - (func $null (; 38 ;) (type $FUNCSIG$v) + (func $null (; 39 ;) (type $FUNCSIG$v) ) ) From 146dfdbb4a23197a1b6ed473021692de3456a5e9 Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 11 Mar 2019 23:34:20 +0100 Subject: [PATCH 019/119] it's all broken --- std/assembly/array.ts | 299 ++++++++++++++++---------------- std/assembly/index.d.ts | 2 - std/assembly/internal/sort.ts | 62 +++---- std/assembly/internal/string.ts | 20 +-- std/assembly/runtime.ts | 18 +- std/assembly/string.ts | 39 +---- std/assembly/typedarray.ts | 14 +- tests/compiler/empty.ts | 9 + 8 files changed, 211 insertions(+), 252 deletions(-) diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 059d5650ca..5e453f05b7 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -1,17 +1,29 @@ +// import { +// MAX_BLENGTH, +// HEADER_SIZE, +// allocateUnsafe, +// reallocateUnsafe, +// LOAD, +// STORE +// } from "./internal/arraybuffer"; + import { - MAX_BLENGTH, - HEADER_SIZE, - allocateUnsafe, - reallocateUnsafe, - LOAD, - STORE -} from "./internal/arraybuffer"; + ALLOC, + REALLOC, + REGISTER, + LINK, + ArrayBufferView +} from "./runtime"; import { - allocateUnsafe as allocateUnsafeString, - freeUnsafe as freeUnsafeString, - copyUnsafe as copyUnsafeString -} from "./internal/string"; + ArrayBuffer +} from "./arraybuffer"; + +// import { +// allocateUnsafe as allocateUnsafeString, +// freeUnsafe as freeUnsafeString, +// copyUnsafe as copyUnsafeString +// } from "./internal/string"; import { COMPARATOR, @@ -30,119 +42,114 @@ import { isArray as builtin_isArray } from "./builtins"; -export class Array { - [key: number]: T; // compatibility only - - /* @internal */ buffer_: ArrayBuffer; - /* @internal */ length_: i32; +export class Array extends ArrayBufferView { + private length_: i32; @inline static isArray(value: U): bool { return builtin_isArray(value) && value !== null; } constructor(length: i32 = 0) { - const MAX_LENGTH = MAX_BLENGTH >>> alignof(); - if (length > MAX_LENGTH) throw new RangeError("Invalid array length"); - var byteLength = length << alignof(); - var buffer = allocateUnsafe(byteLength); - this.buffer_ = buffer; + super(length, alignof()); this.length_ = length; - memory.fill( - changetype(buffer) + HEADER_SIZE, - 0, - byteLength - ); } - @inline get length(): i32 { return this.length_; } set length(length: i32) { - var buffer = this.buffer_; - var capacity = buffer.byteLength >>> alignof(); - if (length > capacity) { - const MAX_LENGTH = MAX_BLENGTH >>> alignof(); + this.resize(length); + this.length_ = length; + } + + resize(length: i32): void { + var buffer = this.buffer; + var oldCapacity = buffer.byteLength >>> alignof(); + if (length > oldCapacity) { + const MAX_LENGTH = ArrayBuffer.MAX_BYTELENGTH >>> alignof(); if (length > MAX_LENGTH) throw new RangeError("Invalid array length"); - buffer = reallocateUnsafe(buffer, length << alignof()); - this.buffer_ = buffer; + let newCapacity = length << alignof(); + let newBuffer = REALLOC(changetype(buffer), newCapacity); + if (newBuffer !== changetype(buffer)) { + this.buffer = changetype(newBuffer); // links + this.dataStart = newBuffer; + this.dataEnd = newBuffer + newCapacity; + } } - this.length_ = length; } every(callbackfn: (element: T, index: i32, array: Array) => bool): bool { for (let index = 0, length = this.length_; index < min(length, this.length_); ++index) { - if (!callbackfn(LOAD(this.buffer_, index), index, this)) return false; + if (!callbackfn(load(this.dataStart + (index << alignof())), index, this)) return false; } return true; } findIndex(predicate: (element: T, index: i32, array: Array) => bool): i32 { for (let index = 0, length = this.length_; index < min(length, this.length_); ++index) { - if (predicate(LOAD(this.buffer_, index), index, this)) return index; + if (predicate(load(this.dataStart + (index << alignof())), index, this)) return index; } return -1; } - @operator("[]") - private __get(index: i32): T { - var buffer = this.buffer_; - return index < (buffer.byteLength >>> alignof()) - ? LOAD(buffer, index) - : unreachable(); - } - - @operator("{}") - private __unchecked_get(index: i32): T { - return LOAD(this.buffer_, index); - } - - @operator("[]=") - private __set(index: i32, value: T): void { - var buffer = this.buffer_; - var capacity = buffer.byteLength >>> alignof(); - if (index >= capacity) { - const MAX_LENGTH = MAX_BLENGTH >>> alignof(); - if (index >= MAX_LENGTH) throw new Error("Invalid array length"); - buffer = reallocateUnsafe(buffer, (index + 1) << alignof()); - this.buffer_ = buffer; - this.length_ = index + 1; - } - STORE(buffer, index, value); - if (isManaged()) __gc_link(changetype(this), changetype(value)); // tslint:disable-line - } - - @operator("{}=") - private __unchecked_set(index: i32, value: T): void { - STORE(this.buffer_, index, value); - if (isManaged()) __gc_link(changetype(this), changetype(value)); // tslint:disable-line - } + // @operator("[]") + // private __get(index: i32): T { + // var buffer = this.buffer_; + // return index < (buffer.byteLength >>> alignof()) + // ? LOAD(buffer, index) + // : unreachable(); + // } + + // @operator("{}") + // private __unchecked_get(index: i32): T { + // return LOAD(this.buffer_, index); + // } + + // @operator("[]=") + // private __set(index: i32, value: T): void { + // var buffer = this.buffer_; + // var capacity = buffer.byteLength >>> alignof(); + // if (index >= capacity) { + // const MAX_LENGTH = MAX_BLENGTH >>> alignof(); + // if (index >= MAX_LENGTH) throw new Error("Invalid array length"); + // buffer = reallocateUnsafe(buffer, (index + 1) << alignof()); + // this.buffer_ = buffer; + // this.length_ = index + 1; + // } + // STORE(buffer, index, value); + // if (isManaged()) __gc_link(changetype(this), changetype(value)); // tslint:disable-line + // } + + // @operator("{}=") + // private __unchecked_set(index: i32, value: T): void { + // STORE(this.buffer_, index, value); + // if (isManaged()) __gc_link(changetype(this), changetype(value)); // tslint:disable-line + // } fill(value: T, start: i32 = 0, end: i32 = i32.MAX_VALUE): this { - var buffer = this.buffer_; - var len = this.length_; + var base = this.dataStart; + var length = this.length_; - start = start < 0 ? max(len + start, 0) : min(start, len); - end = end < 0 ? max(len + end, 0) : min(end, len); + start = start < 0 ? max(length + start, 0) : min(start, length); + end = end < 0 ? max(length + end, 0) : min(end, length); if (sizeof() == 1) { if (start < end) { memory.fill( - changetype(buffer) + start + HEADER_SIZE, + base + start, value, (end - start) ); } } else { for (; start < end; ++start) { - STORE(buffer, start, value); + store(base + (start << alignof()), value); } } return this; } - @inline includes(searchElement: T, fromIndex: i32 = 0): bool { return this.indexOf(searchElement, fromIndex) >= 0; } @@ -151,9 +158,9 @@ export class Array { var length = this.length_; if (length == 0 || fromIndex >= length) return -1; if (fromIndex < 0) fromIndex = max(length + fromIndex, 0); - var buffer = this.buffer_; + var base = this.dataStart; while (fromIndex < length) { - if (LOAD(buffer, fromIndex) == searchElement) return fromIndex; + if (load(base + (fromIndex << alignof())) == searchElement) return fromIndex; ++fromIndex; } return -1; @@ -164,50 +171,33 @@ export class Array { if (length == 0) return -1; if (fromIndex < 0) fromIndex = length + fromIndex; // no need to clamp else if (fromIndex >= length) fromIndex = length - 1; - var buffer = this.buffer_; + var base = this.dataStart; while (fromIndex >= 0) { // ^ - if (LOAD(buffer, fromIndex) == searchElement) return fromIndex; + if (load(base + (fromIndex << alignof())) == searchElement) return fromIndex; --fromIndex; } return -1; } push(element: T): i32 { - var length = this.length_; - var buffer = this.buffer_; - var capacity = buffer.byteLength >>> alignof(); - var newLength = length + 1; // safe only if length is checked - if (length >= capacity) { - const MAX_LENGTH = MAX_BLENGTH >>> alignof(); - if (length >= MAX_LENGTH) throw new Error("Invalid array length"); - buffer = reallocateUnsafe(buffer, newLength << alignof()); - this.buffer_ = buffer; - } + var newLength = this.length_ + 1; + this.resize(newLength); this.length_ = newLength; - STORE(buffer, length, element); - if (isManaged()) __gc_link(changetype(this), changetype(element)); // tslint:disable-line + store(this.dataStart + ((newLength - 1) << alignof()), element); + if (isManaged()) LINK(changetype(element), changetype(this)); return newLength; } - concat(items: Array): Array { + concat(other: Array): Array { var thisLen = this.length_; - var otherLen = select(0, items.length_, items === null); + var otherLen = select(0, other.length_, other === null); var outLen = thisLen + otherLen; var out = new Array(outLen); - if (thisLen) { - memory.copy( - changetype(out.buffer_) + HEADER_SIZE, - changetype(this.buffer_) + HEADER_SIZE, - thisLen << alignof() - ); + memory.copy(out.dataStart, this.dataStart, thisLen << alignof()); } if (otherLen) { - memory.copy( - changetype(out.buffer_) + HEADER_SIZE + (thisLen << alignof()), - changetype(items.buffer_) + HEADER_SIZE, - otherLen << alignof() - ); + memory.copy(out.dataStart + (thisLen << alignof()), other.dataStart, otherLen << alignof()); } return out; } @@ -242,23 +232,25 @@ export class Array { pop(): T { var length = this.length_; if (length < 1) throw new RangeError("Array is empty"); - var element = LOAD(this.buffer_, --length); + var element = load(this.dataStart + (--length << alignof())); this.length_ = length; return element; } forEach(callbackfn: (value: T, index: i32, array: Array) => void): void { for (let index = 0, length = this.length_; index < min(length, this.length_); ++index) { - callbackfn(LOAD(this.buffer_, index), index, this); + callbackfn(load(this.dataStart + (index << alignof())), index, this); } } map(callbackfn: (value: T, index: i32, array: Array) => U): Array { var length = this.length_; var result = new Array(length); - var buffer = result.buffer_; + var resultStart = result.dataStart; for (let index = 0; index < min(length, this.length_); ++index) { - STORE(buffer, index, callbackfn(LOAD(this.buffer_, index), index, this)); + let element = load(this.dataStart + (index << alignof())); + store(resultStart + (index << alignof()), element); + if (isManaged()) LINK(changetype(element), changetype(result)); } return result; } @@ -266,7 +258,7 @@ export class Array { filter(callbackfn: (value: T, index: i32, array: Array) => bool): Array { var result = new Array(); for (let index = 0, length = this.length_; index < min(length, this.length_); ++index) { - let value = LOAD(this.buffer_, index); + let value = load(this.dataStart + (index << alignof())); if (callbackfn(value, index, this)) result.push(value); } return result; @@ -278,7 +270,7 @@ export class Array { ): U { var accum = initialValue; for (let index = 0, length = this.length_; index < min(length, this.length_); ++index) { - accum = callbackfn(accum, LOAD(this.buffer_, index), index, this); + accum = callbackfn(accum, load(this.dataStart + (index << alignof())), index, this); } return accum; } @@ -289,7 +281,7 @@ export class Array { ): U { var accum = initialValue; for (let index = this.length_ - 1; index >= 0; --index) { - accum = callbackfn(accum, LOAD(this.buffer_, index), index, this); + accum = callbackfn(accum, load(this.dataStart + (index << alignof())), index, this); } return accum; } @@ -297,87 +289,86 @@ export class Array { shift(): T { var length = this.length_; if (length < 1) throw new RangeError("Array is empty"); - var buffer = this.buffer_; - var element = LOAD(buffer, 0); + var base = this.dataStart; + var element = load(base); var lastIndex = length - 1; memory.copy( - changetype(buffer) + HEADER_SIZE, - changetype(buffer) + HEADER_SIZE + sizeof(), + base, + base + sizeof(), lastIndex << alignof() ); - STORE(buffer, lastIndex, null); + store(base + (lastIndex << alignof()), null); this.length_ = lastIndex; return element; } some(callbackfn: (element: T, index: i32, array: Array) => bool): bool { for (let index = 0, length = this.length_; index < min(length, this.length_); ++index) { - if (callbackfn(LOAD(this.buffer_, index), index, this)) return true; + if (callbackfn(load(this.dataStart + (index << alignof())), index, this)) return true; } return false; } unshift(element: T): i32 { - var buffer = this.buffer_; - var capacity = buffer.byteLength >>> alignof(); - var length = this.length_; - var newLength = length + 1; // safe only if length is checked - if (length >= capacity) { - const MAX_LENGTH = MAX_BLENGTH >>> alignof(); - if (length >= MAX_LENGTH) throw new Error("Invalid array length"); - buffer = reallocateUnsafe(buffer, newLength << alignof()); - capacity = buffer.byteLength >>> alignof(); - this.buffer_ = buffer; - } + var newLength = this.length_; + this.resize(newLength); + var base = this.dataStart; memory.copy( - changetype(buffer) + HEADER_SIZE + sizeof(), - changetype(buffer) + HEADER_SIZE, - (capacity - 1) << alignof() + base + sizeof(), + base, + (newLength - 1) << alignof() ); - STORE(buffer, 0, element); + store(base, element); + if (isManaged()) LINK(changetype(element), changetype(this)); this.length_ = newLength; - if (isManaged()) __gc_link(changetype(this), changetype(element)); // tslint:disable-line return newLength; } slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Array { - var len = this.length_; - begin = begin < 0 ? max(begin + len, 0) : min(begin, len); - end = end < 0 ? max(end + len, 0) : min(end, len); - len = max(end - begin, 0); - var sliced = new Array(len); - if (len) { - memory.copy( - changetype(sliced.buffer_) + HEADER_SIZE, - changetype(this.buffer_) + HEADER_SIZE + (begin << alignof()), - len << alignof() - ); + var length = this.length_; + begin = begin < 0 ? max(begin + length, 0) : min(begin, length); + end = end < 0 ? max(end + length, 0) : min(end , length); + length = max(end - begin, 0); + var slice = new Array(length); + var sliceBase = slice.dataStart; + var thisBase = this.dataStart + (begin << alignof()); + for (let i = 0; i < length; ++i) { + let offset = i << alignof(); + let element = load(thisBase + offset); + store(sliceBase + offset, element); + if (isManaged()) LINK(changetype(element), changetype(slice)); } - return sliced; + return slice; } splice(start: i32, deleteCount: i32 = i32.MAX_VALUE): Array { var length = this.length_; start = start < 0 ? max(length + start, 0) : min(start, length); deleteCount = max(min(deleteCount, length - start), 0); - var buffer = this.buffer_; - var spliced = new Array(deleteCount); - var source = changetype(buffer) + HEADER_SIZE + (start << alignof()); + var splice = new Array(deleteCount); + var spliceStart = splice.dataStart; + var thisStart = this.dataStart; + var thisBase = thisStart + (start << alignof()); + for (let i = 0; i < deleteCount; ++i) { + let element = load(thisBase + (i << alignof())); + store(spliceStart + (i << alignof()), element); + if (isManaged()) LINK(changetype(element), changetype(splice)); + } memory.copy( - changetype(spliced.buffer_) + HEADER_SIZE, - source, + splice.dataStart, + thisBase, deleteCount << alignof() ); var offset = start + deleteCount; if (length != offset) { memory.copy( - source, - changetype(buffer) + HEADER_SIZE + (offset << alignof()), + thisBase, + thisStart + (offset << alignof()), (length - offset) << alignof() ); } this.length_ = length - deleteCount; - return spliced; + return splice; } reverse(): Array { diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index cdcb2b57a0..27d983fe99 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -1020,8 +1020,6 @@ declare namespace table { declare class ArrayBuffer { /** The size, in bytes, of the array. */ readonly byteLength: i32; - /** Unsafe pointer to the start of the data in memory. */ - readonly data: usize; /** Returns true if value is one of the ArrayBuffer views, such as typed array or a DataView **/ static isView(value: T): bool; /** Constructs a new array buffer of the given length in bytes. */ diff --git a/std/assembly/internal/sort.ts b/std/assembly/internal/sort.ts index 8d50efb115..587de405c6 100644 --- a/std/assembly/internal/sort.ts +++ b/std/assembly/internal/sort.ts @@ -1,12 +1,3 @@ -import { - LOAD, - STORE -} from "./arraybuffer"; - -import { - compareUnsafe -} from "./string"; - /** Obtains the default comparator for the specified value type. */ @inline export function COMPARATOR(): (a: T, b: T) => i32 { @@ -42,7 +33,7 @@ export function COMPARATOR(): (a: T, b: T) => i32 { if (!alen && !blen) return 0; if (!alen) return -1; if (!blen) return 1; - return compareUnsafe(a, 0, b, 0, min(alen, blen)); + return String.cmp(a, 0, b, 0, min(alen, blen)); }; } else { return (a: T, b: T): i32 => ((a > b) - (a < b)); @@ -51,47 +42,44 @@ export function COMPARATOR(): (a: T, b: T) => i32 { @inline export function SORT( - buffer: ArrayBuffer, - byteOffset: i32, + dataStart: usize, length: i32, comparator: (a: T, b: T) => i32 ): void { if (isReference()) { // TODO replace this to faster stable sort (TimSort) when it implemented - insertionSort(buffer, byteOffset, length, comparator); + insertionSort(dataStart, length, comparator); } else { if (length < 256) { - insertionSort(buffer, byteOffset, length, comparator); + insertionSort(dataStart, length, comparator); } else { - weakHeapSort(buffer, byteOffset, length, comparator); + weakHeapSort(dataStart, length, comparator); } } } /** Sorts an Array with the 'Insertion Sort' algorithm. */ function insertionSort( - buffer: ArrayBuffer, - byteOffset: i32, + dataStart: usize, length: i32, comparator: (a: T, b: T) => i32 ): void { for (let i = 0; i < length; i++) { - let a = LOAD(buffer, i, byteOffset); // a = arr[i] + let a: T = load(dataStart + (i << alignof())); // a = arr[i] let j = i - 1; while (j >= 0) { - let b = LOAD(buffer, j, byteOffset); // b = arr[j] + let b: T = load(dataStart + (j << alignof())); // b = arr[j] if (comparator(a, b) < 0) { - STORE(buffer, j-- + 1, b, byteOffset); // arr[j + 1] = b + store(dataStart + ((j-- + 1) << alignof()), b); // arr[j + 1] = b } else break; } - STORE(buffer, j + 1, a, byteOffset); // arr[j + 1] = a + store(dataStart + ((j + 1) << alignof()), a); // arr[j + 1] = a } } /** Sorts an Array with the 'Weak Heap Sort' algorithm. */ function weakHeapSort( - buffer: ArrayBuffer, - byteOffset: i32, + dataStart: usize, length: i32, comparator: (a: T, b: T) => i32 ): void { @@ -108,37 +96,37 @@ function weakHeapSort( while ((j & 1) == (load(bitset + (j >> 6 << shift32)) >> (j >> 1 & 31) & 1)) j >>= 1; let p = j >> 1; - let a = LOAD(buffer, p, byteOffset); // a = arr[p] - let b = LOAD(buffer, i, byteOffset); // b = arr[i] + let a: T = load(dataStart + (p << alignof())); // a = arr[p] + let b: T = load(dataStart + (i << alignof())); // b = arr[i] if (comparator(a, b) < 0) { store( bitset + (i >> 5 << shift32), load(bitset + (i >> 5 << shift32)) ^ (1 << (i & 31)) ); - STORE(buffer, i, a, byteOffset); // arr[i] = a - STORE(buffer, p, b, byteOffset); // arr[p] = b + store(dataStart + (i << alignof()), a); // arr[i] = a + store(dataStart + (p << alignof()), b); // arr[p] = b } } for (let i = length - 1; i >= 2; i--) { - let a = LOAD(buffer, 0, byteOffset); - STORE(buffer, 0, LOAD(buffer, i, byteOffset), byteOffset); - STORE(buffer, i, a, byteOffset); + let a: T = load(dataStart); // a = arr[0] + store(dataStart, load(dataStart + (i << alignof()))); // arr[0] = arr[i] + store(dataStart + (i << alignof()), a); // arr[i] = a let x = 1, y: i32; while ((y = (x << 1) + ((load(bitset + (x >> 5 << shift32)) >> (x & 31)) & 1)) < i) x = y; while (x > 0) { - a = LOAD(buffer, 0, byteOffset); // a = arr[0] - let b = LOAD(buffer, x, byteOffset); // b = arr[x] + a = load(dataStart); // a = arr[0] + let b: T = load(dataStart + (x << alignof())); // b = arr[x] if (comparator(a, b) < 0) { store( bitset + (x >> 5 << shift32), load(bitset + (x >> 5 << shift32)) ^ (1 << (x & 31)) ); - STORE(buffer, x, a, byteOffset); // arr[x] = a - STORE(buffer, 0, b, byteOffset); // arr[0] = b + store(dataStart + (x << alignof()), a); // arr[x] = a + store(dataStart, b); // arr[0] = b } x >>= 1; } @@ -146,7 +134,7 @@ function weakHeapSort( memory.free(bitset); - var t = LOAD(buffer, 1, byteOffset); // t = arr[1] - STORE(buffer, 1, LOAD(buffer, 0, byteOffset), byteOffset); - STORE(buffer, 0, t, byteOffset); // arr[0] = t + var t: T = load(dataStart, sizeof()); // t = arr[1] + store(dataStart, load(dataStart), sizeof()); // arr[1] = arr[0] + store(dataStart, t); // arr[0] = t } diff --git a/std/assembly/internal/string.ts b/std/assembly/internal/string.ts index 7d903c498b..2e4fd81f01 100644 --- a/std/assembly/internal/string.ts +++ b/std/assembly/internal/string.ts @@ -1,3 +1,13 @@ +export function compareImpl(str1: String, index1: usize, str2: String, index2: usize, len: usize): i32 { + var result: i32 = 0; + var ptr1 = changetype(str1) + (index1 << 1); + var ptr2 = changetype(str2) + (index2 << 1); + while (len && !(result = load(ptr1) - load(ptr2))) { + --len, ptr1 += 2, ptr2 += 2; + } + return result; +} + import { MAX_SIZE_32 } from "./allocator"; import { String } from "../string"; @@ -38,16 +48,6 @@ export function copyUnsafe(dest: String, destOffset: usize, src: String, srcOffs ); } -export function compareUnsafe(str1: String, offset1: usize, str2: String, offset2: usize, len: usize): i32 { - var cmp: i32 = 0; - var ptr1 = changetype(str1) + (offset1 << 1); - var ptr2 = changetype(str2) + (offset2 << 1); - while (len && !(cmp = load(ptr1, HEADER_SIZE) - load(ptr2, HEADER_SIZE))) { - --len, ptr1 += 2, ptr2 += 2; - } - return cmp; -} - export function repeatUnsafe(dest: String, destOffset: usize, src: String, count: i32): void { var length = src.length; if (ASC_SHRINK_LEVEL > 1) { diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index d830bf590b..746d7bc416 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -87,6 +87,9 @@ export function ADJUST(payloadSize: usize): usize { // free right away if not registered yet assert(ref > HEAP_BASE); // static objects aren't scratch objects memory.free(changetype(header)); + } else if (GC) { + // if previously registered, register again + gc.register(ref); } header = newHeader; ref = newRef; @@ -124,11 +127,11 @@ function unref(ref: usize): HEADER { } /** Links a managed object with its managed parent. */ -@unsafe export function LINK(ref: usize, parentRef: usize): void { - assert(ref >= HEAP_BASE + HEADER_SIZE); // must be a heap object - var header = changetype
(ref - HEADER_SIZE); +@unsafe @inline export function LINK(ref: T, parentRef: TParent): void { + assert(changetype(ref) >= HEAP_BASE + HEADER_SIZE); // must be a heap object + var header = changetype
(changetype(ref) - HEADER_SIZE); assert(header.classId != HEADER_MAGIC && header.gc1 != 0 && header.gc2 != 0); // must be registered - if (GC) gc.link(ref, parentRef); // tslint:disable-line + if (GC) gc.link(changetype(ref), changetype(parentRef)); // tslint:disable-line } /** ArrayBuffer base class. */ @@ -146,14 +149,13 @@ export abstract class ArrayBufferBase { /** Typed array base class. */ export abstract class ArrayBufferView { [key: number]: number; - readonly buffer: ArrayBuffer; + + @unsafe buffer: ArrayBuffer; @unsafe dataStart: usize; @unsafe dataEnd: usize; constructor(length: i32, alignLog2: i32) { - if (length > ArrayBufferBase.MAX_BYTELENGTH >> alignLog2) { - throw new RangeError("Invalid typed array length"); - } + if (length > ArrayBufferBase.MAX_BYTELENGTH >>> alignLog2) throw new RangeError("Invalid length"); var byteLength = length << alignLog2; var buffer = new ArrayBuffer(byteLength); this.buffer = buffer; diff --git a/std/assembly/string.ts b/std/assembly/string.ts index adb77e95a5..26c8368ed2 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -5,42 +5,13 @@ import { } from "./runtime"; import { + compareImpl, + parse, CharCode, - parse + isWhiteSpaceOrLineTerminator } from "./internal/string"; -import { - STORE -} from "./internal/arraybuffer"; - -function compareImpl(str1: String, index1: usize, str2: String, index2: usize, len: usize): i32 { - var result: i32 = 0; - var ptr1 = changetype(str1) + (index1 << 1); - var ptr2 = changetype(str2) + (index2 << 1); - while (len && !(result = load(ptr1) - load(ptr2))) { - --len, ptr1 += 2, ptr2 += 2; - } - return result; -} - -function isWhiteSpaceOrLineTerminator(c: u16): bool { - switch (c) { - case 9: // - case 10: // - case 13: // - case 11: // - case 12: // - case 32: // - case 160: // - case 8232: // - case 8233: // - case 65279: return true; // - default: return false; - } -} - -@sealed -export class String extends StringBase { +@sealed export class String extends StringBase { // TODO Add and handle second argument static fromCharCode(code: i32): String { @@ -393,7 +364,7 @@ export class String extends StringBase { changetype(this) + (i << 1) ) ); - STORE(buffer, i, char); // FIXME: use store once AB is done as well + store(changetype(buffer) + (i << 1), char); } return result; } else if (!length) { diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index bc3e0c2339..0bacb1c739 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -6,7 +6,8 @@ import { } from "./runtime"; import { - COMPARATOR + COMPARATOR, + SORT as SORT_IMPL } from "./internal/sort"; function clampToByte(value: i32): i32 { @@ -651,16 +652,15 @@ export class Float64Array extends ArrayBufferView { if (length <= 1) return array; var base = array.dataStart; if (length == 2) { - let a = load(base, sizeof()); - let b = load(base); + let a: T = load(base, sizeof()); // a = arr[1] + let b: T = load(base); // b = arr[0] if (comparator(a, b) < 0) { - store(base, b, sizeof()); - store(base, a); + store(base, b, sizeof()); // arr[1] = b + store(base, a); // arr[0] = a } return array; } - // TODO - // SORT_IMPL(buffer, byteOffset, length, comparator); + SORT_IMPL(base, length, comparator); return array; } diff --git a/tests/compiler/empty.ts b/tests/compiler/empty.ts index e69de29bb2..25da6068b4 100644 --- a/tests/compiler/empty.ts +++ b/tests/compiler/empty.ts @@ -0,0 +1,9 @@ +import "allocator/arena"; + +var arr = new Uint8Array(8); +arr[0] = 10; +arr[4] = 5; +var arr2 = arr.sort(); +arr2.forEach(x => { + trace("", 1, x); +}); From 8e9586783fe7aca0b3fef680e06bd11655f41256 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 12 Mar 2019 02:14:30 +0100 Subject: [PATCH 020/119] I'm lost --- std/assembly/arraybuffer.ts | 49 ++++++++++++----------- std/assembly/internal/typedarray.ts | 8 ++-- std/assembly/runtime.ts | 61 ++++++++++++++++++----------- 3 files changed, 69 insertions(+), 49 deletions(-) diff --git a/std/assembly/arraybuffer.ts b/std/assembly/arraybuffer.ts index d1cef3e176..1d274aa964 100644 --- a/std/assembly/arraybuffer.ts +++ b/std/assembly/arraybuffer.ts @@ -5,45 +5,48 @@ import { } from "./runtime"; import { - Uint8ClampedArray, - Uint8Array, Int8Array, - Uint16Array, + Uint8Array, + Uint8ClampedArray, Int16Array, - Uint32Array, + Uint16Array, Int32Array, + Uint32Array, + Int64Array, Uint64Array, - Int64Array + Float32Array, + Float64Array } from "./typedarray"; import { DataView } from "./dataview"; -@sealed -export class ArrayBuffer extends ArrayBufferBase { +@sealed export class ArrayBuffer extends ArrayBufferBase { @inline static isView(value: T): bool { - if (value === null) return false; - if (value instanceof Uint8ClampedArray) return true; - if (value instanceof Uint8Array) return true; - if (value instanceof Int8Array) return true; - if (value instanceof Uint16Array) return true; - if (value instanceof Int16Array) return true; - if (value instanceof Uint32Array) return true; - if (value instanceof Int32Array) return true; - if (value instanceof Uint64Array) return true; - if (value instanceof Int64Array) return true; - if (value instanceof DataView) return true; + if (value) { + if (value instanceof Int8Array) return true; + if (value instanceof Uint8Array) return true; + if (value instanceof Uint8ClampedArray) return true; + if (value instanceof Int16Array) return true; + if (value instanceof Uint16Array) return true; + if (value instanceof Int32Array) return true; + if (value instanceof Uint32Array) return true; + if (value instanceof Int64Array) return true; + if (value instanceof Uint64Array) return true; + if (value instanceof Float32Array) return true; + if (value instanceof Float64Array) return true; + if (value instanceof DataView) return true; + } return false; } slice(begin: i32 = 0, end: i32 = ArrayBuffer.MAX_BYTELENGTH): ArrayBuffer { - var len = this.byteLength; - begin = begin < 0 ? max(len + begin, 0) : min(begin, len); - end = end < 0 ? max(len + end, 0) : min(end, len); - len = max(end - begin, 0); - var outSize = len; + var length = this.byteLength; + begin = begin < 0 ? max(length + begin, 0) : min(begin, length); + end = end < 0 ? max(length + end , 0) : min(end , length); + var outSize = max(end - begin, 0); var out = ALLOC_RAW(outSize); memory.copy(out, changetype(this) + begin, outSize); return REGISTER(out); diff --git a/std/assembly/internal/typedarray.ts b/std/assembly/internal/typedarray.ts index db9f7d3fc7..2364f325cd 100644 --- a/std/assembly/internal/typedarray.ts +++ b/std/assembly/internal/typedarray.ts @@ -1,5 +1,5 @@ import { - ALLOC, + ALLOC_RAW, REGISTER, LINK } from "../runtime"; @@ -109,11 +109,13 @@ export abstract class TypedArray { else begin = min(begin, length); if (end < 0) end = max(length + end, begin); else end = max(min(end, length), begin); - var out = ALLOC(offsetof()); + var out = ALLOC_RAW(offsetof()); store(out, buffer, offsetof("buffer")); + store(out, buffer + (begin << alignof()), offsetof("dataStart")); + store(out, buffer + (end << alignof()), offsetof("dataStart")); store(out, array.byteOffset + (begin << alignof()), offsetof("byteOffset")); store(out, (end - begin) << alignof(), offsetof("byteLength")); - LINK(buffer, REGISTER(out)); // register first, then link + LINK(buffer, REGISTER(out)); // register first, then link return changetype(out); } diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 746d7bc416..085851e2ca 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -113,17 +113,18 @@ function unref(ref: usize): HEADER { } /** Frees an object. Must not have been registered with GC yet. */ -@unsafe export function FREE(ref: usize): void { - memory.free(changetype(unref(ref))); +@unsafe @inline export function FREE(ref: T): void { + memory.free(changetype(unref(changetype(ref)))); } /** Registers a managed object. Cannot be free'd anymore afterwards. */ -@unsafe @inline export function REGISTER(ref: usize): TRet { +@unsafe @inline export function REGISTER(ref: usize): T { + if (!isReference()) ERROR("reference expected"); // see comment in REALLOC why this is useful. also inline this because // it's generic so we don't get a bunch of functions. unref(ref).classId = gc.classId(); if (GC) gc.register(ref); - return changetype(ref); + return changetype(ref); } /** Links a managed object with its managed parent. */ @@ -134,51 +135,51 @@ function unref(ref: usize): HEADER { if (GC) gc.link(changetype(ref), changetype(parentRef)); // tslint:disable-line } -/** ArrayBuffer base class. */ export abstract class ArrayBufferBase { @lazy static readonly MAX_BYTELENGTH: i32 = MAX_SIZE_32 - HEADER_SIZE; - get byteLength(): i32 { - return changetype
(changetype(this) - HEADER_SIZE).payloadSize; - } + constructor(length: i32) { if (length > ArrayBufferBase.MAX_BYTELENGTH) throw new RangeError("Invalid array buffer length"); return REGISTER(ALLOC(length)); } + + get byteLength(): i32 { + return changetype
(changetype(this) - HEADER_SIZE).payloadSize; + } } -/** Typed array base class. */ export abstract class ArrayBufferView { [key: number]: number; - @unsafe buffer: ArrayBuffer; - @unsafe dataStart: usize; - @unsafe dataEnd: usize; + protected data: ArrayBuffer; + protected dataStart: usize; + protected dataEnd: usize; constructor(length: i32, alignLog2: i32) { if (length > ArrayBufferBase.MAX_BYTELENGTH >>> alignLog2) throw new RangeError("Invalid length"); var byteLength = length << alignLog2; var buffer = new ArrayBuffer(byteLength); - this.buffer = buffer; + this.data = buffer; this.dataStart = changetype(buffer); this.dataEnd = changetype(buffer) + length; } - get byteOffset(): i32 { - return this.dataStart - changetype(this.buffer); + get buffer(): ArrayBuffer { + return this.data; } - get byteLength(): i32 { - return this.dataEnd - this.dataStart; + get byteOffset(): i32 { + return (this.dataStart - changetype(this.data)); } - get length(): i32 { - return unreachable(); + get byteLength(): i32 { + return (this.dataEnd - this.dataStart); } } -/** String base class. */ export abstract class StringBase { @lazy static readonly MAX_LENGTH: i32 = (MAX_SIZE_32 - HEADER_SIZE) >> 1; + get length(): i32 { return changetype
(changetype(this) - HEADER_SIZE).payloadSize >> 1; } @@ -186,35 +187,44 @@ export abstract class StringBase { import { memcmp, memmove, memset } from "./internal/memory"; -/** Memory manager interface. */ export namespace memory { @builtin export declare function size(): i32; + @builtin @unsafe export declare function grow(pages: i32): i32; + @builtin @unsafe @inline export function fill(dst: usize, c: u8, n: usize): void { memset(dst, c, n); // fallback if "bulk-memory" isn't enabled } + @builtin @unsafe @inline export function copy(dst: usize, src: usize, n: usize): void { memmove(dst, src, n); // fallback if "bulk-memory" isn't enabled } + @unsafe export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void { ERROR("not implemented"); } + @unsafe export function drop(segmentIndex: u32): void { ERROR("not implemented"); } + @stub @inline export function allocate(size: usize): usize { ERROR("stub: missing memory manager"); return unreachable(); } + @stub @unsafe @inline export function free(ptr: usize): void { ERROR("stub: missing memory manager"); } + @stub @unsafe @inline export function reset(): void { ERROR("stub: not supported by memory manager"); } + @inline export function compare(vl: usize, vr: usize, n: usize): i32 { return memcmp(vl, vr, n); } + @unsafe export function repeat(dst: usize, src: usize, srcLength: usize, count: usize): void { var index: usize = 0; var total = srcLength * count; @@ -225,15 +235,20 @@ export namespace memory { } } -/** Garbage collector interface. */ export namespace gc { @builtin @unsafe export declare function classId(): u32; + @builtin @unsafe export declare function iterateRoots(fn: (ref: usize) => void): void; + @stub @unsafe export function register(ref: usize): void { ERROR("stub: missing garbage collector"); } + @stub @unsafe export function link(ref: usize, parentRef: usize): void { ERROR("stub: missing garbage collector"); } - @stub export function collect(): void {} + + @stub export function collect(): void { + WARNING("stub: missing garbage collector"); + } } From 36d54d63d52afb47d37151412ab52ceb3eacbddb Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 12 Mar 2019 04:35:01 +0100 Subject: [PATCH 021/119] slowly but steadily --- std/assembly/array.ts | 243 +++++++++++-------- std/assembly/internal/arraybuffer.ts | 84 ------- std/assembly/internal/string.ts | 225 ----------------- std/assembly/internal/typedarray.ts | 206 ---------------- std/assembly/string.ts | 3 +- std/assembly/{internal => util}/allocator.ts | 0 std/assembly/{internal => util}/hash.ts | 11 +- std/assembly/{internal => util}/memory.ts | 0 std/assembly/{internal => util}/number.ts | 4 - std/assembly/{internal => util}/sort.ts | 9 +- std/assembly/util/string.ts | 124 ++++++++++ 11 files changed, 268 insertions(+), 641 deletions(-) delete mode 100644 std/assembly/internal/arraybuffer.ts delete mode 100644 std/assembly/internal/string.ts delete mode 100644 std/assembly/internal/typedarray.ts rename std/assembly/{internal => util}/allocator.ts (100%) rename std/assembly/{internal => util}/hash.ts (86%) rename std/assembly/{internal => util}/memory.ts (100%) rename std/assembly/{internal => util}/number.ts (99%) rename std/assembly/{internal => util}/sort.ts (93%) create mode 100644 std/assembly/util/string.ts diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 5e453f05b7..3811d5a61f 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -1,34 +1,20 @@ -// import { -// MAX_BLENGTH, -// HEADER_SIZE, -// allocateUnsafe, -// reallocateUnsafe, -// LOAD, -// STORE -// } from "./internal/arraybuffer"; - import { ALLOC, REALLOC, REGISTER, LINK, - ArrayBufferView + ArrayBufferView, + FREE } from "./runtime"; import { ArrayBuffer } from "./arraybuffer"; -// import { -// allocateUnsafe as allocateUnsafeString, -// freeUnsafe as freeUnsafeString, -// copyUnsafe as copyUnsafeString -// } from "./internal/string"; - import { COMPARATOR, SORT -} from "./internal/sort"; +} from "./util/sort"; import { itoa, @@ -36,7 +22,7 @@ import { itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH -} from "./internal/number"; +} from "./util/number"; import { isArray as builtin_isArray @@ -372,186 +358,233 @@ export class Array extends ArrayBufferView { } reverse(): Array { - var buffer = this.buffer_; + var base = this.dataStart; for (let front = 0, back = this.length_ - 1; front < back; ++front, --back) { - let temp = LOAD(buffer, front); - STORE(buffer, front, LOAD(buffer, back)); - STORE(buffer, back, temp); + let temp: T = load(base, front); + store(base + (front << alignof()), load(base + (back << alignof()))); + store(base + (back << alignof()), temp); } return this; } sort(comparator: (a: T, b: T) => i32 = COMPARATOR()): this { - // TODO remove this when flow will allow trackcing null + // TODO remove this when flow will allow tracking null assert(comparator); // The comparison function must be a function var length = this.length_; if (length <= 1) return this; - var buffer = this.buffer_; + var base = this.dataStart; if (length == 2) { - let a = LOAD(buffer, 1); // a = arr[1] - let b = LOAD(buffer, 0); // b = arr[0] + let a: T = load(base, sizeof()); // a = arr[1] + let b: T = load(base); // b = arr[0] if (comparator(a, b) < 0) { - STORE(buffer, 1, b); // arr[1] = b; - STORE(buffer, 0, a); // arr[0] = a; + store(base, b, sizeof()); // arr[1] = b; + store(base, a); // arr[0] = a; } return this; } - SORT(buffer, 0, length, comparator); + SORT(base, length, comparator); return this; } + // FIXME: refactor into multiple functions? join(separator: string = ","): string { var lastIndex = this.length_ - 1; if (lastIndex < 0) return ""; var result = ""; var value: T; - var buffer = this.buffer_; + var base = this.dataStart; + // var buffer = this.buffer_; var sepLen = separator.length; var hasSeparator = sepLen != 0; if (value instanceof bool) { - if (!lastIndex) return select("true", "false", LOAD(buffer, 0)); + if (!lastIndex) return select("true", "false", load(base)); let valueLen = 5; // max possible length of element len("false") let estLen = (valueLen + sepLen) * lastIndex + valueLen; - let result = allocateUnsafeString(estLen); + let result = ALLOC(estLen << 1); let offset = 0; for (let i = 0; i < lastIndex; ++i) { - value = LOAD(buffer, i); + value = load(base + i); valueLen = 4 + (!value); - copyUnsafeString(result, offset, select("true", "false", value), 0, valueLen); + memory.copy( + result + (offset << 1), + changetype(select("true", "false", value)), + valueLen << 1 + ); offset += valueLen; if (hasSeparator) { - copyUnsafeString(result, offset, changetype(separator), 0, sepLen); + memory.copy( + result + (offset << 1), + changetype(separator), + sepLen << 1 + ); offset += sepLen; } } - value = LOAD(buffer, lastIndex); + value = load(base + lastIndex); valueLen = 4 + (!value); - copyUnsafeString(result, offset, select("true", "false", value), 0, valueLen); + memory.copy( + result + (offset << 1), + changetype(select("true", "false", value)), + valueLen << 1 + ); offset += valueLen; - let out = result; if (estLen > offset) { - out = result.substring(0, offset); - freeUnsafeString(result); + let trimmed = changetype(result).substring(0, offset); + FREE(result); + return trimmed; // registered in .substring } - return out; + return REGISTER(result); } else if (isInteger()) { - if (!lastIndex) return changetype(itoa(LOAD(buffer, 0))); + if (!lastIndex) return changetype(itoa(load(base))); const valueLen = (sizeof() <= 4 ? 10 : 20) + isSigned(); let estLen = (valueLen + sepLen) * lastIndex + valueLen; - let result = allocateUnsafeString(estLen); + let result = ALLOC(estLen << 1); let offset = 0; for (let i = 0; i < lastIndex; ++i) { - value = LOAD(buffer, i); - offset += itoa_stream(changetype(result), offset, value); + value = load(base + (i << alignof())); + offset += itoa_stream(result, offset, value); if (hasSeparator) { - copyUnsafeString(result, offset, separator, 0, sepLen); + memory.copy( + result + (offset << 1), + changetype(separator), + sepLen << 1 + ); offset += sepLen; } } - value = LOAD(buffer, lastIndex); - offset += itoa_stream(changetype(result), offset, value); - let out = result; + value = load(base + (lastIndex << alignof())); + offset += itoa_stream(result, offset, value); if (estLen > offset) { - out = result.substring(0, offset); - freeUnsafeString(result); + let trimmed = changetype(result).substring(0, offset); + FREE(result); + return trimmed; // registered in .substring } - return out; + return REGISTER(result); } else if (isFloat()) { - if (!lastIndex) return changetype(dtoa(LOAD(buffer, 0))); + if (!lastIndex) return changetype(dtoa(load(base))); const valueLen = MAX_DOUBLE_LENGTH; let estLen = (valueLen + sepLen) * lastIndex + valueLen; - let result = allocateUnsafeString(estLen); + let result = ALLOC(estLen << 1); let offset = 0; for (let i = 0; i < lastIndex; ++i) { - value = LOAD(buffer, i); - offset += dtoa_stream(changetype(result), offset, value); + value = load(base + (i << alignof())); + offset += dtoa_stream(result, offset, value); if (hasSeparator) { - copyUnsafeString(result, offset, separator, 0, sepLen); + memory.copy( + result + (offset << 1), + changetype(separator), + sepLen << 1 + ); offset += sepLen; } } - value = LOAD(buffer, lastIndex); - offset += dtoa_stream(changetype(result), offset, value); - let out = result; + value = load(base + (lastIndex << alignof())); + offset += dtoa_stream(result, offset, value); if (estLen > offset) { - out = result.substring(0, offset); - freeUnsafeString(result); + let trimmed = changetype(result).substring(0, offset); + FREE(result); + return trimmed; // registered in .substring } - return out; + return REGISTER(result); } else if (isString()) { - if (!lastIndex) return LOAD(buffer, 0); + if (!lastIndex) return load(base); let estLen = 0; for (let i = 0, len = lastIndex + 1; i < len; ++i) { - estLen += LOAD(buffer, i).length; + estLen += load(base + (i << alignof())).length; } let offset = 0; - let result = allocateUnsafeString(estLen + sepLen * lastIndex); + let result = ALLOC((estLen + sepLen * lastIndex) << 1); for (let i = 0; i < lastIndex; ++i) { - value = LOAD(buffer, i); + value = load(base + (i << alignof())); if (value) { - let valueLen = value.length; // tslint:disable-line:no-unsafe-any - copyUnsafeString(result, offset, value, 0, valueLen); // tslint:disable-line:no-unsafe-any - offset += valueLen; // tslint:disable-line:no-unsafe-any + let valueLen = changetype(value).length; + memory.copy( + result + (offset << 1), + changetype(value), + valueLen << 1 + ); + offset += valueLen; } if (hasSeparator) { - copyUnsafeString(result, offset, separator, 0, sepLen); + memory.copy( + result + (offset << 1), + changetype(separator), + sepLen << 1 + ); offset += sepLen; } } - value = LOAD(buffer, lastIndex); + value = load(base + (lastIndex << alignof())); if (value) { - let valueLen = value.length; // tslint:disable-line:no-unsafe-any - copyUnsafeString(result, offset, value, 0, valueLen); // tslint:disable-line:no-unsafe-any + let valueLen = changetype(value).length; + memory.copy( + result + (offset << 1), + changetype(value), + valueLen << 1 + ); } - return result; + return REGISTER(result); } else if (isArray()) { if (!lastIndex) { - value = LOAD(buffer, 0); - return value ? value.join(separator) : ""; // tslint:disable-line:no-unsafe-any + value = load(base); + return value ? value.join(separator) : ""; } for (let i = 0; i < lastIndex; ++i) { - value = LOAD(buffer, i); - if (value) result += value.join(separator); // tslint:disable-line:no-unsafe-any + value = load(base + (i << alignof())); + if (value) result += value.join(separator); if (hasSeparator) result += separator; } - value = LOAD(buffer, lastIndex); - if (value) result += value.join(separator); // tslint:disable-line:no-unsafe-any - return result; + value = load(base + (lastIndex << alignof())); + if (value) result += value.join(separator); + return result; // registered by concatenation (FIXME: lots of garbage) } else if (isReference()) { // References if (!lastIndex) return "[object Object]"; const valueLen = 15; // max possible length of element len("[object Object]") let estLen = (valueLen + sepLen) * lastIndex + valueLen; - let result = allocateUnsafeString(estLen); + let result = ALLOC(estLen << 1); let offset = 0; for (let i = 0; i < lastIndex; ++i) { - value = LOAD(buffer, i); + value = load(base + (i << alignof())); if (value) { - copyUnsafeString(result, offset, changetype("[object Object]"), 0, valueLen); + memory.copy( + result + (offset << 1), + changetype("[object Object]"), + valueLen << 1 + ); offset += valueLen; } if (hasSeparator) { - copyUnsafeString(result, offset, changetype(separator), 0, sepLen); + memory.copy( + result + (offset << 1), + changetype(separator), + sepLen << 1 + ); offset += sepLen; } } - if (LOAD(buffer, lastIndex)) { - copyUnsafeString(result, offset, changetype("[object Object]"), 0, valueLen); + if (load(base + (lastIndex << alignof()))) { + memory.copy( + result + (offset << 1), + changetype("[object Object]"), + valueLen << 1 + ); offset += valueLen; } - let out = result; if (estLen > offset) { - out = result.substring(0, offset); - freeUnsafeString(result); + let out = changetype(result).substring(0, offset); + FREE(result); + return out; // registered in .substring } - return out; + return REGISTER(result); } else { - assert(false); // Unsupported generic typename + ERROR("unspported type"); + assert(false); } } @@ -560,16 +593,16 @@ export class Array extends ArrayBufferView { return this.join(); } - private __gc(): void { - var buffer = this.buffer_; - __gc_mark(changetype(buffer)); // tslint:disable-line - if (isManaged()) { - let offset: usize = 0; - let end = this.length_ << alignof(); - while (offset < end) { - __gc_mark(load(changetype(buffer) + offset, HEADER_SIZE)); // tslint:disable-line - offset += sizeof(); - } - } - } + // private __gc(): void { + // var buffer = this.buffer_; + // __gc_mark(changetype(buffer)); // tslint:disable-line + // if (isManaged()) { + // let offset: usize = 0; + // let end = this.length_ << alignof(); + // while (offset < end) { + // __gc_mark(load(changetype(buffer) + offset, HEADER_SIZE)); // tslint:disable-line + // offset += sizeof(); + // } + // } + // } } diff --git a/std/assembly/internal/arraybuffer.ts b/std/assembly/internal/arraybuffer.ts deleted file mode 100644 index 4545d8e0d3..0000000000 --- a/std/assembly/internal/arraybuffer.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { - AL_MASK, - MAX_SIZE_32 - } from "./allocator"; - -/** Size of an ArrayBuffer header. */ -@inline export const HEADER_SIZE: usize = (offsetof() + AL_MASK) & ~AL_MASK; -/** Maximum byte length of an ArrayBuffer. */ -@inline export const MAX_BLENGTH: i32 = MAX_SIZE_32 - HEADER_SIZE; - -function computeSize(byteLength: i32): usize { - // round up to power of 2, with HEADER_SIZE=8: - // 0 -> 2^3 = 8 - // 1..8 -> 2^4 = 16 - // 9..24 -> 2^5 = 32 - // ... - // MAX_LENGTH -> 2^30 = 0x40000000 (MAX_SIZE_32) - return 1 << (32 - clz(byteLength + HEADER_SIZE - 1)); -} - -// Low-level utility - -function __gc(ref: usize): void {} - -export function allocateUnsafe(byteLength: i32): ArrayBuffer { - assert(byteLength <= MAX_BLENGTH); - var buffer: usize; - if (isManaged()) { - buffer = __gc_allocate(computeSize(byteLength), __gc); // tslint:disable-line - } else { - buffer = memory.allocate(computeSize(byteLength)); - } - store(buffer, byteLength, offsetof("byteLength")); - return changetype(buffer); -} - -export function reallocateUnsafe(buffer: ArrayBuffer, newByteLength: i32): ArrayBuffer { - var oldByteLength = buffer.byteLength; - if (newByteLength > oldByteLength) { - assert(newByteLength <= MAX_BLENGTH); - if (newByteLength <= (computeSize(oldByteLength) - HEADER_SIZE)) { // fast path: zero out additional space - store(changetype(buffer), newByteLength, offsetof("byteLength")); - } else { // slow path: copy to new buffer - let newBuffer = allocateUnsafe(newByteLength); - memory.copy( - changetype(newBuffer) + HEADER_SIZE, - changetype(buffer) + HEADER_SIZE, - oldByteLength - ); - if (!isManaged()) { - memory.free(changetype(buffer)); - } - buffer = newBuffer; - } - memory.fill( - changetype(buffer) + HEADER_SIZE + oldByteLength, - 0, - (newByteLength - oldByteLength) - ); - } else if (newByteLength < oldByteLength) { // fast path: override size - // TBD: worth to copy and release if size is significantly less than before? - assert(newByteLength >= 0); - store(changetype(buffer), newByteLength, offsetof("byteLength")); - } - return buffer; -} - -// The helpers below use two different types in order to emit loads and stores that load respectively -// store one type to/from memory while returning/taking the desired output/input type. This allows to -// emit instructions like -// -// * `i32.load8` ^= `load(...)` that reads an i8 but returns an i32, or -// * `i64.load32_s` ^= `load(...)`) that reads a 32-bit as a 64-bit integer -// -// without having to emit an additional instruction for conversion purposes. The second parameter -// can be omitted for references and other loads and stores that simply return the exact type. - -@inline export function LOAD(buffer: ArrayBuffer, index: i32, byteOffset: i32 = 0): TOut { - return load(changetype(buffer) + (index << alignof()) + byteOffset, HEADER_SIZE); -} - -@inline export function STORE(buffer: ArrayBuffer, index: i32, value: TIn, byteOffset: i32 = 0): void { - store(changetype(buffer) + (index << alignof()) + byteOffset, value, HEADER_SIZE); -} diff --git a/std/assembly/internal/string.ts b/std/assembly/internal/string.ts deleted file mode 100644 index 2e4fd81f01..0000000000 --- a/std/assembly/internal/string.ts +++ /dev/null @@ -1,225 +0,0 @@ -export function compareImpl(str1: String, index1: usize, str2: String, index2: usize, len: usize): i32 { - var result: i32 = 0; - var ptr1 = changetype(str1) + (index1 << 1); - var ptr2 = changetype(str2) + (index2 << 1); - while (len && !(result = load(ptr1) - load(ptr2))) { - --len, ptr1 += 2, ptr2 += 2; - } - return result; -} - -import { MAX_SIZE_32 } from "./allocator"; -import { String } from "../string"; - -/** Size of a String header. */ -@inline export const HEADER_SIZE = (offsetof() + 1) & ~1; // 2 byte aligned -/** Maximum length of a String. */ -@inline export const MAX_LENGTH = (MAX_SIZE_32 - HEADER_SIZE) >>> 1; - -// Low-level utility - -function __gc(ref: usize): void {} - -export function allocateUnsafe(length: i32): String { - assert(length > 0 && length <= MAX_LENGTH); - var buffer: usize; - if (isManaged()) { - buffer = __gc_allocate(HEADER_SIZE + (length << 1), __gc); // tslint:disable-line - } else { - buffer = memory.allocate(HEADER_SIZE + (length << 1)); - } - store(buffer, length); - return changetype(buffer); -} - -@inline -export function freeUnsafe(buffer: String): void { - if (!isManaged()) { - assert(buffer); - memory.free(changetype(buffer)); - } -} - -export function copyUnsafe(dest: String, destOffset: usize, src: String, srcOffset: usize, len: usize): void { - memory.copy( - changetype(dest) + (destOffset << 1) + HEADER_SIZE, - changetype(src) + (srcOffset << 1) + HEADER_SIZE, - len << 1 - ); -} - -export function repeatUnsafe(dest: String, destOffset: usize, src: String, count: i32): void { - var length = src.length; - if (ASC_SHRINK_LEVEL > 1) { - let strLen = length << 1; - let to = changetype(dest) + HEADER_SIZE + (destOffset << 1); - let from = changetype(src) + HEADER_SIZE; - for (let i = 0, len = strLen * count; i < len; i += strLen) { - memory.copy(to + i, from, strLen); - } - } else { - switch (length) { - case 0: break; - case 1: { - let cc = load(changetype(src), HEADER_SIZE); - let out = changetype(dest) + (destOffset << 1); - for (let i = 0; i < count; ++i) { - store(out + (i << 1), cc, HEADER_SIZE); - } - break; - } - case 2: { - let cc = load(changetype(src), HEADER_SIZE); - let out = changetype(dest) + (destOffset << 1); - for (let i = 0; i < count; ++i) { - store(out + (i << 2), cc, HEADER_SIZE); - } - break; - } - case 3: { - let cc1 = load(changetype(src), HEADER_SIZE + 0); - let cc2 = load(changetype(src), HEADER_SIZE + 4); - let out = changetype(dest) + (destOffset << 1); - for (let i = 0; i < count; ++i) { - store(out + (i << 2), cc1, HEADER_SIZE + 0); - store(out + (i << 1), cc2, HEADER_SIZE + 4); - } - break; - } - case 4: { - let cc = load(changetype(src), HEADER_SIZE); - let out = changetype(dest) + (destOffset << 1); - for (let i = 0; i < count; ++i) { - store(out + (i << 3), cc, HEADER_SIZE); - } - break; - } - default: { - let strLen = length << 1; - let to = changetype(dest) + HEADER_SIZE + (destOffset << 1); - let from = changetype(src) + HEADER_SIZE; - for (let i = 0, len = strLen * count; i < len; i += strLen) { - memory.copy(to + i, from, strLen); - } - break; - } - } - } -} - -// Helpers - -@inline export const enum CharCode { - PLUS = 0x2B, - MINUS = 0x2D, - DOT = 0x2E, - _0 = 0x30, - _1 = 0x31, - _2 = 0x32, - _3 = 0x33, - _4 = 0x34, - _5 = 0x35, - _6 = 0x36, - _7 = 0x37, - _8 = 0x38, - _9 = 0x39, - A = 0x41, - B = 0x42, - E = 0x45, - N = 0x4E, - O = 0x4F, - X = 0x58, - Z = 0x5a, - a = 0x61, - b = 0x62, - e = 0x65, - n = 0x6E, - o = 0x6F, - x = 0x78, - z = 0x7A -} - -export function isWhiteSpaceOrLineTerminator(c: u16): bool { - switch (c) { - case 9: // - case 10: // - case 13: // - case 11: // - case 12: // - case 32: // - case 160: // - case 8232: // - case 8233: // - case 65279: return true; // - default: return false; - } -} - -/** Parses a string to an integer (usually), using the specified radix. */ -export function parse(str: String, radix: i32 = 0): T { - var len: i32 = str.length; - if (!len) return NaN; - - var ptr = changetype(str) /* + HEAD -> offset */; - var code = load(ptr, HEADER_SIZE); - - // determine sign - var sign: T; - if (code == CharCode.MINUS) { - if (!--len) return NaN; - code = load(ptr += 2, HEADER_SIZE); - sign = -1; - } else if (code == CharCode.PLUS) { - if (!--len) return NaN; - code = load(ptr += 2, HEADER_SIZE); - sign = 1; - } else { - sign = 1; - } - - // determine radix - if (!radix) { - if (code == CharCode._0 && len > 2) { - switch (load(ptr + 2, HEADER_SIZE)) { - case CharCode.B: - case CharCode.b: { - ptr += 4; len -= 2; - radix = 2; - break; - } - case CharCode.O: - case CharCode.o: { - ptr += 4; len -= 2; - radix = 8; - break; - } - case CharCode.X: - case CharCode.x: { - ptr += 4; len -= 2; - radix = 16; - break; - } - default: radix = 10; - } - } else radix = 10; - } else if (radix < 2 || radix > 36) { - return NaN; - } - - // calculate value - var num: T = 0; - while (len--) { - code = load(ptr, HEADER_SIZE); - if (code >= CharCode._0 && code <= CharCode._9) { - code -= CharCode._0; - } else if (code >= CharCode.A && code <= CharCode.Z) { - code -= CharCode.A - 10; - } else if (code >= CharCode.a && code <= CharCode.z) { - code -= CharCode.a - 10; - } else break; - if (code >= radix) break; - num = (num * radix) + code; - ptr += 2; - } - return sign * num; -} diff --git a/std/assembly/internal/typedarray.ts b/std/assembly/internal/typedarray.ts deleted file mode 100644 index 2364f325cd..0000000000 --- a/std/assembly/internal/typedarray.ts +++ /dev/null @@ -1,206 +0,0 @@ -import { - ALLOC_RAW, - REGISTER, - LINK -} from "../runtime"; - -import { - ArrayBuffer -} from "../arraybuffer"; - -import { - SORT as SORT_IMPL -} from "./sort"; - -/** Typed array base class. Not a global object. */ -export abstract class TypedArray { - [key: number]: T; // compatibility only - - readonly buffer: ArrayBuffer; - readonly byteOffset: i32; - readonly byteLength: i32; - - constructor(length: i32) { - const MAX_LENGTH = ArrayBuffer.MAX_BYTELENGTH / sizeof(); - if (length > MAX_LENGTH) throw new RangeError("Invalid typed array length"); - var byteLength = length << alignof(); - this.buffer = new ArrayBuffer(byteLength); - this.byteOffset = 0; - this.byteLength = byteLength; - } - - get length(): i32 { - return this.byteLength >>> alignof(); - } - - // TODO: could compute load/store offset from index and emit an immediate -> make this a builtin? - - @operator("[]") protected __get(index: i32): T { - if (index >= (this.byteLength >>> alignof())) throw new Error("Index out of bounds"); - return load(changetype(this.buffer) + this.byteOffset, index << alignof()); - } - - @inline @operator("{}") protected __unchecked_get(index: i32): T { - return load(changetype(this.buffer) + this.byteOffset + (index << alignof())); - } - - @operator("[]=") protected __set(index: i32, value: native): void { - if (index >= (this.byteLength >>> alignof())) throw new Error("Index out of bounds"); - store(changetype(this.buffer) + this.byteOffset + (index << alignof()), value); - } - - @inline @operator("{}=") protected __unchecked_set(index: i32, value: native): void { - store(changetype(this.buffer) + this.byteOffset + (index << alignof()), value); - } - - // copyWithin(target: i32, start: i32, end: i32 = this.length): this -} - -@inline export function FILL, T extends number>( - array: TArray, - value: native, - start: i32, - end: i32 -): TArray { - var base = changetype(array.buffer) + array.byteOffset; - var len = array.length; - start = start < 0 ? max(len + start, 0) : min(start, len); - end = end < 0 ? max(len + end, 0) : min(end, len); - if (sizeof() == 1) { - if (start < end) memory.fill(base + start, value, (end - start)); - } else { - for (; start < end; ++start) { - store(base + (start << alignof()), value); - } - } - return array; -} - -@inline export function SORT, T>( - array: TArray, - comparator: (a: T, b: T) => i32 -): TArray { - var length = array.length; - var offset = array.byteOffset; - if (length <= 1) return array; - var buffer = changetype(array.buffer); - if (length == 2) { - let a = load(buffer + offset, sizeof()); - let b = load(buffer + offset); - if (comparator(a, b) < 0) { - store(buffer + offset, b, sizeof()); - store(buffer + offset, a); - } - return array; - } - // TODO - // SORT_IMPL(buffer, byteOffset, length, comparator); - return array; -} - -@inline export function SUBARRAY, T>( - array: TArray, - begin: i32, - end: i32 -): TArray { - var buffer = changetype(array.buffer); - var length = array.length; - if (begin < 0) begin = max(length + begin, 0); - else begin = min(begin, length); - if (end < 0) end = max(length + end, begin); - else end = max(min(end, length), begin); - var out = ALLOC_RAW(offsetof()); - store(out, buffer, offsetof("buffer")); - store(out, buffer + (begin << alignof()), offsetof("dataStart")); - store(out, buffer + (end << alignof()), offsetof("dataStart")); - store(out, array.byteOffset + (begin << alignof()), offsetof("byteOffset")); - store(out, (end - begin) << alignof(), offsetof("byteLength")); - LINK(buffer, REGISTER(out)); // register first, then link - return changetype(out); -} - -@inline export function REDUCE, T, TRet>( - array: TArray, - callbackfn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet, - initialValue: TRet -): TRet { - var base = changetype(array.buffer) + array.byteOffset; - for (let i = 0, k = array.length; i < k; i++) { - initialValue = callbackfn(initialValue, load(base + (i << alignof())), i, array); - } - return initialValue; -} - -@inline export function REDUCE_RIGHT, T, TRet>( - array: TArray, - callbackfn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet, - initialValue: TRet -): TRet { - var base = changetype(array.buffer) + array.byteOffset; - for (let i = array.length - 1; i >= 0; i--) { - initialValue = callbackfn(initialValue, load(base + (i << alignof())), i, array); - } - return initialValue; -} - -@inline export function MAP, T>( - array: TArray, - callbackfn: (value: T, index: i32, self: TArray) => T, -): TArray { - var length = array.length; - var base = changetype(array.buffer) + array.byteOffset; - var result = instantiate(length); - var resultBase = changetype(result.buffer); // assumes byteOffset = 0 - for (let i = 0; i < length; i++) { - store( - resultBase + (i << alignof()), - callbackfn(load(base + (i << alignof())), i, array) - ); - } - - return result; -} - -@inline export function FIND_INDEX, T>( - array: TArray, - callbackfn: (value: T, index: i32, array: TArray) => bool, -): i32 { - var base = changetype(array.buffer) + array.byteOffset; - for (let i = 0, k = array.length; i < k; i++) { - if (callbackfn(load(base + (i << alignof())), i, array)) return i; - } - return -1; -} - -@inline export function SOME, T>( - array: TArray, - callbackfn: (value: T, index: i32, array: TArray) => bool, -): bool { - var base = changetype(array.buffer) + array.byteOffset; - for (let i = 0, k = array.length; i < k; i++) { - if (callbackfn(load(base + (i << alignof())), i, array)) return true; - } - return false; -} - -@inline export function EVERY, T>( - array: TArray, - callbackfn: (value: T, index: i32, array: TArray) => bool, -): bool { - var base = changetype(array.buffer) + array.byteOffset; - for (let i = 0, k = array.length; i < k; i++) { - if (callbackfn(load(base + (i << alignof())), i, array)) continue; - return false; - } - return true; -} - -@inline export function FOREACH, T>( - array: TArray, - callbackfn: (value: T, index: i32, array: TArray) => void, -): void { - var base = changetype(array.buffer) + array.byteOffset; - for (let i = 0, k = array.length; i < k; i++) { - callbackfn(load(base + (i << alignof())), i, array); - } -} diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 26c8368ed2..bc4a2e2879 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -355,7 +355,8 @@ import { // split by chars length = min(length, limit); let result = new Array(length); - let buffer = result.buffer_; + let buffer = unreachable(); // TODO + // let buffer = result.buffer_; for (let i: isize = 0; i < length; ++i) { let char = ALLOC(2); store( diff --git a/std/assembly/internal/allocator.ts b/std/assembly/util/allocator.ts similarity index 100% rename from std/assembly/internal/allocator.ts rename to std/assembly/util/allocator.ts diff --git a/std/assembly/internal/hash.ts b/std/assembly/util/hash.ts similarity index 86% rename from std/assembly/internal/hash.ts rename to std/assembly/util/hash.ts index dd7c740325..f4dcea3eae 100644 --- a/std/assembly/internal/hash.ts +++ b/std/assembly/util/hash.ts @@ -1,11 +1,4 @@ -import { - HEADER_SIZE -} from "./string"; - -/** Computes the 32-bit hash of a value of any type. */ -@inline -export function HASH(key: T): u32 { - // branch-level tree-shaking makes this a `(return (call ...))` +@inline export function HASH(key: T): u32 { if (isString(key)) { return hashStr(key); } else if (isReference()) { @@ -66,7 +59,7 @@ function hash64(key: u64): u32 { function hashStr(key: string): u32 { var v = FNV_OFFSET; for (let i: usize = 0, k: usize = key.length << 1; i < k; ++i) { - v = (v ^ load(changetype(key) + i, HEADER_SIZE)) * FNV_PRIME; + v = (v ^ load(changetype(key) + i)) * FNV_PRIME; } return v; } diff --git a/std/assembly/internal/memory.ts b/std/assembly/util/memory.ts similarity index 100% rename from std/assembly/internal/memory.ts rename to std/assembly/util/memory.ts diff --git a/std/assembly/internal/number.ts b/std/assembly/util/number.ts similarity index 99% rename from std/assembly/internal/number.ts rename to std/assembly/util/number.ts index 0cc7ac21f3..01dff985d5 100644 --- a/std/assembly/internal/number.ts +++ b/std/assembly/util/number.ts @@ -8,10 +8,6 @@ import { FREE } from "../runtime"; -import { - LOAD -} from "./arraybuffer"; - @inline export const MAX_DOUBLE_LENGTH = 28; @lazy @inline const POWERS10: u32[] = [ diff --git a/std/assembly/internal/sort.ts b/std/assembly/util/sort.ts similarity index 93% rename from std/assembly/internal/sort.ts rename to std/assembly/util/sort.ts index 587de405c6..db9e30481a 100644 --- a/std/assembly/internal/sort.ts +++ b/std/assembly/util/sort.ts @@ -1,6 +1,4 @@ -/** Obtains the default comparator for the specified value type. */ -@inline -export function COMPARATOR(): (a: T, b: T) => i32 { +@inline export function COMPARATOR(): (a: T, b: T) => i32 { if (isInteger()) { if (isSigned() && sizeof() <= 4) { return (a: T, b: T): i32 => ((a - b)); @@ -40,8 +38,7 @@ export function COMPARATOR(): (a: T, b: T) => i32 { } } -@inline -export function SORT( +@inline export function SORT( dataStart: usize, length: i32, comparator: (a: T, b: T) => i32 @@ -58,7 +55,6 @@ export function SORT( } } -/** Sorts an Array with the 'Insertion Sort' algorithm. */ function insertionSort( dataStart: usize, length: i32, @@ -77,7 +73,6 @@ function insertionSort( } } -/** Sorts an Array with the 'Weak Heap Sort' algorithm. */ function weakHeapSort( dataStart: usize, length: i32, diff --git a/std/assembly/util/string.ts b/std/assembly/util/string.ts new file mode 100644 index 0000000000..a3374134d0 --- /dev/null +++ b/std/assembly/util/string.ts @@ -0,0 +1,124 @@ +export function compareImpl(str1: string, index1: usize, str2: string, index2: usize, len: usize): i32 { + var result: i32 = 0; + var ptr1 = changetype(str1) + (index1 << 1); + var ptr2 = changetype(str2) + (index2 << 1); + while (len && !(result = load(ptr1) - load(ptr2))) { + --len, ptr1 += 2, ptr2 += 2; + } + return result; +} + +@inline export const enum CharCode { + PLUS = 0x2B, + MINUS = 0x2D, + DOT = 0x2E, + _0 = 0x30, + _1 = 0x31, + _2 = 0x32, + _3 = 0x33, + _4 = 0x34, + _5 = 0x35, + _6 = 0x36, + _7 = 0x37, + _8 = 0x38, + _9 = 0x39, + A = 0x41, + B = 0x42, + E = 0x45, + N = 0x4E, + O = 0x4F, + X = 0x58, + Z = 0x5a, + a = 0x61, + b = 0x62, + e = 0x65, + n = 0x6E, + o = 0x6F, + x = 0x78, + z = 0x7A +} + +export function isWhiteSpaceOrLineTerminator(c: u16): bool { + switch (c) { + case 9: // + case 10: // + case 13: // + case 11: // + case 12: // + case 32: // + case 160: // + case 8232: // + case 8233: // + case 65279: return true; // + default: return false; + } +} + +/** Parses a string to an integer (usually), using the specified radix. */ +export function parse(str: string, radix: i32 = 0): T { + var len: i32 = str.length; + if (!len) return NaN; + + var ptr = changetype(str) /* + HEAD -> offset */; + var code = load(ptr, HEADER_SIZE); + + // determine sign + var sign: T; + if (code == CharCode.MINUS) { + if (!--len) return NaN; + code = load(ptr += 2, HEADER_SIZE); + sign = -1; + } else if (code == CharCode.PLUS) { + if (!--len) return NaN; + code = load(ptr += 2, HEADER_SIZE); + sign = 1; + } else { + sign = 1; + } + + // determine radix + if (!radix) { + if (code == CharCode._0 && len > 2) { + switch (load(ptr + 2, HEADER_SIZE)) { + case CharCode.B: + case CharCode.b: { + ptr += 4; len -= 2; + radix = 2; + break; + } + case CharCode.O: + case CharCode.o: { + ptr += 4; len -= 2; + radix = 8; + break; + } + case CharCode.X: + case CharCode.x: { + ptr += 4; len -= 2; + radix = 16; + break; + } + default: radix = 10; + } + } else radix = 10; + } else if (radix < 2 || radix > 36) { + return NaN; + } + + // calculate value + var num: T = 0; + while (len--) { + code = load(ptr, HEADER_SIZE); + if (code >= CharCode._0 && code <= CharCode._9) { + code -= CharCode._0; + } else if (code >= CharCode.A && code <= CharCode.Z) { + code -= CharCode.A - 10; + } else if (code >= CharCode.a && code <= CharCode.z) { + code -= CharCode.a - 10; + } else break; + if (code >= radix) break; + num = (num * radix) + code; + ptr += 2; + } + return sign * num; +} From e78c4c7f544fc4958ebcf7819b0cc1835731afb8 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 13 Mar 2019 03:09:24 +0100 Subject: [PATCH 022/119] more --- std/assembly/array.ts | 97 ++++++++++++++++++++-------------- std/assembly/runtime.ts | 24 ++++----- std/assembly/string.ts | 10 ++-- std/assembly/typedarray.ts | 105 ++++++++++++++++++++++++++----------- std/assembly/vector.ts | 3 +- 5 files changed, 149 insertions(+), 90 deletions(-) diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 3811d5a61f..22f9d23656 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -40,6 +40,10 @@ export class Array extends ArrayBufferView { this.length_ = length; } + @unsafe get buffer(): ArrayBuffer { + return this.data; + } + get length(): i32 { return this.length_; } @@ -49,18 +53,18 @@ export class Array extends ArrayBufferView { this.length_ = length; } - resize(length: i32): void { - var buffer = this.buffer; - var oldCapacity = buffer.byteLength >>> alignof(); + private resize(length: i32): void { + var oldData = this.data; + var oldCapacity = oldData.byteLength >>> alignof(); if (length > oldCapacity) { const MAX_LENGTH = ArrayBuffer.MAX_BYTELENGTH >>> alignof(); if (length > MAX_LENGTH) throw new RangeError("Invalid array length"); - let newCapacity = length << alignof(); - let newBuffer = REALLOC(changetype(buffer), newCapacity); - if (newBuffer !== changetype(buffer)) { - this.buffer = changetype(newBuffer); // links - this.dataStart = newBuffer; - this.dataEnd = newBuffer + newCapacity; + let newCapacity = length << alignof(); + let newData = REALLOC(changetype(oldData), newCapacity); // registers on move + if (newData !== changetype(oldData)) { + this.data = changetype(newData); // links + this.dataStart = newData; + this.dataEnd = newData + newCapacity; } } } @@ -114,23 +118,21 @@ export class Array extends ArrayBufferView { // } fill(value: T, start: i32 = 0, end: i32 = i32.MAX_VALUE): this { - var base = this.dataStart; + var dataStart = this.dataStart; var length = this.length_; - start = start < 0 ? max(length + start, 0) : min(start, length); end = end < 0 ? max(length + end, 0) : min(end, length); - if (sizeof() == 1) { if (start < end) { memory.fill( - base + start, + dataStart + start, value, (end - start) ); } } else { for (; start < end; ++start) { - store(base + (start << alignof()), value); + store(dataStart + (start << alignof()), value); } } return this; @@ -144,9 +146,9 @@ export class Array extends ArrayBufferView { var length = this.length_; if (length == 0 || fromIndex >= length) return -1; if (fromIndex < 0) fromIndex = max(length + fromIndex, 0); - var base = this.dataStart; + var dataStart = this.dataStart; while (fromIndex < length) { - if (load(base + (fromIndex << alignof())) == searchElement) return fromIndex; + if (load(dataStart + (fromIndex << alignof())) == searchElement) return fromIndex; ++fromIndex; } return -1; @@ -155,11 +157,11 @@ export class Array extends ArrayBufferView { lastIndexOf(searchElement: T, fromIndex: i32 = this.length_): i32 { var length = this.length_; if (length == 0) return -1; - if (fromIndex < 0) fromIndex = length + fromIndex; // no need to clamp + if (fromIndex < 0) fromIndex = length + fromIndex; else if (fromIndex >= length) fromIndex = length - 1; - var base = this.dataStart; - while (fromIndex >= 0) { // ^ - if (load(base + (fromIndex << alignof())) == searchElement) return fromIndex; + var dataStart = this.dataStart; + while (fromIndex >= 0) { + if (load(dataStart + (fromIndex << alignof())) == searchElement) return fromIndex; --fromIndex; } return -1; @@ -177,19 +179,32 @@ export class Array extends ArrayBufferView { concat(other: Array): Array { var thisLen = this.length_; var otherLen = select(0, other.length_, other === null); - var outLen = thisLen + otherLen; - var out = new Array(outLen); - if (thisLen) { - memory.copy(out.dataStart, this.dataStart, thisLen << alignof()); - } - if (otherLen) { - memory.copy(out.dataStart + (thisLen << alignof()), other.dataStart, otherLen << alignof()); + var out = new Array(thisLen + otherLen); + var outStart = out.dataStart; + var thisSize = thisLen << alignof(); + if (isManaged()) { + let thisStart = this.dataStart; + for (let offset: usize = 0; offset < thisSize; offset += sizeof()) { + let element = load(thisStart + offset); + store(outStart + offset, element); + LINK(changetype(element), changetype(out)); + } + let otherStart = other.dataStart; + let otherSize = otherLen << alignof(); + for (let offset: usize = 0; offset < otherSize; offset += sizeof()) { + let element = load(otherStart + offset); + store(outStart + thisSize + offset, element); + LINK(changetype(element), changetype(out)); + } + } else { + memory.copy(outStart, this.dataStart, thisSize); + memory.copy(outStart + thisSize, other.dataStart, otherLen << alignof()); } return out; } copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): this { - var buffer = this.buffer_; + var dataStart = this.dataStart; var len = this.length_; end = min(end, len); @@ -202,13 +217,13 @@ export class Array extends ArrayBufferView { from += count - 1; to += count - 1; while (count) { - STORE(buffer, to, LOAD(buffer, from)); + store(dataStart + (to << alignof()), load(dataStart + (from << alignof()))); --from, --to, --count; } } else { memory.copy( - changetype(buffer) + HEADER_SIZE + (to << alignof()), - changetype(buffer) + HEADER_SIZE + (from << alignof()), + dataStart + (to << alignof()), + dataStart + (from << alignof()), count << alignof() ); } @@ -231,14 +246,15 @@ export class Array extends ArrayBufferView { map(callbackfn: (value: T, index: i32, array: Array) => U): Array { var length = this.length_; - var result = new Array(length); - var resultStart = result.dataStart; + var out = new Array(length); + var outStart = out.dataStart; for (let index = 0; index < min(length, this.length_); ++index) { - let element = load(this.dataStart + (index << alignof())); - store(resultStart + (index << alignof()), element); - if (isManaged()) LINK(changetype(element), changetype(result)); + let value = load(this.dataStart + (index << alignof())); + let result = callbackfn(value, index, this); + store(outStart + (index << alignof()), result); + if (isManaged()) LINK(changetype(result), changetype(out)); } - return result; + return out; } filter(callbackfn: (value: T, index: i32, array: Array) => bool): Array { @@ -360,9 +376,10 @@ export class Array extends ArrayBufferView { reverse(): Array { var base = this.dataStart; for (let front = 0, back = this.length_ - 1; front < back; ++front, --back) { - let temp: T = load(base, front); - store(base + (front << alignof()), load(base + (back << alignof()))); - store(base + (back << alignof()), temp); + let temp = load(base, front); + let dest = base + (back << alignof()); + store(base + (front << alignof()), load(dest)); + store(dest, temp); } return this; } diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 085851e2ca..b0edc9d78c 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -1,7 +1,4 @@ -import { - AL_MASK, - MAX_SIZE_32 -} from "./internal/allocator"; +import { AL_MASK, MAX_SIZE_32 } from "./util/allocator"; @builtin export declare const HEAP_BASE: usize; @@ -151,9 +148,9 @@ export abstract class ArrayBufferBase { export abstract class ArrayBufferView { [key: number]: number; - protected data: ArrayBuffer; - protected dataStart: usize; - protected dataEnd: usize; + @unsafe data: ArrayBuffer; + @unsafe dataStart: usize; + @unsafe dataEnd: usize; constructor(length: i32, alignLog2: i32) { if (length > ArrayBufferBase.MAX_BYTELENGTH >>> alignLog2) throw new RangeError("Invalid length"); @@ -161,11 +158,7 @@ export abstract class ArrayBufferView { var buffer = new ArrayBuffer(byteLength); this.data = buffer; this.dataStart = changetype(buffer); - this.dataEnd = changetype(buffer) + length; - } - - get buffer(): ArrayBuffer { - return this.data; + this.dataEnd = changetype(buffer) + length; } get byteOffset(): i32 { @@ -175,6 +168,11 @@ export abstract class ArrayBufferView { get byteLength(): i32 { return (this.dataEnd - this.dataStart); } + + get length(): i32 { + ERROR("not implemented"); + return unreachable(); + } } export abstract class StringBase { @@ -185,7 +183,7 @@ export abstract class StringBase { } } -import { memcmp, memmove, memset } from "./internal/memory"; +import { memcmp, memmove, memset } from "./util/memory"; export namespace memory { @builtin export declare function size(): i32; diff --git a/std/assembly/string.ts b/std/assembly/string.ts index bc4a2e2879..4c89dbd686 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -9,7 +9,7 @@ import { parse, CharCode, isWhiteSpaceOrLineTerminator -} from "./internal/string"; +} from "./util/string"; @sealed export class String extends StringBase { @@ -431,8 +431,8 @@ import { return len; } - static fromUTF8(ptr: usize, len: usize): String { - if (len < 1) return changetype(""); + static fromUTF8(ptr: usize, len: usize): string { + if (len < 1) return changetype(""); var ptrPos = 0; var buf = memory.allocate(len << 1); var bufPos = 0; @@ -468,10 +468,10 @@ import { } } assert(ptrPos == len); - var out = ALLOC((bufPos >> 1)); + var out = ALLOC(bufPos); memory.copy(changetype(out), buf, bufPos); memory.free(buf); - return REGISTER(out); + return REGISTER(out); } toUTF8(): usize { diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index 0bacb1c739..488bbe80b5 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -1,14 +1,5 @@ -import { - ALLOC, - REGISTER, - LINK, - ArrayBufferView -} from "./runtime"; - -import { - COMPARATOR, - SORT as SORT_IMPL -} from "./internal/sort"; +import { ALLOC, REGISTER, LINK, ArrayBufferView } from "./runtime"; +import { COMPARATOR, SORT as SORT_IMPL } from "./util/sort"; function clampToByte(value: i32): i32 { return ~(value >> 31) & (((255 - value) >> 31) | value); // & 255 @@ -18,10 +9,16 @@ export class Int8Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { - super(length, 0); + super(length, alignof()); } - get length(): i32 { return this.byteLength; } + get buffer(): ArrayBuffer { + return this.data; + } + + get length(): i32 { + return this.byteLength; + } fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int8Array { return FILL(this, value, start, end); @@ -74,7 +71,7 @@ export class Uint8Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { - super(length, 0); + super(length, alignof()); } get length(): i32 { return this.byteLength; } @@ -180,10 +177,16 @@ export class Int16Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { - super(length, 1); + super(length, alignof()); } - get length(): i32 { return this.byteLength >>> 1; } + get buffer(): ArrayBuffer { + return this.data; + } + + get length(): i32 { + return this.byteLength >>> 1; + } fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int16Array { return FILL(this, value, start, end); @@ -236,10 +239,16 @@ export class Uint16Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { - super(length, 1); + super(length, alignof()); } - get length(): i32 { return this.byteLength >>> 1; } + get buffer(): ArrayBuffer { + return this.data; + } + + get length(): i32 { + return this.byteLength >>> 1; + } fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint16Array { return FILL(this, value, start, end); @@ -292,10 +301,16 @@ export class Int32Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { - super(length, 2); + super(length, alignof()); } - get length(): i32 { return this.byteLength >>> 2; } + get buffer(): ArrayBuffer { + return this.data; + } + + get length(): i32 { + return this.byteLength >>> 2; + } fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int32Array { return FILL(this, value, start, end); @@ -348,10 +363,16 @@ export class Uint32Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { - super(length, 2); + super(length, alignof()); + } + + get buffer(): ArrayBuffer { + return this.data; } - get length(): i32 { return this.byteLength >>> 2; } + get length(): i32 { + return this.byteLength >>> 2; + } fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint32Array { return FILL(this, value, start, end); @@ -404,10 +425,16 @@ export class Int64Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { - super(length, 3); + super(length, alignof()); } - get length(): i32 { return this.byteLength >>> 3; } + get buffer(): ArrayBuffer { + return this.data; + } + + get length(): i32 { + return this.byteLength >>> 3; + } fill(value: i64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int64Array { return FILL(this, value, start, end); @@ -460,10 +487,16 @@ export class Uint64Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { - super(length, 3); + super(length, alignof()); + } + + get buffer(): ArrayBuffer { + return this.data; } - get length(): i32 { return this.byteLength >>> 3; } + get length(): i32 { + return this.byteLength >>> 3; + } fill(value: u64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint64Array { return FILL(this, value, start, end); @@ -516,10 +549,16 @@ export class Float32Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { - super(length, 2); + super(length, alignof()); + } + + get buffer(): ArrayBuffer { + return this.data; } - get length(): i32 { return this.byteLength >>> 2; } + get length(): i32 { + return this.byteLength >>> 2; + } fill(value: f32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float32Array { return FILL(this, value, start, end); @@ -572,10 +611,16 @@ export class Float64Array extends ArrayBufferView { @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { - super(length, 3); + super(length, alignof()); } - get length(): i32 { return this.byteLength >>> 3; } + get buffer(): ArrayBuffer { + return this.data; + } + + get length(): i32 { + return this.byteLength >>> 3; + } fill(value: f64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float64Array { return FILL(this, value, start, end); diff --git a/std/assembly/vector.ts b/std/assembly/vector.ts index 0b264a39ca..e39e402fc8 100644 --- a/std/assembly/vector.ts +++ b/std/assembly/vector.ts @@ -1,3 +1,2 @@ -@sealed -export abstract class V128 { +@sealed export class V128 { } From 37d361bafd7aad2f51cb58dbb3629fbdc33b12cf Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 13 Mar 2019 03:39:27 +0100 Subject: [PATCH 023/119] dataview --- std/assembly/dataview.ts | 211 ++++++++++++++++++++------------------- 1 file changed, 111 insertions(+), 100 deletions(-) diff --git a/std/assembly/dataview.ts b/std/assembly/dataview.ts index 0e65466ffb..12c8817d1e 100644 --- a/std/assembly/dataview.ts +++ b/std/assembly/dataview.ts @@ -1,189 +1,200 @@ -import { - HEADER_SIZE, - MAX_BLENGTH -} from "./internal/arraybuffer"; +import { ArrayBuffer } from "./arraybuffer"; export class DataView { + private data: ArrayBuffer; + private dataStart: usize; + private dataEnd: usize; + constructor( - readonly buffer: ArrayBuffer, - readonly byteOffset: i32 = 0, - readonly byteLength: i32 = i32.MIN_VALUE // FIXME + buffer: ArrayBuffer, + byteOffset: i32 = 0, + byteLength: i32 = i32.MIN_VALUE // FIXME ) { if (byteLength === i32.MIN_VALUE) byteLength = buffer.byteLength - byteOffset; // FIXME - if (byteOffset > MAX_BLENGTH) throw new RangeError("Invalid byteOffset"); - if (byteLength > MAX_BLENGTH) throw new RangeError("Invalid byteLength"); - if (byteOffset + byteLength > buffer.byteLength) throw new RangeError("Invalid length"); + if (byteLength > ArrayBuffer.MAX_BYTELENGTH) throw new RangeError("Invalid byteLength"); + if (byteOffset + byteLength > buffer.byteLength) throw new RangeError("Invalid length"); + this.data = buffer; // links + var dataStart = changetype(buffer) + byteOffset; + this.dataStart = dataStart; + this.dataEnd = dataStart + byteLength; + } + + get buffer(): ArrayBuffer { + return this.data; + } + + get byteOffset(): i32 { + return (this.dataStart - changetype(this.data)); + } + + get byteLength(): i32 { + return (this.dataEnd - this.dataStart); } getFloat32(byteOffset: i32, littleEndian: boolean = false): f32 { - checkOffset(byteOffset, 4, this.byteLength); + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset + 4 > this.dataEnd) throw new Error("Offset out of bounds"); return littleEndian - ? load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE) + ? load(dataOffset) : reinterpret( bswap( - load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE) + load(dataOffset) ) ); } getFloat64(byteOffset: i32, littleEndian: boolean = false): f64 { - checkOffset(byteOffset, 8, this.byteLength); + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset + 4 > this.dataEnd) throw new Error("Offset out of bounds"); return littleEndian - ? load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE) + ? load(dataOffset) : reinterpret( - bswap( - load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE) + bswap( + load(dataOffset) ) ); } getInt8(byteOffset: i32): i8 { - checkOffset(byteOffset, 1, this.byteLength); - return load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset >= this.dataEnd) throw new Error("Offset out of bounds"); + return load(dataOffset); } getInt16(byteOffset: i32, littleEndian: boolean = false): i16 { - checkOffset(byteOffset, 2, this.byteLength); - var result: i16 = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset + 2 > this.dataEnd) throw new Error("Offset out of bounds"); + var result: i16 = load(dataOffset); return littleEndian ? result : bswap(result); } getInt32(byteOffset: i32, littleEndian: boolean = false): i32 { - checkOffset(byteOffset, 4, this.byteLength); - var result = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset + 4 > this.dataEnd) throw new Error("Offset out of bounds"); + var result: i32 = load(dataOffset); return littleEndian ? result : bswap(result); } getUint8(byteOffset: i32): u8 { - checkOffset(byteOffset, 1, this.byteLength); - return load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset >= this.dataEnd) throw new Error("Offset out of bounds"); + return load(dataOffset); } getUint16(byteOffset: i32, littleEndian: boolean = false): u16 { - checkOffset(byteOffset, 2, this.byteLength); - var result: u16 = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset + 2 > this.dataEnd) throw new Error("Offset out of bounds"); + var result: u16 = load(dataOffset); return littleEndian ? result : bswap(result); } getUint32(byteOffset: i32, littleEndian: boolean = false): u32 { - checkOffset(byteOffset, 4, this.byteLength); - var result = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset + 2 > this.dataEnd) throw new Error("Offset out of bounds"); + var result: u32 = load(dataOffset); return littleEndian ? result : bswap(result); } setFloat32(byteOffset: i32, value: f32, littleEndian: boolean = false): void { - checkOffset(byteOffset, 4, this.byteLength); - if (littleEndian) { - store(changetype(this.buffer) + this.byteOffset + byteOffset, value, HEADER_SIZE); - } else { - store(changetype(this.buffer) + this.byteOffset + byteOffset, - bswap( - reinterpret(value) - ), - HEADER_SIZE - ); - } + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset + 4 > this.dataEnd) throw new Error("Offset out of bounds"); + if (littleEndian) store(dataOffset, value); + else store(dataOffset, bswap(reinterpret(value))); } setFloat64(byteOffset: i32, value: f64, littleEndian: boolean = false): void { - checkOffset(byteOffset, 8, this.byteLength); - if (littleEndian) { - store(changetype(this.buffer) + this.byteOffset + byteOffset, value, HEADER_SIZE); - } else { - store(changetype(this.buffer) + this.byteOffset + byteOffset, - bswap( - reinterpret(value) - ), - HEADER_SIZE - ); - } + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset + 4 > this.dataEnd) throw new Error("Offset out of bounds"); + if (littleEndian) store(dataOffset, value); + else store(dataOffset, bswap(reinterpret(value))); } setInt8(byteOffset: i32, value: i8): void { - checkOffset(byteOffset, 1, this.byteLength); - store(changetype(this.buffer) + this.byteOffset + byteOffset, value, HEADER_SIZE); + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset >= this.dataEnd) throw new Error("Offset out of bounds"); + store(dataOffset, value); } setInt16(byteOffset: i32, value: i16, littleEndian: boolean = false): void { - checkOffset(byteOffset, 2, this.byteLength); - store( - changetype(this.buffer) + this.byteOffset + byteOffset, - littleEndian ? value : bswap(value), - HEADER_SIZE - ); + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset + 2 > this.dataEnd) throw new Error("Offset out of bounds"); + store(dataOffset, littleEndian ? value : bswap(value)); } setInt32(byteOffset: i32, value: i32, littleEndian: boolean = false): void { - checkOffset(byteOffset, 4, this.byteLength); - store( - changetype(this.buffer) + this.byteOffset + byteOffset, - littleEndian ? value : bswap(value), - HEADER_SIZE - ); + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset + 4 > this.dataEnd) throw new Error("Offset out of bounds"); + store(dataOffset, littleEndian ? value : bswap(value)); } setUint8(byteOffset: i32, value: u8): void { - checkOffset(byteOffset, 1, this.byteLength); - store(changetype(this.buffer) + this.byteOffset + byteOffset, value, HEADER_SIZE); + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset >= this.dataEnd) throw new Error("Offset out of bounds"); + store(dataOffset, value); } setUint16(byteOffset: i32, value: u16, littleEndian: boolean = false): void { - checkOffset(byteOffset, 2, this.byteLength); - store( - changetype(this.buffer) + this.byteOffset + byteOffset, - littleEndian ? value : bswap(value), - HEADER_SIZE - ); + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset + 2 > this.dataEnd) throw new Error("Offset out of bounds"); + store(dataOffset, littleEndian ? value : bswap(value)); } setUint32(byteOffset: i32, value: u32, littleEndian: boolean = false): void { - checkOffset(byteOffset, 4, this.byteLength); - store( - changetype(this.buffer) + this.byteOffset + byteOffset, - littleEndian ? value : bswap(value), - HEADER_SIZE - ); + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset + 4 > this.dataEnd) throw new Error("Offset out of bounds"); + store(dataOffset, littleEndian ? value : bswap(value)); } // Non-standard additions that make sense in WebAssembly, but won't work in JS: getInt64(byteOffset: i32, littleEndian: boolean = false): i64 { - checkOffset(byteOffset, 8, this.byteLength); - var result = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset + 8 > this.dataEnd) throw new Error("Offset out of bounds"); + var result: i64 = load(dataOffset); return littleEndian ? result : bswap(result); } getUint64(byteOffset: i32, littleEndian: boolean = false): u64 { - checkOffset(byteOffset, 8, this.byteLength); - var result = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset + 8 > this.dataEnd) throw new Error("Offset out of bounds"); + var result = load(dataOffset); return littleEndian ? result : bswap(result); } setInt64(byteOffset: i32, value: i64, littleEndian: boolean = false): void { - checkOffset(byteOffset, 8, this.byteLength); - store( - changetype(this.buffer) + this.byteOffset + byteOffset, - littleEndian ? value : bswap(value), - HEADER_SIZE - ); + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset + 8 > this.dataEnd) throw new Error("Offset out of bounds"); + store(dataOffset, littleEndian ? value : bswap(value)); } setUint64(byteOffset: i32, value: u64, littleEndian: boolean = false): void { - checkOffset(byteOffset, 8, this.byteLength); - store( - changetype(this.buffer) + this.byteOffset + byteOffset, - littleEndian ? value : bswap(value), - HEADER_SIZE - ); + var dataStart = this.dataStart; + var dataOffset = dataStart + byteOffset; + if (dataOffset + 8 > this.dataEnd) throw new Error("Offset out of bounds"); + store(dataOffset, littleEndian ? value : bswap(value)); } toString(): string { return "[object DataView]"; } } - -@inline function checkOffset(byteOffset: i32, n: i32, byteLength: i32): void { - // n and byteLength must be known to be in bounds - if (byteOffset > MAX_BLENGTH || byteOffset + n > byteLength) throw new Error("Offset out of bounds"); -} From 707f2dae9adc447eba3265f5fa21fb5c4a728a48 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 13 Mar 2019 03:47:35 +0100 Subject: [PATCH 024/119] more --- src/program.ts | 2 +- std/assembly/allocator/arena.ts | 2 +- std/assembly/allocator/tlsf.ts | 6 +-- std/assembly/array.ts | 34 +++-------------- std/assembly/arraybuffer.ts | 24 +----------- std/assembly/map.ts | 68 +++++++++++++++------------------ std/assembly/number.ts | 50 ++++++++---------------- std/assembly/set.ts | 60 +++++++++++++---------------- 8 files changed, 82 insertions(+), 164 deletions(-) diff --git a/src/program.ts b/src/program.ts index 0d610f8b8c..7cf086dd14 100644 --- a/src/program.ts +++ b/src/program.ts @@ -1330,7 +1330,7 @@ export class Program extends DiagnosticEmitter { property, declaration, this.checkDecorators(declaration.decorators, - DecoratorFlags.INLINE + DecoratorFlags.INLINE | DecoratorFlags.UNSAFE ) ); if (isGetter) { diff --git a/std/assembly/allocator/arena.ts b/std/assembly/allocator/arena.ts index 7a5b036471..dfe694d7bd 100644 --- a/std/assembly/allocator/arena.ts +++ b/std/assembly/allocator/arena.ts @@ -7,7 +7,7 @@ * @module std/assembly/allocator/arena *//***/ -import { AL_MASK, MAX_SIZE_32 } from "../internal/allocator"; +import { AL_MASK, MAX_SIZE_32 } from "../util/allocator"; var startOffset: usize = (HEAP_BASE + AL_MASK) & ~AL_MASK; var offset: usize = startOffset; diff --git a/std/assembly/allocator/tlsf.ts b/std/assembly/allocator/tlsf.ts index ad625041dd..4d2b9faf79 100644 --- a/std/assembly/allocator/tlsf.ts +++ b/std/assembly/allocator/tlsf.ts @@ -15,11 +15,7 @@ // └───────────────────────────────────────────────┴─────────╨─────┘ // FL: first level, SL: second level, AL: alignment, SB: small block -import { - AL_BITS, - AL_SIZE, - AL_MASK -} from "../internal/allocator"; +import { AL_BITS, AL_SIZE, AL_MASK } from "../util/allocator"; const SL_BITS: u32 = 5; const SL_SIZE: usize = 1 << SL_BITS; diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 22f9d23656..a21008584e 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -1,32 +1,8 @@ -import { - ALLOC, - REALLOC, - REGISTER, - LINK, - ArrayBufferView, - FREE -} from "./runtime"; - -import { - ArrayBuffer -} from "./arraybuffer"; - -import { - COMPARATOR, - SORT -} from "./util/sort"; - -import { - itoa, - dtoa, - itoa_stream, - dtoa_stream, - MAX_DOUBLE_LENGTH -} from "./util/number"; - -import { - isArray as builtin_isArray -} from "./builtins"; +import { ALLOC, REALLOC, REGISTER, LINK, FREE, ArrayBufferView } from "./runtime"; +import { ArrayBuffer } from "./arraybuffer"; +import { COMPARATOR, SORT } from "./util/sort"; +import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number"; +import { isArray as builtin_isArray } from "./builtins"; export class Array extends ArrayBufferView { private length_: i32; diff --git a/std/assembly/arraybuffer.ts b/std/assembly/arraybuffer.ts index 1d274aa964..2baa2bf357 100644 --- a/std/assembly/arraybuffer.ts +++ b/std/assembly/arraybuffer.ts @@ -1,26 +1,4 @@ -import { - ALLOC_RAW, - REGISTER, - ArrayBufferBase -} from "./runtime"; - -import { - Int8Array, - Uint8Array, - Uint8ClampedArray, - Int16Array, - Uint16Array, - Int32Array, - Uint32Array, - Int64Array, - Uint64Array, - Float32Array, - Float64Array -} from "./typedarray"; - -import { - DataView -} from "./dataview"; +import { ALLOC_RAW, REGISTER, ArrayBufferBase } from "./runtime"; @sealed export class ArrayBuffer extends ArrayBufferBase { diff --git a/std/assembly/map.ts b/std/assembly/map.ts index 076962bf0c..7c549124fb 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -1,10 +1,5 @@ -import { - HEADER_SIZE as HEADER_SIZE_AB -} from "./internal/arraybuffer"; - -import { - HASH -} from "./internal/hash"; +import { LINK } from "./runtime"; +import { HASH } from "./util/hash"; // A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht @@ -69,8 +64,7 @@ export class Map { private find(key: K, hashCode: u32): MapEntry | null { var entry = load>( - changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE, - HEADER_SIZE_AB + changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE ); while (entry) { if (!(entry.taggedNext & EMPTY) && entry.key == key) return entry; @@ -105,17 +99,17 @@ export class Map { // append new entry let entries = this.entries; entry = changetype>( - changetype(entries) + HEADER_SIZE_AB + this.entriesOffset++ * ENTRY_SIZE() + changetype(entries) + this.entriesOffset++ * ENTRY_SIZE() ); entry.key = key; entry.value = value; ++this.entriesCount; // link with previous entry in bucket let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE; - entry.taggedNext = load(bucketPtrBase, HEADER_SIZE_AB); - store(bucketPtrBase, changetype(entry), HEADER_SIZE_AB); - if (isManaged()) __gc_link(changetype(this), changetype(key)); // tslint:disable-line - if (isManaged()) __gc_link(changetype(this), changetype(value)); // tslint:disable-line + entry.taggedNext = load(bucketPtrBase); + store(bucketPtrBase, changetype(entry)); + if (isManaged()) LINK(changetype(key), changetype(this)); + if (isManaged()) LINK(changetype(value), changetype(this)); } } @@ -140,9 +134,9 @@ export class Map { var newEntries = new ArrayBuffer(newEntriesCapacity * ENTRY_SIZE(), true); // copy old entries to new entries - var oldPtr = changetype(this.entries) + HEADER_SIZE_AB; + var oldPtr = changetype(this.entries); var oldEnd = oldPtr + this.entriesOffset * ENTRY_SIZE(); - var newPtr = changetype(newEntries) + HEADER_SIZE_AB; + var newPtr = changetype(newEntries); while (oldPtr != oldEnd) { let oldEntry = changetype>(oldPtr); if (!(oldEntry.taggedNext & EMPTY)) { @@ -151,8 +145,8 @@ export class Map { newEntry.value = oldEntry.value; let newBucketIndex = HASH(oldEntry.key) & newBucketsMask; let newBucketPtrBase = changetype(newBuckets) + newBucketIndex * BUCKET_SIZE; - newEntry.taggedNext = load(newBucketPtrBase, HEADER_SIZE_AB); - store(newBucketPtrBase, newPtr, HEADER_SIZE_AB); + newEntry.taggedNext = load(newBucketPtrBase); + store(newBucketPtrBase, newPtr); newPtr += ENTRY_SIZE(); } oldPtr += ENTRY_SIZE(); @@ -169,23 +163,23 @@ export class Map { return "[object Map]"; } - private __gc(): void { - __gc_mark(changetype(this.buckets)); // tslint:disable-line - var entries = this.entries; - __gc_mark(changetype(entries)); // tslint:disable-line - if (isManaged() || isManaged()) { - let offset: usize = 0; - let end: usize = this.entriesOffset * ENTRY_SIZE(); - while (offset < end) { - let entry = changetype>( - changetype(entries) + HEADER_SIZE_AB + offset * ENTRY_SIZE() - ); - if (!(entry.taggedNext & EMPTY)) { - if (isManaged()) __gc_mark(changetype(entry.key)); // tslint:disable-line - if (isManaged()) __gc_mark(changetype(entry.value)); // tslint:disable-line - } - offset += ENTRY_SIZE(); - } - } - } + // private __gc(): void { + // __gc_mark(changetype(this.buckets)); // tslint:disable-line + // var entries = this.entries; + // __gc_mark(changetype(entries)); // tslint:disable-line + // if (isManaged() || isManaged()) { + // let offset: usize = 0; + // let end: usize = this.entriesOffset * ENTRY_SIZE(); + // while (offset < end) { + // let entry = changetype>( + // changetype(entries) + HEADER_SIZE_AB + offset * ENTRY_SIZE() + // ); + // if (!(entry.taggedNext & EMPTY)) { + // if (isManaged()) __gc_mark(changetype(entry.key)); // tslint:disable-line + // if (isManaged()) __gc_mark(changetype(entry.value)); // tslint:disable-line + // } + // offset += ENTRY_SIZE(); + // } + // } + // } } diff --git a/std/assembly/number.ts b/std/assembly/number.ts index 20288e1913..e562b58aeb 100644 --- a/std/assembly/number.ts +++ b/std/assembly/number.ts @@ -1,15 +1,7 @@ -import { - itoa, - dtoa -} from "./internal/number"; +import { itoa, dtoa } from "./util/number"; +import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins"; -import { - isNaN as builtin_isNaN, - isFinite as builtin_isFinite -} from "./builtins"; - -@sealed -export abstract class I8 { +@sealed export abstract class I8 { @lazy static readonly MIN_VALUE: i8 = i8.MIN_VALUE; @lazy static readonly MAX_VALUE: i8 = i8.MAX_VALUE; @@ -24,8 +16,7 @@ export abstract class I8 { } } -@sealed -export abstract class I16 { +@sealed export abstract class I16 { @lazy static readonly MIN_VALUE: i16 = i16.MIN_VALUE; @lazy static readonly MAX_VALUE: i16 = i16.MAX_VALUE; @@ -40,8 +31,7 @@ export abstract class I16 { } } -@sealed -export abstract class I32 { +@sealed export abstract class I32 { @lazy static readonly MIN_VALUE: i32 = i32.MIN_VALUE; @lazy static readonly MAX_VALUE: i32 = i32.MAX_VALUE; @@ -56,8 +46,7 @@ export abstract class I32 { } } -@sealed -export abstract class I64 { +@sealed export abstract class I64 { @lazy static readonly MIN_VALUE: i64 = i64.MIN_VALUE; @lazy static readonly MAX_VALUE: i64 = i64.MAX_VALUE; @@ -72,8 +61,7 @@ export abstract class I64 { } } -@sealed -export abstract class Isize { +@sealed export abstract class Isize { @lazy static readonly MIN_VALUE: isize = isize.MIN_VALUE; @lazy static readonly MAX_VALUE: isize = isize.MAX_VALUE; @@ -88,8 +76,7 @@ export abstract class Isize { } } -@sealed -export abstract class U8 { +@sealed export abstract class U8 { @lazy static readonly MIN_VALUE: u8 = u8.MIN_VALUE; @lazy static readonly MAX_VALUE: u8 = u8.MAX_VALUE; @@ -104,8 +91,7 @@ export abstract class U8 { } } -@sealed -export abstract class U16 { +@sealed export abstract class U16 { @lazy static readonly MIN_VALUE: u16 = u16.MIN_VALUE; @lazy static readonly MAX_VALUE: u16 = u16.MAX_VALUE; @@ -120,8 +106,7 @@ export abstract class U16 { } } -@sealed -export abstract class U32 { +@sealed export abstract class U32 { @lazy static readonly MIN_VALUE: u32 = u32.MIN_VALUE; @lazy static readonly MAX_VALUE: u32 = u32.MAX_VALUE; @@ -136,8 +121,7 @@ export abstract class U32 { } } -@sealed -export abstract class U64 { +@sealed export abstract class U64 { @lazy static readonly MIN_VALUE: u64 = u64.MIN_VALUE; @lazy static readonly MAX_VALUE: u64 = u64.MAX_VALUE; @@ -152,8 +136,7 @@ export abstract class U64 { } } -@sealed -export abstract class Usize { +@sealed export abstract class Usize { @lazy static readonly MIN_VALUE: usize = usize.MIN_VALUE; @lazy static readonly MAX_VALUE: usize = usize.MAX_VALUE; @@ -168,8 +151,7 @@ export abstract class Usize { } } -@sealed -export abstract class Bool { +@sealed export abstract class Bool { @lazy static readonly MIN_VALUE: bool = bool.MIN_VALUE; @lazy static readonly MAX_VALUE: bool = bool.MAX_VALUE; @@ -182,8 +164,7 @@ export abstract class Bool { export { Bool as Boolean }; -@sealed -export abstract class F32 { +@sealed export abstract class F32 { @lazy static readonly EPSILON: f32 = f32.EPSILON; @lazy static readonly MIN_VALUE: f32 = f32.MIN_VALUE; @@ -224,8 +205,7 @@ export abstract class F32 { } } -@sealed -export abstract class F64 { +@sealed export abstract class F64 { @lazy static readonly EPSILON: f64 = f64.EPSILON; @lazy static readonly MIN_VALUE: f64 = f64.MIN_VALUE; diff --git a/std/assembly/set.ts b/std/assembly/set.ts index e7f527ef4f..09e5da5f31 100644 --- a/std/assembly/set.ts +++ b/std/assembly/set.ts @@ -1,10 +1,5 @@ -import { - HEADER_SIZE as HEADER_SIZE_AB -} from "./internal/arraybuffer"; - -import { - HASH -} from "./internal/hash"; +import { LINK } from "./runtime"; +import { HASH } from "./util/hash"; // A deterministic hash set based on CloseTable from https://github.com/jorendorff/dht @@ -67,8 +62,7 @@ export class Set { private find(key: K, hashCode: u32): SetEntry | null { var entry = load>( - changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE, - HEADER_SIZE_AB + changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE ); while (entry) { if (!(entry.taggedNext & EMPTY) && entry.key == key) return entry; @@ -96,15 +90,15 @@ export class Set { // append new entry let entries = this.entries; entry = changetype>( - changetype(entries) + HEADER_SIZE_AB + this.entriesOffset++ * ENTRY_SIZE() + changetype(entries) + this.entriesOffset++ * ENTRY_SIZE() ); entry.key = key; ++this.entriesCount; // link with previous entry in bucket let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE; - entry.taggedNext = load(bucketPtrBase, HEADER_SIZE_AB); - store(bucketPtrBase, changetype(entry), HEADER_SIZE_AB); - if (isManaged()) __gc_link(changetype(this), changetype(key)); // tslint:disable-line + entry.taggedNext = load(bucketPtrBase); + store(bucketPtrBase, changetype(entry)); + if (isManaged()) LINK(changetype(key), changetype(this)); // tslint:disable-line } } @@ -129,9 +123,9 @@ export class Set { var newEntries = new ArrayBuffer(newEntriesCapacity * ENTRY_SIZE(), true); // copy old entries to new entries - var oldPtr = changetype(this.entries) + HEADER_SIZE_AB; + var oldPtr = changetype(this.entries); var oldEnd = oldPtr + this.entriesOffset * ENTRY_SIZE(); - var newPtr = changetype(newEntries) + HEADER_SIZE_AB; + var newPtr = changetype(newEntries); while (oldPtr != oldEnd) { let oldEntry = changetype>(oldPtr); if (!(oldEntry.taggedNext & EMPTY)) { @@ -139,8 +133,8 @@ export class Set { newEntry.key = oldEntry.key; let newBucketIndex = HASH(oldEntry.key) & newBucketsMask; let newBucketPtrBase = changetype(newBuckets) + newBucketIndex * BUCKET_SIZE; - newEntry.taggedNext = load(newBucketPtrBase, HEADER_SIZE_AB); - store(newBucketPtrBase, newPtr, HEADER_SIZE_AB); + newEntry.taggedNext = load(newBucketPtrBase); + store(newBucketPtrBase, newPtr); newPtr += ENTRY_SIZE(); } oldPtr += ENTRY_SIZE(); @@ -157,20 +151,20 @@ export class Set { return "[object Set]"; } - private __gc(): void { - __gc_mark(changetype(this.buckets)); // tslint:disable-line - var entries = this.entries; - __gc_mark(changetype(entries)); // tslint:disable-line - if (isManaged()) { - let offset: usize = 0; - let end: usize = this.entriesOffset * ENTRY_SIZE(); - while (offset < end) { - let entry = changetype>( - changetype(entries) + HEADER_SIZE_AB + offset * ENTRY_SIZE() - ); - if (!(entry.taggedNext & EMPTY)) __gc_mark(changetype(entry.key)); // tslint:disable-line - offset += ENTRY_SIZE(); - } - } - } + // private __gc(): void { + // __gc_mark(changetype(this.buckets)); // tslint:disable-line + // var entries = this.entries; + // __gc_mark(changetype(entries)); // tslint:disable-line + // if (isManaged()) { + // let offset: usize = 0; + // let end: usize = this.entriesOffset * ENTRY_SIZE(); + // while (offset < end) { + // let entry = changetype>( + // changetype(entries) + HEADER_SIZE_AB + offset * ENTRY_SIZE() + // ); + // if (!(entry.taggedNext & EMPTY)) __gc_mark(changetype(entry.key)); // tslint:disable-line + // offset += ENTRY_SIZE(); + // } + // } + // } } From e581f254d04ca9c71f7af66ee202bef408c8255c Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 13 Mar 2019 03:48:58 +0100 Subject: [PATCH 025/119] fix --- std/assembly/util/sort.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/std/assembly/util/sort.ts b/std/assembly/util/sort.ts index db9e30481a..40690d200c 100644 --- a/std/assembly/util/sort.ts +++ b/std/assembly/util/sort.ts @@ -1,3 +1,5 @@ +import { compareImpl } from "./string"; + @inline export function COMPARATOR(): (a: T, b: T) => i32 { if (isInteger()) { if (isSigned() && sizeof() <= 4) { @@ -31,7 +33,7 @@ if (!alen && !blen) return 0; if (!alen) return -1; if (!blen) return 1; - return String.cmp(a, 0, b, 0, min(alen, blen)); + return compareImpl(a, 0, b, 0, min(alen, blen)); }; } else { return (a: T, b: T): i32 => ((a > b) - (a < b)); From 6f70826e456ba4aa5fc059f04b6029dace777db5 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 13 Mar 2019 09:05:02 +0100 Subject: [PATCH 026/119] hmm --- src/builtins.ts | 45 +++++-- src/compiler.ts | 91 +++++++------- src/program.ts | 5 +- std/assembly/array.ts | 21 ++-- std/assembly/typedarray.ts | 4 +- std/assembly/util/memory.ts | 3 - std/assembly/util/number.ts | 11 +- tests/compiler/std/runtime.optimized.wat | 141 +++++++++++---------- tests/compiler/std/runtime.ts | 2 + tests/compiler/std/runtime.untouched.wat | 153 ++++++++++++----------- tests/compiler/std/string.ts | 2 +- 11 files changed, 251 insertions(+), 227 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index 5c282c295b..39e7be83e4 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -4098,9 +4098,8 @@ export function compileIterateRoots(compiler: Compiler): void { ); } -function typedArraySymbolToType(symbol: string): Type { +function typedArraySymbolToType(symbol: string): Type | null { switch (symbol) { - default: assert(false); case BuiltinSymbols.Int8Array: return Type.i8; case BuiltinSymbols.Uint8ClampedArray: case BuiltinSymbols.Uint8Array: return Type.u8; @@ -4113,9 +4112,10 @@ function typedArraySymbolToType(symbol: string): Type { case BuiltinSymbols.Float32Array: return Type.f32; case BuiltinSymbols.Float64Array: return Type.f64; } + return null; } -export function compileTypedArrayGet( +export function compileArrayGet( compiler: Compiler, target: Class, thisExpression: Expression, @@ -4123,6 +4123,20 @@ export function compileTypedArrayGet( contextualType: Type ): ExpressionRef { var type = typedArraySymbolToType(target.internalName); + if (type) return compileTypedArrayGet(compiler, target, type, thisExpression, elementExpression, contextualType); + assert(target.prototype == compiler.program.arrayPrototype); + type = assert(target.typeArguments)[0]; + throw new Error("not implemented"); +} + +function compileTypedArrayGet( + compiler: Compiler, + target: Class, + type: Type, + thisExpression: Expression, + elementExpression: Expression, + contextualType: Type +): ExpressionRef { var module = compiler.module; var outType = ( type.is(TypeFlags.INTEGER) && @@ -4130,8 +4144,6 @@ export function compileTypedArrayGet( contextualType.size > type.size ) ? contextualType : type; - var bufferField = assert(target.lookupInSelf("buffer")); - assert(bufferField.kind == ElementKind.FIELD); var dataStart = assert(target.lookupInSelf("dataStart")); assert(dataStart.kind == ElementKind.FIELD); var dataEnd = assert(target.lookupInSelf("dataEnd")); @@ -4198,9 +4210,28 @@ export function compileTypedArrayGet( ); } -export function compileTypedArraySet( +export function compileArraySet( + compiler: Compiler, + target: Class, + thisExpression: Expression, + elementExpression: Expression, + valueExpression: Expression, + contextualType: Type +): ExpressionRef { + var type = typedArraySymbolToType(target.internalName); + if (type) { + return compileTypedArraySet(compiler, target, type, thisExpression, + elementExpression, valueExpression, contextualType); + } + assert(target.prototype == compiler.program.arrayPrototype); + type = assert(target.typeArguments)[0]; + throw new Error("not implemented"); +} + +function compileTypedArraySet( compiler: Compiler, target: Class, + type: Type, thisExpression: Expression, elementExpression: Expression, valueExpression: Expression, @@ -4209,8 +4240,6 @@ export function compileTypedArraySet( var type = typedArraySymbolToType(target.internalName); var module = compiler.module; - var bufferField = assert(target.lookupInSelf("buffer")); - assert(bufferField.kind == ElementKind.FIELD); var dataStart = assert(target.lookupInSelf("dataStart")); assert(dataStart.kind == ElementKind.FIELD); var dataEnd = assert(target.lookupInSelf("dataEnd")); diff --git a/src/compiler.ts b/src/compiler.ts index 81209c8d2c..a840fc0abc 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -9,8 +9,8 @@ import { compileIterateRoots, ensureGCHook, BuiltinSymbols, - compileTypedArrayGet, - compileTypedArraySet + compileArrayGet, + compileArraySet } from "./builtins"; import { @@ -4687,22 +4687,22 @@ export class Compiler extends DiagnosticEmitter { case ElementKind.CLASS: { let elementExpression = resolver.currentElementExpression; if (elementExpression) { // indexed access - let arrayBufferView = this.program.arrayBufferView; - if (arrayBufferView) { - if ((target).prototype.extends(arrayBufferView.prototype)) { - return compileTypedArraySet( - this, - target, - assert(this.resolver.currentThisExpression), - elementExpression, - valueExpression, - contextualType - ); - } - } let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); let indexedSet = (target).lookupOverload(OperatorKind.INDEXED_SET, isUnchecked); if (!indexedSet) { + let arrayBufferView = this.program.arrayBufferView; + if (arrayBufferView) { + if ((target).prototype.extends(arrayBufferView.prototype)) { + return compileArraySet( + this, + target, + assert(this.resolver.currentThisExpression), + elementExpression, + valueExpression, + contextualType + ); + } + } let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); if (!indexedGet) { this.error( @@ -4718,7 +4718,7 @@ export class Compiler extends DiagnosticEmitter { return this.module.createUnreachable(); } assert(indexedSet.signature.parameterTypes.length == 2); // parser must guarantee this - targetType = indexedSet.signature.parameterTypes[1]; // 2nd parameter is the element + targetType = indexedSet.signature.parameterTypes[1]; // 2nd parameter is the element break; } // fall-through @@ -5749,26 +5749,31 @@ export class Compiler extends DiagnosticEmitter { let allOptionalsAreConstant = true; for (let i = numArguments; i < maxArguments; ++i) { let initializer = parameterNodes[i].initializer; - if (!(initializer && nodeIsConstantValue(initializer.kind))) { - allOptionalsAreConstant = false; - break; - } - } - if (allOptionalsAreConstant) { // inline into the call - for (let i = numArguments; i < maxArguments; ++i) { - operands.push( - this.compileExpression( + if (initializer) { + let resolved: Element | null; + if ( + nodeIsConstantValue(initializer.kind) || + ( + (resolved = this.resolver.resolveExpression(initializer, instance.flow, parameterTypes[i])) && + ( + resolved.kind == ElementKind.GLOBAL + // resolved.kind == ElementKind.FUNCTION_TARGET + ) + ) + ) { // inline into the call + operands.push(this.compileExpression( parameterNodes[i].initializer, parameterTypes[i], ConversionKind.IMPLICIT, WrapMode.NONE - ) - ); - } - } else { // otherwise fill up with zeroes and call the trampoline - for (let i = numArguments; i < maxArguments; ++i) { - operands.push(parameterTypes[i].toNativeZero(module)); + )); + continue; + } } + operands.push(parameterTypes[i].toNativeZero(module)); + allOptionalsAreConstant = false; + } + if (!allOptionalsAreConstant) { if (!isCallImport) { let original = instance; instance = this.ensureTrampoline(instance); @@ -5902,21 +5907,21 @@ export class Compiler extends DiagnosticEmitter { if (!target) return this.module.createUnreachable(); switch (target.kind) { case ElementKind.CLASS: { - let arrayBufferView = this.program.arrayBufferView; - if (arrayBufferView) { - if ((target).prototype.extends(arrayBufferView.prototype)) { - return compileTypedArrayGet( - this, - target, - expression.expression, - expression.elementExpression, - contextualType - ); - } - } let isUnchecked = this.currentFlow.is(FlowFlags.UNCHECKED_CONTEXT); let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); if (!indexedGet) { + let arrayBufferView = this.program.arrayBufferView; + if (arrayBufferView) { + if ((target).prototype.extends(arrayBufferView.prototype)) { + return compileArrayGet( + this, + target, + expression.expression, + expression.elementExpression, + contextualType + ); + } + } this.error( DiagnosticCode.Index_signature_is_missing_in_type_0, expression.expression.range, (target).internalName diff --git a/src/program.ts b/src/program.ts index 7cf086dd14..81f83c6fdb 100644 --- a/src/program.ts +++ b/src/program.ts @@ -632,11 +632,10 @@ export class Program extends DiagnosticEmitter { true // isImport ); } else { + // FIXME: file not found is not reported if this happens? this.error( DiagnosticCode.Module_0_has_no_exported_member_1, - foreignIdentifier.range, - queuedImport.foreignPath, - foreignIdentifier.text + foreignIdentifier.range, queuedImport.foreignPath, foreignIdentifier.text ); } } else { // i.e. import * as bar from "./bar" diff --git a/std/assembly/array.ts b/std/assembly/array.ts index a21008584e..749bcdaaf2 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -72,20 +72,13 @@ export class Array extends ArrayBufferView { // return LOAD(this.buffer_, index); // } - // @operator("[]=") - // private __set(index: i32, value: T): void { - // var buffer = this.buffer_; - // var capacity = buffer.byteLength >>> alignof(); - // if (index >= capacity) { - // const MAX_LENGTH = MAX_BLENGTH >>> alignof(); - // if (index >= MAX_LENGTH) throw new Error("Invalid array length"); - // buffer = reallocateUnsafe(buffer, (index + 1) << alignof()); - // this.buffer_ = buffer; - // this.length_ = index + 1; - // } - // STORE(buffer, index, value); - // if (isManaged()) __gc_link(changetype(this), changetype(value)); // tslint:disable-line - // } + @operator("[]=") + private __set(index: i32, value: T): void { + this.resize(index + 1); + store(this.dataStart + (index << alignof()), value); + if (isManaged()) LINK(changetype(value), changetype(this)); + if (index >= this.length_) this.length_ = index + 1; + } // @operator("{}=") // private __unchecked_set(index: i32, value: T): void { diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index 488bbe80b5..e8720c6c4a 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -714,7 +714,7 @@ export class Float64Array extends ArrayBufferView { begin: i32, end: i32 ): TArray { - var buffer = changetype(array.buffer); + var buffer = array.data; var length = array.length; if (begin < 0) begin = max(length + begin, 0); else begin = min(begin, length); @@ -724,7 +724,7 @@ export class Float64Array extends ArrayBufferView { store(out, buffer, offsetof("buffer")); store(out, array.dataStart + (begin << alignof()) , offsetof("dataStart")); store(out, array.dataEnd + ((end - begin) << alignof()), offsetof("dataEnd")); - LINK(buffer, REGISTER(out)); // register first, then link + LINK(buffer, REGISTER(out)); // register first, then link return changetype(out); } diff --git a/std/assembly/util/memory.ts b/std/assembly/util/memory.ts index ea240fb80f..d48ec44fe8 100644 --- a/std/assembly/util/memory.ts +++ b/std/assembly/util/memory.ts @@ -1,4 +1,3 @@ -// this function will go away once `memory.copy` becomes an intrinsic export function memcpy(dest: usize, src: usize, n: usize): void { // see: musl/src/string/memcpy.c var w: u32, x: u32; @@ -142,7 +141,6 @@ export function memcpy(dest: usize, src: usize, n: usize): void { // see: musl/s } } -// this function will go away once `memory.copy` becomes an intrinsic export function memmove(dest: usize, src: usize, n: usize): void { // see: musl/src/string/memmove.c if (dest === src) return; if (src + n <= dest || dest + n <= src) { @@ -184,7 +182,6 @@ export function memmove(dest: usize, src: usize, n: usize): void { // see: musl/ } } -// this function will go away once `memory.fill` becomes an intrinsic export function memset(dest: usize, c: u8, n: usize): void { // see: musl/src/string/memset // fill head and tail with minimal branching diff --git a/std/assembly/util/number.ts b/std/assembly/util/number.ts index 01dff985d5..970fe78534 100644 --- a/std/assembly/util/number.ts +++ b/std/assembly/util/number.ts @@ -1,12 +1,5 @@ -import { - CharCode -} from "./string"; - -import { - ALLOC, - REGISTER, - FREE -} from "../runtime"; +import { ALLOC, REGISTER, FREE } from "../runtime"; +import { CharCode } from "./string"; @inline export const MAX_DOUBLE_LENGTH = 28; diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index edf175735a..9607eba6f9 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -18,7 +18,7 @@ (data (i32.const 152) "\01\00\00\00\10\00\00\00b\00a\00r\00r\00i\00e\00r\003") (data (i32.const 176) "\01\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) - (elem (i32.const 0) $~lib/runtime/gc.collect) + (elem (i32.const 0) $std/runtime/gc.collect) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $std/runtime/register_ref (mut i32) (i32.const 0)) (global $std/runtime/barrier1 (mut i32) (i32.const 0)) @@ -36,7 +36,7 @@ (export "table" (table $0)) (export "gc.register" (func $std/runtime/gc.register)) (export "gc.link" (func $std/runtime/gc.link)) - (export "gc.collect" (func $~lib/runtime/gc.collect)) + (export "gc.collect" (func $std/runtime/gc.collect)) (start $start) (func $~lib/allocator/tlsf/Root#setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 @@ -45,7 +45,7 @@ if i32.const 0 i32.const 16 - i32.const 144 + i32.const 140 i32.const 4 call $~lib/env/abort unreachable @@ -65,7 +65,7 @@ if i32.const 0 i32.const 16 - i32.const 167 + i32.const 163 i32.const 4 call $~lib/env/abort unreachable @@ -76,7 +76,7 @@ if i32.const 0 i32.const 16 - i32.const 168 + i32.const 164 i32.const 4 call $~lib/env/abort unreachable @@ -102,7 +102,7 @@ if i32.const 0 i32.const 16 - i32.const 89 + i32.const 85 i32.const 4 call $~lib/env/abort unreachable @@ -120,7 +120,7 @@ if i32.const 0 i32.const 16 - i32.const 90 + i32.const 86 i32.const 11 call $~lib/env/abort unreachable @@ -133,7 +133,7 @@ if i32.const 0 i32.const 16 - i32.const 428 + i32.const 424 i32.const 2 call $~lib/env/abort unreachable @@ -150,7 +150,7 @@ if i32.const 0 i32.const 16 - i32.const 158 + i32.const 154 i32.const 4 call $~lib/env/abort unreachable @@ -161,7 +161,7 @@ if i32.const 0 i32.const 16 - i32.const 159 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -184,7 +184,7 @@ if i32.const 0 i32.const 16 - i32.const 138 + i32.const 134 i32.const 4 call $~lib/env/abort unreachable @@ -210,7 +210,7 @@ if i32.const 0 i32.const 16 - i32.const 258 + i32.const 254 i32.const 4 call $~lib/env/abort unreachable @@ -233,7 +233,7 @@ if i32.const 0 i32.const 16 - i32.const 260 + i32.const 256 i32.const 4 call $~lib/env/abort unreachable @@ -334,7 +334,7 @@ if i32.const 0 i32.const 16 - i32.const 81 + i32.const 77 i32.const 4 call $~lib/env/abort unreachable @@ -348,7 +348,7 @@ if i32.const 0 i32.const 16 - i32.const 82 + i32.const 78 i32.const 11 call $~lib/env/abort unreachable @@ -364,7 +364,7 @@ if i32.const 0 i32.const 16 - i32.const 334 + i32.const 330 i32.const 4 call $~lib/env/abort unreachable @@ -376,7 +376,7 @@ if i32.const 0 i32.const 16 - i32.const 335 + i32.const 331 i32.const 4 call $~lib/env/abort unreachable @@ -389,7 +389,7 @@ if i32.const 0 i32.const 16 - i32.const 336 + i32.const 332 i32.const 4 call $~lib/env/abort unreachable @@ -411,7 +411,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 185 i32.const 4 call $~lib/env/abort unreachable @@ -425,7 +425,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 187 i32.const 4 call $~lib/env/abort unreachable @@ -449,7 +449,7 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 189 i32.const 4 call $~lib/env/abort unreachable @@ -461,7 +461,7 @@ if i32.const 0 i32.const 16 - i32.const 197 + i32.const 193 i32.const 23 call $~lib/env/abort unreachable @@ -503,7 +503,7 @@ if i32.const 0 i32.const 16 - i32.const 211 + i32.const 207 i32.const 24 call $~lib/env/abort unreachable @@ -517,7 +517,7 @@ if i32.const 0 i32.const 16 - i32.const 213 + i32.const 209 i32.const 6 call $~lib/env/abort unreachable @@ -566,7 +566,7 @@ if i32.const 0 i32.const 16 - i32.const 226 + i32.const 222 i32.const 4 call $~lib/env/abort unreachable @@ -645,7 +645,7 @@ if i32.const 0 i32.const 16 - i32.const 377 + i32.const 373 i32.const 4 call $~lib/env/abort unreachable @@ -656,7 +656,7 @@ if i32.const 0 i32.const 16 - i32.const 378 + i32.const 374 i32.const 4 call $~lib/env/abort unreachable @@ -667,7 +667,7 @@ if i32.const 0 i32.const 16 - i32.const 379 + i32.const 375 i32.const 4 call $~lib/env/abort unreachable @@ -684,7 +684,7 @@ if i32.const 0 i32.const 16 - i32.const 384 + i32.const 380 i32.const 6 call $~lib/env/abort unreachable @@ -712,7 +712,7 @@ if i32.const 0 i32.const 16 - i32.const 393 + i32.const 389 i32.const 6 call $~lib/env/abort unreachable @@ -765,7 +765,7 @@ if i32.const 0 i32.const 16 - i32.const 422 + i32.const 418 i32.const 2 call $~lib/env/abort unreachable @@ -790,7 +790,7 @@ if i32.const 0 i32.const 16 - i32.const 296 + i32.const 292 i32.const 4 call $~lib/env/abort unreachable @@ -870,7 +870,7 @@ if i32.const 0 i32.const 16 - i32.const 323 + i32.const 319 i32.const 16 call $~lib/env/abort unreachable @@ -898,7 +898,7 @@ if i32.const 0 i32.const 16 - i32.const 348 + i32.const 344 i32.const 4 call $~lib/env/abort unreachable @@ -918,7 +918,7 @@ if i32.const 0 i32.const 16 - i32.const 349 + i32.const 345 i32.const 4 call $~lib/env/abort unreachable @@ -929,7 +929,7 @@ if i32.const 0 i32.const 16 - i32.const 350 + i32.const 346 i32.const 4 call $~lib/env/abort unreachable @@ -981,7 +981,7 @@ if i32.const 0 i32.const 16 - i32.const 368 + i32.const 364 i32.const 25 call $~lib/env/abort unreachable @@ -1146,7 +1146,7 @@ else i32.const 0 i32.const 16 - i32.const 480 + i32.const 476 i32.const 14 call $~lib/env/abort unreachable @@ -1163,7 +1163,7 @@ if i32.const 0 i32.const 16 - i32.const 483 + i32.const 479 i32.const 4 call $~lib/env/abort unreachable @@ -1200,7 +1200,7 @@ i32.const 16 i32.add ) - (func $~lib/internal/memory/memset (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/util/memory/memset (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 i32.eqz @@ -1425,10 +1425,10 @@ call $~lib/runtime/ALLOC_RAW local.tee $1 local.get $0 - call $~lib/internal/memory/memset + call $~lib/util/memory/memset local.get $1 ) - (func $~lib/internal/memory/memcpy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2325,7 +2325,7 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2354,7 +2354,7 @@ local.get $0 local.get $1 local.get $2 - call $~lib/internal/memory/memcpy + call $~lib/util/memory/memcpy return end local.get $0 @@ -2543,7 +2543,7 @@ if i32.const 0 i32.const 16 - i32.const 494 + i32.const 490 i32.const 8 call $~lib/env/abort unreachable @@ -2561,7 +2561,11 @@ end end ) - (func $~lib/runtime/REALLOC (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/runtime/gc.register (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.set $std/runtime/register_ref + ) + (func $~lib/runtime/REALLOC (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2616,14 +2620,14 @@ local.tee $4 local.get $0 local.get $2 - call $~lib/internal/memory/memmove + call $~lib/util/memory/memmove local.get $2 local.get $4 i32.add local.get $1 local.get $2 i32.sub - call $~lib/internal/memory/memset + call $~lib/util/memory/memset local.get $3 i32.load i32.const -1520547049 @@ -2635,13 +2639,16 @@ if i32.const 0 i32.const 184 - i32.const 88 + i32.const 85 i32.const 8 call $~lib/env/abort unreachable end local.get $3 call $~lib/allocator/tlsf/memory.free + else + local.get $0 + global.set $std/runtime/register_ref end local.get $5 local.set $3 @@ -2654,7 +2661,7 @@ local.get $1 local.get $2 i32.sub - call $~lib/internal/memory/memset + call $~lib/util/memory/memset end end local.get $3 @@ -2662,7 +2669,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/unref (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/unref (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 232 i32.lt_u @@ -2691,10 +2698,6 @@ end local.get $0 ) - (func $std/runtime/gc.register (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.set $std/runtime/register_ref - ) (func $start:std/runtime (; 26 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) @@ -2735,7 +2738,7 @@ else i32.const 0 i32.const 72 - i32.const 36 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -2846,7 +2849,7 @@ if i32.const 0 i32.const 72 - i32.const 51 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable @@ -2858,7 +2861,7 @@ if i32.const 0 i32.const 72 - i32.const 52 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -2872,7 +2875,7 @@ if i32.const 0 i32.const 72 - i32.const 53 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable @@ -2884,7 +2887,7 @@ if i32.const 0 i32.const 72 - i32.const 54 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -2899,7 +2902,7 @@ if i32.const 0 i32.const 72 - i32.const 56 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -2915,7 +2918,7 @@ if i32.const 0 i32.const 72 - i32.const 58 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable @@ -2932,7 +2935,7 @@ if i32.const 0 i32.const 72 - i32.const 61 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -2953,7 +2956,7 @@ if i32.const 0 i32.const 72 - i32.const 65 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -2969,7 +2972,7 @@ if i32.const 0 i32.const 72 - i32.const 67 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable @@ -2981,7 +2984,7 @@ if i32.const 0 i32.const 72 - i32.const 68 + i32.const 70 i32.const 0 call $~lib/env/abort unreachable @@ -2998,7 +3001,7 @@ if i32.const 0 i32.const 72 - i32.const 71 + i32.const 73 i32.const 0 call $~lib/env/abort unreachable @@ -3014,7 +3017,7 @@ if i32.const 0 i32.const 72 - i32.const 72 + i32.const 74 i32.const 0 call $~lib/env/abort unreachable @@ -3023,7 +3026,7 @@ (func $std/runtime/gc.link (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/runtime/gc.collect (; 28 ;) (type $FUNCSIG$v) + (func $std/runtime/gc.collect (; 28 ;) (type $FUNCSIG$v) nop ) (func $start (; 29 ;) (type $FUNCSIG$v) diff --git a/tests/compiler/std/runtime.ts b/tests/compiler/std/runtime.ts index d1fba50a57..6611f2c1ab 100644 --- a/tests/compiler/std/runtime.ts +++ b/tests/compiler/std/runtime.ts @@ -8,6 +8,8 @@ var register_ref: usize = 0; } export function link(ref: usize, parentRef: usize): void { } + export function collect(): void { + } } import { diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 76644b5c64..4b6aa61108 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -53,7 +53,7 @@ (export "table" (table $0)) (export "gc.register" (func $std/runtime/gc.register)) (export "gc.link" (func $std/runtime/gc.link)) - (export "gc.collect" (func $~lib/runtime/gc.collect)) + (export "gc.collect" (func $std/runtime/gc.collect)) (start $start) (func $start:~lib/allocator/tlsf (; 2 ;) (type $FUNCSIG$v) i32.const 1 @@ -65,7 +65,7 @@ if i32.const 0 i32.const 16 - i32.const 122 + i32.const 118 i32.const 0 call $~lib/env/abort unreachable @@ -114,7 +114,7 @@ if i32.const 0 i32.const 16 - i32.const 144 + i32.const 140 i32.const 4 call $~lib/env/abort unreachable @@ -135,7 +135,7 @@ if i32.const 0 i32.const 16 - i32.const 167 + i32.const 163 i32.const 4 call $~lib/env/abort unreachable @@ -147,7 +147,7 @@ if i32.const 0 i32.const 16 - i32.const 168 + i32.const 164 i32.const 4 call $~lib/env/abort unreachable @@ -180,7 +180,7 @@ if i32.const 0 i32.const 16 - i32.const 89 + i32.const 85 i32.const 4 call $~lib/env/abort unreachable @@ -200,7 +200,7 @@ if (result i32) i32.const 0 i32.const 16 - i32.const 90 + i32.const 86 i32.const 11 call $~lib/env/abort unreachable @@ -216,7 +216,7 @@ if i32.const 0 i32.const 16 - i32.const 428 + i32.const 424 i32.const 2 call $~lib/env/abort unreachable @@ -234,7 +234,7 @@ if i32.const 0 i32.const 16 - i32.const 158 + i32.const 154 i32.const 4 call $~lib/env/abort unreachable @@ -246,7 +246,7 @@ if i32.const 0 i32.const 16 - i32.const 159 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -270,7 +270,7 @@ if i32.const 0 i32.const 16 - i32.const 138 + i32.const 134 i32.const 4 call $~lib/env/abort unreachable @@ -300,7 +300,7 @@ if i32.const 0 i32.const 16 - i32.const 258 + i32.const 254 i32.const 4 call $~lib/env/abort unreachable @@ -326,7 +326,7 @@ if i32.const 0 i32.const 16 - i32.const 260 + i32.const 256 i32.const 4 call $~lib/env/abort unreachable @@ -437,7 +437,7 @@ if i32.const 0 i32.const 16 - i32.const 81 + i32.const 77 i32.const 4 call $~lib/env/abort unreachable @@ -451,7 +451,7 @@ if (result i32) i32.const 0 i32.const 16 - i32.const 82 + i32.const 78 i32.const 11 call $~lib/env/abort unreachable @@ -468,7 +468,7 @@ if i32.const 0 i32.const 16 - i32.const 334 + i32.const 330 i32.const 4 call $~lib/env/abort unreachable @@ -481,7 +481,7 @@ if i32.const 0 i32.const 16 - i32.const 335 + i32.const 331 i32.const 4 call $~lib/env/abort unreachable @@ -494,7 +494,7 @@ if i32.const 0 i32.const 16 - i32.const 336 + i32.const 332 i32.const 4 call $~lib/env/abort unreachable @@ -520,7 +520,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 185 i32.const 4 call $~lib/env/abort unreachable @@ -535,7 +535,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 187 i32.const 4 call $~lib/env/abort unreachable @@ -561,7 +561,7 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 189 i32.const 4 call $~lib/env/abort unreachable @@ -573,7 +573,7 @@ if (result i32) i32.const 0 i32.const 16 - i32.const 197 + i32.const 193 i32.const 23 call $~lib/env/abort unreachable @@ -621,7 +621,7 @@ if (result i32) i32.const 0 i32.const 16 - i32.const 211 + i32.const 207 i32.const 24 call $~lib/env/abort unreachable @@ -639,7 +639,7 @@ if i32.const 0 i32.const 16 - i32.const 213 + i32.const 209 i32.const 6 call $~lib/env/abort unreachable @@ -694,7 +694,7 @@ if i32.const 0 i32.const 16 - i32.const 226 + i32.const 222 i32.const 4 call $~lib/env/abort unreachable @@ -785,7 +785,7 @@ if i32.const 0 i32.const 16 - i32.const 377 + i32.const 373 i32.const 4 call $~lib/env/abort unreachable @@ -798,7 +798,7 @@ if i32.const 0 i32.const 16 - i32.const 378 + i32.const 374 i32.const 4 call $~lib/env/abort unreachable @@ -811,7 +811,7 @@ if i32.const 0 i32.const 16 - i32.const 379 + i32.const 375 i32.const 4 call $~lib/env/abort unreachable @@ -832,7 +832,7 @@ if i32.const 0 i32.const 16 - i32.const 384 + i32.const 380 i32.const 6 call $~lib/env/abort unreachable @@ -861,7 +861,7 @@ if i32.const 0 i32.const 16 - i32.const 393 + i32.const 389 i32.const 6 call $~lib/env/abort unreachable @@ -932,7 +932,7 @@ if i32.const 0 i32.const 16 - i32.const 422 + i32.const 418 i32.const 2 call $~lib/env/abort unreachable @@ -948,7 +948,7 @@ if i32.const 0 i32.const 16 - i32.const 422 + i32.const 418 i32.const 2 call $~lib/env/abort unreachable @@ -978,7 +978,7 @@ if i32.const 0 i32.const 16 - i32.const 296 + i32.const 292 i32.const 4 call $~lib/env/abort unreachable @@ -1074,7 +1074,7 @@ else i32.const 0 i32.const 16 - i32.const 323 + i32.const 319 i32.const 16 call $~lib/env/abort unreachable @@ -1111,7 +1111,7 @@ if i32.const 0 i32.const 16 - i32.const 348 + i32.const 344 i32.const 4 call $~lib/env/abort unreachable @@ -1131,7 +1131,7 @@ if i32.const 0 i32.const 16 - i32.const 349 + i32.const 345 i32.const 4 call $~lib/env/abort unreachable @@ -1144,7 +1144,7 @@ if i32.const 0 i32.const 16 - i32.const 350 + i32.const 346 i32.const 4 call $~lib/env/abort unreachable @@ -1204,7 +1204,7 @@ if (result i32) i32.const 0 i32.const 16 - i32.const 368 + i32.const 364 i32.const 25 call $~lib/env/abort unreachable @@ -1430,7 +1430,7 @@ if (result i32) i32.const 0 i32.const 16 - i32.const 480 + i32.const 476 i32.const 14 call $~lib/env/abort unreachable @@ -1451,7 +1451,7 @@ if i32.const 0 i32.const 16 - i32.const 483 + i32.const 479 i32.const 4 call $~lib/env/abort unreachable @@ -1483,7 +1483,7 @@ i32.const 16 i32.add ) - (func $~lib/internal/memory/memset (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memset (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) @@ -1755,11 +1755,11 @@ local.get $2 local.get $3 local.get $4 - call $~lib/internal/memory/memset + call $~lib/util/memory/memset end local.get $1 ) - (func $~lib/internal/memory/memcpy (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2960,7 +2960,7 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 local.get $1 @@ -2987,7 +2987,7 @@ local.get $0 local.get $1 local.get $2 - call $~lib/internal/memory/memcpy + call $~lib/util/memory/memcpy return end local.get $0 @@ -3212,7 +3212,7 @@ if i32.const 0 i32.const 16 - i32.const 494 + i32.const 490 i32.const 8 call $~lib/env/abort unreachable @@ -3230,7 +3230,11 @@ end end ) - (func $~lib/runtime/REALLOC (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/runtime/gc.register (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.set $std/runtime/register_ref + ) + (func $~lib/runtime/REALLOC (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3289,7 +3293,7 @@ local.get $7 local.get $8 local.get $9 - call $~lib/internal/memory/memmove + call $~lib/util/memory/memmove end block $~lib/runtime/memory.fill|inlined.1 local.get $6 @@ -3305,7 +3309,7 @@ local.get $9 local.get $8 local.get $7 - call $~lib/internal/memory/memset + call $~lib/util/memory/memset end local.get $2 i32.load @@ -3319,13 +3323,16 @@ if i32.const 0 i32.const 184 - i32.const 88 + i32.const 85 i32.const 8 call $~lib/env/abort unreachable end local.get $2 call $~lib/allocator/tlsf/memory.free + else + local.get $0 + call $std/runtime/gc.register end local.get $5 local.set $2 @@ -3345,7 +3352,7 @@ local.get $6 local.get $5 local.get $7 - call $~lib/internal/memory/memset + call $~lib/util/memory/memset end else nop @@ -3355,7 +3362,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/unref (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/unref (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 global.get $~lib/runtime/HEAP_BASE @@ -3390,15 +3397,11 @@ end local.get $1 ) - (func $~lib/runtime/FREE (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/FREE (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/runtime/unref call $~lib/allocator/tlsf/memory.free ) - (func $std/runtime/gc.register (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.set $std/runtime/register_ref - ) (func $~lib/runtime/ArrayBufferBase#get:byteLength (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 16 @@ -3423,7 +3426,7 @@ if i32.const 0 i32.const 72 - i32.const 28 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -3436,7 +3439,7 @@ if i32.const 0 i32.const 72 - i32.const 34 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -3457,7 +3460,7 @@ if i32.const 0 i32.const 72 - i32.const 36 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -3560,7 +3563,7 @@ if i32.const 0 i32.const 72 - i32.const 51 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable @@ -3573,7 +3576,7 @@ if i32.const 0 i32.const 72 - i32.const 52 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -3587,7 +3590,7 @@ if i32.const 0 i32.const 72 - i32.const 53 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable @@ -3600,7 +3603,7 @@ if i32.const 0 i32.const 72 - i32.const 54 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -3616,7 +3619,7 @@ if i32.const 0 i32.const 72 - i32.const 56 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -3633,13 +3636,13 @@ if i32.const 0 i32.const 72 - i32.const 58 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref2 - call $~lib/runtime/FREE + call $~lib/runtime/FREE global.get $std/runtime/barrier2 call $~lib/runtime/ALLOC global.set $std/runtime/ref3 @@ -3650,7 +3653,7 @@ if i32.const 0 i32.const 72 - i32.const 61 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -3658,7 +3661,7 @@ global.get $std/runtime/barrier1 call $~lib/runtime/ALLOC global.set $std/runtime/ref4 - block $~lib/runtime/REGISTER|inlined.0 (result i32) + block $~lib/runtime/REGISTER|inlined.0 (result i32) global.get $std/runtime/ref4 local.set $0 local.get $0 @@ -3677,7 +3680,7 @@ if i32.const 0 i32.const 72 - i32.const 65 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -3694,7 +3697,7 @@ if i32.const 0 i32.const 72 - i32.const 67 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable @@ -3707,7 +3710,7 @@ if i32.const 0 i32.const 72 - i32.const 68 + i32.const 70 i32.const 0 call $~lib/env/abort unreachable @@ -3723,7 +3726,7 @@ if i32.const 0 i32.const 72 - i32.const 71 + i32.const 73 i32.const 0 call $~lib/env/abort unreachable @@ -3736,7 +3739,7 @@ if i32.const 0 i32.const 72 - i32.const 72 + i32.const 74 i32.const 0 call $~lib/env/abort unreachable @@ -3745,7 +3748,7 @@ (func $std/runtime/gc.link (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/runtime/gc.collect (; 37 ;) (type $FUNCSIG$v) + (func $std/runtime/gc.collect (; 37 ;) (type $FUNCSIG$v) nop ) (func $start (; 38 ;) (type $FUNCSIG$v) diff --git a/tests/compiler/std/string.ts b/tests/compiler/std/string.ts index d29fba225f..5642cfb2e3 100644 --- a/tests/compiler/std/string.ts +++ b/tests/compiler/std/string.ts @@ -5,7 +5,7 @@ import { utoa64, itoa64, dtoa -} from "internal/number"; +} from "util/number"; // preliminary From e38f627c8ba28da6fda7c066710c39d631aabb1e Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 13 Mar 2019 22:35:47 +0100 Subject: [PATCH 027/119] more --- src/compiler.ts | 2 +- std/assembly/array.ts | 372 ++++++++++++++++++++---------------- std/assembly/arraybuffer.ts | 15 +- std/assembly/builtins.ts | 2 - std/assembly/gc.ts | 31 +++ std/assembly/memory.ts | 62 ++++++ std/assembly/polyfills.ts | 3 +- std/assembly/runtime.ts | 98 +--------- std/assembly/string.ts | 24 +-- std/assembly/vector.ts | 1 + 10 files changed, 330 insertions(+), 280 deletions(-) create mode 100644 std/assembly/gc.ts create mode 100644 std/assembly/memory.ts diff --git a/src/compiler.ts b/src/compiler.ts index a840fc0abc..00a9b1e5ad 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -6602,7 +6602,7 @@ export class Compiler extends DiagnosticEmitter { } // make a static array if possible - if (isStatic) return this.ensureStaticArray(elementType, constantValues); + // if (isStatic) return this.ensureStaticArray(elementType, constantValues); // TODO // otherwise obtain the array type var arrayPrototype = assert(this.program.arrayPrototype); diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 749bcdaaf2..7602991014 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -33,7 +33,7 @@ export class Array extends ArrayBufferView { var oldData = this.data; var oldCapacity = oldData.byteLength >>> alignof(); if (length > oldCapacity) { - const MAX_LENGTH = ArrayBuffer.MAX_BYTELENGTH >>> alignof(); + const MAX_LENGTH = ArrayBufferView.MAX_BYTELENGTH >>> alignof(); if (length > MAX_LENGTH) throw new RangeError("Invalid array length"); let newCapacity = length << alignof(); let newData = REALLOC(changetype(oldData), newCapacity); // registers on move @@ -373,140 +373,150 @@ export class Array extends ArrayBufferView { return this; } - // FIXME: refactor into multiple functions? join(separator: string = ","): string { + if (isInteger()) { + if (value instanceof bool) return this.join_bool(separator); + return this.join_int(separator); + } + if (isFloat()) return this.join_flt(separator); + if (isString()) return this.join_str(separator); + if (isArray()) return this.join_arr(separator); + if (isReference()) return this.join_ref(separator); + ERROR("unspported element type"); + return unreachable(); + } + + private join_bool(separator: string = ","): string { var lastIndex = this.length_ - 1; if (lastIndex < 0) return ""; - var result = ""; - var value: T; - var base = this.dataStart; - // var buffer = this.buffer_; + var dataStart = this.dataStart; + if (!lastIndex) return select("true", "false", load(dataStart)); + var sepLen = separator.length; - var hasSeparator = sepLen != 0; - if (value instanceof bool) { - if (!lastIndex) return select("true", "false", load(base)); - - let valueLen = 5; // max possible length of element len("false") - let estLen = (valueLen + sepLen) * lastIndex + valueLen; - let result = ALLOC(estLen << 1); - let offset = 0; - for (let i = 0; i < lastIndex; ++i) { - value = load(base + i); - valueLen = 4 + (!value); - memory.copy( - result + (offset << 1), - changetype(select("true", "false", value)), - valueLen << 1 - ); - offset += valueLen; - if (hasSeparator) { - memory.copy( - result + (offset << 1), - changetype(separator), - sepLen << 1 - ); - offset += sepLen; - } - } - value = load(base + lastIndex); + var valueLen = 5; // max possible length of element len("false") + var estLen = (valueLen + sepLen) * lastIndex + valueLen; + var result = ALLOC(estLen << 1); + var offset = 0; + var value: bool; + for (let i = 0; i < lastIndex; ++i) { + value = load(dataStart + i); valueLen = 4 + (!value); memory.copy( result + (offset << 1), changetype(select("true", "false", value)), - valueLen << 1 + valueLen << 1 ); offset += valueLen; - - if (estLen > offset) { - let trimmed = changetype(result).substring(0, offset); - FREE(result); - return trimmed; // registered in .substring - } - return REGISTER(result); - } else if (isInteger()) { - if (!lastIndex) return changetype(itoa(load(base))); - - const valueLen = (sizeof() <= 4 ? 10 : 20) + isSigned(); - let estLen = (valueLen + sepLen) * lastIndex + valueLen; - let result = ALLOC(estLen << 1); - let offset = 0; - for (let i = 0; i < lastIndex; ++i) { - value = load(base + (i << alignof())); - offset += itoa_stream(result, offset, value); - if (hasSeparator) { - memory.copy( - result + (offset << 1), - changetype(separator), - sepLen << 1 - ); - offset += sepLen; - } + if (sepLen) { + memory.copy( + result + (offset << 1), + changetype(separator), + sepLen << 1 + ); + offset += sepLen; } - value = load(base + (lastIndex << alignof())); + } + value = load(dataStart + lastIndex); + valueLen = 4 + (!value); + memory.copy( + result + (offset << 1), + changetype(select("true", "false", value)), + valueLen << 1 + ); + offset += valueLen; + + if (estLen > offset) { + let trimmed = changetype(result).substring(0, offset); + FREE(result); + return trimmed; // registered in .substring + } + return REGISTER(result); + } + + private join_int(separator: string = ","): string { + var lastIndex = this.length_ - 1; + if (lastIndex < 0) return ""; + var dataStart = this.dataStart; + if (!lastIndex) return changetype(itoa(load(dataStart))); + + var sepLen = separator.length; + const valueLen = (sizeof() <= 4 ? 10 : 20) + isSigned(); + var estLen = (valueLen + sepLen) * lastIndex + valueLen; + var result = ALLOC(estLen << 1); + var offset = 0; + var value: T; + for (let i = 0; i < lastIndex; ++i) { + value = load(dataStart + (i << alignof())); offset += itoa_stream(result, offset, value); - if (estLen > offset) { - let trimmed = changetype(result).substring(0, offset); - FREE(result); - return trimmed; // registered in .substring - } - return REGISTER(result); - } else if (isFloat()) { - if (!lastIndex) return changetype(dtoa(load(base))); - - const valueLen = MAX_DOUBLE_LENGTH; - let estLen = (valueLen + sepLen) * lastIndex + valueLen; - let result = ALLOC(estLen << 1); - let offset = 0; - for (let i = 0; i < lastIndex; ++i) { - value = load(base + (i << alignof())); - offset += dtoa_stream(result, offset, value); - if (hasSeparator) { - memory.copy( - result + (offset << 1), - changetype(separator), - sepLen << 1 - ); - offset += sepLen; - } + if (sepLen) { + memory.copy( + result + (offset << 1), + changetype(separator), + sepLen << 1 + ); + offset += sepLen; } - value = load(base + (lastIndex << alignof())); + } + value = load(dataStart + (lastIndex << alignof())); + offset += itoa_stream(result, offset, value); + if (estLen > offset) { + let trimmed = changetype(result).substring(0, offset); + FREE(result); + return trimmed; // registered in .substring + } + return REGISTER(result); + } + + private join_flt(separator: string = ","): string { + var lastIndex = this.length_ - 1; + if (lastIndex < 0) return ""; + var dataStart = this.dataStart; + if (!lastIndex) return changetype(dtoa(load(dataStart))); + + const valueLen = MAX_DOUBLE_LENGTH; + var sepLen = separator.length; + var estLen = (valueLen + sepLen) * lastIndex + valueLen; + var result = ALLOC(estLen << 1); + var offset = 0; + var value: T; + for (let i = 0; i < lastIndex; ++i) { + value = load(dataStart + (i << alignof())); offset += dtoa_stream(result, offset, value); - if (estLen > offset) { - let trimmed = changetype(result).substring(0, offset); - FREE(result); - return trimmed; // registered in .substring + if (sepLen) { + memory.copy( + result + (offset << 1), + changetype(separator), + sepLen << 1 + ); + offset += sepLen; } - return REGISTER(result); - } else if (isString()) { - if (!lastIndex) return load(base); + } + value = load(dataStart + (lastIndex << alignof())); + offset += dtoa_stream(result, offset, value); + if (estLen > offset) { + let trimmed = changetype(result).substring(0, offset); + FREE(result); + return trimmed; // registered in .substring + } + return REGISTER(result); + } - let estLen = 0; - for (let i = 0, len = lastIndex + 1; i < len; ++i) { - estLen += load(base + (i << alignof())).length; - } - let offset = 0; - let result = ALLOC((estLen + sepLen * lastIndex) << 1); - for (let i = 0; i < lastIndex; ++i) { - value = load(base + (i << alignof())); - if (value) { - let valueLen = changetype(value).length; - memory.copy( - result + (offset << 1), - changetype(value), - valueLen << 1 - ); - offset += valueLen; - } - if (hasSeparator) { - memory.copy( - result + (offset << 1), - changetype(separator), - sepLen << 1 - ); - offset += sepLen; - } - } - value = load(base + (lastIndex << alignof())); + private join_str(separator: string = ","): string { + var lastIndex = this.length_ - 1; + if (lastIndex < 0) return ""; + var dataStart = this.dataStart; + if (!lastIndex) return load(dataStart); + + var sepLen = separator.length; + var estLen = 0; + for (let i = 0, len = lastIndex + 1; i < len; ++i) { + estLen += load(dataStart + (i << alignof())).length; + } + var offset = 0; + var result = ALLOC((estLen + sepLen * lastIndex) << 1); + var value: String; + for (let i = 0; i < lastIndex; ++i) { + value = load(dataStart + (i << alignof())); if (value) { let valueLen = changetype(value).length; memory.copy( @@ -514,47 +524,66 @@ export class Array extends ArrayBufferView { changetype(value), valueLen << 1 ); + offset += valueLen; } - return REGISTER(result); - } else if (isArray()) { - if (!lastIndex) { - value = load(base); - return value ? value.join(separator) : ""; - } - for (let i = 0; i < lastIndex; ++i) { - value = load(base + (i << alignof())); - if (value) result += value.join(separator); - if (hasSeparator) result += separator; + if (sepLen) { + memory.copy( + result + (offset << 1), + changetype(separator), + sepLen << 1 + ); + offset += sepLen; } - value = load(base + (lastIndex << alignof())); + } + value = load(dataStart + (lastIndex << alignof())); + if (value) { + let valueLen = changetype(value).length; + memory.copy( + result + (offset << 1), + changetype(value), + valueLen << 1 + ); + } + return REGISTER(result); + } + + private join_arr(separator: string = ","): string { + var lastIndex = this.length_ - 1; + if (lastIndex < 0) return ""; + + var result = ""; + var sepLen = separator.length; + var base = this.dataStart; + var value: T; + if (!lastIndex) { + value = load(base); + return value ? value.join(separator) : ""; + } + for (let i = 0; i < lastIndex; ++i) { + value = load(base + (i << alignof())); if (value) result += value.join(separator); - return result; // registered by concatenation (FIXME: lots of garbage) - } else if (isReference()) { // References - if (!lastIndex) return "[object Object]"; - const valueLen = 15; // max possible length of element len("[object Object]") - let estLen = (valueLen + sepLen) * lastIndex + valueLen; - let result = ALLOC(estLen << 1); - let offset = 0; - for (let i = 0; i < lastIndex; ++i) { - value = load(base + (i << alignof())); - if (value) { - memory.copy( - result + (offset << 1), - changetype("[object Object]"), - valueLen << 1 - ); - offset += valueLen; - } - if (hasSeparator) { - memory.copy( - result + (offset << 1), - changetype(separator), - sepLen << 1 - ); - offset += sepLen; - } - } - if (load(base + (lastIndex << alignof()))) { + if (sepLen) result += separator; + } + value = load(base + (lastIndex << alignof())); + if (value) result += value.join(separator); + return result; // registered by concatenation (FIXME: lots of garbage) + } + + private join_ref(separator: string = ","): string { + var lastIndex = this.length_ - 1; + if (lastIndex < 0) return ""; + var base = this.dataStart; + if (!lastIndex) return "[object Object]"; + + const valueLen = 15; // max possible length of element len("[object Object]") + var sepLen = separator.length; + var estLen = (valueLen + sepLen) * lastIndex + valueLen; + var result = ALLOC(estLen << 1); + var offset = 0; + var value: T; + for (let i = 0; i < lastIndex; ++i) { + value = load(base + (i << alignof())); + if (value) { memory.copy( result + (offset << 1), changetype("[object Object]"), @@ -562,16 +591,29 @@ export class Array extends ArrayBufferView { ); offset += valueLen; } - if (estLen > offset) { - let out = changetype(result).substring(0, offset); - FREE(result); - return out; // registered in .substring + if (sepLen) { + memory.copy( + result + (offset << 1), + changetype(separator), + sepLen << 1 + ); + offset += sepLen; } - return REGISTER(result); - } else { - ERROR("unspported type"); - assert(false); } + if (load(base + (lastIndex << alignof()))) { + memory.copy( + result + (offset << 1), + changetype("[object Object]"), + valueLen << 1 + ); + offset += valueLen; + } + if (estLen > offset) { + let out = changetype(result).substring(0, offset); + FREE(result); + return out; // registered in .substring + } + return REGISTER(result); } @inline diff --git a/std/assembly/arraybuffer.ts b/std/assembly/arraybuffer.ts index 2baa2bf357..03e02f951c 100644 --- a/std/assembly/arraybuffer.ts +++ b/std/assembly/arraybuffer.ts @@ -1,6 +1,6 @@ -import { ALLOC_RAW, REGISTER, ArrayBufferBase } from "./runtime"; +import { HEADER, ALLOC_RAW, ALLOC, REGISTER, ArrayBufferView } from "./runtime"; -@sealed export class ArrayBuffer extends ArrayBufferBase { +@sealed export class ArrayBuffer { @inline static isView(value: T): bool { if (value) { @@ -20,7 +20,16 @@ import { ALLOC_RAW, REGISTER, ArrayBufferBase } from "./runtime"; return false; } - slice(begin: i32 = 0, end: i32 = ArrayBuffer.MAX_BYTELENGTH): ArrayBuffer { + constructor(length: i32) { + if (length > ArrayBufferView.MAX_BYTELENGTH) throw new RangeError("Invalid array buffer length"); + return REGISTER(ALLOC(length)); + } + + get byteLength(): i32 { + return changetype
(changetype(this) - HEADER_SIZE).payloadSize; + } + + slice(begin: i32 = 0, end: i32 = ArrayBufferView.MAX_BYTELENGTH): ArrayBuffer { var length = this.byteLength; begin = begin < 0 ? max(length + begin, 0) : min(begin, length); end = end < 0 ? max(length + end , 0) : min(end , length); diff --git a/std/assembly/builtins.ts b/std/assembly/builtins.ts index df7f0acbdf..13fa6245e1 100644 --- a/std/assembly/builtins.ts +++ b/std/assembly/builtins.ts @@ -500,5 +500,3 @@ export namespace f64x2 { export namespace v8x16 { @builtin export declare function shuffle(a: v128, b: v128, l0: u8, l1: u8, l2: u8, l3: u8, l4: u8, l5: u8, l6: u8, l7: u8, l8: u8, l9: u8, l10: u8, l11: u8, l12: u8, l13: u8, l14: u8, l15: u8): v128; } - -@builtin export declare function start(): void; diff --git a/std/assembly/gc.ts b/std/assembly/gc.ts new file mode 100644 index 0000000000..36a06745ec --- /dev/null +++ b/std/assembly/gc.ts @@ -0,0 +1,31 @@ +/** Garbage collector interface. */ +export namespace gc { + + /** Gets the computed unique class id of a class type. */ + @builtin @unsafe export declare function classId(): u32; + + /** Iterates reference root objects. */ + @builtin @unsafe export declare function iterateRoots(fn: (ref: usize) => void): void; + + /** Registers a managed object to be tracked by the garbage collector. */ + @stub @unsafe export function register(ref: usize): void { + ERROR("stub: missing garbage collector"); + } + + /** Links a registered object with the registered object now referencing it. */ + @stub @unsafe export function link(ref: usize, parentRef: usize): void { + ERROR("stub: missing garbage collector"); + } + + /** Marks an object as being reachable. */ + @stub @unsafe export function mark(ref: usize): void { + ERROR("stub: missing garbage collector"); + } + + /** Performs a full garbage collection cycle. */ + @stub export function collect(): void { + WARNING("stub: missing garbage collector"); + } +} + +// TODO: move marking into userspace using builtins like iterateFields? diff --git a/std/assembly/memory.ts b/std/assembly/memory.ts new file mode 100644 index 0000000000..c37ad9b5d2 --- /dev/null +++ b/std/assembly/memory.ts @@ -0,0 +1,62 @@ +import { memcmp, memmove, memset } from "./util/memory"; + +/** Memory manager interface. */ +export namespace memory { + + /** Gets the size of the memory in pages. */ + @builtin export declare function size(): i32; + + /** Grows the memory by the given size in pages and returns the previous size in pages. */ + @builtin @unsafe export declare function grow(pages: i32): i32; + + /** Fills a section in memory with the specified byte value. */ + @builtin @unsafe @inline export function fill(dst: usize, c: u8, n: usize): void { + memset(dst, c, n); // fallback if "bulk-memory" isn't enabled + } + + /** Copies a section of memory to another. Has move semantics. */ + @builtin @unsafe @inline export function copy(dst: usize, src: usize, n: usize): void { + memmove(dst, src, n); // fallback if "bulk-memory" isn't enabled + } + + /** Initializes a memory segment. */ + @unsafe export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void { + ERROR("not implemented"); + } + + /** Drops a memory segment. */ + @unsafe export function drop(segmentIndex: u32): void { + ERROR("not implemented"); + } + + /** Dynamically allocates a section of memory and returns its address. */ + @stub @inline export function allocate(size: usize): usize { + ERROR("stub: missing memory manager"); + return unreachable(); + } + + /** Dynamically frees a section of memory by the previously allocated address. */ + @stub @unsafe @inline export function free(ptr: usize): void { + ERROR("stub: missing memory manager"); + } + + /** Resets the memory to its initial state. Arena allocator only. */ + @stub @unsafe @inline export function reset(): void { + ERROR("stub: not supported by memory manager"); + } + + /** Compares a section of memory to another. */ + @inline export function compare(vl: usize, vr: usize, n: usize): i32 { + return memcmp(vl, vr, n); + } + + /** Repeats a section of memory at a specific address. */ + @unsafe export function repeat(dst: usize, src: usize, srcLength: usize, count: usize): void { + var index: usize = 0; + var total = srcLength * count; + while (index < total) { + memory.copy(dst + index, src, srcLength); + index += srcLength; + } + } +} diff --git a/std/assembly/polyfills.ts b/std/assembly/polyfills.ts index 77228ec340..ab09a47791 100644 --- a/std/assembly/polyfills.ts +++ b/std/assembly/polyfills.ts @@ -25,8 +25,7 @@ export function bswap(value: T): T { return value; } -@inline -export function bswap16(value: T): T { +@inline export function bswap16(value: T): T { if (isInteger() && sizeof() <= 4) { if (sizeof() == 2) { return ((value << 8) | ((value >> 8) & 0x00FF)); diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index b0edc9d78c..4c046e2fe6 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -19,7 +19,7 @@ import { AL_MASK, MAX_SIZE_32 } from "./util/allocator"; // runtime will most likely change significantly once reftypes and WASM GC are a thing. /** Whether a GC is present or not. */ -@inline export const GC = isImplemented(gc.register) && isImplemented(gc.link); +@inline export const GC = isImplemented(gc.register); /** Size of the common runtime header. */ @inline export const HEADER_SIZE: usize = GC @@ -132,20 +132,9 @@ function unref(ref: usize): HEADER { if (GC) gc.link(changetype(ref), changetype(parentRef)); // tslint:disable-line } -export abstract class ArrayBufferBase { +export abstract class ArrayBufferView { @lazy static readonly MAX_BYTELENGTH: i32 = MAX_SIZE_32 - HEADER_SIZE; - constructor(length: i32) { - if (length > ArrayBufferBase.MAX_BYTELENGTH) throw new RangeError("Invalid array buffer length"); - return REGISTER(ALLOC(length)); - } - - get byteLength(): i32 { - return changetype
(changetype(this) - HEADER_SIZE).payloadSize; - } -} - -export abstract class ArrayBufferView { [key: number]: number; @unsafe data: ArrayBuffer; @@ -153,9 +142,8 @@ export abstract class ArrayBufferView { @unsafe dataEnd: usize; constructor(length: i32, alignLog2: i32) { - if (length > ArrayBufferBase.MAX_BYTELENGTH >>> alignLog2) throw new RangeError("Invalid length"); - var byteLength = length << alignLog2; - var buffer = new ArrayBuffer(byteLength); + if (length > ArrayBufferView.MAX_BYTELENGTH >>> alignLog2) throw new RangeError("Invalid length"); + var buffer = new ArrayBuffer(length << alignLog2); this.data = buffer; this.dataStart = changetype(buffer); this.dataEnd = changetype(buffer) + length; @@ -170,83 +158,7 @@ export abstract class ArrayBufferView { } get length(): i32 { - ERROR("not implemented"); + ERROR("concrete implementation must provide this"); return unreachable(); } } - -export abstract class StringBase { - @lazy static readonly MAX_LENGTH: i32 = (MAX_SIZE_32 - HEADER_SIZE) >> 1; - - get length(): i32 { - return changetype
(changetype(this) - HEADER_SIZE).payloadSize >> 1; - } -} - -import { memcmp, memmove, memset } from "./util/memory"; - -export namespace memory { - @builtin export declare function size(): i32; - - @builtin @unsafe export declare function grow(pages: i32): i32; - - @builtin @unsafe @inline export function fill(dst: usize, c: u8, n: usize): void { - memset(dst, c, n); // fallback if "bulk-memory" isn't enabled - } - - @builtin @unsafe @inline export function copy(dst: usize, src: usize, n: usize): void { - memmove(dst, src, n); // fallback if "bulk-memory" isn't enabled - } - - @unsafe export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void { - ERROR("not implemented"); - } - - @unsafe export function drop(segmentIndex: u32): void { - ERROR("not implemented"); - } - - @stub @inline export function allocate(size: usize): usize { - ERROR("stub: missing memory manager"); - return unreachable(); - } - - @stub @unsafe @inline export function free(ptr: usize): void { - ERROR("stub: missing memory manager"); - } - - @stub @unsafe @inline export function reset(): void { - ERROR("stub: not supported by memory manager"); - } - - @inline export function compare(vl: usize, vr: usize, n: usize): i32 { - return memcmp(vl, vr, n); - } - - @unsafe export function repeat(dst: usize, src: usize, srcLength: usize, count: usize): void { - var index: usize = 0; - var total = srcLength * count; - while (index < total) { - memory.copy(dst + index, src, srcLength); - index += srcLength; - } - } -} - -export namespace gc { - @builtin @unsafe export declare function classId(): u32; - - @builtin @unsafe export declare function iterateRoots(fn: (ref: usize) => void): void; - - @stub @unsafe export function register(ref: usize): void { - ERROR("stub: missing garbage collector"); - } - - @stub @unsafe export function link(ref: usize, parentRef: usize): void { - ERROR("stub: missing garbage collector"); - } - - @stub export function collect(): void { - WARNING("stub: missing garbage collector"); - } -} diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 4c89dbd686..e0c07daa5d 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -1,17 +1,13 @@ -import { - ALLOC, - REGISTER, - StringBase -} from "./runtime"; - -import { - compareImpl, - parse, - CharCode, - isWhiteSpaceOrLineTerminator -} from "./util/string"; - -@sealed export class String extends StringBase { +import { HEADER, HEADER_SIZE, ALLOC, REGISTER, ArrayBufferView } from "./runtime"; +import { MAX_SIZE_32 } from "./util/allocator"; +import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./util/string"; + +@sealed export abstract class String { + @lazy static readonly MAX_LENGTH: i32 = (MAX_SIZE_32 - HEADER_SIZE) >> alignof(); + + get length(): i32 { + return changetype
(changetype(this) - HEADER_SIZE).payloadSize >> 1; + } // TODO Add and handle second argument static fromCharCode(code: i32): String { diff --git a/std/assembly/vector.ts b/std/assembly/vector.ts index e39e402fc8..6aceaf4674 100644 --- a/std/assembly/vector.ts +++ b/std/assembly/vector.ts @@ -1,2 +1,3 @@ +/** Vector abstraction. */ @sealed export class V128 { } From 6163a73ab5b7b81db6411479683e7bac5cc5641a Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 14 Mar 2019 04:33:58 +0100 Subject: [PATCH 028/119] take a step back --- package.json | 3 +- src/ast.ts | 4 +- src/builtins.ts | 36 +- src/program.ts | 15 +- std/assembly/allocator/arena.ts | 53 +-- std/assembly/allocator/buddy.ts | 542 ----------------------- std/assembly/allocator/emscripten.ts | 28 +- std/assembly/allocator/system.ts | 27 +- std/assembly/allocator/tlsf.ts | 110 ++--- std/assembly/array.ts | 48 +- std/assembly/arraybuffer.ts | 10 +- std/assembly/builtins.ts | 1 - std/assembly/collector/itcm.ts | 24 +- std/assembly/dataview.ts | 3 +- std/assembly/diagnostics.ts | 8 +- std/assembly/gc.ts | 27 +- std/assembly/index.d.ts | 9 +- std/assembly/map.ts | 6 +- std/assembly/memory.ts | 33 +- std/assembly/polyfills.ts | 4 +- std/assembly/runtime.ts | 244 +++++----- std/assembly/set.ts | 4 +- std/assembly/string.ts | 72 +-- std/assembly/table.ts | 20 +- std/assembly/typedarray.ts | 6 +- std/assembly/util/number.ts | 26 +- tests/compiler/empty.ts | 9 - tests/compiler/std/runtime.optimized.wat | 181 ++++---- tests/compiler/std/runtime.ts | 70 ++- tests/compiler/std/runtime.untouched.wat | 285 ++++++------ 30 files changed, 633 insertions(+), 1275 deletions(-) delete mode 100644 std/assembly/allocator/buddy.ts diff --git a/package.json b/package.json index 668a34caa0..c25aa9576d 100644 --- a/package.json +++ b/package.json @@ -43,10 +43,9 @@ "scripts": { "build": "webpack --mode production --display-modules", "clean": "node scripts/clean", - "check": "npm run check:config && npm run check:compiler && npm run check:library", + "check": "npm run check:config && npm run check:compiler", "check:config": "tsc --noEmit -p src --diagnostics --listFiles", "check:compiler": "tslint -c tslint.json --project src --formatters-dir lib/lint/formatters --format as", - "check:library": "tslint -c tslint.json --project std/assembly --formatters-dir lib/lint/formatters --format as", "test": "npm run test:parser && npm run test:compiler", "test:parser": "node tests/parser", "test:compiler": "node tests/compiler", diff --git a/src/ast.ts b/src/ast.ts index 52bbbb719c..b06912c11f 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -1163,8 +1163,7 @@ export enum DecoratorKind { BUILTIN, LAZY, START, - UNSAFE, - STUB + UNSAFE } /** Returns the kind of the specified decorator. Defaults to {@link DecoratorKind.CUSTOM}. */ @@ -1201,7 +1200,6 @@ export function decoratorNameToKind(name: Expression): DecoratorKind { case CharCode.s: { if (nameStr == "sealed") return DecoratorKind.SEALED; if (nameStr == "start") return DecoratorKind.START; - if (nameStr == "stub") return DecoratorKind.STUB; break; } case CharCode.u: { diff --git a/src/builtins.ts b/src/builtins.ts index 39e7be83e4..369fd4aa72 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -21,8 +21,7 @@ import { LiteralKind, LiteralExpression, StringLiteralExpression, - CallExpression, - ElementAccessExpression + CallExpression } from "./ast"; import { @@ -100,7 +99,6 @@ export namespace BuiltinSymbols { export const isFunction = "~lib/builtins/isFunction"; export const isNullable = "~lib/builtins/isNullable"; export const isDefined = "~lib/builtins/isDefined"; - export const isImplemented = "~lib/builtins/isImplemented"; export const isConstant = "~lib/builtins/isConstant"; export const isManaged = "~lib/builtins/isManaged"; @@ -472,14 +470,16 @@ export namespace BuiltinSymbols { export const WARNING = "~lib/diagnostics/WARNING"; export const INFO = "~lib/diagnostics/INFO"; - // std/runtime.ts - export const HEAP_BASE = "~lib/runtime/HEAP_BASE"; - export const memory_size = "~lib/runtime/memory.size"; - export const memory_grow = "~lib/runtime/memory.grow"; - export const memory_copy = "~lib/runtime/memory.copy"; - export const memory_fill = "~lib/runtime/memory.fill"; - export const gc_classId = "~lib/runtime/gc.classId"; - export const gc_iterateRoots = "~lib/runtime/gc.iterateRoots"; + // std/memory.ts + export const HEAP_BASE = "~lib/memory/HEAP_BASE"; + export const memory_size = "~lib/memory/memory.size"; + export const memory_grow = "~lib/memory/memory.grow"; + export const memory_copy = "~lib/memory/memory.copy"; + export const memory_fill = "~lib/memory/memory.fill"; + + // std/gc.ts + export const gc_classId = "~lib/gc/gc.classId"; + export const gc_iterateRoots = "~lib/gc/gc.iterateRoots"; // std/typedarray.ts export const Int8Array = "~lib/typedarray/Int8Array"; @@ -621,20 +621,6 @@ export function compileCall( ); return module.createI32(element ? 1 : 0); } - case BuiltinSymbols.isImplemented: { // isImplemented(expression) -> bool - compiler.currentType = Type.bool; - if ( - checkTypeAbsent(typeArguments, reportNode, prototype) | - checkArgsRequired(operands, 1, reportNode, compiler) - ) return module.createUnreachable(); - let element = compiler.resolver.resolveExpression( - operands[0], - compiler.currentFlow, - Type.void, - ReportMode.SWALLOW - ); - return module.createI32(element && !element.hasDecorator(DecoratorFlags.STUB) ? 1 : 0); - } case BuiltinSymbols.isConstant: { // isConstant(expression) -> bool compiler.currentType = Type.bool; if ( diff --git a/src/program.ts b/src/program.ts index 81f83c6fdb..7db97ef605 100644 --- a/src/program.ts +++ b/src/program.ts @@ -930,7 +930,7 @@ export class Program extends DiagnosticEmitter { ensureGlobal(name: string, element: DeclaredElement): DeclaredElement { var elementsByName = this.elementsByName; if (elementsByName.has(name)) { - let actual = elementsByName.get(name); + let actual = elementsByName.get(name)!; // NOTE: this is effectively only performed when merging native types with // their respective namespaces in std/builtins, but can also trigger when a // user has multiple global elements of the same name in different files, @@ -1176,7 +1176,7 @@ export class Program extends DiagnosticEmitter { ): void { var name = declaration.name.text; var isStatic = declaration.is(CommonFlags.STATIC); - var acceptedFlags = DecoratorFlags.INLINE; + var acceptedFlags = DecoratorFlags.INLINE | DecoratorFlags.UNSAFE; if (!declaration.is(CommonFlags.GENERIC)) { acceptedFlags |= DecoratorFlags.OPERATOR_BINARY | DecoratorFlags.OPERATOR_PREFIX @@ -1549,7 +1549,7 @@ export class Program extends DiagnosticEmitter { parent: Element ): void { var name = declaration.name.text; - var validDecorators = DecoratorFlags.UNSAFE | DecoratorFlags.STUB; + var validDecorators = DecoratorFlags.UNSAFE; if (declaration.is(CommonFlags.AMBIENT)) { validDecorators |= DecoratorFlags.EXTERNAL; } else { @@ -1791,9 +1791,7 @@ export enum DecoratorFlags { /** Is the explicit start function. */ START = 1 << 10, /** Is considered unsafe code. */ - UNSAFE = 1 << 11, - /** Is a stub that can be overridden. */ - STUB = 1 << 12 + UNSAFE = 1 << 11 } /** Translates a decorator kind to the respective decorator flag. */ @@ -1812,7 +1810,6 @@ export function decoratorKindToFlag(kind: DecoratorKind): DecoratorFlags { case DecoratorKind.LAZY: return DecoratorFlags.LAZY; case DecoratorKind.START: return DecoratorFlags.START; case DecoratorKind.UNSAFE: return DecoratorFlags.UNSAFE; - case DecoratorKind.STUB: return DecoratorFlags.STUB; default: return DecoratorFlags.NONE; } } @@ -1888,8 +1885,8 @@ export abstract class Element { if (!members) this.members = members = new Map(); else if (members.has(name)) { let actual = members.get(name)!; - if (actual.parent !== this || actual.hasDecorator(DecoratorFlags.STUB)) { - // override non-own or stub element + if (actual.parent !== this) { + // override non-own element } else { let merged = tryMerge(actual, element); if (merged) { diff --git a/std/assembly/allocator/arena.ts b/std/assembly/allocator/arena.ts index dfe694d7bd..94c2a2329e 100644 --- a/std/assembly/allocator/arena.ts +++ b/std/assembly/allocator/arena.ts @@ -1,41 +1,30 @@ -/** - * Arena Memory Allocator - * - * Provides a `memory.reset` function to reset the heap to its initial state. A user has to make - * sure that there are no more references to cleared memory afterwards. Always aligns to 8 bytes. - * - * @module std/assembly/allocator/arena - *//***/ - +import { HEAP_BASE, memory } from "../memory"; import { AL_MASK, MAX_SIZE_32 } from "../util/allocator"; -var startOffset: usize = (HEAP_BASE + AL_MASK) & ~AL_MASK; -var offset: usize = startOffset; - -// Memory allocator implementation -@global namespace memory { +@lazy var startOffset: usize = (HEAP_BASE + AL_MASK) & ~AL_MASK; +@lazy var offset: usize = startOffset; - export function allocate(size: usize): usize { - if (size > MAX_SIZE_32) unreachable(); - var ptr = offset; - var newPtr = (ptr + max(size, 1) + AL_MASK) & ~AL_MASK; - var pagesBefore = memory.size(); - if (newPtr > pagesBefore << 16) { - let pagesNeeded = ((newPtr - ptr + 0xffff) & ~0xffff) >>> 16; - let pagesWanted = max(pagesBefore, pagesNeeded); // double memory - if (memory.grow(pagesWanted) < 0) { - if (memory.grow(pagesNeeded) < 0) { - unreachable(); // out of memory - } +@unsafe @global function __memory_allocate(size: usize): usize { + if (size > MAX_SIZE_32) unreachable(); + var ptr = offset; + var newPtr = (ptr + max(size, 1) + AL_MASK) & ~AL_MASK; + var pagesBefore = memory.size(); + if (newPtr > pagesBefore << 16) { + let pagesNeeded = ((newPtr - ptr + 0xffff) & ~0xffff) >>> 16; + let pagesWanted = max(pagesBefore, pagesNeeded); // double memory + if (memory.grow(pagesWanted) < 0) { + if (memory.grow(pagesNeeded) < 0) { + unreachable(); // out of memory } } - offset = newPtr; - return ptr; } + offset = newPtr; + return ptr; +} - export function free(ptr: usize): void { /* nop */ } +@unsafe @global function __memory_free(ptr: usize): void { +} - export function reset(): void { - offset = startOffset; - } +@unsafe @global function __memory_reset(): void { + offset = startOffset; } diff --git a/std/assembly/allocator/buddy.ts b/std/assembly/allocator/buddy.ts deleted file mode 100644 index cec54d040e..0000000000 --- a/std/assembly/allocator/buddy.ts +++ /dev/null @@ -1,542 +0,0 @@ -/** - * Buddy Memory Allocator. - * @module std/assembly/allocator/buddy - *//***/ - -/* - Copyright 2018 Evan Wallace - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -*/// see: https://github.com/evanw/buddy-malloc - -/* - * This file implements a buddy memory allocator, which is an allocator that - * allocates memory within a fixed linear address range. It spans the address - * range with a binary tree that tracks free space. Both "malloc" and "free" - * are O(log N) time where N is the maximum possible number of allocations. - * - * The "buddy" term comes from how the tree is used. When memory is allocated, - * nodes in the tree are split recursively until a node of the appropriate size - * is reached. Every split results in two child nodes, each of which is the - * buddy of the other. When a node is freed, the node and its buddy can be - * merged again if the buddy is also free. This makes the memory available - * for larger allocations again. - */ - -/* - * Every allocation needs an 8-byte header to store the allocation size while - * staying 8-byte aligned. The address returned by "malloc" is the address - * right after this header (i.e. the size occupies the 8 bytes before the - * returned address). - */ -const HEADER_SIZE: usize = 8; - -/* - * The minimum allocation size is 16 bytes because we have an 8-byte header and - * we need to stay 8-byte aligned. - */ -const MIN_ALLOC_LOG2: usize = 4; -const MIN_ALLOC: usize = 1 << MIN_ALLOC_LOG2; - -/* - * The maximum allocation size is currently set to 2gb. This is the total size - * of the heap. It's technically also the maximum allocation size because the - * heap could consist of a single allocation of this size. But of course real - * heaps will have multiple allocations, so the real maximum allocation limit - * is at most 1gb. - */ -const MAX_ALLOC_LOG2: usize = 30; // 31; -const MAX_ALLOC: usize = 1 << MAX_ALLOC_LOG2; - -/* - * Allocations are done in powers of two starting from MIN_ALLOC and ending at - * MAX_ALLOC inclusive. Each allocation size has a bucket that stores the free - * list for that allocation size. - * - * Given a bucket index, the size of the allocations in that bucket can be - * found with "(size_t)1 << (MAX_ALLOC_LOG2 - bucket)". - */ -const BUCKET_COUNT: usize = MAX_ALLOC_LOG2 - MIN_ALLOC_LOG2 + 1; - -/* - * Free lists are stored as circular doubly-linked lists. Every possible - * allocation size has an associated free list that is threaded through all - * currently free blocks of that size. That means MIN_ALLOC must be at least - * "sizeof(list_t)". MIN_ALLOC is currently 16 bytes, so this will be true for - * both 32-bit and 64-bit. - */ -@unmanaged -class List { - prev: List; - next: List; - static readonly SIZE: usize = 2 * sizeof(); -} - -/* - * Each bucket corresponds to a certain allocation size and stores a free list - * for that size. The bucket at index 0 corresponds to an allocation size of - * MAX_ALLOC (i.e. the whole address space). - */ -var BUCKETS_START: usize = HEAP_BASE; -var BUCKETS_END: usize = BUCKETS_START + BUCKET_COUNT * List.SIZE; - -function buckets$get(index: usize): List { - assert(index < BUCKET_COUNT); - return changetype(BUCKETS_START + index * List.SIZE); -} - -/* - * We could initialize the allocator by giving it one free block the size of - * the entire address space. However, this would cause us to instantly reserve - * half of the entire address space on the first allocation, since the first - * split would store a free list entry at the start of the right child of the - * root. Instead, we have the tree start out small and grow the size of the - * tree as we use more memory. The size of the tree is tracked by this value. - */ -var bucket_limit: usize; - -/* - * This array represents a linearized binary tree of bits. Every possible - * allocation larger than MIN_ALLOC has a node in this tree (and therefore a - * bit in this array). - * - * Given the index for a node, lineraized binary trees allow you to traverse to - * the parent node or the child nodes just by doing simple arithmetic on the - * index: - * - * - Move to parent: index = (index - 1) / 2; - * - Move to left child: index = index * 2 + 1; - * - Move to right child: index = index * 2 + 2; - * - Move to sibling: index = ((index - 1) ^ 1) + 1; - * - * Each node in this tree can be in one of several states: - * - * - UNUSED (both children are UNUSED) - * - SPLIT (one child is UNUSED and the other child isn't) - * - USED (neither children are UNUSED) - * - * These states take two bits to store. However, it turns out we have enough - * information to distinguish between UNUSED and USED from context, so we only - * need to store SPLIT or not, which only takes a single bit. - * - * Note that we don't need to store any nodes for allocations of size MIN_ALLOC - * since we only ever care about parent nodes. - */ -const SPLIT_COUNT: usize = (1 << (BUCKET_COUNT - 1)) / 8; -var NODE_IS_SPLIT_START: usize = BUCKETS_END; -var NODE_IS_SPLIT_END: usize = NODE_IS_SPLIT_START + SPLIT_COUNT * sizeof(); - -function node_is_split$get(index: usize): i32 { - assert(index < SPLIT_COUNT); - return load(NODE_IS_SPLIT_START + index); -} - -function node_is_split$set(index: usize, state: i32): void { - assert(index < SPLIT_COUNT); - store(NODE_IS_SPLIT_START + index, state); -} - -/* - * This is the starting address of the address range for this allocator. Every - * returned allocation will be an offset of this pointer from 0 to MAX_ALLOC. - */ -var base_ptr: usize; - -/* - * This is the maximum address that has ever been used by the allocator. It's - * used to know when to call "brk" to request more memory from the kernel. - */ -var max_ptr: usize; - -/* - * Make sure all addresses before "new_value" are valid and can be used. Memory - * is allocated in a 2gb address range but that memory is not reserved up - * front. It's only reserved when it's needed by calling this function. This - * will return false if the memory could not be reserved. - */ -function update_max_ptr(new_value: usize): i32 { - if (new_value > max_ptr) { - // if (brk(new_value)) { - // return 0; - // } - let oldPages = memory.size(); - let newPages = (((new_value + 0xffff) & ~0xffff) >>> 16); - assert(newPages > oldPages); - if (memory.grow(newPages - oldPages) < 0) { - return 0; - } - // max_ptr = new_value; - max_ptr = newPages << 16; - } - return 1; -} - -/* - * Initialize a list to empty. Because these are circular lists, an "empty" - * list is an entry where both links point to itself. This makes insertion - * and removal simpler because they don't need any branches. - */ -function list_init(list: List): void { - list.prev = list; - list.next = list; -} - -/* - * Append the provided entry to the end of the list. This assumes the entry - * isn't in a list already because it overwrites the linked list pointers. - */ -function list_push(list: List, entry: List): void { - var prev = list.prev; - entry.prev = prev; - entry.next = list; - prev.next = entry; - list.prev = entry; -} - -/* - * Remove the provided entry from whichever list it's currently in. This - * assumes that the entry is in a list. You don't need to provide the list - * because the lists are circular, so the list's pointers will automatically - * be updated if the first or last entries are removed. - */ -function list_remove(entry: List): void { - var prev = entry.prev; - var next = entry.next; - prev.next = next; - next.prev = prev; -} - -/* - * Remove and return the first entry in the list or NULL if the list is empty. - */ -function list_pop(list: List): List | null { - var back = list.prev; - if (back == list) return null; - list_remove(back); - return back; -} - -/* - * This maps from the index of a node to the address of memory that node - * represents. The bucket can be derived from the index using a loop but is - * required to be provided here since having them means we can avoid the loop - * and have this function return in constant time. - */ -function ptr_for_node(index: usize, bucket: usize): usize { - return base_ptr + ((index - (1 << bucket) + 1) << (MAX_ALLOC_LOG2 - bucket)); -} - -/* - * This maps from an address of memory to the node that represents that - * address. There are often many nodes that all map to the same address, so - * the bucket is needed to uniquely identify a node. - */ -function node_for_ptr(ptr: usize, bucket: usize): usize { - return ((ptr - base_ptr) >> (MAX_ALLOC_LOG2 - bucket)) + (1 << bucket) - 1; -} - -/* - * Given the index of a node, this returns the "is split" flag of the parent. - */ -function parent_is_split(index: usize): bool { - index = (index - 1) / 2; - return ((node_is_split$get(index / 8) >>> (index % 8)) & 1) == 1; -} - -/* - * Given the index of a node, this flips the "is split" flag of the parent. - */ -function flip_parent_is_split(index: usize): void { - index = (index - 1) / 2; - var indexDiv8 = index / 8; - node_is_split$set(indexDiv8, - node_is_split$get(indexDiv8) ^ (1 << (index % 8)) - ); -} - -/* - * Given the requested size passed to "malloc", this function returns the index - * of the smallest bucket that can fit that size. - */ -function bucket_for_request(request: usize): usize { - var bucket = BUCKET_COUNT - 1; - var size = MIN_ALLOC; - - while (size < request) { - bucket--; - size *= 2; - } - - return bucket; -} - -/* - * The tree is always rooted at the current bucket limit. This call grows the - * tree by repeatedly doubling it in size until the root lies at the provided - * bucket index. Each doubling lowers the bucket limit by 1. - */ -function lower_bucket_limit(bucket: usize): u32 { - while (bucket < bucket_limit) { - let root = node_for_ptr(base_ptr, bucket_limit); - let right_child: usize; - - /* - * If the parent isn't SPLIT, that means the node at the current bucket - * limit is UNUSED and our address space is entirely free. In that case, - * clear the root free list, increase the bucket limit, and add a single - * block with the newly-expanded address space to the new root free list. - */ - if (!parent_is_split(root)) { - list_remove(changetype(base_ptr)); - list_init(buckets$get(--bucket_limit)); - list_push(buckets$get(bucket_limit), changetype(base_ptr)); - continue; - } - - /* - * Otherwise, the tree is currently in use. Create a parent node for the - * current root node in the SPLIT state with a right child on the free - * list. Make sure to reserve the memory for the free list entry before - * writing to it. Note that we do not need to flip the "is split" flag for - * our current parent because it's already on (we know because we just - * checked it above). - */ - right_child = ptr_for_node(root + 1, bucket_limit); - if (!update_max_ptr(right_child + List.SIZE)) { - return 0; - } - list_push(buckets$get(bucket_limit), changetype(right_child)); - list_init(buckets$get(--bucket_limit)); - - /* - * Set the grandparent's SPLIT flag so if we need to lower the bucket limit - * again, we'll know that the new root node we just added is in use. - */ - root = (root - 1) / 2; - if (root != 0) { - flip_parent_is_split(root); - } - } - - return 1; -} - -// Memory allocator implementation -@global namespace memory { - - export function allocate(request: usize): usize { - var original_bucket: usize, bucket: usize; - - /* - * Make sure it's possible for an allocation of this size to succeed. There's - * a hard-coded limit on the maximum allocation size because of the way this - * allocator works. - */ - if (request > MAX_ALLOC - HEADER_SIZE) unreachable(); - - /* - * Initialize our global state if this is the first call to "malloc". At the - * beginning, the tree has a single node that represents the smallest - * possible allocation size. More memory will be reserved later as needed. - */ - if (base_ptr == 0) { - // base_ptr = max_ptr = (uint8_t *)sbrk(0); - base_ptr = (NODE_IS_SPLIT_END + 7) & ~7; // must be aligned - max_ptr = memory.size() << 16; // must grow first - bucket_limit = BUCKET_COUNT - 1; - if (!update_max_ptr(base_ptr + List.SIZE)) { - return 0; - } - list_init(buckets$get(BUCKET_COUNT - 1)); - list_push(buckets$get(BUCKET_COUNT - 1), changetype(base_ptr)); - } - - /* - * Find the smallest bucket that will fit this request. This doesn't check - * that there's space for the request yet. - */ - bucket = bucket_for_request(request + HEADER_SIZE); - original_bucket = bucket; - - /* - * Search for a bucket with a non-empty free list that's as large or larger - * than what we need. If there isn't an exact match, we'll need to split a - * larger one to get a match. - */ - while (bucket + 1 != 0) { - let size: usize, bytes_needed: usize, i: usize; - let ptr: usize; - - /* - * We may need to grow the tree to be able to fit an allocation of this - * size. Try to grow the tree and stop here if we can't. - */ - if (!lower_bucket_limit(bucket)) { - return 0; - } - - /* - * Try to pop a block off the free list for this bucket. If the free list - * is empty, we're going to have to split a larger block instead. - */ - ptr = changetype(list_pop(buckets$get(bucket))); - if (!ptr) { - /* - * If we're not at the root of the tree or it's impossible to grow the - * tree any more, continue on to the next bucket. - */ - if (bucket != bucket_limit || bucket == 0) { - bucket--; - continue; - } - - /* - * Otherwise, grow the tree one more level and then pop a block off the - * free list again. Since we know the root of the tree is used (because - * the free list was empty), this will add a parent above this node in - * the SPLIT state and then add the new right child node to the free list - * for this bucket. Popping the free list will give us this right child. - */ - if (!lower_bucket_limit(bucket - 1)) { - return 0; - } - ptr = changetype(list_pop(buckets$get(bucket))); - } - - /* - * Try to expand the address space first before going any further. If we - * have run out of space, put this block back on the free list and fail. - */ - size = 1 << (MAX_ALLOC_LOG2 - bucket); - bytes_needed = bucket < original_bucket ? size / 2 + List.SIZE : size; - if (!update_max_ptr(ptr + bytes_needed)) { - list_push(buckets$get(bucket), changetype(ptr)); - return 0; - } - - /* - * If we got a node off the free list, change the node from UNUSED to USED. - * This involves flipping our parent's "is split" bit because that bit is - * the exclusive-or of the UNUSED flags of both children, and our UNUSED - * flag (which isn't ever stored explicitly) has just changed. - * - * Note that we shouldn't ever need to flip the "is split" bit of our - * grandparent because we know our buddy is USED so it's impossible for our - * grandparent to be UNUSED (if our buddy chunk was UNUSED, our parent - * wouldn't ever have been split in the first place). - */ - i = node_for_ptr(ptr, bucket); - if (i != 0) { - flip_parent_is_split(i); - } - - /* - * If the node we got is larger than we need, split it down to the correct - * size and put the new unused child nodes on the free list in the - * corresponding bucket. This is done by repeatedly moving to the left - * child, splitting the parent, and then adding the right child to the free - * list. - */ - while (bucket < original_bucket) { - i = i * 2 + 1; - bucket++; - flip_parent_is_split(i); - list_push( - buckets$get(bucket), - changetype(ptr_for_node(i + 1, bucket)) - ); - } - - /* - * Now that we have a memory address, write the block header (just the size - * of the allocation) and return the address immediately after the header. - */ - store(ptr, request); - return ptr + HEADER_SIZE; - } - - return 0; - } - - export function free(ptr: usize): void { - var bucket: usize, i: usize; - - /* - * Ignore any attempts to free a NULL pointer. - */ - if (!ptr) { - return; - } - - /* - * We were given the address returned by "malloc" so get back to the actual - * address of the node by subtracting off the size of the block header. Then - * look up the index of the node corresponding to this address. - */ - ptr = ptr - HEADER_SIZE; - bucket = bucket_for_request(load(ptr) + HEADER_SIZE); - i = node_for_ptr(ptr, bucket); - - /* - * Traverse up to the root node, flipping USED blocks to UNUSED and merging - * UNUSED buddies together into a single UNUSED parent. - */ - while (i != 0) { - /* - * Change this node from UNUSED to USED. This involves flipping our - * parent's "is split" bit because that bit is the exclusive-or of the - * UNUSED flags of both children, and our UNUSED flag (which isn't ever - * stored explicitly) has just changed. - */ - flip_parent_is_split(i); - - /* - * If the parent is now SPLIT, that means our buddy is USED, so don't merge - * with it. Instead, stop the iteration here and add ourselves to the free - * list for our bucket. - * - * Also stop here if we're at the current root node, even if that root node - * is now UNUSED. Root nodes don't have a buddy so we can't merge with one. - */ - if (parent_is_split(i) || bucket == bucket_limit) { - break; - } - - /* - * If we get here, we know our buddy is UNUSED. In this case we should - * merge with that buddy and continue traversing up to the root node. We - * need to remove the buddy from its free list here but we don't need to - * add the merged parent to its free list yet. That will be done once after - * this loop is finished. - */ - list_remove(changetype(ptr_for_node(((i - 1) ^ 1) + 1, bucket))); - i = (i - 1) / 2; - bucket--; - } - - /* - * Add ourselves to the free list for our bucket. We add to the back of the - * list because "malloc" takes from the back of the list and we want a "free" - * followed by a "malloc" of the same size to ideally use the same address - * for better memory locality. - */ - list_push(buckets$get(bucket), changetype(ptr_for_node(i, bucket))); - } -} diff --git a/std/assembly/allocator/emscripten.ts b/std/assembly/allocator/emscripten.ts index e34a4bd93a..3ab1d08362 100644 --- a/std/assembly/allocator/emscripten.ts +++ b/std/assembly/allocator/emscripten.ts @@ -1,24 +1,10 @@ -/** - * Emscripten Memory Allocator. - * - * Uses Emscripten's exported _malloc and _free implementations, i.e., when linking with - * Emscripten-compiled programs that already provide these. Differs from 'system' in that their - * names are prefixed with an underscore. - * - * @module std/assembly/allocator/emscripten - *//***/ +@unsafe declare function _malloc(size: usize): usize; +@unsafe declare function _free(ptr: usize): void; -declare function _malloc(size: usize): usize; -declare function _free(ptr: usize): void; - -// Memory allocator implementation -@global namespace memory { - - @inline export function allocate(size: usize): usize { - return _malloc(size); - } +@unsafe @global function __memory_allocate(size: usize): usize { + return _malloc(size); +} - @inline export function free(ptr: usize): void { - _free(ptr); - } +@unsafe @global function __memory_free(ptr: usize): void { + _free(ptr); } diff --git a/std/assembly/allocator/system.ts b/std/assembly/allocator/system.ts index 46dd382738..1c88cbe269 100644 --- a/std/assembly/allocator/system.ts +++ b/std/assembly/allocator/system.ts @@ -1,23 +1,10 @@ -/** - * System Memory Allocator. - * - * Uses the environment's malloc and free implementations, i.e., when linking with other C-like - * programs that already provide these. - * - * @module std/assembly/allocator/system - *//***/ +@unsafe declare function malloc(size: usize): usize; +@unsafe declare function free(ptr: usize): void; -declare function malloc(size: usize): usize; -declare function free(ptr: usize): void; - -// Memory allocator interface -@global namespace memory { - - @inline export function allocate(size: usize): usize { - return malloc(size); - } +@unsafe @global function __memory_allocate(size: usize): usize { + return malloc(size); +} - @inline export function free(ptr: usize): void { - free(ptr); - } +@unsafe @global function __memory_free(ptr: usize): void { + free(ptr); } diff --git a/std/assembly/allocator/tlsf.ts b/std/assembly/allocator/tlsf.ts index 4d2b9faf79..ec766ffb64 100644 --- a/std/assembly/allocator/tlsf.ts +++ b/std/assembly/allocator/tlsf.ts @@ -1,12 +1,3 @@ -/** - * Two-Level Segregate Fit Memory Allocator. - * - * A general purpose dynamic memory allocator specifically designed to meet real-time requirements. - * Always aligns to 8 bytes. - * - * @module std/assembly/allocator/tlsf - *//***/ - // ╒══════════════ Block size interpretation (32-bit) ═════════════╕ // 3 2 1 // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits @@ -16,6 +7,7 @@ // FL: first level, SL: second level, AL: alignment, SB: small block import { AL_BITS, AL_SIZE, AL_MASK } from "../util/allocator"; +import { HEAP_BASE, memory } from "../memory"; const SL_BITS: u32 = 5; const SL_SIZE: usize = 1 << SL_BITS; @@ -429,68 +421,64 @@ function fls(word: T): T { /** Reference to the initialized {@link Root} structure, once initialized. */ var ROOT: Root = changetype(0); -// Memory allocator interface -@global namespace memory { - - /** Allocates a chunk of memory. */ - export function allocate(size: usize): usize { - // initialize if necessary - var root = ROOT; - if (!root) { - let rootOffset = (HEAP_BASE + AL_MASK) & ~AL_MASK; - let pagesBefore = memory.size(); - let pagesNeeded = ((((rootOffset + Root.SIZE) + 0xffff) & ~0xffff) >>> 16); - if (pagesNeeded > pagesBefore && memory.grow(pagesNeeded - pagesBefore) < 0) unreachable(); - ROOT = root = changetype(rootOffset); - root.tailRef = 0; - root.flMap = 0; - for (let fl: usize = 0; fl < FL_BITS; ++fl) { - root.setSLMap(fl, 0); - for (let sl: u32 = 0; sl < SL_SIZE; ++sl) { - root.setHead(fl, sl, null); - } +/** Allocates a chunk of memory. */ +@unsafe @global function __memory_allocate(size: usize): usize { + // initialize if necessary + var root = ROOT; + if (!root) { + let rootOffset = (HEAP_BASE + AL_MASK) & ~AL_MASK; + let pagesBefore = memory.size(); + let pagesNeeded = ((((rootOffset + Root.SIZE) + 0xffff) & ~0xffff) >>> 16); + if (pagesNeeded > pagesBefore && memory.grow(pagesNeeded - pagesBefore) < 0) unreachable(); + ROOT = root = changetype(rootOffset); + root.tailRef = 0; + root.flMap = 0; + for (let fl: usize = 0; fl < FL_BITS; ++fl) { + root.setSLMap(fl, 0); + for (let sl: u32 = 0; sl < SL_SIZE; ++sl) { + root.setHead(fl, sl, null); } - root.addMemory((rootOffset + Root.SIZE + AL_MASK) & ~AL_MASK, memory.size() << 16); } + root.addMemory((rootOffset + Root.SIZE + AL_MASK) & ~AL_MASK, memory.size() << 16); + } - // search for a suitable block - if (size > Block.MAX_SIZE) unreachable(); + // search for a suitable block + if (size > Block.MAX_SIZE) unreachable(); - // 32-bit MAX_SIZE is 1 << 30 and itself aligned, hence the following can't overflow MAX_SIZE - size = max((size + AL_MASK) & ~AL_MASK, Block.MIN_SIZE); + // 32-bit MAX_SIZE is 1 << 30 and itself aligned, hence the following can't overflow MAX_SIZE + size = max((size + AL_MASK) & ~AL_MASK, Block.MIN_SIZE); - var block = root.search(size); - if (!block) { + var block = root.search(size); + if (!block) { - // request more memory - let pagesBefore = memory.size(); - let pagesNeeded = (((size + 0xffff) & ~0xffff) >>> 16); - let pagesWanted = max(pagesBefore, pagesNeeded); // double memory - if (memory.grow(pagesWanted) < 0) { - if (memory.grow(pagesNeeded) < 0) { - unreachable(); // out of memory - } + // request more memory + let pagesBefore = memory.size(); + let pagesNeeded = (((size + 0xffff) & ~0xffff) >>> 16); + let pagesWanted = max(pagesBefore, pagesNeeded); // double memory + if (memory.grow(pagesWanted) < 0) { + if (memory.grow(pagesNeeded) < 0) { + unreachable(); // out of memory } - let pagesAfter = memory.size(); - root.addMemory(pagesBefore << 16, pagesAfter << 16); - block = assert(root.search(size)); // must be found now } - - assert((block.info & ~TAGS) >= size); - return root.use(block, size); + let pagesAfter = memory.size(); + root.addMemory(pagesBefore << 16, pagesAfter << 16); + block = assert(root.search(size)); // must be found now } - /** Frees the chunk of memory at the specified address. */ - export function free(data: usize): void { - if (data) { - let root = ROOT; - if (root) { - let block = changetype(data - Block.INFO); - let blockInfo = block.info; - assert(!(blockInfo & FREE)); // must be used - block.info = blockInfo | FREE; - root.insert(changetype(data - Block.INFO)); - } + assert((block.info & ~TAGS) >= size); + return root.use(block, size); +} + +/** Frees the chunk of memory at the specified address. */ +@unsafe @global function __memory_free(data: usize): void { + if (data) { + let root = ROOT; + if (root) { + let block = changetype(data - Block.INFO); + let blockInfo = block.info; + assert(!(blockInfo & FREE)); // must be used + block.info = blockInfo | FREE; + root.insert(changetype(data - Block.INFO)); } } } diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 7602991014..b56cad5e92 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -1,4 +1,4 @@ -import { ALLOC, REALLOC, REGISTER, LINK, FREE, ArrayBufferView } from "./runtime"; +import { runtime, ArrayBufferView } from "./runtime"; import { ArrayBuffer } from "./arraybuffer"; import { COMPARATOR, SORT } from "./util/sort"; import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number"; @@ -36,7 +36,7 @@ export class Array extends ArrayBufferView { const MAX_LENGTH = ArrayBufferView.MAX_BYTELENGTH >>> alignof(); if (length > MAX_LENGTH) throw new RangeError("Invalid array length"); let newCapacity = length << alignof(); - let newData = REALLOC(changetype(oldData), newCapacity); // registers on move + let newData = runtime.realloc(changetype(oldData), newCapacity); // registers on move if (newData !== changetype(oldData)) { this.data = changetype(newData); // links this.dataStart = newData; @@ -76,7 +76,7 @@ export class Array extends ArrayBufferView { private __set(index: i32, value: T): void { this.resize(index + 1); store(this.dataStart + (index << alignof()), value); - if (isManaged()) LINK(changetype(value), changetype(this)); + if (isManaged()) runtime.link(changetype(value), changetype(this)); if (index >= this.length_) this.length_ = index + 1; } @@ -141,7 +141,7 @@ export class Array extends ArrayBufferView { this.resize(newLength); this.length_ = newLength; store(this.dataStart + ((newLength - 1) << alignof()), element); - if (isManaged()) LINK(changetype(element), changetype(this)); + if (isManaged()) runtime.link(changetype(element), changetype(this)); return newLength; } @@ -156,14 +156,14 @@ export class Array extends ArrayBufferView { for (let offset: usize = 0; offset < thisSize; offset += sizeof()) { let element = load(thisStart + offset); store(outStart + offset, element); - LINK(changetype(element), changetype(out)); + runtime.link(changetype(element), changetype(out)); } let otherStart = other.dataStart; let otherSize = otherLen << alignof(); for (let offset: usize = 0; offset < otherSize; offset += sizeof()) { let element = load(otherStart + offset); store(outStart + thisSize + offset, element); - LINK(changetype(element), changetype(out)); + runtime.link(changetype(element), changetype(out)); } } else { memory.copy(outStart, this.dataStart, thisSize); @@ -221,7 +221,7 @@ export class Array extends ArrayBufferView { let value = load(this.dataStart + (index << alignof())); let result = callbackfn(value, index, this); store(outStart + (index << alignof()), result); - if (isManaged()) LINK(changetype(result), changetype(out)); + if (isManaged()) runtime.link(changetype(result), changetype(out)); } return out; } @@ -290,7 +290,7 @@ export class Array extends ArrayBufferView { (newLength - 1) << alignof() ); store(base, element); - if (isManaged()) LINK(changetype(element), changetype(this)); + if (isManaged()) runtime.link(changetype(element), changetype(this)); this.length_ = newLength; return newLength; } @@ -307,7 +307,7 @@ export class Array extends ArrayBufferView { let offset = i << alignof(); let element = load(thisBase + offset); store(sliceBase + offset, element); - if (isManaged()) LINK(changetype(element), changetype(slice)); + if (isManaged()) runtime.link(changetype(element), changetype(slice)); } return slice; } @@ -323,7 +323,7 @@ export class Array extends ArrayBufferView { for (let i = 0; i < deleteCount; ++i) { let element = load(thisBase + (i << alignof())); store(spliceStart + (i << alignof()), element); - if (isManaged()) LINK(changetype(element), changetype(splice)); + if (isManaged()) runtime.link(changetype(element), changetype(splice)); } memory.copy( splice.dataStart, @@ -395,7 +395,7 @@ export class Array extends ArrayBufferView { var sepLen = separator.length; var valueLen = 5; // max possible length of element len("false") var estLen = (valueLen + sepLen) * lastIndex + valueLen; - var result = ALLOC(estLen << 1); + var result = runtime.alloc(estLen << 1); var offset = 0; var value: bool; for (let i = 0; i < lastIndex; ++i) { @@ -427,10 +427,10 @@ export class Array extends ArrayBufferView { if (estLen > offset) { let trimmed = changetype(result).substring(0, offset); - FREE(result); + runtime.free(result); return trimmed; // registered in .substring } - return REGISTER(result); + return runtime.register(result); } private join_int(separator: string = ","): string { @@ -442,7 +442,7 @@ export class Array extends ArrayBufferView { var sepLen = separator.length; const valueLen = (sizeof() <= 4 ? 10 : 20) + isSigned(); var estLen = (valueLen + sepLen) * lastIndex + valueLen; - var result = ALLOC(estLen << 1); + var result = runtime.alloc(estLen << 1); var offset = 0; var value: T; for (let i = 0; i < lastIndex; ++i) { @@ -461,10 +461,10 @@ export class Array extends ArrayBufferView { offset += itoa_stream(result, offset, value); if (estLen > offset) { let trimmed = changetype(result).substring(0, offset); - FREE(result); + runtime.free(result); return trimmed; // registered in .substring } - return REGISTER(result); + return runtime.register(result); } private join_flt(separator: string = ","): string { @@ -476,7 +476,7 @@ export class Array extends ArrayBufferView { const valueLen = MAX_DOUBLE_LENGTH; var sepLen = separator.length; var estLen = (valueLen + sepLen) * lastIndex + valueLen; - var result = ALLOC(estLen << 1); + var result = runtime.alloc(estLen << 1); var offset = 0; var value: T; for (let i = 0; i < lastIndex; ++i) { @@ -495,10 +495,10 @@ export class Array extends ArrayBufferView { offset += dtoa_stream(result, offset, value); if (estLen > offset) { let trimmed = changetype(result).substring(0, offset); - FREE(result); + runtime.free(result); return trimmed; // registered in .substring } - return REGISTER(result); + return runtime.register(result); } private join_str(separator: string = ","): string { @@ -513,7 +513,7 @@ export class Array extends ArrayBufferView { estLen += load(dataStart + (i << alignof())).length; } var offset = 0; - var result = ALLOC((estLen + sepLen * lastIndex) << 1); + var result = runtime.alloc((estLen + sepLen * lastIndex) << 1); var value: String; for (let i = 0; i < lastIndex; ++i) { value = load(dataStart + (i << alignof())); @@ -544,7 +544,7 @@ export class Array extends ArrayBufferView { valueLen << 1 ); } - return REGISTER(result); + return runtime.register(result); } private join_arr(separator: string = ","): string { @@ -578,7 +578,7 @@ export class Array extends ArrayBufferView { const valueLen = 15; // max possible length of element len("[object Object]") var sepLen = separator.length; var estLen = (valueLen + sepLen) * lastIndex + valueLen; - var result = ALLOC(estLen << 1); + var result = runtime.alloc(estLen << 1); var offset = 0; var value: T; for (let i = 0; i < lastIndex; ++i) { @@ -610,10 +610,10 @@ export class Array extends ArrayBufferView { } if (estLen > offset) { let out = changetype(result).substring(0, offset); - FREE(result); + runtime.free(result); return out; // registered in .substring } - return REGISTER(result); + return runtime.register(result); } @inline diff --git a/std/assembly/arraybuffer.ts b/std/assembly/arraybuffer.ts index 03e02f951c..0b9af20179 100644 --- a/std/assembly/arraybuffer.ts +++ b/std/assembly/arraybuffer.ts @@ -1,4 +1,4 @@ -import { HEADER, ALLOC_RAW, ALLOC, REGISTER, ArrayBufferView } from "./runtime"; +import { runtime, ArrayBufferView } from "./runtime"; @sealed export class ArrayBuffer { @@ -22,11 +22,11 @@ import { HEADER, ALLOC_RAW, ALLOC, REGISTER, ArrayBufferView } from "./runtime"; constructor(length: i32) { if (length > ArrayBufferView.MAX_BYTELENGTH) throw new RangeError("Invalid array buffer length"); - return REGISTER(ALLOC(length)); + return runtime.register(runtime.alloc(length)); } get byteLength(): i32 { - return changetype
(changetype(this) - HEADER_SIZE).payloadSize; + return changetype(changetype(this) - runtime.Header.SIZE).payloadSize; } slice(begin: i32 = 0, end: i32 = ArrayBufferView.MAX_BYTELENGTH): ArrayBuffer { @@ -34,9 +34,9 @@ import { HEADER, ALLOC_RAW, ALLOC, REGISTER, ArrayBufferView } from "./runtime"; begin = begin < 0 ? max(length + begin, 0) : min(begin, length); end = end < 0 ? max(length + end , 0) : min(end , length); var outSize = max(end - begin, 0); - var out = ALLOC_RAW(outSize); + var out = runtime.allocRaw(outSize); memory.copy(out, changetype(this) + begin, outSize); - return REGISTER(out); + return runtime.register(out); } toString(): string { diff --git a/std/assembly/builtins.ts b/std/assembly/builtins.ts index 13fa6245e1..75190b5a44 100644 --- a/std/assembly/builtins.ts +++ b/std/assembly/builtins.ts @@ -13,7 +13,6 @@ @builtin export declare function isFunction(value?: T): bool; @builtin export declare function isNullable(value?: T): bool; @builtin export declare function isDefined(expression: void): bool; -@builtin export declare function isImplemented(expression: void): bool; @builtin export declare function isConstant(expression: void): bool; @builtin export declare function isManaged(value?: T): bool; @inline export function isNaN(value: T): bool { return value != value; } diff --git a/std/assembly/collector/itcm.ts b/std/assembly/collector/itcm.ts index bd1d37f916..27fb146f41 100644 --- a/std/assembly/collector/itcm.ts +++ b/std/assembly/collector/itcm.ts @@ -1,9 +1,3 @@ -/** - * Incremental Tri-Color-Marking Garbage Collector. - * - * @module std/assembly/collector/itcm - *//***/ - // Largely based on Bach Le's μgc, see: https://github.com/bullno1/ugc @inline const TRACE = false; @@ -11,8 +5,8 @@ /** Size of a managed object header. */ @inline export const HEADER_SIZE: usize = (offsetof() + AL_MASK) & ~AL_MASK; -import { AL_MASK, MAX_SIZE_32 } from "../internal/allocator"; -import { __rt_iterateroots } from "../builtins"; +import { AL_MASK, MAX_SIZE_32 } from "../util/allocator"; +import { gc } from "../gc"; /** Collector states. */ const enum State { @@ -142,7 +136,7 @@ function step(): void { } case State.IDLE: { if (TRACE) trace("gc~step/IDLE"); - __rt_iterateroots(__gc_mark); + gc.iterateRoots(__gc_mark); state = State.MARK; if (TRACE) trace("gc~state = MARK"); break; @@ -163,7 +157,7 @@ function step(): void { obj.hookFn(objToRef(obj)); } else { if (TRACE) trace("gc~step/MARK finish"); - __rt_iterateroots(__gc_mark); + gc.iterateRoots(__gc_mark); obj = iter.next; if (obj === toSpace) { let from = fromSpace; @@ -202,9 +196,7 @@ function step(): void { return changetype(obj) + HEADER_SIZE; } -// Garbage collector interface - -@global export function __gc_allocate( +@global @unsafe export function __gc_allocate( // TODO: make this register only / reuse header size: usize, markFn: (ref: usize) => void ): usize { @@ -218,13 +210,13 @@ function step(): void { return objToRef(obj); } -@global export function __gc_link(parentRef: usize, childRef: usize): void { +@global @unsafe export function __gc_link(parentRef: usize, childRef: usize): void { if (TRACE) trace("gc.link", 2, parentRef, childRef); var parent = refToObj(parentRef); if (parent.color == !white && refToObj(childRef).color == white) parent.makeGray(); } -@global export function __gc_mark(ref: usize): void { +@global @unsafe export function __gc_mark(ref: usize): void { if (TRACE) trace("gc.mark", 1, ref); if (ref) { let obj = refToObj(ref); @@ -232,7 +224,7 @@ function step(): void { } } -@global export function __gc_collect(): void { +@global @unsafe export function __gc_collect(): void { if (TRACE) trace("gc.collect"); // begin collecting if not yet collecting switch (state) { diff --git a/std/assembly/dataview.ts b/std/assembly/dataview.ts index 12c8817d1e..92fe52b866 100644 --- a/std/assembly/dataview.ts +++ b/std/assembly/dataview.ts @@ -1,4 +1,5 @@ import { ArrayBuffer } from "./arraybuffer"; +import { ArrayBufferView } from "./runtime"; export class DataView { @@ -12,7 +13,7 @@ export class DataView { byteLength: i32 = i32.MIN_VALUE // FIXME ) { if (byteLength === i32.MIN_VALUE) byteLength = buffer.byteLength - byteOffset; // FIXME - if (byteLength > ArrayBuffer.MAX_BYTELENGTH) throw new RangeError("Invalid byteLength"); + if (byteLength > ArrayBufferView.MAX_BYTELENGTH) throw new RangeError("Invalid byteLength"); if (byteOffset + byteLength > buffer.byteLength) throw new RangeError("Invalid length"); this.data = buffer; // links var dataStart = changetype(buffer) + byteOffset; diff --git a/std/assembly/diagnostics.ts b/std/assembly/diagnostics.ts index 9e797ad187..291f45b4b5 100644 --- a/std/assembly/diagnostics.ts +++ b/std/assembly/diagnostics.ts @@ -1,5 +1,3 @@ -/* tslint:disable */ - -@builtin export declare function ERROR(message?: void): void; -@builtin export declare function WARNING(message?: void): void; -@builtin export declare function INFO(message?: void): void; +@builtin export declare function ERROR(message?: string): void; +@builtin export declare function WARNING(message?: string): void; +@builtin export declare function INFO(message?: string): void; diff --git a/std/assembly/gc.ts b/std/assembly/gc.ts index 36a06745ec..b226d39d91 100644 --- a/std/assembly/gc.ts +++ b/std/assembly/gc.ts @@ -1,30 +1,37 @@ /** Garbage collector interface. */ export namespace gc { + /** Whether the garbage collector interface is implemented. */ + @lazy export const implemented: bool = isDefined(__gc_register); + /** Gets the computed unique class id of a class type. */ - @builtin @unsafe export declare function classId(): u32; + @unsafe @builtin export declare function classId(): u32; /** Iterates reference root objects. */ - @builtin @unsafe export declare function iterateRoots(fn: (ref: usize) => void): void; + @unsafe @builtin export declare function iterateRoots(fn: (ref: usize) => void): void; /** Registers a managed object to be tracked by the garbage collector. */ - @stub @unsafe export function register(ref: usize): void { - ERROR("stub: missing garbage collector"); + @unsafe export function register(ref: usize): void { + if (isDefined(__gc_register)) __gc_register(ref); + else ERROR("missing implementation: gc.register"); } /** Links a registered object with the registered object now referencing it. */ - @stub @unsafe export function link(ref: usize, parentRef: usize): void { - ERROR("stub: missing garbage collector"); + @unsafe export function link(ref: usize, parentRef: usize): void { + if (isDefined(__gc_link)) __gc_link(ref, parentRef); + else ERROR("missing implementation: gc.link"); } /** Marks an object as being reachable. */ - @stub @unsafe export function mark(ref: usize): void { - ERROR("stub: missing garbage collector"); + @unsafe export function mark(ref: usize): void { + if (isDefined(__gc_mark)) __gc_mark(ref); + else ERROR("missing implementation: gc.mark"); } /** Performs a full garbage collection cycle. */ - @stub export function collect(): void { - WARNING("stub: missing garbage collector"); + export function collect(): void { + if (isDefined(__gc_collect)) __gc_collect(); + else WARNING("missing implementation: gc.collect"); } } diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index 27d983fe99..bafda5386c 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -144,8 +144,6 @@ declare function isFunction(value?: any): value is (...args: any) => any; declare function isNullable(value?: any): bool; /** Tests if the specified expression resolves to a defined element. Compiles to a constant. */ declare function isDefined(expression: any): bool; -/** Tests if the specified expression resolves to an implemented (non-stub) element. Compiles to a constant. */ -declare function isImplemented(expression: any): bool; /** Tests if the specified expression evaluates to a constant value. Compiles to a constant. */ declare function isConstant(expression: any): bool; /** Tests if the specified type *or* expression is of a managed type. Compiles to a constant. */ @@ -1519,6 +1517,13 @@ declare function inline( descriptor: TypedPropertyDescriptor ): TypedPropertyDescriptor | void; +/** Annotates a method, function or constant global as unsafe. */ +declare function unsafe( + target: any, + propertyKey: string, + descriptor: TypedPropertyDescriptor +): TypedPropertyDescriptor | void; + /** Annotates an explicit external name of a function or global. */ declare function external(namespace: string, name: string): ( target: any, diff --git a/std/assembly/map.ts b/std/assembly/map.ts index 7c549124fb..2152b929de 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -1,4 +1,4 @@ -import { LINK } from "./runtime"; +import { runtime } from "./runtime"; import { HASH } from "./util/hash"; // A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht @@ -108,8 +108,8 @@ export class Map { let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE; entry.taggedNext = load(bucketPtrBase); store(bucketPtrBase, changetype(entry)); - if (isManaged()) LINK(changetype(key), changetype(this)); - if (isManaged()) LINK(changetype(value), changetype(this)); + if (isManaged()) runtime.link(changetype(key), changetype(this)); + if (isManaged()) runtime.link(changetype(value), changetype(this)); } } diff --git a/std/assembly/memory.ts b/std/assembly/memory.ts index c37ad9b5d2..260bc5e36d 100644 --- a/std/assembly/memory.ts +++ b/std/assembly/memory.ts @@ -1,5 +1,7 @@ import { memcmp, memmove, memset } from "./util/memory"; +@builtin export declare const HEAP_BASE: usize; + /** Memory manager interface. */ export namespace memory { @@ -7,15 +9,15 @@ export namespace memory { @builtin export declare function size(): i32; /** Grows the memory by the given size in pages and returns the previous size in pages. */ - @builtin @unsafe export declare function grow(pages: i32): i32; + @unsafe @builtin export declare function grow(pages: i32): i32; /** Fills a section in memory with the specified byte value. */ - @builtin @unsafe @inline export function fill(dst: usize, c: u8, n: usize): void { + @unsafe @builtin export function fill(dst: usize, c: u8, n: usize): void { memset(dst, c, n); // fallback if "bulk-memory" isn't enabled } /** Copies a section of memory to another. Has move semantics. */ - @builtin @unsafe @inline export function copy(dst: usize, src: usize, n: usize): void { + @unsafe @builtin export function copy(dst: usize, src: usize, n: usize): void { memmove(dst, src, n); // fallback if "bulk-memory" isn't enabled } @@ -30,24 +32,22 @@ export namespace memory { } /** Dynamically allocates a section of memory and returns its address. */ - @stub @inline export function allocate(size: usize): usize { - ERROR("stub: missing memory manager"); + @unsafe export function allocate(size: usize): usize { + if (isDefined(__memory_allocate)) return __memory_allocate(size); + else ERROR("missing implementation: memory.allocate"); return unreachable(); } /** Dynamically frees a section of memory by the previously allocated address. */ - @stub @unsafe @inline export function free(ptr: usize): void { - ERROR("stub: missing memory manager"); + @unsafe export function free(ptr: usize): void { + if (isDefined(__memory_free)) __memory_free(ptr); + else ERROR("missing implementation: memory.free"); } /** Resets the memory to its initial state. Arena allocator only. */ - @stub @unsafe @inline export function reset(): void { - ERROR("stub: not supported by memory manager"); - } - - /** Compares a section of memory to another. */ - @inline export function compare(vl: usize, vr: usize, n: usize): i32 { - return memcmp(vl, vr, n); + @unsafe export function reset(): void { + if (isDefined(__memory_reset)) __memory_reset(); + else ERROR("missing implementation: memory.reset"); } /** Repeats a section of memory at a specific address. */ @@ -59,4 +59,9 @@ export namespace memory { index += srcLength; } } + + /** Compares a section of memory to another. */ + @inline export function compare(vl: usize, vr: usize, n: usize): i32 { + return memcmp(vl, vr, n); + } } diff --git a/std/assembly/polyfills.ts b/std/assembly/polyfills.ts index ab09a47791..00274f9451 100644 --- a/std/assembly/polyfills.ts +++ b/std/assembly/polyfills.ts @@ -1,4 +1,4 @@ -export function bswap(value: T): T { +export function bswap(value: T): T { if (isInteger()) { if (sizeof() == 2) { return ((value << 8) | ((value >> 8) & 0x00FF)); @@ -25,7 +25,7 @@ export function bswap(value: T): T { return value; } -@inline export function bswap16(value: T): T { +@inline export function bswap16(value: T): T { if (isInteger() && sizeof() <= 4) { if (sizeof() == 2) { return ((value << 8) | ((value >> 8) & 0x00FF)); diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 4c046e2fe6..d6b5727fa6 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -1,139 +1,143 @@ import { AL_MASK, MAX_SIZE_32 } from "./util/allocator"; +import { HEAP_BASE, memory } from "./memory"; +import { gc } from "./gc"; + +/** Common runtime. */ +export namespace runtime { + + /** Common runtime header of all objects. */ + @unmanaged export class Header { + + /** Size of a runtime header. */ + @lazy @inline static readonly SIZE: usize = gc.implemented + ? (offsetof
( ) + AL_MASK) & ~AL_MASK // full header if GC is present + : (offsetof
("gc1") + AL_MASK) & ~AL_MASK; // half header if GC is absent + + /** Magic value used to validate runtime headers. */ + @lazy @inline static readonly MAGIC: u32 = 0xA55E4B17; + + /** Unique id of the respective class or a magic value if not yet registered.*/ + classId: u32; + /** Size of the allocated payload. */ + payloadSize: u32; + /** Reserved field for use by GC. Only present if GC is. */ + gc1: usize; // itcm: tagged next + /** Reserved field for use by GC. Only present if GC is. */ + gc2: usize; // itcm: prev + } -@builtin export declare const HEAP_BASE: usize; - -/** Common runtime header of all objects. */ -@unmanaged export class HEADER { - /** Unique id of the respective class or a magic value if not yet registered.*/ - classId: u32; - /** Size of the allocated payload. */ - payloadSize: u32; - /** Reserved field for use by GC. Only present if GC is. */ - gc1: usize; // itcm: tagged next - /** Reserved field for use by GC. Only present if GC is. */ - gc2: usize; // itcm: prev -} - -// Note that header data and layout isn't quite optimal depending on which allocator one -// decides to use, but it's done this way for maximum flexibility. Also remember that the -// runtime will most likely change significantly once reftypes and WASM GC are a thing. - -/** Whether a GC is present or not. */ -@inline export const GC = isImplemented(gc.register); - -/** Size of the common runtime header. */ -@inline export const HEADER_SIZE: usize = GC - ? (offsetof
( ) + AL_MASK) & ~AL_MASK // full header if GC is present - : (offsetof
("gc1") + AL_MASK) & ~AL_MASK; // half header if GC is absent - -/** Magic value used to validate common runtime headers. */ -@inline export const HEADER_MAGIC: u32 = 0xA55E4B17; - -/** Adjusts an allocation to actual block size. Primarily targets TLSF. */ -export function ADJUST(payloadSize: usize): usize { - // round up to power of 2, e.g. with HEADER_SIZE=8: - // 0 -> 2^3 = 8 - // 1..8 -> 2^4 = 16 - // 9..24 -> 2^5 = 32 - // ... - // MAX_LENGTH -> 2^30 = 0x40000000 (MAX_SIZE_32) - return 1 << (32 - clz(payloadSize + HEADER_SIZE - 1)); -} + // Note that header data and layout isn't quite optimal depending on which allocator one + // decides to use, but it's done this way for maximum flexibility. Also remember that the + // runtime will most likely change significantly once reftypes and WASM GC are a thing. + + /** Adjusts an allocation to actual block size. Primarily targets TLSF. */ + function adjust(payloadSize: usize): usize { + // round up to power of 2, e.g. with HEADER_SIZE=8: + // 0 -> 2^3 = 8 + // 1..8 -> 2^4 = 16 + // 9..24 -> 2^5 = 32 + // ... + // MAX_LENGTH -> 2^30 = 0x40000000 (MAX_SIZE_32) + return 1 << (32 - clz(payloadSize + Header.SIZE - 1)); + } -/** Allocates a new object and returns a pointer to its payload. Does not fill. */ -@unsafe export function ALLOC_RAW(payloadSize: u32): usize { - var header = changetype
(memory.allocate(ADJUST(payloadSize))); - header.classId = HEADER_MAGIC; - header.payloadSize = payloadSize; - if (GC) { - header.gc1 = 0; - header.gc2 = 0; + /** Allocates a new object and returns a pointer to its payload. Does not fill. */ + @unsafe export function allocRaw(payloadSize: u32): usize { + var header = changetype
(memory.allocate(adjust(payloadSize))); + header.classId = Header.MAGIC; + header.payloadSize = payloadSize; + if (gc.implemented) { + header.gc1 = 0; + header.gc2 = 0; + } + return changetype(header) + Header.SIZE; } - return changetype(header) + HEADER_SIZE; -} -/** Allocates a new object and returns a pointer to its payload. Fills with zeroes.*/ -@unsafe export function ALLOC(payloadSize: u32): usize { - var ref = ALLOC_RAW(payloadSize); - memory.fill(ref, 0, payloadSize); - return ref; -} + /** Allocates a new object and returns a pointer to its payload. Fills with zeroes.*/ + @unsafe export function alloc(payloadSize: u32): usize { + var ref = allocRaw(payloadSize); + memory.fill(ref, 0, payloadSize); + return ref; + } -/** Reallocates an object if necessary. Returns a pointer to its (moved) payload. */ -@unsafe export function REALLOC(ref: usize, newPayloadSize: u32): usize { - // Background: When managed objects are allocated these aren't immediately registered with GC - // but can be used as scratch objects while unregistered. This is useful in situations where - // the object must be reallocated multiple times because its final size isn't known beforehand, - // e.g. in Array#filter, with only the final object making it into GC'ed userland. - var header = changetype
(ref - HEADER_SIZE); - var payloadSize = header.payloadSize; - if (payloadSize < newPayloadSize) { - let newAdjustedSize = ADJUST(newPayloadSize); - if (select(ADJUST(payloadSize), 0, ref > HEAP_BASE) < newAdjustedSize) { - // move if the allocation isn't large enough or not a heap object - let newHeader = changetype
(memory.allocate(newAdjustedSize)); - newHeader.classId = HEADER_MAGIC; - if (GC) { - newHeader.gc1 = 0; - newHeader.gc2 = 0; - } - let newRef = changetype(newHeader) + HEADER_SIZE; - memory.copy(newRef, ref, payloadSize); - memory.fill(newRef + payloadSize, 0, newPayloadSize - payloadSize); - if (header.classId == HEADER_MAGIC) { - // free right away if not registered yet - assert(ref > HEAP_BASE); // static objects aren't scratch objects - memory.free(changetype(header)); - } else if (GC) { - // if previously registered, register again - gc.register(ref); + /** Reallocates an object if necessary. Returns a pointer to its (moved) payload. */ + @unsafe export function realloc(ref: usize, newPayloadSize: u32): usize { + // Background: When managed objects are allocated these aren't immediately registered with GC + // but can be used as scratch objects while unregistered. This is useful in situations where + // the object must be reallocated multiple times because its final size isn't known beforehand, + // e.g. in Array#filter, with only the final object making it into GC'ed userland. + var header = changetype
(ref - Header.SIZE); + var payloadSize = header.payloadSize; + if (payloadSize < newPayloadSize) { + let newAdjustedSize = adjust(newPayloadSize); + if (select(adjust(payloadSize), 0, ref > HEAP_BASE) < newAdjustedSize) { + // move if the allocation isn't large enough or not a heap object + let newHeader = changetype
(memory.allocate(newAdjustedSize)); + newHeader.classId = Header.MAGIC; + if (gc.implemented) { + newHeader.gc1 = 0; + newHeader.gc2 = 0; + } + let newRef = changetype(newHeader) + Header.SIZE; + memory.copy(newRef, ref, payloadSize); + memory.fill(newRef + payloadSize, 0, newPayloadSize - payloadSize); + if (header.classId == Header.MAGIC) { + // free right away if not registered yet + assert(ref > HEAP_BASE); // static objects aren't scratch objects + memory.free(changetype(header)); + } else if (gc.implemented) { + // if previously registered, register again + gc.register(ref); + } + header = newHeader; + ref = newRef; + } else { + // otherwise just clear additional memory within this block + memory.fill(ref + payloadSize, 0, newPayloadSize - payloadSize); } - header = newHeader; - ref = newRef; } else { - // otherwise just clear additional memory within this block - memory.fill(ref + payloadSize, 0, newPayloadSize - payloadSize); + // if the size is the same or less, just update the header accordingly. + // unused space is cleared when grown, so no need to do this here. } - } else { - // if the size is the same or less, just update the header accordingly. - // unused space is cleared when grown, so no need to do this here. + header.payloadSize = newPayloadSize; + return ref; } - header.payloadSize = newPayloadSize; - return ref; -} -function unref(ref: usize): HEADER { - assert(ref >= HEAP_BASE + HEADER_SIZE); // must be a heap object - var header = changetype
(ref - HEADER_SIZE); - assert(header.classId == HEADER_MAGIC); // must be unregistered - return header; -} + function unref(ref: usize): Header { + assert(ref >= HEAP_BASE + Header.SIZE); // must be a heap object + var header = changetype
(ref - Header.SIZE); + assert(header.classId == Header.MAGIC); // must be unregistered + return header; + } -/** Frees an object. Must not have been registered with GC yet. */ -@unsafe @inline export function FREE(ref: T): void { - memory.free(changetype(unref(changetype(ref)))); -} + /** Frees an object. Must not have been registered with GC yet. */ + @unsafe @inline export function free(ref: T): void { + memory.free(changetype(unref(changetype(ref)))); + } -/** Registers a managed object. Cannot be free'd anymore afterwards. */ -@unsafe @inline export function REGISTER(ref: usize): T { - if (!isReference()) ERROR("reference expected"); - // see comment in REALLOC why this is useful. also inline this because - // it's generic so we don't get a bunch of functions. - unref(ref).classId = gc.classId(); - if (GC) gc.register(ref); - return changetype(ref); -} + /** Registers a managed object. Cannot be free'd anymore afterwards. */ + @unsafe @inline export function register(ref: usize): T { + if (!isReference()) ERROR("reference expected"); + // see comment in REALLOC why this is useful. also inline this because + // it's generic so we don't get a bunch of functions. + unref(ref).classId = gc.classId(); + if (gc.implemented) gc.register(ref); + return changetype(ref); + } -/** Links a managed object with its managed parent. */ -@unsafe @inline export function LINK(ref: T, parentRef: TParent): void { - assert(changetype(ref) >= HEAP_BASE + HEADER_SIZE); // must be a heap object - var header = changetype
(changetype(ref) - HEADER_SIZE); - assert(header.classId != HEADER_MAGIC && header.gc1 != 0 && header.gc2 != 0); // must be registered - if (GC) gc.link(changetype(ref), changetype(parentRef)); // tslint:disable-line + /** Links a managed object with its managed parent. */ + @unsafe @inline export function link(ref: T, parentRef: TParent): void { + assert(changetype(ref) >= HEAP_BASE + Header.SIZE); // must be a heap object + var header = changetype
(changetype(ref) - Header.SIZE); + assert(header.classId != Header.MAGIC && header.gc1 != 0 && header.gc2 != 0); // must be registered + if (gc.implemented) gc.link(changetype(ref), changetype(parentRef)); // tslint:disable-line + } } +import { ArrayBuffer } from "./arraybuffer"; + export abstract class ArrayBufferView { - @lazy static readonly MAX_BYTELENGTH: i32 = MAX_SIZE_32 - HEADER_SIZE; + @lazy static readonly MAX_BYTELENGTH: i32 = MAX_SIZE_32 - runtime.Header.SIZE; [key: number]: number; @@ -158,7 +162,7 @@ export abstract class ArrayBufferView { } get length(): i32 { - ERROR("concrete implementation must provide this"); + ERROR("missing implementation: [T extends ArrayBufferView]#length"); return unreachable(); } } diff --git a/std/assembly/set.ts b/std/assembly/set.ts index 09e5da5f31..bac34da219 100644 --- a/std/assembly/set.ts +++ b/std/assembly/set.ts @@ -1,4 +1,4 @@ -import { LINK } from "./runtime"; +import { runtime } from "./runtime"; import { HASH } from "./util/hash"; // A deterministic hash set based on CloseTable from https://github.com/jorendorff/dht @@ -98,7 +98,7 @@ export class Set { let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE; entry.taggedNext = load(bucketPtrBase); store(bucketPtrBase, changetype(entry)); - if (isManaged()) LINK(changetype(key), changetype(this)); // tslint:disable-line + if (isManaged()) runtime.link(changetype(key), changetype(this)); // tslint:disable-line } } diff --git a/std/assembly/string.ts b/std/assembly/string.ts index e0c07daa5d..2765333bc2 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -1,25 +1,25 @@ -import { HEADER, HEADER_SIZE, ALLOC, REGISTER, ArrayBufferView } from "./runtime"; +import { runtime } from "./runtime"; import { MAX_SIZE_32 } from "./util/allocator"; import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./util/string"; @sealed export abstract class String { - @lazy static readonly MAX_LENGTH: i32 = (MAX_SIZE_32 - HEADER_SIZE) >> alignof(); + @lazy static readonly MAX_LENGTH: i32 = (MAX_SIZE_32 - runtime.Header.SIZE) >> alignof(); get length(): i32 { - return changetype
(changetype(this) - HEADER_SIZE).payloadSize >> 1; + return changetype(changetype(this) - runtime.Header.SIZE).payloadSize >> 1; } // TODO Add and handle second argument static fromCharCode(code: i32): String { - var out = ALLOC(2); + var out = runtime.allocRaw(2); store(out, code); - return REGISTER(out); + return runtime.register(out); } static fromCodePoint(code: i32): String { assert(code <= 0x10FFFF); var sur = code > 0xFFFF; - var out = ALLOC((sur + 1) << 1); + var out = runtime.allocRaw((sur + 1) << 1); if (!sur) { store(out, code); } else { @@ -28,15 +28,15 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut let lo: u32 = (code & 0x3FF) + 0xDC00; store(out, (hi << 16) | lo); } - return REGISTER(out); + return runtime.register(out); } @operator("[]") charAt(pos: i32): String { assert(this !== null); if (pos >= this.length) return changetype(""); - var out = ALLOC(2); + var out = runtime.allocRaw(2); store(out, load(changetype(this) + (pos << 1))); - return REGISTER(out); + return runtime.register(out); } charCodeAt(pos: i32): i32 { @@ -67,10 +67,10 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var otherSize: isize = other.length << 1; var outSize: usize = thisSize + otherSize; if (outSize == 0) return changetype(""); - var out = ALLOC(outSize); + var out = runtime.allocRaw(outSize); memory.copy(out, changetype(this), thisSize); memory.copy(out + thisSize, changetype(other), otherSize); - return REGISTER(out); + return runtime.register(out); } endsWith(searchString: String, endPosition: i32 = String.MAX_LENGTH): bool { @@ -173,9 +173,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut if (intStart < 0) intStart = max(size + intStart, 0); var resultLength = min(max(end, 0), size - intStart); if (resultLength <= 0) return changetype(""); - var out = ALLOC(resultLength << 1); + var out = runtime.allocRaw(resultLength << 1); memory.copy(out, changetype(this) + intStart, resultLength); - return REGISTER(out); + return runtime.register(out); } substring(start: i32, end: i32 = i32.MAX_VALUE): String { @@ -188,9 +188,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut len = toPos - fromPos; if (!len) return changetype(""); if (!fromPos && toPos == this.length << 1) return this; - var out = ALLOC(len); + var out = runtime.allocRaw(len); memory.copy(out, changetype(this) + fromPos, len); - return REGISTER(out); + return runtime.register(out); } trim(): String { @@ -216,9 +216,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut } if (!size) return changetype(""); if (!start && size == length << 1) return this; - var out = ALLOC(size); + var out = runtime.allocRaw(size); memory.copy(out, changetype(this) + offset, size); - return REGISTER(out); + return runtime.register(out); } @inline @@ -246,9 +246,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut if (!offset) return this; size -= offset; if (!size) return changetype(""); - var out = ALLOC(size); + var out = runtime.allocRaw(size); memory.copy(out, changetype(this) + offset, size); - return REGISTER(out); + return runtime.register(out); } trimEnd(): String { @@ -265,9 +265,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut } if (!size) return changetype(""); if (size == originalSize) return this; - var out = ALLOC(size); + var out = runtime.allocRaw(size); memory.copy(out, changetype(this), size); - return REGISTER(out); + return runtime.register(out); } padStart(targetLength: i32, padString: string = " "): String { @@ -277,7 +277,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var padSize = padString.length << 1; if (targetSize < thisSize || !padSize) return this; var prependSize = targetSize - thisSize; - var out = ALLOC(targetSize); + var out = runtime.allocRaw(targetSize); if (prependSize > padSize) { let repeatCount = (prependSize - 2) / padSize; let restBase = repeatCount * padSize; @@ -288,7 +288,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut memory.copy(out, changetype(padString), prependSize); } memory.copy(out + prependSize, changetype(this), thisSize); - return REGISTER(out); + return runtime.register(out); } padEnd(targetLength: i32, padString: string = " "): String { @@ -298,7 +298,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var padSize = padString.length << 1; if (targetSize < thisSize || !padSize) return this; var appendSize = targetSize - thisSize; - var out = ALLOC(targetSize); + var out = runtime.allocRaw(targetSize); memory.copy(out, changetype(this), thisSize); if (appendSize > padSize) { let repeatCount = (appendSize - 2) / padSize; @@ -309,7 +309,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut } else { memory.copy(out + thisSize, changetype(padString), appendSize); } - return REGISTER(out); + return runtime.register(out); } repeat(count: i32 = 0): String { @@ -323,9 +323,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut if (count == 0 || !length) return changetype(""); if (count == 1) return this; - var out = ALLOC((length * count) << 1); + var out = runtime.allocRaw((length * count) << 1); memory.repeat(out, changetype(this), length << 1, count); - return REGISTER(out); + return runtime.register(out); } slice(beginIndex: i32, endIndex: i32 = i32.MAX_VALUE): String { @@ -334,9 +334,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var end = endIndex < 0 ? max(endIndex + len, 0) : min(endIndex, len); len = end - begin; if (len <= 0) return changetype(""); - var out = ALLOC(len << 1); + var out = runtime.allocRaw(len << 1); memory.copy(out, changetype(this) + (begin << 1), len << 1); - return REGISTER(out); + return runtime.register(out); } split(separator: String | null = null, limit: i32 = i32.MAX_VALUE): String[] { @@ -354,7 +354,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut let buffer = unreachable(); // TODO // let buffer = result.buffer_; for (let i: isize = 0; i < length; ++i) { - let char = ALLOC(2); + let char = runtime.allocRaw(2); store( changetype(char), load( @@ -374,9 +374,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut while ((end = this.indexOf(separator!, start)) != -1) { let len = end - start; if (len > 0) { - let out = ALLOC(len << 1); + let out = runtime.allocRaw(len << 1); memory.copy(out, changetype(this) + (start << 1), len << 1); - result.push(REGISTER(out)); + result.push(runtime.register(out)); } else { result.push(changetype("")); } @@ -390,9 +390,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut } var len = length - start; if (len > 0) { - let out = ALLOC(len << 1); + let out = runtime.allocRaw(len << 1); memory.copy(out, changetype(this) + (start << 1), len << 1); - result.push(REGISTER(out)); + result.push(runtime.register(out)); } else { result.push(changetype("")); } @@ -464,10 +464,10 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut } } assert(ptrPos == len); - var out = ALLOC(bufPos); + var out = runtime.allocRaw(bufPos); memory.copy(changetype(out), buf, bufPos); memory.free(buf); - return REGISTER(out); + return runtime.register(out); } toUTF8(): usize { diff --git a/std/assembly/table.ts b/std/assembly/table.ts index b0f9c1cdda..cc312ade58 100644 --- a/std/assembly/table.ts +++ b/std/assembly/table.ts @@ -1,16 +1,14 @@ export namespace table { - // export function copy(dst: u32, src: u32, n: u32): void { - // __table_copy(dst, src, n); - // } + export function copy(dst: u32, src: u32, n: u32): void { + ERROR("not implemented: table.copy"); + } - // Passive elements + export function init(elementIndex: u32, srcOffset: u32, dstOffset: u32, n: u32): void { + ERROR("not implemented: table.init"); + } - // export function init(elementIndex: u32, srcOffset: u32, dstOffset: u32, n: u32): void { - // __table_init(elementIndex, srcOffset, dstOffset, n); - // } - - // export function drop(elementIndex: u32): void { - // __table_drop(elementIndex); - // } + export function drop(elementIndex: u32): void { + ERROR("not implemented: table.drop"); + } } diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index e8720c6c4a..2f1b89b942 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -1,4 +1,4 @@ -import { ALLOC, REGISTER, LINK, ArrayBufferView } from "./runtime"; +import { runtime, ArrayBufferView } from "./runtime"; import { COMPARATOR, SORT as SORT_IMPL } from "./util/sort"; function clampToByte(value: i32): i32 { @@ -720,11 +720,11 @@ export class Float64Array extends ArrayBufferView { else begin = min(begin, length); if (end < 0) end = max(length + end, begin); else end = max(min(end, length), begin); - var out = ALLOC(offsetof()); + var out = runtime.allocRaw(offsetof()); store(out, buffer, offsetof("buffer")); store(out, array.dataStart + (begin << alignof()) , offsetof("dataStart")); store(out, array.dataEnd + ((end - begin) << alignof()), offsetof("dataEnd")); - LINK(buffer, REGISTER(out)); // register first, then link + runtime.link(buffer, runtime.register(out)); // register first, then link return changetype(out); } diff --git a/std/assembly/util/number.ts b/std/assembly/util/number.ts index 970fe78534..45dbefe1d1 100644 --- a/std/assembly/util/number.ts +++ b/std/assembly/util/number.ts @@ -1,4 +1,4 @@ -import { ALLOC, REGISTER, FREE } from "../runtime"; +import { runtime } from "../runtime"; import { CharCode } from "./string"; @inline export const MAX_DOUBLE_LENGTH = 28; @@ -254,10 +254,10 @@ export function utoa32(value: u32): String { if (!value) return "0"; var decimals = decimalCount32(value); - var out = ALLOC(decimals << 1); + var out = runtime.alloc(decimals << 1); utoa32_core(changetype(out), value, decimals); - return REGISTER(out); + return runtime.register(out); } export function itoa32(value: i32): String { @@ -267,12 +267,12 @@ export function itoa32(value: i32): String { if (sign) value = -value; var decimals = decimalCount32(value) + sign; - var out = ALLOC(decimals << 1); + var out = runtime.alloc(decimals << 1); utoa32_core(changetype(out), value, decimals); if (sign) store(changetype(out), CharCode.MINUS); - return REGISTER(out); + return runtime.register(out); } export function utoa64(value: u64): String { @@ -282,14 +282,14 @@ export function utoa64(value: u64): String { if (value <= u32.MAX_VALUE) { let val32 = value; let decimals = decimalCount32(val32); - out = ALLOC(decimals << 1); + out = runtime.alloc(decimals << 1); utoa32_core(out, val32, decimals); } else { let decimals = decimalCount64(value); - out = ALLOC(decimals << 1); + out = runtime.alloc(decimals << 1); utoa64_core(changetype(out), value, decimals); } - return REGISTER(out); + return runtime.register(out); } export function itoa64(value: i64): String { @@ -302,16 +302,16 @@ export function itoa64(value: i64): String { if (value <= u32.MAX_VALUE) { let val32 = value; let decimals = decimalCount32(val32) + sign; - out = ALLOC(decimals << 1); + out = runtime.alloc(decimals << 1); utoa32_core(changetype(out), val32, decimals); } else { let decimals = decimalCount64(value) + sign; - out = ALLOC(decimals << 1); + out = runtime.alloc(decimals << 1); utoa64_core(changetype(out), value, decimals); } if (sign) store(changetype(out), CharCode.MINUS); - return REGISTER(out); + return runtime.register(out); } export function itoa(value: T): String { @@ -594,10 +594,10 @@ export function dtoa(value: f64): String { if (isNaN(value)) return "NaN"; return select("-Infinity", "Infinity", value < 0); } - var temp = ALLOC(MAX_DOUBLE_LENGTH << 1); + var temp = runtime.alloc(MAX_DOUBLE_LENGTH << 1); var length = dtoa_core(temp, value); var result = changetype(temp).substring(0, length); - FREE(temp); + runtime.free(temp); return result; } diff --git a/tests/compiler/empty.ts b/tests/compiler/empty.ts index 25da6068b4..e69de29bb2 100644 --- a/tests/compiler/empty.ts +++ b/tests/compiler/empty.ts @@ -1,9 +0,0 @@ -import "allocator/arena"; - -var arr = new Uint8Array(8); -arr[0] = 10; -arr[4] = 5; -var arr2 = arr.sort(); -arr2.forEach(x => { - trace("", 1, x); -}); diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 9607eba6f9..95f0f5e01f 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -18,7 +18,7 @@ (data (i32.const 152) "\01\00\00\00\10\00\00\00b\00a\00r\00r\00i\00e\00r\003") (data (i32.const 176) "\01\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) - (elem (i32.const 0) $std/runtime/gc.collect) + (elem (i32.const 0) $null) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $std/runtime/register_ref (mut i32) (i32.const 0)) (global $std/runtime/barrier1 (mut i32) (i32.const 0)) @@ -34,9 +34,6 @@ (global $std/runtime/ref5 (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "gc.register" (func $std/runtime/gc.register)) - (export "gc.link" (func $std/runtime/gc.link)) - (export "gc.collect" (func $std/runtime/gc.collect)) (start $start) (func $~lib/allocator/tlsf/Root#setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 @@ -45,7 +42,7 @@ if i32.const 0 i32.const 16 - i32.const 140 + i32.const 132 i32.const 4 call $~lib/env/abort unreachable @@ -65,7 +62,7 @@ if i32.const 0 i32.const 16 - i32.const 163 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -76,7 +73,7 @@ if i32.const 0 i32.const 16 - i32.const 164 + i32.const 156 i32.const 4 call $~lib/env/abort unreachable @@ -102,7 +99,7 @@ if i32.const 0 i32.const 16 - i32.const 85 + i32.const 77 i32.const 4 call $~lib/env/abort unreachable @@ -120,7 +117,7 @@ if i32.const 0 i32.const 16 - i32.const 86 + i32.const 78 i32.const 11 call $~lib/env/abort unreachable @@ -133,7 +130,7 @@ if i32.const 0 i32.const 16 - i32.const 424 + i32.const 416 i32.const 2 call $~lib/env/abort unreachable @@ -150,7 +147,7 @@ if i32.const 0 i32.const 16 - i32.const 154 + i32.const 146 i32.const 4 call $~lib/env/abort unreachable @@ -161,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 155 + i32.const 147 i32.const 4 call $~lib/env/abort unreachable @@ -184,7 +181,7 @@ if i32.const 0 i32.const 16 - i32.const 134 + i32.const 126 i32.const 4 call $~lib/env/abort unreachable @@ -210,7 +207,7 @@ if i32.const 0 i32.const 16 - i32.const 254 + i32.const 246 i32.const 4 call $~lib/env/abort unreachable @@ -233,7 +230,7 @@ if i32.const 0 i32.const 16 - i32.const 256 + i32.const 248 i32.const 4 call $~lib/env/abort unreachable @@ -334,7 +331,7 @@ if i32.const 0 i32.const 16 - i32.const 77 + i32.const 69 i32.const 4 call $~lib/env/abort unreachable @@ -348,7 +345,7 @@ if i32.const 0 i32.const 16 - i32.const 78 + i32.const 70 i32.const 11 call $~lib/env/abort unreachable @@ -364,7 +361,7 @@ if i32.const 0 i32.const 16 - i32.const 330 + i32.const 322 i32.const 4 call $~lib/env/abort unreachable @@ -376,7 +373,7 @@ if i32.const 0 i32.const 16 - i32.const 331 + i32.const 323 i32.const 4 call $~lib/env/abort unreachable @@ -389,7 +386,7 @@ if i32.const 0 i32.const 16 - i32.const 332 + i32.const 324 i32.const 4 call $~lib/env/abort unreachable @@ -411,7 +408,7 @@ if i32.const 0 i32.const 16 - i32.const 185 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -425,7 +422,7 @@ if i32.const 0 i32.const 16 - i32.const 187 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -449,7 +446,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 181 i32.const 4 call $~lib/env/abort unreachable @@ -461,7 +458,7 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 185 i32.const 23 call $~lib/env/abort unreachable @@ -503,7 +500,7 @@ if i32.const 0 i32.const 16 - i32.const 207 + i32.const 199 i32.const 24 call $~lib/env/abort unreachable @@ -517,7 +514,7 @@ if i32.const 0 i32.const 16 - i32.const 209 + i32.const 201 i32.const 6 call $~lib/env/abort unreachable @@ -566,7 +563,7 @@ if i32.const 0 i32.const 16 - i32.const 222 + i32.const 214 i32.const 4 call $~lib/env/abort unreachable @@ -645,7 +642,7 @@ if i32.const 0 i32.const 16 - i32.const 373 + i32.const 365 i32.const 4 call $~lib/env/abort unreachable @@ -656,7 +653,7 @@ if i32.const 0 i32.const 16 - i32.const 374 + i32.const 366 i32.const 4 call $~lib/env/abort unreachable @@ -667,7 +664,7 @@ if i32.const 0 i32.const 16 - i32.const 375 + i32.const 367 i32.const 4 call $~lib/env/abort unreachable @@ -684,7 +681,7 @@ if i32.const 0 i32.const 16 - i32.const 380 + i32.const 372 i32.const 6 call $~lib/env/abort unreachable @@ -712,7 +709,7 @@ if i32.const 0 i32.const 16 - i32.const 389 + i32.const 381 i32.const 6 call $~lib/env/abort unreachable @@ -765,7 +762,7 @@ if i32.const 0 i32.const 16 - i32.const 418 + i32.const 410 i32.const 2 call $~lib/env/abort unreachable @@ -790,7 +787,7 @@ if i32.const 0 i32.const 16 - i32.const 292 + i32.const 284 i32.const 4 call $~lib/env/abort unreachable @@ -870,7 +867,7 @@ if i32.const 0 i32.const 16 - i32.const 319 + i32.const 311 i32.const 16 call $~lib/env/abort unreachable @@ -898,7 +895,7 @@ if i32.const 0 i32.const 16 - i32.const 344 + i32.const 336 i32.const 4 call $~lib/env/abort unreachable @@ -918,7 +915,7 @@ if i32.const 0 i32.const 16 - i32.const 345 + i32.const 337 i32.const 4 call $~lib/env/abort unreachable @@ -929,7 +926,7 @@ if i32.const 0 i32.const 16 - i32.const 346 + i32.const 338 i32.const 4 call $~lib/env/abort unreachable @@ -981,7 +978,7 @@ if i32.const 0 i32.const 16 - i32.const 364 + i32.const 356 i32.const 25 call $~lib/env/abort unreachable @@ -997,7 +994,7 @@ i32.const 8 i32.add ) - (func $~lib/allocator/tlsf/memory.allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__memory_allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1146,8 +1143,8 @@ else i32.const 0 i32.const 16 - i32.const 476 - i32.const 14 + i32.const 465 + i32.const 12 call $~lib/env/abort unreachable end @@ -1163,8 +1160,8 @@ if i32.const 0 i32.const 16 - i32.const 479 - i32.const 4 + i32.const 468 + i32.const 2 call $~lib/env/abort unreachable end @@ -1183,7 +1180,7 @@ i32.clz i32.sub i32.shl - call $~lib/allocator/tlsf/memory.allocate + call $~lib/allocator/tlsf/__memory_allocate local.tee $1 i32.const -1520547049 i32.store @@ -1419,16 +1416,21 @@ end end ) - (func $~lib/runtime/ALLOC (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.fill (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/util/memory/memset + ) + (func $~lib/runtime/ALLOC (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ALLOC_RAW local.tee $1 local.get $0 - call $~lib/util/memory/memset + call $~lib/memory/memory.fill local.get $1 ) - (func $~lib/util/memory/memcpy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2325,7 +2327,7 @@ i32.store8 end ) - (func $~lib/util/memory/memmove (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2523,7 +2525,7 @@ end end ) - (func $~lib/allocator/tlsf/memory.free (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__memory_free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2543,8 +2545,8 @@ if i32.const 0 i32.const 16 - i32.const 490 - i32.const 8 + i32.const 479 + i32.const 6 call $~lib/env/abort unreachable end @@ -2561,10 +2563,6 @@ end end ) - (func $std/runtime/gc.register (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.set $std/runtime/register_ref - ) (func $~lib/runtime/REALLOC (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2604,7 +2602,7 @@ i32.lt_u if local.get $4 - call $~lib/allocator/tlsf/memory.allocate + call $~lib/allocator/tlsf/__memory_allocate local.tee $5 i32.const -1520547049 i32.store @@ -2627,7 +2625,7 @@ local.get $1 local.get $2 i32.sub - call $~lib/util/memory/memset + call $~lib/memory/memory.fill local.get $3 i32.load i32.const -1520547049 @@ -2639,13 +2637,13 @@ if i32.const 0 i32.const 184 - i32.const 85 + i32.const 83 i32.const 8 call $~lib/env/abort unreachable end local.get $3 - call $~lib/allocator/tlsf/memory.free + call $~lib/allocator/tlsf/__memory_free else local.get $0 global.set $std/runtime/register_ref @@ -2661,7 +2659,7 @@ local.get $1 local.get $2 i32.sub - call $~lib/util/memory/memset + call $~lib/memory/memory.fill end end local.get $3 @@ -2676,7 +2674,7 @@ if i32.const 0 i32.const 184 - i32.const 106 + i32.const 104 i32.const 2 call $~lib/env/abort unreachable @@ -2691,7 +2689,7 @@ if i32.const 0 i32.const 184 - i32.const 108 + i32.const 106 i32.const 2 call $~lib/env/abort unreachable @@ -2715,20 +2713,20 @@ i32.clz i32.sub i32.shl - local.tee $1 + local.tee $2 i32.const 0 i32.ne - local.tee $2 - if (result i32) - local.get $1 + local.tee $1 + if + local.get $2 i32.const 1 i32.sub - local.get $1 + local.get $2 i32.and i32.eqz - else - local.get $2 + local.set $1 end + local.get $1 if local.get $0 i32.const 1 @@ -2738,7 +2736,7 @@ else i32.const 0 i32.const 72 - i32.const 38 + i32.const 36 i32.const 2 call $~lib/env/abort unreachable @@ -2756,6 +2754,7 @@ i32.const 1 i32.const 32 global.get $std/runtime/barrier2 + local.tee $1 i32.const 16 i32.add i32.clz @@ -2763,7 +2762,7 @@ i32.shl i32.const 1 i32.const 32 - global.get $std/runtime/barrier2 + local.get $1 i32.const 15 i32.add i32.clz @@ -2786,6 +2785,7 @@ i32.const 1 i32.const 32 global.get $std/runtime/barrier3 + local.tee $1 i32.const 16 i32.add i32.clz @@ -2793,7 +2793,7 @@ i32.shl i32.const 1 i32.const 32 - global.get $std/runtime/barrier3 + local.get $1 i32.const 15 i32.add i32.clz @@ -2849,7 +2849,7 @@ if i32.const 0 i32.const 72 - i32.const 53 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -2861,7 +2861,7 @@ if i32.const 0 i32.const 72 - i32.const 54 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -2875,7 +2875,7 @@ if i32.const 0 i32.const 72 - i32.const 55 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable @@ -2887,7 +2887,7 @@ if i32.const 0 i32.const 72 - i32.const 56 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -2902,7 +2902,7 @@ if i32.const 0 i32.const 72 - i32.const 58 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -2918,14 +2918,14 @@ if i32.const 0 i32.const 72 - i32.const 60 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref2 call $~lib/runtime/unref - call $~lib/allocator/tlsf/memory.free + call $~lib/allocator/tlsf/__memory_free global.get $std/runtime/barrier2 call $~lib/runtime/ALLOC global.set $std/runtime/ref3 @@ -2935,7 +2935,7 @@ if i32.const 0 i32.const 72 - i32.const 63 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -2956,7 +2956,7 @@ if i32.const 0 i32.const 72 - i32.const 67 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable @@ -2972,7 +2972,7 @@ if i32.const 0 i32.const 72 - i32.const 69 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -2984,7 +2984,7 @@ if i32.const 0 i32.const 72 - i32.const 70 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable @@ -3001,7 +3001,7 @@ if i32.const 0 i32.const 72 - i32.const 73 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable @@ -3017,19 +3017,16 @@ if i32.const 0 i32.const 72 - i32.const 74 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable end ) - (func $std/runtime/gc.link (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - nop + (func $start (; 27 ;) (type $FUNCSIG$v) + call $start:std/runtime ) - (func $std/runtime/gc.collect (; 28 ;) (type $FUNCSIG$v) + (func $null (; 28 ;) (type $FUNCSIG$v) nop ) - (func $start (; 29 ;) (type $FUNCSIG$v) - call $start:std/runtime - ) ) diff --git a/tests/compiler/std/runtime.ts b/tests/compiler/std/runtime.ts index 6611f2c1ab..14a78c8a6a 100644 --- a/tests/compiler/std/runtime.ts +++ b/tests/compiler/std/runtime.ts @@ -2,28 +2,20 @@ import "allocator/tlsf"; var register_ref: usize = 0; -@global namespace gc { - export function register(ref: usize): void { - register_ref = ref; - } - export function link(ref: usize, parentRef: usize): void { - } - export function collect(): void { - } +@global function __gc_register(ref: usize): void { + register_ref = ref; } -import { - HEADER, - HEADER_SIZE, - HEADER_MAGIC, - ADJUST, - ALLOC, - REALLOC, - FREE, - REGISTER, - ArrayBufferBase, - StringBase -} from "runtime"; +var link_ref: usize = 0; +var link_parentRef: usize = 0; + +@global function __gc_link(ref: usize, parentRef: usize): void { + link_ref = ref; + link_parentRef = parentRef; +} + +@global function __gc_collect(): void { +} class A {} class B {} @@ -33,42 +25,42 @@ function isPowerOf2(x: i32): bool { return x != 0 && (x & (x - 1)) == 0; } -assert(ADJUST(0) > 0); +assert(runtime.adjust(0) > 0); for (let i = 0; i < 9000; ++i) { - assert(isPowerOf2(ADJUST(i))); + assert(isPowerOf2(runtime.adjust(i))); } -var barrier1 = ADJUST(0); +var barrier1 = runtime.adjust(0); var barrier2 = barrier1 + 1; -while (ADJUST(barrier2 + 1) == ADJUST(barrier2)) ++barrier2; +while (runtime.adjust(barrier2 + 1) == runtime.adjust(barrier2)) ++barrier2; var barrier3 = barrier2 + 1; -while (ADJUST(barrier3 + 1) == ADJUST(barrier3)) ++barrier3; +while (runtime.adjust(barrier3 + 1) == runtime.adjust(barrier3)) ++barrier3; trace("barrier1", 1, barrier1); trace("barrier2", 1, barrier2); trace("barrier3", 1, barrier3); -var ref1 = ALLOC(1); -var header1 = changetype
(ref1 - HEADER_SIZE); -assert(header1.classId == HEADER_MAGIC); +var ref1 = runtime.alloc(1); +var header1 = changetype(ref1 - runtime.Header.SIZE); +assert(header1.classId == runtime.Header.MAGIC); assert(header1.payloadSize == 1); -assert(ref1 == REALLOC(ref1, barrier1)); // same segment +assert(ref1 == runtime.realloc(ref1, barrier1)); // same segment assert(header1.payloadSize == barrier1); -var ref2 = REALLOC(ref1, barrier2); +var ref2 = runtime.realloc(ref1, barrier2); assert(ref1 != ref2); // moves -var header2 = changetype
(ref2 - HEADER_SIZE); +var header2 = changetype(ref2 - runtime.Header.SIZE); assert(header2.payloadSize == barrier2); -FREE(ref2); -var ref3 = ALLOC(barrier2); +runtime.free(ref2); +var ref3 = runtime.alloc(barrier2); assert(ref1 == ref3); // reuses space of ref1 (free'd in realloc), ref2 (explicitly free'd) -var ref4 = ALLOC(barrier1); -REGISTER(ref4); // should call __REGISTER_IMPL +var ref4 = runtime.alloc(barrier1); +runtime.register(ref4); // should call __REGISTER_IMPL assert(register_ref == ref4); -var header4 = changetype
(register_ref - HEADER_SIZE); +var header4 = changetype(register_ref - runtime.Header.SIZE); assert(header4.classId == gc.classId()); assert(header4.payloadSize == barrier1); -var ref5 = ALLOC(10); -assert(changetype(ref5).byteLength == 10); -assert(changetype(ref5).length == 5); +var ref5 = runtime.alloc(10); +assert(changetype(ref5).byteLength == 10); +assert(changetype(ref5).length == 5); diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 4b6aa61108..b819238130 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -37,6 +37,7 @@ (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $std/runtime/register_ref (mut i32) (i32.const 0)) + (global $~lib/gc/gc.implemented i32 (i32.const 1)) (global $std/runtime/barrier1 (mut i32) (i32.const 0)) (global $std/runtime/barrier2 (mut i32) (i32.const 0)) (global $std/runtime/barrier3 (mut i32) (i32.const 0)) @@ -48,12 +49,9 @@ (global $std/runtime/ref4 (mut i32) (i32.const 0)) (global $std/runtime/header4 (mut i32) (i32.const 0)) (global $std/runtime/ref5 (mut i32) (i32.const 0)) - (global $~lib/runtime/HEAP_BASE i32 (i32.const 216)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 216)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "gc.register" (func $std/runtime/gc.register)) - (export "gc.link" (func $std/runtime/gc.link)) - (export "gc.collect" (func $std/runtime/gc.collect)) (start $start) (func $start:~lib/allocator/tlsf (; 2 ;) (type $FUNCSIG$v) i32.const 1 @@ -65,7 +63,7 @@ if i32.const 0 i32.const 16 - i32.const 118 + i32.const 110 i32.const 0 call $~lib/env/abort unreachable @@ -114,7 +112,7 @@ if i32.const 0 i32.const 16 - i32.const 140 + i32.const 132 i32.const 4 call $~lib/env/abort unreachable @@ -135,7 +133,7 @@ if i32.const 0 i32.const 16 - i32.const 163 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -147,7 +145,7 @@ if i32.const 0 i32.const 16 - i32.const 164 + i32.const 156 i32.const 4 call $~lib/env/abort unreachable @@ -180,7 +178,7 @@ if i32.const 0 i32.const 16 - i32.const 85 + i32.const 77 i32.const 4 call $~lib/env/abort unreachable @@ -200,7 +198,7 @@ if (result i32) i32.const 0 i32.const 16 - i32.const 86 + i32.const 78 i32.const 11 call $~lib/env/abort unreachable @@ -216,7 +214,7 @@ if i32.const 0 i32.const 16 - i32.const 424 + i32.const 416 i32.const 2 call $~lib/env/abort unreachable @@ -234,7 +232,7 @@ if i32.const 0 i32.const 16 - i32.const 154 + i32.const 146 i32.const 4 call $~lib/env/abort unreachable @@ -246,7 +244,7 @@ if i32.const 0 i32.const 16 - i32.const 155 + i32.const 147 i32.const 4 call $~lib/env/abort unreachable @@ -270,7 +268,7 @@ if i32.const 0 i32.const 16 - i32.const 134 + i32.const 126 i32.const 4 call $~lib/env/abort unreachable @@ -300,7 +298,7 @@ if i32.const 0 i32.const 16 - i32.const 254 + i32.const 246 i32.const 4 call $~lib/env/abort unreachable @@ -326,7 +324,7 @@ if i32.const 0 i32.const 16 - i32.const 256 + i32.const 248 i32.const 4 call $~lib/env/abort unreachable @@ -437,7 +435,7 @@ if i32.const 0 i32.const 16 - i32.const 77 + i32.const 69 i32.const 4 call $~lib/env/abort unreachable @@ -451,7 +449,7 @@ if (result i32) i32.const 0 i32.const 16 - i32.const 78 + i32.const 70 i32.const 11 call $~lib/env/abort unreachable @@ -468,7 +466,7 @@ if i32.const 0 i32.const 16 - i32.const 330 + i32.const 322 i32.const 4 call $~lib/env/abort unreachable @@ -481,7 +479,7 @@ if i32.const 0 i32.const 16 - i32.const 331 + i32.const 323 i32.const 4 call $~lib/env/abort unreachable @@ -494,7 +492,7 @@ if i32.const 0 i32.const 16 - i32.const 332 + i32.const 324 i32.const 4 call $~lib/env/abort unreachable @@ -520,7 +518,7 @@ if i32.const 0 i32.const 16 - i32.const 185 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -535,7 +533,7 @@ if i32.const 0 i32.const 16 - i32.const 187 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -561,7 +559,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 181 i32.const 4 call $~lib/env/abort unreachable @@ -573,7 +571,7 @@ if (result i32) i32.const 0 i32.const 16 - i32.const 193 + i32.const 185 i32.const 23 call $~lib/env/abort unreachable @@ -621,7 +619,7 @@ if (result i32) i32.const 0 i32.const 16 - i32.const 207 + i32.const 199 i32.const 24 call $~lib/env/abort unreachable @@ -639,7 +637,7 @@ if i32.const 0 i32.const 16 - i32.const 209 + i32.const 201 i32.const 6 call $~lib/env/abort unreachable @@ -694,7 +692,7 @@ if i32.const 0 i32.const 16 - i32.const 222 + i32.const 214 i32.const 4 call $~lib/env/abort unreachable @@ -785,7 +783,7 @@ if i32.const 0 i32.const 16 - i32.const 373 + i32.const 365 i32.const 4 call $~lib/env/abort unreachable @@ -798,7 +796,7 @@ if i32.const 0 i32.const 16 - i32.const 374 + i32.const 366 i32.const 4 call $~lib/env/abort unreachable @@ -811,7 +809,7 @@ if i32.const 0 i32.const 16 - i32.const 375 + i32.const 367 i32.const 4 call $~lib/env/abort unreachable @@ -832,7 +830,7 @@ if i32.const 0 i32.const 16 - i32.const 380 + i32.const 372 i32.const 6 call $~lib/env/abort unreachable @@ -861,7 +859,7 @@ if i32.const 0 i32.const 16 - i32.const 389 + i32.const 381 i32.const 6 call $~lib/env/abort unreachable @@ -932,7 +930,7 @@ if i32.const 0 i32.const 16 - i32.const 418 + i32.const 410 i32.const 2 call $~lib/env/abort unreachable @@ -948,7 +946,7 @@ if i32.const 0 i32.const 16 - i32.const 418 + i32.const 410 i32.const 2 call $~lib/env/abort unreachable @@ -978,7 +976,7 @@ if i32.const 0 i32.const 16 - i32.const 292 + i32.const 284 i32.const 4 call $~lib/env/abort unreachable @@ -1074,7 +1072,7 @@ else i32.const 0 i32.const 16 - i32.const 319 + i32.const 311 i32.const 16 call $~lib/env/abort unreachable @@ -1111,7 +1109,7 @@ if i32.const 0 i32.const 16 - i32.const 344 + i32.const 336 i32.const 4 call $~lib/env/abort unreachable @@ -1131,7 +1129,7 @@ if i32.const 0 i32.const 16 - i32.const 345 + i32.const 337 i32.const 4 call $~lib/env/abort unreachable @@ -1144,7 +1142,7 @@ if i32.const 0 i32.const 16 - i32.const 346 + i32.const 338 i32.const 4 call $~lib/env/abort unreachable @@ -1204,7 +1202,7 @@ if (result i32) i32.const 0 i32.const 16 - i32.const 364 + i32.const 356 i32.const 25 call $~lib/env/abort unreachable @@ -1225,7 +1223,7 @@ global.get $~lib/allocator/tlsf/Block.INFO i32.add ) - (func $~lib/allocator/tlsf/memory.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__memory_allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1238,7 +1236,7 @@ local.get $1 i32.eqz if - global.get $~lib/runtime/HEAP_BASE + global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add i32.const 7 @@ -1430,8 +1428,8 @@ if (result i32) i32.const 0 i32.const 16 - i32.const 476 - i32.const 14 + i32.const 465 + i32.const 12 call $~lib/env/abort unreachable else @@ -1451,8 +1449,8 @@ if i32.const 0 i32.const 16 - i32.const 479 - i32.const 4 + i32.const 468 + i32.const 2 call $~lib/env/abort unreachable end @@ -1461,11 +1459,16 @@ local.get $0 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/ALLOC_RAW (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/tlsf/__memory_allocate + return + ) + (func $~lib/runtime/ALLOC_RAW (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUST - call $~lib/allocator/tlsf/memory.allocate + call $~lib/memory/memory.allocate local.set $1 local.get $1 i32.const -1520547049 @@ -1483,7 +1486,7 @@ i32.const 16 i32.add ) - (func $~lib/util/memory/memset (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memset (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) @@ -1737,29 +1740,24 @@ end end ) - (func $~lib/runtime/ALLOC (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.fill (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memset + ) + (func $~lib/runtime/ALLOC (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) local.get $0 call $~lib/runtime/ALLOC_RAW local.set $1 - block $~lib/runtime/memory.fill|inlined.0 - local.get $1 - local.set $2 - i32.const 0 - local.set $3 - local.get $0 - local.set $4 - local.get $2 - local.get $3 - local.get $4 - call $~lib/util/memory/memset - end + local.get $1 + i32.const 0 + local.get $0 + call $~lib/memory/memory.fill local.get $1 ) - (func $~lib/util/memory/memcpy (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2960,7 +2958,7 @@ i32.store8 end ) - (func $~lib/util/memory/memmove (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 local.get $1 @@ -3187,7 +3185,13 @@ end end ) - (func $~lib/allocator/tlsf/memory.free (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.copy (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) + (func $~lib/allocator/tlsf/__memory_free (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3212,8 +3216,8 @@ if i32.const 0 i32.const 16 - i32.const 490 - i32.const 8 + i32.const 479 + i32.const 6 call $~lib/env/abort unreachable end @@ -3230,19 +3234,24 @@ end end ) - (func $std/runtime/gc.register (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/tlsf/__memory_free + ) + (func $std/runtime/__gc_register (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $std/runtime/register_ref ) - (func $~lib/runtime/REALLOC (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/gc/gc.register (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $std/runtime/__gc_register + ) + (func $~lib/runtime/REALLOC (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $0 i32.const 16 i32.sub @@ -3261,14 +3270,14 @@ call $~lib/runtime/ADJUST i32.const 0 local.get $0 - global.get $~lib/runtime/HEAP_BASE + global.get $~lib/memory/HEAP_BASE i32.gt_u select local.get $4 i32.lt_u if local.get $4 - call $~lib/allocator/tlsf/memory.allocate + call $~lib/memory/memory.allocate local.set $5 local.get $5 i32.const -1520547049 @@ -3283,56 +3292,40 @@ i32.const 16 i32.add local.set $6 - block $~lib/runtime/memory.copy|inlined.0 - local.get $6 - local.set $7 - local.get $0 - local.set $8 - local.get $3 - local.set $9 - local.get $7 - local.get $8 - local.get $9 - call $~lib/util/memory/memmove - end - block $~lib/runtime/memory.fill|inlined.1 - local.get $6 - local.get $3 - i32.add - local.set $9 - i32.const 0 - local.set $8 - local.get $1 - local.get $3 - i32.sub - local.set $7 - local.get $9 - local.get $8 - local.get $7 - call $~lib/util/memory/memset - end + local.get $6 + local.get $0 + local.get $3 + call $~lib/memory/memory.copy + local.get $6 + local.get $3 + i32.add + i32.const 0 + local.get $1 + local.get $3 + i32.sub + call $~lib/memory/memory.fill local.get $2 i32.load i32.const -1520547049 i32.eq if local.get $0 - global.get $~lib/runtime/HEAP_BASE + global.get $~lib/memory/HEAP_BASE i32.gt_u i32.eqz if i32.const 0 i32.const 184 - i32.const 85 + i32.const 83 i32.const 8 call $~lib/env/abort unreachable end local.get $2 - call $~lib/allocator/tlsf/memory.free + call $~lib/memory/memory.free else local.get $0 - call $std/runtime/gc.register + call $~lib/gc/gc.register end local.get $5 local.set $2 @@ -3342,17 +3335,11 @@ local.get $0 local.get $3 i32.add - local.set $6 i32.const 0 - local.set $5 local.get $1 local.get $3 i32.sub - local.set $7 - local.get $6 - local.get $5 - local.get $7 - call $~lib/util/memory/memset + call $~lib/memory/memory.fill end else nop @@ -3362,10 +3349,10 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/unref (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/unref (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - global.get $~lib/runtime/HEAP_BASE + global.get $~lib/memory/HEAP_BASE i32.const 16 i32.add i32.ge_u @@ -3373,7 +3360,7 @@ if i32.const 0 i32.const 184 - i32.const 106 + i32.const 104 i32.const 2 call $~lib/env/abort unreachable @@ -3390,25 +3377,25 @@ if i32.const 0 i32.const 184 - i32.const 108 + i32.const 106 i32.const 2 call $~lib/env/abort unreachable end local.get $1 ) - (func $~lib/runtime/FREE (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/FREE (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/runtime/unref - call $~lib/allocator/tlsf/memory.free + call $~lib/memory/memory.free ) - (func $~lib/runtime/ArrayBufferBase#get:byteLength (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub i32.load offset=4 ) - (func $~lib/runtime/StringBase#get:length (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -3416,7 +3403,7 @@ i32.const 1 i32.shr_u ) - (func $start:std/runtime (; 35 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 40 ;) (type $FUNCSIG$v) (local $0 i32) call $start:~lib/allocator/tlsf i32.const 2 @@ -3426,7 +3413,7 @@ if i32.const 0 i32.const 72 - i32.const 30 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -3439,7 +3426,7 @@ if i32.const 0 i32.const 72 - i32.const 36 + i32.const 34 i32.const 0 call $~lib/env/abort unreachable @@ -3460,7 +3447,7 @@ if i32.const 0 i32.const 72 - i32.const 38 + i32.const 36 i32.const 2 call $~lib/env/abort unreachable @@ -3563,7 +3550,7 @@ if i32.const 0 i32.const 72 - i32.const 53 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -3576,7 +3563,7 @@ if i32.const 0 i32.const 72 - i32.const 54 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -3590,7 +3577,7 @@ if i32.const 0 i32.const 72 - i32.const 55 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable @@ -3603,7 +3590,7 @@ if i32.const 0 i32.const 72 - i32.const 56 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -3619,7 +3606,7 @@ if i32.const 0 i32.const 72 - i32.const 58 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -3636,7 +3623,7 @@ if i32.const 0 i32.const 72 - i32.const 60 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -3653,7 +3640,7 @@ if i32.const 0 i32.const 72 - i32.const 63 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -3669,7 +3656,7 @@ i32.const 2 i32.store local.get $0 - call $std/runtime/gc.register + call $~lib/gc/gc.register local.get $0 end drop @@ -3680,7 +3667,7 @@ if i32.const 0 i32.const 72 - i32.const 67 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable @@ -3697,7 +3684,7 @@ if i32.const 0 i32.const 72 - i32.const 69 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -3710,7 +3697,7 @@ if i32.const 0 i32.const 72 - i32.const 70 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable @@ -3719,41 +3706,35 @@ call $~lib/runtime/ALLOC global.set $std/runtime/ref5 global.get $std/runtime/ref5 - call $~lib/runtime/ArrayBufferBase#get:byteLength + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 10 i32.eq i32.eqz if i32.const 0 i32.const 72 - i32.const 73 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref5 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.const 5 i32.eq i32.eqz if i32.const 0 i32.const 72 - i32.const 74 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable end ) - (func $std/runtime/gc.link (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - nop - ) - (func $std/runtime/gc.collect (; 37 ;) (type $FUNCSIG$v) - nop - ) - (func $start (; 38 ;) (type $FUNCSIG$v) + (func $start (; 41 ;) (type $FUNCSIG$v) call $start:std/runtime ) - (func $null (; 39 ;) (type $FUNCSIG$v) + (func $null (; 42 ;) (type $FUNCSIG$v) ) ) From a5e14a0eaaedd8d5b11eda854579b08d99476159 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 14 Mar 2019 05:11:03 +0100 Subject: [PATCH 029/119] srsly --- std/assembly/allocator/arena.ts | 6 + std/assembly/allocator/emscripten.ts | 5 + std/assembly/allocator/system.ts | 5 + std/assembly/allocator/tlsf.ts | 14 +- std/assembly/array.ts | 12 + std/assembly/builtins.ts | 403 ++++++++++++++++++++++++++- std/assembly/collector/itcm.ts | 11 + std/assembly/diagnostics.ts | 5 + std/assembly/gc.ts | 5 + std/assembly/map.ts | 9 + std/assembly/math.ts | 200 +++++++------ std/assembly/memory.ts | 15 + std/assembly/number.ts | 38 +++ std/assembly/polyfills.ts | 2 +- std/assembly/runtime.ts | 11 + std/assembly/set.ts | 7 + std/assembly/string.ts | 13 + std/assembly/symbol.ts | 2 + std/assembly/typedarray.ts | 21 ++ std/assembly/util/allocator.ts | 7 + std/assembly/util/hash.ts | 10 + std/assembly/util/number.ts | 5 + std/assembly/util/sort.ts | 14 + std/assembly/util/string.ts | 21 +- 24 files changed, 739 insertions(+), 102 deletions(-) diff --git a/std/assembly/allocator/arena.ts b/std/assembly/allocator/arena.ts index 94c2a2329e..55fd770e6d 100644 --- a/std/assembly/allocator/arena.ts +++ b/std/assembly/allocator/arena.ts @@ -1,9 +1,13 @@ import { HEAP_BASE, memory } from "../memory"; import { AL_MASK, MAX_SIZE_32 } from "../util/allocator"; +// @ts-ignore: decorator @lazy var startOffset: usize = (HEAP_BASE + AL_MASK) & ~AL_MASK; + +// @ts-ignore: decorator @lazy var offset: usize = startOffset; +// @ts-ignore: decorator @unsafe @global function __memory_allocate(size: usize): usize { if (size > MAX_SIZE_32) unreachable(); var ptr = offset; @@ -22,9 +26,11 @@ import { AL_MASK, MAX_SIZE_32 } from "../util/allocator"; return ptr; } +// @ts-ignore: decorator @unsafe @global function __memory_free(ptr: usize): void { } +// @ts-ignore: decorator @unsafe @global function __memory_reset(): void { offset = startOffset; } diff --git a/std/assembly/allocator/emscripten.ts b/std/assembly/allocator/emscripten.ts index 3ab1d08362..9fc3cc7e57 100644 --- a/std/assembly/allocator/emscripten.ts +++ b/std/assembly/allocator/emscripten.ts @@ -1,10 +1,15 @@ +// @ts-ignore: decorator @unsafe declare function _malloc(size: usize): usize; + +// @ts-ignore: decorator @unsafe declare function _free(ptr: usize): void; +// @ts-ignore: decorator @unsafe @global function __memory_allocate(size: usize): usize { return _malloc(size); } +// @ts-ignore: decorator @unsafe @global function __memory_free(ptr: usize): void { _free(ptr); } diff --git a/std/assembly/allocator/system.ts b/std/assembly/allocator/system.ts index 1c88cbe269..70d3ba122a 100644 --- a/std/assembly/allocator/system.ts +++ b/std/assembly/allocator/system.ts @@ -1,10 +1,15 @@ +// @ts-ignore: decorator @unsafe declare function malloc(size: usize): usize; + +// @ts-ignore: decorator @unsafe declare function free(ptr: usize): void; +// @ts-ignore: decorator @unsafe @global function __memory_allocate(size: usize): usize { return malloc(size); } +// @ts-ignore: decorator @unsafe @global function __memory_free(ptr: usize): void { free(ptr); } diff --git a/std/assembly/allocator/tlsf.ts b/std/assembly/allocator/tlsf.ts index ec766ffb64..1146fa6b5c 100644 --- a/std/assembly/allocator/tlsf.ts +++ b/std/assembly/allocator/tlsf.ts @@ -44,8 +44,7 @@ const LEFT_FREE: usize = 1 << 1; const TAGS: usize = FREE | LEFT_FREE; /** Block structure. */ -@unmanaged -class Block { +@unmanaged class Block { /** Info field holding this block's size and tags. */ info: usize; @@ -110,8 +109,7 @@ class Block { assert((1 << SL_BITS) <= 32); // second level must fit into 32 bits /** Root structure. */ -@unmanaged -class Root { +@unmanaged class Root { /** First level bitmap. */ flMap: usize = 0; @@ -406,15 +404,17 @@ class Root { } /** Determines the first (LSB to MSB) set bit's index of a word. */ -function ffs(word: T): T { +function ffs(word: T): T { assert(word != 0); // word cannot be 0 return ctz(word); // differs from ffs only for 0 } /** Determines the last (LSB to MSB) set bit's index of a word. */ -function fls(word: T): T { +function fls(word: T): T { assert(word != 0); // word cannot be 0 + // @ts-ignore: type const inv: T = (sizeof() << 3) - 1; + // @ts-ignore: type return inv - clz(word); } @@ -422,6 +422,7 @@ function fls(word: T): T { var ROOT: Root = changetype(0); /** Allocates a chunk of memory. */ +// @ts-ignore: decorator @unsafe @global function __memory_allocate(size: usize): usize { // initialize if necessary var root = ROOT; @@ -470,6 +471,7 @@ var ROOT: Root = changetype(0); } /** Frees the chunk of memory at the specified address. */ +// @ts-ignore @unsafe @global function __memory_free(data: usize): void { if (data) { let root = ROOT; diff --git a/std/assembly/array.ts b/std/assembly/array.ts index b56cad5e92..635465deab 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -95,6 +95,7 @@ export class Array extends ArrayBufferView { if (start < end) { memory.fill( dataStart + start, + // @ts-ignore: cast value, (end - start) ); @@ -268,6 +269,7 @@ export class Array extends ArrayBufferView { base + sizeof(), lastIndex << alignof() ); + // @ts-ignore: cast store(base + (lastIndex << alignof()), null); this.length_ = lastIndex; return element; @@ -375,6 +377,7 @@ export class Array extends ArrayBufferView { join(separator: string = ","): string { if (isInteger()) { + // @ts-ignore: type if (value instanceof bool) return this.join_bool(separator); return this.join_int(separator); } @@ -400,6 +403,7 @@ export class Array extends ArrayBufferView { var value: bool; for (let i = 0; i < lastIndex; ++i) { value = load(dataStart + i); + // @ts-ignore: cast valueLen = 4 + (!value); memory.copy( result + (offset << 1), @@ -417,6 +421,7 @@ export class Array extends ArrayBufferView { } } value = load(dataStart + lastIndex); + // @ts-ignore: cast valueLen = 4 + (!value); memory.copy( result + (offset << 1), @@ -440,6 +445,7 @@ export class Array extends ArrayBufferView { if (!lastIndex) return changetype(itoa(load(dataStart))); var sepLen = separator.length; + // @ts-ignore: cast const valueLen = (sizeof() <= 4 ? 10 : 20) + isSigned(); var estLen = (valueLen + sepLen) * lastIndex + valueLen; var result = runtime.alloc(estLen << 1); @@ -471,6 +477,7 @@ export class Array extends ArrayBufferView { var lastIndex = this.length_ - 1; if (lastIndex < 0) return ""; var dataStart = this.dataStart; + // @ts-ignore: type if (!lastIndex) return changetype(dtoa(load(dataStart))); const valueLen = MAX_DOUBLE_LENGTH; @@ -481,6 +488,7 @@ export class Array extends ArrayBufferView { var value: T; for (let i = 0; i < lastIndex; ++i) { value = load(dataStart + (i << alignof())); + // @ts-ignore: type offset += dtoa_stream(result, offset, value); if (sepLen) { memory.copy( @@ -492,6 +500,7 @@ export class Array extends ArrayBufferView { } } value = load(dataStart + (lastIndex << alignof())); + // @ts-ignore: type offset += dtoa_stream(result, offset, value); if (estLen > offset) { let trimmed = changetype(result).substring(0, offset); @@ -557,14 +566,17 @@ export class Array extends ArrayBufferView { var value: T; if (!lastIndex) { value = load(base); + // @ts-ignore: type return value ? value.join(separator) : ""; } for (let i = 0; i < lastIndex; ++i) { value = load(base + (i << alignof())); + // @ts-ignore: type if (value) result += value.join(separator); if (sepLen) result += separator; } value = load(base + (lastIndex << alignof())); + // @ts-ignore: type if (value) result += value.join(separator); return result; // registered by concatenation (FIXME: lots of garbage) } diff --git a/std/assembly/builtins.ts b/std/assembly/builtins.ts index 75190b5a44..1349e1b7d5 100644 --- a/std/assembly/builtins.ts +++ b/std/assembly/builtins.ts @@ -1,501 +1,898 @@ -/* tslint:disable */ - +// @ts-ignore: decorator @builtin @inline export const NaN: f64 = 0 / 0; +// @ts-ignore: decorator @builtin @inline export const Infinity: f64 = 1 / 0; +// @ts-ignore: decorator @builtin export declare function isInteger(value?: T): bool; +// @ts-ignore: decorator @builtin export declare function isFloat(value?: T): bool; +// @ts-ignore: decorator @builtin export declare function isSigned(value?: T): bool; +// @ts-ignore: decorator @builtin export declare function isReference(value?: T): bool; +// @ts-ignore: decorator @builtin export declare function isString(value?: T): bool; +// @ts-ignore: decorator @builtin export declare function isArray(value?: T): bool; +// @ts-ignore: decorator @builtin export declare function isArrayLike(value?: T): bool; +// @ts-ignore: decorator @builtin export declare function isFunction(value?: T): bool; +// @ts-ignore: decorator @builtin export declare function isNullable(value?: T): bool; +// @ts-ignore: decorator @builtin export declare function isDefined(expression: void): bool; +// @ts-ignore: decorator @builtin export declare function isConstant(expression: void): bool; +// @ts-ignore: decorator @builtin export declare function isManaged(value?: T): bool; +// @ts-ignore: decorator @inline export function isNaN(value: T): bool { return value != value; } +// @ts-ignore: decorator @inline export function isFinite(value: T): bool { return value - value == 0; } +// @ts-ignore: decorator @builtin export declare function clz(value: T): T; +// @ts-ignore: decorator @builtin export declare function ctz(value: T): T; +// @ts-ignore: decorator @builtin export declare function popcnt(value: T): T; +// @ts-ignore: decorator @builtin export declare function rotl(value: T, shift: T): T; +// @ts-ignore: decorator @builtin export declare function rotr(value: T, shift: T): T; +// @ts-ignore: decorator @builtin export declare function abs(value: T): T; +// @ts-ignore: decorator @builtin export declare function max(left: T, right: T): T; +// @ts-ignore: decorator @builtin export declare function min(left: T, right: T): T; +// @ts-ignore: decorator @builtin export declare function ceil(value: T): T; +// @ts-ignore: decorator @builtin export declare function floor(value: T): T; +// @ts-ignore: decorator @builtin export declare function copysign(left: T, right: T): T; +// @ts-ignore: decorator @builtin export declare function nearest(value: T): T; -@builtin export declare function reinterpret(value: void): T; +// @ts-ignore: decorator +@builtin export declare function reinterpret(value: number): T; +// @ts-ignore: decorator @builtin export declare function sqrt(value: T): T; +// @ts-ignore: decorator @builtin export declare function trunc(value: T): T; +// @ts-ignore: decorator @builtin export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): T; +// @ts-ignore: decorator @builtin export declare function store(offset: usize, value: void, immOffset?: usize, immAlign?: usize): void; +// @ts-ignore: decorator @builtin export declare function sizeof(): usize; // | u32 / u64 +// @ts-ignore: decorator @builtin export declare function alignof(): usize; // | u32 / u64 +// @ts-ignore: decorator @builtin export declare function offsetof(fieldName?: string): usize; // | u32 / u64 +// @ts-ignore: decorator @builtin export declare function select(ifTrue: T, ifFalse: T, condition: bool): T; +// @ts-ignore: decorator @builtin export declare function unreachable(): void; +// @ts-ignore: decorator @builtin export declare function changetype(value: void): T; +// @ts-ignore: decorator @builtin export declare function assert(isTrueish: T, message?: string): T; +// @ts-ignore: decorator @builtin export declare function unchecked(expr: T): T; +// @ts-ignore: decorator @builtin export declare function call_indirect(target: void, ...args: void[]): T; +// @ts-ignore: decorator @builtin export declare function instantiate(...args: void[]): T; export namespace atomic { + // @ts-ignore: decorator @builtin export declare function load(offset: usize, immOffset?: usize): T; + // @ts-ignore: decorator @builtin export declare function store(offset: usize, value: T, immOffset?: usize): void; + // @ts-ignore: decorator @builtin export declare function add(ptr: usize, value: T, immOffset?: usize): T; + // @ts-ignore: decorator @builtin export declare function sub(ptr: usize, value: T, immOffset?: usize): T; + // @ts-ignore: decorator @builtin export declare function and(ptr: usize, value: T, immOffset?: usize): T; + // @ts-ignore: decorator @builtin export declare function or(ptr: usize, value: T, immOffset?: usize): T; + // @ts-ignore: decorator @builtin export declare function xor(ptr: usize, value: T, immOffset?: usize): T; + // @ts-ignore: decorator @builtin export declare function xchg(ptr: usize, value: T, immOffset?: usize): T; + // @ts-ignore: decorator @builtin export declare function cmpxchg(ptr: usize, expected: T, replacement: T, immOffset?: usize): T; + // @ts-ignore: decorator @builtin export declare function wait(ptr: usize, expected: T, timeout: i64): AtomicWaitResult; + // @ts-ignore: decorator @builtin export declare function notify(ptr: usize, count: i32): i32; + // @ts-ignore: decorators } +// @ts-ignore: decorator @lazy export const enum AtomicWaitResult { OK = 0, NOT_EQUAL = 1, TIMED_OUT = 2 } +// @ts-ignore: decorator @builtin export declare function i8(value: void): i8; export namespace i8 { + // @ts-ignore: decorator @lazy export const MIN_VALUE: i8 = -128; + // @ts-ignore: decorator @lazy export const MAX_VALUE: i8 = 127; } +// @ts-ignore: decorator @builtin export declare function i16(value: void): i16; export namespace i16 { + // @ts-ignore: decorator @lazy export const MIN_VALUE: i16 = -32768; + // @ts-ignore: decorator @lazy export const MAX_VALUE: i16 = 32767; } +// @ts-ignore: decorator @builtin export declare function i32(value: void): i32; export namespace i32 { + // @ts-ignore: decorator @lazy export const MIN_VALUE: i32 = -2147483648; + // @ts-ignore: decorator @lazy export const MAX_VALUE: i32 = 2147483647; + // @ts-ignore: decorator @builtin export declare function clz(value: i32): i32; + // @ts-ignore: decorator @builtin export declare function ctz(value: i32): i32; + // @ts-ignore: decorator @builtin export declare function popcnt(value: i32): i32; + // @ts-ignore: decorator @builtin export declare function rotl(value: i32, shift: i32): i32; + // @ts-ignore: decorator @builtin export declare function rotr(value: i32, shift: i32): i32; + // @ts-ignore: decorator @builtin export declare function reinterpret_f32(value: f32): i32; + // @ts-ignore: decorator @builtin export declare function load8_s(offset: usize, immOffset?: usize, immAlign?: usize): i32; + // @ts-ignore: decorator @builtin export declare function load8_u(offset: usize, immOffset?: usize, immAlign?: usize): i32; + // @ts-ignore: decorator @builtin export declare function load16_s(offset: usize, immOffset?: usize, immAlign?: usize): i32; + // @ts-ignore: decorator @builtin export declare function load16_u(offset: usize, immOffset?: usize, immAlign?: usize): i32; + // @ts-ignore: decorator @builtin export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): i32; + // @ts-ignore: decorator @builtin export declare function store8(offset: usize, value: i32, immOffset?: usize, immAlign?: usize): void; + // @ts-ignore: decorator @builtin export declare function store16(offset: usize, value: i32, immOffset?: usize, immAlign?: usize): void; + // @ts-ignore: decorator @builtin export declare function store(offset: usize, value: i32, immOffset?: usize, immAlign?: usize): void; export namespace atomic { + // @ts-ignore: decorator @builtin export declare function load8_u(offset: usize, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function load16_u(offset: usize, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function load(offset: usize, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function store8(offset: usize, value: i32, immOffset?: usize): void; + // @ts-ignore: decorator @builtin export declare function store16(offset: usize, value: i32, immOffset?: usize): void; + // @ts-ignore: decorator @builtin export declare function store(offset: usize, value: i32, immOffset?: usize): void; + // @ts-ignore: decorator @builtin export declare function wait(ptr: usize, expected: i32, timeout: i64): AtomicWaitResult; + // @ts-ignore: decorator @builtin export declare function notify(ptr: usize, count: i32): i32; export namespace rmw8 { + // @ts-ignore: decorator @builtin export declare function add_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function sub_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function and_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function or_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function xor_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function xchg_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function cmpxchg_u(offset: usize, expected: i32, replacement: i32, immOffset?: usize): i32; } export namespace rmw16 { + // @ts-ignore: decorator @builtin export declare function add_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function sub_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function and_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function or_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function xor_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function xchg_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function cmpxchg_u(offset: usize, expected: i32, replacement: i32, immOffset?: usize): i32; } export namespace rmw { + // @ts-ignore: decorator @builtin export declare function add(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function sub(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function and(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function or(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function xor(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function xchg(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator @builtin export declare function cmpxchg(offset: usize, expected: i32, replacement: i32, immOffset?: usize): i32; } } } +// @ts-ignore: decorator @builtin export declare function i64(value: void): i64; export namespace i64 { + // @ts-ignore: decorator @lazy export const MIN_VALUE: i64 = -9223372036854775808; + // @ts-ignore: decorator @lazy export const MAX_VALUE: i64 = 9223372036854775807; + // @ts-ignore: decorator @builtin export declare function clz(value: i64): i64; + // @ts-ignore: decorator @builtin export declare function ctz(value: i64): i64; + // @ts-ignore: decorator @builtin export declare function load8_s(offset: usize, immOffset?: usize, immAlign?: usize): i64; + // @ts-ignore: decorator @builtin export declare function load8_u(offset: usize, immOffset?: usize, immAlign?: usize): i64; + // @ts-ignore: decorator @builtin export declare function load16_s(offset: usize, immOffset?: usize, immAlign?: usize): i64; + // @ts-ignore: decorator @builtin export declare function load16_u(offset: usize, immOffset?: usize, immAlign?: usize): i64; + // @ts-ignore: decorator @builtin export declare function load32_s(offset: usize, immOffset?: usize, immAlign?: usize): i64; + // @ts-ignore: decorator @builtin export declare function load32_u(offset: usize, immOffset?: usize, immAlign?: usize): i64; + // @ts-ignore: decorator @builtin export declare function load(offset: usize, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function popcnt(value: i64): i64; + // @ts-ignore: decorator @builtin export declare function rotl(value: i64, shift: i64): i64; + // @ts-ignore: decorator @builtin export declare function rotr(value: i64, shift: i64): i64; + // @ts-ignore: decorator @builtin export declare function reinterpret_f64(value: f64): i64; + // @ts-ignore: decorator @builtin export declare function store8(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; + // @ts-ignore: decorator @builtin export declare function store16(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; + // @ts-ignore: decorator @builtin export declare function store32(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; + // @ts-ignore: decorator @builtin export declare function store(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; export namespace atomic { + // @ts-ignore: decorator @builtin export declare function load8_u(offset: usize, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function load16_u(offset: usize, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function load32_u(offset: usize, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function load(offset: usize, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function store8(offset: usize, value: i64, immOffset?: usize): void; + // @ts-ignore: decorator @builtin export declare function store16(offset: usize, value: i64, immOffset?: usize): void; + // @ts-ignore: decorator @builtin export declare function store32(offset: usize, value: i64, immOffset?: usize): void; + // @ts-ignore: decorator @builtin export declare function store(offset: usize, value: i64, immOffset?: usize): void; + // @ts-ignore: decorator @builtin export declare function wait(ptr: usize, expected: i64, timeout: i64): AtomicWaitResult; + // @ts-ignore: decorator @builtin export declare function notify(ptr: usize, count: i32): i32; export namespace rmw8 { + // @ts-ignore: decorator @builtin export declare function add_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function sub_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function and_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function or_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function xor_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function xchg_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function cmpxchg_u(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; } export namespace rmw16 { + // @ts-ignore: decorator @builtin export declare function add_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function sub_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function and_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function or_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function xor_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function xchg_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function cmpxchg_u(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; } export namespace rmw32 { + // @ts-ignore: decorator @builtin export declare function add_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function sub_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function and_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function or_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function xor_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function xchg_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function cmpxchg_u(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; } export namespace rmw { + // @ts-ignore: decorator @builtin export declare function add(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function sub(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function and(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function or(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function xor(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function xchg(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator @builtin export declare function cmpxchg(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; } } } +// @ts-ignore: decorator @builtin export declare function isize(value: void): isize; export namespace isize { + // @ts-ignore: decorator @lazy export const MIN_VALUE: isize = sizeof() == sizeof() ? -2147483648 : -9223372036854775808; + // @ts-ignore: decorator @lazy export const MAX_VALUE: isize = sizeof() == sizeof() ? 2147483647 : 9223372036854775807; } +// @ts-ignore: decorator @builtin export declare function u8(value: void): u8; export namespace u8 { + // @ts-ignore: decorator @lazy export const MIN_VALUE: u8 = 0; + // @ts-ignore: decorator @lazy export const MAX_VALUE: u8 = 255; } +// @ts-ignore: decorator @builtin export declare function u16(value: void): u16; export namespace u16 { + // @ts-ignore: decorator @lazy export const MIN_VALUE: u16 = 0; + // @ts-ignore: decorator @lazy export const MAX_VALUE: u16 = 65535; } +// @ts-ignore: decorator @builtin export declare function u32(value: void): u32; export namespace u32 { + // @ts-ignore: decorator @lazy export const MIN_VALUE: u32 = 0; + // @ts-ignore: decorator @lazy export const MAX_VALUE: u32 = 4294967295; } +// @ts-ignore: decorator @builtin export declare function u64(value: void): u64; export namespace u64 { + // @ts-ignore: decorator @lazy export const MIN_VALUE: u64 = 0; + // @ts-ignore: decorator @lazy export const MAX_VALUE: u64 = 18446744073709551615; } +// @ts-ignore: decorator @builtin export declare function usize(value: void): usize; export namespace usize { + // @ts-ignore: decorator @lazy export const MIN_VALUE: usize = 0; + // @ts-ignore: decorator @lazy export const MAX_VALUE: usize = sizeof() == sizeof() ? 4294967295 : 18446744073709551615; } +// @ts-ignore: decorator @builtin export declare function bool(value: void): bool; export namespace bool { + // @ts-ignore: decorator @lazy export const MIN_VALUE: bool = false; + // @ts-ignore: decorator @lazy export const MAX_VALUE: bool = true; } +// @ts-ignore: decorator @builtin export declare function f32(value: void): f32; export namespace f32 { + // @ts-ignore: decorator @lazy export const EPSILON = reinterpret(0x34000000); // 0x1p-23f + // @ts-ignore: decorator @lazy export const MIN_VALUE = reinterpret(0x00000001); // 0x0.000001p+0f + // @ts-ignore: decorator @lazy export const MAX_VALUE = reinterpret(0x7F7FFFFF); // 0x1.fffffep+127f + // @ts-ignore: decorator @lazy export const MIN_NORMAL_VALUE = reinterpret(0x00800000); // 0x1p-126f + // @ts-ignore: decorator @lazy export const MIN_SAFE_INTEGER: f32 = -16777215; + // @ts-ignore: decorator @lazy export const MAX_SAFE_INTEGER: f32 = 16777215; + // @ts-ignore: decorator @builtin export declare function abs(value: f32): f32; + // @ts-ignore: decorator @builtin export declare function ceil(value: f32): f32; + // @ts-ignore: decorator @builtin export declare function copysign(x: f32, y: f32): f32; + // @ts-ignore: decorator @builtin export declare function floor(value: f32): f32; + // @ts-ignore: decorator @builtin export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): f32; + // @ts-ignore: decorator @builtin export declare function max(left: f32, right: f32): f32; + // @ts-ignore: decorator @builtin export declare function min(left: f32, right: f32): f32; + // @ts-ignore: decorator @builtin export declare function nearest(value: f32): f32; + // @ts-ignore: decorator @builtin export declare function reinterpret_i32(value: i32): f32; + // @ts-ignore: decorator @builtin export declare function sqrt(value: f32): f32; + // @ts-ignore: decorator @builtin export declare function store(offset: usize, value: f32, immOffset?: usize, immAlign?: usize): void; + // @ts-ignore: decorator @builtin export declare function trunc(value: f32): f32; } +// @ts-ignore: decorator @builtin export declare function f64(value: void): f64; export namespace f64 { + // @ts-ignore: decorator @lazy export const EPSILON = reinterpret(0x3CB0000000000000); // 0x1p-52 + // @ts-ignore: decorator @lazy export const MIN_VALUE = reinterpret(0x0000000000000001); // 0x0.0000000000001p+0 + // @ts-ignore: decorator @lazy export const MAX_VALUE = reinterpret(0x7FEFFFFFFFFFFFFF); // 0x1.fffffffffffffp+1023 + // @ts-ignore: decorator @lazy export const MIN_NORMAL_VALUE = reinterpret(0x0010000000000000); // 0x1p-1022 + // @ts-ignore: decorator @lazy export const MIN_SAFE_INTEGER: f64 = -9007199254740991; + // @ts-ignore: decorator @lazy export const MAX_SAFE_INTEGER: f64 = 9007199254740991; + // @ts-ignore: decorator @builtin export declare function abs(value: f64): f64; + // @ts-ignore: decorator @builtin export declare function ceil(value: f64): f64; + // @ts-ignore: decorator @builtin export declare function copysign(x: f64, y: f64): f64; + // @ts-ignore: decorator @builtin export declare function floor(value: f64): f64; + // @ts-ignore: decorator @builtin export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): f64; + // @ts-ignore: decorator @builtin export declare function max(left: f64, right: f64): f64; + // @ts-ignore: decorator @builtin export declare function min(left: f64, right: f64): f64; + // @ts-ignore: decorator @builtin export declare function nearest(value: f64): f64; + // @ts-ignore: decorator @builtin export declare function reinterpret_i64(value: i64): f64; + // @ts-ignore: decorator @builtin export declare function sqrt(value: f64): f64; + // @ts-ignore: decorator @builtin export declare function store(offset: usize, value: f64, immOffset?: usize, immAlign?: usize): void; + // @ts-ignore: decorator @builtin export declare function trunc(value: f64): f64; } +// @ts-ignore: decorator @builtin export declare function v128(a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8): v128; export namespace v128 { + // @ts-ignore: decorator @builtin export declare function splat(x: T): v128; + // @ts-ignore: decorator @builtin export declare function extract_lane(x: v128, idx: u8): T; + // @ts-ignore: decorator @builtin export declare function replace_lane(x: v128, idx: u8, value: T): v128; + // @ts-ignore: decorator @builtin export declare function shuffle(a: v128, b: v128, ...lanes: u8[]): v128; + // @ts-ignore: decorator @builtin export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): v128; + // @ts-ignore: decorator @builtin export declare function store(offset: usize, value: v128, immOffset?: usize, immAlign?: usize): void; + // @ts-ignore: decorator @builtin export declare function add(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function sub(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function mul(a: v128, b: v128): v128; // except i64 + // @ts-ignore: decorator @builtin export declare function div(a: v128, b: v128): v128; // f32, f64 only + // @ts-ignore: decorator @builtin export declare function neg(a: v128): v128; + // @ts-ignore: decorator @builtin export declare function add_saturate(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function sub_saturate(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function shl(a: v128, b: i32): v128; + // @ts-ignore: decorator @builtin export declare function shr(a: v128, b: i32): v128; + // @ts-ignore: decorator @builtin export declare function and(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function or(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function xor(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function not(a: v128): v128; + // @ts-ignore: decorator @builtin export declare function bitselect(v1: v128, v2: v128, c: v128): v128; + // @ts-ignore: decorator @builtin export declare function any_true(a: v128): bool; + // @ts-ignore: decorator @builtin export declare function all_true(a: v128): bool; + // @ts-ignore: decorator @builtin export declare function min(a: v128, b: v128): v128; // f32, f64 only + // @ts-ignore: decorator @builtin export declare function max(a: v128, b: v128): v128; // f32, f64 only + // @ts-ignore: decorator @builtin export declare function abs(a: v128): v128; // f32, f64 only + // @ts-ignore: decorator @builtin export declare function sqrt(a: v128): v128; // f32, f64 only + // @ts-ignore: decorator @builtin export declare function eq(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function ne(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function lt(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function le(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function gt(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function ge(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function convert(a: v128): v128; + // @ts-ignore: decorator @builtin export declare function trunc(a: v128): v128; } +// @ts-ignore: decorator @builtin export declare function i8x16(a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8): v128; export namespace i8x16 { + // @ts-ignore: decorator @builtin export declare function splat(x: i8): v128; + // @ts-ignore: decorator @builtin export declare function extract_lane_s(x: v128, idx: u8): i8; + // @ts-ignore: decorator @builtin export declare function extract_lane_u(x: v128, idx: u8): u8; + // @ts-ignore: decorator @builtin export declare function replace_lane(x: v128, idx: u8, value: i8): v128; + // @ts-ignore: decorator @builtin export declare function add(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function sub(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function mul(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function neg(a: v128): v128; + // @ts-ignore: decorator @builtin export declare function add_saturate_s(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function add_saturate_u(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function sub_saturate_s(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function sub_saturate_u(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function shl(a: v128, b: i32): v128; + // @ts-ignore: decorator @builtin export declare function shr_s(a: v128, b: i32): v128; + // @ts-ignore: decorator @builtin export declare function shr_u(a: v128, b: i32): v128; + // @ts-ignore: decorator @builtin export declare function any_true(a: v128): bool; + // @ts-ignore: decorator @builtin export declare function all_true(a: v128): bool; + // @ts-ignore: decorator @builtin export declare function eq(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function ne(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function lt_s(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function lt_u(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function le_s(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function le_u(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function gt_s(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function gt_u(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function ge_s(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function ge_u(a: v128, b: v128): v128; } +// @ts-ignore: decorator @builtin export declare function i16x8(a: i16, b: i16, c: i16, d: i16, e: i16, f: i16, g: i16, h: i16): v128; export namespace i16x8 { + // @ts-ignore: decorator @builtin export declare function splat(x: i16): v128; + // @ts-ignore: decorator @builtin export declare function extract_lane_s(x: v128, idx: u8): i16; + // @ts-ignore: decorator @builtin export declare function extract_lane_u(x: v128, idx: u8): u16; + // @ts-ignore: decorator @builtin export declare function replace_lane(x: v128, idx: u8, value: i16): v128; + // @ts-ignore: decorator @builtin export declare function add(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function sub(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function mul(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function neg(a: v128): v128; + // @ts-ignore: decorator @builtin export declare function add_saturate_s(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function add_saturate_u(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function sub_saturate_s(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function sub_saturate_u(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function shl(a: v128, b: i32): v128; + // @ts-ignore: decorator @builtin export declare function shr_s(a: v128, b: i32): v128; + // @ts-ignore: decorator @builtin export declare function shr_u(a: v128, b: i32): v128; + // @ts-ignore: decorator @builtin export declare function any_true(a: v128): bool; + // @ts-ignore: decorator @builtin export declare function all_true(a: v128): bool; + // @ts-ignore: decorator @builtin export declare function eq(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function ne(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function lt_s(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function lt_u(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function le_s(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function le_u(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function gt_s(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function gt_u(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function ge_s(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function ge_u(a: v128, b: v128): v128; } +// @ts-ignore: decorator @builtin export declare function i32x4(a: i32, b: i32, c: i32, d: i32): v128; export namespace i32x4 { + // @ts-ignore: decorator @builtin export declare function splat(x: i32): v128; + // @ts-ignore: decorator @builtin export declare function extract_lane(x: v128, idx: u8): i32; + // @ts-ignore: decorator @builtin export declare function replace_lane(x: v128, idx: u8, value: i32): v128; + // @ts-ignore: decorator @builtin export declare function add(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function sub(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function mul(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function neg(a: v128): v128; + // @ts-ignore: decorator @builtin export declare function shl(a: v128, b: i32): v128; + // @ts-ignore: decorator @builtin export declare function shr_s(a: v128, b: i32): v128; + // @ts-ignore: decorator @builtin export declare function shr_u(a: v128, b: i32): v128; + // @ts-ignore: decorator @builtin export declare function any_true(a: v128): bool; + // @ts-ignore: decorator @builtin export declare function all_true(a: v128): bool; + // @ts-ignore: decorator @builtin export declare function eq(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function ne(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function lt_s(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function lt_u(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function le_s(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function le_u(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function gt_s(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function gt_u(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function ge_s(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function ge_u(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function trunc_s_f32x4_sat(a: v128): v128; + // @ts-ignore: decorator @builtin export declare function trunc_u_f32x4_sat(a: v128): v128; } +// @ts-ignore: decorator @builtin export declare function i64x2(a: i64, b: i64): v128; export namespace i64x2 { + // @ts-ignore: decorator @builtin export declare function splat(x: i64): v128; + // @ts-ignore: decorator @builtin export declare function extract_lane(x: v128, idx: u8): i64; + // @ts-ignore: decorator @builtin export declare function replace_lane(x: v128, idx: u8, value: i64): v128; + // @ts-ignore: decorator @builtin export declare function add(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function sub(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function mul(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function neg(a: v128): v128; + // @ts-ignore: decorator @builtin export declare function shl(a: v128, b: i32): v128; + // @ts-ignore: decorator @builtin export declare function shr_s(a: v128, b: i32): v128; + // @ts-ignore: decorator @builtin export declare function shr_u(a: v128, b: i32): v128; + // @ts-ignore: decorator @builtin export declare function any_true(a: v128): bool; + // @ts-ignore: decorator @builtin export declare function all_true(a: v128): bool; + // @ts-ignore: decorator @builtin export declare function trunc_s_f64x2_sat(a: v128): v128; + // @ts-ignore: decorator @builtin export declare function trunc_u_f64x2_sat(a: v128): v128; } +// @ts-ignore: decorator @builtin export declare function f32x4(a: f32, b: f32, c: f32, d: f32): v128; export namespace f32x4 { + // @ts-ignore: decorator @builtin export declare function splat(x: f32): v128; + // @ts-ignore: decorator @builtin export declare function extract_lane(x: v128, idx: u8): f32; + // @ts-ignore: decorator @builtin export declare function replace_lane(x: v128, idx: u8, value: f32): v128; + // @ts-ignore: decorator @builtin export declare function add(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function sub(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function mul(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function div(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function neg(a: v128): v128; + // @ts-ignore: decorator @builtin export declare function min(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function max(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function abs(a: v128): v128; + // @ts-ignore: decorator @builtin export declare function sqrt(a: v128): v128; + // @ts-ignore: decorator @builtin export declare function eq(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function ne(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function lt(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function le(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function gt(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function ge(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function convert_s_i32x4(a: v128): v128; + // @ts-ignore: decorator @builtin export declare function convert_u_i32x4(a: v128): v128; } +// @ts-ignore: decorator @builtin export declare function f64x2(a: f64, b: f64): v128; export namespace f64x2 { + // @ts-ignore: decorator @builtin export declare function splat(x: f64): v128; + // @ts-ignore: decorator @builtin export declare function extract_lane(x: v128, idx: u8): f64; + // @ts-ignore: decorator @builtin export declare function replace_lane(x: v128, idx: u8, value: f64): v128; + // @ts-ignore: decorator @builtin export declare function add(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function sub(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function mul(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function div(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function neg(a: v128): v128; + // @ts-ignore: decorator @builtin export declare function min(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function max(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function abs(a: v128): v128; + // @ts-ignore: decorator @builtin export declare function sqrt(a: v128): v128; + // @ts-ignore: decorator @builtin export declare function eq(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function ne(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function lt(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function le(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function gt(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function ge(a: v128, b: v128): v128; + // @ts-ignore: decorator @builtin export declare function convert_s_i64x2(a: v128): v128; + // @ts-ignore: decorator @builtin export declare function convert_u_i64x2(a: v128): v128; } export namespace v8x16 { + // @ts-ignore: decorator @builtin export declare function shuffle(a: v128, b: v128, l0: u8, l1: u8, l2: u8, l3: u8, l4: u8, l5: u8, l6: u8, l7: u8, l8: u8, l9: u8, l10: u8, l11: u8, l12: u8, l13: u8, l14: u8, l15: u8): v128; } diff --git a/std/assembly/collector/itcm.ts b/std/assembly/collector/itcm.ts index 27fb146f41..e63b7fdb68 100644 --- a/std/assembly/collector/itcm.ts +++ b/std/assembly/collector/itcm.ts @@ -1,8 +1,10 @@ // Largely based on Bach Le's μgc, see: https://github.com/bullno1/ugc +// @ts-ignore: decorator @inline const TRACE = false; /** Size of a managed object header. */ +// @ts-ignore: decorator @inline export const HEADER_SIZE: usize = (offsetof() + AL_MASK) & ~AL_MASK; import { AL_MASK, MAX_SIZE_32 } from "../util/allocator"; @@ -146,6 +148,7 @@ function step(): void { if (obj !== toSpace) { if (TRACE) trace("gc~step/MARK iterate", 1, objToRef(obj)); iter = obj; + // @ts-ignore: cast obj.color = !white; // if (TRACE) { // trace(" next/prev/hook", 3, @@ -163,6 +166,7 @@ function step(): void { let from = fromSpace; fromSpace = toSpace; toSpace = from; + // @ts-ignore: cast white = !white; iter = from.next; state = State.SWEEP; @@ -188,14 +192,17 @@ function step(): void { } } +// @ts-ignore: decorator @inline function refToObj(ref: usize): ManagedObject { return changetype(ref - HEADER_SIZE); } +// @ts-ignore: decorator @inline function objToRef(obj: ManagedObject): usize { return changetype(obj) + HEADER_SIZE; } +// @ts-ignore: decorator @global @unsafe export function __gc_allocate( // TODO: make this register only / reuse header size: usize, markFn: (ref: usize) => void @@ -210,12 +217,15 @@ function step(): void { return objToRef(obj); } +// @ts-ignore: decorator @global @unsafe export function __gc_link(parentRef: usize, childRef: usize): void { if (TRACE) trace("gc.link", 2, parentRef, childRef); var parent = refToObj(parentRef); + // @ts-ignore: cast if (parent.color == !white && refToObj(childRef).color == white) parent.makeGray(); } +// @ts-ignore: decorator @global @unsafe export function __gc_mark(ref: usize): void { if (TRACE) trace("gc.mark", 1, ref); if (ref) { @@ -224,6 +234,7 @@ function step(): void { } } +// @ts-ignore: decorator @global @unsafe export function __gc_collect(): void { if (TRACE) trace("gc.collect"); // begin collecting if not yet collecting diff --git a/std/assembly/diagnostics.ts b/std/assembly/diagnostics.ts index 291f45b4b5..5254ac155e 100644 --- a/std/assembly/diagnostics.ts +++ b/std/assembly/diagnostics.ts @@ -1,3 +1,8 @@ +// @ts-ignore: decorator @builtin export declare function ERROR(message?: string): void; + +// @ts-ignore: decorator @builtin export declare function WARNING(message?: string): void; + +// @ts-ignore: decorator @builtin export declare function INFO(message?: string): void; diff --git a/std/assembly/gc.ts b/std/assembly/gc.ts index b226d39d91..26ae9df27b 100644 --- a/std/assembly/gc.ts +++ b/std/assembly/gc.ts @@ -2,6 +2,7 @@ export namespace gc { /** Whether the garbage collector interface is implemented. */ + // @ts-ignore: decorator, undefined @lazy export const implemented: bool = isDefined(__gc_register); /** Gets the computed unique class id of a class type. */ @@ -12,24 +13,28 @@ export namespace gc { /** Registers a managed object to be tracked by the garbage collector. */ @unsafe export function register(ref: usize): void { + // @ts-ignore: undefined if (isDefined(__gc_register)) __gc_register(ref); else ERROR("missing implementation: gc.register"); } /** Links a registered object with the registered object now referencing it. */ @unsafe export function link(ref: usize, parentRef: usize): void { + // @ts-ignore: undefined if (isDefined(__gc_link)) __gc_link(ref, parentRef); else ERROR("missing implementation: gc.link"); } /** Marks an object as being reachable. */ @unsafe export function mark(ref: usize): void { + // @ts-ignore: undefined if (isDefined(__gc_mark)) __gc_mark(ref); else ERROR("missing implementation: gc.mark"); } /** Performs a full garbage collection cycle. */ export function collect(): void { + // @ts-ignore: undefined if (isDefined(__gc_collect)) __gc_collect(); else WARNING("missing implementation: gc.collect"); } diff --git a/std/assembly/map.ts b/std/assembly/map.ts index 2152b929de..2a8a192502 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -3,8 +3,13 @@ import { HASH } from "./util/hash"; // A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht +// @ts-ignore: decorator @inline const INITIAL_CAPACITY = 4; + +// @ts-ignore: decorator @inline const FILL_FACTOR: f64 = 8 / 3; + +// @ts-ignore: decorator @inline const FREE_FACTOR: f64 = 3 / 4; /** Structure of a map entry. */ @@ -15,12 +20,15 @@ import { HASH } from "./util/hash"; } /** Empty bit. */ +// @ts-ignore: decorator @inline const EMPTY: usize = 1 << 0; /** Size of a bucket. */ +// @ts-ignore: decorator @inline const BUCKET_SIZE = sizeof(); /** Computes the alignment of an entry. */ +// @ts-ignore: decorator @inline function ENTRY_ALIGN(): usize { // can align to 4 instead of 8 if 32-bit and K/V is <= 32-bits const maxkv = sizeof() > sizeof() ? sizeof() : sizeof(); @@ -29,6 +37,7 @@ import { HASH } from "./util/hash"; } /** Computes the aligned size of an entry. */ +// @ts-ignore: decorator @inline function ENTRY_SIZE(): usize { const align = ENTRY_ALIGN(); const size = (offsetof>() + align) & ~align; diff --git a/std/assembly/math.ts b/std/assembly/math.ts index f899f1b082..22efc2a363 100644 --- a/std/assembly/math.ts +++ b/std/assembly/math.ts @@ -42,6 +42,7 @@ function R(z: f64): f64 { // Rational approximation of (asin(x)-x)/x^3 return p / q; } +// @ts-ignore: decorator @inline function expo2(x: f64): f64 { // exp(x)/2 for x >= log(DBL_MAX) const // see: musl/src/math/__expo2.c k = 2043, @@ -50,11 +51,15 @@ function R(z: f64): f64 { // Rational approximation of (asin(x)-x)/x^3 return NativeMath.exp(x - kln2) * scale * scale; } -/** @internal */ +// @ts-ignore: decorator @lazy var random_seeded = false; +// @ts-ignore: decorator @lazy var random_state0_64: u64; +// @ts-ignore: decorator @lazy var random_state1_64: u64; +// @ts-ignore: decorator @lazy var random_state0_32: u32; +// @ts-ignore: decorator @lazy var random_state1_32: u32; function murmurHash3(h: u64): u64 { // Force all bits of a hash block to avalanche @@ -75,17 +80,25 @@ function splitMix32(h: u32): u32 { export namespace NativeMath { + // @ts-ignore: decorator @lazy export const E = reinterpret(0x4005BF0A8B145769); // 2.7182818284590452354 + // @ts-ignore: decorator @lazy export const LN2 = reinterpret(0x3FE62E42FEFA39EF); // 0.69314718055994530942 + // @ts-ignore: decorator @lazy export const LN10 = reinterpret(0x40026BB1BBB55516); // 2.30258509299404568402 + // @ts-ignore: decorator @lazy export const LOG2E = reinterpret(0x3FF71547652B82FE); // 1.4426950408889634074 + // @ts-ignore: decorator @lazy export const LOG10E = reinterpret(0x3FDBCB7B1526E50E); // 0.43429448190325182765 + // @ts-ignore: decorator @lazy export const PI = reinterpret(0x400921FB54442D18); // 3.14159265358979323846 + // @ts-ignore: decorator @lazy export const SQRT1_2 = reinterpret(0x3FE6A09E667F3BCD); // 0.70710678118654752440 + // @ts-ignore: decorator @lazy export const SQRT2 = reinterpret(0x3FF6A09E667F3BCD); // 1.41421356237309504880 - @inline - export function abs(x: f64): f64 { + // @ts-ignore: decorator + @inline export function abs(x: f64): f64 { return builtin_abs(x); } @@ -346,8 +359,8 @@ export namespace NativeMath { return t; } - @inline - export function ceil(x: f64): f64 { + // @ts-ignore: decorator + @inline export function ceil(x: f64): f64 { return builtin_ceil(x); } @@ -497,13 +510,13 @@ export namespace NativeMath { return (x + y) * twopk; } - @inline - export function floor(x: f64): f64 { + // @ts-ignore: decorator + @inline export function floor(x: f64): f64 { return builtin_floor(x); } - @inline - export function fround(x: f64): f32 { + // @ts-ignore: decorator + @inline export function fround(x: f64): f32 { return x; } @@ -763,13 +776,13 @@ export namespace NativeMath { return val_lo + val_hi; } - @inline - export function max(value1: f64, value2: f64): f64 { + // @ts-ignore: decorator + @inline export function max(value1: f64, value2: f64): f64 { return builtin_max(value1, value2); } - @inline - export function min(value1: f64, value2: f64): f64 { + // @ts-ignore: decorator + @inline export function min(value1: f64, value2: f64): f64 { return builtin_min(value1, value2); } @@ -997,13 +1010,13 @@ export namespace NativeMath { return reinterpret(r) - 1; } - @inline - export function round(x: f64): f64 { + // @ts-ignore: decorator + @inline export function round(x: f64): f64 { return builtin_copysign(builtin_floor(x + 0.5), x); } - @inline - export function sign(x: f64): f64 { + // @ts-ignore: decorator + @inline export function sign(x: f64): f64 { if (ASC_SHRINK_LEVEL > 0) { return builtin_abs(x) > 0 ? builtin_copysign(1, x) : x; } else { @@ -1011,10 +1024,11 @@ export namespace NativeMath { } } - @inline - export function signbit(x: f64): bool { + // @ts-ignore: decorator + @inline export function signbit(x: f64): bool { // In ECMAScript all NaN values are indistinguishable from each other // so we need handle NaN and negative NaN in similar way + // @ts-ignore: type return ((reinterpret(x) >>> 63) & (x == x)); } @@ -1041,8 +1055,8 @@ export namespace NativeMath { return t; } - @inline - export function sqrt(x: f64): f64 { + // @ts-ignore: decorator + @inline export function sqrt(x: f64): f64 { return builtin_sqrt(x); } @@ -1074,8 +1088,8 @@ export namespace NativeMath { return builtin_copysign(t, x); } - @inline - export function trunc(x: f64): f64 { + // @ts-ignore: decorator + @inline export function trunc(x: f64): f64 { return builtin_trunc(x); } @@ -1232,8 +1246,9 @@ export namespace NativeMath { } } -/** @internal */ +// @ts-ignore: decorator @lazy var rempio2f_y: f64; +// @ts-ignore: decorator @lazy const PIO2_TABLE: u64[] = [ 0xA2F9836E4E441529, 0xFC2757D1F534DDC0, @@ -1241,7 +1256,6 @@ export namespace NativeMath { 0xFE5163ABDEBBC561 ]; -/** @internal */ function Rf(z: f32): f32 { // Rational approximation of (asin(x)-x)/x^3 const // see: musl/src/math/asinf.c and SUN COPYRIGHT NOTICE above pS0 = reinterpret(0x3E2AAA75), // 1.6666586697e-01f @@ -1253,6 +1267,7 @@ function Rf(z: f32): f32 { // Rational approximation of (asin(x)-x)/x^3 return p / q; } +// @ts-ignore: decorator @inline function expo2f(x: f32): f32 { // exp(x)/2 for x >= log(DBL_MAX) const // see: musl/src/math/__expo2f.c k = 235, @@ -1261,8 +1276,8 @@ function Rf(z: f32): f32 { // Rational approximation of (asin(x)-x)/x^3 return NativeMathf.exp(x - kln2) * scale * scale; } -@inline /** @internal */ -function pio2_large_quot(x: f32, u: i32): i32 { // see: jdh8/metallic/blob/master/src/math/float/rem_pio2f.c +// @ts-ignore: decorator +@inline function pio2_large_quot(x: f32, u: i32): i32 { // see: jdh8/metallic/blob/master/src/math/float/rem_pio2f.c const coeff = reinterpret(0x3BF921FB54442D18); // π * 0x1p-65 = 8.51530395021638647334e-20 const bits = PIO2_TABLE; @@ -1291,8 +1306,8 @@ function pio2_large_quot(x: f32, u: i32): i32 { // see: jdh8/metallic/blob return q; } -@inline /** @internal */ -function rempio2f(x: f32, u: u32, sign: i32): i32 { // see: jdh8/metallic/blob/master/src/math/float/rem_pio2f.c +// @ts-ignore: decorator +@inline function rempio2f(x: f32, u: u32, sign: i32): i32 { // see: jdh8/metallic/blob/master/src/math/float/rem_pio2f.c const pi2hi = reinterpret(0x3FF921FB50000000); // 1.57079631090164184570 const pi2lo = reinterpret(0x3E5110B4611A6263); // 1.58932547735281966916e-8 const _2_pi = reinterpret(0x3FE45F306DC9C883); // 0.63661977236758134308 @@ -1308,8 +1323,8 @@ function rempio2f(x: f32, u: u32, sign: i32): i32 { // see: jdh8/metallic/blob } /* |sin(x)/x - s(x)| < 2**-37.5 (~[-4.89e-12, 4.824e-12]). */ -@inline /** @internal */ -function sin_kernf(x: f64): f32 { // see: musl/tree/src/math/__sindf.c +// @ts-ignore: decorator +@inline function sin_kernf(x: f64): f32 { // see: musl/tree/src/math/__sindf.c const S1 = reinterpret(0xBFC5555554CBAC77); // -0x15555554cbac77.0p-55 const S2 = reinterpret(0x3F811110896EFBB2); // 0x111110896efbb2.0p-59 const S3 = reinterpret(0xBF2A00F9E2CAE774); // -0x1a00f9e2cae774.0p-65 @@ -1323,8 +1338,8 @@ function sin_kernf(x: f64): f32 { // see: musl/tree/src/math/__sindf.c } /* |cos(x) - c(x)| < 2**-34.1 (~[-5.37e-11, 5.295e-11]). */ -@inline /** @internal */ -function cos_kernf(x: f64): f32 { // see: musl/tree/src/math/__cosdf.c +// @ts-ignore: decorator +@inline function cos_kernf(x: f64): f32 { // see: musl/tree/src/math/__cosdf.c const C0 = reinterpret(0xBFDFFFFFFD0C5E81); // -0x1ffffffd0c5e81.0p-54 const C1 = reinterpret(0x3FA55553E1053A42); // 0x155553e1053a42.0p-57 const C2 = reinterpret(0xBF56C087E80F1E27); // -0x16c087e80f1e27.0p-62 @@ -1337,8 +1352,8 @@ function cos_kernf(x: f64): f32 { // see: musl/tree/src/math/__cosdf.c } /* |tan(x)/x - t(x)| < 2**-25.5 (~[-2e-08, 2e-08]). */ -@inline /** @internal */ -function tan_kernf(x: f64, odd: i32): f32 { // see: musl/tree/src/math/__tandf.c +// @ts-ignore: decorator +@inline function tan_kernf(x: f64, odd: i32): f32 { // see: musl/tree/src/math/__tandf.c const T0 = reinterpret(0x3FD5554D3418C99F); /* 0x15554d3418c99f.0p-54 */ const T1 = reinterpret(0x3FC112FD38999F72); /* 0x1112fd38999f72.0p-55 */ @@ -1360,21 +1375,31 @@ function tan_kernf(x: f64, odd: i32): f32 { // see: musl/tree/src/math/__tandf.c export namespace NativeMathf { + // @ts-ignore: decorator @lazy export const E = NativeMath.E; + // @ts-ignore: decorator @lazy export const LN2 = NativeMath.LN2; + // @ts-ignore: decorator @lazy export const LN10 = NativeMath.LN10; + // @ts-ignore: decorator @lazy export const LOG2E = NativeMath.LOG2E; + // @ts-ignore: decorator @lazy export const LOG10E = NativeMath.LOG10E; + // @ts-ignore: decorator @lazy export const PI = NativeMath.PI; + // @ts-ignore: decorator @lazy export const SQRT1_2 = NativeMath.SQRT1_2; + // @ts-ignore: decorator @lazy export const SQRT2 = NativeMath.SQRT2; /** Used as return values from Mathf.sincos */ + // @ts-ignore: decorator @lazy export var sincos_sin: f32 = 0; + // @ts-ignore: decorator @lazy export var sincos_cos: f32 = 0; - @inline - export function abs(x: f32): f32 { + // @ts-ignore: decorator + @inline export function abs(x: f32): f32 { return builtin_abs(x); } @@ -1609,8 +1634,8 @@ export namespace NativeMathf { return t; } - @inline - export function ceil(x: f32): f32 { + // @ts-ignore: decorator + @inline export function ceil(x: f32): f32 { return builtin_ceil(x); } @@ -1685,8 +1710,8 @@ export namespace NativeMathf { return expo2f(x); } - @inline - export function floor(x: f32): f32 { + // @ts-ignore: decorator + @inline export function floor(x: f32): f32 { return builtin_floor(x); } @@ -1796,8 +1821,8 @@ export namespace NativeMathf { return (x + y) * twopk; } - @inline - export function fround(x: f32): f32 { + // @ts-ignore: decorator + @inline export function fround(x: f32): f32 { return x; } @@ -1831,8 +1856,8 @@ export namespace NativeMathf { return z * builtin_sqrt((x * x + y * y)); } - @inline - export function imul(x: f32, y: f32): f32 { + // @ts-ignore: decorator + @inline export function imul(x: f32, y: f32): f32 { /* * Wasm (MVP) and JS have different approaches for double->int conversions. * @@ -2010,13 +2035,13 @@ export namespace NativeMathf { return (lo + hi) * ivln2lo + lo * ivln2hi + hi * ivln2hi + dk; } - @inline - export function max(value1: f32, value2: f32): f32 { + // @ts-ignore: decorator + @inline export function max(value1: f32, value2: f32): f32 { return builtin_max(value1, value2); } - @inline - export function min(value1: f32, value2: f32): f32 { + // @ts-ignore: decorator + @inline export function min(value1: f32, value2: f32): f32 { return builtin_min(value1, value2); } @@ -2209,8 +2234,8 @@ export namespace NativeMathf { return sn * z; } - @inline - export function seedRandom(value: i64): void { + // @ts-ignore: decorator + @inline export function seedRandom(value: i64): void { NativeMath.seedRandom(value); } @@ -2229,13 +2254,13 @@ export namespace NativeMathf { return reinterpret((r >> 9) | (127 << 23)) - 1.0; } - @inline - export function round(x: f32): f32 { + // @ts-ignore: decorator + @inline export function round(x: f32): f32 { return builtin_copysign(builtin_floor(x + 0.5), x); } - @inline - export function sign(x: f32): f32 { + // @ts-ignore: decorator + @inline export function sign(x: f32): f32 { if (ASC_SHRINK_LEVEL > 0) { return builtin_abs(x) > 0 ? builtin_copysign(1, x) : x; } else { @@ -2243,8 +2268,9 @@ export namespace NativeMathf { } } - @inline - export function signbit(x: f32): bool { + // @ts-ignore: decorator + @inline export function signbit(x: f32): bool { + // @ts-ignore: type return ((reinterpret(x) >>> 31) & (x == x)); } @@ -2308,8 +2334,8 @@ export namespace NativeMathf { return t; } - @inline - export function sqrt(x: f32): f32 { + // @ts-ignore: decorator + @inline export function sqrt(x: f32): f32 { return builtin_sqrt(x); } @@ -2377,8 +2403,8 @@ export namespace NativeMathf { return builtin_copysign(t, x); } - @inline - export function trunc(x: f32): f32 { + // @ts-ignore: decorator + @inline export function trunc(x: f32): f32 { return builtin_trunc(x); } @@ -2541,12 +2567,12 @@ export namespace NativeMathf { if (ix <= 0x3f490fda) { /* |x| ~<= π/4 */ if (ix < 0x39800000) { /* |x| < 2**-12 */ - sincos_s32 = x; - sincos_c32 = 1; + sincos_sin = x; + sincos_cos = 1; return; } - sincos_s32 = sin_kernf(x); - sincos_c32 = cos_kernf(x); + sincos_sin = sin_kernf(x); + sincos_cos = cos_kernf(x); return; } @@ -2554,33 +2580,33 @@ export namespace NativeMathf { if (ix <= 0x407b53d1) { /* |x| ~<= 5π/4 */ if (ix <= 0x4016cbe3) { /* |x| ~<= 3π/4 */ if (sign) { - sincos_s32 = -cos_kernf(x + s1pio2); - sincos_c32 = sin_kernf(x + s1pio2); + sincos_sin = -cos_kernf(x + s1pio2); + sincos_cos = sin_kernf(x + s1pio2); } else { - sincos_s32 = cos_kernf(s1pio2 - x); - sincos_c32 = sin_kernf(s1pio2 - x); + sincos_sin = cos_kernf(s1pio2 - x); + sincos_cos = sin_kernf(s1pio2 - x); } return; } /* -sin(x + c) is not correct if x+c could be 0: -0 vs +0 */ - sincos_s32 = -sin_kernf(sign ? x + s2pio2 : x - s2pio2); - sincos_c32 = -cos_kernf(sign ? x + s2pio2 : x - s2pio2); + sincos_sin = -sin_kernf(sign ? x + s2pio2 : x - s2pio2); + sincos_cos = -cos_kernf(sign ? x + s2pio2 : x - s2pio2); return; } if (ix <= 0x40e231d5) { /* |x| ~<= 9π/4 */ if (ix <= 0x40afeddf) { /* |x| ~<= 7π/4 */ if (sign) { - sincos_s32 = cos_kernf(x + s3pio2); - sincos_c32 = -sin_kernf(x + s3pio2); + sincos_sin = cos_kernf(x + s3pio2); + sincos_cos = -sin_kernf(x + s3pio2); } else { - sincos_s32 = -cos_kernf(x - s3pio2); - sincos_c32 = sin_kernf(x - s3pio2); + sincos_sin = -cos_kernf(x - s3pio2); + sincos_cos = sin_kernf(x - s3pio2); } return; } - sincos_s32 = sin_kernf(sign ? x + s4pio2 : x - s4pio2); - sincos_c32 = cos_kernf(sign ? x + s4pio2 : x - s4pio2); + sincos_sin = sin_kernf(sign ? x + s4pio2 : x - s4pio2); + sincos_cos = cos_kernf(sign ? x + s4pio2 : x - s4pio2); return; } } @@ -2588,8 +2614,8 @@ export namespace NativeMathf { /* sin(Inf or NaN) is NaN */ if (ix >= 0x7f800000) { let xx = x - x; - sincos_s32 = xx; - sincos_c32 = xx; + sincos_sin = xx; + sincos_cos = xx; return; } @@ -2601,24 +2627,24 @@ export namespace NativeMathf { switch (n & 3) { case 0: { - sincos_s32 = s; - sincos_c32 = c; + sincos_sin = s; + sincos_cos = c; break; } case 1: { - sincos_s32 = c; - sincos_c32 = -s; + sincos_sin = c; + sincos_cos = -s; break; } case 2: { - sincos_s32 = -s; - sincos_c32 = -c; + sincos_sin = -s; + sincos_cos = -c; break; } case 3: default: { - sincos_s32 = -c; - sincos_c32 = s; + sincos_sin = -c; + sincos_cos = s; break; } } diff --git a/std/assembly/memory.ts b/std/assembly/memory.ts index 260bc5e36d..bd276f0370 100644 --- a/std/assembly/memory.ts +++ b/std/assembly/memory.ts @@ -1,56 +1,70 @@ import { memcmp, memmove, memset } from "./util/memory"; +// @ts-ignore: decorator @builtin export declare const HEAP_BASE: usize; /** Memory manager interface. */ export namespace memory { /** Gets the size of the memory in pages. */ + // @ts-ignore: decorator @builtin export declare function size(): i32; /** Grows the memory by the given size in pages and returns the previous size in pages. */ + // @ts-ignore: decorator @unsafe @builtin export declare function grow(pages: i32): i32; /** Fills a section in memory with the specified byte value. */ + // @ts-ignore: decorator @unsafe @builtin export function fill(dst: usize, c: u8, n: usize): void { memset(dst, c, n); // fallback if "bulk-memory" isn't enabled } /** Copies a section of memory to another. Has move semantics. */ + // @ts-ignore: decorator @unsafe @builtin export function copy(dst: usize, src: usize, n: usize): void { memmove(dst, src, n); // fallback if "bulk-memory" isn't enabled } /** Initializes a memory segment. */ + // @ts-ignore: decorator @unsafe export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void { ERROR("not implemented"); } /** Drops a memory segment. */ + // @ts-ignore: decorator @unsafe export function drop(segmentIndex: u32): void { ERROR("not implemented"); } /** Dynamically allocates a section of memory and returns its address. */ + // @ts-ignore: decorator @unsafe export function allocate(size: usize): usize { + // @ts-ignore: undefined if (isDefined(__memory_allocate)) return __memory_allocate(size); else ERROR("missing implementation: memory.allocate"); return unreachable(); } /** Dynamically frees a section of memory by the previously allocated address. */ + // @ts-ignore: decorator @unsafe export function free(ptr: usize): void { + // @ts-ignore: undefined if (isDefined(__memory_free)) __memory_free(ptr); else ERROR("missing implementation: memory.free"); } /** Resets the memory to its initial state. Arena allocator only. */ + // @ts-ignore: decorator @unsafe export function reset(): void { + // @ts-ignore: undefined if (isDefined(__memory_reset)) __memory_reset(); else ERROR("missing implementation: memory.reset"); } /** Repeats a section of memory at a specific address. */ + // @ts-ignore: decorator @unsafe export function repeat(dst: usize, src: usize, srcLength: usize, count: usize): void { var index: usize = 0; var total = srcLength * count; @@ -61,6 +75,7 @@ export namespace memory { } /** Compares a section of memory to another. */ + // @ts-ignore: decorator @inline export function compare(vl: usize, vr: usize, n: usize): i32 { return memcmp(vl, vr, n); } diff --git a/std/assembly/number.ts b/std/assembly/number.ts index e562b58aeb..b44b065472 100644 --- a/std/assembly/number.ts +++ b/std/assembly/number.ts @@ -3,7 +3,9 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class I8 { + // @ts-ignore: decorator @lazy static readonly MIN_VALUE: i8 = i8.MIN_VALUE; + // @ts-ignore: decorator @lazy static readonly MAX_VALUE: i8 = i8.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): i8 { @@ -18,7 +20,9 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class I16 { + // @ts-ignore: decorator @lazy static readonly MIN_VALUE: i16 = i16.MIN_VALUE; + // @ts-ignore: decorator @lazy static readonly MAX_VALUE: i16 = i16.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): i16 { @@ -33,7 +37,9 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class I32 { + // @ts-ignore: decorator @lazy static readonly MIN_VALUE: i32 = i32.MIN_VALUE; + // @ts-ignore: decorator @lazy static readonly MAX_VALUE: i32 = i32.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): i32 { @@ -48,7 +54,9 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class I64 { + // @ts-ignore: decorator @lazy static readonly MIN_VALUE: i64 = i64.MIN_VALUE; + // @ts-ignore: decorator @lazy static readonly MAX_VALUE: i64 = i64.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): i64 { @@ -63,7 +71,9 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class Isize { + // @ts-ignore: decorator @lazy static readonly MIN_VALUE: isize = isize.MIN_VALUE; + // @ts-ignore: decorator @lazy static readonly MAX_VALUE: isize = isize.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): isize { @@ -78,7 +88,9 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class U8 { + // @ts-ignore: decorator @lazy static readonly MIN_VALUE: u8 = u8.MIN_VALUE; + // @ts-ignore: decorator @lazy static readonly MAX_VALUE: u8 = u8.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): u8 { @@ -93,7 +105,9 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class U16 { + // @ts-ignore: decorator @lazy static readonly MIN_VALUE: u16 = u16.MIN_VALUE; + // @ts-ignore: decorator @lazy static readonly MAX_VALUE: u16 = u16.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): u16 { @@ -108,7 +122,9 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class U32 { + // @ts-ignore: decorator @lazy static readonly MIN_VALUE: u32 = u32.MIN_VALUE; + // @ts-ignore: decorator @lazy static readonly MAX_VALUE: u32 = u32.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): u32 { @@ -123,7 +139,9 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class U64 { + // @ts-ignore: decorator @lazy static readonly MIN_VALUE: u64 = u64.MIN_VALUE; + // @ts-ignore: decorator @lazy static readonly MAX_VALUE: u64 = u64.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): u64 { @@ -138,7 +156,9 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class Usize { + // @ts-ignore: decorator @lazy static readonly MIN_VALUE: usize = usize.MIN_VALUE; + // @ts-ignore: decorator @lazy static readonly MAX_VALUE: usize = usize.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): usize { @@ -153,7 +173,9 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class Bool { + // @ts-ignore: decorator @lazy static readonly MIN_VALUE: bool = bool.MIN_VALUE; + // @ts-ignore: decorator @lazy static readonly MAX_VALUE: bool = bool.MAX_VALUE; toString(this: bool): String { @@ -166,13 +188,21 @@ export { Bool as Boolean }; @sealed export abstract class F32 { + // @ts-ignore: decorator @lazy static readonly EPSILON: f32 = f32.EPSILON; + // @ts-ignore: decorator @lazy static readonly MIN_VALUE: f32 = f32.MIN_VALUE; + // @ts-ignore: decorator @lazy static readonly MAX_VALUE: f32 = f32.MAX_VALUE; + // @ts-ignore: decorator @lazy static readonly MIN_SAFE_INTEGER: f32 = f32.MIN_SAFE_INTEGER; + // @ts-ignore: decorator @lazy static readonly MAX_SAFE_INTEGER: f32 = f32.MAX_SAFE_INTEGER; + // @ts-ignore: decorator @lazy static readonly POSITIVE_INFINITY: f32 = Infinity; + // @ts-ignore: decorator @lazy static readonly NEGATIVE_INFINITY: f32 = -Infinity; + // @ts-ignore: decorator @lazy static readonly NaN: f32 = NaN; static isNaN(value: f32): bool { @@ -207,13 +237,21 @@ export { Bool as Boolean }; @sealed export abstract class F64 { + // @ts-ignore: decorator @lazy static readonly EPSILON: f64 = f64.EPSILON; + // @ts-ignore: decorator @lazy static readonly MIN_VALUE: f64 = f64.MIN_VALUE; + // @ts-ignore: decorator @lazy static readonly MAX_VALUE: f64 = f64.MAX_VALUE; + // @ts-ignore: decorator @lazy static readonly MIN_SAFE_INTEGER: f64 = f64.MIN_SAFE_INTEGER; + // @ts-ignore: decorator @lazy static readonly MAX_SAFE_INTEGER: f64 = f64.MAX_SAFE_INTEGER; + // @ts-ignore: decorator @lazy static readonly POSITIVE_INFINITY: f64 = Infinity; + // @ts-ignore: decorator @lazy static readonly NEGATIVE_INFINITY: f64 = -Infinity; + // @ts-ignore: decorator @lazy static readonly NaN: f64 = NaN; static isNaN(value: f64): bool { diff --git a/std/assembly/polyfills.ts b/std/assembly/polyfills.ts index 00274f9451..87b7bc4db4 100644 --- a/std/assembly/polyfills.ts +++ b/std/assembly/polyfills.ts @@ -25,7 +25,7 @@ export function bswap(value: T): T { return value; } -@inline export function bswap16(value: T): T { +export function bswap16(value: T): T { if (isInteger() && sizeof() <= 4) { if (sizeof() == 2) { return ((value << 8) | ((value >> 8) & 0x00FF)); diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index d6b5727fa6..721b419821 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -9,11 +9,13 @@ export namespace runtime { @unmanaged export class Header { /** Size of a runtime header. */ + // @ts-ignore: decorator @lazy @inline static readonly SIZE: usize = gc.implemented ? (offsetof
( ) + AL_MASK) & ~AL_MASK // full header if GC is present : (offsetof
("gc1") + AL_MASK) & ~AL_MASK; // half header if GC is absent /** Magic value used to validate runtime headers. */ + // @ts-ignore: decorator @lazy @inline static readonly MAGIC: u32 = 0xA55E4B17; /** Unique id of the respective class or a magic value if not yet registered.*/ @@ -42,6 +44,7 @@ export namespace runtime { } /** Allocates a new object and returns a pointer to its payload. Does not fill. */ + // @ts-ignore: decorator @unsafe export function allocRaw(payloadSize: u32): usize { var header = changetype
(memory.allocate(adjust(payloadSize))); header.classId = Header.MAGIC; @@ -54,6 +57,7 @@ export namespace runtime { } /** Allocates a new object and returns a pointer to its payload. Fills with zeroes.*/ + // @ts-ignore: decorator @unsafe export function alloc(payloadSize: u32): usize { var ref = allocRaw(payloadSize); memory.fill(ref, 0, payloadSize); @@ -61,6 +65,7 @@ export namespace runtime { } /** Reallocates an object if necessary. Returns a pointer to its (moved) payload. */ + // @ts-ignore: decorator @unsafe export function realloc(ref: usize, newPayloadSize: u32): usize { // Background: When managed objects are allocated these aren't immediately registered with GC // but can be used as scratch objects while unregistered. This is useful in situations where @@ -111,11 +116,13 @@ export namespace runtime { } /** Frees an object. Must not have been registered with GC yet. */ + // @ts-ignore: decorator @unsafe @inline export function free(ref: T): void { memory.free(changetype(unref(changetype(ref)))); } /** Registers a managed object. Cannot be free'd anymore afterwards. */ + // @ts-ignore: decorator @unsafe @inline export function register(ref: usize): T { if (!isReference()) ERROR("reference expected"); // see comment in REALLOC why this is useful. also inline this because @@ -126,6 +133,7 @@ export namespace runtime { } /** Links a managed object with its managed parent. */ + // @ts-ignore: decorator @unsafe @inline export function link(ref: T, parentRef: TParent): void { assert(changetype(ref) >= HEAP_BASE + Header.SIZE); // must be a heap object var header = changetype
(changetype(ref) - Header.SIZE); @@ -141,8 +149,11 @@ export abstract class ArrayBufferView { [key: number]: number; + // @ts-ignore: decorator @unsafe data: ArrayBuffer; + // @ts-ignore: decorator @unsafe dataStart: usize; + // @ts-ignore: decorator @unsafe dataEnd: usize; constructor(length: i32, alignLog2: i32) { diff --git a/std/assembly/set.ts b/std/assembly/set.ts index bac34da219..ff8624a9be 100644 --- a/std/assembly/set.ts +++ b/std/assembly/set.ts @@ -3,8 +3,11 @@ import { HASH } from "./util/hash"; // A deterministic hash set based on CloseTable from https://github.com/jorendorff/dht +// @ts-ignore: decorator @inline const INITIAL_CAPACITY = 4; +// @ts-ignore: decorator @inline const FILL_FACTOR: f64 = 8 / 3; +// @ts-ignore: decorator @inline const FREE_FACTOR: f64 = 3 / 4; /** Structure of a set entry. */ @@ -14,12 +17,15 @@ import { HASH } from "./util/hash"; } /** Empty bit. */ +// @ts-ignore: decorator @inline const EMPTY: usize = 1 << 0; /** Size of a bucket. */ +// @ts-ignore: decorator @inline const BUCKET_SIZE = sizeof(); /** Computes the alignment of an entry. */ +// @ts-ignore: decorator @inline function ENTRY_ALIGN(): usize { // can align to 4 instead of 8 if 32-bit and K is <= 32-bits const align = (sizeof() > sizeof() ? sizeof() : sizeof()) - 1; @@ -27,6 +33,7 @@ import { HASH } from "./util/hash"; } /** Computes the aligned size of an entry. */ +// @ts-ignore: decorator @inline function ENTRY_SIZE(): usize { const align = ENTRY_ALIGN(); const size = (offsetof>() + align) & ~align; diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 2765333bc2..77a1d24a28 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -3,6 +3,7 @@ import { MAX_SIZE_32 } from "./util/allocator"; import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./util/string"; @sealed export abstract class String { + // @ts-ignore: decorator @lazy static readonly MAX_LENGTH: i32 = (MAX_SIZE_32 - runtime.Header.SIZE) >> alignof(); get length(): i32 { @@ -19,6 +20,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut static fromCodePoint(code: i32): String { assert(code <= 0x10FFFF); var sur = code > 0xFFFF; + // @ts-ignore: type var out = runtime.allocRaw((sur + 1) << 1); if (!sur) { store(out, code); @@ -80,6 +82,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var searchLength: isize = searchString.length; var start: isize = end - searchLength; if (start < 0) return false; + // @ts-ignore: string/String return !compareImpl(this, start, searchString, 0, searchLength); } @@ -88,6 +91,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut if (left === null || right === null) return false; var leftLength = left.length; if (leftLength != right.length) return false; + // @ts-ignore: string/String return !compareImpl(left, 0, right, 0, leftLength); } @@ -101,6 +105,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var rightLength = right.length; if (!leftLength) return false; if (!rightLength) return true; + // @ts-ignore: string/String return compareImpl(left, 0, right, 0, min(leftLength, rightLength)) > 0; } @@ -114,6 +119,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var rightLength = right.length; if (!rightLength) return false; if (!leftLength) return true; + // @ts-ignore: string/String return compareImpl(left, 0, right, 0, min(leftLength, rightLength)) < 0; } @@ -135,6 +141,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var start = min(max(fromIndex, 0), len); len -= searchLen; for (let k: isize = start; k <= len; ++k) { + // @ts-ignore: string/String if (!compareImpl(this, k, searchString, 0, searchLen)) return k; } return -1; @@ -149,6 +156,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut if (!len) return -1; var start = min(max(fromIndex, 0), len - searchLen); for (let k = start; k >= 0; --k) { + // @ts-ignore: string/String if (!compareImpl(this, k, searchString, 0, searchLen)) return k; } return -1; @@ -162,6 +170,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var start = min(max(pos, 0), len); var searchLength: isize = searchString.length; if (searchLength + start > len) return false; + // @ts-ignore: string/String return !compareImpl(this, start, searchString, 0, searchLength); } @@ -510,17 +519,21 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut } } +// @ts-ignore: nolib export type string = String; export function parseInt(str: String, radix: i32 = 0): f64 { + // @ts-ignore: string/String return parse(str, radix); } export function parseI32(str: String, radix: i32 = 0): i32 { + // @ts-ignore: string/String return parse(str, radix); } export function parseI64(str: String, radix: i32 = 0): i64 { + // @ts-ignore: string/String return parse(str, radix); } diff --git a/std/assembly/symbol.ts b/std/assembly/symbol.ts index 625b2c0b90..e50325f60c 100644 --- a/std/assembly/symbol.ts +++ b/std/assembly/symbol.ts @@ -4,6 +4,7 @@ import { Map } from "./map"; @lazy var idToString: Map; @lazy var nextId: usize = 12; // Symbol.unscopables + 1 +// @ts-ignore: nolib @unmanaged export class symbol { toString(): string { var id = changetype(this); @@ -52,6 +53,7 @@ export namespace Symbol { @lazy export const unscopables = changetype(11); /* tslint:disable */// not valid TS + // @ts-ignore: identifier export function for(key: string): symbol { if (!stringToId) { stringToId = new Map(); idToString = new Map(); } else if (stringToId.has(key)) return changetype(stringToId.get(key)); diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index 2f1b89b942..f23c2c9e0f 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -6,6 +6,7 @@ function clampToByte(value: i32): i32 { } export class Int8Array extends ArrayBufferView { + // @ts-ignore: decorator @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { @@ -68,6 +69,7 @@ export class Int8Array extends ArrayBufferView { } export class Uint8Array extends ArrayBufferView { + // @ts-ignore: decorator @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { @@ -124,6 +126,7 @@ export class Uint8Array extends ArrayBufferView { } export class Uint8ClampedArray extends Uint8Array { + // @ts-ignore: decorator @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8ClampedArray { @@ -174,6 +177,7 @@ export class Uint8ClampedArray extends Uint8Array { } export class Int16Array extends ArrayBufferView { + // @ts-ignore: decorator @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { @@ -236,6 +240,7 @@ export class Int16Array extends ArrayBufferView { } export class Uint16Array extends ArrayBufferView { + // @ts-ignore: decorator @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { @@ -298,6 +303,7 @@ export class Uint16Array extends ArrayBufferView { } export class Int32Array extends ArrayBufferView { + // @ts-ignore: decorator @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { @@ -360,6 +366,7 @@ export class Int32Array extends ArrayBufferView { } export class Uint32Array extends ArrayBufferView { + // @ts-ignore: decorator @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { @@ -422,6 +429,7 @@ export class Uint32Array extends ArrayBufferView { } export class Int64Array extends ArrayBufferView { + // @ts-ignore: decorator @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { @@ -484,6 +492,7 @@ export class Int64Array extends ArrayBufferView { } export class Uint64Array extends ArrayBufferView { + // @ts-ignore: decorator @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { @@ -546,6 +555,7 @@ export class Uint64Array extends ArrayBufferView { } export class Float32Array extends ArrayBufferView { + // @ts-ignore: decorator @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { @@ -608,6 +618,7 @@ export class Float32Array extends ArrayBufferView { } export class Float64Array extends ArrayBufferView { + // @ts-ignore: decorator @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { @@ -669,6 +680,7 @@ export class Float64Array extends ArrayBufferView { } } +// @ts-ignore: decorator @inline function FILL( array: TArray, value: native, @@ -689,6 +701,7 @@ export class Float64Array extends ArrayBufferView { return array; } +// @ts-ignore: decorator @inline function SORT( array: TArray, comparator: (a: T, b: T) => i32 @@ -709,6 +722,7 @@ export class Float64Array extends ArrayBufferView { return array; } +// @ts-ignore: decorator @inline function SUBARRAY( array: TArray, begin: i32, @@ -728,6 +742,7 @@ export class Float64Array extends ArrayBufferView { return changetype(out); } +// @ts-ignore: decorator @inline function REDUCE( array: TArray, callbackfn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet, @@ -740,6 +755,7 @@ export class Float64Array extends ArrayBufferView { return initialValue; } +// @ts-ignore: decorator @inline function REDUCE_RIGHT( array: TArray, callbackfn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet, @@ -752,6 +768,7 @@ export class Float64Array extends ArrayBufferView { return initialValue; } +// @ts-ignore: decorator @inline function MAP( array: TArray, callbackfn: (value: T, index: i32, self: TArray) => T, @@ -769,6 +786,7 @@ export class Float64Array extends ArrayBufferView { return out; } +// @ts-ignore: decorator @inline function FIND_INDEX( array: TArray, callbackfn: (value: T, index: i32, array: TArray) => bool, @@ -780,6 +798,7 @@ export class Float64Array extends ArrayBufferView { return -1; } +// @ts-ignore: decorator @inline function SOME( array: TArray, callbackfn: (value: T, index: i32, array: TArray) => bool, @@ -791,6 +810,7 @@ export class Float64Array extends ArrayBufferView { return false; } +// @ts-ignore: decorator @inline function EVERY( array: TArray, callbackfn: (value: T, index: i32, array: TArray) => bool, @@ -803,6 +823,7 @@ export class Float64Array extends ArrayBufferView { return true; } +// @ts-ignore: decorator @inline function FOREACH( array: TArray, callbackfn: (value: T, index: i32, array: TArray) => void, diff --git a/std/assembly/util/allocator.ts b/std/assembly/util/allocator.ts index 508710c6cf..af722401b6 100644 --- a/std/assembly/util/allocator.ts +++ b/std/assembly/util/allocator.ts @@ -1,8 +1,15 @@ /** Number of alignment bits. */ +// @ts-ignore: decorator @inline export const AL_BITS: u32 = 3; + /** Number of possible alignment values. */ +// @ts-ignore: decorator @inline export const AL_SIZE: usize = 1 << AL_BITS; + /** Mask to obtain just the alignment bits. */ +// @ts-ignore: decorator @inline export const AL_MASK: usize = AL_SIZE - 1; + /** Maximum 32-bit allocation size. */ +// @ts-ignore: decorator @inline export const MAX_SIZE_32: usize = 1 << 30; // 1GB diff --git a/std/assembly/util/hash.ts b/std/assembly/util/hash.ts index f4dcea3eae..86a3d92a2e 100644 --- a/std/assembly/util/hash.ts +++ b/std/assembly/util/hash.ts @@ -1,16 +1,24 @@ +// @ts-ignore: decorator @inline export function HASH(key: T): u32 { if (isString(key)) { + // @ts-ignore: type return hashStr(key); } else if (isReference()) { if (sizeof() == 4) return hash32(changetype(key)); if (sizeof() == 8) return hash64(changetype(key)); } else if (isFloat()) { + // @ts-ignore: type if (sizeof() == 4) return hash32(reinterpret(key)); + // @ts-ignore: type if (sizeof() == 8) return hash64(reinterpret(key)); } else { + // @ts-ignore: type if (sizeof() == 1) return hash8 (key); + // @ts-ignore: type if (sizeof() == 2) return hash16(key); + // @ts-ignore: type if (sizeof() == 4) return hash32(key); + // @ts-ignore: type if (sizeof() == 8) return hash64(key); } unreachable(); @@ -18,7 +26,9 @@ // FNV-1a 32-bit as a starting point, see: http://isthe.com/chongo/tech/comp/fnv/ +// @ts-ignore: decorator @inline const FNV_OFFSET: u32 = 2166136261; +// @ts-ignore: decorator @inline const FNV_PRIME: u32 = 16777619; function hash8(key: u32): u32 { diff --git a/std/assembly/util/number.ts b/std/assembly/util/number.ts index 45dbefe1d1..48bb41b4ae 100644 --- a/std/assembly/util/number.ts +++ b/std/assembly/util/number.ts @@ -1,8 +1,10 @@ import { runtime } from "../runtime"; import { CharCode } from "./string"; +// @ts-ignore: decorator @inline export const MAX_DOUBLE_LENGTH = 28; +// @ts-ignore: decorator @lazy @inline const POWERS10: u32[] = [ 1, 10, @@ -30,6 +32,7 @@ import { CharCode } from "./string"; "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99" */ +// @ts-ignore: decorator @lazy @inline const DIGITS: u32[] = [ 0x00300030, 0x00310030, 0x00320030, 0x00330030, 0x00340030, 0x00350030, 0x00360030, 0x00370030, 0x00380030, 0x00390030, @@ -53,6 +56,7 @@ import { CharCode } from "./string"; 0x00350039, 0x00360039, 0x00370039, 0x00380039, 0x00390039 ]; +// @ts-ignore: decorator @lazy @inline const EXP_POWERS: i16[] = [ -1220, -1193, -1166, -1140, -1113, -1087, -1060, -1034, -1007, -980, -954, -927, -901, -874, -847, -821, -794, -768, -741, -715, @@ -66,6 +70,7 @@ import { CharCode } from "./string"; ]; // 1e-348, 1e-340, ..., 1e340 +// @ts-ignore: decorator @lazy @inline const FRC_POWERS: u64[] = [ 0xFA8FD5A0081C0288, 0xBAAEE17FA23EBF76, 0x8B16FB203055AC76, 0xCF42894A5DCE35EA, 0x9A6BB0AA55653B2D, 0xE61ACF033D1A45DF, 0xAB70FE17C79AC6CA, 0xFF77B1FCBEBCDC4F, diff --git a/std/assembly/util/sort.ts b/std/assembly/util/sort.ts index 40690d200c..6604972d8d 100644 --- a/std/assembly/util/sort.ts +++ b/std/assembly/util/sort.ts @@ -1,45 +1,59 @@ import { compareImpl } from "./string"; +// @ts-ignore: decorator @inline export function COMPARATOR(): (a: T, b: T) => i32 { if (isInteger()) { if (isSigned() && sizeof() <= 4) { + // @ts-ignore: type return (a: T, b: T): i32 => ((a - b)); } else { + // @ts-ignore: type return (a: T, b: T): i32 => ((a > b) - (a < b)); } } else if (isFloat()) { if (sizeof() == 4) { return (a: T, b: T): i32 => { + // @ts-ignore: type var ia = reinterpret(a); + // @ts-ignore: type var ib = reinterpret(b); ia ^= (ia >> 31) >>> 1; ib ^= (ib >> 31) >>> 1; + // @ts-ignore: type return (ia > ib) - (ia < ib); }; } else { return (a: T, b: T): i32 => { + // @ts-ignore: type var ia = reinterpret(a); + // @ts-ignore: type var ib = reinterpret(b); ia ^= (ia >> 63) >>> 1; ib ^= (ib >> 63) >>> 1; + // @ts-ignore: type return (ia > ib) - (ia < ib); }; } } else if (isString()) { return (a: T, b: T): i32 => { if (a === b || a === null || b === null) return 0; + // @ts-ignore: type var alen = (a).length; + // @ts-ignore: type var blen = (b).length; if (!alen && !blen) return 0; if (!alen) return -1; if (!blen) return 1; + // @ts-ignore: type return compareImpl(a, 0, b, 0, min(alen, blen)); }; } else { + // @ts-ignore: type return (a: T, b: T): i32 => ((a > b) - (a < b)); } } +// @ts-ignore: decorator @inline export function SORT( dataStart: usize, length: i32, diff --git a/std/assembly/util/string.ts b/std/assembly/util/string.ts index a3374134d0..49579ef64f 100644 --- a/std/assembly/util/string.ts +++ b/std/assembly/util/string.ts @@ -8,6 +8,7 @@ export function compareImpl(str1: string, index1: usize, str2: string, index2: u return result; } +// @ts-ignore: decorator @inline export const enum CharCode { PLUS = 0x2B, MINUS = 0x2D, @@ -57,29 +58,35 @@ export function isWhiteSpaceOrLineTerminator(c: u16): bool { /** Parses a string to an integer (usually), using the specified radix. */ export function parse(str: string, radix: i32 = 0): T { var len: i32 = str.length; + // @ts-ignore: type if (!len) return NaN; var ptr = changetype(str) /* + HEAD -> offset */; - var code = load(ptr, HEADER_SIZE); + var code = load(ptr); // determine sign var sign: T; if (code == CharCode.MINUS) { + // @ts-ignore: type if (!--len) return NaN; - code = load(ptr += 2, HEADER_SIZE); + code = load(ptr += 2); + // @ts-ignore: type sign = -1; } else if (code == CharCode.PLUS) { + // @ts-ignore: type if (!--len) return NaN; - code = load(ptr += 2, HEADER_SIZE); + code = load(ptr += 2); + // @ts-ignore: type sign = 1; } else { + // @ts-ignore: type sign = 1; } // determine radix if (!radix) { if (code == CharCode._0 && len > 2) { - switch (load(ptr + 2, HEADER_SIZE)) { + switch (load(ptr + 2)) { case CharCode.B: case CharCode.b: { ptr += 4; len -= 2; @@ -102,13 +109,15 @@ export function parse(str: string, radix: i32 = 0): T { } } else radix = 10; } else if (radix < 2 || radix > 36) { + // @ts-ignore: cast return NaN; } // calculate value + // @ts-ignore: type var num: T = 0; while (len--) { - code = load(ptr, HEADER_SIZE); + code = load(ptr); if (code >= CharCode._0 && code <= CharCode._9) { code -= CharCode._0; } else if (code >= CharCode.A && code <= CharCode.Z) { @@ -117,8 +126,10 @@ export function parse(str: string, radix: i32 = 0): T { code -= CharCode.a - 10; } else break; if (code >= radix) break; + // @ts-ignore: type num = (num * radix) + code; ptr += 2; } + // @ts-ignore: type return sign * num; } From 84ddd977617a75f990e715becee8ed7a295da1a6 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 14 Mar 2019 06:09:49 +0100 Subject: [PATCH 030/119] if that's what's necessary --- src/builtins.ts | 9 + std/assembly/allocator/arena.ts | 15 +- std/assembly/allocator/emscripten.ts | 12 +- std/assembly/allocator/system.ts | 12 +- std/assembly/allocator/tlsf.ts | 8 +- std/assembly/array.ts | 45 +- std/assembly/builtins.ts | 1612 +++++++++++++++++++------- std/assembly/collector/itcm.ts | 33 +- std/assembly/diagnostics.ts | 9 +- std/assembly/gc.ts | 36 +- std/assembly/index.d.ts | 24 +- std/assembly/map.ts | 21 +- std/assembly/math.ts | 189 ++- std/assembly/memory.ts | 42 +- std/assembly/number.ts | 139 ++- std/assembly/runtime.ts | 40 +- std/assembly/set.ts | 23 +- std/assembly/string.ts | 27 +- std/assembly/symbol.ts | 5 +- std/assembly/typedarray.ts | 74 +- std/assembly/util/allocator.ts | 12 +- std/assembly/util/hash.ts | 33 +- std/assembly/util/number.ts | 19 +- std/assembly/util/sort.ts | 42 +- std/assembly/util/string.ts | 9 +- 25 files changed, 1783 insertions(+), 707 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index 369fd4aa72..5c5880dd96 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -91,6 +91,7 @@ export namespace BuiltinSymbols { // std/builtins.ts export const isInteger = "~lib/builtins/isInteger"; export const isFloat = "~lib/builtins/isFloat"; + export const isBoolean = "~lib/builtins/isBoolean"; export const isSigned = "~lib/builtins/isSigned"; export const isReference = "~lib/builtins/isReference"; export const isString = "~lib/builtins/isString"; @@ -542,6 +543,14 @@ export function compileCall( ? module.createI32(1) : module.createI32(0); } + case BuiltinSymbols.isBoolean: { // isBoolean() / isBoolean(value: T) -> bool + let type = evaluateConstantType(compiler, typeArguments, operands, reportNode); + compiler.currentType = Type.bool; + if (!type) return module.createUnreachable(); + return type == Type.bool + ? module.createI32(1) + : module.createI32(0); + } case BuiltinSymbols.isSigned: { // isSigned() / isSigned(value: T) -> bool let type = evaluateConstantType(compiler, typeArguments, operands, reportNode); compiler.currentType = Type.bool; diff --git a/std/assembly/allocator/arena.ts b/std/assembly/allocator/arena.ts index 55fd770e6d..eb867ca163 100644 --- a/std/assembly/allocator/arena.ts +++ b/std/assembly/allocator/arena.ts @@ -2,13 +2,16 @@ import { HEAP_BASE, memory } from "../memory"; import { AL_MASK, MAX_SIZE_32 } from "../util/allocator"; // @ts-ignore: decorator -@lazy var startOffset: usize = (HEAP_BASE + AL_MASK) & ~AL_MASK; +@lazy +var startOffset: usize = (HEAP_BASE + AL_MASK) & ~AL_MASK; // @ts-ignore: decorator -@lazy var offset: usize = startOffset; +@lazy +var offset: usize = startOffset; // @ts-ignore: decorator -@unsafe @global function __memory_allocate(size: usize): usize { +@unsafe @global +function __memory_allocate(size: usize): usize { if (size > MAX_SIZE_32) unreachable(); var ptr = offset; var newPtr = (ptr + max(size, 1) + AL_MASK) & ~AL_MASK; @@ -27,10 +30,12 @@ import { AL_MASK, MAX_SIZE_32 } from "../util/allocator"; } // @ts-ignore: decorator -@unsafe @global function __memory_free(ptr: usize): void { +@unsafe @global +function __memory_free(ptr: usize): void { } // @ts-ignore: decorator -@unsafe @global function __memory_reset(): void { +@unsafe @global +function __memory_reset(): void { offset = startOffset; } diff --git a/std/assembly/allocator/emscripten.ts b/std/assembly/allocator/emscripten.ts index 9fc3cc7e57..81c3700fe6 100644 --- a/std/assembly/allocator/emscripten.ts +++ b/std/assembly/allocator/emscripten.ts @@ -1,15 +1,19 @@ // @ts-ignore: decorator -@unsafe declare function _malloc(size: usize): usize; +@unsafe +declare function _malloc(size: usize): usize; // @ts-ignore: decorator -@unsafe declare function _free(ptr: usize): void; +@unsafe +declare function _free(ptr: usize): void; // @ts-ignore: decorator -@unsafe @global function __memory_allocate(size: usize): usize { +@unsafe @global +function __memory_allocate(size: usize): usize { return _malloc(size); } // @ts-ignore: decorator -@unsafe @global function __memory_free(ptr: usize): void { +@unsafe @global +function __memory_free(ptr: usize): void { _free(ptr); } diff --git a/std/assembly/allocator/system.ts b/std/assembly/allocator/system.ts index 70d3ba122a..9ec0dc4a60 100644 --- a/std/assembly/allocator/system.ts +++ b/std/assembly/allocator/system.ts @@ -1,15 +1,19 @@ // @ts-ignore: decorator -@unsafe declare function malloc(size: usize): usize; +@unsafe +declare function malloc(size: usize): usize; // @ts-ignore: decorator -@unsafe declare function free(ptr: usize): void; +@unsafe +declare function free(ptr: usize): void; // @ts-ignore: decorator -@unsafe @global function __memory_allocate(size: usize): usize { +@unsafe @global +function __memory_allocate(size: usize): usize { return malloc(size); } // @ts-ignore: decorator -@unsafe @global function __memory_free(ptr: usize): void { +@unsafe @global +function __memory_free(ptr: usize): void { free(ptr); } diff --git a/std/assembly/allocator/tlsf.ts b/std/assembly/allocator/tlsf.ts index 1146fa6b5c..c3c59ca1d9 100644 --- a/std/assembly/allocator/tlsf.ts +++ b/std/assembly/allocator/tlsf.ts @@ -423,7 +423,8 @@ var ROOT: Root = changetype(0); /** Allocates a chunk of memory. */ // @ts-ignore: decorator -@unsafe @global function __memory_allocate(size: usize): usize { +@unsafe @global +function __memory_allocate(size: usize): usize { // initialize if necessary var root = ROOT; if (!root) { @@ -471,8 +472,9 @@ var ROOT: Root = changetype(0); } /** Frees the chunk of memory at the specified address. */ -// @ts-ignore -@unsafe @global function __memory_free(data: usize): void { +// @ts-ignore: decorator +@unsafe @global +function __memory_free(data: usize): void { if (data) { let root = ROOT; if (root) { diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 635465deab..6591173280 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -95,8 +95,7 @@ export class Array extends ArrayBufferView { if (start < end) { memory.fill( dataStart + start, - // @ts-ignore: cast - value, + u8(value), (end - start) ); } @@ -269,8 +268,10 @@ export class Array extends ArrayBufferView { base + sizeof(), lastIndex << alignof() ); - // @ts-ignore: cast - store(base + (lastIndex << alignof()), null); + store(base + (lastIndex << alignof()), + // @ts-ignore: cast + null + ); this.length_ = lastIndex; return element; } @@ -376,11 +377,8 @@ export class Array extends ArrayBufferView { } join(separator: string = ","): string { - if (isInteger()) { - // @ts-ignore: type - if (value instanceof bool) return this.join_bool(separator); - return this.join_int(separator); - } + if (isBoolean()) return this.join_bool(separator); + if (isInteger()) return this.join_int(separator); if (isFloat()) return this.join_flt(separator); if (isString()) return this.join_str(separator); if (isArray()) return this.join_arr(separator); @@ -403,8 +401,7 @@ export class Array extends ArrayBufferView { var value: bool; for (let i = 0; i < lastIndex; ++i) { value = load(dataStart + i); - // @ts-ignore: cast - valueLen = 4 + (!value); + valueLen = 4 + i32(!value); memory.copy( result + (offset << 1), changetype(select("true", "false", value)), @@ -421,8 +418,7 @@ export class Array extends ArrayBufferView { } } value = load(dataStart + lastIndex); - // @ts-ignore: cast - valueLen = 4 + (!value); + valueLen = 4 + i32(!value); memory.copy( result + (offset << 1), changetype(select("true", "false", value)), @@ -445,8 +441,7 @@ export class Array extends ArrayBufferView { if (!lastIndex) return changetype(itoa(load(dataStart))); var sepLen = separator.length; - // @ts-ignore: cast - const valueLen = (sizeof() <= 4 ? 10 : 20) + isSigned(); + const valueLen = (sizeof() <= 4 ? 10 : 20) + i32(isSigned()); var estLen = (valueLen + sepLen) * lastIndex + valueLen; var result = runtime.alloc(estLen << 1); var offset = 0; @@ -477,8 +472,12 @@ export class Array extends ArrayBufferView { var lastIndex = this.length_ - 1; if (lastIndex < 0) return ""; var dataStart = this.dataStart; - // @ts-ignore: type - if (!lastIndex) return changetype(dtoa(load(dataStart))); + if (!lastIndex) { + return changetype(dtoa( + // @ts-ignore: type + load(dataStart)) + ); + } const valueLen = MAX_DOUBLE_LENGTH; var sepLen = separator.length; @@ -488,8 +487,10 @@ export class Array extends ArrayBufferView { var value: T; for (let i = 0; i < lastIndex; ++i) { value = load(dataStart + (i << alignof())); - // @ts-ignore: type - offset += dtoa_stream(result, offset, value); + offset += dtoa_stream(result, offset, + // @ts-ignore: type + value + ); if (sepLen) { memory.copy( result + (offset << 1), @@ -500,8 +501,10 @@ export class Array extends ArrayBufferView { } } value = load(dataStart + (lastIndex << alignof())); - // @ts-ignore: type - offset += dtoa_stream(result, offset, value); + offset += dtoa_stream(result, offset, + // @ts-ignore: type + value + ); if (estLen > offset) { let trimmed = changetype(result).substring(0, offset); runtime.free(result); diff --git a/std/assembly/builtins.ts b/std/assembly/builtins.ts index 1349e1b7d5..ac0f1439d2 100644 --- a/std/assembly/builtins.ts +++ b/std/assembly/builtins.ts @@ -1,898 +1,1710 @@ // @ts-ignore: decorator -@builtin @inline export const NaN: f64 = 0 / 0; +@builtin @inline +export const NaN: f64 = 0 / 0; + // @ts-ignore: decorator -@builtin @inline export const Infinity: f64 = 1 / 0; +@builtin @inline +export const Infinity: f64 = 1 / 0; // @ts-ignore: decorator -@builtin export declare function isInteger(value?: T): bool; +@builtin +export declare function isInteger(value?: T): bool; + // @ts-ignore: decorator -@builtin export declare function isFloat(value?: T): bool; +@builtin +export declare function isFloat(value?: T): bool; + // @ts-ignore: decorator -@builtin export declare function isSigned(value?: T): bool; +@builtin +export declare function isBoolean(value?: T): bool; + // @ts-ignore: decorator -@builtin export declare function isReference(value?: T): bool; +@builtin +export declare function isSigned(value?: T): bool; + // @ts-ignore: decorator -@builtin export declare function isString(value?: T): bool; +@builtin +export declare function isReference(value?: T): bool; + // @ts-ignore: decorator -@builtin export declare function isArray(value?: T): bool; +@builtin +export declare function isString(value?: T): bool; + // @ts-ignore: decorator -@builtin export declare function isArrayLike(value?: T): bool; +@builtin +export declare function isArray(value?: T): bool; + // @ts-ignore: decorator -@builtin export declare function isFunction(value?: T): bool; +@builtin +export declare function isArrayLike(value?: T): bool; + // @ts-ignore: decorator -@builtin export declare function isNullable(value?: T): bool; +@builtin +export declare function isFunction(value?: T): bool; + // @ts-ignore: decorator -@builtin export declare function isDefined(expression: void): bool; +@builtin +export declare function isNullable(value?: T): bool; + // @ts-ignore: decorator -@builtin export declare function isConstant(expression: void): bool; +@builtin +export declare function isDefined(expression: void): bool; + // @ts-ignore: decorator -@builtin export declare function isManaged(value?: T): bool; +@builtin +export declare function isConstant(expression: void): bool; + // @ts-ignore: decorator -@inline export function isNaN(value: T): bool { return value != value; } +@builtin +export declare function isManaged(value?: T): bool; + // @ts-ignore: decorator -@inline export function isFinite(value: T): bool { return value - value == 0; } +@inline +export function isNaN(value: T): bool { return value != value; } // @ts-ignore: decorator -@builtin export declare function clz(value: T): T; +@inline +export function isFinite(value: T): bool { + // @ts-ignore: type + return value - value == 0; +} + // @ts-ignore: decorator -@builtin export declare function ctz(value: T): T; +@builtin +export declare function clz(value: T): T; + // @ts-ignore: decorator -@builtin export declare function popcnt(value: T): T; +@builtin +export declare function ctz(value: T): T; + // @ts-ignore: decorator -@builtin export declare function rotl(value: T, shift: T): T; +@builtin +export declare function popcnt(value: T): T; + // @ts-ignore: decorator -@builtin export declare function rotr(value: T, shift: T): T; +@builtin +export declare function rotl(value: T, shift: T): T; + // @ts-ignore: decorator -@builtin export declare function abs(value: T): T; +@builtin +export declare function rotr(value: T, shift: T): T; + // @ts-ignore: decorator -@builtin export declare function max(left: T, right: T): T; +@builtin +export declare function abs(value: T): T; + // @ts-ignore: decorator -@builtin export declare function min(left: T, right: T): T; +@builtin +export declare function max(left: T, right: T): T; + // @ts-ignore: decorator -@builtin export declare function ceil(value: T): T; +@builtin +export declare function min(left: T, right: T): T; + // @ts-ignore: decorator -@builtin export declare function floor(value: T): T; +@builtin +export declare function ceil(value: T): T; + // @ts-ignore: decorator -@builtin export declare function copysign(left: T, right: T): T; +@builtin +export declare function floor(value: T): T; + // @ts-ignore: decorator -@builtin export declare function nearest(value: T): T; +@builtin +export declare function copysign(left: T, right: T): T; + // @ts-ignore: decorator -@builtin export declare function reinterpret(value: number): T; +@builtin +export declare function nearest(value: T): T; + // @ts-ignore: decorator -@builtin export declare function sqrt(value: T): T; +@builtin +export declare function reinterpret(value: number): T; + // @ts-ignore: decorator -@builtin export declare function trunc(value: T): T; +@builtin +export declare function sqrt(value: T): T; + // @ts-ignore: decorator -@builtin export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): T; +@builtin +export declare function trunc(value: T): T; + // @ts-ignore: decorator -@builtin export declare function store(offset: usize, value: void, immOffset?: usize, immAlign?: usize): void; +@builtin +export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): T; + // @ts-ignore: decorator -@builtin export declare function sizeof(): usize; // | u32 / u64 +@builtin +export declare function store(offset: usize, value: void, immOffset?: usize, immAlign?: usize): void; + // @ts-ignore: decorator -@builtin export declare function alignof(): usize; // | u32 / u64 +@builtin +export declare function sizeof(): usize; // | u32 / u64 + // @ts-ignore: decorator -@builtin export declare function offsetof(fieldName?: string): usize; // | u32 / u64 +@builtin +export declare function alignof(): usize; // | u32 / u64 + // @ts-ignore: decorator -@builtin export declare function select(ifTrue: T, ifFalse: T, condition: bool): T; +@builtin +export declare function offsetof(fieldName?: string): usize; // | u32 / u64 + // @ts-ignore: decorator -@builtin export declare function unreachable(): void; +@builtin +export declare function select(ifTrue: T, ifFalse: T, condition: bool): T; + // @ts-ignore: decorator -@builtin export declare function changetype(value: void): T; +@builtin +export declare function unreachable(): void; + // @ts-ignore: decorator -@builtin export declare function assert(isTrueish: T, message?: string): T; +@builtin +export declare function changetype(value: void): T; + // @ts-ignore: decorator -@builtin export declare function unchecked(expr: T): T; +@builtin +export declare function assert(isTrueish: T, message?: string): T; + +// @ts-ignore: decorator +@builtin +export declare function unchecked(expr: T): T; + // @ts-ignore: decorator -@builtin export declare function call_indirect(target: void, ...args: void[]): T; +@builtin +export declare function call_indirect(target: void, ...args: void[]): T; + // @ts-ignore: decorator -@builtin export declare function instantiate(...args: void[]): T; +@builtin +export declare function instantiate(...args: void[]): T; export namespace atomic { // @ts-ignore: decorator - @builtin export declare function load(offset: usize, immOffset?: usize): T; + @builtin + export declare function load(offset: usize, immOffset?: usize): T; + // @ts-ignore: decorator - @builtin export declare function store(offset: usize, value: T, immOffset?: usize): void; + @builtin + export declare function store(offset: usize, value: T, immOffset?: usize): void; + // @ts-ignore: decorator - @builtin export declare function add(ptr: usize, value: T, immOffset?: usize): T; + @builtin + export declare function add(ptr: usize, value: T, immOffset?: usize): T; + // @ts-ignore: decorator - @builtin export declare function sub(ptr: usize, value: T, immOffset?: usize): T; + @builtin + export declare function sub(ptr: usize, value: T, immOffset?: usize): T; + // @ts-ignore: decorator - @builtin export declare function and(ptr: usize, value: T, immOffset?: usize): T; + @builtin + export declare function and(ptr: usize, value: T, immOffset?: usize): T; + // @ts-ignore: decorator - @builtin export declare function or(ptr: usize, value: T, immOffset?: usize): T; + @builtin + export declare function or(ptr: usize, value: T, immOffset?: usize): T; + // @ts-ignore: decorator - @builtin export declare function xor(ptr: usize, value: T, immOffset?: usize): T; + @builtin + export declare function xor(ptr: usize, value: T, immOffset?: usize): T; + // @ts-ignore: decorator - @builtin export declare function xchg(ptr: usize, value: T, immOffset?: usize): T; + @builtin + export declare function xchg(ptr: usize, value: T, immOffset?: usize): T; + // @ts-ignore: decorator - @builtin export declare function cmpxchg(ptr: usize, expected: T, replacement: T, immOffset?: usize): T; + @builtin + export declare function cmpxchg(ptr: usize, expected: T, replacement: T, immOffset?: usize): T; + // @ts-ignore: decorator - @builtin export declare function wait(ptr: usize, expected: T, timeout: i64): AtomicWaitResult; + @builtin + export declare function wait(ptr: usize, expected: T, timeout: i64): AtomicWaitResult; + // @ts-ignore: decorator - @builtin export declare function notify(ptr: usize, count: i32): i32; - // @ts-ignore: decorators + @builtin + export declare function notify(ptr: usize, count: i32): i32; } // @ts-ignore: decorator -@lazy export const enum AtomicWaitResult { +@lazy +export const enum AtomicWaitResult { OK = 0, NOT_EQUAL = 1, TIMED_OUT = 2 } // @ts-ignore: decorator -@builtin export declare function i8(value: void): i8; +@builtin +export declare function i8(value: void): i8; + export namespace i8 { + // @ts-ignore: decorator - @lazy export const MIN_VALUE: i8 = -128; + @lazy + export const MIN_VALUE: i8 = -128; + // @ts-ignore: decorator - @lazy export const MAX_VALUE: i8 = 127; + @lazy + export const MAX_VALUE: i8 = 127; } // @ts-ignore: decorator -@builtin export declare function i16(value: void): i16; +@builtin +export declare function i16(value: void): i16; + export namespace i16 { + // @ts-ignore: decorator - @lazy export const MIN_VALUE: i16 = -32768; + @lazy + export const MIN_VALUE: i16 = -32768; + // @ts-ignore: decorator - @lazy export const MAX_VALUE: i16 = 32767; + @lazy + export const MAX_VALUE: i16 = 32767; } // @ts-ignore: decorator -@builtin export declare function i32(value: void): i32; +@builtin +export declare function i32(value: void): i32; + export namespace i32 { + // @ts-ignore: decorator - @lazy export const MIN_VALUE: i32 = -2147483648; + @lazy + export const MIN_VALUE: i32 = -2147483648; + // @ts-ignore: decorator - @lazy export const MAX_VALUE: i32 = 2147483647; + @lazy + export const MAX_VALUE: i32 = 2147483647; + // @ts-ignore: decorator - @builtin export declare function clz(value: i32): i32; + @builtin + export declare function clz(value: i32): i32; + // @ts-ignore: decorator - @builtin export declare function ctz(value: i32): i32; + @builtin + export declare function ctz(value: i32): i32; + // @ts-ignore: decorator - @builtin export declare function popcnt(value: i32): i32; + @builtin + export declare function popcnt(value: i32): i32; + // @ts-ignore: decorator - @builtin export declare function rotl(value: i32, shift: i32): i32; + @builtin + export declare function rotl(value: i32, shift: i32): i32; + // @ts-ignore: decorator - @builtin export declare function rotr(value: i32, shift: i32): i32; + @builtin + export declare function rotr(value: i32, shift: i32): i32; + // @ts-ignore: decorator - @builtin export declare function reinterpret_f32(value: f32): i32; + @builtin + export declare function reinterpret_f32(value: f32): i32; + // @ts-ignore: decorator - @builtin export declare function load8_s(offset: usize, immOffset?: usize, immAlign?: usize): i32; + @builtin + export declare function load8_s(offset: usize, immOffset?: usize, immAlign?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function load8_u(offset: usize, immOffset?: usize, immAlign?: usize): i32; + @builtin + export declare function load8_u(offset: usize, immOffset?: usize, immAlign?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function load16_s(offset: usize, immOffset?: usize, immAlign?: usize): i32; + @builtin + export declare function load16_s(offset: usize, immOffset?: usize, immAlign?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function load16_u(offset: usize, immOffset?: usize, immAlign?: usize): i32; + @builtin + export declare function load16_u(offset: usize, immOffset?: usize, immAlign?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): i32; + @builtin + export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function store8(offset: usize, value: i32, immOffset?: usize, immAlign?: usize): void; + @builtin + export declare function store8(offset: usize, value: i32, immOffset?: usize, immAlign?: usize): void; + // @ts-ignore: decorator - @builtin export declare function store16(offset: usize, value: i32, immOffset?: usize, immAlign?: usize): void; + @builtin + export declare function store16(offset: usize, value: i32, immOffset?: usize, immAlign?: usize): void; + // @ts-ignore: decorator - @builtin export declare function store(offset: usize, value: i32, immOffset?: usize, immAlign?: usize): void; - + @builtin + export declare function store(offset: usize, value: i32, immOffset?: usize, immAlign?: usize): void; + export namespace atomic { + // @ts-ignore: decorator - @builtin export declare function load8_u(offset: usize, immOffset?: usize): i32; + @builtin + export declare function load8_u(offset: usize, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function load16_u(offset: usize, immOffset?: usize): i32; + @builtin + export declare function load16_u(offset: usize, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function load(offset: usize, immOffset?: usize): i32; + @builtin + export declare function load(offset: usize, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function store8(offset: usize, value: i32, immOffset?: usize): void; + @builtin + export declare function store8(offset: usize, value: i32, immOffset?: usize): void; + // @ts-ignore: decorator - @builtin export declare function store16(offset: usize, value: i32, immOffset?: usize): void; + @builtin + export declare function store16(offset: usize, value: i32, immOffset?: usize): void; + // @ts-ignore: decorator - @builtin export declare function store(offset: usize, value: i32, immOffset?: usize): void; + @builtin + export declare function store(offset: usize, value: i32, immOffset?: usize): void; + // @ts-ignore: decorator - @builtin export declare function wait(ptr: usize, expected: i32, timeout: i64): AtomicWaitResult; + @builtin + export declare function wait(ptr: usize, expected: i32, timeout: i64): AtomicWaitResult; + // @ts-ignore: decorator - @builtin export declare function notify(ptr: usize, count: i32): i32; + @builtin + export declare function notify(ptr: usize, count: i32): i32; export namespace rmw8 { + // @ts-ignore: decorator - @builtin export declare function add_u(offset: usize, value: i32, immOffset?: usize): i32; + @builtin + export declare function add_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function sub_u(offset: usize, value: i32, immOffset?: usize): i32; + @builtin + export declare function sub_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function and_u(offset: usize, value: i32, immOffset?: usize): i32; + @builtin + export declare function and_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function or_u(offset: usize, value: i32, immOffset?: usize): i32; + @builtin + export declare function or_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function xor_u(offset: usize, value: i32, immOffset?: usize): i32; + @builtin + export declare function xor_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function xchg_u(offset: usize, value: i32, immOffset?: usize): i32; + @builtin + export declare function xchg_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function cmpxchg_u(offset: usize, expected: i32, replacement: i32, immOffset?: usize): i32; + @builtin + export declare function cmpxchg_u(offset: usize, expected: i32, replacement: i32, immOffset?: usize): i32; } + export namespace rmw16 { + // @ts-ignore: decorator - @builtin export declare function add_u(offset: usize, value: i32, immOffset?: usize): i32; + @builtin + export declare function add_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function sub_u(offset: usize, value: i32, immOffset?: usize): i32; + @builtin + export declare function sub_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function and_u(offset: usize, value: i32, immOffset?: usize): i32; + @builtin + export declare function and_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function or_u(offset: usize, value: i32, immOffset?: usize): i32; + @builtin + export declare function or_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function xor_u(offset: usize, value: i32, immOffset?: usize): i32; + @builtin + export declare function xor_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function xchg_u(offset: usize, value: i32, immOffset?: usize): i32; + @builtin + export declare function xchg_u(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function cmpxchg_u(offset: usize, expected: i32, replacement: i32, immOffset?: usize): i32; + @builtin + export declare function cmpxchg_u(offset: usize, expected: i32, replacement: i32, immOffset?: usize): i32; } + export namespace rmw { + // @ts-ignore: decorator - @builtin export declare function add(offset: usize, value: i32, immOffset?: usize): i32; + @builtin + export declare function add(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function sub(offset: usize, value: i32, immOffset?: usize): i32; + @builtin + export declare function sub(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function and(offset: usize, value: i32, immOffset?: usize): i32; + @builtin + export declare function and(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function or(offset: usize, value: i32, immOffset?: usize): i32; + @builtin + export declare function or(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function xor(offset: usize, value: i32, immOffset?: usize): i32; + @builtin + export declare function xor(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function xchg(offset: usize, value: i32, immOffset?: usize): i32; + @builtin + export declare function xchg(offset: usize, value: i32, immOffset?: usize): i32; + // @ts-ignore: decorator - @builtin export declare function cmpxchg(offset: usize, expected: i32, replacement: i32, immOffset?: usize): i32; + @builtin + export declare function cmpxchg(offset: usize, expected: i32, replacement: i32, immOffset?: usize): i32; } } } // @ts-ignore: decorator -@builtin export declare function i64(value: void): i64; +@builtin +export declare function i64(value: void): i64; + export namespace i64 { + // @ts-ignore: decorator - @lazy export const MIN_VALUE: i64 = -9223372036854775808; + @lazy + export const MIN_VALUE: i64 = -9223372036854775808; + // @ts-ignore: decorator - @lazy export const MAX_VALUE: i64 = 9223372036854775807; + @lazy + export const MAX_VALUE: i64 = 9223372036854775807; + // @ts-ignore: decorator - @builtin export declare function clz(value: i64): i64; + @builtin + export declare function clz(value: i64): i64; + // @ts-ignore: decorator - @builtin export declare function ctz(value: i64): i64; + @builtin + export declare function ctz(value: i64): i64; + // @ts-ignore: decorator - @builtin export declare function load8_s(offset: usize, immOffset?: usize, immAlign?: usize): i64; + @builtin + export declare function load8_s(offset: usize, immOffset?: usize, immAlign?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function load8_u(offset: usize, immOffset?: usize, immAlign?: usize): i64; + @builtin + export declare function load8_u(offset: usize, immOffset?: usize, immAlign?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function load16_s(offset: usize, immOffset?: usize, immAlign?: usize): i64; + @builtin + export declare function load16_s(offset: usize, immOffset?: usize, immAlign?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function load16_u(offset: usize, immOffset?: usize, immAlign?: usize): i64; + @builtin + export declare function load16_u(offset: usize, immOffset?: usize, immAlign?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function load32_s(offset: usize, immOffset?: usize, immAlign?: usize): i64; + @builtin + export declare function load32_s(offset: usize, immOffset?: usize, immAlign?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function load32_u(offset: usize, immOffset?: usize, immAlign?: usize): i64; + @builtin + export declare function load32_u(offset: usize, immOffset?: usize, immAlign?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function load(offset: usize, immOffset?: usize): i64; + @builtin + export declare function load(offset: usize, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function popcnt(value: i64): i64; + @builtin + export declare function popcnt(value: i64): i64; + // @ts-ignore: decorator - @builtin export declare function rotl(value: i64, shift: i64): i64; + @builtin + export declare function rotl(value: i64, shift: i64): i64; + // @ts-ignore: decorator - @builtin export declare function rotr(value: i64, shift: i64): i64; + @builtin + export declare function rotr(value: i64, shift: i64): i64; + // @ts-ignore: decorator - @builtin export declare function reinterpret_f64(value: f64): i64; + @builtin + export declare function reinterpret_f64(value: f64): i64; + // @ts-ignore: decorator - @builtin export declare function store8(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; + @builtin + export declare function store8(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; + // @ts-ignore: decorator - @builtin export declare function store16(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; + @builtin + export declare function store16(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; + // @ts-ignore: decorator - @builtin export declare function store32(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; + @builtin + export declare function store32(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; + // @ts-ignore: decorator - @builtin export declare function store(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; + @builtin + export declare function store(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; export namespace atomic { + // @ts-ignore: decorator - @builtin export declare function load8_u(offset: usize, immOffset?: usize): i64; + @builtin + export declare function load8_u(offset: usize, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function load16_u(offset: usize, immOffset?: usize): i64; + @builtin + export declare function load16_u(offset: usize, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function load32_u(offset: usize, immOffset?: usize): i64; + @builtin + export declare function load32_u(offset: usize, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function load(offset: usize, immOffset?: usize): i64; + @builtin + export declare function load(offset: usize, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function store8(offset: usize, value: i64, immOffset?: usize): void; + @builtin + export declare function store8(offset: usize, value: i64, immOffset?: usize): void; + // @ts-ignore: decorator - @builtin export declare function store16(offset: usize, value: i64, immOffset?: usize): void; + @builtin + export declare function store16(offset: usize, value: i64, immOffset?: usize): void; + // @ts-ignore: decorator - @builtin export declare function store32(offset: usize, value: i64, immOffset?: usize): void; + @builtin + export declare function store32(offset: usize, value: i64, immOffset?: usize): void; + // @ts-ignore: decorator - @builtin export declare function store(offset: usize, value: i64, immOffset?: usize): void; + @builtin + export declare function store(offset: usize, value: i64, immOffset?: usize): void; + // @ts-ignore: decorator - @builtin export declare function wait(ptr: usize, expected: i64, timeout: i64): AtomicWaitResult; + @builtin + export declare function wait(ptr: usize, expected: i64, timeout: i64): AtomicWaitResult; + // @ts-ignore: decorator - @builtin export declare function notify(ptr: usize, count: i32): i32; + @builtin + export declare function notify(ptr: usize, count: i32): i32; export namespace rmw8 { + // @ts-ignore: decorator - @builtin export declare function add_u(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function add_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function sub_u(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function sub_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function and_u(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function and_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function or_u(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function or_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function xor_u(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function xor_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function xchg_u(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function xchg_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function cmpxchg_u(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; + @builtin + export declare function cmpxchg_u(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; } + export namespace rmw16 { + // @ts-ignore: decorator - @builtin export declare function add_u(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function add_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function sub_u(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function sub_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function and_u(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function and_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function or_u(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function or_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function xor_u(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function xor_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function xchg_u(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function xchg_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function cmpxchg_u(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; + @builtin + export declare function cmpxchg_u(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; } + export namespace rmw32 { + // @ts-ignore: decorator - @builtin export declare function add_u(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function add_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function sub_u(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function sub_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function and_u(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function and_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function or_u(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function or_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function xor_u(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function xor_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function xchg_u(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function xchg_u(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function cmpxchg_u(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; + @builtin + export declare function cmpxchg_u(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; } + export namespace rmw { + // @ts-ignore: decorator - @builtin export declare function add(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function add(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function sub(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function sub(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function and(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function and(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function or(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function or(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function xor(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function xor(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function xchg(offset: usize, value: i64, immOffset?: usize): i64; + @builtin + export declare function xchg(offset: usize, value: i64, immOffset?: usize): i64; + // @ts-ignore: decorator - @builtin export declare function cmpxchg(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; + @builtin + export declare function cmpxchg(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; } } } // @ts-ignore: decorator -@builtin export declare function isize(value: void): isize; +@builtin +export declare function isize(value: void): isize; + export namespace isize { + // @ts-ignore: decorator - @lazy export const MIN_VALUE: isize = sizeof() == sizeof() + @lazy + export const MIN_VALUE: isize = sizeof() == sizeof() ? -2147483648 : -9223372036854775808; + // @ts-ignore: decorator - @lazy export const MAX_VALUE: isize = sizeof() == sizeof() + @lazy + export const MAX_VALUE: isize = sizeof() == sizeof() ? 2147483647 : 9223372036854775807; } // @ts-ignore: decorator -@builtin export declare function u8(value: void): u8; +@builtin +export declare function u8(value: void): u8; + export namespace u8 { + // @ts-ignore: decorator - @lazy export const MIN_VALUE: u8 = 0; + @lazy + export const MIN_VALUE: u8 = 0; + // @ts-ignore: decorator - @lazy export const MAX_VALUE: u8 = 255; + @lazy + export const MAX_VALUE: u8 = 255; } // @ts-ignore: decorator -@builtin export declare function u16(value: void): u16; +@builtin +export declare function u16(value: void): u16; + export namespace u16 { + // @ts-ignore: decorator - @lazy export const MIN_VALUE: u16 = 0; + @lazy + export const MIN_VALUE: u16 = 0; + // @ts-ignore: decorator - @lazy export const MAX_VALUE: u16 = 65535; + @lazy + export const MAX_VALUE: u16 = 65535; } // @ts-ignore: decorator -@builtin export declare function u32(value: void): u32; +@builtin +export declare function u32(value: void): u32; + export namespace u32 { + // @ts-ignore: decorator - @lazy export const MIN_VALUE: u32 = 0; + @lazy + export const MIN_VALUE: u32 = 0; + // @ts-ignore: decorator - @lazy export const MAX_VALUE: u32 = 4294967295; + @lazy + export const MAX_VALUE: u32 = 4294967295; } // @ts-ignore: decorator -@builtin export declare function u64(value: void): u64; +@builtin +export declare function u64(value: void): u64; + export namespace u64 { + // @ts-ignore: decorator - @lazy export const MIN_VALUE: u64 = 0; + @lazy + export const MIN_VALUE: u64 = 0; + // @ts-ignore: decorator - @lazy export const MAX_VALUE: u64 = 18446744073709551615; + @lazy + export const MAX_VALUE: u64 = 18446744073709551615; } // @ts-ignore: decorator -@builtin export declare function usize(value: void): usize; +@builtin +export declare function usize(value: void): usize; + export namespace usize { + // @ts-ignore: decorator - @lazy export const MIN_VALUE: usize = 0; + @lazy + export const MIN_VALUE: usize = 0; + // @ts-ignore: decorator - @lazy export const MAX_VALUE: usize = sizeof() == sizeof() + @lazy + export const MAX_VALUE: usize = sizeof() == sizeof() ? 4294967295 : 18446744073709551615; } // @ts-ignore: decorator -@builtin export declare function bool(value: void): bool; +@builtin +export declare function bool(value: void): bool; + export namespace bool { + // @ts-ignore: decorator - @lazy export const MIN_VALUE: bool = false; + @lazy + export const MIN_VALUE: bool = false; + // @ts-ignore: decorator - @lazy export const MAX_VALUE: bool = true; + @lazy + export const MAX_VALUE: bool = true; } // @ts-ignore: decorator -@builtin export declare function f32(value: void): f32; +@builtin +export declare function f32(value: void): f32; + export namespace f32 { + // @ts-ignore: decorator - @lazy export const EPSILON = reinterpret(0x34000000); // 0x1p-23f + @lazy + export const EPSILON = reinterpret(0x34000000); // 0x1p-23f + // @ts-ignore: decorator - @lazy export const MIN_VALUE = reinterpret(0x00000001); // 0x0.000001p+0f + @lazy + export const MIN_VALUE = reinterpret(0x00000001); // 0x0.000001p+0f + // @ts-ignore: decorator - @lazy export const MAX_VALUE = reinterpret(0x7F7FFFFF); // 0x1.fffffep+127f + @lazy + export const MAX_VALUE = reinterpret(0x7F7FFFFF); // 0x1.fffffep+127f + // @ts-ignore: decorator - @lazy export const MIN_NORMAL_VALUE = reinterpret(0x00800000); // 0x1p-126f + @lazy + export const MIN_NORMAL_VALUE = reinterpret(0x00800000); // 0x1p-126f + // @ts-ignore: decorator - @lazy export const MIN_SAFE_INTEGER: f32 = -16777215; + @lazy + export const MIN_SAFE_INTEGER: f32 = -16777215; + // @ts-ignore: decorator - @lazy export const MAX_SAFE_INTEGER: f32 = 16777215; + @lazy + export const MAX_SAFE_INTEGER: f32 = 16777215; + // @ts-ignore: decorator - @builtin export declare function abs(value: f32): f32; + @builtin + export declare function abs(value: f32): f32; + // @ts-ignore: decorator - @builtin export declare function ceil(value: f32): f32; + @builtin + export declare function ceil(value: f32): f32; + // @ts-ignore: decorator - @builtin export declare function copysign(x: f32, y: f32): f32; + @builtin + export declare function copysign(x: f32, y: f32): f32; + // @ts-ignore: decorator - @builtin export declare function floor(value: f32): f32; + @builtin + export declare function floor(value: f32): f32; + // @ts-ignore: decorator - @builtin export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): f32; + @builtin + export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): f32; + // @ts-ignore: decorator - @builtin export declare function max(left: f32, right: f32): f32; + @builtin + export declare function max(left: f32, right: f32): f32; + // @ts-ignore: decorator - @builtin export declare function min(left: f32, right: f32): f32; + @builtin + export declare function min(left: f32, right: f32): f32; + // @ts-ignore: decorator - @builtin export declare function nearest(value: f32): f32; + @builtin + export declare function nearest(value: f32): f32; + // @ts-ignore: decorator - @builtin export declare function reinterpret_i32(value: i32): f32; + @builtin + export declare function reinterpret_i32(value: i32): f32; + // @ts-ignore: decorator - @builtin export declare function sqrt(value: f32): f32; + @builtin + export declare function sqrt(value: f32): f32; + // @ts-ignore: decorator - @builtin export declare function store(offset: usize, value: f32, immOffset?: usize, immAlign?: usize): void; + @builtin + export declare function store(offset: usize, value: f32, immOffset?: usize, immAlign?: usize): void; + // @ts-ignore: decorator - @builtin export declare function trunc(value: f32): f32; + @builtin + export declare function trunc(value: f32): f32; } // @ts-ignore: decorator -@builtin export declare function f64(value: void): f64; +@builtin +export declare function f64(value: void): f64; + export namespace f64 { + // @ts-ignore: decorator - @lazy export const EPSILON = reinterpret(0x3CB0000000000000); // 0x1p-52 + @lazy + export const EPSILON = reinterpret(0x3CB0000000000000); // 0x1p-52 + // @ts-ignore: decorator - @lazy export const MIN_VALUE = reinterpret(0x0000000000000001); // 0x0.0000000000001p+0 + @lazy + export const MIN_VALUE = reinterpret(0x0000000000000001); // 0x0.0000000000001p+0 + // @ts-ignore: decorator - @lazy export const MAX_VALUE = reinterpret(0x7FEFFFFFFFFFFFFF); // 0x1.fffffffffffffp+1023 + @lazy + export const MAX_VALUE = reinterpret(0x7FEFFFFFFFFFFFFF); // 0x1.fffffffffffffp+1023 + // @ts-ignore: decorator - @lazy export const MIN_NORMAL_VALUE = reinterpret(0x0010000000000000); // 0x1p-1022 + @lazy + export const MIN_NORMAL_VALUE = reinterpret(0x0010000000000000); // 0x1p-1022 + // @ts-ignore: decorator - @lazy export const MIN_SAFE_INTEGER: f64 = -9007199254740991; + @lazy + export const MIN_SAFE_INTEGER: f64 = -9007199254740991; + // @ts-ignore: decorator - @lazy export const MAX_SAFE_INTEGER: f64 = 9007199254740991; + @lazy + export const MAX_SAFE_INTEGER: f64 = 9007199254740991; + // @ts-ignore: decorator - @builtin export declare function abs(value: f64): f64; + @builtin + export declare function abs(value: f64): f64; + // @ts-ignore: decorator - @builtin export declare function ceil(value: f64): f64; + @builtin + export declare function ceil(value: f64): f64; + // @ts-ignore: decorator - @builtin export declare function copysign(x: f64, y: f64): f64; + @builtin + export declare function copysign(x: f64, y: f64): f64; + // @ts-ignore: decorator - @builtin export declare function floor(value: f64): f64; + @builtin + export declare function floor(value: f64): f64; + // @ts-ignore: decorator - @builtin export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): f64; + @builtin + export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): f64; + // @ts-ignore: decorator - @builtin export declare function max(left: f64, right: f64): f64; + @builtin + export declare function max(left: f64, right: f64): f64; + // @ts-ignore: decorator - @builtin export declare function min(left: f64, right: f64): f64; + @builtin + export declare function min(left: f64, right: f64): f64; + // @ts-ignore: decorator - @builtin export declare function nearest(value: f64): f64; + @builtin + export declare function nearest(value: f64): f64; + // @ts-ignore: decorator - @builtin export declare function reinterpret_i64(value: i64): f64; + @builtin + export declare function reinterpret_i64(value: i64): f64; + // @ts-ignore: decorator - @builtin export declare function sqrt(value: f64): f64; + @builtin + export declare function sqrt(value: f64): f64; + // @ts-ignore: decorator - @builtin export declare function store(offset: usize, value: f64, immOffset?: usize, immAlign?: usize): void; + @builtin + export declare function store(offset: usize, value: f64, immOffset?: usize, immAlign?: usize): void; + // @ts-ignore: decorator - @builtin export declare function trunc(value: f64): f64; + @builtin + export declare function trunc(value: f64): f64; } // @ts-ignore: decorator -@builtin export declare function v128(a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8): v128; +@builtin +export declare function v128( + a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, + i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8 +): v128; + export namespace v128 { + // @ts-ignore: decorator - @builtin export declare function splat(x: T): v128; + @builtin + export declare function splat(x: T): v128; + // @ts-ignore: decorator - @builtin export declare function extract_lane(x: v128, idx: u8): T; + @builtin + export declare function extract_lane(x: v128, idx: u8): T; + // @ts-ignore: decorator - @builtin export declare function replace_lane(x: v128, idx: u8, value: T): v128; + @builtin + export declare function replace_lane(x: v128, idx: u8, value: T): v128; + // @ts-ignore: decorator - @builtin export declare function shuffle(a: v128, b: v128, ...lanes: u8[]): v128; + @builtin + export declare function shuffle(a: v128, b: v128, ...lanes: u8[]): v128; + // @ts-ignore: decorator - @builtin export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): v128; + @builtin + export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): v128; + // @ts-ignore: decorator - @builtin export declare function store(offset: usize, value: v128, immOffset?: usize, immAlign?: usize): void; + @builtin + export declare function store(offset: usize, value: v128, immOffset?: usize, immAlign?: usize): void; + // @ts-ignore: decorator - @builtin export declare function add(a: v128, b: v128): v128; + @builtin + export declare function add(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function sub(a: v128, b: v128): v128; + @builtin + export declare function sub(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function mul(a: v128, b: v128): v128; // except i64 + @builtin + export declare function mul(a: v128, b: v128): v128; // except i64 + // @ts-ignore: decorator - @builtin export declare function div(a: v128, b: v128): v128; // f32, f64 only + @builtin + export declare function div(a: v128, b: v128): v128; // f32, f64 only + // @ts-ignore: decorator - @builtin export declare function neg(a: v128): v128; + @builtin + export declare function neg(a: v128): v128; + // @ts-ignore: decorator - @builtin export declare function add_saturate(a: v128, b: v128): v128; + @builtin + export declare function add_saturate(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function sub_saturate(a: v128, b: v128): v128; + @builtin + export declare function sub_saturate(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function shl(a: v128, b: i32): v128; + @builtin + export declare function shl(a: v128, b: i32): v128; + // @ts-ignore: decorator - @builtin export declare function shr(a: v128, b: i32): v128; + @builtin + export declare function shr(a: v128, b: i32): v128; + // @ts-ignore: decorator - @builtin export declare function and(a: v128, b: v128): v128; + @builtin + export declare function and(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function or(a: v128, b: v128): v128; + @builtin + export declare function or(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function xor(a: v128, b: v128): v128; + @builtin + export declare function xor(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function not(a: v128): v128; + @builtin + export declare function not(a: v128): v128; + // @ts-ignore: decorator - @builtin export declare function bitselect(v1: v128, v2: v128, c: v128): v128; + @builtin + export declare function bitselect(v1: v128, v2: v128, c: v128): v128; + // @ts-ignore: decorator - @builtin export declare function any_true(a: v128): bool; + @builtin + export declare function any_true(a: v128): bool; + // @ts-ignore: decorator - @builtin export declare function all_true(a: v128): bool; + @builtin + export declare function all_true(a: v128): bool; + // @ts-ignore: decorator - @builtin export declare function min(a: v128, b: v128): v128; // f32, f64 only + @builtin + export declare function min(a: v128, b: v128): v128; // f32, f64 only + // @ts-ignore: decorator - @builtin export declare function max(a: v128, b: v128): v128; // f32, f64 only + @builtin + export declare function max(a: v128, b: v128): v128; // f32, f64 only + // @ts-ignore: decorator - @builtin export declare function abs(a: v128): v128; // f32, f64 only + @builtin + export declare function abs(a: v128): v128; // f32, f64 only + // @ts-ignore: decorator - @builtin export declare function sqrt(a: v128): v128; // f32, f64 only + @builtin + export declare function sqrt(a: v128): v128; // f32, f64 only + // @ts-ignore: decorator - @builtin export declare function eq(a: v128, b: v128): v128; + @builtin + export declare function eq(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function ne(a: v128, b: v128): v128; + @builtin + export declare function ne(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function lt(a: v128, b: v128): v128; + @builtin + export declare function lt(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function le(a: v128, b: v128): v128; + @builtin + export declare function le(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function gt(a: v128, b: v128): v128; + @builtin + export declare function gt(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function ge(a: v128, b: v128): v128; + @builtin + export declare function ge(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function convert(a: v128): v128; + @builtin + export declare function convert(a: v128): v128; + // @ts-ignore: decorator - @builtin export declare function trunc(a: v128): v128; + @builtin + export declare function trunc(a: v128): v128; } // @ts-ignore: decorator -@builtin export declare function i8x16(a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8): v128; +@builtin +export declare function i8x16( + a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, + i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8 +): v128; + export namespace i8x16 { + // @ts-ignore: decorator - @builtin export declare function splat(x: i8): v128; + @builtin + export declare function splat(x: i8): v128; + // @ts-ignore: decorator - @builtin export declare function extract_lane_s(x: v128, idx: u8): i8; + @builtin + export declare function extract_lane_s(x: v128, idx: u8): i8; + // @ts-ignore: decorator - @builtin export declare function extract_lane_u(x: v128, idx: u8): u8; + @builtin + export declare function extract_lane_u(x: v128, idx: u8): u8; + // @ts-ignore: decorator - @builtin export declare function replace_lane(x: v128, idx: u8, value: i8): v128; + @builtin + export declare function replace_lane(x: v128, idx: u8, value: i8): v128; + // @ts-ignore: decorator - @builtin export declare function add(a: v128, b: v128): v128; + @builtin + export declare function add(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function sub(a: v128, b: v128): v128; + @builtin + export declare function sub(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function mul(a: v128, b: v128): v128; + @builtin + export declare function mul(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function neg(a: v128): v128; + @builtin + export declare function neg(a: v128): v128; + // @ts-ignore: decorator - @builtin export declare function add_saturate_s(a: v128, b: v128): v128; + @builtin + export declare function add_saturate_s(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function add_saturate_u(a: v128, b: v128): v128; + @builtin + export declare function add_saturate_u(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function sub_saturate_s(a: v128, b: v128): v128; + @builtin + export declare function sub_saturate_s(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function sub_saturate_u(a: v128, b: v128): v128; + @builtin + export declare function sub_saturate_u(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function shl(a: v128, b: i32): v128; + @builtin + export declare function shl(a: v128, b: i32): v128; + // @ts-ignore: decorator - @builtin export declare function shr_s(a: v128, b: i32): v128; + @builtin + export declare function shr_s(a: v128, b: i32): v128; + // @ts-ignore: decorator - @builtin export declare function shr_u(a: v128, b: i32): v128; + @builtin + export declare function shr_u(a: v128, b: i32): v128; + // @ts-ignore: decorator - @builtin export declare function any_true(a: v128): bool; + @builtin + export declare function any_true(a: v128): bool; + // @ts-ignore: decorator - @builtin export declare function all_true(a: v128): bool; + @builtin + export declare function all_true(a: v128): bool; + // @ts-ignore: decorator - @builtin export declare function eq(a: v128, b: v128): v128; + @builtin + export declare function eq(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function ne(a: v128, b: v128): v128; + @builtin + export declare function ne(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function lt_s(a: v128, b: v128): v128; + @builtin + export declare function lt_s(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function lt_u(a: v128, b: v128): v128; + @builtin + export declare function lt_u(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function le_s(a: v128, b: v128): v128; + @builtin + export declare function le_s(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function le_u(a: v128, b: v128): v128; + @builtin + export declare function le_u(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function gt_s(a: v128, b: v128): v128; + @builtin + export declare function gt_s(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function gt_u(a: v128, b: v128): v128; + @builtin + export declare function gt_u(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function ge_s(a: v128, b: v128): v128; + @builtin + export declare function ge_s(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function ge_u(a: v128, b: v128): v128; + @builtin + export declare function ge_u(a: v128, b: v128): v128; } // @ts-ignore: decorator -@builtin export declare function i16x8(a: i16, b: i16, c: i16, d: i16, e: i16, f: i16, g: i16, h: i16): v128; +@builtin +export declare function i16x8(a: i16, b: i16, c: i16, d: i16, e: i16, f: i16, g: i16, h: i16): v128; + export namespace i16x8 { + // @ts-ignore: decorator - @builtin export declare function splat(x: i16): v128; + @builtin + export declare function splat(x: i16): v128; + // @ts-ignore: decorator - @builtin export declare function extract_lane_s(x: v128, idx: u8): i16; + @builtin + export declare function extract_lane_s(x: v128, idx: u8): i16; + // @ts-ignore: decorator - @builtin export declare function extract_lane_u(x: v128, idx: u8): u16; + @builtin + export declare function extract_lane_u(x: v128, idx: u8): u16; + // @ts-ignore: decorator - @builtin export declare function replace_lane(x: v128, idx: u8, value: i16): v128; + @builtin + export declare function replace_lane(x: v128, idx: u8, value: i16): v128; + // @ts-ignore: decorator - @builtin export declare function add(a: v128, b: v128): v128; + @builtin + export declare function add(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function sub(a: v128, b: v128): v128; + @builtin + export declare function sub(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function mul(a: v128, b: v128): v128; + @builtin + export declare function mul(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function neg(a: v128): v128; + @builtin + export declare function neg(a: v128): v128; + // @ts-ignore: decorator - @builtin export declare function add_saturate_s(a: v128, b: v128): v128; + @builtin + export declare function add_saturate_s(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function add_saturate_u(a: v128, b: v128): v128; + @builtin + export declare function add_saturate_u(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function sub_saturate_s(a: v128, b: v128): v128; + @builtin + export declare function sub_saturate_s(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function sub_saturate_u(a: v128, b: v128): v128; + @builtin + export declare function sub_saturate_u(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function shl(a: v128, b: i32): v128; + @builtin + export declare function shl(a: v128, b: i32): v128; + // @ts-ignore: decorator - @builtin export declare function shr_s(a: v128, b: i32): v128; + @builtin + export declare function shr_s(a: v128, b: i32): v128; + // @ts-ignore: decorator - @builtin export declare function shr_u(a: v128, b: i32): v128; + @builtin + export declare function shr_u(a: v128, b: i32): v128; + // @ts-ignore: decorator - @builtin export declare function any_true(a: v128): bool; + @builtin + export declare function any_true(a: v128): bool; + // @ts-ignore: decorator - @builtin export declare function all_true(a: v128): bool; + @builtin + export declare function all_true(a: v128): bool; + // @ts-ignore: decorator - @builtin export declare function eq(a: v128, b: v128): v128; + @builtin + export declare function eq(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function ne(a: v128, b: v128): v128; + @builtin + export declare function ne(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function lt_s(a: v128, b: v128): v128; + @builtin + export declare function lt_s(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function lt_u(a: v128, b: v128): v128; + @builtin + export declare function lt_u(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function le_s(a: v128, b: v128): v128; + @builtin + export declare function le_s(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function le_u(a: v128, b: v128): v128; + @builtin + export declare function le_u(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function gt_s(a: v128, b: v128): v128; + @builtin + export declare function gt_s(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function gt_u(a: v128, b: v128): v128; + @builtin + export declare function gt_u(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function ge_s(a: v128, b: v128): v128; + @builtin + export declare function ge_s(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function ge_u(a: v128, b: v128): v128; + @builtin + export declare function ge_u(a: v128, b: v128): v128; } // @ts-ignore: decorator -@builtin export declare function i32x4(a: i32, b: i32, c: i32, d: i32): v128; +@builtin +export declare function i32x4(a: i32, b: i32, c: i32, d: i32): v128; + export namespace i32x4 { + // @ts-ignore: decorator - @builtin export declare function splat(x: i32): v128; + @builtin + export declare function splat(x: i32): v128; + // @ts-ignore: decorator - @builtin export declare function extract_lane(x: v128, idx: u8): i32; + @builtin + export declare function extract_lane(x: v128, idx: u8): i32; + // @ts-ignore: decorator - @builtin export declare function replace_lane(x: v128, idx: u8, value: i32): v128; + @builtin + export declare function replace_lane(x: v128, idx: u8, value: i32): v128; + // @ts-ignore: decorator - @builtin export declare function add(a: v128, b: v128): v128; + @builtin + export declare function add(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function sub(a: v128, b: v128): v128; + @builtin + export declare function sub(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function mul(a: v128, b: v128): v128; + @builtin + export declare function mul(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function neg(a: v128): v128; + @builtin + export declare function neg(a: v128): v128; + // @ts-ignore: decorator - @builtin export declare function shl(a: v128, b: i32): v128; + @builtin + export declare function shl(a: v128, b: i32): v128; + // @ts-ignore: decorator - @builtin export declare function shr_s(a: v128, b: i32): v128; + @builtin + export declare function shr_s(a: v128, b: i32): v128; + // @ts-ignore: decorator - @builtin export declare function shr_u(a: v128, b: i32): v128; + @builtin + export declare function shr_u(a: v128, b: i32): v128; + // @ts-ignore: decorator - @builtin export declare function any_true(a: v128): bool; + @builtin + export declare function any_true(a: v128): bool; + // @ts-ignore: decorator - @builtin export declare function all_true(a: v128): bool; + @builtin + export declare function all_true(a: v128): bool; + // @ts-ignore: decorator - @builtin export declare function eq(a: v128, b: v128): v128; + @builtin + export declare function eq(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function ne(a: v128, b: v128): v128; + @builtin + export declare function ne(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function lt_s(a: v128, b: v128): v128; + @builtin + export declare function lt_s(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function lt_u(a: v128, b: v128): v128; + @builtin + export declare function lt_u(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function le_s(a: v128, b: v128): v128; + @builtin + export declare function le_s(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function le_u(a: v128, b: v128): v128; + @builtin + export declare function le_u(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function gt_s(a: v128, b: v128): v128; + @builtin + export declare function gt_s(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function gt_u(a: v128, b: v128): v128; + @builtin + export declare function gt_u(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function ge_s(a: v128, b: v128): v128; + @builtin + export declare function ge_s(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function ge_u(a: v128, b: v128): v128; + @builtin + export declare function ge_u(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function trunc_s_f32x4_sat(a: v128): v128; + @builtin + export declare function trunc_s_f32x4_sat(a: v128): v128; + // @ts-ignore: decorator - @builtin export declare function trunc_u_f32x4_sat(a: v128): v128; + @builtin + export declare function trunc_u_f32x4_sat(a: v128): v128; } // @ts-ignore: decorator -@builtin export declare function i64x2(a: i64, b: i64): v128; +@builtin +export declare function i64x2(a: i64, b: i64): v128; + export namespace i64x2 { + // @ts-ignore: decorator - @builtin export declare function splat(x: i64): v128; + @builtin + export declare function splat(x: i64): v128; + // @ts-ignore: decorator - @builtin export declare function extract_lane(x: v128, idx: u8): i64; + @builtin + export declare function extract_lane(x: v128, idx: u8): i64; + // @ts-ignore: decorator - @builtin export declare function replace_lane(x: v128, idx: u8, value: i64): v128; + @builtin + export declare function replace_lane(x: v128, idx: u8, value: i64): v128; + // @ts-ignore: decorator - @builtin export declare function add(a: v128, b: v128): v128; + @builtin + export declare function add(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function sub(a: v128, b: v128): v128; + @builtin + export declare function sub(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function mul(a: v128, b: v128): v128; + @builtin + export declare function mul(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function neg(a: v128): v128; + @builtin + export declare function neg(a: v128): v128; + // @ts-ignore: decorator - @builtin export declare function shl(a: v128, b: i32): v128; + @builtin + export declare function shl(a: v128, b: i32): v128; + // @ts-ignore: decorator - @builtin export declare function shr_s(a: v128, b: i32): v128; + @builtin + export declare function shr_s(a: v128, b: i32): v128; + // @ts-ignore: decorator - @builtin export declare function shr_u(a: v128, b: i32): v128; + @builtin + export declare function shr_u(a: v128, b: i32): v128; + // @ts-ignore: decorator - @builtin export declare function any_true(a: v128): bool; + @builtin + export declare function any_true(a: v128): bool; + // @ts-ignore: decorator - @builtin export declare function all_true(a: v128): bool; + @builtin + export declare function all_true(a: v128): bool; + // @ts-ignore: decorator - @builtin export declare function trunc_s_f64x2_sat(a: v128): v128; + @builtin + export declare function trunc_s_f64x2_sat(a: v128): v128; + // @ts-ignore: decorator - @builtin export declare function trunc_u_f64x2_sat(a: v128): v128; + @builtin + export declare function trunc_u_f64x2_sat(a: v128): v128; } // @ts-ignore: decorator -@builtin export declare function f32x4(a: f32, b: f32, c: f32, d: f32): v128; +@builtin +export declare function f32x4(a: f32, b: f32, c: f32, d: f32): v128; + export namespace f32x4 { + // @ts-ignore: decorator - @builtin export declare function splat(x: f32): v128; + @builtin + export declare function splat(x: f32): v128; + // @ts-ignore: decorator - @builtin export declare function extract_lane(x: v128, idx: u8): f32; + @builtin + export declare function extract_lane(x: v128, idx: u8): f32; + // @ts-ignore: decorator - @builtin export declare function replace_lane(x: v128, idx: u8, value: f32): v128; + @builtin + export declare function replace_lane(x: v128, idx: u8, value: f32): v128; + // @ts-ignore: decorator - @builtin export declare function add(a: v128, b: v128): v128; + @builtin + export declare function add(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function sub(a: v128, b: v128): v128; + @builtin + export declare function sub(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function mul(a: v128, b: v128): v128; + @builtin + export declare function mul(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function div(a: v128, b: v128): v128; + @builtin + export declare function div(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function neg(a: v128): v128; + @builtin + export declare function neg(a: v128): v128; + // @ts-ignore: decorator - @builtin export declare function min(a: v128, b: v128): v128; + @builtin + export declare function min(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function max(a: v128, b: v128): v128; + @builtin + export declare function max(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function abs(a: v128): v128; + @builtin + export declare function abs(a: v128): v128; + // @ts-ignore: decorator - @builtin export declare function sqrt(a: v128): v128; + @builtin + export declare function sqrt(a: v128): v128; + // @ts-ignore: decorator - @builtin export declare function eq(a: v128, b: v128): v128; + @builtin + export declare function eq(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function ne(a: v128, b: v128): v128; + @builtin + export declare function ne(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function lt(a: v128, b: v128): v128; + @builtin + export declare function lt(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function le(a: v128, b: v128): v128; + @builtin + export declare function le(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function gt(a: v128, b: v128): v128; + @builtin + export declare function gt(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function ge(a: v128, b: v128): v128; + @builtin + export declare function ge(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function convert_s_i32x4(a: v128): v128; + @builtin + export declare function convert_s_i32x4(a: v128): v128; + // @ts-ignore: decorator - @builtin export declare function convert_u_i32x4(a: v128): v128; + @builtin + export declare function convert_u_i32x4(a: v128): v128; } // @ts-ignore: decorator -@builtin export declare function f64x2(a: f64, b: f64): v128; +@builtin +export declare function f64x2(a: f64, b: f64): v128; + export namespace f64x2 { + // @ts-ignore: decorator - @builtin export declare function splat(x: f64): v128; + @builtin + export declare function splat(x: f64): v128; + // @ts-ignore: decorator - @builtin export declare function extract_lane(x: v128, idx: u8): f64; + @builtin + export declare function extract_lane(x: v128, idx: u8): f64; + // @ts-ignore: decorator - @builtin export declare function replace_lane(x: v128, idx: u8, value: f64): v128; + @builtin + export declare function replace_lane(x: v128, idx: u8, value: f64): v128; + // @ts-ignore: decorator - @builtin export declare function add(a: v128, b: v128): v128; + @builtin + export declare function add(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function sub(a: v128, b: v128): v128; + @builtin + export declare function sub(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function mul(a: v128, b: v128): v128; + @builtin + export declare function mul(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function div(a: v128, b: v128): v128; + @builtin + export declare function div(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function neg(a: v128): v128; + @builtin + export declare function neg(a: v128): v128; + // @ts-ignore: decorator - @builtin export declare function min(a: v128, b: v128): v128; + @builtin + export declare function min(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function max(a: v128, b: v128): v128; + @builtin + export declare function max(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function abs(a: v128): v128; + @builtin + export declare function abs(a: v128): v128; + // @ts-ignore: decorator - @builtin export declare function sqrt(a: v128): v128; + @builtin + export declare function sqrt(a: v128): v128; + // @ts-ignore: decorator - @builtin export declare function eq(a: v128, b: v128): v128; + @builtin + export declare function eq(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function ne(a: v128, b: v128): v128; + @builtin + export declare function ne(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function lt(a: v128, b: v128): v128; + @builtin + export declare function lt(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function le(a: v128, b: v128): v128; + @builtin + export declare function le(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function gt(a: v128, b: v128): v128; + @builtin + export declare function gt(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function ge(a: v128, b: v128): v128; + @builtin + export declare function ge(a: v128, b: v128): v128; + // @ts-ignore: decorator - @builtin export declare function convert_s_i64x2(a: v128): v128; + @builtin + export declare function convert_s_i64x2(a: v128): v128; + // @ts-ignore: decorator - @builtin export declare function convert_u_i64x2(a: v128): v128; + @builtin + export declare function convert_u_i64x2(a: v128): v128; } export namespace v8x16 { + // @ts-ignore: decorator - @builtin export declare function shuffle(a: v128, b: v128, l0: u8, l1: u8, l2: u8, l3: u8, l4: u8, l5: u8, l6: u8, l7: u8, l8: u8, l9: u8, l10: u8, l11: u8, l12: u8, l13: u8, l14: u8, l15: u8): v128; + @builtin + export declare function shuffle( + a: v128, b: v128, + l0: u8, l1: u8, l2: u8, l3: u8, l4: u8, l5: u8, l6: u8, l7: u8, + l8: u8, l9: u8, l10: u8, l11: u8, l12: u8, l13: u8, l14: u8, l15: u8 + ): v128; } diff --git a/std/assembly/collector/itcm.ts b/std/assembly/collector/itcm.ts index e63b7fdb68..17d7a29225 100644 --- a/std/assembly/collector/itcm.ts +++ b/std/assembly/collector/itcm.ts @@ -1,11 +1,13 @@ // Largely based on Bach Le's μgc, see: https://github.com/bullno1/ugc // @ts-ignore: decorator -@inline const TRACE = false; +@inline +const TRACE = false; /** Size of a managed object header. */ // @ts-ignore: decorator -@inline export const HEADER_SIZE: usize = (offsetof() + AL_MASK) & ~AL_MASK; +@inline +export const HEADER_SIZE: usize = (offsetof() + AL_MASK) & ~AL_MASK; import { AL_MASK, MAX_SIZE_32 } from "../util/allocator"; import { gc } from "../gc"; @@ -148,8 +150,7 @@ function step(): void { if (obj !== toSpace) { if (TRACE) trace("gc~step/MARK iterate", 1, objToRef(obj)); iter = obj; - // @ts-ignore: cast - obj.color = !white; + obj.color = i32(!white); // if (TRACE) { // trace(" next/prev/hook", 3, // changetype(obj.next), @@ -166,8 +167,7 @@ function step(): void { let from = fromSpace; fromSpace = toSpace; toSpace = from; - // @ts-ignore: cast - white = !white; + white = i32(!white); iter = from.next; state = State.SWEEP; if (TRACE) trace("gc~state = SWEEP"); @@ -193,17 +193,20 @@ function step(): void { } // @ts-ignore: decorator -@inline function refToObj(ref: usize): ManagedObject { +@inline +function refToObj(ref: usize): ManagedObject { return changetype(ref - HEADER_SIZE); } // @ts-ignore: decorator -@inline function objToRef(obj: ManagedObject): usize { +@inline +function objToRef(obj: ManagedObject): usize { return changetype(obj) + HEADER_SIZE; } // @ts-ignore: decorator -@global @unsafe export function __gc_allocate( // TODO: make this register only / reuse header +@global @unsafe +export function __gc_allocate( // TODO: make this register only / reuse header size: usize, markFn: (ref: usize) => void ): usize { @@ -218,15 +221,16 @@ function step(): void { } // @ts-ignore: decorator -@global @unsafe export function __gc_link(parentRef: usize, childRef: usize): void { +@global @unsafe +export function __gc_link(parentRef: usize, childRef: usize): void { if (TRACE) trace("gc.link", 2, parentRef, childRef); var parent = refToObj(parentRef); - // @ts-ignore: cast - if (parent.color == !white && refToObj(childRef).color == white) parent.makeGray(); + if (parent.color == i32(!white) && refToObj(childRef).color == white) parent.makeGray(); } // @ts-ignore: decorator -@global @unsafe export function __gc_mark(ref: usize): void { +@global @unsafe +export function __gc_mark(ref: usize): void { if (TRACE) trace("gc.mark", 1, ref); if (ref) { let obj = refToObj(ref); @@ -235,7 +239,8 @@ function step(): void { } // @ts-ignore: decorator -@global @unsafe export function __gc_collect(): void { +@global @unsafe +export function __gc_collect(): void { if (TRACE) trace("gc.collect"); // begin collecting if not yet collecting switch (state) { diff --git a/std/assembly/diagnostics.ts b/std/assembly/diagnostics.ts index 5254ac155e..065364db95 100644 --- a/std/assembly/diagnostics.ts +++ b/std/assembly/diagnostics.ts @@ -1,8 +1,11 @@ // @ts-ignore: decorator -@builtin export declare function ERROR(message?: string): void; +@builtin +export declare function ERROR(message?: string): void; // @ts-ignore: decorator -@builtin export declare function WARNING(message?: string): void; +@builtin +export declare function WARNING(message?: string): void; // @ts-ignore: decorator -@builtin export declare function INFO(message?: string): void; +@builtin +export declare function INFO(message?: string): void; diff --git a/std/assembly/gc.ts b/std/assembly/gc.ts index 26ae9df27b..90926a368e 100644 --- a/std/assembly/gc.ts +++ b/std/assembly/gc.ts @@ -2,39 +2,53 @@ export namespace gc { /** Whether the garbage collector interface is implemented. */ - // @ts-ignore: decorator, undefined - @lazy export const implemented: bool = isDefined(__gc_register); + // @ts-ignore: decorator + @lazy + export const implemented: bool = isDefined( + // @ts-ignore: stub + __gc_register + ); /** Gets the computed unique class id of a class type. */ - @unsafe @builtin export declare function classId(): u32; + // @ts-ignore: decorator + @unsafe @builtin + export declare function classId(): u32; /** Iterates reference root objects. */ - @unsafe @builtin export declare function iterateRoots(fn: (ref: usize) => void): void; + // @ts-ignore: decorator + @unsafe @builtin + export declare function iterateRoots(fn: (ref: usize) => void): void; /** Registers a managed object to be tracked by the garbage collector. */ - @unsafe export function register(ref: usize): void { - // @ts-ignore: undefined + // @ts-ignore: decorator + @unsafe + export function register(ref: usize): void { + // @ts-ignore: stub if (isDefined(__gc_register)) __gc_register(ref); else ERROR("missing implementation: gc.register"); } /** Links a registered object with the registered object now referencing it. */ - @unsafe export function link(ref: usize, parentRef: usize): void { - // @ts-ignore: undefined + // @ts-ignore: decorator + @unsafe + export function link(ref: usize, parentRef: usize): void { + // @ts-ignore: stub if (isDefined(__gc_link)) __gc_link(ref, parentRef); else ERROR("missing implementation: gc.link"); } /** Marks an object as being reachable. */ - @unsafe export function mark(ref: usize): void { - // @ts-ignore: undefined + // @ts-ignore: decorator + @unsafe + export function mark(ref: usize): void { + // @ts-ignore: stub if (isDefined(__gc_mark)) __gc_mark(ref); else ERROR("missing implementation: gc.mark"); } /** Performs a full garbage collection cycle. */ export function collect(): void { - // @ts-ignore: undefined + // @ts-ignore: stub if (isDefined(__gc_collect)) __gc_collect(); else WARNING("missing implementation: gc.collect"); } diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index bafda5386c..2544d66a43 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -128,6 +128,8 @@ declare function isFinite(value: T): bool; declare function isInteger(value?: any): value is number; /** Tests if the specified type *or* expression is of a float type. Compiles to a constant. */ declare function isFloat(value?: any): value is number; +/** Tests if the specified type *or* expression is of a boolean type. */ +declare function isBoolean(value?: any): value is number; /** Tests if the specified type *or* expression can represent negative numbers. Compiles to a constant. */ declare function isSigned(value?: any): value is number; /** Tests if the specified type *or* expression is of a reference type. Compiles to a constant. */ @@ -200,7 +202,7 @@ declare enum AtomicWaitResult { } /** Converts any other numeric value to an 8-bit signed integer. */ -declare function i8(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): i8; +declare function i8(value: any): i8; declare namespace i8 { /** Smallest representable value. */ export const MIN_VALUE: i8; @@ -208,7 +210,7 @@ declare namespace i8 { export const MAX_VALUE: i8; } /** Converts any other numeric value to a 16-bit signed integer. */ -declare function i16(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): i8; +declare function i16(value: any): i8; declare namespace i16 { /** Smallest representable value. */ export const MIN_VALUE: i16; @@ -216,7 +218,7 @@ declare namespace i16 { export const MAX_VALUE: i16; } /** Converts any other numeric value to a 32-bit signed integer. */ -declare function i32(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): i32; +declare function i32(value: any): i32; declare namespace i32 { /** Smallest representable value. */ export const MIN_VALUE: i32; @@ -310,7 +312,7 @@ declare namespace i32 { } } /** Converts any other numeric value to a 64-bit signed integer. */ -declare function i64(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): i64; +declare function i64(value: any): i64; declare namespace i64 { /** Smallest representable value. */ export const MIN_VALUE: i64; @@ -433,7 +435,7 @@ declare namespace i64 { /** Converts any other numeric value to a 32-bit (in WASM32) respectivel 64-bit (in WASM64) signed integer. */ declare var isize: typeof i32 | typeof i64; /** Converts any other numeric value to an 8-bit unsigned integer. */ -declare function u8(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): i8; +declare function u8(value: any): i8; declare namespace u8 { /** Smallest representable value. */ export const MIN_VALUE: u8; @@ -441,7 +443,7 @@ declare namespace u8 { export const MAX_VALUE: u8; } /** Converts any other numeric value to a 16-bit unsigned integer. */ -declare function u16(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): i8; +declare function u16(value: any): i8; declare namespace u16 { /** Smallest representable value. */ export const MIN_VALUE: u16; @@ -449,7 +451,7 @@ declare namespace u16 { export const MAX_VALUE: u16; } /** Converts any other numeric value to a 32-bit unsigned integer. */ -declare function u32(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): i32; +declare function u32(value: any): i32; declare namespace u32 { /** Smallest representable value. */ export const MIN_VALUE: u32; @@ -457,7 +459,7 @@ declare namespace u32 { export const MAX_VALUE: u32; } /** Converts any other numeric value to a 64-bit unsigned integer. */ -declare function u64(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): i64; +declare function u64(value: any): i64; declare namespace u64 { /** Smallest representable value. */ export const MIN_VALUE: u64; @@ -467,7 +469,7 @@ declare namespace u64 { /** Converts any other numeric value to a 32-bit (in WASM32) respectivel 64-bit (in WASM64) unsigned integer. */ declare var usize: typeof u32 | typeof u64; /** Converts any other numeric value to a 1-bit unsigned integer. */ -declare function bool(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): bool; +declare function bool(value: any): bool; declare namespace bool { /** Smallest representable value. */ export const MIN_VALUE: bool; @@ -475,7 +477,7 @@ declare namespace bool { export const MAX_VALUE: bool; } /** Converts any other numeric value to a 32-bit float. */ -declare function f32(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): f32; +declare function f32(value: any): f32; declare namespace f32 { /** Smallest representable value. */ export const MIN_VALUE: f32; @@ -495,7 +497,7 @@ declare namespace f32 { export function store(offset: usize, value: f32, immOffset?: usize, immAlign?: usize): void; } /** Converts any other numeric value to a 64-bit float. */ -declare function f64(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): f64; +declare function f64(value: any): f64; declare namespace f64 { /** Smallest representable value. */ export const MIN_VALUE: f64; diff --git a/std/assembly/map.ts b/std/assembly/map.ts index 2a8a192502..7f4e8c44ad 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -4,13 +4,16 @@ import { HASH } from "./util/hash"; // A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht // @ts-ignore: decorator -@inline const INITIAL_CAPACITY = 4; +@inline +const INITIAL_CAPACITY = 4; // @ts-ignore: decorator -@inline const FILL_FACTOR: f64 = 8 / 3; +@inline const +FILL_FACTOR: f64 = 8 / 3; // @ts-ignore: decorator -@inline const FREE_FACTOR: f64 = 3 / 4; +@inline const +FREE_FACTOR: f64 = 3 / 4; /** Structure of a map entry. */ @unmanaged class MapEntry { @@ -21,15 +24,18 @@ import { HASH } from "./util/hash"; /** Empty bit. */ // @ts-ignore: decorator -@inline const EMPTY: usize = 1 << 0; +@inline +const EMPTY: usize = 1 << 0; /** Size of a bucket. */ // @ts-ignore: decorator -@inline const BUCKET_SIZE = sizeof(); +@inline +const BUCKET_SIZE = sizeof(); /** Computes the alignment of an entry. */ // @ts-ignore: decorator -@inline function ENTRY_ALIGN(): usize { +@inline +function ENTRY_ALIGN(): usize { // can align to 4 instead of 8 if 32-bit and K/V is <= 32-bits const maxkv = sizeof() > sizeof() ? sizeof() : sizeof(); const align = (maxkv > sizeof() ? maxkv : sizeof()) - 1; @@ -38,7 +44,8 @@ import { HASH } from "./util/hash"; /** Computes the aligned size of an entry. */ // @ts-ignore: decorator -@inline function ENTRY_SIZE(): usize { +@inline +function ENTRY_SIZE(): usize { const align = ENTRY_ALIGN(); const size = (offsetof>() + align) & ~align; return size; diff --git a/std/assembly/math.ts b/std/assembly/math.ts index 22efc2a363..58a39bedcc 100644 --- a/std/assembly/math.ts +++ b/std/assembly/math.ts @@ -43,7 +43,8 @@ function R(z: f64): f64 { // Rational approximation of (asin(x)-x)/x^3 } // @ts-ignore: decorator -@inline function expo2(x: f64): f64 { // exp(x)/2 for x >= log(DBL_MAX) +@inline +function expo2(x: f64): f64 { // exp(x)/2 for x >= log(DBL_MAX) const // see: musl/src/math/__expo2.c k = 2043, kln2 = reinterpret(0x40962066151ADD8B); // 0x1.62066151add8bp+10 @@ -52,15 +53,24 @@ function R(z: f64): f64 { // Rational approximation of (asin(x)-x)/x^3 } // @ts-ignore: decorator -@lazy var random_seeded = false; +@lazy +var random_seeded = false; + // @ts-ignore: decorator -@lazy var random_state0_64: u64; +@lazy +var random_state0_64: u64; + // @ts-ignore: decorator -@lazy var random_state1_64: u64; +@lazy +var random_state1_64: u64; + // @ts-ignore: decorator -@lazy var random_state0_32: u32; +@lazy +var random_state0_32: u32; + // @ts-ignore: decorator -@lazy var random_state1_32: u32; +@lazy +var random_state1_32: u32; function murmurHash3(h: u64): u64 { // Force all bits of a hash block to avalanche h ^= h >> 33; // see: https://github.com/aappleby/smhasher @@ -81,21 +91,36 @@ function splitMix32(h: u32): u32 { export namespace NativeMath { // @ts-ignore: decorator - @lazy export const E = reinterpret(0x4005BF0A8B145769); // 2.7182818284590452354 + @lazy + export const E = reinterpret(0x4005BF0A8B145769); // 2.7182818284590452354 + // @ts-ignore: decorator - @lazy export const LN2 = reinterpret(0x3FE62E42FEFA39EF); // 0.69314718055994530942 + @lazy + export const LN2 = reinterpret(0x3FE62E42FEFA39EF); // 0.69314718055994530942 + // @ts-ignore: decorator - @lazy export const LN10 = reinterpret(0x40026BB1BBB55516); // 2.30258509299404568402 + @lazy + export const LN10 = reinterpret(0x40026BB1BBB55516); // 2.30258509299404568402 + // @ts-ignore: decorator - @lazy export const LOG2E = reinterpret(0x3FF71547652B82FE); // 1.4426950408889634074 + @lazy + export const LOG2E = reinterpret(0x3FF71547652B82FE); // 1.4426950408889634074 + // @ts-ignore: decorator - @lazy export const LOG10E = reinterpret(0x3FDBCB7B1526E50E); // 0.43429448190325182765 + @lazy + export const LOG10E = reinterpret(0x3FDBCB7B1526E50E); // 0.43429448190325182765 + // @ts-ignore: decorator - @lazy export const PI = reinterpret(0x400921FB54442D18); // 3.14159265358979323846 + @lazy + export const PI = reinterpret(0x400921FB54442D18); // 3.14159265358979323846 + // @ts-ignore: decorator - @lazy export const SQRT1_2 = reinterpret(0x3FE6A09E667F3BCD); // 0.70710678118654752440 + @lazy + export const SQRT1_2 = reinterpret(0x3FE6A09E667F3BCD); // 0.70710678118654752440 + // @ts-ignore: decorator - @lazy export const SQRT2 = reinterpret(0x3FF6A09E667F3BCD); // 1.41421356237309504880 + @lazy + export const SQRT2 = reinterpret(0x3FF6A09E667F3BCD); // 1.41421356237309504880 // @ts-ignore: decorator @inline export function abs(x: f64): f64 { @@ -360,7 +385,8 @@ export namespace NativeMath { } // @ts-ignore: decorator - @inline export function ceil(x: f64): f64 { + @inline + export function ceil(x: f64): f64 { return builtin_ceil(x); } @@ -511,12 +537,14 @@ export namespace NativeMath { } // @ts-ignore: decorator - @inline export function floor(x: f64): f64 { + @inline + export function floor(x: f64): f64 { return builtin_floor(x); } // @ts-ignore: decorator - @inline export function fround(x: f64): f32 { + @inline + export function fround(x: f64): f32 { return x; } @@ -777,12 +805,14 @@ export namespace NativeMath { } // @ts-ignore: decorator - @inline export function max(value1: f64, value2: f64): f64 { + @inline + export function max(value1: f64, value2: f64): f64 { return builtin_max(value1, value2); } // @ts-ignore: decorator - @inline export function min(value1: f64, value2: f64): f64 { + @inline + export function min(value1: f64, value2: f64): f64 { return builtin_min(value1, value2); } @@ -1011,12 +1041,14 @@ export namespace NativeMath { } // @ts-ignore: decorator - @inline export function round(x: f64): f64 { + @inline + export function round(x: f64): f64 { return builtin_copysign(builtin_floor(x + 0.5), x); } // @ts-ignore: decorator - @inline export function sign(x: f64): f64 { + @inline + export function sign(x: f64): f64 { if (ASC_SHRINK_LEVEL > 0) { return builtin_abs(x) > 0 ? builtin_copysign(1, x) : x; } else { @@ -1025,11 +1057,11 @@ export namespace NativeMath { } // @ts-ignore: decorator - @inline export function signbit(x: f64): bool { + @inline + export function signbit(x: f64): bool { // In ECMAScript all NaN values are indistinguishable from each other // so we need handle NaN and negative NaN in similar way - // @ts-ignore: type - return ((reinterpret(x) >>> 63) & (x == x)); + return ((reinterpret(x) >>> 63) & i32(x == x)); } export function sin(x: f64): f64 { // TODO @@ -1056,7 +1088,8 @@ export namespace NativeMath { } // @ts-ignore: decorator - @inline export function sqrt(x: f64): f64 { + @inline + export function sqrt(x: f64): f64 { return builtin_sqrt(x); } @@ -1089,7 +1122,8 @@ export namespace NativeMath { } // @ts-ignore: decorator - @inline export function trunc(x: f64): f64 { + @inline + export function trunc(x: f64): f64 { return builtin_trunc(x); } @@ -1247,9 +1281,12 @@ export namespace NativeMath { } // @ts-ignore: decorator -@lazy var rempio2f_y: f64; +@lazy +var rempio2f_y: f64; + // @ts-ignore: decorator -@lazy const PIO2_TABLE: u64[] = [ +@lazy +const PIO2_TABLE: u64[] = [ 0xA2F9836E4E441529, 0xFC2757D1F534DDC0, 0xDB6295993C439041, @@ -1268,7 +1305,8 @@ function Rf(z: f32): f32 { // Rational approximation of (asin(x)-x)/x^3 } // @ts-ignore: decorator -@inline function expo2f(x: f32): f32 { // exp(x)/2 for x >= log(DBL_MAX) +@inline +function expo2f(x: f32): f32 { // exp(x)/2 for x >= log(DBL_MAX) const // see: musl/src/math/__expo2f.c k = 235, kln2 = reinterpret(0x4322E3BC); // 0x1.45c778p+7f @@ -1277,7 +1315,8 @@ function Rf(z: f32): f32 { // Rational approximation of (asin(x)-x)/x^3 } // @ts-ignore: decorator -@inline function pio2_large_quot(x: f32, u: i32): i32 { // see: jdh8/metallic/blob/master/src/math/float/rem_pio2f.c +@inline +function pio2_large_quot(x: f32, u: i32): i32 { // see: jdh8/metallic/blob/master/src/math/float/rem_pio2f.c const coeff = reinterpret(0x3BF921FB54442D18); // π * 0x1p-65 = 8.51530395021638647334e-20 const bits = PIO2_TABLE; @@ -1307,7 +1346,8 @@ function Rf(z: f32): f32 { // Rational approximation of (asin(x)-x)/x^3 } // @ts-ignore: decorator -@inline function rempio2f(x: f32, u: u32, sign: i32): i32 { // see: jdh8/metallic/blob/master/src/math/float/rem_pio2f.c +@inline +function rempio2f(x: f32, u: u32, sign: i32): i32 { // see: jdh8/metallic/blob/master/src/math/float/rem_pio2f.c const pi2hi = reinterpret(0x3FF921FB50000000); // 1.57079631090164184570 const pi2lo = reinterpret(0x3E5110B4611A6263); // 1.58932547735281966916e-8 const _2_pi = reinterpret(0x3FE45F306DC9C883); // 0.63661977236758134308 @@ -1324,7 +1364,8 @@ function Rf(z: f32): f32 { // Rational approximation of (asin(x)-x)/x^3 /* |sin(x)/x - s(x)| < 2**-37.5 (~[-4.89e-12, 4.824e-12]). */ // @ts-ignore: decorator -@inline function sin_kernf(x: f64): f32 { // see: musl/tree/src/math/__sindf.c +@inline +function sin_kernf(x: f64): f32 { // see: musl/tree/src/math/__sindf.c const S1 = reinterpret(0xBFC5555554CBAC77); // -0x15555554cbac77.0p-55 const S2 = reinterpret(0x3F811110896EFBB2); // 0x111110896efbb2.0p-59 const S3 = reinterpret(0xBF2A00F9E2CAE774); // -0x1a00f9e2cae774.0p-65 @@ -1339,7 +1380,8 @@ function Rf(z: f32): f32 { // Rational approximation of (asin(x)-x)/x^3 /* |cos(x) - c(x)| < 2**-34.1 (~[-5.37e-11, 5.295e-11]). */ // @ts-ignore: decorator -@inline function cos_kernf(x: f64): f32 { // see: musl/tree/src/math/__cosdf.c +@inline +function cos_kernf(x: f64): f32 { // see: musl/tree/src/math/__cosdf.c const C0 = reinterpret(0xBFDFFFFFFD0C5E81); // -0x1ffffffd0c5e81.0p-54 const C1 = reinterpret(0x3FA55553E1053A42); // 0x155553e1053a42.0p-57 const C2 = reinterpret(0xBF56C087E80F1E27); // -0x16c087e80f1e27.0p-62 @@ -1353,7 +1395,8 @@ function Rf(z: f32): f32 { // Rational approximation of (asin(x)-x)/x^3 /* |tan(x)/x - t(x)| < 2**-25.5 (~[-2e-08, 2e-08]). */ // @ts-ignore: decorator -@inline function tan_kernf(x: f64, odd: i32): f32 { // see: musl/tree/src/math/__tandf.c +@inline +function tan_kernf(x: f64, odd: i32): f32 { // see: musl/tree/src/math/__tandf.c const T0 = reinterpret(0x3FD5554D3418C99F); /* 0x15554d3418c99f.0p-54 */ const T1 = reinterpret(0x3FC112FD38999F72); /* 0x1112fd38999f72.0p-55 */ @@ -1376,30 +1419,48 @@ function Rf(z: f32): f32 { // Rational approximation of (asin(x)-x)/x^3 export namespace NativeMathf { // @ts-ignore: decorator - @lazy export const E = NativeMath.E; + @lazy + export const E = NativeMath.E; + // @ts-ignore: decorator - @lazy export const LN2 = NativeMath.LN2; + @lazy + export const LN2 = NativeMath.LN2; + // @ts-ignore: decorator - @lazy export const LN10 = NativeMath.LN10; + @lazy + export const LN10 = NativeMath.LN10; + // @ts-ignore: decorator - @lazy export const LOG2E = NativeMath.LOG2E; + @lazy + export const LOG2E = NativeMath.LOG2E; + // @ts-ignore: decorator - @lazy export const LOG10E = NativeMath.LOG10E; + @lazy + export const LOG10E = NativeMath.LOG10E; + // @ts-ignore: decorator - @lazy export const PI = NativeMath.PI; + @lazy + export const PI = NativeMath.PI; + // @ts-ignore: decorator - @lazy export const SQRT1_2 = NativeMath.SQRT1_2; + @lazy + export const SQRT1_2 = NativeMath.SQRT1_2; + // @ts-ignore: decorator - @lazy export const SQRT2 = NativeMath.SQRT2; + @lazy + export const SQRT2 = NativeMath.SQRT2; - /** Used as return values from Mathf.sincos */ // @ts-ignore: decorator - @lazy export var sincos_sin: f32 = 0; + @lazy + export var sincos_sin: f32 = 0; + // @ts-ignore: decorator - @lazy export var sincos_cos: f32 = 0; + @lazy + export var sincos_cos: f32 = 0; // @ts-ignore: decorator - @inline export function abs(x: f32): f32 { + @inline + export function abs(x: f32): f32 { return builtin_abs(x); } @@ -1635,7 +1696,8 @@ export namespace NativeMathf { } // @ts-ignore: decorator - @inline export function ceil(x: f32): f32 { + @inline + export function ceil(x: f32): f32 { return builtin_ceil(x); } @@ -1711,7 +1773,8 @@ export namespace NativeMathf { } // @ts-ignore: decorator - @inline export function floor(x: f32): f32 { + @inline + export function floor(x: f32): f32 { return builtin_floor(x); } @@ -1822,7 +1885,8 @@ export namespace NativeMathf { } // @ts-ignore: decorator - @inline export function fround(x: f32): f32 { + @inline + export function fround(x: f32): f32 { return x; } @@ -1857,7 +1921,8 @@ export namespace NativeMathf { } // @ts-ignore: decorator - @inline export function imul(x: f32, y: f32): f32 { + @inline + export function imul(x: f32, y: f32): f32 { /* * Wasm (MVP) and JS have different approaches for double->int conversions. * @@ -2036,12 +2101,14 @@ export namespace NativeMathf { } // @ts-ignore: decorator - @inline export function max(value1: f32, value2: f32): f32 { + @inline + export function max(value1: f32, value2: f32): f32 { return builtin_max(value1, value2); } // @ts-ignore: decorator - @inline export function min(value1: f32, value2: f32): f32 { + @inline + export function min(value1: f32, value2: f32): f32 { return builtin_min(value1, value2); } @@ -2235,7 +2302,8 @@ export namespace NativeMathf { } // @ts-ignore: decorator - @inline export function seedRandom(value: i64): void { + @inline + export function seedRandom(value: i64): void { NativeMath.seedRandom(value); } @@ -2255,12 +2323,14 @@ export namespace NativeMathf { } // @ts-ignore: decorator - @inline export function round(x: f32): f32 { + @inline + export function round(x: f32): f32 { return builtin_copysign(builtin_floor(x + 0.5), x); } // @ts-ignore: decorator - @inline export function sign(x: f32): f32 { + @inline + export function sign(x: f32): f32 { if (ASC_SHRINK_LEVEL > 0) { return builtin_abs(x) > 0 ? builtin_copysign(1, x) : x; } else { @@ -2269,7 +2339,8 @@ export namespace NativeMathf { } // @ts-ignore: decorator - @inline export function signbit(x: f32): bool { + @inline + export function signbit(x: f32): bool { // @ts-ignore: type return ((reinterpret(x) >>> 31) & (x == x)); } @@ -2335,7 +2406,8 @@ export namespace NativeMathf { } // @ts-ignore: decorator - @inline export function sqrt(x: f32): f32 { + @inline + export function sqrt(x: f32): f32 { return builtin_sqrt(x); } @@ -2404,7 +2476,8 @@ export namespace NativeMathf { } // @ts-ignore: decorator - @inline export function trunc(x: f32): f32 { + @inline + export function trunc(x: f32): f32 { return builtin_trunc(x); } diff --git a/std/assembly/memory.ts b/std/assembly/memory.ts index bd276f0370..022cfaed2c 100644 --- a/std/assembly/memory.ts +++ b/std/assembly/memory.ts @@ -1,47 +1,55 @@ import { memcmp, memmove, memset } from "./util/memory"; // @ts-ignore: decorator -@builtin export declare const HEAP_BASE: usize; +@builtin +export declare const HEAP_BASE: usize; /** Memory manager interface. */ export namespace memory { /** Gets the size of the memory in pages. */ // @ts-ignore: decorator - @builtin export declare function size(): i32; + @builtin + export declare function size(): i32; /** Grows the memory by the given size in pages and returns the previous size in pages. */ // @ts-ignore: decorator - @unsafe @builtin export declare function grow(pages: i32): i32; + @unsafe @builtin + export declare function grow(pages: i32): i32; /** Fills a section in memory with the specified byte value. */ // @ts-ignore: decorator - @unsafe @builtin export function fill(dst: usize, c: u8, n: usize): void { + @unsafe @builtin + export function fill(dst: usize, c: u8, n: usize): void { memset(dst, c, n); // fallback if "bulk-memory" isn't enabled } /** Copies a section of memory to another. Has move semantics. */ // @ts-ignore: decorator - @unsafe @builtin export function copy(dst: usize, src: usize, n: usize): void { + @unsafe @builtin + export function copy(dst: usize, src: usize, n: usize): void { memmove(dst, src, n); // fallback if "bulk-memory" isn't enabled } /** Initializes a memory segment. */ // @ts-ignore: decorator - @unsafe export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void { + @unsafe + export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void { ERROR("not implemented"); } /** Drops a memory segment. */ // @ts-ignore: decorator - @unsafe export function drop(segmentIndex: u32): void { + @unsafe + export function drop(segmentIndex: u32): void { ERROR("not implemented"); } /** Dynamically allocates a section of memory and returns its address. */ // @ts-ignore: decorator - @unsafe export function allocate(size: usize): usize { - // @ts-ignore: undefined + @unsafe + export function allocate(size: usize): usize { + // @ts-ignore: stub if (isDefined(__memory_allocate)) return __memory_allocate(size); else ERROR("missing implementation: memory.allocate"); return unreachable(); @@ -49,23 +57,26 @@ export namespace memory { /** Dynamically frees a section of memory by the previously allocated address. */ // @ts-ignore: decorator - @unsafe export function free(ptr: usize): void { - // @ts-ignore: undefined + @unsafe + export function free(ptr: usize): void { + // @ts-ignore: stub if (isDefined(__memory_free)) __memory_free(ptr); else ERROR("missing implementation: memory.free"); } /** Resets the memory to its initial state. Arena allocator only. */ // @ts-ignore: decorator - @unsafe export function reset(): void { - // @ts-ignore: undefined + @unsafe + export function reset(): void { + // @ts-ignore: stub if (isDefined(__memory_reset)) __memory_reset(); else ERROR("missing implementation: memory.reset"); } /** Repeats a section of memory at a specific address. */ // @ts-ignore: decorator - @unsafe export function repeat(dst: usize, src: usize, srcLength: usize, count: usize): void { + @unsafe + export function repeat(dst: usize, src: usize, srcLength: usize, count: usize): void { var index: usize = 0; var total = srcLength * count; while (index < total) { @@ -76,7 +87,8 @@ export namespace memory { /** Compares a section of memory to another. */ // @ts-ignore: decorator - @inline export function compare(vl: usize, vr: usize, n: usize): i32 { + @inline + export function compare(vl: usize, vr: usize, n: usize): i32 { return memcmp(vl, vr, n); } } diff --git a/std/assembly/number.ts b/std/assembly/number.ts index b44b065472..bc97a3c174 100644 --- a/std/assembly/number.ts +++ b/std/assembly/number.ts @@ -4,9 +4,12 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class I8 { // @ts-ignore: decorator - @lazy static readonly MIN_VALUE: i8 = i8.MIN_VALUE; + @lazy + static readonly MIN_VALUE: i8 = i8.MIN_VALUE; + // @ts-ignore: decorator - @lazy static readonly MAX_VALUE: i8 = i8.MAX_VALUE; + @lazy + static readonly MAX_VALUE: i8 = i8.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): i8 { return parseI32(value, radix); @@ -21,9 +24,12 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class I16 { // @ts-ignore: decorator - @lazy static readonly MIN_VALUE: i16 = i16.MIN_VALUE; + @lazy + static readonly MIN_VALUE: i16 = i16.MIN_VALUE; + // @ts-ignore: decorator - @lazy static readonly MAX_VALUE: i16 = i16.MAX_VALUE; + @lazy + static readonly MAX_VALUE: i16 = i16.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): i16 { return parseI32(value, radix); @@ -38,9 +44,12 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class I32 { // @ts-ignore: decorator - @lazy static readonly MIN_VALUE: i32 = i32.MIN_VALUE; + @lazy + static readonly MIN_VALUE: i32 = i32.MIN_VALUE; + // @ts-ignore: decorator - @lazy static readonly MAX_VALUE: i32 = i32.MAX_VALUE; + @lazy + static readonly MAX_VALUE: i32 = i32.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): i32 { return parseI32(value, radix); @@ -55,9 +64,12 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class I64 { // @ts-ignore: decorator - @lazy static readonly MIN_VALUE: i64 = i64.MIN_VALUE; + @lazy + static readonly MIN_VALUE: i64 = i64.MIN_VALUE; + // @ts-ignore: decorator - @lazy static readonly MAX_VALUE: i64 = i64.MAX_VALUE; + @lazy + static readonly MAX_VALUE: i64 = i64.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): i64 { return parseI64(value, radix); @@ -72,9 +84,12 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class Isize { // @ts-ignore: decorator - @lazy static readonly MIN_VALUE: isize = isize.MIN_VALUE; + @lazy + static readonly MIN_VALUE: isize = isize.MIN_VALUE; + // @ts-ignore: decorator - @lazy static readonly MAX_VALUE: isize = isize.MAX_VALUE; + @lazy + static readonly MAX_VALUE: isize = isize.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): isize { return parseI64(value, radix); @@ -89,9 +104,12 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class U8 { // @ts-ignore: decorator - @lazy static readonly MIN_VALUE: u8 = u8.MIN_VALUE; + @lazy + static readonly MIN_VALUE: u8 = u8.MIN_VALUE; + // @ts-ignore: decorator - @lazy static readonly MAX_VALUE: u8 = u8.MAX_VALUE; + @lazy + static readonly MAX_VALUE: u8 = u8.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): u8 { return parseI32(value, radix); @@ -106,9 +124,12 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class U16 { // @ts-ignore: decorator - @lazy static readonly MIN_VALUE: u16 = u16.MIN_VALUE; + @lazy + static readonly MIN_VALUE: u16 = u16.MIN_VALUE; + // @ts-ignore: decorator - @lazy static readonly MAX_VALUE: u16 = u16.MAX_VALUE; + @lazy + static readonly MAX_VALUE: u16 = u16.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): u16 { return parseI32(value, radix); @@ -123,9 +144,12 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class U32 { // @ts-ignore: decorator - @lazy static readonly MIN_VALUE: u32 = u32.MIN_VALUE; + @lazy + static readonly MIN_VALUE: u32 = u32.MIN_VALUE; + // @ts-ignore: decorator - @lazy static readonly MAX_VALUE: u32 = u32.MAX_VALUE; + @lazy + static readonly MAX_VALUE: u32 = u32.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): u32 { return parseI32(value, radix); @@ -140,9 +164,12 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class U64 { // @ts-ignore: decorator - @lazy static readonly MIN_VALUE: u64 = u64.MIN_VALUE; + @lazy + static readonly MIN_VALUE: u64 = u64.MIN_VALUE; + // @ts-ignore: decorator - @lazy static readonly MAX_VALUE: u64 = u64.MAX_VALUE; + @lazy + static readonly MAX_VALUE: u64 = u64.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): u64 { return parseI64(value, radix); @@ -157,9 +184,12 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class Usize { // @ts-ignore: decorator - @lazy static readonly MIN_VALUE: usize = usize.MIN_VALUE; + @lazy + static readonly MIN_VALUE: usize = usize.MIN_VALUE; + // @ts-ignore: decorator - @lazy static readonly MAX_VALUE: usize = usize.MAX_VALUE; + @lazy + static readonly MAX_VALUE: usize = usize.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): usize { return parseI64(value, radix); @@ -174,9 +204,12 @@ import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins @sealed export abstract class Bool { // @ts-ignore: decorator - @lazy static readonly MIN_VALUE: bool = bool.MIN_VALUE; + @lazy + static readonly MIN_VALUE: bool = bool.MIN_VALUE; + // @ts-ignore: decorator - @lazy static readonly MAX_VALUE: bool = bool.MAX_VALUE; + @lazy + static readonly MAX_VALUE: bool = bool.MAX_VALUE; toString(this: bool): String { // TODO: radix? @@ -189,21 +222,36 @@ export { Bool as Boolean }; @sealed export abstract class F32 { // @ts-ignore: decorator - @lazy static readonly EPSILON: f32 = f32.EPSILON; + @lazy + static readonly EPSILON: f32 = f32.EPSILON; + // @ts-ignore: decorator - @lazy static readonly MIN_VALUE: f32 = f32.MIN_VALUE; + @lazy + static readonly MIN_VALUE: f32 = f32.MIN_VALUE; + // @ts-ignore: decorator - @lazy static readonly MAX_VALUE: f32 = f32.MAX_VALUE; + @lazy + static readonly MAX_VALUE: f32 = f32.MAX_VALUE; + // @ts-ignore: decorator - @lazy static readonly MIN_SAFE_INTEGER: f32 = f32.MIN_SAFE_INTEGER; + @lazy + static readonly MIN_SAFE_INTEGER: f32 = f32.MIN_SAFE_INTEGER; + // @ts-ignore: decorator - @lazy static readonly MAX_SAFE_INTEGER: f32 = f32.MAX_SAFE_INTEGER; + @lazy + static readonly MAX_SAFE_INTEGER: f32 = f32.MAX_SAFE_INTEGER; + // @ts-ignore: decorator - @lazy static readonly POSITIVE_INFINITY: f32 = Infinity; + @lazy + static readonly POSITIVE_INFINITY: f32 = Infinity; + // @ts-ignore: decorator - @lazy static readonly NEGATIVE_INFINITY: f32 = -Infinity; + @lazy + static readonly NEGATIVE_INFINITY: f32 = -Infinity; + // @ts-ignore: decorator - @lazy static readonly NaN: f32 = NaN; + @lazy + static readonly NaN: f32 = NaN; static isNaN(value: f32): bool { return isNaN(value); @@ -238,21 +286,36 @@ export { Bool as Boolean }; @sealed export abstract class F64 { // @ts-ignore: decorator - @lazy static readonly EPSILON: f64 = f64.EPSILON; + @lazy + static readonly EPSILON: f64 = f64.EPSILON; + // @ts-ignore: decorator - @lazy static readonly MIN_VALUE: f64 = f64.MIN_VALUE; + @lazy + static readonly MIN_VALUE: f64 = f64.MIN_VALUE; + // @ts-ignore: decorator - @lazy static readonly MAX_VALUE: f64 = f64.MAX_VALUE; + @lazy + static readonly MAX_VALUE: f64 = f64.MAX_VALUE; + // @ts-ignore: decorator - @lazy static readonly MIN_SAFE_INTEGER: f64 = f64.MIN_SAFE_INTEGER; + @lazy + static readonly MIN_SAFE_INTEGER: f64 = f64.MIN_SAFE_INTEGER; + // @ts-ignore: decorator - @lazy static readonly MAX_SAFE_INTEGER: f64 = f64.MAX_SAFE_INTEGER; + @lazy + static readonly MAX_SAFE_INTEGER: f64 = f64.MAX_SAFE_INTEGER; + // @ts-ignore: decorator - @lazy static readonly POSITIVE_INFINITY: f64 = Infinity; + @lazy + static readonly POSITIVE_INFINITY: f64 = Infinity; + // @ts-ignore: decorator - @lazy static readonly NEGATIVE_INFINITY: f64 = -Infinity; + @lazy + static readonly NEGATIVE_INFINITY: f64 = -Infinity; + // @ts-ignore: decorator - @lazy static readonly NaN: f64 = NaN; + @lazy + static readonly NaN: f64 = NaN; static isNaN(value: f64): bool { return builtin_isNaN(value); diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 721b419821..8c3ab15ec5 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -10,13 +10,15 @@ export namespace runtime { /** Size of a runtime header. */ // @ts-ignore: decorator - @lazy @inline static readonly SIZE: usize = gc.implemented + @lazy @inline + static readonly SIZE: usize = gc.implemented ? (offsetof
( ) + AL_MASK) & ~AL_MASK // full header if GC is present : (offsetof
("gc1") + AL_MASK) & ~AL_MASK; // half header if GC is absent /** Magic value used to validate runtime headers. */ // @ts-ignore: decorator - @lazy @inline static readonly MAGIC: u32 = 0xA55E4B17; + @lazy @inline + static readonly MAGIC: u32 = 0xA55E4B17; /** Unique id of the respective class or a magic value if not yet registered.*/ classId: u32; @@ -45,7 +47,8 @@ export namespace runtime { /** Allocates a new object and returns a pointer to its payload. Does not fill. */ // @ts-ignore: decorator - @unsafe export function allocRaw(payloadSize: u32): usize { + @unsafe + export function allocRaw(payloadSize: u32): usize { var header = changetype
(memory.allocate(adjust(payloadSize))); header.classId = Header.MAGIC; header.payloadSize = payloadSize; @@ -58,7 +61,8 @@ export namespace runtime { /** Allocates a new object and returns a pointer to its payload. Fills with zeroes.*/ // @ts-ignore: decorator - @unsafe export function alloc(payloadSize: u32): usize { + @unsafe + export function alloc(payloadSize: u32): usize { var ref = allocRaw(payloadSize); memory.fill(ref, 0, payloadSize); return ref; @@ -66,7 +70,8 @@ export namespace runtime { /** Reallocates an object if necessary. Returns a pointer to its (moved) payload. */ // @ts-ignore: decorator - @unsafe export function realloc(ref: usize, newPayloadSize: u32): usize { + @unsafe + export function realloc(ref: usize, newPayloadSize: u32): usize { // Background: When managed objects are allocated these aren't immediately registered with GC // but can be used as scratch objects while unregistered. This is useful in situations where // the object must be reallocated multiple times because its final size isn't known beforehand, @@ -117,13 +122,15 @@ export namespace runtime { /** Frees an object. Must not have been registered with GC yet. */ // @ts-ignore: decorator - @unsafe @inline export function free(ref: T): void { + @unsafe @inline + export function free(ref: T): void { memory.free(changetype(unref(changetype(ref)))); } /** Registers a managed object. Cannot be free'd anymore afterwards. */ // @ts-ignore: decorator - @unsafe @inline export function register(ref: usize): T { + @unsafe @inline + export function register(ref: usize): T { if (!isReference()) ERROR("reference expected"); // see comment in REALLOC why this is useful. also inline this because // it's generic so we don't get a bunch of functions. @@ -134,7 +141,8 @@ export namespace runtime { /** Links a managed object with its managed parent. */ // @ts-ignore: decorator - @unsafe @inline export function link(ref: T, parentRef: TParent): void { + @unsafe @inline + export function link(ref: T, parentRef: TParent): void { assert(changetype(ref) >= HEAP_BASE + Header.SIZE); // must be a heap object var header = changetype
(changetype(ref) - Header.SIZE); assert(header.classId != Header.MAGIC && header.gc1 != 0 && header.gc2 != 0); // must be registered @@ -145,16 +153,24 @@ export namespace runtime { import { ArrayBuffer } from "./arraybuffer"; export abstract class ArrayBufferView { - @lazy static readonly MAX_BYTELENGTH: i32 = MAX_SIZE_32 - runtime.Header.SIZE; + + // @ts-ignore: decorator + @lazy + static readonly MAX_BYTELENGTH: i32 = MAX_SIZE_32 - runtime.Header.SIZE; [key: number]: number; // @ts-ignore: decorator - @unsafe data: ArrayBuffer; + @unsafe + data: ArrayBuffer; + // @ts-ignore: decorator - @unsafe dataStart: usize; + @unsafe + dataStart: usize; + // @ts-ignore: decorator - @unsafe dataEnd: usize; + @unsafe + dataEnd: usize; constructor(length: i32, alignLog2: i32) { if (length > ArrayBufferView.MAX_BYTELENGTH >>> alignLog2) throw new RangeError("Invalid length"); diff --git a/std/assembly/set.ts b/std/assembly/set.ts index ff8624a9be..3874e37230 100644 --- a/std/assembly/set.ts +++ b/std/assembly/set.ts @@ -4,11 +4,16 @@ import { HASH } from "./util/hash"; // A deterministic hash set based on CloseTable from https://github.com/jorendorff/dht // @ts-ignore: decorator -@inline const INITIAL_CAPACITY = 4; +@inline +const INITIAL_CAPACITY = 4; + // @ts-ignore: decorator -@inline const FILL_FACTOR: f64 = 8 / 3; +@inline +const FILL_FACTOR: f64 = 8 / 3; + // @ts-ignore: decorator -@inline const FREE_FACTOR: f64 = 3 / 4; +@inline +const FREE_FACTOR: f64 = 3 / 4; /** Structure of a set entry. */ @unmanaged class SetEntry { @@ -18,15 +23,18 @@ import { HASH } from "./util/hash"; /** Empty bit. */ // @ts-ignore: decorator -@inline const EMPTY: usize = 1 << 0; +@inline +const EMPTY: usize = 1 << 0; /** Size of a bucket. */ // @ts-ignore: decorator -@inline const BUCKET_SIZE = sizeof(); +@inline +const BUCKET_SIZE = sizeof(); /** Computes the alignment of an entry. */ // @ts-ignore: decorator -@inline function ENTRY_ALIGN(): usize { +@inline +function ENTRY_ALIGN(): usize { // can align to 4 instead of 8 if 32-bit and K is <= 32-bits const align = (sizeof() > sizeof() ? sizeof() : sizeof()) - 1; return align; @@ -34,7 +42,8 @@ import { HASH } from "./util/hash"; /** Computes the aligned size of an entry. */ // @ts-ignore: decorator -@inline function ENTRY_SIZE(): usize { +@inline +function ENTRY_SIZE(): usize { const align = ENTRY_ALIGN(); const size = (offsetof>() + align) & ~align; return size; diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 77a1d24a28..520c6bd8ce 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -3,8 +3,10 @@ import { MAX_SIZE_32 } from "./util/allocator"; import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./util/string"; @sealed export abstract class String { + // @ts-ignore: decorator - @lazy static readonly MAX_LENGTH: i32 = (MAX_SIZE_32 - runtime.Header.SIZE) >> alignof(); + @lazy + static readonly MAX_LENGTH: i32 = (MAX_SIZE_32 - runtime.Header.SIZE) >> alignof(); get length(): i32 { return changetype(changetype(this) - runtime.Header.SIZE).payloadSize >> 1; @@ -20,8 +22,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut static fromCodePoint(code: i32): String { assert(code <= 0x10FFFF); var sur = code > 0xFFFF; - // @ts-ignore: type - var out = runtime.allocRaw((sur + 1) << 1); + var out = runtime.allocRaw((i32(sur) + 1) << 1); if (!sur) { store(out, code); } else { @@ -82,7 +83,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var searchLength: isize = searchString.length; var start: isize = end - searchLength; if (start < 0) return false; - // @ts-ignore: string/String + // @ts-ignore: string <-> String return !compareImpl(this, start, searchString, 0, searchLength); } @@ -91,7 +92,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut if (left === null || right === null) return false; var leftLength = left.length; if (leftLength != right.length) return false; - // @ts-ignore: string/String + // @ts-ignore: string <-> String return !compareImpl(left, 0, right, 0, leftLength); } @@ -105,7 +106,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var rightLength = right.length; if (!leftLength) return false; if (!rightLength) return true; - // @ts-ignore: string/String + // @ts-ignore: string <-> String return compareImpl(left, 0, right, 0, min(leftLength, rightLength)) > 0; } @@ -119,7 +120,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var rightLength = right.length; if (!rightLength) return false; if (!leftLength) return true; - // @ts-ignore: string/String + // @ts-ignore: string <-> String return compareImpl(left, 0, right, 0, min(leftLength, rightLength)) < 0; } @@ -141,7 +142,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var start = min(max(fromIndex, 0), len); len -= searchLen; for (let k: isize = start; k <= len; ++k) { - // @ts-ignore: string/String + // @ts-ignore: string <-> String if (!compareImpl(this, k, searchString, 0, searchLen)) return k; } return -1; @@ -156,7 +157,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut if (!len) return -1; var start = min(max(fromIndex, 0), len - searchLen); for (let k = start; k >= 0; --k) { - // @ts-ignore: string/String + // @ts-ignore: string <-> String if (!compareImpl(this, k, searchString, 0, searchLen)) return k; } return -1; @@ -170,7 +171,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var start = min(max(pos, 0), len); var searchLength: isize = searchString.length; if (searchLength + start > len) return false; - // @ts-ignore: string/String + // @ts-ignore: string <-> String return !compareImpl(this, start, searchString, 0, searchLength); } @@ -523,17 +524,17 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut export type string = String; export function parseInt(str: String, radix: i32 = 0): f64 { - // @ts-ignore: string/String + // @ts-ignore: string <-> String return parse(str, radix); } export function parseI32(str: String, radix: i32 = 0): i32 { - // @ts-ignore: string/String + // @ts-ignore: string <-> String return parse(str, radix); } export function parseI64(str: String, radix: i32 = 0): i64 { - // @ts-ignore: string/String + // @ts-ignore: string <-> String return parse(str, radix); } diff --git a/std/assembly/symbol.ts b/std/assembly/symbol.ts index e50325f60c..ed5eb76644 100644 --- a/std/assembly/symbol.ts +++ b/std/assembly/symbol.ts @@ -4,8 +4,9 @@ import { Map } from "./map"; @lazy var idToString: Map; @lazy var nextId: usize = 12; // Symbol.unscopables + 1 +@unmanaged // @ts-ignore: nolib -@unmanaged export class symbol { +export class symbol { toString(): string { var id = changetype(this); var str = ""; @@ -52,6 +53,8 @@ export namespace Symbol { @lazy export const toStringTag = changetype(10); @lazy export const unscopables = changetype(11); + // FIXME + /* tslint:disable */// not valid TS // @ts-ignore: identifier export function for(key: string): symbol { diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index f23c2c9e0f..ff46d25414 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -6,8 +6,10 @@ function clampToByte(value: i32): i32 { } export class Int8Array extends ArrayBufferView { + // @ts-ignore: decorator - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { super(length, alignof()); @@ -69,8 +71,10 @@ export class Int8Array extends ArrayBufferView { } export class Uint8Array extends ArrayBufferView { + // @ts-ignore: decorator - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { super(length, alignof()); @@ -126,8 +130,10 @@ export class Uint8Array extends ArrayBufferView { } export class Uint8ClampedArray extends Uint8Array { + // @ts-ignore: decorator - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8ClampedArray { return changetype(super.fill(value, start, end)); // safe because '.fill' reuses 'this' @@ -177,8 +183,10 @@ export class Uint8ClampedArray extends Uint8Array { } export class Int16Array extends ArrayBufferView { + // @ts-ignore: decorator - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { super(length, alignof()); @@ -240,8 +248,10 @@ export class Int16Array extends ArrayBufferView { } export class Uint16Array extends ArrayBufferView { + // @ts-ignore: decorator - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { super(length, alignof()); @@ -303,8 +313,10 @@ export class Uint16Array extends ArrayBufferView { } export class Int32Array extends ArrayBufferView { + // @ts-ignore: decorator - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { super(length, alignof()); @@ -366,8 +378,10 @@ export class Int32Array extends ArrayBufferView { } export class Uint32Array extends ArrayBufferView { + // @ts-ignore: decorator - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { super(length, alignof()); @@ -429,8 +443,10 @@ export class Uint32Array extends ArrayBufferView { } export class Int64Array extends ArrayBufferView { + // @ts-ignore: decorator - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { super(length, alignof()); @@ -492,8 +508,10 @@ export class Int64Array extends ArrayBufferView { } export class Uint64Array extends ArrayBufferView { + // @ts-ignore: decorator - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { super(length, alignof()); @@ -555,8 +573,10 @@ export class Uint64Array extends ArrayBufferView { } export class Float32Array extends ArrayBufferView { + // @ts-ignore: decorator - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { super(length, alignof()); @@ -618,8 +638,10 @@ export class Float32Array extends ArrayBufferView { } export class Float64Array extends ArrayBufferView { + // @ts-ignore: decorator - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); constructor(length: i32) { super(length, alignof()); @@ -681,7 +703,8 @@ export class Float64Array extends ArrayBufferView { } // @ts-ignore: decorator -@inline function FILL( +@inline +function FILL( array: TArray, value: native, start: i32, @@ -702,7 +725,8 @@ export class Float64Array extends ArrayBufferView { } // @ts-ignore: decorator -@inline function SORT( +@inline +function SORT( array: TArray, comparator: (a: T, b: T) => i32 ): TArray { @@ -723,7 +747,8 @@ export class Float64Array extends ArrayBufferView { } // @ts-ignore: decorator -@inline function SUBARRAY( +@inline +function SUBARRAY( array: TArray, begin: i32, end: i32 @@ -743,7 +768,8 @@ export class Float64Array extends ArrayBufferView { } // @ts-ignore: decorator -@inline function REDUCE( +@inline +function REDUCE( array: TArray, callbackfn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet, initialValue: TRet @@ -756,7 +782,8 @@ export class Float64Array extends ArrayBufferView { } // @ts-ignore: decorator -@inline function REDUCE_RIGHT( +@inline +function REDUCE_RIGHT( array: TArray, callbackfn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet, initialValue: TRet @@ -769,7 +796,8 @@ export class Float64Array extends ArrayBufferView { } // @ts-ignore: decorator -@inline function MAP( +@inline +function MAP( array: TArray, callbackfn: (value: T, index: i32, self: TArray) => T, ): TArray { @@ -787,7 +815,8 @@ export class Float64Array extends ArrayBufferView { } // @ts-ignore: decorator -@inline function FIND_INDEX( +@inline +function FIND_INDEX( array: TArray, callbackfn: (value: T, index: i32, array: TArray) => bool, ): i32 { @@ -799,7 +828,8 @@ export class Float64Array extends ArrayBufferView { } // @ts-ignore: decorator -@inline function SOME( +@inline +function SOME( array: TArray, callbackfn: (value: T, index: i32, array: TArray) => bool, ): bool { @@ -811,7 +841,8 @@ export class Float64Array extends ArrayBufferView { } // @ts-ignore: decorator -@inline function EVERY( +@inline +function EVERY( array: TArray, callbackfn: (value: T, index: i32, array: TArray) => bool, ): bool { @@ -824,7 +855,8 @@ export class Float64Array extends ArrayBufferView { } // @ts-ignore: decorator -@inline function FOREACH( +@inline +function FOREACH( array: TArray, callbackfn: (value: T, index: i32, array: TArray) => void, ): void { diff --git a/std/assembly/util/allocator.ts b/std/assembly/util/allocator.ts index af722401b6..c0c2fdbe5c 100644 --- a/std/assembly/util/allocator.ts +++ b/std/assembly/util/allocator.ts @@ -1,15 +1,19 @@ /** Number of alignment bits. */ // @ts-ignore: decorator -@inline export const AL_BITS: u32 = 3; +@inline +export const AL_BITS: u32 = 3; /** Number of possible alignment values. */ // @ts-ignore: decorator -@inline export const AL_SIZE: usize = 1 << AL_BITS; +@inline +export const AL_SIZE: usize = 1 << AL_BITS; /** Mask to obtain just the alignment bits. */ // @ts-ignore: decorator -@inline export const AL_MASK: usize = AL_SIZE - 1; +@inline +export const AL_MASK: usize = AL_SIZE - 1; /** Maximum 32-bit allocation size. */ // @ts-ignore: decorator -@inline export const MAX_SIZE_32: usize = 1 << 30; // 1GB +@inline +export const MAX_SIZE_32: usize = 1 << 30; // 1GB diff --git a/std/assembly/util/hash.ts b/std/assembly/util/hash.ts index 86a3d92a2e..d8d131d278 100644 --- a/std/assembly/util/hash.ts +++ b/std/assembly/util/hash.ts @@ -1,35 +1,32 @@ // @ts-ignore: decorator -@inline export function HASH(key: T): u32 { +@inline +export function HASH(key: T): u32 { if (isString(key)) { - // @ts-ignore: type - return hashStr(key); + return hashStr(changetype(key)); } else if (isReference()) { if (sizeof() == 4) return hash32(changetype(key)); if (sizeof() == 8) return hash64(changetype(key)); } else if (isFloat()) { - // @ts-ignore: type - if (sizeof() == 4) return hash32(reinterpret(key)); - // @ts-ignore: type - if (sizeof() == 8) return hash64(reinterpret(key)); + if (sizeof() == 4) return hash32(reinterpret(f32(key))); + if (sizeof() == 8) return hash64(reinterpret(f64(key))); } else { - // @ts-ignore: type - if (sizeof() == 1) return hash8 (key); - // @ts-ignore: type - if (sizeof() == 2) return hash16(key); - // @ts-ignore: type - if (sizeof() == 4) return hash32(key); - // @ts-ignore: type - if (sizeof() == 8) return hash64(key); + if (sizeof() == 1) return hash8 (u32(key)); + if (sizeof() == 2) return hash16(u32(key)); + if (sizeof() == 4) return hash32(u32(key)); + if (sizeof() == 8) return hash64(u64(key)); } - unreachable(); + return unreachable(); } // FNV-1a 32-bit as a starting point, see: http://isthe.com/chongo/tech/comp/fnv/ // @ts-ignore: decorator -@inline const FNV_OFFSET: u32 = 2166136261; +@inline +const FNV_OFFSET: u32 = 2166136261; + // @ts-ignore: decorator -@inline const FNV_PRIME: u32 = 16777619; +@inline +const FNV_PRIME: u32 = 16777619; function hash8(key: u32): u32 { return (FNV_OFFSET ^ key) * FNV_PRIME; diff --git a/std/assembly/util/number.ts b/std/assembly/util/number.ts index 48bb41b4ae..9940518c62 100644 --- a/std/assembly/util/number.ts +++ b/std/assembly/util/number.ts @@ -2,10 +2,12 @@ import { runtime } from "../runtime"; import { CharCode } from "./string"; // @ts-ignore: decorator -@inline export const MAX_DOUBLE_LENGTH = 28; +@inline +export const MAX_DOUBLE_LENGTH = 28; // @ts-ignore: decorator -@lazy @inline const POWERS10: u32[] = [ +@lazy @inline +const POWERS10: u32[] = [ 1, 10, 100, @@ -33,7 +35,8 @@ import { CharCode } from "./string"; "90", "91", "92", "93", "94", "95", "96", "97", "98", "99" */ // @ts-ignore: decorator -@lazy @inline const DIGITS: u32[] = [ +@lazy @inline +const DIGITS: u32[] = [ 0x00300030, 0x00310030, 0x00320030, 0x00330030, 0x00340030, 0x00350030, 0x00360030, 0x00370030, 0x00380030, 0x00390030, 0x00300031, 0x00310031, 0x00320031, 0x00330031, 0x00340031, @@ -57,7 +60,8 @@ import { CharCode } from "./string"; ]; // @ts-ignore: decorator -@lazy @inline const EXP_POWERS: i16[] = [ +@lazy @inline +const EXP_POWERS: i16[] = [ -1220, -1193, -1166, -1140, -1113, -1087, -1060, -1034, -1007, -980, -954, -927, -901, -874, -847, -821, -794, -768, -741, -715, -688, -661, -635, -608, -582, -555, -529, -502, -475, -449, @@ -71,7 +75,8 @@ import { CharCode } from "./string"; // 1e-348, 1e-340, ..., 1e340 // @ts-ignore: decorator -@lazy @inline const FRC_POWERS: u64[] = [ +@lazy @inline +const FRC_POWERS: u64[] = [ 0xFA8FD5A0081C0288, 0xBAAEE17FA23EBF76, 0x8B16FB203055AC76, 0xCF42894A5DCE35EA, 0x9A6BB0AA55653B2D, 0xE61ACF033D1A45DF, 0xAB70FE17C79AC6CA, 0xFF77B1FCBEBCDC4F, 0xBE5691EF416BD60C, 0x8DD01FAD907FFC3C, 0xD3515C2831559A83, 0x9D71AC8FADA6C9B5, @@ -105,7 +110,7 @@ export function decimalCount32(value: u32): u32 { let lutbuf = POWERS10.buffer_; let power = LOAD(lutbuf, t); - t -= (value < power); + t -= u32(value < power); return t + 1; } else { if (value < 100000) { @@ -135,7 +140,7 @@ export function decimalCount64(value: u64): u32 { let lutbuf = POWERS10.buffer_; let power = LOAD(lutbuf, t - 10); - t -= (value < 10000000000 * power); + t -= u32(value < 10000000000 * power); return t + 1; } else { if (value < 1000000000000000) { diff --git a/std/assembly/util/sort.ts b/std/assembly/util/sort.ts index 6604972d8d..528c9864fc 100644 --- a/std/assembly/util/sort.ts +++ b/std/assembly/util/sort.ts @@ -1,60 +1,50 @@ import { compareImpl } from "./string"; // @ts-ignore: decorator -@inline export function COMPARATOR(): (a: T, b: T) => i32 { +@inline +export function COMPARATOR(): (a: T, b: T) => i32 { if (isInteger()) { if (isSigned() && sizeof() <= 4) { - // @ts-ignore: type - return (a: T, b: T): i32 => ((a - b)); + return (a: T, b: T): i32 => (i32(a) - i32(b)); } else { - // @ts-ignore: type - return (a: T, b: T): i32 => ((a > b) - (a < b)); + return (a: T, b: T): i32 => (i32(a > b) - i32(a < b)); } } else if (isFloat()) { if (sizeof() == 4) { return (a: T, b: T): i32 => { - // @ts-ignore: type - var ia = reinterpret(a); - // @ts-ignore: type - var ib = reinterpret(b); + var ia = reinterpret(f32(a)); + var ib = reinterpret(f32(b)); ia ^= (ia >> 31) >>> 1; ib ^= (ib >> 31) >>> 1; - // @ts-ignore: type - return (ia > ib) - (ia < ib); + return i32(ia > ib) - i32(ia < ib); }; } else { return (a: T, b: T): i32 => { - // @ts-ignore: type - var ia = reinterpret(a); - // @ts-ignore: type - var ib = reinterpret(b); + var ia = reinterpret(f64(a)); + var ib = reinterpret(f64(b)); ia ^= (ia >> 63) >>> 1; ib ^= (ib >> 63) >>> 1; - // @ts-ignore: type - return (ia > ib) - (ia < ib); + return i32(ia > ib) - i32(ia < ib); }; } } else if (isString()) { return (a: T, b: T): i32 => { if (a === b || a === null || b === null) return 0; - // @ts-ignore: type - var alen = (a).length; - // @ts-ignore: type - var blen = (b).length; + var alen = changetype(a).length; + var blen = changetype(b).length; if (!alen && !blen) return 0; if (!alen) return -1; if (!blen) return 1; - // @ts-ignore: type - return compareImpl(a, 0, b, 0, min(alen, blen)); + return compareImpl(changetype(a), 0, changetype(b), 0, min(alen, blen)); }; } else { - // @ts-ignore: type - return (a: T, b: T): i32 => ((a > b) - (a < b)); + return (a: T, b: T): i32 => (i32(a > b) - i32(a < b)); } } // @ts-ignore: decorator -@inline export function SORT( +@inline +export function SORT( dataStart: usize, length: i32, comparator: (a: T, b: T) => i32 diff --git a/std/assembly/util/string.ts b/std/assembly/util/string.ts index 49579ef64f..e9d3a2d7db 100644 --- a/std/assembly/util/string.ts +++ b/std/assembly/util/string.ts @@ -9,7 +9,8 @@ export function compareImpl(str1: string, index1: usize, str2: string, index2: u } // @ts-ignore: decorator -@inline export const enum CharCode { +@inline +export const enum CharCode { PLUS = 0x2B, MINUS = 0x2D, DOT = 0x2E, @@ -58,7 +59,7 @@ export function isWhiteSpaceOrLineTerminator(c: u16): bool { /** Parses a string to an integer (usually), using the specified radix. */ export function parse(str: string, radix: i32 = 0): T { var len: i32 = str.length; - // @ts-ignore: type + // @ts-ignore: cast if (!len) return NaN; var ptr = changetype(str) /* + HEAD -> offset */; @@ -67,13 +68,13 @@ export function parse(str: string, radix: i32 = 0): T { // determine sign var sign: T; if (code == CharCode.MINUS) { - // @ts-ignore: type + // @ts-ignore: cast if (!--len) return NaN; code = load(ptr += 2); // @ts-ignore: type sign = -1; } else if (code == CharCode.PLUS) { - // @ts-ignore: type + // @ts-ignore: cast if (!--len) return NaN; code = load(ptr += 2); // @ts-ignore: type From 3b8c2331f4f97f0d9865cfb3a2f5a2c47a75ada5 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 14 Mar 2019 07:45:59 +0100 Subject: [PATCH 031/119] symbols --- src/resolver.ts | 13 + std/assembly/index.d.ts | 2 +- std/assembly/map.ts | 4 +- std/assembly/runtime.ts | 4 +- std/assembly/symbol.ts | 122 +++-- tests/compiler/std/runtime.optimized.wat | 140 +++--- tests/compiler/std/runtime.untouched.wat | 178 +++---- tests/compiler/std/symbol.optimized.wat | 534 ++++++++++---------- tests/compiler/std/symbol.untouched.wat | 603 +++++++++++------------ 9 files changed, 798 insertions(+), 802 deletions(-) diff --git a/src/resolver.ts b/src/resolver.ts index 43f8ba37b1..f32b815559 100644 --- a/src/resolver.ts +++ b/src/resolver.ts @@ -629,6 +629,18 @@ export class Resolver extends DiagnosticEmitter { } break; } + case ElementKind.FUNCTION_PROTOTYPE: { // function Symbol() + type Symbol = _Symbol + let shadowType = target.shadowType; + if (shadowType) { + if (!shadowType.is(CommonFlags.RESOLVED)) { + let resolvedType = this.resolveType(shadowType.typeNode, shadowType.parent, null, reportMode); + if (resolvedType) shadowType.setType(resolvedType); + } + let classReference = shadowType.type.classReference; + if (classReference) target = classReference.prototype; + break; + } + } } // Look up the member within @@ -672,6 +684,7 @@ export class Resolver extends DiagnosticEmitter { break; } } + this.error( DiagnosticCode.Property_0_does_not_exist_on_type_1, propertyAccess.property.range, propertyName, target.internalName diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index 2544d66a43..a3786559bf 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -1023,7 +1023,7 @@ declare class ArrayBuffer { /** Returns true if value is one of the ArrayBuffer views, such as typed array or a DataView **/ static isView(value: T): bool; /** Constructs a new array buffer of the given length in bytes. */ - constructor(length: i32, unsafe?: bool); + constructor(length: i32); /** Returns a copy of this array buffer's bytes from begin, inclusive, up to end, exclusive. */ slice(begin?: i32, end?: i32): ArrayBuffer; /** Returns a string representation of ArrayBuffer. */ diff --git a/std/assembly/map.ts b/std/assembly/map.ts index 7f4e8c44ad..1402ecfcc8 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -72,7 +72,7 @@ export class Map { this.buckets = new ArrayBuffer(bucketsSize); this.bucketsMask = INITIAL_CAPACITY - 1; const entriesSize = INITIAL_CAPACITY * ENTRY_SIZE(); - this.entries = new ArrayBuffer(entriesSize, true); + this.entries = new ArrayBuffer(entriesSize); this.entriesCapacity = INITIAL_CAPACITY; this.entriesOffset = 0; this.entriesCount = 0; @@ -147,7 +147,7 @@ export class Map { var newBucketsCapacity = (newBucketsMask + 1); var newBuckets = new ArrayBuffer(newBucketsCapacity * BUCKET_SIZE); var newEntriesCapacity = (newBucketsCapacity * FILL_FACTOR); - var newEntries = new ArrayBuffer(newEntriesCapacity * ENTRY_SIZE(), true); + var newEntries = new ArrayBuffer(newEntriesCapacity * ENTRY_SIZE()); // copy old entries to new entries var oldPtr = changetype(this.entries); diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 8c3ab15ec5..ddce43709a 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -12,8 +12,8 @@ export namespace runtime { // @ts-ignore: decorator @lazy @inline static readonly SIZE: usize = gc.implemented - ? (offsetof
( ) + AL_MASK) & ~AL_MASK // full header if GC is present - : (offsetof
("gc1") + AL_MASK) & ~AL_MASK; // half header if GC is absent + ? (offsetof( ) + AL_MASK) & ~AL_MASK // full header if GC is present + : (offsetof("gc1") + AL_MASK) & ~AL_MASK; // half header if GC is absent /** Magic value used to validate runtime headers. */ // @ts-ignore: decorator diff --git a/std/assembly/symbol.ts b/std/assembly/symbol.ts index ed5eb76644..0512423108 100644 --- a/std/assembly/symbol.ts +++ b/std/assembly/symbol.ts @@ -1,12 +1,83 @@ import { Map } from "./map"; -@lazy var stringToId: Map; -@lazy var idToString: Map; -@lazy var nextId: usize = 12; // Symbol.unscopables + 1 +// @ts-ignore: decorator +@lazy +var stringToId: Map; + +// @ts-ignore: decorator +@lazy +var idToString: Map; + +// @ts-ignore: decorator +@lazy +var nextId: usize = 12; // Symbol.unscopables + 1 + +@unmanaged abstract class _Symbol { + + // @ts-ignore: decorator + @lazy + static readonly hasInstance: symbol = changetype(1); + + // @ts-ignore: decorator + @lazy + static readonly isConcatSpreadable: symbol = changetype(2); + + // @ts-ignore: decorator + @lazy + static readonly isRegExp: symbol = changetype(3); + + // @ts-ignore: decorator + @lazy + static readonly iterator: symbol = changetype(3); + + // @ts-ignore: decorator + @lazy + static readonly match: symbol = changetype(4); + + // @ts-ignore: decorator + @lazy + static readonly replace: symbol = changetype(5); + + // @ts-ignore: decorator + @lazy + static readonly search: symbol = changetype(6); + + // @ts-ignore: decorator + @lazy + static readonly species: symbol = changetype(7); + + // @ts-ignore: decorator + @lazy + static readonly split: symbol = changetype(8); + + // @ts-ignore: decorator + @lazy + static readonly toPrimitive: symbol = changetype(9); + + // @ts-ignore: decorator + @lazy + static readonly toStringTag: symbol = changetype(10); + + // @ts-ignore: decorator + @lazy + static readonly unscopables: symbol = changetype(11); + + static for(key: string): symbol { + if (!stringToId) { stringToId = new Map(); idToString = new Map(); } + else if (stringToId.has(key)) return changetype(stringToId.get(key)); + var id = nextId++; + if (!id) unreachable(); // out of ids + stringToId.set(key, id); + idToString.set(id, key); + return changetype(id); + } + + static keyFor(sym: symbol): string | null { + return idToString !== null && idToString.has(changetype(sym)) + ? idToString.get(changetype(sym)) + : null; + } -@unmanaged -// @ts-ignore: nolib -export class symbol { toString(): string { var id = changetype(this); var str = ""; @@ -37,40 +108,7 @@ export function Symbol(description: string | null = null): symbol { return changetype(id); } -export namespace Symbol { - - // well-known symbols - @lazy export const hasInstance = changetype(1); - @lazy export const isConcatSpreadable = changetype(2); - @lazy export const isRegExp = changetype(3); - @lazy export const iterator = changetype(3); - @lazy export const match = changetype(4); - @lazy export const replace = changetype(5); - @lazy export const search = changetype(6); - @lazy export const species = changetype(7); - @lazy export const split = changetype(8); - @lazy export const toPrimitive = changetype(9); - @lazy export const toStringTag = changetype(10); - @lazy export const unscopables = changetype(11); - - // FIXME - - /* tslint:disable */// not valid TS - // @ts-ignore: identifier - export function for(key: string): symbol { - if (!stringToId) { stringToId = new Map(); idToString = new Map(); } - else if (stringToId.has(key)) return changetype(stringToId.get(key)); - var id = nextId++; - if (!id) unreachable(); // out of ids - stringToId.set(key, id); - idToString.set(id, key); - return changetype(id); - } - /* tslint:enable */ +export type Symbol = _Symbol; - export function keyFor(sym: symbol): string | null { - return idToString !== null && idToString.has(changetype(sym)) - ? idToString.get(changetype(sym)) - : null; - } -} +// @ts-ignore: nolib +export type symbol = _Symbol; diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 95f0f5e01f..5c669541c5 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -42,7 +42,7 @@ if i32.const 0 i32.const 16 - i32.const 132 + i32.const 130 i32.const 4 call $~lib/env/abort unreachable @@ -62,7 +62,7 @@ if i32.const 0 i32.const 16 - i32.const 155 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -73,7 +73,7 @@ if i32.const 0 i32.const 16 - i32.const 156 + i32.const 154 i32.const 4 call $~lib/env/abort unreachable @@ -99,7 +99,7 @@ if i32.const 0 i32.const 16 - i32.const 77 + i32.const 76 i32.const 4 call $~lib/env/abort unreachable @@ -117,7 +117,7 @@ if i32.const 0 i32.const 16 - i32.const 78 + i32.const 77 i32.const 11 call $~lib/env/abort unreachable @@ -130,7 +130,7 @@ if i32.const 0 i32.const 16 - i32.const 416 + i32.const 414 i32.const 2 call $~lib/env/abort unreachable @@ -147,7 +147,7 @@ if i32.const 0 i32.const 16 - i32.const 146 + i32.const 144 i32.const 4 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 147 + i32.const 145 i32.const 4 call $~lib/env/abort unreachable @@ -181,7 +181,7 @@ if i32.const 0 i32.const 16 - i32.const 126 + i32.const 124 i32.const 4 call $~lib/env/abort unreachable @@ -207,7 +207,7 @@ if i32.const 0 i32.const 16 - i32.const 246 + i32.const 244 i32.const 4 call $~lib/env/abort unreachable @@ -230,7 +230,7 @@ if i32.const 0 i32.const 16 - i32.const 248 + i32.const 246 i32.const 4 call $~lib/env/abort unreachable @@ -331,7 +331,7 @@ if i32.const 0 i32.const 16 - i32.const 69 + i32.const 68 i32.const 4 call $~lib/env/abort unreachable @@ -345,7 +345,7 @@ if i32.const 0 i32.const 16 - i32.const 70 + i32.const 69 i32.const 11 call $~lib/env/abort unreachable @@ -361,7 +361,7 @@ if i32.const 0 i32.const 16 - i32.const 322 + i32.const 320 i32.const 4 call $~lib/env/abort unreachable @@ -373,7 +373,7 @@ if i32.const 0 i32.const 16 - i32.const 323 + i32.const 321 i32.const 4 call $~lib/env/abort unreachable @@ -386,7 +386,7 @@ if i32.const 0 i32.const 16 - i32.const 324 + i32.const 322 i32.const 4 call $~lib/env/abort unreachable @@ -408,7 +408,7 @@ if i32.const 0 i32.const 16 - i32.const 177 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable @@ -422,7 +422,7 @@ if i32.const 0 i32.const 16 - i32.const 179 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -446,7 +446,7 @@ if i32.const 0 i32.const 16 - i32.const 181 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -458,7 +458,7 @@ if i32.const 0 i32.const 16 - i32.const 185 + i32.const 183 i32.const 23 call $~lib/env/abort unreachable @@ -500,7 +500,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 197 i32.const 24 call $~lib/env/abort unreachable @@ -514,7 +514,7 @@ if i32.const 0 i32.const 16 - i32.const 201 + i32.const 199 i32.const 6 call $~lib/env/abort unreachable @@ -563,7 +563,7 @@ if i32.const 0 i32.const 16 - i32.const 214 + i32.const 212 i32.const 4 call $~lib/env/abort unreachable @@ -642,7 +642,7 @@ if i32.const 0 i32.const 16 - i32.const 365 + i32.const 363 i32.const 4 call $~lib/env/abort unreachable @@ -653,7 +653,7 @@ if i32.const 0 i32.const 16 - i32.const 366 + i32.const 364 i32.const 4 call $~lib/env/abort unreachable @@ -664,7 +664,7 @@ if i32.const 0 i32.const 16 - i32.const 367 + i32.const 365 i32.const 4 call $~lib/env/abort unreachable @@ -681,7 +681,7 @@ if i32.const 0 i32.const 16 - i32.const 372 + i32.const 370 i32.const 6 call $~lib/env/abort unreachable @@ -709,7 +709,7 @@ if i32.const 0 i32.const 16 - i32.const 381 + i32.const 379 i32.const 6 call $~lib/env/abort unreachable @@ -762,7 +762,7 @@ if i32.const 0 i32.const 16 - i32.const 410 + i32.const 408 i32.const 2 call $~lib/env/abort unreachable @@ -787,7 +787,7 @@ if i32.const 0 i32.const 16 - i32.const 284 + i32.const 282 i32.const 4 call $~lib/env/abort unreachable @@ -867,7 +867,7 @@ if i32.const 0 i32.const 16 - i32.const 311 + i32.const 309 i32.const 16 call $~lib/env/abort unreachable @@ -895,7 +895,7 @@ if i32.const 0 i32.const 16 - i32.const 336 + i32.const 334 i32.const 4 call $~lib/env/abort unreachable @@ -915,7 +915,7 @@ if i32.const 0 i32.const 16 - i32.const 337 + i32.const 335 i32.const 4 call $~lib/env/abort unreachable @@ -926,7 +926,7 @@ if i32.const 0 i32.const 16 - i32.const 338 + i32.const 336 i32.const 4 call $~lib/env/abort unreachable @@ -978,7 +978,7 @@ if i32.const 0 i32.const 16 - i32.const 356 + i32.const 354 i32.const 25 call $~lib/env/abort unreachable @@ -1143,7 +1143,7 @@ else i32.const 0 i32.const 16 - i32.const 465 + i32.const 467 i32.const 12 call $~lib/env/abort unreachable @@ -1160,7 +1160,7 @@ if i32.const 0 i32.const 16 - i32.const 468 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable @@ -1170,7 +1170,7 @@ local.get $0 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/ALLOC_RAW (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocRaw (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -1421,10 +1421,10 @@ local.get $1 call $~lib/util/memory/memset ) - (func $~lib/runtime/ALLOC (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.alloc (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ALLOC_RAW + call $~lib/runtime/runtime.allocRaw local.tee $1 local.get $0 call $~lib/memory/memory.fill @@ -2545,7 +2545,7 @@ if i32.const 0 i32.const 16 - i32.const 479 + i32.const 483 i32.const 6 call $~lib/env/abort unreachable @@ -2563,7 +2563,7 @@ end end ) - (func $~lib/runtime/REALLOC (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.realloc (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2637,8 +2637,8 @@ if i32.const 0 i32.const 184 - i32.const 83 - i32.const 8 + i32.const 96 + i32.const 10 call $~lib/env/abort unreachable end @@ -2667,15 +2667,15 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/unref (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.unref (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 232 i32.lt_u if i32.const 0 i32.const 184 - i32.const 104 - i32.const 2 + i32.const 117 + i32.const 4 call $~lib/env/abort unreachable end @@ -2689,8 +2689,8 @@ if i32.const 0 i32.const 184 - i32.const 106 - i32.const 2 + i32.const 119 + i32.const 4 call $~lib/env/abort unreachable end @@ -2736,7 +2736,7 @@ else i32.const 0 i32.const 72 - i32.const 36 + i32.const 30 i32.const 2 call $~lib/env/abort unreachable @@ -2836,7 +2836,7 @@ f64.const 0 call $~lib/env/trace i32.const 1 - call $~lib/runtime/ALLOC + call $~lib/runtime/runtime.alloc global.set $std/runtime/ref1 global.get $std/runtime/ref1 i32.const 16 @@ -2849,7 +2849,7 @@ if i32.const 0 i32.const 72 - i32.const 51 + i32.const 45 i32.const 0 call $~lib/env/abort unreachable @@ -2861,7 +2861,7 @@ if i32.const 0 i32.const 72 - i32.const 52 + i32.const 46 i32.const 0 call $~lib/env/abort unreachable @@ -2870,12 +2870,12 @@ local.tee $0 local.get $0 global.get $std/runtime/barrier1 - call $~lib/runtime/REALLOC + call $~lib/runtime/runtime.realloc i32.ne if i32.const 0 i32.const 72 - i32.const 53 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -2887,14 +2887,14 @@ if i32.const 0 i32.const 72 - i32.const 54 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref1 global.get $std/runtime/barrier2 - call $~lib/runtime/REALLOC + call $~lib/runtime/runtime.realloc global.set $std/runtime/ref2 global.get $std/runtime/ref1 global.get $std/runtime/ref2 @@ -2902,7 +2902,7 @@ if i32.const 0 i32.const 72 - i32.const 56 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -2918,16 +2918,16 @@ if i32.const 0 i32.const 72 - i32.const 58 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref2 - call $~lib/runtime/unref + call $~lib/runtime/runtime.unref call $~lib/allocator/tlsf/__memory_free global.get $std/runtime/barrier2 - call $~lib/runtime/ALLOC + call $~lib/runtime/runtime.alloc global.set $std/runtime/ref3 global.get $std/runtime/ref1 global.get $std/runtime/ref3 @@ -2935,17 +2935,17 @@ if i32.const 0 i32.const 72 - i32.const 61 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/barrier1 - call $~lib/runtime/ALLOC + call $~lib/runtime/runtime.alloc global.set $std/runtime/ref4 global.get $std/runtime/ref4 local.tee $0 - call $~lib/runtime/unref + call $~lib/runtime/runtime.unref i32.const 2 i32.store local.get $0 @@ -2956,7 +2956,7 @@ if i32.const 0 i32.const 72 - i32.const 65 + i32.const 59 i32.const 0 call $~lib/env/abort unreachable @@ -2972,7 +2972,7 @@ if i32.const 0 i32.const 72 - i32.const 67 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -2984,13 +2984,13 @@ if i32.const 0 i32.const 72 - i32.const 68 + i32.const 62 i32.const 0 call $~lib/env/abort unreachable end i32.const 10 - call $~lib/runtime/ALLOC + call $~lib/runtime/runtime.alloc global.set $std/runtime/ref5 global.get $std/runtime/ref5 i32.const 16 @@ -3001,7 +3001,7 @@ if i32.const 0 i32.const 72 - i32.const 71 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable @@ -3017,7 +3017,7 @@ if i32.const 0 i32.const 72 - i32.const 72 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index b819238130..b22c518a26 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -37,6 +37,8 @@ (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $std/runtime/register_ref (mut i32) (i32.const 0)) + (global $std/runtime/link_ref (mut i32) (i32.const 0)) + (global $std/runtime/link_parentRef (mut i32) (i32.const 0)) (global $~lib/gc/gc.implemented i32 (i32.const 1)) (global $std/runtime/barrier1 (mut i32) (i32.const 0)) (global $std/runtime/barrier2 (mut i32) (i32.const 0)) @@ -63,13 +65,13 @@ if i32.const 0 i32.const 16 - i32.const 110 + i32.const 109 i32.const 0 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/ADJUST (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -112,7 +114,7 @@ if i32.const 0 i32.const 16 - i32.const 132 + i32.const 130 i32.const 4 call $~lib/env/abort unreachable @@ -133,7 +135,7 @@ if i32.const 0 i32.const 16 - i32.const 155 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -145,7 +147,7 @@ if i32.const 0 i32.const 16 - i32.const 156 + i32.const 154 i32.const 4 call $~lib/env/abort unreachable @@ -178,7 +180,7 @@ if i32.const 0 i32.const 16 - i32.const 77 + i32.const 76 i32.const 4 call $~lib/env/abort unreachable @@ -198,7 +200,7 @@ if (result i32) i32.const 0 i32.const 16 - i32.const 78 + i32.const 77 i32.const 11 call $~lib/env/abort unreachable @@ -214,7 +216,7 @@ if i32.const 0 i32.const 16 - i32.const 416 + i32.const 414 i32.const 2 call $~lib/env/abort unreachable @@ -232,7 +234,7 @@ if i32.const 0 i32.const 16 - i32.const 146 + i32.const 144 i32.const 4 call $~lib/env/abort unreachable @@ -244,7 +246,7 @@ if i32.const 0 i32.const 16 - i32.const 147 + i32.const 145 i32.const 4 call $~lib/env/abort unreachable @@ -268,7 +270,7 @@ if i32.const 0 i32.const 16 - i32.const 126 + i32.const 124 i32.const 4 call $~lib/env/abort unreachable @@ -298,7 +300,7 @@ if i32.const 0 i32.const 16 - i32.const 246 + i32.const 244 i32.const 4 call $~lib/env/abort unreachable @@ -324,7 +326,7 @@ if i32.const 0 i32.const 16 - i32.const 248 + i32.const 246 i32.const 4 call $~lib/env/abort unreachable @@ -435,7 +437,7 @@ if i32.const 0 i32.const 16 - i32.const 69 + i32.const 68 i32.const 4 call $~lib/env/abort unreachable @@ -449,7 +451,7 @@ if (result i32) i32.const 0 i32.const 16 - i32.const 70 + i32.const 69 i32.const 11 call $~lib/env/abort unreachable @@ -466,7 +468,7 @@ if i32.const 0 i32.const 16 - i32.const 322 + i32.const 320 i32.const 4 call $~lib/env/abort unreachable @@ -479,7 +481,7 @@ if i32.const 0 i32.const 16 - i32.const 323 + i32.const 321 i32.const 4 call $~lib/env/abort unreachable @@ -492,7 +494,7 @@ if i32.const 0 i32.const 16 - i32.const 324 + i32.const 322 i32.const 4 call $~lib/env/abort unreachable @@ -518,7 +520,7 @@ if i32.const 0 i32.const 16 - i32.const 177 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable @@ -533,7 +535,7 @@ if i32.const 0 i32.const 16 - i32.const 179 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -559,7 +561,7 @@ if i32.const 0 i32.const 16 - i32.const 181 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -571,7 +573,7 @@ if (result i32) i32.const 0 i32.const 16 - i32.const 185 + i32.const 183 i32.const 23 call $~lib/env/abort unreachable @@ -619,7 +621,7 @@ if (result i32) i32.const 0 i32.const 16 - i32.const 199 + i32.const 197 i32.const 24 call $~lib/env/abort unreachable @@ -637,7 +639,7 @@ if i32.const 0 i32.const 16 - i32.const 201 + i32.const 199 i32.const 6 call $~lib/env/abort unreachable @@ -692,7 +694,7 @@ if i32.const 0 i32.const 16 - i32.const 214 + i32.const 212 i32.const 4 call $~lib/env/abort unreachable @@ -783,7 +785,7 @@ if i32.const 0 i32.const 16 - i32.const 365 + i32.const 363 i32.const 4 call $~lib/env/abort unreachable @@ -796,7 +798,7 @@ if i32.const 0 i32.const 16 - i32.const 366 + i32.const 364 i32.const 4 call $~lib/env/abort unreachable @@ -809,7 +811,7 @@ if i32.const 0 i32.const 16 - i32.const 367 + i32.const 365 i32.const 4 call $~lib/env/abort unreachable @@ -830,7 +832,7 @@ if i32.const 0 i32.const 16 - i32.const 372 + i32.const 370 i32.const 6 call $~lib/env/abort unreachable @@ -859,7 +861,7 @@ if i32.const 0 i32.const 16 - i32.const 381 + i32.const 379 i32.const 6 call $~lib/env/abort unreachable @@ -930,7 +932,7 @@ if i32.const 0 i32.const 16 - i32.const 410 + i32.const 408 i32.const 2 call $~lib/env/abort unreachable @@ -946,7 +948,7 @@ if i32.const 0 i32.const 16 - i32.const 410 + i32.const 408 i32.const 2 call $~lib/env/abort unreachable @@ -976,7 +978,7 @@ if i32.const 0 i32.const 16 - i32.const 284 + i32.const 282 i32.const 4 call $~lib/env/abort unreachable @@ -1072,7 +1074,7 @@ else i32.const 0 i32.const 16 - i32.const 311 + i32.const 309 i32.const 16 call $~lib/env/abort unreachable @@ -1109,7 +1111,7 @@ if i32.const 0 i32.const 16 - i32.const 336 + i32.const 334 i32.const 4 call $~lib/env/abort unreachable @@ -1129,7 +1131,7 @@ if i32.const 0 i32.const 16 - i32.const 337 + i32.const 335 i32.const 4 call $~lib/env/abort unreachable @@ -1142,7 +1144,7 @@ if i32.const 0 i32.const 16 - i32.const 338 + i32.const 336 i32.const 4 call $~lib/env/abort unreachable @@ -1202,7 +1204,7 @@ if (result i32) i32.const 0 i32.const 16 - i32.const 356 + i32.const 354 i32.const 25 call $~lib/env/abort unreachable @@ -1428,7 +1430,7 @@ if (result i32) i32.const 0 i32.const 16 - i32.const 465 + i32.const 467 i32.const 12 call $~lib/env/abort unreachable @@ -1449,7 +1451,7 @@ if i32.const 0 i32.const 16 - i32.const 468 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable @@ -1464,10 +1466,10 @@ call $~lib/allocator/tlsf/__memory_allocate return ) - (func $~lib/runtime/ALLOC_RAW (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocRaw (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUST + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -1746,10 +1748,10 @@ local.get $2 call $~lib/util/memory/memset ) - (func $~lib/runtime/ALLOC (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.alloc (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ALLOC_RAW + call $~lib/runtime/runtime.allocRaw local.set $1 local.get $1 i32.const 0 @@ -3216,7 +3218,7 @@ if i32.const 0 i32.const 16 - i32.const 479 + i32.const 483 i32.const 6 call $~lib/env/abort unreachable @@ -3246,7 +3248,7 @@ local.get $0 call $std/runtime/__gc_register ) - (func $~lib/runtime/REALLOC (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.realloc (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3264,10 +3266,10 @@ i32.lt_u if local.get $1 - call $~lib/runtime/ADJUST + call $~lib/runtime/runtime.adjust local.set $4 local.get $3 - call $~lib/runtime/ADJUST + call $~lib/runtime/runtime.adjust i32.const 0 local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3316,8 +3318,8 @@ if i32.const 0 i32.const 184 - i32.const 83 - i32.const 8 + i32.const 96 + i32.const 10 call $~lib/env/abort unreachable end @@ -3349,7 +3351,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/unref (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.unref (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3360,8 +3362,8 @@ if i32.const 0 i32.const 184 - i32.const 104 - i32.const 2 + i32.const 117 + i32.const 4 call $~lib/env/abort unreachable end @@ -3377,16 +3379,16 @@ if i32.const 0 i32.const 184 - i32.const 106 - i32.const 2 + i32.const 119 + i32.const 4 call $~lib/env/abort unreachable end local.get $1 ) - (func $~lib/runtime/FREE (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.free (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $~lib/runtime/unref + call $~lib/runtime/runtime.unref call $~lib/memory/memory.free ) (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -3413,20 +3415,20 @@ if i32.const 0 i32.const 72 - i32.const 28 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable end i32.const 0 - call $~lib/runtime/ADJUST + call $~lib/runtime/runtime.adjust i32.const 0 i32.gt_u i32.eqz if i32.const 0 i32.const 72 - i32.const 34 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -3441,13 +3443,13 @@ i32.eqz br_if $break|0 local.get $0 - call $~lib/runtime/ADJUST + call $~lib/runtime/runtime.adjust call $std/runtime/isPowerOf2 i32.eqz if i32.const 0 i32.const 72 - i32.const 36 + i32.const 30 i32.const 2 call $~lib/env/abort unreachable @@ -3462,7 +3464,7 @@ unreachable end i32.const 0 - call $~lib/runtime/ADJUST + call $~lib/runtime/runtime.adjust global.set $std/runtime/barrier1 global.get $std/runtime/barrier1 i32.const 1 @@ -3473,9 +3475,9 @@ global.get $std/runtime/barrier2 i32.const 1 i32.add - call $~lib/runtime/ADJUST + call $~lib/runtime/runtime.adjust global.get $std/runtime/barrier2 - call $~lib/runtime/ADJUST + call $~lib/runtime/runtime.adjust i32.eq if global.get $std/runtime/barrier2 @@ -3495,9 +3497,9 @@ global.get $std/runtime/barrier3 i32.const 1 i32.add - call $~lib/runtime/ADJUST + call $~lib/runtime/runtime.adjust global.get $std/runtime/barrier3 - call $~lib/runtime/ADJUST + call $~lib/runtime/runtime.adjust i32.eq if global.get $std/runtime/barrier3 @@ -3536,7 +3538,7 @@ f64.const 0 call $~lib/env/trace i32.const 1 - call $~lib/runtime/ALLOC + call $~lib/runtime/runtime.alloc global.set $std/runtime/ref1 global.get $std/runtime/ref1 i32.const 16 @@ -3550,7 +3552,7 @@ if i32.const 0 i32.const 72 - i32.const 51 + i32.const 45 i32.const 0 call $~lib/env/abort unreachable @@ -3563,7 +3565,7 @@ if i32.const 0 i32.const 72 - i32.const 52 + i32.const 46 i32.const 0 call $~lib/env/abort unreachable @@ -3571,13 +3573,13 @@ global.get $std/runtime/ref1 global.get $std/runtime/ref1 global.get $std/runtime/barrier1 - call $~lib/runtime/REALLOC + call $~lib/runtime/runtime.realloc i32.eq i32.eqz if i32.const 0 i32.const 72 - i32.const 53 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -3590,14 +3592,14 @@ if i32.const 0 i32.const 72 - i32.const 54 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref1 global.get $std/runtime/barrier2 - call $~lib/runtime/REALLOC + call $~lib/runtime/runtime.realloc global.set $std/runtime/ref2 global.get $std/runtime/ref1 global.get $std/runtime/ref2 @@ -3606,7 +3608,7 @@ if i32.const 0 i32.const 72 - i32.const 56 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -3623,15 +3625,15 @@ if i32.const 0 i32.const 72 - i32.const 58 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref2 - call $~lib/runtime/FREE + call $~lib/runtime/runtime.free global.get $std/runtime/barrier2 - call $~lib/runtime/ALLOC + call $~lib/runtime/runtime.alloc global.set $std/runtime/ref3 global.get $std/runtime/ref1 global.get $std/runtime/ref3 @@ -3640,19 +3642,19 @@ if i32.const 0 i32.const 72 - i32.const 61 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/barrier1 - call $~lib/runtime/ALLOC + call $~lib/runtime/runtime.alloc global.set $std/runtime/ref4 - block $~lib/runtime/REGISTER|inlined.0 (result i32) + block $~lib/runtime/runtime.register|inlined.0 (result i32) global.get $std/runtime/ref4 local.set $0 local.get $0 - call $~lib/runtime/unref + call $~lib/runtime/runtime.unref i32.const 2 i32.store local.get $0 @@ -3667,7 +3669,7 @@ if i32.const 0 i32.const 72 - i32.const 65 + i32.const 59 i32.const 0 call $~lib/env/abort unreachable @@ -3684,7 +3686,7 @@ if i32.const 0 i32.const 72 - i32.const 67 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -3697,13 +3699,13 @@ if i32.const 0 i32.const 72 - i32.const 68 + i32.const 62 i32.const 0 call $~lib/env/abort unreachable end i32.const 10 - call $~lib/runtime/ALLOC + call $~lib/runtime/runtime.alloc global.set $std/runtime/ref5 global.get $std/runtime/ref5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength @@ -3713,7 +3715,7 @@ if i32.const 0 i32.const 72 - i32.const 71 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable @@ -3726,7 +3728,7 @@ if i32.const 0 i32.const 72 - i32.const 72 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 6f80b62d17..b03c49fe60 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -1,47 +1,47 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\03\00\00\001\002\003") - (data (i32.const 24) "\0d\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s") - (data (i32.const 56) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 104) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 176) "\0b\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e") - (data (i32.const 208) "\12\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e") - (data (i32.const 248) "\08\00\00\00i\00s\00R\00e\00g\00E\00x\00p") - (data (i32.const 272) "\05\00\00\00m\00a\00t\00c\00h") - (data (i32.const 288) "\07\00\00\00r\00e\00p\00l\00a\00c\00e") - (data (i32.const 312) "\06\00\00\00s\00e\00a\00r\00c\00h") - (data (i32.const 328) "\07\00\00\00s\00p\00e\00c\00i\00e\00s") - (data (i32.const 352) "\05\00\00\00s\00p\00l\00i\00t") - (data (i32.const 368) "\0b\00\00\00t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e") - (data (i32.const 400) "\0b\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g") - (data (i32.const 432) "\0b\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s") - (data (i32.const 464) "\07\00\00\00S\00y\00m\00b\00o\00l\00(") - (data (i32.const 488) "\04\00\00\00n\00u\00l\00l") - (data (i32.const 504) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 536) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 592) "\01\00\00\00)") - (data (i32.const 600) "\08\00\00\00S\00y\00m\00b\00o\00l\00(\00)") - (data (i32.const 624) "\0b\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)") - (data (i32.const 656) "\13\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)") - (data (i32.const 704) "\1a\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)") + (data (i32.const 8) "\01\00\00\00\06\00\00\001\002\003") + (data (i32.const 24) "\01\00\00\00\1a\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s") + (data (i32.const 64) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 112) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 152) "\01") + (data (i32.const 160) "\01\00\00\00\16\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e") + (data (i32.const 192) "\01\00\00\00$\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e") + (data (i32.const 240) "\01\00\00\00\10\00\00\00i\00s\00R\00e\00g\00E\00x\00p") + (data (i32.const 264) "\01\00\00\00\n\00\00\00m\00a\00t\00c\00h") + (data (i32.const 288) "\01\00\00\00\0e\00\00\00r\00e\00p\00l\00a\00c\00e") + (data (i32.const 312) "\01\00\00\00\0c\00\00\00s\00e\00a\00r\00c\00h") + (data (i32.const 336) "\01\00\00\00\0e\00\00\00s\00p\00e\00c\00i\00e\00s") + (data (i32.const 360) "\01\00\00\00\n\00\00\00s\00p\00l\00i\00t") + (data (i32.const 384) "\01\00\00\00\16\00\00\00t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e") + (data (i32.const 416) "\01\00\00\00\16\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g") + (data (i32.const 448) "\01\00\00\00\16\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s") + (data (i32.const 480) "\01\00\00\00\0e\00\00\00S\00y\00m\00b\00o\00l\00(") + (data (i32.const 504) "\01\00\00\00\08\00\00\00n\00u\00l\00l") + (data (i32.const 520) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 560) "\01\00\00\00\02\00\00\00)") + (data (i32.const 576) "\01\00\00\00\10\00\00\00S\00y\00m\00b\00o\00l\00(\00)") + (data (i32.const 600) "\01\00\00\00\16\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)") + (data (i32.const 632) "\01\00\00\00&\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)") + (data (i32.const 680) "\01\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/symbol/nextId (mut i32) (i32.const 12)) (global $std/symbol/sym1 (mut i32) (i32.const 0)) (global $std/symbol/sym2 (mut i32) (i32.const 0)) (global $~lib/symbol/stringToId (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/symbol/idToString (mut i32) (i32.const 0)) (global $std/symbol/sym3 (mut i32) (i32.const 0)) (global $std/symbol/sym4 (mut i32) (i32.const 0)) @@ -116,19 +116,8 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocRaw (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 104 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end i32.const 1 i32.const 32 local.get $0 @@ -139,11 +128,16 @@ i32.shl call $~lib/allocator/arena/__memory_allocate local.tee $1 - local.get $0 + i32.const -1520547049 i32.store local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add ) - (func $~lib/internal/memory/memset (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/util/memory/memset (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 i32.eqz @@ -362,37 +356,63 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/runtime/runtime.unref (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 748 + i32.lt_u + if + i32.const 0 + i32.const 120 + i32.const 117 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 8 + i32.sub + local.tee $0 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 120 + i32.const 119 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.const 1073741816 i32.gt_u if i32.const 0 - i32.const 56 - i32.const 47 - i32.const 40 + i32.const 72 + i32.const 24 + i32.const 59 call $~lib/env/abort unreachable end local.get $0 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $2 + call $~lib/runtime/runtime.allocRaw + local.tee $1 + local.get $0 + call $~lib/util/memory/memset local.get $1 - i32.eqz - if - local.get $2 - i32.const 8 - i32.add - local.get $0 - call $~lib/internal/memory/memset - end - local.get $2 + local.tee $0 + call $~lib/runtime/runtime.unref + i32.const 2 + i32.store + local.get $0 ) - (func $~lib/map/Map#clear (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -400,7 +420,6 @@ i32.store offset=4 local.get $0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -413,7 +432,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 6 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/allocator/arena/__memory_allocate @@ -439,50 +458,53 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/internal/hash/hashStr (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hashStr (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const -2128831035 - local.set $2 + local.set $1 local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u i32.const 1 i32.shl local.set $3 loop $repeat|0 - block $break|0 - local.get $1 - local.get $3 - i32.ge_u - br_if $break|0 + local.get $2 + local.get $3 + i32.lt_u + if local.get $0 - local.get $1 - i32.add - i32.load8_u offset=4 local.get $2 + i32.add + i32.load8_u + local.get $1 i32.xor i32.const 16777619 i32.mul - local.set $2 - local.get $1 + local.set $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $repeat|0 end end - local.get $2 + local.get $1 ) - (func $~lib/internal/string/compareUnsafe (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 if (result i32) local.get $0 - i32.load16_u offset=4 + i32.load16_u local.get $1 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $3 i32.eqz @@ -507,7 +529,7 @@ end local.get $3 ) - (func $~lib/string/String.__eq (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.eq (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -519,22 +541,29 @@ local.get $0 i32.eqz local.tee $2 - i32.eqz - if + if (result i32) + local.get $2 + else local.get $1 i32.eqz - local.set $2 end - local.get $2 if i32.const 0 return end local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u i32.ne if i32.const 0 @@ -543,10 +572,10 @@ local.get $0 local.get $1 local.get $2 - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/map/Map#find (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#find (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $0 @@ -556,7 +585,7 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.set $1 loop $continue|0 local.get $1 @@ -570,8 +599,8 @@ if (result i32) local.get $1 i32.load - i32.const 8 - call $~lib/string/String.__eq + i32.const 16 + call $~lib/string/String.eq else local.get $0 end @@ -589,7 +618,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -600,13 +629,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -614,13 +642,10 @@ local.tee $6 i32.const 12 i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -628,9 +653,7 @@ i32.mul i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -654,19 +677,19 @@ local.get $3 local.get $2 i32.load - call $~lib/internal/hash/hashStr + call $~lib/util/hash/hashStr local.get $1 i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=8 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 12 i32.add @@ -680,13 +703,13 @@ end end local.get $0 - local.get $4 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -696,13 +719,13 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 - i32.const 8 - call $~lib/internal/hash/hashStr + i32.const 16 + call $~lib/util/hash/hashStr local.tee $4 call $~lib/map/Map#find local.tee $2 @@ -750,15 +773,13 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $3 i32.const 12 i32.mul + local.get $2 i32.add local.tee $2 - i32.const 8 + i32.const 16 i32.store local.get $2 local.get $1 @@ -780,14 +801,14 @@ i32.shl i32.add local.tee $3 - i32.load offset=8 + i32.load i32.store offset=8 local.get $3 local.get $2 - i32.store offset=8 + i32.store end ) - (func $~lib/internal/hash/hash32 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -818,7 +839,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -828,7 +849,7 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.set $2 loop $continue|0 local.get $2 @@ -861,7 +882,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -872,13 +893,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -886,13 +906,10 @@ local.tee $6 i32.const 12 i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -900,9 +917,7 @@ i32.mul i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -926,19 +941,19 @@ local.get $3 local.get $2 i32.load - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 local.get $1 i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=8 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 12 i32.add @@ -952,13 +967,13 @@ end end local.get $0 - local.get $4 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -968,20 +983,20 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 local.tee $4 call $~lib/map/Map#find local.tee $2 if local.get $2 - i32.const 8 + i32.const 16 i32.store offset=4 else local.get $0 @@ -1023,18 +1038,16 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $3 i32.const 12 i32.mul + local.get $2 i32.add local.tee $2 local.get $1 i32.store local.get $2 - i32.const 8 + i32.const 16 i32.store offset=4 local.get $0 local.get $0 @@ -1053,25 +1066,25 @@ i32.shl i32.add local.tee $3 - i32.load offset=8 + i32.load i32.store offset=8 local.get $3 local.get $2 - i32.store offset=8 + i32.store end ) - (func $~lib/symbol/Symbol.for (; 17 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/symbol/_Symbol.for (; 18 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) global.get $~lib/symbol/stringToId if global.get $~lib/symbol/stringToId - i32.const 8 - call $~lib/internal/hash/hashStr + i32.const 16 + call $~lib/util/hash/hashStr call $~lib/map/Map#find if global.get $~lib/symbol/stringToId - i32.const 8 - call $~lib/internal/hash/hashStr + i32.const 16 + call $~lib/util/hash/hashStr call $~lib/map/Map#find local.tee $0 if (result i32) @@ -1106,20 +1119,20 @@ call $~lib/map/Map#set local.get $0 ) - (func $~lib/map/Map#has (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $0 if (result i32) @@ -1129,7 +1142,7 @@ unreachable end ) - (func $~lib/symbol/Symbol.keyFor (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.keyFor (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) global.get $~lib/symbol/idToString i32.const 0 @@ -1150,40 +1163,7 @@ i32.const 0 end ) - (func $~lib/internal/string/allocateUnsafe (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 0 - i32.gt_s - local.tee $1 - if - local.get $0 - i32.const 536870910 - i32.le_s - local.set $1 - end - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 536 - i32.const 14 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 1 - i32.shl - i32.const 4 - i32.add - call $~lib/allocator/arena/__memory_allocate - local.tee $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/internal/memory/memcpy (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2080,7 +2060,7 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2109,7 +2089,7 @@ local.get $0 local.get $1 local.get $2 - call $~lib/internal/memory/memcpy + call $~lib/util/memory/memcpy return end local.get $0 @@ -2278,21 +2258,11 @@ end end ) - (func $~lib/internal/string/copyUnsafe (; 24 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - local.get $1 - i32.const 1 - i32.shl + (func $~lib/memory/memory.copy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 - i32.add - i32.const 4 - i32.add + local.get $1 local.get $2 - i32.const 4 - i32.add - local.get $3 - i32.const 1 - i32.shl - call $~lib/internal/memory/memmove + call $~lib/util/memory/memmove ) (func $~lib/string/String#concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -2302,57 +2272,73 @@ i32.eqz if i32.const 0 - i32.const 504 - i32.const 110 + i32.const 528 + i32.const 67 i32.const 4 call $~lib/env/abort unreachable end - local.get $0 - i32.load - local.tee $3 local.get $1 - i32.const 488 + i32.const 512 local.get $1 select local.tee $1 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl local.tee $4 + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $3 i32.add local.tee $2 i32.eqz if - i32.const 168 + i32.const 160 return end local.get $2 - call $~lib/internal/string/allocateUnsafe + call $~lib/runtime/runtime.allocRaw local.tee $2 - i32.const 0 local.get $0 local.get $3 - call $~lib/internal/string/copyUnsafe + call $~lib/memory/memory.copy local.get $2 local.get $3 + i32.add local.get $1 local.get $4 - call $~lib/internal/string/copyUnsafe + call $~lib/memory/memory.copy + local.get $2 + call $~lib/runtime/runtime.unref + i32.const 1 + i32.store local.get $2 ) - (func $~lib/string/String.__concat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.concat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 488 + i32.const 512 local.get $0 select local.get $1 call $~lib/string/String#concat ) - (func $~lib/symbol/symbol#toString (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol#toString (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - i32.const 168 + i32.const 160 local.set $2 - i32.const 464 + i32.const 488 block $break|0 (result i32) block $case11|0 block $case10|0 @@ -2375,10 +2361,10 @@ i32.sub br_table $case1|0 $case2|0 $case3|0 $case4|0 $case5|0 $case6|0 $case7|0 $case8|0 $case9|0 $case10|0 $case11|0 end - i32.const 176 + i32.const 168 br $break|0 end - i32.const 208 + i32.const 200 br $break|0 end i32.const 248 @@ -2387,25 +2373,25 @@ i32.const 272 br $break|0 end - i32.const 288 + i32.const 296 br $break|0 end - i32.const 312 + i32.const 320 br $break|0 end - i32.const 328 + i32.const 344 br $break|0 end - i32.const 352 + i32.const 368 br $break|0 end - i32.const 368 + i32.const 392 br $break|0 end - i32.const 400 + i32.const 424 br $break|0 end - i32.const 432 + i32.const 456 br $break|0 end global.get $~lib/symbol/idToString @@ -2424,19 +2410,15 @@ local.get $1 call $~lib/map/Map#get else - i32.const 168 + i32.const 160 end end - call $~lib/string/String.__concat - i32.const 592 - call $~lib/string/String.__concat + call $~lib/string/String.concat + i32.const 568 + call $~lib/string/String.concat ) (func $start:std/symbol (; 28 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 760 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset global.get $~lib/symbol/nextId local.tee $0 i32.const 1 @@ -2466,37 +2448,41 @@ i32.eq if i32.const 0 - i32.const 24 + i32.const 32 i32.const 6 i32.const 0 call $~lib/env/abort unreachable end - call $~lib/symbol/Symbol.for + i32.const 744 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + call $~lib/symbol/_Symbol.for global.set $std/symbol/sym3 - call $~lib/symbol/Symbol.for + call $~lib/symbol/_Symbol.for global.set $std/symbol/sym4 global.get $std/symbol/sym3 global.get $std/symbol/sym4 i32.ne if i32.const 0 - i32.const 24 + i32.const 32 i32.const 11 i32.const 0 call $~lib/env/abort unreachable end global.get $std/symbol/sym1 - call $~lib/symbol/Symbol.keyFor + call $~lib/symbol/_Symbol.keyFor global.set $std/symbol/key1 global.get $std/symbol/sym2 - call $~lib/symbol/Symbol.keyFor + call $~lib/symbol/_Symbol.keyFor global.set $std/symbol/key2 global.get $std/symbol/key1 if i32.const 0 - i32.const 24 + i32.const 32 i32.const 16 i32.const 0 call $~lib/env/abort @@ -2505,25 +2491,25 @@ global.get $std/symbol/key2 if i32.const 0 - i32.const 24 + i32.const 32 i32.const 17 i32.const 0 call $~lib/env/abort unreachable end global.get $std/symbol/sym3 - call $~lib/symbol/Symbol.keyFor + call $~lib/symbol/_Symbol.keyFor global.set $std/symbol/key3 global.get $std/symbol/sym4 - call $~lib/symbol/Symbol.keyFor + call $~lib/symbol/_Symbol.keyFor global.set $std/symbol/key4 global.get $std/symbol/key3 - i32.const 8 - call $~lib/string/String.__eq + i32.const 16 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 32 i32.const 22 i32.const 0 call $~lib/env/abort @@ -2531,11 +2517,11 @@ end global.get $std/symbol/key3 global.get $std/symbol/key4 - call $~lib/string/String.__eq + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 32 i32.const 23 i32.const 0 call $~lib/env/abort @@ -2552,26 +2538,26 @@ unreachable end local.get $0 - call $~lib/symbol/symbol#toString - i32.const 600 - call $~lib/string/String.__eq + call $~lib/symbol/_Symbol#toString + i32.const 584 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 32 i32.const 25 i32.const 0 call $~lib/env/abort unreachable end global.get $std/symbol/sym3 - call $~lib/symbol/symbol#toString - i32.const 624 - call $~lib/string/String.__eq + call $~lib/symbol/_Symbol#toString + i32.const 608 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 32 i32.const 26 i32.const 0 call $~lib/env/abort @@ -2582,26 +2568,26 @@ i32.const 2 global.set $std/symbol/isConcatSpreadable global.get $std/symbol/hasInstance - call $~lib/symbol/symbol#toString - i32.const 656 - call $~lib/string/String.__eq + call $~lib/symbol/_Symbol#toString + i32.const 640 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 32 i32.const 30 i32.const 0 call $~lib/env/abort unreachable end global.get $std/symbol/isConcatSpreadable - call $~lib/symbol/symbol#toString - i32.const 704 - call $~lib/string/String.__eq + call $~lib/symbol/_Symbol#toString + i32.const 688 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 32 i32.const 31 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 46b0ba6fef..2ba25bb066 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -1,49 +1,49 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param 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$vii (func (param i32 i32))) - (type $FUNCSIG$viiiii (func (param i32 i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\03\00\00\001\002\003\00") - (data (i32.const 24) "\0d\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s\00") - (data (i32.const 56) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 104) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 168) "\00\00\00\00") - (data (i32.const 176) "\0b\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00") - (data (i32.const 208) "\12\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00") - (data (i32.const 248) "\08\00\00\00i\00s\00R\00e\00g\00E\00x\00p\00") - (data (i32.const 272) "\05\00\00\00m\00a\00t\00c\00h\00") - (data (i32.const 288) "\07\00\00\00r\00e\00p\00l\00a\00c\00e\00") - (data (i32.const 312) "\06\00\00\00s\00e\00a\00r\00c\00h\00") - (data (i32.const 328) "\07\00\00\00s\00p\00e\00c\00i\00e\00s\00") - (data (i32.const 352) "\05\00\00\00s\00p\00l\00i\00t\00") - (data (i32.const 368) "\0b\00\00\00t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e\00") - (data (i32.const 400) "\0b\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g\00") - (data (i32.const 432) "\0b\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s\00") - (data (i32.const 464) "\07\00\00\00S\00y\00m\00b\00o\00l\00(\00") - (data (i32.const 488) "\04\00\00\00n\00u\00l\00l\00") - (data (i32.const 504) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 536) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 592) "\01\00\00\00)\00") - (data (i32.const 600) "\08\00\00\00S\00y\00m\00b\00o\00l\00(\00)\00") - (data (i32.const 624) "\0b\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)\00") - (data (i32.const 656) "\13\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)\00") - (data (i32.const 704) "\1a\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)\00") + (data (i32.const 8) "\01\00\00\00\06\00\00\001\002\003\00") + (data (i32.const 24) "\01\00\00\00\1a\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s\00") + (data (i32.const 64) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 112) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 152) "\01\00\00\00\00\00\00\00") + (data (i32.const 160) "\01\00\00\00\16\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00") + (data (i32.const 192) "\01\00\00\00$\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00") + (data (i32.const 240) "\01\00\00\00\10\00\00\00i\00s\00R\00e\00g\00E\00x\00p\00") + (data (i32.const 264) "\01\00\00\00\n\00\00\00m\00a\00t\00c\00h\00") + (data (i32.const 288) "\01\00\00\00\0e\00\00\00r\00e\00p\00l\00a\00c\00e\00") + (data (i32.const 312) "\01\00\00\00\0c\00\00\00s\00e\00a\00r\00c\00h\00") + (data (i32.const 336) "\01\00\00\00\0e\00\00\00s\00p\00e\00c\00i\00e\00s\00") + (data (i32.const 360) "\01\00\00\00\n\00\00\00s\00p\00l\00i\00t\00") + (data (i32.const 384) "\01\00\00\00\16\00\00\00t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e\00") + (data (i32.const 416) "\01\00\00\00\16\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g\00") + (data (i32.const 448) "\01\00\00\00\16\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s\00") + (data (i32.const 480) "\01\00\00\00\0e\00\00\00S\00y\00m\00b\00o\00l\00(\00") + (data (i32.const 504) "\01\00\00\00\08\00\00\00n\00u\00l\00l\00") + (data (i32.const 520) "\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 560) "\01\00\00\00\02\00\00\00)\00") + (data (i32.const 576) "\01\00\00\00\10\00\00\00S\00y\00m\00b\00o\00l\00(\00)\00") + (data (i32.const 600) "\01\00\00\00\16\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)\00") + (data (i32.const 632) "\01\00\00\00&\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)\00") + (data (i32.const 680) "\01\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/symbol/nextId (mut i32) (i32.const 12)) (global $std/symbol/sym1 (mut i32) (i32.const 0)) (global $std/symbol/sym2 (mut i32) (i32.const 0)) (global $~lib/symbol/stringToId (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/gc/gc.implemented i32 (i32.const 0)) + (global $~lib/runtime/ArrayBufferView.MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/symbol/idToString (mut i32) (i32.const 0)) (global $std/symbol/sym3 (mut i32) (i32.const 0)) (global $std/symbol/sym4 (mut i32) (i32.const 0)) @@ -51,27 +51,15 @@ (global $std/symbol/key2 (mut i32) (i32.const 0)) (global $std/symbol/key3 (mut i32) (i32.const 0)) (global $std/symbol/key4 (mut i32) (i32.const 0)) - (global $~lib/symbol/Symbol.hasInstance i32 (i32.const 1)) + (global $~lib/symbol/_Symbol.hasInstance i32 (i32.const 1)) (global $std/symbol/hasInstance (mut i32) (i32.const 0)) - (global $~lib/symbol/Symbol.isConcatSpreadable i32 (i32.const 2)) + (global $~lib/symbol/_Symbol.isConcatSpreadable i32 (i32.const 2)) (global $std/symbol/isConcatSpreadable (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 760)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 740)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $~lib/symbol/Symbol (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/Symbol (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) block (result i32) @@ -90,7 +78,7 @@ end local.get $2 ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -169,12 +157,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/arena/__memory_allocate return ) - (func $~lib/internal/arraybuffer/computeSize (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -186,36 +174,23 @@ i32.sub i32.shl ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocRaw (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 104 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end + call $~lib/runtime/runtime.adjust + call $~lib/memory/memory.allocate local.set $1 local.get $1 - local.get $0 + i32.const -1520547049 i32.store local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add ) - (func $~lib/internal/memory/memset (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memset (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) @@ -469,50 +444,86 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 local.get $1 - i32.const 1073741816 - i32.gt_u + local.get $2 + call $~lib/util/memory/memset + ) + (func $~lib/runtime/runtime.alloc (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/runtime.allocRaw + local.set $1 + local.get $1 + i32.const 0 + local.get $0 + call $~lib/memory/memory.fill + local.get $1 + ) + (func $~lib/runtime/runtime.unref (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.const 8 + i32.add + i32.ge_u + i32.eqz if i32.const 0 - i32.const 56 - i32.const 47 - i32.const 40 + i32.const 120 + i32.const 117 + i32.const 4 call $~lib/env/abort unreachable end + local.get $0 + i32.const 8 + i32.sub + local.set $1 local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - local.get $2 - i32.const 0 - i32.ne + i32.load + i32.const -1520547049 + i32.eq i32.eqz if - local.get $3 - i32.const 8 - i32.add - local.set $4 i32.const 0 - local.set $5 + i32.const 120 + i32.const 119 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $1 + global.get $~lib/runtime/ArrayBufferView.MAX_BYTELENGTH + i32.gt_u + if + i32.const 0 + i32.const 72 + i32.const 24 + i32.const 59 + call $~lib/env/abort + unreachable + end + block $~lib/runtime/runtime.register|inlined.0 (result i32) local.get $1 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset + call $~lib/runtime/runtime.alloc + local.set $2 + local.get $2 + call $~lib/runtime/runtime.unref + i32.const 2 + i32.store + local.get $2 end - local.get $3 ) - (func $~lib/map/Map#clear (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -523,7 +534,6 @@ local.get $0 i32.const 0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -536,7 +546,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -568,11 +578,10 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#clear (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -583,7 +592,6 @@ local.get $0 i32.const 0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -596,7 +604,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -628,7 +636,15 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/internal/hash/hashStr (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/hash/hashStr (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -639,7 +655,7 @@ i32.const 0 local.set $2 local.get $0 - i32.load + call $~lib/string/String#get:length i32.const 1 i32.shl local.set $3 @@ -654,7 +670,7 @@ local.get $0 local.get $2 i32.add - i32.load8_u offset=4 + i32.load8_u i32.xor i32.const 16777619 i32.mul @@ -670,7 +686,7 @@ end local.get $1 ) - (func $~lib/internal/string/compareUnsafe (; 14 ;) (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 (; 17 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -693,9 +709,9 @@ local.get $4 if (result i32) local.get $6 - i32.load16_u offset=4 + i32.load16_u local.get $7 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $5 i32.eqz @@ -723,7 +739,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.eq (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -749,11 +765,11 @@ return end local.get $0 - i32.load + call $~lib/string/String#get:length local.set $3 local.get $3 local.get $1 - i32.load + call $~lib/string/String#get:length i32.ne if i32.const 0 @@ -764,10 +780,10 @@ local.get $1 i32.const 0 local.get $3 - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/map/Map#find (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -779,7 +795,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -796,7 +812,7 @@ local.get $3 i32.load local.get $1 - call $~lib/string/String.__eq + call $~lib/string/String.eq else local.get $4 end @@ -818,32 +834,32 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hashStr - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hashStr + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hashStr - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hashStr + br $~lib/util/hash/HASH|inlined.1 end call $~lib/map/Map#find local.set $3 @@ -855,7 +871,7 @@ unreachable end ) - (func $~lib/map/Map#rehash (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -875,7 +891,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -890,13 +905,10 @@ i32.const 12 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -908,8 +920,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -936,13 +946,13 @@ local.get $9 i32.load offset=4 i32.store offset=4 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $9 i32.load local.set $11 local.get $11 - call $~lib/internal/hash/hashStr - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hashStr + br $~lib/util/hash/HASH|inlined.3 end local.get $1 i32.and @@ -955,11 +965,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=8 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 12 @@ -995,17 +1005,17 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $1 local.set $3 local.get $3 - call $~lib/internal/hash/hashStr - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hashStr + br $~lib/util/hash/HASH|inlined.2 end local.set $4 local.get $0 @@ -1052,8 +1062,6 @@ i32.load offset=8 local.set $3 local.get $3 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -1094,14 +1102,14 @@ local.set $6 local.get $5 local.get $6 - i32.load offset=8 + i32.load i32.store offset=8 local.get $6 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/internal/hash/hash32 (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -1143,7 +1151,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1155,7 +1163,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -1194,7 +1202,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1214,7 +1222,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -1229,13 +1236,10 @@ i32.const 12 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -1247,8 +1251,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -1275,13 +1277,13 @@ local.get $9 i32.load offset=4 i32.store offset=4 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $9 i32.load local.set $11 local.get $11 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 end local.get $1 i32.and @@ -1294,11 +1296,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=8 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 12 @@ -1334,17 +1336,17 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $3 local.get $3 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 end local.set $4 local.get $0 @@ -1391,8 +1393,6 @@ i32.load offset=8 local.set $3 local.get $3 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -1433,14 +1433,14 @@ local.set $6 local.get $5 local.get $6 - i32.load offset=8 + i32.load i32.store offset=8 local.get $6 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/symbol/Symbol.for (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.for (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) global.get $~lib/symbol/stringToId @@ -1487,32 +1487,32 @@ call $~lib/map/Map#set local.get $2 ) - (func $~lib/map/Map#has (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -1524,7 +1524,7 @@ unreachable end ) - (func $~lib/symbol/Symbol.keyFor (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.keyFor (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) global.get $~lib/symbol/idToString i32.const 0 @@ -1545,47 +1545,7 @@ i32.const 0 end ) - (func $~lib/internal/string/allocateUnsafe (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.const 0 - i32.gt_s - local.tee $1 - if (result i32) - local.get $0 - i32.const 536870910 - i32.le_s - else - local.get $1 - end - i32.eqz - if - i32.const 0 - i32.const 536 - i32.const 14 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.1 (result i32) - i32.const 4 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 - end - local.set $2 - local.get $2 - local.get $0 - i32.store - local.get $2 - ) - (func $~lib/internal/memory/memcpy (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 32 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2786,7 +2746,7 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 local.get $1 @@ -2813,7 +2773,7 @@ local.get $0 local.get $1 local.get $2 - call $~lib/internal/memory/memcpy + call $~lib/util/memory/memcpy return end local.get $0 @@ -3013,48 +2973,26 @@ end end ) - (func $~lib/internal/string/copyUnsafe (; 32 ;) (type $FUNCSIG$viiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/memory/memory.copy (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 4 - i32.add - local.set $5 local.get $2 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 4 - i32.add - local.set $6 - local.get $4 - i32.const 1 - i32.shl - local.set $7 - local.get $5 - local.get $6 - local.get $7 - call $~lib/internal/memory/memmove + call $~lib/util/memory/memmove ) - (func $~lib/string/String#concat (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 504 - i32.const 110 + i32.const 528 + i32.const 67 i32.const 4 call $~lib/env/abort unreachable @@ -3063,14 +3001,18 @@ i32.const 0 i32.eq if - i32.const 488 + i32.const 512 local.set $1 end local.get $0 - i32.load + call $~lib/string/String#get:length + i32.const 1 + i32.shl local.set $2 local.get $1 - i32.load + call $~lib/string/String#get:length + i32.const 1 + i32.shl local.set $3 local.get $2 local.get $3 @@ -3080,44 +3022,50 @@ i32.const 0 i32.eq if - i32.const 168 + i32.const 160 return end local.get $4 - call $~lib/internal/string/allocateUnsafe + call $~lib/runtime/runtime.allocRaw local.set $5 local.get $5 - i32.const 0 local.get $0 - i32.const 0 local.get $2 - call $~lib/internal/string/copyUnsafe + call $~lib/memory/memory.copy local.get $5 local.get $2 + i32.add local.get $1 - i32.const 0 local.get $3 - call $~lib/internal/string/copyUnsafe - local.get $5 + call $~lib/memory/memory.copy + block $~lib/runtime/runtime.register|inlined.0 (result i32) + local.get $5 + local.set $6 + local.get $6 + call $~lib/runtime/runtime.unref + i32.const 1 + i32.store + local.get $6 + end ) - (func $~lib/string/String.__concat (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.concat (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if - i32.const 488 + i32.const 512 local.set $0 end local.get $0 local.get $1 call $~lib/string/String#concat ) - (func $~lib/symbol/symbol#toString (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol#toString (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 local.set $1 - i32.const 168 + i32.const 160 local.set $2 block $break|0 block $case11|0 @@ -3181,7 +3129,7 @@ br $case11|0 end block - i32.const 176 + i32.const 168 local.set $2 br $break|0 unreachable @@ -3189,7 +3137,7 @@ unreachable end block - i32.const 208 + i32.const 200 local.set $2 br $break|0 unreachable @@ -3213,7 +3161,7 @@ unreachable end block - i32.const 288 + i32.const 296 local.set $2 br $break|0 unreachable @@ -3221,7 +3169,7 @@ unreachable end block - i32.const 312 + i32.const 320 local.set $2 br $break|0 unreachable @@ -3229,7 +3177,7 @@ unreachable end block - i32.const 328 + i32.const 344 local.set $2 br $break|0 unreachable @@ -3237,7 +3185,7 @@ unreachable end block - i32.const 352 + i32.const 368 local.set $2 br $break|0 unreachable @@ -3245,7 +3193,7 @@ unreachable end block - i32.const 368 + i32.const 392 local.set $2 br $break|0 unreachable @@ -3253,7 +3201,7 @@ unreachable end block - i32.const 400 + i32.const 424 local.set $2 br $break|0 unreachable @@ -3261,7 +3209,7 @@ unreachable end block - i32.const 432 + i32.const 456 local.set $2 br $break|0 unreachable @@ -3291,18 +3239,17 @@ end unreachable end - i32.const 464 + i32.const 488 local.get $2 - call $~lib/string/String.__concat - i32.const 592 - call $~lib/string/String.__concat + call $~lib/string/String.concat + i32.const 568 + call $~lib/string/String.concat ) - (func $start:std/symbol (; 36 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena - i32.const 8 + (func $start:std/symbol (; 38 ;) (type $FUNCSIG$v) + i32.const 16 call $~lib/symbol/Symbol global.set $std/symbol/sym1 - i32.const 8 + i32.const 16 call $~lib/symbol/Symbol global.set $std/symbol/sym2 global.get $std/symbol/sym1 @@ -3311,17 +3258,27 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 32 i32.const 6 i32.const 0 call $~lib/env/abort unreachable end - i32.const 8 - call $~lib/symbol/Symbol.for + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + i32.const 16 + call $~lib/symbol/_Symbol.for global.set $std/symbol/sym3 - i32.const 8 - call $~lib/symbol/Symbol.for + i32.const 16 + call $~lib/symbol/_Symbol.for global.set $std/symbol/sym4 global.get $std/symbol/sym3 global.get $std/symbol/sym4 @@ -3329,17 +3286,17 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 32 i32.const 11 i32.const 0 call $~lib/env/abort unreachable end global.get $std/symbol/sym1 - call $~lib/symbol/Symbol.keyFor + call $~lib/symbol/_Symbol.keyFor global.set $std/symbol/key1 global.get $std/symbol/sym2 - call $~lib/symbol/Symbol.keyFor + call $~lib/symbol/_Symbol.keyFor global.set $std/symbol/key2 global.get $std/symbol/key1 i32.const 0 @@ -3347,7 +3304,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 32 i32.const 16 i32.const 0 call $~lib/env/abort @@ -3359,25 +3316,25 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 32 i32.const 17 i32.const 0 call $~lib/env/abort unreachable end global.get $std/symbol/sym3 - call $~lib/symbol/Symbol.keyFor + call $~lib/symbol/_Symbol.keyFor global.set $std/symbol/key3 global.get $std/symbol/sym4 - call $~lib/symbol/Symbol.keyFor + call $~lib/symbol/_Symbol.keyFor global.set $std/symbol/key4 global.get $std/symbol/key3 - i32.const 8 - call $~lib/string/String.__eq + i32.const 16 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 32 i32.const 22 i32.const 0 call $~lib/env/abort @@ -3385,11 +3342,11 @@ end global.get $std/symbol/key3 global.get $std/symbol/key4 - call $~lib/string/String.__eq + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 32 i32.const 23 i32.const 0 call $~lib/env/abort @@ -3397,69 +3354,69 @@ end i32.const 0 call $~lib/symbol/Symbol - call $~lib/symbol/symbol#toString - i32.const 600 - call $~lib/string/String.__eq + call $~lib/symbol/_Symbol#toString + i32.const 584 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 32 i32.const 25 i32.const 0 call $~lib/env/abort unreachable end global.get $std/symbol/sym3 - call $~lib/symbol/symbol#toString - i32.const 624 - call $~lib/string/String.__eq + call $~lib/symbol/_Symbol#toString + i32.const 608 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 32 i32.const 26 i32.const 0 call $~lib/env/abort unreachable end - global.get $~lib/symbol/Symbol.hasInstance + global.get $~lib/symbol/_Symbol.hasInstance global.set $std/symbol/hasInstance - global.get $~lib/symbol/Symbol.isConcatSpreadable + global.get $~lib/symbol/_Symbol.isConcatSpreadable global.set $std/symbol/isConcatSpreadable global.get $std/symbol/hasInstance - call $~lib/symbol/symbol#toString - i32.const 656 - call $~lib/string/String.__eq + call $~lib/symbol/_Symbol#toString + i32.const 640 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 32 i32.const 30 i32.const 0 call $~lib/env/abort unreachable end global.get $std/symbol/isConcatSpreadable - call $~lib/symbol/symbol#toString - i32.const 704 - call $~lib/string/String.__eq + call $~lib/symbol/_Symbol#toString + i32.const 688 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 32 i32.const 31 i32.const 0 call $~lib/env/abort unreachable end - global.get $~lib/symbol/Symbol.hasInstance + global.get $~lib/symbol/_Symbol.hasInstance drop - global.get $~lib/symbol/Symbol.isConcatSpreadable + global.get $~lib/symbol/_Symbol.isConcatSpreadable drop ) - (func $start (; 37 ;) (type $FUNCSIG$v) + (func $start (; 39 ;) (type $FUNCSIG$v) call $start:std/symbol ) - (func $null (; 38 ;) (type $FUNCSIG$v) + (func $null (; 40 ;) (type $FUNCSIG$v) ) ) From ea43f9f2d0e711c3daf751b09a4243482f0313b9 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 14 Mar 2019 08:05:33 +0100 Subject: [PATCH 032/119] what's that btw --- cli/asc.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 151a6c1322..0c745a39a2 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -463,15 +463,13 @@ exports.main = function main(argv, options, callback) { var module; stats.compileCount++; - (() => { - try { - stats.compileTime += measure(() => { - module = assemblyscript.compileProgram(program, compilerOptions); - }); - } catch (e) { - return callback(e); - } - })(); + try { + stats.compileTime += measure(() => { + module = assemblyscript.compileProgram(program, compilerOptions); + }); + } catch (e) { + return callback(e); + } if (checkDiagnostics(parser, stderr)) { if (module) module.dispose(); return callback(Error("Compile error")); From cdf3e2cf12943a9f7f8a599a42e313751ff6d313 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 14 Mar 2019 09:22:20 +0100 Subject: [PATCH 033/119] fixes --- src/builtins.ts | 9 +-- src/compiler.ts | 2 +- src/diagnostics.ts | 10 ++- std/assembly/symbol.ts | 6 +- std/assembly/util/number.ts | 136 +++++++++++++++++++++--------------- 5 files changed, 97 insertions(+), 66 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index 5c5880dd96..e4c1baab6e 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -4118,10 +4118,11 @@ export function compileArrayGet( contextualType: Type ): ExpressionRef { var type = typedArraySymbolToType(target.internalName); - if (type) return compileTypedArrayGet(compiler, target, type, thisExpression, elementExpression, contextualType); - assert(target.prototype == compiler.program.arrayPrototype); - type = assert(target.typeArguments)[0]; - throw new Error("not implemented"); + if (!type) { + assert(target.prototype == compiler.program.arrayPrototype); + type = assert(target.typeArguments)[0]; + } + return compileTypedArrayGet(compiler, target, type, thisExpression, elementExpression, contextualType); } function compileTypedArrayGet( diff --git a/src/compiler.ts b/src/compiler.ts index 00a9b1e5ad..37c2f838be 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -904,7 +904,7 @@ export class Compiler extends DiagnosticEmitter { if (global.hasDecorator(DecoratorFlags.INLINE)) { this.error( DiagnosticCode.Decorator_0_is_not_valid_here, - global.identifierNode.range, "inline" + assert(findDecorator(DecoratorKind.INLINE, global.decoratorNodes)).range, "inline" ); } module.addGlobal(internalName, nativeType, true, global.type.toNativeZero(module)); diff --git a/src/diagnostics.ts b/src/diagnostics.ts index b7f3f4061f..9368bf9484 100644 --- a/src/diagnostics.ts +++ b/src/diagnostics.ts @@ -14,7 +14,7 @@ import { } from "./diagnosticMessages.generated"; import { - isLineBreak + isLineBreak, CharCode } from "./util"; export { @@ -244,7 +244,13 @@ export function formatDiagnosticContext(range: Range, useColors: bool = false): if (range.start == range.end) { sb.push("^"); } else { - while (start++ < range.end) sb.push("~"); + while (start++ < range.end) { + if (isLineBreak(text.charCodeAt(start))) { + sb.push(start == range.start + 1 ? "^" : "~"); + break; + } + sb.push("~"); + } } if (useColors) sb.push(COLOR_RESET); return sb.join(""); diff --git a/std/assembly/symbol.ts b/std/assembly/symbol.ts index 0512423108..97baef4d58 100644 --- a/std/assembly/symbol.ts +++ b/std/assembly/symbol.ts @@ -12,7 +12,11 @@ var idToString: Map; @lazy var nextId: usize = 12; // Symbol.unscopables + 1 -@unmanaged abstract class _Symbol { +@unmanaged @sealed abstract class _Symbol { + + // TODO: all of the following default symbols are unused currently yet add to + // binary size if #toString becomes compiled. Ultimately we'll most likely want + // to remove the unsupported ones and only keep what's actually supported. // @ts-ignore: decorator @lazy diff --git a/std/assembly/util/number.ts b/std/assembly/util/number.ts index 9940518c62..6cf716b865 100644 --- a/std/assembly/util/number.ts +++ b/std/assembly/util/number.ts @@ -1,4 +1,4 @@ -import { runtime } from "../runtime"; +import { runtime, ArrayBufferView } from "../runtime"; import { CharCode } from "./string"; // @ts-ignore: decorator @@ -108,8 +108,7 @@ export function decimalCount32(value: u32): u32 { let l: u32 = 32 - clz(value); // log2 let t = l * 1233 >>> 12; // log10 - let lutbuf = POWERS10.buffer_; - let power = LOAD(lutbuf, t); + let power = unchecked(POWERS10[t]); t -= u32(value < power); return t + 1; } else { @@ -138,8 +137,7 @@ export function decimalCount64(value: u64): u32 { let l: u32 = 64 - clz(value); // log2 let t = l * 1233 >>> 12; // log10 - let lutbuf = POWERS10.buffer_; - let power = LOAD(lutbuf, t - 10); + let power = unchecked(POWERS10[t]); t -= u32(value < 10000000000 * power); return t + 1; } else { @@ -162,8 +160,7 @@ export function decimalCount64(value: u64): u32 { } function utoa32_lut(buffer: usize, num: u32, offset: usize): void { - var lutbuf = DIGITS.buffer_; - + var lut = changetype(DIGITS).dataStart; while (num >= 10000) { // in most VMs i32/u32 div and modulo by constant can be shared and simplificate let t = num / 10000; @@ -173,8 +170,8 @@ function utoa32_lut(buffer: usize, num: u32, offset: usize): void { let d1 = r / 100; let d2 = r % 100; - let digits1 = LOAD(lutbuf, d1); - let digits2 = LOAD(lutbuf, d2); + let digits1 = load(lut + (d1 << alignof())); + let digits2 = load(lut + (d2 << alignof())); offset -= 4; store(buffer + (offset << 1), digits1 | (digits2 << 32)); @@ -185,13 +182,13 @@ function utoa32_lut(buffer: usize, num: u32, offset: usize): void { let d1 = num % 100; num = t; offset -= 2; - let digits = LOAD(lutbuf, d1); + let digits = load(lut + (d1 << alignof())); store(buffer + (offset << 1), digits); } if (num >= 10) { offset -= 2; - let digits = LOAD(lutbuf, num); + let digits = load(lut + (num << alignof())); store(buffer + (offset << 1), digits); } else { offset -= 1; @@ -201,8 +198,7 @@ function utoa32_lut(buffer: usize, num: u32, offset: usize): void { } function utoa64_lut(buffer: usize, num: u64, offset: usize): void { - var lutbuf = DIGITS.buffer_; - + var lut = changetype(DIGITS).dataStart; while (num >= 100000000) { let t = num / 100000000; let r = (num - t * 100000000); @@ -216,14 +212,14 @@ function utoa64_lut(buffer: usize, num: u64, offset: usize): void { let c1 = c / 100; let c2 = c % 100; - let digits1 = LOAD(lutbuf, c1); - let digits2 = LOAD(lutbuf, c2); + let digits1 = load(lut + (c1 << alignof())); + let digits2 = load(lut + (c2 << alignof())); offset -= 4; store(buffer + (offset << 1), digits1 | (digits2 << 32)); - digits1 = LOAD(lutbuf, b1); - digits2 = LOAD(lutbuf, b2); + digits1 = load(lut + (b1 << alignof())); + digits2 = load(lut + (b2 << alignof())); offset -= 4; store(buffer + (offset << 1), digits1 | (digits2 << 32)); @@ -232,16 +228,17 @@ function utoa64_lut(buffer: usize, num: u64, offset: usize): void { utoa32_lut(buffer, num, offset); } -function utoa_simple(buffer: usize, num: T, offset: usize): void { +function utoa_simple(buffer: usize, num: T, offset: usize): void { do { let t = num / 10; let r = (num % 10); - num = t; + num = changetype(t); offset -= 1; store(buffer + (offset << 1), CharCode._0 + r); } while (num); } +// @ts-ignore: decorator @inline export function utoa32_core(buffer: usize, num: u32, offset: u32): void { if (ASC_SHRINK_LEVEL >= 1) { @@ -251,6 +248,7 @@ export function utoa32_core(buffer: usize, num: u32, offset: u32): void { } } +// @ts-ignore: decorator @inline export function utoa64_core(buffer: usize, num: u64, offset: u32): void { if (ASC_SHRINK_LEVEL >= 1) { @@ -276,7 +274,7 @@ export function itoa32(value: i32): String { var sign = value < 0; if (sign) value = -value; - var decimals = decimalCount32(value) + sign; + var decimals = decimalCount32(value) + u32(sign); var out = runtime.alloc(decimals << 1); utoa32_core(changetype(out), value, decimals); @@ -311,11 +309,11 @@ export function itoa64(value: i64): String { var out: usize; if (value <= u32.MAX_VALUE) { let val32 = value; - let decimals = decimalCount32(val32) + sign; + let decimals = decimalCount32(val32) + u32(sign); out = runtime.alloc(decimals << 1); utoa32_core(changetype(out), val32, decimals); } else { - let decimals = decimalCount64(value) + sign; + let decimals = decimalCount64(value) + u32(sign); out = runtime.alloc(decimals << 1); utoa64_core(changetype(out), value, decimals); } @@ -324,34 +322,52 @@ export function itoa64(value: i64): String { return runtime.register(out); } -export function itoa(value: T): String { - if (!isInteger()) { - assert(false); // unexpecteble non-integer generic type +export function itoa(value: T): String { + if (!isInteger()) ERROR("integer type expected"); + if (isSigned()) { + if (sizeof() <= 4) { + return itoa32(value); + } else { + return itoa64(value); + } } else { - if (isSigned()) { - if (sizeof() <= 4) { - return itoa32(value); - } else { - return itoa64(value); - } + if (sizeof() <= 4) { + return utoa32(value); } else { - if (sizeof() <= 4) { - return utoa32(value); - } else { - return utoa64(value); - } + return utoa64(value); } } } -@lazy var _K: i32 = 0; -// @lazy var _frc: u64 = 0; -@lazy var _exp: i32 = 0; -@lazy var _frc_minus: u64 = 0; -@lazy var _frc_plus: u64 = 0; -@lazy var _frc_pow: u64 = 0; -@lazy var _exp_pow: i32 = 0; +// @ts-ignore: decorator +@lazy +var _K: i32 = 0; + +// // @ts-ignore: decorator +// @lazy +// var _frc: u64 = 0; +// @ts-ignore: decorator +@lazy +var _exp: i32 = 0; + +// @ts-ignore: decorator +@lazy +var _frc_minus: u64 = 0; + +// @ts-ignore: decorator +@lazy +var _frc_plus: u64 = 0; + +// @ts-ignore: decorator +@lazy +var _frc_pow: u64 = 0; + +// @ts-ignore: decorator +@lazy +var _exp_pow: i32 = 0; + +// @ts-ignore: decorator @inline function umul64f(u: u64, v: u64): u64 { var u0 = u & 0xFFFFFFFF; @@ -372,11 +388,13 @@ function umul64f(u: u64, v: u64): u64 { return u1 * v1 + t + w; } +// @ts-ignore: decorator @inline function umul64e(e1: i32, e2: i32): i32 { return e1 + e2 + 64; // where 64 is significand size } +// @ts-ignore: decorator @inline function normalizedBoundaries(f: u64, e: i32): void { var frc = (f << 1) + 1; @@ -385,13 +403,14 @@ function normalizedBoundaries(f: u64, e: i32): void { frc <<= off; exp -= off; - var m = 1 + (f == 0x0010000000000000); + var m = 1 + i32(f == 0x0010000000000000); _frc_plus = frc; _frc_minus = ((f << m) - 1) << e - m - exp; _exp = exp; } +// @ts-ignore: decorator @inline function grisuRound(buffer: usize, len: i32, delta: u64, rest: u64, ten_kappa: u64, wp_w: u64): void { var lastp = buffer + ((len - 1) << 1); @@ -409,21 +428,21 @@ function grisuRound(buffer: usize, len: i32, delta: u64, rest: u64, ten_kappa: u store(lastp, digit); } +// @ts-ignore: decorator @inline function getCachedPower(minExp: i32): void { const c = reinterpret(0x3FD34413509F79FE); // 1 / lg(10) = 0.30102999566398114 var dk = (-61 - minExp) * c + 347; // dk must be positive, so can do ceiling in positive var k = dk; - k += (k != dk); // conversion with ceil + k += i32(k != dk); // conversion with ceil var index = (k >> 3) + 1; _K = 348 - (index << 3); // decimal exponent no need lookup table - var frcPowers = FRC_POWERS.buffer_; - var expPowers = EXP_POWERS.buffer_; - _frc_pow = LOAD(frcPowers, index); - _exp_pow = LOAD(expPowers, index); + _frc_pow = unchecked(FRC_POWERS[index]); + _exp_pow = unchecked(EXP_POWERS[index]); } +// @ts-ignore: decorator @inline function grisu2(value: f64, buffer: usize, sign: i32): i32 { @@ -431,7 +450,7 @@ function grisu2(value: f64, buffer: usize, sign: i32): i32 { var uv = reinterpret(value); var exp = ((uv & 0x7FF0000000000000) >>> 52); var sid = uv & 0x000FFFFFFFFFFFFF; - var frc = ((exp != 0) << 52) + sid; + var frc = (u64(exp != 0) << 52) + sid; exp = select(exp, 1, exp != 0) - (0x3FF + 52); normalizedBoundaries(frc, exp); @@ -471,7 +490,7 @@ function genDigits(buffer: usize, w_frc: u64, w_exp: i32, mp_frc: u64, mp_exp: i var kappa = decimalCount32(p1); var len = sign; - var powers10 = POWERS10.buffer_; + var lut = changetype(POWERS10).dataStart; while (kappa > 0) { let d: u32; @@ -495,7 +514,7 @@ function genDigits(buffer: usize, w_frc: u64, w_exp: i32, mp_frc: u64, mp_exp: i let tmp = ((p1) << one_exp) + p2; if (tmp <= delta) { _K += kappa; - grisuRound(buffer, len, delta, tmp, LOAD(powers10, kappa) << one_exp, wp_w_frc); + grisuRound(buffer, len, delta, tmp, load(lut + (kappa << alignof())) << one_exp, wp_w_frc); return len; } } @@ -511,7 +530,7 @@ function genDigits(buffer: usize, w_frc: u64, w_exp: i32, mp_frc: u64, mp_exp: i --kappa; if (p2 < delta) { _K += kappa; - wp_w_frc *= LOAD(powers10, -kappa); + wp_w_frc *= load(lut + (-kappa << alignof())); grisuRound(buffer, len, delta, p2, one_frc, wp_w_frc); return len; } @@ -520,6 +539,7 @@ function genDigits(buffer: usize, w_frc: u64, w_exp: i32, mp_frc: u64, mp_exp: i return len; } +// @ts-ignore: decorator @inline function genExponent(buffer: usize, k: i32): i32 { var sign = k < 0; @@ -587,7 +607,7 @@ function prettify(buffer: usize, length: i32, k: i32): i32 { } export function dtoa_core(buffer: usize, value: f64): i32 { - var sign = (value < 0); + var sign = i32(value < 0); if (sign) { value = -value; store(buffer, CharCode.MINUS); @@ -611,7 +631,7 @@ export function dtoa(value: f64): String { return result; } -export function itoa_stream(buffer: usize, offset: usize, value: T): u32 { +export function itoa_stream(buffer: usize, offset: usize, value: T): u32 { buffer += (offset << 1); if (!value) { store(buffer, CharCode._0); @@ -619,8 +639,8 @@ export function itoa_stream(buffer: usize, offset: usize, value: T): u32 { } var decimals: u32 = 0; if (isSigned()) { - let sign = value < 0; - if (sign) value = -value; + let sign = i32(value < 0); + if (sign) value = changetype(-value); if (sizeof() <= 4) { decimals = decimalCount32(value) + sign; utoa32_core(buffer, value, decimals); @@ -668,7 +688,7 @@ export function dtoa_stream(buffer: usize, offset: usize, value: f64): u32 { store(buffer, CharCode.N, 4); return 3; } else { - let sign = (value < 0); + let sign = i32(value < 0); let len = 8 + sign; let source = changetype(select("-Infinity", "Infinity", sign)); memory.copy(buffer, source, len << 1); From 3a60638f7284b8773221aa7804cc7d9bb3aa9efa Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 14 Mar 2019 12:46:36 +0100 Subject: [PATCH 034/119] simplify --- std/assembly/array.ts | 38 +- std/assembly/arraybuffer.ts | 9 +- std/assembly/gc.ts | 17 +- std/assembly/map.ts | 6 +- std/assembly/runtime.ts | 48 +- std/assembly/set.ts | 8 +- std/assembly/string.ts | 67 +- std/assembly/typedarray.ts | 7 +- std/assembly/util/number.ts | 11 +- tests/compiler/std/runtime.optimized.wat | 488 +++++---- tests/compiler/std/runtime.ts | 4 +- tests/compiler/std/runtime.untouched.wat | 1144 +++++++++++----------- 12 files changed, 906 insertions(+), 941 deletions(-) diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 6591173280..4980c27068 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -1,4 +1,5 @@ import { runtime, ArrayBufferView } from "./runtime"; +import { gc } from "./gc"; import { ArrayBuffer } from "./arraybuffer"; import { COMPARATOR, SORT } from "./util/sort"; import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number"; @@ -76,7 +77,7 @@ export class Array extends ArrayBufferView { private __set(index: i32, value: T): void { this.resize(index + 1); store(this.dataStart + (index << alignof()), value); - if (isManaged()) runtime.link(changetype(value), changetype(this)); + if (isManaged()) gc.link(value, this); if (index >= this.length_) this.length_ = index + 1; } @@ -141,7 +142,7 @@ export class Array extends ArrayBufferView { this.resize(newLength); this.length_ = newLength; store(this.dataStart + ((newLength - 1) << alignof()), element); - if (isManaged()) runtime.link(changetype(element), changetype(this)); + if (isManaged()) gc.link(element, this); return newLength; } @@ -156,14 +157,14 @@ export class Array extends ArrayBufferView { for (let offset: usize = 0; offset < thisSize; offset += sizeof()) { let element = load(thisStart + offset); store(outStart + offset, element); - runtime.link(changetype(element), changetype(out)); + gc.link(element, out); } let otherStart = other.dataStart; let otherSize = otherLen << alignof(); for (let offset: usize = 0; offset < otherSize; offset += sizeof()) { let element = load(otherStart + offset); store(outStart + thisSize + offset, element); - runtime.link(changetype(element), changetype(out)); + gc.link(element, out); } } else { memory.copy(outStart, this.dataStart, thisSize); @@ -221,7 +222,7 @@ export class Array extends ArrayBufferView { let value = load(this.dataStart + (index << alignof())); let result = callbackfn(value, index, this); store(outStart + (index << alignof()), result); - if (isManaged()) runtime.link(changetype(result), changetype(out)); + if (isManaged()) gc.link(result, out); } return out; } @@ -293,7 +294,7 @@ export class Array extends ArrayBufferView { (newLength - 1) << alignof() ); store(base, element); - if (isManaged()) runtime.link(changetype(element), changetype(this)); + if (isManaged()) gc.link(element, this); this.length_ = newLength; return newLength; } @@ -310,7 +311,7 @@ export class Array extends ArrayBufferView { let offset = i << alignof(); let element = load(thisBase + offset); store(sliceBase + offset, element); - if (isManaged()) runtime.link(changetype(element), changetype(slice)); + if (isManaged()) gc.link(element, slice); } return slice; } @@ -326,7 +327,7 @@ export class Array extends ArrayBufferView { for (let i = 0; i < deleteCount; ++i) { let element = load(thisBase + (i << alignof())); store(spliceStart + (i << alignof()), element); - if (isManaged()) runtime.link(changetype(element), changetype(splice)); + if (isManaged()) gc.link(element, splice); } memory.copy( splice.dataStart, @@ -428,16 +429,17 @@ export class Array extends ArrayBufferView { if (estLen > offset) { let trimmed = changetype(result).substring(0, offset); - runtime.free(result); + runtime.freeUnregistered(result); return trimmed; // registered in .substring } - return runtime.register(result); + return gc.register(result); } private join_int(separator: string = ","): string { var lastIndex = this.length_ - 1; if (lastIndex < 0) return ""; var dataStart = this.dataStart; + // @ts-ignore: type if (!lastIndex) return changetype(itoa(load(dataStart))); var sepLen = separator.length; @@ -448,6 +450,7 @@ export class Array extends ArrayBufferView { var value: T; for (let i = 0; i < lastIndex; ++i) { value = load(dataStart + (i << alignof())); + // @ts-ignore: type offset += itoa_stream(result, offset, value); if (sepLen) { memory.copy( @@ -459,13 +462,14 @@ export class Array extends ArrayBufferView { } } value = load(dataStart + (lastIndex << alignof())); + // @ts-ignore: type offset += itoa_stream(result, offset, value); if (estLen > offset) { let trimmed = changetype(result).substring(0, offset); - runtime.free(result); + runtime.freeUnregistered(result); return trimmed; // registered in .substring } - return runtime.register(result); + return gc.register(result); } private join_flt(separator: string = ","): string { @@ -507,10 +511,10 @@ export class Array extends ArrayBufferView { ); if (estLen > offset) { let trimmed = changetype(result).substring(0, offset); - runtime.free(result); + runtime.freeUnregistered(result); return trimmed; // registered in .substring } - return runtime.register(result); + return gc.register(result); } private join_str(separator: string = ","): string { @@ -556,7 +560,7 @@ export class Array extends ArrayBufferView { valueLen << 1 ); } - return runtime.register(result); + return gc.register(result); } private join_arr(separator: string = ","): string { @@ -625,10 +629,10 @@ export class Array extends ArrayBufferView { } if (estLen > offset) { let out = changetype(result).substring(0, offset); - runtime.free(result); + runtime.freeUnregistered(result); return out; // registered in .substring } - return runtime.register(result); + return gc.register(result); } @inline diff --git a/std/assembly/arraybuffer.ts b/std/assembly/arraybuffer.ts index 0b9af20179..a7feab95c4 100644 --- a/std/assembly/arraybuffer.ts +++ b/std/assembly/arraybuffer.ts @@ -1,4 +1,5 @@ import { runtime, ArrayBufferView } from "./runtime"; +import { gc } from "./gc"; @sealed export class ArrayBuffer { @@ -22,7 +23,9 @@ import { runtime, ArrayBufferView } from "./runtime"; constructor(length: i32) { if (length > ArrayBufferView.MAX_BYTELENGTH) throw new RangeError("Invalid array buffer length"); - return runtime.register(runtime.alloc(length)); + var buffer = runtime.alloc(length); + memory.fill(changetype(buffer), 0, length); + return gc.register(buffer); } get byteLength(): i32 { @@ -34,9 +37,9 @@ import { runtime, ArrayBufferView } from "./runtime"; begin = begin < 0 ? max(length + begin, 0) : min(begin, length); end = end < 0 ? max(length + end , 0) : min(end , length); var outSize = max(end - begin, 0); - var out = runtime.allocRaw(outSize); + var out = runtime.alloc(outSize); memory.copy(out, changetype(this) + begin, outSize); - return runtime.register(out); + return gc.register(out); } toString(): string { diff --git a/std/assembly/gc.ts b/std/assembly/gc.ts index 90926a368e..3749b84f21 100644 --- a/std/assembly/gc.ts +++ b/std/assembly/gc.ts @@ -1,3 +1,5 @@ +import { runtime } from "./runtime"; + /** Garbage collector interface. */ export namespace gc { @@ -21,20 +23,23 @@ export namespace gc { /** Registers a managed object to be tracked by the garbage collector. */ // @ts-ignore: decorator - @unsafe - export function register(ref: usize): void { + @unsafe @inline + export function register(ref: usize): T { + runtime.unrefUnregistered(ref).classId = classId(); // @ts-ignore: stub if (isDefined(__gc_register)) __gc_register(ref); - else ERROR("missing implementation: gc.register"); + return changetype(ref); } /** Links a registered object with the registered object now referencing it. */ // @ts-ignore: decorator - @unsafe - export function link(ref: usize, parentRef: usize): void { + @unsafe @inline + export function link(ref: T, parentRef: TParent): void { + assert(changetype(ref) >= HEAP_BASE + runtime.Header.SIZE); // must be a heap object + var header = changetype(changetype(ref) - runtime.Header.SIZE); + assert(header.classId != runtime.Header.MAGIC && header.gc1 != 0 && header.gc2 != 0); // must be registered // @ts-ignore: stub if (isDefined(__gc_link)) __gc_link(ref, parentRef); - else ERROR("missing implementation: gc.link"); } /** Marks an object as being reachable. */ diff --git a/std/assembly/map.ts b/std/assembly/map.ts index 1402ecfcc8..a389c7006d 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -1,4 +1,4 @@ -import { runtime } from "./runtime"; +import { gc } from "./gc"; import { HASH } from "./util/hash"; // A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht @@ -124,8 +124,8 @@ export class Map { let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE; entry.taggedNext = load(bucketPtrBase); store(bucketPtrBase, changetype(entry)); - if (isManaged()) runtime.link(changetype(key), changetype(this)); - if (isManaged()) runtime.link(changetype(value), changetype(this)); + if (isManaged()) gc.link(key, this); + if (isManaged()) gc.link(value, this); } } diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index ddce43709a..55126e3254 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -48,7 +48,7 @@ export namespace runtime { /** Allocates a new object and returns a pointer to its payload. Does not fill. */ // @ts-ignore: decorator @unsafe - export function allocRaw(payloadSize: u32): usize { + export function alloc(payloadSize: u32): usize { var header = changetype
(memory.allocate(adjust(payloadSize))); header.classId = Header.MAGIC; header.payloadSize = payloadSize; @@ -59,15 +59,6 @@ export namespace runtime { return changetype(header) + Header.SIZE; } - /** Allocates a new object and returns a pointer to its payload. Fills with zeroes.*/ - // @ts-ignore: decorator - @unsafe - export function alloc(payloadSize: u32): usize { - var ref = allocRaw(payloadSize); - memory.fill(ref, 0, payloadSize); - return ref; - } - /** Reallocates an object if necessary. Returns a pointer to its (moved) payload. */ // @ts-ignore: decorator @unsafe @@ -83,7 +74,7 @@ export namespace runtime { if (select(adjust(payloadSize), 0, ref > HEAP_BASE) < newAdjustedSize) { // move if the allocation isn't large enough or not a heap object let newHeader = changetype
(memory.allocate(newAdjustedSize)); - newHeader.classId = Header.MAGIC; + newHeader.classId = header.classId; if (gc.implemented) { newHeader.gc1 = 0; newHeader.gc2 = 0; @@ -97,7 +88,8 @@ export namespace runtime { memory.free(changetype(header)); } else if (gc.implemented) { // if previously registered, register again - gc.register(ref); + // @ts-ignore: stub + __gc_register(ref); } header = newHeader; ref = newRef; @@ -113,40 +105,20 @@ export namespace runtime { return ref; } - function unref(ref: usize): Header { + // @ts-ignore: decorator + @unsafe + export function unrefUnregistered(ref: usize): Header { assert(ref >= HEAP_BASE + Header.SIZE); // must be a heap object var header = changetype
(ref - Header.SIZE); assert(header.classId == Header.MAGIC); // must be unregistered return header; } - /** Frees an object. Must not have been registered with GC yet. */ - // @ts-ignore: decorator - @unsafe @inline - export function free(ref: T): void { - memory.free(changetype(unref(changetype(ref)))); - } - - /** Registers a managed object. Cannot be free'd anymore afterwards. */ - // @ts-ignore: decorator - @unsafe @inline - export function register(ref: usize): T { - if (!isReference()) ERROR("reference expected"); - // see comment in REALLOC why this is useful. also inline this because - // it's generic so we don't get a bunch of functions. - unref(ref).classId = gc.classId(); - if (gc.implemented) gc.register(ref); - return changetype(ref); - } - - /** Links a managed object with its managed parent. */ + /** Frees an unregistered object that turned out to be unnecessary. */ // @ts-ignore: decorator @unsafe @inline - export function link(ref: T, parentRef: TParent): void { - assert(changetype(ref) >= HEAP_BASE + Header.SIZE); // must be a heap object - var header = changetype
(changetype(ref) - Header.SIZE); - assert(header.classId != Header.MAGIC && header.gc1 != 0 && header.gc2 != 0); // must be registered - if (gc.implemented) gc.link(changetype(ref), changetype(parentRef)); // tslint:disable-line + export function freeUnregistered(ref: T): void { + memory.free(changetype(unrefUnregistered(changetype(ref)))); } } diff --git a/std/assembly/set.ts b/std/assembly/set.ts index 3874e37230..8d0b8963c1 100644 --- a/std/assembly/set.ts +++ b/std/assembly/set.ts @@ -1,4 +1,4 @@ -import { runtime } from "./runtime"; +import { gc } from "./gc"; import { HASH } from "./util/hash"; // A deterministic hash set based on CloseTable from https://github.com/jorendorff/dht @@ -70,7 +70,7 @@ export class Set { this.buckets = new ArrayBuffer(bucketsSize); this.bucketsMask = INITIAL_CAPACITY - 1; const entriesSize = INITIAL_CAPACITY * ENTRY_SIZE(); - this.entries = new ArrayBuffer(entriesSize, true); + this.entries = new ArrayBuffer(entriesSize); this.entriesCapacity = INITIAL_CAPACITY; this.entriesOffset = 0; this.entriesCount = 0; @@ -114,7 +114,7 @@ export class Set { let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE; entry.taggedNext = load(bucketPtrBase); store(bucketPtrBase, changetype(entry)); - if (isManaged()) runtime.link(changetype(key), changetype(this)); // tslint:disable-line + if (isManaged()) gc.link(key, this); } } @@ -136,7 +136,7 @@ export class Set { var newBucketsCapacity = (newBucketsMask + 1); var newBuckets = new ArrayBuffer(newBucketsCapacity * BUCKET_SIZE); var newEntriesCapacity = (newBucketsCapacity * FILL_FACTOR); - var newEntries = new ArrayBuffer(newEntriesCapacity * ENTRY_SIZE(), true); + var newEntries = new ArrayBuffer(newEntriesCapacity * ENTRY_SIZE()); // copy old entries to new entries var oldPtr = changetype(this.entries); diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 520c6bd8ce..c9ead2fb0e 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -1,4 +1,5 @@ import { runtime } from "./runtime"; +import { gc } from "./gc"; import { MAX_SIZE_32 } from "./util/allocator"; import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./util/string"; @@ -14,15 +15,15 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut // TODO Add and handle second argument static fromCharCode(code: i32): String { - var out = runtime.allocRaw(2); + var out = runtime.alloc(2); store(out, code); - return runtime.register(out); + return gc.register(out); } static fromCodePoint(code: i32): String { assert(code <= 0x10FFFF); var sur = code > 0xFFFF; - var out = runtime.allocRaw((i32(sur) + 1) << 1); + var out = runtime.alloc((i32(sur) + 1) << 1); if (!sur) { store(out, code); } else { @@ -31,15 +32,15 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut let lo: u32 = (code & 0x3FF) + 0xDC00; store(out, (hi << 16) | lo); } - return runtime.register(out); + return gc.register(out); } @operator("[]") charAt(pos: i32): String { assert(this !== null); if (pos >= this.length) return changetype(""); - var out = runtime.allocRaw(2); + var out = runtime.alloc(2); store(out, load(changetype(this) + (pos << 1))); - return runtime.register(out); + return gc.register(out); } charCodeAt(pos: i32): i32 { @@ -70,10 +71,10 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var otherSize: isize = other.length << 1; var outSize: usize = thisSize + otherSize; if (outSize == 0) return changetype(""); - var out = runtime.allocRaw(outSize); + var out = runtime.alloc(outSize); memory.copy(out, changetype(this), thisSize); memory.copy(out + thisSize, changetype(other), otherSize); - return runtime.register(out); + return gc.register(out); } endsWith(searchString: String, endPosition: i32 = String.MAX_LENGTH): bool { @@ -183,9 +184,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut if (intStart < 0) intStart = max(size + intStart, 0); var resultLength = min(max(end, 0), size - intStart); if (resultLength <= 0) return changetype(""); - var out = runtime.allocRaw(resultLength << 1); + var out = runtime.alloc(resultLength << 1); memory.copy(out, changetype(this) + intStart, resultLength); - return runtime.register(out); + return gc.register(out); } substring(start: i32, end: i32 = i32.MAX_VALUE): String { @@ -198,9 +199,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut len = toPos - fromPos; if (!len) return changetype(""); if (!fromPos && toPos == this.length << 1) return this; - var out = runtime.allocRaw(len); + var out = runtime.alloc(len); memory.copy(out, changetype(this) + fromPos, len); - return runtime.register(out); + return gc.register(out); } trim(): String { @@ -226,9 +227,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut } if (!size) return changetype(""); if (!start && size == length << 1) return this; - var out = runtime.allocRaw(size); + var out = runtime.alloc(size); memory.copy(out, changetype(this) + offset, size); - return runtime.register(out); + return gc.register(out); } @inline @@ -256,9 +257,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut if (!offset) return this; size -= offset; if (!size) return changetype(""); - var out = runtime.allocRaw(size); + var out = runtime.alloc(size); memory.copy(out, changetype(this) + offset, size); - return runtime.register(out); + return gc.register(out); } trimEnd(): String { @@ -275,9 +276,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut } if (!size) return changetype(""); if (size == originalSize) return this; - var out = runtime.allocRaw(size); + var out = runtime.alloc(size); memory.copy(out, changetype(this), size); - return runtime.register(out); + return gc.register(out); } padStart(targetLength: i32, padString: string = " "): String { @@ -287,7 +288,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var padSize = padString.length << 1; if (targetSize < thisSize || !padSize) return this; var prependSize = targetSize - thisSize; - var out = runtime.allocRaw(targetSize); + var out = runtime.alloc(targetSize); if (prependSize > padSize) { let repeatCount = (prependSize - 2) / padSize; let restBase = repeatCount * padSize; @@ -298,7 +299,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut memory.copy(out, changetype(padString), prependSize); } memory.copy(out + prependSize, changetype(this), thisSize); - return runtime.register(out); + return gc.register(out); } padEnd(targetLength: i32, padString: string = " "): String { @@ -308,7 +309,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var padSize = padString.length << 1; if (targetSize < thisSize || !padSize) return this; var appendSize = targetSize - thisSize; - var out = runtime.allocRaw(targetSize); + var out = runtime.alloc(targetSize); memory.copy(out, changetype(this), thisSize); if (appendSize > padSize) { let repeatCount = (appendSize - 2) / padSize; @@ -319,7 +320,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut } else { memory.copy(out + thisSize, changetype(padString), appendSize); } - return runtime.register(out); + return gc.register(out); } repeat(count: i32 = 0): String { @@ -333,9 +334,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut if (count == 0 || !length) return changetype(""); if (count == 1) return this; - var out = runtime.allocRaw((length * count) << 1); + var out = runtime.alloc((length * count) << 1); memory.repeat(out, changetype(this), length << 1, count); - return runtime.register(out); + return gc.register(out); } slice(beginIndex: i32, endIndex: i32 = i32.MAX_VALUE): String { @@ -344,9 +345,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var end = endIndex < 0 ? max(endIndex + len, 0) : min(endIndex, len); len = end - begin; if (len <= 0) return changetype(""); - var out = runtime.allocRaw(len << 1); + var out = runtime.alloc(len << 1); memory.copy(out, changetype(this) + (begin << 1), len << 1); - return runtime.register(out); + return gc.register(out); } split(separator: String | null = null, limit: i32 = i32.MAX_VALUE): String[] { @@ -364,7 +365,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut let buffer = unreachable(); // TODO // let buffer = result.buffer_; for (let i: isize = 0; i < length; ++i) { - let char = runtime.allocRaw(2); + let char = runtime.alloc(2); store( changetype(char), load( @@ -384,9 +385,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut while ((end = this.indexOf(separator!, start)) != -1) { let len = end - start; if (len > 0) { - let out = runtime.allocRaw(len << 1); + let out = runtime.alloc(len << 1); memory.copy(out, changetype(this) + (start << 1), len << 1); - result.push(runtime.register(out)); + result.push(gc.register(out)); } else { result.push(changetype("")); } @@ -400,9 +401,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut } var len = length - start; if (len > 0) { - let out = runtime.allocRaw(len << 1); + let out = runtime.alloc(len << 1); memory.copy(out, changetype(this) + (start << 1), len << 1); - result.push(runtime.register(out)); + result.push(gc.register(out)); } else { result.push(changetype("")); } @@ -474,10 +475,10 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut } } assert(ptrPos == len); - var out = runtime.allocRaw(bufPos); + var out = runtime.alloc(bufPos); memory.copy(changetype(out), buf, bufPos); memory.free(buf); - return runtime.register(out); + return gc.register(out); } toUTF8(): usize { diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index ff46d25414..83ef43020d 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -1,4 +1,5 @@ import { runtime, ArrayBufferView } from "./runtime"; +import { gc } from "./gc"; import { COMPARATOR, SORT as SORT_IMPL } from "./util/sort"; function clampToByte(value: i32): i32 { @@ -759,11 +760,11 @@ function SUBARRAY( else begin = min(begin, length); if (end < 0) end = max(length + end, begin); else end = max(min(end, length), begin); - var out = runtime.allocRaw(offsetof()); + var out = runtime.alloc(offsetof()); store(out, buffer, offsetof("buffer")); - store(out, array.dataStart + (begin << alignof()) , offsetof("dataStart")); + store(out, array.dataStart + (begin << alignof()) , offsetof("dataStart")); store(out, array.dataEnd + ((end - begin) << alignof()), offsetof("dataEnd")); - runtime.link(buffer, runtime.register(out)); // register first, then link + gc.link(buffer, gc.register(out)); // register first, then link return changetype(out); } diff --git a/std/assembly/util/number.ts b/std/assembly/util/number.ts index 6cf716b865..e62a40bc64 100644 --- a/std/assembly/util/number.ts +++ b/std/assembly/util/number.ts @@ -1,4 +1,5 @@ import { runtime, ArrayBufferView } from "../runtime"; +import { gc } from "../gc"; import { CharCode } from "./string"; // @ts-ignore: decorator @@ -265,7 +266,7 @@ export function utoa32(value: u32): String { var out = runtime.alloc(decimals << 1); utoa32_core(changetype(out), value, decimals); - return runtime.register(out); + return gc.register(out); } export function itoa32(value: i32): String { @@ -280,7 +281,7 @@ export function itoa32(value: i32): String { utoa32_core(changetype(out), value, decimals); if (sign) store(changetype(out), CharCode.MINUS); - return runtime.register(out); + return gc.register(out); } export function utoa64(value: u64): String { @@ -297,7 +298,7 @@ export function utoa64(value: u64): String { out = runtime.alloc(decimals << 1); utoa64_core(changetype(out), value, decimals); } - return runtime.register(out); + return gc.register(out); } export function itoa64(value: i64): String { @@ -319,7 +320,7 @@ export function itoa64(value: i64): String { } if (sign) store(changetype(out), CharCode.MINUS); - return runtime.register(out); + return gc.register(out); } export function itoa(value: T): String { @@ -627,7 +628,7 @@ export function dtoa(value: f64): String { var temp = runtime.alloc(MAX_DOUBLE_LENGTH << 1); var length = dtoa_core(temp, value); var result = changetype(temp).substring(0, length); - runtime.free(temp); + runtime.freeUnregistered(temp); return result; } diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 5c669541c5..7554028b5e 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -1170,7 +1170,7 @@ local.get $0 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/runtime.allocRaw (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.alloc (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -1197,240 +1197,7 @@ i32.const 16 i32.add ) - (func $~lib/util/memory/memset (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $1 - i32.eqz - if - return - end - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $2 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - local.get $0 - i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $1 - local.get $0 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 16 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 20 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $2 - local.get $0 - i32.add - local.set $0 - local.get $1 - local.get $2 - i32.sub - local.set $1 - loop $continue|0 - 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 - ) - (func $~lib/memory/memory.fill (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - call $~lib/util/memory/memset - ) - (func $~lib/runtime/runtime.alloc (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - call $~lib/runtime/runtime.allocRaw - local.tee $1 - local.get $0 - call $~lib/memory/memory.fill - local.get $1 - ) - (func $~lib/util/memory/memcpy (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2327,7 +2094,7 @@ i32.store8 end ) - (func $~lib/util/memory/memmove (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2525,7 +2292,231 @@ end end ) - (func $~lib/allocator/tlsf/__memory_free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/util/memory/memset (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $1 + i32.eqz + if + return + end + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 1 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + i32.const 1 + i32.add + i32.const 0 + i32.store8 + local.get $0 + i32.const 2 + i32.add + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 2 + i32.sub + i32.const 0 + i32.store8 + local.get $2 + i32.const 3 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + i32.const 3 + i32.add + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 4 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 8 + i32.le_u + if + return + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $2 + local.get $0 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $1 + local.get $2 + i32.sub + i32.const -4 + i32.and + local.tee $1 + local.get $0 + i32.add + i32.const 4 + i32.sub + i32.const 0 + i32.store + local.get $1 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 4 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 8 + i32.add + i32.const 0 + i32.store + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 12 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 8 + i32.sub + i32.const 0 + i32.store + local.get $1 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + i32.const 12 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 16 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 20 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 24 + i32.add + i32.const 0 + i32.store + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 28 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 24 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 20 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 16 + i32.sub + i32.const 0 + i32.store + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $2 + local.get $0 + i32.add + local.set $0 + local.get $1 + local.get $2 + i32.sub + local.set $1 + loop $continue|0 + 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 + ) + (func $~lib/memory/memory.fill (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/util/memory/memset + ) + (func $~lib/allocator/tlsf/__memory_free (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2563,7 +2554,7 @@ end end ) - (func $~lib/runtime/runtime.realloc (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.realloc (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2604,7 +2595,8 @@ local.get $4 call $~lib/allocator/tlsf/__memory_allocate local.tee $5 - i32.const -1520547049 + local.get $3 + i32.load i32.store local.get $5 i32.const 0 @@ -2637,7 +2629,7 @@ if i32.const 0 i32.const 184 - i32.const 96 + i32.const 87 i32.const 10 call $~lib/env/abort unreachable @@ -2667,14 +2659,14 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/runtime.unref (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.unrefUnregistered (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 232 i32.lt_u if i32.const 0 i32.const 184 - i32.const 117 + i32.const 111 i32.const 4 call $~lib/env/abort unreachable @@ -2689,14 +2681,14 @@ if i32.const 0 i32.const 184 - i32.const 119 + i32.const 113 i32.const 4 call $~lib/env/abort unreachable end local.get $0 ) - (func $start:std/runtime (; 26 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 25 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2924,7 +2916,7 @@ unreachable end global.get $std/runtime/ref2 - call $~lib/runtime/runtime.unref + call $~lib/runtime/runtime.unrefUnregistered call $~lib/allocator/tlsf/__memory_free global.get $std/runtime/barrier2 call $~lib/runtime/runtime.alloc @@ -2945,7 +2937,7 @@ global.set $std/runtime/ref4 global.get $std/runtime/ref4 local.tee $0 - call $~lib/runtime/runtime.unref + call $~lib/runtime/runtime.unrefUnregistered i32.const 2 i32.store local.get $0 @@ -3023,10 +3015,10 @@ unreachable end ) - (func $start (; 27 ;) (type $FUNCSIG$v) + (func $start (; 26 ;) (type $FUNCSIG$v) call $start:std/runtime ) - (func $null (; 28 ;) (type $FUNCSIG$v) + (func $null (; 27 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/runtime.ts b/tests/compiler/std/runtime.ts index 14a78c8a6a..4c30e3f134 100644 --- a/tests/compiler/std/runtime.ts +++ b/tests/compiler/std/runtime.ts @@ -50,12 +50,12 @@ var ref2 = runtime.realloc(ref1, barrier2); assert(ref1 != ref2); // moves var header2 = changetype(ref2 - runtime.Header.SIZE); assert(header2.payloadSize == barrier2); -runtime.free(ref2); +runtime.freeUnregistered(ref2); var ref3 = runtime.alloc(barrier2); assert(ref1 == ref3); // reuses space of ref1 (free'd in realloc), ref2 (explicitly free'd) var ref4 = runtime.alloc(barrier1); -runtime.register(ref4); // should call __REGISTER_IMPL +gc.register(ref4); // should call __gc_register assert(register_ref == ref4); var header4 = changetype(register_ref - runtime.Header.SIZE); assert(header4.classId == gc.classId()); diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index b22c518a26..f0cb220864 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -1466,7 +1466,7 @@ call $~lib/allocator/tlsf/__memory_allocate return ) - (func $~lib/runtime/runtime.allocRaw (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.alloc (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/runtime.adjust @@ -1488,278 +1488,7 @@ i32.const 16 i32.add ) - (func $~lib/util/memory/memset (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i64) - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - end - br $continue|0 - end - end - end - ) - (func $~lib/memory/memory.fill (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memset - ) - (func $~lib/runtime/runtime.alloc (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - call $~lib/runtime/runtime.allocRaw - local.set $1 - local.get $1 - i32.const 0 - local.get $0 - call $~lib/memory/memory.fill - local.get $1 - ) - (func $~lib/util/memory/memcpy (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2375,11 +2104,65 @@ end unreachable end - end - local.get $2 - i32.const 16 - i32.and - if + end + local.get $2 + i32.const 16 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 block (result i32) local.get $0 local.tee $5 @@ -2614,6 +2397,11 @@ end i32.load8_u i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if block (result i32) local.get $0 local.tee $5 @@ -2668,11 +2456,6 @@ end i32.load8_u i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if block (result i32) local.get $0 local.tee $5 @@ -2763,6 +2546,11 @@ end i32.load8_u i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if block (result i32) local.get $0 local.tee $5 @@ -2817,11 +2605,6 @@ end i32.load8_u i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if block (result i32) local.get $0 local.tee $5 @@ -2840,6 +2623,11 @@ end i32.load8_u i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if block (result i32) local.get $0 local.tee $5 @@ -2876,6 +2664,11 @@ end i32.load8_u i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if block (result i32) local.get $0 local.tee $5 @@ -2892,308 +2685,504 @@ local.set $1 local.get $5 end - i32.load8_u - i32.store8 + i32.load8_u + i32.store8 + end + ) + (func $~lib/util/memory/memmove (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + local.tee $3 + if (result i32) + local.get $3 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + end + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 + if + block + block (result i32) + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + end + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|2 + end + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end end + ) + (func $~lib/memory/memory.copy (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 local.get $2 - i32.const 2 - i32.and + call $~lib/util/memory/memmove + ) + (func $~lib/util/memory/memset (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i64) + local.get $2 + i32.eqz if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 + return end + local.get $0 + local.get $1 + i32.store8 + local.get $0 local.get $2 + i32.add i32.const 1 - i32.and + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 + return end - ) - (func $~lib/util/memory/memmove (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) local.get $0 + i32.const 1 + i32.add local.get $1 - i32.eq + i32.store8 + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u if return end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $4 + local.get $0 + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 12 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.get $4 + i32.store + local.get $0 local.get $2 i32.add + i32.const 24 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 20 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.get $4 + i32.store + i32.const 24 local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - return - end + i32.const 4 + i32.and + i32.add + local.set $3 local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|0 - loop $continue|0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $4 + i64.extend_i32_u + local.get $4 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $5 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $5 + i64.store local.get $0 - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - end - i32.load8_u - i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - br $continue|1 - end - end - end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|2 - end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 + i32.add + local.get $5 + i64.store local.get $0 - local.get $2 + i32.const 16 i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - end - br $continue|3 - end - end - end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 - end - end - end - end - block $break|5 - loop $continue|5 - local.get $2 - if + local.get $5 + i64.store local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 + i32.const 24 i32.add - local.get $1 + local.get $5 + i64.store local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 i32.add - i32.load8_u - i32.store8 - br $continue|5 + local.set $0 end + br $continue|0 end end end ) - (func $~lib/memory/memory.copy (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 local.get $2 - call $~lib/util/memory/memmove + call $~lib/util/memory/memset ) - (func $~lib/allocator/tlsf/__memory_free (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__memory_free (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3236,19 +3225,15 @@ end end ) - (func $~lib/memory/memory.free (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/tlsf/__memory_free ) - (func $std/runtime/__gc_register (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/runtime/__gc_register (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $std/runtime/register_ref ) - (func $~lib/gc/gc.register (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - call $std/runtime/__gc_register - ) - (func $~lib/runtime/runtime.realloc (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.realloc (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3282,7 +3267,8 @@ call $~lib/memory/memory.allocate local.set $5 local.get $5 - i32.const -1520547049 + local.get $2 + i32.load i32.store local.get $5 i32.const 0 @@ -3318,7 +3304,7 @@ if i32.const 0 i32.const 184 - i32.const 96 + i32.const 87 i32.const 10 call $~lib/env/abort unreachable @@ -3327,7 +3313,7 @@ call $~lib/memory/memory.free else local.get $0 - call $~lib/gc/gc.register + call $std/runtime/__gc_register end local.get $5 local.set $2 @@ -3351,7 +3337,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/runtime.unref (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.unrefUnregistered (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3362,7 +3348,7 @@ if i32.const 0 i32.const 184 - i32.const 117 + i32.const 111 i32.const 4 call $~lib/env/abort unreachable @@ -3379,25 +3365,25 @@ if i32.const 0 i32.const 184 - i32.const 119 + i32.const 113 i32.const 4 call $~lib/env/abort unreachable end local.get $1 ) - (func $~lib/runtime/runtime.free (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.freeUnregistered (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $~lib/runtime/runtime.unref + call $~lib/runtime/runtime.unrefUnregistered call $~lib/memory/memory.free ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub i32.load offset=4 ) - (func $~lib/string/String#get:length (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -3405,7 +3391,7 @@ i32.const 1 i32.shr_u ) - (func $start:std/runtime (; 40 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 38 ;) (type $FUNCSIG$v) (local $0 i32) call $start:~lib/allocator/tlsf i32.const 2 @@ -3631,7 +3617,7 @@ unreachable end global.get $std/runtime/ref2 - call $~lib/runtime/runtime.free + call $~lib/runtime/runtime.freeUnregistered global.get $std/runtime/barrier2 call $~lib/runtime/runtime.alloc global.set $std/runtime/ref3 @@ -3650,15 +3636,15 @@ global.get $std/runtime/barrier1 call $~lib/runtime/runtime.alloc global.set $std/runtime/ref4 - block $~lib/runtime/runtime.register|inlined.0 (result i32) + block $~lib/gc/gc.register|inlined.0 (result i32) global.get $std/runtime/ref4 local.set $0 local.get $0 - call $~lib/runtime/runtime.unref + call $~lib/runtime/runtime.unrefUnregistered i32.const 2 i32.store local.get $0 - call $~lib/gc/gc.register + call $std/runtime/__gc_register local.get $0 end drop @@ -3734,9 +3720,9 @@ unreachable end ) - (func $start (; 41 ;) (type $FUNCSIG$v) + (func $start (; 39 ;) (type $FUNCSIG$v) call $start:std/runtime ) - (func $null (; 42 ;) (type $FUNCSIG$v) + (func $null (; 40 ;) (type $FUNCSIG$v) ) ) From d3ca06b7ce9a07b6b9bbc00986ed7db3b88d3708 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 14 Mar 2019 12:52:46 +0100 Subject: [PATCH 035/119] inline single-use implementations --- std/assembly/allocator/arena.ts | 6 +- std/assembly/allocator/emscripten.ts | 4 +- std/assembly/allocator/system.ts | 4 +- std/assembly/allocator/tlsf.ts | 4 +- std/assembly/util/memory.ts | 6 + tests/compiler/std/runtime.optimized.wat | 926 ++++++++------- tests/compiler/std/runtime.untouched.wat | 1352 +++++++++++----------- 7 files changed, 1149 insertions(+), 1153 deletions(-) diff --git a/std/assembly/allocator/arena.ts b/std/assembly/allocator/arena.ts index eb867ca163..b63e0d7fee 100644 --- a/std/assembly/allocator/arena.ts +++ b/std/assembly/allocator/arena.ts @@ -10,7 +10,7 @@ var startOffset: usize = (HEAP_BASE + AL_MASK) & ~AL_MASK; var offset: usize = startOffset; // @ts-ignore: decorator -@unsafe @global +@unsafe @global @inline function __memory_allocate(size: usize): usize { if (size > MAX_SIZE_32) unreachable(); var ptr = offset; @@ -30,12 +30,12 @@ function __memory_allocate(size: usize): usize { } // @ts-ignore: decorator -@unsafe @global +@unsafe @global @inline function __memory_free(ptr: usize): void { } // @ts-ignore: decorator -@unsafe @global +@unsafe @global @inline function __memory_reset(): void { offset = startOffset; } diff --git a/std/assembly/allocator/emscripten.ts b/std/assembly/allocator/emscripten.ts index 81c3700fe6..e6ef0ae297 100644 --- a/std/assembly/allocator/emscripten.ts +++ b/std/assembly/allocator/emscripten.ts @@ -7,13 +7,13 @@ declare function _malloc(size: usize): usize; declare function _free(ptr: usize): void; // @ts-ignore: decorator -@unsafe @global +@unsafe @global @inline function __memory_allocate(size: usize): usize { return _malloc(size); } // @ts-ignore: decorator -@unsafe @global +@unsafe @global @inline function __memory_free(ptr: usize): void { _free(ptr); } diff --git a/std/assembly/allocator/system.ts b/std/assembly/allocator/system.ts index 9ec0dc4a60..e137e43e94 100644 --- a/std/assembly/allocator/system.ts +++ b/std/assembly/allocator/system.ts @@ -7,13 +7,13 @@ declare function malloc(size: usize): usize; declare function free(ptr: usize): void; // @ts-ignore: decorator -@unsafe @global +@unsafe @global @inline function __memory_allocate(size: usize): usize { return malloc(size); } // @ts-ignore: decorator -@unsafe @global +@unsafe @global @inline function __memory_free(ptr: usize): void { free(ptr); } diff --git a/std/assembly/allocator/tlsf.ts b/std/assembly/allocator/tlsf.ts index c3c59ca1d9..c4bf9991e4 100644 --- a/std/assembly/allocator/tlsf.ts +++ b/std/assembly/allocator/tlsf.ts @@ -423,7 +423,7 @@ var ROOT: Root = changetype(0); /** Allocates a chunk of memory. */ // @ts-ignore: decorator -@unsafe @global +@unsafe @global @inline function __memory_allocate(size: usize): usize { // initialize if necessary var root = ROOT; @@ -473,7 +473,7 @@ function __memory_allocate(size: usize): usize { /** Frees the chunk of memory at the specified address. */ // @ts-ignore: decorator -@unsafe @global +@unsafe @global @inline function __memory_free(data: usize): void { if (data) { let root = ROOT; diff --git a/std/assembly/util/memory.ts b/std/assembly/util/memory.ts index d48ec44fe8..3b4af9d186 100644 --- a/std/assembly/util/memory.ts +++ b/std/assembly/util/memory.ts @@ -141,6 +141,8 @@ export function memcpy(dest: usize, src: usize, n: usize): void { // see: musl/s } } +// @ts-ignore: decorator +@inline export function memmove(dest: usize, src: usize, n: usize): void { // see: musl/src/string/memmove.c if (dest === src) return; if (src + n <= dest || dest + n <= src) { @@ -182,6 +184,8 @@ export function memmove(dest: usize, src: usize, n: usize): void { // see: musl/ } } +// @ts-ignore: decorator +@inline export function memset(dest: usize, c: u8, n: usize): void { // see: musl/src/string/memset // fill head and tail with minimal branching @@ -242,6 +246,8 @@ export function memset(dest: usize, c: u8, n: usize): void { // see: musl/src/st } } +// @ts-ignore: decorator +@inline export function memcmp(vl: usize, vr: usize, n: usize): i32 { // see: musl/src/string/memcmp.c if (vl == vr) return 0; while (n != 0 && load(vl) == load(vr)) { diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 7554028b5e..eac3b40a50 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -994,29 +994,30 @@ i32.const 8 i32.add ) - (func $~lib/allocator/tlsf/__memory_allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) + local.get $0 + local.set $2 global.get $~lib/allocator/tlsf/ROOT local.tee $3 i32.eqz if i32.const 1 current_memory - local.tee $4 - i32.gt_s local.tee $1 + i32.gt_s + local.tee $0 if (result i32) i32.const 1 - local.get $4 + local.get $1 i32.sub grow_memory i32.const 0 i32.lt_s else - local.get $1 + local.get $0 end if unreachable @@ -1032,39 +1033,39 @@ i32.const 0 i32.store i32.const 0 - local.set $1 + local.set $0 loop $repeat|0 - local.get $1 + local.get $0 i32.const 22 i32.lt_u if i32.const 216 - local.get $1 + local.get $0 i32.const 0 call $~lib/allocator/tlsf/Root#setSLMap i32.const 0 - local.set $2 + local.set $1 loop $repeat|1 - local.get $2 + local.get $1 i32.const 32 i32.lt_u if i32.const 216 + local.get $0 local.get $1 - local.get $2 i32.const 0 call $~lib/allocator/tlsf/Root#setHead - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $repeat|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end @@ -1075,88 +1076,83 @@ i32.shl call $~lib/allocator/tlsf/Root#addMemory end - local.get $0 + local.get $2 i32.const 1073741824 i32.gt_u if unreachable end - block (result i32) - local.get $3 - local.get $0 - i32.const 7 + local.get $3 + local.get $2 + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + i32.const 16 + local.get $0 + i32.const 16 + i32.gt_u + select + local.tee $2 + call $~lib/allocator/tlsf/Root#search + local.tee $0 + i32.eqz + if + current_memory + local.tee $1 + local.get $2 + i32.const 65535 i32.add - i32.const -8 + i32.const -65536 i32.and - local.tee $2 - i32.const 16 - local.get $2 i32.const 16 - i32.gt_u - select + i32.shr_u local.tee $0 - call $~lib/allocator/tlsf/Root#search - local.tee $1 - i32.eqz + local.get $1 + local.get $0 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s if - current_memory - local.tee $2 local.get $0 - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $4 - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select grow_memory i32.const 0 i32.lt_s if - local.get $4 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $3 - local.get $2 - i32.const 16 - i32.shl - current_memory - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - local.get $3 - local.get $0 - call $~lib/allocator/tlsf/Root#search - local.tee $2 - if (result i32) - local.get $2 - else - i32.const 0 - i32.const 16 - i32.const 467 - i32.const 12 - call $~lib/env/abort unreachable end - local.set $1 end + local.get $3 local.get $1 - i32.load - i32.const -4 - i32.and - local.get $0 - i32.lt_u + i32.const 16 + i32.shl + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + local.get $3 + local.get $2 + call $~lib/allocator/tlsf/Root#search + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 467 + i32.const 12 + call $~lib/env/abort + unreachable + end end + local.get $0 + i32.load + i32.const -4 + i32.and + local.get $2 + i32.lt_u if i32.const 0 i32.const 16 @@ -1166,8 +1162,8 @@ unreachable end local.get $3 - local.get $1 local.get $0 + local.get $2 call $~lib/allocator/tlsf/Root#use ) (func $~lib/runtime/runtime.alloc (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -1180,7 +1176,7 @@ i32.clz i32.sub i32.shl - call $~lib/allocator/tlsf/__memory_allocate + call $~lib/memory/memory.allocate local.tee $1 i32.const -1520547049 i32.store @@ -2094,429 +2090,415 @@ i32.store8 end ) - (func $~lib/util/memory/memmove (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if - local.get $0 + block $~lib/util/memory/memmove|inlined.0 local.get $2 - i32.add - local.get $1 - i32.le_u local.set $3 - end - local.get $3 - if + local.get $1 local.get $0 + local.tee $2 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 local.get $1 + local.get $3 + i32.add local.get $2 - call $~lib/util/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and + i32.le_u + local.tee $0 + i32.eqz + if + local.get $2 + local.get $3 + i32.add + local.get $1 + i32.le_u + local.set $0 + end local.get $0 - i32.const 7 - i32.and - i32.eq if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if + local.get $2 + local.get $1 + local.get $3 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $2 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 local.get $2 - i32.eqz + i32.const 7 + i32.and + if + local.get $3 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $3 + i32.const 1 + i32.sub + local.set $3 + local.get $2 + local.tee $4 + i32.const 1 + i32.add + local.set $2 + local.get $1 + local.tee $0 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $0 + i32.load8_u + i32.store8 + br $continue|0 + end + end + loop $continue|1 + local.get $3 + i32.const 8 + i32.ge_u if - return + local.get $2 + local.get $1 + i64.load + i64.store + local.get $3 + i32.const 8 + i32.sub + local.set $3 + local.get $2 + i32.const 8 + i32.add + local.set $2 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 end + end + end + loop $continue|2 + local.get $3 + if local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 local.tee $4 i32.const 1 i32.add - local.set $0 + local.set $2 local.get $1 - local.tee $3 + local.tee $0 i32.const 1 i32.add local.set $1 local.get $4 - local.get $3 + local.get $0 i32.load8_u i32.store8 - br $continue|0 + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $continue|2 end end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 + else + local.get $1 + i32.const 7 + i32.and + local.get $2 + i32.const 7 + i32.and + i32.eq + if + loop $continue|3 + local.get $2 + local.get $3 i32.add - local.set $0 - local.get $1 + i32.const 7 + i32.and + if + local.get $3 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $3 + i32.const 1 + i32.sub + local.tee $3 + local.get $2 + i32.add + local.get $1 + local.get $3 + i32.add + i32.load8_u + i32.store8 + br $continue|3 + end + end + loop $continue|4 + local.get $3 i32.const 8 - i32.add - local.set $1 - br $continue|1 + i32.ge_u + if + local.get $3 + i32.const 8 + i32.sub + local.tee $3 + local.get $2 + i32.add + local.get $1 + local.get $3 + i32.add + i64.load + i64.store + br $continue|4 + end end end - end - loop $continue|2 - local.get $2 - if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 + loop $continue|5 local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and if - local.get $2 - i32.eqz - if - return - end - local.get $2 + local.get $3 i32.const 1 i32.sub - local.tee $2 - local.get $0 + local.tee $3 + local.get $2 i32.add local.get $1 - local.get $2 + local.get $3 i32.add i32.load8_u i32.store8 - br $continue|3 - end - end - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - br $continue|4 + br $continue|5 end end end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end end ) - (func $~lib/util/memory/memset (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) - local.get $1 - i32.eqz - if - return - end - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $2 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - local.get $0 - i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $1 - local.get $0 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 16 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 20 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $2 - local.get $0 - i32.add - local.set $0 - local.get $1 - local.get $2 - i32.sub - local.set $1 - loop $continue|0 + block $~lib/util/memory/memset|inlined.0 local.get $1 - i32.const 32 - i32.ge_u - if - local.get $0 - i64.const 0 - i64.store - local.get $0 - i32.const 8 - i32.add - i64.const 0 - i64.store - local.get $0 - i32.const 16 - i32.add - i64.const 0 - i64.store - local.get $0 - i32.const 24 - i32.add - i64.const 0 - i64.store + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 1 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 2 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 1 + i32.add + i32.const 0 + i32.store8 + local.get $0 + i32.const 2 + i32.add + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 2 + i32.sub + i32.const 0 + i32.store8 + local.get $2 + i32.const 3 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 6 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 3 + i32.add + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 4 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $1 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $2 + i32.sub + local.set $1 + local.get $0 + local.get $2 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $1 + i32.const -4 + i32.and + local.tee $1 + local.get $0 + i32.add + i32.const 4 + i32.sub + i32.const 0 + i32.store + local.get $1 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 4 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 8 + i32.add + i32.const 0 + i32.store + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 12 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 8 + i32.sub + i32.const 0 + i32.store + local.get $1 + i32.const 24 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 12 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 16 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 20 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 24 + i32.add + i32.const 0 + i32.store + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 28 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 24 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 20 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 16 + i32.sub + i32.const 0 + i32.store + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $2 + local.get $0 + i32.add + local.set $0 + local.get $1 + local.get $2 + i32.sub + local.set $1 + loop $continue|0 local.get $1 i32.const 32 - i32.sub - local.set $1 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $continue|0 + i32.ge_u + if + local.get $0 + i64.const 0 + i64.store + local.get $0 + i32.const 8 + i32.add + i64.const 0 + i64.store + local.get $0 + i32.const 16 + i32.add + i64.const 0 + i64.store + local.get $0 + i32.const 24 + i32.add + i64.const 0 + i64.store + local.get $1 + i32.const 32 + i32.sub + local.set $1 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $continue|0 + end end end ) - (func $~lib/memory/memory.fill (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - call $~lib/util/memory/memset - ) - (func $~lib/allocator/tlsf/__memory_free (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2554,7 +2536,7 @@ end end ) - (func $~lib/runtime/runtime.realloc (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.realloc (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2593,7 +2575,7 @@ i32.lt_u if local.get $4 - call $~lib/allocator/tlsf/__memory_allocate + call $~lib/memory/memory.allocate local.tee $5 local.get $3 i32.load @@ -2610,7 +2592,7 @@ local.tee $4 local.get $0 local.get $2 - call $~lib/util/memory/memmove + call $~lib/memory/memory.copy local.get $2 local.get $4 i32.add @@ -2635,7 +2617,7 @@ unreachable end local.get $3 - call $~lib/allocator/tlsf/__memory_free + call $~lib/memory/memory.free else local.get $0 global.set $std/runtime/register_ref @@ -2659,7 +2641,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/runtime.unrefUnregistered (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.unrefUnregistered (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 232 i32.lt_u @@ -2688,7 +2670,7 @@ end local.get $0 ) - (func $start:std/runtime (; 25 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 24 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2705,20 +2687,20 @@ i32.clz i32.sub i32.shl - local.tee $2 + local.tee $1 i32.const 0 i32.ne - local.tee $1 - if - local.get $2 + local.tee $2 + if (result i32) + local.get $1 i32.const 1 i32.sub - local.get $2 + local.get $1 i32.and i32.eqz - local.set $1 + else + local.get $2 end - local.get $1 if local.get $0 i32.const 1 @@ -2746,7 +2728,6 @@ i32.const 1 i32.const 32 global.get $std/runtime/barrier2 - local.tee $1 i32.const 16 i32.add i32.clz @@ -2754,7 +2735,7 @@ i32.shl i32.const 1 i32.const 32 - local.get $1 + global.get $std/runtime/barrier2 i32.const 15 i32.add i32.clz @@ -2777,7 +2758,6 @@ i32.const 1 i32.const 32 global.get $std/runtime/barrier3 - local.tee $1 i32.const 16 i32.add i32.clz @@ -2785,7 +2765,7 @@ i32.shl i32.const 1 i32.const 32 - local.get $1 + global.get $std/runtime/barrier3 i32.const 15 i32.add i32.clz @@ -2917,7 +2897,7 @@ end global.get $std/runtime/ref2 call $~lib/runtime/runtime.unrefUnregistered - call $~lib/allocator/tlsf/__memory_free + call $~lib/memory/memory.free global.get $std/runtime/barrier2 call $~lib/runtime/runtime.alloc global.set $std/runtime/ref3 @@ -3015,10 +2995,10 @@ unreachable end ) - (func $start (; 26 ;) (type $FUNCSIG$v) + (func $start (; 25 ;) (type $FUNCSIG$v) call $start:std/runtime ) - (func $null (; 27 ;) (type $FUNCSIG$v) + (func $null (; 26 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index f0cb220864..491839db59 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -1225,7 +1225,7 @@ global.get $~lib/allocator/tlsf/Block.INFO i32.add ) - (func $~lib/allocator/tlsf/__memory_allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1233,240 +1233,241 @@ (local $5 i32) (local $6 i32) (local $7 i32) - global.get $~lib/allocator/tlsf/ROOT - local.set $1 - local.get $1 - i32.eqz - if - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and + (local $8 i32) + block $~lib/allocator/tlsf/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 + global.get $~lib/allocator/tlsf/ROOT local.set $2 - current_memory - local.set $3 local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $4 - local.get $4 - local.get $3 - i32.gt_s - local.tee $5 - if (result i32) + i32.eqz + if + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $3 + current_memory + local.set $4 + local.get $3 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $5 local.get $4 + i32.gt_s + local.tee $6 + if (result i32) + local.get $5 + local.get $4 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + local.get $6 + end + if + unreachable + end local.get $3 - i32.sub - grow_memory + local.tee $2 + global.set $~lib/allocator/tlsf/ROOT + local.get $2 i32.const 0 - i32.lt_s - else - local.get $5 - end - if - unreachable - end - local.get $2 - local.tee $1 - global.set $~lib/allocator/tlsf/ROOT - local.get $1 - i32.const 0 - call $~lib/allocator/tlsf/Root#set:tailRef - local.get $1 - i32.const 0 - i32.store - block $break|0 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $2 i32.const 0 - local.set $5 - loop $repeat|0 - local.get $5 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - br_if $break|0 - block - local.get $1 - local.get $5 - i32.const 0 - call $~lib/allocator/tlsf/Root#setSLMap - block $break|1 + i32.store + block $break|0 + i32.const 0 + local.set $6 + loop $repeat|0 + local.get $6 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + br_if $break|0 + block + local.get $2 + local.get $6 i32.const 0 - local.set $6 - loop $repeat|1 - local.get $6 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u - i32.eqz - br_if $break|1 - local.get $1 - local.get $5 - local.get $6 + call $~lib/allocator/tlsf/Root#setSLMap + block $break|1 i32.const 0 - call $~lib/allocator/tlsf/Root#setHead - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $repeat|1 + local.set $7 + loop $repeat|1 + local.get $7 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + br_if $break|1 + local.get $2 + local.get $6 + local.get $7 + i32.const 0 + call $~lib/allocator/tlsf/Root#setHead + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $repeat|1 + unreachable + end unreachable end - unreachable end + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $repeat|0 + unreachable end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $repeat|0 unreachable end + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + end + local.get $1 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.gt_u + if unreachable end local.get $1 - local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add i32.const 7 i32.add i32.const 7 i32.const -1 i32.xor i32.and - current_memory - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - drop - end - local.get $0 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.gt_u - if - unreachable - end - local.get $0 - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.tee $4 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - local.tee $3 - local.get $4 - local.get $3 - i32.gt_u - select - local.set $0 - local.get $1 - local.get $0 - call $~lib/allocator/tlsf/Root#search - local.set $7 - local.get $7 - i32.eqz - if - current_memory - local.set $4 - local.get $0 - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $3 - local.get $4 - local.tee $2 - local.get $3 local.tee $5 - local.get $2 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + local.tee $4 local.get $5 - i32.gt_s + local.get $4 + i32.gt_u select - local.set $2 + local.set $1 local.get $2 - grow_memory - i32.const 0 - i32.lt_s + local.get $1 + call $~lib/allocator/tlsf/Root#search + local.set $5 + local.get $5 + i32.eqz if + current_memory + local.set $4 + local.get $1 + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $3 + local.get $4 + local.tee $6 local.get $3 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + current_memory + local.set $7 + local.get $2 + local.get $4 + i32.const 16 + i32.shl + local.get $7 + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/Root#search + local.tee $8 + i32.eqz + if (result i32) + i32.const 0 + i32.const 16 + i32.const 467 + i32.const 12 + call $~lib/env/abort unreachable + else + local.get $8 end + local.set $5 end - current_memory - local.set $5 - local.get $1 - local.get $4 - i32.const 16 - i32.shl local.get $5 - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - drop + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and local.get $1 - local.get $0 - call $~lib/allocator/tlsf/Root#search - local.tee $6 + i32.ge_u i32.eqz - if (result i32) + if i32.const 0 i32.const 16 - i32.const 467 - i32.const 12 + i32.const 470 + i32.const 2 call $~lib/env/abort unreachable - else - local.get $6 end - local.set $7 - end - local.get $7 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.get $0 - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 16 - i32.const 470 - i32.const 2 - call $~lib/env/abort - unreachable + local.get $2 + local.get $5 + local.get $1 + call $~lib/allocator/tlsf/Root#use end - local.get $1 - local.get $7 - local.get $0 - call $~lib/allocator/tlsf/Root#use - ) - (func $~lib/memory/memory.allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/tlsf/__memory_allocate return ) - (func $~lib/runtime/runtime.alloc (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.alloc (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/runtime.adjust @@ -1488,7 +1489,7 @@ i32.const 16 i32.add ) - (func $~lib/util/memory/memcpy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2689,517 +2690,530 @@ i32.store8 end ) - (func $~lib/util/memory/memmove (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/util/memory/memmove|inlined.0 local.get $0 + local.set $3 local.get $1 + local.set $4 local.get $2 - call $~lib/util/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and + local.set $5 + local.get $3 + local.get $4 i32.eq if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 + br $~lib/util/memory/memmove|inlined.0 + end + local.get $4 + local.get $5 + i32.add + local.get $3 + i32.le_u + local.tee $6 + if (result i32) + local.get $6 + else + local.get $3 + local.get $5 + i32.add + local.get $4 + i32.le_u + end + if + local.get $3 + local.get $4 + local.get $5 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $3 + local.get $4 + i32.lt_u + if + local.get $4 + i32.const 7 + i32.and + local.get $3 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $3 + i32.const 7 + i32.and + if + block + local.get $5 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $5 i32.const 1 - i32.add - local.set $1 - local.get $3 + i32.sub + local.set $5 + block (result i32) + local.get $3 + local.tee $6 + i32.const 1 + i32.add + local.set $3 + local.get $6 + end + block (result i32) + local.get $4 + local.tee $6 + i32.const 1 + i32.add + local.set $4 + local.get $6 + end + i32.load8_u + i32.store8 end - i32.load8_u - i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 + br $continue|0 end - br $continue|1 end end - end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 + block $break|1 + loop $continue|1 + local.get $5 + i32.const 8 + i32.ge_u + if + block + local.get $3 + local.get $4 + i64.load + i64.store + local.get $5 + i32.const 8 + i32.sub + local.set $5 + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $4 + i32.const 8 + i32.add + local.set $4 + end + br $continue|1 end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 end - br $continue|2 end end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and + block $break|2 + loop $continue|2 + local.get $5 if block - local.get $2 - i32.eqz - if - return + block (result i32) + local.get $3 + local.tee $6 + i32.const 1 + i32.add + local.set $3 + local.get $6 + end + block (result i32) + local.get $4 + local.tee $6 + i32.const 1 + i32.add + local.set $4 + local.get $6 end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add i32.load8_u i32.store8 + local.get $5 + i32.const 1 + i32.sub + local.set $5 end - br $continue|3 + br $continue|2 end end end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store + else + local.get $4 + i32.const 7 + i32.and + local.get $3 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $3 + local.get $5 + i32.add + i32.const 7 + i32.and + if + block + local.get $5 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $3 + local.get $5 + i32.const 1 + i32.sub + local.tee $5 + i32.add + local.get $4 + local.get $5 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 end - br $continue|4 end end - end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - end - ) - (func $~lib/memory/memory.copy (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memmove - ) - (func $~lib/util/memory/memset (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i64) - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 + block $break|4 + loop $continue|4 + local.get $5 + i32.const 8 + i32.ge_u + if + block + local.get $5 + i32.const 8 + i32.sub + local.set $5 + local.get $3 + local.get $5 + i32.add + local.get $4 + local.get $5 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $5 + if + local.get $3 + local.get $5 + i32.const 1 + i32.sub + local.tee $5 + i32.add + local.get $4 + local.get $5 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end end - br $continue|0 end end end ) - (func $~lib/memory/memory.fill (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memset + (func $~lib/memory/memory.fill (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $0 + local.set $3 + local.get $1 + local.set $4 + local.get $2 + local.set $5 + local.get $5 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 1 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 1 + i32.add + local.get $4 + i32.store8 + local.get $3 + i32.const 2 + i32.add + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 2 + i32.sub + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 3 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 3 + i32.add + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $3 + i32.sub + i32.const 3 + i32.and + local.set $6 + local.get $3 + local.get $6 + i32.add + local.set $3 + local.get $5 + local.get $6 + i32.sub + local.set $5 + local.get $5 + i32.const -4 + i32.and + local.set $5 + i32.const -1 + i32.const 255 + i32.div_u + local.get $4 + i32.const 255 + i32.and + i32.mul + local.set $7 + local.get $3 + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 4 + i32.sub + local.get $7 + i32.store + local.get $5 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 4 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 8 + i32.add + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 12 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 8 + i32.sub + local.get $7 + i32.store + local.get $5 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 12 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 16 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 20 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 24 + i32.add + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 28 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 24 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 20 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 16 + i32.sub + local.get $7 + i32.store + i32.const 24 + local.get $3 + i32.const 4 + i32.and + i32.add + local.set $6 + local.get $3 + local.get $6 + i32.add + local.set $3 + local.get $5 + local.get $6 + i32.sub + local.set $5 + local.get $7 + i64.extend_i32_u + local.get $7 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $8 + block $break|0 + loop $continue|0 + local.get $5 + i32.const 32 + i32.ge_u + if + block + local.get $3 + local.get $8 + i64.store + local.get $3 + i32.const 8 + i32.add + local.get $8 + i64.store + local.get $3 + i32.const 16 + i32.add + local.get $8 + i64.store + local.get $3 + i32.const 24 + i32.add + local.get $8 + i64.store + local.get $5 + i32.const 32 + i32.sub + local.set $5 + local.get $3 + i32.const 32 + i32.add + local.set $3 + end + br $continue|0 + end + end + end + end ) - (func $~lib/allocator/tlsf/__memory_free (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $0 + local.set $1 + local.get $1 if global.get $~lib/allocator/tlsf/ROOT - local.set $1 - local.get $1 + local.set $2 + local.get $2 if - local.get $0 + local.get $1 global.get $~lib/allocator/tlsf/Block.INFO i32.sub - local.set $2 - local.get $2 - i32.load local.set $3 local.get $3 + i32.load + local.set $4 + local.get $4 global.get $~lib/allocator/tlsf/FREE i32.and i32.eqz @@ -3212,28 +3226,24 @@ call $~lib/env/abort unreachable end - local.get $2 local.get $3 + local.get $4 global.get $~lib/allocator/tlsf/FREE i32.or i32.store + local.get $2 local.get $1 - local.get $0 global.get $~lib/allocator/tlsf/Block.INFO i32.sub call $~lib/allocator/tlsf/Root#insert end end ) - (func $~lib/memory/memory.free (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - call $~lib/allocator/tlsf/__memory_free - ) - (func $std/runtime/__gc_register (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/runtime/__gc_register (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $std/runtime/register_ref ) - (func $~lib/runtime/runtime.realloc (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.realloc (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3337,7 +3347,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/runtime.unrefUnregistered (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.unrefUnregistered (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3372,18 +3382,18 @@ end local.get $1 ) - (func $~lib/runtime/runtime.freeUnregistered (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.freeUnregistered (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/runtime/runtime.unrefUnregistered call $~lib/memory/memory.free ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub i32.load offset=4 ) - (func $~lib/string/String#get:length (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -3391,7 +3401,7 @@ i32.const 1 i32.shr_u ) - (func $start:std/runtime (; 38 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 34 ;) (type $FUNCSIG$v) (local $0 i32) call $start:~lib/allocator/tlsf i32.const 2 @@ -3720,9 +3730,9 @@ unreachable end ) - (func $start (; 39 ;) (type $FUNCSIG$v) + (func $start (; 35 ;) (type $FUNCSIG$v) call $start:std/runtime ) - (func $null (; 40 ;) (type $FUNCSIG$v) + (func $null (; 36 ;) (type $FUNCSIG$v) ) ) From 968b0321a094cc3f9713045835e1b0732e605da2 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 15 Mar 2019 09:26:31 +0100 Subject: [PATCH 036/119] decisions --- src/builtins.ts | 12 +- src/common.ts | 10 +- src/compiler.ts | 289 +++++++++++++++-------- src/program.ts | 93 +++----- src/types.ts | 2 +- std/assembly/array.ts | 54 ++--- std/assembly/arraybuffer.ts | 17 +- std/assembly/collector/itcm.ts | 6 +- std/assembly/dataview.ts | 4 +- std/assembly/gc.ts | 25 +- std/assembly/index.d.ts | 30 +-- std/assembly/map.ts | 14 +- std/assembly/runtime.ts | 265 ++++++++++++--------- std/assembly/set.ts | 4 +- std/assembly/string.ts | 75 +++--- std/assembly/typedarray.ts | 7 +- std/assembly/util/number.ts | 27 +-- tests/compiler/std/runtime.optimized.wat | 73 +++--- tests/compiler/std/runtime.ts | 39 +-- tests/compiler/std/runtime.untouched.wat | 138 +++++------ 20 files changed, 623 insertions(+), 561 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index e4c1baab6e..94b0ec3fa0 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -478,9 +478,9 @@ export namespace BuiltinSymbols { export const memory_copy = "~lib/memory/memory.copy"; export const memory_fill = "~lib/memory/memory.fill"; - // std/gc.ts - export const gc_classId = "~lib/gc/gc.classId"; - export const gc_iterateRoots = "~lib/gc/gc.iterateRoots"; + // std/runtime.ts + export const CLASSID = "~lib/runtime/CLASSID"; + export const ITERATEROOTS = "~lib/runtime/ITERATEROOTS"; // std/typedarray.ts export const Int8Array = "~lib/typedarray/Int8Array"; @@ -641,7 +641,7 @@ export function compileCall( return module.createI32(getExpressionId(expr) == ExpressionId.Const ? 1 : 0); } case BuiltinSymbols.isManaged: { // isManaged() -> bool - if (!compiler.program.hasGC) { + if (!compiler.program.gcImplemented) { compiler.currentType = Type.bool; return module.createI32(0); } @@ -3621,7 +3621,7 @@ export function compileCall( // === Internal runtime ======================================================================= - case BuiltinSymbols.gc_classId: { + case BuiltinSymbols.CLASSID: { let type = evaluateConstantType(compiler, typeArguments, operands, reportNode); compiler.currentType = Type.u32; if (!type) return module.createUnreachable(); @@ -3629,7 +3629,7 @@ export function compileCall( if (!classReference) return module.createUnreachable(); return module.createI32(classReference.id); } - case BuiltinSymbols.gc_iterateRoots: { + case BuiltinSymbols.ITERATEROOTS: { if ( checkTypeAbsent(typeArguments, reportNode, prototype) | checkArgsRequired(operands, 1, reportNode, compiler) diff --git a/src/common.ts b/src/common.ts index f46ffff163..f79dcd4038 100644 --- a/src/common.ts +++ b/src/common.ts @@ -179,10 +179,14 @@ export namespace LibrarySymbols { export const Math = "Math"; export const Mathf = "Mathf"; // runtime - export const memory = "memory"; - export const allocate = "allocate"; export const abort = "abort"; - export const main = "main"; + export const ALLOCATE = "ALLOCATE"; + export const REALLOCATE = "REALLOCATE"; + export const DISCARD = "DISCARD"; + // gc + export const gc = "gc"; + export const register = "register"; + export const link = "link"; // other export const length = "length"; export const byteLength = "byteLength"; diff --git a/src/compiler.ts b/src/compiler.ts index 37c2f838be..1a2c18636e 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -4690,7 +4690,7 @@ export class Compiler extends DiagnosticEmitter { let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); let indexedSet = (target).lookupOverload(OperatorKind.INDEXED_SET, isUnchecked); if (!indexedSet) { - let arrayBufferView = this.program.arrayBufferView; + let arrayBufferView = this.program.arrayBufferViewInstance; if (arrayBufferView) { if ((target).prototype.extends(arrayBufferView.prototype)) { return compileArraySet( @@ -5910,7 +5910,7 @@ export class Compiler extends DiagnosticEmitter { let isUnchecked = this.currentFlow.is(FlowFlags.UNCHECKED_CONTEXT); let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); if (!indexedGet) { - let arrayBufferView = this.program.arrayBufferView; + let arrayBufferView = this.program.arrayBufferViewInstance; if (arrayBufferView) { if ((target).prototype.extends(arrayBufferView.prototype)) { return compileArrayGet( @@ -6427,34 +6427,17 @@ export class Compiler extends DiagnosticEmitter { return this.ensureStaticString(expression.value); } - /** Ensures that the specified array exists in static memory and returns a pointer to it. */ - ensureStaticArray(elementType: Type, values: ExpressionRef[]): ExpressionRef { + ensureStaticArrayBuffer(elementType: Type, values: ExpressionRef[]): ExpressionRef { var program = this.program; - var hasGC = program.hasGC; - var gcHeaderSize = program.gcHeaderSize; - var length = values.length; var byteSize = elementType.byteSize; var byteLength = length * byteSize; - var usizeTypeSize = this.options.usizeType.byteSize; - - var buf: Uint8Array; - var pos: u32; - - // create the backing ArrayBuffer segment var bufferInstance = assert(program.arrayBufferInstance); - var bufferHeaderSize = (bufferInstance.currentMemoryOffset + 7) & ~7; - var bufferTotalSize = 1 << (32 - clz(bufferHeaderSize + byteLength - 1)); - if (hasGC) { - buf = new Uint8Array(gcHeaderSize + bufferTotalSize); - pos = gcHeaderSize; - writeI32(ensureGCHook(this, bufferInstance), buf, program.gcHookOffset); - } else { - buf = new Uint8Array(bufferTotalSize); - pos = 0; - } - writeI32(byteLength, buf, pos + bufferInstance.offsetof(LibrarySymbols.byteLength)); - pos += bufferHeaderSize; + var runtimeHeaderSize = program.runtimeHeaderSize; + + var buf = new Uint8Array(runtimeHeaderSize + byteLength); + program.writeRuntimeHeader(buf, 0, bufferInstance, byteLength); + var pos = runtimeHeaderSize; var nativeType = elementType.toNativeType(); switch (nativeType) { case NativeType.I32: { @@ -6525,45 +6508,153 @@ export class Compiler extends DiagnosticEmitter { } default: assert(false); } - var bufferSegment = this.addMemorySegment(buf); - var bufferOffset = bufferSegment.offset; - if (hasGC) bufferOffset = i64_add(bufferOffset, i64_new(gcHeaderSize)); + assert(pos == buf.length); - // create the Array segment and return a pointer to it - var arrayPrototype = assert(program.arrayPrototype); - var arrayInstance = assert(this.resolver.resolveClass( - arrayPrototype, - [ elementType ], - makeMap() - )); - var arrayHeaderSize = (arrayInstance.currentMemoryOffset + 7) & ~7; - if (hasGC) { - buf = new Uint8Array(gcHeaderSize + arrayHeaderSize); - pos = gcHeaderSize; - writeI32(ensureGCHook(this, arrayInstance), buf, program.gcHookOffset); - } else { - buf = new Uint8Array(arrayHeaderSize); - pos = 0; - } - var arraySegment = this.addMemorySegment(buf); - var arrayOffset = arraySegment.offset; - if (hasGC) arrayOffset = i64_add(arrayOffset, i64_new(gcHeaderSize)); - this.currentType = arrayInstance.type; - var buffer_offset = pos + arrayInstance.offsetof("buffer_"); - var length_offset = pos + arrayInstance.offsetof("length_"); - if (usizeTypeSize == 8) { - writeI64(bufferOffset, buf, buffer_offset); - writeI32(length, buf, length_offset); - return this.module.createI64(i64_low(arrayOffset), i64_high(arrayOffset)); - } else { - assert(i64_is_u32(bufferOffset)); - writeI32(i64_low(bufferOffset), buf, buffer_offset); - writeI32(length, buf, length_offset); - assert(i64_is_u32(arrayOffset)); - return this.module.createI32(i64_low(arrayOffset)); - } + var segment = this.addMemorySegment(buf); + var offset = i64_add(segment.offset, i64_new(runtimeHeaderSize)); + this.currentType = bufferInstance.type; + return program.options.isWasm64 + ? this.module.createI64(i64_low(offset), i64_high(offset)) + : this.module.createI32(i64_low(offset)); } + /** Ensures that the specified array exists in static memory and returns a pointer to it. */ + // ensureStaticArray(elementType: Type, values: ExpressionRef[]): ExpressionRef { + // var program = this.program; + // var hasGC = program.hasGC; + // var gcHeaderSize = program.gcHeaderSize; + + // var length = values.length; + // var byteSize = elementType.byteSize; + // var byteLength = length * byteSize; + // var usizeTypeSize = this.options.usizeType.byteSize; + + // var buf: Uint8Array; + // var pos: u32; + + // // create the backing ArrayBuffer segment + // var bufferInstance = assert(program.arrayBufferInstance); + // var bufferHeaderSize = (bufferInstance.currentMemoryOffset + 7) & ~7; + // var bufferTotalSize = 1 << (32 - clz(bufferHeaderSize + byteLength - 1)); + // if (hasGC) { + // buf = new Uint8Array(gcHeaderSize + bufferTotalSize); + // pos = gcHeaderSize; + // writeI32(ensureGCHook(this, bufferInstance), buf, program.gcHookOffset); + // } else { + // buf = new Uint8Array(bufferTotalSize); + // pos = 0; + // } + // writeI32(byteLength, buf, pos + bufferInstance.offsetof(LibrarySymbols.byteLength)); + // pos += bufferHeaderSize; + // var nativeType = elementType.toNativeType(); + // switch (nativeType) { + // case NativeType.I32: { + // switch (byteSize) { + // case 1: { + // for (let i = 0; i < length; ++i) { + // let value = values[i]; + // assert(getExpressionType(value) == nativeType); + // assert(getExpressionId(value) == ExpressionId.Const); + // writeI8(getConstValueI32(value), buf, pos); + // pos += 1; + // } + // break; + // } + // case 2: { + // for (let i = 0; i < length; ++i) { + // let value = values[i]; + // assert(getExpressionType(value) == nativeType); + // assert(getExpressionId(value) == ExpressionId.Const); + // writeI16(getConstValueI32(value), buf, pos); + // pos += 2; + // } + // break; + // } + // case 4: { + // for (let i = 0; i < length; ++i) { + // let value = values[i]; + // assert(getExpressionType(value) == nativeType); + // assert(getExpressionId(value) == ExpressionId.Const); + // writeI32(getConstValueI32(value), buf, pos); + // pos += 4; + // } + // break; + // } + // default: assert(false); + // } + // break; + // } + // case NativeType.I64: { + // for (let i = 0; i < length; ++i) { + // let value = values[i]; + // assert(getExpressionType(value) == nativeType); + // assert(getExpressionId(value) == ExpressionId.Const); + // writeI64(i64_new(getConstValueI64Low(value), getConstValueI64High(value)), buf, pos); + // pos += 8; + // } + // break; + // } + // case NativeType.F32: { + // for (let i = 0; i < length; ++i) { + // let value = values[i]; + // assert(getExpressionType(value) == nativeType); + // assert(getExpressionId(value) == ExpressionId.Const); + // writeF32(getConstValueF32(value), buf, pos); + // pos += 4; + // } + // break; + // } + // case NativeType.F64: { + // for (let i = 0; i < length; ++i) { + // let value = values[i]; + // assert(getExpressionType(value) == nativeType); + // assert(getExpressionId(value) == ExpressionId.Const); + // writeF64(getConstValueF64(value), buf, pos); + // pos += 8; + // } + // break; + // } + // default: assert(false); + // } + // var bufferSegment = this.addMemorySegment(buf); + // var bufferOffset = bufferSegment.offset; + // if (hasGC) bufferOffset = i64_add(bufferOffset, i64_new(gcHeaderSize)); + + // // create the Array segment and return a pointer to it + // var arrayPrototype = assert(program.arrayPrototype); + // var arrayInstance = assert(this.resolver.resolveClass( + // arrayPrototype, + // [ elementType ], + // makeMap() + // )); + // var arrayHeaderSize = (arrayInstance.currentMemoryOffset + 7) & ~7; + // if (hasGC) { + // buf = new Uint8Array(gcHeaderSize + arrayHeaderSize); + // pos = gcHeaderSize; + // writeI32(ensureGCHook(this, arrayInstance), buf, program.gcHookOffset); + // } else { + // buf = new Uint8Array(arrayHeaderSize); + // pos = 0; + // } + // var arraySegment = this.addMemorySegment(buf); + // var arrayOffset = arraySegment.offset; + // if (hasGC) arrayOffset = i64_add(arrayOffset, i64_new(gcHeaderSize)); + // this.currentType = arrayInstance.type; + // var buffer_offset = pos + arrayInstance.offsetof("buffer_"); + // var length_offset = pos + arrayInstance.offsetof("length_"); + // if (usizeTypeSize == 8) { + // writeI64(bufferOffset, buf, buffer_offset); + // writeI32(length, buf, length_offset); + // return this.module.createI64(i64_low(arrayOffset), i64_high(arrayOffset)); + // } else { + // assert(i64_is_u32(bufferOffset)); + // writeI32(i64_low(bufferOffset), buf, buffer_offset); + // writeI32(length, buf, length_offset); + // assert(i64_is_u32(arrayOffset)); + // return this.module.createI32(i64_low(arrayOffset)); + // } + // } + compileArrayLiteral( elementType: Type, expressions: (Expression | null)[], @@ -6601,18 +6692,20 @@ export class Compiler extends DiagnosticEmitter { } } - // make a static array if possible - // if (isStatic) return this.ensureStaticArray(elementType, constantValues); // TODO - - // otherwise obtain the array type var arrayPrototype = assert(this.program.arrayPrototype); var arrayInstance = assert(this.resolver.resolveClass( arrayPrototype, [ elementType ], - makeMap() + makeMap() )); var arrayType = arrayInstance.type; + // make a static buffer if possible + if (isStatic) { + // let bufferPtr = this.ensureStaticArrayBuffer(elementType, constantValues); + // TODO: runtime.alloc the array header and make it use a copy of the static buffer + } + // and compile an explicit instantiation this.currentType = arrayType; var setter = arrayInstance.lookupOverload(OperatorKind.INDEXED_SET, true); @@ -7851,38 +7944,42 @@ export class Compiler extends DiagnosticEmitter { assert(classInstance.program == program); var module = this.module; var options = this.options; + var nativeSizeType = options.nativeSizeType; + + // ALLOCATE(payloadSize) + var allocateInstance = assert(program.allocateInstance); + if (!this.compileFunction(allocateInstance)) return module.createUnreachable(); + var alloc = module.createCall( + allocateInstance.internalName, [ + options.isWasm64 + ? module.createI64(classInstance.currentMemoryOffset) + : module.createI32(classInstance.currentMemoryOffset) + // module.createI32( + // ensureGCHook(this, classInstance) + // ) + ], + nativeSizeType + ); - // __gc_allocate(size, markFn) - if (program.hasGC && classInstance.type.isManaged(program)) { - let allocateInstance = assert(program.gcAllocateInstance); - if (!this.compileFunction(allocateInstance)) return module.createUnreachable(); - this.currentType = classInstance.type; - return module.createCall( - allocateInstance.internalName, [ - options.isWasm64 - ? module.createI64(classInstance.currentMemoryOffset) - : module.createI32(classInstance.currentMemoryOffset), - module.createI32( - ensureGCHook(this, classInstance) - ) - ], - options.nativeSizeType - ); - - // memory.allocate(size) - } else { - let allocateInstance = program.memoryAllocateInstance; - if (!allocateInstance || !this.compileFunction(allocateInstance)) return module.createUnreachable(); - this.currentType = classInstance.type; - return module.createCall( - allocateInstance.internalName, [ - options.isWasm64 - ? module.createI64(classInstance.currentMemoryOffset) - : module.createI32(classInstance.currentMemoryOffset) - ], - options.nativeSizeType - ); + // REGISTER(ref, classId) + if (program.gcImplemented) { + let registerInstance = assert(program.gcRegisterInstance); + if (!this.compileFunction(registerInstance)) return module.createUnreachable(); + let tempLocal = this.currentFlow.getAndFreeTempLocal(classInstance.type, false); + alloc = module.createBlock(null, [ + module.createCall( + registerInstance.internalName, [ + module.createTeeLocal(tempLocal.index, alloc), + module.createI32(classInstance.id) + ], + NativeType.None + ), + module.createGetLocal(tempLocal.index, nativeSizeType) + ], nativeSizeType); } + + this.currentType = classInstance.type; + return alloc; } /** Makes the initializers for a class's fields. */ diff --git a/src/program.ts b/src/program.ts index 7db97ef605..1d8f9ef52b 100644 --- a/src/program.ts +++ b/src/program.ts @@ -334,7 +334,7 @@ export class Program extends DiagnosticEmitter { // runtime references /** ArrayBufferView reference. */ - arrayBufferView: Class | null = null; + arrayBufferViewInstance: Class | null = null; /** ArrayBuffer instance reference. */ arrayBufferInstance: Class | null = null; /** Array prototype reference. */ @@ -343,8 +343,12 @@ export class Program extends DiagnosticEmitter { stringInstance: Class | null = null; /** Abort function reference, if present. */ abortInstance: Function | null = null; - /** Memory allocation function. */ - memoryAllocateInstance: Function | null = null; + /** Runtime allocation function. */ + allocateInstance: Function | null = null; + /** Runtime reallocation function. */ + reallocateInstance: Function | null = null; + /** Runtime discard function. */ + discardInstance: Function | null = null; /** Next class id. */ nextClassId: u32 = 1; @@ -352,9 +356,11 @@ export class Program extends DiagnosticEmitter { // gc integration /** Whether a garbage collector is present or not. */ - hasGC: bool = false; - /** Garbage collector allocation function. */ - gcAllocateInstance: Function | null = null; + get gcImplemented(): bool { + return this.gcRegisterInstance !== null; + } + /** Garbage collector register function called when an object becomes managed. */ + gcRegisterInstance: Function | null = null; /** Garbage collector link function called when a managed object is referenced from a parent. */ gcLinkInstance: Function | null = null; /** Garbage collector mark function called to on reachable managed objects. */ @@ -380,7 +386,7 @@ export class Program extends DiagnosticEmitter { /** Gets the size of a common runtime header. */ get runtimeHeaderSize(): i32 { - return this.hasGC ? 16 : 8; + return this.gcImplemented ? 16 : 8; } /** Writes a common runtime header to the specified buffer. */ @@ -767,18 +773,18 @@ export class Program extends DiagnosticEmitter { // register global library elements { let element: Element | null; - if (element = this.lookupGlobal(LibrarySymbols.String)) { - assert(element.kind == ElementKind.CLASS_PROTOTYPE); - this.stringInstance = resolver.resolveClass(element, null); - } if (element = this.lookupGlobal(LibrarySymbols.ArrayBufferView)) { assert(element.kind == ElementKind.CLASS_PROTOTYPE); - this.arrayBufferView = resolver.resolveClass(element, null); + this.arrayBufferViewInstance = resolver.resolveClass(element, null); } if (element = this.lookupGlobal(LibrarySymbols.ArrayBuffer)) { assert(element.kind == ElementKind.CLASS_PROTOTYPE); this.arrayBufferInstance = resolver.resolveClass(element, null); } + if (element = this.lookupGlobal(LibrarySymbols.String)) { + assert(element.kind == ElementKind.CLASS_PROTOTYPE); + this.stringInstance = resolver.resolveClass(element, null); + } if (element = this.lookupGlobal(LibrarySymbols.Array)) { assert(element.kind == ElementKind.CLASS_PROTOTYPE); this.arrayPrototype = element; @@ -787,59 +793,18 @@ export class Program extends DiagnosticEmitter { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.abortInstance = this.resolver.resolveFunction(element, null); } - if (element = this.lookupGlobal(LibrarySymbols.memory)) { - if (element = element.lookupInSelf(LibrarySymbols.allocate)) { - assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); - this.memoryAllocateInstance = this.resolver.resolveFunction(element, null); - } + if (element = this.lookupGlobal(LibrarySymbols.ALLOCATE)) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.allocateInstance = this.resolver.resolveFunction(element, null); + } + if (element = this.lookupGlobal(LibrarySymbols.REALLOCATE)) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.reallocateInstance = this.resolver.resolveFunction(element, null); + } + if (element = this.lookupGlobal(LibrarySymbols.DISCARD)) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.discardInstance = this.resolver.resolveFunction(element, null); } - } - - // register GC hooks if present - // FIXME: think about a better way than globals to model this, maybe a GC namespace that can be - // dynamically extended by a concrete implementation but then has `@unsafe` methods that normal - // code cannot call without explicitly enabling it with a flag. - if ( - this.elementsByName.has("__gc_allocate") && - this.elementsByName.has("__gc_link") && - this.elementsByName.has("__gc_mark") - ) { - // __gc_allocate(usize, (ref: usize) => void): usize - let element = this.elementsByName.get("__gc_allocate"); - assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); - let gcAllocateInstance = assert(this.resolver.resolveFunction(element, null)); - let signature = gcAllocateInstance.signature; - assert(signature.parameterTypes.length == 2); - assert(signature.parameterTypes[0] == this.options.usizeType); - assert(signature.parameterTypes[1].signatureReference); - assert(signature.returnType == this.options.usizeType); - - // __gc_link(usize, usize): void - element = this.elementsByName.get("__gc_link"); - assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); - let gcLinkInstance = assert(this.resolver.resolveFunction(element, null)); - signature = gcLinkInstance.signature; - assert(signature.parameterTypes.length == 2); - assert(signature.parameterTypes[0] == this.options.usizeType); - assert(signature.parameterTypes[1] == this.options.usizeType); - assert(signature.returnType == Type.void); - - // __gc_mark(usize): void - element = this.elementsByName.get("__gc_mark"); - assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); - let gcMarkInstance = assert(this.resolver.resolveFunction(element, null)); - signature = gcMarkInstance.signature; - assert(signature.parameterTypes.length == 1); - assert(signature.parameterTypes[0] == this.options.usizeType); - assert(signature.returnType == Type.void); - - this.gcAllocateInstance = gcAllocateInstance; - this.gcLinkInstance = gcLinkInstance; - this.gcMarkInstance = gcMarkInstance; - let gcHookOffset = 2 * options.usizeType.byteSize; // .next + .prev - this.gcHookOffset = gcHookOffset; - this.gcHeaderSize = (gcHookOffset + 4 + 7) & ~7; // + .hook index + alignment - this.hasGC = true; } // mark module exports, i.e. to apply proper wrapping behavior on the boundaries diff --git a/src/types.ts b/src/types.ts index b1682f97f8..0f7d6b11c6 100644 --- a/src/types.ts +++ b/src/types.ts @@ -147,7 +147,7 @@ export class Type { /** Tests if this is a managed type that needs GC hooks. */ isManaged(program: Program): bool { - if (program.hasGC) { + if (program.gcImplemented) { let classReference = this.classReference; return classReference !== null && !classReference.hasDecorator(DecoratorFlags.UNMANAGED); } diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 4980c27068..3d465a1bcd 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -1,5 +1,4 @@ -import { runtime, ArrayBufferView } from "./runtime"; -import { gc } from "./gc"; +import { ALLOCATE, REALLOCATE, DISCARD, LINK, REGISTER, MAX_BYTELENGTH, ArrayBufferView } from "./runtime"; import { ArrayBuffer } from "./arraybuffer"; import { COMPARATOR, SORT } from "./util/sort"; import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number"; @@ -8,7 +7,7 @@ import { isArray as builtin_isArray } from "./builtins"; export class Array extends ArrayBufferView { private length_: i32; - @inline static isArray(value: U): bool { + static isArray(value: U): bool { return builtin_isArray(value) && value !== null; } @@ -34,10 +33,10 @@ export class Array extends ArrayBufferView { var oldData = this.data; var oldCapacity = oldData.byteLength >>> alignof(); if (length > oldCapacity) { - const MAX_LENGTH = ArrayBufferView.MAX_BYTELENGTH >>> alignof(); + const MAX_LENGTH = MAX_BYTELENGTH >>> alignof(); if (length > MAX_LENGTH) throw new RangeError("Invalid array length"); let newCapacity = length << alignof(); - let newData = runtime.realloc(changetype(oldData), newCapacity); // registers on move + let newData = REALLOCATE(changetype(oldData), newCapacity); // registers on move if (newData !== changetype(oldData)) { this.data = changetype(newData); // links this.dataStart = newData; @@ -77,7 +76,7 @@ export class Array extends ArrayBufferView { private __set(index: i32, value: T): void { this.resize(index + 1); store(this.dataStart + (index << alignof()), value); - if (isManaged()) gc.link(value, this); + if (isManaged()) LINK(value, this); if (index >= this.length_) this.length_ = index + 1; } @@ -142,7 +141,7 @@ export class Array extends ArrayBufferView { this.resize(newLength); this.length_ = newLength; store(this.dataStart + ((newLength - 1) << alignof()), element); - if (isManaged()) gc.link(element, this); + if (isManaged()) LINK(element, this); return newLength; } @@ -157,14 +156,14 @@ export class Array extends ArrayBufferView { for (let offset: usize = 0; offset < thisSize; offset += sizeof()) { let element = load(thisStart + offset); store(outStart + offset, element); - gc.link(element, out); + LINK(element, out); } let otherStart = other.dataStart; let otherSize = otherLen << alignof(); for (let offset: usize = 0; offset < otherSize; offset += sizeof()) { let element = load(otherStart + offset); store(outStart + thisSize + offset, element); - gc.link(element, out); + LINK(element, out); } } else { memory.copy(outStart, this.dataStart, thisSize); @@ -222,7 +221,7 @@ export class Array extends ArrayBufferView { let value = load(this.dataStart + (index << alignof())); let result = callbackfn(value, index, this); store(outStart + (index << alignof()), result); - if (isManaged()) gc.link(result, out); + if (isManaged()) LINK(result, out); } return out; } @@ -294,7 +293,7 @@ export class Array extends ArrayBufferView { (newLength - 1) << alignof() ); store(base, element); - if (isManaged()) gc.link(element, this); + if (isManaged()) LINK(element, this); this.length_ = newLength; return newLength; } @@ -311,7 +310,7 @@ export class Array extends ArrayBufferView { let offset = i << alignof(); let element = load(thisBase + offset); store(sliceBase + offset, element); - if (isManaged()) gc.link(element, slice); + if (isManaged()) LINK(element, slice); } return slice; } @@ -327,7 +326,7 @@ export class Array extends ArrayBufferView { for (let i = 0; i < deleteCount; ++i) { let element = load(thisBase + (i << alignof())); store(spliceStart + (i << alignof()), element); - if (isManaged()) gc.link(element, splice); + if (isManaged()) LINK(element, splice); } memory.copy( splice.dataStart, @@ -397,7 +396,7 @@ export class Array extends ArrayBufferView { var sepLen = separator.length; var valueLen = 5; // max possible length of element len("false") var estLen = (valueLen + sepLen) * lastIndex + valueLen; - var result = runtime.alloc(estLen << 1); + var result = ALLOCATE(estLen << 1); var offset = 0; var value: bool; for (let i = 0; i < lastIndex; ++i) { @@ -429,10 +428,10 @@ export class Array extends ArrayBufferView { if (estLen > offset) { let trimmed = changetype(result).substring(0, offset); - runtime.freeUnregistered(result); + DISCARD(result); return trimmed; // registered in .substring } - return gc.register(result); + return REGISTER(result); } private join_int(separator: string = ","): string { @@ -445,7 +444,7 @@ export class Array extends ArrayBufferView { var sepLen = separator.length; const valueLen = (sizeof() <= 4 ? 10 : 20) + i32(isSigned()); var estLen = (valueLen + sepLen) * lastIndex + valueLen; - var result = runtime.alloc(estLen << 1); + var result = ALLOCATE(estLen << 1); var offset = 0; var value: T; for (let i = 0; i < lastIndex; ++i) { @@ -466,10 +465,10 @@ export class Array extends ArrayBufferView { offset += itoa_stream(result, offset, value); if (estLen > offset) { let trimmed = changetype(result).substring(0, offset); - runtime.freeUnregistered(result); + DISCARD(result); return trimmed; // registered in .substring } - return gc.register(result); + return REGISTER(result); } private join_flt(separator: string = ","): string { @@ -486,7 +485,7 @@ export class Array extends ArrayBufferView { const valueLen = MAX_DOUBLE_LENGTH; var sepLen = separator.length; var estLen = (valueLen + sepLen) * lastIndex + valueLen; - var result = runtime.alloc(estLen << 1); + var result = ALLOCATE(estLen << 1); var offset = 0; var value: T; for (let i = 0; i < lastIndex; ++i) { @@ -511,10 +510,10 @@ export class Array extends ArrayBufferView { ); if (estLen > offset) { let trimmed = changetype(result).substring(0, offset); - runtime.freeUnregistered(result); + DISCARD(result); return trimmed; // registered in .substring } - return gc.register(result); + return REGISTER(result); } private join_str(separator: string = ","): string { @@ -529,7 +528,7 @@ export class Array extends ArrayBufferView { estLen += load(dataStart + (i << alignof())).length; } var offset = 0; - var result = runtime.alloc((estLen + sepLen * lastIndex) << 1); + var result = ALLOCATE((estLen + sepLen * lastIndex) << 1); var value: String; for (let i = 0; i < lastIndex; ++i) { value = load(dataStart + (i << alignof())); @@ -560,7 +559,7 @@ export class Array extends ArrayBufferView { valueLen << 1 ); } - return gc.register(result); + return REGISTER(result); } private join_arr(separator: string = ","): string { @@ -597,7 +596,7 @@ export class Array extends ArrayBufferView { const valueLen = 15; // max possible length of element len("[object Object]") var sepLen = separator.length; var estLen = (valueLen + sepLen) * lastIndex + valueLen; - var result = runtime.alloc(estLen << 1); + var result = ALLOCATE(estLen << 1); var offset = 0; var value: T; for (let i = 0; i < lastIndex; ++i) { @@ -629,13 +628,12 @@ export class Array extends ArrayBufferView { } if (estLen > offset) { let out = changetype(result).substring(0, offset); - runtime.freeUnregistered(result); + DISCARD(result); return out; // registered in .substring } - return gc.register(result); + return REGISTER(result); } - @inline toString(): string { return this.join(); } diff --git a/std/assembly/arraybuffer.ts b/std/assembly/arraybuffer.ts index a7feab95c4..a9c3e1e91e 100644 --- a/std/assembly/arraybuffer.ts +++ b/std/assembly/arraybuffer.ts @@ -1,5 +1,4 @@ -import { runtime, ArrayBufferView } from "./runtime"; -import { gc } from "./gc"; +import { ALLOCATE, REGISTER, HEADER, HEADER_SIZE, MAX_BYTELENGTH } from "./runtime"; @sealed export class ArrayBuffer { @@ -22,24 +21,24 @@ import { gc } from "./gc"; } constructor(length: i32) { - if (length > ArrayBufferView.MAX_BYTELENGTH) throw new RangeError("Invalid array buffer length"); - var buffer = runtime.alloc(length); + if (length > MAX_BYTELENGTH) throw new RangeError("Invalid array buffer length"); + var buffer = ALLOCATE(length); memory.fill(changetype(buffer), 0, length); - return gc.register(buffer); + return REGISTER(buffer); } get byteLength(): i32 { - return changetype(changetype(this) - runtime.Header.SIZE).payloadSize; + return changetype
(changetype(this) - HEADER_SIZE).payloadSize; } - slice(begin: i32 = 0, end: i32 = ArrayBufferView.MAX_BYTELENGTH): ArrayBuffer { + slice(begin: i32 = 0, end: i32 = MAX_BYTELENGTH): ArrayBuffer { var length = this.byteLength; begin = begin < 0 ? max(length + begin, 0) : min(begin, length); end = end < 0 ? max(length + end , 0) : min(end , length); var outSize = max(end - begin, 0); - var out = runtime.alloc(outSize); + var out = ALLOCATE(outSize); memory.copy(out, changetype(this) + begin, outSize); - return gc.register(out); + return REGISTER(out); } toString(): string { diff --git a/std/assembly/collector/itcm.ts b/std/assembly/collector/itcm.ts index 17d7a29225..3c65ed5b8d 100644 --- a/std/assembly/collector/itcm.ts +++ b/std/assembly/collector/itcm.ts @@ -9,8 +9,8 @@ const TRACE = false; @inline export const HEADER_SIZE: usize = (offsetof() + AL_MASK) & ~AL_MASK; +import { ITERATEROOTS } from "../runtime"; import { AL_MASK, MAX_SIZE_32 } from "../util/allocator"; -import { gc } from "../gc"; /** Collector states. */ const enum State { @@ -140,7 +140,7 @@ function step(): void { } case State.IDLE: { if (TRACE) trace("gc~step/IDLE"); - gc.iterateRoots(__gc_mark); + ITERATEROOTS(__gc_mark); state = State.MARK; if (TRACE) trace("gc~state = MARK"); break; @@ -161,7 +161,7 @@ function step(): void { obj.hookFn(objToRef(obj)); } else { if (TRACE) trace("gc~step/MARK finish"); - gc.iterateRoots(__gc_mark); + ITERATEROOTS(__gc_mark); obj = iter.next; if (obj === toSpace) { let from = fromSpace; diff --git a/std/assembly/dataview.ts b/std/assembly/dataview.ts index 92fe52b866..bf44d415b7 100644 --- a/std/assembly/dataview.ts +++ b/std/assembly/dataview.ts @@ -1,5 +1,5 @@ +import { MAX_BYTELENGTH } from "./runtime"; import { ArrayBuffer } from "./arraybuffer"; -import { ArrayBufferView } from "./runtime"; export class DataView { @@ -13,7 +13,7 @@ export class DataView { byteLength: i32 = i32.MIN_VALUE // FIXME ) { if (byteLength === i32.MIN_VALUE) byteLength = buffer.byteLength - byteOffset; // FIXME - if (byteLength > ArrayBufferView.MAX_BYTELENGTH) throw new RangeError("Invalid byteLength"); + if (byteLength > MAX_BYTELENGTH) throw new RangeError("Invalid byteLength"); if (byteOffset + byteLength > buffer.byteLength) throw new RangeError("Invalid length"); this.data = buffer; // links var dataStart = changetype(buffer) + byteOffset; diff --git a/std/assembly/gc.ts b/std/assembly/gc.ts index 3749b84f21..7dbc069db5 100644 --- a/std/assembly/gc.ts +++ b/std/assembly/gc.ts @@ -1,45 +1,30 @@ -import { runtime } from "./runtime"; - /** Garbage collector interface. */ export namespace gc { /** Whether the garbage collector interface is implemented. */ // @ts-ignore: decorator @lazy - export const implemented: bool = isDefined( + export const IMPLEMENTED: bool = isDefined( // @ts-ignore: stub __gc_register ); - /** Gets the computed unique class id of a class type. */ - // @ts-ignore: decorator - @unsafe @builtin - export declare function classId(): u32; - - /** Iterates reference root objects. */ - // @ts-ignore: decorator - @unsafe @builtin - export declare function iterateRoots(fn: (ref: usize) => void): void; - /** Registers a managed object to be tracked by the garbage collector. */ // @ts-ignore: decorator @unsafe @inline - export function register(ref: usize): T { - runtime.unrefUnregistered(ref).classId = classId(); + export function register(ref: usize): void { // @ts-ignore: stub if (isDefined(__gc_register)) __gc_register(ref); - return changetype(ref); + else ERROR("missing implementation: gc.register"); } /** Links a registered object with the registered object now referencing it. */ // @ts-ignore: decorator @unsafe @inline - export function link(ref: T, parentRef: TParent): void { - assert(changetype(ref) >= HEAP_BASE + runtime.Header.SIZE); // must be a heap object - var header = changetype(changetype(ref) - runtime.Header.SIZE); - assert(header.classId != runtime.Header.MAGIC && header.gc1 != 0 && header.gc2 != 0); // must be registered + export function link(ref: usize, parentRef: usize): void { // @ts-ignore: stub if (isDefined(__gc_link)) __gc_link(ref, parentRef); + else ERROR("missing implementation: gc.link"); } /** Marks an object as being reachable. */ diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index 3a373a2847..4b43f4ed81 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -1515,36 +1515,16 @@ declare function unmanaged(constructor: Function): void; declare function sealed(constructor: Function): void; /** Annotates a method, function or constant global as always inlined. */ -declare function inline( - target: any, - propertyKey: string, - descriptor: TypedPropertyDescriptor -): TypedPropertyDescriptor | void; +declare function inline(...args: any[]): any; /** Annotates a method, function or constant global as unsafe. */ -declare function unsafe( - target: any, - propertyKey: string, - descriptor: TypedPropertyDescriptor -): TypedPropertyDescriptor | void; +declare function unsafe(...args: any[]): any; /** Annotates an explicit external name of a function or global. */ -declare function external(namespace: string, name: string): ( - target: any, - propertyKey: string, - descriptor: TypedPropertyDescriptor -) => TypedPropertyDescriptor | void; +declare function external(...args: any[]): any; /** Annotates a global for lazy compilation. */ -declare function lazy( - target: any, - propertyKey: string, - descriptor: TypedPropertyDescriptor -): TypedPropertyDescriptor | void; +declare function lazy(...args: any[]): any; /** Annotates a function as the explicit start function. */ -declare function start( - target: any, - propertyKey: string, - descriptor: TypedPropertyDescriptor -): TypedPropertyDescriptor | void; +declare function start(...args: any[]): any; diff --git a/std/assembly/map.ts b/std/assembly/map.ts index a389c7006d..5005ce33bf 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -1,4 +1,4 @@ -import { gc } from "./gc"; +import { LINK } from "./runtime"; import { HASH } from "./util/hash"; // A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht @@ -8,12 +8,12 @@ import { HASH } from "./util/hash"; const INITIAL_CAPACITY = 4; // @ts-ignore: decorator -@inline const -FILL_FACTOR: f64 = 8 / 3; +@inline +const FILL_FACTOR: f64 = 8 / 3; // @ts-ignore: decorator -@inline const -FREE_FACTOR: f64 = 3 / 4; +@inline +const FREE_FACTOR: f64 = 3 / 4; /** Structure of a map entry. */ @unmanaged class MapEntry { @@ -124,8 +124,8 @@ export class Map { let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE; entry.taggedNext = load(bucketPtrBase); store(bucketPtrBase, changetype(entry)); - if (isManaged()) gc.link(key, this); - if (isManaged()) gc.link(value, this); + if (isManaged()) LINK(key, this); + if (isManaged()) LINK(value, this); } } diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 55126e3254..c943ccf8bc 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -1,135 +1,166 @@ import { AL_MASK, MAX_SIZE_32 } from "./util/allocator"; import { HEAP_BASE, memory } from "./memory"; -import { gc } from "./gc"; - -/** Common runtime. */ -export namespace runtime { - - /** Common runtime header of all objects. */ - @unmanaged export class Header { - - /** Size of a runtime header. */ - // @ts-ignore: decorator - @lazy @inline - static readonly SIZE: usize = gc.implemented - ? (offsetof( ) + AL_MASK) & ~AL_MASK // full header if GC is present - : (offsetof("gc1") + AL_MASK) & ~AL_MASK; // half header if GC is absent - - /** Magic value used to validate runtime headers. */ - // @ts-ignore: decorator - @lazy @inline - static readonly MAGIC: u32 = 0xA55E4B17; - - /** Unique id of the respective class or a magic value if not yet registered.*/ - classId: u32; - /** Size of the allocated payload. */ - payloadSize: u32; - /** Reserved field for use by GC. Only present if GC is. */ - gc1: usize; // itcm: tagged next - /** Reserved field for use by GC. Only present if GC is. */ - gc2: usize; // itcm: prev - } - // Note that header data and layout isn't quite optimal depending on which allocator one - // decides to use, but it's done this way for maximum flexibility. Also remember that the - // runtime will most likely change significantly once reftypes and WASM GC are a thing. - - /** Adjusts an allocation to actual block size. Primarily targets TLSF. */ - function adjust(payloadSize: usize): usize { - // round up to power of 2, e.g. with HEADER_SIZE=8: - // 0 -> 2^3 = 8 - // 1..8 -> 2^4 = 16 - // 9..24 -> 2^5 = 32 - // ... - // MAX_LENGTH -> 2^30 = 0x40000000 (MAX_SIZE_32) - return 1 << (32 - clz(payloadSize + Header.SIZE - 1)); - } +/** Whether the memory manager interface is implemented. */ +// @ts-ignore: decorator, stub +@lazy export const MM_IMPLEMENTED: bool = isDefined(__memory_allocate); + +/** Whether the garbage collector interface is implemented. */ +// @ts-ignore: decorator, stub +@lazy export const GC_IMPLEMENTED: bool = isDefined(__gc_register); + +/** Common runtime header. Each managed object has one. */ +@unmanaged export class HEADER { + /** Unique id of the respective class or a magic value if not yet registered.*/ + classId: u32; + /** Size of the allocated payload. */ + payloadSize: u32; + /** Reserved field for use by GC. Only present if GC is. */ + gc1: usize; // itcm: tagged next + /** Reserved field for use by GC. Only present if GC is. */ + gc2: usize; // itcm: prev +} - /** Allocates a new object and returns a pointer to its payload. Does not fill. */ - // @ts-ignore: decorator - @unsafe - export function alloc(payloadSize: u32): usize { - var header = changetype
(memory.allocate(adjust(payloadSize))); - header.classId = Header.MAGIC; - header.payloadSize = payloadSize; - if (gc.implemented) { - header.gc1 = 0; - header.gc2 = 0; - } - return changetype(header) + Header.SIZE; +/** Common runtime header size. */ +export const HEADER_SIZE: usize = GC_IMPLEMENTED + ? (offsetof
( ) + AL_MASK) & ~AL_MASK // full header if GC is present + : (offsetof
("gc1") + AL_MASK) & ~AL_MASK; // half header if GC is absent + +/** Common runtime header magic. Used to assert registered/unregistered status. */ +export const HEADER_MAGIC: u32 = 0xA55E4B17; + +/** Gets the computed unique class id of a class type. */ +// @ts-ignore: decorator +@unsafe @builtin +export declare function CLASSID(): u32; + +/** Iterates over all root objects of a reference type. */ +// @ts-ignore: decorator +@unsafe @builtin +export declare function ITERATEROOTS(fn: (ref: usize) => void): void; + +/** Adjusts an allocation to actual block size. Primarily targets TLSF. */ +export function ADJUST(payloadSize: usize): usize { + // round up to power of 2, e.g. with HEADER_SIZE=8: + // 0 -> 2^3 = 8 + // 1..8 -> 2^4 = 16 + // 9..24 -> 2^5 = 32 + // ... + // MAX_LENGTH -> 2^30 = 0x40000000 (MAX_SIZE_32) + return 1 << (32 - clz(payloadSize + HEADER_SIZE - 1)); +} + +/** Allocates a new object and returns a pointer to its payload. Does not fill. */ +// @ts-ignore: decorator +@unsafe +export function ALLOCATE(payloadSize: usize): usize { + var header = changetype
(memory.allocate(ADJUST(payloadSize))); + header.classId = HEADER_MAGIC; + header.payloadSize = payloadSize; + if (GC_IMPLEMENTED) { + header.gc1 = 0; + header.gc2 = 0; } + return changetype(header) + HEADER_SIZE; +} - /** Reallocates an object if necessary. Returns a pointer to its (moved) payload. */ - // @ts-ignore: decorator - @unsafe - export function realloc(ref: usize, newPayloadSize: u32): usize { - // Background: When managed objects are allocated these aren't immediately registered with GC - // but can be used as scratch objects while unregistered. This is useful in situations where - // the object must be reallocated multiple times because its final size isn't known beforehand, - // e.g. in Array#filter, with only the final object making it into GC'ed userland. - var header = changetype
(ref - Header.SIZE); - var payloadSize = header.payloadSize; - if (payloadSize < newPayloadSize) { - let newAdjustedSize = adjust(newPayloadSize); - if (select(adjust(payloadSize), 0, ref > HEAP_BASE) < newAdjustedSize) { - // move if the allocation isn't large enough or not a heap object - let newHeader = changetype
(memory.allocate(newAdjustedSize)); - newHeader.classId = header.classId; - if (gc.implemented) { - newHeader.gc1 = 0; - newHeader.gc2 = 0; - } - let newRef = changetype(newHeader) + Header.SIZE; - memory.copy(newRef, ref, payloadSize); - memory.fill(newRef + payloadSize, 0, newPayloadSize - payloadSize); - if (header.classId == Header.MAGIC) { - // free right away if not registered yet - assert(ref > HEAP_BASE); // static objects aren't scratch objects - memory.free(changetype(header)); - } else if (gc.implemented) { - // if previously registered, register again - // @ts-ignore: stub - __gc_register(ref); - } - header = newHeader; - ref = newRef; - } else { - // otherwise just clear additional memory within this block - memory.fill(ref + payloadSize, 0, newPayloadSize - payloadSize); +/** Reallocates an object if necessary. Returns a pointer to its (moved) payload. */ +// @ts-ignore: decorator +@unsafe +export function REALLOCATE(ref: usize, newPayloadSize: usize): usize { + // Background: When managed objects are allocated these aren't immediately registered with GC + // but can be used as scratch objects while unregistered. This is useful in situations where + // the object must be reallocated multiple times because its final size isn't known beforehand, + // e.g. in Array#filter, with only the final object making it into GC'ed userland. + var header = changetype
(ref - HEADER_SIZE); + var payloadSize = header.payloadSize; + if (payloadSize < newPayloadSize) { + let newAdjustedSize = ADJUST(newPayloadSize); + if (select(ADJUST(payloadSize), 0, ref > HEAP_BASE) < newAdjustedSize) { + // move if the allocation isn't large enough or not a heap object + let newHeader = changetype
(memory.allocate(newAdjustedSize)); + newHeader.classId = header.classId; + if (GC_IMPLEMENTED) { + newHeader.gc1 = 0; + newHeader.gc2 = 0; + } + let newRef = changetype(newHeader) + HEADER_SIZE; + memory.copy(newRef, ref, payloadSize); + memory.fill(newRef + payloadSize, 0, newPayloadSize - payloadSize); + if (header.classId == HEADER_MAGIC) { + // free right away if not registered yet + assert(ref > HEAP_BASE); // static objects aren't scratch objects + memory.free(changetype(header)); + } else if (GC_IMPLEMENTED) { + // if previously registered, register again + // @ts-ignore: stub + __gc_register(ref); } + header = newHeader; + ref = newRef; } else { - // if the size is the same or less, just update the header accordingly. - // unused space is cleared when grown, so no need to do this here. + // otherwise just clear additional memory within this block + memory.fill(ref + payloadSize, 0, newPayloadSize - payloadSize); } - header.payloadSize = newPayloadSize; - return ref; + } else { + // if the size is the same or less, just update the header accordingly. + // unused space is cleared when grown, so no need to do this here. } + header.payloadSize = newPayloadSize; + return ref; +} - // @ts-ignore: decorator - @unsafe - export function unrefUnregistered(ref: usize): Header { - assert(ref >= HEAP_BASE + Header.SIZE); // must be a heap object - var header = changetype
(ref - Header.SIZE); - assert(header.classId == Header.MAGIC); // must be unregistered - return header; - } +/** Registers a managed object to be tracked by the garbage collector, if present. */ +// @ts-ignore: decorator +@unsafe @inline +export function REGISTER(ref: usize): T { + ASSERT_UNREGISTERED(ref); + changetype
(ref - HEADER_SIZE).classId = CLASSID(); + // @ts-ignore: stub + if (GC_IMPLEMENTED) __gc_register(ref); + return changetype(ref); +} - /** Frees an unregistered object that turned out to be unnecessary. */ - // @ts-ignore: decorator - @unsafe @inline - export function freeUnregistered(ref: T): void { - memory.free(changetype(unrefUnregistered(changetype(ref)))); - } +/** Links a registered object with the (registered) object now referencing it. */ +// @ts-ignore: decorator +@unsafe @inline +export function LINK(ref: T, parentRef: TParent): void { + ASSERT_REGISTERED(changetype(ref)); + ASSERT_REGISTERED(changetype(parentRef)); + // @ts-ignore: stub + if (GC_IMPLEMENTED) __gc_link(changetype(ref), changetype(parentRef)); } -import { ArrayBuffer } from "./arraybuffer"; +/** Discards an unregistered object that turned out to be unnecessary. */ +// @ts-ignore: decorator +export function DISCARD(ref: usize): void { + ASSERT_UNREGISTERED(ref); + memory.free(changetype(ref - HEADER_SIZE)); +} -export abstract class ArrayBufferView { +// Helpers - // @ts-ignore: decorator - @lazy - static readonly MAX_BYTELENGTH: i32 = MAX_SIZE_32 - runtime.Header.SIZE; +/** Asserts that a managed object is still unregistered. */ +function ASSERT_UNREGISTERED(ref: usize): void { + assert(ref > HEAP_BASE); // must be a heap object + assert(changetype
(ref - HEADER_SIZE).classId == HEADER_MAGIC); +} + +/** Asserts that a managed object has already been registered. */ +function ASSERT_REGISTERED(ref: usize): void { + assert(ref > HEAP_BASE); // must be a heap object + assert(changetype
(ref - HEADER_SIZE).classId != HEADER_MAGIC); +} +import { ArrayBuffer } from "./arraybuffer"; + +/** Maximum byte length of any buffer. */ +// @ts-ignore: decorator +@lazy +export const MAX_BYTELENGTH: i32 = MAX_SIZE_32 - HEADER_SIZE; + +/** Hard wired ArrayBufferView interface. */ +export abstract class ArrayBufferView { [key: number]: number; // @ts-ignore: decorator @@ -145,7 +176,7 @@ export abstract class ArrayBufferView { dataEnd: usize; constructor(length: i32, alignLog2: i32) { - if (length > ArrayBufferView.MAX_BYTELENGTH >>> alignLog2) throw new RangeError("Invalid length"); + if (length > MAX_BYTELENGTH >>> alignLog2) throw new RangeError("Invalid length"); var buffer = new ArrayBuffer(length << alignLog2); this.data = buffer; this.dataStart = changetype(buffer); @@ -161,7 +192,7 @@ export abstract class ArrayBufferView { } get length(): i32 { - ERROR("missing implementation: [T extends ArrayBufferView]#length"); + ERROR("missing implementation: subclasses must implement ArrayBufferView#length"); return unreachable(); } } diff --git a/std/assembly/set.ts b/std/assembly/set.ts index 8d0b8963c1..804fa16e6a 100644 --- a/std/assembly/set.ts +++ b/std/assembly/set.ts @@ -1,4 +1,4 @@ -import { gc } from "./gc"; +import { LINK } from "./runtime"; import { HASH } from "./util/hash"; // A deterministic hash set based on CloseTable from https://github.com/jorendorff/dht @@ -114,7 +114,7 @@ export class Set { let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE; entry.taggedNext = load(bucketPtrBase); store(bucketPtrBase, changetype(entry)); - if (isManaged()) gc.link(key, this); + if (isManaged()) LINK(key, this); } } diff --git a/std/assembly/string.ts b/std/assembly/string.ts index c9ead2fb0e..64c02c1eb1 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -1,29 +1,26 @@ -import { runtime } from "./runtime"; -import { gc } from "./gc"; +import { ALLOCATE, REGISTER, HEADER, HEADER_SIZE } from "./runtime"; import { MAX_SIZE_32 } from "./util/allocator"; import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./util/string"; @sealed export abstract class String { - // @ts-ignore: decorator - @lazy - static readonly MAX_LENGTH: i32 = (MAX_SIZE_32 - runtime.Header.SIZE) >> alignof(); + @lazy static readonly MAX_LENGTH: i32 = (MAX_SIZE_32 - HEADER_SIZE) >> alignof(); get length(): i32 { - return changetype(changetype(this) - runtime.Header.SIZE).payloadSize >> 1; + return changetype
(changetype(this) - HEADER_SIZE).payloadSize >> 1; } // TODO Add and handle second argument static fromCharCode(code: i32): String { - var out = runtime.alloc(2); + var out = ALLOCATE(2); store(out, code); - return gc.register(out); + return REGISTER(out); } static fromCodePoint(code: i32): String { assert(code <= 0x10FFFF); var sur = code > 0xFFFF; - var out = runtime.alloc((i32(sur) + 1) << 1); + var out = ALLOCATE((i32(sur) + 1) << 1); if (!sur) { store(out, code); } else { @@ -32,15 +29,15 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut let lo: u32 = (code & 0x3FF) + 0xDC00; store(out, (hi << 16) | lo); } - return gc.register(out); + return REGISTER(out); } @operator("[]") charAt(pos: i32): String { assert(this !== null); if (pos >= this.length) return changetype(""); - var out = runtime.alloc(2); + var out = ALLOCATE(2); store(out, load(changetype(this) + (pos << 1))); - return gc.register(out); + return REGISTER(out); } charCodeAt(pos: i32): i32 { @@ -71,10 +68,10 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var otherSize: isize = other.length << 1; var outSize: usize = thisSize + otherSize; if (outSize == 0) return changetype(""); - var out = runtime.alloc(outSize); + var out = ALLOCATE(outSize); memory.copy(out, changetype(this), thisSize); memory.copy(out + thisSize, changetype(other), otherSize); - return gc.register(out); + return REGISTER(out); } endsWith(searchString: String, endPosition: i32 = String.MAX_LENGTH): bool { @@ -184,9 +181,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut if (intStart < 0) intStart = max(size + intStart, 0); var resultLength = min(max(end, 0), size - intStart); if (resultLength <= 0) return changetype(""); - var out = runtime.alloc(resultLength << 1); + var out = ALLOCATE(resultLength << 1); memory.copy(out, changetype(this) + intStart, resultLength); - return gc.register(out); + return REGISTER(out); } substring(start: i32, end: i32 = i32.MAX_VALUE): String { @@ -199,9 +196,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut len = toPos - fromPos; if (!len) return changetype(""); if (!fromPos && toPos == this.length << 1) return this; - var out = runtime.alloc(len); + var out = ALLOCATE(len); memory.copy(out, changetype(this) + fromPos, len); - return gc.register(out); + return REGISTER(out); } trim(): String { @@ -227,9 +224,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut } if (!size) return changetype(""); if (!start && size == length << 1) return this; - var out = runtime.alloc(size); + var out = ALLOCATE(size); memory.copy(out, changetype(this) + offset, size); - return gc.register(out); + return REGISTER(out); } @inline @@ -257,9 +254,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut if (!offset) return this; size -= offset; if (!size) return changetype(""); - var out = runtime.alloc(size); + var out = ALLOCATE(size); memory.copy(out, changetype(this) + offset, size); - return gc.register(out); + return REGISTER(out); } trimEnd(): String { @@ -276,9 +273,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut } if (!size) return changetype(""); if (size == originalSize) return this; - var out = runtime.alloc(size); + var out = ALLOCATE(size); memory.copy(out, changetype(this), size); - return gc.register(out); + return REGISTER(out); } padStart(targetLength: i32, padString: string = " "): String { @@ -288,7 +285,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var padSize = padString.length << 1; if (targetSize < thisSize || !padSize) return this; var prependSize = targetSize - thisSize; - var out = runtime.alloc(targetSize); + var out = ALLOCATE(targetSize); if (prependSize > padSize) { let repeatCount = (prependSize - 2) / padSize; let restBase = repeatCount * padSize; @@ -299,7 +296,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut memory.copy(out, changetype(padString), prependSize); } memory.copy(out + prependSize, changetype(this), thisSize); - return gc.register(out); + return REGISTER(out); } padEnd(targetLength: i32, padString: string = " "): String { @@ -309,7 +306,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var padSize = padString.length << 1; if (targetSize < thisSize || !padSize) return this; var appendSize = targetSize - thisSize; - var out = runtime.alloc(targetSize); + var out = ALLOCATE(targetSize); memory.copy(out, changetype(this), thisSize); if (appendSize > padSize) { let repeatCount = (appendSize - 2) / padSize; @@ -320,7 +317,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut } else { memory.copy(out + thisSize, changetype(padString), appendSize); } - return gc.register(out); + return REGISTER(out); } repeat(count: i32 = 0): String { @@ -334,9 +331,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut if (count == 0 || !length) return changetype(""); if (count == 1) return this; - var out = runtime.alloc((length * count) << 1); + var out = ALLOCATE((length * count) << 1); memory.repeat(out, changetype(this), length << 1, count); - return gc.register(out); + return REGISTER(out); } slice(beginIndex: i32, endIndex: i32 = i32.MAX_VALUE): String { @@ -345,9 +342,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut var end = endIndex < 0 ? max(endIndex + len, 0) : min(endIndex, len); len = end - begin; if (len <= 0) return changetype(""); - var out = runtime.alloc(len << 1); + var out = ALLOCATE(len << 1); memory.copy(out, changetype(this) + (begin << 1), len << 1); - return gc.register(out); + return REGISTER(out); } split(separator: String | null = null, limit: i32 = i32.MAX_VALUE): String[] { @@ -365,7 +362,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut let buffer = unreachable(); // TODO // let buffer = result.buffer_; for (let i: isize = 0; i < length; ++i) { - let char = runtime.alloc(2); + let char = ALLOCATE(2); store( changetype(char), load( @@ -385,9 +382,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut while ((end = this.indexOf(separator!, start)) != -1) { let len = end - start; if (len > 0) { - let out = runtime.alloc(len << 1); + let out = ALLOCATE(len << 1); memory.copy(out, changetype(this) + (start << 1), len << 1); - result.push(gc.register(out)); + result.push(REGISTER(out)); } else { result.push(changetype("")); } @@ -401,9 +398,9 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut } var len = length - start; if (len > 0) { - let out = runtime.alloc(len << 1); + let out = ALLOCATE(len << 1); memory.copy(out, changetype(this) + (start << 1), len << 1); - result.push(gc.register(out)); + result.push(REGISTER(out)); } else { result.push(changetype("")); } @@ -475,10 +472,10 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut } } assert(ptrPos == len); - var out = runtime.alloc(bufPos); + var out = ALLOCATE(bufPos); memory.copy(changetype(out), buf, bufPos); memory.free(buf); - return gc.register(out); + return REGISTER(out); } toUTF8(): usize { diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index f7b653b89b..b830eebbb3 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -1,5 +1,4 @@ -import { runtime, ArrayBufferView } from "./runtime"; -import { gc } from "./gc"; +import { ALLOCATE, REGISTER, LINK, ArrayBufferView } from "./runtime"; import { COMPARATOR, SORT as SORT_IMPL } from "./util/sort"; function clampToByte(value: i32): i32 { @@ -804,11 +803,11 @@ function SUBARRAY( else begin = min(begin, length); if (end < 0) end = max(length + end, begin); else end = max(min(end, length), begin); - var out = runtime.alloc(offsetof()); + var out = ALLOCATE(offsetof()); store(out, buffer, offsetof("buffer")); store(out, array.dataStart + (begin << alignof()) , offsetof("dataStart")); store(out, array.dataEnd + ((end - begin) << alignof()), offsetof("dataEnd")); - gc.link(buffer, gc.register(out)); // register first, then link + LINK(buffer, REGISTER(out)); // register first, then link return changetype(out); } diff --git a/std/assembly/util/number.ts b/std/assembly/util/number.ts index e62a40bc64..1156f8a145 100644 --- a/std/assembly/util/number.ts +++ b/std/assembly/util/number.ts @@ -1,5 +1,4 @@ -import { runtime, ArrayBufferView } from "../runtime"; -import { gc } from "../gc"; +import { ALLOCATE, REGISTER, DISCARD, ArrayBufferView } from "../runtime"; import { CharCode } from "./string"; // @ts-ignore: decorator @@ -263,10 +262,10 @@ export function utoa32(value: u32): String { if (!value) return "0"; var decimals = decimalCount32(value); - var out = runtime.alloc(decimals << 1); + var out = ALLOCATE(decimals << 1); utoa32_core(changetype(out), value, decimals); - return gc.register(out); + return REGISTER(out); } export function itoa32(value: i32): String { @@ -276,12 +275,12 @@ export function itoa32(value: i32): String { if (sign) value = -value; var decimals = decimalCount32(value) + u32(sign); - var out = runtime.alloc(decimals << 1); + var out = ALLOCATE(decimals << 1); utoa32_core(changetype(out), value, decimals); if (sign) store(changetype(out), CharCode.MINUS); - return gc.register(out); + return REGISTER(out); } export function utoa64(value: u64): String { @@ -291,14 +290,14 @@ export function utoa64(value: u64): String { if (value <= u32.MAX_VALUE) { let val32 = value; let decimals = decimalCount32(val32); - out = runtime.alloc(decimals << 1); + out = ALLOCATE(decimals << 1); utoa32_core(out, val32, decimals); } else { let decimals = decimalCount64(value); - out = runtime.alloc(decimals << 1); + out = ALLOCATE(decimals << 1); utoa64_core(changetype(out), value, decimals); } - return gc.register(out); + return REGISTER(out); } export function itoa64(value: i64): String { @@ -311,16 +310,16 @@ export function itoa64(value: i64): String { if (value <= u32.MAX_VALUE) { let val32 = value; let decimals = decimalCount32(val32) + u32(sign); - out = runtime.alloc(decimals << 1); + out = ALLOCATE(decimals << 1); utoa32_core(changetype(out), val32, decimals); } else { let decimals = decimalCount64(value) + u32(sign); - out = runtime.alloc(decimals << 1); + out = ALLOCATE(decimals << 1); utoa64_core(changetype(out), value, decimals); } if (sign) store(changetype(out), CharCode.MINUS); - return gc.register(out); + return REGISTER(out); } export function itoa(value: T): String { @@ -625,10 +624,10 @@ export function dtoa(value: f64): String { if (isNaN(value)) return "NaN"; return select("-Infinity", "Infinity", value < 0); } - var temp = runtime.alloc(MAX_DOUBLE_LENGTH << 1); + var temp = ALLOCATE(MAX_DOUBLE_LENGTH << 1); var length = dtoa_core(temp, value); var result = changetype(temp).substring(0, length); - runtime.freeUnregistered(temp); + DISCARD(temp); return result; } diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index eac3b40a50..352c2ceddd 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -1166,7 +1166,7 @@ local.get $2 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/runtime.alloc (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -2536,7 +2536,7 @@ end end ) - (func $~lib/runtime/runtime.realloc (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/REALLOCATE (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2611,8 +2611,8 @@ if i32.const 0 i32.const 184 - i32.const 87 - i32.const 10 + i32.const 92 + i32.const 8 call $~lib/env/abort unreachable end @@ -2641,34 +2641,32 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/runtime.unrefUnregistered (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ASSERT_UNREGISTERED (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 232 - i32.lt_u + i32.const 216 + i32.le_u if i32.const 0 i32.const 184 - i32.const 111 - i32.const 4 + i32.const 145 + i32.const 2 call $~lib/env/abort unreachable end local.get $0 i32.const 16 i32.sub - local.tee $0 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 184 - i32.const 113 - i32.const 4 + i32.const 146 + i32.const 2 call $~lib/env/abort unreachable end - local.get $0 ) (func $start:std/runtime (; 24 ;) (type $FUNCSIG$v) (local $0 i32) @@ -2710,7 +2708,7 @@ else i32.const 0 i32.const 72 - i32.const 30 + i32.const 31 i32.const 2 call $~lib/env/abort unreachable @@ -2808,7 +2806,7 @@ f64.const 0 call $~lib/env/trace i32.const 1 - call $~lib/runtime/runtime.alloc + call $~lib/runtime/ALLOCATE global.set $std/runtime/ref1 global.get $std/runtime/ref1 i32.const 16 @@ -2821,7 +2819,7 @@ if i32.const 0 i32.const 72 - i32.const 45 + i32.const 46 i32.const 0 call $~lib/env/abort unreachable @@ -2833,7 +2831,7 @@ if i32.const 0 i32.const 72 - i32.const 46 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -2842,12 +2840,12 @@ local.tee $0 local.get $0 global.get $std/runtime/barrier1 - call $~lib/runtime/runtime.realloc + call $~lib/runtime/REALLOCATE i32.ne if i32.const 0 i32.const 72 - i32.const 47 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -2859,14 +2857,14 @@ if i32.const 0 i32.const 72 - i32.const 48 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref1 global.get $std/runtime/barrier2 - call $~lib/runtime/runtime.realloc + call $~lib/runtime/REALLOCATE global.set $std/runtime/ref2 global.get $std/runtime/ref1 global.get $std/runtime/ref2 @@ -2874,7 +2872,7 @@ if i32.const 0 i32.const 72 - i32.const 50 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -2890,16 +2888,20 @@ if i32.const 0 i32.const 72 - i32.const 52 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref2 - call $~lib/runtime/runtime.unrefUnregistered + local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 16 + i32.sub call $~lib/memory/memory.free global.get $std/runtime/barrier2 - call $~lib/runtime/runtime.alloc + call $~lib/runtime/ALLOCATE global.set $std/runtime/ref3 global.get $std/runtime/ref1 global.get $std/runtime/ref3 @@ -2907,17 +2909,20 @@ if i32.const 0 i32.const 72 - i32.const 55 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/barrier1 - call $~lib/runtime/runtime.alloc + call $~lib/runtime/ALLOCATE global.set $std/runtime/ref4 global.get $std/runtime/ref4 local.tee $0 - call $~lib/runtime/runtime.unrefUnregistered + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 16 + i32.sub i32.const 2 i32.store local.get $0 @@ -2928,7 +2933,7 @@ if i32.const 0 i32.const 72 - i32.const 59 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable @@ -2944,7 +2949,7 @@ if i32.const 0 i32.const 72 - i32.const 61 + i32.const 62 i32.const 0 call $~lib/env/abort unreachable @@ -2956,13 +2961,13 @@ if i32.const 0 i32.const 72 - i32.const 62 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable end i32.const 10 - call $~lib/runtime/runtime.alloc + call $~lib/runtime/ALLOCATE global.set $std/runtime/ref5 global.get $std/runtime/ref5 i32.const 16 @@ -2973,7 +2978,7 @@ if i32.const 0 i32.const 72 - i32.const 65 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable @@ -2989,7 +2994,7 @@ if i32.const 0 i32.const 72 - i32.const 66 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.ts b/tests/compiler/std/runtime.ts index 4c30e3f134..680eac883a 100644 --- a/tests/compiler/std/runtime.ts +++ b/tests/compiler/std/runtime.ts @@ -1,4 +1,5 @@ import "allocator/tlsf"; +import { CLASSID, ADJUST, ALLOCATE, REALLOCATE, REGISTER, DISCARD, HEADER, HEADER_SIZE, HEADER_MAGIC } from "runtime"; var register_ref: usize = 0; @@ -19,48 +20,48 @@ var link_parentRef: usize = 0; class A {} class B {} -assert(gc.classId() != gc.classId()); +assert(CLASSID() != CLASSID()); function isPowerOf2(x: i32): bool { return x != 0 && (x & (x - 1)) == 0; } -assert(runtime.adjust(0) > 0); +assert(ADJUST(0) > 0); for (let i = 0; i < 9000; ++i) { - assert(isPowerOf2(runtime.adjust(i))); + assert(isPowerOf2(ADJUST(i))); } -var barrier1 = runtime.adjust(0); +var barrier1 = ADJUST(0); var barrier2 = barrier1 + 1; -while (runtime.adjust(barrier2 + 1) == runtime.adjust(barrier2)) ++barrier2; +while (ADJUST(barrier2 + 1) == ADJUST(barrier2)) ++barrier2; var barrier3 = barrier2 + 1; -while (runtime.adjust(barrier3 + 1) == runtime.adjust(barrier3)) ++barrier3; +while (ADJUST(barrier3 + 1) == ADJUST(barrier3)) ++barrier3; trace("barrier1", 1, barrier1); trace("barrier2", 1, barrier2); trace("barrier3", 1, barrier3); -var ref1 = runtime.alloc(1); -var header1 = changetype(ref1 - runtime.Header.SIZE); -assert(header1.classId == runtime.Header.MAGIC); +var ref1 = ALLOCATE(1); +var header1 = changetype
(ref1 - HEADER_SIZE); +assert(header1.classId == HEADER_MAGIC); assert(header1.payloadSize == 1); -assert(ref1 == runtime.realloc(ref1, barrier1)); // same segment +assert(ref1 == REALLOCATE(ref1, barrier1)); // same segment assert(header1.payloadSize == barrier1); -var ref2 = runtime.realloc(ref1, barrier2); +var ref2 = REALLOCATE(ref1, barrier2); assert(ref1 != ref2); // moves -var header2 = changetype(ref2 - runtime.Header.SIZE); +var header2 = changetype
(ref2 - HEADER_SIZE); assert(header2.payloadSize == barrier2); -runtime.freeUnregistered(ref2); -var ref3 = runtime.alloc(barrier2); +DISCARD(ref2); +var ref3 = ALLOCATE(barrier2); assert(ref1 == ref3); // reuses space of ref1 (free'd in realloc), ref2 (explicitly free'd) -var ref4 = runtime.alloc(barrier1); -gc.register(ref4); // should call __gc_register +var ref4 = ALLOCATE(barrier1); +REGISTER(ref4); // should call __gc_register assert(register_ref == ref4); -var header4 = changetype(register_ref - runtime.Header.SIZE); -assert(header4.classId == gc.classId()); +var header4 = changetype
(register_ref - HEADER_SIZE); +assert(header4.classId == CLASSID()); assert(header4.payloadSize == barrier1); -var ref5 = runtime.alloc(10); +var ref5 = ALLOCATE(10); assert(changetype(ref5).byteLength == 10); assert(changetype(ref5).length == 5); diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 491839db59..2409d5b2c1 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -36,10 +36,12 @@ (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 1)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $std/runtime/register_ref (mut i32) (i32.const 0)) (global $std/runtime/link_ref (mut i32) (i32.const 0)) (global $std/runtime/link_parentRef (mut i32) (i32.const 0)) - (global $~lib/gc/gc.implemented i32 (i32.const 1)) (global $std/runtime/barrier1 (mut i32) (i32.const 0)) (global $std/runtime/barrier2 (mut i32) (i32.const 0)) (global $std/runtime/barrier3 (mut i32) (i32.const 0)) @@ -71,11 +73,11 @@ unreachable end ) - (func $~lib/runtime/runtime.adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUST (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - i32.const 16 + global.get $~lib/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -1467,14 +1469,14 @@ end return ) - (func $~lib/runtime/runtime.alloc (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/runtime/ADJUST call $~lib/memory/memory.allocate local.set $1 local.get $1 - i32.const -1520547049 + global.get $~lib/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 @@ -1486,7 +1488,7 @@ i32.const 0 i32.store offset=12 local.get $1 - i32.const 16 + global.get $~lib/runtime/HEADER_SIZE i32.add ) (func $~lib/util/memory/memcpy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -3243,14 +3245,14 @@ local.get $0 global.set $std/runtime/register_ref ) - (func $~lib/runtime/runtime.realloc (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/REALLOCATE (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $0 - i32.const 16 + global.get $~lib/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 @@ -3261,10 +3263,10 @@ i32.lt_u if local.get $1 - call $~lib/runtime/runtime.adjust + call $~lib/runtime/ADJUST local.set $4 local.get $3 - call $~lib/runtime/runtime.adjust + call $~lib/runtime/ADJUST i32.const 0 local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3287,7 +3289,7 @@ i32.const 0 i32.store offset=12 local.get $5 - i32.const 16 + global.get $~lib/runtime/HEADER_SIZE i32.add local.set $6 local.get $6 @@ -3304,7 +3306,7 @@ call $~lib/memory/memory.fill local.get $2 i32.load - i32.const -1520547049 + global.get $~lib/runtime/HEADER_MAGIC i32.eq if local.get $0 @@ -3314,8 +3316,8 @@ if i32.const 0 i32.const 184 - i32.const 87 - i32.const 10 + i32.const 92 + i32.const 8 call $~lib/env/abort unreachable end @@ -3347,55 +3349,52 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/runtime.unrefUnregistered (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/runtime/ASSERT_UNREGISTERED (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/memory/HEAP_BASE - i32.const 16 - i32.add - i32.ge_u + i32.gt_u i32.eqz if i32.const 0 i32.const 184 - i32.const 111 - i32.const 4 + i32.const 145 + i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 16 + global.get $~lib/runtime/HEADER_SIZE i32.sub - local.set $1 - local.get $1 i32.load - i32.const -1520547049 + global.get $~lib/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 184 - i32.const 113 - i32.const 4 + i32.const 146 + i32.const 2 call $~lib/env/abort unreachable end - local.get $1 ) - (func $~lib/runtime/runtime.freeUnregistered (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/DISCARD (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $~lib/runtime/runtime.unrefUnregistered + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub call $~lib/memory/memory.free ) (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 16 + global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) (func $~lib/string/String#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 16 + global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 i32.const 1 @@ -3411,20 +3410,20 @@ if i32.const 0 i32.const 72 - i32.const 22 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable end i32.const 0 - call $~lib/runtime/runtime.adjust + call $~lib/runtime/ADJUST i32.const 0 i32.gt_u i32.eqz if i32.const 0 i32.const 72 - i32.const 28 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable @@ -3439,13 +3438,13 @@ i32.eqz br_if $break|0 local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/runtime/ADJUST call $std/runtime/isPowerOf2 i32.eqz if i32.const 0 i32.const 72 - i32.const 30 + i32.const 31 i32.const 2 call $~lib/env/abort unreachable @@ -3460,7 +3459,7 @@ unreachable end i32.const 0 - call $~lib/runtime/runtime.adjust + call $~lib/runtime/ADJUST global.set $std/runtime/barrier1 global.get $std/runtime/barrier1 i32.const 1 @@ -3471,9 +3470,9 @@ global.get $std/runtime/barrier2 i32.const 1 i32.add - call $~lib/runtime/runtime.adjust + call $~lib/runtime/ADJUST global.get $std/runtime/barrier2 - call $~lib/runtime/runtime.adjust + call $~lib/runtime/ADJUST i32.eq if global.get $std/runtime/barrier2 @@ -3493,9 +3492,9 @@ global.get $std/runtime/barrier3 i32.const 1 i32.add - call $~lib/runtime/runtime.adjust + call $~lib/runtime/ADJUST global.get $std/runtime/barrier3 - call $~lib/runtime/runtime.adjust + call $~lib/runtime/ADJUST i32.eq if global.get $std/runtime/barrier3 @@ -3534,21 +3533,21 @@ f64.const 0 call $~lib/env/trace i32.const 1 - call $~lib/runtime/runtime.alloc + call $~lib/runtime/ALLOCATE global.set $std/runtime/ref1 global.get $std/runtime/ref1 - i32.const 16 + global.get $~lib/runtime/HEADER_SIZE i32.sub global.set $std/runtime/header1 global.get $std/runtime/header1 i32.load - i32.const -1520547049 + global.get $~lib/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 72 - i32.const 45 + i32.const 46 i32.const 0 call $~lib/env/abort unreachable @@ -3561,7 +3560,7 @@ if i32.const 0 i32.const 72 - i32.const 46 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -3569,13 +3568,13 @@ global.get $std/runtime/ref1 global.get $std/runtime/ref1 global.get $std/runtime/barrier1 - call $~lib/runtime/runtime.realloc + call $~lib/runtime/REALLOCATE i32.eq i32.eqz if i32.const 0 i32.const 72 - i32.const 47 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -3588,14 +3587,14 @@ if i32.const 0 i32.const 72 - i32.const 48 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref1 global.get $std/runtime/barrier2 - call $~lib/runtime/runtime.realloc + call $~lib/runtime/REALLOCATE global.set $std/runtime/ref2 global.get $std/runtime/ref1 global.get $std/runtime/ref2 @@ -3604,13 +3603,13 @@ if i32.const 0 i32.const 72 - i32.const 50 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref2 - i32.const 16 + global.get $~lib/runtime/HEADER_SIZE i32.sub global.set $std/runtime/header2 global.get $std/runtime/header2 @@ -3621,15 +3620,15 @@ if i32.const 0 i32.const 72 - i32.const 52 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref2 - call $~lib/runtime/runtime.freeUnregistered + call $~lib/runtime/DISCARD global.get $std/runtime/barrier2 - call $~lib/runtime/runtime.alloc + call $~lib/runtime/ALLOCATE global.set $std/runtime/ref3 global.get $std/runtime/ref1 global.get $std/runtime/ref3 @@ -3638,19 +3637,22 @@ if i32.const 0 i32.const 72 - i32.const 55 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/barrier1 - call $~lib/runtime/runtime.alloc + call $~lib/runtime/ALLOCATE global.set $std/runtime/ref4 - block $~lib/gc/gc.register|inlined.0 (result i32) + block $~lib/runtime/REGISTER|inlined.0 (result i32) global.get $std/runtime/ref4 local.set $0 local.get $0 - call $~lib/runtime/runtime.unrefUnregistered + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub i32.const 2 i32.store local.get $0 @@ -3665,13 +3667,13 @@ if i32.const 0 i32.const 72 - i32.const 59 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/register_ref - i32.const 16 + global.get $~lib/runtime/HEADER_SIZE i32.sub global.set $std/runtime/header4 global.get $std/runtime/header4 @@ -3682,7 +3684,7 @@ if i32.const 0 i32.const 72 - i32.const 61 + i32.const 62 i32.const 0 call $~lib/env/abort unreachable @@ -3695,13 +3697,13 @@ if i32.const 0 i32.const 72 - i32.const 62 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable end i32.const 10 - call $~lib/runtime/runtime.alloc + call $~lib/runtime/ALLOCATE global.set $std/runtime/ref5 global.get $std/runtime/ref5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength @@ -3711,7 +3713,7 @@ if i32.const 0 i32.const 72 - i32.const 65 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable @@ -3724,7 +3726,7 @@ if i32.const 0 i32.const 72 - i32.const 66 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable From 058dc8d4fac319e19fc377be685dc1bb3b23919e Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 15 Mar 2019 13:13:48 +0100 Subject: [PATCH 037/119] static array stuff --- src/builtins.ts | 6 +- src/common.ts | 7 +- src/compiler.ts | 101 +- src/flow.ts | 2 +- src/program.ts | 30 +- std/assembly/gc.ts | 6 +- std/assembly/map.ts | 4 +- std/assembly/memory.ts | 6 +- std/assembly/runtime.ts | 27 + tests/compiler.js | 18 +- tests/compiler/abi.optimized.wat | 4 +- tests/compiler/abi.untouched.wat | 20 +- tests/compiler/assert.optimized.wat | 4 +- tests/compiler/assert.untouched.wat | 24 +- tests/compiler/bool.optimized.wat | 16 +- tests/compiler/bool.untouched.wat | 18 +- tests/compiler/call-inferred.optimized.wat | 2 +- tests/compiler/call-inferred.untouched.wat | 12 +- tests/compiler/call-optional.optimized.wat | 12 +- tests/compiler/call-optional.untouched.wat | 16 +- tests/compiler/call-super.optimized.wat | 113 +- tests/compiler/call-super.untouched.wat | 225 +- tests/compiler/class.optimized.wat | 2 +- tests/compiler/class.untouched.wat | 6 +- tests/compiler/comma.optimized.wat | 20 +- tests/compiler/comma.untouched.wat | 22 +- tests/compiler/constructor.optimized.wat | 75 +- tests/compiler/constructor.untouched.wat | 211 +- tests/compiler/declare.optimized.wat | 6 +- tests/compiler/declare.untouched.wat | 8 +- tests/compiler/do.optimized.wat | 18 +- tests/compiler/do.untouched.wat | 20 +- tests/compiler/empty.ts | 8 + tests/compiler/exports.optimized.wat | 46 +- tests/compiler/exports.untouched.wat | 232 +- tests/compiler/for.optimized.wat | 8 +- tests/compiler/for.untouched.wat | 10 +- .../function-expression.optimized.wat | 20 +- .../function-expression.untouched.wat | 22 +- tests/compiler/function-types.optimized.wat | 18 +- tests/compiler/function-types.untouched.wat | 20 +- tests/compiler/getter-call.optimized.wat | 42 +- tests/compiler/getter-call.untouched.wat | 188 +- tests/compiler/getter-setter.optimized.wat | 8 +- tests/compiler/getter-setter.untouched.wat | 10 +- tests/compiler/if.optimized.wat | 4 +- tests/compiler/if.untouched.wat | 18 +- tests/compiler/infer-type.optimized.wat | 2 +- tests/compiler/infer-type.untouched.wat | 8 +- tests/compiler/inlining.optimized.wat | 59 +- tests/compiler/inlining.untouched.wat | 207 +- tests/compiler/instanceof.optimized.wat | 6 +- tests/compiler/instanceof.untouched.wat | 92 +- tests/compiler/logical.optimized.wat | 18 +- tests/compiler/logical.untouched.wat | 20 +- tests/compiler/many-locals.optimized.wat | 2 +- tests/compiler/many-locals.untouched.wat | 8 +- tests/compiler/memcpy.optimized.wat | 26 +- tests/compiler/memcpy.untouched.wat | 28 +- tests/compiler/memmove.optimized.wat | 26 +- tests/compiler/memmove.untouched.wat | 28 +- tests/compiler/memset.optimized.wat | 16 +- tests/compiler/memset.untouched.wat | 16 +- .../new-without-allocator.untouched.wat | 41 +- tests/compiler/object-literal.optimized.wat | 102 +- tests/compiler/object-literal.untouched.wat | 229 +- .../optional-typeparameters.optimized.wat | 49 +- .../optional-typeparameters.untouched.wat | 175 +- tests/compiler/overflow.optimized.wat | 2 +- tests/compiler/overflow.untouched.wat | 76 +- tests/compiler/std/hash.ts | 2 +- tests/compiler/std/map.optimized.wat | 1635 ++++++++------ tests/compiler/std/map.untouched.wat | 2012 +++++++++-------- tests/compiler/std/set.optimized.wat | 1391 +++++++----- tests/compiler/std/set.untouched.wat | 1812 +++++++-------- tests/compiler/std/trace.optimized.wat | 32 +- tests/compiler/std/trace.untouched.wat | 34 +- 77 files changed, 5423 insertions(+), 4446 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index 94b0ec3fa0..45de8eea52 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -4153,17 +4153,17 @@ function compileTypedArrayGet( WrapMode.NONE )); if (getExpressionId(dynamicOffset) == ExpressionId.Const) { - constantOffset = getConstValueI32(dynamicOffset); + constantOffset = getConstValueI32(dynamicOffset) * type.byteSize; dynamicOffset = 0; } else if (getExpressionId(dynamicOffset) == ExpressionId.Binary) { if (getBinaryOp(dynamicOffset) == BinaryOp.AddI32) { let left = getBinaryLeft(dynamicOffset); let right = getBinaryRight(dynamicOffset); if (getExpressionId(left) == ExpressionId.Const) { - constantOffset = getConstValueI32(left); + constantOffset = getConstValueI32(left) * type.byteSize; dynamicOffset = right; } else if (getExpressionId(right) == ExpressionId.Const) { - constantOffset = getConstValueI32(right); + constantOffset = getConstValueI32(right) * type.byteSize; dynamicOffset = left; } } diff --git a/src/common.ts b/src/common.ts index f79dcd4038..566df231fd 100644 --- a/src/common.ts +++ b/src/common.ts @@ -183,10 +183,9 @@ export namespace LibrarySymbols { export const ALLOCATE = "ALLOCATE"; export const REALLOCATE = "REALLOCATE"; export const DISCARD = "DISCARD"; - // gc - export const gc = "gc"; - export const register = "register"; - export const link = "link"; + export const REGISTER = "REGISTER"; + export const LINK = "LINK"; + export const WRAPARRAY = "WRAPARRAY"; // other export const length = "length"; export const byteLength = "byteLength"; diff --git a/src/compiler.ts b/src/compiler.ts index 1a2c18636e..d26a424403 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -6693,27 +6693,43 @@ export class Compiler extends DiagnosticEmitter { } var arrayPrototype = assert(this.program.arrayPrototype); - var arrayInstance = assert(this.resolver.resolveClass( - arrayPrototype, - [ elementType ], - makeMap() - )); + var arrayInstance = assert(this.resolver.resolveClass(arrayPrototype, [ elementType ])); var arrayType = arrayInstance.type; - // make a static buffer if possible + // if the array is static, make a static arraybuffer segment and wrap it with an array if (isStatic) { - // let bufferPtr = this.ensureStaticArrayBuffer(elementType, constantValues); - // TODO: runtime.alloc the array header and make it use a copy of the static buffer + let arrayBufferInstance = assert(this.program.arrayBufferInstance); + let wrapArrayPrototype = assert(this.program.wrapArrayPrototype); + let wrapArrayInstance = this.resolver.resolveFunction(wrapArrayPrototype, [ elementType ]); + if (!wrapArrayInstance) { + this.currentType = arrayType; + return module.createUnreachable(); + } + let previousFlow = this.currentFlow; + let tempLocal = previousFlow.getTempLocal(arrayBufferInstance.type, false); + let flow = Flow.createInline(previousFlow.parentFunction, wrapArrayInstance); + flow.addScopedAlias("buffer", arrayBufferInstance.type, tempLocal.index); + this.currentFlow = flow; + let body = this.compileFunctionBody(wrapArrayInstance); + body.unshift( + module.createSetLocal(tempLocal.index, + this.ensureStaticArrayBuffer(elementType, constantValues) + ) + ); + previousFlow.freeTempLocal(tempLocal); + this.currentFlow = previousFlow; + this.currentType = arrayType; + return module.createBlock(flow.inlineReturnLabel, body, this.options.nativeSizeType); } - // and compile an explicit instantiation - this.currentType = arrayType; + // otherwise compile an explicit instantiation with indexed sets var setter = arrayInstance.lookupOverload(OperatorKind.INDEXED_SET, true); if (!setter) { this.error( DiagnosticCode.Index_signature_in_type_0_only_permits_reading, reportNode.range, arrayInstance.internalName ); + this.currentType = arrayType; return module.createUnreachable(); } var nativeArrayType = arrayType.toNativeType(); @@ -7945,41 +7961,46 @@ export class Compiler extends DiagnosticEmitter { var module = this.module; var options = this.options; var nativeSizeType = options.nativeSizeType; + var classType = classInstance.type; - // ALLOCATE(payloadSize) + // ALLOCATE(payloadSize: usize) -> usize var allocateInstance = assert(program.allocateInstance); - if (!this.compileFunction(allocateInstance)) return module.createUnreachable(); - var alloc = module.createCall( - allocateInstance.internalName, [ - options.isWasm64 - ? module.createI64(classInstance.currentMemoryOffset) - : module.createI32(classInstance.currentMemoryOffset) - // module.createI32( - // ensureGCHook(this, classInstance) - // ) - ], - nativeSizeType - ); + if (!this.compileFunction(allocateInstance)) { + this.currentType = classInstance.type; + return module.createUnreachable(); + } - // REGISTER(ref, classId) - if (program.gcImplemented) { - let registerInstance = assert(program.gcRegisterInstance); - if (!this.compileFunction(registerInstance)) return module.createUnreachable(); - let tempLocal = this.currentFlow.getAndFreeTempLocal(classInstance.type, false); - alloc = module.createBlock(null, [ - module.createCall( - registerInstance.internalName, [ - module.createTeeLocal(tempLocal.index, alloc), - module.createI32(classInstance.id) - ], - NativeType.None - ), - module.createGetLocal(tempLocal.index, nativeSizeType) - ], nativeSizeType); + // REGISTER(ref: usize) -> usize + var registerPrototype = assert(program.registerPrototype); + var registerInstance = this.resolver.resolveFunction(registerPrototype, [ classType ]); + if (!registerInstance) { + this.currentType = classType; + return module.createUnreachable(); } - this.currentType = classInstance.type; - return alloc; + // REGISTER(ALLOCATE(sizeof())) + var previousFlow = this.currentFlow; + var tempLocal = previousFlow.getTempLocal(classType, false); + var flow = Flow.createInline(previousFlow.parentFunction, registerInstance); + flow.addScopedAlias("ref", this.options.usizeType, tempLocal.index); + this.currentFlow = flow; + var body = this.compileFunctionBody(registerInstance); + body.unshift( + module.createSetLocal(tempLocal.index, + module.createCall( + allocateInstance.internalName, [ + options.isWasm64 + ? module.createI64(classInstance.currentMemoryOffset) + : module.createI32(classInstance.currentMemoryOffset) + ], + nativeSizeType + ) + ) + ); + previousFlow.freeTempLocal(tempLocal); + this.currentFlow = previousFlow; + this.currentType = classType; + return module.createBlock(flow.inlineReturnLabel, body, nativeSizeType); } /** Makes the initializers for a class's fields. */ diff --git a/src/flow.ts b/src/flow.ts index ceae0a1b70..51b16a9edf 100644 --- a/src/flow.ts +++ b/src/flow.ts @@ -179,7 +179,7 @@ export class Flow { return flow; } - /** Creates an inline flow within `currentFunction`. */ + /** Creates an inline flow within `parentFunction`. */ static createInline(parentFunction: Function, inlineFunction: Function): Flow { var flow = Flow.create(parentFunction); flow.set(FlowFlags.INLINE_CONTEXT); diff --git a/src/program.ts b/src/program.ts index 1d8f9ef52b..681c4f6ed1 100644 --- a/src/program.ts +++ b/src/program.ts @@ -349,6 +349,12 @@ export class Program extends DiagnosticEmitter { reallocateInstance: Function | null = null; /** Runtime discard function. */ discardInstance: Function | null = null; + /** Runtime register function. */ + registerPrototype: FunctionPrototype | null = null; + /** Runtime link function. */ + linkPrototype: FunctionPrototype | null = null; + /** Runtime wrap array function. */ + wrapArrayPrototype: FunctionPrototype | null = null; /** Next class id. */ nextClassId: u32 = 1; @@ -357,18 +363,10 @@ export class Program extends DiagnosticEmitter { /** Whether a garbage collector is present or not. */ get gcImplemented(): bool { - return this.gcRegisterInstance !== null; + return this.lookupGlobal("__gc_register") !== null; } - /** Garbage collector register function called when an object becomes managed. */ - gcRegisterInstance: Function | null = null; - /** Garbage collector link function called when a managed object is referenced from a parent. */ - gcLinkInstance: Function | null = null; /** Garbage collector mark function called to on reachable managed objects. */ - gcMarkInstance: Function | null = null; - /** Size of a managed object header. */ - gcHeaderSize: u32 = 0; - /** Offset of the GC hook. */ - gcHookOffset: u32 = 0; + gcMarkInstance: Function | null = null; // FIXME /** Constructs a new program, optionally inheriting parser diagnostics. */ constructor( @@ -805,6 +803,18 @@ export class Program extends DiagnosticEmitter { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.discardInstance = this.resolver.resolveFunction(element, null); } + if (element = this.lookupGlobal(LibrarySymbols.REGISTER)) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.registerPrototype = element; + } + if (element = this.lookupGlobal(LibrarySymbols.LINK)) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.linkPrototype = element; + } + if (element = this.lookupGlobal(LibrarySymbols.WRAPARRAY)) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.wrapArrayPrototype = element; + } } // mark module exports, i.e. to apply proper wrapping behavior on the boundaries diff --git a/std/assembly/gc.ts b/std/assembly/gc.ts index 7dbc069db5..7da225a49e 100644 --- a/std/assembly/gc.ts +++ b/std/assembly/gc.ts @@ -15,7 +15,7 @@ export namespace gc { export function register(ref: usize): void { // @ts-ignore: stub if (isDefined(__gc_register)) __gc_register(ref); - else ERROR("missing implementation: gc.register"); + else WARNING("missing implementation: gc.register"); } /** Links a registered object with the registered object now referencing it. */ @@ -24,7 +24,7 @@ export namespace gc { export function link(ref: usize, parentRef: usize): void { // @ts-ignore: stub if (isDefined(__gc_link)) __gc_link(ref, parentRef); - else ERROR("missing implementation: gc.link"); + else WARNING("missing implementation: gc.link"); } /** Marks an object as being reachable. */ @@ -33,7 +33,7 @@ export namespace gc { export function mark(ref: usize): void { // @ts-ignore: stub if (isDefined(__gc_mark)) __gc_mark(ref); - else ERROR("missing implementation: gc.mark"); + else WARNING("missing implementation: gc.mark"); } /** Performs a full garbage collection cycle. */ diff --git a/std/assembly/map.ts b/std/assembly/map.ts index 5005ce33bf..c57658d84d 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -65,7 +65,9 @@ export class Map { get size(): i32 { return this.entriesCount; } - constructor() { this.clear(); } + constructor() { + this.clear(); + } clear(): void { const bucketsSize = INITIAL_CAPACITY * BUCKET_SIZE; diff --git a/std/assembly/memory.ts b/std/assembly/memory.ts index 022cfaed2c..190e995f80 100644 --- a/std/assembly/memory.ts +++ b/std/assembly/memory.ts @@ -51,7 +51,7 @@ export namespace memory { export function allocate(size: usize): usize { // @ts-ignore: stub if (isDefined(__memory_allocate)) return __memory_allocate(size); - else ERROR("missing implementation: memory.allocate"); + else WARNING("missing implementation: memory.allocate"); return unreachable(); } @@ -61,7 +61,7 @@ export namespace memory { export function free(ptr: usize): void { // @ts-ignore: stub if (isDefined(__memory_free)) __memory_free(ptr); - else ERROR("missing implementation: memory.free"); + else WARNING("missing implementation: memory.free"); } /** Resets the memory to its initial state. Arena allocator only. */ @@ -70,7 +70,7 @@ export namespace memory { export function reset(): void { // @ts-ignore: stub if (isDefined(__memory_reset)) __memory_reset(); - else ERROR("missing implementation: memory.reset"); + else WARNING("missing implementation: memory.reset"); } /** Repeats a section of memory at a specific address. */ diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index c943ccf8bc..2aed821d21 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -138,6 +138,33 @@ export function DISCARD(ref: usize): void { memory.free(changetype(ref - HEADER_SIZE)); } +/** Wraps a static buffer within an array by copying its contents. */ +// @ts-ignore: decorator +@unsafe @inline +export function WRAPARRAY(buffer: ArrayBuffer): T[] { + // TODO: this is quite a lot to compile inline + var array = REGISTER(ALLOCATE(offsetof())); + var bufferSize = buffer.byteLength; + var newBuffer = REGISTER(ALLOCATE(bufferSize)); + changetype(array).data = newBuffer; // links + changetype(array).dataStart = changetype(newBuffer); + changetype(array).dataEnd = changetype(newBuffer) + bufferSize; + store(changetype(array), (bufferSize >>> alignof()), offsetof("length_")); + if (isManaged()) { + ERROR("unexpected managed type"); // not used currently + let dataOffset: usize = 0; + while (dataOffset < bufferSize) { + let element: T = load(changetype(buffer) + dataOffset); + store(changetype(newBuffer) + dataOffset, element); + LINK(element, array); + dataOffset += sizeof(); + } + } else { + memory.copy(changetype(newBuffer), changetype(buffer), bufferSize); + } + return array; +} + // Helpers /** Asserts that a managed object is still unregistered. */ diff --git a/tests/compiler.js b/tests/compiler.js index 1168794984..5b5c1405ed 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -231,23 +231,15 @@ tests.forEach(filename => { let memory = new WebAssembly.Memory({ initial: 10 }); let exports = {}; + const RUNTIME_HEADER_SIZE = 8; // 16 if GC is present + function getString(ptr) { if (!ptr) return "null"; var U32 = new Uint32Array(exports.memory ? exports.memory.buffer : memory.buffer); var U16 = new Uint16Array(exports.memory ? exports.memory.buffer : memory.buffer); - var dataLength = U32[ptr >>> 2]; - var dataOffset = (ptr + 4) >>> 1; - var dataRemain = dataLength; - var parts = []; - const chunkSize = 1024; - while (dataRemain > chunkSize) { - let last = U16[dataOffset + chunkSize - 1]; - let size = last >= 0xD800 && last < 0xDC00 ? chunkSize - 1 : chunkSize; - let part = U16.subarray(dataOffset, dataOffset += size); - parts.push(String.fromCharCode.apply(String, part)); - dataRemain -= size; - } - return parts.join("") + String.fromCharCode.apply(String, U16.subarray(dataOffset, dataOffset + dataRemain)); + var len16 = U32[(ptr - RUNTIME_HEADER_SIZE + 4) >>> 2] >>> 1; + var ptr16 = ptr >>> 1; + return String.fromCharCode.apply(String, U16.subarray(ptr16, ptr16 + len16)); } var binaryBuffer = stdout.toBuffer(); diff --git a/tests/compiler/abi.optimized.wat b/tests/compiler/abi.optimized.wat index d8df07cdda..2bfee2faeb 100644 --- a/tests/compiler/abi.optimized.wat +++ b/tests/compiler/abi.optimized.wat @@ -4,7 +4,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\06\00\00\00a\00b\00i\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\0c\00\00\00a\00b\00i\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $abi/condition (mut i32) (i32.const 0)) @@ -26,7 +26,7 @@ global.get $abi/y if i32.const 0 - i32.const 8 + i32.const 16 i32.const 65 i32.const 2 call $~lib/env/abort diff --git a/tests/compiler/abi.untouched.wat b/tests/compiler/abi.untouched.wat index f0b87c252d..7271f11b7f 100644 --- a/tests/compiler/abi.untouched.wat +++ b/tests/compiler/abi.untouched.wat @@ -4,12 +4,12 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\06\00\00\00a\00b\00i\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\0c\00\00\00a\00b\00i\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $abi/condition (mut i32) (i32.const 0)) (global $abi/y (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 24)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 28)) (export "memory" (memory $0)) (export "table" (table $0)) (export "exported" (func $abi/exported)) @@ -39,7 +39,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 32 i32.const 2 call $~lib/env/abort @@ -78,7 +78,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 45 i32.const 2 call $~lib/env/abort @@ -109,7 +109,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 58 i32.const 2 call $~lib/env/abort @@ -128,7 +128,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 65 i32.const 2 call $~lib/env/abort @@ -145,7 +145,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 72 i32.const 2 call $~lib/env/abort @@ -160,7 +160,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 74 i32.const 2 call $~lib/env/abort @@ -173,7 +173,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 77 i32.const 2 call $~lib/env/abort @@ -186,7 +186,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 79 i32.const 2 call $~lib/env/abort diff --git a/tests/compiler/assert.optimized.wat b/tests/compiler/assert.optimized.wat index 56e77c21a5..f2e82a1c43 100644 --- a/tests/compiler/assert.optimized.wat +++ b/tests/compiler/assert.optimized.wat @@ -1,8 +1,8 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\t\00\00\00a\00s\00s\00e\00r\00t\00.\00t\00s") - (data (i32.const 32) "\0c\00\00\00m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e") + (data (i32.const 8) "\01\00\00\00\12\00\00\00a\00s\00s\00e\00r\00t\00.\00t\00s") + (data (i32.const 40) "\01\00\00\00\18\00\00\00m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e") (table $0 1 funcref) (elem (i32.const 0) $start) (export "memory" (memory $0)) diff --git a/tests/compiler/assert.untouched.wat b/tests/compiler/assert.untouched.wat index c9f2eafc38..8ab4993774 100644 --- a/tests/compiler/assert.untouched.wat +++ b/tests/compiler/assert.untouched.wat @@ -3,11 +3,11 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\t\00\00\00a\00s\00s\00e\00r\00t\00.\00t\00s\00") - (data (i32.const 32) "\0c\00\00\00m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e\00") + (data (i32.const 8) "\01\00\00\00\12\00\00\00a\00s\00s\00e\00r\00t\00.\00t\00s\00") + (data (i32.const 40) "\01\00\00\00\18\00\00\00m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 60)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 72)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -17,7 +17,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1 i32.const 0 call $~lib/env/abort @@ -27,7 +27,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2 i32.const 0 call $~lib/env/abort @@ -39,7 +39,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3 i32.const 0 call $~lib/env/abort @@ -50,7 +50,7 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 4 i32.const 0 call $~lib/env/abort @@ -62,7 +62,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 5 i32.const 0 call $~lib/env/abort @@ -72,7 +72,7 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 6 i32.const 0 call $~lib/env/abort @@ -84,7 +84,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 7 i32.const 0 call $~lib/env/abort @@ -95,8 +95,8 @@ if (result i32) local.get $0 else - i32.const 32 - i32.const 8 + i32.const 48 + i32.const 16 i32.const 10 i32.const 5 call $~lib/env/abort diff --git a/tests/compiler/bool.optimized.wat b/tests/compiler/bool.optimized.wat index 8389baed19..cc711a8527 100644 --- a/tests/compiler/bool.optimized.wat +++ b/tests/compiler/bool.optimized.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\07\00\00\00b\00o\00o\00l\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\0e\00\00\00b\00o\00o\00l\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $bool/i (mut i32) (i32.const 2)) @@ -24,7 +24,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2 i32.const 0 call $~lib/env/abort @@ -37,7 +37,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 4 i32.const 0 call $~lib/env/abort @@ -50,7 +50,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 6 i32.const 0 call $~lib/env/abort @@ -63,7 +63,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 8 i32.const 0 call $~lib/env/abort @@ -76,7 +76,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 10 i32.const 0 call $~lib/env/abort @@ -89,7 +89,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 12 i32.const 0 call $~lib/env/abort @@ -102,7 +102,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 14 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/bool.untouched.wat b/tests/compiler/bool.untouched.wat index 1c4604055d..4ef282c1ab 100644 --- a/tests/compiler/bool.untouched.wat +++ b/tests/compiler/bool.untouched.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\07\00\00\00b\00o\00o\00l\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\0e\00\00\00b\00o\00o\00l\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $bool/i (mut i32) (i32.const 2)) @@ -13,7 +13,7 @@ (global $bool/f (mut f32) (f32.const 2)) (global $bool/F (mut f64) (f64.const 2)) (global $bool/uu (mut i32) (i32.const 2)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 28)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -26,7 +26,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2 i32.const 0 call $~lib/env/abort @@ -40,7 +40,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 4 i32.const 0 call $~lib/env/abort @@ -54,7 +54,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 6 i32.const 0 call $~lib/env/abort @@ -68,7 +68,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 8 i32.const 0 call $~lib/env/abort @@ -82,7 +82,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 10 i32.const 0 call $~lib/env/abort @@ -96,7 +96,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 12 i32.const 0 call $~lib/env/abort @@ -110,7 +110,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 14 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/call-inferred.optimized.wat b/tests/compiler/call-inferred.optimized.wat index 5b82cabfa8..7bc28d5370 100644 --- a/tests/compiler/call-inferred.optimized.wat +++ b/tests/compiler/call-inferred.optimized.wat @@ -1,7 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\10\00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00 \00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $start) (export "memory" (memory $0)) diff --git a/tests/compiler/call-inferred.untouched.wat b/tests/compiler/call-inferred.untouched.wat index dbda18ce07..cf45f81999 100644 --- a/tests/compiler/call-inferred.untouched.wat +++ b/tests/compiler/call-inferred.untouched.wat @@ -6,10 +6,10 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00 \00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -33,7 +33,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 5 i32.const 0 call $~lib/env/abort @@ -46,7 +46,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 6 i32.const 0 call $~lib/env/abort @@ -59,7 +59,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 7 i32.const 0 call $~lib/env/abort @@ -72,7 +72,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 13 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/call-optional.optimized.wat b/tests/compiler/call-optional.optimized.wat index 57463721a6..e8313e4046 100644 --- a/tests/compiler/call-optional.optimized.wat +++ b/tests/compiler/call-optional.optimized.wat @@ -4,7 +4,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00 \00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s") (table $0 2 funcref) (elem (i32.const 0) $null $call-optional/opt|trampoline) (global $~lib/argc (mut i32) (i32.const 0)) @@ -65,7 +65,7 @@ i32.add if i32.const 0 - i32.const 8 + i32.const 16 i32.const 4 i32.const 0 call $~lib/env/abort @@ -103,7 +103,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 5 i32.const 0 call $~lib/env/abort @@ -118,7 +118,7 @@ call_indirect (type $FUNCSIG$iiii) if i32.const 0 - i32.const 8 + i32.const 16 i32.const 9 i32.const 0 call $~lib/env/abort @@ -135,7 +135,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 10 i32.const 0 call $~lib/env/abort @@ -152,7 +152,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 11 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/call-optional.untouched.wat b/tests/compiler/call-optional.untouched.wat index 1bd4adf597..63db1a24b6 100644 --- a/tests/compiler/call-optional.untouched.wat +++ b/tests/compiler/call-optional.untouched.wat @@ -4,12 +4,12 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00 \00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s\00") (table $0 2 funcref) (elem (i32.const 0) $null $call-optional/opt|trampoline) (global $~lib/argc (mut i32) (i32.const 0)) (global $call-optional/optIndirect (mut i32) (i32.const 1)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -57,7 +57,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 4 i32.const 0 call $~lib/env/abort @@ -76,7 +76,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 5 i32.const 0 call $~lib/env/abort @@ -91,7 +91,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 6 i32.const 0 call $~lib/env/abort @@ -111,7 +111,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 9 i32.const 0 call $~lib/env/abort @@ -131,7 +131,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 10 i32.const 0 call $~lib/env/abort @@ -151,7 +151,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 11 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 58900ea978..62f482b32a 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -5,7 +5,7 @@ (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\1a\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -13,7 +13,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -36,15 +36,15 @@ i32.add i32.const -8 i32.and - local.tee $2 + local.tee $0 current_memory - local.tee $3 + local.tee $2 i32.const 16 i32.shl i32.gt_u if - local.get $3 local.get $2 + local.get $0 local.get $1 i32.sub i32.const 65535 @@ -53,16 +53,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 + local.tee $3 + local.get $2 local.get $3 - local.get $0 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $0 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -71,16 +71,37 @@ end end end - local.get $2 + local.get $0 global.set $~lib/allocator/arena/offset local.get $1 ) - (func $call-super/A#constructor (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 7 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/memory/memory.allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add + ) + (func $call-super/A#constructor (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -92,7 +113,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 8 i32.const 4 call $~lib/env/abort @@ -100,10 +121,10 @@ end local.get $0 ) - (func $call-super/B#constructor (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $call-super/B#constructor (; 4 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE call $call-super/A#constructor local.tee $0 i32.const 2 @@ -114,7 +135,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 17 i32.const 4 call $~lib/env/abort @@ -126,7 +147,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 18 i32.const 4 call $~lib/env/abort @@ -134,7 +155,7 @@ end local.get $0 ) - (func $call-super/test1 (; 4 ;) (type $FUNCSIG$v) + (func $call-super/test1 (; 5 ;) (type $FUNCSIG$v) (local $0 i32) call $call-super/B#constructor local.tee $0 @@ -143,7 +164,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 24 i32.const 2 call $~lib/env/abort @@ -155,19 +176,19 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 25 i32.const 2 call $~lib/env/abort unreachable end ) - (func $call-super/C#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/C#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -175,10 +196,10 @@ i32.store local.get $0 ) - (func $call-super/D#constructor (; 6 ;) (type $FUNCSIG$i) (result i32) + (func $call-super/D#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE call $call-super/C#constructor local.tee $0 i32.const 2 @@ -189,7 +210,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 40 i32.const 4 call $~lib/env/abort @@ -201,7 +222,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 41 i32.const 4 call $~lib/env/abort @@ -209,7 +230,7 @@ end local.get $0 ) - (func $call-super/test2 (; 7 ;) (type $FUNCSIG$v) + (func $call-super/test2 (; 8 ;) (type $FUNCSIG$v) (local $0 i32) call $call-super/D#constructor local.tee $0 @@ -218,7 +239,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 47 i32.const 2 call $~lib/env/abort @@ -230,19 +251,19 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 48 i32.const 2 call $~lib/env/abort unreachable end ) - (func $call-super/E#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/E#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -254,7 +275,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 58 i32.const 4 call $~lib/env/abort @@ -262,10 +283,10 @@ end local.get $0 ) - (func $call-super/test3 (; 9 ;) (type $FUNCSIG$v) + (func $call-super/test3 (; 10 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 8 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE call $call-super/E#constructor local.tee $0 i32.const 2 @@ -276,7 +297,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 68 i32.const 2 call $~lib/env/abort @@ -288,24 +309,24 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 69 i32.const 2 call $~lib/env/abort unreachable end ) - (func $call-super/H#constructor (; 10 ;) (type $FUNCSIG$i) (result i32) + (func $call-super/H#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE call $call-super/C#constructor local.tee $0 i32.const 2 i32.store offset=4 local.get $0 ) - (func $call-super/test4 (; 11 ;) (type $FUNCSIG$v) + (func $call-super/test4 (; 12 ;) (type $FUNCSIG$v) (local $0 i32) call $call-super/H#constructor local.tee $0 @@ -314,7 +335,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 86 i32.const 2 call $~lib/env/abort @@ -326,14 +347,14 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 87 i32.const 2 call $~lib/env/abort unreachable end ) - (func $call-super/test5 (; 12 ;) (type $FUNCSIG$v) + (func $call-super/test5 (; 13 ;) (type $FUNCSIG$v) (local $0 i32) call $call-super/H#constructor local.tee $0 @@ -342,7 +363,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 106 i32.const 2 call $~lib/env/abort @@ -354,15 +375,15 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 107 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start (; 13 ;) (type $FUNCSIG$v) - i32.const 40 + (func $start (; 14 ;) (type $FUNCSIG$v) + i32.const 48 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -372,7 +393,7 @@ call $call-super/test4 call $call-super/test5 ) - (func $null (; 14 ;) (type $FUNCSIG$v) + (func $null (; 15 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index 5005235d83..cbbae6fadb 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -4,110 +4,130 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\1a\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/runtime/ADJUST (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 + return ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate - return + call $~lib/runtime/ADJUST + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add ) (func $call-super/A#constructor (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) @@ -115,7 +135,7 @@ i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -129,7 +149,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 8 i32.const 4 call $~lib/env/abort @@ -143,7 +163,7 @@ local.get $0 else i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE end call $call-super/A#constructor local.set $0 @@ -157,7 +177,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 17 i32.const 4 call $~lib/env/abort @@ -170,7 +190,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 18 i32.const 4 call $~lib/env/abort @@ -190,7 +210,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 24 i32.const 2 call $~lib/env/abort @@ -203,7 +223,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 25 i32.const 2 call $~lib/env/abort @@ -215,7 +235,7 @@ i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -229,7 +249,7 @@ local.get $0 else i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE end call $call-super/C#constructor local.set $0 @@ -243,7 +263,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 40 i32.const 4 call $~lib/env/abort @@ -256,7 +276,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 41 i32.const 4 call $~lib/env/abort @@ -276,7 +296,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 47 i32.const 2 call $~lib/env/abort @@ -289,7 +309,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 48 i32.const 2 call $~lib/env/abort @@ -302,7 +322,7 @@ i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -316,7 +336,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 58 i32.const 4 call $~lib/env/abort @@ -329,7 +349,7 @@ i32.eqz if i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -352,7 +372,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 68 i32.const 2 call $~lib/env/abort @@ -365,7 +385,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 69 i32.const 2 call $~lib/env/abort @@ -377,7 +397,7 @@ i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -390,7 +410,7 @@ i32.eqz if i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -413,7 +433,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 86 i32.const 2 call $~lib/env/abort @@ -426,7 +446,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 87 i32.const 2 call $~lib/env/abort @@ -438,7 +458,7 @@ i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -451,7 +471,7 @@ i32.eqz if i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -474,7 +494,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 106 i32.const 2 call $~lib/env/abort @@ -487,7 +507,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 107 i32.const 2 call $~lib/env/abort @@ -495,7 +515,16 @@ end ) (func $start:call-super (; 19 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset call $call-super/test1 call $call-super/test2 call $call-super/test3 diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index 56082bcd13..7531e170a4 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -2,7 +2,7 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (memory $0 1) - (data (i32.const 8) "\08\00\00\00c\00l\00a\00s\00s\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\10\00\00\00c\00l\00a\00s\00s\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $start) (export "memory" (memory $0)) diff --git a/tests/compiler/class.untouched.wat b/tests/compiler/class.untouched.wat index 4f077de801..bd5155a745 100644 --- a/tests/compiler/class.untouched.wat +++ b/tests/compiler/class.untouched.wat @@ -8,11 +8,11 @@ (type $FUNCSIG$fiff (func (param i32 f32 f32) (result f32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\08\00\00\00c\00l\00a\00s\00s\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\10\00\00\00c\00l\00a\00s\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $class/Animal.ONE (mut i32) (i32.const 1)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 28)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $class/test)) @@ -39,7 +39,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 13 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/comma.optimized.wat b/tests/compiler/comma.optimized.wat index 8b11cbe40b..c7af0887b3 100644 --- a/tests/compiler/comma.optimized.wat +++ b/tests/compiler/comma.optimized.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\08\00\00\00c\00o\00m\00m\00a\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\10\00\00\00c\00o\00m\00m\00a\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $comma/a (mut i32) (i32.const 0)) @@ -25,7 +25,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 4 i32.const 0 call $~lib/env/abort @@ -34,7 +34,7 @@ global.get $comma/b if i32.const 0 - i32.const 8 + i32.const 16 i32.const 5 i32.const 0 call $~lib/env/abort @@ -52,7 +52,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 8 i32.const 0 call $~lib/env/abort @@ -63,7 +63,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 9 i32.const 0 call $~lib/env/abort @@ -85,7 +85,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 14 i32.const 0 call $~lib/env/abort @@ -96,7 +96,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 15 i32.const 0 call $~lib/env/abort @@ -115,7 +115,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 18 i32.const 0 call $~lib/env/abort @@ -126,7 +126,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 19 i32.const 0 call $~lib/env/abort @@ -156,7 +156,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 22 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/comma.untouched.wat b/tests/compiler/comma.untouched.wat index dc8c2f295a..21671a4254 100644 --- a/tests/compiler/comma.untouched.wat +++ b/tests/compiler/comma.untouched.wat @@ -3,12 +3,12 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\08\00\00\00c\00o\00m\00m\00a\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\10\00\00\00c\00o\00m\00m\00a\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $comma/a (mut i32) (i32.const 0)) (global $comma/b (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 28)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -34,7 +34,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 4 i32.const 0 call $~lib/env/abort @@ -46,7 +46,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 5 i32.const 0 call $~lib/env/abort @@ -66,7 +66,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 8 i32.const 0 call $~lib/env/abort @@ -78,7 +78,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 9 i32.const 0 call $~lib/env/abort @@ -104,7 +104,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 14 i32.const 0 call $~lib/env/abort @@ -116,7 +116,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 15 i32.const 0 call $~lib/env/abort @@ -140,7 +140,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 18 i32.const 0 call $~lib/env/abort @@ -152,7 +152,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 19 i32.const 0 call $~lib/env/abort @@ -189,7 +189,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 22 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index 6fe3e155d4..29c159fcc6 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (memory $0 0) (table $0 1 funcref) @@ -21,7 +21,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -44,15 +44,15 @@ i32.add i32.const -8 i32.and - local.tee $2 + local.tee $0 current_memory - local.tee $3 + local.tee $2 i32.const 16 i32.shl i32.gt_u if - local.get $3 local.get $2 + local.get $0 local.get $1 i32.sub i32.const 65535 @@ -61,16 +61,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 + local.tee $3 + local.get $2 local.get $3 - local.get $0 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $0 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -79,87 +79,108 @@ end end end - local.get $2 + local.get $0 global.set $~lib/allocator/arena/offset local.get $1 ) - (func $constructor/EmptyCtorWithFieldInit#constructor (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/runtime/ALLOCATE (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 7 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/memory/memory.allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add + ) + (func $constructor/EmptyCtorWithFieldInit#constructor (; 2 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 4 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE local.tee $0 i32.const 1 i32.store local.get $0 ) - (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 2 ;) (type $FUNCSIG$i) (result i32) + (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 3 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 4 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE local.tee $0 i32.const 0 i32.store local.get $0 ) - (func $start:constructor (; 3 ;) (type $FUNCSIG$v) + (func $start:constructor (; 4 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 8 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE global.set $constructor/emptyCtor call $constructor/EmptyCtorWithFieldInit#constructor global.set $constructor/emptyCtorWithFieldInit call $constructor/EmptyCtorWithFieldNoInit#constructor global.set $constructor/emptyCtorWithFieldNoInit i32.const 0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE global.set $constructor/none call $constructor/EmptyCtorWithFieldInit#constructor global.set $constructor/justFieldInit call $constructor/EmptyCtorWithFieldNoInit#constructor global.set $constructor/justFieldNoInit i32.const 0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/memory/memory.allocate global.set $constructor/ctorReturns block $__inlined_func$constructor/CtorConditionallyReturns#constructor (result i32) global.get $constructor/b if i32.const 0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/memory/memory.allocate br $__inlined_func$constructor/CtorConditionallyReturns#constructor end i32.const 0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE end global.set $constructor/ctorConditionallyReturns i32.const 0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE global.set $constructor/ctorAllocates block (result i32) global.get $constructor/b if i32.const 0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 i32.eqz end - if + if (result i32) i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $0 + call $~lib/runtime/ALLOCATE + else + local.get $0 end - local.get $0 global.set $constructor/ctorConditionallyAllocates ) - (func $start (; 4 ;) (type $FUNCSIG$v) + (func $start (; 5 ;) (type $FUNCSIG$v) call $start:constructor ) - (func $null (; 5 ;) (type $FUNCSIG$v) + (func $null (; 6 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index f1a500b8c3..ad1e648b5e 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -1,9 +1,12 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$v (func)) (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $constructor/emptyCtor (mut i32) (i32.const 0)) @@ -21,108 +24,125 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 0 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/runtime/ADJUST (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 + return ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate - return + call $~lib/runtime/ADJUST + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add ) (func $constructor/EmptyCtor#constructor (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -132,7 +152,7 @@ i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -145,7 +165,7 @@ i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -158,7 +178,7 @@ i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -168,7 +188,7 @@ i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -181,7 +201,7 @@ i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -190,33 +210,21 @@ local.get $0 ) (func $constructor/CtorReturns#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - block $~lib/memory/memory.allocate|inlined.0 (result i32) - i32.const 0 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end + i32.const 0 + call $~lib/memory/memory.allocate ) (func $constructor/CtorConditionallyReturns#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) global.get $constructor/b if - block $~lib/memory/memory.allocate|inlined.1 (result i32) - i32.const 0 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 - end + i32.const 0 + call $~lib/memory/memory.allocate return end local.get $0 i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -227,7 +235,7 @@ i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -243,7 +251,7 @@ i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -254,13 +262,22 @@ i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 ) (func $start:constructor (; 13 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset i32.const 0 call $constructor/EmptyCtor#constructor global.set $constructor/emptyCtor diff --git a/tests/compiler/declare.optimized.wat b/tests/compiler/declare.optimized.wat index ef4530a9f9..8d9f46b62b 100644 --- a/tests/compiler/declare.optimized.wat +++ b/tests/compiler/declare.optimized.wat @@ -7,7 +7,7 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "declare" "my.externalFunction" (func $declare/my.externalFunction)) (memory $0 1) - (data (i32.const 8) "\n\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\14\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (export "memory" (memory $0)) @@ -20,7 +20,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 5 i32.const 0 call $~lib/env/abort @@ -32,7 +32,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 13 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/declare.untouched.wat b/tests/compiler/declare.untouched.wat index ab37d9bb49..65646b05da 100644 --- a/tests/compiler/declare.untouched.wat +++ b/tests/compiler/declare.untouched.wat @@ -7,10 +7,10 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "declare" "my.externalFunction" (func $declare/my.externalFunction)) (memory $0 1) - (data (i32.const 8) "\n\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\14\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 36)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -22,7 +22,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 5 i32.const 0 call $~lib/env/abort @@ -35,7 +35,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 13 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 0705d6fa4f..cbe1030f0f 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\05\00\00\00d\00o\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\n\00\00\00d\00o\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $do/n (mut i32) (i32.const 10)) @@ -29,7 +29,7 @@ global.get $do/n if i32.const 0 - i32.const 8 + i32.const 16 i32.const 7 i32.const 0 call $~lib/env/abort @@ -40,7 +40,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 8 i32.const 0 call $~lib/env/abort @@ -62,7 +62,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 12 i32.const 0 call $~lib/env/abort @@ -96,7 +96,7 @@ global.get $do/n if i32.const 0 - i32.const 8 + i32.const 16 i32.const 24 i32.const 2 call $~lib/env/abort @@ -107,7 +107,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 25 i32.const 2 call $~lib/env/abort @@ -119,7 +119,7 @@ global.get $do/n if i32.const 0 - i32.const 8 + i32.const 16 i32.const 27 i32.const 0 call $~lib/env/abort @@ -130,7 +130,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 28 i32.const 0 call $~lib/env/abort @@ -141,7 +141,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 29 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/do.untouched.wat b/tests/compiler/do.untouched.wat index b26b20c534..8977815a6c 100644 --- a/tests/compiler/do.untouched.wat +++ b/tests/compiler/do.untouched.wat @@ -3,13 +3,13 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\05\00\00\00d\00o\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\n\00\00\00d\00o\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $do/n (mut i32) (i32.const 10)) (global $do/m (mut i32) (i32.const 0)) (global $do/o (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 24)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 28)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -37,7 +37,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 7 i32.const 0 call $~lib/env/abort @@ -49,7 +49,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 8 i32.const 0 call $~lib/env/abort @@ -77,7 +77,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 12 i32.const 0 call $~lib/env/abort @@ -120,7 +120,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 24 i32.const 2 call $~lib/env/abort @@ -132,7 +132,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 25 i32.const 2 call $~lib/env/abort @@ -149,7 +149,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 27 i32.const 0 call $~lib/env/abort @@ -161,7 +161,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 28 i32.const 0 call $~lib/env/abort @@ -173,7 +173,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 29 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/empty.ts b/tests/compiler/empty.ts index e69de29bb2..26349bc92e 100644 --- a/tests/compiler/empty.ts +++ b/tests/compiler/empty.ts @@ -0,0 +1,8 @@ +import "allocator/arena"; + +var arr: i32[] = [1, 2, 3]; + +assert(arr.length == 3); +assert(arr[0] == 1); +assert(arr[1] == 2); +assert(arr[2] == 3); diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index 7f2e633d79..1e718a587c 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -1,15 +1,13 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $exports/Animal.CAT i32 (i32.const 0)) (global $exports/Animal.DOG i32 (i32.const 1)) (global $exports/animals.Animal.CAT i32 (i32.const 0)) @@ -17,6 +15,8 @@ (global $exports/Car.TIRES i32 (i32.const 4)) (global $exports/vehicles.Car.TIRES i32 (i32.const 4)) (global $exports/outer.inner.a i32 (i32.const 42)) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -59,18 +59,30 @@ (func $exports/Car.getNumTires (; 2 ;) (type $FUNCSIG$i) (result i32) i32.const 4 ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end global.get $~lib/allocator/arena/offset - local.tee $0 - i32.const 11 + local.tee $1 + local.get $0 + i32.const 1 + local.get $0 + i32.const 1 + i32.gt_u + select + i32.add + i32.const 7 i32.add i32.const -8 i32.and - local.tee $1 + local.tee $0 current_memory local.tee $2 i32.const 16 @@ -78,8 +90,8 @@ i32.gt_u if local.get $2 - local.get $1 local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -105,9 +117,9 @@ end end end - local.get $1 - global.set $~lib/allocator/arena/offset local.get $0 + global.set $~lib/allocator/arena/offset + local.get $1 ) (func $exports/Car#get:numDoors (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -167,7 +179,17 @@ local.get $0 i32.eqz if - call $~lib/allocator/arena/__memory_allocate + i32.const 16 + call $~lib/memory/memory.allocate + local.tee $0 + i32.const -1520547049 + i32.store + local.get $0 + i32.const 4 + i32.store offset=4 + local.get $0 + i32.const 8 + i32.add local.set $0 end local.get $0 diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 2fee8385e9..79bd96565c 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -1,15 +1,13 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $exports/Animal.CAT i32 (i32.const 0)) (global $exports/Animal.DOG i32 (i32.const 1)) (global $exports/animals.Animal.CAT i32 (i32.const 0)) @@ -17,6 +15,11 @@ (global $exports/Car.TIRES i32 (i32.const 4)) (global $exports/vehicles.Car.TIRES i32 (i32.const 4)) (global $exports/outer.inner.a i32 (i32.const 42)) + (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/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (global $~lib/argc (mut i32) (i32.const 0)) (export "memory" (memory $0)) @@ -47,130 +50,144 @@ (export "vehicles.Car.getNumTires" (func $exports/vehicles.Car.getNumTires)) (export "outer.inner.a" (global $exports/outer.inner.a)) (start $start) - (func $start:~lib/allocator/arena (; 0 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $start:exports (; 1 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena - ) - (func $exports/add (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/add (; 0 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $exports/subOpt (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $exports/math.sub (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/math.sub (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $exports/Car.getNumTires (; 5 ;) (type $FUNCSIG$i) (result i32) + (func $exports/Car.getNumTires (; 3 ;) (type $FUNCSIG$i) (result i32) global.get $exports/Car.TIRES ) - (func $~lib/allocator/arena/__memory_allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUST (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/memory/memory.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 + return ) - (func $~lib/memory/memory.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate - return + call $~lib/runtime/ADJUST + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add ) - (func $exports/Car#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -182,28 +199,28 @@ i32.store local.get $0 ) - (func $exports/Car#get:numDoors (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $exports/Car#get:numDoors (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/Car#set:numDoors (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $exports/Car#set:numDoors (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#openDoors (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $exports/Car#openDoors (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $exports/vehicles.Car.getNumTires (; 12 ;) (type $FUNCSIG$i) (result i32) + (func $exports/vehicles.Car.getNumTires (; 11 ;) (type $FUNCSIG$i) (result i32) global.get $exports/vehicles.Car.TIRES ) - (func $exports/vehicles.Car#constructor (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/vehicles.Car#constructor (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -215,24 +232,33 @@ i32.store local.get $0 ) - (func $exports/vehicles.Car#get:numDoors (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $exports/vehicles.Car#get:numDoors (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/vehicles.Car#set:numDoors (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $exports/vehicles.Car#set:numDoors (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/vehicles.Car#openDoors (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $exports/vehicles.Car#openDoors (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $start (; 17 ;) (type $FUNCSIG$v) - call $start:exports + (func $start (; 16 ;) (type $FUNCSIG$v) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset ) - (func $null (; 18 ;) (type $FUNCSIG$v) + (func $null (; 17 ;) (type $FUNCSIG$v) ) - (func $exports/subOpt|trampoline (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt|trampoline (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -250,20 +276,20 @@ local.get $1 call $exports/subOpt ) - (func $~lib/setargc (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) - (func $Car#get:doors (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $Car#get:doors (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $Car#set:doors (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $Car#set:doors (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#constructor|trampoline (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor|trampoline (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -279,16 +305,16 @@ local.get $1 call $exports/Car#constructor ) - (func $vehicles.Car#get:doors (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $vehicles.Car#get:doors (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $vehicles.Car#set:doors (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $vehicles.Car#set:doors (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/vehicles.Car#constructor|trampoline (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/vehicles.Car#constructor|trampoline (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 11e8c6032e..a7bed008ab 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\06\00\00\00f\00o\00r\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\0c\00\00\00f\00o\00r\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $for/i (mut i32) (i32.const 0)) @@ -33,7 +33,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 5 i32.const 0 call $~lib/env/abort @@ -68,7 +68,7 @@ global.get $for/i if i32.const 0 - i32.const 8 + i32.const 16 i32.const 12 i32.const 0 call $~lib/env/abort @@ -115,7 +115,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 19 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/for.untouched.wat b/tests/compiler/for.untouched.wat index 9502a23466..45e07de2e3 100644 --- a/tests/compiler/for.untouched.wat +++ b/tests/compiler/for.untouched.wat @@ -3,11 +3,11 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\06\00\00\00f\00o\00r\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\0c\00\00\00f\00o\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $for/i (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 24)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 28)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -41,7 +41,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 5 i32.const 0 call $~lib/env/abort @@ -89,7 +89,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 12 i32.const 0 call $~lib/env/abort @@ -164,7 +164,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 19 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/function-expression.optimized.wat b/tests/compiler/function-expression.optimized.wat index 1a71339c3e..f90052aae1 100644 --- a/tests/compiler/function-expression.optimized.wat +++ b/tests/compiler/function-expression.optimized.wat @@ -6,7 +6,7 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\16\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00,\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s") (table $0 11 funcref) (elem (i32.const 0) $start:function-expression~someName $start:function-expression~anonymous|0 $start:function-expression~anonymous|0 $start:function-expression~someName $start:function-expression~anonymous|2 $start:function-expression~anonymous|3 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5 $start:function-expression~anonymous|3 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5) (global $function-expression/f1 (mut i32) (i32.const 1)) @@ -47,7 +47,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 4 i32.const 0 call $~lib/env/abort @@ -62,7 +62,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 9 i32.const 0 call $~lib/env/abort @@ -80,7 +80,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 16 i32.const 0 call $~lib/env/abort @@ -96,7 +96,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 21 i32.const 0 call $~lib/env/abort @@ -112,7 +112,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 22 i32.const 0 call $~lib/env/abort @@ -128,7 +128,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 23 i32.const 0 call $~lib/env/abort @@ -144,7 +144,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 34 i32.const 0 call $~lib/env/abort @@ -160,7 +160,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 35 i32.const 0 call $~lib/env/abort @@ -176,7 +176,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 36 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/function-expression.untouched.wat b/tests/compiler/function-expression.untouched.wat index a3747b794f..1e02707c61 100644 --- a/tests/compiler/function-expression.untouched.wat +++ b/tests/compiler/function-expression.untouched.wat @@ -6,7 +6,7 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\16\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00,\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s\00") (table $0 11 funcref) (elem (i32.const 0) $null $start:function-expression~anonymous|0 $start:function-expression~anonymous|1 $start:function-expression~someName $start:function-expression~anonymous|2 $start:function-expression~anonymous|3 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5 $function-expression/testOmittedReturn1~anonymous|0 $function-expression/testOmittedReturn2~anonymous|0 $function-expression/testOmittedReturn3~anonymous|0) (global $function-expression/f1 (mut i32) (i32.const 1)) @@ -14,7 +14,7 @@ (global $function-expression/f2 (mut i32) (i32.const 2)) (global $function-expression/f3 (mut i32) (i32.const 3)) (global $function-expression/f4 (mut i32) (i32.const 4)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 60)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -82,7 +82,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 4 i32.const 0 call $~lib/env/abort @@ -100,7 +100,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 9 i32.const 0 call $~lib/env/abort @@ -123,7 +123,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 16 i32.const 0 call $~lib/env/abort @@ -136,7 +136,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 21 i32.const 0 call $~lib/env/abort @@ -149,7 +149,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 22 i32.const 0 call $~lib/env/abort @@ -162,7 +162,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 23 i32.const 0 call $~lib/env/abort @@ -181,7 +181,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 34 i32.const 0 call $~lib/env/abort @@ -200,7 +200,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 35 i32.const 0 call $~lib/env/abort @@ -219,7 +219,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 36 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/function-types.optimized.wat b/tests/compiler/function-types.optimized.wat index 00fd577caa..18a1abc67c 100644 --- a/tests/compiler/function-types.optimized.wat +++ b/tests/compiler/function-types.optimized.wat @@ -6,7 +6,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\11\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\"\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s") (table $0 5 funcref) (elem (i32.const 0) $null $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0) (global $function-types/i32Adder (mut i32) (i32.const 0)) @@ -44,7 +44,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 11 i32.const 0 call $~lib/env/abort @@ -62,7 +62,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 15 i32.const 0 call $~lib/env/abort @@ -78,7 +78,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 17 i32.const 0 call $~lib/env/abort @@ -94,7 +94,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 23 i32.const 0 call $~lib/env/abort @@ -110,7 +110,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 29 i32.const 0 call $~lib/env/abort @@ -126,7 +126,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 35 i32.const 0 call $~lib/env/abort @@ -157,7 +157,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 41 i32.const 0 call $~lib/env/abort @@ -173,7 +173,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 42 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/function-types.untouched.wat b/tests/compiler/function-types.untouched.wat index b63eaf8255..70a30e4c6e 100644 --- a/tests/compiler/function-types.untouched.wat +++ b/tests/compiler/function-types.untouched.wat @@ -8,13 +8,13 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\11\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\"\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s\00") (table $0 5 funcref) (elem (i32.const 0) $null $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/addI32) (global $function-types/i32Adder (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (global $function-types/i64Adder (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 52)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -106,7 +106,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 11 i32.const 0 call $~lib/env/abort @@ -127,7 +127,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 15 i32.const 0 call $~lib/env/abort @@ -146,7 +146,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 17 i32.const 0 call $~lib/env/abort @@ -161,7 +161,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 23 i32.const 0 call $~lib/env/abort @@ -175,7 +175,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 29 i32.const 0 call $~lib/env/abort @@ -190,7 +190,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 35 i32.const 0 call $~lib/env/abort @@ -209,7 +209,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 41 i32.const 0 call $~lib/env/abort @@ -224,7 +224,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 42 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index e8a68bcf42..d8ad0b6e78 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -1,6 +1,7 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$v (func)) (memory $0 0) (table $0 2 funcref) (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|0) @@ -11,18 +12,30 @@ (export "table" (table $0)) (export "test" (func $getter-call/test)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/memory/memory.allocate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end global.get $~lib/allocator/arena/offset - local.tee $0 - i32.const 8 + local.tee $1 + local.get $0 + i32.const 1 + local.get $0 + i32.const 1 + i32.gt_u + select + i32.add + i32.const 7 i32.add i32.const -8 i32.and - local.tee $1 + local.tee $0 current_memory local.tee $2 i32.const 16 @@ -30,8 +43,8 @@ i32.gt_u if local.get $2 - local.get $1 local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -57,16 +70,23 @@ end end end - local.get $1 - global.set $~lib/allocator/arena/offset local.get $0 + global.set $~lib/allocator/arena/offset + local.get $1 ) (func $getter-call/C#get:x~anonymous|0 (; 1 ;) (type $FUNCSIG$i) (result i32) i32.const 42 ) (func $getter-call/test (; 2 ;) (type $FUNCSIG$i) (result i32) - call $~lib/allocator/arena/__memory_allocate - drop + (local $0 i32) + i32.const 8 + call $~lib/memory/memory.allocate + local.tee $0 + i32.const -1520547049 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 i32.const 0 global.set $~lib/argc i32.const 1 diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index a275537b5e..9d91f3f918 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -1,10 +1,13 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$v (func)) (memory $0 0) (table $0 2 funcref) (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|0) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) @@ -13,122 +16,136 @@ (export "table" (table $0)) (export "test" (func $getter-call/test)) (start $start) - (func $start:~lib/allocator/arena (; 0 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/runtime/ADJUST (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $start:getter-call (; 1 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 + return ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate - return + call $~lib/runtime/ADJUST + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add ) - (func $getter-call/C#constructor (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $getter-call/C#constructor (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 ) - (func $getter-call/C#get:x~anonymous|0 (; 5 ;) (type $FUNCSIG$i) (result i32) + (func $getter-call/C#get:x~anonymous|0 (; 4 ;) (type $FUNCSIG$i) (result i32) i32.const 42 ) - (func $getter-call/C#get:x (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $getter-call/C#get:x (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 ) - (func $getter-call/test (; 7 ;) (type $FUNCSIG$i) (result i32) + (func $getter-call/test (; 6 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 0 call $getter-call/C#constructor @@ -139,9 +156,18 @@ call $getter-call/C#get:x call_indirect (type $FUNCSIG$i) ) - (func $start (; 8 ;) (type $FUNCSIG$v) - call $start:getter-call + (func $start (; 7 ;) (type $FUNCSIG$v) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset ) - (func $null (; 9 ;) (type $FUNCSIG$v) + (func $null (; 8 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/getter-setter.optimized.wat b/tests/compiler/getter-setter.optimized.wat index 4cd6c0de5b..ca02235af5 100644 --- a/tests/compiler/getter-setter.optimized.wat +++ b/tests/compiler/getter-setter.optimized.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00 \00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $getter-setter/Foo._bar (mut i32) (i32.const 0)) @@ -14,7 +14,7 @@ global.get $getter-setter/Foo._bar if i32.const 0 - i32.const 8 + i32.const 16 i32.const 13 i32.const 0 call $~lib/env/abort @@ -27,7 +27,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 15 i32.const 0 call $~lib/env/abort @@ -40,7 +40,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 16 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/getter-setter.untouched.wat b/tests/compiler/getter-setter.untouched.wat index a2b8434942..e82b9ab35f 100644 --- a/tests/compiler/getter-setter.untouched.wat +++ b/tests/compiler/getter-setter.untouched.wat @@ -5,11 +5,11 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00 \00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $getter-setter/Foo._bar (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -27,7 +27,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 13 i32.const 0 call $~lib/env/abort @@ -41,7 +41,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 15 i32.const 0 call $~lib/env/abort @@ -57,7 +57,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 16 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/if.optimized.wat b/tests/compiler/if.optimized.wat index 45e0fc4136..8415b7eae3 100644 --- a/tests/compiler/if.optimized.wat +++ b/tests/compiler/if.optimized.wat @@ -4,7 +4,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\05\00\00\00i\00f\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\n\00\00\00i\00f\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $start) (export "memory" (memory $0)) @@ -33,7 +33,7 @@ i32.const 1 else i32.const 0 - i32.const 8 + i32.const 16 i32.const 37 i32.const 4 call $~lib/env/abort diff --git a/tests/compiler/if.untouched.wat b/tests/compiler/if.untouched.wat index 689321a103..6ed4a2269d 100644 --- a/tests/compiler/if.untouched.wat +++ b/tests/compiler/if.untouched.wat @@ -4,10 +4,10 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\05\00\00\00i\00f\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\n\00\00\00i\00f\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 24)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 28)) (export "memory" (memory $0)) (export "table" (table $0)) (export "ifThenElse" (func $if/ifThenElse)) @@ -55,7 +55,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 8 i32.const 0 call $~lib/env/abort @@ -68,7 +68,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 9 i32.const 0 call $~lib/env/abort @@ -81,7 +81,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 17 i32.const 0 call $~lib/env/abort @@ -94,7 +94,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 18 i32.const 0 call $~lib/env/abort @@ -107,7 +107,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 30 i32.const 0 call $~lib/env/abort @@ -120,7 +120,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 31 i32.const 0 call $~lib/env/abort @@ -134,7 +134,7 @@ return else i32.const 0 - i32.const 8 + i32.const 16 i32.const 37 i32.const 4 call $~lib/env/abort diff --git a/tests/compiler/infer-type.optimized.wat b/tests/compiler/infer-type.optimized.wat index 1f64441e8e..6237556e35 100644 --- a/tests/compiler/infer-type.optimized.wat +++ b/tests/compiler/infer-type.optimized.wat @@ -1,7 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\1a\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $infer-type/ri (mut i32) (i32.const 0)) diff --git a/tests/compiler/infer-type.untouched.wat b/tests/compiler/infer-type.untouched.wat index 10490e5e4f..8c89b18bc5 100644 --- a/tests/compiler/infer-type.untouched.wat +++ b/tests/compiler/infer-type.untouched.wat @@ -7,7 +7,7 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\1a\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $infer-type/i i32 (i32.const 10)) @@ -19,7 +19,7 @@ (global $infer-type/rF (mut f64) (f64.const 0)) (global $infer-type/inferi (mut i32) (i32.const -2147483648)) (global $infer-type/inferu (mut i32) (i32.const 2147483647)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -109,7 +109,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 49 i32.const 0 call $~lib/env/abort @@ -119,7 +119,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 52 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index db65ba0292..5272d28c02 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -5,7 +5,7 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\16\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s") (table $0 2 funcref) (elem (i32.const 0) $null $inlining/func_fe~anonymous|0) (global $~lib/argc (mut i32) (i32.const 0)) @@ -31,14 +31,14 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 68 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -61,15 +61,15 @@ i32.add i32.const -8 i32.and - local.tee $2 + local.tee $0 current_memory - local.tee $3 + local.tee $2 i32.const 16 i32.shl i32.gt_u if - local.get $3 local.get $2 + local.get $0 local.get $1 i32.sub i32.const 65535 @@ -78,16 +78,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 + local.tee $3 + local.get $2 local.get $3 - local.get $0 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $0 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -96,19 +96,40 @@ end end end - local.get $2 + local.get $0 global.set $~lib/allocator/arena/offset local.get $1 ) - (func $inlining/test_ctor (; 5 ;) (type $FUNCSIG$v) + (func $~lib/runtime/ALLOCATE (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 7 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/memory/memory.allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add + ) + (func $inlining/test_ctor (; 6 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 16 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE local.tee $0 i32.eqz if i32.const 8 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -135,7 +156,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 97 i32.const 2 call $~lib/env/abort @@ -147,7 +168,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 98 i32.const 2 call $~lib/env/abort @@ -159,7 +180,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 99 i32.const 2 call $~lib/env/abort @@ -171,14 +192,14 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 100 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start (; 6 ;) (type $FUNCSIG$v) + (func $start (; 7 ;) (type $FUNCSIG$v) call $inlining/test_funcs i32.const 40 global.set $~lib/allocator/arena/startOffset @@ -186,7 +207,7 @@ global.set $~lib/allocator/arena/offset call $inlining/test_ctor ) - (func $null (; 7 ;) (type $FUNCSIG$v) + (func $null (; 8 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 39dc34d745..933dbae65f 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -5,14 +5,17 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\16\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s\00") (table $0 2 funcref) (elem (i32.const 0) $null $inlining/func_fe~anonymous|0) (global $inlining/constantGlobal i32 (i32.const 1)) (global $~lib/argc (mut 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_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 36)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $inlining/test)) @@ -62,7 +65,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 60 i32.const 2 call $~lib/env/abort @@ -92,7 +95,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 61 i32.const 2 call $~lib/env/abort @@ -122,7 +125,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 62 i32.const 2 call $~lib/env/abort @@ -138,7 +141,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 63 i32.const 2 call $~lib/env/abort @@ -154,7 +157,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 64 i32.const 2 call $~lib/env/abort @@ -180,7 +183,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 65 i32.const 2 call $~lib/env/abort @@ -206,7 +209,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 66 i32.const 2 call $~lib/env/abort @@ -230,7 +233,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 68 i32.const 2 call $~lib/env/abort @@ -250,7 +253,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 69 i32.const 2 call $~lib/env/abort @@ -272,108 +275,125 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 71 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start:~lib/allocator/arena (; 4 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/runtime/ADJUST (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 + return ) - (func $~lib/memory/memory.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate - return + call $~lib/runtime/ADJUST + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add ) (func $inlining/test_ctor (; 7 ;) (type $FUNCSIG$v) (local $0 i32) @@ -392,7 +412,7 @@ local.get $0 else i32.const 16 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE end local.set $2 i32.const 2 @@ -402,7 +422,7 @@ i32.eqz if i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $2 end local.get $2 @@ -437,7 +457,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 97 i32.const 2 call $~lib/env/abort @@ -450,7 +470,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 98 i32.const 2 call $~lib/env/abort @@ -463,7 +483,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 99 i32.const 2 call $~lib/env/abort @@ -476,7 +496,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 100 i32.const 2 call $~lib/env/abort @@ -490,14 +510,23 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 10 i32.const 0 call $~lib/env/abort unreachable end call $inlining/test_funcs - call $start:~lib/allocator/arena + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset call $inlining/test_ctor ) (func $start (; 9 ;) (type $FUNCSIG$v) diff --git a/tests/compiler/instanceof.optimized.wat b/tests/compiler/instanceof.optimized.wat index e49cba3a51..dd62dccf65 100644 --- a/tests/compiler/instanceof.optimized.wat +++ b/tests/compiler/instanceof.optimized.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\1a\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $instanceof/an (mut i32) (i32.const 0)) @@ -14,7 +14,7 @@ global.get $instanceof/an if i32.const 0 - i32.const 8 + i32.const 16 i32.const 68 i32.const 0 call $~lib/env/abort @@ -26,7 +26,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 71 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/instanceof.untouched.wat b/tests/compiler/instanceof.untouched.wat index 8dd1d677ea..ed9a4ef73b 100644 --- a/tests/compiler/instanceof.untouched.wat +++ b/tests/compiler/instanceof.untouched.wat @@ -5,7 +5,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\1a\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $instanceof/a (mut i32) (i32.const 0)) @@ -15,7 +15,7 @@ (global $instanceof/f (mut f32) (f32.const 0)) (global $instanceof/F (mut f64) (f64.const 0)) (global $instanceof/an (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -40,7 +40,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 11 i32.const 0 call $~lib/env/abort @@ -50,7 +50,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 12 i32.const 0 call $~lib/env/abort @@ -61,7 +61,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 13 i32.const 0 call $~lib/env/abort @@ -72,7 +72,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 14 i32.const 0 call $~lib/env/abort @@ -83,7 +83,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 15 i32.const 0 call $~lib/env/abort @@ -94,7 +94,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 16 i32.const 0 call $~lib/env/abort @@ -105,7 +105,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 18 i32.const 0 call $~lib/env/abort @@ -115,7 +115,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 19 i32.const 0 call $~lib/env/abort @@ -126,7 +126,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 20 i32.const 0 call $~lib/env/abort @@ -137,7 +137,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 21 i32.const 0 call $~lib/env/abort @@ -148,7 +148,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 22 i32.const 0 call $~lib/env/abort @@ -159,7 +159,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 23 i32.const 0 call $~lib/env/abort @@ -170,7 +170,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 25 i32.const 0 call $~lib/env/abort @@ -181,7 +181,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 26 i32.const 0 call $~lib/env/abort @@ -191,7 +191,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 27 i32.const 0 call $~lib/env/abort @@ -202,7 +202,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 28 i32.const 0 call $~lib/env/abort @@ -213,7 +213,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 29 i32.const 0 call $~lib/env/abort @@ -224,7 +224,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 30 i32.const 0 call $~lib/env/abort @@ -235,7 +235,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 32 i32.const 0 call $~lib/env/abort @@ -246,7 +246,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 33 i32.const 0 call $~lib/env/abort @@ -257,7 +257,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 34 i32.const 0 call $~lib/env/abort @@ -267,7 +267,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 35 i32.const 0 call $~lib/env/abort @@ -278,7 +278,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 36 i32.const 0 call $~lib/env/abort @@ -289,7 +289,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 37 i32.const 0 call $~lib/env/abort @@ -300,7 +300,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 39 i32.const 0 call $~lib/env/abort @@ -311,7 +311,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 40 i32.const 0 call $~lib/env/abort @@ -322,7 +322,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 41 i32.const 0 call $~lib/env/abort @@ -333,7 +333,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 42 i32.const 0 call $~lib/env/abort @@ -343,7 +343,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 43 i32.const 0 call $~lib/env/abort @@ -354,7 +354,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 44 i32.const 0 call $~lib/env/abort @@ -365,7 +365,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 46 i32.const 0 call $~lib/env/abort @@ -376,7 +376,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 47 i32.const 0 call $~lib/env/abort @@ -387,7 +387,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 48 i32.const 0 call $~lib/env/abort @@ -398,7 +398,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 49 i32.const 0 call $~lib/env/abort @@ -409,7 +409,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 50 i32.const 0 call $~lib/env/abort @@ -419,7 +419,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 51 i32.const 0 call $~lib/env/abort @@ -430,7 +430,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 62 i32.const 0 call $~lib/env/abort @@ -442,7 +442,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 63 i32.const 0 call $~lib/env/abort @@ -454,7 +454,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 64 i32.const 0 call $~lib/env/abort @@ -466,7 +466,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 65 i32.const 0 call $~lib/env/abort @@ -479,7 +479,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 68 i32.const 0 call $~lib/env/abort @@ -489,7 +489,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 69 i32.const 0 call $~lib/env/abort @@ -503,7 +503,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 71 i32.const 0 call $~lib/env/abort @@ -513,7 +513,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 72 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/logical.optimized.wat b/tests/compiler/logical.optimized.wat index 62d8c41c95..d9c5e50c5a 100644 --- a/tests/compiler/logical.optimized.wat +++ b/tests/compiler/logical.optimized.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\n\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\14\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $logical/i (mut i32) (i32.const 0)) @@ -21,7 +21,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 12 i32.const 0 call $~lib/env/abort @@ -34,7 +34,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 15 i32.const 0 call $~lib/env/abort @@ -47,7 +47,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 20 i32.const 0 call $~lib/env/abort @@ -60,7 +60,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 23 i32.const 0 call $~lib/env/abort @@ -73,7 +73,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 28 i32.const 0 call $~lib/env/abort @@ -86,7 +86,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 31 i32.const 0 call $~lib/env/abort @@ -99,7 +99,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 36 i32.const 0 call $~lib/env/abort @@ -112,7 +112,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 39 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/logical.untouched.wat b/tests/compiler/logical.untouched.wat index bd2d5637f6..64494942cd 100644 --- a/tests/compiler/logical.untouched.wat +++ b/tests/compiler/logical.untouched.wat @@ -3,14 +3,14 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\n\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\14\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $logical/i (mut i32) (i32.const 0)) (global $logical/I (mut i64) (i64.const 0)) (global $logical/f (mut f32) (f32.const 0)) (global $logical/F (mut f64) (f64.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 36)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -92,7 +92,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 12 i32.const 0 call $~lib/env/abort @@ -111,7 +111,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 15 i32.const 0 call $~lib/env/abort @@ -132,7 +132,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 20 i32.const 0 call $~lib/env/abort @@ -153,7 +153,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 23 i32.const 0 call $~lib/env/abort @@ -174,7 +174,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 28 i32.const 0 call $~lib/env/abort @@ -195,7 +195,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 31 i32.const 0 call $~lib/env/abort @@ -216,7 +216,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 36 i32.const 0 call $~lib/env/abort @@ -237,7 +237,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 39 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/many-locals.optimized.wat b/tests/compiler/many-locals.optimized.wat index 8883c436a0..3769196f40 100644 --- a/tests/compiler/many-locals.optimized.wat +++ b/tests/compiler/many-locals.optimized.wat @@ -2,7 +2,7 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\0e\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\1c\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $start) (export "memory" (memory $0)) diff --git a/tests/compiler/many-locals.untouched.wat b/tests/compiler/many-locals.untouched.wat index 10bd0b5dbd..881677bda0 100644 --- a/tests/compiler/many-locals.untouched.wat +++ b/tests/compiler/many-locals.untouched.wat @@ -4,10 +4,10 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0e\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\1c\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) (export "table" (table $0)) (export "testI32" (func $many-locals/testI32)) @@ -799,7 +799,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 133 i32.const 0 call $~lib/env/abort @@ -812,7 +812,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 267 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/memcpy.optimized.wat b/tests/compiler/memcpy.optimized.wat index b2b5603bf7..7db58ce594 100644 --- a/tests/compiler/memcpy.optimized.wat +++ b/tests/compiler/memcpy.optimized.wat @@ -4,7 +4,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\t\00\00\00m\00e\00m\00c\00p\00y\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\12\00\00\00m\00e\00m\00c\00p\00y\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $memcpy/dest (mut i32) (i32.const 0)) @@ -937,7 +937,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 151 i32.const 0 call $~lib/env/abort @@ -949,7 +949,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 152 i32.const 0 call $~lib/env/abort @@ -965,7 +965,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 155 i32.const 0 call $~lib/env/abort @@ -977,7 +977,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 156 i32.const 0 call $~lib/env/abort @@ -989,7 +989,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 157 i32.const 0 call $~lib/env/abort @@ -1001,7 +1001,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 158 i32.const 0 call $~lib/env/abort @@ -1013,7 +1013,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 159 i32.const 0 call $~lib/env/abort @@ -1030,7 +1030,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 162 i32.const 0 call $~lib/env/abort @@ -1047,7 +1047,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 165 i32.const 0 call $~lib/env/abort @@ -1059,7 +1059,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 166 i32.const 0 call $~lib/env/abort @@ -1071,7 +1071,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 167 i32.const 0 call $~lib/env/abort @@ -1083,7 +1083,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 168 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/memcpy.untouched.wat b/tests/compiler/memcpy.untouched.wat index 1bc3694e60..0da94f6da4 100644 --- a/tests/compiler/memcpy.untouched.wat +++ b/tests/compiler/memcpy.untouched.wat @@ -4,12 +4,12 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\t\00\00\00m\00e\00m\00c\00p\00y\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\12\00\00\00m\00e\00m\00c\00p\00y\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $memcpy/base i32 (i32.const 8)) (global $memcpy/dest (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 36)) (export "memory" (memory $0)) (export "table" (table $0)) (export "memcpy" (func $memcpy/memcpy)) @@ -1244,7 +1244,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 151 i32.const 0 call $~lib/env/abort @@ -1257,7 +1257,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 152 i32.const 0 call $~lib/env/abort @@ -1274,7 +1274,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 155 i32.const 0 call $~lib/env/abort @@ -1287,7 +1287,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 156 i32.const 0 call $~lib/env/abort @@ -1302,7 +1302,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 157 i32.const 0 call $~lib/env/abort @@ -1317,7 +1317,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 158 i32.const 0 call $~lib/env/abort @@ -1332,7 +1332,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 159 i32.const 0 call $~lib/env/abort @@ -1354,7 +1354,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 162 i32.const 0 call $~lib/env/abort @@ -1376,7 +1376,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 165 i32.const 0 call $~lib/env/abort @@ -1391,7 +1391,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 166 i32.const 0 call $~lib/env/abort @@ -1406,7 +1406,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 167 i32.const 0 call $~lib/env/abort @@ -1421,7 +1421,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 168 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/memmove.optimized.wat b/tests/compiler/memmove.optimized.wat index af49c1b14b..85d2930661 100644 --- a/tests/compiler/memmove.optimized.wat +++ b/tests/compiler/memmove.optimized.wat @@ -4,7 +4,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\n\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\14\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $memmove/dest (mut i32) (i32.const 0)) @@ -216,7 +216,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 55 i32.const 0 call $~lib/env/abort @@ -228,7 +228,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 56 i32.const 0 call $~lib/env/abort @@ -244,7 +244,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 59 i32.const 0 call $~lib/env/abort @@ -256,7 +256,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 60 i32.const 0 call $~lib/env/abort @@ -268,7 +268,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 61 i32.const 0 call $~lib/env/abort @@ -280,7 +280,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 62 i32.const 0 call $~lib/env/abort @@ -292,7 +292,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 63 i32.const 0 call $~lib/env/abort @@ -309,7 +309,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 66 i32.const 0 call $~lib/env/abort @@ -326,7 +326,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 69 i32.const 0 call $~lib/env/abort @@ -338,7 +338,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 70 i32.const 0 call $~lib/env/abort @@ -350,7 +350,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 71 i32.const 0 call $~lib/env/abort @@ -362,7 +362,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 72 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/memmove.untouched.wat b/tests/compiler/memmove.untouched.wat index 0a0707b916..c361df18e7 100644 --- a/tests/compiler/memmove.untouched.wat +++ b/tests/compiler/memmove.untouched.wat @@ -4,12 +4,12 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\n\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\14\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $memmove/base i32 (i32.const 8)) (global $memmove/dest (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 36)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -261,7 +261,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 55 i32.const 0 call $~lib/env/abort @@ -274,7 +274,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 56 i32.const 0 call $~lib/env/abort @@ -291,7 +291,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 59 i32.const 0 call $~lib/env/abort @@ -304,7 +304,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 60 i32.const 0 call $~lib/env/abort @@ -319,7 +319,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 61 i32.const 0 call $~lib/env/abort @@ -334,7 +334,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 62 i32.const 0 call $~lib/env/abort @@ -349,7 +349,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 63 i32.const 0 call $~lib/env/abort @@ -371,7 +371,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 66 i32.const 0 call $~lib/env/abort @@ -393,7 +393,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 69 i32.const 0 call $~lib/env/abort @@ -408,7 +408,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 70 i32.const 0 call $~lib/env/abort @@ -423,7 +423,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 71 i32.const 0 call $~lib/env/abort @@ -438,7 +438,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 72 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/memset.optimized.wat b/tests/compiler/memset.optimized.wat index 398fcc3dbe..d08f087bcc 100644 --- a/tests/compiler/memset.optimized.wat +++ b/tests/compiler/memset.optimized.wat @@ -4,7 +4,7 @@ (type $FUNCSIG$viii (func (param i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\t\00\00\00m\00e\00m\00s\00e\00t\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\12\00\00\00m\00e\00m\00s\00e\00t\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $memset/dest (mut i32) (i32.const 0)) @@ -240,7 +240,7 @@ end ) (func $start:memset (; 2 ;) (type $FUNCSIG$v) - i32.const 32 + i32.const 36 global.set $memset/dest global.get $memset/dest i32.const 1 @@ -252,7 +252,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 72 i32.const 0 call $~lib/env/abort @@ -266,7 +266,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 73 i32.const 0 call $~lib/env/abort @@ -284,7 +284,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 77 i32.const 0 call $~lib/env/abort @@ -298,7 +298,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 78 i32.const 0 call $~lib/env/abort @@ -312,7 +312,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 79 i32.const 0 call $~lib/env/abort @@ -326,7 +326,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 80 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/memset.untouched.wat b/tests/compiler/memset.untouched.wat index e4acbbb5f0..7b9653e5af 100644 --- a/tests/compiler/memset.untouched.wat +++ b/tests/compiler/memset.untouched.wat @@ -4,11 +4,11 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\t\00\00\00m\00e\00m\00s\00e\00t\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\12\00\00\00m\00e\00m\00s\00e\00t\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $memset/dest (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 36)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -291,7 +291,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 72 i32.const 0 call $~lib/env/abort @@ -306,7 +306,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 73 i32.const 0 call $~lib/env/abort @@ -326,7 +326,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 77 i32.const 0 call $~lib/env/abort @@ -341,7 +341,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 78 i32.const 0 call $~lib/env/abort @@ -356,7 +356,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 79 i32.const 0 call $~lib/env/abort @@ -371,7 +371,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 80 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/new-without-allocator.untouched.wat b/tests/compiler/new-without-allocator.untouched.wat index 8f3933bc3b..4a524c05b2 100644 --- a/tests/compiler/new-without-allocator.untouched.wat +++ b/tests/compiler/new-without-allocator.untouched.wat @@ -5,30 +5,61 @@ (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $new-without-allocator/test)) - (func $~lib/memory/memory.allocate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUST (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) unreachable ) - (func $new-without-allocator/A#constructor (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/ADJUST + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + ) + (func $new-without-allocator/A#constructor (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 ) - (func $new-without-allocator/test (; 2 ;) (type $FUNCSIG$i) (result i32) + (func $new-without-allocator/test (; 4 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 0 call $new-without-allocator/A#constructor local.set $0 i32.const 3 ) - (func $null (; 3 ;) (type $FUNCSIG$v) + (func $null (; 5 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index 788af7e4c9..081a7d2d3e 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -1,13 +1,13 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d") - (data (i32.const 40) "\11\00\00\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d") + (data (i32.const 40) "\01\00\00\00\"\00\00\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -15,7 +15,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -38,15 +38,15 @@ i32.add i32.const -8 i32.and - local.tee $2 + local.tee $0 current_memory - local.tee $3 + local.tee $2 i32.const 16 i32.shl i32.gt_u if - local.get $3 local.get $2 + local.get $0 local.get $1 i32.sub i32.const 65535 @@ -55,16 +55,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 + local.tee $3 + local.get $2 local.get $3 - local.get $0 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $0 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -73,22 +73,43 @@ end end end - local.get $2 + local.get $0 global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/string/compareUnsafe (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 7 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/memory/memory.allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add + ) + (func $~lib/util/string/compareImpl (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 8 + i32.const 16 local.set $2 loop $continue|0 local.get $1 if (result i32) local.get $0 - i32.load16_u offset=4 + i32.load16_u local.get $2 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $3 i32.eqz @@ -113,10 +134,10 @@ end local.get $3 ) - (func $~lib/string/String.__eq (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.eq (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 8 + i32.const 16 i32.eq if i32.const 1 @@ -125,20 +146,27 @@ local.get $0 i32.eqz local.tee $1 - if (result i32) - local.get $1 - else + i32.eqz + if i32.const 0 + local.set $1 end + local.get $1 if i32.const 0 return end local.get $0 - i32.load - local.tee $1 i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.tee $1 + i32.const 12 i32.load + i32.const 1 + i32.shr_u i32.ne if i32.const 0 @@ -146,17 +174,17 @@ end local.get $0 local.get $1 - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.eqz ) - (func $object-literal/bar (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $object-literal/bar (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 1 i32.ne if i32.const 0 - i32.const 40 + i32.const 48 i32.const 9 i32.const 2 call $~lib/env/abort @@ -164,35 +192,35 @@ end local.get $0 i32.load offset=4 - call $~lib/string/String.__eq + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 40 + i32.const 48 i32.const 10 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start:object-literal (; 5 ;) (type $FUNCSIG$v) + (func $start:object-literal (; 6 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 80 + i32.const 88 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 8 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE local.tee $0 i32.const 1 i32.store local.get $0 - i32.const 8 + i32.const 16 i32.store offset=4 local.get $0 call $object-literal/bar i32.const 4 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE local.tee $0 i32.const 2 i32.store @@ -202,14 +230,14 @@ i32.ne if i32.const 0 - i32.const 40 + i32.const 48 i32.const 26 i32.const 2 call $~lib/env/abort unreachable end i32.const 4 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE local.tee $0 i32.const 3 i32.store @@ -219,17 +247,17 @@ i32.ne if i32.const 0 - i32.const 40 + i32.const 48 i32.const 21 i32.const 4 call $~lib/env/abort unreachable end ) - (func $start (; 6 ;) (type $FUNCSIG$v) + (func $start (; 7 ;) (type $FUNCSIG$v) call $start:object-literal ) - (func $null (; 7 ;) (type $FUNCSIG$v) + (func $null (; 8 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index f5dc9f1ccf..8d35bd3b66 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -1,119 +1,147 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d\00") - (data (i32.const 40) "\11\00\00\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d\00") + (data (i32.const 40) "\01\00\00\00\"\00\00\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 80)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 84)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/runtime/ADJUST (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset + return + ) + (func $~lib/runtime/ALLOCATE (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/ADJUST + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate - return + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u ) - (func $~lib/internal/string/compareUnsafe (; 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 (; 5 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -136,9 +164,9 @@ local.get $4 if (result i32) local.get $6 - i32.load16_u offset=4 + i32.load16_u local.get $7 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $5 i32.eqz @@ -166,7 +194,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.eq (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -192,11 +220,11 @@ return end local.get $0 - i32.load + call $~lib/string/String#get:length local.set $3 local.get $3 local.get $1 - i32.load + call $~lib/string/String#get:length i32.ne if i32.const 0 @@ -207,10 +235,10 @@ local.get $1 i32.const 0 local.get $3 - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.eqz ) - (func $object-literal/bar (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $object-literal/bar (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 1 @@ -218,7 +246,7 @@ i32.eqz if i32.const 0 - i32.const 40 + i32.const 48 i32.const 9 i32.const 2 call $~lib/env/abort @@ -226,19 +254,19 @@ end local.get $0 i32.load offset=4 - i32.const 8 - call $~lib/string/String.__eq + i32.const 16 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 40 + i32.const 48 i32.const 10 i32.const 2 call $~lib/env/abort unreachable end ) - (func $object-literal/bar2 (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $object-literal/bar2 (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 2 @@ -246,14 +274,14 @@ i32.eqz if i32.const 0 - i32.const 40 + i32.const 48 i32.const 26 i32.const 2 call $~lib/env/abort unreachable end ) - (func $object-literal/Foo2#test (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $object-literal/Foo2#test (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 3 @@ -261,34 +289,43 @@ i32.eqz if i32.const 0 - i32.const 40 + i32.const 48 i32.const 21 i32.const 4 call $~lib/env/abort unreachable end ) - (func $start:object-literal (; 9 ;) (type $FUNCSIG$v) + (func $start:object-literal (; 10 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) - call $start:~lib/allocator/arena + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset block (result i32) i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 local.get $0 i32.const 1 i32.store local.get $0 - i32.const 8 + i32.const 16 i32.store offset=4 local.get $0 end call $object-literal/bar block (result i32) i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $1 local.get $1 i32.const 2 @@ -298,7 +335,7 @@ call $object-literal/bar2 block (result i32) i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $2 local.get $2 i32.const 3 @@ -307,9 +344,9 @@ end call $object-literal/Foo2#test ) - (func $start (; 10 ;) (type $FUNCSIG$v) + (func $start (; 11 ;) (type $FUNCSIG$v) call $start:object-literal ) - (func $null (; 11 ;) (type $FUNCSIG$v) + (func $null (; 12 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 2364edb5b5..4fed454744 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -1,4 +1,5 @@ (module + (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (memory $0 0) @@ -11,18 +12,30 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/memory/memory.allocate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end global.get $~lib/allocator/arena/offset - local.tee $0 - i32.const 8 + local.tee $1 + local.get $0 + i32.const 1 + local.get $0 + i32.const 1 + i32.gt_u + select + i32.add + i32.const 7 i32.add i32.const -8 i32.and - local.tee $1 + local.tee $0 current_memory local.tee $2 i32.const 16 @@ -30,8 +43,8 @@ i32.gt_u if local.get $2 - local.get $1 local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -57,21 +70,35 @@ end end end - local.get $1 + local.get $0 global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/runtime/ALLOCATE (; 1 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 8 + call $~lib/memory/memory.allocate + local.tee $0 + i32.const -1520547049 + i32.store local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 8 + i32.add ) - (func $start (; 1 ;) (type $FUNCSIG$v) + (func $start (; 2 ;) (type $FUNCSIG$v) i32.const 8 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE global.set $optional-typeparameters/tConcrete - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE global.set $optional-typeparameters/tDerived ) - (func $null (; 2 ;) (type $FUNCSIG$v) + (func $null (; 3 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index 066794dc33..2686e9567f 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -1,11 +1,14 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$v (func)) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$didd (func (param i32 f64 f64) (result f64))) + (type $FUNCSIG$v (func)) (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $optional-typeparameters/tConcrete (mut i32) (i32.const 0)) @@ -20,108 +23,125 @@ (func $optional-typeparameters/testDerived (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 ) - (func $start:~lib/allocator/arena (; 2 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/runtime/ADJUST (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 + return ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate - return + call $~lib/runtime/ADJUST + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add ) (func $optional-typeparameters/TestConcrete#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -136,7 +156,7 @@ i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/runtime/ALLOCATE local.set $0 end local.get $0 @@ -153,7 +173,16 @@ i32.const 2 call $optional-typeparameters/testDerived drop - call $start:~lib/allocator/arena + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset i32.const 0 call $optional-typeparameters/TestConcrete#constructor global.set $optional-typeparameters/tConcrete diff --git a/tests/compiler/overflow.optimized.wat b/tests/compiler/overflow.optimized.wat index 75d5ba7122..601e96007f 100644 --- a/tests/compiler/overflow.optimized.wat +++ b/tests/compiler/overflow.optimized.wat @@ -1,7 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\16\00\00\00o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $start) (export "memory" (memory $0)) diff --git a/tests/compiler/overflow.untouched.wat b/tests/compiler/overflow.untouched.wat index bae4097a2e..73c44a2f64 100644 --- a/tests/compiler/overflow.untouched.wat +++ b/tests/compiler/overflow.untouched.wat @@ -3,10 +3,10 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\16\00\00\00o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 36)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -31,7 +31,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 10 i32.const 2 call $~lib/env/abort @@ -51,7 +51,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 13 i32.const 2 call $~lib/env/abort @@ -76,7 +76,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 16 i32.const 2 call $~lib/env/abort @@ -101,7 +101,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 19 i32.const 2 call $~lib/env/abort @@ -121,7 +121,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 22 i32.const 2 call $~lib/env/abort @@ -141,7 +141,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 25 i32.const 2 call $~lib/env/abort @@ -162,7 +162,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 28 i32.const 2 call $~lib/env/abort @@ -183,7 +183,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 31 i32.const 2 call $~lib/env/abort @@ -201,7 +201,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 33 i32.const 2 call $~lib/env/abort @@ -225,7 +225,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 42 i32.const 2 call $~lib/env/abort @@ -245,7 +245,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 45 i32.const 2 call $~lib/env/abort @@ -270,7 +270,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 48 i32.const 2 call $~lib/env/abort @@ -295,7 +295,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 51 i32.const 2 call $~lib/env/abort @@ -315,7 +315,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 54 i32.const 2 call $~lib/env/abort @@ -335,7 +335,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 57 i32.const 2 call $~lib/env/abort @@ -356,7 +356,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 60 i32.const 2 call $~lib/env/abort @@ -377,7 +377,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 63 i32.const 2 call $~lib/env/abort @@ -395,7 +395,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 65 i32.const 2 call $~lib/env/abort @@ -417,7 +417,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 74 i32.const 2 call $~lib/env/abort @@ -435,7 +435,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 77 i32.const 2 call $~lib/env/abort @@ -458,7 +458,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 80 i32.const 2 call $~lib/env/abort @@ -481,7 +481,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 83 i32.const 2 call $~lib/env/abort @@ -499,7 +499,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 86 i32.const 2 call $~lib/env/abort @@ -517,7 +517,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 89 i32.const 2 call $~lib/env/abort @@ -536,7 +536,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 92 i32.const 2 call $~lib/env/abort @@ -555,7 +555,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 95 i32.const 2 call $~lib/env/abort @@ -571,7 +571,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 97 i32.const 2 call $~lib/env/abort @@ -593,7 +593,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 106 i32.const 2 call $~lib/env/abort @@ -611,7 +611,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 109 i32.const 2 call $~lib/env/abort @@ -634,7 +634,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 112 i32.const 2 call $~lib/env/abort @@ -657,7 +657,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 115 i32.const 2 call $~lib/env/abort @@ -675,7 +675,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 118 i32.const 2 call $~lib/env/abort @@ -693,7 +693,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 121 i32.const 2 call $~lib/env/abort @@ -712,7 +712,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 124 i32.const 2 call $~lib/env/abort @@ -731,7 +731,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 127 i32.const 2 call $~lib/env/abort @@ -747,7 +747,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 129 i32.const 2 call $~lib/env/abort diff --git a/tests/compiler/std/hash.ts b/tests/compiler/std/hash.ts index 731ab6d4c0..d700db6de8 100644 --- a/tests/compiler/std/hash.ts +++ b/tests/compiler/std/hash.ts @@ -1,4 +1,4 @@ -import { HASH } from "internal/hash"; +import { HASH } from "util/hash"; function check(hash: u32): bool { return true; diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index f33b16ea9e..b627392d38 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -2,10 +2,10 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) @@ -23,9 +23,9 @@ (type $FUNCSIG$vid (func (param i32 f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 56) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 120) "\n\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 48) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 96) "\01\00\00\00\14\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -33,7 +33,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -56,15 +56,15 @@ i32.add i32.const -8 i32.and - local.tee $2 + local.tee $0 current_memory - local.tee $3 + local.tee $2 i32.const 16 i32.shl i32.gt_u if - local.get $3 local.get $2 + local.get $0 local.get $1 i32.sub i32.const 65535 @@ -73,16 +73,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 + local.tee $3 + local.get $2 local.get $3 - local.get $0 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $0 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -91,23 +91,12 @@ end end end - local.get $2 + local.get $0 global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 56 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end i32.const 1 i32.const 32 local.get $0 @@ -116,262 +105,285 @@ i32.clz i32.sub i32.shl - call $~lib/allocator/arena/__memory_allocate + call $~lib/memory/memory.allocate local.tee $1 - local.get $0 + i32.const -1520547049 i32.store local.get $1 - ) - (func $~lib/internal/memory/memset (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $1 - i32.eqz - if - return - end - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $2 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 6 - i32.le_u - if - return - end local.get $0 - i32.const 3 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store8 + i32.store offset=4 local.get $1 i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - local.get $0 i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $1 + ) + (func $~lib/runtime/ASSERT_UNREGISTERED (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 8 + i32.const 124 i32.le_u if - return + i32.const 0 + i32.const 16 + i32.const 172 + i32.const 2 + call $~lib/env/abort + unreachable end local.get $0 - i32.const 4 - i32.add - i32.const 0 - i32.store - local.get $0 i32.const 8 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 12 i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 24 - i32.le_u + i32.load + i32.const -1520547049 + i32.ne if - return + i32.const 0 + i32.const 16 + i32.const 173 + i32.const 2 + call $~lib/env/abort + unreachable end - local.get $0 - i32.const 12 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 16 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 20 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $2 - local.get $0 - i32.add - local.set $0 - local.get $1 - local.get $2 - i32.sub - local.set $1 - loop $continue|0 + ) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + block $~lib/util/memory/memset|inlined.0 local.get $1 - i32.const 32 - i32.ge_u - if - local.get $0 - i64.const 0 - i64.store - local.get $0 - i32.const 8 - i32.add - i64.const 0 - i64.store - local.get $0 - i32.const 16 - i32.add - i64.const 0 - i64.store - local.get $0 - i32.const 24 - i32.add - i64.const 0 - i64.store + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 1 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 2 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 1 + i32.add + i32.const 0 + i32.store8 + local.get $0 + i32.const 2 + i32.add + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 2 + i32.sub + i32.const 0 + i32.store8 + local.get $2 + i32.const 3 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 6 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 3 + i32.add + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 4 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $1 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $2 + i32.sub + local.set $1 + local.get $0 + local.get $2 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $1 + i32.const -4 + i32.and + local.tee $1 + local.get $0 + i32.add + i32.const 4 + i32.sub + i32.const 0 + i32.store + local.get $1 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 4 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 8 + i32.add + i32.const 0 + i32.store + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 12 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 8 + i32.sub + i32.const 0 + i32.store + local.get $1 + i32.const 24 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 12 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 16 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 20 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 24 + i32.add + i32.const 0 + i32.store + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 28 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 24 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 20 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 16 + i32.sub + i32.const 0 + i32.store + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $2 + local.get $0 + i32.add + local.set $0 + local.get $1 + local.get $2 + i32.sub + local.set $1 + loop $continue|0 local.get $1 i32.const 32 - i32.sub - local.set $1 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $continue|0 + i32.ge_u + if + local.get $0 + i64.const 0 + i64.store + local.get $0 + i32.const 8 + i32.add + i64.const 0 + i64.store + local.get $0 + i32.const 16 + i32.add + i64.const 0 + i64.store + local.get $0 + i32.const 24 + i32.add + i64.const 0 + i64.store + local.get $1 + i32.const 32 + i32.sub + local.set $1 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $continue|0 + end end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.const 1073741816 i32.gt_u if i32.const 0 - i32.const 8 - i32.const 47 - i32.const 40 + i32.const 56 + i32.const 24 + i32.const 43 call $~lib/env/abort unreachable end local.get $0 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $2 + call $~lib/runtime/ALLOCATE + local.tee $1 + local.get $0 + call $~lib/memory/memory.fill + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + i32.const 8 + i32.sub + i32.const 3 + i32.store local.get $1 - i32.eqz - if - local.get $2 - i32.const 8 - i32.add - local.get $0 - call $~lib/internal/memory/memset - end - local.get $2 ) - (func $~lib/map/Map#clear (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -379,7 +391,6 @@ i32.store offset=4 local.get $0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -392,11 +403,18 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 6 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 2 + i32.store + local.get $0 i32.const 0 i32.store local.get $0 @@ -418,7 +436,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -428,7 +446,7 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.set $2 loop $continue|0 local.get $2 @@ -463,7 +481,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -479,7 +497,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -490,13 +508,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -504,13 +521,10 @@ local.tee $6 i32.const 12 i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 - i32.load offset=8 - i32.const 8 - i32.add + i32.load offset=8 local.tee $2 local.get $0 i32.load offset=16 @@ -518,9 +532,7 @@ i32.mul i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -552,14 +564,14 @@ i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=8 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 12 i32.add @@ -573,13 +585,13 @@ end end local.get $0 - local.get $4 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -589,7 +601,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -653,12 +665,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $3 - i32.const 8 - i32.add local.get $4 i32.const 12 i32.mul + local.get $3 i32.add local.tee $3 local.get $1 @@ -683,14 +693,14 @@ i32.shl i32.add local.tee $4 - i32.load offset=8 + i32.load i32.store offset=8 local.get $4 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -711,7 +721,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -778,7 +788,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 13 ;) (type $FUNCSIG$v) + (func $std/map/test (; 14 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -793,7 +803,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -815,7 +825,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -834,7 +844,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -855,7 +865,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -874,7 +884,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -893,7 +903,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -915,7 +925,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -934,7 +944,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -955,7 +965,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -974,7 +984,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -993,7 +1003,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -1007,7 +1017,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -1028,7 +1038,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -1046,7 +1056,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -1068,7 +1078,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -1082,7 +1092,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -1103,7 +1113,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -1115,14 +1125,47 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#has (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#constructor (; 15 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 4 + i32.store + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 + ) + (func $~lib/map/Map#has (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1136,7 +1179,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1147,13 +1190,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -1161,13 +1203,10 @@ local.tee $6 i32.const 12 i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -1175,9 +1214,7 @@ i32.mul i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -1209,14 +1246,14 @@ i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=8 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 12 i32.add @@ -1230,13 +1267,13 @@ end end local.get $0 - local.get $4 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -1246,7 +1283,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1308,12 +1345,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $3 - i32.const 8 - i32.add local.get $4 i32.const 12 i32.mul + local.get $3 i32.add local.tee $3 local.get $1 @@ -1338,14 +1373,14 @@ i32.shl i32.add local.tee $4 - i32.load offset=8 + i32.load i32.store offset=8 local.get $4 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1364,7 +1399,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -1429,10 +1464,10 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 19 ;) (type $FUNCSIG$v) + (func $std/map/test (; 21 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/map/Map#constructor + call $~lib/map/Map#constructor local.set $1 loop $repeat|0 local.get $0 @@ -1444,7 +1479,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -1464,7 +1499,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -1481,7 +1516,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -1502,7 +1537,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -1521,7 +1556,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -1538,7 +1573,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -1558,7 +1593,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -1575,7 +1610,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -1596,7 +1631,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -1615,7 +1650,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -1632,7 +1667,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -1646,7 +1681,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -1667,7 +1702,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -1685,7 +1720,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -1705,7 +1740,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -1719,7 +1754,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -1740,7 +1775,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -1752,14 +1787,47 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#find (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#constructor (; 22 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 5 + i32.store + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 + ) + (func $~lib/map/Map#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -1769,7 +1837,7 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.set $2 loop $continue|0 local.get $2 @@ -1804,7 +1872,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1829,7 +1897,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1840,13 +1908,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $2 + local.set $6 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -1854,13 +1921,10 @@ local.tee $7 i32.const 12 i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -1868,9 +1932,7 @@ i32.mul i32.add local.set $8 - local.get $6 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -1894,14 +1956,14 @@ local.get $3 local.get $2 i32.load16_s - local.tee $4 + local.tee $5 i32.const 255 i32.and i32.const -2128831035 i32.xor i32.const 16777619 i32.mul - local.get $4 + local.get $5 i32.const 8 i32.shr_u i32.xor @@ -1911,14 +1973,14 @@ i32.and i32.const 2 i32.shl - local.get $5 + local.get $6 i32.add - local.tee $4 - i32.load offset=8 + local.tee $5 + i32.load i32.store offset=8 - local.get $4 + local.get $5 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 12 i32.add @@ -1932,13 +1994,13 @@ end end local.get $0 - local.get $5 + local.get $6 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $6 + local.get $4 i32.store offset=8 local.get $0 local.get $7 @@ -1948,7 +2010,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2021,12 +2083,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $3 - i32.const 8 - i32.add local.get $4 i32.const 12 i32.mul + local.get $3 i32.add local.tee $3 local.get $1 @@ -2051,14 +2111,14 @@ i32.shl i32.add local.tee $4 - i32.load offset=8 + i32.load i32.store offset=8 local.get $4 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2088,7 +2148,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2164,10 +2224,10 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 26 ;) (type $FUNCSIG$v) + (func $std/map/test (; 29 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/map/Map#constructor + call $~lib/map/Map#constructor local.set $1 loop $repeat|0 local.get $0 @@ -2179,7 +2239,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -2201,7 +2261,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -2220,7 +2280,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -2241,7 +2301,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -2260,7 +2320,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -2279,7 +2339,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -2301,7 +2361,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -2320,7 +2380,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -2341,7 +2401,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -2360,7 +2420,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -2379,7 +2439,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -2393,7 +2453,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -2414,7 +2474,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -2432,7 +2492,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -2454,7 +2514,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -2468,7 +2528,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -2489,7 +2549,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -2501,14 +2561,47 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#has (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#constructor (; 30 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 6 + i32.store + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 + ) + (func $~lib/map/Map#has (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2531,7 +2624,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2542,13 +2635,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $2 + local.set $6 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -2556,13 +2648,10 @@ local.tee $7 i32.const 12 i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -2570,9 +2659,7 @@ i32.mul i32.add local.set $8 - local.get $6 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -2596,14 +2683,14 @@ local.get $3 local.get $2 i32.load16_u - local.tee $4 + local.tee $5 i32.const 255 i32.and i32.const -2128831035 i32.xor i32.const 16777619 i32.mul - local.get $4 + local.get $5 i32.const 8 i32.shr_u i32.xor @@ -2613,14 +2700,14 @@ i32.and i32.const 2 i32.shl - local.get $5 + local.get $6 i32.add - local.tee $4 - i32.load offset=8 + local.tee $5 + i32.load i32.store offset=8 - local.get $4 + local.get $5 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 12 i32.add @@ -2634,13 +2721,13 @@ end end local.get $0 - local.get $5 + local.get $6 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $6 + local.get $4 i32.store offset=8 local.get $0 local.get $7 @@ -2650,7 +2737,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2721,12 +2808,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $3 - i32.const 8 - i32.add local.get $4 i32.const 12 i32.mul + local.get $3 i32.add local.tee $3 local.get $1 @@ -2751,14 +2836,14 @@ i32.shl i32.add local.tee $4 - i32.load offset=8 + i32.load i32.store offset=8 local.get $4 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2786,7 +2871,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2860,10 +2945,10 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 32 ;) (type $FUNCSIG$v) + (func $std/map/test (; 36 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/map/Map#constructor + call $~lib/map/Map#constructor local.set $1 loop $repeat|0 local.get $0 @@ -2875,7 +2960,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -2895,7 +2980,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -2912,7 +2997,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -2933,7 +3018,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -2952,7 +3037,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -2969,7 +3054,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -2989,7 +3074,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -3006,7 +3091,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -3027,7 +3112,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -3046,7 +3131,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -3063,7 +3148,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -3077,7 +3162,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -3098,7 +3183,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -3116,7 +3201,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -3136,7 +3221,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -3150,7 +3235,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -3171,7 +3256,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -3183,14 +3268,47 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/internal/hash/hash32 (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 37 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 7 + i32.store + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 + ) + (func $~lib/util/hash/hash32 (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -3221,7 +3339,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -3231,7 +3349,7 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.set $2 loop $continue|0 local.get $2 @@ -3264,16 +3382,16 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3284,13 +3402,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -3298,13 +3415,10 @@ local.tee $6 i32.const 12 i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -3312,9 +3426,7 @@ i32.mul i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -3338,19 +3450,19 @@ local.get $3 local.get $2 i32.load - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 local.get $1 i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=8 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 12 i32.add @@ -3364,13 +3476,13 @@ end end local.get $0 - local.get $4 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -3380,14 +3492,14 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -3435,12 +3547,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $3 - i32.const 8 - i32.add local.get $4 i32.const 12 i32.mul + local.get $3 i32.add local.tee $3 local.get $1 @@ -3465,18 +3575,18 @@ i32.shl i32.add local.tee $4 - i32.load offset=8 + i32.load i32.store offset=8 local.get $4 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $0 if (result i32) @@ -3486,12 +3596,12 @@ unreachable end ) - (func $~lib/map/Map#delete (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $1 i32.eqz @@ -3546,10 +3656,10 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 40 ;) (type $FUNCSIG$v) + (func $std/map/test (; 45 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/map/Map#constructor + call $~lib/map/Map#constructor local.set $1 loop $repeat|0 local.get $0 @@ -3561,7 +3671,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -3579,7 +3689,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -3594,7 +3704,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -3615,7 +3725,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -3634,7 +3744,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -3649,7 +3759,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -3667,7 +3777,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -3682,7 +3792,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -3703,7 +3813,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -3722,7 +3832,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -3737,7 +3847,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -3751,7 +3861,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -3772,7 +3882,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -3790,7 +3900,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -3808,7 +3918,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -3822,7 +3932,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -3843,7 +3953,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -3855,17 +3965,50 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/map/test (; 41 ;) (type $FUNCSIG$v) + (func $~lib/map/Map#constructor (; 46 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 8 + i32.store + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 + ) + (func $std/map/test (; 47 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/map/Map#constructor + call $~lib/map/Map#constructor local.set $1 loop $repeat|0 local.get $0 @@ -3877,7 +4020,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -3895,7 +4038,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -3910,7 +4053,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -3931,7 +4074,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -3950,7 +4093,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -3965,7 +4108,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -3983,7 +4126,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -3998,7 +4141,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -4019,7 +4162,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -4038,7 +4181,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -4053,7 +4196,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -4067,7 +4210,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -4088,7 +4231,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -4106,7 +4249,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -4124,7 +4267,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -4138,7 +4281,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -4159,7 +4302,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -4171,17 +4314,16 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -4189,7 +4331,6 @@ i32.store offset=4 local.get $0 i32.const 64 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -4202,11 +4343,18 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 43 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 49 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 9 + i32.store + local.get $0 i32.const 0 i32.store local.get $0 @@ -4228,7 +4376,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/internal/hash/hash64 (; 44 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 50 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -4294,7 +4442,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 45 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 51 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -4304,7 +4452,7 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.set $2 loop $continue|0 local.get $2 @@ -4337,16 +4485,16 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 46 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 52 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 47 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4357,13 +4505,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -4371,13 +4518,10 @@ local.tee $6 i32.const 4 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -4385,9 +4529,7 @@ i32.shl i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -4411,19 +4553,19 @@ local.get $3 local.get $2 i64.load - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 local.get $1 i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=12 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 16 i32.add @@ -4437,13 +4579,13 @@ end end local.get $0 - local.get $4 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -4453,14 +4595,14 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 48 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 54 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -4508,12 +4650,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $3 - i32.const 8 - i32.add local.get $4 i32.const 4 i32.shl + local.get $3 i32.add local.tee $3 local.get $1 @@ -4538,18 +4678,18 @@ i32.shl i32.add local.tee $4 - i32.load offset=8 + i32.load i32.store offset=12 local.get $4 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 49 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 55 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 call $~lib/map/Map#find local.tee $0 if (result i32) @@ -4559,13 +4699,13 @@ unreachable end ) - (func $~lib/map/Map#delete (; 50 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/map/Map#delete (; 56 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 call $~lib/map/Map#find local.tee $2 i32.eqz @@ -4620,7 +4760,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 51 ;) (type $FUNCSIG$v) + (func $std/map/test (; 57 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/map/Map#constructor @@ -4635,7 +4775,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -4654,7 +4794,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -4670,7 +4810,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -4691,7 +4831,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -4710,7 +4850,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -4726,7 +4866,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -4745,7 +4885,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -4761,7 +4901,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -4782,7 +4922,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -4801,7 +4941,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -4817,7 +4957,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -4831,7 +4971,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -4852,7 +4992,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -4870,7 +5010,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -4889,7 +5029,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -4903,7 +5043,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -4924,7 +5064,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -4936,17 +5076,50 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/map/test (; 52 ;) (type $FUNCSIG$v) + (func $~lib/map/Map#constructor (; 58 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 10 + i32.store + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 + ) + (func $std/map/test (; 59 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) - call $~lib/map/Map#constructor + call $~lib/map/Map#constructor local.set $1 loop $repeat|0 local.get $0 @@ -4958,7 +5131,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -4977,7 +5150,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -4993,7 +5166,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -5014,7 +5187,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -5033,7 +5206,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -5049,7 +5222,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -5068,7 +5241,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -5084,7 +5257,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -5105,7 +5278,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -5124,7 +5297,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -5140,7 +5313,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -5154,7 +5327,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -5175,7 +5348,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -5193,7 +5366,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -5212,7 +5385,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -5226,7 +5399,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -5247,7 +5420,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -5259,14 +5432,47 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#find (; 53 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#constructor (; 60 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 11 + i32.store + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 + ) + (func $~lib/map/Map#find (; 61 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -5276,7 +5482,7 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.set $2 loop $continue|0 local.get $2 @@ -5309,17 +5515,17 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 54 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 62 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5330,13 +5536,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -5344,13 +5549,10 @@ local.tee $6 i32.const 12 i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -5358,9 +5560,7 @@ i32.mul i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -5385,19 +5585,19 @@ local.get $2 f32.load i32.reinterpret_f32 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 local.get $1 i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=8 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 12 i32.add @@ -5411,13 +5611,13 @@ end end local.get $0 - local.get $4 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -5427,7 +5627,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 56 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/map/Map#set (; 64 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5435,7 +5635,7 @@ local.get $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -5483,12 +5683,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $3 - i32.const 8 - i32.add local.get $4 i32.const 12 i32.mul + local.get $3 i32.add local.tee $3 local.get $1 @@ -5513,19 +5711,19 @@ i32.shl i32.add local.tee $4 - i32.load offset=8 + i32.load i32.store offset=8 local.get $4 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 57 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 65 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $0 if (result i32) @@ -5535,14 +5733,14 @@ unreachable end ) - (func $~lib/map/Map#delete (; 58 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/map/Map#delete (; 66 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $2 i32.eqz @@ -5597,10 +5795,10 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 59 ;) (type $FUNCSIG$v) + (func $std/map/test (; 67 ;) (type $FUNCSIG$v) (local $0 f32) (local $1 i32) - call $~lib/map/Map#constructor + call $~lib/map/Map#constructor local.set $1 loop $repeat|0 local.get $0 @@ -5612,7 +5810,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -5631,7 +5829,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -5647,7 +5845,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -5668,7 +5866,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -5687,7 +5885,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -5703,7 +5901,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -5722,7 +5920,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -5738,7 +5936,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -5759,7 +5957,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -5778,7 +5976,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -5794,7 +5992,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -5808,7 +6006,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -5829,7 +6027,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -5847,7 +6045,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -5866,7 +6064,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -5880,7 +6078,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -5901,7 +6099,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -5913,14 +6111,47 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#find (; 60 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#constructor (; 68 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 12 + i32.store + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 + ) + (func $~lib/map/Map#find (; 69 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -5930,7 +6161,7 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.set $2 loop $continue|0 local.get $2 @@ -5963,17 +6194,17 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 61 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 70 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 62 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 71 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5984,13 +6215,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -5998,13 +6228,10 @@ local.tee $6 i32.const 4 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -6012,9 +6239,7 @@ i32.shl i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -6039,19 +6264,19 @@ local.get $2 f64.load i64.reinterpret_f64 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 local.get $1 i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=12 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 16 i32.add @@ -6065,13 +6290,13 @@ end end local.get $0 - local.get $4 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -6081,7 +6306,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 63 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/map/Map#set (; 72 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6089,7 +6314,7 @@ local.get $1 local.get $1 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 local.tee $5 call $~lib/map/Map#find local.tee $3 @@ -6137,12 +6362,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $3 - i32.const 8 - i32.add local.get $4 i32.const 4 i32.shl + local.get $3 i32.add local.tee $3 local.get $1 @@ -6167,19 +6390,19 @@ i32.shl i32.add local.tee $4 - i32.load offset=8 + i32.load i32.store offset=12 local.get $4 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 64 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 73 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 call $~lib/map/Map#find local.tee $0 if (result i32) @@ -6189,14 +6412,14 @@ unreachable end ) - (func $~lib/map/Map#delete (; 65 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/map/Map#delete (; 74 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 local.get $1 local.get $1 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 call $~lib/map/Map#find local.tee $2 i32.eqz @@ -6251,10 +6474,10 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 66 ;) (type $FUNCSIG$v) + (func $std/map/test (; 75 ;) (type $FUNCSIG$v) (local $0 f64) (local $1 i32) - call $~lib/map/Map#constructor + call $~lib/map/Map#constructor local.set $1 loop $repeat|0 local.get $0 @@ -6266,7 +6489,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -6285,7 +6508,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -6301,7 +6524,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -6322,7 +6545,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -6341,7 +6564,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -6357,7 +6580,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -6376,7 +6599,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -6392,7 +6615,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -6413,7 +6636,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -6432,7 +6655,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -6448,7 +6671,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -6462,7 +6685,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -6483,7 +6706,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -6501,7 +6724,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -6520,7 +6743,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -6534,7 +6757,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -6555,7 +6778,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -6567,15 +6790,15 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start (; 67 ;) (type $FUNCSIG$v) - i32.const 144 + (func $start (; 76 ;) (type $FUNCSIG$v) + i32.const 128 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -6590,7 +6813,7 @@ call $std/map/test call $std/map/test ) - (func $null (; 68 ;) (type $FUNCSIG$v) + (func $null (; 77 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index b9cf6436ec..596e1c8274 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -2,10 +2,10 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) @@ -19,452 +19,466 @@ (type $FUNCSIG$vidi (func (param i32 f64 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 56) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 120) "\n\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 48) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 96) "\01\00\00\00\14\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 144)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 124)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/runtime/ADJUST (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/arena/__memory_allocate return ) - (func $~lib/internal/arraybuffer/computeSize (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 8 - i32.add - i32.const 1 - i32.sub - i32.clz - i32.sub - i32.shl - ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end + call $~lib/runtime/ADJUST + call $~lib/memory/memory.allocate local.set $1 local.get $1 - local.get $0 + global.get $~lib/runtime/HEADER_MAGIC i32.store local.get $1 - ) - (func $~lib/internal/memory/memset (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i64) - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub + i32.store offset=4 local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 - local.get $0 - local.get $3 + global.get $~lib/runtime/HEADER_SIZE i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store + ) + (func $~lib/runtime/ASSERT_UNREGISTERED (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz if - return + i32.const 0 + i32.const 16 + i32.const 172 + i32.const 2 + call $~lib/env/abort + unreachable end local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 + global.get $~lib/runtime/HEADER_SIZE i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz if - return + i32.const 0 + i32.const 16 + i32.const 173 + i32.const 2 + call $~lib/env/abort + unreachable end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 + ) + (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $0 + local.set $3 + local.get $1 + local.set $4 + local.get $2 + local.set $5 + local.get $5 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 1 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 1 + i32.add + local.get $4 + i32.store8 + local.get $3 + i32.const 2 + i32.add + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 2 + i32.sub + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 3 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 3 + i32.add + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $3 + i32.sub + i32.const 3 + i32.and + local.set $6 + local.get $3 + local.get $6 + i32.add + local.set $3 + local.get $5 + local.get $6 + i32.sub + local.set $5 + local.get $5 + i32.const -4 + i32.and + local.set $5 + i32.const -1 + i32.const 255 + i32.div_u + local.get $4 + i32.const 255 + i32.and + i32.mul + local.set $7 + local.get $3 + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 4 + i32.sub + local.get $7 + i32.store + local.get $5 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 4 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 8 + i32.add + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 12 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 8 + i32.sub + local.get $7 + i32.store + local.get $5 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 12 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 16 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 20 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 24 + i32.add + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 28 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 24 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 20 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 16 + i32.sub + local.get $7 + i32.store + i32.const 24 + local.get $3 + i32.const 4 + i32.and + i32.add + local.set $6 + local.get $3 + local.get $6 + i32.add + local.set $3 + local.get $5 + local.get $6 + i32.sub + local.set $5 + local.get $7 + i64.extend_i32_u + local.get $7 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $8 + block $break|0 + loop $continue|0 + local.get $5 + i32.const 32 + i32.ge_u + if + block + local.get $3 + local.get $8 + i64.store + local.get $3 + i32.const 8 + i32.add + local.get $8 + i64.store + local.get $3 + i32.const 16 + i32.add + local.get $8 + i64.store + local.get $3 + i32.const 24 + i32.add + local.get $8 + i64.store + local.get $5 + i32.const 32 + i32.sub + local.set $5 + local.get $3 + i32.const 32 + i32.add + local.set $3 + end + br $continue|0 end - br $continue|0 end end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $1 - i32.const 1073741816 + global.get $~lib/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 - i32.const 8 - i32.const 47 - i32.const 40 + i32.const 56 + i32.const 24 + i32.const 43 call $~lib/env/abort unreachable end local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 + call $~lib/runtime/ALLOCATE + local.set $2 local.get $2 i32.const 0 - i32.ne - i32.eqz - if + local.get $1 + call $~lib/memory/memory.fill + block $~lib/runtime/REGISTER|inlined.0 (result i32) + local.get $2 + local.set $3 + local.get $3 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $3 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 3 + i32.store local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $1 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset end - local.get $3 ) - (func $~lib/map/Map#clear (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -475,7 +489,6 @@ local.get $0 i32.const 0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -488,13 +501,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 2 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -520,14 +545,14 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/internal/hash/hash8 (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const -2128831035 local.get $0 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -539,7 +564,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -582,11 +607,11 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 @@ -594,14 +619,14 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -621,7 +646,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -636,13 +660,10 @@ i32.const 12 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -653,9 +674,7 @@ i32.mul i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $5 local.set $8 block $break|0 loop $continue|0 @@ -682,13 +701,13 @@ local.get $9 i32.load offset=4 i32.store offset=4 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load8_s local.set $11 local.get $11 - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -701,11 +720,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=8 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 12 @@ -741,12 +760,12 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 @@ -754,8 +773,8 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -802,8 +821,6 @@ i32.load offset=8 local.set $3 local.get $3 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -844,19 +861,19 @@ local.set $6 local.get $5 local.get $6 - i32.load offset=8 + i32.load i32.store offset=8 local.get $6 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 @@ -864,8 +881,8 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -877,18 +894,18 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 @@ -896,8 +913,8 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -958,7 +975,7 @@ end i32.const 1 ) - (func $std/map/test (; 18 ;) (type $FUNCSIG$v) + (func $std/map/test (; 17 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -981,7 +998,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -1003,7 +1020,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -1023,7 +1040,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -1046,7 +1063,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -1068,7 +1085,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -1088,7 +1105,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -1110,7 +1127,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -1130,7 +1147,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -1153,7 +1170,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -1175,7 +1192,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -1195,7 +1212,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -1212,7 +1229,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -1235,7 +1252,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -1258,7 +1275,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -1280,7 +1297,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -1297,7 +1314,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -1320,7 +1337,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -1335,18 +1352,17 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -1357,7 +1373,6 @@ local.get $0 i32.const 0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -1370,13 +1385,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 4 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -1402,7 +1429,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1414,7 +1441,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -1455,24 +1482,24 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 i32.const 255 i32.and - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1492,7 +1519,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -1507,13 +1533,10 @@ i32.const 12 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -1525,8 +1548,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -1553,13 +1574,13 @@ local.get $9 i32.load offset=4 i32.store offset=4 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load8_u local.set $11 local.get $11 - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -1572,11 +1593,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=8 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 12 @@ -1612,19 +1633,19 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 i32.const 255 i32.and - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -1671,8 +1692,6 @@ i32.load offset=8 local.set $3 local.get $3 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -1713,26 +1732,26 @@ local.set $6 local.get $5 local.get $6 - i32.load offset=8 + i32.load i32.store offset=8 local.get $6 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 i32.const 255 i32.and - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -1744,25 +1763,25 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 i32.const 255 i32.and - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -1823,7 +1842,7 @@ end i32.const 1 ) - (func $std/map/test (; 28 ;) (type $FUNCSIG$v) + (func $std/map/test (; 27 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1846,7 +1865,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -1866,7 +1885,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -1884,7 +1903,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -1907,7 +1926,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -1929,7 +1948,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -1947,7 +1966,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -1967,7 +1986,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -1985,7 +2004,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -2008,7 +2027,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -2030,7 +2049,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -2048,7 +2067,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -2065,7 +2084,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -2088,7 +2107,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -2111,7 +2130,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -2131,7 +2150,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -2148,7 +2167,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -2171,7 +2190,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -2186,18 +2205,17 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -2208,7 +2226,6 @@ local.get $0 i32.const 0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -2221,13 +2238,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 5 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -2253,7 +2282,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/internal/hash/hash16 (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -2275,7 +2304,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2287,7 +2316,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -2330,11 +2359,11 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 @@ -2342,14 +2371,14 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2369,7 +2398,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -2384,13 +2412,10 @@ i32.const 12 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -2402,8 +2427,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -2430,13 +2453,13 @@ local.get $9 i32.load offset=4 i32.store offset=4 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load16_s local.set $11 local.get $11 - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -2449,11 +2472,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=8 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 12 @@ -2489,12 +2512,12 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 @@ -2502,8 +2525,8 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -2550,8 +2573,6 @@ i32.load offset=8 local.set $3 local.get $3 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -2592,19 +2613,19 @@ local.set $6 local.get $5 local.get $6 - i32.load offset=8 + i32.load i32.store offset=8 local.get $6 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 @@ -2612,8 +2633,8 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -2625,18 +2646,18 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 @@ -2644,8 +2665,8 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -2706,7 +2727,7 @@ end i32.const 1 ) - (func $std/map/test (; 39 ;) (type $FUNCSIG$v) + (func $std/map/test (; 38 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2729,7 +2750,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -2751,7 +2772,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -2771,7 +2792,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -2794,7 +2815,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -2816,7 +2837,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -2836,7 +2857,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -2858,7 +2879,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -2878,7 +2899,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -2901,7 +2922,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -2923,7 +2944,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -2943,7 +2964,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -2960,7 +2981,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -2983,7 +3004,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -3006,7 +3027,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -3028,7 +3049,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -3045,7 +3066,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -3068,7 +3089,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -3083,18 +3104,17 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -3105,7 +3125,6 @@ local.get $0 i32.const 0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -3118,13 +3137,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 6 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -3150,7 +3181,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3162,7 +3193,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -3203,24 +3234,24 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 i32.const 65535 i32.and - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 43 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3240,7 +3271,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -3255,13 +3285,10 @@ i32.const 12 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -3273,8 +3300,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -3301,13 +3326,13 @@ local.get $9 i32.load offset=4 i32.store offset=4 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load16_u local.set $11 local.get $11 - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -3320,11 +3345,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=8 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 12 @@ -3360,19 +3385,19 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 44 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 i32.const 65535 i32.and - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -3419,8 +3444,6 @@ i32.load offset=8 local.set $3 local.get $3 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -3461,26 +3484,26 @@ local.set $6 local.get $5 local.get $6 - i32.load offset=8 + i32.load i32.store offset=8 local.get $6 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 i32.const 65535 i32.and - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -3492,25 +3515,25 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 i32.const 65535 i32.and - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -3571,7 +3594,7 @@ end i32.const 1 ) - (func $std/map/test (; 49 ;) (type $FUNCSIG$v) + (func $std/map/test (; 48 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3594,7 +3617,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -3614,7 +3637,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -3632,7 +3655,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -3655,7 +3678,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -3677,7 +3700,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -3695,7 +3718,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -3715,7 +3738,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -3733,7 +3756,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -3756,7 +3779,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -3778,7 +3801,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -3796,7 +3819,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -3813,7 +3836,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -3836,7 +3859,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -3859,7 +3882,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -3879,7 +3902,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -3896,7 +3919,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -3919,7 +3942,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -3934,18 +3957,17 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -3956,7 +3978,6 @@ local.get $0 i32.const 0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -3969,13 +3990,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 7 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -4001,7 +4034,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/internal/hash/hash32 (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -4043,7 +4076,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4055,7 +4088,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -4094,22 +4127,22 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4129,7 +4162,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -4144,13 +4176,10 @@ i32.const 12 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -4162,8 +4191,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -4190,13 +4217,13 @@ local.get $9 i32.load offset=4 i32.store offset=4 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load local.set $11 local.get $11 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -4209,11 +4236,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=8 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 12 @@ -4249,17 +4276,17 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 56 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -4306,8 +4333,6 @@ i32.load offset=8 local.set $3 local.get $3 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -4348,24 +4373,24 @@ local.set $6 local.get $5 local.get $6 - i32.load offset=8 + i32.load i32.store offset=8 local.get $6 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -4377,23 +4402,23 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -4454,7 +4479,7 @@ end i32.const 1 ) - (func $std/map/test (; 60 ;) (type $FUNCSIG$v) + (func $std/map/test (; 59 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4477,7 +4502,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -4495,7 +4520,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -4511,7 +4536,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -4534,7 +4559,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -4556,7 +4581,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -4572,7 +4597,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -4590,7 +4615,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -4606,7 +4631,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -4629,7 +4654,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -4651,7 +4676,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -4667,7 +4692,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -4684,7 +4709,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -4707,7 +4732,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -4730,7 +4755,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -4748,7 +4773,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -4765,7 +4790,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -4788,7 +4813,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -4803,18 +4828,17 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 61 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 60 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -4825,7 +4849,6 @@ local.get $0 i32.const 0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -4838,13 +4861,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 8 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -4870,7 +4905,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4882,7 +4917,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -4921,22 +4956,22 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 63 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 65 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 64 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4956,7 +4991,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -4971,13 +5005,10 @@ i32.const 12 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -4989,8 +5020,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -5017,13 +5046,13 @@ local.get $9 i32.load offset=4 i32.store offset=4 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load local.set $11 local.get $11 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -5036,11 +5065,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=8 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 12 @@ -5076,17 +5105,17 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 66 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 65 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -5133,8 +5162,6 @@ i32.load offset=8 local.set $3 local.get $3 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -5175,24 +5202,24 @@ local.set $6 local.get $5 local.get $6 - i32.load offset=8 + i32.load i32.store offset=8 local.get $6 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -5204,23 +5231,23 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 68 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 67 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 69 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 68 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -5281,7 +5308,7 @@ end i32.const 1 ) - (func $std/map/test (; 70 ;) (type $FUNCSIG$v) + (func $std/map/test (; 69 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5304,7 +5331,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -5322,7 +5349,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -5338,7 +5365,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -5361,7 +5388,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -5383,7 +5410,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -5399,7 +5426,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -5417,7 +5444,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -5433,7 +5460,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -5456,7 +5483,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -5478,7 +5505,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -5494,7 +5521,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -5511,7 +5538,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -5534,7 +5561,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -5557,7 +5584,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -5575,7 +5602,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -5592,7 +5619,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -5615,7 +5642,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -5630,18 +5657,17 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 71 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 70 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -5652,7 +5678,6 @@ local.get $0 i32.const 0 i32.const 64 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -5665,13 +5690,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 72 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 71 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 9 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -5697,7 +5734,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/internal/hash/hash64 (; 73 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 72 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5785,7 +5822,7 @@ local.set $3 local.get $3 ) - (func $~lib/map/Map#find (; 74 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 73 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5797,7 +5834,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -5836,22 +5873,22 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 75 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 74 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 76 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 75 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5872,7 +5909,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -5887,13 +5923,10 @@ i32.const 16 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -5905,8 +5938,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -5933,13 +5964,13 @@ local.get $9 i32.load offset=8 i32.store offset=8 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i64.load local.set $11 local.get $11 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -5952,11 +5983,11 @@ local.set $13 local.get $10 local.get $13 - i32.load offset=8 + i32.load i32.store offset=12 local.get $13 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 16 @@ -5992,18 +6023,18 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 77 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 76 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -6050,8 +6081,6 @@ i32.load offset=8 local.set $6 local.get $6 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -6092,24 +6121,24 @@ local.set $7 local.get $5 local.get $7 - i32.load offset=8 + i32.load i32.store offset=12 local.get $7 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 78 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 77 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -6121,11 +6150,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 78 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 80 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 79 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6133,12 +6162,12 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -6199,7 +6228,7 @@ end i32.const 1 ) - (func $std/map/test (; 81 ;) (type $FUNCSIG$v) + (func $std/map/test (; 80 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6222,7 +6251,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -6241,7 +6270,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -6258,7 +6287,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -6281,7 +6310,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -6303,7 +6332,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -6320,7 +6349,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -6339,7 +6368,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -6356,7 +6385,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -6379,7 +6408,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -6401,7 +6430,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -6418,7 +6447,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -6435,7 +6464,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -6458,7 +6487,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -6481,7 +6510,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -6500,7 +6529,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -6517,7 +6546,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -6540,7 +6569,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -6555,18 +6584,17 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 82 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 81 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -6577,7 +6605,6 @@ local.get $0 i32.const 0 i32.const 64 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -6590,13 +6617,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 83 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 82 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 10 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -6622,7 +6661,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 84 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 83 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6634,7 +6673,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -6673,22 +6712,22 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 85 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 84 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 86 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 85 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6709,7 +6748,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -6724,13 +6762,10 @@ i32.const 16 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -6742,8 +6777,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -6770,13 +6803,13 @@ local.get $9 i32.load offset=8 i32.store offset=8 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i64.load local.set $11 local.get $11 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -6789,11 +6822,11 @@ local.set $13 local.get $10 local.get $13 - i32.load offset=8 + i32.load i32.store offset=12 local.get $13 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 16 @@ -6829,18 +6862,18 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 87 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 86 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -6887,8 +6920,6 @@ i32.load offset=8 local.set $6 local.get $6 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -6929,24 +6960,24 @@ local.set $7 local.get $5 local.get $7 - i32.load offset=8 + i32.load i32.store offset=12 local.get $7 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 88 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 87 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -6958,11 +6989,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 89 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 88 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 90 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 89 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6970,12 +7001,12 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -7036,7 +7067,7 @@ end i32.const 1 ) - (func $std/map/test (; 91 ;) (type $FUNCSIG$v) + (func $std/map/test (; 90 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -7059,7 +7090,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -7078,7 +7109,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -7095,7 +7126,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -7118,7 +7149,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -7140,7 +7171,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -7157,7 +7188,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -7176,7 +7207,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -7193,7 +7224,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -7216,7 +7247,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -7238,7 +7269,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -7255,7 +7286,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -7272,7 +7303,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -7295,7 +7326,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -7318,7 +7349,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -7337,7 +7368,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -7354,7 +7385,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -7377,7 +7408,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -7392,18 +7423,17 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 92 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 91 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -7414,7 +7444,6 @@ local.get $0 i32.const 0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -7427,13 +7456,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 11 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -7459,7 +7500,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 94 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 93 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7471,7 +7512,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -7510,23 +7551,23 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 95 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 94 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 96 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 95 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7547,7 +7588,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -7562,13 +7602,10 @@ i32.const 12 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -7580,8 +7617,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -7608,14 +7643,14 @@ local.get $9 i32.load offset=4 i32.store offset=4 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 f32.load local.set $11 local.get $11 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -7628,11 +7663,11 @@ local.set $13 local.get $10 local.get $13 - i32.load offset=8 + i32.load i32.store offset=8 local.get $13 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 12 @@ -7668,19 +7703,19 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 97 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/map/Map#set (; 96 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) (local $3 f32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -7727,8 +7762,6 @@ i32.load offset=8 local.set $6 local.get $6 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -7769,25 +7802,25 @@ local.set $7 local.get $5 local.get $7 - i32.load offset=8 + i32.load i32.store offset=8 local.get $7 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 98 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 97 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -7799,11 +7832,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 99 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 98 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 100 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#delete (; 99 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -7811,13 +7844,13 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -7878,7 +7911,7 @@ end i32.const 1 ) - (func $std/map/test (; 101 ;) (type $FUNCSIG$v) + (func $std/map/test (; 100 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -7901,7 +7934,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -7920,7 +7953,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -7937,7 +7970,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -7960,7 +7993,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -7982,7 +8015,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -7999,7 +8032,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -8018,7 +8051,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -8035,7 +8068,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -8058,7 +8091,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -8080,7 +8113,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -8097,7 +8130,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -8114,7 +8147,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -8137,7 +8170,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -8160,7 +8193,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -8179,7 +8212,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -8196,7 +8229,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -8219,7 +8252,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -8234,18 +8267,17 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 102 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 101 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -8256,7 +8288,6 @@ local.get $0 i32.const 0 i32.const 64 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -8269,13 +8300,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 103 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 12 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -8301,7 +8344,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 104 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 103 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -8313,7 +8356,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -8352,23 +8395,23 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 105 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 104 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 106 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 105 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8389,7 +8432,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -8404,13 +8446,10 @@ i32.const 16 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -8422,8 +8461,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -8450,14 +8487,14 @@ local.get $9 i32.load offset=8 i32.store offset=8 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 f64.load local.set $11 local.get $11 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -8470,11 +8507,11 @@ local.set $13 local.get $10 local.get $13 - i32.load offset=8 + i32.load i32.store offset=12 local.get $13 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 16 @@ -8510,19 +8547,19 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 107 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/map/Map#set (; 106 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) (local $3 f64) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -8569,8 +8606,6 @@ i32.load offset=8 local.set $6 local.get $6 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -8611,25 +8646,25 @@ local.set $7 local.get $5 local.get $7 - i32.load offset=8 + i32.load i32.store offset=12 local.get $7 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 108 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 107 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -8641,11 +8676,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 109 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 108 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 110 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#delete (; 109 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -8653,13 +8688,13 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -8720,7 +8755,7 @@ end i32.const 1 ) - (func $std/map/test (; 111 ;) (type $FUNCSIG$v) + (func $std/map/test (; 110 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -8743,7 +8778,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -8762,7 +8797,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -8779,7 +8814,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 11 i32.const 4 call $~lib/env/abort @@ -8802,7 +8837,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 13 i32.const 2 call $~lib/env/abort @@ -8824,7 +8859,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 17 i32.const 4 call $~lib/env/abort @@ -8841,7 +8876,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -8860,7 +8895,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 4 call $~lib/env/abort @@ -8877,7 +8912,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 21 i32.const 4 call $~lib/env/abort @@ -8900,7 +8935,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 23 i32.const 2 call $~lib/env/abort @@ -8922,7 +8957,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 27 i32.const 4 call $~lib/env/abort @@ -8939,7 +8974,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 4 call $~lib/env/abort @@ -8956,7 +8991,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 30 i32.const 4 call $~lib/env/abort @@ -8979,7 +9014,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 2 call $~lib/env/abort @@ -9002,7 +9037,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -9021,7 +9056,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 4 call $~lib/env/abort @@ -9038,7 +9073,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 40 i32.const 4 call $~lib/env/abort @@ -9061,7 +9096,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort @@ -9076,15 +9111,24 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 46 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start:std/map (; 112 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena + (func $start:std/map (; 111 ;) (type $FUNCSIG$v) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset call $std/map/test call $std/map/test call $std/map/test @@ -9096,9 +9140,9 @@ call $std/map/test call $std/map/test ) - (func $start (; 113 ;) (type $FUNCSIG$v) + (func $start (; 112 ;) (type $FUNCSIG$v) call $start:std/map ) - (func $null (; 114 ;) (type $FUNCSIG$v) + (func $null (; 113 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index f8a147f461..c384219ac8 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -2,9 +2,9 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) @@ -21,9 +21,9 @@ (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 56) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 120) "\n\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 48) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 96) "\01\00\00\00\14\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -31,7 +31,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -54,15 +54,15 @@ i32.add i32.const -8 i32.and - local.tee $2 + local.tee $0 current_memory - local.tee $3 + local.tee $2 i32.const 16 i32.shl i32.gt_u if - local.get $3 local.get $2 + local.get $0 local.get $1 i32.sub i32.const 65535 @@ -71,16 +71,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 + local.tee $3 + local.get $2 local.get $3 - local.get $0 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $0 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -89,23 +89,12 @@ end end end - local.get $2 + local.get $0 global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 56 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end i32.const 1 i32.const 32 local.get $0 @@ -114,262 +103,285 @@ i32.clz i32.sub i32.shl - call $~lib/allocator/arena/__memory_allocate + call $~lib/memory/memory.allocate local.tee $1 - local.get $0 + i32.const -1520547049 i32.store local.get $1 - ) - (func $~lib/internal/memory/memset (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $1 - i32.eqz - if - return - end - local.get $0 - i32.const 0 - i32.store8 local.get $0 - local.get $1 - i32.add - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $2 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store8 + i32.store offset=4 local.get $1 i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - local.get $0 i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $1 + ) + (func $~lib/runtime/ASSERT_UNREGISTERED (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 8 + i32.const 124 i32.le_u if - return + i32.const 0 + i32.const 16 + i32.const 172 + i32.const 2 + call $~lib/env/abort + unreachable end local.get $0 - i32.const 4 - i32.add - i32.const 0 - i32.store - local.get $0 i32.const 8 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 12 i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 24 - i32.le_u + i32.load + i32.const -1520547049 + i32.ne if - return + i32.const 0 + i32.const 16 + i32.const 173 + i32.const 2 + call $~lib/env/abort + unreachable end - local.get $0 - i32.const 12 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 16 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 20 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $2 - local.get $0 - i32.add - local.set $0 - local.get $1 - local.get $2 - i32.sub - local.set $1 - loop $continue|0 + ) + (func $~lib/memory/memory.fill (; 4 ;) (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.const 32 - i32.ge_u - if - local.get $0 - i64.const 0 - i64.store - local.get $0 - i32.const 8 - i32.add - i64.const 0 - i64.store - local.get $0 - i32.const 16 - i32.add - i64.const 0 - i64.store - local.get $0 - i32.const 24 - i32.add - i64.const 0 - i64.store + i32.add + local.tee $2 + i32.const 28 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 24 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 20 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 16 + i32.sub + i32.const 0 + i32.store + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $2 + local.get $0 + i32.add + local.set $0 + local.get $1 + local.get $2 + i32.sub + local.set $1 + loop $continue|0 local.get $1 i32.const 32 - i32.sub - local.set $1 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $continue|0 + i32.ge_u + if + local.get $0 + i64.const 0 + i64.store + local.get $0 + i32.const 8 + i32.add + i64.const 0 + i64.store + local.get $0 + i32.const 16 + i32.add + i64.const 0 + i64.store + local.get $0 + i32.const 24 + i32.add + i64.const 0 + i64.store + local.get $1 + i32.const 32 + i32.sub + local.set $1 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $continue|0 + end end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.const 1073741816 i32.gt_u if i32.const 0 - i32.const 8 - i32.const 47 - i32.const 40 + i32.const 56 + i32.const 24 + i32.const 43 call $~lib/env/abort unreachable end local.get $0 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $2 + call $~lib/runtime/ALLOCATE + local.tee $1 + local.get $0 + call $~lib/memory/memory.fill + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + i32.const 8 + i32.sub + i32.const 3 + i32.store local.get $1 - i32.eqz - if - local.get $2 - i32.const 8 - i32.add - local.get $0 - call $~lib/internal/memory/memset - end - local.get $2 ) - (func $~lib/set/Set#clear (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -377,7 +389,6 @@ i32.store offset=4 local.get $0 i32.const 32 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -390,11 +401,18 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 6 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 2 + i32.store + local.get $0 i32.const 0 i32.store local.get $0 @@ -416,7 +434,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -426,7 +444,7 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.set $2 loop $continue|0 local.get $2 @@ -461,7 +479,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -477,7 +495,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -491,7 +509,6 @@ local.tee $2 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $4 local.get $2 @@ -502,13 +519,10 @@ local.tee $6 i32.const 3 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -517,8 +531,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $3 loop $continue|0 local.get $2 @@ -549,11 +561,11 @@ local.get $4 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=4 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 8 i32.add @@ -583,7 +595,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -643,12 +655,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $3 i32.const 3 i32.shl + local.get $2 i32.add local.tee $2 local.get $1 @@ -670,14 +680,14 @@ i32.shl i32.add local.tee $3 - i32.load offset=8 + i32.load i32.store offset=4 local.get $3 local.get $2 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#delete (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -744,7 +754,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 12 ;) (type $FUNCSIG$v) + (func $std/set/test (; 13 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -759,7 +769,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -779,7 +789,7 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -794,7 +804,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -813,7 +823,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -833,7 +843,7 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -848,7 +858,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -867,7 +877,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -881,7 +891,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -902,7 +912,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -920,7 +930,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -935,7 +945,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -949,7 +959,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -970,7 +980,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -982,14 +992,47 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#has (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#constructor (; 14 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 4 + i32.store + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/set/Set#clear + local.get $0 + ) + (func $~lib/set/Set#has (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1003,7 +1046,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1017,7 +1060,6 @@ local.tee $2 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $4 local.get $2 @@ -1028,13 +1070,10 @@ local.tee $6 i32.const 3 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -1043,8 +1082,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $3 loop $continue|0 local.get $2 @@ -1075,11 +1112,11 @@ local.get $4 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=4 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 8 i32.add @@ -1109,7 +1146,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1167,12 +1204,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $3 i32.const 3 i32.shl + local.get $2 i32.add local.tee $2 local.get $1 @@ -1194,14 +1229,14 @@ i32.shl i32.add local.tee $3 - i32.load offset=8 + i32.load i32.store offset=4 local.get $3 local.get $2 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#delete (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -1266,10 +1301,10 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 17 ;) (type $FUNCSIG$v) + (func $std/set/test (; 19 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.set $1 loop $repeat|0 local.get $0 @@ -1281,7 +1316,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -1301,7 +1336,7 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -1316,7 +1351,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -1335,7 +1370,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -1355,7 +1390,7 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -1370,7 +1405,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -1389,7 +1424,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -1403,7 +1438,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -1424,7 +1459,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -1442,7 +1477,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -1457,7 +1492,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -1471,7 +1506,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -1492,7 +1527,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -1504,14 +1539,47 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#find (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#constructor (; 20 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 5 + i32.store + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/set/Set#clear + local.get $0 + ) + (func $~lib/set/Set#find (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -1521,7 +1589,7 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.set $2 loop $continue|0 local.get $2 @@ -1556,7 +1624,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1581,7 +1649,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1595,7 +1663,6 @@ local.tee $2 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $2 @@ -1606,13 +1673,10 @@ local.tee $7 i32.const 3 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $6 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -1621,8 +1685,6 @@ i32.add local.set $8 local.get $6 - i32.const 8 - i32.add local.set $3 loop $continue|0 local.get $2 @@ -1662,11 +1724,11 @@ local.get $5 i32.add local.tee $4 - i32.load offset=8 + i32.load i32.store offset=4 local.get $4 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 8 i32.add @@ -1696,7 +1758,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1765,12 +1827,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $3 i32.const 3 i32.shl + local.get $2 i32.add local.tee $2 local.get $1 @@ -1792,14 +1852,14 @@ i32.shl i32.add local.tee $3 - i32.load offset=8 + i32.load i32.store offset=4 local.get $3 local.get $2 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#delete (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -1875,10 +1935,10 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 23 ;) (type $FUNCSIG$v) + (func $std/set/test (; 26 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.set $1 loop $repeat|0 local.get $0 @@ -1890,7 +1950,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -1910,7 +1970,7 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -1925,7 +1985,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -1944,7 +2004,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -1964,7 +2024,7 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -1979,7 +2039,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -1998,7 +2058,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -2012,7 +2072,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -2033,7 +2093,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -2051,7 +2111,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -2066,7 +2126,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -2080,7 +2140,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -2101,7 +2161,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -2113,14 +2173,47 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#has (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#constructor (; 27 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 6 + i32.store + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/set/Set#clear + local.get $0 + ) + (func $~lib/set/Set#has (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2143,7 +2236,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2157,7 +2250,6 @@ local.tee $2 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $2 @@ -2168,13 +2260,10 @@ local.tee $7 i32.const 3 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $6 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -2183,8 +2272,6 @@ i32.add local.set $8 local.get $6 - i32.const 8 - i32.add local.set $3 loop $continue|0 local.get $2 @@ -2224,11 +2311,11 @@ local.get $5 i32.add local.tee $4 - i32.load offset=8 + i32.load i32.store offset=4 local.get $4 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 8 i32.add @@ -2258,7 +2345,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2325,12 +2412,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $3 i32.const 3 i32.shl + local.get $2 i32.add local.tee $2 local.get $1 @@ -2352,14 +2437,14 @@ i32.shl i32.add local.tee $3 - i32.load offset=8 + i32.load i32.store offset=4 local.get $3 local.get $2 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#delete (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2433,10 +2518,10 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 28 ;) (type $FUNCSIG$v) + (func $std/set/test (; 32 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.set $1 loop $repeat|0 local.get $0 @@ -2448,7 +2533,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -2468,7 +2553,7 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -2483,7 +2568,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -2502,7 +2587,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -2522,7 +2607,7 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -2537,7 +2622,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -2556,7 +2641,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -2570,7 +2655,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -2591,7 +2676,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -2609,7 +2694,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -2624,7 +2709,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -2638,7 +2723,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -2659,7 +2744,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -2671,14 +2756,47 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/internal/hash/hash32 (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 33 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 7 + i32.store + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/set/Set#clear + local.get $0 + ) + (func $~lib/util/hash/hash32 (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -2709,7 +2827,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -2719,7 +2837,7 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.set $2 loop $continue|0 local.get $2 @@ -2752,16 +2870,16 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2775,7 +2893,6 @@ local.tee $2 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $4 local.get $2 @@ -2786,13 +2903,10 @@ local.tee $6 i32.const 3 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -2801,8 +2915,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $3 loop $continue|0 local.get $2 @@ -2822,7 +2934,7 @@ local.get $3 local.get $2 i32.load - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 local.get $1 i32.and i32.const 2 @@ -2830,11 +2942,11 @@ local.get $4 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=4 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 8 i32.add @@ -2864,12 +2976,12 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $1 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 local.tee $2 local.set $4 local.get $0 @@ -2917,12 +3029,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $3 i32.const 3 i32.shl + local.get $2 i32.add local.tee $2 local.get $1 @@ -2944,19 +3054,19 @@ i32.shl i32.add local.tee $3 - i32.load offset=8 + i32.load i32.store offset=4 local.get $3 local.get $2 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#delete (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/set/Set#find local.tee $1 i32.eqz @@ -3011,10 +3121,10 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 35 ;) (type $FUNCSIG$v) + (func $std/set/test (; 40 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.set $1 loop $repeat|0 local.get $0 @@ -3026,7 +3136,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -3046,7 +3156,7 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -3061,7 +3171,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -3080,7 +3190,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -3100,7 +3210,7 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -3115,7 +3225,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -3134,7 +3244,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -3148,7 +3258,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -3169,7 +3279,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -3187,7 +3297,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -3202,7 +3312,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -3216,7 +3326,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -3237,7 +3347,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -3249,17 +3359,50 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/set/test (; 36 ;) (type $FUNCSIG$v) + (func $~lib/set/Set#constructor (; 41 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 8 + i32.store + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/set/Set#clear + local.get $0 + ) + (func $std/set/test (; 42 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.set $1 loop $repeat|0 local.get $0 @@ -3271,7 +3414,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -3291,7 +3434,7 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -3306,7 +3449,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -3325,7 +3468,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -3345,7 +3488,7 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -3360,7 +3503,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -3379,7 +3522,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -3393,7 +3536,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -3414,7 +3557,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -3432,7 +3575,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -3447,7 +3590,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -3461,7 +3604,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -3482,7 +3625,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -3494,17 +3637,16 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#clear (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -3512,7 +3654,6 @@ i32.store offset=4 local.get $0 i32.const 64 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -3525,11 +3666,18 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 38 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 44 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/ALLOCATE local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 9 + i32.store + local.get $0 i32.const 0 i32.store local.get $0 @@ -3551,7 +3699,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/hash64 (; 39 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -3617,7 +3765,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 40 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 46 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -3627,7 +3775,7 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.set $2 loop $continue|0 local.get $2 @@ -3660,16 +3808,16 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 41 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 47 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 42 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 48 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3683,7 +3831,6 @@ local.tee $2 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $4 local.get $2 @@ -3694,13 +3841,10 @@ local.tee $6 i32.const 4 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -3709,8 +3853,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $3 loop $continue|0 local.get $2 @@ -3730,7 +3872,7 @@ local.get $3 local.get $2 i64.load - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 local.get $1 i32.and i32.const 2 @@ -3738,11 +3880,11 @@ local.get $4 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=8 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 16 i32.add @@ -3772,12 +3914,12 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 43 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 49 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) (local $4 i32) local.get $1 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 local.tee $2 local.set $4 local.get $0 @@ -3825,12 +3967,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $3 i32.const 4 i32.shl + local.get $2 i32.add local.tee $2 local.get $1 @@ -3852,20 +3992,20 @@ i32.shl i32.add local.tee $3 - i32.load offset=8 + i32.load i32.store offset=8 local.get $3 local.get $2 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#delete (; 44 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#delete (; 50 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 call $~lib/set/Set#find local.tee $2 i32.eqz @@ -3920,7 +4060,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 45 ;) (type $FUNCSIG$v) + (func $std/set/test (; 51 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/set/Set#constructor @@ -3935,7 +4075,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -3955,7 +4095,7 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -3970,7 +4110,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -3989,7 +4129,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -4009,7 +4149,7 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -4024,7 +4164,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -4043,7 +4183,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -4057,7 +4197,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -4078,7 +4218,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -4096,7 +4236,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -4111,7 +4251,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -4125,7 +4265,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -4146,7 +4286,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -4158,17 +4298,50 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/set/test (; 46 ;) (type $FUNCSIG$v) + (func $~lib/set/Set#constructor (; 52 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 10 + i32.store + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/set/Set#clear + local.get $0 + ) + (func $std/set/test (; 53 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.set $1 loop $repeat|0 local.get $0 @@ -4180,7 +4353,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -4200,7 +4373,7 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -4215,7 +4388,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -4234,7 +4407,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -4254,7 +4427,7 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -4269,7 +4442,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -4288,7 +4461,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -4302,7 +4475,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -4323,7 +4496,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -4341,7 +4514,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -4356,7 +4529,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -4370,7 +4543,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -4391,7 +4564,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -4403,19 +4576,52 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/internal/hash/HASH (; 47 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/set/Set#constructor (; 54 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 11 + i32.store + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/set/Set#clear + local.get $0 + ) + (func $~lib/util/hash/HASH (; 55 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 ) - (func $~lib/set/Set#find (; 48 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 56 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -4425,7 +4631,7 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.set $2 loop $continue|0 local.get $2 @@ -4458,16 +4664,16 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 49 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 57 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 50 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 58 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4481,7 +4687,6 @@ local.tee $2 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $4 local.get $2 @@ -4492,13 +4697,10 @@ local.tee $6 i32.const 3 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -4507,8 +4709,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $3 loop $continue|0 local.get $2 @@ -4529,7 +4729,7 @@ local.get $2 f32.load i32.reinterpret_f32 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 local.get $1 i32.and i32.const 2 @@ -4537,11 +4737,11 @@ local.get $4 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=4 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 8 i32.add @@ -4571,14 +4771,14 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 51 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#add (; 59 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH local.tee $4 call $~lib/set/Set#find i32.eqz @@ -4622,12 +4822,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $3 i32.const 3 i32.shl + local.get $2 i32.add local.tee $2 local.get $1 @@ -4649,21 +4847,21 @@ i32.shl i32.add local.tee $3 - i32.load offset=8 + i32.load i32.store offset=4 local.get $3 local.get $2 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#delete (; 52 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#delete (; 60 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/set/Set#find local.tee $2 i32.eqz @@ -4718,10 +4916,10 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 53 ;) (type $FUNCSIG$v) + (func $std/set/test (; 61 ;) (type $FUNCSIG$v) (local $0 f32) (local $1 i32) - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.set $1 loop $repeat|0 local.get $0 @@ -4733,7 +4931,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -4753,7 +4951,7 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -4768,7 +4966,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -4787,7 +4985,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -4807,7 +5005,7 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -4822,7 +5020,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -4841,7 +5039,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -4855,7 +5053,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -4876,7 +5074,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -4894,7 +5092,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -4909,7 +5107,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -4923,7 +5121,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -4944,7 +5142,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -4956,19 +5154,52 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/internal/hash/HASH (; 54 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/set/Set#constructor (; 62 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.tee $0 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $0 + i32.const 8 + i32.sub + i32.const 12 + i32.store + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/set/Set#clear + local.get $0 + ) + (func $~lib/util/hash/HASH (; 63 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 ) - (func $~lib/set/Set#find (; 55 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 64 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -4978,7 +5209,7 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.set $2 loop $continue|0 local.get $2 @@ -5011,16 +5242,16 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 56 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 65 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 57 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 66 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5034,7 +5265,6 @@ local.tee $2 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $4 local.get $2 @@ -5045,13 +5275,10 @@ local.tee $6 i32.const 4 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -5060,8 +5287,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $3 loop $continue|0 local.get $2 @@ -5082,7 +5307,7 @@ local.get $2 f64.load i64.reinterpret_f64 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 local.get $1 i32.and i32.const 2 @@ -5090,11 +5315,11 @@ local.get $4 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=8 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 16 i32.add @@ -5124,14 +5349,14 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 58 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#add (; 67 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH local.tee $4 call $~lib/set/Set#find i32.eqz @@ -5175,12 +5400,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $3 i32.const 4 i32.shl + local.get $2 i32.add local.tee $2 local.get $1 @@ -5202,21 +5425,21 @@ i32.shl i32.add local.tee $3 - i32.load offset=8 + i32.load i32.store offset=8 local.get $3 local.get $2 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#delete (; 59 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#delete (; 68 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 local.get $1 local.get $1 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 call $~lib/set/Set#find local.tee $2 i32.eqz @@ -5271,10 +5494,10 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 60 ;) (type $FUNCSIG$v) + (func $std/set/test (; 69 ;) (type $FUNCSIG$v) (local $0 f64) (local $1 i32) - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.set $1 loop $repeat|0 local.get $0 @@ -5286,7 +5509,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -5306,7 +5529,7 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -5321,7 +5544,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -5340,7 +5563,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -5360,7 +5583,7 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -5375,7 +5598,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -5394,7 +5617,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -5408,7 +5631,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -5429,7 +5652,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -5447,7 +5670,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -5462,7 +5685,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -5476,7 +5699,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -5497,7 +5720,7 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -5509,15 +5732,15 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start (; 61 ;) (type $FUNCSIG$v) - i32.const 144 + (func $start (; 70 ;) (type $FUNCSIG$v) + i32.const 128 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -5532,7 +5755,7 @@ call $std/set/test call $std/set/test ) - (func $null (; 62 ;) (type $FUNCSIG$v) + (func $null (; 71 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 29f1bc64dd..fdca5899c4 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -2,10 +2,10 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) @@ -21,452 +21,466 @@ (type $FUNCSIG$vid (func (param i32 f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 56) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 120) "\n\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 48) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 96) "\01\00\00\00\14\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 144)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 124)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/runtime/ADJUST (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/arena/__memory_allocate return ) - (func $~lib/internal/arraybuffer/computeSize (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 8 - i32.add - i32.const 1 - i32.sub - i32.clz - i32.sub - i32.shl - ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end + call $~lib/runtime/ADJUST + call $~lib/memory/memory.allocate local.set $1 local.get $1 - local.get $0 + global.get $~lib/runtime/HEADER_MAGIC i32.store local.get $1 - ) - (func $~lib/internal/memory/memset (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i64) - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub + i32.store offset=4 local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 - local.get $0 - local.get $3 + global.get $~lib/runtime/HEADER_SIZE i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store + ) + (func $~lib/runtime/ASSERT_UNREGISTERED (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz if - return + i32.const 0 + i32.const 16 + i32.const 172 + i32.const 2 + call $~lib/env/abort + unreachable end local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 + global.get $~lib/runtime/HEADER_SIZE i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz if - return + i32.const 0 + i32.const 16 + i32.const 173 + i32.const 2 + call $~lib/env/abort + unreachable end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 + ) + (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $0 + local.set $3 + local.get $1 + local.set $4 + local.get $2 + local.set $5 + local.get $5 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 1 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 1 + i32.add + local.get $4 + i32.store8 + local.get $3 + i32.const 2 + i32.add + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 2 + i32.sub + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 3 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 3 + i32.add + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $3 + i32.sub + i32.const 3 + i32.and + local.set $6 + local.get $3 + local.get $6 + i32.add + local.set $3 + local.get $5 + local.get $6 + i32.sub + local.set $5 + local.get $5 + i32.const -4 + i32.and + local.set $5 + i32.const -1 + i32.const 255 + i32.div_u + local.get $4 + i32.const 255 + i32.and + i32.mul + local.set $7 + local.get $3 + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 4 + i32.sub + local.get $7 + i32.store + local.get $5 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 4 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 8 + i32.add + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 12 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 8 + i32.sub + local.get $7 + i32.store + local.get $5 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 12 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 16 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 20 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 24 + i32.add + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 28 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 24 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 20 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 16 + i32.sub + local.get $7 + i32.store + i32.const 24 + local.get $3 + i32.const 4 + i32.and + i32.add + local.set $6 + local.get $3 + local.get $6 + i32.add + local.set $3 + local.get $5 + local.get $6 + i32.sub + local.set $5 + local.get $7 + i64.extend_i32_u + local.get $7 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $8 + block $break|0 + loop $continue|0 + local.get $5 + i32.const 32 + i32.ge_u + if + block + local.get $3 + local.get $8 + i64.store + local.get $3 + i32.const 8 + i32.add + local.get $8 + i64.store + local.get $3 + i32.const 16 + i32.add + local.get $8 + i64.store + local.get $3 + i32.const 24 + i32.add + local.get $8 + i64.store + local.get $5 + i32.const 32 + i32.sub + local.set $5 + local.get $3 + i32.const 32 + i32.add + local.set $3 + end + br $continue|0 end - br $continue|0 end end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $1 - i32.const 1073741816 + global.get $~lib/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 - i32.const 8 - i32.const 47 - i32.const 40 + i32.const 56 + i32.const 24 + i32.const 43 call $~lib/env/abort unreachable end local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 + call $~lib/runtime/ALLOCATE + local.set $2 local.get $2 i32.const 0 - i32.ne - i32.eqz - if - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $1 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset + local.get $1 + call $~lib/memory/memory.fill + block $~lib/runtime/REGISTER|inlined.0 (result i32) + local.get $2 + local.set $3 + local.get $3 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $3 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 3 + i32.store + local.get $3 end - local.get $3 ) - (func $~lib/set/Set#clear (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -477,7 +491,6 @@ local.get $0 i32.const 0 i32.const 32 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -490,13 +503,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 2 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -522,23 +547,23 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/hash8 (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const -2128831035 local.get $0 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/internal/hash/HASH (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/internal/hash/hash8 + call $~lib/util/hash/hash8 return ) - (func $~lib/set/Set#find (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -550,7 +575,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -593,16 +618,16 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -622,7 +647,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -637,13 +661,10 @@ i32.const 8 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -655,8 +676,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -679,13 +698,13 @@ local.get $9 i32.load8_s i32.store8 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $9 i32.load8_s local.set $11 local.get $11 - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.0 end local.get $1 i32.and @@ -698,11 +717,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=4 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 8 @@ -738,13 +757,13 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH local.set $2 local.get $0 local.get $1 @@ -787,8 +806,6 @@ i32.load offset=8 local.set $4 local.get $4 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -826,25 +843,25 @@ local.set $5 local.get $3 local.get $5 - i32.load offset=8 + i32.load i32.store offset=4 local.get $5 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#get:size (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $2 local.get $2 @@ -852,8 +869,8 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.1 end call $~lib/set/Set#find local.set $3 @@ -914,7 +931,7 @@ end i32.const 1 ) - (func $std/set/test (; 18 ;) (type $FUNCSIG$v) + (func $std/set/test (; 17 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -937,7 +954,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -952,7 +969,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -975,7 +992,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -997,7 +1014,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -1012,7 +1029,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -1035,7 +1052,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -1057,7 +1074,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -1074,7 +1091,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -1097,7 +1114,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -1120,7 +1137,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -1135,7 +1152,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -1152,7 +1169,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -1175,7 +1192,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -1190,18 +1207,17 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#clear (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -1212,7 +1228,6 @@ local.get $0 i32.const 0 i32.const 32 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -1225,13 +1240,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 4 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -1257,14 +1284,14 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/HASH (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and - call $~lib/internal/hash/hash8 + call $~lib/util/hash/hash8 return ) - (func $~lib/set/Set#find (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1276,7 +1303,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -1317,16 +1344,16 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1346,7 +1373,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -1361,13 +1387,10 @@ i32.const 8 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -1379,8 +1402,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -1403,13 +1424,13 @@ local.get $9 i32.load8_u i32.store8 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $9 i32.load8_u local.set $11 local.get $11 - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.0 end local.get $1 i32.and @@ -1422,11 +1443,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=4 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 8 @@ -1462,13 +1483,13 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH local.set $2 local.get $0 local.get $1 @@ -1511,8 +1532,6 @@ i32.load offset=8 local.set $4 local.get $4 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -1550,32 +1569,32 @@ local.set $5 local.get $3 local.get $5 - i32.load offset=8 + i32.load i32.store offset=4 local.get $5 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#get:size (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $2 local.get $2 i32.const 255 i32.and - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.1 end call $~lib/set/Set#find local.set $3 @@ -1636,7 +1655,7 @@ end i32.const 1 ) - (func $std/set/test (; 28 ;) (type $FUNCSIG$v) + (func $std/set/test (; 27 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1659,7 +1678,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -1674,7 +1693,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -1697,7 +1716,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -1719,7 +1738,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -1734,7 +1753,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -1757,7 +1776,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -1779,7 +1798,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -1796,7 +1815,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -1819,7 +1838,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -1842,7 +1861,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -1857,7 +1876,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -1874,7 +1893,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -1897,7 +1916,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -1912,18 +1931,17 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#clear (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -1934,7 +1952,6 @@ local.get $0 i32.const 0 i32.const 32 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -1947,13 +1964,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 5 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -1979,7 +2008,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/hash16 (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -2001,16 +2030,16 @@ local.set $1 local.get $1 ) - (func $~lib/internal/hash/HASH (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/internal/hash/hash16 + call $~lib/util/hash/hash16 return ) - (func $~lib/set/Set#find (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2022,7 +2051,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -2065,16 +2094,16 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2094,7 +2123,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -2109,13 +2137,10 @@ i32.const 8 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -2127,8 +2152,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -2151,13 +2174,13 @@ local.get $9 i32.load16_s i32.store16 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $9 i32.load16_s local.set $11 local.get $11 - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.0 end local.get $1 i32.and @@ -2170,11 +2193,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=4 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 8 @@ -2210,13 +2233,13 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH local.set $2 local.get $0 local.get $1 @@ -2259,8 +2282,6 @@ i32.load offset=8 local.set $4 local.get $4 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -2298,25 +2319,25 @@ local.set $5 local.get $3 local.get $5 - i32.load offset=8 + i32.load i32.store offset=4 local.get $5 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#get:size (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $2 local.get $2 @@ -2324,8 +2345,8 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.1 end call $~lib/set/Set#find local.set $3 @@ -2386,7 +2407,7 @@ end i32.const 1 ) - (func $std/set/test (; 39 ;) (type $FUNCSIG$v) + (func $std/set/test (; 38 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2409,7 +2430,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -2424,7 +2445,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -2447,7 +2468,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -2469,7 +2490,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -2484,7 +2505,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -2507,7 +2528,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -2529,7 +2550,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -2546,7 +2567,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -2569,7 +2590,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -2592,7 +2613,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -2607,7 +2628,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -2624,7 +2645,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -2647,7 +2668,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -2662,18 +2683,17 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#clear (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -2684,7 +2704,6 @@ local.get $0 i32.const 0 i32.const 32 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -2697,13 +2716,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 6 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -2729,14 +2760,14 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/HASH (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 65535 i32.and - call $~lib/internal/hash/hash16 + call $~lib/util/hash/hash16 return ) - (func $~lib/set/Set#find (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2748,7 +2779,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -2789,16 +2820,16 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2818,7 +2849,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -2833,13 +2863,10 @@ i32.const 8 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -2851,8 +2878,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -2875,13 +2900,13 @@ local.get $9 i32.load16_u i32.store16 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $9 i32.load16_u local.set $11 local.get $11 - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.0 end local.get $1 i32.and @@ -2894,11 +2919,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=4 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 8 @@ -2934,13 +2959,13 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 46 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH local.set $2 local.get $0 local.get $1 @@ -2983,8 +3008,6 @@ i32.load offset=8 local.set $4 local.get $4 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -3022,32 +3045,32 @@ local.set $5 local.get $3 local.get $5 - i32.load offset=8 + i32.load i32.store offset=4 local.get $5 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#get:size (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $2 local.get $2 i32.const 65535 i32.and - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.1 end call $~lib/set/Set#find local.set $3 @@ -3108,7 +3131,7 @@ end i32.const 1 ) - (func $std/set/test (; 49 ;) (type $FUNCSIG$v) + (func $std/set/test (; 48 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3131,7 +3154,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -3146,7 +3169,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -3169,7 +3192,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -3191,7 +3214,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -3206,7 +3229,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -3229,7 +3252,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -3251,7 +3274,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -3268,7 +3291,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -3291,7 +3314,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -3314,7 +3337,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -3329,7 +3352,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -3346,7 +3369,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -3369,7 +3392,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -3384,18 +3407,17 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#clear (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -3406,7 +3428,6 @@ local.get $0 i32.const 0 i32.const 32 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -3419,13 +3440,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 7 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -3451,7 +3484,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/hash32 (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -3493,12 +3526,12 @@ local.set $1 local.get $1 ) - (func $~lib/internal/hash/HASH (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 return ) - (func $~lib/set/Set#find (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3510,7 +3543,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -3549,16 +3582,16 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 56 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3578,7 +3611,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -3593,13 +3625,10 @@ i32.const 8 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -3611,8 +3640,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -3635,13 +3662,13 @@ local.get $9 i32.load i32.store - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $9 i32.load local.set $11 local.get $11 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 end local.get $1 i32.and @@ -3654,11 +3681,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=4 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 8 @@ -3694,13 +3721,13 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 57 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 56 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH local.set $2 local.get $0 local.get $1 @@ -3743,8 +3770,6 @@ i32.load offset=8 local.set $4 local.get $4 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -3782,30 +3807,30 @@ local.set $5 local.get $3 local.get $5 - i32.load offset=8 + i32.load i32.store offset=4 local.get $5 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#get:size (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 end call $~lib/set/Set#find local.set $3 @@ -3866,7 +3891,7 @@ end i32.const 1 ) - (func $std/set/test (; 60 ;) (type $FUNCSIG$v) + (func $std/set/test (; 59 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3889,7 +3914,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -3904,7 +3929,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -3927,7 +3952,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -3949,7 +3974,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -3964,7 +3989,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -3987,7 +4012,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -4009,7 +4034,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -4026,7 +4051,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -4049,7 +4074,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -4072,7 +4097,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -4087,7 +4112,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -4104,7 +4129,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -4127,7 +4152,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -4142,18 +4167,17 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#clear (; 61 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 60 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -4164,7 +4188,6 @@ local.get $0 i32.const 0 i32.const 32 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -4177,13 +4200,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 8 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -4209,12 +4244,12 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/HASH (; 63 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 return ) - (func $~lib/set/Set#find (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4226,7 +4261,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -4265,16 +4300,16 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 66 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 65 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4294,7 +4329,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -4309,13 +4343,10 @@ i32.const 8 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -4327,8 +4358,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -4351,13 +4380,13 @@ local.get $9 i32.load i32.store - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $9 i32.load local.set $11 local.get $11 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 end local.get $1 i32.and @@ -4370,11 +4399,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=4 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 8 @@ -4410,13 +4439,13 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 67 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 66 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH local.set $2 local.get $0 local.get $1 @@ -4459,8 +4488,6 @@ i32.load offset=8 local.set $4 local.get $4 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -4498,30 +4525,30 @@ local.set $5 local.get $3 local.get $5 - i32.load offset=8 + i32.load i32.store offset=4 local.get $5 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#get:size (; 68 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 67 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 69 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 68 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 end call $~lib/set/Set#find local.set $3 @@ -4582,7 +4609,7 @@ end i32.const 1 ) - (func $std/set/test (; 70 ;) (type $FUNCSIG$v) + (func $std/set/test (; 69 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4605,7 +4632,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -4620,7 +4647,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -4643,7 +4670,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -4665,7 +4692,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -4680,7 +4707,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -4703,7 +4730,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -4725,7 +4752,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -4742,7 +4769,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -4765,7 +4792,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -4788,7 +4815,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -4803,7 +4830,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -4820,7 +4847,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -4843,7 +4870,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -4858,18 +4885,17 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#clear (; 71 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 70 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -4880,7 +4906,6 @@ local.get $0 i32.const 0 i32.const 64 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -4893,13 +4918,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 72 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 71 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 9 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -4925,7 +4962,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/hash64 (; 73 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 72 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5013,12 +5050,12 @@ local.set $3 local.get $3 ) - (func $~lib/internal/hash/HASH (; 74 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/HASH (; 73 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 return ) - (func $~lib/set/Set#find (; 75 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 74 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5030,7 +5067,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -5069,16 +5106,16 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 76 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 75 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 77 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 76 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5099,7 +5136,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -5114,13 +5150,10 @@ i32.const 16 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -5132,8 +5165,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -5156,13 +5187,13 @@ local.get $9 i64.load i64.store - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $9 i64.load local.set $11 local.get $11 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 end local.get $1 i32.and @@ -5175,11 +5206,11 @@ local.set $13 local.get $10 local.get $13 - i32.load offset=8 + i32.load i32.store offset=8 local.get $13 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 16 @@ -5215,13 +5246,13 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 78 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 77 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH local.set $2 local.get $0 local.get $1 @@ -5264,8 +5295,6 @@ i32.load offset=8 local.set $4 local.get $4 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -5303,18 +5332,18 @@ local.set $5 local.get $3 local.get $5 - i32.load offset=8 + i32.load i32.store offset=8 local.get $5 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#get:size (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 78 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 80 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 79 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -5322,12 +5351,12 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 end call $~lib/set/Set#find local.set $3 @@ -5388,7 +5417,7 @@ end i32.const 1 ) - (func $std/set/test (; 81 ;) (type $FUNCSIG$v) + (func $std/set/test (; 80 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5411,7 +5440,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -5426,7 +5455,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -5449,7 +5478,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -5471,7 +5500,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -5486,7 +5515,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -5509,7 +5538,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -5531,7 +5560,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -5548,7 +5577,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -5571,7 +5600,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -5594,7 +5623,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -5609,7 +5638,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -5626,7 +5655,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -5649,7 +5678,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -5664,18 +5693,17 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#clear (; 82 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 81 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -5686,7 +5714,6 @@ local.get $0 i32.const 0 i32.const 64 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -5699,13 +5726,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 83 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 82 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 10 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -5731,12 +5770,12 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/HASH (; 84 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/HASH (; 83 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 return ) - (func $~lib/set/Set#find (; 85 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 84 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5748,7 +5787,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -5787,16 +5826,16 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 86 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 85 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 87 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 86 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5817,7 +5856,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -5832,13 +5870,10 @@ i32.const 16 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -5850,8 +5885,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -5874,13 +5907,13 @@ local.get $9 i64.load i64.store - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $9 i64.load local.set $11 local.get $11 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 end local.get $1 i32.and @@ -5893,11 +5926,11 @@ local.set $13 local.get $10 local.get $13 - i32.load offset=8 + i32.load i32.store offset=8 local.get $13 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 16 @@ -5933,13 +5966,13 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 88 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 87 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH local.set $2 local.get $0 local.get $1 @@ -5982,8 +6015,6 @@ i32.load offset=8 local.set $4 local.get $4 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -6021,18 +6052,18 @@ local.set $5 local.get $3 local.get $5 - i32.load offset=8 + i32.load i32.store offset=8 local.get $5 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#get:size (; 89 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 88 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 90 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 89 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6040,12 +6071,12 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 end call $~lib/set/Set#find local.set $3 @@ -6106,7 +6137,7 @@ end i32.const 1 ) - (func $std/set/test (; 91 ;) (type $FUNCSIG$v) + (func $std/set/test (; 90 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6129,7 +6160,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -6144,7 +6175,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -6167,7 +6198,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -6189,7 +6220,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -6204,7 +6235,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -6227,7 +6258,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -6249,7 +6280,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -6266,7 +6297,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -6289,7 +6320,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -6312,7 +6343,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -6327,7 +6358,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -6344,7 +6375,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -6367,7 +6398,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -6382,18 +6413,17 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#clear (; 92 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 91 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -6404,7 +6434,6 @@ local.get $0 i32.const 0 i32.const 32 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -6417,13 +6446,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 11 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -6449,13 +6490,13 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/HASH (; 94 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/util/hash/HASH (; 93 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 return ) - (func $~lib/set/Set#find (; 95 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 94 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6467,7 +6508,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -6506,16 +6547,16 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 96 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 95 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 97 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 96 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6536,7 +6577,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -6551,13 +6591,10 @@ i32.const 8 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -6569,8 +6606,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -6593,14 +6628,14 @@ local.get $9 f32.load f32.store - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $9 f32.load local.set $11 local.get $11 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 end local.get $1 i32.and @@ -6613,11 +6648,11 @@ local.set $13 local.get $10 local.get $13 - i32.load offset=8 + i32.load i32.store offset=4 local.get $13 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 8 @@ -6653,13 +6688,13 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 98 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#add (; 97 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH local.set $2 local.get $0 local.get $1 @@ -6702,8 +6737,6 @@ i32.load offset=8 local.set $4 local.get $4 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -6741,18 +6774,18 @@ local.set $5 local.get $3 local.get $5 - i32.load offset=8 + i32.load i32.store offset=4 local.get $5 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#get:size (; 99 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 98 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 100 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#delete (; 99 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -6760,13 +6793,13 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $2 local.get $2 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 end call $~lib/set/Set#find local.set $3 @@ -6827,7 +6860,7 @@ end i32.const 1 ) - (func $std/set/test (; 101 ;) (type $FUNCSIG$v) + (func $std/set/test (; 100 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -6850,7 +6883,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -6865,7 +6898,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -6888,7 +6921,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -6910,7 +6943,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -6925,7 +6958,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -6948,7 +6981,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -6970,7 +7003,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -6987,7 +7020,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -7010,7 +7043,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -7033,7 +7066,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -7048,7 +7081,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -7065,7 +7098,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -7088,7 +7121,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -7103,18 +7136,17 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#clear (; 102 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 101 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -7125,7 +7157,6 @@ local.get $0 i32.const 0 i32.const 64 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -7138,13 +7169,25 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 103 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + call $~lib/runtime/ASSERT_UNREGISTERED + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.const 12 + i32.store + local.get $1 + end local.set $0 end local.get $0 @@ -7170,13 +7213,13 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/HASH (; 104 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/hash/HASH (; 103 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 return ) - (func $~lib/set/Set#find (; 105 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 104 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7188,7 +7231,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -7227,16 +7270,16 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 106 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 105 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 107 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 106 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7257,7 +7300,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -7272,13 +7314,10 @@ i32.const 16 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -7290,8 +7329,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -7314,14 +7351,14 @@ local.get $9 f64.load f64.store - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $9 f64.load local.set $11 local.get $11 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 end local.get $1 i32.and @@ -7334,11 +7371,11 @@ local.set $13 local.get $10 local.get $13 - i32.load offset=8 + i32.load i32.store offset=8 local.get $13 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 16 @@ -7374,13 +7411,13 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 108 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#add (; 107 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $1 - call $~lib/internal/hash/HASH + call $~lib/util/hash/HASH local.set $2 local.get $0 local.get $1 @@ -7423,8 +7460,6 @@ i32.load offset=8 local.set $4 local.get $4 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -7462,18 +7497,18 @@ local.set $5 local.get $3 local.get $5 - i32.load offset=8 + i32.load i32.store offset=8 local.get $5 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#get:size (; 109 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 108 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 110 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#delete (; 109 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -7481,13 +7516,13 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 end call $~lib/set/Set#find local.set $3 @@ -7548,7 +7583,7 @@ end i32.const 1 ) - (func $std/set/test (; 111 ;) (type $FUNCSIG$v) + (func $std/set/test (; 110 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -7571,7 +7606,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 8 i32.const 4 call $~lib/env/abort @@ -7586,7 +7621,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 4 call $~lib/env/abort @@ -7609,7 +7644,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 12 i32.const 2 call $~lib/env/abort @@ -7631,7 +7666,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 16 i32.const 4 call $~lib/env/abort @@ -7646,7 +7681,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 18 i32.const 4 call $~lib/env/abort @@ -7669,7 +7704,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 20 i32.const 2 call $~lib/env/abort @@ -7691,7 +7726,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 24 i32.const 4 call $~lib/env/abort @@ -7708,7 +7743,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 26 i32.const 4 call $~lib/env/abort @@ -7731,7 +7766,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 28 i32.const 2 call $~lib/env/abort @@ -7754,7 +7789,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 32 i32.const 4 call $~lib/env/abort @@ -7769,7 +7804,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 34 i32.const 4 call $~lib/env/abort @@ -7786,7 +7821,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 36 i32.const 4 call $~lib/env/abort @@ -7809,7 +7844,7 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 38 i32.const 2 call $~lib/env/abort @@ -7824,15 +7859,24 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 42 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start:std/set (; 112 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena + (func $start:std/set (; 111 ;) (type $FUNCSIG$v) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset call $std/set/test call $std/set/test call $std/set/test @@ -7844,9 +7888,9 @@ call $std/set/test call $std/set/test ) - (func $start (; 113 ;) (type $FUNCSIG$v) + (func $start (; 112 ;) (type $FUNCSIG$v) call $start:std/set ) - (func $null (; 114 ;) (type $FUNCSIG$v) + (func $null (; 113 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/trace.optimized.wat b/tests/compiler/std/trace.optimized.wat index fb24789172..740e55c12d 100644 --- a/tests/compiler/std/trace.optimized.wat +++ b/tests/compiler/std/trace.optimized.wat @@ -3,14 +3,14 @@ (type $FUNCSIG$v (func)) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t") - (data (i32.const 40) "\0d\00\00\00z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t") - (data (i32.const 72) "\07\00\00\00o\00n\00e\00_\00i\00n\00t") - (data (i32.const 96) "\07\00\00\00t\00w\00o\00_\00i\00n\00t") - (data (i32.const 120) "\t\00\00\00t\00h\00r\00e\00e\00_\00i\00n\00t") - (data (i32.const 144) "\08\00\00\00f\00o\00u\00r\00_\00i\00n\00t") - (data (i32.const 168) "\08\00\00\00f\00i\00v\00e\00_\00i\00n\00t") - (data (i32.const 192) "\08\00\00\00f\00i\00v\00e\00_\00d\00b\00l") + (data (i32.const 8) "\01\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t") + (data (i32.const 48) "\01\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t") + (data (i32.const 88) "\01\00\00\00\0e\00\00\00o\00n\00e\00_\00i\00n\00t") + (data (i32.const 112) "\01\00\00\00\0e\00\00\00t\00w\00o\00_\00i\00n\00t") + (data (i32.const 136) "\01\00\00\00\12\00\00\00t\00h\00r\00e\00e\00_\00i\00n\00t") + (data (i32.const 168) "\01\00\00\00\10\00\00\00f\00o\00u\00r\00_\00i\00n\00t") + (data (i32.const 192) "\01\00\00\00\10\00\00\00f\00i\00v\00e\00_\00i\00n\00t") + (data (i32.const 216) "\01\00\00\00\10\00\00\00f\00i\00v\00e\00_\00d\00b\00l") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/started (mut i32) (i32.const 0)) @@ -18,7 +18,7 @@ (export "table" (table $0)) (export "main" (func $std/trace/main)) (func $start:std/trace (; 1 ;) (type $FUNCSIG$v) - i32.const 8 + i32.const 16 i32.const 0 f64.const 0 f64.const 0 @@ -26,7 +26,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 40 + i32.const 56 i32.const 0 f64.const 0 f64.const 0 @@ -34,7 +34,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 72 + i32.const 96 i32.const 1 f64.const 1 f64.const 0 @@ -42,7 +42,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 96 + i32.const 120 i32.const 2 f64.const 1 f64.const 2 @@ -50,7 +50,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 120 + i32.const 144 i32.const 3 f64.const 1 f64.const 2 @@ -58,7 +58,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 144 + i32.const 176 i32.const 4 f64.const 1 f64.const 2 @@ -66,7 +66,7 @@ f64.const 4 f64.const 0 call $~lib/env/trace - i32.const 168 + i32.const 200 i32.const 5 f64.const 1 f64.const 2 @@ -74,7 +74,7 @@ f64.const 4 f64.const 5 call $~lib/env/trace - i32.const 192 + i32.const 224 i32.const 5 f64.const 1.1 f64.const 2.2 diff --git a/tests/compiler/std/trace.untouched.wat b/tests/compiler/std/trace.untouched.wat index 2486b5ad66..de6114e2a0 100644 --- a/tests/compiler/std/trace.untouched.wat +++ b/tests/compiler/std/trace.untouched.wat @@ -3,23 +3,23 @@ (type $FUNCSIG$v (func)) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t\00") - (data (i32.const 40) "\0d\00\00\00z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t\00") - (data (i32.const 72) "\07\00\00\00o\00n\00e\00_\00i\00n\00t\00") - (data (i32.const 96) "\07\00\00\00t\00w\00o\00_\00i\00n\00t\00") - (data (i32.const 120) "\t\00\00\00t\00h\00r\00e\00e\00_\00i\00n\00t\00") - (data (i32.const 144) "\08\00\00\00f\00o\00u\00r\00_\00i\00n\00t\00") - (data (i32.const 168) "\08\00\00\00f\00i\00v\00e\00_\00i\00n\00t\00") - (data (i32.const 192) "\08\00\00\00f\00i\00v\00e\00_\00d\00b\00l\00") + (data (i32.const 8) "\01\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t\00") + (data (i32.const 48) "\01\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t\00") + (data (i32.const 88) "\01\00\00\00\0e\00\00\00o\00n\00e\00_\00i\00n\00t\00") + (data (i32.const 112) "\01\00\00\00\0e\00\00\00t\00w\00o\00_\00i\00n\00t\00") + (data (i32.const 136) "\01\00\00\00\12\00\00\00t\00h\00r\00e\00e\00_\00i\00n\00t\00") + (data (i32.const 168) "\01\00\00\00\10\00\00\00f\00o\00u\00r\00_\00i\00n\00t\00") + (data (i32.const 192) "\01\00\00\00\10\00\00\00f\00i\00v\00e\00_\00i\00n\00t\00") + (data (i32.const 216) "\01\00\00\00\10\00\00\00f\00i\00v\00e\00_\00d\00b\00l\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 212)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 240)) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $std/trace/main)) (func $start:std/trace (; 1 ;) (type $FUNCSIG$v) - i32.const 8 + i32.const 16 i32.const 0 f64.const 0 f64.const 0 @@ -27,7 +27,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 40 + i32.const 56 i32.const 0 f64.const 0 f64.const 0 @@ -35,7 +35,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 72 + i32.const 96 i32.const 1 f64.const 1 f64.const 0 @@ -43,7 +43,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 96 + i32.const 120 i32.const 2 f64.const 1 f64.const 2 @@ -51,7 +51,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 120 + i32.const 144 i32.const 3 f64.const 1 f64.const 2 @@ -59,7 +59,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 144 + i32.const 176 i32.const 4 f64.const 1 f64.const 2 @@ -67,7 +67,7 @@ f64.const 4 f64.const 0 call $~lib/env/trace - i32.const 168 + i32.const 200 i32.const 5 f64.const 1 f64.const 2 @@ -75,7 +75,7 @@ f64.const 4 f64.const 5 call $~lib/env/trace - i32.const 192 + i32.const 224 i32.const 5 f64.const 1.1 f64.const 2.2 From b8a08da7a5d1836142258105d78d286669f22ebb Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 16 Mar 2019 07:26:33 +0100 Subject: [PATCH 038/119] more static array --- src/compiler.ts | 249 +- src/program.ts | 43 +- std/assembly/runtime.ts | 81 +- std/portable/index.d.ts | 22 +- .../compiler/std/array-literal.optimized.wat | 2280 ++++++++--- .../compiler/std/array-literal.untouched.wat | 3320 +++++++++++++---- tests/compiler/std/map.optimized.wat | 293 +- tests/compiler/std/map.untouched.wat | 348 +- tests/compiler/std/set.optimized.wat | 281 +- tests/compiler/std/set.untouched.wat | 348 +- 10 files changed, 5008 insertions(+), 2257 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index d26a424403..180f10a060 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -835,7 +835,8 @@ export class Compiler extends DiagnosticEmitter { initializerNode, global.type, ConversionKind.IMPLICIT, - WrapMode.WRAP + WrapMode.WRAP, + global ); this.currentFlow = previousFlow; } @@ -2340,7 +2341,8 @@ export class Compiler extends DiagnosticEmitter { expression: Expression, contextualType: Type, conversionKind: ConversionKind, - wrapMode: WrapMode + wrapMode: WrapMode, + context: Element | null = null ): ExpressionRef { this.currentType = contextualType; var expr: ExpressionRef; @@ -2387,7 +2389,7 @@ export class Compiler extends DiagnosticEmitter { break; } case NodeKind.LITERAL: { - expr = this.compileLiteralExpression(expression, contextualType); + expr = this.compileLiteralExpression(expression, contextualType, false, context); break; } case NodeKind.NEW: { @@ -6321,7 +6323,8 @@ export class Compiler extends DiagnosticEmitter { compileLiteralExpression( expression: LiteralExpression, contextualType: Type, - implicitNegate: bool = false + implicitNegate: bool = false, + context: Element | null = null ): ExpressionRef { var module = this.module; switch (expression.literalKind) { @@ -6336,7 +6339,8 @@ export class Compiler extends DiagnosticEmitter { assert(classType.typeArguments)[0], (expression).elementExpressions, false, // TODO: isConst? - expression + expression, + context ); } this.error( @@ -6427,7 +6431,7 @@ export class Compiler extends DiagnosticEmitter { return this.ensureStaticString(expression.value); } - ensureStaticArrayBuffer(elementType: Type, values: ExpressionRef[]): ExpressionRef { + ensureStaticArrayBuffer(elementType: Type, values: ExpressionRef[]): MemorySegment { var program = this.program; var length = values.length; var byteSize = elementType.byteSize; @@ -6510,156 +6514,37 @@ export class Compiler extends DiagnosticEmitter { } assert(pos == buf.length); - var segment = this.addMemorySegment(buf); - var offset = i64_add(segment.offset, i64_new(runtimeHeaderSize)); - this.currentType = bufferInstance.type; - return program.options.isWasm64 - ? this.module.createI64(i64_low(offset), i64_high(offset)) - : this.module.createI32(i64_low(offset)); + return this.addMemorySegment(buf); } - /** Ensures that the specified array exists in static memory and returns a pointer to it. */ - // ensureStaticArray(elementType: Type, values: ExpressionRef[]): ExpressionRef { - // var program = this.program; - // var hasGC = program.hasGC; - // var gcHeaderSize = program.gcHeaderSize; - - // var length = values.length; - // var byteSize = elementType.byteSize; - // var byteLength = length * byteSize; - // var usizeTypeSize = this.options.usizeType.byteSize; - - // var buf: Uint8Array; - // var pos: u32; - - // // create the backing ArrayBuffer segment - // var bufferInstance = assert(program.arrayBufferInstance); - // var bufferHeaderSize = (bufferInstance.currentMemoryOffset + 7) & ~7; - // var bufferTotalSize = 1 << (32 - clz(bufferHeaderSize + byteLength - 1)); - // if (hasGC) { - // buf = new Uint8Array(gcHeaderSize + bufferTotalSize); - // pos = gcHeaderSize; - // writeI32(ensureGCHook(this, bufferInstance), buf, program.gcHookOffset); - // } else { - // buf = new Uint8Array(bufferTotalSize); - // pos = 0; - // } - // writeI32(byteLength, buf, pos + bufferInstance.offsetof(LibrarySymbols.byteLength)); - // pos += bufferHeaderSize; - // var nativeType = elementType.toNativeType(); - // switch (nativeType) { - // case NativeType.I32: { - // switch (byteSize) { - // case 1: { - // for (let i = 0; i < length; ++i) { - // let value = values[i]; - // assert(getExpressionType(value) == nativeType); - // assert(getExpressionId(value) == ExpressionId.Const); - // writeI8(getConstValueI32(value), buf, pos); - // pos += 1; - // } - // break; - // } - // case 2: { - // for (let i = 0; i < length; ++i) { - // let value = values[i]; - // assert(getExpressionType(value) == nativeType); - // assert(getExpressionId(value) == ExpressionId.Const); - // writeI16(getConstValueI32(value), buf, pos); - // pos += 2; - // } - // break; - // } - // case 4: { - // for (let i = 0; i < length; ++i) { - // let value = values[i]; - // assert(getExpressionType(value) == nativeType); - // assert(getExpressionId(value) == ExpressionId.Const); - // writeI32(getConstValueI32(value), buf, pos); - // pos += 4; - // } - // break; - // } - // default: assert(false); - // } - // break; - // } - // case NativeType.I64: { - // for (let i = 0; i < length; ++i) { - // let value = values[i]; - // assert(getExpressionType(value) == nativeType); - // assert(getExpressionId(value) == ExpressionId.Const); - // writeI64(i64_new(getConstValueI64Low(value), getConstValueI64High(value)), buf, pos); - // pos += 8; - // } - // break; - // } - // case NativeType.F32: { - // for (let i = 0; i < length; ++i) { - // let value = values[i]; - // assert(getExpressionType(value) == nativeType); - // assert(getExpressionId(value) == ExpressionId.Const); - // writeF32(getConstValueF32(value), buf, pos); - // pos += 4; - // } - // break; - // } - // case NativeType.F64: { - // for (let i = 0; i < length; ++i) { - // let value = values[i]; - // assert(getExpressionType(value) == nativeType); - // assert(getExpressionId(value) == ExpressionId.Const); - // writeF64(getConstValueF64(value), buf, pos); - // pos += 8; - // } - // break; - // } - // default: assert(false); - // } - // var bufferSegment = this.addMemorySegment(buf); - // var bufferOffset = bufferSegment.offset; - // if (hasGC) bufferOffset = i64_add(bufferOffset, i64_new(gcHeaderSize)); - - // // create the Array segment and return a pointer to it - // var arrayPrototype = assert(program.arrayPrototype); - // var arrayInstance = assert(this.resolver.resolveClass( - // arrayPrototype, - // [ elementType ], - // makeMap() - // )); - // var arrayHeaderSize = (arrayInstance.currentMemoryOffset + 7) & ~7; - // if (hasGC) { - // buf = new Uint8Array(gcHeaderSize + arrayHeaderSize); - // pos = gcHeaderSize; - // writeI32(ensureGCHook(this, arrayInstance), buf, program.gcHookOffset); - // } else { - // buf = new Uint8Array(arrayHeaderSize); - // pos = 0; - // } - // var arraySegment = this.addMemorySegment(buf); - // var arrayOffset = arraySegment.offset; - // if (hasGC) arrayOffset = i64_add(arrayOffset, i64_new(gcHeaderSize)); - // this.currentType = arrayInstance.type; - // var buffer_offset = pos + arrayInstance.offsetof("buffer_"); - // var length_offset = pos + arrayInstance.offsetof("length_"); - // if (usizeTypeSize == 8) { - // writeI64(bufferOffset, buf, buffer_offset); - // writeI32(length, buf, length_offset); - // return this.module.createI64(i64_low(arrayOffset), i64_high(arrayOffset)); - // } else { - // assert(i64_is_u32(bufferOffset)); - // writeI32(i64_low(bufferOffset), buf, buffer_offset); - // writeI32(length, buf, length_offset); - // assert(i64_is_u32(arrayOffset)); - // return this.module.createI32(i64_low(arrayOffset)); - // } - // } + ensureStaticArrayHeader(elementType: Type, bufferSegment: MemorySegment): MemorySegment { + var program = this.program; + var runtimeHeaderSize = program.runtimeHeaderSize; + var arrayPrototype = assert(program.arrayPrototype); + var arrayInstance = assert(this.resolver.resolveClass(arrayPrototype, [ elementType ])); + var arrayInstanceSize = arrayInstance.currentMemoryOffset; + var bufferLength = bufferSegment.buffer.length - runtimeHeaderSize; + var arrayLength = i32(bufferLength / elementType.byteSize); + + var buf = new Uint8Array(runtimeHeaderSize + arrayInstanceSize); + program.writeRuntimeHeader(buf, 0, arrayInstance, arrayInstanceSize); + + var bufferAddress32 = i64_low(bufferSegment.offset) + runtimeHeaderSize; + assert(!program.options.isWasm64); // TODO + assert(arrayInstance.writeField("data", bufferAddress32, buf, runtimeHeaderSize)); + assert(arrayInstance.writeField("dataStart", bufferAddress32, buf, runtimeHeaderSize)); + assert(arrayInstance.writeField("dataEnd", bufferAddress32 + bufferLength, buf, runtimeHeaderSize)); + assert(arrayInstance.writeField("length_", arrayLength, buf, runtimeHeaderSize)); + + return this.addMemorySegment(buf); + } compileArrayLiteral( elementType: Type, expressions: (Expression | null)[], isConst: bool, - reportNode: Node + reportNode: Node, + context: Element | null = null ): ExpressionRef { var module = this.module; @@ -6692,34 +6577,54 @@ export class Compiler extends DiagnosticEmitter { } } - var arrayPrototype = assert(this.program.arrayPrototype); + var program = this.program; + var arrayPrototype = assert(program.arrayPrototype); var arrayInstance = assert(this.resolver.resolveClass(arrayPrototype, [ elementType ])); var arrayType = arrayInstance.type; - // if the array is static, make a static arraybuffer segment and wrap it with an array + // if the array is static, make a static arraybuffer segment if (isStatic) { - let arrayBufferInstance = assert(this.program.arrayBufferInstance); - let wrapArrayPrototype = assert(this.program.wrapArrayPrototype); - let wrapArrayInstance = this.resolver.resolveFunction(wrapArrayPrototype, [ elementType ]); - if (!wrapArrayInstance) { + let runtimeHeaderSize = program.runtimeHeaderSize; + let bufferSegment = this.ensureStaticArrayBuffer(elementType, constantValues); + let bufferAddress = i64_add(bufferSegment.offset, i64_new(runtimeHeaderSize)); + + // make both the buffer and array header static if assigned to a global. this can't be done + // if inside of a function because each invocation must create a new array reference then. + if (context && context.kind == ElementKind.GLOBAL) { + let arraySegment = this.ensureStaticArrayHeader(elementType, bufferSegment); + let arrayAddress = i64_add(arraySegment.offset, i64_new(runtimeHeaderSize)); this.currentType = arrayType; - return module.createUnreachable(); + return program.options.isWasm64 + ? this.module.createI64(i64_low(arrayAddress), i64_high(arrayAddress)) + : this.module.createI32(i64_low(arrayAddress)); + + // otherwise allocate a new array header and make it wrap a copy of the static buffer + } else { + let arrayBufferInstance = assert(program.arrayBufferInstance); + let wrapArrayPrototype = assert(program.wrapArrayPrototype); + let wrapArrayInstance = this.resolver.resolveFunction(wrapArrayPrototype, [ elementType ]); + if (!wrapArrayInstance) { + this.currentType = arrayType; + return module.createUnreachable(); + } + let previousFlow = this.currentFlow; + let tempLocal = previousFlow.getTempLocal(arrayBufferInstance.type, false); + let flow = Flow.createInline(previousFlow.parentFunction, wrapArrayInstance); + flow.addScopedAlias(wrapArrayInstance.signature.getParameterName(0), arrayBufferInstance.type, tempLocal.index); + this.currentFlow = flow; + let body = this.compileFunctionBody(wrapArrayInstance); + body.unshift( + module.createSetLocal(tempLocal.index, + program.options.isWasm64 + ? this.module.createI64(i64_low(bufferAddress), i64_high(bufferAddress)) + : this.module.createI32(i64_low(bufferAddress)) + ) + ); + previousFlow.freeTempLocal(tempLocal); + this.currentFlow = previousFlow; + this.currentType = arrayType; + return module.createBlock(flow.inlineReturnLabel, body, this.options.nativeSizeType); } - let previousFlow = this.currentFlow; - let tempLocal = previousFlow.getTempLocal(arrayBufferInstance.type, false); - let flow = Flow.createInline(previousFlow.parentFunction, wrapArrayInstance); - flow.addScopedAlias("buffer", arrayBufferInstance.type, tempLocal.index); - this.currentFlow = flow; - let body = this.compileFunctionBody(wrapArrayInstance); - body.unshift( - module.createSetLocal(tempLocal.index, - this.ensureStaticArrayBuffer(elementType, constantValues) - ) - ); - previousFlow.freeTempLocal(tempLocal); - this.currentFlow = previousFlow; - this.currentType = arrayType; - return module.createBlock(flow.inlineReturnLabel, body, this.options.nativeSizeType); } // otherwise compile an explicit instantiation with indexed sets @@ -7982,7 +7887,7 @@ export class Compiler extends DiagnosticEmitter { var previousFlow = this.currentFlow; var tempLocal = previousFlow.getTempLocal(classType, false); var flow = Flow.createInline(previousFlow.parentFunction, registerInstance); - flow.addScopedAlias("ref", this.options.usizeType, tempLocal.index); + flow.addScopedAlias(registerInstance.signature.getParameterName(0), this.options.usizeType, tempLocal.index); this.currentFlow = flow; var body = this.compileFunctionBody(registerInstance); body.unshift( diff --git a/src/program.ts b/src/program.ts index 681c4f6ed1..60663d5217 100644 --- a/src/program.ts +++ b/src/program.ts @@ -84,7 +84,7 @@ import { } from "./module"; import { - CharCode, writeI32 + CharCode, writeI32, writeI8, writeI16, writeF32, writeF64 } from "./util"; import { @@ -3026,6 +3026,47 @@ export class Class extends TypedElement { assert(field.kind == ElementKind.FIELD); return (field).memoryOffset; } + + /** Writes a field value to a buffer and returns the number of bytes written. */ + writeField(name: string, value: T, buffer: Uint8Array, baseOffset: i32): i32 { + var field = this.lookupInSelf(name); + if (field && field.kind == ElementKind.FIELD) { + let offset = baseOffset + (field).memoryOffset; + switch ((field).type.kind) { + case TypeKind.I8: + case TypeKind.U8: { + writeI8(i32(value), buffer, offset); + return 1; + } + case TypeKind.I16: + case TypeKind.U16: { + writeI16(i32(value), buffer, offset); + return 2; + } + case TypeKind.I32: + case TypeKind.U32: { + writeI32(i32(value), buffer, offset); + return 4; + } + case TypeKind.ISIZE: + case TypeKind.USIZE: { + assert(!this.program.options.isWasm64); // TODO + writeI32(i32(value), buffer, offset); + return 4; + } + case TypeKind.F32: { + writeF32(f32(value), buffer, offset); + return 4; + } + case TypeKind.F64: { + writeF64(f64(value), buffer, offset); + return 8; + } + } + } + assert(false); + return 0; + } } /** A yet unresolved interface. */ diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 2aed821d21..2635ef5957 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -40,7 +40,7 @@ export declare function CLASSID(): u32; export declare function ITERATEROOTS(fn: (ref: usize) => void): void; /** Adjusts an allocation to actual block size. Primarily targets TLSF. */ -export function ADJUST(payloadSize: usize): usize { +function adjustToBlock(payloadSize: usize): usize { // round up to power of 2, e.g. with HEADER_SIZE=8: // 0 -> 2^3 = 8 // 1..8 -> 2^4 = 16 @@ -52,9 +52,13 @@ export function ADJUST(payloadSize: usize): usize { /** Allocates a new object and returns a pointer to its payload. Does not fill. */ // @ts-ignore: decorator -@unsafe +@unsafe @inline export function ALLOCATE(payloadSize: usize): usize { - var header = changetype
(memory.allocate(ADJUST(payloadSize))); + return doAllocate(payloadSize); +} + +function doAllocate(payloadSize: usize): usize { + var header = changetype
(memory.allocate(adjustToBlock(payloadSize))); header.classId = HEADER_MAGIC; header.payloadSize = payloadSize; if (GC_IMPLEMENTED) { @@ -66,8 +70,12 @@ export function ALLOCATE(payloadSize: usize): usize { /** Reallocates an object if necessary. Returns a pointer to its (moved) payload. */ // @ts-ignore: decorator -@unsafe +@unsafe @inline export function REALLOCATE(ref: usize, newPayloadSize: usize): usize { + return doReallocate(ref, newPayloadSize); +} + +function doReallocate(ref: usize, newPayloadSize: usize): usize { // Background: When managed objects are allocated these aren't immediately registered with GC // but can be used as scratch objects while unregistered. This is useful in situations where // the object must be reallocated multiple times because its final size isn't known beforehand, @@ -75,8 +83,8 @@ export function REALLOCATE(ref: usize, newPayloadSize: usize): usize { var header = changetype
(ref - HEADER_SIZE); var payloadSize = header.payloadSize; if (payloadSize < newPayloadSize) { - let newAdjustedSize = ADJUST(newPayloadSize); - if (select(ADJUST(payloadSize), 0, ref > HEAP_BASE) < newAdjustedSize) { + let newAdjustedSize = adjustToBlock(newPayloadSize); + if (select(adjustToBlock(payloadSize), 0, ref > HEAP_BASE) < newAdjustedSize) { // move if the allocation isn't large enough or not a heap object let newHeader = changetype
(memory.allocate(newAdjustedSize)); newHeader.classId = header.classId; @@ -114,27 +122,42 @@ export function REALLOCATE(ref: usize, newPayloadSize: usize): usize { // @ts-ignore: decorator @unsafe @inline export function REGISTER(ref: usize): T { - ASSERT_UNREGISTERED(ref); - changetype
(ref - HEADER_SIZE).classId = CLASSID(); + return changetype(doRegister(ref, CLASSID())); +} + +function doRegister(ref: usize, classId: u32): usize { + if (!ASC_NO_ASSERT) assertUnregistered(ref); + changetype
(ref - HEADER_SIZE).classId = classId; // @ts-ignore: stub if (GC_IMPLEMENTED) __gc_register(ref); - return changetype(ref); + return ref; } /** Links a registered object with the (registered) object now referencing it. */ // @ts-ignore: decorator @unsafe @inline export function LINK(ref: T, parentRef: TParent): void { - ASSERT_REGISTERED(changetype(ref)); - ASSERT_REGISTERED(changetype(parentRef)); + doLink(changetype(ref), changetype(parentRef)); +} + +function doLink(ref: usize, parentRef: usize): void { + if (!ASC_NO_ASSERT) { + assertRegistered(ref); + assertRegistered(parentRef); + } // @ts-ignore: stub if (GC_IMPLEMENTED) __gc_link(changetype(ref), changetype(parentRef)); } /** Discards an unregistered object that turned out to be unnecessary. */ // @ts-ignore: decorator +@unsafe @inline export function DISCARD(ref: usize): void { - ASSERT_UNREGISTERED(ref); + doDiscard(ref); +} + +function doDiscard(ref: usize): void { + if (!ASC_NO_ASSERT) assertUnregistered(ref); memory.free(changetype(ref - HEADER_SIZE)); } @@ -142,39 +165,33 @@ export function DISCARD(ref: usize): void { // @ts-ignore: decorator @unsafe @inline export function WRAPARRAY(buffer: ArrayBuffer): T[] { - // TODO: this is quite a lot to compile inline - var array = REGISTER(ALLOCATE(offsetof())); + return changetype(doWrapArray(buffer, CLASSID(), alignof())); +} + +function doWrapArray(buffer: ArrayBuffer, classId: u32, alignLog2: usize): usize { + var array = doRegister(doAllocate(offsetof()), classId); var bufferSize = buffer.byteLength; - var newBuffer = REGISTER(ALLOCATE(bufferSize)); - changetype(array).data = newBuffer; // links + var newBuffer = doRegister(doAllocate(bufferSize), classId); + changetype(array).data = changetype(newBuffer); // links changetype(array).dataStart = changetype(newBuffer); changetype(array).dataEnd = changetype(newBuffer) + bufferSize; - store(changetype(array), (bufferSize >>> alignof()), offsetof("length_")); - if (isManaged()) { - ERROR("unexpected managed type"); // not used currently - let dataOffset: usize = 0; - while (dataOffset < bufferSize) { - let element: T = load(changetype(buffer) + dataOffset); - store(changetype(newBuffer) + dataOffset, element); - LINK(element, array); - dataOffset += sizeof(); - } - } else { - memory.copy(changetype(newBuffer), changetype(buffer), bufferSize); - } - return array; + store(changetype(array), (bufferSize >>> alignLog2), offsetof("length_")); + memory.copy(changetype(newBuffer), changetype(buffer), bufferSize); + return changetype(array); } // Helpers /** Asserts that a managed object is still unregistered. */ -function ASSERT_UNREGISTERED(ref: usize): void { +// @ts-ignore: decorator +function assertUnregistered(ref: usize): void { assert(ref > HEAP_BASE); // must be a heap object assert(changetype
(ref - HEADER_SIZE).classId == HEADER_MAGIC); } /** Asserts that a managed object has already been registered. */ -function ASSERT_REGISTERED(ref: usize): void { +// @ts-ignore: decorator +function assertRegistered(ref: usize): void { assert(ref > HEAP_BASE); // must be a heap object assert(changetype
(ref - HEADER_SIZE).classId != HEADER_MAGIC); } diff --git a/std/portable/index.d.ts b/std/portable/index.d.ts index 8ce84c9d39..3e54395fae 100644 --- a/std/portable/index.d.ts +++ b/std/portable/index.d.ts @@ -130,7 +130,7 @@ declare function fmod(x: f64, y: f64): f64; declare function fmodf(x: f32, y: f32): f32; /** Converts any other numeric value to an 8-bit signed integer. */ -declare function i8(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): i8; +declare function i8(value: any): i8; declare namespace i8 { /** Smallest representable value. */ export const MIN_VALUE: i8; @@ -142,7 +142,7 @@ declare namespace i8 { export function parseInt(string: string, radix?: i32): i8; } /** Converts any other numeric value to a 16-bit signed integer. */ -declare function i16(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): i16; +declare function i16(value: any): i16; declare namespace i16 { /** Smallest representable value. */ export const MIN_VALUE: i16; @@ -154,7 +154,7 @@ declare namespace i16 { export function parseInt(string: string, radix?: i32): i16; } /** Converts any other numeric value to a 32-bit signed integer. */ -declare function i32(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): i32; +declare function i32(value: any): i32; declare namespace i32 { /** Smallest representable value. */ export const MIN_VALUE: i32; @@ -166,7 +166,7 @@ declare namespace i32 { export function parseInt(string: string, radix?: i32): i32; } /** Converts any other numeric value to a 32-bit (in WASM32) respectivel 64-bit (in WASM64) signed integer. */ -declare function isize(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): isize; +declare function isize(value: any): isize; declare namespace isize { /** Smallest representable value. */ export const MIN_VALUE: isize; @@ -178,7 +178,7 @@ declare namespace isize { export function parseInt(string: string, radix?: i32): isize; } /** Converts any other numeric value to an 8-bit unsigned integer. */ -declare function u8(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): u8; +declare function u8(value: any): u8; declare namespace u8 { /** Smallest representable value. */ export const MIN_VALUE: u8; @@ -190,7 +190,7 @@ declare namespace u8 { export function parseInt(string: string, radix?: i32): u8; } /** Converts any other numeric value to a 16-bit unsigned integer. */ -declare function u16(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): u16; +declare function u16(value: any): u16; declare namespace u16 { /** Smallest representable value. */ export const MIN_VALUE: u16; @@ -202,7 +202,7 @@ declare namespace u16 { export function parseInt(string: string, radix?: i32): u16; } /** Converts any other numeric value to a 32-bit unsigned integer. */ -declare function u32(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): u32; +declare function u32(value: any): u32; declare namespace u32 { /** Smallest representable value. */ export const MIN_VALUE: u32; @@ -214,7 +214,7 @@ declare namespace u32 { export function parseInt(string: string, radix?: i32): u32; } /** Converts any other numeric value to a 32-bit (in WASM32) respectivel 64-bit (in WASM64) unsigned integer. */ -declare function usize(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): isize; +declare function usize(value: any): isize; declare namespace usize { /** Smallest representable value. */ export const MIN_VALUE: usize; @@ -226,7 +226,7 @@ declare namespace usize { export function parseInt(string: string, radix?: i32): usize; } /** Converts any other numeric value to a 1-bit unsigned integer. */ -declare function bool(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): bool; +declare function bool(value: any): bool; declare namespace bool { /** Smallest representable value. */ export const MIN_VALUE: bool; @@ -234,7 +234,7 @@ declare namespace bool { export const MAX_VALUE: bool; } /** Converts any other numeric value to a 32-bit float. */ -declare function f32(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): f32; +declare function f32(value: any): f32; declare namespace f32 { /** Smallest representable value. */ export const MIN_VALUE: f32; @@ -262,7 +262,7 @@ declare namespace f32 { export function parseInt(string: string, radix?: i32): f32; } /** Converts any other numeric value to a 64-bit float. */ -declare function f64(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): f64; +declare function f64(value: any): f64; declare namespace f64 { /** Smallest representable value. */ export const MIN_VALUE: f64; diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 3a475bf64f..cdf7ba4696 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1,27 +1,30 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\03") - (data (i32.const 17) "\01\02") - (data (i32.const 24) "\08\00\00\00\03") - (data (i32.const 32) "\14\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 80) "\0c") - (data (i32.const 92) "\01\00\00\00\02") - (data (i32.const 112) "P\00\00\00\03") - (data (i32.const 128) "x") - (data (i32.const 136) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 168) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\03\00\00\00\00\01\02") + (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\13\00\00\00\03") + (data (i32.const 48) "\03\00\00\00(\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") + (data (i32.const 96) "\01\00\00\00\0c\00\00\00\00\00\00\00\01\00\00\00\02") + (data (i32.const 120) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00t\00\00\00\03") + (data (i32.const 144) "\01") + (data (i32.const 152) "\04\00\00\00\10\00\00\00\98\00\00\00\98\00\00\00\98") + (data (i32.const 176) "\03\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 216) "\03\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 264) "\03\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 160)) + (global $std/array-literal/i (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 $std/array-literal/emptyArrayI32 (mut i32) (i32.const 128)) - (global $std/array-literal/i (mut i32) (i32.const 0)) (global $std/array-literal/dynamicArrayI8 (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)) @@ -29,7 +32,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -52,15 +55,15 @@ i32.add i32.const -8 i32.and - local.tee $2 + local.tee $0 current_memory - local.tee $3 + local.tee $2 i32.const 16 i32.shl i32.gt_u if - local.get $3 local.get $2 + local.get $0 local.get $1 i32.sub i32.const 65535 @@ -69,16 +72,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 + local.tee $3 + local.get $2 local.get $3 - local.get $0 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $0 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -87,23 +90,12 @@ end end end - local.get $2 + local.get $0 global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 168 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end i32.const 1 i32.const 32 local.get $0 @@ -112,584 +104,1874 @@ i32.clz i32.sub i32.shl - call $~lib/allocator/arena/__memory_allocate + call $~lib/memory/memory.allocate local.tee $1 - local.get $0 + i32.const -1520547049 i32.store local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add ) - (func $~lib/internal/memory/memset (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) - local.get $1 - i32.eqz - if - return + 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/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) 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.const 300 i32.le_u if - return + i32.const 0 + i32.const 184 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable end local.get $0 - i32.const 1 - i32.add - i32.const 0 - i32.store8 + i32.const 8 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 184 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 2 - i32.add - i32.const 0 - i32.store8 + call $~lib/runtime/assertUnregistered 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.const 8 i32.sub - i32.const 0 - i32.store8 local.get $1 - i32.const 6 - i32.le_u + i32.store + local.get $0 + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 1073741816 + i32.gt_u if - return + i32.const 0 + i32.const 224 + i32.const 24 + i32.const 43 + call $~lib/env/abort + unreachable end local.get $0 - i32.const 3 - i32.add - i32.const 0 - i32.store8 + call $~lib/runtime/doAllocate + local.tee $1 local.get $0 + call $~lib/memory/memory.fill local.get $1 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store8 + i32.const 1 + call $~lib/runtime/doRegister + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + i32.const 3 + i32.const 1073741816 local.get $1 - i32.const 8 - i32.le_u + i32.shr_u + i32.gt_u if - return + i32.const 0 + i32.const 184 + i32.const 223 + i32.const 57 + call $~lib/env/abort + unreachable end - i32.const 0 - local.get $0 - i32.sub i32.const 3 - i32.and - local.tee $2 + local.get $1 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 + local.get $0 + i32.eqz + if + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 5 + call $~lib/runtime/doRegister + local.set $0 + end local.get $0 - i32.add - local.tee $0 i32.const 0 i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + local.get $1 + i32.store + local.get $0 local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + i32.const 3 + i32.add + i32.store offset=8 + local.get $0 + ) + (func $~lib/util/memory/memcpy (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + loop $continue|0 + local.get $1 + i32.const 3 + i32.and + local.get $2 + local.get $2 + select + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|0 + end + end + local.get $0 + i32.const 3 + i32.and + i32.eqz + if + loop $continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|1 + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 8 + i32.add + local.set $0 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $1 + i32.const 4 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.add + local.set $0 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $1 + i32.const 2 + i32.add + local.set $1 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + end + return + end local.get $2 - i32.sub - i32.const -4 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + local.get $0 + i32.const 3 + i32.and + local.tee $3 + i32.const 1 + i32.ne + if + local.get $3 + i32.const 2 + i32.eq + br_if $case1|2 + local.get $3 + i32.const 3 + i32.eq + br_if $case2|2 + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.get $1 + local.tee $3 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $1 + local.set $0 + local.get $1 + local.get $3 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + loop $continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + local.get $5 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 5 + i32.add + i32.load + local.tee $5 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 9 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + local.get $5 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 13 + i32.add + i32.load + local.tee $5 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|3 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + loop $continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 2 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 6 + i32.add + i32.load + local.tee $5 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 10 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 14 + i32.add + i32.load + local.tee $5 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|4 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + loop $continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 3 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + local.get $5 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 7 + i32.add + i32.load + local.tee $5 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 11 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + local.get $5 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 15 + i32.add + i32.load + local.tee $5 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|5 + end + end + end + end + local.get $2 + i32.const 16 i32.and - local.tee $1 + if + local.get $0 + local.get $1 + local.tee $3 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $1 + local.set $0 + local.get $1 + local.get $3 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + local.tee $3 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $1 + local.set $0 + local.get $1 + local.get $3 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + local.tee $3 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $1 + local.set $0 + local.get $1 + local.get $3 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + end + ) + (func $~lib/memory/memory.copy (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $2 + local.set $3 + local.get $1 + local.get $0 + local.tee $2 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $1 + local.get $3 + i32.add + local.get $2 + i32.le_u + local.tee $0 + i32.eqz + if + local.get $2 + local.get $3 + i32.add + local.get $1 + i32.le_u + local.set $0 + end + local.get $0 + if + local.get $2 + local.get $1 + local.get $3 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $2 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $2 + i32.const 7 + i32.and + if + local.get $3 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $3 + i32.const 1 + i32.sub + local.set $3 + local.get $2 + local.tee $4 + i32.const 1 + i32.add + local.set $2 + local.get $1 + local.tee $0 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $0 + i32.load8_u + i32.store8 + br $continue|0 + end + end + loop $continue|1 + local.get $3 + i32.const 8 + i32.ge_u + if + local.get $2 + local.get $1 + i64.load + i64.store + local.get $3 + i32.const 8 + i32.sub + local.set $3 + local.get $2 + i32.const 8 + i32.add + local.set $2 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $3 + if + local.get $2 + local.tee $4 + i32.const 1 + i32.add + local.set $2 + local.get $1 + local.tee $0 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $0 + i32.load8_u + i32.store8 + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $2 + i32.const 7 + i32.and + i32.eq + if + loop $continue|3 + local.get $2 + local.get $3 + i32.add + i32.const 7 + i32.and + if + local.get $3 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $3 + i32.const 1 + i32.sub + local.tee $3 + local.get $2 + i32.add + local.get $1 + local.get $3 + i32.add + i32.load8_u + i32.store8 + br $continue|3 + end + end + loop $continue|4 + local.get $3 + i32.const 8 + i32.ge_u + if + local.get $3 + i32.const 8 + i32.sub + local.tee $3 + local.get $2 + i32.add + local.get $1 + local.get $3 + i32.add + i64.load + i64.store + br $continue|4 + end + end + end + loop $continue|5 + local.get $3 + if + local.get $3 + i32.const 1 + i32.sub + local.tee $3 + local.get $2 + i32.add + local.get $1 + local.get $3 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + ) + (func $~lib/runtime/doReallocate (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 - i32.add - i32.const 4 + i32.const 8 i32.sub - i32.const 0 - i32.store + local.tee $3 + i32.load offset=4 + local.tee $2 local.get $1 - i32.const 8 - i32.le_u + i32.lt_u if - return + 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 300 + i32.gt_u + select + i32.const 1 + i32.const 32 + local.get $1 + i32.const 7 + i32.add + i32.clz + i32.sub + i32.shl + local.tee $4 + i32.lt_u + if + local.get $4 + call $~lib/memory/memory.allocate + local.tee $4 + local.get $3 + i32.load + i32.store + local.get $4 + i32.const 8 + i32.add + local.tee $5 + local.get $0 + local.get $2 + call $~lib/memory/memory.copy + local.get $2 + local.get $5 + i32.add + local.get $1 + local.get $2 + i32.sub + call $~lib/memory/memory.fill + local.get $3 + i32.load + i32.const -1520547049 + i32.eq + if + local.get $0 + i32.const 300 + i32.le_u + if + i32.const 0 + i32.const 184 + i32.const 100 + i32.const 8 + call $~lib/env/abort + unreachable + end + end + local.get $4 + local.set $3 + local.get $5 + local.set $0 + else + local.get $0 + local.get $2 + i32.add + 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 - 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 + ) + (func $~lib/array/Array#resize (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) local.get $1 - i32.add + local.get $0 + i32.load 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 + i32.load offset=4 + i32.gt_u if - return + local.get $1 + i32.const 1073741816 + i32.gt_u + if + i32.const 0 + i32.const 272 + i32.const 37 + i32.const 41 + call $~lib/env/abort + unreachable + end + local.get $2 + local.tee $3 + local.get $1 + call $~lib/runtime/doReallocate + local.tee $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 + local.get $0 + local.get $1 + local.get $2 + i32.add + i32.store offset=8 + end end + ) + (func $~lib/array/Array#__set (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) 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 + local.get $1 + i32.const 1 i32.add - i32.const 0 - i32.store + call $~lib/array/Array#resize + local.get $1 local.get $0 - i32.const 24 + i32.load offset=4 i32.add - i32.const 0 - i32.store + local.get $2 + i32.store8 + local.get $1 local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $~lib/array/Array#resize (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) 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 + i32.load local.tee $2 - local.get $0 - i32.add - local.set $0 - local.get $1 - local.get $2 + i32.const 8 i32.sub - local.set $1 - loop $continue|0 + i32.load offset=4 + i32.const 2 + i32.shr_u + i32.gt_u + if local.get $1 - i32.const 32 - i32.ge_u + i32.const 268435454 + i32.gt_u + if + i32.const 0 + i32.const 272 + i32.const 37 + i32.const 41 + call $~lib/env/abort + unreachable + end + local.get $2 + local.tee $3 + local.get $1 + i32.const 2 + i32.shl + local.tee $2 + call $~lib/runtime/doReallocate + local.tee $1 + local.get $3 + i32.ne if local.get $0 - 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 $1 + i32.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 + i32.store offset=4 local.get $0 - i32.const 32 + local.get $1 + local.get $2 i32.add - local.set $0 - br $continue|0 + i32.store offset=8 end end ) - (func $~lib/array/Array#constructor (; 4 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $1 - i32.const 8 - call $~lib/allocator/arena/__memory_allocate - local.tee $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 + (func $~lib/array/Array#__set (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 - i32.store + i32.const 1 + i32.add + call $~lib/array/Array#resize local.get $0 - i32.const 3 - i32.store offset=4 + i32.load offset=4 local.get $1 - i32.const 8 + i32.const 2 + i32.shl i32.add - i32.const 3 - call $~lib/internal/memory/memset + local.get $2 + i32.store + local.get $1 local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end ) - (func $~lib/array/Array#constructor (; 5 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - (local $1 i32) - i32.const 12 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $1 - i32.const 8 - call $~lib/allocator/arena/__memory_allocate - local.tee $0 + (func $std/array-literal/Ref#constructor (; 15 ;) (type $FUNCSIG$i) (result i32) i32.const 0 - i32.store - local.get $0 + call $~lib/runtime/doAllocate + i32.const 6 + call $~lib/runtime/doRegister + ) + (func $std/array-literal/RefWithCtor#constructor (; 16 ;) (type $FUNCSIG$i) (result i32) i32.const 0 - i32.store offset=4 - local.get $0 - local.get $1 - i32.store - local.get $0 - i32.const 3 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - i32.const 12 - call $~lib/internal/memory/memset - local.get $0 + call $~lib/runtime/doAllocate + i32.const 8 + call $~lib/runtime/doRegister ) - (func $start:std/array-literal (; 6 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 17 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - i32.const 232 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - i32.const 28 + i32.const 44 i32.load i32.const 3 i32.ne if i32.const 0 - i32.const 32 + i32.const 56 i32.const 4 i32.const 0 call $~lib/env/abort unreachable end - i32.const 0 - i32.const 24 - i32.load - local.tee $0 + i32.const 36 i32.load - i32.lt_u - if (result i32) - local.get $0 - i32.load8_s offset=8 - else - unreachable - end - i32.const 255 - i32.and + i32.load8_s if i32.const 0 - i32.const 32 + i32.const 56 i32.const 5 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1 - i32.const 24 + i32.const 36 i32.load - local.tee $0 - i32.load - i32.lt_u - if (result i32) - local.get $0 - i32.const 1 - i32.add - i32.load8_s offset=8 - else - unreachable - end - i32.const 255 - i32.and + i32.load8_s offset=1 i32.const 1 i32.ne if i32.const 0 - i32.const 32 + i32.const 56 i32.const 6 i32.const 0 call $~lib/env/abort unreachable end - i32.const 2 - i32.const 24 - i32.load - local.tee $0 + i32.const 36 i32.load - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.add - i32.load8_s offset=8 - else - unreachable - end - i32.const 255 - i32.and + i32.load8_s offset=2 i32.const 2 i32.ne if i32.const 0 - i32.const 32 + i32.const 56 i32.const 7 i32.const 0 call $~lib/env/abort unreachable end - i32.const 116 + i32.const 140 i32.load i32.const 3 i32.ne if i32.const 0 - i32.const 32 + i32.const 56 i32.const 10 i32.const 0 call $~lib/env/abort unreachable end - i32.const 0 - i32.const 112 + i32.const 132 i32.load - local.tee $0 i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end if i32.const 0 - i32.const 32 + i32.const 56 i32.const 11 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1 - i32.const 112 + i32.const 132 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 i32.const 1 i32.ne if i32.const 0 - i32.const 32 + i32.const 56 i32.const 12 i32.const 0 call $~lib/env/abort unreachable end - i32.const 2 - i32.const 112 - i32.load - local.tee $0 + i32.const 132 i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=8 i32.const 2 i32.ne if i32.const 0 - i32.const 32 + i32.const 56 i32.const 13 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array-literal/emptyArrayI32 - i32.load offset=4 + i32.load offset=12 if i32.const 0 - i32.const 32 + i32.const 56 i32.const 16 i32.const 0 call $~lib/env/abort unreachable end - call $~lib/array/Array#constructor + i32.const 304 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 2 + call $~lib/runtime/doRegister + i32.const 0 + call $~lib/runtime/ArrayBufferView#constructor local.tee $0 - i32.load + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 3 + i32.store offset=12 + local.get $0 + i32.const 0 + global.get $std/array-literal/i + call $~lib/array/Array#__set global.get $std/array-literal/i - local.tee $1 - i32.store8 offset=8 - local.get $1 i32.const 1 i32.add global.set $std/array-literal/i local.get $0 - i32.load i32.const 1 - i32.add global.get $std/array-literal/i - local.tee $1 - i32.store8 offset=8 - local.get $1 + call $~lib/array/Array#__set + global.get $std/array-literal/i i32.const 1 i32.add global.set $std/array-literal/i local.get $0 - i32.load i32.const 2 - i32.add global.get $std/array-literal/i - i32.store8 offset=8 + call $~lib/array/Array#__set local.get $0 global.set $std/array-literal/dynamicArrayI8 global.get $std/array-literal/dynamicArrayI8 - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if i32.const 0 - i32.const 32 + i32.const 56 i32.const 21 i32.const 0 call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array-literal/dynamicArrayI8 - i32.load - local.tee $0 - i32.load - i32.lt_u - if (result i32) - local.get $0 - i32.load8_s offset=8 - else - unreachable - end - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_s if i32.const 0 - i32.const 32 + i32.const 56 i32.const 22 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array-literal/dynamicArrayI8 - i32.load - local.tee $0 - i32.load - i32.lt_u - if (result i32) - local.get $0 - i32.const 1 - i32.add - i32.load8_s offset=8 - else - unreachable - end - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_s offset=1 i32.const 1 i32.ne if i32.const 0 - i32.const 32 + i32.const 56 i32.const 23 i32.const 0 call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array-literal/dynamicArrayI8 - i32.load - local.tee $0 - i32.load - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.add - i32.load8_s offset=8 - else - unreachable - end - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_s offset=2 i32.const 2 i32.ne if i32.const 0 - i32.const 32 + i32.const 56 i32.const 24 i32.const 0 call $~lib/env/abort @@ -697,208 +1979,170 @@ end i32.const 0 global.set $std/array-literal/i - call $~lib/array/Array#constructor + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 4 + call $~lib/runtime/doRegister + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor local.tee $0 - i32.load + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 3 + i32.store offset=12 + local.get $0 + i32.const 0 + global.get $std/array-literal/i + call $~lib/array/Array#__set global.get $std/array-literal/i - local.tee $1 - i32.store offset=8 - local.get $1 i32.const 1 i32.add global.set $std/array-literal/i local.get $0 - i32.load - i32.const 4 - i32.add + i32.const 1 + global.get $std/array-literal/i + call $~lib/array/Array#__set global.get $std/array-literal/i - local.tee $1 - i32.store offset=8 - local.get $1 i32.const 1 i32.add global.set $std/array-literal/i local.get $0 - i32.load - i32.const 8 - i32.add + i32.const 2 global.get $std/array-literal/i - i32.store offset=8 + call $~lib/array/Array#__set local.get $0 global.set $std/array-literal/dynamicArrayI32 global.get $std/array-literal/dynamicArrayI32 - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if i32.const 0 - i32.const 32 + i32.const 56 i32.const 29 i32.const 0 call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array-literal/dynamicArrayI32 + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end if i32.const 0 - i32.const 32 + i32.const 56 i32.const 30 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array-literal/dynamicArrayI32 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=4 i32.const 1 i32.ne if i32.const 0 - i32.const 32 + i32.const 56 i32.const 31 i32.const 0 call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array-literal/dynamicArrayI32 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=8 i32.const 2 i32.ne if i32.const 0 - i32.const 32 + i32.const 56 i32.const 32 i32.const 0 call $~lib/env/abort unreachable end - call $~lib/array/Array#constructor - local.set $0 + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 7 + call $~lib/runtime/doRegister + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $0 i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $1 + i32.store offset=12 local.get $0 - i32.load - local.get $1 - i32.store offset=8 - i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $1 + i32.const 3 + i32.store offset=12 local.get $0 - i32.load - i32.const 4 - i32.add - local.get $1 - i32.store offset=8 i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $1 + call $std/array-literal/Ref#constructor + call $~lib/array/Array#__set local.get $0 - i32.load - i32.const 8 - i32.add - local.get $1 - i32.store offset=8 + i32.const 1 + call $std/array-literal/Ref#constructor + call $~lib/array/Array#__set + local.get $0 + i32.const 2 + call $std/array-literal/Ref#constructor + call $~lib/array/Array#__set local.get $0 global.set $std/array-literal/dynamicArrayRef global.get $std/array-literal/dynamicArrayRef - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if i32.const 0 - i32.const 32 + i32.const 56 i32.const 36 i32.const 0 call $~lib/env/abort unreachable end - call $~lib/array/Array#constructor - local.set $0 + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 9 + call $~lib/runtime/doRegister + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $0 i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $1 + i32.store offset=12 local.get $0 - i32.load - local.get $1 - i32.store offset=8 - i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $1 + i32.const 3 + i32.store offset=12 local.get $0 - i32.load - i32.const 4 - i32.add - local.get $1 - i32.store offset=8 i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $1 + call $std/array-literal/RefWithCtor#constructor + call $~lib/array/Array#__set local.get $0 - i32.load - i32.const 8 - i32.add - local.get $1 - i32.store offset=8 + i32.const 1 + call $std/array-literal/RefWithCtor#constructor + call $~lib/array/Array#__set + local.get $0 + i32.const 2 + call $std/array-literal/RefWithCtor#constructor + call $~lib/array/Array#__set local.get $0 global.set $std/array-literal/dynamicArrayRefWithCtor global.get $std/array-literal/dynamicArrayRefWithCtor - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if i32.const 0 - i32.const 32 + i32.const 56 i32.const 40 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 7 ;) (type $FUNCSIG$v) + (func $start (; 18 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 19 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 20a25ad54f..5dd1c8703a 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -1,119 +1,58 @@ (module - (type $FUNCSIG$v (func)) + (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\03\00\00\00\00\00\00\00\00\01\02\00\00\00\00\00") - (data (i32.const 24) "\08\00\00\00\03\00\00\00") - (data (i32.const 32) "\14\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 80) "\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 112) "P\00\00\00\03\00\00\00") - (data (i32.const 120) "\00\00\00\00\00\00\00\00") - (data (i32.const 128) "x\00\00\00\00\00\00\00") - (data (i32.const 136) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 168) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\03\00\00\00\00\01\02") + (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\13\00\00\00\03\00\00\00") + (data (i32.const 48) "\03\00\00\00(\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") + (data (i32.const 96) "\01\00\00\00\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 120) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00t\00\00\00\03\00\00\00") + (data (i32.const 144) "\01\00\00\00\00\00\00\00") + (data (i32.const 152) "\04\00\00\00\10\00\00\00\98\00\00\00\98\00\00\00\98\00\00\00\00\00\00\00") + (data (i32.const 176) "\03\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 216) "\03\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 264) "\03\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $std/array-literal/staticArrayI8 i32 (i32.const 32)) + (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 $std/array-literal/staticArrayI32 i32 (i32.const 128)) + (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 160)) + (global $std/array-literal/i (mut i32) (i32.const 0)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $std/array-literal/staticArrayI8 i32 (i32.const 24)) - (global $std/array-literal/staticArrayI32 i32 (i32.const 112)) - (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 128)) - (global $std/array-literal/i (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/array-literal/dynamicArrayI8 (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/dynamicArrayRefWithCtor (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 228)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 300)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $~lib/array/Array#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 0 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 0 - i32.shl - i32.add - local.get $5 - i32.add - i32.load8_s offset=8 - else - unreachable - end + i32.load offset=12 ) - (func $~lib/array/Array#__get (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#get:length (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=12 ) - (func $~lib/internal/arraybuffer/computeSize (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/adjustToBlock (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - i32.const 8 + global.get $~lib/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -121,897 +60,2692 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 + return ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 168 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end + call $~lib/runtime/adjustToBlock + call $~lib/memory/memory.allocate local.set $1 local.get $1 - local.get $0 + global.get $~lib/runtime/HEADER_MAGIC i32.store local.get $1 - ) - (func $~lib/memory/memory.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate - return + i32.store offset=4 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add ) - (func $~lib/internal/memory/memset (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $0 + local.set $3 + local.get $1 + local.set $4 + local.get $2 + local.set $5 + local.get $5 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 1 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 1 + i32.add + local.get $4 + i32.store8 + local.get $3 + i32.const 2 + i32.add + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 2 + i32.sub + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 3 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 3 + i32.add + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $3 + i32.sub + i32.const 3 + i32.and + local.set $6 + local.get $3 + local.get $6 + i32.add + local.set $3 + local.get $5 + local.get $6 + i32.sub + local.set $5 + local.get $5 + i32.const -4 + i32.and + local.set $5 + i32.const -1 + i32.const 255 + i32.div_u + local.get $4 + i32.const 255 + i32.and + i32.mul + local.set $7 + local.get $3 + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 4 + i32.sub + local.get $7 + i32.store + local.get $5 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 4 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 8 + i32.add + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 12 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 8 + i32.sub + local.get $7 + i32.store + local.get $5 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 12 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 16 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 20 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 24 + i32.add + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 28 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 24 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 20 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 16 + i32.sub + local.get $7 + i32.store + i32.const 24 + local.get $3 + i32.const 4 + i32.and + i32.add + local.set $6 + local.get $3 + local.get $6 + i32.add + local.set $3 + local.get $5 + local.get $6 + i32.sub + local.set $5 + local.get $7 + i64.extend_i32_u + local.get $7 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $8 + block $break|0 + loop $continue|0 + local.get $5 + i32.const 32 + i32.ge_u + if + block + local.get $3 + local.get $8 + i64.store + local.get $3 + i32.const 8 + i32.add + local.get $8 + i64.store + local.get $3 + i32.const 16 + i32.add + local.get $8 + i64.store + local.get $3 + i32.const 24 + i32.add + local.get $8 + i64.store + local.get $5 + i32.const 32 + i32.sub + local.set $5 + local.get $3 + i32.const 32 + i32.add + local.set $3 + end + br $continue|0 + end + end + end + end + ) + (func $~lib/runtime/assertUnregistered (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 184 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end local.get $0 - local.get $2 - i32.add - i32.const 12 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 184 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE i32.sub - local.get $4 + local.get $1 i32.store local.get $0 + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH + i32.gt_u + if + i32.const 0 + i32.const 224 + i32.const 24 + i32.const 43 + call $~lib/env/abort + unreachable + end + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end + local.set $3 + local.get $3 + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + block $~lib/runtime/REGISTER|inlined.0 (result i32) + local.get $3 + local.set $2 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister + end + ) + (func $~lib/runtime/ALLOCATE (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/doAllocate + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 184 + i32.const 223 + i32.const 57 + call $~lib/env/abort + unreachable + end + i32.const 0 + local.get $1 + local.get $2 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $3 + block (result i32) + local.get $0 + i32.eqz + if + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $4 + local.get $4 + i32.const 5 + call $~lib/runtime/doRegister + end + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + end + local.get $3 + i32.store + local.get $0 + local.get $3 + i32.store offset=4 + local.get $0 + local.get $3 + local.get $1 + i32.add + i32.store offset=8 + local.get $0 + ) + (func $~lib/array/Array#constructor (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 2 + call $~lib/runtime/doRegister + end + local.get $1 + i32.const 0 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/util/memory/memcpy (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $break|0 + loop $continue|0 + local.get $2 + if (result i32) + local.get $1 + i32.const 3 + i32.and + else + local.get $2 + end + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|0 + end + end + end + local.get $0 + i32.const 3 + i32.and + i32.const 0 + i32.eq + if + block $break|1 + loop $continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + block + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|1 + end + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.set $0 + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $0 + i32.const 2 + i32.add + local.set $0 + local.get $1 + i32.const 2 + i32.add + local.set $1 + end + local.get $2 + i32.const 1 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + block $case0|2 + local.get $0 + i32.const 3 + i32.and + local.set $5 + local.get $5 + i32.const 1 + i32.eq + br_if $case0|2 + local.get $5 + i32.const 2 + i32.eq + br_if $case1|2 + local.get $5 + i32.const 3 + i32.eq + br_if $case2|2 + br $break|2 + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + block $break|3 + loop $continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + block + local.get $1 + i32.const 1 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 5 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 9 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 13 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|3 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + block $break|4 + loop $continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + block + local.get $1 + i32.const 2 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 6 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 10 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 14 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|4 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block $break|5 + loop $continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + block + local.get $1 + i32.const 3 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 7 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 11 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 15 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|5 + end + end + end + br $break|2 + unreachable + end + unreachable + end + end + local.get $2 + i32.const 16 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store + i32.const 4 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end local.get $2 - i32.const 24 - i32.le_u + i32.const 2 + i32.and if - return + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store + i32.const 1 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + ) + (func $~lib/memory/memory.copy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.set $3 + local.get $1 + local.set $4 + local.get $2 + local.set $5 + local.get $3 + local.get $4 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $4 + local.get $5 + i32.add + local.get $3 + i32.le_u + local.tee $6 + if (result i32) + local.get $6 + else + local.get $3 + local.get $5 + i32.add + local.get $4 + i32.le_u + end + if + local.get $3 + local.get $4 + local.get $5 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $3 + local.get $4 + i32.lt_u + if + local.get $4 + i32.const 7 + i32.and + local.get $3 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $3 + i32.const 7 + i32.and + if + block + local.get $5 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $5 + i32.const 1 + i32.sub + local.set $5 + block (result i32) + local.get $3 + local.tee $6 + i32.const 1 + i32.add + local.set $3 + local.get $6 + end + block (result i32) + local.get $4 + local.tee $6 + i32.const 1 + i32.add + local.set $4 + local.get $6 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $5 + i32.const 8 + i32.ge_u + if + block + local.get $3 + local.get $4 + i64.load + i64.store + local.get $5 + i32.const 8 + i32.sub + local.set $5 + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $4 + i32.const 8 + i32.add + local.set $4 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $5 + if + block + block (result i32) + local.get $3 + local.tee $6 + i32.const 1 + i32.add + local.set $3 + local.get $6 + end + block (result i32) + local.get $4 + local.tee $6 + i32.const 1 + i32.add + local.set $4 + local.get $6 + end + i32.load8_u + i32.store8 + local.get $5 + i32.const 1 + i32.sub + local.set $5 + end + br $continue|2 + end + end + end + else + local.get $4 + i32.const 7 + i32.and + local.get $3 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $3 + local.get $5 + i32.add + i32.const 7 + i32.and + if + block + local.get $5 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $3 + local.get $5 + i32.const 1 + i32.sub + local.tee $5 + i32.add + local.get $4 + local.get $5 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $5 + i32.const 8 + i32.ge_u + if + block + local.get $5 + i32.const 8 + i32.sub + local.set $5 + local.get $3 + local.get $5 + i32.add + local.get $4 + local.get $5 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $5 + if + local.get $3 + local.get $5 + i32.const 1 + i32.sub + local.tee $5 + i32.add + local.get $4 + local.get $5 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + end + ) + (func $~lib/memory/memory.free (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store + local.set $1 + ) + (func $~lib/runtime/doReallocate (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $0 - local.get $2 - i32.add - i32.const 20 + global.get $~lib/runtime/HEADER_SIZE i32.sub - local.get $4 - i32.store - local.get $0 + local.set $2 local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add + i32.load offset=4 local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 + local.get $1 + i32.lt_u + if + local.get $1 + call $~lib/runtime/adjustToBlock + local.set $4 + local.get $3 + call $~lib/runtime/adjustToBlock + i32.const 0 + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + select + local.get $4 + i32.lt_u + if + local.get $4 + call $~lib/memory/memory.allocate + local.set $5 + local.get $5 local.get $2 - i32.const 32 - i32.ge_u + i32.load + i32.store + local.get $5 + global.get $~lib/runtime/HEADER_SIZE + i32.add + local.set $6 + local.get $6 + local.get $0 + local.get $3 + call $~lib/memory/memory.copy + local.get $6 + local.get $3 + i32.add + i32.const 0 + local.get $1 + local.get $3 + i32.sub + call $~lib/memory/memory.fill + local.get $2 + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq if - block - local.get $0 - local.get $5 - i64.store - local.get $0 + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 184 + i32.const 100 i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 + call $~lib/env/abort + unreachable end - br $continue|0 + local.get $2 + call $~lib/memory/memory.free + else + nop end + local.get $5 + local.set $2 + local.get $6 + local.set $0 + else + local.get $0 + local.get $3 + i32.add + i32.const 0 + local.get $1 + local.get $3 + i32.sub + call $~lib/memory/memory.fill end + else + nop end + local.get $2 + local.get $1 + i32.store offset=4 + local.get $0 ) - (func $~lib/array/Array#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#resize (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) + local.get $0 + i32.load + local.set $2 + local.get $2 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 0 + i32.shr_u + local.set $3 local.get $1 - i32.const 1073741816 + local.get $3 i32.gt_u if + local.get $1 + i32.const 1073741816 + i32.gt_u + if + i32.const 0 + i32.const 272 + i32.const 37 + i32.const 41 + call $~lib/env/abort + unreachable + end + local.get $1 i32.const 0 - i32.const 136 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable + i32.shl + local.set $4 + block $~lib/runtime/REALLOCATE|inlined.0 (result i32) + local.get $2 + local.set $5 + local.get $4 + local.set $6 + local.get $5 + local.get $6 + call $~lib/runtime/doReallocate + end + local.set $6 + local.get $6 + local.get $2 + i32.ne + if + local.get $0 + local.get $6 + i32.store + local.get $0 + local.get $6 + i32.store offset=4 + local.get $0 + local.get $6 + local.get $4 + i32.add + i32.store offset=8 + end end + ) + (func $~lib/array/Array#__set (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + call $~lib/array/Array#resize + local.get $0 + i32.load offset=4 local.get $1 i32.const 0 i32.shl - local.set $2 + i32.add local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 + i32.store8 + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 end - local.get $3 - i32.store + ) + (func $~lib/array/Array#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.0 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset + i32.const 4 + call $~lib/runtime/doRegister end + local.get $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#__unchecked_set (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#resize (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $0 i32.load + local.set $2 + local.get $2 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 2 + i32.shr_u local.set $3 local.get $1 - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 local.get $3 - local.get $4 - i32.const 0 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store8 offset=8 - ) - (func $~lib/array/Array#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 268435454 i32.gt_u if - i32.const 0 - i32.const 136 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz + local.get $1 + i32.const 268435454 + i32.gt_u if - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 + i32.const 0 + i32.const 272 + i32.const 37 + i32.const 41 + call $~lib/env/abort + unreachable end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - end - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.1 - local.get $3 - i32.const 8 - i32.add + local.get $1 + i32.const 2 + i32.shl local.set $4 - i32.const 0 - local.set $5 - local.get $2 + block $~lib/runtime/REALLOCATE|inlined.1 (result i32) + local.get $2 + local.set $5 + local.get $4 + local.set $6 + local.get $5 + local.get $6 + call $~lib/runtime/doReallocate + end local.set $6 - local.get $4 - local.get $5 local.get $6 - call $~lib/internal/memory/memset + local.get $2 + i32.ne + if + local.get $0 + local.get $6 + i32.store + local.get $0 + local.get $6 + i32.store offset=4 + local.get $0 + local.get $6 + local.get $4 + i32.add + i32.store offset=8 + end end - local.get $0 ) - (func $~lib/array/Array#__unchecked_set (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/array/Array#__set (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 - i32.load - local.set $3 local.get $1 - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 - local.get $3 - local.get $4 + i32.const 1 + i32.add + call $~lib/array/Array#resize + local.get $0 + i32.load offset=4 + local.get $1 i32.const 2 i32.shl i32.add - local.get $6 - i32.add - local.get $5 - i32.store offset=8 + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end ) - (func $std/array-literal/Ref#constructor (; 13 ;) (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.get $0 i32.eqz if - i32.const 0 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 0 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 6 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 ) - (func $~lib/array/Array#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 7 + call $~lib/runtime/doRegister + end + local.get $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/array/Array#resize (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 136 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl + local.get $0 + i32.load local.set $2 local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 2 + i32.shr_u local.set $3 - block (result i32) - local.get $0 - i32.eqz + local.get $1 + local.get $3 + i32.gt_u + if + local.get $1 + i32.const 268435454 + i32.gt_u if - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 + i32.const 0 + i32.const 272 + i32.const 37 + i32.const 41 + call $~lib/env/abort + unreachable end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - end - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.2 - local.get $3 - i32.const 8 - i32.add + local.get $1 + i32.const 2 + i32.shl local.set $4 - i32.const 0 - local.set $5 - local.get $2 + block $~lib/runtime/REALLOCATE|inlined.2 (result i32) + local.get $2 + local.set $5 + local.get $4 + local.set $6 + local.get $5 + local.get $6 + call $~lib/runtime/doReallocate + end local.set $6 - local.get $4 - local.get $5 local.get $6 - call $~lib/internal/memory/memset + local.get $2 + i32.ne + if + local.get $0 + local.get $6 + i32.store + local.get $0 + local.get $6 + i32.store offset=4 + local.get $0 + local.get $6 + local.get $4 + i32.add + i32.store offset=8 + end end - local.get $0 ) - (func $~lib/array/Array#__unchecked_set (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/array/Array#__set (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 - i32.load - local.set $3 local.get $1 - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 - local.get $3 - local.get $4 + i32.const 1 + i32.add + call $~lib/array/Array#resize + local.get $0 + i32.load offset=4 + local.get $1 i32.const 2 i32.shl i32.add - local.get $6 - i32.add - local.get $5 - i32.store offset=8 + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end ) - (func $std/array-literal/RefWithCtor#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $std/array-literal/RefWithCtor#constructor (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.eqz if - i32.const 0 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 0 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 8 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 ) - (func $~lib/array/Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 136 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 9 + call $~lib/runtime/doRegister end local.get $1 i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - end - local.get $3 - i32.store + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 local.get $0 local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.3 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end + i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#__unchecked_set (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#resize (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $0 i32.load + local.set $2 + local.get $2 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 2 + i32.shr_u local.set $3 local.get $1 - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 local.get $3 - local.get $4 + i32.gt_u + if + local.get $1 + i32.const 268435454 + i32.gt_u + if + i32.const 0 + i32.const 272 + i32.const 37 + i32.const 41 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.set $4 + block $~lib/runtime/REALLOCATE|inlined.3 (result i32) + local.get $2 + local.set $5 + local.get $4 + local.set $6 + local.get $5 + local.get $6 + call $~lib/runtime/doReallocate + end + local.set $6 + local.get $6 + local.get $2 + i32.ne + if + local.get $0 + local.get $6 + i32.store + local.get $0 + local.get $6 + i32.store offset=4 + local.get $0 + local.get $6 + local.get $4 + i32.add + i32.store offset=8 + end + end + ) + (func $~lib/array/Array#__set (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + call $~lib/array/Array#resize + local.get $0 + i32.load offset=4 + local.get $1 i32.const 2 i32.shl i32.add - local.get $6 - i32.add - local.get $5 - i32.store offset=8 + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $~lib/array/Array#get:length (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 ) - (func $start:std/array-literal (; 19 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 33 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - call $start:~lib/allocator/arena - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/array-literal/staticArrayI8 - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array-literal/staticArrayI8 + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 56 i32.const 4 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array-literal/staticArrayI8 - i32.const 0 - call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.load offset=4 + i32.load8_s i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 56 i32.const 5 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array-literal/staticArrayI8 - i32.const 1 - call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.load offset=4 + i32.load8_s offset=1 i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 56 i32.const 6 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array-literal/staticArrayI8 - i32.const 2 - call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.load offset=4 + i32.load8_s offset=2 i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 56 i32.const 7 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/array-literal/staticArrayI32 - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array-literal/staticArrayI32 + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 56 i32.const 10 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array-literal/staticArrayI32 - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 56 i32.const 11 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array-literal/staticArrayI32 - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 56 i32.const 12 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array-literal/staticArrayI32 - i32.const 2 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=8 i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 56 i32.const 13 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.1 (result i32) - global.get $std/array-literal/emptyArrayI32 - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array-literal/emptyArrayI32 + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 56 i32.const 16 i32.const 0 call $~lib/env/abort unreachable end + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset block (result i32) i32.const 0 i32.const 3 call $~lib/array/Array#constructor - local.set $1 - local.get $1 + local.set $0 + local.get $0 i32.const 0 global.get $std/array-literal/i - call $~lib/array/Array#__unchecked_set - local.get $1 + call $~lib/array/Array#__set + local.get $0 i32.const 1 block (result i32) global.get $std/array-literal/i @@ -1020,8 +2754,8 @@ global.set $std/array-literal/i global.get $std/array-literal/i end - call $~lib/array/Array#__unchecked_set - local.get $1 + call $~lib/array/Array#__set + local.get $0 i32.const 2 block (result i32) global.get $std/array-literal/i @@ -1030,76 +2764,60 @@ global.set $std/array-literal/i global.get $std/array-literal/i end - call $~lib/array/Array#__unchecked_set - local.get $1 + call $~lib/array/Array#__set + local.get $0 end global.set $std/array-literal/dynamicArrayI8 - block $~lib/array/Array#get:length|inlined.1 (result i32) - global.get $std/array-literal/dynamicArrayI8 - local.set $1 - local.get $1 - i32.load offset=4 - end + global.get $std/array-literal/dynamicArrayI8 + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 56 i32.const 21 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array-literal/dynamicArrayI8 - i32.const 0 - call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.load offset=4 + i32.load8_s i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 56 i32.const 22 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array-literal/dynamicArrayI8 - i32.const 1 - call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.load offset=4 + i32.load8_s offset=1 i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 56 i32.const 23 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array-literal/dynamicArrayI8 - i32.const 2 - call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.load offset=4 + i32.load8_s offset=2 i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 56 i32.const 24 i32.const 0 call $~lib/env/abort @@ -1111,12 +2829,12 @@ i32.const 0 i32.const 3 call $~lib/array/Array#constructor - local.set $2 - local.get $2 + local.set $1 + local.get $1 i32.const 0 global.get $std/array-literal/i - call $~lib/array/Array#__unchecked_set - local.get $2 + call $~lib/array/Array#__set + local.get $1 i32.const 1 block (result i32) global.get $std/array-literal/i @@ -1125,8 +2843,8 @@ global.set $std/array-literal/i global.get $std/array-literal/i end - call $~lib/array/Array#__unchecked_set - local.get $2 + call $~lib/array/Array#__set + local.get $1 i32.const 2 block (result i32) global.get $std/array-literal/i @@ -1135,64 +2853,60 @@ global.set $std/array-literal/i global.get $std/array-literal/i end - call $~lib/array/Array#__unchecked_set - local.get $2 + call $~lib/array/Array#__set + local.get $1 end global.set $std/array-literal/dynamicArrayI32 - block $~lib/array/Array#get:length|inlined.2 (result i32) - global.get $std/array-literal/dynamicArrayI32 - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/array-literal/dynamicArrayI32 + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 56 i32.const 29 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array-literal/dynamicArrayI32 - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 56 i32.const 30 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array-literal/dynamicArrayI32 - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 56 i32.const 31 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array-literal/dynamicArrayI32 - i32.const 2 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=8 i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 56 i32.const 32 i32.const 0 call $~lib/env/abort @@ -1202,37 +2916,33 @@ i32.const 0 i32.const 3 call $~lib/array/Array#constructor - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.const 0 i32.const 0 call $std/array-literal/Ref#constructor - call $~lib/array/Array#__unchecked_set - local.get $3 + call $~lib/array/Array#__set + local.get $2 i32.const 1 i32.const 0 call $std/array-literal/Ref#constructor - call $~lib/array/Array#__unchecked_set - local.get $3 + call $~lib/array/Array#__set + local.get $2 i32.const 2 i32.const 0 call $std/array-literal/Ref#constructor - call $~lib/array/Array#__unchecked_set - local.get $3 + call $~lib/array/Array#__set + local.get $2 end global.set $std/array-literal/dynamicArrayRef - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/array-literal/dynamicArrayRef - local.set $3 - local.get $3 - i32.load offset=4 - end + global.get $std/array-literal/dynamicArrayRef + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 56 i32.const 36 i32.const 0 call $~lib/env/abort @@ -1242,46 +2952,42 @@ i32.const 0 i32.const 3 call $~lib/array/Array#constructor - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 0 call $std/array-literal/RefWithCtor#constructor - call $~lib/array/Array#__unchecked_set - local.get $4 + call $~lib/array/Array#__set + local.get $3 i32.const 1 i32.const 0 call $std/array-literal/RefWithCtor#constructor - call $~lib/array/Array#__unchecked_set - local.get $4 + call $~lib/array/Array#__set + local.get $3 i32.const 2 i32.const 0 call $std/array-literal/RefWithCtor#constructor - call $~lib/array/Array#__unchecked_set - local.get $4 + call $~lib/array/Array#__set + local.get $3 end global.set $std/array-literal/dynamicArrayRefWithCtor - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/array-literal/dynamicArrayRefWithCtor - local.set $4 - local.get $4 - i32.load offset=4 - end + global.get $std/array-literal/dynamicArrayRefWithCtor + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 56 i32.const 40 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 20 ;) (type $FUNCSIG$v) + (func $start (; 34 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 21 ;) (type $FUNCSIG$v) + (func $null (; 35 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index b627392d38..3cefcded38 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) @@ -23,9 +23,9 @@ (type $FUNCSIG$vid (func (param i32 f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 48) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 96) "\01\00\00\00\14\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s") + (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 48) "\02\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 96) "\02\00\00\00\14\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -95,7 +95,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/ALLOCATE (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -116,14 +116,14 @@ i32.const 8 i32.add ) - (func $~lib/runtime/ASSERT_UNREGISTERED (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 124 i32.le_u if i32.const 0 i32.const 16 - i32.const 172 + i32.const 188 i32.const 2 call $~lib/env/abort unreachable @@ -137,13 +137,23 @@ if i32.const 0 i32.const 16 - i32.const 173 + i32.const 189 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/runtime/doRegister (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + i32.const 8 + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -354,7 +364,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741816 @@ -368,20 +378,15 @@ unreachable end local.get $0 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate local.tee $1 local.get $0 call $~lib/memory/memory.fill local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - i32.const 8 - i32.sub i32.const 3 - i32.store - local.get $1 + call $~lib/runtime/doRegister ) - (func $~lib/map/Map#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -403,18 +408,13 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate + i32.const 1 + call $~lib/runtime/doRegister local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub - i32.const 2 - i32.store - local.get $0 i32.const 0 i32.store local.get $0 @@ -436,7 +436,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -481,7 +481,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -497,7 +497,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -601,7 +601,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -700,7 +700,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -721,7 +721,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -788,7 +788,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 14 ;) (type $FUNCSIG$v) + (func $std/map/test (; 15 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -1132,18 +1132,13 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 15 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 16 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE - local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub + call $~lib/runtime/doAllocate i32.const 4 - i32.store - local.get $0 + call $~lib/runtime/doRegister + local.tee $0 i32.const 0 i32.store local.get $0 @@ -1165,7 +1160,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#has (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1179,7 +1174,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1283,7 +1278,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1380,7 +1375,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1399,7 +1394,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -1464,7 +1459,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 21 ;) (type $FUNCSIG$v) + (func $std/map/test (; 22 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -1794,18 +1789,13 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 22 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 23 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE - local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub + call $~lib/runtime/doAllocate i32.const 5 - i32.store - local.get $0 + call $~lib/runtime/doRegister + local.tee $0 i32.const 0 i32.store local.get $0 @@ -1827,7 +1817,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -1872,7 +1862,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1897,7 +1887,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2010,7 +2000,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2118,7 +2108,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2148,7 +2138,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2224,7 +2214,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 29 ;) (type $FUNCSIG$v) + (func $std/map/test (; 30 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -2568,18 +2558,13 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 30 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 31 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE - local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub + call $~lib/runtime/doAllocate i32.const 6 - i32.store - local.get $0 + call $~lib/runtime/doRegister + local.tee $0 i32.const 0 i32.store local.get $0 @@ -2601,7 +2586,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#has (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2624,7 +2609,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2737,7 +2722,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2843,7 +2828,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2871,7 +2856,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2945,7 +2930,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 36 ;) (type $FUNCSIG$v) + (func $std/map/test (; 37 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -3275,18 +3260,13 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 37 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 38 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE - local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub + call $~lib/runtime/doAllocate i32.const 7 - i32.store - local.get $0 + call $~lib/runtime/doRegister + local.tee $0 i32.const 0 i32.store local.get $0 @@ -3308,7 +3288,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -3339,7 +3319,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -3382,7 +3362,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -3391,7 +3371,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 42 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3492,7 +3472,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 43 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3582,7 +3562,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -3596,7 +3576,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3656,7 +3636,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 45 ;) (type $FUNCSIG$v) + (func $std/map/test (; 46 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -3972,18 +3952,13 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 46 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 47 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE - local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub + call $~lib/runtime/doAllocate i32.const 8 - i32.store - local.get $0 + call $~lib/runtime/doRegister + local.tee $0 i32.const 0 i32.store local.get $0 @@ -4005,7 +3980,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $std/map/test (; 47 ;) (type $FUNCSIG$v) + (func $std/map/test (; 48 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -4321,7 +4296,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -4343,18 +4318,13 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 49 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 50 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE - local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub + call $~lib/runtime/doAllocate i32.const 9 - i32.store - local.get $0 + call $~lib/runtime/doRegister + local.tee $0 i32.const 0 i32.store local.get $0 @@ -4376,7 +4346,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 50 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 51 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -4442,7 +4412,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 51 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 52 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -4485,7 +4455,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 52 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 53 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -4494,7 +4464,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4595,7 +4565,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 54 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 55 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4685,7 +4655,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 55 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 56 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -4699,7 +4669,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 56 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/map/Map#delete (; 57 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -4760,7 +4730,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 57 ;) (type $FUNCSIG$v) + (func $std/map/test (; 58 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/map/Map#constructor @@ -5083,18 +5053,13 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 58 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 59 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE - local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub + call $~lib/runtime/doAllocate i32.const 10 - i32.store - local.get $0 + call $~lib/runtime/doRegister + local.tee $0 i32.const 0 i32.store local.get $0 @@ -5116,7 +5081,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $std/map/test (; 59 ;) (type $FUNCSIG$v) + (func $std/map/test (; 60 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/map/Map#constructor @@ -5439,18 +5404,13 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 60 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 61 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE - local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub + call $~lib/runtime/doAllocate i32.const 11 - i32.store - local.get $0 + call $~lib/runtime/doRegister + local.tee $0 i32.const 0 i32.store local.get $0 @@ -5472,7 +5432,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 61 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 62 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -5515,7 +5475,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 62 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 63 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -5525,7 +5485,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 64 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5627,7 +5587,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 64 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/map/Map#set (; 65 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5718,7 +5678,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 65 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 66 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -5733,7 +5693,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 66 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/map/Map#delete (; 67 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -5795,7 +5755,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 67 ;) (type $FUNCSIG$v) + (func $std/map/test (; 68 ;) (type $FUNCSIG$v) (local $0 f32) (local $1 i32) call $~lib/map/Map#constructor @@ -6118,18 +6078,13 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 68 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 69 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE - local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub + call $~lib/runtime/doAllocate i32.const 12 - i32.store - local.get $0 + call $~lib/runtime/doRegister + local.tee $0 i32.const 0 i32.store local.get $0 @@ -6151,7 +6106,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 69 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 70 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -6194,7 +6149,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 70 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 71 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -6204,7 +6159,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 71 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 72 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6306,7 +6261,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 72 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/map/Map#set (; 73 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6397,7 +6352,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 73 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 74 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -6412,7 +6367,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 74 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/map/Map#delete (; 75 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -6474,7 +6429,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 75 ;) (type $FUNCSIG$v) + (func $std/map/test (; 76 ;) (type $FUNCSIG$v) (local $0 f64) (local $1 i32) call $~lib/map/Map#constructor @@ -6797,7 +6752,7 @@ unreachable end ) - (func $start (; 76 ;) (type $FUNCSIG$v) + (func $start (; 77 ;) (type $FUNCSIG$v) i32.const 128 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset @@ -6813,7 +6768,7 @@ call $std/map/test call $std/map/test ) - (func $null (; 77 ;) (type $FUNCSIG$v) + (func $null (; 78 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 596e1c8274..8783ad0834 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) @@ -19,9 +19,9 @@ (type $FUNCSIG$vidi (func (param i32 f64 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 48) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 96) "\01\00\00\00\14\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") + (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 48) "\02\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 96) "\02\00\00\00\14\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) @@ -29,12 +29,13 @@ (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/memory/HEAP_BASE i32 (i32.const 124)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/ADJUST (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/adjustToBlock (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -131,10 +132,10 @@ end return ) - (func $~lib/runtime/ALLOCATE (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUST + call $~lib/runtime/adjustToBlock call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -147,7 +148,11 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/ASSERT_UNREGISTERED (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/doAllocate + ) + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -155,7 +160,7 @@ if i32.const 0 i32.const 16 - i32.const 172 + i32.const 188 i32.const 2 call $~lib/env/abort unreachable @@ -170,13 +175,23 @@ if i32.const 0 i32.const 16 - i32.const 173 + i32.const 189 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -441,7 +456,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -455,27 +470,26 @@ call $~lib/env/abort unreachable end - local.get $1 - call $~lib/runtime/ALLOCATE - local.set $2 - local.get $2 + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end + local.set $3 + local.get $3 i32.const 0 local.get $1 call $~lib/memory/memory.fill block $~lib/runtime/REGISTER|inlined.0 (result i32) - local.get $2 - local.set $3 - local.get $3 - call $~lib/runtime/ASSERT_UNREGISTERED local.get $3 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.set $2 + local.get $2 i32.const 3 - i32.store - local.get $3 + call $~lib/runtime/doRegister end ) - (func $~lib/map/Map#clear (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -501,7 +515,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -512,13 +526,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - i32.const 2 - i32.store - local.get $1 + i32.const 1 + call $~lib/runtime/doRegister end local.set $0 end @@ -545,14 +554,14 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash8 (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const -2128831035 local.get $0 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -607,7 +616,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -626,7 +635,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -760,7 +769,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -868,7 +877,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -894,11 +903,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -975,7 +984,7 @@ end i32.const 1 ) - (func $std/map/test (; 17 ;) (type $FUNCSIG$v) + (func $std/map/test (; 19 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1359,7 +1368,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -1385,7 +1394,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -1396,13 +1405,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub i32.const 4 - i32.store - local.get $1 + call $~lib/runtime/doRegister end local.set $0 end @@ -1429,7 +1433,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1482,7 +1486,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1499,7 +1503,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1633,7 +1637,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1739,7 +1743,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -1763,11 +1767,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1842,7 +1846,7 @@ end i32.const 1 ) - (func $std/map/test (; 27 ;) (type $FUNCSIG$v) + (func $std/map/test (; 29 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2212,7 +2216,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -2238,7 +2242,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -2249,13 +2253,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub i32.const 5 - i32.store - local.get $1 + call $~lib/runtime/doRegister end local.set $0 end @@ -2282,7 +2281,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -2304,7 +2303,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2359,7 +2358,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2378,7 +2377,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2512,7 +2511,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2620,7 +2619,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2646,11 +2645,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2727,7 +2726,7 @@ end i32.const 1 ) - (func $std/map/test (; 38 ;) (type $FUNCSIG$v) + (func $std/map/test (; 40 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3111,7 +3110,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -3137,7 +3136,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -3148,13 +3147,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub i32.const 6 - i32.store - local.get $1 + call $~lib/runtime/doRegister end local.set $0 end @@ -3181,7 +3175,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3234,7 +3228,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -3251,7 +3245,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 43 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3385,7 +3379,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 44 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 46 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3491,7 +3485,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3515,11 +3509,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3594,7 +3588,7 @@ end i32.const 1 ) - (func $std/map/test (; 48 ;) (type $FUNCSIG$v) + (func $std/map/test (; 50 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3964,7 +3958,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 51 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -3990,7 +3984,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -4001,13 +3995,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub i32.const 7 - i32.store - local.get $1 + call $~lib/runtime/doRegister end local.set $0 end @@ -4034,7 +4023,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -4076,7 +4065,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4127,7 +4116,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -4142,7 +4131,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 56 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4276,7 +4265,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 57 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4380,7 +4369,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4402,11 +4391,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4479,7 +4468,7 @@ end i32.const 1 ) - (func $std/map/test (; 59 ;) (type $FUNCSIG$v) + (func $std/map/test (; 61 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4835,7 +4824,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 60 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -4861,7 +4850,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 63 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -4872,13 +4861,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub i32.const 8 - i32.store - local.get $1 + call $~lib/runtime/doRegister end local.set $0 end @@ -4905,7 +4889,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4956,7 +4940,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 63 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -4971,7 +4955,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 64 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 66 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5105,7 +5089,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 65 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 67 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5209,7 +5193,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 68 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5231,11 +5215,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 67 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 68 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5308,7 +5292,7 @@ end i32.const 1 ) - (func $std/map/test (; 69 ;) (type $FUNCSIG$v) + (func $std/map/test (; 71 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5664,7 +5648,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 70 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 72 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -5690,7 +5674,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 71 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -5701,13 +5685,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub i32.const 9 - i32.store - local.get $1 + call $~lib/runtime/doRegister end local.set $0 end @@ -5734,7 +5713,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 72 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 74 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5822,7 +5801,7 @@ local.set $3 local.get $3 ) - (func $~lib/map/Map#find (; 73 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 75 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5873,7 +5852,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 74 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 76 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -5888,7 +5867,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 75 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 77 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6023,7 +6002,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 76 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 78 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) @@ -6128,7 +6107,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 77 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 79 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) local.get $0 @@ -6150,11 +6129,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 78 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 79 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 81 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6228,7 +6207,7 @@ end i32.const 1 ) - (func $std/map/test (; 80 ;) (type $FUNCSIG$v) + (func $std/map/test (; 82 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6591,7 +6570,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 81 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 83 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -6617,7 +6596,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 82 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 84 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -6628,13 +6607,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub i32.const 10 - i32.store - local.get $1 + call $~lib/runtime/doRegister end local.set $0 end @@ -6661,7 +6635,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 83 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 85 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6712,7 +6686,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 84 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 86 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -6727,7 +6701,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 85 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 87 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6862,7 +6836,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 86 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 88 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) @@ -6967,7 +6941,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 87 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 89 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) local.get $0 @@ -6989,11 +6963,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 88 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 90 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 89 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 91 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -7067,7 +7041,7 @@ end i32.const 1 ) - (func $std/map/test (; 90 ;) (type $FUNCSIG$v) + (func $std/map/test (; 92 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -7430,7 +7404,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 91 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 93 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -7456,7 +7430,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -7467,13 +7441,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub i32.const 11 - i32.store - local.get $1 + call $~lib/runtime/doRegister end local.set $0 end @@ -7500,7 +7469,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 93 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 95 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7551,7 +7520,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 94 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 96 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) local.get $0 local.get $1 @@ -7567,7 +7536,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 95 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 97 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7703,7 +7672,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 96 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/map/Map#set (; 98 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) (local $3 f32) (local $4 i32) (local $5 i32) @@ -7809,7 +7778,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 97 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 99 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) local.get $0 @@ -7832,11 +7801,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 98 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 100 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 99 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#delete (; 101 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -7911,7 +7880,7 @@ end i32.const 1 ) - (func $std/map/test (; 100 ;) (type $FUNCSIG$v) + (func $std/map/test (; 102 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -8274,7 +8243,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 101 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 103 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -8300,7 +8269,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 104 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -8311,13 +8280,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub i32.const 12 - i32.store - local.get $1 + call $~lib/runtime/doRegister end local.set $0 end @@ -8344,7 +8308,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 103 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 105 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -8395,7 +8359,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 104 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 106 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) local.get $0 local.get $1 @@ -8411,7 +8375,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 105 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 107 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8547,7 +8511,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 106 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/map/Map#set (; 108 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) (local $3 f64) (local $4 i32) (local $5 i32) @@ -8653,7 +8617,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 107 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 109 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) local.get $0 @@ -8676,11 +8640,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 108 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 110 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 109 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#delete (; 111 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -8755,7 +8719,7 @@ end i32.const 1 ) - (func $std/map/test (; 110 ;) (type $FUNCSIG$v) + (func $std/map/test (; 112 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -9118,7 +9082,7 @@ unreachable end ) - (func $start:std/map (; 111 ;) (type $FUNCSIG$v) + (func $start:std/map (; 113 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -9140,9 +9104,9 @@ call $std/map/test call $std/map/test ) - (func $start (; 112 ;) (type $FUNCSIG$v) + (func $start (; 114 ;) (type $FUNCSIG$v) call $start:std/map ) - (func $null (; 113 ;) (type $FUNCSIG$v) + (func $null (; 115 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index c384219ac8..b1834c3e68 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) @@ -21,9 +21,9 @@ (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 48) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 96) "\01\00\00\00\14\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s") + (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 48) "\02\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 96) "\02\00\00\00\14\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -93,7 +93,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/ALLOCATE (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -114,14 +114,14 @@ i32.const 8 i32.add ) - (func $~lib/runtime/ASSERT_UNREGISTERED (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 124 i32.le_u if i32.const 0 i32.const 16 - i32.const 172 + i32.const 188 i32.const 2 call $~lib/env/abort unreachable @@ -135,13 +135,23 @@ if i32.const 0 i32.const 16 - i32.const 173 + i32.const 189 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/runtime/doRegister (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + i32.const 8 + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -352,7 +362,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741816 @@ -366,20 +376,15 @@ unreachable end local.get $0 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate local.tee $1 local.get $0 call $~lib/memory/memory.fill local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - i32.const 8 - i32.sub i32.const 3 - i32.store - local.get $1 + call $~lib/runtime/doRegister ) - (func $~lib/set/Set#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -401,18 +406,13 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate + i32.const 1 + call $~lib/runtime/doRegister local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub - i32.const 2 - i32.store - local.get $0 i32.const 0 i32.store local.get $0 @@ -434,7 +434,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -479,7 +479,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -495,7 +495,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -595,7 +595,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -687,7 +687,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -754,7 +754,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 13 ;) (type $FUNCSIG$v) + (func $std/set/test (; 14 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -999,18 +999,13 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 14 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 15 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE - local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub + call $~lib/runtime/doAllocate i32.const 4 - i32.store - local.get $0 + call $~lib/runtime/doRegister + local.tee $0 i32.const 0 i32.store local.get $0 @@ -1032,7 +1027,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#has (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1046,7 +1041,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1146,7 +1141,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1236,7 +1231,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -1301,7 +1296,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 19 ;) (type $FUNCSIG$v) + (func $std/set/test (; 20 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -1546,18 +1541,13 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 20 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 21 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE - local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub + call $~lib/runtime/doAllocate i32.const 5 - i32.store - local.get $0 + call $~lib/runtime/doRegister + local.tee $0 i32.const 0 i32.store local.get $0 @@ -1579,7 +1569,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -1624,7 +1614,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1649,7 +1639,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1758,7 +1748,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1859,7 +1849,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -1935,7 +1925,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 26 ;) (type $FUNCSIG$v) + (func $std/set/test (; 27 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -2180,18 +2170,13 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 27 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 28 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE - local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub + call $~lib/runtime/doAllocate i32.const 6 - i32.store - local.get $0 + call $~lib/runtime/doRegister + local.tee $0 i32.const 0 i32.store local.get $0 @@ -2213,7 +2198,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#has (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2236,7 +2221,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2345,7 +2330,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2444,7 +2429,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2518,7 +2503,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 32 ;) (type $FUNCSIG$v) + (func $std/set/test (; 33 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -2763,18 +2748,13 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 33 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 34 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE - local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub + call $~lib/runtime/doAllocate i32.const 7 - i32.store - local.get $0 + call $~lib/runtime/doRegister + local.tee $0 i32.const 0 i32.store local.get $0 @@ -2796,7 +2776,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -2827,7 +2807,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -2870,7 +2850,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2879,7 +2859,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2976,7 +2956,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3061,7 +3041,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 40 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3121,7 +3101,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 40 ;) (type $FUNCSIG$v) + (func $std/set/test (; 41 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -3366,18 +3346,13 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 41 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 42 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE - local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub + call $~lib/runtime/doAllocate i32.const 8 - i32.store - local.get $0 + call $~lib/runtime/doRegister + local.tee $0 i32.const 0 i32.store local.get $0 @@ -3399,7 +3374,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $std/set/test (; 42 ;) (type $FUNCSIG$v) + (func $std/set/test (; 43 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -3644,7 +3619,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -3666,18 +3641,13 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 44 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 45 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE - local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub + call $~lib/runtime/doAllocate i32.const 9 - i32.store - local.get $0 + call $~lib/runtime/doRegister + local.tee $0 i32.const 0 i32.store local.get $0 @@ -3699,7 +3669,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 46 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -3765,7 +3735,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 46 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 47 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -3808,7 +3778,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 47 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 48 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -3817,7 +3787,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 48 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 49 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3914,7 +3884,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 49 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 50 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3999,7 +3969,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 50 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#delete (; 51 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -4060,7 +4030,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 51 ;) (type $FUNCSIG$v) + (func $std/set/test (; 52 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/set/Set#constructor @@ -4305,18 +4275,13 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 52 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 53 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE - local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub + call $~lib/runtime/doAllocate i32.const 10 - i32.store - local.get $0 + call $~lib/runtime/doRegister + local.tee $0 i32.const 0 i32.store local.get $0 @@ -4338,7 +4303,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $std/set/test (; 53 ;) (type $FUNCSIG$v) + (func $std/set/test (; 54 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/set/Set#constructor @@ -4583,18 +4548,13 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 54 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 55 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE - local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub + call $~lib/runtime/doAllocate i32.const 11 - i32.store - local.get $0 + call $~lib/runtime/doRegister + local.tee $0 i32.const 0 i32.store local.get $0 @@ -4616,12 +4576,12 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/HASH (; 55 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/util/hash/HASH (; 56 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 i32.reinterpret_f32 call $~lib/util/hash/hash32 ) - (func $~lib/set/Set#find (; 56 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 57 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -4664,7 +4624,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 57 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 58 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -4673,7 +4633,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 58 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 59 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4771,7 +4731,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 59 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#add (; 60 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4854,7 +4814,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 60 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#delete (; 61 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -4916,7 +4876,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 61 ;) (type $FUNCSIG$v) + (func $std/set/test (; 62 ;) (type $FUNCSIG$v) (local $0 f32) (local $1 i32) call $~lib/set/Set#constructor @@ -5161,18 +5121,13 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 62 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 63 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/ALLOCATE - local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - i32.const 8 - i32.sub + call $~lib/runtime/doAllocate i32.const 12 - i32.store - local.get $0 + call $~lib/runtime/doRegister + local.tee $0 i32.const 0 i32.store local.get $0 @@ -5194,12 +5149,12 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/HASH (; 63 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/hash/HASH (; 64 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 i64.reinterpret_f64 call $~lib/util/hash/hash64 ) - (func $~lib/set/Set#find (; 64 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 65 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -5242,7 +5197,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 65 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 66 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -5251,7 +5206,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 66 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 67 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5349,7 +5304,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 67 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#add (; 68 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5432,7 +5387,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 68 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#delete (; 69 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -5494,7 +5449,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 69 ;) (type $FUNCSIG$v) + (func $std/set/test (; 70 ;) (type $FUNCSIG$v) (local $0 f64) (local $1 i32) call $~lib/set/Set#constructor @@ -5739,7 +5694,7 @@ unreachable end ) - (func $start (; 70 ;) (type $FUNCSIG$v) + (func $start (; 71 ;) (type $FUNCSIG$v) i32.const 128 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset @@ -5755,7 +5710,7 @@ call $std/set/test call $std/set/test ) - (func $null (; 71 ;) (type $FUNCSIG$v) + (func $null (; 72 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index fdca5899c4..2d28d36cb3 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) @@ -21,9 +21,9 @@ (type $FUNCSIG$vid (func (param i32 f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 48) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 96) "\01\00\00\00\14\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") + (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 48) "\02\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 96) "\02\00\00\00\14\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) @@ -31,12 +31,13 @@ (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/memory/HEAP_BASE i32 (i32.const 124)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/ADJUST (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/adjustToBlock (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -133,10 +134,10 @@ end return ) - (func $~lib/runtime/ALLOCATE (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUST + call $~lib/runtime/adjustToBlock call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -149,7 +150,11 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/ASSERT_UNREGISTERED (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/doAllocate + ) + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -157,7 +162,7 @@ if i32.const 0 i32.const 16 - i32.const 172 + i32.const 188 i32.const 2 call $~lib/env/abort unreachable @@ -172,13 +177,23 @@ if i32.const 0 i32.const 16 - i32.const 173 + i32.const 189 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -443,7 +458,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -457,27 +472,26 @@ call $~lib/env/abort unreachable end - local.get $1 - call $~lib/runtime/ALLOCATE - local.set $2 - local.get $2 + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end + local.set $3 + local.get $3 i32.const 0 local.get $1 call $~lib/memory/memory.fill block $~lib/runtime/REGISTER|inlined.0 (result i32) - local.get $2 - local.set $3 - local.get $3 - call $~lib/runtime/ASSERT_UNREGISTERED local.get $3 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.set $2 + local.get $2 i32.const 3 - i32.store - local.get $3 + call $~lib/runtime/doRegister end ) - (func $~lib/set/Set#clear (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -503,7 +517,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -514,13 +528,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - i32.const 2 - i32.store - local.get $1 + i32.const 1 + call $~lib/runtime/doRegister end local.set $0 end @@ -547,14 +556,14 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash8 (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const -2128831035 local.get $0 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/util/hash/HASH (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -563,7 +572,7 @@ call $~lib/util/hash/hash8 return ) - (func $~lib/set/Set#find (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -618,7 +627,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -627,7 +636,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -757,7 +766,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -850,11 +859,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -931,7 +940,7 @@ end i32.const 1 ) - (func $std/set/test (; 17 ;) (type $FUNCSIG$v) + (func $std/set/test (; 19 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1214,7 +1223,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -1240,7 +1249,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -1251,13 +1260,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub i32.const 4 - i32.store - local.get $1 + call $~lib/runtime/doRegister end local.set $0 end @@ -1284,14 +1288,14 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/HASH (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and call $~lib/util/hash/hash8 return ) - (func $~lib/set/Set#find (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1344,7 +1348,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1353,7 +1357,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1483,7 +1487,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1576,11 +1580,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1655,7 +1659,7 @@ end i32.const 1 ) - (func $std/set/test (; 27 ;) (type $FUNCSIG$v) + (func $std/set/test (; 29 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1938,7 +1942,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -1964,7 +1968,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -1975,13 +1979,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub i32.const 5 - i32.store - local.get $1 + call $~lib/runtime/doRegister end local.set $0 end @@ -2008,7 +2007,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -2030,7 +2029,7 @@ local.set $1 local.get $1 ) - (func $~lib/util/hash/HASH (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -2039,7 +2038,7 @@ call $~lib/util/hash/hash16 return ) - (func $~lib/set/Set#find (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2094,7 +2093,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2103,7 +2102,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2233,7 +2232,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2326,11 +2325,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2407,7 +2406,7 @@ end i32.const 1 ) - (func $std/set/test (; 38 ;) (type $FUNCSIG$v) + (func $std/set/test (; 40 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2690,7 +2689,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -2716,7 +2715,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -2727,13 +2726,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub i32.const 6 - i32.store - local.get $1 + call $~lib/runtime/doRegister end local.set $0 end @@ -2760,14 +2754,14 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/HASH (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 65535 i32.and call $~lib/util/hash/hash16 return ) - (func $~lib/set/Set#find (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2820,7 +2814,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2829,7 +2823,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 46 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2959,7 +2953,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 47 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3052,11 +3046,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3131,7 +3125,7 @@ end i32.const 1 ) - (func $std/set/test (; 48 ;) (type $FUNCSIG$v) + (func $std/set/test (; 50 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3414,7 +3408,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 51 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -3440,7 +3434,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -3451,13 +3445,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub i32.const 7 - i32.store - local.get $1 + call $~lib/runtime/doRegister end local.set $0 end @@ -3484,7 +3473,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -3526,12 +3515,12 @@ local.set $1 local.get $1 ) - (func $~lib/util/hash/HASH (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/hash/hash32 return ) - (func $~lib/set/Set#find (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3582,7 +3571,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -3591,7 +3580,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 57 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3721,7 +3710,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 56 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 58 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3814,11 +3803,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3891,7 +3880,7 @@ end i32.const 1 ) - (func $std/set/test (; 59 ;) (type $FUNCSIG$v) + (func $std/set/test (; 61 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4174,7 +4163,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 60 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -4200,7 +4189,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 63 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -4211,13 +4200,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub i32.const 8 - i32.store - local.get $1 + call $~lib/runtime/doRegister end local.set $0 end @@ -4244,12 +4228,12 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/HASH (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (; 64 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/hash/hash32 return ) - (func $~lib/set/Set#find (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4300,7 +4284,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -4309,7 +4293,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 65 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 67 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4439,7 +4423,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 66 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 68 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4532,11 +4516,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 67 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 68 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4609,7 +4593,7 @@ end i32.const 1 ) - (func $std/set/test (; 69 ;) (type $FUNCSIG$v) + (func $std/set/test (; 71 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4892,7 +4876,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 70 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 72 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -4918,7 +4902,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 71 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -4929,13 +4913,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub i32.const 9 - i32.store - local.get $1 + call $~lib/runtime/doRegister end local.set $0 end @@ -4962,7 +4941,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 72 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 74 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5050,12 +5029,12 @@ local.set $3 local.get $3 ) - (func $~lib/util/hash/HASH (; 73 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/HASH (; 75 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/hash/hash64 return ) - (func $~lib/set/Set#find (; 74 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 76 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5106,7 +5085,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 75 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 77 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -5115,7 +5094,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 76 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 78 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5246,7 +5225,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 77 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 79 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5339,11 +5318,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 78 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 79 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 81 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -5417,7 +5396,7 @@ end i32.const 1 ) - (func $std/set/test (; 80 ;) (type $FUNCSIG$v) + (func $std/set/test (; 82 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5700,7 +5679,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 81 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 83 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -5726,7 +5705,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 82 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 84 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -5737,13 +5716,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub i32.const 10 - i32.store - local.get $1 + call $~lib/runtime/doRegister end local.set $0 end @@ -5770,12 +5744,12 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/HASH (; 83 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/HASH (; 85 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/hash/hash64 return ) - (func $~lib/set/Set#find (; 84 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 86 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5826,7 +5800,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 85 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 87 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -5835,7 +5809,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 86 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 88 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5966,7 +5940,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 87 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 89 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6059,11 +6033,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 88 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 90 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 89 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 91 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6137,7 +6111,7 @@ end i32.const 1 ) - (func $std/set/test (; 90 ;) (type $FUNCSIG$v) + (func $std/set/test (; 92 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6420,7 +6394,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 91 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 93 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -6446,7 +6420,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -6457,13 +6431,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub i32.const 11 - i32.store - local.get $1 + call $~lib/runtime/doRegister end local.set $0 end @@ -6490,13 +6459,13 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/HASH (; 93 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/util/hash/HASH (; 95 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 i32.reinterpret_f32 call $~lib/util/hash/hash32 return ) - (func $~lib/set/Set#find (; 94 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 96 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6547,7 +6516,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 95 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 97 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -6556,7 +6525,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 96 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 98 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6688,7 +6657,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 97 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#add (; 99 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6781,11 +6750,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 98 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 100 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 99 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#delete (; 101 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -6860,7 +6829,7 @@ end i32.const 1 ) - (func $std/set/test (; 100 ;) (type $FUNCSIG$v) + (func $std/set/test (; 102 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -7143,7 +7112,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 101 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 103 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -7169,7 +7138,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 104 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -7180,13 +7149,8 @@ call $~lib/runtime/ALLOCATE local.set $1 local.get $1 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub i32.const 12 - i32.store - local.get $1 + call $~lib/runtime/doRegister end local.set $0 end @@ -7213,13 +7177,13 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/HASH (; 103 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/hash/HASH (; 105 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 i64.reinterpret_f64 call $~lib/util/hash/hash64 return ) - (func $~lib/set/Set#find (; 104 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 106 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7270,7 +7234,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 105 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 107 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -7279,7 +7243,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 106 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 108 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7411,7 +7375,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 107 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#add (; 109 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7504,11 +7468,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 108 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 110 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 109 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#delete (; 111 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -7583,7 +7547,7 @@ end i32.const 1 ) - (func $std/set/test (; 110 ;) (type $FUNCSIG$v) + (func $std/set/test (; 112 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -7866,7 +7830,7 @@ unreachable end ) - (func $start:std/set (; 111 ;) (type $FUNCSIG$v) + (func $start:std/set (; 113 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -7888,9 +7852,9 @@ call $std/set/test call $std/set/test ) - (func $start (; 112 ;) (type $FUNCSIG$v) + (func $start (; 114 ;) (type $FUNCSIG$v) call $start:std/set ) - (func $null (; 113 ;) (type $FUNCSIG$v) + (func $null (; 115 ;) (type $FUNCSIG$v) ) ) From 05a35f42f66cf6e02e6f8aba5ffacdeb547fca69 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 16 Mar 2019 11:24:13 +0100 Subject: [PATCH 039/119] more --- src/builtins.ts | 89 +- src/program.ts | 28 + src/types.ts | 5 + std/assembly/runtime.ts | 4 +- std/assembly/typedarray.ts | 34 +- tests/compiler/builtins.optimized.wat | 29 +- tests/compiler/builtins.ts | 3 +- tests/compiler/builtins.untouched.wat | 439 +- tests/compiler/empty.ts | 8 - tests/compiler/std/symbol.optimized.wat | 902 +- tests/compiler/std/symbol.untouched.wat | 1272 +- tests/compiler/std/typedarray.optimized.wat | 11749 +++++++------ tests/compiler/std/typedarray.ts | 4 +- tests/compiler/std/typedarray.untouched.wat | 16643 ++++++++---------- tests/compiler/switch.optimized.wat | 32 +- tests/compiler/switch.untouched.wat | 64 +- tests/compiler/while.optimized.wat | 20 +- tests/compiler/while.untouched.wat | 22 +- 18 files changed, 14892 insertions(+), 16455 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index 45de8eea52..f7eaefabbb 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -585,11 +585,7 @@ export function compileCall( let classReference = type.classReference; if (!classReference) return module.createI32(0); let classPrototype = classReference.prototype; - return module.createI32( - (classPrototype).extends(compiler.program.arrayPrototype) - ? 1 - : 0 - ); + return module.createI32(classPrototype.extends(compiler.program.arrayPrototype) ? 1 : 0); } case BuiltinSymbols.isArrayLike: { // isArrayLike() / isArrayLike(value: T) -> bool let type = evaluateConstantType(compiler, typeArguments, operands, reportNode); @@ -597,12 +593,7 @@ export function compileCall( if (!type) return module.createUnreachable(); let classReference = type.classReference; if (!classReference) return module.createI32(0); - return module.createI32( - classReference.lookupInSelf("length") && ( - classReference.lookupOverload(OperatorKind.INDEXED_GET) || - classReference.lookupOverload(OperatorKind.UNCHECKED_INDEXED_GET) - ) ? 1 : 0 - ); + return module.createI32(classReference.isArrayLike ? 1 : 0); } case BuiltinSymbols.isFunction: { // isFunction / isFunction(value: T) -> bool let type = evaluateConstantType(compiler, typeArguments, operands, reportNode); @@ -4153,17 +4144,17 @@ function compileTypedArrayGet( WrapMode.NONE )); if (getExpressionId(dynamicOffset) == ExpressionId.Const) { - constantOffset = getConstValueI32(dynamicOffset) * type.byteSize; + constantOffset = getConstValueI32(dynamicOffset); dynamicOffset = 0; } else if (getExpressionId(dynamicOffset) == ExpressionId.Binary) { if (getBinaryOp(dynamicOffset) == BinaryOp.AddI32) { let left = getBinaryLeft(dynamicOffset); let right = getBinaryRight(dynamicOffset); if (getExpressionId(left) == ExpressionId.Const) { - constantOffset = getConstValueI32(left) * type.byteSize; + constantOffset = getConstValueI32(left); dynamicOffset = right; } else if (getExpressionId(right) == ExpressionId.Const) { - constantOffset = getConstValueI32(right) * type.byteSize; + constantOffset = getConstValueI32(right); dynamicOffset = left; } } @@ -4180,7 +4171,16 @@ function compileTypedArrayGet( ), nativeSizeType, (dataStart).memoryOffset ); + + var typeAlignLog2 = type.alignLog2; + constantOffset <<= typeAlignLog2; if (dynamicOffset) { + if (typeAlignLog2) { + dynamicOffset = module.createBinary(BinaryOp.ShlI32, + dynamicOffset, + module.createI32(typeAlignLog2) + ); + } if (nativeSizeType == NativeType.I64) { dataStartExpr = module.createBinary(BinaryOp.AddI64, dataStartExpr, @@ -4242,12 +4242,14 @@ function compileTypedArraySet( assert(dataEnd.kind == ElementKind.FIELD); var constantOffset: i32 = 0; - var dynamicOffset = module.precomputeExpression(compiler.compileExpression( - elementExpression, - Type.i32, - ConversionKind.IMPLICIT, - WrapMode.NONE - )); + var dynamicOffset = module.precomputeExpression( + compiler.compileExpression( + elementExpression, + Type.i32, + ConversionKind.IMPLICIT, + WrapMode.NONE + ) + ); if (getExpressionId(dynamicOffset) == ExpressionId.Const) { constantOffset = getConstValueI32(dynamicOffset); dynamicOffset = 0; @@ -4276,7 +4278,16 @@ function compileTypedArraySet( ), nativeSizeType, (dataStart).memoryOffset ); + + var typeAlignLog2 = type.alignLog2; + constantOffset <<= typeAlignLog2; if (dynamicOffset) { + if (typeAlignLog2) { + dynamicOffset = module.createBinary(BinaryOp.ShlI32, + dynamicOffset, + module.createI32(typeAlignLog2) + ); + } if (nativeSizeType == NativeType.I64) { dataStartExpr = module.createBinary(BinaryOp.AddI64, dataStartExpr, @@ -4292,13 +4303,47 @@ function compileTypedArraySet( var valueExpr = compiler.compileExpression( valueExpression, - type.is(TypeFlags.SIGNED) ? Type.i32 : Type.u32, + type.is(TypeFlags.INTEGER | TypeFlags.VALUE) + ? type.is(TypeFlags.LONG) + ? type.is(TypeFlags.SIGNED) + ? Type.i64 + : Type.u64 + : type.is(TypeFlags.SIGNED) + ? Type.i32 + : Type.u32 + : type, ConversionKind.IMPLICIT, WrapMode.NONE ); + + // clamp + if (target.internalName == BuiltinSymbols.Uint8ClampedArray) { + let tempLocal = compiler.currentFlow.getAndFreeTempLocal(Type.i32, true); + // ~(value >> 31) & (((255 - value) >> 31) | value) + valueExpr = module.createBinary(BinaryOp.AndI32, + module.createBinary(BinaryOp.XorI32, + module.createBinary(BinaryOp.ShrI32, + module.createTeeLocal(tempLocal.index, valueExpr), + module.createI32(31) + ), + module.createI32(-1) + ), + module.createBinary(BinaryOp.OrI32, + module.createBinary(BinaryOp.ShrI32, + module.createBinary(BinaryOp.SubI32, + module.createI32(255), + module.createGetLocal(tempLocal.index, NativeType.I32) + ), + module.createI32(31) + ), + module.createGetLocal(tempLocal.index, NativeType.I32) + ) + ); + } + var nativeType = type.toNativeType(); - // TODO: check offset, clamp + // TODO: check offset if (contextualType == Type.void) { compiler.currentType = Type.void; diff --git a/src/program.ts b/src/program.ts index 60663d5217..b69e0b2962 100644 --- a/src/program.ts +++ b/src/program.ts @@ -2837,6 +2837,13 @@ export class ClassPrototype extends DeclaredElement { return (this.declaration).implementsTypes; } + /** Tests if this prototype is of a builtin array type (Array/TypedArray). */ + get isBuiltinArray(): bool { + var arrayBufferViewInstance = this.program.arrayBufferViewInstance; + return arrayBufferViewInstance !== null + && this.extends(arrayBufferViewInstance.prototype); + } + /** Tests if this prototype extends the specified. */ extends(basePtototype: ClassPrototype | null): bool { var current: ClassPrototype | null = this; @@ -2919,6 +2926,27 @@ export class Class extends TypedElement { return id; } + /** Tests if this class is of a builtin array type (Array/TypedArray). */ + get isBuiltinArray(): bool { + return this.prototype.isBuiltinArray; + } + + /** Tests if this class is array-like. */ + get isArrayLike(): bool { + if (this.isBuiltinArray) return true; + var lengthField = this.lookupInSelf("length"); + return lengthField !== null && ( + lengthField.kind == ElementKind.FIELD || + ( + lengthField.kind == ElementKind.PROPERTY && + (lengthField).getterInstance !== null // TODO: resolve & check type? + ) + ) && ( + this.lookupOverload(OperatorKind.INDEXED_GET) !== null || + this.lookupOverload(OperatorKind.UNCHECKED_INDEXED_GET) !== null + ); + } + /** Constructs a new class. */ constructor( /** Name incl. type parameters, i.e. `Foo`. */ diff --git a/src/types.ts b/src/types.ts index 0f7d6b11c6..c3193e6556 100644 --- a/src/types.ts +++ b/src/types.ts @@ -145,6 +145,11 @@ export class Type { } } + /** Gets this type's logarithmic alignment in memory. */ + get alignLog2(): i32 { + return 31 - clz(this.byteSize); + } + /** Tests if this is a managed type that needs GC hooks. */ isManaged(program: Program): bool { if (program.gcImplemented) { diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 2635ef5957..c29c02a871 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -219,9 +219,9 @@ export abstract class ArrayBufferView { @unsafe dataEnd: usize; - constructor(length: i32, alignLog2: i32) { + protected constructor(length: i32, alignLog2: i32) { if (length > MAX_BYTELENGTH >>> alignLog2) throw new RangeError("Invalid length"); - var buffer = new ArrayBuffer(length << alignLog2); + var buffer = new ArrayBuffer(length = length << alignLog2); this.data = buffer; this.dataStart = changetype(buffer); this.dataEnd = changetype(buffer) + length; diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index b830eebbb3..ff6170ec6e 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -84,7 +84,9 @@ export class Uint8Array extends ArrayBufferView { super(length, alignof()); } - get length(): i32 { return this.byteLength; } + get length(): i32 { + return this.byteLength; + } fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8Array { return FILL(this, value, start, end); @@ -209,7 +211,7 @@ export class Int16Array extends ArrayBufferView { } get length(): i32 { - return this.byteLength >>> 1; + return this.byteLength >>> alignof(); } fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int16Array { @@ -278,7 +280,7 @@ export class Uint16Array extends ArrayBufferView { } get length(): i32 { - return this.byteLength >>> 1; + return this.byteLength >>> alignof(); } fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint16Array { @@ -347,7 +349,7 @@ export class Int32Array extends ArrayBufferView { } get length(): i32 { - return this.byteLength >>> 2; + return this.byteLength >>> alignof(); } fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int32Array { @@ -416,7 +418,7 @@ export class Uint32Array extends ArrayBufferView { } get length(): i32 { - return this.byteLength >>> 2; + return this.byteLength >>> alignof(); } fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint32Array { @@ -485,7 +487,7 @@ export class Int64Array extends ArrayBufferView { } get length(): i32 { - return this.byteLength >>> 3; + return this.byteLength >>> alignof(); } fill(value: i64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int64Array { @@ -554,7 +556,7 @@ export class Uint64Array extends ArrayBufferView { } get length(): i32 { - return this.byteLength >>> 3; + return this.byteLength >>> alignof(); } fill(value: u64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint64Array { @@ -623,7 +625,7 @@ export class Float32Array extends ArrayBufferView { } get length(): i32 { - return this.byteLength >>> 2; + return this.byteLength >>> alignof(); } fill(value: f32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float32Array { @@ -692,7 +694,7 @@ export class Float64Array extends ArrayBufferView { } get length(): i32 { - return this.byteLength >>> 3; + return this.byteLength >>> alignof(); } fill(value: f64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float64Array { @@ -797,18 +799,18 @@ function SUBARRAY( begin: i32, end: i32 ): TArray { - var buffer = array.data; var length = array.length; if (begin < 0) begin = max(length + begin, 0); else begin = min(begin, length); if (end < 0) end = max(length + end, begin); else end = max(min(end, length), begin); - var out = ALLOCATE(offsetof()); - store(out, buffer, offsetof("buffer")); - store(out, array.dataStart + (begin << alignof()) , offsetof("dataStart")); - store(out, array.dataEnd + ((end - begin) << alignof()), offsetof("dataEnd")); - LINK(buffer, REGISTER(out)); // register first, then link - return changetype(out); + var out = REGISTER(ALLOCATE(offsetof())); + var data = array.data; + var dataStart = array.dataStart; + changetype(out).data = data; // links + changetype(out).dataStart = dataStart + (begin << alignof()); + changetype(out).dataEnd = dataStart + (end << alignof()); + return out; } // @ts-ignore: decorator diff --git a/tests/compiler/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index 99c4172deb..c4c3082843 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -4,8 +4,9 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s") - (data (i32.const 40) "\01\00\00\001") + (data (i32.const 8) "\01\00\00\00\16\00\00\00b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s") + (data (i32.const 40) "\01") + (data (i32.const 48) "\01\00\00\00\06\00\00\00a\00b\00c") (table $0 2 funcref) (elem (i32.const 0) $builtins/test $start:builtins~anonymous|0) (global $builtins/b (mut i32) (i32.const 0)) @@ -42,8 +43,8 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 66 + i32.const 16 + i32.const 67 i32.const 19 call $~lib/env/abort unreachable @@ -55,8 +56,8 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 67 + i32.const 16 + i32.const 68 i32.const 20 call $~lib/env/abort unreachable @@ -68,8 +69,8 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 68 + i32.const 16 + i32.const 69 i32.const 20 call $~lib/env/abort unreachable @@ -91,8 +92,8 @@ i64.ne if i32.const 0 - i32.const 8 - i32.const 84 + i32.const 16 + i32.const 85 i32.const 19 call $~lib/env/abort unreachable @@ -104,8 +105,8 @@ i64.ne if i32.const 0 - i32.const 8 - i32.const 85 + i32.const 16 + i32.const 86 i32.const 20 call $~lib/env/abort unreachable @@ -117,8 +118,8 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 86 + i32.const 16 + i32.const 87 i32.const 20 call $~lib/env/abort unreachable diff --git a/tests/compiler/builtins.ts b/tests/compiler/builtins.ts index 32f6d11174..0ed738f8af 100644 --- a/tests/compiler/builtins.ts +++ b/tests/compiler/builtins.ts @@ -26,7 +26,8 @@ assert(isFloat(1)); assert(!isFloat(1)); assert(isReference(changetype(null))); assert(!isReference(changetype(null))); -assert(isString("1")); +assert(isString("")); +assert(isString("abc")); assert(!isString(1)); assert(isArray(changetype(null))); assert(isArrayLike(changetype(null))); diff --git a/tests/compiler/builtins.untouched.wat b/tests/compiler/builtins.untouched.wat index cea0d32b97..61f4c7f32e 100644 --- a/tests/compiler/builtins.untouched.wat +++ b/tests/compiler/builtins.untouched.wat @@ -4,8 +4,9 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s\00") - (data (i32.const 40) "\01\00\00\001\00") + (data (i32.const 8) "\01\00\00\00\16\00\00\00b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s\00") + (data (i32.const 40) "\01\00\00\00\00\00\00\00") + (data (i32.const 48) "\01\00\00\00\06\00\00\00a\00b\00c\00") (table $0 2 funcref) (elem (i32.const 0) $null $start:builtins~anonymous|0) (global $builtins/b (mut i32) (i32.const 0)) @@ -48,7 +49,7 @@ (global $~lib/builtins/f64.MIN_SAFE_INTEGER f64 (f64.const -9007199254740991)) (global $~lib/builtins/f64.MAX_SAFE_INTEGER f64 (f64.const 9007199254740991)) (global $~lib/builtins/f64.EPSILON f64 (f64.const 2.220446049250313e-16)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $builtins/test)) @@ -67,7 +68,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 6 i32.const 0 call $~lib/env/abort @@ -78,7 +79,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 7 i32.const 0 call $~lib/env/abort @@ -88,7 +89,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 8 i32.const 0 call $~lib/env/abort @@ -99,7 +100,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 9 i32.const 0 call $~lib/env/abort @@ -109,7 +110,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 10 i32.const 0 call $~lib/env/abort @@ -120,7 +121,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 11 i32.const 0 call $~lib/env/abort @@ -130,7 +131,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 12 i32.const 0 call $~lib/env/abort @@ -141,7 +142,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 13 i32.const 0 call $~lib/env/abort @@ -151,7 +152,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 14 i32.const 0 call $~lib/env/abort @@ -161,7 +162,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 15 i32.const 0 call $~lib/env/abort @@ -171,7 +172,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 16 i32.const 0 call $~lib/env/abort @@ -182,7 +183,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 17 i32.const 0 call $~lib/env/abort @@ -192,7 +193,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 18 i32.const 0 call $~lib/env/abort @@ -203,7 +204,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 19 i32.const 0 call $~lib/env/abort @@ -213,7 +214,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 20 i32.const 0 call $~lib/env/abort @@ -224,7 +225,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 21 i32.const 0 call $~lib/env/abort @@ -234,7 +235,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 23 i32.const 0 call $~lib/env/abort @@ -245,7 +246,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 24 i32.const 0 call $~lib/env/abort @@ -255,7 +256,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 25 i32.const 0 call $~lib/env/abort @@ -266,7 +267,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 26 i32.const 0 call $~lib/env/abort @@ -276,7 +277,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 27 i32.const 0 call $~lib/env/abort @@ -287,7 +288,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 28 i32.const 0 call $~lib/env/abort @@ -297,28 +298,28 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 29 i32.const 0 call $~lib/env/abort unreachable end - i32.const 0 - i32.eqz + i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 30 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1 + i32.const 0 + i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 31 i32.const 0 call $~lib/env/abort @@ -328,7 +329,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 32 i32.const 0 call $~lib/env/abort @@ -338,7 +339,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 33 i32.const 0 call $~lib/env/abort @@ -348,19 +349,29 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 34 i32.const 0 call $~lib/env/abort unreachable end + i32.const 1 + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 35 + i32.const 0 + call $~lib/env/abort + unreachable + end i32.const 0 i32.eqz i32.eqz if i32.const 0 - i32.const 8 - i32.const 35 + i32.const 16 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -369,8 +380,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 36 + i32.const 16 + i32.const 37 i32.const 0 call $~lib/env/abort unreachable @@ -380,8 +391,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 37 + i32.const 16 + i32.const 38 i32.const 0 call $~lib/env/abort unreachable @@ -390,8 +401,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 38 + i32.const 16 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -401,8 +412,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 39 + i32.const 16 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable @@ -411,8 +422,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 43 + i32.const 16 + i32.const 44 i32.const 0 call $~lib/env/abort unreachable @@ -422,8 +433,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 44 + i32.const 16 + i32.const 45 i32.const 0 call $~lib/env/abort unreachable @@ -432,8 +443,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 45 + i32.const 16 + i32.const 46 i32.const 0 call $~lib/env/abort unreachable @@ -443,8 +454,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 46 + i32.const 16 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -527,8 +538,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 66 + i32.const 16 + i32.const 67 i32.const 19 call $~lib/env/abort unreachable @@ -548,8 +559,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 67 + i32.const 16 + i32.const 68 i32.const 20 call $~lib/env/abort unreachable @@ -569,8 +580,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 68 + i32.const 16 + i32.const 69 i32.const 20 call $~lib/env/abort unreachable @@ -635,8 +646,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 84 + i32.const 16 + i32.const 85 i32.const 19 call $~lib/env/abort unreachable @@ -656,8 +667,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 85 + i32.const 16 + i32.const 86 i32.const 20 call $~lib/env/abort unreachable @@ -677,8 +688,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 86 + i32.const 16 + i32.const 87 i32.const 20 call $~lib/env/abort unreachable @@ -731,8 +742,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 103 + i32.const 16 + i32.const 104 i32.const 0 call $~lib/env/abort unreachable @@ -751,8 +762,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 104 + i32.const 16 + i32.const 105 i32.const 0 call $~lib/env/abort unreachable @@ -773,8 +784,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 105 + i32.const 16 + i32.const 106 i32.const 0 call $~lib/env/abort unreachable @@ -795,8 +806,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 106 + i32.const 16 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable @@ -818,8 +829,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 107 + i32.const 16 + i32.const 108 i32.const 0 call $~lib/env/abort unreachable @@ -840,8 +851,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 108 + i32.const 16 + i32.const 109 i32.const 0 call $~lib/env/abort unreachable @@ -954,8 +965,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 139 + i32.const 16 + i32.const 140 i32.const 0 call $~lib/env/abort unreachable @@ -974,8 +985,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 140 + i32.const 16 + i32.const 141 i32.const 0 call $~lib/env/abort unreachable @@ -996,8 +1007,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 141 + i32.const 16 + i32.const 142 i32.const 0 call $~lib/env/abort unreachable @@ -1018,8 +1029,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 142 + i32.const 16 + i32.const 143 i32.const 0 call $~lib/env/abort unreachable @@ -1041,8 +1052,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 143 + i32.const 16 + i32.const 144 i32.const 0 call $~lib/env/abort unreachable @@ -1063,8 +1074,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 144 + i32.const 16 + i32.const 145 i32.const 0 call $~lib/env/abort unreachable @@ -1379,8 +1390,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 263 + i32.const 16 + i32.const 264 i32.const 0 call $~lib/env/abort unreachable @@ -1391,8 +1402,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 264 + i32.const 16 + i32.const 265 i32.const 0 call $~lib/env/abort unreachable @@ -1403,8 +1414,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 265 + i32.const 16 + i32.const 266 i32.const 0 call $~lib/env/abort unreachable @@ -1415,8 +1426,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 266 + i32.const 16 + i32.const 267 i32.const 0 call $~lib/env/abort unreachable @@ -1429,8 +1440,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 268 + i32.const 16 + i32.const 269 i32.const 0 call $~lib/env/abort unreachable @@ -1441,8 +1452,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 269 + i32.const 16 + i32.const 270 i32.const 0 call $~lib/env/abort unreachable @@ -1453,8 +1464,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 270 + i32.const 16 + i32.const 271 i32.const 0 call $~lib/env/abort unreachable @@ -1465,8 +1476,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 271 + i32.const 16 + i32.const 272 i32.const 0 call $~lib/env/abort unreachable @@ -1477,8 +1488,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 272 + i32.const 16 + i32.const 273 i32.const 0 call $~lib/env/abort unreachable @@ -1491,8 +1502,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 274 + i32.const 16 + i32.const 275 i32.const 0 call $~lib/env/abort unreachable @@ -1503,8 +1514,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 275 + i32.const 16 + i32.const 276 i32.const 0 call $~lib/env/abort unreachable @@ -1515,8 +1526,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 277 + i32.const 16 + i32.const 278 i32.const 0 call $~lib/env/abort unreachable @@ -1527,8 +1538,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 278 + i32.const 16 + i32.const 279 i32.const 0 call $~lib/env/abort unreachable @@ -1539,8 +1550,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 279 + i32.const 16 + i32.const 280 i32.const 0 call $~lib/env/abort unreachable @@ -1551,8 +1562,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 280 + i32.const 16 + i32.const 281 i32.const 0 call $~lib/env/abort unreachable @@ -1563,8 +1574,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 281 + i32.const 16 + i32.const 282 i32.const 0 call $~lib/env/abort unreachable @@ -1575,8 +1586,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 284 + i32.const 16 + i32.const 285 i32.const 0 call $~lib/env/abort unreachable @@ -1587,8 +1598,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 285 + i32.const 16 + i32.const 286 i32.const 0 call $~lib/env/abort unreachable @@ -1599,8 +1610,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 286 + i32.const 16 + i32.const 287 i32.const 0 call $~lib/env/abort unreachable @@ -1611,8 +1622,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 287 + i32.const 16 + i32.const 288 i32.const 0 call $~lib/env/abort unreachable @@ -1623,8 +1634,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 289 + i32.const 16 + i32.const 290 i32.const 0 call $~lib/env/abort unreachable @@ -1635,8 +1646,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 290 + i32.const 16 + i32.const 291 i32.const 0 call $~lib/env/abort unreachable @@ -1647,8 +1658,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 292 + i32.const 16 + i32.const 293 i32.const 0 call $~lib/env/abort unreachable @@ -1665,8 +1676,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 293 + i32.const 16 + i32.const 294 i32.const 0 call $~lib/env/abort unreachable @@ -1683,8 +1694,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 294 + i32.const 16 + i32.const 295 i32.const 0 call $~lib/env/abort unreachable @@ -1704,8 +1715,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 295 + i32.const 16 + i32.const 296 i32.const 0 call $~lib/env/abort unreachable @@ -1725,8 +1736,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 296 + i32.const 16 + i32.const 297 i32.const 0 call $~lib/env/abort unreachable @@ -1746,8 +1757,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 297 + i32.const 16 + i32.const 298 i32.const 0 call $~lib/env/abort unreachable @@ -1767,8 +1778,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 298 + i32.const 16 + i32.const 299 i32.const 0 call $~lib/env/abort unreachable @@ -1787,8 +1798,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 299 + i32.const 16 + i32.const 300 i32.const 0 call $~lib/env/abort unreachable @@ -1807,8 +1818,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 300 + i32.const 16 + i32.const 301 i32.const 0 call $~lib/env/abort unreachable @@ -1823,8 +1834,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 313 + i32.const 16 + i32.const 314 i32.const 0 call $~lib/env/abort unreachable @@ -1835,8 +1846,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 314 + i32.const 16 + i32.const 315 i32.const 0 call $~lib/env/abort unreachable @@ -1851,8 +1862,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 315 + i32.const 16 + i32.const 316 i32.const 0 call $~lib/env/abort unreachable @@ -1863,8 +1874,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 316 + i32.const 16 + i32.const 317 i32.const 0 call $~lib/env/abort unreachable @@ -1875,8 +1886,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 317 + i32.const 16 + i32.const 318 i32.const 0 call $~lib/env/abort unreachable @@ -1887,8 +1898,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 318 + i32.const 16 + i32.const 319 i32.const 0 call $~lib/env/abort unreachable @@ -1899,8 +1910,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 319 + i32.const 16 + i32.const 320 i32.const 0 call $~lib/env/abort unreachable @@ -1911,8 +1922,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 320 + i32.const 16 + i32.const 321 i32.const 0 call $~lib/env/abort unreachable @@ -1923,8 +1934,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 322 + i32.const 16 + i32.const 323 i32.const 0 call $~lib/env/abort unreachable @@ -1935,8 +1946,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 323 + i32.const 16 + i32.const 324 i32.const 0 call $~lib/env/abort unreachable @@ -1947,8 +1958,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 324 + i32.const 16 + i32.const 325 i32.const 0 call $~lib/env/abort unreachable @@ -1959,8 +1970,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 325 + i32.const 16 + i32.const 326 i32.const 0 call $~lib/env/abort unreachable @@ -1971,8 +1982,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 326 + i32.const 16 + i32.const 327 i32.const 0 call $~lib/env/abort unreachable @@ -1983,8 +1994,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 327 + i32.const 16 + i32.const 328 i32.const 0 call $~lib/env/abort unreachable @@ -1995,8 +2006,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 328 + i32.const 16 + i32.const 329 i32.const 0 call $~lib/env/abort unreachable @@ -2007,8 +2018,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 329 + i32.const 16 + i32.const 330 i32.const 0 call $~lib/env/abort unreachable @@ -2019,8 +2030,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 330 + i32.const 16 + i32.const 331 i32.const 0 call $~lib/env/abort unreachable @@ -2031,8 +2042,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 330 + i32.const 16 + i32.const 331 i32.const 29 call $~lib/env/abort unreachable @@ -2043,8 +2054,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 331 + i32.const 16 + i32.const 332 i32.const 0 call $~lib/env/abort unreachable @@ -2055,8 +2066,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 331 + i32.const 16 + i32.const 332 i32.const 29 call $~lib/env/abort unreachable @@ -2067,8 +2078,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 333 + i32.const 16 + i32.const 334 i32.const 0 call $~lib/env/abort unreachable @@ -2079,8 +2090,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 334 + i32.const 16 + i32.const 335 i32.const 0 call $~lib/env/abort unreachable @@ -2091,8 +2102,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 335 + i32.const 16 + i32.const 336 i32.const 0 call $~lib/env/abort unreachable @@ -2103,8 +2114,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 336 + i32.const 16 + i32.const 337 i32.const 0 call $~lib/env/abort unreachable @@ -2115,8 +2126,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 337 + i32.const 16 + i32.const 338 i32.const 0 call $~lib/env/abort unreachable @@ -2127,8 +2138,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 338 + i32.const 16 + i32.const 339 i32.const 0 call $~lib/env/abort unreachable @@ -2139,8 +2150,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 340 + i32.const 16 + i32.const 341 i32.const 0 call $~lib/env/abort unreachable @@ -2151,8 +2162,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 341 + i32.const 16 + i32.const 342 i32.const 0 call $~lib/env/abort unreachable @@ -2163,8 +2174,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 342 + i32.const 16 + i32.const 343 i32.const 0 call $~lib/env/abort unreachable @@ -2175,8 +2186,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 343 + i32.const 16 + i32.const 344 i32.const 0 call $~lib/env/abort unreachable @@ -2187,8 +2198,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 344 + i32.const 16 + i32.const 345 i32.const 0 call $~lib/env/abort unreachable @@ -2199,8 +2210,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 345 + i32.const 16 + i32.const 346 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/empty.ts b/tests/compiler/empty.ts index 26349bc92e..e69de29bb2 100644 --- a/tests/compiler/empty.ts +++ b/tests/compiler/empty.ts @@ -1,8 +0,0 @@ -import "allocator/arena"; - -var arr: i32[] = [1, 2, 3]; - -assert(arr.length == 3); -assert(arr[0] == 1); -assert(arr[1] == 2); -assert(arr[2] == 3); diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index b03c49fe60..19cf3e7627 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -1,8 +1,8 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) @@ -12,8 +12,8 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00\06\00\00\001\002\003") (data (i32.const 24) "\01\00\00\00\1a\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s") - (data (i32.const 64) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 112) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 104) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") (data (i32.const 152) "\01") (data (i32.const 160) "\01\00\00\00\16\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e") (data (i32.const 192) "\01\00\00\00$\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e") @@ -54,7 +54,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -77,15 +77,15 @@ i32.add i32.const -8 i32.and - local.tee $2 + local.tee $0 current_memory - local.tee $3 + local.tee $2 i32.const 16 i32.shl i32.gt_u if - local.get $3 local.get $2 + local.get $0 local.get $1 i32.sub i32.const 65535 @@ -94,16 +94,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 + local.tee $3 + local.get $2 local.get $3 - local.get $0 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $0 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -112,11 +112,11 @@ end end end - local.get $2 + local.get $0 global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocRaw (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -126,7 +126,7 @@ i32.clz i32.sub i32.shl - call $~lib/allocator/arena/__memory_allocate + call $~lib/memory/memory.allocate local.tee $1 i32.const -1520547049 i32.store @@ -137,293 +137,315 @@ i32.const 8 i32.add ) - (func $~lib/util/memory/memset (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $1 - i32.eqz - if - return - end - local.get $0 - i32.const 0 - i32.store8 + (func $~lib/runtime/assertUnregistered (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) 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.const 740 i32.le_u if - return - end - local.get $0 - i32.const 1 - i32.add - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $2 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 6 - i32.le_u - if - return + i32.const 0 + i32.const 72 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable end local.get $0 - i32.const 3 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $1 i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 i32.sub - i32.const 3 - i32.and - local.tee $2 - local.get $0 - i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $1 - local.get $0 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 8 - i32.le_u + i32.load + i32.const -1520547049 + i32.ne if - return + i32.const 0 + i32.const 72 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable end + ) + (func $~lib/runtime/doRegister (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 4 - i32.add - i32.const 0 - i32.store + call $~lib/runtime/assertUnregistered local.get $0 i32.const 8 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 12 i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 8 - i32.sub - i32.const 0 - i32.store local.get $1 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 16 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 20 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 16 - i32.sub - i32.const 0 i32.store local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $2 - local.get $0 - i32.add - local.set $0 - local.get $1 - local.get $2 - i32.sub - local.set $1 - loop $continue|0 - 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 ) - (func $~lib/runtime/runtime.unref (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 748 - i32.lt_u - if + (func $~lib/memory/memory.fill (; 5 ;) (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.const 120 - i32.const 117 + 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 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 8 - i32.sub - local.tee $0 - i32.load - i32.const -1520547049 - i32.ne - if + 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 - i32.const 120 - i32.const 119 + 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 - call $~lib/env/abort - unreachable + 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 - local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741816 i32.gt_u if i32.const 0 - i32.const 72 + i32.const 112 i32.const 24 - i32.const 59 + i32.const 43 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/runtime.allocRaw + call $~lib/runtime/doAllocate local.tee $1 local.get $0 - call $~lib/util/memory/memset + call $~lib/memory/memory.fill local.get $1 - local.tee $0 - call $~lib/runtime/runtime.unref - i32.const 2 - i32.store - local.get $0 + i32.const 3 + call $~lib/runtime/doRegister ) - (func $~lib/map/Map#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 - i32.const 3 + i32.const 3 + i32.store offset=4 + local.get $0 + i32.const 48 + call $~lib/arraybuffer/ArrayBuffer#constructor + i32.store offset=8 + local.get $0 + i32.const 4 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + ) + (func $~lib/map/Map#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/runtime/doAllocate + i32.const 2 + call $~lib/runtime/doRegister + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 i32.store offset=4 local.get $0 - i32.const 48 - call $~lib/arraybuffer/ArrayBuffer#constructor + i32.const 0 i32.store offset=8 local.get $0 - i32.const 4 + i32.const 0 i32.store offset=12 local.get $0 i32.const 0 @@ -431,11 +453,16 @@ local.get $0 i32.const 0 i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 ) - (func $~lib/map/Map#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 9 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/doAllocate + i32.const 4 + call $~lib/runtime/doRegister local.tee $0 i32.const 0 i32.store @@ -458,7 +485,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hashStr (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hashStr (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -496,7 +523,7 @@ end local.get $1 ) - (func $~lib/util/string/compareImpl (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 @@ -529,7 +556,7 @@ end local.get $3 ) - (func $~lib/string/String.eq (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.eq (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -575,7 +602,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/map/Map#find (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#find (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $0 @@ -618,7 +645,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -719,7 +746,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -808,7 +835,7 @@ i32.store end ) - (func $~lib/util/hash/hash32 (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -839,7 +866,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -882,7 +909,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -983,7 +1010,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1073,7 +1100,7 @@ i32.store end ) - (func $~lib/symbol/_Symbol.for (; 18 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/symbol/_Symbol.for (; 20 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) global.get $~lib/symbol/stringToId if @@ -1098,7 +1125,7 @@ else call $~lib/map/Map#constructor global.set $~lib/symbol/stringToId - call $~lib/map/Map#constructor + call $~lib/map/Map#constructor global.set $~lib/symbol/idToString end global.get $~lib/symbol/nextId @@ -1119,7 +1146,7 @@ call $~lib/map/Map#set local.get $0 ) - (func $~lib/map/Map#has (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1128,7 +1155,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1142,7 +1169,7 @@ unreachable end ) - (func $~lib/symbol/_Symbol.keyFor (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.keyFor (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) global.get $~lib/symbol/idToString i32.const 0 @@ -1163,7 +1190,7 @@ i32.const 0 end ) - (func $~lib/util/memory/memcpy (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2060,211 +2087,204 @@ i32.store8 end ) - (func $~lib/util/memory/memmove (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if - local.get $0 + block $~lib/util/memory/memmove|inlined.0 local.get $2 - i32.add - local.get $1 - i32.le_u local.set $3 - end - local.get $3 - if + local.get $1 local.get $0 + local.tee $2 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 local.get $1 + local.get $3 + i32.add local.get $2 - call $~lib/util/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and + i32.le_u + local.tee $0 + i32.eqz + if + local.get $2 + local.get $3 + i32.add + local.get $1 + i32.le_u + local.set $0 + end local.get $0 - i32.const 7 - i32.and - i32.eq if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if + local.get $2 + local.get $1 + local.get $3 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $2 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 local.get $2 - i32.eqz + i32.const 7 + i32.and + if + local.get $3 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $3 + i32.const 1 + i32.sub + local.set $3 + local.get $2 + local.tee $4 + i32.const 1 + i32.add + local.set $2 + local.get $1 + local.tee $0 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $0 + i32.load8_u + i32.store8 + br $continue|0 + end + end + loop $continue|1 + local.get $3 + i32.const 8 + i32.ge_u if - return + local.get $2 + local.get $1 + i64.load + i64.store + local.get $3 + i32.const 8 + i32.sub + local.set $3 + local.get $2 + i32.const 8 + i32.add + local.set $2 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 end + end + end + loop $continue|2 + local.get $3 + if local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 local.tee $4 i32.const 1 i32.add - local.set $0 + local.set $2 local.get $1 - local.tee $3 + local.tee $0 i32.const 1 i32.add local.set $1 local.get $4 - local.get $3 + local.get $0 i32.load8_u i32.store8 - br $continue|0 + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $continue|2 end end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store + else + local.get $1 + i32.const 7 + i32.and + local.get $2 + i32.const 7 + i32.and + i32.eq + if + loop $continue|3 local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 + local.get $3 i32.add - local.set $0 - local.get $1 + i32.const 7 + i32.and + if + local.get $3 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $3 + i32.const 1 + i32.sub + local.tee $3 + local.get $2 + i32.add + local.get $1 + local.get $3 + i32.add + i32.load8_u + i32.store8 + br $continue|3 + end + end + loop $continue|4 + local.get $3 i32.const 8 - i32.add - local.set $1 - br $continue|1 + i32.ge_u + if + local.get $3 + i32.const 8 + i32.sub + local.tee $3 + local.get $2 + i32.add + local.get $1 + local.get $3 + i32.add + i64.load + i64.store + br $continue|4 + end end end - end - loop $continue|2 - local.get $2 - if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 + loop $continue|5 local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and if - local.get $2 - i32.eqz - if - return - end - local.get $2 + local.get $3 i32.const 1 i32.sub - local.tee $2 - local.get $0 + local.tee $3 + local.get $2 i32.add local.get $1 - local.get $2 + local.get $3 i32.add i32.load8_u i32.store8 - br $continue|3 - end - end - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - br $continue|4 + br $continue|5 end end end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end end ) - (func $~lib/memory/memory.copy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memmove - ) - (func $~lib/string/String#concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2273,7 +2293,7 @@ if i32.const 0 i32.const 528 - i32.const 67 + i32.const 65 i32.const 4 call $~lib/env/abort unreachable @@ -2308,7 +2328,7 @@ return end local.get $2 - call $~lib/runtime/runtime.allocRaw + call $~lib/runtime/doAllocate local.tee $2 local.get $0 local.get $3 @@ -2320,12 +2340,10 @@ local.get $4 call $~lib/memory/memory.copy local.get $2 - call $~lib/runtime/runtime.unref i32.const 1 - i32.store - local.get $2 + call $~lib/runtime/doRegister ) - (func $~lib/string/String.concat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.concat (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 512 local.get $0 @@ -2333,7 +2351,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/symbol/_Symbol#toString (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol#toString (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 160 @@ -2417,7 +2435,7 @@ i32.const 568 call $~lib/string/String.concat ) - (func $start:std/symbol (; 28 ;) (type $FUNCSIG$v) + (func $start:std/symbol (; 29 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/symbol/nextId local.tee $0 @@ -2594,10 +2612,10 @@ unreachable end ) - (func $start (; 29 ;) (type $FUNCSIG$v) + (func $start (; 30 ;) (type $FUNCSIG$v) call $start:std/symbol ) - (func $null (; 30 ;) (type $FUNCSIG$v) + (func $null (; 31 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 2ba25bb066..89dc229054 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -1,8 +1,8 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viii (func (param 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))) @@ -12,8 +12,8 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00\06\00\00\001\002\003\00") (data (i32.const 24) "\01\00\00\00\1a\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s\00") - (data (i32.const 64) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 112) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 104) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") (data (i32.const 152) "\01\00\00\00\00\00\00\00") (data (i32.const 160) "\01\00\00\00\16\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00") (data (i32.const 192) "\01\00\00\00$\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00") @@ -36,14 +36,17 @@ (data (i32.const 680) "\01\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/symbol/nextId (mut i32) (i32.const 12)) (global $std/symbol/sym1 (mut i32) (i32.const 0)) (global $std/symbol/sym2 (mut i32) (i32.const 0)) (global $~lib/symbol/stringToId (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/gc/gc.implemented i32 (i32.const 0)) - (global $~lib/runtime/ArrayBufferView.MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/symbol/idToString (mut i32) (i32.const 0)) (global $std/symbol/sym3 (mut i32) (i32.const 0)) (global $std/symbol/sym4 (mut i32) (i32.const 0)) @@ -78,449 +81,461 @@ end local.get $2 ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/adjustToBlock (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/arena/__memory_allocate return ) - (func $~lib/runtime/runtime.adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 8 - i32.add - i32.const 1 - i32.sub - i32.clz - i32.sub - i32.shl - ) - (func $~lib/runtime/runtime.allocRaw (; 5 ;) (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.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/runtime/adjustToBlock call $~lib/memory/memory.allocate local.set $1 local.get $1 - i32.const -1520547049 + global.get $~lib/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/util/memory/memset (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i64) - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 + (func $~lib/runtime/ALLOCATE (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 + call $~lib/runtime/doAllocate + ) + (func $~lib/runtime/assertUnregistered (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz if - return + i32.const 0 + i32.const 72 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable end local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 + global.get $~lib/runtime/HEADER_SIZE i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz if - return + i32.const 0 + i32.const 72 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable end - i32.const 0 + ) + (func $~lib/runtime/doRegister (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 + call $~lib/runtime/assertUnregistered local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 + global.get $~lib/runtime/HEADER_SIZE i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 i32.store local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - end - br $continue|0 - end - end - end ) - (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memset - ) - (func $~lib/runtime/runtime.alloc (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - call $~lib/runtime/runtime.allocRaw - local.set $1 - local.get $1 - i32.const 0 - local.get $0 - call $~lib/memory/memory.fill - local.get $1 - ) - (func $~lib/runtime/runtime.unref (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.const 8 - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 117 + (func $~lib/memory/memory.fill (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $0 + local.set $3 + local.get $1 + local.set $4 + local.get $2 + local.set $5 + local.get $5 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 1 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 1 + i32.add + local.get $4 + i32.store8 + local.get $3 + i32.const 2 + i32.add + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 2 + i32.sub + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 3 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 3 + i32.add + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 8 - i32.sub - local.set $1 - local.get $1 - i32.load - i32.const -1520547049 - i32.eq - i32.eqz - if + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end i32.const 0 - i32.const 120 - i32.const 119 + local.get $3 + i32.sub + i32.const 3 + i32.and + local.set $6 + local.get $3 + local.get $6 + i32.add + local.set $3 + local.get $5 + local.get $6 + i32.sub + local.set $5 + local.get $5 + i32.const -4 + i32.and + local.set $5 + i32.const -1 + i32.const 255 + i32.div_u + local.get $4 + i32.const 255 + i32.and + i32.mul + local.set $7 + local.get $3 + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add i32.const 4 - call $~lib/env/abort - unreachable + i32.sub + local.get $7 + i32.store + local.get $5 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 4 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 8 + i32.add + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 12 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 8 + i32.sub + local.get $7 + i32.store + local.get $5 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 12 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 16 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 20 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 24 + i32.add + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 28 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 24 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 20 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 16 + i32.sub + local.get $7 + i32.store + i32.const 24 + local.get $3 + i32.const 4 + i32.and + i32.add + local.set $6 + local.get $3 + local.get $6 + i32.add + local.set $3 + local.get $5 + local.get $6 + i32.sub + local.set $5 + local.get $7 + i64.extend_i32_u + local.get $7 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $8 + block $break|0 + loop $continue|0 + local.get $5 + i32.const 32 + i32.ge_u + if + block + local.get $3 + local.get $8 + i64.store + local.get $3 + i32.const 8 + i32.add + local.get $8 + i64.store + local.get $3 + i32.const 16 + i32.add + local.get $8 + i64.store + local.get $3 + i32.const 24 + i32.add + local.get $8 + i64.store + local.get $5 + i32.const 32 + i32.sub + local.set $5 + local.get $3 + i32.const 32 + i32.add + local.set $3 + end + br $continue|0 + end + end + end end - local.get $1 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 - global.get $~lib/runtime/ArrayBufferView.MAX_BYTELENGTH + global.get $~lib/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 - i32.const 72 + i32.const 112 i32.const 24 - i32.const 59 + i32.const 43 call $~lib/env/abort unreachable end - block $~lib/runtime/runtime.register|inlined.0 (result i32) + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) local.get $1 - call $~lib/runtime/runtime.alloc local.set $2 local.get $2 - call $~lib/runtime/runtime.unref - i32.const 2 - i32.store + call $~lib/runtime/doAllocate + end + local.set $3 + local.get $3 + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + block $~lib/runtime/REGISTER|inlined.0 (result i32) + local.get $3 + local.set $2 local.get $2 + i32.const 3 + call $~lib/runtime/doRegister end ) - (func $~lib/map/Map#clear (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -546,13 +561,20 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 2 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -578,7 +600,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#clear (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -604,13 +626,20 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 24 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 24 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 4 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -636,15 +665,15 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/string/String#get:length (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 8 + global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 i32.const 1 i32.shr_u ) - (func $~lib/util/hash/hashStr (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hashStr (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -686,7 +715,7 @@ end local.get $1 ) - (func $~lib/util/string/compareImpl (; 17 ;) (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 (; 16 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -739,7 +768,7 @@ end local.get $5 ) - (func $~lib/string/String.eq (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.eq (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -783,7 +812,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/map/Map#find (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -834,7 +863,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -849,7 +878,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -871,7 +900,7 @@ unreachable end ) - (func $~lib/map/Map#rehash (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1005,7 +1034,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1109,7 +1138,7 @@ i32.store end ) - (func $~lib/util/hash/hash32 (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -1151,7 +1180,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1202,7 +1231,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1336,7 +1365,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1440,7 +1469,7 @@ i32.store end ) - (func $~lib/symbol/_Symbol.for (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.for (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) global.get $~lib/symbol/stringToId @@ -1487,7 +1516,7 @@ call $~lib/map/Map#set local.get $2 ) - (func $~lib/map/Map#has (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1502,7 +1531,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -1524,7 +1553,7 @@ unreachable end ) - (func $~lib/symbol/_Symbol.keyFor (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.keyFor (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) global.get $~lib/symbol/idToString i32.const 0 @@ -1545,7 +1574,7 @@ i32.const 0 end ) - (func $~lib/util/memory/memcpy (; 32 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2746,240 +2775,245 @@ i32.store8 end ) - (func $~lib/util/memory/memmove (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 32 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/util/memory/memmove|inlined.0 local.get $0 - i32.const 7 - i32.and + local.set $3 + local.get $1 + local.set $4 + local.get $2 + local.set $5 + local.get $3 + local.get $4 i32.eq if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and + br $~lib/util/memory/memmove|inlined.0 + end + local.get $4 + local.get $5 + i32.add + local.get $3 + i32.le_u + local.tee $6 + if (result i32) + local.get $6 + else + local.get $3 + local.get $5 + i32.add + local.get $4 + i32.le_u + end + if + local.get $3 + local.get $4 + local.get $5 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $3 + local.get $4 + i32.lt_u + if + local.get $4 + i32.const 7 + i32.and + local.get $3 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $3 + i32.const 7 + i32.and + if + block + local.get $5 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $5 + i32.const 1 + i32.sub + local.set $5 + block (result i32) + local.get $3 + local.tee $6 + i32.const 1 + i32.add + local.set $3 + local.get $6 + end + block (result i32) + local.get $4 + local.tee $6 + i32.const 1 + i32.add + local.set $4 + local.get $6 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $5 + i32.const 8 + i32.ge_u + if + block + local.get $3 + local.get $4 + i64.load + i64.store + local.get $5 + i32.const 8 + i32.sub + local.set $5 + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $4 + i32.const 8 + i32.add + local.set $4 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $5 if block - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 block (result i32) - local.get $0 - local.tee $3 + local.get $3 + local.tee $6 i32.const 1 i32.add - local.set $0 - local.get $3 + local.set $3 + local.get $6 end block (result i32) - local.get $1 - local.tee $3 + local.get $4 + local.tee $6 i32.const 1 i32.add - local.set $1 - local.get $3 + local.set $4 + local.get $6 end i32.load8_u i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 + local.get $5 + i32.const 1 i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 + local.set $5 end - br $continue|1 + br $continue|2 end end end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 + else + local.get $4 + i32.const 7 + i32.and + local.get $3 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $3 + local.get $5 + i32.add + i32.const 7 + i32.and + if + block + local.get $5 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $3 + local.get $5 + i32.const 1 + i32.sub + local.tee $5 + i32.add + local.get $4 + local.get $5 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 end - br $continue|2 end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return + block $break|4 + loop $continue|4 + local.get $5 + i32.const 8 + i32.ge_u + if + block + local.get $5 + i32.const 8 + i32.sub + local.set $5 + local.get $3 + local.get $5 + i32.add + local.get $4 + local.get $5 + i32.add + i64.load + i64.store end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 + br $continue|4 end - br $continue|3 end end end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u + block $break|5 + loop $continue|5 + local.get $5 if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 + local.get $3 + local.get $5 + i32.const 1 + i32.sub + local.tee $5 + i32.add + local.get $4 + local.get $5 + i32.add + i32.load8_u + i32.store8 + br $continue|5 end end end end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end end ) - (func $~lib/memory/memory.copy (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memmove - ) - (func $~lib/string/String#concat (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2992,7 +3026,7 @@ if i32.const 0 i32.const 528 - i32.const 67 + i32.const 65 i32.const 4 call $~lib/env/abort unreachable @@ -3025,30 +3059,32 @@ i32.const 160 return end - local.get $4 - call $~lib/runtime/runtime.allocRaw - local.set $5 - local.get $5 + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + local.get $4 + local.set $5 + local.get $5 + call $~lib/runtime/doAllocate + end + local.set $6 + local.get $6 local.get $0 local.get $2 call $~lib/memory/memory.copy - local.get $5 + local.get $6 local.get $2 i32.add local.get $1 local.get $3 call $~lib/memory/memory.copy - block $~lib/runtime/runtime.register|inlined.0 (result i32) - local.get $5 - local.set $6 + block $~lib/runtime/REGISTER|inlined.0 (result i32) local.get $6 - call $~lib/runtime/runtime.unref + local.set $5 + local.get $5 i32.const 1 - i32.store - local.get $6 + call $~lib/runtime/doRegister end ) - (func $~lib/string/String.concat (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.concat (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if @@ -3059,7 +3095,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/symbol/_Symbol#toString (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol#toString (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3245,7 +3281,7 @@ i32.const 568 call $~lib/string/String.concat ) - (func $start:std/symbol (; 38 ;) (type $FUNCSIG$v) + (func $start:std/symbol (; 36 ;) (type $FUNCSIG$v) i32.const 16 call $~lib/symbol/Symbol global.set $std/symbol/sym1 @@ -3414,9 +3450,9 @@ global.get $~lib/symbol/_Symbol.isConcatSpreadable drop ) - (func $start (; 39 ;) (type $FUNCSIG$v) + (func $start (; 37 ;) (type $FUNCSIG$v) call $start:std/symbol ) - (func $null (; 40 ;) (type $FUNCSIG$v) + (func $null (; 38 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 2aa793c49a..160c22ba1d 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1,24 +1,18 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$v (func)) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$viid (func (param i32 i32 f64))) (type $FUNCSIG$idd (func (param f64 f64) (result i32))) - (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$viij (func (param i32 i32 i64))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$jjjii (func (param i64 i64 i32 i32) (result i64))) - (type $FUNCSIG$viif (func (param i32 i32 f32))) (type $FUNCSIG$fffii (func (param f32 f32 i32 i32) (result f32))) (type $FUNCSIG$dddii (func (param f64 f64 i32 i32) (result f64))) (type $FUNCSIG$jjii (func (param i64 i32 i32) (result i64))) - (type $FUNCSIG$jii (func (param i32 i32) (result i64))) (type $FUNCSIG$ffii (func (param f32 i32 i32) (result f32))) - (type $FUNCSIG$fii (func (param i32 i32) (result f32))) (type $FUNCSIG$ddii (func (param f64 i32 i32) (result f64))) (type $FUNCSIG$ijii (func (param i64 i32 i32) (result i32))) (type $FUNCSIG$ifii (func (param f32 i32 i32) (result i32))) @@ -27,58 +21,45 @@ (type $FUNCSIG$vjii (func (param i64 i32 i32))) (type $FUNCSIG$vfii (func (param f32 i32 i32))) (type $FUNCSIG$vdii (func (param f64 i32 i32))) + (type $FUNCSIG$jii (func (param i32 i32) (result i64))) (type $FUNCSIG$fi (func (param i32) (result f32))) (type $FUNCSIG$di (func (param i32) (result f64))) (type $FUNCSIG$ff (func (param f32) (result f32))) (type $FUNCSIG$dd (func (param f64) (result f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\11\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 48) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 112) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 176) "\05\00\00\00\00\00\00\00\01\01\01\04\05") - (data (i32.const 192) "\b0\00\00\00\05") - (data (i32.const 200) "\05") - (data (i32.const 216) "\c8\00\00\00\05") - (data (i32.const 224) "\05\00\00\00\00\00\00\00\01\01") - (data (i32.const 240) "\e0\00\00\00\05") - (data (i32.const 248) "\05\00\00\00\00\00\00\00\01\01\00\02\02") - (data (i32.const 264) "\f8\00\00\00\05") - (data (i32.const 272) "\05\00\00\00\00\00\00\00\01\01\00\02\02") - (data (i32.const 288) "\10\01\00\00\05") - (data (i32.const 296) "\03") - (data (i32.const 312) "(\01\00\00\03") - (data (i32.const 320) "\05\00\00\00\00\00\00\00\01\00\00\00\02") - (data (i32.const 336) "@\01\00\00\05") - (data (i32.const 344) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") - (data (i32.const 376) "X\01\00\00\05") - (data (i32.const 384) "\14") - (data (i32.const 416) "\80\01\00\00\05") - (data (i32.const 424) "\14\00\00\00\00\00\00\00\01\00\00\00\01") - (data (i32.const 456) "\a8\01\00\00\05") - (data (i32.const 464) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 496) "\d0\01\00\00\05") - (data (i32.const 504) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 536) "\f8\01\00\00\05") - (data (i32.const 544) "\0c") - (data (i32.const 576) " \02\00\00\03") - (data (i32.const 584) "\14\00\00\00\00\00\00\00\01") - (data (i32.const 608) "\02") - (data (i32.const 616) "H\02\00\00\05") - (data (i32.const 624) "\0f\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 664) "\14\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 712) "\0c\00\00\00\00\00\00\00\n\00\00\00\0c\00\00\00\0e") - (data (i32.const 744) "\c8\02\00\00\03") - (data (i32.const 752) "\16\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 800) "\16\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 848) "\1f\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 920) "\1b\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 984) "$\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") - (data (i32.const 1048) "\d8\03\00\00\t") - (data (i32.const 1056) "!\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 1128) "+\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 8) "\01\00\00\00\"\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 56) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 96) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 144) "\02\00\00\00\05\00\00\00\01\01\01\04\05") + (data (i32.const 160) "\02\00\00\00\05") + (data (i32.const 176) "\02\00\00\00\05\00\00\00\01\01") + (data (i32.const 192) "\02\00\00\00\05\00\00\00\01\01\00\02\02") + (data (i32.const 208) "\02\00\00\00\05\00\00\00\01\01\00\02\02") + (data (i32.const 224) "\02\00\00\00\03") + (data (i32.const 240) "\02\00\00\00\05\00\00\00\01\00\00\00\02") + (data (i32.const 256) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") + (data (i32.const 288) "\02\00\00\00\14") + (data (i32.const 320) "\02\00\00\00\14\00\00\00\01\00\00\00\01") + (data (i32.const 352) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") + (data (i32.const 384) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") + (data (i32.const 416) "\02\00\00\00\0c") + (data (i32.const 440) "\02\00\00\00\14\00\00\00\01") + (data (i32.const 464) "\02") + (data (i32.const 472) "\01\00\00\00\1e\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 512) "\01\00\00\00(\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 560) "\02\00\00\00\0c\00\00\00\n\00\00\00\0c\00\00\00\0e") + (data (i32.const 584) "\10\00\00\00\10\00\00\008\02\00\008\02\00\00D\02\00\00\03") + (data (i32.const 608) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 664) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 720) "\01\00\00\00>\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 792) "\01\00\00\006\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 856) "\02\00\00\00$\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") + (data (i32.const 904) "\10\00\00\00\10\00\00\00`\03\00\00`\03\00\00\84\03\00\00\t") + (data (i32.const 928) "\01\00\00\00B\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 1008) "\01\00\00\00V\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") (table $0 112 funcref) - (elem (i32.const 0) $null $~lib/internal/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0) + (elem (i32.const 0) $null $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/typedarray/arr (mut i32) (i32.const 0)) @@ -95,12 +76,12 @@ (global $std/typedarray/multisubarr3 (mut i32) (i32.const 0)) (global $std/typedarray/forEachCallCount (mut i32) (i32.const 0)) (global $std/typedarray/forEachSelf (mut i32) (i32.const 0)) - (global $std/typedarray/forEachValues (mut i32) (i32.const 744)) - (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 1048)) + (global $std/typedarray/forEachValues (mut i32) (i32.const 592)) + (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 912)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -123,15 +104,15 @@ i32.add i32.const -8 i32.and - local.tee $2 + local.tee $0 current_memory - local.tee $3 + local.tee $2 i32.const 16 i32.shl i32.gt_u if - local.get $3 local.get $2 + local.get $0 local.get $1 i32.sub i32.const 65535 @@ -140,16 +121,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 + local.tee $3 + local.get $2 local.get $3 - local.get $0 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $0 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -158,23 +139,12 @@ end end end - local.get $2 + local.get $0 global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 112 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end i32.const 1 i32.const 32 local.get $0 @@ -183,273 +153,329 @@ i32.clz i32.sub i32.shl - call $~lib/allocator/arena/__memory_allocate + call $~lib/memory/memory.allocate local.tee $1 - local.get $0 + i32.const -1520547049 i32.store local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add ) - (func $~lib/internal/memory/memset (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) - local.get $2 - i32.eqz + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 1 + i32.add + local.get $1 + i32.store8 + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + local.tee $3 + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $3 + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $3 + i32.sub + local.set $2 + local.get $0 + local.get $3 + i32.add + local.tee $0 + local.get $1 + i32.const 255 + i32.and + i32.const 16843009 + i32.mul + local.tee $1 + i32.store + local.get $2 + i32.const -4 + i32.and + local.tee $2 + local.get $0 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $2 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + local.tee $3 + i32.const 12 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 8 + i32.sub + local.get $1 + i32.store + local.get $2 + i32.const 24 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + local.tee $3 + i32.const 28 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 24 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 20 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 16 + i32.sub + local.get $1 + i32.store + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $3 + local.get $0 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $1 + i64.extend_i32_u + local.tee $4 + local.get $4 + i64.const 32 + i64.shl + i64.or + local.set $4 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + local.get $0 + local.get $4 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $4 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $4 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $continue|0 + end + end + end + ) + (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 1104 + i32.le_u if - return + i32.const 0 + i32.const 64 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable end local.get $0 - local.get $1 - i32.store8 + i32.const 8 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 64 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - local.get $2 - i32.add - i32.const 1 + call $~lib/runtime/assertUnregistered + local.get $0 + i32.const 8 i32.sub local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u + i32.store + local.get $0 + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 1073741816 + i32.gt_u if - return + i32.const 0 + i32.const 104 + i32.const 24 + i32.const 43 + call $~lib/env/abort + unreachable end local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 + call $~lib/runtime/doAllocate + local.tee $1 + i32.const 0 local.get $0 + call $~lib/memory/memory.fill + local.get $1 i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - local.tee $3 - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $2 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.sub - local.set $2 - local.get $0 - local.get $3 - i32.add - local.tee $0 - local.get $1 - i32.const 255 - i32.and - i32.const 16843009 - i32.mul - local.tee $1 - i32.store - local.get $2 - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.add - local.tee $3 - i32.const 12 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 8 - i32.sub - local.get $1 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.add - local.tee $3 - i32.const 28 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 24 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 20 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 16 - i32.sub - local.get $1 - i32.store - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - local.get $0 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $1 - i64.extend_i32_u - local.tee $4 - local.get $4 - i64.const 32 - i64.shl - i64.or - local.set $4 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - local.get $0 - local.get $4 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $continue|0 - end - end - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + call $~lib/runtime/doRegister + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1073741816 + local.get $2 + i32.shr_u i32.gt_u if i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 + i32.const 64 + i32.const 223 + i32.const 57 call $~lib/env/abort unreachable end local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $2 - i32.const 8 - i32.add - i32.const 0 - local.get $1 - call $~lib/internal/memory/memset + local.get $2 + i32.shl + local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $2 local.get $0 i32.eqz if i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/doAllocate + i32.const 3 + call $~lib/runtime/doRegister local.set $0 end local.get $0 @@ -465,212 +491,130 @@ local.get $2 i32.store local.get $0 - i32.const 0 + local.get $2 i32.store offset=4 local.get $0 local.get $1 + local.get $2 + i32.add i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Int8Array#constructor (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 4 + call $~lib/runtime/doRegister + local.get $0 + i32.const 0 + call $~lib/runtime/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Uint8Array#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.set $0 + call $~lib/runtime/doAllocate + i32.const 5 + call $~lib/runtime/doRegister end - local.get $0 local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 0 + call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint8ClampedArray#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/doAllocate + i32.const 6 + call $~lib/runtime/doRegister local.get $0 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8Array#constructor ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - i32.const 536870908 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 + (func $~lib/typedarray/Int16Array#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 7 + call $~lib/runtime/doRegister + local.get $0 i32.const 1 - i32.shl - local.tee $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $2 + call $~lib/runtime/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Uint16Array#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 12 + call $~lib/runtime/doAllocate i32.const 8 - i32.add - i32.const 0 - local.get $1 - call $~lib/internal/memory/memset - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - local.get $2 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $1 - i32.store offset=8 + call $~lib/runtime/doRegister local.get $0 + i32.const 1 + call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int16Array#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/doAllocate + i32.const 9 + call $~lib/runtime/doRegister local.get $0 - call $~lib/internal/typedarray/TypedArray#constructor - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 i32.const 2 - i32.shl - local.tee $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $2 - i32.const 8 - i32.add - i32.const 0 - local.get $1 - call $~lib/internal/memory/memset - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - local.get $2 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $1 - i32.store offset=8 - local.get $0 + call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int32Array#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/doAllocate + i32.const 10 + call $~lib/runtime/doRegister local.get $0 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - i32.const 134217727 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 3 - i32.shl - local.tee $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $2 - i32.const 8 - i32.add - i32.const 0 - local.get $1 - call $~lib/internal/memory/memset - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - local.get $2 - i32.store + (func $~lib/typedarray/Int64Array#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 11 + call $~lib/runtime/doRegister local.get $0 - i32.const 0 - i32.store offset=4 + i32.const 3 + call $~lib/runtime/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Uint64Array#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 12 + call $~lib/runtime/doRegister local.get $0 - local.get $1 - i32.store offset=8 + i32.const 3 + call $~lib/runtime/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Float32Array#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 13 + call $~lib/runtime/doRegister local.get $0 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int64Array#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/doAllocate + i32.const 14 + call $~lib/runtime/doRegister local.get $0 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 3 + call $~lib/runtime/ArrayBufferView#constructor ) - (func $std/typedarray/testInstantiate (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/typedarray/testInstantiate (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) - i32.const 0 local.get $0 call $~lib/typedarray/Int8Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 16 i32.const 34 i32.const 2 call $~lib/env/abort @@ -678,23 +622,29 @@ end local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 35 i32.const 2 call $~lib/env/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 36 i32.const 2 call $~lib/env/abort @@ -702,12 +652,15 @@ end i32.const 0 local.get $0 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 16 i32.const 39 i32.const 2 call $~lib/env/abort @@ -715,23 +668,29 @@ end local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 40 i32.const 2 call $~lib/env/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 41 i32.const 2 call $~lib/env/abort @@ -741,9 +700,12 @@ call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 16 i32.const 44 i32.const 2 call $~lib/env/abort @@ -751,23 +713,29 @@ end local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 45 i32.const 2 call $~lib/env/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 46 i32.const 2 call $~lib/env/abort @@ -777,9 +745,12 @@ call $~lib/typedarray/Int16Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 16 i32.const 49 i32.const 2 call $~lib/env/abort @@ -787,39 +758,48 @@ end local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub local.get $0 i32.const 1 i32.shl i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 50 i32.const 2 call $~lib/env/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub i32.const 1 i32.shr_u + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 51 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 16 i32.const 54 i32.const 2 call $~lib/env/abort @@ -827,27 +807,33 @@ end local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub local.get $0 i32.const 1 i32.shl i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 55 i32.const 2 call $~lib/env/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub i32.const 1 i32.shr_u + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 56 i32.const 2 call $~lib/env/abort @@ -857,9 +843,12 @@ call $~lib/typedarray/Int32Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 16 i32.const 59 i32.const 2 call $~lib/env/abort @@ -867,39 +856,48 @@ end local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub local.get $0 i32.const 2 i32.shl i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 60 i32.const 2 call $~lib/env/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub i32.const 2 i32.shr_u + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 61 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 16 i32.const 64 i32.const 2 call $~lib/env/abort @@ -907,27 +905,33 @@ end local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub local.get $0 i32.const 2 i32.shl i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 65 i32.const 2 call $~lib/env/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub i32.const 2 i32.shr_u + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 66 i32.const 2 call $~lib/env/abort @@ -937,9 +941,12 @@ call $~lib/typedarray/Int64Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 16 i32.const 69 i32.const 2 call $~lib/env/abort @@ -947,39 +954,48 @@ end local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub local.get $0 i32.const 3 i32.shl i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 70 i32.const 2 call $~lib/env/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub i32.const 3 i32.shr_u + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 71 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 16 i32.const 74 i32.const 2 call $~lib/env/abort @@ -987,39 +1003,48 @@ end local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub local.get $0 i32.const 3 i32.shl i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 75 i32.const 2 call $~lib/env/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub i32.const 3 i32.shr_u + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 76 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 16 i32.const 79 i32.const 2 call $~lib/env/abort @@ -1027,39 +1052,48 @@ end local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub local.get $0 i32.const 2 i32.shl i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 80 i32.const 2 call $~lib/env/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub i32.const 2 i32.shr_u + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 81 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 16 i32.const 84 i32.const 2 call $~lib/env/abort @@ -1067,112 +1101,70 @@ end local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub local.get $0 i32.const 3 i32.shl i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 85 i32.const 2 call $~lib/env/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + i32.sub i32.const 3 i32.shr_u + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 86 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 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 48 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.add - local.get $2 - i32.store offset=8 - ) - (func $~lib/internal/typedarray/TypedArray#__get (; 15 ;) (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 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.add - i32.load offset=8 - ) - (func $~lib/typedarray/Int32Array#subarray (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 + local.tee $4 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 2 i32.shr_u - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $4 + local.get $3 i32.add - local.tee $3 + local.tee $0 i32.const 0 - local.get $3 + local.get $0 i32.const 0 i32.gt_s select else local.get $1 - local.get $4 - local.get $1 - local.get $4 + local.tee $0 + local.get $3 + local.get $0 + local.get $3 i32.lt_s select end @@ -1182,105 +1174,88 @@ i32.lt_s if (result i32) local.get $2 - local.get $4 + local.get $3 i32.add - local.tee $3 + local.tee $0 local.get $1 - local.get $3 + local.get $0 local.get $1 i32.gt_s select else local.get $2 - local.get $4 + local.get $3 local.get $2 - local.get $4 + local.get $3 i32.lt_s select - local.tee $3 + local.tee $0 local.get $1 - local.get $3 + local.get $0 local.get $1 i32.gt_s select end local.set $2 i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.tee $3 + call $~lib/runtime/doAllocate + i32.const 9 + call $~lib/runtime/doRegister + local.set $0 + local.get $4 + i32.load offset=4 + local.set $3 local.get $0 + local.get $4 i32.load i32.store - local.get $3 local.get $0 - i32.load offset=4 local.get $1 i32.const 2 i32.shl + local.get $3 i32.add i32.store offset=4 - local.get $3 + local.get $0 local.get $2 - local.get $1 - i32.sub i32.const 2 i32.shl - i32.store offset=8 local.get $3 - ) - (func $~lib/internal/typedarray/TypedArray#__set (; 17 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - local.get $1 - i32.const 3 - i32.shl - i32.add i32.add - local.get $2 - f64.store offset=8 + i32.store offset=8 + local.get $0 ) - (func $~lib/typedarray/Float64Array#subarray (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#subarray (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 + local.tee $4 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 3 i32.shr_u - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $4 + local.get $3 i32.add - local.tee $3 + local.tee $0 i32.const 0 - local.get $3 + local.get $0 i32.const 0 i32.gt_s select else local.get $1 - local.get $4 - local.get $1 - local.get $4 + local.tee $0 + local.get $3 + local.get $0 + local.get $3 i32.lt_s select end @@ -1290,178 +1265,175 @@ i32.lt_s if (result i32) local.get $2 - local.get $4 + local.get $3 i32.add - local.tee $3 + local.tee $0 local.get $1 - local.get $3 + local.get $0 local.get $1 i32.gt_s select else local.get $2 - local.get $4 + local.get $3 local.get $2 - local.get $4 + local.get $3 i32.lt_s select - local.tee $3 + local.tee $0 local.get $1 - local.get $3 + local.get $0 local.get $1 i32.gt_s select end local.set $2 i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.tee $3 + call $~lib/runtime/doAllocate + i32.const 14 + call $~lib/runtime/doRegister + local.set $0 + local.get $4 + i32.load offset=4 + local.set $3 local.get $0 + local.get $4 i32.load i32.store - local.get $3 local.get $0 - i32.load offset=4 local.get $1 i32.const 3 i32.shl + local.get $3 i32.add i32.store offset=4 - local.get $3 + local.get $0 local.get $2 - local.get $1 - i32.sub i32.const 3 i32.shl - i32.store offset=8 local.get $3 + i32.add + i32.store offset=8 + local.get $0 ) - (func $~lib/internal/sort/insertionSort (; 19 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/insertionSort (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 f64) (local $6 f64) - (local $7 f64) - (local $8 i32) + (local $7 i32) block $break|0 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.ge_s br_if $break|0 - local.get $4 + local.get $3 i32.const 3 i32.shl local.get $0 i32.add - local.get $1 - i32.add - f64.load offset=8 - local.set $6 - local.get $4 + f64.load + local.set $5 + local.get $3 i32.const 1 i32.sub - local.set $5 + local.set $4 loop $continue|1 - local.get $5 + local.get $4 i32.const 0 i32.ge_s if block $break|1 - local.get $5 + local.get $4 i32.const 3 i32.shl local.get $0 i32.add - local.get $1 - i32.add - f64.load offset=8 - local.set $7 + f64.load + local.set $6 i32.const 2 global.set $~lib/argc + local.get $5 local.get $6 - local.get $7 - local.get $3 + local.get $2 call_indirect (type $FUNCSIG$idd) i32.const 0 i32.ge_s br_if $break|1 - local.get $5 - local.tee $8 + local.get $4 + local.tee $7 i32.const 1 i32.sub - local.set $5 - local.get $8 + local.set $4 + local.get $7 i32.const 1 i32.add i32.const 3 i32.shl local.get $0 i32.add - local.get $1 - i32.add - local.get $7 - f64.store offset=8 + local.get $6 + f64.store br $continue|1 end end end - local.get $5 + local.get $4 i32.const 1 i32.add i32.const 3 i32.shl local.get $0 i32.add - local.get $1 - i32.add - local.get $6 - f64.store offset=8 - local.get $4 + local.get $5 + f64.store + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 20 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/weakHeapSort (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 f64) (local $7 f64) (local $8 i32) - (local $9 i32) - local.get $2 + local.get $1 i32.const 31 i32.add i32.const 5 i32.shr_s i32.const 2 i32.shl - local.tee $4 - call $~lib/allocator/arena/__memory_allocate + local.tee $5 + call $~lib/memory/memory.allocate local.tee $8 i32.const 0 - local.get $4 - call $~lib/internal/memory/memset - local.get $2 + local.get $5 + call $~lib/memory/memory.fill + local.get $1 i32.const 1 i32.sub - local.set $5 + local.set $3 loop $repeat|0 - local.get $5 + local.get $3 i32.const 0 i32.gt_s if - local.get $5 - local.set $4 + local.get $3 + local.set $5 loop $continue|1 - local.get $4 + local.get $5 i32.const 1 i32.and - local.get $4 + local.get $5 i32.const 6 i32.shr_s i32.const 2 @@ -1469,7 +1441,7 @@ local.get $8 i32.add i32.load - local.get $4 + local.get $5 i32.const 1 i32.shr_s i32.const 31 @@ -1479,14 +1451,14 @@ i32.and i32.eq if - local.get $4 + local.get $5 i32.const 1 i32.shr_s - local.set $4 + local.set $5 br $continue|1 end end - local.get $4 + local.get $5 i32.const 1 i32.shr_s local.tee $4 @@ -1494,104 +1466,91 @@ i32.shl local.get $0 i32.add - local.get $1 - i32.add - f64.load offset=8 + f64.load local.set $7 - local.get $5 + local.get $3 i32.const 3 i32.shl local.get $0 i32.add - local.get $1 - i32.add - f64.load offset=8 + f64.load local.set $6 i32.const 2 global.set $~lib/argc local.get $7 local.get $6 - local.get $3 + local.get $2 call_indirect (type $FUNCSIG$idd) i32.const 0 i32.lt_s if - local.get $5 + local.get $3 i32.const 5 i32.shr_s i32.const 2 i32.shl local.get $8 i32.add - local.tee $9 - local.get $9 + local.tee $5 + local.get $5 i32.load i32.const 1 - local.get $5 + local.get $3 i32.const 31 i32.and i32.shl i32.xor i32.store - local.get $5 + local.get $3 i32.const 3 i32.shl local.get $0 i32.add - local.get $1 - i32.add local.get $7 - f64.store offset=8 + f64.store local.get $4 i32.const 3 i32.shl local.get $0 i32.add - local.get $1 - i32.add local.get $6 - f64.store offset=8 + f64.store end - local.get $5 + local.get $3 i32.const 1 i32.sub - local.set $5 + local.set $3 br $repeat|0 end end - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $5 + local.set $3 loop $repeat|2 - local.get $5 + local.get $3 i32.const 2 i32.ge_s if local.get $0 - local.get $1 - i32.add - local.tee $2 - f64.load offset=8 + f64.load local.set $6 - local.get $2 - local.get $5 + local.get $0 + local.get $3 i32.const 3 i32.shl local.get $0 i32.add + local.tee $1 + f64.load + f64.store local.get $1 - i32.add - local.tee $2 - f64.load offset=8 - f64.store offset=8 - local.get $2 local.get $6 - f64.store offset=8 + f64.store i32.const 1 - local.set $2 + local.set $4 loop $continue|3 - local.get $2 + local.get $4 i32.const 5 i32.shr_s i32.const 2 @@ -1599,204 +1558,166 @@ local.get $8 i32.add i32.load - local.get $2 + local.get $4 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and - local.get $2 + local.get $4 i32.const 1 i32.shl i32.add - local.tee $4 - local.get $5 + local.tee $5 + local.get $3 i32.lt_s if - local.get $4 - local.set $2 + local.get $5 + local.set $4 br $continue|3 end end loop $continue|4 - local.get $2 + local.get $4 i32.const 0 i32.gt_s if local.get $0 - local.get $1 - i32.add - f64.load offset=8 + f64.load local.set $6 - local.get $2 + local.get $4 i32.const 3 i32.shl local.get $0 i32.add - local.get $1 - i32.add - f64.load offset=8 + f64.load local.set $7 i32.const 2 global.set $~lib/argc local.get $6 local.get $7 - local.get $3 + local.get $2 call_indirect (type $FUNCSIG$idd) i32.const 0 i32.lt_s if - local.get $2 + local.get $4 i32.const 5 i32.shr_s i32.const 2 i32.shl local.get $8 i32.add - local.tee $4 - local.get $4 + local.tee $1 + local.get $1 i32.load i32.const 1 - local.get $2 + local.get $4 i32.const 31 i32.and i32.shl i32.xor i32.store - local.get $2 + local.get $4 i32.const 3 i32.shl local.get $0 i32.add - local.get $1 - i32.add local.get $6 - f64.store offset=8 + f64.store local.get $0 - local.get $1 - i32.add local.get $7 - f64.store offset=8 + f64.store end - local.get $2 + local.get $4 i32.const 1 i32.shr_s - local.set $2 + local.set $4 br $continue|4 end end - local.get $5 + local.get $3 i32.const 1 i32.sub - local.set $5 + local.set $3 br $repeat|2 end end local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.add - local.tee $2 f64.load offset=8 local.set $6 - local.get $2 local.get $0 - local.get $1 - i32.add - local.tee $0 - f64.load offset=8 + local.get $0 + f64.load f64.store offset=8 local.get $0 local.get $6 - f64.store offset=8 + f64.store ) - (func $~lib/typedarray/Float64Array#sort (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#sort (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 f64) - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $2 - block $~lib/internal/typedarray/SORT|inlined.0 + (local $3 f64) + (local $4 f64) + block $~lib/typedarray/SORT|inlined.0 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 3 i32.shr_u - local.tee $4 + local.tee $2 i32.const 1 i32.le_s - br_if $~lib/internal/typedarray/SORT|inlined.0 + br_if $~lib/typedarray/SORT|inlined.0 local.get $0 - i32.load - local.set $1 - local.get $4 + i32.load offset=4 + local.set $0 + local.get $2 i32.const 2 i32.eq if - local.get $1 - i32.const 8 - i32.add - local.get $2 - i32.add - f64.load offset=8 - local.set $5 - local.get $2 - local.tee $0 - local.get $1 - i32.add + local.get $0 f64.load offset=8 - local.set $6 + local.set $3 + local.get $0 + f64.load + local.set $4 i32.const 2 global.set $~lib/argc - local.get $5 - local.get $6 local.get $3 + local.get $4 + local.get $1 call_indirect (type $FUNCSIG$idd) i32.const 0 i32.lt_s if - local.get $1 - i32.const 8 - i32.add local.get $0 - i32.add - local.get $6 + local.get $4 f64.store offset=8 local.get $0 - local.get $1 - i32.add - local.get $5 - f64.store offset=8 + local.get $3 + f64.store end - br $~lib/internal/typedarray/SORT|inlined.0 + br $~lib/typedarray/SORT|inlined.0 end - local.get $1 - local.set $0 - local.get $4 - local.tee $1 + local.get $2 i32.const 256 i32.lt_s if local.get $0 local.get $2 local.get $1 - local.get $3 - call $~lib/internal/sort/insertionSort + call $~lib/util/sort/insertionSort else local.get $0 local.get $2 local.get $1 - local.get $3 - call $~lib/internal/sort/weakHeapSort + call $~lib/util/sort/weakHeapSort end end ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 22 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 25 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -1825,108 +1746,18 @@ i64.lt_s i32.sub ) - (func $~lib/internal/typedarray/TypedArray#__get (; 23 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort - unreachable - end + (func $~lib/typedarray/Int8Array#fill (; 26 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 i32.load offset=4 - local.get $0 - i32.load - local.get $1 - i32.const 3 - i32.shl - i32.add - i32.add - f64.load offset=8 - ) - (func $~lib/internal/typedarray/TypedArray#__set (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 + local.set $5 local.get $0 i32.load offset=8 - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end local.get $0 i32.load offset=4 - local.get $1 - local.get $0 - i32.load - i32.add - i32.add - local.get $2 - i32.store8 offset=8 - ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 255 - local.get $2 i32.sub - i32.const 31 - i32.shr_s - local.get $2 - i32.or - local.get $2 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.and - call $~lib/internal/typedarray/TypedArray#__set - ) - (func $~lib/internal/typedarray/TypedArray#__get (; 26 ;) (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 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $1 - local.get $0 - i32.load - i32.add - i32.add - i32.load8_u offset=8 - ) - (func $~lib/typedarray/Int8Array#fill (; 27 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $0 - i32.load offset=8 - local.set $4 + local.set $4 local.get $2 i32.const 0 i32.lt_s @@ -1978,211 +1809,1292 @@ local.get $2 local.get $5 i32.add - local.get $6 - i32.add - i32.const 8 - i32.add local.get $1 local.get $3 local.get $2 i32.sub - call $~lib/internal/memory/memset - end - ) - (func $~lib/internal/typedarray/TypedArray#__get (; 28 ;) (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 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort - unreachable + call $~lib/memory/memory.fill end - local.get $0 - i32.load offset=4 - local.get $1 - local.get $0 - i32.load - i32.add - i32.add - i32.load8_s offset=8 ) - (func $std/typedarray/isInt8ArrayEqual (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/util/memory/memcpy (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.ne - if - i32.const 0 - return - end - local.get $0 - i32.load offset=8 - local.set $3 - loop $repeat|0 + (local $5 i32) + loop $continue|0 + local.get $1 + i32.const 3 + i32.and local.get $2 - local.get $3 - i32.lt_s + local.get $2 + select if local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 local.get $2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.const 1 + i32.sub + local.set $2 + br $continue|0 + end + end + local.get $0 + i32.const 3 + i32.and + i32.eqz + if + loop $continue|1 local.get $2 - local.get $1 - i32.load - local.tee $4 - i32.load - i32.lt_u - if (result i32) - local.get $2 - local.get $4 - i32.add - i32.load8_s offset=8 - else - unreachable - end - i32.const 255 - i32.and - i32.ne + i32.const 16 + i32.ge_u if - i32.const 0 - return - else - local.get $2 - i32.const 1 + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub local.set $2 - br $repeat|0 - end - unreachable - end - end - i32.const 1 - ) - (func $~lib/typedarray/Int8Array#fill|trampoline (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable + br $continue|1 end - i32.const 0 - local.set $2 end - i32.const 2147483647 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/typedarray/Int8Array#fill - ) - (func $~lib/typedarray/Int8Array#subarray (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $4 - i32.add - local.tee $3 - i32.const 0 - local.get $3 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $4 - local.get $1 - local.get $4 - i32.lt_s - select - end - local.set $1 - local.get $2 - i32.const 0 - i32.lt_s - if (result i32) local.get $2 - local.get $4 - i32.add - local.tee $3 - local.get $1 - local.get $3 - local.get $1 - i32.gt_s - select - else + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 8 + i32.add + local.set $0 + end local.get $2 - local.get $4 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $1 + i32.const 4 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.add + local.set $0 + end local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $1 + i32.const 2 + i32.add + local.set $1 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + local.get $0 + i32.const 3 + i32.and + local.tee $3 + i32.const 1 + i32.ne + if + local.get $3 + i32.const 2 + i32.eq + br_if $case1|2 + local.get $3 + i32.const 3 + i32.eq + br_if $case2|2 + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.get $1 + local.tee $3 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $1 + local.set $0 + local.get $1 + local.get $3 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + loop $continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + local.get $5 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 5 + i32.add + i32.load + local.tee $5 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 9 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + local.get $5 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 13 + i32.add + i32.load + local.tee $5 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|3 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + loop $continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 2 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 6 + i32.add + i32.load + local.tee $5 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 10 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 14 + i32.add + i32.load + local.tee $5 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|4 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + loop $continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 3 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + local.get $5 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 7 + i32.add + i32.load + local.tee $5 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 11 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + local.get $5 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 15 + i32.add + i32.load + local.tee $5 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|5 + end + end + end + end + local.get $2 + i32.const 16 + i32.and + if + local.get $0 + local.get $1 + local.tee $3 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $1 + local.set $0 + local.get $1 + local.get $3 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + local.tee $3 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $1 + local.set $0 + local.get $1 + local.get $3 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + local.tee $3 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $1 + local.set $0 + local.get $1 + local.get $3 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 local.get $4 + local.get $3 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + end + ) + (func $~lib/memory/memory.copy (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $2 + local.set $3 + local.get $1 + local.get $0 + local.tee $2 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $1 + local.get $3 + i32.add + local.get $2 + i32.le_u + local.tee $0 + i32.eqz + if + local.get $2 + local.get $3 + i32.add + local.get $1 + i32.le_u + local.set $0 + end + local.get $0 + if + local.get $2 + local.get $1 + local.get $3 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $2 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $2 + i32.const 7 + i32.and + if + local.get $3 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $3 + i32.const 1 + i32.sub + local.set $3 + local.get $2 + local.tee $4 + i32.const 1 + i32.add + local.set $2 + local.get $1 + local.tee $0 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $0 + i32.load8_u + i32.store8 + br $continue|0 + end + end + loop $continue|1 + local.get $3 + i32.const 8 + i32.ge_u + if + local.get $2 + local.get $1 + i64.load + i64.store + local.get $3 + i32.const 8 + i32.sub + local.set $3 + local.get $2 + i32.const 8 + i32.add + local.set $2 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $3 + if + local.get $2 + local.tee $4 + i32.const 1 + i32.add + local.set $2 + local.get $1 + local.tee $0 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $0 + i32.load8_u + i32.store8 + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $2 + i32.const 7 + i32.and + i32.eq + if + loop $continue|3 + local.get $2 + local.get $3 + i32.add + i32.const 7 + i32.and + if + local.get $3 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $3 + i32.const 1 + i32.sub + local.tee $3 + local.get $2 + i32.add + local.get $1 + local.get $3 + i32.add + i32.load8_u + i32.store8 + br $continue|3 + end + end + loop $continue|4 + local.get $3 + i32.const 8 + i32.ge_u + if + local.get $3 + i32.const 8 + i32.sub + local.tee $3 + local.get $2 + i32.add + local.get $1 + local.get $3 + i32.add + i64.load + i64.store + br $continue|4 + end + end + end + loop $continue|5 + local.get $3 + if + local.get $3 + i32.const 1 + i32.sub + local.tee $3 + local.get $2 + i32.add + local.get $1 + local.get $3 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + ) + (func $~lib/runtime/doWrapArray (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + i32.const 16 + call $~lib/runtime/doAllocate + local.get $1 + call $~lib/runtime/doRegister + local.tee $3 + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 + local.tee $4 + call $~lib/runtime/doAllocate + local.get $1 + call $~lib/runtime/doRegister + local.tee $1 + i32.store + local.get $3 + local.get $1 + i32.store offset=4 + local.get $3 + local.get $1 + local.get $4 + i32.add + i32.store offset=8 + local.get $3 + local.get $4 + local.get $2 + i32.shr_u + i32.store offset=12 + local.get $1 + local.get $0 + local.get $4 + call $~lib/memory/memory.copy + local.get $3 + ) + (func $std/typedarray/isInt8ArrayEqual (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.load offset=12 + local.get $0 + i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub + i32.ne + if + i32.const 0 + return + end + local.get $0 + i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub + local.set $3 + loop $repeat|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + i32.load offset=4 + local.get $2 + i32.add + i32.load8_s + local.get $1 + i32.load offset=4 + local.get $2 + i32.add + i32.load8_s + i32.ne + if + i32.const 0 + return + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + end + unreachable + end + end + i32.const 1 + ) + (func $~lib/typedarray/Int8Array#subarray (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.tee $4 + i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $0 + i32.const 0 + local.get $0 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.tee $0 + local.get $3 + local.get $0 + local.get $3 + i32.lt_s + select + end + local.set $1 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $3 + i32.add + local.tee $0 + local.get $1 + local.get $0 + local.get $1 + i32.gt_s + select + else + local.get $2 + local.get $3 + local.get $2 + local.get $3 i32.lt_s select - local.tee $3 + local.tee $0 local.get $1 - local.get $3 + local.get $0 local.get $1 i32.gt_s select end local.set $2 i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.tee $3 + call $~lib/runtime/doAllocate + i32.const 4 + call $~lib/runtime/doRegister + local.set $0 + local.get $4 + i32.load offset=4 + local.set $3 local.get $0 + local.get $4 i32.load i32.store - local.get $3 - local.get $1 local.get $0 - i32.load offset=4 + local.get $1 + local.get $3 i32.add i32.store offset=4 - local.get $3 + local.get $0 local.get $2 - local.get $1 - i32.sub - i32.store offset=8 local.get $3 + i32.add + i32.store offset=8 + local.get $0 ) (func $~lib/typedarray/Int32Array#fill (; 32 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - local.get $1 - local.set $5 - local.get $0 - i32.load - local.set $1 local.get $0 i32.load offset=4 - local.set $6 + local.set $5 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 2 i32.shr_u local.set $4 @@ -2201,9 +3113,8 @@ select else local.get $2 - local.tee $0 local.get $4 - local.get $0 + local.get $2 local.get $4 i32.lt_s select @@ -2240,12 +3151,10 @@ local.get $2 i32.const 2 i32.shl - local.get $1 - i32.add - local.get $6 - i32.add local.get $5 - i32.store offset=8 + i32.add + local.get $1 + i32.store local.get $2 i32.const 1 i32.add @@ -2259,9 +3168,12 @@ (local $3 i32) (local $4 i32) local.get $1 - i32.load offset=4 + i32.load offset=12 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 2 i32.shr_u i32.ne @@ -2271,6 +3183,9 @@ end local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 2 i32.shr_u local.set $3 @@ -2279,27 +3194,19 @@ local.get $3 i32.lt_s if - local.get $0 local.get $2 - call $~lib/internal/typedarray/TypedArray#__get - local.get $2 - local.get $1 - i32.load + i32.const 2 + i32.shl local.tee $4 + local.get $0 + i32.load offset=4 + i32.add + i32.load + local.get $1 + i32.load offset=4 + local.get $4 + i32.add i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - i32.const 2 - i32.shl - local.get $4 - i32.add - i32.load offset=8 - else - unreachable - end i32.ne if i32.const 0 @@ -2316,65 +3223,37 @@ end i32.const 1 ) - (func $~lib/typedarray/Int32Array#fill|trampoline (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - i32.const 2147483647 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/typedarray/Int32Array#fill - ) - (func $std/typedarray/testReduce~anonymous|0 (; 35 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 34 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduce (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 - i32.load offset=8 + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + local.set $4 loop $repeat|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if i32.const 4 global.set $~lib/argc local.get $2 local.get $1 - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load8_s offset=8 + i32.load8_s local.get $1 local.get $0 i32.const 2 @@ -2389,23 +3268,22 @@ end local.get $2 ) - (func $std/typedarray/testReduce (; 37 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 36 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 call $~lib/typedarray/Int8Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 call $~lib/typedarray/Int8Array#reduce i32.const 255 @@ -2414,42 +3292,39 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#reduce (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 - i32.load offset=8 + i32.load offset=4 local.set $4 local.get $0 - i32.load - local.set $5 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $6 + i32.sub + local.set $5 loop $repeat|0 local.get $2 - local.get $4 + local.get $5 i32.lt_s if i32.const 4 global.set $~lib/argc local.get $3 local.get $2 - local.get $5 - i32.add - local.get $6 + local.get $4 i32.add - i32.load8_u offset=8 + i32.load8_u local.get $2 local.get $0 local.get $1 @@ -2464,23 +3339,23 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 39 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 38 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 i32.const 3 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 3 call $~lib/typedarray/Uint8Array#reduce @@ -2490,29 +3365,29 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduce (; 40 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 39 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 offset=2 local.get $0 i32.const 4 call $~lib/typedarray/Uint8Array#reduce @@ -2522,60 +3397,32 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.add - local.get $2 - i32.store16 offset=8 - ) - (func $~lib/typedarray/Int16Array#reduce (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduce (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + i32.const 1 + i32.shr_u + local.set $4 loop $repeat|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if i32.const 4 @@ -2584,11 +3431,9 @@ local.get $1 i32.const 1 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load16_s offset=8 + i32.load16_s local.get $1 local.get $0 i32.const 5 @@ -2603,22 +3448,22 @@ end local.get $2 ) - (func $std/typedarray/testReduce (; 43 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 41 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 call $~lib/typedarray/Int16Array#reduce i32.const 65535 @@ -2627,33 +3472,32 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#reduce (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduce (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + i32.const 1 + i32.shr_u + local.set $4 loop $repeat|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if i32.const 4 @@ -2662,11 +3506,9 @@ local.get $1 i32.const 1 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load16_u offset=8 + i32.load16_u local.get $1 local.get $0 i32.const 6 @@ -2681,22 +3523,22 @@ end local.get $2 ) - (func $std/typedarray/testReduce (; 45 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 43 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 call $~lib/typedarray/Uint16Array#reduce i32.const 65535 @@ -2705,33 +3547,32 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int32Array#reduce (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u + i32.load offset=4 local.set $4 local.get $0 - i32.load + i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub + i32.const 2 + i32.shr_u local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 loop $repeat|0 local.get $2 - local.get $4 + local.get $5 i32.lt_s if i32.const 4 @@ -2740,11 +3581,9 @@ local.get $2 i32.const 2 i32.shl - local.get $5 - i32.add - local.get $6 + local.get $4 i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 @@ -2759,22 +3598,22 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 47 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 45 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 7 call $~lib/typedarray/Int32Array#reduce @@ -2782,29 +3621,29 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduce (; 48 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 46 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 8 call $~lib/typedarray/Int32Array#reduce @@ -2812,65 +3651,37 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 49 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - local.get $1 - i32.const 3 - i32.shl - i32.add - i32.add - local.get $2 - i64.store offset=8 - ) - (func $std/typedarray/testReduce~anonymous|0 (; 50 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce~anonymous|0 (; 47 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 51 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 48 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u + i32.load offset=4 local.set $4 local.get $0 - i32.load - local.set $5 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $6 + i32.sub + i32.const 3 + i32.shr_u + local.set $5 loop $repeat|0 local.get $2 - local.get $4 + local.get $5 i32.lt_s if i32.const 4 @@ -2879,11 +3690,9 @@ local.get $2 i32.const 3 i32.shl - local.get $5 - i32.add - local.get $6 + local.get $4 i32.add - i64.load offset=8 + i64.load local.get $2 local.get $0 local.get $1 @@ -2898,22 +3707,22 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 52 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 49 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 9 call $~lib/typedarray/Int64Array#reduce @@ -2921,29 +3730,29 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduce (; 53 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 50 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 10 call $~lib/typedarray/Int64Array#reduce @@ -2951,65 +3760,37 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 54 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) - 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 48 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.add - local.get $2 - f32.store offset=8 - ) - (func $std/typedarray/testReduce~anonymous|0 (; 55 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce~anonymous|0 (; 51 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 56 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $~lib/typedarray/Float32Array#reduce (; 52 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) (local $1 i32) (local $2 f32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + i32.const 2 + i32.shr_u + local.set $4 loop $repeat|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if i32.const 4 @@ -3018,11 +3799,9 @@ local.get $1 i32.const 2 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - f32.load offset=8 + f32.load local.get $1 local.get $0 i32.const 11 @@ -3037,60 +3816,59 @@ end local.get $2 ) - (func $std/typedarray/testReduce (; 57 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 53 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 f32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + f32.store local.get $0 - i32.const 1 + i32.load offset=4 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 f32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=8 local.get $0 call $~lib/typedarray/Float32Array#reduce f32.const 6 f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 58 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce~anonymous|0 (; 54 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 59 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/typedarray/Float64Array#reduce (; 55 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + i32.const 3 + i32.shr_u + local.set $4 loop $repeat|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if i32.const 4 @@ -3099,11 +3877,9 @@ local.get $1 i32.const 3 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - f64.load offset=8 + f64.load local.get $1 local.get $0 i32.const 12 @@ -3118,48 +3894,47 @@ end local.get $2 ) - (func $std/typedarray/testReduce (; 60 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 56 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + f64.store local.get $0 - i32.const 1 + i32.load offset=4 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=16 local.get $0 call $~lib/typedarray/Float64Array#reduce f64.const 6 f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int8Array#reduceRight (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduceRight (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - local.get $0 - i32.load - local.set $3 local.get $0 i32.load offset=4 - local.set $4 + local.set $3 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 1 i32.sub local.set $1 @@ -3174,9 +3949,7 @@ local.get $1 local.get $3 i32.add - local.get $4 - i32.add - i32.load8_s offset=8 + i32.load8_s local.get $1 local.get $0 i32.const 13 @@ -3191,23 +3964,22 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight (; 62 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 58 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 call $~lib/typedarray/Int8Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 call $~lib/typedarray/Int8Array#reduceRight i32.const 255 @@ -3216,26 +3988,25 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 63 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $4 local.get $0 i32.load offset=4 - local.set $5 + local.set $4 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 1 i32.sub local.set $2 @@ -3250,9 +4021,7 @@ local.get $2 local.get $4 i32.add - local.get $5 - i32.add - i32.load8_u offset=8 + i32.load8_u local.get $2 local.get $0 local.get $1 @@ -3267,23 +4036,23 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 64 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 60 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 i32.const 3 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 14 call $~lib/typedarray/Uint8Array#reduceRight @@ -3293,29 +4062,29 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight (; 65 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 61 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 offset=2 local.get $0 i32.const 15 call $~lib/typedarray/Uint8Array#reduceRight @@ -3325,26 +4094,25 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int16Array#reduceRight (; 66 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduceRight (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - local.get $0 - i32.load - local.set $3 local.get $0 i32.load offset=4 - local.set $4 + local.set $3 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 1 i32.shr_u i32.const 1 @@ -3363,9 +4131,7 @@ i32.shl local.get $3 i32.add - local.get $4 - i32.add - i32.load16_s offset=8 + i32.load16_s local.get $1 local.get $0 i32.const 16 @@ -3380,22 +4146,22 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight (; 67 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 63 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 call $~lib/typedarray/Int16Array#reduceRight i32.const 65535 @@ -3404,26 +4170,25 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 68 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 64 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - local.get $0 - i32.load - local.set $3 local.get $0 i32.load offset=4 - local.set $4 + local.set $3 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 1 i32.shr_u i32.const 1 @@ -3442,9 +4207,7 @@ i32.shl local.get $3 i32.add - local.get $4 - i32.add - i32.load16_u offset=8 + i32.load16_u local.get $1 local.get $0 i32.const 17 @@ -3459,22 +4222,22 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight (; 69 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 65 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 call $~lib/typedarray/Uint16Array#reduceRight i32.const 65535 @@ -3483,26 +4246,25 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int32Array#reduceRight (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $4 local.get $0 i32.load offset=4 - local.set $5 + local.set $4 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 2 i32.shr_u i32.const 1 @@ -3521,9 +4283,7 @@ i32.shl local.get $4 i32.add - local.get $5 - i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 @@ -3538,22 +4298,22 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 71 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 67 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 18 call $~lib/typedarray/Int32Array#reduceRight @@ -3561,29 +4321,29 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight (; 72 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 68 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 19 call $~lib/typedarray/Int32Array#reduceRight @@ -3591,26 +4351,25 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int64Array#reduceRight (; 73 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 69 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $4 local.get $0 i32.load offset=4 - local.set $5 + local.set $4 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 3 i32.shr_u i32.const 1 @@ -3629,9 +4388,7 @@ i32.shl local.get $4 i32.add - local.get $5 - i32.add - i64.load offset=8 + i64.load local.get $2 local.get $0 local.get $1 @@ -3646,22 +4403,22 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 74 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 70 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 20 call $~lib/typedarray/Int64Array#reduceRight @@ -3669,29 +4426,29 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight (; 75 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 71 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 21 call $~lib/typedarray/Int64Array#reduceRight @@ -3699,26 +4456,25 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Float32Array#reduceRight (; 76 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $~lib/typedarray/Float32Array#reduceRight (; 72 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) (local $1 i32) (local $2 f32) (local $3 i32) - (local $4 i32) - local.get $0 - i32.load - local.set $3 local.get $0 i32.load offset=4 - local.set $4 + local.set $3 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 2 i32.shr_u i32.const 1 @@ -3737,9 +4493,7 @@ i32.shl local.get $3 i32.add - local.get $4 - i32.add - f32.load offset=8 + f32.load local.get $1 local.get $0 i32.const 22 @@ -3754,48 +4508,47 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight (; 77 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 73 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 f32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + f32.store local.get $0 - i32.const 1 + i32.load offset=4 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 f32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=8 local.get $0 call $~lib/typedarray/Float32Array#reduceRight f32.const 6 f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Float64Array#reduceRight (; 78 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/typedarray/Float64Array#reduceRight (; 74 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) - (local $4 i32) - local.get $0 - i32.load - local.set $3 local.get $0 i32.load offset=4 - local.set $4 + local.set $3 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 3 i32.shr_u i32.const 1 @@ -3814,9 +4567,7 @@ i32.shl local.get $3 i32.add - local.get $4 - i32.add - f64.load offset=8 + f64.load local.get $1 local.get $0 i32.const 23 @@ -3831,61 +4582,61 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight (; 79 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 75 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + f64.store local.get $0 - i32.const 1 + i32.load offset=4 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=16 local.get $0 call $~lib/typedarray/Float64Array#reduceRight f64.const 6 f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 80 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 76 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 81 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 77 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - local.get $0 - i32.load - local.set $2 local.get $0 i32.load offset=4 local.set $3 - i32.const 0 local.get $0 i32.load offset=8 - local.tee $4 + local.get $0 + i32.load offset=4 + i32.sub + local.tee $2 + local.set $4 + local.get $2 call $~lib/typedarray/Int8Array#constructor - local.tee $5 - i32.load - local.set $6 + local.tee $2 + i32.load offset=4 + local.set $5 loop $repeat|0 local.get $1 local.get $4 @@ -3894,19 +4645,17 @@ i32.const 3 global.set $~lib/argc local.get $1 - local.get $6 + local.get $5 i32.add local.get $1 - local.get $2 - i32.add local.get $3 i32.add - i32.load8_s offset=8 + i32.load8_s local.get $1 local.get $0 i32.const 24 call_indirect (type $FUNCSIG$iiii) - i32.store8 offset=8 + i32.store8 local.get $1 i32.const 1 i32.add @@ -3914,94 +4663,88 @@ br $repeat|0 end end - local.get $5 + local.get $2 ) - (func $std/typedarray/testArrayMap (; 82 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 78 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 call $~lib/typedarray/Int8Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 call $~lib/typedarray/Int8Array#map local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_s i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_s offset=1 i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_s offset=2 i32.const 9 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#map (; 83 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - local.get $0 - i32.load - local.set $2 local.get $0 i32.load offset=4 local.set $3 - i32.const 0 local.get $0 i32.load offset=8 - local.tee $4 - call $~lib/typedarray/Int8Array#constructor - local.tee $5 - i32.load - local.set $6 + local.get $0 + i32.load offset=4 + i32.sub + local.tee $2 + local.set $4 + i32.const 0 + local.get $2 + call $~lib/typedarray/Uint8Array#constructor + local.tee $2 + i32.load offset=4 + local.set $5 loop $repeat|0 local.get $1 local.get $4 @@ -4010,19 +4753,17 @@ i32.const 3 global.set $~lib/argc local.get $1 - local.get $6 + local.get $5 i32.add local.get $1 - local.get $2 - i32.add local.get $3 i32.add - i32.load8_u offset=8 + i32.load8_u local.get $1 local.get $0 i32.const 25 call_indirect (type $FUNCSIG$iiii) - i32.store8 offset=8 + i32.store8 local.get $1 i32.const 1 i32.add @@ -4030,93 +4771,88 @@ br $repeat|0 end end - local.get $5 + local.get $2 ) - (func $std/typedarray/testArrayMap (; 84 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 80 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 i32.const 3 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 call $~lib/typedarray/Uint8Array#map local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u offset=1 i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u offset=2 i32.const 9 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 85 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 81 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - local.get $0 - i32.load - local.set $2 local.get $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 - local.tee $4 + local.get $0 + i32.load offset=4 + i32.sub + local.tee $2 + local.set $4 + local.get $2 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $5 - i32.load - local.set $6 + local.tee $2 + i32.load offset=4 + local.set $5 loop $repeat|0 local.get $1 local.get $4 @@ -4125,19 +4861,17 @@ i32.const 3 global.set $~lib/argc local.get $1 - local.get $6 + local.get $5 i32.add local.get $1 - local.get $2 - i32.add local.get $3 i32.add - i32.load8_u offset=8 + i32.load8_u local.get $1 local.get $0 i32.const 26 call_indirect (type $FUNCSIG$iiii) - i32.store8 offset=8 + i32.store8 local.get $1 i32.const 1 i32.add @@ -4145,73 +4879,67 @@ br $repeat|0 end end - local.get $5 + local.get $2 ) - (func $std/typedarray/testArrayMap (; 86 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 82 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 offset=2 local.get $0 call $~lib/typedarray/Uint8ClampedArray#map local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u offset=1 i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u offset=2 i32.const 9 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int16Array#map (; 87 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 83 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4220,20 +4948,22 @@ (local $6 i32) (local $7 i32) local.get $0 - i32.load - local.set $2 - local.get $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 1 i32.shr_u - local.tee $4 + local.tee $2 + local.set $4 + local.get $2 call $~lib/typedarray/Int16Array#constructor - local.tee $5 - i32.load - local.set $6 + local.tee $2 + i32.load offset=4 + local.set $5 loop $repeat|0 local.get $1 local.get $4 @@ -4244,20 +4974,20 @@ local.get $1 i32.const 1 i32.shl - local.tee $7 - local.get $6 - i32.add - local.get $2 - local.get $7 - i32.add + local.tee $6 local.get $3 i32.add - i32.load16_s offset=8 + i32.load16_s local.get $1 local.get $0 i32.const 27 call_indirect (type $FUNCSIG$iiii) - i32.store16 offset=8 + local.set $7 + local.get $5 + local.get $6 + i32.add + local.get $7 + i32.store16 local.get $1 i32.const 1 i32.add @@ -4265,99 +4995,67 @@ br $repeat|0 end end - local.get $5 - ) - (func $~lib/internal/typedarray/TypedArray#__get (; 88 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.add - i32.load16_s offset=8 + local.get $2 ) - (func $std/typedarray/testArrayMap (; 89 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 84 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 call $~lib/typedarray/Int16Array#map local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load16_s i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load16_s offset=2 i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load16_s offset=4 i32.const 9 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#map (; 90 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 85 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4366,20 +5064,22 @@ (local $6 i32) (local $7 i32) local.get $0 - i32.load - local.set $2 - local.get $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 1 i32.shr_u - local.tee $4 - call $~lib/typedarray/Int16Array#constructor - local.tee $5 - i32.load - local.set $6 + local.tee $2 + local.set $4 + local.get $2 + call $~lib/typedarray/Uint16Array#constructor + local.tee $2 + i32.load offset=4 + local.set $5 loop $repeat|0 local.get $1 local.get $4 @@ -4390,20 +5090,20 @@ local.get $1 i32.const 1 i32.shl - local.tee $7 - local.get $6 - i32.add - local.get $2 - local.get $7 - i32.add + local.tee $6 local.get $3 i32.add - i32.load16_u offset=8 + i32.load16_u local.get $1 local.get $0 i32.const 28 call_indirect (type $FUNCSIG$iiii) - i32.store16 offset=8 + local.set $7 + local.get $5 + local.get $6 + i32.add + local.get $7 + i32.store16 local.get $1 i32.const 1 i32.add @@ -4411,99 +5111,68 @@ br $repeat|0 end end - local.get $5 - ) - (func $~lib/internal/typedarray/TypedArray#__get (; 91 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.add - i32.load16_u offset=8 + local.get $2 ) - (func $std/typedarray/testArrayMap (; 92 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 86 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 call $~lib/typedarray/Uint16Array#map local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load16_u i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load16_u offset=2 i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load16_u offset=4 i32.const 9 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int32Array#map (; 93 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 87 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4511,407 +5180,496 @@ (local $6 i32) (local $7 i32) local.get $0 - i32.load - local.set $3 - local.get $0 i32.load offset=4 - local.set $4 + local.set $3 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 2 i32.shr_u - local.tee $5 + local.tee $2 + local.set $4 + local.get $2 call $~lib/typedarray/Int32Array#constructor - local.tee $6 - i32.load - local.set $7 + local.tee $2 + i32.load offset=4 + local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $5 - i32.ge_s - br_if $break|0 + local.get $1 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc - local.get $7 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $2 + local.get $1 i32.const 2 i32.shl + local.tee $6 local.get $3 i32.add - local.get $4 - i32.add - i32.load offset=8 - local.get $2 - local.get $0 + i32.load local.get $1 + local.get $0 + i32.const 29 call_indirect (type $FUNCSIG$iiii) - i32.store offset=8 - local.get $2 + local.set $7 + local.get $5 + local.get $6 + i32.add + local.get $7 + i32.store + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $repeat|0 end end - local.get $6 + local.get $2 ) - (func $std/typedarray/testArrayMap (; 94 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 88 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 - i32.const 29 call $~lib/typedarray/Int32Array#map local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load offset=4 i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load offset=8 i32.const 9 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap (; 95 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Uint32Array#map (; 89 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub + i32.const 2 + i32.shr_u + local.tee $2 + local.set $4 + local.get $2 + call $~lib/typedarray/Uint32Array#constructor + local.tee $2 + i32.load offset=4 + local.set $5 + loop $repeat|0 + local.get $1 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~lib/argc + local.get $1 + i32.const 2 + i32.shl + local.tee $6 + local.get $3 + i32.add + i32.load + local.get $1 + local.get $0 + i32.const 30 + call_indirect (type $FUNCSIG$iiii) + local.set $7 + local.get $5 + local.get $6 + i32.add + local.get $7 + i32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end + end + local.get $2 + ) + (func $std/typedarray/testArrayMap (; 90 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 - i32.const 30 - call $~lib/typedarray/Int32Array#map + call $~lib/typedarray/Uint32Array#map local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load offset=4 i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load offset=8 i32.const 9 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 96 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 91 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 97 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - local.get $0 - i32.load - local.set $3 + (local $7 i64) local.get $0 i32.load offset=4 - local.set $4 + local.set $3 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 3 i32.shr_u - local.tee $5 + local.tee $2 + local.set $4 + local.get $2 call $~lib/typedarray/Int64Array#constructor - local.tee $6 - i32.load - local.set $7 + local.tee $2 + i32.load offset=4 + local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $5 - i32.ge_s - br_if $break|0 + local.get $1 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc - local.get $7 - local.get $2 - i32.const 3 - i32.shl - i32.add - local.get $2 + local.get $1 i32.const 3 i32.shl + local.tee $6 local.get $3 i32.add - local.get $4 - i32.add - i64.load offset=8 - local.get $2 - local.get $0 + i64.load local.get $1 + local.get $0 + i32.const 31 call_indirect (type $FUNCSIG$jjii) - i64.store offset=8 - local.get $2 + local.set $7 + local.get $5 + local.get $6 + i32.add + local.get $7 + i64.store + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $repeat|0 end end - local.get $6 - ) - (func $~lib/internal/typedarray/TypedArray#__get (; 98 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - local.get $1 - i32.const 3 - i32.shl - i32.add - i32.add - i64.load offset=8 + local.get $2 ) - (func $std/typedarray/testArrayMap (; 99 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 93 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 - i32.const 31 call $~lib/typedarray/Int64Array#map local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load i64.const 1 i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load offset=8 i64.const 4 i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load offset=16 i64.const 9 i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap (; 100 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Uint64Array#map (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i64) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub + i32.const 3 + i32.shr_u + local.tee $2 + local.set $4 + local.get $2 + call $~lib/typedarray/Uint64Array#constructor + local.tee $2 + i32.load offset=4 + local.set $5 + loop $repeat|0 + local.get $1 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~lib/argc + local.get $1 + i32.const 3 + i32.shl + local.tee $6 + local.get $3 + i32.add + i64.load + local.get $1 + local.get $0 + i32.const 32 + call_indirect (type $FUNCSIG$jjii) + local.set $7 + local.get $5 + local.get $6 + i32.add + local.get $7 + i64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end + end + local.get $2 + ) + (func $std/typedarray/testArrayMap (; 95 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 - i32.const 32 - call $~lib/typedarray/Int64Array#map + call $~lib/typedarray/Uint64Array#map local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load i64.const 1 i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load offset=8 i64.const 4 i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load offset=16 i64.const 9 i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 101 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 96 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 97 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - local.get $0 - i32.load - local.set $2 + (local $7 f32) local.get $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 2 i32.shr_u - local.tee $4 - call $~lib/typedarray/Int32Array#constructor - local.tee $5 - i32.load - local.set $6 + local.tee $2 + local.set $4 + local.get $2 + call $~lib/typedarray/Float32Array#constructor + local.tee $2 + i32.load offset=4 + local.set $5 loop $repeat|0 local.get $1 local.get $4 @@ -4922,20 +5680,20 @@ local.get $1 i32.const 2 i32.shl - local.tee $7 - local.get $6 - i32.add - local.get $2 - local.get $7 - i32.add + local.tee $6 local.get $3 i32.add - f32.load offset=8 + f32.load local.get $1 local.get $0 i32.const 33 call_indirect (type $FUNCSIG$ffii) - f32.store offset=8 + local.set $7 + local.get $5 + local.get $6 + i32.add + local.get $7 + f32.store local.get $1 i32.const 1 i32.add @@ -4943,120 +5701,96 @@ br $repeat|0 end end - local.get $5 - ) - (func $~lib/internal/typedarray/TypedArray#__get (; 103 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) - 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 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.add - f32.load offset=8 + local.get $2 ) - (func $std/typedarray/testArrayMap (; 104 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 98 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 f32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + f32.store local.get $0 - i32.const 1 + i32.load offset=4 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 f32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=8 local.get $0 call $~lib/typedarray/Float32Array#map local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f32.load f32.const 1 f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f32.load offset=4 f32.const 4 f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f32.load offset=8 f32.const 9 f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 105 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 99 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 106 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 100 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - local.get $0 - i32.load - local.set $2 + (local $7 f64) local.get $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 3 i32.shr_u - local.tee $4 - call $~lib/typedarray/Int64Array#constructor - local.tee $5 - i32.load - local.set $6 + local.tee $2 + local.set $4 + local.get $2 + call $~lib/typedarray/Float64Array#constructor + local.tee $2 + i32.load offset=4 + local.set $5 loop $repeat|0 local.get $1 local.get $4 @@ -5067,20 +5801,20 @@ local.get $1 i32.const 3 i32.shl - local.tee $7 - local.get $6 - i32.add - local.get $2 - local.get $7 - i32.add + local.tee $6 local.get $3 i32.add - f64.load offset=8 + f64.load local.get $1 local.get $0 i32.const 34 call_indirect (type $FUNCSIG$ddii) - f64.store offset=8 + local.set $7 + local.get $5 + local.get $6 + i32.add + local.get $7 + f64.store local.get $1 i32.const 1 i32.add @@ -5088,108 +5822,104 @@ br $repeat|0 end end - local.get $5 + local.get $2 ) - (func $std/typedarray/testArrayMap (; 107 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 101 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + f64.store local.get $0 - i32.const 1 + i32.load offset=4 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=16 local.get $0 call $~lib/typedarray/Float64Array#map local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load f64.const 1 f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load offset=8 f64.const 4 f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load offset=16 f64.const 9 f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 108 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 102 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 103 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/SOME|inlined.0 (result i32) + block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - i32.load offset=8 + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + local.set $4 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc i32.const 1 local.get $2 - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load8_s offset=8 + i32.load8_s local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/SOME|inlined.0 + br_if $~lib/typedarray/SOME|inlined.0 drop local.get $2 i32.const 1 @@ -5201,36 +5931,35 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 110 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 104 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.eqz ) - (func $std/typedarray/testArraySome (; 111 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 105 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 call $~lib/typedarray/Int8Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 35 call $~lib/typedarray/Int8Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -5241,48 +5970,44 @@ call $~lib/typedarray/Int8Array#some if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#some (; 112 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/SOME|inlined.0 (result i32) + block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - i32.load offset=8 + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + local.set $4 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc i32.const 1 local.get $2 - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load8_u offset=8 + i32.load8_u local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/SOME|inlined.0 + br_if $~lib/typedarray/SOME|inlined.0 drop local.get $2 i32.const 1 @@ -5294,30 +6019,30 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome (; 113 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 107 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 i32.const 3 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 37 call $~lib/typedarray/Uint8Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -5328,36 +6053,36 @@ call $~lib/typedarray/Uint8Array#some if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome (; 114 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 108 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 offset=2 local.get $0 i32.const 39 call $~lib/typedarray/Uint8Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -5368,59 +6093,55 @@ call $~lib/typedarray/Uint8Array#some if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 115 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 109 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 110 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/SOME|inlined.0 (result i32) + block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + i32.const 1 + i32.shr_u + local.set $4 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc i32.const 1 local.get $2 i32.const 1 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load16_s offset=8 + i32.load16_s local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/SOME|inlined.0 + br_if $~lib/typedarray/SOME|inlined.0 drop local.get $2 i32.const 1 @@ -5432,35 +6153,35 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 117 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 111 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.eqz ) - (func $std/typedarray/testArraySome (; 118 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 112 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 41 call $~lib/typedarray/Int16Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -5471,52 +6192,48 @@ call $~lib/typedarray/Int16Array#some if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#some (; 119 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/SOME|inlined.0 (result i32) + block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + i32.const 1 + i32.shr_u + local.set $4 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc i32.const 1 local.get $2 i32.const 1 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load16_u offset=8 + i32.load16_u local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/SOME|inlined.0 + br_if $~lib/typedarray/SOME|inlined.0 drop local.get $2 i32.const 1 @@ -5528,29 +6245,29 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome (; 120 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 114 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 43 call $~lib/typedarray/Uint16Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -5561,57 +6278,53 @@ call $~lib/typedarray/Uint16Array#some if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 121 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 115 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 122 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/SOME|inlined.0 (result i32) + block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + i32.const 2 + i32.shr_u + local.set $4 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc i32.const 1 local.get $2 i32.const 2 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/SOME|inlined.0 + br_if $~lib/typedarray/SOME|inlined.0 drop local.get $2 i32.const 1 @@ -5623,33 +6336,33 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 123 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 117 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $std/typedarray/testArraySome (; 124 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 118 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 45 call $~lib/typedarray/Int32Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -5660,36 +6373,36 @@ call $~lib/typedarray/Int32Array#some if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome (; 125 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 119 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 47 call $~lib/typedarray/Int32Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -5700,57 +6413,53 @@ call $~lib/typedarray/Int32Array#some if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 126 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 120 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/SOME|inlined.0 (result i32) + block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + i32.const 3 + i32.shr_u + local.set $4 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc i32.const 1 local.get $2 i32.const 3 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i64.load offset=8 + i64.load local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$ijii) - br_if $~lib/internal/typedarray/SOME|inlined.0 + br_if $~lib/typedarray/SOME|inlined.0 drop local.get $2 i32.const 1 @@ -5762,34 +6471,34 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 128 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 122 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome (; 129 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 123 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 49 call $~lib/typedarray/Int64Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -5800,36 +6509,36 @@ call $~lib/typedarray/Int64Array#some if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome (; 130 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 124 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 51 call $~lib/typedarray/Int64Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -5840,57 +6549,53 @@ call $~lib/typedarray/Int64Array#some if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 131 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 125 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/SOME|inlined.0 (result i32) + block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + i32.const 2 + i32.shr_u + local.set $4 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc i32.const 1 local.get $2 i32.const 2 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - f32.load offset=8 + f32.load local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$ifii) - br_if $~lib/internal/typedarray/SOME|inlined.0 + br_if $~lib/typedarray/SOME|inlined.0 drop local.get $2 i32.const 1 @@ -5902,34 +6607,34 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 133 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 127 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome (; 134 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 128 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f32.store local.get $0 - i32.const 1 + i32.load offset=4 f32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 f32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=8 local.get $0 i32.const 53 call $~lib/typedarray/Float32Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -5940,57 +6645,53 @@ call $~lib/typedarray/Float32Array#some if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 135 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 129 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 130 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/SOME|inlined.0 (result i32) + block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + i32.const 3 + i32.shr_u + local.set $4 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc i32.const 1 local.get $2 i32.const 3 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - f64.load offset=8 + f64.load local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$idii) - br_if $~lib/internal/typedarray/SOME|inlined.0 + br_if $~lib/typedarray/SOME|inlined.0 drop local.get $2 i32.const 1 @@ -6002,34 +6703,34 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 137 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 131 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome (; 138 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 132 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f64.store local.get $0 - i32.const 1 + i32.load offset=4 f64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 f64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=16 local.get $0 i32.const 55 call $~lib/typedarray/Float64Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -6040,50 +6741,46 @@ call $~lib/typedarray/Float64Array#some if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int8Array#findIndex (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - local.get $0 - i32.load offset=8 - local.set $2 - local.get $0 - local.tee $3 - i32.load - local.set $4 local.get $0 + local.tee $2 i32.load offset=4 - local.set $5 + local.set $3 i32.const 0 local.set $0 - block $~lib/internal/typedarray/FIND_INDEX|inlined.0 + local.get $2 + i32.load offset=8 + local.get $2 + i32.load offset=4 + i32.sub + local.set $4 + block $~lib/typedarray/FIND_INDEX|inlined.0 loop $repeat|0 - block $break|0 - local.get $0 - local.get $2 - i32.ge_s - br_if $break|0 + local.get $0 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $0 - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load8_s offset=8 + i32.load8_s local.get $0 - local.get $3 + local.get $2 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/FIND_INDEX|inlined.0 + br_if $~lib/typedarray/FIND_INDEX|inlined.0 local.get $0 i32.const 1 i32.add @@ -6096,38 +6793,37 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 140 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 134 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 141 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 135 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 call $~lib/typedarray/Int8Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 57 call $~lib/typedarray/Int8Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -6139,51 +6835,47 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#findIndex (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - local.get $0 - i32.load offset=8 - local.set $2 - local.get $0 - local.tee $3 - i32.load - local.set $4 local.get $0 + local.tee $2 i32.load offset=4 - local.set $5 + local.set $3 i32.const 0 local.set $0 - block $~lib/internal/typedarray/FIND_INDEX|inlined.0 + local.get $2 + i32.load offset=8 + local.get $2 + i32.load offset=4 + i32.sub + local.set $4 + block $~lib/typedarray/FIND_INDEX|inlined.0 loop $repeat|0 - block $break|0 - local.get $0 - local.get $2 - i32.ge_s - br_if $break|0 + local.get $0 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $0 - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load8_u offset=8 + i32.load8_u local.get $0 - local.get $3 + local.get $2 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/FIND_INDEX|inlined.0 + br_if $~lib/typedarray/FIND_INDEX|inlined.0 local.get $0 i32.const 1 i32.add @@ -6196,31 +6888,31 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex (; 143 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 137 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 i32.const 3 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 59 call $~lib/typedarray/Uint8Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -6232,38 +6924,38 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex (; 144 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 138 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 offset=2 local.get $0 i32.const 61 call $~lib/typedarray/Uint8Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -6275,55 +6967,51 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int16Array#findIndex (; 145 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $2 - local.get $0 - local.tee $3 - i32.load - local.set $4 + (func $~lib/typedarray/Int16Array#findIndex (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 + local.tee $2 i32.load offset=4 - local.set $5 + local.set $3 i32.const 0 local.set $0 - block $~lib/internal/typedarray/FIND_INDEX|inlined.0 + local.get $2 + i32.load offset=8 + local.get $2 + i32.load offset=4 + i32.sub + i32.const 1 + i32.shr_u + local.set $4 + block $~lib/typedarray/FIND_INDEX|inlined.0 loop $repeat|0 - block $break|0 - local.get $0 - local.get $2 - i32.ge_s - br_if $break|0 + local.get $0 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $0 i32.const 1 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load16_s offset=8 + i32.load16_s local.get $0 - local.get $3 + local.get $2 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/FIND_INDEX|inlined.0 + br_if $~lib/typedarray/FIND_INDEX|inlined.0 local.get $0 i32.const 1 i32.add @@ -6336,37 +7024,37 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 146 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 140 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 147 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 141 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 63 call $~lib/typedarray/Int16Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -6378,55 +7066,51 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#findIndex (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 + local.tee $2 + i32.load offset=4 + local.set $3 + i32.const 0 + local.set $0 + local.get $2 i32.load offset=8 + local.get $2 + i32.load offset=4 + i32.sub i32.const 1 i32.shr_u - local.set $2 - local.get $0 - local.tee $3 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 - i32.const 0 - local.set $0 - block $~lib/internal/typedarray/FIND_INDEX|inlined.0 + block $~lib/typedarray/FIND_INDEX|inlined.0 loop $repeat|0 - block $break|0 - local.get $0 - local.get $2 - i32.ge_s - br_if $break|0 + local.get $0 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $0 i32.const 1 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load16_u offset=8 + i32.load16_u local.get $0 - local.get $3 + local.get $2 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/FIND_INDEX|inlined.0 + br_if $~lib/typedarray/FIND_INDEX|inlined.0 local.get $0 i32.const 1 i32.add @@ -6439,30 +7123,30 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex (; 149 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 143 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 65 call $~lib/typedarray/Uint16Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -6474,55 +7158,51 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int32Array#findIndex (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 + local.tee $2 + i32.load offset=4 + local.set $3 + i32.const 0 + local.set $0 + local.get $2 i32.load offset=8 + local.get $2 + i32.load offset=4 + i32.sub i32.const 2 i32.shr_u - local.set $2 - local.get $0 - local.tee $3 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 - i32.const 0 - local.set $0 - block $~lib/internal/typedarray/FIND_INDEX|inlined.0 + block $~lib/typedarray/FIND_INDEX|inlined.0 loop $repeat|0 - block $break|0 - local.get $0 - local.get $2 - i32.ge_s - br_if $break|0 + local.get $0 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $0 i32.const 2 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load offset=8 + i32.load local.get $0 - local.get $3 + local.get $2 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/FIND_INDEX|inlined.0 + br_if $~lib/typedarray/FIND_INDEX|inlined.0 local.get $0 i32.const 1 i32.add @@ -6535,35 +7215,35 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 151 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 145 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 152 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 146 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 67 call $~lib/typedarray/Int32Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -6575,38 +7255,38 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex (; 153 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 147 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 69 call $~lib/typedarray/Int32Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -6618,55 +7298,51 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int64Array#findIndex (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 + local.tee $2 + i32.load offset=4 + local.set $3 + i32.const 0 + local.set $0 + local.get $2 i32.load offset=8 + local.get $2 + i32.load offset=4 + i32.sub i32.const 3 i32.shr_u - local.set $2 - local.get $0 - local.tee $3 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 - i32.const 0 - local.set $0 - block $~lib/internal/typedarray/FIND_INDEX|inlined.0 + block $~lib/typedarray/FIND_INDEX|inlined.0 loop $repeat|0 - block $break|0 - local.get $0 - local.get $2 - i32.ge_s - br_if $break|0 + local.get $0 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $0 i32.const 3 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i64.load offset=8 + i64.load local.get $0 - local.get $3 + local.get $2 local.get $1 call_indirect (type $FUNCSIG$ijii) - br_if $~lib/internal/typedarray/FIND_INDEX|inlined.0 + br_if $~lib/typedarray/FIND_INDEX|inlined.0 local.get $0 i32.const 1 i32.add @@ -6679,35 +7355,35 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 155 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 149 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex (; 156 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 150 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 71 call $~lib/typedarray/Int64Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -6719,38 +7395,38 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex (; 157 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 151 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 73 call $~lib/typedarray/Int64Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -6762,55 +7438,51 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Float32Array#findIndex (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 + local.tee $2 + i32.load offset=4 + local.set $3 + i32.const 0 + local.set $0 + local.get $2 i32.load offset=8 + local.get $2 + i32.load offset=4 + i32.sub i32.const 2 i32.shr_u - local.set $2 - local.get $0 - local.tee $3 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 - i32.const 0 - local.set $0 - block $~lib/internal/typedarray/FIND_INDEX|inlined.0 + block $~lib/typedarray/FIND_INDEX|inlined.0 loop $repeat|0 - block $break|0 - local.get $0 - local.get $2 - i32.ge_s - br_if $break|0 + local.get $0 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $0 i32.const 2 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - f32.load offset=8 + f32.load local.get $0 - local.get $3 + local.get $2 local.get $1 call_indirect (type $FUNCSIG$ifii) - br_if $~lib/internal/typedarray/FIND_INDEX|inlined.0 + br_if $~lib/typedarray/FIND_INDEX|inlined.0 local.get $0 i32.const 1 i32.add @@ -6823,35 +7495,35 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 159 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 153 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex (; 160 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 154 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 f32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + f32.store local.get $0 - i32.const 1 + i32.load offset=4 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 f32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=8 local.get $0 i32.const 75 call $~lib/typedarray/Float32Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -6863,55 +7535,51 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Float64Array#findIndex (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $2 - local.get $0 - local.tee $3 - i32.load - local.set $4 local.get $0 + local.tee $2 i32.load offset=4 - local.set $5 + local.set $3 i32.const 0 local.set $0 - block $~lib/internal/typedarray/FIND_INDEX|inlined.0 + local.get $2 + i32.load offset=8 + local.get $2 + i32.load offset=4 + i32.sub + i32.const 3 + i32.shr_u + local.set $4 + block $~lib/typedarray/FIND_INDEX|inlined.0 loop $repeat|0 - block $break|0 - local.get $0 - local.get $2 - i32.ge_s - br_if $break|0 + local.get $0 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $0 i32.const 3 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - f64.load offset=8 + f64.load local.get $0 - local.get $3 + local.get $2 local.get $1 call_indirect (type $FUNCSIG$idii) - br_if $~lib/internal/typedarray/FIND_INDEX|inlined.0 + br_if $~lib/typedarray/FIND_INDEX|inlined.0 local.get $0 i32.const 1 i32.add @@ -6924,35 +7592,35 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 162 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 156 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex (; 163 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 157 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + f64.store local.get $0 - i32.const 1 + i32.load offset=4 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=16 local.get $0 i32.const 77 call $~lib/typedarray/Float64Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -6964,15 +7632,15 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 164 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 158 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -6982,44 +7650,39 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int8Array#every (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/EVERY|inlined.0 (result i32) + block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 - i32.load offset=8 + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + local.set $4 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc + i32.const 0 local.get $2 - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load8_s offset=8 + i32.load8_s local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) i32.eqz - if - i32.const 0 - br $~lib/internal/typedarray/EVERY|inlined.0 - end + br_if $~lib/typedarray/EVERY|inlined.0 + drop local.get $2 i32.const 1 i32.add @@ -7030,30 +7693,29 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 166 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 160 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 call $~lib/typedarray/Int8Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 79 call $~lib/typedarray/Int8Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -7064,57 +7726,52 @@ call $~lib/typedarray/Int8Array#every if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 167 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 161 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#every (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/EVERY|inlined.0 (result i32) + block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 - i32.load offset=8 + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + local.set $4 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc + i32.const 0 local.get $2 - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load8_u offset=8 + i32.load8_u local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) i32.eqz - if - i32.const 0 - br $~lib/internal/typedarray/EVERY|inlined.0 - end + br_if $~lib/typedarray/EVERY|inlined.0 + drop local.get $2 i32.const 1 i32.add @@ -7125,30 +7782,30 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 169 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 163 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 i32.const 3 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 81 call $~lib/typedarray/Uint8Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -7159,36 +7816,36 @@ call $~lib/typedarray/Uint8Array#every if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery (; 170 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 164 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 offset=2 local.get $0 i32.const 83 call $~lib/typedarray/Uint8Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -7199,14 +7856,14 @@ call $~lib/typedarray/Uint8Array#every if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 171 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 165 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -7216,48 +7873,43 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int16Array#every (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/EVERY|inlined.0 (result i32) + block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + i32.const 1 + i32.shr_u + local.set $4 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc + i32.const 0 local.get $2 i32.const 1 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load16_s offset=8 + i32.load16_s local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) i32.eqz - if - i32.const 0 - br $~lib/internal/typedarray/EVERY|inlined.0 - end + br_if $~lib/typedarray/EVERY|inlined.0 + drop local.get $2 i32.const 1 i32.add @@ -7268,29 +7920,29 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 173 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 167 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 85 call $~lib/typedarray/Int16Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -7301,55 +7953,50 @@ call $~lib/typedarray/Int16Array#every if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#every (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/EVERY|inlined.0 (result i32) + block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + i32.const 1 + i32.shr_u + local.set $4 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc + i32.const 0 local.get $2 i32.const 1 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load16_u offset=8 + i32.load16_u local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) i32.eqz - if - i32.const 0 - br $~lib/internal/typedarray/EVERY|inlined.0 - end + br_if $~lib/typedarray/EVERY|inlined.0 + drop local.get $2 i32.const 1 i32.add @@ -7360,29 +8007,29 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 175 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 169 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 87 call $~lib/typedarray/Uint16Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -7393,61 +8040,56 @@ call $~lib/typedarray/Uint16Array#every if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 176 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 170 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int32Array#every (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/EVERY|inlined.0 (result i32) + block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + i32.const 2 + i32.shr_u + local.set $4 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc + i32.const 0 local.get $2 i32.const 2 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) i32.eqz - if - i32.const 0 - br $~lib/internal/typedarray/EVERY|inlined.0 - end + br_if $~lib/typedarray/EVERY|inlined.0 + drop local.get $2 i32.const 1 i32.add @@ -7458,29 +8100,29 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 178 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 172 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 89 call $~lib/typedarray/Int32Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -7491,36 +8133,36 @@ call $~lib/typedarray/Int32Array#every if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery (; 179 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 173 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 91 call $~lib/typedarray/Int32Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -7531,62 +8173,57 @@ call $~lib/typedarray/Int32Array#every if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 180 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 174 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/EVERY|inlined.0 (result i32) + block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + i32.const 3 + i32.shr_u + local.set $4 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc + i32.const 0 local.get $2 i32.const 3 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i64.load offset=8 + i64.load local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$ijii) i32.eqz - if - i32.const 0 - br $~lib/internal/typedarray/EVERY|inlined.0 - end + br_if $~lib/typedarray/EVERY|inlined.0 + drop local.get $2 i32.const 1 i32.add @@ -7597,29 +8234,29 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 182 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 176 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 93 call $~lib/typedarray/Int64Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -7630,43 +8267,43 @@ call $~lib/typedarray/Int64Array#every if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 183 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 177 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $std/typedarray/testArrayEvery (; 184 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 178 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 95 call $~lib/typedarray/Int64Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -7677,14 +8314,14 @@ call $~lib/typedarray/Int64Array#every if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/math/NativeMathf.mod (; 185 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 179 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7835,54 +8472,49 @@ local.get $0 f32.mul ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 186 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 180 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 187 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/EVERY|inlined.0 (result i32) + block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + i32.const 2 + i32.shr_u + local.set $4 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc + i32.const 0 local.get $2 i32.const 2 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - f32.load offset=8 + f32.load local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$ifii) i32.eqz - if - i32.const 0 - br $~lib/internal/typedarray/EVERY|inlined.0 - end + br_if $~lib/typedarray/EVERY|inlined.0 + drop local.get $2 i32.const 1 i32.add @@ -7893,29 +8525,29 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 188 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 182 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f32.store local.get $0 - i32.const 1 + i32.load offset=4 f32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 f32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=8 local.get $0 i32.const 97 call $~lib/typedarray/Float32Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -7926,14 +8558,14 @@ call $~lib/typedarray/Float32Array#every if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/math/NativeMath.mod (; 189 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 183 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -8092,54 +8724,49 @@ local.get $0 f64.mul ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 190 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 184 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 185 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/EVERY|inlined.0 (result i32) + block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + i32.const 3 + i32.shr_u + local.set $4 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc + i32.const 0 local.get $2 i32.const 3 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - f64.load offset=8 + f64.load local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$idii) i32.eqz - if - i32.const 0 - br $~lib/internal/typedarray/EVERY|inlined.0 - end + br_if $~lib/typedarray/EVERY|inlined.0 + drop local.get $2 i32.const 1 i32.add @@ -8150,29 +8777,29 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 192 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 186 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $0 - i32.const 0 + i32.load offset=4 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f64.store local.get $0 - i32.const 1 + i32.load offset=4 f64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 f64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=16 local.get $0 i32.const 99 call $~lib/typedarray/Float64Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -8183,63 +8810,52 @@ call $~lib/typedarray/Float64Array#every if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 193 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 187 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 255 i32.and - local.get $1 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load + i32.load offset=4 + local.get $1 i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $0 - i32.add - i32.load offset=8 - else - unreachable - end + i32.shl + i32.add + i32.load i32.const 255 i32.and i32.ne if - i32.const 752 - i32.const 8 + i32.const 616 + i32.const 16 i32.const 425 i32.const 4 call $~lib/env/abort unreachable end - global.get $std/typedarray/forEachCallCount local.get $1 + global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 800 - i32.const 8 + i32.const 672 + i32.const 16 i32.const 426 i32.const 4 call $~lib/env/abort unreachable end - global.get $std/typedarray/forEachSelf local.get $2 + global.get $std/typedarray/forEachSelf i32.ne if - i32.const 848 - i32.const 8 + i32.const 728 + i32.const 16 i32.const 427 i32.const 4 call $~lib/env/abort @@ -8250,33 +8866,30 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 194 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Int8Array#forEach (; 188 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 - i32.load offset=8 + i32.load offset=4 local.set $2 local.get $0 - i32.load - local.set $3 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $4 + i32.sub + local.set $3 loop $repeat|0 local.get $1 - local.get $2 + local.get $3 i32.lt_s if i32.const 3 global.set $~lib/argc local.get $1 - local.get $3 - i32.add - local.get $4 + local.get $2 i32.add - i32.load8_s offset=8 + i32.load8_s local.get $1 local.get $0 i32.const 101 @@ -8289,125 +8902,72 @@ end end ) - (func $std/typedarray/testArrayForEach (; 195 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 189 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount - i32.const 0 i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 0 - global.get $std/typedarray/forEachValues - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 1 - i32.const 1 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 + local.get $0 + i32.load offset=4 local.get $1 - i32.const 2 - i32.const 2 - global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + i32.load offset=4 + i32.load offset=4 + i32.store8 offset=1 + local.get $0 + i32.load offset=4 local.get $1 + i32.load offset=4 + i32.load offset=8 + i32.store8 offset=2 + local.get $0 call $~lib/typedarray/Int8Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 920 - i32.const 8 + i32.const 800 + i32.const 16 i32.const 430 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#forEach (; 196 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 190 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 - i32.load offset=8 + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + local.set $4 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $2 - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load8_u offset=8 + i32.load8_u local.get $2 local.get $0 local.get $1 @@ -8420,95 +8980,54 @@ end end ) - (func $std/typedarray/testArrayForEach (; 197 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 191 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 0 - global.get $std/typedarray/forEachValues - i32.load + call $~lib/typedarray/Uint8Array#constructor local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 255 - i32.and - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 1 - i32.const 1 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 255 - i32.and - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 + local.get $0 + i32.load offset=4 local.get $1 - i32.const 2 - i32.const 2 - global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 255 - i32.and - call $~lib/internal/typedarray/TypedArray#__set + i32.load offset=4 + i32.load offset=4 + i32.store8 offset=1 + local.get $0 + i32.load offset=4 local.get $1 + i32.load offset=4 + i32.load offset=8 + i32.store8 offset=2 + local.get $0 i32.const 102 call $~lib/typedarray/Uint8Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 920 - i32.const 8 + i32.const 800 + i32.const 16 i32.const 430 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach (; 198 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 192 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 @@ -8516,66 +9035,69 @@ local.tee $1 global.set $std/typedarray/forEachSelf local.get $1 - i32.const 0 - i32.const 0 + i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $2 + i32.load offset=4 i32.load + i32.const 255 + i32.and local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor i32.const 255 + local.get $0 + i32.sub + i32.const 31 + i32.shr_s + local.get $0 + i32.or i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 local.get $1 - i32.const 1 - i32.const 1 - global.get $std/typedarray/forEachValues - i32.load + i32.load offset=4 + local.get $2 + i32.load offset=4 + i32.load offset=4 + i32.const 255 + i32.and local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor i32.const 255 + local.get $0 + i32.sub + i32.const 31 + i32.shr_s + local.get $0 + i32.or i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 offset=1 local.get $1 - i32.const 2 - i32.const 2 - global.get $std/typedarray/forEachValues - i32.load + i32.load offset=4 + local.get $2 + i32.load offset=4 + i32.load offset=8 + i32.const 255 + i32.and local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor i32.const 255 + local.get $0 + i32.sub + i32.const 31 + i32.shr_s + local.get $0 + i32.or i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 offset=2 local.get $1 i32.const 103 call $~lib/typedarray/Uint8Array#forEach @@ -8583,93 +9105,163 @@ i32.const 3 i32.ne if - i32.const 920 - i32.const 8 + i32.const 800 + i32.const 16 i32.const 430 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 199 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 193 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 65535 i32.and - local.get $1 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load + i32.load offset=4 + local.get $1 i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $0 - i32.add - i32.load offset=8 - else - unreachable - end + i32.shl + i32.add + i32.load i32.const 65535 i32.and i32.ne if - i32.const 752 - i32.const 8 + i32.const 616 + i32.const 16 i32.const 425 i32.const 4 call $~lib/env/abort unreachable end + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 672 + i32.const 16 + i32.const 426 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 728 + i32.const 16 + i32.const 427 + i32.const 4 + call $~lib/env/abort + unreachable + end global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount + ) + (func $~lib/typedarray/Int16Array#forEach (; 194 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub + i32.const 1 + i32.shr_u + local.set $3 + loop $repeat|0 + local.get $1 + local.get $3 + i32.lt_s + if + i32.const 3 + global.set $~lib/argc + local.get $1 + i32.const 1 + i32.shl + local.get $2 + i32.add + i32.load16_s + local.get $1 + local.get $0 + i32.const 104 + call_indirect (type $FUNCSIG$viii) + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end + end + ) + (func $std/typedarray/testArrayForEach (; 195 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.load offset=4 + global.get $std/typedarray/forEachValues + local.tee $1 + i32.load offset=4 + i32.load + i32.store16 + local.get $0 + i32.load offset=4 + local.get $1 + i32.load offset=4 + i32.load offset=4 + i32.store16 offset=2 + local.get $0 + i32.load offset=4 local.get $1 + i32.load offset=4 + i32.load offset=8 + i32.store16 offset=4 + local.get $0 + call $~lib/typedarray/Int16Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 i32.ne if i32.const 800 - i32.const 8 - i32.const 426 - i32.const 4 - call $~lib/env/abort - unreachable - end - global.get $std/typedarray/forEachSelf - local.get $2 - i32.ne - if - i32.const 848 - i32.const 8 - i32.const 427 - i32.const 4 + i32.const 16 + i32.const 430 + i32.const 2 call $~lib/env/abort unreachable end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 200 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 196 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u + i32.load offset=4 local.set $2 local.get $0 - i32.load - local.set $3 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $4 + i32.sub + i32.const 1 + i32.shr_u + local.set $3 loop $repeat|0 local.get $1 - local.get $2 + local.get $3 i32.lt_s if i32.const 3 @@ -8677,14 +9269,12 @@ local.get $1 i32.const 1 i32.shl - local.get $3 - i32.add - local.get $4 + local.get $2 i32.add - i32.load16_s offset=8 + i32.load16_u local.get $1 local.get $0 - i32.const 104 + i32.const 105 call_indirect (type $FUNCSIG$viii) local.get $1 i32.const 1 @@ -8694,269 +9284,255 @@ end end ) - (func $std/typedarray/testArrayForEach (; 201 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 197 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 + call $~lib/typedarray/Uint16Array#constructor + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 0 + local.get $0 + i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 + local.get $0 + i32.load offset=4 local.get $1 - i32.const 1 - i32.const 1 - global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else + i32.load offset=4 + i32.load offset=4 + i32.store16 offset=2 + local.get $0 + i32.load offset=4 + local.get $1 + i32.load offset=4 + i32.load offset=8 + i32.store16 offset=4 + local.get $0 + call $~lib/typedarray/Uint16Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + if + i32.const 800 + i32.const 16 + i32.const 430 + i32.const 2 + call $~lib/env/abort unreachable end - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + ) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 198 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + global.get $std/typedarray/forEachValues + i32.load offset=4 local.get $1 i32.const 2 - i32.const 2 - global.get $std/typedarray/forEachValues - i32.load - local.tee $0 + i32.shl + i32.add i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else + i32.ne + if + i32.const 616 + i32.const 16 + i32.const 425 + i32.const 4 + call $~lib/env/abort unreachable end - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set local.get $1 - call $~lib/typedarray/Int16Array#forEach global.get $std/typedarray/forEachCallCount - i32.const 3 i32.ne if - i32.const 920 - i32.const 8 - i32.const 430 - i32.const 2 + i32.const 672 + i32.const 16 + i32.const 426 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 728 + i32.const 16 + i32.const 427 + i32.const 4 call $~lib/env/abort unreachable end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint16Array#forEach (; 202 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 199 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $2 - local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $0 + i32.load offset=8 + local.get $0 i32.load offset=4 + i32.sub + i32.const 2 + i32.shr_u local.set $4 loop $repeat|0 - local.get $1 local.get $2 + local.get $4 i32.lt_s if i32.const 3 global.set $~lib/argc - local.get $1 - i32.const 1 + local.get $2 + i32.const 2 i32.shl local.get $3 i32.add - local.get $4 - i32.add - i32.load16_u offset=8 - local.get $1 + i32.load + local.get $2 local.get $0 - i32.const 105 - call_indirect (type $FUNCSIG$viii) local.get $1 + call_indirect (type $FUNCSIG$viii) + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $repeat|0 end end ) - (func $std/typedarray/testArrayForEach (; 203 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 200 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 + call $~lib/typedarray/Int32Array#constructor + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 0 + local.get $0 + i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 65535 - i32.and - call $~lib/internal/typedarray/TypedArray#__set + i32.store + local.get $0 + i32.load offset=4 local.get $1 - i32.const 1 - i32.const 1 - global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else + i32.load offset=4 + i32.load offset=4 + i32.store offset=4 + local.get $0 + i32.load offset=4 + local.get $1 + i32.load offset=4 + i32.load offset=8 + i32.store offset=8 + local.get $0 + i32.const 106 + call $~lib/typedarray/Int32Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + if + i32.const 800 + i32.const 16 + i32.const 430 + i32.const 2 + call $~lib/env/abort unreachable end - i32.const 65535 - i32.and - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 2 - i32.const 2 - global.get $std/typedarray/forEachValues - i32.load + ) + (func $std/typedarray/testArrayForEach (; 201 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.load offset=4 + global.get $std/typedarray/forEachValues + local.tee $1 + i32.load offset=4 i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 65535 - i32.and - call $~lib/internal/typedarray/TypedArray#__set + i32.store + local.get $0 + i32.load offset=4 local.get $1 - call $~lib/typedarray/Uint16Array#forEach + i32.load offset=4 + i32.load offset=4 + i32.store offset=4 + local.get $0 + i32.load offset=4 + local.get $1 + i32.load offset=4 + i32.load offset=8 + i32.store offset=8 + local.get $0 + i32.const 107 + call $~lib/typedarray/Int32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 920 - i32.const 8 + i32.const 800 + i32.const 16 i32.const 430 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 204 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 202 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) local.get $0 - local.get $1 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load + i32.load offset=4 + local.get $1 i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $0 - i32.add - i32.load offset=8 - else - unreachable - end - i32.ne + i32.shl + i32.add + i32.load + i64.extend_i32_s + i64.ne if - i32.const 752 - i32.const 8 + i32.const 616 + i32.const 16 i32.const 425 i32.const 4 call $~lib/env/abort unreachable end - global.get $std/typedarray/forEachCallCount local.get $1 + global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 800 - i32.const 8 + i32.const 672 + i32.const 16 i32.const 426 i32.const 4 call $~lib/env/abort unreachable end - global.get $std/typedarray/forEachSelf local.get $2 + global.get $std/typedarray/forEachSelf i32.ne if - i32.const 848 - i32.const 8 + i32.const 728 + i32.const 16 i32.const 427 i32.const 4 call $~lib/env/abort @@ -8967,42 +9543,38 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 205 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 203 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u + i32.load offset=4 local.set $3 local.get $0 - i32.load - local.set $4 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $5 + i32.sub + i32.const 3 + i32.shr_u + local.set $4 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $2 - i32.const 2 + i32.const 3 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load offset=8 + i64.load local.get $2 local.get $0 local.get $1 - call_indirect (type $FUNCSIG$viii) + call_indirect (type $FUNCSIG$vjii) local.get $2 i32.const 1 i32.add @@ -9011,212 +9583,259 @@ end end ) - (func $std/typedarray/testArrayForEach (; 206 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 204 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 + call $~lib/typedarray/Int64Array#constructor + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 0 + local.get $0 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else + local.tee $1 + i32.load offset=4 + i64.load32_s + i64.store + local.get $0 + i32.load offset=4 + local.get $1 + i32.load offset=4 + i64.load32_s offset=4 + i64.store offset=8 + local.get $0 + i32.load offset=4 + local.get $1 + i32.load offset=4 + i64.load32_s offset=8 + i64.store offset=16 + local.get $0 + i32.const 108 + call $~lib/typedarray/Int64Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + if + i32.const 800 + i32.const 16 + i32.const 430 + i32.const 2 + call $~lib/env/abort unreachable end - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 1 - i32.const 1 - global.get $std/typedarray/forEachValues - i32.load + ) + (func $std/typedarray/testArrayForEach (; 205 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else + global.set $std/typedarray/forEachSelf + local.get $0 + i32.load offset=4 + global.get $std/typedarray/forEachValues + local.tee $1 + i32.load offset=4 + i64.load32_s + i64.store + local.get $0 + i32.load offset=4 + local.get $1 + i32.load offset=4 + i64.load32_s offset=4 + i64.store offset=8 + local.get $0 + i32.load offset=4 + local.get $1 + i32.load offset=4 + i64.load32_s offset=8 + i64.store offset=16 + local.get $0 + i32.const 109 + call $~lib/typedarray/Int64Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + if + i32.const 800 + i32.const 16 + i32.const 430 + i32.const 2 + call $~lib/env/abort unreachable end - call $~lib/internal/typedarray/TypedArray#__set + ) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 206 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + local.get $0 + global.get $std/typedarray/forEachValues + i32.load offset=4 local.get $1 i32.const 2 - i32.const 2 - global.get $std/typedarray/forEachValues - i32.load - local.tee $0 + i32.shl + i32.add i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else + f32.convert_i32_s + f32.ne + if + i32.const 616 + i32.const 16 + i32.const 425 + i32.const 4 + call $~lib/env/abort unreachable end - call $~lib/internal/typedarray/TypedArray#__set local.get $1 - i32.const 106 - call $~lib/typedarray/Int32Array#forEach global.get $std/typedarray/forEachCallCount - i32.const 3 i32.ne if - i32.const 920 - i32.const 8 - i32.const 430 - i32.const 2 + i32.const 672 + i32.const 16 + i32.const 426 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 728 + i32.const 16 + i32.const 427 + i32.const 4 call $~lib/env/abort unreachable end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount + ) + (func $~lib/typedarray/Float32Array#forEach (; 207 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub + i32.const 2 + i32.shr_u + local.set $3 + loop $repeat|0 + local.get $1 + local.get $3 + i32.lt_s + if + i32.const 3 + global.set $~lib/argc + local.get $1 + i32.const 2 + i32.shl + local.get $2 + i32.add + f32.load + local.get $1 + local.get $0 + i32.const 110 + call_indirect (type $FUNCSIG$vfii) + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end + end ) - (func $std/typedarray/testArrayForEach (; 207 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 208 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 0 - global.get $std/typedarray/forEachValues - i32.load + call $~lib/typedarray/Float32Array#constructor local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 1 - i32.const 1 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end - call $~lib/internal/typedarray/TypedArray#__set + f32.convert_i32_s + f32.store + local.get $0 + i32.load offset=4 local.get $1 - i32.const 2 - i32.const 2 - global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - call $~lib/internal/typedarray/TypedArray#__set + i32.load offset=4 + i32.load offset=4 + f32.convert_i32_s + f32.store offset=4 + local.get $0 + i32.load offset=4 local.get $1 - i32.const 107 - call $~lib/typedarray/Int32Array#forEach + i32.load offset=4 + i32.load offset=8 + f32.convert_i32_s + f32.store offset=8 + local.get $0 + call $~lib/typedarray/Float32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 920 - i32.const 8 + i32.const 800 + i32.const 16 i32.const 430 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 208 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $std/typedarray/testArrayForEach~anonymous|0 (; 209 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + local.get $0 global.get $std/typedarray/forEachValues - i32.load - local.tee $3 - i32.load + i32.load offset=4 + local.get $1 i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $3 - i32.add - i32.load offset=8 - else - unreachable - end - i64.extend_i32_s - local.get $0 - i64.ne + i32.shl + i32.add + i32.load + f64.convert_i32_s + f64.ne if - i32.const 752 - i32.const 8 + i32.const 616 + i32.const 16 i32.const 425 i32.const 4 call $~lib/env/abort unreachable end - global.get $std/typedarray/forEachCallCount local.get $1 + global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 800 - i32.const 8 + i32.const 672 + i32.const 16 i32.const 426 i32.const 4 call $~lib/env/abort unreachable end - global.get $std/typedarray/forEachSelf local.get $2 + global.get $std/typedarray/forEachSelf i32.ne if - i32.const 848 - i32.const 8 + i32.const 728 + i32.const 16 i32.const 427 i32.const 4 call $~lib/env/abort @@ -9227,641 +9846,608 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 209 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#forEach (; 210 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $2 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 3 i32.shr_u local.set $3 - local.get $0 - i32.load - local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $1 + local.get $3 + i32.lt_s + if i32.const 3 global.set $~lib/argc - local.get $2 + local.get $1 i32.const 3 i32.shl - local.get $4 - i32.add - local.get $5 - i32.add - i64.load offset=8 local.get $2 + i32.add + f64.load + local.get $1 local.get $0 + i32.const 111 + call_indirect (type $FUNCSIG$vdii) local.get $1 - call_indirect (type $FUNCSIG$vjii) - local.get $2 i32.const 1 i32.add - local.set $2 + local.set $1 br $repeat|0 end end ) - (func $std/typedarray/testArrayForEach (; 210 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 211 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 0 - global.get $std/typedarray/forEachValues - i32.load + call $~lib/typedarray/Float64Array#constructor local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 1 - i32.const 1 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + f64.convert_i32_s + f64.store + local.get $0 + i32.load offset=4 local.get $1 - i32.const 2 - i32.const 2 - global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + i32.load offset=4 + i32.load offset=4 + f64.convert_i32_s + f64.store offset=8 + local.get $0 + i32.load offset=4 local.get $1 - i32.const 108 - call $~lib/typedarray/Int64Array#forEach + i32.load offset=4 + i32.load offset=8 + f64.convert_i32_s + f64.store offset=16 + local.get $0 + call $~lib/typedarray/Float64Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 920 - i32.const 8 + i32.const 800 + i32.const 16 i32.const 430 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach (; 211 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Int8Array#reverse (; 212 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub + i32.const 1 + i32.sub + local.set $1 + loop $repeat|0 + local.get $2 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $4 + i32.add + local.tee $3 + i32.load8_s + local.set $5 + local.get $3 + local.get $1 + local.get $4 + i32.add + local.tee $3 + i32.load8_s + i32.store8 + local.get $3 + local.get $5 + i32.store8 + local.get $2 + i32.const 1 + i32.add + local.set $2 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $repeat|0 + end + end + local.get $0 + ) + (func $std/typedarray/testArrayReverse (; 213 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 0 - global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable + (local $2 i32) + (local $3 i32) + (local $4 i32) + global.get $std/typedarray/testArrayReverseValues + local.set $1 + i32.const 9 + call $~lib/typedarray/Int8Array#constructor + local.set $2 + i32.const 9 + call $~lib/typedarray/Int8Array#constructor + local.set $3 + loop $repeat|0 + block $break|0 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 + local.get $2 + i32.load offset=4 + local.get $0 + i32.add + local.get $0 + i32.const 2 + i32.shl + local.tee $4 + local.get $1 + i32.load offset=4 + i32.add + i32.load + i32.store8 + local.get $3 + i32.load offset=4 + local.get $0 + i32.add + local.get $1 + i32.load offset=4 + local.get $4 + i32.add + i32.load + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $repeat|0 + end end - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 1 - i32.const 1 - global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable + local.get $2 + call $~lib/typedarray/Int8Array#reverse + drop + i32.const 0 + local.set $0 + loop $repeat|1 + block $break|1 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|1 + local.get $2 + i32.load offset=4 + local.get $0 + i32.add + i32.load8_u + local.get $1 + i32.load offset=4 + i32.const 8 + local.get $0 + i32.sub + i32.const 2 + i32.shl + i32.add + i32.load + i32.const 255 + i32.and + i32.ne + if + i32.const 936 + i32.const 16 + i32.const 461 + i32.const 4 + call $~lib/env/abort + unreachable + else + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $repeat|1 + end + unreachable + end end - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 2 - i32.const 2 - global.get $std/typedarray/forEachValues - i32.load + local.get $3 + i32.const 4 + i32.const 8 + call $~lib/typedarray/Int8Array#subarray + call $~lib/typedarray/Int8Array#reverse local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 109 - call $~lib/typedarray/Int64Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 + i32.load offset=4 + i32.load8_s + i32.const 8 i32.ne if - i32.const 920 - i32.const 8 - i32.const 430 + i32.const 1016 + i32.const 16 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 212 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) - (local $3 i32) local.get $0 - local.get $1 - global.get $std/typedarray/forEachValues - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $3 - i32.add - i32.load offset=8 - else - unreachable - end - f32.convert_i32_s - f32.ne + i32.load offset=4 + i32.load8_s offset=1 + i32.const 7 + i32.ne if - i32.const 752 - i32.const 8 - i32.const 425 - i32.const 4 + i32.const 1016 + i32.const 16 + i32.const 467 + i32.const 2 call $~lib/env/abort unreachable end - global.get $std/typedarray/forEachCallCount - local.get $1 + local.get $0 + i32.load offset=4 + i32.load8_s offset=2 + i32.const 6 i32.ne if - i32.const 800 - i32.const 8 - i32.const 426 - i32.const 4 + i32.const 1016 + i32.const 16 + i32.const 468 + i32.const 2 call $~lib/env/abort unreachable end - global.get $std/typedarray/forEachSelf - local.get $2 + local.get $0 + i32.load offset=4 + i32.load8_s offset=3 + i32.const 5 i32.ne if - i32.const 848 - i32.const 8 - i32.const 427 - i32.const 4 + i32.const 1016 + i32.const 16 + i32.const 469 + i32.const 2 call $~lib/env/abort unreachable end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 213 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Uint8Array#reverse (; 214 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $2 + i32.load offset=4 + local.set $4 local.get $0 - i32.load - local.set $3 + i32.load offset=8 local.get $0 i32.load offset=4 - local.set $4 + i32.sub + i32.const 1 + i32.sub + local.set $1 loop $repeat|0 - local.get $1 local.get $2 + local.get $1 i32.lt_s if - i32.const 3 - global.set $~lib/argc - local.get $1 - i32.const 2 - i32.shl - local.get $3 - i32.add + local.get $2 local.get $4 i32.add - f32.load offset=8 - local.get $1 - local.get $0 - i32.const 110 - call_indirect (type $FUNCSIG$vfii) + local.tee $3 + i32.load8_u + local.set $5 + local.get $3 local.get $1 + local.get $4 + i32.add + local.tee $3 + i32.load8_u + i32.store8 + local.get $3 + local.get $5 + i32.store8 + local.get $2 i32.const 1 i32.add + local.set $2 + local.get $1 + i32.const 1 + i32.sub local.set $1 br $repeat|0 end end + local.get $0 ) - (func $std/typedarray/testArrayForEach (; 214 ;) (type $FUNCSIG$v) - (local $0 i32) + (func $~lib/typedarray/Uint8Array#subarray (; 215 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int32Array#constructor + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 8 + local.get $0 + local.tee $2 + i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub local.tee $1 - global.set $std/typedarray/forEachSelf + i32.const 8 local.get $1 - i32.const 0 - i32.const 0 - global.get $std/typedarray/forEachValues - i32.load + i32.lt_s + select local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + i32.const 4 local.get $1 - i32.const 1 - i32.const 1 - global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end - f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + i32.const 4 local.get $1 - i32.const 2 - i32.const 2 - global.get $std/typedarray/forEachValues - i32.load - local.tee $0 + i32.lt_s + select + local.tee $3 + local.get $0 + local.get $3 + i32.gt_s + select + local.set $4 + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 5 + call $~lib/runtime/doRegister + local.set $0 + local.get $2 + i32.load offset=4 + local.set $1 + local.get $0 + local.get $2 i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + i32.store + local.get $0 local.get $1 - call $~lib/typedarray/Float32Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 + local.get $3 + i32.add + i32.store offset=4 + local.get $0 + local.get $1 + local.get $4 + i32.add + i32.store offset=8 + local.get $0 + ) + (func $std/typedarray/testArrayReverse (; 216 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + global.get $std/typedarray/testArrayReverseValues + local.set $1 + i32.const 0 + i32.const 9 + call $~lib/typedarray/Uint8Array#constructor + local.set $2 + i32.const 0 + i32.const 9 + call $~lib/typedarray/Uint8Array#constructor + local.set $3 + loop $repeat|0 + block $break|0 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 + local.get $2 + i32.load offset=4 + local.get $0 + i32.add + local.get $0 + i32.const 2 + i32.shl + local.tee $4 + local.get $1 + i32.load offset=4 + i32.add + i32.load + i32.store8 + local.get $3 + i32.load offset=4 + local.get $0 + i32.add + local.get $1 + i32.load offset=4 + local.get $4 + i32.add + i32.load + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $repeat|0 + end + end + local.get $2 + call $~lib/typedarray/Uint8Array#reverse + drop + i32.const 0 + local.set $0 + loop $repeat|1 + block $break|1 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|1 + local.get $2 + i32.load offset=4 + local.get $0 + i32.add + i32.load8_u + local.get $1 + i32.load offset=4 + i32.const 8 + local.get $0 + i32.sub + i32.const 2 + i32.shl + i32.add + i32.load + i32.const 255 + i32.and + i32.ne + if + i32.const 936 + i32.const 16 + i32.const 461 + i32.const 4 + call $~lib/env/abort + unreachable + else + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $repeat|1 + end + unreachable + end + end + local.get $3 + call $~lib/typedarray/Uint8Array#subarray + call $~lib/typedarray/Uint8Array#reverse + local.tee $0 + i32.load offset=4 + i32.load8_u + i32.const 8 i32.ne if - i32.const 920 - i32.const 8 - i32.const 430 + i32.const 1016 + i32.const 16 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 215 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $0 - local.get $1 - global.get $std/typedarray/forEachValues - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $3 - i32.add - i32.load offset=8 - else - unreachable - end - f64.convert_i32_s - f64.ne + local.get $0 + i32.load offset=4 + i32.load8_u offset=1 + i32.const 7 + i32.ne if - i32.const 752 - i32.const 8 - i32.const 425 - i32.const 4 + i32.const 1016 + i32.const 16 + i32.const 467 + i32.const 2 call $~lib/env/abort unreachable end - global.get $std/typedarray/forEachCallCount - local.get $1 + local.get $0 + i32.load offset=4 + i32.load8_u offset=2 + i32.const 6 i32.ne if - i32.const 800 - i32.const 8 - i32.const 426 - i32.const 4 + i32.const 1016 + i32.const 16 + i32.const 468 + i32.const 2 call $~lib/env/abort unreachable end - global.get $std/typedarray/forEachSelf - local.get $2 + local.get $0 + i32.load offset=4 + i32.load8_u offset=3 + i32.const 5 i32.ne if - i32.const 848 - i32.const 8 - i32.const 427 - i32.const 4 + i32.const 1016 + i32.const 16 + i32.const 469 + i32.const 2 call $~lib/env/abort unreachable end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 216 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 217 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) + i32.const 8 local.get $0 + local.tee $2 i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $2 - local.get $0 - i32.load - local.set $3 local.get $0 i32.load offset=4 - local.set $4 - loop $repeat|0 - local.get $1 - local.get $2 - i32.lt_s - if - i32.const 3 - global.set $~lib/argc - local.get $1 - i32.const 3 - i32.shl - local.get $3 - i32.add - local.get $4 - i32.add - f64.load offset=8 - local.get $1 - local.get $0 - i32.const 111 - call_indirect (type $FUNCSIG$vdii) - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $repeat|0 - end - end - ) - (func $std/typedarray/testArrayForEach (; 217 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int64Array#constructor + i32.sub local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 0 - global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + i32.const 8 local.get $1 - i32.const 1 - i32.const 1 - global.get $std/typedarray/forEachValues - i32.load + i32.lt_s + select local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end - f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + i32.const 4 local.get $1 - i32.const 2 - i32.const 2 - global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + i32.const 4 local.get $1 - call $~lib/typedarray/Float64Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - if - i32.const 920 - i32.const 8 - i32.const 430 - i32.const 2 - call $~lib/env/abort - unreachable - end - ) - (func $~lib/typedarray/Int8Array#reverse (; 218 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + i32.lt_s + select + local.tee $3 + local.get $0 + local.get $3 + i32.gt_s + select + local.set $4 + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 6 + call $~lib/runtime/doRegister + local.set $0 + local.get $2 + i32.load offset=4 + local.set $1 local.get $0 + local.get $2 i32.load - local.set $3 + i32.store local.get $0 - i32.load offset=4 - local.set $4 + local.get $1 + local.get $3 + i32.add + i32.store offset=4 local.get $0 - i32.load offset=8 - i32.const 1 - i32.sub - local.set $2 - loop $repeat|0 - block $break|0 - local.get $1 - local.get $2 - i32.ge_s - br_if $break|0 - local.get $1 - local.get $3 - i32.add - local.get $4 - i32.add - i32.load8_s offset=8 - local.set $5 - local.get $1 - local.get $3 - i32.add - local.get $4 - i32.add - local.get $2 - local.get $3 - i32.add - local.get $4 - i32.add - i32.load8_s offset=8 - i32.store8 offset=8 - local.get $2 - local.get $3 - i32.add - local.get $4 - i32.add - local.get $5 - i32.store8 offset=8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $repeat|0 - end - end + local.get $1 + local.get $4 + i32.add + i32.store offset=8 local.get $0 ) - (func $std/typedarray/testArrayReverse (; 219 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 218 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9870,69 +10456,71 @@ (local $5 i32) global.get $std/typedarray/testArrayReverseValues local.set $2 - i32.const 0 i32.const 9 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.set $3 - i32.const 0 i32.const 9 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.set $4 loop $repeat|0 - local.get $0 - i32.const 9 - i32.lt_s - if + block $break|0 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 local.get $3 + i32.load offset=4 local.get $0 + i32.add local.get $0 - local.get $2 - i32.load - local.tee $1 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 24 i32.shl - i32.const 24 + local.tee $5 + local.get $2 + i32.load offset=4 + i32.add + i32.load + i32.const 255 + i32.and + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + local.get $1 + i32.or + i32.and + i32.store8 local.get $4 + i32.load offset=4 local.get $0 - local.get $0 + i32.add local.get $2 + i32.load offset=4 + local.get $5 + i32.add i32.load + i32.const 255 + i32.and local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 24 - i32.shl - i32.const 24 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + local.get $1 + i32.or + i32.and + i32.store8 local.get $0 i32.const 1 i32.add @@ -9941,47 +10529,36 @@ end end local.get $3 - call $~lib/typedarray/Int8Array#reverse + call $~lib/typedarray/Uint8Array#reverse drop i32.const 0 local.set $0 loop $repeat|1 - local.get $0 - i32.const 9 - i32.lt_s - if + block $break|1 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|1 local.get $3 + i32.load offset=4 local.get $0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.add + i32.load8_u + local.get $2 + i32.load offset=4 i32.const 8 local.get $0 i32.sub - local.tee $1 - local.get $2 - i32.load - local.tee $5 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end + i32.shl + i32.add + i32.load i32.const 255 i32.and i32.ne if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -9997,134 +10574,179 @@ end end local.get $4 - i32.const 4 - i32.const 8 - call $~lib/typedarray/Int8Array#subarray - call $~lib/typedarray/Int8Array#reverse + call $~lib/typedarray/Uint8ClampedArray#subarray + call $~lib/typedarray/Uint8Array#reverse local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u i32.const 8 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u offset=1 i32.const 7 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u offset=2 i32.const 6 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u offset=3 i32.const 5 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 220 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 219 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - i32.load - local.set $3 - local.get $0 i32.load offset=4 local.set $4 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub + i32.const 1 + i32.shr_u i32.const 1 i32.sub - local.set $2 + local.set $1 loop $repeat|0 - block $break|0 - local.get $1 + local.get $2 + local.get $1 + i32.lt_s + if local.get $2 - i32.ge_s - br_if $break|0 - local.get $1 - local.get $3 - i32.add + i32.const 1 + i32.shl local.get $4 i32.add - i32.load8_u offset=8 + local.tee $3 + i32.load16_s local.set $5 - local.get $1 local.get $3 - i32.add - local.get $4 - i32.add - local.get $2 - local.get $3 - i32.add + local.get $1 + i32.const 1 + i32.shl local.get $4 i32.add - i32.load8_u offset=8 - i32.store8 offset=8 - local.get $2 + local.tee $3 + i32.load16_s + i32.store16 local.get $3 - i32.add - local.get $4 - i32.add local.get $5 - i32.store8 offset=8 - local.get $1 + i32.store16 + local.get $2 i32.const 1 i32.add - local.set $1 - local.get $2 + local.set $2 + local.get $1 i32.const 1 i32.sub - local.set $2 + local.set $1 br $repeat|0 end end local.get $0 ) - (func $std/typedarray/testArrayReverse (; 221 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Int16Array#subarray (; 220 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 8 + local.get $0 + local.tee $2 + i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub + i32.const 1 + i32.shr_u + local.tee $1 + i32.const 8 + local.get $1 + i32.lt_s + select + local.tee $0 + i32.const 4 + local.get $1 + i32.const 4 + local.get $1 + i32.lt_s + select + local.tee $3 + local.get $0 + local.get $3 + i32.gt_s + select + local.set $4 + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 7 + call $~lib/runtime/doRegister + local.set $0 + local.get $2 + i32.load offset=4 + local.set $1 + local.get $0 + local.get $2 + i32.load + i32.store + local.get $0 + local.get $3 + i32.const 1 + i32.shl + local.get $1 + i32.add + i32.store offset=4 + local.get $0 + local.get $4 + i32.const 1 + i32.shl + local.get $1 + i32.add + i32.store offset=8 + local.get $0 + ) + (func $std/typedarray/testArrayReverse (; 221 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10132,66 +10754,45 @@ (local $4 i32) (local $5 i32) global.get $std/typedarray/testArrayReverseValues + local.set $1 + i32.const 9 + call $~lib/typedarray/Int16Array#constructor local.set $2 - i32.const 0 i32.const 9 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Int16Array#constructor local.set $3 - i32.const 0 - i32.const 9 - call $~lib/typedarray/Int8Array#constructor - local.set $4 loop $repeat|0 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 + block $break|0 local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 local.get $0 + i32.const 1 + i32.shl + local.tee $4 local.get $2 - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 255 - i32.and - call $~lib/internal/typedarray/TypedArray#__set - local.get $4 - local.get $0 + i32.load offset=4 + i32.add local.get $0 - local.get $2 - i32.load - local.tee $1 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 255 - i32.and - call $~lib/internal/typedarray/TypedArray#__set + i32.shl + local.tee $5 + local.get $1 + i32.load offset=4 + i32.add + i32.load + i32.store16 + local.get $3 + i32.load offset=4 + local.get $4 + i32.add + local.get $1 + i32.load offset=4 + local.get $5 + i32.add + i32.load + i32.store16 local.get $0 i32.const 1 i32.add @@ -10199,48 +10800,39 @@ br $repeat|0 end end - local.get $3 - call $~lib/typedarray/Uint8Array#reverse + local.get $2 + call $~lib/typedarray/Int16Array#reverse drop i32.const 0 local.set $0 loop $repeat|1 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 + block $break|1 local.get $0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.const 9 + i32.ge_s + br_if $break|1 + local.get $2 + i32.load offset=4 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $1 + i32.load offset=4 i32.const 8 local.get $0 i32.sub - local.tee $1 - local.get $2 - i32.load - local.tee $5 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 255 + i32.shl + i32.add + i32.load + i32.const 65535 i32.and i32.ne if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -10255,73 +10847,180 @@ unreachable end end - local.get $4 - i32.const 4 - i32.const 8 - call $~lib/typedarray/Int8Array#subarray - call $~lib/typedarray/Uint8Array#reverse + local.get $3 + call $~lib/typedarray/Int16Array#subarray + call $~lib/typedarray/Int16Array#reverse local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load16_s i32.const 8 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load16_s offset=2 i32.const 7 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load16_s offset=4 i32.const 6 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load16_s offset=6 i32.const 5 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayReverse (; 222 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Uint16Array#reverse (; 222 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub + local.set $1 + loop $repeat|0 + local.get $2 + local.get $1 + i32.lt_s + if + local.get $2 + i32.const 1 + i32.shl + local.get $4 + i32.add + local.tee $3 + i32.load16_u + local.set $5 + local.get $3 + local.get $1 + i32.const 1 + i32.shl + local.get $4 + i32.add + local.tee $3 + i32.load16_u + i32.store16 + local.get $3 + local.get $5 + i32.store16 + local.get $2 + i32.const 1 + i32.add + local.set $2 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $repeat|0 + end + end + local.get $0 + ) + (func $~lib/typedarray/Uint16Array#subarray (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 8 + local.get $0 + local.tee $2 + i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub + i32.const 1 + i32.shr_u + local.tee $1 + i32.const 8 + local.get $1 + i32.lt_s + select + local.tee $0 + i32.const 4 + local.get $1 + i32.const 4 + local.get $1 + i32.lt_s + select + local.tee $3 + local.get $0 + local.get $3 + i32.gt_s + select + local.set $4 + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 8 + call $~lib/runtime/doRegister + local.set $0 + local.get $2 + i32.load offset=4 + local.set $1 + local.get $0 + local.get $2 + i32.load + i32.store + local.get $0 + local.get $3 + i32.const 1 + i32.shl + local.get $1 + i32.add + i32.store offset=4 + local.get $0 + local.get $4 + i32.const 1 + i32.shl + local.get $1 + i32.add + i32.store offset=8 + local.get $0 + ) + (func $std/typedarray/testArrayReverse (; 224 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10329,64 +11028,45 @@ (local $4 i32) (local $5 i32) global.get $std/typedarray/testArrayReverseValues + local.set $1 + i32.const 9 + call $~lib/typedarray/Uint16Array#constructor local.set $2 i32.const 9 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/typedarray/Uint16Array#constructor local.set $3 - i32.const 9 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.set $4 loop $repeat|0 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 + block $break|0 local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 local.get $0 + i32.const 1 + i32.shl + local.tee $4 local.get $2 - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $4 - local.get $0 + i32.load offset=4 + i32.add local.get $0 - local.get $2 + i32.const 2 + i32.shl + local.tee $5 + local.get $1 + i32.load offset=4 + i32.add i32.load - local.tee $1 + i32.store16 + local.get $3 + i32.load offset=4 + local.get $4 + i32.add + local.get $1 + i32.load offset=4 + local.get $5 + i32.add i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store16 local.get $0 i32.const 1 i32.add @@ -10394,48 +11074,39 @@ br $repeat|0 end end - local.get $3 - call $~lib/typedarray/Uint8Array#reverse + local.get $2 + call $~lib/typedarray/Uint16Array#reverse drop - i32.const 0 - local.set $0 - loop $repeat|1 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 + i32.const 0 + local.set $0 + loop $repeat|1 + block $break|1 local.get $0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.const 9 + i32.ge_s + br_if $break|1 + local.get $2 + i32.load offset=4 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $1 + i32.load offset=4 i32.const 8 local.get $0 i32.sub - local.tee $1 - local.get $2 - i32.load - local.tee $5 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 255 + i32.shl + i32.add + i32.load + i32.const 65535 i32.and i32.ne if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -10450,265 +11121,162 @@ unreachable end end - local.get $4 - i32.const 4 - i32.const 8 - call $~lib/typedarray/Int8Array#subarray - call $~lib/typedarray/Uint8Array#reverse + local.get $3 + call $~lib/typedarray/Uint16Array#subarray + call $~lib/typedarray/Uint16Array#reverse local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load16_u i32.const 8 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load16_u offset=2 i32.const 7 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load16_u offset=4 i32.const 6 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load16_u offset=6 i32.const 5 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 225 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - i32.load - local.set $3 - local.get $0 i32.load offset=4 local.set $4 local.get $0 i32.load offset=8 - i32.const 1 + local.get $0 + i32.load offset=4 + i32.sub + i32.const 2 i32.shr_u i32.const 1 i32.sub - local.set $2 + local.set $1 loop $repeat|0 - block $break|0 - local.get $1 + local.get $2 + local.get $1 + i32.lt_s + if local.get $2 - i32.ge_s - br_if $break|0 - local.get $1 - i32.const 1 + i32.const 2 i32.shl - local.get $3 - i32.add local.get $4 i32.add - i32.load16_s offset=8 + local.tee $3 + i32.load local.set $5 + local.get $3 local.get $1 - i32.const 1 + i32.const 2 i32.shl - local.get $3 - i32.add local.get $4 i32.add - local.get $2 - i32.const 1 - i32.shl + local.tee $3 + i32.load + i32.store local.get $3 - i32.add - local.get $4 - i32.add - i32.load16_s offset=8 - i32.store16 offset=8 + local.get $5 + i32.store local.get $2 i32.const 1 - i32.shl - local.get $3 - i32.add - local.get $4 i32.add - local.get $5 - i32.store16 offset=8 + local.set $2 local.get $1 i32.const 1 - i32.add - local.set $1 - local.get $2 - i32.const 1 i32.sub - local.set $2 + local.set $1 br $repeat|0 end end local.get $0 ) - (func $~lib/typedarray/Int16Array#subarray (; 224 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 4 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.tee $1 - i32.const 4 - local.get $1 - i32.lt_s - select - local.set $3 - i32.const 8 - local.get $1 - i32.const 8 - local.get $1 - i32.lt_s - select - local.tee $2 - local.get $3 - local.get $2 - local.get $3 - i32.gt_s - select - local.set $1 - i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.tee $2 - local.get $0 - i32.load - i32.store - local.get $2 - local.get $0 - i32.load offset=4 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.get $1 - local.get $3 - i32.sub - i32.const 1 - i32.shl - i32.store offset=8 - local.get $2 - ) - (func $std/typedarray/testArrayReverse (; 225 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 226 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $std/typedarray/testArrayReverseValues - local.set $2 + local.set $1 i32.const 9 - call $~lib/typedarray/Int16Array#constructor - local.set $3 + call $~lib/typedarray/Int32Array#constructor + local.set $2 i32.const 9 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Int32Array#constructor local.set $4 loop $repeat|0 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 + block $break|0 local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 local.get $0 - local.get $2 - i32.load - local.tee $1 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 16 i32.shl - i32.const 16 - i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $4 - local.get $0 - local.get $0 + local.tee $3 local.get $2 + i32.load offset=4 + i32.add + local.get $1 + i32.load offset=4 + local.get $3 + i32.add i32.load - local.tee $1 + i32.store + local.get $4 + i32.load offset=4 + local.get $3 + i32.add + local.get $1 + i32.load offset=4 + local.get $3 + i32.add i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 i32.const 1 i32.add @@ -10716,48 +11284,37 @@ br $repeat|0 end end - local.get $3 - call $~lib/typedarray/Int16Array#reverse + local.get $2 + call $~lib/typedarray/Int32Array#reverse drop i32.const 0 local.set $0 loop $repeat|1 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 - local.get $0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and - i32.const 8 + block $break|1 local.get $0 - i32.sub - local.tee $1 + i32.const 9 + i32.ge_s + br_if $break|1 local.get $2 - i32.load - local.tee $5 - i32.load + i32.load offset=4 + local.get $0 i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 65535 - i32.and + i32.shl + i32.add + i32.load + local.get $1 + i32.load offset=4 + i32.const 8 + local.get $0 + i32.sub + i32.const 2 + i32.shl + i32.add + i32.load i32.ne if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -10773,207 +11330,166 @@ end end local.get $4 - call $~lib/typedarray/Int16Array#subarray - call $~lib/typedarray/Int16Array#reverse + i32.const 4 + i32.const 8 + call $~lib/typedarray/Int32Array#subarray + call $~lib/typedarray/Int32Array#reverse local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load i32.const 8 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load offset=4 i32.const 7 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load offset=8 i32.const 6 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load offset=12 i32.const 5 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 226 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 227 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + i32.const 8 local.get $0 - i32.load - local.set $3 + local.tee $2 + i32.load offset=8 local.get $0 i32.load offset=4 + i32.sub + i32.const 2 + i32.shr_u + local.tee $1 + i32.const 8 + local.get $1 + i32.lt_s + select + local.tee $0 + i32.const 4 + local.get $1 + i32.const 4 + local.get $1 + i32.lt_s + select + local.tee $3 + local.get $0 + local.get $3 + i32.gt_s + select local.set $4 + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 10 + call $~lib/runtime/doRegister + local.set $0 + local.get $2 + i32.load offset=4 + local.set $1 local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $2 - loop $repeat|0 - block $break|0 - local.get $1 - local.get $2 - i32.ge_s - br_if $break|0 - local.get $1 - i32.const 1 - i32.shl - local.get $3 - i32.add - local.get $4 - i32.add - i32.load16_u offset=8 - local.set $5 - local.get $1 - i32.const 1 - i32.shl - local.get $3 - i32.add - local.get $4 - i32.add - local.get $2 - i32.const 1 - i32.shl - local.get $3 - i32.add - local.get $4 - i32.add - i32.load16_u offset=8 - i32.store16 offset=8 - local.get $2 - i32.const 1 - i32.shl - local.get $3 - i32.add - local.get $4 - i32.add - local.get $5 - i32.store16 offset=8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $repeat|0 - end - end + local.get $2 + i32.load + i32.store + local.get $0 + local.get $3 + i32.const 2 + i32.shl + local.get $1 + i32.add + i32.store offset=4 + local.get $0 + local.get $4 + i32.const 2 + i32.shl + local.get $1 + i32.add + i32.store offset=8 local.get $0 ) - (func $std/typedarray/testArrayReverse (; 227 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 228 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $std/typedarray/testArrayReverseValues - local.set $2 + local.set $1 i32.const 9 - call $~lib/typedarray/Int16Array#constructor - local.set $3 + call $~lib/typedarray/Uint32Array#constructor + local.set $2 i32.const 9 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.set $4 loop $repeat|0 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 + block $break|0 local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 local.get $0 - local.get $2 - i32.load - local.tee $1 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 65535 - i32.and - call $~lib/internal/typedarray/TypedArray#__set - local.get $4 - local.get $0 - local.get $0 + i32.shl + local.tee $3 local.get $2 + i32.load offset=4 + i32.add + local.get $1 + i32.load offset=4 + local.get $3 + i32.add i32.load - local.tee $1 + i32.store + local.get $4 + i32.load offset=4 + local.get $3 + i32.add + local.get $1 + i32.load offset=4 + local.get $3 + i32.add i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 65535 - i32.and - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 i32.const 1 i32.add @@ -10981,48 +11497,37 @@ br $repeat|0 end end - local.get $3 - call $~lib/typedarray/Uint16Array#reverse + local.get $2 + call $~lib/typedarray/Int32Array#reverse drop i32.const 0 local.set $0 loop $repeat|1 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 + block $break|1 local.get $0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.const 9 + i32.ge_s + br_if $break|1 + local.get $2 + i32.load offset=4 + local.get $0 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $1 + i32.load offset=4 i32.const 8 local.get $0 i32.sub - local.tee $1 - local.get $2 - i32.load - local.tee $5 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 65535 - i32.and + i32.shl + i32.add + i32.load i32.ne if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -11038,142 +11543,179 @@ end end local.get $4 - call $~lib/typedarray/Int16Array#subarray - call $~lib/typedarray/Uint16Array#reverse + call $~lib/typedarray/Uint32Array#subarray + call $~lib/typedarray/Int32Array#reverse local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load i32.const 8 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load offset=4 i32.const 7 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load offset=8 i32.const 6 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load offset=12 i32.const 5 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 228 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 229 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $3 + (local $5 i64) local.get $0 i32.load offset=4 local.set $4 local.get $0 i32.load offset=8 - i32.const 2 + local.get $0 + i32.load offset=4 + i32.sub + i32.const 3 i32.shr_u i32.const 1 i32.sub - local.set $2 + local.set $1 loop $repeat|0 - block $break|0 - local.get $1 + local.get $2 + local.get $1 + i32.lt_s + if local.get $2 - i32.ge_s - br_if $break|0 - local.get $1 - i32.const 2 + i32.const 3 i32.shl - local.get $3 - i32.add local.get $4 i32.add - i32.load offset=8 + local.tee $3 + i64.load local.set $5 - local.get $1 - i32.const 2 - i32.shl local.get $3 - i32.add - local.get $4 - i32.add - local.get $2 - i32.const 2 + local.get $1 + i32.const 3 i32.shl - local.get $3 - i32.add local.get $4 i32.add - i32.load offset=8 - i32.store offset=8 - local.get $2 - i32.const 2 - i32.shl + local.tee $3 + i64.load + i64.store local.get $3 - i32.add - local.get $4 - i32.add local.get $5 - i32.store offset=8 - local.get $1 + i64.store + local.get $2 i32.const 1 i32.add - local.set $1 - local.get $2 + local.set $2 + local.get $1 i32.const 1 i32.sub - local.set $2 + local.set $1 br $repeat|0 end end local.get $0 ) - (func $std/typedarray/testArrayReverse (; 229 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Int64Array#subarray (; 230 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 8 + local.get $0 + local.tee $2 + i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub + i32.const 3 + i32.shr_u + local.tee $1 + i32.const 8 + local.get $1 + i32.lt_s + select + local.tee $0 + i32.const 4 + local.get $1 + i32.const 4 + local.get $1 + i32.lt_s + select + local.tee $3 + local.get $0 + local.get $3 + i32.gt_s + select + local.set $4 + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 11 + call $~lib/runtime/doRegister + local.set $0 + local.get $2 + i32.load offset=4 + local.set $1 + local.get $0 + local.get $2 + i32.load + i32.store + local.get $0 + local.get $3 + i32.const 3 + i32.shl + local.get $1 + i32.add + i32.store offset=4 + local.get $0 + local.get $4 + i32.const 3 + i32.shl + local.get $1 + i32.add + i32.store offset=8 + local.get $0 + ) + (func $std/typedarray/testArrayReverse (; 231 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11181,60 +11723,45 @@ (local $4 i32) (local $5 i32) global.get $std/typedarray/testArrayReverseValues + local.set $1 + i32.const 9 + call $~lib/typedarray/Int64Array#constructor local.set $2 i32.const 9 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Int64Array#constructor local.set $3 - i32.const 9 - call $~lib/typedarray/Int32Array#constructor - local.set $4 loop $repeat|0 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 + block $break|0 local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 local.get $0 + i32.const 3 + i32.shl + local.tee $4 local.get $2 - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - call $~lib/internal/typedarray/TypedArray#__set - local.get $4 - local.get $0 + i32.load offset=4 + i32.add local.get $0 - local.get $2 - i32.load - local.tee $1 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - call $~lib/internal/typedarray/TypedArray#__set + i32.shl + local.tee $5 + local.get $1 + i32.load offset=4 + i32.add + i64.load32_s + i64.store + local.get $3 + i32.load offset=4 + local.get $4 + i32.add + local.get $1 + i32.load offset=4 + local.get $5 + i32.add + i64.load32_s + i64.store local.get $0 i32.const 1 i32.add @@ -11242,44 +11769,37 @@ br $repeat|0 end end - local.get $3 - call $~lib/typedarray/Int32Array#reverse + local.get $2 + call $~lib/typedarray/Int64Array#reverse drop i32.const 0 local.set $0 loop $repeat|1 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 + block $break|1 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|1 + local.get $2 + i32.load offset=4 local.get $0 - call $~lib/internal/typedarray/TypedArray#__get + i32.const 3 + i32.shl + i32.add + i64.load + local.get $1 + i32.load offset=4 i32.const 8 local.get $0 i32.sub - local.tee $1 - local.get $2 - i32.load - local.tee $5 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - i32.ne + i32.shl + i32.add + i64.load32_s + i64.ne if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -11294,137 +11814,123 @@ unreachable end end - local.get $4 - i32.const 4 - i32.const 8 - call $~lib/typedarray/Int32Array#subarray - call $~lib/typedarray/Int32Array#reverse + local.get $3 + call $~lib/typedarray/Int64Array#subarray + call $~lib/typedarray/Int64Array#reverse local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 8 - i32.ne + i32.load offset=4 + i64.load + i64.const 8 + i64.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 7 - i32.ne + i32.load offset=4 + i64.load offset=8 + i64.const 7 + i64.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 6 - i32.ne + i32.load offset=4 + i64.load offset=16 + i64.const 6 + i64.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end - local.get $0 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 5 - i32.ne + local.get $0 + i32.load offset=4 + i64.load offset=24 + i64.const 5 + i64.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int64Array#reverse (; 230 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 232 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) + i32.const 8 local.get $0 - i32.load - local.set $3 + local.tee $2 + i32.load offset=8 local.get $0 i32.load offset=4 + i32.sub + i32.const 3 + i32.shr_u + local.tee $1 + i32.const 8 + local.get $1 + i32.lt_s + select + local.tee $0 + i32.const 4 + local.get $1 + i32.const 4 + local.get $1 + i32.lt_s + select + local.tee $3 + local.get $0 + local.get $3 + i32.gt_s + select local.set $4 + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 12 + call $~lib/runtime/doRegister + local.set $0 + local.get $2 + i32.load offset=4 + local.set $1 local.get $0 - i32.load offset=8 + local.get $2 + i32.load + i32.store + local.get $0 + local.get $3 i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $2 - loop $repeat|0 - block $break|0 - local.get $1 - local.get $2 - i32.ge_s - br_if $break|0 - local.get $1 - i32.const 3 - i32.shl - local.get $3 - i32.add - local.get $4 - i32.add - i64.load offset=8 - local.set $5 - local.get $1 - i32.const 3 - i32.shl - local.get $3 - i32.add - local.get $4 - i32.add - local.get $2 - i32.const 3 - i32.shl - local.get $3 - i32.add - local.get $4 - i32.add - i64.load offset=8 - i64.store offset=8 - local.get $2 - i32.const 3 - i32.shl - local.get $3 - i32.add - local.get $4 - i32.add - local.get $5 - i64.store offset=8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $repeat|0 - end - end + i32.shl + local.get $1 + i32.add + i32.store offset=4 + local.get $0 + local.get $4 + i32.const 3 + i32.shl + local.get $1 + i32.add + i32.store offset=8 local.get $0 ) - (func $std/typedarray/testArrayReverse (; 231 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 233 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11432,63 +11938,45 @@ (local $4 i32) (local $5 i32) global.get $std/typedarray/testArrayReverseValues - local.set $3 + local.set $1 i32.const 9 - call $~lib/typedarray/Int64Array#constructor - local.set $4 + call $~lib/typedarray/Uint64Array#constructor + local.set $2 i32.const 9 - call $~lib/typedarray/Int64Array#constructor - local.set $5 + call $~lib/typedarray/Uint64Array#constructor + local.set $3 loop $repeat|0 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $4 + block $break|0 local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 + local.get $0 + i32.const 3 + i32.shl + local.tee $4 + local.get $2 + i32.load offset=4 + i32.add local.get $0 - local.tee $1 - local.get $3 - i32.load - local.tee $2 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $5 - local.get $1 + i32.shl + local.tee $5 local.get $1 + i32.load offset=4 + i32.add + i64.load32_s + i64.store local.get $3 - i32.load - local.tee $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + i32.load offset=4 + local.get $4 + i32.add + local.get $1 + i32.load offset=4 + local.get $5 + i32.add + i64.load32_s + i64.store local.get $0 i32.const 1 i32.add @@ -11496,45 +11984,37 @@ br $repeat|0 end end - local.get $4 + local.get $2 call $~lib/typedarray/Int64Array#reverse drop i32.const 0 local.set $0 loop $repeat|1 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $4 + block $break|1 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|1 + local.get $2 + i32.load offset=4 local.get $0 - call $~lib/internal/typedarray/TypedArray#__get + i32.const 3 + i32.shl + i32.add + i64.load + local.get $1 + i32.load offset=4 i32.const 8 local.get $0 i32.sub - local.tee $1 - local.get $3 - i32.load - local.tee $2 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end - i64.extend_i32_s + i32.shl + i32.add + i64.load32_s i64.ne if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -11549,201 +12029,224 @@ unreachable end end - local.get $5 - i32.const 4 - i32.const 8 - call $~lib/typedarray/Float64Array#subarray + local.get $3 + call $~lib/typedarray/Uint64Array#subarray call $~lib/typedarray/Int64Array#reverse local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load i64.const 8 i64.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load offset=8 i64.const 7 i64.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load offset=16 i64.const 6 i64.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load offset=24 i64.const 5 i64.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 232 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 234 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 f32) local.get $0 - i32.load - local.set $3 - local.get $0 i32.load offset=4 local.set $4 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 2 i32.shr_u i32.const 1 i32.sub - local.set $2 + local.set $1 loop $repeat|0 - block $break|0 - local.get $1 + local.get $2 + local.get $1 + i32.lt_s + if local.get $2 - i32.ge_s - br_if $break|0 - local.get $1 i32.const 2 i32.shl - local.get $3 - i32.add local.get $4 i32.add - f32.load offset=8 + local.tee $3 + f32.load local.set $5 - local.get $1 - i32.const 2 - i32.shl local.get $3 - i32.add - local.get $4 - i32.add - local.get $2 + local.get $1 i32.const 2 i32.shl - local.get $3 - i32.add local.get $4 i32.add - f32.load offset=8 - f32.store offset=8 - local.get $2 - i32.const 2 - i32.shl + local.tee $3 + f32.load + f32.store local.get $3 - i32.add - local.get $4 - i32.add local.get $5 - f32.store offset=8 - local.get $1 + f32.store + local.get $2 i32.const 1 i32.add - local.set $1 - local.get $2 + local.set $2 + local.get $1 i32.const 1 i32.sub - local.set $2 + local.set $1 br $repeat|0 end end local.get $0 ) - (func $std/typedarray/testArrayReverse (; 233 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Float32Array#subarray (; 235 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 8 + local.get $0 + local.tee $2 + i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub + i32.const 2 + i32.shr_u + local.tee $1 + i32.const 8 + local.get $1 + i32.lt_s + select + local.tee $0 + i32.const 4 + local.get $1 + i32.const 4 + local.get $1 + i32.lt_s + select + local.tee $3 + local.get $0 + local.get $3 + i32.gt_s + select + local.set $4 + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 13 + call $~lib/runtime/doRegister + local.set $0 + local.get $2 + i32.load offset=4 + local.set $1 + local.get $0 + local.get $2 + i32.load + i32.store + local.get $0 + local.get $3 + i32.const 2 + i32.shl + local.get $1 + i32.add + i32.store offset=4 + local.get $0 + local.get $4 + i32.const 2 + i32.shl + local.get $1 + i32.add + i32.store offset=8 + local.get $0 + ) + (func $std/typedarray/testArrayReverse (; 236 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $std/typedarray/testArrayReverseValues - local.set $3 + local.set $1 i32.const 9 - call $~lib/typedarray/Int32Array#constructor - local.set $4 + call $~lib/typedarray/Float32Array#constructor + local.set $2 i32.const 9 - call $~lib/typedarray/Int32Array#constructor - local.set $5 + call $~lib/typedarray/Float32Array#constructor + local.set $4 loop $repeat|0 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $4 + block $break|0 local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 local.get $0 - local.tee $1 + i32.const 2 + i32.shl + local.tee $3 + local.get $2 + i32.load offset=4 + i32.add + local.get $1 + i32.load offset=4 local.get $3 + i32.add i32.load - local.tee $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $5 - local.get $1 + f32.store + local.get $4 + i32.load offset=4 + local.get $3 + i32.add local.get $1 + i32.load offset=4 local.get $3 + i32.add i32.load - local.tee $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + f32.store local.get $0 i32.const 1 i32.add @@ -11751,45 +12254,38 @@ br $repeat|0 end end - local.get $4 + local.get $2 call $~lib/typedarray/Float32Array#reverse drop i32.const 0 local.set $0 loop $repeat|1 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $4 + block $break|1 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|1 + local.get $2 + i32.load offset=4 local.get $0 - call $~lib/internal/typedarray/TypedArray#__get + i32.const 2 + i32.shl + i32.add + f32.load + local.get $1 + i32.load offset=4 i32.const 8 local.get $0 i32.sub - local.tee $1 - local.get $3 - i32.load - local.tee $2 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end + i32.shl + i32.add + i32.load f32.convert_i32_s f32.ne if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -11804,137 +12300,120 @@ unreachable end end - local.get $5 - i32.const 4 - i32.const 8 - call $~lib/typedarray/Int32Array#subarray + local.get $4 + call $~lib/typedarray/Float32Array#subarray call $~lib/typedarray/Float32Array#reverse local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f32.load f32.const 8 f32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f32.load offset=4 f32.const 7 f32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f32.load offset=8 f32.const 6 f32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f32.load offset=12 f32.const 5 f32.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 234 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 237 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) local.get $0 - i32.load - local.set $3 - local.get $0 i32.load offset=4 local.set $4 local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 3 i32.shr_u i32.const 1 i32.sub - local.set $2 + local.set $1 loop $repeat|0 - block $break|0 - local.get $1 + local.get $2 + local.get $1 + i32.lt_s + if local.get $2 - i32.ge_s - br_if $break|0 - local.get $1 i32.const 3 i32.shl - local.get $3 - i32.add local.get $4 i32.add - f64.load offset=8 + local.tee $3 + f64.load local.set $5 - local.get $1 - i32.const 3 - i32.shl local.get $3 - i32.add - local.get $4 - i32.add - local.get $2 + local.get $1 i32.const 3 i32.shl - local.get $3 - i32.add local.get $4 i32.add - f64.load offset=8 - f64.store offset=8 - local.get $2 - i32.const 3 - i32.shl + local.tee $3 + f64.load + f64.store local.get $3 - i32.add - local.get $4 - i32.add local.get $5 - f64.store offset=8 - local.get $1 + f64.store + local.get $2 i32.const 1 i32.add - local.set $1 - local.get $2 + local.set $2 + local.get $1 i32.const 1 i32.sub - local.set $2 + local.set $1 br $repeat|0 end end local.get $0 ) - (func $std/typedarray/testArrayReverse (; 235 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 238 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11942,63 +12421,47 @@ (local $4 i32) (local $5 i32) global.get $std/typedarray/testArrayReverseValues - local.set $3 + local.set $1 i32.const 9 - call $~lib/typedarray/Int64Array#constructor - local.set $4 + call $~lib/typedarray/Float64Array#constructor + local.set $2 i32.const 9 - call $~lib/typedarray/Int64Array#constructor - local.set $5 + call $~lib/typedarray/Float64Array#constructor + local.set $3 loop $repeat|0 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $4 + block $break|0 local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 local.get $0 - local.tee $1 - local.get $3 - i32.load - local.tee $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end - f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $5 - local.get $1 + i32.const 3 + i32.shl + local.tee $4 + local.get $2 + i32.load offset=4 + i32.add + local.get $0 + i32.const 2 + i32.shl + local.tee $5 local.get $1 - local.get $3 + i32.load offset=4 + i32.add i32.load - local.tee $2 + f64.convert_i32_s + f64.store + local.get $3 + i32.load offset=4 + local.get $4 + i32.add + local.get $1 + i32.load offset=4 + local.get $5 + i32.add i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + f64.store local.get $0 i32.const 1 i32.add @@ -12006,45 +12469,38 @@ br $repeat|0 end end - local.get $4 + local.get $2 call $~lib/typedarray/Float64Array#reverse drop i32.const 0 local.set $0 loop $repeat|1 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $4 + block $break|1 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|1 + local.get $2 + i32.load offset=4 local.get $0 - call $~lib/internal/typedarray/TypedArray#__get + i32.const 3 + i32.shl + i32.add + f64.load + local.get $1 + i32.load offset=4 i32.const 8 local.get $0 i32.sub - local.tee $1 - local.get $3 - i32.load - local.tee $2 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end + i32.shl + i32.add + i32.load f64.convert_i32_s f64.ne if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -12059,68 +12515,68 @@ unreachable end end - local.get $5 + local.get $3 i32.const 4 i32.const 8 call $~lib/typedarray/Float64Array#subarray call $~lib/typedarray/Float64Array#reverse local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load f64.const 8 f64.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load offset=8 f64.const 7 f64.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load offset=16 f64.const 6 f64.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load offset=24 f64.const 5 f64.ne if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start:std/typedarray (; 236 ;) (type $FUNCSIG$v) + (func $start:std/typedarray (; 239 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - i32.const 1224 + i32.const 1104 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -12132,87 +12588,99 @@ call $~lib/typedarray/Int32Array#constructor global.set $std/typedarray/arr global.get $std/typedarray/arr - i32.const 0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/arr + local.tee $0 + i32.load offset=4 i32.const 1 + i32.store + local.get $0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/arr - i32.const 2 + i32.store offset=4 + local.get $0 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/arr + i32.store offset=8 + local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 2 i32.shr_u i32.const 3 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 96 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr + local.tee $0 i32.load offset=4 + local.get $0 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 16 i32.const 97 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr + local.tee $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 12 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 98 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 99 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load offset=4 i32.const 2 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 100 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load offset=8 i32.const 3 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 101 i32.const 0 call $~lib/env/abort @@ -12224,129 +12692,154 @@ call $~lib/typedarray/Int32Array#subarray global.set $std/typedarray/arr global.get $std/typedarray/arr + local.tee $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 2 i32.shr_u i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 104 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr + local.tee $0 i32.load offset=4 + local.get $0 + i32.load + i32.sub i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 105 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr + local.tee $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 106 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load i32.const 2 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 107 i32.const 0 call $~lib/env/abort unreachable end i32.const 8 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor global.set $std/typedarray/af64 global.get $std/typedarray/af64 - i32.const 0 + local.tee $0 + i32.load offset=4 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/af64 - i32.const 1 + f64.store + local.get $0 + i32.load offset=4 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/af64 - i32.const 2 + f64.store offset=8 + local.get $0 + i32.load offset=4 f64.const 7 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/af64 - i32.const 3 + f64.store offset=16 + local.get $0 + i32.load offset=4 f64.const 6 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/af64 - i32.const 4 + f64.store offset=24 + local.get $0 + i32.load offset=4 f64.const 5 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/af64 - i32.const 5 + f64.store offset=32 + local.get $0 + i32.load offset=4 f64.const 4 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/af64 - i32.const 6 + f64.store offset=40 + local.get $0 + i32.load offset=4 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/af64 - i32.const 7 + f64.store offset=48 + local.get $0 + i32.load offset=4 f64.const 8 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/af64 + f64.store offset=56 + local.get $0 i32.const 2 i32.const 6 call $~lib/typedarray/Float64Array#subarray global.set $std/typedarray/af64 global.get $std/typedarray/af64 + local.tee $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 3 i32.shr_u i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 121 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/af64 + local.tee $0 i32.load offset=4 + local.get $0 + i32.load + i32.sub i32.const 16 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 122 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/af64 + local.tee $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 32 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 123 i32.const 0 call $~lib/env/abort @@ -12356,6 +12849,8 @@ global.set $~lib/argc global.get $std/typedarray/af64 local.set $1 + i32.const 0 + local.set $0 block $1of1 block $0of1 block $outOfRange @@ -12373,15 +12868,15 @@ block (result i32) block (result i32) global.get $std/typedarray/af64 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load f64.const 4 f64.eq local.tee $0 if global.get $std/typedarray/af64 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load offset=8 f64.const 5 f64.eq local.set $0 @@ -12390,27 +12885,27 @@ end if global.get $std/typedarray/af64 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load offset=16 f64.const 6 f64.eq local.set $0 end local.get $0 end - if (result i32) + if global.get $std/typedarray/af64 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load offset=24 f64.const 7 f64.eq - else - local.get $0 + local.set $0 end + local.get $0 i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 125 i32.const 0 call $~lib/env/abort @@ -12420,114 +12915,114 @@ call $~lib/typedarray/Uint8ClampedArray#constructor global.set $std/typedarray/clampedArr global.get $std/typedarray/clampedArr + local.tee $0 + i32.load offset=4 i32.const 0 - i32.const -32 - call $~lib/typedarray/Uint8ClampedArray#__set - global.get $std/typedarray/clampedArr - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - global.get $std/typedarray/clampedArr + i32.store8 + local.get $0 + i32.load offset=4 i32.const 2 - i32.const 256 - call $~lib/typedarray/Uint8ClampedArray#__set - global.get $std/typedarray/clampedArr - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.store8 offset=1 + local.get $0 + i32.load offset=4 + i32.const -1 + i32.store8 offset=2 + local.get $0 + i32.load offset=4 + i32.load8_u if i32.const 0 - i32.const 8 + i32.const 16 i32.const 132 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/clampedArr - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u offset=1 i32.const 2 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 133 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/clampedArr - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u offset=2 i32.const 255 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 134 i32.const 0 call $~lib/env/abort unreachable end - i32.const 0 i32.const 5 call $~lib/typedarray/Int8Array#constructor global.set $std/typedarray/arr8 global.get $std/typedarray/arr8 - i32.const 0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/arr8 - i32.const 1 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/arr8 + local.tee $0 + i32.load offset=4 + i32.const 1 + i32.store8 + local.get $0 + i32.load offset=4 i32.const 2 + i32.store8 offset=1 + local.get $0 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/arr8 - i32.const 3 - i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/arr8 + i32.store8 offset=2 + local.get $0 + i32.load offset=4 i32.const 4 + i32.store8 offset=3 + local.get $0 + i32.load offset=4 i32.const 5 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/arr8 + i32.store8 offset=4 + local.get $0 i32.const 1 i32.const 1 i32.const 3 call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 - i32.const 192 + i32.const 152 + i32.const 15 + i32.const 0 + call $~lib/runtime/doWrapArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 144 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/typedarray/arr8 i32.const 0 i32.const 0 - call $~lib/typedarray/Int8Array#fill|trampoline + i32.const 2147483647 + call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 - i32.const 216 + i32.const 168 + i32.const 15 + i32.const 0 + call $~lib/runtime/doWrapArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 147 i32.const 0 call $~lib/env/abort @@ -12539,30 +13034,35 @@ i32.const -3 call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 - i32.const 240 + i32.const 184 + i32.const 15 + i32.const 0 + call $~lib/runtime/doWrapArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 150 i32.const 0 call $~lib/env/abort unreachable end - i32.const 2 - global.set $~lib/argc global.get $std/typedarray/arr8 i32.const 2 i32.const -2 - call $~lib/typedarray/Int8Array#fill|trampoline + i32.const 2147483647 + call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 - i32.const 264 + i32.const 200 + i32.const 15 + i32.const 0 + call $~lib/runtime/doWrapArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 153 i32.const 0 call $~lib/env/abort @@ -12574,12 +13074,15 @@ i32.const 0 call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 - i32.const 288 + i32.const 216 + i32.const 15 + i32.const 0 + call $~lib/runtime/doWrapArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 156 i32.const 0 call $~lib/env/abort @@ -12590,67 +13093,84 @@ i32.const 4 call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/sub8 - i32.const 1 - global.set $~lib/argc global.get $std/typedarray/sub8 i32.const 0 i32.const 0 - call $~lib/typedarray/Int8Array#fill|trampoline + i32.const 2147483647 + call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/sub8 + local.tee $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 3 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 160 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/sub8 + local.tee $0 i32.load offset=4 + local.get $0 + i32.load + i32.sub i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 161 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/sub8 + local.tee $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 3 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 162 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/sub8 - i32.const 312 + i32.const 232 + i32.const 15 + i32.const 0 + call $~lib/runtime/doWrapArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 163 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr8 - i32.const 336 + i32.const 248 + i32.const 15 + i32.const 0 + call $~lib/runtime/doWrapArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 164 i32.const 0 call $~lib/env/abort @@ -12660,55 +13180,61 @@ call $~lib/typedarray/Int32Array#constructor global.set $std/typedarray/arr32 global.get $std/typedarray/arr32 - i32.const 0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/arr32 + local.tee $0 + i32.load offset=4 i32.const 1 + i32.store + local.get $0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/arr32 - i32.const 2 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/arr32 + i32.store offset=4 + local.get $0 + i32.load offset=4 i32.const 3 + i32.store offset=8 + local.get $0 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/arr32 - i32.const 4 + i32.store offset=12 + local.get $0 + i32.load offset=4 i32.const 5 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/arr32 + i32.store offset=16 + local.get $0 i32.const 1 i32.const 1 i32.const 3 call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 - i32.const 376 + i32.const 264 + i32.const 16 + i32.const 2 + call $~lib/runtime/doWrapArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 174 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/typedarray/arr32 i32.const 0 i32.const 0 - call $~lib/typedarray/Int32Array#fill|trampoline + i32.const 2147483647 + call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 - i32.const 416 + i32.const 296 + i32.const 16 + i32.const 2 + call $~lib/runtime/doWrapArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 177 i32.const 0 call $~lib/env/abort @@ -12720,30 +13246,35 @@ i32.const -3 call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 - i32.const 456 + i32.const 328 + i32.const 16 + i32.const 2 + call $~lib/runtime/doWrapArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 180 i32.const 0 call $~lib/env/abort unreachable end - i32.const 2 - global.set $~lib/argc global.get $std/typedarray/arr32 i32.const 2 i32.const -2 - call $~lib/typedarray/Int32Array#fill|trampoline + i32.const 2147483647 + call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 - i32.const 496 + i32.const 360 + i32.const 16 + i32.const 2 + call $~lib/runtime/doWrapArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 183 i32.const 0 call $~lib/env/abort @@ -12755,12 +13286,15 @@ i32.const 0 call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 - i32.const 536 + i32.const 392 + i32.const 16 + i32.const 2 + call $~lib/runtime/doWrapArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 186 i32.const 0 call $~lib/env/abort @@ -12771,156 +13305,183 @@ i32.const 4 call $~lib/typedarray/Int32Array#subarray global.set $std/typedarray/sub32 - i32.const 1 - global.set $~lib/argc global.get $std/typedarray/sub32 i32.const 0 i32.const 0 - call $~lib/typedarray/Int32Array#fill|trampoline + i32.const 2147483647 + call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/sub32 + local.tee $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 2 i32.shr_u i32.const 3 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 190 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/sub32 + local.tee $0 i32.load offset=4 + local.get $0 + i32.load + i32.sub i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 191 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/sub32 + local.tee $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 12 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 192 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/sub32 - i32.const 576 + i32.const 424 + i32.const 16 + i32.const 2 + call $~lib/runtime/doWrapArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 193 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr32 - i32.const 616 + i32.const 448 + i32.const 16 + i32.const 2 + call $~lib/runtime/doWrapArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 194 i32.const 0 call $~lib/env/abort unreachable end i32.const 134217727 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor drop - i32.const 0 i32.const 6 call $~lib/typedarray/Int8Array#constructor global.set $std/typedarray/multisubarr global.get $std/typedarray/multisubarr - i32.const 0 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/multisubarr + local.tee $0 + i32.load offset=4 i32.const 1 + i32.store8 + local.get $0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/multisubarr - i32.const 2 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/multisubarr + i32.store8 offset=1 + local.get $0 + i32.load offset=4 i32.const 3 + i32.store8 offset=2 + local.get $0 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/multisubarr - i32.const 4 - i32.const 5 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/multisubarr + i32.store8 offset=3 + local.get $0 + i32.load offset=4 i32.const 5 + i32.store8 offset=4 + local.get $0 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/typedarray/multisubarr + i32.store8 offset=5 + local.get $0 i32.const 1 i32.const 6 call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/multisubarr1 global.get $std/typedarray/multisubarr1 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_s i32.const 2 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 211 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/multisubarr1 + local.tee $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 5 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 212 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/multisubarr1 + local.tee $0 i32.load offset=4 + local.get $0 + i32.load + i32.sub i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 213 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/multisubarr1 + local.tee $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 5 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 214 i32.const 0 call $~lib/env/abort @@ -12932,51 +13493,61 @@ call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/multisubarr2 global.get $std/typedarray/multisubarr2 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_s i32.const 3 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 217 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/multisubarr2 + local.tee $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 218 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/multisubarr2 + local.tee $0 i32.load offset=4 + local.get $0 + i32.load + i32.sub i32.const 2 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 219 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/multisubarr2 + local.tee $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 220 i32.const 0 call $~lib/env/abort @@ -12988,51 +13559,61 @@ call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/multisubarr3 global.get $std/typedarray/multisubarr3 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_s i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 223 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/multisubarr3 + local.tee $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 3 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 224 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/multisubarr3 + local.tee $0 i32.load offset=4 + local.get $0 + i32.load + i32.sub i32.const 3 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 225 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/multisubarr3 + local.tee $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub i32.const 3 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 226 i32.const 0 call $~lib/env/abort @@ -13121,16 +13702,16 @@ call $std/typedarray/testArrayReverse call $std/typedarray/testArrayReverse call $std/typedarray/testArrayReverse - call $std/typedarray/testArrayReverse - call $std/typedarray/testArrayReverse + call $std/typedarray/testArrayReverse call $std/typedarray/testArrayReverse + call $std/typedarray/testArrayReverse call $std/typedarray/testArrayReverse call $std/typedarray/testArrayReverse ) - (func $start (; 237 ;) (type $FUNCSIG$v) + (func $start (; 240 ;) (type $FUNCSIG$v) call $start:std/typedarray ) - (func $null (; 238 ;) (type $FUNCSIG$v) + (func $null (; 241 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/typedarray.ts b/tests/compiler/std/typedarray.ts index 743198c183..a283106c5d 100644 --- a/tests/compiler/std/typedarray.ts +++ b/tests/compiler/std/typedarray.ts @@ -193,9 +193,9 @@ assert(sub32.byteLength == 3 * sizeof()); assert(isInt32ArrayEqual(sub32, [0, 0, 0])); assert(isInt32ArrayEqual(arr32, [1, 0, 0, 0, 2])); -import { MAX_BLENGTH } from "internal/arraybuffer"; +import { MAX_BYTELENGTH } from "runtime"; -const MAX_F64LENGTH = MAX_BLENGTH >> alignof(); +const MAX_F64LENGTH = MAX_BYTELENGTH >> alignof(); new Float64Array(MAX_F64LENGTH); // 1GB // new Float64Array(MAX_F64 + 1); // throws diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 3f59da868f..78d0fc158d 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -1,27 +1,21 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$v (func)) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$viid (func (param i32 i32 f64))) (type $FUNCSIG$idd (func (param f64 f64) (result i32))) - (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$viij (func (param i32 i32 i64))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$jjjii (func (param i64 i64 i32 i32) (result i64))) (type $FUNCSIG$jiij (func (param i32 i32 i64) (result i64))) - (type $FUNCSIG$viif (func (param i32 i32 f32))) (type $FUNCSIG$fffii (func (param f32 f32 i32 i32) (result f32))) (type $FUNCSIG$fiif (func (param i32 i32 f32) (result f32))) (type $FUNCSIG$dddii (func (param f64 f64 i32 i32) (result f64))) (type $FUNCSIG$diid (func (param i32 i32 f64) (result f64))) (type $FUNCSIG$jjii (func (param i64 i32 i32) (result i64))) - (type $FUNCSIG$jii (func (param i32 i32) (result i64))) (type $FUNCSIG$ffii (func (param f32 i32 i32) (result f32))) - (type $FUNCSIG$fii (func (param i32 i32) (result f32))) (type $FUNCSIG$ddii (func (param f64 i32 i32) (result f64))) (type $FUNCSIG$ijii (func (param i64 i32 i32) (result i32))) (type $FUNCSIG$ifii (func (param f32 i32 i32) (result i32))) @@ -34,51 +28,37 @@ (type $FUNCSIG$vdii (func (param f64 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\11\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 48) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 112) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 176) "\05\00\00\00\00\00\00\00\01\01\01\04\05\00\00\00") - (data (i32.const 192) "\b0\00\00\00\05\00\00\00") - (data (i32.const 200) "\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 216) "\c8\00\00\00\05\00\00\00") - (data (i32.const 224) "\05\00\00\00\00\00\00\00\01\01\00\00\00\00\00\00") - (data (i32.const 240) "\e0\00\00\00\05\00\00\00") - (data (i32.const 248) "\05\00\00\00\00\00\00\00\01\01\00\02\02\00\00\00") - (data (i32.const 264) "\f8\00\00\00\05\00\00\00") - (data (i32.const 272) "\05\00\00\00\00\00\00\00\01\01\00\02\02\00\00\00") - (data (i32.const 288) "\10\01\00\00\05\00\00\00") - (data (i32.const 296) "\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 312) "(\01\00\00\03\00\00\00") - (data (i32.const 320) "\05\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 336) "@\01\00\00\05\00\00\00") - (data (i32.const 344) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 376) "X\01\00\00\05\00\00\00") - (data (i32.const 384) "\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 416) "\80\01\00\00\05\00\00\00") - (data (i32.const 424) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 456) "\a8\01\00\00\05\00\00\00") - (data (i32.const 464) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 496) "\d0\01\00\00\05\00\00\00") - (data (i32.const 504) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 536) "\f8\01\00\00\05\00\00\00") - (data (i32.const 544) "\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 576) " \02\00\00\03\00\00\00") - (data (i32.const 584) "\14\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 616) "H\02\00\00\05\00\00\00") - (data (i32.const 624) "\0f\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 664) "\14\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 712) "\0c\00\00\00\00\00\00\00\n\00\00\00\0c\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 744) "\c8\02\00\00\03\00\00\00") - (data (i32.const 752) "\16\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 800) "\16\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 848) "\1f\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 920) "\1b\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 984) "$\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1048) "\d8\03\00\00\t\00\00\00") - (data (i32.const 1056) "!\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 1128) "+\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 8) "\01\00\00\00\"\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 56) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 96) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 144) "\02\00\00\00\05\00\00\00\01\01\01\04\05") + (data (i32.const 160) "\02\00\00\00\05\00\00\00\00\00\00\00\00") + (data (i32.const 176) "\02\00\00\00\05\00\00\00\01\01\00\00\00") + (data (i32.const 192) "\02\00\00\00\05\00\00\00\01\01\00\02\02") + (data (i32.const 208) "\02\00\00\00\05\00\00\00\01\01\00\02\02") + (data (i32.const 224) "\02\00\00\00\03\00\00\00\00\00\00") + (data (i32.const 240) "\02\00\00\00\05\00\00\00\01\00\00\00\02") + (data (i32.const 256) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 288) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 320) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 352) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") + (data (i32.const 384) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") + (data (i32.const 416) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 440) "\02\00\00\00\14\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00") + (data (i32.const 472) "\01\00\00\00\1e\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 512) "\01\00\00\00(\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 560) "\02\00\00\00\0c\00\00\00\n\00\00\00\0c\00\00\00\0e\00\00\00") + (data (i32.const 584) "\10\00\00\00\10\00\00\008\02\00\008\02\00\00D\02\00\00\03\00\00\00") + (data (i32.const 608) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 664) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 720) "\01\00\00\00>\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 792) "\01\00\00\006\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 856) "\02\00\00\00$\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00") + (data (i32.const 904) "\10\00\00\00\10\00\00\00`\03\00\00`\03\00\00\84\03\00\00\t\00\00\00") + (data (i32.const 928) "\01\00\00\00B\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1008) "\01\00\00\00V\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (table $0 112 funcref) - (elem (i32.const 0) $null $~lib/internal/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0) + (elem (i32.const 0) $null $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0) (global $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32 (i32.const 1)) (global $~lib/typedarray/Uint8Array.BYTES_PER_ELEMENT i32 (i32.const 1)) (global $~lib/typedarray/Uint8ClampedArray.BYTES_PER_ELEMENT i32 (i32.const 1)) @@ -90,8 +70,13 @@ (global $~lib/typedarray/Uint64Array.BYTES_PER_ELEMENT i32 (i32.const 8)) (global $~lib/typedarray/Float32Array.BYTES_PER_ELEMENT i32 (i32.const 4)) (global $~lib/typedarray/Float64Array.BYTES_PER_ELEMENT i32 (i32.const 8)) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/typedarray/arr (mut i32) (i32.const 0)) (global $std/typedarray/af64 (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) @@ -108,29 +93,17 @@ (global $std/typedarray/multisubarr3 (mut i32) (i32.const 0)) (global $std/typedarray/forEachCallCount (mut i32) (i32.const 0)) (global $std/typedarray/forEachSelf (mut i32) (i32.const 0)) - (global $std/typedarray/forEachValues (mut i32) (i32.const 744)) - (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 1048)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 1220)) + (global $std/typedarray/forEachValues (mut i32) (i32.const 592)) + (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 912)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 1104)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $~lib/internal/arraybuffer/computeSize (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/adjustToBlock (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - i32.const 8 + global.get $~lib/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -138,593 +111,483 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 + return ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 112 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end + call $~lib/runtime/adjustToBlock + call $~lib/memory/memory.allocate local.set $1 local.get $1 - local.get $0 + global.get $~lib/runtime/HEADER_MAGIC i32.store local.get $1 - ) - (func $~lib/internal/memory/memset (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i64) - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u + i32.store offset=4 local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 + global.get $~lib/runtime/HEADER_SIZE i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - end - br $continue|0 - end - end - end - ) - (func $~lib/memory/memory.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/arena/__memory_allocate - return ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $1 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 0 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.0 - local.get $3 - i32.const 8 - i32.add + (local $7 i32) + (local $8 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $0 + local.set $3 + local.get $1 local.set $4 - i32.const 0 - local.set $5 local.get $2 - local.set $6 - local.get $4 + local.set $5 local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 i32.eqz if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + br $~lib/util/memory/memset|inlined.0 end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - end - local.get $3 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $2 - i32.store offset=8 - local.get $0 - ) - (func $~lib/typedarray/Int8Array#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor - local.set $0 - local.get $0 - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 0 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.1 local.get $3 - i32.const 8 + local.get $4 + i32.store8 + local.get $3 + local.get $5 i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 + i32.const 1 + i32.sub local.get $4 + i32.store8 local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 - i32.eqz + i32.const 2 + i32.le_u if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 1 + i32.add + local.get $4 + i32.store8 + local.get $3 + i32.const 2 + i32.add + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 2 + i32.sub + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 3 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 3 + i32.add + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 i32.const 0 - i32.store offset=8 - local.get $0 + local.get $3 + i32.sub + i32.const 3 + i32.and + local.set $6 + local.get $3 + local.get $6 + i32.add + local.set $3 + local.get $5 + local.get $6 + i32.sub + local.set $5 + local.get $5 + i32.const -4 + i32.and + local.set $5 + i32.const -1 + i32.const 255 + i32.div_u + local.get $4 + i32.const 255 + i32.and + i32.mul + local.set $7 + local.get $3 + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 4 + i32.sub + local.get $7 + i32.store + local.get $5 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 4 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 8 + i32.add + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 12 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 8 + i32.sub + local.get $7 + i32.store + local.get $5 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 12 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 16 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 20 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 24 + i32.add + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 28 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 24 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 20 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 16 + i32.sub + local.get $7 + i32.store + i32.const 24 + local.get $3 + i32.const 4 + i32.and + i32.add + local.set $6 + local.get $3 + local.get $6 + i32.add + local.set $3 + local.get $5 + local.get $6 + i32.sub + local.set $5 + local.get $7 + i64.extend_i32_u + local.get $7 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $8 + block $break|0 + loop $continue|0 + local.get $5 + i32.const 32 + i32.ge_u + if + block + local.get $3 + local.get $8 + i64.store + local.get $3 + i32.const 8 + i32.add + local.get $8 + i64.store + local.get $3 + i32.const 16 + i32.add + local.get $8 + i64.store + local.get $3 + i32.const 24 + i32.add + local.get $8 + i64.store + local.get $5 + i32.const 32 + i32.sub + local.set $5 + local.get $3 + i32.const 32 + i32.add + local.set $3 + end + br $continue|0 + end + end + end end - local.get $3 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $2 - i32.store offset=8 - local.get $0 ) - (func $~lib/typedarray/Uint8Array#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u i32.eqz if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + i32.const 0 + i32.const 64 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable end local.get $0 - local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor - local.set $0 - local.get $0 - ) - (func $~lib/typedarray/Uint8ClampedArray#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq i32.eqz if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + i32.const 0 + i32.const 64 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable end + ) + (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub local.get $1 - call $~lib/typedarray/Uint8Array#constructor - local.set $0 + i32.store local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $1 - i32.const 536870908 + global.get $~lib/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 + i32.const 104 + i32.const 24 + i32.const 43 call $~lib/env/abort unreachable end - local.get $1 - i32.const 1 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $3 - block $~lib/memory/memory.fill|inlined.2 + local.get $3 + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + block $~lib/runtime/REGISTER|inlined.0 (result i32) local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 + local.set $2 local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset + i32.const 2 + call $~lib/runtime/doRegister + end + ) + (func $~lib/runtime/ALLOCATE (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/doAllocate + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 64 + i32.const 223 + i32.const 57 + call $~lib/env/abort + unreachable end + i32.const 0 + local.get $1 + local.get $2 + i32.shl + local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $3 block (result i32) local.get $0 i32.eqz if - i32.const 12 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $4 + local.get $4 + i32.const 3 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -741,677 +604,417 @@ local.get $3 i32.store local.get $0 - i32.const 0 + local.get $3 i32.store offset=4 local.get $0 - local.get $2 + local.get $3 + local.get $1 + i32.add i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Int16Array#constructor (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 4 + call $~lib/runtime/doRegister + end local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 0 + call $~lib/runtime/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + ) + (func $~lib/runtime/ArrayBufferView#get:byteLength (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + local.get $0 + i32.load offset=4 + i32.sub + ) + (func $~lib/typedarray/Int8Array#get:length (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/ArrayBufferView#get:byteLength + ) + (func $~lib/typedarray/Uint8Array#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 536870908 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 1 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.3 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 + local.get $0 + if (result i32) local.get $0 + else + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 5 + call $~lib/runtime/doRegister end - local.get $3 - i32.store - local.get $0 + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 local.get $0 - local.get $2 - i32.store offset=8 + ) + (func $~lib/typedarray/Uint8Array#get:length (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + call $~lib/runtime/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Uint16Array#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#constructor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 i32.eqz if - i32.const 12 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 6 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + call $~lib/typedarray/Uint8Array#constructor local.set $0 local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.4 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 + local.get $0 + if (result i32) local.get $0 + else + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 7 + call $~lib/runtime/doRegister end - local.get $3 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 + local.get $1 + i32.const 1 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 local.get $0 - local.get $2 - i32.store offset=8 + ) + (func $~lib/typedarray/Int16Array#get:length (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + call $~lib/runtime/ArrayBufferView#get:byteLength + i32.const 1 + i32.shr_u ) - (func $~lib/typedarray/Int32Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 8 + call $~lib/runtime/doRegister end - local.get $0 local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 1 + call $~lib/runtime/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#get:length (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/ArrayBufferView#get:byteLength + i32.const 1 + i32.shr_u + ) + (func $~lib/typedarray/Int32Array#constructor (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable + local.get $0 + if (result i32) + local.get $0 + else + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 9 + call $~lib/runtime/doRegister end local.get $1 i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.5 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - end - local.get $3 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 local.get $0 - local.get $2 - i32.store offset=8 + ) + (func $~lib/typedarray/Int32Array#get:length (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + call $~lib/runtime/ArrayBufferView#get:byteLength + i32.const 2 + i32.shr_u ) - (func $~lib/typedarray/Uint32Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#constructor (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 10 + call $~lib/runtime/doRegister end - local.get $0 local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#get:length (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/ArrayBufferView#get:byteLength + i32.const 2 + i32.shr_u + ) + (func $~lib/typedarray/Int64Array#constructor (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 134217727 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable + local.get $0 + if (result i32) + local.get $0 + else + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 11 + call $~lib/runtime/doRegister end local.get $1 i32.const 3 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.6 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - end - local.get $3 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 local.get $0 - local.get $2 - i32.store offset=8 + ) + (func $~lib/typedarray/Int64Array#get:length (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + call $~lib/runtime/ArrayBufferView#get:byteLength + i32.const 3 + i32.shr_u ) - (func $~lib/typedarray/Int64Array#constructor (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#constructor (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 12 + call $~lib/runtime/doRegister end - local.get $0 local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 3 + call $~lib/runtime/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 134217727 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 + (func $~lib/typedarray/Uint64Array#get:length (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.7 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 + i32.shr_u + ) + (func $~lib/typedarray/Float32Array#constructor (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + if (result i32) local.get $0 + else + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 13 + call $~lib/runtime/doRegister end - local.get $3 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 + local.get $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 local.get $0 - local.get $2 - i32.store offset=8 + ) + (func $~lib/typedarray/Float32Array#get:length (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + call $~lib/runtime/ArrayBufferView#get:byteLength + i32.const 2 + i32.shr_u ) - (func $~lib/typedarray/Uint64Array#constructor (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#constructor (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 14 + call $~lib/runtime/doRegister end - local.get $0 local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 3 + call $~lib/runtime/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#get:length (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/ArrayBufferView#get:byteLength + i32.const 3 + i32.shr_u + ) + (func $std/typedarray/testInstantiate (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + i32.const 0 + local.get $0 + call $~lib/typedarray/Int8Array#constructor + local.set $1 local.get $1 - i32.const 268435454 - i32.gt_u + call $~lib/runtime/ArrayBufferView#get:byteOffset + i32.const 0 + i32.eq + i32.eqz if i32.const 0 - i32.const 48 - i32.const 23 + i32.const 16 i32.const 34 + i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.8 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - end - local.get $3 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $2 - i32.store offset=8 - local.get $0 - ) - (func $~lib/typedarray/Float32Array#constructor (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + call $~lib/runtime/ArrayBufferView#get:byteLength local.get $0 + global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT + i32.mul + i32.eq i32.eqz if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + i32.const 0 + i32.const 16 + i32.const 35 + i32.const 2 + call $~lib/env/abort + unreachable end - local.get $0 local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor - local.set $0 + call $~lib/typedarray/Int8Array#get:length local.get $0 - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 134217727 - i32.gt_u + i32.eq + i32.eqz if i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 + i32.const 16 + i32.const 36 + i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - i32.const 3 - i32.shl + i32.const 0 + local.get $0 + call $~lib/typedarray/Uint8Array#constructor local.set $2 local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.9 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - end - local.get $3 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $2 - i32.store offset=8 - local.get $0 - ) - (func $~lib/typedarray/Float64Array#constructor (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor - local.set $0 - local.get $0 - ) - (func $std/typedarray/testInstantiate (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - i32.const 0 - local.get $0 - call $~lib/typedarray/Int8Array#constructor - local.set $1 - local.get $1 - i32.load offset=4 + call $~lib/runtime/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 34 + i32.const 16 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - i32.load offset=8 + local.get $2 + call $~lib/runtime/ArrayBufferView#get:byteLength local.get $0 - global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT + global.get $~lib/typedarray/Uint8Array.BYTES_PER_ELEMENT i32.mul i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 35 + i32.const 16 + i32.const 40 i32.const 2 call $~lib/env/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $1 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.get $2 + call $~lib/typedarray/Uint8Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 36 + i32.const 16 + i32.const 41 i32.const 2 call $~lib/env/abort unreachable end i32.const 0 local.get $0 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.set $3 local.get $3 - i32.load offset=4 + call $~lib/runtime/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 39 + i32.const 16 + i32.const 44 i32.const 2 call $~lib/env/abort unreachable end local.get $3 - i32.load offset=8 + call $~lib/runtime/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Uint8Array.BYTES_PER_ELEMENT i32.mul @@ -1419,383 +1022,290 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 40 + i32.const 16 + i32.const 45 i32.const 2 call $~lib/env/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Uint8Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 41 + i32.const 16 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable end i32.const 0 local.get $0 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/typedarray/Int16Array#constructor local.set $4 local.get $4 - i32.load offset=4 + call $~lib/runtime/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 44 + i32.const 16 + i32.const 49 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.load offset=8 + call $~lib/runtime/ArrayBufferView#get:byteLength local.get $0 - global.get $~lib/typedarray/Uint8Array.BYTES_PER_ELEMENT + global.get $~lib/typedarray/Int16Array.BYTES_PER_ELEMENT i32.mul i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 45 + i32.const 16 + i32.const 50 i32.const 2 call $~lib/env/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - local.get $4 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.get $4 + call $~lib/typedarray/Int16Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 46 + i32.const 16 + i32.const 51 i32.const 2 call $~lib/env/abort unreachable end i32.const 0 local.get $0 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.set $5 local.get $5 - i32.load offset=4 + call $~lib/runtime/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 49 + i32.const 16 + i32.const 54 i32.const 2 call $~lib/env/abort unreachable end local.get $5 - i32.load offset=8 + call $~lib/runtime/ArrayBufferView#get:byteLength local.get $0 - global.get $~lib/typedarray/Int16Array.BYTES_PER_ELEMENT + global.get $~lib/typedarray/Uint16Array.BYTES_PER_ELEMENT i32.mul i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 50 + i32.const 16 + i32.const 55 i32.const 2 call $~lib/env/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $5 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - end + local.get $5 + call $~lib/typedarray/Uint16Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 51 + i32.const 16 + i32.const 56 i32.const 2 call $~lib/env/abort unreachable end i32.const 0 local.get $0 - call $~lib/typedarray/Uint16Array#constructor + call $~lib/typedarray/Int32Array#constructor local.set $6 local.get $6 - i32.load offset=4 + call $~lib/runtime/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 54 + i32.const 16 + i32.const 59 i32.const 2 call $~lib/env/abort unreachable end local.get $6 - i32.load offset=8 + call $~lib/runtime/ArrayBufferView#get:byteLength local.get $0 - global.get $~lib/typedarray/Uint16Array.BYTES_PER_ELEMENT + global.get $~lib/typedarray/Int32Array.BYTES_PER_ELEMENT i32.mul i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 55 + i32.const 16 + i32.const 60 i32.const 2 call $~lib/env/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $6 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - end + local.get $6 + call $~lib/typedarray/Int32Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 56 + i32.const 16 + i32.const 61 i32.const 2 call $~lib/env/abort unreachable end i32.const 0 local.get $0 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.set $7 local.get $7 - i32.load offset=4 + call $~lib/runtime/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 59 + i32.const 16 + i32.const 64 i32.const 2 call $~lib/env/abort unreachable end local.get $7 - i32.load offset=8 + call $~lib/runtime/ArrayBufferView#get:byteLength local.get $0 - global.get $~lib/typedarray/Int32Array.BYTES_PER_ELEMENT + global.get $~lib/typedarray/Uint32Array.BYTES_PER_ELEMENT i32.mul i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 60 + i32.const 16 + i32.const 65 i32.const 2 call $~lib/env/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $7 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $7 + call $~lib/typedarray/Uint32Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 61 + i32.const 16 + i32.const 66 i32.const 2 call $~lib/env/abort unreachable end i32.const 0 local.get $0 - call $~lib/typedarray/Uint32Array#constructor + call $~lib/typedarray/Int64Array#constructor local.set $8 local.get $8 - i32.load offset=4 + call $~lib/runtime/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 64 + i32.const 16 + i32.const 69 i32.const 2 call $~lib/env/abort unreachable end local.get $8 - i32.load offset=8 + call $~lib/runtime/ArrayBufferView#get:byteLength local.get $0 - global.get $~lib/typedarray/Uint32Array.BYTES_PER_ELEMENT + global.get $~lib/typedarray/Int64Array.BYTES_PER_ELEMENT i32.mul i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 65 + i32.const 16 + i32.const 70 i32.const 2 call $~lib/env/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $8 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $8 + call $~lib/typedarray/Int64Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 66 + i32.const 16 + i32.const 71 i32.const 2 call $~lib/env/abort unreachable end i32.const 0 local.get $0 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.set $9 local.get $9 - i32.load offset=4 + call $~lib/runtime/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 69 + i32.const 16 + i32.const 74 i32.const 2 call $~lib/env/abort unreachable end local.get $9 - i32.load offset=8 + call $~lib/runtime/ArrayBufferView#get:byteLength local.get $0 - global.get $~lib/typedarray/Int64Array.BYTES_PER_ELEMENT + global.get $~lib/typedarray/Uint64Array.BYTES_PER_ELEMENT i32.mul i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 70 + i32.const 16 + i32.const 75 i32.const 2 call $~lib/env/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $9 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.get $0 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 8 - i32.const 71 - i32.const 2 - call $~lib/env/abort - unreachable - end - i32.const 0 - local.get $0 - call $~lib/typedarray/Uint64Array#constructor - local.set $10 - local.get $10 - i32.load offset=4 - i32.const 0 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 8 - i32.const 74 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $10 - i32.load offset=8 - local.get $0 - global.get $~lib/typedarray/Uint64Array.BYTES_PER_ELEMENT - i32.mul - i32.eq - i32.eqz - if - i32.const 0 - i32.const 8 - i32.const 75 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $10 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.get $9 + call $~lib/typedarray/Uint64Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 76 i32.const 2 call $~lib/env/abort @@ -1804,22 +1314,22 @@ i32.const 0 local.get $0 call $~lib/typedarray/Float32Array#constructor - local.set $11 - local.get $11 - i32.load offset=4 + local.set $10 + local.get $10 + call $~lib/runtime/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 79 i32.const 2 call $~lib/env/abort unreachable end - local.get $11 - i32.load offset=8 + local.get $10 + call $~lib/runtime/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Float32Array.BYTES_PER_ELEMENT i32.mul @@ -1827,26 +1337,20 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 80 i32.const 2 call $~lib/env/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $11 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $10 + call $~lib/typedarray/Float32Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 81 i32.const 2 call $~lib/env/abort @@ -1855,22 +1359,22 @@ i32.const 0 local.get $0 call $~lib/typedarray/Float64Array#constructor - local.set $12 - local.get $12 - i32.load offset=4 + local.set $11 + local.get $11 + call $~lib/runtime/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 84 i32.const 2 call $~lib/env/abort unreachable end - local.get $12 - i32.load offset=8 + local.get $11 + call $~lib/runtime/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Float64Array.BYTES_PER_ELEMENT i32.mul @@ -1878,131 +1382,42 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 85 i32.const 2 call $~lib/env/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $12 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.get $11 + call $~lib/typedarray/Float64Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 86 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - 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 48 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store offset=8 - end - ) - (func $~lib/internal/typedarray/TypedArray#__get (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 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 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - end - ) - (func $~lib/typedarray/Int32Array#subarray (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.2 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Int32Array#get:length local.set $6 local.get $4 i32.const 0 @@ -2063,97 +1478,60 @@ select local.set $5 end - block $~lib/memory/memory.allocate|inlined.1 (result i32) - i32.const 12 + block $~lib/runtime/REGISTER|inlined.1 (result i32) + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + i32.const 12 + local.set $7 + local.get $7 + call $~lib/runtime/doAllocate + end local.set $7 local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 + i32.const 9 + call $~lib/runtime/doRegister end local.set $7 - local.get $7 local.get $3 i32.load - i32.store - local.get $7 + local.set $8 local.get $3 i32.load offset=4 + local.set $9 + local.get $7 + local.get $8 + i32.store + local.get $7 + local.get $9 local.get $4 i32.const 2 i32.shl i32.add i32.store offset=4 local.get $7 + local.get $9 local.get $5 - local.get $4 - i32.sub i32.const 2 i32.shl + i32.add i32.store offset=8 local.get $7 ) - (func $~lib/internal/typedarray/TypedArray#__set (; 32 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 3 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - f64.store offset=8 - end - ) - (func $~lib/typedarray/Float64Array#subarray (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#subarray (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Float64Array#get:length local.set $6 local.get $4 i32.const 0 @@ -2214,136 +1592,112 @@ select local.set $5 end - block $~lib/memory/memory.allocate|inlined.2 (result i32) - i32.const 12 + block $~lib/runtime/REGISTER|inlined.1 (result i32) + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + i32.const 12 + local.set $7 + local.get $7 + call $~lib/runtime/doAllocate + end local.set $7 local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.2 + i32.const 14 + call $~lib/runtime/doRegister end local.set $7 - local.get $7 local.get $3 i32.load - i32.store - local.get $7 + local.set $8 local.get $3 i32.load offset=4 + local.set $9 + local.get $7 + local.get $8 + i32.store + local.get $7 + local.get $9 local.get $4 i32.const 3 i32.shl i32.add i32.store offset=4 local.get $7 + local.get $9 local.get $5 - local.get $4 - i32.sub i32.const 3 i32.shl + i32.add i32.store offset=8 local.get $7 ) - (func $~lib/internal/sort/insertionSort (; 34 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) + (func $~lib/util/sort/insertionSort (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 f64) (local $5 i32) - (local $6 i32) + (local $6 f64) (local $7 i32) - (local $8 f64) - (local $9 i32) - (local $10 f64) - (local $11 f64) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result f64) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 3 - i32.shl - i32.add - local.get $7 - i32.add - f64.load offset=8 - end - local.set $8 - local.get $4 + local.get $0 + local.get $3 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $7 + local.set $5 block $break|1 loop $continue|1 - local.get $7 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result f64) - local.get $0 - local.set $6 - local.get $7 - local.set $5 - local.get $1 - local.set $9 - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $10 + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $8 - local.get $10 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if local.get $0 - local.set $9 block (result i32) - local.get $7 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $7 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $10 - local.set $11 - local.get $1 - local.set $6 - local.get $9 - local.get $5 i32.const 3 i32.shl i32.add local.get $6 - i32.add - local.get $11 - f64.store offset=8 + f64.store else br $break|1 end @@ -2352,110 +1706,83 @@ end end end - block $~lib/internal/arraybuffer/STORE|inlined.4 - local.get $0 - local.set $6 - local.get $7 - i32.const 1 - i32.add - local.set $5 - local.get $8 - local.set $10 - local.get $1 - local.set $9 - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - f64.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $4 + f64.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/allocator/arena/__memory_free (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) - nop + (func $~lib/memory/memory.free (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + local.set $1 ) - (func $~lib/internal/sort/weakHeapSort (; 36 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/weakHeapSort (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) - local.get $2 + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 i32.const 31 i32.add i32.const 5 i32.shr_s i32.const 2 i32.shl + local.set $3 + local.get $3 + call $~lib/memory/memory.allocate local.set $4 - block $~lib/memory/memory.allocate|inlined.3 (result i32) - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.3 - end - local.set $6 - block $~lib/memory/memory.fill|inlined.10 - local.get $6 - local.set $5 - i32.const 0 - local.set $7 - local.get $4 - local.set $8 - local.get $5 - local.get $7 - local.get $8 - call $~lib/internal/memory/memset - end + local.get $4 + i32.const 0 + local.get $3 + call $~lib/memory/memory.fill block $break|0 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|0 - local.get $8 + local.get $5 i32.const 0 i32.gt_s i32.eqz br_if $break|0 block - local.get $8 - local.set $7 + local.get $5 + local.set $6 block $break|1 loop $continue|1 - local.get $7 + local.get $6 i32.const 1 i32.and + local.get $4 local.get $6 - local.get $7 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $7 + local.get $6 i32.const 1 i32.shr_s i32.const 31 @@ -2465,72 +1792,52 @@ i32.and i32.eq if - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $7 + local.set $6 br $continue|1 end end end - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result f64) - local.get $0 - local.set $9 - local.get $5 - local.set $10 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - f64.load offset=8 - end - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result f64) - local.get $0 - local.set $11 - local.get $8 - local.set $10 - local.get $1 - local.set $9 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $13 + local.set $7 + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $8 + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $9 block (result i32) i32.const 2 global.set $~lib/argc - local.get $12 - local.get $13 - local.get $3 + local.get $8 + local.get $9 + local.get $2 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 @@ -2538,236 +1845,136 @@ i32.add i32.load i32.const 1 - local.get $8 + local.get $5 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.5 - local.get $0 - local.set $9 - local.get $8 - local.set $10 - local.get $12 - local.set $14 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $14 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.6 - local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $13 - local.set $14 - local.get $1 - local.set $9 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $14 - f64.store offset=8 - end + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.get $8 + f64.store + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + local.get $9 + f64.store end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|0 unreachable end unreachable end block $break|2 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|2 - local.get $8 + local.get $5 i32.const 2 i32.ge_s i32.eqz br_if $break|2 block - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result f64) - local.get $0 - local.set $5 - i32.const 0 - local.set $7 - local.get $1 - local.set $9 - local.get $5 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $13 - block $~lib/internal/arraybuffer/STORE|inlined.7 - local.get $0 - local.set $9 - i32.const 0 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result f64) - local.get $0 - local.set $5 - local.get $8 - local.set $10 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 3 + local.get $0 + f64.load + local.set $9 + local.get $0 + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + f64.store + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.get $9 + f64.store + i32.const 1 + local.set $7 + block $break|3 + loop $continue|3 + local.get $7 + i32.const 1 i32.shl - i32.add - local.get $11 - i32.add - f64.load offset=8 - end - local.set $12 - local.get $1 - local.set $11 - local.get $9 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.8 - local.get $0 - local.set $11 - local.get $8 - local.set $7 - local.get $13 - local.set $12 - local.get $1 - local.set $9 - local.get $11 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $12 - f64.store offset=8 - end - i32.const 1 - local.set $9 - block $break|3 - loop $continue|3 - local.get $9 - i32.const 1 - i32.shl - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $9 + local.get $7 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and i32.add - local.tee $7 - local.get $8 + local.tee $6 + local.get $5 i32.lt_s if - local.get $7 - local.set $9 + local.get $6 + local.set $7 br $continue|3 end end end block $break|4 loop $continue|4 - local.get $9 + local.get $7 i32.const 0 i32.gt_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.8 (result f64) - local.get $0 - local.set $11 - i32.const 0 - local.set $10 - local.get $1 - local.set $5 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $5 - i32.add - f64.load offset=8 - end - local.set $13 - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result f64) - local.get $0 - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - f64.load offset=8 - end - local.set $12 + local.get $0 + f64.load + local.set $9 + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $8 block (result i32) i32.const 2 global.set $~lib/argc - local.get $13 - local.get $12 - local.get $3 + local.get $9 + local.get $8 + local.get $2 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 @@ -2775,309 +1982,140 @@ i32.add i32.load i32.const 1 - local.get $9 + local.get $7 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.9 - local.get $0 - local.set $11 - local.get $9 - local.set $10 - local.get $13 - local.set $14 - local.get $1 - local.set $5 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $5 - i32.add - local.get $14 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.10 - local.get $0 - local.set $5 - i32.const 0 - local.set $10 - local.get $12 - local.set $14 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $14 - f64.store offset=8 - end + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + local.get $9 + f64.store + local.get $0 + local.get $8 + f64.store end - local.get $9 + local.get $7 i32.const 1 i32.shr_s - local.set $9 + local.set $7 end br $continue|4 end end end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|2 unreachable end unreachable end - block $~lib/memory/memory.free|inlined.0 - local.get $6 - local.set $8 - local.get $8 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 - end - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result f64) - local.get $0 - local.set $8 - i32.const 1 - local.set $7 - local.get $1 - local.set $9 - local.get $8 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/STORE|inlined.11 - local.get $0 - local.set $9 - i32.const 1 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result f64) - local.get $0 - local.set $8 - i32.const 0 - local.set $11 - local.get $1 - local.set $10 - local.get $8 - local.get $11 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - f64.load offset=8 - end - local.set $13 - local.get $1 - local.set $10 - local.get $9 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - local.get $13 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.12 - local.get $0 - local.set $10 - i32.const 0 - local.set $7 - local.get $15 - local.set $13 - local.get $1 - local.set $9 - local.get $10 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $13 - f64.store offset=8 - end + local.get $4 + call $~lib/memory/memory.free + local.get $0 + f64.load offset=8 + local.set $10 + local.get $0 + local.get $0 + f64.load + f64.store offset=8 + local.get $0 + local.get $10 + f64.store ) - (func $~lib/typedarray/Float64Array#sort (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) + (local $6 f64) + (local $7 f64) (local $8 i32) (local $9 i32) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 i32) - block $~lib/internal/typedarray/SORT|inlined.0 (result i32) + (local $10 i32) + block $~lib/typedarray/SORT|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 local.get $2 - i32.load offset=4 + call $~lib/typedarray/Float64Array#get:length local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - local.get $2 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $5 - local.get $5 + local.get $4 i32.const 1 i32.le_s if local.get $2 - br $~lib/internal/typedarray/SORT|inlined.0 + br $~lib/typedarray/SORT|inlined.0 end local.get $2 - i32.load - local.set $6 - local.get $5 + i32.load offset=4 + local.set $5 + local.get $4 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result f64) - local.get $6 - local.set $7 - i32.const 1 - local.set $8 - local.get $4 - local.set $9 - local.get $7 - local.get $8 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $10 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result f64) - local.get $6 - local.set $9 - i32.const 0 - local.set $8 - local.get $4 - local.set $7 - local.get $9 - local.get $8 - i32.const 3 - i32.shl - i32.add - local.get $7 - i32.add - f64.load offset=8 - end - local.set $11 + local.get $5 + f64.load offset=8 + local.set $6 + local.get $5 + f64.load + local.set $7 block (result i32) i32.const 2 global.set $~lib/argc - local.get $10 - local.get $11 + local.get $6 + local.get $7 local.get $3 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $6 - local.set $7 - i32.const 1 - local.set $8 - local.get $11 - local.set $12 - local.get $4 - local.set $9 - local.get $7 - local.get $8 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $12 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $6 - local.set $9 - i32.const 0 - local.set $8 - local.get $10 - local.set $12 - local.get $4 - local.set $7 - local.get $9 - local.get $8 - i32.const 3 - i32.shl - i32.add - local.get $7 - i32.add - local.get $12 - f64.store offset=8 - end + local.get $5 + local.get $7 + f64.store offset=8 + local.get $5 + local.get $6 + f64.store end local.get $2 - br $~lib/internal/typedarray/SORT|inlined.0 + br $~lib/typedarray/SORT|inlined.0 end - block $~lib/internal/sort/SORT|inlined.0 - local.get $6 - local.set $7 - local.get $4 - local.set $8 + block $~lib/util/sort/SORT|inlined.0 local.get $5 + local.set $8 + local.get $4 local.set $9 local.get $3 - local.set $13 + local.set $10 local.get $9 i32.const 256 i32.lt_s if - local.get $7 local.get $8 local.get $9 - local.get $13 - call $~lib/internal/sort/insertionSort + local.get $10 + call $~lib/util/sort/insertionSort else - local.get $7 local.get $8 local.get $9 - local.get $13 - call $~lib/internal/sort/weakHeapSort + local.get $10 + call $~lib/util/sort/weakHeapSort end end local.get $2 end ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 38 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 40 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -3110,7 +2148,7 @@ i64.lt_s i32.sub ) - (func $~lib/typedarray/Float64Array#sort|trampoline (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort|trampoline (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -3119,9 +2157,9 @@ end unreachable end - block $~lib/internal/sort/COMPARATOR|inlined.0 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) i32.const 1 - br $~lib/internal/sort/COMPARATOR|inlined.0 + br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 end @@ -3129,185 +2167,7 @@ local.get $1 call $~lib/typedarray/Float64Array#sort ) - (func $~lib/internal/typedarray/TypedArray#__get (; 40 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result f64) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.get $4 - i32.add - f64.load offset=8 - end - ) - (func $~lib/typedarray/clampToByte (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $0 - i32.sub - i32.const 31 - i32.shr_s - local.get $0 - i32.or - i32.and - ) - (func $~lib/internal/typedarray/TypedArray#__set (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 0 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 0 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store8 offset=8 - end - ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 43 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - local.get $2 - call $~lib/typedarray/clampToByte - call $~lib/internal/typedarray/TypedArray#__set - ) - (func $~lib/internal/typedarray/TypedArray#__get (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 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 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - local.get $3 - i32.const 0 - i32.shl - i32.add - local.get $4 - i32.add - i32.load8_u offset=8 - end - ) - (func $~lib/internal/typedarray/TypedArray#__set (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 0 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 0 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store8 offset=8 - end - ) - (func $~lib/typedarray/Int8Array#fill (; 46 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int8Array#fill (; 42 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3316,8 +2176,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) local.get $0 local.set $4 local.get $1 @@ -3327,41 +2185,32 @@ local.get $3 local.set $7 local.get $4 - i32.load + i32.load offset=4 local.set $8 local.get $4 - i32.load offset=4 + call $~lib/typedarray/Int8Array#get:length local.set $9 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - local.get $4 - local.set $10 - local.get $10 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $10 local.get $6 i32.const 0 i32.lt_s if (result i32) - local.get $10 + local.get $9 local.get $6 i32.add - local.tee $11 + local.tee $10 i32.const 0 - local.tee $12 + local.tee $11 + local.get $10 local.get $11 - local.get $12 i32.gt_s select else local.get $6 + local.tee $10 + local.get $9 local.tee $11 local.get $10 - local.tee $12 local.get $11 - local.get $12 i32.lt_s select end @@ -3370,139 +2219,1537 @@ i32.const 0 i32.lt_s if (result i32) - local.get $10 + local.get $9 local.get $7 i32.add - local.tee $11 + local.tee $10 i32.const 0 - local.tee $12 + local.tee $11 + local.get $10 local.get $11 - local.get $12 i32.gt_s select else local.get $7 + local.tee $10 + local.get $9 local.tee $11 local.get $10 - local.tee $12 local.get $11 - local.get $12 i32.lt_s select end - local.set $7 - local.get $6 - local.get $7 - i32.lt_s + local.set $7 + local.get $6 + local.get $7 + i32.lt_s + if + local.get $8 + local.get $6 + i32.add + local.get $5 + local.get $7 + local.get $6 + i32.sub + call $~lib/memory/memory.fill + end + local.get $4 + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/util/memory/memcpy (; 44 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $break|0 + loop $continue|0 + local.get $2 + if (result i32) + local.get $1 + i32.const 3 + i32.and + else + local.get $2 + end + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|0 + end + end + end + local.get $0 + i32.const 3 + i32.and + i32.const 0 + i32.eq + if + block $break|1 + loop $continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + block + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|1 + end + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.set $0 + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $0 + i32.const 2 + i32.add + local.set $0 + local.get $1 + i32.const 2 + i32.add + local.set $1 + end + local.get $2 + i32.const 1 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + block $case0|2 + local.get $0 + i32.const 3 + i32.and + local.set $5 + local.get $5 + i32.const 1 + i32.eq + br_if $case0|2 + local.get $5 + i32.const 2 + i32.eq + br_if $case1|2 + local.get $5 + i32.const 3 + i32.eq + br_if $case2|2 + br $break|2 + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + block $break|3 + loop $continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + block + local.get $1 + i32.const 1 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 5 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 9 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 13 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|3 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + block $break|4 + loop $continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + block + local.get $1 + i32.const 2 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 6 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 10 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 14 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|4 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block $break|5 + loop $continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + block + local.get $1 + i32.const 3 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 7 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 11 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 15 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|5 + end + end + end + br $break|2 + unreachable + end + unreachable + end + end + local.get $2 + i32.const 16 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 1 + i32.and if - local.get $8 - local.get $6 - i32.add - local.get $9 - i32.add - i32.const 8 - i32.add - local.set $11 - local.get $5 - local.set $12 - local.get $7 - local.get $6 - i32.sub - local.set $13 - local.get $11 - local.get $12 - local.get $13 - call $~lib/internal/memory/memset + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 end - local.get $4 ) - (func $~lib/internal/typedarray/TypedArray#__get (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/memory/memory.copy (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 0 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) + (local $5 i32) + (local $6 i32) + block $~lib/util/memory/memmove|inlined.0 local.get $0 - i32.load - local.set $2 - local.get $1 local.set $3 - local.get $0 - i32.load offset=4 + local.get $1 local.set $4 local.get $2 + local.set $5 local.get $3 - i32.const 0 - i32.shl - i32.add local.get $4 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $4 + local.get $5 i32.add - i32.load8_s offset=8 + local.get $3 + i32.le_u + local.tee $6 + if (result i32) + local.get $6 + else + local.get $3 + local.get $5 + i32.add + local.get $4 + i32.le_u + end + if + local.get $3 + local.get $4 + local.get $5 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $3 + local.get $4 + i32.lt_u + if + local.get $4 + i32.const 7 + i32.and + local.get $3 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $3 + i32.const 7 + i32.and + if + block + local.get $5 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $5 + i32.const 1 + i32.sub + local.set $5 + block (result i32) + local.get $3 + local.tee $6 + i32.const 1 + i32.add + local.set $3 + local.get $6 + end + block (result i32) + local.get $4 + local.tee $6 + i32.const 1 + i32.add + local.set $4 + local.get $6 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $5 + i32.const 8 + i32.ge_u + if + block + local.get $3 + local.get $4 + i64.load + i64.store + local.get $5 + i32.const 8 + i32.sub + local.set $5 + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $4 + i32.const 8 + i32.add + local.set $4 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $5 + if + block + block (result i32) + local.get $3 + local.tee $6 + i32.const 1 + i32.add + local.set $3 + local.get $6 + end + block (result i32) + local.get $4 + local.tee $6 + i32.const 1 + i32.add + local.set $4 + local.get $6 + end + i32.load8_u + i32.store8 + local.get $5 + i32.const 1 + i32.sub + local.set $5 + end + br $continue|2 + end + end + end + else + local.get $4 + i32.const 7 + i32.and + local.get $3 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $3 + local.get $5 + i32.add + i32.const 7 + i32.and + if + block + local.get $5 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $3 + local.get $5 + i32.const 1 + i32.sub + local.tee $5 + i32.add + local.get $4 + local.get $5 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $5 + i32.const 8 + i32.ge_u + if + block + local.get $5 + i32.const 8 + i32.sub + local.set $5 + local.get $3 + local.get $5 + i32.add + local.get $4 + local.get $5 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $5 + if + local.get $3 + local.get $5 + i32.const 1 + i32.sub + local.tee $5 + i32.add + local.get $4 + local.get $5 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end end ) - (func $~lib/array/Array#__get (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/runtime/doWrapArray (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) + i32.const 16 + call $~lib/runtime/doAllocate + local.get $1 + call $~lib/runtime/doRegister + local.set $3 local.get $0 - i32.load - local.set $2 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate local.get $1 + call $~lib/runtime/doRegister + local.set $5 + local.get $3 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $5 + local.get $4 + i32.add + i32.store offset=8 + local.get $3 + local.get $4 local.get $2 - i32.load - i32.const 0 i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 0 - i32.shl - i32.add - local.get $5 - i32.add - i32.load8_s offset=8 - else - unreachable - end + i32.store offset=12 + local.get $5 + local.get $0 + local.get $4 + call $~lib/memory/memory.copy + local.get $3 + ) + (func $~lib/array/Array#get:length (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 ) - (func $std/typedarray/isInt8ArrayEqual (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - local.get $0 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - block $~lib/array/Array#get:length|inlined.1 (result i32) - local.get $1 - local.set $2 - local.get $2 - i32.load offset=4 - end + local.get $0 + call $~lib/typedarray/Int8Array#get:length + local.get $1 + call $~lib/array/Array#get:length i32.ne if i32.const 0 @@ -3512,14 +3759,8 @@ block i32.const 0 local.set $2 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.get $0 + call $~lib/typedarray/Int8Array#get:length local.set $3 end loop $repeat|0 @@ -3529,19 +3770,15 @@ i32.eqz br_if $break|0 local.get $0 + i32.load offset=4 local.get $2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.add + i32.load8_s local.get $1 + i32.load offset=4 local.get $2 - call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.add + i32.load8_s i32.ne if i32.const 0 @@ -3558,51 +3795,22 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#fill|trampoline (; 50 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/typedarray/Int8Array#fill - ) - (func $~lib/typedarray/Int8Array#subarray (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.5 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Int8Array#get:length local.set $6 local.get $4 i32.const 0 @@ -3663,36 +3871,45 @@ select local.set $5 end - block $~lib/memory/memory.allocate|inlined.4 (result i32) - i32.const 12 + block $~lib/runtime/REGISTER|inlined.1 (result i32) + block $~lib/runtime/ALLOCATE|inlined.3 (result i32) + i32.const 12 + local.set $7 + local.get $7 + call $~lib/runtime/doAllocate + end local.set $7 local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.4 + i32.const 4 + call $~lib/runtime/doRegister end local.set $7 - local.get $7 local.get $3 i32.load - i32.store - local.get $7 + local.set $8 local.get $3 i32.load offset=4 + local.set $9 + local.get $7 + local.get $8 + i32.store + local.get $7 + local.get $9 local.get $4 i32.const 0 i32.shl i32.add i32.store offset=4 local.get $7 + local.get $9 local.get $5 - local.get $4 - i32.sub i32.const 0 i32.shl + i32.add i32.store offset=8 local.get $7 ) - (func $~lib/typedarray/Int32Array#fill (; 52 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#fill (; 50 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3701,9 +3918,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 local.set $4 local.get $1 @@ -3713,41 +3927,32 @@ local.get $3 local.set $7 local.get $4 - i32.load + i32.load offset=4 local.set $8 local.get $4 - i32.load offset=4 + call $~lib/typedarray/Int32Array#get:length local.set $9 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $4 - local.set $10 - local.get $10 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $10 local.get $6 i32.const 0 i32.lt_s if (result i32) - local.get $10 + local.get $9 local.get $6 i32.add - local.tee $11 + local.tee $10 i32.const 0 - local.tee $12 + local.tee $11 + local.get $10 local.get $11 - local.get $12 i32.gt_s select else local.get $6 + local.tee $10 + local.get $9 local.tee $11 local.get $10 - local.tee $12 local.get $11 - local.get $12 i32.lt_s select end @@ -3756,23 +3961,23 @@ i32.const 0 i32.lt_s if (result i32) - local.get $10 + local.get $9 local.get $7 i32.add - local.tee $11 + local.tee $10 i32.const 0 - local.tee $12 + local.tee $11 + local.get $10 local.get $11 - local.get $12 i32.gt_s select else local.get $7 + local.tee $10 + local.get $9 local.tee $11 local.get $10 - local.tee $12 local.get $11 - local.get $12 i32.lt_s select end @@ -3784,25 +3989,13 @@ i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $8 - local.set $11 - local.get $6 - local.set $12 - local.get $5 - local.set $13 - local.get $9 - local.set $14 - local.get $11 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - local.get $13 - i32.store offset=8 - end + local.get $8 + local.get $6 + i32.const 2 + i32.shl + i32.add + local.get $5 + i32.store local.get $6 i32.const 1 i32.add @@ -3814,56 +4007,17 @@ end local.get $4 ) - (func $~lib/array/Array#__get (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#get:length (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=12 ) - (func $std/typedarray/isInt32ArrayEqual (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - local.get $0 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - block $~lib/array/Array#get:length|inlined.1 (result i32) - local.get $1 - local.set $2 - local.get $2 - i32.load offset=4 - end + local.get $0 + call $~lib/typedarray/Int32Array#get:length + local.get $1 + call $~lib/array/Array#get:length i32.ne if i32.const 0 @@ -3873,14 +4027,8 @@ block i32.const 0 local.set $2 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $0 + call $~lib/typedarray/Int32Array#get:length local.set $3 end loop $repeat|0 @@ -3890,11 +4038,19 @@ i32.eqz br_if $break|0 local.get $0 + i32.load offset=4 local.get $2 - call $~lib/internal/typedarray/TypedArray#__get + i32.const 2 + i32.shl + i32.add + i32.load local.get $1 + i32.load offset=4 local.get $2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load i32.ne if i32.const 0 @@ -3911,73 +4067,38 @@ end i32.const 1 ) - (func $~lib/typedarray/Int32Array#fill|trampoline (; 55 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/typedarray/Int32Array#fill - ) - (func $std/typedarray/testReduce~anonymous|0 (; 56 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 53 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduce (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.10 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 local.get $3 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $3 + call $~lib/typedarray/Int8Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 @@ -3985,32 +4106,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 0 - i32.shl - i32.add - local.get $12 - i32.add - i32.load8_s offset=8 - end - local.get $9 + local.get $6 + local.get $7 + i32.const 0 + i32.shl + i32.add + i32.load8_s + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$iiiii) end local.set $5 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end @@ -4018,7 +4129,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 58 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 55 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4026,17 +4137,17 @@ call $~lib/typedarray/Int8Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 2 i32.const 0 @@ -4052,56 +4163,45 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 59 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 56 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduce (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.2 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 local.get $3 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $3 + call $~lib/typedarray/Uint8Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 @@ -4109,32 +4209,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 0 - i32.shl - i32.add - local.get $12 - i32.add - i32.load8_u offset=8 - end - local.get $9 + local.get $6 + local.get $7 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$iiiii) end local.set $5 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end @@ -4142,7 +4232,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 61 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 58 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4150,17 +4240,17 @@ call $~lib/typedarray/Uint8Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 3 i32.const 0 @@ -4174,56 +4264,45 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 62 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 59 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduce (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduce (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 local.get $3 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $3 + call $~lib/typedarray/Uint8Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 @@ -4231,32 +4310,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 0 - i32.shl - i32.add - local.get $12 - i32.add - i32.load8_u offset=8 - end - local.get $9 + local.get $6 + local.get $7 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$iiiii) end local.set $5 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end @@ -4264,31 +4333,71 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 64 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 61 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or + i32.and + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or + i32.and + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or + i32.and + i32.store8 offset=2 local.get $0 i32.const 4 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#reduce - local.set $1 - local.get $1 + local.set $2 + local.get $2 i32.const 255 i32.and i32.const 6 @@ -4296,97 +4405,45 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 65 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 1 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store16 offset=8 - end - ) - (func $std/typedarray/testReduce~anonymous|0 (; 66 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 62 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduce (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduce (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 local.get $3 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $3 + call $~lib/typedarray/Int16Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 @@ -4394,32 +4451,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 1 - i32.shl - i32.add - local.get $12 - i32.add - i32.load16_s offset=8 - end - local.get $9 + local.get $6 + local.get $7 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$iiiii) end local.set $5 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end @@ -4427,7 +4474,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 68 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 64 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4435,17 +4482,17 @@ call $~lib/typedarray/Int16Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 5 i32.const 0 @@ -4461,97 +4508,45 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 69 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 1 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store16 offset=8 - end - ) - (func $std/typedarray/testReduce~anonymous|0 (; 70 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 65 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduce (; 71 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduce (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 local.get $3 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $3 + call $~lib/typedarray/Uint16Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 @@ -4559,32 +4554,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 1 - i32.shl - i32.add - local.get $12 - i32.add - i32.load16_u offset=8 - end - local.get $9 + local.get $6 + local.get $7 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$iiiii) end local.set $5 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end @@ -4592,7 +4577,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 72 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 67 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4600,17 +4585,17 @@ call $~lib/typedarray/Uint16Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 6 i32.const 0 @@ -4624,56 +4609,45 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 73 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduce (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 local.get $3 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $3 + call $~lib/typedarray/Int32Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 @@ -4681,32 +4655,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i32.load offset=8 - end - local.get $9 + local.get $6 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$iiiii) end local.set $5 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end @@ -4714,7 +4678,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 75 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 70 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4722,17 +4686,17 @@ call $~lib/typedarray/Int32Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 7 i32.const 0 @@ -4744,97 +4708,45 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store offset=8 - end - ) - (func $std/typedarray/testReduce~anonymous|0 (; 77 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduce (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduce (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 local.get $3 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $3 + call $~lib/typedarray/Uint32Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 @@ -4842,32 +4754,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i32.load offset=8 - end - local.get $9 + local.get $6 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$iiiii) end local.set $5 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end @@ -4875,7 +4777,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 79 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 73 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4883,17 +4785,17 @@ call $~lib/typedarray/Uint32Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 8 i32.const 0 @@ -4905,97 +4807,45 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 80 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) - (local $3 i32) - (local $4 i32) - (local $5 i64) - (local $6 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 3 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i64.store offset=8 - end - ) - (func $std/typedarray/testReduce~anonymous|0 (; 81 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce~anonymous|0 (; 74 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 82 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 75 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 local.get $3 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $3 + call $~lib/typedarray/Int64Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 @@ -5003,32 +4853,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 3 - i32.shl - i32.add - local.get $12 - i32.add - i64.load offset=8 - end - local.get $9 + local.get $6 + local.get $7 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$jjjii) end local.set $5 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end @@ -5036,7 +4876,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 83 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 76 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5044,17 +4884,17 @@ call $~lib/typedarray/Int64Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 9 i64.const 0 @@ -5066,97 +4906,45 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 84 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) - (local $3 i32) - (local $4 i32) - (local $5 i64) - (local $6 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 3 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i64.store offset=8 - end - ) - (func $std/typedarray/testReduce~anonymous|0 (; 85 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce~anonymous|0 (; 77 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduce (; 86 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduce (; 78 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 local.get $3 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $3 + call $~lib/typedarray/Uint64Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 @@ -5164,32 +4952,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 3 - i32.shl - i32.add - local.get $12 - i32.add - i64.load offset=8 - end - local.get $9 + local.get $6 + local.get $7 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$jjjii) end local.set $5 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end @@ -5197,7 +4975,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 87 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 79 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5205,17 +4983,17 @@ call $~lib/typedarray/Uint64Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 10 i64.const 0 @@ -5227,97 +5005,45 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 88 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) - (local $3 i32) - (local $4 i32) - (local $5 f32) - (local $6 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 48 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - f32.store offset=8 - end - ) - (func $std/typedarray/testReduce~anonymous|0 (; 89 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce~anonymous|0 (; 80 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 90 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduce (; 81 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 local.get $3 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $3 + call $~lib/typedarray/Float32Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 @@ -5325,32 +5051,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result f32) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - f32.load offset=8 - end - local.get $9 + local.get $6 + local.get $7 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$fffii) end local.set $5 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end @@ -5358,7 +5074,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 91 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 82 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -5366,17 +5082,17 @@ call $~lib/typedarray/Float32Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 f32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + f32.store local.get $0 - i32.const 1 + i32.load offset=4 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 f32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=8 local.get $0 i32.const 11 f32.const 0 @@ -5388,89 +5104,68 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 92 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce~anonymous|0 (; 83 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 93 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduce (; 84 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 local.get $3 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $3 + call $~lib/typedarray/Float64Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz - br_if $break|0 - block (result f64) - i32.const 4 - global.set $~lib/argc - local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.13 (result f64) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 3 - i32.shl - i32.add - local.get $12 - i32.add - f64.load offset=8 - end - local.get $9 + br_if $break|0 + block (result f64) + i32.const 4 + global.set $~lib/argc + local.get $5 + local.get $6 + local.get $7 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$dddii) end local.set $5 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end @@ -5478,7 +5173,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 94 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 85 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -5486,17 +5181,17 @@ call $~lib/typedarray/Float64Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + f64.store local.get $0 - i32.const 1 + i32.load offset=4 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=16 local.get $0 i32.const 12 f64.const 0 @@ -5508,28 +5203,24 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 86 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduceRight (; 96 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduceRight (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $3 local.get $1 @@ -5537,25 +5228,16 @@ local.get $2 local.set $5 local.get $3 - i32.load - local.set $6 - local.get $3 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.11 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Int8Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -5564,32 +5246,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 0 - i32.shl - i32.add - local.get $11 - i32.add - i32.load8_s offset=8 - end - local.get $8 + local.get $6 + local.get $7 + i32.const 0 + i32.shl + i32.add + i32.load8_s + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$iiiii) end local.set $5 - local.get $8 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end @@ -5597,7 +5269,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 97 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 88 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5605,17 +5277,17 @@ call $~lib/typedarray/Int8Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 13 i32.const 0 @@ -5631,28 +5303,24 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 89 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 99 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 90 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $3 local.get $1 @@ -5660,25 +5328,16 @@ local.get $2 local.set $5 local.get $3 - i32.load - local.set $6 - local.get $3 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Uint8Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -5687,32 +5346,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 0 - i32.shl - i32.add - local.get $11 - i32.add - i32.load8_u offset=8 - end - local.get $8 + local.get $6 + local.get $7 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$iiiii) end local.set $5 - local.get $8 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end @@ -5720,7 +5369,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 100 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 91 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5728,17 +5377,17 @@ call $~lib/typedarray/Uint8Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 14 i32.const 0 @@ -5752,28 +5401,24 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 101 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 92 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 102 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $3 local.get $1 @@ -5781,25 +5426,16 @@ local.get $2 local.set $5 local.get $3 - i32.load - local.set $6 - local.get $3 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.5 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Uint8Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -5808,32 +5444,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result i32) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 0 - i32.shl - i32.add - local.get $11 - i32.add - i32.load8_u offset=8 - end - local.get $8 + local.get $6 + local.get $7 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$iiiii) end local.set $5 - local.get $8 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end @@ -5841,31 +5467,71 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 103 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 94 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or + i32.and + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or + i32.and + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or + i32.and + i32.store8 offset=2 local.get $0 i32.const 15 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#reduceRight - local.set $1 - local.get $1 + local.set $2 + local.get $2 i32.const 255 i32.and i32.const 6 @@ -5873,28 +5539,24 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 104 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduceRight (; 105 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduceRight (; 96 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $3 local.get $1 @@ -5902,25 +5564,16 @@ local.get $2 local.set $5 local.get $3 - i32.load - local.set $6 - local.get $3 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.2 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 1 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Int16Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -5929,32 +5582,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 1 - i32.shl - i32.add - local.get $11 - i32.add - i32.load16_s offset=8 - end - local.get $8 + local.get $6 + local.get $7 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$iiiii) end local.set $5 - local.get $8 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end @@ -5962,7 +5605,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 106 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 97 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5970,17 +5613,17 @@ call $~lib/typedarray/Int16Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 16 i32.const 0 @@ -5996,28 +5639,24 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 108 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 99 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $3 local.get $1 @@ -6025,25 +5664,16 @@ local.get $2 local.set $5 local.get $3 - i32.load - local.set $6 - local.get $3 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.2 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 1 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Uint16Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -6052,32 +5682,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 1 - i32.shl - i32.add - local.get $11 - i32.add - i32.load16_u offset=8 - end - local.get $8 + local.get $6 + local.get $7 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$iiiii) end local.set $5 - local.get $8 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end @@ -6085,7 +5705,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 109 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 100 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6093,17 +5713,17 @@ call $~lib/typedarray/Uint16Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 17 i32.const 0 @@ -6117,28 +5737,24 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 110 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 101 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduceRight (; 111 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 102 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $3 local.get $1 @@ -6146,25 +5762,16 @@ local.get $2 local.set $5 local.get $3 - i32.load - local.set $6 - local.get $3 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.10 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Int32Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -6173,32 +5780,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.get $8 + local.get $6 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$iiiii) end local.set $5 - local.get $8 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end @@ -6206,7 +5803,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 112 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 103 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6214,17 +5811,17 @@ call $~lib/typedarray/Int32Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 18 i32.const 0 @@ -6236,28 +5833,24 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 113 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 104 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduceRight (; 114 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduceRight (; 105 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $3 local.get $1 @@ -6265,25 +5858,16 @@ local.get $2 local.set $5 local.get $3 - i32.load - local.set $6 - local.get $3 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.2 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Uint32Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -6292,32 +5876,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.get $8 + local.get $6 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$iiiii) end local.set $5 - local.get $8 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end @@ -6325,7 +5899,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 115 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 106 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6333,17 +5907,17 @@ call $~lib/typedarray/Uint32Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 19 i32.const 0 @@ -6355,28 +5929,24 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 116 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight~anonymous|0 (; 107 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduceRight (; 117 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 108 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $3 local.get $1 @@ -6384,25 +5954,16 @@ local.get $2 local.set $5 local.get $3 - i32.load - local.set $6 - local.get $3 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.2 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Int64Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -6411,32 +5972,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i64) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - i64.load offset=8 - end - local.get $8 + local.get $6 + local.get $7 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$jjjii) end local.set $5 - local.get $8 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end @@ -6444,7 +5995,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 118 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 109 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6452,17 +6003,17 @@ call $~lib/typedarray/Int64Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 20 i64.const 0 @@ -6474,28 +6025,24 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 119 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight~anonymous|0 (; 110 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduceRight (; 120 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduceRight (; 111 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $3 local.get $1 @@ -6503,25 +6050,16 @@ local.get $2 local.set $5 local.get $3 - i32.load - local.set $6 - local.get $3 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.2 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Uint64Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -6530,32 +6068,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i64) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - i64.load offset=8 - end - local.get $8 + local.get $6 + local.get $7 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$jjjii) end local.set $5 - local.get $8 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end @@ -6563,7 +6091,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 121 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 112 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6571,17 +6099,17 @@ call $~lib/typedarray/Uint64Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 21 i64.const 0 @@ -6593,28 +6121,24 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 122 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 113 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduceRight (; 123 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduceRight (; 114 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $3 local.get $1 @@ -6622,25 +6146,16 @@ local.get $2 local.set $5 local.get $3 - i32.load - local.set $6 - local.get $3 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.2 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Float32Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -6649,32 +6164,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result f32) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - f32.load offset=8 - end - local.get $8 + local.get $6 + local.get $7 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$fffii) end local.set $5 - local.get $8 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end @@ -6682,7 +6187,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 124 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 115 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -6690,17 +6195,17 @@ call $~lib/typedarray/Float32Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 f32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + f32.store local.get $0 - i32.const 1 + i32.load offset=4 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 f32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=8 local.get $0 i32.const 22 f32.const 0 @@ -6712,28 +6217,24 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 125 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduceRight~anonymous|0 (; 116 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduceRight (; 126 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduceRight (; 117 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $3 local.get $1 @@ -6741,25 +6242,16 @@ local.get $2 local.set $5 local.get $3 - i32.load - local.set $6 - local.get $3 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.5 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Float64Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -6768,32 +6260,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.14 (result f64) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - f64.load offset=8 - end - local.get $8 + local.get $6 + local.get $7 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $7 local.get $3 local.get $4 call_indirect (type $FUNCSIG$dddii) end local.set $5 - local.get $8 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end @@ -6801,7 +6283,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 127 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 118 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -6809,17 +6291,17 @@ call $~lib/typedarray/Float64Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + f64.store local.get $0 - i32.const 1 + i32.load offset=4 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=16 local.get $0 i32.const 23 f64.const 0 @@ -6831,19 +6313,19 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 128 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 119 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6851,105 +6333,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.12 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 local.get $2 - i32.load - local.set $5 + call $~lib/typedarray/Int8Array#get:length + local.set $4 local.get $2 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Int8Array#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.1 + local.get $7 + local.get $8 + i32.const 0 + i32.shl + i32.add + block (result i32) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result i32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result i32) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 0 - i32.shl - i32.add - local.get $14 - i32.add - i32.load8_s offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$iiii) - end - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.get $11 i32.const 0 i32.shl i32.add - local.get $13 - i32.add - local.get $14 - i32.store8 offset=8 + i32.load8_s + local.get $8 + local.get $2 + local.get $3 + call_indirect (type $FUNCSIG$iiii) end - local.get $9 + i32.store8 + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 + local.get $6 ) - (func $std/typedarray/testArrayMap (; 130 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 121 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6957,82 +6398,70 @@ call $~lib/typedarray/Int8Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 24 call $~lib/typedarray/Int8Array#map local.set $1 local.get $1 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.load offset=4 + i32.load8_s i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.load offset=4 + i32.load8_s offset=1 i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.load offset=4 + i32.load8_s offset=2 i32.const 9 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 122 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8Array#map (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 123 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7040,103 +6469,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 local.get $2 - i32.load - local.set $5 + call $~lib/typedarray/Uint8Array#get:length + local.set $4 local.get $2 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Uint8Array#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.1 + local.get $7 + local.get $8 + i32.const 0 + i32.shl + i32.add + block (result i32) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result i32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i32) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 0 - i32.shl - i32.add - local.get $14 - i32.add - i32.load8_u offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$iiii) - end - i32.const 255 - i32.and - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.get $11 i32.const 0 i32.shl i32.add - local.get $13 - i32.add - local.get $14 - i32.store8 offset=8 + i32.load8_u + local.get $8 + local.get $2 + local.get $3 + call_indirect (type $FUNCSIG$iiii) end - local.get $9 + i32.store8 + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 + local.get $6 ) - (func $std/typedarray/testArrayMap (; 133 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 124 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7144,76 +6534,70 @@ call $~lib/typedarray/Uint8Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 25 call $~lib/typedarray/Uint8Array#map local.set $1 local.get $1 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u offset=1 i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u offset=2 i32.const 9 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 134 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 125 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7221,180 +6605,175 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 local.get $2 - i32.load - local.set $5 + call $~lib/typedarray/Uint8Array#get:length + local.set $4 local.get $2 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Uint8ClampedArray#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.2 + local.get $7 + local.get $8 + i32.const 0 + i32.shl + i32.add + block (result i32) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result i32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result i32) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 0 - i32.shl - i32.add - local.get $14 - i32.add - i32.load8_u offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$iiii) - end - i32.const 255 - i32.and - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.get $11 i32.const 0 i32.shl i32.add - local.get $13 - i32.add - local.get $14 - i32.store8 offset=8 + i32.load8_u + local.get $8 + local.get $2 + local.get $3 + call_indirect (type $FUNCSIG$iiii) end - local.get $9 + i32.store8 + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 + local.get $6 ) - (func $std/typedarray/testArrayMap (; 136 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 127 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or + i32.and + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or + i32.and + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or + i32.and + i32.store8 offset=2 local.get $0 i32.const 26 call $~lib/typedarray/Uint8ClampedArray#map - local.set $1 - local.get $1 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + local.set $2 + local.get $2 + i32.load offset=4 + i32.load8_u i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + local.get $2 + i32.load offset=4 + i32.load8_u offset=1 i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + local.get $2 + i32.load offset=4 + i32.load8_u offset=2 i32.const 9 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 128 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int16Array#map (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7402,142 +6781,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $4 local.get $2 - i32.load - local.set $5 + call $~lib/typedarray/Int16Array#get:length + local.set $4 local.get $2 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Int16Array#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.1 + local.get $7 + local.get $8 + i32.const 1 + i32.shl + i32.add + block (result i32) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result i32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 1 - i32.shl - i32.add - local.get $14 - i32.add - i32.load16_s offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$iiii) - end - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.get $11 i32.const 1 i32.shl i32.add - local.get $13 - i32.add - local.get $14 - i32.store16 offset=8 + i32.load16_s + local.get $8 + local.get $2 + local.get $3 + call_indirect (type $FUNCSIG$iiii) end - local.get $9 + i32.store16 + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 - ) - (func $~lib/internal/typedarray/TypedArray#__get (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.get $4 - i32.add - i32.load16_s offset=8 - end + local.get $6 ) - (func $std/typedarray/testArrayMap (; 140 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 130 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7545,82 +6846,70 @@ call $~lib/typedarray/Int16Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 27 call $~lib/typedarray/Int16Array#map local.set $1 local.get $1 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + i32.load offset=4 + i32.load16_s i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + i32.load offset=4 + i32.load16_s offset=2 i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + i32.load offset=4 + i32.load16_s offset=4 i32.const 9 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 141 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint16Array#map (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7628,140 +6917,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $4 local.get $2 - i32.load - local.set $5 + call $~lib/typedarray/Uint16Array#get:length + local.set $4 local.get $2 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Uint16Array#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.1 + local.get $7 + local.get $8 + i32.const 1 + i32.shl + i32.add + block (result i32) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result i32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 1 - i32.shl - i32.add - local.get $14 - i32.add - i32.load16_u offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$iiii) - end - i32.const 65535 - i32.and - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.get $11 i32.const 1 i32.shl i32.add - local.get $13 - i32.add - local.get $14 - i32.store16 offset=8 + i32.load16_u + local.get $8 + local.get $2 + local.get $3 + call_indirect (type $FUNCSIG$iiii) end - local.get $9 + i32.store16 + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 - ) - (func $~lib/internal/typedarray/TypedArray#__get (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.get $4 - i32.add - i32.load16_u offset=8 - end + local.get $6 ) - (func $std/typedarray/testArrayMap (; 144 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 133 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7769,76 +6982,70 @@ call $~lib/typedarray/Uint16Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 28 call $~lib/typedarray/Uint16Array#map local.set $1 local.get $1 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load16_u i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load16_u offset=2 i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load16_u offset=4 i32.const 9 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 145 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 134 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int32Array#map (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7846,101 +7053,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.11 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 local.get $2 - i32.load - local.set $5 + call $~lib/typedarray/Int32Array#get:length + local.set $4 local.get $2 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Int32Array#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.2 + local.get $7 + local.get $8 + i32.const 2 + i32.shl + i32.add + block (result i32) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result i32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result i32) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i32.load offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$iiii) - end - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.get $11 i32.const 2 i32.shl i32.add - local.get $13 - i32.add - local.get $14 - i32.store offset=8 + i32.load + local.get $8 + local.get $2 + local.get $3 + call_indirect (type $FUNCSIG$iiii) end - local.get $9 + i32.store + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 + local.get $6 ) - (func $std/typedarray/testArrayMap (; 147 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 136 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7948,70 +7118,70 @@ call $~lib/typedarray/Int32Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 29 call $~lib/typedarray/Int32Array#map local.set $1 local.get $1 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load offset=4 i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load offset=8 i32.const 9 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 148 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint32Array#map (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8019,138 +7189,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 local.get $2 - i32.load - local.set $5 + call $~lib/typedarray/Uint32Array#get:length + local.set $4 local.get $2 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Uint32Array#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.1 + local.get $7 + local.get $8 + i32.const 2 + i32.shl + i32.add + block (result i32) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result i32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i32.load offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$iiii) - end - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.get $11 i32.const 2 i32.shl i32.add - local.get $13 - i32.add - local.get $14 - i32.store offset=8 + i32.load + local.get $8 + local.get $2 + local.get $3 + call_indirect (type $FUNCSIG$iiii) end - local.get $9 + i32.store + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 - ) - (func $~lib/internal/typedarray/TypedArray#__get (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 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 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - end + local.get $6 ) - (func $std/typedarray/testArrayMap (; 151 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 139 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8158,70 +7254,70 @@ call $~lib/typedarray/Uint32Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 30 call $~lib/typedarray/Uint32Array#map local.set $1 local.get $1 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load offset=4 i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load offset=8 i32.const 9 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 152 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 140 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8229,139 +7325,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i64) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 local.get $2 - i32.load - local.set $5 + call $~lib/typedarray/Int64Array#get:length + local.set $4 local.get $2 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Int64Array#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.1 + local.get $7 + local.get $8 + i32.const 3 + i32.shl + i32.add + block (result i64) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result i64) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i64) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 3 - i32.shl - i32.add - local.get $14 - i32.add - i64.load offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$jjii) - end - local.set $15 - i32.const 0 - local.set $14 - local.get $10 - local.get $11 i32.const 3 i32.shl i32.add - local.get $14 - i32.add - local.get $15 - i64.store offset=8 + i64.load + local.get $8 + local.get $2 + local.get $3 + call_indirect (type $FUNCSIG$jjii) end - local.get $9 + i64.store + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 - ) - (func $~lib/internal/typedarray/TypedArray#__get (; 154 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i64) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.get $4 - i32.add - i64.load offset=8 - end + local.get $6 ) - (func $std/typedarray/testArrayMap (; 155 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 142 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8369,70 +7390,70 @@ call $~lib/typedarray/Int64Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 31 call $~lib/typedarray/Int64Array#map local.set $1 local.get $1 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load i64.const 1 i64.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load offset=8 i64.const 4 i64.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load offset=16 i64.const 9 i64.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 156 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 143 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Uint64Array#map (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8440,139 +7461,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i64) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 local.get $2 - i32.load - local.set $5 + call $~lib/typedarray/Uint64Array#get:length + local.set $4 local.get $2 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Uint64Array#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.1 + local.get $7 + local.get $8 + i32.const 3 + i32.shl + i32.add + block (result i64) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result i64) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i64) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 3 - i32.shl - i32.add - local.get $14 - i32.add - i64.load offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$jjii) - end - local.set $15 - i32.const 0 - local.set $14 - local.get $10 - local.get $11 i32.const 3 i32.shl i32.add - local.get $14 - i32.add - local.get $15 - i64.store offset=8 + i64.load + local.get $8 + local.get $2 + local.get $3 + call_indirect (type $FUNCSIG$jjii) end - local.get $9 + i64.store + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 - ) - (func $~lib/internal/typedarray/TypedArray#__get (; 158 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i64) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.get $4 - i32.add - i64.load offset=8 - end + local.get $6 ) - (func $std/typedarray/testArrayMap (; 159 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 145 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8580,70 +7526,70 @@ call $~lib/typedarray/Uint64Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 32 call $~lib/typedarray/Uint64Array#map local.set $1 local.get $1 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load i64.const 1 i64.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load offset=8 i64.const 4 i64.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load offset=16 i64.const 9 i64.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 160 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 146 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8651,139 +7597,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 f32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 local.get $2 - i32.load - local.set $5 + call $~lib/typedarray/Float32Array#get:length + local.set $4 local.get $2 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Float32Array#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.1 + local.get $7 + local.get $8 + i32.const 2 + i32.shl + i32.add + block (result f32) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result f32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result f32) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - f32.load offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$ffii) - end - local.set $15 - i32.const 0 - local.set $14 - local.get $10 - local.get $11 i32.const 2 i32.shl i32.add - local.get $14 - i32.add - local.get $15 - f32.store offset=8 + f32.load + local.get $8 + local.get $2 + local.get $3 + call_indirect (type $FUNCSIG$ffii) end - local.get $9 + f32.store + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 - ) - (func $~lib/internal/typedarray/TypedArray#__get (; 162 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) - (local $2 i32) - (local $3 i32) - (local $4 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 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result f32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - f32.load offset=8 - end + local.get $6 ) - (func $std/typedarray/testArrayMap (; 163 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 148 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8791,70 +7662,70 @@ call $~lib/typedarray/Float32Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 f32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + f32.store local.get $0 - i32.const 1 + i32.load offset=4 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 f32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=8 local.get $0 i32.const 33 call $~lib/typedarray/Float32Array#map local.set $1 local.get $1 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f32.load f32.const 1 f32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f32.load offset=4 f32.const 4 f32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f32.load offset=8 f32.const 9 f32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 164 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 149 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8862,102 +7733,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 f64) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 local.get $2 - i32.load - local.set $5 + call $~lib/typedarray/Float64Array#get:length + local.set $4 local.get $2 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Float64Array#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.13 + local.get $7 + local.get $8 + i32.const 3 + i32.shl + i32.add + block (result f64) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result f64) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.15 (result f64) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 3 - i32.shl - i32.add - local.get $14 - i32.add - f64.load offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$ddii) - end - local.set $15 - i32.const 0 - local.set $14 - local.get $10 - local.get $11 i32.const 3 i32.shl i32.add - local.get $14 - i32.add - local.get $15 - f64.store offset=8 + f64.load + local.get $8 + local.get $2 + local.get $3 + call_indirect (type $FUNCSIG$ddii) end - local.get $9 + f64.store + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 + local.get $6 ) - (func $std/typedarray/testArrayMap (; 166 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 151 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8965,65 +7798,65 @@ call $~lib/typedarray/Float64Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + f64.store local.get $0 - i32.const 1 + i32.load offset=4 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=16 local.get $0 i32.const 34 call $~lib/typedarray/Float64Array#map local.set $1 local.get $1 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load f64.const 1 f64.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load offset=8 f64.const 4 f64.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 2 call $~lib/env/abort unreachable end local.get $1 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load offset=16 f64.const 9 f64.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 167 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 152 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9032,65 +7865,44 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME|inlined.0 (result i32) + block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 - local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.13 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 + local.set $2 + local.get $1 + local.set $3 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Int8Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_s offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_s + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -9099,12 +7911,12 @@ i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME|inlined.0 + br $~lib/typedarray/SOME|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -9113,7 +7925,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 169 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 154 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9122,7 +7934,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 170 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 155 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9131,17 +7943,17 @@ call $~lib/typedarray/Int8Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 35 call $~lib/typedarray/Int8Array#some @@ -9152,7 +7964,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -9169,79 +7981,58 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 171 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 156 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#some (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME|inlined.0 (result i32) + block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint8Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.8 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_u offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -9250,12 +8041,12 @@ i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME|inlined.0 + br $~lib/typedarray/SOME|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -9264,14 +8055,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 173 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 158 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 174 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 159 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9280,17 +8071,17 @@ call $~lib/typedarray/Uint8Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 37 call $~lib/typedarray/Uint8Array#some @@ -9301,7 +8092,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -9318,79 +8109,58 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 175 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 160 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#some (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#some (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME|inlined.0 (result i32) + block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint8Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_u offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -9399,12 +8169,12 @@ i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME|inlined.0 + br $~lib/typedarray/SOME|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -9413,44 +8183,84 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 177 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 162 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 178 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 163 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or + i32.and + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or + i32.and + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or + i32.and + i32.store8 offset=2 local.get $0 i32.const 39 call $~lib/typedarray/Uint8ClampedArray#some - local.set $1 - local.get $1 + local.set $2 + local.get $2 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -9459,22 +8269,22 @@ local.get $0 i32.const 40 call $~lib/typedarray/Uint8ClampedArray#some - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.const 0 i32.ne i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 179 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 164 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -9483,65 +8293,44 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME|inlined.0 (result i32) + block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Int16Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $8 - i32.add - i32.load16_s offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -9550,12 +8339,12 @@ i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME|inlined.0 + br $~lib/typedarray/SOME|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -9564,7 +8353,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 181 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 166 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -9573,7 +8362,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 182 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 167 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9582,17 +8371,17 @@ call $~lib/typedarray/Int16Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 41 call $~lib/typedarray/Int16Array#some @@ -9603,7 +8392,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -9620,79 +8409,58 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 183 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 168 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#some (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME|inlined.0 (result i32) + block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint16Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $8 - i32.add - i32.load16_u offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -9701,12 +8469,12 @@ i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME|inlined.0 + br $~lib/typedarray/SOME|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -9715,14 +8483,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 185 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 170 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 186 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 171 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9731,17 +8499,17 @@ call $~lib/typedarray/Uint16Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 43 call $~lib/typedarray/Uint16Array#some @@ -9752,7 +8520,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -9769,77 +8537,56 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 187 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 172 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME|inlined.0 (result i32) + block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.12 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Int32Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -9848,12 +8595,12 @@ i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME|inlined.0 + br $~lib/typedarray/SOME|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -9862,12 +8609,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 189 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 174 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 190 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 175 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9876,17 +8623,17 @@ call $~lib/typedarray/Int32Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 45 call $~lib/typedarray/Int32Array#some @@ -9897,7 +8644,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -9914,77 +8661,56 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 191 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 176 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#some (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#some (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME|inlined.0 (result i32) + block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint32Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -9993,12 +8719,12 @@ i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME|inlined.0 + br $~lib/typedarray/SOME|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -10007,12 +8733,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 178 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 194 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 179 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10021,17 +8747,17 @@ call $~lib/typedarray/Uint32Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 47 call $~lib/typedarray/Uint32Array#some @@ -10042,7 +8768,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -10059,77 +8785,56 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 195 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 180 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME|inlined.0 (result i32) + block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Int64Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i64) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - i64.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$ijii) @@ -10138,12 +8843,12 @@ i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME|inlined.0 + br $~lib/typedarray/SOME|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -10152,12 +8857,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 197 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 182 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome (; 198 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 183 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10166,17 +8871,17 @@ call $~lib/typedarray/Int64Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 49 call $~lib/typedarray/Int64Array#some @@ -10187,7 +8892,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -10204,77 +8909,56 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 199 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 184 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#some (; 200 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#some (; 185 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME|inlined.0 (result i32) + block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint64Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i64) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - i64.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$ijii) @@ -10283,12 +8967,12 @@ i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME|inlined.0 + br $~lib/typedarray/SOME|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -10297,12 +8981,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 201 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 186 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome (; 202 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 187 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10311,17 +8995,17 @@ call $~lib/typedarray/Uint64Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 51 call $~lib/typedarray/Uint64Array#some @@ -10332,7 +9016,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -10349,77 +9033,56 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 203 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 188 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 204 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 189 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME|inlined.0 (result i32) + block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Float32Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result f32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - f32.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$ifii) @@ -10428,12 +9091,12 @@ i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME|inlined.0 + br $~lib/typedarray/SOME|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -10442,12 +9105,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 205 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 190 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome (; 206 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 191 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10456,17 +9119,17 @@ call $~lib/typedarray/Float32Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f32.store local.get $0 - i32.const 1 + i32.load offset=4 f32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 f32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=8 local.get $0 i32.const 53 call $~lib/typedarray/Float32Array#some @@ -10477,7 +9140,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -10494,77 +9157,56 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 207 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 192 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 193 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME|inlined.0 (result i32) + block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Float64Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.17 (result f64) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - f64.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$idii) @@ -10573,12 +9215,12 @@ i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME|inlined.0 + br $~lib/typedarray/SOME|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -10587,12 +9229,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 209 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 194 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome (; 210 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 195 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10601,17 +9243,17 @@ call $~lib/typedarray/Float64Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f64.store local.get $0 - i32.const 1 + i32.load offset=4 f64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 f64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=16 local.get $0 i32.const 55 call $~lib/typedarray/Float64Array#some @@ -10622,7 +9264,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 2 call $~lib/env/abort @@ -10639,14 +9281,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 211 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 196 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -10655,65 +9297,44 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#findIndex (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.14 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Int8Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.8 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_s offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_s + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -10721,13 +9342,13 @@ i32.const 0 i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -10736,7 +9357,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 213 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 198 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -10745,7 +9366,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 214 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 199 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10754,17 +9375,17 @@ call $~lib/typedarray/Int8Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 57 call $~lib/typedarray/Int8Array#findIndex @@ -10774,8 +9395,8 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -10790,80 +9411,59 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 215 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 200 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#findIndex (; 216 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 201 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.10 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint8Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_u offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -10871,13 +9471,13 @@ i32.const 0 i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -10886,14 +9486,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 217 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 202 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 218 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 203 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10902,17 +9502,17 @@ call $~lib/typedarray/Uint8Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 59 call $~lib/typedarray/Uint8Array#findIndex @@ -10922,8 +9522,8 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -10938,80 +9538,59 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 219 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 204 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 220 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 205 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.11 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint8Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.14 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_u offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -11019,13 +9598,13 @@ i32.const 0 i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -11034,44 +9613,84 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 221 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 206 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 222 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 207 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or + i32.and + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or + i32.and + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or + i32.and + i32.store8 offset=2 local.get $0 i32.const 61 call $~lib/typedarray/Uint8ClampedArray#findIndex - local.set $1 - local.get $1 + local.set $2 + local.get $2 i32.const 1 i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -11080,21 +9699,21 @@ local.get $0 i32.const 62 call $~lib/typedarray/Uint8ClampedArray#findIndex - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.const -1 i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 223 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 208 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11103,65 +9722,44 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#findIndex (; 224 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 209 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.5 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Int16Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $8 - i32.add - i32.load16_s offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -11169,13 +9767,13 @@ i32.const 0 i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -11184,7 +9782,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 210 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11193,7 +9791,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 226 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 211 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11202,17 +9800,17 @@ call $~lib/typedarray/Int16Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 63 call $~lib/typedarray/Int16Array#findIndex @@ -11222,8 +9820,8 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -11238,80 +9836,59 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 227 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 212 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#findIndex (; 228 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 213 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.5 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint16Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $8 - i32.add - i32.load16_u offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -11319,13 +9896,13 @@ i32.const 0 i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -11334,14 +9911,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 229 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 214 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 230 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 215 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11350,17 +9927,17 @@ call $~lib/typedarray/Uint16Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 65 call $~lib/typedarray/Uint16Array#findIndex @@ -11370,8 +9947,8 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -11386,78 +9963,57 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 231 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 216 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#findIndex (; 232 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 217 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.13 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Int32Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.8 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -11465,13 +10021,13 @@ i32.const 0 i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -11480,12 +10036,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 233 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 218 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 234 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 219 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11494,17 +10050,17 @@ call $~lib/typedarray/Int32Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 67 call $~lib/typedarray/Int32Array#findIndex @@ -11514,8 +10070,8 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -11530,78 +10086,57 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 235 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 220 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#findIndex (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#findIndex (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.5 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint32Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -11609,13 +10144,13 @@ i32.const 0 i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -11624,12 +10159,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 237 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 222 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 238 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 223 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11638,17 +10173,17 @@ call $~lib/typedarray/Uint32Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 69 call $~lib/typedarray/Uint32Array#findIndex @@ -11658,8 +10193,8 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -11674,78 +10209,57 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 239 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 224 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#findIndex (; 240 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.5 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Int64Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i64) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - i64.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$ijii) @@ -11753,13 +10267,13 @@ i32.const 0 i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -11768,12 +10282,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 241 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 226 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex (; 242 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 227 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11782,17 +10296,17 @@ call $~lib/typedarray/Int64Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 71 call $~lib/typedarray/Int64Array#findIndex @@ -11802,8 +10316,8 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -11818,78 +10332,57 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 243 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 228 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#findIndex (; 244 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#findIndex (; 229 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.5 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint64Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i64) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - i64.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$ijii) @@ -11897,13 +10390,13 @@ i32.const 0 i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -11912,12 +10405,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 245 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 230 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex (; 246 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 231 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11926,17 +10419,17 @@ call $~lib/typedarray/Uint64Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 73 call $~lib/typedarray/Uint64Array#findIndex @@ -11946,8 +10439,8 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -11962,78 +10455,57 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 247 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 232 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#findIndex (; 248 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 233 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.5 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Float32Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 - i32.lt_s - i32.eqz - br_if $break|0 - block (result i32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result f32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - f32.load offset=8 - end - local.get $7 + local.get $5 + local.get $6 + i32.lt_s + i32.eqz + br_if $break|0 + block (result i32) + i32.const 3 + global.set $~lib/argc + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$ifii) @@ -12041,13 +10513,13 @@ i32.const 0 i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -12056,12 +10528,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 249 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 234 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex (; 250 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 235 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12070,17 +10542,17 @@ call $~lib/typedarray/Float32Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 f32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + f32.store local.get $0 - i32.const 1 + i32.load offset=4 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 f32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=8 local.get $0 i32.const 75 call $~lib/typedarray/Float32Array#findIndex @@ -12090,8 +10562,8 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -12106,78 +10578,57 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 251 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 236 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#findIndex (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 237 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Float64Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.19 (result f64) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - f64.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$idii) @@ -12185,13 +10636,13 @@ i32.const 0 i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -12200,12 +10651,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 253 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 238 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex (; 254 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 239 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12214,17 +10665,17 @@ call $~lib/typedarray/Float64Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + f64.store local.get $0 - i32.const 1 + i32.load offset=4 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=16 local.get $0 i32.const 77 call $~lib/typedarray/Float64Array#findIndex @@ -12234,8 +10685,8 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 480 + i32.const 16 i32.const 365 i32.const 2 call $~lib/env/abort @@ -12250,15 +10701,15 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 520 + i32.const 16 i32.const 368 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 255 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 240 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -12269,43 +10720,32 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int8Array#every (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 241 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY|inlined.0 (result i32) + block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.15 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Int8Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -12313,23 +10753,13 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_s offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_s + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -12340,15 +10770,15 @@ br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY|inlined.0 + br $~lib/typedarray/EVERY|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -12357,7 +10787,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 257 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 242 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -12366,7 +10796,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 258 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 243 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12375,17 +10805,17 @@ call $~lib/typedarray/Int8Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 79 call $~lib/typedarray/Int8Array#every @@ -12396,7 +10826,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -12413,14 +10843,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 259 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 244 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -12429,43 +10859,32 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8Array#every (; 260 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 245 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY|inlined.0 (result i32) + block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.12 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint8Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -12473,23 +10892,13 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.16 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_u offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -12500,15 +10909,15 @@ br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY|inlined.0 + br $~lib/typedarray/EVERY|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -12517,14 +10926,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 261 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 246 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 262 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 247 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12533,17 +10942,17 @@ call $~lib/typedarray/Uint8Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 81 call $~lib/typedarray/Uint8Array#every @@ -12554,7 +10963,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -12571,14 +10980,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 263 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 248 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -12587,43 +10996,32 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#every (; 264 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#every (; 249 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY|inlined.0 (result i32) + block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.13 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint8Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -12631,23 +11029,13 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.18 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_u offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -12658,15 +11046,15 @@ br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY|inlined.0 + br $~lib/typedarray/EVERY|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -12675,44 +11063,84 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 265 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 250 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 266 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 251 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or + i32.and + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or + i32.and + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or + i32.and + i32.store8 offset=2 local.get $0 i32.const 83 call $~lib/typedarray/Uint8ClampedArray#every - local.set $1 - local.get $1 + local.set $2 + local.get $2 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -12721,22 +11149,22 @@ local.get $0 i32.const 84 call $~lib/typedarray/Uint8ClampedArray#every - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.const 0 i32.ne i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 267 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 252 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -12747,43 +11175,32 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int16Array#every (; 268 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 253 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY|inlined.0 (result i32) + block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Int16Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -12791,23 +11208,13 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $8 - i32.add - i32.load16_s offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -12818,15 +11225,15 @@ br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY|inlined.0 + br $~lib/typedarray/EVERY|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -12835,7 +11242,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 269 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 254 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -12844,7 +11251,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 270 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 255 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12853,17 +11260,17 @@ call $~lib/typedarray/Int16Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 85 call $~lib/typedarray/Int16Array#every @@ -12874,7 +11281,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -12891,14 +11298,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 271 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 256 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and @@ -12907,43 +11314,32 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint16Array#every (; 272 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY|inlined.0 (result i32) + block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint16Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -12951,23 +11347,13 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $8 - i32.add - i32.load16_u offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -12978,15 +11364,15 @@ br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY|inlined.0 + br $~lib/typedarray/EVERY|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -12995,14 +11381,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 273 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 258 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 274 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 259 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13011,17 +11397,17 @@ call $~lib/typedarray/Uint16Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 87 call $~lib/typedarray/Uint16Array#every @@ -13032,7 +11418,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -13049,57 +11435,46 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 275 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 260 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.const 0 i32.eq ) - (func $~lib/typedarray/Int32Array#every (; 276 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 261 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY|inlined.0 (result i32) + block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.14 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Int32Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -13107,23 +11482,13 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -13134,15 +11499,15 @@ br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY|inlined.0 + br $~lib/typedarray/EVERY|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -13151,12 +11516,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 277 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 262 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 278 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 263 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13165,17 +11530,17 @@ call $~lib/typedarray/Int32Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 89 call $~lib/typedarray/Int32Array#every @@ -13186,7 +11551,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -13203,57 +11568,46 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 279 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 264 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_u i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint32Array#every (; 280 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#every (; 265 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY|inlined.0 (result i32) + block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint32Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -13261,23 +11615,13 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$iiii) @@ -13288,15 +11632,15 @@ br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY|inlined.0 + br $~lib/typedarray/EVERY|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -13305,12 +11649,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 281 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 266 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 282 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 267 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13319,17 +11663,17 @@ call $~lib/typedarray/Uint32Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store local.get $0 - i32.const 1 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 local.get $0 i32.const 91 call $~lib/typedarray/Uint32Array#every @@ -13340,7 +11684,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -13357,57 +11701,46 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 283 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 268 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (; 284 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 269 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY|inlined.0 (result i32) - local.get $0 - local.set $2 - local.get $1 - local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/typedarray/EVERY|inlined.0 (result i32) + local.get $0 + local.set $2 + local.get $1 + local.set $3 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Int64Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -13415,23 +11748,13 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result i64) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - i64.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$ijii) @@ -13442,15 +11765,15 @@ br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY|inlined.0 + br $~lib/typedarray/EVERY|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -13459,12 +11782,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 285 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 270 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery (; 286 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 271 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13473,17 +11796,17 @@ call $~lib/typedarray/Int64Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 93 call $~lib/typedarray/Int64Array#every @@ -13494,7 +11817,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -13511,57 +11834,46 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 287 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 272 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $~lib/typedarray/Uint64Array#every (; 288 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#every (; 273 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY|inlined.0 (result i32) + block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint64Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -13569,23 +11881,13 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result i64) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - i64.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$ijii) @@ -13596,15 +11898,15 @@ br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY|inlined.0 + br $~lib/typedarray/EVERY|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -13613,12 +11915,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 289 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 274 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery (; 290 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 275 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13627,17 +11929,17 @@ call $~lib/typedarray/Uint64Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i64.store local.get $0 - i32.const 1 + i32.load offset=4 i64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 i64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i64.store offset=16 local.get $0 i32.const 95 call $~lib/typedarray/Uint64Array#every @@ -13648,7 +11950,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -13665,14 +11967,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/math/NativeMathf.mod (; 291 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 276 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13928,50 +12230,39 @@ local.get $2 f32.reinterpret_i32 ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 292 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 277 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 293 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 278 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY|inlined.0 (result i32) + block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Float32Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -13979,23 +12270,13 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result f32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - f32.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$ifii) @@ -14006,15 +12287,15 @@ br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY|inlined.0 + br $~lib/typedarray/EVERY|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -14023,12 +12304,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 294 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 279 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $std/typedarray/testArrayEvery (; 295 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 280 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14037,17 +12318,17 @@ call $~lib/typedarray/Float32Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f32.store local.get $0 - i32.const 1 + i32.load offset=4 f32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 f32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=8 local.get $0 i32.const 97 call $~lib/typedarray/Float32Array#every @@ -14058,7 +12339,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -14075,14 +12356,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/math/NativeMath.mod (; 296 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 281 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -14340,50 +12621,39 @@ local.get $2 f64.reinterpret_i64 ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 297 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 282 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 298 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 283 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY|inlined.0 (result i32) + block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Float64Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -14391,23 +12661,13 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.21 (result f64) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - f64.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$idii) @@ -14418,15 +12678,15 @@ br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY|inlined.0 + br $~lib/typedarray/EVERY|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -14435,12 +12695,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 299 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 284 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $std/typedarray/testArrayEvery (; 300 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 285 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14449,17 +12709,17 @@ call $~lib/typedarray/Float64Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f64.store local.get $0 - i32.const 1 + i32.load offset=4 f64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 f64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=16 local.get $0 i32.const 99 call $~lib/typedarray/Float64Array#every @@ -14470,7 +12730,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 2 call $~lib/env/abort @@ -14487,18 +12747,22 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 301 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 286 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues + i32.load offset=4 local.get $1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load local.set $3 local.get $0 i32.const 24 @@ -14513,8 +12777,8 @@ i32.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 616 + i32.const 16 i32.const 425 i32.const 4 call $~lib/env/abort @@ -14525,8 +12789,8 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 672 + i32.const 16 i32.const 426 i32.const 4 call $~lib/env/abort @@ -14537,8 +12801,8 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 728 + i32.const 16 i32.const 427 i32.const 4 call $~lib/env/abort @@ -14549,79 +12813,58 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 302 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#forEach (; 287 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.16 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Int8Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i32) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - i32.load8_s offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_s + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$viii) end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach (; 303 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 288 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14632,35 +12875,35 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.const 0 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 2 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=8 i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 101 call $~lib/typedarray/Int8Array#forEach @@ -14669,19 +12912,23 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 800 + i32.const 16 i32.const 430 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 304 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 289 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues + i32.load offset=4 local.get $1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load local.set $3 local.get $0 i32.const 255 @@ -14692,8 +12939,8 @@ i32.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 616 + i32.const 16 i32.const 425 i32.const 4 call $~lib/env/abort @@ -14704,8 +12951,8 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 672 + i32.const 16 i32.const 426 i32.const 4 call $~lib/env/abort @@ -14716,8 +12963,8 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 728 + i32.const 16 i32.const 427 i32.const 4 call $~lib/env/abort @@ -14728,79 +12975,58 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8Array#forEach (; 305 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 290 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.14 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint8Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.19 (result i32) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - i32.load8_u offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$viii) end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach (; 306 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 291 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14811,29 +13037,29 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.const 0 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 255 i32.and - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 255 i32.and - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 2 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=8 i32.const 255 i32.and - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 local.get $0 i32.const 102 call $~lib/typedarray/Uint8Array#forEach @@ -14842,19 +13068,23 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 800 + i32.const 16 i32.const 430 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 307 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 292 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues + i32.load offset=4 local.get $1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load local.set $3 local.get $0 i32.const 255 @@ -14865,8 +13095,8 @@ i32.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 616 + i32.const 16 i32.const 425 i32.const 4 call $~lib/env/abort @@ -14877,8 +13107,8 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 672 + i32.const 16 i32.const 426 i32.const 4 call $~lib/env/abort @@ -14889,8 +13119,8 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 728 + i32.const 16 i32.const 427 i32.const 4 call $~lib/env/abort @@ -14901,80 +13131,60 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8ClampedArray#forEach (; 308 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#forEach (; 293 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.15 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint8Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.20 (result i32) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - i32.load8_u offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$viii) end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach (; 309 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 294 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -14984,29 +13194,68 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.const 0 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load + i32.const 255 + i32.and + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 local.get $0 - i32.const 1 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 + i32.const 255 + i32.and + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 offset=1 local.get $0 - i32.const 2 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 2 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=8 + i32.const 255 + i32.and + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + local.get $1 + i32.or i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 offset=2 local.get $0 i32.const 103 call $~lib/typedarray/Uint8ClampedArray#forEach @@ -15015,19 +13264,23 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 800 + i32.const 16 i32.const 430 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 310 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 295 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues + i32.load offset=4 local.get $1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load local.set $3 local.get $0 i32.const 16 @@ -15042,8 +13295,8 @@ i32.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 616 + i32.const 16 i32.const 425 i32.const 4 call $~lib/env/abort @@ -15054,8 +13307,8 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 672 + i32.const 16 i32.const 426 i32.const 4 call $~lib/env/abort @@ -15066,8 +13319,8 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 728 + i32.const 16 i32.const 427 i32.const 4 call $~lib/env/abort @@ -15078,79 +13331,58 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 311 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#forEach (; 296 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Int16Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result i32) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $10 - i32.add - i32.load16_s offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$viii) end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach (; 312 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 297 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -15161,35 +13393,35 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.const 0 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 2 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=8 i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 104 call $~lib/typedarray/Int16Array#forEach @@ -15198,19 +13430,23 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 800 + i32.const 16 i32.const 430 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 313 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 298 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues + i32.load offset=4 local.get $1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load local.set $3 local.get $0 i32.const 65535 @@ -15221,8 +13457,8 @@ i32.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 616 + i32.const 16 i32.const 425 i32.const 4 call $~lib/env/abort @@ -15233,8 +13469,8 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 672 + i32.const 16 i32.const 426 i32.const 4 call $~lib/env/abort @@ -15245,8 +13481,8 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 728 + i32.const 16 i32.const 427 i32.const 4 call $~lib/env/abort @@ -15257,79 +13493,58 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint16Array#forEach (; 314 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 299 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint16Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result i32) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $10 - i32.add - i32.load16_u offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$viii) end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach (; 315 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 300 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -15340,29 +13555,29 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.const 0 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 65535 i32.and - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $0 - i32.const 1 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 65535 i32.and - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=2 local.get $0 - i32.const 2 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 2 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=8 i32.const 65535 i32.and - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 offset=4 local.get $0 i32.const 105 call $~lib/typedarray/Uint16Array#forEach @@ -15371,27 +13586,31 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 800 + i32.const 16 i32.const 430 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 316 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 301 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues + i32.load offset=4 local.get $1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load local.set $3 local.get $0 local.get $3 i32.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 616 + i32.const 16 i32.const 425 i32.const 4 call $~lib/env/abort @@ -15402,8 +13621,8 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 672 + i32.const 16 i32.const 426 i32.const 4 call $~lib/env/abort @@ -15414,8 +13633,8 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 728 + i32.const 16 i32.const 427 i32.const 4 call $~lib/env/abort @@ -15426,79 +13645,58 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 317 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 302 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.15 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Int32Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i32) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$viii) end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach (; 318 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 303 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -15509,23 +13707,23 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.const 0 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 0 - call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + i32.load offset=4 + i32.load + i32.store local.get $0 - i32.const 1 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 1 - call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + i32.load offset=4 + i32.load offset=4 + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 2 - call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + i32.load offset=4 + i32.load offset=8 + i32.store offset=8 local.get $0 i32.const 106 call $~lib/typedarray/Int32Array#forEach @@ -15534,27 +13732,31 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 800 + i32.const 16 i32.const 430 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 319 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 304 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues + i32.load offset=4 local.get $1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load local.set $3 local.get $0 local.get $3 i32.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 616 + i32.const 16 i32.const 425 i32.const 4 call $~lib/env/abort @@ -15565,8 +13767,8 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 672 + i32.const 16 i32.const 426 i32.const 4 call $~lib/env/abort @@ -15577,8 +13779,8 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 728 + i32.const 16 i32.const 427 i32.const 4 call $~lib/env/abort @@ -15589,79 +13791,58 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint32Array#forEach (; 320 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint32Array#forEach (; 305 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 - loop $repeat|0 - local.get $7 - local.get $4 - i32.lt_s - i32.eqz - br_if $break|0 - block - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result i32) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.get $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint32Array#get:length + local.set $6 + end + loop $repeat|0 + local.get $5 + local.get $6 + i32.lt_s + i32.eqz + br_if $break|0 + block + i32.const 3 + global.set $~lib/argc + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$viii) end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach (; 321 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 306 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -15672,23 +13853,23 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.const 0 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 0 - call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + i32.load offset=4 + i32.load + i32.store local.get $0 - i32.const 1 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 1 - call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + i32.load offset=4 + i32.load offset=4 + i32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 2 - call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + i32.load offset=4 + i32.load offset=8 + i32.store offset=8 local.get $0 i32.const 107 call $~lib/typedarray/Uint32Array#forEach @@ -15697,19 +13878,23 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 800 + i32.const 16 i32.const 430 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 322 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 307 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues + i32.load offset=4 local.get $1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load local.set $3 local.get $0 local.get $3 @@ -15717,8 +13902,8 @@ i64.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 616 + i32.const 16 i32.const 425 i32.const 4 call $~lib/env/abort @@ -15729,8 +13914,8 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 672 + i32.const 16 i32.const 426 i32.const 4 call $~lib/env/abort @@ -15741,8 +13926,8 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 728 + i32.const 16 i32.const 427 i32.const 4 call $~lib/env/abort @@ -15753,79 +13938,58 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 323 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 308 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Int64Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result i64) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - i64.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$vjii) end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach (; 324 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 309 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -15836,26 +14000,23 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.const 0 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + i32.load offset=4 + i64.load32_s + i64.store local.get $0 - i32.const 1 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 1 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + i32.load offset=4 + i64.load32_s offset=4 + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + i32.load offset=4 + i64.load32_s offset=8 + i64.store offset=16 local.get $0 i32.const 108 call $~lib/typedarray/Int64Array#forEach @@ -15864,19 +14025,23 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 800 + i32.const 16 i32.const 430 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 325 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 310 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues + i32.load offset=4 local.get $1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load local.set $3 local.get $0 local.get $3 @@ -15884,8 +14049,8 @@ i64.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 616 + i32.const 16 i32.const 425 i32.const 4 call $~lib/env/abort @@ -15896,8 +14061,8 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 672 + i32.const 16 i32.const 426 i32.const 4 call $~lib/env/abort @@ -15908,8 +14073,8 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 728 + i32.const 16 i32.const 427 i32.const 4 call $~lib/env/abort @@ -15920,79 +14085,58 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint64Array#forEach (; 326 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint64Array#forEach (; 311 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Uint64Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result i64) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - i64.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$vjii) end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach (; 327 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 312 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -16003,26 +14147,23 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.const 0 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + i32.load offset=4 + i64.load32_s + i64.store local.get $0 - i32.const 1 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 1 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + i32.load offset=4 + i64.load32_s offset=4 + i64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + i32.load offset=4 + i64.load32_s offset=8 + i64.store offset=16 local.get $0 i32.const 109 call $~lib/typedarray/Uint64Array#forEach @@ -16031,19 +14172,23 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 800 + i32.const 16 i32.const 430 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 328 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 313 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues + i32.load offset=4 local.get $1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load local.set $3 local.get $0 local.get $3 @@ -16051,8 +14196,8 @@ f32.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 616 + i32.const 16 i32.const 425 i32.const 4 call $~lib/env/abort @@ -16063,8 +14208,8 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 672 + i32.const 16 i32.const 426 i32.const 4 call $~lib/env/abort @@ -16075,8 +14220,8 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 728 + i32.const 16 i32.const 427 i32.const 4 call $~lib/env/abort @@ -16087,79 +14232,58 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 329 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#forEach (; 314 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Float32Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 - i32.lt_s - i32.eqz - br_if $break|0 - block - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result f32) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - f32.load offset=8 - end - local.get $7 + local.get $5 + local.get $6 + i32.lt_s + i32.eqz + br_if $break|0 + block + i32.const 3 + global.set $~lib/argc + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$vfii) end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach (; 330 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 315 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -16170,26 +14294,26 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.const 0 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + f32.store local.get $0 - i32.const 1 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=4 local.get $0 - i32.const 2 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 2 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=8 f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + f32.store offset=8 local.get $0 i32.const 110 call $~lib/typedarray/Float32Array#forEach @@ -16198,19 +14322,23 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 800 + i32.const 16 i32.const 430 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 331 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 316 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues + i32.load offset=4 local.get $1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load local.set $3 local.get $0 local.get $3 @@ -16218,8 +14346,8 @@ f64.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 616 + i32.const 16 i32.const 425 i32.const 4 call $~lib/env/abort @@ -16230,8 +14358,8 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 672 + i32.const 16 i32.const 426 i32.const 4 call $~lib/env/abort @@ -16242,8 +14370,8 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 728 + i32.const 16 i32.const 427 i32.const 4 call $~lib/env/abort @@ -16254,79 +14382,58 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 332 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#forEach (; 317 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 local.set $2 local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.10 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 local.get $2 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $2 + call $~lib/typedarray/Float64Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.22 (result f64) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - f64.load offset=8 - end - local.get $7 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $5 local.get $2 local.get $3 call_indirect (type $FUNCSIG$vdii) end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach (; 333 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 318 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -16337,26 +14444,26 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.const 0 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + f64.store local.get $0 - i32.const 1 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=8 local.get $0 - i32.const 2 + i32.load offset=4 global.get $std/typedarray/forEachValues - i32.const 2 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=8 f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=16 local.get $0 i32.const 111 call $~lib/typedarray/Float64Array#forEach @@ -16365,15 +14472,15 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 800 + i32.const 16 i32.const 430 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int8Array#reverse (; 334 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 319 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16381,121 +14488,60 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $1 local.get $1 - i32.load - local.set $2 - local.get $1 i32.load offset=4 - local.set $3 + local.set $2 block $break|0 block i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.17 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.set $3 + local.get $1 + call $~lib/typedarray/Int8Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $4 end loop $repeat|0 + local.get $3 local.get $4 - local.get $5 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result i32) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_s offset=8 - end - local.set $8 - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $2 - local.set $7 - local.get $4 - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.13 (result i32) - local.get $2 - local.set $9 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $9 - local.get $10 - i32.const 0 - i32.shl - i32.add - local.get $11 - i32.add - i32.load8_s offset=8 - end - local.set $11 - local.get $3 - local.set $10 - local.get $7 - local.get $6 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - local.get $11 - i32.store8 offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $2 - local.set $10 - local.get $5 - local.set $11 - local.get $8 - local.set $6 - local.get $3 - local.set $7 - local.get $10 - local.get $11 - i32.const 0 - i32.shl - i32.add - local.get $7 - i32.add - local.get $6 - i32.store8 offset=8 - end + local.get $2 + local.get $3 + i32.const 0 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $4 + i32.const 0 + i32.shl + i32.add + local.set $6 + local.get $5 + i32.load8_s + local.set $7 + local.get $5 + local.get $6 + i32.load8_s + i32.store8 + local.get $6 + local.get $7 + i32.store8 end block - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 - local.get $5 + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -16504,7 +14550,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse (; 335 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 320 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16533,25 +14579,37 @@ br_if $break|0 block local.get $1 + i32.load offset=4 local.get $3 + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $2 + i32.load offset=4 local.get $3 + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 end local.get $3 i32.const 1 @@ -16575,17 +14633,19 @@ i32.eqz br_if $break|1 local.get $1 + i32.load offset=4 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.add + i32.load8_s local.get $0 + i32.load offset=4 i32.const 8 local.get $3 i32.sub - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load i32.const 24 i32.shl i32.const 24 @@ -16593,8 +14653,8 @@ i32.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -16616,79 +14676,63 @@ call $~lib/typedarray/Int8Array#reverse local.set $4 local.get $4 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.load offset=4 + i32.load8_s i32.const 8 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.load offset=4 + i32.load8_s offset=1 i32.const 7 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.load offset=4 + i32.load8_s offset=2 i32.const 6 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.load offset=4 + i32.load8_s offset=3 i32.const 5 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 336 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 321 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16696,121 +14740,60 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $1 local.get $1 - i32.load - local.set $2 - local.get $1 i32.load offset=4 - local.set $3 + local.set $2 block $break|0 block i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.16 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.set $3 + local.get $1 + call $~lib/typedarray/Uint8Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $4 end loop $repeat|0 + local.get $3 local.get $4 - local.get $5 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.21 (result i32) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_u offset=8 - end - local.set $8 - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $2 - local.set $7 - local.get $4 - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.22 (result i32) - local.get $2 - local.set $9 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $9 - local.get $10 - i32.const 0 - i32.shl - i32.add - local.get $11 - i32.add - i32.load8_u offset=8 - end - local.set $11 - local.get $3 - local.set $10 - local.get $7 - local.get $6 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - local.get $11 - i32.store8 offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $2 - local.set $10 - local.get $5 - local.set $11 - local.get $8 - local.set $6 - local.get $3 - local.set $7 - local.get $10 - local.get $11 - i32.const 0 - i32.shl - i32.add - local.get $7 - i32.add - local.get $6 - i32.store8 offset=8 - end + local.get $2 + local.get $3 + i32.const 0 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $4 + i32.const 0 + i32.shl + i32.add + local.set $6 + local.get $5 + i32.load8_u + local.set $7 + local.get $5 + local.get $6 + i32.load8_u + i32.store8 + local.get $6 + local.get $7 + i32.store8 end block - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 - local.get $5 + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -16819,27 +14802,22 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8Array#subarray (; 337 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 322 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.17 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Uint8Array#get:length local.set $6 local.get $4 i32.const 0 @@ -16900,36 +14878,45 @@ select local.set $5 end - block $~lib/memory/memory.allocate|inlined.5 (result i32) - i32.const 12 + block $~lib/runtime/REGISTER|inlined.1 (result i32) + block $~lib/runtime/ALLOCATE|inlined.4 (result i32) + i32.const 12 + local.set $7 + local.get $7 + call $~lib/runtime/doAllocate + end local.set $7 local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.5 + i32.const 5 + call $~lib/runtime/doRegister end local.set $7 - local.get $7 local.get $3 i32.load - i32.store - local.get $7 + local.set $8 local.get $3 i32.load offset=4 + local.set $9 + local.get $7 + local.get $8 + i32.store + local.get $7 + local.get $9 local.get $4 i32.const 0 i32.shl i32.add i32.store offset=4 local.get $7 + local.get $9 local.get $5 - local.get $4 - i32.sub i32.const 0 i32.shl + i32.add i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 338 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 323 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16958,21 +14945,33 @@ br_if $break|0 block local.get $1 + i32.load offset=4 local.get $3 + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load i32.const 255 i32.and - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 local.get $2 + i32.load offset=4 local.get $3 + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load i32.const 255 i32.and - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 end local.get $3 i32.const 1 @@ -16996,22 +14995,26 @@ i32.eqz br_if $break|1 local.get $1 + i32.load offset=4 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.add + i32.load8_u local.get $0 + i32.load offset=4 i32.const 8 local.get $3 i32.sub - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load i32.const 255 i32.and i32.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -17033,71 +15036,63 @@ call $~lib/typedarray/Uint8Array#reverse local.set $4 local.get $4 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u i32.const 8 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u offset=1 i32.const 7 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u offset=2 i32.const 6 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u offset=3 i32.const 5 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#reverse (; 339 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reverse (; 324 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17105,121 +15100,60 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $1 local.get $1 - i32.load - local.set $2 - local.get $1 i32.load offset=4 - local.set $3 + local.set $2 block $break|0 block i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.18 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.set $3 + local.get $1 + call $~lib/typedarray/Uint8Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $4 end loop $repeat|0 + local.get $3 local.get $4 - local.get $5 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.23 (result i32) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_u offset=8 - end - local.set $8 - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $2 - local.set $7 - local.get $4 - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.24 (result i32) - local.get $2 - local.set $9 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $9 - local.get $10 - i32.const 0 - i32.shl - i32.add - local.get $11 - i32.add - i32.load8_u offset=8 - end - local.set $11 - local.get $3 - local.set $10 - local.get $7 - local.get $6 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - local.get $11 - i32.store8 offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $2 - local.set $10 - local.get $5 - local.set $11 - local.get $8 - local.set $6 - local.get $3 - local.set $7 - local.get $10 - local.get $11 - i32.const 0 - i32.shl - i32.add - local.get $7 - i32.add - local.get $6 - i32.store8 offset=8 - end + local.get $2 + local.get $3 + i32.const 0 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $4 + i32.const 0 + i32.shl + i32.add + local.set $6 + local.get $5 + i32.load8_u + local.set $7 + local.get $5 + local.get $6 + i32.load8_u + i32.store8 + local.get $6 + local.get $7 + i32.store8 end block - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 - local.get $5 + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -17228,27 +15162,22 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 340 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 325 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.19 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Uint8Array#get:length local.set $6 local.get $4 i32.const 0 @@ -17309,41 +15238,51 @@ select local.set $5 end - block $~lib/memory/memory.allocate|inlined.6 (result i32) - i32.const 12 + block $~lib/runtime/REGISTER|inlined.1 (result i32) + block $~lib/runtime/ALLOCATE|inlined.5 (result i32) + i32.const 12 + local.set $7 + local.get $7 + call $~lib/runtime/doAllocate + end local.set $7 local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.6 + i32.const 6 + call $~lib/runtime/doRegister end local.set $7 - local.get $7 local.get $3 i32.load - i32.store - local.get $7 + local.set $8 local.get $3 i32.load offset=4 + local.set $9 + local.get $7 + local.get $8 + i32.store + local.get $7 + local.get $9 local.get $4 i32.const 0 i32.shl i32.add i32.store offset=4 local.get $7 + local.get $9 local.get $5 - local.get $4 - i32.sub i32.const 0 i32.shl + i32.add i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 341 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 326 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -17367,21 +15306,59 @@ br_if $break|0 block local.get $1 + i32.load offset=4 local.get $3 + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load + i32.const 255 + i32.and + local.tee $4 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor i32.const 255 + local.get $4 + i32.sub + i32.const 31 + i32.shr_s + local.get $4 + i32.or i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 local.get $2 + i32.load offset=4 local.get $3 + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load + i32.const 255 + i32.and + local.tee $4 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor i32.const 255 + local.get $4 + i32.sub + i32.const 31 + i32.shr_s + local.get $4 + i32.or i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + i32.store8 end local.get $3 i32.const 1 @@ -17405,22 +15382,26 @@ i32.eqz br_if $break|1 local.get $1 + i32.load offset=4 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.add + i32.load8_u local.get $0 + i32.load offset=4 i32.const 8 local.get $3 i32.sub - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load i32.const 255 i32.and i32.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -17440,73 +15421,65 @@ i32.const 8 call $~lib/typedarray/Uint8ClampedArray#subarray call $~lib/typedarray/Uint8ClampedArray#reverse - local.set $4 - local.get $4 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + local.set $5 + local.get $5 + i32.load offset=4 + i32.load8_u i32.const 8 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $4 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + local.get $5 + i32.load offset=4 + i32.load8_u offset=1 i32.const 7 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end - local.get $4 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + local.get $5 + i32.load offset=4 + i32.load8_u offset=2 i32.const 6 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end - local.get $4 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + local.get $5 + i32.load offset=4 + i32.load8_u offset=3 i32.const 5 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 342 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 327 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17514,121 +15487,60 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $1 local.get $1 - i32.load - local.set $2 - local.get $1 i32.load offset=4 - local.set $3 + local.set $2 block $break|0 block i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 1 - i32.shr_u - end + local.set $3 + local.get $1 + call $~lib/typedarray/Int16Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $4 end loop $repeat|0 + local.get $3 local.get $4 - local.get $5 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i32) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 1 - i32.shl - i32.add - local.get $8 - i32.add - i32.load16_s offset=8 - end - local.set $8 - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $2 - local.set $7 - local.get $4 - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result i32) - local.get $2 - local.set $9 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $9 - local.get $10 - i32.const 1 - i32.shl - i32.add - local.get $11 - i32.add - i32.load16_s offset=8 - end - local.set $11 - local.get $3 - local.set $10 - local.get $7 - local.get $6 - i32.const 1 - i32.shl - i32.add - local.get $10 - i32.add - local.get $11 - i32.store16 offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $2 - local.set $10 - local.get $5 - local.set $11 - local.get $8 - local.set $6 - local.get $3 - local.set $7 - local.get $10 - local.get $11 - i32.const 1 - i32.shl - i32.add - local.get $7 - i32.add - local.get $6 - i32.store16 offset=8 - end - end - block + local.get $2 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.set $5 + local.get $2 local.get $4 i32.const 1 + i32.shl i32.add - local.set $4 + local.set $6 + local.get $5 + i32.load16_s + local.set $7 local.get $5 + local.get $6 + i32.load16_s + i32.store16 + local.get $6 + local.get $7 + i32.store16 + end + block + local.get $3 + i32.const 1 + i32.add + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -17637,27 +15549,22 @@ end local.get $1 ) - (func $~lib/typedarray/Int16Array#subarray (; 343 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 328 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 1 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Int16Array#get:length local.set $6 local.get $4 i32.const 0 @@ -17718,36 +15625,45 @@ select local.set $5 end - block $~lib/memory/memory.allocate|inlined.7 (result i32) - i32.const 12 + block $~lib/runtime/REGISTER|inlined.1 (result i32) + block $~lib/runtime/ALLOCATE|inlined.6 (result i32) + i32.const 12 + local.set $7 + local.get $7 + call $~lib/runtime/doAllocate + end local.set $7 local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.7 + i32.const 7 + call $~lib/runtime/doRegister end local.set $7 - local.get $7 local.get $3 i32.load - i32.store - local.get $7 + local.set $8 local.get $3 i32.load offset=4 + local.set $9 + local.get $7 + local.get $8 + i32.store + local.get $7 + local.get $9 local.get $4 i32.const 1 i32.shl i32.add i32.store offset=4 local.get $7 + local.get $9 local.get $5 - local.get $4 - i32.sub i32.const 1 i32.shl + i32.add i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 344 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 329 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17776,25 +15692,41 @@ br_if $break|0 block local.get $1 + i32.load offset=4 local.get $3 + i32.const 1 + i32.shl + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $2 + i32.load offset=4 local.get $3 + i32.const 1 + i32.shl + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 end local.get $3 i32.const 1 @@ -17818,17 +15750,21 @@ i32.eqz br_if $break|1 local.get $1 + i32.load offset=4 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 16 + i32.const 1 i32.shl - i32.const 16 - i32.shr_s + i32.add + i32.load16_s local.get $0 + i32.load offset=4 i32.const 8 local.get $3 i32.sub - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load i32.const 16 i32.shl i32.const 16 @@ -17836,8 +15772,8 @@ i32.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -17859,79 +15795,63 @@ call $~lib/typedarray/Int16Array#reverse local.set $4 local.get $4 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + i32.load offset=4 + i32.load16_s i32.const 8 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + i32.load offset=4 + i32.load16_s offset=2 i32.const 7 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + i32.load offset=4 + i32.load16_s offset=4 i32.const 6 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + i32.load offset=4 + i32.load16_s offset=6 i32.const 5 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 345 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 330 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17939,121 +15859,60 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $1 local.get $1 - i32.load - local.set $2 - local.get $1 i32.load offset=4 - local.set $3 - block $break|0 - block - i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 1 - i32.shr_u - end + local.set $2 + block $break|0 + block + i32.const 0 + local.set $3 + local.get $1 + call $~lib/typedarray/Uint16Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $4 end loop $repeat|0 + local.get $3 local.get $4 - local.get $5 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i32) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 1 - i32.shl - i32.add - local.get $8 - i32.add - i32.load16_u offset=8 - end - local.set $8 - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $2 - local.set $7 - local.get $4 - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result i32) - local.get $2 - local.set $9 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $9 - local.get $10 - i32.const 1 - i32.shl - i32.add - local.get $11 - i32.add - i32.load16_u offset=8 - end - local.set $11 - local.get $3 - local.set $10 - local.get $7 - local.get $6 - i32.const 1 - i32.shl - i32.add - local.get $10 - i32.add - local.get $11 - i32.store16 offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $2 - local.set $10 - local.get $5 - local.set $11 - local.get $8 - local.set $6 - local.get $3 - local.set $7 - local.get $10 - local.get $11 - i32.const 1 - i32.shl - i32.add - local.get $7 - i32.add - local.get $6 - i32.store16 offset=8 - end - end - block + local.get $2 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.set $5 + local.get $2 local.get $4 i32.const 1 + i32.shl i32.add - local.set $4 + local.set $6 + local.get $5 + i32.load16_u + local.set $7 local.get $5 + local.get $6 + i32.load16_u + i32.store16 + local.get $6 + local.get $7 + i32.store16 + end + block + local.get $3 + i32.const 1 + i32.add + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -18062,27 +15921,22 @@ end local.get $1 ) - (func $~lib/typedarray/Uint16Array#subarray (; 346 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 331 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 1 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Uint16Array#get:length local.set $6 local.get $4 i32.const 0 @@ -18143,36 +15997,45 @@ select local.set $5 end - block $~lib/memory/memory.allocate|inlined.8 (result i32) - i32.const 12 + block $~lib/runtime/REGISTER|inlined.1 (result i32) + block $~lib/runtime/ALLOCATE|inlined.7 (result i32) + i32.const 12 + local.set $7 + local.get $7 + call $~lib/runtime/doAllocate + end local.set $7 local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.8 + i32.const 8 + call $~lib/runtime/doRegister end local.set $7 - local.get $7 local.get $3 i32.load - i32.store - local.get $7 + local.set $8 local.get $3 i32.load offset=4 + local.set $9 + local.get $7 + local.get $8 + i32.store + local.get $7 + local.get $9 local.get $4 i32.const 1 i32.shl i32.add i32.store offset=4 local.get $7 + local.get $9 local.get $5 - local.get $4 - i32.sub i32.const 1 i32.shl + i32.add i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 347 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 332 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18201,21 +16064,37 @@ br_if $break|0 block local.get $1 + i32.load offset=4 local.get $3 + i32.const 1 + i32.shl + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load i32.const 65535 i32.and - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 local.get $2 + i32.load offset=4 local.get $3 + i32.const 1 + i32.shl + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load i32.const 65535 i32.and - call $~lib/internal/typedarray/TypedArray#__set + i32.store16 end local.get $3 i32.const 1 @@ -18239,22 +16118,28 @@ i32.eqz br_if $break|1 local.get $1 + i32.load offset=4 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.const 1 + i32.shl + i32.add + i32.load16_u local.get $0 + i32.load offset=4 i32.const 8 local.get $3 i32.sub - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load i32.const 65535 i32.and i32.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -18276,71 +16161,63 @@ call $~lib/typedarray/Uint16Array#reverse local.set $4 local.get $4 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load16_u i32.const 8 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load16_u offset=2 i32.const 7 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load16_u offset=4 i32.const 6 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.load offset=4 + i32.load16_u offset=6 i32.const 5 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 348 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 333 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -18348,121 +16225,60 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $1 local.get $1 - i32.load - local.set $2 - local.get $1 i32.load offset=4 - local.set $3 + local.set $2 block $break|0 block i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.16 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.set $3 + local.get $1 + call $~lib/typedarray/Int32Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $4 end loop $repeat|0 + local.get $3 local.get $4 - local.get $5 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result i32) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $8 - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $2 - local.set $7 - local.get $4 - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.13 (result i32) - local.get $2 - local.set $9 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $11 - local.get $3 - local.set $10 - local.get $7 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - local.get $11 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.4 - local.get $2 - local.set $10 - local.get $5 - local.set $11 - local.get $8 - local.set $6 - local.get $3 - local.set $7 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - local.get $6 - i32.store offset=8 - end + local.get $2 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $4 + i32.const 2 + i32.shl + i32.add + local.set $6 + local.get $5 + i32.load + local.set $7 + local.get $5 + local.get $6 + i32.load + i32.store + local.get $6 + local.get $7 + i32.store end block - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 - local.get $5 + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -18471,7 +16287,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse (; 349 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 334 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18500,17 +16316,33 @@ br_if $break|0 block local.get $1 + i32.load offset=4 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + i32.const 2 + i32.shl + i32.add + i32.load + i32.store local.get $2 + i32.load offset=4 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + i32.const 2 + i32.shl + i32.add + i32.load + i32.store end local.get $3 i32.const 1 @@ -18534,18 +16366,26 @@ i32.eqz br_if $break|1 local.get $1 + i32.load offset=4 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get + i32.const 2 + i32.shl + i32.add + i32.load local.get $0 + i32.load offset=4 i32.const 8 local.get $3 i32.sub - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load i32.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -18567,63 +16407,63 @@ call $~lib/typedarray/Int32Array#reverse local.set $4 local.get $4 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load i32.const 8 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load offset=4 i32.const 7 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load offset=8 i32.const 6 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load offset=12 i32.const 5 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint32Array#reverse (; 350 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reverse (; 335 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -18631,121 +16471,60 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $1 local.get $1 - i32.load - local.set $2 - local.get $1 i32.load offset=4 - local.set $3 + local.set $2 block $break|0 block i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.set $3 + local.get $1 + call $~lib/typedarray/Uint32Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $4 end loop $repeat|0 + local.get $3 local.get $4 - local.get $5 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i32) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $8 - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $2 - local.set $7 - local.get $4 - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result i32) - local.get $2 - local.set $9 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $11 - local.get $3 - local.set $10 - local.get $7 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - local.get $11 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $2 - local.set $10 - local.get $5 - local.set $11 - local.get $8 - local.set $6 - local.get $3 - local.set $7 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - local.get $6 - i32.store offset=8 - end + local.get $2 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $4 + i32.const 2 + i32.shl + i32.add + local.set $6 + local.get $5 + i32.load + local.set $7 + local.get $5 + local.get $6 + i32.load + i32.store + local.get $6 + local.get $7 + i32.store end block - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 - local.get $5 + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -18754,27 +16533,22 @@ end local.get $1 ) - (func $~lib/typedarray/Uint32Array#subarray (; 351 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 336 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Uint32Array#get:length local.set $6 local.get $4 i32.const 0 @@ -18835,36 +16609,45 @@ select local.set $5 end - block $~lib/memory/memory.allocate|inlined.9 (result i32) - i32.const 12 + block $~lib/runtime/REGISTER|inlined.1 (result i32) + block $~lib/runtime/ALLOCATE|inlined.8 (result i32) + i32.const 12 + local.set $7 + local.get $7 + call $~lib/runtime/doAllocate + end local.set $7 local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.9 + i32.const 10 + call $~lib/runtime/doRegister end local.set $7 - local.get $7 local.get $3 i32.load - i32.store - local.get $7 + local.set $8 local.get $3 i32.load offset=4 + local.set $9 + local.get $7 + local.get $8 + i32.store + local.get $7 + local.get $9 local.get $4 i32.const 2 i32.shl i32.add i32.store offset=4 local.get $7 + local.get $9 local.get $5 - local.get $4 - i32.sub i32.const 2 i32.shl + i32.add i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 352 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 337 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18893,17 +16676,33 @@ br_if $break|0 block local.get $1 + i32.load offset=4 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + i32.const 2 + i32.shl + i32.add + i32.load + i32.store local.get $2 + i32.load offset=4 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + i32.const 2 + i32.shl + i32.add + i32.load + i32.store end local.get $3 i32.const 1 @@ -18927,18 +16726,26 @@ i32.eqz br_if $break|1 local.get $1 + i32.load offset=4 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get + i32.const 2 + i32.shl + i32.add + i32.load local.get $0 + i32.load offset=4 i32.const 8 local.get $3 i32.sub - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load i32.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -18960,186 +16767,124 @@ call $~lib/typedarray/Uint32Array#reverse local.set $4 local.get $4 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load i32.const 8 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load offset=4 i32.const 7 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load offset=8 i32.const 6 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load offset=12 i32.const 5 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 - i32.const 2 - call $~lib/env/abort - unreachable - end - ) - (func $~lib/typedarray/Int64Array#reverse (; 353 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - (local $11 i32) - (local $12 i64) - local.get $0 - local.set $1 - local.get $1 - i32.load - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - block $break|0 - block - i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - i32.const 1 - i32.sub - local.set $5 - end - loop $repeat|0 - local.get $4 - local.get $5 - i32.lt_s - i32.eqz - br_if $break|0 - block - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i64) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - i64.load offset=8 - end - local.set $9 - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $2 - local.set $8 - local.get $4 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result i64) - local.get $2 - local.set $6 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $6 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - i64.load offset=8 - end - local.set $12 - local.get $3 - local.set $11 - local.get $8 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - i64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $2 - local.set $11 - local.get $5 - local.set $7 - local.get $9 - local.set $12 - local.get $3 - local.set $8 - local.get $11 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - local.get $12 - i64.store offset=8 - end - end + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/typedarray/Int64Array#reverse (; 338 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i64) + local.get $0 + local.set $1 + local.get $1 + i32.load offset=4 + local.set $2 + block $break|0 + block + i32.const 0 + local.set $3 + local.get $1 + call $~lib/typedarray/Int64Array#get:length + i32.const 1 + i32.sub + local.set $4 + end + loop $repeat|0 + local.get $3 + local.get $4 + i32.lt_s + i32.eqz + br_if $break|0 block + local.get $2 + local.get $3 + i32.const 3 + i32.shl + i32.add + local.set $5 + local.get $2 local.get $4 - i32.const 1 + i32.const 3 + i32.shl i32.add - local.set $4 + local.set $6 + local.get $5 + i64.load + local.set $7 local.get $5 + local.get $6 + i64.load + i64.store + local.get $6 + local.get $7 + i64.store + end + block + local.get $3 + i32.const 1 + i32.add + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -19148,27 +16893,22 @@ end local.get $1 ) - (func $~lib/typedarray/Int64Array#subarray (; 354 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 339 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Int64Array#get:length local.set $6 local.get $4 i32.const 0 @@ -19229,36 +16969,45 @@ select local.set $5 end - block $~lib/memory/memory.allocate|inlined.10 (result i32) - i32.const 12 + block $~lib/runtime/REGISTER|inlined.1 (result i32) + block $~lib/runtime/ALLOCATE|inlined.9 (result i32) + i32.const 12 + local.set $7 + local.get $7 + call $~lib/runtime/doAllocate + end local.set $7 local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.10 + i32.const 11 + call $~lib/runtime/doRegister end local.set $7 - local.get $7 local.get $3 i32.load - i32.store - local.get $7 + local.set $8 local.get $3 i32.load offset=4 + local.set $9 + local.get $7 + local.get $8 + i32.store + local.get $7 + local.get $9 local.get $4 i32.const 3 i32.shl i32.add i32.store offset=4 local.get $7 + local.get $9 local.get $5 - local.get $4 - i32.sub i32.const 3 i32.shl + i32.add i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 355 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 340 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -19287,19 +17036,33 @@ br_if $break|0 block local.get $1 + i32.load offset=4 local.get $3 + i32.const 3 + i32.shl + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + i32.const 2 + i32.shl + i32.add + i64.load32_s + i64.store local.get $2 + i32.load offset=4 local.get $3 + i32.const 3 + i32.shl + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + i32.const 2 + i32.shl + i32.add + i64.load32_s + i64.store end local.get $3 i32.const 1 @@ -19323,19 +17086,26 @@ i32.eqz br_if $break|1 local.get $1 + i32.load offset=4 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get + i32.const 3 + i32.shl + i32.add + i64.load local.get $0 + i32.load offset=4 i32.const 8 local.get $3 i32.sub - call $~lib/array/Array#__get - i64.extend_i32_s + i32.const 2 + i32.shl + i32.add + i64.load32_s i64.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -19357,186 +17127,124 @@ call $~lib/typedarray/Int64Array#reverse local.set $4 local.get $4 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load i64.const 8 i64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load offset=8 i64.const 7 i64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load offset=16 i64.const 6 i64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load offset=24 i64.const 5 i64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint64Array#reverse (; 356 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#reverse (; 341 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - (local $11 i32) - (local $12 i64) + (local $7 i64) local.get $0 local.set $1 local.get $1 - i32.load - local.set $2 - local.get $1 i32.load offset=4 - local.set $3 + local.set $2 block $break|0 block i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.set $3 + local.get $1 + call $~lib/typedarray/Uint64Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $4 end loop $repeat|0 + local.get $3 local.get $4 - local.get $5 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i64) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - i64.load offset=8 - end - local.set $9 - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $2 - local.set $8 - local.get $4 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result i64) - local.get $2 - local.set $6 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $6 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - i64.load offset=8 - end - local.set $12 - local.get $3 - local.set $11 - local.get $8 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - i64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $2 - local.set $11 - local.get $5 - local.set $7 - local.get $9 - local.set $12 - local.get $3 - local.set $8 - local.get $11 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - local.get $12 - i64.store offset=8 - end + local.get $2 + local.get $3 + i32.const 3 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $4 + i32.const 3 + i32.shl + i32.add + local.set $6 + local.get $5 + i64.load + local.set $7 + local.get $5 + local.get $6 + i64.load + i64.store + local.get $6 + local.get $7 + i64.store end block - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 - local.get $5 + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -19545,27 +17253,22 @@ end local.get $1 ) - (func $~lib/typedarray/Uint64Array#subarray (; 357 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 342 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Uint64Array#get:length local.set $6 local.get $4 i32.const 0 @@ -19626,36 +17329,45 @@ select local.set $5 end - block $~lib/memory/memory.allocate|inlined.11 (result i32) - i32.const 12 + block $~lib/runtime/REGISTER|inlined.1 (result i32) + block $~lib/runtime/ALLOCATE|inlined.10 (result i32) + i32.const 12 + local.set $7 + local.get $7 + call $~lib/runtime/doAllocate + end local.set $7 local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.11 + i32.const 12 + call $~lib/runtime/doRegister end local.set $7 - local.get $7 local.get $3 i32.load - i32.store - local.get $7 + local.set $8 local.get $3 i32.load offset=4 + local.set $9 + local.get $7 + local.get $8 + i32.store + local.get $7 + local.get $9 local.get $4 i32.const 3 i32.shl i32.add i32.store offset=4 local.get $7 + local.get $9 local.get $5 - local.get $4 - i32.sub i32.const 3 i32.shl + i32.add i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 358 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 343 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -19684,19 +17396,33 @@ br_if $break|0 block local.get $1 + i32.load offset=4 local.get $3 + i32.const 3 + i32.shl + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + i32.const 2 + i32.shl + i32.add + i64.load32_s + i64.store local.get $2 + i32.load offset=4 local.get $3 + i32.const 3 + i32.shl + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + i32.const 2 + i32.shl + i32.add + i64.load32_s + i64.store end local.get $3 i32.const 1 @@ -19720,19 +17446,26 @@ i32.eqz br_if $break|1 local.get $1 + i32.load offset=4 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get + i32.const 3 + i32.shl + i32.add + i64.load local.get $0 + i32.load offset=4 i32.const 8 local.get $3 i32.sub - call $~lib/array/Array#__get - i64.extend_i32_s + i32.const 2 + i32.shl + i32.add + i64.load32_s i64.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -19754,186 +17487,124 @@ call $~lib/typedarray/Uint64Array#reverse local.set $4 local.get $4 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load i64.const 8 i64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load offset=8 i64.const 7 i64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load offset=16 i64.const 6 i64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i64.load offset=24 i64.const 5 i64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 359 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 344 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 f32) - (local $10 i32) - (local $11 i32) - (local $12 f32) + (local $7 f32) local.get $0 local.set $1 local.get $1 - i32.load - local.set $2 - local.get $1 i32.load offset=4 - local.set $3 + local.set $2 block $break|0 block i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.set $3 + local.get $1 + call $~lib/typedarray/Float32Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $4 end loop $repeat|0 + local.get $3 local.get $4 - local.get $5 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result f32) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - f32.load offset=8 - end - local.set $9 - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $2 - local.set $8 - local.get $4 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result f32) - local.get $2 - local.set $6 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $6 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - f32.load offset=8 - end - local.set $12 - local.get $3 - local.set $11 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $2 - local.set $11 - local.get $5 - local.set $7 - local.get $9 - local.set $12 - local.get $3 - local.set $8 - local.get $11 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $12 - f32.store offset=8 - end + local.get $2 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $4 + i32.const 2 + i32.shl + i32.add + local.set $6 + local.get $5 + f32.load + local.set $7 + local.get $5 + local.get $6 + f32.load + f32.store + local.get $6 + local.get $7 + f32.store end block - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 - local.get $5 + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -19942,27 +17613,22 @@ end local.get $1 ) - (func $~lib/typedarray/Float32Array#subarray (; 360 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 345 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) local.get $0 local.set $3 local.get $1 local.set $4 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Float32Array#get:length local.set $6 local.get $4 i32.const 0 @@ -20023,36 +17689,45 @@ select local.set $5 end - block $~lib/memory/memory.allocate|inlined.12 (result i32) - i32.const 12 + block $~lib/runtime/REGISTER|inlined.1 (result i32) + block $~lib/runtime/ALLOCATE|inlined.11 (result i32) + i32.const 12 + local.set $7 + local.get $7 + call $~lib/runtime/doAllocate + end local.set $7 local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.12 + i32.const 13 + call $~lib/runtime/doRegister end local.set $7 - local.get $7 local.get $3 i32.load - i32.store - local.get $7 + local.set $8 local.get $3 i32.load offset=4 + local.set $9 + local.get $7 + local.get $8 + i32.store + local.get $7 + local.get $9 local.get $4 i32.const 2 i32.shl i32.add i32.store offset=4 local.get $7 + local.get $9 local.get $5 - local.get $4 - i32.sub i32.const 2 i32.shl + i32.add i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 361 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 346 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -20081,19 +17756,35 @@ br_if $break|0 block local.get $1 + i32.load offset=4 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + f32.store local.get $2 + i32.load offset=4 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + f32.store end local.get $3 i32.const 1 @@ -20117,19 +17808,27 @@ i32.eqz br_if $break|1 local.get $1 + i32.load offset=4 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get + i32.const 2 + i32.shl + i32.add + f32.load local.get $0 + i32.load offset=4 i32.const 8 local.get $3 i32.sub - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load f32.convert_i32_s f32.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -20151,186 +17850,124 @@ call $~lib/typedarray/Float32Array#reverse local.set $4 local.get $4 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f32.load f32.const 8 f32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f32.load offset=4 f32.const 7 f32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f32.load offset=8 f32.const 6 f32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f32.load offset=12 f32.const 5 f32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 362 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 347 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 f64) - (local $10 i32) - (local $11 i32) - (local $12 f64) + (local $7 f64) local.get $0 local.set $1 local.get $1 - i32.load - local.set $2 - local.get $1 i32.load offset=4 - local.set $3 + local.set $2 block $break|0 block i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.11 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.set $3 + local.get $1 + call $~lib/typedarray/Float64Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $4 end loop $repeat|0 + local.get $3 local.get $4 - local.get $5 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.23 (result f64) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - f64.load offset=8 - end - local.set $9 - block $~lib/internal/arraybuffer/STORE|inlined.14 - local.get $2 - local.set $8 - local.get $4 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.24 (result f64) - local.get $2 - local.set $6 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $6 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - f64.load offset=8 - end - local.set $12 - local.get $3 - local.set $11 - local.get $8 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.15 - local.get $2 - local.set $11 - local.get $5 - local.set $7 - local.get $9 - local.set $12 - local.get $3 - local.set $8 - local.get $11 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - local.get $12 - f64.store offset=8 - end + local.get $2 + local.get $3 + i32.const 3 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $4 + i32.const 3 + i32.shl + i32.add + local.set $6 + local.get $5 + f64.load + local.set $7 + local.get $5 + local.get $6 + f64.load + f64.store + local.get $6 + local.get $7 + f64.store end block - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 - local.get $5 + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -20339,7 +17976,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse (; 363 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 348 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -20368,19 +18005,35 @@ br_if $break|0 block local.get $1 + i32.load offset=4 local.get $3 + i32.const 3 + i32.shl + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + f64.store local.get $2 + i32.load offset=4 local.get $3 + i32.const 3 + i32.shl + i32.add local.get $0 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + f64.store end local.get $3 i32.const 1 @@ -20404,19 +18057,27 @@ i32.eqz br_if $break|1 local.get $1 + i32.load offset=4 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get + i32.const 3 + i32.shl + i32.add + f64.load local.get $0 + i32.load offset=4 i32.const 8 local.get $3 i32.sub - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load f64.convert_i32_s f64.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 936 + i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort @@ -20438,63 +18099,63 @@ call $~lib/typedarray/Float64Array#reverse local.set $4 local.get $4 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load f64.const 8 f64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load offset=8 f64.const 7 f64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load offset=16 f64.const 6 f64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end local.get $4 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load offset=24 f64.const 5 f64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1016 + i32.const 16 i32.const 469 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start:std/typedarray (; 364 ;) (type $FUNCSIG$v) + (func $start:std/typedarray (; 349 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32.const 1 @@ -20502,7 +18163,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1 i32.const 0 call $~lib/env/abort @@ -20514,7 +18175,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2 i32.const 0 call $~lib/env/abort @@ -20526,7 +18187,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3 i32.const 0 call $~lib/env/abort @@ -20538,7 +18199,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 4 i32.const 0 call $~lib/env/abort @@ -20550,7 +18211,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 5 i32.const 0 call $~lib/env/abort @@ -20562,7 +18223,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 6 i32.const 0 call $~lib/env/abort @@ -20574,7 +18235,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 7 i32.const 0 call $~lib/env/abort @@ -20586,7 +18247,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 8 i32.const 0 call $~lib/env/abort @@ -20598,7 +18259,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 9 i32.const 0 call $~lib/env/abort @@ -20610,7 +18271,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 10 i32.const 0 call $~lib/env/abort @@ -20622,13 +18283,22 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 11 i32.const 0 call $~lib/env/abort unreachable end - call $start:~lib/allocator/arena + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset i32.const 0 call $std/typedarray/testInstantiate i32.const 5 @@ -20638,51 +18308,45 @@ call $~lib/typedarray/Int32Array#constructor global.set $std/typedarray/arr global.get $std/typedarray/arr - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store global.get $std/typedarray/arr - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 global.get $std/typedarray/arr - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - global.get $std/typedarray/arr - local.set $0 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + i32.store offset=8 + global.get $std/typedarray/arr + call $~lib/typedarray/Int32Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 96 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr - i32.load offset=4 + call $~lib/runtime/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 97 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr - i32.load offset=8 + call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 i32.const 4 i32.mul @@ -20690,49 +18354,49 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 98 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 99 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load offset=4 i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 100 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load offset=8 i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 101 i32.const 0 call $~lib/env/abort @@ -20743,27 +18407,21 @@ i32.const 2 call $~lib/typedarray/Int32Array#subarray global.set $std/typedarray/arr - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - global.get $std/typedarray/arr - local.set $0 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + global.get $std/typedarray/arr + call $~lib/typedarray/Int32Array#get:length i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 104 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr - i32.load offset=4 + call $~lib/runtime/ArrayBufferView#get:byteOffset i32.const 1 i32.const 4 i32.mul @@ -20771,14 +18429,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 105 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr - i32.load offset=8 + call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 1 i32.const 4 i32.mul @@ -20786,21 +18444,21 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 106 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + i32.load i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 107 i32.const 0 call $~lib/env/abort @@ -20811,63 +18469,57 @@ call $~lib/typedarray/Float64Array#constructor global.set $std/typedarray/af64 global.get $std/typedarray/af64 - i32.const 0 + i32.load offset=4 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + f64.store global.get $std/typedarray/af64 - i32.const 1 + i32.load offset=4 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=8 global.get $std/typedarray/af64 - i32.const 2 + i32.load offset=4 f64.const 7 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=16 global.get $std/typedarray/af64 - i32.const 3 + i32.load offset=4 f64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=24 global.get $std/typedarray/af64 - i32.const 4 + i32.load offset=4 f64.const 5 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=32 global.get $std/typedarray/af64 - i32.const 5 + i32.load offset=4 f64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=40 global.get $std/typedarray/af64 - i32.const 6 + i32.load offset=4 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=48 global.get $std/typedarray/af64 - i32.const 7 + i32.load offset=4 f64.const 8 - call $~lib/internal/typedarray/TypedArray#__set + f64.store offset=56 global.get $std/typedarray/af64 i32.const 2 i32.const 6 call $~lib/typedarray/Float64Array#subarray global.set $std/typedarray/af64 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.2 (result i32) - global.get $std/typedarray/af64 - local.set $0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + global.get $std/typedarray/af64 + call $~lib/typedarray/Float64Array#get:length i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 121 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/af64 - i32.load offset=4 + call $~lib/runtime/ArrayBufferView#get:byteOffset i32.const 2 i32.const 8 i32.mul @@ -20875,14 +18527,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 122 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/af64 - i32.load offset=8 + call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 4 i32.const 8 i32.mul @@ -20890,7 +18542,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 123 i32.const 0 call $~lib/env/abort @@ -20905,15 +18557,15 @@ end drop global.get $std/typedarray/af64 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load f64.const 4 f64.eq local.tee $0 if (result i32) global.get $std/typedarray/af64 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load offset=8 f64.const 5 f64.eq else @@ -20922,8 +18574,8 @@ local.tee $0 if (result i32) global.get $std/typedarray/af64 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load offset=16 f64.const 6 f64.eq else @@ -20932,8 +18584,8 @@ local.tee $0 if (result i32) global.get $std/typedarray/af64 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + i32.load offset=4 + f64.load offset=24 f64.const 7 f64.eq else @@ -20942,7 +18594,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 125 i32.const 0 call $~lib/env/abort @@ -20953,60 +18605,93 @@ call $~lib/typedarray/Uint8ClampedArray#constructor global.set $std/typedarray/clampedArr global.get $std/typedarray/clampedArr - i32.const 0 + i32.load offset=4 i32.const -32 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $0 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $0 + i32.sub + i32.const 31 + i32.shr_s + local.get $0 + i32.or + i32.and + i32.store8 global.get $std/typedarray/clampedArr - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + local.tee $0 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $0 + i32.sub + i32.const 31 + i32.shr_s + local.get $0 + i32.or + i32.and + i32.store8 offset=1 global.get $std/typedarray/clampedArr - i32.const 2 + i32.load offset=4 i32.const 256 - call $~lib/typedarray/Uint8ClampedArray#__set - global.get $std/typedarray/clampedArr - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + local.tee $0 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor i32.const 255 + local.get $0 + i32.sub + i32.const 31 + i32.shr_s + local.get $0 + i32.or i32.and + i32.store8 offset=2 + global.get $std/typedarray/clampedArr + i32.load offset=4 + i32.load8_u i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 132 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/clampedArr - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u offset=1 i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 133 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/clampedArr - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.load offset=4 + i32.load8_u offset=2 i32.const 255 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 134 i32.const 0 call $~lib/env/abort @@ -21017,25 +18702,25 @@ call $~lib/typedarray/Int8Array#constructor global.set $std/typedarray/arr8 global.get $std/typedarray/arr8 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 global.get $std/typedarray/arr8 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 global.get $std/typedarray/arr8 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 global.get $std/typedarray/arr8 - i32.const 3 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=3 global.get $std/typedarray/arr8 - i32.const 4 + i32.load offset=4 i32.const 5 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=4 global.get $std/typedarray/arr8 i32.const 1 i32.const 1 @@ -21043,34 +18728,44 @@ call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - i32.const 192 + block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) + i32.const 152 + local.set $0 + local.get $0 + i32.const 15 + i32.const 0 + call $~lib/runtime/doWrapArray + end call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 144 i32.const 0 call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/typedarray/arr8 - i32.const 0 - i32.const 0 - i32.const 0 - call $~lib/typedarray/Int8Array#fill|trampoline - end + global.get $std/typedarray/arr8 + i32.const 0 + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - i32.const 216 + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 168 + local.set $0 + local.get $0 + i32.const 15 + i32.const 0 + call $~lib/runtime/doWrapArray + end call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 147 i32.const 0 call $~lib/env/abort @@ -21083,34 +18778,44 @@ call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - i32.const 240 + block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) + i32.const 184 + local.set $0 + local.get $0 + i32.const 15 + i32.const 0 + call $~lib/runtime/doWrapArray + end call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 150 i32.const 0 call $~lib/env/abort unreachable end - block (result i32) - i32.const 2 - global.set $~lib/argc - global.get $std/typedarray/arr8 - i32.const 2 - i32.const -2 - i32.const 0 - call $~lib/typedarray/Int8Array#fill|trampoline - end + global.get $std/typedarray/arr8 + i32.const 2 + i32.const -2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - i32.const 264 + block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) + i32.const 200 + local.set $0 + local.get $0 + i32.const 15 + i32.const 0 + call $~lib/runtime/doWrapArray + end call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 153 i32.const 0 call $~lib/env/abort @@ -21123,12 +18828,19 @@ call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - i32.const 288 + block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) + i32.const 216 + local.set $0 + local.get $0 + i32.const 15 + i32.const 0 + call $~lib/runtime/doWrapArray + end call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 156 i32.const 0 call $~lib/env/abort @@ -21139,80 +18851,84 @@ i32.const 4 call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/sub8 - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/typedarray/sub8 - i32.const 0 - i32.const 0 - i32.const 0 - call $~lib/typedarray/Int8Array#fill|trampoline - end + global.get $std/typedarray/sub8 + i32.const 0 + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/typedarray/Int8Array#fill drop - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - global.get $std/typedarray/sub8 - local.set $0 - local.get $0 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + global.get $std/typedarray/sub8 + call $~lib/typedarray/Int8Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 160 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/sub8 - i32.load offset=4 + call $~lib/runtime/ArrayBufferView#get:byteOffset i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 161 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/sub8 - i32.load offset=8 + call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 162 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/sub8 - i32.const 312 + block $~lib/runtime/WRAPARRAY|inlined.5 (result i32) + i32.const 232 + local.set $0 + local.get $0 + i32.const 15 + i32.const 0 + call $~lib/runtime/doWrapArray + end call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 163 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr8 - i32.const 336 + block $~lib/runtime/WRAPARRAY|inlined.6 (result i32) + i32.const 248 + local.set $0 + local.get $0 + i32.const 15 + i32.const 0 + call $~lib/runtime/doWrapArray + end call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 164 i32.const 0 call $~lib/env/abort @@ -21223,25 +18939,25 @@ call $~lib/typedarray/Int32Array#constructor global.set $std/typedarray/arr32 global.get $std/typedarray/arr32 - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store global.get $std/typedarray/arr32 - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=4 global.get $std/typedarray/arr32 - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=8 global.get $std/typedarray/arr32 - i32.const 3 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=12 global.get $std/typedarray/arr32 - i32.const 4 + i32.load offset=4 i32.const 5 - call $~lib/internal/typedarray/TypedArray#__set + i32.store offset=16 global.get $std/typedarray/arr32 i32.const 1 i32.const 1 @@ -21249,34 +18965,44 @@ call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - i32.const 376 + block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) + i32.const 264 + local.set $0 + local.get $0 + i32.const 16 + i32.const 2 + call $~lib/runtime/doWrapArray + end call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 174 i32.const 0 call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/typedarray/arr32 - i32.const 0 - i32.const 0 - i32.const 0 - call $~lib/typedarray/Int32Array#fill|trampoline - end + global.get $std/typedarray/arr32 + i32.const 0 + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - i32.const 416 + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 296 + local.set $0 + local.get $0 + i32.const 16 + i32.const 2 + call $~lib/runtime/doWrapArray + end call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 177 i32.const 0 call $~lib/env/abort @@ -21289,34 +19015,44 @@ call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - i32.const 456 + block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) + i32.const 328 + local.set $0 + local.get $0 + i32.const 16 + i32.const 2 + call $~lib/runtime/doWrapArray + end call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 180 i32.const 0 call $~lib/env/abort unreachable end - block (result i32) - i32.const 2 - global.set $~lib/argc - global.get $std/typedarray/arr32 - i32.const 2 - i32.const -2 - i32.const 0 - call $~lib/typedarray/Int32Array#fill|trampoline - end + global.get $std/typedarray/arr32 + i32.const 2 + i32.const -2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - i32.const 496 + block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) + i32.const 360 + local.set $0 + local.get $0 + i32.const 16 + i32.const 2 + call $~lib/runtime/doWrapArray + end call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 183 i32.const 0 call $~lib/env/abort @@ -21329,12 +19065,19 @@ call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - i32.const 536 + block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) + i32.const 392 + local.set $0 + local.get $0 + i32.const 16 + i32.const 2 + call $~lib/runtime/doWrapArray + end call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 186 i32.const 0 call $~lib/env/abort @@ -21345,37 +19088,27 @@ i32.const 4 call $~lib/typedarray/Int32Array#subarray global.set $std/typedarray/sub32 - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/typedarray/sub32 - i32.const 0 - i32.const 0 - i32.const 0 - call $~lib/typedarray/Int32Array#fill|trampoline - end + global.get $std/typedarray/sub32 + i32.const 0 + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/typedarray/Int32Array#fill drop - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - global.get $std/typedarray/sub32 - local.set $0 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + global.get $std/typedarray/sub32 + call $~lib/typedarray/Int32Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 190 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/sub32 - i32.load offset=4 + call $~lib/runtime/ArrayBufferView#get:byteOffset i32.const 1 i32.const 4 i32.mul @@ -21383,14 +19116,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 191 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/sub32 - i32.load offset=8 + call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 i32.const 4 i32.mul @@ -21398,31 +19131,45 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 192 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/sub32 - i32.const 576 + block $~lib/runtime/WRAPARRAY|inlined.5 (result i32) + i32.const 424 + local.set $0 + local.get $0 + i32.const 16 + i32.const 2 + call $~lib/runtime/doWrapArray + end call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 193 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr32 - i32.const 616 + block $~lib/runtime/WRAPARRAY|inlined.6 (result i32) + i32.const 448 + local.set $0 + local.get $0 + i32.const 16 + i32.const 2 + call $~lib/runtime/doWrapArray + end call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 194 i32.const 0 call $~lib/env/abort @@ -21437,92 +19184,82 @@ call $~lib/typedarray/Int8Array#constructor global.set $std/typedarray/multisubarr global.get $std/typedarray/multisubarr - i32.const 0 + i32.load offset=4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 global.get $std/typedarray/multisubarr - i32.const 1 + i32.load offset=4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 global.get $std/typedarray/multisubarr - i32.const 2 + i32.load offset=4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 global.get $std/typedarray/multisubarr - i32.const 3 + i32.load offset=4 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=3 global.get $std/typedarray/multisubarr - i32.const 4 + i32.load offset=4 i32.const 5 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=4 global.get $std/typedarray/multisubarr - i32.const 5 + i32.load offset=4 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=5 global.get $std/typedarray/multisubarr i32.const 1 i32.const 6 call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/multisubarr1 global.get $std/typedarray/multisubarr1 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.load offset=4 + i32.load8_s i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 211 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - global.get $std/typedarray/multisubarr1 - local.set $0 - local.get $0 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + global.get $std/typedarray/multisubarr1 + call $~lib/typedarray/Int8Array#get:length i32.const 5 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 212 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/multisubarr1 - i32.load offset=4 + call $~lib/runtime/ArrayBufferView#get:byteOffset i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 213 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/multisubarr1 - i32.load offset=8 + call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 5 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 214 i32.const 0 call $~lib/env/abort @@ -21534,63 +19271,53 @@ call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/multisubarr2 global.get $std/typedarray/multisubarr2 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.load offset=4 + i32.load8_s i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 217 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - global.get $std/typedarray/multisubarr2 - local.set $0 - local.get $0 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + global.get $std/typedarray/multisubarr2 + call $~lib/typedarray/Int8Array#get:length i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 218 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/multisubarr2 - i32.load offset=4 + call $~lib/runtime/ArrayBufferView#get:byteOffset i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 219 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/multisubarr2 - i32.load offset=8 + call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 220 i32.const 0 call $~lib/env/abort @@ -21602,63 +19329,53 @@ call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/multisubarr3 global.get $std/typedarray/multisubarr3 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.load offset=4 + i32.load8_s i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 223 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - global.get $std/typedarray/multisubarr3 - local.set $0 - local.get $0 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + global.get $std/typedarray/multisubarr3 + call $~lib/typedarray/Int8Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 224 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/multisubarr3 - i32.load offset=4 + call $~lib/runtime/ArrayBufferView#get:byteOffset i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 225 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/multisubarr3 - i32.load offset=8 + call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 226 i32.const 0 call $~lib/env/abort @@ -21753,9 +19470,9 @@ call $std/typedarray/testArrayReverse call $std/typedarray/testArrayReverse ) - (func $start (; 365 ;) (type $FUNCSIG$v) + (func $start (; 350 ;) (type $FUNCSIG$v) call $start:std/typedarray ) - (func $null (; 366 ;) (type $FUNCSIG$v) + (func $null (; 351 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/switch.optimized.wat b/tests/compiler/switch.optimized.wat index 2eb034e32c..3bac6c9cb2 100644 --- a/tests/compiler/switch.optimized.wat +++ b/tests/compiler/switch.optimized.wat @@ -4,7 +4,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\t\00\00\00s\00w\00i\00t\00c\00h\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\12\00\00\00s\00w\00i\00t\00c\00h\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (export "memory" (memory $0)) @@ -68,7 +68,7 @@ call $switch/doSwitch if i32.const 0 - i32.const 8 + i32.const 16 i32.const 10 i32.const 0 call $~lib/env/abort @@ -80,7 +80,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 11 i32.const 0 call $~lib/env/abort @@ -92,7 +92,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 12 i32.const 0 call $~lib/env/abort @@ -104,7 +104,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 13 i32.const 0 call $~lib/env/abort @@ -114,7 +114,7 @@ call $switch/doSwitch if i32.const 0 - i32.const 8 + i32.const 16 i32.const 14 i32.const 0 call $~lib/env/abort @@ -124,7 +124,7 @@ call $switch/doSwitch if i32.const 0 - i32.const 8 + i32.const 16 i32.const 24 i32.const 0 call $~lib/env/abort @@ -136,7 +136,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 25 i32.const 0 call $~lib/env/abort @@ -148,7 +148,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 26 i32.const 0 call $~lib/env/abort @@ -160,7 +160,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 27 i32.const 0 call $~lib/env/abort @@ -170,7 +170,7 @@ call $switch/doSwitch if i32.const 0 - i32.const 8 + i32.const 16 i32.const 28 i32.const 0 call $~lib/env/abort @@ -180,7 +180,7 @@ call $switch/doSwitchDefaultOmitted if i32.const 0 - i32.const 8 + i32.const 16 i32.const 38 i32.const 0 call $~lib/env/abort @@ -192,7 +192,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 39 i32.const 0 call $~lib/env/abort @@ -204,7 +204,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 40 i32.const 0 call $~lib/env/abort @@ -216,7 +216,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 41 i32.const 0 call $~lib/env/abort @@ -226,7 +226,7 @@ call $switch/doSwitchDefaultOmitted if i32.const 0 - i32.const 8 + i32.const 16 i32.const 42 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/switch.untouched.wat b/tests/compiler/switch.untouched.wat index ce046aa220..494c50397d 100644 --- a/tests/compiler/switch.untouched.wat +++ b/tests/compiler/switch.untouched.wat @@ -4,10 +4,10 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\t\00\00\00s\00w\00i\00t\00c\00h\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\12\00\00\00s\00w\00i\00t\00c\00h\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 36)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -176,7 +176,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 10 i32.const 0 call $~lib/env/abort @@ -189,7 +189,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 11 i32.const 0 call $~lib/env/abort @@ -202,7 +202,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 12 i32.const 0 call $~lib/env/abort @@ -215,7 +215,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 13 i32.const 0 call $~lib/env/abort @@ -228,7 +228,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 14 i32.const 0 call $~lib/env/abort @@ -241,7 +241,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 24 i32.const 0 call $~lib/env/abort @@ -254,7 +254,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 25 i32.const 0 call $~lib/env/abort @@ -267,7 +267,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 26 i32.const 0 call $~lib/env/abort @@ -280,7 +280,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 27 i32.const 0 call $~lib/env/abort @@ -293,7 +293,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 28 i32.const 0 call $~lib/env/abort @@ -306,7 +306,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 38 i32.const 0 call $~lib/env/abort @@ -319,7 +319,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 39 i32.const 0 call $~lib/env/abort @@ -332,7 +332,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 40 i32.const 0 call $~lib/env/abort @@ -345,7 +345,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 41 i32.const 0 call $~lib/env/abort @@ -358,7 +358,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 42 i32.const 0 call $~lib/env/abort @@ -371,7 +371,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 51 i32.const 0 call $~lib/env/abort @@ -384,7 +384,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 52 i32.const 0 call $~lib/env/abort @@ -397,7 +397,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 53 i32.const 0 call $~lib/env/abort @@ -410,7 +410,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 62 i32.const 0 call $~lib/env/abort @@ -423,7 +423,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 63 i32.const 0 call $~lib/env/abort @@ -436,7 +436,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 64 i32.const 0 call $~lib/env/abort @@ -449,7 +449,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 73 i32.const 0 call $~lib/env/abort @@ -462,7 +462,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 74 i32.const 0 call $~lib/env/abort @@ -475,7 +475,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 75 i32.const 0 call $~lib/env/abort @@ -488,7 +488,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 84 i32.const 0 call $~lib/env/abort @@ -501,7 +501,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 85 i32.const 0 call $~lib/env/abort @@ -514,7 +514,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 86 i32.const 0 call $~lib/env/abort @@ -527,7 +527,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 92 i32.const 0 call $~lib/env/abort @@ -540,7 +540,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 93 i32.const 0 call $~lib/env/abort @@ -553,7 +553,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 94 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 30cf03a39a..6f28b55620 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\08\00\00\00w\00h\00i\00l\00e\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\10\00\00\00w\00h\00i\00l\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $while/n (mut i32) (i32.const 10)) @@ -31,7 +31,7 @@ global.get $while/n if i32.const 0 - i32.const 8 + i32.const 16 i32.const 8 i32.const 0 call $~lib/env/abort @@ -42,7 +42,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 9 i32.const 0 call $~lib/env/abort @@ -80,7 +80,7 @@ global.get $while/n if i32.const 0 - i32.const 8 + i32.const 16 i32.const 21 i32.const 2 call $~lib/env/abort @@ -91,7 +91,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 22 i32.const 2 call $~lib/env/abort @@ -103,7 +103,7 @@ global.get $while/n if i32.const 0 - i32.const 8 + i32.const 16 i32.const 24 i32.const 0 call $~lib/env/abort @@ -114,7 +114,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 25 i32.const 0 call $~lib/env/abort @@ -125,7 +125,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 26 i32.const 0 call $~lib/env/abort @@ -158,7 +158,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 31 i32.const 0 call $~lib/env/abort @@ -169,7 +169,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 32 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/while.untouched.wat b/tests/compiler/while.untouched.wat index 1b84c40428..68278d4a2b 100644 --- a/tests/compiler/while.untouched.wat +++ b/tests/compiler/while.untouched.wat @@ -3,13 +3,13 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\08\00\00\00w\00h\00i\00l\00e\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\10\00\00\00w\00h\00i\00l\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $while/n (mut i32) (i32.const 10)) (global $while/m (mut i32) (i32.const 0)) (global $while/o (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 28)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -39,7 +39,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 8 i32.const 0 call $~lib/env/abort @@ -51,7 +51,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 9 i32.const 0 call $~lib/env/abort @@ -98,7 +98,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 21 i32.const 2 call $~lib/env/abort @@ -110,7 +110,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 22 i32.const 2 call $~lib/env/abort @@ -127,7 +127,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 24 i32.const 0 call $~lib/env/abort @@ -139,7 +139,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 25 i32.const 0 call $~lib/env/abort @@ -151,7 +151,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 26 i32.const 0 call $~lib/env/abort @@ -193,7 +193,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 31 i32.const 0 call $~lib/env/abort @@ -205,7 +205,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 32 i32.const 0 call $~lib/env/abort From 0c388ca4c6954d14e857d07f400afcaecbb24bfb Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 16 Mar 2019 14:48:22 +0100 Subject: [PATCH 040/119] make std/string test ok again --- src/builtins.ts | 75 +- src/compiler.ts | 28 +- src/diagnostics.ts | 4 +- std/assembly/array.ts | 14 +- std/assembly/runtime.ts | 2 +- std/assembly/string.ts | 18 +- tests/compiler/std/array.ts | 4 +- tests/compiler/std/string.optimized.wat | 3623 ++++++++--------- tests/compiler/std/string.untouched.wat | 4876 +++++++++++------------ 9 files changed, 3897 insertions(+), 4747 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index f7eaefabbb..797655b35a 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -62,11 +62,12 @@ import { Field, Global, DecoratorFlags, - ClassPrototype + ClassPrototype, + Local } from "./program"; import { - FlowFlags + FlowFlags, Flow } from "./flow"; import { @@ -4214,14 +4215,21 @@ export function compileArraySet( valueExpression: Expression, contextualType: Type ): ExpressionRef { + var program = compiler.program; var type = typedArraySymbolToType(target.internalName); - if (type) { - return compileTypedArraySet(compiler, target, type, thisExpression, - elementExpression, valueExpression, contextualType); + if (!type) { + assert(target.prototype == program.arrayPrototype); + type = assert(target.typeArguments)[0]; } - assert(target.prototype == compiler.program.arrayPrototype); - type = assert(target.typeArguments)[0]; - throw new Error("not implemented"); + return compileTypedArraySet( + compiler, + target, + type, + thisExpression, + elementExpression, + valueExpression, + contextualType + ); } function compileTypedArraySet( @@ -4233,7 +4241,6 @@ function compileTypedArraySet( valueExpression: Expression, contextualType: Type ): ExpressionRef { - var type = typedArraySymbolToType(target.internalName); var module = compiler.module; var dataStart = assert(target.lookupInSelf("dataStart")); @@ -4267,16 +4274,22 @@ function compileTypedArraySet( } } + var typeIsManaged = type.is(TypeFlags.REFERENCE); // FIXME: .isManaged var usizeType = compiler.options.usizeType; var nativeSizeType = compiler.options.nativeSizeType; + var thisExpr = compiler.compileExpression( + thisExpression, + target.type, + ConversionKind.IMPLICIT, + WrapMode.NONE + ); + var tempThis: Local | null = null; + if (typeIsManaged) { + tempThis = compiler.currentFlow.getTempLocal(target.type, false); + thisExpr = module.createTeeLocal(tempThis.index, thisExpr); + } var dataStartExpr = module.createLoad(usizeType.byteSize, true, - compiler.compileExpression( - thisExpression, - target.type, - ConversionKind.IMPLICIT, - WrapMode.NONE - ), - nativeSizeType, (dataStart).memoryOffset + thisExpr, nativeSizeType, (dataStart).memoryOffset ); var typeAlignLog2 = type.alignLog2; @@ -4316,10 +4329,33 @@ function compileTypedArraySet( WrapMode.NONE ); - // clamp - if (target.internalName == BuiltinSymbols.Uint8ClampedArray) { + // handle Array: value = LINK(value, this), value + if (typeIsManaged) { + let program = compiler.program; + let linkPrototype = assert(program.linkPrototype); + let linkInstance = compiler.resolver.resolveFunction(linkPrototype, [ type, target.type ]); + if (!linkInstance) return module.createUnreachable(); + let previousFlow = compiler.currentFlow; + let tempValue = previousFlow.getTempLocal(type, false); + let flow = Flow.createInline(previousFlow.parentFunction, linkInstance); + compiler.currentFlow = flow; + flow.addScopedAlias(linkInstance.signature.getParameterName(0), type, tempValue.index); + flow.addScopedAlias(linkInstance.signature.getParameterName(1), target.type, assert(tempThis).index); + let body = compiler.compileFunctionBody(linkInstance); + body.unshift( + module.createSetLocal(tempValue.index, valueExpr) + ); + body.push( + module.createGetLocal(tempValue.index, nativeSizeType) + ); + previousFlow.freeTempLocal(tempValue); + previousFlow.freeTempLocal(tempThis!); tempThis = null; + compiler.currentFlow = previousFlow; + valueExpr = module.createBlock(flow.inlineReturnLabel, body, nativeSizeType); + + // handle Uint8ClampedArray: value = ~(value >> 31) & (((255 - value) >> 31) | value) + } else if (target.internalName == BuiltinSymbols.Uint8ClampedArray) { let tempLocal = compiler.currentFlow.getAndFreeTempLocal(Type.i32, true); - // ~(value >> 31) & (((255 - value) >> 31) | value) valueExpr = module.createBinary(BinaryOp.AndI32, module.createBinary(BinaryOp.XorI32, module.createBinary(BinaryOp.ShrI32, @@ -4340,6 +4376,7 @@ function compileTypedArraySet( ) ); } + assert(!tempThis); var nativeType = type.toNativeType(); diff --git a/src/compiler.ts b/src/compiler.ts index 180f10a060..4e595273bb 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -1065,7 +1065,7 @@ export class Compiler extends DiagnosticEmitter { } /** Compiles the body of a function within the specified flow. */ - private compileFunctionBody(instance: Function): ExpressionRef[] { + compileFunctionBody(instance: Function): ExpressionRef[] { var module = this.module; var bodyNode = assert(instance.prototype.bodyNode); var returnType = instance.signature.returnType; @@ -4689,22 +4689,22 @@ export class Compiler extends DiagnosticEmitter { case ElementKind.CLASS: { let elementExpression = resolver.currentElementExpression; if (elementExpression) { // indexed access + let arrayBufferView = this.program.arrayBufferViewInstance; + if (arrayBufferView) { + if ((target).prototype.extends(arrayBufferView.prototype)) { + return compileArraySet( + this, + target, + assert(this.resolver.currentThisExpression), + elementExpression, + valueExpression, + contextualType + ); + } + } let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); let indexedSet = (target).lookupOverload(OperatorKind.INDEXED_SET, isUnchecked); if (!indexedSet) { - let arrayBufferView = this.program.arrayBufferViewInstance; - if (arrayBufferView) { - if ((target).prototype.extends(arrayBufferView.prototype)) { - return compileArraySet( - this, - target, - assert(this.resolver.currentThisExpression), - elementExpression, - valueExpression, - contextualType - ); - } - } let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); if (!indexedGet) { this.error( diff --git a/src/diagnostics.ts b/src/diagnostics.ts index 9368bf9484..2eff86a322 100644 --- a/src/diagnostics.ts +++ b/src/diagnostics.ts @@ -280,8 +280,8 @@ export abstract class DiagnosticEmitter { var message = DiagnosticMessage.create(code, category, arg0, arg1, arg2).withRange(range); if (relatedRange) message.relatedRange = relatedRange; this.diagnostics.push(message); - // console.log(formatDiagnosticMessage(message, true, true) + "\n"); // temporary - // console.log(new Error("stack").stack); + console.log(formatDiagnosticMessage(message, true, true) + "\n"); // temporary + console.log(new Error("stack").stack); } /** Emits an informatory diagnostic message. */ diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 3d465a1bcd..975065de5b 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -346,12 +346,14 @@ export class Array extends ArrayBufferView { } reverse(): Array { - var base = this.dataStart; - for (let front = 0, back = this.length_ - 1; front < back; ++front, --back) { - let temp = load(base, front); - let dest = base + (back << alignof()); - store(base + (front << alignof()), load(dest)); - store(dest, temp); + var front = this.dataStart; + var back = this.dataEnd - sizeof(); + while (front < back) { + let temp = load(front); + store(front, load(back)); + store(back, temp); + front += sizeof(); + back -= sizeof(); } return this; } diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index c29c02a871..bb8944d755 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -192,7 +192,7 @@ function assertUnregistered(ref: usize): void { /** Asserts that a managed object has already been registered. */ // @ts-ignore: decorator function assertRegistered(ref: usize): void { - assert(ref > HEAP_BASE); // must be a heap object + // may be a static string or buffer (not a heap object) assert(changetype
(ref - HEADER_SIZE).classId != HEADER_MAGIC); } diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 64c02c1eb1..6c242fbc82 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -1,4 +1,4 @@ -import { ALLOCATE, REGISTER, HEADER, HEADER_SIZE } from "./runtime"; +import { ALLOCATE, REGISTER, HEADER, HEADER_SIZE, ArrayBufferView, LINK } from "./runtime"; import { MAX_SIZE_32 } from "./util/allocator"; import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./util/string"; @@ -359,22 +359,20 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut // split by chars length = min(length, limit); let result = new Array(length); - let buffer = unreachable(); // TODO - // let buffer = result.buffer_; + let resultStart = changetype(result).dataStart; for (let i: isize = 0; i < length; ++i) { - let char = ALLOCATE(2); + let charStr = ALLOCATE(2); store( - changetype(char), - load( - changetype(this) + (i << 1) - ) + charStr, + load(changetype(this) + (i << 1)) ); - store(changetype(buffer) + (i << 1), char); + store(resultStart + (i << alignof()), REGISTER(charStr)); + LINK(charStr, result); } return result; } else if (!length) { let result = new Array(1); - unchecked(result[0] = changetype("")); + store(changetype(result).dataStart, ""); // no need to register/link return result; } var result = new Array(); diff --git a/tests/compiler/std/array.ts b/tests/compiler/std/array.ts index 777d62a416..551c369161 100644 --- a/tests/compiler/std/array.ts +++ b/tests/compiler/std/array.ts @@ -1,12 +1,12 @@ import "allocator/arena"; import { Array } from "array"; -import { COMPARATOR } from "internal/sort"; +import { COMPARATOR } from "util/sort"; // Obtains the internal capacity of an array from its backing buffer. function internalCapacity(array: Array): i32 { // the memory region used by the backing buffer might still be larger in that the ArrayBuffer // pre-allocates a power of 2 sized buffer itself and reuses it as long as it isn't exceeded. - var buffer: ArrayBuffer = array.buffer_; + var buffer: ArrayBuffer = array.data; return buffer.byteLength >> alignof(); } diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index b951d9c66c..2a488e58eb 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1,18 +1,19 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$di (func (param i32) (result f64))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) (type $FUNCSIG$iijijiji (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -80,115 +81,114 @@ (data (i32.const 1296) "\01\00\00\00\n\00\00\00c\00d\00e\00f\00g") (data (i32.const 1320) "\01\00\00\00\n\00\00\00d\00e\00f\00g\00h") (data (i32.const 1344) "\01\00\00\00\1a\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m") - (data (i32.const 1384) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1424) "\01\00\00\008\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 1488) "\01\00\00\00\n\00\00\00a\00,\00b\00,\00c") - (data (i32.const 1512) "\01\00\00\00\02\00\00\00.") - (data (i32.const 1528) "\01\00\00\00\02\00\00\00c") - (data (i32.const 1544) "\01\00\00\00\0e\00\00\00a\00,\00 \00b\00,\00 \00c") - (data (i32.const 1568) "\01\00\00\00\04\00\00\00,\00 ") - (data (i32.const 1584) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00,\00c") - (data (i32.const 1608) "\01\00\00\00\0c\00\00\00,\00a\00,\00b\00,\00c") - (data (i32.const 1632) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00c\00,") - (data (i32.const 1656) "\90\01\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 2168) "x\06\00\00d") - (data (i32.const 2176) "\01\00\00\00\02\00\00\008") - (data (i32.const 2192) "\01\00\00\00\n\00\00\00-\001\000\000\000") - (data (i32.const 2216) "\01\00\00\00\08\00\00\001\002\003\004") - (data (i32.const 2232) "\01\00\00\00\n\00\00\001\002\003\004\005") - (data (i32.const 2256) "\01\00\00\00\0c\00\00\001\002\003\004\005\006") - (data (i32.const 2280) "\01\00\00\00\0e\00\00\001\001\001\001\001\001\001") - (data (i32.const 2304) "\01\00\00\00\0e\00\00\001\002\003\004\005\006\007") - (data (i32.const 2328) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\006") - (data (i32.const 2360) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\007") - (data (i32.const 2392) "\01\00\00\00\16\00\00\00-\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 2424) "\01\00\00\00\04\00\00\00-\001") - (data (i32.const 2440) "\01\00\00\00\08\00\00\001\000\000\000") - (data (i32.const 2456) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 2488) "\01\00\00\00\14\00\00\004\002\009\004\009\006\007\002\009\005") - (data (i32.const 2520) "\01\00\00\00\10\00\00\009\009\009\009\009\009\009\009") - (data (i32.const 2544) "\01\00\00\00\12\00\00\001\000\000\000\000\000\000\000\000") - (data (i32.const 2576) "\01\00\00\00\16\00\00\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2608) "\01\00\00\00\18\00\00\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2640) "\01\00\00\00\1e\00\00\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2680) "\01\00\00\00 \00\00\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2720) "\01\00\00\00\"\00\00\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2768) "\01\00\00\00(\00\00\001\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005") - (data (i32.const 2816) "\01\00\00\00\n\00\00\00-\001\002\003\004") - (data (i32.const 2840) "\01\00\00\00\16\00\00\00-\004\002\009\004\009\006\007\002\009\005") - (data (i32.const 2872) "\01\00\00\00\18\00\00\00-\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2904) "\01\00\00\00\1a\00\00\00-\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2944) "\01\00\00\00 \00\00\00-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2984) "\01\00\00\00$\00\00\00-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3032) "\01\00\00\00&\00\00\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007") - (data (i32.const 3080) "\01\00\00\00(\00\00\00-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008") - (data (i32.const 3128) "\01\00\00\00\06\00\00\000\00.\000") - (data (i32.const 3144) "\01\00\00\00\06\00\00\00N\00a\00N") - (data (i32.const 3160) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3192) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3216) "\b8\02\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8 (; 20 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/util/string/parse (; 19 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2551,7 +2304,7 @@ local.get $5 f64.mul ) - (func $~lib/string/parseFloat (; 21 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 20 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2663,7 +2416,7 @@ if i32.const 0 i32.const 96 - i32.const 591 + i32.const 569 i32.const 10 call $~lib/env/abort unreachable @@ -2722,7 +2475,7 @@ local.get $4 f64.mul ) - (func $~lib/string/String#concat (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2731,7 +2484,7 @@ if i32.const 0 i32.const 96 - i32.const 97 + i32.const 65 i32.const 4 call $~lib/env/abort unreachable @@ -2766,24 +2519,22 @@ return end local.get $2 - call $~lib/runtime/ALLOC + call $~lib/runtime/doAllocate local.tee $2 local.get $0 local.get $3 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $2 local.get $3 i32.add local.get $1 local.get $4 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $2 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $2 + call $~lib/runtime/doRegister ) - (func $~lib/string/String.concat (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.concat (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 240 local.get $0 @@ -2791,13 +2542,13 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.ne (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.ne (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.eq i32.eqz ) - (func $~lib/string/String.gt (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gt (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block (result i32) @@ -2858,11 +2609,11 @@ local.get $3 i32.lt_s select - call $~lib/string/compareImpl + call $~lib/util/string/compareImpl i32.const 0 i32.gt_s ) - (func $~lib/string/String.lt (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.lt (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block (result i32) @@ -2923,23 +2674,23 @@ local.get $3 i32.lt_s select - call $~lib/string/compareImpl + call $~lib/util/string/compareImpl i32.const 0 i32.lt_s ) - (func $~lib/string/String.gte (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gte (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.lt i32.eqz ) - (func $~lib/string/String.lte (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.lte (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 312 local.get $0 call $~lib/string/String.gt i32.eqz ) - (func $~lib/string/String#repeat (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2947,7 +2698,7 @@ if i32.const 0 i32.const 96 - i32.const 349 + i32.const 324 i32.const 4 call $~lib/env/abort unreachable @@ -2977,7 +2728,7 @@ if i32.const 0 i32.const 96 - i32.const 354 + i32.const 329 i32.const 6 call $~lib/env/abort unreachable @@ -3007,21 +2758,19 @@ i32.mul i32.const 1 i32.shl - call $~lib/runtime/ALLOC + call $~lib/runtime/doAllocate local.tee $2 local.get $0 local.get $3 i32.const 1 i32.shl local.get $1 - call $~lib/runtime/memory.repeat + call $~lib/memory/memory.repeat local.get $2 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $2 + call $~lib/runtime/doRegister ) - (func $~lib/string/String#slice (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3087,244 +2836,527 @@ local.get $3 i32.const 1 i32.shl - local.tee $1 - call $~lib/runtime/ALLOC local.tee $2 + call $~lib/runtime/doAllocate + local.tee $1 local.get $4 i32.const 1 i32.shl local.get $0 i32.add - local.get $1 - call $~lib/internal/memory/memmove local.get $2 - call $~lib/runtime/unref + call $~lib/memory/memory.copy + local.get $1 i32.const 1 - i32.store - local.get $2 + call $~lib/runtime/doRegister ) - (func $~lib/string/String#slice|trampoline (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/memory/memory.fill (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 2147483647 - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/string/String#slice - ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.gt_u - if + 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.const 1432 - i32.const 26 + 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 - call $~lib/env/abort - unreachable - end - i32.const 1 - i32.const 32 - local.get $0 - i32.const 7 - i32.add - i32.clz - i32.sub - i32.shl - call $~lib/allocator/arena/memory.allocate - local.tee $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/array/Array#constructor (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 268435454 - i32.gt_u - if + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 1 + i32.add i32.const 0 - i32.const 1392 - i32.const 45 - i32.const 39 + 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/arraybuffer/ArrayBuffer#constructor (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 1073741816 + i32.gt_u + if + i32.const 0 + i32.const 1392 + i32.const 24 + i32.const 43 call $~lib/env/abort unreachable end local.get $0 + call $~lib/runtime/doAllocate + local.tee $1 + local.get $0 + call $~lib/memory/memory.fill + local.get $1 + i32.const 2 + call $~lib/runtime/doRegister + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $1 + i32.const 268435454 + i32.gt_u + if + i32.const 0 + i32.const 136 + i32.const 223 + i32.const 57 + call $~lib/env/abort + unreachable + end + local.get $1 i32.const 2 i32.shl - local.tee $3 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $2 - i32.const 8 - call $~lib/allocator/arena/memory.allocate local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $2 + local.get $0 + i32.eqz + if + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 3 + call $~lib/runtime/doRegister + local.set $0 + end + local.get $0 i32.const 0 i32.store - local.get $1 + local.get $0 i32.const 0 i32.store offset=4 - local.get $1 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 local.get $2 i32.store - local.get $1 local.get $0 + local.get $2 i32.store offset=4 + local.get $0 + local.get $1 local.get $2 - i32.const 8 i32.add + i32.store offset=8 + local.get $0 + ) + (func $~lib/array/Array#constructor (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 4 + call $~lib/runtime/doRegister + local.get $0 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + local.get $0 + i32.store offset=12 + local.get $1 + ) + (func $~lib/runtime/doReallocate (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.const 8 + i32.sub + local.tee $3 + i32.load offset=4 + local.tee $2 + local.get $1 + i32.lt_u + if + i32.const 1 + i32.const 32 + local.get $2 + i32.const 7 + i32.add + i32.clz + i32.sub + i32.shl + i32.const 0 + local.get $0 + i32.const 5544 + i32.gt_u + select + i32.const 1 + i32.const 32 + local.get $1 + i32.const 7 + i32.add + i32.clz + i32.sub + i32.shl + local.tee $4 + i32.lt_u + if + local.get $4 + call $~lib/memory/memory.allocate + local.tee $4 + local.get $3 + i32.load + i32.store + local.get $4 + i32.const 8 + i32.add + local.tee $5 + local.get $0 + local.get $2 + call $~lib/memory/memory.copy + local.get $2 + local.get $5 + i32.add + local.get $1 + local.get $2 + i32.sub + call $~lib/memory/memory.fill + local.get $3 + i32.load + i32.const -1520547049 + i32.eq + if + local.get $0 + i32.const 5544 + i32.le_u + if + i32.const 0 + i32.const 136 + i32.const 100 + i32.const 8 + call $~lib/env/abort + unreachable + end + end + local.get $4 + local.set $3 + local.get $5 + local.set $0 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.sub + call $~lib/memory/memory.fill + end + end local.get $3 - call $~lib/internal/memory/memset local.get $1 + i32.store offset=4 + local.get $0 ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#resize (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 local.get $0 i32.load local.tee $2 - i32.gt_s + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 2 + i32.shr_u + i32.gt_u if local.get $1 - i32.const 1073741816 - i32.gt_s + i32.const 268435454 + i32.gt_u if i32.const 0 - i32.const 1432 - i32.const 40 - i32.const 4 + i32.const 1440 + i32.const 37 + i32.const 41 call $~lib/env/abort unreachable end - local.get $1 - i32.const 1 - i32.const 32 local.get $2 - i32.const 7 - i32.add - i32.clz - i32.sub + local.tee $3 + local.get $1 + i32.const 2 i32.shl - i32.const 8 - i32.sub - i32.le_s + local.tee $2 + call $~lib/runtime/doReallocate + local.tee $1 + local.get $3 + i32.ne if local.get $0 local.get $1 i32.store - else - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $3 - i32.const 8 - i32.add local.get $0 - i32.const 8 - i32.add - local.get $2 - call $~lib/internal/memory/memmove - local.get $3 - local.set $0 - end - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.sub - call $~lib/internal/memory/memset - else - local.get $1 - local.get $2 - i32.lt_s - if local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 0 - i32.const 1432 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable - end + i32.store offset=4 local.get $0 local.get $1 - i32.store + local.get $2 + i32.add + i32.store offset=8 end end - local.get $0 ) - (func $~lib/array/Array#push (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/array/Array#__set (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 - i32.load offset=4 - local.tee $2 i32.const 1 - i32.add - local.set $4 - local.get $2 + call $~lib/array/Array#resize local.get $0 - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u - i32.ge_u + i32.load offset=4 + local.get $1 + i32.store + i32.const 0 + local.get $0 + i32.load offset=12 + i32.ge_s if - local.get $2 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 1392 - i32.const 182 - i32.const 42 - call $~lib/env/abort - unreachable - end local.get $0 - local.get $3 - local.get $4 + i32.const 1 + i32.store offset=12 + end + ) + (func $~lib/runtime/assertRegistered (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 8 + i32.sub + i32.load + i32.const -1520547049 + i32.eq + if + i32.const 0 + i32.const 136 + i32.const 196 i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.tee $3 - i32.store + call $~lib/env/abort + unreachable end + ) + (func $~lib/runtime/doLink (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 - local.get $4 - i32.store offset=4 + call $~lib/runtime/assertRegistered + local.get $1 + call $~lib/runtime/assertRegistered + ) + (func $~lib/array/Array#push (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $0 + i32.load offset=12 + i32.const 1 + i32.add + local.tee $2 + call $~lib/array/Array#resize + local.get $0 + local.get $2 + i32.store offset=12 + local.get $0 + i32.load offset=4 local.get $2 + i32.const 1 + i32.sub i32.const 2 i32.shl - local.get $3 i32.add local.get $1 - i32.store offset=8 + i32.store ) - (func $~lib/string/String#split (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3338,7 +3370,7 @@ if i32.const 0 i32.const 96 - i32.const 376 + i32.const 351 i32.const 4 call $~lib/env/abort unreachable @@ -3356,9 +3388,8 @@ i32.const 1 call $~lib/array/Array#constructor local.tee $3 - i32.load local.get $0 - i32.store offset=8 + call $~lib/array/Array#__set local.get $3 return end @@ -3368,7 +3399,7 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 + local.set $6 i32.const 2147483647 local.get $2 local.get $2 @@ -3384,210 +3415,187 @@ i32.shr_u local.tee $3 local.set $9 - block $folding-inner0 - local.get $3 + local.get $3 + if + local.get $6 + i32.eqz if - local.get $4 - i32.eqz - if - i32.const 1 - call $~lib/array/Array#constructor - local.tee $3 - i32.load - i32.const 312 - i32.store offset=8 - br $folding-inner0 - end - else - local.get $4 - i32.eqz - if - i32.const 0 - call $~lib/array/Array#constructor - return - end - local.get $4 - local.tee $3 - local.get $2 - local.get $3 - local.get $2 - i32.lt_s - select - local.tee $4 + i32.const 1 call $~lib/array/Array#constructor - local.tee $3 - i32.load - local.set $7 + local.tee $5 + i32.load offset=4 + i32.const 312 + i32.store + local.get $5 + return + end + else + local.get $6 + i32.eqz + if i32.const 0 - local.set $2 - loop $repeat|0 - local.get $2 - local.get $4 - i32.lt_s - if - i32.const 2 - call $~lib/runtime/ALLOC - local.tee $1 - local.get $2 - i32.const 1 - i32.shl - local.get $0 - i32.add - i32.load16_u - i32.store16 - local.get $2 - i32.const 2 - i32.shl - local.get $7 - i32.add - local.get $1 - i32.store offset=8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $repeat|0 - end - end - local.get $3 + call $~lib/array/Array#constructor return end - i32.const 0 + local.get $6 + local.tee $3 + local.get $2 + local.get $3 + local.get $2 + i32.lt_s + select + local.tee $6 call $~lib/array/Array#constructor + local.tee $3 + i32.load offset=4 local.set $5 - loop $continue|1 - local.get $0 - local.get $1 + loop $repeat|0 + local.get $4 local.get $6 - call $~lib/string/String#indexOf - local.tee $8 - i32.const -1 - i32.ne + i32.lt_s if - local.get $8 - local.get $6 - i32.sub - local.tee $7 - i32.const 0 - i32.gt_s - if - local.get $7 - i32.const 1 - i32.shl - local.tee $7 - call $~lib/runtime/ALLOC - local.tee $3 - local.get $6 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $7 - call $~lib/internal/memory/memmove - local.get $3 - call $~lib/runtime/unref - i32.const 1 - i32.store - local.get $5 - local.get $3 - call $~lib/array/Array#push - else - local.get $5 - i32.const 312 - call $~lib/array/Array#push - end - local.get $10 + i32.const 2 + call $~lib/runtime/doAllocate + local.tee $1 + local.get $4 i32.const 1 + i32.shl + local.get $0 + i32.add + i32.load16_u + i32.store16 + local.get $4 + i32.const 2 + i32.shl + local.get $5 i32.add - local.tee $10 - local.get $2 - i32.eq - if - local.get $5 - return - end - local.get $8 - local.get $9 + local.get $1 + i32.const 1 + call $~lib/runtime/doRegister + i32.store + local.get $1 + local.get $3 + call $~lib/runtime/doLink + local.get $4 + i32.const 1 i32.add - local.set $6 - br $continue|1 + local.set $4 + br $repeat|0 end end - local.get $6 - i32.eqz - if - i32.const 1 - call $~lib/array/Array#constructor - local.tee $3 - i32.load - local.get $0 - i32.store offset=8 - br $folding-inner0 - end + local.get $3 + return + end + i32.const 0 + call $~lib/array/Array#constructor + local.set $7 + loop $continue|1 + local.get $0 + local.get $1 local.get $4 - local.get $6 - i32.sub - local.tee $1 - i32.const 0 - i32.gt_s + call $~lib/string/String#indexOf + local.tee $8 + i32.const -1 + i32.ne if - local.get $1 - i32.const 1 - i32.shl - local.tee $1 - call $~lib/runtime/ALLOC - local.tee $3 - local.get $6 + local.get $8 + local.get $4 + i32.sub + local.tee $5 + i32.const 0 + i32.gt_s + if + local.get $5 + i32.const 1 + i32.shl + local.tee $5 + call $~lib/runtime/doAllocate + local.tee $3 + local.get $4 + i32.const 1 + i32.shl + local.get $0 + i32.add + local.get $5 + call $~lib/memory/memory.copy + local.get $7 + local.get $3 + i32.const 1 + call $~lib/runtime/doRegister + call $~lib/array/Array#push + else + local.get $7 + i32.const 312 + call $~lib/array/Array#push + end + local.get $10 i32.const 1 - i32.shl - local.get $0 i32.add - local.get $1 - call $~lib/internal/memory/memmove - local.get $3 - call $~lib/runtime/unref - i32.const 1 - i32.store - local.get $5 - local.get $3 - call $~lib/array/Array#push - else - local.get $5 - i32.const 312 - call $~lib/array/Array#push + local.tee $10 + local.get $2 + i32.eq + if + local.get $7 + return + end + local.get $8 + local.get $9 + i32.add + local.set $4 + br $continue|1 end - local.get $5 + end + local.get $4 + i32.eqz + if + i32.const 1 + call $~lib/array/Array#constructor + local.tee $3 + i32.load offset=4 + local.set $1 + local.get $0 + local.tee $4 + local.get $3 + call $~lib/runtime/doLink + local.get $1 + local.get $4 + i32.store + local.get $3 return end - local.get $3 - i32.load - i32.load offset=8 - drop - local.get $3 - ) - (func $~lib/string/String#split|trampoline (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $1 - end - i32.const 2147483647 - local.set $2 + local.get $6 + local.get $4 + i32.sub + local.tee $1 + i32.const 0 + i32.gt_s + if + local.get $1 + i32.const 1 + i32.shl + local.tee $1 + call $~lib/runtime/doAllocate + local.tee $5 + local.get $4 + i32.const 1 + i32.shl + local.get $0 + i32.add + local.get $1 + call $~lib/memory/memory.copy + local.get $7 + local.get $5 + i32.const 1 + call $~lib/runtime/doRegister + call $~lib/array/Array#push + else + local.get $7 + i32.const 312 + call $~lib/array/Array#push end - local.get $0 - local.get $1 - local.get $2 - call $~lib/string/String#split + local.get $7 ) - (func $~lib/internal/number/decimalCount32 (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -3641,10 +3649,10 @@ end end ) - (func $~lib/internal/number/utoa32_lut (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - i32.const 2168 + i32.const 2060 i32.load local.set $3 loop $continue|0 @@ -3668,22 +3676,22 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $4 i32.const 100 i32.div_u i32.const 2 i32.shl - i32.add - i64.load32_u offset=8 local.get $3 + i32.add + i64.load32_u local.get $4 i32.const 100 i32.rem_u i32.const 2 i32.shl + local.get $3 i32.add - i64.load32_u offset=8 + i64.load32_u i64.const 32 i64.shl i64.or @@ -3711,12 +3719,12 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $4 i32.const 2 i32.shl + local.get $3 i32.add - i32.load offset=8 + i32.load i32.store end local.get $1 @@ -3730,12 +3738,12 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $1 i32.const 2 i32.shl + local.get $3 i32.add - i32.load offset=8 + i32.load i32.store else local.get $2 @@ -3751,7 +3759,7 @@ i32.store16 end ) - (func $~lib/internal/number/itoa32 (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3764,7 +3772,7 @@ local.get $0 i32.const 0 i32.lt_s - local.tee $2 + local.tee $1 if i32.const 0 local.get $0 @@ -3772,30 +3780,28 @@ local.set $0 end local.get $0 - call $~lib/internal/number/decimalCount32 - local.get $2 + call $~lib/util/number/decimalCount32 + local.get $1 i32.add local.tee $3 i32.const 1 i32.shl - call $~lib/runtime/ALLOC - local.tee $1 + call $~lib/runtime/doAllocate + local.tee $2 local.get $0 local.get $3 - call $~lib/internal/number/utoa32_lut - local.get $2 + call $~lib/util/number/utoa32_lut + local.get $1 if - local.get $1 + local.get $2 i32.const 45 i32.store16 end - local.get $1 - call $~lib/runtime/unref + local.get $2 i32.const 1 - i32.store - local.get $1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/utoa32 (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3805,22 +3811,20 @@ return end local.get $0 - call $~lib/internal/number/decimalCount32 - local.tee $2 + call $~lib/util/number/decimalCount32 + local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/ALLOC - local.tee $1 + call $~lib/runtime/doAllocate + local.tee $2 local.get $0 - local.get $2 - call $~lib/internal/number/utoa32_lut local.get $1 - call $~lib/runtime/unref + call $~lib/util/number/utoa32_lut + local.get $2 i32.const 1 - i32.store - local.get $1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/decimalCount64 (; 42 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -3874,12 +3878,12 @@ end end ) - (func $~lib/internal/number/utoa64_lut (; 43 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 46 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 2168 + i32.const 2060 i32.load local.set $3 loop $continue|0 @@ -3915,7 +3919,6 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $4 i32.const 10000 i32.rem_u @@ -3924,16 +3927,17 @@ i32.div_u i32.const 2 i32.shl - i32.add - i64.load32_u offset=8 local.get $3 + i32.add + i64.load32_u local.get $4 i32.const 100 i32.rem_u i32.const 2 i32.shl + local.get $3 i32.add - i64.load32_u offset=8 + i64.load32_u i64.const 32 i64.shl i64.or @@ -3946,18 +3950,18 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $6 i32.const 2 i32.shl - i32.add - i64.load32_u offset=8 local.get $3 + i32.add + i64.load32_u local.get $5 i32.const 2 i32.shl + local.get $3 i32.add - i64.load32_u offset=8 + i64.load32_u i64.const 32 i64.shl i64.or @@ -3969,9 +3973,9 @@ local.get $1 i32.wrap_i64 local.get $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut ) - (func $~lib/internal/number/utoa64 (; 44 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 47 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3988,35 +3992,32 @@ local.get $0 i32.wrap_i64 local.tee $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/ALLOC + call $~lib/runtime/doAllocate local.tee $2 local.get $3 local.get $1 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/ALLOC + call $~lib/runtime/doAllocate local.tee $2 local.get $0 local.get $1 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end local.get $2 - local.tee $1 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/itoa64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 48 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4031,7 +4032,7 @@ local.get $0 i64.const 0 i64.lt_s - local.tee $2 + local.tee $1 if i64.const 0 local.get $0 @@ -4046,45 +4047,42 @@ local.get $0 i32.wrap_i64 local.tee $4 - call $~lib/internal/number/decimalCount32 - local.get $2 + call $~lib/util/number/decimalCount32 + local.get $1 i32.add - local.tee $1 + local.tee $2 i32.const 1 i32.shl - call $~lib/runtime/ALLOC + call $~lib/runtime/doAllocate local.tee $3 local.get $4 - local.get $1 - call $~lib/internal/number/utoa32_lut + local.get $2 + call $~lib/util/number/utoa32_lut else local.get $0 - call $~lib/internal/number/decimalCount64 - local.get $2 + call $~lib/util/number/decimalCount64 + local.get $1 i32.add - local.tee $1 + local.tee $2 i32.const 1 i32.shl - call $~lib/runtime/ALLOC + call $~lib/runtime/doAllocate local.tee $3 local.get $0 - local.get $1 - call $~lib/internal/number/utoa64_lut + local.get $2 + call $~lib/util/number/utoa64_lut end - local.get $2 + local.get $1 if local.get $3 i32.const 45 i32.store16 end local.get $3 - local.tee $1 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/genDigits (; 46 ;) (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 (; 49 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -4117,9 +4115,9 @@ i64.shr_u i32.wrap_i64 local.tee $7 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $8 - i32.const 4576 + i32.const 4108 i32.load local.set $12 loop $continue|0 @@ -4283,20 +4281,20 @@ local.get $5 i64.le_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $8 i32.add - global.set $~lib/internal/number/_K + global.set $~lib/util/number/_K local.get $5 local.set $9 local.get $3 local.set $1 - local.get $12 local.get $8 i32.const 2 i32.shl + local.get $12 i32.add - i64.load32_u offset=8 + i64.load32_u local.get $10 i64.extend_i32_s i64.shl @@ -4304,16 +4302,15 @@ local.get $11 local.set $5 local.get $6 - local.tee $7 i32.const 1 i32.sub i32.const 1 i32.shl local.get $0 i32.add - local.tee $2 + local.tee $4 i32.load16_u - local.set $6 + local.set $7 loop $continue|2 local.get $1 local.get $5 @@ -4351,10 +4348,10 @@ end local.get $0 if - local.get $6 + local.get $7 i32.const 1 i32.sub - local.set $6 + local.set $7 local.get $1 local.get $3 i64.add @@ -4362,10 +4359,10 @@ br $continue|2 end end - local.get $2 - local.get $6 - i32.store16 + local.get $4 local.get $7 + i32.store16 + local.get $6 return end br $continue|0 @@ -4419,26 +4416,27 @@ local.get $5 i64.ge_u br_if $continue|3 - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $8 i32.add - global.set $~lib/internal/number/_K + global.set $~lib/util/number/_K local.get $1 local.set $3 local.get $9 local.set $1 - local.get $12 i32.const 0 local.get $8 i32.sub i32.const 2 i32.shl + local.get $12 i32.add - i64.load32_u offset=8 + i64.load32_u local.get $11 i64.mul local.set $9 local.get $6 + local.tee $7 i32.const 1 i32.sub i32.const 1 @@ -4447,7 +4445,7 @@ i32.add local.tee $4 i32.load16_u - local.set $7 + local.set $6 loop $continue|4 local.get $3 local.get $9 @@ -4485,10 +4483,10 @@ end local.get $2 if - local.get $7 + local.get $6 i32.const 1 i32.sub - local.set $7 + local.set $6 local.get $1 local.get $3 i64.add @@ -4497,12 +4495,12 @@ end end local.get $4 - local.get $7 - i32.store16 local.get $6 + i32.store16 + local.get $7 end ) - (func $~lib/internal/number/prettify (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4594,12 +4592,8 @@ i32.sub i32.const 1 i32.shl - call $~lib/internal/memory/memmove - local.get $3 - i32.const 1 - i32.shl - local.get $0 - i32.add + call $~lib/memory/memory.copy + local.get $4 i32.const 46 i32.store16 local.get $1 @@ -4630,7 +4624,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $0 i32.const 3014704 i32.store @@ -4688,11 +4682,11 @@ local.get $3 end local.get $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.tee $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $4 i32.const 45 i32.const 43 @@ -4715,7 +4709,7 @@ local.tee $2 i32.const 2 i32.sub - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $0 i32.const 46 i32.store16 offset=2 @@ -4728,7 +4722,7 @@ local.get $0 i32.const 4 i32.add - local.tee $4 + local.tee $0 block (result i32) local.get $3 i32.const 1 @@ -4736,7 +4730,7 @@ local.tee $3 i32.const 0 i32.lt_s - local.tee $0 + local.tee $4 if i32.const 0 local.get $3 @@ -4746,15 +4740,15 @@ local.get $3 end local.get $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.tee $2 - call $~lib/internal/number/utoa32_lut - local.get $4 + call $~lib/util/number/utoa32_lut + local.get $0 i32.const 45 i32.const 43 - local.get $0 + local.get $4 select i32.store16 local.get $1 @@ -4767,21 +4761,20 @@ end end ) - (func $~lib/internal/number/dtoa_core (; 48 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) - (local $2 i64) + (func $~lib/util/number/dtoa_core (; 51 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) (local $3 i64) (local $4 i64) - (local $5 i32) - (local $6 i32) + (local $5 i64) + (local $6 i64) (local $7 i32) - (local $8 i64) + (local $8 i32) (local $9 i64) (local $10 i64) (local $11 i64) (local $12 i32) (local $13 i64) - (local $14 i32) - (local $15 i64) + (local $14 i64) local.get $1 f64.const 0 f64.lt @@ -4802,68 +4795,68 @@ i64.const 52 i64.shr_u i32.wrap_i64 - local.set $6 + local.set $7 local.get $3 i64.const 4503599627370495 i64.and - local.get $6 + local.get $7 i32.const 0 i32.ne - local.tee $7 + local.tee $8 i64.extend_i32_u i64.const 52 i64.shl i64.add - local.tee $4 + local.tee $3 i64.const 1 i64.shl i64.const 1 i64.add - local.tee $3 + local.tee $5 i64.clz i32.wrap_i64 - local.set $5 - local.get $3 + local.set $2 local.get $5 + local.get $2 i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_plus - local.get $6 - i32.const 1 + global.set $~lib/util/number/_frc_plus local.get $7 + i32.const 1 + local.get $8 select i32.const 1075 i32.sub - local.tee $6 + local.tee $7 i32.const 1 i32.sub - local.get $5 + local.get $2 i32.sub - local.set $5 - local.get $4 - local.get $4 + local.set $2 + local.get $3 + local.get $3 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $7 + local.tee $8 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $6 local.get $7 + local.get $8 i32.sub - local.get $5 + local.get $2 i32.sub i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_minus - local.get $5 - global.set $~lib/internal/number/_exp + global.set $~lib/util/number/_frc_minus + local.get $2 + global.set $~lib/util/number/_exp i32.const 348 i32.const -61 - global.get $~lib/internal/number/_exp + global.get $~lib/util/number/_exp i32.sub f64.convert_i32_s f64.const 0.30102999566398114 @@ -4872,8 +4865,8 @@ f64.add local.tee $1 i32.trunc_f64_s - local.tee $5 - local.get $5 + local.tee $2 + local.get $2 f64.convert_i32_s local.get $1 f64.ne @@ -4882,63 +4875,61 @@ i32.shr_s i32.const 1 i32.add - local.tee $5 + local.tee $2 i32.const 3 i32.shl - local.tee $14 + local.tee $8 i32.sub - global.set $~lib/internal/number/_K - i32.const 4504 + global.set $~lib/util/number/_K + i32.const 3828 i32.load - local.set $7 - i32.const 4240 - i32.load - local.get $14 + local.get $8 i32.add - i64.load offset=8 - global.set $~lib/internal/number/_frc_pow - local.get $7 - local.get $5 + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 4036 + i32.load + local.get $2 i32.const 1 i32.shl i32.add - i32.load16_s offset=8 - global.set $~lib/internal/number/_exp_pow - local.get $4 - local.get $4 + i32.load16_s + global.set $~lib/util/number/_exp_pow + local.get $3 + local.get $3 i64.clz i32.wrap_i64 - local.tee $7 + local.tee $2 i64.extend_i32_s i64.shl - local.tee $4 + local.tee $3 i64.const 4294967295 i64.and local.tee $9 - global.get $~lib/internal/number/_frc_pow - local.tee $3 + global.get $~lib/util/number/_frc_pow + local.tee $5 i64.const 4294967295 i64.and local.tee $10 i64.mul - local.set $13 - local.get $3 + local.set $4 + local.get $5 i64.const 32 i64.shr_u - local.tee $8 + local.tee $11 local.get $9 i64.mul - local.get $4 + local.get $3 i64.const 32 i64.shr_u - local.tee $11 + local.tee $6 local.get $10 i64.mul - local.get $13 + local.get $4 i64.const 32 i64.shr_u i64.add - local.tee $2 + local.tee $4 i64.const 4294967295 i64.and i64.add @@ -4946,43 +4937,43 @@ i64.add i64.const 32 i64.shr_u - local.get $8 + local.get $6 local.get $11 i64.mul - local.get $2 + local.get $4 i64.const 32 i64.shr_u i64.add i64.add - local.set $15 - local.get $3 + local.set $14 + local.get $5 i64.const 4294967295 i64.and - local.tee $11 - global.get $~lib/internal/number/_frc_plus - local.tee $2 + local.tee $6 + global.get $~lib/util/number/_frc_plus + local.tee $4 i64.const 4294967295 i64.and - local.tee $8 + local.tee $11 i64.mul - local.set $4 - local.get $8 - local.get $3 + local.set $3 + local.get $11 + local.get $5 i64.const 32 i64.shr_u local.tee $9 i64.mul - local.get $11 - local.get $2 + local.get $6 + local.get $4 i64.const 32 i64.shr_u local.tee $10 i64.mul - local.get $4 + local.get $3 i64.const 32 i64.shr_u i64.add - local.tee $2 + local.tee $13 i64.const 4294967295 i64.and i64.add @@ -4993,45 +4984,45 @@ local.get $9 local.get $10 i64.mul - local.get $2 + local.get $13 i64.const 32 i64.shr_u i64.add i64.add - local.set $8 - global.get $~lib/internal/number/_frc_minus - local.tee $2 + local.set $6 + global.get $~lib/util/number/_frc_minus + local.tee $13 i64.const 4294967295 i64.and local.tee $9 - local.get $3 - local.tee $4 + local.get $5 + local.tee $3 i64.const 4294967295 i64.and local.tee $10 i64.mul - local.set $13 - local.get $8 + local.set $4 + local.get $6 i64.const 1 i64.sub - local.tee $3 - local.get $4 + local.tee $5 + local.get $3 i64.const 32 i64.shr_u - local.tee $8 + local.tee $11 local.get $9 i64.mul - local.get $2 + local.get $13 i64.const 32 i64.shr_u - local.tee $11 + local.tee $6 local.get $10 i64.mul - local.get $13 + local.get $4 i64.const 32 i64.shr_u i64.add - local.tee $2 + local.tee $4 i64.const 4294967295 i64.and i64.add @@ -5039,10 +5030,10 @@ i64.add i64.const 32 i64.shr_u - local.get $8 + local.get $6 local.get $11 i64.mul - local.get $2 + local.get $4 i64.const 32 i64.shr_u i64.add @@ -5050,39 +5041,39 @@ i64.const 1 i64.add i64.sub - local.set $2 + local.set $4 local.get $12 i32.const 1 i32.shl local.get $0 i32.add local.get $0 - local.get $15 - local.get $6 + local.get $14 local.get $7 + local.get $2 i32.sub - global.get $~lib/internal/number/_exp_pow - local.tee $6 + global.get $~lib/util/number/_exp_pow + local.tee $2 i32.add i32.const -64 i32.sub - local.get $3 - global.get $~lib/internal/number/_exp - local.get $6 + local.get $5 + global.get $~lib/util/number/_exp + local.get $2 i32.add i32.const -64 i32.sub - local.get $2 + local.get $4 local.get $12 - call $~lib/internal/number/genDigits + call $~lib/util/number/genDigits local.get $12 i32.sub - global.get $~lib/internal/number/_K - call $~lib/internal/number/prettify + global.get $~lib/util/number/_K + call $~lib/util/number/prettify local.get $12 i32.add ) - (func $~lib/string/String#substring (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5091,7 +5082,7 @@ if i32.const 0 i32.const 96 - i32.const 215 + i32.const 190 i32.const 4 call $~lib/env/abort unreachable @@ -5169,27 +5160,25 @@ return end local.get $3 - call $~lib/runtime/ALLOC + call $~lib/runtime/doAllocate local.tee $2 local.get $0 local.get $4 i32.add local.get $3 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $2 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $2 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/dtoa (; 50 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 53 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 f64.const 0 f64.eq if - i32.const 3136 + i32.const 3032 return end local.get $0 @@ -5202,11 +5191,11 @@ local.get $0 f64.ne if - i32.const 3152 + i32.const 3048 return end - i32.const 3168 - i32.const 3200 + i32.const 3064 + i32.const 3096 local.get $0 f64.const 0 f64.lt @@ -5214,27 +5203,21 @@ return end i32.const 56 - call $~lib/runtime/ALLOC + call $~lib/runtime/doAllocate local.tee $2 local.get $0 - call $~lib/internal/number/dtoa_core + call $~lib/util/number/dtoa_core local.set $1 local.get $2 local.get $1 call $~lib/string/String#substring local.set $1 local.get $2 - call $~lib/runtime/unref - drop + call $~lib/runtime/assertUnregistered local.get $1 ) - (func $start:std/string (; 51 ;) (type $FUNCSIG$v) + (func $start:std/string (; 54 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - i32.const 6008 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset global.get $std/string/str i32.const 16 i32.ne @@ -5274,6 +5257,10 @@ call $~lib/env/abort unreachable end + i32.const 5544 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset i32.const 0 call $~lib/string/String.fromCharCode i32.const 176 @@ -5361,25 +5348,7 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str - local.set $1 - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 536870908 - local.set $0 - end - local.get $1 - local.get $0 call $~lib/string/String#endsWith i32.eqz if @@ -5777,11 +5746,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc i32.const 312 i32.const 312 - call $~lib/string/String#lastIndexOf|trampoline + i32.const 2147483647 + call $~lib/string/String#lastIndexOf if i32.const 0 i32.const 56 @@ -5790,11 +5758,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc i32.const 312 i32.const 224 - call $~lib/string/String#lastIndexOf|trampoline + i32.const 2147483647 + call $~lib/string/String#lastIndexOf i32.const -1 i32.ne if @@ -5805,11 +5772,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const 312 - call $~lib/string/String#lastIndexOf|trampoline + i32.const 2147483647 + call $~lib/string/String#lastIndexOf global.get $std/string/str i32.const 8 i32.sub @@ -5825,11 +5791,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const 528 - call $~lib/string/String#lastIndexOf|trampoline + i32.const 2147483647 + call $~lib/string/String#lastIndexOf i32.const 2 i32.ne if @@ -5840,11 +5805,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const 544 - call $~lib/string/String#lastIndexOf|trampoline + i32.const 2147483647 + call $~lib/string/String#lastIndexOf i32.const -1 i32.ne if @@ -5855,11 +5819,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const 576 - call $~lib/string/String#lastIndexOf|trampoline + i32.const 2147483647 + call $~lib/string/String#lastIndexOf i32.const 15 i32.ne if @@ -5939,7 +5902,7 @@ unreachable end i32.const 608 - call $~lib/internal/string/parse + call $~lib/util/string/parse f64.const 0 f64.ne if @@ -5951,7 +5914,7 @@ unreachable end i32.const 624 - call $~lib/internal/string/parse + call $~lib/util/string/parse f64.const 1 f64.ne if @@ -5963,7 +5926,7 @@ unreachable end i32.const 640 - call $~lib/internal/string/parse + call $~lib/util/string/parse f64.const 5 f64.ne if @@ -5975,7 +5938,7 @@ unreachable end i32.const 664 - call $~lib/internal/string/parse + call $~lib/util/string/parse f64.const 455 f64.ne if @@ -5987,7 +5950,7 @@ unreachable end i32.const 688 - call $~lib/internal/string/parse + call $~lib/util/string/parse f64.const 3855 f64.ne if @@ -5999,7 +5962,7 @@ unreachable end i32.const 712 - call $~lib/internal/string/parse + call $~lib/util/string/parse f64.const 3855 f64.ne if @@ -6011,7 +5974,7 @@ unreachable end i32.const 736 - call $~lib/internal/string/parse + call $~lib/util/string/parse f64.const 11 f64.ne if @@ -6023,7 +5986,7 @@ unreachable end i32.const 752 - call $~lib/internal/string/parse + call $~lib/util/string/parse f64.const 1 f64.ne if @@ -6624,11 +6587,10 @@ end i32.const 1224 global.set $std/string/str - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const 0 - call $~lib/string/String#slice|trampoline + i32.const 2147483647 + call $~lib/string/String#slice i32.const 1224 call $~lib/string/String.eq i32.eqz @@ -6640,11 +6602,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const -1 - call $~lib/string/String#slice|trampoline + i32.const 2147483647 + call $~lib/string/String#slice i32.const 1264 call $~lib/string/String.eq i32.eqz @@ -6656,11 +6617,10 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const -5 - call $~lib/string/String#slice|trampoline + i32.const 2147483647 + call $~lib/string/String#slice i32.const 1280 call $~lib/string/String.eq i32.eqz @@ -6732,32 +6692,20 @@ call $~lib/env/abort unreachable end - i32.const 0 - global.set $~lib/argc i32.const 312 i32.const 0 - call $~lib/string/String#split|trampoline + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.eq local.tee $0 if (result i32) - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 312 call $~lib/string/String.eq else @@ -6772,14 +6720,13 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc i32.const 312 i32.const 312 - call $~lib/string/String#split|trampoline + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 if i32.const 0 i32.const 56 @@ -6788,32 +6735,20 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc i32.const 312 i32.const 528 - call $~lib/string/String#split|trampoline + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.eq local.tee $0 if (result i32) - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 312 call $~lib/string/String.eq else @@ -6828,33 +6763,21 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 1496 - i32.const 1520 - call $~lib/string/String#split|trampoline + i32.const 1480 + i32.const 1504 + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.eq local.tee $0 if (result i32) - i32.const 0 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 1496 + global.get $std/string/sa + i32.load offset=4 + i32.load + i32.const 1480 call $~lib/string/String.eq else local.get $0 @@ -6868,34 +6791,22 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 1496 + i32.const 1480 i32.const 528 - call $~lib/string/String#split|trampoline + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa block (result i32) block (result i32) global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.eq local.tee $0 if - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq local.set $0 @@ -6903,22 +6814,9 @@ local.get $0 end if - i32.const 1 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq local.set $0 @@ -6926,23 +6824,10 @@ local.get $0 end if (result i32) - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $0 @@ -6956,34 +6841,22 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 1552 - i32.const 1576 - call $~lib/string/String#split|trampoline + i32.const 1536 + i32.const 1560 + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa block (result i32) block (result i32) global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.eq local.tee $0 if - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq local.set $0 @@ -6991,22 +6864,9 @@ local.get $0 end if - i32.const 1 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7014,23 +6874,10 @@ local.get $0 end if (result i32) - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $0 @@ -7044,35 +6891,23 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 1592 + i32.const 1576 i32.const 528 - call $~lib/string/String#split|trampoline + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa block (result i32) block (result i32) block (result i32) global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.eq local.tee $0 if - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq local.set $0 @@ -7080,22 +6915,9 @@ local.get $0 end if - i32.const 1 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7103,22 +6925,9 @@ local.get $0 end if - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=8 i32.const 312 call $~lib/string/String.eq local.set $0 @@ -7126,23 +6935,10 @@ local.get $0 end if (result i32) - i32.const 3 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1536 + i32.load offset=4 + i32.load offset=12 + i32.const 1520 call $~lib/string/String.eq else local.get $0 @@ -7156,35 +6952,23 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 1616 + i32.const 1600 i32.const 528 - call $~lib/string/String#split|trampoline + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa block (result i32) block (result i32) block (result i32) global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.eq local.tee $0 if - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 312 call $~lib/string/String.eq local.set $0 @@ -7192,22 +6976,9 @@ local.get $0 end if - i32.const 1 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=4 i32.const 336 call $~lib/string/String.eq local.set $0 @@ -7215,22 +6986,9 @@ local.get $0 end if - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=8 i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7238,23 +6996,10 @@ local.get $0 end if (result i32) - i32.const 3 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1536 + i32.load offset=4 + i32.load offset=12 + i32.const 1520 call $~lib/string/String.eq else local.get $0 @@ -7268,35 +7013,23 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 1640 + i32.const 1624 i32.const 528 - call $~lib/string/String#split|trampoline + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa block (result i32) block (result i32) block (result i32) global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.eq local.tee $0 if - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq local.set $0 @@ -7304,68 +7037,29 @@ local.get $0 end if - i32.const 1 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq local.set $0 end local.get $0 - end - if - i32.const 2 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1536 + end + if + global.get $std/string/sa + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq local.set $0 end local.get $0 end if (result i32) - i32.const 3 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=12 i32.const 312 call $~lib/string/String.eq else @@ -7380,34 +7074,22 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc i32.const 352 i32.const 312 - call $~lib/string/String#split|trampoline + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa block (result i32) block (result i32) global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.eq local.tee $0 if - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq local.set $0 @@ -7415,22 +7097,9 @@ local.get $0 end if - i32.const 1 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7438,23 +7107,10 @@ local.get $0 end if (result i32) - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $0 @@ -7474,7 +7130,7 @@ call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 if i32.const 0 i32.const 56 @@ -7489,25 +7145,14 @@ call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.eq local.tee $0 if (result i32) - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq else @@ -7522,31 +7167,20 @@ call $~lib/env/abort unreachable end - i32.const 1496 + i32.const 1480 i32.const 528 i32.const 1 call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.eq local.tee $0 if (result i32) - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq else @@ -7569,25 +7203,14 @@ block (result i32) block (result i32) global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.eq local.tee $0 if - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq local.set $0 @@ -7595,22 +7218,9 @@ local.get $0 end if - i32.const 1 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7618,23 +7228,10 @@ local.get $0 end if (result i32) - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $0 @@ -7656,25 +7253,14 @@ block (result i32) block (result i32) global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.eq local.tee $0 if - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq local.set $0 @@ -7682,22 +7268,9 @@ local.get $0 end if - i32.const 1 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7705,23 +7278,10 @@ local.get $0 end if (result i32) - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $0 @@ -7735,7 +7295,7 @@ call $~lib/env/abort unreachable end - i32.const 1496 + i32.const 1480 i32.const 528 i32.const -1 call $~lib/string/String#split @@ -7743,25 +7303,14 @@ block (result i32) block (result i32) global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.eq local.tee $0 if - i32.const 0 global.get $std/string/sa + i32.load offset=4 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 336 call $~lib/string/String.eq local.set $0 @@ -7769,22 +7318,9 @@ local.get $0 end if - i32.const 1 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7792,23 +7328,10 @@ local.get $0 end if (result i32) - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $0 @@ -7823,7 +7346,7 @@ unreachable end i32.const 0 - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 i32.const 608 call $~lib/string/String.eq i32.eqz @@ -7836,7 +7359,7 @@ unreachable end i32.const 1 - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 i32.const 624 call $~lib/string/String.eq i32.eqz @@ -7849,8 +7372,8 @@ unreachable end i32.const 8 - call $~lib/internal/number/itoa32 - i32.const 2184 + call $~lib/util/number/itoa32 + i32.const 2080 call $~lib/string/String.eq i32.eqz if @@ -7862,7 +7385,7 @@ unreachable end i32.const 123 - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 i32.const 392 call $~lib/string/String.eq i32.eqz @@ -7875,8 +7398,8 @@ unreachable end i32.const -1000 - call $~lib/internal/number/itoa32 - i32.const 2200 + call $~lib/util/number/itoa32 + i32.const 2096 call $~lib/string/String.eq i32.eqz if @@ -7888,8 +7411,8 @@ unreachable end i32.const 1234 - call $~lib/internal/number/itoa32 - i32.const 2224 + call $~lib/util/number/itoa32 + i32.const 2120 call $~lib/string/String.eq i32.eqz if @@ -7901,8 +7424,8 @@ unreachable end i32.const 12345 - call $~lib/internal/number/itoa32 - i32.const 2240 + call $~lib/util/number/itoa32 + i32.const 2136 call $~lib/string/String.eq i32.eqz if @@ -7914,8 +7437,8 @@ unreachable end i32.const 123456 - call $~lib/internal/number/itoa32 - i32.const 2264 + call $~lib/util/number/itoa32 + i32.const 2160 call $~lib/string/String.eq i32.eqz if @@ -7927,8 +7450,8 @@ unreachable end i32.const 1111111 - call $~lib/internal/number/itoa32 - i32.const 2288 + call $~lib/util/number/itoa32 + i32.const 2184 call $~lib/string/String.eq i32.eqz if @@ -7940,8 +7463,8 @@ unreachable end i32.const 1234567 - call $~lib/internal/number/itoa32 - i32.const 2312 + call $~lib/util/number/itoa32 + i32.const 2208 call $~lib/string/String.eq i32.eqz if @@ -7953,8 +7476,8 @@ unreachable end i32.const 2147483646 - call $~lib/internal/number/itoa32 - i32.const 2336 + call $~lib/util/number/itoa32 + i32.const 2232 call $~lib/string/String.eq i32.eqz if @@ -7966,8 +7489,8 @@ unreachable end i32.const 2147483647 - call $~lib/internal/number/itoa32 - i32.const 2368 + call $~lib/util/number/itoa32 + i32.const 2264 call $~lib/string/String.eq i32.eqz if @@ -7979,8 +7502,8 @@ unreachable end i32.const -2147483648 - call $~lib/internal/number/itoa32 - i32.const 2400 + call $~lib/util/number/itoa32 + i32.const 2296 call $~lib/string/String.eq i32.eqz if @@ -7992,8 +7515,8 @@ unreachable end i32.const -1 - call $~lib/internal/number/itoa32 - i32.const 2432 + call $~lib/util/number/itoa32 + i32.const 2328 call $~lib/string/String.eq i32.eqz if @@ -8005,7 +7528,7 @@ unreachable end i32.const 0 - call $~lib/internal/number/utoa32 + call $~lib/util/number/utoa32 i32.const 608 call $~lib/string/String.eq i32.eqz @@ -8018,8 +7541,8 @@ unreachable end i32.const 1000 - call $~lib/internal/number/utoa32 - i32.const 2448 + call $~lib/util/number/utoa32 + i32.const 2344 call $~lib/string/String.eq i32.eqz if @@ -8031,8 +7554,8 @@ unreachable end i32.const 2147483647 - call $~lib/internal/number/utoa32 - i32.const 2368 + call $~lib/util/number/utoa32 + i32.const 2264 call $~lib/string/String.eq i32.eqz if @@ -8044,8 +7567,8 @@ unreachable end i32.const -2147483648 - call $~lib/internal/number/utoa32 - i32.const 2464 + call $~lib/util/number/utoa32 + i32.const 2360 call $~lib/string/String.eq i32.eqz if @@ -8057,8 +7580,8 @@ unreachable end i32.const -1 - call $~lib/internal/number/utoa32 - i32.const 2496 + call $~lib/util/number/utoa32 + i32.const 2392 call $~lib/string/String.eq i32.eqz if @@ -8070,7 +7593,7 @@ unreachable end i64.const 0 - call $~lib/internal/number/utoa64 + call $~lib/util/number/utoa64 i32.const 608 call $~lib/string/String.eq i32.eqz @@ -8083,8 +7606,8 @@ unreachable end i64.const 1234 - call $~lib/internal/number/utoa64 - i32.const 2224 + call $~lib/util/number/utoa64 + i32.const 2120 call $~lib/string/String.eq i32.eqz if @@ -8096,8 +7619,8 @@ unreachable end i64.const 99999999 - call $~lib/internal/number/utoa64 - i32.const 2528 + call $~lib/util/number/utoa64 + i32.const 2424 call $~lib/string/String.eq i32.eqz if @@ -8109,8 +7632,8 @@ unreachable end i64.const 100000000 - call $~lib/internal/number/utoa64 - i32.const 2552 + call $~lib/util/number/utoa64 + i32.const 2448 call $~lib/string/String.eq i32.eqz if @@ -8122,8 +7645,8 @@ unreachable end i64.const 4294967295 - call $~lib/internal/number/utoa64 - i32.const 2496 + call $~lib/util/number/utoa64 + i32.const 2392 call $~lib/string/String.eq i32.eqz if @@ -8135,8 +7658,8 @@ unreachable end i64.const 68719476735 - call $~lib/internal/number/utoa64 - i32.const 2584 + call $~lib/util/number/utoa64 + i32.const 2480 call $~lib/string/String.eq i32.eqz if @@ -8148,8 +7671,8 @@ unreachable end i64.const 868719476735 - call $~lib/internal/number/utoa64 - i32.const 2616 + call $~lib/util/number/utoa64 + i32.const 2512 call $~lib/string/String.eq i32.eqz if @@ -8161,8 +7684,8 @@ unreachable end i64.const 999868719476735 - call $~lib/internal/number/utoa64 - i32.const 2648 + call $~lib/util/number/utoa64 + i32.const 2544 call $~lib/string/String.eq i32.eqz if @@ -8174,8 +7697,8 @@ unreachable end i64.const 9999868719476735 - call $~lib/internal/number/utoa64 - i32.const 2688 + call $~lib/util/number/utoa64 + i32.const 2584 call $~lib/string/String.eq i32.eqz if @@ -8187,8 +7710,8 @@ unreachable end i64.const 19999868719476735 - call $~lib/internal/number/utoa64 - i32.const 2728 + call $~lib/util/number/utoa64 + i32.const 2624 call $~lib/string/String.eq i32.eqz if @@ -8200,8 +7723,8 @@ unreachable end i64.const -1 - call $~lib/internal/number/utoa64 - i32.const 2776 + call $~lib/util/number/utoa64 + i32.const 2672 call $~lib/string/String.eq i32.eqz if @@ -8213,7 +7736,7 @@ unreachable end i64.const 0 - call $~lib/internal/number/itoa64 + call $~lib/util/number/itoa64 i32.const 608 call $~lib/string/String.eq i32.eqz @@ -8226,8 +7749,8 @@ unreachable end i64.const -1234 - call $~lib/internal/number/itoa64 - i32.const 2824 + call $~lib/util/number/itoa64 + i32.const 2720 call $~lib/string/String.eq i32.eqz if @@ -8239,8 +7762,8 @@ unreachable end i64.const 4294967295 - call $~lib/internal/number/itoa64 - i32.const 2496 + call $~lib/util/number/itoa64 + i32.const 2392 call $~lib/string/String.eq i32.eqz if @@ -8252,8 +7775,8 @@ unreachable end i64.const -4294967295 - call $~lib/internal/number/itoa64 - i32.const 2848 + call $~lib/util/number/itoa64 + i32.const 2744 call $~lib/string/String.eq i32.eqz if @@ -8265,8 +7788,8 @@ unreachable end i64.const 68719476735 - call $~lib/internal/number/itoa64 - i32.const 2584 + call $~lib/util/number/itoa64 + i32.const 2480 call $~lib/string/String.eq i32.eqz if @@ -8278,8 +7801,8 @@ unreachable end i64.const -68719476735 - call $~lib/internal/number/itoa64 - i32.const 2880 + call $~lib/util/number/itoa64 + i32.const 2776 call $~lib/string/String.eq i32.eqz if @@ -8291,8 +7814,8 @@ unreachable end i64.const -868719476735 - call $~lib/internal/number/itoa64 - i32.const 2912 + call $~lib/util/number/itoa64 + i32.const 2808 call $~lib/string/String.eq i32.eqz if @@ -8304,8 +7827,8 @@ unreachable end i64.const -999868719476735 - call $~lib/internal/number/itoa64 - i32.const 2952 + call $~lib/util/number/itoa64 + i32.const 2848 call $~lib/string/String.eq i32.eqz if @@ -8317,8 +7840,8 @@ unreachable end i64.const -19999868719476735 - call $~lib/internal/number/itoa64 - i32.const 2992 + call $~lib/util/number/itoa64 + i32.const 2888 call $~lib/string/String.eq i32.eqz if @@ -8330,8 +7853,8 @@ unreachable end i64.const 9223372036854775807 - call $~lib/internal/number/itoa64 - i32.const 3040 + call $~lib/util/number/itoa64 + i32.const 2936 call $~lib/string/String.eq i32.eqz if @@ -8343,8 +7866,8 @@ unreachable end i64.const -9223372036854775808 - call $~lib/internal/number/itoa64 - i32.const 3088 + call $~lib/util/number/itoa64 + i32.const 2984 call $~lib/string/String.eq i32.eqz if @@ -8356,8 +7879,8 @@ unreachable end f64.const 0 - call $~lib/internal/number/dtoa - i32.const 3136 + call $~lib/util/number/dtoa + i32.const 3032 call $~lib/string/String.eq i32.eqz if @@ -8369,8 +7892,8 @@ unreachable end f64.const -0 - call $~lib/internal/number/dtoa - i32.const 3136 + call $~lib/util/number/dtoa + i32.const 3032 call $~lib/string/String.eq i32.eqz if @@ -8382,8 +7905,8 @@ unreachable end f64.const nan:0x8000000000000 - call $~lib/internal/number/dtoa - i32.const 3152 + call $~lib/util/number/dtoa + i32.const 3048 call $~lib/string/String.eq i32.eqz if @@ -8395,8 +7918,8 @@ unreachable end f64.const inf - call $~lib/internal/number/dtoa - i32.const 3200 + call $~lib/util/number/dtoa + i32.const 3096 call $~lib/string/String.eq i32.eqz if @@ -8408,8 +7931,8 @@ unreachable end f64.const -inf - call $~lib/internal/number/dtoa - i32.const 3168 + call $~lib/util/number/dtoa + i32.const 3064 call $~lib/string/String.eq i32.eqz if @@ -8421,8 +7944,8 @@ unreachable end f64.const 2.220446049250313e-16 - call $~lib/internal/number/dtoa - i32.const 4592 + call $~lib/util/number/dtoa + i32.const 4128 call $~lib/string/String.eq i32.eqz if @@ -8434,8 +7957,8 @@ unreachable end f64.const -2.220446049250313e-16 - call $~lib/internal/number/dtoa - i32.const 4648 + call $~lib/util/number/dtoa + i32.const 4184 call $~lib/string/String.eq i32.eqz if @@ -8447,8 +7970,8 @@ unreachable end f64.const 1797693134862315708145274e284 - call $~lib/internal/number/dtoa - i32.const 4704 + call $~lib/util/number/dtoa + i32.const 4240 call $~lib/string/String.eq i32.eqz if @@ -8460,8 +7983,8 @@ unreachable end f64.const -1797693134862315708145274e284 - call $~lib/internal/number/dtoa - i32.const 4760 + call $~lib/util/number/dtoa + i32.const 4296 call $~lib/string/String.eq i32.eqz if @@ -8473,8 +7996,8 @@ unreachable end f64.const 4185580496821356722454785e274 - call $~lib/internal/number/dtoa - i32.const 4816 + call $~lib/util/number/dtoa + i32.const 4352 call $~lib/string/String.eq i32.eqz if @@ -8486,8 +8009,8 @@ unreachable end f64.const 2.2250738585072014e-308 - call $~lib/internal/number/dtoa - i32.const 4872 + call $~lib/util/number/dtoa + i32.const 4408 call $~lib/string/String.eq i32.eqz if @@ -8499,8 +8022,8 @@ unreachable end f64.const 4.940656e-318 - call $~lib/internal/number/dtoa - i32.const 4928 + call $~lib/util/number/dtoa + i32.const 4464 call $~lib/string/String.eq i32.eqz if @@ -8512,8 +8035,8 @@ unreachable end f64.const 9060801153433600 - call $~lib/internal/number/dtoa - i32.const 4968 + call $~lib/util/number/dtoa + i32.const 4504 call $~lib/string/String.eq i32.eqz if @@ -8525,8 +8048,8 @@ unreachable end f64.const 4708356024711512064 - call $~lib/internal/number/dtoa - i32.const 5016 + call $~lib/util/number/dtoa + i32.const 4552 call $~lib/string/String.eq i32.eqz if @@ -8538,8 +8061,8 @@ unreachable end f64.const 9409340012568248320 - call $~lib/internal/number/dtoa - i32.const 5072 + call $~lib/util/number/dtoa + i32.const 4608 call $~lib/string/String.eq i32.eqz if @@ -8551,8 +8074,8 @@ unreachable end f64.const 5e-324 - call $~lib/internal/number/dtoa - i32.const 5128 + call $~lib/util/number/dtoa + i32.const 4664 call $~lib/string/String.eq i32.eqz if @@ -8564,8 +8087,8 @@ unreachable end f64.const 1 - call $~lib/internal/number/dtoa - i32.const 5152 + call $~lib/util/number/dtoa + i32.const 4688 call $~lib/string/String.eq i32.eqz if @@ -8577,7 +8100,7 @@ unreachable end f64.const 0.1 - call $~lib/internal/number/dtoa + call $~lib/util/number/dtoa i32.const 768 call $~lib/string/String.eq i32.eqz @@ -8590,8 +8113,8 @@ unreachable end f64.const -1 - call $~lib/internal/number/dtoa - i32.const 5168 + call $~lib/util/number/dtoa + i32.const 4704 call $~lib/string/String.eq i32.eqz if @@ -8603,8 +8126,8 @@ unreachable end f64.const -0.1 - call $~lib/internal/number/dtoa - i32.const 5184 + call $~lib/util/number/dtoa + i32.const 4720 call $~lib/string/String.eq i32.eqz if @@ -8616,8 +8139,8 @@ unreachable end f64.const 1e6 - call $~lib/internal/number/dtoa - i32.const 5200 + call $~lib/util/number/dtoa + i32.const 4736 call $~lib/string/String.eq i32.eqz if @@ -8629,8 +8152,8 @@ unreachable end f64.const 1e-06 - call $~lib/internal/number/dtoa - i32.const 5232 + call $~lib/util/number/dtoa + i32.const 4768 call $~lib/string/String.eq i32.eqz if @@ -8642,8 +8165,8 @@ unreachable end f64.const -1e6 - call $~lib/internal/number/dtoa - i32.const 5256 + call $~lib/util/number/dtoa + i32.const 4792 call $~lib/string/String.eq i32.eqz if @@ -8655,8 +8178,8 @@ unreachable end f64.const -1e-06 - call $~lib/internal/number/dtoa - i32.const 5288 + call $~lib/util/number/dtoa + i32.const 4824 call $~lib/string/String.eq i32.eqz if @@ -8668,8 +8191,8 @@ unreachable end f64.const 1e7 - call $~lib/internal/number/dtoa - i32.const 5320 + call $~lib/util/number/dtoa + i32.const 4856 call $~lib/string/String.eq i32.eqz if @@ -8681,8 +8204,8 @@ unreachable end f64.const 1e-07 - call $~lib/internal/number/dtoa - i32.const 5352 + call $~lib/util/number/dtoa + i32.const 4888 call $~lib/string/String.eq i32.eqz if @@ -8694,8 +8217,8 @@ unreachable end f64.const 1.e+308 - call $~lib/internal/number/dtoa - i32.const 5368 + call $~lib/util/number/dtoa + i32.const 4904 call $~lib/string/String.eq i32.eqz if @@ -8707,8 +8230,8 @@ unreachable end f64.const -1.e+308 - call $~lib/internal/number/dtoa - i32.const 5392 + call $~lib/util/number/dtoa + i32.const 4928 call $~lib/string/String.eq i32.eqz if @@ -8720,8 +8243,8 @@ unreachable end f64.const inf - call $~lib/internal/number/dtoa - i32.const 3200 + call $~lib/util/number/dtoa + i32.const 3096 call $~lib/string/String.eq i32.eqz if @@ -8733,8 +8256,8 @@ unreachable end f64.const -inf - call $~lib/internal/number/dtoa - i32.const 3168 + call $~lib/util/number/dtoa + i32.const 3064 call $~lib/string/String.eq i32.eqz if @@ -8746,8 +8269,8 @@ unreachable end f64.const 1e-308 - call $~lib/internal/number/dtoa - i32.const 5416 + call $~lib/util/number/dtoa + i32.const 4952 call $~lib/string/String.eq i32.eqz if @@ -8759,8 +8282,8 @@ unreachable end f64.const -1e-308 - call $~lib/internal/number/dtoa - i32.const 5440 + call $~lib/util/number/dtoa + i32.const 4976 call $~lib/string/String.eq i32.eqz if @@ -8772,8 +8295,8 @@ unreachable end f64.const 1e-323 - call $~lib/internal/number/dtoa - i32.const 5464 + call $~lib/util/number/dtoa + i32.const 5000 call $~lib/string/String.eq i32.eqz if @@ -8785,8 +8308,8 @@ unreachable end f64.const -1e-323 - call $~lib/internal/number/dtoa - i32.const 5488 + call $~lib/util/number/dtoa + i32.const 5024 call $~lib/string/String.eq i32.eqz if @@ -8798,8 +8321,8 @@ unreachable end f64.const 0 - call $~lib/internal/number/dtoa - i32.const 3136 + call $~lib/util/number/dtoa + i32.const 3032 call $~lib/string/String.eq i32.eqz if @@ -8811,8 +8334,8 @@ unreachable end f64.const 4294967272 - call $~lib/internal/number/dtoa - i32.const 5512 + call $~lib/util/number/dtoa + i32.const 5048 call $~lib/string/String.eq i32.eqz if @@ -8824,8 +8347,8 @@ unreachable end f64.const 1.2312145673456234e-08 - call $~lib/internal/number/dtoa - i32.const 5544 + call $~lib/util/number/dtoa + i32.const 5080 call $~lib/string/String.eq i32.eqz if @@ -8837,8 +8360,8 @@ unreachable end f64.const 555555555.5555556 - call $~lib/internal/number/dtoa - i32.const 5600 + call $~lib/util/number/dtoa + i32.const 5136 call $~lib/string/String.eq i32.eqz if @@ -8850,8 +8373,8 @@ unreachable end f64.const 0.9999999999999999 - call $~lib/internal/number/dtoa - i32.const 5648 + call $~lib/util/number/dtoa + i32.const 5184 call $~lib/string/String.eq i32.eqz if @@ -8863,8 +8386,8 @@ unreachable end f64.const 1 - call $~lib/internal/number/dtoa - i32.const 5152 + call $~lib/util/number/dtoa + i32.const 4688 call $~lib/string/String.eq i32.eqz if @@ -8876,8 +8399,8 @@ unreachable end f64.const 12.34 - call $~lib/internal/number/dtoa - i32.const 5696 + call $~lib/util/number/dtoa + i32.const 5232 call $~lib/string/String.eq i32.eqz if @@ -8889,8 +8412,8 @@ unreachable end f64.const 0.3333333333333333 - call $~lib/internal/number/dtoa - i32.const 5720 + call $~lib/util/number/dtoa + i32.const 5256 call $~lib/string/String.eq i32.eqz if @@ -8902,8 +8425,8 @@ unreachable end f64.const 1234e17 - call $~lib/internal/number/dtoa - i32.const 5768 + call $~lib/util/number/dtoa + i32.const 5304 call $~lib/string/String.eq i32.eqz if @@ -8915,8 +8438,8 @@ unreachable end f64.const 1234e18 - call $~lib/internal/number/dtoa - i32.const 5824 + call $~lib/util/number/dtoa + i32.const 5360 call $~lib/string/String.eq i32.eqz if @@ -8928,8 +8451,8 @@ unreachable end f64.const 2.71828 - call $~lib/internal/number/dtoa - i32.const 5856 + call $~lib/util/number/dtoa + i32.const 5392 call $~lib/string/String.eq i32.eqz if @@ -8941,8 +8464,8 @@ unreachable end f64.const 0.0271828 - call $~lib/internal/number/dtoa - i32.const 5880 + call $~lib/util/number/dtoa + i32.const 5416 call $~lib/string/String.eq i32.eqz if @@ -8954,8 +8477,8 @@ unreachable end f64.const 271.828 - call $~lib/internal/number/dtoa - i32.const 5912 + call $~lib/util/number/dtoa + i32.const 5448 call $~lib/string/String.eq i32.eqz if @@ -8967,8 +8490,8 @@ unreachable end f64.const 1.1e+128 - call $~lib/internal/number/dtoa - i32.const 5936 + call $~lib/util/number/dtoa + i32.const 5472 call $~lib/string/String.eq i32.eqz if @@ -8980,8 +8503,8 @@ unreachable end f64.const 1.1e-64 - call $~lib/internal/number/dtoa - i32.const 5960 + call $~lib/util/number/dtoa + i32.const 5496 call $~lib/string/String.eq i32.eqz if @@ -8993,8 +8516,8 @@ unreachable end f64.const 0.000035689 - call $~lib/internal/number/dtoa - i32.const 5984 + call $~lib/util/number/dtoa + i32.const 5520 call $~lib/string/String.eq i32.eqz if @@ -9006,13 +8529,13 @@ unreachable end ) - (func $std/string/getString (; 52 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 55 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 53 ;) (type $FUNCSIG$v) + (func $start (; 56 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 54 ;) (type $FUNCSIG$v) + (func $null (; 57 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index a2421f4596..dc77ca00e9 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -1,19 +1,20 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$di (func (param i32) (result f64))) - (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) (type $FUNCSIG$iijijiji (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -81,150 +82,142 @@ (data (i32.const 1296) "\01\00\00\00\n\00\00\00c\00d\00e\00f\00g\00") (data (i32.const 1320) "\01\00\00\00\n\00\00\00d\00e\00f\00g\00h\00") (data (i32.const 1344) "\01\00\00\00\1a\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00") - (data (i32.const 1384) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 1424) "\01\00\00\008\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 1488) "\01\00\00\00\n\00\00\00a\00,\00b\00,\00c\00") - (data (i32.const 1512) "\01\00\00\00\02\00\00\00.\00") - (data (i32.const 1528) "\01\00\00\00\02\00\00\00c\00") - (data (i32.const 1544) "\01\00\00\00\0e\00\00\00a\00,\00 \00b\00,\00 \00c\00") - (data (i32.const 1568) "\01\00\00\00\04\00\00\00,\00 \00") - (data (i32.const 1584) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00,\00c\00") - (data (i32.const 1608) "\01\00\00\00\0c\00\00\00,\00a\00,\00b\00,\00c\00") - (data (i32.const 1632) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00c\00,\00") - (data (i32.const 1656) "\90\01\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2168) "x\06\00\00d\00\00\00") - (data (i32.const 2176) "\01\00\00\00\02\00\00\008\00") - (data (i32.const 2192) "\01\00\00\00\n\00\00\00-\001\000\000\000\00") - (data (i32.const 2216) "\01\00\00\00\08\00\00\001\002\003\004\00") - (data (i32.const 2232) "\01\00\00\00\n\00\00\001\002\003\004\005\00") - (data (i32.const 2256) "\01\00\00\00\0c\00\00\001\002\003\004\005\006\00") - (data (i32.const 2280) "\01\00\00\00\0e\00\00\001\001\001\001\001\001\001\00") - (data (i32.const 2304) "\01\00\00\00\0e\00\00\001\002\003\004\005\006\007\00") - (data (i32.const 2328) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\006\00") - (data (i32.const 2360) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\007\00") - (data (i32.const 2392) "\01\00\00\00\16\00\00\00-\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 2424) "\01\00\00\00\04\00\00\00-\001\00") - (data (i32.const 2440) "\01\00\00\00\08\00\00\001\000\000\000\00") - (data (i32.const 2456) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 2488) "\01\00\00\00\14\00\00\004\002\009\004\009\006\007\002\009\005\00") - (data (i32.const 2520) "\01\00\00\00\10\00\00\009\009\009\009\009\009\009\009\00") - (data (i32.const 2544) "\01\00\00\00\12\00\00\001\000\000\000\000\000\000\000\000\00") - (data (i32.const 2576) "\01\00\00\00\16\00\00\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2608) "\01\00\00\00\18\00\00\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2640) "\01\00\00\00\1e\00\00\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2680) "\01\00\00\00 \00\00\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2720) "\01\00\00\00\"\00\00\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2768) "\01\00\00\00(\00\00\001\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005\00") - (data (i32.const 2816) "\01\00\00\00\n\00\00\00-\001\002\003\004\00") - (data (i32.const 2840) "\01\00\00\00\16\00\00\00-\004\002\009\004\009\006\007\002\009\005\00") - (data (i32.const 2872) "\01\00\00\00\18\00\00\00-\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2904) "\01\00\00\00\1a\00\00\00-\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2944) "\01\00\00\00 \00\00\00-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2984) "\01\00\00\00$\00\00\00-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3032) "\01\00\00\00&\00\00\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007\00") - (data (i32.const 3080) "\01\00\00\00(\00\00\00-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008\00") - (data (i32.const 3128) "\01\00\00\00\06\00\00\000\00.\000\00") - (data (i32.const 3144) "\01\00\00\00\06\00\00\00N\00a\00N\00") - (data (i32.const 3160) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 3192) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 3216) "\b8\02\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8|inlined.0 (result i32) + local.get $2 + local.set $1 + local.get $1 + i32.const 1 + call $~lib/runtime/doRegister + end + ) + (func $~lib/util/string/compareImpl (; 9 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + i32.const 0 + local.set $5 local.get $0 - i32.const 8 + local.get $1 + i32.const 1 + i32.shl i32.add - local.get $4 - i32.store - local.get $0 + local.set $6 local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - end - br $continue|0 - end - end - end - ) - (func $~lib/runtime/ALLOC (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - call $~lib/runtime/ADJUST - call $~lib/allocator/arena/memory.allocate - local.set $1 - local.get $1 - i32.const -1520547049 - i32.store - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - local.set $2 - block $~lib/runtime/memory.fill|inlined.0 - local.get $2 - local.set $3 - i32.const 0 - local.set $4 - local.get $0 - local.set $5 - local.get $3 - local.get $4 - local.get $5 - call $~lib/internal/memory/memset - end - local.get $2 - ) - (func $~lib/runtime/unref (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - global.get $~lib/runtime/HEAP_BASE - i32.const 8 - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 136 - i32.const 101 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 8 - i32.sub - local.set $1 - local.get $1 - i32.load - i32.const -1520547049 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 136 - i32.const 103 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $1 - ) - (func $~lib/string/String.fromCharCode (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 2 - call $~lib/runtime/ALLOC - local.set $1 - local.get $1 - local.get $0 - i32.store16 - block $~lib/runtime/REGISTER|inlined.0 (result i32) - local.get $1 - local.set $2 - local.get $2 - call $~lib/runtime/unref - i32.const 1 - i32.store - local.get $2 - end - ) - (func $~lib/string/compareImpl (; 10 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - i32.const 0 - local.set $5 - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $6 - local.get $2 - local.get $3 - i32.const 1 - i32.shl + local.get $3 + i32.const 1 + i32.shl i32.add local.set $7 block $break|0 @@ -738,7 +471,7 @@ end local.get $5 ) - (func $~lib/string/String.eq (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.eq (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -764,11 +497,11 @@ return end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $3 local.get $3 local.get $1 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.ne if i32.const 0 @@ -779,10 +512,10 @@ local.get $1 i32.const 0 local.get $3 - call $~lib/string/compareImpl + call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.fromCodePoint (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -794,7 +527,7 @@ if i32.const 0 i32.const 96 - i32.const 53 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -803,17 +536,21 @@ i32.const 65535 i32.gt_s local.set $1 - local.get $1 - i32.const 1 - i32.add - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC - local.set $2 + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + local.get $1 + i32.const 1 + i32.add + i32.const 1 + i32.shl + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end + local.set $3 local.get $1 i32.eqz if - local.get $2 + local.get $3 local.get $0 i32.store16 else @@ -826,15 +563,15 @@ i32.shr_u i32.const 55296 i32.add - local.set $3 + local.set $2 local.get $0 i32.const 1023 i32.and i32.const 56320 i32.add local.set $4 - local.get $2 local.get $3 + local.get $2 i32.const 16 i32.shl local.get $4 @@ -842,16 +579,14 @@ i32.store end block $~lib/runtime/REGISTER|inlined.1 (result i32) - local.get $2 + local.get $3 local.set $4 local.get $4 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $4 + call $~lib/runtime/doRegister end ) - (func $~lib/string/String#startsWith (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#startsWith (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -865,7 +600,7 @@ if i32.const 0 i32.const 96 - i32.const 191 + i32.const 165 i32.const 4 call $~lib/env/abort unreachable @@ -880,7 +615,7 @@ local.get $2 local.set $3 local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $4 local.get $3 local.tee $5 @@ -899,7 +634,7 @@ select local.set $7 local.get $1 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $8 local.get $8 local.get $7 @@ -915,10 +650,10 @@ local.get $1 i32.const 0 local.get $8 - call $~lib/string/compareImpl + call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String#endsWith (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#endsWith (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -931,7 +666,7 @@ if i32.const 0 i32.const 96 - i32.const 110 + i32.const 78 i32.const 4 call $~lib/env/abort unreachable @@ -953,7 +688,7 @@ select local.tee $3 local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.tee $4 local.get $3 local.get $4 @@ -961,7 +696,7 @@ select local.set $5 local.get $1 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $6 local.get $5 local.get $6 @@ -979,29 +714,10 @@ local.get $1 i32.const 0 local.get $6 - call $~lib/string/compareImpl + call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String#endsWith|trampoline (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - global.get $~lib/runtime/StringBase.MAX_LENGTH - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/string/String#endsWith - ) - (func $~lib/string/String#indexOf (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#indexOf (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1014,7 +730,7 @@ if i32.const 0 i32.const 96 - i32.const 162 + i32.const 134 i32.const 4 call $~lib/env/abort unreachable @@ -1027,7 +743,7 @@ local.set $1 end local.get $1 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $3 local.get $3 i32.eqz @@ -1036,7 +752,7 @@ return end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $4 local.get $4 i32.eqz @@ -1078,7 +794,7 @@ local.get $1 i32.const 0 local.get $3 - call $~lib/string/compareImpl + call $~lib/util/string/compareImpl i32.eqz if local.get $5 @@ -1095,7 +811,7 @@ end i32.const -1 ) - (func $~lib/internal/memory/memcpy (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2296,267 +2012,267 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 18 ;) (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.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/util/memory/memmove|inlined.0 local.get $0 + local.set $3 local.get $1 + local.set $4 local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and + local.set $5 + local.get $3 + local.get $4 i32.eq if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and + br $~lib/util/memory/memmove|inlined.0 + end + local.get $4 + local.get $5 + i32.add + local.get $3 + i32.le_u + local.tee $6 + if (result i32) + local.get $6 + else + local.get $3 + local.get $5 + i32.add + local.get $4 + i32.le_u + end + if + local.get $3 + local.get $4 + local.get $5 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $3 + local.get $4 + i32.lt_u + if + local.get $4 + i32.const 7 + i32.and + local.get $3 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $3 + i32.const 7 + i32.and + if + block + local.get $5 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $5 + i32.const 1 + i32.sub + local.set $5 + block (result i32) + local.get $3 + local.tee $6 + i32.const 1 + i32.add + local.set $3 + local.get $6 + end + block (result i32) + local.get $4 + local.tee $6 + i32.const 1 + i32.add + local.set $4 + local.get $6 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $5 + i32.const 8 + i32.ge_u + if + block + local.get $3 + local.get $4 + i64.load + i64.store + local.get $5 + i32.const 8 + i32.sub + local.set $5 + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $4 + i32.const 8 + i32.add + local.set $4 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $5 if block - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 block (result i32) - local.get $0 - local.tee $3 + local.get $3 + local.tee $6 i32.const 1 i32.add - local.set $0 - local.get $3 + local.set $3 + local.get $6 end block (result i32) - local.get $1 - local.tee $3 + local.get $4 + local.tee $6 i32.const 1 i32.add - local.set $1 - local.get $3 + local.set $4 + local.get $6 end i32.load8_u i32.store8 + local.get $5 + i32.const 1 + i32.sub + local.set $5 end - br $continue|0 + br $continue|2 end end end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 + else + local.get $4 + i32.const 7 + i32.and + local.get $3 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $3 + local.get $5 + i32.add + i32.const 7 + i32.and + if + block + local.get $5 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $3 + local.get $5 + i32.const 1 + i32.sub + local.tee $5 + i32.add + local.get $4 + local.get $5 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 end - br $continue|1 end end - end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 + block $break|4 + loop $continue|4 + local.get $5 + i32.const 8 + i32.ge_u + if + block + local.get $5 + i32.const 8 + i32.sub + local.set $5 + local.get $3 + local.get $5 + i32.add + local.get $4 + local.get $5 + i32.add + i64.load + i64.store + end + br $continue|4 end - i32.load8_u - i32.store8 - local.get $2 + end + end + end + block $break|5 + loop $continue|5 + local.get $5 + if + local.get $3 + local.get $5 i32.const 1 i32.sub - local.set $2 + local.tee $5 + i32.add + local.get $4 + local.get $5 + i32.add + i32.load8_u + i32.store8 + br $continue|5 end - br $continue|2 end end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 + end + ) + (func $~lib/memory/memory.repeat (; 17 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + local.set $4 + local.get $2 + local.get $3 + i32.mul + local.set $5 + block $break|0 + loop $continue|0 + local.get $4 + local.get $5 + i32.lt_u + if + block local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - end - br $continue|3 - end - end - end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 - end - end - end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - end - ) - (func $~lib/runtime/memory.repeat (; 19 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - i32.const 0 - local.set $4 - local.get $2 - local.get $3 - i32.mul - local.set $5 - block $break|0 - loop $continue|0 - local.get $4 - local.get $5 - i32.lt_u - if - block - block $~lib/runtime/memory.copy|inlined.0 - local.get $0 - local.get $4 - i32.add - local.set $6 - local.get $1 - local.set $7 - local.get $2 - local.set $8 - local.get $6 - local.get $7 - local.get $8 - call $~lib/internal/memory/memmove - end - local.get $4 + local.get $4 + i32.add + local.get $1 + local.get $2 + call $~lib/memory/memory.copy + local.get $4 local.get $2 i32.add local.set $4 @@ -2566,7 +2282,7 @@ end end ) - (func $~lib/string/String#padStart (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padStart (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2575,9 +2291,6 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) local.get $0 i32.const 0 i32.ne @@ -2585,13 +2298,13 @@ if i32.const 0 i32.const 96 - i32.const 307 + i32.const 282 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.const 1 i32.shl local.set $3 @@ -2600,7 +2313,7 @@ i32.shl local.set $4 local.get $2 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.const 1 i32.shl local.set $5 @@ -2622,8 +2335,12 @@ local.get $3 i32.sub local.set $7 - local.get $4 - call $~lib/runtime/ALLOC + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + local.get $4 + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end local.set $8 local.get $7 local.get $5 @@ -2647,58 +2364,34 @@ local.get $2 local.get $5 local.get $6 - call $~lib/runtime/memory.repeat - block $~lib/runtime/memory.copy|inlined.1 - local.get $8 - local.get $9 - i32.add - local.set $11 - local.get $2 - local.set $12 - local.get $10 - local.set $13 - local.get $11 - local.get $12 - local.get $13 - call $~lib/internal/memory/memmove - end - else + call $~lib/memory/memory.repeat local.get $8 - local.set $10 + local.get $9 + i32.add local.get $2 - local.set $9 - local.get $7 - local.set $6 local.get $10 - local.get $9 - local.get $6 - call $~lib/internal/memory/memmove - end - block $~lib/runtime/memory.copy|inlined.3 + call $~lib/memory/memory.copy + else local.get $8 + local.get $2 local.get $7 - i32.add - local.set $6 - local.get $0 - local.set $9 - local.get $3 - local.set $10 - local.get $6 - local.get $9 - local.get $10 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy end + local.get $8 + local.get $7 + i32.add + local.get $0 + local.get $3 + call $~lib/memory/memory.copy block $~lib/runtime/REGISTER|inlined.2 (result i32) local.get $8 local.set $10 local.get $10 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $10 + call $~lib/runtime/doRegister end ) - (func $~lib/string/String#padEnd (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2707,9 +2400,6 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) local.get $0 i32.const 0 i32.ne @@ -2717,13 +2407,13 @@ if i32.const 0 i32.const 96 - i32.const 328 + i32.const 303 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.const 1 i32.shl local.set $3 @@ -2732,7 +2422,7 @@ i32.shl local.set $4 local.get $2 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.const 1 i32.shl local.set $5 @@ -2754,21 +2444,17 @@ local.get $3 i32.sub local.set $7 - local.get $4 - call $~lib/runtime/ALLOC - local.set $8 - block $~lib/runtime/memory.copy|inlined.4 - local.get $8 + block $~lib/runtime/ALLOCATE|inlined.3 (result i32) + local.get $4 local.set $6 - local.get $0 - local.set $9 - local.get $3 - local.set $10 local.get $6 - local.get $9 - local.get $10 - call $~lib/internal/memory/memmove + call $~lib/runtime/doAllocate end + local.set $8 + local.get $8 + local.get $0 + local.get $3 + call $~lib/memory/memory.copy local.get $7 local.get $5 i32.gt_u @@ -2778,63 +2464,47 @@ i32.sub local.get $5 i32.div_u - local.set $10 - local.get $10 + local.set $6 + local.get $6 local.get $5 i32.mul local.set $9 local.get $7 local.get $9 i32.sub - local.set $6 + local.set $10 local.get $8 local.get $3 i32.add local.get $2 local.get $5 + local.get $6 + call $~lib/memory/memory.repeat + local.get $8 + local.get $3 + i32.add + local.get $9 + i32.add + local.get $2 local.get $10 - call $~lib/runtime/memory.repeat - block $~lib/runtime/memory.copy|inlined.5 - local.get $8 - local.get $3 - i32.add - local.get $9 - i32.add - local.set $11 - local.get $2 - local.set $12 - local.get $6 - local.set $13 - local.get $11 - local.get $12 - local.get $13 - call $~lib/internal/memory/memmove - end + call $~lib/memory/memory.copy else local.get $8 local.get $3 i32.add - local.set $6 local.get $2 - local.set $9 local.get $7 - local.set $10 - local.get $6 - local.get $9 - local.get $10 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy end block $~lib/runtime/REGISTER|inlined.3 (result i32) local.get $8 local.set $10 local.get $10 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $10 + call $~lib/runtime/doRegister end ) - (func $~lib/string/String#lastIndexOf (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2847,7 +2517,7 @@ if i32.const 0 i32.const 96 - i32.const 177 + i32.const 150 i32.const 4 call $~lib/env/abort unreachable @@ -2860,10 +2530,10 @@ local.set $1 end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $3 local.get $1 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $4 local.get $4 i32.eqz @@ -2909,7 +2579,7 @@ local.get $1 i32.const 0 local.get $4 - call $~lib/string/compareImpl + call $~lib/util/string/compareImpl i32.eqz if local.get $5 @@ -2926,26 +2596,7 @@ end i32.const -1 ) - (func $~lib/string/String#lastIndexOf|trampoline (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/string/String#lastIndexOf - ) - (func $~lib/internal/string/parse (; 24 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/util/string/parse (; 21 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2953,7 +2604,7 @@ (local $6 i32) (local $7 f64) local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $2 local.get $2 i32.eqz @@ -3246,12 +2897,12 @@ local.get $7 f64.mul ) - (func $~lib/string/parseInt (; 25 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/string/parseInt (; 22 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $0 local.get $1 - call $~lib/internal/string/parse + call $~lib/util/string/parse ) - (func $~lib/string/parseFloat (; 26 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 23 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3260,7 +2911,7 @@ (local $6 i32) (local $7 f64) local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $1 local.get $1 i32.eqz @@ -3380,7 +3031,7 @@ if i32.const 0 i32.const 96 - i32.const 591 + i32.const 569 i32.const 10 call $~lib/env/abort unreachable @@ -3448,14 +3099,12 @@ local.get $5 f64.mul ) - (func $~lib/string/String#concat (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 i32.const 0 i32.ne @@ -3463,7 +3112,7 @@ if i32.const 0 i32.const 96 - i32.const 97 + i32.const 65 i32.const 4 call $~lib/env/abort unreachable @@ -3476,12 +3125,12 @@ local.set $1 end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.const 1 i32.shl local.set $2 local.get $1 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.const 1 i32.shl local.set $3 @@ -3496,46 +3145,32 @@ i32.const 312 return end - local.get $4 - call $~lib/runtime/ALLOC - local.set $5 - block $~lib/runtime/memory.copy|inlined.7 + block $~lib/runtime/ALLOCATE|inlined.4 (result i32) + local.get $4 + local.set $5 local.get $5 - local.set $6 - local.get $0 - local.set $7 - local.get $2 - local.set $8 - local.get $6 - local.get $7 - local.get $8 - call $~lib/internal/memory/memmove - end - block $~lib/runtime/memory.copy|inlined.8 - local.get $5 - local.get $2 - i32.add - local.set $8 - local.get $1 - local.set $7 - local.get $3 - local.set $6 - local.get $8 - local.get $7 - local.get $6 - call $~lib/internal/memory/memmove + call $~lib/runtime/doAllocate end + local.set $6 + local.get $6 + local.get $0 + local.get $2 + call $~lib/memory/memory.copy + local.get $6 + local.get $2 + i32.add + local.get $1 + local.get $3 + call $~lib/memory/memory.copy block $~lib/runtime/REGISTER|inlined.4 (result i32) - local.get $5 - local.set $6 local.get $6 - call $~lib/runtime/unref + local.set $5 + local.get $5 i32.const 1 - i32.store - local.get $6 + call $~lib/runtime/doRegister end ) - (func $~lib/string/String.concat (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if @@ -3546,13 +3181,13 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.ne (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.ne (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.eq i32.eqz ) - (func $~lib/string/String.gt (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gt (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3581,10 +3216,10 @@ return end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $3 local.get $1 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $4 local.get $3 i32.eqz @@ -3610,11 +3245,11 @@ local.get $5 i32.lt_s select - call $~lib/string/compareImpl + call $~lib/util/string/compareImpl i32.const 0 i32.gt_s ) - (func $~lib/string/String.lt (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.lt (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3643,10 +3278,10 @@ return end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $3 local.get $1 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $4 local.get $4 i32.eqz @@ -3672,23 +3307,23 @@ local.get $5 i32.lt_s select - call $~lib/string/compareImpl + call $~lib/util/string/compareImpl i32.const 0 i32.lt_s ) - (func $~lib/string/String.gte (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.gte (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.lt i32.eqz ) - (func $~lib/string/String.lte (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.lte (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.gt i32.eqz ) - (func $~lib/string/String#repeat (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3699,13 +3334,13 @@ if i32.const 0 i32.const 96 - i32.const 349 + i32.const 324 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $2 local.get $1 i32.const 0 @@ -3727,7 +3362,7 @@ if i32.const 0 i32.const 96 - i32.const 354 + i32.const 329 i32.const 6 call $~lib/env/abort unreachable @@ -3753,12 +3388,16 @@ local.get $0 return end - local.get $2 - local.get $1 - i32.mul - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC + block $~lib/runtime/ALLOCATE|inlined.5 (result i32) + local.get $2 + local.get $1 + i32.mul + i32.const 1 + i32.shl + local.set $3 + local.get $3 + call $~lib/runtime/doAllocate + end local.set $4 local.get $4 local.get $0 @@ -3766,206 +3405,450 @@ i32.const 1 i32.shl local.get $1 - call $~lib/runtime/memory.repeat + call $~lib/memory/memory.repeat block $~lib/runtime/REGISTER|inlined.5 (result i32) local.get $4 local.set $3 local.get $3 - call $~lib/runtime/unref - i32.const 1 + i32.const 1 + call $~lib/runtime/doRegister + end + ) + (func $~lib/string/String#slice (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + call $~lib/string/String#get:length + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + end + local.set $6 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $3 + i32.add + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + else + local.get $2 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + end + local.set $7 + local.get $7 + local.get $6 + i32.sub + local.set $3 + local.get $3 + i32.const 0 + i32.le_s + if + i32.const 312 + return + end + block $~lib/runtime/ALLOCATE|inlined.6 (result i32) + local.get $3 + i32.const 1 + i32.shl + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + end + local.set $8 + local.get $8 + local.get $0 + local.get $6 + i32.const 1 + i32.shl + i32.add + local.get $3 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + block $~lib/runtime/REGISTER|inlined.6 (result i32) + local.get $8 + local.set $4 + local.get $4 + i32.const 1 + call $~lib/runtime/doRegister + end + ) + (func $~lib/memory/memory.fill (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $0 + local.set $3 + local.get $1 + local.set $4 + local.get $2 + local.set $5 + local.get $5 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 1 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 1 + i32.add + local.get $4 + i32.store8 + local.get $3 + i32.const 2 + i32.add + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 2 + i32.sub + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 3 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 3 + i32.add + local.get $4 + i32.store8 + local.get $3 + local.get $5 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store8 + local.get $5 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $3 + i32.sub + i32.const 3 + i32.and + local.set $6 + local.get $3 + local.get $6 + i32.add + local.set $3 + local.get $5 + local.get $6 + i32.sub + local.set $5 + local.get $5 + i32.const -4 + i32.and + local.set $5 + i32.const -1 + i32.const 255 + i32.div_u + local.get $4 + i32.const 255 + i32.and + i32.mul + local.set $7 + local.get $3 + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 4 + i32.sub + local.get $7 + i32.store + local.get $5 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 4 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 8 + i32.add + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 12 + i32.sub + local.get $7 + i32.store + local.get $3 + local.get $5 + i32.add + i32.const 8 + i32.sub + local.get $7 + i32.store + local.get $5 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $3 + i32.const 12 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 16 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 20 + i32.add + local.get $7 + i32.store + local.get $3 + i32.const 24 + i32.add + local.get $7 i32.store local.get $3 - end - ) - (func $~lib/string/String#slice (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - call $~lib/runtime/StringBase#get:length - local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 + local.get $5 + i32.add + i32.const 28 + i32.sub + local.get $7 + i32.store local.get $3 + local.get $5 i32.add - local.tee $4 - i32.const 0 - local.tee $5 - local.get $4 + i32.const 24 + i32.sub + local.get $7 + i32.store + local.get $3 local.get $5 - i32.gt_s - select - else - local.get $1 - local.tee $4 + i32.add + i32.const 20 + i32.sub + local.get $7 + i32.store local.get $3 - local.tee $5 - local.get $4 local.get $5 - i32.lt_s - select - end - local.set $6 - local.get $2 - i32.const 0 - i32.lt_s - if (result i32) - local.get $2 + i32.add + i32.const 16 + i32.sub + local.get $7 + i32.store + i32.const 24 local.get $3 + i32.const 4 + i32.and i32.add - local.tee $4 - i32.const 0 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_s - select - else - local.get $2 - local.tee $4 + local.set $6 local.get $3 - local.tee $5 - local.get $4 - local.get $5 - i32.lt_s - select - end - local.set $7 - local.get $7 - local.get $6 - i32.sub - local.set $3 - local.get $3 - i32.const 0 - i32.le_s - if - i32.const 312 - return - end - local.get $3 - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC - local.set $8 - block $~lib/runtime/memory.copy|inlined.9 - local.get $8 - local.set $4 - local.get $0 local.get $6 - i32.const 1 - i32.shl i32.add - local.set $5 - local.get $3 - i32.const 1 - i32.shl - local.set $9 - local.get $4 + local.set $3 local.get $5 - local.get $9 - call $~lib/internal/memory/memmove - end - block $~lib/runtime/REGISTER|inlined.6 (result i32) - local.get $8 - local.set $9 - local.get $9 - call $~lib/runtime/unref - i32.const 1 - i32.store - local.get $9 - end - ) - (func $~lib/string/String#slice|trampoline (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange + local.get $6 + i32.sub + local.set $5 + local.get $7 + i64.extend_i32_u + local.get $7 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $8 + block $break|0 + loop $continue|0 + local.get $5 + i32.const 32 + i32.ge_u + if + block + local.get $3 + local.get $8 + i64.store + local.get $3 + i32.const 8 + i32.add + local.get $8 + i64.store + local.get $3 + i32.const 16 + i32.add + local.get $8 + i64.store + local.get $3 + i32.const 24 + i32.add + local.get $8 + i64.store + local.get $5 + i32.const 32 + i32.sub + local.set $5 + local.get $3 + i32.const 32 + i32.add + local.set $3 + end + br $continue|0 + end end - unreachable end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $2 end - local.get $0 - local.get $1 - local.get $2 - call $~lib/string/String#slice - ) - (func $~lib/internal/arraybuffer/computeSize (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 8 - i32.add - i32.const 1 - i32.sub - i32.clz - i32.sub - i32.shl ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH + i32.gt_u if i32.const 0 - i32.const 1432 - i32.const 26 - i32.const 2 + i32.const 1392 + i32.const 24 + i32.const 43 call $~lib/env/abort unreachable end - local.get $0 - call $~lib/internal/arraybuffer/computeSize - call $~lib/allocator/arena/memory.allocate - local.set $1 + block $~lib/runtime/ALLOCATE|inlined.7 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end + local.set $3 + local.get $3 + i32.const 0 local.get $1 + call $~lib/memory/memory.fill + block $~lib/runtime/REGISTER|inlined.0 (result i32) + local.get $3 + local.set $2 + local.get $2 + i32.const 2 + call $~lib/runtime/doRegister + end + ) + (func $~lib/runtime/ALLOCATE (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.store - local.get $1 + call $~lib/runtime/doAllocate ) - (func $~lib/array/Array#constructor (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $1 - i32.const 268435454 + global.get $~lib/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u i32.gt_u if i32.const 0 - i32.const 1392 - i32.const 45 - i32.const 39 + i32.const 136 + i32.const 223 + i32.const 57 call $~lib/env/abort unreachable end + i32.const 0 local.get $1 - i32.const 2 - i32.shl - local.set $2 local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe + i32.shl + local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 block (result i32) local.get $0 i32.eqz if - i32.const 8 - call $~lib/allocator/arena/memory.allocate + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $4 + local.get $4 + i32.const 3 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -3975,251 +3858,296 @@ i32.const 0 i32.store offset=4 local.get $0 - end - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/runtime/memory.fill|inlined.1 - local.get $3 - i32.const 8 - i32.add - local.set $4 i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - local.get $0 - ) - (func $~lib/array/Array#__unchecked_set (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 + i32.store offset=8 + local.get $0 + end local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $6 + i32.store + local.get $0 + local.get $3 + i32.store offset=4 + local.get $0 + local.get $3 + local.get $1 i32.add - local.get $5 i32.store offset=8 + local.get $0 ) - (func $~lib/array/Array#__unchecked_get (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 i32) local.get $0 - i32.load - local.set $2 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 4 + call $~lib/runtime/doRegister + end local.get $1 - local.set $3 - i32.const 0 - local.set $4 - local.get $2 - local.get $3 i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 ) - (func $~lib/allocator/arena/memory.free (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) - nop + (func $~lib/memory/memory.free (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + local.set $1 ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doReallocate (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $0 - i32.load + global.get $~lib/runtime/HEADER_SIZE + i32.sub local.set $2 - local.get $1 local.get $2 - i32.gt_s + i32.load offset=4 + local.set $3 + local.get $3 + local.get $1 + i32.lt_u if local.get $1 - i32.const 1073741816 - i32.le_s - i32.eqz - if - i32.const 0 - i32.const 1432 - i32.const 40 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - local.get $2 - call $~lib/internal/arraybuffer/computeSize - i32.const 8 - i32.sub - i32.le_s + call $~lib/runtime/adjustToBlock + local.set $4 + local.get $3 + call $~lib/runtime/adjustToBlock + i32.const 0 + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + select + local.get $4 + i32.lt_u if - local.get $0 - local.get $1 + local.get $4 + call $~lib/memory/memory.allocate + local.set $5 + local.get $5 + local.get $2 + i32.load i32.store - else + local.get $5 + global.get $~lib/runtime/HEADER_SIZE + i32.add + local.set $6 + local.get $6 + local.get $0 + local.get $3 + call $~lib/memory/memory.copy + local.get $6 + local.get $3 + i32.add + i32.const 0 local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/runtime/memory.copy|inlined.11 - local.get $3 - i32.const 8 - i32.add - local.set $4 + local.get $3 + i32.sub + call $~lib/memory/memory.fill + local.get $2 + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + if local.get $0 - i32.const 8 - i32.add - local.set $5 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 136 + i32.const 100 + i32.const 8 + call $~lib/env/abort + unreachable + end local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.free + else + nop end - local.get $0 - call $~lib/allocator/arena/memory.free - local.get $3 + local.get $5 + local.set $2 + local.get $6 local.set $0 - end - block $~lib/runtime/memory.fill|inlined.2 + else local.get $0 - i32.const 8 - i32.add - local.get $2 + local.get $3 i32.add - local.set $3 i32.const 0 - local.set $6 local.get $1 - local.get $2 - i32.sub - local.set $5 local.get $3 - local.get $6 - local.get $5 - call $~lib/internal/memory/memset + i32.sub + call $~lib/memory/memory.fill end else - local.get $1 - local.get $2 - i32.lt_s - if - local.get $1 - i32.const 0 - i32.ge_s - i32.eqz - if - i32.const 0 - i32.const 1432 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - i32.store - end + nop end + local.get $2 + local.get $1 + i32.store offset=4 local.get $0 ) - (func $~lib/array/Array#push (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#resize (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - i32.load offset=4 - local.set $2 local.get $0 i32.load - local.set $3 - local.get $3 - i32.load + local.set $2 + local.get $2 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 2 i32.shr_u - local.set $4 - local.get $2 - i32.const 1 - i32.add - local.set $5 - local.get $2 - local.get $4 - i32.ge_u + local.set $3 + local.get $1 + local.get $3 + i32.gt_u if - local.get $2 + local.get $1 i32.const 268435454 - i32.ge_u + i32.gt_u if i32.const 0 - i32.const 1392 - i32.const 182 - i32.const 42 + i32.const 1440 + i32.const 37 + i32.const 41 call $~lib/env/abort unreachable end - local.get $3 - local.get $5 + local.get $1 i32.const 2 i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store - end - local.get $0 - local.get $5 - i32.store offset=4 - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $3 + local.set $4 + block $~lib/runtime/REALLOCATE|inlined.0 (result i32) + local.get $2 + local.set $5 + local.get $4 + local.set $6 + local.get $5 + local.get $6 + call $~lib/runtime/doReallocate + end local.set $6 + local.get $6 local.get $2 - local.set $7 + i32.ne + if + local.get $0 + local.get $6 + i32.store + local.get $0 + local.get $6 + i32.store offset=4 + local.get $0 + local.get $6 + local.get $4 + i32.add + i32.store offset=8 + end + end + ) + (func $~lib/array/Array#__set (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + call $~lib/array/Array#resize + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 local.get $1 - local.set $8 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $~lib/runtime/assertRegistered (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.ne + i32.eqz + if i32.const 0 - local.set $9 - local.get $6 - local.get $7 + i32.const 136 + i32.const 196 i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 + call $~lib/env/abort + unreachable end - local.get $5 ) - (func $~lib/string/String#split (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/doLink (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + call $~lib/runtime/assertRegistered + local.get $1 + call $~lib/runtime/assertRegistered + ) + (func $~lib/runtime/LINK> (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/runtime/doLink + ) + (func $~lib/array/Array#push (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + i32.const 1 + i32.add + local.set $2 + local.get $0 + local.get $2 + call $~lib/array/Array#resize + local.get $0 + local.get $2 + i32.store offset=12 + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + i32.add + local.get $1 + i32.store + local.get $2 + ) + (func $~lib/string/String#split (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4232,9 +4160,6 @@ (local $12 i32) (local $13 i32) (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) local.get $0 i32.const 0 i32.ne @@ -4242,7 +4167,7 @@ if i32.const 0 i32.const 96 - i32.const 376 + i32.const 351 i32.const 4 call $~lib/env/abort unreachable @@ -4267,16 +4192,16 @@ local.get $3 i32.const 0 local.get $0 - call $~lib/array/Array#__unchecked_set + call $~lib/array/Array#__set local.get $3 end return end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $4 local.get $1 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $5 local.get $2 i32.const 0 @@ -4310,7 +4235,7 @@ call $~lib/array/Array#constructor local.set $3 local.get $3 - i32.load + i32.load offset=4 local.set $6 block $break|0 i32.const 0 @@ -4322,8 +4247,12 @@ i32.eqz br_if $break|0 block - i32.const 2 - call $~lib/runtime/ALLOC + block $~lib/runtime/ALLOCATE|inlined.8 (result i32) + i32.const 2 + local.set $8 + local.get $8 + call $~lib/runtime/doAllocate + end local.set $8 local.get $8 local.get $0 @@ -4333,25 +4262,22 @@ i32.add i32.load16_u i32.store16 - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $6 - local.set $9 - local.get $7 - local.set $10 + local.get $6 + local.get $7 + i32.const 2 + i32.shl + i32.add + block $~lib/runtime/REGISTER|inlined.7 (result i32) local.get $8 - local.set $11 - i32.const 0 - local.set $12 + local.set $9 local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - local.get $11 - i32.store offset=8 + i32.const 1 + call $~lib/runtime/doRegister end + i32.store + local.get $8 + local.get $3 + call $~lib/runtime/LINK> end local.get $7 i32.const 1 @@ -4372,18 +4298,10 @@ i32.const 1 call $~lib/array/Array#constructor local.set $6 - block (result i32) - local.get $6 - local.tee $3 - i32.const 0 - local.tee $7 - i32.const 312 - call $~lib/array/Array#__unchecked_set - local.get $3 - local.get $7 - call $~lib/array/Array#__unchecked_get - end - drop + local.get $6 + i32.load offset=4 + i32.const 312 + i32.store local.get $6 return end @@ -4391,93 +4309,87 @@ i32.const 0 i32.const 0 call $~lib/array/Array#constructor - local.set $13 + local.set $10 i32.const 0 - local.set $14 + local.set $11 i32.const 0 - local.set $15 + local.set $12 i32.const 0 - local.set $16 + local.set $13 block $break|1 loop $continue|1 local.get $0 local.get $1 - local.get $15 + local.get $12 call $~lib/string/String#indexOf - local.tee $14 + local.tee $11 i32.const -1 i32.ne if block - local.get $14 - local.get $15 + local.get $11 + local.get $12 i32.sub local.set $6 local.get $6 i32.const 0 i32.gt_s if + block $~lib/runtime/ALLOCATE|inlined.9 (result i32) + local.get $6 + i32.const 1 + i32.shl + local.set $3 + local.get $3 + call $~lib/runtime/doAllocate + end + local.set $3 + local.get $3 + local.get $0 + local.get $12 + i32.const 1 + i32.shl + i32.add local.get $6 i32.const 1 i32.shl - call $~lib/runtime/ALLOC - local.set $3 - block $~lib/runtime/memory.copy|inlined.10 + call $~lib/memory/memory.copy + local.get $10 + block $~lib/runtime/REGISTER|inlined.8 (result i32) local.get $3 local.set $7 - local.get $0 - local.get $15 - i32.const 1 - i32.shl - i32.add - local.set $8 - local.get $6 - i32.const 1 - i32.shl - local.set $12 local.get $7 - local.get $8 - local.get $12 - call $~lib/internal/memory/memmove - end - local.get $13 - block $~lib/runtime/REGISTER|inlined.7 (result i32) - local.get $3 - local.set $12 - local.get $12 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $12 + call $~lib/runtime/doRegister end call $~lib/array/Array#push drop else - local.get $13 + local.get $10 i32.const 312 call $~lib/array/Array#push drop end - local.get $16 + local.get $13 i32.const 1 i32.add - local.tee $16 + local.tee $13 local.get $2 i32.eq if - local.get $13 + local.get $10 return end - local.get $14 + local.get $11 local.get $5 i32.add - local.set $15 + local.set $12 end br $continue|1 end end end - local.get $15 + local.get $12 i32.eqz if i32.const 0 @@ -4487,124 +4399,73 @@ block (result i32) local.get $6 local.tee $3 - i32.const 0 - local.tee $12 - local.get $0 - call $~lib/array/Array#__unchecked_set + i32.load offset=4 + block $~lib/runtime/LINK>|inlined.0 (result i32) + local.get $0 + local.set $7 + local.get $7 + local.get $3 + call $~lib/runtime/doLink + local.get $7 + end + local.tee $3 + i32.store local.get $3 - local.get $12 - call $~lib/array/Array#__unchecked_get end drop local.get $6 return end local.get $4 - local.get $15 + local.get $12 i32.sub - local.set $17 - local.get $17 + local.set $14 + local.get $14 i32.const 0 i32.gt_s if - local.get $17 + block $~lib/runtime/ALLOCATE|inlined.10 (result i32) + local.get $14 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $6 + local.get $6 + local.get $0 + local.get $12 i32.const 1 i32.shl - call $~lib/runtime/ALLOC - local.set $6 - block $~lib/runtime/memory.copy|inlined.12 + i32.add + local.get $14 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $10 + block $~lib/runtime/REGISTER|inlined.9 (result i32) local.get $6 local.set $3 - local.get $0 - local.get $15 - i32.const 1 - i32.shl - i32.add - local.set $12 - local.get $17 - i32.const 1 - i32.shl - local.set $8 local.get $3 - local.get $12 - local.get $8 - call $~lib/internal/memory/memmove - end - local.get $13 - block $~lib/runtime/REGISTER|inlined.8 (result i32) - local.get $6 - local.set $8 - local.get $8 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $8 + call $~lib/runtime/doRegister end call $~lib/array/Array#push drop else - local.get $13 + local.get $10 i32.const 312 call $~lib/array/Array#push drop end - local.get $13 - ) - (func $~lib/string/String#split|trampoline (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $1 - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/string/String#split + local.get $10 ) - (func $~lib/array/Array#__get (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#get:length (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=12 ) - (func $~lib/internal/number/decimalCount32 (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -4673,19 +4534,16 @@ unreachable unreachable ) - (func $~lib/internal/number/utoa32_lut (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i64) - (local $12 i64) - i32.const 2168 - i32.load + (local $8 i64) + (local $9 i64) + i32.const 2056 + i32.load offset=4 local.set $3 block $break|0 loop $continue|0 @@ -4702,50 +4560,30 @@ i32.const 10000 i32.rem_u local.set $5 - local.get $4 - local.set $1 - local.get $5 - i32.const 100 - i32.div_u - local.set $6 - local.get $5 - i32.const 100 - i32.rem_u - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $3 - local.set $8 - local.get $6 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i64.load32_u offset=8 - end - local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i64) - local.get $3 - local.set $10 - local.get $7 - local.set $9 - i32.const 0 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i64.load32_u offset=8 - end - local.set $12 + local.get $4 + local.set $1 + local.get $5 + i32.const 100 + i32.div_u + local.set $6 + local.get $5 + i32.const 100 + i32.rem_u + local.set $7 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $8 + local.get $3 + local.get $7 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $9 local.get $2 i32.const 4 i32.sub @@ -4755,8 +4593,8 @@ i32.const 1 i32.shl i32.add - local.get $11 - local.get $12 + local.get $8 + local.get $9 i64.const 32 i64.shl i64.or @@ -4784,29 +4622,19 @@ i32.const 2 i32.sub local.set $2 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $3 - local.set $5 - local.get $6 - local.set $4 - i32.const 0 - local.set $8 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $8 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $8 + local.get $5 i32.store end local.get $1 @@ -4817,29 +4645,19 @@ i32.const 2 i32.sub local.set $2 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $3 - local.set $8 - local.get $1 - local.set $6 - i32.const 0 - local.set $7 - local.get $8 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $7 + local.get $5 i32.store else local.get $2 @@ -4849,17 +4667,17 @@ i32.const 48 local.get $1 i32.add - local.set $7 + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $7 + local.get $5 i32.store16 end ) - (func $~lib/internal/number/itoa32 (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4884,44 +4702,46 @@ local.set $0 end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.set $2 - local.get $2 - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC - local.set $3 - block $~lib/internal/number/utoa32_core|inlined.0 + block $~lib/runtime/ALLOCATE|inlined.11 (result i32) + local.get $2 + i32.const 1 + i32.shl + local.set $3 local.get $3 - local.set $4 + call $~lib/runtime/doAllocate + end + local.set $4 + block $~lib/util/number/utoa32_core|inlined.0 + local.get $4 + local.set $3 local.get $0 local.set $5 local.get $2 local.set $6 - local.get $4 + local.get $3 local.get $5 local.get $6 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $1 if - local.get $3 + local.get $4 i32.const 45 i32.store16 end - block $~lib/runtime/REGISTER|inlined.9 (result i32) - local.get $3 + block $~lib/runtime/REGISTER|inlined.10 (result i32) + local.get $4 local.set $6 local.get $6 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $6 + call $~lib/runtime/doRegister end ) - (func $~lib/internal/number/utoa32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4934,36 +4754,38 @@ return end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $1 - local.get $1 - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC - local.set $2 - block $~lib/internal/number/utoa32_core|inlined.1 + block $~lib/runtime/ALLOCATE|inlined.12 (result i32) + local.get $1 + i32.const 1 + i32.shl + local.set $2 local.get $2 - local.set $3 + call $~lib/runtime/doAllocate + end + local.set $3 + block $~lib/util/number/utoa32_core|inlined.1 + local.get $3 + local.set $2 local.get $0 local.set $4 local.get $1 local.set $5 - local.get $3 + local.get $2 local.get $4 local.get $5 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end - block $~lib/runtime/REGISTER|inlined.10 (result i32) - local.get $2 + block $~lib/runtime/REGISTER|inlined.11 (result i32) + local.get $3 local.set $5 local.get $5 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $5 + call $~lib/runtime/doRegister end ) - (func $~lib/internal/number/decimalCount64 (; 52 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 53 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -5032,7 +4854,7 @@ unreachable unreachable ) - (func $~lib/internal/number/utoa64_lut (; 53 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 54 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -5042,13 +4864,10 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i64) - (local $16 i64) - i32.const 2168 - i32.load + (local $12 i64) + (local $13 i64) + i32.const 2056 + i32.load offset=4 local.set $3 block $break|0 loop $continue|0 @@ -5094,40 +4913,20 @@ i32.const 100 i32.rem_u local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i64) - local.get $3 - local.set $12 - local.get $10 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i64.load32_u offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i64) - local.get $3 - local.set $14 - local.get $11 - local.set $13 - i32.const 0 - local.set $12 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i64.load32_u offset=8 - end - local.set $16 + local.get $3 + local.get $10 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $12 + local.get $3 + local.get $11 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $13 local.get $2 i32.const 4 i32.sub @@ -5137,46 +4936,26 @@ i32.const 1 i32.shl i32.add - local.get $15 - local.get $16 + local.get $12 + local.get $13 i64.const 32 i64.shl i64.or i64.store - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result i64) - local.get $3 - local.set $12 - local.get $8 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i64.load32_u offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i64) - local.get $3 - local.set $14 - local.get $9 - local.set $13 - i32.const 0 - local.set $12 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i64.load32_u offset=8 - end - local.set $16 + local.get $3 + local.get $8 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $12 + local.get $3 + local.get $9 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $13 local.get $2 i32.const 4 i32.sub @@ -5186,8 +4965,8 @@ i32.const 1 i32.shl i32.add - local.get $15 - local.get $16 + local.get $12 + local.get $13 i64.const 32 i64.shl i64.or @@ -5201,9 +4980,9 @@ local.get $1 i32.wrap_i64 local.get $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut ) - (func $~lib/internal/number/utoa64 (; 54 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 55 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5226,14 +5005,18 @@ i32.wrap_i64 local.set $2 local.get $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 - local.get $3 - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC + block $~lib/runtime/ALLOCATE|inlined.13 (result i32) + local.get $3 + i32.const 1 + i32.shl + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + end local.set $1 - block $~lib/internal/number/utoa32_core|inlined.2 + block $~lib/util/number/utoa32_core|inlined.2 local.get $1 local.set $4 local.get $2 @@ -5243,18 +5026,22 @@ local.get $4 local.get $5 local.get $6 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.set $3 - local.get $3 - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC + block $~lib/runtime/ALLOCATE|inlined.14 (result i32) + local.get $3 + i32.const 1 + i32.shl + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $1 - block $~lib/internal/number/utoa64_core|inlined.0 + block $~lib/util/number/utoa64_core|inlined.0 local.get $1 local.set $2 local.get $0 @@ -5264,20 +5051,18 @@ local.get $2 local.get $7 local.get $6 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end end - block $~lib/runtime/REGISTER|inlined.11 (result i32) + block $~lib/runtime/REGISTER|inlined.12 (result i32) local.get $1 local.set $3 local.get $3 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $3 + call $~lib/runtime/doRegister end ) - (func $~lib/internal/number/itoa64 (; 55 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 56 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5312,16 +5097,20 @@ i32.wrap_i64 local.set $3 local.get $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.set $4 - local.get $4 - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC + block $~lib/runtime/ALLOCATE|inlined.15 (result i32) + local.get $4 + i32.const 1 + i32.shl + local.set $5 + local.get $5 + call $~lib/runtime/doAllocate + end local.set $2 - block $~lib/internal/number/utoa32_core|inlined.3 + block $~lib/util/number/utoa32_core|inlined.3 local.get $2 local.set $5 local.get $3 @@ -5331,20 +5120,24 @@ local.get $5 local.get $6 local.get $7 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.get $1 i32.add local.set $4 - local.get $4 - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC + block $~lib/runtime/ALLOCATE|inlined.16 (result i32) + local.get $4 + i32.const 1 + i32.shl + local.set $3 + local.get $3 + call $~lib/runtime/doAllocate + end local.set $2 - block $~lib/internal/number/utoa64_core|inlined.1 + block $~lib/util/number/utoa64_core|inlined.1 local.get $2 local.set $3 local.get $0 @@ -5354,7 +5147,7 @@ local.get $3 local.get $8 local.get $7 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end end local.get $1 @@ -5363,29 +5156,27 @@ i32.const 45 i32.store16 end - block $~lib/runtime/REGISTER|inlined.12 (result i32) + block $~lib/runtime/REGISTER|inlined.13 (result i32) local.get $2 local.set $4 local.get $4 - call $~lib/runtime/unref i32.const 1 - i32.store - local.get $4 + call $~lib/runtime/doRegister end ) - (func $~lib/builtins/isFinite (; 56 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 57 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 57 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 58 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/internal/number/genDigits (; 58 ;) (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 (; 59 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -5402,11 +5193,11 @@ (local $20 i32) (local $21 i64) (local $22 i64) - (local $23 i32) - (local $24 i32) + (local $23 i64) + (local $24 i64) (local $25 i32) - (local $26 i64) - (local $27 i64) + (local $26 i32) + (local $27 i32) i32.const 0 local.get $4 i32.sub @@ -5437,12 +5228,12 @@ i64.and local.set $13 local.get $12 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $14 local.get $6 local.set $15 - i32.const 4576 - i32.load + i32.const 4104 + i32.load offset=4 local.set $16 block $break|0 loop $continue|0 @@ -5690,11 +5481,11 @@ local.get $5 i64.le_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $14 i32.add - global.set $~lib/internal/number/_K - block $~lib/internal/number/grisuRound|inlined.0 + global.set $~lib/util/number/_K + block $~lib/util/number/grisuRound|inlined.0 local.get $0 local.set $18 local.get $15 @@ -5703,28 +5494,18 @@ local.set $21 local.get $19 local.set $22 - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result i64) - local.get $16 - local.set $23 - local.get $14 - local.set $24 - i32.const 0 - local.set $25 - local.get $23 - local.get $24 - i32.const 2 - i32.shl - i32.add - local.get $25 - i32.add - i64.load32_u offset=8 - end + local.get $16 + local.get $14 + i32.const 2 + i32.shl + i32.add + i64.load32_u local.get $7 i64.extend_i32_s i64.shl - local.set $26 + local.set $23 local.get $10 - local.set $27 + local.set $24 local.get $18 local.get $20 i32.const 1 @@ -5735,54 +5516,54 @@ local.set $25 local.get $25 i32.load16_u - local.set $24 + local.set $26 block $break|2 loop $continue|2 local.get $22 - local.get $27 + local.get $24 i64.lt_u - local.tee $23 + local.tee $27 if (result i32) local.get $21 local.get $22 i64.sub - local.get $26 + local.get $23 i64.ge_u else - local.get $23 + local.get $27 end - local.tee $23 + local.tee $27 if (result i32) local.get $22 - local.get $26 + local.get $23 i64.add - local.get $27 + local.get $24 i64.lt_u - local.tee $23 + local.tee $27 if (result i32) - local.get $23 - else local.get $27 + else + local.get $24 local.get $22 i64.sub local.get $22 - local.get $26 + local.get $23 i64.add - local.get $27 + local.get $24 i64.sub i64.gt_u end else - local.get $23 + local.get $27 end if block - local.get $24 + local.get $26 i32.const 1 i32.sub - local.set $24 + local.set $26 local.get $22 - local.get $26 + local.get $23 i64.add local.set $22 end @@ -5791,7 +5572,7 @@ end end local.get $25 - local.get $24 + local.get $26 i32.store16 end local.get $15 @@ -5859,64 +5640,54 @@ local.get $5 i64.lt_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $14 i32.add - global.set $~lib/internal/number/_K + global.set $~lib/util/number/_K local.get $10 - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i64) - local.get $16 - local.set $17 - i32.const 0 - local.get $14 - i32.sub - local.set $24 - i32.const 0 - local.set $25 - local.get $17 - local.get $24 - i32.const 2 - i32.shl - i32.add - local.get $25 - i32.add - i64.load32_u offset=8 - end + local.get $16 + i32.const 0 + local.get $14 + i32.sub + i32.const 2 + i32.shl + i32.add + i64.load32_u i64.mul local.set $10 - block $~lib/internal/number/grisuRound|inlined.1 + block $~lib/util/number/grisuRound|inlined.1 local.get $0 - local.set $25 + local.set $17 local.get $15 - local.set $24 + local.set $26 local.get $5 - local.set $27 + local.set $24 local.get $13 - local.set $26 + local.set $23 local.get $8 local.set $22 local.get $10 local.set $21 - local.get $25 - local.get $24 + local.get $17 + local.get $26 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $17 - local.get $17 + local.set $25 + local.get $25 i32.load16_u local.set $20 block $break|4 loop $continue|4 - local.get $26 + local.get $23 local.get $21 i64.lt_u local.tee $18 if (result i32) - local.get $27 - local.get $26 + local.get $24 + local.get $23 i64.sub local.get $22 i64.ge_u @@ -5925,7 +5696,7 @@ end local.tee $18 if (result i32) - local.get $26 + local.get $23 local.get $22 i64.add local.get $21 @@ -5935,9 +5706,9 @@ local.get $18 else local.get $21 - local.get $26 + local.get $23 i64.sub - local.get $26 + local.get $23 local.get $22 i64.add local.get $21 @@ -5953,16 +5724,16 @@ i32.const 1 i32.sub local.set $20 - local.get $26 + local.get $23 local.get $22 i64.add - local.set $26 + local.set $23 end br $continue|4 end end end - local.get $17 + local.get $25 local.get $20 i32.store16 end @@ -5976,7 +5747,7 @@ end local.get $15 ) - (func $~lib/internal/number/prettify (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6080,24 +5851,16 @@ i32.shl i32.add local.set $4 - block $~lib/runtime/memory.copy|inlined.13 - local.get $4 - i32.const 2 - i32.add - local.set $5 - local.get $4 - local.set $6 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - local.set $7 - local.get $5 - local.get $6 - local.get $7 - call $~lib/internal/memory/memmove - end + local.get $4 + i32.const 2 + i32.add + local.get $4 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 local.get $3 i32.const 1 @@ -6126,24 +5889,16 @@ local.get $3 i32.sub local.set $4 - block $~lib/runtime/memory.copy|inlined.14 - local.get $0 - local.get $4 - i32.const 1 - i32.shl - i32.add - local.set $7 - local.get $0 - local.set $6 - local.get $1 - i32.const 1 - i32.shl - local.set $5 - local.get $7 - local.get $6 - local.get $5 - call $~lib/internal/memory/memmove - end + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $1 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 i32.const 48 i32.const 46 @@ -6188,7 +5943,7 @@ local.get $0 i32.const 101 i32.store16 offset=2 - block $~lib/internal/number/genExponent|inlined.0 (result i32) + block $~lib/util/number/genExponent|inlined.0 (result i32) local.get $0 i32.const 4 i32.add @@ -6209,11 +5964,11 @@ local.set $5 end local.get $5 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.set $7 - block $~lib/internal/number/utoa32_core|inlined.4 + block $~lib/util/number/utoa32_core|inlined.4 local.get $4 local.set $8 local.get $5 @@ -6223,7 +5978,7 @@ local.get $8 local.get $9 local.get $10 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $4 i32.const 45 @@ -6243,24 +5998,16 @@ i32.const 1 i32.shl local.set $7 - block $~lib/runtime/memory.copy|inlined.15 - local.get $0 - i32.const 4 - i32.add - local.set $6 - local.get $0 - i32.const 2 - i32.add - local.set $5 - local.get $7 - i32.const 2 - i32.sub - local.set $4 - local.get $6 - local.get $5 - local.get $4 - call $~lib/internal/memory/memmove - end + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $7 + i32.const 2 + i32.sub + call $~lib/memory/memory.copy local.get $0 i32.const 46 i32.store16 offset=2 @@ -6270,13 +6017,13 @@ i32.const 101 i32.store16 offset=2 local.get $1 - block $~lib/internal/number/genExponent|inlined.1 (result i32) + block $~lib/util/number/genExponent|inlined.1 (result i32) local.get $0 local.get $7 i32.add i32.const 4 i32.add - local.set $4 + local.set $6 local.get $3 i32.const 1 i32.sub @@ -6284,8 +6031,8 @@ local.get $5 i32.const 0 i32.lt_s - local.set $6 - local.get $6 + local.set $4 + local.get $4 if i32.const 0 local.get $5 @@ -6293,12 +6040,12 @@ local.set $5 end local.get $5 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.set $10 - block $~lib/internal/number/utoa32_core|inlined.5 - local.get $4 + block $~lib/util/number/utoa32_core|inlined.5 + local.get $6 local.set $9 local.get $5 local.set $8 @@ -6307,12 +6054,12 @@ local.get $9 local.get $8 local.get $11 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end - local.get $4 + local.get $6 i32.const 45 i32.const 43 - local.get $6 + local.get $4 select i32.store16 local.get $10 @@ -6333,7 +6080,7 @@ unreachable unreachable ) - (func $~lib/internal/number/dtoa_core (; 60 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 61 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -6349,21 +6096,18 @@ (local $14 i32) (local $15 i32) (local $16 f64) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) + (local $17 i64) + (local $18 i64) + (local $19 i64) + (local $20 i64) (local $21 i64) (local $22 i64) (local $23 i64) (local $24 i64) (local $25 i64) - (local $26 i64) + (local $26 i32) (local $27 i64) - (local $28 i64) - (local $29 i64) - (local $30 i64) - (local $31 i32) + (local $28 i32) local.get $1 f64.const 0 f64.lt @@ -6377,7 +6121,7 @@ i32.const 45 i32.store16 end - block $~lib/internal/number/grisu2|inlined.0 (result i32) + block $~lib/util/number/grisu2|inlined.0 (result i32) local.get $1 local.set $3 local.get $0 @@ -6418,7 +6162,7 @@ i32.add i32.sub local.set $7 - block $~lib/internal/number/normalizedBoundaries|inlined.0 + block $~lib/util/number/normalizedBoundaries|inlined.0 local.get $9 local.set $10 local.get $7 @@ -6453,7 +6197,7 @@ i32.add local.set $15 local.get $12 - global.set $~lib/internal/number/_frc_plus + global.set $~lib/util/number/_frc_plus local.get $10 local.get $15 i64.extend_i32_s @@ -6467,12 +6211,12 @@ i32.sub i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_minus + global.set $~lib/util/number/_frc_minus local.get $13 - global.set $~lib/internal/number/_exp + global.set $~lib/util/number/_exp end - block $~lib/internal/number/getCachedPower|inlined.0 - global.get $~lib/internal/number/_exp + block $~lib/util/number/getCachedPower|inlined.0 + global.get $~lib/util/number/_exp local.set $15 i32.const -61 local.get $15 @@ -6504,309 +6248,285 @@ i32.const 3 i32.shl i32.sub - global.set $~lib/internal/number/_K - i32.const 4240 - i32.load - local.set $11 - i32.const 4504 - i32.load - local.set $17 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $11 - local.set $18 - local.get $13 - local.set $19 - i32.const 0 - local.set $20 - local.get $18 - local.get $19 - i32.const 3 - i32.shl - i32.add - local.get $20 - i32.add - i64.load offset=8 - end - global.set $~lib/internal/number/_frc_pow - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $17 - local.set $20 - local.get $13 - local.set $19 - i32.const 0 - local.set $18 - local.get $20 - local.get $19 - i32.const 1 - i32.shl - i32.add - local.get $18 - i32.add - i32.load16_s offset=8 - end - global.set $~lib/internal/number/_exp_pow + global.set $~lib/util/number/_K + i32.const 3824 + i32.load offset=4 + local.get $13 + i32.const 3 + i32.shl + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 4032 + i32.load offset=4 + local.get $13 + i32.const 1 + i32.shl + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow end local.get $9 i64.clz i32.wrap_i64 - local.set $17 + local.set $13 local.get $9 - local.get $17 + local.get $13 i64.extend_i32_s i64.shl local.set $9 local.get $7 - local.get $17 + local.get $13 i32.sub local.set $7 - global.get $~lib/internal/number/_frc_pow + global.get $~lib/util/number/_frc_pow local.set $12 - global.get $~lib/internal/number/_exp_pow - local.set $11 - block $~lib/internal/number/umul64f|inlined.0 (result i64) + global.get $~lib/util/number/_exp_pow + local.set $14 + block $~lib/util/number/umul64f|inlined.0 (result i64) local.get $9 local.set $10 local.get $12 - local.set $21 + local.set $17 local.get $10 i64.const 4294967295 i64.and - local.set $22 - local.get $21 + local.set $18 + local.get $17 i64.const 4294967295 i64.and - local.set $23 + local.set $19 local.get $10 i64.const 32 i64.shr_u - local.set $24 - local.get $21 + local.set $20 + local.get $17 i64.const 32 i64.shr_u - local.set $25 - local.get $22 - local.get $23 + local.set $21 + local.get $18 + local.get $19 i64.mul - local.set $26 - local.get $24 - local.get $23 + local.set $22 + local.get $20 + local.get $19 i64.mul - local.get $26 + local.get $22 i64.const 32 i64.shr_u i64.add - local.set $27 - local.get $22 - local.get $25 + local.set $23 + local.get $18 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.const 4294967295 i64.and i64.add - local.set $28 - local.get $28 + local.set $24 + local.get $24 i64.const 2147483647 i64.add - local.set $28 - local.get $27 + local.set $24 + local.get $23 i64.const 32 i64.shr_u - local.set $27 - local.get $28 + local.set $23 + local.get $24 i64.const 32 i64.shr_u - local.set $28 - local.get $24 - local.get $25 + local.set $24 + local.get $20 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.add - local.get $28 + local.get $24 i64.add end - local.set $28 - block $~lib/internal/number/umul64e|inlined.0 (result i32) + local.set $24 + block $~lib/util/number/umul64e|inlined.0 (result i32) local.get $7 - local.set $13 - local.get $11 - local.set $14 - local.get $13 + local.set $15 local.get $14 + local.set $11 + local.get $15 + local.get $11 i32.add i32.const 64 i32.add end - local.set $14 - block $~lib/internal/number/umul64f|inlined.1 (result i64) - global.get $~lib/internal/number/_frc_plus - local.set $27 + local.set $11 + block $~lib/util/number/umul64f|inlined.1 (result i64) + global.get $~lib/util/number/_frc_plus + local.set $23 local.get $12 - local.set $26 - local.get $27 + local.set $22 + local.get $23 i64.const 4294967295 i64.and - local.set $25 - local.get $26 + local.set $21 + local.get $22 i64.const 4294967295 i64.and - local.set $24 - local.get $27 + local.set $20 + local.get $23 i64.const 32 i64.shr_u - local.set $23 - local.get $26 + local.set $19 + local.get $22 i64.const 32 i64.shr_u - local.set $22 - local.get $25 - local.get $24 + local.set $18 + local.get $21 + local.get $20 i64.mul - local.set $21 - local.get $23 - local.get $24 + local.set $17 + local.get $19 + local.get $20 i64.mul - local.get $21 + local.get $17 i64.const 32 i64.shr_u i64.add local.set $10 - local.get $25 - local.get $22 + local.get $21 + local.get $18 i64.mul local.get $10 i64.const 4294967295 i64.and i64.add - local.set $29 - local.get $29 + local.set $25 + local.get $25 i64.const 2147483647 i64.add - local.set $29 + local.set $25 local.get $10 i64.const 32 i64.shr_u local.set $10 - local.get $29 + local.get $25 i64.const 32 i64.shr_u - local.set $29 - local.get $23 - local.get $22 + local.set $25 + local.get $19 + local.get $18 i64.mul local.get $10 i64.add - local.get $29 + local.get $25 i64.add end i64.const 1 i64.sub - local.set $29 - block $~lib/internal/number/umul64e|inlined.1 (result i32) - global.get $~lib/internal/number/_exp - local.set $13 - local.get $11 + local.set $25 + block $~lib/util/number/umul64e|inlined.1 (result i32) + global.get $~lib/util/number/_exp local.set $15 - local.get $13 + local.get $14 + local.set $26 local.get $15 + local.get $26 i32.add i32.const 64 i32.add end - local.set $15 - block $~lib/internal/number/umul64f|inlined.2 (result i64) - global.get $~lib/internal/number/_frc_minus + local.set $26 + block $~lib/util/number/umul64f|inlined.2 (result i64) + global.get $~lib/util/number/_frc_minus local.set $10 local.get $12 - local.set $21 + local.set $17 local.get $10 i64.const 4294967295 i64.and - local.set $22 - local.get $21 + local.set $18 + local.get $17 i64.const 4294967295 i64.and - local.set $23 + local.set $19 local.get $10 i64.const 32 i64.shr_u - local.set $24 - local.get $21 + local.set $20 + local.get $17 i64.const 32 i64.shr_u - local.set $25 - local.get $22 - local.get $23 + local.set $21 + local.get $18 + local.get $19 i64.mul - local.set $26 - local.get $24 - local.get $23 + local.set $22 + local.get $20 + local.get $19 i64.mul - local.get $26 + local.get $22 i64.const 32 i64.shr_u i64.add - local.set $27 - local.get $22 - local.get $25 + local.set $23 + local.get $18 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.const 4294967295 i64.and i64.add - local.set $30 - local.get $30 + local.set $27 + local.get $27 i64.const 2147483647 i64.add - local.set $30 - local.get $27 + local.set $27 + local.get $23 i64.const 32 i64.shr_u - local.set $27 - local.get $30 + local.set $23 + local.get $27 i64.const 32 i64.shr_u - local.set $30 - local.get $24 - local.get $25 + local.set $27 + local.get $20 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.add - local.get $30 + local.get $27 i64.add end i64.const 1 i64.add - local.set $30 - local.get $29 - local.get $30 - i64.sub local.set $27 - local.get $4 - local.get $28 - local.get $14 - local.get $29 - local.get $15 + local.get $25 local.get $27 + i64.sub + local.set $23 + local.get $4 + local.get $24 + local.get $11 + local.get $25 + local.get $26 + local.get $23 local.get $5 - call $~lib/internal/number/genDigits + call $~lib/util/number/genDigits end - local.set $31 + local.set $28 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $31 + local.get $28 local.get $2 i32.sub - global.get $~lib/internal/number/_K - call $~lib/internal/number/prettify - local.set $31 - local.get $31 + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.set $28 + local.get $28 local.get $2 i32.add ) - (func $~lib/string/String#substring (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6815,7 +6535,6 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) local.get $0 i32.const 0 i32.ne @@ -6823,13 +6542,13 @@ if i32.const 0 i32.const 96 - i32.const 215 + i32.const 190 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length local.set $3 local.get $1 local.tee $4 @@ -6901,7 +6620,7 @@ if (result i32) local.get $9 local.get $0 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.const 1 i32.shl i32.eq @@ -6912,47 +6631,45 @@ local.get $0 return end - local.get $3 - call $~lib/runtime/ALLOC - local.set $10 - block $~lib/runtime/memory.copy|inlined.16 - local.get $10 - local.set $4 - local.get $0 - local.get $8 - i32.add - local.set $5 + block $~lib/runtime/ALLOCATE|inlined.18 (result i32) local.get $3 - local.set $11 + local.set $4 local.get $4 - local.get $5 - local.get $11 - call $~lib/internal/memory/memmove + call $~lib/runtime/doAllocate end - block $~lib/runtime/REGISTER|inlined.13 (result i32) + local.set $10 + local.get $10 + local.get $0 + local.get $8 + i32.add + local.get $3 + call $~lib/memory/memory.copy + block $~lib/runtime/REGISTER|inlined.14 (result i32) local.get $10 - local.set $11 - local.get $11 - call $~lib/runtime/unref + local.set $4 + local.get $4 i32.const 1 - i32.store - local.get $11 + call $~lib/runtime/doRegister end ) - (func $~lib/runtime/FREE (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/doDiscard (; 63 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $~lib/runtime/unref - call $~lib/allocator/arena/memory.free + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + call $~lib/memory/memory.free ) - (func $~lib/internal/number/dtoa (; 63 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 64 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $0 f64.const 0 f64.eq if - i32.const 3136 + i32.const 3032 return end local.get $0 @@ -6962,40 +6679,47 @@ local.get $0 call $~lib/builtins/isNaN if - i32.const 3152 + i32.const 3048 return end - i32.const 3168 - i32.const 3200 + i32.const 3064 + i32.const 3096 local.get $0 f64.const 0 f64.lt select return end - i32.const 28 - i32.const 1 - i32.shl - call $~lib/runtime/ALLOC - local.set $1 - local.get $1 - local.get $0 - call $~lib/internal/number/dtoa_core + block $~lib/runtime/ALLOCATE|inlined.17 (result i32) + i32.const 28 + i32.const 1 + i32.shl + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $2 - local.get $1 - i32.const 0 local.get $2 - call $~lib/string/String#substring + local.get $0 + call $~lib/util/number/dtoa_core local.set $3 - local.get $1 - call $~lib/runtime/FREE + local.get $2 + i32.const 0 local.get $3 + call $~lib/string/String#substring + local.set $4 + block $~lib/runtime/DISCARD|inlined.0 + local.get $2 + local.set $1 + local.get $1 + call $~lib/runtime/doDiscard + end + local.get $4 ) - (func $start:std/string (; 64 ;) (type $FUNCSIG$v) + (func $start:std/string (; 65 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) - call $start:~lib/allocator/arena global.get $std/string/str i32.const 16 i32.eq @@ -7009,7 +6733,7 @@ unreachable end global.get $std/string/str - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.const 16 i32.eq i32.eqz @@ -7035,6 +6759,16 @@ call $~lib/env/abort unreachable end + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset i32.const 0 call $~lib/string/String.fromCharCode i32.const 176 @@ -7126,14 +6860,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 256 - i32.const 0 - call $~lib/string/String#endsWith|trampoline - end + global.get $std/string/str + i32.const 256 + global.get $~lib/string/String.MAX_LENGTH + call $~lib/string/String#endsWith i32.eqz if i32.const 0 @@ -7558,14 +7288,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 312 - i32.const 312 - i32.const 0 - call $~lib/string/String#lastIndexOf|trampoline - end + i32.const 312 + i32.const 312 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#lastIndexOf i32.const 0 i32.eq i32.eqz @@ -7577,14 +7303,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 312 - i32.const 224 - i32.const 0 - call $~lib/string/String#lastIndexOf|trampoline - end + i32.const 312 + i32.const 224 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#lastIndexOf i32.const -1 i32.eq i32.eqz @@ -7596,16 +7318,12 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 312 - i32.const 0 - call $~lib/string/String#lastIndexOf|trampoline - end global.get $std/string/str - call $~lib/runtime/StringBase#get:length + i32.const 312 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#lastIndexOf + global.get $std/string/str + call $~lib/string/String#get:length i32.eq i32.eqz if @@ -7616,14 +7334,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 528 - i32.const 0 - call $~lib/string/String#lastIndexOf|trampoline - end + global.get $std/string/str + i32.const 528 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#lastIndexOf i32.const 2 i32.eq i32.eqz @@ -7635,14 +7349,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 544 - i32.const 0 - call $~lib/string/String#lastIndexOf|trampoline - end + global.get $std/string/str + i32.const 544 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#lastIndexOf i32.const -1 i32.eq i32.eqz @@ -7654,14 +7364,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 576 - i32.const 0 - call $~lib/string/String#lastIndexOf|trampoline - end + global.get $std/string/str + i32.const 576 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#lastIndexOf i32.const 15 i32.eq i32.eqz @@ -8330,7 +8036,7 @@ unreachable end i32.const 392 - call $~lib/runtime/StringBase#get:length + call $~lib/string/String#get:length i32.const 3 i32.eq i32.eqz @@ -8470,14 +8176,10 @@ end i32.const 1224 global.set $std/string/str - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 0 - i32.const 0 - call $~lib/string/String#slice|trampoline - end + global.get $std/string/str + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#slice i32.const 1224 call $~lib/string/String.eq i32.eqz @@ -8489,14 +8191,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const -1 - i32.const 0 - call $~lib/string/String#slice|trampoline - end + global.get $std/string/str + i32.const -1 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#slice i32.const 1264 call $~lib/string/String.eq i32.eqz @@ -8508,14 +8206,10 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const -5 - i32.const 0 - call $~lib/string/String#slice|trampoline - end + global.get $std/string/str + i32.const -5 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#slice i32.const 1280 call $~lib/string/String.eq i32.eqz @@ -8587,28 +8281,20 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 0 - global.set $~lib/argc - i32.const 312 - i32.const 0 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 312 + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 1 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 312 call $~lib/string/String.eq else @@ -8623,54 +8309,38 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 312 - i32.const 312 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 312 + i32.const 312 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.1 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 160 - i32.const 0 - call $~lib/env/abort - unreachable - end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 312 - i32.const 528 + i32.const 56 + i32.const 160 i32.const 0 - call $~lib/string/String#split|trampoline + call $~lib/env/abort + unreachable end + i32.const 312 + i32.const 528 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.2 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 1 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 312 call $~lib/string/String.eq else @@ -8685,29 +8355,21 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 1496 - i32.const 1520 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 1480 + i32.const 1504 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.3 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 1 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get - i32.const 1496 + i32.load offset=4 + i32.load + i32.const 1480 call $~lib/string/String.eq else local.get $2 @@ -8721,28 +8383,20 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 1496 - i32.const 528 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 1480 + i32.const 528 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.4 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 3 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -8751,8 +8405,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq else @@ -8761,9 +8415,9 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 2 - call $~lib/array/Array#__get - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $2 @@ -8777,28 +8431,20 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 1552 - i32.const 1576 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 1536 + i32.const 1560 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.5 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 3 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -8807,8 +8453,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq else @@ -8817,9 +8463,9 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 2 - call $~lib/array/Array#__get - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $2 @@ -8833,28 +8479,20 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 1592 - i32.const 528 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 1576 + i32.const 528 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.6 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 4 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -8863,8 +8501,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq else @@ -8873,8 +8511,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 2 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=8 i32.const 312 call $~lib/string/String.eq else @@ -8883,9 +8521,9 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 3 - call $~lib/array/Array#__get - i32.const 1536 + i32.load offset=4 + i32.load offset=12 + i32.const 1520 call $~lib/string/String.eq else local.get $2 @@ -8899,28 +8537,20 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 1616 - i32.const 528 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 1600 + i32.const 528 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.7 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 4 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 312 call $~lib/string/String.eq else @@ -8929,8 +8559,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 336 call $~lib/string/String.eq else @@ -8939,8 +8569,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 2 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=8 i32.const 824 call $~lib/string/String.eq else @@ -8949,9 +8579,9 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 3 - call $~lib/array/Array#__get - i32.const 1536 + i32.load offset=4 + i32.load offset=12 + i32.const 1520 call $~lib/string/String.eq else local.get $2 @@ -8965,28 +8595,20 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 1640 - i32.const 528 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 1624 + i32.const 528 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.8 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 4 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -8995,8 +8617,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq else @@ -9005,9 +8627,9 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 2 - call $~lib/array/Array#__get - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $2 @@ -9015,8 +8637,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 3 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=12 i32.const 312 call $~lib/string/String.eq else @@ -9031,28 +8653,20 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 352 - i32.const 312 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 352 + i32.const 312 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.9 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 3 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -9061,8 +8675,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq else @@ -9071,9 +8685,9 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 2 - call $~lib/array/Array#__get - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $2 @@ -9092,12 +8706,8 @@ i32.const 0 call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.10 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz @@ -9114,19 +8724,15 @@ i32.const 1 call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.11 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 1 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -9141,24 +8747,20 @@ call $~lib/env/abort unreachable end - i32.const 1496 + i32.const 1480 i32.const 528 i32.const 1 call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.12 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 1 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -9178,19 +8780,15 @@ i32.const 4 call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.13 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 3 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -9199,8 +8797,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq else @@ -9209,9 +8807,9 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 2 - call $~lib/array/Array#__get - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $2 @@ -9230,19 +8828,15 @@ i32.const -1 call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.14 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 3 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -9251,8 +8845,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq else @@ -9261,9 +8855,9 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 2 - call $~lib/array/Array#__get - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $2 @@ -9277,24 +8871,20 @@ call $~lib/env/abort unreachable end - i32.const 1496 + i32.const 1480 i32.const 528 i32.const -1 call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array#get:length|inlined.15 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array#get:length i32.const 3 i32.eq local.tee $2 if (result i32) global.get $std/string/sa - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 336 call $~lib/string/String.eq else @@ -9303,8 +8893,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 824 call $~lib/string/String.eq else @@ -9313,9 +8903,9 @@ local.tee $2 if (result i32) global.get $std/string/sa - i32.const 2 - call $~lib/array/Array#__get - i32.const 1536 + i32.load offset=4 + i32.load offset=8 + i32.const 1520 call $~lib/string/String.eq else local.get $2 @@ -9330,7 +8920,7 @@ unreachable end i32.const 0 - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 i32.const 608 call $~lib/string/String.eq i32.eqz @@ -9343,7 +8933,7 @@ unreachable end i32.const 1 - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 i32.const 624 call $~lib/string/String.eq i32.eqz @@ -9356,8 +8946,8 @@ unreachable end i32.const 8 - call $~lib/internal/number/itoa32 - i32.const 2184 + call $~lib/util/number/itoa32 + i32.const 2080 call $~lib/string/String.eq i32.eqz if @@ -9369,7 +8959,7 @@ unreachable end i32.const 123 - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 i32.const 392 call $~lib/string/String.eq i32.eqz @@ -9382,8 +8972,8 @@ unreachable end i32.const -1000 - call $~lib/internal/number/itoa32 - i32.const 2200 + call $~lib/util/number/itoa32 + i32.const 2096 call $~lib/string/String.eq i32.eqz if @@ -9395,8 +8985,8 @@ unreachable end i32.const 1234 - call $~lib/internal/number/itoa32 - i32.const 2224 + call $~lib/util/number/itoa32 + i32.const 2120 call $~lib/string/String.eq i32.eqz if @@ -9408,8 +8998,8 @@ unreachable end i32.const 12345 - call $~lib/internal/number/itoa32 - i32.const 2240 + call $~lib/util/number/itoa32 + i32.const 2136 call $~lib/string/String.eq i32.eqz if @@ -9421,8 +9011,8 @@ unreachable end i32.const 123456 - call $~lib/internal/number/itoa32 - i32.const 2264 + call $~lib/util/number/itoa32 + i32.const 2160 call $~lib/string/String.eq i32.eqz if @@ -9434,8 +9024,8 @@ unreachable end i32.const 1111111 - call $~lib/internal/number/itoa32 - i32.const 2288 + call $~lib/util/number/itoa32 + i32.const 2184 call $~lib/string/String.eq i32.eqz if @@ -9447,8 +9037,8 @@ unreachable end i32.const 1234567 - call $~lib/internal/number/itoa32 - i32.const 2312 + call $~lib/util/number/itoa32 + i32.const 2208 call $~lib/string/String.eq i32.eqz if @@ -9460,8 +9050,8 @@ unreachable end i32.const 2147483646 - call $~lib/internal/number/itoa32 - i32.const 2336 + call $~lib/util/number/itoa32 + i32.const 2232 call $~lib/string/String.eq i32.eqz if @@ -9473,8 +9063,8 @@ unreachable end i32.const 2147483647 - call $~lib/internal/number/itoa32 - i32.const 2368 + call $~lib/util/number/itoa32 + i32.const 2264 call $~lib/string/String.eq i32.eqz if @@ -9486,8 +9076,8 @@ unreachable end i32.const -2147483648 - call $~lib/internal/number/itoa32 - i32.const 2400 + call $~lib/util/number/itoa32 + i32.const 2296 call $~lib/string/String.eq i32.eqz if @@ -9499,8 +9089,8 @@ unreachable end i32.const -1 - call $~lib/internal/number/itoa32 - i32.const 2432 + call $~lib/util/number/itoa32 + i32.const 2328 call $~lib/string/String.eq i32.eqz if @@ -9512,7 +9102,7 @@ unreachable end i32.const 0 - call $~lib/internal/number/utoa32 + call $~lib/util/number/utoa32 i32.const 608 call $~lib/string/String.eq i32.eqz @@ -9525,8 +9115,8 @@ unreachable end i32.const 1000 - call $~lib/internal/number/utoa32 - i32.const 2448 + call $~lib/util/number/utoa32 + i32.const 2344 call $~lib/string/String.eq i32.eqz if @@ -9538,8 +9128,8 @@ unreachable end i32.const 2147483647 - call $~lib/internal/number/utoa32 - i32.const 2368 + call $~lib/util/number/utoa32 + i32.const 2264 call $~lib/string/String.eq i32.eqz if @@ -9551,8 +9141,8 @@ unreachable end i32.const -2147483648 - call $~lib/internal/number/utoa32 - i32.const 2464 + call $~lib/util/number/utoa32 + i32.const 2360 call $~lib/string/String.eq i32.eqz if @@ -9564,8 +9154,8 @@ unreachable end global.get $~lib/builtins/u32.MAX_VALUE - call $~lib/internal/number/utoa32 - i32.const 2496 + call $~lib/util/number/utoa32 + i32.const 2392 call $~lib/string/String.eq i32.eqz if @@ -9577,7 +9167,7 @@ unreachable end i64.const 0 - call $~lib/internal/number/utoa64 + call $~lib/util/number/utoa64 i32.const 608 call $~lib/string/String.eq i32.eqz @@ -9590,8 +9180,8 @@ unreachable end i64.const 1234 - call $~lib/internal/number/utoa64 - i32.const 2224 + call $~lib/util/number/utoa64 + i32.const 2120 call $~lib/string/String.eq i32.eqz if @@ -9603,8 +9193,8 @@ unreachable end i64.const 99999999 - call $~lib/internal/number/utoa64 - i32.const 2528 + call $~lib/util/number/utoa64 + i32.const 2424 call $~lib/string/String.eq i32.eqz if @@ -9616,8 +9206,8 @@ unreachable end i64.const 100000000 - call $~lib/internal/number/utoa64 - i32.const 2552 + call $~lib/util/number/utoa64 + i32.const 2448 call $~lib/string/String.eq i32.eqz if @@ -9629,8 +9219,8 @@ unreachable end i64.const 4294967295 - call $~lib/internal/number/utoa64 - i32.const 2496 + call $~lib/util/number/utoa64 + i32.const 2392 call $~lib/string/String.eq i32.eqz if @@ -9642,8 +9232,8 @@ unreachable end i64.const 68719476735 - call $~lib/internal/number/utoa64 - i32.const 2584 + call $~lib/util/number/utoa64 + i32.const 2480 call $~lib/string/String.eq i32.eqz if @@ -9655,8 +9245,8 @@ unreachable end i64.const 868719476735 - call $~lib/internal/number/utoa64 - i32.const 2616 + call $~lib/util/number/utoa64 + i32.const 2512 call $~lib/string/String.eq i32.eqz if @@ -9668,8 +9258,8 @@ unreachable end i64.const 999868719476735 - call $~lib/internal/number/utoa64 - i32.const 2648 + call $~lib/util/number/utoa64 + i32.const 2544 call $~lib/string/String.eq i32.eqz if @@ -9681,8 +9271,8 @@ unreachable end i64.const 9999868719476735 - call $~lib/internal/number/utoa64 - i32.const 2688 + call $~lib/util/number/utoa64 + i32.const 2584 call $~lib/string/String.eq i32.eqz if @@ -9694,8 +9284,8 @@ unreachable end i64.const 19999868719476735 - call $~lib/internal/number/utoa64 - i32.const 2728 + call $~lib/util/number/utoa64 + i32.const 2624 call $~lib/string/String.eq i32.eqz if @@ -9707,8 +9297,8 @@ unreachable end global.get $~lib/builtins/u64.MAX_VALUE - call $~lib/internal/number/utoa64 - i32.const 2776 + call $~lib/util/number/utoa64 + i32.const 2672 call $~lib/string/String.eq i32.eqz if @@ -9720,7 +9310,7 @@ unreachable end i64.const 0 - call $~lib/internal/number/itoa64 + call $~lib/util/number/itoa64 i32.const 608 call $~lib/string/String.eq i32.eqz @@ -9733,8 +9323,8 @@ unreachable end i64.const -1234 - call $~lib/internal/number/itoa64 - i32.const 2824 + call $~lib/util/number/itoa64 + i32.const 2720 call $~lib/string/String.eq i32.eqz if @@ -9746,8 +9336,8 @@ unreachable end i64.const 4294967295 - call $~lib/internal/number/itoa64 - i32.const 2496 + call $~lib/util/number/itoa64 + i32.const 2392 call $~lib/string/String.eq i32.eqz if @@ -9759,8 +9349,8 @@ unreachable end i64.const -4294967295 - call $~lib/internal/number/itoa64 - i32.const 2848 + call $~lib/util/number/itoa64 + i32.const 2744 call $~lib/string/String.eq i32.eqz if @@ -9772,8 +9362,8 @@ unreachable end i64.const 68719476735 - call $~lib/internal/number/itoa64 - i32.const 2584 + call $~lib/util/number/itoa64 + i32.const 2480 call $~lib/string/String.eq i32.eqz if @@ -9785,8 +9375,8 @@ unreachable end i64.const -68719476735 - call $~lib/internal/number/itoa64 - i32.const 2880 + call $~lib/util/number/itoa64 + i32.const 2776 call $~lib/string/String.eq i32.eqz if @@ -9798,8 +9388,8 @@ unreachable end i64.const -868719476735 - call $~lib/internal/number/itoa64 - i32.const 2912 + call $~lib/util/number/itoa64 + i32.const 2808 call $~lib/string/String.eq i32.eqz if @@ -9811,8 +9401,8 @@ unreachable end i64.const -999868719476735 - call $~lib/internal/number/itoa64 - i32.const 2952 + call $~lib/util/number/itoa64 + i32.const 2848 call $~lib/string/String.eq i32.eqz if @@ -9824,8 +9414,8 @@ unreachable end i64.const -19999868719476735 - call $~lib/internal/number/itoa64 - i32.const 2992 + call $~lib/util/number/itoa64 + i32.const 2888 call $~lib/string/String.eq i32.eqz if @@ -9837,8 +9427,8 @@ unreachable end global.get $~lib/builtins/i64.MAX_VALUE - call $~lib/internal/number/itoa64 - i32.const 3040 + call $~lib/util/number/itoa64 + i32.const 2936 call $~lib/string/String.eq i32.eqz if @@ -9850,8 +9440,8 @@ unreachable end global.get $~lib/builtins/i64.MIN_VALUE - call $~lib/internal/number/itoa64 - i32.const 3088 + call $~lib/util/number/itoa64 + i32.const 2984 call $~lib/string/String.eq i32.eqz if @@ -9863,8 +9453,8 @@ unreachable end f64.const 0 - call $~lib/internal/number/dtoa - i32.const 3136 + call $~lib/util/number/dtoa + i32.const 3032 call $~lib/string/String.eq i32.eqz if @@ -9876,8 +9466,8 @@ unreachable end f64.const -0 - call $~lib/internal/number/dtoa - i32.const 3136 + call $~lib/util/number/dtoa + i32.const 3032 call $~lib/string/String.eq i32.eqz if @@ -9889,8 +9479,8 @@ unreachable end f64.const nan:0x8000000000000 - call $~lib/internal/number/dtoa - i32.const 3152 + call $~lib/util/number/dtoa + i32.const 3048 call $~lib/string/String.eq i32.eqz if @@ -9902,8 +9492,8 @@ unreachable end f64.const inf - call $~lib/internal/number/dtoa - i32.const 3200 + call $~lib/util/number/dtoa + i32.const 3096 call $~lib/string/String.eq i32.eqz if @@ -9916,8 +9506,8 @@ end f64.const inf f64.neg - call $~lib/internal/number/dtoa - i32.const 3168 + call $~lib/util/number/dtoa + i32.const 3064 call $~lib/string/String.eq i32.eqz if @@ -9929,8 +9519,8 @@ unreachable end global.get $~lib/builtins/f64.EPSILON - call $~lib/internal/number/dtoa - i32.const 4592 + call $~lib/util/number/dtoa + i32.const 4128 call $~lib/string/String.eq i32.eqz if @@ -9943,8 +9533,8 @@ end global.get $~lib/builtins/f64.EPSILON f64.neg - call $~lib/internal/number/dtoa - i32.const 4648 + call $~lib/util/number/dtoa + i32.const 4184 call $~lib/string/String.eq i32.eqz if @@ -9956,8 +9546,8 @@ unreachable end global.get $~lib/builtins/f64.MAX_VALUE - call $~lib/internal/number/dtoa - i32.const 4704 + call $~lib/util/number/dtoa + i32.const 4240 call $~lib/string/String.eq i32.eqz if @@ -9970,8 +9560,8 @@ end global.get $~lib/builtins/f64.MAX_VALUE f64.neg - call $~lib/internal/number/dtoa - i32.const 4760 + call $~lib/util/number/dtoa + i32.const 4296 call $~lib/string/String.eq i32.eqz if @@ -9983,8 +9573,8 @@ unreachable end f64.const 4185580496821356722454785e274 - call $~lib/internal/number/dtoa - i32.const 4816 + call $~lib/util/number/dtoa + i32.const 4352 call $~lib/string/String.eq i32.eqz if @@ -9996,8 +9586,8 @@ unreachable end f64.const 2.2250738585072014e-308 - call $~lib/internal/number/dtoa - i32.const 4872 + call $~lib/util/number/dtoa + i32.const 4408 call $~lib/string/String.eq i32.eqz if @@ -10009,8 +9599,8 @@ unreachable end f64.const 4.940656e-318 - call $~lib/internal/number/dtoa - i32.const 4928 + call $~lib/util/number/dtoa + i32.const 4464 call $~lib/string/String.eq i32.eqz if @@ -10022,8 +9612,8 @@ unreachable end f64.const 9060801153433600 - call $~lib/internal/number/dtoa - i32.const 4968 + call $~lib/util/number/dtoa + i32.const 4504 call $~lib/string/String.eq i32.eqz if @@ -10035,8 +9625,8 @@ unreachable end f64.const 4708356024711512064 - call $~lib/internal/number/dtoa - i32.const 5016 + call $~lib/util/number/dtoa + i32.const 4552 call $~lib/string/String.eq i32.eqz if @@ -10048,8 +9638,8 @@ unreachable end f64.const 9409340012568248320 - call $~lib/internal/number/dtoa - i32.const 5072 + call $~lib/util/number/dtoa + i32.const 4608 call $~lib/string/String.eq i32.eqz if @@ -10061,8 +9651,8 @@ unreachable end f64.const 5e-324 - call $~lib/internal/number/dtoa - i32.const 5128 + call $~lib/util/number/dtoa + i32.const 4664 call $~lib/string/String.eq i32.eqz if @@ -10074,8 +9664,8 @@ unreachable end f64.const 1 - call $~lib/internal/number/dtoa - i32.const 5152 + call $~lib/util/number/dtoa + i32.const 4688 call $~lib/string/String.eq i32.eqz if @@ -10087,7 +9677,7 @@ unreachable end f64.const 0.1 - call $~lib/internal/number/dtoa + call $~lib/util/number/dtoa i32.const 768 call $~lib/string/String.eq i32.eqz @@ -10100,8 +9690,8 @@ unreachable end f64.const -1 - call $~lib/internal/number/dtoa - i32.const 5168 + call $~lib/util/number/dtoa + i32.const 4704 call $~lib/string/String.eq i32.eqz if @@ -10113,8 +9703,8 @@ unreachable end f64.const -0.1 - call $~lib/internal/number/dtoa - i32.const 5184 + call $~lib/util/number/dtoa + i32.const 4720 call $~lib/string/String.eq i32.eqz if @@ -10126,8 +9716,8 @@ unreachable end f64.const 1e6 - call $~lib/internal/number/dtoa - i32.const 5200 + call $~lib/util/number/dtoa + i32.const 4736 call $~lib/string/String.eq i32.eqz if @@ -10139,8 +9729,8 @@ unreachable end f64.const 1e-06 - call $~lib/internal/number/dtoa - i32.const 5232 + call $~lib/util/number/dtoa + i32.const 4768 call $~lib/string/String.eq i32.eqz if @@ -10152,8 +9742,8 @@ unreachable end f64.const -1e6 - call $~lib/internal/number/dtoa - i32.const 5256 + call $~lib/util/number/dtoa + i32.const 4792 call $~lib/string/String.eq i32.eqz if @@ -10165,8 +9755,8 @@ unreachable end f64.const -1e-06 - call $~lib/internal/number/dtoa - i32.const 5288 + call $~lib/util/number/dtoa + i32.const 4824 call $~lib/string/String.eq i32.eqz if @@ -10178,8 +9768,8 @@ unreachable end f64.const 1e7 - call $~lib/internal/number/dtoa - i32.const 5320 + call $~lib/util/number/dtoa + i32.const 4856 call $~lib/string/String.eq i32.eqz if @@ -10191,8 +9781,8 @@ unreachable end f64.const 1e-07 - call $~lib/internal/number/dtoa - i32.const 5352 + call $~lib/util/number/dtoa + i32.const 4888 call $~lib/string/String.eq i32.eqz if @@ -10204,8 +9794,8 @@ unreachable end f64.const 1.e+308 - call $~lib/internal/number/dtoa - i32.const 5368 + call $~lib/util/number/dtoa + i32.const 4904 call $~lib/string/String.eq i32.eqz if @@ -10217,8 +9807,8 @@ unreachable end f64.const -1.e+308 - call $~lib/internal/number/dtoa - i32.const 5392 + call $~lib/util/number/dtoa + i32.const 4928 call $~lib/string/String.eq i32.eqz if @@ -10230,8 +9820,8 @@ unreachable end f64.const inf - call $~lib/internal/number/dtoa - i32.const 3200 + call $~lib/util/number/dtoa + i32.const 3096 call $~lib/string/String.eq i32.eqz if @@ -10243,8 +9833,8 @@ unreachable end f64.const -inf - call $~lib/internal/number/dtoa - i32.const 3168 + call $~lib/util/number/dtoa + i32.const 3064 call $~lib/string/String.eq i32.eqz if @@ -10256,8 +9846,8 @@ unreachable end f64.const 1e-308 - call $~lib/internal/number/dtoa - i32.const 5416 + call $~lib/util/number/dtoa + i32.const 4952 call $~lib/string/String.eq i32.eqz if @@ -10269,8 +9859,8 @@ unreachable end f64.const -1e-308 - call $~lib/internal/number/dtoa - i32.const 5440 + call $~lib/util/number/dtoa + i32.const 4976 call $~lib/string/String.eq i32.eqz if @@ -10282,8 +9872,8 @@ unreachable end f64.const 1e-323 - call $~lib/internal/number/dtoa - i32.const 5464 + call $~lib/util/number/dtoa + i32.const 5000 call $~lib/string/String.eq i32.eqz if @@ -10295,8 +9885,8 @@ unreachable end f64.const -1e-323 - call $~lib/internal/number/dtoa - i32.const 5488 + call $~lib/util/number/dtoa + i32.const 5024 call $~lib/string/String.eq i32.eqz if @@ -10308,8 +9898,8 @@ unreachable end f64.const 0 - call $~lib/internal/number/dtoa - i32.const 3136 + call $~lib/util/number/dtoa + i32.const 3032 call $~lib/string/String.eq i32.eqz if @@ -10321,8 +9911,8 @@ unreachable end f64.const 4294967272 - call $~lib/internal/number/dtoa - i32.const 5512 + call $~lib/util/number/dtoa + i32.const 5048 call $~lib/string/String.eq i32.eqz if @@ -10334,8 +9924,8 @@ unreachable end f64.const 1.2312145673456234e-08 - call $~lib/internal/number/dtoa - i32.const 5544 + call $~lib/util/number/dtoa + i32.const 5080 call $~lib/string/String.eq i32.eqz if @@ -10347,8 +9937,8 @@ unreachable end f64.const 555555555.5555556 - call $~lib/internal/number/dtoa - i32.const 5600 + call $~lib/util/number/dtoa + i32.const 5136 call $~lib/string/String.eq i32.eqz if @@ -10360,8 +9950,8 @@ unreachable end f64.const 0.9999999999999999 - call $~lib/internal/number/dtoa - i32.const 5648 + call $~lib/util/number/dtoa + i32.const 5184 call $~lib/string/String.eq i32.eqz if @@ -10373,8 +9963,8 @@ unreachable end f64.const 1 - call $~lib/internal/number/dtoa - i32.const 5152 + call $~lib/util/number/dtoa + i32.const 4688 call $~lib/string/String.eq i32.eqz if @@ -10386,8 +9976,8 @@ unreachable end f64.const 12.34 - call $~lib/internal/number/dtoa - i32.const 5696 + call $~lib/util/number/dtoa + i32.const 5232 call $~lib/string/String.eq i32.eqz if @@ -10401,8 +9991,8 @@ f64.const 1 f64.const 3 f64.div - call $~lib/internal/number/dtoa - i32.const 5720 + call $~lib/util/number/dtoa + i32.const 5256 call $~lib/string/String.eq i32.eqz if @@ -10414,8 +10004,8 @@ unreachable end f64.const 1234e17 - call $~lib/internal/number/dtoa - i32.const 5768 + call $~lib/util/number/dtoa + i32.const 5304 call $~lib/string/String.eq i32.eqz if @@ -10427,8 +10017,8 @@ unreachable end f64.const 1234e18 - call $~lib/internal/number/dtoa - i32.const 5824 + call $~lib/util/number/dtoa + i32.const 5360 call $~lib/string/String.eq i32.eqz if @@ -10440,8 +10030,8 @@ unreachable end f64.const 2.71828 - call $~lib/internal/number/dtoa - i32.const 5856 + call $~lib/util/number/dtoa + i32.const 5392 call $~lib/string/String.eq i32.eqz if @@ -10453,8 +10043,8 @@ unreachable end f64.const 0.0271828 - call $~lib/internal/number/dtoa - i32.const 5880 + call $~lib/util/number/dtoa + i32.const 5416 call $~lib/string/String.eq i32.eqz if @@ -10466,8 +10056,8 @@ unreachable end f64.const 271.828 - call $~lib/internal/number/dtoa - i32.const 5912 + call $~lib/util/number/dtoa + i32.const 5448 call $~lib/string/String.eq i32.eqz if @@ -10479,8 +10069,8 @@ unreachable end f64.const 1.1e+128 - call $~lib/internal/number/dtoa - i32.const 5936 + call $~lib/util/number/dtoa + i32.const 5472 call $~lib/string/String.eq i32.eqz if @@ -10492,8 +10082,8 @@ unreachable end f64.const 1.1e-64 - call $~lib/internal/number/dtoa - i32.const 5960 + call $~lib/util/number/dtoa + i32.const 5496 call $~lib/string/String.eq i32.eqz if @@ -10505,8 +10095,8 @@ unreachable end f64.const 0.000035689 - call $~lib/internal/number/dtoa - i32.const 5984 + call $~lib/util/number/dtoa + i32.const 5520 call $~lib/string/String.eq i32.eqz if @@ -10518,12 +10108,12 @@ unreachable end ) - (func $std/string/getString (; 65 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 66 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 66 ;) (type $FUNCSIG$v) + (func $start (; 67 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 67 ;) (type $FUNCSIG$v) + (func $null (; 68 ;) (type $FUNCSIG$v) ) ) From 2d76da94652f6283fd83466fe7e78850e10ef9ab Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 17 Mar 2019 00:11:16 +0100 Subject: [PATCH 041/119] alias locals when inlining a tail call --- src/builtins.ts | 5 +- src/common.ts | 1 + src/compiler.ts | 101 ++- src/program.ts | 7 +- std/assembly/runtime.ts | 8 +- tests/compiler/std/map.untouched.wat | 203 +++--- tests/compiler/std/runtime.optimized.wat | 319 ++++----- tests/compiler/std/runtime.ts | 12 +- tests/compiler/std/runtime.untouched.wat | 619 +++++++++--------- tests/compiler/std/set.untouched.wat | 203 +++--- tests/compiler/std/string.optimized.wat | 101 ++- tests/compiler/std/string.untouched.wat | 356 +++++----- tests/compiler/std/typedarray.optimized.wat | 101 ++- tests/compiler/std/typedarray.untouched.wat | 682 +++++++++----------- 14 files changed, 1329 insertions(+), 1389 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index 797655b35a..7360edef4b 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -56,18 +56,17 @@ import { import { ElementKind, - OperatorKind, FunctionPrototype, Class, Field, Global, DecoratorFlags, - ClassPrototype, Local } from "./program"; import { - FlowFlags, Flow + FlowFlags, + Flow } from "./flow"; import { diff --git a/src/common.ts b/src/common.ts index 566df231fd..4b37928576 100644 --- a/src/common.ts +++ b/src/common.ts @@ -75,6 +75,7 @@ export enum CommonFlags { // Other + /** Is quoted. */ QUOTED = 1 << 28 } diff --git a/src/compiler.ts b/src/compiler.ts index 4e595273bb..6425d62739 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -39,7 +39,8 @@ import { getBlockChildCount, getBlockChild, getBlockName, - needsExplicitUnreachable + needsExplicitUnreachable, + getGetLocalIndex } from "./module"; import { @@ -1467,7 +1468,10 @@ export class Compiler extends DiagnosticEmitter { } } - compileStatement(statement: Statement, isLastStatementInBody: bool = false): ExpressionRef { + compileStatement( + statement: Statement, + isLastStatementInBody: bool = false + ): ExpressionRef { var module = this.module; var stmt: ExpressionRef; switch (statement.kind) { @@ -1492,7 +1496,7 @@ export class Compiler extends DiagnosticEmitter { break; } case NodeKind.EXPRESSION: { - stmt = this.compileExpressionStatement(statement); + stmt = this.compileExpressionStatement(statement, isLastStatementInBody); break; } case NodeKind.FOR: { @@ -1691,8 +1695,15 @@ export class Compiler extends DiagnosticEmitter { return this.module.createNop(); } - compileExpressionStatement(statement: ExpressionStatement): ExpressionRef { - var expr = this.compileExpression(statement.expression, Type.void, ConversionKind.NONE, WrapMode.NONE); + compileExpressionStatement(statement: ExpressionStatement, isLastStatementInBody: bool = false): ExpressionRef { + var expr = this.compileExpression( + statement.expression, + Type.void, + ConversionKind.NONE, + WrapMode.NONE, + null, + isLastStatementInBody + ); if (this.currentType != Type.void) { expr = this.module.createDrop(expr); this.currentType = Type.void; @@ -2342,7 +2353,8 @@ export class Compiler extends DiagnosticEmitter { contextualType: Type, conversionKind: ConversionKind, wrapMode: WrapMode, - context: Element | null = null + context: Element | null = null, + isLastStatementInBody: bool = false ): ExpressionRef { this.currentType = contextualType; var expr: ExpressionRef; @@ -2356,7 +2368,7 @@ export class Compiler extends DiagnosticEmitter { break; } case NodeKind.CALL: { - expr = this.compileCallExpression(expression, contextualType); + expr = this.compileCallExpression(expression, contextualType, isLastStatementInBody); break; } case NodeKind.COMMA: { @@ -4988,7 +5000,11 @@ export class Compiler extends DiagnosticEmitter { return module.createUnreachable(); } - compileCallExpression(expression: CallExpression, contextualType: Type): ExpressionRef { + compileCallExpression( + expression: CallExpression, + contextualType: Type, + isLastStatementInBody: bool = false + ): ExpressionRef { var module = this.module; var flow = this.currentFlow; @@ -5184,7 +5200,8 @@ export class Compiler extends DiagnosticEmitter { instance, expression.arguments, expression, - thisExpr + thisExpr, + isLastStatementInBody ); } @@ -5413,7 +5430,8 @@ export class Compiler extends DiagnosticEmitter { instance: Function, argumentExpressions: Expression[], reportNode: Node, - thisArg: ExpressionRef = 0 + thisArg: ExpressionRef = 0, + inlineCanAlias: bool = false ): ExpressionRef { var numArguments = argumentExpressions.length; var signature = instance.signature; @@ -5437,7 +5455,7 @@ export class Compiler extends DiagnosticEmitter { ); } else { this.currentInlineFunctions.push(instance); - let expr = this.compileCallInlinePrechecked(instance, argumentExpressions, thisArg); + let expr = this.compileCallInlinePrechecked(instance, argumentExpressions, thisArg, inlineCanAlias); this.currentInlineFunctions.pop(); return expr; } @@ -5468,7 +5486,8 @@ export class Compiler extends DiagnosticEmitter { private compileCallInlinePrechecked( instance: Function, argumentExpressions: Expression[], - thisArg: ExpressionRef = 0 + thisArg: ExpressionRef = 0, + canAlias: bool = false ): ExpressionRef { var module = this.module; @@ -5483,12 +5502,18 @@ export class Compiler extends DiagnosticEmitter { if (thisArg) { let classInstance = assert(instance.parent); assert(classInstance.kind == ElementKind.CLASS); let thisType = assert(instance.signature.thisType); - let thisLocal = flow.addScopedLocal(CommonSymbols.this_, thisType, false); - body.push( - module.createSetLocal(thisLocal.index, thisArg) - ); - let baseInstance = (classInstance).base; - if (baseInstance) flow.addScopedAlias(CommonSymbols.super_, baseInstance.type, thisLocal.index); + if (canAlias && getExpressionId(thisArg) == ExpressionId.GetLocal) { + flow.addScopedAlias(CommonSymbols.this_, thisType, getGetLocalIndex(thisArg)); + let baseInstance = (classInstance).base; + if (baseInstance) flow.addScopedAlias(CommonSymbols.super_, baseInstance.type, getGetLocalIndex(thisArg)); + } else { + let thisLocal = flow.addScopedLocal(CommonSymbols.this_, thisType, false); + body.push( + module.createSetLocal(thisLocal.index, thisArg) + ); + let baseInstance = (classInstance).base; + if (baseInstance) flow.addScopedAlias(CommonSymbols.super_, baseInstance.type, thisLocal.index); + } } var numArguments = argumentExpressions.length; @@ -5501,14 +5526,18 @@ export class Compiler extends DiagnosticEmitter { ConversionKind.IMPLICIT, WrapMode.NONE ); - let argumentLocal = flow.addScopedLocal( - signature.getParameterName(i), - parameterTypes[i], - !previousFlow.canOverflow(paramExpr, parameterTypes[i]) - ); - body.push( - module.createSetLocal(argumentLocal.index, paramExpr) - ); + if (canAlias && getExpressionId(paramExpr) == ExpressionId.GetLocal) { + flow.addScopedAlias(signature.getParameterName(i), parameterTypes[i], getGetLocalIndex(paramExpr)); + } else { + let argumentLocal = flow.addScopedLocal( + signature.getParameterName(i), + parameterTypes[i], + !previousFlow.canOverflow(paramExpr, parameterTypes[i]) + ); + body.push( + module.createSetLocal(argumentLocal.index, paramExpr) + ); + } } // Compile optional parameter initializers in the scope of the inlined flow @@ -5521,14 +5550,18 @@ export class Compiler extends DiagnosticEmitter { ConversionKind.IMPLICIT, WrapMode.WRAP ); - let argumentLocal = flow.addScopedLocal( - signature.getParameterName(i), - parameterTypes[i], - !flow.canOverflow(initExpr, parameterTypes[i]) - ); - body.push( - module.createSetLocal(argumentLocal.index, initExpr) - ); + if (canAlias && getExpressionId(initExpr) == ExpressionId.GetLocal) { + flow.addScopedAlias(signature.getParameterName(i), parameterTypes[i], getGetLocalIndex(initExpr)); + } else { + let argumentLocal = flow.addScopedLocal( + signature.getParameterName(i), + parameterTypes[i], + !flow.canOverflow(initExpr, parameterTypes[i]) + ); + body.push( + module.createSetLocal(argumentLocal.index, initExpr) + ); + } } // Compile the called function's body in the scope of the inlined flow diff --git a/src/program.ts b/src/program.ts index b69e0b2962..c4cee9045c 100644 --- a/src/program.ts +++ b/src/program.ts @@ -84,7 +84,12 @@ import { } from "./module"; import { - CharCode, writeI32, writeI8, writeI16, writeF32, writeF64 + CharCode, + writeI8, + writeI16, + writeI32, + writeF32, + writeF64 } from "./util"; import { diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index bb8944d755..d8fea91956 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -40,7 +40,7 @@ export declare function CLASSID(): u32; export declare function ITERATEROOTS(fn: (ref: usize) => void): void; /** Adjusts an allocation to actual block size. Primarily targets TLSF. */ -function adjustToBlock(payloadSize: usize): usize { +export function ADJUSTOBLOCK(payloadSize: usize): usize { // round up to power of 2, e.g. with HEADER_SIZE=8: // 0 -> 2^3 = 8 // 1..8 -> 2^4 = 16 @@ -58,7 +58,7 @@ export function ALLOCATE(payloadSize: usize): usize { } function doAllocate(payloadSize: usize): usize { - var header = changetype
(memory.allocate(adjustToBlock(payloadSize))); + var header = changetype
(memory.allocate(ADJUSTOBLOCK(payloadSize))); header.classId = HEADER_MAGIC; header.payloadSize = payloadSize; if (GC_IMPLEMENTED) { @@ -83,8 +83,8 @@ function doReallocate(ref: usize, newPayloadSize: usize): usize { var header = changetype
(ref - HEADER_SIZE); var payloadSize = header.payloadSize; if (payloadSize < newPayloadSize) { - let newAdjustedSize = adjustToBlock(newPayloadSize); - if (select(adjustToBlock(payloadSize), 0, ref > HEAP_BASE) < newAdjustedSize) { + let newAdjustedSize = ADJUSTOBLOCK(newPayloadSize); + if (select(ADJUSTOBLOCK(payloadSize), 0, ref > HEAP_BASE) < newAdjustedSize) { // move if the allocation isn't large enough or not a heap object let newHeader = changetype
(memory.allocate(newAdjustedSize)); newHeader.classId = header.classId; diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 8783ad0834..b535ebddd0 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -35,7 +35,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/adjustToBlock (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -135,7 +135,7 @@ (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/adjustToBlock + call $~lib/runtime/ADJUSTOBLOCK call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -194,261 +194,252 @@ (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i64) + (local $5 i64) block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $3 - local.get $1 - local.set $4 local.get $2 - local.set $5 - local.get $5 i32.eqz if br $~lib/util/memory/memset|inlined.0 end - local.get $3 - local.get $4 + local.get $0 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 1 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 2 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 1 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 + local.get $0 i32.const 2 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 2 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 3 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 6 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 3 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 4 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 8 i32.le_u if br $~lib/util/memory/memset|inlined.0 end i32.const 0 - local.get $3 + local.get $0 i32.sub i32.const 3 i32.and - local.set $6 + local.set $3 + local.get $0 local.get $3 - local.get $6 i32.add - local.set $3 - local.get $5 - local.get $6 + local.set $0 + local.get $2 + local.get $3 i32.sub - local.set $5 - local.get $5 + local.set $2 + local.get $2 i32.const -4 i32.and - local.set $5 + local.set $2 i32.const -1 i32.const 255 i32.div_u - local.get $4 + local.get $1 i32.const 255 i32.and i32.mul - local.set $7 - local.get $3 - local.get $7 + local.set $4 + local.get $0 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 4 i32.sub - local.get $7 + local.get $4 i32.store - local.get $5 + local.get $2 i32.const 8 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 4 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 8 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 12 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 8 i32.sub - local.get $7 + local.get $4 i32.store - local.get $5 + local.get $2 i32.const 24 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 12 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 16 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 20 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 24 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 28 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 24 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 20 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 16 i32.sub - local.get $7 + local.get $4 i32.store i32.const 24 - local.get $3 + local.get $0 i32.const 4 i32.and i32.add - local.set $6 + local.set $3 + local.get $0 local.get $3 - local.get $6 i32.add - local.set $3 - local.get $5 - local.get $6 + local.set $0 + local.get $2 + local.get $3 i32.sub - local.set $5 - local.get $7 + local.set $2 + local.get $4 i64.extend_i32_u - local.get $7 + local.get $4 i64.extend_i32_u i64.const 32 i64.shl i64.or - local.set $8 + local.set $5 block $break|0 loop $continue|0 - local.get $5 + local.get $2 i32.const 32 i32.ge_u if block - local.get $3 - local.get $8 + local.get $0 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 8 i32.add - local.get $8 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 16 i32.add - local.get $8 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 24 i32.add - local.get $8 - i64.store local.get $5 + i64.store + local.get $2 i32.const 32 i32.sub - local.set $5 - local.get $3 + local.set $2 + local.get $0 i32.const 32 i32.add - local.set $3 + local.set $0 end br $continue|0 end diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 352c2ceddd..f71d18fe95 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -11,12 +11,18 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00,\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 64) "\01\00\00\00\1c\00\00\00s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 104) "\01\00\00\00\10\00\00\00b\00a\00r\00r\00i\00e\00r\001") - (data (i32.const 128) "\01\00\00\00\10\00\00\00b\00a\00r\00r\00i\00e\00r\002") - (data (i32.const 152) "\01\00\00\00\10\00\00\00b\00a\00r\00r\00i\00e\00r\003") - (data (i32.const 176) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00,") + (data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 72) "\01\00\00\00\1c") + (data (i32.const 88) "s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 120) "\01\00\00\00\10") + (data (i32.const 136) "b\00a\00r\00r\00i\00e\00r\001") + (data (i32.const 152) "\01\00\00\00\10") + (data (i32.const 168) "b\00a\00r\00r\00i\00e\00r\002") + (data (i32.const 184) "\01\00\00\00\10") + (data (i32.const 200) "b\00a\00r\00r\00i\00e\00r\003") + (data (i32.const 216) "\01\00\00\00\1e") + (data (i32.const 232) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) @@ -41,7 +47,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 130 i32.const 4 call $~lib/env/abort @@ -61,7 +67,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 153 i32.const 4 call $~lib/env/abort @@ -72,7 +78,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 154 i32.const 4 call $~lib/env/abort @@ -98,7 +104,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 76 i32.const 4 call $~lib/env/abort @@ -116,7 +122,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 77 i32.const 11 call $~lib/env/abort @@ -129,7 +135,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 414 i32.const 2 call $~lib/env/abort @@ -146,7 +152,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 144 i32.const 4 call $~lib/env/abort @@ -157,7 +163,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 145 i32.const 4 call $~lib/env/abort @@ -180,7 +186,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 124 i32.const 4 call $~lib/env/abort @@ -206,7 +212,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 244 i32.const 4 call $~lib/env/abort @@ -229,7 +235,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 246 i32.const 4 call $~lib/env/abort @@ -330,7 +336,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 68 i32.const 4 call $~lib/env/abort @@ -344,7 +350,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 69 i32.const 11 call $~lib/env/abort @@ -360,7 +366,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 320 i32.const 4 call $~lib/env/abort @@ -372,7 +378,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 321 i32.const 4 call $~lib/env/abort @@ -385,7 +391,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 322 i32.const 4 call $~lib/env/abort @@ -407,7 +413,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 175 i32.const 4 call $~lib/env/abort @@ -421,7 +427,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 177 i32.const 4 call $~lib/env/abort @@ -445,7 +451,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 179 i32.const 4 call $~lib/env/abort @@ -457,7 +463,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 183 i32.const 23 call $~lib/env/abort @@ -499,7 +505,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 197 i32.const 24 call $~lib/env/abort @@ -513,7 +519,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 199 i32.const 6 call $~lib/env/abort @@ -562,7 +568,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 212 i32.const 4 call $~lib/env/abort @@ -641,7 +647,7 @@ i32.gt_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 363 i32.const 4 call $~lib/env/abort @@ -652,7 +658,7 @@ i32.and if i32.const 0 - i32.const 16 + i32.const 24 i32.const 364 i32.const 4 call $~lib/env/abort @@ -663,7 +669,7 @@ i32.and if i32.const 0 - i32.const 16 + i32.const 24 i32.const 365 i32.const 4 call $~lib/env/abort @@ -680,7 +686,7 @@ i32.lt_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 370 i32.const 6 call $~lib/env/abort @@ -708,7 +714,7 @@ i32.lt_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 379 i32.const 6 call $~lib/env/abort @@ -761,7 +767,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 408 i32.const 2 call $~lib/env/abort @@ -786,7 +792,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 282 i32.const 4 call $~lib/env/abort @@ -866,7 +872,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 309 i32.const 16 call $~lib/env/abort @@ -894,7 +900,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 334 i32.const 4 call $~lib/env/abort @@ -914,7 +920,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 335 i32.const 4 call $~lib/env/abort @@ -925,7 +931,7 @@ i32.and if i32.const 0 - i32.const 16 + i32.const 24 i32.const 336 i32.const 4 call $~lib/env/abort @@ -977,7 +983,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 354 i32.const 25 call $~lib/env/abort @@ -1022,14 +1028,14 @@ if unreachable end - i32.const 216 + i32.const 264 local.set $3 - i32.const 216 + i32.const 264 global.set $~lib/allocator/tlsf/ROOT i32.const 2912 i32.const 0 i32.store - i32.const 216 + i32.const 264 i32.const 0 i32.store i32.const 0 @@ -1039,7 +1045,7 @@ i32.const 22 i32.lt_u if - i32.const 216 + i32.const 264 local.get $0 i32.const 0 call $~lib/allocator/tlsf/Root#setSLMap @@ -1050,7 +1056,7 @@ i32.const 32 i32.lt_u if - i32.const 216 + i32.const 264 local.get $0 local.get $1 i32.const 0 @@ -1069,8 +1075,8 @@ br $repeat|0 end end - i32.const 216 - i32.const 3136 + i32.const 264 + i32.const 3184 current_memory i32.const 16 i32.shl @@ -1140,7 +1146,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 467 i32.const 12 call $~lib/env/abort @@ -1155,7 +1161,7 @@ i32.lt_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 470 i32.const 2 call $~lib/env/abort @@ -1166,7 +1172,7 @@ local.get $2 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/ALLOCATE (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -2094,94 +2100,91 @@ (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $3 - local.get $1 local.get $0 - local.tee $2 + local.get $1 i32.eq br_if $~lib/util/memory/memmove|inlined.0 local.get $1 - local.get $3 - i32.add local.get $2 + i32.add + local.get $0 i32.le_u - local.tee $0 + local.tee $3 i32.eqz if + local.get $0 local.get $2 - local.get $3 i32.add local.get $1 i32.le_u - local.set $0 + local.set $3 end - local.get $0 + local.get $3 if - local.get $2 + local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/util/memory/memcpy br $~lib/util/memory/memmove|inlined.0 end - local.get $2 + local.get $0 local.get $1 i32.lt_u if local.get $1 i32.const 7 i32.and - local.get $2 + local.get $0 i32.const 7 i32.and i32.eq if loop $continue|0 - local.get $2 + local.get $0 i32.const 7 i32.and if - local.get $3 + local.get $2 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $2 i32.const 1 i32.sub - local.set $3 - local.get $2 + local.set $2 + local.get $0 local.tee $4 i32.const 1 i32.add - local.set $2 + local.set $0 local.get $1 - local.tee $0 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $4 - local.get $0 + local.get $3 i32.load8_u i32.store8 br $continue|0 end end loop $continue|1 - local.get $3 + local.get $2 i32.const 8 i32.ge_u if - local.get $2 + local.get $0 local.get $1 i64.load i64.store - local.get $3 + local.get $2 i32.const 8 i32.sub - local.set $3 - local.get $2 + local.set $2 + local.get $0 i32.const 8 i32.add - local.set $2 + local.set $0 local.get $1 i32.const 8 i32.add @@ -2191,26 +2194,26 @@ end end loop $continue|2 - local.get $3 + local.get $2 if - local.get $2 + local.get $0 local.tee $4 i32.const 1 i32.add - local.set $2 + local.set $0 local.get $1 - local.tee $0 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $4 - local.get $0 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $2 i32.const 1 i32.sub - local.set $3 + local.set $2 br $continue|2 end end @@ -2218,29 +2221,29 @@ local.get $1 i32.const 7 i32.and - local.get $2 + local.get $0 i32.const 7 i32.and i32.eq if loop $continue|3 + local.get $0 local.get $2 - local.get $3 i32.add i32.const 7 i32.and if - local.get $3 + local.get $2 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $2 i32.const 1 i32.sub - local.tee $3 - local.get $2 + local.tee $2 + local.get $0 i32.add local.get $1 - local.get $3 + local.get $2 i32.add i32.load8_u i32.store8 @@ -2248,18 +2251,18 @@ end end loop $continue|4 - local.get $3 + local.get $2 i32.const 8 i32.ge_u if - local.get $3 + local.get $2 i32.const 8 i32.sub - local.tee $3 - local.get $2 + local.tee $2 + local.get $0 i32.add local.get $1 - local.get $3 + local.get $2 i32.add i64.load i64.store @@ -2268,16 +2271,16 @@ end end loop $continue|5 - local.get $3 + local.get $2 if - local.get $3 + local.get $2 i32.const 1 i32.sub - local.tee $3 - local.get $2 + local.tee $2 + local.get $0 i32.add local.get $1 - local.get $3 + local.get $2 i32.add i32.load8_u i32.store8 @@ -2517,7 +2520,7 @@ i32.and if i32.const 0 - i32.const 16 + i32.const 24 i32.const 483 i32.const 6 call $~lib/env/abort @@ -2536,7 +2539,7 @@ end end ) - (func $~lib/runtime/REALLOCATE (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doReallocate (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2560,7 +2563,7 @@ i32.shl i32.const 0 local.get $0 - i32.const 216 + i32.const 264 i32.gt_u select i32.const 1 @@ -2606,12 +2609,12 @@ i32.eq if local.get $0 - i32.const 216 + i32.const 264 i32.le_u if i32.const 0 - i32.const 184 - i32.const 92 + i32.const 232 + i32.const 100 i32.const 8 call $~lib/env/abort unreachable @@ -2641,14 +2644,14 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/ASSERT_UNREGISTERED (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 216 + i32.const 264 i32.le_u if i32.const 0 - i32.const 184 - i32.const 145 + i32.const 232 + i32.const 188 i32.const 2 call $~lib/env/abort unreachable @@ -2661,8 +2664,8 @@ i32.ne if i32.const 0 - i32.const 184 - i32.const 146 + i32.const 232 + i32.const 189 i32.const 2 call $~lib/env/abort unreachable @@ -2673,41 +2676,41 @@ (local $1 i32) (local $2 i32) loop $repeat|0 - local.get $0 + local.get $1 i32.const 9000 i32.lt_s if i32.const 1 i32.const 32 - local.get $0 + local.get $1 i32.const 15 i32.add i32.clz i32.sub i32.shl - local.tee $1 + local.tee $2 i32.const 0 i32.ne - local.tee $2 - if (result i32) - local.get $1 + local.tee $0 + if + local.get $2 i32.const 1 i32.sub - local.get $1 + local.get $2 i32.and i32.eqz - else - local.get $2 + local.set $0 end + local.get $0 if - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $repeat|0 else i32.const 0 - i32.const 72 + i32.const 88 i32.const 31 i32.const 2 call $~lib/env/abort @@ -2726,6 +2729,7 @@ i32.const 1 i32.const 32 global.get $std/runtime/barrier2 + local.tee $0 i32.const 16 i32.add i32.clz @@ -2733,7 +2737,7 @@ i32.shl i32.const 1 i32.const 32 - global.get $std/runtime/barrier2 + local.get $0 i32.const 15 i32.add i32.clz @@ -2756,6 +2760,7 @@ i32.const 1 i32.const 32 global.get $std/runtime/barrier3 + local.tee $0 i32.const 16 i32.add i32.clz @@ -2763,7 +2768,7 @@ i32.shl i32.const 1 i32.const 32 - global.get $std/runtime/barrier3 + local.get $0 i32.const 15 i32.add i32.clz @@ -2778,7 +2783,7 @@ br $continue|2 end end - i32.const 112 + i32.const 136 i32.const 1 global.get $std/runtime/barrier1 f64.convert_i32_u @@ -2787,7 +2792,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 136 + i32.const 168 i32.const 1 global.get $std/runtime/barrier2 f64.convert_i32_u @@ -2796,7 +2801,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 160 + i32.const 200 i32.const 1 global.get $std/runtime/barrier3 f64.convert_i32_u @@ -2806,7 +2811,7 @@ f64.const 0 call $~lib/env/trace i32.const 1 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate global.set $std/runtime/ref1 global.get $std/runtime/ref1 i32.const 16 @@ -2818,7 +2823,7 @@ i32.ne if i32.const 0 - i32.const 72 + i32.const 88 i32.const 46 i32.const 0 call $~lib/env/abort @@ -2830,21 +2835,23 @@ i32.ne if i32.const 0 - i32.const 72 + i32.const 88 i32.const 47 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref1 - local.tee $0 - local.get $0 + local.tee $1 global.get $std/runtime/barrier1 - call $~lib/runtime/REALLOCATE + call $~lib/runtime/doReallocate + local.set $2 + local.get $1 + local.get $2 i32.ne if i32.const 0 - i32.const 72 + i32.const 88 i32.const 48 i32.const 0 call $~lib/env/abort @@ -2856,7 +2863,7 @@ i32.ne if i32.const 0 - i32.const 72 + i32.const 88 i32.const 49 i32.const 0 call $~lib/env/abort @@ -2864,14 +2871,14 @@ end global.get $std/runtime/ref1 global.get $std/runtime/barrier2 - call $~lib/runtime/REALLOCATE + call $~lib/runtime/doReallocate global.set $std/runtime/ref2 global.get $std/runtime/ref1 global.get $std/runtime/ref2 i32.eq if i32.const 0 - i32.const 72 + i32.const 88 i32.const 51 i32.const 0 call $~lib/env/abort @@ -2887,39 +2894,39 @@ i32.ne if i32.const 0 - i32.const 72 + i32.const 88 i32.const 53 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref2 - local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 + local.tee $1 + call $~lib/runtime/assertUnregistered + local.get $1 i32.const 16 i32.sub call $~lib/memory/memory.free global.get $std/runtime/barrier2 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate global.set $std/runtime/ref3 global.get $std/runtime/ref1 global.get $std/runtime/ref3 i32.ne if i32.const 0 - i32.const 72 + i32.const 88 i32.const 56 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/barrier1 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate global.set $std/runtime/ref4 global.get $std/runtime/ref4 local.tee $0 - call $~lib/runtime/ASSERT_UNREGISTERED + call $~lib/runtime/assertUnregistered local.get $0 i32.const 16 i32.sub @@ -2932,7 +2939,7 @@ i32.ne if i32.const 0 - i32.const 72 + i32.const 88 i32.const 60 i32.const 0 call $~lib/env/abort @@ -2948,7 +2955,7 @@ i32.ne if i32.const 0 - i32.const 72 + i32.const 88 i32.const 62 i32.const 0 call $~lib/env/abort @@ -2960,14 +2967,14 @@ i32.ne if i32.const 0 - i32.const 72 + i32.const 88 i32.const 63 i32.const 0 call $~lib/env/abort unreachable end i32.const 10 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate global.set $std/runtime/ref5 global.get $std/runtime/ref5 i32.const 16 @@ -2977,7 +2984,7 @@ i32.ne if i32.const 0 - i32.const 72 + i32.const 88 i32.const 66 i32.const 0 call $~lib/env/abort @@ -2993,7 +3000,7 @@ i32.ne if i32.const 0 - i32.const 72 + i32.const 88 i32.const 67 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/std/runtime.ts b/tests/compiler/std/runtime.ts index 680eac883a..0782ff84e3 100644 --- a/tests/compiler/std/runtime.ts +++ b/tests/compiler/std/runtime.ts @@ -1,5 +1,5 @@ import "allocator/tlsf"; -import { CLASSID, ADJUST, ALLOCATE, REALLOCATE, REGISTER, DISCARD, HEADER, HEADER_SIZE, HEADER_MAGIC } from "runtime"; +import { CLASSID, ADJUSTOBLOCK, ALLOCATE, REALLOCATE, REGISTER, DISCARD, HEADER, HEADER_SIZE, HEADER_MAGIC } from "runtime"; var register_ref: usize = 0; @@ -26,16 +26,16 @@ function isPowerOf2(x: i32): bool { return x != 0 && (x & (x - 1)) == 0; } -assert(ADJUST(0) > 0); +assert(ADJUSTOBLOCK(0) > 0); for (let i = 0; i < 9000; ++i) { - assert(isPowerOf2(ADJUST(i))); + assert(isPowerOf2(ADJUSTOBLOCK(i))); } -var barrier1 = ADJUST(0); +var barrier1 = ADJUSTOBLOCK(0); var barrier2 = barrier1 + 1; -while (ADJUST(barrier2 + 1) == ADJUST(barrier2)) ++barrier2; +while (ADJUSTOBLOCK(barrier2 + 1) == ADJUSTOBLOCK(barrier2)) ++barrier2; var barrier3 = barrier2 + 1; -while (ADJUST(barrier3 + 1) == ADJUST(barrier3)) ++barrier3; +while (ADJUSTOBLOCK(barrier3 + 1) == ADJUSTOBLOCK(barrier3)) ++barrier3; trace("barrier1", 1, barrier1); trace("barrier2", 1, barrier2); diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 2409d5b2c1..5f8b80c15e 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -11,12 +11,12 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00,\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") - (data (i32.const 64) "\01\00\00\00\1c\00\00\00s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 104) "\01\00\00\00\10\00\00\00b\00a\00r\00r\00i\00e\00r\001\00") - (data (i32.const 128) "\01\00\00\00\10\00\00\00b\00a\00r\00r\00i\00e\00r\002\00") - (data (i32.const 152) "\01\00\00\00\10\00\00\00b\00a\00r\00r\00i\00e\00r\003\00") - (data (i32.const 176) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 72) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 120) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\001\00") + (data (i32.const 152) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\002\00") + (data (i32.const 184) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\003\00") + (data (i32.const 216) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) @@ -49,11 +49,12 @@ (global $std/runtime/header1 (mut i32) (i32.const 0)) (global $std/runtime/ref2 (mut i32) (i32.const 0)) (global $std/runtime/header2 (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/runtime/ref3 (mut i32) (i32.const 0)) (global $std/runtime/ref4 (mut i32) (i32.const 0)) (global $std/runtime/header4 (mut i32) (i32.const 0)) (global $std/runtime/ref5 (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 216)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 264)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -66,14 +67,14 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 109 i32.const 0 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/ADJUST (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -115,7 +116,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 130 i32.const 4 call $~lib/env/abort @@ -136,7 +137,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 153 i32.const 4 call $~lib/env/abort @@ -148,7 +149,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 154 i32.const 4 call $~lib/env/abort @@ -181,7 +182,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 76 i32.const 4 call $~lib/env/abort @@ -201,7 +202,7 @@ i32.eqz if (result i32) i32.const 0 - i32.const 16 + i32.const 24 i32.const 77 i32.const 11 call $~lib/env/abort @@ -217,7 +218,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 414 i32.const 2 call $~lib/env/abort @@ -235,7 +236,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 144 i32.const 4 call $~lib/env/abort @@ -247,7 +248,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 145 i32.const 4 call $~lib/env/abort @@ -271,7 +272,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 124 i32.const 4 call $~lib/env/abort @@ -301,7 +302,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 244 i32.const 4 call $~lib/env/abort @@ -327,7 +328,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 246 i32.const 4 call $~lib/env/abort @@ -438,7 +439,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 68 i32.const 4 call $~lib/env/abort @@ -452,7 +453,7 @@ i32.eqz if (result i32) i32.const 0 - i32.const 16 + i32.const 24 i32.const 69 i32.const 11 call $~lib/env/abort @@ -469,7 +470,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 320 i32.const 4 call $~lib/env/abort @@ -482,7 +483,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 321 i32.const 4 call $~lib/env/abort @@ -495,7 +496,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 322 i32.const 4 call $~lib/env/abort @@ -521,7 +522,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 175 i32.const 4 call $~lib/env/abort @@ -536,7 +537,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 177 i32.const 4 call $~lib/env/abort @@ -562,7 +563,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 179 i32.const 4 call $~lib/env/abort @@ -574,7 +575,7 @@ i32.eqz if (result i32) i32.const 0 - i32.const 16 + i32.const 24 i32.const 183 i32.const 23 call $~lib/env/abort @@ -622,7 +623,7 @@ i32.eqz if (result i32) i32.const 0 - i32.const 16 + i32.const 24 i32.const 197 i32.const 24 call $~lib/env/abort @@ -640,7 +641,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 199 i32.const 6 call $~lib/env/abort @@ -695,7 +696,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 212 i32.const 4 call $~lib/env/abort @@ -786,7 +787,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 363 i32.const 4 call $~lib/env/abort @@ -799,7 +800,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 364 i32.const 4 call $~lib/env/abort @@ -812,7 +813,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 365 i32.const 4 call $~lib/env/abort @@ -833,7 +834,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 370 i32.const 6 call $~lib/env/abort @@ -862,7 +863,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 379 i32.const 6 call $~lib/env/abort @@ -933,7 +934,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 408 i32.const 2 call $~lib/env/abort @@ -949,7 +950,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 408 i32.const 2 call $~lib/env/abort @@ -979,7 +980,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 282 i32.const 4 call $~lib/env/abort @@ -1075,7 +1076,7 @@ local.get $7 else i32.const 0 - i32.const 16 + i32.const 24 i32.const 309 i32.const 16 call $~lib/env/abort @@ -1112,7 +1113,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 334 i32.const 4 call $~lib/env/abort @@ -1132,7 +1133,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 335 i32.const 4 call $~lib/env/abort @@ -1145,7 +1146,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 336 i32.const 4 call $~lib/env/abort @@ -1205,7 +1206,7 @@ i32.eqz if (result i32) i32.const 0 - i32.const 16 + i32.const 24 i32.const 354 i32.const 25 call $~lib/env/abort @@ -1435,7 +1436,7 @@ i32.eqz if (result i32) i32.const 0 - i32.const 16 + i32.const 24 i32.const 467 i32.const 12 call $~lib/env/abort @@ -1456,7 +1457,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 470 i32.const 2 call $~lib/env/abort @@ -1469,10 +1470,10 @@ end return ) - (func $~lib/runtime/ALLOCATE (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUST + call $~lib/runtime/ADJUSTOBLOCK call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -2694,87 +2695,78 @@ ) (func $~lib/memory/memory.copy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 - local.set $3 local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $3 - local.get $4 i32.eq if br $~lib/util/memory/memmove|inlined.0 end - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add - local.get $3 + local.get $0 i32.le_u - local.tee $6 + local.tee $3 if (result i32) - local.get $6 - else local.get $3 - local.get $5 + else + local.get $0 + local.get $2 i32.add - local.get $4 + local.get $1 i32.le_u end if - local.get $3 - local.get $4 - local.get $5 + local.get $0 + local.get $1 + local.get $2 call $~lib/util/memory/memcpy br $~lib/util/memory/memmove|inlined.0 end - local.get $3 - local.get $4 + local.get $0 + local.get $1 i32.lt_u if - local.get $4 + local.get $1 i32.const 7 i32.and - local.get $3 + local.get $0 i32.const 7 i32.and i32.eq if block $break|0 loop $continue|0 - local.get $3 + local.get $0 i32.const 7 i32.and if block - local.get $5 + local.get $2 i32.eqz if br $~lib/util/memory/memmove|inlined.0 end - local.get $5 + local.get $2 i32.const 1 i32.sub - local.set $5 + local.set $2 block (result i32) - local.get $3 - local.tee $6 + local.get $0 + local.tee $3 i32.const 1 i32.add - local.set $3 - local.get $6 + local.set $0 + local.get $3 end block (result i32) - local.get $4 - local.tee $6 + local.get $1 + local.tee $3 i32.const 1 i32.add - local.set $4 - local.get $6 + local.set $1 + local.get $3 end i32.load8_u i32.store8 @@ -2785,27 +2777,27 @@ end block $break|1 loop $continue|1 - local.get $5 + local.get $2 i32.const 8 i32.ge_u if block - local.get $3 - local.get $4 + local.get $0 + local.get $1 i64.load i64.store - local.get $5 + local.get $2 i32.const 8 i32.sub - local.set $5 - local.get $3 + local.set $2 + local.get $0 i32.const 8 i32.add - local.set $3 - local.get $4 + local.set $0 + local.get $1 i32.const 8 i32.add - local.set $4 + local.set $1 end br $continue|1 end @@ -2814,67 +2806,67 @@ end block $break|2 loop $continue|2 - local.get $5 + local.get $2 if block block (result i32) - local.get $3 - local.tee $6 + local.get $0 + local.tee $3 i32.const 1 i32.add - local.set $3 - local.get $6 + local.set $0 + local.get $3 end block (result i32) - local.get $4 - local.tee $6 + local.get $1 + local.tee $3 i32.const 1 i32.add - local.set $4 - local.get $6 + local.set $1 + local.get $3 end i32.load8_u i32.store8 - local.get $5 + local.get $2 i32.const 1 i32.sub - local.set $5 + local.set $2 end br $continue|2 end end end else - local.get $4 + local.get $1 i32.const 7 i32.and - local.get $3 + local.get $0 i32.const 7 i32.and i32.eq if block $break|3 loop $continue|3 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 7 i32.and if block - local.get $5 + local.get $2 i32.eqz if br $~lib/util/memory/memmove|inlined.0 end - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $5 + local.tee $2 i32.add - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 @@ -2885,20 +2877,20 @@ end block $break|4 loop $continue|4 - local.get $5 + local.get $2 i32.const 8 i32.ge_u if block - local.get $5 + local.get $2 i32.const 8 i32.sub - local.set $5 - local.get $3 - local.get $5 + local.set $2 + local.get $0 + local.get $2 i32.add - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add i64.load i64.store @@ -2910,16 +2902,16 @@ end block $break|5 loop $continue|5 - local.get $5 + local.get $2 if - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $5 + local.tee $2 i32.add - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 @@ -2933,261 +2925,252 @@ (func $~lib/memory/memory.fill (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i64) + (local $5 i64) block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $3 - local.get $1 - local.set $4 local.get $2 - local.set $5 - local.get $5 i32.eqz if br $~lib/util/memory/memset|inlined.0 end - local.get $3 - local.get $4 + local.get $0 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 1 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 2 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 1 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 + local.get $0 i32.const 2 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 2 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 3 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 6 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 3 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 4 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 8 i32.le_u if br $~lib/util/memory/memset|inlined.0 end i32.const 0 - local.get $3 + local.get $0 i32.sub i32.const 3 i32.and - local.set $6 + local.set $3 + local.get $0 local.get $3 - local.get $6 i32.add - local.set $3 - local.get $5 - local.get $6 + local.set $0 + local.get $2 + local.get $3 i32.sub - local.set $5 - local.get $5 + local.set $2 + local.get $2 i32.const -4 i32.and - local.set $5 + local.set $2 i32.const -1 i32.const 255 i32.div_u - local.get $4 + local.get $1 i32.const 255 i32.and i32.mul - local.set $7 - local.get $3 - local.get $7 + local.set $4 + local.get $0 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 4 i32.sub - local.get $7 + local.get $4 i32.store - local.get $5 + local.get $2 i32.const 8 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 4 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 8 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 12 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 8 i32.sub - local.get $7 + local.get $4 i32.store - local.get $5 + local.get $2 i32.const 24 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 12 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 16 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 20 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 24 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 28 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 24 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 20 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 16 i32.sub - local.get $7 + local.get $4 i32.store i32.const 24 - local.get $3 + local.get $0 i32.const 4 i32.and i32.add - local.set $6 + local.set $3 + local.get $0 local.get $3 - local.get $6 i32.add - local.set $3 - local.get $5 - local.get $6 + local.set $0 + local.get $2 + local.get $3 i32.sub - local.set $5 - local.get $7 + local.set $2 + local.get $4 i64.extend_i32_u - local.get $7 + local.get $4 i64.extend_i32_u i64.const 32 i64.shl i64.or - local.set $8 + local.set $5 block $break|0 loop $continue|0 - local.get $5 + local.get $2 i32.const 32 i32.ge_u if block - local.get $3 - local.get $8 + local.get $0 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 8 i32.add - local.get $8 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 16 i32.add - local.get $8 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 24 i32.add - local.get $8 - i64.store local.get $5 + i64.store + local.get $2 i32.const 32 i32.sub - local.set $5 - local.get $3 + local.set $2 + local.get $0 i32.const 32 i32.add - local.set $3 + local.set $0 end br $continue|0 end @@ -3222,7 +3205,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 483 i32.const 6 call $~lib/env/abort @@ -3245,7 +3228,7 @@ local.get $0 global.set $std/runtime/register_ref ) - (func $~lib/runtime/REALLOCATE (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doReallocate (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3263,10 +3246,10 @@ i32.lt_u if local.get $1 - call $~lib/runtime/ADJUST + call $~lib/runtime/ADJUSTOBLOCK local.set $4 local.get $3 - call $~lib/runtime/ADJUST + call $~lib/runtime/ADJUSTOBLOCK i32.const 0 local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3315,8 +3298,8 @@ i32.eqz if i32.const 0 - i32.const 184 - i32.const 92 + i32.const 232 + i32.const 100 i32.const 8 call $~lib/env/abort unreachable @@ -3349,15 +3332,15 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/ASSERT_UNREGISTERED (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u i32.eqz if i32.const 0 - i32.const 184 - i32.const 145 + i32.const 232 + i32.const 188 i32.const 2 call $~lib/env/abort unreachable @@ -3371,28 +3354,40 @@ i32.eqz if i32.const 0 - i32.const 184 - i32.const 146 + i32.const 232 + i32.const 189 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/DISCARD (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/doDiscard (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $~lib/runtime/ASSERT_UNREGISTERED + call $~lib/runtime/assertUnregistered local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub call $~lib/memory/memory.free ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doRegister (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + call $std/runtime/__gc_register + local.get $0 + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $~lib/string/String#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -3400,8 +3395,9 @@ i32.const 1 i32.shr_u ) - (func $start:std/runtime (; 34 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 35 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) call $start:~lib/allocator/tlsf i32.const 2 i32.const 3 @@ -3409,20 +3405,20 @@ i32.eqz if i32.const 0 - i32.const 72 + i32.const 88 i32.const 23 i32.const 0 call $~lib/env/abort unreachable end i32.const 0 - call $~lib/runtime/ADJUST + call $~lib/runtime/ADJUSTOBLOCK i32.const 0 i32.gt_u i32.eqz if i32.const 0 - i32.const 72 + i32.const 88 i32.const 29 i32.const 0 call $~lib/env/abort @@ -3438,12 +3434,12 @@ i32.eqz br_if $break|0 local.get $0 - call $~lib/runtime/ADJUST + call $~lib/runtime/ADJUSTOBLOCK call $std/runtime/isPowerOf2 i32.eqz if i32.const 0 - i32.const 72 + i32.const 88 i32.const 31 i32.const 2 call $~lib/env/abort @@ -3459,7 +3455,7 @@ unreachable end i32.const 0 - call $~lib/runtime/ADJUST + call $~lib/runtime/ADJUSTOBLOCK global.set $std/runtime/barrier1 global.get $std/runtime/barrier1 i32.const 1 @@ -3470,9 +3466,9 @@ global.get $std/runtime/barrier2 i32.const 1 i32.add - call $~lib/runtime/ADJUST + call $~lib/runtime/ADJUSTOBLOCK global.get $std/runtime/barrier2 - call $~lib/runtime/ADJUST + call $~lib/runtime/ADJUSTOBLOCK i32.eq if global.get $std/runtime/barrier2 @@ -3492,9 +3488,9 @@ global.get $std/runtime/barrier3 i32.const 1 i32.add - call $~lib/runtime/ADJUST + call $~lib/runtime/ADJUSTOBLOCK global.get $std/runtime/barrier3 - call $~lib/runtime/ADJUST + call $~lib/runtime/ADJUSTOBLOCK i32.eq if global.get $std/runtime/barrier3 @@ -3505,7 +3501,7 @@ end end end - i32.const 112 + i32.const 136 i32.const 1 global.get $std/runtime/barrier1 f64.convert_i32_u @@ -3514,7 +3510,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 136 + i32.const 168 i32.const 1 global.get $std/runtime/barrier2 f64.convert_i32_u @@ -3523,7 +3519,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 160 + i32.const 200 i32.const 1 global.get $std/runtime/barrier3 f64.convert_i32_u @@ -3532,8 +3528,12 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 1 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + i32.const 1 + local.set $0 + local.get $0 + call $~lib/runtime/doAllocate + end global.set $std/runtime/ref1 global.get $std/runtime/ref1 global.get $~lib/runtime/HEADER_SIZE @@ -3546,7 +3546,7 @@ i32.eqz if i32.const 0 - i32.const 72 + i32.const 88 i32.const 46 i32.const 0 call $~lib/env/abort @@ -3559,21 +3559,27 @@ i32.eqz if i32.const 0 - i32.const 72 + i32.const 88 i32.const 47 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref1 - global.get $std/runtime/ref1 - global.get $std/runtime/barrier1 - call $~lib/runtime/REALLOCATE + block $~lib/runtime/REALLOCATE|inlined.0 (result i32) + global.get $std/runtime/ref1 + local.set $0 + global.get $std/runtime/barrier1 + local.set $1 + local.get $0 + local.get $1 + call $~lib/runtime/doReallocate + end i32.eq i32.eqz if i32.const 0 - i32.const 72 + i32.const 88 i32.const 48 i32.const 0 call $~lib/env/abort @@ -3586,15 +3592,21 @@ i32.eqz if i32.const 0 - i32.const 72 + i32.const 88 i32.const 49 i32.const 0 call $~lib/env/abort unreachable end - global.get $std/runtime/ref1 - global.get $std/runtime/barrier2 - call $~lib/runtime/REALLOCATE + block $~lib/runtime/REALLOCATE|inlined.1 (result i32) + global.get $std/runtime/ref1 + local.set $1 + global.get $std/runtime/barrier2 + local.set $0 + local.get $1 + local.get $0 + call $~lib/runtime/doReallocate + end global.set $std/runtime/ref2 global.get $std/runtime/ref1 global.get $std/runtime/ref2 @@ -3602,7 +3614,7 @@ i32.eqz if i32.const 0 - i32.const 72 + i32.const 88 i32.const 51 i32.const 0 call $~lib/env/abort @@ -3619,16 +3631,24 @@ i32.eqz if i32.const 0 - i32.const 72 + i32.const 88 i32.const 53 i32.const 0 call $~lib/env/abort unreachable end - global.get $std/runtime/ref2 - call $~lib/runtime/DISCARD - global.get $std/runtime/barrier2 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/DISCARD|inlined.0 + global.get $std/runtime/ref2 + local.set $0 + local.get $0 + call $~lib/runtime/doDiscard + end + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + global.get $std/runtime/barrier2 + local.set $0 + local.get $0 + call $~lib/runtime/doAllocate + end global.set $std/runtime/ref3 global.get $std/runtime/ref1 global.get $std/runtime/ref3 @@ -3636,28 +3656,25 @@ i32.eqz if i32.const 0 - i32.const 72 + i32.const 88 i32.const 56 i32.const 0 call $~lib/env/abort unreachable end - global.get $std/runtime/barrier1 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + global.get $std/runtime/barrier1 + local.set $0 + local.get $0 + call $~lib/runtime/doAllocate + end global.set $std/runtime/ref4 block $~lib/runtime/REGISTER|inlined.0 (result i32) global.get $std/runtime/ref4 local.set $0 local.get $0 - call $~lib/runtime/ASSERT_UNREGISTERED - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub i32.const 2 - i32.store - local.get $0 - call $std/runtime/__gc_register - local.get $0 + call $~lib/runtime/doRegister end drop global.get $std/runtime/register_ref @@ -3666,7 +3683,7 @@ i32.eqz if i32.const 0 - i32.const 72 + i32.const 88 i32.const 60 i32.const 0 call $~lib/env/abort @@ -3683,7 +3700,7 @@ i32.eqz if i32.const 0 - i32.const 72 + i32.const 88 i32.const 62 i32.const 0 call $~lib/env/abort @@ -3696,14 +3713,18 @@ i32.eqz if i32.const 0 - i32.const 72 + i32.const 88 i32.const 63 i32.const 0 call $~lib/env/abort unreachable end - i32.const 10 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.3 (result i32) + i32.const 10 + local.set $0 + local.get $0 + call $~lib/runtime/doAllocate + end global.set $std/runtime/ref5 global.get $std/runtime/ref5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength @@ -3712,7 +3733,7 @@ i32.eqz if i32.const 0 - i32.const 72 + i32.const 88 i32.const 66 i32.const 0 call $~lib/env/abort @@ -3725,16 +3746,16 @@ i32.eqz if i32.const 0 - i32.const 72 + i32.const 88 i32.const 67 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 35 ;) (type $FUNCSIG$v) + (func $start (; 36 ;) (type $FUNCSIG$v) call $start:std/runtime ) - (func $null (; 36 ;) (type $FUNCSIG$v) + (func $null (; 37 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 2d28d36cb3..0eb8eb6ac5 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -37,7 +37,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/adjustToBlock (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -137,7 +137,7 @@ (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/adjustToBlock + call $~lib/runtime/ADJUSTOBLOCK call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -196,261 +196,252 @@ (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i64) + (local $5 i64) block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $3 - local.get $1 - local.set $4 local.get $2 - local.set $5 - local.get $5 i32.eqz if br $~lib/util/memory/memset|inlined.0 end - local.get $3 - local.get $4 + local.get $0 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 1 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 2 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 1 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 + local.get $0 i32.const 2 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 2 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 3 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 6 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 3 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 4 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 8 i32.le_u if br $~lib/util/memory/memset|inlined.0 end i32.const 0 - local.get $3 + local.get $0 i32.sub i32.const 3 i32.and - local.set $6 + local.set $3 + local.get $0 local.get $3 - local.get $6 i32.add - local.set $3 - local.get $5 - local.get $6 + local.set $0 + local.get $2 + local.get $3 i32.sub - local.set $5 - local.get $5 + local.set $2 + local.get $2 i32.const -4 i32.and - local.set $5 + local.set $2 i32.const -1 i32.const 255 i32.div_u - local.get $4 + local.get $1 i32.const 255 i32.and i32.mul - local.set $7 - local.get $3 - local.get $7 + local.set $4 + local.get $0 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 4 i32.sub - local.get $7 + local.get $4 i32.store - local.get $5 + local.get $2 i32.const 8 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 4 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 8 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 12 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 8 i32.sub - local.get $7 + local.get $4 i32.store - local.get $5 + local.get $2 i32.const 24 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 12 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 16 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 20 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 24 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 28 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 24 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 20 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 16 i32.sub - local.get $7 + local.get $4 i32.store i32.const 24 - local.get $3 + local.get $0 i32.const 4 i32.and i32.add - local.set $6 + local.set $3 + local.get $0 local.get $3 - local.get $6 i32.add - local.set $3 - local.get $5 - local.get $6 + local.set $0 + local.get $2 + local.get $3 i32.sub - local.set $5 - local.get $7 + local.set $2 + local.get $4 i64.extend_i32_u - local.get $7 + local.get $4 i64.extend_i32_u i64.const 32 i64.shl i64.or - local.set $8 + local.set $5 block $break|0 loop $continue|0 - local.get $5 + local.get $2 i32.const 32 i32.ge_u if block - local.get $3 - local.get $8 + local.get $0 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 8 i32.add - local.get $8 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 16 i32.add - local.get $8 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 24 i32.add - local.get $8 - i64.store local.get $5 + i64.store + local.get $2 i32.const 32 i32.sub - local.set $5 - local.get $3 + local.set $2 + local.get $0 i32.const 32 i32.add - local.set $3 + local.set $0 end br $continue|0 end diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 2a488e58eb..5c97af7e32 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1571,94 +1571,91 @@ (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $3 - local.get $1 local.get $0 - local.tee $2 + local.get $1 i32.eq br_if $~lib/util/memory/memmove|inlined.0 local.get $1 - local.get $3 - i32.add local.get $2 + i32.add + local.get $0 i32.le_u - local.tee $0 + local.tee $3 i32.eqz if + local.get $0 local.get $2 - local.get $3 i32.add local.get $1 i32.le_u - local.set $0 + local.set $3 end - local.get $0 + local.get $3 if - local.get $2 + local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/util/memory/memcpy br $~lib/util/memory/memmove|inlined.0 end - local.get $2 + local.get $0 local.get $1 i32.lt_u if local.get $1 i32.const 7 i32.and - local.get $2 + local.get $0 i32.const 7 i32.and i32.eq if loop $continue|0 - local.get $2 + local.get $0 i32.const 7 i32.and if - local.get $3 + local.get $2 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $2 i32.const 1 i32.sub - local.set $3 - local.get $2 + local.set $2 + local.get $0 local.tee $4 i32.const 1 i32.add - local.set $2 + local.set $0 local.get $1 - local.tee $0 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $4 - local.get $0 + local.get $3 i32.load8_u i32.store8 br $continue|0 end end loop $continue|1 - local.get $3 + local.get $2 i32.const 8 i32.ge_u if - local.get $2 + local.get $0 local.get $1 i64.load i64.store - local.get $3 + local.get $2 i32.const 8 i32.sub - local.set $3 - local.get $2 + local.set $2 + local.get $0 i32.const 8 i32.add - local.set $2 + local.set $0 local.get $1 i32.const 8 i32.add @@ -1668,26 +1665,26 @@ end end loop $continue|2 - local.get $3 + local.get $2 if - local.get $2 + local.get $0 local.tee $4 i32.const 1 i32.add - local.set $2 + local.set $0 local.get $1 - local.tee $0 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $4 - local.get $0 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $2 i32.const 1 i32.sub - local.set $3 + local.set $2 br $continue|2 end end @@ -1695,29 +1692,29 @@ local.get $1 i32.const 7 i32.and - local.get $2 + local.get $0 i32.const 7 i32.and i32.eq if loop $continue|3 + local.get $0 local.get $2 - local.get $3 i32.add i32.const 7 i32.and if - local.get $3 + local.get $2 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $2 i32.const 1 i32.sub - local.tee $3 - local.get $2 + local.tee $2 + local.get $0 i32.add local.get $1 - local.get $3 + local.get $2 i32.add i32.load8_u i32.store8 @@ -1725,18 +1722,18 @@ end end loop $continue|4 - local.get $3 + local.get $2 i32.const 8 i32.ge_u if - local.get $3 + local.get $2 i32.const 8 i32.sub - local.tee $3 - local.get $2 + local.tee $2 + local.get $0 i32.add local.get $1 - local.get $3 + local.get $2 i32.add i64.load i64.store @@ -1745,16 +1742,16 @@ end end loop $continue|5 - local.get $3 + local.get $2 if - local.get $3 + local.get $2 i32.const 1 i32.sub - local.tee $3 - local.get $2 + local.tee $2 + local.get $0 i32.add local.get $1 - local.get $3 + local.get $2 i32.add i32.load8_u i32.store8 diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index dc77ca00e9..149ed9b6f3 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -245,7 +245,7 @@ i32.add i32.load16_u ) - (func $~lib/runtime/adjustToBlock (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -345,7 +345,7 @@ (func $~lib/runtime/doAllocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/adjustToBlock + call $~lib/runtime/ADJUSTOBLOCK call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -2014,87 +2014,78 @@ ) (func $~lib/memory/memory.copy (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 - local.set $3 local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $3 - local.get $4 i32.eq if br $~lib/util/memory/memmove|inlined.0 end - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add - local.get $3 + local.get $0 i32.le_u - local.tee $6 + local.tee $3 if (result i32) - local.get $6 - else local.get $3 - local.get $5 + else + local.get $0 + local.get $2 i32.add - local.get $4 + local.get $1 i32.le_u end if - local.get $3 - local.get $4 - local.get $5 + local.get $0 + local.get $1 + local.get $2 call $~lib/util/memory/memcpy br $~lib/util/memory/memmove|inlined.0 end - local.get $3 - local.get $4 + local.get $0 + local.get $1 i32.lt_u if - local.get $4 + local.get $1 i32.const 7 i32.and - local.get $3 + local.get $0 i32.const 7 i32.and i32.eq if block $break|0 loop $continue|0 - local.get $3 + local.get $0 i32.const 7 i32.and if block - local.get $5 + local.get $2 i32.eqz if br $~lib/util/memory/memmove|inlined.0 end - local.get $5 + local.get $2 i32.const 1 i32.sub - local.set $5 + local.set $2 block (result i32) - local.get $3 - local.tee $6 + local.get $0 + local.tee $3 i32.const 1 i32.add - local.set $3 - local.get $6 + local.set $0 + local.get $3 end block (result i32) - local.get $4 - local.tee $6 + local.get $1 + local.tee $3 i32.const 1 i32.add - local.set $4 - local.get $6 + local.set $1 + local.get $3 end i32.load8_u i32.store8 @@ -2105,27 +2096,27 @@ end block $break|1 loop $continue|1 - local.get $5 + local.get $2 i32.const 8 i32.ge_u if block - local.get $3 - local.get $4 + local.get $0 + local.get $1 i64.load i64.store - local.get $5 + local.get $2 i32.const 8 i32.sub - local.set $5 - local.get $3 + local.set $2 + local.get $0 i32.const 8 i32.add - local.set $3 - local.get $4 + local.set $0 + local.get $1 i32.const 8 i32.add - local.set $4 + local.set $1 end br $continue|1 end @@ -2134,67 +2125,67 @@ end block $break|2 loop $continue|2 - local.get $5 + local.get $2 if block block (result i32) - local.get $3 - local.tee $6 + local.get $0 + local.tee $3 i32.const 1 i32.add - local.set $3 - local.get $6 + local.set $0 + local.get $3 end block (result i32) - local.get $4 - local.tee $6 + local.get $1 + local.tee $3 i32.const 1 i32.add - local.set $4 - local.get $6 + local.set $1 + local.get $3 end i32.load8_u i32.store8 - local.get $5 + local.get $2 i32.const 1 i32.sub - local.set $5 + local.set $2 end br $continue|2 end end end else - local.get $4 + local.get $1 i32.const 7 i32.and - local.get $3 + local.get $0 i32.const 7 i32.and i32.eq if block $break|3 loop $continue|3 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 7 i32.and if block - local.get $5 + local.get $2 i32.eqz if br $~lib/util/memory/memmove|inlined.0 end - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $5 + local.tee $2 i32.add - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 @@ -2205,20 +2196,20 @@ end block $break|4 loop $continue|4 - local.get $5 + local.get $2 i32.const 8 i32.ge_u if block - local.get $5 + local.get $2 i32.const 8 i32.sub - local.set $5 - local.get $3 - local.get $5 + local.set $2 + local.get $0 + local.get $2 i32.add - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add i64.load i64.store @@ -2230,16 +2221,16 @@ end block $break|5 loop $continue|5 - local.get $5 + local.get $2 if - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $5 + local.tee $2 i32.add - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 @@ -3515,261 +3506,252 @@ (func $~lib/memory/memory.fill (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i64) + (local $5 i64) block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $3 - local.get $1 - local.set $4 local.get $2 - local.set $5 - local.get $5 i32.eqz if br $~lib/util/memory/memset|inlined.0 end - local.get $3 - local.get $4 + local.get $0 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 1 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 2 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 1 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 + local.get $0 i32.const 2 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 2 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 3 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 6 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 3 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 4 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 8 i32.le_u if br $~lib/util/memory/memset|inlined.0 end i32.const 0 - local.get $3 + local.get $0 i32.sub i32.const 3 i32.and - local.set $6 + local.set $3 + local.get $0 local.get $3 - local.get $6 i32.add - local.set $3 - local.get $5 - local.get $6 + local.set $0 + local.get $2 + local.get $3 i32.sub - local.set $5 - local.get $5 + local.set $2 + local.get $2 i32.const -4 i32.and - local.set $5 + local.set $2 i32.const -1 i32.const 255 i32.div_u - local.get $4 + local.get $1 i32.const 255 i32.and i32.mul - local.set $7 - local.get $3 - local.get $7 + local.set $4 + local.get $0 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 4 i32.sub - local.get $7 + local.get $4 i32.store - local.get $5 + local.get $2 i32.const 8 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 4 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 8 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 12 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 8 i32.sub - local.get $7 + local.get $4 i32.store - local.get $5 + local.get $2 i32.const 24 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 12 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 16 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 20 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 24 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 28 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 24 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 20 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 16 i32.sub - local.get $7 + local.get $4 i32.store i32.const 24 - local.get $3 + local.get $0 i32.const 4 i32.and i32.add - local.set $6 + local.set $3 + local.get $0 local.get $3 - local.get $6 i32.add - local.set $3 - local.get $5 - local.get $6 + local.set $0 + local.get $2 + local.get $3 i32.sub - local.set $5 - local.get $7 + local.set $2 + local.get $4 i64.extend_i32_u - local.get $7 + local.get $4 i64.extend_i32_u i64.const 32 i64.shl i64.or - local.set $8 + local.set $5 block $break|0 loop $continue|0 - local.get $5 + local.get $2 i32.const 32 i32.ge_u if block - local.get $3 - local.get $8 + local.get $0 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 8 i32.add - local.get $8 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 16 i32.add - local.get $8 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 24 i32.add - local.get $8 - i64.store local.get $5 + i64.store + local.get $2 i32.const 32 i32.sub - local.set $5 - local.get $3 + local.set $2 + local.get $0 i32.const 32 i32.add - local.set $3 + local.set $0 end br $continue|0 end @@ -3928,10 +3910,10 @@ i32.lt_u if local.get $1 - call $~lib/runtime/adjustToBlock + call $~lib/runtime/ADJUSTOBLOCK local.set $4 local.get $3 - call $~lib/runtime/adjustToBlock + call $~lib/runtime/ADJUSTOBLOCK i32.const 0 local.get $0 global.get $~lib/memory/HEAP_BASE diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 160c22ba1d..14eb1234fc 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -2717,94 +2717,91 @@ (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $3 - local.get $1 local.get $0 - local.tee $2 + local.get $1 i32.eq br_if $~lib/util/memory/memmove|inlined.0 local.get $1 - local.get $3 - i32.add local.get $2 + i32.add + local.get $0 i32.le_u - local.tee $0 + local.tee $3 i32.eqz if + local.get $0 local.get $2 - local.get $3 i32.add local.get $1 i32.le_u - local.set $0 + local.set $3 end - local.get $0 + local.get $3 if - local.get $2 + local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/util/memory/memcpy br $~lib/util/memory/memmove|inlined.0 end - local.get $2 + local.get $0 local.get $1 i32.lt_u if local.get $1 i32.const 7 i32.and - local.get $2 + local.get $0 i32.const 7 i32.and i32.eq if loop $continue|0 - local.get $2 + local.get $0 i32.const 7 i32.and if - local.get $3 + local.get $2 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $2 i32.const 1 i32.sub - local.set $3 - local.get $2 + local.set $2 + local.get $0 local.tee $4 i32.const 1 i32.add - local.set $2 + local.set $0 local.get $1 - local.tee $0 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $4 - local.get $0 + local.get $3 i32.load8_u i32.store8 br $continue|0 end end loop $continue|1 - local.get $3 + local.get $2 i32.const 8 i32.ge_u if - local.get $2 + local.get $0 local.get $1 i64.load i64.store - local.get $3 + local.get $2 i32.const 8 i32.sub - local.set $3 - local.get $2 + local.set $2 + local.get $0 i32.const 8 i32.add - local.set $2 + local.set $0 local.get $1 i32.const 8 i32.add @@ -2814,26 +2811,26 @@ end end loop $continue|2 - local.get $3 + local.get $2 if - local.get $2 + local.get $0 local.tee $4 i32.const 1 i32.add - local.set $2 + local.set $0 local.get $1 - local.tee $0 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $4 - local.get $0 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $2 i32.const 1 i32.sub - local.set $3 + local.set $2 br $continue|2 end end @@ -2841,29 +2838,29 @@ local.get $1 i32.const 7 i32.and - local.get $2 + local.get $0 i32.const 7 i32.and i32.eq if loop $continue|3 + local.get $0 local.get $2 - local.get $3 i32.add i32.const 7 i32.and if - local.get $3 + local.get $2 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $2 i32.const 1 i32.sub - local.tee $3 - local.get $2 + local.tee $2 + local.get $0 i32.add local.get $1 - local.get $3 + local.get $2 i32.add i32.load8_u i32.store8 @@ -2871,18 +2868,18 @@ end end loop $continue|4 - local.get $3 + local.get $2 i32.const 8 i32.ge_u if - local.get $3 + local.get $2 i32.const 8 i32.sub - local.tee $3 - local.get $2 + local.tee $2 + local.get $0 i32.add local.get $1 - local.get $3 + local.get $2 i32.add i64.load i64.store @@ -2891,16 +2888,16 @@ end end loop $continue|5 - local.get $3 + local.get $2 if - local.get $3 + local.get $2 i32.const 1 i32.sub - local.tee $3 - local.get $2 + local.tee $2 + local.get $0 i32.add local.get $1 - local.get $3 + local.get $2 i32.add i32.load8_u i32.store8 diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 78d0fc158d..7aca6ab85c 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -99,7 +99,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/adjustToBlock (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -199,7 +199,7 @@ (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/adjustToBlock + call $~lib/runtime/ADJUSTOBLOCK call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -215,261 +215,252 @@ (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i64) + (local $5 i64) block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $3 - local.get $1 - local.set $4 local.get $2 - local.set $5 - local.get $5 i32.eqz if br $~lib/util/memory/memset|inlined.0 end - local.get $3 - local.get $4 + local.get $0 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 1 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 2 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 1 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 + local.get $0 i32.const 2 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 2 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 3 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 6 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 3 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 4 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 8 i32.le_u if br $~lib/util/memory/memset|inlined.0 end i32.const 0 - local.get $3 + local.get $0 i32.sub i32.const 3 i32.and - local.set $6 + local.set $3 + local.get $0 local.get $3 - local.get $6 i32.add - local.set $3 - local.get $5 - local.get $6 + local.set $0 + local.get $2 + local.get $3 i32.sub - local.set $5 - local.get $5 + local.set $2 + local.get $2 i32.const -4 i32.and - local.set $5 + local.set $2 i32.const -1 i32.const 255 i32.div_u - local.get $4 + local.get $1 i32.const 255 i32.and i32.mul - local.set $7 - local.get $3 - local.get $7 + local.set $4 + local.get $0 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 4 i32.sub - local.get $7 + local.get $4 i32.store - local.get $5 + local.get $2 i32.const 8 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 4 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 8 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 12 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 8 i32.sub - local.get $7 + local.get $4 i32.store - local.get $5 + local.get $2 i32.const 24 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 12 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 16 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 20 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 24 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 28 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 24 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 20 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 16 i32.sub - local.get $7 + local.get $4 i32.store i32.const 24 - local.get $3 + local.get $0 i32.const 4 i32.and i32.add - local.set $6 + local.set $3 + local.get $0 local.get $3 - local.get $6 i32.add - local.set $3 - local.get $5 - local.get $6 + local.set $0 + local.get $2 + local.get $3 i32.sub - local.set $5 - local.get $7 + local.set $2 + local.get $4 i64.extend_i32_u - local.get $7 + local.get $4 i64.extend_i32_u i64.const 32 i64.shl i64.or - local.set $8 + local.set $5 block $break|0 loop $continue|0 - local.get $5 + local.get $2 i32.const 32 i32.ge_u if block - local.get $3 - local.get $8 + local.get $0 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 8 i32.add - local.get $8 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 16 i32.add - local.get $8 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 24 i32.add - local.get $8 - i64.store local.get $5 + i64.store + local.get $2 i32.const 32 i32.sub - local.set $5 - local.get $3 + local.set $2 + local.get $0 i32.const 32 i32.add - local.set $3 + local.set $0 end br $continue|0 end @@ -3464,87 +3455,78 @@ ) (func $~lib/memory/memory.copy (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 - local.set $3 local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $3 - local.get $4 i32.eq if br $~lib/util/memory/memmove|inlined.0 end - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add - local.get $3 + local.get $0 i32.le_u - local.tee $6 + local.tee $3 if (result i32) - local.get $6 - else local.get $3 - local.get $5 + else + local.get $0 + local.get $2 i32.add - local.get $4 + local.get $1 i32.le_u end if - local.get $3 - local.get $4 - local.get $5 + local.get $0 + local.get $1 + local.get $2 call $~lib/util/memory/memcpy br $~lib/util/memory/memmove|inlined.0 end - local.get $3 - local.get $4 + local.get $0 + local.get $1 i32.lt_u if - local.get $4 + local.get $1 i32.const 7 i32.and - local.get $3 + local.get $0 i32.const 7 i32.and i32.eq if block $break|0 loop $continue|0 - local.get $3 + local.get $0 i32.const 7 i32.and if block - local.get $5 + local.get $2 i32.eqz if br $~lib/util/memory/memmove|inlined.0 end - local.get $5 + local.get $2 i32.const 1 i32.sub - local.set $5 + local.set $2 block (result i32) - local.get $3 - local.tee $6 + local.get $0 + local.tee $3 i32.const 1 i32.add - local.set $3 - local.get $6 + local.set $0 + local.get $3 end block (result i32) - local.get $4 - local.tee $6 + local.get $1 + local.tee $3 i32.const 1 i32.add - local.set $4 - local.get $6 + local.set $1 + local.get $3 end i32.load8_u i32.store8 @@ -3555,27 +3537,27 @@ end block $break|1 loop $continue|1 - local.get $5 + local.get $2 i32.const 8 i32.ge_u if block - local.get $3 - local.get $4 + local.get $0 + local.get $1 i64.load i64.store - local.get $5 + local.get $2 i32.const 8 i32.sub - local.set $5 - local.get $3 + local.set $2 + local.get $0 i32.const 8 i32.add - local.set $3 - local.get $4 + local.set $0 + local.get $1 i32.const 8 i32.add - local.set $4 + local.set $1 end br $continue|1 end @@ -3584,67 +3566,67 @@ end block $break|2 loop $continue|2 - local.get $5 + local.get $2 if block block (result i32) - local.get $3 - local.tee $6 + local.get $0 + local.tee $3 i32.const 1 i32.add - local.set $3 - local.get $6 + local.set $0 + local.get $3 end block (result i32) - local.get $4 - local.tee $6 + local.get $1 + local.tee $3 i32.const 1 i32.add - local.set $4 - local.get $6 + local.set $1 + local.get $3 end i32.load8_u i32.store8 - local.get $5 + local.get $2 i32.const 1 i32.sub - local.set $5 + local.set $2 end br $continue|2 end end end else - local.get $4 + local.get $1 i32.const 7 i32.and - local.get $3 + local.get $0 i32.const 7 i32.and i32.eq if block $break|3 loop $continue|3 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 7 i32.and if block - local.get $5 + local.get $2 i32.eqz if br $~lib/util/memory/memmove|inlined.0 end - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $5 + local.tee $2 i32.add - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 @@ -3655,20 +3637,20 @@ end block $break|4 loop $continue|4 - local.get $5 + local.get $2 i32.const 8 i32.ge_u if block - local.get $5 + local.get $2 i32.const 8 i32.sub - local.set $5 - local.get $3 - local.get $5 + local.set $2 + local.get $0 + local.get $2 i32.add - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add i64.load i64.store @@ -3680,16 +3662,16 @@ end block $break|5 loop $continue|5 - local.get $5 + local.get $2 if - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $5 + local.tee $2 i32.add - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 @@ -12817,47 +12799,41 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - local.set $2 - local.get $1 - local.set $3 - local.get $2 i32.load offset=4 - local.set $4 + local.set $2 block $break|0 block i32.const 0 - local.set $5 - local.get $2 + local.set $3 + local.get $0 call $~lib/typedarray/Int8Array#get:length - local.set $6 + local.set $4 end loop $repeat|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 0 i32.shl i32.add i32.load8_s - local.get $5 - local.get $2 local.get $3 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $repeat|0 unreachable end @@ -12979,47 +12955,41 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - local.set $2 - local.get $1 - local.set $3 - local.get $2 i32.load offset=4 - local.set $4 + local.set $2 block $break|0 block i32.const 0 - local.set $5 - local.get $2 + local.set $3 + local.get $0 call $~lib/typedarray/Uint8Array#get:length - local.set $6 + local.set $4 end loop $repeat|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 0 i32.shl i32.add i32.load8_u - local.get $5 - local.get $2 local.get $3 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $repeat|0 unreachable end @@ -13135,47 +13105,41 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - local.set $2 - local.get $1 - local.set $3 - local.get $2 i32.load offset=4 - local.set $4 + local.set $2 block $break|0 block i32.const 0 - local.set $5 - local.get $2 + local.set $3 + local.get $0 call $~lib/typedarray/Uint8Array#get:length - local.set $6 + local.set $4 end loop $repeat|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 0 i32.shl i32.add i32.load8_u - local.get $5 - local.get $2 local.get $3 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $repeat|0 unreachable end @@ -13335,47 +13299,41 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - local.set $2 - local.get $1 - local.set $3 - local.get $2 i32.load offset=4 - local.set $4 + local.set $2 block $break|0 block i32.const 0 - local.set $5 - local.get $2 + local.set $3 + local.get $0 call $~lib/typedarray/Int16Array#get:length - local.set $6 + local.set $4 end loop $repeat|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 1 i32.shl i32.add i32.load16_s - local.get $5 - local.get $2 local.get $3 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $repeat|0 unreachable end @@ -13497,47 +13455,41 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - local.set $2 - local.get $1 - local.set $3 - local.get $2 i32.load offset=4 - local.set $4 + local.set $2 block $break|0 block i32.const 0 - local.set $5 - local.get $2 + local.set $3 + local.get $0 call $~lib/typedarray/Uint16Array#get:length - local.set $6 + local.set $4 end loop $repeat|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 1 i32.shl i32.add i32.load16_u - local.get $5 - local.get $2 local.get $3 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $repeat|0 unreachable end @@ -13649,47 +13601,41 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - local.set $2 - local.get $1 - local.set $3 - local.get $2 i32.load offset=4 - local.set $4 + local.set $2 block $break|0 block i32.const 0 - local.set $5 - local.get $2 + local.set $3 + local.get $0 call $~lib/typedarray/Int32Array#get:length - local.set $6 + local.set $4 end loop $repeat|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 2 i32.shl i32.add i32.load - local.get $5 - local.get $2 local.get $3 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $repeat|0 unreachable end @@ -13795,47 +13741,41 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - local.set $2 - local.get $1 - local.set $3 - local.get $2 i32.load offset=4 - local.set $4 + local.set $2 block $break|0 block i32.const 0 - local.set $5 - local.get $2 + local.set $3 + local.get $0 call $~lib/typedarray/Uint32Array#get:length - local.set $6 + local.set $4 end loop $repeat|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 2 i32.shl i32.add i32.load - local.get $5 - local.get $2 local.get $3 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $repeat|0 unreachable end @@ -13942,47 +13882,41 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - local.set $2 - local.get $1 - local.set $3 - local.get $2 i32.load offset=4 - local.set $4 + local.set $2 block $break|0 block i32.const 0 - local.set $5 - local.get $2 + local.set $3 + local.get $0 call $~lib/typedarray/Int64Array#get:length - local.set $6 + local.set $4 end loop $repeat|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 3 i32.shl i32.add i64.load - local.get $5 - local.get $2 local.get $3 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$vjii) end - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $repeat|0 unreachable end @@ -14089,47 +14023,41 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - local.set $2 - local.get $1 - local.set $3 - local.get $2 i32.load offset=4 - local.set $4 + local.set $2 block $break|0 block i32.const 0 - local.set $5 - local.get $2 + local.set $3 + local.get $0 call $~lib/typedarray/Uint64Array#get:length - local.set $6 + local.set $4 end loop $repeat|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 3 i32.shl i32.add i64.load - local.get $5 - local.get $2 local.get $3 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$vjii) end - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $repeat|0 unreachable end @@ -14236,47 +14164,41 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - local.set $2 - local.get $1 - local.set $3 - local.get $2 i32.load offset=4 - local.set $4 + local.set $2 block $break|0 block i32.const 0 - local.set $5 - local.get $2 + local.set $3 + local.get $0 call $~lib/typedarray/Float32Array#get:length - local.set $6 + local.set $4 end loop $repeat|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 2 i32.shl i32.add f32.load - local.get $5 - local.get $2 local.get $3 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$vfii) end - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $repeat|0 unreachable end @@ -14386,47 +14308,41 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - local.set $2 - local.get $1 - local.set $3 - local.get $2 i32.load offset=4 - local.set $4 + local.set $2 block $break|0 block i32.const 0 - local.set $5 - local.get $2 + local.set $3 + local.get $0 call $~lib/typedarray/Float64Array#get:length - local.set $6 + local.set $4 end loop $repeat|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s i32.eqz br_if $break|0 block i32.const 3 global.set $~lib/argc - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 3 i32.shl i32.add f64.load - local.get $5 - local.get $2 local.get $3 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$vdii) end - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $repeat|0 unreachable end From e63c6bd388cd2dedccfd9156c4a668f5128567d8 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 17 Mar 2019 01:35:44 +0100 Subject: [PATCH 042/119] local flow flags, see what works --- src/compiler.ts | 18 +- src/flow.ts | 146 +- std/assembly/util/hash.ts | 8 +- tests/compiler/call-super.optimized.wat | 188 +- tests/compiler/call-super.untouched.wat | 223 +- tests/compiler/constructor.optimized.wat | 156 +- tests/compiler/constructor.untouched.wat | 194 +- tests/compiler/exports.optimized.wat | 115 +- tests/compiler/exports.untouched.wat | 129 +- tests/compiler/getter-call.optimized.wat | 64 +- tests/compiler/getter-call.untouched.wat | 82 +- tests/compiler/inlining.optimized.wat | 58 +- tests/compiler/inlining.untouched.wat | 88 +- .../new-without-allocator.optimized.wat | 3 +- .../new-without-allocator.untouched.wat | 76 +- tests/compiler/number.optimized.wat | 969 +-- tests/compiler/number.untouched.wat | 1844 +++-- tests/compiler/object-literal.optimized.wat | 78 +- tests/compiler/object-literal.untouched.wat | 114 +- .../optional-typeparameters.optimized.wat | 60 +- .../optional-typeparameters.untouched.wat | 99 +- .../portable-conversions.optimized.wat | 106 +- .../portable-conversions.untouched.wat | 108 +- tests/compiler/retain-i32.optimized.wat | 38 +- tests/compiler/retain-i32.untouched.wat | 68 +- tests/compiler/static-this.optimized.wat | 4 +- tests/compiler/static-this.untouched.wat | 6 +- .../std/allocator_arena.optimized.wat | 801 ++- .../std/allocator_arena.untouched.wat | 1257 ++-- .../compiler/std/array-literal.optimized.wat | 105 +- .../compiler/std/array-literal.untouched.wat | 357 +- tests/compiler/std/date.optimized.wat | 138 +- tests/compiler/std/date.untouched.wat | 257 +- tests/compiler/std/hash.optimized.wat | 108 +- tests/compiler/std/hash.untouched.wat | 212 +- tests/compiler/std/math.optimized.wat | 6311 +++++++++-------- tests/compiler/std/math.untouched.wat | 4919 +++++++------ tests/compiler/std/mod.optimized.wat | 272 +- tests/compiler/std/mod.untouched.wat | 274 +- tests/compiler/std/new.optimized.wat | 87 +- tests/compiler/std/new.untouched.wat | 243 +- .../std/operator-overloading.optimized.wat | 212 +- .../std/operator-overloading.untouched.wat | 386 +- tests/compiler/std/pointer.optimized.wat | 346 +- tests/compiler/std/pointer.untouched.wat | 931 ++- tests/compiler/std/polyfills.optimized.wat | 2 +- tests/compiler/std/polyfills.untouched.wat | 213 +- tests/compiler/std/static-array.optimized.wat | 1865 +---- tests/compiler/std/static-array.untouched.wat | 2508 +------ tests/compiler/std/string-utf8.optimized.wat | 645 +- tests/compiler/std/string-utf8.untouched.wat | 988 +-- tests/compiler/std/symbol.optimized.wat | 157 +- tests/compiler/std/symbol.untouched.wat | 419 +- 53 files changed, 13247 insertions(+), 15808 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index 6425d62739..b70a19ee66 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -80,7 +80,8 @@ import { import { FlowFlags, - Flow + Flow, + LocalFlags } from "./flow"; import { @@ -2174,13 +2175,14 @@ export class Compiler extends DiagnosticEmitter { } if (initExpr) { initializers.push( - this.compileAssignmentWithValue(declaration.name, initExpr) + this.module.createSetLocal(local.index, initExpr) ); if (local.type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) { - flow.setLocalWrapped(local.index, !flow.canOverflow(initExpr, type)); + if (!flow.canOverflow(initExpr, type)) flow.setLocalFlag(local.index, LocalFlags.WRAPPED); + else flow.unsetLocalFlag(local.index, LocalFlags.WRAPPED); } } else if (local.type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) { - flow.setLocalWrapped(local.index, true); // zero + flow.setLocalFlag(local.index, LocalFlags.WRAPPED); } } } @@ -4778,12 +4780,14 @@ export class Compiler extends DiagnosticEmitter { ); return module.createUnreachable(); } + let localIndex = (target).index; if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) { - flow.setLocalWrapped((target).index, !flow.canOverflow(valueWithCorrectType, type)); + if (!flow.canOverflow(valueWithCorrectType, type)) flow.setLocalFlag(localIndex, LocalFlags.WRAPPED); + else flow.unsetLocalFlag(localIndex, LocalFlags.WRAPPED); } return tee - ? module.createTeeLocal((target).index, valueWithCorrectType) - : module.createSetLocal((target).index, valueWithCorrectType); + ? module.createTeeLocal(localIndex, valueWithCorrectType) + : module.createSetLocal(localIndex, valueWithCorrectType); } case ElementKind.GLOBAL: { if (!this.compileGlobal(target)) return module.createUnreachable(); diff --git a/src/flow.ts b/src/flow.ts index 51b16a9edf..928c2e9280 100644 --- a/src/flow.ts +++ b/src/flow.ts @@ -62,11 +62,6 @@ import { Node } from "./ast"; -import { - bitsetIs, - bitsetSet -} from "./util"; - /** Control flow flags indicating specific conditions. */ export const enum FlowFlags { /** No specific conditions. */ @@ -134,6 +129,37 @@ export const enum FlowFlags { | FlowFlags.CONDITIONALLY_ALLOCATES } +/** Flags indicating the current state of a local. */ +export enum LocalFlags { + /** No specific conditions. */ + NONE = 0, + + /** Local is properly wrapped. Relevant for small integers. */ + WRAPPED = 1 << 0, + /** Local is possibly null. */ + MAYBENULL = 1 << 1, + /** Local is read from. */ + READFROM = 1 << 2, + /** Local is written to. */ + WRITTENTO = 1 << 3, + + /** Local is conditionally read from. */ + CONDITIONALLY_READFROM = 1 << 4, + /** Local is conditionally written to. */ + CONDITIONALLY_WRITTENTO = 1 << 5, + + /** Any categorical flag. */ + ANY_CATEGORICAL = WRAPPED | MAYBENULL | READFROM | WRITTENTO, + /** Any conditional flag. */ + ANY_CONDITIONAL = CONDITIONALLY_READFROM | CONDITIONALLY_WRITTENTO +} +export namespace LocalFlags { + export function join(left: LocalFlags, right: LocalFlags): LocalFlags { + return ((left & LocalFlags.ANY_CATEGORICAL) & (right & LocalFlags.ANY_CATEGORICAL)) + | (left & LocalFlags.ANY_CONDITIONAL) | (right & LocalFlags.ANY_CONDITIONAL); + } +} + /** A control flow evaluator. */ export class Flow { @@ -153,10 +179,8 @@ export class Flow { contextualTypeArguments: Map | null; /** Scoped local variables. */ scopedLocals: Map | null = null; - /** Local variable wrap states for the first 64 locals. */ - wrappedLocals: I64; - /** Local variable wrap states for locals with index >= 64. */ - wrappedLocalsExt: I64[] | null; + /** Local flags. */ + localFlags: LocalFlags[]; /** Function being inlined, when inlining. */ inlineFunction: Function | null; /** The label we break to when encountering a return statement, when inlining. */ @@ -172,8 +196,7 @@ export class Flow { flow.breakLabel = null; flow.returnType = parentFunction.signature.returnType; flow.contextualTypeArguments = parentFunction.contextualTypeArguments; - flow.wrappedLocals = i64_new(0); - flow.wrappedLocalsExt = null; + flow.localFlags = []; flow.inlineFunction = null; flow.inlineReturnLabel = null; return flow; @@ -216,8 +239,7 @@ export class Flow { branch.breakLabel = this.breakLabel; branch.returnType = this.returnType; branch.contextualTypeArguments = this.contextualTypeArguments; - branch.wrappedLocals = this.wrappedLocals; - branch.wrappedLocalsExt = this.wrappedLocalsExt ? this.wrappedLocalsExt.slice() : null; + branch.localFlags = this.localFlags.slice(); branch.inlineFunction = this.inlineFunction; branch.inlineReturnLabel = this.inlineReturnLabel; return branch; @@ -243,7 +265,10 @@ export class Flow { } else { local = parentFunction.addLocal(type); } - if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) this.setLocalWrapped(local.index, wrapped); + if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) { + if (wrapped) this.setLocalFlag(local.index, LocalFlags.WRAPPED); + else this.unsetLocalFlag(local.index, LocalFlags.WRAPPED); + } return local; } @@ -316,7 +341,10 @@ export class Flow { local = parentFunction.addLocal(type); temps.push(local); } - if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) this.setLocalWrapped(local.index, wrapped); + if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) { + if (wrapped) this.setLocalFlag(local.index, LocalFlags.WRAPPED); + else this.unsetLocalFlag(local.index, LocalFlags.WRAPPED); + } return local; } @@ -339,7 +367,8 @@ export class Flow { scopedLocal.set(CommonFlags.SCOPED); this.scopedLocals.set(name, scopedLocal); if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) { - this.setLocalWrapped(scopedLocal.index, wrapped); + if (wrapped) this.setLocalFlag(scopedLocal.index, LocalFlags.WRAPPED); + else this.unsetLocalFlag(scopedLocal.index, LocalFlags.WRAPPED); } return scopedLocal; } @@ -399,32 +428,27 @@ export class Flow { return this.actualFunction.lookup(name); } - /** Tests if the value of the local at the specified index is considered wrapped. */ - isLocalWrapped(index: i32): bool { - if (index < 0) return true; // inlined constant - if (index < 64) return bitsetIs(this.wrappedLocals, index); - var ext = this.wrappedLocalsExt; - var i = ((index - 64) / 64) | 0; - if (!(ext && i < ext.length)) return false; - return bitsetIs(ext[i], index - (i + 1) * 64); + /** Tests if the local at the specified index has the specified flag. */ + isLocalFlag(index: i32, flag: LocalFlags, defaultIfInlined: bool = true): bool { + if (index < 0) return defaultIfInlined; + var localFlags = this.localFlags; + return index < localFlags.length && (unchecked(this.localFlags[index]) & flag) != 0; } - /** Sets if the value of the local at the specified index is considered wrapped. */ - setLocalWrapped(index: i32, wrapped: bool): void { - if (index < 0) return; // inlined constant - if (index < 64) { - this.wrappedLocals = bitsetSet(this.wrappedLocals, index, wrapped); - return; - } - var ext = this.wrappedLocalsExt; - var i = ((index - 64) / 64) | 0; - if (!ext) { - this.wrappedLocalsExt = ext = new Array(i + 1); - for (let j = 0; j <= i; ++j) ext[j] = i64_new(0); - } else { - while (ext.length <= i) ext.push(i64_new(0)); - } - ext[i] = bitsetSet(ext[i], index - (i + 1) * 64, wrapped); + /** Sets the specified flag on the local at the specified index. */ + setLocalFlag(index: i32, flag: LocalFlags): void { + if (index < 0) return; + var localFlags = this.localFlags; + var flags = index < localFlags.length ? unchecked(localFlags[index]) : 0; + this.localFlags[index] = flags | flag; + } + + /** Unsets the specified flag on the local at the specified index. */ + unsetLocalFlag(index: i32, flag: LocalFlags): void { + if (index < 0) return; + var localFlags = this.localFlags; + var flags = index < localFlags.length ? unchecked(localFlags[index]) : 0; + this.localFlags[index] = flags & ~flag; } /** Pushes a new break label to the stack, for example when entering a loop that one can `break` from. */ @@ -454,8 +478,7 @@ export class Flow { /** Inherits flags and local wrap states from the specified flow (e.g. blocks). */ inherit(other: Flow): void { this.flags |= other.flags & (FlowFlags.ANY_CATEGORICAL | FlowFlags.ANY_CONDITIONAL); - this.wrappedLocals = other.wrappedLocals; - this.wrappedLocalsExt = other.wrappedLocalsExt; // no need to slice because other flow is finished + this.localFlags = other.localFlags; // no need to slice because other flow is finished } /** Inherits categorical flags as conditional flags from the specified flow (e.g. then without else). */ @@ -486,24 +509,27 @@ export class Flow { this.flags |= left.flags & FlowFlags.ANY_CONDITIONAL; this.flags |= right.flags & FlowFlags.ANY_CONDITIONAL; - // locals wrapped in both arms - this.wrappedLocals = i64_and(left.wrappedLocals, right.wrappedLocals); - var leftExt = left.wrappedLocalsExt; - var rightExt = right.wrappedLocalsExt; - if (leftExt != null && rightExt != null) { - let thisExt = this.wrappedLocalsExt; - let minLength = min(leftExt.length, rightExt.length); - if (minLength) { - if (!thisExt) thisExt = new Array(minLength); - else while (thisExt.length < minLength) thisExt.push(i64_new(0)); - for (let i = 0; i < minLength; ++i) { - thisExt[i] = i64_and( - leftExt[i], - rightExt[i] - ); - } - } + // categorical local flags set in both arms / conditional local flags set in at least one arm + var leftLocalFlags = left.localFlags; + var numLeftLocalFlags = leftLocalFlags.length; + var rightLocalFlags = right.localFlags; + var numRightLocalFlags = rightLocalFlags.length; + var combinedFlags = new Array(max(numLeftLocalFlags, numRightLocalFlags)); + for (let i = 0; i < numLeftLocalFlags; ++i) { + combinedFlags[i] = LocalFlags.join( + unchecked(leftLocalFlags[i]), + i < numRightLocalFlags + ? unchecked(rightLocalFlags[i]) + : 0 + ); + } + for (let i = numLeftLocalFlags; i < numRightLocalFlags; ++i) { + combinedFlags[i] = LocalFlags.join( + 0, + unchecked(rightLocalFlags[i]) + ); } + this.localFlags = combinedFlags; } /** @@ -525,7 +551,7 @@ export class Flow { // overflows if the local isn't wrapped or the conversion does case ExpressionId.GetLocal: { let local = this.parentFunction.localsByIndex[getGetLocalIndex(expr)]; - return !this.isLocalWrapped(local.index) + return !this.isLocalFlag(local.index, LocalFlags.WRAPPED, true) || canConversionOverflow(local.type, type); } diff --git a/std/assembly/util/hash.ts b/std/assembly/util/hash.ts index d8d131d278..2d58d92909 100644 --- a/std/assembly/util/hash.ts +++ b/std/assembly/util/hash.ts @@ -1,7 +1,7 @@ // @ts-ignore: decorator @inline export function HASH(key: T): u32 { - if (isString(key)) { + if (isString()) { return hashStr(changetype(key)); } else if (isReference()) { if (sizeof() == 4) return hash32(changetype(key)); @@ -65,8 +65,10 @@ function hash64(key: u64): u32 { function hashStr(key: string): u32 { var v = FNV_OFFSET; - for (let i: usize = 0, k: usize = key.length << 1; i < k; ++i) { - v = (v ^ load(changetype(key) + i)) * FNV_PRIME; + if (key !== null) { + for (let i: usize = 0, k: usize = key.length << 1; i < k; ++i) { + v = (v ^ load(changetype(key) + i)) * FNV_PRIME; + } } return v; } diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 62f482b32a..11d347cd6f 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -1,11 +1,14 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1a\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s") + (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 48) "\02\00\00\00\1a\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -75,7 +78,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/ALLOCATE (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -96,12 +99,51 @@ i32.const 8 i32.add ) - (func $call-super/A#constructor (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/assertUnregistered (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 84 + i32.le_u + if + i32.const 0 + i32.const 16 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 8 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 16 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + i32.const 8 + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $call-super/A#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate + i32.const 1 + call $~lib/runtime/doRegister local.set $0 end local.get $0 @@ -113,7 +155,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 56 i32.const 8 i32.const 4 call $~lib/env/abort @@ -121,10 +163,12 @@ end local.get $0 ) - (func $call-super/B#constructor (; 4 ;) (type $FUNCSIG$i) (result i32) + (func $call-super/B#constructor (; 6 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate + i32.const 3 + call $~lib/runtime/doRegister call $call-super/A#constructor local.tee $0 i32.const 2 @@ -135,7 +179,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 56 i32.const 17 i32.const 4 call $~lib/env/abort @@ -147,7 +191,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 56 i32.const 18 i32.const 4 call $~lib/env/abort @@ -155,7 +199,7 @@ end local.get $0 ) - (func $call-super/test1 (; 5 ;) (type $FUNCSIG$v) + (func $call-super/test1 (; 7 ;) (type $FUNCSIG$v) (local $0 i32) call $call-super/B#constructor local.tee $0 @@ -164,7 +208,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 56 i32.const 24 i32.const 2 call $~lib/env/abort @@ -176,32 +220,32 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 56 i32.const 25 i32.const 2 call $~lib/env/abort unreachable end ) - (func $call-super/C#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 + (func $call-super/D#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 8 + call $~lib/runtime/doAllocate + i32.const 5 + call $~lib/runtime/doRegister + local.tee $0 i32.eqz if i32.const 4 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate + i32.const 4 + call $~lib/runtime/doRegister local.set $0 end local.get $0 i32.const 1 i32.store local.get $0 - ) - (func $call-super/D#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - i32.const 8 - call $~lib/runtime/ALLOCATE - call $call-super/C#constructor - local.tee $0 i32.const 2 i32.store offset=4 local.get $0 @@ -210,7 +254,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 56 i32.const 40 i32.const 4 call $~lib/env/abort @@ -222,7 +266,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 56 i32.const 41 i32.const 4 call $~lib/env/abort @@ -230,7 +274,7 @@ end local.get $0 ) - (func $call-super/test2 (; 8 ;) (type $FUNCSIG$v) + (func $call-super/test2 (; 9 ;) (type $FUNCSIG$v) (local $0 i32) call $call-super/D#constructor local.tee $0 @@ -239,7 +283,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 56 i32.const 47 i32.const 2 call $~lib/env/abort @@ -251,19 +295,21 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 56 i32.const 48 i32.const 2 call $~lib/env/abort unreachable end ) - (func $call-super/E#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/E#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate + i32.const 6 + call $~lib/runtime/doRegister local.set $0 end local.get $0 @@ -275,7 +321,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 56 i32.const 58 i32.const 4 call $~lib/env/abort @@ -283,10 +329,12 @@ end local.get $0 ) - (func $call-super/test3 (; 10 ;) (type $FUNCSIG$v) + (func $call-super/test3 (; 11 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 8 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate + i32.const 7 + call $~lib/runtime/doRegister call $call-super/E#constructor local.tee $0 i32.const 2 @@ -297,7 +345,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 56 i32.const 68 i32.const 2 call $~lib/env/abort @@ -309,33 +357,50 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 56 i32.const 69 i32.const 2 call $~lib/env/abort unreachable end ) - (func $call-super/H#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) + (func $call-super/H#constructor (; 12 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/runtime/ALLOCATE - call $call-super/C#constructor + call $~lib/runtime/doAllocate + i32.const 9 + call $~lib/runtime/doRegister local.tee $0 + i32.eqz + if + i32.const 4 + call $~lib/runtime/doAllocate + i32.const 8 + call $~lib/runtime/doRegister + local.set $0 + end + local.get $0 + i32.const 1 + i32.store + local.get $0 i32.const 2 i32.store offset=4 local.get $0 ) - (func $call-super/test4 (; 12 ;) (type $FUNCSIG$v) + (func $call-super/test4 (; 13 ;) (type $FUNCSIG$v) (local $0 i32) - call $call-super/H#constructor + block (result i32) + block (result i32) + call $call-super/H#constructor + end + end local.tee $0 i32.load i32.const 1 i32.ne if i32.const 0 - i32.const 16 + i32.const 56 i32.const 86 i32.const 2 call $~lib/env/abort @@ -347,23 +412,50 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 56 i32.const 87 i32.const 2 call $~lib/env/abort unreachable end ) - (func $call-super/test5 (; 13 ;) (type $FUNCSIG$v) + (func $call-super/J#constructor (; 14 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) - call $call-super/H#constructor + i32.const 8 + call $~lib/runtime/doAllocate + i32.const 11 + call $~lib/runtime/doRegister + local.tee $0 + i32.eqz + if + i32.const 4 + call $~lib/runtime/doAllocate + i32.const 10 + call $~lib/runtime/doRegister + local.set $0 + end + local.get $0 + i32.const 1 + i32.store + local.get $0 + i32.const 2 + i32.store offset=4 + local.get $0 + ) + (func $call-super/test5 (; 15 ;) (type $FUNCSIG$v) + (local $0 i32) + block (result i32) + block (result i32) + call $call-super/J#constructor + end + end local.tee $0 i32.load i32.const 1 i32.ne if i32.const 0 - i32.const 16 + i32.const 56 i32.const 106 i32.const 2 call $~lib/env/abort @@ -375,15 +467,15 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 56 i32.const 107 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start (; 14 ;) (type $FUNCSIG$v) - i32.const 48 + (func $start (; 16 ;) (type $FUNCSIG$v) + i32.const 88 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -393,7 +485,7 @@ call $call-super/test4 call $call-super/test5 ) - (func $null (; 15 ;) (type $FUNCSIG$v) + (func $null (; 17 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index cbbae6fadb..b52ec1a980 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -1,10 +1,13 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (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\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s\00") + (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 48) "\02\00\00\00\1a\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) @@ -12,11 +15,12 @@ (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 84)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/ADJUST (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -113,10 +117,10 @@ end return ) - (func $~lib/runtime/ALLOCATE (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUST + call $~lib/runtime/ADJUSTOBLOCK call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -129,13 +133,63 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $call-super/A#constructor (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/doAllocate + ) + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $call-super/A#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 4 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 1 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -149,7 +203,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 8 i32.const 4 call $~lib/env/abort @@ -157,13 +211,18 @@ end local.get $0 ) - (func $call-super/B#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/B#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 if (result i32) local.get $0 else i32.const 8 call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 3 + call $~lib/runtime/doRegister end call $call-super/A#constructor local.set $0 @@ -177,7 +236,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 17 i32.const 4 call $~lib/env/abort @@ -190,7 +249,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 18 i32.const 4 call $~lib/env/abort @@ -198,7 +257,7 @@ end local.get $0 ) - (func $call-super/test1 (; 6 ;) (type $FUNCSIG$v) + (func $call-super/test1 (; 9 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/B#constructor @@ -210,7 +269,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 24 i32.const 2 call $~lib/env/abort @@ -223,19 +282,26 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 25 i32.const 2 call $~lib/env/abort unreachable end ) - (func $call-super/C#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/C#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.eqz if - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 4 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 4 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -243,13 +309,18 @@ i32.store local.get $0 ) - (func $call-super/D#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/D#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 if (result i32) local.get $0 else i32.const 8 call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 5 + call $~lib/runtime/doRegister end call $call-super/C#constructor local.set $0 @@ -263,7 +334,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 40 i32.const 4 call $~lib/env/abort @@ -276,7 +347,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 41 i32.const 4 call $~lib/env/abort @@ -284,7 +355,7 @@ end local.get $0 ) - (func $call-super/test2 (; 9 ;) (type $FUNCSIG$v) + (func $call-super/test2 (; 12 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/D#constructor @@ -296,7 +367,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 47 i32.const 2 call $~lib/env/abort @@ -309,20 +380,27 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 48 i32.const 2 call $~lib/env/abort unreachable end ) - (func $call-super/E#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/E#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 4 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 6 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -336,7 +414,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 58 i32.const 4 call $~lib/env/abort @@ -344,12 +422,19 @@ end local.get $0 ) - (func $call-super/F#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/F#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.eqz if - i32.const 8 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 8 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 7 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -360,7 +445,7 @@ i32.store offset=4 local.get $0 ) - (func $call-super/test3 (; 12 ;) (type $FUNCSIG$v) + (func $call-super/test3 (; 15 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/F#constructor @@ -372,7 +457,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 68 i32.const 2 call $~lib/env/abort @@ -385,19 +470,26 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 69 i32.const 2 call $~lib/env/abort unreachable end ) - (func $call-super/G#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/G#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.eqz if - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 4 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 8 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -405,12 +497,19 @@ i32.store local.get $0 ) - (func $call-super/H#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/H#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.eqz if - i32.const 8 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 8 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 9 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -421,7 +520,7 @@ i32.store offset=4 local.get $0 ) - (func $call-super/test4 (; 15 ;) (type $FUNCSIG$v) + (func $call-super/test4 (; 18 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/H#constructor @@ -433,7 +532,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 86 i32.const 2 call $~lib/env/abort @@ -446,19 +545,26 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 87 i32.const 2 call $~lib/env/abort unreachable end ) - (func $call-super/I#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/I#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.eqz if - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 4 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 10 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -466,12 +572,19 @@ i32.store local.get $0 ) - (func $call-super/J#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/J#constructor (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.eqz if - i32.const 8 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 8 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 11 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -482,7 +595,7 @@ i32.store offset=4 local.get $0 ) - (func $call-super/test5 (; 18 ;) (type $FUNCSIG$v) + (func $call-super/test5 (; 21 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/J#constructor @@ -494,7 +607,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 106 i32.const 2 call $~lib/env/abort @@ -507,14 +620,14 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 107 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start:call-super (; 19 ;) (type $FUNCSIG$v) + (func $start:call-super (; 22 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -531,9 +644,9 @@ call $call-super/test4 call $call-super/test5 ) - (func $start (; 20 ;) (type $FUNCSIG$v) + (func $start (; 23 ;) (type $FUNCSIG$v) call $start:call-super ) - (func $null (; 21 ;) (type $FUNCSIG$v) + (func $null (; 24 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index 29c159fcc6..4570c4c7ba 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -1,8 +1,13 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (memory $0 0) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\02\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) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -21,7 +26,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/memory/memory.allocate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -83,7 +88,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/ALLOCATE (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -104,43 +109,117 @@ i32.const 8 i32.add ) - (func $constructor/EmptyCtorWithFieldInit#constructor (; 2 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - i32.const 4 - call $~lib/runtime/ALLOCATE - local.tee $0 - i32.const 1 - i32.store + (func $~lib/runtime/assertUnregistered (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 48 + i32.le_u + if + i32.const 0 + i32.const 16 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end local.get $0 + i32.const 8 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 16 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end ) - (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 3 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - i32.const 4 - call $~lib/runtime/ALLOCATE - local.tee $0 - i32.const 0 + (func $~lib/runtime/doRegister (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + i32.const 8 + i32.sub + local.get $1 i32.store local.get $0 ) - (func $start:constructor (; 4 ;) (type $FUNCSIG$v) + (func $constructor/CtorConditionallyAllocates#constructor (; 5 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) - i32.const 8 + block (result i32) + global.get $constructor/b + if + i32.const 0 + call $~lib/runtime/doAllocate + i32.const 10 + call $~lib/runtime/doRegister + local.set $0 + end + local.get $0 + i32.eqz + end + if (result i32) + i32.const 0 + call $~lib/runtime/doAllocate + i32.const 10 + call $~lib/runtime/doRegister + else + local.get $0 + end + ) + (func $start:constructor (; 6 ;) (type $FUNCSIG$v) + (local $0 i32) + i32.const 48 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 0 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate + i32.const 1 + call $~lib/runtime/doRegister global.set $constructor/emptyCtor - call $constructor/EmptyCtorWithFieldInit#constructor + i32.const 4 + call $~lib/runtime/doAllocate + i32.const 3 + call $~lib/runtime/doRegister + local.tee $0 + i32.const 1 + i32.store + local.get $0 global.set $constructor/emptyCtorWithFieldInit - call $constructor/EmptyCtorWithFieldNoInit#constructor + i32.const 4 + call $~lib/runtime/doAllocate + i32.const 4 + call $~lib/runtime/doRegister + local.tee $0 + i32.const 0 + i32.store + local.get $0 global.set $constructor/emptyCtorWithFieldNoInit i32.const 0 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate + i32.const 5 + call $~lib/runtime/doRegister global.set $constructor/none - call $constructor/EmptyCtorWithFieldInit#constructor + i32.const 4 + call $~lib/runtime/doAllocate + i32.const 6 + call $~lib/runtime/doRegister + local.tee $0 + i32.const 1 + i32.store + local.get $0 global.set $constructor/justFieldInit - call $constructor/EmptyCtorWithFieldNoInit#constructor + i32.const 4 + call $~lib/runtime/doAllocate + i32.const 7 + call $~lib/runtime/doRegister + local.tee $0 + i32.const 0 + i32.store + local.get $0 global.set $constructor/justFieldNoInit i32.const 0 call $~lib/memory/memory.allocate @@ -153,34 +232,23 @@ br $__inlined_func$constructor/CtorConditionallyReturns#constructor end i32.const 0 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate + i32.const 8 + call $~lib/runtime/doRegister end global.set $constructor/ctorConditionallyReturns i32.const 0 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate + i32.const 9 + call $~lib/runtime/doRegister global.set $constructor/ctorAllocates - block (result i32) - global.get $constructor/b - if - i32.const 0 - call $~lib/runtime/ALLOCATE - local.set $0 - end - local.get $0 - i32.eqz - end - if (result i32) - i32.const 0 - call $~lib/runtime/ALLOCATE - else - local.get $0 - end + call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates ) - (func $start (; 5 ;) (type $FUNCSIG$v) + (func $start (; 7 ;) (type $FUNCSIG$v) call $start:constructor ) - (func $null (; 6 ;) (type $FUNCSIG$v) + (func $null (; 8 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index ad1e648b5e..e05c77d4d5 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -1,7 +1,12 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (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) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) @@ -9,6 +14,7 @@ (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $constructor/emptyCtor (mut i32) (i32.const 0)) (global $constructor/emptyCtorWithFieldInit (mut i32) (i32.const 0)) (global $constructor/emptyCtorWithFieldNoInit (mut i32) (i32.const 0)) @@ -20,11 +26,11 @@ (global $constructor/ctorConditionallyReturns (mut i32) (i32.const 0)) (global $constructor/ctorAllocates (mut i32) (i32.const 0)) (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/ADJUST (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -36,7 +42,7 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -121,10 +127,10 @@ end return ) - (func $~lib/runtime/ALLOCATE (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUST + call $~lib/runtime/ADJUSTOBLOCK call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -137,22 +143,79 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $constructor/EmptyCtor#constructor (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + call $~lib/runtime/doAllocate + ) + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u i32.eqz if i32.const 0 - call $~lib/runtime/ALLOCATE + i32.const 16 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $constructor/EmptyCtor#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + if + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 0 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 1 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 ) - (func $constructor/EmptyCtorWithFieldInit#constructor (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtorWithFieldInit#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.eqz if - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 4 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 3 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -160,12 +223,19 @@ i32.store local.get $0 ) - (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.eqz if - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 4 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 4 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -173,22 +243,36 @@ i32.store local.get $0 ) - (func $constructor/None#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/None#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.eqz if - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 0 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 5 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 ) - (func $constructor/JustFieldInit#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/JustFieldInit#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.eqz if - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 4 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 6 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -196,12 +280,19 @@ i32.store local.get $0 ) - (func $constructor/JustFieldNoInit#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/JustFieldNoInit#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.eqz if - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 4 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 7 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -209,11 +300,12 @@ i32.store local.get $0 ) - (func $constructor/CtorReturns#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorReturns#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 call $~lib/memory/memory.allocate ) - (func $constructor/CtorConditionallyReturns#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorConditionallyReturns#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) global.get $constructor/b if i32.const 0 @@ -223,19 +315,32 @@ local.get $0 i32.eqz if - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 0 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 8 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 ) - (func $constructor/CtorAllocates#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorAllocates#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) block (result i32) local.get $0 i32.eqz if - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 0 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 9 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -243,15 +348,22 @@ drop local.get $0 ) - (func $constructor/CtorConditionallyAllocates#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorConditionallyAllocates#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) global.get $constructor/b if block (result i32) local.get $0 i32.eqz if - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 0 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 10 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -261,13 +373,19 @@ local.get $0 i32.eqz if - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.1 (result i32) + i32.const 0 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 10 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 ) - (func $start:constructor (; 13 ;) (type $FUNCSIG$v) + (func $start:constructor (; 17 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -309,9 +427,9 @@ call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates ) - (func $start (; 14 ;) (type $FUNCSIG$v) + (func $start (; 18 ;) (type $FUNCSIG$v) call $start:constructor ) - (func $null (; 15 ;) (type $FUNCSIG$v) + (func $null (; 19 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index 1e718a587c..a183a11e2c 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -2,10 +2,13 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (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) "\02\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) (elem (i32.const 0) $null) (global $exports/Animal.CAT i32 (i32.const 0)) @@ -46,20 +49,20 @@ (export "vehicles.Car.getNumTires" (func $exports/Car.getNumTires)) (export "outer.inner.a" (global $exports/outer.inner.a)) (start $start) - (func $exports/add (; 0 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/add (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $exports/subOpt (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $exports/Car.getNumTires (; 2 ;) (type $FUNCSIG$i) (result i32) + (func $exports/Car.getNumTires (; 3 ;) (type $FUNCSIG$i) (result i32) i32.const 4 ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -121,28 +124,86 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $exports/Car#get:numDoors (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 48 + i32.le_u + if + i32.const 0 + i32.const 16 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 8 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 16 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $exports/Car#constructor (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 16 + call $~lib/memory/memory.allocate + local.tee $0 + i32.const -1520547049 + i32.store + local.get $0 + i32.const 4 + i32.store offset=4 + local.get $0 + i32.const 8 + i32.add + local.tee $0 + call $~lib/runtime/assertUnregistered + local.get $0 + i32.const 8 + i32.sub + i32.const 1 + i32.store + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store + local.get $0 + ) + (func $exports/Car#get:numDoors (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/Car#set:numDoors (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $exports/Car#set:numDoors (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#openDoors (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $exports/Car#openDoors (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $start (; 7 ;) (type $FUNCSIG$v) - i32.const 8 + (func $start (; 10 ;) (type $FUNCSIG$v) + i32.const 48 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 11 ;) (type $FUNCSIG$v) nop ) - (func $exports/subOpt|trampoline (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt|trampoline (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -160,11 +221,11 @@ local.get $1 i32.sub ) - (func $~lib/setargc (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) - (func $exports/Car#constructor|trampoline (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor|trampoline (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -176,28 +237,10 @@ i32.const 2 local.set $1 end - local.get $0 - i32.eqz - if - i32.const 16 - call $~lib/memory/memory.allocate - local.tee $0 - i32.const -1520547049 - i32.store + block (result i32) local.get $0 - i32.const 4 - i32.store offset=4 - local.get $0 - i32.const 8 - i32.add - local.set $0 + local.get $1 + call $exports/Car#constructor end - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $1 - i32.store - local.get $0 ) ) diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 79bd96565c..b1429741e5 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -2,10 +2,13 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (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) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $exports/Animal.CAT i32 (i32.const 0)) @@ -20,7 +23,8 @@ (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (global $~lib/argc (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -50,25 +54,25 @@ (export "vehicles.Car.getNumTires" (func $exports/vehicles.Car.getNumTires)) (export "outer.inner.a" (global $exports/outer.inner.a)) (start $start) - (func $exports/add (; 0 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/add (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $exports/subOpt (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $exports/math.sub (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/math.sub (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $exports/Car.getNumTires (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $exports/Car.getNumTires (; 4 ;) (type $FUNCSIG$i) (result i32) global.get $exports/Car.TIRES ) - (func $~lib/runtime/ADJUST (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -80,7 +84,7 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 5 ;) (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 $2 i32) (local $3 i32) @@ -165,10 +169,10 @@ end return ) - (func $~lib/runtime/ALLOCATE (; 6 ;) (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.get $0 - call $~lib/runtime/ADJUST + call $~lib/runtime/ADJUSTOBLOCK call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -181,13 +185,63 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $exports/Car#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/doAllocate + ) + (func $~lib/runtime/assertUnregistered (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $exports/Car#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) block (result i32) local.get $0 i32.eqz if - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 4 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -199,28 +253,35 @@ i32.store local.get $0 ) - (func $exports/Car#get:numDoors (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $exports/Car#get:numDoors (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/Car#set:numDoors (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $exports/Car#set:numDoors (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#openDoors (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $exports/Car#openDoors (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $exports/vehicles.Car.getNumTires (; 11 ;) (type $FUNCSIG$i) (result i32) + (func $exports/vehicles.Car.getNumTires (; 15 ;) (type $FUNCSIG$i) (result i32) global.get $exports/vehicles.Car.TIRES ) - (func $exports/vehicles.Car#constructor (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/vehicles.Car#constructor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) block (result i32) local.get $0 i32.eqz if - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.1 (result i32) + i32.const 4 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -232,19 +293,19 @@ i32.store local.get $0 ) - (func $exports/vehicles.Car#get:numDoors (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $exports/vehicles.Car#get:numDoors (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/vehicles.Car#set:numDoors (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $exports/vehicles.Car#set:numDoors (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/vehicles.Car#openDoors (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $exports/vehicles.Car#openDoors (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $start (; 16 ;) (type $FUNCSIG$v) + (func $start (; 20 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -256,9 +317,9 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 17 ;) (type $FUNCSIG$v) + (func $null (; 21 ;) (type $FUNCSIG$v) ) - (func $exports/subOpt|trampoline (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt|trampoline (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -276,20 +337,20 @@ local.get $1 call $exports/subOpt ) - (func $~lib/setargc (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) - (func $Car#get:doors (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $Car#get:doors (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $Car#set:doors (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $Car#set:doors (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#constructor|trampoline (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor|trampoline (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -305,16 +366,16 @@ local.get $1 call $exports/Car#constructor ) - (func $vehicles.Car#get:doors (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $vehicles.Car#get:doors (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $vehicles.Car#set:doors (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $vehicles.Car#set:doors (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/vehicles.Car#constructor|trampoline (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/vehicles.Car#constructor|trampoline (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index d8ad0b6e78..54ae787ade 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -1,8 +1,12 @@ (module (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (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) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 2 funcref) (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -12,7 +16,7 @@ (export "table" (table $0)) (export "test" (func $getter-call/test)) (start $start) - (func $~lib/memory/memory.allocate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -74,10 +78,34 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $getter-call/C#get:x~anonymous|0 (; 1 ;) (type $FUNCSIG$i) (result i32) - i32.const 42 + (func $~lib/runtime/assertUnregistered (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 48 + i32.le_u + if + i32.const 0 + i32.const 16 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 8 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 16 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end ) - (func $getter-call/test (; 2 ;) (type $FUNCSIG$i) (result i32) + (func $getter-call/C#constructor (; 3 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 call $~lib/memory/memory.allocate @@ -87,18 +115,38 @@ local.get $0 i32.const 0 i32.store offset=4 + local.get $0 + i32.const 8 + i32.add + local.tee $0 + call $~lib/runtime/assertUnregistered + local.get $0 + i32.const 8 + i32.sub + i32.const 1 + i32.store + local.get $0 + ) + (func $getter-call/C#get:x~anonymous|0 (; 4 ;) (type $FUNCSIG$i) (result i32) + i32.const 42 + ) + (func $getter-call/test (; 5 ;) (type $FUNCSIG$i) (result i32) + block (result i32) + call $getter-call/C#constructor + end + drop i32.const 0 global.set $~lib/argc i32.const 1 call_indirect (type $FUNCSIG$i) ) - (func $start (; 3 ;) (type $FUNCSIG$v) - i32.const 8 + (func $start (; 6 ;) (type $FUNCSIG$v) + i32.const 48 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 4 ;) (type $FUNCSIG$v) + (func $null (; 7 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index 9d91f3f918..08d8f1f6d5 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -1,8 +1,13 @@ (module (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (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) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 2 funcref) (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|0) (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) @@ -10,13 +15,14 @@ (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $getter-call/test)) (start $start) - (func $~lib/runtime/ADJUST (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -28,7 +34,7 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -113,10 +119,10 @@ end return ) - (func $~lib/runtime/ALLOCATE (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUST + call $~lib/runtime/ADJUSTOBLOCK call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -129,23 +135,73 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $getter-call/C#constructor (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + call $~lib/runtime/doAllocate + ) + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u i32.eqz if i32.const 0 - call $~lib/runtime/ALLOCATE + i32.const 16 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $getter-call/C#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + if + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 0 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 1 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 ) - (func $getter-call/C#get:x~anonymous|0 (; 4 ;) (type $FUNCSIG$i) (result i32) + (func $getter-call/C#get:x~anonymous|0 (; 8 ;) (type $FUNCSIG$i) (result i32) i32.const 42 ) - (func $getter-call/C#get:x (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $getter-call/C#get:x (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 ) - (func $getter-call/test (; 6 ;) (type $FUNCSIG$i) (result i32) + (func $getter-call/test (; 10 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 0 call $getter-call/C#constructor @@ -156,7 +212,7 @@ call $getter-call/C#get:x call_indirect (type $FUNCSIG$i) ) - (func $start (; 7 ;) (type $FUNCSIG$v) + (func $start (; 11 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -168,6 +224,6 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 12 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index 5272d28c02..cf913b0cca 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -3,9 +3,12 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\16\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s") + (data (i32.const 40) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 2 funcref) (elem (i32.const 0) $null $inlining/func_fe~anonymous|0) (global $~lib/argc (mut i32) (i32.const 0)) @@ -100,7 +103,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/ALLOCATE (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -121,15 +124,56 @@ i32.const 8 i32.add ) - (func $inlining/test_ctor (; 6 ;) (type $FUNCSIG$v) + (func $~lib/runtime/assertUnregistered (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 80 + i32.le_u + if + i32.const 0 + i32.const 48 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 8 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 48 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + i32.const 8 + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $inlining/test_ctor (; 8 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 16 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate + i32.const 2 + call $~lib/runtime/doRegister local.tee $0 i32.eqz if i32.const 8 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate + i32.const 3 + call $~lib/runtime/doRegister local.set $0 end local.get $0 @@ -199,15 +243,15 @@ unreachable end ) - (func $start (; 7 ;) (type $FUNCSIG$v) + (func $start (; 9 ;) (type $FUNCSIG$v) call $inlining/test_funcs - i32.const 40 + i32.const 80 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset call $inlining/test_ctor ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 10 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 933dbae65f..91ac40c28e 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -3,9 +3,12 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\16\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 40) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 2 funcref) (elem (i32.const 0) $null $inlining/func_fe~anonymous|0) (global $inlining/constantGlobal i32 (i32.const 1)) @@ -15,7 +18,8 @@ (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 80)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $inlining/test)) @@ -282,7 +286,7 @@ unreachable end ) - (func $~lib/runtime/ADJUST (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -379,10 +383,10 @@ end return ) - (func $~lib/runtime/ALLOCATE (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUST + call $~lib/runtime/ADJUSTOBLOCK call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -395,12 +399,56 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $inlining/test_ctor (; 7 ;) (type $FUNCSIG$v) + (func $~lib/runtime/ALLOCATE (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/doAllocate + ) + (func $~lib/runtime/assertUnregistered (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 48 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 48 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $inlining/test_ctor (; 10 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) block $inlining/Bar#constructor|inlined.0 (result i32) i32.const 0 local.set $0 @@ -413,6 +461,10 @@ else i32.const 16 call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 2 + call $~lib/runtime/doRegister end local.set $2 i32.const 2 @@ -421,8 +473,14 @@ local.get $2 i32.eqz if - i32.const 8 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 8 + call $~lib/runtime/ALLOCATE + local.set $4 + local.get $4 + i32.const 3 + call $~lib/runtime/doRegister + end local.set $2 end local.get $2 @@ -449,8 +507,8 @@ i32.store offset=12 local.get $0 end - local.set $4 - local.get $4 + local.set $5 + local.get $5 i32.load i32.const 1 i32.eq @@ -463,7 +521,7 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $5 i32.load offset=4 i32.const 2 i32.eq @@ -476,7 +534,7 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $5 i32.load offset=8 i32.const 3 i32.eq @@ -489,7 +547,7 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $5 i32.load offset=12 i32.const 4 i32.eq @@ -503,7 +561,7 @@ unreachable end ) - (func $start:inlining (; 8 ;) (type $FUNCSIG$v) + (func $start:inlining (; 11 ;) (type $FUNCSIG$v) call $inlining/test i32.const 3 i32.eq @@ -529,9 +587,9 @@ global.set $~lib/allocator/arena/offset call $inlining/test_ctor ) - (func $start (; 9 ;) (type $FUNCSIG$v) + (func $start (; 12 ;) (type $FUNCSIG$v) call $start:inlining ) - (func $null (; 10 ;) (type $FUNCSIG$v) + (func $null (; 13 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/new-without-allocator.optimized.wat b/tests/compiler/new-without-allocator.optimized.wat index ee41ed9fc1..c5a555fc36 100644 --- a/tests/compiler/new-without-allocator.optimized.wat +++ b/tests/compiler/new-without-allocator.optimized.wat @@ -1,7 +1,8 @@ (module (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$v (func)) - (memory $0 0) + (memory $0 1) + (data (i32.const 8) "\02\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) (elem (i32.const 0) $null) (export "memory" (memory $0)) diff --git a/tests/compiler/new-without-allocator.untouched.wat b/tests/compiler/new-without-allocator.untouched.wat index 4a524c05b2..5456e7f95d 100644 --- a/tests/compiler/new-without-allocator.untouched.wat +++ b/tests/compiler/new-without-allocator.untouched.wat @@ -1,18 +1,24 @@ (module (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (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) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $new-without-allocator/test)) - (func $~lib/runtime/ADJUST (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -24,13 +30,13 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) unreachable ) - (func $~lib/runtime/ALLOCATE (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUST + call $~lib/runtime/ADJUSTOBLOCK call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -43,23 +49,73 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $new-without-allocator/A#constructor (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + call $~lib/runtime/doAllocate + ) + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq i32.eqz if i32.const 0 - call $~lib/runtime/ALLOCATE + i32.const 16 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $new-without-allocator/A#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + if + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 0 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 1 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 ) - (func $new-without-allocator/test (; 4 ;) (type $FUNCSIG$i) (result i32) + (func $new-without-allocator/test (; 8 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 0 call $new-without-allocator/A#constructor local.set $0 i32.const 3 ) - (func $null (; 5 ;) (type $FUNCSIG$v) + (func $null (; 9 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 57b93c611b..1df7f3c7a9 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -1,53 +1,54 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$iijijij (func (param i32 i64 i32 i64 i32 i64) (result i32))) - (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\000") - (data (i32.const 16) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 72) "\90\01\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 584) "H\00\00\00d") - (data (i32.const 592) "\01\00\00\001") - (data (i32.const 600) "\t\00\00\00n\00u\00m\00b\00e\00r\00.\00t\00s") - (data (i32.const 624) "\03\00\00\000\00.\000") - (data (i32.const 640) "\03\00\00\00N\00a\00N") - (data (i32.const 656) "\t\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 680) "\08\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 704) "\b8\02\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8|inlined.0 (result i64) - local.get $3 - local.set $8 - local.get $6 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i64.load32_u offset=8 - end - local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i64) - local.get $3 - local.set $10 - local.get $7 - local.set $9 - i32.const 0 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i64.load32_u offset=8 - end - local.set $12 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $8 + local.get $3 + local.get $7 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $9 local.get $2 i32.const 4 i32.sub @@ -345,12 +307,12 @@ i32.const 1 i32.shl i32.add - local.get $11 - local.get $12 + local.get $8 + local.get $9 i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store end br $continue|0 end @@ -374,30 +336,20 @@ i32.const 2 i32.sub local.set $2 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $3 - local.set $5 - local.get $6 - local.set $4 - i32.const 0 - local.set $8 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $8 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $8 - i32.store offset=4 + local.get $5 + i32.store end local.get $1 i32.const 10 @@ -407,30 +359,20 @@ i32.const 2 i32.sub local.set $2 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $3 - local.set $8 - local.get $1 - local.set $6 - i32.const 0 - local.set $7 - local.get $8 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $7 - i32.store offset=4 + local.get $5 + i32.store else local.get $2 i32.const 1 @@ -439,17 +381,56 @@ i32.const 48 local.get $1 i32.add - local.set $7 + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $7 - i32.store16 offset=4 + local.get $5 + i32.store16 + end + ) + (func $~lib/runtime/assertUnregistered (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 464 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 464 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable end ) - (func $~lib/internal/number/itoa32 (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doRegister (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/util/number/itoa32 (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -459,7 +440,7 @@ local.get $0 i32.eqz if - i32.const 8 + i32.const 16 return end local.get $0 @@ -474,43 +455,63 @@ local.set $0 end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.set $2 - local.get $2 - call $~lib/internal/string/allocateUnsafe - local.set $3 - block $~lib/internal/number/utoa32_core|inlined.0 + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + local.get $2 + i32.const 1 + i32.shl + local.set $3 local.get $3 - local.set $4 + call $~lib/runtime/doAllocate + end + local.set $4 + block $~lib/util/number/utoa32_core|inlined.0 + local.get $4 + local.set $3 local.get $0 local.set $5 local.get $2 local.set $6 - local.get $4 + local.get $3 local.get $5 local.get $6 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $1 if - local.get $3 + local.get $4 i32.const 45 - i32.store16 offset=4 + i32.store16 + end + block $~lib/runtime/REGISTER|inlined.0 (result i32) + local.get $4 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister end - local.get $3 ) - (func $~lib/internal/number/itoa (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 return ) - (func $~lib/number/I32#toString (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/number/I32#toString (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/util/number/itoa + ) + (func $~lib/string/String#get:length (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/internal/number/itoa + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u ) - (func $~lib/internal/string/compareUnsafe (; 9 ;) (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 (; 12 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -533,9 +534,9 @@ local.get $4 if (result i32) local.get $6 - i32.load16_u offset=4 + i32.load16_u local.get $7 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $5 i32.eqz @@ -563,7 +564,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.eq (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -589,11 +590,11 @@ return end local.get $0 - i32.load + call $~lib/string/String#get:length local.set $3 local.get $3 local.get $1 - i32.load + call $~lib/string/String#get:length i32.ne if i32.const 0 @@ -604,22 +605,22 @@ local.get $1 i32.const 0 local.get $3 - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/builtins/isFinite (; 11 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 14 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 12 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 15 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/internal/number/genDigits (; 13 ;) (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 (; 16 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -636,11 +637,11 @@ (local $20 i32) (local $21 i64) (local $22 i64) - (local $23 i32) - (local $24 i32) + (local $23 i64) + (local $24 i64) (local $25 i32) - (local $26 i64) - (local $27 i64) + (local $26 i32) + (local $27 i32) i32.const 0 local.get $4 i32.sub @@ -671,12 +672,12 @@ i64.and local.set $13 local.get $12 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $14 local.get $6 local.set $15 - i32.const 2064 - i32.load + i32.const 1624 + i32.load offset=4 local.set $16 block $break|0 loop $continue|0 @@ -906,7 +907,7 @@ i32.const 65535 i32.and i32.add - i32.store16 offset=4 + i32.store16 end local.get $14 i32.const 1 @@ -924,11 +925,11 @@ local.get $5 i64.le_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $14 i32.add - global.set $~lib/internal/number/_K - block $~lib/internal/number/grisuRound|inlined.0 + global.set $~lib/util/number/_K + block $~lib/util/number/grisuRound|inlined.0 local.get $0 local.set $18 local.get $15 @@ -937,28 +938,18 @@ local.set $21 local.get $19 local.set $22 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i64) - local.get $16 - local.set $23 - local.get $14 - local.set $24 - i32.const 0 - local.set $25 - local.get $23 - local.get $24 - i32.const 2 - i32.shl - i32.add - local.get $25 - i32.add - i64.load32_u offset=8 - end + local.get $16 + local.get $14 + i32.const 2 + i32.shl + i32.add + i64.load32_u local.get $7 i64.extend_i32_s i64.shl - local.set $26 + local.set $23 local.get $10 - local.set $27 + local.set $24 local.get $18 local.get $20 i32.const 1 @@ -968,55 +959,55 @@ i32.add local.set $25 local.get $25 - i32.load16_u offset=4 - local.set $24 + i32.load16_u + local.set $26 block $break|2 loop $continue|2 local.get $22 - local.get $27 + local.get $24 i64.lt_u - local.tee $23 + local.tee $27 if (result i32) local.get $21 local.get $22 i64.sub - local.get $26 + local.get $23 i64.ge_u else - local.get $23 + local.get $27 end - local.tee $23 + local.tee $27 if (result i32) local.get $22 - local.get $26 + local.get $23 i64.add - local.get $27 + local.get $24 i64.lt_u - local.tee $23 + local.tee $27 if (result i32) - local.get $23 - else local.get $27 + else + local.get $24 local.get $22 i64.sub local.get $22 - local.get $26 + local.get $23 i64.add - local.get $27 + local.get $24 i64.sub i64.gt_u end else - local.get $23 + local.get $27 end if block - local.get $24 + local.get $26 i32.const 1 i32.sub - local.set $24 + local.set $26 local.get $22 - local.get $26 + local.get $23 i64.add local.set $22 end @@ -1025,8 +1016,8 @@ end end local.get $25 - local.get $24 - i32.store16 offset=4 + local.get $26 + i32.store16 end local.get $15 return @@ -1079,7 +1070,7 @@ i32.const 65535 i32.and i32.add - i32.store16 offset=4 + i32.store16 end local.get $13 local.get $9 @@ -1093,64 +1084,54 @@ local.get $5 i64.lt_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $14 i32.add - global.set $~lib/internal/number/_K + global.set $~lib/util/number/_K local.get $10 - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i64) - local.get $16 - local.set $17 - i32.const 0 - local.get $14 - i32.sub - local.set $24 - i32.const 0 - local.set $25 - local.get $17 - local.get $24 - i32.const 2 - i32.shl - i32.add - local.get $25 - i32.add - i64.load32_u offset=8 - end + local.get $16 + i32.const 0 + local.get $14 + i32.sub + i32.const 2 + i32.shl + i32.add + i64.load32_u i64.mul local.set $10 - block $~lib/internal/number/grisuRound|inlined.1 + block $~lib/util/number/grisuRound|inlined.1 local.get $0 - local.set $25 + local.set $17 local.get $15 - local.set $24 + local.set $26 local.get $5 - local.set $27 + local.set $24 local.get $13 - local.set $26 + local.set $23 local.get $8 local.set $22 local.get $10 local.set $21 - local.get $25 - local.get $24 + local.get $17 + local.get $26 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $17 - local.get $17 - i32.load16_u offset=4 + local.set $25 + local.get $25 + i32.load16_u local.set $20 block $break|4 loop $continue|4 - local.get $26 + local.get $23 local.get $21 i64.lt_u local.tee $18 if (result i32) - local.get $27 - local.get $26 + local.get $24 + local.get $23 i64.sub local.get $22 i64.ge_u @@ -1159,7 +1140,7 @@ end local.tee $18 if (result i32) - local.get $26 + local.get $23 local.get $22 i64.add local.get $21 @@ -1169,9 +1150,9 @@ local.get $18 else local.get $21 - local.get $26 + local.get $23 i64.sub - local.get $26 + local.get $23 local.get $22 i64.add local.get $21 @@ -1187,18 +1168,18 @@ i32.const 1 i32.sub local.set $20 - local.get $26 + local.get $23 local.get $22 i64.add - local.set $26 + local.set $23 end br $continue|4 end end end - local.get $17 + local.get $25 local.get $20 - i32.store16 offset=4 + i32.store16 end local.get $15 return @@ -1210,7 +1191,7 @@ end local.get $15 ) - (func $~lib/internal/memory/memcpy (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2411,64 +2392,122 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else + block $~lib/util/memory/memmove|inlined.0 local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $1 local.get $2 i32.add - local.get $1 + local.get $0 i32.le_u - end - if + local.tee $3 + if (result i32) + local.get $3 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end local.get $0 local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq + i32.lt_u if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + end + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 if block - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 block (result i32) local.get $0 local.tee $3 @@ -2487,158 +2526,102 @@ end i32.load8_u i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store local.get $2 - i32.const 8 + i32.const 1 i32.sub local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 end - br $continue|1 + br $continue|2 end end end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - end - i32.load8_u - i32.store8 + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 local.get $2 - i32.const 1 - i32.sub - local.set $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end end - br $continue|2 end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 + br $continue|4 end - br $continue|3 end end end - block $break|4 - loop $continue|4 + block $break|5 + loop $continue|5 local.get $2 - i32.const 8 - i32.ge_u if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 end end end end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end end ) - (func $~lib/internal/number/prettify (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2661,7 +2644,7 @@ i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store local.get $1 i32.const 2 i32.add @@ -2698,7 +2681,7 @@ i32.shl i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $4 i32.const 1 i32.add @@ -2718,7 +2701,7 @@ i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store local.get $3 i32.const 2 i32.add @@ -2742,35 +2725,23 @@ i32.shl i32.add local.set $4 - block $~lib/memory/memory.copy|inlined.0 - local.get $4 - i32.const 4 - i32.add - i32.const 2 - i32.add - local.set $5 - local.get $4 - i32.const 4 - i32.add - local.set $6 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - local.set $7 - local.get $5 - local.get $6 - local.get $7 - call $~lib/internal/memory/memmove - end + local.get $4 + i32.const 2 + i32.add + local.get $4 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 local.get $3 i32.const 1 i32.shl i32.add i32.const 46 - i32.store16 offset=4 + i32.store16 local.get $1 i32.const 1 i32.add @@ -2792,35 +2763,23 @@ local.get $3 i32.sub local.set $4 - block $~lib/memory/memory.copy|inlined.1 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 1 - i32.shl - i32.add - local.set $7 - local.get $0 - i32.const 4 - i32.add - local.set $6 - local.get $1 - i32.const 1 - i32.shl - local.set $5 - local.get $7 - local.get $6 - local.get $5 - call $~lib/internal/memory/memmove - end + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $1 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 i32.const 48 i32.const 46 i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store block $break|1 i32.const 2 local.set $5 @@ -2836,7 +2795,7 @@ i32.shl i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $5 i32.const 1 i32.add @@ -2857,8 +2816,8 @@ if local.get $0 i32.const 101 - i32.store16 offset=6 - block $~lib/internal/number/genExponent|inlined.0 (result i32) + i32.store16 offset=2 + block $~lib/util/number/genExponent|inlined.0 (result i32) local.get $0 i32.const 4 i32.add @@ -2879,11 +2838,11 @@ local.set $5 end local.get $5 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.set $7 - block $~lib/internal/number/utoa32_core|inlined.1 + block $~lib/util/number/utoa32_core|inlined.1 local.get $4 local.set $8 local.get $5 @@ -2893,14 +2852,14 @@ local.get $8 local.get $9 local.get $10 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $4 i32.const 45 i32.const 43 local.get $6 select - i32.store16 offset=4 + i32.store16 local.get $7 end local.set $1 @@ -2913,44 +2872,32 @@ i32.const 1 i32.shl local.set $7 - block $~lib/memory/memory.copy|inlined.2 - local.get $0 - i32.const 4 - i32.add - i32.const 4 - i32.add - local.set $6 - local.get $0 - i32.const 4 - i32.add - i32.const 2 - i32.add - local.set $5 - local.get $7 - i32.const 2 - i32.sub - local.set $4 - local.get $6 - local.get $5 - local.get $4 - call $~lib/internal/memory/memmove - end + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $7 + i32.const 2 + i32.sub + call $~lib/memory/memory.copy local.get $0 i32.const 46 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 local.get $7 i32.add i32.const 101 - i32.store16 offset=6 + i32.store16 offset=2 local.get $1 - block $~lib/internal/number/genExponent|inlined.1 (result i32) + block $~lib/util/number/genExponent|inlined.1 (result i32) local.get $0 local.get $7 i32.add i32.const 4 i32.add - local.set $4 + local.set $6 local.get $3 i32.const 1 i32.sub @@ -2958,8 +2905,8 @@ local.get $5 i32.const 0 i32.lt_s - local.set $6 - local.get $6 + local.set $4 + local.get $4 if i32.const 0 local.get $5 @@ -2967,12 +2914,12 @@ local.set $5 end local.get $5 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.set $10 - block $~lib/internal/number/utoa32_core|inlined.2 - local.get $4 + block $~lib/util/number/utoa32_core|inlined.2 + local.get $6 local.set $9 local.get $5 local.set $8 @@ -2981,14 +2928,14 @@ local.get $9 local.get $8 local.get $11 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end - local.get $4 + local.get $6 i32.const 45 i32.const 43 - local.get $6 + local.get $4 select - i32.store16 offset=4 + i32.store16 local.get $10 end i32.add @@ -3007,7 +2954,7 @@ unreachable unreachable ) - (func $~lib/internal/number/dtoa_core (; 17 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 20 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -3023,21 +2970,18 @@ (local $14 i32) (local $15 i32) (local $16 f64) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) + (local $17 i64) + (local $18 i64) + (local $19 i64) + (local $20 i64) (local $21 i64) (local $22 i64) (local $23 i64) (local $24 i64) (local $25 i64) - (local $26 i64) + (local $26 i32) (local $27 i64) - (local $28 i64) - (local $29 i64) - (local $30 i64) - (local $31 i32) + (local $28 i32) local.get $1 f64.const 0 f64.lt @@ -3049,9 +2993,9 @@ local.set $1 local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end - block $~lib/internal/number/grisu2|inlined.0 (result i32) + block $~lib/util/number/grisu2|inlined.0 (result i32) local.get $1 local.set $3 local.get $0 @@ -3092,7 +3036,7 @@ i32.add i32.sub local.set $7 - block $~lib/internal/number/normalizedBoundaries|inlined.0 + block $~lib/util/number/normalizedBoundaries|inlined.0 local.get $9 local.set $10 local.get $7 @@ -3127,7 +3071,7 @@ i32.add local.set $15 local.get $12 - global.set $~lib/internal/number/_frc_plus + global.set $~lib/util/number/_frc_plus local.get $10 local.get $15 i64.extend_i32_s @@ -3141,12 +3085,12 @@ i32.sub i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_minus + global.set $~lib/util/number/_frc_minus local.get $13 - global.set $~lib/internal/number/_exp + global.set $~lib/util/number/_exp end - block $~lib/internal/number/getCachedPower|inlined.0 - global.get $~lib/internal/number/_exp + block $~lib/util/number/getCachedPower|inlined.0 + global.get $~lib/util/number/_exp local.set $15 i32.const -61 local.get $15 @@ -3175,341 +3119,288 @@ local.set $13 i32.const 348 local.get $13 - i32.const 3 + i32.const 3 + i32.shl + i32.sub + global.set $~lib/util/number/_K + i32.const 1344 + i32.load offset=4 + local.get $13 + i32.const 3 + i32.shl + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 1552 + i32.load offset=4 + local.get $13 + i32.const 1 i32.shl - i32.sub - global.set $~lib/internal/number/_K - i32.const 1728 - i32.load - local.set $11 - i32.const 1992 - i32.load - local.set $17 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $11 - local.set $18 - local.get $13 - local.set $19 - i32.const 0 - local.set $20 - local.get $18 - local.get $19 - i32.const 3 - i32.shl - i32.add - local.get $20 - i32.add - i64.load offset=8 - end - global.set $~lib/internal/number/_frc_pow - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $17 - local.set $20 - local.get $13 - local.set $19 - i32.const 0 - local.set $18 - local.get $20 - local.get $19 - i32.const 1 - i32.shl - i32.add - local.get $18 - i32.add - i32.load16_s offset=8 - end - global.set $~lib/internal/number/_exp_pow + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow end local.get $9 i64.clz i32.wrap_i64 - local.set $17 + local.set $13 local.get $9 - local.get $17 + local.get $13 i64.extend_i32_s i64.shl local.set $9 local.get $7 - local.get $17 + local.get $13 i32.sub local.set $7 - global.get $~lib/internal/number/_frc_pow + global.get $~lib/util/number/_frc_pow local.set $12 - global.get $~lib/internal/number/_exp_pow - local.set $11 - block $~lib/internal/number/umul64f|inlined.0 (result i64) + global.get $~lib/util/number/_exp_pow + local.set $14 + block $~lib/util/number/umul64f|inlined.0 (result i64) local.get $9 local.set $10 local.get $12 - local.set $21 + local.set $17 local.get $10 i64.const 4294967295 i64.and - local.set $22 - local.get $21 + local.set $18 + local.get $17 i64.const 4294967295 i64.and - local.set $23 + local.set $19 local.get $10 i64.const 32 i64.shr_u - local.set $24 - local.get $21 + local.set $20 + local.get $17 i64.const 32 i64.shr_u - local.set $25 - local.get $22 - local.get $23 + local.set $21 + local.get $18 + local.get $19 i64.mul - local.set $26 - local.get $24 - local.get $23 + local.set $22 + local.get $20 + local.get $19 i64.mul - local.get $26 + local.get $22 i64.const 32 i64.shr_u i64.add - local.set $27 - local.get $22 - local.get $25 + local.set $23 + local.get $18 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.const 4294967295 i64.and i64.add - local.set $28 - local.get $28 + local.set $24 + local.get $24 i64.const 2147483647 i64.add - local.set $28 - local.get $27 + local.set $24 + local.get $23 i64.const 32 i64.shr_u - local.set $27 - local.get $28 + local.set $23 + local.get $24 i64.const 32 i64.shr_u - local.set $28 - local.get $24 - local.get $25 + local.set $24 + local.get $20 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.add - local.get $28 + local.get $24 i64.add end - local.set $28 - block $~lib/internal/number/umul64e|inlined.0 (result i32) + local.set $24 + block $~lib/util/number/umul64e|inlined.0 (result i32) local.get $7 - local.set $13 - local.get $11 - local.set $14 - local.get $13 + local.set $15 local.get $14 + local.set $11 + local.get $15 + local.get $11 i32.add i32.const 64 i32.add end - local.set $14 - block $~lib/internal/number/umul64f|inlined.1 (result i64) - global.get $~lib/internal/number/_frc_plus - local.set $27 + local.set $11 + block $~lib/util/number/umul64f|inlined.1 (result i64) + global.get $~lib/util/number/_frc_plus + local.set $23 local.get $12 - local.set $26 - local.get $27 + local.set $22 + local.get $23 i64.const 4294967295 i64.and - local.set $25 - local.get $26 + local.set $21 + local.get $22 i64.const 4294967295 i64.and - local.set $24 - local.get $27 + local.set $20 + local.get $23 i64.const 32 i64.shr_u - local.set $23 - local.get $26 + local.set $19 + local.get $22 i64.const 32 i64.shr_u - local.set $22 - local.get $25 - local.get $24 + local.set $18 + local.get $21 + local.get $20 i64.mul - local.set $21 - local.get $23 - local.get $24 + local.set $17 + local.get $19 + local.get $20 i64.mul - local.get $21 + local.get $17 i64.const 32 i64.shr_u i64.add local.set $10 - local.get $25 - local.get $22 + local.get $21 + local.get $18 i64.mul local.get $10 i64.const 4294967295 i64.and i64.add - local.set $29 - local.get $29 + local.set $25 + local.get $25 i64.const 2147483647 i64.add - local.set $29 + local.set $25 local.get $10 i64.const 32 i64.shr_u local.set $10 - local.get $29 + local.get $25 i64.const 32 i64.shr_u - local.set $29 - local.get $23 - local.get $22 + local.set $25 + local.get $19 + local.get $18 i64.mul local.get $10 i64.add - local.get $29 + local.get $25 i64.add end i64.const 1 i64.sub - local.set $29 - block $~lib/internal/number/umul64e|inlined.1 (result i32) - global.get $~lib/internal/number/_exp - local.set $13 - local.get $11 + local.set $25 + block $~lib/util/number/umul64e|inlined.1 (result i32) + global.get $~lib/util/number/_exp local.set $15 - local.get $13 + local.get $14 + local.set $26 local.get $15 + local.get $26 i32.add i32.const 64 i32.add end - local.set $15 - block $~lib/internal/number/umul64f|inlined.2 (result i64) - global.get $~lib/internal/number/_frc_minus + local.set $26 + block $~lib/util/number/umul64f|inlined.2 (result i64) + global.get $~lib/util/number/_frc_minus local.set $10 local.get $12 - local.set $21 + local.set $17 local.get $10 i64.const 4294967295 i64.and - local.set $22 - local.get $21 + local.set $18 + local.get $17 i64.const 4294967295 i64.and - local.set $23 + local.set $19 local.get $10 i64.const 32 i64.shr_u - local.set $24 - local.get $21 + local.set $20 + local.get $17 i64.const 32 i64.shr_u - local.set $25 - local.get $22 - local.get $23 + local.set $21 + local.get $18 + local.get $19 i64.mul - local.set $26 - local.get $24 - local.get $23 + local.set $22 + local.get $20 + local.get $19 i64.mul - local.get $26 + local.get $22 i64.const 32 i64.shr_u i64.add - local.set $27 - local.get $22 - local.get $25 + local.set $23 + local.get $18 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.const 4294967295 i64.and i64.add - local.set $30 - local.get $30 + local.set $27 + local.get $27 i64.const 2147483647 i64.add - local.set $30 - local.get $27 + local.set $27 + local.get $23 i64.const 32 i64.shr_u - local.set $27 - local.get $30 + local.set $23 + local.get $27 i64.const 32 i64.shr_u - local.set $30 - local.get $24 - local.get $25 + local.set $27 + local.get $20 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.add - local.get $30 + local.get $27 i64.add end i64.const 1 i64.add - local.set $30 - local.get $29 - local.get $30 - i64.sub local.set $27 - local.get $4 - local.get $28 - local.get $14 - local.get $29 - local.get $15 + local.get $25 local.get $27 + i64.sub + local.set $23 + local.get $4 + local.get $24 + local.get $11 + local.get $25 + local.get $26 + local.get $23 local.get $5 - call $~lib/internal/number/genDigits + call $~lib/util/number/genDigits end - local.set $31 + local.set $28 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $31 + local.get $28 local.get $2 i32.sub - global.get $~lib/internal/number/_K - call $~lib/internal/number/prettify - local.set $31 - local.get $31 - local.get $2 - i32.add - ) - (func $~lib/internal/string/copyUnsafe (; 18 ;) (type $FUNCSIG$viiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 4 - i32.add - local.set $5 + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.set $28 + local.get $28 local.get $2 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 4 i32.add - local.set $6 - local.get $4 - i32.const 1 - i32.shl - local.set $7 - local.get $5 - local.get $6 - local.get $7 - call $~lib/internal/memory/memmove ) - (func $~lib/string/String#substring (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3524,14 +3415,14 @@ i32.eqz if i32.const 0 - i32.const 2072 - i32.const 249 + i32.const 1648 + i32.const 190 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load + call $~lib/string/String#get:length local.set $3 local.get $1 local.tee $4 @@ -3573,6 +3464,8 @@ local.get $5 i32.lt_s select + i32.const 1 + i32.shl local.set $8 local.get $6 local.tee $4 @@ -3582,6 +3475,8 @@ local.get $5 i32.gt_s select + i32.const 1 + i32.shl local.set $9 local.get $9 local.get $8 @@ -3590,7 +3485,7 @@ local.get $3 i32.eqz if - i32.const 2104 + i32.const 1688 return end local.get $8 @@ -3599,7 +3494,9 @@ if (result i32) local.get $9 local.get $0 - i32.load + call $~lib/string/String#get:length + i32.const 1 + i32.shl i32.eq else local.get $4 @@ -3608,31 +3505,50 @@ local.get $0 return end - local.get $3 - call $~lib/internal/string/allocateUnsafe + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + local.get $3 + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + end local.set $10 local.get $10 - i32.const 0 local.get $0 local.get $8 + i32.add local.get $3 - call $~lib/internal/string/copyUnsafe - local.get $10 + call $~lib/memory/memory.copy + block $~lib/runtime/REGISTER|inlined.1 (result i32) + local.get $10 + local.set $4 + local.get $4 + i32.const 1 + call $~lib/runtime/doRegister + end + ) + (func $~lib/memory/memory.free (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + local.set $1 ) - (func $~lib/allocator/arena/__memory_free (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) - nop + (func $~lib/runtime/doDiscard (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + call $~lib/memory/memory.free ) - (func $~lib/internal/number/dtoa (; 21 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 24 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 f64.const 0 f64.eq if - i32.const 624 + i32.const 552 return end local.get $0 @@ -3642,67 +3558,58 @@ local.get $0 call $~lib/builtins/isNaN if - i32.const 640 + i32.const 568 return end - i32.const 656 - i32.const 680 + i32.const 584 + i32.const 616 local.get $0 f64.const 0 f64.lt select return end - i32.const 28 - call $~lib/internal/string/allocateUnsafe - local.set $1 - local.get $1 - local.get $0 - call $~lib/internal/number/dtoa_core + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + i32.const 28 + i32.const 1 + i32.shl + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $2 - local.get $1 - i32.const 0 local.get $2 - call $~lib/string/String#substring + local.get $0 + call $~lib/util/number/dtoa_core local.set $3 - block $~lib/internal/string/freeUnsafe|inlined.0 + local.get $2 + i32.const 0 + local.get $3 + call $~lib/string/String#substring + local.set $4 + block $~lib/runtime/DISCARD|inlined.0 + local.get $2 + local.set $1 local.get $1 - local.set $4 - local.get $4 - i32.eqz - if - i32.const 0 - i32.const 16 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.0 - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 - end + call $~lib/runtime/doDiscard end - local.get $3 + local.get $4 ) - (func $~lib/number/F64#toString (; 22 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/number/F64#toString (; 25 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 - call $~lib/internal/number/dtoa + call $~lib/util/number/dtoa ) - (func $~lib/number/Bool#toString (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/number/Bool#toString (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne if (result i32) - i32.const 2160 + i32.const 1776 else - i32.const 2176 + i32.const 1792 end ) - (func $~lib/number/F32.isSafeInteger (; 24 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/number/F32.isSafeInteger (; 27 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) (local $1 i32) local.get $0 f32.abs @@ -3718,7 +3625,7 @@ local.get $1 end ) - (func $~lib/number/F32.isInteger (; 25 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/number/F32.isInteger (; 28 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) (local $1 f32) (local $2 i32) block $~lib/builtins/isFinite|inlined.0 (result i32) @@ -3742,7 +3649,7 @@ local.get $2 end ) - (func $~lib/number/F64.isSafeInteger (; 26 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/number/F64.isSafeInteger (; 29 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) local.get $0 f64.abs @@ -3758,7 +3665,7 @@ local.get $1 end ) - (func $~lib/number/F64.isInteger (; 27 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/number/F64.isInteger (; 30 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 f64) (local $2 i32) block $~lib/builtins/isFinite|inlined.0 (result i32) @@ -3782,19 +3689,28 @@ local.get $2 end ) - (func $start:number (; 28 ;) (type $FUNCSIG$v) + (func $start:number (; 31 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) (local $2 f64) - call $start:~lib/allocator/arena + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset global.get $number/a call $~lib/number/I32#toString - i32.const 592 - call $~lib/string/String.__eq + i32.const 504 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 7 i32.const 0 call $~lib/env/abort @@ -3802,12 +3718,12 @@ end f64.const 2 call $~lib/number/F64#toString - i32.const 2112 - call $~lib/string/String.__eq + i32.const 1696 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 9 i32.const 0 call $~lib/env/abort @@ -3815,12 +3731,12 @@ end i32.const 3 call $~lib/number/I32#toString - i32.const 2128 - call $~lib/string/String.__eq + i32.const 1712 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 10 i32.const 0 call $~lib/env/abort @@ -3828,12 +3744,12 @@ end i32.const -5 call $~lib/number/I32#toString - i32.const 2136 - call $~lib/string/String.__eq + i32.const 1728 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 12 i32.const 0 call $~lib/env/abort @@ -3841,12 +3757,12 @@ end i32.const 4 call $~lib/number/I32#toString - i32.const 2144 - call $~lib/string/String.__eq + i32.const 1744 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 13 i32.const 0 call $~lib/env/abort @@ -3860,12 +3776,12 @@ global.get $number/a end call $~lib/number/I32#toString - i32.const 2152 - call $~lib/string/String.__eq + i32.const 1760 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 14 i32.const 0 call $~lib/env/abort @@ -3879,12 +3795,12 @@ global.get $number/a end call $~lib/number/I32#toString - i32.const 592 - call $~lib/string/String.__eq + i32.const 504 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 15 i32.const 0 call $~lib/env/abort @@ -3893,12 +3809,12 @@ i32.const 0 i32.eqz call $~lib/number/Bool#toString - i32.const 2160 - call $~lib/string/String.__eq + i32.const 1776 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 16 i32.const 0 call $~lib/env/abort @@ -3907,12 +3823,12 @@ i32.const 1 i32.eqz call $~lib/number/Bool#toString - i32.const 2176 - call $~lib/string/String.__eq + i32.const 1792 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 17 i32.const 0 call $~lib/env/abort @@ -3927,12 +3843,12 @@ local.get $0 end call $~lib/number/I32#toString - i32.const 592 - call $~lib/string/String.__eq + i32.const 504 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 20 i32.const 0 call $~lib/env/abort @@ -3947,12 +3863,12 @@ local.get $0 end call $~lib/number/I32#toString - i32.const 2152 - call $~lib/string/String.__eq + i32.const 1760 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 21 i32.const 0 call $~lib/env/abort @@ -3970,7 +3886,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 25 i32.const 0 call $~lib/env/abort @@ -3985,7 +3901,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 27 i32.const 0 call $~lib/env/abort @@ -3998,7 +3914,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 28 i32.const 0 call $~lib/env/abort @@ -4011,7 +3927,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 29 i32.const 0 call $~lib/env/abort @@ -4024,7 +3940,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 30 i32.const 0 call $~lib/env/abort @@ -4037,7 +3953,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 31 i32.const 0 call $~lib/env/abort @@ -4050,7 +3966,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 32 i32.const 0 call $~lib/env/abort @@ -4063,7 +3979,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 33 i32.const 0 call $~lib/env/abort @@ -4078,7 +3994,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 34 i32.const 0 call $~lib/env/abort @@ -4091,7 +4007,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 35 i32.const 0 call $~lib/env/abort @@ -4106,7 +4022,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 36 i32.const 0 call $~lib/env/abort @@ -4121,7 +4037,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 37 i32.const 0 call $~lib/env/abort @@ -4136,7 +4052,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 38 i32.const 0 call $~lib/env/abort @@ -4151,7 +4067,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 39 i32.const 0 call $~lib/env/abort @@ -4166,7 +4082,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 40 i32.const 0 call $~lib/env/abort @@ -4181,7 +4097,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 41 i32.const 0 call $~lib/env/abort @@ -4196,7 +4112,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 42 i32.const 0 call $~lib/env/abort @@ -4211,7 +4127,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 43 i32.const 0 call $~lib/env/abort @@ -4226,7 +4142,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 44 i32.const 0 call $~lib/env/abort @@ -4241,7 +4157,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 45 i32.const 0 call $~lib/env/abort @@ -4256,7 +4172,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 46 i32.const 0 call $~lib/env/abort @@ -4274,7 +4190,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 48 i32.const 0 call $~lib/env/abort @@ -4289,7 +4205,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 50 i32.const 0 call $~lib/env/abort @@ -4302,7 +4218,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 51 i32.const 0 call $~lib/env/abort @@ -4315,7 +4231,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 52 i32.const 0 call $~lib/env/abort @@ -4328,7 +4244,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 53 i32.const 0 call $~lib/env/abort @@ -4341,7 +4257,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 54 i32.const 0 call $~lib/env/abort @@ -4354,7 +4270,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 55 i32.const 0 call $~lib/env/abort @@ -4367,7 +4283,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 56 i32.const 0 call $~lib/env/abort @@ -4382,7 +4298,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 57 i32.const 0 call $~lib/env/abort @@ -4395,7 +4311,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 58 i32.const 0 call $~lib/env/abort @@ -4410,7 +4326,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 59 i32.const 0 call $~lib/env/abort @@ -4425,7 +4341,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 60 i32.const 0 call $~lib/env/abort @@ -4440,7 +4356,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 61 i32.const 0 call $~lib/env/abort @@ -4455,7 +4371,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 62 i32.const 0 call $~lib/env/abort @@ -4470,7 +4386,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 63 i32.const 0 call $~lib/env/abort @@ -4485,7 +4401,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 64 i32.const 0 call $~lib/env/abort @@ -4500,7 +4416,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 65 i32.const 0 call $~lib/env/abort @@ -4515,7 +4431,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 66 i32.const 0 call $~lib/env/abort @@ -4530,7 +4446,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 67 i32.const 0 call $~lib/env/abort @@ -4545,7 +4461,7 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 68 i32.const 0 call $~lib/env/abort @@ -4560,16 +4476,16 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 520 i32.const 69 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 29 ;) (type $FUNCSIG$v) + (func $start (; 32 ;) (type $FUNCSIG$v) call $start:number ) - (func $null (; 30 ;) (type $FUNCSIG$v) + (func $null (; 33 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index 081a7d2d3e..4929f5bc5a 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -1,13 +1,14 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d") - (data (i32.const 40) "\01\00\00\00\"\00\00\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") + (data (i32.const 40) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 80) "\01\00\00\00\"\00\00\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -77,7 +78,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/ALLOCATE (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -98,7 +99,44 @@ i32.const 8 i32.add ) - (func $~lib/util/string/compareImpl (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/assertUnregistered (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 124 + i32.le_u + if + i32.const 0 + i32.const 48 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 8 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 48 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + i32.const 8 + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/util/string/compareImpl (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 16 @@ -134,7 +172,7 @@ end local.get $3 ) - (func $~lib/string/String.eq (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.eq (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -177,14 +215,14 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $object-literal/bar (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $object-literal/bar (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 1 i32.ne if i32.const 0 - i32.const 48 + i32.const 88 i32.const 9 i32.const 2 call $~lib/env/abort @@ -196,21 +234,23 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 88 i32.const 10 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start:object-literal (; 6 ;) (type $FUNCSIG$v) + (func $start:object-literal (; 8 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 88 + i32.const 128 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 8 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate + i32.const 2 + call $~lib/runtime/doRegister local.tee $0 i32.const 1 i32.store @@ -220,7 +260,9 @@ local.get $0 call $object-literal/bar i32.const 4 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate + i32.const 3 + call $~lib/runtime/doRegister local.tee $0 i32.const 2 i32.store @@ -230,14 +272,16 @@ i32.ne if i32.const 0 - i32.const 48 + i32.const 88 i32.const 26 i32.const 2 call $~lib/env/abort unreachable end i32.const 4 - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate + i32.const 3 + call $~lib/runtime/doRegister local.tee $0 i32.const 3 i32.store @@ -247,17 +291,17 @@ i32.ne if i32.const 0 - i32.const 48 + i32.const 88 i32.const 21 i32.const 4 call $~lib/env/abort unreachable end ) - (func $start (; 7 ;) (type $FUNCSIG$v) + (func $start (; 9 ;) (type $FUNCSIG$v) call $start:object-literal ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 10 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index 8d35bd3b66..073b139649 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -1,14 +1,15 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d\00") - (data (i32.const 40) "\01\00\00\00\"\00\00\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") + (data (i32.const 40) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 80) "\01\00\00\00\"\00\00\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) @@ -16,11 +17,12 @@ (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 84)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 124)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/ADJUST (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -117,10 +119,10 @@ end return ) - (func $~lib/runtime/ALLOCATE (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUST + call $~lib/runtime/ADJUSTOBLOCK call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -133,7 +135,50 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/string/String#get:length (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/doAllocate + ) + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 48 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 48 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/string/String#get:length (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -141,7 +186,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 5 ;) (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 (; 8 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -194,7 +239,7 @@ end local.get $5 ) - (func $~lib/string/String.eq (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.eq (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -238,7 +283,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $object-literal/bar (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $object-literal/bar (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 1 @@ -246,7 +291,7 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 88 i32.const 9 i32.const 2 call $~lib/env/abort @@ -259,14 +304,14 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 88 i32.const 10 i32.const 2 call $~lib/env/abort unreachable end ) - (func $object-literal/bar2 (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $object-literal/bar2 (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 2 @@ -274,14 +319,14 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 88 i32.const 26 i32.const 2 call $~lib/env/abort unreachable end ) - (func $object-literal/Foo2#test (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $object-literal/Foo2#test (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 3 @@ -289,17 +334,18 @@ i32.eqz if i32.const 0 - i32.const 48 + i32.const 88 i32.const 21 i32.const 4 call $~lib/env/abort unreachable end ) - (func $start:object-literal (; 10 ;) (type $FUNCSIG$v) + (func $start:object-literal (; 13 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -311,8 +357,14 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset block (result i32) - i32.const 8 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 8 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 2 + call $~lib/runtime/doRegister + end local.set $0 local.get $0 i32.const 1 @@ -324,8 +376,14 @@ end call $object-literal/bar block (result i32) - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 4 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 3 + call $~lib/runtime/doRegister + end local.set $1 local.get $1 i32.const 2 @@ -334,8 +392,14 @@ end call $object-literal/bar2 block (result i32) - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER|inlined.1 (result i32) + i32.const 4 + call $~lib/runtime/ALLOCATE + local.set $3 + local.get $3 + i32.const 3 + call $~lib/runtime/doRegister + end local.set $2 local.get $2 i32.const 3 @@ -344,9 +408,9 @@ end call $object-literal/Foo2#test ) - (func $start (; 11 ;) (type $FUNCSIG$v) + (func $start (; 14 ;) (type $FUNCSIG$v) call $start:object-literal ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 15 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 4fed454744..884015e5a8 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -1,8 +1,13 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (memory $0 0) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\02\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) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -12,7 +17,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/memory/memory.allocate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -74,7 +79,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/ALLOCATE (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 call $~lib/memory/memory.allocate @@ -88,17 +93,58 @@ i32.const 8 i32.add ) - (func $start (; 2 ;) (type $FUNCSIG$v) + (func $~lib/runtime/assertUnregistered (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 48 + i32.le_u + if + i32.const 0 + i32.const 16 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 8 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 16 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 i32.const 8 + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $start (; 5 ;) (type $FUNCSIG$v) + i32.const 48 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate + i32.const 1 + call $~lib/runtime/doRegister global.set $optional-typeparameters/tConcrete - call $~lib/runtime/ALLOCATE + call $~lib/runtime/doAllocate + i32.const 3 + call $~lib/runtime/doRegister global.set $optional-typeparameters/tDerived ) - (func $null (; 3 ;) (type $FUNCSIG$v) + (func $null (; 6 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index 2686e9567f..9e2840fc4e 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -1,9 +1,14 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$didd (func (param i32 f64 f64) (result f64))) (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) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) @@ -11,19 +16,20 @@ (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $optional-typeparameters/tConcrete (mut i32) (i32.const 0)) (global $optional-typeparameters/tDerived (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $optional-typeparameters/testConcrete (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $optional-typeparameters/testConcrete (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 ) - (func $optional-typeparameters/testDerived (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $optional-typeparameters/testDerived (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 ) - (func $~lib/runtime/ADJUST (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -35,7 +41,7 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -120,10 +126,10 @@ end return ) - (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUST + call $~lib/runtime/ADJUSTOBLOCK call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -136,37 +142,94 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $optional-typeparameters/TestConcrete#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + call $~lib/runtime/doAllocate + ) + (func $~lib/runtime/assertUnregistered (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u i32.eqz if i32.const 0 - call $~lib/runtime/ALLOCATE + i32.const 16 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $optional-typeparameters/TestConcrete#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + if + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 0 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 1 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 ) - (func $optional-typeparameters/TestConcrete#test (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $optional-typeparameters/TestConcrete#test (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 local.get $2 i32.add ) - (func $optional-typeparameters/TestDerived#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $optional-typeparameters/TestDerived#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.eqz if - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 0 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 3 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 ) - (func $optional-typeparameters/TestDerived#test (; 8 ;) (type $FUNCSIG$didd) (param $0 i32) (param $1 f64) (param $2 f64) (result f64) + (func $optional-typeparameters/TestDerived#test (; 12 ;) (type $FUNCSIG$didd) (param $0 i32) (param $1 f64) (param $2 f64) (result f64) local.get $1 local.get $2 f64.add ) - (func $start:optional-typeparameters (; 9 ;) (type $FUNCSIG$v) + (func $start:optional-typeparameters (; 13 ;) (type $FUNCSIG$v) i32.const 1 call $optional-typeparameters/testConcrete drop @@ -200,9 +263,9 @@ call $optional-typeparameters/TestDerived#test drop ) - (func $start (; 10 ;) (type $FUNCSIG$v) + (func $start (; 14 ;) (type $FUNCSIG$v) call $start:optional-typeparameters ) - (func $null (; 11 ;) (type $FUNCSIG$v) + (func $null (; 15 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/portable-conversions.optimized.wat b/tests/compiler/portable-conversions.optimized.wat index ab02e83b04..ae142dfe42 100644 --- a/tests/compiler/portable-conversions.optimized.wat +++ b/tests/compiler/portable-conversions.optimized.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\17\00\00\00p\00o\00r\00t\00a\00b\00l\00e\00-\00c\00o\00n\00v\00e\00r\00s\00i\00o\00n\00s\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00.\00\00\00p\00o\00r\00t\00a\00b\00l\00e\00-\00c\00o\00n\00v\00e\00r\00s\00i\00o\00n\00s\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $portable-conversions/i (mut i32) (i32.const 1)) @@ -20,7 +20,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 6 i32.const 0 call $~lib/env/abort @@ -33,7 +33,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 7 i32.const 0 call $~lib/env/abort @@ -46,7 +46,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 8 i32.const 0 call $~lib/env/abort @@ -59,7 +59,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 9 i32.const 0 call $~lib/env/abort @@ -71,7 +71,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 11 i32.const 0 call $~lib/env/abort @@ -84,7 +84,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 12 i32.const 0 call $~lib/env/abort @@ -97,7 +97,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 13 i32.const 0 call $~lib/env/abort @@ -110,7 +110,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 14 i32.const 0 call $~lib/env/abort @@ -120,7 +120,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 16 i32.const 0 call $~lib/env/abort @@ -131,7 +131,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 17 i32.const 0 call $~lib/env/abort @@ -142,7 +142,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 18 i32.const 0 call $~lib/env/abort @@ -153,7 +153,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 19 i32.const 0 call $~lib/env/abort @@ -164,7 +164,7 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 21 i32.const 0 call $~lib/env/abort @@ -174,7 +174,7 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 22 i32.const 0 call $~lib/env/abort @@ -185,7 +185,7 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 23 i32.const 0 call $~lib/env/abort @@ -196,7 +196,7 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 24 i32.const 0 call $~lib/env/abort @@ -206,7 +206,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 26 i32.const 0 call $~lib/env/abort @@ -217,7 +217,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 27 i32.const 0 call $~lib/env/abort @@ -228,7 +228,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 28 i32.const 0 call $~lib/env/abort @@ -239,7 +239,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 29 i32.const 0 call $~lib/env/abort @@ -251,7 +251,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 31 i32.const 0 call $~lib/env/abort @@ -264,7 +264,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 32 i32.const 0 call $~lib/env/abort @@ -277,7 +277,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 33 i32.const 0 call $~lib/env/abort @@ -290,7 +290,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 34 i32.const 0 call $~lib/env/abort @@ -302,7 +302,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 36 i32.const 0 call $~lib/env/abort @@ -315,7 +315,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 37 i32.const 0 call $~lib/env/abort @@ -328,7 +328,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 38 i32.const 0 call $~lib/env/abort @@ -341,7 +341,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 39 i32.const 0 call $~lib/env/abort @@ -351,7 +351,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 41 i32.const 0 call $~lib/env/abort @@ -362,7 +362,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 42 i32.const 0 call $~lib/env/abort @@ -373,7 +373,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 43 i32.const 0 call $~lib/env/abort @@ -384,7 +384,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 44 i32.const 0 call $~lib/env/abort @@ -395,7 +395,7 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 46 i32.const 0 call $~lib/env/abort @@ -405,7 +405,7 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 47 i32.const 0 call $~lib/env/abort @@ -416,7 +416,7 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 48 i32.const 0 call $~lib/env/abort @@ -427,7 +427,7 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 49 i32.const 0 call $~lib/env/abort @@ -437,7 +437,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 51 i32.const 0 call $~lib/env/abort @@ -448,7 +448,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 52 i32.const 0 call $~lib/env/abort @@ -459,7 +459,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 53 i32.const 0 call $~lib/env/abort @@ -470,7 +470,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 54 i32.const 0 call $~lib/env/abort @@ -480,7 +480,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 56 i32.const 0 call $~lib/env/abort @@ -491,7 +491,7 @@ i64.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 57 i32.const 0 call $~lib/env/abort @@ -502,7 +502,7 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 58 i32.const 0 call $~lib/env/abort @@ -513,7 +513,7 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 59 i32.const 0 call $~lib/env/abort @@ -525,7 +525,7 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 61 i32.const 0 call $~lib/env/abort @@ -537,7 +537,7 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 62 i32.const 0 call $~lib/env/abort @@ -548,7 +548,7 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 63 i32.const 0 call $~lib/env/abort @@ -560,7 +560,7 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 64 i32.const 0 call $~lib/env/abort @@ -572,7 +572,7 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 66 i32.const 0 call $~lib/env/abort @@ -584,7 +584,7 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 67 i32.const 0 call $~lib/env/abort @@ -596,7 +596,7 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 68 i32.const 0 call $~lib/env/abort @@ -607,7 +607,7 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 69 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/portable-conversions.untouched.wat b/tests/compiler/portable-conversions.untouched.wat index 6ca1d6f251..35eaeafd0a 100644 --- a/tests/compiler/portable-conversions.untouched.wat +++ b/tests/compiler/portable-conversions.untouched.wat @@ -3,14 +3,14 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\17\00\00\00p\00o\00r\00t\00a\00b\00l\00e\00-\00c\00o\00n\00v\00e\00r\00s\00i\00o\00n\00s\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00.\00\00\00p\00o\00r\00t\00a\00b\00l\00e\00-\00c\00o\00n\00v\00e\00r\00s\00i\00o\00n\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $portable-conversions/i (mut i32) (i32.const 1)) (global $portable-conversions/I (mut i64) (i64.const 1)) (global $portable-conversions/f (mut f32) (f32.const 1)) (global $portable-conversions/F (mut f64) (f64.const 1)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 60)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -23,7 +23,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 6 i32.const 0 call $~lib/env/abort @@ -38,7 +38,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 7 i32.const 0 call $~lib/env/abort @@ -53,7 +53,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 8 i32.const 0 call $~lib/env/abort @@ -68,7 +68,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 9 i32.const 0 call $~lib/env/abort @@ -82,7 +82,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 11 i32.const 0 call $~lib/env/abort @@ -97,7 +97,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 12 i32.const 0 call $~lib/env/abort @@ -112,7 +112,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 13 i32.const 0 call $~lib/env/abort @@ -127,7 +127,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 14 i32.const 0 call $~lib/env/abort @@ -137,7 +137,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 16 i32.const 0 call $~lib/env/abort @@ -148,7 +148,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 17 i32.const 0 call $~lib/env/abort @@ -159,7 +159,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 18 i32.const 0 call $~lib/env/abort @@ -170,7 +170,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 19 i32.const 0 call $~lib/env/abort @@ -181,7 +181,7 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 21 i32.const 0 call $~lib/env/abort @@ -191,7 +191,7 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 22 i32.const 0 call $~lib/env/abort @@ -202,7 +202,7 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 23 i32.const 0 call $~lib/env/abort @@ -213,7 +213,7 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 24 i32.const 0 call $~lib/env/abort @@ -223,7 +223,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 26 i32.const 0 call $~lib/env/abort @@ -234,7 +234,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 27 i32.const 0 call $~lib/env/abort @@ -245,7 +245,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 28 i32.const 0 call $~lib/env/abort @@ -256,7 +256,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 29 i32.const 0 call $~lib/env/abort @@ -268,7 +268,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 31 i32.const 0 call $~lib/env/abort @@ -281,7 +281,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 32 i32.const 0 call $~lib/env/abort @@ -294,7 +294,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 33 i32.const 0 call $~lib/env/abort @@ -307,7 +307,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 34 i32.const 0 call $~lib/env/abort @@ -319,7 +319,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 36 i32.const 0 call $~lib/env/abort @@ -332,7 +332,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 37 i32.const 0 call $~lib/env/abort @@ -345,7 +345,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 38 i32.const 0 call $~lib/env/abort @@ -358,7 +358,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 39 i32.const 0 call $~lib/env/abort @@ -368,7 +368,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 41 i32.const 0 call $~lib/env/abort @@ -379,7 +379,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 42 i32.const 0 call $~lib/env/abort @@ -390,7 +390,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 43 i32.const 0 call $~lib/env/abort @@ -401,7 +401,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 44 i32.const 0 call $~lib/env/abort @@ -412,7 +412,7 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 46 i32.const 0 call $~lib/env/abort @@ -422,7 +422,7 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 47 i32.const 0 call $~lib/env/abort @@ -433,7 +433,7 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 48 i32.const 0 call $~lib/env/abort @@ -444,7 +444,7 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 49 i32.const 0 call $~lib/env/abort @@ -454,7 +454,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 51 i32.const 0 call $~lib/env/abort @@ -465,7 +465,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 52 i32.const 0 call $~lib/env/abort @@ -476,7 +476,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 53 i32.const 0 call $~lib/env/abort @@ -487,7 +487,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 54 i32.const 0 call $~lib/env/abort @@ -499,7 +499,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 56 i32.const 0 call $~lib/env/abort @@ -511,7 +511,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 57 i32.const 0 call $~lib/env/abort @@ -523,7 +523,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 58 i32.const 0 call $~lib/env/abort @@ -535,7 +535,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 59 i32.const 0 call $~lib/env/abort @@ -547,7 +547,7 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 61 i32.const 0 call $~lib/env/abort @@ -559,7 +559,7 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 62 i32.const 0 call $~lib/env/abort @@ -570,7 +570,7 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 63 i32.const 0 call $~lib/env/abort @@ -582,7 +582,7 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 64 i32.const 0 call $~lib/env/abort @@ -594,7 +594,7 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 66 i32.const 0 call $~lib/env/abort @@ -606,7 +606,7 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 67 i32.const 0 call $~lib/env/abort @@ -618,7 +618,7 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 68 i32.const 0 call $~lib/env/abort @@ -629,7 +629,7 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 69 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/retain-i32.optimized.wat b/tests/compiler/retain-i32.optimized.wat index 2578279298..93280cc91a 100644 --- a/tests/compiler/retain-i32.optimized.wat +++ b/tests/compiler/retain-i32.optimized.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\1a\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $retain-i32/si (mut i32) (i32.const 0)) @@ -34,7 +34,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 78 i32.const 0 call $~lib/env/abort @@ -47,7 +47,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 81 i32.const 0 call $~lib/env/abort @@ -60,7 +60,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 84 i32.const 0 call $~lib/env/abort @@ -73,7 +73,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 87 i32.const 0 call $~lib/env/abort @@ -86,7 +86,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 90 i32.const 0 call $~lib/env/abort @@ -99,7 +99,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 93 i32.const 0 call $~lib/env/abort @@ -112,7 +112,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 96 i32.const 0 call $~lib/env/abort @@ -125,7 +125,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 99 i32.const 0 call $~lib/env/abort @@ -138,7 +138,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 102 i32.const 0 call $~lib/env/abort @@ -149,7 +149,7 @@ global.get $retain-i32/si if i32.const 0 - i32.const 8 + i32.const 16 i32.const 105 i32.const 0 call $~lib/env/abort @@ -162,7 +162,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 108 i32.const 0 call $~lib/env/abort @@ -175,7 +175,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 113 i32.const 0 call $~lib/env/abort @@ -188,7 +188,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 116 i32.const 0 call $~lib/env/abort @@ -201,7 +201,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 119 i32.const 0 call $~lib/env/abort @@ -214,7 +214,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 122 i32.const 0 call $~lib/env/abort @@ -227,7 +227,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 125 i32.const 0 call $~lib/env/abort @@ -240,7 +240,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 128 i32.const 0 call $~lib/env/abort @@ -251,7 +251,7 @@ global.get $retain-i32/ui if i32.const 0 - i32.const 8 + i32.const 16 i32.const 131 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/retain-i32.untouched.wat b/tests/compiler/retain-i32.untouched.wat index 3c8ff591f4..fa0b48961b 100644 --- a/tests/compiler/retain-i32.untouched.wat +++ b/tests/compiler/retain-i32.untouched.wat @@ -4,7 +4,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\1a\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/builtins/i8.MAX_VALUE i32 (i32.const 127)) @@ -18,7 +18,7 @@ (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) (global $retain-i32/si (mut i32) (i32.const 0)) (global $retain-i32/ui (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -41,7 +41,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 4 i32.const 2 call $~lib/env/abort @@ -65,7 +65,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 5 i32.const 2 call $~lib/env/abort @@ -89,7 +89,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 6 i32.const 2 call $~lib/env/abort @@ -113,7 +113,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 7 i32.const 2 call $~lib/env/abort @@ -137,7 +137,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 8 i32.const 2 call $~lib/env/abort @@ -161,7 +161,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 9 i32.const 2 call $~lib/env/abort @@ -185,7 +185,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 10 i32.const 2 call $~lib/env/abort @@ -205,7 +205,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 13 i32.const 2 call $~lib/env/abort @@ -225,7 +225,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 14 i32.const 2 call $~lib/env/abort @@ -245,7 +245,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 15 i32.const 2 call $~lib/env/abort @@ -265,7 +265,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 16 i32.const 2 call $~lib/env/abort @@ -285,7 +285,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 17 i32.const 2 call $~lib/env/abort @@ -305,7 +305,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 18 i32.const 2 call $~lib/env/abort @@ -325,7 +325,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 19 i32.const 2 call $~lib/env/abort @@ -475,7 +475,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 78 i32.const 0 call $~lib/env/abort @@ -497,7 +497,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 81 i32.const 0 call $~lib/env/abort @@ -517,7 +517,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 84 i32.const 0 call $~lib/env/abort @@ -537,7 +537,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 87 i32.const 0 call $~lib/env/abort @@ -557,7 +557,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 90 i32.const 0 call $~lib/env/abort @@ -577,7 +577,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 93 i32.const 0 call $~lib/env/abort @@ -597,7 +597,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 96 i32.const 0 call $~lib/env/abort @@ -613,7 +613,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 99 i32.const 0 call $~lib/env/abort @@ -629,7 +629,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 102 i32.const 0 call $~lib/env/abort @@ -645,7 +645,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 105 i32.const 0 call $~lib/env/abort @@ -661,7 +661,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 108 i32.const 0 call $~lib/env/abort @@ -681,7 +681,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 113 i32.const 0 call $~lib/env/abort @@ -701,7 +701,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 116 i32.const 0 call $~lib/env/abort @@ -719,7 +719,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 119 i32.const 0 call $~lib/env/abort @@ -737,7 +737,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 122 i32.const 0 call $~lib/env/abort @@ -753,7 +753,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 125 i32.const 0 call $~lib/env/abort @@ -769,7 +769,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 128 i32.const 0 call $~lib/env/abort @@ -785,7 +785,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 131 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/static-this.optimized.wat b/tests/compiler/static-this.optimized.wat index 77dcc8da54..2fa32220a5 100644 --- a/tests/compiler/static-this.optimized.wat +++ b/tests/compiler/static-this.optimized.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0e\00\00\00s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\1c\00\00\00s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $static-this/Foo.bar (mut i32) (i32.const 42)) @@ -16,7 +16,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 8 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/static-this.untouched.wat b/tests/compiler/static-this.untouched.wat index 8ec8c05601..6d01a76079 100644 --- a/tests/compiler/static-this.untouched.wat +++ b/tests/compiler/static-this.untouched.wat @@ -4,11 +4,11 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0e\00\00\00s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\1c\00\00\00s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $static-this/Foo.bar (mut i32) (i32.const 42)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -22,7 +22,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 8 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/std/allocator_arena.optimized.wat b/tests/compiler/std/allocator_arena.optimized.wat index ef404b08fd..c6cd247c22 100644 --- a/tests/compiler/std/allocator_arena.optimized.wat +++ b/tests/compiler/std/allocator_arena.optimized.wat @@ -1,13 +1,12 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\16\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00,\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -18,7 +17,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -68,200 +67,200 @@ global.set $~lib/allocator/arena/offset local.get $0 ) - (func $~lib/internal/memory/memset (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.fill (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) - local.get $0 - i32.const 18 - i32.store8 - local.get $0 - i32.const 42 - i32.add - local.tee $1 - i32.const 1 - i32.sub - i32.const 18 - i32.store8 - local.get $0 - i32.const 1 - i32.add - i32.const 18 - i32.store8 - local.get $0 - i32.const 2 - i32.add - i32.const 18 - i32.store8 - local.get $1 - i32.const 2 - i32.sub - i32.const 18 - i32.store8 - local.get $1 - i32.const 3 - i32.sub - i32.const 18 - i32.store8 - local.get $0 - i32.const 3 - i32.add - i32.const 18 - i32.store8 - local.get $1 - i32.const 4 - i32.sub - i32.const 18 - i32.store8 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $1 - local.get $0 - i32.add - local.tee $0 - i32.const 303174162 - i32.store - i32.const 42 - local.get $1 - i32.sub - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.add - i32.const 4 - i32.sub - i32.const 303174162 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - i32.const 303174162 - i32.store - local.get $0 - i32.const 8 - i32.add - i32.const 303174162 - i32.store - local.get $0 - local.get $2 - i32.add - local.tee $1 - i32.const 12 - i32.sub - i32.const 303174162 - i32.store - local.get $1 - i32.const 8 - i32.sub - i32.const 303174162 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - i32.const 303174162 - i32.store - local.get $0 - i32.const 16 - i32.add - i32.const 303174162 - i32.store - local.get $0 - i32.const 20 - i32.add - i32.const 303174162 - i32.store - local.get $0 - i32.const 24 - i32.add - i32.const 303174162 - i32.store - local.get $0 - local.get $2 - i32.add - local.tee $1 - i32.const 28 - i32.sub - i32.const 303174162 - i32.store - local.get $1 - i32.const 24 - i32.sub - i32.const 303174162 - i32.store - local.get $1 - i32.const 20 - i32.sub - i32.const 303174162 - i32.store - local.get $1 - i32.const 16 - i32.sub - i32.const 303174162 - i32.store - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $1 - local.get $0 - i32.add - local.set $0 - local.get $2 - local.get $1 - i32.sub - local.set $2 - loop $continue|0 + block $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 18 + i32.store8 + local.get $0 + i32.const 42 + i32.add + local.tee $1 + i32.const 1 + i32.sub + i32.const 18 + i32.store8 + local.get $0 + i32.const 1 + i32.add + i32.const 18 + i32.store8 + local.get $0 + i32.const 2 + i32.add + i32.const 18 + i32.store8 + local.get $1 + i32.const 2 + i32.sub + i32.const 18 + i32.store8 + local.get $1 + i32.const 3 + i32.sub + i32.const 18 + i32.store8 + local.get $0 + i32.const 3 + i32.add + i32.const 18 + i32.store8 + local.get $1 + i32.const 4 + i32.sub + i32.const 18 + i32.store8 + i32.const 42 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $1 + i32.sub + local.set $2 + local.get $0 + local.get $1 + i32.add + local.tee $0 + i32.const 303174162 + i32.store local.get $2 - i32.const 32 - i32.ge_u - if - local.get $0 - i64.const 1302123111085380114 - i64.store - local.get $0 - i32.const 8 - i32.add - i64.const 1302123111085380114 - i64.store - local.get $0 - i32.const 16 - i32.add - i64.const 1302123111085380114 - i64.store - local.get $0 - i32.const 24 - i32.add - i64.const 1302123111085380114 - i64.store + i32.const -4 + i32.and + local.tee $2 + local.get $0 + i32.add + i32.const 4 + i32.sub + i32.const 303174162 + i32.store + local.get $2 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 4 + i32.add + i32.const 303174162 + i32.store + local.get $0 + i32.const 8 + i32.add + i32.const 303174162 + i32.store + local.get $0 + local.get $2 + i32.add + local.tee $1 + i32.const 12 + i32.sub + i32.const 303174162 + i32.store + local.get $1 + i32.const 8 + i32.sub + i32.const 303174162 + i32.store + local.get $2 + i32.const 24 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 12 + i32.add + i32.const 303174162 + i32.store + local.get $0 + i32.const 16 + i32.add + i32.const 303174162 + i32.store + local.get $0 + i32.const 20 + i32.add + i32.const 303174162 + i32.store + local.get $0 + i32.const 24 + i32.add + i32.const 303174162 + i32.store + local.get $0 + local.get $2 + i32.add + local.tee $1 + i32.const 28 + i32.sub + i32.const 303174162 + i32.store + local.get $1 + i32.const 24 + i32.sub + i32.const 303174162 + i32.store + local.get $1 + i32.const 20 + i32.sub + i32.const 303174162 + i32.store + local.get $1 + i32.const 16 + i32.sub + i32.const 303174162 + i32.store + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $1 + local.get $0 + i32.add + local.set $0 + local.get $2 + local.get $1 + i32.sub + local.set $2 + loop $continue|0 local.get $2 i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $continue|0 + i32.ge_u + if + local.get $0 + i64.const 1302123111085380114 + i64.store + local.get $0 + i32.const 8 + i32.add + i64.const 1302123111085380114 + i64.store + local.get $0 + i32.const 16 + i32.add + i64.const 1302123111085380114 + i64.store + local.get $0 + i32.const 24 + i32.add + i64.const 1302123111085380114 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $continue|0 + end end end ) - (func $~lib/internal/memory/memcpy (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/util/memory/memcpy (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1111,65 +1110,107 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.copy (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) i32.const 42 local.set $2 - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - i32.const 42 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else + block $~lib/util/memory/memmove|inlined.0 local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $1 i32.const 42 i32.add - local.get $1 - i32.le_u - end - if local.get $0 - local.get $1 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and + i32.le_u + local.tee $3 + if (result i32) + local.get $3 + else + local.get $0 + i32.const 42 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end local.get $0 - i32.const 7 - i32.and - i32.eq + local.get $1 + i32.lt_u if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and if - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + br $continue|0 end + end + loop $continue|1 local.get $2 - i32.const 1 - i32.sub - local.set $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if local.get $0 local.tee $4 i32.const 1 @@ -1184,100 +1225,71 @@ local.get $3 i32.load8_u i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store local.get $2 - i32.const 8 + i32.const 1 i32.sub local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 + br $continue|2 end end - end - loop $continue|2 - local.get $2 + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if + loop $continue|3 + local.get $0 local.get $2 - i32.eqz + i32.add + i32.const 7 + i32.and if - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 end + end + loop $continue|4 local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|3 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end end end - loop $continue|4 + loop $continue|5 local.get $2 - i32.const 8 - i32.ge_u if local.get $2 - i32.const 8 + i32.const 1 i32.sub local.tee $2 local.get $0 @@ -1285,106 +1297,40 @@ local.get $1 local.get $2 i32.add - i64.load - i64.store - br $continue|4 + i32.load8_u + i32.store8 + br $continue|5 end end end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end end ) - (func $~lib/internal/memory/memcmp (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/allocator_arena (; 5 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 42 - local.set $2 - local.get $0 - local.get $1 - i32.eq - if - i32.const 0 - return - end - loop $continue|0 - local.get $2 - i32.const 0 - i32.ne - local.tee $3 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.eq - else - local.get $3 - end - if - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $continue|0 - end - end - local.get $2 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.sub - else - i32.const 0 - end - ) - (func $start:std/allocator_arena (; 6 ;) (type $FUNCSIG$v) - i32.const 56 + i32.const 64 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/allocator/arena/__memory_allocate + call $~lib/memory/memory.allocate global.set $std/allocator_arena/ptr1 - call $~lib/allocator/arena/__memory_allocate + call $~lib/memory/memory.allocate global.set $std/allocator_arena/ptr2 global.get $std/allocator_arena/ptr1 global.get $std/allocator_arena/ptr2 i32.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 7 i32.const 0 call $~lib/env/abort unreachable end global.get $std/allocator_arena/ptr1 - call $~lib/internal/memory/memset + call $~lib/memory/memory.fill i32.const 0 global.set $std/allocator_arena/i loop $repeat|0 @@ -1400,7 +1346,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 12 i32.const 27 call $~lib/env/abort @@ -1417,7 +1363,7 @@ end global.get $std/allocator_arena/ptr2 global.get $std/allocator_arena/ptr1 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy i32.const 0 global.set $std/allocator_arena/i loop $repeat|1 @@ -1433,7 +1379,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 16 i32.const 27 call $~lib/env/abort @@ -1448,12 +1394,61 @@ unreachable end end - global.get $std/allocator_arena/ptr1 - global.get $std/allocator_arena/ptr2 - call $~lib/internal/memory/memcmp + block $~lib/util/memory/memcmp|inlined.0 (result i32) + i32.const 42 + local.set $0 + i32.const 0 + global.get $std/allocator_arena/ptr1 + local.tee $1 + global.get $std/allocator_arena/ptr2 + local.tee $2 + i32.eq + br_if $~lib/util/memory/memcmp|inlined.0 + drop + loop $continue|2 + local.get $0 + i32.const 0 + i32.ne + local.tee $3 + if (result i32) + local.get $1 + i32.load8_u + local.get $2 + i32.load8_u + i32.eq + else + local.get $3 + end + if + local.get $0 + i32.const 1 + i32.sub + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $continue|2 + end + end + local.get $0 + if (result i32) + local.get $1 + i32.load8_u + local.get $2 + i32.load8_u + i32.sub + else + i32.const 0 + end + end if i32.const 0 - i32.const 8 + i32.const 16 i32.const 18 i32.const 0 call $~lib/env/abort @@ -1461,24 +1456,24 @@ end global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/allocator/arena/__memory_allocate + call $~lib/memory/memory.allocate global.set $std/allocator_arena/ptr1 global.get $std/allocator_arena/ptr1 - i32.const 56 + i32.const 64 i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 25 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 7 ;) (type $FUNCSIG$v) + (func $start (; 6 ;) (type $FUNCSIG$v) call $start:std/allocator_arena ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 7 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/allocator_arena.untouched.wat b/tests/compiler/std/allocator_arena.untouched.wat index 7b16588c60..293188e421 100644 --- a/tests/compiler/std/allocator_arena.untouched.wat +++ b/tests/compiler/std/allocator_arena.untouched.wat @@ -1,371 +1,366 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\16\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00,\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $std/allocator_arena/size i32 (i32.const 42)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $std/allocator_arena/size i32 (i32.const 42)) (global $std/allocator_arena/ptr1 (mut i32) (i32.const 0)) (global $std/allocator_arena/ptr2 (mut i32) (i32.const 0)) (global $std/allocator_arena/i (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 60)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 + return ) - (func $~lib/internal/memory/memset (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 1 + i32.add + local.get $1 + i32.store8 + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $4 + local.get $0 + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 12 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 24 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 20 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.get $4 + i32.store + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $4 + i64.extend_i32_u + local.get $4 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $5 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $5 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $5 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + end + br $continue|0 end - br $continue|0 end end end ) - (func $~lib/internal/memory/memcpy (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1566,314 +1561,267 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else + block $~lib/util/memory/memmove|inlined.0 local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $1 local.get $2 i32.add - local.get $1 + local.get $0 i32.le_u - end - if + local.tee $3 + if (result i32) + local.get $3 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end local.get $0 local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq + i32.lt_u if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 i32.const 1 - i32.add - local.set $1 - local.get $3 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + end + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + end + i32.load8_u + i32.store8 end - i32.load8_u - i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 + br $continue|0 end - br $continue|1 end end - end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - end - i32.load8_u - i32.store8 + block $break|1 + loop $continue|1 local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|2 - end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 end - br $continue|3 end end end - block $break|4 - loop $continue|4 + block $break|2 + loop $continue|2 local.get $2 - i32.const 8 - i32.ge_u if block + block (result i32) + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + end + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + end + i32.load8_u + i32.store8 local.get $2 - i32.const 8 + i32.const 1 i32.sub local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store end - br $continue|4 + br $continue|2 end end end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end end end - end - end - ) - (func $~lib/internal/memory/memcmp (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 0 - return - end - block $break|0 - loop $continue|0 - local.get $2 - i32.const 0 - i32.ne - local.tee $3 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.eq - else - local.get $3 - end - if - block + block $break|5 + loop $continue|5 local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end end - br $continue|0 end end end - local.get $2 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.sub - else - i32.const 0 - end ) - (func $~lib/allocator/arena/__memory_free (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - nop + (func $~lib/memory/memory.free (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + local.set $1 ) - (func $~lib/allocator/arena/__memory_reset (; 8 ;) (type $FUNCSIG$v) + (func $~lib/memory/memory.reset (; 6 ;) (type $FUNCSIG$v) global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $start:std/allocator_arena (; 9 ;) (type $FUNCSIG$v) + (func $start:std/allocator_arena (; 7 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) - call $start:~lib/allocator/arena - block $~lib/memory/memory.allocate|inlined.0 (result i32) - global.get $std/allocator_arena/size - local.set $0 - local.get $0 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + global.get $std/allocator_arena/size + call $~lib/memory/memory.allocate global.set $std/allocator_arena/ptr1 - block $~lib/memory/memory.allocate|inlined.1 (result i32) - global.get $std/allocator_arena/size - local.set $0 - local.get $0 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 - end + global.get $std/allocator_arena/size + call $~lib/memory/memory.allocate global.set $std/allocator_arena/ptr2 global.get $std/allocator_arena/ptr1 global.get $std/allocator_arena/ptr2 @@ -1881,24 +1829,16 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 7 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/memory/memory.fill|inlined.0 - global.get $std/allocator_arena/ptr1 - local.set $0 - i32.const 18 - local.set $1 - global.get $std/allocator_arena/size - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memset - end + global.get $std/allocator_arena/ptr1 + i32.const 18 + global.get $std/allocator_arena/size + call $~lib/memory/memory.fill block $break|0 i32.const 0 global.set $std/allocator_arena/i @@ -1917,7 +1857,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 12 i32.const 27 call $~lib/env/abort @@ -1932,18 +1872,10 @@ end unreachable end - block $~lib/memory/memory.copy|inlined.0 - global.get $std/allocator_arena/ptr2 - local.set $2 - global.get $std/allocator_arena/ptr1 - local.set $1 - global.get $std/allocator_arena/size - local.set $0 - local.get $2 - local.get $1 - local.get $0 - call $~lib/internal/memory/memmove - end + global.get $std/allocator_arena/ptr2 + global.get $std/allocator_arena/ptr1 + global.get $std/allocator_arena/size + call $~lib/memory/memory.copy block $break|1 i32.const 0 global.set $std/allocator_arena/i @@ -1962,7 +1894,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 16 i32.const 27 call $~lib/env/abort @@ -1984,47 +1916,84 @@ local.set $1 global.get $std/allocator_arena/size local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcmp + block $~lib/util/memory/memcmp|inlined.0 (result i32) + local.get $0 + local.set $3 + local.get $1 + local.set $4 + local.get $2 + local.set $5 + local.get $3 + local.get $4 + i32.eq + if + i32.const 0 + br $~lib/util/memory/memcmp|inlined.0 + end + block $break|2 + loop $continue|2 + local.get $5 + i32.const 0 + i32.ne + local.tee $6 + if (result i32) + local.get $3 + i32.load8_u + local.get $4 + i32.load8_u + i32.eq + else + local.get $6 + end + if + block + local.get $5 + i32.const 1 + i32.sub + local.set $5 + local.get $3 + i32.const 1 + i32.add + local.set $3 + local.get $4 + i32.const 1 + i32.add + local.set $4 + end + br $continue|2 + end + end + end + local.get $5 + if (result i32) + local.get $3 + i32.load8_u + local.get $4 + i32.load8_u + i32.sub + else + i32.const 0 + end + end end i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 18 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/memory/memory.free|inlined.0 - global.get $std/allocator_arena/ptr1 - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 - end - block $~lib/memory/memory.free|inlined.1 - global.get $std/allocator_arena/ptr2 - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.1 - end - block $~lib/memory/memory.reset|inlined.0 - call $~lib/allocator/arena/__memory_reset - br $~lib/memory/memory.reset|inlined.0 - end - block $~lib/memory/memory.allocate|inlined.2 (result i32) - global.get $std/allocator_arena/size - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.2 - end + global.get $std/allocator_arena/ptr1 + call $~lib/memory/memory.free + global.get $std/allocator_arena/ptr2 + call $~lib/memory/memory.free + call $~lib/memory/memory.reset + global.get $std/allocator_arena/size + call $~lib/memory/memory.allocate global.set $std/allocator_arena/ptr1 global.get $std/allocator_arena/ptr1 global.get $~lib/memory/HEAP_BASE @@ -2038,16 +2007,16 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 25 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 10 ;) (type $FUNCSIG$v) + (func $start (; 8 ;) (type $FUNCSIG$v) call $start:std/allocator_arena ) - (func $null (; 11 ;) (type $FUNCSIG$v) + (func $null (; 9 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index cdf7ba4696..7e5b7339f5 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -386,6 +386,7 @@ call $~lib/runtime/doRegister ) (func $~lib/runtime/ArrayBufferView#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) i32.const 3 i32.const 1073741816 local.get $1 @@ -402,6 +403,7 @@ i32.const 3 local.get $1 i32.shl + local.tee $2 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $0 @@ -430,7 +432,7 @@ i32.store offset=4 local.get $0 local.get $1 - i32.const 3 + local.get $2 i32.add i32.store offset=8 local.get $0 @@ -1336,94 +1338,91 @@ (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $3 - local.get $1 local.get $0 - local.tee $2 + local.get $1 i32.eq br_if $~lib/util/memory/memmove|inlined.0 local.get $1 - local.get $3 - i32.add local.get $2 + i32.add + local.get $0 i32.le_u - local.tee $0 + local.tee $3 i32.eqz if + local.get $0 local.get $2 - local.get $3 i32.add local.get $1 i32.le_u - local.set $0 + local.set $3 end - local.get $0 + local.get $3 if - local.get $2 + local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/util/memory/memcpy br $~lib/util/memory/memmove|inlined.0 end - local.get $2 + local.get $0 local.get $1 i32.lt_u if local.get $1 i32.const 7 i32.and - local.get $2 + local.get $0 i32.const 7 i32.and i32.eq if loop $continue|0 - local.get $2 + local.get $0 i32.const 7 i32.and if - local.get $3 + local.get $2 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $2 i32.const 1 i32.sub - local.set $3 - local.get $2 + local.set $2 + local.get $0 local.tee $4 i32.const 1 i32.add - local.set $2 + local.set $0 local.get $1 - local.tee $0 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $4 - local.get $0 + local.get $3 i32.load8_u i32.store8 br $continue|0 end end loop $continue|1 - local.get $3 + local.get $2 i32.const 8 i32.ge_u if - local.get $2 + local.get $0 local.get $1 i64.load i64.store - local.get $3 + local.get $2 i32.const 8 i32.sub - local.set $3 - local.get $2 + local.set $2 + local.get $0 i32.const 8 i32.add - local.set $2 + local.set $0 local.get $1 i32.const 8 i32.add @@ -1433,26 +1432,26 @@ end end loop $continue|2 - local.get $3 + local.get $2 if - local.get $2 + local.get $0 local.tee $4 i32.const 1 i32.add - local.set $2 + local.set $0 local.get $1 - local.tee $0 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $4 - local.get $0 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $2 i32.const 1 i32.sub - local.set $3 + local.set $2 br $continue|2 end end @@ -1460,29 +1459,29 @@ local.get $1 i32.const 7 i32.and - local.get $2 + local.get $0 i32.const 7 i32.and i32.eq if loop $continue|3 + local.get $0 local.get $2 - local.get $3 i32.add i32.const 7 i32.and if - local.get $3 + local.get $2 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $2 i32.const 1 i32.sub - local.tee $3 - local.get $2 + local.tee $2 + local.get $0 i32.add local.get $1 - local.get $3 + local.get $2 i32.add i32.load8_u i32.store8 @@ -1490,18 +1489,18 @@ end end loop $continue|4 - local.get $3 + local.get $2 i32.const 8 i32.ge_u if - local.get $3 + local.get $2 i32.const 8 i32.sub - local.tee $3 - local.get $2 + local.tee $2 + local.get $0 i32.add local.get $1 - local.get $3 + local.get $2 i32.add i64.load i64.store @@ -1510,16 +1509,16 @@ end end loop $continue|5 - local.get $3 + local.get $2 if - local.get $3 + local.get $2 i32.const 1 i32.sub - local.tee $3 - local.get $2 + local.tee $2 + local.get $0 i32.add local.get $1 - local.get $3 + local.get $2 i32.add i32.load8_u i32.store8 diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 5dd1c8703a..4a95220fe2 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -48,7 +48,7 @@ local.get $0 i32.load offset=12 ) - (func $~lib/runtime/adjustToBlock (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -148,7 +148,7 @@ (func $~lib/runtime/doAllocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/adjustToBlock + call $~lib/runtime/ADJUSTOBLOCK call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -164,261 +164,252 @@ (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i64) + (local $5 i64) block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $3 - local.get $1 - local.set $4 local.get $2 - local.set $5 - local.get $5 i32.eqz if br $~lib/util/memory/memset|inlined.0 end - local.get $3 - local.get $4 + local.get $0 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 1 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 2 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 1 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 + local.get $0 i32.const 2 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 2 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 3 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 6 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 3 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 4 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 8 i32.le_u if br $~lib/util/memory/memset|inlined.0 end i32.const 0 - local.get $3 + local.get $0 i32.sub i32.const 3 i32.and - local.set $6 + local.set $3 + local.get $0 local.get $3 - local.get $6 i32.add - local.set $3 - local.get $5 - local.get $6 + local.set $0 + local.get $2 + local.get $3 i32.sub - local.set $5 - local.get $5 + local.set $2 + local.get $2 i32.const -4 i32.and - local.set $5 + local.set $2 i32.const -1 i32.const 255 i32.div_u - local.get $4 + local.get $1 i32.const 255 i32.and i32.mul - local.set $7 - local.get $3 - local.get $7 + local.set $4 + local.get $0 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 4 i32.sub - local.get $7 + local.get $4 i32.store - local.get $5 + local.get $2 i32.const 8 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 4 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 8 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 12 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 8 i32.sub - local.get $7 + local.get $4 i32.store - local.get $5 + local.get $2 i32.const 24 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 12 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 16 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 20 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 24 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 28 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 24 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 20 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 16 i32.sub - local.get $7 + local.get $4 i32.store i32.const 24 - local.get $3 + local.get $0 i32.const 4 i32.and i32.add - local.set $6 + local.set $3 + local.get $0 local.get $3 - local.get $6 i32.add - local.set $3 - local.get $5 - local.get $6 + local.set $0 + local.get $2 + local.get $3 i32.sub - local.set $5 - local.get $7 + local.set $2 + local.get $4 i64.extend_i32_u - local.get $7 + local.get $4 i64.extend_i32_u i64.const 32 i64.shl i64.or - local.set $8 + local.set $5 block $break|0 loop $continue|0 - local.get $5 + local.get $2 i32.const 32 i32.ge_u if block - local.get $3 - local.get $8 + local.get $0 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 8 i32.add - local.get $8 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 16 i32.add - local.get $8 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 24 i32.add - local.get $8 - i64.store local.get $5 + i64.store + local.get $2 i32.const 32 i32.sub - local.set $5 - local.get $3 + local.set $2 + local.get $0 i32.const 32 i32.add - local.set $3 + local.set $0 end br $continue|0 end @@ -522,6 +513,7 @@ local.get $1 local.get $2 i32.shl + local.tee $1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 block (result i32) @@ -1795,87 +1787,78 @@ ) (func $~lib/memory/memory.copy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 - local.set $3 local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $3 - local.get $4 i32.eq if br $~lib/util/memory/memmove|inlined.0 end - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add - local.get $3 + local.get $0 i32.le_u - local.tee $6 + local.tee $3 if (result i32) - local.get $6 - else local.get $3 - local.get $5 + else + local.get $0 + local.get $2 i32.add - local.get $4 + local.get $1 i32.le_u end if - local.get $3 - local.get $4 - local.get $5 + local.get $0 + local.get $1 + local.get $2 call $~lib/util/memory/memcpy br $~lib/util/memory/memmove|inlined.0 end - local.get $3 - local.get $4 + local.get $0 + local.get $1 i32.lt_u if - local.get $4 + local.get $1 i32.const 7 i32.and - local.get $3 + local.get $0 i32.const 7 i32.and i32.eq if block $break|0 loop $continue|0 - local.get $3 + local.get $0 i32.const 7 i32.and if block - local.get $5 + local.get $2 i32.eqz if br $~lib/util/memory/memmove|inlined.0 end - local.get $5 + local.get $2 i32.const 1 i32.sub - local.set $5 + local.set $2 block (result i32) - local.get $3 - local.tee $6 + local.get $0 + local.tee $3 i32.const 1 i32.add - local.set $3 - local.get $6 + local.set $0 + local.get $3 end block (result i32) - local.get $4 - local.tee $6 + local.get $1 + local.tee $3 i32.const 1 i32.add - local.set $4 - local.get $6 + local.set $1 + local.get $3 end i32.load8_u i32.store8 @@ -1886,27 +1869,27 @@ end block $break|1 loop $continue|1 - local.get $5 + local.get $2 i32.const 8 i32.ge_u if block - local.get $3 - local.get $4 + local.get $0 + local.get $1 i64.load i64.store - local.get $5 + local.get $2 i32.const 8 i32.sub - local.set $5 - local.get $3 + local.set $2 + local.get $0 i32.const 8 i32.add - local.set $3 - local.get $4 + local.set $0 + local.get $1 i32.const 8 i32.add - local.set $4 + local.set $1 end br $continue|1 end @@ -1915,67 +1898,67 @@ end block $break|2 loop $continue|2 - local.get $5 + local.get $2 if block block (result i32) - local.get $3 - local.tee $6 + local.get $0 + local.tee $3 i32.const 1 i32.add - local.set $3 - local.get $6 + local.set $0 + local.get $3 end block (result i32) - local.get $4 - local.tee $6 + local.get $1 + local.tee $3 i32.const 1 i32.add - local.set $4 - local.get $6 + local.set $1 + local.get $3 end i32.load8_u i32.store8 - local.get $5 + local.get $2 i32.const 1 i32.sub - local.set $5 + local.set $2 end br $continue|2 end end end else - local.get $4 + local.get $1 i32.const 7 i32.and - local.get $3 + local.get $0 i32.const 7 i32.and i32.eq if block $break|3 loop $continue|3 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 7 i32.and if block - local.get $5 + local.get $2 i32.eqz if br $~lib/util/memory/memmove|inlined.0 end - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $5 + local.tee $2 i32.add - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 @@ -1986,20 +1969,20 @@ end block $break|4 loop $continue|4 - local.get $5 + local.get $2 i32.const 8 i32.ge_u if block - local.get $5 + local.get $2 i32.const 8 i32.sub - local.set $5 - local.get $3 - local.get $5 + local.set $2 + local.get $0 + local.get $2 i32.add - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add i64.load i64.store @@ -2011,16 +1994,16 @@ end block $break|5 loop $continue|5 - local.get $5 + local.get $2 if - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $5 + local.tee $2 i32.add - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 @@ -2054,10 +2037,10 @@ i32.lt_u if local.get $1 - call $~lib/runtime/adjustToBlock + call $~lib/runtime/ADJUSTOBLOCK local.set $4 local.get $3 - call $~lib/runtime/adjustToBlock + call $~lib/runtime/ADJUSTOBLOCK i32.const 0 local.get $0 global.get $~lib/memory/HEAP_BASE diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 1d2777c37e..92c02146d3 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -1,35 +1,50 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$diiiiiid (func (param i32 i32 i32 i32 i32 i32 f64) (result f64))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$d (func (result f64))) - (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$ij (func (param i64) (result i32))) (import "Date" "UTC" (func $~lib/bindings/Date/UTC (param i32 i32 i32 i32 i32 i32 f64) (result f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "Date" "now" (func $~lib/bindings/Date/now (result f64))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\16\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s") + (data (i32.const 40) "\01\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) (elem (i32.const 0) $null) + (global $std/date/creationTime (mut i64) (i64.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $std/date/creationTime (mut i64) (i64.const 0)) (global $std/date/date (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end global.get $~lib/allocator/arena/offset - local.tee $0 - i32.const 15 + local.tee $1 + local.get $0 + i32.const 1 + local.get $0 + i32.const 1 + i32.gt_u + select + i32.add + i32.const 7 i32.add i32.const -8 i32.and - local.tee $1 + local.tee $0 current_memory local.tee $2 i32.const 16 @@ -37,8 +52,8 @@ i32.gt_u if local.get $2 - local.get $1 local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -64,17 +79,66 @@ end end end - local.get $1 + local.get $0 global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 80 + i32.le_u + if + i32.const 0 + i32.const 48 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end local.get $0 + i32.const 8 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 48 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end ) - (func $start:std/date (; 4 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i64) - i32.const 40 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset + (func $~lib/date/Date#constructor (; 5 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (local $1 i32) + i32.const 16 + call $~lib/memory/memory.allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + i32.const 8 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add + local.tee $1 + call $~lib/runtime/assertUnregistered + local.get $1 + i32.const 8 + i32.sub + i32.const 2 + i32.store + local.get $1 + i64.const 0 + i64.store + local.get $1 + local.get $0 + i64.store + local.get $1 + ) + (func $start:std/date (; 6 ;) (type $FUNCSIG$v) i32.const 1970 i32.const 0 i32.const 1 @@ -88,7 +152,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3 i32.const 0 call $~lib/env/abort @@ -107,7 +171,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 4 i32.const 0 call $~lib/env/abort @@ -128,7 +192,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 7 i32.const 0 call $~lib/env/abort @@ -140,22 +204,18 @@ i64.le_s if i32.const 0 - i32.const 8 + i32.const 16 i32.const 9 i32.const 0 call $~lib/env/abort unreachable end + i32.const 80 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset global.get $std/date/creationTime - local.set $1 - call $~lib/allocator/arena/__memory_allocate - local.tee $0 - i64.const 0 - i64.store - local.get $0 - local.get $1 - i64.store - local.get $0 + call $~lib/date/Date#constructor global.set $std/date/date global.get $std/date/creationTime global.get $std/date/date @@ -163,36 +223,36 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 12 i32.const 0 call $~lib/env/abort unreachable end global.get $std/date/date - local.tee $0 global.get $std/date/creationTime i64.const 1 i64.add - local.tee $1 i64.store - local.get $0 + global.get $std/date/date i64.load - local.get $1 + global.get $std/date/creationTime + i64.const 1 + i64.add i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 14 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 5 ;) (type $FUNCSIG$v) + (func $start (; 7 ;) (type $FUNCSIG$v) call $start:std/date ) - (func $null (; 6 ;) (type $FUNCSIG$v) + (func $null (; 8 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 01a72ad928..a68b133fd8 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -1,130 +1,204 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$diiiiiid (func (param i32 i32 i32 i32 i32 i32 f64) (result f64))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$d (func (result f64))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$ji (func (param i32) (result i64))) (type $FUNCSIG$jij (func (param i32 i64) (result i64))) + (type $FUNCSIG$v (func)) (import "Date" "UTC" (func $~lib/bindings/Date/UTC (param i32 i32 i32 i32 i32 i32 f64) (result f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "Date" "now" (func $~lib/bindings/Date/now (result f64))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\16\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s\00") + (data (i32.const 40) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $std/date/creationTime (mut i64) (i64.const 0)) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $std/date/creationTime (mut i64) (i64.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/date/date (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 36)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 80)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 3 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/runtime/ADJUSTOBLOCK (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset + return + ) + (func $~lib/runtime/doAllocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/ADJUSTOBLOCK + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add ) - (func $~lib/memory/memory.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate - return + call $~lib/runtime/doAllocate ) - (func $~lib/date/Date#constructor (; 6 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/runtime/assertUnregistered (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 48 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 48 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/date/Date#constructor (; 9 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (local $2 i32) block (result i32) local.get $0 i32.eqz if - i32.const 8 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 8 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 2 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -136,17 +210,17 @@ i64.store local.get $0 ) - (func $~lib/date/Date#getTime (; 7 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) + (func $~lib/date/Date#getTime (; 10 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) local.get $0 i64.load ) - (func $~lib/date/Date#setTime (; 8 ;) (type $FUNCSIG$jij) (param $0 i32) (param $1 i64) (result i64) + (func $~lib/date/Date#setTime (; 11 ;) (type $FUNCSIG$jij) (param $0 i32) (param $1 i64) (result i64) local.get $0 local.get $1 i64.store local.get $1 ) - (func $start:std/date (; 9 ;) (type $FUNCSIG$v) + (func $start:std/date (; 12 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -154,7 +228,6 @@ (local $4 i32) (local $5 i32) (local $6 i64) - call $start:~lib/allocator/arena block $~lib/date/Date.UTC|inlined.0 (result i64) i32.const 1970 local.set $0 @@ -186,7 +259,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3 i32.const 0 call $~lib/env/abort @@ -223,7 +296,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 4 i32.const 0 call $~lib/env/abort @@ -262,7 +335,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 7 i32.const 0 call $~lib/env/abort @@ -277,12 +350,22 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 9 i32.const 0 call $~lib/env/abort unreachable end + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset i32.const 0 global.get $std/date/creationTime call $~lib/date/Date#constructor @@ -294,7 +377,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 12 i32.const 0 call $~lib/env/abort @@ -315,16 +398,16 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 14 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 10 ;) (type $FUNCSIG$v) + (func $start (; 13 ;) (type $FUNCSIG$v) call $start:std/date ) - (func $null (; 11 ;) (type $FUNCSIG$v) + (func $null (; 14 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/hash.optimized.wat b/tests/compiler/std/hash.optimized.wat index 9e769d4232..c544cb7b59 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -3,50 +3,60 @@ (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 16) "\01\00\00\00a") - (data (i32.const 24) "\02\00\00\00a\00b") - (data (i32.const 32) "\03\00\00\00a\00b\00c") + (data (i32.const 8) "\01") + (data (i32.const 16) "\01\00\00\00\02\00\00\00a") + (data (i32.const 32) "\01\00\00\00\04\00\00\00a\00b") + (data (i32.const 48) "\01\00\00\00\06\00\00\00a\00b\00c") (table $0 1 funcref) (elem (i32.const 0) $null) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/internal/hash/hashStr (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hashStr (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const -2128831035 - local.set $2 + local.set $1 local.get $0 - i32.load - i32.const 1 - i32.shl - local.set $3 - loop $repeat|0 + if block $break|0 - local.get $1 - local.get $3 - i32.ge_u - br_if $break|0 local.get $0 - local.get $1 - i32.add - i32.load8_u offset=4 - local.get $2 - i32.xor - i32.const 16777619 - i32.mul - local.set $2 - local.get $1 + i32.const 8 + i32.sub + i32.load offset=4 i32.const 1 - i32.add - local.set $1 - br $repeat|0 + i32.shr_u + i32.const 1 + i32.shl + local.set $3 + loop $repeat|0 + local.get $2 + local.get $3 + i32.ge_u + br_if $break|0 + local.get $0 + local.get $2 + i32.add + i32.load8_u + local.get $1 + i32.xor + i32.const 16777619 + i32.mul + local.set $1 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + unreachable + end + unreachable end end - local.get $2 + local.get $1 ) - (func $~lib/internal/hash/hash32 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -77,7 +87,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/internal/hash/hash64 (; 2 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 2 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -145,55 +155,55 @@ ) (func $start:std/hash (; 3 ;) (type $FUNCSIG$v) i32.const 0 - call $~lib/internal/hash/hashStr - drop - i32.const 8 - call $~lib/internal/hash/hashStr + call $~lib/util/hash/hashStr drop i32.const 16 - call $~lib/internal/hash/hashStr + call $~lib/util/hash/hashStr drop i32.const 24 - call $~lib/internal/hash/hashStr + call $~lib/util/hash/hashStr + drop + i32.const 40 + call $~lib/util/hash/hashStr drop - i32.const 32 - call $~lib/internal/hash/hashStr + i32.const 56 + call $~lib/util/hash/hashStr drop i32.const 0 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 drop i32.const 1065353216 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 drop i32.const 1066192077 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 drop i32.const 0 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 drop i32.const 2139095040 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 drop i32.const 2143289344 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 drop i64.const 0 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 drop i64.const 4607182418800017408 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 drop i64.const 4607632778762754458 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 drop i64.const 0 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 drop i64.const 9218868437227405312 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 drop i64.const 9221120237041090560 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 drop ) (func $start (; 4 ;) (type $FUNCSIG$v) diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index 16f724a325..a136108cf0 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -3,62 +3,78 @@ (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\00\00\00\00") - (data (i32.const 16) "\01\00\00\00a\00") - (data (i32.const 24) "\02\00\00\00a\00b\00") - (data (i32.const 32) "\03\00\00\00a\00b\00c\00") + (data (i32.const 8) "\01\00\00\00\00\00\00\00") + (data (i32.const 16) "\01\00\00\00\02\00\00\00a\00") + (data (i32.const 32) "\01\00\00\00\04\00\00\00a\00b\00") + (data (i32.const 48) "\01\00\00\00\06\00\00\00a\00b\00c\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) + (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/memory/HEAP_BASE i32 (i32.const 64)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/internal/hash/hashStr (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/hash/hashStr (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const -2128831035 local.set $1 - block $break|0 - block - i32.const 0 - local.set $2 - local.get $0 - i32.load - i32.const 1 - i32.shl - local.set $3 - end - loop $repeat|0 - local.get $2 - local.get $3 - i32.lt_u - i32.eqz - br_if $break|0 - local.get $1 - local.get $0 - local.get $2 - i32.add - i32.load8_u offset=4 - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $repeat|0 + local.get $0 + i32.const 0 + i32.ne + if + block $break|0 + block + i32.const 0 + local.set $2 + local.get $0 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $3 + end + loop $repeat|0 + local.get $2 + local.get $3 + i32.lt_u + i32.eqz + br_if $break|0 + local.get $1 + local.get $0 + local.get $2 + i32.add + i32.load8_u + i32.xor + i32.const 16777619 + i32.mul + local.set $1 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + unreachable + end unreachable end - unreachable end local.get $1 ) - (func $std/hash/check (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/hash/check (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 ) - (func $~lib/internal/hash/hash32 (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -100,7 +116,7 @@ local.set $1 local.get $1 ) - (func $~lib/internal/hash/hash64 (; 3 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 4 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -188,179 +204,179 @@ local.set $3 local.get $3 ) - (func $start:std/hash (; 4 ;) (type $FUNCSIG$v) + (func $start:std/hash (; 5 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) (local $2 f64) - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) i32.const 0 local.set $0 local.get $0 - call $~lib/internal/hash/hashStr - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hashStr + br $~lib/util/hash/HASH|inlined.0 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.1 (result i32) - i32.const 8 + block $~lib/util/hash/HASH|inlined.1 (result i32) + i32.const 16 local.set $0 local.get $0 - call $~lib/internal/hash/hashStr - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hashStr + br $~lib/util/hash/HASH|inlined.1 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.2 (result i32) - i32.const 16 + block $~lib/util/hash/HASH|inlined.2 (result i32) + i32.const 24 local.set $0 local.get $0 - call $~lib/internal/hash/hashStr - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hashStr + br $~lib/util/hash/HASH|inlined.2 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.3 (result i32) - i32.const 24 + block $~lib/util/hash/HASH|inlined.3 (result i32) + i32.const 40 local.set $0 local.get $0 - call $~lib/internal/hash/hashStr - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hashStr + br $~lib/util/hash/HASH|inlined.3 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.4 (result i32) - i32.const 32 + block $~lib/util/hash/HASH|inlined.4 (result i32) + i32.const 56 local.set $0 local.get $0 - call $~lib/internal/hash/hashStr - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hashStr + br $~lib/util/hash/HASH|inlined.4 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) f32.const 0 local.set $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) f32.const 1 local.set $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) f32.const 1.100000023841858 local.set $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) f32.const 0 local.set $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) f32.const inf local.set $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.4 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.5 (result i32) + block $~lib/util/hash/HASH|inlined.5 (result i32) f32.const nan:0x400000 local.set $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.5 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.5 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) f64.const 0 local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) f64.const 1 local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) f64.const 1.1 local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.2 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) f64.const 0 local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.3 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) f64.const inf local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.4 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.5 (result i32) + block $~lib/util/hash/HASH|inlined.5 (result i32) f64.const nan:0x8000000000000 local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.5 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.5 end call $std/hash/check drop ) - (func $start (; 5 ;) (type $FUNCSIG$v) + (func $start (; 6 ;) (type $FUNCSIG$v) call $start:std/hash ) - (func $null (; 6 ;) (type $FUNCSIG$v) + (func $null (; 7 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 0d10a766d5..0496a5f268 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -60,10 +60,10 @@ (import "Math" "tanh" (func $~lib/bindings/Math/tanh (param f64) (result f64))) (import "Math" "trunc" (func $~lib/bindings/Math/trunc (param f64) (result f64))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s") - (data (i32.const 40) " \00\00\00\00\00\00\00)\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe") - (data (i32.const 104) "(\00\00\00\04") - (data (i32.const 112) "\0c\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\16\00\00\00s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s") + (data (i32.const 40) "\02\00\00\00 \00\00\00)\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe") + (data (i32.const 80) "\03\00\00\00\10\00\00\000\00\00\000\00\00\00P\00\00\00\04") + (data (i32.const 104) "\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/math/rempio2f_y (mut f64) (f64.const 0)) @@ -3488,8 +3488,9 @@ (local $6 i32) (local $7 i32) (local $8 i64) - (local $9 i64) + (local $9 i32) (local $10 i32) + (local $11 i64) local.get $0 i32.reinterpret_f32 local.tee $3 @@ -3532,10 +3533,10 @@ if local.get $0 f64.promote_f32 - local.tee $1 f64.const 3.141592653589793 f64.add - local.get $1 + local.get $0 + f64.promote_f32 f64.const 3.141592653589793 f64.sub local.get $7 @@ -3654,10 +3655,10 @@ if local.get $0 f64.promote_f32 - local.tee $1 f64.const 6.283185307179586 f64.add - local.get $1 + local.get $0 + f64.promote_f32 f64.const 6.283185307179586 f64.sub local.get $7 @@ -3781,8 +3782,6 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.0 end - i32.const 104 - i32.load local.get $3 i32.const 23 i32.shr_s @@ -3791,19 +3790,18 @@ local.tee $6 i32.const 6 i32.shr_s - local.tee $10 + local.tee $9 i32.const 3 i32.shl + local.tee $10 + i32.const 92 + i32.load i32.add - i64.load offset=8 - local.set $8 - i32.const 104 + i64.load + local.set $11 + i32.const 92 i32.load local.get $10 - i32.const 1 - i32.add - i32.const 3 - i32.shl i32.add i64.load offset=8 local.set $5 @@ -3820,15 +3818,13 @@ i32.sub i64.extend_i32_s i64.shl - i32.const 104 + i32.const 92 i32.load - local.get $10 - i32.const 2 - i32.add + local.get $9 i32.const 3 i32.shl i32.add - i64.load offset=8 + i64.load offset=16 i64.const 96 local.get $6 i64.extend_i32_s @@ -3843,7 +3839,11 @@ i64.sub i64.shr_u end - local.set $9 + local.set $8 + f64.const 8.515303950216386e-20 + local.get $0 + f64.promote_f32 + f64.copysign local.get $5 i64.const 64 local.get $6 @@ -3851,16 +3851,10 @@ local.tee $5 i64.sub i64.shr_u - local.get $8 + local.get $11 local.get $5 i64.shl i64.or - local.set $8 - f64.const 8.515303950216386e-20 - local.get $0 - f64.promote_f32 - f64.copysign - local.get $8 local.get $3 i32.const 8388607 i32.and @@ -3870,7 +3864,7 @@ local.tee $5 i64.mul local.get $5 - local.get $9 + local.get $8 i64.mul i64.const 32 i64.shr_u @@ -3878,7 +3872,7 @@ local.tee $5 i64.const 2 i64.shl - local.tee $9 + local.tee $8 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y @@ -3886,7 +3880,7 @@ local.get $5 i64.const 62 i64.shr_u - local.get $9 + local.get $8 i64.const 63 i64.shr_u i64.add @@ -3962,15 +3956,17 @@ f32.demote_f64 end local.set $0 - local.get $0 - f32.neg - local.get $0 local.get $3 i32.const 1 i32.add i32.const 2 i32.and - select + if + local.get $0 + f32.neg + local.set $0 + end + local.get $0 return end f64.const 1 @@ -8493,7 +8489,7 @@ if i32.const 0 i32.const 112 - i32.const 978 + i32.const 1021 i32.const 4 call $~lib/env/abort unreachable @@ -8559,7 +8555,7 @@ if i32.const 0 i32.const 112 - i32.const 987 + i32.const 1030 i32.const 24 call $~lib/env/abort unreachable @@ -8606,7 +8602,7 @@ if i32.const 0 i32.const 112 - i32.const 2219 + i32.const 2312 i32.const 24 call $~lib/env/abort unreachable @@ -9285,502 +9281,516 @@ (local $6 i32) (local $7 i32) (local $8 i64) - (local $9 i64) + (local $9 i32) (local $10 i32) + (local $11 i64) local.get $0 i32.reinterpret_f32 local.tee $3 i32.const 31 i32.shr_u local.set $7 - block $folding-inner0 + local.get $3 + i32.const 2147483647 + i32.and + local.tee $3 + i32.const 1061752794 + i32.le_u + if local.get $3 - i32.const 2147483647 - i32.and - local.tee $3 - i32.const 1061752794 - i32.le_u + i32.const 964689920 + i32.lt_u if - local.get $3 - i32.const 964689920 - i32.lt_u - if - local.get $0 - return - end local.get $0 - f64.promote_f32 - local.tee $4 - local.get $4 - f64.mul - local.tee $1 - local.get $4 - f64.mul - local.set $2 - br $folding-inner0 + return end + local.get $0 + f64.promote_f32 + local.tee $4 + local.get $4 + f64.mul + local.tee $1 + local.get $4 + f64.mul + local.set $2 + local.get $4 + local.get $2 + f64.const -0.16666666641626524 + local.get $1 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $2 + local.get $1 + local.get $1 + f64.mul + f64.mul + f64.const -1.9839334836096632e-04 + local.get $1 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + return + end + local.get $3 + i32.const 1081824209 + i32.le_u + if local.get $3 - i32.const 1081824209 + i32.const 1075235811 i32.le_u if - local.get $3 - i32.const 1075235811 - i32.le_u - if - local.get $7 - if (result f32) - local.get $0 - f64.promote_f32 - f64.const 1.5707963267948966 - f64.add - local.tee $2 - local.get $2 - f64.mul - local.tee $1 - local.get $1 - f64.mul - local.set $2 - f64.const 1 - local.get $1 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $2 - f64.const 0.04166662332373906 - f64.mul - f64.add - local.get $2 - local.get $1 - f64.mul - f64.const -0.001388676377460993 - local.get $1 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - f32.neg - else - local.get $0 - f64.promote_f32 - f64.const 1.5707963267948966 - f64.sub - local.tee $1 - local.get $1 - f64.mul - local.tee $2 - local.get $2 - f64.mul - local.set $1 - f64.const 1 - local.get $2 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $1 - f64.const 0.04166662332373906 - f64.mul - f64.add - local.get $1 - local.get $2 - f64.mul - f64.const -0.001388676377460993 - local.get $2 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - end - return - end - local.get $0 - f64.promote_f32 - local.tee $1 - f64.const 3.141592653589793 - f64.add - local.get $1 - f64.const 3.141592653589793 - f64.sub local.get $7 - select - f64.neg - local.tee $2 - local.get $2 - f64.mul - local.tee $1 - local.get $2 - f64.mul - local.set $4 - local.get $2 - local.get $4 - f64.const -0.16666666641626524 - local.get $1 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add - local.get $4 - local.get $1 - local.get $1 - f64.mul - f64.mul - f64.const -1.9839334836096632e-04 - local.get $1 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 + if (result f32) + local.get $0 + f64.promote_f32 + f64.const 1.5707963267948966 + f64.add + local.tee $2 + local.get $2 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.set $2 + f64.const 1 + local.get $1 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $2 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $2 + local.get $1 + f64.mul + f64.const -0.001388676377460993 + local.get $1 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + f32.neg + else + local.get $0 + f64.promote_f32 + f64.const 1.5707963267948966 + f64.sub + local.tee $1 + local.get $1 + f64.mul + local.tee $2 + local.get $2 + f64.mul + local.set $1 + f64.const 1 + local.get $2 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $1 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $1 + local.get $2 + f64.mul + f64.const -0.001388676377460993 + local.get $2 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + end return end + local.get $0 + f64.promote_f32 + f64.const 3.141592653589793 + f64.add + local.get $0 + f64.promote_f32 + f64.const 3.141592653589793 + f64.sub + local.get $7 + select + f64.neg + local.tee $2 + local.get $2 + f64.mul + local.tee $1 + local.get $2 + f64.mul + local.set $4 + local.get $2 + local.get $4 + f64.const -0.16666666641626524 + local.get $1 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $4 + local.get $1 + local.get $1 + f64.mul + f64.mul + f64.const -1.9839334836096632e-04 + local.get $1 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + return + end + local.get $3 + i32.const 1088565717 + i32.le_u + if local.get $3 - i32.const 1088565717 + i32.const 1085271519 i32.le_u if - local.get $3 - i32.const 1085271519 - i32.le_u - if - local.get $7 - if (result f32) - local.get $0 - f64.promote_f32 - f64.const 4.71238898038469 - f64.add - local.tee $4 - local.get $4 - f64.mul - local.tee $1 - local.get $1 - f64.mul - local.set $2 - f64.const 1 - local.get $1 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $2 - f64.const 0.04166662332373906 - f64.mul - f64.add - local.get $2 - local.get $1 - f64.mul - f64.const -0.001388676377460993 - local.get $1 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - else - local.get $0 - f64.promote_f32 - f64.const 4.71238898038469 - f64.sub - local.tee $1 - local.get $1 - f64.mul - local.tee $2 - local.get $2 - f64.mul - local.set $1 - f64.const 1 - local.get $2 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $1 - f64.const 0.04166662332373906 - f64.mul - f64.add - local.get $1 - local.get $2 - f64.mul - f64.const -0.001388676377460993 - local.get $2 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - f32.neg - end - return - end - local.get $0 - f64.promote_f32 - local.tee $1 - f64.const 6.283185307179586 - f64.add - local.get $1 - f64.const 6.283185307179586 - f64.sub local.get $7 - select - local.tee $4 - local.get $4 - f64.mul - local.tee $1 - local.get $4 - f64.mul - local.set $2 - br $folding-inner0 - end - local.get $3 - i32.const 2139095040 - i32.ge_u - if - local.get $0 - local.get $0 - f32.sub - return - end - block $~lib/math/rempio2f|inlined.1 (result i32) - local.get $3 - i32.const 1305022427 - i32.lt_u - if + if (result f32) local.get $0 f64.promote_f32 + f64.const 4.71238898038469 + f64.add + local.tee $4 + local.get $4 + f64.mul local.tee $1 - f64.const 0.6366197723675814 + local.get $1 f64.mul - f64.nearest local.set $2 + f64.const 1 local.get $1 + f64.const -0.499999997251031 + f64.mul + f64.add local.get $2 - f64.const 1.5707963109016418 + f64.const 0.04166662332373906 f64.mul - f64.sub + f64.add local.get $2 - f64.const 1.5893254773528196e-08 + local.get $1 + f64.mul + f64.const -0.001388676377460993 + local.get $1 + f64.const 2.439044879627741e-05 + f64.mul + f64.add f64.mul + f64.add + f32.demote_f64 + else + local.get $0 + f64.promote_f32 + f64.const 4.71238898038469 f64.sub - global.set $~lib/math/rempio2f_y + local.tee $1 + local.get $1 + f64.mul + local.tee $2 local.get $2 - i32.trunc_f64_s - br $~lib/math/rempio2f|inlined.1 + f64.mul + local.set $1 + f64.const 1 + local.get $2 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $1 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $1 + local.get $2 + f64.mul + f64.const -0.001388676377460993 + local.get $2 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + f32.neg end - i32.const 104 - i32.load - local.get $3 - i32.const 23 - i32.shr_s - i32.const 152 - i32.sub - local.tee $6 - i32.const 6 - i32.shr_s - local.tee $10 - i32.const 3 - i32.shl - i32.add - i64.load offset=8 - local.set $8 - i32.const 104 - i32.load - local.get $10 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - i64.load offset=8 - local.set $5 - local.get $6 - i32.const 63 - i32.and - local.tee $6 - i32.const 32 - i32.gt_s - if (result i64) - local.get $5 - local.get $6 - i32.const 32 - i32.sub - i64.extend_i32_s - i64.shl - i32.const 104 - i32.load - local.get $10 - i32.const 2 - i32.add - i32.const 3 - i32.shl - i32.add - i64.load offset=8 - i64.const 96 - local.get $6 - i64.extend_i32_s - i64.sub - i64.shr_u - i64.or - else - local.get $5 - i64.const 32 - local.get $6 - i64.extend_i32_s - i64.sub - i64.shr_u - end - local.set $9 - local.get $5 - i64.const 64 - local.get $6 - i64.extend_i32_s - local.tee $5 - i64.sub - i64.shr_u - local.get $8 - local.get $5 - i64.shl - i64.or - local.set $8 - f64.const 8.515303950216386e-20 - local.get $0 - f64.promote_f32 - f64.copysign - local.get $8 - local.get $3 - i32.const 8388607 - i32.and - i32.const 8388608 - i32.or - i64.extend_i32_s - local.tee $5 - i64.mul - local.get $5 - local.get $9 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $5 - i64.const 2 - i64.shl - local.tee $9 - f64.convert_i64_s - f64.mul - global.set $~lib/math/rempio2f_y - i32.const 0 - local.get $5 - i64.const 62 - i64.shr_u - local.get $9 - i64.const 63 - i64.shr_u - i64.add - i32.wrap_i64 - local.tee $3 - i32.sub - local.get $3 - local.get $7 - select + return end - local.set $3 - global.get $~lib/math/rempio2f_y - local.set $1 + local.get $0 + f64.promote_f32 + f64.const 6.283185307179586 + f64.add + local.get $0 + f64.promote_f32 + f64.const 6.283185307179586 + f64.sub + local.get $7 + select + local.tee $4 + local.get $4 + local.get $4 + f64.mul + local.tee $1 + local.get $4 + f64.mul + local.tee $2 + f64.const -0.16666666641626524 + local.get $1 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $2 + local.get $1 + local.get $1 + f64.mul + f64.mul + f64.const -1.9839334836096632e-04 + local.get $1 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + return + end + local.get $3 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + local.get $0 + f32.sub + return + end + block $~lib/math/rempio2f|inlined.1 (result i32) local.get $3 - i32.const 1 - i32.and - if (result f32) - local.get $1 - local.get $1 - f64.mul + i32.const 1305022427 + i32.lt_u + if + local.get $0 + f64.promote_f32 local.tee $1 - local.get $1 + f64.const 0.6366197723675814 f64.mul + f64.nearest local.set $2 - f64.const 1 local.get $1 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $2 - f64.const 0.04166662332373906 - f64.mul - f64.add local.get $2 - local.get $1 - f64.mul - f64.const -0.001388676377460993 - local.get $1 - f64.const 2.439044879627741e-05 - f64.mul - f64.add + f64.const 1.5707963109016418 f64.mul - f64.add - f32.demote_f64 - else - local.get $1 - local.get $1 - local.get $1 - f64.mul - local.tee $2 - local.get $1 - f64.mul - local.tee $4 - f64.const -0.16666666641626524 - local.get $2 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add - local.get $4 - local.get $2 + f64.sub local.get $2 + f64.const 1.5893254773528196e-08 f64.mul - f64.mul - f64.const -1.9839334836096632e-04 + f64.sub + global.set $~lib/math/rempio2f_y local.get $2 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 + i32.trunc_f64_s + br $~lib/math/rempio2f|inlined.1 end - local.set $0 - local.get $0 - f32.neg + local.get $3 + i32.const 23 + i32.shr_s + i32.const 152 + i32.sub + local.tee $6 + i32.const 6 + i32.shr_s + local.tee $9 + i32.const 3 + i32.shl + local.tee $10 + i32.const 92 + i32.load + i32.add + i64.load + local.set $11 + i32.const 92 + i32.load + local.get $10 + i32.add + i64.load offset=8 + local.set $5 + local.get $6 + i32.const 63 + i32.and + local.tee $6 + i32.const 32 + i32.gt_s + if (result i64) + local.get $5 + local.get $6 + i32.const 32 + i32.sub + i64.extend_i32_s + i64.shl + i32.const 92 + i32.load + local.get $9 + i32.const 3 + i32.shl + i32.add + i64.load offset=16 + i64.const 96 + local.get $6 + i64.extend_i32_s + i64.sub + i64.shr_u + i64.or + else + local.get $5 + i64.const 32 + local.get $6 + i64.extend_i32_s + i64.sub + i64.shr_u + end + local.set $8 + f64.const 8.515303950216386e-20 local.get $0 + f64.promote_f32 + f64.copysign + local.get $5 + i64.const 64 + local.get $6 + i64.extend_i32_s + local.tee $5 + i64.sub + i64.shr_u + local.get $11 + local.get $5 + i64.shl + i64.or local.get $3 - i32.const 2 + i32.const 8388607 i32.and + i32.const 8388608 + i32.or + i64.extend_i32_s + local.tee $5 + i64.mul + local.get $5 + local.get $8 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.tee $5 + i64.const 2 + i64.shl + local.tee $8 + f64.convert_i64_s + f64.mul + global.set $~lib/math/rempio2f_y + i32.const 0 + local.get $5 + i64.const 62 + i64.shr_u + local.get $8 + i64.const 63 + i64.shr_u + i64.add + i32.wrap_i64 + local.tee $3 + i32.sub + local.get $3 + local.get $7 select - return end - local.get $4 - local.get $2 - f64.const -0.16666666641626524 - local.get $1 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add - local.get $2 - local.get $1 - local.get $1 - f64.mul - f64.mul - f64.const -1.9839334836096632e-04 - local.get $1 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 + local.set $3 + global.get $~lib/math/rempio2f_y + local.set $1 + local.get $3 + i32.const 1 + i32.and + if (result f32) + local.get $1 + local.get $1 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.set $2 + f64.const 1 + local.get $1 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $2 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $2 + local.get $1 + f64.mul + f64.const -0.001388676377460993 + local.get $1 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + else + local.get $1 + local.get $1 + local.get $1 + f64.mul + local.tee $2 + local.get $1 + f64.mul + local.tee $4 + f64.const -0.16666666641626524 + local.get $2 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $4 + local.get $2 + local.get $2 + f64.mul + f64.mul + f64.const -1.9839334836096632e-04 + local.get $2 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + end + local.set $0 + local.get $3 + i32.const 2 + i32.and + if + local.get $0 + f32.neg + local.set $0 + end + local.get $0 ) (func $std/math/test_sinf (; 136 ;) (type $FUNCSIG$ifff) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 @@ -9997,299 +10007,98 @@ (local $6 i32) (local $7 i32) (local $8 i64) - (local $9 i64) + (local $9 i32) (local $10 i32) + (local $11 i64) local.get $0 i32.reinterpret_f32 local.tee $4 i32.const 31 i32.shr_u local.set $7 - block $folding-inner1 - block $folding-inner0 - local.get $4 - i32.const 2147483647 - i32.and - local.tee $4 - i32.const 1061752794 - i32.le_u - if - local.get $4 - i32.const 964689920 - i32.lt_u - if - local.get $0 - return - end - local.get $0 - f64.promote_f32 - local.tee $1 - local.get $1 - f64.mul - local.tee $2 - local.get $1 - f64.mul - local.set $3 - br $folding-inner0 - end - local.get $4 - i32.const 1081824209 - i32.le_u - if - local.get $4 - i32.const 1075235811 - i32.le_u - if - local.get $0 - f64.promote_f32 - local.tee $1 - f64.const 1.5707963267948966 - f64.add - local.get $1 - f64.const 1.5707963267948966 - f64.sub - local.get $7 - select - local.tee $1 - local.get $1 - f64.mul - local.tee $3 - local.get $1 - f64.mul - local.set $2 - br $folding-inner1 - else - local.get $0 - f64.promote_f32 - local.tee $1 - f64.const 3.141592653589793 - f64.add - local.get $1 - f64.const 3.141592653589793 - f64.sub - local.get $7 - select - local.tee $1 - local.get $1 - f64.mul - local.tee $2 - local.get $1 - f64.mul - local.set $3 - br $folding-inner0 - end - unreachable - end - local.get $4 - i32.const 1088565717 - i32.le_u - if - local.get $4 - i32.const 1085271519 - i32.le_u - if - local.get $0 - f64.promote_f32 - local.tee $1 - f64.const 4.71238898038469 - f64.add - local.get $1 - f64.const 4.71238898038469 - f64.sub - local.get $7 - select - local.tee $1 - local.get $1 - f64.mul - local.tee $3 - local.get $1 - f64.mul - local.set $2 - br $folding-inner1 - else - local.get $0 - f64.promote_f32 - local.tee $1 - f64.const 6.283185307179586 - f64.add - local.get $1 - f64.const 6.283185307179586 - f64.sub - local.get $7 - select - local.tee $1 - local.get $1 - f64.mul - local.tee $2 - local.get $1 - f64.mul - local.set $3 - br $folding-inner0 - end - unreachable - end - local.get $4 - i32.const 2139095040 - i32.ge_u - if - local.get $0 - local.get $0 - f32.sub - return - end - block $~lib/math/rempio2f|inlined.2 (result i32) - local.get $4 - i32.const 1305022427 - i32.lt_u - if - local.get $0 - f64.promote_f32 - local.tee $2 - f64.const 0.6366197723675814 - f64.mul - f64.nearest - local.set $1 - local.get $2 - local.get $1 - f64.const 1.5707963109016418 - f64.mul - f64.sub - local.get $1 - f64.const 1.5893254773528196e-08 - f64.mul - f64.sub - global.set $~lib/math/rempio2f_y - local.get $1 - i32.trunc_f64_s - br $~lib/math/rempio2f|inlined.2 - end - i32.const 104 - i32.load - local.get $4 - i32.const 23 - i32.shr_s - i32.const 152 - i32.sub - local.tee $6 - i32.const 6 - i32.shr_s - local.tee $10 - i32.const 3 - i32.shl - i32.add - i64.load offset=8 - local.set $8 - i32.const 104 - i32.load - local.get $10 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - i64.load offset=8 - local.set $5 - local.get $6 - i32.const 63 - i32.and - local.tee $6 - i32.const 32 - i32.gt_s - if (result i64) - local.get $5 - local.get $6 - i32.const 32 - i32.sub - i64.extend_i32_s - i64.shl - i32.const 104 - i32.load - local.get $10 - i32.const 2 - i32.add - i32.const 3 - i32.shl - i32.add - i64.load offset=8 - i64.const 96 - local.get $6 - i64.extend_i32_s - i64.sub - i64.shr_u - i64.or - else - local.get $5 - i64.const 32 - local.get $6 - i64.extend_i32_s - i64.sub - i64.shr_u - end - local.set $9 - local.get $5 - i64.const 64 - local.get $6 - i64.extend_i32_s - local.tee $5 - i64.sub - i64.shr_u - local.get $8 - local.get $5 - i64.shl - i64.or - local.set $8 - f64.const 8.515303950216386e-20 - local.get $0 - f64.promote_f32 - f64.copysign - local.get $8 - local.get $4 - i32.const 8388607 - i32.and - i32.const 8388608 - i32.or - i64.extend_i32_s - local.tee $5 - i64.mul - local.get $5 - local.get $9 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $5 - i64.const 2 - i64.shl - local.tee $9 - f64.convert_i64_s - f64.mul - global.set $~lib/math/rempio2f_y - i32.const 0 - local.get $5 - i64.const 62 - i64.shr_u - local.get $9 - i64.const 63 - i64.shr_u - i64.add - i32.wrap_i64 - local.tee $4 - i32.sub - local.get $4 - local.get $7 - select - end - local.set $4 - global.get $~lib/math/rempio2f_y + local.get $4 + i32.const 2147483647 + i32.and + local.tee $4 + i32.const 1061752794 + i32.le_u + if + local.get $4 + i32.const 964689920 + i32.lt_u + if + local.get $0 + return + end + local.get $0 + f64.promote_f32 + local.tee $1 + local.get $1 + f64.mul + local.tee $2 + local.get $1 + f64.mul + local.set $3 + local.get $1 + local.get $3 + f64.const 0.3333313950307914 + local.get $2 + f64.const 0.13339200271297674 + f64.mul + f64.add + f64.mul + f64.add + local.get $3 + local.get $2 + local.get $2 + f64.mul + local.tee $1 + f64.mul + f64.const 0.05338123784456704 + local.get $2 + f64.const 0.024528318116654728 + f64.mul + f64.add + local.get $1 + f64.const 0.002974357433599673 + local.get $2 + f64.const 0.009465647849436732 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + return + end + local.get $4 + i32.const 1081824209 + i32.le_u + if + local.get $4 + i32.const 1075235811 + i32.le_u + if + f64.const -1 + local.get $0 + f64.promote_f32 + f64.const 1.5707963267948966 + f64.add + local.get $0 + f64.promote_f32 + f64.const 1.5707963267948966 + f64.sub + local.get $7 + select local.tee $1 local.get $1 + local.get $1 f64.mul local.tee $3 local.get $1 f64.mul - local.set $2 - local.get $1 - local.get $2 + local.tee $2 f64.const 0.3333313950307914 local.get $3 f64.const 0.13339200271297674 @@ -10318,52 +10127,324 @@ f64.add f64.mul f64.add - local.set $1 + f64.div + f32.demote_f64 + return + else + local.get $0 + f64.promote_f32 + f64.const 3.141592653589793 + f64.add + local.get $0 + f64.promote_f32 + f64.const 3.141592653589793 + f64.sub + local.get $7 + select + local.tee $1 + local.get $1 + local.get $1 + f64.mul + local.tee $2 + local.get $1 + f64.mul + local.tee $3 + f64.const 0.3333313950307914 + local.get $2 + f64.const 0.13339200271297674 + f64.mul + f64.add + f64.mul + f64.add + local.get $3 + local.get $2 + local.get $2 + f64.mul + local.tee $1 + f64.mul + f64.const 0.05338123784456704 + local.get $2 + f64.const 0.024528318116654728 + f64.mul + f64.add + local.get $1 + f64.const 0.002974357433599673 + local.get $2 + f64.const 0.009465647849436732 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + return + end + unreachable + end + local.get $4 + i32.const 1088565717 + i32.le_u + if + local.get $4 + i32.const 1085271519 + i32.le_u + if f64.const -1 + local.get $0 + f64.promote_f32 + f64.const 4.71238898038469 + f64.add + local.get $0 + f64.promote_f32 + f64.const 4.71238898038469 + f64.sub + local.get $7 + select + local.tee $1 local.get $1 - f64.div local.get $1 - local.get $4 - i32.const 1 - i32.and + f64.mul + local.tee $3 + local.get $1 + f64.mul + local.tee $2 + f64.const 0.3333313950307914 + local.get $3 + f64.const 0.13339200271297674 + f64.mul + f64.add + f64.mul + f64.add + local.get $2 + local.get $3 + local.get $3 + f64.mul + local.tee $1 + f64.mul + f64.const 0.05338123784456704 + local.get $3 + f64.const 0.024528318116654728 + f64.mul + f64.add + local.get $1 + f64.const 0.002974357433599673 + local.get $3 + f64.const 0.009465647849436732 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.div + f32.demote_f64 + return + else + local.get $0 + f64.promote_f32 + f64.const 6.283185307179586 + f64.add + local.get $0 + f64.promote_f32 + f64.const 6.283185307179586 + f64.sub + local.get $7 select + local.tee $1 + local.get $1 + local.get $1 + f64.mul + local.tee $2 + local.get $1 + f64.mul + local.tee $3 + f64.const 0.3333313950307914 + local.get $2 + f64.const 0.13339200271297674 + f64.mul + f64.add + f64.mul + f64.add + local.get $3 + local.get $2 + local.get $2 + f64.mul + local.tee $1 + f64.mul + f64.const 0.05338123784456704 + local.get $2 + f64.const 0.024528318116654728 + f64.mul + f64.add + local.get $1 + f64.const 0.002974357433599673 + local.get $2 + f64.const 0.009465647849436732 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add f32.demote_f64 return end - local.get $1 - local.get $3 - f64.const 0.3333313950307914 - local.get $2 - f64.const 0.13339200271297674 - f64.mul - f64.add - f64.mul - f64.add - local.get $3 - local.get $2 - local.get $2 - f64.mul - local.tee $1 - f64.mul - f64.const 0.05338123784456704 - local.get $2 - f64.const 0.024528318116654728 - f64.mul - f64.add - local.get $1 - f64.const 0.002974357433599673 - local.get $2 - f64.const 0.009465647849436732 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 + unreachable + end + local.get $4 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + local.get $0 + f32.sub return end - f64.const -1 + block $~lib/math/rempio2f|inlined.2 (result i32) + local.get $4 + i32.const 1305022427 + i32.lt_u + if + local.get $0 + f64.promote_f32 + local.tee $2 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.set $1 + local.get $2 + local.get $1 + f64.const 1.5707963109016418 + f64.mul + f64.sub + local.get $1 + f64.const 1.5893254773528196e-08 + f64.mul + f64.sub + global.set $~lib/math/rempio2f_y + local.get $1 + i32.trunc_f64_s + br $~lib/math/rempio2f|inlined.2 + end + local.get $4 + i32.const 23 + i32.shr_s + i32.const 152 + i32.sub + local.tee $6 + i32.const 6 + i32.shr_s + local.tee $9 + i32.const 3 + i32.shl + local.tee $10 + i32.const 92 + i32.load + i32.add + i64.load + local.set $11 + i32.const 92 + i32.load + local.get $10 + i32.add + i64.load offset=8 + local.set $5 + local.get $6 + i32.const 63 + i32.and + local.tee $6 + i32.const 32 + i32.gt_s + if (result i64) + local.get $5 + local.get $6 + i32.const 32 + i32.sub + i64.extend_i32_s + i64.shl + i32.const 92 + i32.load + local.get $9 + i32.const 3 + i32.shl + i32.add + i64.load offset=16 + i64.const 96 + local.get $6 + i64.extend_i32_s + i64.sub + i64.shr_u + i64.or + else + local.get $5 + i64.const 32 + local.get $6 + i64.extend_i32_s + i64.sub + i64.shr_u + end + local.set $8 + f64.const 8.515303950216386e-20 + local.get $0 + f64.promote_f32 + f64.copysign + local.get $5 + i64.const 64 + local.get $6 + i64.extend_i32_s + local.tee $5 + i64.sub + i64.shr_u + local.get $11 + local.get $5 + i64.shl + i64.or + local.get $4 + i32.const 8388607 + i32.and + i32.const 8388608 + i32.or + i64.extend_i32_s + local.tee $5 + i64.mul + local.get $5 + local.get $8 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.tee $5 + i64.const 2 + i64.shl + local.tee $8 + f64.convert_i64_s + f64.mul + global.set $~lib/math/rempio2f_y + i32.const 0 + local.get $5 + i64.const 62 + i64.shr_u + local.get $8 + i64.const 63 + i64.shr_u + i64.add + i32.wrap_i64 + local.tee $4 + i32.sub + local.get $4 + local.get $7 + select + end + local.set $4 + global.get $~lib/math/rempio2f_y + local.tee $1 + local.get $1 + f64.mul + local.tee $3 + local.get $1 + f64.mul + local.set $2 local.get $1 local.get $2 f64.const 0.3333313950307914 @@ -10394,7 +10475,17 @@ f64.add f64.mul f64.add - f64.div + local.set $1 + local.get $4 + i32.const 1 + i32.and + if + f64.const -1 + local.get $1 + f64.div + local.set $1 + end + local.get $1 f32.demote_f64 ) (func $std/math/test_tanf (; 144 ;) (type $FUNCSIG$ifff) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) @@ -10967,7 +11058,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 108 i32.const 0 call $~lib/env/abort @@ -10980,7 +11071,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 109 i32.const 0 call $~lib/env/abort @@ -10993,7 +11084,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 110 i32.const 0 call $~lib/env/abort @@ -11006,7 +11097,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 111 i32.const 0 call $~lib/env/abort @@ -11019,7 +11110,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 112 i32.const 0 call $~lib/env/abort @@ -11032,7 +11123,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 113 i32.const 0 call $~lib/env/abort @@ -11045,7 +11136,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 114 i32.const 0 call $~lib/env/abort @@ -11059,7 +11150,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 116 i32.const 0 call $~lib/env/abort @@ -11073,7 +11164,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 117 i32.const 0 call $~lib/env/abort @@ -11087,7 +11178,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 118 i32.const 0 call $~lib/env/abort @@ -11101,7 +11192,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 119 i32.const 0 call $~lib/env/abort @@ -11115,7 +11206,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 120 i32.const 0 call $~lib/env/abort @@ -11129,7 +11220,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 121 i32.const 0 call $~lib/env/abort @@ -11143,7 +11234,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 122 i32.const 0 call $~lib/env/abort @@ -11156,7 +11247,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 133 i32.const 0 call $~lib/env/abort @@ -11169,7 +11260,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 134 i32.const 0 call $~lib/env/abort @@ -11182,7 +11273,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 135 i32.const 0 call $~lib/env/abort @@ -11195,7 +11286,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 136 i32.const 0 call $~lib/env/abort @@ -11208,7 +11299,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 137 i32.const 0 call $~lib/env/abort @@ -11221,7 +11312,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 138 i32.const 0 call $~lib/env/abort @@ -11234,7 +11325,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 139 i32.const 0 call $~lib/env/abort @@ -11247,7 +11338,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 140 i32.const 0 call $~lib/env/abort @@ -11260,7 +11351,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 141 i32.const 0 call $~lib/env/abort @@ -11273,7 +11364,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 142 i32.const 0 call $~lib/env/abort @@ -11286,7 +11377,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 145 i32.const 0 call $~lib/env/abort @@ -11299,7 +11390,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 146 i32.const 0 call $~lib/env/abort @@ -11312,7 +11403,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 147 i32.const 0 call $~lib/env/abort @@ -11325,7 +11416,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 148 i32.const 0 call $~lib/env/abort @@ -11338,7 +11429,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 149 i32.const 0 call $~lib/env/abort @@ -11351,7 +11442,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 150 i32.const 0 call $~lib/env/abort @@ -11364,7 +11455,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 151 i32.const 0 call $~lib/env/abort @@ -11377,7 +11468,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 152 i32.const 0 call $~lib/env/abort @@ -11390,7 +11481,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 153 i32.const 0 call $~lib/env/abort @@ -11403,7 +11494,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 154 i32.const 0 call $~lib/env/abort @@ -11416,7 +11507,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 155 i32.const 0 call $~lib/env/abort @@ -11429,7 +11520,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 156 i32.const 0 call $~lib/env/abort @@ -11442,7 +11533,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 157 i32.const 0 call $~lib/env/abort @@ -11455,7 +11546,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 158 i32.const 0 call $~lib/env/abort @@ -11468,7 +11559,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 159 i32.const 0 call $~lib/env/abort @@ -11481,7 +11572,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 160 i32.const 0 call $~lib/env/abort @@ -11494,7 +11585,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 161 i32.const 0 call $~lib/env/abort @@ -11507,7 +11598,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 162 i32.const 0 call $~lib/env/abort @@ -11520,7 +11611,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 163 i32.const 0 call $~lib/env/abort @@ -11533,7 +11624,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 172 i32.const 0 call $~lib/env/abort @@ -11546,7 +11637,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 173 i32.const 0 call $~lib/env/abort @@ -11559,7 +11650,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 174 i32.const 0 call $~lib/env/abort @@ -11572,7 +11663,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 175 i32.const 0 call $~lib/env/abort @@ -11585,7 +11676,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 176 i32.const 0 call $~lib/env/abort @@ -11598,7 +11689,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 177 i32.const 0 call $~lib/env/abort @@ -11611,7 +11702,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 178 i32.const 0 call $~lib/env/abort @@ -11624,7 +11715,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 179 i32.const 0 call $~lib/env/abort @@ -11637,7 +11728,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 180 i32.const 0 call $~lib/env/abort @@ -11650,7 +11741,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 181 i32.const 0 call $~lib/env/abort @@ -11663,7 +11754,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 184 i32.const 0 call $~lib/env/abort @@ -11676,7 +11767,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 185 i32.const 0 call $~lib/env/abort @@ -11689,7 +11780,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 186 i32.const 0 call $~lib/env/abort @@ -11702,7 +11793,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 187 i32.const 0 call $~lib/env/abort @@ -11715,7 +11806,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 188 i32.const 0 call $~lib/env/abort @@ -11728,7 +11819,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 189 i32.const 0 call $~lib/env/abort @@ -11741,7 +11832,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 190 i32.const 0 call $~lib/env/abort @@ -11754,7 +11845,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 191 i32.const 0 call $~lib/env/abort @@ -11767,7 +11858,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 192 i32.const 0 call $~lib/env/abort @@ -11780,7 +11871,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 193 i32.const 0 call $~lib/env/abort @@ -11793,7 +11884,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 194 i32.const 0 call $~lib/env/abort @@ -11806,7 +11897,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 195 i32.const 0 call $~lib/env/abort @@ -11819,7 +11910,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 196 i32.const 0 call $~lib/env/abort @@ -11832,7 +11923,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 197 i32.const 0 call $~lib/env/abort @@ -11845,7 +11936,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 198 i32.const 0 call $~lib/env/abort @@ -11858,7 +11949,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 199 i32.const 0 call $~lib/env/abort @@ -11871,7 +11962,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 200 i32.const 0 call $~lib/env/abort @@ -11884,7 +11975,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 201 i32.const 0 call $~lib/env/abort @@ -11897,7 +11988,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 202 i32.const 0 call $~lib/env/abort @@ -11909,7 +12000,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 214 i32.const 0 call $~lib/env/abort @@ -11921,7 +12012,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 215 i32.const 0 call $~lib/env/abort @@ -11933,7 +12024,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 216 i32.const 0 call $~lib/env/abort @@ -11945,7 +12036,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 217 i32.const 0 call $~lib/env/abort @@ -11957,7 +12048,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 218 i32.const 0 call $~lib/env/abort @@ -11969,7 +12060,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 219 i32.const 0 call $~lib/env/abort @@ -11981,7 +12072,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 220 i32.const 0 call $~lib/env/abort @@ -11993,7 +12084,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 221 i32.const 0 call $~lib/env/abort @@ -12005,7 +12096,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 222 i32.const 0 call $~lib/env/abort @@ -12017,7 +12108,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 223 i32.const 0 call $~lib/env/abort @@ -12029,7 +12120,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 226 i32.const 0 call $~lib/env/abort @@ -12041,7 +12132,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 227 i32.const 0 call $~lib/env/abort @@ -12053,7 +12144,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 228 i32.const 0 call $~lib/env/abort @@ -12065,7 +12156,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 229 i32.const 0 call $~lib/env/abort @@ -12077,7 +12168,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 230 i32.const 0 call $~lib/env/abort @@ -12089,7 +12180,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 231 i32.const 0 call $~lib/env/abort @@ -12101,7 +12192,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 232 i32.const 0 call $~lib/env/abort @@ -12113,7 +12204,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 241 i32.const 0 call $~lib/env/abort @@ -12125,7 +12216,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 242 i32.const 0 call $~lib/env/abort @@ -12137,7 +12228,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 243 i32.const 0 call $~lib/env/abort @@ -12149,7 +12240,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 244 i32.const 0 call $~lib/env/abort @@ -12161,7 +12252,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 245 i32.const 0 call $~lib/env/abort @@ -12173,7 +12264,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 246 i32.const 0 call $~lib/env/abort @@ -12185,7 +12276,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 247 i32.const 0 call $~lib/env/abort @@ -12197,7 +12288,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 248 i32.const 0 call $~lib/env/abort @@ -12209,7 +12300,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 249 i32.const 0 call $~lib/env/abort @@ -12221,7 +12312,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 250 i32.const 0 call $~lib/env/abort @@ -12233,7 +12324,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 253 i32.const 0 call $~lib/env/abort @@ -12245,7 +12336,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 254 i32.const 0 call $~lib/env/abort @@ -12257,7 +12348,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 255 i32.const 0 call $~lib/env/abort @@ -12269,7 +12360,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 256 i32.const 0 call $~lib/env/abort @@ -12281,7 +12372,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 257 i32.const 0 call $~lib/env/abort @@ -12293,7 +12384,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 258 i32.const 0 call $~lib/env/abort @@ -12305,7 +12396,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 259 i32.const 0 call $~lib/env/abort @@ -12318,7 +12409,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 271 i32.const 0 call $~lib/env/abort @@ -12331,7 +12422,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 272 i32.const 0 call $~lib/env/abort @@ -12344,7 +12435,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 273 i32.const 0 call $~lib/env/abort @@ -12357,7 +12448,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 274 i32.const 0 call $~lib/env/abort @@ -12370,7 +12461,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 275 i32.const 0 call $~lib/env/abort @@ -12383,7 +12474,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 276 i32.const 0 call $~lib/env/abort @@ -12396,7 +12487,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 277 i32.const 0 call $~lib/env/abort @@ -12409,7 +12500,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 278 i32.const 0 call $~lib/env/abort @@ -12422,7 +12513,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 0 call $~lib/env/abort @@ -12435,7 +12526,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 280 i32.const 0 call $~lib/env/abort @@ -12448,7 +12539,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 283 i32.const 0 call $~lib/env/abort @@ -12461,7 +12552,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 284 i32.const 0 call $~lib/env/abort @@ -12474,7 +12565,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 285 i32.const 0 call $~lib/env/abort @@ -12487,7 +12578,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 286 i32.const 0 call $~lib/env/abort @@ -12500,7 +12591,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 287 i32.const 0 call $~lib/env/abort @@ -12513,7 +12604,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 288 i32.const 0 call $~lib/env/abort @@ -12526,7 +12617,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 289 i32.const 0 call $~lib/env/abort @@ -12539,7 +12630,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 290 i32.const 0 call $~lib/env/abort @@ -12552,7 +12643,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 291 i32.const 0 call $~lib/env/abort @@ -12565,7 +12656,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 292 i32.const 0 call $~lib/env/abort @@ -12578,7 +12669,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 301 i32.const 0 call $~lib/env/abort @@ -12591,7 +12682,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 302 i32.const 0 call $~lib/env/abort @@ -12604,7 +12695,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 303 i32.const 0 call $~lib/env/abort @@ -12617,7 +12708,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 304 i32.const 0 call $~lib/env/abort @@ -12630,7 +12721,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 305 i32.const 0 call $~lib/env/abort @@ -12643,7 +12734,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 0 call $~lib/env/abort @@ -12656,7 +12747,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 0 call $~lib/env/abort @@ -12669,7 +12760,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 0 call $~lib/env/abort @@ -12682,7 +12773,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 309 i32.const 0 call $~lib/env/abort @@ -12695,7 +12786,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 310 i32.const 0 call $~lib/env/abort @@ -12708,7 +12799,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 313 i32.const 0 call $~lib/env/abort @@ -12721,7 +12812,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 314 i32.const 0 call $~lib/env/abort @@ -12734,7 +12825,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 315 i32.const 0 call $~lib/env/abort @@ -12747,7 +12838,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 316 i32.const 0 call $~lib/env/abort @@ -12760,7 +12851,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 317 i32.const 0 call $~lib/env/abort @@ -12773,7 +12864,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 318 i32.const 0 call $~lib/env/abort @@ -12786,7 +12877,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 319 i32.const 0 call $~lib/env/abort @@ -12799,7 +12890,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 320 i32.const 0 call $~lib/env/abort @@ -12812,7 +12903,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 321 i32.const 0 call $~lib/env/abort @@ -12825,7 +12916,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 322 i32.const 0 call $~lib/env/abort @@ -12838,7 +12929,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 323 i32.const 0 call $~lib/env/abort @@ -12851,7 +12942,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 0 call $~lib/env/abort @@ -12864,7 +12955,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 336 i32.const 0 call $~lib/env/abort @@ -12877,7 +12968,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 337 i32.const 0 call $~lib/env/abort @@ -12890,7 +12981,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 0 call $~lib/env/abort @@ -12903,7 +12994,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 339 i32.const 0 call $~lib/env/abort @@ -12916,7 +13007,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 340 i32.const 0 call $~lib/env/abort @@ -12929,7 +13020,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 341 i32.const 0 call $~lib/env/abort @@ -12942,7 +13033,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 342 i32.const 0 call $~lib/env/abort @@ -12955,7 +13046,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 343 i32.const 0 call $~lib/env/abort @@ -12968,7 +13059,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 344 i32.const 0 call $~lib/env/abort @@ -12981,7 +13072,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 347 i32.const 0 call $~lib/env/abort @@ -12994,7 +13085,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 348 i32.const 0 call $~lib/env/abort @@ -13007,7 +13098,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 349 i32.const 0 call $~lib/env/abort @@ -13020,7 +13111,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 350 i32.const 0 call $~lib/env/abort @@ -13033,7 +13124,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 351 i32.const 0 call $~lib/env/abort @@ -13046,7 +13137,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 352 i32.const 0 call $~lib/env/abort @@ -13059,7 +13150,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 353 i32.const 0 call $~lib/env/abort @@ -13072,7 +13163,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 369 i32.const 0 call $~lib/env/abort @@ -13085,7 +13176,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 371 i32.const 0 call $~lib/env/abort @@ -13098,7 +13189,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 372 i32.const 0 call $~lib/env/abort @@ -13111,7 +13202,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 381 i32.const 0 call $~lib/env/abort @@ -13124,7 +13215,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 382 i32.const 0 call $~lib/env/abort @@ -13137,7 +13228,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 383 i32.const 0 call $~lib/env/abort @@ -13150,7 +13241,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 384 i32.const 0 call $~lib/env/abort @@ -13163,7 +13254,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 385 i32.const 0 call $~lib/env/abort @@ -13176,7 +13267,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 386 i32.const 0 call $~lib/env/abort @@ -13189,7 +13280,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 387 i32.const 0 call $~lib/env/abort @@ -13202,7 +13293,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 388 i32.const 0 call $~lib/env/abort @@ -13215,7 +13306,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 389 i32.const 0 call $~lib/env/abort @@ -13228,7 +13319,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 390 i32.const 0 call $~lib/env/abort @@ -13241,7 +13332,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 393 i32.const 0 call $~lib/env/abort @@ -13254,7 +13345,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 394 i32.const 0 call $~lib/env/abort @@ -13267,7 +13358,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 0 call $~lib/env/abort @@ -13280,7 +13371,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 396 i32.const 0 call $~lib/env/abort @@ -13293,7 +13384,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 397 i32.const 0 call $~lib/env/abort @@ -13306,7 +13397,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 0 call $~lib/env/abort @@ -13319,7 +13410,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 399 i32.const 0 call $~lib/env/abort @@ -13332,7 +13423,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 400 i32.const 0 call $~lib/env/abort @@ -13345,7 +13436,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 412 i32.const 0 call $~lib/env/abort @@ -13358,7 +13449,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 413 i32.const 0 call $~lib/env/abort @@ -13371,7 +13462,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 414 i32.const 0 call $~lib/env/abort @@ -13384,7 +13475,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 415 i32.const 0 call $~lib/env/abort @@ -13397,7 +13488,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 416 i32.const 0 call $~lib/env/abort @@ -13410,7 +13501,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 417 i32.const 0 call $~lib/env/abort @@ -13423,7 +13514,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 418 i32.const 0 call $~lib/env/abort @@ -13436,7 +13527,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 419 i32.const 0 call $~lib/env/abort @@ -13449,7 +13540,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 420 i32.const 0 call $~lib/env/abort @@ -13462,7 +13553,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 421 i32.const 0 call $~lib/env/abort @@ -13475,7 +13566,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 424 i32.const 0 call $~lib/env/abort @@ -13488,7 +13579,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 425 i32.const 0 call $~lib/env/abort @@ -13501,7 +13592,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 426 i32.const 0 call $~lib/env/abort @@ -13514,7 +13605,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 427 i32.const 0 call $~lib/env/abort @@ -13527,7 +13618,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 428 i32.const 0 call $~lib/env/abort @@ -13540,7 +13631,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 429 i32.const 0 call $~lib/env/abort @@ -13553,7 +13644,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 430 i32.const 0 call $~lib/env/abort @@ -13566,7 +13657,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 431 i32.const 0 call $~lib/env/abort @@ -13579,7 +13670,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 432 i32.const 0 call $~lib/env/abort @@ -13592,7 +13683,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 433 i32.const 0 call $~lib/env/abort @@ -13605,7 +13696,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 442 i32.const 0 call $~lib/env/abort @@ -13618,7 +13709,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 443 i32.const 0 call $~lib/env/abort @@ -13631,7 +13722,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 444 i32.const 0 call $~lib/env/abort @@ -13644,7 +13735,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 445 i32.const 0 call $~lib/env/abort @@ -13657,7 +13748,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 446 i32.const 0 call $~lib/env/abort @@ -13670,7 +13761,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 447 i32.const 0 call $~lib/env/abort @@ -13683,7 +13774,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 448 i32.const 0 call $~lib/env/abort @@ -13696,7 +13787,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 449 i32.const 0 call $~lib/env/abort @@ -13709,7 +13800,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 450 i32.const 0 call $~lib/env/abort @@ -13722,7 +13813,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 451 i32.const 0 call $~lib/env/abort @@ -13735,7 +13826,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 454 i32.const 0 call $~lib/env/abort @@ -13748,7 +13839,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 455 i32.const 0 call $~lib/env/abort @@ -13761,7 +13852,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 456 i32.const 0 call $~lib/env/abort @@ -13774,7 +13865,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 457 i32.const 0 call $~lib/env/abort @@ -13787,7 +13878,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 458 i32.const 0 call $~lib/env/abort @@ -13800,7 +13891,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 459 i32.const 0 call $~lib/env/abort @@ -13813,7 +13904,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 460 i32.const 0 call $~lib/env/abort @@ -13826,7 +13917,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 461 i32.const 0 call $~lib/env/abort @@ -13839,7 +13930,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 462 i32.const 0 call $~lib/env/abort @@ -13852,7 +13943,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 463 i32.const 0 call $~lib/env/abort @@ -13865,7 +13956,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 475 i32.const 0 call $~lib/env/abort @@ -13878,7 +13969,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 476 i32.const 0 call $~lib/env/abort @@ -13891,7 +13982,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 477 i32.const 0 call $~lib/env/abort @@ -13904,7 +13995,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 478 i32.const 0 call $~lib/env/abort @@ -13917,7 +14008,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 479 i32.const 0 call $~lib/env/abort @@ -13930,7 +14021,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 480 i32.const 0 call $~lib/env/abort @@ -13943,7 +14034,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 481 i32.const 0 call $~lib/env/abort @@ -13956,7 +14047,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 482 i32.const 0 call $~lib/env/abort @@ -13969,7 +14060,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 483 i32.const 0 call $~lib/env/abort @@ -13982,7 +14073,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 484 i32.const 0 call $~lib/env/abort @@ -13995,7 +14086,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 487 i32.const 0 call $~lib/env/abort @@ -14008,7 +14099,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 488 i32.const 0 call $~lib/env/abort @@ -14021,7 +14112,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 489 i32.const 0 call $~lib/env/abort @@ -14034,7 +14125,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 490 i32.const 0 call $~lib/env/abort @@ -14047,7 +14138,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 491 i32.const 0 call $~lib/env/abort @@ -14060,7 +14151,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 520 i32.const 0 call $~lib/env/abort @@ -14073,7 +14164,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 521 i32.const 0 call $~lib/env/abort @@ -14086,7 +14177,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 522 i32.const 0 call $~lib/env/abort @@ -14099,7 +14190,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 523 i32.const 0 call $~lib/env/abort @@ -14112,7 +14203,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 524 i32.const 0 call $~lib/env/abort @@ -14125,7 +14216,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 525 i32.const 0 call $~lib/env/abort @@ -14138,7 +14229,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 526 i32.const 0 call $~lib/env/abort @@ -14151,7 +14242,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 527 i32.const 0 call $~lib/env/abort @@ -14164,7 +14255,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 528 i32.const 0 call $~lib/env/abort @@ -14177,7 +14268,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 529 i32.const 0 call $~lib/env/abort @@ -14190,7 +14281,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 532 i32.const 0 call $~lib/env/abort @@ -14203,7 +14294,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 533 i32.const 0 call $~lib/env/abort @@ -14216,7 +14307,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 534 i32.const 0 call $~lib/env/abort @@ -14229,7 +14320,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 535 i32.const 0 call $~lib/env/abort @@ -14242,7 +14333,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 536 i32.const 0 call $~lib/env/abort @@ -14255,7 +14346,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 548 i32.const 0 call $~lib/env/abort @@ -14268,7 +14359,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 549 i32.const 0 call $~lib/env/abort @@ -14281,7 +14372,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 550 i32.const 0 call $~lib/env/abort @@ -14294,7 +14385,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 551 i32.const 0 call $~lib/env/abort @@ -14307,7 +14398,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 552 i32.const 0 call $~lib/env/abort @@ -14320,7 +14411,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 553 i32.const 0 call $~lib/env/abort @@ -14333,7 +14424,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 554 i32.const 0 call $~lib/env/abort @@ -14346,7 +14437,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 555 i32.const 0 call $~lib/env/abort @@ -14359,7 +14450,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 556 i32.const 0 call $~lib/env/abort @@ -14372,7 +14463,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 557 i32.const 0 call $~lib/env/abort @@ -14385,7 +14476,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 560 i32.const 0 call $~lib/env/abort @@ -14398,7 +14489,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 561 i32.const 0 call $~lib/env/abort @@ -14411,7 +14502,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 562 i32.const 0 call $~lib/env/abort @@ -14424,7 +14515,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 563 i32.const 0 call $~lib/env/abort @@ -14437,7 +14528,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 564 i32.const 0 call $~lib/env/abort @@ -14450,7 +14541,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 565 i32.const 0 call $~lib/env/abort @@ -14463,7 +14554,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 566 i32.const 0 call $~lib/env/abort @@ -14476,7 +14567,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 567 i32.const 0 call $~lib/env/abort @@ -14489,7 +14580,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 576 i32.const 0 call $~lib/env/abort @@ -14502,7 +14593,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 577 i32.const 0 call $~lib/env/abort @@ -14515,7 +14606,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 578 i32.const 0 call $~lib/env/abort @@ -14528,7 +14619,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 579 i32.const 0 call $~lib/env/abort @@ -14541,7 +14632,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 580 i32.const 0 call $~lib/env/abort @@ -14554,7 +14645,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 581 i32.const 0 call $~lib/env/abort @@ -14567,7 +14658,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 582 i32.const 0 call $~lib/env/abort @@ -14580,7 +14671,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 583 i32.const 0 call $~lib/env/abort @@ -14593,7 +14684,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 584 i32.const 0 call $~lib/env/abort @@ -14606,7 +14697,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 585 i32.const 0 call $~lib/env/abort @@ -14619,7 +14710,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 588 i32.const 0 call $~lib/env/abort @@ -14632,7 +14723,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 589 i32.const 0 call $~lib/env/abort @@ -14645,7 +14736,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 590 i32.const 0 call $~lib/env/abort @@ -14658,7 +14749,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 591 i32.const 0 call $~lib/env/abort @@ -14671,7 +14762,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 592 i32.const 0 call $~lib/env/abort @@ -14684,7 +14775,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 593 i32.const 0 call $~lib/env/abort @@ -14697,7 +14788,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 594 i32.const 0 call $~lib/env/abort @@ -14710,7 +14801,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 606 i32.const 0 call $~lib/env/abort @@ -14723,7 +14814,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 607 i32.const 0 call $~lib/env/abort @@ -14736,7 +14827,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 608 i32.const 0 call $~lib/env/abort @@ -14749,7 +14840,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 609 i32.const 0 call $~lib/env/abort @@ -14762,7 +14853,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 610 i32.const 0 call $~lib/env/abort @@ -14775,7 +14866,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 611 i32.const 0 call $~lib/env/abort @@ -14788,7 +14879,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 612 i32.const 0 call $~lib/env/abort @@ -14801,7 +14892,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 613 i32.const 0 call $~lib/env/abort @@ -14814,7 +14905,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 614 i32.const 0 call $~lib/env/abort @@ -14827,7 +14918,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 615 i32.const 0 call $~lib/env/abort @@ -14840,7 +14931,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 618 i32.const 0 call $~lib/env/abort @@ -14853,7 +14944,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 619 i32.const 0 call $~lib/env/abort @@ -14866,7 +14957,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 620 i32.const 0 call $~lib/env/abort @@ -14879,7 +14970,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 621 i32.const 0 call $~lib/env/abort @@ -14892,7 +14983,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 622 i32.const 0 call $~lib/env/abort @@ -14905,7 +14996,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 623 i32.const 0 call $~lib/env/abort @@ -14918,7 +15009,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 624 i32.const 0 call $~lib/env/abort @@ -14931,7 +15022,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 625 i32.const 0 call $~lib/env/abort @@ -14944,7 +15035,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 626 i32.const 0 call $~lib/env/abort @@ -14957,7 +15048,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 627 i32.const 0 call $~lib/env/abort @@ -14970,7 +15061,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 628 i32.const 0 call $~lib/env/abort @@ -14983,7 +15074,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 629 i32.const 0 call $~lib/env/abort @@ -14996,7 +15087,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 630 i32.const 0 call $~lib/env/abort @@ -15009,7 +15100,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 631 i32.const 0 call $~lib/env/abort @@ -15022,7 +15113,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 640 i32.const 0 call $~lib/env/abort @@ -15035,7 +15126,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 641 i32.const 0 call $~lib/env/abort @@ -15048,7 +15139,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 642 i32.const 0 call $~lib/env/abort @@ -15061,7 +15152,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 643 i32.const 0 call $~lib/env/abort @@ -15074,7 +15165,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 644 i32.const 0 call $~lib/env/abort @@ -15087,7 +15178,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 645 i32.const 0 call $~lib/env/abort @@ -15100,7 +15191,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 646 i32.const 0 call $~lib/env/abort @@ -15113,7 +15204,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 647 i32.const 0 call $~lib/env/abort @@ -15126,7 +15217,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 648 i32.const 0 call $~lib/env/abort @@ -15139,7 +15230,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 649 i32.const 0 call $~lib/env/abort @@ -15152,7 +15243,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 652 i32.const 0 call $~lib/env/abort @@ -15165,7 +15256,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 653 i32.const 0 call $~lib/env/abort @@ -15178,7 +15269,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 654 i32.const 0 call $~lib/env/abort @@ -15191,7 +15282,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 655 i32.const 0 call $~lib/env/abort @@ -15204,7 +15295,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 656 i32.const 0 call $~lib/env/abort @@ -15217,7 +15308,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 657 i32.const 0 call $~lib/env/abort @@ -15230,7 +15321,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 658 i32.const 0 call $~lib/env/abort @@ -15243,7 +15334,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 659 i32.const 0 call $~lib/env/abort @@ -15256,7 +15347,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 660 i32.const 0 call $~lib/env/abort @@ -15269,7 +15360,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 661 i32.const 0 call $~lib/env/abort @@ -15282,7 +15373,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 662 i32.const 0 call $~lib/env/abort @@ -15295,7 +15386,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 663 i32.const 0 call $~lib/env/abort @@ -15308,7 +15399,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 664 i32.const 0 call $~lib/env/abort @@ -15321,7 +15412,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 665 i32.const 0 call $~lib/env/abort @@ -15335,7 +15426,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 677 i32.const 0 call $~lib/env/abort @@ -15349,7 +15440,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 678 i32.const 0 call $~lib/env/abort @@ -15363,7 +15454,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 679 i32.const 0 call $~lib/env/abort @@ -15377,7 +15468,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 680 i32.const 0 call $~lib/env/abort @@ -15391,7 +15482,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 681 i32.const 0 call $~lib/env/abort @@ -15405,7 +15496,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 682 i32.const 0 call $~lib/env/abort @@ -15419,7 +15510,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 683 i32.const 0 call $~lib/env/abort @@ -15433,7 +15524,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 684 i32.const 0 call $~lib/env/abort @@ -15447,7 +15538,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 685 i32.const 0 call $~lib/env/abort @@ -15461,7 +15552,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 686 i32.const 0 call $~lib/env/abort @@ -15475,7 +15566,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 689 i32.const 0 call $~lib/env/abort @@ -15489,7 +15580,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 690 i32.const 0 call $~lib/env/abort @@ -15503,7 +15594,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 691 i32.const 0 call $~lib/env/abort @@ -15517,7 +15608,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 692 i32.const 0 call $~lib/env/abort @@ -15531,7 +15622,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 693 i32.const 0 call $~lib/env/abort @@ -15545,7 +15636,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 694 i32.const 0 call $~lib/env/abort @@ -15559,7 +15650,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 695 i32.const 0 call $~lib/env/abort @@ -15573,7 +15664,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 696 i32.const 0 call $~lib/env/abort @@ -15587,7 +15678,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 697 i32.const 0 call $~lib/env/abort @@ -15601,7 +15692,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 698 i32.const 0 call $~lib/env/abort @@ -15615,7 +15706,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 699 i32.const 0 call $~lib/env/abort @@ -15629,7 +15720,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 700 i32.const 0 call $~lib/env/abort @@ -15643,7 +15734,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 701 i32.const 0 call $~lib/env/abort @@ -15657,7 +15748,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 702 i32.const 0 call $~lib/env/abort @@ -15671,7 +15762,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 703 i32.const 0 call $~lib/env/abort @@ -15685,7 +15776,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 704 i32.const 0 call $~lib/env/abort @@ -15699,7 +15790,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 705 i32.const 0 call $~lib/env/abort @@ -15713,7 +15804,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 706 i32.const 0 call $~lib/env/abort @@ -15727,7 +15818,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 707 i32.const 0 call $~lib/env/abort @@ -15741,7 +15832,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 708 i32.const 0 call $~lib/env/abort @@ -15755,7 +15846,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 709 i32.const 0 call $~lib/env/abort @@ -15769,7 +15860,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 710 i32.const 0 call $~lib/env/abort @@ -15783,7 +15874,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 711 i32.const 0 call $~lib/env/abort @@ -15797,7 +15888,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 712 i32.const 0 call $~lib/env/abort @@ -15811,7 +15902,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 713 i32.const 0 call $~lib/env/abort @@ -15825,7 +15916,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 714 i32.const 0 call $~lib/env/abort @@ -15839,7 +15930,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 715 i32.const 0 call $~lib/env/abort @@ -15853,7 +15944,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 716 i32.const 0 call $~lib/env/abort @@ -15867,7 +15958,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 717 i32.const 0 call $~lib/env/abort @@ -15881,7 +15972,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 718 i32.const 0 call $~lib/env/abort @@ -15895,7 +15986,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 727 i32.const 0 call $~lib/env/abort @@ -15909,7 +16000,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 728 i32.const 0 call $~lib/env/abort @@ -15923,7 +16014,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 729 i32.const 0 call $~lib/env/abort @@ -15937,7 +16028,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 730 i32.const 0 call $~lib/env/abort @@ -15951,7 +16042,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 731 i32.const 0 call $~lib/env/abort @@ -15965,7 +16056,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 732 i32.const 0 call $~lib/env/abort @@ -15979,7 +16070,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 733 i32.const 0 call $~lib/env/abort @@ -15993,7 +16084,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 734 i32.const 0 call $~lib/env/abort @@ -16007,7 +16098,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 735 i32.const 0 call $~lib/env/abort @@ -16021,7 +16112,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 736 i32.const 0 call $~lib/env/abort @@ -16035,7 +16126,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 739 i32.const 0 call $~lib/env/abort @@ -16049,7 +16140,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 740 i32.const 0 call $~lib/env/abort @@ -16063,7 +16154,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 741 i32.const 0 call $~lib/env/abort @@ -16077,7 +16168,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 742 i32.const 0 call $~lib/env/abort @@ -16091,7 +16182,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 743 i32.const 0 call $~lib/env/abort @@ -16105,7 +16196,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 744 i32.const 0 call $~lib/env/abort @@ -16119,7 +16210,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 745 i32.const 0 call $~lib/env/abort @@ -16133,7 +16224,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 746 i32.const 0 call $~lib/env/abort @@ -16147,7 +16238,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 747 i32.const 0 call $~lib/env/abort @@ -16161,7 +16252,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 748 i32.const 0 call $~lib/env/abort @@ -16175,7 +16266,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 749 i32.const 0 call $~lib/env/abort @@ -16189,7 +16280,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 750 i32.const 0 call $~lib/env/abort @@ -16203,7 +16294,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 751 i32.const 0 call $~lib/env/abort @@ -16217,7 +16308,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 752 i32.const 0 call $~lib/env/abort @@ -16231,7 +16322,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 753 i32.const 0 call $~lib/env/abort @@ -16245,7 +16336,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 754 i32.const 0 call $~lib/env/abort @@ -16259,7 +16350,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 755 i32.const 0 call $~lib/env/abort @@ -16273,7 +16364,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 756 i32.const 0 call $~lib/env/abort @@ -16287,7 +16378,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 757 i32.const 0 call $~lib/env/abort @@ -16301,7 +16392,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 758 i32.const 0 call $~lib/env/abort @@ -16315,7 +16406,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 759 i32.const 0 call $~lib/env/abort @@ -16329,7 +16420,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 760 i32.const 0 call $~lib/env/abort @@ -16343,7 +16434,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 761 i32.const 0 call $~lib/env/abort @@ -16357,7 +16448,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 762 i32.const 0 call $~lib/env/abort @@ -16371,7 +16462,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 763 i32.const 0 call $~lib/env/abort @@ -16385,7 +16476,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 764 i32.const 0 call $~lib/env/abort @@ -16399,7 +16490,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 765 i32.const 0 call $~lib/env/abort @@ -16413,7 +16504,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 766 i32.const 0 call $~lib/env/abort @@ -16426,7 +16517,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 778 i32.const 0 call $~lib/env/abort @@ -16439,7 +16530,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 779 i32.const 0 call $~lib/env/abort @@ -16452,7 +16543,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 780 i32.const 0 call $~lib/env/abort @@ -16465,7 +16556,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 781 i32.const 0 call $~lib/env/abort @@ -16478,7 +16569,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 782 i32.const 0 call $~lib/env/abort @@ -16491,7 +16582,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 783 i32.const 0 call $~lib/env/abort @@ -16504,7 +16595,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 784 i32.const 0 call $~lib/env/abort @@ -16517,7 +16608,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 785 i32.const 0 call $~lib/env/abort @@ -16530,7 +16621,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 786 i32.const 0 call $~lib/env/abort @@ -16543,7 +16634,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 787 i32.const 0 call $~lib/env/abort @@ -16556,7 +16647,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 790 i32.const 0 call $~lib/env/abort @@ -16569,7 +16660,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 791 i32.const 0 call $~lib/env/abort @@ -16582,7 +16673,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 792 i32.const 0 call $~lib/env/abort @@ -16595,7 +16686,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 793 i32.const 0 call $~lib/env/abort @@ -16608,7 +16699,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 794 i32.const 0 call $~lib/env/abort @@ -16621,7 +16712,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 795 i32.const 0 call $~lib/env/abort @@ -16634,7 +16725,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 796 i32.const 0 call $~lib/env/abort @@ -16647,7 +16738,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 797 i32.const 0 call $~lib/env/abort @@ -16660,7 +16751,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 798 i32.const 0 call $~lib/env/abort @@ -16673,7 +16764,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 799 i32.const 0 call $~lib/env/abort @@ -16686,7 +16777,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 808 i32.const 0 call $~lib/env/abort @@ -16699,7 +16790,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 809 i32.const 0 call $~lib/env/abort @@ -16712,7 +16803,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 810 i32.const 0 call $~lib/env/abort @@ -16725,7 +16816,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 811 i32.const 0 call $~lib/env/abort @@ -16738,7 +16829,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 812 i32.const 0 call $~lib/env/abort @@ -16751,7 +16842,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 813 i32.const 0 call $~lib/env/abort @@ -16764,7 +16855,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 814 i32.const 0 call $~lib/env/abort @@ -16777,7 +16868,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 815 i32.const 0 call $~lib/env/abort @@ -16790,7 +16881,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 816 i32.const 0 call $~lib/env/abort @@ -16803,7 +16894,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 817 i32.const 0 call $~lib/env/abort @@ -16816,7 +16907,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 820 i32.const 0 call $~lib/env/abort @@ -16829,7 +16920,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 821 i32.const 0 call $~lib/env/abort @@ -16842,7 +16933,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 822 i32.const 0 call $~lib/env/abort @@ -16855,7 +16946,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 823 i32.const 0 call $~lib/env/abort @@ -16868,7 +16959,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 824 i32.const 0 call $~lib/env/abort @@ -16881,7 +16972,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 825 i32.const 0 call $~lib/env/abort @@ -16894,7 +16985,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 826 i32.const 0 call $~lib/env/abort @@ -16907,7 +16998,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 827 i32.const 0 call $~lib/env/abort @@ -16920,7 +17011,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 828 i32.const 0 call $~lib/env/abort @@ -16933,7 +17024,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 829 i32.const 0 call $~lib/env/abort @@ -16945,7 +17036,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 841 i32.const 0 call $~lib/env/abort @@ -16957,7 +17048,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 842 i32.const 0 call $~lib/env/abort @@ -16969,7 +17060,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 843 i32.const 0 call $~lib/env/abort @@ -16981,7 +17072,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 844 i32.const 0 call $~lib/env/abort @@ -16993,7 +17084,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 845 i32.const 0 call $~lib/env/abort @@ -17005,7 +17096,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 846 i32.const 0 call $~lib/env/abort @@ -17017,7 +17108,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 847 i32.const 0 call $~lib/env/abort @@ -17029,7 +17120,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 848 i32.const 0 call $~lib/env/abort @@ -17041,7 +17132,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 849 i32.const 0 call $~lib/env/abort @@ -17053,7 +17144,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 850 i32.const 0 call $~lib/env/abort @@ -17065,7 +17156,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 853 i32.const 0 call $~lib/env/abort @@ -17077,7 +17168,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 854 i32.const 0 call $~lib/env/abort @@ -17089,7 +17180,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 855 i32.const 0 call $~lib/env/abort @@ -17101,7 +17192,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 856 i32.const 0 call $~lib/env/abort @@ -17113,7 +17204,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 857 i32.const 0 call $~lib/env/abort @@ -17125,7 +17216,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 858 i32.const 0 call $~lib/env/abort @@ -17137,7 +17228,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 859 i32.const 0 call $~lib/env/abort @@ -17149,7 +17240,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 860 i32.const 0 call $~lib/env/abort @@ -17161,7 +17252,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 861 i32.const 0 call $~lib/env/abort @@ -17173,7 +17264,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 862 i32.const 0 call $~lib/env/abort @@ -17185,7 +17276,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 863 i32.const 0 call $~lib/env/abort @@ -17197,7 +17288,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 864 i32.const 0 call $~lib/env/abort @@ -17209,7 +17300,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 865 i32.const 0 call $~lib/env/abort @@ -17221,7 +17312,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 866 i32.const 0 call $~lib/env/abort @@ -17233,7 +17324,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 867 i32.const 0 call $~lib/env/abort @@ -17245,7 +17336,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 868 i32.const 0 call $~lib/env/abort @@ -17257,7 +17348,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 869 i32.const 0 call $~lib/env/abort @@ -17269,7 +17360,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 870 i32.const 0 call $~lib/env/abort @@ -17281,7 +17372,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 871 i32.const 0 call $~lib/env/abort @@ -17293,7 +17384,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 872 i32.const 0 call $~lib/env/abort @@ -17305,7 +17396,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 873 i32.const 0 call $~lib/env/abort @@ -17317,7 +17408,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 874 i32.const 0 call $~lib/env/abort @@ -17329,7 +17420,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 875 i32.const 0 call $~lib/env/abort @@ -17341,7 +17432,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 876 i32.const 0 call $~lib/env/abort @@ -17353,7 +17444,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 877 i32.const 0 call $~lib/env/abort @@ -17365,7 +17456,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 878 i32.const 0 call $~lib/env/abort @@ -17377,7 +17468,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 879 i32.const 0 call $~lib/env/abort @@ -17389,7 +17480,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 880 i32.const 0 call $~lib/env/abort @@ -17401,7 +17492,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 881 i32.const 0 call $~lib/env/abort @@ -17413,7 +17504,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 882 i32.const 0 call $~lib/env/abort @@ -17425,7 +17516,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 883 i32.const 0 call $~lib/env/abort @@ -17437,7 +17528,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 884 i32.const 0 call $~lib/env/abort @@ -17449,7 +17540,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 885 i32.const 0 call $~lib/env/abort @@ -17461,7 +17552,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 886 i32.const 0 call $~lib/env/abort @@ -17473,7 +17564,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 887 i32.const 0 call $~lib/env/abort @@ -17485,7 +17576,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 888 i32.const 0 call $~lib/env/abort @@ -17497,7 +17588,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 889 i32.const 0 call $~lib/env/abort @@ -17509,7 +17600,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 890 i32.const 0 call $~lib/env/abort @@ -17521,7 +17612,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 891 i32.const 0 call $~lib/env/abort @@ -17533,7 +17624,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 892 i32.const 0 call $~lib/env/abort @@ -17545,7 +17636,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 893 i32.const 0 call $~lib/env/abort @@ -17557,7 +17648,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 894 i32.const 0 call $~lib/env/abort @@ -17569,7 +17660,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 895 i32.const 0 call $~lib/env/abort @@ -17581,7 +17672,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 896 i32.const 0 call $~lib/env/abort @@ -17593,7 +17684,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 897 i32.const 0 call $~lib/env/abort @@ -17605,7 +17696,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 906 i32.const 0 call $~lib/env/abort @@ -17617,7 +17708,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 907 i32.const 0 call $~lib/env/abort @@ -17629,7 +17720,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 908 i32.const 0 call $~lib/env/abort @@ -17641,7 +17732,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 909 i32.const 0 call $~lib/env/abort @@ -17653,7 +17744,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 910 i32.const 0 call $~lib/env/abort @@ -17665,7 +17756,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 911 i32.const 0 call $~lib/env/abort @@ -17677,7 +17768,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 912 i32.const 0 call $~lib/env/abort @@ -17689,7 +17780,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 913 i32.const 0 call $~lib/env/abort @@ -17701,7 +17792,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 914 i32.const 0 call $~lib/env/abort @@ -17713,7 +17804,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 915 i32.const 0 call $~lib/env/abort @@ -17725,7 +17816,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 918 i32.const 0 call $~lib/env/abort @@ -17737,7 +17828,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 919 i32.const 0 call $~lib/env/abort @@ -17749,7 +17840,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 920 i32.const 0 call $~lib/env/abort @@ -17761,7 +17852,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 921 i32.const 0 call $~lib/env/abort @@ -17773,7 +17864,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 922 i32.const 0 call $~lib/env/abort @@ -17785,7 +17876,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 923 i32.const 0 call $~lib/env/abort @@ -17797,7 +17888,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 924 i32.const 0 call $~lib/env/abort @@ -17809,7 +17900,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 925 i32.const 0 call $~lib/env/abort @@ -17821,7 +17912,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 926 i32.const 0 call $~lib/env/abort @@ -17833,7 +17924,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 927 i32.const 0 call $~lib/env/abort @@ -17845,7 +17936,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 928 i32.const 0 call $~lib/env/abort @@ -17857,7 +17948,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 929 i32.const 0 call $~lib/env/abort @@ -17869,7 +17960,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 930 i32.const 0 call $~lib/env/abort @@ -17881,7 +17972,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 931 i32.const 0 call $~lib/env/abort @@ -17893,7 +17984,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 932 i32.const 0 call $~lib/env/abort @@ -17905,7 +17996,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 933 i32.const 0 call $~lib/env/abort @@ -17917,7 +18008,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 934 i32.const 0 call $~lib/env/abort @@ -17929,7 +18020,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 935 i32.const 0 call $~lib/env/abort @@ -17941,7 +18032,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 936 i32.const 0 call $~lib/env/abort @@ -17953,7 +18044,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 937 i32.const 0 call $~lib/env/abort @@ -17965,7 +18056,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 938 i32.const 0 call $~lib/env/abort @@ -17977,7 +18068,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 939 i32.const 0 call $~lib/env/abort @@ -17989,7 +18080,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 940 i32.const 0 call $~lib/env/abort @@ -18001,7 +18092,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 941 i32.const 0 call $~lib/env/abort @@ -18013,7 +18104,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 942 i32.const 0 call $~lib/env/abort @@ -18025,7 +18116,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 943 i32.const 0 call $~lib/env/abort @@ -18037,7 +18128,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 944 i32.const 0 call $~lib/env/abort @@ -18049,7 +18140,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 945 i32.const 0 call $~lib/env/abort @@ -18061,7 +18152,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 946 i32.const 0 call $~lib/env/abort @@ -18073,7 +18164,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 947 i32.const 0 call $~lib/env/abort @@ -18085,7 +18176,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 948 i32.const 0 call $~lib/env/abort @@ -18097,7 +18188,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 949 i32.const 0 call $~lib/env/abort @@ -18109,7 +18200,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 950 i32.const 0 call $~lib/env/abort @@ -18121,7 +18212,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 951 i32.const 0 call $~lib/env/abort @@ -18133,7 +18224,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 952 i32.const 0 call $~lib/env/abort @@ -18145,7 +18236,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 953 i32.const 0 call $~lib/env/abort @@ -18157,7 +18248,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 954 i32.const 0 call $~lib/env/abort @@ -18169,7 +18260,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 955 i32.const 0 call $~lib/env/abort @@ -18181,7 +18272,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 956 i32.const 0 call $~lib/env/abort @@ -18193,7 +18284,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 957 i32.const 0 call $~lib/env/abort @@ -18205,7 +18296,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 958 i32.const 0 call $~lib/env/abort @@ -18217,7 +18308,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 959 i32.const 0 call $~lib/env/abort @@ -18229,7 +18320,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 960 i32.const 0 call $~lib/env/abort @@ -18241,7 +18332,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 961 i32.const 0 call $~lib/env/abort @@ -18253,7 +18344,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 962 i32.const 0 call $~lib/env/abort @@ -18266,7 +18357,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1073 i32.const 0 call $~lib/env/abort @@ -18279,7 +18370,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1074 i32.const 0 call $~lib/env/abort @@ -18292,7 +18383,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1075 i32.const 0 call $~lib/env/abort @@ -18305,7 +18396,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1076 i32.const 0 call $~lib/env/abort @@ -18318,7 +18409,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1077 i32.const 0 call $~lib/env/abort @@ -18331,7 +18422,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1078 i32.const 0 call $~lib/env/abort @@ -18344,7 +18435,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1079 i32.const 0 call $~lib/env/abort @@ -18357,7 +18448,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1080 i32.const 0 call $~lib/env/abort @@ -18370,7 +18461,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1081 i32.const 0 call $~lib/env/abort @@ -18383,7 +18474,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1082 i32.const 0 call $~lib/env/abort @@ -18396,7 +18487,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1085 i32.const 0 call $~lib/env/abort @@ -18409,7 +18500,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1086 i32.const 0 call $~lib/env/abort @@ -18422,7 +18513,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1087 i32.const 0 call $~lib/env/abort @@ -18435,7 +18526,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1088 i32.const 0 call $~lib/env/abort @@ -18448,7 +18539,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1089 i32.const 0 call $~lib/env/abort @@ -18461,7 +18552,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1092 i32.const 0 call $~lib/env/abort @@ -18474,7 +18565,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1093 i32.const 0 call $~lib/env/abort @@ -18487,7 +18578,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1094 i32.const 0 call $~lib/env/abort @@ -18500,7 +18591,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1095 i32.const 0 call $~lib/env/abort @@ -18513,7 +18604,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1096 i32.const 0 call $~lib/env/abort @@ -18526,7 +18617,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1097 i32.const 0 call $~lib/env/abort @@ -18539,7 +18630,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1098 i32.const 0 call $~lib/env/abort @@ -18552,7 +18643,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1099 i32.const 0 call $~lib/env/abort @@ -18565,7 +18656,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1100 i32.const 0 call $~lib/env/abort @@ -18578,7 +18669,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1101 i32.const 0 call $~lib/env/abort @@ -18591,7 +18682,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1102 i32.const 0 call $~lib/env/abort @@ -18604,7 +18695,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1103 i32.const 0 call $~lib/env/abort @@ -18617,7 +18708,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1104 i32.const 0 call $~lib/env/abort @@ -18630,7 +18721,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1105 i32.const 0 call $~lib/env/abort @@ -18643,7 +18734,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1106 i32.const 0 call $~lib/env/abort @@ -18656,7 +18747,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1107 i32.const 0 call $~lib/env/abort @@ -18669,7 +18760,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1108 i32.const 0 call $~lib/env/abort @@ -18682,7 +18773,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1109 i32.const 0 call $~lib/env/abort @@ -18695,7 +18786,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1110 i32.const 0 call $~lib/env/abort @@ -18708,7 +18799,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1111 i32.const 0 call $~lib/env/abort @@ -18721,7 +18812,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1112 i32.const 0 call $~lib/env/abort @@ -18734,7 +18825,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1113 i32.const 0 call $~lib/env/abort @@ -18747,7 +18838,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1114 i32.const 0 call $~lib/env/abort @@ -18760,7 +18851,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1115 i32.const 0 call $~lib/env/abort @@ -18773,7 +18864,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1116 i32.const 0 call $~lib/env/abort @@ -18786,7 +18877,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1117 i32.const 0 call $~lib/env/abort @@ -18799,7 +18890,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1118 i32.const 0 call $~lib/env/abort @@ -18812,7 +18903,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1119 i32.const 0 call $~lib/env/abort @@ -18825,7 +18916,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1120 i32.const 0 call $~lib/env/abort @@ -18838,7 +18929,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1121 i32.const 0 call $~lib/env/abort @@ -18851,7 +18942,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1122 i32.const 0 call $~lib/env/abort @@ -18864,7 +18955,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1123 i32.const 0 call $~lib/env/abort @@ -18877,7 +18968,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1124 i32.const 0 call $~lib/env/abort @@ -18890,7 +18981,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1125 i32.const 0 call $~lib/env/abort @@ -18903,7 +18994,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1126 i32.const 0 call $~lib/env/abort @@ -18916,7 +19007,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1127 i32.const 0 call $~lib/env/abort @@ -18929,7 +19020,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1128 i32.const 0 call $~lib/env/abort @@ -18942,7 +19033,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1129 i32.const 0 call $~lib/env/abort @@ -18955,7 +19046,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1132 i32.const 0 call $~lib/env/abort @@ -18968,7 +19059,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1133 i32.const 0 call $~lib/env/abort @@ -18981,7 +19072,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1134 i32.const 0 call $~lib/env/abort @@ -18994,7 +19085,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1135 i32.const 0 call $~lib/env/abort @@ -19007,7 +19098,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1136 i32.const 0 call $~lib/env/abort @@ -19020,7 +19111,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1137 i32.const 0 call $~lib/env/abort @@ -19033,7 +19124,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1138 i32.const 0 call $~lib/env/abort @@ -19046,7 +19137,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1139 i32.const 0 call $~lib/env/abort @@ -19059,7 +19150,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1140 i32.const 0 call $~lib/env/abort @@ -19072,7 +19163,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1141 i32.const 0 call $~lib/env/abort @@ -19085,7 +19176,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1142 i32.const 0 call $~lib/env/abort @@ -19098,7 +19189,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1143 i32.const 0 call $~lib/env/abort @@ -19111,7 +19202,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1144 i32.const 0 call $~lib/env/abort @@ -19124,7 +19215,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1145 i32.const 0 call $~lib/env/abort @@ -19137,7 +19228,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1156 i32.const 0 call $~lib/env/abort @@ -19150,7 +19241,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1157 i32.const 0 call $~lib/env/abort @@ -19163,7 +19254,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1158 i32.const 0 call $~lib/env/abort @@ -19176,7 +19267,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1159 i32.const 0 call $~lib/env/abort @@ -19189,7 +19280,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1160 i32.const 0 call $~lib/env/abort @@ -19202,7 +19293,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1161 i32.const 0 call $~lib/env/abort @@ -19215,7 +19306,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1162 i32.const 0 call $~lib/env/abort @@ -19228,7 +19319,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1163 i32.const 0 call $~lib/env/abort @@ -19241,7 +19332,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1164 i32.const 0 call $~lib/env/abort @@ -19254,7 +19345,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1165 i32.const 0 call $~lib/env/abort @@ -19267,7 +19358,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1168 i32.const 0 call $~lib/env/abort @@ -19280,7 +19371,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1169 i32.const 0 call $~lib/env/abort @@ -19293,7 +19384,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1170 i32.const 0 call $~lib/env/abort @@ -19306,7 +19397,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1171 i32.const 0 call $~lib/env/abort @@ -19319,7 +19410,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1172 i32.const 0 call $~lib/env/abort @@ -19332,7 +19423,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1181 i32.const 0 call $~lib/env/abort @@ -19345,7 +19436,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1182 i32.const 0 call $~lib/env/abort @@ -19358,7 +19449,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1183 i32.const 0 call $~lib/env/abort @@ -19371,7 +19462,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1184 i32.const 0 call $~lib/env/abort @@ -19384,7 +19475,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1185 i32.const 0 call $~lib/env/abort @@ -19397,7 +19488,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1186 i32.const 0 call $~lib/env/abort @@ -19410,7 +19501,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1187 i32.const 0 call $~lib/env/abort @@ -19423,7 +19514,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1188 i32.const 0 call $~lib/env/abort @@ -19436,7 +19527,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1189 i32.const 0 call $~lib/env/abort @@ -19449,7 +19540,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1190 i32.const 0 call $~lib/env/abort @@ -19462,7 +19553,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1193 i32.const 0 call $~lib/env/abort @@ -19475,7 +19566,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1194 i32.const 0 call $~lib/env/abort @@ -19488,7 +19579,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1195 i32.const 0 call $~lib/env/abort @@ -19501,7 +19592,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1196 i32.const 0 call $~lib/env/abort @@ -19514,7 +19605,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1197 i32.const 0 call $~lib/env/abort @@ -19527,7 +19618,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1209 i32.const 0 call $~lib/env/abort @@ -19540,7 +19631,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1210 i32.const 0 call $~lib/env/abort @@ -19553,7 +19644,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1211 i32.const 0 call $~lib/env/abort @@ -19566,7 +19657,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1212 i32.const 0 call $~lib/env/abort @@ -19579,7 +19670,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1213 i32.const 0 call $~lib/env/abort @@ -19592,7 +19683,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1214 i32.const 0 call $~lib/env/abort @@ -19605,7 +19696,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1215 i32.const 0 call $~lib/env/abort @@ -19618,7 +19709,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1216 i32.const 0 call $~lib/env/abort @@ -19631,7 +19722,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1217 i32.const 0 call $~lib/env/abort @@ -19644,7 +19735,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1218 i32.const 0 call $~lib/env/abort @@ -19657,7 +19748,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1221 i32.const 0 call $~lib/env/abort @@ -19670,7 +19761,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1222 i32.const 0 call $~lib/env/abort @@ -19683,7 +19774,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1223 i32.const 0 call $~lib/env/abort @@ -19696,7 +19787,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1224 i32.const 0 call $~lib/env/abort @@ -19709,7 +19800,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1225 i32.const 0 call $~lib/env/abort @@ -19722,7 +19813,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1226 i32.const 0 call $~lib/env/abort @@ -19735,7 +19826,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1227 i32.const 0 call $~lib/env/abort @@ -19748,7 +19839,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1228 i32.const 0 call $~lib/env/abort @@ -19761,7 +19852,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1229 i32.const 0 call $~lib/env/abort @@ -19774,7 +19865,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1230 i32.const 0 call $~lib/env/abort @@ -19787,7 +19878,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1231 i32.const 0 call $~lib/env/abort @@ -19800,7 +19891,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1234 i32.const 0 call $~lib/env/abort @@ -19813,7 +19904,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1235 i32.const 0 call $~lib/env/abort @@ -19826,7 +19917,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1237 i32.const 0 call $~lib/env/abort @@ -19839,7 +19930,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1244 i32.const 0 call $~lib/env/abort @@ -19852,7 +19943,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1245 i32.const 0 call $~lib/env/abort @@ -19865,7 +19956,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1252 i32.const 0 call $~lib/env/abort @@ -19878,7 +19969,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1259 i32.const 0 call $~lib/env/abort @@ -19891,7 +19982,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1266 i32.const 0 call $~lib/env/abort @@ -19904,7 +19995,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1273 i32.const 0 call $~lib/env/abort @@ -19917,7 +20008,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1280 i32.const 0 call $~lib/env/abort @@ -19930,7 +20021,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1287 i32.const 0 call $~lib/env/abort @@ -19943,7 +20034,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1293 i32.const 0 call $~lib/env/abort @@ -19956,7 +20047,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1299 i32.const 0 call $~lib/env/abort @@ -19969,7 +20060,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1305 i32.const 0 call $~lib/env/abort @@ -19982,7 +20073,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1312 i32.const 0 call $~lib/env/abort @@ -19995,7 +20086,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1319 i32.const 0 call $~lib/env/abort @@ -20008,7 +20099,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1326 i32.const 0 call $~lib/env/abort @@ -20021,7 +20112,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1333 i32.const 0 call $~lib/env/abort @@ -20034,7 +20125,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1340 i32.const 0 call $~lib/env/abort @@ -20047,7 +20138,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1347 i32.const 0 call $~lib/env/abort @@ -20060,7 +20151,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1354 i32.const 0 call $~lib/env/abort @@ -20073,7 +20164,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1361 i32.const 0 call $~lib/env/abort @@ -20086,7 +20177,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1375 i32.const 0 call $~lib/env/abort @@ -20099,7 +20190,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1376 i32.const 0 call $~lib/env/abort @@ -20112,7 +20203,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1377 i32.const 0 call $~lib/env/abort @@ -20125,7 +20216,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1378 i32.const 0 call $~lib/env/abort @@ -20138,7 +20229,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1379 i32.const 0 call $~lib/env/abort @@ -20151,7 +20242,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1380 i32.const 0 call $~lib/env/abort @@ -20164,7 +20255,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1381 i32.const 0 call $~lib/env/abort @@ -20177,7 +20268,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1382 i32.const 0 call $~lib/env/abort @@ -20190,7 +20281,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1383 i32.const 0 call $~lib/env/abort @@ -20203,7 +20294,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1384 i32.const 0 call $~lib/env/abort @@ -20216,7 +20307,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1387 i32.const 0 call $~lib/env/abort @@ -20229,7 +20320,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1388 i32.const 0 call $~lib/env/abort @@ -20242,7 +20333,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1389 i32.const 0 call $~lib/env/abort @@ -20255,7 +20346,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1390 i32.const 0 call $~lib/env/abort @@ -20268,7 +20359,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1391 i32.const 0 call $~lib/env/abort @@ -20281,7 +20372,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1392 i32.const 0 call $~lib/env/abort @@ -20294,7 +20385,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1393 i32.const 0 call $~lib/env/abort @@ -20307,7 +20398,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1394 i32.const 0 call $~lib/env/abort @@ -20320,7 +20411,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1395 i32.const 0 call $~lib/env/abort @@ -20333,7 +20424,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1396 i32.const 0 call $~lib/env/abort @@ -20346,7 +20437,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1397 i32.const 0 call $~lib/env/abort @@ -20359,7 +20450,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1398 i32.const 0 call $~lib/env/abort @@ -20372,7 +20463,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1399 i32.const 0 call $~lib/env/abort @@ -20385,7 +20476,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1400 i32.const 0 call $~lib/env/abort @@ -20398,7 +20489,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1412 i32.const 0 call $~lib/env/abort @@ -20411,7 +20502,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1413 i32.const 0 call $~lib/env/abort @@ -20424,7 +20515,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1414 i32.const 0 call $~lib/env/abort @@ -20437,7 +20528,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1415 i32.const 0 call $~lib/env/abort @@ -20450,7 +20541,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1416 i32.const 0 call $~lib/env/abort @@ -20463,7 +20554,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1417 i32.const 0 call $~lib/env/abort @@ -20476,7 +20567,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1418 i32.const 0 call $~lib/env/abort @@ -20489,7 +20580,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1419 i32.const 0 call $~lib/env/abort @@ -20502,7 +20593,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1420 i32.const 0 call $~lib/env/abort @@ -20515,7 +20606,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1421 i32.const 0 call $~lib/env/abort @@ -20528,7 +20619,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1424 i32.const 0 call $~lib/env/abort @@ -20541,7 +20632,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1425 i32.const 0 call $~lib/env/abort @@ -20554,7 +20645,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1426 i32.const 0 call $~lib/env/abort @@ -20567,7 +20658,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1427 i32.const 0 call $~lib/env/abort @@ -20580,7 +20671,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1428 i32.const 0 call $~lib/env/abort @@ -20593,7 +20684,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1429 i32.const 0 call $~lib/env/abort @@ -20606,7 +20697,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1430 i32.const 0 call $~lib/env/abort @@ -20619,7 +20710,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1431 i32.const 0 call $~lib/env/abort @@ -20632,7 +20723,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1432 i32.const 0 call $~lib/env/abort @@ -20645,7 +20736,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1441 i32.const 0 call $~lib/env/abort @@ -20658,7 +20749,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1442 i32.const 0 call $~lib/env/abort @@ -20671,7 +20762,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1443 i32.const 0 call $~lib/env/abort @@ -20684,7 +20775,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1444 i32.const 0 call $~lib/env/abort @@ -20697,7 +20788,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1445 i32.const 0 call $~lib/env/abort @@ -20710,7 +20801,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1446 i32.const 0 call $~lib/env/abort @@ -20723,7 +20814,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1447 i32.const 0 call $~lib/env/abort @@ -20736,7 +20827,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1448 i32.const 0 call $~lib/env/abort @@ -20749,7 +20840,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1449 i32.const 0 call $~lib/env/abort @@ -20762,7 +20853,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1450 i32.const 0 call $~lib/env/abort @@ -20775,7 +20866,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1453 i32.const 0 call $~lib/env/abort @@ -20788,7 +20879,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1454 i32.const 0 call $~lib/env/abort @@ -20801,7 +20892,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1455 i32.const 0 call $~lib/env/abort @@ -20814,7 +20905,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1456 i32.const 0 call $~lib/env/abort @@ -20827,7 +20918,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1457 i32.const 0 call $~lib/env/abort @@ -20840,7 +20931,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1458 i32.const 0 call $~lib/env/abort @@ -20853,7 +20944,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1459 i32.const 0 call $~lib/env/abort @@ -20865,7 +20956,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1471 i32.const 0 call $~lib/env/abort @@ -20877,7 +20968,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1472 i32.const 0 call $~lib/env/abort @@ -20889,7 +20980,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1473 i32.const 0 call $~lib/env/abort @@ -20901,7 +20992,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1474 i32.const 0 call $~lib/env/abort @@ -20913,7 +21004,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1475 i32.const 0 call $~lib/env/abort @@ -20925,7 +21016,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1476 i32.const 0 call $~lib/env/abort @@ -20937,7 +21028,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1477 i32.const 0 call $~lib/env/abort @@ -20949,7 +21040,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1478 i32.const 0 call $~lib/env/abort @@ -20961,7 +21052,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1479 i32.const 0 call $~lib/env/abort @@ -20973,7 +21064,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1480 i32.const 0 call $~lib/env/abort @@ -20985,7 +21076,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1483 i32.const 0 call $~lib/env/abort @@ -20997,7 +21088,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1484 i32.const 0 call $~lib/env/abort @@ -21009,7 +21100,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1485 i32.const 0 call $~lib/env/abort @@ -21021,7 +21112,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1486 i32.const 0 call $~lib/env/abort @@ -21033,7 +21124,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1487 i32.const 0 call $~lib/env/abort @@ -21045,7 +21136,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1488 i32.const 0 call $~lib/env/abort @@ -21057,7 +21148,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1489 i32.const 0 call $~lib/env/abort @@ -21069,7 +21160,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1490 i32.const 0 call $~lib/env/abort @@ -21081,7 +21172,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1491 i32.const 0 call $~lib/env/abort @@ -21093,7 +21184,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1492 i32.const 0 call $~lib/env/abort @@ -21105,7 +21196,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1493 i32.const 0 call $~lib/env/abort @@ -21117,7 +21208,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1494 i32.const 0 call $~lib/env/abort @@ -21129,7 +21220,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1495 i32.const 0 call $~lib/env/abort @@ -21141,7 +21232,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1496 i32.const 0 call $~lib/env/abort @@ -21153,7 +21244,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1497 i32.const 0 call $~lib/env/abort @@ -21165,7 +21256,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1506 i32.const 0 call $~lib/env/abort @@ -21177,7 +21268,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1507 i32.const 0 call $~lib/env/abort @@ -21189,7 +21280,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1508 i32.const 0 call $~lib/env/abort @@ -21201,7 +21292,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1509 i32.const 0 call $~lib/env/abort @@ -21213,7 +21304,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1510 i32.const 0 call $~lib/env/abort @@ -21225,7 +21316,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1511 i32.const 0 call $~lib/env/abort @@ -21237,7 +21328,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1512 i32.const 0 call $~lib/env/abort @@ -21249,7 +21340,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1513 i32.const 0 call $~lib/env/abort @@ -21261,7 +21352,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1514 i32.const 0 call $~lib/env/abort @@ -21273,7 +21364,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1515 i32.const 0 call $~lib/env/abort @@ -21285,7 +21376,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1518 i32.const 0 call $~lib/env/abort @@ -21297,7 +21388,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1519 i32.const 0 call $~lib/env/abort @@ -21309,7 +21400,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1520 i32.const 0 call $~lib/env/abort @@ -21321,7 +21412,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1521 i32.const 0 call $~lib/env/abort @@ -21333,7 +21424,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1522 i32.const 0 call $~lib/env/abort @@ -21345,7 +21436,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1523 i32.const 0 call $~lib/env/abort @@ -21357,7 +21448,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1524 i32.const 0 call $~lib/env/abort @@ -21369,7 +21460,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1525 i32.const 0 call $~lib/env/abort @@ -21381,7 +21472,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1526 i32.const 0 call $~lib/env/abort @@ -21393,7 +21484,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1527 i32.const 0 call $~lib/env/abort @@ -21405,7 +21496,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1528 i32.const 0 call $~lib/env/abort @@ -21417,7 +21508,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1529 i32.const 0 call $~lib/env/abort @@ -21429,7 +21520,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1530 i32.const 0 call $~lib/env/abort @@ -21441,7 +21532,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1531 i32.const 0 call $~lib/env/abort @@ -21453,7 +21544,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1532 i32.const 0 call $~lib/env/abort @@ -21467,7 +21558,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1544 i32.const 0 call $~lib/env/abort @@ -21481,7 +21572,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1545 i32.const 0 call $~lib/env/abort @@ -21495,7 +21586,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1546 i32.const 0 call $~lib/env/abort @@ -21509,7 +21600,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1547 i32.const 0 call $~lib/env/abort @@ -21523,7 +21614,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1548 i32.const 0 call $~lib/env/abort @@ -21537,7 +21628,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1549 i32.const 0 call $~lib/env/abort @@ -21551,7 +21642,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1550 i32.const 0 call $~lib/env/abort @@ -21565,7 +21656,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1551 i32.const 0 call $~lib/env/abort @@ -21579,7 +21670,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1552 i32.const 0 call $~lib/env/abort @@ -21593,7 +21684,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1553 i32.const 0 call $~lib/env/abort @@ -21607,7 +21698,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1556 i32.const 0 call $~lib/env/abort @@ -21621,7 +21712,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1557 i32.const 0 call $~lib/env/abort @@ -21635,7 +21726,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1558 i32.const 0 call $~lib/env/abort @@ -21649,7 +21740,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1559 i32.const 0 call $~lib/env/abort @@ -21663,7 +21754,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1560 i32.const 0 call $~lib/env/abort @@ -21677,7 +21768,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1561 i32.const 0 call $~lib/env/abort @@ -21691,7 +21782,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1562 i32.const 0 call $~lib/env/abort @@ -21705,7 +21796,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1563 i32.const 0 call $~lib/env/abort @@ -21719,7 +21810,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1564 i32.const 0 call $~lib/env/abort @@ -21733,7 +21824,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1565 i32.const 0 call $~lib/env/abort @@ -21747,7 +21838,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1566 i32.const 0 call $~lib/env/abort @@ -21761,7 +21852,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1567 i32.const 0 call $~lib/env/abort @@ -21775,7 +21866,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1568 i32.const 0 call $~lib/env/abort @@ -21789,7 +21880,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1569 i32.const 0 call $~lib/env/abort @@ -21803,7 +21894,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1570 i32.const 0 call $~lib/env/abort @@ -21817,7 +21908,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1571 i32.const 0 call $~lib/env/abort @@ -21831,7 +21922,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1572 i32.const 0 call $~lib/env/abort @@ -21845,7 +21936,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1573 i32.const 0 call $~lib/env/abort @@ -21859,7 +21950,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1574 i32.const 0 call $~lib/env/abort @@ -21873,7 +21964,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1583 i32.const 0 call $~lib/env/abort @@ -21887,7 +21978,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1584 i32.const 0 call $~lib/env/abort @@ -21901,7 +21992,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1585 i32.const 0 call $~lib/env/abort @@ -21915,7 +22006,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1586 i32.const 0 call $~lib/env/abort @@ -21929,7 +22020,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1587 i32.const 0 call $~lib/env/abort @@ -21943,7 +22034,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1588 i32.const 0 call $~lib/env/abort @@ -21957,7 +22048,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1589 i32.const 0 call $~lib/env/abort @@ -21971,7 +22062,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1590 i32.const 0 call $~lib/env/abort @@ -21985,7 +22076,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1591 i32.const 0 call $~lib/env/abort @@ -21999,7 +22090,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1592 i32.const 0 call $~lib/env/abort @@ -22013,7 +22104,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1595 i32.const 0 call $~lib/env/abort @@ -22027,7 +22118,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1596 i32.const 0 call $~lib/env/abort @@ -22041,7 +22132,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1597 i32.const 0 call $~lib/env/abort @@ -22055,7 +22146,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1598 i32.const 0 call $~lib/env/abort @@ -22069,7 +22160,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1599 i32.const 0 call $~lib/env/abort @@ -22083,7 +22174,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1600 i32.const 0 call $~lib/env/abort @@ -22097,7 +22188,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1601 i32.const 0 call $~lib/env/abort @@ -22111,7 +22202,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1602 i32.const 0 call $~lib/env/abort @@ -22125,7 +22216,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1603 i32.const 0 call $~lib/env/abort @@ -22139,7 +22230,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1604 i32.const 0 call $~lib/env/abort @@ -22153,7 +22244,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1605 i32.const 0 call $~lib/env/abort @@ -22167,7 +22258,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1606 i32.const 0 call $~lib/env/abort @@ -22181,7 +22272,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1607 i32.const 0 call $~lib/env/abort @@ -22195,7 +22286,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1608 i32.const 0 call $~lib/env/abort @@ -22209,7 +22300,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1609 i32.const 0 call $~lib/env/abort @@ -22223,7 +22314,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1610 i32.const 0 call $~lib/env/abort @@ -22237,7 +22328,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1611 i32.const 0 call $~lib/env/abort @@ -22251,7 +22342,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1612 i32.const 0 call $~lib/env/abort @@ -22265,7 +22356,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1613 i32.const 0 call $~lib/env/abort @@ -22278,7 +22369,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1625 i32.const 0 call $~lib/env/abort @@ -22291,7 +22382,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1626 i32.const 0 call $~lib/env/abort @@ -22304,7 +22395,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1627 i32.const 0 call $~lib/env/abort @@ -22317,7 +22408,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1628 i32.const 0 call $~lib/env/abort @@ -22330,7 +22421,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1629 i32.const 0 call $~lib/env/abort @@ -22343,7 +22434,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1630 i32.const 0 call $~lib/env/abort @@ -22356,7 +22447,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1631 i32.const 0 call $~lib/env/abort @@ -22369,7 +22460,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1632 i32.const 0 call $~lib/env/abort @@ -22382,7 +22473,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1633 i32.const 0 call $~lib/env/abort @@ -22395,7 +22486,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1634 i32.const 0 call $~lib/env/abort @@ -22408,7 +22499,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1637 i32.const 0 call $~lib/env/abort @@ -22421,7 +22512,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1638 i32.const 0 call $~lib/env/abort @@ -22434,7 +22525,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1639 i32.const 0 call $~lib/env/abort @@ -22447,7 +22538,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1640 i32.const 0 call $~lib/env/abort @@ -22460,7 +22551,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1641 i32.const 0 call $~lib/env/abort @@ -22473,7 +22564,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1642 i32.const 0 call $~lib/env/abort @@ -22486,7 +22577,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1643 i32.const 0 call $~lib/env/abort @@ -22499,7 +22590,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1644 i32.const 0 call $~lib/env/abort @@ -22511,7 +22602,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1653 i32.const 0 call $~lib/env/abort @@ -22523,7 +22614,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1654 i32.const 0 call $~lib/env/abort @@ -22535,7 +22626,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1655 i32.const 0 call $~lib/env/abort @@ -22547,7 +22638,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1656 i32.const 0 call $~lib/env/abort @@ -22559,7 +22650,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1657 i32.const 0 call $~lib/env/abort @@ -22571,7 +22662,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1658 i32.const 0 call $~lib/env/abort @@ -22583,7 +22674,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1659 i32.const 0 call $~lib/env/abort @@ -22595,7 +22686,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1660 i32.const 0 call $~lib/env/abort @@ -22607,7 +22698,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1663 i32.const 0 call $~lib/env/abort @@ -22619,7 +22710,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1664 i32.const 0 call $~lib/env/abort @@ -22631,7 +22722,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1665 i32.const 0 call $~lib/env/abort @@ -22643,7 +22734,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1666 i32.const 0 call $~lib/env/abort @@ -22655,7 +22746,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1667 i32.const 0 call $~lib/env/abort @@ -22667,7 +22758,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1668 i32.const 0 call $~lib/env/abort @@ -22679,7 +22770,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1669 i32.const 0 call $~lib/env/abort @@ -22691,7 +22782,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1670 i32.const 0 call $~lib/env/abort @@ -22704,7 +22795,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1682 i32.const 0 call $~lib/env/abort @@ -22717,7 +22808,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1683 i32.const 0 call $~lib/env/abort @@ -22730,7 +22821,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1684 i32.const 0 call $~lib/env/abort @@ -22743,7 +22834,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1685 i32.const 0 call $~lib/env/abort @@ -22756,7 +22847,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1686 i32.const 0 call $~lib/env/abort @@ -22769,7 +22860,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1687 i32.const 0 call $~lib/env/abort @@ -22782,7 +22873,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1688 i32.const 0 call $~lib/env/abort @@ -22795,7 +22886,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1689 i32.const 0 call $~lib/env/abort @@ -22808,7 +22899,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1690 i32.const 0 call $~lib/env/abort @@ -22821,7 +22912,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1691 i32.const 0 call $~lib/env/abort @@ -22834,7 +22925,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1694 i32.const 0 call $~lib/env/abort @@ -22847,7 +22938,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1695 i32.const 0 call $~lib/env/abort @@ -22860,7 +22951,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1696 i32.const 0 call $~lib/env/abort @@ -22873,7 +22964,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1697 i32.const 0 call $~lib/env/abort @@ -22886,7 +22977,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1698 i32.const 0 call $~lib/env/abort @@ -22899,7 +22990,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1699 i32.const 0 call $~lib/env/abort @@ -22912,7 +23003,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1700 i32.const 0 call $~lib/env/abort @@ -22925,7 +23016,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1701 i32.const 0 call $~lib/env/abort @@ -22938,7 +23029,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1710 i32.const 0 call $~lib/env/abort @@ -22951,7 +23042,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1711 i32.const 0 call $~lib/env/abort @@ -22964,7 +23055,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1712 i32.const 0 call $~lib/env/abort @@ -22977,7 +23068,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1713 i32.const 0 call $~lib/env/abort @@ -22990,7 +23081,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1714 i32.const 0 call $~lib/env/abort @@ -23003,7 +23094,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1715 i32.const 0 call $~lib/env/abort @@ -23016,7 +23107,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1716 i32.const 0 call $~lib/env/abort @@ -23029,7 +23120,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1717 i32.const 0 call $~lib/env/abort @@ -23042,7 +23133,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1718 i32.const 0 call $~lib/env/abort @@ -23055,7 +23146,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1719 i32.const 0 call $~lib/env/abort @@ -23068,7 +23159,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1722 i32.const 0 call $~lib/env/abort @@ -23081,7 +23172,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1723 i32.const 0 call $~lib/env/abort @@ -23094,7 +23185,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1724 i32.const 0 call $~lib/env/abort @@ -23107,7 +23198,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1725 i32.const 0 call $~lib/env/abort @@ -23120,7 +23211,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1726 i32.const 0 call $~lib/env/abort @@ -23133,7 +23224,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1727 i32.const 0 call $~lib/env/abort @@ -23146,7 +23237,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1728 i32.const 0 call $~lib/env/abort @@ -23159,7 +23250,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1729 i32.const 0 call $~lib/env/abort @@ -23172,7 +23263,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1741 i32.const 0 call $~lib/env/abort @@ -23185,7 +23276,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1742 i32.const 0 call $~lib/env/abort @@ -23198,7 +23289,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1743 i32.const 0 call $~lib/env/abort @@ -23211,7 +23302,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1744 i32.const 0 call $~lib/env/abort @@ -23224,7 +23315,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1745 i32.const 0 call $~lib/env/abort @@ -23237,7 +23328,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1746 i32.const 0 call $~lib/env/abort @@ -23250,7 +23341,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1747 i32.const 0 call $~lib/env/abort @@ -23263,7 +23354,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1748 i32.const 0 call $~lib/env/abort @@ -23276,7 +23367,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1749 i32.const 0 call $~lib/env/abort @@ -23289,7 +23380,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1750 i32.const 0 call $~lib/env/abort @@ -23302,7 +23393,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1753 i32.const 0 call $~lib/env/abort @@ -23315,7 +23406,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1754 i32.const 0 call $~lib/env/abort @@ -23328,7 +23419,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1755 i32.const 0 call $~lib/env/abort @@ -23341,7 +23432,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1756 i32.const 0 call $~lib/env/abort @@ -23354,7 +23445,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1757 i32.const 0 call $~lib/env/abort @@ -23367,7 +23458,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1758 i32.const 0 call $~lib/env/abort @@ -23380,7 +23471,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1759 i32.const 0 call $~lib/env/abort @@ -23393,7 +23484,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1760 i32.const 0 call $~lib/env/abort @@ -23406,7 +23497,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1769 i32.const 0 call $~lib/env/abort @@ -23419,7 +23510,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1770 i32.const 0 call $~lib/env/abort @@ -23432,7 +23523,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1771 i32.const 0 call $~lib/env/abort @@ -23445,7 +23536,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1772 i32.const 0 call $~lib/env/abort @@ -23458,7 +23549,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1773 i32.const 0 call $~lib/env/abort @@ -23471,7 +23562,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1774 i32.const 0 call $~lib/env/abort @@ -23484,7 +23575,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1775 i32.const 0 call $~lib/env/abort @@ -23497,7 +23588,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1776 i32.const 0 call $~lib/env/abort @@ -23510,7 +23601,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1777 i32.const 0 call $~lib/env/abort @@ -23523,7 +23614,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1778 i32.const 0 call $~lib/env/abort @@ -23536,7 +23627,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1781 i32.const 0 call $~lib/env/abort @@ -23549,7 +23640,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1782 i32.const 0 call $~lib/env/abort @@ -23562,7 +23653,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1783 i32.const 0 call $~lib/env/abort @@ -23575,7 +23666,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1784 i32.const 0 call $~lib/env/abort @@ -23588,7 +23679,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1785 i32.const 0 call $~lib/env/abort @@ -23601,7 +23692,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1786 i32.const 0 call $~lib/env/abort @@ -23614,7 +23705,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1787 i32.const 0 call $~lib/env/abort @@ -23627,7 +23718,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1788 i32.const 0 call $~lib/env/abort @@ -23640,7 +23731,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1789 i32.const 0 call $~lib/env/abort @@ -23653,7 +23744,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1801 i32.const 0 call $~lib/env/abort @@ -23666,7 +23757,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1802 i32.const 0 call $~lib/env/abort @@ -23679,7 +23770,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1803 i32.const 0 call $~lib/env/abort @@ -23692,7 +23783,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1804 i32.const 0 call $~lib/env/abort @@ -23705,7 +23796,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1805 i32.const 0 call $~lib/env/abort @@ -23718,7 +23809,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1806 i32.const 0 call $~lib/env/abort @@ -23731,7 +23822,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1807 i32.const 0 call $~lib/env/abort @@ -23744,7 +23835,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1808 i32.const 0 call $~lib/env/abort @@ -23757,7 +23848,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1809 i32.const 0 call $~lib/env/abort @@ -23770,7 +23861,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1810 i32.const 0 call $~lib/env/abort @@ -23783,7 +23874,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1813 i32.const 0 call $~lib/env/abort @@ -23796,7 +23887,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1814 i32.const 0 call $~lib/env/abort @@ -23809,7 +23900,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1815 i32.const 0 call $~lib/env/abort @@ -23822,7 +23913,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1816 i32.const 0 call $~lib/env/abort @@ -23835,7 +23926,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1817 i32.const 0 call $~lib/env/abort @@ -23848,7 +23939,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1818 i32.const 0 call $~lib/env/abort @@ -23861,7 +23952,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1819 i32.const 0 call $~lib/env/abort @@ -23874,7 +23965,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1820 i32.const 0 call $~lib/env/abort @@ -23887,7 +23978,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1829 i32.const 0 call $~lib/env/abort @@ -23900,7 +23991,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1830 i32.const 0 call $~lib/env/abort @@ -23913,7 +24004,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1831 i32.const 0 call $~lib/env/abort @@ -23926,7 +24017,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1832 i32.const 0 call $~lib/env/abort @@ -23939,7 +24030,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1833 i32.const 0 call $~lib/env/abort @@ -23952,7 +24043,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1834 i32.const 0 call $~lib/env/abort @@ -23965,7 +24056,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1835 i32.const 0 call $~lib/env/abort @@ -23978,7 +24069,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1836 i32.const 0 call $~lib/env/abort @@ -23991,7 +24082,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1837 i32.const 0 call $~lib/env/abort @@ -24004,7 +24095,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1838 i32.const 0 call $~lib/env/abort @@ -24017,7 +24108,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1841 i32.const 0 call $~lib/env/abort @@ -24030,7 +24121,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1842 i32.const 0 call $~lib/env/abort @@ -24043,7 +24134,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1843 i32.const 0 call $~lib/env/abort @@ -24056,7 +24147,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1844 i32.const 0 call $~lib/env/abort @@ -24069,7 +24160,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1845 i32.const 0 call $~lib/env/abort @@ -24082,7 +24173,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1846 i32.const 0 call $~lib/env/abort @@ -24095,7 +24186,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1847 i32.const 0 call $~lib/env/abort @@ -24108,7 +24199,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1848 i32.const 0 call $~lib/env/abort @@ -24121,7 +24212,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1860 i32.const 0 call $~lib/env/abort @@ -24134,7 +24225,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1861 i32.const 0 call $~lib/env/abort @@ -24147,7 +24238,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1862 i32.const 0 call $~lib/env/abort @@ -24160,7 +24251,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1863 i32.const 0 call $~lib/env/abort @@ -24173,7 +24264,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1864 i32.const 0 call $~lib/env/abort @@ -24186,7 +24277,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1865 i32.const 0 call $~lib/env/abort @@ -24199,7 +24290,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1866 i32.const 0 call $~lib/env/abort @@ -24212,7 +24303,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1867 i32.const 0 call $~lib/env/abort @@ -24225,7 +24316,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1868 i32.const 0 call $~lib/env/abort @@ -24238,7 +24329,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1869 i32.const 0 call $~lib/env/abort @@ -24251,7 +24342,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1872 i32.const 0 call $~lib/env/abort @@ -24264,7 +24355,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1873 i32.const 0 call $~lib/env/abort @@ -24277,7 +24368,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1874 i32.const 0 call $~lib/env/abort @@ -24290,7 +24381,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1875 i32.const 0 call $~lib/env/abort @@ -24303,7 +24394,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1876 i32.const 0 call $~lib/env/abort @@ -24316,7 +24407,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1877 i32.const 0 call $~lib/env/abort @@ -24329,7 +24420,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1878 i32.const 0 call $~lib/env/abort @@ -24342,7 +24433,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1879 i32.const 0 call $~lib/env/abort @@ -24355,7 +24446,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1880 i32.const 0 call $~lib/env/abort @@ -24368,7 +24459,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1881 i32.const 0 call $~lib/env/abort @@ -24381,7 +24472,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1882 i32.const 0 call $~lib/env/abort @@ -24394,7 +24485,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1883 i32.const 0 call $~lib/env/abort @@ -24407,7 +24498,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1884 i32.const 0 call $~lib/env/abort @@ -24420,7 +24511,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1885 i32.const 0 call $~lib/env/abort @@ -24433,7 +24524,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1886 i32.const 0 call $~lib/env/abort @@ -24446,7 +24537,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1887 i32.const 0 call $~lib/env/abort @@ -24459,7 +24550,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1888 i32.const 0 call $~lib/env/abort @@ -24472,7 +24563,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1889 i32.const 0 call $~lib/env/abort @@ -24485,7 +24576,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1890 i32.const 0 call $~lib/env/abort @@ -24498,7 +24589,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1891 i32.const 0 call $~lib/env/abort @@ -24511,7 +24602,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1892 i32.const 0 call $~lib/env/abort @@ -24524,7 +24615,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1893 i32.const 0 call $~lib/env/abort @@ -24537,7 +24628,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1894 i32.const 0 call $~lib/env/abort @@ -24550,7 +24641,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1895 i32.const 0 call $~lib/env/abort @@ -24563,7 +24654,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1896 i32.const 0 call $~lib/env/abort @@ -24576,7 +24667,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1897 i32.const 0 call $~lib/env/abort @@ -24589,7 +24680,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1898 i32.const 0 call $~lib/env/abort @@ -24602,7 +24693,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1899 i32.const 0 call $~lib/env/abort @@ -24615,7 +24706,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1900 i32.const 0 call $~lib/env/abort @@ -24628,7 +24719,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1901 i32.const 0 call $~lib/env/abort @@ -24641,7 +24732,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1902 i32.const 0 call $~lib/env/abort @@ -24654,7 +24745,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1903 i32.const 0 call $~lib/env/abort @@ -24667,7 +24758,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1904 i32.const 0 call $~lib/env/abort @@ -24680,7 +24771,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1905 i32.const 0 call $~lib/env/abort @@ -24693,7 +24784,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1906 i32.const 0 call $~lib/env/abort @@ -24706,7 +24797,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1907 i32.const 0 call $~lib/env/abort @@ -24719,7 +24810,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1908 i32.const 0 call $~lib/env/abort @@ -24732,7 +24823,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1909 i32.const 0 call $~lib/env/abort @@ -24745,7 +24836,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1910 i32.const 0 call $~lib/env/abort @@ -24758,7 +24849,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1911 i32.const 0 call $~lib/env/abort @@ -24771,7 +24862,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1912 i32.const 0 call $~lib/env/abort @@ -24784,7 +24875,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1913 i32.const 0 call $~lib/env/abort @@ -24797,7 +24888,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1914 i32.const 0 call $~lib/env/abort @@ -24810,7 +24901,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1915 i32.const 0 call $~lib/env/abort @@ -24823,7 +24914,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1916 i32.const 0 call $~lib/env/abort @@ -24836,7 +24927,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1917 i32.const 0 call $~lib/env/abort @@ -24849,7 +24940,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1918 i32.const 0 call $~lib/env/abort @@ -24862,7 +24953,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1919 i32.const 0 call $~lib/env/abort @@ -24875,7 +24966,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1920 i32.const 0 call $~lib/env/abort @@ -24888,7 +24979,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1921 i32.const 0 call $~lib/env/abort @@ -24901,7 +24992,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1922 i32.const 0 call $~lib/env/abort @@ -24914,7 +25005,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1923 i32.const 0 call $~lib/env/abort @@ -24927,7 +25018,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1924 i32.const 0 call $~lib/env/abort @@ -24940,7 +25031,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1925 i32.const 0 call $~lib/env/abort @@ -24953,7 +25044,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1926 i32.const 0 call $~lib/env/abort @@ -24966,7 +25057,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1927 i32.const 0 call $~lib/env/abort @@ -24979,7 +25070,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1928 i32.const 0 call $~lib/env/abort @@ -24992,7 +25083,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1929 i32.const 0 call $~lib/env/abort @@ -25005,7 +25096,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1938 i32.const 0 call $~lib/env/abort @@ -25018,7 +25109,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1939 i32.const 0 call $~lib/env/abort @@ -25031,7 +25122,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1940 i32.const 0 call $~lib/env/abort @@ -25044,7 +25135,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1941 i32.const 0 call $~lib/env/abort @@ -25057,7 +25148,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1942 i32.const 0 call $~lib/env/abort @@ -25070,7 +25161,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1943 i32.const 0 call $~lib/env/abort @@ -25083,7 +25174,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1944 i32.const 0 call $~lib/env/abort @@ -25096,7 +25187,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1945 i32.const 0 call $~lib/env/abort @@ -25109,7 +25200,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1946 i32.const 0 call $~lib/env/abort @@ -25122,7 +25213,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1947 i32.const 0 call $~lib/env/abort @@ -25135,7 +25226,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1950 i32.const 0 call $~lib/env/abort @@ -25148,7 +25239,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1951 i32.const 0 call $~lib/env/abort @@ -25161,7 +25252,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1952 i32.const 0 call $~lib/env/abort @@ -25174,7 +25265,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1953 i32.const 0 call $~lib/env/abort @@ -25187,7 +25278,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1954 i32.const 0 call $~lib/env/abort @@ -25200,7 +25291,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1955 i32.const 0 call $~lib/env/abort @@ -25213,7 +25304,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1956 i32.const 0 call $~lib/env/abort @@ -25226,7 +25317,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1957 i32.const 0 call $~lib/env/abort @@ -25239,7 +25330,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1958 i32.const 0 call $~lib/env/abort @@ -25252,7 +25343,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1959 i32.const 0 call $~lib/env/abort @@ -25265,7 +25356,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1960 i32.const 0 call $~lib/env/abort @@ -25278,7 +25369,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1961 i32.const 0 call $~lib/env/abort @@ -25291,7 +25382,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1962 i32.const 0 call $~lib/env/abort @@ -25304,7 +25395,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1963 i32.const 0 call $~lib/env/abort @@ -25317,7 +25408,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1964 i32.const 0 call $~lib/env/abort @@ -25330,7 +25421,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1965 i32.const 0 call $~lib/env/abort @@ -25343,7 +25434,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1966 i32.const 0 call $~lib/env/abort @@ -25356,7 +25447,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1967 i32.const 0 call $~lib/env/abort @@ -25369,7 +25460,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1968 i32.const 0 call $~lib/env/abort @@ -25382,7 +25473,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1969 i32.const 0 call $~lib/env/abort @@ -25395,7 +25486,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1970 i32.const 0 call $~lib/env/abort @@ -25408,7 +25499,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1971 i32.const 0 call $~lib/env/abort @@ -25421,7 +25512,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1972 i32.const 0 call $~lib/env/abort @@ -25434,7 +25525,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1973 i32.const 0 call $~lib/env/abort @@ -25447,7 +25538,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1974 i32.const 0 call $~lib/env/abort @@ -25460,7 +25551,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1975 i32.const 0 call $~lib/env/abort @@ -25473,7 +25564,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1976 i32.const 0 call $~lib/env/abort @@ -25486,7 +25577,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1977 i32.const 0 call $~lib/env/abort @@ -25499,7 +25590,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1978 i32.const 0 call $~lib/env/abort @@ -25512,7 +25603,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1979 i32.const 0 call $~lib/env/abort @@ -25525,7 +25616,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1980 i32.const 0 call $~lib/env/abort @@ -25538,7 +25629,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1981 i32.const 0 call $~lib/env/abort @@ -25551,7 +25642,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1982 i32.const 0 call $~lib/env/abort @@ -25564,7 +25655,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1983 i32.const 0 call $~lib/env/abort @@ -25577,7 +25668,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1984 i32.const 0 call $~lib/env/abort @@ -25590,7 +25681,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1985 i32.const 0 call $~lib/env/abort @@ -25603,7 +25694,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1986 i32.const 0 call $~lib/env/abort @@ -25616,7 +25707,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1987 i32.const 0 call $~lib/env/abort @@ -25629,7 +25720,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1988 i32.const 0 call $~lib/env/abort @@ -25642,7 +25733,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1989 i32.const 0 call $~lib/env/abort @@ -25655,7 +25746,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1990 i32.const 0 call $~lib/env/abort @@ -25668,7 +25759,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1991 i32.const 0 call $~lib/env/abort @@ -25681,7 +25772,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1992 i32.const 0 call $~lib/env/abort @@ -25694,7 +25785,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1993 i32.const 0 call $~lib/env/abort @@ -25707,7 +25798,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1994 i32.const 0 call $~lib/env/abort @@ -25720,7 +25811,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1995 i32.const 0 call $~lib/env/abort @@ -25733,7 +25824,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1996 i32.const 0 call $~lib/env/abort @@ -25746,7 +25837,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1997 i32.const 0 call $~lib/env/abort @@ -25759,7 +25850,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1998 i32.const 0 call $~lib/env/abort @@ -25772,7 +25863,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1999 i32.const 0 call $~lib/env/abort @@ -25785,7 +25876,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2000 i32.const 0 call $~lib/env/abort @@ -25798,7 +25889,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2001 i32.const 0 call $~lib/env/abort @@ -25811,7 +25902,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2002 i32.const 0 call $~lib/env/abort @@ -25824,7 +25915,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2003 i32.const 0 call $~lib/env/abort @@ -25837,7 +25928,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2004 i32.const 0 call $~lib/env/abort @@ -25850,7 +25941,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2005 i32.const 0 call $~lib/env/abort @@ -25863,7 +25954,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2006 i32.const 0 call $~lib/env/abort @@ -25876,7 +25967,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2007 i32.const 0 call $~lib/env/abort @@ -25889,7 +25980,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2019 i32.const 0 call $~lib/env/abort @@ -25902,7 +25993,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2020 i32.const 0 call $~lib/env/abort @@ -25915,7 +26006,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2021 i32.const 0 call $~lib/env/abort @@ -25928,7 +26019,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2022 i32.const 0 call $~lib/env/abort @@ -25941,7 +26032,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2023 i32.const 0 call $~lib/env/abort @@ -25954,7 +26045,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2024 i32.const 0 call $~lib/env/abort @@ -25967,7 +26058,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2025 i32.const 0 call $~lib/env/abort @@ -25980,7 +26071,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2026 i32.const 0 call $~lib/env/abort @@ -25993,7 +26084,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2027 i32.const 0 call $~lib/env/abort @@ -26006,7 +26097,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2028 i32.const 0 call $~lib/env/abort @@ -26019,7 +26110,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2031 i32.const 0 call $~lib/env/abort @@ -26032,7 +26123,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2032 i32.const 0 call $~lib/env/abort @@ -26045,7 +26136,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2033 i32.const 0 call $~lib/env/abort @@ -26058,7 +26149,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2034 i32.const 0 call $~lib/env/abort @@ -26071,7 +26162,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2035 i32.const 0 call $~lib/env/abort @@ -26084,7 +26175,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2036 i32.const 0 call $~lib/env/abort @@ -26097,7 +26188,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2037 i32.const 0 call $~lib/env/abort @@ -26110,7 +26201,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2038 i32.const 0 call $~lib/env/abort @@ -26123,7 +26214,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2039 i32.const 0 call $~lib/env/abort @@ -26136,7 +26227,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2040 i32.const 0 call $~lib/env/abort @@ -26149,7 +26240,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2041 i32.const 0 call $~lib/env/abort @@ -26162,7 +26253,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2042 i32.const 0 call $~lib/env/abort @@ -26175,7 +26266,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2043 i32.const 0 call $~lib/env/abort @@ -26188,7 +26279,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2044 i32.const 0 call $~lib/env/abort @@ -26201,7 +26292,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2045 i32.const 0 call $~lib/env/abort @@ -26214,7 +26305,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2046 i32.const 0 call $~lib/env/abort @@ -26227,7 +26318,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2047 i32.const 0 call $~lib/env/abort @@ -26240,7 +26331,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2048 i32.const 0 call $~lib/env/abort @@ -26253,7 +26344,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2049 i32.const 0 call $~lib/env/abort @@ -26266,7 +26357,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2050 i32.const 0 call $~lib/env/abort @@ -26279,7 +26370,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2051 i32.const 0 call $~lib/env/abort @@ -26292,7 +26383,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2052 i32.const 0 call $~lib/env/abort @@ -26305,7 +26396,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2053 i32.const 0 call $~lib/env/abort @@ -26318,7 +26409,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2054 i32.const 0 call $~lib/env/abort @@ -26331,7 +26422,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2055 i32.const 0 call $~lib/env/abort @@ -26344,7 +26435,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2056 i32.const 0 call $~lib/env/abort @@ -26357,7 +26448,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2057 i32.const 0 call $~lib/env/abort @@ -26370,7 +26461,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2058 i32.const 0 call $~lib/env/abort @@ -26383,7 +26474,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2059 i32.const 0 call $~lib/env/abort @@ -26396,7 +26487,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2060 i32.const 0 call $~lib/env/abort @@ -26409,7 +26500,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2061 i32.const 0 call $~lib/env/abort @@ -26422,7 +26513,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2062 i32.const 0 call $~lib/env/abort @@ -26435,7 +26526,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2063 i32.const 0 call $~lib/env/abort @@ -26448,7 +26539,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2064 i32.const 0 call $~lib/env/abort @@ -26461,7 +26552,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2065 i32.const 0 call $~lib/env/abort @@ -26474,7 +26565,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2066 i32.const 0 call $~lib/env/abort @@ -26487,7 +26578,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2067 i32.const 0 call $~lib/env/abort @@ -26500,7 +26591,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2068 i32.const 0 call $~lib/env/abort @@ -26513,7 +26604,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2069 i32.const 0 call $~lib/env/abort @@ -26526,7 +26617,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2070 i32.const 0 call $~lib/env/abort @@ -26539,7 +26630,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2071 i32.const 0 call $~lib/env/abort @@ -26552,7 +26643,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2072 i32.const 0 call $~lib/env/abort @@ -26565,7 +26656,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2073 i32.const 0 call $~lib/env/abort @@ -26578,7 +26669,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2074 i32.const 0 call $~lib/env/abort @@ -26591,7 +26682,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2075 i32.const 0 call $~lib/env/abort @@ -26604,7 +26695,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2076 i32.const 0 call $~lib/env/abort @@ -26617,7 +26708,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2077 i32.const 0 call $~lib/env/abort @@ -26630,7 +26721,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2078 i32.const 0 call $~lib/env/abort @@ -26643,7 +26734,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2079 i32.const 0 call $~lib/env/abort @@ -26656,7 +26747,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2080 i32.const 0 call $~lib/env/abort @@ -26669,7 +26760,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2081 i32.const 0 call $~lib/env/abort @@ -26682,7 +26773,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2082 i32.const 0 call $~lib/env/abort @@ -26695,7 +26786,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2083 i32.const 0 call $~lib/env/abort @@ -26708,7 +26799,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2084 i32.const 0 call $~lib/env/abort @@ -26721,7 +26812,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2085 i32.const 0 call $~lib/env/abort @@ -26734,7 +26825,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2086 i32.const 0 call $~lib/env/abort @@ -26747,7 +26838,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2087 i32.const 0 call $~lib/env/abort @@ -26760,7 +26851,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2088 i32.const 0 call $~lib/env/abort @@ -26773,7 +26864,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2097 i32.const 0 call $~lib/env/abort @@ -26786,7 +26877,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2098 i32.const 0 call $~lib/env/abort @@ -26799,7 +26890,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2099 i32.const 0 call $~lib/env/abort @@ -26812,7 +26903,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2100 i32.const 0 call $~lib/env/abort @@ -26825,7 +26916,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2101 i32.const 0 call $~lib/env/abort @@ -26838,7 +26929,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2102 i32.const 0 call $~lib/env/abort @@ -26851,7 +26942,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2103 i32.const 0 call $~lib/env/abort @@ -26864,7 +26955,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2104 i32.const 0 call $~lib/env/abort @@ -26877,7 +26968,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2105 i32.const 0 call $~lib/env/abort @@ -26890,7 +26981,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2106 i32.const 0 call $~lib/env/abort @@ -26903,7 +26994,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2109 i32.const 0 call $~lib/env/abort @@ -26916,7 +27007,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2110 i32.const 0 call $~lib/env/abort @@ -26929,7 +27020,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2111 i32.const 0 call $~lib/env/abort @@ -26942,7 +27033,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2112 i32.const 0 call $~lib/env/abort @@ -26955,7 +27046,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2113 i32.const 0 call $~lib/env/abort @@ -26968,7 +27059,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2114 i32.const 0 call $~lib/env/abort @@ -26981,7 +27072,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2115 i32.const 0 call $~lib/env/abort @@ -26994,7 +27085,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2116 i32.const 0 call $~lib/env/abort @@ -27007,7 +27098,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2117 i32.const 0 call $~lib/env/abort @@ -27020,7 +27111,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2118 i32.const 0 call $~lib/env/abort @@ -27033,7 +27124,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2119 i32.const 0 call $~lib/env/abort @@ -27046,7 +27137,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2120 i32.const 0 call $~lib/env/abort @@ -27059,7 +27150,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2121 i32.const 0 call $~lib/env/abort @@ -27072,7 +27163,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2122 i32.const 0 call $~lib/env/abort @@ -27085,7 +27176,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2123 i32.const 0 call $~lib/env/abort @@ -27098,7 +27189,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2124 i32.const 0 call $~lib/env/abort @@ -27111,7 +27202,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2125 i32.const 0 call $~lib/env/abort @@ -27124,7 +27215,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2126 i32.const 0 call $~lib/env/abort @@ -27137,7 +27228,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2127 i32.const 0 call $~lib/env/abort @@ -27150,7 +27241,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2128 i32.const 0 call $~lib/env/abort @@ -27163,7 +27254,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2129 i32.const 0 call $~lib/env/abort @@ -27176,7 +27267,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2130 i32.const 0 call $~lib/env/abort @@ -27189,7 +27280,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2131 i32.const 0 call $~lib/env/abort @@ -27202,7 +27293,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2132 i32.const 0 call $~lib/env/abort @@ -27215,7 +27306,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2133 i32.const 0 call $~lib/env/abort @@ -27228,7 +27319,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2134 i32.const 0 call $~lib/env/abort @@ -27241,7 +27332,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2135 i32.const 0 call $~lib/env/abort @@ -27254,7 +27345,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2136 i32.const 0 call $~lib/env/abort @@ -27267,7 +27358,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2137 i32.const 0 call $~lib/env/abort @@ -27280,7 +27371,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2138 i32.const 0 call $~lib/env/abort @@ -27293,7 +27384,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2139 i32.const 0 call $~lib/env/abort @@ -27306,7 +27397,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2140 i32.const 0 call $~lib/env/abort @@ -27319,7 +27410,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2141 i32.const 0 call $~lib/env/abort @@ -27332,7 +27423,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2142 i32.const 0 call $~lib/env/abort @@ -27345,7 +27436,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2143 i32.const 0 call $~lib/env/abort @@ -27358,7 +27449,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2144 i32.const 0 call $~lib/env/abort @@ -27371,7 +27462,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2145 i32.const 0 call $~lib/env/abort @@ -27384,7 +27475,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2146 i32.const 0 call $~lib/env/abort @@ -27397,7 +27488,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2147 i32.const 0 call $~lib/env/abort @@ -27410,7 +27501,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2148 i32.const 0 call $~lib/env/abort @@ -27423,7 +27514,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2149 i32.const 0 call $~lib/env/abort @@ -27436,7 +27527,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2150 i32.const 0 call $~lib/env/abort @@ -27449,7 +27540,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2151 i32.const 0 call $~lib/env/abort @@ -27462,7 +27553,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2152 i32.const 0 call $~lib/env/abort @@ -27475,7 +27566,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2153 i32.const 0 call $~lib/env/abort @@ -27488,7 +27579,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2154 i32.const 0 call $~lib/env/abort @@ -27501,7 +27592,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2155 i32.const 0 call $~lib/env/abort @@ -27514,7 +27605,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2156 i32.const 0 call $~lib/env/abort @@ -27527,7 +27618,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2157 i32.const 0 call $~lib/env/abort @@ -27540,7 +27631,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2158 i32.const 0 call $~lib/env/abort @@ -27553,7 +27644,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2159 i32.const 0 call $~lib/env/abort @@ -27566,7 +27657,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2160 i32.const 0 call $~lib/env/abort @@ -27579,7 +27670,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2161 i32.const 0 call $~lib/env/abort @@ -27592,7 +27683,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2162 i32.const 0 call $~lib/env/abort @@ -27605,7 +27696,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2163 i32.const 0 call $~lib/env/abort @@ -27618,7 +27709,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2164 i32.const 0 call $~lib/env/abort @@ -27631,7 +27722,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2165 i32.const 0 call $~lib/env/abort @@ -27644,7 +27735,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2166 i32.const 0 call $~lib/env/abort @@ -27657,7 +27748,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2180 i32.const 0 call $~lib/env/abort @@ -27670,7 +27761,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2181 i32.const 0 call $~lib/env/abort @@ -27683,7 +27774,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2182 i32.const 0 call $~lib/env/abort @@ -27696,7 +27787,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2183 i32.const 0 call $~lib/env/abort @@ -27709,7 +27800,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2184 i32.const 0 call $~lib/env/abort @@ -27722,7 +27813,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2185 i32.const 0 call $~lib/env/abort @@ -27735,7 +27826,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2186 i32.const 0 call $~lib/env/abort @@ -27748,7 +27839,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2187 i32.const 0 call $~lib/env/abort @@ -27761,7 +27852,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2188 i32.const 0 call $~lib/env/abort @@ -27774,7 +27865,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2189 i32.const 0 call $~lib/env/abort @@ -27787,7 +27878,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2192 i32.const 0 call $~lib/env/abort @@ -27800,7 +27891,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2193 i32.const 0 call $~lib/env/abort @@ -27813,7 +27904,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2194 i32.const 0 call $~lib/env/abort @@ -27826,7 +27917,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2195 i32.const 0 call $~lib/env/abort @@ -27839,7 +27930,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2196 i32.const 0 call $~lib/env/abort @@ -27852,7 +27943,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2197 i32.const 0 call $~lib/env/abort @@ -27865,7 +27956,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2198 i32.const 0 call $~lib/env/abort @@ -27878,7 +27969,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2199 i32.const 0 call $~lib/env/abort @@ -27891,7 +27982,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2200 i32.const 0 call $~lib/env/abort @@ -27904,7 +27995,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2201 i32.const 0 call $~lib/env/abort @@ -27917,7 +28008,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2202 i32.const 0 call $~lib/env/abort @@ -27930,7 +28021,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2203 i32.const 0 call $~lib/env/abort @@ -27943,7 +28034,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2204 i32.const 0 call $~lib/env/abort @@ -27956,7 +28047,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2205 i32.const 0 call $~lib/env/abort @@ -27969,7 +28060,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2206 i32.const 0 call $~lib/env/abort @@ -27982,7 +28073,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2207 i32.const 0 call $~lib/env/abort @@ -27995,7 +28086,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2208 i32.const 0 call $~lib/env/abort @@ -28008,7 +28099,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2209 i32.const 0 call $~lib/env/abort @@ -28021,7 +28112,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2210 i32.const 0 call $~lib/env/abort @@ -28034,7 +28125,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2211 i32.const 0 call $~lib/env/abort @@ -28047,7 +28138,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2212 i32.const 0 call $~lib/env/abort @@ -28060,7 +28151,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2213 i32.const 0 call $~lib/env/abort @@ -28073,7 +28164,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2214 i32.const 0 call $~lib/env/abort @@ -28086,7 +28177,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2215 i32.const 0 call $~lib/env/abort @@ -28099,7 +28190,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2216 i32.const 0 call $~lib/env/abort @@ -28112,7 +28203,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2217 i32.const 0 call $~lib/env/abort @@ -28125,7 +28216,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2218 i32.const 0 call $~lib/env/abort @@ -28138,7 +28229,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2219 i32.const 0 call $~lib/env/abort @@ -28151,7 +28242,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2220 i32.const 0 call $~lib/env/abort @@ -28164,7 +28255,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2221 i32.const 0 call $~lib/env/abort @@ -28177,7 +28268,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2222 i32.const 0 call $~lib/env/abort @@ -28190,7 +28281,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2223 i32.const 0 call $~lib/env/abort @@ -28203,7 +28294,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2224 i32.const 0 call $~lib/env/abort @@ -28216,7 +28307,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2225 i32.const 0 call $~lib/env/abort @@ -28229,7 +28320,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2226 i32.const 0 call $~lib/env/abort @@ -28242,7 +28333,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2227 i32.const 0 call $~lib/env/abort @@ -28255,7 +28346,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2228 i32.const 0 call $~lib/env/abort @@ -28268,7 +28359,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2229 i32.const 0 call $~lib/env/abort @@ -28281,7 +28372,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2230 i32.const 0 call $~lib/env/abort @@ -28294,7 +28385,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2231 i32.const 0 call $~lib/env/abort @@ -28307,7 +28398,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2232 i32.const 0 call $~lib/env/abort @@ -28320,7 +28411,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2233 i32.const 0 call $~lib/env/abort @@ -28333,7 +28424,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2234 i32.const 0 call $~lib/env/abort @@ -28346,7 +28437,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2235 i32.const 0 call $~lib/env/abort @@ -28359,7 +28450,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2236 i32.const 0 call $~lib/env/abort @@ -28372,7 +28463,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2237 i32.const 0 call $~lib/env/abort @@ -28385,7 +28476,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2238 i32.const 0 call $~lib/env/abort @@ -28398,7 +28489,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2239 i32.const 0 call $~lib/env/abort @@ -28411,7 +28502,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2240 i32.const 0 call $~lib/env/abort @@ -28424,7 +28515,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2241 i32.const 0 call $~lib/env/abort @@ -28437,7 +28528,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2242 i32.const 0 call $~lib/env/abort @@ -28450,7 +28541,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2243 i32.const 0 call $~lib/env/abort @@ -28463,7 +28554,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2244 i32.const 0 call $~lib/env/abort @@ -28476,7 +28567,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2245 i32.const 0 call $~lib/env/abort @@ -28489,7 +28580,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2246 i32.const 0 call $~lib/env/abort @@ -28502,7 +28593,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2247 i32.const 0 call $~lib/env/abort @@ -28515,7 +28606,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2248 i32.const 0 call $~lib/env/abort @@ -28528,7 +28619,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2249 i32.const 0 call $~lib/env/abort @@ -28541,7 +28632,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2250 i32.const 0 call $~lib/env/abort @@ -28554,7 +28645,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2251 i32.const 0 call $~lib/env/abort @@ -28567,7 +28658,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2252 i32.const 0 call $~lib/env/abort @@ -28580,7 +28671,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2253 i32.const 0 call $~lib/env/abort @@ -28593,7 +28684,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2254 i32.const 0 call $~lib/env/abort @@ -28606,7 +28697,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2255 i32.const 0 call $~lib/env/abort @@ -28619,7 +28710,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2256 i32.const 0 call $~lib/env/abort @@ -28632,7 +28723,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2257 i32.const 0 call $~lib/env/abort @@ -28645,7 +28736,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2266 i32.const 0 call $~lib/env/abort @@ -28658,7 +28749,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2267 i32.const 0 call $~lib/env/abort @@ -28671,7 +28762,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2268 i32.const 0 call $~lib/env/abort @@ -28684,7 +28775,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2269 i32.const 0 call $~lib/env/abort @@ -28697,7 +28788,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2270 i32.const 0 call $~lib/env/abort @@ -28710,7 +28801,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2271 i32.const 0 call $~lib/env/abort @@ -28723,7 +28814,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2272 i32.const 0 call $~lib/env/abort @@ -28736,7 +28827,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2273 i32.const 0 call $~lib/env/abort @@ -28749,7 +28840,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2274 i32.const 0 call $~lib/env/abort @@ -28762,7 +28853,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2275 i32.const 0 call $~lib/env/abort @@ -28775,7 +28866,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2278 i32.const 0 call $~lib/env/abort @@ -28788,7 +28879,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2279 i32.const 0 call $~lib/env/abort @@ -28801,7 +28892,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2280 i32.const 0 call $~lib/env/abort @@ -28814,7 +28905,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2281 i32.const 0 call $~lib/env/abort @@ -28827,7 +28918,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2282 i32.const 0 call $~lib/env/abort @@ -28840,7 +28931,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2283 i32.const 0 call $~lib/env/abort @@ -28853,7 +28944,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2284 i32.const 0 call $~lib/env/abort @@ -28866,7 +28957,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2285 i32.const 0 call $~lib/env/abort @@ -28879,7 +28970,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2286 i32.const 0 call $~lib/env/abort @@ -28892,7 +28983,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2287 i32.const 0 call $~lib/env/abort @@ -28905,7 +28996,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2288 i32.const 0 call $~lib/env/abort @@ -28918,7 +29009,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2289 i32.const 0 call $~lib/env/abort @@ -28931,7 +29022,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2290 i32.const 0 call $~lib/env/abort @@ -28944,7 +29035,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2291 i32.const 0 call $~lib/env/abort @@ -28957,7 +29048,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2292 i32.const 0 call $~lib/env/abort @@ -28970,7 +29061,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2293 i32.const 0 call $~lib/env/abort @@ -28983,7 +29074,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2294 i32.const 0 call $~lib/env/abort @@ -28996,7 +29087,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2295 i32.const 0 call $~lib/env/abort @@ -29009,7 +29100,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2296 i32.const 0 call $~lib/env/abort @@ -29022,7 +29113,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2297 i32.const 0 call $~lib/env/abort @@ -29035,7 +29126,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2298 i32.const 0 call $~lib/env/abort @@ -29048,7 +29139,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2299 i32.const 0 call $~lib/env/abort @@ -29061,7 +29152,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2300 i32.const 0 call $~lib/env/abort @@ -29074,7 +29165,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2301 i32.const 0 call $~lib/env/abort @@ -29087,7 +29178,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2302 i32.const 0 call $~lib/env/abort @@ -29100,7 +29191,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2303 i32.const 0 call $~lib/env/abort @@ -29113,7 +29204,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2304 i32.const 0 call $~lib/env/abort @@ -29126,7 +29217,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2305 i32.const 0 call $~lib/env/abort @@ -29139,7 +29230,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2306 i32.const 0 call $~lib/env/abort @@ -29152,7 +29243,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2307 i32.const 0 call $~lib/env/abort @@ -29165,7 +29256,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2308 i32.const 0 call $~lib/env/abort @@ -29178,7 +29269,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2309 i32.const 0 call $~lib/env/abort @@ -29191,7 +29282,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2310 i32.const 0 call $~lib/env/abort @@ -29204,7 +29295,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2311 i32.const 0 call $~lib/env/abort @@ -29217,7 +29308,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2312 i32.const 0 call $~lib/env/abort @@ -29230,7 +29321,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2313 i32.const 0 call $~lib/env/abort @@ -29243,7 +29334,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2314 i32.const 0 call $~lib/env/abort @@ -29256,7 +29347,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2315 i32.const 0 call $~lib/env/abort @@ -29269,7 +29360,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2316 i32.const 0 call $~lib/env/abort @@ -29282,7 +29373,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2317 i32.const 0 call $~lib/env/abort @@ -29295,7 +29386,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2318 i32.const 0 call $~lib/env/abort @@ -29308,7 +29399,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2319 i32.const 0 call $~lib/env/abort @@ -29321,7 +29412,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2320 i32.const 0 call $~lib/env/abort @@ -29334,7 +29425,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2321 i32.const 0 call $~lib/env/abort @@ -29347,7 +29438,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2322 i32.const 0 call $~lib/env/abort @@ -29360,7 +29451,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2323 i32.const 0 call $~lib/env/abort @@ -29373,7 +29464,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2324 i32.const 0 call $~lib/env/abort @@ -29386,7 +29477,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2325 i32.const 0 call $~lib/env/abort @@ -29399,7 +29490,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2326 i32.const 0 call $~lib/env/abort @@ -29412,7 +29503,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2327 i32.const 0 call $~lib/env/abort @@ -29425,7 +29516,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2328 i32.const 0 call $~lib/env/abort @@ -29438,7 +29529,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2329 i32.const 0 call $~lib/env/abort @@ -29451,7 +29542,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2330 i32.const 0 call $~lib/env/abort @@ -29464,7 +29555,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2331 i32.const 0 call $~lib/env/abort @@ -29477,7 +29568,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2332 i32.const 0 call $~lib/env/abort @@ -29490,7 +29581,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2333 i32.const 0 call $~lib/env/abort @@ -29503,7 +29594,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2334 i32.const 0 call $~lib/env/abort @@ -29516,7 +29607,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2335 i32.const 0 call $~lib/env/abort @@ -29529,7 +29620,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2336 i32.const 0 call $~lib/env/abort @@ -29542,7 +29633,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2337 i32.const 0 call $~lib/env/abort @@ -29555,7 +29646,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2338 i32.const 0 call $~lib/env/abort @@ -29568,7 +29659,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2339 i32.const 0 call $~lib/env/abort @@ -29581,7 +29672,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2340 i32.const 0 call $~lib/env/abort @@ -29594,7 +29685,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2341 i32.const 0 call $~lib/env/abort @@ -29607,7 +29698,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2342 i32.const 0 call $~lib/env/abort @@ -29620,7 +29711,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2343 i32.const 0 call $~lib/env/abort @@ -29634,7 +29725,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2355 i32.const 0 call $~lib/env/abort @@ -29648,7 +29739,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2356 i32.const 0 call $~lib/env/abort @@ -29662,7 +29753,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2357 i32.const 0 call $~lib/env/abort @@ -29676,7 +29767,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2358 i32.const 0 call $~lib/env/abort @@ -29690,7 +29781,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2359 i32.const 0 call $~lib/env/abort @@ -29704,7 +29795,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2360 i32.const 0 call $~lib/env/abort @@ -29718,7 +29809,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2361 i32.const 0 call $~lib/env/abort @@ -29732,7 +29823,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2362 i32.const 0 call $~lib/env/abort @@ -29746,7 +29837,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2363 i32.const 0 call $~lib/env/abort @@ -29760,7 +29851,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2364 i32.const 0 call $~lib/env/abort @@ -29774,7 +29865,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2367 i32.const 0 call $~lib/env/abort @@ -29788,7 +29879,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2368 i32.const 0 call $~lib/env/abort @@ -29802,7 +29893,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2369 i32.const 0 call $~lib/env/abort @@ -29816,7 +29907,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2370 i32.const 0 call $~lib/env/abort @@ -29830,7 +29921,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2371 i32.const 0 call $~lib/env/abort @@ -29844,7 +29935,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2372 i32.const 0 call $~lib/env/abort @@ -29858,7 +29949,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2373 i32.const 0 call $~lib/env/abort @@ -29872,7 +29963,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2374 i32.const 0 call $~lib/env/abort @@ -29886,7 +29977,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2375 i32.const 0 call $~lib/env/abort @@ -29900,7 +29991,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2376 i32.const 0 call $~lib/env/abort @@ -29914,7 +30005,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2377 i32.const 0 call $~lib/env/abort @@ -29928,7 +30019,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2378 i32.const 0 call $~lib/env/abort @@ -29942,7 +30033,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2379 i32.const 0 call $~lib/env/abort @@ -29956,7 +30047,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2380 i32.const 0 call $~lib/env/abort @@ -29970,7 +30061,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2381 i32.const 0 call $~lib/env/abort @@ -29984,7 +30075,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2382 i32.const 0 call $~lib/env/abort @@ -29998,7 +30089,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2383 i32.const 0 call $~lib/env/abort @@ -30012,7 +30103,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2384 i32.const 0 call $~lib/env/abort @@ -30026,7 +30117,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2385 i32.const 0 call $~lib/env/abort @@ -30040,7 +30131,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2386 i32.const 0 call $~lib/env/abort @@ -30054,7 +30145,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2387 i32.const 0 call $~lib/env/abort @@ -30068,7 +30159,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2388 i32.const 0 call $~lib/env/abort @@ -30082,7 +30173,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2389 i32.const 0 call $~lib/env/abort @@ -30096,7 +30187,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2390 i32.const 0 call $~lib/env/abort @@ -30110,7 +30201,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2391 i32.const 0 call $~lib/env/abort @@ -30124,7 +30215,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2392 i32.const 0 call $~lib/env/abort @@ -30138,7 +30229,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2393 i32.const 0 call $~lib/env/abort @@ -30152,7 +30243,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2394 i32.const 0 call $~lib/env/abort @@ -30166,7 +30257,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2395 i32.const 0 call $~lib/env/abort @@ -30180,7 +30271,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2396 i32.const 0 call $~lib/env/abort @@ -30194,7 +30285,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2397 i32.const 0 call $~lib/env/abort @@ -30208,7 +30299,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2398 i32.const 0 call $~lib/env/abort @@ -30222,7 +30313,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2399 i32.const 0 call $~lib/env/abort @@ -30236,7 +30327,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2400 i32.const 0 call $~lib/env/abort @@ -30250,7 +30341,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2401 i32.const 0 call $~lib/env/abort @@ -30264,7 +30355,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2402 i32.const 0 call $~lib/env/abort @@ -30278,7 +30369,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2403 i32.const 0 call $~lib/env/abort @@ -30292,7 +30383,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2404 i32.const 0 call $~lib/env/abort @@ -30306,7 +30397,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2405 i32.const 0 call $~lib/env/abort @@ -30320,7 +30411,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2406 i32.const 0 call $~lib/env/abort @@ -30334,7 +30425,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2407 i32.const 0 call $~lib/env/abort @@ -30348,7 +30439,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2408 i32.const 0 call $~lib/env/abort @@ -30362,7 +30453,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2409 i32.const 0 call $~lib/env/abort @@ -30376,7 +30467,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2410 i32.const 0 call $~lib/env/abort @@ -30390,7 +30481,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2411 i32.const 0 call $~lib/env/abort @@ -30404,7 +30495,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2412 i32.const 0 call $~lib/env/abort @@ -30418,7 +30509,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2413 i32.const 0 call $~lib/env/abort @@ -30432,7 +30523,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2414 i32.const 0 call $~lib/env/abort @@ -30446,7 +30537,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2415 i32.const 0 call $~lib/env/abort @@ -30460,7 +30551,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2416 i32.const 0 call $~lib/env/abort @@ -30474,7 +30565,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2417 i32.const 0 call $~lib/env/abort @@ -30488,7 +30579,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2418 i32.const 0 call $~lib/env/abort @@ -30502,7 +30593,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2419 i32.const 0 call $~lib/env/abort @@ -30516,7 +30607,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2420 i32.const 0 call $~lib/env/abort @@ -30530,7 +30621,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2421 i32.const 0 call $~lib/env/abort @@ -30544,7 +30635,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2422 i32.const 0 call $~lib/env/abort @@ -30558,7 +30649,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2423 i32.const 0 call $~lib/env/abort @@ -30572,7 +30663,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2424 i32.const 0 call $~lib/env/abort @@ -30586,7 +30677,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2425 i32.const 0 call $~lib/env/abort @@ -30600,7 +30691,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2426 i32.const 0 call $~lib/env/abort @@ -30614,7 +30705,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2427 i32.const 0 call $~lib/env/abort @@ -30628,7 +30719,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2428 i32.const 0 call $~lib/env/abort @@ -30642,7 +30733,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2429 i32.const 0 call $~lib/env/abort @@ -30656,7 +30747,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2430 i32.const 0 call $~lib/env/abort @@ -30670,7 +30761,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2431 i32.const 0 call $~lib/env/abort @@ -30684,7 +30775,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2432 i32.const 0 call $~lib/env/abort @@ -30698,7 +30789,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2433 i32.const 0 call $~lib/env/abort @@ -30712,7 +30803,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2434 i32.const 0 call $~lib/env/abort @@ -30726,7 +30817,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2435 i32.const 0 call $~lib/env/abort @@ -30740,7 +30831,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2436 i32.const 0 call $~lib/env/abort @@ -30754,7 +30845,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2437 i32.const 0 call $~lib/env/abort @@ -30768,7 +30859,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2438 i32.const 0 call $~lib/env/abort @@ -30782,7 +30873,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2439 i32.const 0 call $~lib/env/abort @@ -30796,7 +30887,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2440 i32.const 0 call $~lib/env/abort @@ -30810,7 +30901,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2441 i32.const 0 call $~lib/env/abort @@ -30824,7 +30915,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2442 i32.const 0 call $~lib/env/abort @@ -30838,7 +30929,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2443 i32.const 0 call $~lib/env/abort @@ -30852,7 +30943,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2444 i32.const 0 call $~lib/env/abort @@ -30866,7 +30957,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2445 i32.const 0 call $~lib/env/abort @@ -30880,7 +30971,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2446 i32.const 0 call $~lib/env/abort @@ -30894,7 +30985,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2447 i32.const 0 call $~lib/env/abort @@ -30908,7 +30999,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2448 i32.const 0 call $~lib/env/abort @@ -30922,7 +31013,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2449 i32.const 0 call $~lib/env/abort @@ -30936,7 +31027,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2450 i32.const 0 call $~lib/env/abort @@ -30950,7 +31041,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2451 i32.const 0 call $~lib/env/abort @@ -30964,7 +31055,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2452 i32.const 0 call $~lib/env/abort @@ -30978,7 +31069,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2453 i32.const 0 call $~lib/env/abort @@ -30992,7 +31083,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2454 i32.const 0 call $~lib/env/abort @@ -31006,7 +31097,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2455 i32.const 0 call $~lib/env/abort @@ -31020,7 +31111,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2456 i32.const 0 call $~lib/env/abort @@ -31034,7 +31125,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2457 i32.const 0 call $~lib/env/abort @@ -31048,7 +31139,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2458 i32.const 0 call $~lib/env/abort @@ -31062,7 +31153,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2467 i32.const 0 call $~lib/env/abort @@ -31076,7 +31167,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2468 i32.const 0 call $~lib/env/abort @@ -31090,7 +31181,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2469 i32.const 0 call $~lib/env/abort @@ -31104,7 +31195,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2470 i32.const 0 call $~lib/env/abort @@ -31118,7 +31209,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2471 i32.const 0 call $~lib/env/abort @@ -31132,7 +31223,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2472 i32.const 0 call $~lib/env/abort @@ -31146,7 +31237,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2473 i32.const 0 call $~lib/env/abort @@ -31160,7 +31251,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2474 i32.const 0 call $~lib/env/abort @@ -31174,7 +31265,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2475 i32.const 0 call $~lib/env/abort @@ -31188,7 +31279,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2476 i32.const 0 call $~lib/env/abort @@ -31202,7 +31293,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2479 i32.const 0 call $~lib/env/abort @@ -31216,7 +31307,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2480 i32.const 0 call $~lib/env/abort @@ -31230,7 +31321,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2481 i32.const 0 call $~lib/env/abort @@ -31244,7 +31335,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2482 i32.const 0 call $~lib/env/abort @@ -31258,7 +31349,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2483 i32.const 0 call $~lib/env/abort @@ -31272,7 +31363,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2484 i32.const 0 call $~lib/env/abort @@ -31286,7 +31377,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2485 i32.const 0 call $~lib/env/abort @@ -31300,7 +31391,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2486 i32.const 0 call $~lib/env/abort @@ -31314,7 +31405,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2487 i32.const 0 call $~lib/env/abort @@ -31328,7 +31419,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2488 i32.const 0 call $~lib/env/abort @@ -31342,7 +31433,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2489 i32.const 0 call $~lib/env/abort @@ -31356,7 +31447,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2490 i32.const 0 call $~lib/env/abort @@ -31370,7 +31461,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2491 i32.const 0 call $~lib/env/abort @@ -31384,7 +31475,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2492 i32.const 0 call $~lib/env/abort @@ -31398,7 +31489,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2493 i32.const 0 call $~lib/env/abort @@ -31412,7 +31503,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2494 i32.const 0 call $~lib/env/abort @@ -31426,7 +31517,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2495 i32.const 0 call $~lib/env/abort @@ -31440,7 +31531,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2496 i32.const 0 call $~lib/env/abort @@ -31454,7 +31545,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2497 i32.const 0 call $~lib/env/abort @@ -31468,7 +31559,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2498 i32.const 0 call $~lib/env/abort @@ -31482,7 +31573,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2499 i32.const 0 call $~lib/env/abort @@ -31496,7 +31587,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2500 i32.const 0 call $~lib/env/abort @@ -31510,7 +31601,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2501 i32.const 0 call $~lib/env/abort @@ -31524,7 +31615,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2502 i32.const 0 call $~lib/env/abort @@ -31538,7 +31629,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2503 i32.const 0 call $~lib/env/abort @@ -31552,7 +31643,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2504 i32.const 0 call $~lib/env/abort @@ -31566,7 +31657,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2505 i32.const 0 call $~lib/env/abort @@ -31580,7 +31671,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2506 i32.const 0 call $~lib/env/abort @@ -31594,7 +31685,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2507 i32.const 0 call $~lib/env/abort @@ -31608,7 +31699,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2508 i32.const 0 call $~lib/env/abort @@ -31622,7 +31713,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2509 i32.const 0 call $~lib/env/abort @@ -31636,7 +31727,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2510 i32.const 0 call $~lib/env/abort @@ -31650,7 +31741,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2511 i32.const 0 call $~lib/env/abort @@ -31664,7 +31755,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2512 i32.const 0 call $~lib/env/abort @@ -31678,7 +31769,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2513 i32.const 0 call $~lib/env/abort @@ -31692,7 +31783,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2514 i32.const 0 call $~lib/env/abort @@ -31706,7 +31797,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2515 i32.const 0 call $~lib/env/abort @@ -31720,7 +31811,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2516 i32.const 0 call $~lib/env/abort @@ -31734,7 +31825,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2517 i32.const 0 call $~lib/env/abort @@ -31748,7 +31839,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2518 i32.const 0 call $~lib/env/abort @@ -31762,7 +31853,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2519 i32.const 0 call $~lib/env/abort @@ -31776,7 +31867,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2520 i32.const 0 call $~lib/env/abort @@ -31790,7 +31881,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2521 i32.const 0 call $~lib/env/abort @@ -31804,7 +31895,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2522 i32.const 0 call $~lib/env/abort @@ -31818,7 +31909,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2523 i32.const 0 call $~lib/env/abort @@ -31832,7 +31923,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2524 i32.const 0 call $~lib/env/abort @@ -31846,7 +31937,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2525 i32.const 0 call $~lib/env/abort @@ -31860,7 +31951,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2526 i32.const 0 call $~lib/env/abort @@ -31874,7 +31965,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2527 i32.const 0 call $~lib/env/abort @@ -31888,7 +31979,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2528 i32.const 0 call $~lib/env/abort @@ -31902,7 +31993,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2529 i32.const 0 call $~lib/env/abort @@ -31916,7 +32007,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2530 i32.const 0 call $~lib/env/abort @@ -31930,7 +32021,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2531 i32.const 0 call $~lib/env/abort @@ -31944,7 +32035,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2532 i32.const 0 call $~lib/env/abort @@ -31958,7 +32049,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2533 i32.const 0 call $~lib/env/abort @@ -31972,7 +32063,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2534 i32.const 0 call $~lib/env/abort @@ -31986,7 +32077,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2535 i32.const 0 call $~lib/env/abort @@ -32000,7 +32091,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2536 i32.const 0 call $~lib/env/abort @@ -32014,7 +32105,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2537 i32.const 0 call $~lib/env/abort @@ -32028,7 +32119,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2538 i32.const 0 call $~lib/env/abort @@ -32042,7 +32133,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2539 i32.const 0 call $~lib/env/abort @@ -32056,7 +32147,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2540 i32.const 0 call $~lib/env/abort @@ -32070,7 +32161,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2541 i32.const 0 call $~lib/env/abort @@ -32084,7 +32175,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2542 i32.const 0 call $~lib/env/abort @@ -32098,7 +32189,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2543 i32.const 0 call $~lib/env/abort @@ -32112,7 +32203,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2544 i32.const 0 call $~lib/env/abort @@ -32126,7 +32217,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2545 i32.const 0 call $~lib/env/abort @@ -32140,7 +32231,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2546 i32.const 0 call $~lib/env/abort @@ -32154,7 +32245,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2547 i32.const 0 call $~lib/env/abort @@ -32168,7 +32259,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2548 i32.const 0 call $~lib/env/abort @@ -32182,7 +32273,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2549 i32.const 0 call $~lib/env/abort @@ -32196,7 +32287,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2550 i32.const 0 call $~lib/env/abort @@ -32210,7 +32301,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2551 i32.const 0 call $~lib/env/abort @@ -32224,7 +32315,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2552 i32.const 0 call $~lib/env/abort @@ -32238,7 +32329,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2553 i32.const 0 call $~lib/env/abort @@ -32252,7 +32343,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2554 i32.const 0 call $~lib/env/abort @@ -32266,7 +32357,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2555 i32.const 0 call $~lib/env/abort @@ -32280,7 +32371,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2556 i32.const 0 call $~lib/env/abort @@ -32294,7 +32385,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2557 i32.const 0 call $~lib/env/abort @@ -32308,7 +32399,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2558 i32.const 0 call $~lib/env/abort @@ -32322,7 +32413,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2559 i32.const 0 call $~lib/env/abort @@ -32336,7 +32427,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2560 i32.const 0 call $~lib/env/abort @@ -32350,7 +32441,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2561 i32.const 0 call $~lib/env/abort @@ -32364,7 +32455,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2562 i32.const 0 call $~lib/env/abort @@ -32378,7 +32469,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2563 i32.const 0 call $~lib/env/abort @@ -32392,7 +32483,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2564 i32.const 0 call $~lib/env/abort @@ -32406,7 +32497,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2565 i32.const 0 call $~lib/env/abort @@ -32420,7 +32511,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2566 i32.const 0 call $~lib/env/abort @@ -32434,7 +32525,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2567 i32.const 0 call $~lib/env/abort @@ -32448,7 +32539,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2568 i32.const 0 call $~lib/env/abort @@ -32462,7 +32553,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2569 i32.const 0 call $~lib/env/abort @@ -32476,7 +32567,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2570 i32.const 0 call $~lib/env/abort @@ -32511,7 +32602,7 @@ br $repeat|0 else i32.const 0 - i32.const 8 + i32.const 16 i32.const 2579 i32.const 2 call $~lib/env/abort @@ -32551,7 +32642,7 @@ br $repeat|1 else i32.const 0 - i32.const 8 + i32.const 16 i32.const 2587 i32.const 2 call $~lib/env/abort @@ -32566,7 +32657,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2601 i32.const 0 call $~lib/env/abort @@ -32578,7 +32669,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2602 i32.const 0 call $~lib/env/abort @@ -32590,7 +32681,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2603 i32.const 0 call $~lib/env/abort @@ -32602,7 +32693,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2604 i32.const 0 call $~lib/env/abort @@ -32614,7 +32705,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2605 i32.const 0 call $~lib/env/abort @@ -32626,7 +32717,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2606 i32.const 0 call $~lib/env/abort @@ -32638,7 +32729,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2607 i32.const 0 call $~lib/env/abort @@ -32650,7 +32741,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2608 i32.const 0 call $~lib/env/abort @@ -32662,7 +32753,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2609 i32.const 0 call $~lib/env/abort @@ -32674,7 +32765,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2610 i32.const 0 call $~lib/env/abort @@ -32686,7 +32777,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2613 i32.const 0 call $~lib/env/abort @@ -32698,7 +32789,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2614 i32.const 0 call $~lib/env/abort @@ -32710,7 +32801,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2615 i32.const 0 call $~lib/env/abort @@ -32722,7 +32813,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2616 i32.const 0 call $~lib/env/abort @@ -32734,7 +32825,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2617 i32.const 0 call $~lib/env/abort @@ -32746,7 +32837,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2618 i32.const 0 call $~lib/env/abort @@ -32758,7 +32849,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2619 i32.const 0 call $~lib/env/abort @@ -32770,7 +32861,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2620 i32.const 0 call $~lib/env/abort @@ -32782,7 +32873,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2621 i32.const 0 call $~lib/env/abort @@ -32794,7 +32885,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2622 i32.const 0 call $~lib/env/abort @@ -32806,7 +32897,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2623 i32.const 0 call $~lib/env/abort @@ -32818,7 +32909,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2624 i32.const 0 call $~lib/env/abort @@ -32830,7 +32921,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2625 i32.const 0 call $~lib/env/abort @@ -32842,7 +32933,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2626 i32.const 0 call $~lib/env/abort @@ -32854,7 +32945,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2627 i32.const 0 call $~lib/env/abort @@ -32866,7 +32957,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2628 i32.const 0 call $~lib/env/abort @@ -32878,7 +32969,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2629 i32.const 0 call $~lib/env/abort @@ -32890,7 +32981,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2638 i32.const 0 call $~lib/env/abort @@ -32902,7 +32993,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2639 i32.const 0 call $~lib/env/abort @@ -32914,7 +33005,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2640 i32.const 0 call $~lib/env/abort @@ -32926,7 +33017,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2641 i32.const 0 call $~lib/env/abort @@ -32938,7 +33029,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2642 i32.const 0 call $~lib/env/abort @@ -32950,7 +33041,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2643 i32.const 0 call $~lib/env/abort @@ -32962,7 +33053,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2644 i32.const 0 call $~lib/env/abort @@ -32974,7 +33065,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2645 i32.const 0 call $~lib/env/abort @@ -32986,7 +33077,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2646 i32.const 0 call $~lib/env/abort @@ -32998,7 +33089,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2647 i32.const 0 call $~lib/env/abort @@ -33010,7 +33101,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2650 i32.const 0 call $~lib/env/abort @@ -33022,7 +33113,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2651 i32.const 0 call $~lib/env/abort @@ -33034,7 +33125,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2652 i32.const 0 call $~lib/env/abort @@ -33046,7 +33137,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2653 i32.const 0 call $~lib/env/abort @@ -33058,7 +33149,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2654 i32.const 0 call $~lib/env/abort @@ -33070,7 +33161,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2655 i32.const 0 call $~lib/env/abort @@ -33082,7 +33173,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2656 i32.const 0 call $~lib/env/abort @@ -33094,7 +33185,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2657 i32.const 0 call $~lib/env/abort @@ -33106,7 +33197,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2658 i32.const 0 call $~lib/env/abort @@ -33118,7 +33209,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2659 i32.const 0 call $~lib/env/abort @@ -33130,7 +33221,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2660 i32.const 0 call $~lib/env/abort @@ -33142,7 +33233,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2661 i32.const 0 call $~lib/env/abort @@ -33154,7 +33245,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2662 i32.const 0 call $~lib/env/abort @@ -33166,7 +33257,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2663 i32.const 0 call $~lib/env/abort @@ -33178,7 +33269,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2664 i32.const 0 call $~lib/env/abort @@ -33190,7 +33281,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2665 i32.const 0 call $~lib/env/abort @@ -33202,7 +33293,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2666 i32.const 0 call $~lib/env/abort @@ -33214,7 +33305,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2677 i32.const 0 call $~lib/env/abort @@ -33226,7 +33317,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2678 i32.const 0 call $~lib/env/abort @@ -33238,7 +33329,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2679 i32.const 0 call $~lib/env/abort @@ -33250,7 +33341,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2680 i32.const 0 call $~lib/env/abort @@ -33262,7 +33353,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2681 i32.const 0 call $~lib/env/abort @@ -33274,7 +33365,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2682 i32.const 0 call $~lib/env/abort @@ -33286,7 +33377,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2683 i32.const 0 call $~lib/env/abort @@ -33298,7 +33389,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2684 i32.const 0 call $~lib/env/abort @@ -33310,7 +33401,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2685 i32.const 0 call $~lib/env/abort @@ -33322,7 +33413,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2693 i32.const 0 call $~lib/env/abort @@ -33334,7 +33425,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2694 i32.const 0 call $~lib/env/abort @@ -33346,7 +33437,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2695 i32.const 0 call $~lib/env/abort @@ -33358,7 +33449,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2696 i32.const 0 call $~lib/env/abort @@ -33370,7 +33461,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2697 i32.const 0 call $~lib/env/abort @@ -33382,7 +33473,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2698 i32.const 0 call $~lib/env/abort @@ -33394,7 +33485,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2699 i32.const 0 call $~lib/env/abort @@ -33406,7 +33497,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2700 i32.const 0 call $~lib/env/abort @@ -33418,7 +33509,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2701 i32.const 0 call $~lib/env/abort @@ -33431,7 +33522,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2738 i32.const 0 call $~lib/env/abort @@ -33444,7 +33535,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2739 i32.const 0 call $~lib/env/abort @@ -33457,7 +33548,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2740 i32.const 0 call $~lib/env/abort @@ -33470,7 +33561,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2741 i32.const 0 call $~lib/env/abort @@ -33483,7 +33574,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2742 i32.const 0 call $~lib/env/abort @@ -33496,7 +33587,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2743 i32.const 0 call $~lib/env/abort @@ -33509,7 +33600,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2744 i32.const 0 call $~lib/env/abort @@ -33522,7 +33613,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2745 i32.const 0 call $~lib/env/abort @@ -33535,7 +33626,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2746 i32.const 0 call $~lib/env/abort @@ -33548,7 +33639,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2747 i32.const 0 call $~lib/env/abort @@ -33561,7 +33652,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2750 i32.const 0 call $~lib/env/abort @@ -33574,7 +33665,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2751 i32.const 0 call $~lib/env/abort @@ -33587,7 +33678,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2752 i32.const 0 call $~lib/env/abort @@ -33600,7 +33691,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2753 i32.const 0 call $~lib/env/abort @@ -33613,7 +33704,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2754 i32.const 0 call $~lib/env/abort @@ -33626,7 +33717,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2755 i32.const 0 call $~lib/env/abort @@ -33639,7 +33730,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2756 i32.const 0 call $~lib/env/abort @@ -33652,7 +33743,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2757 i32.const 0 call $~lib/env/abort @@ -33665,7 +33756,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2758 i32.const 0 call $~lib/env/abort @@ -33678,7 +33769,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2759 i32.const 0 call $~lib/env/abort @@ -33691,7 +33782,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2760 i32.const 0 call $~lib/env/abort @@ -33704,7 +33795,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2761 i32.const 0 call $~lib/env/abort @@ -33717,7 +33808,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2762 i32.const 0 call $~lib/env/abort @@ -33730,7 +33821,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2763 i32.const 0 call $~lib/env/abort @@ -33743,7 +33834,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2764 i32.const 0 call $~lib/env/abort @@ -33756,7 +33847,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2765 i32.const 0 call $~lib/env/abort @@ -33769,7 +33860,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2766 i32.const 0 call $~lib/env/abort @@ -33782,7 +33873,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2767 i32.const 0 call $~lib/env/abort @@ -33795,7 +33886,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2768 i32.const 0 call $~lib/env/abort @@ -33808,7 +33899,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2769 i32.const 0 call $~lib/env/abort @@ -33821,7 +33912,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2770 i32.const 0 call $~lib/env/abort @@ -33834,7 +33925,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2771 i32.const 0 call $~lib/env/abort @@ -33847,7 +33938,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2772 i32.const 0 call $~lib/env/abort @@ -33860,7 +33951,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2773 i32.const 0 call $~lib/env/abort @@ -33873,7 +33964,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2774 i32.const 0 call $~lib/env/abort @@ -33886,7 +33977,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2775 i32.const 0 call $~lib/env/abort @@ -33899,7 +33990,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2776 i32.const 0 call $~lib/env/abort @@ -33912,7 +34003,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2777 i32.const 0 call $~lib/env/abort @@ -33925,7 +34016,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2778 i32.const 0 call $~lib/env/abort @@ -33938,7 +34029,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2779 i32.const 0 call $~lib/env/abort @@ -33951,7 +34042,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2780 i32.const 0 call $~lib/env/abort @@ -33964,7 +34055,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2781 i32.const 0 call $~lib/env/abort @@ -33977,7 +34068,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2782 i32.const 0 call $~lib/env/abort @@ -33990,7 +34081,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2783 i32.const 0 call $~lib/env/abort @@ -34003,7 +34094,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2784 i32.const 0 call $~lib/env/abort @@ -34016,7 +34107,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2785 i32.const 0 call $~lib/env/abort @@ -34029,7 +34120,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2786 i32.const 0 call $~lib/env/abort @@ -34042,7 +34133,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2787 i32.const 0 call $~lib/env/abort @@ -34055,7 +34146,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2788 i32.const 0 call $~lib/env/abort @@ -34068,7 +34159,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2789 i32.const 0 call $~lib/env/abort @@ -34081,7 +34172,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2790 i32.const 0 call $~lib/env/abort @@ -34094,7 +34185,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2791 i32.const 0 call $~lib/env/abort @@ -34107,7 +34198,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2792 i32.const 0 call $~lib/env/abort @@ -34120,7 +34211,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2793 i32.const 0 call $~lib/env/abort @@ -34133,7 +34224,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2794 i32.const 0 call $~lib/env/abort @@ -34146,7 +34237,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2795 i32.const 0 call $~lib/env/abort @@ -34159,7 +34250,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2796 i32.const 0 call $~lib/env/abort @@ -34172,7 +34263,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2797 i32.const 0 call $~lib/env/abort @@ -34185,7 +34276,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2798 i32.const 0 call $~lib/env/abort @@ -34198,7 +34289,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2799 i32.const 0 call $~lib/env/abort @@ -34211,7 +34302,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2800 i32.const 0 call $~lib/env/abort @@ -34224,7 +34315,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2801 i32.const 0 call $~lib/env/abort @@ -34237,7 +34328,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2802 i32.const 0 call $~lib/env/abort @@ -34250,7 +34341,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2803 i32.const 0 call $~lib/env/abort @@ -34263,7 +34354,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2804 i32.const 0 call $~lib/env/abort @@ -34276,7 +34367,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2805 i32.const 0 call $~lib/env/abort @@ -34289,7 +34380,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2806 i32.const 0 call $~lib/env/abort @@ -34302,7 +34393,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2807 i32.const 0 call $~lib/env/abort @@ -34315,7 +34406,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2808 i32.const 0 call $~lib/env/abort @@ -34328,7 +34419,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2809 i32.const 0 call $~lib/env/abort @@ -34341,7 +34432,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2810 i32.const 0 call $~lib/env/abort @@ -34354,7 +34445,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2811 i32.const 0 call $~lib/env/abort @@ -34367,7 +34458,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2812 i32.const 0 call $~lib/env/abort @@ -34380,7 +34471,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2813 i32.const 0 call $~lib/env/abort @@ -34393,7 +34484,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2814 i32.const 0 call $~lib/env/abort @@ -34406,7 +34497,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2815 i32.const 0 call $~lib/env/abort @@ -34419,7 +34510,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2816 i32.const 0 call $~lib/env/abort @@ -34432,7 +34523,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2825 i32.const 0 call $~lib/env/abort @@ -34445,7 +34536,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2826 i32.const 0 call $~lib/env/abort @@ -34458,7 +34549,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2827 i32.const 0 call $~lib/env/abort @@ -34471,7 +34562,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2828 i32.const 0 call $~lib/env/abort @@ -34484,7 +34575,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2829 i32.const 0 call $~lib/env/abort @@ -34497,7 +34588,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2830 i32.const 0 call $~lib/env/abort @@ -34510,7 +34601,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2831 i32.const 0 call $~lib/env/abort @@ -34523,7 +34614,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2832 i32.const 0 call $~lib/env/abort @@ -34536,7 +34627,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2833 i32.const 0 call $~lib/env/abort @@ -34549,7 +34640,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2834 i32.const 0 call $~lib/env/abort @@ -34562,7 +34653,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2837 i32.const 0 call $~lib/env/abort @@ -34575,7 +34666,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2838 i32.const 0 call $~lib/env/abort @@ -34588,7 +34679,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2839 i32.const 0 call $~lib/env/abort @@ -34601,7 +34692,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2840 i32.const 0 call $~lib/env/abort @@ -34614,7 +34705,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2841 i32.const 0 call $~lib/env/abort @@ -34627,7 +34718,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2842 i32.const 0 call $~lib/env/abort @@ -34640,7 +34731,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2843 i32.const 0 call $~lib/env/abort @@ -34653,7 +34744,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2844 i32.const 0 call $~lib/env/abort @@ -34666,7 +34757,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2845 i32.const 0 call $~lib/env/abort @@ -34679,7 +34770,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2846 i32.const 0 call $~lib/env/abort @@ -34692,7 +34783,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2847 i32.const 0 call $~lib/env/abort @@ -34705,7 +34796,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2848 i32.const 0 call $~lib/env/abort @@ -34718,7 +34809,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2849 i32.const 0 call $~lib/env/abort @@ -34731,7 +34822,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2850 i32.const 0 call $~lib/env/abort @@ -34744,7 +34835,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2851 i32.const 0 call $~lib/env/abort @@ -34757,7 +34848,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2852 i32.const 0 call $~lib/env/abort @@ -34770,7 +34861,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2853 i32.const 0 call $~lib/env/abort @@ -34783,7 +34874,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2854 i32.const 0 call $~lib/env/abort @@ -34796,7 +34887,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2855 i32.const 0 call $~lib/env/abort @@ -34809,7 +34900,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2856 i32.const 0 call $~lib/env/abort @@ -34822,7 +34913,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2857 i32.const 0 call $~lib/env/abort @@ -34835,7 +34926,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2858 i32.const 0 call $~lib/env/abort @@ -34848,7 +34939,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2859 i32.const 0 call $~lib/env/abort @@ -34861,7 +34952,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2860 i32.const 0 call $~lib/env/abort @@ -34874,7 +34965,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2861 i32.const 0 call $~lib/env/abort @@ -34887,7 +34978,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2862 i32.const 0 call $~lib/env/abort @@ -34900,7 +34991,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2863 i32.const 0 call $~lib/env/abort @@ -34913,7 +35004,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2864 i32.const 0 call $~lib/env/abort @@ -34926,7 +35017,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2865 i32.const 0 call $~lib/env/abort @@ -34939,7 +35030,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2866 i32.const 0 call $~lib/env/abort @@ -34952,7 +35043,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2867 i32.const 0 call $~lib/env/abort @@ -34965,7 +35056,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2868 i32.const 0 call $~lib/env/abort @@ -34978,7 +35069,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2869 i32.const 0 call $~lib/env/abort @@ -34991,7 +35082,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2870 i32.const 0 call $~lib/env/abort @@ -35004,7 +35095,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2871 i32.const 0 call $~lib/env/abort @@ -35017,7 +35108,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2872 i32.const 0 call $~lib/env/abort @@ -35030,7 +35121,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2873 i32.const 0 call $~lib/env/abort @@ -35043,7 +35134,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2874 i32.const 0 call $~lib/env/abort @@ -35056,7 +35147,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2875 i32.const 0 call $~lib/env/abort @@ -35069,7 +35160,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2876 i32.const 0 call $~lib/env/abort @@ -35082,7 +35173,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2877 i32.const 0 call $~lib/env/abort @@ -35095,7 +35186,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2878 i32.const 0 call $~lib/env/abort @@ -35108,7 +35199,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2879 i32.const 0 call $~lib/env/abort @@ -35121,7 +35212,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2880 i32.const 0 call $~lib/env/abort @@ -35134,7 +35225,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2881 i32.const 0 call $~lib/env/abort @@ -35147,7 +35238,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2882 i32.const 0 call $~lib/env/abort @@ -35160,7 +35251,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2883 i32.const 0 call $~lib/env/abort @@ -35173,7 +35264,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2884 i32.const 0 call $~lib/env/abort @@ -35186,7 +35277,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2885 i32.const 0 call $~lib/env/abort @@ -35199,7 +35290,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2886 i32.const 0 call $~lib/env/abort @@ -35212,7 +35303,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2887 i32.const 0 call $~lib/env/abort @@ -35225,7 +35316,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2888 i32.const 0 call $~lib/env/abort @@ -35238,7 +35329,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2889 i32.const 0 call $~lib/env/abort @@ -35251,7 +35342,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2890 i32.const 0 call $~lib/env/abort @@ -35264,7 +35355,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2891 i32.const 0 call $~lib/env/abort @@ -35277,7 +35368,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2892 i32.const 0 call $~lib/env/abort @@ -35290,7 +35381,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2893 i32.const 0 call $~lib/env/abort @@ -35303,7 +35394,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2894 i32.const 0 call $~lib/env/abort @@ -35316,7 +35407,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2895 i32.const 0 call $~lib/env/abort @@ -35329,7 +35420,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2896 i32.const 0 call $~lib/env/abort @@ -35342,7 +35433,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2897 i32.const 0 call $~lib/env/abort @@ -35355,7 +35446,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2898 i32.const 0 call $~lib/env/abort @@ -35368,7 +35459,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2899 i32.const 0 call $~lib/env/abort @@ -35381,7 +35472,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2900 i32.const 0 call $~lib/env/abort @@ -35394,7 +35485,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2901 i32.const 0 call $~lib/env/abort @@ -35407,7 +35498,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2902 i32.const 0 call $~lib/env/abort @@ -35420,7 +35511,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2903 i32.const 0 call $~lib/env/abort @@ -35433,7 +35524,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2941 i32.const 0 call $~lib/env/abort @@ -35446,7 +35537,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2942 i32.const 0 call $~lib/env/abort @@ -35459,7 +35550,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2943 i32.const 0 call $~lib/env/abort @@ -35472,7 +35563,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2944 i32.const 0 call $~lib/env/abort @@ -35485,7 +35576,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2945 i32.const 0 call $~lib/env/abort @@ -35498,7 +35589,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2946 i32.const 0 call $~lib/env/abort @@ -35511,7 +35602,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2947 i32.const 0 call $~lib/env/abort @@ -35524,7 +35615,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2948 i32.const 0 call $~lib/env/abort @@ -35537,7 +35628,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2949 i32.const 0 call $~lib/env/abort @@ -35550,7 +35641,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2950 i32.const 0 call $~lib/env/abort @@ -35563,7 +35654,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2953 i32.const 0 call $~lib/env/abort @@ -35576,7 +35667,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2954 i32.const 0 call $~lib/env/abort @@ -35589,7 +35680,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2955 i32.const 0 call $~lib/env/abort @@ -35602,7 +35693,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2956 i32.const 0 call $~lib/env/abort @@ -35615,7 +35706,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2957 i32.const 0 call $~lib/env/abort @@ -35628,7 +35719,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2960 i32.const 0 call $~lib/env/abort @@ -35641,7 +35732,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2961 i32.const 0 call $~lib/env/abort @@ -35654,7 +35745,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2962 i32.const 0 call $~lib/env/abort @@ -35667,7 +35758,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2963 i32.const 0 call $~lib/env/abort @@ -35680,7 +35771,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2964 i32.const 0 call $~lib/env/abort @@ -35693,7 +35784,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2965 i32.const 0 call $~lib/env/abort @@ -35706,7 +35797,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2966 i32.const 0 call $~lib/env/abort @@ -35719,7 +35810,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2967 i32.const 0 call $~lib/env/abort @@ -35732,7 +35823,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2968 i32.const 0 call $~lib/env/abort @@ -35745,7 +35836,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2969 i32.const 0 call $~lib/env/abort @@ -35758,7 +35849,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2970 i32.const 0 call $~lib/env/abort @@ -35771,7 +35862,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2971 i32.const 0 call $~lib/env/abort @@ -35784,7 +35875,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2972 i32.const 0 call $~lib/env/abort @@ -35797,7 +35888,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2973 i32.const 0 call $~lib/env/abort @@ -35810,7 +35901,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2974 i32.const 0 call $~lib/env/abort @@ -35823,7 +35914,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2975 i32.const 0 call $~lib/env/abort @@ -35836,7 +35927,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2976 i32.const 0 call $~lib/env/abort @@ -35849,7 +35940,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2977 i32.const 0 call $~lib/env/abort @@ -35862,7 +35953,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2978 i32.const 0 call $~lib/env/abort @@ -35875,7 +35966,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2979 i32.const 0 call $~lib/env/abort @@ -35888,7 +35979,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2980 i32.const 0 call $~lib/env/abort @@ -35901,7 +35992,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2981 i32.const 0 call $~lib/env/abort @@ -35914,7 +36005,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2982 i32.const 0 call $~lib/env/abort @@ -35927,7 +36018,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2983 i32.const 0 call $~lib/env/abort @@ -35940,7 +36031,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2984 i32.const 0 call $~lib/env/abort @@ -35953,7 +36044,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2985 i32.const 0 call $~lib/env/abort @@ -35966,7 +36057,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2986 i32.const 0 call $~lib/env/abort @@ -35979,7 +36070,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2987 i32.const 0 call $~lib/env/abort @@ -35992,7 +36083,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2988 i32.const 0 call $~lib/env/abort @@ -36005,7 +36096,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2989 i32.const 0 call $~lib/env/abort @@ -36018,7 +36109,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2990 i32.const 0 call $~lib/env/abort @@ -36031,7 +36122,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2991 i32.const 0 call $~lib/env/abort @@ -36044,7 +36135,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2992 i32.const 0 call $~lib/env/abort @@ -36057,7 +36148,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2993 i32.const 0 call $~lib/env/abort @@ -36070,7 +36161,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2994 i32.const 0 call $~lib/env/abort @@ -36083,7 +36174,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2995 i32.const 0 call $~lib/env/abort @@ -36096,7 +36187,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2996 i32.const 0 call $~lib/env/abort @@ -36109,7 +36200,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2997 i32.const 0 call $~lib/env/abort @@ -36122,7 +36213,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3000 i32.const 0 call $~lib/env/abort @@ -36135,7 +36226,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3001 i32.const 0 call $~lib/env/abort @@ -36148,7 +36239,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3002 i32.const 0 call $~lib/env/abort @@ -36161,7 +36252,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3003 i32.const 0 call $~lib/env/abort @@ -36174,7 +36265,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3004 i32.const 0 call $~lib/env/abort @@ -36187,7 +36278,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3005 i32.const 0 call $~lib/env/abort @@ -36200,7 +36291,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3006 i32.const 0 call $~lib/env/abort @@ -36213,7 +36304,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3007 i32.const 0 call $~lib/env/abort @@ -36226,7 +36317,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3008 i32.const 0 call $~lib/env/abort @@ -36239,7 +36330,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3009 i32.const 0 call $~lib/env/abort @@ -36252,7 +36343,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3010 i32.const 0 call $~lib/env/abort @@ -36265,7 +36356,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3011 i32.const 0 call $~lib/env/abort @@ -36278,7 +36369,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3012 i32.const 0 call $~lib/env/abort @@ -36291,7 +36382,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3013 i32.const 0 call $~lib/env/abort @@ -36304,7 +36395,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3025 i32.const 0 call $~lib/env/abort @@ -36317,7 +36408,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3026 i32.const 0 call $~lib/env/abort @@ -36330,7 +36421,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3027 i32.const 0 call $~lib/env/abort @@ -36343,7 +36434,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3028 i32.const 0 call $~lib/env/abort @@ -36356,7 +36447,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3029 i32.const 0 call $~lib/env/abort @@ -36369,7 +36460,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3030 i32.const 0 call $~lib/env/abort @@ -36382,7 +36473,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3031 i32.const 0 call $~lib/env/abort @@ -36395,7 +36486,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3032 i32.const 0 call $~lib/env/abort @@ -36408,7 +36499,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3033 i32.const 0 call $~lib/env/abort @@ -36421,7 +36512,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3034 i32.const 0 call $~lib/env/abort @@ -36434,7 +36525,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3037 i32.const 0 call $~lib/env/abort @@ -36447,7 +36538,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3038 i32.const 0 call $~lib/env/abort @@ -36460,7 +36551,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3039 i32.const 0 call $~lib/env/abort @@ -36473,7 +36564,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3040 i32.const 0 call $~lib/env/abort @@ -36486,7 +36577,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3041 i32.const 0 call $~lib/env/abort @@ -36499,7 +36590,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3050 i32.const 0 call $~lib/env/abort @@ -36512,7 +36603,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3051 i32.const 0 call $~lib/env/abort @@ -36525,7 +36616,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3052 i32.const 0 call $~lib/env/abort @@ -36538,7 +36629,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3053 i32.const 0 call $~lib/env/abort @@ -36551,7 +36642,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3054 i32.const 0 call $~lib/env/abort @@ -36564,7 +36655,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3055 i32.const 0 call $~lib/env/abort @@ -36577,7 +36668,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3056 i32.const 0 call $~lib/env/abort @@ -36590,7 +36681,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3057 i32.const 0 call $~lib/env/abort @@ -36603,7 +36694,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3058 i32.const 0 call $~lib/env/abort @@ -36616,7 +36707,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3059 i32.const 0 call $~lib/env/abort @@ -36629,7 +36720,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3062 i32.const 0 call $~lib/env/abort @@ -36642,7 +36733,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3063 i32.const 0 call $~lib/env/abort @@ -36655,7 +36746,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3064 i32.const 0 call $~lib/env/abort @@ -36668,7 +36759,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3065 i32.const 0 call $~lib/env/abort @@ -36681,7 +36772,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3066 i32.const 0 call $~lib/env/abort @@ -36694,7 +36785,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3078 i32.const 0 call $~lib/env/abort @@ -36707,7 +36798,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3079 i32.const 0 call $~lib/env/abort @@ -36720,7 +36811,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3080 i32.const 0 call $~lib/env/abort @@ -36733,7 +36824,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3081 i32.const 0 call $~lib/env/abort @@ -36746,7 +36837,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3082 i32.const 0 call $~lib/env/abort @@ -36759,7 +36850,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3083 i32.const 0 call $~lib/env/abort @@ -36772,7 +36863,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3084 i32.const 0 call $~lib/env/abort @@ -36785,7 +36876,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3085 i32.const 0 call $~lib/env/abort @@ -36798,7 +36889,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3086 i32.const 0 call $~lib/env/abort @@ -36811,7 +36902,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3087 i32.const 0 call $~lib/env/abort @@ -36824,7 +36915,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3090 i32.const 0 call $~lib/env/abort @@ -36837,7 +36928,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3091 i32.const 0 call $~lib/env/abort @@ -36850,7 +36941,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3092 i32.const 0 call $~lib/env/abort @@ -36863,7 +36954,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3093 i32.const 0 call $~lib/env/abort @@ -36876,7 +36967,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3094 i32.const 0 call $~lib/env/abort @@ -36889,7 +36980,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3095 i32.const 0 call $~lib/env/abort @@ -36902,7 +36993,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3096 i32.const 0 call $~lib/env/abort @@ -36915,7 +37006,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3097 i32.const 0 call $~lib/env/abort @@ -36928,7 +37019,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3098 i32.const 0 call $~lib/env/abort @@ -36941,7 +37032,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3099 i32.const 0 call $~lib/env/abort @@ -36954,7 +37045,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3100 i32.const 0 call $~lib/env/abort @@ -36967,7 +37058,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3101 i32.const 0 call $~lib/env/abort @@ -36980,7 +37071,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3102 i32.const 0 call $~lib/env/abort @@ -36993,7 +37084,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3103 i32.const 0 call $~lib/env/abort @@ -37006,7 +37097,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3104 i32.const 0 call $~lib/env/abort @@ -37019,7 +37110,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3105 i32.const 0 call $~lib/env/abort @@ -37032,7 +37123,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3106 i32.const 0 call $~lib/env/abort @@ -37045,7 +37136,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3107 i32.const 0 call $~lib/env/abort @@ -37058,7 +37149,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3108 i32.const 0 call $~lib/env/abort @@ -37071,7 +37162,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3109 i32.const 0 call $~lib/env/abort @@ -37084,7 +37175,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3110 i32.const 0 call $~lib/env/abort @@ -37097,7 +37188,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3111 i32.const 0 call $~lib/env/abort @@ -37110,7 +37201,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3112 i32.const 0 call $~lib/env/abort @@ -37123,7 +37214,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3113 i32.const 0 call $~lib/env/abort @@ -37136,7 +37227,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3114 i32.const 0 call $~lib/env/abort @@ -37149,7 +37240,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3115 i32.const 0 call $~lib/env/abort @@ -37162,7 +37253,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3116 i32.const 0 call $~lib/env/abort @@ -37175,7 +37266,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3117 i32.const 0 call $~lib/env/abort @@ -37188,7 +37279,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3118 i32.const 0 call $~lib/env/abort @@ -37201,7 +37292,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3119 i32.const 0 call $~lib/env/abort @@ -37214,7 +37305,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3120 i32.const 0 call $~lib/env/abort @@ -37227,7 +37318,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3121 i32.const 0 call $~lib/env/abort @@ -37240,7 +37331,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3122 i32.const 0 call $~lib/env/abort @@ -37253,7 +37344,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3123 i32.const 0 call $~lib/env/abort @@ -37266,7 +37357,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3124 i32.const 0 call $~lib/env/abort @@ -37279,7 +37370,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3125 i32.const 0 call $~lib/env/abort @@ -37292,7 +37383,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3126 i32.const 0 call $~lib/env/abort @@ -37305,7 +37396,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3127 i32.const 0 call $~lib/env/abort @@ -37318,7 +37409,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3128 i32.const 0 call $~lib/env/abort @@ -37331,7 +37422,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3129 i32.const 0 call $~lib/env/abort @@ -37344,7 +37435,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3130 i32.const 0 call $~lib/env/abort @@ -37357,7 +37448,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3131 i32.const 0 call $~lib/env/abort @@ -37370,7 +37461,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3132 i32.const 0 call $~lib/env/abort @@ -37383,7 +37474,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3133 i32.const 0 call $~lib/env/abort @@ -37396,7 +37487,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3134 i32.const 0 call $~lib/env/abort @@ -37409,7 +37500,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3135 i32.const 0 call $~lib/env/abort @@ -37422,7 +37513,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3136 i32.const 0 call $~lib/env/abort @@ -37435,7 +37526,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3137 i32.const 0 call $~lib/env/abort @@ -37448,7 +37539,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3138 i32.const 0 call $~lib/env/abort @@ -37461,7 +37552,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3139 i32.const 0 call $~lib/env/abort @@ -37474,7 +37565,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3140 i32.const 0 call $~lib/env/abort @@ -37487,7 +37578,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3141 i32.const 0 call $~lib/env/abort @@ -37500,7 +37591,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3142 i32.const 0 call $~lib/env/abort @@ -37513,7 +37604,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3143 i32.const 0 call $~lib/env/abort @@ -37526,7 +37617,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3144 i32.const 0 call $~lib/env/abort @@ -37539,7 +37630,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3145 i32.const 0 call $~lib/env/abort @@ -37552,7 +37643,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3146 i32.const 0 call $~lib/env/abort @@ -37565,7 +37656,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3147 i32.const 0 call $~lib/env/abort @@ -37578,7 +37669,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3148 i32.const 0 call $~lib/env/abort @@ -37591,7 +37682,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3149 i32.const 0 call $~lib/env/abort @@ -37604,7 +37695,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3150 i32.const 0 call $~lib/env/abort @@ -37617,7 +37708,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3151 i32.const 0 call $~lib/env/abort @@ -37630,7 +37721,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3152 i32.const 0 call $~lib/env/abort @@ -37643,7 +37734,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3153 i32.const 0 call $~lib/env/abort @@ -37656,7 +37747,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3154 i32.const 0 call $~lib/env/abort @@ -37669,7 +37760,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3155 i32.const 0 call $~lib/env/abort @@ -37682,7 +37773,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3156 i32.const 0 call $~lib/env/abort @@ -37695,7 +37786,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3157 i32.const 0 call $~lib/env/abort @@ -37708,7 +37799,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3158 i32.const 0 call $~lib/env/abort @@ -37721,7 +37812,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3159 i32.const 0 call $~lib/env/abort @@ -37734,7 +37825,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3160 i32.const 0 call $~lib/env/abort @@ -37747,7 +37838,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3161 i32.const 0 call $~lib/env/abort @@ -37760,7 +37851,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3162 i32.const 0 call $~lib/env/abort @@ -37773,7 +37864,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3163 i32.const 0 call $~lib/env/abort @@ -37786,7 +37877,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3172 i32.const 0 call $~lib/env/abort @@ -37799,7 +37890,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3173 i32.const 0 call $~lib/env/abort @@ -37812,7 +37903,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3174 i32.const 0 call $~lib/env/abort @@ -37825,7 +37916,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3175 i32.const 0 call $~lib/env/abort @@ -37838,7 +37929,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3176 i32.const 0 call $~lib/env/abort @@ -37851,7 +37942,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3177 i32.const 0 call $~lib/env/abort @@ -37864,7 +37955,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3178 i32.const 0 call $~lib/env/abort @@ -37877,7 +37968,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3179 i32.const 0 call $~lib/env/abort @@ -37890,7 +37981,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3180 i32.const 0 call $~lib/env/abort @@ -37903,7 +37994,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3181 i32.const 0 call $~lib/env/abort @@ -37916,7 +38007,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3184 i32.const 0 call $~lib/env/abort @@ -37929,7 +38020,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3185 i32.const 0 call $~lib/env/abort @@ -37942,7 +38033,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3186 i32.const 0 call $~lib/env/abort @@ -37955,7 +38046,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3187 i32.const 0 call $~lib/env/abort @@ -37968,7 +38059,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3188 i32.const 0 call $~lib/env/abort @@ -37981,7 +38072,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3189 i32.const 0 call $~lib/env/abort @@ -37994,7 +38085,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3190 i32.const 0 call $~lib/env/abort @@ -38007,7 +38098,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3191 i32.const 0 call $~lib/env/abort @@ -38020,7 +38111,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3192 i32.const 0 call $~lib/env/abort @@ -38033,7 +38124,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3193 i32.const 0 call $~lib/env/abort @@ -38046,7 +38137,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3194 i32.const 0 call $~lib/env/abort @@ -38059,7 +38150,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3195 i32.const 0 call $~lib/env/abort @@ -38072,7 +38163,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3196 i32.const 0 call $~lib/env/abort @@ -38085,7 +38176,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3197 i32.const 0 call $~lib/env/abort @@ -38098,7 +38189,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3198 i32.const 0 call $~lib/env/abort @@ -38111,7 +38202,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3199 i32.const 0 call $~lib/env/abort @@ -38124,7 +38215,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3200 i32.const 0 call $~lib/env/abort @@ -38137,7 +38228,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3201 i32.const 0 call $~lib/env/abort @@ -38150,7 +38241,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3202 i32.const 0 call $~lib/env/abort @@ -38163,7 +38254,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3203 i32.const 0 call $~lib/env/abort @@ -38176,7 +38267,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3204 i32.const 0 call $~lib/env/abort @@ -38189,7 +38280,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3205 i32.const 0 call $~lib/env/abort @@ -38202,7 +38293,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3243 i32.const 0 call $~lib/env/abort @@ -38215,7 +38306,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3244 i32.const 0 call $~lib/env/abort @@ -38228,7 +38319,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3245 i32.const 0 call $~lib/env/abort @@ -38241,7 +38332,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3246 i32.const 0 call $~lib/env/abort @@ -38254,7 +38345,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3247 i32.const 0 call $~lib/env/abort @@ -38267,7 +38358,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3248 i32.const 0 call $~lib/env/abort @@ -38280,7 +38371,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3249 i32.const 0 call $~lib/env/abort @@ -38293,7 +38384,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3250 i32.const 0 call $~lib/env/abort @@ -38306,7 +38397,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3251 i32.const 0 call $~lib/env/abort @@ -38319,7 +38410,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3252 i32.const 0 call $~lib/env/abort @@ -38332,7 +38423,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3255 i32.const 0 call $~lib/env/abort @@ -38345,7 +38436,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3256 i32.const 0 call $~lib/env/abort @@ -38358,7 +38449,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3257 i32.const 0 call $~lib/env/abort @@ -38371,7 +38462,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3258 i32.const 0 call $~lib/env/abort @@ -38384,7 +38475,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3259 i32.const 0 call $~lib/env/abort @@ -38397,7 +38488,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3262 i32.const 0 call $~lib/env/abort @@ -38410,7 +38501,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3263 i32.const 0 call $~lib/env/abort @@ -38423,7 +38514,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3264 i32.const 0 call $~lib/env/abort @@ -38436,7 +38527,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3265 i32.const 0 call $~lib/env/abort @@ -38449,7 +38540,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3266 i32.const 0 call $~lib/env/abort @@ -38462,7 +38553,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3267 i32.const 0 call $~lib/env/abort @@ -38475,7 +38566,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3268 i32.const 0 call $~lib/env/abort @@ -38488,7 +38579,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3269 i32.const 0 call $~lib/env/abort @@ -38501,7 +38592,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3270 i32.const 0 call $~lib/env/abort @@ -38514,7 +38605,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3271 i32.const 0 call $~lib/env/abort @@ -38527,7 +38618,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3272 i32.const 0 call $~lib/env/abort @@ -38540,7 +38631,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3273 i32.const 0 call $~lib/env/abort @@ -38553,7 +38644,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3274 i32.const 0 call $~lib/env/abort @@ -38566,7 +38657,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3275 i32.const 0 call $~lib/env/abort @@ -38579,7 +38670,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3276 i32.const 0 call $~lib/env/abort @@ -38592,7 +38683,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3277 i32.const 0 call $~lib/env/abort @@ -38605,7 +38696,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3278 i32.const 0 call $~lib/env/abort @@ -38618,7 +38709,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3279 i32.const 0 call $~lib/env/abort @@ -38631,7 +38722,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3280 i32.const 0 call $~lib/env/abort @@ -38644,7 +38735,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3281 i32.const 0 call $~lib/env/abort @@ -38657,7 +38748,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3282 i32.const 0 call $~lib/env/abort @@ -38670,7 +38761,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3283 i32.const 0 call $~lib/env/abort @@ -38683,7 +38774,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3284 i32.const 0 call $~lib/env/abort @@ -38696,7 +38787,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3285 i32.const 0 call $~lib/env/abort @@ -38709,7 +38800,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3286 i32.const 0 call $~lib/env/abort @@ -38722,7 +38813,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3287 i32.const 0 call $~lib/env/abort @@ -38735,7 +38826,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3288 i32.const 0 call $~lib/env/abort @@ -38748,7 +38839,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3289 i32.const 0 call $~lib/env/abort @@ -38761,7 +38852,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3290 i32.const 0 call $~lib/env/abort @@ -38774,7 +38865,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3291 i32.const 0 call $~lib/env/abort @@ -38787,7 +38878,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3292 i32.const 0 call $~lib/env/abort @@ -38800,7 +38891,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3293 i32.const 0 call $~lib/env/abort @@ -38813,7 +38904,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3294 i32.const 0 call $~lib/env/abort @@ -38826,7 +38917,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3295 i32.const 0 call $~lib/env/abort @@ -38839,7 +38930,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3296 i32.const 0 call $~lib/env/abort @@ -38852,7 +38943,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3297 i32.const 0 call $~lib/env/abort @@ -38865,7 +38956,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3309 i32.const 0 call $~lib/env/abort @@ -38878,7 +38969,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3310 i32.const 0 call $~lib/env/abort @@ -38891,7 +38982,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3311 i32.const 0 call $~lib/env/abort @@ -38904,7 +38995,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3312 i32.const 0 call $~lib/env/abort @@ -38917,7 +39008,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3313 i32.const 0 call $~lib/env/abort @@ -38930,7 +39021,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3314 i32.const 0 call $~lib/env/abort @@ -38943,7 +39034,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3315 i32.const 0 call $~lib/env/abort @@ -38956,7 +39047,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3316 i32.const 0 call $~lib/env/abort @@ -38969,7 +39060,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3317 i32.const 0 call $~lib/env/abort @@ -38982,7 +39073,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3318 i32.const 0 call $~lib/env/abort @@ -38995,7 +39086,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3321 i32.const 0 call $~lib/env/abort @@ -39008,7 +39099,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3322 i32.const 0 call $~lib/env/abort @@ -39021,7 +39112,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3323 i32.const 0 call $~lib/env/abort @@ -39034,7 +39125,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3324 i32.const 0 call $~lib/env/abort @@ -39047,7 +39138,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3325 i32.const 0 call $~lib/env/abort @@ -39060,7 +39151,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3334 i32.const 0 call $~lib/env/abort @@ -39073,7 +39164,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3335 i32.const 0 call $~lib/env/abort @@ -39086,7 +39177,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3336 i32.const 0 call $~lib/env/abort @@ -39099,7 +39190,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3337 i32.const 0 call $~lib/env/abort @@ -39112,7 +39203,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3338 i32.const 0 call $~lib/env/abort @@ -39125,7 +39216,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3339 i32.const 0 call $~lib/env/abort @@ -39138,7 +39229,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3340 i32.const 0 call $~lib/env/abort @@ -39151,7 +39242,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3341 i32.const 0 call $~lib/env/abort @@ -39164,7 +39255,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3342 i32.const 0 call $~lib/env/abort @@ -39177,7 +39268,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3343 i32.const 0 call $~lib/env/abort @@ -39190,7 +39281,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3346 i32.const 0 call $~lib/env/abort @@ -39203,7 +39294,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3347 i32.const 0 call $~lib/env/abort @@ -39216,7 +39307,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3348 i32.const 0 call $~lib/env/abort @@ -39229,7 +39320,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3349 i32.const 0 call $~lib/env/abort @@ -39242,7 +39333,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3350 i32.const 0 call $~lib/env/abort @@ -39254,7 +39345,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3362 i32.const 0 call $~lib/env/abort @@ -39266,7 +39357,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3363 i32.const 0 call $~lib/env/abort @@ -39278,7 +39369,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3364 i32.const 0 call $~lib/env/abort @@ -39290,7 +39381,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3365 i32.const 0 call $~lib/env/abort @@ -39302,7 +39393,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3366 i32.const 0 call $~lib/env/abort @@ -39314,7 +39405,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3367 i32.const 0 call $~lib/env/abort @@ -39326,7 +39417,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3368 i32.const 0 call $~lib/env/abort @@ -39338,7 +39429,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3369 i32.const 0 call $~lib/env/abort @@ -39350,7 +39441,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3370 i32.const 0 call $~lib/env/abort @@ -39362,7 +39453,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3371 i32.const 0 call $~lib/env/abort @@ -39374,7 +39465,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3374 i32.const 0 call $~lib/env/abort @@ -39386,7 +39477,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3375 i32.const 0 call $~lib/env/abort @@ -39398,7 +39489,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3376 i32.const 0 call $~lib/env/abort @@ -39410,7 +39501,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3377 i32.const 0 call $~lib/env/abort @@ -39422,7 +39513,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3378 i32.const 0 call $~lib/env/abort @@ -39434,7 +39525,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3379 i32.const 0 call $~lib/env/abort @@ -39446,7 +39537,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3380 i32.const 0 call $~lib/env/abort @@ -39458,7 +39549,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3381 i32.const 0 call $~lib/env/abort @@ -39470,7 +39561,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3382 i32.const 0 call $~lib/env/abort @@ -39482,7 +39573,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3383 i32.const 0 call $~lib/env/abort @@ -39494,7 +39585,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3384 i32.const 0 call $~lib/env/abort @@ -39506,7 +39597,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3385 i32.const 0 call $~lib/env/abort @@ -39518,7 +39609,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3386 i32.const 0 call $~lib/env/abort @@ -39530,7 +39621,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3387 i32.const 0 call $~lib/env/abort @@ -39542,7 +39633,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3388 i32.const 0 call $~lib/env/abort @@ -39554,7 +39645,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3397 i32.const 0 call $~lib/env/abort @@ -39566,7 +39657,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3398 i32.const 0 call $~lib/env/abort @@ -39578,7 +39669,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3399 i32.const 0 call $~lib/env/abort @@ -39590,7 +39681,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3400 i32.const 0 call $~lib/env/abort @@ -39602,7 +39693,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3401 i32.const 0 call $~lib/env/abort @@ -39614,7 +39705,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3402 i32.const 0 call $~lib/env/abort @@ -39626,7 +39717,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3403 i32.const 0 call $~lib/env/abort @@ -39638,7 +39729,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3404 i32.const 0 call $~lib/env/abort @@ -39650,7 +39741,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3405 i32.const 0 call $~lib/env/abort @@ -39662,7 +39753,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3406 i32.const 0 call $~lib/env/abort @@ -39674,7 +39765,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3409 i32.const 0 call $~lib/env/abort @@ -39686,7 +39777,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3410 i32.const 0 call $~lib/env/abort @@ -39698,7 +39789,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3411 i32.const 0 call $~lib/env/abort @@ -39710,7 +39801,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3412 i32.const 0 call $~lib/env/abort @@ -39722,7 +39813,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3413 i32.const 0 call $~lib/env/abort @@ -39734,7 +39825,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3414 i32.const 0 call $~lib/env/abort @@ -39746,7 +39837,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3415 i32.const 0 call $~lib/env/abort @@ -39758,7 +39849,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3416 i32.const 0 call $~lib/env/abort @@ -39770,7 +39861,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3417 i32.const 0 call $~lib/env/abort @@ -39782,7 +39873,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3418 i32.const 0 call $~lib/env/abort @@ -39794,7 +39885,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3419 i32.const 0 call $~lib/env/abort @@ -39806,7 +39897,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3420 i32.const 0 call $~lib/env/abort @@ -39818,7 +39909,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3421 i32.const 0 call $~lib/env/abort @@ -39830,7 +39921,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3422 i32.const 0 call $~lib/env/abort @@ -39842,7 +39933,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3423 i32.const 0 call $~lib/env/abort @@ -39855,7 +39946,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3427 i32.const 0 call $~lib/env/abort @@ -39868,7 +39959,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3428 i32.const 0 call $~lib/env/abort @@ -39881,7 +39972,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3429 i32.const 0 call $~lib/env/abort @@ -39894,7 +39985,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3430 i32.const 0 call $~lib/env/abort @@ -39907,7 +39998,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3431 i32.const 0 call $~lib/env/abort @@ -39920,7 +40011,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3432 i32.const 0 call $~lib/env/abort @@ -39933,7 +40024,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3433 i32.const 0 call $~lib/env/abort @@ -39946,7 +40037,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3434 i32.const 0 call $~lib/env/abort @@ -39959,7 +40050,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3435 i32.const 0 call $~lib/env/abort @@ -39972,7 +40063,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3436 i32.const 0 call $~lib/env/abort @@ -39985,7 +40076,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3437 i32.const 0 call $~lib/env/abort @@ -39998,7 +40089,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3438 i32.const 0 call $~lib/env/abort @@ -40010,7 +40101,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3442 i32.const 0 call $~lib/env/abort @@ -40022,7 +40113,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3443 i32.const 0 call $~lib/env/abort @@ -40034,7 +40125,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3444 i32.const 0 call $~lib/env/abort @@ -40046,7 +40137,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3445 i32.const 0 call $~lib/env/abort @@ -40058,7 +40149,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3446 i32.const 0 call $~lib/env/abort @@ -40070,7 +40161,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3447 i32.const 0 call $~lib/env/abort @@ -40082,7 +40173,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3448 i32.const 0 call $~lib/env/abort @@ -40094,7 +40185,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3449 i32.const 0 call $~lib/env/abort @@ -40106,7 +40197,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3450 i32.const 0 call $~lib/env/abort @@ -40118,7 +40209,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3451 i32.const 0 call $~lib/env/abort @@ -40130,7 +40221,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3452 i32.const 0 call $~lib/env/abort @@ -40142,7 +40233,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3453 i32.const 0 call $~lib/env/abort @@ -40154,7 +40245,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3454 i32.const 0 call $~lib/env/abort @@ -40166,7 +40257,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3455 i32.const 0 call $~lib/env/abort @@ -40178,7 +40269,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3456 i32.const 0 call $~lib/env/abort @@ -40190,7 +40281,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3457 i32.const 0 call $~lib/env/abort @@ -40203,7 +40294,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3461 i32.const 0 call $~lib/env/abort @@ -40216,7 +40307,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3462 i32.const 0 call $~lib/env/abort @@ -40229,7 +40320,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3463 i32.const 0 call $~lib/env/abort @@ -40242,7 +40333,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3464 i32.const 0 call $~lib/env/abort @@ -40255,7 +40346,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3466 i32.const 0 call $~lib/env/abort @@ -40268,7 +40359,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3467 i32.const 0 call $~lib/env/abort @@ -40281,7 +40372,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3468 i32.const 0 call $~lib/env/abort @@ -40294,7 +40385,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3469 i32.const 0 call $~lib/env/abort @@ -40307,7 +40398,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3471 i32.const 0 call $~lib/env/abort @@ -40320,7 +40411,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3472 i32.const 0 call $~lib/env/abort @@ -40333,7 +40424,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3473 i32.const 0 call $~lib/env/abort @@ -40346,7 +40437,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3474 i32.const 0 call $~lib/env/abort @@ -40359,7 +40450,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3476 i32.const 0 call $~lib/env/abort @@ -40372,7 +40463,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3477 i32.const 0 call $~lib/env/abort @@ -40385,7 +40476,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3478 i32.const 0 call $~lib/env/abort @@ -40398,7 +40489,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3479 i32.const 0 call $~lib/env/abort @@ -40411,7 +40502,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3481 i32.const 0 call $~lib/env/abort @@ -40424,7 +40515,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3482 i32.const 0 call $~lib/env/abort @@ -40437,7 +40528,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3483 i32.const 0 call $~lib/env/abort @@ -40450,7 +40541,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3484 i32.const 0 call $~lib/env/abort @@ -40463,7 +40554,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3486 i32.const 0 call $~lib/env/abort @@ -40476,7 +40567,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3487 i32.const 0 call $~lib/env/abort @@ -40489,7 +40580,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3488 i32.const 0 call $~lib/env/abort @@ -40502,7 +40593,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3489 i32.const 0 call $~lib/env/abort @@ -40515,7 +40606,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3490 i32.const 0 call $~lib/env/abort @@ -40528,7 +40619,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3491 i32.const 0 call $~lib/env/abort @@ -40541,7 +40632,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3492 i32.const 0 call $~lib/env/abort @@ -40558,7 +40649,7 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3494 i32.const 0 call $~lib/env/abort @@ -40571,7 +40662,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3498 i32.const 0 call $~lib/env/abort @@ -40584,7 +40675,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3499 i32.const 0 call $~lib/env/abort @@ -40598,7 +40689,7 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3500 i32.const 0 call $~lib/env/abort @@ -40612,7 +40703,7 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3501 i32.const 0 call $~lib/env/abort @@ -40626,7 +40717,7 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3502 i32.const 0 call $~lib/env/abort @@ -40639,7 +40730,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3503 i32.const 0 call $~lib/env/abort @@ -40652,7 +40743,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3504 i32.const 0 call $~lib/env/abort @@ -40665,7 +40756,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3505 i32.const 0 call $~lib/env/abort @@ -40678,7 +40769,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3506 i32.const 0 call $~lib/env/abort @@ -40691,7 +40782,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3507 i32.const 0 call $~lib/env/abort @@ -40704,7 +40795,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3508 i32.const 0 call $~lib/env/abort @@ -40717,7 +40808,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3509 i32.const 0 call $~lib/env/abort @@ -40730,7 +40821,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3510 i32.const 0 call $~lib/env/abort @@ -40743,7 +40834,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3511 i32.const 0 call $~lib/env/abort @@ -40756,7 +40847,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3512 i32.const 0 call $~lib/env/abort @@ -40769,7 +40860,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3513 i32.const 0 call $~lib/env/abort @@ -40782,7 +40873,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3517 i32.const 0 call $~lib/env/abort @@ -40795,7 +40886,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3518 i32.const 0 call $~lib/env/abort @@ -40809,7 +40900,7 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3519 i32.const 0 call $~lib/env/abort @@ -40823,7 +40914,7 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3520 i32.const 0 call $~lib/env/abort @@ -40837,7 +40928,7 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3521 i32.const 0 call $~lib/env/abort @@ -40850,7 +40941,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3522 i32.const 0 call $~lib/env/abort @@ -40863,7 +40954,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3523 i32.const 0 call $~lib/env/abort @@ -40876,7 +40967,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3524 i32.const 0 call $~lib/env/abort @@ -40889,7 +40980,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3525 i32.const 0 call $~lib/env/abort @@ -40902,7 +40993,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3526 i32.const 0 call $~lib/env/abort @@ -40915,7 +41006,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3527 i32.const 0 call $~lib/env/abort @@ -40928,7 +41019,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3528 i32.const 0 call $~lib/env/abort @@ -40941,7 +41032,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3529 i32.const 0 call $~lib/env/abort @@ -40954,7 +41045,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3530 i32.const 0 call $~lib/env/abort @@ -40967,7 +41058,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3531 i32.const 0 call $~lib/env/abort @@ -40980,7 +41071,7 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3532 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index e56de62614..7b3a25466f 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -16,7 +16,6 @@ (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$iffffi (func (param f32 f32 f32 f32 i32) (result i32))) (type $FUNCSIG$fff (func (param f32 f32) (result f32))) - (type $FUNCSIG$jii (func (param i32 i32) (result i64))) (type $FUNCSIG$d (func (result f64))) (type $FUNCSIG$vj (func (param i64))) (type $FUNCSIG$jj (func (param i64) (result i64))) @@ -62,10 +61,10 @@ (import "Math" "tanh" (func $~lib/bindings/Math/tanh (param f64) (result f64))) (import "Math" "trunc" (func $~lib/bindings/Math/trunc (param f64) (result f64))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s\00") - (data (i32.const 40) " \00\00\00\00\00\00\00)\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 104) "(\00\00\00\04\00\00\00") - (data (i32.const 112) "\0c\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\16\00\00\00s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s\00") + (data (i32.const 40) "\02\00\00\00 \00\00\00)\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe") + (data (i32.const 80) "\03\00\00\00\10\00\00\000\00\00\000\00\00\00P\00\00\00\04\00\00\00") + (data (i32.const 104) "\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/math/js i32 (i32.const 1)) @@ -90,7 +89,7 @@ (global $~lib/math/NativeMathf.SQRT2 f32 (f32.const 1.4142135381698608)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/math/rempio2f_y (mut f64) (f64.const 0)) - (global $~lib/math/PIO2_TABLE i32 (i32.const 104)) + (global $~lib/math/PIO2_TABLE i32 (i32.const 88)) (global $~lib/builtins/f32.MAX_VALUE f32 (f32.const 3402823466385288598117041e14)) (global $~lib/builtins/f64.MIN_VALUE f64 (f64.const 5e-324)) (global $~lib/math/random_seeded (mut i32) (i32.const 0)) @@ -102,7 +101,7 @@ (global $~lib/builtins/f64.MAX_SAFE_INTEGER f64 (f64.const 9007199254740991)) (global $~lib/builtins/f64.EPSILON f64 (f64.const 2.220446049250313e-16)) (global $~lib/builtins/f32.MIN_VALUE f32 (f32.const 1.401298464324817e-45)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 140)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 136)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -4309,27 +4308,7 @@ local.get $3 call $std/math/check ) - (func $~lib/array/Array#__unchecked_get (; 86 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - i32.const 0 - local.set $4 - local.get $2 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.get $4 - i32.add - i64.load offset=8 - ) - (func $~lib/math/NativeMathf.cos (; 87 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cos (; 86 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -4764,27 +4743,33 @@ i32.const 63 i32.and local.set $15 - i32.const 104 + i32.const 88 + i32.load offset=4 local.get $14 - i32.const 0 + i32.const 3 + i32.shl i32.add - call $~lib/array/Array#__unchecked_get + i64.load local.set $16 - i32.const 104 + i32.const 88 + i32.load offset=4 local.get $14 - i32.const 1 + i32.const 3 + i32.shl i32.add - call $~lib/array/Array#__unchecked_get + i64.load offset=8 local.set $17 local.get $15 i32.const 32 i32.gt_s if - i32.const 104 + i32.const 88 + i32.load offset=4 local.get $14 - i32.const 2 + i32.const 3 + i32.shl i32.add - call $~lib/array/Array#__unchecked_get + i64.load offset=16 local.set $19 local.get $19 i64.const 96 @@ -4962,7 +4947,7 @@ local.get $26 end ) - (func $std/math/test_cosf (; 88 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_cosf (; 87 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.cos local.get $1 @@ -4970,7 +4955,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.expm1 (; 89 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.expm1 (; 88 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i32) (local $3 i32) @@ -5284,7 +5269,7 @@ local.get $14 f64.mul ) - (func $~lib/math/NativeMath.exp (; 90 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.exp (; 89 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i32) (local $2 i32) (local $3 f64) @@ -5449,7 +5434,7 @@ local.get $5 call $~lib/math/NativeMath.scalbn ) - (func $~lib/math/NativeMath.cosh (; 91 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cosh (; 90 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i32) (local $3 f64) @@ -5544,7 +5529,7 @@ local.set $3 local.get $3 ) - (func $std/math/test_cosh (; 92 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_cosh (; 91 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 i32) local.get $0 call $~lib/math/NativeMath.cosh @@ -5571,7 +5556,7 @@ local.get $4 end ) - (func $~lib/math/NativeMathf.expm1 (; 93 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.expm1 (; 92 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5866,7 +5851,7 @@ local.get $13 f32.mul ) - (func $~lib/math/NativeMathf.exp (; 94 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.exp (; 93 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -6010,7 +5995,7 @@ local.get $5 call $~lib/math/NativeMathf.scalbn ) - (func $~lib/math/NativeMathf.cosh (; 95 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cosh (; 94 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -6093,7 +6078,7 @@ f32.mul end ) - (func $std/math/test_coshf (; 96 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_coshf (; 95 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.cosh local.get $1 @@ -6101,7 +6086,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_exp (; 97 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_exp (; 96 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 i32) local.get $0 call $~lib/math/NativeMath.exp @@ -6128,7 +6113,7 @@ local.get $4 end ) - (func $std/math/test_expf (; 98 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_expf (; 97 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.exp local.get $1 @@ -6136,7 +6121,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_expm1 (; 99 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_expm1 (; 98 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 i32) local.get $0 call $~lib/math/NativeMath.expm1 @@ -6163,7 +6148,7 @@ local.get $4 end ) - (func $std/math/test_expm1f (; 100 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_expm1f (; 99 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.expm1 local.get $1 @@ -6171,7 +6156,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_floor (; 101 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_floor (; 100 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) (local $5 i32) block $~lib/math/NativeMath.floor|inlined.0 (result f64) @@ -6203,7 +6188,7 @@ local.get $5 end ) - (func $std/math/test_floorf (; 102 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_floorf (; 101 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) (local $4 f32) block $~lib/math/NativeMathf.floor|inlined.0 (result f32) local.get $0 @@ -6216,7 +6201,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.hypot (; 103 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.hypot (; 102 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -6417,7 +6402,7 @@ f64.sqrt f64.mul ) - (func $std/math/test_hypot (; 104 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (func $std/math/test_hypot (; 103 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) (local $5 i32) local.get $0 local.get $1 @@ -6446,7 +6431,7 @@ local.get $5 end ) - (func $~lib/math/NativeMathf.hypot (; 105 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.hypot (; 104 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6579,7 +6564,7 @@ f32.sqrt f32.mul ) - (func $std/math/test_hypotf (; 106 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) + (func $std/math/test_hypotf (; 105 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.hypot @@ -6588,7 +6573,7 @@ local.get $4 call $std/math/check ) - (func $std/math/test_log (; 107 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_log (; 106 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 i32) local.get $0 call $~lib/math/NativeMath.log @@ -6615,7 +6600,7 @@ local.get $4 end ) - (func $std/math/test_logf (; 108 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_logf (; 107 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.log local.get $1 @@ -6623,7 +6608,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.log10 (; 109 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log10 (; 108 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i32) (local $3 i32) @@ -6886,7 +6871,7 @@ local.get $9 f64.add ) - (func $std/math/test_log10 (; 110 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_log10 (; 109 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 i32) local.get $0 call $~lib/math/NativeMath.log10 @@ -6913,7 +6898,7 @@ local.get $4 end ) - (func $~lib/math/NativeMathf.log10 (; 111 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log10 (; 110 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7115,7 +7100,7 @@ f32.mul f32.add ) - (func $std/math/test_log10f (; 112 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_log10f (; 111 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.log10 local.get $1 @@ -7123,7 +7108,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_log1p (; 113 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_log1p (; 112 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 i32) local.get $0 call $~lib/math/NativeMath.log1p @@ -7150,7 +7135,7 @@ local.get $4 end ) - (func $std/math/test_log1pf (; 114 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_log1pf (; 113 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.log1p local.get $1 @@ -7158,7 +7143,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.log2 (; 115 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log2 (; 114 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i32) (local $3 i32) @@ -7414,7 +7399,7 @@ local.get $15 f64.add ) - (func $std/math/test_log2 (; 116 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_log2 (; 115 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 i32) local.get $0 call $~lib/math/NativeMath.log2 @@ -7441,7 +7426,7 @@ local.get $4 end ) - (func $~lib/math/NativeMathf.log2 (; 117 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log2 (; 116 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7638,7 +7623,7 @@ local.get $15 f32.add ) - (func $std/math/test_log2f (; 118 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_log2f (; 117 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.log2 local.get $1 @@ -7646,7 +7631,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_max (; 119 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (func $std/math/test_max (; 118 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) (local $5 f64) (local $6 f64) (local $7 i32) @@ -7683,7 +7668,7 @@ local.get $7 end ) - (func $std/math/test_maxf (; 120 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) + (func $std/math/test_maxf (; 119 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) (local $5 f32) (local $6 f32) block $~lib/math/NativeMathf.max|inlined.0 (result f32) @@ -7700,7 +7685,7 @@ local.get $4 call $std/math/check ) - (func $std/math/test_min (; 121 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (func $std/math/test_min (; 120 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) (local $5 f64) (local $6 f64) (local $7 i32) @@ -7737,7 +7722,7 @@ local.get $7 end ) - (func $std/math/test_minf (; 122 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) + (func $std/math/test_minf (; 121 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) (local $5 f32) (local $6 f32) block $~lib/math/NativeMathf.min|inlined.0 (result f32) @@ -7754,7 +7739,7 @@ local.get $4 call $std/math/check ) - (func $~lib/math/NativeMath.mod (; 123 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 122 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -8012,7 +7997,7 @@ local.get $2 f64.reinterpret_i64 ) - (func $std/math/test_mod (; 124 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (func $std/math/test_mod (; 123 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) (local $5 i32) local.get $0 local.get $1 @@ -8041,7 +8026,7 @@ local.get $5 end ) - (func $~lib/math/NativeMathf.mod (; 125 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 124 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8297,7 +8282,7 @@ local.get $2 f32.reinterpret_i32 ) - (func $std/math/test_modf (; 126 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) + (func $std/math/test_modf (; 125 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.mod @@ -8306,7 +8291,7 @@ local.get $4 call $std/math/check ) - (func $~lib/math/NativeMath.pow (; 127 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 126 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -9394,7 +9379,7 @@ local.get $16 f64.mul ) - (func $std/math/test_pow (; 128 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (func $std/math/test_pow (; 127 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) (local $5 i32) local.get $0 local.get $1 @@ -9423,7 +9408,7 @@ local.get $5 end ) - (func $~lib/math/NativeMathf.pow (; 129 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.pow (; 128 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10361,7 +10346,7 @@ local.get $11 f32.mul ) - (func $std/math/test_powf (; 130 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) + (func $std/math/test_powf (; 129 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.pow @@ -10370,7 +10355,7 @@ local.get $4 call $std/math/check ) - (func $~lib/math/murmurHash3 (; 131 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 130 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -10399,7 +10384,7 @@ local.set $0 local.get $0 ) - (func $~lib/math/splitMix32 (; 132 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 131 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -10434,13 +10419,13 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 133 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 132 ;) (type $FUNCSIG$vj) (param $0 i64) local.get $0 i64.eqz if i32.const 0 i32.const 112 - i32.const 978 + i32.const 1021 i32.const 4 call $~lib/env/abort unreachable @@ -10463,7 +10448,7 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/math/NativeMath.random (; 134 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 133 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) (local $2 i64) @@ -10472,7 +10457,7 @@ if i32.const 0 i32.const 112 - i32.const 987 + i32.const 1030 i32.const 24 call $~lib/env/abort unreachable @@ -10520,7 +10505,7 @@ f64.const 1 f64.sub ) - (func $~lib/math/NativeMathf.random (; 135 ;) (type $FUNCSIG$f) (result f32) + (func $~lib/math/NativeMathf.random (; 134 ;) (type $FUNCSIG$f) (result f32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10529,7 +10514,7 @@ if i32.const 0 i32.const 112 - i32.const 2219 + i32.const 2312 i32.const 24 call $~lib/env/abort unreachable @@ -10575,7 +10560,7 @@ f32.const 1 f32.sub ) - (func $std/math/test_round (; 136 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_round (; 135 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) block $~lib/math/NativeMath.round|inlined.0 (result f64) local.get $0 @@ -10592,7 +10577,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_roundf (; 137 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_roundf (; 136 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) (local $4 f32) block $~lib/math/NativeMathf.round|inlined.0 (result f32) local.get $0 @@ -10609,7 +10594,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_sign (; 138 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_sign (; 137 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) (local $5 i32) block $~lib/math/NativeMath.sign|inlined.0 (result f64) @@ -10655,7 +10640,7 @@ local.get $5 end ) - (func $std/math/test_signf (; 139 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_signf (; 138 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) (local $4 f32) block $~lib/math/NativeMathf.sign|inlined.0 (result f32) local.get $0 @@ -10682,7 +10667,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.rem (; 140 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.rem (; 139 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -11005,7 +10990,7 @@ local.get $0 end ) - (func $std/math/test_rem (; 141 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (func $std/math/test_rem (; 140 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.rem @@ -11014,7 +10999,7 @@ local.get $4 call $std/math/check ) - (func $~lib/math/NativeMathf.rem (; 142 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.rem (; 141 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11334,7 +11319,7 @@ local.get $0 end ) - (func $std/math/test_remf (; 143 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) + (func $std/math/test_remf (; 142 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.rem @@ -11343,7 +11328,7 @@ local.get $4 call $std/math/check ) - (func $~lib/math/NativeMathf.sin (; 144 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sin (; 143 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -11774,27 +11759,33 @@ i32.const 63 i32.and local.set $15 - i32.const 104 + i32.const 88 + i32.load offset=4 local.get $14 - i32.const 0 + i32.const 3 + i32.shl i32.add - call $~lib/array/Array#__unchecked_get + i64.load local.set $16 - i32.const 104 + i32.const 88 + i32.load offset=4 local.get $14 - i32.const 1 + i32.const 3 + i32.shl i32.add - call $~lib/array/Array#__unchecked_get + i64.load offset=8 local.set $17 local.get $15 i32.const 32 i32.gt_s if - i32.const 104 + i32.const 88 + i32.load offset=4 local.get $14 - i32.const 2 + i32.const 3 + i32.shl i32.add - call $~lib/array/Array#__unchecked_get + i64.load offset=16 local.set $19 local.get $19 i64.const 96 @@ -11970,7 +11961,7 @@ local.get $26 end ) - (func $std/math/test_sinf (; 145 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_sinf (; 144 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.sin local.get $1 @@ -11978,7 +11969,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.sinh (; 146 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sinh (; 145 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 f64) (local $3 i32) @@ -12082,7 +12073,7 @@ local.set $4 local.get $4 ) - (func $std/math/test_sinh (; 147 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_sinh (; 146 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 i32) local.get $0 call $~lib/math/NativeMath.sinh @@ -12109,7 +12100,7 @@ local.get $4 end ) - (func $~lib/math/NativeMathf.sinh (; 148 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sinh (; 147 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -12204,7 +12195,7 @@ local.set $3 local.get $3 ) - (func $std/math/test_sinhf (; 149 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_sinhf (; 148 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.sinh local.get $1 @@ -12212,7 +12203,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_sqrt (; 150 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_sqrt (; 149 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) (local $5 i32) block $~lib/math/NativeMath.sqrt|inlined.0 (result f64) @@ -12244,7 +12235,7 @@ local.get $5 end ) - (func $std/math/test_sqrtf (; 151 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_sqrtf (; 150 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) (local $4 f32) block $~lib/math/NativeMathf.sqrt|inlined.0 (result f32) local.get $0 @@ -12257,7 +12248,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMathf.tan (; 152 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tan (; 151 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -12754,27 +12745,33 @@ i32.const 63 i32.and local.set $17 - i32.const 104 + i32.const 88 + i32.load offset=4 local.get $16 - i32.const 0 + i32.const 3 + i32.shl i32.add - call $~lib/array/Array#__unchecked_get + i64.load local.set $18 - i32.const 104 + i32.const 88 + i32.load offset=4 local.get $16 - i32.const 1 + i32.const 3 + i32.shl i32.add - call $~lib/array/Array#__unchecked_get + i64.load offset=8 local.set $19 local.get $17 i32.const 32 i32.gt_s if - i32.const 104 + i32.const 88 + i32.load offset=4 local.get $16 - i32.const 2 + i32.const 3 + i32.shl i32.add - call $~lib/array/Array#__unchecked_get + i64.load offset=16 local.set $21 local.get $21 i64.const 96 @@ -12929,7 +12926,7 @@ f32.demote_f64 end ) - (func $std/math/test_tanf (; 153 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_tanf (; 152 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.tan local.get $1 @@ -12937,7 +12934,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.tanh (; 154 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tanh (; 153 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 f64) (local $3 i32) @@ -13029,7 +13026,7 @@ local.get $0 f64.copysign ) - (func $std/math/test_tanh (; 155 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_tanh (; 154 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 i32) local.get $0 call $~lib/math/NativeMath.tanh @@ -13056,7 +13053,7 @@ local.get $4 end ) - (func $~lib/math/NativeMathf.tanh (; 156 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tanh (; 155 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -13142,7 +13139,7 @@ local.get $0 f32.copysign ) - (func $std/math/test_tanhf (; 157 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_tanhf (; 156 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.tanh local.get $1 @@ -13150,7 +13147,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_trunc (; 158 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_trunc (; 157 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) (local $5 i32) block $~lib/math/NativeMath.trunc|inlined.0 (result f64) @@ -13182,7 +13179,7 @@ local.get $5 end ) - (func $std/math/test_truncf (; 159 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_truncf (; 158 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) (local $4 f32) block $~lib/math/NativeMathf.trunc|inlined.0 (result f32) local.get $0 @@ -13195,7 +13192,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.imul (; 160 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.imul (; 159 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 f64.add @@ -13228,7 +13225,7 @@ i32.mul f64.convert_i32_s ) - (func $~lib/math/NativeMath.clz32 (; 161 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.clz32 (; 160 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/builtins/isFinite i32.eqz @@ -13251,7 +13248,7 @@ i32.clz f64.convert_i32_s ) - (func $~lib/math/ipow64 (; 162 ;) (type $FUNCSIG$jji) (param $0 i64) (param $1 i32) (result i64) + (func $~lib/math/ipow64 (; 161 ;) (type $FUNCSIG$jji) (param $0 i64) (param $1 i32) (result i64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -13483,7 +13480,7 @@ end local.get $2 ) - (func $~lib/math/ipow32f (; 163 ;) (type $FUNCSIG$ffi) (param $0 f32) (param $1 i32) (result f32) + (func $~lib/math/ipow32f (; 162 ;) (type $FUNCSIG$ffi) (param $0 f32) (param $1 i32) (result f32) (local $2 i32) (local $3 f32) local.get $1 @@ -13534,7 +13531,7 @@ local.get $3 end ) - (func $~lib/math/ipow64f (; 164 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/ipow64f (; 163 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) (local $2 i32) (local $3 f64) local.get $1 @@ -13585,7 +13582,7 @@ local.get $3 end ) - (func $start:std/math (; 165 ;) (type $FUNCSIG$v) + (func $start:std/math (; 164 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) (local $2 i32) @@ -13597,7 +13594,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 101 i32.const 0 call $~lib/env/abort @@ -13609,7 +13606,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 102 i32.const 0 call $~lib/env/abort @@ -13623,7 +13620,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 108 i32.const 0 call $~lib/env/abort @@ -13637,7 +13634,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 109 i32.const 0 call $~lib/env/abort @@ -13651,7 +13648,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 110 i32.const 0 call $~lib/env/abort @@ -13665,7 +13662,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 111 i32.const 0 call $~lib/env/abort @@ -13679,7 +13676,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 112 i32.const 0 call $~lib/env/abort @@ -13693,7 +13690,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 113 i32.const 0 call $~lib/env/abort @@ -13707,7 +13704,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 114 i32.const 0 call $~lib/env/abort @@ -13722,7 +13719,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 116 i32.const 0 call $~lib/env/abort @@ -13737,7 +13734,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 117 i32.const 0 call $~lib/env/abort @@ -13752,7 +13749,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 118 i32.const 0 call $~lib/env/abort @@ -13767,7 +13764,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 119 i32.const 0 call $~lib/env/abort @@ -13782,7 +13779,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 120 i32.const 0 call $~lib/env/abort @@ -13797,7 +13794,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 121 i32.const 0 call $~lib/env/abort @@ -13812,7 +13809,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 122 i32.const 0 call $~lib/env/abort @@ -13827,7 +13824,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 133 i32.const 0 call $~lib/env/abort @@ -13842,7 +13839,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 134 i32.const 0 call $~lib/env/abort @@ -13857,7 +13854,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 135 i32.const 0 call $~lib/env/abort @@ -13872,7 +13869,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 136 i32.const 0 call $~lib/env/abort @@ -13887,7 +13884,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 137 i32.const 0 call $~lib/env/abort @@ -13902,7 +13899,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 138 i32.const 0 call $~lib/env/abort @@ -13917,7 +13914,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 139 i32.const 0 call $~lib/env/abort @@ -13932,7 +13929,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 140 i32.const 0 call $~lib/env/abort @@ -13947,7 +13944,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 141 i32.const 0 call $~lib/env/abort @@ -13962,7 +13959,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 142 i32.const 0 call $~lib/env/abort @@ -13977,7 +13974,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 145 i32.const 0 call $~lib/env/abort @@ -13992,7 +13989,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 146 i32.const 0 call $~lib/env/abort @@ -14007,7 +14004,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 147 i32.const 0 call $~lib/env/abort @@ -14022,7 +14019,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 148 i32.const 0 call $~lib/env/abort @@ -14037,7 +14034,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 149 i32.const 0 call $~lib/env/abort @@ -14054,7 +14051,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 150 i32.const 0 call $~lib/env/abort @@ -14069,7 +14066,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 151 i32.const 0 call $~lib/env/abort @@ -14084,7 +14081,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 152 i32.const 0 call $~lib/env/abort @@ -14099,7 +14096,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 153 i32.const 0 call $~lib/env/abort @@ -14116,7 +14113,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 154 i32.const 0 call $~lib/env/abort @@ -14131,7 +14128,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 155 i32.const 0 call $~lib/env/abort @@ -14146,7 +14143,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 156 i32.const 0 call $~lib/env/abort @@ -14161,7 +14158,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 157 i32.const 0 call $~lib/env/abort @@ -14178,7 +14175,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 158 i32.const 0 call $~lib/env/abort @@ -14193,7 +14190,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 159 i32.const 0 call $~lib/env/abort @@ -14208,7 +14205,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 160 i32.const 0 call $~lib/env/abort @@ -14225,7 +14222,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 161 i32.const 0 call $~lib/env/abort @@ -14242,7 +14239,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 162 i32.const 0 call $~lib/env/abort @@ -14259,7 +14256,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 163 i32.const 0 call $~lib/env/abort @@ -14274,7 +14271,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 172 i32.const 0 call $~lib/env/abort @@ -14289,7 +14286,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 173 i32.const 0 call $~lib/env/abort @@ -14304,7 +14301,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 174 i32.const 0 call $~lib/env/abort @@ -14319,7 +14316,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 175 i32.const 0 call $~lib/env/abort @@ -14334,7 +14331,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 176 i32.const 0 call $~lib/env/abort @@ -14349,7 +14346,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 177 i32.const 0 call $~lib/env/abort @@ -14364,7 +14361,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 178 i32.const 0 call $~lib/env/abort @@ -14379,7 +14376,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 179 i32.const 0 call $~lib/env/abort @@ -14394,7 +14391,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 180 i32.const 0 call $~lib/env/abort @@ -14409,7 +14406,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 181 i32.const 0 call $~lib/env/abort @@ -14424,7 +14421,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 184 i32.const 0 call $~lib/env/abort @@ -14439,7 +14436,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 185 i32.const 0 call $~lib/env/abort @@ -14454,7 +14451,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 186 i32.const 0 call $~lib/env/abort @@ -14469,7 +14466,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 187 i32.const 0 call $~lib/env/abort @@ -14484,7 +14481,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 188 i32.const 0 call $~lib/env/abort @@ -14501,7 +14498,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 189 i32.const 0 call $~lib/env/abort @@ -14516,7 +14513,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 190 i32.const 0 call $~lib/env/abort @@ -14531,7 +14528,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 191 i32.const 0 call $~lib/env/abort @@ -14546,7 +14543,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 192 i32.const 0 call $~lib/env/abort @@ -14563,7 +14560,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 193 i32.const 0 call $~lib/env/abort @@ -14578,7 +14575,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 194 i32.const 0 call $~lib/env/abort @@ -14593,7 +14590,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 195 i32.const 0 call $~lib/env/abort @@ -14608,7 +14605,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 196 i32.const 0 call $~lib/env/abort @@ -14625,7 +14622,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 197 i32.const 0 call $~lib/env/abort @@ -14640,7 +14637,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 198 i32.const 0 call $~lib/env/abort @@ -14655,7 +14652,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 199 i32.const 0 call $~lib/env/abort @@ -14672,7 +14669,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 200 i32.const 0 call $~lib/env/abort @@ -14689,7 +14686,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 201 i32.const 0 call $~lib/env/abort @@ -14706,7 +14703,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 202 i32.const 0 call $~lib/env/abort @@ -14720,7 +14717,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 214 i32.const 0 call $~lib/env/abort @@ -14734,7 +14731,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 215 i32.const 0 call $~lib/env/abort @@ -14748,7 +14745,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 216 i32.const 0 call $~lib/env/abort @@ -14762,7 +14759,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 217 i32.const 0 call $~lib/env/abort @@ -14776,7 +14773,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 218 i32.const 0 call $~lib/env/abort @@ -14790,7 +14787,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 219 i32.const 0 call $~lib/env/abort @@ -14804,7 +14801,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 220 i32.const 0 call $~lib/env/abort @@ -14818,7 +14815,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 221 i32.const 0 call $~lib/env/abort @@ -14832,7 +14829,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 222 i32.const 0 call $~lib/env/abort @@ -14846,7 +14843,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 223 i32.const 0 call $~lib/env/abort @@ -14860,7 +14857,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 226 i32.const 0 call $~lib/env/abort @@ -14874,7 +14871,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 227 i32.const 0 call $~lib/env/abort @@ -14888,7 +14885,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 228 i32.const 0 call $~lib/env/abort @@ -14902,7 +14899,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 229 i32.const 0 call $~lib/env/abort @@ -14916,7 +14913,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 230 i32.const 0 call $~lib/env/abort @@ -14931,7 +14928,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 231 i32.const 0 call $~lib/env/abort @@ -14945,7 +14942,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 232 i32.const 0 call $~lib/env/abort @@ -14959,7 +14956,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 241 i32.const 0 call $~lib/env/abort @@ -14973,7 +14970,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 242 i32.const 0 call $~lib/env/abort @@ -14987,7 +14984,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 243 i32.const 0 call $~lib/env/abort @@ -15001,7 +14998,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 244 i32.const 0 call $~lib/env/abort @@ -15015,7 +15012,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 245 i32.const 0 call $~lib/env/abort @@ -15029,7 +15026,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 246 i32.const 0 call $~lib/env/abort @@ -15043,7 +15040,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 247 i32.const 0 call $~lib/env/abort @@ -15057,7 +15054,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 248 i32.const 0 call $~lib/env/abort @@ -15071,7 +15068,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 249 i32.const 0 call $~lib/env/abort @@ -15085,7 +15082,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 250 i32.const 0 call $~lib/env/abort @@ -15099,7 +15096,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 253 i32.const 0 call $~lib/env/abort @@ -15113,7 +15110,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 254 i32.const 0 call $~lib/env/abort @@ -15127,7 +15124,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 255 i32.const 0 call $~lib/env/abort @@ -15141,7 +15138,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 256 i32.const 0 call $~lib/env/abort @@ -15155,7 +15152,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 257 i32.const 0 call $~lib/env/abort @@ -15170,7 +15167,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 258 i32.const 0 call $~lib/env/abort @@ -15184,7 +15181,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 259 i32.const 0 call $~lib/env/abort @@ -15198,7 +15195,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 271 i32.const 0 call $~lib/env/abort @@ -15212,7 +15209,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 272 i32.const 0 call $~lib/env/abort @@ -15226,7 +15223,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 273 i32.const 0 call $~lib/env/abort @@ -15240,7 +15237,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 274 i32.const 0 call $~lib/env/abort @@ -15254,7 +15251,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 275 i32.const 0 call $~lib/env/abort @@ -15268,7 +15265,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 276 i32.const 0 call $~lib/env/abort @@ -15282,7 +15279,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 277 i32.const 0 call $~lib/env/abort @@ -15296,7 +15293,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 278 i32.const 0 call $~lib/env/abort @@ -15310,7 +15307,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 279 i32.const 0 call $~lib/env/abort @@ -15324,7 +15321,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 280 i32.const 0 call $~lib/env/abort @@ -15338,7 +15335,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 283 i32.const 0 call $~lib/env/abort @@ -15352,7 +15349,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 284 i32.const 0 call $~lib/env/abort @@ -15366,7 +15363,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 285 i32.const 0 call $~lib/env/abort @@ -15380,7 +15377,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 286 i32.const 0 call $~lib/env/abort @@ -15394,7 +15391,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 287 i32.const 0 call $~lib/env/abort @@ -15408,7 +15405,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 288 i32.const 0 call $~lib/env/abort @@ -15423,7 +15420,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 289 i32.const 0 call $~lib/env/abort @@ -15437,7 +15434,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 290 i32.const 0 call $~lib/env/abort @@ -15451,7 +15448,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 291 i32.const 0 call $~lib/env/abort @@ -15465,7 +15462,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 292 i32.const 0 call $~lib/env/abort @@ -15479,7 +15476,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 301 i32.const 0 call $~lib/env/abort @@ -15493,7 +15490,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 302 i32.const 0 call $~lib/env/abort @@ -15507,7 +15504,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 303 i32.const 0 call $~lib/env/abort @@ -15521,7 +15518,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 304 i32.const 0 call $~lib/env/abort @@ -15535,7 +15532,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 305 i32.const 0 call $~lib/env/abort @@ -15549,7 +15546,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 306 i32.const 0 call $~lib/env/abort @@ -15563,7 +15560,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 307 i32.const 0 call $~lib/env/abort @@ -15577,7 +15574,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 308 i32.const 0 call $~lib/env/abort @@ -15591,7 +15588,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 309 i32.const 0 call $~lib/env/abort @@ -15605,7 +15602,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 310 i32.const 0 call $~lib/env/abort @@ -15619,7 +15616,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 313 i32.const 0 call $~lib/env/abort @@ -15633,7 +15630,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 314 i32.const 0 call $~lib/env/abort @@ -15647,7 +15644,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 315 i32.const 0 call $~lib/env/abort @@ -15661,7 +15658,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 316 i32.const 0 call $~lib/env/abort @@ -15675,7 +15672,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 317 i32.const 0 call $~lib/env/abort @@ -15689,7 +15686,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 318 i32.const 0 call $~lib/env/abort @@ -15704,7 +15701,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 319 i32.const 0 call $~lib/env/abort @@ -15718,7 +15715,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 320 i32.const 0 call $~lib/env/abort @@ -15732,7 +15729,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 321 i32.const 0 call $~lib/env/abort @@ -15746,7 +15743,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 322 i32.const 0 call $~lib/env/abort @@ -15760,7 +15757,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 323 i32.const 0 call $~lib/env/abort @@ -15774,7 +15771,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 335 i32.const 0 call $~lib/env/abort @@ -15788,7 +15785,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 336 i32.const 0 call $~lib/env/abort @@ -15802,7 +15799,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 337 i32.const 0 call $~lib/env/abort @@ -15816,7 +15813,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 338 i32.const 0 call $~lib/env/abort @@ -15830,7 +15827,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 339 i32.const 0 call $~lib/env/abort @@ -15844,7 +15841,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 340 i32.const 0 call $~lib/env/abort @@ -15858,7 +15855,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 341 i32.const 0 call $~lib/env/abort @@ -15872,7 +15869,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 342 i32.const 0 call $~lib/env/abort @@ -15886,7 +15883,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 343 i32.const 0 call $~lib/env/abort @@ -15900,7 +15897,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 344 i32.const 0 call $~lib/env/abort @@ -15914,7 +15911,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 347 i32.const 0 call $~lib/env/abort @@ -15928,7 +15925,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 348 i32.const 0 call $~lib/env/abort @@ -15942,7 +15939,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 349 i32.const 0 call $~lib/env/abort @@ -15956,7 +15953,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 350 i32.const 0 call $~lib/env/abort @@ -15970,7 +15967,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 351 i32.const 0 call $~lib/env/abort @@ -15984,7 +15981,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 352 i32.const 0 call $~lib/env/abort @@ -15999,7 +15996,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 353 i32.const 0 call $~lib/env/abort @@ -16013,7 +16010,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 369 i32.const 0 call $~lib/env/abort @@ -16027,7 +16024,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 371 i32.const 0 call $~lib/env/abort @@ -16041,7 +16038,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 372 i32.const 0 call $~lib/env/abort @@ -16055,7 +16052,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 381 i32.const 0 call $~lib/env/abort @@ -16069,7 +16066,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 382 i32.const 0 call $~lib/env/abort @@ -16083,7 +16080,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 383 i32.const 0 call $~lib/env/abort @@ -16097,7 +16094,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 384 i32.const 0 call $~lib/env/abort @@ -16111,7 +16108,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 385 i32.const 0 call $~lib/env/abort @@ -16125,7 +16122,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 386 i32.const 0 call $~lib/env/abort @@ -16139,7 +16136,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 387 i32.const 0 call $~lib/env/abort @@ -16153,7 +16150,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 388 i32.const 0 call $~lib/env/abort @@ -16167,7 +16164,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 389 i32.const 0 call $~lib/env/abort @@ -16181,7 +16178,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 390 i32.const 0 call $~lib/env/abort @@ -16195,7 +16192,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 393 i32.const 0 call $~lib/env/abort @@ -16209,7 +16206,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 394 i32.const 0 call $~lib/env/abort @@ -16223,7 +16220,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 395 i32.const 0 call $~lib/env/abort @@ -16237,7 +16234,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 396 i32.const 0 call $~lib/env/abort @@ -16251,7 +16248,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 397 i32.const 0 call $~lib/env/abort @@ -16265,7 +16262,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 398 i32.const 0 call $~lib/env/abort @@ -16280,7 +16277,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 399 i32.const 0 call $~lib/env/abort @@ -16294,7 +16291,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 400 i32.const 0 call $~lib/env/abort @@ -16308,7 +16305,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 412 i32.const 0 call $~lib/env/abort @@ -16322,7 +16319,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 413 i32.const 0 call $~lib/env/abort @@ -16336,7 +16333,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 414 i32.const 0 call $~lib/env/abort @@ -16350,7 +16347,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 415 i32.const 0 call $~lib/env/abort @@ -16364,7 +16361,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 416 i32.const 0 call $~lib/env/abort @@ -16378,7 +16375,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 417 i32.const 0 call $~lib/env/abort @@ -16392,7 +16389,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 418 i32.const 0 call $~lib/env/abort @@ -16406,7 +16403,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 419 i32.const 0 call $~lib/env/abort @@ -16420,7 +16417,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 420 i32.const 0 call $~lib/env/abort @@ -16434,7 +16431,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 421 i32.const 0 call $~lib/env/abort @@ -16448,7 +16445,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 424 i32.const 0 call $~lib/env/abort @@ -16462,7 +16459,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 425 i32.const 0 call $~lib/env/abort @@ -16476,7 +16473,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 426 i32.const 0 call $~lib/env/abort @@ -16490,7 +16487,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 427 i32.const 0 call $~lib/env/abort @@ -16504,7 +16501,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 428 i32.const 0 call $~lib/env/abort @@ -16518,7 +16515,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 429 i32.const 0 call $~lib/env/abort @@ -16532,7 +16529,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 430 i32.const 0 call $~lib/env/abort @@ -16547,7 +16544,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 431 i32.const 0 call $~lib/env/abort @@ -16561,7 +16558,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 432 i32.const 0 call $~lib/env/abort @@ -16575,7 +16572,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 433 i32.const 0 call $~lib/env/abort @@ -16589,7 +16586,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 442 i32.const 0 call $~lib/env/abort @@ -16603,7 +16600,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 443 i32.const 0 call $~lib/env/abort @@ -16617,7 +16614,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 444 i32.const 0 call $~lib/env/abort @@ -16631,7 +16628,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 445 i32.const 0 call $~lib/env/abort @@ -16645,7 +16642,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 446 i32.const 0 call $~lib/env/abort @@ -16659,7 +16656,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 447 i32.const 0 call $~lib/env/abort @@ -16673,7 +16670,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 448 i32.const 0 call $~lib/env/abort @@ -16687,7 +16684,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 449 i32.const 0 call $~lib/env/abort @@ -16701,7 +16698,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 450 i32.const 0 call $~lib/env/abort @@ -16715,7 +16712,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 451 i32.const 0 call $~lib/env/abort @@ -16729,7 +16726,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 454 i32.const 0 call $~lib/env/abort @@ -16743,7 +16740,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 455 i32.const 0 call $~lib/env/abort @@ -16757,7 +16754,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 456 i32.const 0 call $~lib/env/abort @@ -16771,7 +16768,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 457 i32.const 0 call $~lib/env/abort @@ -16785,7 +16782,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 458 i32.const 0 call $~lib/env/abort @@ -16799,7 +16796,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 459 i32.const 0 call $~lib/env/abort @@ -16813,7 +16810,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 460 i32.const 0 call $~lib/env/abort @@ -16828,7 +16825,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 461 i32.const 0 call $~lib/env/abort @@ -16842,7 +16839,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 462 i32.const 0 call $~lib/env/abort @@ -16856,7 +16853,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 463 i32.const 0 call $~lib/env/abort @@ -16870,7 +16867,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 475 i32.const 0 call $~lib/env/abort @@ -16884,7 +16881,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 476 i32.const 0 call $~lib/env/abort @@ -16898,7 +16895,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 477 i32.const 0 call $~lib/env/abort @@ -16912,7 +16909,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 478 i32.const 0 call $~lib/env/abort @@ -16926,7 +16923,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 479 i32.const 0 call $~lib/env/abort @@ -16940,7 +16937,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 480 i32.const 0 call $~lib/env/abort @@ -16954,7 +16951,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 481 i32.const 0 call $~lib/env/abort @@ -16968,7 +16965,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 482 i32.const 0 call $~lib/env/abort @@ -16982,7 +16979,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 483 i32.const 0 call $~lib/env/abort @@ -16996,7 +16993,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 484 i32.const 0 call $~lib/env/abort @@ -17010,7 +17007,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 487 i32.const 0 call $~lib/env/abort @@ -17024,7 +17021,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 488 i32.const 0 call $~lib/env/abort @@ -17040,7 +17037,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 489 i32.const 0 call $~lib/env/abort @@ -17054,7 +17051,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 490 i32.const 0 call $~lib/env/abort @@ -17068,7 +17065,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 491 i32.const 0 call $~lib/env/abort @@ -17082,7 +17079,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 520 i32.const 0 call $~lib/env/abort @@ -17096,7 +17093,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 521 i32.const 0 call $~lib/env/abort @@ -17110,7 +17107,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 522 i32.const 0 call $~lib/env/abort @@ -17124,7 +17121,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 523 i32.const 0 call $~lib/env/abort @@ -17138,7 +17135,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 524 i32.const 0 call $~lib/env/abort @@ -17152,7 +17149,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 525 i32.const 0 call $~lib/env/abort @@ -17166,7 +17163,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 526 i32.const 0 call $~lib/env/abort @@ -17180,7 +17177,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 527 i32.const 0 call $~lib/env/abort @@ -17194,7 +17191,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 528 i32.const 0 call $~lib/env/abort @@ -17208,7 +17205,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 529 i32.const 0 call $~lib/env/abort @@ -17222,7 +17219,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 532 i32.const 0 call $~lib/env/abort @@ -17236,7 +17233,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 533 i32.const 0 call $~lib/env/abort @@ -17252,7 +17249,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 534 i32.const 0 call $~lib/env/abort @@ -17266,7 +17263,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 535 i32.const 0 call $~lib/env/abort @@ -17280,7 +17277,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 536 i32.const 0 call $~lib/env/abort @@ -17294,7 +17291,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 548 i32.const 0 call $~lib/env/abort @@ -17308,7 +17305,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 549 i32.const 0 call $~lib/env/abort @@ -17322,7 +17319,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 550 i32.const 0 call $~lib/env/abort @@ -17336,7 +17333,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 551 i32.const 0 call $~lib/env/abort @@ -17350,7 +17347,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 552 i32.const 0 call $~lib/env/abort @@ -17364,7 +17361,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 553 i32.const 0 call $~lib/env/abort @@ -17378,7 +17375,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 554 i32.const 0 call $~lib/env/abort @@ -17392,7 +17389,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 555 i32.const 0 call $~lib/env/abort @@ -17406,7 +17403,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 556 i32.const 0 call $~lib/env/abort @@ -17420,7 +17417,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 557 i32.const 0 call $~lib/env/abort @@ -17434,7 +17431,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 560 i32.const 0 call $~lib/env/abort @@ -17448,7 +17445,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 561 i32.const 0 call $~lib/env/abort @@ -17462,7 +17459,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 562 i32.const 0 call $~lib/env/abort @@ -17476,7 +17473,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 563 i32.const 0 call $~lib/env/abort @@ -17490,7 +17487,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 564 i32.const 0 call $~lib/env/abort @@ -17505,7 +17502,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 565 i32.const 0 call $~lib/env/abort @@ -17519,7 +17516,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 566 i32.const 0 call $~lib/env/abort @@ -17533,7 +17530,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 567 i32.const 0 call $~lib/env/abort @@ -17547,7 +17544,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 576 i32.const 0 call $~lib/env/abort @@ -17561,7 +17558,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 577 i32.const 0 call $~lib/env/abort @@ -17575,7 +17572,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 578 i32.const 0 call $~lib/env/abort @@ -17589,7 +17586,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 579 i32.const 0 call $~lib/env/abort @@ -17603,7 +17600,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 580 i32.const 0 call $~lib/env/abort @@ -17617,7 +17614,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 581 i32.const 0 call $~lib/env/abort @@ -17631,7 +17628,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 582 i32.const 0 call $~lib/env/abort @@ -17645,7 +17642,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 583 i32.const 0 call $~lib/env/abort @@ -17659,7 +17656,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 584 i32.const 0 call $~lib/env/abort @@ -17673,7 +17670,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 585 i32.const 0 call $~lib/env/abort @@ -17687,7 +17684,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 588 i32.const 0 call $~lib/env/abort @@ -17701,7 +17698,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 589 i32.const 0 call $~lib/env/abort @@ -17715,7 +17712,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 590 i32.const 0 call $~lib/env/abort @@ -17729,7 +17726,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 591 i32.const 0 call $~lib/env/abort @@ -17743,7 +17740,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 592 i32.const 0 call $~lib/env/abort @@ -17758,7 +17755,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 593 i32.const 0 call $~lib/env/abort @@ -17772,7 +17769,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 594 i32.const 0 call $~lib/env/abort @@ -17786,7 +17783,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 606 i32.const 0 call $~lib/env/abort @@ -17800,7 +17797,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 607 i32.const 0 call $~lib/env/abort @@ -17814,7 +17811,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 608 i32.const 0 call $~lib/env/abort @@ -17828,7 +17825,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 609 i32.const 0 call $~lib/env/abort @@ -17842,7 +17839,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 610 i32.const 0 call $~lib/env/abort @@ -17856,7 +17853,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 611 i32.const 0 call $~lib/env/abort @@ -17870,7 +17867,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 612 i32.const 0 call $~lib/env/abort @@ -17884,7 +17881,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 613 i32.const 0 call $~lib/env/abort @@ -17898,7 +17895,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 614 i32.const 0 call $~lib/env/abort @@ -17912,7 +17909,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 615 i32.const 0 call $~lib/env/abort @@ -17926,7 +17923,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 618 i32.const 0 call $~lib/env/abort @@ -17940,7 +17937,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 619 i32.const 0 call $~lib/env/abort @@ -17955,7 +17952,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 620 i32.const 0 call $~lib/env/abort @@ -17969,7 +17966,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 621 i32.const 0 call $~lib/env/abort @@ -17983,7 +17980,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 622 i32.const 0 call $~lib/env/abort @@ -17997,7 +17994,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 623 i32.const 0 call $~lib/env/abort @@ -18012,7 +18009,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 624 i32.const 0 call $~lib/env/abort @@ -18026,7 +18023,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 625 i32.const 0 call $~lib/env/abort @@ -18040,7 +18037,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 626 i32.const 0 call $~lib/env/abort @@ -18054,7 +18051,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 627 i32.const 0 call $~lib/env/abort @@ -18068,7 +18065,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 628 i32.const 0 call $~lib/env/abort @@ -18084,7 +18081,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 629 i32.const 0 call $~lib/env/abort @@ -18100,7 +18097,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 630 i32.const 0 call $~lib/env/abort @@ -18114,7 +18111,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 631 i32.const 0 call $~lib/env/abort @@ -18128,7 +18125,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 640 i32.const 0 call $~lib/env/abort @@ -18142,7 +18139,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 641 i32.const 0 call $~lib/env/abort @@ -18156,7 +18153,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 642 i32.const 0 call $~lib/env/abort @@ -18170,7 +18167,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 643 i32.const 0 call $~lib/env/abort @@ -18184,7 +18181,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 644 i32.const 0 call $~lib/env/abort @@ -18198,7 +18195,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 645 i32.const 0 call $~lib/env/abort @@ -18212,7 +18209,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 646 i32.const 0 call $~lib/env/abort @@ -18226,7 +18223,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 647 i32.const 0 call $~lib/env/abort @@ -18240,7 +18237,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 648 i32.const 0 call $~lib/env/abort @@ -18254,7 +18251,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 649 i32.const 0 call $~lib/env/abort @@ -18268,7 +18265,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 652 i32.const 0 call $~lib/env/abort @@ -18282,7 +18279,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 653 i32.const 0 call $~lib/env/abort @@ -18297,7 +18294,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 654 i32.const 0 call $~lib/env/abort @@ -18311,7 +18308,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 655 i32.const 0 call $~lib/env/abort @@ -18325,7 +18322,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 656 i32.const 0 call $~lib/env/abort @@ -18339,7 +18336,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 657 i32.const 0 call $~lib/env/abort @@ -18354,7 +18351,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 658 i32.const 0 call $~lib/env/abort @@ -18368,7 +18365,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 659 i32.const 0 call $~lib/env/abort @@ -18382,7 +18379,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 660 i32.const 0 call $~lib/env/abort @@ -18396,7 +18393,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 661 i32.const 0 call $~lib/env/abort @@ -18410,7 +18407,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 662 i32.const 0 call $~lib/env/abort @@ -18426,7 +18423,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 663 i32.const 0 call $~lib/env/abort @@ -18442,7 +18439,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 664 i32.const 0 call $~lib/env/abort @@ -18456,7 +18453,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 665 i32.const 0 call $~lib/env/abort @@ -18471,7 +18468,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 677 i32.const 0 call $~lib/env/abort @@ -18486,7 +18483,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 678 i32.const 0 call $~lib/env/abort @@ -18501,7 +18498,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 679 i32.const 0 call $~lib/env/abort @@ -18516,7 +18513,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 680 i32.const 0 call $~lib/env/abort @@ -18531,7 +18528,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 681 i32.const 0 call $~lib/env/abort @@ -18546,7 +18543,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 682 i32.const 0 call $~lib/env/abort @@ -18561,7 +18558,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 683 i32.const 0 call $~lib/env/abort @@ -18576,7 +18573,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 684 i32.const 0 call $~lib/env/abort @@ -18591,7 +18588,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 685 i32.const 0 call $~lib/env/abort @@ -18606,7 +18603,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 686 i32.const 0 call $~lib/env/abort @@ -18621,7 +18618,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 689 i32.const 0 call $~lib/env/abort @@ -18636,7 +18633,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 690 i32.const 0 call $~lib/env/abort @@ -18651,7 +18648,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 691 i32.const 0 call $~lib/env/abort @@ -18667,7 +18664,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 692 i32.const 0 call $~lib/env/abort @@ -18682,7 +18679,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 693 i32.const 0 call $~lib/env/abort @@ -18697,7 +18694,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 694 i32.const 0 call $~lib/env/abort @@ -18712,7 +18709,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 695 i32.const 0 call $~lib/env/abort @@ -18727,7 +18724,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 696 i32.const 0 call $~lib/env/abort @@ -18742,7 +18739,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 697 i32.const 0 call $~lib/env/abort @@ -18758,7 +18755,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 698 i32.const 0 call $~lib/env/abort @@ -18773,7 +18770,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 699 i32.const 0 call $~lib/env/abort @@ -18788,7 +18785,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 700 i32.const 0 call $~lib/env/abort @@ -18803,7 +18800,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 701 i32.const 0 call $~lib/env/abort @@ -18818,7 +18815,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 702 i32.const 0 call $~lib/env/abort @@ -18833,7 +18830,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 703 i32.const 0 call $~lib/env/abort @@ -18848,7 +18845,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 704 i32.const 0 call $~lib/env/abort @@ -18863,7 +18860,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 705 i32.const 0 call $~lib/env/abort @@ -18878,7 +18875,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 706 i32.const 0 call $~lib/env/abort @@ -18894,7 +18891,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 707 i32.const 0 call $~lib/env/abort @@ -18910,7 +18907,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 708 i32.const 0 call $~lib/env/abort @@ -18925,7 +18922,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 709 i32.const 0 call $~lib/env/abort @@ -18941,7 +18938,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 710 i32.const 0 call $~lib/env/abort @@ -18956,7 +18953,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 711 i32.const 0 call $~lib/env/abort @@ -18972,7 +18969,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 712 i32.const 0 call $~lib/env/abort @@ -18988,7 +18985,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 713 i32.const 0 call $~lib/env/abort @@ -19005,7 +19002,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 714 i32.const 0 call $~lib/env/abort @@ -19022,7 +19019,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 715 i32.const 0 call $~lib/env/abort @@ -19039,7 +19036,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 716 i32.const 0 call $~lib/env/abort @@ -19056,7 +19053,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 717 i32.const 0 call $~lib/env/abort @@ -19071,7 +19068,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 718 i32.const 0 call $~lib/env/abort @@ -19086,7 +19083,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 727 i32.const 0 call $~lib/env/abort @@ -19101,7 +19098,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 728 i32.const 0 call $~lib/env/abort @@ -19116,7 +19113,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 729 i32.const 0 call $~lib/env/abort @@ -19131,7 +19128,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 730 i32.const 0 call $~lib/env/abort @@ -19146,7 +19143,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 731 i32.const 0 call $~lib/env/abort @@ -19161,7 +19158,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 732 i32.const 0 call $~lib/env/abort @@ -19176,7 +19173,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 733 i32.const 0 call $~lib/env/abort @@ -19191,7 +19188,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 734 i32.const 0 call $~lib/env/abort @@ -19206,7 +19203,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 735 i32.const 0 call $~lib/env/abort @@ -19221,7 +19218,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 736 i32.const 0 call $~lib/env/abort @@ -19236,7 +19233,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 739 i32.const 0 call $~lib/env/abort @@ -19251,7 +19248,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 740 i32.const 0 call $~lib/env/abort @@ -19266,7 +19263,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 741 i32.const 0 call $~lib/env/abort @@ -19282,7 +19279,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 742 i32.const 0 call $~lib/env/abort @@ -19297,7 +19294,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 743 i32.const 0 call $~lib/env/abort @@ -19312,7 +19309,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 744 i32.const 0 call $~lib/env/abort @@ -19327,7 +19324,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 745 i32.const 0 call $~lib/env/abort @@ -19342,7 +19339,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 746 i32.const 0 call $~lib/env/abort @@ -19357,7 +19354,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 747 i32.const 0 call $~lib/env/abort @@ -19373,7 +19370,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 748 i32.const 0 call $~lib/env/abort @@ -19388,7 +19385,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 749 i32.const 0 call $~lib/env/abort @@ -19403,7 +19400,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 750 i32.const 0 call $~lib/env/abort @@ -19418,7 +19415,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 751 i32.const 0 call $~lib/env/abort @@ -19433,7 +19430,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 752 i32.const 0 call $~lib/env/abort @@ -19448,7 +19445,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 753 i32.const 0 call $~lib/env/abort @@ -19463,7 +19460,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 754 i32.const 0 call $~lib/env/abort @@ -19478,7 +19475,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 755 i32.const 0 call $~lib/env/abort @@ -19493,7 +19490,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 756 i32.const 0 call $~lib/env/abort @@ -19509,7 +19506,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 757 i32.const 0 call $~lib/env/abort @@ -19525,7 +19522,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 758 i32.const 0 call $~lib/env/abort @@ -19540,7 +19537,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 759 i32.const 0 call $~lib/env/abort @@ -19556,7 +19553,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 760 i32.const 0 call $~lib/env/abort @@ -19571,7 +19568,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 761 i32.const 0 call $~lib/env/abort @@ -19587,7 +19584,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 762 i32.const 0 call $~lib/env/abort @@ -19603,7 +19600,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 763 i32.const 0 call $~lib/env/abort @@ -19620,7 +19617,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 764 i32.const 0 call $~lib/env/abort @@ -19637,7 +19634,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 765 i32.const 0 call $~lib/env/abort @@ -19654,7 +19651,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 766 i32.const 0 call $~lib/env/abort @@ -19668,7 +19665,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 778 i32.const 0 call $~lib/env/abort @@ -19682,7 +19679,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 779 i32.const 0 call $~lib/env/abort @@ -19696,7 +19693,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 780 i32.const 0 call $~lib/env/abort @@ -19710,7 +19707,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 781 i32.const 0 call $~lib/env/abort @@ -19724,7 +19721,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 782 i32.const 0 call $~lib/env/abort @@ -19738,7 +19735,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 783 i32.const 0 call $~lib/env/abort @@ -19752,7 +19749,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 784 i32.const 0 call $~lib/env/abort @@ -19766,7 +19763,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 785 i32.const 0 call $~lib/env/abort @@ -19780,7 +19777,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 786 i32.const 0 call $~lib/env/abort @@ -19794,7 +19791,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 787 i32.const 0 call $~lib/env/abort @@ -19808,7 +19805,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 790 i32.const 0 call $~lib/env/abort @@ -19822,7 +19819,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 791 i32.const 0 call $~lib/env/abort @@ -19838,7 +19835,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 792 i32.const 0 call $~lib/env/abort @@ -19852,7 +19849,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 793 i32.const 0 call $~lib/env/abort @@ -19866,7 +19863,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 794 i32.const 0 call $~lib/env/abort @@ -19880,7 +19877,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 795 i32.const 0 call $~lib/env/abort @@ -19894,7 +19891,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 796 i32.const 0 call $~lib/env/abort @@ -19908,7 +19905,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 797 i32.const 0 call $~lib/env/abort @@ -19922,7 +19919,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 798 i32.const 0 call $~lib/env/abort @@ -19936,7 +19933,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 799 i32.const 0 call $~lib/env/abort @@ -19950,7 +19947,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 808 i32.const 0 call $~lib/env/abort @@ -19964,7 +19961,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 809 i32.const 0 call $~lib/env/abort @@ -19978,7 +19975,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 810 i32.const 0 call $~lib/env/abort @@ -19992,7 +19989,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 811 i32.const 0 call $~lib/env/abort @@ -20006,7 +20003,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 812 i32.const 0 call $~lib/env/abort @@ -20020,7 +20017,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 813 i32.const 0 call $~lib/env/abort @@ -20034,7 +20031,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 814 i32.const 0 call $~lib/env/abort @@ -20048,7 +20045,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 815 i32.const 0 call $~lib/env/abort @@ -20062,7 +20059,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 816 i32.const 0 call $~lib/env/abort @@ -20076,7 +20073,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 817 i32.const 0 call $~lib/env/abort @@ -20090,7 +20087,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 820 i32.const 0 call $~lib/env/abort @@ -20104,7 +20101,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 821 i32.const 0 call $~lib/env/abort @@ -20120,7 +20117,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 822 i32.const 0 call $~lib/env/abort @@ -20134,7 +20131,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 823 i32.const 0 call $~lib/env/abort @@ -20148,7 +20145,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 824 i32.const 0 call $~lib/env/abort @@ -20162,7 +20159,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 825 i32.const 0 call $~lib/env/abort @@ -20176,7 +20173,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 826 i32.const 0 call $~lib/env/abort @@ -20190,7 +20187,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 827 i32.const 0 call $~lib/env/abort @@ -20204,7 +20201,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 828 i32.const 0 call $~lib/env/abort @@ -20218,7 +20215,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 829 i32.const 0 call $~lib/env/abort @@ -20232,7 +20229,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 841 i32.const 0 call $~lib/env/abort @@ -20246,7 +20243,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 842 i32.const 0 call $~lib/env/abort @@ -20260,7 +20257,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 843 i32.const 0 call $~lib/env/abort @@ -20274,7 +20271,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 844 i32.const 0 call $~lib/env/abort @@ -20288,7 +20285,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 845 i32.const 0 call $~lib/env/abort @@ -20302,7 +20299,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 846 i32.const 0 call $~lib/env/abort @@ -20316,7 +20313,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 847 i32.const 0 call $~lib/env/abort @@ -20330,7 +20327,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 848 i32.const 0 call $~lib/env/abort @@ -20344,7 +20341,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 849 i32.const 0 call $~lib/env/abort @@ -20358,7 +20355,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 850 i32.const 0 call $~lib/env/abort @@ -20372,7 +20369,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 853 i32.const 0 call $~lib/env/abort @@ -20386,7 +20383,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 854 i32.const 0 call $~lib/env/abort @@ -20402,7 +20399,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 855 i32.const 0 call $~lib/env/abort @@ -20416,7 +20413,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 856 i32.const 0 call $~lib/env/abort @@ -20430,7 +20427,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 857 i32.const 0 call $~lib/env/abort @@ -20444,7 +20441,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 858 i32.const 0 call $~lib/env/abort @@ -20458,7 +20455,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 859 i32.const 0 call $~lib/env/abort @@ -20472,7 +20469,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 860 i32.const 0 call $~lib/env/abort @@ -20486,7 +20483,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 861 i32.const 0 call $~lib/env/abort @@ -20500,7 +20497,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 862 i32.const 0 call $~lib/env/abort @@ -20514,7 +20511,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 863 i32.const 0 call $~lib/env/abort @@ -20528,7 +20525,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 864 i32.const 0 call $~lib/env/abort @@ -20542,7 +20539,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 865 i32.const 0 call $~lib/env/abort @@ -20556,7 +20553,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 866 i32.const 0 call $~lib/env/abort @@ -20570,7 +20567,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 867 i32.const 0 call $~lib/env/abort @@ -20584,7 +20581,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 868 i32.const 0 call $~lib/env/abort @@ -20598,7 +20595,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 869 i32.const 0 call $~lib/env/abort @@ -20614,7 +20611,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 870 i32.const 0 call $~lib/env/abort @@ -20628,7 +20625,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 871 i32.const 0 call $~lib/env/abort @@ -20642,7 +20639,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 872 i32.const 0 call $~lib/env/abort @@ -20656,7 +20653,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 873 i32.const 0 call $~lib/env/abort @@ -20670,7 +20667,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 874 i32.const 0 call $~lib/env/abort @@ -20684,7 +20681,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 875 i32.const 0 call $~lib/env/abort @@ -20698,7 +20695,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 876 i32.const 0 call $~lib/env/abort @@ -20712,7 +20709,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 877 i32.const 0 call $~lib/env/abort @@ -20726,7 +20723,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 878 i32.const 0 call $~lib/env/abort @@ -20740,7 +20737,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 879 i32.const 0 call $~lib/env/abort @@ -20754,7 +20751,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 880 i32.const 0 call $~lib/env/abort @@ -20768,7 +20765,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 881 i32.const 0 call $~lib/env/abort @@ -20782,7 +20779,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 882 i32.const 0 call $~lib/env/abort @@ -20796,7 +20793,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 883 i32.const 0 call $~lib/env/abort @@ -20810,7 +20807,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 884 i32.const 0 call $~lib/env/abort @@ -20826,7 +20823,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 885 i32.const 0 call $~lib/env/abort @@ -20840,7 +20837,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 886 i32.const 0 call $~lib/env/abort @@ -20854,7 +20851,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 887 i32.const 0 call $~lib/env/abort @@ -20868,7 +20865,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 888 i32.const 0 call $~lib/env/abort @@ -20882,7 +20879,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 889 i32.const 0 call $~lib/env/abort @@ -20896,7 +20893,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 890 i32.const 0 call $~lib/env/abort @@ -20910,7 +20907,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 891 i32.const 0 call $~lib/env/abort @@ -20924,7 +20921,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 892 i32.const 0 call $~lib/env/abort @@ -20938,7 +20935,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 893 i32.const 0 call $~lib/env/abort @@ -20952,7 +20949,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 894 i32.const 0 call $~lib/env/abort @@ -20966,7 +20963,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 895 i32.const 0 call $~lib/env/abort @@ -20980,7 +20977,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 896 i32.const 0 call $~lib/env/abort @@ -20994,7 +20991,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 897 i32.const 0 call $~lib/env/abort @@ -21008,7 +21005,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 906 i32.const 0 call $~lib/env/abort @@ -21022,7 +21019,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 907 i32.const 0 call $~lib/env/abort @@ -21036,7 +21033,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 908 i32.const 0 call $~lib/env/abort @@ -21050,7 +21047,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 909 i32.const 0 call $~lib/env/abort @@ -21064,7 +21061,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 910 i32.const 0 call $~lib/env/abort @@ -21078,7 +21075,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 911 i32.const 0 call $~lib/env/abort @@ -21092,7 +21089,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 912 i32.const 0 call $~lib/env/abort @@ -21106,7 +21103,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 913 i32.const 0 call $~lib/env/abort @@ -21120,7 +21117,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 914 i32.const 0 call $~lib/env/abort @@ -21134,7 +21131,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 915 i32.const 0 call $~lib/env/abort @@ -21148,7 +21145,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 918 i32.const 0 call $~lib/env/abort @@ -21162,7 +21159,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 919 i32.const 0 call $~lib/env/abort @@ -21178,7 +21175,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 920 i32.const 0 call $~lib/env/abort @@ -21192,7 +21189,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 921 i32.const 0 call $~lib/env/abort @@ -21206,7 +21203,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 922 i32.const 0 call $~lib/env/abort @@ -21220,7 +21217,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 923 i32.const 0 call $~lib/env/abort @@ -21234,7 +21231,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 924 i32.const 0 call $~lib/env/abort @@ -21248,7 +21245,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 925 i32.const 0 call $~lib/env/abort @@ -21262,7 +21259,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 926 i32.const 0 call $~lib/env/abort @@ -21276,7 +21273,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 927 i32.const 0 call $~lib/env/abort @@ -21290,7 +21287,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 928 i32.const 0 call $~lib/env/abort @@ -21304,7 +21301,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 929 i32.const 0 call $~lib/env/abort @@ -21318,7 +21315,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 930 i32.const 0 call $~lib/env/abort @@ -21332,7 +21329,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 931 i32.const 0 call $~lib/env/abort @@ -21346,7 +21343,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 932 i32.const 0 call $~lib/env/abort @@ -21360,7 +21357,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 933 i32.const 0 call $~lib/env/abort @@ -21374,7 +21371,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 934 i32.const 0 call $~lib/env/abort @@ -21390,7 +21387,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 935 i32.const 0 call $~lib/env/abort @@ -21404,7 +21401,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 936 i32.const 0 call $~lib/env/abort @@ -21418,7 +21415,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 937 i32.const 0 call $~lib/env/abort @@ -21432,7 +21429,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 938 i32.const 0 call $~lib/env/abort @@ -21446,7 +21443,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 939 i32.const 0 call $~lib/env/abort @@ -21460,7 +21457,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 940 i32.const 0 call $~lib/env/abort @@ -21474,7 +21471,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 941 i32.const 0 call $~lib/env/abort @@ -21488,7 +21485,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 942 i32.const 0 call $~lib/env/abort @@ -21502,7 +21499,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 943 i32.const 0 call $~lib/env/abort @@ -21516,7 +21513,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 944 i32.const 0 call $~lib/env/abort @@ -21530,7 +21527,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 945 i32.const 0 call $~lib/env/abort @@ -21544,7 +21541,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 946 i32.const 0 call $~lib/env/abort @@ -21558,7 +21555,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 947 i32.const 0 call $~lib/env/abort @@ -21572,7 +21569,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 948 i32.const 0 call $~lib/env/abort @@ -21586,7 +21583,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 949 i32.const 0 call $~lib/env/abort @@ -21602,7 +21599,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 950 i32.const 0 call $~lib/env/abort @@ -21616,7 +21613,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 951 i32.const 0 call $~lib/env/abort @@ -21630,7 +21627,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 952 i32.const 0 call $~lib/env/abort @@ -21644,7 +21641,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 953 i32.const 0 call $~lib/env/abort @@ -21658,7 +21655,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 954 i32.const 0 call $~lib/env/abort @@ -21672,7 +21669,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 955 i32.const 0 call $~lib/env/abort @@ -21686,7 +21683,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 956 i32.const 0 call $~lib/env/abort @@ -21700,7 +21697,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 957 i32.const 0 call $~lib/env/abort @@ -21714,7 +21711,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 958 i32.const 0 call $~lib/env/abort @@ -21728,7 +21725,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 959 i32.const 0 call $~lib/env/abort @@ -21742,7 +21739,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 960 i32.const 0 call $~lib/env/abort @@ -21756,7 +21753,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 961 i32.const 0 call $~lib/env/abort @@ -21770,7 +21767,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 962 i32.const 0 call $~lib/env/abort @@ -21784,7 +21781,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1073 i32.const 0 call $~lib/env/abort @@ -21798,7 +21795,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1074 i32.const 0 call $~lib/env/abort @@ -21812,7 +21809,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1075 i32.const 0 call $~lib/env/abort @@ -21826,7 +21823,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1076 i32.const 0 call $~lib/env/abort @@ -21840,7 +21837,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1077 i32.const 0 call $~lib/env/abort @@ -21854,7 +21851,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1078 i32.const 0 call $~lib/env/abort @@ -21868,7 +21865,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1079 i32.const 0 call $~lib/env/abort @@ -21882,7 +21879,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1080 i32.const 0 call $~lib/env/abort @@ -21896,7 +21893,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1081 i32.const 0 call $~lib/env/abort @@ -21910,7 +21907,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1082 i32.const 0 call $~lib/env/abort @@ -21924,7 +21921,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1085 i32.const 0 call $~lib/env/abort @@ -21938,7 +21935,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1086 i32.const 0 call $~lib/env/abort @@ -21952,7 +21949,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1087 i32.const 0 call $~lib/env/abort @@ -21967,7 +21964,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1088 i32.const 0 call $~lib/env/abort @@ -21981,7 +21978,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1089 i32.const 0 call $~lib/env/abort @@ -21995,7 +21992,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1092 i32.const 0 call $~lib/env/abort @@ -22009,7 +22006,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1093 i32.const 0 call $~lib/env/abort @@ -22023,7 +22020,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1094 i32.const 0 call $~lib/env/abort @@ -22037,7 +22034,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1095 i32.const 0 call $~lib/env/abort @@ -22051,7 +22048,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1096 i32.const 0 call $~lib/env/abort @@ -22065,7 +22062,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1097 i32.const 0 call $~lib/env/abort @@ -22079,7 +22076,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1098 i32.const 0 call $~lib/env/abort @@ -22093,7 +22090,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1099 i32.const 0 call $~lib/env/abort @@ -22107,7 +22104,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1100 i32.const 0 call $~lib/env/abort @@ -22121,7 +22118,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1101 i32.const 0 call $~lib/env/abort @@ -22135,7 +22132,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1102 i32.const 0 call $~lib/env/abort @@ -22149,7 +22146,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1103 i32.const 0 call $~lib/env/abort @@ -22163,7 +22160,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1104 i32.const 0 call $~lib/env/abort @@ -22177,7 +22174,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1105 i32.const 0 call $~lib/env/abort @@ -22191,7 +22188,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1106 i32.const 0 call $~lib/env/abort @@ -22205,7 +22202,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1107 i32.const 0 call $~lib/env/abort @@ -22219,7 +22216,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1108 i32.const 0 call $~lib/env/abort @@ -22233,7 +22230,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1109 i32.const 0 call $~lib/env/abort @@ -22247,7 +22244,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1110 i32.const 0 call $~lib/env/abort @@ -22261,7 +22258,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1111 i32.const 0 call $~lib/env/abort @@ -22275,7 +22272,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1112 i32.const 0 call $~lib/env/abort @@ -22289,7 +22286,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1113 i32.const 0 call $~lib/env/abort @@ -22303,7 +22300,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1114 i32.const 0 call $~lib/env/abort @@ -22317,7 +22314,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1115 i32.const 0 call $~lib/env/abort @@ -22331,7 +22328,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1116 i32.const 0 call $~lib/env/abort @@ -22345,7 +22342,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1117 i32.const 0 call $~lib/env/abort @@ -22359,7 +22356,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1118 i32.const 0 call $~lib/env/abort @@ -22373,7 +22370,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1119 i32.const 0 call $~lib/env/abort @@ -22387,7 +22384,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1120 i32.const 0 call $~lib/env/abort @@ -22401,7 +22398,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1121 i32.const 0 call $~lib/env/abort @@ -22415,7 +22412,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1122 i32.const 0 call $~lib/env/abort @@ -22429,7 +22426,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1123 i32.const 0 call $~lib/env/abort @@ -22443,7 +22440,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1124 i32.const 0 call $~lib/env/abort @@ -22457,7 +22454,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1125 i32.const 0 call $~lib/env/abort @@ -22471,7 +22468,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1126 i32.const 0 call $~lib/env/abort @@ -22485,7 +22482,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1127 i32.const 0 call $~lib/env/abort @@ -22499,7 +22496,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1128 i32.const 0 call $~lib/env/abort @@ -22513,7 +22510,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1129 i32.const 0 call $~lib/env/abort @@ -22527,7 +22524,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1132 i32.const 0 call $~lib/env/abort @@ -22541,7 +22538,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1133 i32.const 0 call $~lib/env/abort @@ -22555,7 +22552,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1134 i32.const 0 call $~lib/env/abort @@ -22569,7 +22566,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1135 i32.const 0 call $~lib/env/abort @@ -22583,7 +22580,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1136 i32.const 0 call $~lib/env/abort @@ -22597,7 +22594,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1137 i32.const 0 call $~lib/env/abort @@ -22611,7 +22608,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1138 i32.const 0 call $~lib/env/abort @@ -22625,7 +22622,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1139 i32.const 0 call $~lib/env/abort @@ -22639,7 +22636,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1140 i32.const 0 call $~lib/env/abort @@ -22653,7 +22650,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1141 i32.const 0 call $~lib/env/abort @@ -22667,7 +22664,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1142 i32.const 0 call $~lib/env/abort @@ -22681,7 +22678,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1143 i32.const 0 call $~lib/env/abort @@ -22695,7 +22692,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1144 i32.const 0 call $~lib/env/abort @@ -22710,7 +22707,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1145 i32.const 0 call $~lib/env/abort @@ -22724,7 +22721,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1156 i32.const 0 call $~lib/env/abort @@ -22738,7 +22735,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1157 i32.const 0 call $~lib/env/abort @@ -22752,7 +22749,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1158 i32.const 0 call $~lib/env/abort @@ -22766,7 +22763,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1159 i32.const 0 call $~lib/env/abort @@ -22780,7 +22777,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1160 i32.const 0 call $~lib/env/abort @@ -22794,7 +22791,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1161 i32.const 0 call $~lib/env/abort @@ -22808,7 +22805,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1162 i32.const 0 call $~lib/env/abort @@ -22822,7 +22819,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1163 i32.const 0 call $~lib/env/abort @@ -22836,7 +22833,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1164 i32.const 0 call $~lib/env/abort @@ -22850,7 +22847,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1165 i32.const 0 call $~lib/env/abort @@ -22864,7 +22861,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1168 i32.const 0 call $~lib/env/abort @@ -22878,7 +22875,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1169 i32.const 0 call $~lib/env/abort @@ -22892,7 +22889,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1170 i32.const 0 call $~lib/env/abort @@ -22907,7 +22904,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1171 i32.const 0 call $~lib/env/abort @@ -22921,7 +22918,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1172 i32.const 0 call $~lib/env/abort @@ -22935,7 +22932,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1181 i32.const 0 call $~lib/env/abort @@ -22949,7 +22946,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1182 i32.const 0 call $~lib/env/abort @@ -22963,7 +22960,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1183 i32.const 0 call $~lib/env/abort @@ -22977,7 +22974,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1184 i32.const 0 call $~lib/env/abort @@ -22991,7 +22988,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1185 i32.const 0 call $~lib/env/abort @@ -23005,7 +23002,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1186 i32.const 0 call $~lib/env/abort @@ -23019,7 +23016,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1187 i32.const 0 call $~lib/env/abort @@ -23033,7 +23030,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1188 i32.const 0 call $~lib/env/abort @@ -23047,7 +23044,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1189 i32.const 0 call $~lib/env/abort @@ -23061,7 +23058,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1190 i32.const 0 call $~lib/env/abort @@ -23075,7 +23072,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1193 i32.const 0 call $~lib/env/abort @@ -23089,7 +23086,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1194 i32.const 0 call $~lib/env/abort @@ -23103,7 +23100,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1195 i32.const 0 call $~lib/env/abort @@ -23118,7 +23115,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1196 i32.const 0 call $~lib/env/abort @@ -23132,7 +23129,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1197 i32.const 0 call $~lib/env/abort @@ -23146,7 +23143,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1209 i32.const 0 call $~lib/env/abort @@ -23160,7 +23157,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1210 i32.const 0 call $~lib/env/abort @@ -23174,7 +23171,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1211 i32.const 0 call $~lib/env/abort @@ -23188,7 +23185,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1212 i32.const 0 call $~lib/env/abort @@ -23202,7 +23199,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1213 i32.const 0 call $~lib/env/abort @@ -23216,7 +23213,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1214 i32.const 0 call $~lib/env/abort @@ -23230,7 +23227,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1215 i32.const 0 call $~lib/env/abort @@ -23244,7 +23241,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1216 i32.const 0 call $~lib/env/abort @@ -23258,7 +23255,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1217 i32.const 0 call $~lib/env/abort @@ -23272,7 +23269,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1218 i32.const 0 call $~lib/env/abort @@ -23286,7 +23283,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1221 i32.const 0 call $~lib/env/abort @@ -23300,7 +23297,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1222 i32.const 0 call $~lib/env/abort @@ -23314,7 +23311,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1223 i32.const 0 call $~lib/env/abort @@ -23328,7 +23325,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1224 i32.const 0 call $~lib/env/abort @@ -23342,7 +23339,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1225 i32.const 0 call $~lib/env/abort @@ -23357,7 +23354,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1226 i32.const 0 call $~lib/env/abort @@ -23371,7 +23368,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1227 i32.const 0 call $~lib/env/abort @@ -23385,7 +23382,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1228 i32.const 0 call $~lib/env/abort @@ -23399,7 +23396,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1229 i32.const 0 call $~lib/env/abort @@ -23413,7 +23410,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1230 i32.const 0 call $~lib/env/abort @@ -23427,7 +23424,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1231 i32.const 0 call $~lib/env/abort @@ -23441,7 +23438,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1234 i32.const 0 call $~lib/env/abort @@ -23456,7 +23453,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1235 i32.const 0 call $~lib/env/abort @@ -23473,7 +23470,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1237 i32.const 0 call $~lib/env/abort @@ -23490,7 +23487,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1244 i32.const 0 call $~lib/env/abort @@ -23508,7 +23505,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1245 i32.const 0 call $~lib/env/abort @@ -23526,7 +23523,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1252 i32.const 0 call $~lib/env/abort @@ -23543,7 +23540,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1259 i32.const 0 call $~lib/env/abort @@ -23562,7 +23559,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1266 i32.const 0 call $~lib/env/abort @@ -23579,7 +23576,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1273 i32.const 0 call $~lib/env/abort @@ -23596,7 +23593,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1280 i32.const 0 call $~lib/env/abort @@ -23613,7 +23610,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1287 i32.const 0 call $~lib/env/abort @@ -23630,7 +23627,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1293 i32.const 0 call $~lib/env/abort @@ -23647,7 +23644,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1299 i32.const 0 call $~lib/env/abort @@ -23664,7 +23661,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1305 i32.const 0 call $~lib/env/abort @@ -23681,7 +23678,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1312 i32.const 0 call $~lib/env/abort @@ -23698,7 +23695,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1319 i32.const 0 call $~lib/env/abort @@ -23715,7 +23712,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1326 i32.const 0 call $~lib/env/abort @@ -23732,7 +23729,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1333 i32.const 0 call $~lib/env/abort @@ -23749,7 +23746,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1340 i32.const 0 call $~lib/env/abort @@ -23766,7 +23763,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1347 i32.const 0 call $~lib/env/abort @@ -23783,7 +23780,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1354 i32.const 0 call $~lib/env/abort @@ -23800,7 +23797,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1361 i32.const 0 call $~lib/env/abort @@ -23814,7 +23811,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1375 i32.const 0 call $~lib/env/abort @@ -23828,7 +23825,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1376 i32.const 0 call $~lib/env/abort @@ -23842,7 +23839,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1377 i32.const 0 call $~lib/env/abort @@ -23856,7 +23853,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1378 i32.const 0 call $~lib/env/abort @@ -23870,7 +23867,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1379 i32.const 0 call $~lib/env/abort @@ -23884,7 +23881,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1380 i32.const 0 call $~lib/env/abort @@ -23898,7 +23895,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1381 i32.const 0 call $~lib/env/abort @@ -23912,7 +23909,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1382 i32.const 0 call $~lib/env/abort @@ -23926,7 +23923,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1383 i32.const 0 call $~lib/env/abort @@ -23940,7 +23937,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1384 i32.const 0 call $~lib/env/abort @@ -23954,7 +23951,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1387 i32.const 0 call $~lib/env/abort @@ -23968,7 +23965,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1388 i32.const 0 call $~lib/env/abort @@ -23982,7 +23979,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1389 i32.const 0 call $~lib/env/abort @@ -23996,7 +23993,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1390 i32.const 0 call $~lib/env/abort @@ -24010,7 +24007,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1391 i32.const 0 call $~lib/env/abort @@ -24025,7 +24022,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1392 i32.const 0 call $~lib/env/abort @@ -24039,7 +24036,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1393 i32.const 0 call $~lib/env/abort @@ -24053,7 +24050,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1394 i32.const 0 call $~lib/env/abort @@ -24069,7 +24066,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1395 i32.const 0 call $~lib/env/abort @@ -24085,7 +24082,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1396 i32.const 0 call $~lib/env/abort @@ -24101,7 +24098,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1397 i32.const 0 call $~lib/env/abort @@ -24115,7 +24112,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1398 i32.const 0 call $~lib/env/abort @@ -24129,7 +24126,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1399 i32.const 0 call $~lib/env/abort @@ -24143,7 +24140,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1400 i32.const 0 call $~lib/env/abort @@ -24157,7 +24154,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1412 i32.const 0 call $~lib/env/abort @@ -24171,7 +24168,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1413 i32.const 0 call $~lib/env/abort @@ -24185,7 +24182,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1414 i32.const 0 call $~lib/env/abort @@ -24199,7 +24196,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1415 i32.const 0 call $~lib/env/abort @@ -24213,7 +24210,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1416 i32.const 0 call $~lib/env/abort @@ -24227,7 +24224,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1417 i32.const 0 call $~lib/env/abort @@ -24241,7 +24238,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1418 i32.const 0 call $~lib/env/abort @@ -24255,7 +24252,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1419 i32.const 0 call $~lib/env/abort @@ -24269,7 +24266,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1420 i32.const 0 call $~lib/env/abort @@ -24283,7 +24280,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1421 i32.const 0 call $~lib/env/abort @@ -24297,7 +24294,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1424 i32.const 0 call $~lib/env/abort @@ -24311,7 +24308,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1425 i32.const 0 call $~lib/env/abort @@ -24325,7 +24322,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1426 i32.const 0 call $~lib/env/abort @@ -24339,7 +24336,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1427 i32.const 0 call $~lib/env/abort @@ -24353,7 +24350,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1428 i32.const 0 call $~lib/env/abort @@ -24368,7 +24365,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1429 i32.const 0 call $~lib/env/abort @@ -24382,7 +24379,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1430 i32.const 0 call $~lib/env/abort @@ -24398,7 +24395,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1431 i32.const 0 call $~lib/env/abort @@ -24414,7 +24411,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1432 i32.const 0 call $~lib/env/abort @@ -24428,7 +24425,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1441 i32.const 0 call $~lib/env/abort @@ -24442,7 +24439,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1442 i32.const 0 call $~lib/env/abort @@ -24456,7 +24453,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1443 i32.const 0 call $~lib/env/abort @@ -24470,7 +24467,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1444 i32.const 0 call $~lib/env/abort @@ -24484,7 +24481,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1445 i32.const 0 call $~lib/env/abort @@ -24498,7 +24495,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1446 i32.const 0 call $~lib/env/abort @@ -24512,7 +24509,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1447 i32.const 0 call $~lib/env/abort @@ -24526,7 +24523,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1448 i32.const 0 call $~lib/env/abort @@ -24540,7 +24537,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1449 i32.const 0 call $~lib/env/abort @@ -24554,7 +24551,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1450 i32.const 0 call $~lib/env/abort @@ -24568,7 +24565,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1453 i32.const 0 call $~lib/env/abort @@ -24582,7 +24579,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1454 i32.const 0 call $~lib/env/abort @@ -24596,7 +24593,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1455 i32.const 0 call $~lib/env/abort @@ -24610,7 +24607,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1456 i32.const 0 call $~lib/env/abort @@ -24624,7 +24621,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1457 i32.const 0 call $~lib/env/abort @@ -24639,7 +24636,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1458 i32.const 0 call $~lib/env/abort @@ -24653,7 +24650,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1459 i32.const 0 call $~lib/env/abort @@ -24667,7 +24664,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1471 i32.const 0 call $~lib/env/abort @@ -24681,7 +24678,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1472 i32.const 0 call $~lib/env/abort @@ -24695,7 +24692,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1473 i32.const 0 call $~lib/env/abort @@ -24709,7 +24706,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1474 i32.const 0 call $~lib/env/abort @@ -24723,7 +24720,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1475 i32.const 0 call $~lib/env/abort @@ -24737,7 +24734,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1476 i32.const 0 call $~lib/env/abort @@ -24751,7 +24748,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1477 i32.const 0 call $~lib/env/abort @@ -24765,7 +24762,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1478 i32.const 0 call $~lib/env/abort @@ -24779,7 +24776,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1479 i32.const 0 call $~lib/env/abort @@ -24793,7 +24790,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1480 i32.const 0 call $~lib/env/abort @@ -24807,7 +24804,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1483 i32.const 0 call $~lib/env/abort @@ -24821,7 +24818,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1484 i32.const 0 call $~lib/env/abort @@ -24837,7 +24834,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1485 i32.const 0 call $~lib/env/abort @@ -24851,7 +24848,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1486 i32.const 0 call $~lib/env/abort @@ -24865,7 +24862,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1487 i32.const 0 call $~lib/env/abort @@ -24879,7 +24876,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1488 i32.const 0 call $~lib/env/abort @@ -24893,7 +24890,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1489 i32.const 0 call $~lib/env/abort @@ -24907,7 +24904,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1490 i32.const 0 call $~lib/env/abort @@ -24921,7 +24918,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1491 i32.const 0 call $~lib/env/abort @@ -24935,7 +24932,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1492 i32.const 0 call $~lib/env/abort @@ -24949,7 +24946,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1493 i32.const 0 call $~lib/env/abort @@ -24963,7 +24960,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1494 i32.const 0 call $~lib/env/abort @@ -24977,7 +24974,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1495 i32.const 0 call $~lib/env/abort @@ -24991,7 +24988,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1496 i32.const 0 call $~lib/env/abort @@ -25005,7 +25002,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1497 i32.const 0 call $~lib/env/abort @@ -25019,7 +25016,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1506 i32.const 0 call $~lib/env/abort @@ -25033,7 +25030,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1507 i32.const 0 call $~lib/env/abort @@ -25047,7 +25044,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1508 i32.const 0 call $~lib/env/abort @@ -25061,7 +25058,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1509 i32.const 0 call $~lib/env/abort @@ -25075,7 +25072,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1510 i32.const 0 call $~lib/env/abort @@ -25089,7 +25086,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1511 i32.const 0 call $~lib/env/abort @@ -25103,7 +25100,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1512 i32.const 0 call $~lib/env/abort @@ -25117,7 +25114,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1513 i32.const 0 call $~lib/env/abort @@ -25131,7 +25128,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1514 i32.const 0 call $~lib/env/abort @@ -25145,7 +25142,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1515 i32.const 0 call $~lib/env/abort @@ -25159,7 +25156,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1518 i32.const 0 call $~lib/env/abort @@ -25173,7 +25170,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1519 i32.const 0 call $~lib/env/abort @@ -25189,7 +25186,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1520 i32.const 0 call $~lib/env/abort @@ -25203,7 +25200,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1521 i32.const 0 call $~lib/env/abort @@ -25217,7 +25214,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1522 i32.const 0 call $~lib/env/abort @@ -25231,7 +25228,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1523 i32.const 0 call $~lib/env/abort @@ -25245,7 +25242,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1524 i32.const 0 call $~lib/env/abort @@ -25259,7 +25256,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1525 i32.const 0 call $~lib/env/abort @@ -25273,7 +25270,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1526 i32.const 0 call $~lib/env/abort @@ -25287,7 +25284,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1527 i32.const 0 call $~lib/env/abort @@ -25301,7 +25298,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1528 i32.const 0 call $~lib/env/abort @@ -25315,7 +25312,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1529 i32.const 0 call $~lib/env/abort @@ -25329,7 +25326,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1530 i32.const 0 call $~lib/env/abort @@ -25343,7 +25340,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1531 i32.const 0 call $~lib/env/abort @@ -25357,7 +25354,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1532 i32.const 0 call $~lib/env/abort @@ -25372,7 +25369,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1544 i32.const 0 call $~lib/env/abort @@ -25387,7 +25384,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1545 i32.const 0 call $~lib/env/abort @@ -25402,7 +25399,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1546 i32.const 0 call $~lib/env/abort @@ -25417,7 +25414,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1547 i32.const 0 call $~lib/env/abort @@ -25432,7 +25429,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1548 i32.const 0 call $~lib/env/abort @@ -25447,7 +25444,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1549 i32.const 0 call $~lib/env/abort @@ -25462,7 +25459,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1550 i32.const 0 call $~lib/env/abort @@ -25477,7 +25474,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1551 i32.const 0 call $~lib/env/abort @@ -25492,7 +25489,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1552 i32.const 0 call $~lib/env/abort @@ -25507,7 +25504,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1553 i32.const 0 call $~lib/env/abort @@ -25522,7 +25519,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1556 i32.const 0 call $~lib/env/abort @@ -25537,7 +25534,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1557 i32.const 0 call $~lib/env/abort @@ -25552,7 +25549,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1558 i32.const 0 call $~lib/env/abort @@ -25567,7 +25564,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1559 i32.const 0 call $~lib/env/abort @@ -25582,7 +25579,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1560 i32.const 0 call $~lib/env/abort @@ -25597,7 +25594,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1561 i32.const 0 call $~lib/env/abort @@ -25612,7 +25609,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1562 i32.const 0 call $~lib/env/abort @@ -25627,7 +25624,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1563 i32.const 0 call $~lib/env/abort @@ -25642,7 +25639,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1564 i32.const 0 call $~lib/env/abort @@ -25657,7 +25654,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1565 i32.const 0 call $~lib/env/abort @@ -25672,7 +25669,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1566 i32.const 0 call $~lib/env/abort @@ -25687,7 +25684,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1567 i32.const 0 call $~lib/env/abort @@ -25702,7 +25699,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1568 i32.const 0 call $~lib/env/abort @@ -25718,7 +25715,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1569 i32.const 0 call $~lib/env/abort @@ -25734,7 +25731,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1570 i32.const 0 call $~lib/env/abort @@ -25750,7 +25747,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1571 i32.const 0 call $~lib/env/abort @@ -25766,7 +25763,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1572 i32.const 0 call $~lib/env/abort @@ -25781,7 +25778,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1573 i32.const 0 call $~lib/env/abort @@ -25796,7 +25793,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1574 i32.const 0 call $~lib/env/abort @@ -25811,7 +25808,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1583 i32.const 0 call $~lib/env/abort @@ -25826,7 +25823,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1584 i32.const 0 call $~lib/env/abort @@ -25841,7 +25838,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1585 i32.const 0 call $~lib/env/abort @@ -25856,7 +25853,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1586 i32.const 0 call $~lib/env/abort @@ -25871,7 +25868,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1587 i32.const 0 call $~lib/env/abort @@ -25886,7 +25883,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1588 i32.const 0 call $~lib/env/abort @@ -25901,7 +25898,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1589 i32.const 0 call $~lib/env/abort @@ -25916,7 +25913,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1590 i32.const 0 call $~lib/env/abort @@ -25931,7 +25928,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1591 i32.const 0 call $~lib/env/abort @@ -25946,7 +25943,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1592 i32.const 0 call $~lib/env/abort @@ -25961,7 +25958,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1595 i32.const 0 call $~lib/env/abort @@ -25976,7 +25973,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1596 i32.const 0 call $~lib/env/abort @@ -25991,7 +25988,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1597 i32.const 0 call $~lib/env/abort @@ -26006,7 +26003,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1598 i32.const 0 call $~lib/env/abort @@ -26021,7 +26018,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1599 i32.const 0 call $~lib/env/abort @@ -26036,7 +26033,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1600 i32.const 0 call $~lib/env/abort @@ -26051,7 +26048,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1601 i32.const 0 call $~lib/env/abort @@ -26066,7 +26063,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1602 i32.const 0 call $~lib/env/abort @@ -26081,7 +26078,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1603 i32.const 0 call $~lib/env/abort @@ -26096,7 +26093,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1604 i32.const 0 call $~lib/env/abort @@ -26111,7 +26108,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1605 i32.const 0 call $~lib/env/abort @@ -26126,7 +26123,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1606 i32.const 0 call $~lib/env/abort @@ -26141,7 +26138,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1607 i32.const 0 call $~lib/env/abort @@ -26157,7 +26154,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1608 i32.const 0 call $~lib/env/abort @@ -26173,7 +26170,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1609 i32.const 0 call $~lib/env/abort @@ -26189,7 +26186,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1610 i32.const 0 call $~lib/env/abort @@ -26205,7 +26202,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1611 i32.const 0 call $~lib/env/abort @@ -26220,7 +26217,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1612 i32.const 0 call $~lib/env/abort @@ -26235,7 +26232,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1613 i32.const 0 call $~lib/env/abort @@ -26249,7 +26246,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1625 i32.const 0 call $~lib/env/abort @@ -26263,7 +26260,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1626 i32.const 0 call $~lib/env/abort @@ -26277,7 +26274,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1627 i32.const 0 call $~lib/env/abort @@ -26291,7 +26288,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1628 i32.const 0 call $~lib/env/abort @@ -26305,7 +26302,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1629 i32.const 0 call $~lib/env/abort @@ -26319,7 +26316,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1630 i32.const 0 call $~lib/env/abort @@ -26333,7 +26330,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1631 i32.const 0 call $~lib/env/abort @@ -26347,7 +26344,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1632 i32.const 0 call $~lib/env/abort @@ -26361,7 +26358,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1633 i32.const 0 call $~lib/env/abort @@ -26375,7 +26372,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1634 i32.const 0 call $~lib/env/abort @@ -26390,7 +26387,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1637 i32.const 0 call $~lib/env/abort @@ -26405,7 +26402,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1638 i32.const 0 call $~lib/env/abort @@ -26419,7 +26416,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1639 i32.const 0 call $~lib/env/abort @@ -26433,7 +26430,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1640 i32.const 0 call $~lib/env/abort @@ -26447,7 +26444,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1641 i32.const 0 call $~lib/env/abort @@ -26461,7 +26458,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1642 i32.const 0 call $~lib/env/abort @@ -26476,7 +26473,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1643 i32.const 0 call $~lib/env/abort @@ -26490,7 +26487,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1644 i32.const 0 call $~lib/env/abort @@ -26505,7 +26502,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1653 i32.const 0 call $~lib/env/abort @@ -26520,7 +26517,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1654 i32.const 0 call $~lib/env/abort @@ -26534,7 +26531,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1655 i32.const 0 call $~lib/env/abort @@ -26548,7 +26545,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1656 i32.const 0 call $~lib/env/abort @@ -26562,7 +26559,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1657 i32.const 0 call $~lib/env/abort @@ -26576,7 +26573,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1658 i32.const 0 call $~lib/env/abort @@ -26591,7 +26588,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1659 i32.const 0 call $~lib/env/abort @@ -26605,7 +26602,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1660 i32.const 0 call $~lib/env/abort @@ -26620,7 +26617,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1663 i32.const 0 call $~lib/env/abort @@ -26635,7 +26632,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1664 i32.const 0 call $~lib/env/abort @@ -26649,7 +26646,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1665 i32.const 0 call $~lib/env/abort @@ -26663,7 +26660,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1666 i32.const 0 call $~lib/env/abort @@ -26677,7 +26674,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1667 i32.const 0 call $~lib/env/abort @@ -26691,7 +26688,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1668 i32.const 0 call $~lib/env/abort @@ -26706,7 +26703,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1669 i32.const 0 call $~lib/env/abort @@ -26720,7 +26717,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1670 i32.const 0 call $~lib/env/abort @@ -26734,7 +26731,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1682 i32.const 0 call $~lib/env/abort @@ -26748,7 +26745,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1683 i32.const 0 call $~lib/env/abort @@ -26762,7 +26759,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1684 i32.const 0 call $~lib/env/abort @@ -26776,7 +26773,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1685 i32.const 0 call $~lib/env/abort @@ -26790,7 +26787,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1686 i32.const 0 call $~lib/env/abort @@ -26804,7 +26801,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1687 i32.const 0 call $~lib/env/abort @@ -26818,7 +26815,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1688 i32.const 0 call $~lib/env/abort @@ -26832,7 +26829,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1689 i32.const 0 call $~lib/env/abort @@ -26846,7 +26843,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1690 i32.const 0 call $~lib/env/abort @@ -26860,7 +26857,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1691 i32.const 0 call $~lib/env/abort @@ -26875,7 +26872,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1694 i32.const 0 call $~lib/env/abort @@ -26890,7 +26887,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1695 i32.const 0 call $~lib/env/abort @@ -26904,7 +26901,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1696 i32.const 0 call $~lib/env/abort @@ -26918,7 +26915,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1697 i32.const 0 call $~lib/env/abort @@ -26932,7 +26929,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1698 i32.const 0 call $~lib/env/abort @@ -26946,7 +26943,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1699 i32.const 0 call $~lib/env/abort @@ -26961,7 +26958,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1700 i32.const 0 call $~lib/env/abort @@ -26975,7 +26972,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1701 i32.const 0 call $~lib/env/abort @@ -26989,7 +26986,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1710 i32.const 0 call $~lib/env/abort @@ -27003,7 +27000,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1711 i32.const 0 call $~lib/env/abort @@ -27017,7 +27014,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1712 i32.const 0 call $~lib/env/abort @@ -27031,7 +27028,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1713 i32.const 0 call $~lib/env/abort @@ -27045,7 +27042,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1714 i32.const 0 call $~lib/env/abort @@ -27059,7 +27056,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1715 i32.const 0 call $~lib/env/abort @@ -27073,7 +27070,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1716 i32.const 0 call $~lib/env/abort @@ -27087,7 +27084,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1717 i32.const 0 call $~lib/env/abort @@ -27101,7 +27098,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1718 i32.const 0 call $~lib/env/abort @@ -27115,7 +27112,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1719 i32.const 0 call $~lib/env/abort @@ -27130,7 +27127,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1722 i32.const 0 call $~lib/env/abort @@ -27145,7 +27142,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1723 i32.const 0 call $~lib/env/abort @@ -27159,7 +27156,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1724 i32.const 0 call $~lib/env/abort @@ -27173,7 +27170,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1725 i32.const 0 call $~lib/env/abort @@ -27187,7 +27184,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1726 i32.const 0 call $~lib/env/abort @@ -27201,7 +27198,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1727 i32.const 0 call $~lib/env/abort @@ -27216,7 +27213,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1728 i32.const 0 call $~lib/env/abort @@ -27230,7 +27227,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1729 i32.const 0 call $~lib/env/abort @@ -27244,7 +27241,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1741 i32.const 0 call $~lib/env/abort @@ -27258,7 +27255,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1742 i32.const 0 call $~lib/env/abort @@ -27272,7 +27269,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1743 i32.const 0 call $~lib/env/abort @@ -27286,7 +27283,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1744 i32.const 0 call $~lib/env/abort @@ -27300,7 +27297,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1745 i32.const 0 call $~lib/env/abort @@ -27314,7 +27311,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1746 i32.const 0 call $~lib/env/abort @@ -27328,7 +27325,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1747 i32.const 0 call $~lib/env/abort @@ -27342,7 +27339,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1748 i32.const 0 call $~lib/env/abort @@ -27356,7 +27353,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1749 i32.const 0 call $~lib/env/abort @@ -27370,7 +27367,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1750 i32.const 0 call $~lib/env/abort @@ -27384,7 +27381,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1753 i32.const 0 call $~lib/env/abort @@ -27398,7 +27395,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1754 i32.const 0 call $~lib/env/abort @@ -27412,7 +27409,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1755 i32.const 0 call $~lib/env/abort @@ -27426,7 +27423,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1756 i32.const 0 call $~lib/env/abort @@ -27441,7 +27438,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1757 i32.const 0 call $~lib/env/abort @@ -27455,7 +27452,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1758 i32.const 0 call $~lib/env/abort @@ -27470,7 +27467,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1759 i32.const 0 call $~lib/env/abort @@ -27484,7 +27481,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1760 i32.const 0 call $~lib/env/abort @@ -27498,7 +27495,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1769 i32.const 0 call $~lib/env/abort @@ -27512,7 +27509,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1770 i32.const 0 call $~lib/env/abort @@ -27526,7 +27523,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1771 i32.const 0 call $~lib/env/abort @@ -27540,7 +27537,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1772 i32.const 0 call $~lib/env/abort @@ -27554,7 +27551,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1773 i32.const 0 call $~lib/env/abort @@ -27568,7 +27565,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1774 i32.const 0 call $~lib/env/abort @@ -27582,7 +27579,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1775 i32.const 0 call $~lib/env/abort @@ -27596,7 +27593,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1776 i32.const 0 call $~lib/env/abort @@ -27610,7 +27607,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1777 i32.const 0 call $~lib/env/abort @@ -27624,7 +27621,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1778 i32.const 0 call $~lib/env/abort @@ -27638,7 +27635,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1781 i32.const 0 call $~lib/env/abort @@ -27652,7 +27649,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1782 i32.const 0 call $~lib/env/abort @@ -27666,7 +27663,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1783 i32.const 0 call $~lib/env/abort @@ -27680,7 +27677,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1784 i32.const 0 call $~lib/env/abort @@ -27695,7 +27692,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1785 i32.const 0 call $~lib/env/abort @@ -27709,7 +27706,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1786 i32.const 0 call $~lib/env/abort @@ -27724,7 +27721,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1787 i32.const 0 call $~lib/env/abort @@ -27738,7 +27735,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1788 i32.const 0 call $~lib/env/abort @@ -27754,7 +27751,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1789 i32.const 0 call $~lib/env/abort @@ -27768,7 +27765,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1801 i32.const 0 call $~lib/env/abort @@ -27782,7 +27779,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1802 i32.const 0 call $~lib/env/abort @@ -27796,7 +27793,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1803 i32.const 0 call $~lib/env/abort @@ -27810,7 +27807,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1804 i32.const 0 call $~lib/env/abort @@ -27824,7 +27821,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1805 i32.const 0 call $~lib/env/abort @@ -27838,7 +27835,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1806 i32.const 0 call $~lib/env/abort @@ -27852,7 +27849,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1807 i32.const 0 call $~lib/env/abort @@ -27866,7 +27863,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1808 i32.const 0 call $~lib/env/abort @@ -27880,7 +27877,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1809 i32.const 0 call $~lib/env/abort @@ -27894,7 +27891,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1810 i32.const 0 call $~lib/env/abort @@ -27909,7 +27906,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1813 i32.const 0 call $~lib/env/abort @@ -27924,7 +27921,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1814 i32.const 0 call $~lib/env/abort @@ -27938,7 +27935,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1815 i32.const 0 call $~lib/env/abort @@ -27952,7 +27949,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1816 i32.const 0 call $~lib/env/abort @@ -27966,7 +27963,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1817 i32.const 0 call $~lib/env/abort @@ -27980,7 +27977,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1818 i32.const 0 call $~lib/env/abort @@ -27995,7 +27992,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1819 i32.const 0 call $~lib/env/abort @@ -28009,7 +28006,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1820 i32.const 0 call $~lib/env/abort @@ -28023,7 +28020,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1829 i32.const 0 call $~lib/env/abort @@ -28037,7 +28034,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1830 i32.const 0 call $~lib/env/abort @@ -28051,7 +28048,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1831 i32.const 0 call $~lib/env/abort @@ -28065,7 +28062,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1832 i32.const 0 call $~lib/env/abort @@ -28079,7 +28076,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1833 i32.const 0 call $~lib/env/abort @@ -28093,7 +28090,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1834 i32.const 0 call $~lib/env/abort @@ -28107,7 +28104,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1835 i32.const 0 call $~lib/env/abort @@ -28121,7 +28118,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1836 i32.const 0 call $~lib/env/abort @@ -28135,7 +28132,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1837 i32.const 0 call $~lib/env/abort @@ -28149,7 +28146,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1838 i32.const 0 call $~lib/env/abort @@ -28164,7 +28161,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1841 i32.const 0 call $~lib/env/abort @@ -28179,7 +28176,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1842 i32.const 0 call $~lib/env/abort @@ -28193,7 +28190,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1843 i32.const 0 call $~lib/env/abort @@ -28207,7 +28204,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1844 i32.const 0 call $~lib/env/abort @@ -28221,7 +28218,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1845 i32.const 0 call $~lib/env/abort @@ -28235,7 +28232,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1846 i32.const 0 call $~lib/env/abort @@ -28250,7 +28247,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1847 i32.const 0 call $~lib/env/abort @@ -28264,7 +28261,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1848 i32.const 0 call $~lib/env/abort @@ -28279,7 +28276,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1860 i32.const 0 call $~lib/env/abort @@ -28294,7 +28291,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1861 i32.const 0 call $~lib/env/abort @@ -28309,7 +28306,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1862 i32.const 0 call $~lib/env/abort @@ -28324,7 +28321,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1863 i32.const 0 call $~lib/env/abort @@ -28339,7 +28336,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1864 i32.const 0 call $~lib/env/abort @@ -28354,7 +28351,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1865 i32.const 0 call $~lib/env/abort @@ -28369,7 +28366,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1866 i32.const 0 call $~lib/env/abort @@ -28384,7 +28381,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1867 i32.const 0 call $~lib/env/abort @@ -28399,7 +28396,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1868 i32.const 0 call $~lib/env/abort @@ -28414,7 +28411,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1869 i32.const 0 call $~lib/env/abort @@ -28429,7 +28426,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1872 i32.const 0 call $~lib/env/abort @@ -28444,7 +28441,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1873 i32.const 0 call $~lib/env/abort @@ -28459,7 +28456,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1874 i32.const 0 call $~lib/env/abort @@ -28474,7 +28471,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1875 i32.const 0 call $~lib/env/abort @@ -28489,7 +28486,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1876 i32.const 0 call $~lib/env/abort @@ -28504,7 +28501,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1877 i32.const 0 call $~lib/env/abort @@ -28519,7 +28516,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1878 i32.const 0 call $~lib/env/abort @@ -28535,7 +28532,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1879 i32.const 0 call $~lib/env/abort @@ -28550,7 +28547,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1880 i32.const 0 call $~lib/env/abort @@ -28565,7 +28562,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1881 i32.const 0 call $~lib/env/abort @@ -28580,7 +28577,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1882 i32.const 0 call $~lib/env/abort @@ -28595,7 +28592,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1883 i32.const 0 call $~lib/env/abort @@ -28610,7 +28607,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1884 i32.const 0 call $~lib/env/abort @@ -28625,7 +28622,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1885 i32.const 0 call $~lib/env/abort @@ -28640,7 +28637,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1886 i32.const 0 call $~lib/env/abort @@ -28655,7 +28652,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1887 i32.const 0 call $~lib/env/abort @@ -28671,7 +28668,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1888 i32.const 0 call $~lib/env/abort @@ -28686,7 +28683,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1889 i32.const 0 call $~lib/env/abort @@ -28701,7 +28698,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1890 i32.const 0 call $~lib/env/abort @@ -28716,7 +28713,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1891 i32.const 0 call $~lib/env/abort @@ -28731,7 +28728,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1892 i32.const 0 call $~lib/env/abort @@ -28747,7 +28744,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1893 i32.const 0 call $~lib/env/abort @@ -28762,7 +28759,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1894 i32.const 0 call $~lib/env/abort @@ -28777,7 +28774,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1895 i32.const 0 call $~lib/env/abort @@ -28792,7 +28789,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1896 i32.const 0 call $~lib/env/abort @@ -28807,7 +28804,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1897 i32.const 0 call $~lib/env/abort @@ -28823,7 +28820,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1898 i32.const 0 call $~lib/env/abort @@ -28838,7 +28835,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1899 i32.const 0 call $~lib/env/abort @@ -28853,7 +28850,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1900 i32.const 0 call $~lib/env/abort @@ -28868,7 +28865,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1901 i32.const 0 call $~lib/env/abort @@ -28883,7 +28880,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1902 i32.const 0 call $~lib/env/abort @@ -28899,7 +28896,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1903 i32.const 0 call $~lib/env/abort @@ -28914,7 +28911,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1904 i32.const 0 call $~lib/env/abort @@ -28929,7 +28926,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1905 i32.const 0 call $~lib/env/abort @@ -28944,7 +28941,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1906 i32.const 0 call $~lib/env/abort @@ -28960,7 +28957,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1907 i32.const 0 call $~lib/env/abort @@ -28975,7 +28972,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1908 i32.const 0 call $~lib/env/abort @@ -28990,7 +28987,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1909 i32.const 0 call $~lib/env/abort @@ -29005,7 +29002,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1910 i32.const 0 call $~lib/env/abort @@ -29020,7 +29017,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1911 i32.const 0 call $~lib/env/abort @@ -29036,7 +29033,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1912 i32.const 0 call $~lib/env/abort @@ -29052,7 +29049,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1913 i32.const 0 call $~lib/env/abort @@ -29068,7 +29065,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1914 i32.const 0 call $~lib/env/abort @@ -29083,7 +29080,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1915 i32.const 0 call $~lib/env/abort @@ -29098,7 +29095,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1916 i32.const 0 call $~lib/env/abort @@ -29113,7 +29110,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1917 i32.const 0 call $~lib/env/abort @@ -29128,7 +29125,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1918 i32.const 0 call $~lib/env/abort @@ -29143,7 +29140,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1919 i32.const 0 call $~lib/env/abort @@ -29158,7 +29155,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1920 i32.const 0 call $~lib/env/abort @@ -29174,7 +29171,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1921 i32.const 0 call $~lib/env/abort @@ -29190,7 +29187,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1922 i32.const 0 call $~lib/env/abort @@ -29206,7 +29203,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1923 i32.const 0 call $~lib/env/abort @@ -29222,7 +29219,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1924 i32.const 0 call $~lib/env/abort @@ -29240,7 +29237,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1925 i32.const 0 call $~lib/env/abort @@ -29255,7 +29252,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1926 i32.const 0 call $~lib/env/abort @@ -29270,7 +29267,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1927 i32.const 0 call $~lib/env/abort @@ -29285,7 +29282,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1928 i32.const 0 call $~lib/env/abort @@ -29300,7 +29297,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1929 i32.const 0 call $~lib/env/abort @@ -29315,7 +29312,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1938 i32.const 0 call $~lib/env/abort @@ -29330,7 +29327,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1939 i32.const 0 call $~lib/env/abort @@ -29345,7 +29342,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1940 i32.const 0 call $~lib/env/abort @@ -29360,7 +29357,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1941 i32.const 0 call $~lib/env/abort @@ -29375,7 +29372,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1942 i32.const 0 call $~lib/env/abort @@ -29390,7 +29387,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1943 i32.const 0 call $~lib/env/abort @@ -29405,7 +29402,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1944 i32.const 0 call $~lib/env/abort @@ -29420,7 +29417,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1945 i32.const 0 call $~lib/env/abort @@ -29435,7 +29432,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1946 i32.const 0 call $~lib/env/abort @@ -29450,7 +29447,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1947 i32.const 0 call $~lib/env/abort @@ -29465,7 +29462,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1950 i32.const 0 call $~lib/env/abort @@ -29480,7 +29477,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1951 i32.const 0 call $~lib/env/abort @@ -29495,7 +29492,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1952 i32.const 0 call $~lib/env/abort @@ -29510,7 +29507,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1953 i32.const 0 call $~lib/env/abort @@ -29525,7 +29522,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1954 i32.const 0 call $~lib/env/abort @@ -29540,7 +29537,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1955 i32.const 0 call $~lib/env/abort @@ -29555,7 +29552,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1956 i32.const 0 call $~lib/env/abort @@ -29571,7 +29568,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1957 i32.const 0 call $~lib/env/abort @@ -29586,7 +29583,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1958 i32.const 0 call $~lib/env/abort @@ -29601,7 +29598,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1959 i32.const 0 call $~lib/env/abort @@ -29616,7 +29613,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1960 i32.const 0 call $~lib/env/abort @@ -29631,7 +29628,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1961 i32.const 0 call $~lib/env/abort @@ -29646,7 +29643,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1962 i32.const 0 call $~lib/env/abort @@ -29661,7 +29658,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1963 i32.const 0 call $~lib/env/abort @@ -29676,7 +29673,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1964 i32.const 0 call $~lib/env/abort @@ -29691,7 +29688,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1965 i32.const 0 call $~lib/env/abort @@ -29707,7 +29704,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1966 i32.const 0 call $~lib/env/abort @@ -29722,7 +29719,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1967 i32.const 0 call $~lib/env/abort @@ -29737,7 +29734,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1968 i32.const 0 call $~lib/env/abort @@ -29752,7 +29749,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1969 i32.const 0 call $~lib/env/abort @@ -29767,7 +29764,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1970 i32.const 0 call $~lib/env/abort @@ -29783,7 +29780,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1971 i32.const 0 call $~lib/env/abort @@ -29798,7 +29795,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1972 i32.const 0 call $~lib/env/abort @@ -29813,7 +29810,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1973 i32.const 0 call $~lib/env/abort @@ -29828,7 +29825,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1974 i32.const 0 call $~lib/env/abort @@ -29843,7 +29840,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1975 i32.const 0 call $~lib/env/abort @@ -29859,7 +29856,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1976 i32.const 0 call $~lib/env/abort @@ -29874,7 +29871,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1977 i32.const 0 call $~lib/env/abort @@ -29889,7 +29886,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1978 i32.const 0 call $~lib/env/abort @@ -29904,7 +29901,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1979 i32.const 0 call $~lib/env/abort @@ -29919,7 +29916,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1980 i32.const 0 call $~lib/env/abort @@ -29935,7 +29932,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1981 i32.const 0 call $~lib/env/abort @@ -29950,7 +29947,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1982 i32.const 0 call $~lib/env/abort @@ -29965,7 +29962,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1983 i32.const 0 call $~lib/env/abort @@ -29980,7 +29977,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1984 i32.const 0 call $~lib/env/abort @@ -29996,7 +29993,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1985 i32.const 0 call $~lib/env/abort @@ -30011,7 +30008,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1986 i32.const 0 call $~lib/env/abort @@ -30026,7 +30023,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1987 i32.const 0 call $~lib/env/abort @@ -30041,7 +30038,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1988 i32.const 0 call $~lib/env/abort @@ -30056,7 +30053,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1989 i32.const 0 call $~lib/env/abort @@ -30072,7 +30069,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1990 i32.const 0 call $~lib/env/abort @@ -30088,7 +30085,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1991 i32.const 0 call $~lib/env/abort @@ -30104,7 +30101,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1992 i32.const 0 call $~lib/env/abort @@ -30119,7 +30116,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1993 i32.const 0 call $~lib/env/abort @@ -30134,7 +30131,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1994 i32.const 0 call $~lib/env/abort @@ -30149,7 +30146,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1995 i32.const 0 call $~lib/env/abort @@ -30164,7 +30161,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1996 i32.const 0 call $~lib/env/abort @@ -30179,7 +30176,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1997 i32.const 0 call $~lib/env/abort @@ -30194,7 +30191,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1998 i32.const 0 call $~lib/env/abort @@ -30210,7 +30207,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 1999 i32.const 0 call $~lib/env/abort @@ -30226,7 +30223,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2000 i32.const 0 call $~lib/env/abort @@ -30242,7 +30239,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2001 i32.const 0 call $~lib/env/abort @@ -30258,7 +30255,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2002 i32.const 0 call $~lib/env/abort @@ -30276,7 +30273,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2003 i32.const 0 call $~lib/env/abort @@ -30291,7 +30288,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2004 i32.const 0 call $~lib/env/abort @@ -30306,7 +30303,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2005 i32.const 0 call $~lib/env/abort @@ -30321,7 +30318,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2006 i32.const 0 call $~lib/env/abort @@ -30336,7 +30333,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2007 i32.const 0 call $~lib/env/abort @@ -30351,7 +30348,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2019 i32.const 0 call $~lib/env/abort @@ -30366,7 +30363,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2020 i32.const 0 call $~lib/env/abort @@ -30381,7 +30378,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2021 i32.const 0 call $~lib/env/abort @@ -30396,7 +30393,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2022 i32.const 0 call $~lib/env/abort @@ -30411,7 +30408,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2023 i32.const 0 call $~lib/env/abort @@ -30426,7 +30423,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2024 i32.const 0 call $~lib/env/abort @@ -30441,7 +30438,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2025 i32.const 0 call $~lib/env/abort @@ -30456,7 +30453,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2026 i32.const 0 call $~lib/env/abort @@ -30471,7 +30468,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2027 i32.const 0 call $~lib/env/abort @@ -30486,7 +30483,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2028 i32.const 0 call $~lib/env/abort @@ -30501,7 +30498,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2031 i32.const 0 call $~lib/env/abort @@ -30516,7 +30513,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2032 i32.const 0 call $~lib/env/abort @@ -30531,7 +30528,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2033 i32.const 0 call $~lib/env/abort @@ -30546,7 +30543,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2034 i32.const 0 call $~lib/env/abort @@ -30561,7 +30558,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2035 i32.const 0 call $~lib/env/abort @@ -30576,7 +30573,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2036 i32.const 0 call $~lib/env/abort @@ -30591,7 +30588,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2037 i32.const 0 call $~lib/env/abort @@ -30608,7 +30605,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2038 i32.const 0 call $~lib/env/abort @@ -30623,7 +30620,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2039 i32.const 0 call $~lib/env/abort @@ -30638,7 +30635,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2040 i32.const 0 call $~lib/env/abort @@ -30653,7 +30650,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2041 i32.const 0 call $~lib/env/abort @@ -30668,7 +30665,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2042 i32.const 0 call $~lib/env/abort @@ -30683,7 +30680,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2043 i32.const 0 call $~lib/env/abort @@ -30698,7 +30695,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2044 i32.const 0 call $~lib/env/abort @@ -30713,7 +30710,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2045 i32.const 0 call $~lib/env/abort @@ -30728,7 +30725,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2046 i32.const 0 call $~lib/env/abort @@ -30745,7 +30742,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2047 i32.const 0 call $~lib/env/abort @@ -30760,7 +30757,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2048 i32.const 0 call $~lib/env/abort @@ -30775,7 +30772,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2049 i32.const 0 call $~lib/env/abort @@ -30790,7 +30787,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2050 i32.const 0 call $~lib/env/abort @@ -30805,7 +30802,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2051 i32.const 0 call $~lib/env/abort @@ -30822,7 +30819,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2052 i32.const 0 call $~lib/env/abort @@ -30837,7 +30834,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2053 i32.const 0 call $~lib/env/abort @@ -30852,7 +30849,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2054 i32.const 0 call $~lib/env/abort @@ -30867,7 +30864,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2055 i32.const 0 call $~lib/env/abort @@ -30882,7 +30879,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2056 i32.const 0 call $~lib/env/abort @@ -30899,7 +30896,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2057 i32.const 0 call $~lib/env/abort @@ -30914,7 +30911,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2058 i32.const 0 call $~lib/env/abort @@ -30929,7 +30926,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2059 i32.const 0 call $~lib/env/abort @@ -30944,7 +30941,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2060 i32.const 0 call $~lib/env/abort @@ -30959,7 +30956,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2061 i32.const 0 call $~lib/env/abort @@ -30976,7 +30973,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2062 i32.const 0 call $~lib/env/abort @@ -30991,7 +30988,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2063 i32.const 0 call $~lib/env/abort @@ -31006,7 +31003,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2064 i32.const 0 call $~lib/env/abort @@ -31021,7 +31018,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2065 i32.const 0 call $~lib/env/abort @@ -31038,7 +31035,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2066 i32.const 0 call $~lib/env/abort @@ -31053,7 +31050,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2067 i32.const 0 call $~lib/env/abort @@ -31068,7 +31065,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2068 i32.const 0 call $~lib/env/abort @@ -31083,7 +31080,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2069 i32.const 0 call $~lib/env/abort @@ -31098,7 +31095,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2070 i32.const 0 call $~lib/env/abort @@ -31115,7 +31112,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2071 i32.const 0 call $~lib/env/abort @@ -31132,7 +31129,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2072 i32.const 0 call $~lib/env/abort @@ -31148,7 +31145,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2073 i32.const 0 call $~lib/env/abort @@ -31163,7 +31160,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2074 i32.const 0 call $~lib/env/abort @@ -31178,7 +31175,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2075 i32.const 0 call $~lib/env/abort @@ -31193,7 +31190,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2076 i32.const 0 call $~lib/env/abort @@ -31208,7 +31205,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2077 i32.const 0 call $~lib/env/abort @@ -31223,7 +31220,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2078 i32.const 0 call $~lib/env/abort @@ -31238,7 +31235,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2079 i32.const 0 call $~lib/env/abort @@ -31255,7 +31252,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2080 i32.const 0 call $~lib/env/abort @@ -31272,7 +31269,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2081 i32.const 0 call $~lib/env/abort @@ -31289,7 +31286,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2082 i32.const 0 call $~lib/env/abort @@ -31306,7 +31303,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2083 i32.const 0 call $~lib/env/abort @@ -31324,7 +31321,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2084 i32.const 0 call $~lib/env/abort @@ -31339,7 +31336,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2085 i32.const 0 call $~lib/env/abort @@ -31354,7 +31351,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2086 i32.const 0 call $~lib/env/abort @@ -31369,7 +31366,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2087 i32.const 0 call $~lib/env/abort @@ -31384,7 +31381,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2088 i32.const 0 call $~lib/env/abort @@ -31399,7 +31396,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2097 i32.const 0 call $~lib/env/abort @@ -31414,7 +31411,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2098 i32.const 0 call $~lib/env/abort @@ -31429,7 +31426,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2099 i32.const 0 call $~lib/env/abort @@ -31444,7 +31441,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2100 i32.const 0 call $~lib/env/abort @@ -31459,7 +31456,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2101 i32.const 0 call $~lib/env/abort @@ -31474,7 +31471,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2102 i32.const 0 call $~lib/env/abort @@ -31489,7 +31486,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2103 i32.const 0 call $~lib/env/abort @@ -31504,7 +31501,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2104 i32.const 0 call $~lib/env/abort @@ -31519,7 +31516,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2105 i32.const 0 call $~lib/env/abort @@ -31534,7 +31531,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2106 i32.const 0 call $~lib/env/abort @@ -31549,7 +31546,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2109 i32.const 0 call $~lib/env/abort @@ -31564,7 +31561,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2110 i32.const 0 call $~lib/env/abort @@ -31579,7 +31576,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2111 i32.const 0 call $~lib/env/abort @@ -31594,7 +31591,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2112 i32.const 0 call $~lib/env/abort @@ -31609,7 +31606,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2113 i32.const 0 call $~lib/env/abort @@ -31624,7 +31621,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2114 i32.const 0 call $~lib/env/abort @@ -31639,7 +31636,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2115 i32.const 0 call $~lib/env/abort @@ -31656,7 +31653,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2116 i32.const 0 call $~lib/env/abort @@ -31671,7 +31668,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2117 i32.const 0 call $~lib/env/abort @@ -31686,7 +31683,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2118 i32.const 0 call $~lib/env/abort @@ -31701,7 +31698,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2119 i32.const 0 call $~lib/env/abort @@ -31716,7 +31713,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2120 i32.const 0 call $~lib/env/abort @@ -31731,7 +31728,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2121 i32.const 0 call $~lib/env/abort @@ -31746,7 +31743,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2122 i32.const 0 call $~lib/env/abort @@ -31761,7 +31758,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2123 i32.const 0 call $~lib/env/abort @@ -31776,7 +31773,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2124 i32.const 0 call $~lib/env/abort @@ -31793,7 +31790,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2125 i32.const 0 call $~lib/env/abort @@ -31808,7 +31805,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2126 i32.const 0 call $~lib/env/abort @@ -31823,7 +31820,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2127 i32.const 0 call $~lib/env/abort @@ -31838,7 +31835,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2128 i32.const 0 call $~lib/env/abort @@ -31853,7 +31850,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2129 i32.const 0 call $~lib/env/abort @@ -31870,7 +31867,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2130 i32.const 0 call $~lib/env/abort @@ -31885,7 +31882,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2131 i32.const 0 call $~lib/env/abort @@ -31900,7 +31897,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2132 i32.const 0 call $~lib/env/abort @@ -31915,7 +31912,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2133 i32.const 0 call $~lib/env/abort @@ -31930,7 +31927,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2134 i32.const 0 call $~lib/env/abort @@ -31947,7 +31944,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2135 i32.const 0 call $~lib/env/abort @@ -31962,7 +31959,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2136 i32.const 0 call $~lib/env/abort @@ -31977,7 +31974,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2137 i32.const 0 call $~lib/env/abort @@ -31992,7 +31989,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2138 i32.const 0 call $~lib/env/abort @@ -32007,7 +32004,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2139 i32.const 0 call $~lib/env/abort @@ -32024,7 +32021,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2140 i32.const 0 call $~lib/env/abort @@ -32039,7 +32036,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2141 i32.const 0 call $~lib/env/abort @@ -32054,7 +32051,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2142 i32.const 0 call $~lib/env/abort @@ -32069,7 +32066,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2143 i32.const 0 call $~lib/env/abort @@ -32086,7 +32083,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2144 i32.const 0 call $~lib/env/abort @@ -32101,7 +32098,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2145 i32.const 0 call $~lib/env/abort @@ -32116,7 +32113,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2146 i32.const 0 call $~lib/env/abort @@ -32131,7 +32128,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2147 i32.const 0 call $~lib/env/abort @@ -32146,7 +32143,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2148 i32.const 0 call $~lib/env/abort @@ -32163,7 +32160,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2149 i32.const 0 call $~lib/env/abort @@ -32180,7 +32177,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2150 i32.const 0 call $~lib/env/abort @@ -32196,7 +32193,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2151 i32.const 0 call $~lib/env/abort @@ -32211,7 +32208,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2152 i32.const 0 call $~lib/env/abort @@ -32226,7 +32223,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2153 i32.const 0 call $~lib/env/abort @@ -32241,7 +32238,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2154 i32.const 0 call $~lib/env/abort @@ -32256,7 +32253,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2155 i32.const 0 call $~lib/env/abort @@ -32271,7 +32268,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2156 i32.const 0 call $~lib/env/abort @@ -32286,7 +32283,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2157 i32.const 0 call $~lib/env/abort @@ -32303,7 +32300,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2158 i32.const 0 call $~lib/env/abort @@ -32320,7 +32317,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2159 i32.const 0 call $~lib/env/abort @@ -32337,7 +32334,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2160 i32.const 0 call $~lib/env/abort @@ -32354,7 +32351,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2161 i32.const 0 call $~lib/env/abort @@ -32372,7 +32369,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2162 i32.const 0 call $~lib/env/abort @@ -32387,7 +32384,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2163 i32.const 0 call $~lib/env/abort @@ -32402,7 +32399,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2164 i32.const 0 call $~lib/env/abort @@ -32417,7 +32414,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2165 i32.const 0 call $~lib/env/abort @@ -32432,7 +32429,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2166 i32.const 0 call $~lib/env/abort @@ -32447,7 +32444,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2180 i32.const 0 call $~lib/env/abort @@ -32462,7 +32459,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2181 i32.const 0 call $~lib/env/abort @@ -32477,7 +32474,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2182 i32.const 0 call $~lib/env/abort @@ -32492,7 +32489,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2183 i32.const 0 call $~lib/env/abort @@ -32507,7 +32504,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2184 i32.const 0 call $~lib/env/abort @@ -32522,7 +32519,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2185 i32.const 0 call $~lib/env/abort @@ -32537,7 +32534,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2186 i32.const 0 call $~lib/env/abort @@ -32552,7 +32549,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2187 i32.const 0 call $~lib/env/abort @@ -32567,7 +32564,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2188 i32.const 0 call $~lib/env/abort @@ -32582,7 +32579,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2189 i32.const 0 call $~lib/env/abort @@ -32597,7 +32594,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2192 i32.const 0 call $~lib/env/abort @@ -32612,7 +32609,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2193 i32.const 0 call $~lib/env/abort @@ -32627,7 +32624,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2194 i32.const 0 call $~lib/env/abort @@ -32642,7 +32639,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2195 i32.const 0 call $~lib/env/abort @@ -32657,7 +32654,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2196 i32.const 0 call $~lib/env/abort @@ -32672,7 +32669,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2197 i32.const 0 call $~lib/env/abort @@ -32687,7 +32684,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2198 i32.const 0 call $~lib/env/abort @@ -32702,7 +32699,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2199 i32.const 0 call $~lib/env/abort @@ -32717,7 +32714,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2200 i32.const 0 call $~lib/env/abort @@ -32732,7 +32729,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2201 i32.const 0 call $~lib/env/abort @@ -32747,7 +32744,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2202 i32.const 0 call $~lib/env/abort @@ -32763,7 +32760,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2203 i32.const 0 call $~lib/env/abort @@ -32778,7 +32775,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2204 i32.const 0 call $~lib/env/abort @@ -32793,7 +32790,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2205 i32.const 0 call $~lib/env/abort @@ -32808,7 +32805,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2206 i32.const 0 call $~lib/env/abort @@ -32823,7 +32820,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2207 i32.const 0 call $~lib/env/abort @@ -32838,7 +32835,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2208 i32.const 0 call $~lib/env/abort @@ -32853,7 +32850,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2209 i32.const 0 call $~lib/env/abort @@ -32868,7 +32865,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2210 i32.const 0 call $~lib/env/abort @@ -32883,7 +32880,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2211 i32.const 0 call $~lib/env/abort @@ -32898,7 +32895,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2212 i32.const 0 call $~lib/env/abort @@ -32913,7 +32910,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2213 i32.const 0 call $~lib/env/abort @@ -32928,7 +32925,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2214 i32.const 0 call $~lib/env/abort @@ -32943,7 +32940,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2215 i32.const 0 call $~lib/env/abort @@ -32959,7 +32956,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2216 i32.const 0 call $~lib/env/abort @@ -32974,7 +32971,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2217 i32.const 0 call $~lib/env/abort @@ -32989,7 +32986,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2218 i32.const 0 call $~lib/env/abort @@ -33004,7 +33001,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2219 i32.const 0 call $~lib/env/abort @@ -33019,7 +33016,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2220 i32.const 0 call $~lib/env/abort @@ -33035,7 +33032,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2221 i32.const 0 call $~lib/env/abort @@ -33050,7 +33047,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2222 i32.const 0 call $~lib/env/abort @@ -33065,7 +33062,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2223 i32.const 0 call $~lib/env/abort @@ -33080,7 +33077,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2224 i32.const 0 call $~lib/env/abort @@ -33095,7 +33092,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2225 i32.const 0 call $~lib/env/abort @@ -33111,7 +33108,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2226 i32.const 0 call $~lib/env/abort @@ -33126,7 +33123,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2227 i32.const 0 call $~lib/env/abort @@ -33141,7 +33138,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2228 i32.const 0 call $~lib/env/abort @@ -33156,7 +33153,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2229 i32.const 0 call $~lib/env/abort @@ -33171,7 +33168,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2230 i32.const 0 call $~lib/env/abort @@ -33187,7 +33184,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2231 i32.const 0 call $~lib/env/abort @@ -33202,7 +33199,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2232 i32.const 0 call $~lib/env/abort @@ -33217,7 +33214,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2233 i32.const 0 call $~lib/env/abort @@ -33232,7 +33229,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2234 i32.const 0 call $~lib/env/abort @@ -33248,7 +33245,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2235 i32.const 0 call $~lib/env/abort @@ -33263,7 +33260,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2236 i32.const 0 call $~lib/env/abort @@ -33278,7 +33275,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2237 i32.const 0 call $~lib/env/abort @@ -33293,7 +33290,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2238 i32.const 0 call $~lib/env/abort @@ -33308,7 +33305,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2239 i32.const 0 call $~lib/env/abort @@ -33324,7 +33321,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2240 i32.const 0 call $~lib/env/abort @@ -33340,7 +33337,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2241 i32.const 0 call $~lib/env/abort @@ -33356,7 +33353,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2242 i32.const 0 call $~lib/env/abort @@ -33371,7 +33368,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2243 i32.const 0 call $~lib/env/abort @@ -33386,7 +33383,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2244 i32.const 0 call $~lib/env/abort @@ -33401,7 +33398,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2245 i32.const 0 call $~lib/env/abort @@ -33416,7 +33413,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2246 i32.const 0 call $~lib/env/abort @@ -33431,7 +33428,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2247 i32.const 0 call $~lib/env/abort @@ -33446,7 +33443,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2248 i32.const 0 call $~lib/env/abort @@ -33462,7 +33459,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2249 i32.const 0 call $~lib/env/abort @@ -33478,7 +33475,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2250 i32.const 0 call $~lib/env/abort @@ -33494,7 +33491,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2251 i32.const 0 call $~lib/env/abort @@ -33510,7 +33507,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2252 i32.const 0 call $~lib/env/abort @@ -33527,7 +33524,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2253 i32.const 0 call $~lib/env/abort @@ -33542,7 +33539,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2254 i32.const 0 call $~lib/env/abort @@ -33557,7 +33554,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2255 i32.const 0 call $~lib/env/abort @@ -33572,7 +33569,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2256 i32.const 0 call $~lib/env/abort @@ -33587,7 +33584,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2257 i32.const 0 call $~lib/env/abort @@ -33602,7 +33599,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2266 i32.const 0 call $~lib/env/abort @@ -33617,7 +33614,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2267 i32.const 0 call $~lib/env/abort @@ -33632,7 +33629,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2268 i32.const 0 call $~lib/env/abort @@ -33647,7 +33644,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2269 i32.const 0 call $~lib/env/abort @@ -33662,7 +33659,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2270 i32.const 0 call $~lib/env/abort @@ -33677,7 +33674,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2271 i32.const 0 call $~lib/env/abort @@ -33692,7 +33689,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2272 i32.const 0 call $~lib/env/abort @@ -33707,7 +33704,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2273 i32.const 0 call $~lib/env/abort @@ -33722,7 +33719,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2274 i32.const 0 call $~lib/env/abort @@ -33737,7 +33734,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2275 i32.const 0 call $~lib/env/abort @@ -33752,7 +33749,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2278 i32.const 0 call $~lib/env/abort @@ -33767,7 +33764,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2279 i32.const 0 call $~lib/env/abort @@ -33782,7 +33779,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2280 i32.const 0 call $~lib/env/abort @@ -33797,7 +33794,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2281 i32.const 0 call $~lib/env/abort @@ -33812,7 +33809,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2282 i32.const 0 call $~lib/env/abort @@ -33827,7 +33824,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2283 i32.const 0 call $~lib/env/abort @@ -33842,7 +33839,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2284 i32.const 0 call $~lib/env/abort @@ -33857,7 +33854,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2285 i32.const 0 call $~lib/env/abort @@ -33872,7 +33869,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2286 i32.const 0 call $~lib/env/abort @@ -33887,7 +33884,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2287 i32.const 0 call $~lib/env/abort @@ -33902,7 +33899,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2288 i32.const 0 call $~lib/env/abort @@ -33918,7 +33915,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2289 i32.const 0 call $~lib/env/abort @@ -33933,7 +33930,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2290 i32.const 0 call $~lib/env/abort @@ -33948,7 +33945,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2291 i32.const 0 call $~lib/env/abort @@ -33963,7 +33960,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2292 i32.const 0 call $~lib/env/abort @@ -33978,7 +33975,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2293 i32.const 0 call $~lib/env/abort @@ -33993,7 +33990,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2294 i32.const 0 call $~lib/env/abort @@ -34008,7 +34005,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2295 i32.const 0 call $~lib/env/abort @@ -34023,7 +34020,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2296 i32.const 0 call $~lib/env/abort @@ -34038,7 +34035,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2297 i32.const 0 call $~lib/env/abort @@ -34053,7 +34050,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2298 i32.const 0 call $~lib/env/abort @@ -34068,7 +34065,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2299 i32.const 0 call $~lib/env/abort @@ -34083,7 +34080,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2300 i32.const 0 call $~lib/env/abort @@ -34098,7 +34095,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2301 i32.const 0 call $~lib/env/abort @@ -34114,7 +34111,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2302 i32.const 0 call $~lib/env/abort @@ -34129,7 +34126,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2303 i32.const 0 call $~lib/env/abort @@ -34144,7 +34141,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2304 i32.const 0 call $~lib/env/abort @@ -34159,7 +34156,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2305 i32.const 0 call $~lib/env/abort @@ -34174,7 +34171,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2306 i32.const 0 call $~lib/env/abort @@ -34190,7 +34187,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2307 i32.const 0 call $~lib/env/abort @@ -34205,7 +34202,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2308 i32.const 0 call $~lib/env/abort @@ -34220,7 +34217,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2309 i32.const 0 call $~lib/env/abort @@ -34235,7 +34232,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2310 i32.const 0 call $~lib/env/abort @@ -34250,7 +34247,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2311 i32.const 0 call $~lib/env/abort @@ -34266,7 +34263,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2312 i32.const 0 call $~lib/env/abort @@ -34281,7 +34278,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2313 i32.const 0 call $~lib/env/abort @@ -34296,7 +34293,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2314 i32.const 0 call $~lib/env/abort @@ -34311,7 +34308,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2315 i32.const 0 call $~lib/env/abort @@ -34326,7 +34323,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2316 i32.const 0 call $~lib/env/abort @@ -34342,7 +34339,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2317 i32.const 0 call $~lib/env/abort @@ -34357,7 +34354,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2318 i32.const 0 call $~lib/env/abort @@ -34372,7 +34369,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2319 i32.const 0 call $~lib/env/abort @@ -34387,7 +34384,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2320 i32.const 0 call $~lib/env/abort @@ -34403,7 +34400,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2321 i32.const 0 call $~lib/env/abort @@ -34418,7 +34415,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2322 i32.const 0 call $~lib/env/abort @@ -34433,7 +34430,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2323 i32.const 0 call $~lib/env/abort @@ -34448,7 +34445,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2324 i32.const 0 call $~lib/env/abort @@ -34463,7 +34460,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2325 i32.const 0 call $~lib/env/abort @@ -34479,7 +34476,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2326 i32.const 0 call $~lib/env/abort @@ -34495,7 +34492,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2327 i32.const 0 call $~lib/env/abort @@ -34511,7 +34508,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2328 i32.const 0 call $~lib/env/abort @@ -34526,7 +34523,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2329 i32.const 0 call $~lib/env/abort @@ -34541,7 +34538,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2330 i32.const 0 call $~lib/env/abort @@ -34556,7 +34553,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2331 i32.const 0 call $~lib/env/abort @@ -34571,7 +34568,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2332 i32.const 0 call $~lib/env/abort @@ -34586,7 +34583,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2333 i32.const 0 call $~lib/env/abort @@ -34601,7 +34598,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2334 i32.const 0 call $~lib/env/abort @@ -34617,7 +34614,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2335 i32.const 0 call $~lib/env/abort @@ -34633,7 +34630,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2336 i32.const 0 call $~lib/env/abort @@ -34649,7 +34646,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2337 i32.const 0 call $~lib/env/abort @@ -34665,7 +34662,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2338 i32.const 0 call $~lib/env/abort @@ -34682,7 +34679,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2339 i32.const 0 call $~lib/env/abort @@ -34697,7 +34694,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2340 i32.const 0 call $~lib/env/abort @@ -34712,7 +34709,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2341 i32.const 0 call $~lib/env/abort @@ -34727,7 +34724,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2342 i32.const 0 call $~lib/env/abort @@ -34742,7 +34739,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2343 i32.const 0 call $~lib/env/abort @@ -34757,7 +34754,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2355 i32.const 0 call $~lib/env/abort @@ -34772,7 +34769,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2356 i32.const 0 call $~lib/env/abort @@ -34787,7 +34784,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2357 i32.const 0 call $~lib/env/abort @@ -34802,7 +34799,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2358 i32.const 0 call $~lib/env/abort @@ -34817,7 +34814,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2359 i32.const 0 call $~lib/env/abort @@ -34832,7 +34829,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2360 i32.const 0 call $~lib/env/abort @@ -34847,7 +34844,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2361 i32.const 0 call $~lib/env/abort @@ -34862,7 +34859,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2362 i32.const 0 call $~lib/env/abort @@ -34877,7 +34874,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2363 i32.const 0 call $~lib/env/abort @@ -34892,7 +34889,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2364 i32.const 0 call $~lib/env/abort @@ -34907,7 +34904,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2367 i32.const 0 call $~lib/env/abort @@ -34922,7 +34919,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2368 i32.const 0 call $~lib/env/abort @@ -34937,7 +34934,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2369 i32.const 0 call $~lib/env/abort @@ -34952,7 +34949,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2370 i32.const 0 call $~lib/env/abort @@ -34967,7 +34964,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2371 i32.const 0 call $~lib/env/abort @@ -34982,7 +34979,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2372 i32.const 0 call $~lib/env/abort @@ -34997,7 +34994,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2373 i32.const 0 call $~lib/env/abort @@ -35012,7 +35009,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2374 i32.const 0 call $~lib/env/abort @@ -35027,7 +35024,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2375 i32.const 0 call $~lib/env/abort @@ -35042,7 +35039,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2376 i32.const 0 call $~lib/env/abort @@ -35057,7 +35054,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2377 i32.const 0 call $~lib/env/abort @@ -35072,7 +35069,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2378 i32.const 0 call $~lib/env/abort @@ -35087,7 +35084,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2379 i32.const 0 call $~lib/env/abort @@ -35103,7 +35100,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2380 i32.const 0 call $~lib/env/abort @@ -35118,7 +35115,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2381 i32.const 0 call $~lib/env/abort @@ -35133,7 +35130,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2382 i32.const 0 call $~lib/env/abort @@ -35148,7 +35145,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2383 i32.const 0 call $~lib/env/abort @@ -35163,7 +35160,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2384 i32.const 0 call $~lib/env/abort @@ -35178,7 +35175,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2385 i32.const 0 call $~lib/env/abort @@ -35193,7 +35190,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2386 i32.const 0 call $~lib/env/abort @@ -35208,7 +35205,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2387 i32.const 0 call $~lib/env/abort @@ -35223,7 +35220,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2388 i32.const 0 call $~lib/env/abort @@ -35238,7 +35235,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2389 i32.const 0 call $~lib/env/abort @@ -35254,7 +35251,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2390 i32.const 0 call $~lib/env/abort @@ -35269,7 +35266,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2391 i32.const 0 call $~lib/env/abort @@ -35285,7 +35282,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2392 i32.const 0 call $~lib/env/abort @@ -35300,7 +35297,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2393 i32.const 0 call $~lib/env/abort @@ -35316,7 +35313,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2394 i32.const 0 call $~lib/env/abort @@ -35331,7 +35328,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2395 i32.const 0 call $~lib/env/abort @@ -35346,7 +35343,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2396 i32.const 0 call $~lib/env/abort @@ -35362,7 +35359,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2397 i32.const 0 call $~lib/env/abort @@ -35377,7 +35374,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2398 i32.const 0 call $~lib/env/abort @@ -35392,7 +35389,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2399 i32.const 0 call $~lib/env/abort @@ -35407,7 +35404,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2400 i32.const 0 call $~lib/env/abort @@ -35422,7 +35419,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2401 i32.const 0 call $~lib/env/abort @@ -35437,7 +35434,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2402 i32.const 0 call $~lib/env/abort @@ -35453,7 +35450,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2403 i32.const 0 call $~lib/env/abort @@ -35468,7 +35465,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2404 i32.const 0 call $~lib/env/abort @@ -35483,7 +35480,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2405 i32.const 0 call $~lib/env/abort @@ -35498,7 +35495,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2406 i32.const 0 call $~lib/env/abort @@ -35513,7 +35510,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2407 i32.const 0 call $~lib/env/abort @@ -35528,7 +35525,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2408 i32.const 0 call $~lib/env/abort @@ -35544,7 +35541,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2409 i32.const 0 call $~lib/env/abort @@ -35559,7 +35556,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2410 i32.const 0 call $~lib/env/abort @@ -35574,7 +35571,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2411 i32.const 0 call $~lib/env/abort @@ -35589,7 +35586,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2412 i32.const 0 call $~lib/env/abort @@ -35604,7 +35601,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2413 i32.const 0 call $~lib/env/abort @@ -35619,7 +35616,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2414 i32.const 0 call $~lib/env/abort @@ -35634,7 +35631,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2415 i32.const 0 call $~lib/env/abort @@ -35649,7 +35646,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2416 i32.const 0 call $~lib/env/abort @@ -35665,7 +35662,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2417 i32.const 0 call $~lib/env/abort @@ -35680,7 +35677,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2418 i32.const 0 call $~lib/env/abort @@ -35695,7 +35692,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2419 i32.const 0 call $~lib/env/abort @@ -35710,7 +35707,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2420 i32.const 0 call $~lib/env/abort @@ -35725,7 +35722,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2421 i32.const 0 call $~lib/env/abort @@ -35740,7 +35737,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2422 i32.const 0 call $~lib/env/abort @@ -35755,7 +35752,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2423 i32.const 0 call $~lib/env/abort @@ -35770,7 +35767,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2424 i32.const 0 call $~lib/env/abort @@ -35785,7 +35782,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2425 i32.const 0 call $~lib/env/abort @@ -35800,7 +35797,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2426 i32.const 0 call $~lib/env/abort @@ -35816,7 +35813,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2427 i32.const 0 call $~lib/env/abort @@ -35831,7 +35828,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2428 i32.const 0 call $~lib/env/abort @@ -35846,7 +35843,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2429 i32.const 0 call $~lib/env/abort @@ -35862,7 +35859,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2430 i32.const 0 call $~lib/env/abort @@ -35877,7 +35874,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2431 i32.const 0 call $~lib/env/abort @@ -35892,7 +35889,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2432 i32.const 0 call $~lib/env/abort @@ -35908,7 +35905,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2433 i32.const 0 call $~lib/env/abort @@ -35923,7 +35920,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2434 i32.const 0 call $~lib/env/abort @@ -35938,7 +35935,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2435 i32.const 0 call $~lib/env/abort @@ -35953,7 +35950,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2436 i32.const 0 call $~lib/env/abort @@ -35969,7 +35966,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2437 i32.const 0 call $~lib/env/abort @@ -35984,7 +35981,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2438 i32.const 0 call $~lib/env/abort @@ -35999,7 +35996,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2439 i32.const 0 call $~lib/env/abort @@ -36014,7 +36011,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2440 i32.const 0 call $~lib/env/abort @@ -36029,7 +36026,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2441 i32.const 0 call $~lib/env/abort @@ -36044,7 +36041,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2442 i32.const 0 call $~lib/env/abort @@ -36059,7 +36056,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2443 i32.const 0 call $~lib/env/abort @@ -36074,7 +36071,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2444 i32.const 0 call $~lib/env/abort @@ -36090,7 +36087,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2445 i32.const 0 call $~lib/env/abort @@ -36106,7 +36103,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2446 i32.const 0 call $~lib/env/abort @@ -36123,7 +36120,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2447 i32.const 0 call $~lib/env/abort @@ -36140,7 +36137,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2448 i32.const 0 call $~lib/env/abort @@ -36156,7 +36153,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2449 i32.const 0 call $~lib/env/abort @@ -36173,7 +36170,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2450 i32.const 0 call $~lib/env/abort @@ -36189,7 +36186,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2451 i32.const 0 call $~lib/env/abort @@ -36205,7 +36202,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2452 i32.const 0 call $~lib/env/abort @@ -36221,7 +36218,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2453 i32.const 0 call $~lib/env/abort @@ -36237,7 +36234,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2454 i32.const 0 call $~lib/env/abort @@ -36252,7 +36249,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2455 i32.const 0 call $~lib/env/abort @@ -36267,7 +36264,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2456 i32.const 0 call $~lib/env/abort @@ -36282,7 +36279,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2457 i32.const 0 call $~lib/env/abort @@ -36297,7 +36294,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2458 i32.const 0 call $~lib/env/abort @@ -36312,7 +36309,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2467 i32.const 0 call $~lib/env/abort @@ -36327,7 +36324,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2468 i32.const 0 call $~lib/env/abort @@ -36342,7 +36339,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2469 i32.const 0 call $~lib/env/abort @@ -36357,7 +36354,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2470 i32.const 0 call $~lib/env/abort @@ -36372,7 +36369,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2471 i32.const 0 call $~lib/env/abort @@ -36387,7 +36384,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2472 i32.const 0 call $~lib/env/abort @@ -36402,7 +36399,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2473 i32.const 0 call $~lib/env/abort @@ -36417,7 +36414,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2474 i32.const 0 call $~lib/env/abort @@ -36432,7 +36429,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2475 i32.const 0 call $~lib/env/abort @@ -36447,7 +36444,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2476 i32.const 0 call $~lib/env/abort @@ -36462,7 +36459,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2479 i32.const 0 call $~lib/env/abort @@ -36477,7 +36474,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2480 i32.const 0 call $~lib/env/abort @@ -36492,7 +36489,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2481 i32.const 0 call $~lib/env/abort @@ -36507,7 +36504,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2482 i32.const 0 call $~lib/env/abort @@ -36522,7 +36519,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2483 i32.const 0 call $~lib/env/abort @@ -36537,7 +36534,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2484 i32.const 0 call $~lib/env/abort @@ -36552,7 +36549,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2485 i32.const 0 call $~lib/env/abort @@ -36567,7 +36564,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2486 i32.const 0 call $~lib/env/abort @@ -36582,7 +36579,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2487 i32.const 0 call $~lib/env/abort @@ -36597,7 +36594,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2488 i32.const 0 call $~lib/env/abort @@ -36612,7 +36609,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2489 i32.const 0 call $~lib/env/abort @@ -36627,7 +36624,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2490 i32.const 0 call $~lib/env/abort @@ -36642,7 +36639,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2491 i32.const 0 call $~lib/env/abort @@ -36658,7 +36655,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2492 i32.const 0 call $~lib/env/abort @@ -36673,7 +36670,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2493 i32.const 0 call $~lib/env/abort @@ -36688,7 +36685,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2494 i32.const 0 call $~lib/env/abort @@ -36703,7 +36700,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2495 i32.const 0 call $~lib/env/abort @@ -36718,7 +36715,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2496 i32.const 0 call $~lib/env/abort @@ -36733,7 +36730,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2497 i32.const 0 call $~lib/env/abort @@ -36748,7 +36745,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2498 i32.const 0 call $~lib/env/abort @@ -36763,7 +36760,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2499 i32.const 0 call $~lib/env/abort @@ -36778,7 +36775,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2500 i32.const 0 call $~lib/env/abort @@ -36793,7 +36790,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2501 i32.const 0 call $~lib/env/abort @@ -36809,7 +36806,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2502 i32.const 0 call $~lib/env/abort @@ -36824,7 +36821,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2503 i32.const 0 call $~lib/env/abort @@ -36840,7 +36837,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2504 i32.const 0 call $~lib/env/abort @@ -36855,7 +36852,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2505 i32.const 0 call $~lib/env/abort @@ -36871,7 +36868,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2506 i32.const 0 call $~lib/env/abort @@ -36886,7 +36883,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2507 i32.const 0 call $~lib/env/abort @@ -36901,7 +36898,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2508 i32.const 0 call $~lib/env/abort @@ -36917,7 +36914,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2509 i32.const 0 call $~lib/env/abort @@ -36932,7 +36929,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2510 i32.const 0 call $~lib/env/abort @@ -36947,7 +36944,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2511 i32.const 0 call $~lib/env/abort @@ -36962,7 +36959,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2512 i32.const 0 call $~lib/env/abort @@ -36977,7 +36974,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2513 i32.const 0 call $~lib/env/abort @@ -36992,7 +36989,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2514 i32.const 0 call $~lib/env/abort @@ -37008,7 +37005,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2515 i32.const 0 call $~lib/env/abort @@ -37023,7 +37020,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2516 i32.const 0 call $~lib/env/abort @@ -37038,7 +37035,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2517 i32.const 0 call $~lib/env/abort @@ -37053,7 +37050,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2518 i32.const 0 call $~lib/env/abort @@ -37068,7 +37065,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2519 i32.const 0 call $~lib/env/abort @@ -37083,7 +37080,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2520 i32.const 0 call $~lib/env/abort @@ -37099,7 +37096,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2521 i32.const 0 call $~lib/env/abort @@ -37114,7 +37111,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2522 i32.const 0 call $~lib/env/abort @@ -37129,7 +37126,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2523 i32.const 0 call $~lib/env/abort @@ -37144,7 +37141,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2524 i32.const 0 call $~lib/env/abort @@ -37159,7 +37156,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2525 i32.const 0 call $~lib/env/abort @@ -37174,7 +37171,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2526 i32.const 0 call $~lib/env/abort @@ -37189,7 +37186,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2527 i32.const 0 call $~lib/env/abort @@ -37204,7 +37201,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2528 i32.const 0 call $~lib/env/abort @@ -37220,7 +37217,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2529 i32.const 0 call $~lib/env/abort @@ -37235,7 +37232,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2530 i32.const 0 call $~lib/env/abort @@ -37250,7 +37247,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2531 i32.const 0 call $~lib/env/abort @@ -37265,7 +37262,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2532 i32.const 0 call $~lib/env/abort @@ -37280,7 +37277,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2533 i32.const 0 call $~lib/env/abort @@ -37295,7 +37292,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2534 i32.const 0 call $~lib/env/abort @@ -37310,7 +37307,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2535 i32.const 0 call $~lib/env/abort @@ -37325,7 +37322,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2536 i32.const 0 call $~lib/env/abort @@ -37340,7 +37337,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2537 i32.const 0 call $~lib/env/abort @@ -37355,7 +37352,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2538 i32.const 0 call $~lib/env/abort @@ -37371,7 +37368,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2539 i32.const 0 call $~lib/env/abort @@ -37386,7 +37383,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2540 i32.const 0 call $~lib/env/abort @@ -37401,7 +37398,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2541 i32.const 0 call $~lib/env/abort @@ -37417,7 +37414,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2542 i32.const 0 call $~lib/env/abort @@ -37432,7 +37429,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2543 i32.const 0 call $~lib/env/abort @@ -37447,7 +37444,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2544 i32.const 0 call $~lib/env/abort @@ -37463,7 +37460,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2545 i32.const 0 call $~lib/env/abort @@ -37478,7 +37475,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2546 i32.const 0 call $~lib/env/abort @@ -37493,7 +37490,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2547 i32.const 0 call $~lib/env/abort @@ -37508,7 +37505,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2548 i32.const 0 call $~lib/env/abort @@ -37524,7 +37521,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2549 i32.const 0 call $~lib/env/abort @@ -37539,7 +37536,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2550 i32.const 0 call $~lib/env/abort @@ -37554,7 +37551,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2551 i32.const 0 call $~lib/env/abort @@ -37569,7 +37566,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2552 i32.const 0 call $~lib/env/abort @@ -37584,7 +37581,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2553 i32.const 0 call $~lib/env/abort @@ -37599,7 +37596,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2554 i32.const 0 call $~lib/env/abort @@ -37614,7 +37611,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2555 i32.const 0 call $~lib/env/abort @@ -37629,7 +37626,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2556 i32.const 0 call $~lib/env/abort @@ -37645,7 +37642,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2557 i32.const 0 call $~lib/env/abort @@ -37661,7 +37658,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2558 i32.const 0 call $~lib/env/abort @@ -37678,7 +37675,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2559 i32.const 0 call $~lib/env/abort @@ -37695,7 +37692,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2560 i32.const 0 call $~lib/env/abort @@ -37711,7 +37708,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2561 i32.const 0 call $~lib/env/abort @@ -37728,7 +37725,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2562 i32.const 0 call $~lib/env/abort @@ -37744,7 +37741,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2563 i32.const 0 call $~lib/env/abort @@ -37760,7 +37757,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2564 i32.const 0 call $~lib/env/abort @@ -37776,7 +37773,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2565 i32.const 0 call $~lib/env/abort @@ -37792,7 +37789,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2566 i32.const 0 call $~lib/env/abort @@ -37807,7 +37804,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2567 i32.const 0 call $~lib/env/abort @@ -37822,7 +37819,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2568 i32.const 0 call $~lib/env/abort @@ -37837,7 +37834,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2569 i32.const 0 call $~lib/env/abort @@ -37852,7 +37849,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2570 i32.const 0 call $~lib/env/abort @@ -37888,7 +37885,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2579 i32.const 2 call $~lib/env/abort @@ -37938,7 +37935,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2587 i32.const 2 call $~lib/env/abort @@ -37962,7 +37959,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2601 i32.const 0 call $~lib/env/abort @@ -37976,7 +37973,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2602 i32.const 0 call $~lib/env/abort @@ -37990,7 +37987,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2603 i32.const 0 call $~lib/env/abort @@ -38004,7 +38001,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2604 i32.const 0 call $~lib/env/abort @@ -38018,7 +38015,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2605 i32.const 0 call $~lib/env/abort @@ -38032,7 +38029,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2606 i32.const 0 call $~lib/env/abort @@ -38046,7 +38043,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2607 i32.const 0 call $~lib/env/abort @@ -38060,7 +38057,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2608 i32.const 0 call $~lib/env/abort @@ -38074,7 +38071,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2609 i32.const 0 call $~lib/env/abort @@ -38088,7 +38085,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2610 i32.const 0 call $~lib/env/abort @@ -38102,7 +38099,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2613 i32.const 0 call $~lib/env/abort @@ -38116,7 +38113,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2614 i32.const 0 call $~lib/env/abort @@ -38132,7 +38129,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2615 i32.const 0 call $~lib/env/abort @@ -38146,7 +38143,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2616 i32.const 0 call $~lib/env/abort @@ -38160,7 +38157,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2617 i32.const 0 call $~lib/env/abort @@ -38174,7 +38171,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2618 i32.const 0 call $~lib/env/abort @@ -38188,7 +38185,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2619 i32.const 0 call $~lib/env/abort @@ -38202,7 +38199,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2620 i32.const 0 call $~lib/env/abort @@ -38216,7 +38213,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2621 i32.const 0 call $~lib/env/abort @@ -38230,7 +38227,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2622 i32.const 0 call $~lib/env/abort @@ -38244,7 +38241,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2623 i32.const 0 call $~lib/env/abort @@ -38258,7 +38255,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2624 i32.const 0 call $~lib/env/abort @@ -38272,7 +38269,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2625 i32.const 0 call $~lib/env/abort @@ -38286,7 +38283,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2626 i32.const 0 call $~lib/env/abort @@ -38300,7 +38297,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2627 i32.const 0 call $~lib/env/abort @@ -38314,7 +38311,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2628 i32.const 0 call $~lib/env/abort @@ -38328,7 +38325,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2629 i32.const 0 call $~lib/env/abort @@ -38342,7 +38339,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2638 i32.const 0 call $~lib/env/abort @@ -38356,7 +38353,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2639 i32.const 0 call $~lib/env/abort @@ -38370,7 +38367,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2640 i32.const 0 call $~lib/env/abort @@ -38384,7 +38381,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2641 i32.const 0 call $~lib/env/abort @@ -38398,7 +38395,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2642 i32.const 0 call $~lib/env/abort @@ -38412,7 +38409,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2643 i32.const 0 call $~lib/env/abort @@ -38426,7 +38423,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2644 i32.const 0 call $~lib/env/abort @@ -38440,7 +38437,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2645 i32.const 0 call $~lib/env/abort @@ -38454,7 +38451,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2646 i32.const 0 call $~lib/env/abort @@ -38468,7 +38465,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2647 i32.const 0 call $~lib/env/abort @@ -38482,7 +38479,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2650 i32.const 0 call $~lib/env/abort @@ -38496,7 +38493,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2651 i32.const 0 call $~lib/env/abort @@ -38512,7 +38509,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2652 i32.const 0 call $~lib/env/abort @@ -38526,7 +38523,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2653 i32.const 0 call $~lib/env/abort @@ -38540,7 +38537,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2654 i32.const 0 call $~lib/env/abort @@ -38554,7 +38551,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2655 i32.const 0 call $~lib/env/abort @@ -38568,7 +38565,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2656 i32.const 0 call $~lib/env/abort @@ -38582,7 +38579,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2657 i32.const 0 call $~lib/env/abort @@ -38596,7 +38593,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2658 i32.const 0 call $~lib/env/abort @@ -38610,7 +38607,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2659 i32.const 0 call $~lib/env/abort @@ -38624,7 +38621,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2660 i32.const 0 call $~lib/env/abort @@ -38638,7 +38635,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2661 i32.const 0 call $~lib/env/abort @@ -38652,7 +38649,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2662 i32.const 0 call $~lib/env/abort @@ -38666,7 +38663,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2663 i32.const 0 call $~lib/env/abort @@ -38680,7 +38677,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2664 i32.const 0 call $~lib/env/abort @@ -38694,7 +38691,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2665 i32.const 0 call $~lib/env/abort @@ -38708,7 +38705,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2666 i32.const 0 call $~lib/env/abort @@ -38722,7 +38719,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2677 i32.const 0 call $~lib/env/abort @@ -38736,7 +38733,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2678 i32.const 0 call $~lib/env/abort @@ -38750,7 +38747,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2679 i32.const 0 call $~lib/env/abort @@ -38764,7 +38761,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2680 i32.const 0 call $~lib/env/abort @@ -38778,7 +38775,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2681 i32.const 0 call $~lib/env/abort @@ -38792,7 +38789,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2682 i32.const 0 call $~lib/env/abort @@ -38806,7 +38803,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2683 i32.const 0 call $~lib/env/abort @@ -38821,7 +38818,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2684 i32.const 0 call $~lib/env/abort @@ -38835,7 +38832,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2685 i32.const 0 call $~lib/env/abort @@ -38849,7 +38846,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2693 i32.const 0 call $~lib/env/abort @@ -38863,7 +38860,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2694 i32.const 0 call $~lib/env/abort @@ -38877,7 +38874,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2695 i32.const 0 call $~lib/env/abort @@ -38891,7 +38888,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2696 i32.const 0 call $~lib/env/abort @@ -38905,7 +38902,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2697 i32.const 0 call $~lib/env/abort @@ -38919,7 +38916,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2698 i32.const 0 call $~lib/env/abort @@ -38933,7 +38930,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2699 i32.const 0 call $~lib/env/abort @@ -38948,7 +38945,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2700 i32.const 0 call $~lib/env/abort @@ -38962,7 +38959,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2701 i32.const 0 call $~lib/env/abort @@ -38988,7 +38985,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2707 i32.const 0 call $~lib/env/abort @@ -39014,7 +39011,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2708 i32.const 0 call $~lib/env/abort @@ -39040,7 +39037,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2709 i32.const 0 call $~lib/env/abort @@ -39066,7 +39063,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2710 i32.const 0 call $~lib/env/abort @@ -39092,7 +39089,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2711 i32.const 0 call $~lib/env/abort @@ -39119,7 +39116,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2712 i32.const 0 call $~lib/env/abort @@ -39145,7 +39142,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2713 i32.const 0 call $~lib/env/abort @@ -39172,7 +39169,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2714 i32.const 0 call $~lib/env/abort @@ -39197,7 +39194,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2720 i32.const 0 call $~lib/env/abort @@ -39222,7 +39219,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2721 i32.const 0 call $~lib/env/abort @@ -39247,7 +39244,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2722 i32.const 0 call $~lib/env/abort @@ -39272,7 +39269,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2723 i32.const 0 call $~lib/env/abort @@ -39297,7 +39294,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2724 i32.const 0 call $~lib/env/abort @@ -39323,7 +39320,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2725 i32.const 0 call $~lib/env/abort @@ -39348,7 +39345,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2726 i32.const 0 call $~lib/env/abort @@ -39374,7 +39371,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2727 i32.const 0 call $~lib/env/abort @@ -39389,7 +39386,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2738 i32.const 0 call $~lib/env/abort @@ -39404,7 +39401,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2739 i32.const 0 call $~lib/env/abort @@ -39419,7 +39416,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2740 i32.const 0 call $~lib/env/abort @@ -39434,7 +39431,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2741 i32.const 0 call $~lib/env/abort @@ -39449,7 +39446,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2742 i32.const 0 call $~lib/env/abort @@ -39464,7 +39461,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2743 i32.const 0 call $~lib/env/abort @@ -39479,7 +39476,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2744 i32.const 0 call $~lib/env/abort @@ -39494,7 +39491,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2745 i32.const 0 call $~lib/env/abort @@ -39509,7 +39506,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2746 i32.const 0 call $~lib/env/abort @@ -39524,7 +39521,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2747 i32.const 0 call $~lib/env/abort @@ -39539,7 +39536,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2750 i32.const 0 call $~lib/env/abort @@ -39554,7 +39551,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2751 i32.const 0 call $~lib/env/abort @@ -39569,7 +39566,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2752 i32.const 0 call $~lib/env/abort @@ -39584,7 +39581,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2753 i32.const 0 call $~lib/env/abort @@ -39599,7 +39596,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2754 i32.const 0 call $~lib/env/abort @@ -39614,7 +39611,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2755 i32.const 0 call $~lib/env/abort @@ -39629,7 +39626,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2756 i32.const 0 call $~lib/env/abort @@ -39644,7 +39641,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2757 i32.const 0 call $~lib/env/abort @@ -39659,7 +39656,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2758 i32.const 0 call $~lib/env/abort @@ -39674,7 +39671,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2759 i32.const 0 call $~lib/env/abort @@ -39689,7 +39686,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2760 i32.const 0 call $~lib/env/abort @@ -39705,7 +39702,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2761 i32.const 0 call $~lib/env/abort @@ -39720,7 +39717,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2762 i32.const 0 call $~lib/env/abort @@ -39735,7 +39732,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2763 i32.const 0 call $~lib/env/abort @@ -39750,7 +39747,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2764 i32.const 0 call $~lib/env/abort @@ -39765,7 +39762,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2765 i32.const 0 call $~lib/env/abort @@ -39780,7 +39777,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2766 i32.const 0 call $~lib/env/abort @@ -39795,7 +39792,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2767 i32.const 0 call $~lib/env/abort @@ -39810,7 +39807,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2768 i32.const 0 call $~lib/env/abort @@ -39825,7 +39822,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2769 i32.const 0 call $~lib/env/abort @@ -39840,7 +39837,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2770 i32.const 0 call $~lib/env/abort @@ -39855,7 +39852,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2771 i32.const 0 call $~lib/env/abort @@ -39870,7 +39867,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2772 i32.const 0 call $~lib/env/abort @@ -39885,7 +39882,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2773 i32.const 0 call $~lib/env/abort @@ -39901,7 +39898,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2774 i32.const 0 call $~lib/env/abort @@ -39916,7 +39913,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2775 i32.const 0 call $~lib/env/abort @@ -39931,7 +39928,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2776 i32.const 0 call $~lib/env/abort @@ -39946,7 +39943,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2777 i32.const 0 call $~lib/env/abort @@ -39961,7 +39958,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2778 i32.const 0 call $~lib/env/abort @@ -39977,7 +39974,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2779 i32.const 0 call $~lib/env/abort @@ -39992,7 +39989,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2780 i32.const 0 call $~lib/env/abort @@ -40007,7 +40004,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2781 i32.const 0 call $~lib/env/abort @@ -40022,7 +40019,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2782 i32.const 0 call $~lib/env/abort @@ -40037,7 +40034,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2783 i32.const 0 call $~lib/env/abort @@ -40053,7 +40050,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2784 i32.const 0 call $~lib/env/abort @@ -40068,7 +40065,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2785 i32.const 0 call $~lib/env/abort @@ -40083,7 +40080,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2786 i32.const 0 call $~lib/env/abort @@ -40098,7 +40095,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2787 i32.const 0 call $~lib/env/abort @@ -40113,7 +40110,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2788 i32.const 0 call $~lib/env/abort @@ -40129,7 +40126,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2789 i32.const 0 call $~lib/env/abort @@ -40144,7 +40141,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2790 i32.const 0 call $~lib/env/abort @@ -40159,7 +40156,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2791 i32.const 0 call $~lib/env/abort @@ -40174,7 +40171,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2792 i32.const 0 call $~lib/env/abort @@ -40190,7 +40187,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2793 i32.const 0 call $~lib/env/abort @@ -40205,7 +40202,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2794 i32.const 0 call $~lib/env/abort @@ -40220,7 +40217,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2795 i32.const 0 call $~lib/env/abort @@ -40235,7 +40232,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2796 i32.const 0 call $~lib/env/abort @@ -40250,7 +40247,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2797 i32.const 0 call $~lib/env/abort @@ -40266,7 +40263,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2798 i32.const 0 call $~lib/env/abort @@ -40282,7 +40279,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2799 i32.const 0 call $~lib/env/abort @@ -40298,7 +40295,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2800 i32.const 0 call $~lib/env/abort @@ -40313,7 +40310,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2801 i32.const 0 call $~lib/env/abort @@ -40328,7 +40325,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2802 i32.const 0 call $~lib/env/abort @@ -40343,7 +40340,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2803 i32.const 0 call $~lib/env/abort @@ -40358,7 +40355,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2804 i32.const 0 call $~lib/env/abort @@ -40373,7 +40370,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2805 i32.const 0 call $~lib/env/abort @@ -40388,7 +40385,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2806 i32.const 0 call $~lib/env/abort @@ -40404,7 +40401,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2807 i32.const 0 call $~lib/env/abort @@ -40420,7 +40417,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2808 i32.const 0 call $~lib/env/abort @@ -40436,7 +40433,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2809 i32.const 0 call $~lib/env/abort @@ -40452,7 +40449,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2810 i32.const 0 call $~lib/env/abort @@ -40469,7 +40466,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2811 i32.const 0 call $~lib/env/abort @@ -40484,7 +40481,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2812 i32.const 0 call $~lib/env/abort @@ -40499,7 +40496,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2813 i32.const 0 call $~lib/env/abort @@ -40514,7 +40511,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2814 i32.const 0 call $~lib/env/abort @@ -40529,7 +40526,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2815 i32.const 0 call $~lib/env/abort @@ -40544,7 +40541,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2816 i32.const 0 call $~lib/env/abort @@ -40559,7 +40556,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2825 i32.const 0 call $~lib/env/abort @@ -40574,7 +40571,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2826 i32.const 0 call $~lib/env/abort @@ -40589,7 +40586,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2827 i32.const 0 call $~lib/env/abort @@ -40604,7 +40601,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2828 i32.const 0 call $~lib/env/abort @@ -40619,7 +40616,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2829 i32.const 0 call $~lib/env/abort @@ -40634,7 +40631,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2830 i32.const 0 call $~lib/env/abort @@ -40649,7 +40646,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2831 i32.const 0 call $~lib/env/abort @@ -40664,7 +40661,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2832 i32.const 0 call $~lib/env/abort @@ -40679,7 +40676,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2833 i32.const 0 call $~lib/env/abort @@ -40694,7 +40691,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2834 i32.const 0 call $~lib/env/abort @@ -40709,7 +40706,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2837 i32.const 0 call $~lib/env/abort @@ -40724,7 +40721,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2838 i32.const 0 call $~lib/env/abort @@ -40739,7 +40736,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2839 i32.const 0 call $~lib/env/abort @@ -40754,7 +40751,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2840 i32.const 0 call $~lib/env/abort @@ -40769,7 +40766,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2841 i32.const 0 call $~lib/env/abort @@ -40784,7 +40781,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2842 i32.const 0 call $~lib/env/abort @@ -40799,7 +40796,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2843 i32.const 0 call $~lib/env/abort @@ -40814,7 +40811,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2844 i32.const 0 call $~lib/env/abort @@ -40829,7 +40826,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2845 i32.const 0 call $~lib/env/abort @@ -40844,7 +40841,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2846 i32.const 0 call $~lib/env/abort @@ -40859,7 +40856,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2847 i32.const 0 call $~lib/env/abort @@ -40875,7 +40872,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2848 i32.const 0 call $~lib/env/abort @@ -40890,7 +40887,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2849 i32.const 0 call $~lib/env/abort @@ -40905,7 +40902,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2850 i32.const 0 call $~lib/env/abort @@ -40920,7 +40917,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2851 i32.const 0 call $~lib/env/abort @@ -40935,7 +40932,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2852 i32.const 0 call $~lib/env/abort @@ -40950,7 +40947,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2853 i32.const 0 call $~lib/env/abort @@ -40965,7 +40962,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2854 i32.const 0 call $~lib/env/abort @@ -40980,7 +40977,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2855 i32.const 0 call $~lib/env/abort @@ -40995,7 +40992,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2856 i32.const 0 call $~lib/env/abort @@ -41010,7 +41007,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2857 i32.const 0 call $~lib/env/abort @@ -41025,7 +41022,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2858 i32.const 0 call $~lib/env/abort @@ -41040,7 +41037,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2859 i32.const 0 call $~lib/env/abort @@ -41055,7 +41052,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2860 i32.const 0 call $~lib/env/abort @@ -41071,7 +41068,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2861 i32.const 0 call $~lib/env/abort @@ -41086,7 +41083,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2862 i32.const 0 call $~lib/env/abort @@ -41101,7 +41098,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2863 i32.const 0 call $~lib/env/abort @@ -41116,7 +41113,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2864 i32.const 0 call $~lib/env/abort @@ -41131,7 +41128,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2865 i32.const 0 call $~lib/env/abort @@ -41147,7 +41144,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2866 i32.const 0 call $~lib/env/abort @@ -41162,7 +41159,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2867 i32.const 0 call $~lib/env/abort @@ -41177,7 +41174,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2868 i32.const 0 call $~lib/env/abort @@ -41192,7 +41189,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2869 i32.const 0 call $~lib/env/abort @@ -41207,7 +41204,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2870 i32.const 0 call $~lib/env/abort @@ -41223,7 +41220,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2871 i32.const 0 call $~lib/env/abort @@ -41238,7 +41235,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2872 i32.const 0 call $~lib/env/abort @@ -41253,7 +41250,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2873 i32.const 0 call $~lib/env/abort @@ -41268,7 +41265,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2874 i32.const 0 call $~lib/env/abort @@ -41283,7 +41280,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2875 i32.const 0 call $~lib/env/abort @@ -41299,7 +41296,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2876 i32.const 0 call $~lib/env/abort @@ -41314,7 +41311,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2877 i32.const 0 call $~lib/env/abort @@ -41329,7 +41326,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2878 i32.const 0 call $~lib/env/abort @@ -41344,7 +41341,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2879 i32.const 0 call $~lib/env/abort @@ -41360,7 +41357,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2880 i32.const 0 call $~lib/env/abort @@ -41375,7 +41372,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2881 i32.const 0 call $~lib/env/abort @@ -41390,7 +41387,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2882 i32.const 0 call $~lib/env/abort @@ -41405,7 +41402,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2883 i32.const 0 call $~lib/env/abort @@ -41420,7 +41417,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2884 i32.const 0 call $~lib/env/abort @@ -41436,7 +41433,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2885 i32.const 0 call $~lib/env/abort @@ -41452,7 +41449,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2886 i32.const 0 call $~lib/env/abort @@ -41468,7 +41465,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2887 i32.const 0 call $~lib/env/abort @@ -41483,7 +41480,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2888 i32.const 0 call $~lib/env/abort @@ -41498,7 +41495,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2889 i32.const 0 call $~lib/env/abort @@ -41513,7 +41510,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2890 i32.const 0 call $~lib/env/abort @@ -41528,7 +41525,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2891 i32.const 0 call $~lib/env/abort @@ -41543,7 +41540,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2892 i32.const 0 call $~lib/env/abort @@ -41558,7 +41555,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2893 i32.const 0 call $~lib/env/abort @@ -41574,7 +41571,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2894 i32.const 0 call $~lib/env/abort @@ -41590,7 +41587,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2895 i32.const 0 call $~lib/env/abort @@ -41606,7 +41603,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2896 i32.const 0 call $~lib/env/abort @@ -41622,7 +41619,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2897 i32.const 0 call $~lib/env/abort @@ -41639,7 +41636,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2898 i32.const 0 call $~lib/env/abort @@ -41654,7 +41651,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2899 i32.const 0 call $~lib/env/abort @@ -41669,7 +41666,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2900 i32.const 0 call $~lib/env/abort @@ -41684,7 +41681,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2901 i32.const 0 call $~lib/env/abort @@ -41699,7 +41696,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2902 i32.const 0 call $~lib/env/abort @@ -41714,7 +41711,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2903 i32.const 0 call $~lib/env/abort @@ -41728,7 +41725,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2941 i32.const 0 call $~lib/env/abort @@ -41742,7 +41739,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2942 i32.const 0 call $~lib/env/abort @@ -41756,7 +41753,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2943 i32.const 0 call $~lib/env/abort @@ -41770,7 +41767,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2944 i32.const 0 call $~lib/env/abort @@ -41784,7 +41781,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2945 i32.const 0 call $~lib/env/abort @@ -41798,7 +41795,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2946 i32.const 0 call $~lib/env/abort @@ -41812,7 +41809,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2947 i32.const 0 call $~lib/env/abort @@ -41826,7 +41823,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2948 i32.const 0 call $~lib/env/abort @@ -41840,7 +41837,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2949 i32.const 0 call $~lib/env/abort @@ -41854,7 +41851,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2950 i32.const 0 call $~lib/env/abort @@ -41868,7 +41865,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2953 i32.const 0 call $~lib/env/abort @@ -41882,7 +41879,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2954 i32.const 0 call $~lib/env/abort @@ -41896,7 +41893,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2955 i32.const 0 call $~lib/env/abort @@ -41911,7 +41908,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2956 i32.const 0 call $~lib/env/abort @@ -41925,7 +41922,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2957 i32.const 0 call $~lib/env/abort @@ -41939,7 +41936,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2960 i32.const 0 call $~lib/env/abort @@ -41953,7 +41950,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2961 i32.const 0 call $~lib/env/abort @@ -41967,7 +41964,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2962 i32.const 0 call $~lib/env/abort @@ -41981,7 +41978,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2963 i32.const 0 call $~lib/env/abort @@ -41997,7 +41994,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2964 i32.const 0 call $~lib/env/abort @@ -42013,7 +42010,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2965 i32.const 0 call $~lib/env/abort @@ -42027,7 +42024,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2966 i32.const 0 call $~lib/env/abort @@ -42041,7 +42038,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2967 i32.const 0 call $~lib/env/abort @@ -42055,7 +42052,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2968 i32.const 0 call $~lib/env/abort @@ -42069,7 +42066,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2969 i32.const 0 call $~lib/env/abort @@ -42083,7 +42080,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2970 i32.const 0 call $~lib/env/abort @@ -42097,7 +42094,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2971 i32.const 0 call $~lib/env/abort @@ -42111,7 +42108,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2972 i32.const 0 call $~lib/env/abort @@ -42125,7 +42122,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2973 i32.const 0 call $~lib/env/abort @@ -42139,7 +42136,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2974 i32.const 0 call $~lib/env/abort @@ -42153,7 +42150,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2975 i32.const 0 call $~lib/env/abort @@ -42167,7 +42164,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2976 i32.const 0 call $~lib/env/abort @@ -42181,7 +42178,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2977 i32.const 0 call $~lib/env/abort @@ -42195,7 +42192,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2978 i32.const 0 call $~lib/env/abort @@ -42209,7 +42206,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2979 i32.const 0 call $~lib/env/abort @@ -42223,7 +42220,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2980 i32.const 0 call $~lib/env/abort @@ -42237,7 +42234,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2981 i32.const 0 call $~lib/env/abort @@ -42251,7 +42248,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2982 i32.const 0 call $~lib/env/abort @@ -42265,7 +42262,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2983 i32.const 0 call $~lib/env/abort @@ -42279,7 +42276,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2984 i32.const 0 call $~lib/env/abort @@ -42293,7 +42290,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2985 i32.const 0 call $~lib/env/abort @@ -42309,7 +42306,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2986 i32.const 0 call $~lib/env/abort @@ -42325,7 +42322,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2987 i32.const 0 call $~lib/env/abort @@ -42341,7 +42338,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2988 i32.const 0 call $~lib/env/abort @@ -42357,7 +42354,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2989 i32.const 0 call $~lib/env/abort @@ -42373,7 +42370,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2990 i32.const 0 call $~lib/env/abort @@ -42389,7 +42386,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2991 i32.const 0 call $~lib/env/abort @@ -42405,7 +42402,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2992 i32.const 0 call $~lib/env/abort @@ -42421,7 +42418,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2993 i32.const 0 call $~lib/env/abort @@ -42437,7 +42434,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2994 i32.const 0 call $~lib/env/abort @@ -42453,7 +42450,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2995 i32.const 0 call $~lib/env/abort @@ -42469,7 +42466,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2996 i32.const 0 call $~lib/env/abort @@ -42485,7 +42482,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 2997 i32.const 0 call $~lib/env/abort @@ -42499,7 +42496,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3000 i32.const 0 call $~lib/env/abort @@ -42513,7 +42510,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3001 i32.const 0 call $~lib/env/abort @@ -42527,7 +42524,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3002 i32.const 0 call $~lib/env/abort @@ -42541,7 +42538,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3003 i32.const 0 call $~lib/env/abort @@ -42555,7 +42552,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3004 i32.const 0 call $~lib/env/abort @@ -42569,7 +42566,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3005 i32.const 0 call $~lib/env/abort @@ -42583,7 +42580,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3006 i32.const 0 call $~lib/env/abort @@ -42597,7 +42594,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3007 i32.const 0 call $~lib/env/abort @@ -42611,7 +42608,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3008 i32.const 0 call $~lib/env/abort @@ -42625,7 +42622,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3009 i32.const 0 call $~lib/env/abort @@ -42639,7 +42636,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3010 i32.const 0 call $~lib/env/abort @@ -42653,7 +42650,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3011 i32.const 0 call $~lib/env/abort @@ -42667,7 +42664,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3012 i32.const 0 call $~lib/env/abort @@ -42682,7 +42679,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3013 i32.const 0 call $~lib/env/abort @@ -42696,7 +42693,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3025 i32.const 0 call $~lib/env/abort @@ -42710,7 +42707,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3026 i32.const 0 call $~lib/env/abort @@ -42724,7 +42721,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3027 i32.const 0 call $~lib/env/abort @@ -42738,7 +42735,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3028 i32.const 0 call $~lib/env/abort @@ -42752,7 +42749,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3029 i32.const 0 call $~lib/env/abort @@ -42766,7 +42763,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3030 i32.const 0 call $~lib/env/abort @@ -42780,7 +42777,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3031 i32.const 0 call $~lib/env/abort @@ -42794,7 +42791,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3032 i32.const 0 call $~lib/env/abort @@ -42808,7 +42805,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3033 i32.const 0 call $~lib/env/abort @@ -42822,7 +42819,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3034 i32.const 0 call $~lib/env/abort @@ -42836,7 +42833,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3037 i32.const 0 call $~lib/env/abort @@ -42850,7 +42847,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3038 i32.const 0 call $~lib/env/abort @@ -42864,7 +42861,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3039 i32.const 0 call $~lib/env/abort @@ -42880,7 +42877,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3040 i32.const 0 call $~lib/env/abort @@ -42894,7 +42891,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3041 i32.const 0 call $~lib/env/abort @@ -42908,7 +42905,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3050 i32.const 0 call $~lib/env/abort @@ -42922,7 +42919,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3051 i32.const 0 call $~lib/env/abort @@ -42936,7 +42933,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3052 i32.const 0 call $~lib/env/abort @@ -42950,7 +42947,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3053 i32.const 0 call $~lib/env/abort @@ -42964,7 +42961,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3054 i32.const 0 call $~lib/env/abort @@ -42978,7 +42975,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3055 i32.const 0 call $~lib/env/abort @@ -42992,7 +42989,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3056 i32.const 0 call $~lib/env/abort @@ -43006,7 +43003,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3057 i32.const 0 call $~lib/env/abort @@ -43020,7 +43017,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3058 i32.const 0 call $~lib/env/abort @@ -43034,7 +43031,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3059 i32.const 0 call $~lib/env/abort @@ -43048,7 +43045,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3062 i32.const 0 call $~lib/env/abort @@ -43062,7 +43059,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3063 i32.const 0 call $~lib/env/abort @@ -43076,7 +43073,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3064 i32.const 0 call $~lib/env/abort @@ -43092,7 +43089,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3065 i32.const 0 call $~lib/env/abort @@ -43106,7 +43103,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3066 i32.const 0 call $~lib/env/abort @@ -43120,7 +43117,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3078 i32.const 0 call $~lib/env/abort @@ -43134,7 +43131,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3079 i32.const 0 call $~lib/env/abort @@ -43148,7 +43145,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3080 i32.const 0 call $~lib/env/abort @@ -43162,7 +43159,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3081 i32.const 0 call $~lib/env/abort @@ -43176,7 +43173,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3082 i32.const 0 call $~lib/env/abort @@ -43190,7 +43187,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3083 i32.const 0 call $~lib/env/abort @@ -43204,7 +43201,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3084 i32.const 0 call $~lib/env/abort @@ -43218,7 +43215,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3085 i32.const 0 call $~lib/env/abort @@ -43232,7 +43229,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3086 i32.const 0 call $~lib/env/abort @@ -43246,7 +43243,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3087 i32.const 0 call $~lib/env/abort @@ -43260,7 +43257,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3090 i32.const 0 call $~lib/env/abort @@ -43274,7 +43271,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3091 i32.const 0 call $~lib/env/abort @@ -43289,7 +43286,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3092 i32.const 0 call $~lib/env/abort @@ -43303,7 +43300,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3093 i32.const 0 call $~lib/env/abort @@ -43317,7 +43314,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3094 i32.const 0 call $~lib/env/abort @@ -43331,7 +43328,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3095 i32.const 0 call $~lib/env/abort @@ -43345,7 +43342,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3096 i32.const 0 call $~lib/env/abort @@ -43359,7 +43356,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3097 i32.const 0 call $~lib/env/abort @@ -43373,7 +43370,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3098 i32.const 0 call $~lib/env/abort @@ -43387,7 +43384,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3099 i32.const 0 call $~lib/env/abort @@ -43401,7 +43398,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3100 i32.const 0 call $~lib/env/abort @@ -43415,7 +43412,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3101 i32.const 0 call $~lib/env/abort @@ -43429,7 +43426,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3102 i32.const 0 call $~lib/env/abort @@ -43443,7 +43440,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3103 i32.const 0 call $~lib/env/abort @@ -43457,7 +43454,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3104 i32.const 0 call $~lib/env/abort @@ -43471,7 +43468,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3105 i32.const 0 call $~lib/env/abort @@ -43485,7 +43482,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3106 i32.const 0 call $~lib/env/abort @@ -43499,7 +43496,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3107 i32.const 0 call $~lib/env/abort @@ -43513,7 +43510,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3108 i32.const 0 call $~lib/env/abort @@ -43527,7 +43524,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3109 i32.const 0 call $~lib/env/abort @@ -43541,7 +43538,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3110 i32.const 0 call $~lib/env/abort @@ -43555,7 +43552,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3111 i32.const 0 call $~lib/env/abort @@ -43569,7 +43566,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3112 i32.const 0 call $~lib/env/abort @@ -43583,7 +43580,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3113 i32.const 0 call $~lib/env/abort @@ -43597,7 +43594,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3114 i32.const 0 call $~lib/env/abort @@ -43611,7 +43608,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3115 i32.const 0 call $~lib/env/abort @@ -43625,7 +43622,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3116 i32.const 0 call $~lib/env/abort @@ -43639,7 +43636,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3117 i32.const 0 call $~lib/env/abort @@ -43653,7 +43650,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3118 i32.const 0 call $~lib/env/abort @@ -43667,7 +43664,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3119 i32.const 0 call $~lib/env/abort @@ -43681,7 +43678,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3120 i32.const 0 call $~lib/env/abort @@ -43695,7 +43692,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3121 i32.const 0 call $~lib/env/abort @@ -43709,7 +43706,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3122 i32.const 0 call $~lib/env/abort @@ -43723,7 +43720,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3123 i32.const 0 call $~lib/env/abort @@ -43737,7 +43734,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3124 i32.const 0 call $~lib/env/abort @@ -43751,7 +43748,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3125 i32.const 0 call $~lib/env/abort @@ -43765,7 +43762,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3126 i32.const 0 call $~lib/env/abort @@ -43779,7 +43776,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3127 i32.const 0 call $~lib/env/abort @@ -43793,7 +43790,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3128 i32.const 0 call $~lib/env/abort @@ -43807,7 +43804,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3129 i32.const 0 call $~lib/env/abort @@ -43821,7 +43818,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3130 i32.const 0 call $~lib/env/abort @@ -43835,7 +43832,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3131 i32.const 0 call $~lib/env/abort @@ -43849,7 +43846,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3132 i32.const 0 call $~lib/env/abort @@ -43863,7 +43860,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3133 i32.const 0 call $~lib/env/abort @@ -43877,7 +43874,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3134 i32.const 0 call $~lib/env/abort @@ -43891,7 +43888,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3135 i32.const 0 call $~lib/env/abort @@ -43905,7 +43902,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3136 i32.const 0 call $~lib/env/abort @@ -43919,7 +43916,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3137 i32.const 0 call $~lib/env/abort @@ -43933,7 +43930,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3138 i32.const 0 call $~lib/env/abort @@ -43947,7 +43944,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3139 i32.const 0 call $~lib/env/abort @@ -43961,7 +43958,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3140 i32.const 0 call $~lib/env/abort @@ -43975,7 +43972,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3141 i32.const 0 call $~lib/env/abort @@ -43989,7 +43986,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3142 i32.const 0 call $~lib/env/abort @@ -44003,7 +44000,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3143 i32.const 0 call $~lib/env/abort @@ -44017,7 +44014,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3144 i32.const 0 call $~lib/env/abort @@ -44031,7 +44028,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3145 i32.const 0 call $~lib/env/abort @@ -44045,7 +44042,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3146 i32.const 0 call $~lib/env/abort @@ -44059,7 +44056,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3147 i32.const 0 call $~lib/env/abort @@ -44073,7 +44070,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3148 i32.const 0 call $~lib/env/abort @@ -44087,7 +44084,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3149 i32.const 0 call $~lib/env/abort @@ -44101,7 +44098,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3150 i32.const 0 call $~lib/env/abort @@ -44115,7 +44112,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3151 i32.const 0 call $~lib/env/abort @@ -44129,7 +44126,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3152 i32.const 0 call $~lib/env/abort @@ -44143,7 +44140,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3153 i32.const 0 call $~lib/env/abort @@ -44157,7 +44154,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3154 i32.const 0 call $~lib/env/abort @@ -44171,7 +44168,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3155 i32.const 0 call $~lib/env/abort @@ -44185,7 +44182,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3156 i32.const 0 call $~lib/env/abort @@ -44199,7 +44196,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3157 i32.const 0 call $~lib/env/abort @@ -44213,7 +44210,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3158 i32.const 0 call $~lib/env/abort @@ -44227,7 +44224,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3159 i32.const 0 call $~lib/env/abort @@ -44241,7 +44238,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3160 i32.const 0 call $~lib/env/abort @@ -44255,7 +44252,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3161 i32.const 0 call $~lib/env/abort @@ -44269,7 +44266,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3162 i32.const 0 call $~lib/env/abort @@ -44283,7 +44280,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3163 i32.const 0 call $~lib/env/abort @@ -44297,7 +44294,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3172 i32.const 0 call $~lib/env/abort @@ -44311,7 +44308,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3173 i32.const 0 call $~lib/env/abort @@ -44325,7 +44322,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3174 i32.const 0 call $~lib/env/abort @@ -44339,7 +44336,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3175 i32.const 0 call $~lib/env/abort @@ -44353,7 +44350,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3176 i32.const 0 call $~lib/env/abort @@ -44367,7 +44364,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3177 i32.const 0 call $~lib/env/abort @@ -44381,7 +44378,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3178 i32.const 0 call $~lib/env/abort @@ -44395,7 +44392,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3179 i32.const 0 call $~lib/env/abort @@ -44409,7 +44406,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3180 i32.const 0 call $~lib/env/abort @@ -44423,7 +44420,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3181 i32.const 0 call $~lib/env/abort @@ -44437,7 +44434,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3184 i32.const 0 call $~lib/env/abort @@ -44451,7 +44448,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3185 i32.const 0 call $~lib/env/abort @@ -44466,7 +44463,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3186 i32.const 0 call $~lib/env/abort @@ -44480,7 +44477,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3187 i32.const 0 call $~lib/env/abort @@ -44494,7 +44491,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3188 i32.const 0 call $~lib/env/abort @@ -44508,7 +44505,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3189 i32.const 0 call $~lib/env/abort @@ -44522,7 +44519,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3190 i32.const 0 call $~lib/env/abort @@ -44536,7 +44533,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3191 i32.const 0 call $~lib/env/abort @@ -44550,7 +44547,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3192 i32.const 0 call $~lib/env/abort @@ -44564,7 +44561,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3193 i32.const 0 call $~lib/env/abort @@ -44578,7 +44575,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3194 i32.const 0 call $~lib/env/abort @@ -44592,7 +44589,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3195 i32.const 0 call $~lib/env/abort @@ -44606,7 +44603,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3196 i32.const 0 call $~lib/env/abort @@ -44620,7 +44617,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3197 i32.const 0 call $~lib/env/abort @@ -44634,7 +44631,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3198 i32.const 0 call $~lib/env/abort @@ -44648,7 +44645,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3199 i32.const 0 call $~lib/env/abort @@ -44662,7 +44659,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3200 i32.const 0 call $~lib/env/abort @@ -44676,7 +44673,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3201 i32.const 0 call $~lib/env/abort @@ -44690,7 +44687,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3202 i32.const 0 call $~lib/env/abort @@ -44704,7 +44701,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3203 i32.const 0 call $~lib/env/abort @@ -44718,7 +44715,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3204 i32.const 0 call $~lib/env/abort @@ -44732,7 +44729,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3205 i32.const 0 call $~lib/env/abort @@ -44746,7 +44743,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3243 i32.const 0 call $~lib/env/abort @@ -44760,7 +44757,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3244 i32.const 0 call $~lib/env/abort @@ -44774,7 +44771,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3245 i32.const 0 call $~lib/env/abort @@ -44788,7 +44785,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3246 i32.const 0 call $~lib/env/abort @@ -44802,7 +44799,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3247 i32.const 0 call $~lib/env/abort @@ -44816,7 +44813,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3248 i32.const 0 call $~lib/env/abort @@ -44830,7 +44827,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3249 i32.const 0 call $~lib/env/abort @@ -44844,7 +44841,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3250 i32.const 0 call $~lib/env/abort @@ -44858,7 +44855,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3251 i32.const 0 call $~lib/env/abort @@ -44872,7 +44869,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3252 i32.const 0 call $~lib/env/abort @@ -44886,7 +44883,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3255 i32.const 0 call $~lib/env/abort @@ -44900,7 +44897,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3256 i32.const 0 call $~lib/env/abort @@ -44914,7 +44911,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3257 i32.const 0 call $~lib/env/abort @@ -44929,7 +44926,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3258 i32.const 0 call $~lib/env/abort @@ -44943,7 +44940,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3259 i32.const 0 call $~lib/env/abort @@ -44957,7 +44954,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3262 i32.const 0 call $~lib/env/abort @@ -44971,7 +44968,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3263 i32.const 0 call $~lib/env/abort @@ -44985,7 +44982,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3264 i32.const 0 call $~lib/env/abort @@ -44999,7 +44996,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3265 i32.const 0 call $~lib/env/abort @@ -45015,7 +45012,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3266 i32.const 0 call $~lib/env/abort @@ -45031,7 +45028,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3267 i32.const 0 call $~lib/env/abort @@ -45045,7 +45042,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3268 i32.const 0 call $~lib/env/abort @@ -45059,7 +45056,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3269 i32.const 0 call $~lib/env/abort @@ -45073,7 +45070,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3270 i32.const 0 call $~lib/env/abort @@ -45087,7 +45084,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3271 i32.const 0 call $~lib/env/abort @@ -45101,7 +45098,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3272 i32.const 0 call $~lib/env/abort @@ -45115,7 +45112,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3273 i32.const 0 call $~lib/env/abort @@ -45129,7 +45126,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3274 i32.const 0 call $~lib/env/abort @@ -45143,7 +45140,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3275 i32.const 0 call $~lib/env/abort @@ -45157,7 +45154,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3276 i32.const 0 call $~lib/env/abort @@ -45171,7 +45168,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3277 i32.const 0 call $~lib/env/abort @@ -45185,7 +45182,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3278 i32.const 0 call $~lib/env/abort @@ -45199,7 +45196,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3279 i32.const 0 call $~lib/env/abort @@ -45213,7 +45210,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3280 i32.const 0 call $~lib/env/abort @@ -45227,7 +45224,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3281 i32.const 0 call $~lib/env/abort @@ -45241,7 +45238,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3282 i32.const 0 call $~lib/env/abort @@ -45255,7 +45252,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3283 i32.const 0 call $~lib/env/abort @@ -45269,7 +45266,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3284 i32.const 0 call $~lib/env/abort @@ -45283,7 +45280,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3285 i32.const 0 call $~lib/env/abort @@ -45299,7 +45296,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3286 i32.const 0 call $~lib/env/abort @@ -45315,7 +45312,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3287 i32.const 0 call $~lib/env/abort @@ -45331,7 +45328,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3288 i32.const 0 call $~lib/env/abort @@ -45347,7 +45344,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3289 i32.const 0 call $~lib/env/abort @@ -45363,7 +45360,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3290 i32.const 0 call $~lib/env/abort @@ -45379,7 +45376,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3291 i32.const 0 call $~lib/env/abort @@ -45395,7 +45392,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3292 i32.const 0 call $~lib/env/abort @@ -45411,7 +45408,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3293 i32.const 0 call $~lib/env/abort @@ -45427,7 +45424,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3294 i32.const 0 call $~lib/env/abort @@ -45443,7 +45440,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3295 i32.const 0 call $~lib/env/abort @@ -45459,7 +45456,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3296 i32.const 0 call $~lib/env/abort @@ -45475,7 +45472,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3297 i32.const 0 call $~lib/env/abort @@ -45489,7 +45486,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3309 i32.const 0 call $~lib/env/abort @@ -45503,7 +45500,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3310 i32.const 0 call $~lib/env/abort @@ -45517,7 +45514,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3311 i32.const 0 call $~lib/env/abort @@ -45531,7 +45528,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3312 i32.const 0 call $~lib/env/abort @@ -45545,7 +45542,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3313 i32.const 0 call $~lib/env/abort @@ -45559,7 +45556,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3314 i32.const 0 call $~lib/env/abort @@ -45573,7 +45570,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3315 i32.const 0 call $~lib/env/abort @@ -45587,7 +45584,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3316 i32.const 0 call $~lib/env/abort @@ -45601,7 +45598,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3317 i32.const 0 call $~lib/env/abort @@ -45615,7 +45612,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3318 i32.const 0 call $~lib/env/abort @@ -45629,7 +45626,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3321 i32.const 0 call $~lib/env/abort @@ -45643,7 +45640,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3322 i32.const 0 call $~lib/env/abort @@ -45657,7 +45654,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3323 i32.const 0 call $~lib/env/abort @@ -45672,7 +45669,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3324 i32.const 0 call $~lib/env/abort @@ -45686,7 +45683,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3325 i32.const 0 call $~lib/env/abort @@ -45700,7 +45697,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3334 i32.const 0 call $~lib/env/abort @@ -45714,7 +45711,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3335 i32.const 0 call $~lib/env/abort @@ -45728,7 +45725,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3336 i32.const 0 call $~lib/env/abort @@ -45742,7 +45739,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3337 i32.const 0 call $~lib/env/abort @@ -45756,7 +45753,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3338 i32.const 0 call $~lib/env/abort @@ -45770,7 +45767,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3339 i32.const 0 call $~lib/env/abort @@ -45784,7 +45781,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3340 i32.const 0 call $~lib/env/abort @@ -45798,7 +45795,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3341 i32.const 0 call $~lib/env/abort @@ -45812,7 +45809,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3342 i32.const 0 call $~lib/env/abort @@ -45826,7 +45823,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3343 i32.const 0 call $~lib/env/abort @@ -45840,7 +45837,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3346 i32.const 0 call $~lib/env/abort @@ -45854,7 +45851,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3347 i32.const 0 call $~lib/env/abort @@ -45868,7 +45865,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3348 i32.const 0 call $~lib/env/abort @@ -45883,7 +45880,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3349 i32.const 0 call $~lib/env/abort @@ -45897,7 +45894,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3350 i32.const 0 call $~lib/env/abort @@ -45911,7 +45908,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3362 i32.const 0 call $~lib/env/abort @@ -45925,7 +45922,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3363 i32.const 0 call $~lib/env/abort @@ -45939,7 +45936,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3364 i32.const 0 call $~lib/env/abort @@ -45953,7 +45950,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3365 i32.const 0 call $~lib/env/abort @@ -45967,7 +45964,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3366 i32.const 0 call $~lib/env/abort @@ -45981,7 +45978,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3367 i32.const 0 call $~lib/env/abort @@ -45995,7 +45992,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3368 i32.const 0 call $~lib/env/abort @@ -46009,7 +46006,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3369 i32.const 0 call $~lib/env/abort @@ -46023,7 +46020,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3370 i32.const 0 call $~lib/env/abort @@ -46037,7 +46034,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3371 i32.const 0 call $~lib/env/abort @@ -46051,7 +46048,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3374 i32.const 0 call $~lib/env/abort @@ -46065,7 +46062,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3375 i32.const 0 call $~lib/env/abort @@ -46081,7 +46078,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3376 i32.const 0 call $~lib/env/abort @@ -46095,7 +46092,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3377 i32.const 0 call $~lib/env/abort @@ -46109,7 +46106,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3378 i32.const 0 call $~lib/env/abort @@ -46123,7 +46120,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3379 i32.const 0 call $~lib/env/abort @@ -46137,7 +46134,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3380 i32.const 0 call $~lib/env/abort @@ -46151,7 +46148,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3381 i32.const 0 call $~lib/env/abort @@ -46165,7 +46162,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3382 i32.const 0 call $~lib/env/abort @@ -46179,7 +46176,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3383 i32.const 0 call $~lib/env/abort @@ -46193,7 +46190,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3384 i32.const 0 call $~lib/env/abort @@ -46207,7 +46204,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3385 i32.const 0 call $~lib/env/abort @@ -46221,7 +46218,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3386 i32.const 0 call $~lib/env/abort @@ -46235,7 +46232,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3387 i32.const 0 call $~lib/env/abort @@ -46249,7 +46246,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3388 i32.const 0 call $~lib/env/abort @@ -46263,7 +46260,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3397 i32.const 0 call $~lib/env/abort @@ -46277,7 +46274,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3398 i32.const 0 call $~lib/env/abort @@ -46291,7 +46288,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3399 i32.const 0 call $~lib/env/abort @@ -46305,7 +46302,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3400 i32.const 0 call $~lib/env/abort @@ -46319,7 +46316,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3401 i32.const 0 call $~lib/env/abort @@ -46333,7 +46330,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3402 i32.const 0 call $~lib/env/abort @@ -46347,7 +46344,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3403 i32.const 0 call $~lib/env/abort @@ -46361,7 +46358,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3404 i32.const 0 call $~lib/env/abort @@ -46375,7 +46372,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3405 i32.const 0 call $~lib/env/abort @@ -46389,7 +46386,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3406 i32.const 0 call $~lib/env/abort @@ -46403,7 +46400,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3409 i32.const 0 call $~lib/env/abort @@ -46417,7 +46414,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3410 i32.const 0 call $~lib/env/abort @@ -46433,7 +46430,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3411 i32.const 0 call $~lib/env/abort @@ -46447,7 +46444,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3412 i32.const 0 call $~lib/env/abort @@ -46461,7 +46458,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3413 i32.const 0 call $~lib/env/abort @@ -46475,7 +46472,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3414 i32.const 0 call $~lib/env/abort @@ -46489,7 +46486,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3415 i32.const 0 call $~lib/env/abort @@ -46503,7 +46500,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3416 i32.const 0 call $~lib/env/abort @@ -46517,7 +46514,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3417 i32.const 0 call $~lib/env/abort @@ -46531,7 +46528,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3418 i32.const 0 call $~lib/env/abort @@ -46545,7 +46542,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3419 i32.const 0 call $~lib/env/abort @@ -46559,7 +46556,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3420 i32.const 0 call $~lib/env/abort @@ -46573,7 +46570,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3421 i32.const 0 call $~lib/env/abort @@ -46587,7 +46584,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3422 i32.const 0 call $~lib/env/abort @@ -46601,7 +46598,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3423 i32.const 0 call $~lib/env/abort @@ -46615,7 +46612,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3427 i32.const 0 call $~lib/env/abort @@ -46629,7 +46626,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3428 i32.const 0 call $~lib/env/abort @@ -46643,7 +46640,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3429 i32.const 0 call $~lib/env/abort @@ -46657,7 +46654,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3430 i32.const 0 call $~lib/env/abort @@ -46671,7 +46668,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3431 i32.const 0 call $~lib/env/abort @@ -46685,7 +46682,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3432 i32.const 0 call $~lib/env/abort @@ -46699,7 +46696,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3433 i32.const 0 call $~lib/env/abort @@ -46713,7 +46710,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3434 i32.const 0 call $~lib/env/abort @@ -46727,7 +46724,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3435 i32.const 0 call $~lib/env/abort @@ -46741,7 +46738,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3436 i32.const 0 call $~lib/env/abort @@ -46755,7 +46752,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3437 i32.const 0 call $~lib/env/abort @@ -46769,7 +46766,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3438 i32.const 0 call $~lib/env/abort @@ -46782,7 +46779,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3442 i32.const 0 call $~lib/env/abort @@ -46795,7 +46792,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3443 i32.const 0 call $~lib/env/abort @@ -46808,7 +46805,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3444 i32.const 0 call $~lib/env/abort @@ -46821,7 +46818,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3445 i32.const 0 call $~lib/env/abort @@ -46834,7 +46831,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3446 i32.const 0 call $~lib/env/abort @@ -46847,7 +46844,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3447 i32.const 0 call $~lib/env/abort @@ -46860,7 +46857,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3448 i32.const 0 call $~lib/env/abort @@ -46873,7 +46870,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3449 i32.const 0 call $~lib/env/abort @@ -46886,7 +46883,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3450 i32.const 0 call $~lib/env/abort @@ -46899,7 +46896,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3451 i32.const 0 call $~lib/env/abort @@ -46912,7 +46909,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3452 i32.const 0 call $~lib/env/abort @@ -46926,7 +46923,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3453 i32.const 0 call $~lib/env/abort @@ -46939,7 +46936,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3454 i32.const 0 call $~lib/env/abort @@ -46952,7 +46949,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3455 i32.const 0 call $~lib/env/abort @@ -46966,7 +46963,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3456 i32.const 0 call $~lib/env/abort @@ -46979,7 +46976,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3457 i32.const 0 call $~lib/env/abort @@ -46993,7 +46990,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3461 i32.const 0 call $~lib/env/abort @@ -47007,7 +47004,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3462 i32.const 0 call $~lib/env/abort @@ -47021,7 +47018,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3463 i32.const 0 call $~lib/env/abort @@ -47035,7 +47032,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3464 i32.const 0 call $~lib/env/abort @@ -47049,7 +47046,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3466 i32.const 0 call $~lib/env/abort @@ -47063,7 +47060,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3467 i32.const 0 call $~lib/env/abort @@ -47077,7 +47074,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3468 i32.const 0 call $~lib/env/abort @@ -47091,7 +47088,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3469 i32.const 0 call $~lib/env/abort @@ -47105,7 +47102,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3471 i32.const 0 call $~lib/env/abort @@ -47119,7 +47116,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3472 i32.const 0 call $~lib/env/abort @@ -47133,7 +47130,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3473 i32.const 0 call $~lib/env/abort @@ -47147,7 +47144,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3474 i32.const 0 call $~lib/env/abort @@ -47161,7 +47158,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3476 i32.const 0 call $~lib/env/abort @@ -47175,7 +47172,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3477 i32.const 0 call $~lib/env/abort @@ -47189,7 +47186,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3478 i32.const 0 call $~lib/env/abort @@ -47203,7 +47200,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3479 i32.const 0 call $~lib/env/abort @@ -47217,7 +47214,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3481 i32.const 0 call $~lib/env/abort @@ -47231,7 +47228,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3482 i32.const 0 call $~lib/env/abort @@ -47245,7 +47242,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3483 i32.const 0 call $~lib/env/abort @@ -47259,7 +47256,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3484 i32.const 0 call $~lib/env/abort @@ -47273,7 +47270,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3486 i32.const 0 call $~lib/env/abort @@ -47287,7 +47284,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3487 i32.const 0 call $~lib/env/abort @@ -47301,7 +47298,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3488 i32.const 0 call $~lib/env/abort @@ -47315,7 +47312,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3489 i32.const 0 call $~lib/env/abort @@ -47329,7 +47326,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3490 i32.const 0 call $~lib/env/abort @@ -47343,7 +47340,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3491 i32.const 0 call $~lib/env/abort @@ -47357,7 +47354,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3492 i32.const 0 call $~lib/env/abort @@ -47375,7 +47372,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3494 i32.const 0 call $~lib/env/abort @@ -47389,7 +47386,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3498 i32.const 0 call $~lib/env/abort @@ -47403,7 +47400,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3499 i32.const 0 call $~lib/env/abort @@ -47423,7 +47420,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3500 i32.const 0 call $~lib/env/abort @@ -47443,7 +47440,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3501 i32.const 0 call $~lib/env/abort @@ -47463,7 +47460,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3502 i32.const 0 call $~lib/env/abort @@ -47477,7 +47474,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3503 i32.const 0 call $~lib/env/abort @@ -47491,7 +47488,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3504 i32.const 0 call $~lib/env/abort @@ -47506,7 +47503,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3505 i32.const 0 call $~lib/env/abort @@ -47522,7 +47519,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3506 i32.const 0 call $~lib/env/abort @@ -47537,7 +47534,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3507 i32.const 0 call $~lib/env/abort @@ -47551,7 +47548,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3508 i32.const 0 call $~lib/env/abort @@ -47565,7 +47562,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3509 i32.const 0 call $~lib/env/abort @@ -47579,7 +47576,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3510 i32.const 0 call $~lib/env/abort @@ -47593,7 +47590,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3511 i32.const 0 call $~lib/env/abort @@ -47607,7 +47604,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3512 i32.const 0 call $~lib/env/abort @@ -47621,7 +47618,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3513 i32.const 0 call $~lib/env/abort @@ -47635,7 +47632,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3517 i32.const 0 call $~lib/env/abort @@ -47649,7 +47646,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3518 i32.const 0 call $~lib/env/abort @@ -47662,7 +47659,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3519 i32.const 0 call $~lib/env/abort @@ -47675,7 +47672,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3520 i32.const 0 call $~lib/env/abort @@ -47688,7 +47685,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3521 i32.const 0 call $~lib/env/abort @@ -47702,7 +47699,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3522 i32.const 0 call $~lib/env/abort @@ -47716,7 +47713,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3523 i32.const 0 call $~lib/env/abort @@ -47731,7 +47728,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3524 i32.const 0 call $~lib/env/abort @@ -47747,7 +47744,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3525 i32.const 0 call $~lib/env/abort @@ -47762,7 +47759,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3526 i32.const 0 call $~lib/env/abort @@ -47776,7 +47773,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3527 i32.const 0 call $~lib/env/abort @@ -47790,7 +47787,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3528 i32.const 0 call $~lib/env/abort @@ -47804,7 +47801,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3529 i32.const 0 call $~lib/env/abort @@ -47818,7 +47815,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3530 i32.const 0 call $~lib/env/abort @@ -47832,7 +47829,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3531 i32.const 0 call $~lib/env/abort @@ -47846,16 +47843,16 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 3532 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 166 ;) (type $FUNCSIG$v) + (func $start (; 165 ;) (type $FUNCSIG$v) call $start:std/math ) - (func $null (; 167 ;) (type $FUNCSIG$v) + (func $null (; 166 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/mod.optimized.wat b/tests/compiler/std/mod.optimized.wat index 0a67a753f5..7cfa243903 100644 --- a/tests/compiler/std/mod.optimized.wat +++ b/tests/compiler/std/mod.optimized.wat @@ -10,7 +10,7 @@ (import "math" "mod" (func $std/mod/mod (param f64 f64) (result f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\n\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\14\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (export "memory" (memory $0)) @@ -508,7 +508,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 20 i32.const 0 call $~lib/env/abort @@ -521,7 +521,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 21 i32.const 0 call $~lib/env/abort @@ -534,7 +534,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 22 i32.const 0 call $~lib/env/abort @@ -547,7 +547,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 23 i32.const 0 call $~lib/env/abort @@ -560,7 +560,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 24 i32.const 0 call $~lib/env/abort @@ -573,7 +573,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 25 i32.const 0 call $~lib/env/abort @@ -586,7 +586,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 26 i32.const 0 call $~lib/env/abort @@ -599,7 +599,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 27 i32.const 0 call $~lib/env/abort @@ -612,7 +612,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 28 i32.const 0 call $~lib/env/abort @@ -625,7 +625,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 29 i32.const 0 call $~lib/env/abort @@ -638,7 +638,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 30 i32.const 0 call $~lib/env/abort @@ -651,7 +651,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 31 i32.const 0 call $~lib/env/abort @@ -664,7 +664,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 32 i32.const 0 call $~lib/env/abort @@ -677,7 +677,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 33 i32.const 0 call $~lib/env/abort @@ -690,7 +690,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 34 i32.const 0 call $~lib/env/abort @@ -703,7 +703,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 35 i32.const 0 call $~lib/env/abort @@ -716,7 +716,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 36 i32.const 0 call $~lib/env/abort @@ -729,7 +729,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 37 i32.const 0 call $~lib/env/abort @@ -742,7 +742,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 38 i32.const 0 call $~lib/env/abort @@ -755,7 +755,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 39 i32.const 0 call $~lib/env/abort @@ -768,7 +768,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 40 i32.const 0 call $~lib/env/abort @@ -781,7 +781,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 41 i32.const 0 call $~lib/env/abort @@ -794,7 +794,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 42 i32.const 0 call $~lib/env/abort @@ -807,7 +807,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 43 i32.const 0 call $~lib/env/abort @@ -820,7 +820,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 44 i32.const 0 call $~lib/env/abort @@ -833,7 +833,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 45 i32.const 0 call $~lib/env/abort @@ -846,7 +846,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 46 i32.const 0 call $~lib/env/abort @@ -859,7 +859,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 47 i32.const 0 call $~lib/env/abort @@ -872,7 +872,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 48 i32.const 0 call $~lib/env/abort @@ -885,7 +885,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 51 i32.const 0 call $~lib/env/abort @@ -898,7 +898,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 52 i32.const 0 call $~lib/env/abort @@ -911,7 +911,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 53 i32.const 0 call $~lib/env/abort @@ -924,7 +924,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 54 i32.const 0 call $~lib/env/abort @@ -937,7 +937,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 55 i32.const 0 call $~lib/env/abort @@ -950,7 +950,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 56 i32.const 0 call $~lib/env/abort @@ -963,7 +963,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 57 i32.const 0 call $~lib/env/abort @@ -976,7 +976,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 58 i32.const 0 call $~lib/env/abort @@ -989,7 +989,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 59 i32.const 0 call $~lib/env/abort @@ -1002,7 +1002,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 60 i32.const 0 call $~lib/env/abort @@ -1015,7 +1015,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 61 i32.const 0 call $~lib/env/abort @@ -1028,7 +1028,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 62 i32.const 0 call $~lib/env/abort @@ -1041,7 +1041,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 63 i32.const 0 call $~lib/env/abort @@ -1054,7 +1054,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 64 i32.const 0 call $~lib/env/abort @@ -1067,7 +1067,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 65 i32.const 0 call $~lib/env/abort @@ -1080,7 +1080,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 66 i32.const 0 call $~lib/env/abort @@ -1093,7 +1093,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 67 i32.const 0 call $~lib/env/abort @@ -1106,7 +1106,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 68 i32.const 0 call $~lib/env/abort @@ -1119,7 +1119,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 69 i32.const 0 call $~lib/env/abort @@ -1132,7 +1132,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 70 i32.const 0 call $~lib/env/abort @@ -1145,7 +1145,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 71 i32.const 0 call $~lib/env/abort @@ -1158,7 +1158,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 72 i32.const 0 call $~lib/env/abort @@ -1171,7 +1171,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 73 i32.const 0 call $~lib/env/abort @@ -1184,7 +1184,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 74 i32.const 0 call $~lib/env/abort @@ -1197,7 +1197,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 75 i32.const 0 call $~lib/env/abort @@ -1210,7 +1210,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 76 i32.const 0 call $~lib/env/abort @@ -1223,7 +1223,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 77 i32.const 0 call $~lib/env/abort @@ -1236,7 +1236,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 78 i32.const 0 call $~lib/env/abort @@ -1249,7 +1249,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 79 i32.const 0 call $~lib/env/abort @@ -1262,7 +1262,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 80 i32.const 0 call $~lib/env/abort @@ -1275,7 +1275,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 81 i32.const 0 call $~lib/env/abort @@ -1288,7 +1288,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 82 i32.const 0 call $~lib/env/abort @@ -1301,7 +1301,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 83 i32.const 0 call $~lib/env/abort @@ -1314,7 +1314,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 84 i32.const 0 call $~lib/env/abort @@ -1327,7 +1327,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 85 i32.const 0 call $~lib/env/abort @@ -1340,7 +1340,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 86 i32.const 0 call $~lib/env/abort @@ -1353,7 +1353,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 87 i32.const 0 call $~lib/env/abort @@ -1366,7 +1366,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 88 i32.const 0 call $~lib/env/abort @@ -1379,7 +1379,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 89 i32.const 0 call $~lib/env/abort @@ -1392,7 +1392,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 90 i32.const 0 call $~lib/env/abort @@ -1405,7 +1405,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 91 i32.const 0 call $~lib/env/abort @@ -1418,7 +1418,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 92 i32.const 0 call $~lib/env/abort @@ -1431,7 +1431,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 93 i32.const 0 call $~lib/env/abort @@ -1444,7 +1444,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 94 i32.const 0 call $~lib/env/abort @@ -1457,7 +1457,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 95 i32.const 0 call $~lib/env/abort @@ -1470,7 +1470,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 104 i32.const 0 call $~lib/env/abort @@ -1483,7 +1483,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 105 i32.const 0 call $~lib/env/abort @@ -1496,7 +1496,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 106 i32.const 0 call $~lib/env/abort @@ -1509,7 +1509,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 107 i32.const 0 call $~lib/env/abort @@ -1522,7 +1522,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 108 i32.const 0 call $~lib/env/abort @@ -1535,7 +1535,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 109 i32.const 0 call $~lib/env/abort @@ -1548,7 +1548,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 110 i32.const 0 call $~lib/env/abort @@ -1561,7 +1561,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 111 i32.const 0 call $~lib/env/abort @@ -1574,7 +1574,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 112 i32.const 0 call $~lib/env/abort @@ -1587,7 +1587,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 113 i32.const 0 call $~lib/env/abort @@ -1600,7 +1600,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 114 i32.const 0 call $~lib/env/abort @@ -1613,7 +1613,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 115 i32.const 0 call $~lib/env/abort @@ -1626,7 +1626,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 116 i32.const 0 call $~lib/env/abort @@ -1639,7 +1639,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 117 i32.const 0 call $~lib/env/abort @@ -1652,7 +1652,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 118 i32.const 0 call $~lib/env/abort @@ -1665,7 +1665,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 119 i32.const 0 call $~lib/env/abort @@ -1678,7 +1678,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 120 i32.const 0 call $~lib/env/abort @@ -1691,7 +1691,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 121 i32.const 0 call $~lib/env/abort @@ -1704,7 +1704,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 122 i32.const 0 call $~lib/env/abort @@ -1717,7 +1717,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 123 i32.const 0 call $~lib/env/abort @@ -1730,7 +1730,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 126 i32.const 0 call $~lib/env/abort @@ -1743,7 +1743,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 127 i32.const 0 call $~lib/env/abort @@ -1756,7 +1756,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 128 i32.const 0 call $~lib/env/abort @@ -1769,7 +1769,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 129 i32.const 0 call $~lib/env/abort @@ -1782,7 +1782,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 130 i32.const 0 call $~lib/env/abort @@ -1795,7 +1795,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 131 i32.const 0 call $~lib/env/abort @@ -1808,7 +1808,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 132 i32.const 0 call $~lib/env/abort @@ -1821,7 +1821,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 133 i32.const 0 call $~lib/env/abort @@ -1834,7 +1834,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 134 i32.const 0 call $~lib/env/abort @@ -1847,7 +1847,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 135 i32.const 0 call $~lib/env/abort @@ -1860,7 +1860,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 136 i32.const 0 call $~lib/env/abort @@ -1873,7 +1873,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 137 i32.const 0 call $~lib/env/abort @@ -1886,7 +1886,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 138 i32.const 0 call $~lib/env/abort @@ -1899,7 +1899,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 139 i32.const 0 call $~lib/env/abort @@ -1912,7 +1912,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 140 i32.const 0 call $~lib/env/abort @@ -1925,7 +1925,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 141 i32.const 0 call $~lib/env/abort @@ -1938,7 +1938,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 142 i32.const 0 call $~lib/env/abort @@ -1951,7 +1951,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 143 i32.const 0 call $~lib/env/abort @@ -1964,7 +1964,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 144 i32.const 0 call $~lib/env/abort @@ -1977,7 +1977,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 145 i32.const 0 call $~lib/env/abort @@ -1990,7 +1990,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 146 i32.const 0 call $~lib/env/abort @@ -2003,7 +2003,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 147 i32.const 0 call $~lib/env/abort @@ -2016,7 +2016,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 148 i32.const 0 call $~lib/env/abort @@ -2029,7 +2029,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 149 i32.const 0 call $~lib/env/abort @@ -2042,7 +2042,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 150 i32.const 0 call $~lib/env/abort @@ -2055,7 +2055,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 151 i32.const 0 call $~lib/env/abort @@ -2068,7 +2068,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 152 i32.const 0 call $~lib/env/abort @@ -2081,7 +2081,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 153 i32.const 0 call $~lib/env/abort @@ -2094,7 +2094,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 154 i32.const 0 call $~lib/env/abort @@ -2107,7 +2107,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 155 i32.const 0 call $~lib/env/abort @@ -2120,7 +2120,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 156 i32.const 0 call $~lib/env/abort @@ -2133,7 +2133,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 157 i32.const 0 call $~lib/env/abort @@ -2146,7 +2146,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 158 i32.const 0 call $~lib/env/abort @@ -2159,7 +2159,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 159 i32.const 0 call $~lib/env/abort @@ -2172,7 +2172,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 160 i32.const 0 call $~lib/env/abort @@ -2185,7 +2185,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 161 i32.const 0 call $~lib/env/abort @@ -2198,7 +2198,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 162 i32.const 0 call $~lib/env/abort @@ -2211,7 +2211,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 163 i32.const 0 call $~lib/env/abort @@ -2224,7 +2224,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 164 i32.const 0 call $~lib/env/abort @@ -2237,7 +2237,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 165 i32.const 0 call $~lib/env/abort @@ -2250,7 +2250,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 166 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/std/mod.untouched.wat b/tests/compiler/std/mod.untouched.wat index c5a358bdf2..4d4deb257a 100644 --- a/tests/compiler/std/mod.untouched.wat +++ b/tests/compiler/std/mod.untouched.wat @@ -12,11 +12,11 @@ (import "math" "mod" (func $std/mod/mod (param f64 f64) (result f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\n\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\14\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/mod/js i32 (i32.const 1)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 36)) (export "memory" (memory $0)) (export "table" (table $0)) (export "mod" (func $std/mod/mod)) @@ -637,7 +637,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 20 i32.const 0 call $~lib/env/abort @@ -650,7 +650,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 21 i32.const 0 call $~lib/env/abort @@ -663,7 +663,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 22 i32.const 0 call $~lib/env/abort @@ -676,7 +676,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 23 i32.const 0 call $~lib/env/abort @@ -689,7 +689,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 24 i32.const 0 call $~lib/env/abort @@ -702,7 +702,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 25 i32.const 0 call $~lib/env/abort @@ -715,7 +715,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 26 i32.const 0 call $~lib/env/abort @@ -728,7 +728,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 27 i32.const 0 call $~lib/env/abort @@ -741,7 +741,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 28 i32.const 0 call $~lib/env/abort @@ -754,7 +754,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 29 i32.const 0 call $~lib/env/abort @@ -767,7 +767,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 30 i32.const 0 call $~lib/env/abort @@ -780,7 +780,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 31 i32.const 0 call $~lib/env/abort @@ -793,7 +793,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 32 i32.const 0 call $~lib/env/abort @@ -806,7 +806,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 33 i32.const 0 call $~lib/env/abort @@ -819,7 +819,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 34 i32.const 0 call $~lib/env/abort @@ -832,7 +832,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 35 i32.const 0 call $~lib/env/abort @@ -845,7 +845,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 36 i32.const 0 call $~lib/env/abort @@ -858,7 +858,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 37 i32.const 0 call $~lib/env/abort @@ -871,7 +871,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 38 i32.const 0 call $~lib/env/abort @@ -884,7 +884,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 39 i32.const 0 call $~lib/env/abort @@ -897,7 +897,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 40 i32.const 0 call $~lib/env/abort @@ -910,7 +910,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 41 i32.const 0 call $~lib/env/abort @@ -923,7 +923,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 42 i32.const 0 call $~lib/env/abort @@ -936,7 +936,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 43 i32.const 0 call $~lib/env/abort @@ -949,7 +949,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 44 i32.const 0 call $~lib/env/abort @@ -962,7 +962,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 45 i32.const 0 call $~lib/env/abort @@ -975,7 +975,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 46 i32.const 0 call $~lib/env/abort @@ -988,7 +988,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 47 i32.const 0 call $~lib/env/abort @@ -1001,7 +1001,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 48 i32.const 0 call $~lib/env/abort @@ -1014,7 +1014,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 51 i32.const 0 call $~lib/env/abort @@ -1027,7 +1027,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 52 i32.const 0 call $~lib/env/abort @@ -1040,7 +1040,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 53 i32.const 0 call $~lib/env/abort @@ -1053,7 +1053,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 54 i32.const 0 call $~lib/env/abort @@ -1066,7 +1066,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 55 i32.const 0 call $~lib/env/abort @@ -1079,7 +1079,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 56 i32.const 0 call $~lib/env/abort @@ -1092,7 +1092,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 57 i32.const 0 call $~lib/env/abort @@ -1105,7 +1105,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 58 i32.const 0 call $~lib/env/abort @@ -1118,7 +1118,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 59 i32.const 0 call $~lib/env/abort @@ -1131,7 +1131,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 60 i32.const 0 call $~lib/env/abort @@ -1144,7 +1144,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 61 i32.const 0 call $~lib/env/abort @@ -1157,7 +1157,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 62 i32.const 0 call $~lib/env/abort @@ -1170,7 +1170,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 63 i32.const 0 call $~lib/env/abort @@ -1183,7 +1183,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 64 i32.const 0 call $~lib/env/abort @@ -1196,7 +1196,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 65 i32.const 0 call $~lib/env/abort @@ -1209,7 +1209,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 66 i32.const 0 call $~lib/env/abort @@ -1222,7 +1222,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 67 i32.const 0 call $~lib/env/abort @@ -1235,7 +1235,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 68 i32.const 0 call $~lib/env/abort @@ -1248,7 +1248,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 69 i32.const 0 call $~lib/env/abort @@ -1261,7 +1261,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 70 i32.const 0 call $~lib/env/abort @@ -1274,7 +1274,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 71 i32.const 0 call $~lib/env/abort @@ -1287,7 +1287,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 72 i32.const 0 call $~lib/env/abort @@ -1300,7 +1300,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 73 i32.const 0 call $~lib/env/abort @@ -1314,7 +1314,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 74 i32.const 0 call $~lib/env/abort @@ -1328,7 +1328,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 75 i32.const 0 call $~lib/env/abort @@ -1341,7 +1341,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 76 i32.const 0 call $~lib/env/abort @@ -1354,7 +1354,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 77 i32.const 0 call $~lib/env/abort @@ -1368,7 +1368,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 78 i32.const 0 call $~lib/env/abort @@ -1382,7 +1382,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 79 i32.const 0 call $~lib/env/abort @@ -1395,7 +1395,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 80 i32.const 0 call $~lib/env/abort @@ -1408,7 +1408,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 81 i32.const 0 call $~lib/env/abort @@ -1422,7 +1422,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 82 i32.const 0 call $~lib/env/abort @@ -1436,7 +1436,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 83 i32.const 0 call $~lib/env/abort @@ -1449,7 +1449,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 84 i32.const 0 call $~lib/env/abort @@ -1462,7 +1462,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 85 i32.const 0 call $~lib/env/abort @@ -1476,7 +1476,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 86 i32.const 0 call $~lib/env/abort @@ -1490,7 +1490,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 87 i32.const 0 call $~lib/env/abort @@ -1503,7 +1503,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 88 i32.const 0 call $~lib/env/abort @@ -1517,7 +1517,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 89 i32.const 0 call $~lib/env/abort @@ -1531,7 +1531,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 90 i32.const 0 call $~lib/env/abort @@ -1546,7 +1546,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 91 i32.const 0 call $~lib/env/abort @@ -1559,7 +1559,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 92 i32.const 0 call $~lib/env/abort @@ -1573,7 +1573,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 93 i32.const 0 call $~lib/env/abort @@ -1586,7 +1586,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 94 i32.const 0 call $~lib/env/abort @@ -1600,7 +1600,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 95 i32.const 0 call $~lib/env/abort @@ -1613,7 +1613,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 104 i32.const 0 call $~lib/env/abort @@ -1626,7 +1626,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 105 i32.const 0 call $~lib/env/abort @@ -1639,7 +1639,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 106 i32.const 0 call $~lib/env/abort @@ -1652,7 +1652,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 107 i32.const 0 call $~lib/env/abort @@ -1665,7 +1665,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 108 i32.const 0 call $~lib/env/abort @@ -1678,7 +1678,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 109 i32.const 0 call $~lib/env/abort @@ -1691,7 +1691,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 110 i32.const 0 call $~lib/env/abort @@ -1704,7 +1704,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 111 i32.const 0 call $~lib/env/abort @@ -1717,7 +1717,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 112 i32.const 0 call $~lib/env/abort @@ -1730,7 +1730,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 113 i32.const 0 call $~lib/env/abort @@ -1743,7 +1743,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 114 i32.const 0 call $~lib/env/abort @@ -1756,7 +1756,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 115 i32.const 0 call $~lib/env/abort @@ -1769,7 +1769,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 116 i32.const 0 call $~lib/env/abort @@ -1782,7 +1782,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 117 i32.const 0 call $~lib/env/abort @@ -1795,7 +1795,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 118 i32.const 0 call $~lib/env/abort @@ -1808,7 +1808,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 119 i32.const 0 call $~lib/env/abort @@ -1821,7 +1821,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 120 i32.const 0 call $~lib/env/abort @@ -1834,7 +1834,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 121 i32.const 0 call $~lib/env/abort @@ -1847,7 +1847,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 122 i32.const 0 call $~lib/env/abort @@ -1860,7 +1860,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 123 i32.const 0 call $~lib/env/abort @@ -1873,7 +1873,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 126 i32.const 0 call $~lib/env/abort @@ -1886,7 +1886,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 127 i32.const 0 call $~lib/env/abort @@ -1899,7 +1899,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 128 i32.const 0 call $~lib/env/abort @@ -1912,7 +1912,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 129 i32.const 0 call $~lib/env/abort @@ -1925,7 +1925,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 130 i32.const 0 call $~lib/env/abort @@ -1938,7 +1938,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 131 i32.const 0 call $~lib/env/abort @@ -1951,7 +1951,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 132 i32.const 0 call $~lib/env/abort @@ -1964,7 +1964,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 133 i32.const 0 call $~lib/env/abort @@ -1977,7 +1977,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 134 i32.const 0 call $~lib/env/abort @@ -1990,7 +1990,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 135 i32.const 0 call $~lib/env/abort @@ -2003,7 +2003,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 136 i32.const 0 call $~lib/env/abort @@ -2016,7 +2016,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 137 i32.const 0 call $~lib/env/abort @@ -2029,7 +2029,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 138 i32.const 0 call $~lib/env/abort @@ -2042,7 +2042,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 139 i32.const 0 call $~lib/env/abort @@ -2055,7 +2055,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 140 i32.const 0 call $~lib/env/abort @@ -2068,7 +2068,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 141 i32.const 0 call $~lib/env/abort @@ -2081,7 +2081,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 142 i32.const 0 call $~lib/env/abort @@ -2094,7 +2094,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 143 i32.const 0 call $~lib/env/abort @@ -2107,7 +2107,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 144 i32.const 0 call $~lib/env/abort @@ -2121,7 +2121,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 145 i32.const 0 call $~lib/env/abort @@ -2135,7 +2135,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 146 i32.const 0 call $~lib/env/abort @@ -2148,7 +2148,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 147 i32.const 0 call $~lib/env/abort @@ -2161,7 +2161,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 148 i32.const 0 call $~lib/env/abort @@ -2175,7 +2175,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 149 i32.const 0 call $~lib/env/abort @@ -2189,7 +2189,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 150 i32.const 0 call $~lib/env/abort @@ -2202,7 +2202,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 151 i32.const 0 call $~lib/env/abort @@ -2215,7 +2215,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 152 i32.const 0 call $~lib/env/abort @@ -2229,7 +2229,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 153 i32.const 0 call $~lib/env/abort @@ -2243,7 +2243,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 154 i32.const 0 call $~lib/env/abort @@ -2256,7 +2256,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 155 i32.const 0 call $~lib/env/abort @@ -2269,7 +2269,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 156 i32.const 0 call $~lib/env/abort @@ -2283,7 +2283,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 157 i32.const 0 call $~lib/env/abort @@ -2297,7 +2297,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 158 i32.const 0 call $~lib/env/abort @@ -2310,7 +2310,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 159 i32.const 0 call $~lib/env/abort @@ -2324,7 +2324,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 160 i32.const 0 call $~lib/env/abort @@ -2338,7 +2338,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 161 i32.const 0 call $~lib/env/abort @@ -2353,7 +2353,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 162 i32.const 0 call $~lib/env/abort @@ -2366,7 +2366,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 163 i32.const 0 call $~lib/env/abort @@ -2380,7 +2380,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 164 i32.const 0 call $~lib/env/abort @@ -2393,7 +2393,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 165 i32.const 0 call $~lib/env/abort @@ -2407,7 +2407,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 166 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index b4c9d97f79..adbb3496c2 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -1,7 +1,12 @@ (module + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (memory $0 0) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\02\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) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -10,18 +15,30 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end global.get $~lib/allocator/arena/offset - local.tee $0 - i32.const 15 + local.tee $1 + local.get $0 + i32.const 1 + local.get $0 + i32.const 1 + i32.gt_u + select + i32.add + i32.const 7 i32.add i32.const -8 i32.and - local.tee $1 + local.tee $0 current_memory local.tee $2 i32.const 16 @@ -29,8 +46,8 @@ i32.gt_u if local.get $2 - local.get $1 local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -56,14 +73,58 @@ end end end - local.get $1 + local.get $0 global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/runtime/assertUnregistered (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 48 + i32.le_u + if + i32.const 0 + i32.const 16 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end local.get $0 + i32.const 8 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 16 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end ) - (func $std/new/AClass#constructor (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $std/new/AClass#constructor (; 3 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) - call $~lib/allocator/arena/__memory_allocate + i32.const 16 + call $~lib/memory/memory.allocate local.tee $0 + i32.const -1520547049 + i32.store + local.get $0 + i32.const 8 + i32.store offset=4 + local.get $0 + i32.const 8 + i32.add + local.tee $0 + call $~lib/runtime/assertUnregistered + local.get $0 + i32.const 8 + i32.sub + i32.const 1 + i32.store + local.get $0 i32.const 1 i32.store local.get $0 @@ -80,15 +141,15 @@ f32.store offset=4 local.get $0 ) - (func $start (; 2 ;) (type $FUNCSIG$v) - i32.const 8 + (func $start (; 4 ;) (type $FUNCSIG$v) + i32.const 48 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset call $std/new/AClass#constructor global.set $std/new/aClass ) - (func $null (; 3 ;) (type $FUNCSIG$v) + (func $null (; 5 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 49c3dd7520..50beb647e1 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -1,122 +1,198 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$iif (func (param i32 f32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (memory $0 0) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $std/new/AClass.aStaticField (mut 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_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $std/new/AClass.aStaticField (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/new/aClass (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 0 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset + return + ) + (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/ADJUSTOBLOCK + call $~lib/memory/memory.allocate + local.set $1 local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate - return + call $~lib/runtime/doAllocate + ) + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end ) - (func $std/new/AClass#constructor (; 3 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $std/new/AClass#constructor (; 7 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (local $2 i32) local.get $0 block (result i32) local.get $0 i32.eqz if - i32.const 8 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 8 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -136,16 +212,25 @@ f32.store offset=4 local.get $0 ) - (func $start:std/new (; 4 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena + (func $start:std/new (; 8 ;) (type $FUNCSIG$v) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset i32.const 0 f32.const 3 call $std/new/AClass#constructor global.set $std/new/aClass ) - (func $start (; 5 ;) (type $FUNCSIG$v) + (func $start (; 9 ;) (type $FUNCSIG$v) call $start:std/new ) - (func $null (; 6 ;) (type $FUNCSIG$v) + (func $null (; 10 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 72008ecd85..ed1bd53084 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -1,13 +1,16 @@ (module - (type $FUNCSIG$v (func)) + (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$ddi (func (param f64 i32) (result f64))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\1b\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s") + (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 48) "\02\00\00\006\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -81,18 +84,30 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end global.get $~lib/allocator/arena/offset - local.tee $0 - i32.const 15 + local.tee $1 + local.get $0 + i32.const 1 + local.get $0 + i32.const 1 + i32.gt_u + select + i32.add + i32.const 7 i32.add i32.const -8 i32.and - local.tee $1 + local.tee $0 current_memory local.tee $2 i32.const 16 @@ -100,8 +115,8 @@ i32.gt_u if local.get $2 - local.get $1 local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -127,13 +142,66 @@ end end end - local.get $1 + local.get $0 global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 16 + call $~lib/memory/memory.allocate + local.tee $0 + i32.const -1520547049 + i32.store + local.get $0 + i32.const 8 + i32.store offset=4 local.get $0 + i32.const 8 + i32.add ) - (func $std/operator-overloading/Tester#constructor (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/assertUnregistered (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 112 + i32.le_u + if + i32.const 0 + i32.const 16 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 8 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 16 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + i32.const 8 + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $std/operator-overloading/Tester#constructor (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/doAllocate + i32.const 1 + call $~lib/runtime/doRegister local.tee $2 local.get $0 i32.store @@ -142,7 +210,7 @@ i32.store offset=4 local.get $2 ) - (func $~lib/math/NativeMath.scalbn (; 3 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 6 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -219,7 +287,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/math/NativeMath.pow (; 4 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 7 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -1158,7 +1226,7 @@ f64.const 1e-300 f64.mul ) - (func $std/operator-overloading/Tester.pow (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.pow (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load f64.convert_i32_s @@ -1177,11 +1245,37 @@ i32.trunc_f64_s call $std/operator-overloading/Tester#constructor ) - (func $start:std/operator-overloading (; 6 ;) (type $FUNCSIG$v) + (func $std/operator-overloading/TesterInlineStatic#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + call $~lib/runtime/doAllocate + i32.const 3 + call $~lib/runtime/doRegister + local.tee $2 + local.get $0 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + ) + (func $std/operator-overloading/TesterInlineInstance#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + call $~lib/runtime/doAllocate + i32.const 4 + call $~lib/runtime/doRegister + local.tee $2 + local.get $0 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + ) + (func $start:std/operator-overloading (; 11 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) - i32.const 72 + i32.const 112 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -1223,7 +1317,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 147 i32.const 0 call $~lib/env/abort @@ -1266,7 +1360,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 153 i32.const 0 call $~lib/env/abort @@ -1310,7 +1404,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 159 i32.const 0 call $~lib/env/abort @@ -1354,7 +1448,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 165 i32.const 0 call $~lib/env/abort @@ -1397,7 +1491,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 171 i32.const 0 call $~lib/env/abort @@ -1431,7 +1525,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 177 i32.const 0 call $~lib/env/abort @@ -1475,7 +1569,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 183 i32.const 0 call $~lib/env/abort @@ -1519,7 +1613,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 189 i32.const 0 call $~lib/env/abort @@ -1563,7 +1657,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 195 i32.const 0 call $~lib/env/abort @@ -1600,7 +1694,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 56 i32.const 201 i32.const 0 call $~lib/env/abort @@ -1635,7 +1729,7 @@ global.get $std/operator-overloading/eqf if i32.const 0 - i32.const 8 + i32.const 56 i32.const 207 i32.const 0 call $~lib/env/abort @@ -1662,7 +1756,7 @@ global.get $std/operator-overloading/eq if i32.const 0 - i32.const 8 + i32.const 56 i32.const 211 i32.const 0 call $~lib/env/abort @@ -1691,7 +1785,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 56 i32.const 215 i32.const 0 call $~lib/env/abort @@ -1728,7 +1822,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 56 i32.const 221 i32.const 0 call $~lib/env/abort @@ -1765,7 +1859,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 56 i32.const 227 i32.const 0 call $~lib/env/abort @@ -1802,7 +1896,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 56 i32.const 233 i32.const 0 call $~lib/env/abort @@ -1839,7 +1933,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 56 i32.const 239 i32.const 0 call $~lib/env/abort @@ -1876,7 +1970,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 244 i32.const 0 call $~lib/env/abort @@ -1913,7 +2007,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 249 i32.const 0 call $~lib/env/abort @@ -1950,7 +2044,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 254 i32.const 0 call $~lib/env/abort @@ -1985,7 +2079,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 259 i32.const 0 call $~lib/env/abort @@ -2028,7 +2122,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 264 i32.const 0 call $~lib/env/abort @@ -2071,7 +2165,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 269 i32.const 0 call $~lib/env/abort @@ -2111,7 +2205,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 56 i32.const 274 i32.const 0 call $~lib/env/abort @@ -2122,7 +2216,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 56 i32.const 275 i32.const 0 call $~lib/env/abort @@ -2163,7 +2257,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 281 i32.const 0 call $~lib/env/abort @@ -2199,7 +2293,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 284 i32.const 0 call $~lib/env/abort @@ -2237,7 +2331,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 289 i32.const 0 call $~lib/env/abort @@ -2259,7 +2353,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 290 i32.const 0 call $~lib/env/abort @@ -2294,7 +2388,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 293 i32.const 0 call $~lib/env/abort @@ -2315,7 +2409,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 294 i32.const 0 call $~lib/env/abort @@ -2323,7 +2417,7 @@ end i32.const 1 i32.const 2 - call $std/operator-overloading/Tester#constructor + call $std/operator-overloading/TesterInlineStatic#constructor global.set $std/operator-overloading/ais1 global.get $std/operator-overloading/ais1 local.tee $0 @@ -2334,11 +2428,11 @@ i32.load offset=4 i32.const 1 i32.add - call $std/operator-overloading/Tester#constructor + call $std/operator-overloading/TesterInlineStatic#constructor global.set $std/operator-overloading/ais1 i32.const 2 i32.const 3 - call $std/operator-overloading/Tester#constructor + call $std/operator-overloading/TesterInlineStatic#constructor global.set $std/operator-overloading/ais2 global.get $std/operator-overloading/ais1 local.tee $0 @@ -2352,7 +2446,7 @@ local.get $1 i32.load offset=4 i32.add - call $std/operator-overloading/Tester#constructor + call $std/operator-overloading/TesterInlineStatic#constructor global.set $std/operator-overloading/ais global.get $std/operator-overloading/ais i32.load @@ -2370,7 +2464,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 314 i32.const 0 call $~lib/env/abort @@ -2378,7 +2472,7 @@ end i32.const 1 i32.const 2 - call $std/operator-overloading/Tester#constructor + call $std/operator-overloading/TesterInlineInstance#constructor global.set $std/operator-overloading/aii1 global.get $std/operator-overloading/aii1 local.tee $1 @@ -2389,11 +2483,11 @@ i32.load offset=4 i32.const 1 i32.add - call $std/operator-overloading/Tester#constructor + call $std/operator-overloading/TesterInlineInstance#constructor global.set $std/operator-overloading/aii1 i32.const 2 i32.const 3 - call $std/operator-overloading/Tester#constructor + call $std/operator-overloading/TesterInlineInstance#constructor global.set $std/operator-overloading/aii2 global.get $std/operator-overloading/aii1 local.tee $1 @@ -2407,7 +2501,7 @@ local.get $0 i32.load offset=4 i32.add - call $std/operator-overloading/Tester#constructor + call $std/operator-overloading/TesterInlineInstance#constructor global.set $std/operator-overloading/aii global.get $std/operator-overloading/aii i32.load @@ -2425,17 +2519,17 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 334 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 7 ;) (type $FUNCSIG$v) + (func $start (; 12 ;) (type $FUNCSIG$v) call $start:std/operator-overloading ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 13 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 9d76904f41..1fb8471ea2 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -1,18 +1,24 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$ddi (func (param f64 i32) (result f64))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\1b\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 48) "\02\00\00\006\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/operator-overloading/a1 (mut i32) (i32.const 0)) (global $std/operator-overloading/a2 (mut i32) (i32.const 0)) (global $std/operator-overloading/a (mut i32) (i32.const 0)) @@ -80,112 +86,179 @@ (global $std/operator-overloading/aii1 (mut i32) (i32.const 0)) (global $std/operator-overloading/aii2 (mut i32) (i32.const 0)) (global $std/operator-overloading/aii (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 68)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 112)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset + return + ) + (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/ADJUSTOBLOCK + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate - return + call $~lib/runtime/doAllocate ) - (func $std/operator-overloading/Tester#constructor (; 4 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u i32.eqz if - i32.const 8 - call $~lib/memory/memory.allocate + i32.const 0 + i32.const 16 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $std/operator-overloading/Tester#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + i32.eqz + if + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 8 + call $~lib/runtime/ALLOCATE + local.set $3 + local.get $3 + i32.const 1 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -196,7 +269,7 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/Tester.add (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.add (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -210,7 +283,7 @@ i32.add call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.sub (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.sub (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -224,7 +297,7 @@ i32.sub call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.mul (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.mul (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -238,7 +311,7 @@ i32.mul call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.div (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.div (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -252,7 +325,7 @@ i32.div_s call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.mod (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.mod (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -266,7 +339,7 @@ i32.rem_s call $std/operator-overloading/Tester#constructor ) - (func $~lib/math/NativeMath.scalbn (; 10 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 13 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) (local $2 f64) (local $3 i32) (local $4 i32) @@ -357,7 +430,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/math/NativeMath.pow (; 11 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 14 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -1445,7 +1518,7 @@ local.get $16 f64.mul ) - (func $std/operator-overloading/Tester.pow (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.pow (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1465,7 +1538,7 @@ i32.trunc_f64_s call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.and (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.and (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1479,7 +1552,7 @@ i32.and call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.or (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.or (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1493,7 +1566,7 @@ i32.or call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.xor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.xor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1507,7 +1580,7 @@ i32.xor call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.equals (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.equals (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1525,7 +1598,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.notEquals (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.notEquals (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1543,7 +1616,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.greater (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.greater (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1561,7 +1634,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.greaterEquals (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.greaterEquals (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1579,7 +1652,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.less (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.less (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1597,7 +1670,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.lessEquals (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.lessEquals (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1615,7 +1688,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.shr (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shr (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1627,7 +1700,7 @@ i32.shr_s call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.shu (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shu (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1639,7 +1712,7 @@ i32.shr_u call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.shl (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shl (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1651,7 +1724,7 @@ i32.shl call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.pos (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.pos (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1659,7 +1732,7 @@ i32.load offset=4 call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.neg (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.neg (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.const 0 local.get $0 @@ -1671,7 +1744,7 @@ i32.sub call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.not (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.not (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1683,7 +1756,7 @@ i32.xor call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.excl (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.excl (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -1697,7 +1770,7 @@ local.get $1 end ) - (func $std/operator-overloading/Tester#inc (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#inc (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 local.get $0 i32.load @@ -1712,7 +1785,7 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/Tester#dec (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#dec (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 local.get $0 i32.load @@ -1727,7 +1800,7 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/Tester#postInc (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#postInc (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1739,7 +1812,7 @@ i32.add call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester#postDec (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#postDec (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1751,12 +1824,19 @@ i32.sub call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/TesterInlineStatic#constructor (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/operator-overloading/TesterInlineStatic#constructor (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) local.get $0 i32.eqz if - i32.const 8 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 8 + call $~lib/runtime/ALLOCATE + local.set $3 + local.get $3 + i32.const 3 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -1767,12 +1847,19 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/TesterInlineInstance#constructor (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/operator-overloading/TesterInlineInstance#constructor (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) local.get $0 i32.eqz if - i32.const 8 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 8 + call $~lib/runtime/ALLOCATE + local.set $3 + local.get $3 + i32.const 4 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -1783,10 +1870,19 @@ i32.store offset=4 local.get $0 ) - (func $start:std/operator-overloading (; 35 ;) (type $FUNCSIG$v) + (func $start:std/operator-overloading (; 38 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $start:~lib/allocator/arena + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset i32.const 0 i32.const 1 i32.const 2 @@ -1817,7 +1913,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 147 i32.const 0 call $~lib/env/abort @@ -1853,7 +1949,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 153 i32.const 0 call $~lib/env/abort @@ -1889,7 +1985,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 159 i32.const 0 call $~lib/env/abort @@ -1925,7 +2021,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 165 i32.const 0 call $~lib/env/abort @@ -1961,7 +2057,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 171 i32.const 0 call $~lib/env/abort @@ -1997,7 +2093,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 177 i32.const 0 call $~lib/env/abort @@ -2033,7 +2129,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 183 i32.const 0 call $~lib/env/abort @@ -2069,7 +2165,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 189 i32.const 0 call $~lib/env/abort @@ -2105,7 +2201,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 195 i32.const 0 call $~lib/env/abort @@ -2131,7 +2227,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 201 i32.const 0 call $~lib/env/abort @@ -2157,7 +2253,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 207 i32.const 0 call $~lib/env/abort @@ -2173,7 +2269,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 211 i32.const 0 call $~lib/env/abort @@ -2189,7 +2285,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 215 i32.const 0 call $~lib/env/abort @@ -2215,7 +2311,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 221 i32.const 0 call $~lib/env/abort @@ -2241,7 +2337,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 227 i32.const 0 call $~lib/env/abort @@ -2267,7 +2363,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 233 i32.const 0 call $~lib/env/abort @@ -2293,7 +2389,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 239 i32.const 0 call $~lib/env/abort @@ -2324,7 +2420,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 244 i32.const 0 call $~lib/env/abort @@ -2355,7 +2451,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 249 i32.const 0 call $~lib/env/abort @@ -2386,7 +2482,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 254 i32.const 0 call $~lib/env/abort @@ -2418,7 +2514,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 259 i32.const 0 call $~lib/env/abort @@ -2454,7 +2550,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 264 i32.const 0 call $~lib/env/abort @@ -2490,7 +2586,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 269 i32.const 0 call $~lib/env/abort @@ -2520,7 +2616,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 274 i32.const 0 call $~lib/env/abort @@ -2532,7 +2628,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 275 i32.const 0 call $~lib/env/abort @@ -2562,7 +2658,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 281 i32.const 0 call $~lib/env/abort @@ -2587,7 +2683,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 284 i32.const 0 call $~lib/env/abort @@ -2622,7 +2718,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 289 i32.const 0 call $~lib/env/abort @@ -2644,7 +2740,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 290 i32.const 0 call $~lib/env/abort @@ -2674,7 +2770,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 293 i32.const 0 call $~lib/env/abort @@ -2696,7 +2792,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 294 i32.const 0 call $~lib/env/abort @@ -2762,7 +2858,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 314 i32.const 0 call $~lib/env/abort @@ -2828,16 +2924,16 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 56 i32.const 334 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 36 ;) (type $FUNCSIG$v) + (func $start (; 39 ;) (type $FUNCSIG$v) call $start:std/operator-overloading ) - (func $null (; 37 ;) (type $FUNCSIG$v) + (func $null (; 40 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index 2dee61b85b..4aac78e367 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -5,7 +5,7 @@ (type $FUNCSIG$vii (func (param i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0e\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\1c\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/pointer/one (mut i32) (i32.const 0)) @@ -17,7 +17,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/internal/memory/memset (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.fill (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.const 0 @@ -61,7 +61,7 @@ i32.const 0 i32.store8 ) - (func $~lib/internal/memory/memcpy (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/util/memory/memcpy (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -911,65 +911,107 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.copy (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) i32.const 8 local.set $2 - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - i32.const 8 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else + block $~lib/util/memory/memmove|inlined.0 local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $1 i32.const 8 i32.add - local.get $1 + local.get $0 i32.le_u - end - if + local.tee $3 + if (result i32) + local.get $3 + else + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end local.get $0 local.get $1 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq + i32.lt_u if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and if - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + br $continue|0 end + end + loop $continue|1 local.get $2 - i32.const 1 - i32.sub - local.set $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if local.get $0 local.tee $4 i32.const 1 @@ -984,100 +1026,71 @@ local.get $3 i32.load8_u i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store local.get $2 - i32.const 8 + i32.const 1 i32.sub local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 + br $continue|2 end end - end - loop $continue|2 - local.get $2 + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if + loop $continue|3 + local.get $0 local.get $2 - i32.eqz + i32.add + i32.const 7 + i32.and if - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 end + end + loop $continue|4 local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|3 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end end end - loop $continue|4 + loop $continue|5 local.get $2 - i32.const 8 - i32.ge_u if local.get $2 - i32.const 8 + i32.const 1 i32.sub local.tee $2 local.get $0 @@ -1085,29 +1098,12 @@ local.get $1 local.get $2 i32.add - i64.load - i64.store - br $continue|4 + i32.load8_u + i32.store8 + br $continue|5 end end end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end end ) (func $start:std/pointer (; 4 ;) (type $FUNCSIG$v) @@ -1122,7 +1118,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 79 i32.const 0 call $~lib/env/abort @@ -1133,7 +1129,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 80 i32.const 0 call $~lib/env/abort @@ -1152,7 +1148,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 84 i32.const 0 call $~lib/env/abort @@ -1164,7 +1160,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 85 i32.const 0 call $~lib/env/abort @@ -1179,7 +1175,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 88 i32.const 0 call $~lib/env/abort @@ -1194,7 +1190,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 91 i32.const 0 call $~lib/env/abort @@ -1205,7 +1201,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 93 i32.const 0 call $~lib/env/abort @@ -1223,7 +1219,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 95 i32.const 0 call $~lib/env/abort @@ -1234,7 +1230,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 96 i32.const 0 call $~lib/env/abort @@ -1245,7 +1241,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 98 i32.const 0 call $~lib/env/abort @@ -1264,7 +1260,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 101 i32.const 0 call $~lib/env/abort @@ -1276,7 +1272,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 102 i32.const 0 call $~lib/env/abort @@ -1288,7 +1284,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 103 i32.const 0 call $~lib/env/abort @@ -1301,17 +1297,17 @@ if local.get $0 local.get $1 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy else local.get $0 - call $~lib/internal/memory/memset + call $~lib/memory/memory.fill end global.get $std/pointer/one global.get $std/pointer/two i32.eq if i32.const 0 - i32.const 8 + i32.const 16 i32.const 106 i32.const 0 call $~lib/env/abort @@ -1323,7 +1319,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 107 i32.const 0 call $~lib/env/abort @@ -1335,7 +1331,7 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 108 i32.const 0 call $~lib/env/abort @@ -1357,7 +1353,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 114 i32.const 0 call $~lib/env/abort @@ -1371,7 +1367,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 115 i32.const 0 call $~lib/env/abort @@ -1383,7 +1379,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 117 i32.const 0 call $~lib/env/abort @@ -1397,7 +1393,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 118 i32.const 0 call $~lib/env/abort @@ -1409,7 +1405,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 120 i32.const 0 call $~lib/env/abort @@ -1421,7 +1417,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 121 i32.const 0 call $~lib/env/abort @@ -1439,7 +1435,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 124 i32.const 0 call $~lib/env/abort @@ -1453,7 +1449,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 125 i32.const 0 call $~lib/env/abort @@ -1465,7 +1461,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 126 i32.const 0 call $~lib/env/abort @@ -1480,7 +1476,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 129 i32.const 0 call $~lib/env/abort @@ -1492,7 +1488,7 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 16 i32.const 130 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/std/pointer.untouched.wat b/tests/compiler/std/pointer.untouched.wat index 87daab46af..748c64584a 100644 --- a/tests/compiler/std/pointer.untouched.wat +++ b/tests/compiler/std/pointer.untouched.wat @@ -7,7 +7,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0e\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\1c\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/pointer/one (mut i32) (i32.const 0)) @@ -16,265 +16,267 @@ (global $std/pointer/sub (mut i32) (i32.const 0)) (global $std/pointer/nextOne (mut i32) (i32.const 0)) (global $std/pointer/buf (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/internal/memory/memset (; 1 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 1 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 1 + i32.add + local.get $1 + i32.store8 + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $4 + local.get $0 + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 12 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 24 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 20 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.get $4 + i32.store + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $4 + i64.extend_i32_u + local.get $4 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $5 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $5 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $5 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + end + br $continue|0 end - br $continue|0 end end end ) - (func $~lib/internal/memory/memcpy (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1475,64 +1477,122 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else + block $~lib/util/memory/memmove|inlined.0 local.get $0 - local.get $2 - i32.add local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end local.get $1 - i32.const 7 - i32.and + local.get $2 + i32.add local.get $0 - i32.const 7 - i32.and - i32.eq + i32.le_u + local.tee $3 + if (result i32) + local.get $3 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + end + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 if block - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 block (result i32) local.get $0 local.tee $3 @@ -1551,186 +1611,115 @@ end i32.load8_u i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store local.get $2 - i32.const 8 + i32.const 1 i32.sub local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 end - br $continue|1 + br $continue|2 end end end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - end - i32.load8_u - i32.store8 + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 local.get $2 - i32.const 1 - i32.sub - local.set $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end end - br $continue|2 end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 + br $continue|4 end - br $continue|3 end end end - block $break|4 - loop $continue|4 + block $break|5 + loop $continue|5 local.get $2 - i32.const 8 - i32.ge_u if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 end end end end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end end ) (func $std/pointer/Pointer#set:value (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) local.get $1 i32.const 0 i32.eq if local.get $0 - local.set $2 i32.const 0 - local.set $3 i32.const 8 - local.set $4 - local.get $2 - local.get $3 - local.get $4 - call $~lib/internal/memory/memset + call $~lib/memory/memory.fill else local.get $0 - local.set $4 local.get $1 - local.set $3 i32.const 8 - local.set $2 - local.get $4 - local.get $3 - local.get $2 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy end ) (func $std/pointer/Pointer#set (; 5 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) @@ -1777,7 +1766,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 79 i32.const 0 call $~lib/env/abort @@ -1793,7 +1782,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 80 i32.const 0 call $~lib/env/abort @@ -1827,7 +1816,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 84 i32.const 0 call $~lib/env/abort @@ -1845,7 +1834,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 85 i32.const 0 call $~lib/env/abort @@ -1871,7 +1860,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 88 i32.const 0 call $~lib/env/abort @@ -1897,7 +1886,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 91 i32.const 0 call $~lib/env/abort @@ -1913,7 +1902,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 93 i32.const 0 call $~lib/env/abort @@ -1937,7 +1926,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 95 i32.const 0 call $~lib/env/abort @@ -1953,7 +1942,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 96 i32.const 0 call $~lib/env/abort @@ -1969,7 +1958,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 98 i32.const 0 call $~lib/env/abort @@ -2001,7 +1990,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 101 i32.const 0 call $~lib/env/abort @@ -2019,7 +2008,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 102 i32.const 0 call $~lib/env/abort @@ -2037,7 +2026,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 103 i32.const 0 call $~lib/env/abort @@ -2065,7 +2054,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 106 i32.const 0 call $~lib/env/abort @@ -2083,7 +2072,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 107 i32.const 0 call $~lib/env/abort @@ -2101,7 +2090,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 108 i32.const 0 call $~lib/env/abort @@ -2140,7 +2129,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 114 i32.const 0 call $~lib/env/abort @@ -2163,7 +2152,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 115 i32.const 0 call $~lib/env/abort @@ -2186,7 +2175,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 117 i32.const 0 call $~lib/env/abort @@ -2209,7 +2198,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 118 i32.const 0 call $~lib/env/abort @@ -2222,7 +2211,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 120 i32.const 0 call $~lib/env/abort @@ -2235,7 +2224,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 121 i32.const 0 call $~lib/env/abort @@ -2273,7 +2262,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 124 i32.const 0 call $~lib/env/abort @@ -2296,7 +2285,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 125 i32.const 0 call $~lib/env/abort @@ -2309,7 +2298,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 126 i32.const 0 call $~lib/env/abort @@ -2330,7 +2319,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 129 i32.const 0 call $~lib/env/abort @@ -2343,7 +2332,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 130 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/std/polyfills.optimized.wat b/tests/compiler/std/polyfills.optimized.wat index 819523fe1b..f125f5282a 100644 --- a/tests/compiler/std/polyfills.optimized.wat +++ b/tests/compiler/std/polyfills.optimized.wat @@ -1,7 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\10\00\00\00s\00t\00d\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00 \00\00\00s\00t\00d\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $start) (export "memory" (memory $0)) diff --git a/tests/compiler/std/polyfills.untouched.wat b/tests/compiler/std/polyfills.untouched.wat index 8a6f21d814..c15467108d 100644 --- a/tests/compiler/std/polyfills.untouched.wat +++ b/tests/compiler/std/polyfills.untouched.wat @@ -5,10 +5,10 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00s\00t\00d\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00 \00\00\00s\00t\00d\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -184,8 +184,81 @@ i32.or return ) - (func $start:std/polyfills (; 11 ;) (type $FUNCSIG$v) - (local $0 i32) + (func $~lib/polyfills/bswap16 (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + return + ) + (func $~lib/polyfills/bswap16 (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + return + ) + (func $~lib/polyfills/bswap16 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 8 + i32.shl + local.get $0 + i32.const 65535 + i32.and + i32.const 8 + i32.shr_u + i32.const 255 + i32.and + i32.or + return + ) + (func $~lib/polyfills/bswap16 (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 8 + i32.shl + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const 8 + i32.shr_s + i32.const 255 + i32.and + i32.or + return + ) + (func $~lib/polyfills/bswap16 (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 8 + i32.shl + i32.const 65280 + i32.and + local.get $0 + i32.const 8 + i32.shr_u + i32.const 255 + i32.and + i32.or + local.get $0 + i32.const -65536 + i32.and + i32.or + return + ) + (func $~lib/polyfills/bswap16 (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 8 + i32.shl + i32.const 65280 + i32.and + local.get $0 + i32.const 8 + i32.shr_s + i32.const 255 + i32.and + i32.or + local.get $0 + i32.const -65536 + i32.and + i32.or + return + ) + (func $start:std/polyfills (; 17 ;) (type $FUNCSIG$v) i32.const 170 call $~lib/polyfills/bswap i32.const 255 @@ -195,7 +268,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 4 i32.const 0 call $~lib/env/abort @@ -216,7 +289,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 5 i32.const 0 call $~lib/env/abort @@ -231,7 +304,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 8 i32.const 0 call $~lib/env/abort @@ -252,7 +325,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 9 i32.const 0 call $~lib/env/abort @@ -265,7 +338,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 12 i32.const 0 call $~lib/env/abort @@ -278,7 +351,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 13 i32.const 0 call $~lib/env/abort @@ -291,7 +364,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 16 i32.const 0 call $~lib/env/abort @@ -304,7 +377,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 17 i32.const 0 call $~lib/env/abort @@ -317,7 +390,7 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 20 i32.const 0 call $~lib/env/abort @@ -330,18 +403,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 21 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/polyfills/bswap16|inlined.0 (result i32) - i32.const 170 - local.set $0 - local.get $0 - br $~lib/polyfills/bswap16|inlined.0 - end + i32.const 170 + call $~lib/polyfills/bswap16 i32.const 255 i32.and i32.const 170 @@ -349,18 +418,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 24 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/polyfills/bswap16|inlined.0 (result i32) - i32.const 170 - local.set $0 - local.get $0 - br $~lib/polyfills/bswap16|inlined.0 - end + i32.const 170 + call $~lib/polyfills/bswap16 i32.const 24 i32.shl i32.const 24 @@ -374,26 +439,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 25 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/polyfills/bswap16|inlined.0 (result i32) - i32.const 43707 - local.set $0 - local.get $0 - i32.const 8 - i32.shl - local.get $0 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.or - br $~lib/polyfills/bswap16|inlined.0 - end + i32.const 43707 + call $~lib/polyfills/bswap16 i32.const 65535 i32.and i32.const 48042 @@ -401,30 +454,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 28 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/polyfills/bswap16|inlined.0 (result i32) - i32.const 43707 - local.set $0 - local.get $0 - i32.const 8 - i32.shl - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 8 - i32.shr_s - i32.const 255 - i32.and - i32.or - br $~lib/polyfills/bswap16|inlined.0 - end + i32.const 43707 + call $~lib/polyfills/bswap16 i32.const 16 i32.shl i32.const 16 @@ -438,78 +475,42 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 29 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/polyfills/bswap16|inlined.0 (result i32) - i32.const -7820613 - local.set $0 - local.get $0 - i32.const 8 - i32.shl - i32.const 65280 - i32.and - local.get $0 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.or - local.get $0 - i32.const -65536 - i32.and - i32.or - br $~lib/polyfills/bswap16|inlined.0 - end + i32.const -7820613 + call $~lib/polyfills/bswap16 i32.const -7816278 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 32 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/polyfills/bswap16|inlined.0 (result i32) - i32.const -7820613 - local.set $0 - local.get $0 - i32.const 8 - i32.shl - i32.const 65280 - i32.and - local.get $0 - i32.const 8 - i32.shr_s - i32.const 255 - i32.and - i32.or - local.get $0 - i32.const -65536 - i32.and - i32.or - br $~lib/polyfills/bswap16|inlined.0 - end + i32.const -7820613 + call $~lib/polyfills/bswap16 i32.const -7816278 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 16 i32.const 33 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 12 ;) (type $FUNCSIG$v) + (func $start (; 18 ;) (type $FUNCSIG$v) call $start:std/polyfills ) - (func $null (; 13 ;) (type $FUNCSIG$v) + (func $null (; 19 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index ecc9b6ebac..3286fc68b6 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -1,1976 +1,249 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\08\00\00\00\00\00\00\00\01\00\00\00\02") - (data (i32.const 24) "\08\00\00\00\02") - (data (i32.const 32) "\10\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\04") - (data (i32.const 64) " \00\00\00\02") - (data (i32.const 72) "\08") - (data (i32.const 82) "\c0?\00\00 @") - (data (i32.const 88) "H\00\00\00\02") - (data (i32.const 96) "\10") - (data (i32.const 110) "\f4?\00\00\00\00\00\00\02@") - (data (i32.const 128) "`\00\00\00\02") - (data (i32.const 136) "\13\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) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 216) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\08\00\00\00\01\00\00\00\02") + (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\18\00\00\00\02") + (data (i32.const 48) "\01\00\00\00\10\00\00\00\03\00\00\00\00\00\00\00\04") + (data (i32.const 72) "\03\00\00\00\10\00\00\008\00\00\008\00\00\00H\00\00\00\02") + (data (i32.const 96) "\01\00\00\00\08\00\00\00\00\00\c0?\00\00 @") + (data (i32.const 112) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00p\00\00\00\02") + (data (i32.const 136) "\01\00\00\00\10") + (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\a0\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") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.tee $1 - local.get $0 - i32.const 1 - local.get $0 - i32.const 1 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const -8 - i32.and - local.tee $2 - current_memory - local.tee $3 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $3 - local.get $2 - local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $0 - local.get $3 - local.get $0 - i32.gt_s - select - grow_memory - i32.const 0 - i32.lt_s - if - local.get $0 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $2 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 216 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - i32.const 1 - i32.const 32 - local.get $0 - i32.const 7 - i32.add - i32.clz - i32.sub - i32.shl - call $~lib/allocator/arena/__memory_allocate - local.tee $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/internal/memory/memcpy (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $continue|0 - local.get $1 - i32.const 3 - i32.and - local.get $2 - local.get $2 - select - if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - local.get $0 - i32.const 3 - i32.and - local.tee $3 - i32.const 1 - i32.ne - if - local.get $3 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $3 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - local.tee $3 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $1 - local.set $0 - local.get $1 - local.get $3 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 13 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 15 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - local.tee $3 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $1 - local.set $0 - local.get $1 - local.get $3 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - local.tee $3 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $1 - local.set $0 - local.get $1 - local.get $3 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - local.tee $3 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $1 - local.set $0 - local.get $1 - local.get $3 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/internal/memory/memmove (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - local.set $3 - end - local.get $3 - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 - end - end - end - loop $continue|2 - local.get $2 - if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|3 - end - end - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - br $continue|4 - end - end - end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - ) - (func $~lib/internal/memory/memset (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $1 - i32.eqz - if - return - end - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $2 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - local.get $0 - i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $1 - local.get $0 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 16 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 20 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $2 - local.get $0 - i32.add - local.set $0 - local.get $1 - local.get $2 - i32.sub - local.set $1 - loop $continue|0 - 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 - ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - local.get $0 - i32.load - local.tee $2 - i32.gt_s - if - local.get $1 - i32.const 1073741816 - i32.gt_s - if - i32.const 0 - i32.const 216 - i32.const 40 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 1 - i32.const 32 - local.get $2 - i32.const 7 - i32.add - i32.clz - i32.sub - i32.shl - i32.const 8 - i32.sub - i32.le_s - if - local.get $0 - local.get $1 - i32.store - else - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $3 - i32.const 8 - i32.add - local.get $0 - i32.const 8 - i32.add - local.get $2 - call $~lib/internal/memory/memmove - local.get $3 - local.set $0 - end - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.sub - call $~lib/internal/memory/memset - else - local.get $1 - local.get $2 - i32.lt_s - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 0 - i32.const 216 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - i32.store - end - end - local.get $0 - ) - (func $~lib/array/Array#__set (; 7 ;) (type $FUNCSIG$v) - (local $0 i32) - i32.const 0 - i32.const 24 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.ge_u - if - i32.const 24 - local.get $0 - i32.const 4 - call $~lib/internal/arraybuffer/reallocateUnsafe - local.tee $0 - i32.store - i32.const 28 - i32.const 1 - i32.store - end - local.get $0 - i32.const 2 - i32.store offset=8 - ) - (func $~lib/array/Array#__set (; 8 ;) (type $FUNCSIG$v) - (local $0 i32) - i32.const 0 - i32.const 64 - i32.load - local.tee $0 - i32.load - i32.const 3 - i32.shr_u - i32.ge_u - if - i32.const 64 - local.get $0 - i32.const 8 - call $~lib/internal/arraybuffer/reallocateUnsafe - local.tee $0 - i32.store - i32.const 68 - i32.const 1 - i32.store - end - local.get $0 - i64.const 4 - i64.store offset=8 - ) - (func $~lib/array/Array#__set (; 9 ;) (type $FUNCSIG$v) - (local $0 i32) - i32.const 0 - i32.const 88 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.ge_u - if - i32.const 88 - local.get $0 - i32.const 4 - call $~lib/internal/arraybuffer/reallocateUnsafe - local.tee $0 - i32.store - i32.const 92 - i32.const 1 - i32.store - end - local.get $0 - f32.const 2.5 - f32.store offset=8 - ) - (func $~lib/array/Array#__set (; 10 ;) (type $FUNCSIG$v) - (local $0 i32) - i32.const 0 - i32.const 128 - i32.load - local.tee $0 - i32.load - i32.const 3 - i32.shr_u - i32.ge_u - if - i32.const 128 - local.get $0 - i32.const 8 - call $~lib/internal/arraybuffer/reallocateUnsafe - local.tee $0 - i32.store - i32.const 132 - i32.const 1 - i32.store - end - local.get $0 - f64.const 2.25 - f64.store offset=8 - ) - (func $start:std/static-array (; 11 ;) (type $FUNCSIG$v) - (local $0 i32) - i32.const 280 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - i32.const 28 + (func $start:std/static-array (; 1 ;) (type $FUNCSIG$v) + i32.const 44 i32.load i32.const 2 i32.ne if i32.const 0 - i32.const 136 + i32.const 192 i32.const 8 i32.const 0 call $~lib/env/abort unreachable end - i32.const 0 - i32.const 24 + i32.const 36 i32.load - local.tee $0 i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 1 i32.ne if i32.const 0 - i32.const 136 + i32.const 192 i32.const 9 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1 - i32.const 24 + i32.const 36 i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 i32.const 2 i32.ne if i32.const 0 - i32.const 136 + i32.const 192 i32.const 10 i32.const 0 call $~lib/env/abort unreachable end - call $~lib/array/Array#__set - i32.const 0 - i32.const 24 - i32.load - local.tee $0 + i32.const 36 i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.store + i32.const 36 + i32.load + i32.load i32.const 2 i32.ne if i32.const 0 - i32.const 136 + i32.const 192 i32.const 12 i32.const 0 call $~lib/env/abort unreachable end - i32.const 68 + i32.const 92 i32.load i32.const 2 i32.ne if i32.const 0 - i32.const 136 + i32.const 192 i32.const 14 i32.const 0 call $~lib/env/abort unreachable end - i32.const 0 - i32.const 64 - i32.load - local.tee $0 + i32.const 84 i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result i64) - local.get $0 - i64.load offset=8 - else - unreachable - end + i64.load i64.const 3 i64.ne if i32.const 0 - i32.const 136 + i32.const 192 i32.const 15 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1 - i32.const 64 - i32.load - local.tee $0 + i32.const 84 i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result i64) - local.get $0 - i32.const 8 - i32.add - i64.load offset=8 - else - unreachable - end + i64.load offset=8 i64.const 4 i64.ne if i32.const 0 - i32.const 136 + i32.const 192 i32.const 16 i32.const 0 call $~lib/env/abort unreachable end - call $~lib/array/Array#__set - i32.const 0 - i32.const 64 + i32.const 84 i32.load - local.tee $0 + i64.const 4 + i64.store + i32.const 84 i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result i64) - local.get $0 - i64.load offset=8 - else - unreachable - end + i64.load i64.const 4 i64.ne if i32.const 0 - i32.const 136 + i32.const 192 i32.const 18 i32.const 0 call $~lib/env/abort unreachable end - i32.const 92 + i32.const 132 i32.load i32.const 2 i32.ne if i32.const 0 - i32.const 136 + i32.const 192 i32.const 20 i32.const 0 call $~lib/env/abort unreachable end - i32.const 0 - i32.const 88 - i32.load - local.tee $0 + i32.const 124 i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result f32) - local.get $0 - f32.load offset=8 - else - unreachable - end + f32.load f32.const 1.5 f32.ne if i32.const 0 - i32.const 136 + i32.const 192 i32.const 21 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1 - i32.const 88 - i32.load - local.tee $0 + i32.const 124 i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result f32) - local.get $0 - i32.const 4 - i32.add - f32.load offset=8 - else - unreachable - end + f32.load offset=4 f32.const 2.5 f32.ne if i32.const 0 - i32.const 136 + i32.const 192 i32.const 22 i32.const 0 call $~lib/env/abort unreachable end - call $~lib/array/Array#__set - i32.const 0 - i32.const 88 + i32.const 124 i32.load - local.tee $0 + f32.const 2.5 + f32.store + i32.const 124 i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result f32) - local.get $0 - f32.load offset=8 - else - unreachable - end + f32.load f32.const 2.5 f32.ne if i32.const 0 - i32.const 136 + i32.const 192 i32.const 24 i32.const 0 call $~lib/env/abort unreachable end - i32.const 132 + i32.const 180 i32.load i32.const 2 i32.ne if i32.const 0 - i32.const 136 + i32.const 192 i32.const 26 i32.const 0 call $~lib/env/abort unreachable end - i32.const 0 - i32.const 128 - i32.load - local.tee $0 + i32.const 172 i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result f64) - local.get $0 - f64.load offset=8 - else - unreachable - end + f64.load f64.const 1.25 f64.ne if i32.const 0 - i32.const 136 + i32.const 192 i32.const 27 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1 - i32.const 128 + i32.const 172 i32.load - local.tee $0 - i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result f64) - local.get $0 - i32.const 8 - i32.add - f64.load offset=8 - else - unreachable - end + f64.load offset=8 f64.const 2.25 f64.ne if i32.const 0 - i32.const 136 + i32.const 192 i32.const 28 i32.const 0 call $~lib/env/abort unreachable end - call $~lib/array/Array#__set - i32.const 0 - i32.const 128 + i32.const 172 i32.load - local.tee $0 + f64.const 2.25 + f64.store + i32.const 172 i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result f64) - local.get $0 - f64.load offset=8 - else - unreachable - end + f64.load f64.const 2.25 f64.ne if i32.const 0 - i32.const 136 + i32.const 192 i32.const 30 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 12 ;) (type $FUNCSIG$v) + (func $start (; 2 ;) (type $FUNCSIG$v) call $start:std/static-array ) - (func $null (; 13 ;) (type $FUNCSIG$v) + (func $null (; 3 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 266fc608ab..9a06134cd6 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -1,2624 +1,288 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$jii (func (param i32 i32) (result i64))) - (type $FUNCSIG$viij (func (param i32 i32 i64))) - (type $FUNCSIG$fii (func (param i32 i32) (result f32))) - (type $FUNCSIG$viif (func (param i32 i32 f32))) - (type $FUNCSIG$dii (func (param i32 i32) (result f64))) - (type $FUNCSIG$viid (func (param i32 i32 f64))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\08\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 24) "\08\00\00\00\02\00\00\00") - (data (i32.const 32) "\10\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 64) " \00\00\00\02\00\00\00") - (data (i32.const 72) "\08\00\00\00\00\00\00\00\00\00\c0?\00\00 @") - (data (i32.const 88) "H\00\00\00\02\00\00\00") - (data (i32.const 96) "\10\00\00\00\00\00\00\00\00\00\00\00\00\00\f4?\00\00\00\00\00\00\02@\00\00\00\00\00\00\00\00") - (data (i32.const 128) "`\00\00\00\02\00\00\00") - (data (i32.const 136) "\13\00\00\00s\00t\00d\00/\00s\00t\00a\00t\00i\00c\00-\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 184) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 216) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\18\00\00\00\02\00\00\00") + (data (i32.const 48) "\01\00\00\00\10\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00") + (data (i32.const 72) "\03\00\00\00\10\00\00\008\00\00\008\00\00\00H\00\00\00\02\00\00\00") + (data (i32.const 96) "\01\00\00\00\08\00\00\00\00\00\c0?\00\00 @") + (data (i32.const 112) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00p\00\00\00\02\00\00\00") + (data (i32.const 136) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\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\a0\00\00\00\02\00\00\00") + (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\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $std/static-array/i i32 (i32.const 24)) - (global $std/static-array/I i32 (i32.const 64)) - (global $std/static-array/f i32 (i32.const 88)) - (global $std/static-array/F i32 (i32.const 128)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 276)) + (global $std/static-array/i i32 (i32.const 32)) + (global $std/static-array/I i32 (i32.const 80)) + (global $std/static-array/f i32 (i32.const 120)) + (global $std/static-array/F i32 (i32.const 168)) + (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/memory/HEAP_BASE i32 (i32.const 232)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $~lib/array/Array#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 8 - i32.add - i32.const 1 - i32.sub - i32.clz - i32.sub - i32.shl - ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 - local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $2 - local.get $5 - local.tee $3 - local.get $2 - local.tee $6 - local.get $3 - local.get $6 - i32.gt_s - select - local.set $3 - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - local.get $2 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 216 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end - local.set $1 - local.get $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/internal/memory/memcpy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - ) - (func $~lib/internal/memory/memmove (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - end - i32.load8_u - i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - br $continue|1 - end - end - end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|2 - end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - end - br $continue|3 - end - end - end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 - end - end - end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - end - ) - (func $~lib/allocator/arena/__memory_free (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/internal/memory/memset (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i64) - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - end - br $continue|0 - end - end - end - ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.gt_s - if - local.get $1 - i32.const 1073741816 - i32.le_s - i32.eqz - if - i32.const 0 - i32.const 216 - i32.const 40 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - local.get $2 - call $~lib/internal/arraybuffer/computeSize - i32.const 8 - i32.sub - i32.le_s - if - local.get $0 - local.get $1 - i32.store - else - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.copy|inlined.0 - local.get $3 - i32.const 8 - i32.add - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memmove - end - block $~lib/memory/memory.free|inlined.0 - local.get $0 - local.set $6 - local.get $6 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 - end - local.get $3 - local.set $0 - end - block $~lib/memory/memory.fill|inlined.0 - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.add - local.set $3 - i32.const 0 - local.set $6 - local.get $1 - local.get $2 - i32.sub - local.set $5 - local.get $3 - local.get $6 - local.get $5 - call $~lib/internal/memory/memset - end - else - local.get $1 - local.get $2 - i32.lt_s - if - local.get $1 - i32.const 0 - i32.ge_s - i32.eqz - if - i32.const 0 - i32.const 216 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - i32.store - end - end - local.get $0 - ) - (func $~lib/array/Array#__set (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 - i32.load - local.set $3 - local.get $3 - i32.load - i32.const 2 - i32.shr_u - local.set $4 - local.get $1 - local.get $4 - i32.ge_u - if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 184 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $3 - local.set $5 - local.get $1 - local.set $6 - local.get $2 - local.set $7 - i32.const 0 - local.set $8 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $7 - i32.store offset=8 - end - ) - (func $~lib/array/Array#__get (; 12 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result i64) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 3 - i32.shl - i32.add - local.get $5 - i32.add - i64.load offset=8 - else - unreachable - end - ) - (func $~lib/array/Array#__set (; 13 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i64) - (local $8 i32) + (func $~lib/array/Array#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $3 - local.get $3 - i32.load - i32.const 3 - i32.shr_u - local.set $4 - local.get $1 - local.get $4 - i32.ge_u - if - local.get $1 - i32.const 134217727 - i32.ge_u - if - i32.const 0 - i32.const 184 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 1 - i32.add - i32.const 3 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $3 - local.set $5 - local.get $1 - local.set $6 - local.get $2 - local.set $7 - i32.const 0 - local.set $8 - local.get $5 - local.get $6 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - local.get $7 - i64.store offset=8 - end + i32.load offset=12 ) - (func $~lib/array/Array#__get (; 14 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#get:length (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result f32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - f32.load offset=8 - else - unreachable - end + i32.load offset=12 ) - (func $~lib/array/Array#__set (; 15 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 f32) - (local $8 i32) + (func $~lib/array/Array#get:length (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $3 - local.get $3 - i32.load - i32.const 2 - i32.shr_u - local.set $4 - local.get $1 - local.get $4 - i32.ge_u - if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 184 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $3 - local.set $5 - local.get $1 - local.set $6 - local.get $2 - local.set $7 - i32.const 0 - local.set $8 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $7 - f32.store offset=8 - end + i32.load offset=12 ) - (func $~lib/array/Array#__get (; 16 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#get:length (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result f64) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 3 - i32.shl - i32.add - local.get $5 - i32.add - f64.load offset=8 - else - unreachable - end + i32.load offset=12 ) - (func $~lib/array/Array#__set (; 17 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 f64) - (local $8 i32) - local.get $0 - i32.load - local.set $3 - local.get $3 - i32.load - i32.const 3 - i32.shr_u - local.set $4 - local.get $1 - local.get $4 - i32.ge_u - if - local.get $1 - i32.const 134217727 - i32.ge_u - if - i32.const 0 - i32.const 184 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 1 - i32.add - i32.const 3 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $3 - local.set $5 - local.get $1 - local.set $6 - local.get $2 - local.set $7 - i32.const 0 - local.set $8 - local.get $5 - local.get $6 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - local.get $7 - f64.store offset=8 - end - ) - (func $start:std/static-array (; 18 ;) (type $FUNCSIG$v) - (local $0 i32) - call $start:~lib/allocator/arena - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/static-array/i - local.set $0 - local.get $0 - i32.load offset=4 - end + (func $start:std/static-array (; 5 ;) (type $FUNCSIG$v) + global.get $std/static-array/i + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 136 + i32.const 192 i32.const 8 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/i - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 136 + i32.const 192 i32.const 9 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/i - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load offset=4 i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 136 + i32.const 192 i32.const 10 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/i - i32.const 0 + i32.load offset=4 i32.const 2 - call $~lib/array/Array#__set + i32.store global.get $std/static-array/i - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 136 + i32.const 192 i32.const 12 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/static-array/I - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/static-array/I + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 136 + i32.const 192 i32.const 14 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/I - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i64.load i64.const 3 i64.eq i32.eqz if i32.const 0 - i32.const 136 + i32.const 192 i32.const 15 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/I - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + i64.load offset=8 i64.const 4 i64.eq i32.eqz if i32.const 0 - i32.const 136 + i32.const 192 i32.const 16 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/I - i32.const 0 + i32.load offset=4 i64.const 4 - call $~lib/array/Array#__set + i64.store global.get $std/static-array/I - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i64.load i64.const 4 i64.eq i32.eqz if i32.const 0 - i32.const 136 + i32.const 192 i32.const 18 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/static-array/f - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/static-array/f + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 136 + i32.const 192 i32.const 20 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/f - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + f32.load f32.const 1.5 f32.eq i32.eqz if i32.const 0 - i32.const 136 + i32.const 192 i32.const 21 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/f - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + f32.load offset=4 f32.const 2.5 f32.eq i32.eqz if i32.const 0 - i32.const 136 + i32.const 192 i32.const 22 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/f - i32.const 0 + i32.load offset=4 f32.const 2.5 - call $~lib/array/Array#__set + f32.store global.get $std/static-array/f - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + f32.load f32.const 2.5 f32.eq i32.eqz if i32.const 0 - i32.const 136 + i32.const 192 i32.const 24 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/static-array/F - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/static-array/F + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 136 + i32.const 192 i32.const 26 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/F - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + f64.load f64.const 1.25 f64.eq i32.eqz if i32.const 0 - i32.const 136 + i32.const 192 i32.const 27 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/F - i32.const 1 - call $~lib/array/Array#__get + i32.load offset=4 + f64.load offset=8 f64.const 2.25 f64.eq i32.eqz if i32.const 0 - i32.const 136 + i32.const 192 i32.const 28 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/F - i32.const 0 + i32.load offset=4 f64.const 2.25 - call $~lib/array/Array#__set + f64.store global.get $std/static-array/F - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + f64.load f64.const 2.25 f64.eq i32.eqz if i32.const 0 - i32.const 136 + i32.const 192 i32.const 30 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 19 ;) (type $FUNCSIG$v) + (func $start (; 6 ;) (type $FUNCSIG$v) call $start:std/static-array ) - (func $null (; 20 ;) (type $FUNCSIG$v) + (func $null (; 7 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index 716b03fb58..5af6304348 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -1,26 +1,28 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\06\00\00\00\01\d87\dch\00i\00R\d8b\df") - (data (i32.const 24) "\12\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s") - (data (i32.const 72) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 104) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 160) "\02\00\00\00\01\d87\dc") - (data (i32.const 168) "\02\00\00\00h\00i") - (data (i32.const 176) "\02\00\00\00R\d8b\df") - (data (i32.const 184) "\01") + (data (i32.const 8) "\01\00\00\00\0c\00\00\00\01\d87\dch\00i\00R\d8b\df") + (data (i32.const 32) "\01\00\00\00$\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s") + (data (i32.const 80) "\01") + (data (i32.const 88) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 128) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 168) "\01\00\00\00\04\00\00\00\01\d87\dc") + (data (i32.const 184) "\01\00\00\00\04\00\00\00h\00i") + (data (i32.const 200) "\01\00\00\00\04\00\00\00R\d8b\df") + (data (i32.const 216) "\01\00\00\00\02") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $std/string-utf8/str (mut i32) (i32.const 16)) + (global $std/string-utf8/len (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 $std/string-utf8/str (mut i32) (i32.const 8)) - (global $std/string-utf8/len (mut i32) (i32.const 0)) (global $std/string-utf8/ptr (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -33,7 +35,11 @@ i32.const 1 local.set $1 local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.set $4 loop $continue|0 local.get $2 @@ -45,7 +51,7 @@ i32.shl local.get $0 i32.add - i32.load16_u offset=4 + i32.load16_u local.tee $3 i32.const 128 i32.lt_u @@ -70,22 +76,24 @@ i32.const 1 i32.add else - local.get $3 - i32.const 64512 - i32.and - i32.const 55296 - i32.eq - local.tee $3 - if - local.get $2 - i32.const 1 - i32.add - local.get $4 - i32.lt_u - local.set $3 + block (result i32) + local.get $3 + i32.const 64512 + i32.and + i32.const 55296 + i32.eq + local.tee $3 + if + local.get $2 + i32.const 1 + i32.add + local.get $4 + i32.lt_u + local.set $3 + end + local.get $3 end - local.get $3 - if + if (result i32) local.get $2 i32.const 1 i32.add @@ -93,14 +101,14 @@ i32.shl local.get $0 i32.add - i32.load16_u offset=4 + i32.load16_u i32.const 64512 i32.and i32.const 56320 i32.eq - local.set $3 + else + local.get $3 end - local.get $3 if (result i32) local.get $1 i32.const 4 @@ -126,7 +134,7 @@ end local.get $1 ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -149,15 +157,15 @@ i32.add i32.const -8 i32.and - local.tee $2 + local.tee $0 current_memory - local.tee $3 + local.tee $2 i32.const 16 i32.shl i32.gt_u if - local.get $3 local.get $2 + local.get $0 local.get $1 i32.sub i32.const 65535 @@ -166,16 +174,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 + local.tee $3 + local.get $2 local.get $3 - local.get $0 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $0 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -184,7 +192,7 @@ end end end - local.get $2 + local.get $0 global.set $~lib/allocator/arena/offset local.get $1 ) @@ -198,26 +206,30 @@ (local $7 i32) local.get $0 call $~lib/string/String#get:lengthUTF8 - call $~lib/allocator/arena/__memory_allocate + call $~lib/memory/memory.allocate local.set $5 local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.set $7 loop $continue|0 - local.get $3 + local.get $4 local.get $7 i32.lt_u if - local.get $3 + local.get $4 i32.const 1 i32.shl local.get $0 i32.add - i32.load16_u offset=4 + i32.load16_u local.tee $1 i32.const 128 i32.lt_u - if + if (result i32) local.get $2 local.get $5 i32.add @@ -226,23 +238,22 @@ local.get $2 i32.const 1 i32.add - local.set $2 else local.get $1 i32.const 2048 i32.lt_u - if + if (result i32) local.get $2 local.get $5 i32.add - local.tee $4 + local.tee $3 local.get $1 i32.const 6 i32.shr_u i32.const 192 i32.or i32.store8 - local.get $4 + local.get $3 local.get $1 i32.const 63 i32.and @@ -252,43 +263,42 @@ local.get $2 i32.const 2 i32.add - local.set $2 else local.get $2 local.get $5 i32.add - local.set $4 + local.set $3 local.get $1 i32.const 64512 i32.and i32.const 55296 i32.eq local.tee $6 - if - local.get $3 + if (result i32) + local.get $4 i32.const 1 i32.add local.get $7 i32.lt_u - local.set $6 + else + local.get $6 end - local.get $6 if - local.get $3 + local.get $4 i32.const 1 i32.add i32.const 1 i32.shl local.get $0 i32.add - i32.load16_u offset=4 + i32.load16_u local.tee $6 i32.const 64512 i32.and i32.const 56320 i32.eq if - local.get $4 + local.get $3 local.get $1 i32.const 1023 i32.and @@ -306,7 +316,7 @@ i32.const 240 i32.or i32.store8 - local.get $4 + local.get $3 local.get $1 i32.const 12 i32.shr_u @@ -315,7 +325,7 @@ i32.const 128 i32.or i32.store8 offset=1 - local.get $4 + local.get $3 local.get $1 i32.const 6 i32.shr_u @@ -324,7 +334,7 @@ i32.const 128 i32.or i32.store8 offset=2 - local.get $4 + local.get $3 local.get $1 i32.const 63 i32.and @@ -335,21 +345,21 @@ i32.const 4 i32.add local.set $2 - local.get $3 + local.get $4 i32.const 2 i32.add - local.set $3 + local.set $4 br $continue|0 end end - local.get $4 + local.get $3 local.get $1 i32.const 12 i32.shr_u i32.const 224 i32.or i32.store8 - local.get $4 + local.get $3 local.get $1 i32.const 6 i32.shr_u @@ -358,7 +368,7 @@ i32.const 128 i32.or i32.store8 offset=1 - local.get $4 + local.get $3 local.get $1 i32.const 63 i32.and @@ -368,13 +378,13 @@ local.get $2 i32.const 3 i32.add - local.set $2 end end - local.get $3 + local.set $2 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $continue|0 end end @@ -385,40 +395,28 @@ i32.store8 local.get $5 ) - (func $~lib/internal/string/allocateUnsafe (; 4 ;) (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.get $0 - i32.const 0 - i32.gt_s - local.tee $1 - if - local.get $0 - i32.const 536870910 - i32.le_s - local.set $1 - end - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 104 - i32.const 14 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 i32.const 1 - i32.shl - i32.const 4 + i32.const 32 + local.get $0 + i32.const 7 i32.add - call $~lib/allocator/arena/__memory_allocate + i32.clz + i32.sub + i32.shl + call $~lib/memory/memory.allocate local.tee $1 - local.get $0 + i32.const -1520547049 i32.store local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add ) - (func $~lib/internal/memory/memcpy (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1315,64 +1313,106 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if + block $~lib/util/memory/memmove|inlined.0 local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $1 local.get $2 i32.add - local.get $1 + local.get $0 i32.le_u - local.set $3 - end - local.get $3 - if + local.tee $3 + i32.eqz + if + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + local.set $3 + end + local.get $3 + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end local.get $0 local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq + i32.lt_u if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and if - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + br $continue|0 end + end + loop $continue|1 local.get $2 - i32.const 1 - i32.sub - local.set $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if local.get $0 local.tee $4 i32.const 1 @@ -1387,100 +1427,71 @@ local.get $3 i32.load8_u i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store local.get $2 - i32.const 8 + i32.const 1 i32.sub local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 + br $continue|2 end end - end - loop $continue|2 - local.get $2 + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if + loop $continue|3 + local.get $0 local.get $2 - i32.eqz + i32.add + i32.const 7 + i32.and if - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 end + end + loop $continue|4 local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|3 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end end end - loop $continue|4 + loop $continue|5 local.get $2 - i32.const 8 - i32.ge_u if local.get $2 - i32.const 8 + i32.const 1 i32.sub local.tee $2 local.get $0 @@ -1488,32 +1499,42 @@ local.get $1 local.get $2 i32.add - i64.load - i64.store - br $continue|4 + i32.load8_u + i32.store8 + br $continue|5 end end end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end end ) - (func $~lib/string/String.fromUTF8 (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/assertUnregistered (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 228 + i32.le_u + if + i32.const 0 + i32.const 136 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 8 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 136 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/string/String.fromUTF8 (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1523,13 +1544,13 @@ i32.const 1 i32.lt_u if - i32.const 64 + i32.const 88 return end local.get $1 i32.const 1 i32.shl - call $~lib/allocator/arena/__memory_allocate + call $~lib/memory/memory.allocate local.set $5 loop $continue|0 local.get $2 @@ -1574,8 +1595,8 @@ i32.gt_u if i32.const 0 - i32.const 72 - i32.const 507 + i32.const 96 + i32.const 447 i32.const 8 call $~lib/env/abort unreachable @@ -1621,8 +1642,8 @@ i32.gt_u if i32.const 0 - i32.const 72 - i32.const 511 + i32.const 96 + i32.const 451 i32.const 8 call $~lib/env/abort unreachable @@ -1694,8 +1715,8 @@ i32.gt_u if i32.const 0 - i32.const 72 - i32.const 523 + i32.const 96 + i32.const 463 i32.const 8 call $~lib/env/abort unreachable @@ -1747,33 +1768,36 @@ i32.ne if i32.const 0 - i32.const 72 - i32.const 532 + i32.const 96 + i32.const 472 i32.const 4 call $~lib/env/abort unreachable end local.get $4 - i32.const 1 - i32.shr_u - call $~lib/internal/string/allocateUnsafe - local.tee $0 - i32.const 4 - i32.add + call $~lib/runtime/doAllocate + local.tee $3 local.get $5 local.get $4 - call $~lib/internal/memory/memmove - local.get $0 + call $~lib/memory/memory.copy + local.get $3 + call $~lib/runtime/assertUnregistered + local.get $3 + i32.const 8 + i32.sub + i32.const 1 + i32.store + local.get $3 ) - (func $~lib/internal/string/compareUnsafe (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 if (result i32) local.get $0 - i32.load16_u offset=4 + i32.load16_u local.get $1 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $3 i32.eqz @@ -1798,7 +1822,7 @@ end local.get $3 ) - (func $~lib/string/String.__eq (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.eq (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1810,22 +1834,29 @@ local.get $0 i32.eqz local.tee $2 - i32.eqz - if + if (result i32) + local.get $2 + else local.get $1 i32.eqz - local.set $2 end - local.get $2 if i32.const 0 return end local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u i32.ne if i32.const 0 @@ -1834,14 +1865,10 @@ local.get $0 local.get $1 local.get $2 - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.eqz ) - (func $start:std/string-utf8 (; 10 ;) (type $FUNCSIG$v) - i32.const 192 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset + (func $start:std/string-utf8 (; 11 ;) (type $FUNCSIG$v) global.get $std/string-utf8/str call $~lib/string/String#get:lengthUTF8 global.set $std/string-utf8/len @@ -1850,12 +1877,16 @@ i32.ne if i32.const 0 - i32.const 24 + i32.const 40 i32.const 7 i32.const 0 call $~lib/env/abort unreachable end + i32.const 232 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset global.get $std/string-utf8/str call $~lib/string/String#toUTF8 global.set $std/string-utf8/ptr @@ -1865,7 +1896,7 @@ i32.ne if i32.const 0 - i32.const 24 + i32.const 40 i32.const 11 i32.const 0 call $~lib/env/abort @@ -1877,7 +1908,7 @@ i32.ne if i32.const 0 - i32.const 24 + i32.const 40 i32.const 12 i32.const 0 call $~lib/env/abort @@ -1889,7 +1920,7 @@ i32.ne if i32.const 0 - i32.const 24 + i32.const 40 i32.const 13 i32.const 0 call $~lib/env/abort @@ -1901,7 +1932,7 @@ i32.ne if i32.const 0 - i32.const 24 + i32.const 40 i32.const 14 i32.const 0 call $~lib/env/abort @@ -1913,7 +1944,7 @@ i32.ne if i32.const 0 - i32.const 24 + i32.const 40 i32.const 15 i32.const 0 call $~lib/env/abort @@ -1925,7 +1956,7 @@ i32.ne if i32.const 0 - i32.const 24 + i32.const 40 i32.const 16 i32.const 0 call $~lib/env/abort @@ -1937,7 +1968,7 @@ i32.ne if i32.const 0 - i32.const 24 + i32.const 40 i32.const 17 i32.const 0 call $~lib/env/abort @@ -1949,7 +1980,7 @@ i32.ne if i32.const 0 - i32.const 24 + i32.const 40 i32.const 18 i32.const 0 call $~lib/env/abort @@ -1961,7 +1992,7 @@ i32.ne if i32.const 0 - i32.const 24 + i32.const 40 i32.const 19 i32.const 0 call $~lib/env/abort @@ -1973,7 +2004,7 @@ i32.ne if i32.const 0 - i32.const 24 + i32.const 40 i32.const 20 i32.const 0 call $~lib/env/abort @@ -1983,7 +2014,7 @@ i32.load8_u offset=10 if i32.const 0 - i32.const 24 + i32.const 40 i32.const 21 i32.const 0 call $~lib/env/abort @@ -1992,12 +2023,12 @@ global.get $std/string-utf8/ptr i32.const 0 call $~lib/string/String.fromUTF8 - i32.const 64 - call $~lib/string/String.__eq + i32.const 88 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 23 i32.const 0 call $~lib/env/abort @@ -2009,11 +2040,11 @@ i32.sub call $~lib/string/String.fromUTF8 global.get $std/string-utf8/str - call $~lib/string/String.__eq + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 24 i32.const 0 call $~lib/env/abort @@ -2022,12 +2053,12 @@ global.get $std/string-utf8/ptr i32.const 4 call $~lib/string/String.fromUTF8 - i32.const 160 - call $~lib/string/String.__eq + i32.const 176 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 25 i32.const 0 call $~lib/env/abort @@ -2038,12 +2069,12 @@ i32.add i32.const 2 call $~lib/string/String.fromUTF8 - i32.const 168 - call $~lib/string/String.__eq + i32.const 192 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 26 i32.const 0 call $~lib/env/abort @@ -2054,12 +2085,12 @@ i32.add i32.const 4 call $~lib/string/String.fromUTF8 - i32.const 176 - call $~lib/string/String.__eq + i32.const 208 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 27 i32.const 0 call $~lib/env/abort @@ -2070,22 +2101,22 @@ i32.add i32.const 1 call $~lib/string/String.fromUTF8 - i32.const 184 - call $~lib/string/String.__eq + i32.const 224 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 28 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 11 ;) (type $FUNCSIG$v) + (func $start (; 12 ;) (type $FUNCSIG$v) call $start:std/string-utf8 ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 13 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index f5568db26b..b8d0129894 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -1,44 +1,44 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\06\00\00\00\01\d87\dch\00i\00R\d8b\df") - (data (i32.const 24) "\12\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s\00") - (data (i32.const 64) "\00\00\00\00") - (data (i32.const 72) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 104) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 160) "\02\00\00\00\01\d87\dc") - (data (i32.const 168) "\02\00\00\00h\00i\00") - (data (i32.const 176) "\02\00\00\00R\d8b\df") - (data (i32.const 184) "\01\00\00\00\00\00") + (data (i32.const 8) "\01\00\00\00\0c\00\00\00\01\d87\dch\00i\00R\d8b\df") + (data (i32.const 32) "\01\00\00\00$\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s\00") + (data (i32.const 80) "\01\00\00\00\00\00\00\00") + (data (i32.const 88) "\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 128) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 168) "\01\00\00\00\04\00\00\00\01\d87\dc") + (data (i32.const 184) "\01\00\00\00\04\00\00\00h\00i\00") + (data (i32.const 200) "\01\00\00\00\04\00\00\00R\d8b\df") + (data (i32.const 216) "\01\00\00\00\02\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $std/string-utf8/str (mut i32) (i32.const 16)) + (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 $std/string-utf8/len (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 $std/string-utf8/str (mut i32) (i32.const 8)) - (global $std/string-utf8/len (mut i32) (i32.const 0)) (global $std/string-utf8/ptr (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 192)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 228)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset + (func $~lib/string/String#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u ) (func $~lib/string/String#get:lengthUTF8 (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -51,7 +51,7 @@ i32.const 0 local.set $2 local.get $0 - i32.load + call $~lib/string/String#get:length local.set $3 block $break|0 loop $continue|0 @@ -65,7 +65,7 @@ i32.const 1 i32.shl i32.add - i32.load16_u offset=4 + i32.load16_u local.set $4 local.get $4 i32.const 128 @@ -117,7 +117,7 @@ i32.const 1 i32.shl i32.add - i32.load16_u offset=4 + i32.load16_u i32.const 64512 i32.and i32.const 56320 @@ -153,84 +153,90 @@ end local.get $1 ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 + return ) (func $~lib/string/String#toUTF8 (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -240,113 +246,108 @@ (local $5 i32) (local $6 i32) (local $7 i32) - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/string/String#get:lengthUTF8 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end - local.set $2 + local.get $0 + call $~lib/string/String#get:lengthUTF8 + call $~lib/memory/memory.allocate + local.set $1 i32.const 0 - local.set $3 + local.set $2 local.get $0 - i32.load - local.set $4 + call $~lib/string/String#get:length + local.set $3 i32.const 0 - local.set $5 + local.set $4 block $break|0 loop $continue|0 + local.get $2 local.get $3 - local.get $4 i32.lt_u if block local.get $0 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.add - i32.load16_u offset=4 - local.set $1 - local.get $1 + i32.load16_u + local.set $5 + local.get $5 i32.const 128 i32.lt_u if - local.get $2 - local.get $5 - i32.add local.get $1 - i32.store8 + local.get $4 + i32.add local.get $5 + i32.store8 + local.get $4 i32.const 1 i32.add - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 else - local.get $1 + local.get $5 i32.const 2048 i32.lt_u if - local.get $2 - local.get $5 + local.get $1 + local.get $4 i32.add local.set $6 local.get $6 - local.get $1 + local.get $5 i32.const 6 i32.shr_u i32.const 192 i32.or i32.store8 local.get $6 - local.get $1 + local.get $5 i32.const 63 i32.and i32.const 128 i32.or i32.store8 offset=1 - local.get $5 + local.get $4 i32.const 2 i32.add - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 else - local.get $2 - local.get $5 + local.get $1 + local.get $4 i32.add local.set $6 - local.get $1 + local.get $5 i32.const 64512 i32.and i32.const 55296 i32.eq local.tee $7 if (result i32) - local.get $3 + local.get $2 i32.const 1 i32.add - local.get $4 + local.get $3 i32.lt_u else local.get $7 end if local.get $0 - local.get $3 + local.get $2 i32.const 1 i32.add i32.const 1 i32.shl i32.add - i32.load16_u offset=4 + i32.load16_u local.set $7 local.get $7 i32.const 64512 @@ -355,7 +356,7 @@ i32.eq if i32.const 65536 - local.get $1 + local.get $5 i32.const 1023 i32.and i32.const 10 @@ -365,16 +366,16 @@ i32.const 1023 i32.and i32.add - local.set $1 + local.set $5 local.get $6 - local.get $1 + local.get $5 i32.const 18 i32.shr_u i32.const 240 i32.or i32.store8 local.get $6 - local.get $1 + local.get $5 i32.const 12 i32.shr_u i32.const 63 @@ -383,7 +384,7 @@ i32.or i32.store8 offset=1 local.get $6 - local.get $1 + local.get $5 i32.const 6 i32.shr_u i32.const 63 @@ -392,32 +393,32 @@ i32.or i32.store8 offset=2 local.get $6 - local.get $1 + local.get $5 i32.const 63 i32.and i32.const 128 i32.or i32.store8 offset=3 - local.get $5 + local.get $4 i32.const 4 i32.add - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 2 i32.add - local.set $3 + local.set $2 br $continue|0 end end local.get $6 - local.get $1 + local.get $5 i32.const 12 i32.shr_u i32.const 224 i32.or i32.store8 local.get $6 - local.get $1 + local.get $5 i32.const 6 i32.shr_u i32.const 63 @@ -426,20 +427,20 @@ i32.or i32.store8 offset=1 local.get $6 - local.get $1 + local.get $5 i32.const 63 i32.and i32.const 128 i32.or i32.store8 offset=2 - local.get $5 + local.get $4 i32.const 3 i32.add - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 end end end @@ -447,54 +448,42 @@ end end end - local.get $2 - local.get $5 + local.get $1 + local.get $4 i32.add i32.const 0 i32.store8 - local.get $2 + local.get $1 ) - (func $~lib/internal/string/allocateUnsafe (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 local.get $0 - i32.const 0 - i32.gt_s - local.tee $1 - if (result i32) - local.get $0 - i32.const 536870910 - i32.le_s - else - local.get $1 - end - i32.eqz - if - i32.const 0 - i32.const 104 - i32.const 14 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.2 (result i32) - i32.const 4 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.2 - end - local.set $2 - local.get $2 + global.get $~lib/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/runtime/doAllocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 + call $~lib/runtime/ADJUSTOBLOCK + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC i32.store - local.get $2 + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add ) - (func $~lib/internal/memory/memcpy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1695,64 +1684,122 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else + block $~lib/util/memory/memmove|inlined.0 local.get $0 - local.get $2 - i32.add local.get $1 - i32.le_u - end - if - local.get $0 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end local.get $1 local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and + i32.add local.get $0 - i32.const 7 - i32.and - i32.eq + i32.le_u + local.tee $3 + if (result i32) + local.get $3 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + end + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 if block - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 block (result i32) local.get $0 local.tee $3 @@ -1771,189 +1818,168 @@ end i32.load8_u i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store local.get $2 - i32.const 8 + i32.const 1 i32.sub local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 end - br $continue|1 + br $continue|2 end end end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - end - i32.load8_u - i32.store8 + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 local.get $2 - i32.const 1 - i32.sub - local.set $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end end - br $continue|2 end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 + br $continue|4 end - br $continue|3 end end end - block $break|4 - loop $continue|4 + block $break|5 + loop $continue|5 local.get $2 - i32.const 8 - i32.ge_u if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 end end end end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end end ) - (func $~lib/allocator/arena/__memory_free (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - nop + (func $~lib/memory/memory.free (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + local.set $1 ) - (func $~lib/string/String.fromUTF8 (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/assertUnregistered (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 136 + i32.const 188 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 136 + i32.const 189 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/string/String.fromUTF8 (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $1 i32.const 1 i32.lt_u if - i32.const 64 + i32.const 88 return end i32.const 0 local.set $2 - block $~lib/memory/memory.allocate|inlined.1 (result i32) - local.get $1 - i32.const 1 - i32.shl - local.set $3 - local.get $3 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 - end - local.set $4 + local.get $1 + i32.const 1 + i32.shl + call $~lib/memory/memory.allocate + local.set $3 i32.const 0 - local.set $5 + local.set $4 block $break|0 loop $continue|0 local.get $2 @@ -1964,35 +1990,35 @@ local.get $0 block (result i32) local.get $2 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $2 - local.get $3 + local.get $5 end i32.add i32.load8_u - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 128 i32.lt_u if + local.get $3 local.get $4 - local.get $5 i32.add - local.get $3 - i32.store16 local.get $5 + i32.store16 + local.get $4 i32.const 2 i32.add - local.set $5 + local.set $4 else - local.get $3 + local.get $5 i32.const 191 i32.gt_u local.tee $6 if (result i32) - local.get $3 + local.get $5 i32.const 224 i32.lt_u else @@ -2007,16 +2033,16 @@ i32.eqz if i32.const 0 - i32.const 72 - i32.const 507 + i32.const 96 + i32.const 447 i32.const 8 call $~lib/env/abort unreachable end + local.get $3 local.get $4 - local.get $5 i32.add - local.get $3 + local.get $5 i32.const 31 i32.and i32.const 6 @@ -2036,17 +2062,17 @@ i32.and i32.or i32.store16 - local.get $5 + local.get $4 i32.const 2 i32.add - local.set $5 + local.set $4 else - local.get $3 + local.get $5 i32.const 239 i32.gt_u local.tee $6 if (result i32) - local.get $3 + local.get $5 i32.const 365 i32.lt_u else @@ -2061,13 +2087,13 @@ i32.eqz if i32.const 0 - i32.const 72 - i32.const 511 + i32.const 96 + i32.const 451 i32.const 8 call $~lib/env/abort unreachable end - local.get $3 + local.get $5 i32.const 7 i32.and i32.const 18 @@ -2120,33 +2146,33 @@ i32.or i32.const 65536 i32.sub - local.set $3 + local.set $5 + local.get $3 local.get $4 - local.get $5 i32.add i32.const 55296 - local.get $3 + local.get $5 i32.const 10 i32.shr_u i32.add i32.store16 - local.get $5 + local.get $4 i32.const 2 i32.add - local.set $5 + local.set $4 + local.get $3 local.get $4 - local.get $5 i32.add i32.const 56320 - local.get $3 + local.get $5 i32.const 1023 i32.and i32.add i32.store16 - local.get $5 + local.get $4 i32.const 2 i32.add - local.set $5 + local.set $4 else local.get $2 i32.const 2 @@ -2156,16 +2182,16 @@ i32.eqz if i32.const 0 - i32.const 72 - i32.const 523 + i32.const 96 + i32.const 463 i32.const 8 call $~lib/env/abort unreachable end + local.get $3 local.get $4 - local.get $5 i32.add - local.get $3 + local.get $5 i32.const 15 i32.and i32.const 12 @@ -2201,10 +2227,10 @@ i32.and i32.or i32.store16 - local.get $5 + local.get $4 i32.const 2 i32.add - local.set $5 + local.set $4 end end end @@ -2219,41 +2245,34 @@ i32.eqz if i32.const 0 - i32.const 72 - i32.const 532 + i32.const 96 + i32.const 472 i32.const 4 call $~lib/env/abort unreachable end - local.get $5 - i32.const 1 - i32.shr_u - call $~lib/internal/string/allocateUnsafe - local.set $7 - block $~lib/memory/memory.copy|inlined.0 - local.get $7 - i32.const 4 - i32.add - local.set $3 + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) local.get $4 - local.set $6 + local.set $5 local.get $5 - local.set $8 - local.get $3 - local.get $6 - local.get $8 - call $~lib/internal/memory/memmove - end - block $~lib/memory/memory.free|inlined.0 - local.get $4 - local.set $8 - local.get $8 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 + call $~lib/runtime/doAllocate end + local.set $7 local.get $7 + local.get $3 + local.get $4 + call $~lib/memory/memory.copy + local.get $3 + call $~lib/memory/memory.free + block $~lib/runtime/REGISTER|inlined.0 (result i32) + local.get $7 + local.set $5 + local.get $5 + i32.const 1 + call $~lib/runtime/doRegister + end ) - (func $~lib/internal/string/compareUnsafe (; 10 ;) (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 (; 13 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -2276,9 +2295,9 @@ local.get $4 if (result i32) local.get $6 - i32.load16_u offset=4 + i32.load16_u local.get $7 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $5 i32.eqz @@ -2306,7 +2325,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.eq (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2332,11 +2351,11 @@ return end local.get $0 - i32.load + call $~lib/string/String#get:length local.set $3 local.get $3 local.get $1 - i32.load + call $~lib/string/String#get:length i32.ne if i32.const 0 @@ -2347,12 +2366,10 @@ local.get $1 i32.const 0 local.get $3 - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.eqz ) - (func $start:std/string-utf8 (; 12 ;) (type $FUNCSIG$v) - (local $0 i32) - call $start:~lib/allocator/arena + (func $start:std/string-utf8 (; 15 ;) (type $FUNCSIG$v) global.get $std/string-utf8/str call $~lib/string/String#get:lengthUTF8 global.set $std/string-utf8/len @@ -2362,12 +2379,22 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 7 i32.const 0 call $~lib/env/abort unreachable end + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset global.get $std/string-utf8/str call $~lib/string/String#toUTF8 global.set $std/string-utf8/ptr @@ -2378,7 +2405,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 11 i32.const 0 call $~lib/env/abort @@ -2391,7 +2418,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 12 i32.const 0 call $~lib/env/abort @@ -2404,7 +2431,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 13 i32.const 0 call $~lib/env/abort @@ -2417,7 +2444,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 14 i32.const 0 call $~lib/env/abort @@ -2430,7 +2457,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 15 i32.const 0 call $~lib/env/abort @@ -2443,7 +2470,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 16 i32.const 0 call $~lib/env/abort @@ -2456,7 +2483,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 17 i32.const 0 call $~lib/env/abort @@ -2469,7 +2496,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 18 i32.const 0 call $~lib/env/abort @@ -2482,7 +2509,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 19 i32.const 0 call $~lib/env/abort @@ -2495,7 +2522,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 20 i32.const 0 call $~lib/env/abort @@ -2508,7 +2535,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 21 i32.const 0 call $~lib/env/abort @@ -2517,12 +2544,12 @@ global.get $std/string-utf8/ptr i32.const 0 call $~lib/string/String.fromUTF8 - i32.const 64 - call $~lib/string/String.__eq + i32.const 88 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 23 i32.const 0 call $~lib/env/abort @@ -2534,11 +2561,11 @@ i32.sub call $~lib/string/String.fromUTF8 global.get $std/string-utf8/str - call $~lib/string/String.__eq + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 24 i32.const 0 call $~lib/env/abort @@ -2547,12 +2574,12 @@ global.get $std/string-utf8/ptr i32.const 4 call $~lib/string/String.fromUTF8 - i32.const 160 - call $~lib/string/String.__eq + i32.const 176 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 25 i32.const 0 call $~lib/env/abort @@ -2563,12 +2590,12 @@ i32.add i32.const 2 call $~lib/string/String.fromUTF8 - i32.const 168 - call $~lib/string/String.__eq + i32.const 192 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 26 i32.const 0 call $~lib/env/abort @@ -2579,12 +2606,12 @@ i32.add i32.const 4 call $~lib/string/String.fromUTF8 - i32.const 176 - call $~lib/string/String.__eq + i32.const 208 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 27 i32.const 0 call $~lib/env/abort @@ -2595,28 +2622,23 @@ i32.add i32.const 1 call $~lib/string/String.fromUTF8 - i32.const 184 - call $~lib/string/String.__eq + i32.const 224 + call $~lib/string/String.eq i32.eqz if i32.const 0 - i32.const 24 + i32.const 40 i32.const 28 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/memory/memory.free|inlined.1 - global.get $std/string-utf8/ptr - local.set $0 - local.get $0 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.1 - end + global.get $std/string-utf8/ptr + call $~lib/memory/memory.free ) - (func $start (; 13 ;) (type $FUNCSIG$v) + (func $start (; 16 ;) (type $FUNCSIG$v) call $start:std/string-utf8 ) - (func $null (; 14 ;) (type $FUNCSIG$v) + (func $null (; 17 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 19cf3e7627..284c8415c4 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -492,33 +492,39 @@ i32.const -2128831035 local.set $1 local.get $0 - i32.const 8 - i32.sub - i32.load offset=4 - i32.const 1 - i32.shr_u - i32.const 1 - i32.shl - local.set $3 - loop $repeat|0 - local.get $2 - local.get $3 - i32.lt_u - if + if + block $break|0 local.get $0 - local.get $2 - i32.add - i32.load8_u - local.get $1 - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $2 + i32.const 8 + i32.sub + i32.load offset=4 i32.const 1 - i32.add - local.set $2 - br $repeat|0 + i32.shr_u + i32.const 1 + i32.shl + local.set $3 + loop $repeat|0 + local.get $2 + local.get $3 + i32.ge_u + br_if $break|0 + local.get $0 + local.get $2 + i32.add + i32.load8_u + local.get $1 + i32.xor + i32.const 16777619 + i32.mul + local.set $1 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + unreachable + end + unreachable end end local.get $1 @@ -2091,94 +2097,91 @@ (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $3 - local.get $1 local.get $0 - local.tee $2 + local.get $1 i32.eq br_if $~lib/util/memory/memmove|inlined.0 local.get $1 - local.get $3 - i32.add local.get $2 + i32.add + local.get $0 i32.le_u - local.tee $0 + local.tee $3 i32.eqz if + local.get $0 local.get $2 - local.get $3 i32.add local.get $1 i32.le_u - local.set $0 + local.set $3 end - local.get $0 + local.get $3 if - local.get $2 + local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/util/memory/memcpy br $~lib/util/memory/memmove|inlined.0 end - local.get $2 + local.get $0 local.get $1 i32.lt_u if local.get $1 i32.const 7 i32.and - local.get $2 + local.get $0 i32.const 7 i32.and i32.eq if loop $continue|0 - local.get $2 + local.get $0 i32.const 7 i32.and if - local.get $3 + local.get $2 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $2 i32.const 1 i32.sub - local.set $3 - local.get $2 + local.set $2 + local.get $0 local.tee $4 i32.const 1 i32.add - local.set $2 + local.set $0 local.get $1 - local.tee $0 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $4 - local.get $0 + local.get $3 i32.load8_u i32.store8 br $continue|0 end end loop $continue|1 - local.get $3 + local.get $2 i32.const 8 i32.ge_u if - local.get $2 + local.get $0 local.get $1 i64.load i64.store - local.get $3 + local.get $2 i32.const 8 i32.sub - local.set $3 - local.get $2 + local.set $2 + local.get $0 i32.const 8 i32.add - local.set $2 + local.set $0 local.get $1 i32.const 8 i32.add @@ -2188,26 +2191,26 @@ end end loop $continue|2 - local.get $3 + local.get $2 if - local.get $2 + local.get $0 local.tee $4 i32.const 1 i32.add - local.set $2 + local.set $0 local.get $1 - local.tee $0 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $4 - local.get $0 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $2 i32.const 1 i32.sub - local.set $3 + local.set $2 br $continue|2 end end @@ -2215,29 +2218,29 @@ local.get $1 i32.const 7 i32.and - local.get $2 + local.get $0 i32.const 7 i32.and i32.eq if loop $continue|3 + local.get $0 local.get $2 - local.get $3 i32.add i32.const 7 i32.and if - local.get $3 + local.get $2 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $2 i32.const 1 i32.sub - local.tee $3 - local.get $2 + local.tee $2 + local.get $0 i32.add local.get $1 - local.get $3 + local.get $2 i32.add i32.load8_u i32.store8 @@ -2245,18 +2248,18 @@ end end loop $continue|4 - local.get $3 + local.get $2 i32.const 8 i32.ge_u if - local.get $3 + local.get $2 i32.const 8 i32.sub - local.tee $3 - local.get $2 + local.tee $2 + local.get $0 i32.add local.get $1 - local.get $3 + local.get $2 i32.add i64.load i64.store @@ -2265,16 +2268,16 @@ end end loop $continue|5 - local.get $3 + local.get $2 if - local.get $3 + local.get $2 i32.const 1 i32.sub - local.tee $3 - local.get $2 + local.tee $2 + local.get $0 i32.add local.get $1 - local.get $3 + local.get $2 i32.add i32.load8_u i32.store8 diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 89dc229054..11c5894fd2 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -81,7 +81,7 @@ end local.get $2 ) - (func $~lib/runtime/adjustToBlock (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -181,7 +181,7 @@ (func $~lib/runtime/doAllocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/adjustToBlock + call $~lib/runtime/ADJUSTOBLOCK call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -240,261 +240,252 @@ (func $~lib/memory/memory.fill (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i64) + (local $5 i64) block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $3 - local.get $1 - local.set $4 local.get $2 - local.set $5 - local.get $5 i32.eqz if br $~lib/util/memory/memset|inlined.0 end - local.get $3 - local.get $4 + local.get $0 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 1 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 2 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 1 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 + local.get $0 i32.const 2 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 2 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 3 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 6 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 3 i32.add - local.get $4 + local.get $1 i32.store8 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 4 i32.sub - local.get $4 + local.get $1 i32.store8 - local.get $5 + local.get $2 i32.const 8 i32.le_u if br $~lib/util/memory/memset|inlined.0 end i32.const 0 - local.get $3 + local.get $0 i32.sub i32.const 3 i32.and - local.set $6 + local.set $3 + local.get $0 local.get $3 - local.get $6 i32.add - local.set $3 - local.get $5 - local.get $6 + local.set $0 + local.get $2 + local.get $3 i32.sub - local.set $5 - local.get $5 + local.set $2 + local.get $2 i32.const -4 i32.and - local.set $5 + local.set $2 i32.const -1 i32.const 255 i32.div_u - local.get $4 + local.get $1 i32.const 255 i32.and i32.mul - local.set $7 - local.get $3 - local.get $7 + local.set $4 + local.get $0 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 4 i32.sub - local.get $7 + local.get $4 i32.store - local.get $5 + local.get $2 i32.const 8 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 4 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 8 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 12 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 8 i32.sub - local.get $7 + local.get $4 i32.store - local.get $5 + local.get $2 i32.const 24 i32.le_u if br $~lib/util/memory/memset|inlined.0 end - local.get $3 + local.get $0 i32.const 12 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 16 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 20 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 + local.get $0 i32.const 24 i32.add - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 28 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 24 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 20 i32.sub - local.get $7 + local.get $4 i32.store - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 16 i32.sub - local.get $7 + local.get $4 i32.store i32.const 24 - local.get $3 + local.get $0 i32.const 4 i32.and i32.add - local.set $6 + local.set $3 + local.get $0 local.get $3 - local.get $6 i32.add - local.set $3 - local.get $5 - local.get $6 + local.set $0 + local.get $2 + local.get $3 i32.sub - local.set $5 - local.get $7 + local.set $2 + local.get $4 i64.extend_i32_u - local.get $7 + local.get $4 i64.extend_i32_u i64.const 32 i64.shl i64.or - local.set $8 + local.set $5 block $break|0 loop $continue|0 - local.get $5 + local.get $2 i32.const 32 i32.ge_u if block - local.get $3 - local.get $8 + local.get $0 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 8 i32.add - local.get $8 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 16 i32.add - local.get $8 + local.get $5 i64.store - local.get $3 + local.get $0 i32.const 24 i32.add - local.get $8 - i64.store local.get $5 + i64.store + local.get $2 i32.const 32 i32.sub - local.set $5 - local.get $3 + local.set $2 + local.get $0 i32.const 32 i32.add - local.set $3 + local.set $0 end br $continue|0 end @@ -679,39 +670,44 @@ (local $3 i32) i32.const -2128831035 local.set $1 - block $break|0 - block - i32.const 0 - local.set $2 - local.get $0 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.set $3 - end - loop $repeat|0 - local.get $2 - local.get $3 - i32.lt_u - i32.eqz - br_if $break|0 - local.get $1 - local.get $0 - local.get $2 - i32.add - i32.load8_u - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $repeat|0 + local.get $0 + i32.const 0 + i32.ne + if + block $break|0 + block + i32.const 0 + local.set $2 + local.get $0 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $3 + end + loop $repeat|0 + local.get $2 + local.get $3 + i32.lt_u + i32.eqz + br_if $break|0 + local.get $1 + local.get $0 + local.get $2 + i32.add + i32.load8_u + i32.xor + i32.const 16777619 + i32.mul + local.set $1 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + unreachable + end unreachable end - unreachable end local.get $1 ) @@ -2777,87 +2773,78 @@ ) (func $~lib/memory/memory.copy (; 32 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 - local.set $3 local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $3 - local.get $4 i32.eq if br $~lib/util/memory/memmove|inlined.0 end - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add - local.get $3 + local.get $0 i32.le_u - local.tee $6 + local.tee $3 if (result i32) - local.get $6 - else local.get $3 - local.get $5 + else + local.get $0 + local.get $2 i32.add - local.get $4 + local.get $1 i32.le_u end if - local.get $3 - local.get $4 - local.get $5 + local.get $0 + local.get $1 + local.get $2 call $~lib/util/memory/memcpy br $~lib/util/memory/memmove|inlined.0 end - local.get $3 - local.get $4 + local.get $0 + local.get $1 i32.lt_u if - local.get $4 + local.get $1 i32.const 7 i32.and - local.get $3 + local.get $0 i32.const 7 i32.and i32.eq if block $break|0 loop $continue|0 - local.get $3 + local.get $0 i32.const 7 i32.and if block - local.get $5 + local.get $2 i32.eqz if br $~lib/util/memory/memmove|inlined.0 end - local.get $5 + local.get $2 i32.const 1 i32.sub - local.set $5 + local.set $2 block (result i32) - local.get $3 - local.tee $6 + local.get $0 + local.tee $3 i32.const 1 i32.add - local.set $3 - local.get $6 + local.set $0 + local.get $3 end block (result i32) - local.get $4 - local.tee $6 + local.get $1 + local.tee $3 i32.const 1 i32.add - local.set $4 - local.get $6 + local.set $1 + local.get $3 end i32.load8_u i32.store8 @@ -2868,27 +2855,27 @@ end block $break|1 loop $continue|1 - local.get $5 + local.get $2 i32.const 8 i32.ge_u if block - local.get $3 - local.get $4 + local.get $0 + local.get $1 i64.load i64.store - local.get $5 + local.get $2 i32.const 8 i32.sub - local.set $5 - local.get $3 + local.set $2 + local.get $0 i32.const 8 i32.add - local.set $3 - local.get $4 + local.set $0 + local.get $1 i32.const 8 i32.add - local.set $4 + local.set $1 end br $continue|1 end @@ -2897,67 +2884,67 @@ end block $break|2 loop $continue|2 - local.get $5 + local.get $2 if block block (result i32) - local.get $3 - local.tee $6 + local.get $0 + local.tee $3 i32.const 1 i32.add - local.set $3 - local.get $6 + local.set $0 + local.get $3 end block (result i32) - local.get $4 - local.tee $6 + local.get $1 + local.tee $3 i32.const 1 i32.add - local.set $4 - local.get $6 + local.set $1 + local.get $3 end i32.load8_u i32.store8 - local.get $5 + local.get $2 i32.const 1 i32.sub - local.set $5 + local.set $2 end br $continue|2 end end end else - local.get $4 + local.get $1 i32.const 7 i32.and - local.get $3 + local.get $0 i32.const 7 i32.and i32.eq if block $break|3 loop $continue|3 - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.add i32.const 7 i32.and if block - local.get $5 + local.get $2 i32.eqz if br $~lib/util/memory/memmove|inlined.0 end - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $5 + local.tee $2 i32.add - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 @@ -2968,20 +2955,20 @@ end block $break|4 loop $continue|4 - local.get $5 + local.get $2 i32.const 8 i32.ge_u if block - local.get $5 + local.get $2 i32.const 8 i32.sub - local.set $5 - local.get $3 - local.get $5 + local.set $2 + local.get $0 + local.get $2 i32.add - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add i64.load i64.store @@ -2993,16 +2980,16 @@ end block $break|5 loop $continue|5 - local.get $5 + local.get $2 if - local.get $3 - local.get $5 + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $5 + local.tee $2 i32.add - local.get $4 - local.get $5 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 From f21b339563e5341158ed09ab393f37afa26fe750 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 17 Mar 2019 08:46:26 +0100 Subject: [PATCH 043/119] checked builtin array get, optimize abv layout --- src/builtins.ts | 240 +- src/compiler.ts | 46 +- std/assembly/array.ts | 63 +- std/assembly/dataview.ts | 138 +- std/assembly/runtime.ts | 11 +- std/assembly/string.ts | 4 +- std/assembly/typedarray.ts | 8 +- tests/compiler/std/map.optimized.wat | 4 +- tests/compiler/std/map.untouched.wat | 4 +- tests/compiler/std/math.optimized.wat | 74 +- tests/compiler/std/math.untouched.wat | 32 +- tests/compiler/std/set.optimized.wat | 4 +- tests/compiler/std/set.untouched.wat | 4 +- tests/compiler/std/static-array.optimized.wat | 128 +- tests/compiler/std/static-array.ts | 2 - tests/compiler/std/static-array.untouched.wat | 194 +- tests/compiler/std/string.optimized.wat | 29 +- tests/compiler/std/string.untouched.wat | 68 +- tests/compiler/std/typedarray.optimized.wat | 2738 +++++++++++------ tests/compiler/std/typedarray.untouched.wat | 2359 ++++++++++++-- 20 files changed, 4677 insertions(+), 1473 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index 7360edef4b..ee94c16aee 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -61,7 +61,8 @@ import { Field, Global, DecoratorFlags, - Local + Local, + Program } from "./program"; import { @@ -4084,8 +4085,8 @@ export function compileIterateRoots(compiler: Compiler): void { ); } -function typedArraySymbolToType(symbol: string): Type | null { - switch (symbol) { +function determineTypedArrayType(target: Class, program: Program): Type | null { + switch (target.internalName) { case BuiltinSymbols.Int8Array: return Type.i8; case BuiltinSymbols.Uint8ClampedArray: case BuiltinSymbols.Uint8Array: return Type.u8; @@ -4098,32 +4099,21 @@ function typedArraySymbolToType(symbol: string): Type | null { case BuiltinSymbols.Float32Array: return Type.f32; case BuiltinSymbols.Float64Array: return Type.f64; } - return null; -} - -export function compileArrayGet( - compiler: Compiler, - target: Class, - thisExpression: Expression, - elementExpression: Expression, - contextualType: Type -): ExpressionRef { - var type = typedArraySymbolToType(target.internalName); - if (!type) { - assert(target.prototype == compiler.program.arrayPrototype); - type = assert(target.typeArguments)[0]; + var typeArguments = target.typeArguments; + if (typeArguments && typeArguments.length == 1) { + return typeArguments[0]; // Array, TypedArray } - return compileTypedArrayGet(compiler, target, type, thisExpression, elementExpression, contextualType); + return null; } -function compileTypedArrayGet( +export function compileBuiltinArrayGet( compiler: Compiler, target: Class, - type: Type, thisExpression: Expression, elementExpression: Expression, contextualType: Type ): ExpressionRef { + var type = assert(determineTypedArrayType(target, compiler.program)); var module = compiler.module; var outType = ( type.is(TypeFlags.INTEGER) && @@ -4133,80 +4123,134 @@ function compileTypedArrayGet( var dataStart = assert(target.lookupInSelf("dataStart")); assert(dataStart.kind == ElementKind.FIELD); - var dataEnd = assert(target.lookupInSelf("dataEnd")); - assert(dataEnd.kind == ElementKind.FIELD); + var dataLength = assert(target.lookupInSelf("dataLength")); + assert(dataLength.kind == ElementKind.FIELD); - var constantOffset: i32 = 0; - var dynamicOffset = module.precomputeExpression(compiler.compileExpression( + // compile the index expression and shift it to become the actual byteOffset + var dynamicOffset = compiler.compileExpression( elementExpression, Type.i32, ConversionKind.IMPLICIT, WrapMode.NONE - )); - if (getExpressionId(dynamicOffset) == ExpressionId.Const) { - constantOffset = getConstValueI32(dynamicOffset); - dynamicOffset = 0; - } else if (getExpressionId(dynamicOffset) == ExpressionId.Binary) { - if (getBinaryOp(dynamicOffset) == BinaryOp.AddI32) { - let left = getBinaryLeft(dynamicOffset); - let right = getBinaryRight(dynamicOffset); - if (getExpressionId(left) == ExpressionId.Const) { - constantOffset = getConstValueI32(left); - dynamicOffset = right; - } else if (getExpressionId(right) == ExpressionId.Const) { - constantOffset = getConstValueI32(right); - dynamicOffset = left; - } - } + ); + var alignLog2 = type.alignLog2; + if (alignLog2) { + dynamicOffset = module.createBinary(BinaryOp.ShlI32, + dynamicOffset, + module.createI32(alignLog2) + ); } + var flow = compiler.currentFlow; var usizeType = compiler.options.usizeType; var nativeSizeType = compiler.options.nativeSizeType; - var dataStartExpr = module.createLoad(usizeType.byteSize, true, - compiler.compileExpression( - thisExpression, - target.type, - ConversionKind.IMPLICIT, - WrapMode.NONE - ), - nativeSizeType, (dataStart).memoryOffset - ); + var isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); + var ptrExpr: ExpressionRef; + var constantOffset: i32 = 0; - var typeAlignLog2 = type.alignLog2; - constantOffset <<= typeAlignLog2; - if (dynamicOffset) { - if (typeAlignLog2) { - dynamicOffset = module.createBinary(BinaryOp.ShlI32, - dynamicOffset, - module.createI32(typeAlignLog2) - ); + if (isUnchecked) { + // precompute byteOffset into a constant and a dynamic part + dynamicOffset = module.precomputeExpression(dynamicOffset); + if (getExpressionId(dynamicOffset) == ExpressionId.Const) { + constantOffset = getConstValueI32(dynamicOffset); + dynamicOffset = 0; + } else if (getExpressionId(dynamicOffset) == ExpressionId.Binary) { + if (getBinaryOp(dynamicOffset) == BinaryOp.AddI32) { + let left = getBinaryLeft(dynamicOffset); + let right = getBinaryRight(dynamicOffset); + if (getExpressionId(left) == ExpressionId.Const) { + constantOffset = getConstValueI32(left); + dynamicOffset = right; + } else if (getExpressionId(right) == ExpressionId.Const) { + constantOffset = getConstValueI32(right); + dynamicOffset = left; + } + } } + // ptr = this.dataStart + ptrExpr = module.createLoad(usizeType.byteSize, true, + compiler.compileExpression( + thisExpression, + target.type, + ConversionKind.IMPLICIT, + WrapMode.NONE + ), + nativeSizeType, (dataStart).memoryOffset + ); + // ptr = ptr + dynamicOffset + if (dynamicOffset) { + if (nativeSizeType == NativeType.I64) { + 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, (dataStart).memoryOffset + ); + + // ptr = ptr + (tempOffset = dynamicOffset) if (nativeSizeType == NativeType.I64) { - dataStartExpr = module.createBinary(BinaryOp.AddI64, - dataStartExpr, - module.createUnary(UnaryOp.ExtendU32, dynamicOffset) + ptrExpr = module.createBinary(BinaryOp.AddI64, + ptrExpr, + module.createUnary(UnaryOp.ExtendU32, + module.createTeeLocal(tempOffset.index, dynamicOffset) + ) ); } else { - dataStartExpr = module.createBinary(BinaryOp.AddI32, - dataStartExpr, - dynamicOffset + ptrExpr = module.createBinary(BinaryOp.AddI32, + ptrExpr, + module.createTeeLocal(tempOffset.index, dynamicOffset) ); } - } - // TODO: check offset + // ptr = select(ptr, -1, tempOffset < 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, (dataLength).memoryOffset + ) + ) + ); + } compiler.currentType = outType; return module.createLoad( type.byteSize, type.is(TypeFlags.SIGNED), - dataStartExpr, + ptrExpr, outType.toNativeType(), constantOffset ); } -export function compileArraySet( +export function compileBuiltinArraySet( compiler: Compiler, target: Class, thisExpression: Expression, @@ -4214,38 +4258,49 @@ export function compileArraySet( valueExpression: Expression, contextualType: Type ): ExpressionRef { - var program = compiler.program; - var type = typedArraySymbolToType(target.internalName); - if (!type) { - assert(target.prototype == program.arrayPrototype); - type = assert(target.typeArguments)[0]; - } - return compileTypedArraySet( + var type = assert(determineTypedArrayType(target, compiler.program)); + return compileBuiltinArraySetWithValue( compiler, target, - type, thisExpression, elementExpression, - valueExpression, - contextualType + compiler.compileExpression( + valueExpression, + type.is(TypeFlags.INTEGER | TypeFlags.VALUE) + ? type.is(TypeFlags.LONG) + ? type.is(TypeFlags.SIGNED) + ? Type.i64 + : Type.u64 + : type.is(TypeFlags.SIGNED) + ? Type.i32 + : Type.u32 + : type, + ConversionKind.IMPLICIT, + WrapMode.NONE + ), + contextualType != Type.void ); } -function compileTypedArraySet( +export function compileBuiltinArraySetWithValue( compiler: Compiler, target: Class, - type: Type, thisExpression: Expression, elementExpression: Expression, - valueExpression: Expression, - contextualType: Type + valueExpr: ExpressionRef, + tee: bool ): ExpressionRef { + + // TODO: check offset + + var program = compiler.program; + var type = assert(determineTypedArrayType(target, compiler.program)); var module = compiler.module; var dataStart = assert(target.lookupInSelf("dataStart")); assert(dataStart.kind == ElementKind.FIELD); - var dataEnd = assert(target.lookupInSelf("dataEnd")); - assert(dataEnd.kind == ElementKind.FIELD); + var dataLength = assert(target.lookupInSelf("dataLength")); + assert(dataLength.kind == ElementKind.FIELD); var constantOffset: i32 = 0; var dynamicOffset = module.precomputeExpression( @@ -4313,21 +4368,6 @@ function compileTypedArraySet( } } - var valueExpr = compiler.compileExpression( - valueExpression, - type.is(TypeFlags.INTEGER | TypeFlags.VALUE) - ? type.is(TypeFlags.LONG) - ? type.is(TypeFlags.SIGNED) - ? Type.i64 - : Type.u64 - : type.is(TypeFlags.SIGNED) - ? Type.i32 - : Type.u32 - : type, - ConversionKind.IMPLICIT, - WrapMode.NONE - ); - // handle Array: value = LINK(value, this), value if (typeIsManaged) { let program = compiler.program; @@ -4379,9 +4419,7 @@ function compileTypedArraySet( var nativeType = type.toNativeType(); - // TODO: check offset - - if (contextualType == Type.void) { + if (!tee) { compiler.currentType = Type.void; return module.createStore( type.byteSize, diff --git a/src/compiler.ts b/src/compiler.ts index b70a19ee66..37f48f143a 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -9,8 +9,9 @@ import { compileIterateRoots, ensureGCHook, BuiltinSymbols, - compileArrayGet, - compileArraySet + compileBuiltinArrayGet, + compileBuiltinArraySet, + compileBuiltinArraySetWithValue } from "./builtins"; import { @@ -4706,7 +4707,7 @@ export class Compiler extends DiagnosticEmitter { let arrayBufferView = this.program.arrayBufferViewInstance; if (arrayBufferView) { if ((target).prototype.extends(arrayBufferView.prototype)) { - return compileArraySet( + return compileBuiltinArraySet( this, target, assert(this.resolver.currentThisExpression), @@ -4939,6 +4940,19 @@ export class Compiler extends DiagnosticEmitter { case ElementKind.CLASS: { let elementExpression = this.resolver.currentElementExpression; if (elementExpression) { + let arrayBufferView = this.program.arrayBufferViewInstance; + if (arrayBufferView) { + if ((target).prototype.extends(arrayBufferView.prototype)) { + return compileBuiltinArraySetWithValue( + this, + target, + assert(this.resolver.currentThisExpression), + elementExpression, + valueWithCorrectType, + tee + ); + } + } let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); if (!indexedGet) { @@ -5946,21 +5960,21 @@ export class Compiler extends DiagnosticEmitter { if (!target) return this.module.createUnreachable(); switch (target.kind) { case ElementKind.CLASS: { + let arrayBufferView = this.program.arrayBufferViewInstance; + if (arrayBufferView) { + if ((target).prototype.extends(arrayBufferView.prototype)) { + return compileBuiltinArrayGet( + this, + target, + expression.expression, + expression.elementExpression, + contextualType + ); + } + } let isUnchecked = this.currentFlow.is(FlowFlags.UNCHECKED_CONTEXT); let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); if (!indexedGet) { - let arrayBufferView = this.program.arrayBufferViewInstance; - if (arrayBufferView) { - if ((target).prototype.extends(arrayBufferView.prototype)) { - return compileArrayGet( - this, - target, - expression.expression, - expression.elementExpression, - contextualType - ); - } - } this.error( DiagnosticCode.Index_signature_is_missing_in_type_0, expression.expression.range, (target).internalName @@ -6570,7 +6584,7 @@ export class Compiler extends DiagnosticEmitter { assert(!program.options.isWasm64); // TODO assert(arrayInstance.writeField("data", bufferAddress32, buf, runtimeHeaderSize)); assert(arrayInstance.writeField("dataStart", bufferAddress32, buf, runtimeHeaderSize)); - assert(arrayInstance.writeField("dataEnd", bufferAddress32 + bufferLength, buf, runtimeHeaderSize)); + assert(arrayInstance.writeField("dataLength", bufferLength, buf, runtimeHeaderSize)); assert(arrayInstance.writeField("length_", arrayLength, buf, runtimeHeaderSize)); return this.addMemorySegment(buf); diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 975065de5b..f878692ea6 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -4,6 +4,22 @@ import { COMPARATOR, SORT } from "./util/sort"; import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number"; import { isArray as builtin_isArray } from "./builtins"; +/** Ensures that the given array has _at least_ the specified length. */ +function ensureLength(array: ArrayBufferView, length: i32, alignLog2: u32): void { + var oldData = array.data; + var oldCapacity = oldData.byteLength >>> alignLog2; + if (length > oldCapacity) { + if (length > (MAX_BYTELENGTH >>> alignLog2)) throw new RangeError("Invalid array length"); + let newByteLength = length << alignLog2; + let newData = REALLOCATE(changetype(oldData), newByteLength); // registers on move + if (newData !== changetype(oldData)) { + array.data = changetype(newData); // links + array.dataStart = newData; + array.dataLength = newByteLength; + } + } +} + export class Array extends ArrayBufferView { private length_: i32; @@ -25,26 +41,10 @@ export class Array extends ArrayBufferView { } set length(length: i32) { - this.resize(length); + ensureLength(changetype(this), length, alignof()); this.length_ = length; } - private resize(length: i32): void { - var oldData = this.data; - var oldCapacity = oldData.byteLength >>> alignof(); - if (length > oldCapacity) { - const MAX_LENGTH = MAX_BYTELENGTH >>> alignof(); - if (length > MAX_LENGTH) throw new RangeError("Invalid array length"); - let newCapacity = length << alignof(); - let newData = REALLOCATE(changetype(oldData), newCapacity); // registers on move - if (newData !== changetype(oldData)) { - this.data = changetype(newData); // links - this.dataStart = newData; - this.dataEnd = newData + newCapacity; - } - } - } - every(callbackfn: (element: T, index: i32, array: Array) => bool): bool { for (let index = 0, length = this.length_; index < min(length, this.length_); ++index) { if (!callbackfn(load(this.dataStart + (index << alignof())), index, this)) return false; @@ -59,33 +59,14 @@ export class Array extends ArrayBufferView { return -1; } - // @operator("[]") - // private __get(index: i32): T { - // var buffer = this.buffer_; - // return index < (buffer.byteLength >>> alignof()) - // ? LOAD(buffer, index) - // : unreachable(); - // } - - // @operator("{}") - // private __unchecked_get(index: i32): T { - // return LOAD(this.buffer_, index); - // } - @operator("[]=") - private __set(index: i32, value: T): void { - this.resize(index + 1); + private __set(index: i32, value: T): void { // unchecked is built-in + ensureLength(changetype(this), index + 1, alignof()); store(this.dataStart + (index << alignof()), value); if (isManaged()) LINK(value, this); if (index >= this.length_) this.length_ = index + 1; } - // @operator("{}=") - // private __unchecked_set(index: i32, value: T): void { - // STORE(this.buffer_, index, value); - // if (isManaged()) __gc_link(changetype(this), changetype(value)); // tslint:disable-line - // } - fill(value: T, start: i32 = 0, end: i32 = i32.MAX_VALUE): this { var dataStart = this.dataStart; var length = this.length_; @@ -138,7 +119,7 @@ export class Array extends ArrayBufferView { push(element: T): i32 { var newLength = this.length_ + 1; - this.resize(newLength); + ensureLength(changetype(this), newLength, alignof()); this.length_ = newLength; store(this.dataStart + ((newLength - 1) << alignof()), element); if (isManaged()) LINK(element, this); @@ -285,7 +266,7 @@ export class Array extends ArrayBufferView { unshift(element: T): i32 { var newLength = this.length_; - this.resize(newLength); + ensureLength(changetype(this), newLength, alignof()); var base = this.dataStart; memory.copy( base + sizeof(), @@ -347,7 +328,7 @@ export class Array extends ArrayBufferView { reverse(): Array { var front = this.dataStart; - var back = this.dataEnd - sizeof(); + var back = this.dataStart + this.dataLength - sizeof(); while (front < back) { let temp = load(front); store(front, load(back)); diff --git a/std/assembly/dataview.ts b/std/assembly/dataview.ts index bf44d415b7..4c44e944e4 100644 --- a/std/assembly/dataview.ts +++ b/std/assembly/dataview.ts @@ -5,7 +5,7 @@ export class DataView { private data: ArrayBuffer; private dataStart: usize; - private dataEnd: usize; + private dataLength: u32; constructor( buffer: ArrayBuffer, @@ -18,7 +18,7 @@ export class DataView { this.data = buffer; // links var dataStart = changetype(buffer) + byteOffset; this.dataStart = dataStart; - this.dataEnd = dataStart + byteLength; + this.dataLength = byteLength; } get buffer(): ArrayBuffer { @@ -30,169 +30,129 @@ export class DataView { } get byteLength(): i32 { - return (this.dataEnd - this.dataStart); + return this.dataLength; } getFloat32(byteOffset: i32, littleEndian: boolean = false): f32 { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset + 4 > this.dataEnd) throw new Error("Offset out of bounds"); + if (byteOffset + 4 > this.dataLength) throw new Error("Offset out of bounds"); return littleEndian - ? load(dataOffset) + ? load(this.dataStart + byteOffset) : reinterpret( bswap( - load(dataOffset) + load(this.dataStart + byteOffset) ) ); } getFloat64(byteOffset: i32, littleEndian: boolean = false): f64 { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset + 4 > this.dataEnd) throw new Error("Offset out of bounds"); + if (byteOffset + 4 > this.dataLength) throw new Error("Offset out of bounds"); return littleEndian - ? load(dataOffset) + ? load(this.dataStart + byteOffset) : reinterpret( bswap( - load(dataOffset) + load(this.dataStart + byteOffset) ) ); } getInt8(byteOffset: i32): i8 { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset >= this.dataEnd) throw new Error("Offset out of bounds"); - return load(dataOffset); + if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); + return load(this.dataStart + byteOffset); } getInt16(byteOffset: i32, littleEndian: boolean = false): i16 { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset + 2 > this.dataEnd) throw new Error("Offset out of bounds"); - var result: i16 = load(dataOffset); + if (byteOffset + 2 > this.dataLength) throw new Error("Offset out of bounds"); + var result: i16 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } getInt32(byteOffset: i32, littleEndian: boolean = false): i32 { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset + 4 > this.dataEnd) throw new Error("Offset out of bounds"); - var result: i32 = load(dataOffset); + if (byteOffset + 4 > this.dataLength) throw new Error("Offset out of bounds"); + var result: i32 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } getUint8(byteOffset: i32): u8 { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset >= this.dataEnd) throw new Error("Offset out of bounds"); - return load(dataOffset); + if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); + return load(this.dataStart + byteOffset); } getUint16(byteOffset: i32, littleEndian: boolean = false): u16 { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset + 2 > this.dataEnd) throw new Error("Offset out of bounds"); - var result: u16 = load(dataOffset); + if (byteOffset + 2 > this.dataLength) throw new Error("Offset out of bounds"); + var result: u16 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } getUint32(byteOffset: i32, littleEndian: boolean = false): u32 { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset + 2 > this.dataEnd) throw new Error("Offset out of bounds"); - var result: u32 = load(dataOffset); + if (byteOffset + 2 > this.dataLength) throw new Error("Offset out of bounds"); + var result: u32 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } setFloat32(byteOffset: i32, value: f32, littleEndian: boolean = false): void { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset + 4 > this.dataEnd) throw new Error("Offset out of bounds"); - if (littleEndian) store(dataOffset, value); - else store(dataOffset, bswap(reinterpret(value))); + if (byteOffset + 4 > this.dataLength) throw new Error("Offset out of bounds"); + if (littleEndian) store(this.dataStart + byteOffset, value); + else store(this.dataStart + byteOffset, bswap(reinterpret(value))); } setFloat64(byteOffset: i32, value: f64, littleEndian: boolean = false): void { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset + 4 > this.dataEnd) throw new Error("Offset out of bounds"); - if (littleEndian) store(dataOffset, value); - else store(dataOffset, bswap(reinterpret(value))); + if (byteOffset + 8 > this.dataLength) throw new Error("Offset out of bounds"); + if (littleEndian) store(this.dataStart + byteOffset, value); + else store(this.dataStart + byteOffset, bswap(reinterpret(value))); } setInt8(byteOffset: i32, value: i8): void { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset >= this.dataEnd) throw new Error("Offset out of bounds"); - store(dataOffset, value); + if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); + store(this.dataStart + byteOffset, value); } setInt16(byteOffset: i32, value: i16, littleEndian: boolean = false): void { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset + 2 > this.dataEnd) throw new Error("Offset out of bounds"); - store(dataOffset, littleEndian ? value : bswap(value)); + if (byteOffset + 2 > this.dataLength) throw new Error("Offset out of bounds"); + store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } setInt32(byteOffset: i32, value: i32, littleEndian: boolean = false): void { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset + 4 > this.dataEnd) throw new Error("Offset out of bounds"); - store(dataOffset, littleEndian ? value : bswap(value)); + if (byteOffset + 4 > this.dataLength) throw new Error("Offset out of bounds"); + store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } setUint8(byteOffset: i32, value: u8): void { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset >= this.dataEnd) throw new Error("Offset out of bounds"); - store(dataOffset, value); + if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); + store(this.dataStart + byteOffset, value); } setUint16(byteOffset: i32, value: u16, littleEndian: boolean = false): void { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset + 2 > this.dataEnd) throw new Error("Offset out of bounds"); - store(dataOffset, littleEndian ? value : bswap(value)); + if (byteOffset + 2 > this.dataLength) throw new Error("Offset out of bounds"); + store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } setUint32(byteOffset: i32, value: u32, littleEndian: boolean = false): void { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset + 4 > this.dataEnd) throw new Error("Offset out of bounds"); - store(dataOffset, littleEndian ? value : bswap(value)); + if (byteOffset + 4 > this.dataLength) throw new Error("Offset out of bounds"); + store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } // Non-standard additions that make sense in WebAssembly, but won't work in JS: getInt64(byteOffset: i32, littleEndian: boolean = false): i64 { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset + 8 > this.dataEnd) throw new Error("Offset out of bounds"); - var result: i64 = load(dataOffset); - return littleEndian ? result : bswap(result); + if (byteOffset + 8 > this.dataLength) throw new Error("Offset out of bounds"); + var result: i64 = load(this.dataStart + byteOffset); + return littleEndian ? result : bswap(result); } getUint64(byteOffset: i32, littleEndian: boolean = false): u64 { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset + 8 > this.dataEnd) throw new Error("Offset out of bounds"); - var result = load(dataOffset); - return littleEndian ? result : bswap(result); + if (byteOffset + 8 > this.dataLength) throw new Error("Offset out of bounds"); + var result = load(this.dataStart + byteOffset); + return littleEndian ? result : bswap(result); } setInt64(byteOffset: i32, value: i64, littleEndian: boolean = false): void { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset + 8 > this.dataEnd) throw new Error("Offset out of bounds"); - store(dataOffset, littleEndian ? value : bswap(value)); + if (byteOffset + 8 > this.dataLength) throw new Error("Offset out of bounds"); + store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } setUint64(byteOffset: i32, value: u64, littleEndian: boolean = false): void { - var dataStart = this.dataStart; - var dataOffset = dataStart + byteOffset; - if (dataOffset + 8 > this.dataEnd) throw new Error("Offset out of bounds"); - store(dataOffset, littleEndian ? value : bswap(value)); + if (byteOffset + 8 > this.dataLength) throw new Error("Offset out of bounds"); + store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } toString(): string { diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index d8fea91956..c932623038 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -122,6 +122,7 @@ function doReallocate(ref: usize, newPayloadSize: usize): usize { // @ts-ignore: decorator @unsafe @inline export function REGISTER(ref: usize): T { + if (!isReference()) ERROR("reference expected"); return changetype(doRegister(ref, CLASSID())); } @@ -137,6 +138,8 @@ function doRegister(ref: usize, classId: u32): usize { // @ts-ignore: decorator @unsafe @inline export function LINK(ref: T, parentRef: TParent): void { + if (!isReference()) ERROR("reference expected"); + if (!isReference()) ERROR("reference expected"); doLink(changetype(ref), changetype(parentRef)); } @@ -174,7 +177,7 @@ function doWrapArray(buffer: ArrayBuffer, classId: u32, alignLog2: usize): usize var newBuffer = doRegister(doAllocate(bufferSize), classId); changetype(array).data = changetype(newBuffer); // links changetype(array).dataStart = changetype(newBuffer); - changetype(array).dataEnd = changetype(newBuffer) + bufferSize; + changetype(array).dataLength = bufferSize; store(changetype(array), (bufferSize >>> alignLog2), offsetof("length_")); memory.copy(changetype(newBuffer), changetype(buffer), bufferSize); return changetype(array); @@ -217,14 +220,14 @@ export abstract class ArrayBufferView { // @ts-ignore: decorator @unsafe - dataEnd: usize; + dataLength: u32; protected constructor(length: i32, alignLog2: i32) { if (length > MAX_BYTELENGTH >>> alignLog2) throw new RangeError("Invalid length"); var buffer = new ArrayBuffer(length = length << alignLog2); this.data = buffer; this.dataStart = changetype(buffer); - this.dataEnd = changetype(buffer) + length; + this.dataLength = length; } get byteOffset(): i32 { @@ -232,7 +235,7 @@ export abstract class ArrayBufferView { } get byteLength(): i32 { - return (this.dataEnd - this.dataStart); + return this.dataLength; } get length(): i32 { diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 6c242fbc82..13ec83c927 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -366,8 +366,8 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut charStr, load(changetype(this) + (i << 1)) ); - store(resultStart + (i << alignof()), REGISTER(charStr)); - LINK(charStr, result); + store(resultStart + (i << alignof()), charStr); // result[i] = charStr + LINK(REGISTER(charStr), result); } return result; } else if (!length) { diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index ff6170ec6e..9eb2beadc2 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -1,9 +1,9 @@ import { ALLOCATE, REGISTER, LINK, ArrayBufferView } from "./runtime"; import { COMPARATOR, SORT as SORT_IMPL } from "./util/sort"; -function clampToByte(value: i32): i32 { - return ~(value >> 31) & (((255 - value) >> 31) | value); // & 255 -} +// function clampToByte(value: i32): i32 { +// return ~(value >> 31) & (((255 - value) >> 31) | value); // & 255 +// } export class Int8Array extends ArrayBufferView { @@ -809,7 +809,7 @@ function SUBARRAY( var dataStart = array.dataStart; changetype(out).data = data; // links changetype(out).dataStart = dataStart + (begin << alignof()); - changetype(out).dataEnd = dataStart + (end << alignof()); + changetype(out).dataLength = (end - begin) << alignof(); return out; } diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 3cefcded38..f9cc0a7cf6 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -123,7 +123,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -137,7 +137,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index b535ebddd0..deb133fbd3 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -160,7 +160,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -175,7 +175,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 0496a5f268..b223702c11 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -62,7 +62,7 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00\16\00\00\00s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s") (data (i32.const 40) "\02\00\00\00 \00\00\00)\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe") - (data (i32.const 80) "\03\00\00\00\10\00\00\000\00\00\000\00\00\00P\00\00\00\04") + (data (i32.const 80) "\03\00\00\00\10\00\00\000\00\00\000\00\00\00 \00\00\00\04") (data (i32.const 104) "\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) @@ -3489,8 +3489,7 @@ (local $7 i32) (local $8 i64) (local $9 i32) - (local $10 i32) - (local $11 i64) + (local $10 i64) local.get $0 i32.reinterpret_f32 local.tee $3 @@ -3782,6 +3781,8 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.0 end + i32.const 92 + i32.load local.get $3 i32.const 23 i32.shr_s @@ -3793,17 +3794,18 @@ local.tee $9 i32.const 3 i32.shl - local.tee $10 - i32.const 92 - i32.load i32.add i64.load - local.set $11 + local.set $10 i32.const 92 i32.load - local.get $10 + local.get $9 + i32.const 1 + i32.add + i32.const 3 + i32.shl i32.add - i64.load offset=8 + i64.load local.set $5 local.get $6 i32.const 63 @@ -3821,10 +3823,12 @@ i32.const 92 i32.load local.get $9 + i32.const 2 + i32.add i32.const 3 i32.shl i32.add - i64.load offset=16 + i64.load i64.const 96 local.get $6 i64.extend_i32_s @@ -3851,7 +3855,7 @@ local.tee $5 i64.sub i64.shr_u - local.get $11 + local.get $10 local.get $5 i64.shl i64.or @@ -9282,8 +9286,7 @@ (local $7 i32) (local $8 i64) (local $9 i32) - (local $10 i32) - (local $11 i64) + (local $10 i64) local.get $0 i32.reinterpret_f32 local.tee $3 @@ -9608,6 +9611,8 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.1 end + i32.const 92 + i32.load local.get $3 i32.const 23 i32.shr_s @@ -9619,17 +9624,18 @@ local.tee $9 i32.const 3 i32.shl - local.tee $10 - i32.const 92 - i32.load i32.add i64.load - local.set $11 + local.set $10 i32.const 92 i32.load - local.get $10 + local.get $9 + i32.const 1 i32.add - i64.load offset=8 + i32.const 3 + i32.shl + i32.add + i64.load local.set $5 local.get $6 i32.const 63 @@ -9647,10 +9653,12 @@ i32.const 92 i32.load local.get $9 + i32.const 2 + i32.add i32.const 3 i32.shl i32.add - i64.load offset=16 + i64.load i64.const 96 local.get $6 i64.extend_i32_s @@ -9677,7 +9685,7 @@ local.tee $5 i64.sub i64.shr_u - local.get $11 + local.get $10 local.get $5 i64.shl i64.or @@ -10008,8 +10016,7 @@ (local $7 i32) (local $8 i64) (local $9 i32) - (local $10 i32) - (local $11 i64) + (local $10 i64) local.get $0 i32.reinterpret_f32 local.tee $4 @@ -10327,6 +10334,8 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.2 end + i32.const 92 + i32.load local.get $4 i32.const 23 i32.shr_s @@ -10338,17 +10347,18 @@ local.tee $9 i32.const 3 i32.shl - local.tee $10 - i32.const 92 - i32.load i32.add i64.load - local.set $11 + local.set $10 i32.const 92 i32.load - local.get $10 + local.get $9 + i32.const 1 i32.add - i64.load offset=8 + i32.const 3 + i32.shl + i32.add + i64.load local.set $5 local.get $6 i32.const 63 @@ -10366,10 +10376,12 @@ i32.const 92 i32.load local.get $9 + i32.const 2 + i32.add i32.const 3 i32.shl i32.add - i64.load offset=16 + i64.load i64.const 96 local.get $6 i64.extend_i32_s @@ -10396,7 +10408,7 @@ local.tee $5 i64.sub i64.shr_u - local.get $11 + local.get $10 local.get $5 i64.shl i64.or diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index 7b3a25466f..64ab902580 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -63,7 +63,7 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00\16\00\00\00s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s\00") (data (i32.const 40) "\02\00\00\00 \00\00\00)\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe") - (data (i32.const 80) "\03\00\00\00\10\00\00\000\00\00\000\00\00\00P\00\00\00\04\00\00\00") + (data (i32.const 80) "\03\00\00\00\10\00\00\000\00\00\000\00\00\00 \00\00\00\04\00\00\00") (data (i32.const 104) "\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) @@ -4746,6 +4746,8 @@ i32.const 88 i32.load offset=4 local.get $14 + i32.const 0 + i32.add i32.const 3 i32.shl i32.add @@ -4754,10 +4756,12 @@ i32.const 88 i32.load offset=4 local.get $14 + i32.const 1 + i32.add i32.const 3 i32.shl i32.add - i64.load offset=8 + i64.load local.set $17 local.get $15 i32.const 32 @@ -4766,10 +4770,12 @@ i32.const 88 i32.load offset=4 local.get $14 + i32.const 2 + i32.add i32.const 3 i32.shl i32.add - i64.load offset=16 + i64.load local.set $19 local.get $19 i64.const 96 @@ -11762,6 +11768,8 @@ i32.const 88 i32.load offset=4 local.get $14 + i32.const 0 + i32.add i32.const 3 i32.shl i32.add @@ -11770,10 +11778,12 @@ i32.const 88 i32.load offset=4 local.get $14 + i32.const 1 + i32.add i32.const 3 i32.shl i32.add - i64.load offset=8 + i64.load local.set $17 local.get $15 i32.const 32 @@ -11782,10 +11792,12 @@ i32.const 88 i32.load offset=4 local.get $14 + i32.const 2 + i32.add i32.const 3 i32.shl i32.add - i64.load offset=16 + i64.load local.set $19 local.get $19 i64.const 96 @@ -12748,6 +12760,8 @@ i32.const 88 i32.load offset=4 local.get $16 + i32.const 0 + i32.add i32.const 3 i32.shl i32.add @@ -12756,10 +12770,12 @@ i32.const 88 i32.load offset=4 local.get $16 + i32.const 1 + i32.add i32.const 3 i32.shl i32.add - i64.load offset=8 + i64.load local.set $19 local.get $17 i32.const 32 @@ -12768,10 +12784,12 @@ i32.const 88 i32.load offset=4 local.get $16 + i32.const 2 + i32.add i32.const 3 i32.shl i32.add - i64.load offset=16 + i64.load local.set $21 local.get $21 i64.const 96 diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index b1834c3e68..08556684c7 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -121,7 +121,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -135,7 +135,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 0eb8eb6ac5..486977343b 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -162,7 +162,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -177,7 +177,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 3286fc68b6..4dc4e80b4e 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -4,14 +4,14 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\08\00\00\00\01\00\00\00\02") - (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\18\00\00\00\02") + (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\08\00\00\00\02") (data (i32.const 48) "\01\00\00\00\10\00\00\00\03\00\00\00\00\00\00\00\04") - (data (i32.const 72) "\03\00\00\00\10\00\00\008\00\00\008\00\00\00H\00\00\00\02") + (data (i32.const 72) "\03\00\00\00\10\00\00\008\00\00\008\00\00\00\10\00\00\00\02") (data (i32.const 96) "\01\00\00\00\08\00\00\00\00\00\c0?\00\00 @") - (data (i32.const 112) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00p\00\00\00\02") + (data (i32.const 112) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00\08\00\00\00\02") (data (i32.const 136) "\01\00\00\00\10") (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\a0\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") (table $0 1 funcref) (elem (i32.const 0) $null) @@ -26,33 +26,47 @@ if i32.const 0 i32.const 192 - i32.const 8 + i32.const 6 i32.const 0 call $~lib/env/abort unreachable end i32.const 36 i32.load + i32.const -1 + i32.const 0 + i32.const 40 + i32.load + i32.lt_u + select i32.load i32.const 1 i32.ne if i32.const 0 i32.const 192 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable end i32.const 36 i32.load - i32.load offset=4 + 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.ne if i32.const 0 i32.const 192 - i32.const 10 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -63,13 +77,19 @@ i32.store i32.const 36 i32.load + i32.const -1 + i32.const 0 + i32.const 40 + i32.load + i32.lt_u + select i32.load i32.const 2 i32.ne if i32.const 0 i32.const 192 - i32.const 12 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -81,33 +101,47 @@ if i32.const 0 i32.const 192 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable end i32.const 84 i32.load + i32.const -1 + i32.const 0 + i32.const 88 + i32.load + i32.lt_u + select i64.load i64.const 3 i64.ne if i32.const 0 i32.const 192 - i32.const 15 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable end i32.const 84 i32.load - i64.load offset=8 + 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.ne if i32.const 0 i32.const 192 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -118,13 +152,19 @@ i64.store i32.const 84 i32.load + i32.const -1 + i32.const 0 + i32.const 88 + i32.load + i32.lt_u + select i64.load i64.const 4 i64.ne if i32.const 0 i32.const 192 - i32.const 18 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -136,33 +176,47 @@ if i32.const 0 i32.const 192 - i32.const 20 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable end i32.const 124 i32.load + i32.const -1 + i32.const 0 + i32.const 128 + i32.load + i32.lt_u + select f32.load f32.const 1.5 f32.ne if i32.const 0 i32.const 192 - i32.const 21 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable end i32.const 124 i32.load - f32.load offset=4 + 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.ne if i32.const 0 i32.const 192 - i32.const 22 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -173,13 +227,19 @@ f32.store i32.const 124 i32.load + i32.const -1 + i32.const 0 + i32.const 128 + i32.load + i32.lt_u + select f32.load f32.const 2.5 f32.ne if i32.const 0 i32.const 192 - i32.const 24 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -191,33 +251,47 @@ if i32.const 0 i32.const 192 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable end i32.const 172 i32.load + i32.const -1 + i32.const 0 + i32.const 176 + i32.load + i32.lt_u + select f64.load f64.const 1.25 f64.ne if i32.const 0 i32.const 192 - i32.const 27 + i32.const 25 i32.const 0 call $~lib/env/abort unreachable end i32.const 172 i32.load - f64.load offset=8 + 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.ne if i32.const 0 i32.const 192 - i32.const 28 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -228,13 +302,19 @@ f64.store i32.const 172 i32.load + i32.const -1 + i32.const 0 + i32.const 176 + i32.load + i32.lt_u + select f64.load f64.const 2.25 f64.ne if i32.const 0 i32.const 192 - i32.const 30 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/static-array.ts b/tests/compiler/std/static-array.ts index 535d3d8aee..4fee0db3e0 100644 --- a/tests/compiler/std/static-array.ts +++ b/tests/compiler/std/static-array.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; // needed just because std/Array#[]= calls __grow conditionally - const i: i32[] = [1, 2]; const I: i64[] = [3, 4]; const f: f32[] = [1.5, 2.5]; diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 9a06134cd6..24b6ac34f1 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -5,13 +5,13 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\18\00\00\00\02\00\00\00") + (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\08\00\00\00\02\00\00\00") (data (i32.const 48) "\01\00\00\00\10\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00") - (data (i32.const 72) "\03\00\00\00\10\00\00\008\00\00\008\00\00\00H\00\00\00\02\00\00\00") + (data (i32.const 72) "\03\00\00\00\10\00\00\008\00\00\008\00\00\00\10\00\00\00\02\00\00\00") (data (i32.const 96) "\01\00\00\00\08\00\00\00\00\00\c0?\00\00 @") - (data (i32.const 112) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00p\00\00\00\02\00\00\00") + (data (i32.const 112) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00\08\00\00\00\02\00\00\00") (data (i32.const 136) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\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\a0\00\00\00\02\00\00\00") + (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\00\00\00") (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\00") (table $0 1 funcref) (elem (i32.const 0) $null) @@ -43,6 +43,8 @@ i32.load offset=12 ) (func $start:std/static-array (; 5 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) global.get $std/static-array/i call $~lib/array/Array#get:length i32.const 2 @@ -51,13 +53,25 @@ if i32.const 0 i32.const 192 - i32.const 8 + i32.const 6 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/i + local.tee $0 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 1 i32.eq @@ -65,21 +79,33 @@ if i32.const 0 i32.const 192 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/i + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 2 i32.eq i32.eqz if i32.const 0 i32.const 192 - i32.const 10 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -89,7 +115,19 @@ i32.const 2 i32.store global.get $std/static-array/i + local.tee $0 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 2 i32.eq @@ -97,7 +135,7 @@ if i32.const 0 i32.const 192 - i32.const 12 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -110,13 +148,25 @@ if i32.const 0 i32.const 192 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/I + local.tee $0 i32.load offset=4 + i32.const 0 + i32.const 3 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i64.load i64.const 3 i64.eq @@ -124,21 +174,33 @@ if i32.const 0 i32.const 192 - i32.const 15 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/I + local.tee $0 i32.load offset=4 - i64.load offset=8 + i32.const 1 + i32.const 3 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 4 i64.eq i32.eqz if i32.const 0 i32.const 192 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -148,7 +210,19 @@ i64.const 4 i64.store global.get $std/static-array/I + local.tee $0 i32.load offset=4 + i32.const 0 + i32.const 3 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i64.load i64.const 4 i64.eq @@ -156,7 +230,7 @@ if i32.const 0 i32.const 192 - i32.const 18 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -169,13 +243,25 @@ if i32.const 0 i32.const 192 - i32.const 20 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/f + local.tee $0 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select f32.load f32.const 1.5 f32.eq @@ -183,21 +269,33 @@ if i32.const 0 i32.const 192 - i32.const 21 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/f + local.tee $0 i32.load offset=4 - f32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + f32.load f32.const 2.5 f32.eq i32.eqz if i32.const 0 i32.const 192 - i32.const 22 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -207,7 +305,19 @@ f32.const 2.5 f32.store global.get $std/static-array/f + local.tee $0 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select f32.load f32.const 2.5 f32.eq @@ -215,7 +325,7 @@ if i32.const 0 i32.const 192 - i32.const 24 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -228,13 +338,25 @@ if i32.const 0 i32.const 192 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/F + local.tee $0 i32.load offset=4 + i32.const 0 + i32.const 3 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select f64.load f64.const 1.25 f64.eq @@ -242,21 +364,33 @@ if i32.const 0 i32.const 192 - i32.const 27 + i32.const 25 i32.const 0 call $~lib/env/abort unreachable end global.get $std/static-array/F + local.tee $0 i32.load offset=4 - f64.load offset=8 + i32.const 1 + i32.const 3 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + f64.load f64.const 2.25 f64.eq i32.eqz if i32.const 0 i32.const 192 - i32.const 28 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -266,7 +400,19 @@ f64.const 2.25 f64.store global.get $std/static-array/F + local.tee $0 i32.load offset=4 + i32.const 0 + i32.const 3 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select f64.load f64.const 2.25 f64.eq @@ -274,7 +420,7 @@ if i32.const 0 i32.const 192 - i32.const 30 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 5c97af7e32..4e3a90ec66 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -309,7 +309,7 @@ if i32.const 0 i32.const 136 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -323,7 +323,7 @@ if i32.const 0 i32.const 136 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -3088,7 +3088,7 @@ if i32.const 0 i32.const 136 - i32.const 223 + i32.const 226 i32.const 57 call $~lib/env/abort unreachable @@ -3240,7 +3240,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/Array#resize (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureLength (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3260,20 +3260,19 @@ if i32.const 0 i32.const 1440 - i32.const 37 - i32.const 41 + i32.const 12 + i32.const 59 call $~lib/env/abort unreachable end local.get $2 - local.tee $3 + local.get $2 local.get $1 i32.const 2 i32.shl - local.tee $2 + local.tee $3 call $~lib/runtime/doReallocate local.tee $1 - local.get $3 i32.ne if local.get $0 @@ -3284,7 +3283,7 @@ i32.store offset=4 local.get $0 local.get $1 - local.get $2 + local.get $3 i32.add i32.store offset=8 end @@ -3293,7 +3292,7 @@ (func $~lib/array/Array#__set (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 i32.const 1 - call $~lib/array/Array#resize + call $~lib/array/ensureLength local.get $0 i32.load offset=4 local.get $1 @@ -3318,7 +3317,7 @@ if i32.const 0 i32.const 136 - i32.const 196 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -3338,7 +3337,7 @@ i32.const 1 i32.add local.tee $2 - call $~lib/array/Array#resize + call $~lib/array/ensureLength local.get $0 local.get $2 i32.store offset=12 @@ -3467,10 +3466,10 @@ local.get $5 i32.add local.get $1 - i32.const 1 - call $~lib/runtime/doRegister i32.store local.get $1 + i32.const 1 + call $~lib/runtime/doRegister local.get $3 call $~lib/runtime/doLink local.get $4 diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 149ed9b6f3..683f6bce2f 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -366,7 +366,7 @@ if i32.const 0 i32.const 136 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -381,7 +381,7 @@ if i32.const 0 i32.const 136 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -3807,7 +3807,7 @@ if i32.const 0 i32.const 136 - i32.const 223 + i32.const 226 i32.const 57 call $~lib/env/abort unreachable @@ -3989,62 +3989,64 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/Array#resize (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/array/ensureLength (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) local.get $0 i32.load - local.set $2 - local.get $2 + local.set $3 + local.get $3 call $~lib/arraybuffer/ArrayBuffer#get:byteLength - i32.const 2 + local.get $2 i32.shr_u - local.set $3 + local.set $4 local.get $1 - local.get $3 + local.get $4 i32.gt_u if local.get $1 - i32.const 268435454 + global.get $~lib/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u i32.gt_u if i32.const 0 i32.const 1440 - i32.const 37 - i32.const 41 + i32.const 12 + i32.const 59 call $~lib/env/abort unreachable end local.get $1 - i32.const 2 + local.get $2 i32.shl - local.set $4 + local.set $5 block $~lib/runtime/REALLOCATE|inlined.0 (result i32) - local.get $2 - local.set $5 - local.get $4 + local.get $3 local.set $6 local.get $5 + local.set $7 local.get $6 + local.get $7 call $~lib/runtime/doReallocate end - local.set $6 - local.get $6 - local.get $2 + local.set $7 + local.get $7 + local.get $3 i32.ne if local.get $0 - local.get $6 + local.get $7 i32.store local.get $0 - local.get $6 + local.get $7 i32.store offset=4 local.get $0 - local.get $6 - local.get $4 + local.get $7 + local.get $5 i32.add i32.store offset=8 end @@ -4055,7 +4057,8 @@ local.get $1 i32.const 1 i32.add - call $~lib/array/Array#resize + i32.const 2 + call $~lib/array/ensureLength local.get $0 i32.load offset=4 local.get $1 @@ -4087,7 +4090,7 @@ if i32.const 0 i32.const 136 - i32.const 196 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -4099,7 +4102,7 @@ local.get $1 call $~lib/runtime/assertRegistered ) - (func $~lib/runtime/LINK> (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/runtime/LINK> (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/runtime/doLink @@ -4113,7 +4116,8 @@ local.set $2 local.get $0 local.get $2 - call $~lib/array/Array#resize + i32.const 2 + call $~lib/array/ensureLength local.get $0 local.get $2 i32.store offset=12 @@ -4249,6 +4253,8 @@ i32.const 2 i32.shl i32.add + local.get $8 + i32.store block $~lib/runtime/REGISTER|inlined.7 (result i32) local.get $8 local.set $9 @@ -4256,10 +4262,8 @@ i32.const 1 call $~lib/runtime/doRegister end - i32.store - local.get $8 local.get $3 - call $~lib/runtime/LINK> + call $~lib/runtime/LINK> end local.get $7 i32.const 1 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 14eb1234fc..8a1e5dc1ac 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -49,13 +49,13 @@ (data (i32.const 472) "\01\00\00\00\1e\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") (data (i32.const 512) "\01\00\00\00(\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") (data (i32.const 560) "\02\00\00\00\0c\00\00\00\n\00\00\00\0c\00\00\00\0e") - (data (i32.const 584) "\10\00\00\00\10\00\00\008\02\00\008\02\00\00D\02\00\00\03") + (data (i32.const 584) "\10\00\00\00\10\00\00\008\02\00\008\02\00\00\0c\00\00\00\03") (data (i32.const 608) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") (data (i32.const 664) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h") (data (i32.const 720) "\01\00\00\00>\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h") (data (i32.const 792) "\01\00\00\006\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") (data (i32.const 856) "\02\00\00\00$\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") - (data (i32.const 904) "\10\00\00\00\10\00\00\00`\03\00\00`\03\00\00\84\03\00\00\t") + (data (i32.const 904) "\10\00\00\00\10\00\00\00`\03\00\00`\03\00\00$\00\00\00\t") (data (i32.const 928) "\01\00\00\00B\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") (data (i32.const 1008) "\01\00\00\00V\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") (table $0 112 funcref) @@ -396,7 +396,7 @@ if i32.const 0 i32.const 64 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -410,7 +410,7 @@ if i32.const 0 i32.const 64 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -458,7 +458,7 @@ if i32.const 0 i32.const 64 - i32.const 223 + i32.const 226 i32.const 57 call $~lib/env/abort unreachable @@ -495,8 +495,6 @@ i32.store offset=4 local.get $0 local.get $1 - local.get $2 - i32.add i32.store offset=8 local.get $0 ) @@ -622,9 +620,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub local.get $0 i32.ne if @@ -637,9 +632,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub local.get $0 i32.ne if @@ -668,9 +660,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub local.get $0 i32.ne if @@ -683,9 +672,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub local.get $0 i32.ne if @@ -713,9 +699,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub local.get $0 i32.ne if @@ -728,9 +711,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub local.get $0 i32.ne if @@ -758,9 +738,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub local.get $0 i32.const 1 i32.shl @@ -775,9 +752,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u local.get $0 @@ -807,9 +781,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub local.get $0 i32.const 1 i32.shl @@ -824,9 +795,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u local.get $0 @@ -856,9 +824,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub local.get $0 i32.const 2 i32.shl @@ -873,9 +838,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.get $0 @@ -905,9 +867,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub local.get $0 i32.const 2 i32.shl @@ -922,9 +881,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.get $0 @@ -954,9 +910,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub local.get $0 i32.const 3 i32.shl @@ -971,9 +924,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.get $0 @@ -1003,9 +953,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub local.get $0 i32.const 3 i32.shl @@ -1020,9 +967,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.get $0 @@ -1052,9 +996,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub local.get $0 i32.const 2 i32.shl @@ -1069,9 +1010,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.get $0 @@ -1101,9 +1039,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub local.get $0 i32.const 3 i32.shl @@ -1118,9 +1053,6 @@ end local.get $1 i32.load offset=8 - local.get $1 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.get $0 @@ -1140,9 +1072,6 @@ local.get $0 local.tee $4 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.set $3 @@ -1161,9 +1090,8 @@ select else local.get $1 - local.tee $0 local.get $3 - local.get $0 + local.get $1 local.get $3 i32.lt_s select @@ -1218,10 +1146,10 @@ i32.store offset=4 local.get $0 local.get $2 + local.get $1 + i32.sub i32.const 2 i32.shl - local.get $3 - i32.add i32.store offset=8 local.get $0 ) @@ -1231,9 +1159,6 @@ local.get $0 local.tee $4 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.set $3 @@ -1252,9 +1177,8 @@ select else local.get $1 - local.tee $0 local.get $3 - local.get $0 + local.get $1 local.get $3 i32.lt_s select @@ -1309,10 +1233,10 @@ i32.store offset=4 local.get $0 local.get $2 + local.get $1 + i32.sub i32.const 3 i32.shl - local.get $3 - i32.add i32.store offset=8 local.get $0 ) @@ -1661,9 +1585,6 @@ block $~lib/typedarray/SORT|inlined.0 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.tee $2 @@ -1754,9 +1675,6 @@ local.set $5 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub local.set $4 local.get $2 i32.const 0 @@ -2929,9 +2847,7 @@ local.get $1 i32.store offset=4 local.get $3 - local.get $1 local.get $4 - i32.add i32.store offset=8 local.get $3 local.get $4 @@ -2947,13 +2863,10 @@ (func $std/typedarray/isInt8ArrayEqual (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - local.get $1 - i32.load offset=12 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub + local.get $1 + i32.load offset=12 i32.ne if i32.const 0 @@ -2961,9 +2874,6 @@ end local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub local.set $3 loop $repeat|0 local.get $2 @@ -2974,11 +2884,23 @@ i32.load offset=4 local.get $2 i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load8_s local.get $1 i32.load offset=4 local.get $2 i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load8_s i32.ne if @@ -3002,9 +2924,6 @@ local.get $0 local.tee $4 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub local.set $3 local.get $1 i32.const 0 @@ -3021,9 +2940,8 @@ select else local.get $1 - local.tee $0 local.get $3 - local.get $0 + local.get $1 local.get $3 i32.lt_s select @@ -3076,8 +2994,8 @@ i32.store offset=4 local.get $0 local.get $2 - local.get $3 - i32.add + local.get $1 + i32.sub i32.store offset=8 local.get $0 ) @@ -3089,9 +3007,6 @@ local.set $5 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.set $4 @@ -3168,9 +3083,6 @@ i32.load offset=12 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u i32.ne @@ -3180,29 +3092,38 @@ end local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u - local.set $3 + local.set $4 loop $repeat|0 local.get $2 - local.get $3 + local.get $4 i32.lt_s if local.get $2 i32.const 2 i32.shl - local.tee $4 + local.tee $3 local.get $0 i32.load offset=4 i32.add + i32.const -1 + local.get $3 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load local.get $1 i32.load offset=4 - local.get $4 + local.get $3 i32.add + i32.const -1 + local.get $3 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load i32.ne if @@ -3235,9 +3156,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub local.set $4 loop $repeat|0 local.get $1 @@ -3306,9 +3224,6 @@ local.set $4 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub local.set $5 loop $repeat|0 local.get $2 @@ -3411,9 +3326,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u local.set $4 @@ -3486,9 +3398,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u local.set $4 @@ -3561,9 +3470,6 @@ local.set $4 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.set $5 @@ -3670,9 +3576,6 @@ local.set $4 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.set $5 @@ -3779,9 +3682,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.set $4 @@ -3857,9 +3757,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.set $4 @@ -3929,9 +3826,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.sub local.set $1 @@ -4001,9 +3895,6 @@ local.set $4 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.sub local.set $2 @@ -4107,9 +3998,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u i32.const 1 @@ -4183,9 +4071,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u i32.const 1 @@ -4259,9 +4144,6 @@ local.set $4 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u i32.const 1 @@ -4364,9 +4246,6 @@ local.set $4 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u i32.const 1 @@ -4469,9 +4348,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u i32.const 1 @@ -4543,9 +4419,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u i32.const 1 @@ -4624,9 +4497,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub local.tee $2 local.set $4 local.get $2 @@ -4682,6 +4552,12 @@ call $~lib/typedarray/Int8Array#map local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load8_s i32.const 1 i32.ne @@ -4695,7 +4571,15 @@ end local.get $0 i32.load offset=4 - i32.load8_s offset=1 + i32.const 1 + i32.add + i32.const -1 + i32.const 1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 4 i32.ne if @@ -4708,7 +4592,15 @@ end local.get $0 i32.load offset=4 - i32.load8_s offset=2 + i32.const 2 + i32.add + i32.const -1 + i32.const 2 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 9 i32.ne if @@ -4731,9 +4623,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub local.tee $2 local.set $4 i32.const 0 @@ -4791,6 +4680,12 @@ call $~lib/typedarray/Uint8Array#map local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load8_u i32.const 1 i32.ne @@ -4804,7 +4699,15 @@ end local.get $0 i32.load offset=4 - i32.load8_u offset=1 + i32.const 1 + i32.add + i32.const -1 + i32.const 1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 4 i32.ne if @@ -4817,7 +4720,15 @@ end local.get $0 i32.load offset=4 - i32.load8_u offset=2 + i32.const 2 + i32.add + i32.const -1 + i32.const 2 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 9 i32.ne if @@ -4840,9 +4751,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub local.tee $2 local.set $4 local.get $2 @@ -4880,6 +4788,7 @@ ) (func $std/typedarray/testArrayMap (; 82 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $0 @@ -4896,8 +4805,15 @@ i32.store8 offset=2 local.get $0 call $~lib/typedarray/Uint8ClampedArray#map + local.tee $1 local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load8_u i32.const 1 i32.ne @@ -4909,9 +4825,18 @@ call $~lib/env/abort unreachable end - local.get $0 + local.get $1 + local.tee $0 i32.load offset=4 - i32.load8_u offset=1 + i32.const 1 + i32.add + i32.const -1 + i32.const 1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 4 i32.ne if @@ -4924,7 +4849,15 @@ end local.get $0 i32.load offset=4 - i32.load8_u offset=2 + i32.const 2 + i32.add + i32.const -1 + i32.const 2 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 9 i32.ne if @@ -4949,9 +4882,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u local.tee $2 @@ -5014,6 +4944,12 @@ call $~lib/typedarray/Int16Array#map local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load16_s i32.const 1 i32.ne @@ -5027,7 +4963,15 @@ end local.get $0 i32.load offset=4 - i32.load16_s offset=2 + i32.const 2 + i32.add + i32.const -1 + i32.const 2 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load16_s i32.const 4 i32.ne if @@ -5040,7 +4984,15 @@ end local.get $0 i32.load offset=4 - i32.load16_s 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.load16_s i32.const 9 i32.ne if @@ -5065,9 +5017,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u local.tee $2 @@ -5130,6 +5079,12 @@ call $~lib/typedarray/Uint16Array#map local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load16_u i32.const 1 i32.ne @@ -5143,7 +5098,15 @@ end local.get $0 i32.load offset=4 - i32.load16_u offset=2 + i32.const 2 + i32.add + i32.const -1 + i32.const 2 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load16_u i32.const 4 i32.ne if @@ -5156,7 +5119,15 @@ end local.get $0 i32.load offset=4 - i32.load16_u 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.load16_u i32.const 9 i32.ne if @@ -5181,9 +5152,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.tee $2 @@ -5246,6 +5214,12 @@ call $~lib/typedarray/Int32Array#map local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 1 i32.ne @@ -5259,7 +5233,15 @@ end local.get $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 4 i32.ne if @@ -5272,7 +5254,15 @@ end local.get $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 9 i32.ne if @@ -5297,9 +5287,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.tee $2 @@ -5362,6 +5349,12 @@ call $~lib/typedarray/Uint32Array#map local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 1 i32.ne @@ -5375,7 +5368,15 @@ end local.get $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 4 i32.ne if @@ -5388,7 +5389,15 @@ end local.get $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 9 i32.ne if @@ -5418,9 +5427,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.tee $2 @@ -5483,6 +5489,12 @@ call $~lib/typedarray/Int64Array#map local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i64.load i64.const 1 i64.ne @@ -5496,7 +5508,15 @@ end local.get $0 i32.load offset=4 - i64.load offset=8 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 4 i64.ne if @@ -5509,7 +5529,15 @@ end local.get $0 i32.load offset=4 - i64.load offset=16 + i32.const 16 + i32.add + i32.const -1 + i32.const 16 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 9 i64.ne if @@ -5534,9 +5562,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.tee $2 @@ -5599,6 +5624,12 @@ call $~lib/typedarray/Uint64Array#map local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i64.load i64.const 1 i64.ne @@ -5612,7 +5643,15 @@ end local.get $0 i32.load offset=4 - i64.load offset=8 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 4 i64.ne if @@ -5625,7 +5664,15 @@ end local.get $0 i32.load offset=4 - i64.load offset=16 + i32.const 16 + i32.add + i32.const -1 + i32.const 16 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 9 i64.ne if @@ -5655,9 +5702,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.tee $2 @@ -5720,6 +5764,12 @@ call $~lib/typedarray/Float32Array#map local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select f32.load f32.const 1 f32.ne @@ -5733,7 +5783,15 @@ end local.get $0 i32.load offset=4 - f32.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 + f32.load f32.const 4 f32.ne if @@ -5746,7 +5804,15 @@ end local.get $0 i32.load offset=4 - f32.load offset=8 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 + i32.lt_u + select + f32.load f32.const 9 f32.ne if @@ -5776,9 +5842,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.tee $2 @@ -5841,6 +5904,12 @@ call $~lib/typedarray/Float64Array#map local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select f64.load f64.const 1 f64.ne @@ -5854,7 +5923,15 @@ end local.get $0 i32.load offset=4 - f64.load offset=8 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 + i32.lt_u + select + f64.load f64.const 4 f64.ne if @@ -5867,7 +5944,15 @@ end local.get $0 i32.load offset=4 - f64.load offset=16 + i32.const 16 + i32.add + i32.const -1 + i32.const 16 + local.get $0 + i32.load offset=8 + i32.lt_u + select + f64.load f64.const 9 f64.ne if @@ -5896,9 +5981,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub local.set $4 loop $repeat|0 local.get $2 @@ -5984,9 +6066,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub local.set $4 loop $repeat|0 local.get $2 @@ -6114,9 +6193,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u local.set $4 @@ -6206,9 +6282,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u local.set $4 @@ -6297,9 +6370,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.set $4 @@ -6432,9 +6502,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.set $4 @@ -6568,9 +6635,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.set $4 @@ -6664,9 +6728,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.set $4 @@ -6757,9 +6818,6 @@ local.set $0 local.get $2 i32.load offset=8 - local.get $2 - i32.load offset=4 - i32.sub local.set $4 block $~lib/typedarray/FIND_INDEX|inlined.0 loop $repeat|0 @@ -6852,9 +6910,6 @@ local.set $0 local.get $2 i32.load offset=8 - local.get $2 - i32.load offset=4 - i32.sub local.set $4 block $~lib/typedarray/FIND_INDEX|inlined.0 loop $repeat|0 @@ -6984,9 +7039,6 @@ local.set $0 local.get $2 i32.load offset=8 - local.get $2 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u local.set $4 @@ -7083,9 +7135,6 @@ local.set $0 local.get $2 i32.load offset=8 - local.get $2 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u local.set $4 @@ -7175,9 +7224,6 @@ local.set $0 local.get $2 i32.load offset=8 - local.get $2 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.set $4 @@ -7315,9 +7361,6 @@ local.set $0 local.get $2 i32.load offset=8 - local.get $2 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.set $4 @@ -7455,9 +7498,6 @@ local.set $0 local.get $2 i32.load offset=8 - local.get $2 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.set $4 @@ -7552,9 +7592,6 @@ local.set $0 local.get $2 i32.load offset=8 - local.get $2 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.set $4 @@ -7657,9 +7694,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub local.set $4 loop $repeat|0 local.get $2 @@ -7746,9 +7780,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub local.set $4 loop $repeat|0 local.get $2 @@ -7880,9 +7911,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u local.set $4 @@ -7967,9 +7995,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u local.set $4 @@ -8060,9 +8085,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.set $4 @@ -8194,9 +8216,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.set $4 @@ -8485,9 +8504,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.set $4 @@ -8737,9 +8753,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.set $4 @@ -8815,15 +8828,24 @@ end ) (func $std/typedarray/testArrayForEach~anonymous|0 (; 187 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) local.get $0 i32.const 255 i32.and - global.get $std/typedarray/forEachValues - i32.load offset=4 local.get $1 i32.const 2 i32.shl + local.tee $0 + global.get $std/typedarray/forEachValues + local.tee $3 + i32.load offset=4 i32.add + i32.const -1 + local.get $0 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 255 i32.and @@ -8872,9 +8894,6 @@ local.set $2 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub local.set $3 loop $repeat|0 local.get $1 @@ -8902,32 +8921,57 @@ (func $std/typedarray/testArrayForEach (; 189 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $0 + local.tee $1 global.set $std/typedarray/forEachSelf - local.get $0 + local.get $1 i32.load offset=4 global.get $std/typedarray/forEachValues - local.tee $1 + local.tee $2 + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.store8 - local.get $0 - i32.load offset=4 local.get $1 i32.load offset=4 - i32.load offset=4 - i32.store8 offset=1 local.get $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.store8 offset=1 local.get $1 i32.load offset=4 + local.get $2 + local.tee $0 + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.store8 offset=2 - local.get $0 + local.get $1 call $~lib/typedarray/Int8Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -8950,9 +8994,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub local.set $4 loop $repeat|0 local.get $2 @@ -8980,33 +9021,58 @@ (func $std/typedarray/testArrayForEach (; 191 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 i32.const 3 call $~lib/typedarray/Uint8Array#constructor - local.tee $0 + local.tee $1 global.set $std/typedarray/forEachSelf - local.get $0 + local.get $1 i32.load offset=4 global.get $std/typedarray/forEachValues - local.tee $1 + local.tee $2 + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.store8 - local.get $0 - i32.load offset=4 local.get $1 i32.load offset=4 - i32.load offset=4 - i32.store8 offset=1 local.get $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.store8 offset=1 local.get $1 i32.load offset=4 + local.get $2 + local.tee $0 + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.store8 offset=2 - local.get $0 + local.get $1 i32.const 102 call $~lib/typedarray/Uint8Array#forEach global.get $std/typedarray/forEachCallCount @@ -9035,7 +9101,14 @@ i32.load offset=4 global.get $std/typedarray/forEachValues local.tee $2 + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 255 i32.and @@ -9056,8 +9129,17 @@ local.get $1 i32.load offset=4 local.get $2 + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 255 i32.and local.tee $0 @@ -9077,8 +9159,17 @@ local.get $1 i32.load offset=4 local.get $2 + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 255 i32.and local.tee $0 @@ -9111,15 +9202,24 @@ end ) (func $std/typedarray/testArrayForEach~anonymous|0 (; 193 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) local.get $0 i32.const 65535 i32.and - global.get $std/typedarray/forEachValues - i32.load offset=4 local.get $1 i32.const 2 i32.shl + local.tee $0 + global.get $std/typedarray/forEachValues + local.tee $3 + i32.load offset=4 i32.add + i32.const -1 + local.get $0 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 65535 i32.and @@ -9168,9 +9268,6 @@ local.set $2 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u local.set $3 @@ -9202,32 +9299,57 @@ (func $std/typedarray/testArrayForEach (; 195 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $0 + local.tee $1 global.set $std/typedarray/forEachSelf - local.get $0 + local.get $1 i32.load offset=4 global.get $std/typedarray/forEachValues - local.tee $1 + local.tee $2 + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.store16 - local.get $0 - i32.load offset=4 local.get $1 i32.load offset=4 - i32.load offset=4 - i32.store16 offset=2 local.get $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.store16 offset=2 local.get $1 i32.load offset=4 + local.get $2 + local.tee $0 + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.store16 offset=4 - local.get $0 + local.get $1 call $~lib/typedarray/Int16Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -9250,9 +9372,6 @@ local.set $2 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u local.set $3 @@ -9284,32 +9403,57 @@ (func $std/typedarray/testArrayForEach (; 197 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Uint16Array#constructor - local.tee $0 + local.tee $1 global.set $std/typedarray/forEachSelf - local.get $0 + local.get $1 i32.load offset=4 global.get $std/typedarray/forEachValues - local.tee $1 + local.tee $2 + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.store16 - local.get $0 - i32.load offset=4 local.get $1 i32.load offset=4 - i32.load offset=4 - i32.store16 offset=2 local.get $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.store16 offset=2 local.get $1 i32.load offset=4 + local.get $2 + local.tee $0 + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.store16 offset=4 - local.get $0 + local.get $1 call $~lib/typedarray/Uint16Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -9324,13 +9468,22 @@ end ) (func $std/typedarray/testArrayForEach~anonymous|0 (; 198 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) local.get $0 - global.get $std/typedarray/forEachValues - i32.load offset=4 local.get $1 i32.const 2 i32.shl + local.tee $0 + global.get $std/typedarray/forEachValues + local.tee $3 + i32.load offset=4 i32.add + i32.const -1 + local.get $0 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load i32.ne if @@ -9377,9 +9530,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.set $4 @@ -9411,32 +9561,57 @@ (func $std/typedarray/testArrayForEach (; 200 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Int32Array#constructor - local.tee $0 + local.tee $1 global.set $std/typedarray/forEachSelf - local.get $0 + local.get $1 i32.load offset=4 global.get $std/typedarray/forEachValues - local.tee $1 + local.tee $2 + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.store - local.get $0 - i32.load offset=4 local.get $1 i32.load offset=4 - i32.load offset=4 - i32.store offset=4 local.get $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.store offset=4 local.get $1 i32.load offset=4 + local.get $2 + local.tee $0 + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.store offset=8 - local.get $0 + local.get $1 i32.const 106 call $~lib/typedarray/Int32Array#forEach global.get $std/typedarray/forEachCallCount @@ -9454,32 +9629,57 @@ (func $std/typedarray/testArrayForEach (; 201 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Uint32Array#constructor - local.tee $0 + local.tee $1 global.set $std/typedarray/forEachSelf - local.get $0 + local.get $1 i32.load offset=4 global.get $std/typedarray/forEachValues - local.tee $1 + local.tee $2 + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.store - local.get $0 - i32.load offset=4 local.get $1 i32.load offset=4 - i32.load offset=4 - i32.store offset=4 local.get $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.store offset=4 local.get $1 i32.load offset=4 + local.get $2 + local.tee $0 + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.store offset=8 - local.get $0 + local.get $1 i32.const 107 call $~lib/typedarray/Int32Array#forEach global.get $std/typedarray/forEachCallCount @@ -9495,13 +9695,23 @@ end ) (func $std/typedarray/testArrayForEach~anonymous|0 (; 202 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 - global.get $std/typedarray/forEachValues - i32.load offset=4 local.get $1 i32.const 2 i32.shl + local.tee $3 + global.get $std/typedarray/forEachValues + local.tee $4 + i32.load offset=4 i32.add + i32.const -1 + local.get $3 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i64.extend_i32_s i64.ne @@ -9549,9 +9759,6 @@ local.set $3 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.set $4 @@ -9583,32 +9790,57 @@ (func $std/typedarray/testArrayForEach (; 204 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $0 + local.tee $1 global.set $std/typedarray/forEachSelf - local.get $0 + local.get $1 i32.load offset=4 global.get $std/typedarray/forEachValues - local.tee $1 + local.tee $2 + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i64.load32_s i64.store - local.get $0 - i32.load offset=4 local.get $1 i32.load offset=4 - i64.load32_s offset=4 - i64.store offset=8 local.get $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 + i64.load32_s + i64.store offset=8 local.get $1 i32.load offset=4 - i64.load32_s offset=8 - i64.store offset=16 + local.get $2 + local.tee $0 + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 local.get $0 + i32.load offset=8 + i32.lt_u + select + i64.load32_s + i64.store offset=16 + local.get $1 i32.const 108 call $~lib/typedarray/Int64Array#forEach global.get $std/typedarray/forEachCallCount @@ -9626,32 +9858,57 @@ (func $std/typedarray/testArrayForEach (; 205 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Uint64Array#constructor - local.tee $0 + local.tee $1 global.set $std/typedarray/forEachSelf - local.get $0 + local.get $1 i32.load offset=4 global.get $std/typedarray/forEachValues - local.tee $1 + local.tee $2 + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i64.load32_s i64.store - local.get $0 - i32.load offset=4 local.get $1 i32.load offset=4 - i64.load32_s offset=4 - i64.store offset=8 local.get $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 + i64.load32_s + i64.store offset=8 local.get $1 i32.load offset=4 - i64.load32_s offset=8 - i64.store offset=16 + local.get $2 + local.tee $0 + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 local.get $0 + i32.load offset=8 + i32.lt_u + select + i64.load32_s + i64.store offset=16 + local.get $1 i32.const 109 call $~lib/typedarray/Int64Array#forEach global.get $std/typedarray/forEachCallCount @@ -9667,13 +9924,23 @@ end ) (func $std/typedarray/testArrayForEach~anonymous|0 (; 206 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 - global.get $std/typedarray/forEachValues - i32.load offset=4 local.get $1 i32.const 2 i32.shl + local.tee $3 + global.get $std/typedarray/forEachValues + local.tee $4 + i32.load offset=4 i32.add + i32.const -1 + local.get $3 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load f32.convert_i32_s f32.ne @@ -9721,9 +9988,6 @@ local.set $2 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.set $3 @@ -9755,35 +10019,60 @@ (func $std/typedarray/testArrayForEach (; 208 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Float32Array#constructor - local.tee $0 + local.tee $1 global.set $std/typedarray/forEachSelf - local.get $0 + local.get $1 i32.load offset=4 global.get $std/typedarray/forEachValues - local.tee $1 + local.tee $2 + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load f32.convert_i32_s f32.store - local.get $0 - i32.load offset=4 local.get $1 i32.load offset=4 + local.get $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 f32.convert_i32_s f32.store offset=4 - local.get $0 - i32.load offset=4 local.get $1 i32.load offset=4 + local.get $2 + local.tee $0 + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load f32.convert_i32_s f32.store offset=8 - local.get $0 + local.get $1 call $~lib/typedarray/Float32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -9798,13 +10087,23 @@ end ) (func $std/typedarray/testArrayForEach~anonymous|0 (; 209 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 - global.get $std/typedarray/forEachValues - i32.load offset=4 local.get $1 i32.const 2 i32.shl + local.tee $3 + global.get $std/typedarray/forEachValues + local.tee $4 + i32.load offset=4 i32.add + i32.const -1 + local.get $3 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load f64.convert_i32_s f64.ne @@ -9852,9 +10151,6 @@ local.set $2 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.set $3 @@ -9886,35 +10182,60 @@ (func $std/typedarray/testArrayForEach (; 211 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Float64Array#constructor - local.tee $0 + local.tee $1 global.set $std/typedarray/forEachSelf - local.get $0 + local.get $1 i32.load offset=4 global.get $std/typedarray/forEachValues - local.tee $1 + local.tee $2 + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load f64.convert_i32_s f64.store - local.get $0 - i32.load offset=4 local.get $1 i32.load offset=4 - i32.load offset=4 - f64.convert_i32_s - f64.store offset=8 local.get $0 i32.load offset=4 - local.get $1 - 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 f64.convert_i32_s - f64.store offset=16 + f64.store offset=8 + local.get $1 + i32.load offset=4 + local.get $2 + local.tee $0 + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load + f64.convert_i32_s + f64.store offset=16 + local.get $1 call $~lib/typedarray/Float64Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -9939,9 +10260,6 @@ local.set $4 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.sub local.set $1 @@ -9989,37 +10307,49 @@ local.set $1 i32.const 9 call $~lib/typedarray/Int8Array#constructor - local.set $2 + local.set $3 i32.const 9 call $~lib/typedarray/Int8Array#constructor - local.set $3 + local.set $4 loop $repeat|0 block $break|0 local.get $0 i32.const 9 i32.ge_s br_if $break|0 - local.get $2 + local.get $3 i32.load offset=4 local.get $0 i32.add local.get $0 i32.const 2 i32.shl - local.tee $4 + local.tee $2 local.get $1 i32.load offset=4 i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load i32.store8 - local.get $3 + local.get $4 i32.load offset=4 local.get $0 i32.add local.get $1 i32.load offset=4 - local.get $4 + local.get $2 i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load i32.store8 local.get $0 @@ -10029,7 +10359,7 @@ br $repeat|0 end end - local.get $2 + local.get $3 call $~lib/typedarray/Int8Array#reverse drop i32.const 0 @@ -10040,19 +10370,32 @@ i32.const 9 i32.ge_s br_if $break|1 - local.get $2 + local.get $3 i32.load offset=4 local.get $0 i32.add + i32.const -1 + local.get $0 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load8_u - local.get $1 - i32.load offset=4 i32.const 8 local.get $0 i32.sub i32.const 2 i32.shl + local.tee $2 + local.get $1 + i32.load offset=4 i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 255 i32.and @@ -10074,13 +10417,20 @@ unreachable end end - local.get $3 + local.get $4 i32.const 4 i32.const 8 call $~lib/typedarray/Int8Array#subarray call $~lib/typedarray/Int8Array#reverse local.tee $0 + local.tee $1 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load8_s i32.const 8 i32.ne @@ -10093,8 +10443,17 @@ unreachable end local.get $0 + local.tee $1 i32.load offset=4 - i32.load8_s offset=1 + i32.const 1 + i32.add + i32.const -1 + i32.const 1 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 7 i32.ne if @@ -10105,9 +10464,17 @@ call $~lib/env/abort unreachable end - local.get $0 + local.get $1 i32.load offset=4 - i32.load8_s offset=2 + i32.const 2 + i32.add + i32.const -1 + i32.const 2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 6 i32.ne if @@ -10118,9 +10485,17 @@ call $~lib/env/abort unreachable end - local.get $0 + local.get $1 i32.load offset=4 - i32.load8_s offset=3 + i32.const 3 + i32.add + i32.const -1 + i32.const 3 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 5 i32.ne if @@ -10143,9 +10518,6 @@ local.set $4 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.sub local.set $1 @@ -10190,11 +10562,8 @@ (local $4 i32) i32.const 8 local.get $0 - local.tee $2 + local.tee $3 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub local.tee $1 i32.const 8 local.get $1 @@ -10207,9 +10576,9 @@ local.get $1 i32.lt_s select - local.tee $3 + local.tee $2 local.get $0 - local.get $3 + local.get $2 i32.gt_s select local.set $4 @@ -10218,22 +10587,22 @@ i32.const 5 call $~lib/runtime/doRegister local.set $0 - local.get $2 + local.get $3 i32.load offset=4 local.set $1 local.get $0 - local.get $2 + local.get $3 i32.load i32.store local.get $0 local.get $1 - local.get $3 + local.get $2 i32.add i32.store offset=4 local.get $0 - local.get $1 local.get $4 - i32.add + local.get $2 + i32.sub i32.store offset=8 local.get $0 ) @@ -10248,38 +10617,50 @@ i32.const 0 i32.const 9 call $~lib/typedarray/Uint8Array#constructor - local.set $2 + local.set $3 i32.const 0 i32.const 9 call $~lib/typedarray/Uint8Array#constructor - local.set $3 + local.set $4 loop $repeat|0 block $break|0 local.get $0 i32.const 9 i32.ge_s br_if $break|0 - local.get $2 + local.get $3 i32.load offset=4 local.get $0 i32.add local.get $0 i32.const 2 i32.shl - local.tee $4 + local.tee $2 local.get $1 i32.load offset=4 i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load i32.store8 - local.get $3 + local.get $4 i32.load offset=4 local.get $0 i32.add local.get $1 i32.load offset=4 - local.get $4 + local.get $2 i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load i32.store8 local.get $0 @@ -10289,7 +10670,7 @@ br $repeat|0 end end - local.get $2 + local.get $3 call $~lib/typedarray/Uint8Array#reverse drop i32.const 0 @@ -10300,19 +10681,32 @@ i32.const 9 i32.ge_s br_if $break|1 - local.get $2 + local.get $3 i32.load offset=4 local.get $0 i32.add + i32.const -1 + local.get $0 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load8_u - local.get $1 - i32.load offset=4 i32.const 8 local.get $0 i32.sub i32.const 2 i32.shl + local.tee $2 + local.get $1 + i32.load offset=4 i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 255 i32.and @@ -10334,11 +10728,18 @@ unreachable end end - local.get $3 + local.get $4 call $~lib/typedarray/Uint8Array#subarray call $~lib/typedarray/Uint8Array#reverse local.tee $0 + local.tee $1 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load8_u i32.const 8 i32.ne @@ -10351,8 +10752,17 @@ unreachable end local.get $0 + local.tee $1 i32.load offset=4 - i32.load8_u offset=1 + i32.const 1 + i32.add + i32.const -1 + i32.const 1 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 7 i32.ne if @@ -10363,9 +10773,17 @@ call $~lib/env/abort unreachable end - local.get $0 + local.get $1 i32.load offset=4 - i32.load8_u offset=2 + i32.const 2 + i32.add + i32.const -1 + i32.const 2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 6 i32.ne if @@ -10376,9 +10794,17 @@ call $~lib/env/abort unreachable end - local.get $0 + local.get $1 i32.load offset=4 - i32.load8_u offset=3 + i32.const 3 + i32.add + i32.const -1 + i32.const 3 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 5 i32.ne if @@ -10397,11 +10823,8 @@ (local $4 i32) i32.const 8 local.get $0 - local.tee $2 + local.tee $3 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub local.tee $1 i32.const 8 local.get $1 @@ -10414,9 +10837,9 @@ local.get $1 i32.lt_s select - local.tee $3 + local.tee $2 local.get $0 - local.get $3 + local.get $2 i32.gt_s select local.set $4 @@ -10425,22 +10848,22 @@ i32.const 6 call $~lib/runtime/doRegister local.set $0 - local.get $2 + local.get $3 i32.load offset=4 local.set $1 local.get $0 - local.get $2 + local.get $3 i32.load i32.store local.get $0 local.get $1 - local.get $3 + local.get $2 i32.add i32.store offset=4 local.get $0 - local.get $1 local.get $4 - i32.add + local.get $2 + i32.sub i32.store offset=8 local.get $0 ) @@ -10455,27 +10878,33 @@ local.set $2 i32.const 9 call $~lib/typedarray/Uint8ClampedArray#constructor - local.set $3 + local.set $4 i32.const 9 call $~lib/typedarray/Uint8ClampedArray#constructor - local.set $4 + local.set $5 loop $repeat|0 block $break|0 local.get $0 i32.const 9 i32.ge_s br_if $break|0 - local.get $3 + local.get $4 i32.load offset=4 local.get $0 i32.add local.get $0 i32.const 2 i32.shl - local.tee $5 + local.tee $3 local.get $2 i32.load offset=4 i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 255 i32.and @@ -10493,14 +10922,20 @@ i32.or i32.and i32.store8 - local.get $4 + local.get $5 i32.load offset=4 local.get $0 i32.add local.get $2 i32.load offset=4 - local.get $5 + local.get $3 i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 255 i32.and @@ -10525,7 +10960,7 @@ br $repeat|0 end end - local.get $3 + local.get $4 call $~lib/typedarray/Uint8Array#reverse drop i32.const 0 @@ -10536,19 +10971,32 @@ i32.const 9 i32.ge_s br_if $break|1 - local.get $3 + local.get $4 i32.load offset=4 local.get $0 i32.add + i32.const -1 + local.get $0 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load8_u - local.get $2 - i32.load offset=4 i32.const 8 local.get $0 i32.sub i32.const 2 i32.shl + local.tee $3 + local.get $2 + i32.load offset=4 i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 255 i32.and @@ -10570,11 +11018,18 @@ unreachable end end - local.get $4 + local.get $5 call $~lib/typedarray/Uint8ClampedArray#subarray call $~lib/typedarray/Uint8Array#reverse - local.tee $0 + local.tee $2 + local.tee $1 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load8_u i32.const 8 i32.ne @@ -10586,11 +11041,20 @@ call $~lib/env/abort unreachable end - local.get $0 + local.get $2 + local.tee $1 i32.load offset=4 - i32.load8_u offset=1 - i32.const 7 - i32.ne + i32.const 1 + i32.add + i32.const -1 + i32.const 1 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load8_u + i32.const 7 + i32.ne if i32.const 1016 i32.const 16 @@ -10599,9 +11063,17 @@ call $~lib/env/abort unreachable end - local.get $0 + local.get $1 i32.load offset=4 - i32.load8_u offset=2 + i32.const 2 + i32.add + i32.const -1 + i32.const 2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 6 i32.ne if @@ -10612,9 +11084,17 @@ call $~lib/env/abort unreachable end - local.get $0 + local.get $1 i32.load offset=4 - i32.load8_u offset=3 + i32.const 3 + i32.add + i32.const -1 + i32.const 3 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 5 i32.ne if @@ -10637,9 +11117,6 @@ local.set $4 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u i32.const 1 @@ -10690,11 +11167,8 @@ (local $4 i32) i32.const 8 local.get $0 - local.tee $2 + local.tee $3 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u local.tee $1 @@ -10709,9 +11183,9 @@ local.get $1 i32.lt_s select - local.tee $3 + local.tee $2 local.get $0 - local.get $3 + local.get $2 i32.gt_s select local.set $4 @@ -10720,15 +11194,15 @@ i32.const 7 call $~lib/runtime/doRegister local.set $0 - local.get $2 + local.get $3 i32.load offset=4 local.set $1 local.get $0 - local.get $2 + local.get $3 i32.load i32.store local.get $0 - local.get $3 + local.get $2 i32.const 1 i32.shl local.get $1 @@ -10736,10 +11210,10 @@ i32.store offset=4 local.get $0 local.get $4 + local.get $2 + i32.sub i32.const 1 i32.shl - local.get $1 - i32.add i32.store offset=8 local.get $0 ) @@ -10751,78 +11225,104 @@ (local $4 i32) (local $5 i32) global.get $std/typedarray/testArrayReverseValues - local.set $1 + local.set $0 i32.const 9 call $~lib/typedarray/Int16Array#constructor - local.set $2 + local.set $3 i32.const 9 call $~lib/typedarray/Int16Array#constructor - local.set $3 + local.set $4 loop $repeat|0 block $break|0 - local.get $0 + local.get $1 i32.const 9 i32.ge_s br_if $break|0 - local.get $0 + local.get $1 i32.const 1 i32.shl - local.tee $4 - local.get $2 + local.tee $5 + local.get $3 i32.load offset=4 i32.add - local.get $0 + local.get $1 i32.const 2 i32.shl - local.tee $5 - local.get $1 + local.tee $2 + local.get $0 i32.load offset=4 i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.store16 - local.get $3 - i32.load offset=4 local.get $4 - i32.add - local.get $1 i32.load offset=4 local.get $5 i32.add + local.get $0 + i32.load offset=4 + local.get $2 + i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.store16 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $repeat|0 end end - local.get $2 + local.get $3 call $~lib/typedarray/Int16Array#reverse drop i32.const 0 - local.set $0 + local.set $1 loop $repeat|1 block $break|1 - local.get $0 + local.get $1 i32.const 9 i32.ge_s br_if $break|1 - local.get $2 - i32.load offset=4 - local.get $0 + local.get $1 i32.const 1 i32.shl + local.tee $2 + local.get $3 + i32.load offset=4 i32.add + i32.const -1 + local.get $2 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load16_u - local.get $1 - i32.load offset=4 i32.const 8 - local.get $0 + local.get $1 i32.sub i32.const 2 i32.shl + local.tee $2 + local.get $0 + i32.load offset=4 i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 65535 i32.and @@ -10835,20 +11335,27 @@ call $~lib/env/abort unreachable else - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $repeat|1 end unreachable end end - local.get $3 + local.get $4 call $~lib/typedarray/Int16Array#subarray call $~lib/typedarray/Int16Array#reverse + local.tee $1 local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load16_s i32.const 8 i32.ne @@ -10860,9 +11367,18 @@ call $~lib/env/abort unreachable end - local.get $0 + local.get $1 + local.tee $0 i32.load offset=4 - i32.load16_s offset=2 + i32.const 2 + i32.add + i32.const -1 + i32.const 2 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load16_s i32.const 7 i32.ne if @@ -10875,7 +11391,15 @@ end local.get $0 i32.load offset=4 - i32.load16_s 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.load16_s i32.const 6 i32.ne if @@ -10888,7 +11412,15 @@ end local.get $0 i32.load offset=4 - i32.load16_s offset=6 + i32.const 6 + i32.add + i32.const -1 + i32.const 6 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load16_s i32.const 5 i32.ne if @@ -10911,9 +11443,6 @@ local.set $4 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u i32.const 1 @@ -10964,11 +11493,8 @@ (local $4 i32) i32.const 8 local.get $0 - local.tee $2 + local.tee $3 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 1 i32.shr_u local.tee $1 @@ -10983,9 +11509,9 @@ local.get $1 i32.lt_s select - local.tee $3 + local.tee $2 local.get $0 - local.get $3 + local.get $2 i32.gt_s select local.set $4 @@ -10994,15 +11520,15 @@ i32.const 8 call $~lib/runtime/doRegister local.set $0 - local.get $2 + local.get $3 i32.load offset=4 local.set $1 local.get $0 - local.get $2 + local.get $3 i32.load i32.store local.get $0 - local.get $3 + local.get $2 i32.const 1 i32.shl local.get $1 @@ -11010,10 +11536,10 @@ i32.store offset=4 local.get $0 local.get $4 + local.get $2 + i32.sub i32.const 1 i32.shl - local.get $1 - i32.add i32.store offset=8 local.get $0 ) @@ -11025,78 +11551,104 @@ (local $4 i32) (local $5 i32) global.get $std/typedarray/testArrayReverseValues - local.set $1 + local.set $0 i32.const 9 call $~lib/typedarray/Uint16Array#constructor - local.set $2 + local.set $3 i32.const 9 call $~lib/typedarray/Uint16Array#constructor - local.set $3 + local.set $4 loop $repeat|0 block $break|0 - local.get $0 + local.get $1 i32.const 9 i32.ge_s br_if $break|0 - local.get $0 + local.get $1 i32.const 1 i32.shl - local.tee $4 - local.get $2 + local.tee $5 + local.get $3 i32.load offset=4 i32.add - local.get $0 + local.get $1 i32.const 2 i32.shl - local.tee $5 - local.get $1 + local.tee $2 + local.get $0 i32.load offset=4 i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.store16 - local.get $3 - i32.load offset=4 local.get $4 - i32.add - local.get $1 i32.load offset=4 local.get $5 i32.add + local.get $0 + i32.load offset=4 + local.get $2 + i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.store16 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $repeat|0 end end - local.get $2 + local.get $3 call $~lib/typedarray/Uint16Array#reverse drop i32.const 0 - local.set $0 + local.set $1 loop $repeat|1 block $break|1 - local.get $0 + local.get $1 i32.const 9 i32.ge_s br_if $break|1 - local.get $2 - i32.load offset=4 - local.get $0 + local.get $1 i32.const 1 i32.shl + local.tee $2 + local.get $3 + i32.load offset=4 i32.add + i32.const -1 + local.get $2 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load16_u - local.get $1 - i32.load offset=4 i32.const 8 - local.get $0 + local.get $1 i32.sub i32.const 2 i32.shl + local.tee $2 + local.get $0 + i32.load offset=4 i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 65535 i32.and @@ -11109,20 +11661,27 @@ call $~lib/env/abort unreachable else - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $repeat|1 end unreachable end end - local.get $3 + local.get $4 call $~lib/typedarray/Uint16Array#subarray call $~lib/typedarray/Uint16Array#reverse + local.tee $1 local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load16_u i32.const 8 i32.ne @@ -11134,9 +11693,18 @@ call $~lib/env/abort unreachable end - local.get $0 + local.get $1 + local.tee $0 i32.load offset=4 - i32.load16_u offset=2 + i32.const 2 + i32.add + i32.const -1 + i32.const 2 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load16_u i32.const 7 i32.ne if @@ -11149,7 +11717,15 @@ end local.get $0 i32.load offset=4 - i32.load16_u 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.load16_u i32.const 6 i32.ne if @@ -11162,7 +11738,15 @@ end local.get $0 i32.load offset=4 - i32.load16_u offset=6 + i32.const 6 + i32.add + i32.const -1 + i32.const 6 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load16_u i32.const 5 i32.ne if @@ -11185,9 +11769,6 @@ local.set $4 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u i32.const 1 @@ -11238,75 +11819,101 @@ (local $3 i32) (local $4 i32) global.get $std/typedarray/testArrayReverseValues - local.set $1 + local.set $0 i32.const 9 call $~lib/typedarray/Int32Array#constructor - local.set $2 + local.set $3 i32.const 9 call $~lib/typedarray/Int32Array#constructor local.set $4 loop $repeat|0 block $break|0 - local.get $0 + local.get $2 i32.const 9 i32.ge_s br_if $break|0 - local.get $0 + local.get $2 i32.const 2 i32.shl - local.tee $3 - local.get $2 + local.tee $1 + local.get $3 i32.load offset=4 i32.add - local.get $1 + local.get $0 i32.load offset=4 - local.get $3 + local.get $1 i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.store local.get $4 i32.load offset=4 - local.get $3 - i32.add local.get $1 + i32.add + local.get $0 i32.load offset=4 - local.get $3 + local.get $1 i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.store - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $repeat|0 end end - local.get $2 + local.get $3 call $~lib/typedarray/Int32Array#reverse drop i32.const 0 - local.set $0 + local.set $2 loop $repeat|1 block $break|1 - local.get $0 + local.get $2 i32.const 9 i32.ge_s br_if $break|1 local.get $2 - i32.load offset=4 - local.get $0 i32.const 2 i32.shl + local.tee $1 + local.get $3 + i32.load offset=4 i32.add - i32.load + i32.const -1 local.get $1 - i32.load offset=4 + local.get $3 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 8 - local.get $0 + local.get $2 i32.sub i32.const 2 i32.shl + local.tee $1 + local.get $0 + i32.load offset=4 i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.ne if @@ -11317,10 +11924,10 @@ call $~lib/env/abort unreachable else - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $repeat|1 end unreachable @@ -11331,8 +11938,15 @@ i32.const 8 call $~lib/typedarray/Int32Array#subarray call $~lib/typedarray/Int32Array#reverse + local.tee $1 local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 8 i32.ne @@ -11344,9 +11958,18 @@ call $~lib/env/abort unreachable end - local.get $0 - i32.load offset=4 + local.get $1 + 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 7 i32.ne if @@ -11359,7 +11982,15 @@ end local.get $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 6 i32.ne if @@ -11372,7 +12003,15 @@ end local.get $0 i32.load offset=4 - i32.load offset=12 + i32.const 12 + i32.add + i32.const -1 + i32.const 12 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 5 i32.ne if @@ -11391,11 +12030,8 @@ (local $4 i32) i32.const 8 local.get $0 - local.tee $2 + local.tee $3 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.tee $1 @@ -11410,9 +12046,9 @@ local.get $1 i32.lt_s select - local.tee $3 + local.tee $2 local.get $0 - local.get $3 + local.get $2 i32.gt_s select local.set $4 @@ -11421,15 +12057,15 @@ i32.const 10 call $~lib/runtime/doRegister local.set $0 - local.get $2 + local.get $3 i32.load offset=4 local.set $1 local.get $0 - local.get $2 + local.get $3 i32.load i32.store local.get $0 - local.get $3 + local.get $2 i32.const 2 i32.shl local.get $1 @@ -11437,10 +12073,10 @@ i32.store offset=4 local.get $0 local.get $4 + local.get $2 + i32.sub i32.const 2 i32.shl - local.get $1 - i32.add i32.store offset=8 local.get $0 ) @@ -11451,75 +12087,101 @@ (local $3 i32) (local $4 i32) global.get $std/typedarray/testArrayReverseValues - local.set $1 + local.set $0 i32.const 9 call $~lib/typedarray/Uint32Array#constructor - local.set $2 + local.set $3 i32.const 9 call $~lib/typedarray/Uint32Array#constructor local.set $4 loop $repeat|0 block $break|0 - local.get $0 + local.get $2 i32.const 9 i32.ge_s br_if $break|0 - local.get $0 + local.get $2 i32.const 2 i32.shl - local.tee $3 - local.get $2 + local.tee $1 + local.get $3 i32.load offset=4 i32.add - local.get $1 + local.get $0 i32.load offset=4 - local.get $3 + local.get $1 i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.store local.get $4 i32.load offset=4 - local.get $3 - i32.add local.get $1 + i32.add + local.get $0 i32.load offset=4 - local.get $3 + local.get $1 i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.store - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $repeat|0 end end - local.get $2 + local.get $3 call $~lib/typedarray/Int32Array#reverse drop i32.const 0 - local.set $0 + local.set $2 loop $repeat|1 block $break|1 - local.get $0 + local.get $2 i32.const 9 i32.ge_s br_if $break|1 local.get $2 - i32.load offset=4 - local.get $0 i32.const 2 i32.shl + local.tee $1 + local.get $3 + i32.load offset=4 i32.add - i32.load + i32.const -1 local.get $1 - i32.load offset=4 + local.get $3 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 8 - local.get $0 + local.get $2 i32.sub i32.const 2 i32.shl + local.tee $1 + local.get $0 + i32.load offset=4 i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.ne if @@ -11530,10 +12192,10 @@ call $~lib/env/abort unreachable else - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $repeat|1 end unreachable @@ -11542,8 +12204,15 @@ local.get $4 call $~lib/typedarray/Uint32Array#subarray call $~lib/typedarray/Int32Array#reverse + local.tee $1 local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 8 i32.ne @@ -11555,9 +12224,18 @@ call $~lib/env/abort unreachable end - local.get $0 - i32.load offset=4 + local.get $1 + 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 7 i32.ne if @@ -11570,7 +12248,15 @@ end local.get $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 6 i32.ne if @@ -11583,7 +12269,15 @@ end local.get $0 i32.load offset=4 - i32.load offset=12 + i32.const 12 + i32.add + i32.const -1 + i32.const 12 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 5 i32.ne if @@ -11606,9 +12300,6 @@ local.set $4 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u i32.const 1 @@ -11659,11 +12350,8 @@ (local $4 i32) i32.const 8 local.get $0 - local.tee $2 + local.tee $3 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.tee $1 @@ -11678,9 +12366,9 @@ local.get $1 i32.lt_s select - local.tee $3 + local.tee $2 local.get $0 - local.get $3 + local.get $2 i32.gt_s select local.set $4 @@ -11689,15 +12377,15 @@ i32.const 11 call $~lib/runtime/doRegister local.set $0 - local.get $2 + local.get $3 i32.load offset=4 local.set $1 local.get $0 - local.get $2 + local.get $3 i32.load i32.store local.get $0 - local.get $3 + local.get $2 i32.const 3 i32.shl local.get $1 @@ -11705,10 +12393,10 @@ i32.store offset=4 local.get $0 local.get $4 + local.get $2 + i32.sub i32.const 3 i32.shl - local.get $1 - i32.add i32.store offset=8 local.get $0 ) @@ -11720,78 +12408,104 @@ (local $4 i32) (local $5 i32) global.get $std/typedarray/testArrayReverseValues - local.set $1 + local.set $0 i32.const 9 call $~lib/typedarray/Int64Array#constructor - local.set $2 + local.set $3 i32.const 9 call $~lib/typedarray/Int64Array#constructor - local.set $3 + local.set $4 loop $repeat|0 block $break|0 - local.get $0 + local.get $1 i32.const 9 i32.ge_s br_if $break|0 - local.get $0 + local.get $1 i32.const 3 i32.shl - local.tee $4 - local.get $2 + local.tee $5 + local.get $3 i32.load offset=4 i32.add - local.get $0 + local.get $1 i32.const 2 i32.shl - local.tee $5 - local.get $1 + local.tee $2 + local.get $0 i32.load offset=4 i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select i64.load32_s i64.store - local.get $3 - i32.load offset=4 local.get $4 - i32.add - local.get $1 i32.load offset=4 local.get $5 i32.add + local.get $0 + i32.load offset=4 + local.get $2 + i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select i64.load32_s i64.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $repeat|0 end end - local.get $2 + local.get $3 call $~lib/typedarray/Int64Array#reverse drop i32.const 0 - local.set $0 + local.set $1 loop $repeat|1 block $break|1 - local.get $0 + local.get $1 i32.const 9 i32.ge_s br_if $break|1 - local.get $2 - i32.load offset=4 - local.get $0 + local.get $1 i32.const 3 i32.shl + local.tee $2 + local.get $3 + i32.load offset=4 i32.add + i32.const -1 + local.get $2 + local.get $3 + i32.load offset=8 + i32.lt_u + select i64.load - local.get $1 - i32.load offset=4 i32.const 8 - local.get $0 + local.get $1 i32.sub i32.const 2 i32.shl + local.tee $2 + local.get $0 + i32.load offset=4 i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select i64.load32_s i64.ne if @@ -11802,20 +12516,27 @@ call $~lib/env/abort unreachable else - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $repeat|1 end unreachable end end - local.get $3 + local.get $4 call $~lib/typedarray/Int64Array#subarray call $~lib/typedarray/Int64Array#reverse + local.tee $1 local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i64.load i64.const 8 i64.ne @@ -11827,9 +12548,18 @@ call $~lib/env/abort unreachable end - local.get $0 + local.get $1 + local.tee $0 i32.load offset=4 - i64.load offset=8 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 7 i64.ne if @@ -11842,7 +12572,15 @@ end local.get $0 i32.load offset=4 - i64.load offset=16 + i32.const 16 + i32.add + i32.const -1 + i32.const 16 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 6 i64.ne if @@ -11855,7 +12593,15 @@ end local.get $0 i32.load offset=4 - i64.load offset=24 + i32.const 24 + i32.add + i32.const -1 + i32.const 24 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 5 i64.ne if @@ -11874,11 +12620,8 @@ (local $4 i32) i32.const 8 local.get $0 - local.tee $2 + local.tee $3 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u local.tee $1 @@ -11893,9 +12636,9 @@ local.get $1 i32.lt_s select - local.tee $3 + local.tee $2 local.get $0 - local.get $3 + local.get $2 i32.gt_s select local.set $4 @@ -11904,15 +12647,15 @@ i32.const 12 call $~lib/runtime/doRegister local.set $0 - local.get $2 + local.get $3 i32.load offset=4 local.set $1 local.get $0 - local.get $2 + local.get $3 i32.load i32.store local.get $0 - local.get $3 + local.get $2 i32.const 3 i32.shl local.get $1 @@ -11920,10 +12663,10 @@ i32.store offset=4 local.get $0 local.get $4 + local.get $2 + i32.sub i32.const 3 i32.shl - local.get $1 - i32.add i32.store offset=8 local.get $0 ) @@ -11935,78 +12678,104 @@ (local $4 i32) (local $5 i32) global.get $std/typedarray/testArrayReverseValues - local.set $1 + local.set $0 i32.const 9 call $~lib/typedarray/Uint64Array#constructor - local.set $2 + local.set $3 i32.const 9 call $~lib/typedarray/Uint64Array#constructor - local.set $3 + local.set $4 loop $repeat|0 block $break|0 - local.get $0 + local.get $1 i32.const 9 i32.ge_s br_if $break|0 - local.get $0 + local.get $1 i32.const 3 i32.shl - local.tee $4 - local.get $2 + local.tee $5 + local.get $3 i32.load offset=4 i32.add - local.get $0 + local.get $1 i32.const 2 i32.shl - local.tee $5 - local.get $1 + local.tee $2 + local.get $0 i32.load offset=4 i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select i64.load32_s i64.store - local.get $3 - i32.load offset=4 local.get $4 - i32.add - local.get $1 i32.load offset=4 local.get $5 i32.add + local.get $0 + i32.load offset=4 + local.get $2 + i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select i64.load32_s i64.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $repeat|0 end end - local.get $2 + local.get $3 call $~lib/typedarray/Int64Array#reverse drop i32.const 0 - local.set $0 + local.set $1 loop $repeat|1 block $break|1 - local.get $0 + local.get $1 i32.const 9 i32.ge_s br_if $break|1 - local.get $2 - i32.load offset=4 - local.get $0 + local.get $1 i32.const 3 i32.shl + local.tee $2 + local.get $3 + i32.load offset=4 i32.add + i32.const -1 + local.get $2 + local.get $3 + i32.load offset=8 + i32.lt_u + select i64.load - local.get $1 - i32.load offset=4 i32.const 8 - local.get $0 + local.get $1 i32.sub i32.const 2 i32.shl + local.tee $2 + local.get $0 + i32.load offset=4 i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select i64.load32_s i64.ne if @@ -12017,20 +12786,27 @@ call $~lib/env/abort unreachable else - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $repeat|1 end unreachable end end - local.get $3 + local.get $4 call $~lib/typedarray/Uint64Array#subarray call $~lib/typedarray/Int64Array#reverse + local.tee $1 local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i64.load i64.const 8 i64.ne @@ -12042,9 +12818,18 @@ call $~lib/env/abort unreachable end - local.get $0 + local.get $1 + local.tee $0 i32.load offset=4 - i64.load offset=8 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 7 i64.ne if @@ -12057,7 +12842,15 @@ end local.get $0 i32.load offset=4 - i64.load offset=16 + i32.const 16 + i32.add + i32.const -1 + i32.const 16 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 6 i64.ne if @@ -12070,7 +12863,15 @@ end local.get $0 i32.load offset=4 - i64.load offset=24 + i32.const 24 + i32.add + i32.const -1 + i32.const 24 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 5 i64.ne if @@ -12093,9 +12894,6 @@ local.set $4 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u i32.const 1 @@ -12146,11 +12944,8 @@ (local $4 i32) i32.const 8 local.get $0 - local.tee $2 + local.tee $3 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u local.tee $1 @@ -12165,9 +12960,9 @@ local.get $1 i32.lt_s select - local.tee $3 + local.tee $2 local.get $0 - local.get $3 + local.get $2 i32.gt_s select local.set $4 @@ -12176,15 +12971,15 @@ i32.const 13 call $~lib/runtime/doRegister local.set $0 - local.get $2 + local.get $3 i32.load offset=4 local.set $1 local.get $0 - local.get $2 + local.get $3 i32.load i32.store local.get $0 - local.get $3 + local.get $2 i32.const 2 i32.shl local.get $1 @@ -12192,10 +12987,10 @@ i32.store offset=4 local.get $0 local.get $4 + local.get $2 + i32.sub i32.const 2 i32.shl - local.get $1 - i32.add i32.store offset=8 local.get $0 ) @@ -12206,77 +13001,103 @@ (local $3 i32) (local $4 i32) global.get $std/typedarray/testArrayReverseValues - local.set $1 + local.set $0 i32.const 9 call $~lib/typedarray/Float32Array#constructor - local.set $2 + local.set $3 i32.const 9 call $~lib/typedarray/Float32Array#constructor local.set $4 loop $repeat|0 block $break|0 - local.get $0 + local.get $2 i32.const 9 i32.ge_s br_if $break|0 - local.get $0 + local.get $2 i32.const 2 i32.shl - local.tee $3 - local.get $2 + local.tee $1 + local.get $3 i32.load offset=4 i32.add - local.get $1 + local.get $0 i32.load offset=4 - local.get $3 + local.get $1 i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load f32.convert_i32_s f32.store local.get $4 i32.load offset=4 - local.get $3 - i32.add local.get $1 + i32.add + local.get $0 i32.load offset=4 - local.get $3 + local.get $1 i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load f32.convert_i32_s f32.store - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $repeat|0 end end - local.get $2 + local.get $3 call $~lib/typedarray/Float32Array#reverse drop i32.const 0 - local.set $0 + local.set $2 loop $repeat|1 block $break|1 - local.get $0 + local.get $2 i32.const 9 i32.ge_s br_if $break|1 local.get $2 - i32.load offset=4 - local.get $0 i32.const 2 i32.shl + local.tee $1 + local.get $3 + i32.load offset=4 i32.add - f32.load + i32.const -1 local.get $1 - i32.load offset=4 + local.get $3 + i32.load offset=8 + i32.lt_u + select + f32.load i32.const 8 - local.get $0 + local.get $2 i32.sub i32.const 2 i32.shl + local.tee $1 + local.get $0 + i32.load offset=4 i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load f32.convert_i32_s f32.ne @@ -12288,10 +13109,10 @@ call $~lib/env/abort unreachable else - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $repeat|1 end unreachable @@ -12300,8 +13121,15 @@ local.get $4 call $~lib/typedarray/Float32Array#subarray call $~lib/typedarray/Float32Array#reverse + local.tee $1 local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select f32.load f32.const 8 f32.ne @@ -12313,9 +13141,18 @@ call $~lib/env/abort unreachable end - local.get $0 + local.get $1 + local.tee $0 i32.load offset=4 - f32.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 + f32.load f32.const 7 f32.ne if @@ -12328,7 +13165,15 @@ end local.get $0 i32.load offset=4 - f32.load offset=8 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 + i32.lt_u + select + f32.load f32.const 6 f32.ne if @@ -12341,7 +13186,15 @@ end local.get $0 i32.load offset=4 - f32.load offset=12 + i32.const 12 + i32.add + i32.const -1 + i32.const 12 + local.get $0 + i32.load offset=8 + i32.lt_u + select + f32.load f32.const 5 f32.ne if @@ -12364,9 +13217,6 @@ local.set $4 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u i32.const 1 @@ -12418,80 +13268,106 @@ (local $4 i32) (local $5 i32) global.get $std/typedarray/testArrayReverseValues - local.set $1 + local.set $0 i32.const 9 call $~lib/typedarray/Float64Array#constructor - local.set $2 + local.set $3 i32.const 9 call $~lib/typedarray/Float64Array#constructor - local.set $3 + local.set $4 loop $repeat|0 block $break|0 - local.get $0 + local.get $1 i32.const 9 i32.ge_s br_if $break|0 - local.get $0 + local.get $1 i32.const 3 i32.shl - local.tee $4 - local.get $2 + local.tee $5 + local.get $3 i32.load offset=4 i32.add - local.get $0 + local.get $1 i32.const 2 i32.shl - local.tee $5 - local.get $1 + local.tee $2 + local.get $0 i32.load offset=4 i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load f64.convert_i32_s f64.store - local.get $3 - i32.load offset=4 local.get $4 - i32.add - local.get $1 i32.load offset=4 local.get $5 i32.add + local.get $0 + i32.load offset=4 + local.get $2 + i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load f64.convert_i32_s f64.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $repeat|0 end end - local.get $2 + local.get $3 call $~lib/typedarray/Float64Array#reverse drop i32.const 0 - local.set $0 + local.set $1 loop $repeat|1 block $break|1 - local.get $0 + local.get $1 i32.const 9 i32.ge_s br_if $break|1 - local.get $2 - i32.load offset=4 - local.get $0 + local.get $1 i32.const 3 i32.shl + local.tee $2 + local.get $3 + i32.load offset=4 i32.add + i32.const -1 + local.get $2 + local.get $3 + i32.load offset=8 + i32.lt_u + select f64.load - local.get $1 - i32.load offset=4 i32.const 8 - local.get $0 + local.get $1 i32.sub i32.const 2 i32.shl + local.tee $2 + local.get $0 + i32.load offset=4 i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load f64.convert_i32_s f64.ne @@ -12503,22 +13379,29 @@ call $~lib/env/abort unreachable else - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $repeat|1 end unreachable end end - local.get $3 + local.get $4 i32.const 4 i32.const 8 call $~lib/typedarray/Float64Array#subarray call $~lib/typedarray/Float64Array#reverse + local.tee $1 local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select f64.load f64.const 8 f64.ne @@ -12530,9 +13413,18 @@ call $~lib/env/abort unreachable end - local.get $0 + local.get $1 + local.tee $0 i32.load offset=4 - f64.load offset=8 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 + i32.lt_u + select + f64.load f64.const 7 f64.ne if @@ -12545,7 +13437,15 @@ end local.get $0 i32.load offset=4 - f64.load offset=16 + i32.const 16 + i32.add + i32.const -1 + i32.const 16 + local.get $0 + i32.load offset=8 + i32.lt_u + select + f64.load f64.const 6 f64.ne if @@ -12558,7 +13458,15 @@ end local.get $0 i32.load offset=4 - f64.load offset=24 + i32.const 24 + i32.add + i32.const -1 + i32.const 24 + local.get $0 + i32.load offset=8 + i32.lt_u + select + f64.load f64.const 5 f64.ne if @@ -12599,9 +13507,6 @@ i32.store offset=8 local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u i32.const 3 @@ -12629,11 +13534,7 @@ unreachable end global.get $std/typedarray/arr - local.tee $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 12 i32.ne if @@ -12645,7 +13546,14 @@ unreachable end global.get $std/typedarray/arr + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 1 i32.ne @@ -12658,8 +13566,17 @@ unreachable end global.get $std/typedarray/arr + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 2 i32.ne if @@ -12671,8 +13588,17 @@ unreachable end global.get $std/typedarray/arr + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 3 i32.ne if @@ -12689,11 +13615,7 @@ call $~lib/typedarray/Int32Array#subarray global.set $std/typedarray/arr global.get $std/typedarray/arr - local.tee $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u i32.const 1 @@ -12723,11 +13645,7 @@ unreachable end global.get $std/typedarray/arr - local.tee $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 4 i32.ne if @@ -12739,7 +13657,14 @@ unreachable end global.get $std/typedarray/arr + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 2 i32.ne @@ -12793,11 +13718,7 @@ call $~lib/typedarray/Float64Array#subarray global.set $std/typedarray/af64 global.get $std/typedarray/af64 - local.tee $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.shr_u i32.const 4 @@ -12827,11 +13748,7 @@ unreachable end global.get $std/typedarray/af64 - local.tee $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 32 i32.ne if @@ -12865,15 +13782,31 @@ block (result i32) block (result i32) global.get $std/typedarray/af64 + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select f64.load f64.const 4 f64.eq local.tee $0 if global.get $std/typedarray/af64 + local.tee $0 i32.load offset=4 - f64.load offset=8 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 + i32.lt_u + select + f64.load f64.const 5 f64.eq local.set $0 @@ -12882,8 +13815,17 @@ end if global.get $std/typedarray/af64 + local.tee $0 i32.load offset=4 - f64.load offset=16 + i32.const 16 + i32.add + i32.const -1 + i32.const 16 + local.get $0 + i32.load offset=8 + i32.lt_u + select + f64.load f64.const 6 f64.eq local.set $0 @@ -12892,8 +13834,17 @@ end if global.get $std/typedarray/af64 + local.tee $0 i32.load offset=4 - f64.load offset=24 + i32.const 24 + i32.add + i32.const -1 + i32.const 24 + local.get $0 + i32.load offset=8 + i32.lt_u + select + f64.load f64.const 7 f64.eq local.set $0 @@ -12926,6 +13877,12 @@ i32.store8 offset=2 local.get $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load8_u if i32.const 0 @@ -12936,8 +13893,17 @@ unreachable end global.get $std/typedarray/clampedArr + local.tee $0 i32.load offset=4 - i32.load8_u offset=1 + i32.const 1 + i32.add + i32.const -1 + i32.const 1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 2 i32.ne if @@ -12949,8 +13915,17 @@ unreachable end global.get $std/typedarray/clampedArr + local.tee $0 i32.load offset=4 - i32.load8_u offset=2 + i32.const 2 + i32.add + i32.const -1 + i32.const 2 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 255 i32.ne if @@ -13096,11 +14071,7 @@ i32.const 2147483647 call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/sub8 - local.tee $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.ne if @@ -13128,11 +14099,7 @@ unreachable end global.get $std/typedarray/sub8 - local.tee $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.ne if @@ -13308,11 +14275,7 @@ i32.const 2147483647 call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/sub32 - local.tee $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 2 i32.shr_u i32.const 3 @@ -13342,11 +14305,7 @@ unreachable end global.get $std/typedarray/sub32 - local.tee $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 12 i32.ne if @@ -13424,7 +14383,14 @@ call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/multisubarr1 global.get $std/typedarray/multisubarr1 + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load8_s i32.const 2 i32.ne @@ -13437,11 +14403,7 @@ unreachable end global.get $std/typedarray/multisubarr1 - local.tee $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 5 i32.ne if @@ -13469,11 +14431,7 @@ unreachable end global.get $std/typedarray/multisubarr1 - local.tee $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 5 i32.ne if @@ -13490,7 +14448,14 @@ call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/multisubarr2 global.get $std/typedarray/multisubarr2 + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load8_s i32.const 3 i32.ne @@ -13503,11 +14468,7 @@ unreachable end global.get $std/typedarray/multisubarr2 - local.tee $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 4 i32.ne if @@ -13535,11 +14496,7 @@ unreachable end global.get $std/typedarray/multisubarr2 - local.tee $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 4 i32.ne if @@ -13556,7 +14513,14 @@ call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/multisubarr3 global.get $std/typedarray/multisubarr3 + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load8_s i32.const 4 i32.ne @@ -13569,11 +14533,7 @@ unreachable end global.get $std/typedarray/multisubarr3 - local.tee $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.ne if @@ -13601,11 +14561,7 @@ unreachable end global.get $std/typedarray/multisubarr3 - local.tee $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub i32.const 3 i32.ne if diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 7aca6ab85c..e7a38fc928 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -48,13 +48,13 @@ (data (i32.const 472) "\01\00\00\00\1e\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 512) "\01\00\00\00(\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 560) "\02\00\00\00\0c\00\00\00\n\00\00\00\0c\00\00\00\0e\00\00\00") - (data (i32.const 584) "\10\00\00\00\10\00\00\008\02\00\008\02\00\00D\02\00\00\03\00\00\00") + (data (i32.const 584) "\10\00\00\00\10\00\00\008\02\00\008\02\00\00\0c\00\00\00\03\00\00\00") (data (i32.const 608) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 664) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 720) "\01\00\00\00>\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 792) "\01\00\00\006\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 856) "\02\00\00\00$\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00") - (data (i32.const 904) "\10\00\00\00\10\00\00\00`\03\00\00`\03\00\00\84\03\00\00\t\00\00\00") + (data (i32.const 904) "\10\00\00\00\10\00\00\00`\03\00\00`\03\00\00$\00\00\00\t\00\00\00") (data (i32.const 928) "\01\00\00\00B\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 1008) "\01\00\00\00V\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (table $0 112 funcref) @@ -476,7 +476,7 @@ if i32.const 0 i32.const 64 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -491,7 +491,7 @@ if i32.const 0 i32.const 64 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -555,7 +555,7 @@ if i32.const 0 i32.const 64 - i32.const 223 + i32.const 226 i32.const 57 call $~lib/env/abort unreachable @@ -598,9 +598,7 @@ local.get $3 i32.store offset=4 local.get $0 - local.get $3 local.get $1 - i32.add i32.store offset=8 local.get $0 ) @@ -633,9 +631,6 @@ (func $~lib/runtime/ArrayBufferView#get:byteLength (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 - local.get $0 - i32.load offset=4 - i32.sub ) (func $~lib/typedarray/Int8Array#get:length (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -1499,11 +1494,11 @@ i32.add i32.store offset=4 local.get $7 - local.get $9 local.get $5 + local.get $4 + i32.sub i32.const 2 i32.shl - i32.add i32.store offset=8 local.get $7 ) @@ -1613,11 +1608,11 @@ i32.add i32.store offset=4 local.get $7 - local.get $9 local.get $5 + local.get $4 + i32.sub i32.const 3 i32.shl - i32.add i32.store offset=8 local.get $7 ) @@ -3706,9 +3701,7 @@ local.get $5 i32.store offset=4 local.get $3 - local.get $5 local.get $4 - i32.add i32.store offset=8 local.get $3 local.get $4 @@ -3728,6 +3721,8 @@ (func $std/typedarray/isInt8ArrayEqual (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 call $~lib/typedarray/Int8Array#get:length local.get $1 @@ -3752,14 +3747,30 @@ i32.eqz br_if $break|0 local.get $0 + local.tee $4 i32.load offset=4 local.get $2 + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load8_s local.get $1 + local.tee $4 i32.load offset=4 local.get $2 + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load8_s i32.ne if @@ -3883,11 +3894,11 @@ i32.add i32.store offset=4 local.get $7 - local.get $9 local.get $5 + local.get $4 + i32.sub i32.const 0 i32.shl - i32.add i32.store offset=8 local.get $7 ) @@ -3996,6 +4007,8 @@ (func $std/typedarray/isInt32ArrayEqual (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 call $~lib/typedarray/Int32Array#get:length local.get $1 @@ -4020,18 +4033,34 @@ i32.eqz br_if $break|0 local.get $0 + local.tee $4 i32.load offset=4 local.get $2 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load local.get $1 + local.tee $4 i32.load offset=4 local.get $2 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.ne if @@ -6375,6 +6404,8 @@ (func $std/typedarray/testArrayMap (; 121 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -6396,7 +6427,17 @@ call $~lib/typedarray/Int8Array#map local.set $1 local.get $1 + local.tee $2 i32.load offset=4 + i32.const 0 + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load8_s i32.const 1 i32.eq @@ -6410,8 +6451,18 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 - i32.load8_s offset=1 + i32.const 1 + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 4 i32.eq i32.eqz @@ -6424,8 +6475,18 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 - i32.load8_s offset=2 + i32.const 2 + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 9 i32.eq i32.eqz @@ -6511,6 +6572,8 @@ (func $std/typedarray/testArrayMap (; 124 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -6532,7 +6595,17 @@ call $~lib/typedarray/Uint8Array#map local.set $1 local.get $1 + local.tee $2 i32.load offset=4 + i32.const 0 + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load8_u i32.const 1 i32.eq @@ -6546,8 +6619,18 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 - i32.load8_u offset=1 + i32.const 1 + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 4 i32.eq i32.eqz @@ -6560,8 +6643,18 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 - i32.load8_u offset=2 + i32.const 2 + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 9 i32.eq i32.eqz @@ -6648,6 +6741,7 @@ (local $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -6708,7 +6802,17 @@ call $~lib/typedarray/Uint8ClampedArray#map local.set $2 local.get $2 + local.tee $1 i32.load offset=4 + i32.const 0 + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load8_u i32.const 1 i32.eq @@ -6722,8 +6826,18 @@ unreachable end local.get $2 + local.tee $1 i32.load offset=4 - i32.load8_u offset=1 + i32.const 1 + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 4 i32.eq i32.eqz @@ -6736,8 +6850,18 @@ unreachable end local.get $2 + local.tee $1 i32.load offset=4 - i32.load8_u offset=2 + i32.const 2 + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 9 i32.eq i32.eqz @@ -6823,6 +6947,8 @@ (func $std/typedarray/testArrayMap (; 130 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -6844,7 +6970,19 @@ call $~lib/typedarray/Int16Array#map local.set $1 local.get $1 + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 1 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load16_s i32.const 1 i32.eq @@ -6858,8 +6996,20 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 - i32.load16_s offset=2 + i32.const 1 + i32.const 1 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load16_s i32.const 4 i32.eq i32.eqz @@ -6872,8 +7022,20 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 - i32.load16_s offset=4 + i32.const 2 + i32.const 1 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load16_s i32.const 9 i32.eq i32.eqz @@ -6959,6 +7121,8 @@ (func $std/typedarray/testArrayMap (; 133 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -6980,7 +7144,19 @@ call $~lib/typedarray/Uint16Array#map local.set $1 local.get $1 + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 1 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load16_u i32.const 1 i32.eq @@ -6994,8 +7170,20 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 - i32.load16_u offset=2 + i32.const 1 + i32.const 1 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load16_u i32.const 4 i32.eq i32.eqz @@ -7008,8 +7196,20 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 - i32.load16_u offset=4 + i32.const 2 + i32.const 1 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load16_u i32.const 9 i32.eq i32.eqz @@ -7095,6 +7295,8 @@ (func $std/typedarray/testArrayMap (; 136 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -7116,7 +7318,19 @@ call $~lib/typedarray/Int32Array#map local.set $1 local.get $1 + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 1 i32.eq @@ -7130,8 +7344,20 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 4 i32.eq i32.eqz @@ -7144,8 +7370,20 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 9 i32.eq i32.eqz @@ -7231,6 +7469,8 @@ (func $std/typedarray/testArrayMap (; 139 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -7252,7 +7492,19 @@ call $~lib/typedarray/Uint32Array#map local.set $1 local.get $1 + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 1 i32.eq @@ -7266,8 +7518,20 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 4 i32.eq i32.eqz @@ -7280,8 +7544,20 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 9 i32.eq i32.eqz @@ -7367,6 +7643,8 @@ (func $std/typedarray/testArrayMap (; 142 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -7388,7 +7666,19 @@ call $~lib/typedarray/Int64Array#map local.set $1 local.get $1 + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 3 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select i64.load i64.const 1 i64.eq @@ -7402,8 +7692,20 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 - i64.load offset=8 + i32.const 1 + i32.const 3 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 4 i64.eq i32.eqz @@ -7416,8 +7718,20 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 - i64.load offset=16 + i32.const 2 + i32.const 3 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 9 i64.eq i32.eqz @@ -7503,7 +7817,9 @@ (func $std/typedarray/testArrayMap (; 145 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - i32.const 0 + (local $2 i32) + (local $3 i32) + i32.const 0 i32.const 3 call $~lib/typedarray/Uint64Array#constructor local.set $0 @@ -7524,7 +7840,19 @@ call $~lib/typedarray/Uint64Array#map local.set $1 local.get $1 + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 3 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select i64.load i64.const 1 i64.eq @@ -7538,8 +7866,20 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 - i64.load offset=8 + i32.const 1 + i32.const 3 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 4 i64.eq i32.eqz @@ -7552,8 +7892,20 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 - i64.load offset=16 + i32.const 2 + i32.const 3 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 9 i64.eq i32.eqz @@ -7639,6 +7991,8 @@ (func $std/typedarray/testArrayMap (; 148 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -7660,7 +8014,19 @@ call $~lib/typedarray/Float32Array#map local.set $1 local.get $1 + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select f32.load f32.const 1 f32.eq @@ -7674,8 +8040,20 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 - f32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + f32.load f32.const 4 f32.eq i32.eqz @@ -7688,8 +8066,20 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 - f32.load offset=8 + i32.const 2 + i32.const 2 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + f32.load f32.const 9 f32.eq i32.eqz @@ -7775,6 +8165,8 @@ (func $std/typedarray/testArrayMap (; 151 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -7796,7 +8188,19 @@ call $~lib/typedarray/Float64Array#map local.set $1 local.get $1 + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 3 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select f64.load f64.const 1 f64.eq @@ -7810,8 +8214,20 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 - f64.load offset=8 + i32.const 1 + i32.const 3 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + f64.load f64.const 4 f64.eq i32.eqz @@ -7824,8 +8240,20 @@ unreachable end local.get $1 + local.tee $2 i32.load offset=4 - f64.load offset=16 + i32.const 2 + i32.const 3 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + f64.load f64.const 9 f64.eq i32.eqz @@ -12738,20 +13166,30 @@ ) (func $std/typedarray/testArrayForEach~anonymous|0 (; 286 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) global.get $std/typedarray/forEachValues + local.tee $3 i32.load offset=4 local.get $1 i32.const 2 i32.shl + local.tee $4 i32.add + i32.const -1 + local.get $4 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load - local.set $3 + local.set $5 local.get $0 i32.const 24 i32.shl i32.const 24 i32.shr_s - local.get $3 + local.get $5 i32.const 24 i32.shl i32.const 24 @@ -12842,6 +13280,8 @@ ) (func $std/typedarray/testArrayForEach (; 288 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -12853,7 +13293,19 @@ local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 24 i32.shl @@ -12863,8 +13315,20 @@ local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 24 i32.shl i32.const 24 @@ -12873,8 +13337,20 @@ local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 24 i32.shl i32.const 24 @@ -12898,18 +13374,28 @@ ) (func $std/typedarray/testArrayForEach~anonymous|0 (; 289 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) global.get $std/typedarray/forEachValues + local.tee $3 i32.load offset=4 local.get $1 i32.const 2 i32.shl + local.tee $4 i32.add + i32.const -1 + local.get $4 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load - local.set $3 + local.set $5 local.get $0 i32.const 255 i32.and - local.get $3 + local.get $5 i32.const 255 i32.and i32.eq @@ -12998,6 +13484,8 @@ ) (func $std/typedarray/testArrayForEach (; 291 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -13009,7 +13497,19 @@ local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 255 i32.and @@ -13017,16 +13517,40 @@ local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 255 i32.and i32.store8 offset=1 local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 255 i32.and i32.store8 offset=2 @@ -13048,18 +13572,28 @@ ) (func $std/typedarray/testArrayForEach~anonymous|0 (; 292 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) global.get $std/typedarray/forEachValues + local.tee $3 i32.load offset=4 local.get $1 i32.const 2 i32.shl + local.tee $4 i32.add + i32.const -1 + local.get $4 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load - local.set $3 + local.set $5 local.get $0 i32.const 255 i32.and - local.get $3 + local.get $5 i32.const 255 i32.and i32.eq @@ -13149,6 +13683,7 @@ (func $std/typedarray/testArrayForEach (; 294 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -13160,7 +13695,19 @@ local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 255 i32.and @@ -13181,8 +13728,20 @@ local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 255 i32.and local.tee $1 @@ -13202,8 +13761,20 @@ local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 255 i32.and local.tee $1 @@ -13238,20 +13809,30 @@ ) (func $std/typedarray/testArrayForEach~anonymous|0 (; 295 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) global.get $std/typedarray/forEachValues + local.tee $3 i32.load offset=4 local.get $1 i32.const 2 i32.shl + local.tee $4 i32.add + i32.const -1 + local.get $4 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load - local.set $3 + local.set $5 local.get $0 i32.const 16 i32.shl i32.const 16 i32.shr_s - local.get $3 + local.get $5 i32.const 16 i32.shl i32.const 16 @@ -13342,6 +13923,8 @@ ) (func $std/typedarray/testArrayForEach (; 297 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -13353,7 +13936,19 @@ local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 16 i32.shl @@ -13363,8 +13958,20 @@ local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 16 i32.shl i32.const 16 @@ -13373,8 +13980,20 @@ local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 16 i32.shl i32.const 16 @@ -13398,18 +14017,28 @@ ) (func $std/typedarray/testArrayForEach~anonymous|0 (; 298 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) global.get $std/typedarray/forEachValues + local.tee $3 i32.load offset=4 local.get $1 i32.const 2 i32.shl + local.tee $4 i32.add + i32.const -1 + local.get $4 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load - local.set $3 + local.set $5 local.get $0 i32.const 65535 i32.and - local.get $3 + local.get $5 i32.const 65535 i32.and i32.eq @@ -13498,6 +14127,8 @@ ) (func $std/typedarray/testArrayForEach (; 300 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -13509,7 +14140,19 @@ local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 65535 i32.and @@ -13517,16 +14160,40 @@ local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 65535 i32.and i32.store16 offset=2 local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 65535 i32.and i32.store16 offset=4 @@ -13548,16 +14215,26 @@ ) (func $std/typedarray/testArrayForEach~anonymous|0 (; 301 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) global.get $std/typedarray/forEachValues + local.tee $3 i32.load offset=4 local.get $1 i32.const 2 i32.shl + local.tee $4 i32.add + i32.const -1 + local.get $4 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.eq i32.eqz if @@ -13644,6 +14321,8 @@ ) (func $std/typedarray/testArrayForEach (; 303 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -13655,20 +14334,56 @@ local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load i32.store local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load i32.store offset=4 local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 i32.load offset=8 + i32.lt_u + select + i32.load i32.store offset=8 local.get $0 i32.const 106 @@ -13688,16 +14403,26 @@ ) (func $std/typedarray/testArrayForEach~anonymous|0 (; 304 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) global.get $std/typedarray/forEachValues + local.tee $3 i32.load offset=4 local.get $1 i32.const 2 i32.shl + local.tee $4 i32.add + i32.const -1 + local.get $4 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.eq i32.eqz if @@ -13784,6 +14509,8 @@ ) (func $std/typedarray/testArrayForEach (; 306 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -13795,20 +14522,56 @@ local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load i32.store local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load i32.store offset=4 local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 i32.load offset=8 + i32.lt_u + select + i32.load i32.store offset=8 local.get $0 i32.const 107 @@ -13828,16 +14591,26 @@ ) (func $std/typedarray/testArrayForEach~anonymous|0 (; 307 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) global.get $std/typedarray/forEachValues + local.tee $3 i32.load offset=4 local.get $1 i32.const 2 i32.shl + local.tee $4 i32.add + i32.const -1 + local.get $4 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i64.extend_i32_s i64.eq i32.eqz @@ -13925,6 +14698,8 @@ ) (func $std/typedarray/testArrayForEach (; 309 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -13936,20 +14711,56 @@ local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i64.load32_s i64.store local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 - i64.load32_s 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 + i64.load32_s i64.store offset=8 local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 - i64.load32_s offset=8 + i32.const 2 + 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 + i64.load32_s i64.store offset=16 local.get $0 i32.const 108 @@ -13969,16 +14780,26 @@ ) (func $std/typedarray/testArrayForEach~anonymous|0 (; 310 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) global.get $std/typedarray/forEachValues + local.tee $3 i32.load offset=4 local.get $1 i32.const 2 i32.shl + local.tee $4 i32.add + i32.const -1 + local.get $4 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i64.extend_i32_s i64.eq i32.eqz @@ -14066,6 +14887,8 @@ ) (func $std/typedarray/testArrayForEach (; 312 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -14077,20 +14900,56 @@ local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i64.load32_s i64.store local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 - i64.load32_s 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 + i64.load32_s i64.store offset=8 local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 - i64.load32_s offset=8 + i32.const 2 + 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 + i64.load32_s i64.store offset=16 local.get $0 i32.const 109 @@ -14110,16 +14969,26 @@ ) (func $std/typedarray/testArrayForEach~anonymous|0 (; 313 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) global.get $std/typedarray/forEachValues + local.tee $3 i32.load offset=4 local.get $1 i32.const 2 i32.shl + local.tee $4 i32.add + i32.const -1 + local.get $4 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 f32.convert_i32_s f32.eq i32.eqz @@ -14207,6 +15076,8 @@ ) (func $std/typedarray/testArrayForEach (; 315 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -14218,22 +15089,58 @@ local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load f32.convert_i32_s f32.store local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load f32.convert_i32_s f32.store offset=4 local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 i32.load offset=8 + i32.lt_u + select + i32.load f32.convert_i32_s f32.store offset=8 local.get $0 @@ -14254,16 +15161,26 @@ ) (func $std/typedarray/testArrayForEach~anonymous|0 (; 316 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) global.get $std/typedarray/forEachValues + local.tee $3 i32.load offset=4 local.get $1 i32.const 2 i32.shl + local.tee $4 i32.add + i32.const -1 + local.get $4 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 f64.convert_i32_s f64.eq i32.eqz @@ -14351,6 +15268,8 @@ ) (func $std/typedarray/testArrayForEach (; 318 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) + (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -14362,22 +15281,58 @@ local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load f64.convert_i32_s f64.store local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load f64.convert_i32_s f64.store offset=8 local.get $0 i32.load offset=4 global.get $std/typedarray/forEachValues + local.tee $1 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 i32.load offset=8 + i32.lt_u + select + i32.load f64.convert_i32_s f64.store offset=16 local.get $0 @@ -14472,6 +15427,8 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -14499,11 +15456,19 @@ local.get $3 i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 24 i32.shl @@ -14515,11 +15480,19 @@ local.get $3 i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 24 i32.shl @@ -14549,18 +15522,34 @@ i32.eqz br_if $break|1 local.get $1 + local.tee $4 i32.load offset=4 local.get $3 + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load8_s local.get $0 + local.tee $4 i32.load offset=4 i32.const 8 local.get $3 i32.sub i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 24 i32.shl @@ -14590,9 +15579,19 @@ i32.const 8 call $~lib/typedarray/Int8Array#subarray call $~lib/typedarray/Int8Array#reverse - local.set $4 - local.get $4 + local.set $6 + local.get $6 + local.tee $4 i32.load offset=4 + i32.const 0 + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load8_s i32.const 8 i32.eq @@ -14605,9 +15604,19 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i32.load8_s offset=1 + i32.const 1 + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 7 i32.eq i32.eqz @@ -14619,9 +15628,19 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i32.load8_s offset=2 + i32.const 2 + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 6 i32.eq i32.eqz @@ -14633,9 +15652,19 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i32.load8_s offset=3 + i32.const 3 + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 5 i32.eq i32.eqz @@ -14824,11 +15853,11 @@ i32.add i32.store offset=4 local.get $7 - local.get $9 local.get $5 + local.get $4 + i32.sub i32.const 0 i32.shl - i32.add i32.store offset=8 local.get $7 ) @@ -14838,6 +15867,8 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -14865,11 +15896,19 @@ local.get $3 i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 255 i32.and @@ -14879,11 +15918,19 @@ local.get $3 i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 255 i32.and @@ -14911,18 +15958,34 @@ i32.eqz br_if $break|1 local.get $1 + local.tee $4 i32.load offset=4 local.get $3 + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load8_u local.get $0 + local.tee $4 i32.load offset=4 i32.const 8 local.get $3 i32.sub i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 255 i32.and @@ -14950,9 +16013,19 @@ i32.const 8 call $~lib/typedarray/Uint8Array#subarray call $~lib/typedarray/Uint8Array#reverse - local.set $4 - local.get $4 + local.set $6 + local.get $6 + local.tee $4 i32.load offset=4 + i32.const 0 + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load8_u i32.const 8 i32.eq @@ -14965,9 +16038,19 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i32.load8_u offset=1 + i32.const 1 + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 7 i32.eq i32.eqz @@ -14979,9 +16062,19 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i32.load8_u offset=2 + i32.const 2 + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 6 i32.eq i32.eqz @@ -14993,9 +16086,19 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i32.load8_u offset=3 + i32.const 3 + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 5 i32.eq i32.eqz @@ -15184,11 +16287,11 @@ i32.add i32.store offset=4 local.get $7 - local.get $9 local.get $5 + local.get $4 + i32.sub i32.const 0 i32.shl - i32.add i32.store offset=8 local.get $7 ) @@ -15199,6 +16302,7 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -15226,11 +16330,19 @@ local.get $3 i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 255 i32.and @@ -15253,11 +16365,19 @@ local.get $3 i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 255 i32.and @@ -15298,18 +16418,34 @@ i32.eqz br_if $break|1 local.get $1 + local.tee $4 i32.load offset=4 local.get $3 + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load8_u local.get $0 + local.tee $4 i32.load offset=4 i32.const 8 local.get $3 i32.sub i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 255 i32.and @@ -15337,9 +16473,19 @@ i32.const 8 call $~lib/typedarray/Uint8ClampedArray#subarray call $~lib/typedarray/Uint8ClampedArray#reverse - local.set $5 - local.get $5 + local.set $6 + local.get $6 + local.tee $4 i32.load offset=4 + i32.const 0 + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load8_u i32.const 8 i32.eq @@ -15352,9 +16498,19 @@ call $~lib/env/abort unreachable end - local.get $5 + local.get $6 + local.tee $4 i32.load offset=4 - i32.load8_u offset=1 + i32.const 1 + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 7 i32.eq i32.eqz @@ -15366,9 +16522,19 @@ call $~lib/env/abort unreachable end - local.get $5 + local.get $6 + local.tee $4 i32.load offset=4 - i32.load8_u offset=2 + i32.const 2 + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 6 i32.eq i32.eqz @@ -15380,9 +16546,19 @@ call $~lib/env/abort unreachable end - local.get $5 + local.get $6 + local.tee $4 i32.load offset=4 - i32.load8_u offset=3 + i32.const 3 + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 5 i32.eq i32.eqz @@ -15571,11 +16747,11 @@ i32.add i32.store offset=4 local.get $7 - local.get $9 local.get $5 + local.get $4 + i32.sub i32.const 1 i32.shl - i32.add i32.store offset=8 local.get $7 ) @@ -15585,6 +16761,8 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -15614,11 +16792,19 @@ i32.shl i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 16 i32.shl @@ -15632,11 +16818,19 @@ i32.shl i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 16 i32.shl @@ -15666,20 +16860,36 @@ i32.eqz br_if $break|1 local.get $1 + local.tee $4 i32.load offset=4 local.get $3 i32.const 1 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load16_s local.get $0 + local.tee $4 i32.load offset=4 i32.const 8 local.get $3 i32.sub i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 16 i32.shl @@ -15709,9 +16919,21 @@ i32.const 8 call $~lib/typedarray/Int16Array#subarray call $~lib/typedarray/Int16Array#reverse - local.set $4 - local.get $4 + local.set $6 + local.get $6 + local.tee $4 i32.load offset=4 + i32.const 0 + i32.const 1 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load16_s i32.const 8 i32.eq @@ -15724,9 +16946,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i32.load16_s offset=2 + i32.const 1 + i32.const 1 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load16_s i32.const 7 i32.eq i32.eqz @@ -15738,9 +16972,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i32.load16_s offset=4 + i32.const 2 + i32.const 1 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load16_s i32.const 6 i32.eq i32.eqz @@ -15752,9 +16998,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i32.load16_s offset=6 + i32.const 3 + i32.const 1 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load16_s i32.const 5 i32.eq i32.eqz @@ -15943,11 +17201,11 @@ i32.add i32.store offset=4 local.get $7 - local.get $9 local.get $5 + local.get $4 + i32.sub i32.const 1 i32.shl - i32.add i32.store offset=8 local.get $7 ) @@ -15957,6 +17215,8 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -15986,11 +17246,19 @@ i32.shl i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 65535 i32.and @@ -16002,11 +17270,19 @@ i32.shl i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 65535 i32.and @@ -16034,20 +17310,36 @@ i32.eqz br_if $break|1 local.get $1 + local.tee $4 i32.load offset=4 local.get $3 i32.const 1 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load16_u local.get $0 + local.tee $4 i32.load offset=4 i32.const 8 local.get $3 i32.sub i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 65535 i32.and @@ -16075,9 +17367,21 @@ i32.const 8 call $~lib/typedarray/Uint16Array#subarray call $~lib/typedarray/Uint16Array#reverse - local.set $4 - local.get $4 + local.set $6 + local.get $6 + local.tee $4 i32.load offset=4 + i32.const 0 + i32.const 1 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load16_u i32.const 8 i32.eq @@ -16090,9 +17394,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i32.load16_u offset=2 + i32.const 1 + i32.const 1 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load16_u i32.const 7 i32.eq i32.eqz @@ -16104,9 +17420,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i32.load16_u offset=4 + i32.const 2 + i32.const 1 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load16_u i32.const 6 i32.eq i32.eqz @@ -16118,9 +17446,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i32.load16_u offset=6 + i32.const 3 + i32.const 1 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load16_u i32.const 5 i32.eq i32.eqz @@ -16209,6 +17549,8 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -16238,11 +17580,19 @@ i32.shl i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.store local.get $2 @@ -16252,11 +17602,19 @@ i32.shl i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.store end @@ -16282,20 +17640,36 @@ i32.eqz br_if $break|1 local.get $1 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load local.get $0 + local.tee $4 i32.load offset=4 i32.const 8 local.get $3 i32.sub i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.eq i32.eqz @@ -16321,9 +17695,21 @@ i32.const 8 call $~lib/typedarray/Int32Array#subarray call $~lib/typedarray/Int32Array#reverse - local.set $4 - local.get $4 + local.set $6 + local.get $6 + local.tee $4 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 8 i32.eq @@ -16336,9 +17722,21 @@ call $~lib/env/abort unreachable end - local.get $4 - i32.load offset=4 + local.get $6 + local.tee $4 i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 7 i32.eq i32.eqz @@ -16350,9 +17748,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 6 i32.eq i32.eqz @@ -16364,9 +17774,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i32.load offset=12 + i32.const 3 + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 5 i32.eq i32.eqz @@ -16555,11 +17977,11 @@ i32.add i32.store offset=4 local.get $7 - local.get $9 local.get $5 + local.get $4 + i32.sub i32.const 2 i32.shl - i32.add i32.store offset=8 local.get $7 ) @@ -16569,6 +17991,8 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -16598,11 +18022,19 @@ i32.shl i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.store local.get $2 @@ -16612,11 +18044,19 @@ i32.shl i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.store end @@ -16642,20 +18082,36 @@ i32.eqz br_if $break|1 local.get $1 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load local.get $0 + local.tee $4 i32.load offset=4 i32.const 8 local.get $3 i32.sub i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.eq i32.eqz @@ -16681,9 +18137,21 @@ i32.const 8 call $~lib/typedarray/Uint32Array#subarray call $~lib/typedarray/Uint32Array#reverse - local.set $4 - local.get $4 + local.set $6 + local.get $6 + local.tee $4 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 8 i32.eq @@ -16696,9 +18164,21 @@ call $~lib/env/abort unreachable end - local.get $4 - i32.load offset=4 + local.get $6 + local.tee $4 i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 7 i32.eq i32.eqz @@ -16710,9 +18190,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 6 i32.eq i32.eqz @@ -16724,9 +18216,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i32.load offset=12 + i32.const 3 + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 5 i32.eq i32.eqz @@ -16915,11 +18419,11 @@ i32.add i32.store offset=4 local.get $7 - local.get $9 local.get $5 + local.get $4 + i32.sub i32.const 3 i32.shl - i32.add i32.store offset=8 local.get $7 ) @@ -16929,6 +18433,8 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -16958,11 +18464,19 @@ i32.shl i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i64.load32_s i64.store local.get $2 @@ -16972,11 +18486,19 @@ i32.shl i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i64.load32_s i64.store end @@ -17002,20 +18524,36 @@ i32.eqz br_if $break|1 local.get $1 + local.tee $4 i32.load offset=4 local.get $3 i32.const 3 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i64.load local.get $0 + local.tee $4 i32.load offset=4 i32.const 8 local.get $3 i32.sub i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i64.load32_s i64.eq i32.eqz @@ -17041,9 +18579,21 @@ i32.const 8 call $~lib/typedarray/Int64Array#subarray call $~lib/typedarray/Int64Array#reverse - local.set $4 - local.get $4 + local.set $6 + local.get $6 + local.tee $4 i32.load offset=4 + i32.const 0 + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i64.load i64.const 8 i64.eq @@ -17056,9 +18606,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i64.load offset=8 + i32.const 1 + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 7 i64.eq i32.eqz @@ -17070,9 +18632,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i64.load offset=16 + i32.const 2 + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 6 i64.eq i32.eqz @@ -17084,9 +18658,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i64.load offset=24 + i32.const 3 + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 5 i64.eq i32.eqz @@ -17275,11 +18861,11 @@ i32.add i32.store offset=4 local.get $7 - local.get $9 local.get $5 + local.get $4 + i32.sub i32.const 3 i32.shl - i32.add i32.store offset=8 local.get $7 ) @@ -17289,6 +18875,8 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -17318,11 +18906,19 @@ i32.shl i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i64.load32_s i64.store local.get $2 @@ -17332,11 +18928,19 @@ i32.shl i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i64.load32_s i64.store end @@ -17362,20 +18966,36 @@ i32.eqz br_if $break|1 local.get $1 + local.tee $4 i32.load offset=4 local.get $3 i32.const 3 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i64.load local.get $0 + local.tee $4 i32.load offset=4 i32.const 8 local.get $3 i32.sub i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i64.load32_s i64.eq i32.eqz @@ -17401,9 +19021,21 @@ i32.const 8 call $~lib/typedarray/Uint64Array#subarray call $~lib/typedarray/Uint64Array#reverse - local.set $4 - local.get $4 + local.set $6 + local.get $6 + local.tee $4 i32.load offset=4 + i32.const 0 + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i64.load i64.const 8 i64.eq @@ -17416,9 +19048,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i64.load offset=8 + i32.const 1 + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 7 i64.eq i32.eqz @@ -17430,9 +19074,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i64.load offset=16 + i32.const 2 + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 6 i64.eq i32.eqz @@ -17444,9 +19100,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - i64.load offset=24 + i32.const 3 + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i64.load i64.const 5 i64.eq i32.eqz @@ -17635,11 +19303,11 @@ i32.add i32.store offset=4 local.get $7 - local.get $9 local.get $5 + local.get $4 + i32.sub i32.const 2 i32.shl - i32.add i32.store offset=8 local.get $7 ) @@ -17649,6 +19317,8 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -17678,11 +19348,19 @@ i32.shl i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load f32.convert_i32_s f32.store @@ -17693,11 +19371,19 @@ i32.shl i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load f32.convert_i32_s f32.store @@ -17724,20 +19410,36 @@ i32.eqz br_if $break|1 local.get $1 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select f32.load local.get $0 + local.tee $4 i32.load offset=4 i32.const 8 local.get $3 i32.sub i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load f32.convert_i32_s f32.eq @@ -17764,9 +19466,21 @@ i32.const 8 call $~lib/typedarray/Float32Array#subarray call $~lib/typedarray/Float32Array#reverse - local.set $4 - local.get $4 + local.set $6 + local.get $6 + local.tee $4 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select f32.load f32.const 8 f32.eq @@ -17779,9 +19493,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - f32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f32.load f32.const 7 f32.eq i32.eqz @@ -17793,9 +19519,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - f32.load offset=8 + i32.const 2 + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f32.load f32.const 6 f32.eq i32.eqz @@ -17807,9 +19545,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - f32.load offset=12 + i32.const 3 + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f32.load f32.const 5 f32.eq i32.eqz @@ -17898,6 +19648,8 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -17927,11 +19679,19 @@ i32.shl i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load f64.convert_i32_s f64.store @@ -17942,11 +19702,19 @@ i32.shl i32.add local.get $0 + local.tee $4 i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load f64.convert_i32_s f64.store @@ -17973,20 +19741,36 @@ i32.eqz br_if $break|1 local.get $1 + local.tee $4 i32.load offset=4 local.get $3 i32.const 3 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select f64.load local.get $0 + local.tee $4 i32.load offset=4 i32.const 8 local.get $3 i32.sub i32.const 2 i32.shl + local.tee $5 i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select i32.load f64.convert_i32_s f64.eq @@ -18013,9 +19797,21 @@ i32.const 8 call $~lib/typedarray/Float64Array#subarray call $~lib/typedarray/Float64Array#reverse - local.set $4 - local.get $4 + local.set $6 + local.get $6 + local.tee $4 i32.load offset=4 + i32.const 0 + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select f64.load f64.const 8 f64.eq @@ -18028,9 +19824,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - f64.load offset=8 + i32.const 1 + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f64.load f64.const 7 f64.eq i32.eqz @@ -18042,9 +19850,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - f64.load offset=16 + i32.const 2 + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f64.load f64.const 6 f64.eq i32.eqz @@ -18056,9 +19876,21 @@ call $~lib/env/abort unreachable end - local.get $4 + local.get $6 + local.tee $4 i32.load offset=4 - f64.load offset=24 + i32.const 3 + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f64.load f64.const 5 f64.eq i32.eqz @@ -18073,6 +19905,7 @@ ) (func $start:std/typedarray (; 349 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32.const 1 i32.eq @@ -18277,7 +20110,19 @@ unreachable end global.get $std/typedarray/arr + local.tee $0 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 1 i32.eq @@ -18291,8 +20136,20 @@ unreachable end global.get $std/typedarray/arr + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 2 i32.eq i32.eqz @@ -18305,8 +20162,20 @@ unreachable end global.get $std/typedarray/arr + local.tee $0 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 3 i32.eq i32.eqz @@ -18367,7 +20236,19 @@ unreachable end global.get $std/typedarray/arr + local.tee $0 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 2 i32.eq @@ -18473,40 +20354,94 @@ end drop global.get $std/typedarray/af64 + local.tee $0 i32.load offset=4 + i32.const 0 + i32.const 3 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select f64.load f64.const 4 f64.eq local.tee $0 if (result i32) global.get $std/typedarray/af64 + local.tee $0 i32.load offset=4 - f64.load offset=8 + i32.const 1 + i32.const 3 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + f64.load f64.const 5 f64.eq else local.get $0 end local.tee $0 + i32.const 0 + i32.ne if (result i32) global.get $std/typedarray/af64 + local.tee $0 i32.load offset=4 - f64.load offset=16 + i32.const 2 + i32.const 3 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + f64.load f64.const 6 f64.eq else local.get $0 end local.tee $0 + i32.const 0 + i32.ne if (result i32) global.get $std/typedarray/af64 + local.tee $0 i32.load offset=4 - f64.load offset=24 + i32.const 3 + i32.const 3 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + f64.load f64.const 7 f64.eq else local.get $0 end + i32.const 0 + i32.ne i32.eqz if i32.const 0 @@ -18572,7 +20507,17 @@ i32.and i32.store8 offset=2 global.get $std/typedarray/clampedArr + local.tee $0 i32.load offset=4 + i32.const 0 + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load8_u i32.const 0 i32.eq @@ -18586,8 +20531,18 @@ unreachable end global.get $std/typedarray/clampedArr + local.tee $0 i32.load offset=4 - i32.load8_u offset=1 + i32.const 1 + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 2 i32.eq i32.eqz @@ -18600,8 +20555,18 @@ unreachable end global.get $std/typedarray/clampedArr + local.tee $0 i32.load offset=4 - i32.load8_u offset=2 + i32.const 2 + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_u i32.const 255 i32.eq i32.eqz @@ -19129,7 +21094,17 @@ call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/multisubarr1 global.get $std/typedarray/multisubarr1 + local.tee $0 i32.load offset=4 + i32.const 0 + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load8_s i32.const 2 i32.eq @@ -19187,7 +21162,17 @@ call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/multisubarr2 global.get $std/typedarray/multisubarr2 + local.tee $0 i32.load offset=4 + i32.const 0 + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load8_s i32.const 3 i32.eq @@ -19245,7 +21230,17 @@ call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/multisubarr3 global.get $std/typedarray/multisubarr3 + local.tee $0 i32.load offset=4 + i32.const 0 + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load8_s i32.const 4 i32.eq From edb2299f13b8deb0222811a6880894aff9d944f0 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 17 Mar 2019 12:25:54 +0100 Subject: [PATCH 044/119] fixes --- src/builtins.ts | 27 +- src/compiler.ts | 64 +- src/program.ts | 31 + src/resolver.ts | 46 +- std/assembly/array.ts | 37 +- std/assembly/dataview.ts | 92 +- std/assembly/typedarray.ts | 4 + tests/compiler/call-super.optimized.wat | 4 +- tests/compiler/call-super.untouched.wat | 4 +- tests/compiler/constructor.optimized.wat | 4 +- tests/compiler/constructor.untouched.wat | 4 +- tests/compiler/exports.optimized.wat | 4 +- tests/compiler/exports.untouched.wat | 4 +- tests/compiler/getter-call.optimized.wat | 4 +- tests/compiler/getter-call.untouched.wat | 4 +- tests/compiler/inlining.optimized.wat | 4 +- tests/compiler/inlining.untouched.wat | 4 +- .../new-without-allocator.untouched.wat | 4 +- tests/compiler/nonNullAssertion.optimized.wat | 47 +- tests/compiler/nonNullAssertion.untouched.wat | 172 +- tests/compiler/number.optimized.wat | 12 +- tests/compiler/number.untouched.wat | 12 +- tests/compiler/object-literal.optimized.wat | 4 +- tests/compiler/object-literal.untouched.wat | 4 +- .../optional-typeparameters.optimized.wat | 4 +- .../optional-typeparameters.untouched.wat | 4 +- tests/compiler/std/array-access.optimized.wat | 190 +- tests/compiler/std/array-access.untouched.wat | 286 +- .../compiler/std/array-literal.optimized.wat | 227 +- .../compiler/std/array-literal.untouched.wat | 470 +- tests/compiler/std/array.optimized.wat | 8720 ++++---- tests/compiler/std/array.ts | 6 +- tests/compiler/std/array.untouched.wat | 16714 +++++++--------- tests/compiler/std/arraybuffer.optimized.wat | 1195 +- tests/compiler/std/arraybuffer.ts | 1 - tests/compiler/std/arraybuffer.untouched.wat | 1762 +- tests/compiler/std/dataview.optimized.wat | 1041 +- tests/compiler/std/dataview.untouched.wat | 2385 +-- tests/compiler/std/date.optimized.wat | 4 +- tests/compiler/std/date.untouched.wat | 4 +- tests/compiler/std/new.optimized.wat | 4 +- tests/compiler/std/new.untouched.wat | 4 +- .../std/operator-overloading.optimized.wat | 4 +- .../std/operator-overloading.untouched.wat | 4 +- tests/compiler/std/runtime.optimized.wat | 4 +- tests/compiler/std/runtime.untouched.wat | 4 +- tests/compiler/std/string-utf8.optimized.wat | 4 +- tests/compiler/std/string-utf8.untouched.wat | 4 +- tests/compiler/std/string.optimized.wat | 329 +- tests/compiler/std/string.untouched.wat | 522 +- tests/compiler/std/symbol.optimized.wat | 4 +- tests/compiler/std/symbol.untouched.wat | 4 +- 52 files changed, 16354 insertions(+), 18146 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index ee94c16aee..d3cfa40753 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -4085,27 +4085,6 @@ export function compileIterateRoots(compiler: Compiler): void { ); } -function determineTypedArrayType(target: Class, program: Program): Type | null { - switch (target.internalName) { - case BuiltinSymbols.Int8Array: return Type.i8; - case BuiltinSymbols.Uint8ClampedArray: - case BuiltinSymbols.Uint8Array: return Type.u8; - case BuiltinSymbols.Int16Array: return Type.i16; - case BuiltinSymbols.Uint16Array: return Type.u16; - case BuiltinSymbols.Int32Array: return Type.i32; - case BuiltinSymbols.Uint32Array: return Type.u32; - case BuiltinSymbols.Int64Array: return Type.i64; - case BuiltinSymbols.Uint64Array: return Type.u64; - case BuiltinSymbols.Float32Array: return Type.f32; - case BuiltinSymbols.Float64Array: return Type.f64; - } - var typeArguments = target.typeArguments; - if (typeArguments && typeArguments.length == 1) { - return typeArguments[0]; // Array, TypedArray - } - return null; -} - export function compileBuiltinArrayGet( compiler: Compiler, target: Class, @@ -4113,7 +4092,7 @@ export function compileBuiltinArrayGet( elementExpression: Expression, contextualType: Type ): ExpressionRef { - var type = assert(determineTypedArrayType(target, compiler.program)); + var type = assert(compiler.program.determineBuiltinArrayType(target)); var module = compiler.module; var outType = ( type.is(TypeFlags.INTEGER) && @@ -4258,7 +4237,7 @@ export function compileBuiltinArraySet( valueExpression: Expression, contextualType: Type ): ExpressionRef { - var type = assert(determineTypedArrayType(target, compiler.program)); + var type = assert(compiler.program.determineBuiltinArrayType(target)); return compileBuiltinArraySetWithValue( compiler, target, @@ -4294,7 +4273,7 @@ export function compileBuiltinArraySetWithValue( // TODO: check offset var program = compiler.program; - var type = assert(determineTypedArrayType(target, compiler.program)); + var type = assert(compiler.program.determineBuiltinArrayType(target)); var module = compiler.module; var dataStart = assert(target.lookupInSelf("dataStart")); diff --git a/src/compiler.ts b/src/compiler.ts index 37f48f143a..1de1b5f7a3 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -4704,18 +4704,16 @@ export class Compiler extends DiagnosticEmitter { case ElementKind.CLASS: { let elementExpression = resolver.currentElementExpression; if (elementExpression) { // indexed access - let arrayBufferView = this.program.arrayBufferViewInstance; - if (arrayBufferView) { - if ((target).prototype.extends(arrayBufferView.prototype)) { - return compileBuiltinArraySet( - this, - target, - assert(this.resolver.currentThisExpression), - elementExpression, - valueExpression, - contextualType - ); - } + let arrayType = this.program.determineBuiltinArrayType(target); + if (arrayType) { + return compileBuiltinArraySet( + this, + target, + assert(this.resolver.currentThisExpression), + elementExpression, + valueExpression, + contextualType + ); } let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); let indexedSet = (target).lookupOverload(OperatorKind.INDEXED_SET, isUnchecked); @@ -4940,18 +4938,16 @@ export class Compiler extends DiagnosticEmitter { case ElementKind.CLASS: { let elementExpression = this.resolver.currentElementExpression; if (elementExpression) { - let arrayBufferView = this.program.arrayBufferViewInstance; - if (arrayBufferView) { - if ((target).prototype.extends(arrayBufferView.prototype)) { - return compileBuiltinArraySetWithValue( - this, - target, - assert(this.resolver.currentThisExpression), - elementExpression, - valueWithCorrectType, - tee - ); - } + let arrayType = this.program.determineBuiltinArrayType(target); + if (arrayType) { + return compileBuiltinArraySetWithValue( + this, + target, + assert(this.resolver.currentThisExpression), + elementExpression, + valueWithCorrectType, + tee + ); } let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); @@ -5960,17 +5956,15 @@ export class Compiler extends DiagnosticEmitter { if (!target) return this.module.createUnreachable(); switch (target.kind) { case ElementKind.CLASS: { - let arrayBufferView = this.program.arrayBufferViewInstance; - if (arrayBufferView) { - if ((target).prototype.extends(arrayBufferView.prototype)) { - return compileBuiltinArrayGet( - this, - target, - expression.expression, - expression.elementExpression, - contextualType - ); - } + let arrayType = this.program.determineBuiltinArrayType(target); + if (arrayType) { + return compileBuiltinArrayGet( + this, + target, + expression.expression, + expression.elementExpression, + contextualType + ); } let isUnchecked = this.currentFlow.is(FlowFlags.UNCHECKED_CONTEXT); let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); diff --git a/src/program.ts b/src/program.ts index c4cee9045c..a8deb0a917 100644 --- a/src/program.ts +++ b/src/program.ts @@ -100,6 +100,10 @@ import { Flow } from "./flow"; +import { + BuiltinSymbols +} from "./builtins"; + /** Represents a yet unresolved `import`. */ class QueuedImport { constructor( @@ -1702,6 +1706,33 @@ export class Program extends DiagnosticEmitter { if (!parent.add(name, element)) continue; // reports } } + + /** Determines the element type of a built-in array. */ + determineBuiltinArrayType(target: Class): Type | null { + switch (target.internalName) { + case BuiltinSymbols.Int8Array: return Type.i8; + case BuiltinSymbols.Uint8ClampedArray: + case BuiltinSymbols.Uint8Array: return Type.u8; + case BuiltinSymbols.Int16Array: return Type.i16; + case BuiltinSymbols.Uint16Array: return Type.u16; + case BuiltinSymbols.Int32Array: return Type.i32; + case BuiltinSymbols.Uint32Array: return Type.u32; + case BuiltinSymbols.Int64Array: return Type.i64; + case BuiltinSymbols.Uint64Array: return Type.u64; + case BuiltinSymbols.Float32Array: return Type.f32; + case BuiltinSymbols.Float64Array: return Type.f64; + } + var current: Class | null = target; + var arrayPrototype = this.arrayPrototype; + do { + if (current.prototype == arrayPrototype) { // Array + let typeArguments = assert(current.typeArguments); + assert(typeArguments.length == 1); + return typeArguments[0]; + } + } while (current = current.base); + return null; + } } /** Indicates the specific kind of an {@link Element}. */ diff --git a/src/resolver.ts b/src/resolver.ts index f32b815559..0c3fa35b56 100644 --- a/src/resolver.ts +++ b/src/resolver.ts @@ -610,19 +610,22 @@ export class Resolver extends DiagnosticEmitter { case ElementKind.CLASS: { // property access on element access? let elementExpression = this.currentElementExpression; if (elementExpression) { - let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET); - if (!indexedGet) { - this.error( - DiagnosticCode.Index_signature_is_missing_in_type_0, - elementExpression.range, (target).internalName - ); - return null; + let arrayType = this.program.determineBuiltinArrayType(target); + if (!arrayType) { + let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET); + if (!indexedGet) { + this.error( + DiagnosticCode.Index_signature_is_missing_in_type_0, + elementExpression.range, (target).internalName + ); + return null; + } + arrayType = indexedGet.signature.returnType; } - let returnType = indexedGet.signature.returnType; - if (!(target = returnType.classReference)) { + if (!(target = arrayType.classReference)) { this.error( DiagnosticCode.Property_0_does_not_exist_on_type_1, - propertyAccess.property.range, propertyName, returnType.toString() + propertyAccess.property.range, propertyName, arrayType.toString() ); return null; } @@ -719,19 +722,22 @@ export class Resolver extends DiagnosticEmitter { break; } case ElementKind.CLASS: { - let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET); - if (!indexedGet) { - if (reportMode == ReportMode.REPORT) { - this.error( - DiagnosticCode.Index_signature_is_missing_in_type_0, - elementAccess.range, (target).internalName - ); + let arrayType = this.program.determineBuiltinArrayType(target); + if (!arrayType) { + let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET); + if (!indexedGet) { + if (reportMode == ReportMode.REPORT) { + this.error( + DiagnosticCode.Index_signature_is_missing_in_type_0, + elementAccess.range, (target).internalName + ); + } + return null; } - return null; + arrayType = indexedGet.signature.returnType; } if (targetExpression.kind == NodeKind.ELEMENTACCESS) { // nested element access - let returnType = indexedGet.signature.returnType; - if (target = returnType.classReference) { + if (target = arrayType.classReference) { this.currentThisExpression = targetExpression; this.currentElementExpression = elementAccess.elementExpression; return target; diff --git a/std/assembly/array.ts b/std/assembly/array.ts index f878692ea6..cbe441e7af 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -15,8 +15,8 @@ function ensureLength(array: ArrayBufferView, length: i32, alignLog2: u32): void if (newData !== changetype(oldData)) { array.data = changetype(newData); // links array.dataStart = newData; - array.dataLength = newByteLength; } + array.dataLength = newByteLength; } } @@ -183,7 +183,7 @@ export class Array extends ArrayBufferView { pop(): T { var length = this.length_; if (length < 1) throw new RangeError("Array is empty"); - var element = load(this.dataStart + (--length << alignof())); + var element = load(this.dataStart + ((--length) << alignof())); this.length_ = length; return element; } @@ -265,7 +265,7 @@ export class Array extends ArrayBufferView { } unshift(element: T): i32 { - var newLength = this.length_; + var newLength = this.length_ + 1; ensureLength(changetype(this), newLength, alignof()); var base = this.dataStart; memory.copy( @@ -327,14 +327,17 @@ export class Array extends ArrayBufferView { } reverse(): Array { - var front = this.dataStart; - var back = this.dataStart + this.dataLength - sizeof(); - while (front < back) { - let temp = load(front); - store(front, load(back)); - store(back, temp); - front += sizeof(); - back -= sizeof(); + var length = this.length_; + if (length) { + let front = this.dataStart; + let back = this.dataStart + ((length - 1) << alignof()); + while (front < back) { + let temp = load(front); + store(front, load(back)); + store(back, temp); + front += sizeof(); + back -= sizeof(); + } } return this; } @@ -507,15 +510,16 @@ export class Array extends ArrayBufferView { var sepLen = separator.length; var estLen = 0; + var value: string | null; for (let i = 0, len = lastIndex + 1; i < len; ++i) { - estLen += load(dataStart + (i << alignof())).length; + value = load(dataStart + (i << alignof())); + if (value !== null) estLen += value.length; } var offset = 0; var result = ALLOCATE((estLen + sepLen * lastIndex) << 1); - var value: String; for (let i = 0; i < lastIndex; ++i) { value = load(dataStart + (i << alignof())); - if (value) { + if (value !== null) { let valueLen = changetype(value).length; memory.copy( result + (offset << 1), @@ -534,12 +538,11 @@ export class Array extends ArrayBufferView { } } value = load(dataStart + (lastIndex << alignof())); - if (value) { - let valueLen = changetype(value).length; + if (value !== null) { memory.copy( result + (offset << 1), changetype(value), - valueLen << 1 + changetype(value).length << 1 ); } return REGISTER(result); diff --git a/std/assembly/dataview.ts b/std/assembly/dataview.ts index 4c44e944e4..3c842854b1 100644 --- a/std/assembly/dataview.ts +++ b/std/assembly/dataview.ts @@ -1,11 +1,13 @@ import { MAX_BYTELENGTH } from "./runtime"; import { ArrayBuffer } from "./arraybuffer"; +// TODO: there is probably a smarter way to check byteOffset for accesses larger than 1 byte + export class DataView { private data: ArrayBuffer; private dataStart: usize; - private dataLength: u32; + private dataLength: i32; constructor( buffer: ArrayBuffer, @@ -34,7 +36,10 @@ export class DataView { } getFloat32(byteOffset: i32, littleEndian: boolean = false): f32 { - if (byteOffset + 4 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 4 > this.dataLength) + ) throw new Error("Offset out of bounds"); return littleEndian ? load(this.dataStart + byteOffset) : reinterpret( @@ -45,7 +50,10 @@ export class DataView { } getFloat64(byteOffset: i32, littleEndian: boolean = false): f64 { - if (byteOffset + 4 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 8 > this.dataLength) + ) throw new Error("Offset out of bounds"); return littleEndian ? load(this.dataStart + byteOffset) : reinterpret( @@ -56,102 +64,144 @@ export class DataView { } getInt8(byteOffset: i32): i8 { - if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); + if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); return load(this.dataStart + byteOffset); } getInt16(byteOffset: i32, littleEndian: boolean = false): i16 { - if (byteOffset + 2 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 2 > this.dataLength) + ) throw new Error("Offset out of bounds"); var result: i16 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } getInt32(byteOffset: i32, littleEndian: boolean = false): i32 { - if (byteOffset + 4 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 4 > this.dataLength) + ) throw new Error("Offset out of bounds"); var result: i32 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } getUint8(byteOffset: i32): u8 { - if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); + if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); return load(this.dataStart + byteOffset); } getUint16(byteOffset: i32, littleEndian: boolean = false): u16 { - if (byteOffset + 2 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 2 > this.dataLength) + ) throw new Error("Offset out of bounds"); var result: u16 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } getUint32(byteOffset: i32, littleEndian: boolean = false): u32 { - if (byteOffset + 2 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 4 > this.dataLength) + ) throw new Error("Offset out of bounds"); var result: u32 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } setFloat32(byteOffset: i32, value: f32, littleEndian: boolean = false): void { - if (byteOffset + 4 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 4 > this.dataLength) + ) throw new Error("Offset out of bounds"); if (littleEndian) store(this.dataStart + byteOffset, value); else store(this.dataStart + byteOffset, bswap(reinterpret(value))); } setFloat64(byteOffset: i32, value: f64, littleEndian: boolean = false): void { - if (byteOffset + 8 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 8 > this.dataLength) + ) throw new Error("Offset out of bounds"); if (littleEndian) store(this.dataStart + byteOffset, value); else store(this.dataStart + byteOffset, bswap(reinterpret(value))); } setInt8(byteOffset: i32, value: i8): void { - if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); + if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); store(this.dataStart + byteOffset, value); } setInt16(byteOffset: i32, value: i16, littleEndian: boolean = false): void { - if (byteOffset + 2 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 2 > this.dataLength) + ) throw new Error("Offset out of bounds"); store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } setInt32(byteOffset: i32, value: i32, littleEndian: boolean = false): void { - if (byteOffset + 4 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 4 > this.dataLength) + ) throw new Error("Offset out of bounds"); store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } setUint8(byteOffset: i32, value: u8): void { - if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); + if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); store(this.dataStart + byteOffset, value); } setUint16(byteOffset: i32, value: u16, littleEndian: boolean = false): void { - if (byteOffset + 2 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 2 > this.dataLength) + ) throw new Error("Offset out of bounds"); store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } setUint32(byteOffset: i32, value: u32, littleEndian: boolean = false): void { - if (byteOffset + 4 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 4 > this.dataLength) + ) throw new Error("Offset out of bounds"); store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } // Non-standard additions that make sense in WebAssembly, but won't work in JS: getInt64(byteOffset: i32, littleEndian: boolean = false): i64 { - if (byteOffset + 8 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 8 > this.dataLength) + ) throw new Error("Offset out of bounds"); var result: i64 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } getUint64(byteOffset: i32, littleEndian: boolean = false): u64 { - if (byteOffset + 8 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 8 > this.dataLength) + ) throw new Error("Offset out of bounds"); var result = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } setInt64(byteOffset: i32, value: i64, littleEndian: boolean = false): void { - if (byteOffset + 8 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 8 > this.dataLength) + ) throw new Error("Offset out of bounds"); store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } setUint64(byteOffset: i32, value: u64, littleEndian: boolean = false): void { - if (byteOffset + 8 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 8 > this.dataLength) + ) throw new Error("Offset out of bounds"); store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index 9eb2beadc2..53f560160e 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -84,6 +84,10 @@ export class Uint8Array extends ArrayBufferView { super(length, alignof()); } + get buffer(): ArrayBuffer { + return this.data; + } + get length(): i32 { return this.byteLength; } diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 11d347cd6f..0ad4a80034 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -106,7 +106,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -120,7 +120,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index b52ec1a980..c9ce533705 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -145,7 +145,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -160,7 +160,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index 4570c4c7ba..98c0a13f5e 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -116,7 +116,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -130,7 +130,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index e05c77d4d5..000ac7d8a7 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -155,7 +155,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -170,7 +170,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index a183a11e2c..e4056d28a8 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -145,7 +145,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index b1429741e5..5ebb60c988 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -197,7 +197,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -212,7 +212,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 54ae787ade..e35e6b1de8 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -85,7 +85,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -99,7 +99,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index 08d8f1f6d5..f7e0305258 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -147,7 +147,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -162,7 +162,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index cf913b0cca..97b00f42cd 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 48 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -145,7 +145,7 @@ if i32.const 0 i32.const 48 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 91ac40c28e..2a270c2600 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -411,7 +411,7 @@ if i32.const 0 i32.const 48 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -426,7 +426,7 @@ if i32.const 0 i32.const 48 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/new-without-allocator.untouched.wat b/tests/compiler/new-without-allocator.untouched.wat index 5456e7f95d..67b603f01c 100644 --- a/tests/compiler/new-without-allocator.untouched.wat +++ b/tests/compiler/new-without-allocator.untouched.wat @@ -61,7 +61,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -76,7 +76,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/nonNullAssertion.optimized.wat b/tests/compiler/nonNullAssertion.optimized.wat index 4e6f8471fd..1d92c3f0d2 100644 --- a/tests/compiler/nonNullAssertion.optimized.wat +++ b/tests/compiler/nonNullAssertion.optimized.wat @@ -1,12 +1,10 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$v (func)) (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -22,7 +20,6 @@ (export "testRet" (func $nonNullAssertion/testFn)) (export "testObjFn" (func $nonNullAssertion/testObjFn)) (export "testObjRet" (func $nonNullAssertion/testObjFn)) - (start $start) (func $nonNullAssertion/testVar (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 ) @@ -31,36 +28,26 @@ i32.load ) (func $nonNullAssertion/testArr (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + i32.const -1 i32.const 0 local.get $0 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load ) (func $nonNullAssertion/testAll (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + i32.const -1 i32.const 0 local.get $0 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.load ) (func $nonNullAssertion/testFn (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -76,13 +63,7 @@ i32.load offset=4 call_indirect (type $FUNCSIG$i) ) - (func $start (; 6 ;) (type $FUNCSIG$v) - i32.const 8 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $null (; 7 ;) (type $FUNCSIG$v) + (func $null (; 6 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/nonNullAssertion.untouched.wat b/tests/compiler/nonNullAssertion.untouched.wat index 338b31491e..38bc6d360d 100644 --- a/tests/compiler/nonNullAssertion.untouched.wat +++ b/tests/compiler/nonNullAssertion.untouched.wat @@ -1,13 +1,10 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$v (func)) (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) @@ -24,128 +21,102 @@ (export "testRet" (func $nonNullAssertion/testRet)) (export "testObjFn" (func $nonNullAssertion/testObjFn)) (export "testObjRet" (func $nonNullAssertion/testObjRet)) - (start $start) - (func $start:~lib/allocator/arena (; 0 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $start:nonNullAssertion (; 1 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena - ) - (func $nonNullAssertion/testVar (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testVar (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 ) - (func $nonNullAssertion/testObj (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testObj (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $nonNullAssertion/testProp (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testProp (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $~lib/array/Array#__get (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $nonNullAssertion/testArr (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load + local.tee $1 + i32.load offset=4 + i32.const 0 i32.const 2 - i32.shr_u + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $nonNullAssertion/testArr (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - call $~lib/array/Array#__get + select + i32.load ) - (func $~lib/array/Array#__get (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $nonNullAssertion/testElem (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load + local.tee $1 + i32.load offset=4 + i32.const 0 i32.const 2 - i32.shr_u + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $nonNullAssertion/testElem (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - call $~lib/array/Array#__get + select + i32.load ) - (func $nonNullAssertion/testAll (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testAll (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) local.get $0 + local.tee $1 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load i32.load ) - (func $nonNullAssertion/testAll2 (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testAll2 (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) local.get $0 + local.tee $1 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load i32.load ) - (func $nonNullAssertion/testFn (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testFn (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testFn2 (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testFn2 (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 local.set $1 @@ -154,29 +125,26 @@ local.get $1 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testRet (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testRet (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testObjFn (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testObjFn (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 i32.load offset=4 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testObjRet (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testObjRet (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 i32.load offset=4 call_indirect (type $FUNCSIG$i) ) - (func $start (; 16 ;) (type $FUNCSIG$v) - call $start:nonNullAssertion - ) - (func $null (; 17 ;) (type $FUNCSIG$v) + (func $null (; 12 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 1df7f3c7a9..2ea6fa0f6b 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -11,7 +11,7 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00\02\00\00\000") (data (i32.const 24) "\02\00\00\00\90\01\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 432) "\03\00\00\00\10\00\00\00 \00\00\00 \00\00\00\b0\01\00\00d") + (data (i32.const 432) "\03\00\00\00\10\00\00\00 \00\00\00 \00\00\00\90\01\00\00d") (data (i32.const 456) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (data (i32.const 496) "\01\00\00\00\02\00\00\001") (data (i32.const 512) "\01\00\00\00\12\00\00\00n\00u\00m\00b\00e\00r\00.\00t\00s") @@ -20,11 +20,11 @@ (data (i32.const 576) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") (data (i32.const 608) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") (data (i32.const 632) "\02\00\00\00\b8\02\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8>#__get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array-access/i32ArrayArrayElementAccess (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load + local.tee $1 + i32.load offset=4 + i32.const 0 i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $~lib/array/Array#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 + i32.shl + local.tee $2 + i32.add + i32.const -1 local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load + local.tee $1 + i32.load offset=4 + i32.const 1 i32.const 2 - i32.shr_u + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load ) - (func $std/array-access/i32ArrayArrayElementAccess (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 0 - call $~lib/array/Array>#__get + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.shr_u ) - (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array-access/stringArrayPropertyAccess (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load + local.tee $1 + i32.load offset=4 + i32.const 0 i32.const 2 - i32.shr_u + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $std/array-access/stringArrayPropertyAccess (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - call $~lib/array/Array#__get + select i32.load + call $~lib/string/String#get:length ) - (func $~lib/internal/string/compareUnsafe (; 6 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (func $~lib/util/string/compareImpl (; 4 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -155,9 +106,9 @@ local.get $4 if (result i32) local.get $6 - i32.load16_u offset=4 + i32.load16_u local.get $7 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $5 i32.eqz @@ -185,7 +136,7 @@ end local.get $5 ) - (func $~lib/string/String#startsWith (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#startsWith (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -198,8 +149,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 224 + i32.const 24 + i32.const 165 i32.const 4 call $~lib/env/abort unreachable @@ -208,13 +159,13 @@ i32.const 0 i32.eq if - i32.const 48 + i32.const 64 local.set $1 end local.get $2 local.set $3 local.get $0 - i32.load + call $~lib/string/String#get:length local.set $4 local.get $3 local.tee $5 @@ -233,7 +184,7 @@ select local.set $7 local.get $1 - i32.load + call $~lib/string/String#get:length local.set $8 local.get $8 local.get $7 @@ -249,68 +200,101 @@ local.get $1 i32.const 0 local.get $8 - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array-access/stringArrayMethodCall (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-access/stringArrayMethodCall (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) local.get $0 + local.tee $1 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get - i32.const 8 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load + i32.const 16 i32.const 0 call $~lib/string/String#startsWith ) - (func $~lib/array/Array>#__get (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array-access/stringArrayArrayPropertyAccess (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 - i32.load - local.set $2 - local.get $1 + local.tee $1 + i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load + local.tee $1 + i32.load offset=4 + i32.const 1 i32.const 2 - i32.shr_u + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $std/array-access/stringArrayArrayPropertyAccess (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - call $~lib/array/Array>#__get - i32.const 1 - call $~lib/array/Array#__get + select i32.load + call $~lib/string/String#get:length ) - (func $std/array-access/stringArrayArrayMethodCall (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-access/stringArrayArrayMethodCall (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) local.get $0 + local.tee $1 + i32.load offset=4 i32.const 0 - call $~lib/array/Array>#__get + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load + local.tee $1 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get - i32.const 8 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load + i32.const 16 i32.const 0 call $~lib/string/String#startsWith ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 9 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 7e5b7339f5..df11fd732d 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -4,18 +4,18 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\03\00\00\00\00\01\02") - (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\13\00\00\00\03") + (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\03\00\00\00\03") (data (i32.const 48) "\03\00\00\00(\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") (data (i32.const 96) "\01\00\00\00\0c\00\00\00\00\00\00\00\01\00\00\00\02") - (data (i32.const 120) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00t\00\00\00\03") + (data (i32.const 120) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00\0c\00\00\00\03") (data (i32.const 144) "\01") - (data (i32.const 152) "\04\00\00\00\10\00\00\00\98\00\00\00\98\00\00\00\98") + (data (i32.const 152) "\04\00\00\00\10\00\00\00\98\00\00\00\98") (data (i32.const 176) "\03\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (data (i32.const 216) "\03\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") (data (i32.const 264) "\03\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") @@ -333,7 +333,7 @@ if i32.const 0 i32.const 184 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -347,7 +347,7 @@ if i32.const 0 i32.const 184 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -395,7 +395,7 @@ if i32.const 0 i32.const 184 - i32.const 223 + i32.const 226 i32.const 57 call $~lib/env/abort unreachable @@ -431,9 +431,7 @@ local.get $1 i32.store offset=4 local.get $0 - local.get $1 local.get $2 - i32.add i32.store offset=8 local.get $0 ) @@ -1622,49 +1620,52 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/Array#resize (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/array/ensureLength (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 i32.load - local.tee $2 + local.tee $3 i32.const 8 i32.sub i32.load offset=4 + local.get $2 + i32.shr_u i32.gt_u if local.get $1 i32.const 1073741816 + local.get $2 + i32.shr_u i32.gt_u if i32.const 0 i32.const 272 - i32.const 37 - i32.const 41 + i32.const 12 + i32.const 59 call $~lib/env/abort unreachable end - local.get $2 - local.tee $3 + local.get $3 + local.get $3 local.get $1 - call $~lib/runtime/doReallocate + local.get $2 + i32.shl local.tee $2 - local.get $3 + call $~lib/runtime/doReallocate + local.tee $1 i32.ne if local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 local.get $1 - local.get $2 - i32.add - i32.store offset=8 + i32.store offset=4 end + local.get $0 + local.get $2 + i32.store offset=8 end ) (func $~lib/array/Array#__set (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -1672,7 +1673,8 @@ local.get $1 i32.const 1 i32.add - call $~lib/array/Array#resize + i32.const 0 + call $~lib/array/ensureLength local.get $1 local.get $0 i32.load offset=4 @@ -1691,62 +1693,13 @@ i32.store offset=12 end ) - (func $~lib/array/Array#resize (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - local.get $0 - i32.load - local.tee $2 - i32.const 8 - i32.sub - i32.load offset=4 - i32.const 2 - i32.shr_u - i32.gt_u - if - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 272 - i32.const 37 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $2 - local.tee $3 - local.get $1 - i32.const 2 - i32.shl - local.tee $2 - call $~lib/runtime/doReallocate - local.tee $1 - local.get $3 - i32.ne - if - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 - local.get $1 - local.get $2 - i32.add - i32.store offset=8 - end - end - ) - (func $~lib/array/Array#__set (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 i32.add - call $~lib/array/Array#resize + i32.const 2 + call $~lib/array/ensureLength local.get $0 i32.load offset=4 local.get $1 @@ -1767,19 +1720,19 @@ i32.store offset=12 end ) - (func $std/array-literal/Ref#constructor (; 15 ;) (type $FUNCSIG$i) (result i32) + (func $std/array-literal/Ref#constructor (; 14 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/doAllocate i32.const 6 call $~lib/runtime/doRegister ) - (func $std/array-literal/RefWithCtor#constructor (; 16 ;) (type $FUNCSIG$i) (result i32) + (func $std/array-literal/RefWithCtor#constructor (; 15 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/doAllocate i32.const 8 call $~lib/runtime/doRegister ) - (func $start:std/array-literal (; 17 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 16 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 44 i32.load @@ -1795,6 +1748,12 @@ end i32.const 36 i32.load + i32.const -1 + i32.const 0 + i32.const 40 + i32.load + i32.lt_u + select i32.load8_s if i32.const 0 @@ -1806,7 +1765,15 @@ end i32.const 36 i32.load - i32.load8_s offset=1 + i32.const 1 + i32.add + i32.const -1 + i32.const 1 + i32.const 40 + i32.load + i32.lt_u + select + i32.load8_s i32.const 1 i32.ne if @@ -1819,7 +1786,15 @@ end i32.const 36 i32.load - i32.load8_s offset=2 + i32.const 2 + i32.add + i32.const -1 + i32.const 2 + i32.const 40 + i32.load + i32.lt_u + select + i32.load8_s i32.const 2 i32.ne if @@ -1844,6 +1819,12 @@ end i32.const 132 i32.load + i32.const -1 + i32.const 0 + i32.const 136 + i32.load + i32.lt_u + select i32.load if i32.const 0 @@ -1855,7 +1836,15 @@ end i32.const 132 i32.load - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + i32.const 136 + i32.load + i32.lt_u + select + i32.load i32.const 1 i32.ne if @@ -1868,7 +1857,15 @@ end i32.const 132 i32.load - i32.load offset=8 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + i32.const 136 + i32.load + i32.lt_u + select + i32.load i32.const 2 i32.ne if @@ -1940,7 +1937,14 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load8_s if i32.const 0 @@ -1951,8 +1955,17 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 + local.tee $0 i32.load offset=4 - i32.load8_s offset=1 + i32.const 1 + i32.add + i32.const -1 + i32.const 1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 1 i32.ne if @@ -1964,8 +1977,17 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 + local.tee $0 i32.load offset=4 - i32.load8_s offset=2 + i32.const 2 + i32.add + i32.const -1 + i32.const 2 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 2 i32.ne if @@ -2025,7 +2047,14 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load if i32.const 0 @@ -2036,8 +2065,17 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1 i32.ne if @@ -2049,8 +2087,17 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 2 i32.ne if @@ -2138,10 +2185,10 @@ unreachable end ) - (func $start (; 18 ;) (type $FUNCSIG$v) + (func $start (; 17 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 19 ;) (type $FUNCSIG$v) + (func $null (; 18 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 4a95220fe2..62d68daaca 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -5,17 +5,16 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\03\00\00\00\00\01\02") - (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\13\00\00\00\03\00\00\00") + (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\03\00\00\00\03\00\00\00") (data (i32.const 48) "\03\00\00\00(\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") (data (i32.const 96) "\01\00\00\00\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 120) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00t\00\00\00\03\00\00\00") + (data (i32.const 120) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00\0c\00\00\00\03\00\00\00") (data (i32.const 144) "\01\00\00\00\00\00\00\00") - (data (i32.const 152) "\04\00\00\00\10\00\00\00\98\00\00\00\98\00\00\00\98\00\00\00\00\00\00\00") + (data (i32.const 152) "\04\00\00\00\10\00\00\00\98\00\00\00\98\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 176) "\03\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 216) "\03\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") (data (i32.const 264) "\03\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") @@ -425,7 +424,7 @@ if i32.const 0 i32.const 184 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -440,7 +439,7 @@ if i32.const 0 i32.const 184 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -504,7 +503,7 @@ if i32.const 0 i32.const 184 - i32.const 223 + i32.const 226 i32.const 57 call $~lib/env/abort unreachable @@ -547,9 +546,7 @@ local.get $3 i32.store offset=4 local.get $0 - local.get $3 local.get $1 - i32.add i32.store offset=8 local.get $0 ) @@ -2116,65 +2113,65 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/Array#resize (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/array/ensureLength (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) local.get $0 i32.load - local.set $2 - local.get $2 + local.set $3 + local.get $3 call $~lib/arraybuffer/ArrayBuffer#get:byteLength - i32.const 0 + local.get $2 i32.shr_u - local.set $3 + local.set $4 local.get $1 - local.get $3 + local.get $4 i32.gt_u if local.get $1 - i32.const 1073741816 + global.get $~lib/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u i32.gt_u if i32.const 0 i32.const 272 - i32.const 37 - i32.const 41 + i32.const 12 + i32.const 59 call $~lib/env/abort unreachable end local.get $1 - i32.const 0 + local.get $2 i32.shl - local.set $4 + local.set $5 block $~lib/runtime/REALLOCATE|inlined.0 (result i32) - local.get $2 - local.set $5 - local.get $4 + local.get $3 local.set $6 local.get $5 + local.set $7 local.get $6 + local.get $7 call $~lib/runtime/doReallocate end - local.set $6 - local.get $6 - local.get $2 + local.set $7 + local.get $7 + local.get $3 i32.ne if local.get $0 - local.get $6 + local.get $7 i32.store local.get $0 - local.get $6 + local.get $7 i32.store offset=4 - local.get $0 - local.get $6 - local.get $4 - i32.add - i32.store offset=8 end + local.get $0 + local.get $5 + i32.store offset=8 end ) (func $~lib/array/Array#__set (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -2182,7 +2179,8 @@ local.get $1 i32.const 1 i32.add - call $~lib/array/Array#resize + i32.const 0 + call $~lib/array/ensureLength local.get $0 i32.load offset=4 local.get $1 @@ -2228,73 +2226,13 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#resize (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load - local.set $2 - local.get $2 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - i32.const 2 - i32.shr_u - local.set $3 - local.get $1 - local.get $3 - i32.gt_u - if - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 272 - i32.const 37 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $4 - block $~lib/runtime/REALLOCATE|inlined.1 (result i32) - local.get $2 - local.set $5 - local.get $4 - local.set $6 - local.get $5 - local.get $6 - call $~lib/runtime/doReallocate - end - local.set $6 - local.get $6 - local.get $2 - i32.ne - if - local.get $0 - local.get $6 - i32.store - local.get $0 - local.get $6 - i32.store offset=4 - local.get $0 - local.get $6 - local.get $4 - i32.add - i32.store offset=8 - end - end - ) - (func $~lib/array/Array#__set (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 i32.add - call $~lib/array/Array#resize + i32.const 2 + call $~lib/array/ensureLength local.get $0 i32.load offset=4 local.get $1 @@ -2315,7 +2253,7 @@ i32.store offset=12 end ) - (func $std/array-literal/Ref#constructor (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/Ref#constructor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -2332,7 +2270,7 @@ end local.get $0 ) - (func $~lib/array/Array#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -2357,73 +2295,13 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#resize (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load - local.set $2 - local.get $2 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - i32.const 2 - i32.shr_u - local.set $3 - local.get $1 - local.get $3 - i32.gt_u - if - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 272 - i32.const 37 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $4 - block $~lib/runtime/REALLOCATE|inlined.2 (result i32) - local.get $2 - local.set $5 - local.get $4 - local.set $6 - local.get $5 - local.get $6 - call $~lib/runtime/doReallocate - end - local.set $6 - local.get $6 - local.get $2 - i32.ne - if - local.get $0 - local.get $6 - i32.store - local.get $0 - local.get $6 - i32.store offset=4 - local.get $0 - local.get $6 - local.get $4 - i32.add - i32.store offset=8 - end - end - ) - (func $~lib/array/Array#__set (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 i32.add - call $~lib/array/Array#resize + i32.const 2 + call $~lib/array/ensureLength local.get $0 i32.load offset=4 local.get $1 @@ -2444,11 +2322,11 @@ i32.store offset=12 end ) - (func $~lib/array/Array#get:length (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/array-literal/RefWithCtor#constructor (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/RefWithCtor#constructor (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -2465,7 +2343,7 @@ end local.get $0 ) - (func $~lib/array/Array#constructor (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -2490,73 +2368,13 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#resize (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load - local.set $2 - local.get $2 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - i32.const 2 - i32.shr_u - local.set $3 - local.get $1 - local.get $3 - i32.gt_u - if - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 272 - i32.const 37 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $4 - block $~lib/runtime/REALLOCATE|inlined.3 (result i32) - local.get $2 - local.set $5 - local.get $4 - local.set $6 - local.get $5 - local.get $6 - call $~lib/runtime/doReallocate - end - local.set $6 - local.get $6 - local.get $2 - i32.ne - if - local.get $0 - local.get $6 - i32.store - local.get $0 - local.get $6 - i32.store offset=4 - local.get $0 - local.get $6 - local.get $4 - i32.add - i32.store offset=8 - end - end - ) - (func $~lib/array/Array#__set (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 i32.add - call $~lib/array/Array#resize + i32.const 2 + call $~lib/array/ensureLength local.get $0 i32.load offset=4 local.get $1 @@ -2577,15 +2395,17 @@ i32.store offset=12 end ) - (func $~lib/array/Array#get:length (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $start:std/array-literal (; 33 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 30 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) global.get $std/array-literal/staticArrayI8 call $~lib/array/Array#get:length i32.const 3 @@ -2600,7 +2420,17 @@ unreachable end global.get $std/array-literal/staticArrayI8 + local.tee $0 i32.load offset=4 + i32.const 0 + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load8_s i32.const 0 i32.eq @@ -2614,8 +2444,18 @@ unreachable end global.get $std/array-literal/staticArrayI8 + local.tee $0 i32.load offset=4 - i32.load8_s offset=1 + i32.const 1 + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 1 i32.eq i32.eqz @@ -2628,8 +2468,18 @@ unreachable end global.get $std/array-literal/staticArrayI8 + local.tee $0 i32.load offset=4 - i32.load8_s offset=2 + i32.const 2 + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 2 i32.eq i32.eqz @@ -2655,7 +2505,19 @@ unreachable end global.get $std/array-literal/staticArrayI32 + local.tee $0 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 0 i32.eq @@ -2669,9 +2531,21 @@ unreachable end global.get $std/array-literal/staticArrayI32 - i32.load offset=4 + local.tee $0 i32.load offset=4 i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load + i32.const 1 i32.eq i32.eqz if @@ -2683,8 +2557,20 @@ unreachable end global.get $std/array-literal/staticArrayI32 + local.tee $0 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 2 i32.eq i32.eqz @@ -2723,12 +2609,12 @@ i32.const 0 i32.const 3 call $~lib/array/Array#constructor - local.set $0 - local.get $0 + local.set $2 + local.get $2 i32.const 0 global.get $std/array-literal/i call $~lib/array/Array#__set - local.get $0 + local.get $2 i32.const 1 block (result i32) global.get $std/array-literal/i @@ -2738,7 +2624,7 @@ global.get $std/array-literal/i end call $~lib/array/Array#__set - local.get $0 + local.get $2 i32.const 2 block (result i32) global.get $std/array-literal/i @@ -2748,7 +2634,7 @@ global.get $std/array-literal/i end call $~lib/array/Array#__set - local.get $0 + local.get $2 end global.set $std/array-literal/dynamicArrayI8 global.get $std/array-literal/dynamicArrayI8 @@ -2765,7 +2651,17 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 + local.tee $2 i32.load offset=4 + i32.const 0 + local.tee $0 + i32.add + i32.const -1 + local.get $0 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load8_s i32.const 0 i32.eq @@ -2779,8 +2675,18 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 + local.tee $2 i32.load offset=4 - i32.load8_s offset=1 + i32.const 1 + local.tee $0 + i32.add + i32.const -1 + local.get $0 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 1 i32.eq i32.eqz @@ -2793,8 +2699,18 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 + local.tee $2 i32.load offset=4 - i32.load8_s offset=2 + i32.const 2 + local.tee $0 + i32.add + i32.const -1 + local.get $0 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 2 i32.eq i32.eqz @@ -2812,12 +2728,12 @@ i32.const 0 i32.const 3 call $~lib/array/Array#constructor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i32.const 0 global.get $std/array-literal/i call $~lib/array/Array#__set - local.get $1 + local.get $3 i32.const 1 block (result i32) global.get $std/array-literal/i @@ -2827,7 +2743,7 @@ global.get $std/array-literal/i end call $~lib/array/Array#__set - local.get $1 + local.get $3 i32.const 2 block (result i32) global.get $std/array-literal/i @@ -2837,7 +2753,7 @@ global.get $std/array-literal/i end call $~lib/array/Array#__set - local.get $1 + local.get $3 end global.set $std/array-literal/dynamicArrayI32 global.get $std/array-literal/dynamicArrayI32 @@ -2854,7 +2770,19 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 + local.tee $3 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 0 i32.eq @@ -2868,8 +2796,20 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 + local.tee $3 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $3 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1 i32.eq i32.eqz @@ -2882,8 +2822,20 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 + local.tee $3 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $3 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 2 i32.eq i32.eqz @@ -2899,23 +2851,23 @@ i32.const 0 i32.const 3 call $~lib/array/Array#constructor - local.set $2 - local.get $2 + local.set $4 + local.get $4 i32.const 0 i32.const 0 call $std/array-literal/Ref#constructor call $~lib/array/Array#__set - local.get $2 + local.get $4 i32.const 1 i32.const 0 call $std/array-literal/Ref#constructor call $~lib/array/Array#__set - local.get $2 + local.get $4 i32.const 2 i32.const 0 call $std/array-literal/Ref#constructor call $~lib/array/Array#__set - local.get $2 + local.get $4 end global.set $std/array-literal/dynamicArrayRef global.get $std/array-literal/dynamicArrayRef @@ -2935,23 +2887,23 @@ i32.const 0 i32.const 3 call $~lib/array/Array#constructor - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 0 i32.const 0 call $std/array-literal/RefWithCtor#constructor call $~lib/array/Array#__set - local.get $3 + local.get $5 i32.const 1 i32.const 0 call $std/array-literal/RefWithCtor#constructor call $~lib/array/Array#__set - local.get $3 + local.get $5 i32.const 2 i32.const 0 call $std/array-literal/RefWithCtor#constructor call $~lib/array/Array#__set - local.get $3 + local.get $5 end global.set $std/array-literal/dynamicArrayRefWithCtor global.get $std/array-literal/dynamicArrayRefWithCtor @@ -2968,9 +2920,9 @@ unreachable end ) - (func $start (; 34 ;) (type $FUNCSIG$v) + (func $start (; 31 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 35 ;) (type $FUNCSIG$v) + (func $null (; 32 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index b75d1b9089..423fa8258e 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -1,12 +1,11 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$d (func (result f64))) @@ -14,339 +13,228 @@ (type $FUNCSIG$iff (func (param f32 f32) (result i32))) (type $FUNCSIG$idd (func (param f64 f64) (result i32))) (type $FUNCSIG$id (func (param f64) (result i32))) - (type $FUNCSIG$viiiii (func (param i32 i32 i32 i32 i32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) (type $FUNCSIG$iijijiji (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $FUNCSIG$iiid (func (param i32 i32 f64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (type $FUNCSIG$iiij (func (param i32 i32 i64) (result i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 40) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 104) "\03\00\00\00a\00b\00c") - (data (i32.const 120) "\0c\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 152) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 216) "\05\00\00\00\00\00\00\00\01\02\03\04\05") - (data (i32.const 232) "\d8\00\00\00\05") - (data (i32.const 240) "\05\00\00\00\00\00\00\00\01\01\01\04\05") - (data (i32.const 256) "\f0\00\00\00\05") - (data (i32.const 264) "\05") - (data (i32.const 280) "\08\01\00\00\05") - (data (i32.const 288) "\05\00\00\00\00\00\00\00\01\01") - (data (i32.const 304) " \01\00\00\05") - (data (i32.const 312) "\05\00\00\00\00\00\00\00\01\01\00\02\02") - (data (i32.const 328) "8\01\00\00\05") - (data (i32.const 336) "\05\00\00\00\00\00\00\00\01\01\00\02\02") - (data (i32.const 352) "P\01\00\00\05") - (data (i32.const 360) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 392) "h\01\00\00\05") - (data (i32.const 400) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") - (data (i32.const 432) "\90\01\00\00\05") - (data (i32.const 440) "\14") - (data (i32.const 472) "\b8\01\00\00\05") - (data (i32.const 480) "\14\00\00\00\00\00\00\00\01\00\00\00\01") - (data (i32.const 512) "\e0\01\00\00\05") - (data (i32.const 520) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 552) "\08\02\00\00\05") - (data (i32.const 560) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 592) "0\02\00\00\05") - (data (i32.const 608) "X\02") - (data (i32.const 624) "h\02") - (data (i32.const 632) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 664) "x\02\00\00\05") - (data (i32.const 672) "\14\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 704) "\a0\02\00\00\05") - (data (i32.const 712) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 744) "\c8\02\00\00\05") - (data (i32.const 752) "\14\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05") - (data (i32.const 784) "\f0\02\00\00\05") - (data (i32.const 792) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 824) "\18\03\00\00\05") - (data (i32.const 832) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") - (data (i32.const 864) "@\03\00\00\05") - (data (i32.const 872) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 904) "h\03\00\00\05") - (data (i32.const 912) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 944) "\90\03\00\00\05") - (data (i32.const 952) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 984) "\b8\03\00\00\05") - (data (i32.const 992) "\14\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1024) "\e0\03\00\00\05") - (data (i32.const 1032) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1064) "\08\04\00\00\05") - (data (i32.const 1072) "\14\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1104) "0\04\00\00\05") - (data (i32.const 1112) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1144) "X\04\00\00\05") - (data (i32.const 1152) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") - (data (i32.const 1184) "\80\04\00\00\05") - (data (i32.const 1192) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1224) "\a8\04\00\00\05") - (data (i32.const 1232) "\14\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1264) "\d0\04\00\00\05") - (data (i32.const 1272) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1304) "\f8\04\00\00\05") - (data (i32.const 1312) "\14\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1344) " \05\00\00\05") - (data (i32.const 1352) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1384) "H\05\00\00\05") - (data (i32.const 1392) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1424) "p\05\00\00\05") - (data (i32.const 1432) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1464) "\98\05\00\00\05") - (data (i32.const 1472) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") - (data (i32.const 1504) "\c0\05\00\00\05") - (data (i32.const 1512) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1544) "\e8\05\00\00\05") - (data (i32.const 1552) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") - (data (i32.const 1584) "\10\06\00\00\05") - (data (i32.const 1592) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1624) "8\06\00\00\05") - (data (i32.const 1632) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1664) "`\06\00\00\05") - (data (i32.const 1680) "\88\06") - (data (i32.const 1688) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1720) "\98\06\00\00\05") - (data (i32.const 1728) "\0c\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1760) "\c0\06\00\00\03") - (data (i32.const 1768) "\08\00\00\00\00\00\00\00\01\00\00\00\02") - (data (i32.const 1784) "\e8\06\00\00\02") - (data (i32.const 1792) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1825) "\07\00\00\05") - (data (i32.const 1832) "\08\00\00\00\00\00\00\00\03\00\00\00\04") - (data (i32.const 1848) "(\07\00\00\02") - (data (i32.const 1856) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\05") - (data (i32.const 1888) "@\07\00\00\03") - (data (i32.const 1896) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1928) "h\07\00\00\05") - (data (i32.const 1936) "\04\00\00\00\00\00\00\00\01") - (data (i32.const 1952) "\90\07\00\00\01") - (data (i32.const 1960) "\10\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1992) "\a8\07\00\00\04") - (data (i32.const 2000) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2032) "\d0\07\00\00\05") - (data (i32.const 2040) "\04\00\00\00\00\00\00\00\05") - (data (i32.const 2056) "\f8\07\00\00\01") - (data (i32.const 2064) "\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04") - (data (i32.const 2096) "\10\08\00\00\04") - (data (i32.const 2104) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2136) "8\08\00\00\05") - (data (i32.const 2144) "\08\00\00\00\00\00\00\00\04\00\00\00\05") - (data (i32.const 2160) "`\08\00\00\02") - (data (i32.const 2168) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 2200) "x\08\00\00\03") - (data (i32.const 2208) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2240) "\a0\08\00\00\05") - (data (i32.const 2248) "\04\00\00\00\00\00\00\00\04") - (data (i32.const 2264) "\c8\08\00\00\01") - (data (i32.const 2272) "\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05") - (data (i32.const 2304) "\e0\08\00\00\04") - (data (i32.const 2312) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2344) "\08\t\00\00\05") - (data (i32.const 2352) "\04\00\00\00\00\00\00\00\01") - (data (i32.const 2368) "0\t\00\00\01") - (data (i32.const 2376) "\10\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2408) "H\t\00\00\04") - (data (i32.const 2416) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2448) "p\t\00\00\05") - (data (i32.const 2464) "\98\t") - (data (i32.const 2472) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2504) "\a8\t\00\00\05") - (data (i32.const 2512) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2544) "\d0\t\00\00\05") - (data (i32.const 2560) "\f8\t") - (data (i32.const 2568) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2600) "\08\n\00\00\05") - (data (i32.const 2608) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2640) "0\n\00\00\05") - (data (i32.const 2656) "X\n") - (data (i32.const 2664) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2696) "h\n\00\00\05") - (data (i32.const 2704) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2736) "\90\n\00\00\05") - (data (i32.const 2752) "\b8\n") - (data (i32.const 2760) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2792) "\c8\n\00\00\05") - (data (i32.const 2800) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2832) "\f0\n\00\00\05") - (data (i32.const 2848) "\18\0b") - (data (i32.const 2856) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2888) "(\0b\00\00\05") - (data (i32.const 2896) "\0c\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") - (data (i32.const 2928) "V\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?") - (data (i32.const 3104) " ") - (data (i32.const 3114) "\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") - (data (i32.const 3168) " \0c\00\00\08") - (data (i32.const 3176) " ") - (data (i32.const 3186) "\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") - (data (i32.const 3240) "h\0c\00\00\08") - (data (i32.const 3248) "@") - (data (i32.const 3262) "\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?") - (data (i32.const 3302) "\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") - (data (i32.const 3376) "\b0\0c\00\00\08") - (data (i32.const 3384) "@") - (data (i32.const 3398) "\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf") - (data (i32.const 3430) "\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") - (data (i32.const 3512) "8\0d\00\00\08") - (data (i32.const 3520) "\14\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02") - (data (i32.const 3552) "\c0\0d\00\00\05") - (data (i32.const 3560) "\14\00\00\00\00\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02") - (data (i32.const 3592) "\e8\0d\00\00\05") - (data (i32.const 3600) "\14\00\00\00\00\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02") - (data (i32.const 3632) "\10\0e\00\00\05") - (data (i32.const 3640) "\14") - (data (i32.const 3652) "\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") - (data (i32.const 3672) "8\0e\00\00\05") - (data (i32.const 3688) "`\0e") - (data (i32.const 3696) "\04\00\00\00\00\00\00\00\01") - (data (i32.const 3712) "p\0e\00\00\01") - (data (i32.const 3720) "\08\00\00\00\00\00\00\00\02\00\00\00\01") - (data (i32.const 3736) "\88\0e\00\00\02") - (data (i32.const 3744) "\10\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01") - (data (i32.const 3776) "\a0\0e\00\00\04") - (data (i32.const 3784) "\10") - (data (i32.const 3796) "\01\00\00\00\02\00\00\00\03") - (data (i32.const 3816) "\c8\0e\00\00\04") - (data (i32.const 3824) "\04\00\00\00\00\00\00\00\01") - (data (i32.const 3840) "\f0\0e\00\00\01") - (data (i32.const 3848) "\08\00\00\00\00\00\00\00\01\00\00\00\02") - (data (i32.const 3864) "\08\0f\00\00\02") - (data (i32.const 3872) "\01\00\00\00a") - (data (i32.const 3880) "\01\00\00\00b") - (data (i32.const 3888) "\02\00\00\00a\00b") - (data (i32.const 3896) "\02\00\00\00b\00a") - (data (i32.const 3912) "\1c\00\00\00\00\00\00\00 \0f\00\00(\0f\00\00 \0f\00\000\0f\00\008\0f\00\00@\0f") - (data (i32.const 3976) "H\0f\00\00\07") - (data (i32.const 3984) "\1c\00\00\00\00\00\00\00@\0f\00\00 \0f\00\00 \0f\00\000\0f\00\00(\0f\00\008\0f") - (data (i32.const 4048) "\90\0f\00\00\07") - (data (i32.const 4056) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 4088) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 4144) "\04\00\00\00n\00u\00l\00l") - (data (i32.const 4160) "\02\00\00\00\00\00\00\00\01") - (data (i32.const 4176) "@\10\00\00\02") - (data (i32.const 4184) "\04\00\00\00t\00r\00u\00e") - (data (i32.const 4200) "\05\00\00\00f\00a\00l\00s\00e") - (data (i32.const 4216) "\01\00\00\00,") - (data (i32.const 4224) "\02\00\00\00\00\00\00\00\01") - (data (i32.const 4240) "\80\10\00\00\02") - (data (i32.const 4248) "\n\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e") - (data (i32.const 4272) "\0c\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 4304) "\b0\10\00\00\03") - (data (i32.const 4312) "\01\00\00\000") - (data (i32.const 4320) "\90\01\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 4832) "\e0\10\00\00d") - (data (i32.const 4840) "\0c\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 4872) "\e8\12\00\00\03") - (data (i32.const 4880) "\05\00\00\001\00-\002\00-\003") - (data (i32.const 4896) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 4928) " \13\00\00\03") - (data (i32.const 4936) "\01\00\00\00-") - (data (i32.const 4944) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 4976) "P\13\00\00\03") - (data (i32.const 4984) "\08") - (data (i32.const 4995) "\80\00\00\00\80") - (data (i32.const 5000) "x\13\00\00\02") - (data (i32.const 5008) "\02\00\00\00_\00_") - (data (i32.const 5016) "\08") - (data (i32.const 5027) "\80\00\00\00\80") - (data (i32.const 5032) "\98\13\00\00\02") - (data (i32.const 5040) "\18\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 5096) "0") - (data (i32.const 5118) "\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") - (data (i32.const 5160) "\e8\13\00\00\06") - (data (i32.const 5168) "\02\00\00\00,\00 ") - (data (i32.const 5176) "\03\00\00\000\00.\000") - (data (i32.const 5192) "\03\00\00\00N\00a\00N") - (data (i32.const 5208) "\t\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 5232) "\08\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 5256) "\b8\02\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\00*\00&\00$\00%\00^\00@\00#\00!\00?") + (data (i32.const 2504) "\02\00\00\00 \00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") + (data (i32.const 2544) "\t\00\00\00\10\00\00\00\d0\t\00\00\d0\t\00\00 \00\00\00\08") + (data (i32.const 2568) "\02\00\00\00 \00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") + (data (i32.const 2608) "\02\00\00\00@") + (data (i32.const 2622) "\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?") + (data (i32.const 2662) "\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") + (data (i32.const 2680) "\n\00\00\00\10\00\00\008\n\00\008\n\00\00@\00\00\00\08") + (data (i32.const 2704) "\02\00\00\00@") + (data (i32.const 2718) "\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf") + (data (i32.const 2750) "\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") + (data (i32.const 2776) "\02\00\00\00\14\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02") + (data (i32.const 2808) "\04\00\00\00\10\00\00\00\e0\n\00\00\e0\n\00\00\14\00\00\00\05") + (data (i32.const 2832) "\02\00\00\00\14\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02") + (data (i32.const 2864) "\02\00\00\00\14\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02") + (data (i32.const 2896) "\08\00\00\00\10\00\00\008\0b\00\008\0b\00\00\14\00\00\00\05") + (data (i32.const 2920) "\02\00\00\00\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") + (data (i32.const 2952) "\02") + (data (i32.const 2960) "\04\00\00\00\10\00\00\00\90\0b\00\00\90\0b") + (data (i32.const 2984) "\02\00\00\00\04\00\00\00\01") + (data (i32.const 3000) "\04\00\00\00\10\00\00\00\b0\0b\00\00\b0\0b\00\00\04\00\00\00\01") + (data (i32.const 3024) "\02\00\00\00\08\00\00\00\02\00\00\00\01") + (data (i32.const 3040) "\04\00\00\00\10\00\00\00\d8\0b\00\00\d8\0b\00\00\08\00\00\00\02") + (data (i32.const 3064) "\02\00\00\00\10\00\00\00\03\00\00\00\02\00\00\00\01") + (data (i32.const 3088) "\04\00\00\00\10\00\00\00\00\0c\00\00\00\0c\00\00\10\00\00\00\04") + (data (i32.const 3112) "\02\00\00\00\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03") + (data (i32.const 3136) "\04\00\00\00\10\00\00\000\0c\00\000\0c\00\00\10\00\00\00\04") + (data (i32.const 3160) "\02\00\00\00\04\00\00\00\01") + (data (i32.const 3176) "\02\00\00\00\08\00\00\00\01\00\00\00\02") + (data (i32.const 3192) "\01\00\00\00\02\00\00\00a") + (data (i32.const 3208) "\01\00\00\00\02\00\00\00b") + (data (i32.const 3224) "\01\00\00\00\04\00\00\00a\00b") + (data (i32.const 3240) "\01\00\00\00\04\00\00\00b\00a") + (data (i32.const 3256) "\01") + (data (i32.const 3264) "\02\00\00\00\1c\00\00\00\80\0c\00\00\90\0c\00\00\80\0c\00\00\a0\0c\00\00\b0\0c\00\00\c0\0c") + (data (i32.const 3304) "\0e\00\00\00\10\00\00\00\c8\0c\00\00\c8\0c\00\00\1c\00\00\00\07") + (data (i32.const 3328) "\02\00\00\00\1c\00\00\00\c0\0c\00\00\80\0c\00\00\80\0c\00\00\a0\0c\00\00\90\0c\00\00\b0\0c") + (data (i32.const 3368) "\0e\00\00\00\10\00\00\00\08\0d\00\00\08\0d\00\00\1c\00\00\00\07") + (data (i32.const 3392) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 3432) "\01\00\00\00\08\00\00\00n\00u\00l\00l") + (data (i32.const 3448) "\02\00\00\00\02\00\00\00\01") + (data (i32.const 3464) "\01\00\00\00\08\00\00\00t\00r\00u\00e") + (data (i32.const 3480) "\01\00\00\00\n\00\00\00f\00a\00l\00s\00e") + (data (i32.const 3504) "\01\00\00\00\02\00\00\00,") + (data (i32.const 3520) "\02\00\00\00\02\00\00\00\01") + (data (i32.const 3536) "\01\00\00\00\14\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e") + (data (i32.const 3568) "\02\00\00\00\0c\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 3592) "\01\00\00\00\02\00\00\000") + (data (i32.const 3608) "\02\00\00\00\90\01\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") + (data (i32.const 4016) "\08\00\00\00\10\00\00\00 \0e\00\00 \0e\00\00\90\01\00\00d") + (data (i32.const 4040) "\02\00\00\00\0c\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 4064) "\01\00\00\00\n\00\00\001\00-\002\00-\003") + (data (i32.const 4088) "\02\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03") + (data (i32.const 4112) "\01\00\00\00\02\00\00\00-") + (data (i32.const 4128) "\02\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03") + (data (i32.const 4152) "\02\00\00\00\08\00\00\00\00\00\00\80\00\00\00\80") + (data (i32.const 4168) "\01\00\00\00\04\00\00\00_\00_") + (data (i32.const 4184) "\02\00\00\00\08\00\00\00\00\00\00\80\00\00\00\80") + (data (i32.const 4200) "\01\00\00\000\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008") + (data (i32.const 4256) "\02\00\00\000") + (data (i32.const 4278) "\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") + (data (i32.const 4312) "\01\00\00\00\04\00\00\00,\00 ") + (data (i32.const 4328) "\01\00\00\00\06\00\00\000\00.\000") + (data (i32.const 4344) "\01\00\00\00\06\00\00\00N\00a\00N") + (data (i32.const 4360) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 4392) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 4416) "\02\00\00\00\b8\02\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/internal/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/internal/sort/COMPARATOR~anonymous|0) + (elem (i32.const 0) $null $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|2 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|16 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/Null (mut i32) (i32.const 0)) - (global $std/array/arr8 (mut i32) (i32.const 232)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $std/array/arr32 (mut i32) (i32.const 392)) + (global $std/array/arr8 (mut i32) (i32.const 168)) + (global $std/array/arr32 (mut i32) (i32.const 304)) (global $std/array/i (mut i32) (i32.const 0)) (global $std/array/other (mut i32) (i32.const 0)) (global $std/array/out (mut i32) (i32.const 0)) - (global $std/array/source (mut i32) (i32.const 624)) + (global $std/array/source (mut i32) (i32.const 544)) (global $std/array/cwArr (mut i32) (i32.const 0)) (global $std/array/includes (mut i32) (i32.const 0)) - (global $std/array/sarr (mut i32) (i32.const 1624)) + (global $std/array/sarr (mut i32) (i32.const 1368)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/every (mut i32) (i32.const 0)) (global $std/array/some (mut i32) (i32.const 0)) (global $std/array/newArr (mut i32) (i32.const 0)) @@ -357,15 +245,15 @@ (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) (global $~lib/math/random_state0_32 (mut i32) (i32.const 0)) (global $~lib/math/random_state1_32 (mut i32) (i32.const 0)) - (global $std/array/f32ArrayTyped (mut i32) (i32.const 3168)) - (global $std/array/f64ArrayTyped (mut i32) (i32.const 3376)) - (global $std/array/i32ArrayTyped (mut i32) (i32.const 3552)) - (global $std/array/u32ArrayTyped (mut i32) (i32.const 3632)) - (global $std/array/reversed0 (mut i32) (i32.const 3688)) - (global $std/array/reversed1 (mut i32) (i32.const 3712)) - (global $std/array/reversed2 (mut i32) (i32.const 3736)) - (global $std/array/reversed4 (mut i32) (i32.const 3776)) - (global $std/array/expected4 (mut i32) (i32.const 3816)) + (global $std/array/f32ArrayTyped (mut i32) (i32.const 2552)) + (global $std/array/f64ArrayTyped (mut i32) (i32.const 2688)) + (global $std/array/i32ArrayTyped (mut i32) (i32.const 2816)) + (global $std/array/u32ArrayTyped (mut i32) (i32.const 2904)) + (global $std/array/reversed0 (mut i32) (i32.const 2968)) + (global $std/array/reversed1 (mut i32) (i32.const 3008)) + (global $std/array/reversed2 (mut i32) (i32.const 3048)) + (global $std/array/reversed4 (mut i32) (i32.const 3096)) + (global $std/array/expected4 (mut i32) (i32.const 3144)) (global $std/array/reversed64 (mut i32) (i32.const 0)) (global $std/array/reversed128 (mut i32) (i32.const 0)) (global $std/array/reversed1024 (mut i32) (i32.const 0)) @@ -375,23 +263,23 @@ (global $std/array/randomized257 (mut i32) (i32.const 0)) (global $std/array/reversedNested512 (mut i32) (i32.const 0)) (global $std/array/reversedElements512 (mut i32) (i32.const 0)) - (global $std/array/randomStringsActual (mut i32) (i32.const 3976)) - (global $std/array/randomStringsExpected (mut i32) (i32.const 4048)) + (global $std/array/randomStringsActual (mut i32) (i32.const 3312)) + (global $std/array/randomStringsExpected (mut i32) (i32.const 3376)) (global $std/array/randomStrings400 (mut i32) (i32.const 0)) - (global $~lib/internal/number/_frc_plus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_frc_minus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_exp (mut i32) (i32.const 0)) - (global $~lib/internal/number/_K (mut i32) (i32.const 0)) - (global $~lib/internal/number/_frc_pow (mut i64) (i64.const 0)) - (global $~lib/internal/number/_exp_pow (mut i32) (i32.const 0)) + (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) + (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp (mut i32) (i32.const 0)) + (global $~lib/util/number/_K (mut i32) (i32.const 0)) + (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) (global $std/array/refArr (mut i32) (i32.const 0)) - (global $std/array/subarr32 (mut i32) (i32.const 7736)) - (global $std/array/subarr8 (mut i32) (i32.const 7832)) - (global $std/array/subarrU32 (mut i32) (i32.const 7904)) + (global $std/array/subarr32 (mut i32) (i32.const 0)) + (global $std/array/subarr8 (mut i32) (i32.const 0)) + (global $std/array/subarrU32 (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -414,15 +302,15 @@ i32.add i32.const -8 i32.and - local.tee $2 + local.tee $0 current_memory - local.tee $3 + local.tee $2 i32.const 16 i32.shl i32.gt_u if - local.get $3 local.get $2 + local.get $0 local.get $1 i32.sub i32.const 65535 @@ -431,16 +319,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 + local.tee $3 + local.get $2 local.get $3 - local.get $0 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $0 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -449,23 +337,12 @@ end end end - local.get $2 + local.get $0 global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 40 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end i32.const 1 i32.const 32 local.get $0 @@ -474,305 +351,329 @@ i32.clz i32.sub i32.shl - call $~lib/allocator/arena/__memory_allocate + call $~lib/memory/memory.allocate local.tee $1 - local.get $0 + i32.const -1520547049 i32.store local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add ) - (func $~lib/internal/memory/memset (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) - local.get $2 - i32.eqz - if - return + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 1 + i32.add + local.get $1 + i32.store8 + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + local.tee $3 + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $3 + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $3 + i32.sub + local.set $2 + local.get $0 + local.get $3 + i32.add + local.tee $0 + local.get $1 + i32.const 255 + i32.and + i32.const 16843009 + i32.mul + local.tee $1 + i32.store + local.get $2 + i32.const -4 + i32.and + local.tee $2 + local.get $0 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $2 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + local.tee $3 + i32.const 12 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 8 + i32.sub + local.get $1 + i32.store + local.get $2 + i32.const 24 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + local.tee $3 + i32.const 28 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 24 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 20 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 16 + i32.sub + local.get $1 + i32.store + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $3 + local.get $0 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $1 + i64.extend_i32_u + local.tee $4 + local.get $4 + i64.const 32 + i64.shl + i64.or + local.set $4 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + local.get $0 + local.get $4 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $4 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $4 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $continue|0 + end + end end + ) + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 + i32.const 6444 i32.le_u if - return + i32.const 0 + i32.const 16 + i32.const 191 + i32.const 2 + call $~lib/env/abort + unreachable end local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - local.tee $3 - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 i32.const 8 - i32.le_u - if - return - end - local.get $2 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.sub - local.set $2 - local.get $0 - local.get $3 - i32.add - local.tee $0 - local.get $1 - i32.const 255 - i32.and - i32.const 16843009 - i32.mul - local.tee $1 - i32.store - local.get $2 - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.add - i32.const 4 i32.sub - local.get $1 - i32.store - local.get $2 - i32.const 8 - i32.le_u + i32.load + i32.const -1520547049 + i32.ne if - return + i32.const 0 + i32.const 16 + i32.const 192 + i32.const 2 + call $~lib/env/abort + unreachable end + ) + (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.store + call $~lib/runtime/assertUnregistered local.get $0 - local.get $2 - i32.add - local.tee $3 - i32.const 12 - i32.sub - local.get $1 - i32.store - local.get $3 i32.const 8 i32.sub local.get $1 i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.add - local.tee $3 - i32.const 28 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 24 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 20 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 16 - i32.sub - local.get $1 - i32.store local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - local.get $0 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $1 - i64.extend_i32_u - local.tee $4 - local.get $4 - i64.const 32 - i64.shl - i64.or - local.set $4 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - local.get $0 - local.get $4 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $continue|0 - end - end ) - (func $~lib/array/Array#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) - (local $3 i32) local.get $0 - i32.const 268435454 + i32.const 1073741816 i32.gt_u if i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 + i32.const 56 + i32.const 24 + i32.const 43 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - i32.shl - local.tee $3 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $2 - i32.const 8 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/doAllocate local.tee $1 i32.const 0 - i32.store + local.get $0 + call $~lib/memory/memory.fill local.get $1 - i32.const 0 - i32.store offset=4 + i32.const 2 + call $~lib/runtime/doRegister + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 + i32.const 1073741816 local.get $2 - i32.store + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 16 + i32.const 226 + i32.const 57 + call $~lib/env/abort + unreachable + end local.get $1 - local.get $0 - i32.store offset=4 local.get $2 - i32.const 8 - i32.add - i32.const 0 - local.get $3 - call $~lib/internal/memory/memset - local.get $1 - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - i32.const 1 - call $~lib/internal/arraybuffer/allocateUnsafe + i32.shl local.tee $1 - i32.const 8 - i32.add - i32.const 0 - i32.const 1 - call $~lib/internal/memory/memset + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $2 local.get $0 i32.eqz if i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/doAllocate + i32.const 3 + call $~lib/runtime/doRegister local.set $0 end local.get $0 @@ -785,24 +686,41 @@ i32.const 0 i32.store offset=8 local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - i32.const 0 + local.get $2 i32.store offset=4 local.get $0 - i32.const 1 + local.get $1 i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#fill (; 7 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $5 + (func $~lib/array/Array#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 4 + call $~lib/runtime/doRegister + local.get $0 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + local.get $0 + i32.store offset=12 + local.get $1 + ) + (func $~lib/array/Array#fill (; 10 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 i32.load offset=4 + local.set $5 + local.get $0 + i32.load offset=12 local.set $0 local.get $2 i32.const 0 @@ -853,385 +771,105 @@ local.get $2 local.get $5 i32.add - i32.const 8 - i32.add local.get $1 local.get $3 local.get $2 i32.sub - call $~lib/internal/memory/memset - end - ) - (func $std/array/isArraysEqual (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load offset=4 - local.tee $4 - local.get $1 - i32.load offset=4 - i32.ne - if - i32.const 0 - return - end - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - loop $repeat|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.load - i32.lt_u - if (result i32) - local.get $2 - local.get $3 - i32.add - i32.load8_u offset=8 - else - unreachable - end - i32.const 255 - i32.and - local.get $2 - local.get $1 - i32.load - local.tee $3 - i32.load - i32.lt_u - if (result i32) - local.get $2 - local.get $3 - i32.add - i32.load8_u offset=8 - else - unreachable - end - i32.const 255 - i32.and - i32.ne - if - i32.const 0 - return - else - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $repeat|0 - end - unreachable - end + call $~lib/memory/memory.fill end - i32.const 1 ) - (func $~lib/array/Array#fill|trampoline (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - i32.const 2147483647 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/array/Array#fill - ) - (func $~lib/array/Array#fill (; 10 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load - local.set $5 - local.get $0 - i32.load offset=4 - local.set $0 - local.get $2 - i32.const 0 - i32.lt_s - if (result i32) - local.get $0 - local.get $2 - i32.add - local.tee $4 - i32.const 0 - local.get $4 - i32.const 0 - i32.gt_s - select - else + loop $continue|0 + local.get $1 + i32.const 3 + i32.and local.get $2 - local.get $0 local.get $2 - local.get $0 - i32.lt_s - select - end - local.set $2 - local.get $3 - i32.const 0 - i32.lt_s - if (result i32) - local.get $0 - local.get $3 - i32.add - local.tee $4 - i32.const 0 - local.get $4 - i32.const 0 - i32.gt_s - select - else - local.get $3 - local.get $0 - local.get $3 - local.get $0 - i32.lt_s select - end - local.set $3 - loop $repeat|0 - local.get $2 - local.get $3 - i32.lt_s if - local.get $2 - i32.const 2 - i32.shl - local.get $5 + local.get $0 + local.tee $4 + i32.const 1 i32.add + local.set $0 local.get $1 - i32.store offset=8 - local.get $2 + local.tee $3 i32.const 1 i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub local.set $2 - br $repeat|0 + br $continue|0 end end - ) - (func $std/array/isArraysEqual (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $2 + local.get $0 + i32.const 3 + i32.and i32.eqz if - local.get $0 - i32.load offset=4 - local.tee $2 - local.get $1 - i32.load offset=4 - i32.ne - if - i32.const 0 - return - end - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return + loop $continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|1 + end end - end - loop $repeat|0 - local.get $3 local.get $2 - i32.lt_s + i32.const 8 + i32.and if - local.get $3 local.get $0 - i32.load - local.tee $4 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $3 - i32.const 2 - i32.shl - local.get $4 - i32.add - i32.load offset=8 - else - unreachable - end - local.get $3 - local.get $1 - i32.load - local.tee $4 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $3 - i32.const 2 - i32.shl - local.get $4 - i32.add - i32.load offset=8 - else - unreachable - end - i32.ne - if - i32.const 0 - return - else - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $repeat|0 - end - unreachable - end - end - i32.const 1 - ) - (func $~lib/array/Array#fill|trampoline (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - i32.const 2147483647 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/array/Array#fill - ) - (func $~lib/internal/memory/memcpy (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $continue|0 - local.get $1 - i32.const 3 - i32.and - local.get $2 - local.get $2 - select - if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 + local.get $1 i32.load i32.store local.get $0 @@ -2037,172 +1675,185 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if + block $~lib/util/memory/memmove|inlined.0 local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $1 local.get $2 i32.add - local.get $1 + local.get $0 i32.le_u - local.set $3 - end - local.get $3 - if + local.tee $3 + i32.eqz + if + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + local.set $3 + end + local.get $3 + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end local.get $0 local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq + i32.lt_u if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and if - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + br $continue|0 end + end + loop $continue|1 local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - br $continue|0 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end end end - loop $continue|1 + loop $continue|2 local.get $2 - i32.const 8 - i32.ge_u if local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 + local.tee $4 + i32.const 1 i32.add local.set $0 local.get $1 - i32.const 8 + local.tee $3 + i32.const 1 i32.add local.set $1 - br $continue|1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|2 end end - end - loop $continue|2 - local.get $2 + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if + loop $continue|3 + local.get $0 local.get $2 - i32.eqz + i32.add + i32.const 7 + i32.and if - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 end + end + loop $continue|4 local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|3 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end end end - loop $continue|4 + loop $continue|5 local.get $2 - i32.const 8 - i32.ge_u if local.get $2 - i32.const 8 + i32.const 1 i32.sub local.tee $2 local.get $0 @@ -2210,52 +1861,269 @@ local.get $1 local.get $2 i32.add - i64.load - i64.store - br $continue|4 + i32.load8_u + i32.store8 + br $continue|5 end end end - loop $continue|5 + end + ) + (func $~lib/runtime/doWrapArray (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + i32.const 16 + call $~lib/runtime/doAllocate + local.get $1 + call $~lib/runtime/doRegister + local.tee $3 + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 + local.tee $4 + call $~lib/runtime/doAllocate + local.get $1 + call $~lib/runtime/doRegister + local.tee $1 + i32.store + local.get $3 + local.get $1 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store offset=8 + local.get $3 + local.get $4 + local.get $2 + i32.shr_u + i32.store offset=12 + local.get $1 + local.get $0 + local.get $4 + call $~lib/memory/memory.copy + local.get $3 + ) + (func $std/array/isArraysEqual (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.tee $3 + local.get $1 + i32.load offset=12 + i32.ne + if + i32.const 0 + return + end + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + loop $repeat|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + i32.load offset=4 + local.get $2 + i32.add + i32.const -1 local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_u + local.get $1 + i32.load offset=4 + local.get $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load8_u + i32.ne if + i32.const 0 + return + else local.get $2 i32.const 1 - i32.sub - local.tee $2 - local.get $0 i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 + local.set $2 + br $repeat|0 end + unreachable end end + i32.const 1 ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/array/Array#fill (; 15 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 - i32.load - local.tee $2 - i32.gt_s + i32.load offset=4 + local.set $5 + local.get $0 + i32.load offset=12 + local.set $0 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $0 + local.get $2 + i32.add + local.tee $4 + i32.const 0 + local.get $4 + i32.const 0 + i32.gt_s + select + else + local.get $2 + local.get $0 + local.get $2 + local.get $0 + i32.lt_s + select + end + local.set $2 + local.get $3 + i32.const 0 + i32.lt_s + if (result i32) + local.get $0 + local.get $3 + i32.add + local.tee $4 + i32.const 0 + local.get $4 + i32.const 0 + i32.gt_s + select + else + local.get $3 + local.get $0 + local.get $3 + local.get $0 + i32.lt_s + select + end + local.set $3 + loop $repeat|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $2 + i32.const 2 + i32.shl + local.get $5 + i32.add + local.get $1 + i32.store + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + end + end + ) + (func $std/array/isArraysEqual (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $2 + i32.eqz if + local.get $0 + i32.load offset=12 + local.tee $2 local.get $1 - i32.const 1073741816 - i32.gt_s + i32.load offset=12 + i32.ne if i32.const 0 - i32.const 40 - i32.const 40 - i32.const 4 - call $~lib/env/abort - unreachable + return end + local.get $0 local.get $1 + i32.eq + if + i32.const 1 + return + end + end + loop $repeat|0 + local.get $3 + local.get $2 + i32.lt_s + if + local.get $3 + i32.const 2 + i32.shl + local.tee $4 + local.get $0 + i32.load offset=4 + i32.add + i32.const -1 + local.get $4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load + local.get $1 + i32.load offset=4 + local.get $4 + i32.add + i32.const -1 + local.get $4 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load + i32.ne + if + i32.const 0 + return + else + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $repeat|0 + end + unreachable + end + end + i32.const 1 + ) + (func $~lib/runtime/doReallocate (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.const 8 + i32.sub + local.tee $3 + i32.load offset=4 + local.tee $2 + local.get $1 + i32.lt_u + if i32.const 1 i32.const 32 local.get $2 @@ -2264,128 +2132,168 @@ i32.clz i32.sub i32.shl - i32.const 8 + i32.const 0 + local.get $0 + i32.const 6444 + i32.gt_u + select + i32.const 1 + i32.const 32 + local.get $1 + i32.const 7 + i32.add + i32.clz i32.sub - i32.le_s + i32.shl + local.tee $4 + i32.lt_u if - local.get $0 - local.get $1 + local.get $4 + call $~lib/memory/memory.allocate + local.tee $4 + local.get $3 + i32.load i32.store - else - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $3 + local.get $4 i32.const 8 i32.add + local.tee $5 local.get $0 - i32.const 8 + local.get $2 + call $~lib/memory/memory.copy + local.get $2 + local.get $5 i32.add + i32.const 0 + local.get $1 local.get $2 - call $~lib/internal/memory/memmove + i32.sub + call $~lib/memory/memory.fill local.get $3 - local.set $0 - end - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.add - i32.const 0 - local.get $1 - local.get $2 - i32.sub - call $~lib/internal/memory/memset - else - local.get $1 - local.get $2 - i32.lt_s - if - local.get $1 - i32.const 0 - i32.lt_s + i32.load + i32.const -1520547049 + i32.eq if - i32.const 0 - i32.const 40 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable + local.get $0 + i32.const 6444 + i32.le_u + if + i32.const 0 + i32.const 16 + i32.const 100 + i32.const 8 + call $~lib/env/abort + unreachable + end end + local.get $4 + local.set $3 + local.get $5 + local.set $0 + else local.get $0 + local.get $2 + i32.add + i32.const 0 local.get $1 - i32.store + local.get $2 + i32.sub + call $~lib/memory/memory.fill end end + local.get $3 + local.get $1 + i32.store offset=4 local.get $0 ) - (func $~lib/array/Array#push (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureLength (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - local.get $0 - i32.load offset=4 - local.tee $2 - i32.const 1 - i32.add - local.set $4 - local.get $2 + local.get $1 local.get $0 i32.load - local.tee $3 - i32.load + local.tee $2 + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_u - i32.ge_u + i32.gt_u if - local.get $2 + local.get $1 i32.const 268435454 - i32.ge_u + i32.gt_u if i32.const 0 - i32.const 8 - i32.const 182 - i32.const 42 + i32.const 488 + i32.const 12 + i32.const 59 call $~lib/env/abort unreachable end - local.get $0 - local.get $3 - local.get $4 + local.get $2 + local.get $2 + local.get $1 i32.const 2 i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe local.tee $3 - i32.store + call $~lib/runtime/doReallocate + local.tee $1 + i32.ne + if + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $3 + i32.store offset=8 end + ) + (func $~lib/array/Array#push (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $0 + i32.load offset=12 + i32.const 1 + i32.add + local.tee $2 + call $~lib/array/ensureLength local.get $0 - local.get $4 - i32.store offset=4 local.get $2 + i32.store offset=12 + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 1 + i32.sub i32.const 2 i32.shl - local.get $3 i32.add local.get $1 - i32.store offset=8 + i32.store ) - (func $~lib/array/Array#pop (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $1 i32.const 1 i32.lt_s if i32.const 0 - i32.const 8 - i32.const 244 + i32.const 488 + i32.const 185 i32.const 20 call $~lib/env/abort unreachable end local.get $0 - i32.load + i32.load offset=4 local.get $1 i32.const 1 i32.sub @@ -2393,78 +2301,63 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.set $2 local.get $0 local.get $1 - i32.store offset=4 + i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#concat (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $2 local.get $1 - i32.load offset=4 + i32.load offset=12 i32.const 0 local.get $1 select - local.tee $4 + local.tee $3 i32.add call $~lib/array/Array#constructor - local.set $3 + local.tee $4 + i32.load offset=4 + local.tee $5 + local.get $0 + i32.load offset=4 local.get $2 - if - local.get $3 - i32.load - i32.const 8 - i32.add - local.get $0 - i32.load - i32.const 8 - i32.add - local.get $2 - i32.const 2 - i32.shl - call $~lib/internal/memory/memmove - end - local.get $4 - if - local.get $3 - i32.load - i32.const 8 - i32.add - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $1 - i32.load - i32.const 8 - i32.add - local.get $4 - i32.const 2 - i32.shl - call $~lib/internal/memory/memmove - end + i32.const 2 + i32.shl + local.tee $0 + call $~lib/memory/memory.copy + local.get $0 + local.get $5 + i32.add + local.get $1 + i32.load offset=4 local.get $3 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $4 ) - (func $~lib/array/Array#copyWithin (; 19 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) local.get $0 - i32.load - local.set $7 + i32.load offset=4 + local.set $6 local.get $3 + local.tee $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $5 - local.get $3 + local.get $4 local.get $5 i32.lt_s select @@ -2484,14 +2377,13 @@ select else local.get $1 - local.tee $4 local.get $5 - local.get $4 + local.get $1 local.get $5 i32.lt_s select end - local.set $6 + local.set $1 local.get $2 i32.const 0 i32.lt_s @@ -2539,20 +2431,20 @@ i32.sub local.tee $4 local.get $5 - local.get $6 + local.get $1 i32.sub - local.tee $1 + local.tee $5 local.get $4 - local.get $1 + local.get $5 i32.lt_s select local.set $3 local.get $2 - local.get $6 + local.get $1 i32.lt_s local.tee $4 if - local.get $6 + local.get $1 local.get $2 local.get $3 i32.add @@ -2564,30 +2456,29 @@ local.get $3 i32.const 1 i32.sub - local.tee $1 + local.tee $4 local.get $2 i32.add local.set $2 local.get $1 - local.get $6 + local.get $4 i32.add - local.set $6 + local.set $1 loop $continue|0 local.get $3 if - local.get $7 - local.get $6 - local.tee $1 + local.get $1 i32.const 2 i32.shl + local.get $6 i32.add - local.get $7 local.get $2 i32.const 2 i32.shl + local.get $6 i32.add - i32.load offset=8 - i32.store offset=8 + i32.load + i32.store local.get $2 i32.const 1 i32.sub @@ -2595,7 +2486,7 @@ local.get $1 i32.const 1 i32.sub - local.set $6 + local.set $1 local.get $3 i32.const 1 i32.sub @@ -2604,220 +2495,149 @@ end end else - local.get $7 - i32.const 8 - i32.add - local.tee $1 - local.get $6 + local.get $1 i32.const 2 i32.shl + local.get $6 i32.add local.get $2 i32.const 2 i32.shl - local.get $1 + local.get $6 i32.add local.get $3 i32.const 2 i32.shl - call $~lib/internal/memory/memmove - end - local.get $0 - ) - (func $~lib/array/Array#copyWithin|trampoline (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 2 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 2147483647 - local.set $3 + call $~lib/memory/memory.copy end local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/array/Array#copyWithin ) - (func $~lib/array/Array#unshift (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#unshift (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 - i32.load offset=4 - local.tee $3 + local.get $0 + i32.load offset=12 i32.const 1 i32.add - local.set $4 - local.get $3 - local.get $0 - i32.load local.tee $2 - i32.load - i32.const 2 - i32.shr_u - local.tee $5 - i32.ge_u - if - local.get $3 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 327 - i32.const 42 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $4 - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.tee $2 - i32.load - i32.const 2 - i32.shr_u - local.set $5 - local.get $0 - local.get $2 - i32.store - end - local.get $2 - i32.const 8 - i32.add + call $~lib/array/ensureLength + local.get $0 + i32.load offset=4 local.tee $3 i32.const 4 i32.add local.get $3 - local.get $5 + local.get $2 i32.const 1 i32.sub i32.const 2 i32.shl - call $~lib/internal/memory/memmove - local.get $2 + call $~lib/memory/memory.copy + local.get $3 local.get $1 - i32.store offset=8 + i32.store local.get $0 - local.get $4 - i32.store offset=4 + local.get $2 + i32.store offset=12 ) - (func $~lib/array/Array#shift (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 - i32.load offset=4 - local.tee $3 + i32.load offset=12 + local.tee $1 i32.const 1 i32.lt_s if i32.const 0 - i32.const 8 - i32.const 299 + i32.const 488 + i32.const 243 i32.const 20 call $~lib/env/abort unreachable end local.get $0 - i32.load + i32.load offset=4 local.tee $2 - i32.load offset=8 - local.set $4 + i32.load + local.set $3 + local.get $2 local.get $2 - i32.const 8 - i32.add - local.tee $5 i32.const 4 i32.add - local.set $1 - local.get $5 local.get $1 - local.get $3 i32.const 1 i32.sub local.tee $1 i32.const 2 i32.shl - call $~lib/internal/memory/memmove + local.tee $4 + call $~lib/memory/memory.copy local.get $2 - local.get $1 - i32.const 2 - i32.shl + local.get $4 i32.add i32.const 0 - i32.store offset=8 + i32.store local.get $0 local.get $1 - i32.store offset=4 - local.get $4 + i32.store offset=12 + local.get $3 ) - (func $~lib/array/Array#reverse (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load - local.set $3 + (func $~lib/array/Array#reverse (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) local.get $0 - i32.load offset=4 - i32.const 1 - i32.sub - local.set $0 - loop $repeat|0 - local.get $1 + i32.load offset=12 + local.tee $1 + if local.get $0 - i32.lt_s - if - local.get $1 - i32.const 2 - i32.shl - local.get $3 - i32.add - local.tee $2 - i32.load offset=8 - local.set $4 - local.get $2 - local.get $0 - i32.const 2 - i32.shl - local.get $3 - i32.add - local.tee $2 - i32.load offset=8 - i32.store offset=8 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + i32.add + local.set $1 + loop $continue|0 local.get $2 - local.get $4 - i32.store offset=8 local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $repeat|0 + i32.lt_u + if + local.get $2 + i32.load + local.set $0 + local.get $2 + local.get $1 + i32.load + i32.store + local.get $1 + local.get $0 + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + local.get $1 + i32.const 4 + i32.sub + local.set $1 + br $continue|0 + end end end ) - (func $~lib/array/Array#indexOf (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 26 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $4 i32.eqz local.tee $3 @@ -2849,19 +2669,19 @@ local.set $2 end local.get $0 - i32.load + i32.load offset=4 local.set $0 loop $continue|0 local.get $2 local.get $4 i32.lt_s if - local.get $0 local.get $2 i32.const 2 i32.shl + local.get $0 i32.add - i32.load offset=8 + i32.load local.get $1 i32.eq if @@ -2877,17 +2697,26 @@ end i32.const -1 ) - (func $~lib/array/Array#splice (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s + ) + (func $~lib/array/Array#splice (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.load - local.set $5 + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) local.get $2 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $4 local.get $1 i32.const 0 @@ -2912,9 +2741,9 @@ end local.tee $1 i32.sub - local.tee $3 + local.tee $5 local.get $2 - local.get $3 + local.get $5 i32.lt_s select local.tee $3 @@ -2925,22 +2754,52 @@ select local.tee $2 call $~lib/array/Array#constructor - local.tee $6 - i32.load - i32.const 8 - i32.add - local.get $5 - i32.const 8 - i32.add + local.tee $7 + i32.load offset=4 + local.set $8 + local.get $0 + i32.load offset=4 + local.tee $9 local.get $1 i32.const 2 i32.shl i32.add - local.tee $3 + local.set $6 + i32.const 0 + local.set $3 + loop $repeat|0 + block $break|0 + local.get $3 + local.get $2 + i32.ge_s + br_if $break|0 + local.get $3 + i32.const 2 + i32.shl + local.tee $10 + local.get $6 + i32.add + i32.load + local.set $5 + local.get $8 + local.get $10 + i32.add + local.get $5 + i32.store + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $repeat|0 + end + end + local.get $7 + i32.load offset=4 + local.get $6 local.get $2 i32.const 2 i32.shl - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $1 local.get $2 i32.add @@ -2948,114 +2807,46 @@ local.get $4 i32.ne if - local.get $3 - local.get $5 - i32.const 8 - i32.add + local.get $6 local.get $1 i32.const 2 i32.shl + local.get $9 i32.add local.get $4 local.get $1 i32.sub i32.const 2 i32.shl - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy end local.get $0 local.get $4 local.get $2 i32.sub - i32.store offset=4 - local.get $6 - ) - (func $~lib/array/Array#splice|trampoline (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 2147483647 - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#splice - ) - (func $~lib/array/Array#__set (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $0 - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u - i32.ge_u - if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.tee $3 - i32.store - local.get $0 - local.get $4 - i32.store offset=4 - end - local.get $3 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=8 + i32.store offset=12 + local.get $7 ) - (func $start:std/array~anonymous|0 (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $~lib/array/Array#findIndex (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 - i32.load offset=4 - local.set $4 + i32.load offset=12 + local.set $3 loop $repeat|0 block $break|0 + local.get $2 local.get $3 - local.get $4 local.get $0 - i32.load offset=4 - local.tee $2 + i32.load offset=12 + local.tee $4 + local.get $3 local.get $4 - local.get $2 i32.lt_s select i32.ge_s @@ -3063,13 +2854,12 @@ i32.const 3 global.set $~lib/argc local.get $0 - i32.load - local.get $3 - local.tee $2 + i32.load offset=4 + local.get $2 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 @@ -3081,7 +2871,7 @@ local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 end unreachable @@ -3089,17 +2879,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3107,7 +2897,7 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3115,27 +2905,27 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 - i32.load offset=4 - local.set $4 + i32.load offset=12 + local.set $3 loop $repeat|0 block $break|0 + local.get $2 local.get $3 - local.get $4 local.get $0 - i32.load offset=4 - local.tee $2 + i32.load offset=12 + local.tee $4 + local.get $3 local.get $4 - local.get $2 i32.lt_s select i32.ge_s @@ -3143,13 +2933,12 @@ i32.const 3 global.set $~lib/argc local.get $0 - i32.load - local.get $3 - local.tee $2 + i32.load offset=4 + local.get $2 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 @@ -3158,7 +2947,7 @@ local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 else i32.const 0 @@ -3169,12 +2958,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3182,12 +2971,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3195,27 +2984,27 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 - i32.load offset=4 - local.set $4 + i32.load offset=12 + local.set $3 loop $repeat|0 block $break|0 + local.get $2 local.get $3 - local.get $4 local.get $0 - i32.load offset=4 - local.tee $2 + i32.load offset=12 + local.tee $4 + local.get $3 local.get $4 - local.get $2 i32.lt_s select i32.ge_s @@ -3223,13 +3012,12 @@ i32.const 3 global.set $~lib/argc local.get $0 - i32.load - local.get $3 - local.tee $2 + i32.load offset=4 + local.get $2 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 @@ -3241,7 +3029,7 @@ local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 end unreachable @@ -3249,12 +3037,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3262,12 +3050,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3275,28 +3063,28 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 46 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 47 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 47 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 48 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) block $break|0 local.get $0 - i32.load offset=4 - local.set $4 + i32.load offset=12 + local.set $3 loop $repeat|0 + local.get $2 local.get $3 - local.get $4 local.get $0 - i32.load offset=4 - local.tee $2 + i32.load offset=12 + local.tee $4 + local.get $3 local.get $4 - local.get $2 i32.lt_s select i32.ge_s @@ -3304,13 +3092,12 @@ i32.const 3 global.set $~lib/argc local.get $0 - i32.load - local.get $3 - local.tee $2 + i32.load offset=4 + local.get $2 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 @@ -3318,14 +3105,14 @@ local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 unreachable end unreachable end ) - (func $start:std/array~anonymous|17 (; 48 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3334,7 +3121,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -3343,7 +3130,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.eqz @@ -3440,64 +3227,78 @@ end end ) - (func $start:std/array~anonymous|21 (; 51 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 52 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#map (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#map (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 + local.set $1 + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 9 + call $~lib/runtime/doRegister + local.get $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor local.tee $3 - call $~lib/array/Array#constructor - local.tee $4 - i32.load + i32.const 0 + i32.store offset=12 + local.get $3 + local.get $1 + i32.store offset=12 + local.get $3 + i32.load offset=4 local.set $5 loop $repeat|0 + local.get $2 local.get $1 - local.get $3 local.get $0 - i32.load offset=4 - local.tee $2 - local.get $3 - local.get $2 + i32.load offset=12 + local.tee $4 + local.get $1 + local.get $4 i32.lt_s select i32.lt_s if - i32.const 3 - global.set $~lib/argc - local.get $1 - local.tee $2 + local.get $2 i32.const 2 i32.shl - local.tee $1 - local.get $5 - i32.add + local.tee $6 local.get $0 + i32.load offset=4 + i32.add i32.load - local.get $1 + local.set $4 + i32.const 3 + global.set $~lib/argc + local.get $5 + local.get $6 i32.add - i32.load offset=8 + local.get $4 local.get $2 local.get $0 i32.const 22 call_indirect (type $FUNCSIG$fiii) - f32.store offset=8 + f32.store local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $repeat|0 end end - local.get $4 + local.get $3 ) - (func $start:std/array~anonymous|22 (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3507,22 +3308,23 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#map (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $4 call $~lib/array/Array#constructor - i32.load + i32.load offset=4 local.set $5 loop $repeat|0 local.get $2 local.get $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $3 local.get $4 local.get $3 @@ -3530,26 +3332,27 @@ select i32.lt_s if - i32.const 3 - global.set $~lib/argc local.get $2 - local.tee $3 i32.const 2 i32.shl - local.tee $2 - local.get $5 - i32.add + local.tee $6 local.get $0 + i32.load offset=4 + i32.add i32.load - local.get $2 + local.set $3 + i32.const 3 + global.set $~lib/argc + local.get $5 + local.get $6 i32.add - i32.load offset=8 local.get $3 + local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) - i32.store offset=8 - local.get $3 + i32.store + local.get $2 i32.const 1 i32.add local.set $2 @@ -3557,14 +3360,14 @@ end end ) - (func $start:std/array~anonymous|23 (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3574,12 +3377,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3588,14 +3391,14 @@ call $~lib/array/Array#constructor local.set $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $5 loop $repeat|0 block $break|0 local.get $2 local.get $5 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $3 local.get $5 local.get $3 @@ -3604,27 +3407,26 @@ i32.ge_s br_if $break|0 local.get $0 - i32.load + i32.load offset=4 local.get $2 - local.tee $3 i32.const 2 i32.shl i32.add - i32.load offset=8 - local.set $2 + i32.load + local.set $3 i32.const 3 global.set $~lib/argc - local.get $2 local.get $3 + local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) if local.get $4 - local.get $2 + local.get $3 call $~lib/array/Array#push end - local.get $3 + local.get $2 i32.const 1 i32.add local.set $2 @@ -3633,7 +3435,7 @@ end local.get $4 ) - (func $start:std/array~anonymous|26 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3645,7 +3447,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -3654,7 +3456,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3666,28 +3468,24 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 62 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 63 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $2 - local.set $3 - i32.const 0 - local.set $2 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $4 loop $repeat|0 block $break|0 - local.get $2 + local.get $3 local.get $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $5 local.get $4 local.get $5 @@ -3697,29 +3495,29 @@ br_if $break|0 i32.const 4 global.set $~lib/argc - local.get $3 - local.get $0 - i32.load local.get $2 + local.get $0 + i32.load offset=4 + local.get $3 i32.const 2 i32.shl i32.add - i32.load offset=8 - local.get $2 + i32.load + local.get $3 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiiii) - local.set $3 - local.get $2 + local.set $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $repeat|0 end end - local.get $3 + local.get $2 ) - (func $start:std/array~anonymous|31 (; 64 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 65 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.eqz if @@ -3730,7 +3528,7 @@ end local.get $0 ) - (func $start:std/array~anonymous|32 (; 65 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 66 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.eqz if @@ -3741,7 +3539,7 @@ end local.get $0 ) - (func $start:std/array~anonymous|33 (; 66 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 67 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -3749,7 +3547,7 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 67 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -3757,10 +3555,10 @@ local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $3 @@ -3774,12 +3572,12 @@ global.set $~lib/argc local.get $2 local.get $0 - i32.load + i32.load offset=4 local.get $3 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.get $3 local.get $0 local.get $1 @@ -3794,7 +3592,7 @@ end local.get $2 ) - (func $~lib/math/splitMix32 (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 70 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -3826,14 +3624,14 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 70 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 71 ;) (type $FUNCSIG$vj) (param $0 i64) (local $1 i64) local.get $0 i64.eqz if i32.const 0 - i32.const 2896 - i32.const 978 + i32.const 2296 + i32.const 1021 i32.const 4 call $~lib/env/abort unreachable @@ -3891,41 +3689,41 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/internal/sort/insertionSort (; 71 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 72 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f32) (local $6 f32) (local $7 i32) - loop $repeat|0 - local.get $4 - local.get $1 - i32.ge_s - i32.eqz - if - local.get $4 + block $break|0 + loop $repeat|0 + local.get $3 + local.get $1 + i32.ge_s + br_if $break|0 + local.get $3 i32.const 2 i32.shl local.get $0 i32.add - f32.load offset=8 + f32.load local.set $5 - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $continue|1 - local.get $3 + local.get $4 i32.const 0 i32.ge_s if block $break|1 - local.get $3 + local.get $4 i32.const 2 i32.shl local.get $0 i32.add - f32.load offset=8 + f32.load local.set $6 i32.const 2 global.set $~lib/argc @@ -3936,11 +3734,11 @@ i32.const 0 i32.ge_s br_if $break|1 - local.get $3 + local.get $4 local.tee $7 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $7 i32.const 1 i32.add @@ -3949,12 +3747,12 @@ local.get $0 i32.add local.get $6 - f32.store offset=8 + f32.store br $continue|1 end end end - local.get $3 + local.get $4 i32.const 1 i32.add i32.const 2 @@ -3962,21 +3760,23 @@ local.get $0 i32.add local.get $5 - f32.store offset=8 - local.get $4 + f32.store + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 + unreachable end + unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 72 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 73 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 f32) + (local $5 i32) (local $6 f32) - (local $7 i32) + (local $7 f32) (local $8 i32) local.get $1 i32.const 31 @@ -3985,36 +3785,36 @@ i32.shr_s i32.const 2 i32.shl - local.tee $3 - call $~lib/allocator/arena/__memory_allocate - local.tee $7 + local.tee $5 + call $~lib/memory/memory.allocate + local.tee $8 i32.const 0 - local.get $3 - call $~lib/internal/memory/memset + local.get $5 + call $~lib/memory/memory.fill local.get $1 i32.const 1 i32.sub - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 + local.get $3 i32.const 0 i32.gt_s if - local.get $4 - local.set $3 + local.get $3 + local.set $5 loop $continue|1 - local.get $3 + local.get $5 i32.const 1 i32.and - local.get $3 + local.get $5 i32.const 6 i32.shr_s i32.const 2 i32.shl - local.get $7 + local.get $8 i32.add i32.load - local.get $3 + local.get $5 i32.const 1 i32.shr_s i32.const 31 @@ -4024,229 +3824,225 @@ i32.and i32.eq if - local.get $3 + local.get $5 i32.const 1 i32.shr_s - local.set $3 + local.set $5 br $continue|1 end end - local.get $3 + local.get $5 i32.const 1 i32.shr_s - local.tee $3 + local.tee $4 i32.const 2 i32.shl local.get $0 i32.add - f32.load offset=8 - local.set $6 - local.get $4 + f32.load + local.set $7 + local.get $3 i32.const 2 i32.shl local.get $0 i32.add - f32.load offset=8 - local.set $5 + f32.load + local.set $6 i32.const 2 global.set $~lib/argc + local.get $7 local.get $6 - local.get $5 local.get $2 call_indirect (type $FUNCSIG$iff) i32.const 0 i32.lt_s if - local.get $4 + local.get $3 i32.const 5 i32.shr_s i32.const 2 i32.shl - local.get $7 - i32.add - local.tee $8 local.get $8 + i32.add + local.tee $5 + local.get $5 i32.load i32.const 1 - local.get $4 + local.get $3 i32.const 31 i32.and i32.shl i32.xor i32.store - local.get $4 + local.get $3 i32.const 2 i32.shl local.get $0 i32.add - local.get $6 - f32.store offset=8 - local.get $3 + local.get $7 + f32.store + local.get $4 i32.const 2 i32.shl local.get $0 i32.add - local.get $5 - f32.store offset=8 + local.get $6 + f32.store end - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $repeat|0 end end local.get $1 i32.const 1 i32.sub - local.set $4 + local.set $3 loop $repeat|2 - local.get $4 + local.get $3 i32.const 2 i32.ge_s if local.get $0 - f32.load offset=8 - local.set $5 + f32.load + local.set $6 local.get $0 - local.get $4 + local.get $3 i32.const 2 i32.shl local.get $0 i32.add local.tee $1 - f32.load offset=8 - f32.store offset=8 + f32.load + f32.store local.get $1 - local.get $5 - f32.store offset=8 + local.get $6 + f32.store i32.const 1 - local.set $1 + local.set $4 loop $continue|3 - local.get $1 + local.get $4 i32.const 5 i32.shr_s i32.const 2 i32.shl - local.get $7 + local.get $8 i32.add i32.load - local.get $1 + local.get $4 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and - local.get $1 + local.get $4 i32.const 1 i32.shl i32.add - local.tee $3 - local.get $4 + local.tee $5 + local.get $3 i32.lt_s if - local.get $3 - local.set $1 + local.get $5 + local.set $4 br $continue|3 end end loop $continue|4 - local.get $1 + local.get $4 i32.const 0 i32.gt_s if local.get $0 - f32.load offset=8 - local.set $5 - local.get $1 + f32.load + local.set $6 + local.get $4 i32.const 2 i32.shl local.get $0 i32.add - f32.load offset=8 - local.set $6 + f32.load + local.set $7 i32.const 2 global.set $~lib/argc - local.get $5 local.get $6 + local.get $7 local.get $2 call_indirect (type $FUNCSIG$iff) i32.const 0 i32.lt_s if - local.get $1 + local.get $4 i32.const 5 i32.shr_s i32.const 2 i32.shl - local.get $7 + local.get $8 i32.add - local.tee $3 - local.get $3 + local.tee $1 + local.get $1 i32.load i32.const 1 - local.get $1 + local.get $4 i32.const 31 i32.and i32.shl i32.xor i32.store - local.get $1 + local.get $4 i32.const 2 i32.shl local.get $0 i32.add - local.get $5 - f32.store offset=8 - local.get $0 local.get $6 - f32.store offset=8 + f32.store + local.get $0 + local.get $7 + f32.store end - local.get $1 + local.get $4 i32.const 1 i32.shr_s - local.set $1 + local.set $4 br $continue|4 end end - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $repeat|2 end end local.get $0 - i32.const 4 - i32.add - local.tee $1 - f32.load offset=8 - local.set $5 - local.get $1 + f32.load offset=4 + local.set $6 local.get $0 - f32.load offset=8 - f32.store offset=8 local.get $0 - local.get $5 - f32.store offset=8 + f32.load + f32.store offset=4 + local.get $0 + local.get $6 + f32.store ) - (func $~lib/array/Array#sort (; 73 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 74 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f32) (local $4 f32) - (local $5 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $2 i32.const 1 i32.le_s @@ -4254,19 +4050,17 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $0 local.get $2 i32.const 2 i32.eq if local.get $0 - i32.const 4 - i32.add - f32.load offset=8 + f32.load offset=4 local.set $3 local.get $0 - f32.load offset=8 + f32.load local.set $4 i32.const 2 global.set $~lib/argc @@ -4278,35 +4072,30 @@ i32.lt_s if local.get $0 - i32.const 4 - i32.add local.get $4 - f32.store offset=8 + f32.store offset=4 local.get $0 local.get $3 - f32.store offset=8 + f32.store end return end - local.get $0 - local.set $5 local.get $2 - local.tee $0 i32.const 256 i32.lt_s if - local.get $5 local.get $0 + local.get $2 local.get $1 - call $~lib/internal/sort/insertionSort + call $~lib/util/sort/insertionSort else - local.get $5 local.get $0 + local.get $2 local.get $1 - call $~lib/internal/sort/weakHeapSort + call $~lib/util/sort/weakHeapSort end ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 74 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 75 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4335,166 +4124,141 @@ i32.lt_s i32.sub ) - (func $std/array/isArraysEqual (; 75 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $std/array/isArraysEqual (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f32) (local $5 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $5 - i32.const 3244 - i32.load + local.get $1 + i32.load offset=12 i32.ne if i32.const 0 return end local.get $0 - i32.const 3240 + local.get $1 i32.eq if i32.const 1 return end loop $repeat|0 - local.get $1 + local.get $3 local.get $5 i32.lt_s if - local.get $1 + local.get $3 + i32.const 2 + i32.shl local.tee $2 local.get $0 - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 i32.lt_u - if (result f32) - local.get $2 - i32.const 2 - i32.shl - local.get $3 - i32.add - f32.load offset=8 - else - unreachable - end + select + f32.load local.tee $4 local.get $4 f32.ne local.get $1 - i32.const 3240 - i32.load - local.tee $2 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + local.get $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 i32.lt_u - if (result f32) - local.get $1 - i32.const 2 - i32.shl - local.get $2 - i32.add - f32.load offset=8 - else - unreachable - end + select + f32.load local.tee $4 local.get $4 f32.ne i32.ne if - local.get $1 + local.get $3 + i32.const 2 + i32.shl local.tee $2 local.get $0 - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 i32.lt_u - if (result f32) - local.get $2 - i32.const 2 - i32.shl - local.get $3 - i32.add - f32.load offset=8 - else - unreachable - end + select + f32.load local.get $1 - i32.const 3240 - i32.load - local.tee $2 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + local.get $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 i32.lt_u - if (result f32) - local.get $1 - i32.const 2 - i32.shl - local.get $2 - i32.add - f32.load offset=8 - else - unreachable - end + select + f32.load f32.ne if i32.const 0 return end end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $repeat|0 end end i32.const 1 ) - (func $~lib/internal/sort/insertionSort (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) (local $6 f64) (local $7 i32) - loop $repeat|0 - local.get $4 - local.get $1 - i32.ge_s - i32.eqz - if - local.get $4 + block $break|0 + loop $repeat|0 + local.get $3 + local.get $1 + i32.ge_s + br_if $break|0 + local.get $3 i32.const 3 i32.shl local.get $0 i32.add - f64.load offset=8 + f64.load local.set $5 - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $continue|1 - local.get $3 + local.get $4 i32.const 0 i32.ge_s if block $break|1 - local.get $3 + local.get $4 i32.const 3 i32.shl local.get $0 i32.add - f64.load offset=8 + f64.load local.set $6 i32.const 2 global.set $~lib/argc @@ -4505,11 +4269,11 @@ i32.const 0 i32.ge_s br_if $break|1 - local.get $3 + local.get $4 local.tee $7 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $7 i32.const 1 i32.add @@ -4518,12 +4282,12 @@ local.get $0 i32.add local.get $6 - f64.store offset=8 + f64.store br $continue|1 end end end - local.get $3 + local.get $4 i32.const 1 i32.add i32.const 3 @@ -4531,21 +4295,23 @@ local.get $0 i32.add local.get $5 - f64.store offset=8 - local.get $4 + f64.store + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 + unreachable end + unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 f64) + (local $5 i32) (local $6 f64) - (local $7 i32) + (local $7 f64) (local $8 i32) local.get $1 i32.const 31 @@ -4554,36 +4320,36 @@ i32.shr_s i32.const 2 i32.shl - local.tee $3 - call $~lib/allocator/arena/__memory_allocate - local.tee $7 + local.tee $5 + call $~lib/memory/memory.allocate + local.tee $8 i32.const 0 - local.get $3 - call $~lib/internal/memory/memset + local.get $5 + call $~lib/memory/memory.fill local.get $1 i32.const 1 i32.sub - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 + local.get $3 i32.const 0 i32.gt_s if - local.get $4 - local.set $3 + local.get $3 + local.set $5 loop $continue|1 - local.get $3 + local.get $5 i32.const 1 i32.and - local.get $3 + local.get $5 i32.const 6 i32.shr_s i32.const 2 i32.shl - local.get $7 + local.get $8 i32.add i32.load - local.get $3 + local.get $5 i32.const 1 i32.shr_s i32.const 31 @@ -4593,229 +4359,225 @@ i32.and i32.eq if - local.get $3 + local.get $5 i32.const 1 i32.shr_s - local.set $3 + local.set $5 br $continue|1 end end - local.get $3 + local.get $5 i32.const 1 i32.shr_s - local.tee $3 + local.tee $4 i32.const 3 i32.shl local.get $0 i32.add - f64.load offset=8 - local.set $6 - local.get $4 + f64.load + local.set $7 + local.get $3 i32.const 3 i32.shl local.get $0 i32.add - f64.load offset=8 - local.set $5 + f64.load + local.set $6 i32.const 2 global.set $~lib/argc + local.get $7 local.get $6 - local.get $5 local.get $2 call_indirect (type $FUNCSIG$idd) i32.const 0 i32.lt_s if - local.get $4 + local.get $3 i32.const 5 i32.shr_s i32.const 2 i32.shl - local.get $7 - i32.add - local.tee $8 local.get $8 + i32.add + local.tee $5 + local.get $5 i32.load i32.const 1 - local.get $4 + local.get $3 i32.const 31 i32.and i32.shl i32.xor i32.store - local.get $4 + local.get $3 i32.const 3 i32.shl local.get $0 i32.add - local.get $6 - f64.store offset=8 - local.get $3 + local.get $7 + f64.store + local.get $4 i32.const 3 i32.shl local.get $0 i32.add - local.get $5 - f64.store offset=8 + local.get $6 + f64.store end - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $repeat|0 end end local.get $1 i32.const 1 i32.sub - local.set $4 + local.set $3 loop $repeat|2 - local.get $4 + local.get $3 i32.const 2 i32.ge_s if local.get $0 - f64.load offset=8 - local.set $5 + f64.load + local.set $6 local.get $0 - local.get $4 + local.get $3 i32.const 3 i32.shl local.get $0 i32.add local.tee $1 - f64.load offset=8 - f64.store offset=8 + f64.load + f64.store local.get $1 - local.get $5 - f64.store offset=8 + local.get $6 + f64.store i32.const 1 - local.set $1 + local.set $4 loop $continue|3 - local.get $1 + local.get $4 i32.const 5 i32.shr_s i32.const 2 i32.shl - local.get $7 + local.get $8 i32.add i32.load - local.get $1 + local.get $4 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and - local.get $1 + local.get $4 i32.const 1 i32.shl i32.add - local.tee $3 - local.get $4 + local.tee $5 + local.get $3 i32.lt_s if - local.get $3 - local.set $1 + local.get $5 + local.set $4 br $continue|3 end end loop $continue|4 - local.get $1 + local.get $4 i32.const 0 i32.gt_s if local.get $0 - f64.load offset=8 - local.set $5 - local.get $1 + f64.load + local.set $6 + local.get $4 i32.const 3 i32.shl local.get $0 i32.add - f64.load offset=8 - local.set $6 + f64.load + local.set $7 i32.const 2 global.set $~lib/argc - local.get $5 local.get $6 + local.get $7 local.get $2 call_indirect (type $FUNCSIG$idd) i32.const 0 i32.lt_s if - local.get $1 + local.get $4 i32.const 5 i32.shr_s i32.const 2 i32.shl - local.get $7 + local.get $8 i32.add - local.tee $3 - local.get $3 + local.tee $1 + local.get $1 i32.load i32.const 1 - local.get $1 + local.get $4 i32.const 31 i32.and i32.shl i32.xor i32.store - local.get $1 + local.get $4 i32.const 3 i32.shl local.get $0 i32.add - local.get $5 - f64.store offset=8 - local.get $0 local.get $6 - f64.store offset=8 + f64.store + local.get $0 + local.get $7 + f64.store end - local.get $1 + local.get $4 i32.const 1 i32.shr_s - local.set $1 + local.set $4 br $continue|4 end end - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $repeat|2 end end local.get $0 - i32.const 8 - i32.add - local.tee $1 f64.load offset=8 - local.set $5 - local.get $1 + local.set $6 local.get $0 - f64.load offset=8 - f64.store offset=8 local.get $0 - local.get $5 + f64.load f64.store offset=8 + local.get $0 + local.get $6 + f64.store ) - (func $~lib/array/Array#sort (; 78 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 79 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 f64) - (local $5 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $2 i32.const 1 i32.le_s @@ -4823,19 +4585,17 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $0 local.get $2 i32.const 2 i32.eq if local.get $0 - i32.const 8 - i32.add f64.load offset=8 local.set $3 local.get $0 - f64.load offset=8 + f64.load local.set $4 i32.const 2 global.set $~lib/argc @@ -4847,35 +4607,30 @@ i32.lt_s if local.get $0 - i32.const 8 - i32.add local.get $4 f64.store offset=8 local.get $0 local.get $3 - f64.store offset=8 + f64.store end return end - local.get $0 - local.set $5 local.get $2 - local.tee $0 i32.const 256 i32.lt_s if - local.get $5 local.get $0 + local.get $2 local.get $1 - call $~lib/internal/sort/insertionSort + call $~lib/util/sort/insertionSort else - local.get $5 local.get $0 + local.get $2 local.get $1 - call $~lib/internal/sort/weakHeapSort + call $~lib/util/sort/weakHeapSort end ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 79 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 80 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -4904,166 +4659,141 @@ i64.lt_s i32.sub ) - (func $std/array/isArraysEqual (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $std/array/isArraysEqual (; 81 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $5 - i32.const 3516 - i32.load + local.get $1 + i32.load offset=12 i32.ne if i32.const 0 return end local.get $0 - i32.const 3512 + local.get $1 i32.eq if i32.const 1 return end loop $repeat|0 - local.get $1 + local.get $3 local.get $5 i32.lt_s if - local.get $1 + local.get $3 + i32.const 3 + i32.shl local.tee $2 local.get $0 - i32.load - local.tee $3 - i32.load - i32.const 3 - i32.shr_u + i32.load offset=4 + i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 i32.lt_u - if (result f64) - local.get $2 - i32.const 3 - i32.shl - local.get $3 - i32.add - f64.load offset=8 - else - unreachable - end + select + f64.load local.tee $4 local.get $4 f64.ne local.get $1 - i32.const 3512 - i32.load - local.tee $2 - i32.load - i32.const 3 - i32.shr_u + i32.load offset=4 + local.get $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 i32.lt_u - if (result f64) - local.get $1 - i32.const 3 - i32.shl - local.get $2 - i32.add - f64.load offset=8 - else - unreachable - end + select + f64.load local.tee $4 local.get $4 f64.ne i32.ne if - local.get $1 + local.get $3 + i32.const 3 + i32.shl local.tee $2 local.get $0 - i32.load - local.tee $3 - i32.load - i32.const 3 - i32.shr_u + i32.load offset=4 + i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 i32.lt_u - if (result f64) - local.get $2 - i32.const 3 - i32.shl - local.get $3 - i32.add - f64.load offset=8 - else - unreachable - end + select + f64.load local.get $1 - i32.const 3512 - i32.load - local.tee $2 - i32.load - i32.const 3 - i32.shr_u + i32.load offset=4 + local.get $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 i32.lt_u - if (result f64) - local.get $1 - i32.const 3 - i32.shl - local.get $2 - i32.add - f64.load offset=8 - else - unreachable - end + select + f64.load f64.ne if i32.const 0 return end end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $repeat|0 end end i32.const 1 ) - (func $~lib/internal/sort/insertionSort (; 81 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 82 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - loop $repeat|0 - local.get $4 - local.get $1 - i32.ge_s - i32.eqz - if - local.get $4 + block $break|0 + loop $repeat|0 + local.get $3 + local.get $1 + i32.ge_s + br_if $break|0 + local.get $3 i32.const 2 i32.shl local.get $0 i32.add - i32.load offset=8 + i32.load local.set $5 - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $continue|1 - local.get $3 + local.get $4 i32.const 0 i32.ge_s if block $break|1 - local.get $3 + local.get $4 i32.const 2 i32.shl local.get $0 i32.add - i32.load offset=8 + i32.load local.set $6 i32.const 2 global.set $~lib/argc @@ -5074,11 +4804,11 @@ i32.const 0 i32.ge_s br_if $break|1 - local.get $3 + local.get $4 local.tee $7 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $7 i32.const 1 i32.add @@ -5087,12 +4817,12 @@ local.get $0 i32.add local.get $6 - i32.store offset=8 + i32.store br $continue|1 end end end - local.get $3 + local.get $4 i32.const 1 i32.add i32.const 2 @@ -5100,16 +4830,18 @@ local.get $0 i32.add local.get $5 - i32.store offset=8 - local.get $4 + i32.store + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 + unreachable end + unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 82 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 83 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5124,11 +4856,11 @@ i32.const 2 i32.shl local.tee $3 - call $~lib/allocator/arena/__memory_allocate + call $~lib/memory/memory.allocate local.tee $7 i32.const 0 local.get $3 - call $~lib/internal/memory/memset + call $~lib/memory/memory.fill local.get $1 i32.const 1 i32.sub @@ -5139,12 +4871,12 @@ i32.gt_s if local.get $4 - local.set $3 + local.set $5 loop $continue|1 - local.get $3 + local.get $5 i32.const 1 i32.and - local.get $3 + local.get $5 i32.const 6 i32.shr_s i32.const 2 @@ -5152,7 +4884,7 @@ local.get $7 i32.add i32.load - local.get $3 + local.get $5 i32.const 1 i32.shr_s i32.const 31 @@ -5162,34 +4894,34 @@ i32.and i32.eq if - local.get $3 + local.get $5 i32.const 1 i32.shr_s - local.set $3 + local.set $5 br $continue|1 end end - local.get $3 + local.get $5 i32.const 1 i32.shr_s - local.tee $6 + local.tee $5 i32.const 2 i32.shl local.get $0 i32.add - i32.load offset=8 - local.set $5 + i32.load + local.set $3 local.get $4 i32.const 2 i32.shl local.get $0 - i32.add - i32.load offset=8 - local.set $3 + i32.add + i32.load + local.set $6 i32.const 2 global.set $~lib/argc - local.get $5 local.get $3 + local.get $6 local.get $2 call_indirect (type $FUNCSIG$iii) i32.const 0 @@ -5217,15 +4949,15 @@ i32.shl local.get $0 i32.add + local.get $3 + i32.store local.get $5 - i32.store offset=8 - local.get $6 i32.const 2 i32.shl local.get $0 i32.add - local.get $3 - i32.store offset=8 + local.get $6 + i32.store end local.get $4 i32.const 1 @@ -5244,7 +4976,7 @@ i32.ge_s if local.get $0 - i32.load offset=8 + i32.load local.set $6 local.get $0 local.get $4 @@ -5253,15 +4985,15 @@ local.get $0 i32.add local.tee $1 - i32.load offset=8 - i32.store offset=8 + i32.load + i32.store local.get $1 local.get $6 - i32.store offset=8 + i32.store i32.const 1 - local.set $5 + local.set $3 loop $continue|3 - local.get $5 + local.get $3 i32.const 5 i32.shr_s i32.const 2 @@ -5269,50 +5001,50 @@ local.get $7 i32.add i32.load - local.get $5 + local.get $3 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and - local.get $5 + local.get $3 i32.const 1 i32.shl i32.add - local.tee $3 + local.tee $5 local.get $4 i32.lt_s if - local.get $3 - local.set $5 + local.get $5 + local.set $3 br $continue|3 end end loop $continue|4 - local.get $5 + local.get $3 i32.const 0 i32.gt_s if local.get $0 - i32.load offset=8 + i32.load local.set $6 - local.get $5 + local.get $3 i32.const 2 i32.shl local.get $0 i32.add - i32.load offset=8 - local.set $3 + i32.load + local.set $5 i32.const 2 global.set $~lib/argc local.get $6 - local.get $3 + local.get $5 local.get $2 call_indirect (type $FUNCSIG$iii) i32.const 0 i32.lt_s if - local.get $5 + local.get $3 i32.const 5 i32.shr_s i32.const 2 @@ -5323,27 +5055,27 @@ local.get $1 i32.load i32.const 1 - local.get $5 + local.get $3 i32.const 31 i32.and i32.shl i32.xor i32.store - local.get $5 + local.get $3 i32.const 2 i32.shl local.get $0 i32.add local.get $6 - i32.store offset=8 + i32.store local.get $0 - local.get $3 - i32.store offset=8 + local.get $5 + i32.store end - local.get $5 + local.get $3 i32.const 1 i32.shr_s - local.set $5 + local.set $3 br $continue|4 end end @@ -5355,20 +5087,17 @@ end end local.get $0 - i32.const 4 - i32.add - local.tee $1 - i32.load offset=8 - local.set $3 - local.get $1 + i32.load offset=4 + local.set $1 local.get $0 - i32.load offset=8 - i32.store offset=8 local.get $0 - local.get $3 - i32.store offset=8 + i32.load + i32.store offset=4 + local.get $0 + local.get $1 + i32.store ) - (func $~lib/array/Array#sort (; 83 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 84 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5376,15 +5105,15 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 - local.tee $3 + i32.load offset=12 + local.tee $2 i32.const 1 i32.le_s if @@ -5392,67 +5121,61 @@ return end local.get $0 - i32.load - local.set $2 - local.get $3 + i32.load offset=4 + local.set $3 + local.get $2 i32.const 2 i32.eq if - local.get $2 - i32.const 4 - i32.add - i32.load offset=8 - local.set $3 - local.get $2 - i32.load offset=8 + local.get $3 + i32.load offset=4 + local.set $2 + local.get $3 + i32.load local.set $4 i32.const 2 global.set $~lib/argc - local.get $3 + local.get $2 local.get $4 local.get $1 call_indirect (type $FUNCSIG$iii) i32.const 0 i32.lt_s if - local.get $2 - i32.const 4 - i32.add + local.get $3 local.get $4 - i32.store offset=8 - local.get $2 + i32.store offset=4 local.get $3 - i32.store offset=8 + local.get $2 + i32.store end local.get $0 return end - local.get $2 - local.set $4 - local.get $1 - local.set $2 local.get $3 + local.set $4 + local.get $2 i32.const 256 i32.lt_s if local.get $4 - local.get $3 local.get $2 - call $~lib/internal/sort/insertionSort + local.get $1 + call $~lib/util/sort/insertionSort else local.get $4 - local.get $3 local.get $2 - call $~lib/internal/sort/weakHeapSort + local.get $1 + call $~lib/util/sort/weakHeapSort end local.get $0 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 84 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 85 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 85 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 86 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -5461,7 +5184,7 @@ i32.lt_u i32.sub ) - (func $std/array/createReverseOrderedArray (; 86 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 87 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/array/Array#constructor @@ -5469,21 +5192,24 @@ i32.const 0 local.set $0 loop $repeat|0 - block $break|0 - local.get $0 + local.get $0 + local.get $1 + i32.load offset=12 + i32.lt_s + if local.get $1 i32.load offset=4 - i32.ge_s - br_if $break|0 - local.get $1 local.get $0 + i32.const 2 + i32.shl + i32.add local.get $1 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.get $0 i32.sub - call $~lib/array/Array#__set + i32.store local.get $0 i32.const 1 i32.add @@ -5493,15 +5219,15 @@ end local.get $1 ) - (func $~lib/math/NativeMath.random (; 87 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 88 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) global.get $~lib/math/random_seeded i32.eqz if i32.const 0 - i32.const 2896 - i32.const 987 + i32.const 2296 + i32.const 1030 i32.const 24 call $~lib/env/abort unreachable @@ -5540,27 +5266,30 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 88 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 89 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/array/Array#constructor local.set $0 loop $repeat|0 - block $break|0 - local.get $1 + local.get $1 + local.get $0 + i32.load offset=12 + i32.lt_s + if local.get $0 i32.load offset=4 - i32.ge_s - br_if $break|0 - local.get $0 local.get $1 + i32.const 2 + i32.shl + i32.add call $~lib/math/NativeMath.random local.get $0 - i32.load offset=4 + i32.load offset=12 f64.convert_i32_s f64.mul i32.trunc_f64_s - call $~lib/array/Array#__set + i32.store local.get $1 i32.const 1 i32.add @@ -5570,15 +5299,14 @@ end local.get $0 ) - (func $std/array/isSorted (; 89 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 90 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) i32.const 1 local.set $2 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $4 loop $repeat|0 local.get $2 @@ -5590,42 +5318,33 @@ local.get $2 i32.const 1 i32.sub + i32.const 2 + i32.shl local.tee $3 local.get $0 - i32.load - local.tee $5 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $3 - i32.const 2 - i32.shl - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - local.get $2 + i32.load offset=4 + i32.add + i32.const -1 + local.get $3 local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load - local.tee $3 - i32.load + local.get $2 i32.const 2 - i32.shr_u + i32.shl + local.tee $3 + local.get $0 + i32.load offset=4 + i32.add + i32.const -1 + local.get $3 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $2 - i32.const 2 - i32.shl - local.get $3 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load local.get $1 call_indirect (type $FUNCSIG$iii) i32.const 0 @@ -5645,7 +5364,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 90 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 91 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -5661,101 +5380,137 @@ unreachable end ) - (func $std/array/assertSortedDefault (; 91 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 92 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 48 call $std/array/assertSorted ) - (func $start:std/array~anonymous|44 (; 92 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 93 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.sub + ) + (func $~lib/array/Array>#constructor (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 11 + call $~lib/runtime/doRegister + local.get $0 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + local.get $0 + i32.store offset=12 local.get $1 + ) + (func $~lib/runtime/assertRegistered (; 95 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 + i32.const 8 i32.sub + i32.load + i32.const -1520547049 + i32.eq + if + i32.const 0 + i32.const 16 + i32.const 199 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doLink (; 96 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + call $~lib/runtime/assertRegistered + local.get $1 + call $~lib/runtime/assertRegistered ) - (func $std/array/createReverseOrderedNestedArray (; 93 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 97 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) + (local $4 i32) i32.const 512 - call $~lib/array/Array#constructor - local.set $1 + call $~lib/array/Array>#constructor + local.set $0 loop $repeat|0 - local.get $0 local.get $1 - i32.load offset=4 + local.get $0 + i32.load offset=12 i32.lt_s if local.get $1 + i32.const 2 + i32.shl + local.tee $3 local.get $0 + i32.load offset=4 + i32.add + local.set $4 i32.const 1 call $~lib/array/Array#constructor - call $~lib/array/Array#__set + local.tee $2 local.get $0 - local.get $1 - i32.load + call $~lib/runtime/doLink + local.get $4 + local.get $2 + i32.store + local.get $3 local.tee $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 0 - local.get $1 + local.get $0 + i32.load offset=4 + i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.load offset=4 + local.get $0 + i32.load offset=12 i32.const 1 i32.sub - local.get $0 + local.get $1 i32.sub - call $~lib/array/Array#__set - local.get $0 + i32.store + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $repeat|0 end end - local.get $1 + local.get $0 ) - (func $start:std/array~anonymous|47 (; 94 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + i32.const -1 i32.const 0 local.get $0 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load + local.get $1 + i32.load offset=4 + i32.const -1 i32.const 0 local.get $1 - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=8 i32.lt_u - if (result i32) - local.get $1 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.sub ) - (func $~lib/array/Array>#sort (; 95 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 99 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5763,14 +5518,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $2 i32.const 1 i32.le_s @@ -5779,19 +5534,17 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if local.get $3 - i32.const 4 - i32.add - i32.load offset=8 + i32.load offset=4 local.set $2 local.get $3 - i32.load offset=8 + i32.load local.set $4 i32.const 2 global.set $~lib/argc @@ -5803,13 +5556,11 @@ i32.lt_s if local.get $3 - i32.const 4 - i32.add local.get $4 - i32.store offset=8 + i32.store offset=4 local.get $3 local.get $2 - i32.store offset=8 + i32.store end local.get $0 return @@ -5817,10 +5568,10 @@ local.get $3 local.get $2 local.get $1 - call $~lib/internal/sort/insertionSort + call $~lib/util/sort/insertionSort local.get $0 ) - (func $std/array/assertSorted> (; 96 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 100 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -5836,36 +5587,58 @@ unreachable end ) - (func $std/array/createReverseOrderedElementsArray (; 97 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 101 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 12 + call $~lib/runtime/doRegister i32.const 512 - call $~lib/array/Array#constructor - local.set $0 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 512 + i32.store offset=12 loop $repeat|0 local.get $1 local.get $0 - i32.load offset=4 + i32.load offset=12 i32.lt_s if local.get $0 i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $3 + local.get $0 + i32.load offset=12 i32.const 1 i32.sub local.get $1 i32.sub - local.set $2 + local.set $4 i32.const 4 - call $~lib/allocator/arena/__memory_allocate - local.tee $3 - local.get $2 + call $~lib/runtime/doAllocate + i32.const 13 + call $~lib/runtime/doRegister + local.tee $2 + local.get $4 i32.store + local.get $2 local.get $0 - local.get $1 + call $~lib/runtime/doLink local.get $3 - call $~lib/array/Array#__set + local.get $2 + i32.store local.get $1 i32.const 1 i32.add @@ -5875,22 +5648,22 @@ end local.get $0 ) - (func $start:std/array~anonymous|48 (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 102 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/internal/string/compareUnsafe (; 99 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 103 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 if (result i32) local.get $0 - i32.load16_u offset=4 + i32.load16_u local.get $1 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $3 i32.eqz @@ -5915,46 +5688,56 @@ end local.get $3 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 100 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 104 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - local.get $1 - i32.eq - local.tee $2 - i32.eqz - if + block (result i32) local.get $0 + local.get $1 + i32.eq + local.tee $2 + i32.eqz + if + local.get $0 + i32.eqz + local.set $2 + end + local.get $2 i32.eqz - local.set $2 end - local.get $2 - i32.eqz - if + if (result i32) local.get $1 i32.eqz - local.set $2 + else + local.get $2 end - local.get $2 if i32.const 0 return end local.get $1 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.set $3 local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $4 i32.eqz local.tee $2 - if + if (result i32) local.get $3 i32.eqz - local.set $2 + else + local.get $2 end - local.get $2 if i32.const 0 return @@ -5980,9 +5763,9 @@ local.get $3 i32.lt_s select - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted|trampoline (; 101 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSorted|trampoline (; 105 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) block $1of1 block $0of1 @@ -6001,7 +5784,7 @@ local.get $1 call $std/array/assertSorted> ) - (func $~lib/string/String.__eq (; 102 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.eq (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -6013,22 +5796,29 @@ local.get $0 i32.eqz local.tee $2 - i32.eqz - if + if (result i32) + local.get $2 + else local.get $1 i32.eqz - local.set $2 end - local.get $2 if i32.const 0 return end local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u i32.ne if i32.const 0 @@ -6037,18 +5827,18 @@ local.get $0 local.get $1 local.get $2 - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array/isArraysEqual (; 103 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 107 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $4 local.get $1 - i32.load offset=4 + i32.load offset=12 i32.ne if i32.const 0 @@ -6067,42 +5857,31 @@ i32.lt_s if local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - i32.const 2 - i32.shl - local.get $3 - i32.add - i32.load offset=8 - else - unreachable - end - local.get $2 - local.get $1 - i32.load + i32.shl local.tee $3 + local.get $0 + i32.load offset=4 + i32.add + i32.const -1 + local.get $3 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load - i32.const 2 - i32.shr_u + local.get $1 + i32.load offset=4 + local.get $3 + i32.add + i32.const -1 + local.get $3 + local.get $1 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $2 - i32.const 2 - i32.shl - local.get $3 - i32.add - i32.load offset=8 - else - unreachable - end - call $~lib/string/String.__eq + select + i32.load + call $~lib/string/String.eq if local.get $2 i32.const 1 @@ -6118,82 +5897,33 @@ end i32.const 1 ) - (func $~lib/internal/string/allocateUnsafe (; 104 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 0 - i32.gt_s - local.tee $1 - if - local.get $0 - i32.const 536870910 - i32.le_s - local.set $1 - end - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 14 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 1 - i32.shl - i32.const 4 - i32.add - call $~lib/allocator/arena/__memory_allocate - local.tee $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/string/String#charAt (; 105 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#charAt (; 108 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 2928 + i32.const 2324 i32.load + i32.const 1 + i32.shr_u i32.ge_u if - i32.const 3904 + i32.const 3264 return end - i32.const 1 - call $~lib/internal/string/allocateUnsafe + i32.const 2 + call $~lib/runtime/doAllocate local.tee $1 local.get $0 i32.const 1 i32.shl - i32.const 2928 + i32.const 2328 i32.add - i32.load16_u offset=4 - i32.store16 offset=4 - local.get $1 - ) - (func $~lib/internal/string/copyUnsafe (; 106 ;) (type $FUNCSIG$viiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + i32.load16_u + i32.store16 local.get $1 i32.const 1 - i32.shl - local.get $0 - i32.add - i32.const 4 - i32.add - local.get $3 - i32.const 1 - i32.shl - local.get $2 - i32.add - i32.const 4 - i32.add - local.get $4 - i32.const 1 - i32.shl - call $~lib/internal/memory/memmove + call $~lib/runtime/doRegister ) - (func $~lib/string/String#concat (; 107 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6201,74 +5931,87 @@ i32.eqz if i32.const 0 - i32.const 4056 - i32.const 110 + i32.const 3400 + i32.const 65 i32.const 4 call $~lib/env/abort unreachable end - local.get $0 - i32.load - local.tee $3 local.get $1 - i32.const 4144 + i32.const 3440 local.get $1 select local.tee $1 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl local.tee $4 + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $3 i32.add local.tee $2 i32.eqz if - i32.const 3904 + i32.const 3264 return end local.get $2 - call $~lib/internal/string/allocateUnsafe + call $~lib/runtime/doAllocate local.tee $2 - i32.const 0 local.get $0 - i32.const 0 local.get $3 - call $~lib/internal/string/copyUnsafe + call $~lib/memory/memory.copy local.get $2 local.get $3 + i32.add local.get $1 - i32.const 0 local.get $4 - call $~lib/internal/string/copyUnsafe + call $~lib/memory/memory.copy local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/string/String.__concat (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.concat (; 110 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 4144 + i32.const 3440 local.get $0 select local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 109 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 111 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - i32.const 3904 + i32.const 3264 local.set $1 loop $repeat|0 - block $break|0 - local.get $2 - local.get $0 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $0 + i32.lt_s + if local.get $1 call $~lib/math/NativeMath.random - i32.const 2928 + i32.const 2324 i32.load + i32.const 1 + i32.shr_u f64.convert_i32_s f64.mul f64.floor i32.trunc_f64_s call $~lib/string/String#charAt - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $1 local.get $2 i32.const 1 @@ -6279,36 +6022,58 @@ end local.get $1 ) - (func $std/array/createRandomStringArray (; 110 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createRandomStringArray (; 112 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 14 + call $~lib/runtime/doRegister i32.const 400 - call $~lib/array/Array#constructor - local.set $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 400 + i32.store offset=12 loop $repeat|0 - local.get $0 local.get $1 - i32.load offset=4 + local.get $0 + i32.load offset=12 i32.lt_s if - local.get $1 local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $2 call $~lib/math/NativeMath.random f64.const 32 f64.mul i32.trunc_f64_s call $std/array/createRandomString - call $~lib/array/Array#__set + local.tee $3 local.get $0 + call $~lib/runtime/doLink + local.get $2 + local.get $3 + i32.store + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $repeat|0 end end - local.get $1 + local.get $0 ) - (func $~lib/string/String#substring (; 111 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6316,8 +6081,8 @@ i32.eqz if i32.const 0 - i32.const 4056 - i32.const 249 + i32.const 3400 + i32.const 190 i32.const 4 call $~lib/env/abort unreachable @@ -6330,7 +6095,11 @@ select local.tee $2 local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $3 local.get $2 local.get $3 @@ -6349,6 +6118,8 @@ local.get $1 i32.lt_s select + i32.const 1 + i32.shl local.set $4 local.get $2 local.get $1 @@ -6356,42 +6127,51 @@ local.get $1 i32.gt_s select + i32.const 1 + i32.shl local.tee $1 local.get $4 i32.sub local.tee $3 i32.eqz if - i32.const 3904 + i32.const 3264 return end local.get $4 i32.eqz local.tee $2 - if (result i32) + if local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl local.get $1 i32.eq - else - local.get $2 + local.set $2 end + local.get $2 if local.get $0 return end local.get $3 - call $~lib/internal/string/allocateUnsafe + call $~lib/runtime/doAllocate local.tee $2 - i32.const 0 local.get $0 local.get $4 + i32.add local.get $3 - call $~lib/internal/string/copyUnsafe + call $~lib/memory/memory.copy local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join (; 112 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/array/Array#join_bool (; 114 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6400,144 +6180,150 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - i32.const 4244 - i32.load + local.get $0 + i32.load offset=12 i32.const 1 i32.sub local.tee $4 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 4240 - i32.load + local.get $0 + i32.load offset=4 local.set $5 - i32.const 4216 - i32.load - local.tee $6 - i32.const 0 - i32.ne - local.set $7 local.get $4 i32.eqz if - i32.const 4184 - i32.const 4200 + i32.const 3472 + i32.const 3488 local.get $5 - i32.load8_u offset=8 + i32.load8_u select return end - local.get $6 + i32.const 3508 + i32.load + i32.const 1 + i32.shr_u + local.tee $6 i32.const 5 i32.add local.get $4 i32.mul i32.const 5 i32.add - local.tee $8 - call $~lib/internal/string/allocateUnsafe + local.tee $7 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.set $2 + i32.const 0 + local.set $0 loop $repeat|0 - local.get $1 + local.get $0 local.get $4 i32.lt_s if + local.get $0 local.get $5 - local.get $1 - local.tee $3 i32.add - i32.load8_u offset=8 + i32.load8_u i32.const 0 i32.ne - local.tee $9 + local.tee $8 i32.eqz i32.const 4 i32.add - local.set $1 + local.set $3 + local.get $1 + i32.const 1 + i32.shl local.get $2 - local.get $0 - i32.const 4184 - i32.const 4200 - local.get $9 + i32.add + i32.const 3472 + i32.const 3488 + local.get $8 select - i32.const 0 - local.get $1 - call $~lib/internal/string/copyUnsafe - local.get $0 + local.get $3 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $1 + local.get $3 i32.add - local.set $0 - local.get $7 + local.set $1 + local.get $6 if + local.get $1 + i32.const 1 + i32.shl local.get $2 - local.get $0 - i32.const 4216 - i32.const 0 + i32.add + i32.const 3512 local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $0 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 local.get $6 i32.add - local.set $0 + local.set $1 end - local.get $3 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end local.get $4 local.get $5 i32.add - i32.load8_u offset=8 + i32.load8_u i32.const 0 i32.ne - local.tee $3 + local.tee $0 i32.eqz i32.const 4 i32.add - local.set $1 - local.get $2 - local.get $0 - i32.const 4184 - i32.const 4200 - local.get $3 - select - i32.const 0 + local.set $3 local.get $1 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl local.get $2 - local.set $3 - local.get $8 + i32.add + i32.const 3472 + i32.const 3488 local.get $0 + select + local.get $3 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $7 local.get $1 + local.get $3 i32.add - local.tee $0 + local.tee $1 i32.gt_s if local.get $2 - local.get $0 + local.get $1 call $~lib/string/String#substring - local.set $3 + local.set $0 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered + local.get $0 + return end - local.get $3 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/decimalCount32 (; 113 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -6591,10 +6377,10 @@ end end ) - (func $~lib/internal/number/utoa32_lut (; 114 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 116 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - i32.const 4832 + i32.const 4028 i32.load local.set $3 loop $continue|0 @@ -6618,26 +6404,26 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $4 i32.const 100 i32.div_u i32.const 2 i32.shl - i32.add - i64.load32_u offset=8 local.get $3 + i32.add + i64.load32_u local.get $4 i32.const 100 i32.rem_u i32.const 2 i32.shl + local.get $3 i32.add - i64.load32_u offset=8 + i64.load32_u i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store br $continue|0 end end @@ -6661,13 +6447,13 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $4 i32.const 2 i32.shl + local.get $3 i32.add - i32.load offset=8 - i32.store offset=4 + i32.load + i32.store end local.get $1 i32.const 10 @@ -6680,13 +6466,13 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $1 i32.const 2 i32.shl + local.get $3 i32.add - i32.load offset=8 - i32.store offset=4 + i32.load + i32.store else local.get $2 i32.const 1 @@ -6698,17 +6484,17 @@ local.get $1 i32.const 48 i32.add - i32.store16 offset=4 + i32.store16 end ) - (func $~lib/internal/number/itoa32 (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 117 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 i32.eqz if - i32.const 4312 + i32.const 3600 return end local.get $0 @@ -6722,24 +6508,28 @@ local.set $0 end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.tee $3 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.tee $2 local.get $0 local.get $3 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $1 if local.get $2 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/itoa_stream (; 116 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 118 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6751,7 +6541,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -6770,64 +6560,65 @@ local.get $2 end local.get $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.tee $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $1 if local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $2 ) - (func $~lib/array/Array#join (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 119 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.tee $4 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end local.get $0 - i32.load + i32.load offset=4 local.set $5 - local.get $1 - i32.load - local.tee $6 - i32.const 0 - i32.ne - local.set $7 local.get $4 i32.eqz if local.get $5 - i32.load offset=8 - call $~lib/internal/number/itoa32 + i32.load + call $~lib/util/number/itoa32 return end - local.get $6 + local.get $1 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.tee $6 i32.const 11 i32.add local.get $4 i32.mul i32.const 11 i32.add - local.tee $8 - call $~lib/internal/string/allocateUnsafe + local.tee $7 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.set $3 i32.const 0 local.set $0 @@ -6843,19 +6634,23 @@ i32.shl local.get $5 i32.add - i32.load offset=8 - call $~lib/internal/number/itoa_stream + i32.load + call $~lib/util/number/itoa_stream local.get $2 i32.add local.set $2 - local.get $7 + local.get $6 if - local.get $3 local.get $2 + i32.const 1 + i32.shl + local.get $3 + i32.add local.get $1 - i32.const 0 local.get $6 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $2 local.get $6 i32.add @@ -6868,9 +6663,7 @@ br $repeat|0 end end - local.get $3 - local.set $0 - local.get $8 + local.get $7 local.get $3 local.get $2 local.get $4 @@ -6878,8 +6671,8 @@ i32.shl local.get $5 i32.add - i32.load offset=8 - call $~lib/internal/number/itoa_stream + i32.load + call $~lib/util/number/itoa_stream local.get $2 i32.add local.tee $2 @@ -6890,38 +6683,43 @@ call $~lib/string/String#substring local.set $0 local.get $3 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered + local.get $0 + return end + local.get $3 + i32.const 1 + call $~lib/runtime/doRegister + ) + (func $~lib/array/Array#join (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 + local.get $1 + call $~lib/array/Array#join_int ) - (func $~lib/internal/number/utoa32 (; 118 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 121 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 i32.eqz if - i32.const 4312 + i32.const 3600 return end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.tee $1 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.tee $2 local.get $0 local.get $1 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/itoa_stream (; 119 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 122 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6933,63 +6731,64 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end local.get $0 local.get $2 local.get $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.tee $0 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $0 ) - (func $~lib/array/Array#join (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 123 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.tee $4 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end local.get $0 - i32.load + i32.load offset=4 local.set $5 - local.get $1 - i32.load - local.tee $6 - i32.const 0 - i32.ne - local.set $7 local.get $4 i32.eqz if local.get $5 - i32.load offset=8 - call $~lib/internal/number/utoa32 + i32.load + call $~lib/util/number/utoa32 return end - local.get $6 + local.get $1 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.tee $6 i32.const 10 i32.add local.get $4 i32.mul i32.const 10 i32.add - local.tee $8 - call $~lib/internal/string/allocateUnsafe + local.tee $7 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.set $3 i32.const 0 local.set $0 @@ -7005,19 +6804,23 @@ i32.shl local.get $5 i32.add - i32.load offset=8 - call $~lib/internal/number/itoa_stream + i32.load + call $~lib/util/number/itoa_stream local.get $2 i32.add local.set $2 - local.get $7 + local.get $6 if - local.get $3 local.get $2 + i32.const 1 + i32.shl + local.get $3 + i32.add local.get $1 - i32.const 0 local.get $6 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $2 local.get $6 i32.add @@ -7030,9 +6833,7 @@ br $repeat|0 end end - local.get $3 - local.set $0 - local.get $8 + local.get $7 local.get $3 local.get $2 local.get $4 @@ -7040,8 +6841,8 @@ i32.shl local.get $5 i32.add - i32.load offset=8 - call $~lib/internal/number/itoa_stream + i32.load + call $~lib/util/number/itoa_stream local.get $2 i32.add local.tee $2 @@ -7052,19 +6853,20 @@ call $~lib/string/String#substring local.set $0 local.get $3 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered + local.get $0 + return end + local.get $3 + i32.const 1 + call $~lib/runtime/doRegister + ) + (func $~lib/array/Array#join (; 124 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 + local.get $1 + call $~lib/array/Array#join_int ) - (func $~lib/internal/number/genDigits (; 121 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 125 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -7097,9 +6899,9 @@ i64.shr_u i32.wrap_i64 local.tee $7 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $8 - i32.const 6616 + i32.const 5412 i32.load local.set $12 loop $continue|0 @@ -7246,7 +7048,7 @@ i32.and i32.const 48 i32.add - i32.store16 offset=4 + i32.store16 end local.get $8 i32.const 1 @@ -7263,20 +7065,20 @@ local.get $5 i64.le_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $8 i32.add - global.set $~lib/internal/number/_K + global.set $~lib/util/number/_K local.get $5 local.set $9 local.get $3 local.set $1 - local.get $12 local.get $8 i32.const 2 i32.shl + local.get $12 i32.add - i64.load32_u offset=8 + i64.load32_u local.get $10 i64.extend_i32_s i64.shl @@ -7284,16 +7086,15 @@ local.get $11 local.set $5 local.get $6 - local.tee $7 i32.const 1 i32.sub i32.const 1 i32.shl local.get $0 i32.add - local.tee $2 - i32.load16_u offset=4 - local.set $6 + local.tee $4 + i32.load16_u + local.set $7 loop $continue|2 local.get $1 local.get $5 @@ -7331,10 +7132,10 @@ end local.get $0 if - local.get $6 + local.get $7 i32.const 1 i32.sub - local.set $6 + local.set $7 local.get $1 local.get $3 i64.add @@ -7342,10 +7143,10 @@ br $continue|2 end end - local.get $2 - local.get $6 - i32.store16 offset=4 + local.get $4 local.get $7 + i32.store16 + local.get $6 return end br $continue|0 @@ -7386,7 +7187,7 @@ i32.and i32.const 48 i32.add - i32.store16 offset=4 + i32.store16 end local.get $8 i32.const 1 @@ -7399,26 +7200,27 @@ local.get $5 i64.ge_u br_if $continue|3 - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $8 i32.add - global.set $~lib/internal/number/_K + global.set $~lib/util/number/_K local.get $1 local.set $3 local.get $9 local.set $1 - local.get $12 i32.const 0 local.get $8 i32.sub i32.const 2 i32.shl + local.get $12 i32.add - i64.load32_u offset=8 + i64.load32_u local.get $11 i64.mul local.set $9 local.get $6 + local.tee $7 i32.const 1 i32.sub i32.const 1 @@ -7426,8 +7228,8 @@ local.get $0 i32.add local.tee $4 - i32.load16_u offset=4 - local.set $7 + i32.load16_u + local.set $6 loop $continue|4 local.get $3 local.get $9 @@ -7465,10 +7267,10 @@ end local.get $2 if - local.get $7 + local.get $6 i32.const 1 i32.sub - local.set $7 + local.set $6 local.get $1 local.get $3 i64.add @@ -7477,12 +7279,12 @@ end end local.get $4 - local.get $7 - i32.store16 offset=4 local.get $6 + i32.store16 + local.get $7 end ) - (func $~lib/internal/number/prettify (; 122 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 126 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -7494,7 +7296,7 @@ local.get $0 i32.add i32.const 3145774 - i32.store offset=4 + i32.store local.get $1 i32.const 2 i32.add @@ -7529,7 +7331,7 @@ local.get $0 i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $4 i32.const 1 i32.add @@ -7543,7 +7345,7 @@ local.get $0 i32.add i32.const 3145774 - i32.store offset=4 + i32.store local.get $3 i32.const 2 i32.add @@ -7565,8 +7367,6 @@ i32.shl local.get $0 i32.add - i32.const 4 - i32.add local.tee $4 i32.const 2 i32.add @@ -7576,14 +7376,10 @@ i32.sub i32.const 1 i32.shl - call $~lib/internal/memory/memmove - local.get $3 - i32.const 1 - i32.shl - local.get $0 - i32.add + call $~lib/memory/memory.copy + local.get $4 i32.const 46 - i32.store16 offset=4 + i32.store16 local.get $1 i32.const 1 i32.add @@ -7600,25 +7396,22 @@ end local.get $4 if (result i32) - local.get $0 - i32.const 4 - i32.add - local.tee $2 i32.const 2 local.get $3 i32.sub local.tee $4 i32.const 1 i32.shl + local.get $0 i32.add - local.get $2 + local.get $0 local.get $1 i32.const 1 i32.shl - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $0 i32.const 3014704 - i32.store offset=4 + i32.store i32.const 2 local.set $3 loop $repeat|1 @@ -7633,7 +7426,7 @@ local.get $0 i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $3 i32.const 1 i32.add @@ -7651,7 +7444,7 @@ if (result i32) local.get $0 i32.const 101 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 4 i32.add @@ -7673,17 +7466,17 @@ local.get $3 end local.get $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.tee $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $4 i32.const 45 i32.const 43 local.get $0 select - i32.store16 offset=4 + i32.store16 local.get $2 i32.const 2 i32.add @@ -7691,10 +7484,7 @@ local.get $0 i32.const 4 i32.add - local.tee $2 - i32.const 4 - i32.add - local.get $2 + local.get $0 i32.const 2 i32.add local.get $1 @@ -7703,20 +7493,20 @@ local.tee $2 i32.const 2 i32.sub - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $0 i32.const 46 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 local.get $2 i32.add local.tee $0 i32.const 101 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 4 i32.add - local.tee $4 + local.tee $0 block (result i32) local.get $3 i32.const 1 @@ -7724,7 +7514,7 @@ local.tee $3 i32.const 0 i32.lt_s - local.tee $0 + local.tee $4 if i32.const 0 local.get $3 @@ -7734,17 +7524,17 @@ local.get $3 end local.get $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.tee $2 - call $~lib/internal/number/utoa32_lut - local.get $4 + call $~lib/util/number/utoa32_lut + local.get $0 i32.const 45 i32.const 43 - local.get $0 + local.get $4 select - i32.store16 offset=4 + i32.store16 local.get $1 local.get $2 i32.add @@ -7755,21 +7545,20 @@ end end ) - (func $~lib/internal/number/dtoa_core (; 123 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) - (local $2 i64) + (func $~lib/util/number/dtoa_core (; 127 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) (local $3 i64) (local $4 i64) - (local $5 i32) - (local $6 i32) + (local $5 i64) + (local $6 i64) (local $7 i32) - (local $8 i64) + (local $8 i32) (local $9 i64) (local $10 i64) (local $11 i64) (local $12 i32) (local $13 i64) - (local $14 i32) - (local $15 i64) + (local $14 i64) local.get $1 f64.const 0 f64.lt @@ -7777,7 +7566,7 @@ if (result f64) local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 local.get $1 f64.neg else @@ -7790,68 +7579,68 @@ i64.const 52 i64.shr_u i32.wrap_i64 - local.set $6 + local.set $7 local.get $3 i64.const 4503599627370495 i64.and - local.get $6 + local.get $7 i32.const 0 i32.ne - local.tee $7 + local.tee $8 i64.extend_i32_u i64.const 52 i64.shl i64.add - local.tee $4 + local.tee $3 i64.const 1 i64.shl i64.const 1 i64.add - local.tee $3 + local.tee $5 i64.clz i32.wrap_i64 - local.set $5 - local.get $3 + local.set $2 local.get $5 + local.get $2 i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_plus - local.get $6 - i32.const 1 + global.set $~lib/util/number/_frc_plus local.get $7 + i32.const 1 + local.get $8 select i32.const 1075 i32.sub - local.tee $6 + local.tee $7 i32.const 1 i32.sub - local.get $5 + local.get $2 i32.sub - local.set $5 - local.get $4 - local.get $4 + local.set $2 + local.get $3 + local.get $3 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $7 + local.tee $8 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $6 local.get $7 + local.get $8 i32.sub - local.get $5 + local.get $2 i32.sub i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_minus - local.get $5 - global.set $~lib/internal/number/_exp + global.set $~lib/util/number/_frc_minus + local.get $2 + global.set $~lib/util/number/_exp i32.const 348 i32.const -61 - global.get $~lib/internal/number/_exp + global.get $~lib/util/number/_exp i32.sub f64.convert_i32_s f64.const 0.30102999566398114 @@ -7860,8 +7649,8 @@ f64.add local.tee $1 i32.trunc_f64_s - local.tee $5 - local.get $5 + local.tee $2 + local.get $2 f64.convert_i32_s local.get $1 f64.ne @@ -7870,63 +7659,61 @@ i32.shr_s i32.const 1 i32.add - local.tee $5 + local.tee $2 i32.const 3 i32.shl - local.tee $14 + local.tee $8 i32.sub - global.set $~lib/internal/number/_K - i32.const 6544 - i32.load - local.set $7 - i32.const 6280 + global.set $~lib/util/number/_K + i32.const 5132 i32.load - local.get $14 + local.get $8 i32.add - i64.load offset=8 - global.set $~lib/internal/number/_frc_pow - local.get $7 - local.get $5 + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 5340 + i32.load + local.get $2 i32.const 1 i32.shl i32.add - i32.load16_s offset=8 - global.set $~lib/internal/number/_exp_pow - local.get $4 - local.get $4 + i32.load16_s + global.set $~lib/util/number/_exp_pow + local.get $3 + local.get $3 i64.clz i32.wrap_i64 - local.tee $7 + local.tee $2 i64.extend_i32_s i64.shl - local.tee $4 + local.tee $3 i64.const 4294967295 i64.and local.tee $9 - global.get $~lib/internal/number/_frc_pow - local.tee $3 + global.get $~lib/util/number/_frc_pow + local.tee $5 i64.const 4294967295 i64.and local.tee $10 i64.mul - local.set $13 - local.get $3 + local.set $4 + local.get $5 i64.const 32 i64.shr_u - local.tee $8 + local.tee $11 local.get $9 i64.mul - local.get $4 + local.get $3 i64.const 32 i64.shr_u - local.tee $11 + local.tee $6 local.get $10 i64.mul - local.get $13 + local.get $4 i64.const 32 i64.shr_u i64.add - local.tee $2 + local.tee $4 i64.const 4294967295 i64.and i64.add @@ -7934,43 +7721,43 @@ i64.add i64.const 32 i64.shr_u - local.get $8 + local.get $6 local.get $11 i64.mul - local.get $2 + local.get $4 i64.const 32 i64.shr_u i64.add i64.add - local.set $15 - local.get $3 + local.set $14 + local.get $5 i64.const 4294967295 i64.and - local.tee $11 - global.get $~lib/internal/number/_frc_plus - local.tee $2 + local.tee $6 + global.get $~lib/util/number/_frc_plus + local.tee $4 i64.const 4294967295 i64.and - local.tee $8 + local.tee $11 i64.mul - local.set $4 - local.get $8 - local.get $3 + local.set $3 + local.get $11 + local.get $5 i64.const 32 i64.shr_u local.tee $9 i64.mul - local.get $11 - local.get $2 + local.get $6 + local.get $4 i64.const 32 i64.shr_u local.tee $10 i64.mul - local.get $4 + local.get $3 i64.const 32 i64.shr_u i64.add - local.tee $2 + local.tee $13 i64.const 4294967295 i64.and i64.add @@ -7981,45 +7768,45 @@ local.get $9 local.get $10 i64.mul - local.get $2 + local.get $13 i64.const 32 i64.shr_u i64.add i64.add - local.set $8 - global.get $~lib/internal/number/_frc_minus - local.tee $2 + local.set $6 + global.get $~lib/util/number/_frc_minus + local.tee $13 i64.const 4294967295 i64.and local.tee $9 - local.get $3 - local.tee $4 + local.get $5 + local.tee $3 i64.const 4294967295 i64.and local.tee $10 i64.mul - local.set $13 - local.get $8 + local.set $4 + local.get $6 i64.const 1 - i64.sub - local.tee $3 - local.get $4 + i64.sub + local.tee $5 + local.get $3 i64.const 32 i64.shr_u - local.tee $8 + local.tee $11 local.get $9 i64.mul - local.get $2 + local.get $13 i64.const 32 i64.shr_u - local.tee $11 + local.tee $6 local.get $10 i64.mul - local.get $13 + local.get $4 i64.const 32 i64.shr_u i64.add - local.tee $2 + local.tee $4 i64.const 4294967295 i64.and i64.add @@ -8027,10 +7814,10 @@ i64.add i64.const 32 i64.shr_u - local.get $8 + local.get $6 local.get $11 i64.mul - local.get $2 + local.get $4 i64.const 32 i64.shr_u i64.add @@ -8038,46 +7825,46 @@ i64.const 1 i64.add i64.sub - local.set $2 + local.set $4 local.get $12 i32.const 1 i32.shl local.get $0 i32.add local.get $0 - local.get $15 - local.get $6 + local.get $14 local.get $7 + local.get $2 i32.sub - global.get $~lib/internal/number/_exp_pow - local.tee $6 + global.get $~lib/util/number/_exp_pow + local.tee $2 i32.add i32.const -64 i32.sub - local.get $3 - global.get $~lib/internal/number/_exp - local.get $6 + local.get $5 + global.get $~lib/util/number/_exp + local.get $2 i32.add i32.const -64 i32.sub - local.get $2 + local.get $4 local.get $12 - call $~lib/internal/number/genDigits + call $~lib/util/number/genDigits local.get $12 i32.sub - global.get $~lib/internal/number/_K - call $~lib/internal/number/prettify + global.get $~lib/util/number/_K + call $~lib/util/number/prettify local.get $12 i32.add ) - (func $~lib/internal/number/dtoa (; 124 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 128 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 f64.const 0 f64.eq if - i32.const 5176 + i32.const 4336 return end local.get $0 @@ -8090,40 +7877,32 @@ local.get $0 f64.ne if - i32.const 5192 + i32.const 4352 return end - i32.const 5208 - i32.const 5232 + i32.const 4368 + i32.const 4400 local.get $0 f64.const 0 f64.lt select return end - i32.const 28 - call $~lib/internal/string/allocateUnsafe + i32.const 56 + call $~lib/runtime/doAllocate local.tee $2 local.get $0 - call $~lib/internal/number/dtoa_core + call $~lib/util/number/dtoa_core local.set $1 local.get $2 local.get $1 call $~lib/string/String#substring local.set $1 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered local.get $1 ) - (func $~lib/internal/number/dtoa_stream (; 125 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 129 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) local.get $1 i32.const 1 i32.shl @@ -8136,13 +7915,13 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $0 i32.const 46 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 48 - i32.store16 offset=8 + i32.store16 offset=4 i32.const 3 return end @@ -8158,35 +7937,31 @@ if local.get $0 i32.const 78 - i32.store16 offset=4 + i32.store16 local.get $0 i32.const 97 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 78 - i32.store16 offset=8 + i32.store16 offset=4 i32.const 3 return else local.get $0 - i32.const 4 - i32.add - i32.const 5208 - i32.const 5232 + i32.const 4368 + i32.const 4400 local.get $2 f64.const 0 f64.lt local.tee $0 select - i32.const 4 - i32.add local.get $0 i32.const 8 i32.add local.tee $0 i32.const 1 i32.shl - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $0 return end @@ -8194,126 +7969,125 @@ end local.get $0 local.get $2 - call $~lib/internal/number/dtoa_core + call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join (; 126 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/array/Array#join_flt (; 130 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - i32.const 6692 - i32.load + local.get $0 + i32.load offset=12 i32.const 1 i32.sub local.tee $3 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 6688 - i32.load + local.get $0 + i32.load offset=4 local.set $4 - i32.const 5168 - i32.load - local.tee $5 - i32.const 0 - i32.ne - local.set $6 local.get $3 i32.eqz if local.get $4 - f64.load offset=8 - call $~lib/internal/number/dtoa + f64.load + call $~lib/util/number/dtoa return end - local.get $5 + i32.const 4316 + i32.load + i32.const 1 + i32.shr_u + local.tee $5 i32.const 28 i32.add local.get $3 i32.mul i32.const 28 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe + local.tee $6 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.set $2 + i32.const 0 + local.set $0 loop $repeat|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if local.get $2 - local.get $0 local.get $1 + local.get $0 i32.const 3 i32.shl local.get $4 i32.add - f64.load offset=8 - call $~lib/internal/number/dtoa_stream - local.get $0 + f64.load + call $~lib/util/number/dtoa_stream + local.get $1 i32.add - local.set $0 - local.get $6 + local.set $1 + local.get $5 if + local.get $1 + i32.const 1 + i32.shl local.get $2 - local.get $0 - i32.const 5168 - i32.const 0 + i32.add + i32.const 4320 local.get $5 - call $~lib/internal/string/copyUnsafe - local.get $0 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 local.get $5 i32.add - local.set $0 + local.set $1 end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end - local.get $7 + local.get $6 local.get $2 - local.tee $1 - local.get $0 + local.get $1 local.get $3 i32.const 3 i32.shl local.get $4 i32.add - f64.load offset=8 - call $~lib/internal/number/dtoa_stream - local.get $0 + f64.load + call $~lib/util/number/dtoa_stream + local.get $1 i32.add - local.tee $0 + local.tee $1 i32.gt_s if local.get $2 - local.get $0 + local.get $1 call $~lib/string/String#substring - local.set $1 + local.set $0 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered + local.get $0 + return end - local.get $1 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_str (; 131 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8322,242 +8096,317 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.tee $5 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end local.get $0 - i32.load - local.set $0 - local.get $1 - i32.load - local.tee $7 - i32.const 0 - i32.ne - local.set $8 + i32.load offset=4 + local.set $7 local.get $5 i32.eqz if - local.get $0 - i32.load offset=8 + local.get $7 + i32.load return end + local.get $1 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.set $8 local.get $5 i32.const 1 i32.add - local.set $3 + local.set $0 loop $repeat|0 - block $break|0 - local.get $4 - local.get $3 - i32.ge_s - br_if $break|0 - local.get $0 - local.get $4 + local.get $6 + local.get $0 + i32.lt_s + if + local.get $6 i32.const 2 i32.shl + local.get $7 i32.add - i32.load offset=8 i32.load - local.get $2 - i32.add - local.set $2 - local.get $4 + local.tee $4 + if + local.get $4 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.get $2 + i32.add + local.set $2 + end + local.get $6 i32.const 1 i32.add - local.set $4 + local.set $6 br $repeat|0 end end - i32.const 0 - local.set $3 local.get $5 - local.get $7 + local.get $8 i32.mul local.get $2 i32.add - call $~lib/internal/string/allocateUnsafe - local.set $4 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate + local.set $2 + i32.const 0 + local.set $0 loop $repeat|1 - block $break|1 - local.get $6 - local.get $5 - i32.ge_s - br_if $break|1 + local.get $0 + local.get $5 + i32.lt_s + if local.get $0 - local.get $6 i32.const 2 i32.shl + local.get $7 i32.add - i32.load offset=8 - local.tee $2 + i32.load + local.tee $4 if - local.get $4 local.get $3 + i32.const 1 + i32.shl local.get $2 - i32.const 0 - local.get $2 - i32.load - local.tee $2 - call $~lib/internal/string/copyUnsafe - local.get $2 + i32.add + local.get $4 + local.get $4 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.tee $6 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $3 + local.get $6 i32.add local.set $3 end local.get $8 if - local.get $4 local.get $3 + i32.const 1 + i32.shl + local.get $2 + i32.add local.get $1 - i32.const 0 - local.get $7 - call $~lib/internal/string/copyUnsafe + local.get $8 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $3 - local.get $7 + local.get $8 i32.add local.set $3 end - local.get $6 + local.get $0 i32.const 1 i32.add - local.set $6 + local.set $0 br $repeat|1 end end + local.get $5 + i32.const 2 + i32.shl + local.get $7 + i32.add + i32.load + local.tee $4 + if + local.get $3 + i32.const 1 + i32.shl + local.get $2 + i32.add + local.get $4 + local.get $4 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + end + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister + ) + (func $~lib/array/Array#join (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - local.get $5 + local.get $1 + call $~lib/array/Array#join_str + ) + (func $std/array/Ref#constructor (; 133 ;) (type $FUNCSIG$i) (result i32) + i32.const 0 + call $~lib/runtime/doAllocate + i32.const 18 + call $~lib/runtime/doRegister + ) + (func $~lib/array/Array#__set (; 134 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + call $~lib/array/ensureLength + local.get $0 + i32.load offset=4 + local.get $1 i32.const 2 i32.shl i32.add - i32.load offset=8 - local.tee $2 + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s if - local.get $4 - local.get $3 - local.get $2 - i32.const 0 - local.get $2 - i32.load - call $~lib/internal/string/copyUnsafe + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 end - local.get $4 ) - (func $~lib/array/Array#join (; 128 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_ref (; 135 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub - local.tee $4 + local.tee $3 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end local.get $0 - i32.load - local.set $6 - i32.const 4216 - i32.load - local.tee $5 - i32.const 0 - i32.ne - local.set $0 - local.get $4 + i32.load offset=4 + local.set $5 + local.get $3 i32.eqz if - i32.const 6872 + i32.const 5640 return end - local.get $5 + i32.const 3508 + i32.load + i32.const 1 + i32.shr_u + local.tee $4 i32.const 15 i32.add - local.get $4 + local.get $3 i32.mul i32.const 15 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe + local.tee $6 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.set $2 + i32.const 0 + local.set $0 loop $repeat|0 + local.get $0 local.get $3 - local.get $4 i32.lt_s if - local.get $3 + local.get $0 i32.const 2 i32.shl - local.get $6 + local.get $5 i32.add - i32.load offset=8 + i32.load if - local.get $2 local.get $1 - i32.const 6872 - i32.const 0 - i32.const 15 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + local.get $2 + i32.add + i32.const 5640 + i32.const 30 + call $~lib/memory/memory.copy local.get $1 i32.const 15 i32.add local.set $1 end - local.get $0 + local.get $4 if - local.get $2 local.get $1 - i32.const 4216 - i32.const 0 - local.get $5 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + local.get $2 + i32.add + i32.const 3512 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $1 - local.get $5 + local.get $4 i32.add local.set $1 end - local.get $3 + local.get $0 i32.const 1 i32.add - local.set $3 + local.set $0 br $repeat|0 end end - local.get $2 - local.set $3 block (result i32) - local.get $4 + local.get $3 i32.const 2 i32.shl - local.get $6 + local.get $5 i32.add - i32.load offset=8 + i32.load if - local.get $2 local.get $1 - i32.const 6872 - i32.const 0 - i32.const 15 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + local.get $2 + i32.add + i32.const 5640 + i32.const 30 + call $~lib/memory/memory.copy local.get $1 i32.const 15 i32.add local.set $1 end - local.get $7 + local.get $6 local.get $1 i32.gt_s end @@ -8565,21 +8414,22 @@ local.get $2 local.get $1 call $~lib/string/String#substring - local.set $3 + local.set $0 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered + local.get $0 + return end - local.get $3 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister + ) + (func $~lib/array/Array#toString (; 136 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array#join ) - (func $~lib/internal/number/itoa_stream (; 129 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -8594,7 +8444,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -8618,136 +8468,135 @@ i32.const 24 i32.shr_s local.tee $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $3 i32.add local.set $1 local.get $0 local.get $2 local.get $1 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $3 if local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $1 ) - (func $~lib/array/Array#join (; 130 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/array/Array#join_int (; 138 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - i32.const 7068 - i32.load + local.get $0 + i32.load offset=12 i32.const 1 i32.sub local.tee $3 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 7064 - i32.load + local.get $0 + i32.load offset=4 local.set $4 - i32.const 4216 - i32.load - local.tee $5 - i32.const 0 - i32.ne - local.set $6 local.get $3 i32.eqz if local.get $4 - i32.load8_s offset=8 - call $~lib/internal/number/itoa32 + i32.load8_s + call $~lib/util/number/itoa32 return end - local.get $5 + i32.const 3508 + i32.load + i32.const 1 + i32.shr_u + local.tee $5 i32.const 11 i32.add local.get $3 i32.mul i32.const 11 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe + local.tee $6 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.set $2 + i32.const 0 + local.set $0 loop $repeat|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if local.get $2 - local.get $0 local.get $1 + local.get $0 local.get $4 i32.add - i32.load8_s offset=8 - call $~lib/internal/number/itoa_stream - local.get $0 + i32.load8_s + call $~lib/util/number/itoa_stream + local.get $1 i32.add - local.set $0 - local.get $6 + local.set $1 + local.get $5 if + local.get $1 + i32.const 1 + i32.shl local.get $2 - local.get $0 - i32.const 4216 - i32.const 0 + i32.add + i32.const 3512 local.get $5 - call $~lib/internal/string/copyUnsafe - local.get $0 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 local.get $5 i32.add - local.set $0 + local.set $1 end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end - local.get $7 + local.get $6 local.get $2 - local.tee $1 - local.get $0 + local.get $1 local.get $3 local.get $4 i32.add - i32.load8_s offset=8 - call $~lib/internal/number/itoa_stream - local.get $0 + i32.load8_s + call $~lib/util/number/itoa_stream + local.get $1 i32.add - local.tee $0 + local.tee $1 i32.gt_s if local.get $2 - local.get $0 + local.get $1 call $~lib/string/String#substring - local.set $1 + local.set $0 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered + local.get $0 + return end - local.get $1 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/itoa_stream (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 139 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -8761,7 +8610,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -8769,132 +8618,131 @@ i32.const 65535 i32.and local.tee $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $1 local.get $0 local.get $2 local.get $1 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join (; 132 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/array/Array#join_int (; 140 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - i32.const 7132 - i32.load + local.get $0 + i32.load offset=12 i32.const 1 i32.sub local.tee $3 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 7128 - i32.load + local.get $0 + i32.load offset=4 local.set $4 - i32.const 4216 - i32.load - local.tee $5 - i32.const 0 - i32.ne - local.set $6 local.get $3 i32.eqz if local.get $4 - i32.load16_u offset=8 - call $~lib/internal/number/utoa32 + i32.load16_u + call $~lib/util/number/utoa32 return end - local.get $5 + i32.const 3508 + i32.load + i32.const 1 + i32.shr_u + local.tee $5 i32.const 10 i32.add local.get $3 i32.mul i32.const 10 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe + local.tee $6 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.set $2 + i32.const 0 + local.set $0 loop $repeat|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if local.get $2 - local.get $0 local.get $1 + local.get $0 i32.const 1 i32.shl local.get $4 i32.add - i32.load16_u offset=8 - call $~lib/internal/number/itoa_stream - local.get $0 + i32.load16_u + call $~lib/util/number/itoa_stream + local.get $1 i32.add - local.set $0 - local.get $6 + local.set $1 + local.get $5 if + local.get $1 + i32.const 1 + i32.shl local.get $2 - local.get $0 - i32.const 4216 - i32.const 0 + i32.add + i32.const 3512 local.get $5 - call $~lib/internal/string/copyUnsafe - local.get $0 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 local.get $5 i32.add - local.set $0 + local.set $1 end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end - local.get $7 + local.get $6 local.get $2 - local.tee $1 - local.get $0 + local.get $1 local.get $3 i32.const 1 i32.shl local.get $4 i32.add - i32.load16_u offset=8 - call $~lib/internal/number/itoa_stream - local.get $0 + i32.load16_u + call $~lib/util/number/itoa_stream + local.get $1 i32.add - local.tee $0 + local.tee $1 i32.gt_s if local.get $2 - local.get $0 + local.get $1 call $~lib/string/String#substring - local.set $1 + local.set $0 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered + local.get $0 + return end - local.get $1 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/decimalCount64 (; 133 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 141 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -8948,12 +8796,12 @@ end end ) - (func $~lib/internal/number/utoa64_lut (; 134 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 142 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 4832 + i32.const 4028 i32.load local.set $3 loop $continue|0 @@ -8989,7 +8837,6 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $4 i32.const 10000 i32.rem_u @@ -8998,20 +8845,21 @@ i32.div_u i32.const 2 i32.shl - i32.add - i64.load32_u offset=8 local.get $3 + i32.add + i64.load32_u local.get $4 i32.const 100 i32.rem_u i32.const 2 i32.shl + local.get $3 i32.add - i64.load32_u offset=8 + i64.load32_u i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store local.get $2 i32.const 4 i32.sub @@ -9020,22 +8868,22 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $6 i32.const 2 i32.shl - i32.add - i64.load32_u offset=8 local.get $3 + i32.add + i64.load32_u local.get $5 i32.const 2 i32.shl + local.get $3 i32.add - i64.load32_u offset=8 + i64.load32_u i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store br $continue|0 end end @@ -9043,16 +8891,16 @@ local.get $1 i32.wrap_i64 local.get $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut ) - (func $~lib/internal/number/utoa64 (; 135 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 143 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 i64.eqz if - i32.const 4312 + i32.const 3600 return end local.get $0 @@ -9062,26 +8910,32 @@ local.get $0 i32.wrap_i64 local.tee $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.tee $1 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.tee $2 local.get $3 local.get $1 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.tee $1 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.tee $2 local.get $0 local.get $1 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/itoa_stream (; 136 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 144 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -9094,7 +8948,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -9105,140 +8959,139 @@ local.get $2 i32.wrap_i64 local.tee $1 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 local.get $0 local.get $1 local.get $3 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut else local.get $0 local.get $2 local.get $2 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.tee $3 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end local.get $3 ) - (func $~lib/array/Array#join (; 137 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/array/Array#join_int (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - i32.const 7236 - i32.load + local.get $0 + i32.load offset=12 i32.const 1 i32.sub local.tee $3 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 7232 - i32.load + local.get $0 + i32.load offset=4 local.set $4 - i32.const 4216 - i32.load - local.tee $5 - i32.const 0 - i32.ne - local.set $6 local.get $3 i32.eqz if local.get $4 - i64.load offset=8 - call $~lib/internal/number/utoa64 + i64.load + call $~lib/util/number/utoa64 return end - local.get $5 + i32.const 3508 + i32.load + i32.const 1 + i32.shr_u + local.tee $5 i32.const 20 i32.add local.get $3 i32.mul i32.const 20 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe + local.tee $6 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.set $2 + i32.const 0 + local.set $0 loop $repeat|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if local.get $2 - local.get $0 local.get $1 + local.get $0 i32.const 3 i32.shl local.get $4 i32.add - i64.load offset=8 - call $~lib/internal/number/itoa_stream - local.get $0 + i64.load + call $~lib/util/number/itoa_stream + local.get $1 i32.add - local.set $0 - local.get $6 + local.set $1 + local.get $5 if + local.get $1 + i32.const 1 + i32.shl local.get $2 - local.get $0 - i32.const 4216 - i32.const 0 + i32.add + i32.const 3512 local.get $5 - call $~lib/internal/string/copyUnsafe - local.get $0 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 local.get $5 i32.add - local.set $0 + local.set $1 end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end - local.get $7 + local.get $6 local.get $2 - local.tee $1 - local.get $0 + local.get $1 local.get $3 i32.const 3 i32.shl local.get $4 i32.add - i64.load offset=8 - call $~lib/internal/number/itoa_stream - local.get $0 + i64.load + call $~lib/util/number/itoa_stream + local.get $1 i32.add - local.tee $0 + local.tee $1 i32.gt_s if local.get $2 - local.get $0 + local.get $1 call $~lib/string/String#substring - local.set $1 + local.set $0 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered + local.get $0 + return end - local.get $1 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/itoa64 (; 138 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 146 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9246,7 +9099,7 @@ local.get $0 i64.eqz if - i32.const 4312 + i32.const 3600 return end block (result i32) @@ -9268,36 +9121,42 @@ local.get $0 i32.wrap_i64 local.tee $4 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.tee $2 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.tee $3 local.get $4 local.get $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.get $1 i32.add local.tee $2 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.tee $3 local.get $0 local.get $2 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end local.get $1 if local.get $3 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $3 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/itoa_stream (; 139 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 147 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -9311,7 +9170,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -9334,245 +9193,247 @@ local.get $2 i32.wrap_i64 local.tee $1 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $3 i32.add local.set $4 local.get $0 local.get $1 local.get $4 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut else local.get $0 local.get $2 local.get $2 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.get $3 i32.add local.tee $4 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end local.get $3 if local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $4 ) - (func $~lib/array/Array#join (; 140 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/array/Array#join_int (; 148 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - i32.const 7436 - i32.load + local.get $0 + i32.load offset=12 i32.const 1 i32.sub local.tee $3 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 7432 - i32.load + local.get $0 + i32.load offset=4 local.set $4 - i32.const 4216 - i32.load - local.tee $5 - i32.const 0 - i32.ne - local.set $6 local.get $3 i32.eqz if local.get $4 - i64.load offset=8 - call $~lib/internal/number/itoa64 + i64.load + call $~lib/util/number/itoa64 return end - local.get $5 + i32.const 3508 + i32.load + i32.const 1 + i32.shr_u + local.tee $5 i32.const 21 i32.add local.get $3 i32.mul i32.const 21 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe + local.tee $6 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.set $2 + i32.const 0 + local.set $0 loop $repeat|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if local.get $2 - local.get $0 local.get $1 + local.get $0 i32.const 3 i32.shl local.get $4 i32.add - i64.load offset=8 - call $~lib/internal/number/itoa_stream - local.get $0 + i64.load + call $~lib/util/number/itoa_stream + local.get $1 i32.add - local.set $0 - local.get $6 + local.set $1 + local.get $5 if + local.get $1 + i32.const 1 + i32.shl local.get $2 - local.get $0 - i32.const 4216 - i32.const 0 + i32.add + i32.const 3512 local.get $5 - call $~lib/internal/string/copyUnsafe - local.get $0 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 local.get $5 i32.add - local.set $0 + local.set $1 end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end - local.get $7 + local.get $6 local.get $2 - local.tee $1 - local.get $0 + local.get $1 local.get $3 i32.const 3 i32.shl local.get $4 i32.add - i64.load offset=8 - call $~lib/internal/number/itoa_stream - local.get $0 + i64.load + call $~lib/util/number/itoa_stream + local.get $1 i32.add - local.tee $0 + local.tee $1 i32.gt_s if local.get $2 - local.get $0 + local.get $1 call $~lib/string/String#substring - local.set $1 + local.set $0 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered + local.get $0 + return end - local.get $1 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister + ) + (func $~lib/array/Array#toString (; 149 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array#join ) - (func $~lib/array/Array>#join (; 141 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 150 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 + i32.const 3264 local.set $1 - local.get $0 - i32.load - local.set $4 - i32.const 4216 + i32.const 3508 i32.load - i32.const 0 - i32.ne + i32.const 1 + i32.shr_u local.set $5 - local.get $3 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $2 i32.eqz if - local.get $4 - i32.load offset=8 - local.tee $2 + local.get $3 + i32.load + local.tee $0 if (result i32) - local.get $2 - i32.const 4216 + local.get $0 + i32.const 3512 call $~lib/array/Array#join else - i32.const 3904 + i32.const 3264 end return end - i32.const 0 - local.set $0 loop $repeat|0 - local.get $0 - local.get $3 + local.get $4 + local.get $2 i32.lt_s if - local.get $0 + local.get $4 i32.const 2 i32.shl - local.get $4 + local.get $3 i32.add - i32.load offset=8 - local.tee $2 + i32.load + local.tee $0 if local.get $1 - local.get $2 - i32.const 4216 + local.get $0 + i32.const 3512 call $~lib/array/Array#join - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $1 end local.get $5 if local.get $1 - i32.const 4216 - call $~lib/string/String.__concat + i32.const 3512 + call $~lib/string/String.concat local.set $1 end - local.get $0 + local.get $4 i32.const 1 i32.add - local.set $0 + local.set $4 br $repeat|0 end end - local.get $3 + local.get $2 i32.const 2 i32.shl - local.get $4 + local.get $3 i32.add - i32.load offset=8 - local.tee $2 - if + i32.load + local.tee $0 + if (result i32) local.get $1 - local.get $2 - i32.const 4216 + local.get $0 + i32.const 3512 call $~lib/array/Array#join - call $~lib/string/String.__concat - local.set $1 + call $~lib/string/String.concat + else + local.get $1 end - local.get $1 ) - (func $~lib/internal/number/itoa_stream (; 142 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 151 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -9586,7 +9447,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -9594,59 +9455,58 @@ i32.const 255 i32.and local.tee $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $1 local.get $0 local.get $2 local.get $1 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 152 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.tee $3 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end local.get $0 - i32.load + i32.load offset=4 local.set $4 - i32.const 4216 - i32.load - local.tee $5 - i32.const 0 - i32.ne - local.set $6 local.get $3 i32.eqz if local.get $4 - i32.load8_u offset=8 - call $~lib/internal/number/utoa32 + i32.load8_u + call $~lib/util/number/utoa32 return end - local.get $5 + i32.const 3508 + i32.load + i32.const 1 + i32.shr_u + local.tee $5 i32.const 10 i32.add local.get $3 i32.mul i32.const 10 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe + local.tee $6 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.set $2 i32.const 0 local.set $0 @@ -9660,19 +9520,23 @@ local.get $0 local.get $4 i32.add - i32.load8_u offset=8 - call $~lib/internal/number/itoa_stream + i32.load8_u + call $~lib/util/number/itoa_stream local.get $1 i32.add local.set $1 - local.get $6 + local.get $5 if - local.get $2 local.get $1 - i32.const 4216 - i32.const 0 + i32.const 1 + i32.shl + local.get $2 + i32.add + i32.const 3512 local.get $5 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $1 local.get $5 i32.add @@ -9685,15 +9549,14 @@ br $repeat|0 end end - local.get $7 + local.get $6 local.get $2 - local.tee $0 local.get $1 local.get $3 local.get $4 i32.add - i32.load8_u offset=8 - call $~lib/internal/number/itoa_stream + i32.load8_u + call $~lib/util/number/itoa_stream local.get $1 i32.add local.tee $1 @@ -9704,301 +9567,291 @@ call $~lib/string/String#substring local.set $0 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered + local.get $0 + return end - local.get $0 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/array/Array>#join (; 144 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 153 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 + i32.const 3264 local.set $1 - local.get $0 - i32.load - local.set $4 - i32.const 4216 + i32.const 3508 i32.load - i32.const 0 - i32.ne + i32.const 1 + i32.shr_u local.set $5 - local.get $3 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $2 i32.eqz if - local.get $4 - i32.load offset=8 - local.tee $2 + local.get $3 + i32.load + local.tee $0 if (result i32) - local.get $2 - call $~lib/array/Array#join + local.get $0 + call $~lib/array/Array#join_int else - i32.const 3904 + i32.const 3264 end return end - i32.const 0 - local.set $0 loop $repeat|0 - local.get $0 - local.get $3 + local.get $4 + local.get $2 i32.lt_s if - local.get $0 + local.get $4 i32.const 2 i32.shl - local.get $4 + local.get $3 i32.add - i32.load offset=8 - local.tee $2 + i32.load + local.tee $0 if local.get $1 - local.get $2 - call $~lib/array/Array#join - call $~lib/string/String.__concat + local.get $0 + call $~lib/array/Array#join_int + call $~lib/string/String.concat local.set $1 end local.get $5 if local.get $1 - i32.const 4216 - call $~lib/string/String.__concat + i32.const 3512 + call $~lib/string/String.concat local.set $1 end - local.get $0 + local.get $4 i32.const 1 i32.add - local.set $0 + local.set $4 br $repeat|0 end end - local.get $3 + local.get $2 i32.const 2 i32.shl - local.get $4 + local.get $3 i32.add - i32.load offset=8 - local.tee $2 - if + i32.load + local.tee $0 + if (result i32) + local.get $1 + local.get $0 + call $~lib/array/Array#join_int + call $~lib/string/String.concat + else local.get $1 - local.get $2 - call $~lib/array/Array#join - call $~lib/string/String.__concat - local.set $1 end - local.get $1 ) - (func $~lib/array/Array>#join (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 154 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 + i32.const 3264 local.set $1 - local.get $0 + i32.const 3508 i32.load - local.set $4 - i32.const 4216 - i32.load - i32.const 0 - i32.ne + i32.const 1 + i32.shr_u local.set $5 - local.get $3 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $2 i32.eqz if - local.get $4 - i32.load offset=8 - local.tee $2 + local.get $3 + i32.load + local.tee $0 if (result i32) - local.get $2 - i32.const 4216 + local.get $0 + i32.const 3512 call $~lib/array/Array#join else - i32.const 3904 + i32.const 3264 end return end - i32.const 0 - local.set $0 loop $repeat|0 - local.get $0 - local.get $3 + local.get $4 + local.get $2 i32.lt_s if - local.get $0 + local.get $4 i32.const 2 i32.shl - local.get $4 + local.get $3 i32.add - i32.load offset=8 - local.tee $2 + i32.load + local.tee $0 if local.get $1 - local.get $2 - i32.const 4216 + local.get $0 + i32.const 3512 call $~lib/array/Array#join - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $1 end local.get $5 if local.get $1 - i32.const 4216 - call $~lib/string/String.__concat + i32.const 3512 + call $~lib/string/String.concat local.set $1 end - local.get $0 + local.get $4 i32.const 1 i32.add - local.set $0 + local.set $4 br $repeat|0 end end - local.get $3 + local.get $2 i32.const 2 i32.shl - local.get $4 + local.get $3 i32.add - i32.load offset=8 - local.tee $2 - if + i32.load + local.tee $0 + if (result i32) local.get $1 - local.get $2 - i32.const 4216 + local.get $0 + i32.const 3512 call $~lib/array/Array#join - call $~lib/string/String.__concat - local.set $1 + call $~lib/string/String.concat + else + local.get $1 end - local.get $1 ) - (func $~lib/array/Array>>#join (; 146 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>>#join_arr (; 155 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 + i32.const 3264 local.set $1 - local.get $0 - i32.load - local.set $4 - i32.const 4216 + i32.const 3508 i32.load - i32.const 0 - i32.ne + i32.const 1 + i32.shr_u local.set $5 - local.get $3 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $2 i32.eqz if - local.get $4 - i32.load offset=8 - local.tee $2 + local.get $3 + i32.load + local.tee $0 if (result i32) - local.get $2 - call $~lib/array/Array>#join + local.get $0 + call $~lib/array/Array>#join_arr else - i32.const 3904 + i32.const 3264 end return end - i32.const 0 - local.set $0 loop $repeat|0 - local.get $0 - local.get $3 + local.get $4 + local.get $2 i32.lt_s if - local.get $0 + local.get $4 i32.const 2 i32.shl - local.get $4 + local.get $3 i32.add - i32.load offset=8 - local.tee $2 + i32.load + local.tee $0 if local.get $1 - local.get $2 - call $~lib/array/Array>#join - call $~lib/string/String.__concat + local.get $0 + call $~lib/array/Array>#join_arr + call $~lib/string/String.concat local.set $1 end local.get $5 if local.get $1 - i32.const 4216 - call $~lib/string/String.__concat + i32.const 3512 + call $~lib/string/String.concat local.set $1 end - local.get $0 + local.get $4 i32.const 1 i32.add - local.set $0 + local.set $4 br $repeat|0 end end - local.get $3 + local.get $2 i32.const 2 i32.shl - local.get $4 + local.get $3 i32.add - i32.load offset=8 - local.tee $2 - if + i32.load + local.tee $0 + if (result i32) + local.get $1 + local.get $0 + call $~lib/array/Array>#join_arr + call $~lib/string/String.concat + else local.get $1 - local.get $2 - call $~lib/array/Array>#join - call $~lib/string/String.__concat - local.set $1 end - local.get $1 ) - (func $start:std/array (; 147 ;) (type $FUNCSIG$v) + (func $start:std/array (; 156 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - i32.const 7912 + i32.const 6448 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -10028,11 +9881,17 @@ unreachable end i32.const 0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/doAllocate + i32.const 5 + call $~lib/runtime/doRegister drop i32.const 12 - call $~lib/allocator/arena/__memory_allocate - call $~lib/internal/typedarray/TypedArray#constructor + call $~lib/runtime/doAllocate + i32.const 6 + call $~lib/runtime/doRegister + i32.const 1 + i32.const 0 + call $~lib/runtime/ArrayBufferView#constructor drop global.get $std/array/arr8 i32.const 1 @@ -10040,7 +9899,10 @@ i32.const 3 call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 256 + i32.const 192 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray call $std/array/isArraysEqual i32.eqz if @@ -10051,14 +9913,16 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/array/arr8 i32.const 0 i32.const 0 - call $~lib/array/Array#fill|trampoline + i32.const 2147483647 + call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 280 + i32.const 208 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray call $std/array/isArraysEqual i32.eqz if @@ -10075,7 +9939,10 @@ i32.const -3 call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 304 + i32.const 224 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray call $std/array/isArraysEqual i32.eqz if @@ -10086,14 +9953,16 @@ call $~lib/env/abort unreachable end - i32.const 2 - global.set $~lib/argc global.get $std/array/arr8 i32.const 2 i32.const -2 - call $~lib/array/Array#fill|trampoline + i32.const 2147483647 + call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 328 + i32.const 240 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray call $std/array/isArraysEqual i32.eqz if @@ -10110,7 +9979,10 @@ i32.const 0 call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 352 + i32.const 256 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray call $std/array/isArraysEqual i32.eqz if @@ -10127,7 +9999,10 @@ i32.const 3 call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 432 + i32.const 328 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10139,14 +10014,16 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/array/arr32 i32.const 0 i32.const 0 - call $~lib/array/Array#fill|trampoline + i32.const 2147483647 + call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 472 + i32.const 360 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10164,7 +10041,10 @@ i32.const -3 call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 512 + i32.const 392 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10176,14 +10056,16 @@ call $~lib/env/abort unreachable end - i32.const 2 - global.set $~lib/argc global.get $std/array/arr32 i32.const 2 i32.const -2 - call $~lib/array/Array#fill|trampoline + i32.const 2147483647 + call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 552 + i32.const 424 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10201,7 +10083,10 @@ i32.const 0 call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 592 + i32.const 456 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10214,7 +10099,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 if i32.const 0 i32.const 120 @@ -10225,7 +10110,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s if @@ -10239,20 +10126,16 @@ global.get $std/array/arr i32.const 42 call $~lib/array/Array#push - i32.const 0 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 42 i32.ne if @@ -10264,7 +10147,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.ne if @@ -10277,7 +10160,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 1 @@ -10305,7 +10190,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 if i32.const 0 i32.const 120 @@ -10316,7 +10201,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 1 @@ -10333,7 +10220,7 @@ i32.const 43 call $~lib/array/Array#push global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.ne if @@ -10346,7 +10233,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 1 @@ -10359,20 +10248,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 43 i32.ne if @@ -10387,7 +10272,7 @@ i32.const 44 call $~lib/array/Array#push global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -10400,7 +10285,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 2 @@ -10413,20 +10300,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 43 i32.ne if @@ -10437,22 +10320,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -10467,7 +10346,7 @@ i32.const 45 call $~lib/array/Array#push global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if @@ -10480,7 +10359,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 3 @@ -10493,20 +10374,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 43 i32.ne if @@ -10517,22 +10394,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -10543,22 +10416,18 @@ call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 45 i32.ne if @@ -10578,7 +10447,9 @@ global.set $std/array/out global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 3 @@ -10592,7 +10463,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if @@ -10604,7 +10475,7 @@ unreachable end global.get $std/array/out - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if @@ -10616,12 +10487,17 @@ unreachable end global.get $std/array/out - i32.const 608 + i32.const 528 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray call $~lib/array/Array#concat drop global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 3 @@ -10634,20 +10510,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/out - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 43 i32.ne if @@ -10658,22 +10530,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/out - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -10684,22 +10552,18 @@ call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array/out - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 45 i32.ne if @@ -10722,7 +10586,9 @@ global.set $std/array/out global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 3 @@ -10736,7 +10602,7 @@ unreachable end global.get $std/array/other - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -10748,7 +10614,7 @@ unreachable end global.get $std/array/out - i32.load offset=4 + i32.load offset=12 i32.const 5 i32.ne if @@ -10759,20 +10625,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/out - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 43 i32.ne if @@ -10783,22 +10645,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/out - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -10809,22 +10667,18 @@ call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array/out - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 45 i32.ne if @@ -10835,22 +10689,18 @@ call $~lib/env/abort unreachable end - i32.const 3 global.get $std/array/out - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 12 + i32.add + i32.const -1 + i32.const 12 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 46 i32.ne if @@ -10861,22 +10711,18 @@ call $~lib/env/abort unreachable end - i32.const 4 global.get $std/array/out - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 16 + i32.add + i32.const -1 + i32.const 16 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 16 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 47 i32.ne if @@ -10891,7 +10737,7 @@ call $~lib/array/Array#pop drop global.get $std/array/out - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.ne if @@ -10907,7 +10753,7 @@ call $~lib/array/Array#concat global.set $std/array/out global.get $std/array/out - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if @@ -10918,22 +10764,18 @@ call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array/out - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 45 i32.ne if @@ -10945,7 +10787,7 @@ unreachable end global.get $std/array/source - i32.load offset=4 + i32.load offset=12 if i32.const 0 i32.const 120 @@ -10959,7 +10801,7 @@ call $~lib/array/Array#concat global.set $std/array/out global.get $std/array/out - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if @@ -10971,7 +10813,7 @@ unreachable end global.get $std/array/source - i32.load offset=4 + i32.load offset=12 if i32.const 0 i32.const 120 @@ -10980,15 +10822,20 @@ call $~lib/env/abort unreachable end - i32.const 664 - global.set $std/array/cwArr + i32.const 568 + i32.const 4 i32.const 2 - global.set $~lib/argc + call $~lib/runtime/doWrapArray + global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const 3 - call $~lib/array/Array#copyWithin|trampoline - i32.const 704 + i32.const 2147483647 + call $~lib/array/Array#copyWithin + i32.const 600 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11000,15 +10847,20 @@ call $~lib/env/abort unreachable end - i32.const 744 - global.set $std/array/cwArr + i32.const 632 + i32.const 4 i32.const 2 - global.set $~lib/argc + call $~lib/runtime/doWrapArray + global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 3 - call $~lib/array/Array#copyWithin|trampoline - i32.const 784 + i32.const 2147483647 + call $~lib/array/Array#copyWithin + i32.const 664 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11020,15 +10872,20 @@ call $~lib/env/abort unreachable end - i32.const 824 - global.set $std/array/cwArr + i32.const 696 + i32.const 4 i32.const 2 - global.set $~lib/argc + call $~lib/runtime/doWrapArray + global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 2 - call $~lib/array/Array#copyWithin|trampoline - i32.const 864 + i32.const 2147483647 + call $~lib/array/Array#copyWithin + i32.const 728 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11040,15 +10897,20 @@ call $~lib/env/abort unreachable end - i32.const 904 - global.set $std/array/cwArr + i32.const 760 + i32.const 4 i32.const 2 - global.set $~lib/argc + call $~lib/runtime/doWrapArray + global.set $std/array/cwArr global.get $std/array/cwArr i32.const 2 i32.const 2 - call $~lib/array/Array#copyWithin|trampoline - i32.const 944 + i32.const 2147483647 + call $~lib/array/Array#copyWithin + i32.const 792 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11060,14 +10922,20 @@ call $~lib/env/abort unreachable end - i32.const 984 + i32.const 824 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 1024 + i32.const 856 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11079,14 +10947,20 @@ call $~lib/env/abort unreachable end - i32.const 1064 + i32.const 888 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 1104 + i32.const 920 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11098,14 +10972,20 @@ call $~lib/env/abort unreachable end - i32.const 1144 + i32.const 952 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 1184 + i32.const 984 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11117,15 +10997,20 @@ call $~lib/env/abort unreachable end - i32.const 1224 - global.set $std/array/cwArr + i32.const 1016 + i32.const 4 i32.const 2 - global.set $~lib/argc + call $~lib/runtime/doWrapArray + global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const -2 - call $~lib/array/Array#copyWithin|trampoline - i32.const 1264 + i32.const 2147483647 + call $~lib/array/Array#copyWithin + i32.const 1048 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11137,14 +11022,20 @@ call $~lib/env/abort unreachable end - i32.const 1304 + i32.const 1080 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - i32.const 1344 + i32.const 1112 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11156,14 +11047,20 @@ call $~lib/env/abort unreachable end - i32.const 1384 + i32.const 1144 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - i32.const 1424 + i32.const 1176 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11175,14 +11072,20 @@ call $~lib/env/abort unreachable end - i32.const 1464 + i32.const 1208 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - i32.const 1504 + i32.const 1240 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11194,15 +11097,20 @@ call $~lib/env/abort unreachable end - i32.const 1544 - global.set $std/array/cwArr + i32.const 1272 + i32.const 4 i32.const 2 - global.set $~lib/argc + call $~lib/runtime/doWrapArray + global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 - call $~lib/array/Array#copyWithin|trampoline - i32.const 1584 + i32.const 2147483647 + call $~lib/array/Array#copyWithin + i32.const 1304 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11218,7 +11126,7 @@ i32.const 42 call $~lib/array/Array#unshift global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.ne if @@ -11231,7 +11139,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 4 @@ -11244,20 +11154,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 42 i32.ne if @@ -11268,22 +11174,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + 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 43 i32.ne if @@ -11294,22 +11196,18 @@ call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -11320,22 +11218,18 @@ call $~lib/env/abort unreachable end - i32.const 3 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 12 + i32.add + i32.const -1 + i32.const 12 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 45 i32.ne if @@ -11350,7 +11244,7 @@ i32.const 41 call $~lib/array/Array#unshift global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 5 i32.ne if @@ -11363,7 +11257,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 5 @@ -11376,20 +11272,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 41 i32.ne if @@ -11400,22 +11292,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 42 i32.ne if @@ -11426,22 +11314,18 @@ call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 43 i32.ne if @@ -11452,22 +11336,18 @@ call $~lib/env/abort unreachable end - i32.const 3 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 12 + i32.add + i32.const -1 + i32.const 12 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -11478,22 +11358,18 @@ call $~lib/env/abort unreachable end - i32.const 4 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 16 + i32.add + i32.const -1 + i32.const 16 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 16 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 45 i32.ne if @@ -11519,7 +11395,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.ne if @@ -11532,7 +11408,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 5 @@ -11545,20 +11423,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 42 i32.ne if @@ -11569,22 +11443,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 43 i32.ne if @@ -11595,22 +11465,18 @@ call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -11621,22 +11487,18 @@ call $~lib/env/abort unreachable end - i32.const 3 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 12 + i32.add + i32.const -1 + i32.const 12 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 45 i32.ne if @@ -11662,7 +11524,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if @@ -11675,7 +11537,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 5 @@ -11688,20 +11552,16 @@ call $~lib/env/abort unreachable end - i32.const 0 - global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + global.get $std/array/arr + local.tee $0 + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 42 i32.ne if @@ -11712,22 +11572,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 43 i32.ne if @@ -11738,22 +11594,18 @@ call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -11767,7 +11619,7 @@ global.get $std/array/arr call $~lib/array/Array#reverse global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if @@ -11780,7 +11632,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 5 @@ -11793,20 +11647,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -11817,22 +11667,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 43 i32.ne if @@ -11843,22 +11689,18 @@ call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 42 i32.ne if @@ -12036,11 +11878,7 @@ global.get $std/array/arr i32.const 44 i32.const 0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -12056,11 +11894,7 @@ global.get $std/array/arr i32.const 42 i32.const 0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -12076,11 +11910,7 @@ global.get $std/array/arr i32.const 45 i32.const 0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes if @@ -12094,11 +11924,7 @@ global.get $std/array/arr i32.const 43 i32.const 100 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes if @@ -12112,11 +11938,7 @@ global.get $std/array/arr i32.const 43 i32.const -100 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -12132,11 +11954,7 @@ global.get $std/array/arr i32.const 43 i32.const -2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -12152,11 +11970,7 @@ global.get $std/array/arr i32.const 43 i32.const -4 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -12172,11 +11986,7 @@ global.get $std/array/arr i32.const 43 i32.const 0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -12192,11 +12002,7 @@ global.get $std/array/arr i32.const 43 i32.const 1 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -12212,11 +12018,7 @@ global.get $std/array/arr i32.const 43 i32.const 2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -12235,7 +12037,7 @@ call $~lib/array/Array#splice drop global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.ne if @@ -12248,7 +12050,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 5 @@ -12261,20 +12065,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -12285,22 +12085,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 42 i32.ne if @@ -12311,12 +12107,14 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/array/sarr i32.const 0 - call $~lib/array/Array#splice|trampoline - i32.const 1664 + i32.const 2147483647 + call $~lib/array/Array#splice + i32.const 1392 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12329,7 +12127,10 @@ unreachable end global.get $std/array/sarr - i32.const 1680 + i32.const 1424 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12341,14 +12142,19 @@ call $~lib/env/abort unreachable end - i32.const 1720 + i32.const 1432 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr - i32.const 1 - global.set $~lib/argc global.get $std/array/sarr i32.const 2 - call $~lib/array/Array#splice|trampoline - i32.const 1760 + i32.const 2147483647 + call $~lib/array/Array#splice + i32.const 1464 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12361,7 +12167,10 @@ unreachable end global.get $std/array/sarr - i32.const 1784 + i32.const 1488 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12373,13 +12182,19 @@ call $~lib/env/abort unreachable end - i32.const 1824 + i32.const 1504 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 i32.const 2 call $~lib/array/Array#splice - i32.const 1848 + i32.const 1536 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12392,7 +12207,10 @@ unreachable end global.get $std/array/sarr - i32.const 1888 + i32.const 1552 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12404,13 +12222,19 @@ call $~lib/env/abort unreachable end - i32.const 1928 + i32.const 1576 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr global.get $std/array/sarr i32.const 0 i32.const 1 call $~lib/array/Array#splice - i32.const 1952 + i32.const 1608 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12423,7 +12247,10 @@ unreachable end global.get $std/array/sarr - i32.const 1992 + i32.const 1624 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12435,14 +12262,19 @@ call $~lib/env/abort unreachable end - i32.const 2032 + i32.const 1648 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr - i32.const 1 - global.set $~lib/argc global.get $std/array/sarr i32.const -1 - call $~lib/array/Array#splice|trampoline - i32.const 2056 + i32.const 2147483647 + call $~lib/array/Array#splice + i32.const 1680 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12455,7 +12287,10 @@ unreachable end global.get $std/array/sarr - i32.const 2096 + i32.const 1696 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12467,14 +12302,19 @@ call $~lib/env/abort unreachable end - i32.const 2136 + i32.const 1720 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr - i32.const 1 - global.set $~lib/argc global.get $std/array/sarr i32.const -2 - call $~lib/array/Array#splice|trampoline - i32.const 2160 + i32.const 2147483647 + call $~lib/array/Array#splice + i32.const 1752 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12487,7 +12327,10 @@ unreachable end global.get $std/array/sarr - i32.const 2200 + i32.const 1768 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12499,13 +12342,19 @@ call $~lib/env/abort unreachable end - i32.const 2240 + i32.const 1792 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const 1 call $~lib/array/Array#splice - i32.const 2264 + i32.const 1824 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12518,7 +12367,10 @@ unreachable end global.get $std/array/sarr - i32.const 2304 + i32.const 1840 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12530,13 +12382,19 @@ call $~lib/env/abort unreachable end - i32.const 2344 + i32.const 1864 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr global.get $std/array/sarr i32.const -7 i32.const 1 call $~lib/array/Array#splice - i32.const 2368 + i32.const 1896 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12549,7 +12407,10 @@ unreachable end global.get $std/array/sarr - i32.const 2408 + i32.const 1912 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12561,13 +12422,19 @@ call $~lib/env/abort unreachable end - i32.const 2448 + i32.const 1936 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const -1 call $~lib/array/Array#splice - i32.const 2464 + i32.const 1968 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12580,7 +12447,10 @@ unreachable end global.get $std/array/sarr - i32.const 2504 + i32.const 1976 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12592,13 +12462,19 @@ call $~lib/env/abort unreachable end - i32.const 2544 + i32.const 2008 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr global.get $std/array/sarr i32.const 1 i32.const -2 call $~lib/array/Array#splice - i32.const 2560 + i32.const 2040 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12611,7 +12487,10 @@ unreachable end global.get $std/array/sarr - i32.const 2600 + i32.const 2048 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12623,13 +12502,19 @@ call $~lib/env/abort unreachable end - i32.const 2640 + i32.const 2080 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr global.get $std/array/sarr i32.const 4 i32.const 0 call $~lib/array/Array#splice - i32.const 2656 + i32.const 2112 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12642,7 +12527,10 @@ unreachable end global.get $std/array/sarr - i32.const 2696 + i32.const 2120 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12654,13 +12542,19 @@ call $~lib/env/abort unreachable end - i32.const 2736 + i32.const 2152 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 0 call $~lib/array/Array#splice - i32.const 2752 + i32.const 2184 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12673,7 +12567,10 @@ unreachable end global.get $std/array/sarr - i32.const 2792 + i32.const 2192 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12685,13 +12582,19 @@ call $~lib/env/abort unreachable end - i32.const 2832 + i32.const 2224 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 5 call $~lib/array/Array#splice - i32.const 2848 + i32.const 2256 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12704,7 +12607,10 @@ unreachable end global.get $std/array/sarr - i32.const 2888 + i32.const 2264 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12717,22 +12623,23 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - i32.const 0 - call $~lib/array/Array#__set - global.get $std/array/arr - i32.const 1 + i32.store + local.get $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__set - global.get $std/array/arr - i32.const 2 + i32.store offset=4 + local.get $0 + i32.load offset=4 i32.const 2 - call $~lib/array/Array#__set - global.get $std/array/arr - i32.const 3 + i32.store offset=8 + local.get $0 + i32.load offset=4 i32.const 3 - call $~lib/array/Array#__set - global.get $std/array/arr + i32.store offset=12 + local.get $0 i32.const 1 call $~lib/array/Array#findIndex global.set $std/array/i @@ -12791,7 +12698,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if @@ -12845,7 +12752,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -12906,7 +12813,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if @@ -12958,7 +12865,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -13017,7 +12924,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if @@ -13069,7 +12976,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -13119,7 +13026,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if @@ -13175,7 +13082,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -13196,7 +13103,7 @@ i32.const 21 call $~lib/array/Array#forEach global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 100 i32.ne if @@ -13207,18 +13114,20 @@ call $~lib/env/abort unreachable end + i32.const 0 + local.set $0 loop $repeat|0 - local.get $1 + local.get $0 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end @@ -13238,7 +13147,7 @@ call $~lib/array/Array#map global.set $std/array/newArr global.get $std/array/newArr - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.ne if @@ -13249,34 +13158,26 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/newArr - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result f32) - local.get $1 - f32.load offset=8 - else - unreachable - end + local.tee $0 + i32.load offset=4 + i32.const -1 i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select + f32.load global.get $std/array/arr - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u + local.tee $0 + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $1 - i32.load offset=8 - else - unreachable - end + select + i32.load f32.convert_i32_s f32.ne if @@ -13304,7 +13205,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if @@ -13360,7 +13261,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -13382,7 +13283,7 @@ call $~lib/array/Array#filter global.set $std/array/filteredArr global.get $std/array/filteredArr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -13411,7 +13312,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if @@ -13469,7 +13370,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -13569,7 +13470,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if @@ -13625,7 +13526,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -13725,7 +13626,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if @@ -13781,7 +13682,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 if i32.const 0 i32.const 120 @@ -13809,8 +13710,6 @@ global.set $~lib/argc global.get $std/array/f32ArrayTyped local.set $0 - i32.const 0 - local.set $1 block $1of1 block $0of1 block $outOfRange @@ -13826,6 +13725,10 @@ local.get $1 call $~lib/array/Array#sort global.get $std/array/f32ArrayTyped + i32.const 2576 + i32.const 9 + i32.const 2 + call $~lib/runtime/doWrapArray call $std/array/isArraysEqual i32.eqz if @@ -13842,11 +13745,11 @@ local.set $0 i32.const 0 local.set $1 - block $1of155 - block $0of156 - block $outOfRange57 + block $1of143 + block $0of144 + block $outOfRange45 global.get $~lib/argc - br_table $0of156 $1of155 $outOfRange57 + br_table $0of144 $1of143 $outOfRange45 end unreachable end @@ -13857,6 +13760,10 @@ local.get $1 call $~lib/array/Array#sort global.get $std/array/f64ArrayTyped + i32.const 2712 + i32.const 10 + i32.const 3 + call $~lib/runtime/doWrapArray call $std/array/isArraysEqual i32.eqz if @@ -13873,11 +13780,11 @@ local.set $0 i32.const 0 local.set $1 - block $1of158 - block $0of159 - block $outOfRange60 + block $1of146 + block $0of147 + block $outOfRange48 global.get $~lib/argc - br_table $0of159 $1of158 $outOfRange60 + br_table $0of147 $1of146 $outOfRange48 end unreachable end @@ -13889,7 +13796,10 @@ call $~lib/array/Array#sort drop global.get $std/array/i32ArrayTyped - i32.const 3592 + i32.const 2840 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13907,11 +13817,11 @@ local.set $0 i32.const 0 local.set $1 - block $1of161 - block $0of162 - block $outOfRange63 + block $1of149 + block $0of150 + block $outOfRange51 global.get $~lib/argc - br_table $0of162 $1of161 $outOfRange63 + br_table $0of150 $1of149 $outOfRange51 end unreachable end @@ -13923,7 +13833,10 @@ call $~lib/array/Array#sort drop global.get $std/array/u32ArrayTyped - i32.const 3672 + i32.const 2928 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13955,7 +13868,10 @@ global.get $std/array/reversed1 call $std/array/assertSortedDefault global.get $std/array/reversed1 - i32.const 3840 + i32.const 3168 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13970,7 +13886,10 @@ global.get $std/array/reversed2 call $std/array/assertSortedDefault global.get $std/array/reversed2 - i32.const 3864 + i32.const 3184 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14109,9 +14028,13 @@ global.set $~lib/argc global.get $std/array/randomStrings400 call $std/array/assertSorted|trampoline - call $~lib/array/Array#join - i32.const 4248 - call $~lib/string/String.__eq + i32.const 3528 + i32.const 15 + i32.const 0 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#join_bool + i32.const 3544 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14121,11 +14044,14 @@ call $~lib/env/abort unreachable end - i32.const 4872 - i32.const 3904 + i32.const 4048 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + i32.const 3264 call $~lib/array/Array#join - i32.const 4880 - call $~lib/string/String.__eq + i32.const 4072 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14135,11 +14061,14 @@ call $~lib/env/abort unreachable end - i32.const 4976 - i32.const 4936 + i32.const 4136 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + i32.const 4120 call $~lib/array/Array#join - i32.const 4880 - call $~lib/string/String.__eq + i32.const 4072 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14149,11 +14078,14 @@ call $~lib/env/abort unreachable end - i32.const 5032 - i32.const 5008 + i32.const 4192 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + i32.const 4176 call $~lib/array/Array#join - i32.const 5040 - call $~lib/string/String.__eq + i32.const 4208 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14163,9 +14095,13 @@ call $~lib/env/abort unreachable end - call $~lib/array/Array#join - i32.const 6696 - call $~lib/string/String.__eq + i32.const 5432 + i32.const 10 + i32.const 3 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#join_flt + i32.const 5488 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14175,11 +14111,14 @@ call $~lib/env/abort unreachable end - i32.const 6864 - i32.const 3904 + i32.const 5616 + i32.const 14 + i32.const 2 + call $~lib/runtime/doWrapArray + i32.const 3264 call $~lib/array/Array#join - i32.const 6784 - call $~lib/string/String.__eq + i32.const 5576 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14189,37 +14128,37 @@ call $~lib/env/abort unreachable end + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 19 + call $~lib/runtime/doRegister i32.const 3 - call $~lib/array/Array#constructor - local.set $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $0 i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $0 - local.get $1 - i32.load + i32.store offset=12 + local.get $0 + i32.const 3 + i32.store offset=12 local.get $0 - i32.store offset=8 - local.get $1 - i32.load - i32.const 4 - i32.add i32.const 0 - i32.store offset=8 + call $std/array/Ref#constructor + call $~lib/array/Array#__set + local.get $0 + i32.const 1 i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $0 - local.get $1 - i32.load - i32.const 8 - i32.add + call $~lib/array/Array#__set + local.get $0 + i32.const 2 + call $std/array/Ref#constructor + call $~lib/array/Array#__set local.get $0 - i32.store offset=8 - local.get $1 global.set $std/array/refArr global.get $std/array/refArr - call $~lib/array/Array#join - i32.const 6912 - call $~lib/string/String.__eq + call $~lib/array/Array#join_ref + i32.const 5680 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14230,10 +14169,9 @@ unreachable end global.get $std/array/reversed0 - i32.const 4216 - call $~lib/array/Array#join - i32.const 3904 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 3264 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14244,10 +14182,9 @@ unreachable end global.get $std/array/reversed1 - i32.const 4216 - call $~lib/array/Array#join - i32.const 6784 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 5576 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14258,10 +14195,9 @@ unreachable end global.get $std/array/reversed2 - i32.const 4216 - call $~lib/array/Array#join - i32.const 6984 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 5752 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14272,10 +14208,9 @@ unreachable end global.get $std/array/reversed4 - i32.const 4216 - call $~lib/array/Array#join - i32.const 7000 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 5768 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14285,9 +14220,13 @@ call $~lib/env/abort unreachable end - call $~lib/array/Array#join - i32.const 7072 - call $~lib/string/String.__eq + i32.const 5808 + i32.const 20 + i32.const 0 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#join_int + i32.const 5824 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14297,9 +14236,13 @@ call $~lib/env/abort unreachable end - call $~lib/array/Array#join - i32.const 7136 - call $~lib/string/String.__eq + i32.const 5864 + i32.const 21 + i32.const 1 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#join_int + i32.const 5880 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14309,9 +14252,13 @@ call $~lib/env/abort unreachable end - call $~lib/array/Array#join - i32.const 7240 - call $~lib/string/String.__eq + i32.const 5944 + i32.const 16 + i32.const 3 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#join_int + i32.const 5976 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14321,9 +14268,13 @@ call $~lib/env/abort unreachable end - call $~lib/array/Array#join - i32.const 7440 - call $~lib/string/String.__eq + i32.const 6072 + i32.const 22 + i32.const 3 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#join_int + i32.const 6112 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14334,10 +14285,9 @@ unreachable end global.get $std/array/randomStringsExpected - i32.const 4216 - call $~lib/array/Array#join - i32.const 7528 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 6208 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14347,11 +14297,13 @@ call $~lib/env/abort unreachable end - i32.const 7648 - i32.const 4216 - call $~lib/array/Array#join - i32.const 7656 - call $~lib/string/String.__eq + i32.const 6304 + i32.const 14 + i32.const 2 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#toString + i32.const 6328 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14361,10 +14313,28 @@ call $~lib/env/abort unreachable end + i32.const 2 + call $~lib/array/Array>#constructor + local.tee $0 + i32.const 0 + i32.const 6352 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#__set + local.get $0 + i32.const 1 + i32.const 6368 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#__set + local.get $0 + global.set $std/array/subarr32 global.get $std/array/subarr32 - call $~lib/array/Array>#join - i32.const 7744 - call $~lib/string/String.__eq + call $~lib/array/Array>#join_arr + i32.const 6384 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14374,10 +14344,39 @@ call $~lib/env/abort unreachable end + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 23 + call $~lib/runtime/doRegister + i32.const 2 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 2 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.const 6408 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#__set + local.get $0 + i32.const 1 + i32.const 6424 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#__set + local.get $0 + global.set $std/array/subarr8 global.get $std/array/subarr8 - call $~lib/array/Array>#join - i32.const 7744 - call $~lib/string/String.__eq + call $~lib/array/Array>#join_arr + i32.const 6384 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14387,10 +14386,49 @@ call $~lib/env/abort unreachable end + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 25 + call $~lib/runtime/doRegister + i32.const 1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 1 + i32.store offset=12 + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 24 + call $~lib/runtime/doRegister + i32.const 1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 1 + i32.store offset=12 + local.get $1 + i32.const 0 + i32.const 6440 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#__set + local.get $0 + i32.const 0 + local.get $1 + call $~lib/array/Array#__set + local.get $0 + global.set $std/array/subarrU32 global.get $std/array/subarrU32 - call $~lib/array/Array>>#join - i32.const 6784 - call $~lib/string/String.__eq + call $~lib/array/Array>>#join_arr + i32.const 5576 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14401,10 +14439,10 @@ unreachable end ) - (func $start (; 148 ;) (type $FUNCSIG$v) + (func $start (; 157 ;) (type $FUNCSIG$v) call $start:std/array ) - (func $null (; 149 ;) (type $FUNCSIG$v) + (func $null (; 158 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array.ts b/tests/compiler/std/array.ts index 551c369161..fb38652bcf 100644 --- a/tests/compiler/std/array.ts +++ b/tests/compiler/std/array.ts @@ -894,8 +894,8 @@ assertSorted>(reversedElements512, (a: Proxy, b: Proxy): i3 // Test sorting strings -var randomStringsActual: string[] = ["a", "b", "a", "ab", "ba", "", null]; -var randomStringsExpected: string[] = ["", "a", "a", "ab", "b", "ba", null]; +var randomStringsActual: (string | null)[] = ["a", "b", "a", "ab", "ba", "", null]; +var randomStringsExpected: (string | null)[] = ["", "a", "a", "ab", "b", "ba", null]; assertSorted(randomStringsActual); assert(isArraysEqual(randomStringsActual, randomStringsExpected)); @@ -913,7 +913,7 @@ assert(([1, 2, 3]).join("-") == "1-2-3"); assert(([i32.MIN_VALUE, i32.MIN_VALUE]).join("__") == "-2147483648__-2147483648"); assert(([0.0, 1.0, -2.0, NaN, -Infinity, Infinity]).join(", ") == "0.0, 1.0, -2.0, NaN, -Infinity, Infinity"); assert((["", "1", null]).join("") == "1"); -var refArr: Ref[] = [new Ref(), null, new Ref()]; +var refArr: (Ref | null)[] = [new Ref(), null, new Ref()]; assert(refArr.join() == "[object Object],,[object Object]"); // Array#toString ////////////////////////////////////////////////////////////////////////////////// diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index f450133d14..4ebd535244 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -1,355 +1,242 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) - (type $FUNCSIG$fii (func (param i32 i32) (result f32))) (type $FUNCSIG$d (func (result f64))) (type $FUNCSIG$vj (func (param i64))) (type $FUNCSIG$jj (func (param i64) (result i64))) (type $FUNCSIG$iff (func (param f32 f32) (result i32))) (type $FUNCSIG$if (func (param f32) (result i32))) (type $FUNCSIG$idd (func (param f64 f64) (result i32))) - (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$viiiii (func (param i32 i32 i32 i32 i32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) (type $FUNCSIG$iijijiji (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $FUNCSIG$iiid (func (param i32 i32 f64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (type $FUNCSIG$iiij (func (param i32 i32 i64) (result i32))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 40) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 104) "\03\00\00\00a\00b\00c\00") - (data (i32.const 120) "\0c\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 152) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 216) "\05\00\00\00\00\00\00\00\01\02\03\04\05\00\00\00") - (data (i32.const 232) "\d8\00\00\00\05\00\00\00") - (data (i32.const 240) "\05\00\00\00\00\00\00\00\01\01\01\04\05\00\00\00") - (data (i32.const 256) "\f0\00\00\00\05\00\00\00") - (data (i32.const 264) "\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 280) "\08\01\00\00\05\00\00\00") - (data (i32.const 288) "\05\00\00\00\00\00\00\00\01\01\00\00\00\00\00\00") - (data (i32.const 304) " \01\00\00\05\00\00\00") - (data (i32.const 312) "\05\00\00\00\00\00\00\00\01\01\00\02\02\00\00\00") - (data (i32.const 328) "8\01\00\00\05\00\00\00") - (data (i32.const 336) "\05\00\00\00\00\00\00\00\01\01\00\02\02\00\00\00") - (data (i32.const 352) "P\01\00\00\05\00\00\00") - (data (i32.const 360) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 392) "h\01\00\00\05\00\00\00") - (data (i32.const 400) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 432) "\90\01\00\00\05\00\00\00") - (data (i32.const 440) "\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 472) "\b8\01\00\00\05\00\00\00") - (data (i32.const 480) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 512) "\e0\01\00\00\05\00\00\00") - (data (i32.const 520) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 552) "\08\02\00\00\05\00\00\00") - (data (i32.const 560) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 592) "0\02\00\00\05\00\00\00") - (data (i32.const 600) "\00\00\00\00\00\00\00\00") - (data (i32.const 608) "X\02\00\00\00\00\00\00") - (data (i32.const 616) "\00\00\00\00\00\00\00\00") - (data (i32.const 624) "h\02\00\00\00\00\00\00") - (data (i32.const 632) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 664) "x\02\00\00\05\00\00\00") - (data (i32.const 672) "\14\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 704) "\a0\02\00\00\05\00\00\00") - (data (i32.const 712) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 744) "\c8\02\00\00\05\00\00\00") - (data (i32.const 752) "\14\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 784) "\f0\02\00\00\05\00\00\00") - (data (i32.const 792) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 824) "\18\03\00\00\05\00\00\00") - (data (i32.const 832) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 864) "@\03\00\00\05\00\00\00") - (data (i32.const 872) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 904) "h\03\00\00\05\00\00\00") - (data (i32.const 912) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 944) "\90\03\00\00\05\00\00\00") - (data (i32.const 952) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 984) "\b8\03\00\00\05\00\00\00") - (data (i32.const 992) "\14\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1024) "\e0\03\00\00\05\00\00\00") - (data (i32.const 1032) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1064) "\08\04\00\00\05\00\00\00") - (data (i32.const 1072) "\14\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1104) "0\04\00\00\05\00\00\00") - (data (i32.const 1112) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1144) "X\04\00\00\05\00\00\00") - (data (i32.const 1152) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1184) "\80\04\00\00\05\00\00\00") - (data (i32.const 1192) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1224) "\a8\04\00\00\05\00\00\00") - (data (i32.const 1232) "\14\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1264) "\d0\04\00\00\05\00\00\00") - (data (i32.const 1272) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1304) "\f8\04\00\00\05\00\00\00") - (data (i32.const 1312) "\14\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1344) " \05\00\00\05\00\00\00") - (data (i32.const 1352) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1384) "H\05\00\00\05\00\00\00") - (data (i32.const 1392) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1424) "p\05\00\00\05\00\00\00") - (data (i32.const 1432) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1464) "\98\05\00\00\05\00\00\00") - (data (i32.const 1472) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1504) "\c0\05\00\00\05\00\00\00") - (data (i32.const 1512) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1544) "\e8\05\00\00\05\00\00\00") - (data (i32.const 1552) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1584) "\10\06\00\00\05\00\00\00") - (data (i32.const 1592) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1624) "8\06\00\00\05\00\00\00") - (data (i32.const 1632) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1664) "`\06\00\00\05\00\00\00") - (data (i32.const 1672) "\00\00\00\00\00\00\00\00") - (data (i32.const 1680) "\88\06\00\00\00\00\00\00") - (data (i32.const 1688) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1720) "\98\06\00\00\05\00\00\00") - (data (i32.const 1728) "\0c\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1760) "\c0\06\00\00\03\00\00\00") - (data (i32.const 1768) "\08\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 1784) "\e8\06\00\00\02\00\00\00") - (data (i32.const 1792) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1824) "\00\07\00\00\05\00\00\00") - (data (i32.const 1832) "\08\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00") - (data (i32.const 1848) "(\07\00\00\02\00\00\00") - (data (i32.const 1856) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1888) "@\07\00\00\03\00\00\00") - (data (i32.const 1896) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1928) "h\07\00\00\05\00\00\00") - (data (i32.const 1936) "\04\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 1952) "\90\07\00\00\01\00\00\00") - (data (i32.const 1960) "\10\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1992) "\a8\07\00\00\04\00\00\00") - (data (i32.const 2000) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2032) "\d0\07\00\00\05\00\00\00") - (data (i32.const 2040) "\04\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2056) "\f8\07\00\00\01\00\00\00") - (data (i32.const 2064) "\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2096) "\10\08\00\00\04\00\00\00") - (data (i32.const 2104) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2136) "8\08\00\00\05\00\00\00") - (data (i32.const 2144) "\08\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2160) "`\08\00\00\02\00\00\00") - (data (i32.const 2168) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2200) "x\08\00\00\03\00\00\00") - (data (i32.const 2208) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2240) "\a0\08\00\00\05\00\00\00") - (data (i32.const 2248) "\04\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00") - (data (i32.const 2264) "\c8\08\00\00\01\00\00\00") - (data (i32.const 2272) "\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2304) "\e0\08\00\00\04\00\00\00") - (data (i32.const 2312) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2344) "\08\t\00\00\05\00\00\00") - (data (i32.const 2352) "\04\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 2368) "0\t\00\00\01\00\00\00") - (data (i32.const 2376) "\10\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2408) "H\t\00\00\04\00\00\00") - (data (i32.const 2416) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2448) "p\t\00\00\05\00\00\00") - (data (i32.const 2456) "\00\00\00\00\00\00\00\00") - (data (i32.const 2464) "\98\t\00\00\00\00\00\00") - (data (i32.const 2472) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2504) "\a8\t\00\00\05\00\00\00") - (data (i32.const 2512) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2544) "\d0\t\00\00\05\00\00\00") - (data (i32.const 2552) "\00\00\00\00\00\00\00\00") - (data (i32.const 2560) "\f8\t\00\00\00\00\00\00") - (data (i32.const 2568) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2600) "\08\n\00\00\05\00\00\00") - (data (i32.const 2608) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2640) "0\n\00\00\05\00\00\00") - (data (i32.const 2648) "\00\00\00\00\00\00\00\00") - (data (i32.const 2656) "X\n\00\00\00\00\00\00") - (data (i32.const 2664) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2696) "h\n\00\00\05\00\00\00") - (data (i32.const 2704) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2736) "\90\n\00\00\05\00\00\00") - (data (i32.const 2744) "\00\00\00\00\00\00\00\00") - (data (i32.const 2752) "\b8\n\00\00\00\00\00\00") - (data (i32.const 2760) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2792) "\c8\n\00\00\05\00\00\00") - (data (i32.const 2800) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2832) "\f0\n\00\00\05\00\00\00") - (data (i32.const 2840) "\00\00\00\00\00\00\00\00") - (data (i32.const 2848) "\18\0b\00\00\00\00\00\00") - (data (i32.const 2856) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2888) "(\0b\00\00\05\00\00\00") - (data (i32.const 2896) "\0c\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") - (data (i32.const 2928) "V\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?\00") - (data (i32.const 3104) " \00\00\00\00\00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3168) " \0c\00\00\08\00\00\00") - (data (i32.const 3176) " \00\00\00\00\00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3240) "h\0c\00\00\08\00\00\00") - (data (i32.const 3248) "@\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3376) "\b0\0c\00\00\08\00\00\00") - (data (i32.const 3384) "@\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3512) "8\0d\00\00\08\00\00\00") - (data (i32.const 3520) "\14\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 3552) "\c0\0d\00\00\05\00\00\00") - (data (i32.const 3560) "\14\00\00\00\00\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 3592) "\e8\0d\00\00\05\00\00\00") - (data (i32.const 3600) "\14\00\00\00\00\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 3632) "\10\0e\00\00\05\00\00\00") - (data (i32.const 3640) "\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00") - (data (i32.const 3672) "8\0e\00\00\05\00\00\00") - (data (i32.const 3680) "\00\00\00\00\00\00\00\00") - (data (i32.const 3688) "`\0e\00\00\00\00\00\00") - (data (i32.const 3696) "\04\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 3712) "p\0e\00\00\01\00\00\00") - (data (i32.const 3720) "\08\00\00\00\00\00\00\00\02\00\00\00\01\00\00\00") - (data (i32.const 3736) "\88\0e\00\00\02\00\00\00") - (data (i32.const 3744) "\10\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3776) "\a0\0e\00\00\04\00\00\00") - (data (i32.const 3784) "\10\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3816) "\c8\0e\00\00\04\00\00\00") - (data (i32.const 3824) "\04\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 3840) "\f0\0e\00\00\01\00\00\00") - (data (i32.const 3848) "\08\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 3864) "\08\0f\00\00\02\00\00\00") - (data (i32.const 3872) "\01\00\00\00a\00") - (data (i32.const 3880) "\01\00\00\00b\00") - (data (i32.const 3888) "\02\00\00\00a\00b\00") - (data (i32.const 3896) "\02\00\00\00b\00a\00") - (data (i32.const 3904) "\00\00\00\00") - (data (i32.const 3912) "\1c\00\00\00\00\00\00\00 \0f\00\00(\0f\00\00 \0f\00\000\0f\00\008\0f\00\00@\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3976) "H\0f\00\00\07\00\00\00") - (data (i32.const 3984) "\1c\00\00\00\00\00\00\00@\0f\00\00 \0f\00\00 \0f\00\000\0f\00\00(\0f\00\008\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4048) "\90\0f\00\00\07\00\00\00") - (data (i32.const 4056) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 4088) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 4144) "\04\00\00\00n\00u\00l\00l\00") - (data (i32.const 4160) "\02\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 4176) "@\10\00\00\02\00\00\00") - (data (i32.const 4184) "\04\00\00\00t\00r\00u\00e\00") - (data (i32.const 4200) "\05\00\00\00f\00a\00l\00s\00e\00") - (data (i32.const 4216) "\01\00\00\00,\00") - (data (i32.const 4224) "\02\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 4240) "\80\10\00\00\02\00\00\00") - (data (i32.const 4248) "\n\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e\00") - (data (i32.const 4272) "\0c\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4304) "\b0\10\00\00\03\00\00\00") - (data (i32.const 4312) "\01\00\00\000\00") - (data (i32.const 4320) "\90\01\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4832) "\e0\10\00\00d\00\00\00") - (data (i32.const 4840) "\0c\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4872) "\e8\12\00\00\03\00\00\00") - (data (i32.const 4880) "\05\00\00\001\00-\002\00-\003\00") - (data (i32.const 4896) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4928) " \13\00\00\03\00\00\00") - (data (i32.const 4936) "\01\00\00\00-\00") - (data (i32.const 4944) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4976) "P\13\00\00\03\00\00\00") - (data (i32.const 4984) "\08\00\00\00\00\00\00\00\00\00\00\80\00\00\00\80") - (data (i32.const 5000) "x\13\00\00\02\00\00\00") - (data (i32.const 5008) "\02\00\00\00_\00_\00") - (data (i32.const 5016) "\08\00\00\00\00\00\00\00\00\00\00\80\00\00\00\80") - (data (i32.const 5032) "\98\13\00\00\02\00\00\00") - (data (i32.const 5040) "\18\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 5096) "0\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\00\00") - (data (i32.const 5160) "\e8\13\00\00\06\00\00\00") - (data (i32.const 5168) "\02\00\00\00,\00 \00") - (data (i32.const 5176) "\03\00\00\000\00.\000\00") - (data (i32.const 5192) "\03\00\00\00N\00a\00N\00") - (data (i32.const 5208) "\t\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 5232) "\08\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 5256) "\b8\02\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\00*\00&\00$\00%\00^\00@\00#\00!\00?\00") + (data (i32.const 2504) "\02\00\00\00 \00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") + (data (i32.const 2544) "\t\00\00\00\10\00\00\00\d0\t\00\00\d0\t\00\00 \00\00\00\08\00\00\00") + (data (i32.const 2568) "\02\00\00\00 \00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") + (data (i32.const 2608) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") + (data (i32.const 2680) "\n\00\00\00\10\00\00\008\n\00\008\n\00\00@\00\00\00\08\00\00\00") + (data (i32.const 2704) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") + (data (i32.const 2776) "\02\00\00\00\14\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02\00\00\00") + (data (i32.const 2808) "\04\00\00\00\10\00\00\00\e0\n\00\00\e0\n\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 2832) "\02\00\00\00\14\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 2864) "\02\00\00\00\14\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02\00\00\00") + (data (i32.const 2896) "\08\00\00\00\10\00\00\008\0b\00\008\0b\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 2920) "\02\00\00\00\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") + (data (i32.const 2952) "\02\00\00\00\00\00\00\00") + (data (i32.const 2960) "\04\00\00\00\10\00\00\00\90\0b\00\00\90\0b\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2984) "\02\00\00\00\04\00\00\00\01\00\00\00") + (data (i32.const 3000) "\04\00\00\00\10\00\00\00\b0\0b\00\00\b0\0b\00\00\04\00\00\00\01\00\00\00") + (data (i32.const 3024) "\02\00\00\00\08\00\00\00\02\00\00\00\01\00\00\00") + (data (i32.const 3040) "\04\00\00\00\10\00\00\00\d8\0b\00\00\d8\0b\00\00\08\00\00\00\02\00\00\00") + (data (i32.const 3064) "\02\00\00\00\10\00\00\00\03\00\00\00\02\00\00\00\01\00\00\00\00\00\00\00") + (data (i32.const 3088) "\04\00\00\00\10\00\00\00\00\0c\00\00\00\0c\00\00\10\00\00\00\04\00\00\00") + (data (i32.const 3112) "\02\00\00\00\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 3136) "\04\00\00\00\10\00\00\000\0c\00\000\0c\00\00\10\00\00\00\04\00\00\00") + (data (i32.const 3160) "\02\00\00\00\04\00\00\00\01\00\00\00") + (data (i32.const 3176) "\02\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 3192) "\01\00\00\00\02\00\00\00a\00") + (data (i32.const 3208) "\01\00\00\00\02\00\00\00b\00") + (data (i32.const 3224) "\01\00\00\00\04\00\00\00a\00b\00") + (data (i32.const 3240) "\01\00\00\00\04\00\00\00b\00a\00") + (data (i32.const 3256) "\01\00\00\00\00\00\00\00") + (data (i32.const 3264) "\02\00\00\00\1c\00\00\00\80\0c\00\00\90\0c\00\00\80\0c\00\00\a0\0c\00\00\b0\0c\00\00\c0\0c\00\00\00\00\00\00") + (data (i32.const 3304) "\0e\00\00\00\10\00\00\00\c8\0c\00\00\c8\0c\00\00\1c\00\00\00\07\00\00\00") + (data (i32.const 3328) "\02\00\00\00\1c\00\00\00\c0\0c\00\00\80\0c\00\00\80\0c\00\00\a0\0c\00\00\90\0c\00\00\b0\0c\00\00\00\00\00\00") + (data (i32.const 3368) "\0e\00\00\00\10\00\00\00\08\0d\00\00\08\0d\00\00\1c\00\00\00\07\00\00\00") + (data (i32.const 3392) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 3432) "\01\00\00\00\08\00\00\00n\00u\00l\00l\00") + (data (i32.const 3448) "\02\00\00\00\02\00\00\00\01\00") + (data (i32.const 3464) "\01\00\00\00\08\00\00\00t\00r\00u\00e\00") + (data (i32.const 3480) "\01\00\00\00\n\00\00\00f\00a\00l\00s\00e\00") + (data (i32.const 3504) "\01\00\00\00\02\00\00\00,\00") + (data (i32.const 3520) "\02\00\00\00\02\00\00\00\01\00") + (data (i32.const 3536) "\01\00\00\00\14\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e\00") + (data (i32.const 3568) "\02\00\00\00\0c\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 3592) "\01\00\00\00\02\00\00\000\00") + (data (i32.const 3608) "\02\00\00\00\90\01\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") + (data (i32.const 4016) "\08\00\00\00\10\00\00\00 \0e\00\00 \0e\00\00\90\01\00\00d\00\00\00") + (data (i32.const 4040) "\02\00\00\00\0c\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 4064) "\01\00\00\00\n\00\00\001\00-\002\00-\003\00") + (data (i32.const 4088) "\02\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 4112) "\01\00\00\00\02\00\00\00-\00") + (data (i32.const 4128) "\02\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 4152) "\02\00\00\00\08\00\00\00\00\00\00\80\00\00\00\80") + (data (i32.const 4168) "\01\00\00\00\04\00\00\00_\00_\00") + (data (i32.const 4184) "\02\00\00\00\08\00\00\00\00\00\00\80\00\00\00\80") + (data (i32.const 4200) "\01\00\00\000\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008\00") + (data (i32.const 4256) "\02\00\00\000\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") + (data (i32.const 4312) "\01\00\00\00\04\00\00\00,\00 \00") + (data (i32.const 4328) "\01\00\00\00\06\00\00\000\00.\000\00") + (data (i32.const 4344) "\01\00\00\00\06\00\00\00N\00a\00N\00") + (data (i32.const 4360) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") + (data (i32.const 4392) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") + (data (i32.const 4416) "\02\00\00\00\b8\02\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/internal/sort/COMPARATOR~anonymous|0) + (elem (i32.const 0) $null $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|4 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|18 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|30 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|34 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|38 $start:std/array~anonymous|39 $start:std/array~anonymous|40 $start:std/array~anonymous|41 $start:std/array~anonymous|42 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR~anonymous|0) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/num (mut i32) (i32.const 1)) (global $std/array/Null (mut i32) (i32.const 0)) (global $std/array/str (mut i32) (i32.const 104)) - (global $std/array/arr8 (mut i32) (i32.const 232)) + (global $std/array/arr8 (mut i32) (i32.const 168)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $std/array/arr32 (mut i32) (i32.const 392)) + (global $std/array/arr32 (mut i32) (i32.const 304)) (global $std/array/i (mut i32) (i32.const 0)) (global $std/array/other (mut i32) (i32.const 0)) (global $std/array/out (mut i32) (i32.const 0)) - (global $std/array/source (mut i32) (i32.const 624)) + (global $std/array/source (mut i32) (i32.const 544)) (global $std/array/cwArr (mut i32) (i32.const 0)) (global $std/array/includes (mut i32) (i32.const 0)) - (global $std/array/sarr (mut i32) (i32.const 1624)) + (global $std/array/sarr (mut i32) (i32.const 1368)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/every (mut i32) (i32.const 0)) (global $std/array/some (mut i32) (i32.const 0)) (global $std/array/newArr (mut i32) (i32.const 0)) @@ -360,16 +247,16 @@ (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) (global $~lib/math/random_state0_32 (mut i32) (i32.const 0)) (global $~lib/math/random_state1_32 (mut i32) (i32.const 0)) - (global $std/array/charset i32 (i32.const 2928)) - (global $std/array/f32ArrayTyped (mut i32) (i32.const 3168)) - (global $std/array/f64ArrayTyped (mut i32) (i32.const 3376)) - (global $std/array/i32ArrayTyped (mut i32) (i32.const 3552)) - (global $std/array/u32ArrayTyped (mut i32) (i32.const 3632)) - (global $std/array/reversed0 (mut i32) (i32.const 3688)) - (global $std/array/reversed1 (mut i32) (i32.const 3712)) - (global $std/array/reversed2 (mut i32) (i32.const 3736)) - (global $std/array/reversed4 (mut i32) (i32.const 3776)) - (global $std/array/expected4 (mut i32) (i32.const 3816)) + (global $std/array/charset i32 (i32.const 2328)) + (global $std/array/f32ArrayTyped (mut i32) (i32.const 2552)) + (global $std/array/f64ArrayTyped (mut i32) (i32.const 2688)) + (global $std/array/i32ArrayTyped (mut i32) (i32.const 2816)) + (global $std/array/u32ArrayTyped (mut i32) (i32.const 2904)) + (global $std/array/reversed0 (mut i32) (i32.const 2968)) + (global $std/array/reversed1 (mut i32) (i32.const 3008)) + (global $std/array/reversed2 (mut i32) (i32.const 3048)) + (global $std/array/reversed4 (mut i32) (i32.const 3096)) + (global $std/array/expected4 (mut i32) (i32.const 3144)) (global $std/array/reversed64 (mut i32) (i32.const 0)) (global $std/array/reversed128 (mut i32) (i32.const 0)) (global $std/array/reversed1024 (mut i32) (i32.const 0)) @@ -379,44 +266,32 @@ (global $std/array/randomized257 (mut i32) (i32.const 0)) (global $std/array/reversedNested512 (mut i32) (i32.const 0)) (global $std/array/reversedElements512 (mut i32) (i32.const 0)) - (global $std/array/randomStringsActual (mut i32) (i32.const 3976)) - (global $std/array/randomStringsExpected (mut i32) (i32.const 4048)) + (global $std/array/randomStringsActual (mut i32) (i32.const 3312)) + (global $std/array/randomStringsExpected (mut i32) (i32.const 3376)) (global $std/array/randomStrings400 (mut i32) (i32.const 0)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) - (global $~lib/internal/number/_frc_plus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_frc_minus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_exp (mut i32) (i32.const 0)) - (global $~lib/internal/number/_K (mut i32) (i32.const 0)) - (global $~lib/internal/number/_frc_pow (mut i64) (i64.const 0)) - (global $~lib/internal/number/_exp_pow (mut i32) (i32.const 0)) + (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) + (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp (mut i32) (i32.const 0)) + (global $~lib/util/number/_K (mut i32) (i32.const 0)) + (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) (global $std/array/refArr (mut i32) (i32.const 0)) (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) (global $~lib/builtins/i64.MAX_VALUE i64 (i64.const 9223372036854775807)) - (global $std/array/subarr32 (mut i32) (i32.const 7736)) - (global $std/array/subarr8 (mut i32) (i32.const 7832)) - (global $std/array/subarrU32 (mut i32) (i32.const 7904)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 7912)) + (global $std/array/subarr32 (mut i32) (i32.const 0)) + (global $std/array/subarr8 (mut i32) (i32.const 0)) + (global $std/array/subarrU32 (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 6444)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 2 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - i32.const 8 + global.get $~lib/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -424,518 +299,474 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 + return ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 5 ;) (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 $2 i32) local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 40 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end + call $~lib/runtime/ADJUSTOBLOCK + call $~lib/memory/memory.allocate local.set $1 local.get $1 - local.get $0 + global.get $~lib/runtime/HEADER_MAGIC i32.store local.get $1 - ) - (func $~lib/memory/memory.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate - return + i32.store offset=4 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add ) - (func $~lib/internal/memory/memset (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - end - br $continue|0 - end + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 1 + i32.add + local.get $1 + i32.store8 + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 end - end - ) - (func $~lib/array/Array#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 268435454 - i32.gt_u - if i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $4 + local.get $0 + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store + local.get $2 i32.const 8 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end local.get $0 - i32.eqz + i32.const 4 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 12 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 24 + i32.le_u if - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 + br $~lib/util/memory/memset|inlined.0 end local.get $0 - i32.const 0 + i32.const 12 + i32.add + local.get $4 i32.store local.get $0 - i32.const 0 - i32.store offset=4 + i32.const 16 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 24 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 20 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.get $4 + i32.store + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $3 local.get $0 - end - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.0 local.get $3 - i32.const 8 i32.add - local.set $4 - i32.const 0 - local.set $5 + local.set $0 local.get $2 - local.set $6 + local.get $3 + i32.sub + local.set $2 local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset + i64.extend_i32_u + local.get $4 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $5 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $5 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $5 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + end + br $continue|0 + end + end + end end - local.get $0 ) - (func $~lib/array/Array.isArray | null> (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - if (result i32) - local.get $0 + (func $~lib/runtime/assertUnregistered (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if i32.const 0 - i32.ne - else - i32.const 1 + i32.const 16 + i32.const 191 + i32.const 2 + call $~lib/env/abort + unreachable end - ) - (func $~lib/array/Array.isArray> (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - if (result i32) - local.get $0 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if i32.const 0 - i32.ne - else - i32.const 1 + i32.const 16 + i32.const 192 + i32.const 2 + call $~lib/env/abort + unreachable end ) - (func $std/array/P#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doRegister (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.eqz + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH + i32.gt_u if i32.const 0 - call $~lib/memory/memory.allocate - local.set $0 + i32.const 56 + i32.const 24 + i32.const 43 + call $~lib/env/abort + unreachable + end + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end + local.set $3 + local.get $3 + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + block $~lib/runtime/REGISTER|inlined.0 (result i32) + local.get $3 + local.set $2 + local.get $2 + i32.const 2 + call $~lib/runtime/doRegister end - local.get $0 ) - (func $~lib/array/Array.isArray

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

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

(; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 - i32.lt_s if (result i32) - local.get $5 - local.get $2 - i32.add - local.tee $6 + local.get $0 i32.const 0 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select + i32.ne else - local.get $2 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.lt_s - select - end - local.set $2 - local.get $3 - i32.const 0 - i32.lt_s - if (result i32) - local.get $5 - local.get $3 - i32.add - local.tee $6 i32.const 0 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - else - local.get $3 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.lt_s - select - end - local.set $3 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $4 - local.get $2 - i32.add - i32.const 8 - i32.add - local.set $6 - local.get $1 - local.set $7 - local.get $3 - local.get $2 - i32.sub - local.set $8 - local.get $6 - local.get $7 - local.get $8 - call $~lib/internal/memory/memset end - local.get $0 ) - (func $~lib/array/Array#__get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 0 - i32.shr_u - i32.lt_u if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 0 - i32.shl - i32.add - local.get $5 - i32.add - i32.load8_u offset=8 + local.get $0 else - unreachable - end - ) - (func $std/array/isArraysEqual (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $2 - i32.eqz - if - block $~lib/array/Array#get:length|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + i32.const 12 + call $~lib/runtime/ALLOCATE local.set $2 local.get $2 - block $~lib/array/Array#get:length|inlined.2 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end - i32.ne - if - i32.const 0 - return - end - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end + i32.const 6 + call $~lib/runtime/doRegister end - block $break|0 - i32.const 0 - local.set $3 - loop $repeat|0 - local.get $3 - local.get $2 - i32.lt_s - i32.eqz - br_if $break|0 - local.get $0 - local.get $3 - call $~lib/array/Array#__get - i32.const 255 - i32.and - local.get $1 - local.get $3 - call $~lib/array/Array#__get - i32.const 255 - i32.and - i32.ne - if - i32.const 0 - return - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $repeat|0 - unreachable - end - unreachable + local.get $1 + i32.const 0 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + ) + (func $~lib/array/Array.isArray (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + if (result i32) + local.get $0 + i32.const 0 + i32.ne + else + i32.const 0 end - i32.const 1 ) - (func $~lib/array/Array#fill|trampoline (; 21 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $3 + (func $~lib/array/Array.isArray (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + if (result i32) + local.get $0 + i32.const 0 + i32.ne + else + i32.const 0 + end + ) + (func $~lib/array/Array.isArray (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + if (result i32) + local.get $0 + i32.const 0 + i32.ne + else + i32.const 0 end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/array/Array#fill ) - (func $~lib/array/Array#fill (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 20 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $0 - i32.load + i32.load offset=4 local.set $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $5 local.get $2 i32.const 0 @@ -1275,174 +972,28 @@ select end local.set $3 - block $break|0 - loop $repeat|0 - local.get $2 - local.get $3 - i32.lt_s - i32.eqz - br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $4 - local.set $6 - local.get $2 - local.set $7 - local.get $1 - local.set $8 - i32.const 0 - local.set $9 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $repeat|0 - unreachable - end - unreachable - end - local.get $0 - ) - (func $~lib/array/Array#__get (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) + local.get $3 + i32.lt_s + if + local.get $4 local.get $2 - local.set $3 + i32.add local.get $1 - local.set $4 - i32.const 0 - local.set $5 local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $std/array/isArraysEqual (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $2 - i32.eqz - if - block $~lib/array/Array#get:length|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end - local.set $2 local.get $2 - block $~lib/array/Array#get:length|inlined.2 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end - i32.ne - if - i32.const 0 - return - end - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - end - block $break|0 - i32.const 0 - local.set $3 - loop $repeat|0 - local.get $3 - local.get $2 - i32.lt_s - i32.eqz - br_if $break|0 - local.get $0 - local.get $3 - call $~lib/array/Array#__get - local.get $1 - local.get $3 - call $~lib/array/Array#__get - i32.ne - if - i32.const 0 - return - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $repeat|0 - unreachable - end - unreachable - end - i32.const 1 - ) - (func $~lib/array/Array#fill|trampoline (; 25 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $3 + i32.sub + call $~lib/memory/memory.fill end local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/array/Array#fill ) - (func $std/array/internalCapacity (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $1 - local.get $1 - i32.load - i32.const 2 - i32.shr_s + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 ) - (func $~lib/internal/memory/memcpy (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2058,11 +1609,83 @@ end unreachable end - end - local.get $2 - i32.const 16 - i32.and - if + end + local.get $2 + i32.const 16 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 block (result i32) local.get $0 local.tee $5 @@ -2279,6 +1902,65 @@ end i32.load8_u i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 block (result i32) local.get $0 local.tee $5 @@ -2351,11 +2033,6 @@ end i32.load8_u i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if block (result i32) local.get $0 local.tee $5 @@ -2374,6 +2051,11 @@ end i32.load8_u i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if block (result i32) local.get $0 local.tee $5 @@ -2446,6 +2128,11 @@ end i32.load8_u i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if block (result i32) local.get $0 local.tee $5 @@ -2482,6 +2169,11 @@ end i32.load8_u i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if block (result i32) local.get $0 local.tee $5 @@ -2498,716 +2190,811 @@ local.set $1 local.get $5 end - i32.load8_u - i32.store8 + i32.load8_u + i32.store8 + end + ) + (func $~lib/memory/memory.copy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + local.tee $3 + if (result i32) + local.get $3 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + end + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 + if + block + block (result i32) + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + end + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|2 + end + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end end + ) + (func $~lib/runtime/doWrapArray (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 16 + call $~lib/runtime/doAllocate + local.get $1 + call $~lib/runtime/doRegister + local.set $3 + local.get $0 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + local.get $1 + call $~lib/runtime/doRegister + local.set $5 + local.get $3 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store offset=8 + local.get $3 + local.get $4 local.get $2 - i32.const 4 - i32.and + i32.shr_u + i32.store offset=12 + local.get $5 + local.get $0 + local.get $4 + call $~lib/memory/memory.copy + local.get $3 + ) + (func $~lib/array/Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $std/array/isArraysEqual (; 26 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $2 + i32.eqz if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 + local.get $0 + call $~lib/array/Array#get:length + local.set $2 + local.get $2 + local.get $1 + call $~lib/array/Array#get:length + i32.ne + if + i32.const 0 + return end - block (result i32) - local.get $1 - local.tee $5 + local.get $0 + local.get $1 + i32.eq + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return end - i32.load8_u - i32.store8 - block (result i32) + end + block $break|0 + i32.const 0 + local.set $3 + loop $repeat|0 + local.get $3 + local.get $2 + i32.lt_s + i32.eqz + br_if $break|0 local.get $0 + local.tee $4 + i32.load offset=4 + local.get $3 local.tee $5 - i32.const 1 i32.add - local.set $0 + i32.const -1 local.get $5 - end - block (result i32) + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load8_u local.get $1 + local.tee $4 + i32.load offset=4 + local.get $3 local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 i32.add - local.set $0 + i32.const -1 local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load8_u + i32.ne + if + i32.const 0 + return + end + local.get $3 i32.const 1 i32.add - local.set $1 - local.get $5 + local.set $3 + br $repeat|0 + unreachable end - i32.load8_u - i32.store8 + unreachable end + i32.const 1 + ) + (func $~lib/array/Array#fill (; 27 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=12 + local.set $5 local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 + i32.const 0 + i32.lt_s + if (result i32) + local.get $5 + local.get $2 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + else + local.get $2 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + end + local.set $2 + local.get $3 + i32.const 0 + i32.lt_s + if (result i32) + local.get $5 + local.get $3 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + else + local.get $3 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 + local.set $3 + block $break|0 + loop $repeat|0 + local.get $2 + local.get $3 + i32.lt_s + i32.eqz + br_if $break|0 + local.get $4 + local.get $2 + i32.const 2 + i32.shl i32.add - local.set $0 - local.get $5 - end - block (result i32) local.get $1 - local.tee $5 + i32.store + local.get $2 i32.const 1 i32.add - local.set $1 - local.get $5 + local.set $2 + br $repeat|0 + unreachable end - i32.load8_u - i32.store8 + unreachable end + local.get $0 ) - (func $~lib/internal/memory/memmove (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) + (func $~lib/array/Array#get:length (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 + i32.load offset=12 + ) + (func $std/array/isArraysEqual (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end + i32.eqz if local.get $0 - local.get $1 + call $~lib/array/Array#get:length + local.set $2 local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq + call $~lib/array/Array#get:length + i32.ne if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - end - i32.load8_u - i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - br $continue|1 - end - end - end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|2 - end - end + i32.const 0 + return end - else - local.get $1 - i32.const 7 - i32.and local.get $0 - i32.const 7 - i32.and + local.get $1 i32.eq if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - end - br $continue|3 - end - end - end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 - end - end - end + i32.const 1 + return end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end + end + block $break|0 + i32.const 0 + local.set $3 + loop $repeat|0 + local.get $3 + local.get $2 + i32.lt_s + i32.eqz + br_if $break|0 + local.get $0 + local.tee $4 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load + local.get $1 + local.tee $4 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load + i32.ne + if + i32.const 0 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $repeat|0 + unreachable end + unreachable end + i32.const 1 + ) + (func $~lib/array/Array#get:length (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $std/array/internalCapacity (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + local.set $1 + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 2 + i32.shr_s ) - (func $~lib/allocator/arena/__memory_free (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) - nop + (func $~lib/memory/memory.free (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + local.set $1 ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doReallocate (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $0 - i32.load + global.get $~lib/runtime/HEADER_SIZE + i32.sub local.set $2 - local.get $1 local.get $2 - i32.gt_s + i32.load offset=4 + local.set $3 + local.get $3 + local.get $1 + i32.lt_u if local.get $1 - i32.const 1073741816 - i32.le_s - i32.eqz - if - i32.const 0 - i32.const 40 - i32.const 40 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - local.get $2 - call $~lib/internal/arraybuffer/computeSize - i32.const 8 - i32.sub - i32.le_s + call $~lib/runtime/ADJUSTOBLOCK + local.set $4 + local.get $3 + call $~lib/runtime/ADJUSTOBLOCK + i32.const 0 + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + select + local.get $4 + i32.lt_u if - local.get $0 - local.get $1 + local.get $4 + call $~lib/memory/memory.allocate + local.set $5 + local.get $5 + local.get $2 + i32.load i32.store - else + local.get $5 + global.get $~lib/runtime/HEADER_SIZE + i32.add + local.set $6 + local.get $6 + local.get $0 + local.get $3 + call $~lib/memory/memory.copy + local.get $6 + local.get $3 + i32.add + i32.const 0 local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.copy|inlined.0 - local.get $3 - i32.const 8 - i32.add - local.set $4 + local.get $3 + i32.sub + call $~lib/memory/memory.fill + local.get $2 + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + if local.get $0 - i32.const 8 - i32.add - local.set $5 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 100 + i32.const 8 + call $~lib/env/abort + unreachable + end local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memmove - end - block $~lib/memory/memory.free|inlined.0 - local.get $0 - local.set $6 - local.get $6 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 + call $~lib/memory/memory.free + else + nop end - local.get $3 + local.get $5 + local.set $2 + local.get $6 local.set $0 - end - block $~lib/memory/memory.fill|inlined.3 + else local.get $0 - i32.const 8 - i32.add - local.get $2 + local.get $3 i32.add - local.set $3 i32.const 0 - local.set $6 local.get $1 - local.get $2 - i32.sub - local.set $5 local.get $3 - local.get $6 - local.get $5 - call $~lib/internal/memory/memset + i32.sub + call $~lib/memory/memory.fill end else - local.get $1 - local.get $2 - i32.lt_s - if - local.get $1 - i32.const 0 - i32.ge_s - i32.eqz - if - i32.const 0 - i32.const 40 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - i32.store - end + nop end + local.get $2 + local.get $1 + i32.store offset=4 local.get $0 ) - (func $~lib/array/Array#push (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/array/ensureLength (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - i32.load offset=4 - local.set $2 local.get $0 i32.load local.set $3 local.get $3 - i32.load - i32.const 2 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.get $2 i32.shr_u local.set $4 - local.get $2 - i32.const 1 - i32.add - local.set $5 - local.get $2 + local.get $1 local.get $4 - i32.ge_u + i32.gt_u if + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH local.get $2 - i32.const 268435454 - i32.ge_u + i32.shr_u + i32.gt_u if i32.const 0 - i32.const 8 - i32.const 182 - i32.const 42 + i32.const 488 + i32.const 12 + i32.const 59 call $~lib/env/abort unreachable end - local.get $3 - local.get $5 - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store - end - local.get $0 - local.get $5 - i32.store offset=4 - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $3 - local.set $6 - local.get $2 - local.set $7 local.get $1 - local.set $8 - i32.const 0 - local.set $9 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 - end - local.get $5 - ) - (func $~lib/array/Array#__get (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 + i32.shl local.set $5 + block $~lib/runtime/REALLOCATE|inlined.0 (result i32) + local.get $3 + local.set $6 + local.get $5 + local.set $7 + local.get $6 + local.get $7 + call $~lib/runtime/doReallocate + end + local.set $7 + local.get $7 local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add + i32.ne + if + local.get $0 + local.get $7 + i32.store + local.get $0 + local.get $7 + i32.store offset=4 + end + local.get $0 local.get $5 - i32.add - i32.load offset=8 - else - unreachable + i32.store offset=8 end ) - (func $~lib/array/Array#pop (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/array/Array#push (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + local.get $0 + i32.load offset=12 + i32.const 1 + i32.add + local.set $2 + local.get $0 + local.get $2 + i32.const 2 + call $~lib/array/ensureLength + local.get $0 + local.get $2 + i32.store offset=12 local.get $0 i32.load offset=4 + local.get $2 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + i32.add + local.get $1 + i32.store + local.get $2 + ) + (func $~lib/array/Array#pop (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 local.set $1 local.get $1 i32.const 1 i32.lt_s if i32.const 0 - i32.const 8 - i32.const 244 + i32.const 488 + i32.const 185 i32.const 20 call $~lib/env/abort unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - i32.const 1 - i32.sub - local.tee $1 - local.set $3 - i32.const 0 - local.set $4 - local.get $2 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - end - local.set $5 local.get $0 + i32.load offset=4 local.get $1 - i32.store offset=4 - local.get $5 + i32.const 1 + i32.sub + local.tee $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $2 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $2 ) - (func $~lib/array/Array#concat (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 i32.const 0 local.get $1 - i32.load offset=4 + i32.load offset=12 local.get $1 i32.const 0 i32.eq select local.set $3 + i32.const 0 local.get $2 local.get $3 i32.add + call $~lib/array/Array#constructor local.set $4 - i32.const 0 local.get $4 - call $~lib/array/Array#constructor + i32.load offset=4 local.set $5 local.get $2 - if - local.get $5 - i32.load - i32.const 8 - i32.add - local.set $6 - local.get $0 - i32.load - i32.const 8 - i32.add - local.set $7 - local.get $2 - i32.const 2 - i32.shl - local.set $8 - local.get $6 - local.get $7 - local.get $8 - call $~lib/internal/memory/memmove - end - local.get $3 - if - local.get $5 - i32.load - i32.const 8 - i32.add - local.get $2 - i32.const 2 - i32.shl - i32.add - local.set $8 - local.get $1 - i32.load - i32.const 8 - i32.add - local.set $7 - local.get $3 - i32.const 2 - i32.shl - local.set $6 - local.get $8 - local.get $7 - local.get $6 - call $~lib/internal/memory/memmove - end + i32.const 2 + i32.shl + local.set $6 + local.get $5 + local.get $0 + i32.load offset=4 + local.get $6 + call $~lib/memory/memory.copy local.get $5 + local.get $6 + i32.add + local.get $1 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $4 ) - (func $~lib/array/Array#copyWithin (; 35 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 38 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3216,14 +3003,11 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load + i32.load offset=4 local.set $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $5 local.get $3 local.tee $6 @@ -3353,40 +3137,18 @@ local.get $11 if block - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $4 - local.set $6 - local.get $8 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $4 - local.set $12 - local.get $9 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i32.load offset=8 - end - local.set $14 - i32.const 0 - local.set $13 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $13 - i32.add - local.get $14 - i32.store offset=8 - end + local.get $4 + local.get $8 + i32.const 2 + i32.shl + i32.add + local.get $4 + local.get $9 + i32.const 2 + i32.shl + i32.add + i32.load + i32.store local.get $9 i32.const 1 i32.sub @@ -3406,71 +3168,35 @@ end else local.get $4 - i32.const 8 - i32.add local.get $8 i32.const 2 i32.shl i32.add - local.set $13 local.get $4 - i32.const 8 - i32.add local.get $9 i32.const 2 i32.shl i32.add - local.set $14 local.get $11 i32.const 2 i32.shl - local.set $7 - local.get $13 - local.get $14 - local.get $7 - call $~lib/internal/memory/memmove - end - local.get $0 - ) - (func $~lib/array/Array#copyWithin|trampoline (; 36 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 2 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $3 + call $~lib/memory/memory.copy end local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/array/Array#copyWithin ) - (func $std/array/isArraysEqual (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $2 i32.eqz if - block $~lib/array/Array#get:length|inlined.15 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array#get:length local.set $2 local.get $2 - block $~lib/array/Array#get:length|inlined.17 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.ne if i32.const 0 @@ -3494,11 +3220,35 @@ i32.eqz br_if $break|0 local.get $0 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $1 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load i32.ne if i32.const 0 @@ -3515,323 +3265,150 @@ end i32.const 1 ) - (func $~lib/array/Array#unshift (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#unshift (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $0 - i32.load + i32.load offset=12 + i32.const 1 + i32.add local.set $2 + local.get $0 local.get $2 - i32.load i32.const 2 - i32.shr_u - local.set $3 + call $~lib/array/ensureLength local.get $0 - i32.load offset=4 - local.set $4 - local.get $4 - i32.const 1 + i32.load offset=4 + local.set $3 + local.get $3 + i32.const 4 i32.add - local.set $5 - local.get $4 local.get $3 - i32.ge_u - if - local.get $4 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 327 - i32.const 42 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $5 - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $2 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - local.set $3 - local.get $0 - local.get $2 - i32.store - end - block $~lib/memory/memory.copy|inlined.4 - local.get $2 - i32.const 8 - i32.add - i32.const 4 - i32.add - local.set $6 - local.get $2 - i32.const 8 - i32.add - local.set $7 - local.get $3 - i32.const 1 - i32.sub - i32.const 2 - i32.shl - local.set $8 - local.get $6 - local.get $7 - local.get $8 - call $~lib/internal/memory/memmove - end - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $2 - local.set $8 - i32.const 0 - local.set $7 - local.get $1 - local.set $6 - i32.const 0 - local.set $9 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $6 - i32.store offset=8 - end + local.get $2 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $3 + local.get $1 + i32.store local.get $0 - local.get $5 - i32.store offset=4 - local.get $5 + local.get $2 + i32.store offset=12 + local.get $2 ) - (func $~lib/array/Array#shift (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $1 local.get $1 i32.const 1 i32.lt_s if i32.const 0 - i32.const 8 - i32.const 299 + i32.const 488 + i32.const 243 i32.const 20 call $~lib/env/abort unreachable end local.get $0 - i32.load + i32.load offset=4 local.set $2 - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $2 - local.set $3 - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - end - local.set $6 + local.get $2 + i32.load + local.set $3 local.get $1 i32.const 1 i32.sub - local.set $7 - block $~lib/memory/memory.copy|inlined.5 - local.get $2 - i32.const 8 - i32.add - local.set $5 - local.get $2 - i32.const 8 - i32.add - i32.const 4 - i32.add - local.set $4 - local.get $7 - i32.const 2 - i32.shl - local.set $3 - local.get $5 - local.get $4 - local.get $3 - call $~lib/internal/memory/memmove - end - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $2 - local.set $3 - local.get $7 - local.set $4 - i32.const 0 - local.set $5 - i32.const 0 - local.set $8 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $5 - i32.store offset=8 - end + local.set $4 + local.get $2 + local.get $2 + i32.const 4 + i32.add + local.get $4 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $2 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.const 0 + i32.store local.get $0 - local.get $7 - i32.store offset=4 - local.get $6 + local.get $4 + i32.store offset=12 + local.get $3 ) - (func $~lib/array/Array#reverse (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#reverse (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $0 - i32.load + i32.load offset=12 local.set $1 - block $break|0 - block - i32.const 0 - local.set $2 - local.get $0 - i32.load offset=4 - i32.const 1 - i32.sub - local.set $3 - end - loop $repeat|0 - local.get $2 - local.get $3 - i32.lt_s - i32.eqz - br_if $break|0 - block - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result i32) - local.get $1 - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end - local.set $6 - block $~lib/internal/arraybuffer/STORE|inlined.4 - local.get $1 - local.set $5 - local.get $2 - local.set $4 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i32) - local.get $1 - local.set $7 - local.get $3 - local.set $8 - i32.const 0 - local.set $9 - local.get $7 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - i32.load offset=8 - end - local.set $9 - i32.const 0 - local.set $8 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $9 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.5 - local.get $1 - local.set $8 - local.get $3 - local.set $9 - local.get $6 - local.set $4 - i32.const 0 - local.set $5 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $4 - i32.store offset=8 - end - end - block + local.get $1 + if + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + i32.add + local.set $3 + block $break|0 + loop $continue|0 local.get $2 - i32.const 1 - i32.add - local.set $2 local.get $3 - i32.const 1 - i32.sub - local.set $3 + i32.lt_u + if + block + local.get $2 + i32.load + local.set $4 + local.get $2 + local.get $3 + i32.load + i32.store + local.get $3 + local.get $4 + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + local.get $3 + i32.const 4 + i32.sub + local.set $3 + end + br $continue|0 + end end - br $repeat|0 - unreachable end - unreachable end local.get $0 ) - (func $~lib/array/Array#indexOf (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 local.get $3 i32.const 0 @@ -3865,7 +3442,7 @@ local.set $2 end local.get $0 - i32.load + i32.load offset=4 local.set $6 block $break|0 loop $continue|0 @@ -3874,22 +3451,12 @@ i32.lt_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i32) - local.get $6 - local.set $7 - local.get $2 - local.set $5 - i32.const 0 - local.set $4 - local.get $7 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - end + local.get $6 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load local.get $1 i32.eq if @@ -3907,7 +3474,15 @@ end i32.const -1 ) - (func $~lib/array/Array#splice (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s + ) + (func $~lib/array/Array#splice (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3917,7 +3492,7 @@ (local $9 i32) (local $10 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 local.get $1 i32.const 0 @@ -3962,38 +3537,63 @@ i32.gt_s select local.set $2 - local.get $0 - i32.load - local.set $6 i32.const 0 local.get $2 call $~lib/array/Array#constructor - local.set $7 + local.set $6 local.get $6 - i32.const 8 - i32.add + i32.load offset=4 + local.set $7 + local.get $0 + i32.load offset=4 + local.set $8 + local.get $8 local.get $1 i32.const 2 i32.shl i32.add - local.set $8 - block $~lib/memory/memory.copy|inlined.6 - local.get $7 - i32.load - i32.const 8 - i32.add + local.set $9 + block $break|0 + i32.const 0 local.set $4 - local.get $8 - local.set $5 - local.get $2 - i32.const 2 - i32.shl - local.set $9 - local.get $4 - local.get $5 - local.get $9 - call $~lib/internal/memory/memmove + loop $repeat|0 + local.get $4 + local.get $2 + i32.lt_s + i32.eqz + br_if $break|0 + block + local.get $9 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 + local.get $7 + local.get $4 + i32.const 2 + i32.shl + i32.add + local.get $5 + i32.store + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $repeat|0 + unreachable + end + unreachable end + local.get $6 + i32.load offset=4 + local.get $9 + local.get $2 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy local.get $1 local.get $2 i32.add @@ -4002,137 +3602,42 @@ local.get $10 i32.ne if + local.get $9 local.get $8 - local.set $9 - local.get $6 - i32.const 8 - i32.add local.get $10 i32.const 2 i32.shl i32.add - local.set $5 local.get $3 local.get $10 i32.sub i32.const 2 i32.shl - local.set $4 - local.get $9 - local.get $5 - local.get $4 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy end local.get $0 local.get $3 local.get $2 i32.sub - i32.store offset=4 - local.get $7 - ) - (func $~lib/array/Array#splice|trampoline (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#splice - ) - (func $~lib/array/Array#__set (; 44 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 - i32.load - local.set $3 - local.get $3 - i32.load - i32.const 2 - i32.shr_u - local.set $4 - local.get $1 - local.get $4 - i32.ge_u - if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - end - block $~lib/internal/arraybuffer/STORE|inlined.6 - local.get $3 - local.set $5 - local.get $1 - local.set $6 - local.get $2 - local.set $7 - i32.const 0 - local.set $8 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $7 - i32.store offset=8 - end + i32.store offset=12 + local.get $6 ) - (func $start:std/array~anonymous|0 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $~lib/array/Array#findIndex (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) block $break|0 block i32.const 0 local.set $2 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 end loop $repeat|0 @@ -4140,35 +3645,25 @@ local.get $3 local.tee $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $5 local.get $4 local.get $5 i32.lt_s - select - i32.lt_s - i32.eqz - br_if $break|0 - block (result i32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result i32) - local.get $0 - i32.load - local.set $6 - local.get $2 - local.set $5 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - end + select + i32.lt_s + i32.eqz + br_if $break|0 + block (result i32) + i32.const 3 + global.set $~lib/argc + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load local.get $2 local.get $0 local.get $1 @@ -4191,17 +3686,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4210,12 +3705,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|4 (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|4 (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4223,23 +3718,22 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) block $break|0 block i32.const 0 local.set $2 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 end loop $repeat|0 @@ -4247,7 +3741,7 @@ local.get $3 local.tee $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $5 local.get $4 local.get $5 @@ -4259,23 +3753,13 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i32) - local.get $0 - i32.load - local.set $6 - local.get $2 - local.set $5 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load local.get $2 local.get $0 local.get $1 @@ -4299,12 +3783,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4313,12 +3797,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4326,23 +3810,22 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) block $break|0 block i32.const 0 local.set $2 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 end loop $repeat|0 @@ -4350,7 +3833,7 @@ local.get $3 local.tee $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $5 local.get $4 local.get $5 @@ -4362,23 +3845,13 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.13 (result i32) - local.get $0 - i32.load - local.set $6 - local.get $2 - local.set $5 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load local.get $2 local.get $0 local.get $1 @@ -4401,12 +3874,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4415,12 +3888,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4428,24 +3901,23 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 64 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 65 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 65 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 66 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) block $break|0 block i32.const 0 local.set $2 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 end loop $repeat|0 @@ -4453,7 +3925,7 @@ local.get $3 local.tee $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $5 local.get $4 local.get $5 @@ -4465,23 +3937,13 @@ block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.14 (result i32) - local.get $0 - i32.load - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load local.get $2 local.get $0 local.get $1 @@ -4497,7 +3959,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 66 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 67 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4507,13 +3969,13 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|18 (; 67 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|18 (; 68 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 68 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 69 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -4522,7 +3984,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 69 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 70 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.const 0 @@ -4637,91 +4099,52 @@ end end ) - (func $start:std/array~anonymous|21 (; 70 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 71 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#constructor (; 71 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 72 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 9 + call $~lib/runtime/doRegister end local.get $1 i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - end - local.get $3 - i32.store + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 local.get $0 local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.4 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end + i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#map (; 72 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 73 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f32) + (local $8 f32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 i32.const 0 local.get $2 call $~lib/array/Array#constructor local.set $3 local.get $3 - i32.load + i32.load offset=4 local.set $4 block $break|0 i32.const 0 @@ -4731,7 +4154,7 @@ local.get $2 local.tee $6 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $7 local.get $6 local.get $7 @@ -4740,48 +4163,32 @@ i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $4 - local.set $6 + block + local.get $0 + i32.load offset=4 local.get $5 - local.set $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result f32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.15 (result i32) - local.get $0 - i32.load - local.set $8 - local.get $5 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end + local.get $6 local.get $5 local.get $0 local.get $1 call_indirect (type $FUNCSIG$fiii) end - local.set $11 - i32.const 0 - local.set $10 - local.get $6 - local.get $7 + local.set $8 + local.get $4 + local.get $5 i32.const 2 i32.shl i32.add - local.get $10 - i32.add - local.get $11 - f32.store offset=8 + local.get $8 + f32.store end local.get $5 i32.const 1 @@ -4794,40 +4201,11 @@ end local.get $3 ) - (func $~lib/array/Array#__get (; 73 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#get:length (; 74 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result f32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - f32.load offset=8 - else - unreachable - end + i32.load offset=12 ) - (func $start:std/array~anonymous|22 (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4838,25 +4216,22 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 75 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 i32.const 0 local.get $2 call $~lib/array/Array#constructor local.set $3 local.get $3 - i32.load + i32.load offset=4 local.set $4 block $break|0 i32.const 0 @@ -4866,7 +4241,7 @@ local.get $2 local.tee $6 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $7 local.get $6 local.get $7 @@ -4875,48 +4250,32 @@ i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.7 - local.get $4 - local.set $6 + block + local.get $0 + i32.load offset=4 local.get $5 - local.set $7 - block (result i32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.16 (result i32) - local.get $0 - i32.load - local.set $8 - local.get $5 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + block (result i32) + i32.const 3 + global.set $~lib/argc + local.get $6 local.get $5 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) end - local.set $10 - i32.const 0 - local.set $9 - local.get $6 - local.get $7 + local.set $7 + local.get $4 + local.get $5 i32.const 2 i32.shl i32.add - local.get $9 - i32.add - local.get $10 - i32.store offset=8 + local.get $7 + i32.store end local.get $5 i32.const 1 @@ -4929,14 +4288,14 @@ end local.get $3 ) - (func $start:std/array~anonymous|23 (; 76 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 77 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 77 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4946,18 +4305,17 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 79 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 79 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 80 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) i32.const 0 i32.const 0 call $~lib/array/Array#constructor @@ -4967,7 +4325,7 @@ i32.const 0 local.set $3 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $4 end loop $repeat|0 @@ -4975,7 +4333,7 @@ local.get $4 local.tee $5 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $6 local.get $5 local.get $6 @@ -4985,28 +4343,18 @@ i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.17 (result i32) - local.get $0 - i32.load - local.set $5 - local.get $3 - local.set $6 - i32.const 0 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 block (result i32) i32.const 3 global.set $~lib/argc - local.get $7 + local.get $5 local.get $3 local.get $0 local.get $1 @@ -5016,7 +4364,7 @@ i32.ne if local.get $2 - local.get $7 + local.get $5 call $~lib/array/Array#push drop end @@ -5032,7 +4380,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|26 (; 80 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 81 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -5045,7 +4393,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 81 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -5054,7 +4402,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 83 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -5066,18 +4414,17 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 83 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 84 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 84 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 85 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $2 local.set $3 block $break|0 @@ -5085,7 +4432,7 @@ i32.const 0 local.set $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $5 end loop $repeat|0 @@ -5093,7 +4440,7 @@ local.get $5 local.tee $6 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $7 local.get $6 local.get $7 @@ -5106,23 +4453,13 @@ i32.const 4 global.set $~lib/argc local.get $3 - block $~lib/internal/arraybuffer/LOAD|inlined.18 (result i32) - local.get $0 - i32.load - local.set $6 - local.get $4 - local.set $7 - i32.const 0 - local.set $8 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load local.get $4 local.get $0 local.get $1 @@ -5140,12 +4477,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|30 (; 85 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|30 (; 86 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|31 (; 86 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 87 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -5157,13 +4494,12 @@ i32.gt_s end ) - (func $~lib/array/Array#reduce (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 88 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $2 local.set $3 block $break|0 @@ -5171,7 +4507,7 @@ i32.const 0 local.set $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $5 end loop $repeat|0 @@ -5179,7 +4515,7 @@ local.get $5 local.tee $6 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $7 local.get $6 local.get $7 @@ -5192,23 +4528,13 @@ i32.const 4 global.set $~lib/argc local.get $3 - block $~lib/internal/arraybuffer/LOAD|inlined.19 (result i32) - local.get $0 - i32.load - local.set $6 - local.get $4 - local.set $7 - i32.const 0 - local.set $8 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load local.get $4 local.get $0 local.get $1 @@ -5226,7 +4552,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|32 (; 88 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 89 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -5238,7 +4564,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|33 (; 89 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 90 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -5247,12 +4573,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|34 (; 90 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|34 (; 91 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 91 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 92 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -5260,22 +4586,19 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|36 (; 92 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|36 (; 93 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 94 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) local.get $2 local.set $3 block $break|0 local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $4 @@ -5289,23 +4612,13 @@ i32.const 4 global.set $~lib/argc local.get $3 - block $~lib/internal/arraybuffer/LOAD|inlined.20 (result i32) - local.get $0 - i32.load - local.set $5 - local.get $4 - local.set $6 - i32.const 0 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load local.get $4 local.get $0 local.get $1 @@ -5323,12 +4636,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|37 (; 94 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|37 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|38 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|38 (; 96 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -5340,17 +4653,14 @@ i32.gt_s end ) - (func $~lib/array/Array#reduceRight (; 96 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 97 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) local.get $2 local.set $3 block $break|0 local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $4 @@ -5364,23 +4674,13 @@ i32.const 4 global.set $~lib/argc local.get $3 - block $~lib/internal/arraybuffer/LOAD|inlined.21 (result i32) - local.get $0 - i32.load - local.set $5 - local.get $4 - local.set $6 - i32.const 0 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load local.get $4 local.get $0 local.get $1 @@ -5398,7 +4698,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|39 (; 97 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|39 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -5410,7 +4710,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|40 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|40 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -5419,12 +4719,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|41 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|41 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|42 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|42 (; 101 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -5432,7 +4732,7 @@ local.get $1 i32.add ) - (func $~lib/math/murmurHash3 (; 101 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 102 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -5461,7 +4761,7 @@ local.set $0 local.get $0 ) - (func $~lib/math/splitMix32 (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 103 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -5496,13 +4796,13 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 103 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 104 ;) (type $FUNCSIG$vj) (param $0 i64) local.get $0 i64.eqz if i32.const 0 - i32.const 2896 - i32.const 978 + i32.const 2296 + i32.const 1021 i32.const 4 call $~lib/env/abort unreachable @@ -5525,216 +4825,154 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/internal/sort/insertionSort (; 104 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) + (func $~lib/util/sort/insertionSort (; 105 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 f32) (local $5 i32) - (local $6 i32) + (local $6 f32) (local $7 i32) - (local $8 f32) - (local $9 i32) - (local $10 f32) - (local $11 f32) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result f32) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - f32.load offset=8 - end - local.set $8 - local.get $4 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $7 + local.set $5 block $break|1 loop $continue|1 - local.get $7 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result f32) - local.get $0 - local.set $6 - local.get $7 - local.set $5 - local.get $1 - local.set $9 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - f32.load offset=8 - end - local.set $10 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $8 - local.get $10 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iff) end i32.const 0 i32.lt_s if local.get $0 - local.set $9 block (result i32) - local.get $7 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $7 - local.get $5 + local.set $5 + local.get $7 end - i32.const 1 - i32.add - local.set $5 - local.get $10 - local.set $11 - local.get $1 - local.set $6 - local.get $9 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - local.get $11 - f32.store offset=8 - else - br $break|1 - end - end - br $continue|1 - end - end - end - block $~lib/internal/arraybuffer/STORE|inlined.4 - local.get $0 - local.set $6 - local.get $7 - i32.const 1 - i32.add - local.set $5 - local.get $8 - local.set $10 - local.get $1 - local.set $9 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - f32.store offset=8 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $6 + f32.store + else + br $break|1 + end + end + br $continue|1 + end + end end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + f32.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 105 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/weakHeapSort (; 106 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 f32) - (local $13 f32) - (local $14 f32) - (local $15 f32) - local.get $2 + (local $8 f32) + (local $9 f32) + (local $10 f32) + local.get $1 i32.const 31 i32.add i32.const 5 i32.shr_s i32.const 2 i32.shl + local.set $3 + local.get $3 + call $~lib/memory/memory.allocate local.set $4 - block $~lib/memory/memory.allocate|inlined.1 (result i32) - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 - end - local.set $6 - block $~lib/memory/memory.fill|inlined.5 - local.get $6 - local.set $5 - i32.const 0 - local.set $7 - local.get $4 - local.set $8 - local.get $5 - local.get $7 - local.get $8 - call $~lib/internal/memory/memset - end + local.get $4 + i32.const 0 + local.get $3 + call $~lib/memory/memory.fill block $break|0 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|0 - local.get $8 + local.get $5 i32.const 0 i32.gt_s i32.eqz br_if $break|0 block - local.get $8 - local.set $7 + local.get $5 + local.set $6 block $break|1 loop $continue|1 - local.get $7 + local.get $6 i32.const 1 i32.and + local.get $4 local.get $6 - local.get $7 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $7 + local.get $6 i32.const 1 i32.shr_s i32.const 31 @@ -5744,72 +4982,52 @@ i32.and i32.eq if - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $7 + local.set $6 br $continue|1 end end end - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result f32) - local.get $0 - local.set $9 - local.get $5 - local.set $10 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - f32.load offset=8 - end - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result f32) - local.get $0 - local.set $11 - local.get $8 - local.set $10 - local.get $1 - local.set $9 - local.get $11 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - f32.load offset=8 - end - local.set $13 + local.set $7 + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $8 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $9 block (result i32) i32.const 2 global.set $~lib/argc - local.get $12 - local.get $13 - local.get $3 + local.get $8 + local.get $9 + local.get $2 call_indirect (type $FUNCSIG$iff) end i32.const 0 i32.lt_s if - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 @@ -5817,236 +5035,136 @@ i32.add i32.load i32.const 1 - local.get $8 + local.get $5 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.5 - local.get $0 - local.set $9 - local.get $8 - local.set $10 - local.get $12 - local.set $14 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $14 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.6 - local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $13 - local.set $14 - local.get $1 - local.set $9 - local.get $11 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $14 - f32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.get $8 + f32.store + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + local.get $9 + f32.store end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|0 unreachable end unreachable end block $break|2 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|2 - local.get $8 + local.get $5 i32.const 2 i32.ge_s i32.eqz br_if $break|2 block - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result f32) - local.get $0 - local.set $5 - i32.const 0 - local.set $7 - local.get $1 - local.set $9 - local.get $5 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - f32.load offset=8 - end - local.set $13 - block $~lib/internal/arraybuffer/STORE|inlined.7 - local.get $0 - local.set $9 - i32.const 0 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.8 (result f32) - local.get $0 - local.set $5 - local.get $8 - local.set $10 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - f32.load offset=8 - end - local.set $12 - local.get $1 - local.set $11 - local.get $9 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.8 - local.get $0 - local.set $11 - local.get $8 - local.set $7 - local.get $13 - local.set $12 - local.get $1 - local.set $9 - local.get $11 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $12 - f32.store offset=8 - end + local.get $0 + f32.load + local.set $9 + local.get $0 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + f32.load + f32.store + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.get $9 + f32.store i32.const 1 - local.set $9 + local.set $7 block $break|3 loop $continue|3 - local.get $9 + local.get $7 i32.const 1 i32.shl - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $9 + local.get $7 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and i32.add - local.tee $7 - local.get $8 + local.tee $6 + local.get $5 i32.lt_s if - local.get $7 - local.set $9 + local.get $6 + local.set $7 br $continue|3 end end end block $break|4 loop $continue|4 - local.get $9 + local.get $7 i32.const 0 i32.gt_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result f32) - local.get $0 - local.set $11 - i32.const 0 - local.set $10 - local.get $1 - local.set $5 - local.get $11 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - f32.load offset=8 - end - local.set $13 - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result f32) - local.get $0 - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - f32.load offset=8 - end - local.set $12 + local.get $0 + f32.load + local.set $9 + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $8 block (result i32) i32.const 2 global.set $~lib/argc - local.get $13 - local.get $12 - local.get $3 + local.get $9 + local.get $8 + local.get $2 call_indirect (type $FUNCSIG$iff) end i32.const 0 i32.lt_s if - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 @@ -6054,170 +5172,75 @@ i32.add i32.load i32.const 1 - local.get $9 + local.get $7 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.9 - local.get $0 - local.set $11 - local.get $9 - local.set $10 - local.get $13 - local.set $14 - local.get $1 - local.set $5 - local.get $11 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $14 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.10 - local.get $0 - local.set $5 - i32.const 0 - local.set $10 - local.get $12 - local.set $14 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $14 - f32.store offset=8 - end + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + local.get $9 + f32.store + local.get $0 + local.get $8 + f32.store end - local.get $9 + local.get $7 i32.const 1 i32.shr_s - local.set $9 + local.set $7 end br $continue|4 end end end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|2 unreachable end unreachable end - block $~lib/memory/memory.free|inlined.1 - local.get $6 - local.set $8 - local.get $8 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.1 - end - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result f32) - local.get $0 - local.set $8 - i32.const 1 - local.set $7 - local.get $1 - local.set $9 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - f32.load offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/STORE|inlined.11 - local.get $0 - local.set $9 - i32.const 1 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result f32) - local.get $0 - local.set $8 - i32.const 0 - local.set $11 - local.get $1 - local.set $10 - local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - f32.load offset=8 - end - local.set $13 - local.get $1 - local.set $10 - local.get $9 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - local.get $13 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.12 - local.get $0 - local.set $10 - i32.const 0 - local.set $7 - local.get $15 - local.set $13 - local.get $1 - local.set $9 - local.get $10 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $13 - f32.store offset=8 - end + local.get $4 + call $~lib/memory/memory.free + local.get $0 + f32.load offset=4 + local.set $10 + local.get $0 + local.get $0 + f32.load + f32.store offset=4 + local.get $0 + local.get $10 + f32.store ) - (func $~lib/array/Array#sort (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 107 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $4 f32) + (local $5 f32) (local $6 i32) - (local $7 f32) - (local $8 f32) - (local $9 f32) - (local $10 i32) + (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -6227,128 +5250,64 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result f32) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - f32.load offset=8 - end - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result f32) - local.get $3 - local.set $6 - i32.const 0 - local.set $5 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - f32.load offset=8 - end - local.set $8 + local.get $3 + f32.load offset=4 + local.set $4 + local.get $3 + f32.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $8 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$iff) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $8 - local.set $9 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - local.get $9 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $3 - local.set $6 - i32.const 0 - local.set $5 - local.get $7 - local.set $9 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - local.get $9 - f32.store offset=8 - end + local.get $3 + local.get $5 + f32.store offset=4 + local.get $3 + local.get $4 + f32.store end local.get $0 return end - block $~lib/internal/sort/SORT|inlined.0 + block $~lib/util/sort/SORT|inlined.0 local.get $3 - local.set $4 - i32.const 0 - local.set $5 - local.get $2 local.set $6 + local.get $2 + local.set $7 local.get $1 - local.set $10 - local.get $6 + local.set $8 + local.get $7 i32.const 256 i32.lt_s if - local.get $4 - local.get $5 local.get $6 - local.get $10 - call $~lib/internal/sort/insertionSort + local.get $7 + local.get $8 + call $~lib/util/sort/insertionSort else - local.get $4 - local.get $5 local.get $6 - local.get $10 - call $~lib/internal/sort/weakHeapSort + local.get $7 + local.get $8 + call $~lib/util/sort/weakHeapSort end end local.get $0 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 107 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 108 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -6381,7 +5340,7 @@ i32.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6390,9 +5349,9 @@ end unreachable end - block $~lib/internal/sort/COMPARATOR|inlined.0 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) i32.const 44 - br $~lib/internal/sort/COMPARATOR|inlined.0 + br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 end @@ -6400,30 +5359,24 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/builtins/isNaN (; 109 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 110 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $std/array/isArraysEqual (; 110 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 111 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $2 i32.eqz if - block $~lib/array/Array#get:length|inlined.1 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array#get:length local.set $2 local.get $2 - block $~lib/array/Array#get:length|inlined.3 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.ne if i32.const 0 @@ -6449,23 +5402,71 @@ br_if $break|0 block local.get $0 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f32.load call $~lib/builtins/isNaN local.get $1 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f32.load call $~lib/builtins/isNaN i32.eq if br $continue|0 end local.get $0 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f32.load local.get $1 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f32.load f32.ne if i32.const 0 @@ -6484,107 +5485,74 @@ end i32.const 1 ) - (func $~lib/internal/sort/insertionSort (; 111 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) + (func $~lib/util/sort/insertionSort (; 112 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 f64) (local $5 i32) - (local $6 i32) + (local $6 f64) (local $7 i32) - (local $8 f64) - (local $9 i32) - (local $10 f64) - (local $11 f64) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result f64) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 3 - i32.shl - i32.add - local.get $7 - i32.add - f64.load offset=8 - end - local.set $8 - local.get $4 + local.get $0 + local.get $3 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $7 + local.set $5 block $break|1 loop $continue|1 - local.get $7 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result f64) - local.get $0 - local.set $6 - local.get $7 - local.set $5 - local.get $1 - local.set $9 - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $10 + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $8 - local.get $10 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if local.get $0 - local.set $9 block (result i32) - local.get $7 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $7 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $10 - local.set $11 - local.get $1 - local.set $6 - local.get $9 - local.get $5 i32.const 3 i32.shl i32.add local.get $6 - i32.add - local.get $11 - f64.store offset=8 + f64.store else br $break|1 end @@ -6593,182 +5561,133 @@ end end end - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $0 - local.set $6 - local.get $7 - i32.const 1 - i32.add - local.set $5 - local.get $8 - local.set $10 - local.get $1 - local.set $9 - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - f64.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $4 + f64.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 112 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/weakHeapSort (; 113 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) - local.get $2 + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 i32.const 31 i32.add i32.const 5 i32.shr_s i32.const 2 i32.shl + local.set $3 + local.get $3 + call $~lib/memory/memory.allocate local.set $4 - block $~lib/memory/memory.allocate|inlined.2 (result i32) - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.2 - end - local.set $6 - block $~lib/memory/memory.fill|inlined.6 - local.get $6 - local.set $5 - i32.const 0 - local.set $7 - local.get $4 - local.set $8 - local.get $5 - local.get $7 - local.get $8 - call $~lib/internal/memory/memset - end + local.get $4 + i32.const 0 + local.get $3 + call $~lib/memory/memory.fill block $break|0 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|0 - local.get $8 + local.get $5 i32.const 0 i32.gt_s i32.eqz br_if $break|0 block - local.get $8 - local.set $7 + local.get $5 + local.set $6 block $break|1 loop $continue|1 - local.get $7 - i32.const 1 - i32.and local.get $6 - local.get $7 - i32.const 6 - i32.shr_s - i32.const 2 - i32.shl - i32.add - i32.load - local.get $7 - i32.const 1 - i32.shr_s - i32.const 31 - i32.and - i32.shr_u i32.const 1 i32.and - i32.eq - if - local.get $7 - i32.const 1 - i32.shr_s - local.set $7 - br $continue|1 - end - end - end - local.get $7 - i32.const 1 - i32.shr_s - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result f64) - local.get $0 - local.set $9 - local.get $5 - local.set $10 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - f64.load offset=8 - end - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result f64) - local.get $0 - local.set $11 - local.get $8 - local.set $10 - local.get $1 - local.set $9 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 + local.get $4 + local.get $6 + i32.const 6 + i32.shr_s + i32.const 2 + i32.shl + i32.add + i32.load + local.get $6 + i32.const 1 + i32.shr_s + i32.const 31 + i32.and + i32.shr_u + i32.const 1 + i32.and + i32.eq + if + local.get $6 + i32.const 1 + i32.shr_s + local.set $6 + br $continue|1 + end + end end - local.set $13 + local.get $6 + i32.const 1 + i32.shr_s + local.set $7 + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $8 + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $9 block (result i32) i32.const 2 global.set $~lib/argc - local.get $12 - local.get $13 - local.get $3 + local.get $8 + local.get $9 + local.get $2 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 @@ -6776,236 +5695,136 @@ i32.add i32.load i32.const 1 - local.get $8 + local.get $5 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.4 - local.get $0 - local.set $9 - local.get $8 - local.set $10 - local.get $12 - local.set $14 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $14 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.5 - local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $13 - local.set $14 - local.get $1 - local.set $9 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $14 - f64.store offset=8 - end + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.get $8 + f64.store + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + local.get $9 + f64.store end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|0 unreachable end unreachable end block $break|2 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|2 - local.get $8 + local.get $5 i32.const 2 i32.ge_s i32.eqz br_if $break|2 block - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result f64) - local.get $0 - local.set $5 - i32.const 0 - local.set $7 - local.get $1 - local.set $9 - local.get $5 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $13 - block $~lib/internal/arraybuffer/STORE|inlined.6 - local.get $0 - local.set $9 - i32.const 0 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result f64) - local.get $0 - local.set $5 - local.get $8 - local.set $10 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - f64.load offset=8 - end - local.set $12 - local.get $1 - local.set $11 - local.get $9 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.7 - local.get $0 - local.set $11 - local.get $8 - local.set $7 - local.get $13 - local.set $12 - local.get $1 - local.set $9 - local.get $11 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $12 - f64.store offset=8 - end - i32.const 1 + local.get $0 + f64.load local.set $9 + local.get $0 + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + f64.store + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.get $9 + f64.store + i32.const 1 + local.set $7 block $break|3 loop $continue|3 - local.get $9 + local.get $7 i32.const 1 i32.shl - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $9 + local.get $7 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and i32.add - local.tee $7 - local.get $8 + local.tee $6 + local.get $5 i32.lt_s if - local.get $7 - local.set $9 + local.get $6 + local.set $7 br $continue|3 end end end block $break|4 loop $continue|4 - local.get $9 + local.get $7 i32.const 0 i32.gt_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.8 (result f64) - local.get $0 - local.set $11 - i32.const 0 - local.set $10 - local.get $1 - local.set $5 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $5 - i32.add - f64.load offset=8 - end - local.set $13 - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result f64) - local.get $0 - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - f64.load offset=8 - end - local.set $12 + local.get $0 + f64.load + local.set $9 + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $8 block (result i32) i32.const 2 global.set $~lib/argc - local.get $13 - local.get $12 - local.get $3 + local.get $9 + local.get $8 + local.get $2 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 @@ -7013,170 +5832,75 @@ i32.add i32.load i32.const 1 - local.get $9 + local.get $7 i32.const 31 i32.and i32.shl i32.xor - i32.store - block $~lib/internal/arraybuffer/STORE|inlined.8 - local.get $0 - local.set $11 - local.get $9 - local.set $10 - local.get $13 - local.set $14 - local.get $1 - local.set $5 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $5 - i32.add - local.get $14 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.9 - local.get $0 - local.set $5 - i32.const 0 - local.set $10 - local.get $12 - local.set $14 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $14 - f64.store offset=8 - end + i32.store + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + local.get $9 + f64.store + local.get $0 + local.get $8 + f64.store end - local.get $9 + local.get $7 i32.const 1 i32.shr_s - local.set $9 + local.set $7 end br $continue|4 end end end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|2 unreachable end unreachable end - block $~lib/memory/memory.free|inlined.2 - local.get $6 - local.set $8 - local.get $8 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.2 - end - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result f64) - local.get $0 - local.set $8 - i32.const 1 - local.set $7 - local.get $1 - local.set $9 - local.get $8 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/STORE|inlined.10 - local.get $0 - local.set $9 - i32.const 1 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result f64) - local.get $0 - local.set $8 - i32.const 0 - local.set $11 - local.get $1 - local.set $10 - local.get $8 - local.get $11 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - f64.load offset=8 - end - local.set $13 - local.get $1 - local.set $10 - local.get $9 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - local.get $13 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.11 - local.get $0 - local.set $10 - i32.const 0 - local.set $7 - local.get $15 - local.set $13 - local.get $1 - local.set $9 - local.get $10 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $13 - f64.store offset=8 - end + local.get $4 + call $~lib/memory/memory.free + local.get $0 + f64.load offset=8 + local.set $10 + local.get $0 + local.get $0 + f64.load + f64.store offset=8 + local.get $0 + local.get $10 + f64.store ) - (func $~lib/array/Array#sort (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 114 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $4 f64) + (local $5 f64) (local $6 i32) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 i32) + (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -7186,128 +5910,64 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result f64) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $6 - i32.add - f64.load offset=8 - end - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result f64) - local.get $3 - local.set $6 - i32.const 0 - local.set $5 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $4 - i32.add - f64.load offset=8 - end - local.set $8 + local.get $3 + f64.load offset=8 + local.set $4 + local.get $3 + f64.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $8 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $8 - local.set $9 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $6 - i32.add - local.get $9 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $3 - local.set $6 - i32.const 0 - local.set $5 - local.get $7 - local.set $9 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $4 - i32.add - local.get $9 - f64.store offset=8 - end + local.get $3 + local.get $5 + f64.store offset=8 + local.get $3 + local.get $4 + f64.store end local.get $0 return end - block $~lib/internal/sort/SORT|inlined.0 + block $~lib/util/sort/SORT|inlined.0 local.get $3 - local.set $4 - i32.const 0 - local.set $5 - local.get $2 local.set $6 + local.get $2 + local.set $7 local.get $1 - local.set $10 - local.get $6 + local.set $8 + local.get $7 i32.const 256 i32.lt_s if - local.get $4 - local.get $5 local.get $6 - local.get $10 - call $~lib/internal/sort/insertionSort + local.get $7 + local.get $8 + call $~lib/util/sort/insertionSort else - local.get $4 - local.get $5 local.get $6 - local.get $10 - call $~lib/internal/sort/weakHeapSort + local.get $7 + local.get $8 + call $~lib/util/sort/weakHeapSort end end local.get $0 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 114 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 115 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -7340,7 +6000,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 115 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -7349,9 +6009,9 @@ end unreachable end - block $~lib/internal/sort/COMPARATOR|inlined.0 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) i32.const 45 - br $~lib/internal/sort/COMPARATOR|inlined.0 + br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 end @@ -7359,63 +6019,28 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/array/Array#__get (; 116 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#get:length (; 117 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result f64) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 3 - i32.shl - i32.add - local.get $5 - i32.add - f64.load offset=8 - else - unreachable - end + i32.load offset=12 ) - (func $~lib/builtins/isNaN (; 117 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 118 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $std/array/isArraysEqual (; 118 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 119 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $2 i32.eqz if - block $~lib/array/Array#get:length|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array#get:length local.set $2 local.get $2 - block $~lib/array/Array#get:length|inlined.2 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.ne if i32.const 0 @@ -7441,23 +6066,71 @@ br_if $break|0 block local.get $0 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f64.load call $~lib/builtins/isNaN local.get $1 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f64.load call $~lib/builtins/isNaN i32.eq if br $continue|0 end local.get $0 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f64.load local.get $1 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f64.load f64.ne if i32.const 0 @@ -7476,107 +6149,74 @@ end i32.const 1 ) - (func $~lib/internal/sort/insertionSort (; 119 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/insertionSort (; 120 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.24 (result i32) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 - local.get $4 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $6 + local.set $5 block $break|1 loop $continue|1 - local.get $6 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.25 (result i32) - local.get $0 - local.set $5 - local.get $6 - local.set $8 - local.get $1 - local.set $9 - local.get $5 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - i32.load offset=8 - end - local.set $9 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $9 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if local.get $0 - local.set $8 block (result i32) - local.get $6 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $6 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $8 - local.get $5 i32.const 2 i32.shl i32.add - local.get $11 - i32.add - local.get $10 - i32.store offset=8 + local.get $6 + i32.store else br $break|1 end @@ -7585,39 +6225,28 @@ end end end - block $~lib/internal/arraybuffer/STORE|inlined.11 - local.get $0 - local.set $9 - local.get $6 - i32.const 1 - i32.add - local.set $11 - local.get $7 - local.set $10 - local.get $1 - local.set $5 - local.get $9 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + i32.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 120 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/weakHeapSort (; 121 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -7625,67 +6254,49 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - local.get $2 + local.get $1 i32.const 31 i32.add i32.const 5 i32.shr_s i32.const 2 i32.shl + local.set $3 + local.get $3 + call $~lib/memory/memory.allocate local.set $4 - block $~lib/memory/memory.allocate|inlined.3 (result i32) - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.3 - end - local.set $6 - block $~lib/memory/memory.fill|inlined.7 - local.get $6 - local.set $5 - i32.const 0 - local.set $7 - local.get $4 - local.set $8 - local.get $5 - local.get $7 - local.get $8 - call $~lib/internal/memory/memset - end + local.get $4 + i32.const 0 + local.get $3 + call $~lib/memory/memory.fill block $break|0 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|0 - local.get $8 + local.get $5 i32.const 0 i32.gt_s i32.eqz br_if $break|0 block - local.get $8 - local.set $7 + local.get $5 + local.set $6 block $break|1 loop $continue|1 - local.get $7 + local.get $6 i32.const 1 i32.and + local.get $4 local.get $6 - local.get $7 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $7 + local.get $6 i32.const 1 i32.shr_s i32.const 31 @@ -7695,72 +6306,52 @@ i32.and i32.eq if - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $7 + local.set $6 br $continue|1 end end end - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.26 (result i32) - local.get $0 - local.set $9 - local.get $5 - local.set $10 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.27 (result i32) - local.get $0 - local.set $10 - local.get $8 - local.set $9 - local.get $1 - local.set $12 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i32.load offset=8 - end - local.set $12 + local.set $7 + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $8 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $9 block (result i32) i32.const 2 global.set $~lib/argc - local.get $11 - local.get $12 - local.get $3 + local.get $8 + local.get $9 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 @@ -7768,236 +6359,136 @@ i32.add i32.load i32.const 1 - local.get $8 + local.get $5 i32.const 31 i32.and i32.shl i32.xor - i32.store - block $~lib/internal/arraybuffer/STORE|inlined.12 - local.get $0 - local.set $9 - local.get $8 - local.set $10 - local.get $11 - local.set $13 - local.get $1 - local.set $14 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - local.get $13 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.13 - local.get $0 - local.set $14 - local.get $5 - local.set $13 - local.get $12 - local.set $10 - local.get $1 - local.set $9 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - i32.store offset=8 - end + i32.store + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.get $8 + i32.store + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|0 unreachable end unreachable end block $break|2 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|2 - local.get $8 + local.get $5 i32.const 2 i32.ge_s i32.eqz br_if $break|2 block - block $~lib/internal/arraybuffer/LOAD|inlined.28 (result i32) - local.get $0 - local.set $12 - i32.const 0 - local.set $11 - local.get $1 - local.set $5 - local.get $12 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - end - local.set $5 - block $~lib/internal/arraybuffer/STORE|inlined.14 - local.get $0 - local.set $11 - i32.const 0 - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.29 (result i32) - local.get $0 - local.set $7 - local.get $8 - local.set $9 - local.get $1 - local.set $10 - local.get $7 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $10 - local.get $1 - local.set $9 - local.get $11 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.15 - local.get $0 - local.set $9 - local.get $8 - local.set $10 - local.get $5 - local.set $12 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - i32.store offset=8 - end + local.get $0 + i32.load + local.set $9 + local.get $0 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + i32.store + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store i32.const 1 - local.set $11 + local.set $8 block $break|3 loop $continue|3 - local.get $11 + local.get $8 i32.const 1 i32.shl - local.get $6 - local.get $11 + local.get $4 + local.get $8 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $11 + local.get $8 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and i32.add - local.tee $12 - local.get $8 + local.tee $7 + local.get $5 i32.lt_s if - local.get $12 - local.set $11 + local.get $7 + local.set $8 br $continue|3 end end end block $break|4 loop $continue|4 - local.get $11 + local.get $8 i32.const 0 i32.gt_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.30 (result i32) - local.get $0 - local.set $10 - i32.const 0 - local.set $9 - local.get $1 - local.set $7 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.31 (result i32) - local.get $0 - local.set $7 - local.get $11 - local.set $9 - local.get $1 - local.set $10 - local.get $7 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $10 + local.get $0 + i32.load + local.set $9 + local.get $0 + local.get $8 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $5 - local.get $10 - local.get $3 + local.get $9 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - local.get $6 - local.get $11 + local.get $4 + local.get $8 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $11 + local.get $4 + local.get $8 i32.const 5 i32.shr_s i32.const 2 @@ -8005,169 +6496,73 @@ i32.add i32.load i32.const 1 - local.get $11 + local.get $8 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.16 - local.get $0 - local.set $9 - local.get $11 - local.set $7 - local.get $5 - local.set $13 - local.get $1 - local.set $14 - local.get $9 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - local.get $13 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.17 - local.get $0 - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.set $7 - local.get $1 - local.set $9 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $7 - i32.store offset=8 - end + local.get $0 + local.get $8 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store + local.get $0 + local.get $6 + i32.store end - local.get $11 + local.get $8 i32.const 1 i32.shr_s - local.set $11 + local.set $8 end br $continue|4 end end end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|2 unreachable end unreachable end - block $~lib/memory/memory.free|inlined.3 - local.get $6 - local.set $8 - local.get $8 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.3 - end - block $~lib/internal/arraybuffer/LOAD|inlined.32 (result i32) - local.get $0 - local.set $8 - i32.const 1 - local.set $12 - local.get $1 - local.set $11 - local.get $8 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/STORE|inlined.18 - local.get $0 - local.set $11 - i32.const 1 - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.33 (result i32) - local.get $0 - local.set $8 - i32.const 0 - local.set $5 - local.get $1 - local.set $10 - local.get $8 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $10 - local.get $1 - local.set $5 - local.get $11 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.19 - local.get $0 - local.set $5 - i32.const 0 - local.set $10 - local.get $15 - local.set $12 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - i32.store offset=8 - end + local.get $4 + call $~lib/memory/memory.free + local.get $0 + i32.load offset=4 + local.set $10 + local.get $0 + local.get $0 + i32.load + i32.store offset=4 + local.get $0 + local.get $10 + i32.store ) - (func $~lib/array/Array#sort (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 122 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -8177,133 +6572,69 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD|inlined.22 (result i32) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.23 (result i32) - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - i32.const 0 - local.set $7 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $6 - local.get $7 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE|inlined.8 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $7 - local.set $8 - i32.const 0 - local.set $9 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.9 - local.get $3 - local.set $9 - i32.const 0 - local.set $8 - local.get $6 - local.set $5 - i32.const 0 - local.set $4 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - local.get $5 - i32.store offset=8 - end + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store end local.get $0 return end - block $~lib/internal/sort/SORT|inlined.0 + block $~lib/util/sort/SORT|inlined.0 local.get $3 - local.set $7 - i32.const 0 - local.set $6 + local.set $5 local.get $2 local.set $4 local.get $1 - local.set $5 + local.set $6 local.get $4 i32.const 256 i32.lt_s if - local.get $7 - local.get $6 - local.get $4 local.get $5 - call $~lib/internal/sort/insertionSort - else - local.get $7 - local.get $6 local.get $4 + local.get $6 + call $~lib/util/sort/insertionSort + else local.get $5 - call $~lib/internal/sort/weakHeapSort + local.get $4 + local.get $6 + call $~lib/util/sort/weakHeapSort end end local.get $0 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 122 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 123 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 123 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 124 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -8312,9 +6643,9 @@ end unreachable end - block $~lib/internal/sort/COMPARATOR|inlined.0 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) i32.const 46 - br $~lib/internal/sort/COMPARATOR|inlined.0 + br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 end @@ -8322,107 +6653,74 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/internal/sort/insertionSort (; 124 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/insertionSort (; 125 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 - local.get $4 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $6 + local.set $5 block $break|1 loop $continue|1 - local.get $6 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result i32) - local.get $0 - local.set $5 - local.get $6 - local.set $8 - local.get $1 - local.set $9 - local.get $5 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - i32.load offset=8 - end - local.set $9 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $9 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if local.get $0 - local.set $8 block (result i32) - local.get $6 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $6 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $8 - local.get $5 i32.const 2 i32.shl i32.add - local.get $11 - i32.add - local.get $10 - i32.store offset=8 + local.get $6 + i32.store else br $break|1 end @@ -8431,39 +6729,28 @@ end end end - block $~lib/internal/arraybuffer/STORE|inlined.4 - local.get $0 - local.set $9 - local.get $6 - i32.const 1 - i32.add - local.set $11 - local.get $7 - local.set $10 - local.get $1 - local.set $5 - local.get $9 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + i32.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 125 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/weakHeapSort (; 126 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -8471,67 +6758,49 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - local.get $2 + local.get $1 i32.const 31 i32.add i32.const 5 i32.shr_s i32.const 2 i32.shl + local.set $3 + local.get $3 + call $~lib/memory/memory.allocate local.set $4 - block $~lib/memory/memory.allocate|inlined.4 (result i32) - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.4 - end - local.set $6 - block $~lib/memory/memory.fill|inlined.8 - local.get $6 - local.set $5 - i32.const 0 - local.set $7 - local.get $4 - local.set $8 - local.get $5 - local.get $7 - local.get $8 - call $~lib/internal/memory/memset - end + local.get $4 + i32.const 0 + local.get $3 + call $~lib/memory/memory.fill block $break|0 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|0 - local.get $8 + local.get $5 i32.const 0 i32.gt_s i32.eqz br_if $break|0 block - local.get $8 - local.set $7 + local.get $5 + local.set $6 block $break|1 loop $continue|1 - local.get $7 + local.get $6 i32.const 1 i32.and + local.get $4 local.get $6 - local.get $7 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $7 + local.get $6 i32.const 1 i32.shr_s i32.const 31 @@ -8541,72 +6810,52 @@ i32.and i32.eq if - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $7 + local.set $6 br $continue|1 end end end - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i32) - local.get $0 - local.set $9 - local.get $5 - local.set $10 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result i32) - local.get $0 - local.set $10 - local.get $8 - local.set $9 - local.get $1 - local.set $12 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i32.load offset=8 - end - local.set $12 + local.set $7 + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $8 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $9 block (result i32) i32.const 2 global.set $~lib/argc - local.get $11 - local.get $12 - local.get $3 + local.get $8 + local.get $9 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 @@ -8614,236 +6863,136 @@ i32.add i32.load i32.const 1 - local.get $8 + local.get $5 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.5 - local.get $0 - local.set $9 - local.get $8 - local.set $10 - local.get $11 - local.set $13 - local.get $1 - local.set $14 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - local.get $13 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.6 - local.get $0 - local.set $14 - local.get $5 - local.set $13 - local.get $12 - local.set $10 - local.get $1 - local.set $9 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - i32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.get $8 + i32.store + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|0 unreachable end unreachable end block $break|2 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|2 - local.get $8 + local.get $5 i32.const 2 i32.ge_s i32.eqz br_if $break|2 block - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i32) - local.get $0 - local.set $12 - i32.const 0 - local.set $11 - local.get $1 - local.set $5 - local.get $12 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - end - local.set $5 - block $~lib/internal/arraybuffer/STORE|inlined.7 - local.get $0 - local.set $11 - i32.const 0 - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.8 (result i32) - local.get $0 - local.set $7 - local.get $8 - local.set $9 - local.get $1 - local.set $10 - local.get $7 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $10 - local.get $1 - local.set $9 - local.get $11 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.8 - local.get $0 - local.set $9 - local.get $8 - local.set $10 - local.get $5 - local.set $12 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - i32.store offset=8 - end + local.get $0 + i32.load + local.set $9 + local.get $0 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + i32.store + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store i32.const 1 - local.set $11 + local.set $8 block $break|3 loop $continue|3 - local.get $11 + local.get $8 i32.const 1 i32.shl - local.get $6 - local.get $11 + local.get $4 + local.get $8 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $11 + local.get $8 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and i32.add - local.tee $12 - local.get $8 + local.tee $7 + local.get $5 i32.lt_s if - local.get $12 - local.set $11 + local.get $7 + local.set $8 br $continue|3 end end end block $break|4 loop $continue|4 - local.get $11 + local.get $8 i32.const 0 i32.gt_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result i32) - local.get $0 - local.set $10 - i32.const 0 - local.set $9 - local.get $1 - local.set $7 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result i32) - local.get $0 - local.set $7 - local.get $11 - local.set $9 - local.get $1 - local.set $10 - local.get $7 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $10 + local.get $0 + i32.load + local.set $9 + local.get $0 + local.get $8 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $5 - local.get $10 - local.get $3 + local.get $9 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - local.get $6 - local.get $11 + local.get $4 + local.get $8 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $11 + local.get $4 + local.get $8 i32.const 5 i32.shr_s i32.const 2 @@ -8851,169 +7000,73 @@ i32.add i32.load i32.const 1 - local.get $11 + local.get $8 i32.const 31 i32.and i32.shl - i32.xor + i32.xor + i32.store + local.get $0 + local.get $8 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store + local.get $0 + local.get $6 i32.store - block $~lib/internal/arraybuffer/STORE|inlined.9 - local.get $0 - local.set $9 - local.get $11 - local.set $7 - local.get $5 - local.set $13 - local.get $1 - local.set $14 - local.get $9 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - local.get $13 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.10 - local.get $0 - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.set $7 - local.get $1 - local.set $9 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $7 - i32.store offset=8 - end end - local.get $11 + local.get $8 i32.const 1 i32.shr_s - local.set $11 + local.set $8 end br $continue|4 end end end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|2 unreachable end unreachable end - block $~lib/memory/memory.free|inlined.4 - local.get $6 - local.set $8 - local.get $8 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.4 - end - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i32) - local.get $0 - local.set $8 - i32.const 1 - local.set $12 - local.get $1 - local.set $11 - local.get $8 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/STORE|inlined.11 - local.get $0 - local.set $11 - i32.const 1 - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result i32) - local.get $0 - local.set $8 - i32.const 0 - local.set $5 - local.get $1 - local.set $10 - local.get $8 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $10 - local.get $1 - local.set $5 - local.get $11 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.12 - local.get $0 - local.set $5 - i32.const 0 - local.set $10 - local.get $15 - local.set $12 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - i32.store offset=8 - end + local.get $4 + call $~lib/memory/memory.free + local.get $0 + i32.load offset=4 + local.set $10 + local.get $0 + local.get $0 + i32.load + i32.store offset=4 + local.get $0 + local.get $10 + i32.store ) - (func $~lib/array/Array#sort (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -9023,128 +7076,64 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - i32.const 0 - local.set $7 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $6 - local.get $7 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $7 - local.set $8 - i32.const 0 - local.set $9 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $3 - local.set $9 - i32.const 0 - local.set $8 - local.get $6 - local.set $5 - i32.const 0 - local.set $4 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - local.get $5 - i32.store offset=8 - end + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store end local.get $0 return end - block $~lib/internal/sort/SORT|inlined.0 + block $~lib/util/sort/SORT|inlined.0 local.get $3 - local.set $7 - i32.const 0 - local.set $6 + local.set $5 local.get $2 local.set $4 local.get $1 - local.set $5 + local.set $6 local.get $4 i32.const 256 i32.lt_s if - local.get $7 - local.get $6 - local.get $4 local.get $5 - call $~lib/internal/sort/insertionSort - else - local.get $7 - local.get $6 local.get $4 + local.get $6 + call $~lib/util/sort/insertionSort + else local.get $5 - call $~lib/internal/sort/weakHeapSort + local.get $4 + local.get $6 + call $~lib/util/sort/weakHeapSort end end local.get $0 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -9153,7 +7142,7 @@ i32.lt_u i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -9162,9 +7151,9 @@ end unreachable end - block $~lib/internal/sort/COMPARATOR|inlined.0 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) i32.const 47 - br $~lib/internal/sort/COMPARATOR|inlined.0 + br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 end @@ -9172,10 +7161,9 @@ local.get $1 call $~lib/array/Array#sort ) - (func $std/array/createReverseOrderedArray (; 129 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 130 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) i32.const 0 local.get $0 call $~lib/array/Array#constructor @@ -9185,28 +7173,24 @@ local.set $2 loop $repeat|0 local.get $2 - block $~lib/array/Array#get:length|inlined.43 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.lt_s i32.eqz br_if $break|0 local.get $1 + i32.load offset=4 local.get $2 - block $~lib/array/Array#get:length|inlined.44 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + i32.const 2 + i32.shl + i32.add + local.get $1 + call $~lib/array/Array#get:length i32.const 1 i32.sub local.get $2 i32.sub - call $~lib/array/Array#__set + i32.store local.get $2 i32.const 1 i32.add @@ -9218,7 +7202,7 @@ end local.get $1 ) - (func $~lib/math/NativeMath.random (; 130 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 131 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) (local $2 i64) @@ -9226,8 +7210,8 @@ i32.eqz if i32.const 0 - i32.const 2896 - i32.const 987 + i32.const 2296 + i32.const 1030 i32.const 24 call $~lib/env/abort unreachable @@ -9275,10 +7259,9 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 131 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 132 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) i32.const 0 local.get $0 call $~lib/array/Array#constructor @@ -9288,28 +7271,24 @@ local.set $2 loop $repeat|0 local.get $2 - block $~lib/array/Array#get:length|inlined.46 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.lt_s i32.eqz br_if $break|0 local.get $1 + i32.load offset=4 local.get $2 + i32.const 2 + i32.shl + i32.add call $~lib/math/NativeMath.random - block $~lib/array/Array#get:length|inlined.47 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length f64.convert_i32_s f64.mul i32.trunc_f64_s - call $~lib/array/Array#__set + i32.store local.get $2 i32.const 1 i32.add @@ -9321,24 +7300,22 @@ end local.get $1 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|1 (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $std/array/isSorted (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 134 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) block $break|0 block i32.const 1 local.set $2 - block $~lib/array/Array#get:length|inlined.48 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array#get:length local.set $3 end loop $repeat|0 @@ -9351,13 +7328,37 @@ i32.const 2 global.set $~lib/argc local.get $0 + local.tee $4 + i32.load offset=4 local.get $2 i32.const 1 i32.sub - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $0 + local.tee $4 + i32.load offset=4 local.get $2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $1 call_indirect (type $FUNCSIG$iii) end @@ -9378,7 +7379,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 134 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 135 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -9394,199 +7395,91 @@ unreachable end ) - (func $std/array/assertSortedDefault (; 135 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 136 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - block $~lib/internal/sort/COMPARATOR|inlined.1 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.1 (result i32) i32.const 48 - br $~lib/internal/sort/COMPARATOR|inlined.1 + br $~lib/util/sort/COMPARATOR|inlined.1 end call $std/array/assertSorted ) - (func $start:std/array~anonymous|43 (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|43 (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|44 (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $start:std/array~anonymous|45 (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|45 (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|46 (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|46 (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array>#constructor (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 11 + call $~lib/runtime/doRegister end local.get $1 i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - end - local.get $3 - i32.store + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 local.get $0 local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.9 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end + i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>#__set (; 141 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) + (func $~lib/array/Array>#get:length (; 142 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + i32.load offset=12 + ) + (func $~lib/runtime/assertRegistered (; 143 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub i32.load - local.set $3 - local.get $3 - i32.load - i32.const 2 - i32.shr_u - local.set $4 - local.get $1 - local.get $4 - i32.ge_u + global.get $~lib/runtime/HEADER_MAGIC + i32.ne + i32.eqz if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - end - block $~lib/internal/arraybuffer/STORE,Array>|inlined.0 - local.get $3 - local.set $5 - local.get $1 - local.set $6 - local.get $2 - local.set $7 i32.const 0 - local.set $8 - local.get $5 - local.get $6 + i32.const 16 + i32.const 199 i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $7 - i32.store offset=8 + call $~lib/env/abort + unreachable end ) - (func $~lib/array/Array>#__get (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/runtime/doLink (; 144 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 - i32.load - local.set $2 + call $~lib/runtime/assertRegistered local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/runtime/assertRegistered ) - (func $std/array/createReverseOrderedNestedArray (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) i32.const 0 local.get $0 call $~lib/array/Array>#constructor @@ -9596,37 +7489,53 @@ local.set $2 loop $repeat|0 local.get $2 - block $~lib/array/Array>#get:length|inlined.1 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array>#get:length i32.lt_s i32.eqz br_if $break|0 block local.get $1 + local.tee $3 + i32.load offset=4 local.get $2 - i32.const 0 - i32.const 1 - call $~lib/array/Array#constructor - call $~lib/array/Array>#__set - local.get $1 - local.get $2 - call $~lib/array/Array>#__get - i32.const 0 - block $~lib/array/Array>#get:length|inlined.2 (result i32) - local.get $1 - local.set $3 + i32.const 2 + i32.shl + i32.add + block $~lib/runtime/LINK,Array>>|inlined.0 (result i32) + i32.const 0 + i32.const 1 + call $~lib/array/Array#constructor + local.set $4 + local.get $4 local.get $3 - i32.load offset=4 + call $~lib/runtime/doLink + local.get $4 end + i32.store + local.get $1 + local.tee $3 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + local.tee $4 + i32.add + i32.const -1 + local.get $4 + local.get $3 + i32.load offset=8 + i32.lt_u + select + i32.load + i32.load offset=4 + local.get $1 + call $~lib/array/Array>#get:length i32.const 1 i32.sub local.get $2 i32.sub - call $~lib/array/Array#__set + i32.store end local.get $2 i32.const 1 @@ -9639,116 +7548,109 @@ end local.get $1 ) - (func $start:std/array~anonymous|47 (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $2 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $1 + local.tee $2 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.sub ) - (func $~lib/internal/sort/insertionSort> (; 145 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/insertionSort> (; 147 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s - i32.eqz - br_if $break|0 - block - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.3 (result i32) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 - local.get $4 + i32.eqz + br_if $break|0 + block + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $6 + local.set $5 block $break|1 loop $continue|1 - local.get $6 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.4 (result i32) - local.get $0 - local.set $5 - local.get $6 - local.set $8 - local.get $1 - local.set $9 - local.get $5 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - i32.load offset=8 - end - local.set $9 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $9 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if local.get $0 - local.set $8 block (result i32) - local.get $6 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $6 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $8 - local.get $5 i32.const 2 i32.shl i32.add - local.get $11 - i32.add - local.get $10 - i32.store offset=8 + local.get $6 + i32.store else br $break|1 end @@ -9757,59 +7659,44 @@ end end end - block $~lib/internal/arraybuffer/STORE,Array>|inlined.4 - local.get $0 - local.set $9 - local.get $6 - i32.const 1 - i32.add - local.set $11 - local.get $7 - local.set $10 - local.get $1 - local.set $5 - local.get $9 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + i32.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/array/Array>#sort (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -9819,129 +7706,64 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.1 (result i32) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end - local.set $6 - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.2 (result i32) - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - i32.const 0 - local.set $7 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $6 - local.get $7 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE,Array>|inlined.1 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $7 - local.set $8 - i32.const 0 - local.set $9 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE,Array>|inlined.2 - local.get $3 - local.set $9 - i32.const 0 - local.set $8 - local.get $6 - local.set $5 - i32.const 0 - local.set $4 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - local.get $5 - i32.store offset=8 - end + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store end local.get $0 return end - block $~lib/internal/sort/SORT>|inlined.0 + block $~lib/util/sort/SORT>|inlined.0 local.get $3 - local.set $7 - i32.const 0 - local.set $6 + local.set $5 local.get $2 local.set $4 local.get $1 - local.set $5 - local.get $7 - local.get $6 - local.get $4 + local.set $6 local.get $5 - call $~lib/internal/sort/insertionSort> + local.get $4 + local.get $6 + call $~lib/util/sort/insertionSort> end local.get $0 ) - (func $std/array/isSorted> (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) block $break|0 block i32.const 1 local.set $2 - block $~lib/array/Array>#get:length|inlined.3 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array>#get:length local.set $3 end loop $repeat|0 @@ -9954,13 +7776,37 @@ i32.const 2 global.set $~lib/argc local.get $0 + local.tee $4 + i32.load offset=4 local.get $2 i32.const 1 i32.sub - call $~lib/array/Array>#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $0 + local.tee $4 + i32.load offset=4 local.get $2 - call $~lib/array/Array>#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $1 call_indirect (type $FUNCSIG$iii) end @@ -9981,7 +7827,7 @@ end i32.const 1 ) - (func $std/array/assertSorted> (; 148 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 150 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -9997,73 +7843,48 @@ unreachable end ) - (func $~lib/array/Array>#constructor (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - end - local.get $3 - i32.store local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.10 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset + i32.const 12 + call $~lib/runtime/doRegister end + local.get $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/array/Array>#get:length (; 152 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + i32.load offset=12 ) - (func $std/array/Proxy#constructor (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/Proxy#constructor (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 i32.eqz if - i32.const 4 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 4 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 13 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -10071,77 +7892,11 @@ i32.store local.get $0 ) - (func $~lib/array/Array>#__set (; 151 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 - i32.load - local.set $3 - local.get $3 - i32.load - i32.const 2 - i32.shr_u - local.set $4 - local.get $1 - local.get $4 - i32.ge_u - if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - end - block $~lib/internal/arraybuffer/STORE,Proxy>|inlined.0 - local.get $3 - local.set $5 - local.get $1 - local.set $6 - local.get $2 - local.set $7 - i32.const 0 - local.set $8 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $7 - i32.store offset=8 - end - ) - (func $std/array/createReverseOrderedElementsArray (; 152 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 154 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) i32.const 0 local.get $0 call $~lib/array/Array>#constructor @@ -10151,30 +7906,34 @@ local.set $2 loop $repeat|0 local.get $2 - block $~lib/array/Array>#get:length|inlined.1 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array>#get:length i32.lt_s i32.eqz br_if $break|0 local.get $1 + local.tee $3 + i32.load offset=4 local.get $2 - i32.const 0 - block $~lib/array/Array>#get:length|inlined.2 (result i32) + i32.const 2 + i32.shl + i32.add + block $~lib/runtime/LINK,Array>>|inlined.0 (result i32) + i32.const 0 local.get $1 - local.set $3 + call $~lib/array/Array>#get:length + i32.const 1 + i32.sub + local.get $2 + i32.sub + call $std/array/Proxy#constructor + local.set $4 + local.get $4 local.get $3 - i32.load offset=4 + call $~lib/runtime/doLink + local.get $4 end - i32.const 1 - i32.sub - local.get $2 - i32.sub - call $std/array/Proxy#constructor - call $~lib/array/Array>#__set + i32.store local.get $2 i32.const 1 i32.add @@ -10186,114 +7945,81 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/internal/sort/insertionSort> (; 154 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/insertionSort> (; 156 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD,Proxy>|inlined.2 (result i32) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 - local.get $4 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $6 + local.set $5 block $break|1 loop $continue|1 - local.get $6 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD,Proxy>|inlined.3 (result i32) - local.get $0 - local.set $5 - local.get $6 - local.set $8 - local.get $1 - local.set $9 - local.get $5 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - i32.load offset=8 - end - local.set $9 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $9 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if local.get $0 - local.set $8 block (result i32) - local.get $6 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $6 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $8 - local.get $5 i32.const 2 i32.shl i32.add - local.get $11 - i32.add - local.get $10 - i32.store offset=8 + local.get $6 + i32.store else br $break|1 end @@ -10302,59 +8028,44 @@ end end end - block $~lib/internal/arraybuffer/STORE,Proxy>|inlined.4 - local.get $0 - local.set $9 - local.get $6 - i32.const 1 - i32.add - local.set $11 - local.get $7 - local.set $10 - local.get $1 - local.set $5 - local.get $9 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + i32.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/array/Array>#sort (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -10364,162 +8075,64 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD,Proxy>|inlined.0 (result i32) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end - local.set $6 - block $~lib/internal/arraybuffer/LOAD,Proxy>|inlined.1 (result i32) - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - i32.const 0 - local.set $7 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $6 - local.get $7 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE,Proxy>|inlined.1 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $7 - local.set $8 - i32.const 0 - local.set $9 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE,Proxy>|inlined.2 - local.get $3 - local.set $9 - i32.const 0 - local.set $8 - local.get $6 - local.set $5 - i32.const 0 - local.set $4 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - local.get $5 - i32.store offset=8 - end + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store end local.get $0 return end - block $~lib/internal/sort/SORT>|inlined.0 + block $~lib/util/sort/SORT>|inlined.0 local.get $3 - local.set $7 - i32.const 0 - local.set $6 + local.set $5 local.get $2 local.set $4 local.get $1 - local.set $5 - local.get $7 - local.get $6 - local.get $4 + local.set $6 local.get $5 - call $~lib/internal/sort/insertionSort> + local.get $4 + local.get $6 + call $~lib/util/sort/insertionSort> end local.get $0 ) - (func $~lib/array/Array>#__get (; 156 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $std/array/isSorted> (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) block $break|0 block i32.const 1 local.set $2 - block $~lib/array/Array>#get:length|inlined.3 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array>#get:length local.set $3 end loop $repeat|0 @@ -10532,13 +8145,37 @@ i32.const 2 global.set $~lib/argc local.get $0 + local.tee $4 + i32.load offset=4 local.get $2 i32.const 1 i32.sub - call $~lib/array/Array>#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $0 + local.tee $4 + i32.load offset=4 local.get $2 - call $~lib/array/Array>#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $1 call_indirect (type $FUNCSIG$iii) end @@ -10559,7 +8196,7 @@ end i32.const 1 ) - (func $std/array/assertSorted> (; 158 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 159 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -10575,107 +8212,74 @@ unreachable end ) - (func $~lib/internal/sort/insertionSort (; 159 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/insertionSort (; 160 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 - local.get $4 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $6 + local.set $5 block $break|1 loop $continue|1 - local.get $6 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $0 - local.set $5 - local.get $6 - local.set $8 - local.get $1 - local.set $9 - local.get $5 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - i32.load offset=8 - end - local.set $9 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $9 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if local.get $0 - local.set $8 block (result i32) - local.get $6 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $6 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $8 - local.get $5 i32.const 2 i32.shl i32.add - local.get $11 - i32.add - local.get $10 - i32.store offset=8 + local.get $6 + i32.store else br $break|1 end @@ -10684,59 +8288,44 @@ end end end - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $0 - local.set $9 - local.get $6 - i32.const 1 - i32.add - local.set $11 - local.get $7 - local.set $10 - local.get $1 - local.set $5 - local.get $9 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + i32.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/array/Array#sort (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -10746,162 +8335,68 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - i32.const 0 - local.set $7 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $6 - local.get $7 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $7 - local.set $8 - i32.const 0 - local.set $9 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $3 - local.set $9 - i32.const 0 - local.set $8 - local.get $6 - local.set $5 - i32.const 0 - local.set $4 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - local.get $5 - i32.store offset=8 - end + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store end local.get $0 return end - block $~lib/internal/sort/SORT|inlined.0 + block $~lib/util/sort/SORT|inlined.0 local.get $3 - local.set $7 - i32.const 0 - local.set $6 + local.set $5 local.get $2 local.set $4 local.get $1 - local.set $5 - local.get $7 - local.get $6 - local.get $4 + local.set $6 local.get $5 - call $~lib/internal/sort/insertionSort + local.get $4 + local.get $6 + call $~lib/util/sort/insertionSort end local.get $0 ) - (func $~lib/array/Array#__get (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#get:length (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=12 ) - (func $std/array/isSorted (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) block $break|0 block i32.const 1 local.set $2 - block $~lib/array/Array#get:length|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array#get:length local.set $3 end loop $repeat|0 @@ -10914,13 +8409,37 @@ i32.const 2 global.set $~lib/argc local.get $0 + local.tee $4 + i32.load offset=4 local.get $2 i32.const 1 i32.sub - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $0 + local.tee $4 + i32.load offset=4 local.get $2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $1 call_indirect (type $FUNCSIG$iii) end @@ -10941,7 +8460,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 163 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 164 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -10957,7 +8476,15 @@ unreachable end ) - (func $~lib/internal/string/compareUnsafe (; 164 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (func $~lib/string/String#get:length (; 165 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/string/compareImpl (; 166 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -10980,9 +8507,9 @@ local.get $4 if (result i32) local.get $6 - i32.load16_u offset=4 + i32.load16_u local.get $7 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $5 i32.eqz @@ -11010,7 +8537,7 @@ end local.get $5 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11039,10 +8566,10 @@ return end local.get $0 - i32.load + call $~lib/string/String#get:length local.set $3 local.get $1 - i32.load + call $~lib/string/String#get:length local.set $4 local.get $3 i32.eqz @@ -11081,9 +8608,9 @@ local.get $5 i32.lt_s select - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted|trampoline (; 166 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted|trampoline (; 168 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $1of1 block $0of1 block $outOfRange @@ -11094,9 +8621,9 @@ end unreachable end - block $~lib/internal/sort/COMPARATOR|inlined.0 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) i32.const 55 - br $~lib/internal/sort/COMPARATOR|inlined.0 + br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 end @@ -11104,7 +8631,7 @@ local.get $1 call $std/array/assertSorted ) - (func $~lib/string/String.__eq (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.eq (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -11130,11 +8657,11 @@ return end local.get $0 - i32.load + call $~lib/string/String#get:length local.set $3 local.get $3 local.get $1 - i32.load + call $~lib/string/String#get:length i32.ne if i32.const 0 @@ -11145,34 +8672,28 @@ local.get $1 i32.const 0 local.get $3 - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.__ne (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.ne (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 - call $~lib/string/String.__eq + call $~lib/string/String.eq i32.eqz ) - (func $std/array/isArraysEqual (; 169 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 171 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $2 i32.eqz if - block $~lib/array/Array#get:length|inlined.1 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array#get:length local.set $2 local.get $2 - block $~lib/array/Array#get:length|inlined.3 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.ne if i32.const 0 @@ -11196,12 +8717,36 @@ i32.eqz br_if $break|0 local.get $0 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $1 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get - call $~lib/string/String.__ne + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load + call $~lib/string/String.ne if i32.const 0 return @@ -11217,184 +8762,91 @@ end i32.const 1 ) - (func $~lib/array/Array#constructor (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - end - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.11 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - local.get $0 - ) - (func $~lib/internal/string/allocateUnsafe (; 171 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/array/Array#constructor (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 0 - i32.gt_s - local.tee $1 if (result i32) local.get $0 - i32.const 536870910 - i32.le_s else - local.get $1 - end - i32.eqz - if - i32.const 0 - i32.const 4088 + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 i32.const 14 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.5 (result i32) - i32.const 4 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.5 + call $~lib/runtime/doRegister end - local.set $2 - local.get $2 + local.get $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 local.get $0 - i32.store - local.get $2 ) - (func $~lib/string/String#charAt (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#charAt (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 4056 - i32.const 58 + i32.const 3400 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable end local.get $1 local.get $0 - i32.load + call $~lib/string/String#get:length i32.ge_u if - i32.const 3904 + i32.const 3264 return end - i32.const 1 - call $~lib/internal/string/allocateUnsafe - local.set $2 - local.get $2 - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u offset=4 - i32.store16 offset=4 - local.get $2 - ) - (func $~lib/internal/string/copyUnsafe (; 173 ;) (type $FUNCSIG$viiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + i32.const 2 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end + local.set $3 + local.get $3 local.get $0 local.get $1 i32.const 1 i32.shl i32.add - i32.const 4 - i32.add - local.set $5 - local.get $2 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 4 - i32.add - local.set $6 - local.get $4 - i32.const 1 - i32.shl - local.set $7 - local.get $5 - local.get $6 - local.get $7 - call $~lib/internal/memory/memmove + i32.load16_u + i32.store16 + block $~lib/runtime/REGISTER|inlined.0 (result i32) + local.get $3 + local.set $2 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister + end ) (func $~lib/string/String#concat (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 4056 - i32.const 110 + i32.const 3400 + i32.const 65 i32.const 4 call $~lib/env/abort unreachable @@ -11403,14 +8855,18 @@ i32.const 0 i32.eq if - i32.const 4144 + i32.const 3440 local.set $1 end local.get $0 - i32.load + call $~lib/string/String#get:length + i32.const 1 + i32.shl local.set $2 local.get $1 - i32.load + call $~lib/string/String#get:length + i32.const 1 + i32.shl local.set $3 local.get $2 local.get $3 @@ -11420,31 +8876,39 @@ i32.const 0 i32.eq if - i32.const 3904 + i32.const 3264 return end - local.get $4 - call $~lib/internal/string/allocateUnsafe - local.set $5 - local.get $5 - i32.const 0 + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + local.get $4 + local.set $5 + local.get $5 + call $~lib/runtime/doAllocate + end + local.set $6 + local.get $6 local.get $0 - i32.const 0 local.get $2 - call $~lib/internal/string/copyUnsafe - local.get $5 + call $~lib/memory/memory.copy + local.get $6 local.get $2 + i32.add local.get $1 - i32.const 0 local.get $3 - call $~lib/internal/string/copyUnsafe - local.get $5 + call $~lib/memory/memory.copy + block $~lib/runtime/REGISTER|inlined.1 (result i32) + local.get $6 + local.set $5 + local.get $5 + i32.const 1 + call $~lib/runtime/doRegister + end ) - (func $~lib/string/String.__concat (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.concat (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if - i32.const 4144 + i32.const 3440 local.set $0 end local.get $0 @@ -11455,7 +8919,7 @@ (local $1 i32) (local $2 i32) (local $3 f64) - i32.const 3904 + i32.const 3264 local.set $1 block $break|0 i32.const 0 @@ -11471,7 +8935,7 @@ block $~lib/math/NativeMath.floor|inlined.0 (result f64) call $~lib/math/NativeMath.random global.get $std/array/charset - i32.load + call $~lib/string/String#get:length f64.convert_i32_s f64.mul local.set $3 @@ -11480,7 +8944,7 @@ end i32.trunc_f64_s call $~lib/string/String#charAt - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $1 local.get $2 i32.const 1 @@ -11493,77 +8957,11 @@ end local.get $1 ) - (func $~lib/array/Array#__set (; 177 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 - i32.load - local.set $3 - local.get $3 - i32.load - i32.const 2 - i32.shr_u - local.set $4 - local.get $1 - local.get $4 - i32.ge_u - if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - end - block $~lib/internal/arraybuffer/STORE|inlined.4 - local.get $3 - local.set $5 - local.get $1 - local.set $6 - local.get $2 - local.set $7 - i32.const 0 - local.set $8 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $7 - i32.store offset=8 - end - ) - (func $std/array/createRandomStringArray (; 178 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomStringArray (; 177 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) i32.const 0 local.get $0 call $~lib/array/Array#constructor @@ -11573,23 +8971,31 @@ local.set $2 loop $repeat|0 local.get $2 - block $~lib/array/Array#get:length|inlined.5 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.lt_s i32.eqz br_if $break|0 local.get $1 + local.tee $3 + i32.load offset=4 local.get $2 - call $~lib/math/NativeMath.random - f64.const 32 - f64.mul - i32.trunc_f64_s - call $std/array/createRandomString - call $~lib/array/Array#__set + i32.const 2 + i32.shl + i32.add + block $~lib/runtime/LINK>|inlined.0 (result i32) + call $~lib/math/NativeMath.random + f64.const 32 + f64.mul + i32.trunc_f64_s + call $std/array/createRandomString + local.set $4 + local.get $4 + local.get $3 + call $~lib/runtime/doLink + local.get $4 + end + i32.store local.get $2 i32.const 1 i32.add @@ -11601,7 +9007,7 @@ end local.get $1 ) - (func $~lib/string/String#substring (; 179 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 178 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11616,14 +9022,14 @@ i32.eqz if i32.const 0 - i32.const 4056 - i32.const 249 + i32.const 3400 + i32.const 190 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load + call $~lib/string/String#get:length local.set $3 local.get $1 local.tee $4 @@ -11665,6 +9071,8 @@ local.get $5 i32.lt_s select + i32.const 1 + i32.shl local.set $8 local.get $6 local.tee $4 @@ -11674,6 +9082,8 @@ local.get $5 i32.gt_s select + i32.const 1 + i32.shl local.set $9 local.get $9 local.get $8 @@ -11682,7 +9092,7 @@ local.get $3 i32.eqz if - i32.const 3904 + i32.const 3264 return end local.get $8 @@ -11691,7 +9101,9 @@ if (result i32) local.get $9 local.get $0 - i32.load + call $~lib/string/String#get:length + i32.const 1 + i32.shl i32.eq else local.get $4 @@ -11700,18 +9112,36 @@ local.get $0 return end - local.get $3 - call $~lib/internal/string/allocateUnsafe + block $~lib/runtime/ALLOCATE|inlined.4 (result i32) + local.get $3 + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + end local.set $10 local.get $10 - i32.const 0 local.get $0 local.get $8 + i32.add local.get $3 - call $~lib/internal/string/copyUnsafe - local.get $10 + call $~lib/memory/memory.copy + block $~lib/runtime/REGISTER|inlined.2 (result i32) + local.get $10 + local.set $4 + local.get $4 + i32.const 1 + call $~lib/runtime/doRegister + end + ) + (func $~lib/runtime/doDiscard (; 179 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + call $~lib/memory/memory.free ) - (func $~lib/array/Array#join (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_bool (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11722,12 +9152,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -11735,210 +9161,180 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - i32.const 4184 - i32.const 4200 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - i32.load8_u offset=8 - end + i32.const 3472 + i32.const 3488 + local.get $3 + i32.load8_u i32.const 0 i32.ne select return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 5 - local.set $10 - local.get $10 - local.get $6 + local.set $5 + local.get $5 + local.get $4 i32.add local.get $2 i32.mul - local.get $10 + local.get $5 i32.add - local.set $9 - local.get $9 - call $~lib/internal/string/allocateUnsafe + local.set $6 + block $~lib/runtime/ALLOCATE|inlined.3 (result i32) + local.get $6 + i32.const 1 + i32.shl + local.set $7 + local.get $7 + call $~lib/runtime/doAllocate + end local.set $8 i32.const 0 - local.set $11 + local.set $9 block $break|0 - i32.const 0 - local.set $12 - loop $repeat|0 - local.get $12 - local.get $2 - i32.lt_s - i32.eqz - br_if $break|0 - block - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $5 - local.set $13 - local.get $12 - local.set $14 - i32.const 0 - local.set $15 - local.get $13 - local.get $14 - i32.const 0 - i32.shl - i32.add - local.get $15 - i32.add - i32.load8_u offset=8 - end - local.set $4 + i32.const 0 + local.set $7 + loop $repeat|0 + local.get $7 + local.get $2 + i32.lt_s + i32.eqz + br_if $break|0 + block + local.get $3 + local.get $7 + i32.add + i32.load8_u + local.set $10 i32.const 4 - local.get $4 + local.get $10 i32.const 0 i32.ne i32.eqz i32.add - local.set $10 + local.set $5 local.get $8 - local.get $11 - i32.const 4184 - i32.const 4200 - local.get $4 + local.get $9 + i32.const 1 + i32.shl + i32.add + i32.const 3472 + i32.const 3488 + local.get $10 i32.const 0 i32.ne select - i32.const 0 - local.get $10 - call $~lib/internal/string/copyUnsafe - local.get $11 - local.get $10 + local.get $5 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $9 + local.get $5 i32.add - local.set $11 - local.get $7 + local.set $9 + local.get $4 if local.get $8 - local.get $11 + local.get $9 + i32.const 1 + i32.shl + i32.add local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $11 - local.get $6 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $9 + local.get $4 i32.add - local.set $11 + local.set $9 end end - local.get $12 + local.get $7 i32.const 1 i32.add - local.set $12 + local.set $7 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $12 - local.get $2 - local.set $15 - i32.const 0 - local.set $14 - local.get $12 - local.get $15 - i32.const 0 - i32.shl - i32.add - local.get $14 - i32.add - i32.load8_u offset=8 - end - local.set $4 + local.get $3 + local.get $2 + i32.add + i32.load8_u + local.set $10 i32.const 4 - local.get $4 + local.get $10 i32.const 0 i32.ne i32.eqz i32.add - local.set $10 + local.set $5 local.get $8 - local.get $11 - i32.const 4184 - i32.const 4200 - local.get $4 + local.get $9 + i32.const 1 + i32.shl + i32.add + i32.const 3472 + i32.const 3488 + local.get $10 i32.const 0 i32.ne select - i32.const 0 - local.get $10 - call $~lib/internal/string/copyUnsafe - local.get $11 - local.get $10 + local.get $5 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $9 + local.get $5 i32.add - local.set $11 - local.get $8 - local.set $14 + local.set $9 + local.get $6 local.get $9 - local.get $11 i32.gt_s if local.get $8 i32.const 0 - local.get $11 + local.get $9 call $~lib/string/String#substring - local.set $14 - block $~lib/internal/string/freeUnsafe|inlined.0 + local.set $7 + block $~lib/runtime/DISCARD|inlined.0 local.get $8 - local.set $15 - local.get $15 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.5 - local.get $15 - local.set $12 - local.get $12 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.5 - end + local.set $11 + local.get $11 + call $~lib/runtime/doDiscard end + local.get $7 + return end - local.get $14 + block $~lib/runtime/REGISTER|inlined.3 (result i32) + local.get $8 + local.set $7 + local.get $7 + i32.const 1 + call $~lib/runtime/doRegister + end + ) + (func $~lib/array/Array#join (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_bool return ) - (func $~lib/internal/number/decimalCount32 (; 181 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 182 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -12007,19 +9403,16 @@ unreachable unreachable ) - (func $~lib/internal/number/utoa32_lut (; 182 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 183 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i64) - (local $12 i64) - i32.const 4832 - i32.load + (local $8 i64) + (local $9 i64) + i32.const 4024 + i32.load offset=4 local.set $3 block $break|0 loop $continue|0 @@ -12046,40 +9439,20 @@ i32.const 100 i32.rem_u local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $3 - local.set $8 - local.get $6 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i64.load32_u offset=8 - end - local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i64) - local.get $3 - local.set $10 - local.get $7 - local.set $9 - i32.const 0 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i64.load32_u offset=8 - end - local.set $12 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $8 + local.get $3 + local.get $7 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $9 local.get $2 i32.const 4 i32.sub @@ -12089,12 +9462,12 @@ i32.const 1 i32.shl i32.add - local.get $11 - local.get $12 + local.get $8 + local.get $9 i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store end br $continue|0 end @@ -12118,30 +9491,20 @@ i32.const 2 i32.sub local.set $2 - block $~lib/internal/arraybuffer/LOAD|inlined.13 (result i32) - local.get $3 - local.set $5 - local.get $6 - local.set $4 - i32.const 0 - local.set $8 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $8 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $8 - i32.store offset=4 + local.get $5 + i32.store end local.get $1 i32.const 10 @@ -12151,30 +9514,20 @@ i32.const 2 i32.sub local.set $2 - block $~lib/internal/arraybuffer/LOAD|inlined.14 (result i32) - local.get $3 - local.set $8 - local.get $1 - local.set $6 - i32.const 0 - local.set $7 - local.get $8 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $7 - i32.store offset=4 + local.get $5 + i32.store else local.get $2 i32.const 1 @@ -12183,17 +9536,17 @@ i32.const 48 local.get $1 i32.add - local.set $7 + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $7 - i32.store16 offset=4 + local.get $5 + i32.store16 end ) - (func $~lib/internal/number/itoa32 (; 183 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 184 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12203,7 +9556,7 @@ local.get $0 i32.eqz if - i32.const 4312 + i32.const 3600 return end local.get $0 @@ -12218,39 +9571,51 @@ local.set $0 end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.set $2 - local.get $2 - call $~lib/internal/string/allocateUnsafe - local.set $3 - block $~lib/internal/number/utoa32_core|inlined.0 + block $~lib/runtime/ALLOCATE|inlined.5 (result i32) + local.get $2 + i32.const 1 + i32.shl + local.set $3 local.get $3 - local.set $4 + call $~lib/runtime/doAllocate + end + local.set $4 + block $~lib/util/number/utoa32_core|inlined.0 + local.get $4 + local.set $3 local.get $0 local.set $5 local.get $2 local.set $6 - local.get $4 + local.get $3 local.get $5 local.get $6 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $1 if - local.get $3 + local.get $4 i32.const 45 - i32.store16 offset=4 + i32.store16 + end + block $~lib/runtime/REGISTER|inlined.4 (result i32) + local.get $4 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister end - local.get $3 ) - (func $~lib/internal/number/itoa (; 184 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 185 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 return ) - (func $~lib/internal/number/itoa_stream (; 185 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 186 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12267,7 +9632,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -12285,11 +9650,11 @@ local.set $2 end local.get $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $4 i32.add local.set $3 - block $~lib/internal/number/utoa32_core|inlined.1 + block $~lib/util/number/utoa32_core|inlined.1 local.get $0 local.set $5 local.get $2 @@ -12299,17 +9664,17 @@ local.get $5 local.get $6 local.get $7 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $4 if local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $3 ) - (func $~lib/array/Array#join (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 187 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12319,12 +9684,8 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -12332,174 +9693,140 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.34 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i32.load + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 11 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 11 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + block $~lib/runtime/ALLOCATE|inlined.6 (result i32) + local.get $5 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $7 i32.const 0 local.set $8 block $break|0 i32.const 0 - local.set $11 + local.set $6 loop $repeat|0 - local.get $11 + local.get $6 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.35 (result i32) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i32.load offset=8 - end - local.set $4 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $9 local.get $8 - local.get $9 + local.get $7 local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $9 + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $7 + local.get $4 if - local.get $9 + local.get $7 local.get $8 + i32.const 1 + i32.shl + i32.add local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $8 - local.get $6 + local.get $4 i32.add local.set $8 end end - local.get $11 + local.get $6 i32.const 1 i32.add - local.set $11 + local.set $6 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.36 (result i32) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 2 - i32.shl - i32.add - local.get $13 - i32.add - i32.load offset=8 - end - local.set $4 + local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $9 local.get $8 - local.get $9 + local.get $7 local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $9 + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $5 local.get $8 i32.gt_s if - local.get $9 + local.get $7 i32.const 0 local.get $8 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.1 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.6 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.6 - end + local.set $6 + block $~lib/runtime/DISCARD|inlined.1 + local.get $7 + local.set $10 + local.get $10 + call $~lib/runtime/doDiscard end + local.get $6 + return + end + block $~lib/runtime/REGISTER|inlined.5 (result i32) + local.get $7 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister end - local.get $13 + ) + (func $~lib/array/Array#join (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int return ) - (func $~lib/internal/number/utoa32 (; 187 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 189 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12508,35 +9835,47 @@ local.get $0 i32.eqz if - i32.const 4312 + i32.const 3600 return end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $1 - local.get $1 - call $~lib/internal/string/allocateUnsafe - local.set $2 - block $~lib/internal/number/utoa32_core|inlined.2 + block $~lib/runtime/ALLOCATE|inlined.7 (result i32) + local.get $1 + i32.const 1 + i32.shl + local.set $2 local.get $2 - local.set $3 + call $~lib/runtime/doAllocate + end + local.set $3 + block $~lib/util/number/utoa32_core|inlined.2 + local.get $3 + local.set $2 local.get $0 local.set $4 local.get $1 local.set $5 - local.get $3 + local.get $2 local.get $4 local.get $5 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut + end + block $~lib/runtime/REGISTER|inlined.6 (result i32) + local.get $3 + local.set $5 + local.get $5 + i32.const 1 + call $~lib/runtime/doRegister end - local.get $2 ) - (func $~lib/internal/number/itoa (; 188 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 190 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/internal/number/utoa32 + call $~lib/util/number/utoa32 return ) - (func $~lib/internal/number/itoa_stream (; 189 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 191 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12552,16 +9891,16 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end i32.const 0 local.set $3 local.get $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 - block $~lib/internal/number/utoa32_core|inlined.3 + block $~lib/util/number/utoa32_core|inlined.3 local.get $0 local.set $4 local.get $2 @@ -12571,11 +9910,11 @@ local.get $4 local.get $5 local.get $6 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $3 ) - (func $~lib/array/Array#join (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12585,12 +9924,8 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -12598,181 +9933,147 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.15 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i32.load + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 10 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 10 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + block $~lib/runtime/ALLOCATE|inlined.8 (result i32) + local.get $5 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $7 i32.const 0 local.set $8 block $break|0 i32.const 0 - local.set $11 + local.set $6 loop $repeat|0 - local.get $11 + local.get $6 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.16 (result i32) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i32.load offset=8 - end - local.set $4 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $9 local.get $8 - local.get $9 + local.get $7 local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $9 + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $7 + local.get $4 if - local.get $9 + local.get $7 local.get $8 + i32.const 1 + i32.shl + i32.add local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $8 - local.get $6 + local.get $4 i32.add local.set $8 end end - local.get $11 + local.get $6 i32.const 1 i32.add - local.set $11 + local.set $6 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.17 (result i32) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 2 - i32.shl - i32.add - local.get $13 - i32.add - i32.load offset=8 - end - local.set $4 + local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $9 local.get $8 - local.get $9 + local.get $7 local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $9 + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $5 local.get $8 i32.gt_s if - local.get $9 + local.get $7 i32.const 0 local.get $8 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.2 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.7 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.7 - end + local.set $6 + block $~lib/runtime/DISCARD|inlined.2 + local.get $7 + local.set $10 + local.get $10 + call $~lib/runtime/doDiscard end + local.get $6 + return + end + block $~lib/runtime/REGISTER|inlined.7 (result i32) + local.get $7 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister end - local.get $13 + ) + (func $~lib/array/Array#join (; 193 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int return ) - (func $~lib/builtins/isFinite (; 191 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 194 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/internal/number/genDigits (; 192 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 195 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -12789,11 +10090,11 @@ (local $20 i32) (local $21 i64) (local $22 i64) - (local $23 i32) - (local $24 i32) + (local $23 i64) + (local $24 i64) (local $25 i32) - (local $26 i64) - (local $27 i64) + (local $26 i32) + (local $27 i32) i32.const 0 local.get $4 i32.sub @@ -12824,12 +10125,12 @@ i64.and local.set $13 local.get $12 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $14 local.get $6 local.set $15 - i32.const 6616 - i32.load + i32.const 5408 + i32.load offset=4 local.set $16 block $break|0 loop $continue|0 @@ -13059,7 +10360,7 @@ i32.const 65535 i32.and i32.add - i32.store16 offset=4 + i32.store16 end local.get $14 i32.const 1 @@ -13077,11 +10378,11 @@ local.get $5 i64.le_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $14 i32.add - global.set $~lib/internal/number/_K - block $~lib/internal/number/grisuRound|inlined.0 + global.set $~lib/util/number/_K + block $~lib/util/number/grisuRound|inlined.0 local.get $0 local.set $18 local.get $15 @@ -13090,28 +10391,18 @@ local.set $21 local.get $19 local.set $22 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i64) - local.get $16 - local.set $23 - local.get $14 - local.set $24 - i32.const 0 - local.set $25 - local.get $23 - local.get $24 - i32.const 2 - i32.shl - i32.add - local.get $25 - i32.add - i64.load32_u offset=8 - end + local.get $16 + local.get $14 + i32.const 2 + i32.shl + i32.add + i64.load32_u local.get $7 i64.extend_i32_s i64.shl - local.set $26 + local.set $23 local.get $10 - local.set $27 + local.set $24 local.get $18 local.get $20 i32.const 1 @@ -13121,55 +10412,55 @@ i32.add local.set $25 local.get $25 - i32.load16_u offset=4 - local.set $24 + i32.load16_u + local.set $26 block $break|2 loop $continue|2 local.get $22 - local.get $27 + local.get $24 i64.lt_u - local.tee $23 + local.tee $27 if (result i32) local.get $21 local.get $22 i64.sub - local.get $26 + local.get $23 i64.ge_u else - local.get $23 + local.get $27 end - local.tee $23 + local.tee $27 if (result i32) local.get $22 - local.get $26 + local.get $23 i64.add - local.get $27 + local.get $24 i64.lt_u - local.tee $23 + local.tee $27 if (result i32) - local.get $23 - else local.get $27 + else + local.get $24 local.get $22 i64.sub local.get $22 - local.get $26 + local.get $23 i64.add - local.get $27 + local.get $24 i64.sub i64.gt_u end else - local.get $23 + local.get $27 end if block - local.get $24 + local.get $26 i32.const 1 i32.sub - local.set $24 + local.set $26 local.get $22 - local.get $26 + local.get $23 i64.add local.set $22 end @@ -13178,8 +10469,8 @@ end end local.get $25 - local.get $24 - i32.store16 offset=4 + local.get $26 + i32.store16 end local.get $15 return @@ -13232,7 +10523,7 @@ i32.const 65535 i32.and i32.add - i32.store16 offset=4 + i32.store16 end local.get $13 local.get $9 @@ -13246,64 +10537,54 @@ local.get $5 i64.lt_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $14 i32.add - global.set $~lib/internal/number/_K + global.set $~lib/util/number/_K local.get $10 - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i64) - local.get $16 - local.set $17 - i32.const 0 - local.get $14 - i32.sub - local.set $24 - i32.const 0 - local.set $25 - local.get $17 - local.get $24 - i32.const 2 - i32.shl - i32.add - local.get $25 - i32.add - i64.load32_u offset=8 - end + local.get $16 + i32.const 0 + local.get $14 + i32.sub + i32.const 2 + i32.shl + i32.add + i64.load32_u i64.mul local.set $10 - block $~lib/internal/number/grisuRound|inlined.1 + block $~lib/util/number/grisuRound|inlined.1 local.get $0 - local.set $25 + local.set $17 local.get $15 - local.set $24 + local.set $26 local.get $5 - local.set $27 + local.set $24 local.get $13 - local.set $26 + local.set $23 local.get $8 local.set $22 local.get $10 local.set $21 - local.get $25 - local.get $24 + local.get $17 + local.get $26 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $17 - local.get $17 - i32.load16_u offset=4 + local.set $25 + local.get $25 + i32.load16_u local.set $20 block $break|4 loop $continue|4 - local.get $26 + local.get $23 local.get $21 i64.lt_u local.tee $18 if (result i32) - local.get $27 - local.get $26 + local.get $24 + local.get $23 i64.sub local.get $22 i64.ge_u @@ -13312,7 +10593,7 @@ end local.tee $18 if (result i32) - local.get $26 + local.get $23 local.get $22 i64.add local.get $21 @@ -13322,9 +10603,9 @@ local.get $18 else local.get $21 - local.get $26 + local.get $23 i64.sub - local.get $26 + local.get $23 local.get $22 i64.add local.get $21 @@ -13340,18 +10621,18 @@ i32.const 1 i32.sub local.set $20 - local.get $26 + local.get $23 local.get $22 i64.add - local.set $26 + local.set $23 end br $continue|4 end end end - local.get $17 + local.get $25 local.get $20 - i32.store16 offset=4 + i32.store16 end local.get $15 return @@ -13363,7 +10644,7 @@ end local.get $15 ) - (func $~lib/internal/number/prettify (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 196 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13386,7 +10667,7 @@ i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store local.get $1 i32.const 2 i32.add @@ -13423,7 +10704,7 @@ i32.shl i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $4 i32.const 1 i32.add @@ -13443,7 +10724,7 @@ i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store local.get $3 i32.const 2 i32.add @@ -13467,35 +10748,23 @@ i32.shl i32.add local.set $4 - block $~lib/memory/memory.copy|inlined.9 - local.get $4 - i32.const 4 - i32.add - i32.const 2 - i32.add - local.set $5 - local.get $4 - i32.const 4 - i32.add - local.set $6 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - local.set $7 - local.get $5 - local.get $6 - local.get $7 - call $~lib/internal/memory/memmove - end + local.get $4 + i32.const 2 + i32.add + local.get $4 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 local.get $3 i32.const 1 i32.shl i32.add i32.const 46 - i32.store16 offset=4 + i32.store16 local.get $1 i32.const 1 i32.add @@ -13517,35 +10786,23 @@ local.get $3 i32.sub local.set $4 - block $~lib/memory/memory.copy|inlined.10 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 1 - i32.shl - i32.add - local.set $7 - local.get $0 - i32.const 4 - i32.add - local.set $6 - local.get $1 - i32.const 1 - i32.shl - local.set $5 - local.get $7 - local.get $6 - local.get $5 - call $~lib/internal/memory/memmove - end + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $1 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 i32.const 48 i32.const 46 i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store block $break|1 i32.const 2 local.set $5 @@ -13561,7 +10818,7 @@ i32.shl i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $5 i32.const 1 i32.add @@ -13582,8 +10839,8 @@ if local.get $0 i32.const 101 - i32.store16 offset=6 - block $~lib/internal/number/genExponent|inlined.0 (result i32) + i32.store16 offset=2 + block $~lib/util/number/genExponent|inlined.0 (result i32) local.get $0 i32.const 4 i32.add @@ -13604,11 +10861,11 @@ local.set $5 end local.get $5 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.set $7 - block $~lib/internal/number/utoa32_core|inlined.4 + block $~lib/util/number/utoa32_core|inlined.4 local.get $4 local.set $8 local.get $5 @@ -13618,14 +10875,14 @@ local.get $8 local.get $9 local.get $10 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $4 i32.const 45 i32.const 43 local.get $6 select - i32.store16 offset=4 + i32.store16 local.get $7 end local.set $1 @@ -13638,44 +10895,32 @@ i32.const 1 i32.shl local.set $7 - block $~lib/memory/memory.copy|inlined.11 - local.get $0 - i32.const 4 - i32.add - i32.const 4 - i32.add - local.set $6 - local.get $0 - i32.const 4 - i32.add - i32.const 2 - i32.add - local.set $5 - local.get $7 - i32.const 2 - i32.sub - local.set $4 - local.get $6 - local.get $5 - local.get $4 - call $~lib/internal/memory/memmove - end + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $7 + i32.const 2 + i32.sub + call $~lib/memory/memory.copy local.get $0 i32.const 46 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 local.get $7 i32.add i32.const 101 - i32.store16 offset=6 + i32.store16 offset=2 local.get $1 - block $~lib/internal/number/genExponent|inlined.1 (result i32) + block $~lib/util/number/genExponent|inlined.1 (result i32) local.get $0 local.get $7 i32.add i32.const 4 i32.add - local.set $4 + local.set $6 local.get $3 i32.const 1 i32.sub @@ -13683,8 +10928,8 @@ local.get $5 i32.const 0 i32.lt_s - local.set $6 - local.get $6 + local.set $4 + local.get $4 if i32.const 0 local.get $5 @@ -13692,12 +10937,12 @@ local.set $5 end local.get $5 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.set $10 - block $~lib/internal/number/utoa32_core|inlined.5 - local.get $4 + block $~lib/util/number/utoa32_core|inlined.5 + local.get $6 local.set $9 local.get $5 local.set $8 @@ -13706,14 +10951,14 @@ local.get $9 local.get $8 local.get $11 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end - local.get $4 + local.get $6 i32.const 45 i32.const 43 - local.get $6 + local.get $4 select - i32.store16 offset=4 + i32.store16 local.get $10 end i32.add @@ -13732,7 +10977,7 @@ unreachable unreachable ) - (func $~lib/internal/number/dtoa_core (; 194 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 197 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -13748,21 +10993,18 @@ (local $14 i32) (local $15 i32) (local $16 f64) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) + (local $17 i64) + (local $18 i64) + (local $19 i64) + (local $20 i64) (local $21 i64) (local $22 i64) (local $23 i64) (local $24 i64) (local $25 i64) - (local $26 i64) + (local $26 i32) (local $27 i64) - (local $28 i64) - (local $29 i64) - (local $30 i64) - (local $31 i32) + (local $28 i32) local.get $1 f64.const 0 f64.lt @@ -13774,9 +11016,9 @@ local.set $1 local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end - block $~lib/internal/number/grisu2|inlined.0 (result i32) + block $~lib/util/number/grisu2|inlined.0 (result i32) local.get $1 local.set $3 local.get $0 @@ -13817,7 +11059,7 @@ i32.add i32.sub local.set $7 - block $~lib/internal/number/normalizedBoundaries|inlined.0 + block $~lib/util/number/normalizedBoundaries|inlined.0 local.get $9 local.set $10 local.get $7 @@ -13852,7 +11094,7 @@ i32.add local.set $15 local.get $12 - global.set $~lib/internal/number/_frc_plus + global.set $~lib/util/number/_frc_plus local.get $10 local.get $15 i64.extend_i32_s @@ -13866,12 +11108,12 @@ i32.sub i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_minus + global.set $~lib/util/number/_frc_minus local.get $13 - global.set $~lib/internal/number/_exp + global.set $~lib/util/number/_exp end - block $~lib/internal/number/getCachedPower|inlined.0 - global.get $~lib/internal/number/_exp + block $~lib/util/number/getCachedPower|inlined.0 + global.get $~lib/util/number/_exp local.set $15 i32.const -61 local.get $15 @@ -13903,319 +11145,294 @@ i32.const 3 i32.shl i32.sub - global.set $~lib/internal/number/_K - i32.const 6280 - i32.load - local.set $11 - i32.const 6544 - i32.load - local.set $17 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $11 - local.set $18 - local.get $13 - local.set $19 - i32.const 0 - local.set $20 - local.get $18 - local.get $19 - i32.const 3 - i32.shl - i32.add - local.get $20 - i32.add - i64.load offset=8 - end - global.set $~lib/internal/number/_frc_pow - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $17 - local.set $20 - local.get $13 - local.set $19 - i32.const 0 - local.set $18 - local.get $20 - local.get $19 - i32.const 1 - i32.shl - i32.add - local.get $18 - i32.add - i32.load16_s offset=8 - end - global.set $~lib/internal/number/_exp_pow + global.set $~lib/util/number/_K + i32.const 5128 + i32.load offset=4 + local.get $13 + i32.const 3 + i32.shl + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 5336 + i32.load offset=4 + local.get $13 + i32.const 1 + i32.shl + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow end local.get $9 i64.clz i32.wrap_i64 - local.set $17 + local.set $13 local.get $9 - local.get $17 + local.get $13 i64.extend_i32_s i64.shl local.set $9 local.get $7 - local.get $17 + local.get $13 i32.sub local.set $7 - global.get $~lib/internal/number/_frc_pow + global.get $~lib/util/number/_frc_pow local.set $12 - global.get $~lib/internal/number/_exp_pow - local.set $11 - block $~lib/internal/number/umul64f|inlined.0 (result i64) + global.get $~lib/util/number/_exp_pow + local.set $14 + block $~lib/util/number/umul64f|inlined.0 (result i64) local.get $9 local.set $10 local.get $12 - local.set $21 + local.set $17 local.get $10 i64.const 4294967295 i64.and - local.set $22 - local.get $21 + local.set $18 + local.get $17 i64.const 4294967295 i64.and - local.set $23 + local.set $19 local.get $10 i64.const 32 i64.shr_u - local.set $24 - local.get $21 + local.set $20 + local.get $17 i64.const 32 i64.shr_u - local.set $25 - local.get $22 - local.get $23 + local.set $21 + local.get $18 + local.get $19 i64.mul - local.set $26 - local.get $24 - local.get $23 + local.set $22 + local.get $20 + local.get $19 i64.mul - local.get $26 + local.get $22 i64.const 32 i64.shr_u i64.add - local.set $27 - local.get $22 - local.get $25 + local.set $23 + local.get $18 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.const 4294967295 i64.and i64.add - local.set $28 - local.get $28 + local.set $24 + local.get $24 i64.const 2147483647 i64.add - local.set $28 - local.get $27 + local.set $24 + local.get $23 i64.const 32 i64.shr_u - local.set $27 - local.get $28 + local.set $23 + local.get $24 i64.const 32 i64.shr_u - local.set $28 - local.get $24 - local.get $25 + local.set $24 + local.get $20 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.add - local.get $28 + local.get $24 i64.add end - local.set $28 - block $~lib/internal/number/umul64e|inlined.0 (result i32) + local.set $24 + block $~lib/util/number/umul64e|inlined.0 (result i32) local.get $7 - local.set $13 - local.get $11 - local.set $14 - local.get $13 + local.set $15 local.get $14 + local.set $11 + local.get $15 + local.get $11 i32.add i32.const 64 i32.add end - local.set $14 - block $~lib/internal/number/umul64f|inlined.1 (result i64) - global.get $~lib/internal/number/_frc_plus - local.set $27 + local.set $11 + block $~lib/util/number/umul64f|inlined.1 (result i64) + global.get $~lib/util/number/_frc_plus + local.set $23 local.get $12 - local.set $26 - local.get $27 + local.set $22 + local.get $23 i64.const 4294967295 i64.and - local.set $25 - local.get $26 + local.set $21 + local.get $22 i64.const 4294967295 i64.and - local.set $24 - local.get $27 + local.set $20 + local.get $23 i64.const 32 i64.shr_u - local.set $23 - local.get $26 + local.set $19 + local.get $22 i64.const 32 i64.shr_u - local.set $22 - local.get $25 - local.get $24 + local.set $18 + local.get $21 + local.get $20 i64.mul - local.set $21 - local.get $23 - local.get $24 + local.set $17 + local.get $19 + local.get $20 i64.mul - local.get $21 + local.get $17 i64.const 32 i64.shr_u i64.add local.set $10 - local.get $25 - local.get $22 + local.get $21 + local.get $18 i64.mul local.get $10 i64.const 4294967295 i64.and i64.add - local.set $29 - local.get $29 + local.set $25 + local.get $25 i64.const 2147483647 i64.add - local.set $29 + local.set $25 local.get $10 i64.const 32 i64.shr_u local.set $10 - local.get $29 + local.get $25 i64.const 32 i64.shr_u - local.set $29 - local.get $23 - local.get $22 + local.set $25 + local.get $19 + local.get $18 i64.mul local.get $10 i64.add - local.get $29 + local.get $25 i64.add end i64.const 1 i64.sub - local.set $29 - block $~lib/internal/number/umul64e|inlined.1 (result i32) - global.get $~lib/internal/number/_exp - local.set $13 - local.get $11 + local.set $25 + block $~lib/util/number/umul64e|inlined.1 (result i32) + global.get $~lib/util/number/_exp local.set $15 - local.get $13 + local.get $14 + local.set $26 local.get $15 + local.get $26 i32.add i32.const 64 i32.add end - local.set $15 - block $~lib/internal/number/umul64f|inlined.2 (result i64) - global.get $~lib/internal/number/_frc_minus + local.set $26 + block $~lib/util/number/umul64f|inlined.2 (result i64) + global.get $~lib/util/number/_frc_minus local.set $10 local.get $12 - local.set $21 + local.set $17 local.get $10 i64.const 4294967295 i64.and - local.set $22 - local.get $21 + local.set $18 + local.get $17 i64.const 4294967295 i64.and - local.set $23 + local.set $19 local.get $10 i64.const 32 i64.shr_u - local.set $24 - local.get $21 + local.set $20 + local.get $17 i64.const 32 i64.shr_u - local.set $25 - local.get $22 - local.get $23 + local.set $21 + local.get $18 + local.get $19 i64.mul - local.set $26 - local.get $24 - local.get $23 + local.set $22 + local.get $20 + local.get $19 i64.mul - local.get $26 + local.get $22 i64.const 32 i64.shr_u i64.add - local.set $27 - local.get $22 - local.get $25 + local.set $23 + local.get $18 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.const 4294967295 i64.and i64.add - local.set $30 - local.get $30 + local.set $27 + local.get $27 i64.const 2147483647 i64.add - local.set $30 - local.get $27 + local.set $27 + local.get $23 i64.const 32 i64.shr_u - local.set $27 - local.get $30 + local.set $23 + local.get $27 i64.const 32 i64.shr_u - local.set $30 - local.get $24 - local.get $25 + local.set $27 + local.get $20 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.add - local.get $30 + local.get $27 i64.add end i64.const 1 i64.add - local.set $30 - local.get $29 - local.get $30 - i64.sub local.set $27 - local.get $4 - local.get $28 - local.get $14 - local.get $29 - local.get $15 + local.get $25 local.get $27 + i64.sub + local.set $23 + local.get $4 + local.get $24 + local.get $11 + local.get $25 + local.get $26 + local.get $23 local.get $5 - call $~lib/internal/number/genDigits + call $~lib/util/number/genDigits end - local.set $31 + local.set $28 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $31 + local.get $28 local.get $2 i32.sub - global.get $~lib/internal/number/_K - call $~lib/internal/number/prettify - local.set $31 - local.get $31 + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.set $28 + local.get $28 local.get $2 i32.add ) - (func $~lib/internal/number/dtoa (; 195 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 198 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 f64.const 0 f64.eq if - i32.const 5176 + i32.const 4336 return end local.get $0 @@ -14225,59 +11442,47 @@ local.get $0 call $~lib/builtins/isNaN if - i32.const 5192 + i32.const 4352 return end - i32.const 5208 - i32.const 5232 + i32.const 4368 + i32.const 4400 local.get $0 f64.const 0 f64.lt select return end - i32.const 28 - call $~lib/internal/string/allocateUnsafe - local.set $1 - local.get $1 - local.get $0 - call $~lib/internal/number/dtoa_core + block $~lib/runtime/ALLOCATE|inlined.9 (result i32) + i32.const 28 + i32.const 1 + i32.shl + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $2 - local.get $1 - i32.const 0 local.get $2 - call $~lib/string/String#substring + local.get $0 + call $~lib/util/number/dtoa_core local.set $3 - block $~lib/internal/string/freeUnsafe|inlined.3 + local.get $2 + i32.const 0 + local.get $3 + call $~lib/string/String#substring + local.set $4 + block $~lib/runtime/DISCARD|inlined.3 + local.get $2 + local.set $1 local.get $1 - local.set $4 - local.get $4 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.8 - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.8 - end + call $~lib/runtime/doDiscard end - local.get $3 + local.get $4 ) - (func $~lib/internal/number/dtoa_stream (; 196 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 199 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 local.get $1 i32.const 1 @@ -14290,13 +11495,13 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $0 i32.const 46 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 48 - i32.store16 offset=8 + i32.store16 offset=4 i32.const 3 return end @@ -14309,47 +11514,35 @@ if local.get $0 i32.const 78 - i32.store16 offset=4 + i32.store16 local.get $0 i32.const 97 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 78 - i32.store16 offset=8 - i32.const 3 - return - else - local.get $2 - f64.const 0 - f64.lt - local.set $3 - i32.const 8 - local.get $3 - i32.add - local.set $4 - i32.const 5208 - i32.const 5232 - local.get $3 - select - local.set $5 - block $~lib/memory/memory.copy|inlined.12 - local.get $0 - i32.const 4 - i32.add - local.set $6 - local.get $5 - i32.const 4 - i32.add - local.set $7 - local.get $4 - i32.const 1 - i32.shl - local.set $8 - local.get $6 - local.get $7 - local.get $8 - call $~lib/internal/memory/memmove - end + i32.store16 offset=4 + i32.const 3 + return + else + local.get $2 + f64.const 0 + f64.lt + local.set $3 + i32.const 8 + local.get $3 + i32.add + local.set $4 + i32.const 4368 + i32.const 4400 + local.get $3 + select + local.set $5 + local.get $0 + local.get $5 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $4 return end @@ -14358,24 +11551,20 @@ end local.get $0 local.get $2 - call $~lib/internal/number/dtoa_core + call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_flt (; 200 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 f64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) + (local $9 f64) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -14383,174 +11572,140 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.13 (result f64) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - f64.load offset=8 - end - call $~lib/internal/number/dtoa + local.get $3 + f64.load + call $~lib/util/number/dtoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 28 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 28 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + block $~lib/runtime/ALLOCATE|inlined.10 (result i32) + local.get $5 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $7 i32.const 0 local.set $8 block $break|0 i32.const 0 - local.set $11 + local.set $6 loop $repeat|0 - local.get $11 + local.get $6 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.14 (result f64) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 3 - i32.shl - i32.add - local.get $14 - i32.add - f64.load offset=8 - end - local.set $4 + local.get $3 + local.get $6 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $9 local.get $8 - local.get $9 + local.get $7 local.get $8 - local.get $4 - call $~lib/internal/number/dtoa_stream + local.get $9 + call $~lib/util/number/dtoa_stream i32.add local.set $8 - local.get $7 + local.get $4 if - local.get $9 + local.get $7 local.get $8 + i32.const 1 + i32.shl + i32.add local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $8 - local.get $6 + local.get $4 i32.add local.set $8 end end - local.get $11 + local.get $6 i32.const 1 i32.add - local.set $11 + local.set $6 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.15 (result f64) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 3 - i32.shl - i32.add - local.get $13 - i32.add - f64.load offset=8 - end - local.set $4 + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $9 local.get $8 - local.get $9 + local.get $7 local.get $8 - local.get $4 - call $~lib/internal/number/dtoa_stream + local.get $9 + call $~lib/util/number/dtoa_stream i32.add local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $5 local.get $8 i32.gt_s if - local.get $9 + local.get $7 i32.const 0 local.get $8 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.4 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.9 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.9 - end + local.set $6 + block $~lib/runtime/DISCARD|inlined.4 + local.get $7 + local.set $10 + local.get $10 + call $~lib/runtime/doDiscard end + local.get $6 + return + end + block $~lib/runtime/REGISTER|inlined.8 (result i32) + local.get $7 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister end - local.get $13 + ) + (func $~lib/array/Array#join (; 201 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_flt return ) - (func $~lib/array/Array#join (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_str (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14560,12 +11715,8 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -14573,291 +11724,255 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end + local.get $3 + i32.load return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 0 - local.set $10 + local.set $5 block $break|0 block i32.const 0 - local.set $9 + local.set $7 local.get $2 i32.const 1 i32.add local.set $8 end loop $repeat|0 - local.get $9 + local.get $7 local.get $8 i32.lt_s i32.eqz br_if $break|0 - local.get $10 - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result i32) - local.get $5 - local.set $11 - local.get $9 - local.set $12 - i32.const 0 - local.set $13 - local.get $11 - local.get $12 + block + local.get $3 + local.get $7 i32.const 2 i32.shl i32.add - local.get $13 - i32.add - i32.load offset=8 + i32.load + local.set $6 + local.get $6 + i32.const 0 + i32.ne + if + local.get $5 + local.get $6 + call $~lib/string/String#get:length + i32.add + local.set $5 + end end - i32.load - i32.add - local.set $10 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end unreachable end i32.const 0 - local.set $8 - local.get $10 - local.get $6 - local.get $2 - i32.mul - i32.add - call $~lib/internal/string/allocateUnsafe local.set $9 + block $~lib/runtime/ALLOCATE|inlined.11 (result i32) + local.get $5 + local.get $4 + local.get $2 + i32.mul + i32.add + i32.const 1 + i32.shl + local.set $8 + local.get $8 + call $~lib/runtime/doAllocate + end + local.set $10 block $break|1 i32.const 0 - local.set $13 + local.set $8 loop $repeat|1 - local.get $13 + local.get $8 local.get $2 i32.lt_s i32.eqz br_if $break|1 block - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i32) - local.get $5 - local.set $12 - local.get $13 - local.set $11 - i32.const 0 - local.set $14 - local.get $12 - local.get $11 - i32.const 2 + local.get $3 + local.get $8 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 + i32.const 0 + i32.ne + if + local.get $6 + call $~lib/string/String#get:length + local.set $7 + local.get $10 + local.get $9 + i32.const 1 i32.shl i32.add - local.get $14 + local.get $6 + local.get $7 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $9 + local.get $7 i32.add - i32.load offset=8 + local.set $9 end - local.set $4 local.get $4 if - local.get $4 - i32.load - local.set $14 + local.get $10 local.get $9 - local.get $8 - local.get $4 - i32.const 0 - local.get $14 - call $~lib/internal/string/copyUnsafe - local.get $8 - local.get $14 + i32.const 1 + i32.shl i32.add - local.set $8 - end - local.get $7 - if - local.get $9 - local.get $8 local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $8 - local.get $6 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $9 + local.get $4 i32.add - local.set $8 + local.set $9 end end - local.get $13 + local.get $8 i32.const 1 i32.add - local.set $13 + local.set $8 br $repeat|1 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.8 (result i32) - local.get $5 - local.set $13 - local.get $2 - local.set $14 - i32.const 0 - local.set $11 - local.get $13 - local.get $14 - i32.const 2 + local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 + i32.const 0 + i32.ne + if + local.get $10 + local.get $9 + i32.const 1 i32.shl i32.add - local.get $11 - i32.add - i32.load offset=8 + local.get $6 + local.get $6 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + call $~lib/memory/memory.copy end - local.set $4 - local.get $4 - if - local.get $4 - i32.load - local.set $11 - local.get $9 + block $~lib/runtime/REGISTER|inlined.9 (result i32) + local.get $10 + local.set $8 local.get $8 - local.get $4 - i32.const 0 - local.get $11 - call $~lib/internal/string/copyUnsafe + i32.const 1 + call $~lib/runtime/doRegister end - local.get $9 + ) + (func $~lib/array/Array#join (; 203 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_str return ) - (func $std/array/Ref#constructor (; 199 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/Ref#constructor (; 204 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.eqz if - i32.const 0 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 0 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 18 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 ) - (func $~lib/array/Array#constructor (; 200 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 205 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 19 + call $~lib/runtime/doRegister end local.get $1 i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - end - local.get $3 - i32.store + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 local.get $0 local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.12 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end + i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#__unchecked_set (; 201 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/array/Array#__set (; 206 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 - i32.load - local.set $3 local.get $1 - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 - local.get $3 - local.get $4 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureLength + local.get $0 + i32.load offset=4 + local.get $1 i32.const 2 i32.shl i32.add - local.get $6 - i32.add - local.get $5 - i32.store offset=8 + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end ) - (func $~lib/array/Array#join (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_ref (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14867,12 +11982,8 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -14880,177 +11991,170 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - i32.const 6872 + i32.const 5640 return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 15 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 15 i32.add - local.set $8 - local.get $8 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + block $~lib/runtime/ALLOCATE|inlined.12 (result i32) + local.get $5 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $7 i32.const 0 - local.set $10 + local.set $8 block $break|0 i32.const 0 - local.set $11 + local.set $6 loop $repeat|0 - local.get $11 + local.get $6 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $9 + local.get $9 + if + local.get $7 + local.get $8 + i32.const 1 i32.shl i32.add - local.get $14 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 - if - local.get $9 - local.get $10 - i32.const 6872 - i32.const 0 + i32.const 5640 i32.const 15 - call $~lib/internal/string/copyUnsafe - local.get $10 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $8 i32.const 15 i32.add - local.set $10 + local.set $8 end - local.get $7 + local.get $4 if - local.get $9 - local.get $10 + local.get $7 + local.get $8 + i32.const 1 + i32.shl + i32.add local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $10 - local.get $6 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $8 + local.get $4 i32.add - local.set $10 + local.set $8 end end - local.get $11 + local.get $6 i32.const 1 i32.add - local.set $11 + local.set $6 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $13 - local.get $2 - local.set $14 - i32.const 0 - local.set $11 - local.get $13 - local.get $14 - i32.const 2 + local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + if + local.get $7 + local.get $8 + i32.const 1 i32.shl i32.add - local.get $11 - i32.add - i32.load offset=8 - end - if - local.get $9 - local.get $10 - i32.const 6872 - i32.const 0 + i32.const 5640 i32.const 15 - call $~lib/internal/string/copyUnsafe - local.get $10 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $8 i32.const 15 i32.add - local.set $10 + local.set $8 end - local.get $9 - local.set $11 + local.get $5 local.get $8 - local.get $10 i32.gt_s if - local.get $9 + local.get $7 i32.const 0 - local.get $10 + local.get $8 call $~lib/string/String#substring - local.set $11 - block $~lib/internal/string/freeUnsafe|inlined.5 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.10 - local.get $14 - local.set $13 - local.get $13 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.10 - end + local.set $6 + block $~lib/runtime/DISCARD|inlined.5 + local.get $7 + local.set $10 + local.get $10 + call $~lib/runtime/doDiscard end + local.get $6 + return + end + block $~lib/runtime/REGISTER|inlined.10 (result i32) + local.get $7 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister end - local.get $11 + ) + (func $~lib/array/Array#join (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_ref return ) - (func $~lib/internal/number/itoa (; 203 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 209 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array#join + ) + (func $~lib/util/number/itoa (; 210 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 return ) - (func $~lib/internal/number/itoa_stream (; 204 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 211 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15071,7 +12175,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -15097,11 +12201,11 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $4 i32.add local.set $3 - block $~lib/internal/number/utoa32_core|inlined.6 + block $~lib/util/number/utoa32_core|inlined.6 local.get $0 local.set $5 local.get $2 @@ -15115,17 +12219,17 @@ local.get $5 local.get $6 local.get $7 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $4 if local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $3 ) - (func $~lib/array/Array#join (; 205 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -15135,12 +12239,8 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -15148,181 +12248,152 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - i32.load8_s offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i32.load8_s + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 11 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 11 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + block $~lib/runtime/ALLOCATE|inlined.13 (result i32) + local.get $5 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $7 i32.const 0 local.set $8 block $break|0 i32.const 0 - local.set $11 + local.set $6 loop $repeat|0 - local.get $11 + local.get $6 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 0 - i32.shl - i32.add - local.get $14 - i32.add - i32.load8_s offset=8 - end - local.set $4 + local.get $3 + local.get $6 + i32.const 0 + i32.shl + i32.add + i32.load8_s + local.set $9 local.get $8 - local.get $9 + local.get $7 local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $9 + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $7 + local.get $4 if - local.get $9 + local.get $7 local.get $8 + i32.const 1 + i32.shl + i32.add local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $8 - local.get $6 + local.get $4 i32.add local.set $8 end end - local.get $11 + local.get $6 i32.const 1 i32.add - local.set $11 + local.set $6 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 0 - i32.shl - i32.add - local.get $13 - i32.add - i32.load8_s offset=8 - end - local.set $4 + local.get $3 + local.get $2 + i32.const 0 + i32.shl + i32.add + i32.load8_s + local.set $9 local.get $8 - local.get $9 + local.get $7 local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $9 + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $5 local.get $8 i32.gt_s if - local.get $9 + local.get $7 i32.const 0 local.get $8 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.6 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.11 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.11 - end + local.set $6 + block $~lib/runtime/DISCARD|inlined.6 + local.get $7 + local.set $10 + local.get $10 + call $~lib/runtime/doDiscard end + local.get $6 + return + end + block $~lib/runtime/REGISTER|inlined.11 (result i32) + local.get $7 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister end - local.get $13 + ) + (func $~lib/array/Array#join (; 213 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int return ) - (func $~lib/internal/number/itoa (; 206 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 214 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array#join + ) + (func $~lib/util/number/itoa (; 215 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 65535 i32.and - call $~lib/internal/number/utoa32 + call $~lib/util/number/utoa32 return ) - (func $~lib/internal/number/itoa_stream (; 207 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 216 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15340,7 +12411,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -15349,9 +12420,9 @@ local.get $2 i32.const 65535 i32.and - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 - block $~lib/internal/number/utoa32_core|inlined.7 + block $~lib/util/number/utoa32_core|inlined.7 local.get $0 local.set $4 local.get $2 @@ -15363,11 +12434,11 @@ local.get $4 local.get $5 local.get $6 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $3 ) - (func $~lib/array/Array#join (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 217 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -15377,12 +12448,8 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -15390,174 +12457,145 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $10 - i32.add - i32.load16_u offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i32.load16_u + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 10 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 10 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + block $~lib/runtime/ALLOCATE|inlined.14 (result i32) + local.get $5 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $7 i32.const 0 local.set $8 block $break|0 i32.const 0 - local.set $11 + local.set $6 loop $repeat|0 - local.get $11 + local.get $6 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 1 - i32.shl - i32.add - local.get $14 - i32.add - i32.load16_u offset=8 - end - local.set $4 + local.get $3 + local.get $6 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $9 local.get $8 - local.get $9 + local.get $7 local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $9 + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $7 + local.get $4 if - local.get $9 + local.get $7 local.get $8 + i32.const 1 + i32.shl + i32.add local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $8 - local.get $6 + local.get $4 i32.add local.set $8 end end - local.get $11 + local.get $6 i32.const 1 i32.add - local.set $11 + local.set $6 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 1 - i32.shl - i32.add - local.get $13 - i32.add - i32.load16_u offset=8 - end - local.set $4 + local.get $3 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $9 local.get $8 - local.get $9 + local.get $7 local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $9 + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $5 local.get $8 i32.gt_s if - local.get $9 + local.get $7 i32.const 0 local.get $8 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.7 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.12 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.12 - end + local.set $6 + block $~lib/runtime/DISCARD|inlined.7 + local.get $7 + local.set $10 + local.get $10 + call $~lib/runtime/doDiscard end + local.get $6 + return + end + block $~lib/runtime/REGISTER|inlined.12 (result i32) + local.get $7 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister end - local.get $13 + ) + (func $~lib/array/Array#join (; 218 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int return ) - (func $~lib/internal/number/decimalCount64 (; 209 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/array/Array#toString (; 219 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array#join + ) + (func $~lib/util/number/decimalCount64 (; 220 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -15626,7 +12664,7 @@ unreachable unreachable ) - (func $~lib/internal/number/utoa64_lut (; 210 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 221 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -15636,13 +12674,10 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i64) - (local $16 i64) - i32.const 4832 - i32.load + (local $12 i64) + (local $13 i64) + i32.const 4024 + i32.load offset=4 local.set $3 block $break|0 loop $continue|0 @@ -15688,40 +12723,20 @@ i32.const 100 i32.rem_u local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result i64) - local.get $3 - local.set $12 - local.get $10 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i64.load32_u offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i64) - local.get $3 - local.set $14 - local.get $11 - local.set $13 - i32.const 0 - local.set $12 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i64.load32_u offset=8 - end - local.set $16 + local.get $3 + local.get $10 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $12 + local.get $3 + local.get $11 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $13 local.get $2 i32.const 4 i32.sub @@ -15731,46 +12746,26 @@ i32.const 1 i32.shl i32.add - local.get $15 - local.get $16 + local.get $12 + local.get $13 i64.const 32 i64.shl i64.or - i64.store offset=4 - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result i64) - local.get $3 - local.set $12 - local.get $8 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i64.load32_u offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i64) - local.get $3 - local.set $14 - local.get $9 - local.set $13 - i32.const 0 - local.set $12 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i64.load32_u offset=8 - end - local.set $16 + i64.store + local.get $3 + local.get $8 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $12 + local.get $3 + local.get $9 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $13 local.get $2 i32.const 4 i32.sub @@ -15780,12 +12775,12 @@ i32.const 1 i32.shl i32.add - local.get $15 - local.get $16 + local.get $12 + local.get $13 i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store end br $continue|0 end @@ -15795,9 +12790,9 @@ local.get $1 i32.wrap_i64 local.get $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut ) - (func $~lib/internal/number/utoa64 (; 211 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 222 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15808,7 +12803,7 @@ local.get $0 i64.eqz if - i32.const 4312 + i32.const 3600 return end local.get $0 @@ -15820,12 +12815,18 @@ i32.wrap_i64 local.set $2 local.get $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 - local.get $3 - call $~lib/internal/string/allocateUnsafe + block $~lib/runtime/ALLOCATE|inlined.15 (result i32) + local.get $3 + i32.const 1 + i32.shl + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + end local.set $1 - block $~lib/internal/number/utoa32_core|inlined.8 + block $~lib/util/number/utoa32_core|inlined.8 local.get $1 local.set $4 local.get $2 @@ -15835,16 +12836,22 @@ local.get $4 local.get $5 local.get $6 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.set $3 - local.get $3 - call $~lib/internal/string/allocateUnsafe + block $~lib/runtime/ALLOCATE|inlined.16 (result i32) + local.get $3 + i32.const 1 + i32.shl + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $1 - block $~lib/internal/number/utoa64_core|inlined.0 + block $~lib/util/number/utoa64_core|inlined.0 local.get $1 local.set $2 local.get $0 @@ -15854,17 +12861,23 @@ local.get $2 local.get $7 local.get $6 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end end - local.get $1 + block $~lib/runtime/REGISTER|inlined.13 (result i32) + local.get $1 + local.set $3 + local.get $3 + i32.const 1 + call $~lib/runtime/doRegister + end ) - (func $~lib/internal/number/itoa (; 212 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 223 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 - call $~lib/internal/number/utoa64 + call $~lib/util/number/utoa64 return ) - (func $~lib/internal/number/itoa_stream (; 213 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 224 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15882,7 +12895,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -15897,9 +12910,9 @@ i32.wrap_i64 local.set $4 local.get $4 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 - block $~lib/internal/number/utoa32_core|inlined.9 + block $~lib/util/number/utoa32_core|inlined.9 local.get $0 local.set $5 local.get $4 @@ -15909,13 +12922,13 @@ local.get $5 local.get $6 local.get $7 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end else local.get $2 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.set $3 - block $~lib/internal/number/utoa64_core|inlined.1 + block $~lib/util/number/utoa64_core|inlined.1 local.get $0 local.set $4 local.get $2 @@ -15925,27 +12938,23 @@ local.get $4 local.get $8 local.get $7 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end end local.get $3 ) - (func $~lib/array/Array#join (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) + (local $9 i64) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -15953,174 +12962,145 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i64) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - i64.load offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i64.load + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 20 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 20 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + block $~lib/runtime/ALLOCATE|inlined.17 (result i32) + local.get $5 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $7 i32.const 0 local.set $8 block $break|0 i32.const 0 - local.set $11 + local.set $6 loop $repeat|0 - local.get $11 + local.get $6 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i64) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 3 - i32.shl - i32.add - local.get $14 - i32.add - i64.load offset=8 - end - local.set $4 + local.get $3 + local.get $6 + i32.const 3 + i32.shl + i32.add + i64.load + local.set $9 local.get $8 - local.get $9 + local.get $7 local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $9 + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $7 + local.get $4 if - local.get $9 + local.get $7 local.get $8 + i32.const 1 + i32.shl + i32.add local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $8 - local.get $6 + local.get $4 i32.add local.set $8 end end - local.get $11 + local.get $6 i32.const 1 i32.add - local.set $11 + local.set $6 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i64) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 3 - i32.shl - i32.add - local.get $13 - i32.add - i64.load offset=8 - end - local.set $4 + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + local.set $9 local.get $8 - local.get $9 + local.get $7 local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $9 + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $5 local.get $8 i32.gt_s if - local.get $9 + local.get $7 i32.const 0 local.get $8 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.8 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.13 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.13 - end + local.set $6 + block $~lib/runtime/DISCARD|inlined.8 + local.get $7 + local.set $10 + local.get $10 + call $~lib/runtime/doDiscard end + local.get $6 + return + end + block $~lib/runtime/REGISTER|inlined.14 (result i32) + local.get $7 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister end - local.get $13 + ) + (func $~lib/array/Array#join (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int return ) - (func $~lib/internal/number/itoa64 (; 215 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/array/Array#toString (; 227 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array#join + ) + (func $~lib/util/number/itoa64 (; 228 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16132,7 +13112,7 @@ local.get $0 i64.eqz if - i32.const 4312 + i32.const 3600 return end local.get $0 @@ -16155,14 +13135,20 @@ i32.wrap_i64 local.set $3 local.get $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.set $4 - local.get $4 - call $~lib/internal/string/allocateUnsafe + block $~lib/runtime/ALLOCATE|inlined.18 (result i32) + local.get $4 + i32.const 1 + i32.shl + local.set $5 + local.get $5 + call $~lib/runtime/doAllocate + end local.set $2 - block $~lib/internal/number/utoa32_core|inlined.10 + block $~lib/util/number/utoa32_core|inlined.10 local.get $2 local.set $5 local.get $3 @@ -16172,18 +13158,24 @@ local.get $5 local.get $6 local.get $7 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.get $1 i32.add local.set $4 - local.get $4 - call $~lib/internal/string/allocateUnsafe + block $~lib/runtime/ALLOCATE|inlined.19 (result i32) + local.get $4 + i32.const 1 + i32.shl + local.set $3 + local.get $3 + call $~lib/runtime/doAllocate + end local.set $2 - block $~lib/internal/number/utoa64_core|inlined.2 + block $~lib/util/number/utoa64_core|inlined.2 local.get $2 local.set $3 local.get $0 @@ -16193,23 +13185,29 @@ local.get $3 local.get $8 local.get $7 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end end local.get $1 if local.get $2 i32.const 45 - i32.store16 offset=4 + i32.store16 + end + block $~lib/runtime/REGISTER|inlined.15 (result i32) + local.get $2 + local.set $4 + local.get $4 + i32.const 1 + call $~lib/runtime/doRegister end - local.get $2 ) - (func $~lib/internal/number/itoa (; 216 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 229 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 - call $~lib/internal/number/itoa64 + call $~lib/util/number/itoa64 return ) - (func $~lib/internal/number/itoa_stream (; 217 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 230 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16228,7 +13226,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -16254,11 +13252,11 @@ i32.wrap_i64 local.set $5 local.get $5 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $4 i32.add local.set $3 - block $~lib/internal/number/utoa32_core|inlined.11 + block $~lib/util/number/utoa32_core|inlined.11 local.get $0 local.set $6 local.get $5 @@ -16268,15 +13266,15 @@ local.get $6 local.get $7 local.get $8 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end else local.get $2 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.get $4 i32.add local.set $3 - block $~lib/internal/number/utoa64_core|inlined.3 + block $~lib/util/number/utoa64_core|inlined.3 local.get $0 local.set $5 local.get $2 @@ -16286,33 +13284,29 @@ local.get $5 local.get $9 local.get $8 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end end local.get $4 if local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $3 ) - (func $~lib/array/Array#join (; 218 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 231 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) + (local $9 i64) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -16320,186 +13314,185 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - i64.load offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i64.load + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 21 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 21 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + block $~lib/runtime/ALLOCATE|inlined.20 (result i32) + local.get $5 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $7 i32.const 0 local.set $8 block $break|0 i32.const 0 - local.set $11 + local.set $6 loop $repeat|0 - local.get $11 + local.get $6 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i64) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 3 - i32.shl - i32.add - local.get $14 - i32.add - i64.load offset=8 - end - local.set $4 + local.get $3 + local.get $6 + i32.const 3 + i32.shl + i32.add + i64.load + local.set $9 local.get $8 - local.get $9 + local.get $7 local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $9 + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $7 + local.get $4 if - local.get $9 + local.get $7 local.get $8 + i32.const 1 + i32.shl + i32.add local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $8 - local.get $6 + local.get $4 i32.add local.set $8 end end - local.get $11 + local.get $6 i32.const 1 i32.add - local.set $11 + local.set $6 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i64) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 3 - i32.shl - i32.add - local.get $13 - i32.add - i64.load offset=8 - end - local.set $4 + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + local.set $9 local.get $8 - local.get $9 + local.get $7 local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $9 + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $5 local.get $8 i32.gt_s if - local.get $9 + local.get $7 i32.const 0 local.get $8 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.9 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.14 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.14 - end + local.set $6 + block $~lib/runtime/DISCARD|inlined.9 + local.get $7 + local.set $10 + local.get $10 + call $~lib/runtime/doDiscard end + local.get $6 + return + end + block $~lib/runtime/REGISTER|inlined.16 (result i32) + local.get $7 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister end - local.get $13 + ) + (func $~lib/array/Array#join (; 232 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int return ) - (func $~lib/array/Array>#join (; 219 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#toString (; 233 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array#join + ) + (func $~lib/array/Array#toString (; 234 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array#join + ) + (func $~lib/array/Array>#__set (; 235 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureLength + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $~lib/array/Array>#join_arr (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -16507,141 +13500,165 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 + i32.const 3264 local.set $3 + local.get $1 + call $~lib/string/String#get:length + local.set $4 local.get $0 - i32.load + i32.load offset=4 local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.5 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + i32.load + local.set $6 + local.get $6 if (result i32) - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join else - i32.const 3904 + i32.const 3264 end return end block $break|0 i32.const 0 - local.set $10 + local.set $7 loop $repeat|0 - local.get $10 + local.get $7 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.6 (result i32) - local.get $5 - local.set $9 - local.get $10 - local.set $8 - i32.const 0 - local.set $11 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 if local.get $3 - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $3 end - local.get $7 + local.get $4 if local.get $3 local.get $1 - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $3 end end - local.get $10 + local.get $7 i32.const 1 i32.add - local.set $10 + local.set $7 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.7 (result i32) - local.get $5 - local.set $10 + local.get $5 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 + if + local.get $3 + local.get $6 + local.get $1 + call $~lib/array/Array#join + call $~lib/string/String.concat + local.set $3 + end + local.get $3 + ) + (func $~lib/array/Array>#join (; 237 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array>#join_arr + return + ) + (func $~lib/array/Array>#toString (; 238 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array>#join + ) + (func $~lib/array/Array>#constructor (; 239 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 local.get $2 - local.set $11 - i32.const 0 - local.set $8 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 + i32.const 23 + call $~lib/runtime/doRegister end - local.set $4 - local.get $4 + local.get $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/array/Array>#__set (; 240 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureLength + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s if - local.get $3 - local.get $4 + local.get $0 local.get $1 - call $~lib/array/Array#join - call $~lib/string/String.__concat - local.set $3 + i32.const 1 + i32.add + i32.store offset=12 end - local.get $3 - return ) - (func $~lib/internal/number/itoa (; 220 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 241 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and - call $~lib/internal/number/utoa32 + call $~lib/util/number/utoa32 return ) - (func $~lib/internal/number/itoa_stream (; 221 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 242 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16659,7 +13676,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -16668,9 +13685,9 @@ local.get $2 i32.const 255 i32.and - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 - block $~lib/internal/number/utoa32_core|inlined.12 + block $~lib/util/number/utoa32_core|inlined.12 local.get $0 local.set $4 local.get $2 @@ -16682,11 +13699,11 @@ local.get $4 local.get $5 local.get $6 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $3 ) - (func $~lib/array/Array#join (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 243 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -16696,12 +13713,8 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -16709,186 +13722,148 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - i32.load8_u offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i32.load8_u + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 10 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 10 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + block $~lib/runtime/ALLOCATE|inlined.21 (result i32) + local.get $5 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $7 i32.const 0 local.set $8 block $break|0 i32.const 0 - local.set $11 + local.set $6 loop $repeat|0 - local.get $11 + local.get $6 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 0 - i32.shl - i32.add - local.get $14 - i32.add - i32.load8_u offset=8 - end - local.set $4 + local.get $3 + local.get $6 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.set $9 local.get $8 - local.get $9 + local.get $7 local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $9 + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $7 + local.get $4 if - local.get $9 + local.get $7 local.get $8 + i32.const 1 + i32.shl + i32.add local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $8 - local.get $6 + local.get $4 i32.add local.set $8 end end - local.get $11 + local.get $6 i32.const 1 i32.add - local.set $11 + local.set $6 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 0 - i32.shl - i32.add - local.get $13 - i32.add - i32.load8_u offset=8 - end - local.set $4 + local.get $3 + local.get $2 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.set $9 local.get $8 - local.get $9 + local.get $7 local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $9 + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $5 local.get $8 i32.gt_s if - local.get $9 + local.get $7 i32.const 0 local.get $8 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.10 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.15 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.15 - end + local.set $6 + block $~lib/runtime/DISCARD|inlined.10 + local.get $7 + local.set $10 + local.get $10 + call $~lib/runtime/doDiscard end + local.get $6 + return + end + block $~lib/runtime/REGISTER|inlined.17 (result i32) + local.get $7 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister end - local.get $13 + ) + (func $~lib/array/Array#join (; 244 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int return ) - (func $~lib/array/Array>#join (; 223 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 245 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -16896,146 +13871,218 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 + i32.const 3264 local.set $3 + local.get $1 + call $~lib/string/String#get:length + local.set $4 local.get $0 - i32.load + i32.load offset=4 local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.0 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + i32.load + local.set $6 + local.get $6 if (result i32) - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join else - i32.const 3904 + i32.const 3264 end return end block $break|0 i32.const 0 - local.set $10 + local.set $7 loop $repeat|0 - local.get $10 + local.get $7 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.1 (result i32) - local.get $5 - local.set $9 - local.get $10 - local.set $8 - i32.const 0 - local.set $11 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 if local.get $3 - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $3 end - local.get $7 + local.get $4 if local.get $3 local.get $1 - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $3 end end - local.get $10 + local.get $7 i32.const 1 i32.add - local.set $10 + local.set $7 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.2 (result i32) - local.get $5 - local.set $10 - local.get $2 - local.set $11 - i32.const 0 - local.set $8 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 if local.get $3 - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $3 end local.get $3 + ) + (func $~lib/array/Array>#join (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>#join (; 224 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#toString (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array>#join + ) + (func $~lib/array/Array>#constructor (; 248 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 24 + call $~lib/runtime/doRegister + end + local.get $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/array/Array>#__set (; 249 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureLength + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $~lib/array/Array>>#constructor (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 25 + call $~lib/runtime/doRegister + end + local.get $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/array/Array>>#__set (; 251 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureLength + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $~lib/array/Array>#join_arr (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -17043,146 +14090,109 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 + i32.const 3264 local.set $3 + local.get $1 + call $~lib/string/String#get:length + local.set $4 local.get $0 - i32.load + i32.load offset=4 local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.0 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + i32.load + local.set $6 + local.get $6 if (result i32) - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join else - i32.const 3904 + i32.const 3264 end return end block $break|0 i32.const 0 - local.set $10 + local.set $7 loop $repeat|0 - local.get $10 + local.get $7 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.1 (result i32) - local.get $5 - local.set $9 - local.get $10 - local.set $8 - i32.const 0 - local.set $11 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 if local.get $3 - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $3 end - local.get $7 + local.get $4 if local.get $3 local.get $1 - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $3 end end - local.get $10 + local.get $7 i32.const 1 i32.add - local.set $10 + local.set $7 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.2 (result i32) - local.get $5 - local.set $10 - local.get $2 - local.set $11 - i32.const 0 - local.set $8 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 if local.get $3 - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $3 end local.get $3 + ) + (func $~lib/array/Array>#join (; 253 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>>#join (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#join_arr (; 254 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -17190,139 +14200,123 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 + i32.const 3264 local.set $3 + local.get $1 + call $~lib/string/String#get:length + local.set $4 local.get $0 - i32.load + i32.load offset=4 local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD>,Array>>|inlined.0 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + i32.load + local.set $6 + local.get $6 if (result i32) - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array>#join else - i32.const 3904 + i32.const 3264 end return end block $break|0 i32.const 0 - local.set $10 + local.set $7 loop $repeat|0 - local.get $10 + local.get $7 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD>,Array>>|inlined.1 (result i32) - local.get $5 - local.set $9 - local.get $10 - local.set $8 - i32.const 0 - local.set $11 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 if local.get $3 - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array>#join - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $3 end - local.get $7 + local.get $4 if local.get $3 local.get $1 - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $3 end end - local.get $10 + local.get $7 i32.const 1 i32.add - local.set $10 + local.set $7 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD>,Array>>|inlined.2 (result i32) - local.get $5 - local.set $10 - local.get $2 - local.set $11 - i32.const 0 - local.set $8 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 if local.get $3 - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array>#join - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $3 end local.get $3 + ) + (func $~lib/array/Array>>#join (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array>>#join_arr return ) - (func $start:std/array (; 226 ;) (type $FUNCSIG$v) + (func $~lib/array/Array>>#toString (; 256 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array>>#join + ) + (func $start:std/array (; 257 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - call $start:~lib/allocator/arena + (local $4 i32) + (local $5 i32) + (local $6 i32) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset i32.const 0 i32.const 0 call $~lib/array/Array#constructor @@ -17415,7 +14409,14 @@ call $~lib/array/Array#fill drop global.get $std/array/arr8 - i32.const 256 + block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) + i32.const 192 + local.set $0 + local.get $0 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17427,18 +14428,21 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/array/arr8 - i32.const 0 - i32.const 0 - i32.const 0 - call $~lib/array/Array#fill|trampoline - end + global.get $std/array/arr8 + i32.const 0 + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#fill drop global.get $std/array/arr8 - i32.const 280 + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 208 + local.set $0 + local.get $0 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17457,7 +14461,14 @@ call $~lib/array/Array#fill drop global.get $std/array/arr8 - i32.const 304 + block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) + i32.const 224 + local.set $0 + local.get $0 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17469,18 +14480,21 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 2 - global.set $~lib/argc - global.get $std/array/arr8 - i32.const 2 - i32.const -2 - i32.const 0 - call $~lib/array/Array#fill|trampoline - end + global.get $std/array/arr8 + i32.const 2 + i32.const -2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#fill drop global.get $std/array/arr8 - i32.const 328 + block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) + i32.const 240 + local.set $0 + local.get $0 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17499,7 +14513,14 @@ call $~lib/array/Array#fill drop global.get $std/array/arr8 - i32.const 352 + block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) + i32.const 256 + local.set $0 + local.get $0 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17518,7 +14539,14 @@ call $~lib/array/Array#fill drop global.get $std/array/arr32 - i32.const 432 + block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) + i32.const 328 + local.set $0 + local.get $0 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17530,18 +14558,21 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/array/arr32 - i32.const 0 - i32.const 0 - i32.const 0 - call $~lib/array/Array#fill|trampoline - end + global.get $std/array/arr32 + i32.const 0 + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#fill drop global.get $std/array/arr32 - i32.const 472 + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 360 + local.set $0 + local.get $0 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17560,7 +14591,14 @@ call $~lib/array/Array#fill drop global.get $std/array/arr32 - i32.const 512 + block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) + i32.const 392 + local.set $0 + local.get $0 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17572,18 +14610,21 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 2 - global.set $~lib/argc - global.get $std/array/arr32 - i32.const 2 - i32.const -2 - i32.const 0 - call $~lib/array/Array#fill|trampoline - end + global.get $std/array/arr32 + i32.const 2 + i32.const -2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#fill drop global.get $std/array/arr32 - i32.const 552 + block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) + i32.const 424 + local.set $0 + local.get $0 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17602,7 +14643,14 @@ call $~lib/array/Array#fill drop global.get $std/array/arr32 - i32.const 592 + block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) + i32.const 456 + local.set $0 + local.get $0 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17614,12 +14662,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz @@ -17649,8 +14693,20 @@ call $~lib/array/Array#push drop global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 42 i32.eq i32.eqz @@ -17662,12 +14718,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.1 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 1 i32.eq i32.eqz @@ -17707,12 +14759,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.2 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz @@ -17741,12 +14789,8 @@ i32.const 43 call $~lib/array/Array#push drop - block $~lib/array/Array#get:length|inlined.3 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 1 i32.eq i32.eqz @@ -17772,8 +14816,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 43 i32.eq i32.eqz @@ -17789,12 +14845,8 @@ i32.const 44 call $~lib/array/Array#push drop - block $~lib/array/Array#get:length|inlined.4 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -17820,8 +14872,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 43 i32.eq i32.eqz @@ -17834,8 +14898,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 44 i32.eq i32.eqz @@ -17851,12 +14927,8 @@ i32.const 45 call $~lib/array/Array#push drop - block $~lib/array/Array#get:length|inlined.5 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz @@ -17882,8 +14954,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 43 i32.eq i32.eqz @@ -17896,8 +14980,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 44 i32.eq i32.eqz @@ -17910,8 +15006,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 45 i32.eq i32.eqz @@ -17944,12 +15052,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.6 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz @@ -17961,12 +15065,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.7 (result i32) - global.get $std/array/out - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/out + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz @@ -17979,7 +15079,14 @@ unreachable end global.get $std/array/out - i32.const 608 + block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) + i32.const 528 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end call $~lib/array/Array#concat drop global.get $std/array/arr @@ -17996,8 +15103,20 @@ unreachable end global.get $std/array/out + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 43 i32.eq i32.eqz @@ -18010,8 +15129,20 @@ unreachable end global.get $std/array/out + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 44 i32.eq i32.eqz @@ -18024,8 +15155,20 @@ unreachable end global.get $std/array/out + local.tee $0 + i32.load offset=4 i32.const 2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 45 i32.eq i32.eqz @@ -18062,12 +15205,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.8 (result i32) - global.get $std/array/other - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/other + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -18079,12 +15218,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.9 (result i32) - global.get $std/array/out - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/out + call $~lib/array/Array#get:length i32.const 5 i32.eq i32.eqz @@ -18097,8 +15232,20 @@ unreachable end global.get $std/array/out + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 43 i32.eq i32.eqz @@ -18111,8 +15258,20 @@ unreachable end global.get $std/array/out + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 44 i32.eq i32.eqz @@ -18125,8 +15284,20 @@ unreachable end global.get $std/array/out + local.tee $0 + i32.load offset=4 + i32.const 2 i32.const 2 - call $~lib/array/Array#__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 45 i32.eq i32.eqz @@ -18139,8 +15310,20 @@ unreachable end global.get $std/array/out + local.tee $0 + i32.load offset=4 i32.const 3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 46 i32.eq i32.eqz @@ -18153,8 +15336,20 @@ unreachable end global.get $std/array/out + local.tee $0 + i32.load offset=4 i32.const 4 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 47 i32.eq i32.eqz @@ -18169,12 +15364,8 @@ global.get $std/array/out call $~lib/array/Array#pop drop - block $~lib/array/Array#get:length|inlined.10 (result i32) - global.get $std/array/out - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/out + call $~lib/array/Array#get:length i32.const 4 i32.eq i32.eqz @@ -18190,12 +15381,8 @@ i32.const 0 call $~lib/array/Array#concat global.set $std/array/out - block $~lib/array/Array#get:length|inlined.11 (result i32) - global.get $std/array/out - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/out + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz @@ -18208,8 +15395,20 @@ unreachable end global.get $std/array/out + local.tee $0 + i32.load offset=4 i32.const 2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 45 i32.eq i32.eqz @@ -18221,12 +15420,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.12 (result i32) - global.get $std/array/source - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/source + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz @@ -18242,12 +15437,8 @@ global.get $std/array/arr call $~lib/array/Array#concat global.set $std/array/out - block $~lib/array/Array#get:length|inlined.13 (result i32) - global.get $std/array/out - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/out + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz @@ -18259,12 +15450,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.14 (result i32) - global.get $std/array/source - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/source + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz @@ -18276,18 +15463,28 @@ call $~lib/env/abort unreachable end - i32.const 664 + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 568 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/cwArr - block (result i32) + global.get $std/array/cwArr + i32.const 0 + i32.const 3 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#copyWithin + block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) + i32.const 600 + local.set $0 + local.get $0 + i32.const 4 i32.const 2 - global.set $~lib/argc - global.get $std/array/cwArr - i32.const 0 - i32.const 3 - i32.const 0 - call $~lib/array/Array#copyWithin|trampoline + call $~lib/runtime/doWrapArray end - i32.const 704 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18299,18 +15496,28 @@ call $~lib/env/abort unreachable end - i32.const 744 + block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) + i32.const 632 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/cwArr - block (result i32) + global.get $std/array/cwArr + i32.const 1 + i32.const 3 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#copyWithin + block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) + i32.const 664 + local.set $0 + local.get $0 + i32.const 4 i32.const 2 - global.set $~lib/argc - global.get $std/array/cwArr - i32.const 1 - i32.const 3 - i32.const 0 - call $~lib/array/Array#copyWithin|trampoline + call $~lib/runtime/doWrapArray end - i32.const 784 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18322,18 +15529,28 @@ call $~lib/env/abort unreachable end - i32.const 824 - global.set $std/array/cwArr - block (result i32) + block $~lib/runtime/WRAPARRAY|inlined.5 (result i32) + i32.const 696 + local.set $0 + local.get $0 + i32.const 4 i32.const 2 - global.set $~lib/argc - global.get $std/array/cwArr - i32.const 1 + call $~lib/runtime/doWrapArray + end + global.set $std/array/cwArr + global.get $std/array/cwArr + i32.const 1 + i32.const 2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#copyWithin + block $~lib/runtime/WRAPARRAY|inlined.6 (result i32) + i32.const 728 + local.set $0 + local.get $0 + i32.const 4 i32.const 2 - i32.const 0 - call $~lib/array/Array#copyWithin|trampoline + call $~lib/runtime/doWrapArray end - i32.const 864 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18345,18 +15562,28 @@ call $~lib/env/abort unreachable end - i32.const 904 - global.set $std/array/cwArr - block (result i32) - i32.const 2 - global.set $~lib/argc - global.get $std/array/cwArr + block $~lib/runtime/WRAPARRAY|inlined.7 (result i32) + i32.const 760 + local.set $0 + local.get $0 + i32.const 4 i32.const 2 + call $~lib/runtime/doWrapArray + end + global.set $std/array/cwArr + global.get $std/array/cwArr + i32.const 2 + i32.const 2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#copyWithin + block $~lib/runtime/WRAPARRAY|inlined.8 (result i32) + i32.const 792 + local.set $0 + local.get $0 + i32.const 4 i32.const 2 - i32.const 0 - call $~lib/array/Array#copyWithin|trampoline + call $~lib/runtime/doWrapArray end - i32.const 944 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18368,14 +15595,28 @@ call $~lib/env/abort unreachable end - i32.const 984 + block $~lib/runtime/WRAPARRAY|inlined.9 (result i32) + i32.const 824 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 1024 + block $~lib/runtime/WRAPARRAY|inlined.10 (result i32) + i32.const 856 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18387,14 +15628,28 @@ call $~lib/env/abort unreachable end - i32.const 1064 + block $~lib/runtime/WRAPARRAY|inlined.11 (result i32) + i32.const 888 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 1104 + block $~lib/runtime/WRAPARRAY|inlined.12 (result i32) + i32.const 920 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18406,14 +15661,28 @@ call $~lib/env/abort unreachable end - i32.const 1144 + block $~lib/runtime/WRAPARRAY|inlined.13 (result i32) + i32.const 952 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 1184 + block $~lib/runtime/WRAPARRAY|inlined.14 (result i32) + i32.const 984 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18425,18 +15694,28 @@ call $~lib/env/abort unreachable end - i32.const 1224 + block $~lib/runtime/WRAPARRAY|inlined.15 (result i32) + i32.const 1016 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/cwArr - block (result i32) + global.get $std/array/cwArr + i32.const 0 + i32.const -2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#copyWithin + block $~lib/runtime/WRAPARRAY|inlined.16 (result i32) + i32.const 1048 + local.set $0 + local.get $0 + i32.const 4 i32.const 2 - global.set $~lib/argc - global.get $std/array/cwArr - i32.const 0 - i32.const -2 - i32.const 0 - call $~lib/array/Array#copyWithin|trampoline + call $~lib/runtime/doWrapArray end - i32.const 1264 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18448,14 +15727,28 @@ call $~lib/env/abort unreachable end - i32.const 1304 + block $~lib/runtime/WRAPARRAY|inlined.17 (result i32) + i32.const 1080 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - i32.const 1344 + block $~lib/runtime/WRAPARRAY|inlined.18 (result i32) + i32.const 1112 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18467,14 +15760,28 @@ call $~lib/env/abort unreachable end - i32.const 1384 + block $~lib/runtime/WRAPARRAY|inlined.19 (result i32) + i32.const 1144 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - i32.const 1424 + block $~lib/runtime/WRAPARRAY|inlined.20 (result i32) + i32.const 1176 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18486,14 +15793,28 @@ call $~lib/env/abort unreachable end - i32.const 1464 + block $~lib/runtime/WRAPARRAY|inlined.21 (result i32) + i32.const 1208 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - i32.const 1504 + block $~lib/runtime/WRAPARRAY|inlined.22 (result i32) + i32.const 1240 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18505,18 +15826,28 @@ call $~lib/env/abort unreachable end - i32.const 1544 + block $~lib/runtime/WRAPARRAY|inlined.23 (result i32) + i32.const 1272 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/cwArr - block (result i32) + global.get $std/array/cwArr + i32.const -4 + i32.const -3 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#copyWithin + block $~lib/runtime/WRAPARRAY|inlined.24 (result i32) + i32.const 1304 + local.set $0 + local.get $0 + i32.const 4 i32.const 2 - global.set $~lib/argc - global.get $std/array/cwArr - i32.const -4 - i32.const -3 - i32.const 0 - call $~lib/array/Array#copyWithin|trampoline + call $~lib/runtime/doWrapArray end - i32.const 1584 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18532,12 +15863,8 @@ i32.const 42 call $~lib/array/Array#unshift drop - block $~lib/array/Array#get:length|inlined.18 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 4 i32.eq i32.eqz @@ -18563,8 +15890,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 42 i32.eq i32.eqz @@ -18577,8 +15916,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 43 i32.eq i32.eqz @@ -18591,8 +15942,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 44 i32.eq i32.eqz @@ -18605,8 +15968,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 45 i32.eq i32.eqz @@ -18622,12 +15997,8 @@ i32.const 41 call $~lib/array/Array#unshift drop - block $~lib/array/Array#get:length|inlined.19 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 5 i32.eq i32.eqz @@ -18653,8 +16024,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 41 i32.eq i32.eqz @@ -18667,8 +16050,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 42 i32.eq i32.eqz @@ -18681,8 +16076,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 + i32.const 2 i32.const 2 - call $~lib/array/Array#__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 43 i32.eq i32.eqz @@ -18695,8 +16102,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 44 i32.eq i32.eqz @@ -18709,8 +16128,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 4 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 45 i32.eq i32.eqz @@ -18737,12 +16168,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.20 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 4 i32.eq i32.eqz @@ -18768,8 +16195,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 42 i32.eq i32.eqz @@ -18782,8 +16221,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 43 i32.eq i32.eqz @@ -18796,8 +16247,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 + i32.const 2 i32.const 2 - call $~lib/array/Array#__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 44 i32.eq i32.eqz @@ -18810,8 +16273,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 45 i32.eq i32.eqz @@ -18838,12 +16313,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.21 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz @@ -18869,8 +16340,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 42 i32.eq i32.eqz @@ -18883,8 +16366,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 43 i32.eq i32.eqz @@ -18897,8 +16392,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 44 i32.eq i32.eqz @@ -18913,12 +16420,8 @@ global.get $std/array/arr call $~lib/array/Array#reverse drop - block $~lib/array/Array#get:length|inlined.22 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz @@ -18944,8 +16447,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 44 i32.eq i32.eqz @@ -18958,8 +16473,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 43 i32.eq i32.eqz @@ -18972,8 +16499,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 42 i32.eq i32.eqz @@ -19163,22 +16702,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.0 (result i32) - global.get $std/array/arr - local.set $0 - i32.const 44 - local.set $1 - i32.const 0 - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end + global.get $std/array/arr + i32.const 44 i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19192,22 +16719,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.1 (result i32) - global.get $std/array/arr - local.set $2 - i32.const 42 - local.set $1 - i32.const 0 - local.set $0 - local.get $2 - local.get $1 - local.get $0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end + global.get $std/array/arr + i32.const 42 i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19221,22 +16736,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.2 (result i32) - global.get $std/array/arr - local.set $0 - i32.const 45 - local.set $1 - i32.const 0 - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end + global.get $std/array/arr + i32.const 45 i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 0 @@ -19250,22 +16753,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.3 (result i32) - global.get $std/array/arr - local.set $2 - i32.const 43 - local.set $1 - i32.const 100 - local.set $0 - local.get $2 - local.get $1 - local.get $0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end - i32.const 0 - i32.ne + global.get $std/array/arr + i32.const 43 + i32.const 100 + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 0 @@ -19279,22 +16770,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.4 (result i32) - global.get $std/array/arr - local.set $0 - i32.const 43 - local.set $1 - i32.const -100 - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end - i32.const 0 - i32.ne + global.get $std/array/arr + i32.const 43 + i32.const -100 + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19308,22 +16787,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.5 (result i32) - global.get $std/array/arr - local.set $2 - i32.const 43 - local.set $1 - i32.const -2 - local.set $0 - local.get $2 - local.get $1 - local.get $0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end - i32.const 0 - i32.ne + global.get $std/array/arr + i32.const 43 + i32.const -2 + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19337,22 +16804,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.6 (result i32) - global.get $std/array/arr - local.set $0 - i32.const 43 - local.set $1 - i32.const -4 - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end - i32.const 0 - i32.ne + global.get $std/array/arr + i32.const 43 + i32.const -4 + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19366,22 +16821,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.7 (result i32) - global.get $std/array/arr - local.set $2 - i32.const 43 - local.set $1 - i32.const 0 - local.set $0 - local.get $2 - local.get $1 - local.get $0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end + global.get $std/array/arr + i32.const 43 i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19395,22 +16838,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.8 (result i32) - global.get $std/array/arr - local.set $0 - i32.const 43 - local.set $1 - i32.const 1 - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end - i32.const 0 - i32.ne + global.get $std/array/arr + i32.const 43 + i32.const 1 + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19424,22 +16855,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.9 (result i32) - global.get $std/array/arr - local.set $2 - i32.const 43 - local.set $1 - i32.const 2 - local.set $0 - local.get $2 - local.get $1 - local.get $0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end - i32.const 0 - i32.ne + global.get $std/array/arr + i32.const 43 + i32.const 2 + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19458,12 +16877,8 @@ i32.const 1 call $~lib/array/Array#splice drop - block $~lib/array/Array#get:length|inlined.23 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 4 i32.eq i32.eqz @@ -19489,8 +16904,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 44 i32.eq i32.eqz @@ -19503,8 +16930,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 42 i32.eq i32.eqz @@ -19516,15 +16955,18 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/array/sarr - i32.const 0 - i32.const 0 - call $~lib/array/Array#splice|trampoline + global.get $std/array/sarr + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#splice + block $~lib/runtime/WRAPARRAY|inlined.25 (result i32) + i32.const 1392 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray end - i32.const 1664 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19536,8 +16978,15 @@ call $~lib/env/abort unreachable end - global.get $std/array/sarr - i32.const 1680 + global.get $std/array/sarr + block $~lib/runtime/WRAPARRAY|inlined.26 (result i32) + i32.const 1424 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19549,17 +16998,27 @@ call $~lib/env/abort unreachable end - i32.const 1720 + block $~lib/runtime/WRAPARRAY|inlined.27 (result i32) + i32.const 1432 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/array/sarr + global.get $std/array/sarr + i32.const 2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#splice + block $~lib/runtime/WRAPARRAY|inlined.28 (result i32) + i32.const 1464 + local.set $0 + local.get $0 + i32.const 4 i32.const 2 - i32.const 0 - call $~lib/array/Array#splice|trampoline + call $~lib/runtime/doWrapArray end - i32.const 1760 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19572,7 +17031,14 @@ unreachable end global.get $std/array/sarr - i32.const 1784 + block $~lib/runtime/WRAPARRAY|inlined.29 (result i32) + i32.const 1488 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19584,13 +17050,27 @@ call $~lib/env/abort unreachable end - i32.const 1824 + block $~lib/runtime/WRAPARRAY|inlined.30 (result i32) + i32.const 1504 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr global.get $std/array/sarr i32.const 2 i32.const 2 call $~lib/array/Array#splice - i32.const 1848 + block $~lib/runtime/WRAPARRAY|inlined.31 (result i32) + i32.const 1536 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19603,7 +17083,14 @@ unreachable end global.get $std/array/sarr - i32.const 1888 + block $~lib/runtime/WRAPARRAY|inlined.32 (result i32) + i32.const 1552 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19615,13 +17102,27 @@ call $~lib/env/abort unreachable end - i32.const 1928 + block $~lib/runtime/WRAPARRAY|inlined.33 (result i32) + i32.const 1576 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr global.get $std/array/sarr i32.const 0 i32.const 1 call $~lib/array/Array#splice - i32.const 1952 + block $~lib/runtime/WRAPARRAY|inlined.34 (result i32) + i32.const 1608 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19634,7 +17135,14 @@ unreachable end global.get $std/array/sarr - i32.const 1992 + block $~lib/runtime/WRAPARRAY|inlined.35 (result i32) + i32.const 1624 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19646,17 +17154,27 @@ call $~lib/env/abort unreachable end - i32.const 2032 + block $~lib/runtime/WRAPARRAY|inlined.36 (result i32) + i32.const 1648 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/array/sarr - i32.const -1 - i32.const 0 - call $~lib/array/Array#splice|trampoline + global.get $std/array/sarr + i32.const -1 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#splice + block $~lib/runtime/WRAPARRAY|inlined.37 (result i32) + i32.const 1680 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray end - i32.const 2056 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19669,7 +17187,14 @@ unreachable end global.get $std/array/sarr - i32.const 2096 + block $~lib/runtime/WRAPARRAY|inlined.38 (result i32) + i32.const 1696 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19681,17 +17206,27 @@ call $~lib/env/abort unreachable end - i32.const 2136 + block $~lib/runtime/WRAPARRAY|inlined.39 (result i32) + i32.const 1720 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/array/sarr - i32.const -2 - i32.const 0 - call $~lib/array/Array#splice|trampoline + global.get $std/array/sarr + i32.const -2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#splice + block $~lib/runtime/WRAPARRAY|inlined.40 (result i32) + i32.const 1752 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray end - i32.const 2160 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19704,7 +17239,14 @@ unreachable end global.get $std/array/sarr - i32.const 2200 + block $~lib/runtime/WRAPARRAY|inlined.41 (result i32) + i32.const 1768 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19716,13 +17258,27 @@ call $~lib/env/abort unreachable end - i32.const 2240 + block $~lib/runtime/WRAPARRAY|inlined.42 (result i32) + i32.const 1792 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const 1 call $~lib/array/Array#splice - i32.const 2264 + block $~lib/runtime/WRAPARRAY|inlined.43 (result i32) + i32.const 1824 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19735,7 +17291,14 @@ unreachable end global.get $std/array/sarr - i32.const 2304 + block $~lib/runtime/WRAPARRAY|inlined.44 (result i32) + i32.const 1840 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19747,13 +17310,27 @@ call $~lib/env/abort unreachable end - i32.const 2344 + block $~lib/runtime/WRAPARRAY|inlined.45 (result i32) + i32.const 1864 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr global.get $std/array/sarr i32.const -7 i32.const 1 call $~lib/array/Array#splice - i32.const 2368 + block $~lib/runtime/WRAPARRAY|inlined.46 (result i32) + i32.const 1896 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19766,7 +17343,14 @@ unreachable end global.get $std/array/sarr - i32.const 2408 + block $~lib/runtime/WRAPARRAY|inlined.47 (result i32) + i32.const 1912 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19778,13 +17362,27 @@ call $~lib/env/abort unreachable end - i32.const 2448 + block $~lib/runtime/WRAPARRAY|inlined.48 (result i32) + i32.const 1936 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const -1 call $~lib/array/Array#splice - i32.const 2464 + block $~lib/runtime/WRAPARRAY|inlined.49 (result i32) + i32.const 1968 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19797,7 +17395,14 @@ unreachable end global.get $std/array/sarr - i32.const 2504 + block $~lib/runtime/WRAPARRAY|inlined.50 (result i32) + i32.const 1976 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19809,13 +17414,27 @@ call $~lib/env/abort unreachable end - i32.const 2544 + block $~lib/runtime/WRAPARRAY|inlined.51 (result i32) + i32.const 2008 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr global.get $std/array/sarr i32.const 1 i32.const -2 call $~lib/array/Array#splice - i32.const 2560 + block $~lib/runtime/WRAPARRAY|inlined.52 (result i32) + i32.const 2040 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19828,7 +17447,14 @@ unreachable end global.get $std/array/sarr - i32.const 2600 + block $~lib/runtime/WRAPARRAY|inlined.53 (result i32) + i32.const 2048 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19840,13 +17466,27 @@ call $~lib/env/abort unreachable end - i32.const 2640 + block $~lib/runtime/WRAPARRAY|inlined.54 (result i32) + i32.const 2080 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr global.get $std/array/sarr i32.const 4 i32.const 0 call $~lib/array/Array#splice - i32.const 2656 + block $~lib/runtime/WRAPARRAY|inlined.55 (result i32) + i32.const 2112 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19859,7 +17499,14 @@ unreachable end global.get $std/array/sarr - i32.const 2696 + block $~lib/runtime/WRAPARRAY|inlined.56 (result i32) + i32.const 2120 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19871,13 +17518,27 @@ call $~lib/env/abort unreachable end - i32.const 2736 + block $~lib/runtime/WRAPARRAY|inlined.57 (result i32) + i32.const 2152 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 0 call $~lib/array/Array#splice - i32.const 2752 + block $~lib/runtime/WRAPARRAY|inlined.58 (result i32) + i32.const 2184 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19890,7 +17551,14 @@ unreachable end global.get $std/array/sarr - i32.const 2792 + block $~lib/runtime/WRAPARRAY|inlined.59 (result i32) + i32.const 2192 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19902,13 +17570,27 @@ call $~lib/env/abort unreachable end - i32.const 2832 + block $~lib/runtime/WRAPARRAY|inlined.60 (result i32) + i32.const 2224 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 5 call $~lib/array/Array#splice - i32.const 2848 + block $~lib/runtime/WRAPARRAY|inlined.61 (result i32) + i32.const 2256 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19921,7 +17603,14 @@ unreachable end global.get $std/array/sarr - i32.const 2888 + block $~lib/runtime/WRAPARRAY|inlined.62 (result i32) + i32.const 2264 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19934,21 +17623,21 @@ unreachable end global.get $std/array/arr + i32.load offset=4 i32.const 0 - i32.const 0 - call $~lib/array/Array#__set + i32.store global.get $std/array/arr + i32.load offset=4 i32.const 1 - i32.const 1 - call $~lib/array/Array#__set + i32.store offset=4 global.get $std/array/arr + i32.load offset=4 i32.const 2 - i32.const 2 - call $~lib/array/Array#__set + i32.store offset=8 global.get $std/array/arr + i32.load offset=4 i32.const 3 - i32.const 3 - call $~lib/array/Array#__set + i32.store offset=12 global.get $std/array/arr i32.const 1 call $~lib/array/Array#findIndex @@ -20013,12 +17702,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.24 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz @@ -20074,12 +17759,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.25 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -20147,12 +17828,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.26 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz @@ -20208,12 +17885,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.27 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -20281,12 +17954,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.28 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz @@ -20342,12 +18011,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.29 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -20401,12 +18066,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.30 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz @@ -20464,12 +18125,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.31 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -20490,14 +18147,10 @@ call $~lib/array/Array#push drop global.get $std/array/arr - i32.const 21 - call $~lib/array/Array#forEach - block $~lib/array/Array#get:length|inlined.32 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + i32.const 21 + call $~lib/array/Array#forEach + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 100 i32.eq i32.eqz @@ -20550,12 +18203,8 @@ i32.const 22 call $~lib/array/Array#map global.set $std/array/newArr - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/array/newArr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/newArr + call $~lib/array/Array#get:length i32.const 4 i32.eq i32.eqz @@ -20568,11 +18217,35 @@ unreachable end global.get $std/array/newArr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + f32.load global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load f32.convert_i32_s f32.eq i32.eqz @@ -20602,12 +18275,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.33 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz @@ -20667,12 +18336,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.34 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -20696,12 +18361,8 @@ i32.const 26 call $~lib/array/Array#filter global.set $std/array/filteredArr - block $~lib/array/Array#get:length|inlined.35 (result i32) - global.get $std/array/filteredArr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/filteredArr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -20731,12 +18392,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.36 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz @@ -20796,12 +18453,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.37 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -20910,12 +18563,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.38 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz @@ -20973,12 +18622,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.39 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -21087,12 +18732,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.40 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz @@ -21150,12 +18791,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.41 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz @@ -21195,7 +18832,14 @@ end drop global.get $std/array/f32ArrayTyped - i32.const 3240 + block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) + i32.const 2576 + local.set $0 + local.get $0 + i32.const 9 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -21216,7 +18860,14 @@ end drop global.get $std/array/f64ArrayTyped - i32.const 3512 + block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) + i32.const 2712 + local.set $0 + local.get $0 + i32.const 10 + i32.const 3 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -21237,7 +18888,14 @@ end drop global.get $std/array/i32ArrayTyped - i32.const 3592 + block $~lib/runtime/WRAPARRAY|inlined.63 (result i32) + i32.const 2840 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -21258,7 +18916,14 @@ end drop global.get $std/array/u32ArrayTyped - i32.const 3672 + block $~lib/runtime/WRAPARRAY|inlined.5 (result i32) + i32.const 2928 + local.set $0 + local.get $0 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -21290,7 +18955,14 @@ global.get $std/array/reversed1 call $std/array/assertSortedDefault global.get $std/array/reversed1 - i32.const 3840 + block $~lib/runtime/WRAPARRAY|inlined.64 (result i32) + i32.const 3168 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -21305,7 +18977,14 @@ global.get $std/array/reversed2 call $std/array/assertSortedDefault global.get $std/array/reversed2 - i32.const 3864 + block $~lib/runtime/WRAPARRAY|inlined.65 (result i32) + i32.const 3184 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -21454,11 +19133,18 @@ i32.const 0 call $std/array/assertSorted|trampoline end - i32.const 4240 - i32.const 4216 + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 3528 + local.set $0 + local.get $0 + i32.const 15 + i32.const 0 + call $~lib/runtime/doWrapArray + end + i32.const 3512 call $~lib/array/Array#join - i32.const 4248 - call $~lib/string/String.__eq + i32.const 3544 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21468,11 +19154,18 @@ call $~lib/env/abort unreachable end - i32.const 4872 - i32.const 3904 + block $~lib/runtime/WRAPARRAY|inlined.67 (result i32) + i32.const 4048 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end + i32.const 3264 call $~lib/array/Array#join - i32.const 4880 - call $~lib/string/String.__eq + i32.const 4072 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21482,11 +19175,18 @@ call $~lib/env/abort unreachable end - i32.const 4976 - i32.const 4936 + block $~lib/runtime/WRAPARRAY|inlined.7 (result i32) + i32.const 4136 + local.set $0 + local.get $0 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + end + i32.const 4120 call $~lib/array/Array#join - i32.const 4880 - call $~lib/string/String.__eq + i32.const 4072 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21496,11 +19196,18 @@ call $~lib/env/abort unreachable end - i32.const 5032 - i32.const 5008 + block $~lib/runtime/WRAPARRAY|inlined.69 (result i32) + i32.const 4192 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end + i32.const 4176 call $~lib/array/Array#join - i32.const 5040 - call $~lib/string/String.__eq + i32.const 4208 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21510,11 +19217,18 @@ call $~lib/env/abort unreachable end - i32.const 6688 - i32.const 5168 + block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) + i32.const 5432 + local.set $0 + local.get $0 + i32.const 10 + i32.const 3 + call $~lib/runtime/doWrapArray + end + i32.const 4320 call $~lib/array/Array#join - i32.const 6696 - call $~lib/string/String.__eq + i32.const 5488 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21524,11 +19238,18 @@ call $~lib/env/abort unreachable end - i32.const 6864 - i32.const 3904 + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 5616 + local.set $0 + local.get $0 + i32.const 14 + i32.const 2 + call $~lib/runtime/doWrapArray + end + i32.const 3264 call $~lib/array/Array#join - i32.const 6784 - call $~lib/string/String.__eq + i32.const 5576 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21541,30 +19262,30 @@ block (result i32) i32.const 0 i32.const 3 - call $~lib/array/Array#constructor - local.set $3 - local.get $3 + call $~lib/array/Array#constructor + local.set $2 + local.get $2 i32.const 0 i32.const 0 call $std/array/Ref#constructor - call $~lib/array/Array#__unchecked_set - local.get $3 + call $~lib/array/Array#__set + local.get $2 i32.const 1 i32.const 0 - call $~lib/array/Array#__unchecked_set - local.get $3 + call $~lib/array/Array#__set + local.get $2 i32.const 2 i32.const 0 call $std/array/Ref#constructor - call $~lib/array/Array#__unchecked_set - local.get $3 + call $~lib/array/Array#__set + local.get $2 end global.set $std/array/refArr global.get $std/array/refArr - i32.const 4216 - call $~lib/array/Array#join - i32.const 6912 - call $~lib/string/String.__eq + i32.const 3512 + call $~lib/array/Array#join + i32.const 5680 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21574,15 +19295,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.1 (result i32) - global.get $std/array/reversed0 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join - end - i32.const 3904 - call $~lib/string/String.__eq + global.get $std/array/reversed0 + call $~lib/array/Array#toString + i32.const 3264 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21592,15 +19308,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.3 (result i32) - global.get $std/array/reversed1 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join - end - i32.const 6784 - call $~lib/string/String.__eq + global.get $std/array/reversed1 + call $~lib/array/Array#toString + i32.const 5576 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21610,15 +19321,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.5 (result i32) - global.get $std/array/reversed2 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join - end - i32.const 6984 - call $~lib/string/String.__eq + global.get $std/array/reversed2 + call $~lib/array/Array#toString + i32.const 5752 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21628,15 +19334,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.7 (result i32) - global.get $std/array/reversed4 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join - end - i32.const 7000 - call $~lib/string/String.__eq + global.get $std/array/reversed4 + call $~lib/array/Array#toString + i32.const 5768 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21646,15 +19347,17 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.1 (result i32) - i32.const 7064 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 5808 + local.set $2 + local.get $2 + i32.const 20 + i32.const 0 + call $~lib/runtime/doWrapArray end - i32.const 7072 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 5824 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21664,15 +19367,17 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.1 (result i32) - i32.const 7128 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 5864 + local.set $2 + local.get $2 + i32.const 21 + i32.const 1 + call $~lib/runtime/doWrapArray end - i32.const 7136 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 5880 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21682,15 +19387,17 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.1 (result i32) - i32.const 7232 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 5944 + local.set $2 + local.get $2 + i32.const 16 + i32.const 3 + call $~lib/runtime/doWrapArray end - i32.const 7240 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 5976 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21700,15 +19407,17 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.1 (result i32) - i32.const 7432 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 6072 + local.set $2 + local.get $2 + i32.const 22 + i32.const 3 + call $~lib/runtime/doWrapArray end - i32.const 7440 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 6112 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21718,15 +19427,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.1 (result i32) - global.get $std/array/randomStringsExpected - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join - end - i32.const 7528 - call $~lib/string/String.__eq + global.get $std/array/randomStringsExpected + call $~lib/array/Array#toString + i32.const 6208 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21736,15 +19440,17 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.3 (result i32) - i32.const 7648 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join + block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) + i32.const 6304 + local.set $2 + local.get $2 + i32.const 14 + i32.const 2 + call $~lib/runtime/doWrapArray end - i32.const 7656 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 6328 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21754,15 +19460,40 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array>#toString|inlined.1 (result i32) - global.get $std/array/subarr32 + block (result i32) + i32.const 0 + i32.const 2 + call $~lib/array/Array>#constructor local.set $3 local.get $3 - i32.const 4216 - call $~lib/array/Array>#join + i32.const 0 + block $~lib/runtime/WRAPARRAY|inlined.70 (result i32) + i32.const 6352 + local.set $2 + local.get $2 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end + call $~lib/array/Array>#__set + local.get $3 + i32.const 1 + block $~lib/runtime/WRAPARRAY|inlined.71 (result i32) + i32.const 6368 + local.set $2 + local.get $2 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end + call $~lib/array/Array>#__set + local.get $3 end - i32.const 7744 - call $~lib/string/String.__eq + global.set $std/array/subarr32 + global.get $std/array/subarr32 + call $~lib/array/Array>#toString + i32.const 6384 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21772,15 +19503,40 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array>#toString|inlined.1 (result i32) - global.get $std/array/subarr8 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array>#join + block (result i32) + i32.const 0 + i32.const 2 + call $~lib/array/Array>#constructor + local.set $4 + local.get $4 + i32.const 0 + block $~lib/runtime/WRAPARRAY|inlined.5 (result i32) + i32.const 6408 + local.set $3 + local.get $3 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + end + call $~lib/array/Array>#__set + local.get $4 + i32.const 1 + block $~lib/runtime/WRAPARRAY|inlined.6 (result i32) + i32.const 6424 + local.set $3 + local.get $3 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + end + call $~lib/array/Array>#__set + local.get $4 end - i32.const 7744 - call $~lib/string/String.__eq + global.set $std/array/subarr8 + global.get $std/array/subarr8 + call $~lib/array/Array>#toString + i32.const 6384 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21790,15 +19546,39 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array>>#toString|inlined.1 (result i32) - global.get $std/array/subarrU32 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array>>#join + block (result i32) + i32.const 0 + i32.const 1 + call $~lib/array/Array>>#constructor + local.set $6 + local.get $6 + i32.const 0 + block (result i32) + i32.const 0 + i32.const 1 + call $~lib/array/Array>#constructor + local.set $5 + local.get $5 + i32.const 0 + block $~lib/runtime/WRAPARRAY|inlined.8 (result i32) + i32.const 6440 + local.set $4 + local.get $4 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + end + call $~lib/array/Array>#__set + local.get $5 + end + call $~lib/array/Array>>#__set + local.get $6 end - i32.const 6784 - call $~lib/string/String.__eq + global.set $std/array/subarrU32 + global.get $std/array/subarrU32 + call $~lib/array/Array>>#toString + i32.const 5576 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21809,9 +19589,9 @@ unreachable end ) - (func $start (; 227 ;) (type $FUNCSIG$v) + (func $start (; 258 ;) (type $FUNCSIG$v) call $start:std/array ) - (func $null (; 228 ;) (type $FUNCSIG$v) + (func $null (; 259 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 6983daf2ff..7fbd45db3b 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1,32 +1,31 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 56) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 120) "\12\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 160) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 224) "\08\00\00\00\00\00\00\00\01\00\00\00\02") - (data (i32.const 240) "\e0\00\00\00\02") - (data (i32.const 248) "\10\00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 56) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 96) "\01\00\00\00$\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 144) "\02\00\00\00\08\00\00\00\01\00\00\00\02") + (data (i32.const 160) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/arraybuffer/buffer (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) (global $std/arraybuffer/sliced (mut i32) (i32.const 0)) (global $std/arraybuffer/arr8 (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -49,15 +48,15 @@ i32.add i32.const -8 i32.and - local.tee $2 + local.tee $0 current_memory - local.tee $3 + local.tee $2 i32.const 16 i32.shl i32.gt_u if - local.get $3 local.get $2 + local.get $0 local.get $1 i32.sub i32.const 65535 @@ -66,16 +65,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 + local.tee $3 + local.get $2 local.get $3 - local.get $0 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $0 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -84,23 +83,12 @@ end end end - local.get $2 + local.get $0 global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 56 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end i32.const 1 i32.const 32 local.get $0 @@ -109,232 +97,288 @@ i32.clz i32.sub i32.shl - call $~lib/allocator/arena/__memory_allocate + call $~lib/memory/memory.allocate local.tee $1 - local.get $0 + i32.const -1520547049 i32.store local.get $1 - ) - (func $~lib/internal/memory/memset (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $1 - i32.eqz - if - return - end - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $2 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - i32.const 0 - i32.store8 local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store8 + i32.store offset=4 local.get $1 i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - local.get $0 i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $1 + ) + (func $~lib/memory/memory.fill (; 3 ;) (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/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 8 + i32.const 200 i32.le_u if - return + i32.const 0 + i32.const 64 + i32.const 191 + i32.const 2 + call $~lib/env/abort + unreachable end local.get $0 - i32.const 4 - i32.add - i32.const 0 - i32.store - local.get $0 i32.const 8 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 12 i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 24 - i32.le_u + i32.load + i32.const -1520547049 + i32.ne if - return - end - local.get $0 - i32.const 12 - i32.add - i32.const 0 - i32.store + i32.const 0 + i32.const 64 + i32.const 192 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 16 - i32.add - i32.const 0 - i32.store + call $~lib/runtime/assertUnregistered local.get $0 - i32.const 20 - i32.add - i32.const 0 + i32.const 8 + i32.sub + local.get $1 i32.store local.get $0 - i32.const 24 - i32.add - i32.const 0 - i32.store + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) 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 + i32.const 1073741816 + i32.gt_u + if + i32.const 0 + i32.const 16 + i32.const 24 + i32.const 43 + call $~lib/env/abort + unreachable + end local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $2 + call $~lib/runtime/doAllocate + local.tee $1 local.get $0 - i32.add - local.set $0 + call $~lib/memory/memory.fill 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 + i32.const 2 + call $~lib/runtime/doRegister ) - (func $~lib/internal/memory/memcpy (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1231,64 +1275,106 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if + block $~lib/util/memory/memmove|inlined.0 local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $1 local.get $2 i32.add - local.get $1 + local.get $0 i32.le_u - local.set $3 - end - local.get $3 - if + local.tee $3 + i32.eqz + if + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + local.set $3 + end + local.get $3 + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end local.get $0 local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq + i32.lt_u if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and if - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + br $continue|0 end + end + loop $continue|1 local.get $2 - i32.const 1 - i32.sub - local.set $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if local.get $0 local.tee $4 i32.const 1 @@ -1303,100 +1389,71 @@ local.get $3 i32.load8_u i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store local.get $2 - i32.const 8 + i32.const 1 i32.sub local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 + br $continue|2 end end - end - loop $continue|2 - local.get $2 + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if + loop $continue|3 + local.get $0 local.get $2 - i32.eqz + i32.add + i32.const 7 + i32.and if - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 end + end + loop $continue|4 local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|3 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end end end - loop $continue|4 + loop $continue|5 local.get $2 - i32.const 8 - i32.ge_u if local.get $2 - i32.const 8 + i32.const 1 i32.sub local.tee $2 local.get $0 @@ -1404,55 +1461,41 @@ local.get $1 local.get $2 i32.add - i64.load - i64.store - br $continue|4 + i32.load8_u + i32.store8 + br $continue|5 end end end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end end ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 - i32.load - local.set $3 + i32.const 8 + i32.sub + i32.load offset=4 + local.set $4 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $3 + local.get $4 i32.add - local.tee $4 + local.tee $3 i32.const 0 - local.get $4 + local.get $3 i32.const 0 i32.gt_s select else local.get $1 + local.tee $3 + local.get $4 local.get $3 - local.get $1 - local.get $3 + local.get $4 i32.lt_s select end @@ -1462,80 +1505,71 @@ i32.lt_s if (result i32) local.get $2 - local.get $3 + local.get $4 i32.add - local.tee $4 + local.tee $3 i32.const 0 - local.get $4 + local.get $3 i32.const 0 i32.gt_s select else local.get $2 + local.tee $3 + local.get $4 local.get $3 - local.get $2 - local.get $3 + local.get $4 i32.lt_s select end local.get $1 i32.sub - local.tee $4 + local.tee $3 i32.const 0 - local.get $4 + local.get $3 i32.const 0 i32.gt_s select local.tee $3 - call $~lib/internal/arraybuffer/allocateUnsafe + call $~lib/runtime/doAllocate local.tee $2 - i32.const 8 - i32.add local.get $0 - i32.const 8 - i32.add local.get $1 i32.add local.get $3 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $2 + i32.const 2 + call $~lib/runtime/doRegister ) - (func $~lib/arraybuffer/ArrayBuffer#slice|trampoline (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $1 - end - i32.const 1073741816 - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/arraybuffer/ArrayBuffer#slice - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) i32.const 1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $1 - i32.const 8 - i32.add + i32.const 1073741816 + local.get $1 + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 64 + i32.const 226 + i32.const 57 + call $~lib/env/abort + unreachable + end i32.const 1 - call $~lib/internal/memory/memset + local.get $1 + i32.shl + local.tee $2 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 local.get $0 i32.eqz if i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/doAllocate + i32.const 3 + call $~lib/runtime/doRegister local.set $0 end local.get $0 @@ -1551,138 +1585,139 @@ local.get $1 i32.store local.get $0 - i32.const 0 + local.get $1 i32.store offset=4 local.get $0 - i32.const 1 + local.get $2 i32.store offset=8 local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doWrapArray (; 11 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) (local $1 i32) - i32.const 4 - call $~lib/internal/arraybuffer/allocateUnsafe + (local $2 i32) + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 5 + call $~lib/runtime/doRegister + local.tee $0 + i32.const 148 + i32.load local.tee $1 - i32.const 8 - i32.add - i32.const 4 - call $~lib/internal/memory/memset - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.set $0 - end - local.get $0 - i32.const 0 + call $~lib/runtime/doAllocate + i32.const 5 + call $~lib/runtime/doRegister + local.tee $2 i32.store local.get $0 - i32.const 0 + local.get $2 i32.store offset=4 local.get $0 - i32.const 0 + local.get $1 i32.store offset=8 local.get $0 local.get $1 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 4 - i32.store offset=8 + i32.const 2 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 152 + local.get $1 + call $~lib/memory/memory.copy local.get $0 ) - (func $~lib/dataview/DataView#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) - block (result i32) - local.get $1 - i32.const -2147483648 - i32.eq - if - local.get $0 - i32.load - local.set $1 - end - local.get $1 - i32.const 1073741816 - i32.gt_u - end + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 + local.tee $2 + i32.const 1073741816 + i32.gt_u if i32.const 0 - i32.const 248 - i32.const 15 - i32.const 44 + i32.const 168 + i32.const 18 + i32.const 47 call $~lib/env/abort unreachable end - local.get $1 + local.get $2 local.get $0 - i32.load - i32.gt_s + i32.const 8 + i32.sub + i32.load offset=4 + i32.gt_u if i32.const 0 - i32.const 248 - i32.const 16 - i32.const 53 + i32.const 168 + i32.const 19 + i32.const 63 call $~lib/env/abort unreachable end i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.tee $2 - local.get $0 + call $~lib/runtime/doAllocate + i32.const 7 + call $~lib/runtime/doRegister + local.tee $1 + i32.const 0 i32.store - local.get $2 + local.get $1 i32.const 0 i32.store offset=4 - local.get $2 local.get $1 + i32.const 0 i32.store offset=8 + local.get $1 + local.get $0 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 local.get $2 + i32.store offset=8 + local.get $1 ) - (func $start:std/arraybuffer (; 11 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - i32.const 288 + (func $start:std/arraybuffer (; 13 ;) (type $FUNCSIG$v) + i32.const 200 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 8 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $0 - i32.const 8 - i32.add - i32.const 8 - call $~lib/internal/memory/memset - local.get $0 + call $~lib/arraybuffer/ArrayBuffer#constructor global.set $std/arraybuffer/buffer global.get $std/arraybuffer/buffer - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 8 i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 5 i32.const 0 call $~lib/env/abort unreachable end - i32.const 0 - global.set $~lib/argc global.get $std/arraybuffer/buffer i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline + i32.const 1073741816 + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 8 i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 9 i32.const 0 call $~lib/env/abort @@ -1693,55 +1728,46 @@ i32.eq if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 0 call $~lib/env/abort unreachable end - global.get $std/arraybuffer/sliced - global.get $std/arraybuffer/buffer - i32.eq - if - i32.const 0 - i32.const 120 - i32.const 11 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 1 - global.set $~lib/argc global.get $std/arraybuffer/buffer i32.const 1 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline + i32.const 1073741816 + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 7 i32.ne if i32.const 0 - i32.const 120 - i32.const 15 + i32.const 104 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/arraybuffer/buffer i32.const -1 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline + i32.const 1073741816 + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 1 i32.ne if i32.const 0 - i32.const 120 - i32.const 19 + i32.const 104 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -1752,13 +1778,15 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.ne if i32.const 0 - i32.const 120 - i32.const 23 + i32.const 104 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -1769,13 +1797,15 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 6 i32.ne if i32.const 0 - i32.const 120 - i32.const 27 + i32.const 104 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -1786,13 +1816,15 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.ne if i32.const 0 - i32.const 120 - i32.const 31 + i32.const 104 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -1803,29 +1835,32 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 4 i32.ne if i32.const 0 - i32.const 120 - i32.const 35 + i32.const 104 + i32.const 34 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/arraybuffer/buffer i32.const 42 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline + i32.const 1073741816 + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 8 + i32.sub + i32.load offset=4 if i32.const 0 - i32.const 120 - i32.const 39 + i32.const 104 + i32.const 38 i32.const 0 call $~lib/env/abort unreachable @@ -1834,16 +1869,21 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 40 + i32.const 104 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable end i32.const 12 - call $~lib/allocator/arena/__memory_allocate - call $~lib/internal/typedarray/TypedArray#constructor + call $~lib/runtime/doAllocate + i32.const 4 + call $~lib/runtime/doRegister + i32.const 0 + call $~lib/runtime/ArrayBufferView#constructor global.set $std/arraybuffer/arr8 + call $~lib/runtime/doWrapArray + drop i32.const 1 i32.const 0 global.get $std/arraybuffer/arr8 @@ -1851,75 +1891,56 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 50 + i32.const 104 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable end - block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView5 (result i32) - i32.const 0 + block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView13 (result i32) + i32.const 1 i32.const 12 - call $~lib/allocator/arena/__memory_allocate - call $~lib/internal/typedarray/TypedArray#constructor - i32.eqz - br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView5 + call $~lib/runtime/doAllocate + i32.const 6 + call $~lib/runtime/doRegister + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView13 drop - i32.const 1 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 120 - i32.const 51 + i32.const 104 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc - block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView6 (result i32) + block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView14 (result i32) + i32.const 1 global.get $std/arraybuffer/arr8 i32.load - local.set $1 - i32.const 0 - local.set $0 - block $2of2 - block $1of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $1of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const -2147483648 - local.set $0 - end - i32.const 0 - local.get $1 - local.get $0 call $~lib/dataview/DataView#constructor - i32.eqz - br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView6 + br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView14 drop - i32.const 1 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 120 - i32.const 52 + i32.const 104 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 12 ;) (type $FUNCSIG$v) + (func $start (; 14 ;) (type $FUNCSIG$v) call $start:std/arraybuffer ) - (func $null (; 13 ;) (type $FUNCSIG$v) + (func $null (; 15 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/arraybuffer.ts b/tests/compiler/std/arraybuffer.ts index db69fe138e..5923211990 100644 --- a/tests/compiler/std/arraybuffer.ts +++ b/tests/compiler/std/arraybuffer.ts @@ -7,7 +7,6 @@ assert(buffer.byteLength == 8); var sliced = buffer.slice(); assert(sliced.byteLength == 8); -assert(sliced.data != buffer.data); assert(sliced !== buffer); sliced = buffer.slice(1); diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 2b73c71968..992570e81b 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -1,50 +1,41 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 56) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 120) "\12\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 160) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 224) "\08\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 240) "\e0\00\00\00\02\00\00\00") - (data (i32.const 248) "\10\00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 56) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 96) "\01\00\00\00$\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 144) "\02\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 160) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/arraybuffer/buffer (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) (global $std/arraybuffer/sliced (mut i32) (i32.const 0)) (global $std/arraybuffer/arr8 (mut i32) (i32.const 0)) (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 284)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 200)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $~lib/internal/arraybuffer/computeSize (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - i32.const 8 + global.get $~lib/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -52,408 +43,442 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 + return ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end + call $~lib/runtime/ADJUSTOBLOCK + call $~lib/memory/memory.allocate local.set $1 local.get $1 - local.get $0 + global.get $~lib/runtime/HEADER_MAGIC i32.store local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add ) - (func $~lib/internal/memory/memset (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 1 + i32.add + local.get $1 + i32.store8 + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $4 + local.get $0 + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 12 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 24 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 20 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.get $4 + i32.store + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $4 + i64.extend_i32_u + local.get $4 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $5 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $5 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $5 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + end + br $continue|0 + end + end + end + end + ) + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 64 + i32.const 191 + i32.const 2 + call $~lib/env/abort + unreachable + end local.get $0 - local.get $2 - i32.add - i32.const 24 + global.get $~lib/runtime/HEADER_SIZE i32.sub - local.get $4 - i32.store + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 64 + i32.const 192 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store + call $~lib/runtime/assertUnregistered local.get $0 - local.get $2 - i32.add - i32.const 16 + global.get $~lib/runtime/HEADER_SIZE i32.sub - local.get $4 + local.get $1 i32.store - i32.const 24 local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - end - br $continue|0 - end - end - end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $1 - i32.const 1073741816 + global.get $~lib/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 - i32.const 8 - i32.const 47 - i32.const 40 + i32.const 16 + i32.const 24 + i32.const 43 call $~lib/env/abort unreachable end - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $3 - local.get $2 + local.get $3 i32.const 0 - i32.ne - i32.eqz - if + local.get $1 + call $~lib/memory/memory.fill + block $~lib/runtime/REGISTER|inlined.0 (result i32) local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $1 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset + local.set $2 + local.get $2 + i32.const 2 + call $~lib/runtime/doRegister end - local.get $3 ) - (func $~lib/internal/memory/memcpy (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/util/memory/memcpy (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1654,241 +1679,243 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else + block $~lib/util/memory/memmove|inlined.0 local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $1 local.get $2 i32.add - local.get $1 + local.get $0 i32.le_u - end - if + local.tee $3 + if (result i32) + local.get $3 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end local.get $0 local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq + i32.lt_u if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 i32.const 1 - i32.add - local.set $1 - local.get $3 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + end + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + end + i32.load8_u + i32.store8 end - i32.load8_u - i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 + br $continue|0 end - br $continue|1 end end - end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 end - br $continue|2 end end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 + block $break|2 + loop $continue|2 local.get $2 - i32.add - i32.const 7 - i32.and if block - local.get $2 - i32.eqz - if - return + block (result i32) + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 end - local.get $0 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + end + i32.load8_u + i32.store8 local.get $2 i32.const 1 i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 + local.set $2 end - br $continue|3 + br $continue|2 end end end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 end - br $continue|4 end end end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 + block $break|5 + loop $continue|5 local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end end end end end ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) local.get $0 - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.set $3 local.get $1 i32.const 0 @@ -1950,234 +1977,105 @@ local.get $5 i32.gt_s select - local.set $3 - local.get $3 - call $~lib/internal/arraybuffer/allocateUnsafe local.set $6 - block $~lib/memory/memory.copy|inlined.0 + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) local.get $6 - i32.const 8 - i32.add local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.add - local.set $5 - local.get $3 - local.set $7 local.get $4 - local.get $5 - local.get $7 - call $~lib/internal/memory/memmove - end - local.get $6 - ) - (func $~lib/arraybuffer/ArrayBuffer#slice|trampoline (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $1 - end - i32.const 1073741816 - local.set $2 + call $~lib/runtime/doAllocate end + local.set $7 + local.get $7 local.get $0 local.get $1 - local.get $2 - call $~lib/arraybuffer/ArrayBuffer#slice + i32.add + local.get $6 + call $~lib/memory/memory.copy + block $~lib/runtime/REGISTER|inlined.1 (result i32) + local.get $7 + local.set $4 + local.get $4 + i32.const 2 + call $~lib/runtime/doRegister + end ) - (func $~lib/arraybuffer/ArrayBuffer.isView> (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView> (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 0 - i32.eq if - i32.const 0 - return + nop end i32.const 0 ) - (func $~lib/arraybuffer/ArrayBuffer.isView (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 0 - i32.eq if - i32.const 0 - return + nop end i32.const 0 ) - (func $~lib/arraybuffer/ArrayBuffer.isView (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 0 - i32.eq if - i32.const 0 + i32.const 1 return end - i32.const 1 - return - ) - (func $~lib/arraybuffer/ArrayBuffer.isView (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 i32.const 0 - i32.eq - if - i32.const 0 - return - end - i32.const 1 - return ) - (func $~lib/arraybuffer/ArrayBuffer.isView (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 0 - i32.eq if - i32.const 0 + i32.const 1 return end - i32.const 1 - return - ) - (func $~lib/memory/memory.allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/arena/__memory_allocate - return - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 160 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 0 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.1 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - end - local.get $3 - i32.store - local.get $0 i32.const 0 - i32.store offset=4 - local.get $0 - local.get $2 - i32.store offset=8 - local.get $0 ) - (func $~lib/typedarray/Uint8Array#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.eqz if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + i32.const 1 + return end + i32.const 0 + ) + (func $~lib/runtime/ALLOCATE (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor - local.set $0 - local.get $0 + call $~lib/runtime/doAllocate ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $1 - i32.const 268435454 + global.get $~lib/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u i32.gt_u if i32.const 0 - i32.const 160 - i32.const 23 - i32.const 34 + i32.const 64 + i32.const 226 + i32.const 57 call $~lib/env/abort unreachable end + i32.const 0 local.get $1 - i32.const 2 - i32.shl - local.set $2 local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe + i32.shl + local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 - block $~lib/memory/memory.fill|inlined.2 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end block (result i32) local.get $0 i32.eqz if - i32.const 12 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $4 + local.get $4 + i32.const 3 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -2194,57 +2092,109 @@ local.get $3 i32.store local.get $0 - i32.const 0 + local.get $3 i32.store offset=4 local.get $0 - local.get $2 + local.get $1 i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Int32Array#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 4 + call $~lib/runtime/doRegister end + local.get $1 + i32.const 0 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + ) + (func $~lib/runtime/doWrapArray (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 16 + call $~lib/runtime/doAllocate + local.get $1 + call $~lib/runtime/doRegister + local.set $3 + local.get $0 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + local.get $1 + call $~lib/runtime/doRegister + local.set $5 + local.get $3 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store offset=8 + local.get $3 + local.get $4 + local.get $2 + i32.shr_u + i32.store offset=12 + local.get $5 + local.get $0 + local.get $4 + call $~lib/memory/memory.copy + local.get $3 + ) + (func $~lib/typedarray/Int32Array#constructor (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 + if (result i32) + local.get $0 + else + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 6 + call $~lib/runtime/doRegister + end local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/dataview/DataView#constructor (; 21 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) local.get $3 global.get $~lib/builtins/i32.MIN_VALUE i32.eq if local.get $1 - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.get $2 i32.sub local.set $3 end - local.get $2 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 248 - i32.const 14 - i32.const 44 - call $~lib/env/abort - unreachable - end local.get $3 - i32.const 1073741816 + global.get $~lib/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 - i32.const 248 - i32.const 15 - i32.const 44 + i32.const 168 + i32.const 18 + i32.const 47 call $~lib/env/abort unreachable end @@ -2252,177 +2202,150 @@ local.get $3 i32.add local.get $1 - i32.load - i32.gt_s + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.gt_u if i32.const 0 - i32.const 248 - i32.const 16 - i32.const 53 + i32.const 168 + i32.const 19 + i32.const 63 call $~lib/env/abort unreachable end - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + block (result i32) + local.get $0 + i32.eqz + if + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $4 + local.get $4 + i32.const 7 + call $~lib/runtime/doRegister + end + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 end - local.get $0 local.get $1 i32.store - local.get $0 + local.get $1 local.get $2 + i32.add + local.set $5 + local.get $0 + local.get $5 i32.store offset=4 local.get $0 local.get $3 i32.store offset=8 local.get $0 ) - (func $~lib/dataview/DataView#constructor|trampoline (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - global.get $~lib/builtins/i32.MIN_VALUE - local.set $3 - end + (func $~lib/typedarray/Uint8Array#get:buffer (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/dataview/DataView#constructor + i32.load ) - (func $start:std/arraybuffer (; 23 ;) (type $FUNCSIG$v) + (func $start:std/arraybuffer (; 24 ;) (type $FUNCSIG$v) (local $0 i32) - call $start:~lib/allocator/arena + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset i32.const 0 i32.const 8 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor global.set $std/arraybuffer/buffer global.get $std/arraybuffer/buffer - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 8 i32.eq i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 5 i32.const 0 call $~lib/env/abort unreachable end - block (result i32) - i32.const 0 - global.set $~lib/argc - global.get $std/arraybuffer/buffer - i32.const 0 - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline - end + global.get $std/arraybuffer/buffer + i32.const 0 + global.get $~lib/runtime/MAX_BYTELENGTH + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 8 i32.eq i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 9 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/arraybuffer/ArrayBuffer#get:data|inlined.0 (result i32) - global.get $std/arraybuffer/sliced - local.set $0 - local.get $0 - i32.const 8 - i32.add - end - block $~lib/arraybuffer/ArrayBuffer#get:data|inlined.1 (result i32) - global.get $std/arraybuffer/buffer - local.set $0 - local.get $0 - i32.const 8 - i32.add - end - i32.ne - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 10 - i32.const 0 - call $~lib/env/abort - unreachable - end global.get $std/arraybuffer/sliced global.get $std/arraybuffer/buffer i32.ne i32.eqz if i32.const 0 - i32.const 120 - i32.const 11 + i32.const 104 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/arraybuffer/buffer - i32.const 1 - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline - end + global.get $std/arraybuffer/buffer + i32.const 1 + global.get $~lib/runtime/MAX_BYTELENGTH + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 7 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 15 + i32.const 104 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/arraybuffer/buffer - i32.const -1 - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline - end + global.get $std/arraybuffer/buffer + i32.const -1 + global.get $~lib/runtime/MAX_BYTELENGTH + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 19 + i32.const 104 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -2433,14 +2356,14 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 23 + i32.const 104 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -2451,14 +2374,14 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 6 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 27 + i32.const 104 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -2469,14 +2392,14 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 31 + i32.const 104 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -2487,36 +2410,32 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 35 + i32.const 104 + i32.const 34 i32.const 0 call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/arraybuffer/buffer - i32.const 42 - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline - end + global.get $std/arraybuffer/buffer + i32.const 42 + global.get $~lib/runtime/MAX_BYTELENGTH + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 39 + i32.const 104 + i32.const 38 i32.const 0 call $~lib/env/abort unreachable @@ -2527,8 +2446,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 40 + i32.const 104 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -2539,8 +2458,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 42 + i32.const 104 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable @@ -2551,8 +2470,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 43 + i32.const 104 + i32.const 42 i32.const 0 call $~lib/env/abort unreachable @@ -2563,8 +2482,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 44 + i32.const 104 + i32.const 43 i32.const 0 call $~lib/env/abort unreachable @@ -2575,8 +2494,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 45 + i32.const 104 + i32.const 44 i32.const 0 call $~lib/env/abort unreachable @@ -2587,8 +2506,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 46 + i32.const 104 + i32.const 45 i32.const 0 call $~lib/env/abort unreachable @@ -2597,14 +2516,21 @@ i32.const 1 call $~lib/typedarray/Uint8Array#constructor global.set $std/arraybuffer/arr8 - i32.const 240 + block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) + i32.const 152 + local.set $0 + local.get $0 + i32.const 5 + i32.const 2 + call $~lib/runtime/doWrapArray + end call $~lib/arraybuffer/ArrayBuffer.isView> i32.eqz i32.eqz if i32.const 0 - i32.const 120 - i32.const 49 + i32.const 104 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -2614,8 +2540,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 50 + i32.const 104 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -2627,36 +2553,32 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 51 + i32.const 104 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 0 - global.get $std/arraybuffer/arr8 - i32.load - i32.const 0 - i32.const 0 - call $~lib/dataview/DataView#constructor|trampoline - end + i32.const 0 + global.get $std/arraybuffer/arr8 + call $~lib/typedarray/Uint8Array#get:buffer + i32.const 0 + global.get $~lib/builtins/i32.MIN_VALUE + call $~lib/dataview/DataView#constructor call $~lib/arraybuffer/ArrayBuffer.isView i32.eqz if i32.const 0 - i32.const 120 - i32.const 52 + i32.const 104 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 24 ;) (type $FUNCSIG$v) + (func $start (; 25 ;) (type $FUNCSIG$v) call $start:std/arraybuffer ) - (func $null (; 25 ;) (type $FUNCSIG$v) + (func $null (; 26 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 9f3dc7daae..b1122c5f18 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -1,25 +1,24 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$jj (func (param i64) (result i64))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$jii (func (param i32 i32) (result i64))) (type $FUNCSIG$vifi (func (param i32 f32 i32))) (type $FUNCSIG$vidi (func (param i32 f64 i32))) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 72) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 136) "\10\00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") - (data (i32.const 176) "\0f\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 48) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 96) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 136) "\01\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -29,7 +28,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -52,15 +51,15 @@ i32.add i32.const -8 i32.and - local.tee $2 + local.tee $0 current_memory - local.tee $3 + local.tee $2 i32.const 16 i32.shl i32.gt_u if - local.get $3 local.get $2 + local.get $0 local.get $1 i32.sub i32.const 65535 @@ -69,16 +68,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 + local.tee $3 + local.get $2 local.get $3 - local.get $0 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $0 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -87,11 +86,32 @@ end end end - local.get $2 + local.get $0 global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/memory/memset (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 7 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/memory/memory.allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add + ) + (func $~lib/memory/memory.fill (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.const 0 @@ -135,22 +155,60 @@ i32.const 0 i32.store8 ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - local.tee $1 + (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 176 + i32.le_u + if + i32.const 0 + i32.const 16 + i32.const 191 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 i32.const 8 - i32.store + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 16 + i32.const 192 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + i32.const 8 + i32.sub local.get $1 + i32.store + local.get $0 + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) i32.const 8 - i32.add - call $~lib/internal/memory/memset + call $~lib/runtime/doAllocate + local.tee $1 + call $~lib/memory/memory.fill + local.get $1 + i32.const 2 + call $~lib/runtime/doRegister + local.set $1 local.get $0 i32.eqz if i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/doAllocate + i32.const 3 + call $~lib/runtime/doRegister local.set $0 end local.get $0 @@ -166,67 +224,37 @@ local.get $1 i32.store local.get $0 - i32.const 0 + local.get $1 i32.store offset=4 local.get $0 i32.const 8 i32.store offset=8 local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#__set (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $1 - local.get $0 - i32.load - i32.add - i32.add - local.get $2 - i32.store8 offset=8 - ) - (func $~lib/dataview/DataView#constructor (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - local.get $2 - i32.const -2147483648 - i32.eq - if - local.get $0 - i32.load - local.get $1 - i32.sub - local.set $2 - end - local.get $1 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 136 - i32.const 14 - i32.const 44 - call $~lib/env/abort - unreachable + block (result i32) + local.get $2 + i32.const -2147483648 + i32.eq + if + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 + local.get $1 + i32.sub + local.set $2 + end + local.get $2 + i32.const 1073741816 + i32.gt_u end - local.get $2 - i32.const 1073741816 - i32.gt_u if i32.const 0 - i32.const 136 - i32.const 15 - i32.const 44 + i32.const 104 + i32.const 18 + i32.const 47 call $~lib/env/abort unreachable end @@ -234,76 +262,76 @@ local.get $2 i32.add local.get $0 - i32.load - i32.gt_s + i32.const 8 + i32.sub + i32.load offset=4 + i32.gt_u if i32.const 0 - i32.const 136 - i32.const 16 - i32.const 53 + i32.const 104 + i32.const 19 + i32.const 63 call $~lib/env/abort unreachable end i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/doAllocate + i32.const 5 + call $~lib/runtime/doRegister local.tee $3 + i32.const 0 + i32.store + local.get $3 + i32.const 0 + i32.store offset=4 + local.get $3 + i32.const 0 + i32.store offset=8 + local.get $3 local.get $0 i32.store local.get $3 + local.get $0 local.get $1 + i32.add i32.store offset=4 local.get $3 local.get $2 i32.store offset=8 local.get $3 ) - (func $~lib/dataview/DataView#getFloat32 (; 6 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) - (local $3 i32) - (local $4 i32) + (func $~lib/dataview/DataView#getFloat32 (; 8 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add local.get $0 i32.load offset=8 - local.set $4 - local.get $1 - local.tee $3 - i32.const 1073741816 - i32.gt_u - local.tee $1 - if (result i32) - local.get $1 - else - local.get $3 - i32.const 4 - i32.add - local.get $4 - i32.gt_s - end + i32.gt_s + i32.or if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 42 + i32.const 6 call $~lib/env/abort unreachable end local.get $2 if (result f32) - local.get $0 - i32.load local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $3 - i32.add - f32.load offset=8 + f32.load else - local.get $0 - i32.load local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $3 - i32.add - i32.load offset=8 + i32.load local.tee $0 i32.const -16711936 i32.and @@ -318,7 +346,7 @@ f32.reinterpret_i32 end ) - (func $~lib/polyfills/bswap (; 7 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 9 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 i64.const 8 i64.shr_u @@ -344,112 +372,75 @@ i64.const 32 i64.rotr ) - (func $~lib/dataview/DataView#getFloat64 (; 8 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/dataview/DataView#getFloat64 (; 10 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) i32.const 8 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 56 + i32.const 7 call $~lib/env/abort unreachable end local.get $1 if (result f64) - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add - f64.load offset=8 + f64.load else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add - i64.load offset=8 + i64.load call $~lib/polyfills/bswap f64.reinterpret_i64 end ) - (func $~lib/dataview/DataView#getInt8 (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) + (func $~lib/dataview/DataView#getInt8 (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 i32.load offset=8 - local.set $3 - local.get $1 - local.tee $2 - i32.const 1073741816 - i32.gt_u - local.tee $1 - i32.eqz - if - local.get $2 - i32.const 1 - i32.add - local.get $3 - i32.gt_s - local.set $1 - end - local.get $1 + i32.ge_u if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 67 + i32.const 49 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $2 - i32.add - i32.load8_s offset=8 + i32.load8_s ) - (func $~lib/dataview/DataView#getInt16 (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) + (func $~lib/dataview/DataView#getInt16 (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 2 + i32.add local.get $0 i32.load offset=8 - local.set $4 - local.get $1 - local.tee $3 - i32.const 1073741816 - i32.gt_u - local.tee $1 - if (result i32) - local.get $1 - else - local.get $3 - i32.const 2 - i32.add - local.get $4 - i32.gt_s - end + i32.gt_s + i32.or if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 75 + i32.const 7 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $3 - i32.add - i32.load16_s offset=8 + i32.load16_s local.set $0 local.get $2 if (result i32) @@ -468,42 +459,30 @@ i32.or end ) - (func $~lib/dataview/DataView#getInt32 (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) + (func $~lib/dataview/DataView#getInt32 (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add local.get $0 i32.load offset=8 - local.set $4 - local.get $1 - local.tee $3 - i32.const 1073741816 - i32.gt_u - local.tee $1 - if (result i32) - local.get $1 - else - local.get $3 - i32.const 4 - i32.add - local.get $4 - i32.gt_s - end + i32.gt_s + i32.or if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 84 + i32.const 7 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $3 - i32.add - i32.load offset=8 + i32.load local.set $0 local.get $2 if (result i32) @@ -522,7 +501,7 @@ i32.or end ) - (func $~lib/dataview/DataView#getInt64 (; 12 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/dataview/DataView#getInt64 (; 14 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i64) i32.const 8 local.get $0 @@ -530,18 +509,15 @@ i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 178 + i32.const 6 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add - i64.load offset=8 + i64.load local.set $2 local.get $1 if (result i64) @@ -551,124 +527,155 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint8 (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) + (func $~lib/dataview/DataView#getUint8 (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 i32.load offset=8 - local.set $3 - local.get $1 - local.tee $2 - i32.const 1073741816 - i32.gt_u - local.tee $1 - i32.eqz - if - local.get $2 - i32.const 1 - i32.add - local.get $3 - i32.gt_s - local.set $1 - end - local.get $1 + i32.ge_u if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 90 + i32.const 49 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $2 - i32.add - i32.load8_u offset=8 + i32.load8_u ) - (func $~lib/dataview/DataView#getUint16 (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) + (func $~lib/dataview/DataView#getUint16 (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 2 + i32.add local.get $0 i32.load offset=8 - local.set $4 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 98 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 local.get $1 - local.tee $3 - i32.const 1073741816 - i32.gt_u - local.tee $1 + i32.add + i32.load16_u + local.set $0 + local.get $2 if (result i32) - local.get $1 + local.get $0 else - local.get $3 - i32.const 2 - i32.add - local.get $4 - i32.gt_s + local.get $0 + i32.const 8 + i32.shl + local.get $0 + i32.const 65535 + i32.and + i32.const 8 + i32.shr_u + i32.or end + ) + (func $~lib/dataview/DataView#getUint32 (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 107 + i32.const 6 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $3 - i32.add - i32.load16_u offset=8 + i32.load local.set $0 local.get $2 if (result i32) local.get $0 else local.get $0 + i32.const -16711936 + i32.and i32.const 8 - i32.shl + i32.rotl local.get $0 - i32.const 65535 + i32.const 16711935 i32.and i32.const 8 - i32.shr_u + i32.rotr i32.or end ) - (func $~lib/dataview/DataView#setFloat32 (; 15 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/dataview/DataView#getUint64 (; 18 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (local $2 i64) + i32.const 8 + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 0 + i32.const 104 + i32.const 187 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + i64.load + local.set $2 + local.get $1 + if (result i64) + local.get $2 + else + local.get $2 + call $~lib/polyfills/bswap + end + ) + (func $~lib/dataview/DataView#setFloat32 (; 19 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 116 + i32.const 6 call $~lib/env/abort unreachable end local.get $2 if - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 - f32.store offset=8 + f32.store else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.reinterpret_f32 local.tee $0 @@ -682,82 +689,70 @@ i32.const 8 i32.rotr i32.or - i32.store offset=8 + i32.store end ) - (func $~lib/dataview/DataView#setFloat64 (; 16 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/dataview/DataView#setFloat64 (; 20 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 125 + i32.const 6 call $~lib/env/abort unreachable end local.get $2 if - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 - f64.store offset=8 + f64.store else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i64.reinterpret_f64 call $~lib/polyfills/bswap - i64.store offset=8 + i64.store end ) - (func $~lib/dataview/DataView#setInt8 (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 + (func $~lib/dataview/DataView#setInt8 (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 0 local.get $0 i32.load offset=8 - i32.gt_s + i32.ge_u if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 131 + i32.const 49 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add - local.get $1 - i32.store8 offset=8 + i32.const 108 + i32.store8 ) - (func $~lib/dataview/DataView#setInt16 (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt16 (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 139 + i32.const 6 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.set $0 local.get $2 i32.eqz @@ -777,26 +772,23 @@ end local.get $0 local.get $1 - i32.store16 offset=8 + i32.store16 ) - (func $~lib/dataview/DataView#setInt32 (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt32 (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.set $0 local.get $2 i32.eqz @@ -816,26 +808,23 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store ) - (func $~lib/dataview/DataView#setInt64 (; 20 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/dataview/DataView#setInt64 (; 24 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 196 + i32.const 6 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $2 if (result i64) local.get $1 @@ -843,26 +832,41 @@ local.get $1 call $~lib/polyfills/bswap end - i64.store offset=8 + i64.store + ) + (func $~lib/dataview/DataView#setUint8 (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 0 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 104 + i32.const 152 + i32.const 49 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 238 + i32.store8 ) - (func $~lib/dataview/DataView#setUint16 (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint16 (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 160 + i32.const 6 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.set $0 local.get $2 i32.eqz @@ -880,56 +884,123 @@ end local.get $0 local.get $1 - i32.store16 offset=8 + i32.store16 + ) + (func $~lib/dataview/DataView#setUint32 (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 4 + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 0 + i32.const 104 + i32.const 168 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $0 + local.get $2 + i32.eqz + if + local.get $1 + i32.const -16711936 + i32.and + i32.const 8 + i32.rotl + local.get $1 + i32.const 16711935 + i32.and + i32.const 8 + i32.rotr + i32.or + local.set $1 + end + local.get $0 + local.get $1 + i32.store + ) + (func $~lib/dataview/DataView#setUint64 (; 28 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + i32.const 8 + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 0 + i32.const 104 + i32.const 204 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $2 + if (result i64) + local.get $1 + else + local.get $1 + call $~lib/polyfills/bswap + end + i64.store ) - (func $start:std/dataview (; 22 ;) (type $FUNCSIG$v) + (func $start:std/dataview (; 29 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 216 + (local $1 i32) + i32.const 176 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 12 - call $~lib/allocator/arena/__memory_allocate - call $~lib/internal/typedarray/TypedArray#constructor + call $~lib/runtime/doAllocate + i32.const 4 + call $~lib/runtime/doRegister + call $~lib/runtime/ArrayBufferView#constructor global.set $std/dataview/array global.get $std/dataview/array - i32.const 0 + local.tee $1 + local.tee $0 + i32.load offset=4 i32.const 246 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 1 + i32.store8 + local.get $0 + i32.load offset=4 i32.const 224 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 2 + i32.store8 offset=1 + local.get $0 + i32.load offset=4 i32.const 88 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 3 + i32.store8 offset=2 + local.get $0 + i32.load offset=4 i32.const 159 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 4 + i32.store8 offset=3 + local.get $0 + i32.load offset=4 i32.const 130 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 5 + i32.store8 offset=4 + local.get $0 + i32.load offset=4 i32.const 101 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 6 + i32.store8 offset=5 + local.get $0 + i32.load offset=4 i32.const 67 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 7 + i32.store8 offset=6 + local.get $0 + i32.load offset=4 i32.const 95 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - local.tee $0 + i32.store8 offset=7 + local.get $0 i32.load local.get $0 i32.load offset=4 local.get $0 + i32.load + i32.sub + local.get $1 i32.load offset=8 call $~lib/dataview/DataView#constructor global.set $std/dataview/view @@ -941,7 +1012,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 16 i32.const 0 call $~lib/env/abort @@ -955,7 +1026,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 17 i32.const 0 call $~lib/env/abort @@ -969,7 +1040,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 18 i32.const 0 call $~lib/env/abort @@ -983,7 +1054,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 19 i32.const 0 call $~lib/env/abort @@ -997,7 +1068,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 20 i32.const 0 call $~lib/env/abort @@ -1011,7 +1082,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 22 i32.const 0 call $~lib/env/abort @@ -1025,7 +1096,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 23 i32.const 0 call $~lib/env/abort @@ -1039,7 +1110,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 24 i32.const 0 call $~lib/env/abort @@ -1053,7 +1124,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 25 i32.const 0 call $~lib/env/abort @@ -1067,7 +1138,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 26 i32.const 0 call $~lib/env/abort @@ -1080,7 +1151,7 @@ f64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 28 i32.const 0 call $~lib/env/abort @@ -1093,7 +1164,7 @@ f64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 29 i32.const 0 call $~lib/env/abort @@ -1106,7 +1177,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 31 i32.const 0 call $~lib/env/abort @@ -1119,7 +1190,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 32 i32.const 0 call $~lib/env/abort @@ -1132,7 +1203,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 33 i32.const 0 call $~lib/env/abort @@ -1145,7 +1216,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 34 i32.const 0 call $~lib/env/abort @@ -1158,7 +1229,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 35 i32.const 0 call $~lib/env/abort @@ -1171,7 +1242,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 36 i32.const 0 call $~lib/env/abort @@ -1184,7 +1255,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 37 i32.const 0 call $~lib/env/abort @@ -1197,7 +1268,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 38 i32.const 0 call $~lib/env/abort @@ -1213,7 +1284,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 40 i32.const 0 call $~lib/env/abort @@ -1229,7 +1300,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 41 i32.const 0 call $~lib/env/abort @@ -1245,7 +1316,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 42 i32.const 0 call $~lib/env/abort @@ -1261,7 +1332,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 43 i32.const 0 call $~lib/env/abort @@ -1277,7 +1348,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 44 i32.const 0 call $~lib/env/abort @@ -1293,7 +1364,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 45 i32.const 0 call $~lib/env/abort @@ -1309,7 +1380,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 46 i32.const 0 call $~lib/env/abort @@ -1325,7 +1396,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 48 i32.const 0 call $~lib/env/abort @@ -1341,7 +1412,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 49 i32.const 0 call $~lib/env/abort @@ -1357,7 +1428,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 50 i32.const 0 call $~lib/env/abort @@ -1373,7 +1444,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 51 i32.const 0 call $~lib/env/abort @@ -1389,7 +1460,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 52 i32.const 0 call $~lib/env/abort @@ -1405,7 +1476,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 53 i32.const 0 call $~lib/env/abort @@ -1421,7 +1492,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 54 i32.const 0 call $~lib/env/abort @@ -1435,7 +1506,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 56 i32.const 0 call $~lib/env/abort @@ -1449,7 +1520,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 57 i32.const 0 call $~lib/env/abort @@ -1463,7 +1534,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 58 i32.const 0 call $~lib/env/abort @@ -1477,7 +1548,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 59 i32.const 0 call $~lib/env/abort @@ -1491,7 +1562,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 60 i32.const 0 call $~lib/env/abort @@ -1505,7 +1576,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 62 i32.const 0 call $~lib/env/abort @@ -1519,7 +1590,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 63 i32.const 0 call $~lib/env/abort @@ -1533,7 +1604,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 64 i32.const 0 call $~lib/env/abort @@ -1547,7 +1618,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 65 i32.const 0 call $~lib/env/abort @@ -1561,7 +1632,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 66 i32.const 0 call $~lib/env/abort @@ -1574,7 +1645,7 @@ i64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 68 i32.const 0 call $~lib/env/abort @@ -1587,7 +1658,7 @@ i64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 69 i32.const 0 call $~lib/env/abort @@ -1600,7 +1671,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 71 i32.const 0 call $~lib/env/abort @@ -1613,7 +1684,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 72 i32.const 0 call $~lib/env/abort @@ -1626,7 +1697,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 73 i32.const 0 call $~lib/env/abort @@ -1639,7 +1710,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 74 i32.const 0 call $~lib/env/abort @@ -1652,7 +1723,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 75 i32.const 0 call $~lib/env/abort @@ -1665,7 +1736,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 76 i32.const 0 call $~lib/env/abort @@ -1678,7 +1749,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 77 i32.const 0 call $~lib/env/abort @@ -1691,7 +1762,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 78 i32.const 0 call $~lib/env/abort @@ -1707,7 +1778,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 80 i32.const 0 call $~lib/env/abort @@ -1723,7 +1794,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 81 i32.const 0 call $~lib/env/abort @@ -1739,7 +1810,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 82 i32.const 0 call $~lib/env/abort @@ -1755,7 +1826,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 83 i32.const 0 call $~lib/env/abort @@ -1771,7 +1842,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 84 i32.const 0 call $~lib/env/abort @@ -1787,7 +1858,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 85 i32.const 0 call $~lib/env/abort @@ -1803,7 +1874,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 86 i32.const 0 call $~lib/env/abort @@ -1819,7 +1890,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 88 i32.const 0 call $~lib/env/abort @@ -1835,7 +1906,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 89 i32.const 0 call $~lib/env/abort @@ -1851,7 +1922,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 90 i32.const 0 call $~lib/env/abort @@ -1867,7 +1938,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 91 i32.const 0 call $~lib/env/abort @@ -1883,7 +1954,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 92 i32.const 0 call $~lib/env/abort @@ -1899,7 +1970,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 93 i32.const 0 call $~lib/env/abort @@ -1915,7 +1986,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 94 i32.const 0 call $~lib/env/abort @@ -1924,12 +1995,12 @@ global.get $std/dataview/view i32.const 0 i32.const 1 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -1621565194 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 96 i32.const 0 call $~lib/env/abort @@ -1938,12 +2009,12 @@ global.get $std/dataview/view i32.const 1 i32.const 1 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -2103486240 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 97 i32.const 0 call $~lib/env/abort @@ -1952,12 +2023,12 @@ global.get $std/dataview/view i32.const 2 i32.const 1 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const 1703059288 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 98 i32.const 0 call $~lib/env/abort @@ -1966,12 +2037,12 @@ global.get $std/dataview/view i32.const 3 i32.const 1 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const 1130726047 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 99 i32.const 0 call $~lib/env/abort @@ -1980,12 +2051,12 @@ global.get $std/dataview/view i32.const 4 i32.const 1 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const 1598252418 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 100 i32.const 0 call $~lib/env/abort @@ -1994,12 +2065,12 @@ global.get $std/dataview/view i32.const 0 i32.const 0 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -153069409 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 102 i32.const 0 call $~lib/env/abort @@ -2008,12 +2079,12 @@ global.get $std/dataview/view i32.const 1 i32.const 0 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -531062910 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 103 i32.const 0 call $~lib/env/abort @@ -2022,12 +2093,12 @@ global.get $std/dataview/view i32.const 2 i32.const 0 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const 1486848613 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 104 i32.const 0 call $~lib/env/abort @@ -2036,12 +2107,12 @@ global.get $std/dataview/view i32.const 3 i32.const 0 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -1618844349 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 105 i32.const 0 call $~lib/env/abort @@ -2050,12 +2121,12 @@ global.get $std/dataview/view i32.const 4 i32.const 0 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -2107292833 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 106 i32.const 0 call $~lib/env/abort @@ -2063,12 +2134,12 @@ end global.get $std/dataview/view i32.const 1 - call $~lib/dataview/DataView#getInt64 + call $~lib/dataview/DataView#getUint64 i64.const 6864441868736323830 i64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 108 i32.const 0 call $~lib/env/abort @@ -2076,12 +2147,12 @@ end global.get $std/dataview/view i32.const 0 - call $~lib/dataview/DataView#getInt64 + call $~lib/dataview/DataView#getUint64 i64.const -657428103485373601 i64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 109 i32.const 0 call $~lib/env/abort @@ -2099,7 +2170,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 112 i32.const 0 call $~lib/env/abort @@ -2117,7 +2188,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 115 i32.const 0 call $~lib/env/abort @@ -2134,7 +2205,7 @@ f64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 118 i32.const 0 call $~lib/env/abort @@ -2151,14 +2222,13 @@ f64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 121 i32.const 0 call $~lib/env/abort unreachable end global.get $std/dataview/view - i32.const 108 call $~lib/dataview/DataView#setInt8 global.get $std/dataview/view i32.const 0 @@ -2167,7 +2237,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 124 i32.const 0 call $~lib/env/abort @@ -2187,7 +2257,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 127 i32.const 0 call $~lib/env/abort @@ -2207,7 +2277,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 130 i32.const 0 call $~lib/env/abort @@ -2225,7 +2295,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 133 i32.const 0 call $~lib/env/abort @@ -2243,7 +2313,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 136 i32.const 0 call $~lib/env/abort @@ -2260,7 +2330,7 @@ i64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 139 i32.const 0 call $~lib/env/abort @@ -2277,15 +2347,14 @@ i64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 142 i32.const 0 call $~lib/env/abort unreachable end global.get $std/dataview/view - i32.const 238 - call $~lib/dataview/DataView#setInt8 + call $~lib/dataview/DataView#setUint8 global.get $std/dataview/view i32.const 0 call $~lib/dataview/DataView#getUint8 @@ -2293,7 +2362,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 145 i32.const 0 call $~lib/env/abort @@ -2313,7 +2382,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 148 i32.const 0 call $~lib/env/abort @@ -2333,7 +2402,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 151 i32.const 0 call $~lib/env/abort @@ -2342,16 +2411,16 @@ global.get $std/dataview/view i32.const -846805744 i32.const 1 - call $~lib/dataview/DataView#setInt32 + call $~lib/dataview/DataView#setUint32 global.get $std/dataview/view i32.const 0 i32.const 1 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -846805744 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 154 i32.const 0 call $~lib/env/abort @@ -2360,16 +2429,16 @@ global.get $std/dataview/view i32.const -1510791631 i32.const 0 - call $~lib/dataview/DataView#setInt32 + call $~lib/dataview/DataView#setUint32 global.get $std/dataview/view i32.const 0 i32.const 0 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -1510791631 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 157 i32.const 0 call $~lib/env/abort @@ -2378,15 +2447,15 @@ global.get $std/dataview/view i64.const 2334704782995986958 i32.const 1 - call $~lib/dataview/DataView#setInt64 + call $~lib/dataview/DataView#setUint64 global.get $std/dataview/view i32.const 1 - call $~lib/dataview/DataView#getInt64 + call $~lib/dataview/DataView#getUint64 i64.const 2334704782995986958 i64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 160 i32.const 0 call $~lib/env/abort @@ -2395,25 +2464,25 @@ global.get $std/dataview/view i64.const -7123186897289856329 i32.const 0 - call $~lib/dataview/DataView#setInt64 + call $~lib/dataview/DataView#setUint64 global.get $std/dataview/view i32.const 0 - call $~lib/dataview/DataView#getInt64 + call $~lib/dataview/DataView#getUint64 i64.const -7123186897289856329 i64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 163 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 23 ;) (type $FUNCSIG$v) + (func $start (; 30 ;) (type $FUNCSIG$v) call $start:std/dataview ) - (func $null (; 24 ;) (type $FUNCSIG$v) + (func $null (; 31 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 4d7b3a3266..0a3e00eeb7 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -1,52 +1,46 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$diii (func (param i32 i32 i32) (result f64))) (type $FUNCSIG$jj (func (param i64) (result i64))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$jiii (func (param i32 i32 i32) (result i64))) (type $FUNCSIG$viifi (func (param i32 i32 f32 i32))) (type $FUNCSIG$viidi (func (param i32 i32 f64 i32))) (type $FUNCSIG$viiji (func (param i32 i32 i64 i32))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 72) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 136) "\10\00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") - (data (i32.const 176) "\0f\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 48) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 96) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 136) "\01\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/dataview/array (mut i32) (i32.const 0)) (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) (global $std/dataview/view (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 212)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 176)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $~lib/internal/arraybuffer/computeSize (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - i32.const 8 + global.get $~lib/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -54,417 +48,474 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 + return ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 72 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end + call $~lib/runtime/ADJUSTOBLOCK + call $~lib/memory/memory.allocate local.set $1 local.get $1 - local.get $0 + global.get $~lib/runtime/HEADER_MAGIC i32.store local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add ) - (func $~lib/internal/memory/memset (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 1 + i32.add + local.get $1 + i32.store8 + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $4 + local.get $0 + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 12 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 24 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 20 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.get $4 + i32.store + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $4 + i64.extend_i32_u + local.get $4 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $5 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $5 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $5 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + end + br $continue|0 + end + end + end end + ) + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz if - return + i32.const 0 + i32.const 16 + i32.const 191 + i32.const 2 + call $~lib/env/abort + unreachable end local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 + global.get $~lib/runtime/HEADER_SIZE i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz if - return + i32.const 0 + i32.const 16 + i32.const 192 + i32.const 2 + call $~lib/env/abort + unreachable end - i32.const 0 + ) + (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 + call $~lib/runtime/assertUnregistered local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 + global.get $~lib/runtime/HEADER_SIZE i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 i32.store local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH + i32.gt_u if - return + i32.const 0 + i32.const 56 + i32.const 24 + i32.const 43 + call $~lib/env/abort + unreachable end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add local.set $3 - local.get $0 local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - end - br $continue|0 - end - end + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + block $~lib/runtime/REGISTER|inlined.0 (result i32) + local.get $3 + local.set $2 + local.get $2 + i32.const 2 + call $~lib/runtime/doRegister end ) - (func $~lib/memory/memory.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate - return + call $~lib/runtime/doAllocate ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $1 - i32.const 1073741816 + global.get $~lib/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u i32.gt_u if i32.const 0 - i32.const 8 - i32.const 23 - i32.const 34 + i32.const 16 + i32.const 226 + i32.const 57 call $~lib/env/abort unreachable end - local.get $1 i32.const 0 - i32.shl - local.set $2 + local.get $1 local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe + i32.shl + local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 - block $~lib/memory/memory.fill|inlined.0 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end block (result i32) local.get $0 i32.eqz if - i32.const 12 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $4 + local.get $4 + i32.const 3 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -481,98 +532,59 @@ local.get $3 i32.store local.get $0 - i32.const 0 + local.get $3 i32.store offset=4 local.get $0 - local.get $2 + local.get $1 i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 4 + call $~lib/runtime/doRegister end - local.get $0 local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 0 + call $~lib/runtime/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#__set (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load offset=8 - i32.const 0 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 0 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store8 offset=8 - end + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 ) - (func $~lib/dataview/DataView#constructor (; 10 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 12 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) local.get $3 global.get $~lib/builtins/i32.MIN_VALUE i32.eq if local.get $1 - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.get $2 i32.sub local.set $3 end - local.get $2 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 136 - i32.const 14 - i32.const 44 - call $~lib/env/abort - unreachable - end local.get $3 - i32.const 1073741816 + global.get $~lib/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 - i32.const 136 - i32.const 15 - i32.const 44 + i32.const 104 + i32.const 18 + i32.const 47 call $~lib/env/abort unreachable end @@ -580,35 +592,71 @@ local.get $3 i32.add local.get $1 - i32.load - i32.gt_s + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.gt_u if i32.const 0 - i32.const 136 - i32.const 16 - i32.const 53 + i32.const 104 + i32.const 19 + i32.const 63 call $~lib/env/abort unreachable end - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + block (result i32) + local.get $0 + i32.eqz + if + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $4 + local.get $4 + i32.const 5 + call $~lib/runtime/doRegister + end + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 end - local.get $0 local.get $1 i32.store - local.get $0 + local.get $1 local.get $2 + i32.add + local.set $5 + local.get $0 + local.get $5 i32.store offset=4 local.get $0 local.get $3 i32.store offset=8 local.get $0 ) - (func $~lib/polyfills/bswap (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#get:buffer (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + ) + (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + ) + (func $~lib/runtime/ArrayBufferView#get:byteLength (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + ) + (func $~lib/polyfills/bswap (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const -16711936 i32.and @@ -622,67 +670,45 @@ i32.or return ) - (func $~lib/dataview/DataView#getFloat32 (; 12 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - block $~lib/dataview/checkOffset|inlined.0 - local.get $1 - local.set $3 - i32.const 4 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#getFloat32 (; 17 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 42 + i32.const 6 + call $~lib/env/abort + unreachable end local.get $2 i32.const 0 i32.ne if (result f32) - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - f32.load offset=8 + f32.load else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load offset=8 + i32.load call $~lib/polyfills/bswap f32.reinterpret_i32 end ) - (func $~lib/polyfills/bswap (; 13 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 18 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -721,111 +747,64 @@ i64.rotr return ) - (func $~lib/dataview/DataView#getFloat64 (; 14 ;) (type $FUNCSIG$diii) (param $0 i32) (param $1 i32) (param $2 i32) (result f64) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - block $~lib/dataview/checkOffset|inlined.1 - local.get $1 - local.set $3 - i32.const 8 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#getFloat64 (; 19 ;) (type $FUNCSIG$diii) (param $0 i32) (param $1 i32) (param $2 i32) (result f64) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 8 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 56 + i32.const 7 + call $~lib/env/abort + unreachable end local.get $2 i32.const 0 i32.ne if (result f64) - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - f64.load offset=8 + f64.load else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i64.load offset=8 + i64.load call $~lib/polyfills/bswap f64.reinterpret_i64 end ) - (func $~lib/dataview/DataView#getInt8 (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $~lib/dataview/checkOffset|inlined.2 - local.get $1 - local.set $2 - i32.const 1 - local.set $3 - local.get $0 - i32.load offset=8 - local.set $4 - local.get $2 - i32.const 1073741816 - i32.gt_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $2 - local.get $3 - i32.add - local.get $4 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#getInt8 (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 - i32.load + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 104 + i32.const 67 + i32.const 49 + call $~lib/env/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load8_s offset=8 + i32.load8_s ) - (func $~lib/polyfills/bswap (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.shl @@ -841,62 +820,43 @@ i32.or return ) - (func $~lib/dataview/DataView#getInt16 (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt16 (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.3 - local.get $1 - local.set $3 - i32.const 2 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 2 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 75 + i32.const 7 + call $~lib/env/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load16_s offset=8 - local.set $7 + i32.load16_s + local.set $3 local.get $2 i32.const 0 i32.ne if (result i32) - local.get $7 + local.get $3 else - local.get $7 + local.get $3 call $~lib/polyfills/bswap end ) - (func $~lib/polyfills/bswap (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const -16711936 i32.and @@ -910,62 +870,43 @@ i32.or return ) - (func $~lib/dataview/DataView#getInt32 (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt32 (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.4 - local.get $1 - local.set $3 - i32.const 4 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 84 + i32.const 7 + call $~lib/env/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load offset=8 - local.set $7 + i32.load + local.set $3 local.get $2 i32.const 0 i32.ne if (result i32) - local.get $7 + local.get $3 else - local.get $7 + local.get $3 call $~lib/polyfills/bswap end ) - (func $~lib/polyfills/bswap (; 20 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 25 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -1004,106 +945,62 @@ i64.rotr return ) - (func $~lib/dataview/DataView#getInt64 (; 21 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i64) - block $~lib/dataview/checkOffset|inlined.5 - local.get $1 - local.set $3 - i32.const 8 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#getInt64 (; 26 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) + (local $3 i64) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 8 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 178 + i32.const 6 + call $~lib/env/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i64.load offset=8 - local.set $7 + i64.load + local.set $3 local.get $2 i32.const 0 i32.ne if (result i64) - local.get $7 + local.get $3 else - local.get $7 + local.get $3 call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint8 (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $~lib/dataview/checkOffset|inlined.6 - local.get $1 - local.set $2 - i32.const 1 - local.set $3 - local.get $0 - i32.load offset=8 - local.set $4 - local.get $2 - i32.const 1073741816 - i32.gt_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $2 - local.get $3 - i32.add - local.get $4 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#getUint8 (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 - i32.load + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 104 + i32.const 90 + i32.const 49 + call $~lib/env/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load8_u offset=8 + i32.load8_u ) - (func $~lib/polyfills/bswap (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.shl @@ -1117,433 +1014,269 @@ i32.or return ) - (func $~lib/dataview/DataView#getUint16 (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint16 (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.7 - local.get $1 - local.set $3 - i32.const 2 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 2 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 98 + i32.const 6 + call $~lib/env/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load16_u offset=8 - local.set $7 + i32.load16_u + local.set $3 local.get $2 i32.const 0 i32.ne if (result i32) - local.get $7 + local.get $3 else - local.get $7 + local.get $3 call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint32 (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint32 (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.8 - local.get $1 - local.set $3 - i32.const 4 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 107 + i32.const 6 + call $~lib/env/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load offset=8 - local.set $7 + i32.load + local.set $3 local.get $2 i32.const 0 i32.ne if (result i32) - local.get $7 + local.get $3 else - local.get $7 + local.get $3 call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint64 (; 26 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i64) - block $~lib/dataview/checkOffset|inlined.9 - local.get $1 - local.set $3 - i32.const 8 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#getUint64 (; 31 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) + (local $3 i64) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 8 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 187 + i32.const 6 + call $~lib/env/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i64.load offset=8 - local.set $7 + i64.load + local.set $3 local.get $2 i32.const 0 i32.ne if (result i64) - local.get $7 + local.get $3 else - local.get $7 + local.get $3 call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#setFloat32 (; 27 ;) (type $FUNCSIG$viifi) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.10 - local.get $1 - local.set $4 - i32.const 4 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#setFloat32 (; 32 ;) (type $FUNCSIG$viifi) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 116 + i32.const 6 + call $~lib/env/abort + unreachable end local.get $3 i32.const 0 i32.ne if - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $2 - f32.store offset=8 + f32.store else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $2 i32.reinterpret_f32 call $~lib/polyfills/bswap - i32.store offset=8 + i32.store end ) - (func $~lib/dataview/DataView#setFloat64 (; 28 ;) (type $FUNCSIG$viidi) (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.11 - local.get $1 - local.set $4 - i32.const 8 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#setFloat64 (; 33 ;) (type $FUNCSIG$viidi) (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 8 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 125 + i32.const 6 + call $~lib/env/abort + unreachable end local.get $3 i32.const 0 i32.ne if - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $2 - f64.store offset=8 + f64.store else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $2 i64.reinterpret_f64 call $~lib/polyfills/bswap - i64.store offset=8 + i64.store end ) - (func $~lib/dataview/DataView#setInt8 (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - block $~lib/dataview/checkOffset|inlined.12 - local.get $1 - local.set $3 - i32.const 1 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#setInt8 (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 local.get $0 - i32.load + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 104 + i32.const 131 + i32.const 49 + call $~lib/env/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $2 - i32.store8 offset=8 + i32.store8 ) - (func $~lib/dataview/DataView#setInt16 (; 30 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.13 - local.get $1 - local.set $4 - i32.const 2 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end - local.get $0 - i32.load - local.get $0 - i32.load offset=4 - i32.add + (func $~lib/dataview/DataView#setInt16 (; 35 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 - i32.add - local.get $3 i32.const 0 - i32.ne - if (result i32) - local.get $2 - else - local.get $2 - call $~lib/polyfills/bswap + i32.lt_s + local.get $1 + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 139 + i32.const 6 + call $~lib/env/abort + unreachable end - i32.store16 offset=8 - ) - (func $~lib/dataview/DataView#setInt32 (; 31 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.14 - local.get $1 - local.set $4 - i32.const 4 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + local.get $3 + i32.const 0 + i32.ne + if (result i32) + local.get $2 + else + local.get $2 + call $~lib/polyfills/bswap end + i32.store16 + ) + (func $~lib/dataview/DataView#setInt32 (; 36 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 147 + i32.const 6 + call $~lib/env/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $3 @@ -1555,48 +1288,29 @@ local.get $2 call $~lib/polyfills/bswap end - i32.store offset=8 + i32.store ) - (func $~lib/dataview/DataView#setInt64 (; 32 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.15 - local.get $1 - local.set $4 - i32.const 8 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#setInt64 (; 37 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 8 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 196 + i32.const 6 + call $~lib/env/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $3 @@ -1608,93 +1322,49 @@ local.get $2 call $~lib/polyfills/bswap end - i64.store offset=8 + i64.store ) - (func $~lib/dataview/DataView#setUint8 (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - block $~lib/dataview/checkOffset|inlined.16 - local.get $1 - local.set $3 - i32.const 1 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#setUint8 (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 local.get $0 - i32.load + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 104 + i32.const 152 + i32.const 49 + call $~lib/env/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $2 - i32.store8 offset=8 + i32.store8 ) - (func $~lib/dataview/DataView#setUint16 (; 34 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.17 - local.get $1 - local.set $4 - i32.const 2 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#setUint16 (; 39 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 2 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 160 + i32.const 6 + call $~lib/env/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $3 @@ -1706,48 +1376,29 @@ local.get $2 call $~lib/polyfills/bswap end - i32.store16 offset=8 + i32.store16 ) - (func $~lib/dataview/DataView#setUint32 (; 35 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.18 - local.get $1 - local.set $4 - i32.const 4 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#setUint32 (; 40 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 168 + i32.const 6 + call $~lib/env/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $3 @@ -1759,48 +1410,29 @@ local.get $2 call $~lib/polyfills/bswap end - i32.store offset=8 + i32.store ) - (func $~lib/dataview/DataView#setUint64 (; 36 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.19 - local.get $1 - local.set $4 - i32.const 8 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#setUint64 (; 41 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 8 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 204 + i32.const 6 + call $~lib/env/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $3 @@ -1812,53 +1444,62 @@ local.get $2 call $~lib/polyfills/bswap end - i64.store offset=8 + i64.store ) - (func $start:std/dataview (; 37 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena + (func $start:std/dataview (; 42 ;) (type $FUNCSIG$v) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset i32.const 0 i32.const 8 call $~lib/typedarray/Uint8Array#constructor global.set $std/dataview/array global.get $std/dataview/array - i32.const 0 + i32.load offset=4 i32.const 246 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 global.get $std/dataview/array - i32.const 1 + i32.load offset=4 i32.const 224 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=1 global.get $std/dataview/array - i32.const 2 + i32.load offset=4 i32.const 88 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=2 global.get $std/dataview/array - i32.const 3 + i32.load offset=4 i32.const 159 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=3 global.get $std/dataview/array - i32.const 4 + i32.load offset=4 i32.const 130 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=4 global.get $std/dataview/array - i32.const 5 + i32.load offset=4 i32.const 101 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=5 global.get $std/dataview/array - i32.const 6 + i32.load offset=4 i32.const 67 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=6 global.get $std/dataview/array - i32.const 7 + i32.load offset=4 i32.const 95 - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 offset=7 i32.const 0 global.get $std/dataview/array - i32.load + call $~lib/typedarray/Uint8Array#get:buffer global.get $std/dataview/array - i32.load offset=4 + call $~lib/runtime/ArrayBufferView#get:byteOffset global.get $std/dataview/array - i32.load offset=8 + call $~lib/runtime/ArrayBufferView#get:byteLength call $~lib/dataview/DataView#constructor global.set $std/dataview/view global.get $std/dataview/view @@ -1870,7 +1511,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 16 i32.const 0 call $~lib/env/abort @@ -1885,7 +1526,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 17 i32.const 0 call $~lib/env/abort @@ -1900,7 +1541,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 18 i32.const 0 call $~lib/env/abort @@ -1915,7 +1556,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 19 i32.const 0 call $~lib/env/abort @@ -1930,7 +1571,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 20 i32.const 0 call $~lib/env/abort @@ -1945,7 +1586,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 22 i32.const 0 call $~lib/env/abort @@ -1960,7 +1601,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 23 i32.const 0 call $~lib/env/abort @@ -1975,7 +1616,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 24 i32.const 0 call $~lib/env/abort @@ -1990,7 +1631,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 25 i32.const 0 call $~lib/env/abort @@ -2005,7 +1646,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 26 i32.const 0 call $~lib/env/abort @@ -2020,7 +1661,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 28 i32.const 0 call $~lib/env/abort @@ -2035,7 +1676,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 29 i32.const 0 call $~lib/env/abort @@ -2049,7 +1690,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 31 i32.const 0 call $~lib/env/abort @@ -2063,7 +1704,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 32 i32.const 0 call $~lib/env/abort @@ -2077,7 +1718,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 33 i32.const 0 call $~lib/env/abort @@ -2091,7 +1732,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 34 i32.const 0 call $~lib/env/abort @@ -2105,7 +1746,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 35 i32.const 0 call $~lib/env/abort @@ -2119,7 +1760,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 36 i32.const 0 call $~lib/env/abort @@ -2133,7 +1774,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 37 i32.const 0 call $~lib/env/abort @@ -2147,7 +1788,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 38 i32.const 0 call $~lib/env/abort @@ -2166,7 +1807,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 40 i32.const 0 call $~lib/env/abort @@ -2185,7 +1826,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 41 i32.const 0 call $~lib/env/abort @@ -2204,7 +1845,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 42 i32.const 0 call $~lib/env/abort @@ -2223,7 +1864,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 43 i32.const 0 call $~lib/env/abort @@ -2242,7 +1883,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 44 i32.const 0 call $~lib/env/abort @@ -2261,7 +1902,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 45 i32.const 0 call $~lib/env/abort @@ -2280,7 +1921,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 46 i32.const 0 call $~lib/env/abort @@ -2299,7 +1940,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 48 i32.const 0 call $~lib/env/abort @@ -2318,7 +1959,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 49 i32.const 0 call $~lib/env/abort @@ -2337,7 +1978,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 50 i32.const 0 call $~lib/env/abort @@ -2356,7 +1997,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 51 i32.const 0 call $~lib/env/abort @@ -2375,7 +2016,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 52 i32.const 0 call $~lib/env/abort @@ -2394,7 +2035,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 53 i32.const 0 call $~lib/env/abort @@ -2413,7 +2054,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 54 i32.const 0 call $~lib/env/abort @@ -2428,7 +2069,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 56 i32.const 0 call $~lib/env/abort @@ -2443,7 +2084,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 57 i32.const 0 call $~lib/env/abort @@ -2458,7 +2099,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 58 i32.const 0 call $~lib/env/abort @@ -2473,7 +2114,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 59 i32.const 0 call $~lib/env/abort @@ -2488,7 +2129,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 60 i32.const 0 call $~lib/env/abort @@ -2503,7 +2144,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 62 i32.const 0 call $~lib/env/abort @@ -2518,7 +2159,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 63 i32.const 0 call $~lib/env/abort @@ -2533,7 +2174,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 64 i32.const 0 call $~lib/env/abort @@ -2548,7 +2189,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 65 i32.const 0 call $~lib/env/abort @@ -2563,7 +2204,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 66 i32.const 0 call $~lib/env/abort @@ -2578,7 +2219,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 68 i32.const 0 call $~lib/env/abort @@ -2593,7 +2234,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 69 i32.const 0 call $~lib/env/abort @@ -2607,7 +2248,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 71 i32.const 0 call $~lib/env/abort @@ -2621,7 +2262,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 72 i32.const 0 call $~lib/env/abort @@ -2635,7 +2276,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 73 i32.const 0 call $~lib/env/abort @@ -2649,7 +2290,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 74 i32.const 0 call $~lib/env/abort @@ -2663,7 +2304,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 75 i32.const 0 call $~lib/env/abort @@ -2677,7 +2318,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 76 i32.const 0 call $~lib/env/abort @@ -2691,7 +2332,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 77 i32.const 0 call $~lib/env/abort @@ -2705,7 +2346,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 78 i32.const 0 call $~lib/env/abort @@ -2722,7 +2363,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 80 i32.const 0 call $~lib/env/abort @@ -2739,7 +2380,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 81 i32.const 0 call $~lib/env/abort @@ -2756,7 +2397,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 82 i32.const 0 call $~lib/env/abort @@ -2773,7 +2414,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 83 i32.const 0 call $~lib/env/abort @@ -2790,7 +2431,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 84 i32.const 0 call $~lib/env/abort @@ -2807,7 +2448,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 85 i32.const 0 call $~lib/env/abort @@ -2824,7 +2465,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 86 i32.const 0 call $~lib/env/abort @@ -2841,7 +2482,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 88 i32.const 0 call $~lib/env/abort @@ -2858,7 +2499,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 89 i32.const 0 call $~lib/env/abort @@ -2875,7 +2516,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 90 i32.const 0 call $~lib/env/abort @@ -2892,7 +2533,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 91 i32.const 0 call $~lib/env/abort @@ -2909,7 +2550,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 92 i32.const 0 call $~lib/env/abort @@ -2926,7 +2567,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 93 i32.const 0 call $~lib/env/abort @@ -2943,7 +2584,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 94 i32.const 0 call $~lib/env/abort @@ -2958,7 +2599,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 96 i32.const 0 call $~lib/env/abort @@ -2973,7 +2614,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 97 i32.const 0 call $~lib/env/abort @@ -2988,7 +2629,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 98 i32.const 0 call $~lib/env/abort @@ -3003,7 +2644,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 99 i32.const 0 call $~lib/env/abort @@ -3018,7 +2659,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 100 i32.const 0 call $~lib/env/abort @@ -3033,7 +2674,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 102 i32.const 0 call $~lib/env/abort @@ -3048,7 +2689,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 103 i32.const 0 call $~lib/env/abort @@ -3063,7 +2704,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 104 i32.const 0 call $~lib/env/abort @@ -3078,7 +2719,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 105 i32.const 0 call $~lib/env/abort @@ -3093,7 +2734,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 106 i32.const 0 call $~lib/env/abort @@ -3108,7 +2749,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 108 i32.const 0 call $~lib/env/abort @@ -3123,7 +2764,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 109 i32.const 0 call $~lib/env/abort @@ -3143,7 +2784,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 112 i32.const 0 call $~lib/env/abort @@ -3163,7 +2804,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 115 i32.const 0 call $~lib/env/abort @@ -3183,7 +2824,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 118 i32.const 0 call $~lib/env/abort @@ -3203,7 +2844,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 121 i32.const 0 call $~lib/env/abort @@ -3221,7 +2862,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 124 i32.const 0 call $~lib/env/abort @@ -3245,7 +2886,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 127 i32.const 0 call $~lib/env/abort @@ -3269,7 +2910,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 130 i32.const 0 call $~lib/env/abort @@ -3289,7 +2930,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 133 i32.const 0 call $~lib/env/abort @@ -3309,7 +2950,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 136 i32.const 0 call $~lib/env/abort @@ -3329,7 +2970,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 139 i32.const 0 call $~lib/env/abort @@ -3349,7 +2990,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 142 i32.const 0 call $~lib/env/abort @@ -3367,7 +3008,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 145 i32.const 0 call $~lib/env/abort @@ -3389,7 +3030,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 148 i32.const 0 call $~lib/env/abort @@ -3411,7 +3052,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 151 i32.const 0 call $~lib/env/abort @@ -3431,7 +3072,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 154 i32.const 0 call $~lib/env/abort @@ -3451,7 +3092,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 157 i32.const 0 call $~lib/env/abort @@ -3471,7 +3112,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 160 i32.const 0 call $~lib/env/abort @@ -3491,16 +3132,16 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 163 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 38 ;) (type $FUNCSIG$v) + (func $start (; 43 ;) (type $FUNCSIG$v) call $start:std/dataview ) - (func $null (; 39 ;) (type $FUNCSIG$v) + (func $null (; 44 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 92c02146d3..16c498b0a0 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -90,7 +90,7 @@ if i32.const 0 i32.const 48 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -104,7 +104,7 @@ if i32.const 0 i32.const 48 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index a68b133fd8..949c64322a 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -154,7 +154,7 @@ if i32.const 0 i32.const 48 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -169,7 +169,7 @@ if i32.const 0 i32.const 48 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index adbb3496c2..ffd13cd2a9 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -84,7 +84,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -98,7 +98,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 50beb647e1..1e15eedfdd 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -147,7 +147,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -162,7 +162,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index ed1bd53084..4a930e3c11 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -167,7 +167,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -181,7 +181,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 1fb8471ea2..9f0b83fa98 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -215,7 +215,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -230,7 +230,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index f71d18fe95..45871616fb 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -2651,7 +2651,7 @@ if i32.const 0 i32.const 232 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -2665,7 +2665,7 @@ if i32.const 0 i32.const 232 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 5f8b80c15e..fc1f1ed780 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -3340,7 +3340,7 @@ if i32.const 0 i32.const 232 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -3355,7 +3355,7 @@ if i32.const 0 i32.const 232 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index 5af6304348..93a5f397a9 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -1514,7 +1514,7 @@ if i32.const 0 i32.const 136 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -1528,7 +1528,7 @@ if i32.const 0 i32.const 136 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index b8d0129894..7e6a864d1a 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -1926,7 +1926,7 @@ if i32.const 0 i32.const 136 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -1941,7 +1941,7 @@ if i32.const 0 i32.const 136 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 4e3a90ec66..cdcc11fa50 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -92,7 +92,7 @@ (data (i32.const 1592) "\01\00\00\00\0c\00\00\00,\00a\00,\00b\00,\00c") (data (i32.const 1616) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00c\00,") (data (i32.const 1640) "\02\00\00\00\90\01\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 2048) "\05\00\00\00\10\00\00\00p\06\00\00p\06\00\00\00\08\00\00d") + (data (i32.const 2048) "\05\00\00\00\10\00\00\00p\06\00\00p\06\00\00\90\01\00\00d") (data (i32.const 2072) "\01\00\00\00\02\00\00\008") (data (i32.const 2088) "\01\00\00\00\n\00\00\00-\001\000\000\000") (data (i32.const 2112) "\01\00\00\00\08\00\00\001\002\003\004") @@ -128,11 +128,11 @@ (data (i32.const 3056) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") (data (i32.const 3088) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") (data (i32.const 3112) "\02\00\00\00\b8\02\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8#__set (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) @@ -6700,7 +6696,14 @@ local.tee $0 if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 312 call $~lib/string/String.eq @@ -6743,7 +6746,14 @@ local.tee $0 if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 312 call $~lib/string/String.eq @@ -6771,7 +6781,14 @@ local.tee $0 if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 1480 call $~lib/string/String.eq @@ -6801,7 +6818,14 @@ local.tee $0 if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -6811,8 +6835,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq local.set $0 @@ -6821,8 +6854,17 @@ end if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else @@ -6851,7 +6893,14 @@ local.tee $0 if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -6861,8 +6910,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq local.set $0 @@ -6871,8 +6929,17 @@ end if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else @@ -6902,7 +6969,14 @@ local.tee $0 if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -6912,8 +6986,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq local.set $0 @@ -6922,8 +7005,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 312 call $~lib/string/String.eq local.set $0 @@ -6932,8 +7024,17 @@ end if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=12 + i32.const 12 + i32.add + i32.const -1 + i32.const 12 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else @@ -6963,7 +7064,14 @@ local.tee $0 if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 312 call $~lib/string/String.eq @@ -6973,8 +7081,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 336 call $~lib/string/String.eq local.set $0 @@ -6983,8 +7100,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq local.set $0 @@ -6993,8 +7119,17 @@ end if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=12 + i32.const 12 + i32.add + i32.const -1 + i32.const 12 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else @@ -7024,7 +7159,14 @@ local.tee $0 if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -7034,8 +7176,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7044,8 +7195,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq local.set $0 @@ -7054,8 +7214,17 @@ end if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=12 + i32.const 12 + i32.add + i32.const -1 + i32.const 12 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 312 call $~lib/string/String.eq else @@ -7084,7 +7253,14 @@ local.tee $0 if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -7094,8 +7270,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7104,8 +7289,17 @@ end if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else @@ -7147,7 +7341,14 @@ local.tee $0 if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -7175,7 +7376,14 @@ local.tee $0 if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -7205,7 +7413,14 @@ local.tee $0 if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -7215,8 +7430,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7225,8 +7449,17 @@ end if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else @@ -7255,7 +7488,14 @@ local.tee $0 if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -7265,8 +7505,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7275,8 +7524,17 @@ end if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else @@ -7305,7 +7563,14 @@ local.tee $0 if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -7315,8 +7580,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7325,8 +7599,17 @@ end if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 683f6bce2f..fa2e3a58c2 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -93,7 +93,7 @@ (data (i32.const 1592) "\01\00\00\00\0c\00\00\00,\00a\00,\00b\00,\00c\00") (data (i32.const 1616) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00c\00,\00") (data (i32.const 1640) "\02\00\00\00\90\01\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") - (data (i32.const 2048) "\05\00\00\00\10\00\00\00p\06\00\00p\06\00\00\00\08\00\00d\00\00\00") + (data (i32.const 2048) "\05\00\00\00\10\00\00\00p\06\00\00p\06\00\00\90\01\00\00d\00\00\00") (data (i32.const 2072) "\01\00\00\00\02\00\00\008\00") (data (i32.const 2088) "\01\00\00\00\n\00\00\00-\001\000\000\000\00") (data (i32.const 2112) "\01\00\00\00\08\00\00\001\002\003\004\00") @@ -129,11 +129,11 @@ (data (i32.const 3056) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") (data (i32.const 3088) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") (data (i32.const 3112) "\02\00\00\00\b8\02\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8#__set (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -8279,7 +8275,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 312 call $~lib/string/String.eq @@ -8325,7 +8333,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 312 call $~lib/string/String.eq @@ -8353,7 +8373,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 1480 call $~lib/string/String.eq @@ -8381,7 +8413,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8389,25 +8433,55 @@ local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else local.get $2 end + i32.const 0 + i32.ne i32.eqz if i32.const 0 @@ -8429,7 +8503,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8437,25 +8523,55 @@ local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else local.get $2 end + i32.const 0 + i32.ne i32.eqz if i32.const 0 @@ -8477,7 +8593,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8485,35 +8613,79 @@ local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 312 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=12 + i32.const 3 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else local.get $2 end + i32.const 0 + i32.ne i32.eqz if i32.const 0 @@ -8535,7 +8707,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 312 call $~lib/string/String.eq @@ -8543,35 +8727,79 @@ local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 336 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=12 + i32.const 3 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else local.get $2 end + i32.const 0 + i32.ne i32.eqz if i32.const 0 @@ -8593,7 +8821,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8601,35 +8841,79 @@ local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=12 + i32.const 3 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 312 call $~lib/string/String.eq else local.get $2 end + i32.const 0 + i32.ne i32.eqz if i32.const 0 @@ -8651,7 +8935,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8659,25 +8955,55 @@ local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else local.get $2 end + i32.const 0 + i32.ne i32.eqz if i32.const 0 @@ -8717,7 +9043,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8745,7 +9083,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8773,7 +9123,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8781,25 +9143,55 @@ local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else local.get $2 end + i32.const 0 + i32.ne i32.eqz if i32.const 0 @@ -8821,7 +9213,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8829,25 +9233,55 @@ local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else local.get $2 end + i32.const 0 + i32.ne i32.eqz if i32.const 0 @@ -8869,7 +9303,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8877,25 +9323,55 @@ local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else local.get $2 end + i32.const 0 + i32.ne i32.eqz if i32.const 0 diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 284c8415c4..ce390ff41e 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -144,7 +144,7 @@ if i32.const 0 i32.const 72 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 72 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 11c5894fd2..274f9b61c3 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -206,7 +206,7 @@ if i32.const 0 i32.const 72 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -221,7 +221,7 @@ if i32.const 0 i32.const 72 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable From ba4c00efbd2862611a2d679f0add555ffc302beb Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 18 Mar 2019 00:40:55 +0100 Subject: [PATCH 045/119] clean --- src/diagnostics.ts | 4 +- std/assembly/array.ts | 18 +- std/assembly/string.ts | 30 +- std/assembly/typedarray.ts | 2 +- tests/compiler/number.optimized.wat | 26 +- tests/compiler/number.untouched.wat | 26 +- tests/compiler/object-literal.optimized.wat | 4 +- tests/compiler/object-literal.untouched.wat | 4 +- tests/compiler/std/array-access.optimized.wat | 2 +- tests/compiler/std/array-access.untouched.wat | 2 +- .../compiler/std/array-literal.optimized.wat | 8 +- .../compiler/std/array-literal.untouched.wat | 12 +- tests/compiler/std/array.optimized.wat | 94 +- tests/compiler/std/array.untouched.wat | 117 ++- tests/compiler/std/string-utf8.optimized.wat | 22 +- tests/compiler/std/string-utf8.untouched.wat | 22 +- tests/compiler/std/string.optimized.wat | 836 +++++++++--------- tests/compiler/std/string.untouched.wat | 629 +++++++------ tests/compiler/std/symbol.optimized.wat | 57 +- tests/compiler/std/symbol.untouched.wat | 66 +- 20 files changed, 932 insertions(+), 1049 deletions(-) diff --git a/src/diagnostics.ts b/src/diagnostics.ts index 2eff86a322..9368bf9484 100644 --- a/src/diagnostics.ts +++ b/src/diagnostics.ts @@ -280,8 +280,8 @@ export abstract class DiagnosticEmitter { var message = DiagnosticMessage.create(code, category, arg0, arg1, arg2).withRange(range); if (relatedRange) message.relatedRange = relatedRange; this.diagnostics.push(message); - console.log(formatDiagnosticMessage(message, true, true) + "\n"); // temporary - console.log(new Error("stack").stack); + // console.log(formatDiagnosticMessage(message, true, true) + "\n"); // temporary + // console.log(new Error("stack").stack); } /** Emits an informatory diagnostic message. */ diff --git a/std/assembly/array.ts b/std/assembly/array.ts index cbe441e7af..ef3fa4ad40 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -4,13 +4,13 @@ import { COMPARATOR, SORT } from "./util/sort"; import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number"; import { isArray as builtin_isArray } from "./builtins"; -/** Ensures that the given array has _at least_ the specified length. */ -function ensureLength(array: ArrayBufferView, length: i32, alignLog2: u32): void { +/** Ensures that the given array has _at least_ the specified capacity. */ +function ensureCapacity(array: ArrayBufferView, minCapacity: i32, alignLog2: u32): void { var oldData = array.data; var oldCapacity = oldData.byteLength >>> alignLog2; - if (length > oldCapacity) { - if (length > (MAX_BYTELENGTH >>> alignLog2)) throw new RangeError("Invalid array length"); - let newByteLength = length << alignLog2; + if (minCapacity > oldCapacity) { + if (minCapacity > (MAX_BYTELENGTH >>> alignLog2)) throw new RangeError("Invalid array length"); + let newByteLength = minCapacity << alignLog2; let newData = REALLOCATE(changetype(oldData), newByteLength); // registers on move if (newData !== changetype(oldData)) { array.data = changetype(newData); // links @@ -41,7 +41,7 @@ export class Array extends ArrayBufferView { } set length(length: i32) { - ensureLength(changetype(this), length, alignof()); + ensureCapacity(this, length, alignof()); this.length_ = length; } @@ -61,7 +61,7 @@ export class Array extends ArrayBufferView { @operator("[]=") private __set(index: i32, value: T): void { // unchecked is built-in - ensureLength(changetype(this), index + 1, alignof()); + ensureCapacity(this, index + 1, alignof()); store(this.dataStart + (index << alignof()), value); if (isManaged()) LINK(value, this); if (index >= this.length_) this.length_ = index + 1; @@ -119,7 +119,7 @@ export class Array extends ArrayBufferView { push(element: T): i32 { var newLength = this.length_ + 1; - ensureLength(changetype(this), newLength, alignof()); + ensureCapacity(this, newLength, alignof()); this.length_ = newLength; store(this.dataStart + ((newLength - 1) << alignof()), element); if (isManaged()) LINK(element, this); @@ -266,7 +266,7 @@ export class Array extends ArrayBufferView { unshift(element: T): i32 { var newLength = this.length_ + 1; - ensureLength(changetype(this), newLength, alignof()); + ensureCapacity(this, newLength, alignof()); var base = this.dataStart; memory.copy( base + sizeof(), diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 13ec83c927..139838f73c 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -41,13 +41,11 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut } charCodeAt(pos: i32): i32 { - assert(this !== null); if (pos >= this.length) return -1; // (NaN) return load(changetype(this) + (pos << 1)); } codePointAt(pos: i32): i32 { - assert(this !== null); if (pos >= this.length) return -1; // (undefined) var first = load(changetype(this) + (pos << 1)); if (first < 0xD800 || first > 0xDBFF || pos + 1 == this.length) return first; @@ -56,13 +54,11 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut return ((first - 0xD800) << 10) + (second - 0xDC00) + 0x10000; } - @operator("+") static concat(left: String, right: String): String { - if (!changetype(left)) left = changetype("null"); - return left.concat(right); + @operator("+") private static __concat(left: string, right: string): string { + return select(left, "null", left !== null).concat(right); } concat(other: String): String { - assert(this !== null); if (other === null) other = changetype("null"); var thisSize: isize = this.length << 1; var otherSize: isize = other.length << 1; @@ -85,7 +81,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut return !compareImpl(this, start, searchString, 0, searchLength); } - @operator("==") static eq(left: String, right: String): bool { + @operator("==") private static __eq(left: String, right: String): bool { if (left === right) return true; if (left === null || right === null) return false; var leftLength = left.length; @@ -94,11 +90,11 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut return !compareImpl(left, 0, right, 0, leftLength); } - @operator("!=") static ne(left: String, right: String): bool { - return !this.eq(left, right); + @operator("!=") private static __ne(left: String, right: String): bool { + return !this.__eq(left, right); } - @operator(">") static gt(left: String, right: String): bool { + @operator(">") private static __gt(left: String, right: String): bool { if (left === right || left === null || right === null) return false; var leftLength = left.length; var rightLength = right.length; @@ -108,11 +104,11 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut return compareImpl(left, 0, right, 0, min(leftLength, rightLength)) > 0; } - @operator(">=") static gte(left: String, right: String): bool { - return !this.lt(left, right); + @operator(">=") private static __gte(left: String, right: String): bool { + return !this.__lt(left, right); } - @operator("<") static lt(left: String, right: String): bool { + @operator("<") private static __lt(left: String, right: String): bool { if (left === right || left === null || right === null) return false; var leftLength = left.length; var rightLength = right.length; @@ -122,8 +118,8 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut return compareImpl(left, 0, right, 0, min(leftLength, rightLength)) < 0; } - @operator("<=") static lte(left: String, right: String): bool { - return !this.gt(left, right); + @operator("<=") private static __lte(left: String, right: String): bool { + return !this.__gt(left, right); } @inline includes(searchString: String, position: i32 = 0): bool { @@ -366,8 +362,8 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut charStr, load(changetype(this) + (i << 1)) ); - store(resultStart + (i << alignof()), charStr); // result[i] = charStr - LINK(REGISTER(charStr), result); + store(resultStart + (i << alignof()), REGISTER(charStr)); // result[i] = charStr + if (isManaged()) LINK(changetype(charStr), result); } return result; } else if (!length) { diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index 53f560160e..5bd84687e5 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -1,4 +1,4 @@ -import { ALLOCATE, REGISTER, LINK, ArrayBufferView } from "./runtime"; +import { ALLOCATE, REGISTER, ArrayBufferView } from "./runtime"; import { COMPARATOR, SORT as SORT_IMPL } from "./util/sort"; // function clampToByte(value: i32): i32 { diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 2ea6fa0f6b..3dd9e1065f 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -406,7 +406,7 @@ end local.get $3 ) - (func $~lib/string/String.eq (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2433,7 +2433,7 @@ if i32.const 0 i32.const 1648 - i32.const 190 + i32.const 186 i32.const 4 call $~lib/env/abort unreachable @@ -2531,7 +2531,7 @@ global.get $number/a call $~lib/util/number/itoa32 i32.const 504 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2554,7 +2554,7 @@ call $~lib/runtime/assertUnregistered local.get $0 i32.const 1696 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2567,7 +2567,7 @@ i32.const 3 call $~lib/util/number/itoa32 i32.const 1712 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2580,7 +2580,7 @@ i32.const -5 call $~lib/util/number/itoa32 i32.const 1728 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2593,7 +2593,7 @@ i32.const 4 call $~lib/util/number/itoa32 i32.const 1744 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2610,7 +2610,7 @@ global.get $number/a call $~lib/util/number/itoa32 i32.const 1760 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2627,7 +2627,7 @@ global.get $number/a call $~lib/util/number/itoa32 i32.const 504 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2639,7 +2639,7 @@ end i32.const 1776 i32.const 1776 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2651,7 +2651,7 @@ end i32.const 1792 i32.const 1792 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2669,7 +2669,7 @@ local.get $0 call $~lib/util/number/itoa32 i32.const 504 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2687,7 +2687,7 @@ local.get $0 call $~lib/util/number/itoa32 i32.const 1760 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 7c46b1b6b6..c248e7f24b 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -564,7 +564,7 @@ end local.get $5 ) - (func $~lib/string/String.eq (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3416,7 +3416,7 @@ if i32.const 0 i32.const 1648 - i32.const 190 + i32.const 186 i32.const 4 call $~lib/env/abort unreachable @@ -3706,7 +3706,7 @@ global.get $number/a call $~lib/number/I32#toString i32.const 504 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -3719,7 +3719,7 @@ f64.const 2 call $~lib/number/F64#toString i32.const 1696 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -3732,7 +3732,7 @@ i32.const 3 call $~lib/number/I32#toString i32.const 1712 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -3745,7 +3745,7 @@ i32.const -5 call $~lib/number/I32#toString i32.const 1728 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -3758,7 +3758,7 @@ i32.const 4 call $~lib/number/I32#toString i32.const 1744 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -3777,7 +3777,7 @@ end call $~lib/number/I32#toString i32.const 1760 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -3796,7 +3796,7 @@ end call $~lib/number/I32#toString i32.const 504 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -3810,7 +3810,7 @@ i32.eqz call $~lib/number/Bool#toString i32.const 1776 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -3824,7 +3824,7 @@ i32.eqz call $~lib/number/Bool#toString i32.const 1792 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -3844,7 +3844,7 @@ end call $~lib/number/I32#toString i32.const 504 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -3864,7 +3864,7 @@ end call $~lib/number/I32#toString i32.const 1760 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index ca807e09c0..0f616e2091 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -172,7 +172,7 @@ end local.get $3 ) - (func $~lib/string/String.eq (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.__eq (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -230,7 +230,7 @@ end local.get $0 i32.load offset=4 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index 91cf4942d1..94d788e821 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -239,7 +239,7 @@ end local.get $5 ) - (func $~lib/string/String.eq (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -300,7 +300,7 @@ local.get $0 i32.load offset=4 i32.const 16 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 8235a0c19a..d3be53d0d1 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -106,7 +106,7 @@ if i32.const 0 i32.const 24 - i32.const 165 + i32.const 161 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 25a0ca71ec..500f9ca0af 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -150,7 +150,7 @@ if i32.const 0 i32.const 24 - i32.const 165 + i32.const 161 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index df11fd732d..10b41a31fe 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1620,7 +1620,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureLength (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -1642,7 +1642,7 @@ i32.const 0 i32.const 272 i32.const 12 - i32.const 59 + i32.const 64 call $~lib/env/abort unreachable end @@ -1674,7 +1674,7 @@ i32.const 1 i32.add i32.const 0 - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $1 local.get $0 i32.load offset=4 @@ -1699,7 +1699,7 @@ i32.const 1 i32.add i32.const 2 - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $0 i32.load offset=4 local.get $1 diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 62d68daaca..18b10bde4b 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -2113,7 +2113,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureLength (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2140,7 +2140,7 @@ i32.const 0 i32.const 272 i32.const 12 - i32.const 59 + i32.const 64 call $~lib/env/abort unreachable end @@ -2180,7 +2180,7 @@ i32.const 1 i32.add i32.const 0 - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $0 i32.load offset=4 local.get $1 @@ -2232,7 +2232,7 @@ i32.const 1 i32.add i32.const 2 - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $0 i32.load offset=4 local.get $1 @@ -2301,7 +2301,7 @@ i32.const 1 i32.add i32.const 2 - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $0 i32.load offset=4 local.get $1 @@ -2374,7 +2374,7 @@ i32.const 1 i32.add i32.const 2 - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $0 i32.load offset=4 local.get $1 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 423fa8258e..da02a44deb 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2206,7 +2206,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureLength (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureCapacity (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -2227,7 +2227,7 @@ i32.const 0 i32.const 488 i32.const 12 - i32.const 59 + i32.const 64 call $~lib/env/abort unreachable end @@ -2261,7 +2261,7 @@ i32.const 1 i32.add local.tee $2 - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $0 local.get $2 i32.store offset=12 @@ -2521,7 +2521,7 @@ i32.const 1 i32.add local.tee $2 - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $0 i32.load offset=4 local.tee $3 @@ -5784,7 +5784,7 @@ local.get $1 call $std/array/assertSorted> ) - (func $~lib/string/String.eq (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -5881,7 +5881,7 @@ i32.lt_u select i32.load - call $~lib/string/String.eq + call $~lib/string/String.__eq if local.get $2 i32.const 1 @@ -5927,16 +5927,6 @@ (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 3400 - i32.const 65 - i32.const 4 - call $~lib/env/abort - unreachable - end local.get $1 i32.const 3440 local.get $1 @@ -5982,7 +5972,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/string/String.concat (; 110 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 110 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 3440 local.get $0 @@ -6011,7 +6001,7 @@ f64.floor i32.trunc_f64_s call $~lib/string/String#charAt - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $1 local.get $2 i32.const 1 @@ -6082,7 +6072,7 @@ if i32.const 0 i32.const 3400 - i32.const 190 + i32.const 186 i32.const 4 call $~lib/env/abort unreachable @@ -8270,7 +8260,7 @@ local.get $1 i32.const 1 i32.add - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $0 i32.load offset=4 local.get $1 @@ -9399,14 +9389,14 @@ local.get $0 i32.const 3512 call $~lib/array/Array#join - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $1 end local.get $5 if local.get $1 i32.const 3512 - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $1 end local.get $4 @@ -9428,7 +9418,7 @@ local.get $0 i32.const 3512 call $~lib/array/Array#join - call $~lib/string/String.concat + call $~lib/string/String.__concat else local.get $1 end @@ -9632,14 +9622,14 @@ local.get $1 local.get $0 call $~lib/array/Array#join_int - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $1 end local.get $5 if local.get $1 i32.const 3512 - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $1 end local.get $4 @@ -9660,7 +9650,7 @@ local.get $1 local.get $0 call $~lib/array/Array#join_int - call $~lib/string/String.concat + call $~lib/string/String.__concat else local.get $1 end @@ -9724,14 +9714,14 @@ local.get $0 i32.const 3512 call $~lib/array/Array#join - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $1 end local.get $5 if local.get $1 i32.const 3512 - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $1 end local.get $4 @@ -9753,7 +9743,7 @@ local.get $0 i32.const 3512 call $~lib/array/Array#join - call $~lib/string/String.concat + call $~lib/string/String.__concat else local.get $1 end @@ -9815,14 +9805,14 @@ local.get $1 local.get $0 call $~lib/array/Array>#join_arr - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $1 end local.get $5 if local.get $1 i32.const 3512 - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $1 end local.get $4 @@ -9843,7 +9833,7 @@ local.get $1 local.get $0 call $~lib/array/Array>#join_arr - call $~lib/string/String.concat + call $~lib/string/String.__concat else local.get $1 end @@ -14034,7 +14024,7 @@ call $~lib/runtime/doWrapArray call $~lib/array/Array#join_bool i32.const 3544 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -14051,7 +14041,7 @@ i32.const 3264 call $~lib/array/Array#join i32.const 4072 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -14068,7 +14058,7 @@ i32.const 4120 call $~lib/array/Array#join i32.const 4072 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -14085,7 +14075,7 @@ i32.const 4176 call $~lib/array/Array#join i32.const 4208 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -14101,7 +14091,7 @@ call $~lib/runtime/doWrapArray call $~lib/array/Array#join_flt i32.const 5488 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -14118,7 +14108,7 @@ i32.const 3264 call $~lib/array/Array#join i32.const 5576 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -14158,7 +14148,7 @@ global.get $std/array/refArr call $~lib/array/Array#join_ref i32.const 5680 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -14171,7 +14161,7 @@ global.get $std/array/reversed0 call $~lib/array/Array#toString i32.const 3264 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -14184,7 +14174,7 @@ global.get $std/array/reversed1 call $~lib/array/Array#toString i32.const 5576 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -14197,7 +14187,7 @@ global.get $std/array/reversed2 call $~lib/array/Array#toString i32.const 5752 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -14210,7 +14200,7 @@ global.get $std/array/reversed4 call $~lib/array/Array#toString i32.const 5768 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -14226,7 +14216,7 @@ call $~lib/runtime/doWrapArray call $~lib/array/Array#join_int i32.const 5824 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -14242,7 +14232,7 @@ call $~lib/runtime/doWrapArray call $~lib/array/Array#join_int i32.const 5880 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -14258,7 +14248,7 @@ call $~lib/runtime/doWrapArray call $~lib/array/Array#join_int i32.const 5976 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -14274,7 +14264,7 @@ call $~lib/runtime/doWrapArray call $~lib/array/Array#join_int i32.const 6112 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -14287,7 +14277,7 @@ global.get $std/array/randomStringsExpected call $~lib/array/Array#toString i32.const 6208 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -14303,7 +14293,7 @@ call $~lib/runtime/doWrapArray call $~lib/array/Array#toString i32.const 6328 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -14334,7 +14324,7 @@ global.get $std/array/subarr32 call $~lib/array/Array>#join_arr i32.const 6384 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -14376,7 +14366,7 @@ global.get $std/array/subarr8 call $~lib/array/Array>#join_arr i32.const 6384 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -14428,7 +14418,7 @@ global.get $std/array/subarrU32 call $~lib/array/Array>>#join_arr i32.const 5576 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 4ebd535244..c3d976768b 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -2828,7 +2828,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureLength (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2855,7 +2855,7 @@ i32.const 0 i32.const 488 i32.const 12 - i32.const 59 + i32.const 64 call $~lib/env/abort unreachable end @@ -2899,7 +2899,7 @@ local.get $0 local.get $2 i32.const 2 - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $0 local.get $2 i32.store offset=12 @@ -3276,7 +3276,7 @@ local.get $0 local.get $2 i32.const 2 - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $0 i32.load offset=4 local.set $3 @@ -8631,7 +8631,7 @@ local.get $1 call $std/array/assertSorted ) - (func $~lib/string/String.eq (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -8675,10 +8675,10 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.ne (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz ) (func $std/array/isArraysEqual (; 171 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -8746,7 +8746,7 @@ i32.lt_u select i32.load - call $~lib/string/String.ne + call $~lib/string/String.__ne if i32.const 0 return @@ -8839,18 +8839,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 3400 - i32.const 65 - i32.const 4 - call $~lib/env/abort - unreachable - end local.get $1 i32.const 0 i32.eq @@ -8904,14 +8892,13 @@ call $~lib/runtime/doRegister end ) - (func $~lib/string/String.concat (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.eqz - if - i32.const 3440 - local.set $0 - end + i32.const 3440 local.get $0 + i32.const 0 + i32.ne + select local.get $1 call $~lib/string/String#concat ) @@ -8944,7 +8931,7 @@ end i32.trunc_f64_s call $~lib/string/String#charAt - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $1 local.get $2 i32.const 1 @@ -9023,7 +9010,7 @@ if i32.const 0 i32.const 3400 - i32.const 190 + i32.const 186 i32.const 4 call $~lib/env/abort unreachable @@ -11951,7 +11938,7 @@ i32.const 1 i32.add i32.const 2 - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $0 i32.load offset=4 local.get $1 @@ -13463,7 +13450,7 @@ i32.const 1 i32.add i32.const 2 - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $0 i32.load offset=4 local.get $1 @@ -13550,14 +13537,14 @@ local.get $6 local.get $1 call $~lib/array/Array#join - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $3 end local.get $4 if local.get $3 local.get $1 - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $3 end end @@ -13583,7 +13570,7 @@ local.get $6 local.get $1 call $~lib/array/Array#join - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $3 end local.get $3 @@ -13630,7 +13617,7 @@ i32.const 1 i32.add i32.const 2 - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $0 i32.load offset=4 local.get $1 @@ -13921,14 +13908,14 @@ local.get $6 local.get $1 call $~lib/array/Array#join - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $3 end local.get $4 if local.get $3 local.get $1 - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $3 end end @@ -13954,7 +13941,7 @@ local.get $6 local.get $1 call $~lib/array/Array#join - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $3 end local.get $3 @@ -14001,7 +13988,7 @@ i32.const 1 i32.add i32.const 2 - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $0 i32.load offset=4 local.get $1 @@ -14053,7 +14040,7 @@ i32.const 1 i32.add i32.const 2 - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $0 i32.load offset=4 local.get $1 @@ -14140,14 +14127,14 @@ local.get $6 local.get $1 call $~lib/array/Array#join - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $3 end local.get $4 if local.get $3 local.get $1 - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $3 end end @@ -14173,7 +14160,7 @@ local.get $6 local.get $1 call $~lib/array/Array#join - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $3 end local.get $3 @@ -14250,14 +14237,14 @@ local.get $6 local.get $1 call $~lib/array/Array>#join - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $3 end local.get $4 if local.get $3 local.get $1 - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $3 end end @@ -14283,7 +14270,7 @@ local.get $6 local.get $1 call $~lib/array/Array>#join - call $~lib/string/String.concat + call $~lib/string/String.__concat local.set $3 end local.get $3 @@ -19144,7 +19131,7 @@ i32.const 3512 call $~lib/array/Array#join i32.const 3544 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -19165,7 +19152,7 @@ i32.const 3264 call $~lib/array/Array#join i32.const 4072 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -19186,7 +19173,7 @@ i32.const 4120 call $~lib/array/Array#join i32.const 4072 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -19207,7 +19194,7 @@ i32.const 4176 call $~lib/array/Array#join i32.const 4208 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -19228,7 +19215,7 @@ i32.const 4320 call $~lib/array/Array#join i32.const 5488 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -19249,7 +19236,7 @@ i32.const 3264 call $~lib/array/Array#join i32.const 5576 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -19285,7 +19272,7 @@ i32.const 3512 call $~lib/array/Array#join i32.const 5680 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -19298,7 +19285,7 @@ global.get $std/array/reversed0 call $~lib/array/Array#toString i32.const 3264 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -19311,7 +19298,7 @@ global.get $std/array/reversed1 call $~lib/array/Array#toString i32.const 5576 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -19324,7 +19311,7 @@ global.get $std/array/reversed2 call $~lib/array/Array#toString i32.const 5752 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -19337,7 +19324,7 @@ global.get $std/array/reversed4 call $~lib/array/Array#toString i32.const 5768 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -19357,7 +19344,7 @@ end call $~lib/array/Array#toString i32.const 5824 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -19377,7 +19364,7 @@ end call $~lib/array/Array#toString i32.const 5880 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -19397,7 +19384,7 @@ end call $~lib/array/Array#toString i32.const 5976 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -19417,7 +19404,7 @@ end call $~lib/array/Array#toString i32.const 6112 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -19430,7 +19417,7 @@ global.get $std/array/randomStringsExpected call $~lib/array/Array#toString i32.const 6208 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -19450,7 +19437,7 @@ end call $~lib/array/Array#toString i32.const 6328 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -19493,7 +19480,7 @@ global.get $std/array/subarr32 call $~lib/array/Array>#toString i32.const 6384 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -19536,7 +19523,7 @@ global.get $std/array/subarr8 call $~lib/array/Array>#toString i32.const 6384 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -19578,7 +19565,7 @@ global.get $std/array/subarrU32 call $~lib/array/Array>>#toString i32.const 5576 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index 93a5f397a9..c19c6db4af 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -1596,7 +1596,7 @@ if i32.const 0 i32.const 96 - i32.const 447 + i32.const 443 i32.const 8 call $~lib/env/abort unreachable @@ -1643,7 +1643,7 @@ if i32.const 0 i32.const 96 - i32.const 451 + i32.const 447 i32.const 8 call $~lib/env/abort unreachable @@ -1716,7 +1716,7 @@ if i32.const 0 i32.const 96 - i32.const 463 + i32.const 459 i32.const 8 call $~lib/env/abort unreachable @@ -1769,7 +1769,7 @@ if i32.const 0 i32.const 96 - i32.const 472 + i32.const 468 i32.const 4 call $~lib/env/abort unreachable @@ -1822,7 +1822,7 @@ end local.get $3 ) - (func $~lib/string/String.eq (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2024,7 +2024,7 @@ i32.const 0 call $~lib/string/String.fromUTF8 i32.const 88 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2040,7 +2040,7 @@ i32.sub call $~lib/string/String.fromUTF8 global.get $std/string-utf8/str - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2054,7 +2054,7 @@ i32.const 4 call $~lib/string/String.fromUTF8 i32.const 176 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2070,7 +2070,7 @@ i32.const 2 call $~lib/string/String.fromUTF8 i32.const 192 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2086,7 +2086,7 @@ i32.const 4 call $~lib/string/String.fromUTF8 i32.const 208 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2102,7 +2102,7 @@ i32.const 1 call $~lib/string/String.fromUTF8 i32.const 224 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index 7e6a864d1a..eda61e0eb9 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -2034,7 +2034,7 @@ if i32.const 0 i32.const 96 - i32.const 447 + i32.const 443 i32.const 8 call $~lib/env/abort unreachable @@ -2088,7 +2088,7 @@ if i32.const 0 i32.const 96 - i32.const 451 + i32.const 447 i32.const 8 call $~lib/env/abort unreachable @@ -2183,7 +2183,7 @@ if i32.const 0 i32.const 96 - i32.const 463 + i32.const 459 i32.const 8 call $~lib/env/abort unreachable @@ -2246,7 +2246,7 @@ if i32.const 0 i32.const 96 - i32.const 472 + i32.const 468 i32.const 4 call $~lib/env/abort unreachable @@ -2325,7 +2325,7 @@ end local.get $5 ) - (func $~lib/string/String.eq (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2545,7 +2545,7 @@ i32.const 0 call $~lib/string/String.fromUTF8 i32.const 88 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2561,7 +2561,7 @@ i32.sub call $~lib/string/String.fromUTF8 global.get $std/string-utf8/str - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2575,7 +2575,7 @@ i32.const 4 call $~lib/string/String.fromUTF8 i32.const 176 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2591,7 +2591,7 @@ i32.const 2 call $~lib/string/String.fromUTF8 i32.const 192 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2607,7 +2607,7 @@ i32.const 4 call $~lib/string/String.fromUTF8 i32.const 208 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2623,7 +2623,7 @@ i32.const 1 call $~lib/string/String.fromUTF8 i32.const 224 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index cdcc11fa50..306b866fc3 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -6,7 +6,6 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$di (func (param i32) (result f64))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (type $FUNCSIG$id (func (param f64) (result i32))) @@ -15,14 +14,15 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00 \00\00\00h\00i\00,\00 \00I\00\'\00m\00 \00a\00 \00s\00t\00r\00i\00n\00g") (data (i32.const 48) "\01\00\00\00\1a\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 88) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 128) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 168) "\01\00\00\00\02") - (data (i32.const 184) "\01\00\00\00\02\00\00\006") + (data (i32.const 88) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 128) "\01\00\00\00\02") + (data (i32.const 144) "\01\00\00\00\02\00\00\006") + (data (i32.const 160) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") (data (i32.const 200) "\01\00\00\00\04\00\00\004\d8\06\df") (data (i32.const 216) "\01\00\00\00\04\00\00\00h\00i") (data (i32.const 232) "\01\00\00\00\08\00\00\00n\00u\00l\00l") @@ -193,33 +193,7 @@ (export "table" (table $0)) (export "getString" (func $std/string/getString)) (start $start) - (func $~lib/string/String#charCodeAt (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 44 - i32.const 4 - call $~lib/env/abort - unreachable - end - i32.const 0 - local.get $0 - i32.const 8 - i32.sub - i32.load offset=4 - i32.const 1 - i32.shr_u - i32.ge_u - if - i32.const -1 - return - end - local.get $0 - i32.load16_u - ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -281,7 +255,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -302,13 +276,13 @@ i32.const 8 i32.add ) - (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 5544 i32.le_u if i32.const 0 - i32.const 136 + i32.const 96 i32.const 191 i32.const 2 call $~lib/env/abort @@ -322,14 +296,14 @@ i32.ne if i32.const 0 - i32.const 136 + i32.const 96 i32.const 192 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doRegister (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -339,7 +313,7 @@ i32.store local.get $0 ) - (func $~lib/string/String.fromCharCode (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.fromCharCode (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 2 call $~lib/runtime/doAllocate @@ -350,7 +324,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/string/compareImpl (; 7 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/string/compareImpl (; 6 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) local.get $1 i32.const 1 @@ -389,7 +363,7 @@ end local.get $4 ) - (func $~lib/string/String.eq (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -436,7 +410,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.fromCodePoint (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -444,7 +418,7 @@ i32.gt_u if i32.const 0 - i32.const 96 + i32.const 168 i32.const 21 i32.const 4 call $~lib/env/abort @@ -491,7 +465,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/string/String#startsWith (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#startsWith (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -499,8 +473,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 165 + i32.const 168 + i32.const 161 i32.const 4 call $~lib/env/abort unreachable @@ -539,7 +513,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String#endsWith (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#endsWith (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -547,8 +521,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 78 + i32.const 168 + i32.const 74 i32.const 4 call $~lib/env/abort unreachable @@ -587,15 +561,15 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String#indexOf (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#indexOf (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 i32.eqz if i32.const 0 - i32.const 96 - i32.const 134 + i32.const 168 + i32.const 130 i32.const 4 call $~lib/env/abort unreachable @@ -670,7 +644,7 @@ end i32.const -1 ) - (func $~lib/util/memory/memcpy (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1567,7 +1541,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1761,7 +1735,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 15 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 14 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $2 local.get $3 @@ -1786,7 +1760,7 @@ end end ) - (func $~lib/string/String#padStart (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padStart (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1795,8 +1769,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 282 + i32.const 168 + i32.const 278 i32.const 4 call $~lib/env/abort unreachable @@ -1883,7 +1857,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/string/String#padEnd (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1891,8 +1865,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 303 + i32.const 168 + i32.const 299 i32.const 4 call $~lib/env/abort unreachable @@ -1981,15 +1955,15 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/string/String#lastIndexOf (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 i32.eqz if i32.const 0 - i32.const 96 - i32.const 150 + i32.const 168 + i32.const 146 i32.const 4 call $~lib/env/abort unreachable @@ -2064,7 +2038,7 @@ end i32.const -1 ) - (func $~lib/util/string/parse (; 19 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/util/string/parse (; 18 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2301,7 +2275,7 @@ local.get $5 f64.mul ) - (func $~lib/string/parseFloat (; 20 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 19 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2412,8 +2386,8 @@ end if i32.const 0 - i32.const 96 - i32.const 569 + i32.const 168 + i32.const 565 i32.const 10 call $~lib/env/abort unreachable @@ -2472,20 +2446,10 @@ local.get $4 f64.mul ) - (func $~lib/string/String#concat (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 65 - i32.const 4 - call $~lib/env/abort - unreachable - end local.get $1 i32.const 240 local.get $1 @@ -2531,7 +2495,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/string/String.concat (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 240 local.get $0 @@ -2539,13 +2503,13 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.ne (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz ) - (func $~lib/string/String.gt (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block (result i32) @@ -2610,7 +2574,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.lt (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block (result i32) @@ -2675,27 +2639,27 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String.gte (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gte (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 - call $~lib/string/String.lt + call $~lib/string/String.__lt i32.eqz ) - (func $~lib/string/String.lte (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.__lte (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 312 local.get $0 - call $~lib/string/String.gt + call $~lib/string/String.__gt i32.eqz ) - (func $~lib/string/String#repeat (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 i32.eqz if i32.const 0 - i32.const 96 - i32.const 324 + i32.const 168 + i32.const 320 i32.const 4 call $~lib/env/abort unreachable @@ -2724,8 +2688,8 @@ end if i32.const 0 - i32.const 96 - i32.const 329 + i32.const 168 + i32.const 325 i32.const 6 call $~lib/env/abort unreachable @@ -2767,7 +2731,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/string/String#slice (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2847,7 +2811,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/memory/memory.fill (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -3058,7 +3022,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741816 @@ -3080,14 +3044,14 @@ i32.const 2 call $~lib/runtime/doRegister ) - (func $~lib/runtime/ArrayBufferView#constructor (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 268435454 i32.gt_u if i32.const 0 - i32.const 136 + i32.const 96 i32.const 226 i32.const 57 call $~lib/env/abort @@ -3128,7 +3092,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 16 call $~lib/runtime/doAllocate @@ -3144,7 +3108,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/runtime/doReallocate (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doReallocate (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3212,7 +3176,7 @@ i32.le_u if i32.const 0 - i32.const 136 + i32.const 96 i32.const 100 i32.const 8 call $~lib/env/abort @@ -3238,7 +3202,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureLength (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureCapacity (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3259,7 +3223,7 @@ i32.const 0 i32.const 1440 i32.const 12 - i32.const 59 + i32.const 64 call $~lib/env/abort unreachable end @@ -3285,10 +3249,10 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__set (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 i32.const 1 - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $0 i32.load offset=4 local.get $1 @@ -3303,29 +3267,7 @@ i32.store offset=12 end ) - (func $~lib/runtime/assertRegistered (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.const 8 - i32.sub - i32.load - i32.const -1520547049 - i32.eq - if - i32.const 0 - i32.const 136 - i32.const 199 - i32.const 2 - call $~lib/env/abort - unreachable - end - ) - (func $~lib/runtime/doLink (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - call $~lib/runtime/assertRegistered - local.get $1 - call $~lib/runtime/assertRegistered - ) - (func $~lib/array/Array#push (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $0 @@ -3333,7 +3275,7 @@ i32.const 1 i32.add local.tee $2 - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $0 local.get $2 i32.store offset=12 @@ -3348,7 +3290,23 @@ local.get $1 i32.store ) - (func $~lib/string/String#split (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/assertRegistered (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 8 + i32.sub + i32.load + i32.const -1520547049 + i32.eq + if + i32.const 0 + i32.const 96 + i32.const 199 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/string/String#split (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3361,8 +3319,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 351 + i32.const 168 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable @@ -3379,10 +3337,10 @@ if i32.const 1 call $~lib/array/Array#constructor - local.tee $3 + local.tee $7 local.get $0 call $~lib/array/Array#__set - local.get $3 + local.get $7 return end local.get $0 @@ -3391,7 +3349,7 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $6 + local.set $5 i32.const 2147483647 local.get $2 local.get $2 @@ -3409,41 +3367,40 @@ local.set $9 local.get $3 if - local.get $6 + local.get $5 i32.eqz if i32.const 1 call $~lib/array/Array#constructor - local.tee $5 + local.tee $3 i32.load offset=4 i32.const 312 i32.store - local.get $5 + local.get $3 return end else - local.get $6 + local.get $5 i32.eqz if i32.const 0 call $~lib/array/Array#constructor return end - local.get $6 - local.tee $3 + local.get $5 local.get $2 - local.get $3 + local.get $5 local.get $2 i32.lt_s select - local.tee $6 + local.tee $5 call $~lib/array/Array#constructor - local.tee $3 + local.tee $7 i32.load offset=4 - local.set $5 + local.set $3 loop $repeat|0 local.get $4 - local.get $6 + local.get $5 i32.lt_s if i32.const 2 @@ -3459,15 +3416,12 @@ local.get $4 i32.const 2 i32.shl - local.get $5 + local.get $3 i32.add local.get $1 - i32.store - local.get $1 i32.const 1 call $~lib/runtime/doRegister - local.get $3 - call $~lib/runtime/doLink + i32.store local.get $4 i32.const 1 i32.add @@ -3475,12 +3429,12 @@ br $repeat|0 end end - local.get $3 + local.get $7 return end i32.const 0 call $~lib/array/Array#constructor - local.set $7 + local.set $6 loop $continue|1 local.get $0 local.get $1 @@ -3493,30 +3447,30 @@ local.get $8 local.get $4 i32.sub - local.tee $5 + local.tee $3 i32.const 0 i32.gt_s if - local.get $5 + local.get $3 i32.const 1 i32.shl - local.tee $5 - call $~lib/runtime/doAllocate local.tee $3 + call $~lib/runtime/doAllocate + local.tee $7 local.get $4 i32.const 1 i32.shl local.get $0 i32.add - local.get $5 + local.get $3 call $~lib/memory/memory.copy + local.get $6 local.get $7 - local.get $3 i32.const 1 call $~lib/runtime/doRegister call $~lib/array/Array#push else - local.get $7 + local.get $6 i32.const 312 call $~lib/array/Array#push end @@ -3527,7 +3481,7 @@ local.get $2 i32.eq if - local.get $7 + local.get $6 return end local.get $8 @@ -3546,16 +3500,16 @@ i32.load offset=4 local.set $1 local.get $0 - local.tee $4 + call $~lib/runtime/assertRegistered local.get $3 - call $~lib/runtime/doLink + call $~lib/runtime/assertRegistered local.get $1 - local.get $4 + local.get $0 i32.store local.get $3 return end - local.get $6 + local.get $5 local.get $4 i32.sub local.tee $1 @@ -3567,7 +3521,7 @@ i32.shl local.tee $1 call $~lib/runtime/doAllocate - local.tee $5 + local.tee $3 local.get $4 i32.const 1 i32.shl @@ -3575,19 +3529,19 @@ i32.add local.get $1 call $~lib/memory/memory.copy - local.get $7 - local.get $5 + local.get $6 + local.get $3 i32.const 1 call $~lib/runtime/doRegister call $~lib/array/Array#push else - local.get $7 + local.get $6 i32.const 312 call $~lib/array/Array#push end - local.get $7 + local.get $6 ) - (func $~lib/util/number/decimalCount32 (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -3641,7 +3595,7 @@ end end ) - (func $~lib/util/number/utoa32_lut (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) i32.const 2060 @@ -3751,7 +3705,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3793,7 +3747,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/utoa32 (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3816,7 +3770,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/decimalCount64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 43 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -3870,7 +3824,7 @@ end end ) - (func $~lib/util/number/utoa64_lut (; 46 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 44 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3967,7 +3921,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 47 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4009,7 +3963,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa64 (; 48 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 46 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4074,7 +4028,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/genDigits (; 49 ;) (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 (; 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) (local $7 i32) (local $8 i32) (local $9 i64) @@ -4492,7 +4446,7 @@ local.get $7 end ) - (func $~lib/util/number/prettify (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4753,7 +4707,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 51 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 49 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i64) (local $4 i64) @@ -5065,7 +5019,7 @@ local.get $12 i32.add ) - (func $~lib/string/String#substring (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5073,8 +5027,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 190 + i32.const 168 + i32.const 186 i32.const 4 call $~lib/env/abort unreachable @@ -5163,7 +5117,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/dtoa (; 53 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 51 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5208,7 +5162,7 @@ call $~lib/runtime/assertUnregistered local.get $1 ) - (func $start:std/string (; 54 ;) (type $FUNCSIG$v) + (func $start:std/string (; 52 ;) (type $FUNCSIG$v) (local $0 i32) global.get $std/string/str i32.const 16 @@ -5237,8 +5191,22 @@ call $~lib/env/abort unreachable end - global.get $std/string/str - call $~lib/string/String#charCodeAt + block $__inlined_func$~lib/string/String#charCodeAt (result i32) + i32.const -1 + i32.const 0 + global.get $std/string/str + local.tee $0 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.ge_u + br_if $__inlined_func$~lib/string/String#charCodeAt + drop + local.get $0 + i32.load16_u + end i32.const 104 i32.ne if @@ -5255,8 +5223,8 @@ global.set $~lib/allocator/arena/offset i32.const 0 call $~lib/string/String.fromCharCode - i32.const 176 - call $~lib/string/String.eq + i32.const 136 + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5268,8 +5236,8 @@ end i32.const 54 call $~lib/string/String.fromCharCode - i32.const 192 - call $~lib/string/String.eq + i32.const 152 + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5281,8 +5249,8 @@ end i32.const 65590 call $~lib/string/String.fromCharCode - i32.const 192 - call $~lib/string/String.eq + i32.const 152 + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5294,8 +5262,8 @@ end i32.const 0 call $~lib/string/String.fromCodePoint - i32.const 176 - call $~lib/string/String.eq + i32.const 136 + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5307,8 +5275,8 @@ end i32.const 54 call $~lib/string/String.fromCodePoint - i32.const 192 - call $~lib/string/String.eq + i32.const 152 + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5370,7 +5338,7 @@ i32.const 296 call $~lib/string/String#padStart global.get $std/string/str - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5385,7 +5353,7 @@ i32.const 296 call $~lib/string/String#padStart global.get $std/string/str - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5400,7 +5368,7 @@ i32.const 296 call $~lib/string/String#padStart i32.const 320 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5415,7 +5383,7 @@ i32.const 312 call $~lib/string/String#padStart i32.const 312 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5430,7 +5398,7 @@ i32.const 312 call $~lib/string/String#padStart i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5445,7 +5413,7 @@ i32.const 296 call $~lib/string/String#padStart i32.const 368 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5460,7 +5428,7 @@ i32.const 392 call $~lib/string/String#padStart i32.const 408 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5475,7 +5443,7 @@ i32.const 392 call $~lib/string/String#padStart i32.const 432 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5490,7 +5458,7 @@ i32.const 296 call $~lib/string/String#padEnd global.get $std/string/str - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5505,7 +5473,7 @@ i32.const 296 call $~lib/string/String#padEnd global.get $std/string/str - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5520,7 +5488,7 @@ i32.const 296 call $~lib/string/String#padEnd i32.const 320 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5535,7 +5503,7 @@ i32.const 312 call $~lib/string/String#padEnd i32.const 312 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5550,7 +5518,7 @@ i32.const 312 call $~lib/string/String#padEnd i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5565,7 +5533,7 @@ i32.const 296 call $~lib/string/String#padEnd i32.const 456 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5580,7 +5548,7 @@ i32.const 352 call $~lib/string/String#padEnd i32.const 480 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -5595,7 +5563,7 @@ i32.const 352 call $~lib/string/String#padEnd i32.const 504 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6051,11 +6019,11 @@ end i32.const 336 i32.const 824 - call $~lib/string/String.concat + call $~lib/string/String.__concat global.set $std/string/c global.get $std/string/c i32.const 840 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6067,7 +6035,7 @@ end global.get $std/string/c i32.const 336 - call $~lib/string/String.ne + call $~lib/string/String.__ne i32.eqz if i32.const 0 @@ -6079,7 +6047,7 @@ end i32.const 312 i32.const 312 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6091,7 +6059,7 @@ end i32.const 312 global.get $std/string/nullStr - call $~lib/string/String.ne + call $~lib/string/String.__ne i32.eqz if i32.const 0 @@ -6103,7 +6071,7 @@ end global.get $std/string/nullStr i32.const 312 - call $~lib/string/String.ne + call $~lib/string/String.__ne i32.eqz if i32.const 0 @@ -6115,7 +6083,7 @@ end i32.const 336 i32.const 824 - call $~lib/string/String.ne + call $~lib/string/String.__ne i32.eqz if i32.const 0 @@ -6127,7 +6095,7 @@ end i32.const 336 i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6139,7 +6107,7 @@ end i32.const 856 i32.const 872 - call $~lib/string/String.ne + call $~lib/string/String.__ne i32.eqz if i32.const 0 @@ -6151,7 +6119,7 @@ end i32.const 856 i32.const 856 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6163,7 +6131,7 @@ end i32.const 888 i32.const 904 - call $~lib/string/String.ne + call $~lib/string/String.__ne i32.eqz if i32.const 0 @@ -6175,7 +6143,7 @@ end i32.const 920 i32.const 944 - call $~lib/string/String.ne + call $~lib/string/String.__ne i32.eqz if i32.const 0 @@ -6187,7 +6155,7 @@ end i32.const 968 i32.const 968 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6199,7 +6167,7 @@ end i32.const 968 i32.const 992 - call $~lib/string/String.ne + call $~lib/string/String.__ne i32.eqz if i32.const 0 @@ -6211,7 +6179,7 @@ end i32.const 1016 i32.const 1048 - call $~lib/string/String.ne + call $~lib/string/String.__ne i32.eqz if i32.const 0 @@ -6223,7 +6191,7 @@ end i32.const 824 i32.const 336 - call $~lib/string/String.gt + call $~lib/string/String.__gt i32.eqz if i32.const 0 @@ -6235,7 +6203,7 @@ end i32.const 1080 i32.const 336 - call $~lib/string/String.gt + call $~lib/string/String.__gt i32.eqz if i32.const 0 @@ -6247,7 +6215,7 @@ end i32.const 1080 i32.const 1096 - call $~lib/string/String.gte + call $~lib/string/String.__gte i32.eqz if i32.const 0 @@ -6259,7 +6227,7 @@ end i32.const 1080 i32.const 840 - call $~lib/string/String.gt + call $~lib/string/String.__gt i32.eqz if i32.const 0 @@ -6271,7 +6239,7 @@ end i32.const 1080 i32.const 840 - call $~lib/string/String.lt + call $~lib/string/String.__lt if i32.const 0 i32.const 56 @@ -6282,7 +6250,7 @@ end i32.const 824 global.get $std/string/nullStr - call $~lib/string/String.lt + call $~lib/string/String.__lt if i32.const 0 i32.const 56 @@ -6293,7 +6261,7 @@ end global.get $std/string/nullStr i32.const 824 - call $~lib/string/String.lt + call $~lib/string/String.__lt if i32.const 0 i32.const 56 @@ -6304,7 +6272,7 @@ end i32.const 352 i32.const 312 - call $~lib/string/String.gt + call $~lib/string/String.__gt i32.eqz if i32.const 0 @@ -6316,7 +6284,7 @@ end i32.const 312 i32.const 352 - call $~lib/string/String.lt + call $~lib/string/String.__lt i32.eqz if i32.const 0 @@ -6328,7 +6296,7 @@ end i32.const 352 i32.const 312 - call $~lib/string/String.gte + call $~lib/string/String.__gte i32.eqz if i32.const 0 @@ -6339,7 +6307,7 @@ unreachable end i32.const 352 - call $~lib/string/String.lte + call $~lib/string/String.__lte i32.eqz if i32.const 0 @@ -6351,7 +6319,7 @@ end i32.const 352 i32.const 312 - call $~lib/string/String.lt + call $~lib/string/String.__lt if i32.const 0 i32.const 56 @@ -6362,7 +6330,7 @@ end i32.const 312 i32.const 352 - call $~lib/string/String.gt + call $~lib/string/String.__gt if i32.const 0 i32.const 56 @@ -6373,7 +6341,7 @@ end i32.const 312 i32.const 312 - call $~lib/string/String.lt + call $~lib/string/String.__lt if i32.const 0 i32.const 56 @@ -6384,7 +6352,7 @@ end i32.const 312 i32.const 312 - call $~lib/string/String.gt + call $~lib/string/String.__gt if i32.const 0 i32.const 56 @@ -6395,7 +6363,7 @@ end i32.const 312 i32.const 312 - call $~lib/string/String.gte + call $~lib/string/String.__gte i32.eqz if i32.const 0 @@ -6406,7 +6374,7 @@ unreachable end i32.const 312 - call $~lib/string/String.lte + call $~lib/string/String.__lte i32.eqz if i32.const 0 @@ -6423,11 +6391,11 @@ call $~lib/string/String.fromCodePoint i32.const 56322 call $~lib/string/String.fromCodePoint - call $~lib/string/String.concat + call $~lib/string/String.__concat global.set $std/string/b global.get $std/string/a global.get $std/string/b - call $~lib/string/String.gt + call $~lib/string/String.__gt i32.eqz if i32.const 0 @@ -6455,7 +6423,7 @@ i32.const 100 call $~lib/string/String#repeat i32.const 312 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6469,7 +6437,7 @@ i32.const 0 call $~lib/string/String#repeat i32.const 312 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6483,7 +6451,7 @@ i32.const 1 call $~lib/string/String#repeat i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6497,7 +6465,7 @@ i32.const 2 call $~lib/string/String#repeat i32.const 1096 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6511,7 +6479,7 @@ i32.const 3 call $~lib/string/String#repeat i32.const 1112 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6525,7 +6493,7 @@ i32.const 4 call $~lib/string/String#repeat i32.const 1128 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6539,7 +6507,7 @@ i32.const 5 call $~lib/string/String#repeat i32.const 1152 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6553,7 +6521,7 @@ i32.const 6 call $~lib/string/String#repeat i32.const 1176 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6567,7 +6535,7 @@ i32.const 7 call $~lib/string/String#repeat i32.const 1200 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6584,7 +6552,7 @@ i32.const 2147483647 call $~lib/string/String#slice i32.const 1224 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6599,7 +6567,7 @@ i32.const 2147483647 call $~lib/string/String#slice i32.const 1264 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6614,7 +6582,7 @@ i32.const 2147483647 call $~lib/string/String#slice i32.const 1280 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6629,7 +6597,7 @@ i32.const 7 call $~lib/string/String#slice i32.const 1304 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6644,7 +6612,7 @@ i32.const -6 call $~lib/string/String#slice i32.const 1328 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6659,7 +6627,7 @@ i32.const 3 call $~lib/string/String#slice i32.const 312 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6674,7 +6642,7 @@ i32.const -1 call $~lib/string/String#slice i32.const 1352 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6694,7 +6662,7 @@ i32.const 1 i32.eq local.tee $0 - if (result i32) + if global.get $std/string/sa local.tee $0 i32.load offset=4 @@ -6706,10 +6674,10 @@ select i32.load i32.const 312 - call $~lib/string/String.eq - else - local.get $0 + call $~lib/string/String.__eq + local.set $0 end + local.get $0 i32.eqz if i32.const 0 @@ -6744,7 +6712,7 @@ i32.const 1 i32.eq local.tee $0 - if (result i32) + if global.get $std/string/sa local.tee $0 i32.load offset=4 @@ -6756,10 +6724,10 @@ select i32.load i32.const 312 - call $~lib/string/String.eq - else - local.get $0 + call $~lib/string/String.__eq + local.set $0 end + local.get $0 i32.eqz if i32.const 0 @@ -6779,7 +6747,7 @@ i32.const 1 i32.eq local.tee $0 - if (result i32) + if global.get $std/string/sa local.tee $0 i32.load offset=4 @@ -6791,10 +6759,10 @@ select i32.load i32.const 1480 - call $~lib/string/String.eq - else - local.get $0 + call $~lib/string/String.__eq + local.set $0 end + local.get $0 i32.eqz if i32.const 0 @@ -6828,7 +6796,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 @@ -6847,12 +6815,12 @@ select i32.load i32.const 824 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 end - if (result i32) + if global.get $std/string/sa local.tee $0 i32.load offset=4 @@ -6866,10 +6834,10 @@ select i32.load i32.const 1520 - call $~lib/string/String.eq - else - local.get $0 + call $~lib/string/String.__eq + local.set $0 end + local.get $0 i32.eqz if i32.const 0 @@ -6903,7 +6871,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 @@ -6922,12 +6890,12 @@ select i32.load i32.const 824 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 end - if (result i32) + if global.get $std/string/sa local.tee $0 i32.load offset=4 @@ -6941,10 +6909,10 @@ select i32.load i32.const 1520 - call $~lib/string/String.eq - else - local.get $0 + call $~lib/string/String.__eq + local.set $0 end + local.get $0 i32.eqz if i32.const 0 @@ -6979,7 +6947,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 @@ -6998,7 +6966,7 @@ select i32.load i32.const 824 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 @@ -7017,12 +6985,12 @@ select i32.load i32.const 312 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 end - if (result i32) + if global.get $std/string/sa local.tee $0 i32.load offset=4 @@ -7036,10 +7004,10 @@ select i32.load i32.const 1520 - call $~lib/string/String.eq - else - local.get $0 + call $~lib/string/String.__eq + local.set $0 end + local.get $0 i32.eqz if i32.const 0 @@ -7074,7 +7042,7 @@ select i32.load i32.const 312 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 @@ -7093,7 +7061,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 @@ -7112,12 +7080,12 @@ select i32.load i32.const 824 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 end - if (result i32) + if global.get $std/string/sa local.tee $0 i32.load offset=4 @@ -7131,10 +7099,10 @@ select i32.load i32.const 1520 - call $~lib/string/String.eq - else - local.get $0 + call $~lib/string/String.__eq + local.set $0 end + local.get $0 i32.eqz if i32.const 0 @@ -7169,7 +7137,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 @@ -7188,7 +7156,7 @@ select i32.load i32.const 824 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 @@ -7207,12 +7175,12 @@ select i32.load i32.const 1520 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 end - if (result i32) + if global.get $std/string/sa local.tee $0 i32.load offset=4 @@ -7226,10 +7194,10 @@ select i32.load i32.const 312 - call $~lib/string/String.eq - else - local.get $0 + call $~lib/string/String.__eq + local.set $0 end + local.get $0 i32.eqz if i32.const 0 @@ -7263,7 +7231,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 @@ -7282,12 +7250,12 @@ select i32.load i32.const 824 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 end - if (result i32) + if global.get $std/string/sa local.tee $0 i32.load offset=4 @@ -7301,10 +7269,10 @@ select i32.load i32.const 1520 - call $~lib/string/String.eq - else - local.get $0 + call $~lib/string/String.__eq + local.set $0 end + local.get $0 i32.eqz if i32.const 0 @@ -7339,7 +7307,7 @@ i32.const 1 i32.eq local.tee $0 - if (result i32) + if global.get $std/string/sa local.tee $0 i32.load offset=4 @@ -7351,10 +7319,10 @@ select i32.load i32.const 336 - call $~lib/string/String.eq - else - local.get $0 + call $~lib/string/String.__eq + local.set $0 end + local.get $0 i32.eqz if i32.const 0 @@ -7374,7 +7342,7 @@ i32.const 1 i32.eq local.tee $0 - if (result i32) + if global.get $std/string/sa local.tee $0 i32.load offset=4 @@ -7386,10 +7354,10 @@ select i32.load i32.const 336 - call $~lib/string/String.eq - else - local.get $0 + call $~lib/string/String.__eq + local.set $0 end + local.get $0 i32.eqz if i32.const 0 @@ -7423,7 +7391,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 @@ -7442,12 +7410,12 @@ select i32.load i32.const 824 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 end - if (result i32) + if global.get $std/string/sa local.tee $0 i32.load offset=4 @@ -7461,10 +7429,10 @@ select i32.load i32.const 1520 - call $~lib/string/String.eq - else - local.get $0 + call $~lib/string/String.__eq + local.set $0 end + local.get $0 i32.eqz if i32.const 0 @@ -7498,7 +7466,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 @@ -7517,12 +7485,12 @@ select i32.load i32.const 824 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 end - if (result i32) + if global.get $std/string/sa local.tee $0 i32.load offset=4 @@ -7536,10 +7504,10 @@ select i32.load i32.const 1520 - call $~lib/string/String.eq - else - local.get $0 + call $~lib/string/String.__eq + local.set $0 end + local.get $0 i32.eqz if i32.const 0 @@ -7573,7 +7541,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 @@ -7592,12 +7560,12 @@ select i32.load i32.const 824 - call $~lib/string/String.eq + call $~lib/string/String.__eq local.set $0 end local.get $0 end - if (result i32) + if global.get $std/string/sa local.tee $0 i32.load offset=4 @@ -7611,10 +7579,10 @@ select i32.load i32.const 1520 - call $~lib/string/String.eq - else - local.get $0 + call $~lib/string/String.__eq + local.set $0 end + local.get $0 i32.eqz if i32.const 0 @@ -7627,7 +7595,7 @@ i32.const 0 call $~lib/util/number/itoa32 i32.const 608 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7640,7 +7608,7 @@ i32.const 1 call $~lib/util/number/itoa32 i32.const 624 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7653,7 +7621,7 @@ i32.const 8 call $~lib/util/number/itoa32 i32.const 2080 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7666,7 +7634,7 @@ i32.const 123 call $~lib/util/number/itoa32 i32.const 392 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7679,7 +7647,7 @@ i32.const -1000 call $~lib/util/number/itoa32 i32.const 2096 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7692,7 +7660,7 @@ i32.const 1234 call $~lib/util/number/itoa32 i32.const 2120 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7705,7 +7673,7 @@ i32.const 12345 call $~lib/util/number/itoa32 i32.const 2136 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7718,7 +7686,7 @@ i32.const 123456 call $~lib/util/number/itoa32 i32.const 2160 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7731,7 +7699,7 @@ i32.const 1111111 call $~lib/util/number/itoa32 i32.const 2184 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7744,7 +7712,7 @@ i32.const 1234567 call $~lib/util/number/itoa32 i32.const 2208 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7757,7 +7725,7 @@ i32.const 2147483646 call $~lib/util/number/itoa32 i32.const 2232 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7770,7 +7738,7 @@ i32.const 2147483647 call $~lib/util/number/itoa32 i32.const 2264 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7783,7 +7751,7 @@ i32.const -2147483648 call $~lib/util/number/itoa32 i32.const 2296 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7796,7 +7764,7 @@ i32.const -1 call $~lib/util/number/itoa32 i32.const 2328 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7809,7 +7777,7 @@ i32.const 0 call $~lib/util/number/utoa32 i32.const 608 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7822,7 +7790,7 @@ i32.const 1000 call $~lib/util/number/utoa32 i32.const 2344 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7835,7 +7803,7 @@ i32.const 2147483647 call $~lib/util/number/utoa32 i32.const 2264 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7848,7 +7816,7 @@ i32.const -2147483648 call $~lib/util/number/utoa32 i32.const 2360 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7861,7 +7829,7 @@ i32.const -1 call $~lib/util/number/utoa32 i32.const 2392 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7874,7 +7842,7 @@ i64.const 0 call $~lib/util/number/utoa64 i32.const 608 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7887,7 +7855,7 @@ i64.const 1234 call $~lib/util/number/utoa64 i32.const 2120 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7900,7 +7868,7 @@ i64.const 99999999 call $~lib/util/number/utoa64 i32.const 2424 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7913,7 +7881,7 @@ i64.const 100000000 call $~lib/util/number/utoa64 i32.const 2448 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7926,7 +7894,7 @@ i64.const 4294967295 call $~lib/util/number/utoa64 i32.const 2392 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7939,7 +7907,7 @@ i64.const 68719476735 call $~lib/util/number/utoa64 i32.const 2480 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7952,7 +7920,7 @@ i64.const 868719476735 call $~lib/util/number/utoa64 i32.const 2512 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7965,7 +7933,7 @@ i64.const 999868719476735 call $~lib/util/number/utoa64 i32.const 2544 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7978,7 +7946,7 @@ i64.const 9999868719476735 call $~lib/util/number/utoa64 i32.const 2584 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7991,7 +7959,7 @@ i64.const 19999868719476735 call $~lib/util/number/utoa64 i32.const 2624 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8004,7 +7972,7 @@ i64.const -1 call $~lib/util/number/utoa64 i32.const 2672 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8017,7 +7985,7 @@ i64.const 0 call $~lib/util/number/itoa64 i32.const 608 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8030,7 +7998,7 @@ i64.const -1234 call $~lib/util/number/itoa64 i32.const 2720 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8043,7 +8011,7 @@ i64.const 4294967295 call $~lib/util/number/itoa64 i32.const 2392 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8056,7 +8024,7 @@ i64.const -4294967295 call $~lib/util/number/itoa64 i32.const 2744 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8069,7 +8037,7 @@ i64.const 68719476735 call $~lib/util/number/itoa64 i32.const 2480 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8082,7 +8050,7 @@ i64.const -68719476735 call $~lib/util/number/itoa64 i32.const 2776 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8095,7 +8063,7 @@ i64.const -868719476735 call $~lib/util/number/itoa64 i32.const 2808 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8108,7 +8076,7 @@ i64.const -999868719476735 call $~lib/util/number/itoa64 i32.const 2848 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8121,7 +8089,7 @@ i64.const -19999868719476735 call $~lib/util/number/itoa64 i32.const 2888 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8134,7 +8102,7 @@ i64.const 9223372036854775807 call $~lib/util/number/itoa64 i32.const 2936 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8147,7 +8115,7 @@ i64.const -9223372036854775808 call $~lib/util/number/itoa64 i32.const 2984 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8160,7 +8128,7 @@ f64.const 0 call $~lib/util/number/dtoa i32.const 3032 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8173,7 +8141,7 @@ f64.const -0 call $~lib/util/number/dtoa i32.const 3032 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8186,7 +8154,7 @@ f64.const nan:0x8000000000000 call $~lib/util/number/dtoa i32.const 3048 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8199,7 +8167,7 @@ f64.const inf call $~lib/util/number/dtoa i32.const 3096 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8212,7 +8180,7 @@ f64.const -inf call $~lib/util/number/dtoa i32.const 3064 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8225,7 +8193,7 @@ f64.const 2.220446049250313e-16 call $~lib/util/number/dtoa i32.const 4128 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8238,7 +8206,7 @@ f64.const -2.220446049250313e-16 call $~lib/util/number/dtoa i32.const 4184 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8251,7 +8219,7 @@ f64.const 1797693134862315708145274e284 call $~lib/util/number/dtoa i32.const 4240 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8264,7 +8232,7 @@ f64.const -1797693134862315708145274e284 call $~lib/util/number/dtoa i32.const 4296 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8277,7 +8245,7 @@ f64.const 4185580496821356722454785e274 call $~lib/util/number/dtoa i32.const 4352 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8290,7 +8258,7 @@ f64.const 2.2250738585072014e-308 call $~lib/util/number/dtoa i32.const 4408 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8303,7 +8271,7 @@ f64.const 4.940656e-318 call $~lib/util/number/dtoa i32.const 4464 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8316,7 +8284,7 @@ f64.const 9060801153433600 call $~lib/util/number/dtoa i32.const 4504 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8329,7 +8297,7 @@ f64.const 4708356024711512064 call $~lib/util/number/dtoa i32.const 4552 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8342,7 +8310,7 @@ f64.const 9409340012568248320 call $~lib/util/number/dtoa i32.const 4608 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8355,7 +8323,7 @@ f64.const 5e-324 call $~lib/util/number/dtoa i32.const 4664 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8368,7 +8336,7 @@ f64.const 1 call $~lib/util/number/dtoa i32.const 4688 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8381,7 +8349,7 @@ f64.const 0.1 call $~lib/util/number/dtoa i32.const 768 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8394,7 +8362,7 @@ f64.const -1 call $~lib/util/number/dtoa i32.const 4704 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8407,7 +8375,7 @@ f64.const -0.1 call $~lib/util/number/dtoa i32.const 4720 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8420,7 +8388,7 @@ f64.const 1e6 call $~lib/util/number/dtoa i32.const 4736 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8433,7 +8401,7 @@ f64.const 1e-06 call $~lib/util/number/dtoa i32.const 4768 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8446,7 +8414,7 @@ f64.const -1e6 call $~lib/util/number/dtoa i32.const 4792 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8459,7 +8427,7 @@ f64.const -1e-06 call $~lib/util/number/dtoa i32.const 4824 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8472,7 +8440,7 @@ f64.const 1e7 call $~lib/util/number/dtoa i32.const 4856 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8485,7 +8453,7 @@ f64.const 1e-07 call $~lib/util/number/dtoa i32.const 4888 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8498,7 +8466,7 @@ f64.const 1.e+308 call $~lib/util/number/dtoa i32.const 4904 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8511,7 +8479,7 @@ f64.const -1.e+308 call $~lib/util/number/dtoa i32.const 4928 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8524,7 +8492,7 @@ f64.const inf call $~lib/util/number/dtoa i32.const 3096 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8537,7 +8505,7 @@ f64.const -inf call $~lib/util/number/dtoa i32.const 3064 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8550,7 +8518,7 @@ f64.const 1e-308 call $~lib/util/number/dtoa i32.const 4952 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8563,7 +8531,7 @@ f64.const -1e-308 call $~lib/util/number/dtoa i32.const 4976 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8576,7 +8544,7 @@ f64.const 1e-323 call $~lib/util/number/dtoa i32.const 5000 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8589,7 +8557,7 @@ f64.const -1e-323 call $~lib/util/number/dtoa i32.const 5024 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8602,7 +8570,7 @@ f64.const 0 call $~lib/util/number/dtoa i32.const 3032 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8615,7 +8583,7 @@ f64.const 4294967272 call $~lib/util/number/dtoa i32.const 5048 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8628,7 +8596,7 @@ f64.const 1.2312145673456234e-08 call $~lib/util/number/dtoa i32.const 5080 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8641,7 +8609,7 @@ f64.const 555555555.5555556 call $~lib/util/number/dtoa i32.const 5136 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8654,7 +8622,7 @@ f64.const 0.9999999999999999 call $~lib/util/number/dtoa i32.const 5184 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8667,7 +8635,7 @@ f64.const 1 call $~lib/util/number/dtoa i32.const 4688 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8680,7 +8648,7 @@ f64.const 12.34 call $~lib/util/number/dtoa i32.const 5232 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8693,7 +8661,7 @@ f64.const 0.3333333333333333 call $~lib/util/number/dtoa i32.const 5256 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8706,7 +8674,7 @@ f64.const 1234e17 call $~lib/util/number/dtoa i32.const 5304 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8719,7 +8687,7 @@ f64.const 1234e18 call $~lib/util/number/dtoa i32.const 5360 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8732,7 +8700,7 @@ f64.const 2.71828 call $~lib/util/number/dtoa i32.const 5392 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8745,7 +8713,7 @@ f64.const 0.0271828 call $~lib/util/number/dtoa i32.const 5416 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8758,7 +8726,7 @@ f64.const 271.828 call $~lib/util/number/dtoa i32.const 5448 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8771,7 +8739,7 @@ f64.const 1.1e+128 call $~lib/util/number/dtoa i32.const 5472 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8784,7 +8752,7 @@ f64.const 1.1e-64 call $~lib/util/number/dtoa i32.const 5496 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8797,7 +8765,7 @@ f64.const 0.000035689 call $~lib/util/number/dtoa i32.const 5520 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8808,13 +8776,13 @@ unreachable end ) - (func $std/string/getString (; 55 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 53 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 56 ;) (type $FUNCSIG$v) + (func $start (; 54 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 57 ;) (type $FUNCSIG$v) + (func $null (; 55 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index fa2e3a58c2..432d6c8547 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -20,10 +20,10 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00 \00\00\00h\00i\00,\00 \00I\00\'\00m\00 \00a\00 \00s\00t\00r\00i\00n\00g\00") (data (i32.const 48) "\01\00\00\00\1a\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 88) "\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 128) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 168) "\01\00\00\00\02\00\00\00\00\00") - (data (i32.const 184) "\01\00\00\00\02\00\00\006\00") + (data (i32.const 88) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 128) "\01\00\00\00\02\00\00\00\00\00") + (data (i32.const 144) "\01\00\00\00\02\00\00\006\00") + (data (i32.const 160) "\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 200) "\01\00\00\00\04\00\00\004\d8\06\df") (data (i32.const 216) "\01\00\00\00\04\00\00\00h\00i\00") (data (i32.const 232) "\01\00\00\00\08\00\00\00n\00u\00l\00l\00") @@ -218,18 +218,6 @@ i32.shr_u ) (func $~lib/string/String#charCodeAt (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 44 - i32.const 4 - call $~lib/env/abort - unreachable - end local.get $1 local.get $0 call $~lib/string/String#get:length @@ -365,7 +353,7 @@ i32.eqz if i32.const 0 - i32.const 136 + i32.const 96 i32.const 191 i32.const 2 call $~lib/env/abort @@ -380,7 +368,7 @@ i32.eqz if i32.const 0 - i32.const 136 + i32.const 96 i32.const 192 i32.const 2 call $~lib/env/abort @@ -471,7 +459,7 @@ end local.get $5 ) - (func $~lib/string/String.eq (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -526,7 +514,7 @@ i32.eqz if i32.const 0 - i32.const 96 + i32.const 168 i32.const 21 i32.const 4 call $~lib/env/abort @@ -599,8 +587,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 165 + i32.const 168 + i32.const 161 i32.const 4 call $~lib/env/abort unreachable @@ -665,8 +653,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 78 + i32.const 168 + i32.const 74 i32.const 4 call $~lib/env/abort unreachable @@ -729,8 +717,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 134 + i32.const 168 + i32.const 130 i32.const 4 call $~lib/env/abort unreachable @@ -2288,8 +2276,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 282 + i32.const 168 + i32.const 278 i32.const 4 call $~lib/env/abort unreachable @@ -2397,8 +2385,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 303 + i32.const 168 + i32.const 299 i32.const 4 call $~lib/env/abort unreachable @@ -2507,8 +2495,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 150 + i32.const 168 + i32.const 146 i32.const 4 call $~lib/env/abort unreachable @@ -3021,8 +3009,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 569 + i32.const 168 + i32.const 565 i32.const 10 call $~lib/env/abort unreachable @@ -3096,18 +3084,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 65 - i32.const 4 - call $~lib/env/abort - unreachable - end local.get $1 i32.const 0 i32.eq @@ -3161,24 +3137,23 @@ call $~lib/runtime/doRegister end ) - (func $~lib/string/String.concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.eqz - if - i32.const 240 - local.set $0 - end + i32.const 240 local.get $0 + i32.const 0 + i32.ne + select local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.ne (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz ) - (func $~lib/string/String.gt (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3240,7 +3215,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.lt (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3302,16 +3277,16 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String.gte (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gte (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 - call $~lib/string/String.lt + call $~lib/string/String.__lt i32.eqz ) - (func $~lib/string/String.lte (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lte (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 - call $~lib/string/String.gt + call $~lib/string/String.__gt i32.eqz ) (func $~lib/string/String#repeat (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -3324,8 +3299,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 324 + i32.const 168 + i32.const 320 i32.const 4 call $~lib/env/abort unreachable @@ -3352,8 +3327,8 @@ end if i32.const 0 - i32.const 96 - i32.const 329 + i32.const 168 + i32.const 325 i32.const 6 call $~lib/env/abort unreachable @@ -3806,7 +3781,7 @@ i32.gt_u if i32.const 0 - i32.const 136 + i32.const 96 i32.const 226 i32.const 57 call $~lib/env/abort @@ -3954,7 +3929,7 @@ i32.eqz if i32.const 0 - i32.const 136 + i32.const 96 i32.const 100 i32.const 8 call $~lib/env/abort @@ -3987,7 +3962,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureLength (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4014,7 +3989,7 @@ i32.const 0 i32.const 1440 i32.const 12 - i32.const 59 + i32.const 64 call $~lib/env/abort unreachable end @@ -4054,7 +4029,7 @@ i32.const 1 i32.add i32.const 2 - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $0 i32.load offset=4 local.get $1 @@ -4075,35 +4050,7 @@ i32.store offset=12 end ) - (func $~lib/runtime/assertRegistered (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - i32.load - global.get $~lib/runtime/HEADER_MAGIC - i32.ne - i32.eqz - if - i32.const 0 - i32.const 136 - i32.const 199 - i32.const 2 - call $~lib/env/abort - unreachable - end - ) - (func $~lib/runtime/doLink (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - call $~lib/runtime/assertRegistered - local.get $1 - call $~lib/runtime/assertRegistered - ) - (func $~lib/runtime/LINK> (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - call $~lib/runtime/doLink - ) - (func $~lib/array/Array#push (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -4113,7 +4060,7 @@ local.get $0 local.get $2 i32.const 2 - call $~lib/array/ensureLength + call $~lib/array/ensureCapacity local.get $0 local.get $2 i32.store offset=12 @@ -4129,7 +4076,30 @@ i32.store local.get $2 ) - (func $~lib/string/String#split (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/assertRegistered (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.ne + i32.eqz + if + i32.const 0 + i32.const 96 + i32.const 199 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doLink (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + call $~lib/runtime/assertRegistered + local.get $1 + call $~lib/runtime/assertRegistered + ) + (func $~lib/string/String#split (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4148,8 +4118,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 351 + i32.const 168 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable @@ -4249,8 +4219,6 @@ i32.const 2 i32.shl i32.add - local.get $8 - i32.store block $~lib/runtime/REGISTER|inlined.7 (result i32) local.get $8 local.set $9 @@ -4258,8 +4226,7 @@ i32.const 1 call $~lib/runtime/doRegister end - local.get $3 - call $~lib/runtime/LINK> + i32.store end local.get $7 i32.const 1 @@ -4443,11 +4410,11 @@ end local.get $10 ) - (func $~lib/array/Array#get:length (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/util/number/decimalCount32 (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -4516,7 +4483,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa32_lut (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4659,7 +4626,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4723,7 +4690,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/utoa32 (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4767,7 +4734,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/decimalCount64 (; 53 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 52 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -4836,7 +4803,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 54 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 53 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -4964,7 +4931,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 55 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 54 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5044,7 +5011,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa64 (; 56 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 55 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5146,19 +5113,19 @@ call $~lib/runtime/doRegister end ) - (func $~lib/builtins/isFinite (; 57 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 56 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 58 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 57 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/util/number/genDigits (; 59 ;) (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 (; 58 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -5729,7 +5696,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6062,7 +6029,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 61 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 60 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -6508,7 +6475,7 @@ local.get $2 i32.add ) - (func $~lib/string/String#substring (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6523,8 +6490,8 @@ i32.eqz if i32.const 0 - i32.const 96 - i32.const 190 + i32.const 168 + i32.const 186 i32.const 4 call $~lib/env/abort unreachable @@ -6634,7 +6601,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/runtime/doDiscard (; 63 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/doDiscard (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -6642,7 +6609,7 @@ i32.sub call $~lib/memory/memory.free ) - (func $~lib/util/number/dtoa (; 64 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 63 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6698,7 +6665,7 @@ end local.get $4 ) - (func $start:std/string (; 65 ;) (type $FUNCSIG$v) + (func $start:std/string (; 64 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -6753,8 +6720,8 @@ global.set $~lib/allocator/arena/offset i32.const 0 call $~lib/string/String.fromCharCode - i32.const 176 - call $~lib/string/String.eq + i32.const 136 + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6766,8 +6733,8 @@ end i32.const 54 call $~lib/string/String.fromCharCode - i32.const 192 - call $~lib/string/String.eq + i32.const 152 + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6781,8 +6748,8 @@ i32.const 54 i32.add call $~lib/string/String.fromCharCode - i32.const 192 - call $~lib/string/String.eq + i32.const 152 + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6794,8 +6761,8 @@ end i32.const 0 call $~lib/string/String.fromCodePoint - i32.const 176 - call $~lib/string/String.eq + i32.const 136 + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6807,8 +6774,8 @@ end i32.const 54 call $~lib/string/String.fromCodePoint - i32.const 192 - call $~lib/string/String.eq + i32.const 152 + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6885,7 +6852,7 @@ i32.const 296 call $~lib/string/String#padStart global.get $std/string/str - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6900,7 +6867,7 @@ i32.const 296 call $~lib/string/String#padStart global.get $std/string/str - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6915,7 +6882,7 @@ i32.const 296 call $~lib/string/String#padStart i32.const 320 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6930,7 +6897,7 @@ i32.const 312 call $~lib/string/String#padStart i32.const 312 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6945,7 +6912,7 @@ i32.const 312 call $~lib/string/String#padStart i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6960,7 +6927,7 @@ i32.const 296 call $~lib/string/String#padStart i32.const 368 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6975,7 +6942,7 @@ i32.const 392 call $~lib/string/String#padStart i32.const 408 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -6990,7 +6957,7 @@ i32.const 392 call $~lib/string/String#padStart i32.const 432 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7005,7 +6972,7 @@ i32.const 296 call $~lib/string/String#padEnd global.get $std/string/str - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7020,7 +6987,7 @@ i32.const 296 call $~lib/string/String#padEnd global.get $std/string/str - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7035,7 +7002,7 @@ i32.const 296 call $~lib/string/String#padEnd i32.const 320 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7050,7 +7017,7 @@ i32.const 312 call $~lib/string/String#padEnd i32.const 312 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7065,7 +7032,7 @@ i32.const 312 call $~lib/string/String#padEnd i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7080,7 +7047,7 @@ i32.const 296 call $~lib/string/String#padEnd i32.const 456 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7095,7 +7062,7 @@ i32.const 352 call $~lib/string/String#padEnd i32.const 480 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7110,7 +7077,7 @@ i32.const 352 call $~lib/string/String#padEnd i32.const 504 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7615,11 +7582,11 @@ end i32.const 336 i32.const 824 - call $~lib/string/String.concat + call $~lib/string/String.__concat global.set $std/string/c global.get $std/string/c i32.const 840 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7631,7 +7598,7 @@ end global.get $std/string/c i32.const 336 - call $~lib/string/String.ne + call $~lib/string/String.__ne i32.eqz if i32.const 0 @@ -7643,7 +7610,7 @@ end i32.const 312 i32.const 312 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7655,7 +7622,7 @@ end i32.const 312 global.get $std/string/nullStr - call $~lib/string/String.ne + call $~lib/string/String.__ne i32.eqz if i32.const 0 @@ -7667,7 +7634,7 @@ end global.get $std/string/nullStr i32.const 312 - call $~lib/string/String.ne + call $~lib/string/String.__ne i32.eqz if i32.const 0 @@ -7679,7 +7646,7 @@ end i32.const 336 i32.const 824 - call $~lib/string/String.ne + call $~lib/string/String.__ne i32.eqz if i32.const 0 @@ -7691,7 +7658,7 @@ end i32.const 336 i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7703,7 +7670,7 @@ end i32.const 856 i32.const 872 - call $~lib/string/String.ne + call $~lib/string/String.__ne i32.eqz if i32.const 0 @@ -7715,7 +7682,7 @@ end i32.const 856 i32.const 856 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7727,7 +7694,7 @@ end i32.const 888 i32.const 904 - call $~lib/string/String.ne + call $~lib/string/String.__ne i32.eqz if i32.const 0 @@ -7739,7 +7706,7 @@ end i32.const 920 i32.const 944 - call $~lib/string/String.ne + call $~lib/string/String.__ne i32.eqz if i32.const 0 @@ -7751,7 +7718,7 @@ end i32.const 968 i32.const 968 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -7763,7 +7730,7 @@ end i32.const 968 i32.const 992 - call $~lib/string/String.ne + call $~lib/string/String.__ne i32.eqz if i32.const 0 @@ -7775,7 +7742,7 @@ end i32.const 1016 i32.const 1048 - call $~lib/string/String.ne + call $~lib/string/String.__ne i32.eqz if i32.const 0 @@ -7787,7 +7754,7 @@ end i32.const 824 i32.const 336 - call $~lib/string/String.gt + call $~lib/string/String.__gt i32.eqz if i32.const 0 @@ -7799,7 +7766,7 @@ end i32.const 1080 i32.const 336 - call $~lib/string/String.gt + call $~lib/string/String.__gt i32.eqz if i32.const 0 @@ -7811,7 +7778,7 @@ end i32.const 1080 i32.const 1096 - call $~lib/string/String.gte + call $~lib/string/String.__gte i32.eqz if i32.const 0 @@ -7823,7 +7790,7 @@ end i32.const 1080 i32.const 840 - call $~lib/string/String.gt + call $~lib/string/String.__gt i32.eqz if i32.const 0 @@ -7835,7 +7802,7 @@ end i32.const 1080 i32.const 840 - call $~lib/string/String.lt + call $~lib/string/String.__lt i32.eqz i32.eqz if @@ -7848,7 +7815,7 @@ end i32.const 824 global.get $std/string/nullStr - call $~lib/string/String.lt + call $~lib/string/String.__lt i32.eqz i32.eqz if @@ -7861,7 +7828,7 @@ end global.get $std/string/nullStr i32.const 824 - call $~lib/string/String.lt + call $~lib/string/String.__lt i32.eqz i32.eqz if @@ -7874,7 +7841,7 @@ end i32.const 352 i32.const 312 - call $~lib/string/String.gt + call $~lib/string/String.__gt i32.eqz if i32.const 0 @@ -7886,7 +7853,7 @@ end i32.const 312 i32.const 352 - call $~lib/string/String.lt + call $~lib/string/String.__lt i32.eqz if i32.const 0 @@ -7898,7 +7865,7 @@ end i32.const 352 i32.const 312 - call $~lib/string/String.gte + call $~lib/string/String.__gte i32.eqz if i32.const 0 @@ -7910,7 +7877,7 @@ end i32.const 312 i32.const 352 - call $~lib/string/String.lte + call $~lib/string/String.__lte i32.eqz if i32.const 0 @@ -7922,7 +7889,7 @@ end i32.const 352 i32.const 312 - call $~lib/string/String.lt + call $~lib/string/String.__lt i32.eqz i32.eqz if @@ -7935,7 +7902,7 @@ end i32.const 312 i32.const 352 - call $~lib/string/String.gt + call $~lib/string/String.__gt i32.eqz i32.eqz if @@ -7948,7 +7915,7 @@ end i32.const 312 i32.const 312 - call $~lib/string/String.lt + call $~lib/string/String.__lt i32.eqz i32.eqz if @@ -7961,7 +7928,7 @@ end i32.const 312 i32.const 312 - call $~lib/string/String.gt + call $~lib/string/String.__gt i32.eqz i32.eqz if @@ -7974,7 +7941,7 @@ end i32.const 312 i32.const 312 - call $~lib/string/String.gte + call $~lib/string/String.__gte i32.eqz if i32.const 0 @@ -7986,7 +7953,7 @@ end i32.const 312 i32.const 312 - call $~lib/string/String.lte + call $~lib/string/String.__lte i32.eqz if i32.const 0 @@ -8003,11 +7970,11 @@ call $~lib/string/String.fromCodePoint i32.const 56322 call $~lib/string/String.fromCodePoint - call $~lib/string/String.concat + call $~lib/string/String.__concat global.set $std/string/b global.get $std/string/a global.get $std/string/b - call $~lib/string/String.gt + call $~lib/string/String.__gt i32.eqz if i32.const 0 @@ -8034,7 +8001,7 @@ i32.const 100 call $~lib/string/String#repeat i32.const 312 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8048,7 +8015,7 @@ i32.const 0 call $~lib/string/String#repeat i32.const 312 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8062,7 +8029,7 @@ i32.const 1 call $~lib/string/String#repeat i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8076,7 +8043,7 @@ i32.const 2 call $~lib/string/String#repeat i32.const 1096 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8090,7 +8057,7 @@ i32.const 3 call $~lib/string/String#repeat i32.const 1112 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8104,7 +8071,7 @@ i32.const 4 call $~lib/string/String#repeat i32.const 1128 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8118,7 +8085,7 @@ i32.const 5 call $~lib/string/String#repeat i32.const 1152 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8132,7 +8099,7 @@ i32.const 6 call $~lib/string/String#repeat i32.const 1176 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8146,7 +8113,7 @@ i32.const 7 call $~lib/string/String#repeat i32.const 1200 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8163,7 +8130,7 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#slice i32.const 1224 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8178,7 +8145,7 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#slice i32.const 1264 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8193,7 +8160,7 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#slice i32.const 1280 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8208,7 +8175,7 @@ i32.const 7 call $~lib/string/String#slice i32.const 1304 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8223,7 +8190,7 @@ i32.const -6 call $~lib/string/String#slice i32.const 1328 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8238,7 +8205,7 @@ i32.const 3 call $~lib/string/String#slice i32.const 312 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8253,7 +8220,7 @@ i32.const -1 call $~lib/string/String#slice i32.const 1352 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -8290,7 +8257,7 @@ select i32.load i32.const 312 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8348,7 +8315,7 @@ select i32.load i32.const 312 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8388,7 +8355,7 @@ select i32.load i32.const 1480 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8428,7 +8395,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8452,7 +8419,7 @@ select i32.load i32.const 824 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8476,7 +8443,7 @@ select i32.load i32.const 1520 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8518,7 +8485,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8542,7 +8509,7 @@ select i32.load i32.const 824 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8566,7 +8533,7 @@ select i32.load i32.const 1520 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8608,7 +8575,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8632,7 +8599,7 @@ select i32.load i32.const 824 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8656,7 +8623,7 @@ select i32.load i32.const 312 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8680,7 +8647,7 @@ select i32.load i32.const 1520 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8722,7 +8689,7 @@ select i32.load i32.const 312 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8746,7 +8713,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8770,7 +8737,7 @@ select i32.load i32.const 824 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8794,7 +8761,7 @@ select i32.load i32.const 1520 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8836,7 +8803,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8860,7 +8827,7 @@ select i32.load i32.const 824 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8884,7 +8851,7 @@ select i32.load i32.const 1520 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8908,7 +8875,7 @@ select i32.load i32.const 312 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8950,7 +8917,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8974,7 +8941,7 @@ select i32.load i32.const 824 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -8998,7 +8965,7 @@ select i32.load i32.const 1520 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -9058,7 +9025,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -9098,7 +9065,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -9138,7 +9105,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -9162,7 +9129,7 @@ select i32.load i32.const 824 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -9186,7 +9153,7 @@ select i32.load i32.const 1520 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -9228,7 +9195,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -9252,7 +9219,7 @@ select i32.load i32.const 824 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -9276,7 +9243,7 @@ select i32.load i32.const 1520 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -9318,7 +9285,7 @@ select i32.load i32.const 336 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -9342,7 +9309,7 @@ select i32.load i32.const 824 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -9366,7 +9333,7 @@ select i32.load i32.const 1520 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $2 end @@ -9384,7 +9351,7 @@ i32.const 0 call $~lib/util/number/itoa32 i32.const 608 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9397,7 +9364,7 @@ i32.const 1 call $~lib/util/number/itoa32 i32.const 624 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9410,7 +9377,7 @@ i32.const 8 call $~lib/util/number/itoa32 i32.const 2080 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9423,7 +9390,7 @@ i32.const 123 call $~lib/util/number/itoa32 i32.const 392 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9436,7 +9403,7 @@ i32.const -1000 call $~lib/util/number/itoa32 i32.const 2096 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9449,7 +9416,7 @@ i32.const 1234 call $~lib/util/number/itoa32 i32.const 2120 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9462,7 +9429,7 @@ i32.const 12345 call $~lib/util/number/itoa32 i32.const 2136 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9475,7 +9442,7 @@ i32.const 123456 call $~lib/util/number/itoa32 i32.const 2160 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9488,7 +9455,7 @@ i32.const 1111111 call $~lib/util/number/itoa32 i32.const 2184 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9501,7 +9468,7 @@ i32.const 1234567 call $~lib/util/number/itoa32 i32.const 2208 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9514,7 +9481,7 @@ i32.const 2147483646 call $~lib/util/number/itoa32 i32.const 2232 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9527,7 +9494,7 @@ i32.const 2147483647 call $~lib/util/number/itoa32 i32.const 2264 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9540,7 +9507,7 @@ i32.const -2147483648 call $~lib/util/number/itoa32 i32.const 2296 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9553,7 +9520,7 @@ i32.const -1 call $~lib/util/number/itoa32 i32.const 2328 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9566,7 +9533,7 @@ i32.const 0 call $~lib/util/number/utoa32 i32.const 608 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9579,7 +9546,7 @@ i32.const 1000 call $~lib/util/number/utoa32 i32.const 2344 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9592,7 +9559,7 @@ i32.const 2147483647 call $~lib/util/number/utoa32 i32.const 2264 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9605,7 +9572,7 @@ i32.const -2147483648 call $~lib/util/number/utoa32 i32.const 2360 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9618,7 +9585,7 @@ global.get $~lib/builtins/u32.MAX_VALUE call $~lib/util/number/utoa32 i32.const 2392 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9631,7 +9598,7 @@ i64.const 0 call $~lib/util/number/utoa64 i32.const 608 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9644,7 +9611,7 @@ i64.const 1234 call $~lib/util/number/utoa64 i32.const 2120 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9657,7 +9624,7 @@ i64.const 99999999 call $~lib/util/number/utoa64 i32.const 2424 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9670,7 +9637,7 @@ i64.const 100000000 call $~lib/util/number/utoa64 i32.const 2448 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9683,7 +9650,7 @@ i64.const 4294967295 call $~lib/util/number/utoa64 i32.const 2392 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9696,7 +9663,7 @@ i64.const 68719476735 call $~lib/util/number/utoa64 i32.const 2480 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9709,7 +9676,7 @@ i64.const 868719476735 call $~lib/util/number/utoa64 i32.const 2512 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9722,7 +9689,7 @@ i64.const 999868719476735 call $~lib/util/number/utoa64 i32.const 2544 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9735,7 +9702,7 @@ i64.const 9999868719476735 call $~lib/util/number/utoa64 i32.const 2584 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9748,7 +9715,7 @@ i64.const 19999868719476735 call $~lib/util/number/utoa64 i32.const 2624 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9761,7 +9728,7 @@ global.get $~lib/builtins/u64.MAX_VALUE call $~lib/util/number/utoa64 i32.const 2672 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9774,7 +9741,7 @@ i64.const 0 call $~lib/util/number/itoa64 i32.const 608 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9787,7 +9754,7 @@ i64.const -1234 call $~lib/util/number/itoa64 i32.const 2720 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9800,7 +9767,7 @@ i64.const 4294967295 call $~lib/util/number/itoa64 i32.const 2392 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9813,7 +9780,7 @@ i64.const -4294967295 call $~lib/util/number/itoa64 i32.const 2744 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9826,7 +9793,7 @@ i64.const 68719476735 call $~lib/util/number/itoa64 i32.const 2480 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9839,7 +9806,7 @@ i64.const -68719476735 call $~lib/util/number/itoa64 i32.const 2776 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9852,7 +9819,7 @@ i64.const -868719476735 call $~lib/util/number/itoa64 i32.const 2808 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9865,7 +9832,7 @@ i64.const -999868719476735 call $~lib/util/number/itoa64 i32.const 2848 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9878,7 +9845,7 @@ i64.const -19999868719476735 call $~lib/util/number/itoa64 i32.const 2888 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9891,7 +9858,7 @@ global.get $~lib/builtins/i64.MAX_VALUE call $~lib/util/number/itoa64 i32.const 2936 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9904,7 +9871,7 @@ global.get $~lib/builtins/i64.MIN_VALUE call $~lib/util/number/itoa64 i32.const 2984 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9917,7 +9884,7 @@ f64.const 0 call $~lib/util/number/dtoa i32.const 3032 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9930,7 +9897,7 @@ f64.const -0 call $~lib/util/number/dtoa i32.const 3032 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9943,7 +9910,7 @@ f64.const nan:0x8000000000000 call $~lib/util/number/dtoa i32.const 3048 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9956,7 +9923,7 @@ f64.const inf call $~lib/util/number/dtoa i32.const 3096 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9970,7 +9937,7 @@ f64.neg call $~lib/util/number/dtoa i32.const 3064 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9983,7 +9950,7 @@ global.get $~lib/builtins/f64.EPSILON call $~lib/util/number/dtoa i32.const 4128 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -9997,7 +9964,7 @@ f64.neg call $~lib/util/number/dtoa i32.const 4184 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10010,7 +9977,7 @@ global.get $~lib/builtins/f64.MAX_VALUE call $~lib/util/number/dtoa i32.const 4240 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10024,7 +9991,7 @@ f64.neg call $~lib/util/number/dtoa i32.const 4296 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10037,7 +10004,7 @@ f64.const 4185580496821356722454785e274 call $~lib/util/number/dtoa i32.const 4352 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10050,7 +10017,7 @@ f64.const 2.2250738585072014e-308 call $~lib/util/number/dtoa i32.const 4408 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10063,7 +10030,7 @@ f64.const 4.940656e-318 call $~lib/util/number/dtoa i32.const 4464 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10076,7 +10043,7 @@ f64.const 9060801153433600 call $~lib/util/number/dtoa i32.const 4504 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10089,7 +10056,7 @@ f64.const 4708356024711512064 call $~lib/util/number/dtoa i32.const 4552 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10102,7 +10069,7 @@ f64.const 9409340012568248320 call $~lib/util/number/dtoa i32.const 4608 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10115,7 +10082,7 @@ f64.const 5e-324 call $~lib/util/number/dtoa i32.const 4664 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10128,7 +10095,7 @@ f64.const 1 call $~lib/util/number/dtoa i32.const 4688 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10141,7 +10108,7 @@ f64.const 0.1 call $~lib/util/number/dtoa i32.const 768 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10154,7 +10121,7 @@ f64.const -1 call $~lib/util/number/dtoa i32.const 4704 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10167,7 +10134,7 @@ f64.const -0.1 call $~lib/util/number/dtoa i32.const 4720 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10180,7 +10147,7 @@ f64.const 1e6 call $~lib/util/number/dtoa i32.const 4736 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10193,7 +10160,7 @@ f64.const 1e-06 call $~lib/util/number/dtoa i32.const 4768 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10206,7 +10173,7 @@ f64.const -1e6 call $~lib/util/number/dtoa i32.const 4792 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10219,7 +10186,7 @@ f64.const -1e-06 call $~lib/util/number/dtoa i32.const 4824 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10232,7 +10199,7 @@ f64.const 1e7 call $~lib/util/number/dtoa i32.const 4856 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10245,7 +10212,7 @@ f64.const 1e-07 call $~lib/util/number/dtoa i32.const 4888 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10258,7 +10225,7 @@ f64.const 1.e+308 call $~lib/util/number/dtoa i32.const 4904 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10271,7 +10238,7 @@ f64.const -1.e+308 call $~lib/util/number/dtoa i32.const 4928 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10284,7 +10251,7 @@ f64.const inf call $~lib/util/number/dtoa i32.const 3096 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10297,7 +10264,7 @@ f64.const -inf call $~lib/util/number/dtoa i32.const 3064 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10310,7 +10277,7 @@ f64.const 1e-308 call $~lib/util/number/dtoa i32.const 4952 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10323,7 +10290,7 @@ f64.const -1e-308 call $~lib/util/number/dtoa i32.const 4976 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10336,7 +10303,7 @@ f64.const 1e-323 call $~lib/util/number/dtoa i32.const 5000 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10349,7 +10316,7 @@ f64.const -1e-323 call $~lib/util/number/dtoa i32.const 5024 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10362,7 +10329,7 @@ f64.const 0 call $~lib/util/number/dtoa i32.const 3032 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10375,7 +10342,7 @@ f64.const 4294967272 call $~lib/util/number/dtoa i32.const 5048 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10388,7 +10355,7 @@ f64.const 1.2312145673456234e-08 call $~lib/util/number/dtoa i32.const 5080 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10401,7 +10368,7 @@ f64.const 555555555.5555556 call $~lib/util/number/dtoa i32.const 5136 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10414,7 +10381,7 @@ f64.const 0.9999999999999999 call $~lib/util/number/dtoa i32.const 5184 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10427,7 +10394,7 @@ f64.const 1 call $~lib/util/number/dtoa i32.const 4688 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10440,7 +10407,7 @@ f64.const 12.34 call $~lib/util/number/dtoa i32.const 5232 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10455,7 +10422,7 @@ f64.div call $~lib/util/number/dtoa i32.const 5256 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10468,7 +10435,7 @@ f64.const 1234e17 call $~lib/util/number/dtoa i32.const 5304 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10481,7 +10448,7 @@ f64.const 1234e18 call $~lib/util/number/dtoa i32.const 5360 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10494,7 +10461,7 @@ f64.const 2.71828 call $~lib/util/number/dtoa i32.const 5392 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10507,7 +10474,7 @@ f64.const 0.0271828 call $~lib/util/number/dtoa i32.const 5416 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10520,7 +10487,7 @@ f64.const 271.828 call $~lib/util/number/dtoa i32.const 5448 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10533,7 +10500,7 @@ f64.const 1.1e+128 call $~lib/util/number/dtoa i32.const 5472 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10546,7 +10513,7 @@ f64.const 1.1e-64 call $~lib/util/number/dtoa i32.const 5496 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10559,7 +10526,7 @@ f64.const 0.000035689 call $~lib/util/number/dtoa i32.const 5520 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -10570,12 +10537,12 @@ unreachable end ) - (func $std/string/getString (; 66 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 65 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 67 ;) (type $FUNCSIG$v) + (func $start (; 66 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 68 ;) (type $FUNCSIG$v) + (func $null (; 67 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index ce390ff41e..2113f214a7 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -28,12 +28,11 @@ (data (i32.const 448) "\01\00\00\00\16\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s") (data (i32.const 480) "\01\00\00\00\0e\00\00\00S\00y\00m\00b\00o\00l\00(") (data (i32.const 504) "\01\00\00\00\08\00\00\00n\00u\00l\00l") - (data (i32.const 520) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 560) "\01\00\00\00\02\00\00\00)") - (data (i32.const 576) "\01\00\00\00\10\00\00\00S\00y\00m\00b\00o\00l\00(\00)") - (data (i32.const 600) "\01\00\00\00\16\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)") - (data (i32.const 632) "\01\00\00\00&\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)") - (data (i32.const 680) "\01\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)") + (data (i32.const 520) "\01\00\00\00\02\00\00\00)") + (data (i32.const 536) "\01\00\00\00\10\00\00\00S\00y\00m\00b\00o\00l\00(\00)") + (data (i32.const 560) "\01\00\00\00\16\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)") + (data (i32.const 592) "\01\00\00\00&\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)") + (data (i32.const 640) "\01\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/symbol/nextId (mut i32) (i32.const 12)) @@ -139,7 +138,7 @@ ) (func $~lib/runtime/assertUnregistered (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 740 + i32.const 700 i32.le_u if i32.const 0 @@ -562,7 +561,7 @@ end local.get $3 ) - (func $~lib/string/String.eq (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -633,7 +632,7 @@ local.get $1 i32.load i32.const 16 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $0 end @@ -2291,16 +2290,6 @@ (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 528 - i32.const 65 - i32.const 4 - call $~lib/env/abort - unreachable - end local.get $1 i32.const 512 local.get $1 @@ -2346,7 +2335,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/string/String.concat (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 512 local.get $0 @@ -2434,9 +2423,9 @@ i32.const 160 end end - call $~lib/string/String.concat - i32.const 568 - call $~lib/string/String.concat + call $~lib/string/String.__concat + i32.const 528 + call $~lib/string/String.__concat ) (func $start:std/symbol (; 29 ;) (type $FUNCSIG$v) (local $0 i32) @@ -2475,7 +2464,7 @@ call $~lib/env/abort unreachable end - i32.const 744 + i32.const 704 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -2526,7 +2515,7 @@ global.set $std/symbol/key4 global.get $std/symbol/key3 i32.const 16 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2538,7 +2527,7 @@ end global.get $std/symbol/key3 global.get $std/symbol/key4 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2560,8 +2549,8 @@ end local.get $0 call $~lib/symbol/_Symbol#toString - i32.const 584 - call $~lib/string/String.eq + i32.const 544 + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2573,8 +2562,8 @@ end global.get $std/symbol/sym3 call $~lib/symbol/_Symbol#toString - i32.const 608 - call $~lib/string/String.eq + i32.const 568 + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2590,8 +2579,8 @@ global.set $std/symbol/isConcatSpreadable global.get $std/symbol/hasInstance call $~lib/symbol/_Symbol#toString - i32.const 640 - call $~lib/string/String.eq + i32.const 600 + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -2603,8 +2592,8 @@ end global.get $std/symbol/isConcatSpreadable call $~lib/symbol/_Symbol#toString - i32.const 688 - call $~lib/string/String.eq + i32.const 648 + call $~lib/string/String.__eq i32.eqz if i32.const 0 diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 274f9b61c3..50b9392d62 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -28,12 +28,11 @@ (data (i32.const 448) "\01\00\00\00\16\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s\00") (data (i32.const 480) "\01\00\00\00\0e\00\00\00S\00y\00m\00b\00o\00l\00(\00") (data (i32.const 504) "\01\00\00\00\08\00\00\00n\00u\00l\00l\00") - (data (i32.const 520) "\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 560) "\01\00\00\00\02\00\00\00)\00") - (data (i32.const 576) "\01\00\00\00\10\00\00\00S\00y\00m\00b\00o\00l\00(\00)\00") - (data (i32.const 600) "\01\00\00\00\16\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)\00") - (data (i32.const 632) "\01\00\00\00&\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)\00") - (data (i32.const 680) "\01\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)\00") + (data (i32.const 520) "\01\00\00\00\02\00\00\00)\00") + (data (i32.const 536) "\01\00\00\00\10\00\00\00S\00y\00m\00b\00o\00l\00(\00)\00") + (data (i32.const 560) "\01\00\00\00\16\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)\00") + (data (i32.const 592) "\01\00\00\00&\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)\00") + (data (i32.const 640) "\01\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) @@ -58,7 +57,7 @@ (global $std/symbol/hasInstance (mut i32) (i32.const 0)) (global $~lib/symbol/_Symbol.isConcatSpreadable i32 (i32.const 2)) (global $std/symbol/isConcatSpreadable (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 740)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 700)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -764,7 +763,7 @@ end local.get $5 ) - (func $~lib/string/String.eq (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -837,7 +836,7 @@ local.get $3 i32.load local.get $1 - call $~lib/string/String.eq + call $~lib/string/String.__eq else local.get $4 end @@ -3006,18 +3005,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 528 - i32.const 65 - i32.const 4 - call $~lib/env/abort - unreachable - end local.get $1 i32.const 0 i32.eq @@ -3071,14 +3058,13 @@ call $~lib/runtime/doRegister end ) - (func $~lib/string/String.concat (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.eqz - if - i32.const 512 - local.set $0 - end + i32.const 512 local.get $0 + i32.const 0 + i32.ne + select local.get $1 call $~lib/string/String#concat ) @@ -3264,9 +3250,9 @@ end i32.const 488 local.get $2 - call $~lib/string/String.concat - i32.const 568 - call $~lib/string/String.concat + call $~lib/string/String.__concat + i32.const 528 + call $~lib/string/String.__concat ) (func $start:std/symbol (; 36 ;) (type $FUNCSIG$v) i32.const 16 @@ -3353,7 +3339,7 @@ global.set $std/symbol/key4 global.get $std/symbol/key3 i32.const 16 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -3365,7 +3351,7 @@ end global.get $std/symbol/key3 global.get $std/symbol/key4 - call $~lib/string/String.eq + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -3378,8 +3364,8 @@ i32.const 0 call $~lib/symbol/Symbol call $~lib/symbol/_Symbol#toString - i32.const 584 - call $~lib/string/String.eq + i32.const 544 + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -3391,8 +3377,8 @@ end global.get $std/symbol/sym3 call $~lib/symbol/_Symbol#toString - i32.const 608 - call $~lib/string/String.eq + i32.const 568 + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -3408,8 +3394,8 @@ global.set $std/symbol/isConcatSpreadable global.get $std/symbol/hasInstance call $~lib/symbol/_Symbol#toString - i32.const 640 - call $~lib/string/String.eq + i32.const 600 + call $~lib/string/String.__eq i32.eqz if i32.const 0 @@ -3421,8 +3407,8 @@ end global.get $std/symbol/isConcatSpreadable call $~lib/symbol/_Symbol#toString - i32.const 688 - call $~lib/string/String.eq + i32.const 648 + call $~lib/string/String.__eq i32.eqz if i32.const 0 From c147e98a55a924b8090059aefabddd0e3fc3e7b1 Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 18 Mar 2019 13:45:10 +0100 Subject: [PATCH 046/119] capabilities to detect half/full runtime header --- lib/loader/index.js | 5 +++-- src/compiler.ts | 22 +++++++++++++++++++++- tests/compiler/exports.optimized.wat | 2 +- tests/compiler/exports.untouched.wat | 2 +- tests/compiler/std/runtime.optimized.wat | 2 ++ tests/compiler/std/runtime.untouched.wat | 2 ++ 6 files changed, 30 insertions(+), 5 deletions(-) diff --git a/lib/loader/index.js b/lib/loader/index.js index 7f79027bdb..5e58a1bf32 100644 --- a/lib/loader/index.js +++ b/lib/loader/index.js @@ -54,7 +54,8 @@ function postInstantiate(baseModule, instance) { var memory_fill = rawExports["memory.fill"]; var memory_free = rawExports["memory.free"]; var table = rawExports.table; - var setargc = rawExports._setargc || function() {}; + var capabilities = rawExports[".capabilities"] || 0; + var setargc = rawExports[".setargc"] || function() {}; // Provide views for all sorts of basic values var buffer, I8, U8, I16, U16, I32, U32, F32, F64, I64, U64; @@ -245,7 +246,7 @@ exports.instantiateStreaming = instantiateStreaming; /** Demangles an AssemblyScript module's exports to a friendly object structure. */ function demangle(exports, baseModule) { var module = baseModule ? Object.create(baseModule) : {}; - var setargc = exports._setargc || function() {}; + var setargc = exports[".setargc"] || function() {}; function hasOwnProperty(elem, prop) { return Object.prototype.hasOwnProperty.call(elem, prop); } diff --git a/src/compiler.ts b/src/compiler.ts index 1de1b5f7a3..a110de0ce3 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -252,6 +252,16 @@ export const enum Feature { THREADS = 1 << 4 // see: https://github.com/WebAssembly/threads } +/** Indicates module capabilities. */ +export const enum Capability { + /** No specific capabilities. */ + NONE = 0, + /** Uses WebAssembly with 64-bit pointers. */ + WASM64 = 1 << 0, + /** Garbage collector is present (full runtime header). */ + GC = 1 << 1 +} + /** Indicates the desired kind of a conversion. */ export const enum ConversionKind { /** No conversion. */ @@ -440,6 +450,14 @@ export class Compiler extends DiagnosticEmitter { // set up gc if (this.needsIterateRoots) compileIterateRoots(this); + // expose module capabilities + var capabilities = Capability.NONE; + if (program.options.isWasm64) capabilities |= Capability.WASM64; + if (program.gcImplemented) capabilities |= Capability.GC; + if (capabilities != 0) { + module.addGlobal(CompilerSymbols.capabilities, NativeType.I32, false, module.createI32(capabilities)); + module.addGlobalExport(CompilerSymbols.capabilities, ".capabilities"); + } return module; } @@ -5758,7 +5776,7 @@ export class Compiler extends DiagnosticEmitter { module.createGetLocal(0, NativeType.I32) ) ); - module.addFunctionExport(internalName, "_setargc"); + module.addFunctionExport(internalName, ".setargc"); } return internalName; } @@ -8088,4 +8106,6 @@ namespace CompilerSymbols { export const argc = "~lib/argc"; /** Argument count setter. Exported for use by host calls. */ export const setargc = "~lib/setargc"; + /** Module capabilities. Exported for evaluation by the host. */ + export const capabilities = "~lib/capabilities"; } diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index e4056d28a8..35b75ab2a6 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -24,7 +24,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (export "add" (func $exports/add)) - (export "_setargc" (func $~lib/setargc)) + (export ".setargc" (func $~lib/setargc)) (export "subOpt" (func $exports/subOpt|trampoline)) (export "math.sub" (func $exports/subOpt)) (export "Animal.CAT" (global $exports/Animal.CAT)) diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 5ebb60c988..9c3e2d56dd 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -29,7 +29,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (export "add" (func $exports/add)) - (export "_setargc" (func $~lib/setargc)) + (export ".setargc" (func $~lib/setargc)) (export "subOpt" (func $exports/subOpt|trampoline)) (export "math.sub" (func $exports/math.sub)) (export "Animal.CAT" (global $exports/Animal.CAT)) diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 45871616fb..adaa3012be 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -38,8 +38,10 @@ (global $std/runtime/ref4 (mut i32) (i32.const 0)) (global $std/runtime/header4 (mut i32) (i32.const 0)) (global $std/runtime/ref5 (mut i32) (i32.const 0)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/allocator/tlsf/Root#setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index fc1f1ed780..a91a32ae47 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -55,8 +55,10 @@ (global $std/runtime/header4 (mut i32) (i32.const 0)) (global $std/runtime/ref5 (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 264)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) (func $start:~lib/allocator/tlsf (; 2 ;) (type $FUNCSIG$v) i32.const 1 From 0932cf17edc96a4a1ad202e1b06a9947fa905917 Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 18 Mar 2019 16:09:49 +0100 Subject: [PATCH 047/119] use overloads for checked access --- src/builtins.ts | 111 +- src/compiler.ts | 70 +- std/assembly/array.ts | 20 +- std/assembly/typedarray.ts | 154 +- tests/compiler/nonNullAssertion.optimized.wat | 48 +- tests/compiler/nonNullAssertion.untouched.wat | 129 +- tests/compiler/std/array-access.optimized.wat | 124 +- tests/compiler/std/array-access.untouched.wat | 222 +- .../compiler/std/array-literal.optimized.wat | 269 +- .../compiler/std/array-literal.untouched.wat | 373 +- tests/compiler/std/array.optimized.wat | 1376 ++-- tests/compiler/std/array.untouched.wat | 2066 ++---- tests/compiler/std/dataview.optimized.wat | 375 +- tests/compiler/std/dataview.untouched.wat | 367 +- tests/compiler/std/static-array.optimized.wat | 632 +- tests/compiler/std/static-array.untouched.wat | 2271 ++++++- tests/compiler/std/string.optimized.wat | 470 +- tests/compiler/std/string.untouched.wat | 628 +- tests/compiler/std/typedarray.optimized.wat | 5249 ++++++--------- tests/compiler/std/typedarray.untouched.wat | 5969 ++++++----------- 20 files changed, 9087 insertions(+), 11836 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index d3cfa40753..e5a6253c37 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -4120,103 +4120,52 @@ export function compileBuiltinArrayGet( ); } - var flow = compiler.currentFlow; var usizeType = compiler.options.usizeType; var nativeSizeType = compiler.options.nativeSizeType; - var isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); var ptrExpr: ExpressionRef; var constantOffset: i32 = 0; - if (isUnchecked) { - // precompute byteOffset into a constant and a dynamic part - dynamicOffset = module.precomputeExpression(dynamicOffset); - if (getExpressionId(dynamicOffset) == ExpressionId.Const) { - constantOffset = getConstValueI32(dynamicOffset); - dynamicOffset = 0; - } else if (getExpressionId(dynamicOffset) == ExpressionId.Binary) { - if (getBinaryOp(dynamicOffset) == BinaryOp.AddI32) { - let left = getBinaryLeft(dynamicOffset); - let right = getBinaryRight(dynamicOffset); - if (getExpressionId(left) == ExpressionId.Const) { - constantOffset = getConstValueI32(left); - dynamicOffset = right; - } else if (getExpressionId(right) == ExpressionId.Const) { - constantOffset = getConstValueI32(right); - dynamicOffset = left; - } - } - } - // ptr = this.dataStart - ptrExpr = module.createLoad(usizeType.byteSize, true, - compiler.compileExpression( - thisExpression, - target.type, - ConversionKind.IMPLICIT, - WrapMode.NONE - ), - nativeSizeType, (dataStart).memoryOffset - ); - // ptr = ptr + dynamicOffset - if (dynamicOffset) { - if (nativeSizeType == NativeType.I64) { - ptrExpr = module.createBinary(BinaryOp.AddI64, - ptrExpr, - module.createUnary(UnaryOp.ExtendU32, dynamicOffset) - ); - } else { - ptrExpr = module.createBinary(BinaryOp.AddI32, - ptrExpr, - dynamicOffset - ); + // precompute byteOffset into a constant and a dynamic part + dynamicOffset = module.precomputeExpression(dynamicOffset); + if (getExpressionId(dynamicOffset) == ExpressionId.Const) { + constantOffset = getConstValueI32(dynamicOffset); + dynamicOffset = 0; + } else if (getExpressionId(dynamicOffset) == ExpressionId.Binary) { + if (getBinaryOp(dynamicOffset) == BinaryOp.AddI32) { + let left = getBinaryLeft(dynamicOffset); + let right = getBinaryRight(dynamicOffset); + if (getExpressionId(left) == ExpressionId.Const) { + constantOffset = getConstValueI32(left); + dynamicOffset = right; + } else if (getExpressionId(right) == ExpressionId.Const) { + constantOffset = getConstValueI32(right); + dynamicOffset = left; } } - - } 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, (dataStart).memoryOffset - ); - - // ptr = ptr + (tempOffset = dynamicOffset) + } + // ptr = this.dataStart + ptrExpr = module.createLoad(usizeType.byteSize, true, + compiler.compileExpression( + thisExpression, + target.type, + ConversionKind.IMPLICIT, + WrapMode.NONE + ), + nativeSizeType, (dataStart).memoryOffset + ); + // ptr = ptr + dynamicOffset + if (dynamicOffset) { if (nativeSizeType == NativeType.I64) { ptrExpr = module.createBinary(BinaryOp.AddI64, ptrExpr, - module.createUnary(UnaryOp.ExtendU32, - module.createTeeLocal(tempOffset.index, dynamicOffset) - ) + module.createUnary(UnaryOp.ExtendU32, dynamicOffset) ); } else { ptrExpr = module.createBinary(BinaryOp.AddI32, ptrExpr, - module.createTeeLocal(tempOffset.index, dynamicOffset) + dynamicOffset ); } - - // ptr = select(ptr, -1, tempOffset < 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, (dataLength).memoryOffset - ) - ) - ); } compiler.currentType = outType; diff --git a/src/compiler.ts b/src/compiler.ts index a110de0ce3..af223c7631 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -4722,18 +4722,20 @@ export class Compiler extends DiagnosticEmitter { case ElementKind.CLASS: { let elementExpression = resolver.currentElementExpression; if (elementExpression) { // indexed access - let arrayType = this.program.determineBuiltinArrayType(target); - if (arrayType) { - return compileBuiltinArraySet( - this, - target, - assert(this.resolver.currentThisExpression), - elementExpression, - valueExpression, - contextualType - ); - } let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); + if (isUnchecked) { + let arrayType = this.program.determineBuiltinArrayType(target); + if (arrayType) { + return compileBuiltinArraySet( + this, + target, + assert(this.resolver.currentThisExpression), + elementExpression, + valueExpression, + contextualType + ); + } + } let indexedSet = (target).lookupOverload(OperatorKind.INDEXED_SET, isUnchecked); if (!indexedSet) { let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); @@ -4956,18 +4958,20 @@ export class Compiler extends DiagnosticEmitter { case ElementKind.CLASS: { let elementExpression = this.resolver.currentElementExpression; if (elementExpression) { - let arrayType = this.program.determineBuiltinArrayType(target); - if (arrayType) { - return compileBuiltinArraySetWithValue( - this, - target, - assert(this.resolver.currentThisExpression), - elementExpression, - valueWithCorrectType, - tee - ); - } let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); + if (isUnchecked) { + let arrayType = this.program.determineBuiltinArrayType(target); + if (arrayType) { + return compileBuiltinArraySetWithValue( + this, + target, + assert(this.resolver.currentThisExpression), + elementExpression, + valueWithCorrectType, + tee + ); + } + } let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); if (!indexedGet) { this.error( @@ -5974,17 +5978,19 @@ export class Compiler extends DiagnosticEmitter { if (!target) return this.module.createUnreachable(); switch (target.kind) { case ElementKind.CLASS: { - let arrayType = this.program.determineBuiltinArrayType(target); - if (arrayType) { - return compileBuiltinArrayGet( - this, - target, - expression.expression, - expression.elementExpression, - contextualType - ); - } let isUnchecked = this.currentFlow.is(FlowFlags.UNCHECKED_CONTEXT); + if (isUnchecked) { + let arrayType = this.program.determineBuiltinArrayType(target); + if (arrayType) { + return compileBuiltinArrayGet( + this, + target, + expression.expression, + expression.elementExpression, + contextualType + ); + } + } let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); if (!indexedGet) { this.error( diff --git a/std/assembly/array.ts b/std/assembly/array.ts index ef3fa4ad40..e4af4d441a 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -6,10 +6,9 @@ import { isArray as builtin_isArray } from "./builtins"; /** Ensures that the given array has _at least_ the specified capacity. */ function ensureCapacity(array: ArrayBufferView, minCapacity: i32, alignLog2: u32): void { - var oldData = array.data; - var oldCapacity = oldData.byteLength >>> alignLog2; - if (minCapacity > oldCapacity) { + if (minCapacity > array.dataLength >>> alignLog2) { if (minCapacity > (MAX_BYTELENGTH >>> alignLog2)) throw new RangeError("Invalid array length"); + let oldData = array.data; let newByteLength = minCapacity << alignLog2; let newData = REALLOCATE(changetype(oldData), newByteLength); // registers on move if (newData !== changetype(oldData)) { @@ -21,6 +20,11 @@ function ensureCapacity(array: ArrayBufferView, minCapacity: i32, alignLog2: u32 } export class Array 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; static isArray(value: U): bool { @@ -59,8 +63,14 @@ export class Array extends ArrayBufferView { return -1; } - @operator("[]=") - private __set(index: i32, value: T): void { // unchecked is built-in + @operator("[]") // unchecked is built-in + private __get(index: i32): T { + if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + return load(this.dataStart + (index << alignof())); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: T): void { ensureCapacity(this, index + 1, alignof()); store(this.dataStart + (index << alignof()), value); if (isManaged()) LINK(value, this); diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index 5bd84687e5..93d7526b61 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -1,10 +1,6 @@ import { ALLOCATE, REGISTER, ArrayBufferView } from "./runtime"; 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 { // @ts-ignore: decorator @@ -23,6 +19,18 @@ export class Int8Array extends ArrayBufferView { return this.byteLength; } + @operator("[]") // unchecked is built-in + private __get(index: i32): i8 { + if (index >= this.dataLength) throw new Error("Offset out of bounds"); + return load(this.dataStart + index); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: native): void { + if (index >= this.dataLength) throw new Error("Offset out of bounds"); + store(this.dataStart + index, value); + } + fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int8Array { return FILL(this, value, start, end); } @@ -92,6 +100,18 @@ export class Uint8Array extends ArrayBufferView { return this.byteLength; } + @operator("[]") // unchecked is built-in + private __get(index: i32): u8 { + if (index >= this.dataLength) throw new Error("Offset out of bounds"); + return load(this.dataStart + index); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: native): void { + if (index >= this.dataLength) throw new Error("Offset out of bounds"); + store(this.dataStart + index, value); + } + fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8Array { return FILL(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 @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + constructor(length: i32) { + super(length, alignof()); + } + + get buffer(): ArrayBuffer { + return this.data; + } + + get length(): i32 { + return this.byteLength; + } + + @operator("[]") // unchecked is built-in + private __get(index: i32): u8 { + if (index >= this.dataLength) throw new Error("Offset out of bounds"); + return load(this.dataStart + index); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: native): void { + if (index >= this.dataLength) throw new Error("Offset out of bounds"); + store(this.dataStart + index, ~(value >> 31) & (((255 - value) >> 31) | value)); + } + fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8ClampedArray { - return changetype(super.fill(value, start, end)); // safe because '.fill' reuses 'this' + return FILL(this, value, start, end); } sort(comparator: (a: u8, b: u8) => i32 = COMPARATOR()): Uint8ClampedArray { - return changetype(super.sort(comparator)); // safe because '.sort' reuses 'this' + return SORT(this, comparator); } subarray(begin: i32 = 0, end: i32 = 0x7fffffff): Uint8ClampedArray { @@ -218,6 +262,18 @@ export class Int16Array extends ArrayBufferView { return this.byteLength >>> alignof(); } + @operator("[]") // unchecked is built-in + private __get(index: i32): i16 { + if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + return load(this.dataStart + (index << alignof())); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: native): void { + if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + store(this.dataStart + (index << alignof()), value); + } + fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int16Array { return FILL(this, value, start, end); } @@ -287,6 +343,18 @@ export class Uint16Array extends ArrayBufferView { return this.byteLength >>> alignof(); } + @operator("[]") // unchecked is built-in + private __get(index: i32): u16 { + if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + return load(this.dataStart + (index << alignof())); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: native): void { + if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + store(this.dataStart + (index << alignof()), value); + } + fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint16Array { return FILL(this, value, start, end); } @@ -356,6 +424,18 @@ export class Int32Array extends ArrayBufferView { return this.byteLength >>> alignof(); } + @operator("[]") // unchecked is built-in + private __get(index: i32): i32 { + if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + return load(this.dataStart + (index << alignof())); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: i32): void { + if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + store(this.dataStart + (index << alignof()), value); + } + fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int32Array { return FILL(this, value, start, end); } @@ -425,6 +505,18 @@ export class Uint32Array extends ArrayBufferView { return this.byteLength >>> alignof(); } + @operator("[]") // unchecked is built-in + private __get(index: i32): u32 { + if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + return load(this.dataStart + (index << alignof())); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: u32): void { + if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + store(this.dataStart + (index << alignof()), value); + } + fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint32Array { return FILL(this, value, start, end); } @@ -494,6 +586,18 @@ export class Int64Array extends ArrayBufferView { return this.byteLength >>> alignof(); } + @operator("[]") // unchecked is built-in + private __get(index: i32): i64 { + if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + return load(this.dataStart + (index << alignof())); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: i64): void { + if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + store(this.dataStart + (index << alignof()), value); + } + fill(value: i64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int64Array { return FILL(this, value, start, end); } @@ -563,6 +667,18 @@ export class Uint64Array extends ArrayBufferView { return this.byteLength >>> alignof(); } + @operator("[]") // unchecked is built-in + private __get(index: i32): u64 { + if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + return load(this.dataStart + (index << alignof())); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: u64): void { + if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + store(this.dataStart + (index << alignof()), value); + } + fill(value: u64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint64Array { return FILL(this, value, start, end); } @@ -632,6 +748,18 @@ export class Float32Array extends ArrayBufferView { return this.byteLength >>> alignof(); } + @operator("[]") // unchecked is built-in + private __get(index: i32): f32 { + if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + return load(this.dataStart + (index << alignof())); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: f32): void { + if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + store(this.dataStart + (index << alignof()), value); + } + fill(value: f32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float32Array { return FILL(this, value, start, end); } @@ -701,6 +829,18 @@ export class Float64Array extends ArrayBufferView { return this.byteLength >>> alignof(); } + @operator("[]") // unchecked is built-in + private __get(index: i32): f64 { + if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + return load(this.dataStart + (index << alignof())); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: f64): void { + if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + store(this.dataStart + (index << alignof()), value); + } + fill(value: f64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float64Array { return FILL(this, value, start, end); } diff --git a/tests/compiler/nonNullAssertion.optimized.wat b/tests/compiler/nonNullAssertion.optimized.wat index 1d92c3f0d2..77e861e59d 100644 --- a/tests/compiler/nonNullAssertion.optimized.wat +++ b/tests/compiler/nonNullAssertion.optimized.wat @@ -1,8 +1,11 @@ (module (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$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) (elem (i32.const 0) $null) (global $~lib/argc (mut i32) (i32.const 0)) @@ -20,50 +23,55 @@ (export "testRet" (func $nonNullAssertion/testFn)) (export "testObjFn" (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 ) - (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 i32.load ) - (func $nonNullAssertion/testArr (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - i32.const -1 + (func $~lib/array/Array#__get (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load offset=8 - i32.lt_u - select + 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 i32.load ) - (func $nonNullAssertion/testAll (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testArr (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load offset=4 - i32.const -1 - i32.const 0 + call $~lib/array/Array#__get + ) + (func $nonNullAssertion/testAll (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.load ) - (func $nonNullAssertion/testFn (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testFn (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testObjFn (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testObjFn (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 i32.load offset=4 call_indirect (type $FUNCSIG$i) ) - (func $null (; 6 ;) (type $FUNCSIG$v) + (func $null (; 8 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/nonNullAssertion.untouched.wat b/tests/compiler/nonNullAssertion.untouched.wat index 38bc6d360d..a30d61ce19 100644 --- a/tests/compiler/nonNullAssertion.untouched.wat +++ b/tests/compiler/nonNullAssertion.untouched.wat @@ -1,12 +1,19 @@ (module (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$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) (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/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) (export "table" (table $0)) (export "testVar" (func $nonNullAssertion/testVar)) @@ -21,102 +28,92 @@ (export "testRet" (func $nonNullAssertion/testRet)) (export "testObjFn" (func $nonNullAssertion/testObjFn)) (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 ) - (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 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 i32.load ) - (func $nonNullAssertion/testArr (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/array/Array#__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 - local.tee $1 i32.load offset=4 - i32.const 0 + local.get $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 ) - (func $nonNullAssertion/testElem (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $nonNullAssertion/testArr (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - local.tee $1 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 + call $~lib/array/Array#__get + ) + (func $~lib/array/Array#__get (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 + local.get $0 i32.load offset=8 - i32.lt_u - select - i32.load - ) - (func $nonNullAssertion/testAll (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + 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.tee $1 i32.load offset=4 - i32.const 0 + local.get $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 $nonNullAssertion/testAll2 (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $nonNullAssertion/testElem (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - local.tee $1 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select + call $~lib/array/Array#__get + ) + (func $nonNullAssertion/testAll (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + call $~lib/array/Array#__get i32.load + ) + (func $nonNullAssertion/testAll2 (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + call $~lib/array/Array#__get i32.load ) - (func $nonNullAssertion/testFn (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testFn (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testFn2 (; 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.get $0 local.set $1 @@ -125,26 +122,26 @@ local.get $1 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 global.set $~lib/argc local.get $0 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 global.set $~lib/argc local.get $0 i32.load offset=4 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 global.set $~lib/argc local.get $0 i32.load offset=4 call_indirect (type $FUNCSIG$i) ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 15 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index d3be53d0d1..784af276fd 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -1,13 +1,15 @@ (module (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$v (func)) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01") - (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 56) "\01\00\00\00\08\00\00\00n\00u\00l\00l") + (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 48) "\01") + (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) (elem (i32.const 0) $null) (export "memory" (memory $0)) @@ -17,48 +19,50 @@ (export "stringArrayMethodCall" (func $std/array-access/stringArrayMethodCall)) (export "stringArrayArrayPropertyAccess" (func $std/array-access/stringArrayArrayPropertyAccess)) (export "stringArrayArrayMethodCall" (func $std/array-access/stringArrayArrayMethodCall)) - (func $std/array-access/i32ArrayArrayElementAccess (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - i32.const -1 - i32.const 0 + (func $~lib/array/Array>#__get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 i32.load offset=8 - i32.lt_u - select - i32.load - local.tee $0 + 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 - i32.const 4 + local.get $1 + i32.const 2 + i32.shl i32.add - i32.const -1 - i32.const 4 - local.get $0 - i32.load offset=8 - i32.lt_u - select 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 - i32.load offset=4 - i32.const -1 i32.const 0 + call $~lib/array/Array>#__get + i32.const 1 + call $~lib/array/Array>#__get + ) + (func $std/array-access/stringArrayPropertyAccess (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 0 + call $~lib/array/Array>#__get i32.const 8 i32.sub i32.load offset=4 i32.const 1 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 $4 i32) - i32.const 16 + i32.const 56 local.set $3 local.get $1 i32.const 1 @@ -97,7 +101,7 @@ end 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 $2 i32) (local $3 i32) @@ -105,13 +109,13 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 64 i32.const 161 i32.const 4 call $~lib/env/abort unreachable end - i32.const 12 + i32.const 52 i32.load i32.const 1 i32.shr_u @@ -144,69 +148,33 @@ call $~lib/util/string/compareImpl 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 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array>#__get 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 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - 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/array/Array>#__get + i32.const 1 + call $~lib/array/Array>#__get i32.const 8 i32.sub i32.load offset=4 i32.const 1 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 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - 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/array/Array>#__get + i32.const 1 + call $~lib/array/Array>#__get call $~lib/string/String#startsWith ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 9 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 500f9ca0af..27f875bb85 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -1,20 +1,22 @@ (module (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$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\00\00\00\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 56) "\01\00\00\00\08\00\00\00n\00u\00l\00l\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 48) "\01\00\00\00\00\00\00\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) (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/memory/HEAP_BASE i32 (i32.const 72)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 112)) (export "memory" (memory $0)) (export "table" (table $0)) (export "i32ArrayArrayElementAccess" (func $std/array-access/i32ArrayArrayElementAccess)) @@ -22,40 +24,83 @@ (export "stringArrayMethodCall" (func $std/array-access/stringArrayMethodCall)) (export "stringArrayArrayPropertyAccess" (func $std/array-access/stringArrayArrayPropertyAccess)) (export "stringArrayArrayMethodCall" (func $std/array-access/stringArrayArrayMethodCall)) - (func $std/array-access/i32ArrayArrayElementAccess (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/array/Array>#__get (; 1 ;) (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 - local.tee $1 i32.load offset=4 - i32.const 0 + local.get $1 i32.const 2 i32.shl - local.tee $2 i32.add - i32.const -1 - local.get $2 + i32.load + ) + (func $~lib/array/Array#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 + local.get $0 i32.load offset=8 - i32.lt_u - select - i32.load - local.tee $1 + 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 - i32.const 1 + local.get $1 i32.const 2 i32.shl - local.tee $2 i32.add - i32.const -1 - local.get $2 + 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>#__get + i32.const 1 + call $~lib/array/Array#__get + ) + (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 + local.get $0 i32.load offset=8 - i32.lt_u - select + 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 (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -63,27 +108,13 @@ i32.const 1 i32.shr_u ) - (func $std/array-access/stringArrayPropertyAccess (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $std/array-access/stringArrayPropertyAccess (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - local.tee $1 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get 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 $6 i32) (local $7 i32) @@ -136,7 +167,7 @@ end 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 $4 i32) (local $5 i32) @@ -149,7 +180,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 64 i32.const 161 i32.const 4 call $~lib/env/abort @@ -159,7 +190,7 @@ i32.const 0 i32.eq if - i32.const 64 + i32.const 104 local.set $1 end local.get $2 @@ -203,98 +234,55 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array-access/stringArrayMethodCall (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $std/array-access/stringArrayMethodCall (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - local.tee $1 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.const 16 + call $~lib/array/Array#__get + i32.const 56 i32.const 0 call $~lib/string/String#startsWith ) - (func $std/array-access/stringArrayArrayPropertyAccess (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - local.tee $1 - i32.load offset=4 - i32.const 0 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 + (func $~lib/array/Array>#__get (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 + local.get $0 i32.load offset=8 - i32.lt_u - select - i32.load - local.tee $1 + 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 - i32.const 1 + local.get $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 + ) + (func $std/array-access/stringArrayArrayPropertyAccess (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + call $~lib/array/Array>#__get + i32.const 1 + call $~lib/array/Array#__get call $~lib/string/String#get:length ) - (func $std/array-access/stringArrayArrayMethodCall (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $std/array-access/stringArrayArrayMethodCall (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - local.tee $1 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load - local.tee $1 - i32.load offset=4 + call $~lib/array/Array>#__get i32.const 1 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.const 16 + call $~lib/array/Array#__get + i32.const 56 i32.const 0 call $~lib/string/String#startsWith ) - (func $null (; 9 ;) (type $FUNCSIG$v) + (func $null (; 13 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 10b41a31fe..e5b3bd8efd 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -12,16 +12,16 @@ (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 48) "\03\00\00\00(\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") - (data (i32.const 96) "\01\00\00\00\0c\00\00\00\00\00\00\00\01\00\00\00\02") - (data (i32.const 120) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00\0c\00\00\00\03") - (data (i32.const 144) "\01") - (data (i32.const 152) "\04\00\00\00\10\00\00\00\98\00\00\00\98") - (data (i32.const 176) "\03\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 216) "\03\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 264) "\03\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (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 136) "\01\00\00\00\0c\00\00\00\00\00\00\00\01\00\00\00\02") + (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 184) "\01") + (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\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\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) (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 $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) @@ -32,7 +32,49 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#__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#__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 $2 i32) (local $3 i32) @@ -94,7 +136,7 @@ global.set $~lib/allocator/arena/offset 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) i32.const 1 i32.const 32 @@ -115,7 +157,7 @@ i32.const 8 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) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -326,13 +368,13 @@ 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 - i32.const 300 + i32.const 304 i32.le_u if i32.const 0 - i32.const 184 + i32.const 224 i32.const 191 i32.const 2 call $~lib/env/abort @@ -346,14 +388,14 @@ i32.ne if i32.const 0 - i32.const 184 + i32.const 224 i32.const 192 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doRegister (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -363,14 +405,14 @@ i32.store 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.get $0 i32.const 1073741816 i32.gt_u if i32.const 0 - i32.const 224 + i32.const 264 i32.const 24 i32.const 43 call $~lib/env/abort @@ -385,7 +427,7 @@ i32.const 1 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) i32.const 3 i32.const 1073741816 @@ -394,7 +436,7 @@ i32.gt_u if i32.const 0 - i32.const 184 + i32.const 224 i32.const 226 i32.const 57 call $~lib/env/abort @@ -435,7 +477,7 @@ i32.store offset=8 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 $4 i32) (local $5 i32) @@ -1332,7 +1374,7 @@ i32.store8 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 $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1526,7 +1568,7 @@ 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 $3 i32) (local $4 i32) @@ -1550,7 +1592,7 @@ i32.shl i32.const 0 local.get $0 - i32.const 300 + i32.const 304 i32.gt_u select i32.const 1 @@ -1590,11 +1632,11 @@ i32.eq if local.get $0 - i32.const 300 + i32.const 304 i32.le_u if i32.const 0 - i32.const 184 + i32.const 224 i32.const 100 i32.const 8 call $~lib/env/abort @@ -1620,15 +1662,11 @@ i32.store offset=4 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.get $1 local.get $0 - i32.load - local.tee $3 - i32.const 8 - i32.sub - i32.load offset=4 + i32.load offset=8 local.get $2 i32.shr_u i32.gt_u @@ -1640,20 +1678,23 @@ i32.gt_u if i32.const 0 - i32.const 272 - i32.const 12 + i32.const 104 + i32.const 10 i32.const 64 call $~lib/env/abort unreachable end - local.get $3 - local.get $3 + local.get $0 + i32.load + local.tee $3 local.get $1 local.get $2 i32.shl local.tee $2 call $~lib/runtime/doReallocate - local.tee $1 + local.set $1 + local.get $1 + local.get $3 i32.ne if local.get $0 @@ -1668,7 +1709,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 @@ -1693,7 +1734,7 @@ i32.store offset=12 end ) - (func $~lib/array/Array#__set (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 @@ -1720,19 +1761,19 @@ i32.store offset=12 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 call $~lib/runtime/doAllocate i32.const 6 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 call $~lib/runtime/doAllocate i32.const 8 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) i32.const 44 i32.load @@ -1746,15 +1787,9 @@ call $~lib/env/abort unreachable end - i32.const 36 - i32.load - i32.const -1 + i32.const 32 i32.const 0 - i32.const 40 - i32.load - i32.lt_u - select - i32.load8_s + call $~lib/array/Array#__get if i32.const 0 i32.const 56 @@ -1763,17 +1798,9 @@ call $~lib/env/abort unreachable end - i32.const 36 - i32.load - i32.const 1 - i32.add - i32.const -1 + i32.const 32 i32.const 1 - i32.const 40 - i32.load - i32.lt_u - select - i32.load8_s + call $~lib/array/Array#__get i32.const 1 i32.ne if @@ -1784,17 +1811,9 @@ call $~lib/env/abort unreachable end - i32.const 36 - i32.load + i32.const 32 i32.const 2 - i32.add - i32.const -1 - i32.const 2 - i32.const 40 - i32.load - i32.lt_u - select - i32.load8_s + call $~lib/array/Array#__get i32.const 2 i32.ne if @@ -1805,7 +1824,7 @@ call $~lib/env/abort unreachable end - i32.const 140 + i32.const 180 i32.load i32.const 3 i32.ne @@ -1817,15 +1836,9 @@ call $~lib/env/abort unreachable end - i32.const 132 - i32.load - i32.const -1 + i32.const 168 i32.const 0 - i32.const 136 - i32.load - i32.lt_u - select - i32.load + call $~lib/array/Array#__get if i32.const 0 i32.const 56 @@ -1834,17 +1847,9 @@ call $~lib/env/abort unreachable end - i32.const 132 - i32.load - i32.const 4 - i32.add - i32.const -1 - i32.const 4 - i32.const 136 - i32.load - i32.lt_u - select - i32.load + i32.const 168 + i32.const 1 + call $~lib/array/Array#__get i32.const 1 i32.ne if @@ -1855,17 +1860,9 @@ call $~lib/env/abort unreachable end - i32.const 132 - i32.load - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - i32.const 136 - i32.load - i32.lt_u - select - i32.load + i32.const 168 + i32.const 2 + call $~lib/array/Array#__get i32.const 2 i32.ne if @@ -1937,15 +1934,8 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/array/Array#__get if i32.const 0 i32.const 56 @@ -1955,17 +1945,8 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 - local.tee $0 - i32.load offset=4 i32.const 1 - i32.add - i32.const -1 - i32.const 1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/array/Array#__get i32.const 1 i32.ne if @@ -1977,17 +1958,8 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 - local.tee $0 - i32.load offset=4 i32.const 2 - i32.add - i32.const -1 - i32.const 2 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/array/Array#__get i32.const 2 i32.ne if @@ -2047,15 +2019,8 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get if i32.const 0 i32.const 56 @@ -2065,17 +2030,8 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 - 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 1 + call $~lib/array/Array#__get i32.const 1 i32.ne if @@ -2087,17 +2043,8 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/array/Array#__get i32.const 2 i32.ne if @@ -2185,10 +2132,10 @@ unreachable end ) - (func $start (; 17 ;) (type $FUNCSIG$v) + (func $start (; 19 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 18 ;) (type $FUNCSIG$v) + (func $null (; 20 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 18b10bde4b..dcba2a8f16 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -11,21 +11,21 @@ (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 48) "\03\00\00\00(\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") - (data (i32.const 96) "\01\00\00\00\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 120) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00\0c\00\00\00\03\00\00\00") - (data (i32.const 144) "\01\00\00\00\00\00\00\00") - (data (i32.const 152) "\04\00\00\00\10\00\00\00\98\00\00\00\98\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 176) "\03\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 216) "\03\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 264) "\03\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (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 136) "\01\00\00\00\0c\00\00\00\00\00\00\00\01\00\00\00\02\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 184) "\01\00\00\00\00\00\00\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\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\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) (elem (i32.const 0) $null) (global $std/array-literal/staticArrayI8 i32 (i32.const 32)) (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 $std/array-literal/staticArrayI32 i32 (i32.const 128)) - (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 160)) + (global $std/array-literal/staticArrayI32 i32 (i32.const 168)) + (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 200)) (global $std/array-literal/i (mut i32) (i32.const 0)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (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/dynamicArrayRef (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 "table" (table $0)) (start $start) @@ -43,11 +43,57 @@ local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#get:length (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#__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#get:length (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/runtime/ADJUSTOBLOCK (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#__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 32 local.get $0 @@ -59,7 +105,7 @@ i32.sub 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 $2 i32) (local $3 i32) @@ -144,7 +190,7 @@ end 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.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -160,7 +206,7 @@ global.get $~lib/runtime/HEADER_SIZE 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 $4 i32) (local $5 i64) @@ -416,14 +462,14 @@ 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 global.get $~lib/memory/HEAP_BASE i32.gt_u i32.eqz if i32.const 0 - i32.const 184 + i32.const 224 i32.const 191 i32.const 2 call $~lib/env/abort @@ -438,14 +484,14 @@ i32.eqz if i32.const 0 - i32.const 184 + i32.const 224 i32.const 192 i32.const 2 call $~lib/env/abort unreachable 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 call $~lib/runtime/assertUnregistered local.get $0 @@ -455,7 +501,7 @@ i32.store 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 $3 i32) local.get $1 @@ -463,7 +509,7 @@ i32.gt_u if i32.const 0 - i32.const 224 + i32.const 264 i32.const 24 i32.const 43 call $~lib/env/abort @@ -488,11 +534,11 @@ call $~lib/runtime/doRegister 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 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 $4 i32) local.get $1 @@ -502,7 +548,7 @@ i32.gt_u if i32.const 0 - i32.const 184 + i32.const 224 i32.const 226 i32.const 57 call $~lib/env/abort @@ -550,7 +596,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -575,13 +621,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - i32.load offset=4 - ) - (func $~lib/util/memory/memcpy (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1782,7 +1822,7 @@ i32.store8 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) block $~lib/util/memory/memmove|inlined.0 local.get $0 @@ -2011,12 +2051,12 @@ 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.get $0 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 $3 i32) (local $4 i32) @@ -2080,7 +2120,7 @@ i32.eqz if i32.const 0 - i32.const 184 + i32.const 224 i32.const 100 i32.const 8 call $~lib/env/abort @@ -2113,22 +2153,16 @@ i32.store offset=4 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 $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) + local.get $1 local.get $0 - i32.load - local.set $3 - local.get $3 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.load offset=8 local.get $2 i32.shr_u - local.set $4 - local.get $1 - local.get $4 i32.gt_u if local.get $1 @@ -2138,43 +2172,46 @@ i32.gt_u if i32.const 0 - i32.const 272 - i32.const 12 + i32.const 104 + i32.const 10 i32.const 64 call $~lib/env/abort unreachable end + local.get $0 + i32.load + local.set $3 local.get $1 local.get $2 i32.shl - local.set $5 + local.set $4 block $~lib/runtime/REALLOCATE|inlined.0 (result i32) local.get $3 + local.set $5 + local.get $4 local.set $6 local.get $5 - local.set $7 local.get $6 - local.get $7 call $~lib/runtime/doReallocate end - local.set $7 - local.get $7 + local.set $6 + local.get $6 local.get $3 i32.ne if local.get $0 - local.get $7 + local.get $6 i32.store local.get $0 - local.get $7 + local.get $6 i32.store offset=4 end local.get $0 - local.get $5 + local.get $4 i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 @@ -2201,7 +2238,7 @@ i32.store offset=12 end ) - (func $~lib/array/Array#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -2226,7 +2263,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#__set (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 @@ -2253,7 +2290,7 @@ i32.store offset=12 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.get $0 i32.eqz @@ -2270,7 +2307,7 @@ end local.get $0 ) - (func $~lib/array/Array#constructor (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -2295,7 +2332,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#__set (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 @@ -2322,11 +2359,11 @@ i32.store offset=12 end ) - (func $~lib/array/Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 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.get $0 i32.eqz @@ -2343,7 +2380,7 @@ end local.get $0 ) - (func $~lib/array/Array#constructor (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -2368,7 +2405,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#__set (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 @@ -2395,17 +2432,15 @@ i32.store offset=12 end ) - (func $~lib/array/Array#get:length (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 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 $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/array-literal/staticArrayI8 call $~lib/array/Array#get:length i32.const 3 @@ -2420,18 +2455,8 @@ unreachable end global.get $std/array-literal/staticArrayI8 - local.tee $0 - i32.load offset=4 i32.const 0 - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/array/Array#__get i32.const 0 i32.eq i32.eqz @@ -2444,18 +2469,8 @@ unreachable end global.get $std/array-literal/staticArrayI8 - local.tee $0 - i32.load offset=4 i32.const 1 - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/array/Array#__get i32.const 1 i32.eq i32.eqz @@ -2468,18 +2483,8 @@ unreachable end global.get $std/array-literal/staticArrayI8 - local.tee $0 - i32.load offset=4 i32.const 2 - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/array/Array#__get i32.const 2 i32.eq i32.eqz @@ -2505,20 +2510,8 @@ unreachable end global.get $std/array-literal/staticArrayI32 - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 0 i32.eq i32.eqz @@ -2531,20 +2524,8 @@ unreachable end global.get $std/array-literal/staticArrayI32 - local.tee $0 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 1 i32.eq i32.eqz @@ -2557,20 +2538,8 @@ unreachable end global.get $std/array-literal/staticArrayI32 - local.tee $0 - i32.load offset=4 i32.const 2 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 2 i32.eq i32.eqz @@ -2609,12 +2578,12 @@ i32.const 0 i32.const 3 call $~lib/array/Array#constructor - local.set $2 - local.get $2 + local.set $0 + local.get $0 i32.const 0 global.get $std/array-literal/i call $~lib/array/Array#__set - local.get $2 + local.get $0 i32.const 1 block (result i32) global.get $std/array-literal/i @@ -2624,7 +2593,7 @@ global.get $std/array-literal/i end call $~lib/array/Array#__set - local.get $2 + local.get $0 i32.const 2 block (result i32) global.get $std/array-literal/i @@ -2634,7 +2603,7 @@ global.get $std/array-literal/i end call $~lib/array/Array#__set - local.get $2 + local.get $0 end global.set $std/array-literal/dynamicArrayI8 global.get $std/array-literal/dynamicArrayI8 @@ -2651,18 +2620,8 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 - local.tee $2 - i32.load offset=4 i32.const 0 - local.tee $0 - i32.add - i32.const -1 - local.get $0 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/array/Array#__get i32.const 0 i32.eq i32.eqz @@ -2675,18 +2634,8 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 - local.tee $2 - i32.load offset=4 i32.const 1 - local.tee $0 - i32.add - i32.const -1 - local.get $0 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/array/Array#__get i32.const 1 i32.eq i32.eqz @@ -2699,18 +2648,8 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 - local.tee $2 - i32.load offset=4 i32.const 2 - local.tee $0 - i32.add - i32.const -1 - local.get $0 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/array/Array#__get i32.const 2 i32.eq i32.eqz @@ -2728,12 +2667,12 @@ i32.const 0 i32.const 3 call $~lib/array/Array#constructor - local.set $3 - local.get $3 + local.set $1 + local.get $1 i32.const 0 global.get $std/array-literal/i call $~lib/array/Array#__set - local.get $3 + local.get $1 i32.const 1 block (result i32) global.get $std/array-literal/i @@ -2743,7 +2682,7 @@ global.get $std/array-literal/i end call $~lib/array/Array#__set - local.get $3 + local.get $1 i32.const 2 block (result i32) global.get $std/array-literal/i @@ -2753,7 +2692,7 @@ global.get $std/array-literal/i end call $~lib/array/Array#__set - local.get $3 + local.get $1 end global.set $std/array-literal/dynamicArrayI32 global.get $std/array-literal/dynamicArrayI32 @@ -2770,20 +2709,8 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 - local.tee $3 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 0 i32.eq i32.eqz @@ -2796,20 +2723,8 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 - local.tee $3 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 1 i32.eq i32.eqz @@ -2822,20 +2737,8 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 - local.tee $3 - i32.load offset=4 i32.const 2 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 2 i32.eq i32.eqz @@ -2851,23 +2754,23 @@ i32.const 0 i32.const 3 call $~lib/array/Array#constructor - local.set $4 - local.get $4 + local.set $2 + local.get $2 i32.const 0 i32.const 0 call $std/array-literal/Ref#constructor call $~lib/array/Array#__set - local.get $4 + local.get $2 i32.const 1 i32.const 0 call $std/array-literal/Ref#constructor call $~lib/array/Array#__set - local.get $4 + local.get $2 i32.const 2 i32.const 0 call $std/array-literal/Ref#constructor call $~lib/array/Array#__set - local.get $4 + local.get $2 end global.set $std/array-literal/dynamicArrayRef global.get $std/array-literal/dynamicArrayRef @@ -2887,23 +2790,23 @@ i32.const 0 i32.const 3 call $~lib/array/Array#constructor - local.set $5 - local.get $5 + local.set $3 + local.get $3 i32.const 0 i32.const 0 call $std/array-literal/RefWithCtor#constructor call $~lib/array/Array#__set - local.get $5 + local.get $3 i32.const 1 i32.const 0 call $std/array-literal/RefWithCtor#constructor call $~lib/array/Array#__set - local.get $5 + local.get $3 i32.const 2 i32.const 0 call $std/array-literal/RefWithCtor#constructor call $~lib/array/Array#__set - local.get $5 + local.get $3 end global.set $std/array-literal/dynamicArrayRefWithCtor global.get $std/array-literal/dynamicArrayRefWithCtor @@ -2920,9 +2823,9 @@ unreachable end ) - (func $start (; 31 ;) (type $FUNCSIG$v) + (func $start (; 32 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 32 ;) (type $FUNCSIG$v) + (func $null (; 33 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index da02a44deb..7a6281cd22 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -8,10 +8,12 @@ (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) + (type $FUNCSIG$fii (func (param i32 i32) (result f32))) (type $FUNCSIG$d (func (result f64))) (type $FUNCSIG$vj (func (param i64))) (type $FUNCSIG$iff (func (param f32 f32) (result i32))) (type $FUNCSIG$idd (func (param f64 f64) (result i32))) + (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) (type $FUNCSIG$iijijiji (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) @@ -31,18 +33,18 @@ (data (i32.const 144) "\02\00\00\00\05\00\00\00\01\02\03\04\05") (data (i32.const 160) "\07\00\00\00\10\00\00\00\98\00\00\00\98\00\00\00\05\00\00\00\05") (data (i32.const 184) "\02\00\00\00\05\00\00\00\01\01\01\04\05") - (data (i32.const 200) "\02\00\00\00\05") - (data (i32.const 216) "\02\00\00\00\05\00\00\00\01\01") - (data (i32.const 232) "\02\00\00\00\05\00\00\00\01\01\00\02\02") - (data (i32.const 248) "\02\00\00\00\05\00\00\00\01\01\00\02\02") - (data (i32.const 264) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 296) "\08\00\00\00\10\00\00\00\10\01\00\00\10\01\00\00\14\00\00\00\05") - (data (i32.const 320) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") - (data (i32.const 352) "\02\00\00\00\14") - (data (i32.const 384) "\02\00\00\00\14\00\00\00\01\00\00\00\01") - (data (i32.const 416) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 448) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 480) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 200) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 240) "\02\00\00\00\05") + (data (i32.const 256) "\02\00\00\00\05\00\00\00\01\01") + (data (i32.const 272) "\02\00\00\00\05\00\00\00\01\01\00\02\02") + (data (i32.const 288) "\02\00\00\00\05\00\00\00\01\01\00\02\02") + (data (i32.const 304) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 336) "\08\00\00\00\10\00\00\008\01\00\008\01\00\00\14\00\00\00\05") + (data (i32.const 360) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") + (data (i32.const 392) "\02\00\00\00\14") + (data (i32.const 424) "\02\00\00\00\14\00\00\00\01\00\00\00\01") + (data (i32.const 456) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") + (data (i32.const 488) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") (data (i32.const 520) "\02") (data (i32.const 528) "\02") (data (i32.const 536) "\04\00\00\00\10\00\00\00\18\02\00\00\18\02") @@ -226,7 +228,7 @@ (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/Null (mut i32) (i32.const 0)) (global $std/array/arr8 (mut i32) (i32.const 168)) - (global $std/array/arr32 (mut i32) (i32.const 304)) + (global $std/array/arr32 (mut i32) (i32.const 344)) (global $std/array/i (mut i32) (i32.const 0)) (global $std/array/other (mut i32) (i32.const 0)) (global $std/array/out (mut i32) (i32.const 0)) @@ -1904,7 +1906,26 @@ call $~lib/memory/memory.copy local.get $3 ) - (func $std/array/isArraysEqual (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 14 ;) (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 208 + 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_u + ) + (func $std/array/isArraysEqual (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -1930,27 +1951,11 @@ i32.lt_s if local.get $0 - i32.load offset=4 - local.get $2 - i32.add - i32.const -1 local.get $2 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/array/Array#__get local.get $1 - i32.load offset=4 - local.get $2 - i32.add - i32.const -1 local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/array/Array#__get i32.ne if i32.const 0 @@ -1967,7 +1972,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 15 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/array/Array#fill (; 16 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) local.get $0 @@ -2040,9 +2045,31 @@ end end ) - (func $std/array/isArraysEqual (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#__get (; 17 ;) (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 208 + 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/isArraysEqual (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $2 i32.eqz if @@ -2069,31 +2096,12 @@ local.get $2 i32.lt_s if - local.get $3 - i32.const 2 - i32.shl - local.tee $4 - local.get $0 - i32.load offset=4 - i32.add - i32.const -1 - local.get $4 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - local.get $1 - i32.load offset=4 - local.get $4 - i32.add - i32.const -1 - local.get $4 + local.get $3 + call $~lib/array/Array#__get local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + local.get $3 + call $~lib/array/Array#__get i32.ne if i32.const 0 @@ -2110,7 +2118,7 @@ end i32.const 1 ) - (func $~lib/runtime/doReallocate (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doReallocate (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2206,16 +2214,12 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureCapacity (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 local.get $0 - i32.load - local.tee $2 - i32.const 8 - i32.sub - i32.load offset=4 + i32.load offset=8 i32.const 2 i32.shr_u i32.gt_u @@ -2225,20 +2229,22 @@ i32.gt_u if i32.const 0 - i32.const 488 - i32.const 12 + i32.const 208 + i32.const 10 i32.const 64 call $~lib/env/abort unreachable end - local.get $2 - local.get $2 + local.get $0 + i32.load + local.tee $2 local.get $1 i32.const 2 i32.shl local.tee $3 call $~lib/runtime/doReallocate local.tee $1 + local.get $2 i32.ne if local.get $0 @@ -2253,7 +2259,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $0 @@ -2276,7 +2282,7 @@ local.get $1 i32.store ) - (func $~lib/array/Array#pop (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2286,8 +2292,8 @@ i32.lt_s if i32.const 0 - i32.const 488 - i32.const 185 + i32.const 208 + i32.const 195 i32.const 20 call $~lib/env/abort unreachable @@ -2308,7 +2314,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#concat (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2345,7 +2351,7 @@ call $~lib/memory/memory.copy local.get $4 ) - (func $~lib/array/Array#copyWithin (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 24 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2512,7 +2518,7 @@ end local.get $0 ) - (func $~lib/array/Array#unshift (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#unshift (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2541,7 +2547,7 @@ local.get $2 i32.store offset=12 ) - (func $~lib/array/Array#shift (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2553,8 +2559,8 @@ i32.lt_s if i32.const 0 - i32.const 488 - i32.const 243 + i32.const 208 + i32.const 253 i32.const 20 call $~lib/env/abort unreachable @@ -2586,7 +2592,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#reverse (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#reverse (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2633,7 +2639,7 @@ end end ) - (func $~lib/array/Array#indexOf (; 26 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2697,7 +2703,7 @@ end i32.const -1 ) - (func $~lib/array/Array#includes (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 local.get $2 @@ -2705,7 +2711,7 @@ i32.const 0 i32.ge_s ) - (func $~lib/array/Array#splice (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2827,11 +2833,37 @@ i32.store offset=12 local.get $7 ) - (func $start:std/array~anonymous|0 (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#__set (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + call $~lib/array/ensureCapacity + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $start:std/array~anonymous|0 (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $~lib/array/Array#findIndex (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2879,17 +2911,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -2897,7 +2929,7 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -2905,12 +2937,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2958,12 +2990,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -2971,12 +3003,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -2984,12 +3016,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3037,12 +3069,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3050,12 +3082,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3063,13 +3095,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 47 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 48 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 51 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3112,7 +3144,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3121,7 +3153,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -3130,7 +3162,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.eqz @@ -3227,11 +3259,11 @@ end end ) - (func $start:std/array~anonymous|21 (; 52 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 55 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#map (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#map (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3298,7 +3330,30 @@ end local.get $3 ) - (func $start:std/array~anonymous|22 (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#__get (; 57 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + 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 208 + 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 + f32.load + ) + (func $start:std/array~anonymous|22 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3308,7 +3363,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#map (; 59 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3360,14 +3415,14 @@ end end ) - (func $start:std/array~anonymous|23 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3377,12 +3432,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 63 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3435,7 +3490,7 @@ end local.get $4 ) - (func $start:std/array~anonymous|26 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3447,7 +3502,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -3456,7 +3511,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3468,12 +3523,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 63 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 67 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3517,7 +3572,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|31 (; 65 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 69 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.eqz if @@ -3528,7 +3583,7 @@ end local.get $0 ) - (func $start:std/array~anonymous|32 (; 66 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 70 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.eqz if @@ -3539,7 +3594,7 @@ end local.get $0 ) - (func $start:std/array~anonymous|33 (; 67 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -3547,7 +3602,7 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 72 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -3555,7 +3610,7 @@ local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 73 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3592,7 +3647,7 @@ end local.get $2 ) - (func $~lib/math/splitMix32 (; 70 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 74 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -3624,7 +3679,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 71 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 75 ;) (type $FUNCSIG$vj) (param $0 i64) (local $1 i64) local.get $0 i64.eqz @@ -3689,7 +3744,7 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/util/sort/insertionSort (; 72 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -3771,7 +3826,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 73 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4027,7 +4082,7 @@ local.get $6 f32.store ) - (func $~lib/array/Array#sort (; 74 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 78 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f32) (local $4 f32) @@ -4035,8 +4090,8 @@ i32.eqz if i32.const 0 - i32.const 488 - i32.const 347 + i32.const 208 + i32.const 357 i32.const 4 call $~lib/env/abort unreachable @@ -4095,7 +4150,7 @@ call $~lib/util/sort/weakHeapSort end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 75 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 79 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4124,14 +4179,13 @@ i32.lt_s i32.sub ) - (func $std/array/isArraysEqual (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 80 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 f32) - (local $5 i32) + (local $3 f32) + (local $4 i32) local.get $0 i32.load offset=12 - local.tee $5 + local.tee $4 local.get $1 i32.load offset=12 i32.ne @@ -4147,84 +4201,46 @@ return end loop $repeat|0 - local.get $3 - local.get $5 + local.get $2 + local.get $4 i32.lt_s if - local.get $3 - i32.const 2 - i32.shl - local.tee $2 local.get $0 - i32.load offset=4 - i32.add - i32.const -1 local.get $2 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f32.load - local.tee $4 - local.get $4 + call $~lib/array/Array#__get + local.tee $3 + local.get $3 f32.ne local.get $1 - i32.load offset=4 - local.get $2 - i32.add - i32.const -1 local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - f32.load - local.tee $4 - local.get $4 + call $~lib/array/Array#__get + local.tee $3 + local.get $3 f32.ne i32.ne if - local.get $3 - i32.const 2 - i32.shl - local.tee $2 local.get $0 - i32.load offset=4 - i32.add - i32.const -1 local.get $2 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f32.load + call $~lib/array/Array#__get local.get $1 - i32.load offset=4 local.get $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - f32.load + call $~lib/array/Array#__get f32.ne if i32.const 0 return end end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 end end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 81 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) @@ -4306,7 +4322,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 82 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4562,7 +4578,7 @@ local.get $6 f64.store ) - (func $~lib/array/Array#sort (; 79 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 83 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 f64) @@ -4570,8 +4586,8 @@ i32.eqz if i32.const 0 - i32.const 488 - i32.const 347 + i32.const 208 + i32.const 357 i32.const 4 call $~lib/env/abort unreachable @@ -4630,7 +4646,7 @@ call $~lib/util/sort/weakHeapSort end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 80 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 84 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -4659,14 +4675,36 @@ i64.lt_s i32.sub ) - (func $std/array/isArraysEqual (; 81 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 85 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 208 + i32.const 68 + i32.const 61 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + ) + (func $std/array/isArraysEqual (; 86 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 f64) - (local $5 i32) + (local $3 f64) + (local $4 i32) local.get $0 i32.load offset=12 - local.tee $5 + local.tee $4 local.get $1 i32.load offset=12 i32.ne @@ -4682,84 +4720,46 @@ return end loop $repeat|0 - local.get $3 - local.get $5 + local.get $2 + local.get $4 i32.lt_s if - local.get $3 - i32.const 3 - i32.shl - local.tee $2 local.get $0 - i32.load offset=4 - i32.add - i32.const -1 local.get $2 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load - local.tee $4 - local.get $4 + call $~lib/array/Array#__get + local.tee $3 + local.get $3 f64.ne local.get $1 - i32.load offset=4 local.get $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - f64.load - local.tee $4 - local.get $4 + call $~lib/array/Array#__get + local.tee $3 + local.get $3 f64.ne i32.ne if - local.get $3 - i32.const 3 - i32.shl - local.tee $2 local.get $0 - i32.load offset=4 - i32.add - i32.const -1 local.get $2 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/array/Array#__get local.get $1 - i32.load offset=4 - local.get $2 - i32.add - i32.const -1 local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/array/Array#__get f64.ne if i32.const 0 return end end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 end end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 82 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 87 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4841,7 +4841,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 83 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 88 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5097,7 +5097,7 @@ local.get $1 i32.store ) - (func $~lib/array/Array#sort (; 84 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 89 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5105,8 +5105,8 @@ i32.eqz if i32.const 0 - i32.const 488 - i32.const 347 + i32.const 208 + i32.const 357 i32.const 4 call $~lib/env/abort unreachable @@ -5170,12 +5170,12 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 85 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 90 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 86 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 91 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -5184,7 +5184,7 @@ i32.lt_u i32.sub ) - (func $std/array/createReverseOrderedArray (; 87 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/array/Array#constructor @@ -5198,18 +5198,14 @@ i32.lt_s if local.get $1 - i32.load offset=4 local.get $0 - i32.const 2 - i32.shl - i32.add local.get $1 i32.load offset=12 i32.const 1 i32.sub local.get $0 i32.sub - i32.store + call $~lib/array/Array#__set local.get $0 i32.const 1 i32.add @@ -5219,7 +5215,7 @@ end local.get $1 ) - (func $~lib/math/NativeMath.random (; 88 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 93 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) global.get $~lib/math/random_seeded @@ -5266,7 +5262,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 89 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/array/Array#constructor @@ -5278,18 +5274,14 @@ i32.lt_s if local.get $0 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - i32.add call $~lib/math/NativeMath.random local.get $0 i32.load offset=12 f64.convert_i32_s f64.mul i32.trunc_f64_s - i32.store + call $~lib/array/Array#__set local.get $1 i32.const 1 i32.add @@ -5299,52 +5291,29 @@ end local.get $0 ) - (func $std/array/isSorted (; 90 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 95 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) i32.const 1 local.set $2 local.get $0 i32.load offset=12 - local.set $4 + local.set $3 loop $repeat|0 local.get $2 - local.get $4 + local.get $3 i32.lt_s if i32.const 2 global.set $~lib/argc + local.get $0 local.get $2 i32.const 1 i32.sub - i32.const 2 - i32.shl - local.tee $3 - local.get $0 - i32.load offset=4 - i32.add - i32.const -1 - local.get $3 + call $~lib/array/Array#__get local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load local.get $2 - i32.const 2 - i32.shl - local.tee $3 - local.get $0 - i32.load offset=4 - i32.add - i32.const -1 - local.get $3 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get local.get $1 call_indirect (type $FUNCSIG$iii) i32.const 0 @@ -5364,7 +5333,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 91 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 96 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -5380,17 +5349,17 @@ unreachable end ) - (func $std/array/assertSortedDefault (; 92 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 97 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 48 call $std/array/assertSorted ) - (func $start:std/array~anonymous|44 (; 93 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array>#constructor (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#constructor (; 99 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 16 call $~lib/runtime/doAllocate @@ -5407,34 +5376,9 @@ i32.store offset=12 local.get $1 ) - (func $~lib/runtime/assertRegistered (; 95 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.const 8 - i32.sub - i32.load - i32.const -1520547049 - i32.eq - if - i32.const 0 - i32.const 16 - i32.const 199 - i32.const 2 - call $~lib/env/abort - unreachable - end - ) - (func $~lib/runtime/doLink (; 96 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - call $~lib/runtime/assertRegistered - local.get $1 - call $~lib/runtime/assertRegistered - ) - (func $std/array/createReverseOrderedNestedArray (; 97 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 100 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) i32.const 512 call $~lib/array/Array>#constructor local.set $0 @@ -5444,42 +5388,22 @@ i32.load offset=12 i32.lt_s if - local.get $1 - i32.const 2 - i32.shl - local.tee $3 local.get $0 - i32.load offset=4 - i32.add - local.set $4 + local.get $1 i32.const 1 call $~lib/array/Array#constructor - local.tee $2 - local.get $0 - call $~lib/runtime/doLink - local.get $4 - local.get $2 - i32.store - local.get $3 - local.tee $2 - local.get $0 - i32.load offset=4 - i32.add - i32.const -1 - local.get $2 + call $~lib/array/Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.load offset=4 + local.get $1 + call $~lib/array/Array#__get + i32.const 0 local.get $0 i32.load offset=12 i32.const 1 i32.sub local.get $1 i32.sub - i32.store + call $~lib/array/Array#__set local.get $1 i32.const 1 i32.add @@ -5489,28 +5413,16 @@ end local.get $0 ) - (func $start:std/array~anonymous|47 (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 101 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get local.get $1 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.sub ) - (func $~lib/array/Array>#sort (; 99 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 102 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5518,8 +5430,8 @@ i32.eqz if i32.const 0 - i32.const 488 - i32.const 347 + i32.const 208 + i32.const 357 i32.const 4 call $~lib/env/abort unreachable @@ -5571,7 +5483,7 @@ call $~lib/util/sort/insertionSort local.get $0 ) - (func $std/array/assertSorted> (; 100 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 103 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -5587,12 +5499,11 @@ unreachable end ) - (func $std/array/createReverseOrderedElementsArray (; 101 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 104 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) i32.const 16 call $~lib/runtime/doAllocate i32.const 12 @@ -5612,33 +5523,24 @@ i32.load offset=12 i32.lt_s if - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.set $3 local.get $0 i32.load offset=12 i32.const 1 i32.sub local.get $1 i32.sub - local.set $4 + local.set $2 i32.const 4 call $~lib/runtime/doAllocate i32.const 13 call $~lib/runtime/doRegister - local.tee $2 - local.get $4 - i32.store + local.tee $3 local.get $2 + i32.store local.get $0 - call $~lib/runtime/doLink + local.get $1 local.get $3 - local.get $2 - i32.store + call $~lib/array/Array#__set local.get $1 i32.const 1 i32.add @@ -5648,14 +5550,14 @@ end local.get $0 ) - (func $start:std/array~anonymous|48 (; 102 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 105 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/util/string/compareImpl (; 103 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 106 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 @@ -5688,7 +5590,7 @@ end local.get $3 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 104 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 107 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5765,7 +5667,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted|trampoline (; 105 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSorted|trampoline (; 108 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) block $1of1 block $0of1 @@ -5784,7 +5686,7 @@ local.get $1 call $std/array/assertSorted> ) - (func $~lib/string/String.__eq (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -5830,13 +5732,12 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array/isArraysEqual (; 107 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 110 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load offset=12 - local.tee $4 + local.tee $3 local.get $1 i32.load offset=12 i32.ne @@ -5853,34 +5754,15 @@ end loop $repeat|0 local.get $2 - local.get $4 + local.get $3 i32.lt_s if - local.get $2 - i32.const 2 - i32.shl - local.tee $3 - local.get $0 - i32.load offset=4 - i32.add - i32.const -1 - local.get $3 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - local.get $1 - i32.load offset=4 - local.get $3 - i32.add - i32.const -1 - local.get $3 + local.get $2 + call $~lib/array/Array#__get local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + local.get $2 + call $~lib/array/Array#__get call $~lib/string/String.__eq if local.get $2 @@ -5897,7 +5779,7 @@ end i32.const 1 ) - (func $~lib/string/String#charAt (; 108 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#charAt (; 111 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 2324 @@ -5923,7 +5805,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/string/String#concat (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 112 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5972,7 +5854,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/string/String.__concat (; 110 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 3440 local.get $0 @@ -5980,7 +5862,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 111 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 114 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 3264 @@ -6012,11 +5894,9 @@ end local.get $1 ) - (func $std/array/createRandomStringArray (; 112 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createRandomStringArray (; 115 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) i32.const 16 call $~lib/runtime/doAllocate i32.const 14 @@ -6037,23 +5917,13 @@ i32.lt_s if local.get $0 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - i32.add - local.set $2 call $~lib/math/NativeMath.random f64.const 32 f64.mul i32.trunc_f64_s call $std/array/createRandomString - local.tee $3 - local.get $0 - call $~lib/runtime/doLink - local.get $2 - local.get $3 - i32.store + call $~lib/array/Array#__set local.get $1 i32.const 1 i32.add @@ -6063,7 +5933,7 @@ end local.get $0 ) - (func $~lib/string/String#substring (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6161,7 +6031,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join_bool (; 114 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_bool (; 117 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6313,7 +6183,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/decimalCount32 (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 118 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -6367,7 +6237,7 @@ end end ) - (func $~lib/util/number/utoa32_lut (; 116 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 119 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) i32.const 4028 @@ -6477,7 +6347,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 117 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 120 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6519,7 +6389,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 118 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 121 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6563,7 +6433,7 @@ end local.get $2 ) - (func $~lib/array/Array#join_int (; 119 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 122 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6681,12 +6551,12 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 123 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int ) - (func $~lib/util/number/utoa32 (; 121 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 124 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -6709,7 +6579,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 122 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 125 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6733,7 +6603,7 @@ call $~lib/util/number/utoa32_lut local.get $0 ) - (func $~lib/array/Array#join_int (; 123 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6851,12 +6721,12 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join (; 124 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int ) - (func $~lib/util/number/genDigits (; 125 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 128 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -7274,7 +7144,7 @@ local.get $7 end ) - (func $~lib/util/number/prettify (; 126 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 129 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -7535,7 +7405,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 127 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 130 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i64) (local $4 i64) @@ -7847,7 +7717,7 @@ local.get $12 i32.add ) - (func $~lib/util/number/dtoa (; 128 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 131 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -7892,7 +7762,7 @@ call $~lib/runtime/assertUnregistered local.get $1 ) - (func $~lib/util/number/dtoa_stream (; 129 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 132 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) local.get $1 i32.const 1 i32.shl @@ -7961,7 +7831,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join_flt (; 130 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_flt (; 133 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8077,7 +7947,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join_str (; 131 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_str (; 134 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8244,44 +8114,18 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_str ) - (func $std/array/Ref#constructor (; 133 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/Ref#constructor (; 136 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/doAllocate i32.const 18 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#__set (; 134 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.add - call $~lib/array/ensureCapacity - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=12 - end - ) - (func $~lib/array/Array#join_ref (; 135 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_ref (; 137 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8414,12 +8258,12 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#toString (; 136 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 138 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa_stream (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 139 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -8474,7 +8318,7 @@ end local.get $1 ) - (func $~lib/array/Array#join_int (; 138 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 140 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8586,7 +8430,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 139 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 141 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -8616,7 +8460,7 @@ call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join_int (; 140 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 142 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8732,7 +8576,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/decimalCount64 (; 141 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 143 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -8786,7 +8630,7 @@ end end ) - (func $~lib/util/number/utoa64_lut (; 142 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 144 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8883,7 +8727,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 143 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 145 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8925,7 +8769,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 144 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 146 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -8965,7 +8809,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 147 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9081,7 +8925,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa64 (; 146 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 148 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9146,7 +8990,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 147 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 149 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -9209,7 +9053,7 @@ end local.get $4 ) - (func $~lib/array/Array#join_int (; 148 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 150 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9325,12 +9169,12 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#toString (; 149 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 151 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/array/Array>#join_arr (; 150 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 152 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9423,7 +9267,7 @@ local.get $1 end ) - (func $~lib/util/number/itoa_stream (; 151 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 153 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -9453,7 +9297,7 @@ call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join_int (; 152 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 154 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9565,7 +9409,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array>#join_arr (; 153 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 155 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9655,7 +9499,7 @@ local.get $1 end ) - (func $~lib/array/Array>#join_arr (; 154 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9748,7 +9592,7 @@ local.get $1 end ) - (func $~lib/array/Array>>#join_arr (; 155 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>>#join_arr (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9838,7 +9682,7 @@ local.get $1 end ) - (func $start:std/array (; 156 ;) (type $FUNCSIG$v) + (func $start:std/array (; 158 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 6448 @@ -9909,7 +9753,7 @@ i32.const 2147483647 call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 208 + i32.const 248 i32.const 7 i32.const 0 call $~lib/runtime/doWrapArray @@ -9929,7 +9773,7 @@ i32.const -3 call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 224 + i32.const 264 i32.const 7 i32.const 0 call $~lib/runtime/doWrapArray @@ -9949,7 +9793,7 @@ i32.const 2147483647 call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 240 + i32.const 280 i32.const 7 i32.const 0 call $~lib/runtime/doWrapArray @@ -9969,7 +9813,7 @@ i32.const 0 call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 256 + i32.const 296 i32.const 7 i32.const 0 call $~lib/runtime/doWrapArray @@ -9989,7 +9833,7 @@ i32.const 3 call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 328 + i32.const 368 i32.const 8 i32.const 2 call $~lib/runtime/doWrapArray @@ -10010,7 +9854,7 @@ i32.const 2147483647 call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 360 + i32.const 400 i32.const 8 i32.const 2 call $~lib/runtime/doWrapArray @@ -10031,7 +9875,7 @@ i32.const -3 call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 392 + i32.const 432 i32.const 8 i32.const 2 call $~lib/runtime/doWrapArray @@ -10052,7 +9896,7 @@ i32.const 2147483647 call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 424 + i32.const 464 i32.const 8 i32.const 2 call $~lib/runtime/doWrapArray @@ -10073,7 +9917,7 @@ i32.const 0 call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 456 + i32.const 496 i32.const 8 i32.const 2 call $~lib/runtime/doWrapArray @@ -10117,15 +9961,8 @@ i32.const 42 call $~lib/array/Array#push global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 42 i32.ne if @@ -10239,15 +10076,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 43 i32.ne if @@ -10291,15 +10121,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 43 i32.ne if @@ -10311,17 +10134,8 @@ unreachable end global.get $std/array/arr - 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 1 + call $~lib/array/Array#__get i32.const 44 i32.ne if @@ -10365,15 +10179,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 43 i32.ne if @@ -10385,17 +10192,8 @@ unreachable end global.get $std/array/arr - 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 1 + call $~lib/array/Array#__get i32.const 44 i32.ne if @@ -10407,17 +10205,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/array/Array#__get i32.const 45 i32.ne if @@ -10501,15 +10290,8 @@ unreachable end global.get $std/array/out - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 43 i32.ne if @@ -10521,17 +10303,8 @@ unreachable end global.get $std/array/out - 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 1 + call $~lib/array/Array#__get i32.const 44 i32.ne if @@ -10543,17 +10316,8 @@ unreachable end global.get $std/array/out - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/array/Array#__get i32.const 45 i32.ne if @@ -10616,15 +10380,8 @@ unreachable end global.get $std/array/out - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 43 i32.ne if @@ -10636,17 +10393,8 @@ unreachable end global.get $std/array/out - 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 1 + call $~lib/array/Array#__get i32.const 44 i32.ne if @@ -10658,17 +10406,8 @@ unreachable end global.get $std/array/out - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/array/Array#__get i32.const 45 i32.ne if @@ -10680,17 +10419,8 @@ unreachable end global.get $std/array/out - local.tee $0 - i32.load offset=4 - i32.const 12 - i32.add - i32.const -1 - i32.const 12 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 3 + call $~lib/array/Array#__get i32.const 46 i32.ne if @@ -10702,17 +10432,8 @@ unreachable end global.get $std/array/out - local.tee $0 - i32.load offset=4 - i32.const 16 - i32.add - i32.const -1 - i32.const 16 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 4 + call $~lib/array/Array#__get i32.const 47 i32.ne if @@ -10755,17 +10476,8 @@ unreachable end global.get $std/array/out - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/array/Array#__get i32.const 45 i32.ne if @@ -11145,15 +10857,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 42 i32.ne if @@ -11165,17 +10870,8 @@ unreachable end global.get $std/array/arr - 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 1 + call $~lib/array/Array#__get i32.const 43 i32.ne if @@ -11187,17 +10883,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/array/Array#__get i32.const 44 i32.ne if @@ -11209,17 +10896,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const 12 - i32.add - i32.const -1 - i32.const 12 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 3 + call $~lib/array/Array#__get i32.const 45 i32.ne if @@ -11263,15 +10941,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 41 i32.ne if @@ -11283,17 +10954,8 @@ unreachable end global.get $std/array/arr - 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 1 + call $~lib/array/Array#__get i32.const 42 i32.ne if @@ -11305,17 +10967,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/array/Array#__get i32.const 43 i32.ne if @@ -11327,17 +10980,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const 12 - i32.add - i32.const -1 - i32.const 12 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 3 + call $~lib/array/Array#__get i32.const 44 i32.ne if @@ -11349,17 +10993,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const 16 - i32.add - i32.const -1 - i32.const 16 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 4 + call $~lib/array/Array#__get i32.const 45 i32.ne if @@ -11414,15 +11049,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 42 i32.ne if @@ -11434,17 +11062,8 @@ unreachable end global.get $std/array/arr - 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 1 + call $~lib/array/Array#__get i32.const 43 i32.ne if @@ -11456,17 +11075,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/array/Array#__get i32.const 44 i32.ne if @@ -11478,17 +11088,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const 12 - i32.add - i32.const -1 - i32.const 12 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 3 + call $~lib/array/Array#__get i32.const 45 i32.ne if @@ -11543,15 +11144,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 42 i32.ne if @@ -11563,17 +11157,8 @@ unreachable end global.get $std/array/arr - 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 1 + call $~lib/array/Array#__get i32.const 43 i32.ne if @@ -11585,17 +11170,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/array/Array#__get i32.const 44 i32.ne if @@ -11638,15 +11214,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 44 i32.ne if @@ -11658,17 +11227,8 @@ unreachable end global.get $std/array/arr - 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 1 + call $~lib/array/Array#__get i32.const 43 i32.ne if @@ -11680,17 +11240,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/array/Array#__get i32.const 42 i32.ne if @@ -12056,15 +11607,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 44 i32.ne if @@ -12076,17 +11620,8 @@ unreachable end global.get $std/array/arr - 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 1 + call $~lib/array/Array#__get i32.const 42 i32.ne if @@ -12613,23 +12148,22 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 0 - i32.store - local.get $0 - i32.load offset=4 + i32.const 0 + call $~lib/array/Array#__set + global.get $std/array/arr i32.const 1 - i32.store offset=4 - local.get $0 - i32.load offset=4 + i32.const 1 + call $~lib/array/Array#__set + global.get $std/array/arr i32.const 2 - i32.store offset=8 - local.get $0 - i32.load offset=4 + i32.const 2 + call $~lib/array/Array#__set + global.get $std/array/arr i32.const 3 - i32.store offset=12 - local.get $0 + i32.const 3 + call $~lib/array/Array#__set + global.get $std/array/arr i32.const 1 call $~lib/array/Array#findIndex global.set $std/array/i @@ -13104,8 +12638,6 @@ call $~lib/env/abort unreachable end - i32.const 0 - local.set $0 loop $repeat|0 local.get $0 i32.const 100 @@ -13149,25 +12681,11 @@ unreachable end global.get $std/array/newArr - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f32.load + call $~lib/array/Array#__get global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get f32.convert_i32_s f32.ne if @@ -14134,15 +13652,15 @@ local.get $0 i32.const 0 call $std/array/Ref#constructor - call $~lib/array/Array#__set + call $~lib/array/Array#__set local.get $0 i32.const 1 i32.const 0 - call $~lib/array/Array#__set + call $~lib/array/Array#__set local.get $0 i32.const 2 call $std/array/Ref#constructor - call $~lib/array/Array#__set + call $~lib/array/Array#__set local.get $0 global.set $std/array/refArr global.get $std/array/refArr @@ -14311,14 +13829,14 @@ i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray - call $~lib/array/Array#__set + call $~lib/array/Array#__set local.get $0 i32.const 1 i32.const 6368 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray - call $~lib/array/Array#__set + call $~lib/array/Array#__set local.get $0 global.set $std/array/subarr32 global.get $std/array/subarr32 @@ -14353,14 +13871,14 @@ i32.const 7 i32.const 0 call $~lib/runtime/doWrapArray - call $~lib/array/Array#__set + call $~lib/array/Array#__set local.get $0 i32.const 1 i32.const 6424 i32.const 7 i32.const 0 call $~lib/runtime/doWrapArray - call $~lib/array/Array#__set + call $~lib/array/Array#__set local.get $0 global.set $std/array/subarr8 global.get $std/array/subarr8 @@ -14408,11 +13926,11 @@ i32.const 8 i32.const 2 call $~lib/runtime/doWrapArray - call $~lib/array/Array#__set + call $~lib/array/Array#__set local.get $0 i32.const 0 local.get $1 - call $~lib/array/Array#__set + call $~lib/array/Array#__set local.get $0 global.set $std/array/subarrU32 global.get $std/array/subarrU32 @@ -14429,10 +13947,10 @@ unreachable end ) - (func $start (; 157 ;) (type $FUNCSIG$v) + (func $start (; 159 ;) (type $FUNCSIG$v) call $start:std/array ) - (func $null (; 158 ;) (type $FUNCSIG$v) + (func $null (; 160 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index c3d976768b..d312389857 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -8,12 +8,14 @@ (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) + (type $FUNCSIG$fii (func (param i32 i32) (result f32))) (type $FUNCSIG$d (func (result f64))) (type $FUNCSIG$vj (func (param i64))) (type $FUNCSIG$jj (func (param i64) (result i64))) (type $FUNCSIG$iff (func (param f32 f32) (result i32))) (type $FUNCSIG$if (func (param f32) (result i32))) (type $FUNCSIG$idd (func (param f64 f64) (result i32))) + (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) @@ -33,18 +35,18 @@ (data (i32.const 144) "\02\00\00\00\05\00\00\00\01\02\03\04\05") (data (i32.const 160) "\07\00\00\00\10\00\00\00\98\00\00\00\98\00\00\00\05\00\00\00\05\00\00\00") (data (i32.const 184) "\02\00\00\00\05\00\00\00\01\01\01\04\05") - (data (i32.const 200) "\02\00\00\00\05\00\00\00\00\00\00\00\00") - (data (i32.const 216) "\02\00\00\00\05\00\00\00\01\01\00\00\00") - (data (i32.const 232) "\02\00\00\00\05\00\00\00\01\01\00\02\02") - (data (i32.const 248) "\02\00\00\00\05\00\00\00\01\01\00\02\02") - (data (i32.const 264) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 296) "\08\00\00\00\10\00\00\00\10\01\00\00\10\01\00\00\14\00\00\00\05\00\00\00") - (data (i32.const 320) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 352) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 384) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 416) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") - (data (i32.const 448) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") - (data (i32.const 480) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 200) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 240) "\02\00\00\00\05\00\00\00\00\00\00\00\00") + (data (i32.const 256) "\02\00\00\00\05\00\00\00\01\01\00\00\00") + (data (i32.const 272) "\02\00\00\00\05\00\00\00\01\01\00\02\02") + (data (i32.const 288) "\02\00\00\00\05\00\00\00\01\01\00\02\02") + (data (i32.const 304) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 336) "\08\00\00\00\10\00\00\008\01\00\008\01\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 360) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 392) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 424) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 456) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") + (data (i32.const 488) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") (data (i32.const 520) "\02\00\00\00\00\00\00\00") (data (i32.const 528) "\02\00\00\00\00\00\00\00") (data (i32.const 536) "\04\00\00\00\10\00\00\00\18\02\00\00\18\02\00\00\00\00\00\00\00\00\00\00") @@ -228,7 +230,7 @@ (global $std/array/str (mut i32) (i32.const 104)) (global $std/array/arr8 (mut i32) (i32.const 168)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) - (global $std/array/arr32 (mut i32) (i32.const 304)) + (global $std/array/arr32 (mut i32) (i32.const 344)) (global $std/array/i (mut i32) (i32.const 0)) (global $std/array/other (mut i32) (i32.const 0)) (global $std/array/out (mut i32) (i32.const 0)) @@ -2464,10 +2466,31 @@ local.get $0 i32.load offset=12 ) - (func $std/array/isArraysEqual (; 26 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#__get (; 26 ;) (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 208 + 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_u + ) + (func $std/array/isArraysEqual (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $2 i32.eqz if @@ -2500,31 +2523,11 @@ i32.eqz br_if $break|0 local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/array/Array#__get local.get $1 - local.tee $4 - i32.load offset=4 local.get $3 - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/array/Array#__get i32.ne if i32.const 0 @@ -2541,7 +2544,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 27 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 28 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2627,14 +2630,35 @@ end local.get $0 ) - (func $~lib/array/Array#get:length (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/array/isArraysEqual (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#__get (; 30 ;) (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 208 + 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/isArraysEqual (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $2 i32.eqz if @@ -2667,35 +2691,11 @@ i32.eqz br_if $break|0 local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get local.get $1 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.ne if i32.const 0 @@ -2712,11 +2712,11 @@ end i32.const 1 ) - (func $~lib/array/Array#get:length (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/array/internalCapacity (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/internalCapacity (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -2726,12 +2726,12 @@ i32.const 2 i32.shr_s ) - (func $~lib/memory/memory.free (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 local.set $1 ) - (func $~lib/runtime/doReallocate (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doReallocate (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2828,22 +2828,16 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) + local.get $1 local.get $0 - i32.load - local.set $3 - local.get $3 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.load offset=8 local.get $2 i32.shr_u - local.set $4 - local.get $1 - local.get $4 i32.gt_u if local.get $1 @@ -2853,43 +2847,46 @@ i32.gt_u if i32.const 0 - i32.const 488 - i32.const 12 + i32.const 208 + i32.const 10 i32.const 64 call $~lib/env/abort unreachable end + local.get $0 + i32.load + local.set $3 local.get $1 local.get $2 i32.shl - local.set $5 + local.set $4 block $~lib/runtime/REALLOCATE|inlined.0 (result i32) local.get $3 + local.set $5 + local.get $4 local.set $6 local.get $5 - local.set $7 local.get $6 - local.get $7 call $~lib/runtime/doReallocate end - local.set $7 - local.get $7 + local.set $6 + local.get $6 local.get $3 i32.ne if local.get $0 - local.get $7 + local.get $6 i32.store local.get $0 - local.get $7 + local.get $6 i32.store offset=4 end local.get $0 - local.get $5 + local.get $4 i32.store offset=8 end ) - (func $~lib/array/Array#push (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -2915,7 +2912,30 @@ i32.store local.get $2 ) - (func $~lib/array/Array#pop (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#__get (; 38 ;) (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 208 + 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/array/Array#pop (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2926,8 +2946,8 @@ i32.lt_s if i32.const 0 - i32.const 488 - i32.const 185 + i32.const 208 + i32.const 195 i32.const 20 call $~lib/env/abort unreachable @@ -2948,7 +2968,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#concat (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2994,7 +3014,7 @@ call $~lib/memory/memory.copy local.get $4 ) - (func $~lib/array/Array#copyWithin (; 38 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 41 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3184,10 +3204,8 @@ end local.get $0 ) - (func $std/array/isArraysEqual (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $2 i32.eqz if @@ -3220,35 +3238,11 @@ i32.eqz br_if $break|0 local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get local.get $1 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.ne if i32.const 0 @@ -3265,7 +3259,7 @@ end i32.const 1 ) - (func $~lib/array/Array#unshift (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#unshift (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3298,7 +3292,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#shift (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3311,8 +3305,8 @@ i32.lt_s if i32.const 0 - i32.const 488 - i32.const 243 + i32.const 208 + i32.const 253 i32.const 20 call $~lib/env/abort unreachable @@ -3347,7 +3341,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#reverse (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#reverse (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3402,7 +3396,7 @@ end local.get $0 ) - (func $~lib/array/Array#indexOf (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3474,7 +3468,7 @@ end i32.const -1 ) - (func $~lib/array/Array#includes (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 local.get $2 @@ -3482,7 +3476,7 @@ i32.const 0 i32.ge_s ) - (func $~lib/array/Array#splice (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3622,12 +3616,39 @@ i32.store offset=12 local.get $6 ) - (func $start:std/array~anonymous|0 (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#__set (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureCapacity + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $start:std/array~anonymous|0 (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $~lib/array/Array#findIndex (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3686,17 +3707,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3705,12 +3726,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|4 (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|4 (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3718,12 +3739,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3783,12 +3804,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3797,12 +3818,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3810,12 +3831,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3874,12 +3895,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3888,12 +3909,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3901,13 +3922,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 65 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 69 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 66 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 70 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3959,7 +3980,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 67 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 71 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3969,13 +3990,13 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|18 (; 68 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|18 (; 72 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 69 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 73 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -3984,7 +4005,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 70 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 74 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.const 0 @@ -4099,11 +4120,11 @@ end end ) - (func $start:std/array~anonymous|21 (; 71 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 75 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#constructor (; 72 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -4128,7 +4149,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#map (; 73 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 77 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4201,11 +4222,34 @@ end local.get $3 ) - (func $~lib/array/Array#get:length (; 74 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 78 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $start:std/array~anonymous|22 (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#__get (; 79 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + 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 208 + 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 + f32.load + ) + (func $start:std/array~anonymous|22 (; 80 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4216,7 +4260,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 81 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4288,14 +4332,14 @@ end local.get $3 ) - (func $start:std/array~anonymous|23 (; 77 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 83 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4305,12 +4349,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 79 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 84 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 80 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 85 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4380,7 +4424,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|26 (; 81 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 86 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4393,7 +4437,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -4402,7 +4446,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 83 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 88 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4414,12 +4458,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 84 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 89 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 85 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 90 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4477,12 +4521,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|30 (; 86 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|30 (; 91 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|31 (; 87 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 92 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4494,7 +4538,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduce (; 88 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4552,7 +4596,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|32 (; 89 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 94 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4564,7 +4608,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|33 (; 90 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4573,12 +4617,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|34 (; 91 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|34 (; 96 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 92 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 97 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4586,12 +4630,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|36 (; 93 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|36 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 94 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 99 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4636,12 +4680,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|37 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|37 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|38 (; 96 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|38 (; 101 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4653,7 +4697,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduceRight (; 97 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 102 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4698,7 +4742,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|39 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|39 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4710,7 +4754,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|40 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|40 (; 104 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4719,12 +4763,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|41 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|41 (; 105 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|42 (; 101 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|42 (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4732,7 +4776,7 @@ local.get $1 i32.add ) - (func $~lib/math/murmurHash3 (; 102 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 107 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -4761,7 +4805,7 @@ local.set $0 local.get $0 ) - (func $~lib/math/splitMix32 (; 103 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 108 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -4796,7 +4840,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 104 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 109 ;) (type $FUNCSIG$vj) (param $0 i64) local.get $0 i64.eqz if @@ -4825,7 +4869,7 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/util/sort/insertionSort (; 105 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 110 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f32) (local $5 i32) @@ -4921,7 +4965,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 106 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 111 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5221,7 +5265,7 @@ local.get $10 f32.store ) - (func $~lib/array/Array#sort (; 107 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 112 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -5233,8 +5277,8 @@ i32.eqz if i32.const 0 - i32.const 488 - i32.const 347 + i32.const 208 + i32.const 357 i32.const 4 call $~lib/env/abort unreachable @@ -5307,7 +5351,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 108 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 113 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5340,7 +5384,7 @@ i32.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 114 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -5359,15 +5403,13 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/builtins/isNaN (; 110 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 115 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $std/array/isArraysEqual (; 111 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 116 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $2 i32.eqz if @@ -5402,71 +5444,23 @@ br_if $break|0 block local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - f32.load + call $~lib/array/Array#__get call $~lib/builtins/isNaN local.get $1 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - f32.load + call $~lib/array/Array#__get call $~lib/builtins/isNaN i32.eq if br $continue|0 end local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - f32.load + call $~lib/array/Array#__get local.get $1 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - f32.load + call $~lib/array/Array#__get f32.ne if i32.const 0 @@ -5485,7 +5479,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 112 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 117 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) @@ -5581,7 +5575,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 113 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 118 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5881,7 +5875,7 @@ local.get $10 f64.store ) - (func $~lib/array/Array#sort (; 114 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 119 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -5893,8 +5887,8 @@ i32.eqz if i32.const 0 - i32.const 488 - i32.const 347 + i32.const 208 + i32.const 357 i32.const 4 call $~lib/env/abort unreachable @@ -5967,7 +5961,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 115 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 120 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -6000,7 +5994,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6019,19 +6013,40 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/array/Array#get:length (; 117 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 122 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/builtins/isNaN (; 118 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) - local.get $0 + (func $~lib/array/Array#__get (; 123 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + local.get $1 local.get $0 - f64.ne - ) - (func $std/array/isArraysEqual (; 119 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 208 + i32.const 68 + i32.const 61 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + ) + (func $~lib/builtins/isNaN (; 124 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + local.get $0 + local.get $0 + f64.ne + ) + (func $std/array/isArraysEqual (; 125 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) local.get $2 i32.eqz if @@ -6066,71 +6081,23 @@ br_if $break|0 block local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 3 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/array/Array#__get call $~lib/builtins/isNaN local.get $1 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 3 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/array/Array#__get call $~lib/builtins/isNaN i32.eq if br $continue|0 end local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 3 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/array/Array#__get local.get $1 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 3 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/array/Array#__get f64.ne if i32.const 0 @@ -6149,7 +6116,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 120 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 126 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6245,7 +6212,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 121 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 127 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6545,7 +6512,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 122 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6555,8 +6522,8 @@ i32.eqz if i32.const 0 - i32.const 488 - i32.const 347 + i32.const 208 + i32.const 357 i32.const 4 call $~lib/env/abort unreachable @@ -6629,12 +6596,12 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 123 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 124 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 130 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6653,7 +6620,7 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/util/sort/insertionSort (; 125 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 131 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6749,7 +6716,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 126 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 132 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7049,7 +7016,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7059,8 +7026,8 @@ i32.eqz if i32.const 0 - i32.const 488 - i32.const 347 + i32.const 208 + i32.const 357 i32.const 4 call $~lib/env/abort unreachable @@ -7133,7 +7100,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 134 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -7142,7 +7109,7 @@ i32.lt_u i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -7161,7 +7128,7 @@ local.get $1 call $~lib/array/Array#sort ) - (func $std/array/createReverseOrderedArray (; 130 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 136 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -7179,18 +7146,14 @@ i32.eqz br_if $break|0 local.get $1 - i32.load offset=4 local.get $2 - i32.const 2 - i32.shl - i32.add local.get $1 call $~lib/array/Array#get:length i32.const 1 i32.sub local.get $2 i32.sub - i32.store + call $~lib/array/Array#__set local.get $2 i32.const 1 i32.add @@ -7202,7 +7165,7 @@ end local.get $1 ) - (func $~lib/math/NativeMath.random (; 131 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 137 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) (local $2 i64) @@ -7259,7 +7222,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 132 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 138 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -7277,18 +7240,14 @@ i32.eqz br_if $break|0 local.get $1 - i32.load offset=4 local.get $2 - i32.const 2 - i32.shl - i32.add call $~lib/math/NativeMath.random local.get $1 call $~lib/array/Array#get:length f64.convert_i32_s f64.mul i32.trunc_f64_s - i32.store + call $~lib/array/Array#__set local.get $2 i32.const 1 i32.add @@ -7300,16 +7259,14 @@ end local.get $1 ) - (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $std/array/isSorted (; 134 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) block $break|0 block i32.const 1 @@ -7328,37 +7285,13 @@ i32.const 2 global.set $~lib/argc local.get $0 - local.tee $4 - i32.load offset=4 local.get $2 i32.const 1 i32.sub - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get local.get $0 - local.tee $4 - i32.load offset=4 local.get $2 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get local.get $1 call_indirect (type $FUNCSIG$iii) end @@ -7379,7 +7312,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 135 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 141 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -7395,7 +7328,7 @@ unreachable end ) - (func $std/array/assertSortedDefault (; 136 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 142 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 block $~lib/util/sort/COMPARATOR|inlined.1 (result i32) i32.const 48 @@ -7403,27 +7336,27 @@ end call $std/array/assertSorted ) - (func $start:std/array~anonymous|43 (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|43 (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|44 (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $start:std/array~anonymous|45 (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|45 (; 145 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|46 (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|46 (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array>#constructor (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -7448,38 +7381,63 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>#get:length (; 142 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#get:length (; 148 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/runtime/assertRegistered (; 143 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array>#__set (; 149 ;) (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 - global.get $~lib/runtime/HEADER_MAGIC - i32.ne - i32.eqz + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureCapacity + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $~lib/array/Array>#__get (; 150 ;) (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 199 - i32.const 2 + i32.const 208 + i32.const 68 + i32.const 61 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doLink (; 144 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 - call $~lib/runtime/assertRegistered + i32.load offset=4 local.get $1 - call $~lib/runtime/assertRegistered + i32.const 2 + i32.shl + i32.add + i32.load ) - (func $std/array/createReverseOrderedNestedArray (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 151 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) i32.const 0 local.get $0 call $~lib/array/Array>#constructor @@ -7496,46 +7454,22 @@ br_if $break|0 block local.get $1 - local.tee $3 - i32.load offset=4 local.get $2 - i32.const 2 - i32.shl - i32.add - block $~lib/runtime/LINK,Array>>|inlined.0 (result i32) - i32.const 0 - i32.const 1 - call $~lib/array/Array#constructor - local.set $4 - local.get $4 - local.get $3 - call $~lib/runtime/doLink - local.get $4 - end - i32.store + i32.const 0 + i32.const 1 + call $~lib/array/Array#constructor + call $~lib/array/Array>#__set local.get $1 - local.tee $3 - i32.load offset=4 local.get $2 - i32.const 2 - i32.shl - local.tee $4 - i32.add - i32.const -1 - local.get $4 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.load offset=4 + call $~lib/array/Array>#__get + i32.const 0 local.get $1 call $~lib/array/Array>#get:length i32.const 1 i32.sub local.get $2 i32.sub - i32.store + call $~lib/array/Array#__set end local.get $2 i32.const 1 @@ -7548,42 +7482,16 @@ end local.get $1 ) - (func $start:std/array~anonymous|47 (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) + (func $start:std/array~anonymous|47 (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get local.get $1 - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.sub ) - (func $~lib/util/sort/insertionSort> (; 147 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort> (; 153 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7679,7 +7587,7 @@ unreachable end ) - (func $~lib/array/Array>#sort (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7689,8 +7597,8 @@ i32.eqz if i32.const 0 - i32.const 488 - i32.const 347 + i32.const 208 + i32.const 357 i32.const 4 call $~lib/env/abort unreachable @@ -7753,11 +7661,9 @@ end local.get $0 ) - (func $std/array/isSorted> (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) block $break|0 block i32.const 1 @@ -7776,37 +7682,13 @@ i32.const 2 global.set $~lib/argc local.get $0 - local.tee $4 - i32.load offset=4 local.get $2 i32.const 1 i32.sub - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array>#__get local.get $0 - local.tee $4 - i32.load offset=4 local.get $2 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array>#__get local.get $1 call_indirect (type $FUNCSIG$iii) end @@ -7827,7 +7709,7 @@ end i32.const 1 ) - (func $std/array/assertSorted> (; 150 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 156 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -7843,7 +7725,7 @@ unreachable end ) - (func $~lib/array/Array>#constructor (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -7868,11 +7750,11 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>#get:length (; 152 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#get:length (; 158 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/array/Proxy#constructor (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/Proxy#constructor (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.eqz @@ -7892,11 +7774,36 @@ i32.store local.get $0 ) - (func $std/array/createReverseOrderedElementsArray (; 154 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#__set (; 160 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureCapacity + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $std/array/createReverseOrderedElementsArray (; 161 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) i32.const 0 local.get $0 call $~lib/array/Array>#constructor @@ -7912,30 +7819,18 @@ i32.eqz br_if $break|0 local.get $1 - local.tee $3 - i32.load offset=4 local.get $2 - i32.const 2 - i32.shl - i32.add - block $~lib/runtime/LINK,Array>>|inlined.0 (result i32) - i32.const 0 - local.get $1 - call $~lib/array/Array>#get:length - i32.const 1 - i32.sub - local.get $2 - i32.sub - call $std/array/Proxy#constructor - local.set $4 - local.get $4 - local.get $3 - call $~lib/runtime/doLink - local.get $4 - end - i32.store - local.get $2 - i32.const 1 + i32.const 0 + local.get $1 + call $~lib/array/Array>#get:length + i32.const 1 + i32.sub + local.get $2 + i32.sub + call $std/array/Proxy#constructor + call $~lib/array/Array>#__set + local.get $2 + i32.const 1 i32.add local.set $2 br $repeat|0 @@ -7945,14 +7840,14 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/util/sort/insertionSort> (; 156 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort> (; 163 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8048,7 +7943,7 @@ unreachable end ) - (func $~lib/array/Array>#sort (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8058,8 +7953,8 @@ i32.eqz if i32.const 0 - i32.const 488 - i32.const 347 + i32.const 208 + i32.const 357 i32.const 4 call $~lib/env/abort unreachable @@ -8122,11 +8017,32 @@ end local.get $0 ) - (func $std/array/isSorted> (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__get (; 165 ;) (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 208 + 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/isSorted> (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) block $break|0 block i32.const 1 @@ -8145,37 +8061,13 @@ i32.const 2 global.set $~lib/argc local.get $0 - local.tee $4 - i32.load offset=4 local.get $2 i32.const 1 i32.sub - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array>#__get local.get $0 - local.tee $4 - i32.load offset=4 local.get $2 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array>#__get local.get $1 call_indirect (type $FUNCSIG$iii) end @@ -8196,7 +8088,7 @@ end i32.const 1 ) - (func $std/array/assertSorted> (; 159 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 167 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -8212,7 +8104,7 @@ unreachable end ) - (func $~lib/util/sort/insertionSort (; 160 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 168 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8308,7 +8200,7 @@ unreachable end ) - (func $~lib/array/Array#sort (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8318,8 +8210,8 @@ i32.eqz if i32.const 0 - i32.const 488 - i32.const 347 + i32.const 208 + i32.const 357 i32.const 4 call $~lib/env/abort unreachable @@ -8382,15 +8274,36 @@ end local.get $0 ) - (func $~lib/array/Array#get:length (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 170 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/array/isSorted (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 171 ;) (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 208 + 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/isSorted (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) block $break|0 block i32.const 1 @@ -8409,37 +8322,13 @@ i32.const 2 global.set $~lib/argc local.get $0 - local.tee $4 - i32.load offset=4 local.get $2 i32.const 1 i32.sub - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get local.get $0 - local.tee $4 - i32.load offset=4 local.get $2 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get local.get $1 call_indirect (type $FUNCSIG$iii) end @@ -8460,7 +8349,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 164 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 173 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -8476,7 +8365,7 @@ unreachable end ) - (func $~lib/string/String#get:length (; 165 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 174 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -8484,7 +8373,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 166 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (func $~lib/util/string/compareImpl (; 175 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -8537,7 +8426,7 @@ end local.get $5 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8610,7 +8499,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted|trampoline (; 168 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted|trampoline (; 177 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $1of1 block $0of1 block $outOfRange @@ -8631,7 +8520,7 @@ local.get $1 call $std/array/assertSorted ) - (func $~lib/string/String.__eq (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -8675,16 +8564,14 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.__ne (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 179 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__eq i32.eqz ) - (func $std/array/isArraysEqual (; 171 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 180 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $2 i32.eqz if @@ -8717,35 +8604,11 @@ i32.eqz br_if $break|0 local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get local.get $1 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get call $~lib/string/String.__ne if i32.const 0 @@ -8762,7 +8625,7 @@ end i32.const 1 ) - (func $~lib/array/Array#constructor (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -8787,7 +8650,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/string/String#charAt (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#charAt (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -8833,7 +8696,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/string/String#concat (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 183 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8892,7 +8755,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/string/String.__concat (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 3440 local.get $0 @@ -8902,7 +8765,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 176 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 185 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -8944,11 +8807,36 @@ end local.get $1 ) - (func $std/array/createRandomStringArray (; 177 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#__set (; 186 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureCapacity + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $std/array/createRandomStringArray (; 187 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) i32.const 0 local.get $0 call $~lib/array/Array#constructor @@ -8964,25 +8852,13 @@ i32.eqz br_if $break|0 local.get $1 - local.tee $3 - i32.load offset=4 local.get $2 - i32.const 2 - i32.shl - i32.add - block $~lib/runtime/LINK>|inlined.0 (result i32) - call $~lib/math/NativeMath.random - f64.const 32 - f64.mul - i32.trunc_f64_s - call $std/array/createRandomString - local.set $4 - local.get $4 - local.get $3 - call $~lib/runtime/doLink - local.get $4 - end - i32.store + call $~lib/math/NativeMath.random + f64.const 32 + f64.mul + i32.trunc_f64_s + call $std/array/createRandomString + call $~lib/array/Array#__set local.get $2 i32.const 1 i32.add @@ -8994,7 +8870,7 @@ end local.get $1 ) - (func $~lib/string/String#substring (; 178 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 188 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9120,7 +8996,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/runtime/doDiscard (; 179 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/doDiscard (; 189 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -9128,7 +9004,7 @@ i32.sub call $~lib/memory/memory.free ) - (func $~lib/array/Array#join_bool (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_bool (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9315,13 +9191,13 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_bool return ) - (func $~lib/util/number/decimalCount32 (; 182 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 192 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -9390,7 +9266,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa32_lut (; 183 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 193 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9533,7 +9409,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 184 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 194 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9597,12 +9473,12 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa (; 185 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 195 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 186 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 196 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9661,7 +9537,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 187 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9807,13 +9683,13 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/util/number/utoa32 (; 189 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 199 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9857,12 +9733,12 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa (; 190 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 200 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 191 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 201 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9901,7 +9777,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10047,20 +9923,20 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 193 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 203 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/builtins/isFinite (; 194 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 204 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/util/number/genDigits (; 195 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 205 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -10631,7 +10507,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 196 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 206 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10964,7 +10840,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 197 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 207 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -11410,7 +11286,7 @@ local.get $2 i32.add ) - (func $~lib/util/number/dtoa (; 198 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 208 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11466,7 +11342,7 @@ end local.get $4 ) - (func $~lib/util/number/dtoa_stream (; 199 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 209 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11540,7 +11416,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join_flt (; 200 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_flt (; 210 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11686,13 +11562,13 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 201 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 211 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_flt return ) - (func $~lib/array/Array#join_str (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_str (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11884,13 +11760,13 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 203 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 213 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_str return ) - (func $std/array/Ref#constructor (; 204 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/Ref#constructor (; 214 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -11907,7 +11783,7 @@ end local.get $0 ) - (func $~lib/array/Array#constructor (; 205 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 215 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -11932,7 +11808,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#__set (; 206 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 216 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 @@ -11959,7 +11835,7 @@ i32.store offset=12 end ) - (func $~lib/array/Array#join_ref (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_ref (; 217 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12121,18 +11997,18 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 218 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_ref return ) - (func $~lib/array/Array#toString (; 209 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 219 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa (; 210 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 220 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -12141,7 +12017,7 @@ call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 211 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 221 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12216,7 +12092,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12362,25 +12238,25 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 213 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 223 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 214 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 224 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa (; 215 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 225 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 65535 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 216 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 226 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12425,7 +12301,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 217 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 227 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12571,18 +12447,18 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 218 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 228 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 219 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 229 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/util/number/decimalCount64 (; 220 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 230 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -12651,7 +12527,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 221 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 231 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -12779,7 +12655,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 222 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 232 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12859,12 +12735,12 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa (; 223 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 233 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/utoa64 return ) - (func $~lib/util/number/itoa_stream (; 224 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 234 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12930,7 +12806,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 235 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13076,18 +12952,18 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 227 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 237 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa64 (; 228 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 238 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13189,12 +13065,12 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa (; 229 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 239 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/itoa64 return ) - (func $~lib/util/number/itoa_stream (; 230 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 240 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13282,7 +13158,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 231 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 241 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13428,50 +13304,23 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 232 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 242 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 233 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 243 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/array/Array#toString (; 234 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 244 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/array/Array>#__set (; 235 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - call $~lib/array/ensureCapacity - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=12 - end - ) - (func $~lib/array/Array>#join_arr (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 245 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13575,18 +13424,18 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 237 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>#toString (; 238 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#toString (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array>#join ) - (func $~lib/array/Array>#constructor (; 239 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 248 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -13611,7 +13460,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>#__set (; 240 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__set (; 249 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 @@ -13638,14 +13487,14 @@ i32.store offset=12 end ) - (func $~lib/util/number/itoa (; 241 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 250 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 242 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 251 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13690,7 +13539,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 243 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13836,13 +13685,13 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 244 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 253 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array>#join_arr (; 245 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 254 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13946,18 +13795,18 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>#toString (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#toString (; 256 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array>#join ) - (func $~lib/array/Array>#constructor (; 248 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -13982,7 +13831,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>#__set (; 249 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__set (; 258 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 @@ -14009,7 +13858,7 @@ i32.store offset=12 end ) - (func $~lib/array/Array>>#constructor (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#constructor (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -14034,7 +13883,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>>#__set (; 251 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>>#__set (; 260 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 @@ -14061,7 +13910,7 @@ i32.store offset=12 end ) - (func $~lib/array/Array>#join_arr (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 261 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14165,13 +14014,13 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 253 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>>#join_arr (; 254 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#join_arr (; 263 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14275,25 +14124,24 @@ end local.get $3 ) - (func $~lib/array/Array>>#join (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#join (; 264 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>>#join_arr return ) - (func $~lib/array/Array>>#toString (; 256 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>>#toString (; 265 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array>>#join ) - (func $start:std/array (; 257 ;) (type $FUNCSIG$v) + (func $start:std/array (; 266 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -14423,7 +14271,7 @@ drop global.get $std/array/arr8 block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 208 + i32.const 248 local.set $0 local.get $0 i32.const 7 @@ -14449,7 +14297,7 @@ drop global.get $std/array/arr8 block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) - i32.const 224 + i32.const 264 local.set $0 local.get $0 i32.const 7 @@ -14475,7 +14323,7 @@ drop global.get $std/array/arr8 block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) - i32.const 240 + i32.const 280 local.set $0 local.get $0 i32.const 7 @@ -14501,7 +14349,7 @@ drop global.get $std/array/arr8 block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) - i32.const 256 + i32.const 296 local.set $0 local.get $0 i32.const 7 @@ -14527,7 +14375,7 @@ drop global.get $std/array/arr32 block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) - i32.const 328 + i32.const 368 local.set $0 local.get $0 i32.const 8 @@ -14553,7 +14401,7 @@ drop global.get $std/array/arr32 block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 360 + i32.const 400 local.set $0 local.get $0 i32.const 8 @@ -14579,7 +14427,7 @@ drop global.get $std/array/arr32 block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) - i32.const 392 + i32.const 432 local.set $0 local.get $0 i32.const 8 @@ -14605,7 +14453,7 @@ drop global.get $std/array/arr32 block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) - i32.const 424 + i32.const 464 local.set $0 local.get $0 i32.const 8 @@ -14631,7 +14479,7 @@ drop global.get $std/array/arr32 block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) - i32.const 456 + i32.const 496 local.set $0 local.get $0 i32.const 8 @@ -14680,20 +14528,8 @@ call $~lib/array/Array#push drop global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 42 i32.eq i32.eqz @@ -14803,20 +14639,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 43 i32.eq i32.eqz @@ -14859,20 +14683,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 43 i32.eq i32.eqz @@ -14885,20 +14697,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 44 i32.eq i32.eqz @@ -14941,20 +14741,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 43 i32.eq i32.eqz @@ -14967,20 +14755,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 44 i32.eq i32.eqz @@ -14993,20 +14769,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const 2 i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 45 i32.eq i32.eqz @@ -15090,20 +14854,8 @@ unreachable end global.get $std/array/out - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 43 i32.eq i32.eqz @@ -15116,20 +14868,8 @@ unreachable end global.get $std/array/out - local.tee $0 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 44 i32.eq i32.eqz @@ -15142,20 +14882,8 @@ unreachable end global.get $std/array/out - local.tee $0 - i32.load offset=4 i32.const 2 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 45 i32.eq i32.eqz @@ -15219,20 +14947,8 @@ unreachable end global.get $std/array/out - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 43 i32.eq i32.eqz @@ -15245,20 +14961,8 @@ unreachable end global.get $std/array/out - local.tee $0 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 44 i32.eq i32.eqz @@ -15271,20 +14975,8 @@ unreachable end global.get $std/array/out - local.tee $0 - i32.load offset=4 i32.const 2 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 45 i32.eq i32.eqz @@ -15297,20 +14989,8 @@ unreachable end global.get $std/array/out - local.tee $0 - i32.load offset=4 i32.const 3 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 46 i32.eq i32.eqz @@ -15323,20 +15003,8 @@ unreachable end global.get $std/array/out - local.tee $0 - i32.load offset=4 i32.const 4 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 47 i32.eq i32.eqz @@ -15382,20 +15050,8 @@ unreachable end global.get $std/array/out - local.tee $0 - i32.load offset=4 - i32.const 2 i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 45 i32.eq i32.eqz @@ -15877,20 +15533,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 42 i32.eq i32.eqz @@ -15903,20 +15547,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 43 i32.eq i32.eqz @@ -15929,20 +15561,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const 2 i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 44 i32.eq i32.eqz @@ -15955,20 +15575,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 3 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 45 i32.eq i32.eqz @@ -16011,20 +15619,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 41 i32.eq i32.eqz @@ -16037,20 +15633,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 42 i32.eq i32.eqz @@ -16063,20 +15647,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const 2 i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 43 i32.eq i32.eqz @@ -16089,20 +15661,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 3 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 44 i32.eq i32.eqz @@ -16115,20 +15675,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 4 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 45 i32.eq i32.eqz @@ -16173,29 +15721,17 @@ i32.const 5 i32.eq i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 216 - i32.const 0 - call $~lib/env/abort - unreachable - end - global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + if + i32.const 0 + i32.const 120 + i32.const 216 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/array/arr + i32.const 0 + call $~lib/array/Array#__get i32.const 42 i32.eq i32.eqz @@ -16208,20 +15744,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 43 i32.eq i32.eqz @@ -16234,20 +15758,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const 2 i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 44 i32.eq i32.eqz @@ -16260,20 +15772,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 3 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 45 i32.eq i32.eqz @@ -16327,20 +15827,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 42 i32.eq i32.eqz @@ -16353,20 +15841,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 43 i32.eq i32.eqz @@ -16379,20 +15855,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const 2 i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 44 i32.eq i32.eqz @@ -16434,20 +15898,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 44 i32.eq i32.eqz @@ -16460,20 +15912,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 43 i32.eq i32.eqz @@ -16486,20 +15926,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 - i32.const 2 i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 42 i32.eq i32.eqz @@ -16891,20 +16319,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 44 i32.eq i32.eqz @@ -16917,20 +16333,8 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 42 i32.eq i32.eqz @@ -17610,21 +17014,21 @@ unreachable end global.get $std/array/arr - i32.load offset=4 i32.const 0 - i32.store + i32.const 0 + call $~lib/array/Array#__set global.get $std/array/arr - i32.load offset=4 i32.const 1 - i32.store offset=4 + i32.const 1 + call $~lib/array/Array#__set global.get $std/array/arr - i32.load offset=4 i32.const 2 - i32.store offset=8 + i32.const 2 + call $~lib/array/Array#__set global.get $std/array/arr - i32.load offset=4 i32.const 3 - i32.store offset=12 + i32.const 3 + call $~lib/array/Array#__set global.get $std/array/arr i32.const 1 call $~lib/array/Array#findIndex @@ -18204,35 +17608,11 @@ unreachable end global.get $std/array/newArr - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f32.load + call $~lib/array/Array#__get global.get $std/array/arr - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get f32.convert_i32_s f32.eq i32.eqz @@ -19250,22 +18630,22 @@ i32.const 0 i32.const 3 call $~lib/array/Array#constructor - local.set $2 - local.get $2 + local.set $1 + local.get $1 i32.const 0 i32.const 0 call $std/array/Ref#constructor call $~lib/array/Array#__set - local.get $2 + local.get $1 i32.const 1 i32.const 0 call $~lib/array/Array#__set - local.get $2 + local.get $1 i32.const 2 i32.const 0 call $std/array/Ref#constructor call $~lib/array/Array#__set - local.get $2 + local.get $1 end global.set $std/array/refArr global.get $std/array/refArr @@ -19336,8 +18716,8 @@ end block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) i32.const 5808 - local.set $2 - local.get $2 + local.set $1 + local.get $1 i32.const 20 i32.const 0 call $~lib/runtime/doWrapArray @@ -19356,8 +18736,8 @@ end block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) i32.const 5864 - local.set $2 - local.get $2 + local.set $1 + local.get $1 i32.const 21 i32.const 1 call $~lib/runtime/doWrapArray @@ -19376,8 +18756,8 @@ end block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) i32.const 5944 - local.set $2 - local.get $2 + local.set $1 + local.get $1 i32.const 16 i32.const 3 call $~lib/runtime/doWrapArray @@ -19396,8 +18776,8 @@ end block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) i32.const 6072 - local.set $2 - local.get $2 + local.set $1 + local.get $1 i32.const 22 i32.const 3 call $~lib/runtime/doWrapArray @@ -19429,8 +18809,8 @@ end block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) i32.const 6304 - local.set $2 - local.get $2 + local.set $1 + local.get $1 i32.const 14 i32.const 2 call $~lib/runtime/doWrapArray @@ -19451,30 +18831,30 @@ i32.const 0 i32.const 2 call $~lib/array/Array>#constructor - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.const 0 block $~lib/runtime/WRAPARRAY|inlined.70 (result i32) i32.const 6352 - local.set $2 - local.get $2 + local.set $1 + local.get $1 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray end call $~lib/array/Array>#__set - local.get $3 + local.get $2 i32.const 1 block $~lib/runtime/WRAPARRAY|inlined.71 (result i32) i32.const 6368 - local.set $2 - local.get $2 + local.set $1 + local.get $1 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray end call $~lib/array/Array>#__set - local.get $3 + local.get $2 end global.set $std/array/subarr32 global.get $std/array/subarr32 @@ -19494,30 +18874,30 @@ i32.const 0 i32.const 2 call $~lib/array/Array>#constructor - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 block $~lib/runtime/WRAPARRAY|inlined.5 (result i32) i32.const 6408 - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.const 7 i32.const 0 call $~lib/runtime/doWrapArray end call $~lib/array/Array>#__set - local.get $4 + local.get $3 i32.const 1 block $~lib/runtime/WRAPARRAY|inlined.6 (result i32) i32.const 6424 - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.const 7 i32.const 0 call $~lib/runtime/doWrapArray end call $~lib/array/Array>#__set - local.get $4 + local.get $3 end global.set $std/array/subarr8 global.get $std/array/subarr8 @@ -19537,29 +18917,29 @@ i32.const 0 i32.const 1 call $~lib/array/Array>>#constructor - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 0 block (result i32) i32.const 0 i32.const 1 call $~lib/array/Array>#constructor - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.const 0 block $~lib/runtime/WRAPARRAY|inlined.8 (result i32) i32.const 6440 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 8 i32.const 2 call $~lib/runtime/doWrapArray end call $~lib/array/Array>#__set - local.get $5 + local.get $4 end call $~lib/array/Array>>#__set - local.get $6 + local.get $5 end global.set $std/array/subarrU32 global.get $std/array/subarrU32 @@ -19576,9 +18956,9 @@ unreachable end ) - (func $start (; 258 ;) (type $FUNCSIG$v) + (func $start (; 267 ;) (type $FUNCSIG$v) call $start:std/array ) - (func $null (; 259 ;) (type $FUNCSIG$v) + (func $null (; 268 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index b1122c5f18..e155ad9c9f 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -3,6 +3,7 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$jj (func (param i64) (result i64))) @@ -11,14 +12,14 @@ (type $FUNCSIG$jii (func (param i32 i32) (result i64))) (type $FUNCSIG$vifi (func (param i32 f32 i32))) (type $FUNCSIG$vidi (func (param i32 f64 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (data (i32.const 48) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 96) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") - (data (i32.const 136) "\01\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 96) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 144) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 184) "\01\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -157,7 +158,7 @@ ) (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 176 + i32.const 224 i32.le_u if i32.const 0 @@ -231,7 +232,27 @@ i32.store offset=8 local.get $0 ) - (func $~lib/dataview/DataView#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__set (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 104 + i32.const 111 + i32.const 44 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + local.get $2 + i32.store8 + ) + (func $~lib/dataview/DataView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block (result i32) local.get $2 @@ -252,7 +273,7 @@ end if i32.const 0 - i32.const 104 + i32.const 152 i32.const 18 i32.const 47 call $~lib/env/abort @@ -268,7 +289,7 @@ i32.gt_u if i32.const 0 - i32.const 104 + i32.const 152 i32.const 19 i32.const 63 call $~lib/env/abort @@ -300,7 +321,7 @@ i32.store offset=8 local.get $3 ) - (func $~lib/dataview/DataView#getFloat32 (; 8 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $~lib/dataview/DataView#getFloat32 (; 9 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $1 i32.const 0 i32.lt_s @@ -313,7 +334,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 42 i32.const 6 call $~lib/env/abort @@ -346,7 +367,7 @@ f32.reinterpret_i32 end ) - (func $~lib/polyfills/bswap (; 9 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 10 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 i64.const 8 i64.shr_u @@ -372,14 +393,14 @@ i64.const 32 i64.rotr ) - (func $~lib/dataview/DataView#getFloat64 (; 10 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/dataview/DataView#getFloat64 (; 11 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) i32.const 8 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 104 + i32.const 152 i32.const 56 i32.const 7 call $~lib/env/abort @@ -398,14 +419,14 @@ f64.reinterpret_i64 end ) - (func $~lib/dataview/DataView#getInt8 (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getInt8 (; 12 ;) (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 152 i32.const 67 i32.const 49 call $~lib/env/abort @@ -417,7 +438,7 @@ i32.add i32.load8_s ) - (func $~lib/dataview/DataView#getInt16 (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt16 (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 0 i32.lt_s @@ -430,7 +451,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 75 i32.const 7 call $~lib/env/abort @@ -459,7 +480,7 @@ i32.or end ) - (func $~lib/dataview/DataView#getInt32 (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt32 (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 0 i32.lt_s @@ -472,7 +493,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 84 i32.const 7 call $~lib/env/abort @@ -501,7 +522,7 @@ i32.or end ) - (func $~lib/dataview/DataView#getInt64 (; 14 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/dataview/DataView#getInt64 (; 15 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i64) i32.const 8 local.get $0 @@ -509,7 +530,7 @@ i32.gt_s if i32.const 0 - i32.const 104 + i32.const 152 i32.const 178 i32.const 6 call $~lib/env/abort @@ -527,14 +548,14 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint8 (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getUint8 (; 16 ;) (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 152 i32.const 90 i32.const 49 call $~lib/env/abort @@ -546,7 +567,7 @@ i32.add i32.load8_u ) - (func $~lib/dataview/DataView#getUint16 (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint16 (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 0 i32.lt_s @@ -559,7 +580,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 98 i32.const 6 call $~lib/env/abort @@ -586,7 +607,7 @@ i32.or end ) - (func $~lib/dataview/DataView#getUint32 (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint32 (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 0 i32.lt_s @@ -599,7 +620,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 107 i32.const 6 call $~lib/env/abort @@ -628,7 +649,7 @@ i32.or end ) - (func $~lib/dataview/DataView#getUint64 (; 18 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/dataview/DataView#getUint64 (; 19 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i64) i32.const 8 local.get $0 @@ -636,7 +657,7 @@ i32.gt_s if i32.const 0 - i32.const 104 + i32.const 152 i32.const 187 i32.const 6 call $~lib/env/abort @@ -654,14 +675,14 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#setFloat32 (; 19 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/dataview/DataView#setFloat32 (; 20 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 104 + i32.const 152 i32.const 116 i32.const 6 call $~lib/env/abort @@ -692,14 +713,14 @@ i32.store end ) - (func $~lib/dataview/DataView#setFloat64 (; 20 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/dataview/DataView#setFloat64 (; 21 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 104 + i32.const 152 i32.const 125 i32.const 6 call $~lib/env/abort @@ -720,14 +741,14 @@ i64.store end ) - (func $~lib/dataview/DataView#setInt8 (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/dataview/DataView#setInt8 (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 0 local.get $0 i32.load offset=8 i32.ge_u if i32.const 0 - i32.const 104 + i32.const 152 i32.const 131 i32.const 49 call $~lib/env/abort @@ -738,14 +759,14 @@ i32.const 108 i32.store8 ) - (func $~lib/dataview/DataView#setInt16 (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt16 (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 104 + i32.const 152 i32.const 139 i32.const 6 call $~lib/env/abort @@ -774,14 +795,14 @@ local.get $1 i32.store16 ) - (func $~lib/dataview/DataView#setInt32 (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt32 (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 104 + i32.const 152 i32.const 147 i32.const 6 call $~lib/env/abort @@ -810,14 +831,14 @@ local.get $1 i32.store ) - (func $~lib/dataview/DataView#setInt64 (; 24 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/dataview/DataView#setInt64 (; 25 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 104 + i32.const 152 i32.const 196 i32.const 6 call $~lib/env/abort @@ -834,14 +855,14 @@ end i64.store ) - (func $~lib/dataview/DataView#setUint8 (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/dataview/DataView#setUint8 (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 0 local.get $0 i32.load offset=8 i32.ge_u if i32.const 0 - i32.const 104 + i32.const 152 i32.const 152 i32.const 49 call $~lib/env/abort @@ -852,14 +873,14 @@ i32.const 238 i32.store8 ) - (func $~lib/dataview/DataView#setUint16 (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint16 (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 104 + i32.const 152 i32.const 160 i32.const 6 call $~lib/env/abort @@ -886,14 +907,14 @@ local.get $1 i32.store16 ) - (func $~lib/dataview/DataView#setUint32 (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint32 (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 104 + i32.const 152 i32.const 168 i32.const 6 call $~lib/env/abort @@ -922,14 +943,14 @@ local.get $1 i32.store ) - (func $~lib/dataview/DataView#setUint64 (; 28 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/dataview/DataView#setUint64 (; 29 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 104 + i32.const 152 i32.const 204 i32.const 6 call $~lib/env/abort @@ -946,10 +967,9 @@ end i64.store ) - (func $start:std/dataview (; 29 ;) (type $FUNCSIG$v) + (func $start:std/dataview (; 30 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - i32.const 176 + i32.const 224 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -960,47 +980,46 @@ call $~lib/runtime/ArrayBufferView#constructor global.set $std/dataview/array global.get $std/dataview/array - local.tee $1 - local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 246 - i32.store8 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Uint8Array#__set + global.get $std/dataview/array + i32.const 1 i32.const 224 - i32.store8 offset=1 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Uint8Array#__set + global.get $std/dataview/array + i32.const 2 i32.const 88 - i32.store8 offset=2 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Uint8Array#__set + global.get $std/dataview/array + i32.const 3 i32.const 159 - i32.store8 offset=3 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Uint8Array#__set + global.get $std/dataview/array + i32.const 4 i32.const 130 - i32.store8 offset=4 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Uint8Array#__set + global.get $std/dataview/array + i32.const 5 i32.const 101 - i32.store8 offset=5 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Uint8Array#__set + global.get $std/dataview/array + i32.const 6 i32.const 67 - i32.store8 offset=6 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Uint8Array#__set + global.get $std/dataview/array + i32.const 7 i32.const 95 - i32.store8 offset=7 - local.get $0 + call $~lib/typedarray/Uint8Array#__set + global.get $std/dataview/array + local.tee $0 i32.load local.get $0 i32.load offset=4 local.get $0 i32.load i32.sub - local.get $1 + local.get $0 i32.load offset=8 call $~lib/dataview/DataView#constructor global.set $std/dataview/view @@ -1012,7 +1031,7 @@ f32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 16 i32.const 0 call $~lib/env/abort @@ -1026,7 +1045,7 @@ f32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 17 i32.const 0 call $~lib/env/abort @@ -1040,7 +1059,7 @@ f32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 18 i32.const 0 call $~lib/env/abort @@ -1054,7 +1073,7 @@ f32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 19 i32.const 0 call $~lib/env/abort @@ -1068,7 +1087,7 @@ f32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 20 i32.const 0 call $~lib/env/abort @@ -1082,7 +1101,7 @@ f32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 22 i32.const 0 call $~lib/env/abort @@ -1096,7 +1115,7 @@ f32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 23 i32.const 0 call $~lib/env/abort @@ -1110,7 +1129,7 @@ f32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 24 i32.const 0 call $~lib/env/abort @@ -1124,7 +1143,7 @@ f32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 25 i32.const 0 call $~lib/env/abort @@ -1138,7 +1157,7 @@ f32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 26 i32.const 0 call $~lib/env/abort @@ -1151,7 +1170,7 @@ f64.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 28 i32.const 0 call $~lib/env/abort @@ -1164,7 +1183,7 @@ f64.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 29 i32.const 0 call $~lib/env/abort @@ -1177,7 +1196,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 31 i32.const 0 call $~lib/env/abort @@ -1190,7 +1209,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 32 i32.const 0 call $~lib/env/abort @@ -1203,7 +1222,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 33 i32.const 0 call $~lib/env/abort @@ -1216,7 +1235,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 34 i32.const 0 call $~lib/env/abort @@ -1229,7 +1248,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 35 i32.const 0 call $~lib/env/abort @@ -1242,7 +1261,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 36 i32.const 0 call $~lib/env/abort @@ -1255,7 +1274,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 37 i32.const 0 call $~lib/env/abort @@ -1268,7 +1287,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 38 i32.const 0 call $~lib/env/abort @@ -1284,7 +1303,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 40 i32.const 0 call $~lib/env/abort @@ -1300,7 +1319,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 41 i32.const 0 call $~lib/env/abort @@ -1316,7 +1335,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 42 i32.const 0 call $~lib/env/abort @@ -1332,7 +1351,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 43 i32.const 0 call $~lib/env/abort @@ -1348,7 +1367,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 44 i32.const 0 call $~lib/env/abort @@ -1364,7 +1383,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 45 i32.const 0 call $~lib/env/abort @@ -1380,7 +1399,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 46 i32.const 0 call $~lib/env/abort @@ -1396,7 +1415,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 48 i32.const 0 call $~lib/env/abort @@ -1412,7 +1431,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 49 i32.const 0 call $~lib/env/abort @@ -1428,7 +1447,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 50 i32.const 0 call $~lib/env/abort @@ -1444,7 +1463,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 51 i32.const 0 call $~lib/env/abort @@ -1460,7 +1479,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 52 i32.const 0 call $~lib/env/abort @@ -1476,7 +1495,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 53 i32.const 0 call $~lib/env/abort @@ -1492,7 +1511,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 54 i32.const 0 call $~lib/env/abort @@ -1506,7 +1525,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 56 i32.const 0 call $~lib/env/abort @@ -1520,7 +1539,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 57 i32.const 0 call $~lib/env/abort @@ -1534,7 +1553,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 58 i32.const 0 call $~lib/env/abort @@ -1548,7 +1567,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 59 i32.const 0 call $~lib/env/abort @@ -1562,7 +1581,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 60 i32.const 0 call $~lib/env/abort @@ -1576,7 +1595,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 62 i32.const 0 call $~lib/env/abort @@ -1590,7 +1609,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 63 i32.const 0 call $~lib/env/abort @@ -1604,7 +1623,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 64 i32.const 0 call $~lib/env/abort @@ -1618,7 +1637,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 65 i32.const 0 call $~lib/env/abort @@ -1632,7 +1651,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 66 i32.const 0 call $~lib/env/abort @@ -1645,7 +1664,7 @@ i64.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 68 i32.const 0 call $~lib/env/abort @@ -1658,7 +1677,7 @@ i64.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 69 i32.const 0 call $~lib/env/abort @@ -1671,7 +1690,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 71 i32.const 0 call $~lib/env/abort @@ -1684,7 +1703,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 72 i32.const 0 call $~lib/env/abort @@ -1697,7 +1716,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 73 i32.const 0 call $~lib/env/abort @@ -1710,7 +1729,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 74 i32.const 0 call $~lib/env/abort @@ -1723,7 +1742,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 75 i32.const 0 call $~lib/env/abort @@ -1736,7 +1755,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 76 i32.const 0 call $~lib/env/abort @@ -1749,7 +1768,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 77 i32.const 0 call $~lib/env/abort @@ -1762,7 +1781,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 78 i32.const 0 call $~lib/env/abort @@ -1778,7 +1797,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 80 i32.const 0 call $~lib/env/abort @@ -1794,7 +1813,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 81 i32.const 0 call $~lib/env/abort @@ -1810,7 +1829,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 82 i32.const 0 call $~lib/env/abort @@ -1826,7 +1845,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 83 i32.const 0 call $~lib/env/abort @@ -1842,7 +1861,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 84 i32.const 0 call $~lib/env/abort @@ -1858,7 +1877,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 85 i32.const 0 call $~lib/env/abort @@ -1874,7 +1893,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 86 i32.const 0 call $~lib/env/abort @@ -1890,7 +1909,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 88 i32.const 0 call $~lib/env/abort @@ -1906,7 +1925,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 89 i32.const 0 call $~lib/env/abort @@ -1922,7 +1941,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 90 i32.const 0 call $~lib/env/abort @@ -1938,7 +1957,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 91 i32.const 0 call $~lib/env/abort @@ -1954,7 +1973,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 92 i32.const 0 call $~lib/env/abort @@ -1970,7 +1989,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 93 i32.const 0 call $~lib/env/abort @@ -1986,7 +2005,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 94 i32.const 0 call $~lib/env/abort @@ -2000,7 +2019,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 96 i32.const 0 call $~lib/env/abort @@ -2014,7 +2033,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 97 i32.const 0 call $~lib/env/abort @@ -2028,7 +2047,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 98 i32.const 0 call $~lib/env/abort @@ -2042,7 +2061,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 99 i32.const 0 call $~lib/env/abort @@ -2056,7 +2075,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 100 i32.const 0 call $~lib/env/abort @@ -2070,7 +2089,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 102 i32.const 0 call $~lib/env/abort @@ -2084,7 +2103,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 103 i32.const 0 call $~lib/env/abort @@ -2098,7 +2117,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 104 i32.const 0 call $~lib/env/abort @@ -2112,7 +2131,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 105 i32.const 0 call $~lib/env/abort @@ -2126,7 +2145,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 106 i32.const 0 call $~lib/env/abort @@ -2139,7 +2158,7 @@ i64.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 108 i32.const 0 call $~lib/env/abort @@ -2152,7 +2171,7 @@ i64.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 109 i32.const 0 call $~lib/env/abort @@ -2170,7 +2189,7 @@ f32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 112 i32.const 0 call $~lib/env/abort @@ -2188,7 +2207,7 @@ f32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 115 i32.const 0 call $~lib/env/abort @@ -2205,7 +2224,7 @@ f64.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 118 i32.const 0 call $~lib/env/abort @@ -2222,7 +2241,7 @@ f64.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 121 i32.const 0 call $~lib/env/abort @@ -2237,7 +2256,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 124 i32.const 0 call $~lib/env/abort @@ -2257,7 +2276,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 127 i32.const 0 call $~lib/env/abort @@ -2277,7 +2296,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 130 i32.const 0 call $~lib/env/abort @@ -2295,7 +2314,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 133 i32.const 0 call $~lib/env/abort @@ -2313,7 +2332,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 136 i32.const 0 call $~lib/env/abort @@ -2330,7 +2349,7 @@ i64.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 139 i32.const 0 call $~lib/env/abort @@ -2347,7 +2366,7 @@ i64.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 142 i32.const 0 call $~lib/env/abort @@ -2362,7 +2381,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 145 i32.const 0 call $~lib/env/abort @@ -2382,7 +2401,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 148 i32.const 0 call $~lib/env/abort @@ -2402,7 +2421,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 151 i32.const 0 call $~lib/env/abort @@ -2420,7 +2439,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 154 i32.const 0 call $~lib/env/abort @@ -2438,7 +2457,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 157 i32.const 0 call $~lib/env/abort @@ -2455,7 +2474,7 @@ i64.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 160 i32.const 0 call $~lib/env/abort @@ -2472,17 +2491,17 @@ i64.ne if i32.const 0 - i32.const 144 + i32.const 192 i32.const 163 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 30 ;) (type $FUNCSIG$v) + (func $start (; 31 ;) (type $FUNCSIG$v) call $start:std/dataview ) - (func $null (; 31 ;) (type $FUNCSIG$v) + (func $null (; 32 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 0a3e00eeb7..f0a7ba271a 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -18,8 +18,9 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 48) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 96) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") - (data (i32.const 136) "\01\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 96) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 144) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 184) "\01\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) @@ -32,7 +33,7 @@ (global $std/dataview/array (mut i32) (i32.const 0)) (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) (global $std/dataview/view (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 176)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 224)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -558,13 +559,33 @@ local.set $0 local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__set (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 104 + i32.const 111 + i32.const 44 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + local.get $2 + i32.store8 + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $~lib/dataview/DataView#constructor (; 12 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 13 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $3 @@ -582,7 +603,7 @@ i32.gt_u if i32.const 0 - i32.const 104 + i32.const 152 i32.const 18 i32.const 47 call $~lib/env/abort @@ -596,7 +617,7 @@ i32.gt_u if i32.const 0 - i32.const 104 + i32.const 152 i32.const 19 i32.const 63 call $~lib/env/abort @@ -641,22 +662,22 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#get:buffer (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#get:buffer (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load i32.sub ) - (func $~lib/runtime/ArrayBufferView#get:byteLength (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#get:byteLength (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 ) - (func $~lib/polyfills/bswap (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const -16711936 i32.and @@ -670,7 +691,7 @@ i32.or return ) - (func $~lib/dataview/DataView#getFloat32 (; 17 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $~lib/dataview/DataView#getFloat32 (; 18 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $1 i32.const 0 i32.lt_s @@ -683,7 +704,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 42 i32.const 6 call $~lib/env/abort @@ -708,7 +729,7 @@ f32.reinterpret_i32 end ) - (func $~lib/polyfills/bswap (; 18 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 19 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -747,7 +768,7 @@ i64.rotr return ) - (func $~lib/dataview/DataView#getFloat64 (; 19 ;) (type $FUNCSIG$diii) (param $0 i32) (param $1 i32) (param $2 i32) (result f64) + (func $~lib/dataview/DataView#getFloat64 (; 20 ;) (type $FUNCSIG$diii) (param $0 i32) (param $1 i32) (param $2 i32) (result f64) local.get $1 i32.const 0 i32.lt_s @@ -760,7 +781,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 56 i32.const 7 call $~lib/env/abort @@ -785,14 +806,14 @@ f64.reinterpret_i64 end ) - (func $~lib/dataview/DataView#getInt8 (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getInt8 (; 21 ;) (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 152 i32.const 67 i32.const 49 call $~lib/env/abort @@ -804,7 +825,7 @@ i32.add i32.load8_s ) - (func $~lib/polyfills/bswap (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.shl @@ -820,7 +841,7 @@ i32.or return ) - (func $~lib/dataview/DataView#getInt16 (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt16 (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 0 @@ -834,7 +855,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 75 i32.const 7 call $~lib/env/abort @@ -856,7 +877,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/polyfills/bswap (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const -16711936 i32.and @@ -870,7 +891,7 @@ i32.or return ) - (func $~lib/dataview/DataView#getInt32 (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt32 (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 0 @@ -884,7 +905,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 84 i32.const 7 call $~lib/env/abort @@ -906,7 +927,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/polyfills/bswap (; 25 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 26 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -945,7 +966,7 @@ i64.rotr return ) - (func $~lib/dataview/DataView#getInt64 (; 26 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) + (func $~lib/dataview/DataView#getInt64 (; 27 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) (local $3 i64) local.get $1 i32.const 0 @@ -959,7 +980,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 178 i32.const 6 call $~lib/env/abort @@ -981,14 +1002,14 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint8 (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getUint8 (; 28 ;) (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 152 i32.const 90 i32.const 49 call $~lib/env/abort @@ -1000,7 +1021,7 @@ i32.add i32.load8_u ) - (func $~lib/polyfills/bswap (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.shl @@ -1014,7 +1035,7 @@ i32.or return ) - (func $~lib/dataview/DataView#getUint16 (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint16 (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 0 @@ -1028,7 +1049,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 98 i32.const 6 call $~lib/env/abort @@ -1050,7 +1071,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint32 (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint32 (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 0 @@ -1064,7 +1085,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 107 i32.const 6 call $~lib/env/abort @@ -1086,7 +1107,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint64 (; 31 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) + (func $~lib/dataview/DataView#getUint64 (; 32 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) (local $3 i64) local.get $1 i32.const 0 @@ -1100,7 +1121,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 187 i32.const 6 call $~lib/env/abort @@ -1122,7 +1143,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#setFloat32 (; 32 ;) (type $FUNCSIG$viifi) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) + (func $~lib/dataview/DataView#setFloat32 (; 33 ;) (type $FUNCSIG$viifi) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1135,7 +1156,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 116 i32.const 6 call $~lib/env/abort @@ -1162,7 +1183,7 @@ i32.store end ) - (func $~lib/dataview/DataView#setFloat64 (; 33 ;) (type $FUNCSIG$viidi) (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) + (func $~lib/dataview/DataView#setFloat64 (; 34 ;) (type $FUNCSIG$viidi) (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1175,7 +1196,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 125 i32.const 6 call $~lib/env/abort @@ -1202,14 +1223,14 @@ i64.store end ) - (func $~lib/dataview/DataView#setInt8 (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt8 (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 i32.ge_u if i32.const 0 - i32.const 104 + i32.const 152 i32.const 131 i32.const 49 call $~lib/env/abort @@ -1222,7 +1243,7 @@ local.get $2 i32.store8 ) - (func $~lib/dataview/DataView#setInt16 (; 35 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/dataview/DataView#setInt16 (; 36 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1235,7 +1256,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 139 i32.const 6 call $~lib/env/abort @@ -1256,7 +1277,7 @@ end i32.store16 ) - (func $~lib/dataview/DataView#setInt32 (; 36 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/dataview/DataView#setInt32 (; 37 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1269,7 +1290,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 147 i32.const 6 call $~lib/env/abort @@ -1290,7 +1311,7 @@ end i32.store ) - (func $~lib/dataview/DataView#setInt64 (; 37 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) + (func $~lib/dataview/DataView#setInt64 (; 38 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1303,7 +1324,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 196 i32.const 6 call $~lib/env/abort @@ -1324,14 +1345,14 @@ end i64.store ) - (func $~lib/dataview/DataView#setUint8 (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint8 (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 i32.ge_u if i32.const 0 - i32.const 104 + i32.const 152 i32.const 152 i32.const 49 call $~lib/env/abort @@ -1344,7 +1365,7 @@ local.get $2 i32.store8 ) - (func $~lib/dataview/DataView#setUint16 (; 39 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/dataview/DataView#setUint16 (; 40 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1357,7 +1378,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 160 i32.const 6 call $~lib/env/abort @@ -1378,7 +1399,7 @@ end i32.store16 ) - (func $~lib/dataview/DataView#setUint32 (; 40 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/dataview/DataView#setUint32 (; 41 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1391,7 +1412,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 168 i32.const 6 call $~lib/env/abort @@ -1412,7 +1433,7 @@ end i32.store ) - (func $~lib/dataview/DataView#setUint64 (; 41 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) + (func $~lib/dataview/DataView#setUint64 (; 42 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1425,7 +1446,7 @@ i32.or if i32.const 0 - i32.const 104 + i32.const 152 i32.const 204 i32.const 6 call $~lib/env/abort @@ -1446,7 +1467,7 @@ end i64.store ) - (func $start:std/dataview (; 42 ;) (type $FUNCSIG$v) + (func $start:std/dataview (; 43 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -1462,37 +1483,37 @@ call $~lib/typedarray/Uint8Array#constructor global.set $std/dataview/array global.get $std/dataview/array - i32.load offset=4 + i32.const 0 i32.const 246 - i32.store8 + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array - i32.load offset=4 + i32.const 1 i32.const 224 - i32.store8 offset=1 + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array - i32.load offset=4 + i32.const 2 i32.const 88 - i32.store8 offset=2 + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array - i32.load offset=4 + i32.const 3 i32.const 159 - i32.store8 offset=3 + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array - i32.load offset=4 + i32.const 4 i32.const 130 - i32.store8 offset=4 + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array - i32.load offset=4 + i32.const 5 i32.const 101 - i32.store8 offset=5 + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array - i32.load offset=4 + i32.const 6 i32.const 67 - i32.store8 offset=6 + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array - i32.load offset=4 + i32.const 7 i32.const 95 - i32.store8 offset=7 + call $~lib/typedarray/Uint8Array#__set i32.const 0 global.get $std/dataview/array call $~lib/typedarray/Uint8Array#get:buffer @@ -1511,7 +1532,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 16 i32.const 0 call $~lib/env/abort @@ -1526,7 +1547,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 17 i32.const 0 call $~lib/env/abort @@ -1541,7 +1562,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 18 i32.const 0 call $~lib/env/abort @@ -1556,7 +1577,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 19 i32.const 0 call $~lib/env/abort @@ -1571,7 +1592,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 20 i32.const 0 call $~lib/env/abort @@ -1586,7 +1607,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 22 i32.const 0 call $~lib/env/abort @@ -1601,7 +1622,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 23 i32.const 0 call $~lib/env/abort @@ -1616,7 +1637,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 24 i32.const 0 call $~lib/env/abort @@ -1631,7 +1652,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 25 i32.const 0 call $~lib/env/abort @@ -1646,7 +1667,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 26 i32.const 0 call $~lib/env/abort @@ -1661,7 +1682,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 28 i32.const 0 call $~lib/env/abort @@ -1676,7 +1697,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 29 i32.const 0 call $~lib/env/abort @@ -1690,7 +1711,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 31 i32.const 0 call $~lib/env/abort @@ -1704,7 +1725,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 32 i32.const 0 call $~lib/env/abort @@ -1718,7 +1739,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 33 i32.const 0 call $~lib/env/abort @@ -1732,7 +1753,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 34 i32.const 0 call $~lib/env/abort @@ -1746,7 +1767,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 35 i32.const 0 call $~lib/env/abort @@ -1760,7 +1781,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 36 i32.const 0 call $~lib/env/abort @@ -1774,7 +1795,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 37 i32.const 0 call $~lib/env/abort @@ -1788,7 +1809,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 38 i32.const 0 call $~lib/env/abort @@ -1807,7 +1828,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 40 i32.const 0 call $~lib/env/abort @@ -1826,7 +1847,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 41 i32.const 0 call $~lib/env/abort @@ -1845,7 +1866,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 42 i32.const 0 call $~lib/env/abort @@ -1864,7 +1885,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 43 i32.const 0 call $~lib/env/abort @@ -1883,7 +1904,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 44 i32.const 0 call $~lib/env/abort @@ -1902,7 +1923,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 45 i32.const 0 call $~lib/env/abort @@ -1921,7 +1942,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 46 i32.const 0 call $~lib/env/abort @@ -1940,7 +1961,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 48 i32.const 0 call $~lib/env/abort @@ -1959,7 +1980,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 49 i32.const 0 call $~lib/env/abort @@ -1978,7 +1999,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 50 i32.const 0 call $~lib/env/abort @@ -1997,7 +2018,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 51 i32.const 0 call $~lib/env/abort @@ -2016,7 +2037,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 52 i32.const 0 call $~lib/env/abort @@ -2035,7 +2056,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 53 i32.const 0 call $~lib/env/abort @@ -2054,7 +2075,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 54 i32.const 0 call $~lib/env/abort @@ -2069,7 +2090,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 56 i32.const 0 call $~lib/env/abort @@ -2084,7 +2105,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 57 i32.const 0 call $~lib/env/abort @@ -2099,7 +2120,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 58 i32.const 0 call $~lib/env/abort @@ -2114,7 +2135,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 59 i32.const 0 call $~lib/env/abort @@ -2129,7 +2150,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 60 i32.const 0 call $~lib/env/abort @@ -2144,7 +2165,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 62 i32.const 0 call $~lib/env/abort @@ -2159,7 +2180,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 63 i32.const 0 call $~lib/env/abort @@ -2174,7 +2195,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 64 i32.const 0 call $~lib/env/abort @@ -2189,7 +2210,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 65 i32.const 0 call $~lib/env/abort @@ -2204,7 +2225,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 66 i32.const 0 call $~lib/env/abort @@ -2219,7 +2240,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 68 i32.const 0 call $~lib/env/abort @@ -2234,7 +2255,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 69 i32.const 0 call $~lib/env/abort @@ -2248,7 +2269,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 71 i32.const 0 call $~lib/env/abort @@ -2262,7 +2283,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 72 i32.const 0 call $~lib/env/abort @@ -2276,7 +2297,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 73 i32.const 0 call $~lib/env/abort @@ -2290,7 +2311,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 74 i32.const 0 call $~lib/env/abort @@ -2304,7 +2325,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 75 i32.const 0 call $~lib/env/abort @@ -2318,7 +2339,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 76 i32.const 0 call $~lib/env/abort @@ -2332,7 +2353,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 77 i32.const 0 call $~lib/env/abort @@ -2346,7 +2367,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 78 i32.const 0 call $~lib/env/abort @@ -2363,7 +2384,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 80 i32.const 0 call $~lib/env/abort @@ -2380,7 +2401,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 81 i32.const 0 call $~lib/env/abort @@ -2397,7 +2418,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 82 i32.const 0 call $~lib/env/abort @@ -2414,7 +2435,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 83 i32.const 0 call $~lib/env/abort @@ -2431,7 +2452,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 84 i32.const 0 call $~lib/env/abort @@ -2448,7 +2469,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 85 i32.const 0 call $~lib/env/abort @@ -2465,7 +2486,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 86 i32.const 0 call $~lib/env/abort @@ -2482,7 +2503,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 88 i32.const 0 call $~lib/env/abort @@ -2499,7 +2520,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 89 i32.const 0 call $~lib/env/abort @@ -2516,7 +2537,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 90 i32.const 0 call $~lib/env/abort @@ -2533,7 +2554,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 91 i32.const 0 call $~lib/env/abort @@ -2550,7 +2571,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 92 i32.const 0 call $~lib/env/abort @@ -2567,7 +2588,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 93 i32.const 0 call $~lib/env/abort @@ -2584,7 +2605,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 94 i32.const 0 call $~lib/env/abort @@ -2599,7 +2620,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 96 i32.const 0 call $~lib/env/abort @@ -2614,7 +2635,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 97 i32.const 0 call $~lib/env/abort @@ -2629,7 +2650,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 98 i32.const 0 call $~lib/env/abort @@ -2644,7 +2665,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 99 i32.const 0 call $~lib/env/abort @@ -2659,7 +2680,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 100 i32.const 0 call $~lib/env/abort @@ -2674,7 +2695,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 102 i32.const 0 call $~lib/env/abort @@ -2689,7 +2710,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 103 i32.const 0 call $~lib/env/abort @@ -2704,7 +2725,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 104 i32.const 0 call $~lib/env/abort @@ -2719,7 +2740,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 105 i32.const 0 call $~lib/env/abort @@ -2734,7 +2755,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 106 i32.const 0 call $~lib/env/abort @@ -2749,7 +2770,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 108 i32.const 0 call $~lib/env/abort @@ -2764,7 +2785,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 109 i32.const 0 call $~lib/env/abort @@ -2784,7 +2805,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 112 i32.const 0 call $~lib/env/abort @@ -2804,7 +2825,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 115 i32.const 0 call $~lib/env/abort @@ -2824,7 +2845,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 118 i32.const 0 call $~lib/env/abort @@ -2844,7 +2865,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 121 i32.const 0 call $~lib/env/abort @@ -2862,7 +2883,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 124 i32.const 0 call $~lib/env/abort @@ -2886,7 +2907,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 127 i32.const 0 call $~lib/env/abort @@ -2910,7 +2931,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 130 i32.const 0 call $~lib/env/abort @@ -2930,7 +2951,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 133 i32.const 0 call $~lib/env/abort @@ -2950,7 +2971,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 136 i32.const 0 call $~lib/env/abort @@ -2970,7 +2991,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 139 i32.const 0 call $~lib/env/abort @@ -2990,7 +3011,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 142 i32.const 0 call $~lib/env/abort @@ -3008,7 +3029,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 145 i32.const 0 call $~lib/env/abort @@ -3030,7 +3051,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 148 i32.const 0 call $~lib/env/abort @@ -3052,7 +3073,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 151 i32.const 0 call $~lib/env/abort @@ -3072,7 +3093,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 154 i32.const 0 call $~lib/env/abort @@ -3092,7 +3113,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 157 i32.const 0 call $~lib/env/abort @@ -3112,7 +3133,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 160 i32.const 0 call $~lib/env/abort @@ -3132,16 +3153,16 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 192 i32.const 163 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 43 ;) (type $FUNCSIG$v) + (func $start (; 44 ;) (type $FUNCSIG$v) call $start:std/dataview ) - (func $null (; 44 ;) (type $FUNCSIG$v) + (func $null (; 45 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 4dc4e80b4e..0e885be7dc 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -1,6 +1,12 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (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))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\08\00\00\00\01\00\00\00\02") @@ -13,77 +19,527 @@ (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 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) (elem (i32.const 0) $null) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:std/static-array (; 1 ;) (type $FUNCSIG$v) - i32.const 44 + (func $~lib/array/Array#__get (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 40 i32.load i32.const 2 - i32.ne + i32.shr_u + i32.ge_u if i32.const 0 - i32.const 192 + 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#__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#__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 36 + i32.const 84 i32.load - i32.const -1 + local.get $0 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $~lib/array/Array#__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 40 + i32.const 92 i32.load - i32.lt_u - select + i32.ge_s + if + i32.const 92 + i32.const 1 + i32.store + end + ) + (func $~lib/array/Array#__get (; 8 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + local.get $0 + i32.const 128 i32.load - i32.const 1 - i32.ne + i32.const 2 + i32.shr_u + i32.ge_u if i32.const 0 - i32.const 192 - i32.const 7 + 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#__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#__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 36 + i32.const 172 i32.load - i32.const 4 + local.get $0 + i32.const 3 + i32.shl i32.add - i32.const -1 - i32.const 4 - i32.const 40 + f64.load + ) + (func $~lib/array/Array#__set (; 11 ;) (type $FUNCSIG$v) + i32.const 168 + i32.const 3 + call $~lib/array/ensureCapacity + i32.const 172 i32.load - i32.lt_u - select + 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.load i32.const 2 i32.ne if i32.const 0 i32.const 192 - i32.const 8 + i32.const 6 i32.const 0 call $~lib/env/abort unreachable end - i32.const 36 - i32.load + i32.const 0 + call $~lib/array/Array#__get + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 192 + i32.const 7 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 1 + call $~lib/array/Array#__get i32.const 2 - i32.store - i32.const 36 - i32.load - i32.const -1 + i32.ne + if + i32.const 0 + i32.const 192 + i32.const 8 + i32.const 0 + call $~lib/env/abort + unreachable + end + call $~lib/array/Array#__set i32.const 0 - i32.const 40 - i32.load - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 2 i32.ne if @@ -106,15 +562,8 @@ call $~lib/env/abort unreachable end - i32.const 84 - i32.load - i32.const -1 i32.const 0 - i32.const 88 - i32.load - i32.lt_u - select - i64.load + call $~lib/array/Array#__get i64.const 3 i64.ne if @@ -125,17 +574,8 @@ call $~lib/env/abort unreachable end - i32.const 84 - i32.load - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - i32.const 88 - i32.load - i32.lt_u - select - i64.load + i32.const 1 + call $~lib/array/Array#__get i64.const 4 i64.ne if @@ -146,19 +586,9 @@ call $~lib/env/abort unreachable end - i32.const 84 - i32.load - i64.const 4 - i64.store - i32.const 84 - i32.load - i32.const -1 + call $~lib/array/Array#__set i32.const 0 - i32.const 88 - i32.load - i32.lt_u - select - i64.load + call $~lib/array/Array#__get i64.const 4 i64.ne if @@ -181,15 +611,8 @@ call $~lib/env/abort unreachable end - i32.const 124 - i32.load - i32.const -1 i32.const 0 - i32.const 128 - i32.load - i32.lt_u - select - f32.load + call $~lib/array/Array#__get f32.const 1.5 f32.ne if @@ -200,17 +623,8 @@ call $~lib/env/abort unreachable end - i32.const 124 - i32.load - i32.const 4 - i32.add - i32.const -1 - i32.const 4 - i32.const 128 - i32.load - i32.lt_u - select - f32.load + i32.const 1 + call $~lib/array/Array#__get f32.const 2.5 f32.ne if @@ -221,19 +635,9 @@ call $~lib/env/abort unreachable end - i32.const 124 - i32.load - f32.const 2.5 - f32.store - i32.const 124 - i32.load - i32.const -1 + call $~lib/array/Array#__set i32.const 0 - i32.const 128 - i32.load - i32.lt_u - select - f32.load + call $~lib/array/Array#__get f32.const 2.5 f32.ne if @@ -256,15 +660,8 @@ call $~lib/env/abort unreachable end - i32.const 172 - i32.load - i32.const -1 i32.const 0 - i32.const 176 - i32.load - i32.lt_u - select - f64.load + call $~lib/array/Array#__get f64.const 1.25 f64.ne if @@ -275,17 +672,8 @@ call $~lib/env/abort unreachable end - i32.const 172 - i32.load - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - i32.const 176 - i32.load - i32.lt_u - select - f64.load + i32.const 1 + call $~lib/array/Array#__get f64.const 2.25 f64.ne if @@ -296,19 +684,9 @@ call $~lib/env/abort unreachable end - i32.const 172 - i32.load - f64.const 2.25 - f64.store - i32.const 172 - i32.load - i32.const -1 + call $~lib/array/Array#__set i32.const 0 - i32.const 176 - i32.load - i32.lt_u - select - f64.load + call $~lib/array/Array#__get f64.const 2.25 f64.ne if @@ -320,10 +698,10 @@ unreachable end ) - (func $start (; 2 ;) (type $FUNCSIG$v) + (func $start (; 13 ;) (type $FUNCSIG$v) call $start:std/static-array ) - (func $null (; 3 ;) (type $FUNCSIG$v) + (func $null (; 14 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 24b6ac34f1..85a9a4dce0 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -1,6 +1,15 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$jii (func (param i32 i32) (result i64))) + (type $FUNCSIG$viij (func (param i32 i32 i64))) + (type $FUNCSIG$fii (func (param i32 i32) (result f32))) + (type $FUNCSIG$viif (func (param i32 i32 f32))) + (type $FUNCSIG$dii (func (param i32 i32) (result f64))) + (type $FUNCSIG$viid (func (param i32 i32 f64))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -13,6 +22,8 @@ (data (i32.const 136) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\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\00\00\00") (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\00") + (data (i32.const 232) "\06\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (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\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/static-array/i i32 (i32.const 32)) @@ -22,7 +33,8 @@ (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/memory/HEAP_BASE i32 (i32.const 232)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 312)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -30,21 +42,2078 @@ local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#get:length (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#__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 240 + 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 (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $~lib/util/memory/memcpy (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $break|0 + loop $continue|0 + local.get $2 + if (result i32) + local.get $1 + i32.const 3 + i32.and + else + local.get $2 + end + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|0 + end + end + end + local.get $0 + i32.const 3 + i32.and + i32.const 0 + i32.eq + if + block $break|1 + loop $continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + block + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|1 + end + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.set $0 + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $0 + i32.const 2 + i32.add + local.set $0 + local.get $1 + i32.const 2 + i32.add + local.set $1 + end + local.get $2 + i32.const 1 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + block $case0|2 + local.get $0 + i32.const 3 + i32.and + local.set $5 + local.get $5 + i32.const 1 + i32.eq + br_if $case0|2 + local.get $5 + i32.const 2 + i32.eq + br_if $case1|2 + local.get $5 + i32.const 3 + i32.eq + br_if $case2|2 + br $break|2 + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + block $break|3 + loop $continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + block + local.get $1 + i32.const 1 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 5 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 9 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 13 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|3 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + block $break|4 + loop $continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + block + local.get $1 + i32.const 2 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 6 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 10 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 14 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|4 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block $break|5 + loop $continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + block + local.get $1 + i32.const 3 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 7 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 11 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 15 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|5 + end + end + end + br $break|2 + unreachable + end + unreachable + end + end + local.get $2 + i32.const 16 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + ) + (func $~lib/memory/memory.copy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + local.tee $3 + if (result i32) + local.get $3 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + end + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 + if + block + block (result i32) + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + end + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|2 + end + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + end + ) + (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 1 + i32.add + local.get $1 + i32.store8 + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $4 + local.get $0 + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 12 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 24 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 20 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.get $4 + i32.store + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $4 + i64.extend_i32_u + local.get $4 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $5 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $5 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $5 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + end + br $continue|0 + end + end + end + end + ) + (func $~lib/memory/memory.free (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/doReallocate (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $3 + local.get $1 + i32.lt_u + if + local.get $1 + call $~lib/runtime/ADJUSTOBLOCK + local.set $4 + local.get $3 + call $~lib/runtime/ADJUSTOBLOCK + i32.const 0 + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + select + local.get $4 + i32.lt_u + if + local.get $4 + call $~lib/memory/memory.allocate + local.set $5 + local.get $5 + local.get $2 + i32.load + i32.store + local.get $5 + global.get $~lib/runtime/HEADER_SIZE + i32.add + local.set $6 + local.get $6 + local.get $0 + local.get $3 + call $~lib/memory/memory.copy + local.get $6 + local.get $3 + i32.add + i32.const 0 + local.get $1 + local.get $3 + i32.sub + call $~lib/memory/memory.fill + local.get $2 + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + if + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 280 + i32.const 100 + i32.const 8 + call $~lib/env/abort + unreachable + end + local.get $2 + call $~lib/memory/memory.free + else + nop + end + local.get $5 + local.set $2 + local.get $6 + local.set $0 + else + local.get $0 + local.get $3 + i32.add + i32.const 0 + local.get $1 + local.get $3 + i32.sub + call $~lib/memory/memory.fill + end + else + nop + end + local.get $2 + local.get $1 + i32.store offset=4 + local.get $0 + ) + (func $~lib/array/ensureCapacity (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $1 + local.get $0 + i32.load offset=8 + local.get $2 + i32.shr_u + i32.gt_u + if + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH + local.get $2 + 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.set $3 + local.get $1 + local.get $2 + i32.shl + local.set $4 + block $~lib/runtime/REALLOCATE|inlined.0 (result i32) + local.get $3 + local.set $5 + local.get $4 + local.set $6 + local.get $5 + local.get $6 + call $~lib/runtime/doReallocate + end + local.set $6 + local.get $6 + local.get $3 + i32.ne + if + local.get $0 + local.get $6 + i32.store + local.get $0 + local.get $6 + i32.store offset=4 + end + local.get $0 + local.get $4 + i32.store offset=8 + end + ) + (func $~lib/array/Array#__set (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureCapacity + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $~lib/array/Array#get:length (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $~lib/array/Array#__get (; 13 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + local.get $1 + local.get $0 + i32.load offset=8 + 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 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $~lib/array/Array#__set (; 14 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 3 + call $~lib/array/ensureCapacity + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + i64.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $~lib/array/Array#get:length (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $~lib/array/Array#__get (; 16 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + 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 240 + 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 + f32.load + ) + (func $~lib/array/Array#__set (; 17 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureCapacity + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + f32.store + local.get $1 local.get $0 i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end ) - (func $~lib/array/Array#get:length (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#get:length (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#__get (; 19 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + local.get $1 + local.get $0 + i32.load offset=8 + 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 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + ) + (func $~lib/array/Array#__set (; 20 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 3 + call $~lib/array/ensureCapacity + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + f64.store + local.get $1 local.get $0 i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end ) - (func $start:std/static-array (; 5 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) + (func $start:std/static-array (; 21 ;) (type $FUNCSIG$v) global.get $std/static-array/i call $~lib/array/Array#get:length i32.const 2 @@ -59,20 +2128,8 @@ unreachable end global.get $std/static-array/i - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 1 i32.eq i32.eqz @@ -85,20 +2142,8 @@ unreachable end global.get $std/static-array/i - local.tee $0 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 2 i32.eq i32.eqz @@ -111,24 +2156,12 @@ unreachable end global.get $std/static-array/i - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store + call $~lib/array/Array#__set global.get $std/static-array/i - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 2 i32.eq i32.eqz @@ -154,20 +2187,8 @@ unreachable end global.get $std/static-array/I - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 3 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load + call $~lib/array/Array#__get i64.const 3 i64.eq i32.eqz @@ -180,20 +2201,8 @@ unreachable end global.get $std/static-array/I - local.tee $0 - i32.load offset=4 i32.const 1 - i32.const 3 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load + call $~lib/array/Array#__get i64.const 4 i64.eq i32.eqz @@ -206,24 +2215,12 @@ unreachable end global.get $std/static-array/I - i32.load offset=4 + i32.const 0 i64.const 4 - i64.store + call $~lib/array/Array#__set global.get $std/static-array/I - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 3 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load + call $~lib/array/Array#__get i64.const 4 i64.eq i32.eqz @@ -249,20 +2246,8 @@ unreachable end global.get $std/static-array/f - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f32.load + call $~lib/array/Array#__get f32.const 1.5 f32.eq i32.eqz @@ -275,20 +2260,8 @@ unreachable end global.get $std/static-array/f - local.tee $0 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f32.load + call $~lib/array/Array#__get f32.const 2.5 f32.eq i32.eqz @@ -301,24 +2274,12 @@ unreachable end global.get $std/static-array/f - i32.load offset=4 + i32.const 0 f32.const 2.5 - f32.store + call $~lib/array/Array#__set global.get $std/static-array/f - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f32.load + call $~lib/array/Array#__get f32.const 2.5 f32.eq i32.eqz @@ -344,20 +2305,8 @@ unreachable end global.get $std/static-array/F - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 3 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/array/Array#__get f64.const 1.25 f64.eq i32.eqz @@ -370,20 +2319,8 @@ unreachable end global.get $std/static-array/F - local.tee $0 - i32.load offset=4 i32.const 1 - i32.const 3 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/array/Array#__get f64.const 2.25 f64.eq i32.eqz @@ -396,24 +2333,12 @@ unreachable end global.get $std/static-array/F - i32.load offset=4 + i32.const 0 f64.const 2.25 - f64.store + call $~lib/array/Array#__set global.get $std/static-array/F - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 3 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/array/Array#__get f64.const 2.25 f64.eq i32.eqz @@ -426,9 +2351,9 @@ unreachable end ) - (func $start (; 6 ;) (type $FUNCSIG$v) + (func $start (; 22 ;) (type $FUNCSIG$v) call $start:std/static-array ) - (func $null (; 7 ;) (type $FUNCSIG$v) + (func $null (; 23 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 306b866fc3..fa751ca766 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -3207,11 +3207,7 @@ (local $3 i32) local.get $1 local.get $0 - i32.load - local.tee $2 - i32.const 8 - i32.sub - i32.load offset=4 + i32.load offset=8 i32.const 2 i32.shr_u i32.gt_u @@ -3222,19 +3218,21 @@ if i32.const 0 i32.const 1440 - i32.const 12 + i32.const 10 i32.const 64 call $~lib/env/abort unreachable end - local.get $2 - local.get $2 + local.get $0 + i32.load + local.tee $2 local.get $1 i32.const 2 i32.shl local.tee $3 call $~lib/runtime/doReallocate local.tee $1 + local.get $2 i32.ne if local.get $0 @@ -3541,7 +3539,30 @@ end local.get $6 ) - (func $~lib/util/number/decimalCount32 (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#__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 i32.const 100000 i32.lt_u @@ -3595,7 +3616,7 @@ 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 $4 i32) i32.const 2060 @@ -3705,7 +3726,7 @@ i32.store16 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 $2 i32) (local $3 i32) @@ -3747,7 +3768,7 @@ i32.const 1 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 $2 i32) local.get $0 @@ -3770,7 +3791,7 @@ i32.const 1 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 i64.const 1000000000000000 i64.lt_u @@ -3824,7 +3845,7 @@ 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 $4 i32) (local $5 i32) @@ -3921,7 +3942,7 @@ local.get $2 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 $2 i32) (local $3 i32) @@ -3963,7 +3984,7 @@ i32.const 1 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 $2 i32) (local $3 i32) @@ -4028,7 +4049,7 @@ i32.const 1 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 $8 i32) (local $9 i64) @@ -4446,7 +4467,7 @@ local.get $7 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 $4 i32) local.get $2 @@ -4707,7 +4728,7 @@ 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 $3 i64) (local $4 i64) @@ -5019,7 +5040,7 @@ local.get $12 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 $3 i32) (local $4 i32) @@ -5117,7 +5138,7 @@ i32.const 1 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 $2 i32) local.get $0 @@ -5162,7 +5183,7 @@ call $~lib/runtime/assertUnregistered local.get $1 ) - (func $start:std/string (; 52 ;) (type $FUNCSIG$v) + (func $start:std/string (; 53 ;) (type $FUNCSIG$v) (local $0 i32) global.get $std/string/str i32.const 16 @@ -6664,15 +6685,8 @@ local.tee $0 if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 312 call $~lib/string/String.__eq local.set $0 @@ -6714,15 +6728,8 @@ local.tee $0 if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 312 call $~lib/string/String.__eq local.set $0 @@ -6749,15 +6756,8 @@ local.tee $0 if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 1480 call $~lib/string/String.__eq local.set $0 @@ -6786,15 +6786,8 @@ local.tee $0 if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq local.set $0 @@ -6803,17 +6796,8 @@ end if global.get $std/string/sa - 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 1 + call $~lib/array/Array#__get i32.const 824 call $~lib/string/String.__eq local.set $0 @@ -6822,17 +6806,8 @@ end if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/array/Array#__get i32.const 1520 call $~lib/string/String.__eq local.set $0 @@ -6861,15 +6836,8 @@ local.tee $0 if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq local.set $0 @@ -6878,17 +6846,8 @@ end if global.get $std/string/sa - 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 1 + call $~lib/array/Array#__get i32.const 824 call $~lib/string/String.__eq local.set $0 @@ -6897,17 +6856,8 @@ end if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/array/Array#__get i32.const 1520 call $~lib/string/String.__eq local.set $0 @@ -6937,15 +6887,8 @@ local.tee $0 if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq local.set $0 @@ -6954,17 +6897,8 @@ end if global.get $std/string/sa - 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 1 + call $~lib/array/Array#__get i32.const 824 call $~lib/string/String.__eq local.set $0 @@ -6973,17 +6907,8 @@ end if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/array/Array#__get i32.const 312 call $~lib/string/String.__eq local.set $0 @@ -6992,17 +6917,8 @@ end if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const 12 - i32.add - i32.const -1 - i32.const 12 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 3 + call $~lib/array/Array#__get i32.const 1520 call $~lib/string/String.__eq local.set $0 @@ -7032,15 +6948,8 @@ local.tee $0 if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 312 call $~lib/string/String.__eq local.set $0 @@ -7049,17 +6958,8 @@ end if global.get $std/string/sa - 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 1 + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq local.set $0 @@ -7068,17 +6968,8 @@ end if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/array/Array#__get i32.const 824 call $~lib/string/String.__eq local.set $0 @@ -7087,17 +6978,8 @@ end if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const 12 - i32.add - i32.const -1 - i32.const 12 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 3 + call $~lib/array/Array#__get i32.const 1520 call $~lib/string/String.__eq local.set $0 @@ -7127,15 +7009,8 @@ local.tee $0 if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq local.set $0 @@ -7144,17 +7019,8 @@ end if global.get $std/string/sa - 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 1 + call $~lib/array/Array#__get i32.const 824 call $~lib/string/String.__eq local.set $0 @@ -7163,17 +7029,8 @@ end if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/array/Array#__get i32.const 1520 call $~lib/string/String.__eq local.set $0 @@ -7182,17 +7039,8 @@ end if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const 12 - i32.add - i32.const -1 - i32.const 12 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 3 + call $~lib/array/Array#__get i32.const 312 call $~lib/string/String.__eq local.set $0 @@ -7221,15 +7069,8 @@ local.tee $0 if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq local.set $0 @@ -7238,17 +7079,8 @@ end if global.get $std/string/sa - 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 1 + call $~lib/array/Array#__get i32.const 824 call $~lib/string/String.__eq local.set $0 @@ -7257,17 +7089,8 @@ end if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/array/Array#__get i32.const 1520 call $~lib/string/String.__eq local.set $0 @@ -7309,15 +7132,8 @@ local.tee $0 if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq local.set $0 @@ -7344,15 +7160,8 @@ local.tee $0 if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq local.set $0 @@ -7381,15 +7190,8 @@ local.tee $0 if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq local.set $0 @@ -7398,17 +7200,8 @@ end if global.get $std/string/sa - 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 1 + call $~lib/array/Array#__get i32.const 824 call $~lib/string/String.__eq local.set $0 @@ -7417,17 +7210,8 @@ end if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/array/Array#__get i32.const 1520 call $~lib/string/String.__eq local.set $0 @@ -7456,15 +7240,8 @@ local.tee $0 if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq local.set $0 @@ -7473,17 +7250,8 @@ end if global.get $std/string/sa - 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 1 + call $~lib/array/Array#__get i32.const 824 call $~lib/string/String.__eq local.set $0 @@ -7492,17 +7260,8 @@ end if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/array/Array#__get i32.const 1520 call $~lib/string/String.__eq local.set $0 @@ -7531,15 +7290,8 @@ local.tee $0 if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq local.set $0 @@ -7548,17 +7300,8 @@ end if global.get $std/string/sa - 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 1 + call $~lib/array/Array#__get i32.const 824 call $~lib/string/String.__eq local.set $0 @@ -7567,17 +7310,8 @@ end if global.get $std/string/sa - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/array/Array#__get i32.const 1520 call $~lib/string/String.__eq local.set $0 @@ -8776,13 +8510,13 @@ unreachable 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 ) - (func $start (; 54 ;) (type $FUNCSIG$v) + (func $start (; 55 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 55 ;) (type $FUNCSIG$v) + (func $null (; 56 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 432d6c8547..6e5eeebe17 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -3854,18 +3854,12 @@ i32.store offset=12 local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - i32.load offset=4 - ) - (func $~lib/memory/memory.free (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 local.set $1 ) - (func $~lib/runtime/doReallocate (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doReallocate (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3962,22 +3956,16 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) + local.get $1 local.get $0 - i32.load - local.set $3 - local.get $3 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.load offset=8 local.get $2 i32.shr_u - local.set $4 - local.get $1 - local.get $4 i32.gt_u if local.get $1 @@ -3988,42 +3976,45 @@ if i32.const 0 i32.const 1440 - i32.const 12 + i32.const 10 i32.const 64 call $~lib/env/abort unreachable end + local.get $0 + i32.load + local.set $3 local.get $1 local.get $2 i32.shl - local.set $5 + local.set $4 block $~lib/runtime/REALLOCATE|inlined.0 (result i32) local.get $3 + local.set $5 + local.get $4 local.set $6 local.get $5 - local.set $7 local.get $6 - local.get $7 call $~lib/runtime/doReallocate end - local.set $7 - local.get $7 + local.set $6 + local.get $6 local.get $3 i32.ne if local.get $0 - local.get $7 + local.get $6 i32.store local.get $0 - local.get $7 + local.get $6 i32.store offset=4 end local.get $0 - local.get $5 + local.get $4 i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 @@ -4050,7 +4041,7 @@ i32.store offset=12 end ) - (func $~lib/array/Array#push (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -4076,7 +4067,7 @@ i32.store local.get $2 ) - (func $~lib/runtime/assertRegistered (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertRegistered (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -4093,13 +4084,13 @@ unreachable end ) - (func $~lib/runtime/doLink (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/runtime/doLink (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 call $~lib/runtime/assertRegistered local.get $1 call $~lib/runtime/assertRegistered ) - (func $~lib/string/String#split (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4410,10 +4401,33 @@ end local.get $10 ) - (func $~lib/array/Array#get:length (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) + (func $~lib/array/Array#__get (; 47 ;) (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 (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 @@ -8242,20 +8256,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 312 call $~lib/string/String.__eq else @@ -8300,20 +8302,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 312 call $~lib/string/String.__eq else @@ -8340,20 +8330,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 1480 call $~lib/string/String.__eq else @@ -8380,75 +8358,33 @@ local.tee $2 if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 824 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 - i32.const 2 i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 1520 call $~lib/string/String.__eq else local.get $2 end - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -8470,75 +8406,33 @@ local.tee $2 if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 824 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 - i32.const 2 i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 1520 call $~lib/string/String.__eq else local.get $2 end - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -8560,99 +8454,43 @@ local.tee $2 if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 824 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 - i32.const 2 i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 312 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 3 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 1520 call $~lib/string/String.__eq else local.get $2 end - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -8674,99 +8512,43 @@ local.tee $2 if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 312 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 2 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 824 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 3 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 1520 call $~lib/string/String.__eq else local.get $2 end - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -8788,99 +8570,43 @@ local.tee $2 if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 824 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 - i32.const 2 i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 1520 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 3 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 312 call $~lib/string/String.__eq else local.get $2 end - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -8902,75 +8628,33 @@ local.tee $2 if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 824 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 - i32.const 2 i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 1520 call $~lib/string/String.__eq else local.get $2 end - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -9010,20 +8694,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq else @@ -9050,20 +8722,8 @@ local.tee $2 if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq else @@ -9090,75 +8750,33 @@ local.tee $2 if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 824 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 2 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 1520 call $~lib/string/String.__eq else local.get $2 end - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -9180,75 +8798,33 @@ local.tee $2 if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 824 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 - i32.const 2 i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 1520 call $~lib/string/String.__eq else local.get $2 end - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -9270,75 +8846,33 @@ local.tee $2 if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 336 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 824 call $~lib/string/String.__eq else local.get $2 end local.tee $2 - i32.const 0 - i32.ne if (result i32) global.get $std/string/sa - local.tee $2 - i32.load offset=4 i32.const 2 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 1520 call $~lib/string/String.__eq else local.get $2 end - i32.const 0 - i32.ne i32.eqz if i32.const 0 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 8a1e5dc1ac..6e9cc65350 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -5,14 +5,20 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$viid (func (param i32 i32 f64))) (type $FUNCSIG$idd (func (param f64 f64) (result i32))) + (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) + (type $FUNCSIG$viij (func (param i32 i32 i64))) (type $FUNCSIG$jjjii (func (param i64 i64 i32 i32) (result i64))) + (type $FUNCSIG$viif (func (param i32 i32 f32))) (type $FUNCSIG$fffii (func (param f32 f32 i32 i32) (result f32))) (type $FUNCSIG$dddii (func (param f64 f64 i32 i32) (result f64))) (type $FUNCSIG$jjii (func (param i64 i32 i32) (result i64))) + (type $FUNCSIG$jii (func (param i32 i32) (result i64))) (type $FUNCSIG$ffii (func (param f32 i32 i32) (result f32))) + (type $FUNCSIG$fii (func (param i32 i32) (result f32))) (type $FUNCSIG$ddii (func (param f64 i32 i32) (result f64))) (type $FUNCSIG$ijii (func (param i64 i32 i32) (result i32))) (type $FUNCSIG$ifii (func (param f32 i32 i32) (result i32))) @@ -21,7 +27,6 @@ (type $FUNCSIG$vjii (func (param i64 i32 i32))) (type $FUNCSIG$vfii (func (param f32 i32 i32))) (type $FUNCSIG$vdii (func (param f64 i32 i32))) - (type $FUNCSIG$jii (func (param i32 i32) (result i64))) (type $FUNCSIG$fi (func (param i32) (result f32))) (type $FUNCSIG$di (func (param i32) (result f64))) (type $FUNCSIG$ff (func (param f32) (result f32))) @@ -31,33 +36,35 @@ (data (i32.const 8) "\01\00\00\00\"\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 56) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (data (i32.const 96) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 144) "\02\00\00\00\05\00\00\00\01\01\01\04\05") - (data (i32.const 160) "\02\00\00\00\05") - (data (i32.const 176) "\02\00\00\00\05\00\00\00\01\01") - (data (i32.const 192) "\02\00\00\00\05\00\00\00\01\01\00\02\02") - (data (i32.const 208) "\02\00\00\00\05\00\00\00\01\01\00\02\02") - (data (i32.const 224) "\02\00\00\00\03") - (data (i32.const 240) "\02\00\00\00\05\00\00\00\01\00\00\00\02") - (data (i32.const 256) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") - (data (i32.const 288) "\02\00\00\00\14") - (data (i32.const 320) "\02\00\00\00\14\00\00\00\01\00\00\00\01") - (data (i32.const 352) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 384) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 416) "\02\00\00\00\0c") - (data (i32.const 440) "\02\00\00\00\14\00\00\00\01") - (data (i32.const 464) "\02") - (data (i32.const 472) "\01\00\00\00\1e\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 512) "\01\00\00\00(\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 560) "\02\00\00\00\0c\00\00\00\n\00\00\00\0c\00\00\00\0e") - (data (i32.const 584) "\10\00\00\00\10\00\00\008\02\00\008\02\00\00\0c\00\00\00\03") - (data (i32.const 608) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 664) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 720) "\01\00\00\00>\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 792) "\01\00\00\006\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 856) "\02\00\00\00$\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") - (data (i32.const 904) "\10\00\00\00\10\00\00\00`\03\00\00`\03\00\00$\00\00\00\t") - (data (i32.const 928) "\01\00\00\00B\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 1008) "\01\00\00\00V\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 144) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 192) "\02\00\00\00\05\00\00\00\01\01\01\04\05") + (data (i32.const 208) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 248) "\02\00\00\00\05") + (data (i32.const 264) "\02\00\00\00\05\00\00\00\01\01") + (data (i32.const 280) "\02\00\00\00\05\00\00\00\01\01\00\02\02") + (data (i32.const 296) "\02\00\00\00\05\00\00\00\01\01\00\02\02") + (data (i32.const 312) "\02\00\00\00\03") + (data (i32.const 328) "\02\00\00\00\05\00\00\00\01\00\00\00\02") + (data (i32.const 344) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") + (data (i32.const 376) "\02\00\00\00\14") + (data (i32.const 408) "\02\00\00\00\14\00\00\00\01\00\00\00\01") + (data (i32.const 440) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") + (data (i32.const 472) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") + (data (i32.const 504) "\02\00\00\00\0c") + (data (i32.const 528) "\02\00\00\00\14\00\00\00\01") + (data (i32.const 552) "\02") + (data (i32.const 560) "\01\00\00\00\1e\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 600) "\01\00\00\00(\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 648) "\02\00\00\00\0c\00\00\00\n\00\00\00\0c\00\00\00\0e") + (data (i32.const 672) "\10\00\00\00\10\00\00\00\90\02\00\00\90\02\00\00\0c\00\00\00\03") + (data (i32.const 696) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 752) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 808) "\01\00\00\00>\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 880) "\01\00\00\006\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 944) "\02\00\00\00$\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") + (data (i32.const 992) "\10\00\00\00\10\00\00\00\b8\03\00\00\b8\03\00\00$\00\00\00\t") + (data (i32.const 1016) "\01\00\00\00B\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 1096) "\01\00\00\00V\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") (table $0 112 funcref) (elem (i32.const 0) $null $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -76,8 +83,8 @@ (global $std/typedarray/multisubarr3 (mut i32) (i32.const 0)) (global $std/typedarray/forEachCallCount (mut i32) (i32.const 0)) (global $std/typedarray/forEachSelf (mut i32) (i32.const 0)) - (global $std/typedarray/forEachValues (mut i32) (i32.const 592)) - (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 912)) + (global $std/typedarray/forEachValues (mut i32) (i32.const 680)) + (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 1000)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -391,7 +398,7 @@ ) (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 1104 + i32.const 1192 i32.le_u if i32.const 0 @@ -507,17 +514,12 @@ i32.const 0 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint8Array#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 5 + call $~lib/runtime/doRegister local.get $0 - if (result i32) - local.get $0 - else - i32.const 12 - call $~lib/runtime/doAllocate - i32.const 5 - call $~lib/runtime/doRegister - end - local.get $1 i32.const 0 call $~lib/runtime/ArrayBufferView#constructor ) @@ -527,7 +529,8 @@ i32.const 6 call $~lib/runtime/doRegister local.get $0 - call $~lib/typedarray/Uint8Array#constructor + i32.const 0 + call $~lib/runtime/ArrayBufferView#constructor ) (func $~lib/typedarray/Int16Array#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 @@ -642,7 +645,6 @@ call $~lib/env/abort unreachable end - i32.const 0 local.get $0 call $~lib/typedarray/Uint8Array#constructor local.tee $1 @@ -1066,7 +1068,54 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#subarray (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#__set (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 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 152 + i32.const 435 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + ) + (func $~lib/typedarray/Int32Array#__get (; 21 ;) (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 152 + i32.const 429 + i32.const 63 + 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/typedarray/Int32Array#subarray (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1153,7 +1202,31 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Float64Array#subarray (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#__set (; 23 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 840 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + f64.store + ) + (func $~lib/typedarray/Float64Array#subarray (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1240,7 +1313,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/util/sort/insertionSort (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) @@ -1322,7 +1395,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1578,7 +1651,7 @@ local.get $6 f64.store ) - (func $~lib/typedarray/Float64Array#sort (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#sort (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 f64) @@ -1638,7 +1711,7 @@ end end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 25 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 28 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -1667,7 +1740,101 @@ i64.lt_s i32.sub ) - (func $~lib/typedarray/Int8Array#fill (; 26 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/typedarray/Float64Array#__get (; 29 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 834 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + ) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 192 + i32.const 44 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + i32.const 255 + local.get $2 + i32.sub + i32.const 31 + i32.shr_s + local.get $2 + i32.or + local.get $2 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.and + i32.store8 + ) + (func $~lib/typedarray/Uint8ClampedArray#__get (; 31 ;) (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 152 + i32.const 186 + i32.const 44 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + i32.load8_u + ) + (func $~lib/typedarray/Int8Array#__set (; 32 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 30 + i32.const 44 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + local.get $2 + i32.store8 + ) + (func $~lib/typedarray/Int8Array#fill (; 33 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) local.get $0 @@ -1734,7 +1901,7 @@ call $~lib/memory/memory.fill end ) - (func $~lib/util/memory/memcpy (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2631,7 +2798,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2825,7 +2992,7 @@ end end ) - (func $~lib/runtime/doWrapArray (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/doWrapArray (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) i32.const 16 @@ -2860,7 +3027,45 @@ call $~lib/memory/memory.copy local.get $3 ) - (func $std/typedarray/isInt8ArrayEqual (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 37 ;) (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 152 + i32.const 24 + i32.const 44 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + i32.load8_s + ) + (func $~lib/array/Array#__get (; 38 ;) (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 216 + 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 $std/typedarray/isInt8ArrayEqual (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2881,27 +3086,11 @@ i32.lt_s if local.get $0 - i32.load offset=4 - local.get $2 - i32.add - i32.const -1 local.get $2 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/typedarray/Int8Array#__get local.get $1 - i32.load offset=4 - local.get $2 - i32.add - i32.const -1 local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/array/Array#__get i32.ne if i32.const 0 @@ -2918,7 +3107,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2999,7 +3188,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Int32Array#fill (; 32 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/typedarray/Int32Array#fill (; 41 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) local.get $0 @@ -3075,10 +3264,32 @@ end end ) - (func $std/typedarray/isInt32ArrayEqual (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 42 ;) (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 216 + 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/typedarray/isInt32ArrayEqual (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $1 i32.load offset=12 local.get $0 @@ -3094,37 +3305,18 @@ i32.load offset=8 i32.const 2 i32.shr_u - local.set $4 + local.set $3 loop $repeat|0 local.get $2 - local.get $4 + local.get $3 i32.lt_s if - local.get $2 - i32.const 2 - i32.shl - local.tee $3 - local.get $0 - i32.load offset=4 - i32.add - i32.const -1 - local.get $3 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - local.get $1 - i32.load offset=4 - local.get $3 - i32.add - i32.const -1 - local.get $3 + local.get $2 + call $~lib/typedarray/Int32Array#__get local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + local.get $2 + call $~lib/array/Array#__get i32.ne if i32.const 0 @@ -3141,12 +3333,12 @@ end i32.const 1 ) - (func $std/typedarray/testReduce~anonymous|0 (; 34 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 44 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduce (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3183,22 +3375,22 @@ end local.get $2 ) - (func $std/typedarray/testReduce (; 36 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 46 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Int8Array#__set local.get $0 call $~lib/typedarray/Int8Array#reduce i32.const 255 @@ -3214,14 +3406,34 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reduce (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load offset=4 - local.set $4 + (func $~lib/typedarray/Uint8Array#__set (; 47 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 111 + i32.const 44 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + local.get $2 + i32.store8 + ) + (func $~lib/typedarray/Uint8Array#reduce (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $4 local.get $0 i32.load offset=8 local.set $5 @@ -3251,23 +3463,22 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 38 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 49 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 call $~lib/typedarray/Uint8Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 3 call $~lib/typedarray/Uint8Array#reduce @@ -3284,22 +3495,22 @@ unreachable end ) - (func $std/typedarray/testReduce (; 39 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 50 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 4 call $~lib/typedarray/Uint8Array#reduce @@ -3316,7 +3527,31 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reduce (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#__set (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 273 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $2 + i32.store16 + ) + (func $~lib/typedarray/Int16Array#reduce (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3357,22 +3592,22 @@ end local.get $2 ) - (func $std/typedarray/testReduce (; 41 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 53 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store16 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store16 offset=2 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store16 offset=4 + call $~lib/typedarray/Int16Array#__set local.get $0 call $~lib/typedarray/Int16Array#reduce i32.const 65535 @@ -3388,7 +3623,31 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reduce (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__set (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 354 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $2 + i32.store16 + ) + (func $~lib/typedarray/Uint16Array#reduce (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3429,22 +3688,22 @@ end local.get $2 ) - (func $std/typedarray/testReduce (; 43 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 56 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store16 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store16 offset=2 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store16 offset=4 + call $~lib/typedarray/Uint16Array#__set local.get $0 call $~lib/typedarray/Uint16Array#reduce i32.const 65535 @@ -3460,7 +3719,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reduce (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3501,22 +3760,22 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 45 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 58 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store offset=4 + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store offset=8 + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 7 call $~lib/typedarray/Int32Array#reduce @@ -3531,22 +3790,46 @@ unreachable end ) - (func $std/typedarray/testReduce (; 46 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Uint32Array#__set (; 59 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 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 152 + i32.const 516 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + ) + (func $std/typedarray/testReduce (; 60 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store offset=4 + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store offset=8 + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 8 call $~lib/typedarray/Int32Array#reduce @@ -3561,12 +3844,36 @@ unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 47 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $~lib/typedarray/Int64Array#__set (; 61 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 597 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + i64.store + ) + (func $std/typedarray/testReduce~anonymous|0 (; 62 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 48 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 63 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -3607,22 +3914,22 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 49 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 64 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i64.const 1 - i64.store + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 2 - i64.store offset=8 + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 3 - i64.store offset=16 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 9 call $~lib/typedarray/Int64Array#reduce @@ -3637,22 +3944,46 @@ unreachable end ) - (func $std/typedarray/testReduce (; 50 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Uint64Array#__set (; 65 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 678 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + i64.store + ) + (func $std/typedarray/testReduce (; 66 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i64.const 1 - i64.store + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 2 - i64.store offset=8 + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 3 - i64.store offset=16 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 10 call $~lib/typedarray/Int64Array#reduce @@ -3667,12 +3998,36 @@ unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 51 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $~lib/typedarray/Float32Array#__set (; 67 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + 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 152 + i32.const 759 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + f32.store + ) + (func $std/typedarray/testReduce~anonymous|0 (; 68 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 52 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $~lib/typedarray/Float32Array#reduce (; 69 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) (local $1 i32) (local $2 f32) (local $3 i32) @@ -3713,22 +4068,22 @@ end local.get $2 ) - (func $std/typedarray/testReduce (; 53 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 70 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 f32.const 1 - f32.store + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f32.const 2 - f32.store offset=4 + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f32.const 3 - f32.store offset=8 + call $~lib/typedarray/Float32Array#__set local.get $0 call $~lib/typedarray/Float32Array#reduce f32.const 6 @@ -3742,12 +4097,12 @@ unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 54 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce~anonymous|0 (; 71 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 55 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/typedarray/Float64Array#reduce (; 72 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -3788,22 +4143,22 @@ end local.get $2 ) - (func $std/typedarray/testReduce (; 56 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 73 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 f64.const 1 - f64.store + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f64.const 2 - f64.store offset=8 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f64.const 3 - f64.store offset=16 + call $~lib/typedarray/Float64Array#__set local.get $0 call $~lib/typedarray/Float64Array#reduce f64.const 6 @@ -3817,7 +4172,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#reduceRight (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduceRight (; 74 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3855,22 +4210,22 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight (; 58 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 75 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Int8Array#__set local.get $0 call $~lib/typedarray/Int8Array#reduceRight i32.const 255 @@ -3886,7 +4241,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3924,23 +4279,22 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 60 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 77 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 call $~lib/typedarray/Uint8Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 14 call $~lib/typedarray/Uint8Array#reduceRight @@ -3957,22 +4311,22 @@ unreachable end ) - (func $std/typedarray/testReduceRight (; 61 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 78 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 15 call $~lib/typedarray/Uint8Array#reduceRight @@ -3989,7 +4343,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reduceRight (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduceRight (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4031,22 +4385,22 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight (; 63 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 80 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store16 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store16 offset=2 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store16 offset=4 + call $~lib/typedarray/Int16Array#__set local.get $0 call $~lib/typedarray/Int16Array#reduceRight i32.const 65535 @@ -4062,7 +4416,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 64 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 81 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4104,22 +4458,22 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight (; 65 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 82 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store16 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store16 offset=2 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store16 offset=4 + call $~lib/typedarray/Uint16Array#__set local.get $0 call $~lib/typedarray/Uint16Array#reduceRight i32.const 65535 @@ -4135,7 +4489,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reduceRight (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 83 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4177,22 +4531,22 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 67 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 84 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store offset=4 + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store offset=8 + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 18 call $~lib/typedarray/Int32Array#reduceRight @@ -4207,22 +4561,22 @@ unreachable end ) - (func $std/typedarray/testReduceRight (; 68 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 85 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store offset=4 + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store offset=8 + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 19 call $~lib/typedarray/Int32Array#reduceRight @@ -4237,7 +4591,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#reduceRight (; 69 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 86 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -4279,22 +4633,22 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 70 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 87 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i64.const 1 - i64.store + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 2 - i64.store offset=8 + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 3 - i64.store offset=16 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 20 call $~lib/typedarray/Int64Array#reduceRight @@ -4309,22 +4663,22 @@ unreachable end ) - (func $std/typedarray/testReduceRight (; 71 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 88 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i64.const 1 - i64.store + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 2 - i64.store offset=8 + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 3 - i64.store offset=16 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 21 call $~lib/typedarray/Int64Array#reduceRight @@ -4339,7 +4693,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#reduceRight (; 72 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $~lib/typedarray/Float32Array#reduceRight (; 89 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) (local $1 i32) (local $2 f32) (local $3 i32) @@ -4381,22 +4735,22 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight (; 73 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 90 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 f32.const 1 - f32.store + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f32.const 2 - f32.store offset=4 + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f32.const 3 - f32.store offset=8 + call $~lib/typedarray/Float32Array#__set local.get $0 call $~lib/typedarray/Float32Array#reduceRight f32.const 6 @@ -4410,7 +4764,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#reduceRight (; 74 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/typedarray/Float64Array#reduceRight (; 91 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -4452,22 +4806,22 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight (; 75 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 92 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 f64.const 1 - f64.store + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f64.const 2 - f64.store offset=8 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f64.const 3 - f64.store offset=16 + call $~lib/typedarray/Float64Array#__set local.get $0 call $~lib/typedarray/Float64Array#reduceRight f64.const 6 @@ -4481,12 +4835,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 76 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 77 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4532,33 +4886,27 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap (; 78 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 95 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Int8Array#__set local.get $0 call $~lib/typedarray/Int8Array#map local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/typedarray/Int8Array#__get i32.const 1 i32.ne if @@ -4570,16 +4918,8 @@ unreachable end local.get $0 - i32.load offset=4 i32.const 1 - i32.add - i32.const -1 - i32.const 1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/typedarray/Int8Array#__get i32.const 4 i32.ne if @@ -4591,16 +4931,8 @@ unreachable end local.get $0 - i32.load offset=4 i32.const 2 - i32.add - i32.const -1 - i32.const 2 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/typedarray/Int8Array#__get i32.const 9 i32.ne if @@ -4612,7 +4944,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#map (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 96 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4625,7 +4957,6 @@ i32.load offset=8 local.tee $2 local.set $4 - i32.const 0 local.get $2 call $~lib/typedarray/Uint8Array#constructor local.tee $2 @@ -4659,34 +4990,46 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap (; 80 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Uint8Array#__get (; 97 ;) (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 152 + i32.const 105 + i32.const 44 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + i32.load8_u + ) + (func $std/typedarray/testArrayMap (; 98 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 call $~lib/typedarray/Uint8Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Uint8Array#__set local.get $0 call $~lib/typedarray/Uint8Array#map local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8Array#__get i32.const 1 i32.ne if @@ -4698,16 +5041,8 @@ unreachable end local.get $0 - i32.load offset=4 i32.const 1 - i32.add - i32.const -1 - i32.const 1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8Array#__get i32.const 4 i32.ne if @@ -4719,16 +5054,8 @@ unreachable end local.get $0 - i32.load offset=4 i32.const 2 - i32.add - i32.const -1 - i32.const 2 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8Array#__get i32.const 9 i32.ne if @@ -4740,7 +5067,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 81 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 99 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4786,35 +5113,27 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap (; 82 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 100 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 call $~lib/typedarray/Uint8ClampedArray#map - local.tee $1 local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 1 i32.ne if @@ -4825,18 +5144,9 @@ call $~lib/env/abort unreachable end - local.get $1 - local.tee $0 - i32.load offset=4 - i32.const 1 - i32.add - i32.const -1 - i32.const 1 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 4 i32.ne if @@ -4848,16 +5158,8 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 2 - i32.add - i32.const -1 i32.const 2 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 9 i32.ne if @@ -4869,7 +5171,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#map (; 83 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 101 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4924,33 +5226,50 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap (; 84 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Int16Array#__get (; 102 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 267 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + ) + (func $std/typedarray/testArrayMap (; 103 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store16 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store16 offset=2 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store16 offset=4 + call $~lib/typedarray/Int16Array#__set local.get $0 call $~lib/typedarray/Int16Array#map local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load16_s + call $~lib/typedarray/Int16Array#__get i32.const 1 i32.ne if @@ -4962,16 +5281,8 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 2 - i32.add - i32.const -1 - i32.const 2 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load16_s + i32.const 1 + call $~lib/typedarray/Int16Array#__get i32.const 4 i32.ne if @@ -4983,16 +5294,8 @@ unreachable end local.get $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.load16_s + i32.const 2 + call $~lib/typedarray/Int16Array#__get i32.const 9 i32.ne if @@ -5004,7 +5307,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#map (; 85 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 104 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5059,33 +5362,50 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap (; 86 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Uint16Array#__get (; 105 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 348 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u + ) + (func $std/typedarray/testArrayMap (; 106 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store16 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store16 offset=2 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store16 offset=4 + call $~lib/typedarray/Uint16Array#__set local.get $0 call $~lib/typedarray/Uint16Array#map local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load16_u + call $~lib/typedarray/Uint16Array#__get i32.const 1 i32.ne if @@ -5097,16 +5417,8 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 2 - i32.add - i32.const -1 - i32.const 2 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load16_u + i32.const 1 + call $~lib/typedarray/Uint16Array#__get i32.const 4 i32.ne if @@ -5118,16 +5430,8 @@ unreachable end local.get $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.load16_u + i32.const 2 + call $~lib/typedarray/Uint16Array#__get i32.const 9 i32.ne if @@ -5139,7 +5443,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#map (; 87 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 107 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5194,33 +5498,27 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap (; 88 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 108 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store offset=4 + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store offset=8 + call $~lib/typedarray/Int32Array#__set local.get $0 call $~lib/typedarray/Int32Array#map local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Int32Array#__get i32.const 1 i32.ne if @@ -5232,16 +5530,8 @@ unreachable end local.get $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 1 + call $~lib/typedarray/Int32Array#__get i32.const 4 i32.ne if @@ -5253,16 +5543,8 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/typedarray/Int32Array#__get i32.const 9 i32.ne if @@ -5274,7 +5556,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#map (; 89 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 109 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5329,33 +5611,50 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap (; 90 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Uint32Array#__get (; 110 ;) (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 152 + i32.const 510 + i32.const 63 + 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/typedarray/testArrayMap (; 111 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store offset=4 + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store offset=8 + call $~lib/typedarray/Uint32Array#__set local.get $0 call $~lib/typedarray/Uint32Array#map local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Uint32Array#__get i32.const 1 i32.ne if @@ -5367,16 +5666,8 @@ unreachable end local.get $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 1 + call $~lib/typedarray/Uint32Array#__get i32.const 4 i32.ne if @@ -5388,16 +5679,8 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/typedarray/Uint32Array#__get i32.const 9 i32.ne if @@ -5409,12 +5692,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 91 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 112 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 113 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5469,33 +5752,50 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap (; 93 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Int64Array#__get (; 114 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 591 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $std/typedarray/testArrayMap (; 115 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i64.const 1 - i64.store + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 2 - i64.store offset=8 + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 3 - i64.store offset=16 + call $~lib/typedarray/Int64Array#__set local.get $0 call $~lib/typedarray/Int64Array#map local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load + call $~lib/typedarray/Int64Array#__get i64.const 1 i64.ne if @@ -5507,16 +5807,8 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load + i32.const 1 + call $~lib/typedarray/Int64Array#__get i64.const 4 i64.ne if @@ -5528,16 +5820,8 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 16 - i32.add - i32.const -1 - i32.const 16 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load + i32.const 2 + call $~lib/typedarray/Int64Array#__get i64.const 9 i64.ne if @@ -5549,7 +5833,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#map (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 116 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5604,33 +5888,50 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap (; 95 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Uint64Array#__get (; 117 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 672 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $std/typedarray/testArrayMap (; 118 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i64.const 1 - i64.store + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 2 - i64.store offset=8 + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 3 - i64.store offset=16 + call $~lib/typedarray/Uint64Array#__set local.get $0 call $~lib/typedarray/Uint64Array#map local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load + call $~lib/typedarray/Uint64Array#__get i64.const 1 i64.ne if @@ -5642,16 +5943,8 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load + i32.const 1 + call $~lib/typedarray/Uint64Array#__get i64.const 4 i64.ne if @@ -5663,16 +5956,8 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 16 - i32.add - i32.const -1 - i32.const 16 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load + i32.const 2 + call $~lib/typedarray/Uint64Array#__get i64.const 9 i64.ne if @@ -5684,12 +5969,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 96 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 119 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 97 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 120 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5744,33 +6029,50 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap (; 98 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Float32Array#__get (; 121 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + 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 152 + i32.const 753 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + ) + (func $std/typedarray/testArrayMap (; 122 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 f32.const 1 - f32.store + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f32.const 2 - f32.store offset=4 + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f32.const 3 - f32.store offset=8 + call $~lib/typedarray/Float32Array#__set local.get $0 call $~lib/typedarray/Float32Array#map local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f32.load + call $~lib/typedarray/Float32Array#__get f32.const 1 f32.ne if @@ -5782,16 +6084,8 @@ unreachable end local.get $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 - f32.load + i32.const 1 + call $~lib/typedarray/Float32Array#__get f32.const 4 f32.ne if @@ -5803,16 +6097,8 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f32.load + i32.const 2 + call $~lib/typedarray/Float32Array#__get f32.const 9 f32.ne if @@ -5824,12 +6110,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 99 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 123 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 100 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 124 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5884,33 +6170,27 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap (; 101 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 125 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 f64.const 1 - f64.store + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f64.const 2 - f64.store offset=8 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f64.const 3 - f64.store offset=16 + call $~lib/typedarray/Float64Array#__set local.get $0 call $~lib/typedarray/Float64Array#map local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/typedarray/Float64Array#__get f64.const 1 f64.ne if @@ -5922,16 +6202,8 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load + i32.const 1 + call $~lib/typedarray/Float64Array#__get f64.const 4 f64.ne if @@ -5943,16 +6215,8 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 16 - i32.add - i32.const -1 - i32.const 16 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load + i32.const 2 + call $~lib/typedarray/Float64Array#__get f64.const 9 f64.ne if @@ -5964,14 +6228,14 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 102 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 126 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 103 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6010,28 +6274,28 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 104 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 128 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.eqz ) - (func $std/typedarray/testArraySome (; 105 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 129 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store8 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store8 offset=1 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store8 offset=2 + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 35 call $~lib/typedarray/Int8Array#some @@ -6056,7 +6320,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#some (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 130 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6095,23 +6359,22 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome (; 107 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 131 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 call $~lib/typedarray/Uint8Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store8 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store8 offset=1 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store8 offset=2 + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 37 call $~lib/typedarray/Uint8Array#some @@ -6136,22 +6399,22 @@ unreachable end ) - (func $std/typedarray/testArraySome (; 108 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 132 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store8 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store8 offset=1 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store8 offset=2 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 39 call $~lib/typedarray/Uint8Array#some @@ -6176,14 +6439,14 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 109 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 133 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 110 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 134 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6226,28 +6489,28 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 111 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 135 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.eqz ) - (func $std/typedarray/testArraySome (; 112 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 136 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store16 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store16 offset=2 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store16 offset=4 + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 41 call $~lib/typedarray/Int16Array#some @@ -6272,7 +6535,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#some (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6315,22 +6578,22 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome (; 114 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 138 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store16 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store16 offset=2 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store16 offset=4 + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 43 call $~lib/typedarray/Uint16Array#some @@ -6355,12 +6618,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 115 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 139 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6403,26 +6666,26 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 117 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 141 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $std/typedarray/testArraySome (; 118 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 142 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store offset=4 + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store offset=8 + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 45 call $~lib/typedarray/Int32Array#some @@ -6447,22 +6710,22 @@ unreachable end ) - (func $std/typedarray/testArraySome (; 119 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 143 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store offset=4 + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store offset=8 + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 47 call $~lib/typedarray/Int32Array#some @@ -6487,12 +6750,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 120 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 144 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 145 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6535,27 +6798,27 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 122 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 146 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome (; 123 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 147 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i64.const 2 - i64.store + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 4 - i64.store offset=8 + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 6 - i64.store offset=16 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 49 call $~lib/typedarray/Int64Array#some @@ -6580,22 +6843,22 @@ unreachable end ) - (func $std/typedarray/testArraySome (; 124 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 148 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i64.const 2 - i64.store + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 4 - i64.store offset=8 + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 6 - i64.store offset=16 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 51 call $~lib/typedarray/Int64Array#some @@ -6620,12 +6883,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 125 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 149 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6668,27 +6931,27 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 127 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 151 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome (; 128 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 152 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 f32.const 2 - f32.store + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f32.const 4 - f32.store offset=4 + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f32.const 6 - f32.store offset=8 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 53 call $~lib/typedarray/Float32Array#some @@ -6713,12 +6976,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 129 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 153 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 130 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6761,27 +7024,27 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 131 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 155 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome (; 132 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 156 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 f64.const 2 - f64.store + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f64.const 4 - f64.store offset=8 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f64.const 6 - f64.store offset=16 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 55 call $~lib/typedarray/Float64Array#some @@ -6806,7 +7069,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#findIndex (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6848,36 +7111,36 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 134 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 158 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 135 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 159 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 57 call $~lib/typedarray/Int8Array#findIndex i32.const 1 i32.ne if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -6890,7 +7153,7 @@ i32.const -1 i32.ne if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -6898,7 +7161,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#findIndex (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6940,30 +7203,29 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex (; 137 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 161 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 call $~lib/typedarray/Uint8Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 59 call $~lib/typedarray/Uint8Array#findIndex i32.const 1 i32.ne if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -6976,7 +7238,7 @@ i32.const -1 i32.ne if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -6984,29 +7246,29 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex (; 138 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 162 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 61 call $~lib/typedarray/Uint8Array#findIndex i32.const 1 i32.ne if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -7019,7 +7281,7 @@ i32.const -1 i32.ne if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -7027,7 +7289,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#findIndex (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7073,36 +7335,36 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 140 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 164 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 141 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 165 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store16 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store16 offset=2 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store16 offset=4 + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 63 call $~lib/typedarray/Int16Array#findIndex i32.const 1 i32.ne if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -7115,7 +7377,7 @@ i32.const -1 i32.ne if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -7123,7 +7385,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#findIndex (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7169,29 +7431,29 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex (; 143 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 167 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store16 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store16 offset=2 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store16 offset=4 + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 65 call $~lib/typedarray/Uint16Array#findIndex i32.const 1 i32.ne if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -7204,7 +7466,7 @@ i32.const -1 i32.ne if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -7212,7 +7474,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#findIndex (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7258,34 +7520,34 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 145 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 169 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 146 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 170 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store offset=4 + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store offset=8 + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 67 call $~lib/typedarray/Int32Array#findIndex i32.const 1 i32.ne if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -7298,7 +7560,7 @@ i32.const -1 i32.ne if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -7306,29 +7568,29 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex (; 147 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 171 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store offset=4 + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store offset=8 + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 69 call $~lib/typedarray/Int32Array#findIndex i32.const 1 i32.ne if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -7341,7 +7603,7 @@ i32.const -1 i32.ne if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -7349,7 +7611,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#findIndex (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7395,34 +7657,34 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 149 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 173 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex (; 150 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 174 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i64.const 1 - i64.store + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 2 - i64.store offset=8 + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 3 - i64.store offset=16 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 71 call $~lib/typedarray/Int64Array#findIndex i32.const 1 i32.ne if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -7435,7 +7697,7 @@ i32.const -1 i32.ne if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -7443,29 +7705,29 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex (; 151 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 175 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i64.const 1 - i64.store + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 2 - i64.store offset=8 + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 3 - i64.store offset=16 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 73 call $~lib/typedarray/Int64Array#findIndex i32.const 1 i32.ne if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -7478,7 +7740,7 @@ i32.const -1 i32.ne if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -7486,7 +7748,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#findIndex (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7532,34 +7794,34 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 153 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 177 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex (; 154 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 178 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 f32.const 1 - f32.store + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f32.const 2 - f32.store offset=4 + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f32.const 3 - f32.store offset=8 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 75 call $~lib/typedarray/Float32Array#findIndex i32.const 1 i32.ne if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -7572,7 +7834,7 @@ i32.const -1 i32.ne if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -7580,7 +7842,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#findIndex (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 179 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7626,34 +7888,34 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 156 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 180 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex (; 157 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 181 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 f64.const 1 - f64.store + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f64.const 2 - f64.store offset=8 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f64.const 3 - f64.store offset=16 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 77 call $~lib/typedarray/Float64Array#findIndex i32.const 1 i32.ne if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -7666,7 +7928,7 @@ i32.const -1 i32.ne if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -7674,7 +7936,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 158 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 182 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -7684,7 +7946,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int8Array#every (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 183 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7724,22 +7986,22 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 160 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 184 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store8 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store8 offset=1 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store8 offset=2 + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 79 call $~lib/typedarray/Int8Array#every @@ -7764,13 +8026,13 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 161 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 185 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#every (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7810,23 +8072,22 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 163 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 187 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 call $~lib/typedarray/Uint8Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store8 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store8 offset=1 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store8 offset=2 + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 81 call $~lib/typedarray/Uint8Array#every @@ -7851,22 +8112,22 @@ unreachable end ) - (func $std/typedarray/testArrayEvery (; 164 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 188 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store8 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store8 offset=1 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store8 offset=2 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 83 call $~lib/typedarray/Uint8Array#every @@ -7891,7 +8152,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 165 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 189 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -7901,7 +8162,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int16Array#every (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7945,22 +8206,22 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 167 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 191 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store16 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store16 offset=2 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store16 offset=4 + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 85 call $~lib/typedarray/Int16Array#every @@ -7985,7 +8246,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#every (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8029,22 +8290,22 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 169 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 193 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store16 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store16 offset=2 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store16 offset=4 + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 87 call $~lib/typedarray/Uint16Array#every @@ -8069,13 +8330,13 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 170 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 194 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int32Array#every (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 195 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8119,22 +8380,22 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 172 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 196 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store offset=4 + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store offset=8 + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 89 call $~lib/typedarray/Int32Array#every @@ -8159,22 +8420,22 @@ unreachable end ) - (func $std/typedarray/testArrayEvery (; 173 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 197 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store offset=4 + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store offset=8 + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 91 call $~lib/typedarray/Int32Array#every @@ -8199,14 +8460,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 174 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 198 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 199 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8250,22 +8511,22 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 176 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 200 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i64.const 2 - i64.store + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 4 - i64.store offset=8 + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 6 - i64.store offset=16 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 93 call $~lib/typedarray/Int64Array#every @@ -8290,29 +8551,29 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 177 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 201 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $std/typedarray/testArrayEvery (; 178 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 202 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 i64.const 2 - i64.store + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 4 - i64.store offset=8 + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 6 - i64.store offset=16 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 95 call $~lib/typedarray/Int64Array#every @@ -8337,7 +8598,7 @@ unreachable end ) - (func $~lib/math/NativeMathf.mod (; 179 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 203 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8488,13 +8749,13 @@ local.get $0 f32.mul ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 180 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 204 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 205 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8538,22 +8799,22 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 182 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 206 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 f32.const 2 - f32.store + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f32.const 4 - f32.store offset=4 + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f32.const 6 - f32.store offset=8 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 97 call $~lib/typedarray/Float32Array#every @@ -8578,7 +8839,7 @@ unreachable end ) - (func $~lib/math/NativeMath.mod (; 183 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 207 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -8737,13 +8998,13 @@ local.get $0 f64.mul ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 184 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 208 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 185 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 209 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8787,22 +9048,22 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 186 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 210 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor local.tee $0 - i32.load offset=4 + i32.const 0 f64.const 2 - f64.store + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f64.const 4 - f64.store offset=8 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f64.const 6 - f64.store offset=16 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 99 call $~lib/typedarray/Float64Array#every @@ -8827,31 +9088,18 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 187 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 211 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 255 i32.and - local.get $1 - i32.const 2 - i32.shl - local.tee $0 global.get $std/typedarray/forEachValues - local.tee $3 - i32.load offset=4 - i32.add - i32.const -1 - local.get $0 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load + local.get $1 + call $~lib/array/Array#__get i32.const 255 i32.and i32.ne if - i32.const 616 + i32.const 704 i32.const 16 i32.const 425 i32.const 4 @@ -8862,7 +9110,7 @@ global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 672 + i32.const 760 i32.const 16 i32.const 426 i32.const 4 @@ -8873,7 +9121,7 @@ global.get $std/typedarray/forEachSelf i32.ne if - i32.const 728 + i32.const 816 i32.const 16 i32.const 427 i32.const 4 @@ -8885,7 +9133,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 188 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Int8Array#forEach (; 212 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8918,66 +9166,51 @@ end end ) - (func $std/typedarray/testArrayForEach (; 189 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 213 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.load offset=4 + local.get $0 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $2 - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 + call $~lib/array/Array#__get + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store8 - local.get $1 - i32.load offset=4 - local.get $0 - i32.load offset=4 - i32.const 4 - i32.add - i32.const -1 - i32.const 4 + i32.const 1 + global.get $std/typedarray/forEachValues + i32.const 1 + call $~lib/array/Array#__get + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store8 offset=1 - local.get $1 - i32.load offset=4 - local.get $2 - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 + i32.const 2 + global.get $std/typedarray/forEachValues + i32.const 2 + call $~lib/array/Array#__get + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store8 offset=2 - local.get $1 call $~lib/typedarray/Int8Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -8985,7 +9218,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#forEach (; 190 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 214 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9018,68 +9251,46 @@ end end ) - (func $std/typedarray/testArrayForEach (; 191 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 215 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount - i32.const 0 i32.const 3 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.load offset=4 + local.get $0 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $2 - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store8 - local.get $1 - i32.load offset=4 - local.get $0 - i32.load offset=4 - i32.const 4 - i32.add - i32.const -1 - i32.const 4 + i32.const 1 + global.get $std/typedarray/forEachValues + i32.const 1 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store8 offset=1 - local.get $1 - i32.load offset=4 - local.get $2 - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 + i32.const 2 + global.get $std/typedarray/forEachValues + i32.const 2 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store8 offset=2 - local.get $1 i32.const 102 call $~lib/typedarray/Uint8Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -9087,113 +9298,46 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 192 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 216 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.load offset=4 + local.get $0 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $2 - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.const 255 - i32.and - local.tee $0 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor + call $~lib/array/Array#__get i32.const 255 - local.get $0 - i32.sub - i32.const 31 - i32.shr_s - local.get $0 - i32.or i32.and - i32.store8 - local.get $1 - i32.load offset=4 - local.get $2 - local.tee $0 - i32.load offset=4 - i32.const 4 - i32.add - i32.const -1 - i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.const 255 - i32.and - local.tee $0 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor + i32.const 1 + global.get $std/typedarray/forEachValues + i32.const 1 + call $~lib/array/Array#__get i32.const 255 - local.get $0 - i32.sub - i32.const 31 - i32.shr_s - local.get $0 - i32.or i32.and - i32.store8 offset=1 - local.get $1 - i32.load offset=4 - local.get $2 - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + global.get $std/typedarray/forEachValues + i32.const 2 + call $~lib/array/Array#__get i32.const 255 i32.and - local.tee $0 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $0 - i32.sub - i32.const 31 - i32.shr_s + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.or - i32.and - i32.store8 offset=2 - local.get $1 i32.const 103 call $~lib/typedarray/Uint8Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -9201,31 +9345,18 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 193 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 217 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 65535 i32.and - local.get $1 - i32.const 2 - i32.shl - local.tee $0 global.get $std/typedarray/forEachValues - local.tee $3 - i32.load offset=4 - i32.add - i32.const -1 - local.get $0 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load + local.get $1 + call $~lib/array/Array#__get i32.const 65535 i32.and i32.ne if - i32.const 616 + i32.const 704 i32.const 16 i32.const 425 i32.const 4 @@ -9236,7 +9367,7 @@ global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 672 + i32.const 760 i32.const 16 i32.const 426 i32.const 4 @@ -9247,7 +9378,7 @@ global.get $std/typedarray/forEachSelf i32.ne if - i32.const 728 + i32.const 816 i32.const 16 i32.const 427 i32.const 4 @@ -9259,7 +9390,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 194 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Int16Array#forEach (; 218 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9296,66 +9427,51 @@ end end ) - (func $std/typedarray/testArrayForEach (; 195 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 219 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.load offset=4 + local.get $0 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $2 - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 + call $~lib/array/Array#__get + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store16 - local.get $1 - i32.load offset=4 - local.get $0 - i32.load offset=4 - i32.const 4 - i32.add - i32.const -1 - i32.const 4 + i32.const 1 + global.get $std/typedarray/forEachValues + i32.const 1 + call $~lib/array/Array#__get + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store16 offset=2 - local.get $1 - i32.load offset=4 - local.get $2 - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 + i32.const 2 + global.get $std/typedarray/forEachValues + i32.const 2 + call $~lib/array/Array#__get + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store16 offset=4 - local.get $1 call $~lib/typedarray/Int16Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -9363,7 +9479,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#forEach (; 196 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 220 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9400,66 +9516,45 @@ end end ) - (func $std/typedarray/testArrayForEach (; 197 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 221 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Uint16Array#constructor - local.tee $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.load offset=4 + local.get $0 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $2 - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store16 - local.get $1 - i32.load offset=4 - local.get $0 - i32.load offset=4 - i32.const 4 - i32.add - i32.const -1 - i32.const 4 + i32.const 1 + global.get $std/typedarray/forEachValues + i32.const 1 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store16 offset=2 - local.get $1 - i32.load offset=4 - local.get $2 - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 + i32.const 2 + global.get $std/typedarray/forEachValues + i32.const 2 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store16 offset=4 - local.get $1 call $~lib/typedarray/Uint16Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -9467,27 +9562,14 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 198 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - local.tee $0 + (func $std/typedarray/testArrayForEach~anonymous|0 (; 222 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/typedarray/forEachValues - local.tee $3 - i32.load offset=4 - i32.add - i32.const -1 + local.get $1 + call $~lib/array/Array#__get local.get $0 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load i32.ne if - i32.const 616 + i32.const 704 i32.const 16 i32.const 425 i32.const 4 @@ -9498,7 +9580,7 @@ global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 672 + i32.const 760 i32.const 16 i32.const 426 i32.const 4 @@ -9509,7 +9591,7 @@ global.get $std/typedarray/forEachSelf i32.ne if - i32.const 728 + i32.const 816 i32.const 16 i32.const 427 i32.const 4 @@ -9521,7 +9603,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 199 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 223 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9558,67 +9640,40 @@ end end ) - (func $std/typedarray/testArrayForEach (; 200 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 224 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Int32Array#constructor - local.tee $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.load offset=4 + local.get $0 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $2 - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store - local.get $1 - i32.load offset=4 - local.get $0 - i32.load offset=4 - i32.const 4 - i32.add - i32.const -1 - i32.const 4 + i32.const 1 + global.get $std/typedarray/forEachValues + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store offset=4 - local.get $1 - i32.load offset=4 - local.get $2 - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 + i32.const 2 + global.get $std/typedarray/forEachValues + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store offset=8 - local.get $1 i32.const 106 call $~lib/typedarray/Int32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -9626,67 +9681,40 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 201 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 225 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Uint32Array#constructor - local.tee $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.load offset=4 + local.get $0 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $2 - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store - local.get $1 - i32.load offset=4 - local.get $0 - i32.load offset=4 - i32.const 4 - i32.add - i32.const -1 - i32.const 4 + i32.const 1 + global.get $std/typedarray/forEachValues + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store offset=4 - local.get $1 - i32.load offset=4 - local.get $2 - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 + i32.const 2 + global.get $std/typedarray/forEachValues + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store offset=8 - local.get $1 i32.const 107 call $~lib/typedarray/Int32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -9694,29 +9722,15 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 202 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 226 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) local.get $0 - local.get $1 - i32.const 2 - i32.shl - local.tee $3 global.get $std/typedarray/forEachValues - local.tee $4 - i32.load offset=4 - i32.add - i32.const -1 - local.get $3 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + local.get $1 + call $~lib/array/Array#__get i64.extend_i32_s i64.ne if - i32.const 616 + i32.const 704 i32.const 16 i32.const 425 i32.const 4 @@ -9727,7 +9741,7 @@ global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 672 + i32.const 760 i32.const 16 i32.const 426 i32.const 4 @@ -9738,7 +9752,7 @@ global.get $std/typedarray/forEachSelf i32.ne if - i32.const 728 + i32.const 816 i32.const 16 i32.const 427 i32.const 4 @@ -9750,7 +9764,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 203 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 227 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9787,67 +9801,43 @@ end end ) - (func $std/typedarray/testArrayForEach (; 204 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 228 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.load offset=4 + local.get $0 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $2 - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load32_s - i64.store - local.get $1 - i32.load offset=4 - local.get $0 - i32.load offset=4 - i32.const 4 - i32.add - i32.const -1 - i32.const 4 + i32.const 1 + global.get $std/typedarray/forEachValues + i32.const 1 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load32_s - i64.store offset=8 - local.get $1 - i32.load offset=4 - local.get $2 - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 + i32.const 2 + global.get $std/typedarray/forEachValues + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load32_s - i64.store offset=16 - local.get $1 i32.const 108 call $~lib/typedarray/Int64Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -9855,67 +9845,43 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 205 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 229 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Uint64Array#constructor - local.tee $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.load offset=4 + local.get $0 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $2 - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load32_s - i64.store - local.get $1 - i32.load offset=4 - local.get $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 - i64.load32_s - i64.store offset=8 - local.get $1 - i32.load offset=4 - local.get $2 - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 + i32.const 1 + global.get $std/typedarray/forEachValues + i32.const 1 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 2 + global.get $std/typedarray/forEachValues + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load32_s - i64.store offset=16 - local.get $1 i32.const 109 call $~lib/typedarray/Int64Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -9923,29 +9889,15 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 206 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 230 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) local.get $0 - local.get $1 - i32.const 2 - i32.shl - local.tee $3 global.get $std/typedarray/forEachValues - local.tee $4 - i32.load offset=4 - i32.add - i32.const -1 - local.get $3 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + local.get $1 + call $~lib/array/Array#__get f32.convert_i32_s f32.ne if - i32.const 616 + i32.const 704 i32.const 16 i32.const 425 i32.const 4 @@ -9956,7 +9908,7 @@ global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 672 + i32.const 760 i32.const 16 i32.const 426 i32.const 4 @@ -9967,7 +9919,7 @@ global.get $std/typedarray/forEachSelf i32.ne if - i32.const 728 + i32.const 816 i32.const 16 i32.const 427 i32.const 4 @@ -9979,7 +9931,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 207 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Float32Array#forEach (; 231 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10016,69 +9968,42 @@ end end ) - (func $std/typedarray/testArrayForEach (; 208 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 232 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Float32Array#constructor - local.tee $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.load offset=4 + local.get $0 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $2 - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get f32.convert_i32_s - f32.store - local.get $1 - i32.load offset=4 + call $~lib/typedarray/Float32Array#__set local.get $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 1 + global.get $std/typedarray/forEachValues + i32.const 1 + call $~lib/array/Array#__get f32.convert_i32_s - f32.store offset=4 - local.get $1 - i32.load offset=4 - local.get $2 - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + global.get $std/typedarray/forEachValues + i32.const 2 + call $~lib/array/Array#__get f32.convert_i32_s - f32.store offset=8 - local.get $1 + call $~lib/typedarray/Float32Array#__set + local.get $0 call $~lib/typedarray/Float32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -10086,29 +10011,15 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 209 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 233 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) local.get $0 - local.get $1 - i32.const 2 - i32.shl - local.tee $3 global.get $std/typedarray/forEachValues - local.tee $4 - i32.load offset=4 - i32.add - i32.const -1 - local.get $3 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + local.get $1 + call $~lib/array/Array#__get f64.convert_i32_s f64.ne if - i32.const 616 + i32.const 704 i32.const 16 i32.const 425 i32.const 4 @@ -10119,7 +10030,7 @@ global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 672 + i32.const 760 i32.const 16 i32.const 426 i32.const 4 @@ -10130,7 +10041,7 @@ global.get $std/typedarray/forEachSelf i32.ne if - i32.const 728 + i32.const 816 i32.const 16 i32.const 427 i32.const 4 @@ -10142,7 +10053,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 210 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Float64Array#forEach (; 234 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10179,69 +10090,42 @@ end end ) - (func $std/typedarray/testArrayForEach (; 211 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 235 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Float64Array#constructor - local.tee $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.load offset=4 + local.get $0 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $2 - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get f64.convert_i32_s - f64.store - local.get $1 - i32.load offset=4 - local.get $0 - i32.load offset=4 - i32.const 4 - i32.add - i32.const -1 - i32.const 4 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 1 + global.get $std/typedarray/forEachValues + i32.const 1 + call $~lib/array/Array#__get f64.convert_i32_s - f64.store offset=8 - local.get $1 - i32.load offset=4 - local.get $2 - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + global.get $std/typedarray/forEachValues + i32.const 2 + call $~lib/array/Array#__get f64.convert_i32_s - f64.store offset=16 - local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 call $~lib/typedarray/Float64Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -10249,7 +10133,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#reverse (; 212 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 236 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10297,61 +10181,45 @@ end local.get $0 ) - (func $std/typedarray/testArrayReverse (; 213 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 237 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) global.get $std/typedarray/testArrayReverseValues local.set $1 i32.const 9 call $~lib/typedarray/Int8Array#constructor - local.set $3 + local.set $2 i32.const 9 call $~lib/typedarray/Int8Array#constructor - local.set $4 + local.set $3 loop $repeat|0 block $break|0 local.get $0 i32.const 9 i32.ge_s br_if $break|0 - local.get $3 - i32.load offset=4 + local.get $2 local.get $0 - i32.add + local.get $1 local.get $0 - i32.const 2 + call $~lib/array/Array#__get + i32.const 24 i32.shl - local.tee $2 - local.get $1 - i32.load offset=4 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store8 - local.get $4 - i32.load offset=4 + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set + local.get $3 local.get $0 - i32.add - local.get $1 - i32.load offset=4 - local.get $2 - i32.add - i32.const -1 - local.get $2 local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store8 + local.get $0 + call $~lib/array/Array#__get + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 i32.add @@ -10359,7 +10227,7 @@ br $repeat|0 end end - local.get $3 + local.get $2 call $~lib/typedarray/Int8Array#reverse drop i32.const 0 @@ -10370,38 +10238,21 @@ i32.const 9 i32.ge_s br_if $break|1 - local.get $3 - i32.load offset=4 - local.get $0 - i32.add - i32.const -1 + local.get $2 local.get $0 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Int8Array#__get + local.get $1 i32.const 8 local.get $0 i32.sub - i32.const 2 + call $~lib/array/Array#__get + i32.const 24 i32.shl - local.tee $2 - local.get $1 - i32.load offset=4 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.const 255 - i32.and + i32.const 24 + i32.shr_s i32.ne if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 @@ -10417,25 +10268,18 @@ unreachable end end - local.get $4 + local.get $3 i32.const 4 i32.const 8 call $~lib/typedarray/Int8Array#subarray call $~lib/typedarray/Int8Array#reverse local.tee $0 - local.tee $1 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/typedarray/Int8Array#__get i32.const 8 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 @@ -10443,63 +10287,38 @@ unreachable end local.get $0 - local.tee $1 - i32.load offset=4 - i32.const 1 - i32.add - i32.const -1 i32.const 1 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/typedarray/Int8Array#__get i32.const 7 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - i32.load offset=4 - i32.const 2 - i32.add - i32.const -1 + local.get $0 i32.const 2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/typedarray/Int8Array#__get i32.const 6 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - i32.load offset=4 - i32.const 3 - i32.add - i32.const -1 + local.get $0 i32.const 3 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/typedarray/Int8Array#__get i32.const 5 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -10507,7 +10326,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 214 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 238 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10555,7 +10374,7 @@ end local.get $0 ) - (func $~lib/typedarray/Uint8Array#subarray (; 215 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 239 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10606,63 +10425,41 @@ i32.store offset=8 local.get $0 ) - (func $std/typedarray/testArrayReverse (; 216 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 240 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) global.get $std/typedarray/testArrayReverseValues local.set $1 - i32.const 0 i32.const 9 call $~lib/typedarray/Uint8Array#constructor - local.set $3 - i32.const 0 + local.set $2 i32.const 9 call $~lib/typedarray/Uint8Array#constructor - local.set $4 + local.set $3 loop $repeat|0 block $break|0 local.get $0 i32.const 9 i32.ge_s br_if $break|0 - local.get $3 - i32.load offset=4 - local.get $0 - i32.add - local.get $0 - i32.const 2 - i32.shl - local.tee $2 - local.get $1 - i32.load offset=4 - i32.add - i32.const -1 local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store8 - local.get $4 - i32.load offset=4 local.get $0 - i32.add local.get $1 - i32.load offset=4 - local.get $2 - i32.add - i32.const -1 - local.get $2 + local.get $0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $3 + local.get $0 local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store8 + local.get $0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 1 i32.add @@ -10670,7 +10467,7 @@ br $repeat|0 end end - local.get $3 + local.get $2 call $~lib/typedarray/Uint8Array#reverse drop i32.const 0 @@ -10681,38 +10478,19 @@ i32.const 9 i32.ge_s br_if $break|1 - local.get $3 - i32.load offset=4 - local.get $0 - i32.add - i32.const -1 + local.get $2 local.get $0 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8Array#__get + local.get $1 i32.const 8 local.get $0 i32.sub - i32.const 2 - i32.shl - local.tee $2 - local.get $1 - i32.load offset=4 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 255 i32.and i32.ne if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 @@ -10728,23 +10506,16 @@ unreachable end end - local.get $4 + local.get $3 call $~lib/typedarray/Uint8Array#subarray call $~lib/typedarray/Uint8Array#reverse local.tee $0 - local.tee $1 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8Array#__get i32.const 8 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 @@ -10752,63 +10523,38 @@ unreachable end local.get $0 - local.tee $1 - i32.load offset=4 - i32.const 1 - i32.add - i32.const -1 i32.const 1 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8Array#__get i32.const 7 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - i32.load offset=4 - i32.const 2 - i32.add - i32.const -1 + local.get $0 i32.const 2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8Array#__get i32.const 6 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - i32.load offset=4 - i32.const 3 - i32.add - i32.const -1 + local.get $0 i32.const 3 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8Array#__get i32.const 5 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -10816,7 +10562,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 217 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 241 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10867,92 +10613,41 @@ i32.store offset=8 local.get $0 ) - (func $std/typedarray/testArrayReverse (; 218 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 242 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/testArrayReverseValues - local.set $2 + local.set $1 i32.const 9 call $~lib/typedarray/Uint8ClampedArray#constructor - local.set $4 + local.set $2 i32.const 9 call $~lib/typedarray/Uint8ClampedArray#constructor - local.set $5 + local.set $3 loop $repeat|0 block $break|0 local.get $0 i32.const 9 i32.ge_s br_if $break|0 - local.get $4 - i32.load offset=4 + local.get $2 local.get $0 - i32.add + local.get $1 local.get $0 - i32.const 2 - i32.shl - local.tee $3 - local.get $2 - i32.load offset=4 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 255 i32.and - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $3 + local.get $0 local.get $1 - i32.or - i32.and - i32.store8 - local.get $5 - i32.load offset=4 local.get $0 - i32.add - local.get $2 - i32.load offset=4 - local.get $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.const 255 - i32.and - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor + call $~lib/array/Array#__get i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or i32.and - i32.store8 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 1 i32.add @@ -10960,7 +10655,7 @@ br $repeat|0 end end - local.get $4 + local.get $2 call $~lib/typedarray/Uint8Array#reverse drop i32.const 0 @@ -10971,38 +10666,19 @@ i32.const 9 i32.ge_s br_if $break|1 - local.get $4 - i32.load offset=4 - local.get $0 - i32.add - i32.const -1 + local.get $2 local.get $0 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8ClampedArray#__get + local.get $1 i32.const 8 local.get $0 i32.sub - i32.const 2 - i32.shl - local.tee $3 - local.get $2 - i32.load offset=4 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 255 i32.and i32.ne if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 @@ -11018,87 +10694,55 @@ unreachable end end - local.get $5 + local.get $3 call $~lib/typedarray/Uint8ClampedArray#subarray call $~lib/typedarray/Uint8Array#reverse - local.tee $2 - local.tee $1 - i32.load offset=4 - i32.const -1 + local.tee $0 i32.const 0 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 8 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $2 - local.tee $1 - i32.load offset=4 - i32.const 1 - i32.add - i32.const -1 + local.get $0 i32.const 1 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 7 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - i32.load offset=4 - i32.const 2 - i32.add - i32.const -1 + local.get $0 i32.const 2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 6 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - i32.load offset=4 - i32.const 3 - i32.add - i32.const -1 + local.get $0 i32.const 3 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 5 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -11106,7 +10750,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 219 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 243 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11160,7 +10804,7 @@ end local.get $0 ) - (func $~lib/typedarray/Int16Array#subarray (; 220 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 244 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11217,172 +10861,116 @@ i32.store offset=8 local.get $0 ) - (func $std/typedarray/testArrayReverse (; 221 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 245 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/testArrayReverseValues - local.set $0 + local.set $1 i32.const 9 call $~lib/typedarray/Int16Array#constructor - local.set $3 + local.set $2 i32.const 9 call $~lib/typedarray/Int16Array#constructor - local.set $4 + local.set $3 loop $repeat|0 block $break|0 - local.get $1 + local.get $0 i32.const 9 i32.ge_s br_if $break|0 + local.get $2 + local.get $0 local.get $1 - i32.const 1 + local.get $0 + call $~lib/array/Array#__get + i32.const 16 i32.shl - local.tee $5 + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set local.get $3 - i32.load offset=4 - i32.add - local.get $1 - i32.const 2 - i32.shl - local.tee $2 - local.get $0 - i32.load offset=4 - i32.add - i32.const -1 - local.get $2 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store16 - local.get $4 - i32.load offset=4 - local.get $5 - i32.add + local.get $1 local.get $0 - i32.load offset=4 - local.get $2 - i32.add - i32.const -1 - local.get $2 + call $~lib/array/Array#__get + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store16 - local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end - local.get $3 + local.get $2 call $~lib/typedarray/Int16Array#reverse drop i32.const 0 - local.set $1 + local.set $0 loop $repeat|1 block $break|1 - local.get $1 + local.get $0 i32.const 9 i32.ge_s br_if $break|1 - local.get $1 - i32.const 1 - i32.shl - local.tee $2 - local.get $3 - i32.load offset=4 - i32.add - i32.const -1 local.get $2 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load16_u - i32.const 8 + local.get $0 + call $~lib/typedarray/Int16Array#__get local.get $1 + i32.const 8 + local.get $0 i32.sub - i32.const 2 + call $~lib/array/Array#__get + i32.const 16 i32.shl - local.tee $2 - local.get $0 - i32.load offset=4 - i32.add - i32.const -1 - local.get $2 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.const 65535 - i32.and + i32.const 16 + i32.shr_s i32.ne if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort unreachable else - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|1 end unreachable end end - local.get $4 + local.get $3 call $~lib/typedarray/Int16Array#subarray call $~lib/typedarray/Int16Array#reverse - local.tee $1 local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load16_s + call $~lib/typedarray/Int16Array#__get i32.const 8 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - local.tee $0 - i32.load offset=4 - i32.const 2 - i32.add - i32.const -1 - i32.const 2 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load16_s + i32.const 1 + call $~lib/typedarray/Int16Array#__get i32.const 7 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 @@ -11390,20 +10978,12 @@ unreachable end local.get $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.load16_s + i32.const 2 + call $~lib/typedarray/Int16Array#__get i32.const 6 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 @@ -11411,20 +10991,12 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 6 - i32.add - i32.const -1 - i32.const 6 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load16_s + i32.const 3 + call $~lib/typedarray/Int16Array#__get i32.const 5 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -11432,7 +11004,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 222 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 246 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11486,7 +11058,7 @@ end local.get $0 ) - (func $~lib/typedarray/Uint16Array#subarray (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11543,172 +11115,110 @@ i32.store offset=8 local.get $0 ) - (func $std/typedarray/testArrayReverse (; 224 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 248 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/testArrayReverseValues - local.set $0 + local.set $1 i32.const 9 call $~lib/typedarray/Uint16Array#constructor - local.set $3 + local.set $2 i32.const 9 call $~lib/typedarray/Uint16Array#constructor - local.set $4 + local.set $3 loop $repeat|0 block $break|0 - local.get $1 + local.get $0 i32.const 9 i32.ge_s br_if $break|0 - local.get $1 - i32.const 1 - i32.shl - local.tee $5 - local.get $3 - i32.load offset=4 - i32.add - local.get $1 - i32.const 2 - i32.shl - local.tee $2 - local.get $0 - i32.load offset=4 - i32.add - i32.const -1 local.get $2 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store16 - local.get $4 - i32.load offset=4 - local.get $5 - i32.add + local.get $1 local.get $0 - i32.load offset=4 - local.get $2 - i32.add - i32.const -1 - local.get $2 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + local.get $3 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store16 local.get $1 + local.get $0 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end - local.get $3 + local.get $2 call $~lib/typedarray/Uint16Array#reverse drop i32.const 0 - local.set $1 + local.set $0 loop $repeat|1 block $break|1 - local.get $1 + local.get $0 i32.const 9 i32.ge_s br_if $break|1 - local.get $1 - i32.const 1 - i32.shl - local.tee $2 - local.get $3 - i32.load offset=4 - i32.add - i32.const -1 local.get $2 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load16_u - i32.const 8 - local.get $1 - i32.sub - i32.const 2 - i32.shl - local.tee $2 local.get $0 - i32.load offset=4 - i32.add - i32.const -1 - local.get $2 + call $~lib/typedarray/Uint16Array#__get + local.get $1 + i32.const 8 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.sub + call $~lib/array/Array#__get i32.const 65535 i32.and i32.ne if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort unreachable else - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|1 end unreachable end end - local.get $4 + local.get $3 call $~lib/typedarray/Uint16Array#subarray call $~lib/typedarray/Uint16Array#reverse - local.tee $1 local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load16_u + call $~lib/typedarray/Uint16Array#__get i32.const 8 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - local.tee $0 - i32.load offset=4 - i32.const 2 - i32.add - i32.const -1 - i32.const 2 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load16_u + i32.const 1 + call $~lib/typedarray/Uint16Array#__get i32.const 7 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 @@ -11716,20 +11226,12 @@ unreachable end local.get $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.load16_u + i32.const 2 + call $~lib/typedarray/Uint16Array#__get i32.const 6 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 @@ -11737,20 +11239,12 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 6 - i32.add - i32.const -1 - i32.const 6 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load16_u + i32.const 3 + call $~lib/typedarray/Uint16Array#__get i32.const 5 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -11758,7 +11252,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 225 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 249 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11812,168 +11306,106 @@ end local.get $0 ) - (func $std/typedarray/testArrayReverse (; 226 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 250 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) global.get $std/typedarray/testArrayReverseValues - local.set $0 + local.set $1 i32.const 9 call $~lib/typedarray/Int32Array#constructor - local.set $3 + local.set $2 i32.const 9 call $~lib/typedarray/Int32Array#constructor - local.set $4 + local.set $3 loop $repeat|0 block $break|0 - local.get $2 + local.get $0 i32.const 9 i32.ge_s br_if $break|0 local.get $2 - i32.const 2 - i32.shl - local.tee $1 - local.get $3 - i32.load offset=4 - i32.add local.get $0 - i32.load offset=4 - local.get $1 - i32.add - i32.const -1 local.get $1 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store - local.get $4 - i32.load offset=4 - local.get $1 - i32.add + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $3 local.get $0 - i32.load offset=4 - local.get $1 - i32.add - i32.const -1 local.get $1 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store - local.get $2 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $repeat|0 end end - local.get $3 + local.get $2 call $~lib/typedarray/Int32Array#reverse drop i32.const 0 - local.set $2 + local.set $0 loop $repeat|1 block $break|1 - local.get $2 + local.get $0 i32.const 9 i32.ge_s br_if $break|1 local.get $2 - i32.const 2 - i32.shl - local.tee $1 - local.get $3 - i32.load offset=4 - i32.add - i32.const -1 - local.get $1 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.const 8 - local.get $2 - i32.sub - i32.const 2 - i32.shl - local.tee $1 local.get $0 - i32.load offset=4 - i32.add - i32.const -1 + call $~lib/typedarray/Int32Array#__get local.get $1 + i32.const 8 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.sub + call $~lib/array/Array#__get i32.ne if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort unreachable else - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $repeat|1 end unreachable end end - local.get $4 + local.get $3 i32.const 4 i32.const 8 call $~lib/typedarray/Int32Array#subarray call $~lib/typedarray/Int32Array#reverse - local.tee $1 local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Int32Array#__get i32.const 8 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - 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 1 + call $~lib/typedarray/Int32Array#__get i32.const 7 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 @@ -11981,20 +11413,12 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/typedarray/Int32Array#__get i32.const 6 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 @@ -12002,20 +11426,12 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 12 - i32.add - i32.const -1 - i32.const 12 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 3 + call $~lib/typedarray/Int32Array#__get i32.const 5 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -12023,7 +11439,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#subarray (; 227 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 251 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12080,166 +11496,104 @@ i32.store offset=8 local.get $0 ) - (func $std/typedarray/testArrayReverse (; 228 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 252 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) global.get $std/typedarray/testArrayReverseValues - local.set $0 + local.set $1 i32.const 9 call $~lib/typedarray/Uint32Array#constructor - local.set $3 + local.set $2 i32.const 9 call $~lib/typedarray/Uint32Array#constructor - local.set $4 + local.set $3 loop $repeat|0 block $break|0 - local.get $2 + local.get $0 i32.const 9 i32.ge_s br_if $break|0 local.get $2 - i32.const 2 - i32.shl - local.tee $1 - local.get $3 - i32.load offset=4 - i32.add local.get $0 - i32.load offset=4 - local.get $1 - i32.add - i32.const -1 local.get $1 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store - local.get $4 - i32.load offset=4 - local.get $1 - i32.add + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $3 local.get $0 - i32.load offset=4 - local.get $1 - i32.add - i32.const -1 local.get $1 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store - local.get $2 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $repeat|0 end end - local.get $3 + local.get $2 call $~lib/typedarray/Int32Array#reverse drop i32.const 0 - local.set $2 + local.set $0 loop $repeat|1 block $break|1 - local.get $2 + local.get $0 i32.const 9 i32.ge_s br_if $break|1 local.get $2 - i32.const 2 - i32.shl - local.tee $1 - local.get $3 - i32.load offset=4 - i32.add - i32.const -1 - local.get $1 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.const 8 - local.get $2 - i32.sub - i32.const 2 - i32.shl - local.tee $1 local.get $0 - i32.load offset=4 - i32.add - i32.const -1 + call $~lib/typedarray/Uint32Array#__get local.get $1 + i32.const 8 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.sub + call $~lib/array/Array#__get i32.ne if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort unreachable else - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $repeat|1 end unreachable end end - local.get $4 + local.get $3 call $~lib/typedarray/Uint32Array#subarray call $~lib/typedarray/Int32Array#reverse - local.tee $1 local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Uint32Array#__get i32.const 8 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - 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 1 + call $~lib/typedarray/Uint32Array#__get i32.const 7 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 @@ -12247,20 +11601,12 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/typedarray/Uint32Array#__get i32.const 6 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 @@ -12268,20 +11614,12 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 12 - i32.add - i32.const -1 - i32.const 12 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 3 + call $~lib/typedarray/Uint32Array#__get i32.const 5 i32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -12289,7 +11627,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#reverse (; 229 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 253 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12343,7 +11681,7 @@ end local.get $0 ) - (func $~lib/typedarray/Int64Array#subarray (; 230 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 254 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12400,170 +11738,107 @@ i32.store offset=8 local.get $0 ) - (func $std/typedarray/testArrayReverse (; 231 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 255 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/testArrayReverseValues - local.set $0 + local.set $1 i32.const 9 call $~lib/typedarray/Int64Array#constructor - local.set $3 + local.set $2 i32.const 9 call $~lib/typedarray/Int64Array#constructor - local.set $4 + local.set $3 loop $repeat|0 block $break|0 - local.get $1 + local.get $0 i32.const 9 i32.ge_s br_if $break|0 - local.get $1 - i32.const 3 - i32.shl - local.tee $5 - local.get $3 - i32.load offset=4 - i32.add - local.get $1 - i32.const 2 - i32.shl - local.tee $2 - local.get $0 - i32.load offset=4 - i32.add - i32.const -1 local.get $2 local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load32_s - i64.store - local.get $4 - i32.load offset=4 - local.get $5 - i32.add + local.get $1 local.get $0 - i32.load offset=4 - local.get $2 - i32.add - i32.const -1 - local.get $2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $3 local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load32_s - i64.store local.get $1 + local.get $0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end - local.get $3 + local.get $2 call $~lib/typedarray/Int64Array#reverse drop i32.const 0 - local.set $1 + local.set $0 loop $repeat|1 block $break|1 - local.get $1 + local.get $0 i32.const 9 i32.ge_s br_if $break|1 - local.get $1 - i32.const 3 - i32.shl - local.tee $2 - local.get $3 - i32.load offset=4 - i32.add - i32.const -1 local.get $2 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i64.load - i32.const 8 - local.get $1 - i32.sub - i32.const 2 - i32.shl - local.tee $2 local.get $0 - i32.load offset=4 - i32.add - i32.const -1 - local.get $2 + call $~lib/typedarray/Int64Array#__get + local.get $1 + i32.const 8 local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load32_s + i32.sub + call $~lib/array/Array#__get + i64.extend_i32_s i64.ne if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort unreachable else - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|1 end unreachable end end - local.get $4 + local.get $3 call $~lib/typedarray/Int64Array#subarray call $~lib/typedarray/Int64Array#reverse - local.tee $1 local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load + call $~lib/typedarray/Int64Array#__get i64.const 8 i64.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load + i32.const 1 + call $~lib/typedarray/Int64Array#__get i64.const 7 i64.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 @@ -12571,20 +11846,12 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 16 - i32.add - i32.const -1 - i32.const 16 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load + i32.const 2 + call $~lib/typedarray/Int64Array#__get i64.const 6 i64.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 @@ -12592,20 +11859,12 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 24 - i32.add - i32.const -1 - i32.const 24 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load + i32.const 3 + call $~lib/typedarray/Int64Array#__get i64.const 5 i64.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -12613,7 +11872,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#subarray (; 232 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 256 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12670,170 +11929,107 @@ i32.store offset=8 local.get $0 ) - (func $std/typedarray/testArrayReverse (; 233 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 257 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/testArrayReverseValues - local.set $0 + local.set $1 i32.const 9 call $~lib/typedarray/Uint64Array#constructor - local.set $3 + local.set $2 i32.const 9 call $~lib/typedarray/Uint64Array#constructor - local.set $4 + local.set $3 loop $repeat|0 block $break|0 - local.get $1 + local.get $0 i32.const 9 i32.ge_s br_if $break|0 - local.get $1 - i32.const 3 - i32.shl - local.tee $5 - local.get $3 - i32.load offset=4 - i32.add - local.get $1 - i32.const 2 - i32.shl - local.tee $2 - local.get $0 - i32.load offset=4 - i32.add - i32.const -1 local.get $2 local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load32_s - i64.store - local.get $4 - i32.load offset=4 - local.get $5 - i32.add + local.get $1 local.get $0 - i32.load offset=4 - local.get $2 - i32.add - i32.const -1 - local.get $2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $3 local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load32_s - i64.store local.get $1 + local.get $0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end - local.get $3 + local.get $2 call $~lib/typedarray/Int64Array#reverse drop i32.const 0 - local.set $1 + local.set $0 loop $repeat|1 block $break|1 - local.get $1 - i32.const 9 - i32.ge_s - br_if $break|1 - local.get $1 - i32.const 3 - i32.shl - local.tee $2 - local.get $3 - i32.load offset=4 - i32.add - i32.const -1 - local.get $2 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i64.load - i32.const 8 - local.get $1 - i32.sub - i32.const 2 - i32.shl - local.tee $2 local.get $0 - i32.load offset=4 - i32.add - i32.const -1 + i32.const 9 + i32.ge_s + br_if $break|1 local.get $2 local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load32_s + call $~lib/typedarray/Uint64Array#__get + local.get $1 + i32.const 8 + local.get $0 + i32.sub + call $~lib/array/Array#__get + i64.extend_i32_s i64.ne if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort unreachable else - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|1 end unreachable end end - local.get $4 + local.get $3 call $~lib/typedarray/Uint64Array#subarray call $~lib/typedarray/Int64Array#reverse - local.tee $1 local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load + call $~lib/typedarray/Uint64Array#__get i64.const 8 i64.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load + i32.const 1 + call $~lib/typedarray/Uint64Array#__get i64.const 7 i64.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 @@ -12841,20 +12037,12 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 16 - i32.add - i32.const -1 - i32.const 16 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load + i32.const 2 + call $~lib/typedarray/Uint64Array#__get i64.const 6 i64.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 @@ -12862,20 +12050,12 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 24 - i32.add - i32.const -1 - i32.const 24 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i64.load + i32.const 3 + call $~lib/typedarray/Uint64Array#__get i64.const 5 i64.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -12883,7 +12063,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 234 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 258 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12937,7 +12117,7 @@ end local.get $0 ) - (func $~lib/typedarray/Float32Array#subarray (; 235 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 259 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12994,169 +12174,107 @@ i32.store offset=8 local.get $0 ) - (func $std/typedarray/testArrayReverse (; 236 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 260 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) global.get $std/typedarray/testArrayReverseValues - local.set $0 + local.set $1 i32.const 9 call $~lib/typedarray/Float32Array#constructor - local.set $3 + local.set $2 i32.const 9 call $~lib/typedarray/Float32Array#constructor - local.set $4 + local.set $3 loop $repeat|0 block $break|0 - local.get $2 + local.get $0 i32.const 9 i32.ge_s br_if $break|0 local.get $2 - i32.const 2 - i32.shl - local.tee $1 - local.get $3 - i32.load offset=4 - i32.add local.get $0 - i32.load offset=4 - local.get $1 - i32.add - i32.const -1 local.get $1 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get f32.convert_i32_s - f32.store - local.get $4 - i32.load offset=4 - local.get $1 - i32.add + call $~lib/typedarray/Float32Array#__set + local.get $3 local.get $0 - i32.load offset=4 - local.get $1 - i32.add - i32.const -1 local.get $1 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get f32.convert_i32_s - f32.store - local.get $2 + call $~lib/typedarray/Float32Array#__set + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $repeat|0 end end - local.get $3 + local.get $2 call $~lib/typedarray/Float32Array#reverse drop i32.const 0 - local.set $2 + local.set $0 loop $repeat|1 block $break|1 - local.get $2 + local.get $0 i32.const 9 i32.ge_s br_if $break|1 local.get $2 - i32.const 2 - i32.shl - local.tee $1 - local.get $3 - i32.load offset=4 - i32.add - i32.const -1 - local.get $1 - local.get $3 - i32.load offset=8 - i32.lt_u - select - f32.load - i32.const 8 - local.get $2 - i32.sub - i32.const 2 - i32.shl - local.tee $1 local.get $0 - i32.load offset=4 - i32.add - i32.const -1 + call $~lib/typedarray/Float32Array#__get local.get $1 + i32.const 8 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.sub + call $~lib/array/Array#__get f32.convert_i32_s f32.ne if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort unreachable else - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $repeat|1 end unreachable end end - local.get $4 + local.get $3 call $~lib/typedarray/Float32Array#subarray call $~lib/typedarray/Float32Array#reverse - local.tee $1 local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f32.load + call $~lib/typedarray/Float32Array#__get f32.const 8 f32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - 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 - f32.load + i32.const 1 + call $~lib/typedarray/Float32Array#__get f32.const 7 f32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 @@ -13164,20 +12282,12 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f32.load + i32.const 2 + call $~lib/typedarray/Float32Array#__get f32.const 6 f32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 @@ -13185,20 +12295,12 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 12 - i32.add - i32.const -1 - i32.const 12 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f32.load + i32.const 3 + call $~lib/typedarray/Float32Array#__get f32.const 5 f32.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -13206,7 +12308,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 237 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 261 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13260,175 +12362,109 @@ end local.get $0 ) - (func $std/typedarray/testArrayReverse (; 238 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 262 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/testArrayReverseValues - local.set $0 + local.set $1 i32.const 9 call $~lib/typedarray/Float64Array#constructor - local.set $3 + local.set $2 i32.const 9 call $~lib/typedarray/Float64Array#constructor - local.set $4 + local.set $3 loop $repeat|0 block $break|0 - local.get $1 + local.get $0 i32.const 9 i32.ge_s br_if $break|0 - local.get $1 - i32.const 3 - i32.shl - local.tee $5 - local.get $3 - i32.load offset=4 - i32.add - local.get $1 - i32.const 2 - i32.shl - local.tee $2 - local.get $0 - i32.load offset=4 - i32.add - i32.const -1 local.get $2 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + local.get $1 + local.get $0 + call $~lib/array/Array#__get f64.convert_i32_s - f64.store - local.get $4 - i32.load offset=4 - local.get $5 - i32.add + call $~lib/typedarray/Float64Array#__set + local.get $3 local.get $0 - i32.load offset=4 - local.get $2 - i32.add - i32.const -1 - local.get $2 + local.get $1 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get f64.convert_i32_s - f64.store - local.get $1 + call $~lib/typedarray/Float64Array#__set + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end - local.get $3 + local.get $2 call $~lib/typedarray/Float64Array#reverse drop i32.const 0 - local.set $1 + local.set $0 loop $repeat|1 block $break|1 - local.get $1 + local.get $0 i32.const 9 i32.ge_s br_if $break|1 - local.get $1 - i32.const 3 - i32.shl - local.tee $2 - local.get $3 - i32.load offset=4 - i32.add - i32.const -1 local.get $2 - local.get $3 - i32.load offset=8 - i32.lt_u - select - f64.load - i32.const 8 - local.get $1 - i32.sub - i32.const 2 - i32.shl - local.tee $2 local.get $0 - i32.load offset=4 - i32.add - i32.const -1 - local.get $2 + call $~lib/typedarray/Float64Array#__get + local.get $1 + i32.const 8 local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.sub + call $~lib/array/Array#__get f64.convert_i32_s f64.ne if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 call $~lib/env/abort unreachable else - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|1 end unreachable end end - local.get $4 + local.get $3 i32.const 4 i32.const 8 call $~lib/typedarray/Float64Array#subarray call $~lib/typedarray/Float64Array#reverse - local.tee $1 local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/typedarray/Float64Array#__get f64.const 8 f64.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load + i32.const 1 + call $~lib/typedarray/Float64Array#__get f64.const 7 f64.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 @@ -13436,41 +12472,25 @@ unreachable end local.get $0 - i32.load offset=4 - i32.const 16 - i32.add - i32.const -1 - i32.const 16 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load + i32.const 2 + call $~lib/typedarray/Float64Array#__get f64.const 6 f64.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 24 - i32.add - i32.const -1 - i32.const 24 + unreachable + end local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load + i32.const 3 + call $~lib/typedarray/Float64Array#__get f64.const 5 f64.ne if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -13478,10 +12498,10 @@ unreachable end ) - (func $start:std/typedarray (; 239 ;) (type $FUNCSIG$v) + (func $start:std/typedarray (; 263 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - i32.const 1104 + i32.const 1192 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -13493,19 +12513,18 @@ call $~lib/typedarray/Int32Array#constructor global.set $std/typedarray/arr global.get $std/typedarray/arr - local.tee $0 - i32.load offset=4 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int32Array#__set + global.get $std/typedarray/arr i32.const 1 - i32.store - local.get $0 - i32.load offset=4 i32.const 2 - i32.store offset=4 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Int32Array#__set + global.get $std/typedarray/arr + i32.const 2 i32.const 3 - i32.store offset=8 - local.get $0 + call $~lib/typedarray/Int32Array#__set + global.get $std/typedarray/arr i32.load offset=8 i32.const 2 i32.shr_u @@ -13546,15 +12565,8 @@ unreachable end global.get $std/typedarray/arr - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Int32Array#__get i32.const 1 i32.ne if @@ -13566,17 +12578,8 @@ unreachable end global.get $std/typedarray/arr - 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 1 + call $~lib/typedarray/Int32Array#__get i32.const 2 i32.ne if @@ -13588,17 +12591,8 @@ unreachable end global.get $std/typedarray/arr - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/typedarray/Int32Array#__get i32.const 3 i32.ne if @@ -13657,15 +12651,8 @@ unreachable end global.get $std/typedarray/arr - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Int32Array#__get i32.const 2 i32.ne if @@ -13680,39 +12667,38 @@ call $~lib/typedarray/Float64Array#constructor global.set $std/typedarray/af64 global.get $std/typedarray/af64 - local.tee $0 - i32.load offset=4 + i32.const 0 f64.const 1 - f64.store - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Float64Array#__set + global.get $std/typedarray/af64 + i32.const 1 f64.const 2 - f64.store offset=8 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Float64Array#__set + global.get $std/typedarray/af64 + i32.const 2 f64.const 7 - f64.store offset=16 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Float64Array#__set + global.get $std/typedarray/af64 + i32.const 3 f64.const 6 - f64.store offset=24 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Float64Array#__set + global.get $std/typedarray/af64 + i32.const 4 f64.const 5 - f64.store offset=32 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Float64Array#__set + global.get $std/typedarray/af64 + i32.const 5 f64.const 4 - f64.store offset=40 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Float64Array#__set + global.get $std/typedarray/af64 + i32.const 6 f64.const 3 - f64.store offset=48 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Float64Array#__set + global.get $std/typedarray/af64 + i32.const 7 f64.const 8 - f64.store offset=56 - local.get $0 + call $~lib/typedarray/Float64Array#__set + global.get $std/typedarray/af64 i32.const 2 i32.const 6 call $~lib/typedarray/Float64Array#subarray @@ -13782,31 +12768,15 @@ block (result i32) block (result i32) global.get $std/typedarray/af64 - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/typedarray/Float64Array#__get f64.const 4 f64.eq local.tee $0 if global.get $std/typedarray/af64 - local.tee $0 - i32.load offset=4 - i32.const 8 - i32.add - i32.const -1 - i32.const 8 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load + i32.const 1 + call $~lib/typedarray/Float64Array#__get f64.const 5 f64.eq local.set $0 @@ -13815,17 +12785,8 @@ end if global.get $std/typedarray/af64 - local.tee $0 - i32.load offset=4 - i32.const 16 - i32.add - i32.const -1 - i32.const 16 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load + i32.const 2 + call $~lib/typedarray/Float64Array#__get f64.const 6 f64.eq local.set $0 @@ -13834,17 +12795,8 @@ end if global.get $std/typedarray/af64 - local.tee $0 - i32.load offset=4 - i32.const 24 - i32.add - i32.const -1 - i32.const 24 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load + i32.const 3 + call $~lib/typedarray/Float64Array#__get f64.const 7 f64.eq local.set $0 @@ -13863,27 +12815,20 @@ call $~lib/typedarray/Uint8ClampedArray#constructor global.set $std/typedarray/clampedArr global.get $std/typedarray/clampedArr - local.tee $0 - i32.load offset=4 i32.const 0 - i32.store8 - local.get $0 - i32.load offset=4 + i32.const -32 + call $~lib/typedarray/Uint8ClampedArray#__set + global.get $std/typedarray/clampedArr + i32.const 1 i32.const 2 - i32.store8 offset=1 - local.get $0 - i32.load offset=4 - i32.const -1 - i32.store8 offset=2 - local.get $0 - i32.load offset=4 - i32.const -1 + call $~lib/typedarray/Uint8ClampedArray#__set + global.get $std/typedarray/clampedArr + i32.const 2 + i32.const 256 + call $~lib/typedarray/Uint8ClampedArray#__set + global.get $std/typedarray/clampedArr i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8ClampedArray#__get if i32.const 0 i32.const 16 @@ -13893,17 +12838,8 @@ unreachable end global.get $std/typedarray/clampedArr - local.tee $0 - i32.load offset=4 - i32.const 1 - i32.add - i32.const -1 i32.const 1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 2 i32.ne if @@ -13915,17 +12851,8 @@ unreachable end global.get $std/typedarray/clampedArr - local.tee $0 - i32.load offset=4 - i32.const 2 - i32.add - i32.const -1 i32.const 2 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 255 i32.ne if @@ -13940,33 +12867,32 @@ call $~lib/typedarray/Int8Array#constructor global.set $std/typedarray/arr8 global.get $std/typedarray/arr8 - local.tee $0 - i32.load offset=4 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + global.get $std/typedarray/arr8 i32.const 1 - i32.store8 - local.get $0 - i32.load offset=4 i32.const 2 - i32.store8 offset=1 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Int8Array#__set + global.get $std/typedarray/arr8 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + global.get $std/typedarray/arr8 i32.const 3 - i32.store8 offset=2 - local.get $0 - i32.load offset=4 i32.const 4 - i32.store8 offset=3 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Int8Array#__set + global.get $std/typedarray/arr8 + i32.const 4 i32.const 5 - i32.store8 offset=4 - local.get $0 + call $~lib/typedarray/Int8Array#__set + global.get $std/typedarray/arr8 i32.const 1 i32.const 1 i32.const 3 call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 - i32.const 152 + i32.const 200 i32.const 15 i32.const 0 call $~lib/runtime/doWrapArray @@ -13986,7 +12912,7 @@ i32.const 2147483647 call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 - i32.const 168 + i32.const 256 i32.const 15 i32.const 0 call $~lib/runtime/doWrapArray @@ -14006,7 +12932,7 @@ i32.const -3 call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 - i32.const 184 + i32.const 272 i32.const 15 i32.const 0 call $~lib/runtime/doWrapArray @@ -14026,7 +12952,7 @@ i32.const 2147483647 call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 - i32.const 200 + i32.const 288 i32.const 15 i32.const 0 call $~lib/runtime/doWrapArray @@ -14046,7 +12972,7 @@ i32.const 0 call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 - i32.const 216 + i32.const 304 i32.const 15 i32.const 0 call $~lib/runtime/doWrapArray @@ -14111,7 +13037,7 @@ unreachable end global.get $std/typedarray/sub8 - i32.const 232 + i32.const 320 i32.const 15 i32.const 0 call $~lib/runtime/doWrapArray @@ -14126,7 +13052,7 @@ unreachable end global.get $std/typedarray/arr8 - i32.const 248 + i32.const 336 i32.const 15 i32.const 0 call $~lib/runtime/doWrapArray @@ -14144,33 +13070,32 @@ call $~lib/typedarray/Int32Array#constructor global.set $std/typedarray/arr32 global.get $std/typedarray/arr32 - local.tee $0 - i32.load offset=4 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int32Array#__set + global.get $std/typedarray/arr32 i32.const 1 - i32.store - local.get $0 - i32.load offset=4 i32.const 2 - i32.store offset=4 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Int32Array#__set + global.get $std/typedarray/arr32 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int32Array#__set + global.get $std/typedarray/arr32 i32.const 3 - i32.store offset=8 - local.get $0 - i32.load offset=4 i32.const 4 - i32.store offset=12 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Int32Array#__set + global.get $std/typedarray/arr32 + i32.const 4 i32.const 5 - i32.store offset=16 - local.get $0 + call $~lib/typedarray/Int32Array#__set + global.get $std/typedarray/arr32 i32.const 1 i32.const 1 i32.const 3 call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 - i32.const 264 + i32.const 352 i32.const 16 i32.const 2 call $~lib/runtime/doWrapArray @@ -14190,7 +13115,7 @@ i32.const 2147483647 call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 - i32.const 296 + i32.const 384 i32.const 16 i32.const 2 call $~lib/runtime/doWrapArray @@ -14210,7 +13135,7 @@ i32.const -3 call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 - i32.const 328 + i32.const 416 i32.const 16 i32.const 2 call $~lib/runtime/doWrapArray @@ -14230,7 +13155,7 @@ i32.const 2147483647 call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 - i32.const 360 + i32.const 448 i32.const 16 i32.const 2 call $~lib/runtime/doWrapArray @@ -14250,7 +13175,7 @@ i32.const 0 call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 - i32.const 392 + i32.const 480 i32.const 16 i32.const 2 call $~lib/runtime/doWrapArray @@ -14317,7 +13242,7 @@ unreachable end global.get $std/typedarray/sub32 - i32.const 424 + i32.const 512 i32.const 16 i32.const 2 call $~lib/runtime/doWrapArray @@ -14332,7 +13257,7 @@ unreachable end global.get $std/typedarray/arr32 - i32.const 448 + i32.const 536 i32.const 16 i32.const 2 call $~lib/runtime/doWrapArray @@ -14353,45 +13278,37 @@ call $~lib/typedarray/Int8Array#constructor global.set $std/typedarray/multisubarr global.get $std/typedarray/multisubarr - local.tee $0 - i32.load offset=4 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + global.get $std/typedarray/multisubarr i32.const 1 - i32.store8 - local.get $0 - i32.load offset=4 i32.const 2 - i32.store8 offset=1 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Int8Array#__set + global.get $std/typedarray/multisubarr + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + global.get $std/typedarray/multisubarr i32.const 3 - i32.store8 offset=2 - local.get $0 - i32.load offset=4 i32.const 4 - i32.store8 offset=3 - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Int8Array#__set + global.get $std/typedarray/multisubarr + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int8Array#__set + global.get $std/typedarray/multisubarr i32.const 5 - i32.store8 offset=4 - local.get $0 - i32.load offset=4 i32.const 6 - i32.store8 offset=5 - local.get $0 + call $~lib/typedarray/Int8Array#__set + global.get $std/typedarray/multisubarr i32.const 1 i32.const 6 call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/multisubarr1 global.get $std/typedarray/multisubarr1 - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/typedarray/Int8Array#__get i32.const 2 i32.ne if @@ -14448,15 +13365,8 @@ call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/multisubarr2 global.get $std/typedarray/multisubarr2 - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/typedarray/Int8Array#__get i32.const 3 i32.ne if @@ -14513,15 +13423,8 @@ call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/multisubarr3 global.get $std/typedarray/multisubarr3 - local.tee $0 - i32.load offset=4 - i32.const -1 i32.const 0 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/typedarray/Int8Array#__get i32.const 4 i32.ne if @@ -14661,10 +13564,10 @@ call $std/typedarray/testArrayReverse call $std/typedarray/testArrayReverse ) - (func $start (; 240 ;) (type $FUNCSIG$v) + (func $start (; 264 ;) (type $FUNCSIG$v) call $start:std/typedarray ) - (func $null (; 241 ;) (type $FUNCSIG$v) + (func $null (; 265 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index e7a38fc928..e34ee8789a 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -5,17 +5,23 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$viid (func (param i32 i32 f64))) (type $FUNCSIG$idd (func (param f64 f64) (result i32))) + (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) + (type $FUNCSIG$viij (func (param i32 i32 i64))) (type $FUNCSIG$jjjii (func (param i64 i64 i32 i32) (result i64))) (type $FUNCSIG$jiij (func (param i32 i32 i64) (result i64))) + (type $FUNCSIG$viif (func (param i32 i32 f32))) (type $FUNCSIG$fffii (func (param f32 f32 i32 i32) (result f32))) (type $FUNCSIG$fiif (func (param i32 i32 f32) (result f32))) (type $FUNCSIG$dddii (func (param f64 f64 i32 i32) (result f64))) (type $FUNCSIG$diid (func (param i32 i32 f64) (result f64))) (type $FUNCSIG$jjii (func (param i64 i32 i32) (result i64))) + (type $FUNCSIG$jii (func (param i32 i32) (result i64))) (type $FUNCSIG$ffii (func (param f32 i32 i32) (result f32))) + (type $FUNCSIG$fii (func (param i32 i32) (result f32))) (type $FUNCSIG$ddii (func (param f64 i32 i32) (result f64))) (type $FUNCSIG$ijii (func (param i64 i32 i32) (result i32))) (type $FUNCSIG$ifii (func (param f32 i32 i32) (result i32))) @@ -31,32 +37,34 @@ (data (i32.const 8) "\01\00\00\00\"\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 56) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 96) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 144) "\02\00\00\00\05\00\00\00\01\01\01\04\05") - (data (i32.const 160) "\02\00\00\00\05\00\00\00\00\00\00\00\00") - (data (i32.const 176) "\02\00\00\00\05\00\00\00\01\01\00\00\00") - (data (i32.const 192) "\02\00\00\00\05\00\00\00\01\01\00\02\02") - (data (i32.const 208) "\02\00\00\00\05\00\00\00\01\01\00\02\02") - (data (i32.const 224) "\02\00\00\00\03\00\00\00\00\00\00") - (data (i32.const 240) "\02\00\00\00\05\00\00\00\01\00\00\00\02") - (data (i32.const 256) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 288) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 320) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 352) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") - (data (i32.const 384) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") - (data (i32.const 416) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 440) "\02\00\00\00\14\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00") - (data (i32.const 472) "\01\00\00\00\1e\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 512) "\01\00\00\00(\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 560) "\02\00\00\00\0c\00\00\00\n\00\00\00\0c\00\00\00\0e\00\00\00") - (data (i32.const 584) "\10\00\00\00\10\00\00\008\02\00\008\02\00\00\0c\00\00\00\03\00\00\00") - (data (i32.const 608) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 664) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 720) "\01\00\00\00>\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 792) "\01\00\00\006\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 856) "\02\00\00\00$\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00") - (data (i32.const 904) "\10\00\00\00\10\00\00\00`\03\00\00`\03\00\00$\00\00\00\t\00\00\00") - (data (i32.const 928) "\01\00\00\00B\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 1008) "\01\00\00\00V\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 144) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 192) "\02\00\00\00\05\00\00\00\01\01\01\04\05") + (data (i32.const 208) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 248) "\02\00\00\00\05\00\00\00\00\00\00\00\00") + (data (i32.const 264) "\02\00\00\00\05\00\00\00\01\01\00\00\00") + (data (i32.const 280) "\02\00\00\00\05\00\00\00\01\01\00\02\02") + (data (i32.const 296) "\02\00\00\00\05\00\00\00\01\01\00\02\02") + (data (i32.const 312) "\02\00\00\00\03\00\00\00\00\00\00") + (data (i32.const 328) "\02\00\00\00\05\00\00\00\01\00\00\00\02") + (data (i32.const 344) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 376) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 408) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 440) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") + (data (i32.const 472) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") + (data (i32.const 504) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 528) "\02\00\00\00\14\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00") + (data (i32.const 560) "\01\00\00\00\1e\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 600) "\01\00\00\00(\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 648) "\02\00\00\00\0c\00\00\00\n\00\00\00\0c\00\00\00\0e\00\00\00") + (data (i32.const 672) "\10\00\00\00\10\00\00\00\90\02\00\00\90\02\00\00\0c\00\00\00\03\00\00\00") + (data (i32.const 696) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 752) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 808) "\01\00\00\00>\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 880) "\01\00\00\006\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 944) "\02\00\00\00$\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00") + (data (i32.const 992) "\10\00\00\00\10\00\00\00\b8\03\00\00\b8\03\00\00$\00\00\00\t\00\00\00") + (data (i32.const 1016) "\01\00\00\00B\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1096) "\01\00\00\00V\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (table $0 112 funcref) (elem (i32.const 0) $null $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0) (global $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32 (i32.const 1)) @@ -93,9 +101,9 @@ (global $std/typedarray/multisubarr3 (mut i32) (i32.const 0)) (global $std/typedarray/forEachCallCount (mut i32) (i32.const 0)) (global $std/typedarray/forEachSelf (mut i32) (i32.const 0)) - (global $std/typedarray/forEachValues (mut i32) (i32.const 592)) - (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 912)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 1104)) + (global $std/typedarray/forEachValues (mut i32) (i32.const 680)) + (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 1000)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 1192)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -662,25 +670,27 @@ (func $~lib/typedarray/Uint8ClampedArray#constructor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.eqz - if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 12 - call $~lib/runtime/ALLOCATE - local.set $2 - local.get $2 - i32.const 6 - call $~lib/runtime/doRegister - end - local.set $0 + if (result i32) + local.get $0 + else + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 6 + call $~lib/runtime/doRegister end - local.get $0 local.get $1 - call $~lib/typedarray/Uint8Array#constructor + i32.const 0 + call $~lib/runtime/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/typedarray/Int16Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#get:length (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/ArrayBufferView#get:byteLength + ) + (func $~lib/typedarray/Int16Array#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -699,13 +709,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int16Array#get:length (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#get:length (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 1 i32.shr_u ) - (func $~lib/typedarray/Uint16Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -724,13 +734,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint16Array#get:length (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#get:length (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 1 i32.shr_u ) - (func $~lib/typedarray/Int32Array#constructor (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#constructor (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -749,13 +759,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int32Array#get:length (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#get:length (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Uint32Array#constructor (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -774,13 +784,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint32Array#get:length (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Int64Array#constructor (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#constructor (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -799,13 +809,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int64Array#get:length (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#get:length (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $~lib/typedarray/Uint64Array#constructor (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#constructor (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -824,13 +834,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint64Array#get:length (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#get:length (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $~lib/typedarray/Float32Array#constructor (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#constructor (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -849,13 +859,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Float32Array#get:length (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#get:length (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Float64Array#constructor (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#constructor (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -874,13 +884,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Float64Array#get:length (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $std/typedarray/testInstantiate (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/typedarray/testInstantiate (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1015,7 +1025,7 @@ unreachable end local.get $3 - call $~lib/typedarray/Uint8Array#get:length + call $~lib/typedarray/Uint8ClampedArray#get:length local.get $0 i32.eq i32.eqz @@ -1388,7 +1398,54 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#subarray (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#__set (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 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 152 + i32.const 435 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + ) + (func $~lib/typedarray/Int32Array#__get (; 36 ;) (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 152 + i32.const 429 + i32.const 63 + 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/typedarray/Int32Array#subarray (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1502,7 +1559,31 @@ i32.store offset=8 local.get $7 ) - (func $~lib/typedarray/Float64Array#subarray (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#__set (; 38 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 840 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + f64.store + ) + (func $~lib/typedarray/Float64Array#subarray (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1616,7 +1697,7 @@ i32.store offset=8 local.get $7 ) - (func $~lib/util/sort/insertionSort (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) @@ -1712,12 +1793,12 @@ unreachable end ) - (func $~lib/memory/memory.free (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 local.set $1 ) - (func $~lib/util/sort/weakHeapSort (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2017,7 +2098,7 @@ local.get $10 f64.store ) - (func $~lib/typedarray/Float64Array#sort (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2101,7 +2182,7 @@ local.get $2 end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 40 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 44 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -2134,7 +2215,7 @@ i64.lt_s i32.sub ) - (func $~lib/typedarray/Float64Array#sort|trampoline (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort|trampoline (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2153,7 +2234,101 @@ local.get $1 call $~lib/typedarray/Float64Array#sort ) - (func $~lib/typedarray/Int8Array#fill (; 42 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Float64Array#__get (; 46 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 834 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + ) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 47 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 192 + i32.const 44 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + local.get $2 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $2 + i32.sub + i32.const 31 + i32.shr_s + local.get $2 + i32.or + i32.and + i32.store8 + ) + (func $~lib/typedarray/Uint8ClampedArray#__get (; 48 ;) (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 152 + i32.const 186 + i32.const 44 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + i32.load8_u + ) + (func $~lib/typedarray/Int8Array#__set (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 30 + i32.const 44 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + local.get $2 + i32.store8 + ) + (func $~lib/typedarray/Int8Array#fill (; 50 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2241,13 +2416,13 @@ end local.get $4 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $~lib/util/memory/memcpy (; 44 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3448,7 +3623,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 @@ -3677,7 +3852,7 @@ end end ) - (func $~lib/runtime/doWrapArray (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/doWrapArray (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3714,15 +3889,55 @@ call $~lib/memory/memory.copy local.get $3 ) - (func $~lib/array/Array#get:length (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/typedarray/isInt8ArrayEqual (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 56 ;) (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 152 + i32.const 24 + i32.const 44 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + i32.load8_s + ) + (func $~lib/array/Array#__get (; 57 ;) (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 216 + 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 $std/typedarray/isInt8ArrayEqual (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 call $~lib/typedarray/Int8Array#get:length local.get $1 @@ -3747,31 +3962,11 @@ i32.eqz br_if $break|0 local.get $0 - local.tee $4 - i32.load offset=4 local.get $2 - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/typedarray/Int8Array#__get local.get $1 - local.tee $4 - i32.load offset=4 local.get $2 - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/array/Array#__get i32.ne if i32.const 0 @@ -3788,7 +3983,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3902,7 +4097,7 @@ i32.store offset=8 local.get $7 ) - (func $~lib/typedarray/Int32Array#fill (; 50 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#fill (; 60 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -4000,15 +4195,36 @@ end local.get $4 ) - (func $~lib/array/Array#get:length (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/typedarray/isInt32ArrayEqual (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 62 ;) (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 216 + 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/typedarray/isInt32ArrayEqual (; 63 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 call $~lib/typedarray/Int32Array#get:length local.get $1 @@ -4033,35 +4249,11 @@ i32.eqz br_if $break|0 local.get $0 - local.tee $4 - i32.load offset=4 local.get $2 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Int32Array#__get local.get $1 - local.tee $4 - i32.load offset=4 local.get $2 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.ne if i32.const 0 @@ -4078,12 +4270,12 @@ end i32.const 1 ) - (func $std/typedarray/testReduce~anonymous|0 (; 53 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 64 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduce (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4140,7 +4332,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 55 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 66 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4148,17 +4340,17 @@ call $~lib/typedarray/Int8Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 2 i32.const 0 @@ -4181,12 +4373,32 @@ unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 56 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__set (; 67 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 111 + i32.const 44 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + local.get $2 + i32.store8 + ) + (func $std/typedarray/testReduce~anonymous|0 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduce (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4243,7 +4455,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 58 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 70 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4251,17 +4463,17 @@ call $~lib/typedarray/Uint8Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 3 i32.const 0 @@ -4282,12 +4494,12 @@ unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 59 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduce (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduce (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4308,7 +4520,7 @@ i32.const 0 local.set $7 local.get $3 - call $~lib/typedarray/Uint8Array#get:length + call $~lib/typedarray/Uint8ClampedArray#get:length local.set $8 end loop $repeat|0 @@ -4344,71 +4556,31 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 61 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 73 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - (local $2 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 offset=1 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 offset=2 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 4 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#reduce - local.set $2 - local.get $2 + local.set $1 + local.get $1 i32.const 255 i32.and i32.const 6 @@ -4423,12 +4595,36 @@ unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 62 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int16Array#__set (; 74 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 273 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $2 + i32.store16 + ) + (func $std/typedarray/testReduce~anonymous|0 (; 75 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduce (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduce (; 76 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4485,7 +4681,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 64 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 77 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4493,17 +4689,17 @@ call $~lib/typedarray/Int16Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store16 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store16 offset=2 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store16 offset=4 + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 5 i32.const 0 @@ -4526,12 +4722,36 @@ unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 65 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__set (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 354 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $2 + i32.store16 + ) + (func $std/typedarray/testReduce~anonymous|0 (; 79 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduce (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduce (; 80 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4588,7 +4808,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 67 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 81 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4596,17 +4816,17 @@ call $~lib/typedarray/Uint16Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store16 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store16 offset=2 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store16 offset=4 + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 6 i32.const 0 @@ -4627,12 +4847,12 @@ unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 82 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduce (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 83 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4689,7 +4909,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 70 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 84 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4697,17 +4917,17 @@ call $~lib/typedarray/Int32Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store offset=4 + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store offset=8 + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 7 i32.const 0 @@ -4726,12 +4946,36 @@ unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__set (; 85 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 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 152 + i32.const 516 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + ) + (func $std/typedarray/testReduce~anonymous|0 (; 86 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduce (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduce (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4788,7 +5032,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 73 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 88 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4796,17 +5040,17 @@ call $~lib/typedarray/Uint32Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store offset=4 + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store offset=8 + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 8 i32.const 0 @@ -4825,12 +5069,36 @@ unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 74 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $~lib/typedarray/Int64Array#__set (; 89 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 597 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + i64.store + ) + (func $std/typedarray/testReduce~anonymous|0 (; 90 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 75 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 91 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -4887,7 +5155,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 76 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 92 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -4895,17 +5163,17 @@ call $~lib/typedarray/Int64Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i64.const 1 - i64.store + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 2 - i64.store offset=8 + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 3 - i64.store offset=16 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 9 i64.const 0 @@ -4924,12 +5192,36 @@ unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 77 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__set (; 93 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 678 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + i64.store + ) + (func $std/typedarray/testReduce~anonymous|0 (; 94 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduce (; 78 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduce (; 95 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -4986,7 +5278,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 79 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 96 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -4994,17 +5286,17 @@ call $~lib/typedarray/Uint64Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i64.const 1 - i64.store + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 2 - i64.store offset=8 + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 3 - i64.store offset=16 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 10 i64.const 0 @@ -5023,20 +5315,44 @@ unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 80 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) - local.get $0 + (func $~lib/typedarray/Float32Array#__set (; 97 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 - f32.add - ) - (func $~lib/typedarray/Float32Array#reduce (; 81 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) - (local $3 i32) - (local $4 i32) - (local $5 f32) - (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 - local.set $3 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 759 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + f32.store + ) + (func $std/typedarray/testReduce~anonymous|0 (; 98 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + local.get $0 + local.get $1 + f32.add + ) + (func $~lib/typedarray/Float32Array#reduce (; 99 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (local $3 i32) + (local $4 i32) + (local $5 f32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + local.set $3 local.get $1 local.set $4 local.get $2 @@ -5085,7 +5401,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 82 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 100 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -5093,17 +5409,17 @@ call $~lib/typedarray/Float32Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 f32.const 1 - f32.store + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f32.const 2 - f32.store offset=4 + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f32.const 3 - f32.store offset=8 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 11 f32.const 0 @@ -5122,12 +5438,12 @@ unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 83 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce~anonymous|0 (; 101 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 84 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduce (; 102 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) @@ -5184,7 +5500,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 85 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 103 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -5192,17 +5508,17 @@ call $~lib/typedarray/Float64Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 f64.const 1 - f64.store + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f64.const 2 - f64.store offset=8 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f64.const 3 - f64.store offset=16 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 12 f64.const 0 @@ -5221,12 +5537,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 86 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 104 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduceRight (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduceRight (; 105 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5280,7 +5596,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 88 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 106 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5288,17 +5604,17 @@ call $~lib/typedarray/Int8Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 13 i32.const 0 @@ -5321,12 +5637,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 89 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 90 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 108 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5380,7 +5696,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 91 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 109 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5388,17 +5704,17 @@ call $~lib/typedarray/Uint8Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 14 i32.const 0 @@ -5419,12 +5735,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 92 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 110 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 111 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5441,7 +5757,7 @@ local.set $6 block $break|0 local.get $3 - call $~lib/typedarray/Uint8Array#get:length + call $~lib/typedarray/Uint8ClampedArray#get:length i32.const 1 i32.sub local.set $7 @@ -5478,71 +5794,31 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 94 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 112 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - (local $2 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 offset=1 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 offset=2 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 15 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#reduceRight - local.set $2 - local.get $2 + local.set $1 + local.get $1 i32.const 255 i32.and i32.const 6 @@ -5557,12 +5833,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 113 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduceRight (; 96 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduceRight (; 114 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5616,7 +5892,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 97 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 115 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5624,17 +5900,17 @@ call $~lib/typedarray/Int16Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store16 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store16 offset=2 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store16 offset=4 + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 16 i32.const 0 @@ -5657,12 +5933,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 116 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 99 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 117 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5716,7 +5992,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 100 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 118 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5724,17 +6000,17 @@ call $~lib/typedarray/Uint16Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store16 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store16 offset=2 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store16 offset=4 + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 17 i32.const 0 @@ -5755,12 +6031,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 101 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 119 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduceRight (; 102 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 120 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5814,7 +6090,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 103 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 121 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5822,17 +6098,17 @@ call $~lib/typedarray/Int32Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store offset=4 + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store offset=8 + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 18 i32.const 0 @@ -5851,12 +6127,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 104 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 122 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduceRight (; 105 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduceRight (; 123 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5910,7 +6186,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 106 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 124 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5918,17 +6194,17 @@ call $~lib/typedarray/Uint32Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store offset=4 + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store offset=8 + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 19 i32.const 0 @@ -5947,12 +6223,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 107 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight~anonymous|0 (; 125 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduceRight (; 108 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 126 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -6006,7 +6282,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 109 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 127 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6014,17 +6290,17 @@ call $~lib/typedarray/Int64Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i64.const 1 - i64.store + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 2 - i64.store offset=8 + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 3 - i64.store offset=16 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 20 i64.const 0 @@ -6043,12 +6319,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 110 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight~anonymous|0 (; 128 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduceRight (; 111 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduceRight (; 129 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -6102,7 +6378,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 112 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 130 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6110,17 +6386,17 @@ call $~lib/typedarray/Uint64Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i64.const 1 - i64.store + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 2 - i64.store offset=8 + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 3 - i64.store offset=16 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 21 i64.const 0 @@ -6139,12 +6415,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 113 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 131 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduceRight (; 114 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduceRight (; 132 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -6198,7 +6474,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 115 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 133 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -6206,17 +6482,17 @@ call $~lib/typedarray/Float32Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 f32.const 1 - f32.store + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f32.const 2 - f32.store offset=4 + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f32.const 3 - f32.store offset=8 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 22 f32.const 0 @@ -6235,12 +6511,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 116 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduceRight~anonymous|0 (; 134 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduceRight (; 117 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduceRight (; 135 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) @@ -6294,7 +6570,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 118 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 136 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -6302,17 +6578,17 @@ call $~lib/typedarray/Float64Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 f64.const 1 - f64.store + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f64.const 2 - f64.store offset=8 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f64.const 3 - f64.store offset=16 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 23 f64.const 0 @@ -6331,12 +6607,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 119 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6401,44 +6677,32 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 121 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 139 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Int8Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 24 call $~lib/typedarray/Int8Array#map local.set $1 local.get $1 - local.tee $2 - i32.load offset=4 i32.const 0 - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/typedarray/Int8Array#__get i32.const 1 i32.eq i32.eqz @@ -6451,18 +6715,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 i32.const 1 - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/typedarray/Int8Array#__get i32.const 4 i32.eq i32.eqz @@ -6475,18 +6729,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 i32.const 2 - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/typedarray/Int8Array#__get i32.const 9 i32.eq i32.eqz @@ -6499,12 +6743,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 122 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 140 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8Array#map (; 123 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6569,44 +6813,51 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 124 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Uint8Array#__get (; 142 ;) (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 152 + i32.const 105 + i32.const 44 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + i32.load8_u + ) + (func $std/typedarray/testArrayMap (; 143 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint8Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 25 call $~lib/typedarray/Uint8Array#map local.set $1 local.get $1 - local.tee $2 - i32.load offset=4 i32.const 0 - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8Array#__get i32.const 1 i32.eq i32.eqz @@ -6619,18 +6870,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 i32.const 1 - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8Array#__get i32.const 4 i32.eq i32.eqz @@ -6643,18 +6884,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 i32.const 2 - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8Array#__get i32.const 9 i32.eq i32.eqz @@ -6667,12 +6898,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 125 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 144 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 145 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6685,7 +6916,7 @@ local.get $1 local.set $3 local.get $2 - call $~lib/typedarray/Uint8Array#get:length + call $~lib/typedarray/Uint8ClampedArray#get:length local.set $4 local.get $2 i32.load offset=4 @@ -6737,83 +6968,32 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 127 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 146 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 offset=1 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 offset=2 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 26 call $~lib/typedarray/Uint8ClampedArray#map - local.set $2 - local.get $2 - local.tee $1 - i32.load offset=4 - i32.const 0 - local.tee $3 - i32.add - i32.const -1 - local.get $3 + local.set $1 local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + i32.const 0 + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 1 i32.eq i32.eqz @@ -6825,19 +7005,9 @@ call $~lib/env/abort unreachable end - local.get $2 - local.tee $1 - i32.load offset=4 - i32.const 1 - local.tee $3 - i32.add - i32.const -1 - local.get $3 local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 4 i32.eq i32.eqz @@ -6849,19 +7019,9 @@ call $~lib/env/abort unreachable end - local.get $2 - local.tee $1 - i32.load offset=4 - i32.const 2 - local.tee $3 - i32.add - i32.const -1 - local.get $3 local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 9 i32.eq i32.eqz @@ -6874,12 +7034,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 128 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 147 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int16Array#map (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6944,46 +7104,55 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 130 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Int16Array#__get (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 267 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + ) + (func $std/typedarray/testArrayMap (; 150 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Int16Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store16 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store16 offset=2 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store16 offset=4 + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 27 call $~lib/typedarray/Int16Array#map local.set $1 local.get $1 - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 1 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load16_s + call $~lib/typedarray/Int16Array#__get i32.const 1 i32.eq i32.eqz @@ -6996,20 +7165,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 - i32.const 1 i32.const 1 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load16_s + call $~lib/typedarray/Int16Array#__get i32.const 4 i32.eq i32.eqz @@ -7022,20 +7179,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 i32.const 2 - i32.const 1 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load16_s + call $~lib/typedarray/Int16Array#__get i32.const 9 i32.eq i32.eqz @@ -7048,12 +7193,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 151 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint16Array#map (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7118,46 +7263,55 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 133 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Uint16Array#__get (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 348 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u + ) + (func $std/typedarray/testArrayMap (; 154 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint16Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store16 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store16 offset=2 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store16 offset=4 + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 28 call $~lib/typedarray/Uint16Array#map local.set $1 local.get $1 - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 1 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load16_u + call $~lib/typedarray/Uint16Array#__get i32.const 1 i32.eq i32.eqz @@ -7170,20 +7324,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 - i32.const 1 i32.const 1 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load16_u + call $~lib/typedarray/Uint16Array#__get i32.const 4 i32.eq i32.eqz @@ -7196,20 +7338,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 i32.const 2 - i32.const 1 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load16_u + call $~lib/typedarray/Uint16Array#__get i32.const 9 i32.eq i32.eqz @@ -7222,12 +7352,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 134 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 155 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int32Array#map (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 156 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7292,46 +7422,32 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 136 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 157 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Int32Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store offset=4 + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store offset=8 + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 29 call $~lib/typedarray/Int32Array#map local.set $1 local.get $1 - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Int32Array#__get i32.const 1 i32.eq i32.eqz @@ -7344,20 +7460,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Int32Array#__get i32.const 4 i32.eq i32.eqz @@ -7370,20 +7474,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 i32.const 2 - i32.const 2 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Int32Array#__get i32.const 9 i32.eq i32.eqz @@ -7396,12 +7488,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 158 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint32Array#map (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7466,46 +7558,55 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 139 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Uint32Array#__get (; 160 ;) (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 152 + i32.const 510 + i32.const 63 + 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/typedarray/testArrayMap (; 161 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint32Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store offset=4 + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store offset=8 + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 30 call $~lib/typedarray/Uint32Array#map local.set $1 local.get $1 - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Uint32Array#__get i32.const 1 i32.eq i32.eqz @@ -7518,20 +7619,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Uint32Array#__get i32.const 4 i32.eq i32.eqz @@ -7544,20 +7633,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 i32.const 2 - i32.const 2 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Uint32Array#__get i32.const 9 i32.eq i32.eqz @@ -7570,12 +7647,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 140 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 162 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7640,46 +7717,55 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 142 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Int64Array#__get (; 164 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 591 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $std/typedarray/testArrayMap (; 165 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Int64Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i64.const 1 - i64.store + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 2 - i64.store offset=8 + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 3 - i64.store offset=16 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 31 call $~lib/typedarray/Int64Array#map local.set $1 local.get $1 - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 3 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i64.load + call $~lib/typedarray/Int64Array#__get i64.const 1 i64.eq i32.eqz @@ -7692,20 +7778,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 i32.const 1 - i32.const 3 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i64.load + call $~lib/typedarray/Int64Array#__get i64.const 4 i64.eq i32.eqz @@ -7718,20 +7792,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 i32.const 2 - i32.const 3 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i64.load + call $~lib/typedarray/Int64Array#__get i64.const 9 i64.eq i32.eqz @@ -7744,12 +7806,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 143 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 166 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Uint64Array#map (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7814,46 +7876,55 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 145 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Uint64Array#__get (; 168 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 152 + i32.const 672 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $std/typedarray/testArrayMap (; 169 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint64Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i64.const 1 - i64.store + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 2 - i64.store offset=8 + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 3 - i64.store offset=16 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 32 call $~lib/typedarray/Uint64Array#map local.set $1 local.get $1 - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 3 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i64.load + call $~lib/typedarray/Uint64Array#__get i64.const 1 i64.eq i32.eqz @@ -7866,20 +7937,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 i32.const 1 - i32.const 3 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i64.load + call $~lib/typedarray/Uint64Array#__get i64.const 4 i64.eq i32.eqz @@ -7892,20 +7951,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 i32.const 2 - i32.const 3 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - i64.load + call $~lib/typedarray/Uint64Array#__get i64.const 9 i64.eq i32.eqz @@ -7918,12 +7965,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 146 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 170 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7988,46 +8035,55 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 148 ;) (type $FUNCSIG$v) + (func $~lib/typedarray/Float32Array#__get (; 172 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + 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 152 + i32.const 753 + i32.const 63 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + ) + (func $std/typedarray/testArrayMap (; 173 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Float32Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 f32.const 1 - f32.store + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f32.const 2 - f32.store offset=4 + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f32.const 3 - f32.store offset=8 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 33 call $~lib/typedarray/Float32Array#map local.set $1 local.get $1 - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - f32.load + call $~lib/typedarray/Float32Array#__get f32.const 1 f32.eq i32.eqz @@ -8040,20 +8096,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - f32.load + call $~lib/typedarray/Float32Array#__get f32.const 4 f32.eq i32.eqz @@ -8066,20 +8110,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 - i32.const 2 i32.const 2 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - f32.load + call $~lib/typedarray/Float32Array#__get f32.const 9 f32.eq i32.eqz @@ -8092,12 +8124,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 149 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 174 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8162,46 +8194,32 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 151 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 176 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Float64Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 f64.const 1 - f64.store + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f64.const 2 - f64.store offset=8 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f64.const 3 - f64.store offset=16 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 34 call $~lib/typedarray/Float64Array#map local.set $1 local.get $1 - local.tee $2 - i32.load offset=4 i32.const 0 - i32.const 3 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/typedarray/Float64Array#__get f64.const 1 f64.eq i32.eqz @@ -8214,20 +8232,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 i32.const 1 - i32.const 3 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/typedarray/Float64Array#__get f64.const 4 f64.eq i32.eqz @@ -8240,20 +8246,8 @@ unreachable end local.get $1 - local.tee $2 - i32.load offset=4 i32.const 2 - i32.const 3 - i32.shl - local.tee $3 - i32.add - i32.const -1 - local.get $3 - local.get $2 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/typedarray/Float64Array#__get f64.const 9 f64.eq i32.eqz @@ -8266,7 +8260,7 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 152 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 177 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -8275,7 +8269,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8335,7 +8329,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 154 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 179 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -8344,7 +8338,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 155 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 180 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8353,17 +8347,17 @@ call $~lib/typedarray/Int8Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store8 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store8 offset=1 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store8 offset=2 + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 35 call $~lib/typedarray/Int8Array#some @@ -8398,14 +8392,14 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 156 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 181 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#some (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8465,14 +8459,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 158 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 183 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 159 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 184 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8481,17 +8475,17 @@ call $~lib/typedarray/Uint8Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store8 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store8 offset=1 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store8 offset=2 + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 37 call $~lib/typedarray/Uint8Array#some @@ -8526,14 +8520,14 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 160 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 185 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#some (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#some (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8552,7 +8546,7 @@ i32.const 0 local.set $5 local.get $2 - call $~lib/typedarray/Uint8Array#get:length + call $~lib/typedarray/Uint8ClampedArray#get:length local.set $6 end loop $repeat|0 @@ -8593,78 +8587,38 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 162 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 187 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 163 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 188 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 2 - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 offset=1 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 offset=2 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 39 call $~lib/typedarray/Uint8ClampedArray#some - local.set $2 - local.get $2 + local.set $1 + local.get $1 i32.const 0 i32.ne i32.eqz @@ -8679,8 +8633,8 @@ local.get $0 i32.const 40 call $~lib/typedarray/Uint8ClampedArray#some - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.const 0 i32.ne i32.eqz @@ -8694,7 +8648,7 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 164 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 189 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8703,7 +8657,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8763,7 +8717,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 166 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 191 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8772,7 +8726,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 167 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 192 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8781,17 +8735,17 @@ call $~lib/typedarray/Int16Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store16 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store16 offset=2 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store16 offset=4 + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 41 call $~lib/typedarray/Int16Array#some @@ -8826,14 +8780,14 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 168 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#some (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 194 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8893,14 +8847,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 170 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 195 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 171 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 196 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8909,17 +8863,17 @@ call $~lib/typedarray/Uint16Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store16 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store16 offset=2 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store16 offset=4 + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 43 call $~lib/typedarray/Uint16Array#some @@ -8954,12 +8908,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 172 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 197 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9019,12 +8973,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 174 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 199 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 175 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 200 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9033,17 +8987,17 @@ call $~lib/typedarray/Int32Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store offset=4 + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store offset=8 + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 45 call $~lib/typedarray/Int32Array#some @@ -9078,12 +9032,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 176 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 201 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#some (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#some (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9143,12 +9097,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 178 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 203 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 179 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 204 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9157,17 +9111,17 @@ call $~lib/typedarray/Uint32Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store offset=4 + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store offset=8 + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 47 call $~lib/typedarray/Uint32Array#some @@ -9202,12 +9156,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 180 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 205 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9267,12 +9221,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 182 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 207 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome (; 183 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 208 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9281,17 +9235,17 @@ call $~lib/typedarray/Int64Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i64.const 2 - i64.store + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 4 - i64.store offset=8 + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 6 - i64.store offset=16 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 49 call $~lib/typedarray/Int64Array#some @@ -9326,12 +9280,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 184 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 209 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#some (; 185 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#some (; 210 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9391,12 +9345,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 186 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 211 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome (; 187 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 212 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9405,17 +9359,17 @@ call $~lib/typedarray/Uint64Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i64.const 2 - i64.store + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 4 - i64.store offset=8 + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 6 - i64.store offset=16 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 51 call $~lib/typedarray/Uint64Array#some @@ -9450,12 +9404,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 188 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 213 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 189 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9515,12 +9469,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 190 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 215 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome (; 191 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 216 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9529,17 +9483,17 @@ call $~lib/typedarray/Float32Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 f32.const 2 - f32.store + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f32.const 4 - f32.store offset=4 + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f32.const 6 - f32.store offset=8 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 53 call $~lib/typedarray/Float32Array#some @@ -9574,12 +9528,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 192 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 217 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 193 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 218 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9639,12 +9593,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 194 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 219 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome (; 195 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 220 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9653,17 +9607,17 @@ call $~lib/typedarray/Float64Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 f64.const 2 - f64.store + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f64.const 4 - f64.store offset=8 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f64.const 6 - f64.store offset=16 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 55 call $~lib/typedarray/Float64Array#some @@ -9698,7 +9652,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 196 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 221 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9707,7 +9661,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#findIndex (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9767,7 +9721,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 198 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 223 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9776,7 +9730,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 199 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 224 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9785,17 +9739,17 @@ call $~lib/typedarray/Int8Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 57 call $~lib/typedarray/Int8Array#findIndex @@ -9805,7 +9759,7 @@ i32.eq i32.eqz if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -9821,7 +9775,7 @@ i32.eq i32.eqz if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -9829,14 +9783,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 200 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#findIndex (; 201 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9896,14 +9850,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 202 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 227 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 203 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 228 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9912,17 +9866,17 @@ call $~lib/typedarray/Uint8Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 59 call $~lib/typedarray/Uint8Array#findIndex @@ -9932,7 +9886,7 @@ i32.eq i32.eqz if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -9948,7 +9902,7 @@ i32.eq i32.eqz if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -9956,14 +9910,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 204 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 229 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 205 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 230 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9982,7 +9936,7 @@ i32.const 0 local.set $5 local.get $2 - call $~lib/typedarray/Uint8Array#get:length + call $~lib/typedarray/Uint8ClampedArray#get:length local.set $6 end loop $repeat|0 @@ -10023,83 +9977,43 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 206 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 231 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 207 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 232 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 offset=1 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 offset=2 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 61 call $~lib/typedarray/Uint8ClampedArray#findIndex - local.set $2 - local.get $2 + local.set $1 + local.get $1 i32.const 1 i32.eq i32.eqz if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -10109,13 +10023,13 @@ local.get $0 i32.const 62 call $~lib/typedarray/Uint8ClampedArray#findIndex - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.const -1 i32.eq i32.eqz if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -10123,7 +10037,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 208 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 233 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10132,7 +10046,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#findIndex (; 209 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 234 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10192,7 +10106,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 210 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 235 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10201,7 +10115,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 211 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 236 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10210,17 +10124,17 @@ call $~lib/typedarray/Int16Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store16 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store16 offset=2 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store16 offset=4 + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 63 call $~lib/typedarray/Int16Array#findIndex @@ -10230,7 +10144,7 @@ i32.eq i32.eqz if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -10246,7 +10160,7 @@ i32.eq i32.eqz if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -10254,14 +10168,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 212 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 237 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#findIndex (; 213 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10321,14 +10235,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 214 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 239 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 215 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 240 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10337,17 +10251,17 @@ call $~lib/typedarray/Uint16Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store16 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store16 offset=2 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store16 offset=4 + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 65 call $~lib/typedarray/Uint16Array#findIndex @@ -10357,7 +10271,7 @@ i32.eq i32.eqz if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -10373,7 +10287,7 @@ i32.eq i32.eqz if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -10381,12 +10295,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 216 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 241 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#findIndex (; 217 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 242 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10446,12 +10360,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 218 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 243 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 219 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 244 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10460,17 +10374,17 @@ call $~lib/typedarray/Int32Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store offset=4 + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store offset=8 + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 67 call $~lib/typedarray/Int32Array#findIndex @@ -10480,7 +10394,7 @@ i32.eq i32.eqz if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -10496,7 +10410,7 @@ i32.eq i32.eqz if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -10504,12 +10418,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 220 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 245 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#findIndex (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#findIndex (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10569,12 +10483,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 222 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 247 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 223 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 248 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10583,17 +10497,17 @@ call $~lib/typedarray/Uint32Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store offset=4 + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store offset=8 + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 69 call $~lib/typedarray/Uint32Array#findIndex @@ -10603,7 +10517,7 @@ i32.eq i32.eqz if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -10619,7 +10533,7 @@ i32.eq i32.eqz if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -10627,12 +10541,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 224 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 249 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#findIndex (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10692,12 +10606,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 226 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 251 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex (; 227 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 252 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10706,17 +10620,17 @@ call $~lib/typedarray/Int64Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i64.const 1 - i64.store + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 2 - i64.store offset=8 + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 3 - i64.store offset=16 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 71 call $~lib/typedarray/Int64Array#findIndex @@ -10726,7 +10640,7 @@ i32.eq i32.eqz if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -10742,7 +10656,7 @@ i32.eq i32.eqz if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -10750,12 +10664,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 228 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 253 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#findIndex (; 229 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#findIndex (; 254 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10815,12 +10729,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 230 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 255 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex (; 231 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 256 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10829,17 +10743,17 @@ call $~lib/typedarray/Uint64Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i64.const 1 - i64.store + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 2 - i64.store offset=8 + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 3 - i64.store offset=16 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 73 call $~lib/typedarray/Uint64Array#findIndex @@ -10849,7 +10763,7 @@ i32.eq i32.eqz if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -10865,7 +10779,7 @@ i32.eq i32.eqz if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -10873,12 +10787,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 232 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 257 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#findIndex (; 233 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10938,12 +10852,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 234 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 259 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex (; 235 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 260 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10952,17 +10866,17 @@ call $~lib/typedarray/Float32Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 f32.const 1 - f32.store + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f32.const 2 - f32.store offset=4 + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f32.const 3 - f32.store offset=8 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 75 call $~lib/typedarray/Float32Array#findIndex @@ -10972,7 +10886,7 @@ i32.eq i32.eqz if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -10988,7 +10902,7 @@ i32.eq i32.eqz if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -10996,12 +10910,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 236 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 261 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#findIndex (; 237 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11061,12 +10975,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 238 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 263 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex (; 239 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 264 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11075,17 +10989,17 @@ call $~lib/typedarray/Float64Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 f64.const 1 - f64.store + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f64.const 2 - f64.store offset=8 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f64.const 3 - f64.store offset=16 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 77 call $~lib/typedarray/Float64Array#findIndex @@ -11095,7 +11009,7 @@ i32.eq i32.eqz if - i32.const 480 + i32.const 568 i32.const 16 i32.const 365 i32.const 2 @@ -11111,7 +11025,7 @@ i32.eq i32.eqz if - i32.const 520 + i32.const 608 i32.const 16 i32.const 368 i32.const 2 @@ -11119,7 +11033,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 240 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 265 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11130,7 +11044,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int8Array#every (; 241 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 266 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11197,7 +11111,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 242 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 267 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11206,7 +11120,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 243 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 268 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11215,17 +11129,17 @@ call $~lib/typedarray/Int8Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store8 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store8 offset=1 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store8 offset=2 + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 79 call $~lib/typedarray/Int8Array#every @@ -11260,7 +11174,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 244 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 269 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -11269,7 +11183,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8Array#every (; 245 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 270 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11336,14 +11250,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 246 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 271 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 247 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 272 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11352,17 +11266,17 @@ call $~lib/typedarray/Uint8Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store8 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store8 offset=1 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store8 offset=2 + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 81 call $~lib/typedarray/Uint8Array#every @@ -11397,7 +11311,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 248 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 273 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -11406,7 +11320,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#every (; 249 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#every (; 274 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11425,7 +11339,7 @@ i32.const 0 local.set $5 local.get $2 - call $~lib/typedarray/Uint8Array#get:length + call $~lib/typedarray/Uint8ClampedArray#get:length local.set $6 end loop $repeat|0 @@ -11473,78 +11387,38 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 250 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 275 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 251 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 276 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) i32.const 0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 2 - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 offset=1 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 offset=2 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 83 call $~lib/typedarray/Uint8ClampedArray#every - local.set $2 - local.get $2 + local.set $1 + local.get $1 i32.const 0 i32.ne i32.eqz @@ -11559,8 +11433,8 @@ local.get $0 i32.const 84 call $~lib/typedarray/Uint8ClampedArray#every - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.const 0 i32.ne i32.eqz @@ -11574,7 +11448,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 252 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 277 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11585,7 +11459,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int16Array#every (; 253 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 278 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11652,7 +11526,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 254 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 279 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11661,7 +11535,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 255 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 280 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11670,17 +11544,17 @@ call $~lib/typedarray/Int16Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store16 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store16 offset=2 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store16 offset=4 + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 85 call $~lib/typedarray/Int16Array#every @@ -11715,7 +11589,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 256 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 281 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and @@ -11724,7 +11598,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint16Array#every (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11791,14 +11665,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 258 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 283 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 259 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 284 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11807,17 +11681,17 @@ call $~lib/typedarray/Uint16Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store16 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store16 offset=2 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store16 offset=4 + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 87 call $~lib/typedarray/Uint16Array#every @@ -11852,14 +11726,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 260 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 285 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.const 0 i32.eq ) - (func $~lib/typedarray/Int32Array#every (; 261 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 286 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11926,12 +11800,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 262 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 287 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 263 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 288 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11940,17 +11814,17 @@ call $~lib/typedarray/Int32Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store offset=4 + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store offset=8 + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 89 call $~lib/typedarray/Int32Array#every @@ -11985,14 +11859,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 264 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 289 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_u i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint32Array#every (; 265 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#every (; 290 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12059,12 +11933,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 266 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 291 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 267 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 292 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12073,17 +11947,17 @@ call $~lib/typedarray/Uint32Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i32.const 2 - i32.store + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i32.const 4 - i32.store offset=4 + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i32.const 6 - i32.store offset=8 + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 91 call $~lib/typedarray/Uint32Array#every @@ -12118,14 +11992,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 268 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 293 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (; 269 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 294 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12192,12 +12066,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 270 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 295 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery (; 271 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 296 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12206,17 +12080,17 @@ call $~lib/typedarray/Int64Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i64.const 2 - i64.store + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 4 - i64.store offset=8 + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 6 - i64.store offset=16 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 93 call $~lib/typedarray/Int64Array#every @@ -12251,14 +12125,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 272 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 297 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $~lib/typedarray/Uint64Array#every (; 273 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#every (; 298 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12325,12 +12199,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 274 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 299 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery (; 275 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 300 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12339,17 +12213,17 @@ call $~lib/typedarray/Uint64Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 i64.const 2 - i64.store + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 i64.const 4 - i64.store offset=8 + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 i64.const 6 - i64.store offset=16 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 95 call $~lib/typedarray/Uint64Array#every @@ -12384,7 +12258,7 @@ unreachable end ) - (func $~lib/math/NativeMathf.mod (; 276 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 301 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12640,14 +12514,14 @@ local.get $2 f32.reinterpret_i32 ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 277 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 302 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 278 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 303 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12714,12 +12588,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 279 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 304 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $std/typedarray/testArrayEvery (; 280 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 305 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12728,17 +12602,17 @@ call $~lib/typedarray/Float32Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 f32.const 2 - f32.store + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f32.const 4 - f32.store offset=4 + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f32.const 6 - f32.store offset=8 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 97 call $~lib/typedarray/Float32Array#every @@ -12773,7 +12647,7 @@ unreachable end ) - (func $~lib/math/NativeMath.mod (; 281 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 306 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -13031,14 +12905,14 @@ local.get $2 f64.reinterpret_i64 ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 282 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 307 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 283 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 308 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13105,12 +12979,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 284 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 309 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $std/typedarray/testArrayEvery (; 285 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 310 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13119,17 +12993,17 @@ call $~lib/typedarray/Float64Array#constructor local.set $0 local.get $0 - i32.load offset=4 + i32.const 0 f64.const 2 - f64.store + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 f64.const 4 - f64.store offset=8 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 2 f64.const 6 - f64.store offset=16 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 99 call $~lib/typedarray/Float64Array#every @@ -13164,32 +13038,18 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 286 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 311 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/forEachValues - local.tee $3 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - local.tee $4 - i32.add - i32.const -1 - local.get $4 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load - local.set $5 + call $~lib/array/Array#__get + local.set $3 local.get $0 i32.const 24 i32.shl i32.const 24 i32.shr_s - local.get $5 + local.get $3 i32.const 24 i32.shl i32.const 24 @@ -13197,7 +13057,7 @@ i32.eq i32.eqz if - i32.const 616 + i32.const 704 i32.const 16 i32.const 425 i32.const 4 @@ -13209,7 +13069,7 @@ i32.eq i32.eqz if - i32.const 672 + i32.const 760 i32.const 16 i32.const 426 i32.const 4 @@ -13221,7 +13081,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 816 i32.const 16 i32.const 427 i32.const 4 @@ -13233,7 +13093,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 287 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#forEach (; 312 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13278,10 +13138,8 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 288 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 313 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -13291,71 +13149,35 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.load offset=4 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 24 i32.shl i32.const 24 i32.shr_s - i32.store8 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 24 i32.shl i32.const 24 i32.shr_s - i32.store8 offset=1 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 - global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 2 + global.get $std/typedarray/forEachValues i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 24 i32.shl i32.const 24 i32.shr_s - i32.store8 offset=2 + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 101 call $~lib/typedarray/Int8Array#forEach @@ -13364,7 +13186,7 @@ i32.eq i32.eqz if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -13372,36 +13194,22 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 289 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 314 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/forEachValues - local.tee $3 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - local.tee $4 - i32.add - i32.const -1 - local.get $4 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load - local.set $5 + call $~lib/array/Array#__get + local.set $3 local.get $0 i32.const 255 i32.and - local.get $5 + local.get $3 i32.const 255 i32.and i32.eq i32.eqz if - i32.const 616 + i32.const 704 i32.const 16 i32.const 425 i32.const 4 @@ -13413,7 +13221,7 @@ i32.eq i32.eqz if - i32.const 672 + i32.const 760 i32.const 16 i32.const 426 i32.const 4 @@ -13425,7 +13233,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 816 i32.const 16 i32.const 427 i32.const 4 @@ -13437,7 +13245,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8Array#forEach (; 290 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 315 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13482,10 +13290,8 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 291 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 316 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -13495,65 +13301,29 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.load offset=4 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 255 i32.and - i32.store8 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + i32.const 1 global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 255 i32.and - i32.store8 offset=1 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 - global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 2 + global.get $std/typedarray/forEachValues i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 255 i32.and - i32.store8 offset=2 + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 102 call $~lib/typedarray/Uint8Array#forEach @@ -13562,7 +13332,7 @@ i32.eq i32.eqz if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -13570,36 +13340,22 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 292 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 317 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/forEachValues - local.tee $3 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - local.tee $4 - i32.add - i32.const -1 - local.get $4 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load - local.set $5 + call $~lib/array/Array#__get + local.set $3 local.get $0 i32.const 255 i32.and - local.get $5 + local.get $3 i32.const 255 i32.and i32.eq i32.eqz if - i32.const 616 + i32.const 704 i32.const 16 i32.const 425 i32.const 4 @@ -13611,7 +13367,7 @@ i32.eq i32.eqz if - i32.const 672 + i32.const 760 i32.const 16 i32.const 426 i32.const 4 @@ -13623,7 +13379,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 816 i32.const 16 i32.const 427 i32.const 4 @@ -13635,7 +13391,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8ClampedArray#forEach (; 293 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#forEach (; 318 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13647,7 +13403,7 @@ i32.const 0 local.set $3 local.get $0 - call $~lib/typedarray/Uint8Array#get:length + call $~lib/typedarray/Uint8ClampedArray#get:length local.set $4 end loop $repeat|0 @@ -13680,10 +13436,8 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 294 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 319 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -13693,104 +13447,29 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.load offset=4 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.const 255 - i32.and - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor + call $~lib/array/Array#__get i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or i32.and - i32.store8 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + i32.const 1 global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 255 i32.and - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 offset=1 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 - global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 2 + global.get $std/typedarray/forEachValues i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 255 i32.and - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - local.get $1 - i32.or - i32.and - i32.store8 offset=2 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 103 call $~lib/typedarray/Uint8ClampedArray#forEach @@ -13799,7 +13478,7 @@ i32.eq i32.eqz if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -13807,32 +13486,18 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 295 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 320 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/forEachValues - local.tee $3 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - local.tee $4 - i32.add - i32.const -1 - local.get $4 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load - local.set $5 + call $~lib/array/Array#__get + local.set $3 local.get $0 i32.const 16 i32.shl i32.const 16 i32.shr_s - local.get $5 + local.get $3 i32.const 16 i32.shl i32.const 16 @@ -13840,7 +13505,7 @@ i32.eq i32.eqz if - i32.const 616 + i32.const 704 i32.const 16 i32.const 425 i32.const 4 @@ -13852,7 +13517,7 @@ i32.eq i32.eqz if - i32.const 672 + i32.const 760 i32.const 16 i32.const 426 i32.const 4 @@ -13864,7 +13529,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 816 i32.const 16 i32.const 427 i32.const 4 @@ -13876,7 +13541,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 296 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#forEach (; 321 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13921,10 +13586,8 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 297 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 322 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -13934,71 +13597,35 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.load offset=4 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 16 i32.shl i32.const 16 i32.shr_s - i32.store16 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 16 i32.shl i32.const 16 i32.shr_s - i32.store16 offset=2 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 - global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 2 + global.get $std/typedarray/forEachValues i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 16 i32.shl i32.const 16 i32.shr_s - i32.store16 offset=4 + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 104 call $~lib/typedarray/Int16Array#forEach @@ -14007,7 +13634,7 @@ i32.eq i32.eqz if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -14015,36 +13642,22 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 298 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 323 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/forEachValues - local.tee $3 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - local.tee $4 - i32.add - i32.const -1 - local.get $4 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load - local.set $5 + call $~lib/array/Array#__get + local.set $3 local.get $0 i32.const 65535 i32.and - local.get $5 + local.get $3 i32.const 65535 i32.and i32.eq i32.eqz if - i32.const 616 + i32.const 704 i32.const 16 i32.const 425 i32.const 4 @@ -14056,7 +13669,7 @@ i32.eq i32.eqz if - i32.const 672 + i32.const 760 i32.const 16 i32.const 426 i32.const 4 @@ -14068,7 +13681,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 816 i32.const 16 i32.const 427 i32.const 4 @@ -14080,7 +13693,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint16Array#forEach (; 299 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 324 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14125,10 +13738,8 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 300 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 325 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -14138,65 +13749,29 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.load offset=4 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 65535 i32.and - i32.store16 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 + i32.const 1 global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 65535 i32.and - i32.store16 offset=2 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 - global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 2 + global.get $std/typedarray/forEachValues i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 65535 i32.and - i32.store16 offset=4 + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 105 call $~lib/typedarray/Uint16Array#forEach @@ -14205,7 +13780,7 @@ i32.eq i32.eqz if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -14213,32 +13788,18 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 301 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 326 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/forEachValues - local.tee $3 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - local.tee $4 - i32.add - i32.const -1 - local.get $4 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load - local.set $5 + call $~lib/array/Array#__get + local.set $3 local.get $0 - local.get $5 + local.get $3 i32.eq i32.eqz if - i32.const 616 + i32.const 704 i32.const 16 i32.const 425 i32.const 4 @@ -14250,7 +13811,7 @@ i32.eq i32.eqz if - i32.const 672 + i32.const 760 i32.const 16 i32.const 426 i32.const 4 @@ -14262,7 +13823,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 816 i32.const 16 i32.const 427 i32.const 4 @@ -14274,7 +13835,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 302 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 327 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14319,10 +13880,8 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 303 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 328 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -14332,59 +13891,23 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.load offset=4 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 global.get $std/typedarray/forEachValues - 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.store offset=4 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 - global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 2 + global.get $std/typedarray/forEachValues 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.store offset=8 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 106 call $~lib/typedarray/Int32Array#forEach @@ -14393,7 +13916,7 @@ i32.eq i32.eqz if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -14401,32 +13924,18 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 304 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 329 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/forEachValues - local.tee $3 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - local.tee $4 - i32.add - i32.const -1 - local.get $4 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load - local.set $5 + call $~lib/array/Array#__get + local.set $3 local.get $0 - local.get $5 + local.get $3 i32.eq i32.eqz if - i32.const 616 + i32.const 704 i32.const 16 i32.const 425 i32.const 4 @@ -14438,7 +13947,7 @@ i32.eq i32.eqz if - i32.const 672 + i32.const 760 i32.const 16 i32.const 426 i32.const 4 @@ -14450,7 +13959,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 816 i32.const 16 i32.const 427 i32.const 4 @@ -14462,7 +13971,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint32Array#forEach (; 305 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint32Array#forEach (; 330 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14507,10 +14016,8 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 306 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 331 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -14520,59 +14027,23 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.load offset=4 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 global.get $std/typedarray/forEachValues - 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.store offset=4 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 - global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 2 + global.get $std/typedarray/forEachValues 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.store offset=8 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 107 call $~lib/typedarray/Uint32Array#forEach @@ -14581,7 +14052,7 @@ i32.eq i32.eqz if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -14589,33 +14060,19 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 307 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 332 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/forEachValues - local.tee $3 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - local.tee $4 - i32.add - i32.const -1 - local.get $4 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load - local.set $5 + call $~lib/array/Array#__get + local.set $3 local.get $0 - local.get $5 + local.get $3 i64.extend_i32_s i64.eq i32.eqz if - i32.const 616 + i32.const 704 i32.const 16 i32.const 425 i32.const 4 @@ -14627,7 +14084,7 @@ i32.eq i32.eqz if - i32.const 672 + i32.const 760 i32.const 16 i32.const 426 i32.const 4 @@ -14639,7 +14096,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 816 i32.const 16 i32.const 427 i32.const 4 @@ -14651,7 +14108,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 308 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 333 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14696,10 +14153,8 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 309 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 334 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -14709,59 +14164,26 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.load offset=4 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i64.load32_s - i64.store + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 global.get $std/typedarray/forEachValues - 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 - i64.load32_s - i64.store offset=8 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 - global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 2 + global.get $std/typedarray/forEachValues 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 - i64.load32_s - i64.store offset=16 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 108 call $~lib/typedarray/Int64Array#forEach @@ -14770,7 +14192,7 @@ i32.eq i32.eqz if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -14778,33 +14200,19 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 310 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 335 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/forEachValues - local.tee $3 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - local.tee $4 - i32.add - i32.const -1 - local.get $4 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load - local.set $5 + call $~lib/array/Array#__get + local.set $3 local.get $0 - local.get $5 + local.get $3 i64.extend_i32_s i64.eq i32.eqz if - i32.const 616 + i32.const 704 i32.const 16 i32.const 425 i32.const 4 @@ -14816,7 +14224,7 @@ i32.eq i32.eqz if - i32.const 672 + i32.const 760 i32.const 16 i32.const 426 i32.const 4 @@ -14828,7 +14236,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 816 i32.const 16 i32.const 427 i32.const 4 @@ -14840,7 +14248,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint64Array#forEach (; 311 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint64Array#forEach (; 336 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14885,10 +14293,8 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 312 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 337 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -14898,59 +14304,26 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.load offset=4 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i64.load32_s - i64.store + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 global.get $std/typedarray/forEachValues - 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 - i64.load32_s - i64.store offset=8 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 - global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 2 + global.get $std/typedarray/forEachValues 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 - i64.load32_s - i64.store offset=16 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 109 call $~lib/typedarray/Uint64Array#forEach @@ -14959,7 +14332,7 @@ i32.eq i32.eqz if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -14967,33 +14340,19 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 313 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 338 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/forEachValues - local.tee $3 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - local.tee $4 - i32.add - i32.const -1 - local.get $4 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load - local.set $5 + call $~lib/array/Array#__get + local.set $3 local.get $0 - local.get $5 + local.get $3 f32.convert_i32_s f32.eq i32.eqz if - i32.const 616 + i32.const 704 i32.const 16 i32.const 425 i32.const 4 @@ -15005,7 +14364,7 @@ i32.eq i32.eqz if - i32.const 672 + i32.const 760 i32.const 16 i32.const 426 i32.const 4 @@ -15017,7 +14376,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 816 i32.const 16 i32.const 427 i32.const 4 @@ -15029,7 +14388,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 314 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#forEach (; 339 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -15074,10 +14433,8 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 315 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 340 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -15087,62 +14444,26 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.load offset=4 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get f32.convert_i32_s - f32.store + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 + i32.const 1 global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get f32.convert_i32_s - f32.store offset=4 - local.get $0 - i32.load offset=4 - global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 - i32.const 2 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 2 + global.get $std/typedarray/forEachValues + i32.const 2 + call $~lib/array/Array#__get f32.convert_i32_s - f32.store offset=8 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 110 call $~lib/typedarray/Float32Array#forEach @@ -15151,7 +14472,7 @@ i32.eq i32.eqz if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -15159,33 +14480,19 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 316 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 341 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/forEachValues - local.tee $3 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - local.tee $4 - i32.add - i32.const -1 - local.get $4 - local.get $3 - i32.load offset=8 - i32.lt_u - select - i32.load - local.set $5 + call $~lib/array/Array#__get + local.set $3 local.get $0 - local.get $5 + local.get $3 f64.convert_i32_s f64.eq i32.eqz if - i32.const 616 + i32.const 704 i32.const 16 i32.const 425 i32.const 4 @@ -15197,7 +14504,7 @@ i32.eq i32.eqz if - i32.const 672 + i32.const 760 i32.const 16 i32.const 426 i32.const 4 @@ -15209,7 +14516,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 816 i32.const 16 i32.const 427 i32.const 4 @@ -15221,7 +14528,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 317 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#forEach (; 342 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -15266,10 +14573,8 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 318 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 343 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 0 @@ -15279,62 +14584,26 @@ local.get $0 global.set $std/typedarray/forEachSelf local.get $0 - i32.load offset=4 + i32.const 0 global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get f64.convert_i32_s - f64.store + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 + i32.const 1 global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get f64.convert_i32_s - f64.store offset=8 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 - global.get $std/typedarray/forEachValues - local.tee $1 - i32.load offset=4 i32.const 2 + global.get $std/typedarray/forEachValues i32.const 2 - i32.shl - local.tee $2 - i32.add - i32.const -1 - local.get $2 - local.get $1 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get f64.convert_i32_s - f64.store offset=16 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 111 call $~lib/typedarray/Float64Array#forEach @@ -15343,7 +14612,7 @@ i32.eq i32.eqz if - i32.const 800 + i32.const 888 i32.const 16 i32.const 430 i32.const 2 @@ -15351,7 +14620,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#reverse (; 319 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 344 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15421,14 +14690,12 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse (; 320 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 345 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -15452,53 +14719,25 @@ br_if $break|0 block local.get $1 - i32.load offset=4 local.get $3 - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 24 i32.shl i32.const 24 i32.shr_s - i32.store8 + call $~lib/typedarray/Int8Array#__set local.get $2 - i32.load offset=4 local.get $3 - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 24 i32.shl i32.const 24 i32.shr_s - i32.store8 + call $~lib/typedarray/Int8Array#__set end local.get $3 i32.const 1 @@ -15522,35 +14761,13 @@ i32.eqz br_if $break|1 local.get $1 - local.tee $4 - i32.load offset=4 local.get $3 - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/typedarray/Int8Array#__get local.get $0 - local.tee $4 - i32.load offset=4 i32.const 8 local.get $3 i32.sub - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 24 i32.shl i32.const 24 @@ -15558,7 +14775,7 @@ i32.eq i32.eqz if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 @@ -15579,97 +14796,57 @@ i32.const 8 call $~lib/typedarray/Int8Array#subarray call $~lib/typedarray/Int8Array#reverse - local.set $6 - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 0 - local.tee $5 - i32.add - i32.const -1 - local.get $5 + local.set $4 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + i32.const 0 + call $~lib/typedarray/Int8Array#__get i32.const 8 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 1 - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + i32.const 1 + call $~lib/typedarray/Int8Array#__get i32.const 7 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 2 - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + i32.const 2 + call $~lib/typedarray/Int8Array#__get i32.const 6 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 3 - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + i32.const 3 + call $~lib/typedarray/Int8Array#__get i32.const 5 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -15677,7 +14854,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 321 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 346 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15747,7 +14924,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8Array#subarray (; 322 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 347 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15861,14 +15038,12 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 323 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 348 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -15892,49 +15067,21 @@ br_if $break|0 block local.get $1 - i32.load offset=4 local.get $3 - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 255 i32.and - i32.store8 + call $~lib/typedarray/Uint8Array#__set local.get $2 - i32.load offset=4 local.get $3 - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 255 i32.and - i32.store8 + call $~lib/typedarray/Uint8Array#__set end local.get $3 i32.const 1 @@ -15958,41 +15105,19 @@ i32.eqz br_if $break|1 local.get $1 - local.tee $4 - i32.load offset=4 local.get $3 - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8Array#__get local.get $0 - local.tee $4 - i32.load offset=4 i32.const 8 local.get $3 i32.sub - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 255 i32.and i32.eq i32.eqz if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 @@ -16013,97 +15138,57 @@ i32.const 8 call $~lib/typedarray/Uint8Array#subarray call $~lib/typedarray/Uint8Array#reverse - local.set $6 - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 0 - local.tee $5 - i32.add - i32.const -1 - local.get $5 + local.set $4 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + i32.const 0 + call $~lib/typedarray/Uint8Array#__get i32.const 8 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 1 - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + i32.const 1 + call $~lib/typedarray/Uint8Array#__get i32.const 7 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 2 - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + i32.const 2 + call $~lib/typedarray/Uint8Array#__get i32.const 6 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 3 - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + i32.const 3 + call $~lib/typedarray/Uint8Array#__get i32.const 5 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -16111,7 +15196,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#reverse (; 324 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reverse (; 349 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16129,7 +15214,7 @@ i32.const 0 local.set $3 local.get $1 - call $~lib/typedarray/Uint8Array#get:length + call $~lib/typedarray/Uint8ClampedArray#get:length i32.const 1 i32.sub local.set $4 @@ -16181,7 +15266,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 325 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 350 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16196,7 +15281,7 @@ local.get $2 local.set $5 local.get $3 - call $~lib/typedarray/Uint8Array#get:length + call $~lib/typedarray/Uint8ClampedArray#get:length local.set $6 local.get $4 i32.const 0 @@ -16295,14 +15380,12 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 326 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 351 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -16326,75 +15409,21 @@ br_if $break|0 block local.get $1 - i32.load offset=4 local.get $3 - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.const 255 - i32.and - local.tee $4 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor + call $~lib/array/Array#__get i32.const 255 - local.get $4 - i32.sub - i32.const 31 - i32.shr_s - local.get $4 - i32.or i32.and - i32.store8 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $2 - i32.load offset=4 local.get $3 - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.const 255 - i32.and - local.tee $4 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor + call $~lib/array/Array#__get i32.const 255 - local.get $4 - i32.sub - i32.const 31 - i32.shr_s - local.get $4 - i32.or i32.and - i32.store8 + call $~lib/typedarray/Uint8ClampedArray#__set end local.get $3 i32.const 1 @@ -16413,46 +15442,24 @@ local.set $3 loop $repeat|1 local.get $3 - i32.const 9 - i32.lt_s - i32.eqz - br_if $break|1 - local.get $1 - local.tee $4 - i32.load offset=4 - local.get $3 - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + i32.const 9 + i32.lt_s + i32.eqz + br_if $break|1 + local.get $1 + local.get $3 + call $~lib/typedarray/Uint8ClampedArray#__get local.get $0 - local.tee $4 - i32.load offset=4 i32.const 8 local.get $3 i32.sub - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 255 i32.and i32.eq i32.eqz if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 @@ -16473,97 +15480,57 @@ i32.const 8 call $~lib/typedarray/Uint8ClampedArray#subarray call $~lib/typedarray/Uint8ClampedArray#reverse - local.set $6 - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 0 - local.tee $5 - i32.add - i32.const -1 - local.get $5 + local.set $4 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + i32.const 0 + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 8 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 1 - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 7 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 2 - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 6 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 3 - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 5 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -16571,7 +15538,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 327 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 352 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16641,7 +15608,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int16Array#subarray (; 328 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 353 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16755,14 +15722,12 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 329 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 354 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -16786,57 +15751,25 @@ br_if $break|0 block local.get $1 - i32.load offset=4 local.get $3 - i32.const 1 - i32.shl - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 16 i32.shl i32.const 16 i32.shr_s - i32.store16 + call $~lib/typedarray/Int16Array#__set local.get $2 - i32.load offset=4 local.get $3 - i32.const 1 - i32.shl - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 16 i32.shl i32.const 16 i32.shr_s - i32.store16 + call $~lib/typedarray/Int16Array#__set end local.get $3 i32.const 1 @@ -16860,37 +15793,13 @@ i32.eqz br_if $break|1 local.get $1 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 1 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load16_s + call $~lib/typedarray/Int16Array#__get local.get $0 - local.tee $4 - i32.load offset=4 i32.const 8 local.get $3 i32.sub - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 16 i32.shl i32.const 16 @@ -16898,7 +15807,7 @@ i32.eq i32.eqz if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 @@ -16919,105 +15828,57 @@ i32.const 8 call $~lib/typedarray/Int16Array#subarray call $~lib/typedarray/Int16Array#reverse - local.set $6 - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 0 - i32.const 1 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 + local.set $4 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load16_s + i32.const 0 + call $~lib/typedarray/Int16Array#__get i32.const 8 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 1 - i32.const 1 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load16_s + i32.const 1 + call $~lib/typedarray/Int16Array#__get i32.const 7 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 2 - i32.const 1 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load16_s + i32.const 2 + call $~lib/typedarray/Int16Array#__get i32.const 6 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 3 - i32.const 1 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load16_s + i32.const 3 + call $~lib/typedarray/Int16Array#__get i32.const 5 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -17025,7 +15886,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 330 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 355 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17095,7 +15956,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint16Array#subarray (; 331 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 356 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17209,14 +16070,12 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 332 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 357 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -17240,53 +16099,21 @@ br_if $break|0 block local.get $1 - i32.load offset=4 local.get $3 - i32.const 1 - i32.shl - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 65535 i32.and - i32.store16 + call $~lib/typedarray/Uint16Array#__set local.get $2 - i32.load offset=4 local.get $3 - i32.const 1 - i32.shl - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 65535 i32.and - i32.store16 + call $~lib/typedarray/Uint16Array#__set end local.get $3 i32.const 1 @@ -17310,43 +16137,19 @@ i32.eqz br_if $break|1 local.get $1 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 1 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load16_u + call $~lib/typedarray/Uint16Array#__get local.get $0 - local.tee $4 - i32.load offset=4 i32.const 8 local.get $3 i32.sub - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.const 65535 i32.and i32.eq i32.eqz if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 @@ -17367,105 +16170,57 @@ i32.const 8 call $~lib/typedarray/Uint16Array#subarray call $~lib/typedarray/Uint16Array#reverse - local.set $6 - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 0 - i32.const 1 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 + local.set $4 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load16_u + i32.const 0 + call $~lib/typedarray/Uint16Array#__get i32.const 8 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 1 - i32.const 1 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load16_u + i32.const 1 + call $~lib/typedarray/Uint16Array#__get i32.const 7 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 2 - i32.const 1 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load16_u + i32.const 2 + call $~lib/typedarray/Uint16Array#__get i32.const 6 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 3 - i32.const 1 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load16_u + i32.const 3 + call $~lib/typedarray/Uint16Array#__get i32.const 5 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -17473,7 +16228,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 333 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 358 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17543,14 +16298,12 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse (; 334 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 359 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -17574,49 +16327,17 @@ br_if $break|0 block local.get $1 - i32.load offset=4 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $0 - local.tee $4 - i32.load offset=4 - local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store - local.get $2 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $2 + local.get $3 + local.get $0 + local.get $3 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set end local.get $3 i32.const 1 @@ -17640,41 +16361,17 @@ i32.eqz br_if $break|1 local.get $1 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Int32Array#__get local.get $0 - local.tee $4 - i32.load offset=4 i32.const 8 local.get $3 i32.sub - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.eq i32.eqz if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 @@ -17695,105 +16392,57 @@ i32.const 8 call $~lib/typedarray/Int32Array#subarray call $~lib/typedarray/Int32Array#reverse - local.set $6 - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 0 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 + local.set $4 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 0 + call $~lib/typedarray/Int32Array#__get i32.const 8 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 1 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 1 + call $~lib/typedarray/Int32Array#__get i32.const 7 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 2 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/typedarray/Int32Array#__get i32.const 6 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 3 + call $~lib/typedarray/Int32Array#__get i32.const 5 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -17801,7 +16450,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#reverse (; 335 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reverse (; 360 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17871,7 +16520,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint32Array#subarray (; 336 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 361 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17985,14 +16634,12 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 337 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 362 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -18016,49 +16663,17 @@ br_if $break|0 block local.get $1 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set local.get $2 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load - i32.store + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set end local.get $3 i32.const 1 @@ -18082,41 +16697,17 @@ i32.eqz br_if $break|1 local.get $1 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Uint32Array#__get local.get $0 - local.tee $4 - i32.load offset=4 i32.const 8 local.get $3 i32.sub - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get i32.eq i32.eqz if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 @@ -18137,105 +16728,57 @@ i32.const 8 call $~lib/typedarray/Uint32Array#subarray call $~lib/typedarray/Uint32Array#reverse - local.set $6 - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 0 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 + local.set $4 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 0 + call $~lib/typedarray/Uint32Array#__get i32.const 8 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 1 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 1 + call $~lib/typedarray/Uint32Array#__get i32.const 7 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 2 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 2 + call $~lib/typedarray/Uint32Array#__get i32.const 6 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + i32.const 3 + call $~lib/typedarray/Uint32Array#__get i32.const 5 i32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -18243,7 +16786,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#reverse (; 338 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 363 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -18313,7 +16856,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int64Array#subarray (; 339 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 364 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -18427,14 +16970,12 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 340 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 365 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -18458,49 +16999,19 @@ br_if $break|0 block local.get $1 - i32.load offset=4 local.get $3 - i32.const 3 - i32.shl - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i64.load32_s - i64.store + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set local.get $2 - i32.load offset=4 local.get $3 - i32.const 3 - i32.shl - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i64.load32_s - i64.store + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set end local.get $3 i32.const 1 @@ -18524,41 +17035,18 @@ i32.eqz br_if $break|1 local.get $1 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 3 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i64.load + call $~lib/typedarray/Int64Array#__get local.get $0 - local.tee $4 - i32.load offset=4 i32.const 8 local.get $3 i32.sub - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i64.load32_s + call $~lib/array/Array#__get + i64.extend_i32_s i64.eq i32.eqz if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 @@ -18579,105 +17067,57 @@ i32.const 8 call $~lib/typedarray/Int64Array#subarray call $~lib/typedarray/Int64Array#reverse - local.set $6 - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 0 - i32.const 3 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 + local.set $4 local.get $4 - i32.load offset=8 - i32.lt_u - select - i64.load + i32.const 0 + call $~lib/typedarray/Int64Array#__get i64.const 8 i64.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 1 - i32.const 3 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i64.load + i32.const 1 + call $~lib/typedarray/Int64Array#__get i64.const 7 i64.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 2 - i32.const 3 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i64.load + i32.const 2 + call $~lib/typedarray/Int64Array#__get i64.const 6 i64.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 3 - i32.const 3 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i64.load + i32.const 3 + call $~lib/typedarray/Int64Array#__get i64.const 5 i64.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -18685,7 +17125,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#reverse (; 341 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#reverse (; 366 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -18755,7 +17195,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint64Array#subarray (; 342 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 367 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -18869,14 +17309,12 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 343 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 368 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -18899,50 +17337,20 @@ i32.eqz br_if $break|0 block - local.get $1 - i32.load offset=4 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.get $0 - local.tee $4 - i32.load offset=4 - local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i64.load32_s - i64.store + local.get $1 + local.get $3 + local.get $0 + local.get $3 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set local.get $2 - i32.load offset=4 local.get $3 - i32.const 3 - i32.shl - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i64.load32_s - i64.store + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set end local.get $3 i32.const 1 @@ -18966,41 +17374,18 @@ i32.eqz br_if $break|1 local.get $1 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 3 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i64.load + call $~lib/typedarray/Uint64Array#__get local.get $0 - local.tee $4 - i32.load offset=4 i32.const 8 local.get $3 i32.sub - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i64.load32_s + call $~lib/array/Array#__get + i64.extend_i32_s i64.eq i32.eqz if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 @@ -19021,105 +17406,57 @@ i32.const 8 call $~lib/typedarray/Uint64Array#subarray call $~lib/typedarray/Uint64Array#reverse - local.set $6 - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 0 - i32.const 3 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 + local.set $4 local.get $4 - i32.load offset=8 - i32.lt_u - select - i64.load + i32.const 0 + call $~lib/typedarray/Uint64Array#__get i64.const 8 i64.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 1 - i32.const 3 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i64.load + i32.const 1 + call $~lib/typedarray/Uint64Array#__get i64.const 7 i64.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 2 - i32.const 3 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i64.load + i32.const 2 + call $~lib/typedarray/Uint64Array#__get i64.const 6 i64.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 3 - i32.const 3 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - i64.load + i32.const 3 + call $~lib/typedarray/Uint64Array#__get i64.const 5 i64.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -19127,7 +17464,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 344 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 369 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -19197,7 +17534,7 @@ end local.get $1 ) - (func $~lib/typedarray/Float32Array#subarray (; 345 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 370 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -19311,14 +17648,12 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 346 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 371 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -19342,51 +17677,19 @@ br_if $break|0 block local.get $1 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get f32.convert_i32_s - f32.store + call $~lib/typedarray/Float32Array#__set local.get $2 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get f32.convert_i32_s - f32.store + call $~lib/typedarray/Float32Array#__set end local.get $3 i32.const 1 @@ -19410,42 +17713,18 @@ i32.eqz br_if $break|1 local.get $1 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - f32.load + call $~lib/typedarray/Float32Array#__get local.get $0 - local.tee $4 - i32.load offset=4 i32.const 8 local.get $3 i32.sub - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get f32.convert_i32_s f32.eq i32.eqz if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 @@ -19466,105 +17745,57 @@ i32.const 8 call $~lib/typedarray/Float32Array#subarray call $~lib/typedarray/Float32Array#reverse - local.set $6 - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 0 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 + local.set $4 local.get $4 - i32.load offset=8 - i32.lt_u - select - f32.load + i32.const 0 + call $~lib/typedarray/Float32Array#__get f32.const 8 f32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 1 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - f32.load + i32.const 1 + call $~lib/typedarray/Float32Array#__get f32.const 7 f32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 2 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - f32.load + i32.const 2 + call $~lib/typedarray/Float32Array#__get f32.const 6 f32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - f32.load + i32.const 3 + call $~lib/typedarray/Float32Array#__get f32.const 5 f32.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -19572,7 +17803,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 347 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 372 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -19642,14 +17873,12 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse (; 348 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 373 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) global.get $std/typedarray/testArrayReverseValues local.set $0 i32.const 0 @@ -19673,51 +17902,19 @@ br_if $break|0 block local.get $1 - i32.load offset=4 local.get $3 - i32.const 3 - i32.shl - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get f64.convert_i32_s - f64.store + call $~lib/typedarray/Float64Array#__set local.get $2 - i32.load offset=4 local.get $3 - i32.const 3 - i32.shl - i32.add local.get $0 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get f64.convert_i32_s - f64.store + call $~lib/typedarray/Float64Array#__set end local.get $3 i32.const 1 @@ -19741,42 +17938,18 @@ i32.eqz br_if $break|1 local.get $1 - local.tee $4 - i32.load offset=4 local.get $3 - i32.const 3 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/typedarray/Float64Array#__get local.get $0 - local.tee $4 - i32.load offset=4 i32.const 8 local.get $3 i32.sub - i32.const 2 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 - local.get $4 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/array/Array#__get f64.convert_i32_s f64.eq i32.eqz if - i32.const 936 + i32.const 1024 i32.const 16 i32.const 461 i32.const 4 @@ -19797,105 +17970,57 @@ i32.const 8 call $~lib/typedarray/Float64Array#subarray call $~lib/typedarray/Float64Array#reverse - local.set $6 - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 0 - i32.const 3 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 + local.set $4 local.get $4 - i32.load offset=8 - i32.lt_u - select - f64.load + i32.const 0 + call $~lib/typedarray/Float64Array#__get f64.const 8 f64.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 466 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 1 - i32.const 3 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - f64.load + i32.const 1 + call $~lib/typedarray/Float64Array#__get f64.const 7 f64.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 467 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 2 - i32.const 3 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - f64.load + i32.const 2 + call $~lib/typedarray/Float64Array#__get f64.const 6 f64.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 468 i32.const 2 call $~lib/env/abort unreachable end - local.get $6 - local.tee $4 - i32.load offset=4 - i32.const 3 - i32.const 3 - i32.shl - local.tee $5 - i32.add - i32.const -1 - local.get $5 local.get $4 - i32.load offset=8 - i32.lt_u - select - f64.load + i32.const 3 + call $~lib/typedarray/Float64Array#__get f64.const 5 f64.eq i32.eqz if - i32.const 1016 + i32.const 1104 i32.const 16 i32.const 469 i32.const 2 @@ -19903,9 +18028,8 @@ unreachable end ) - (func $start:std/typedarray (; 349 ;) (type $FUNCSIG$v) + (func $start:std/typedarray (; 374 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32.const 1 i32.eq @@ -20057,17 +18181,17 @@ call $~lib/typedarray/Int32Array#constructor global.set $std/typedarray/arr global.get $std/typedarray/arr - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store offset=4 + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store offset=8 + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr call $~lib/typedarray/Int32Array#get:length i32.const 3 @@ -20110,20 +18234,8 @@ unreachable end global.get $std/typedarray/arr - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Int32Array#__get i32.const 1 i32.eq i32.eqz @@ -20136,20 +18248,8 @@ unreachable end global.get $std/typedarray/arr - local.tee $0 - i32.load offset=4 i32.const 1 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Int32Array#__get i32.const 2 i32.eq i32.eqz @@ -20162,20 +18262,8 @@ unreachable end global.get $std/typedarray/arr - local.tee $0 - i32.load offset=4 - i32.const 2 i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Int32Array#__get i32.const 3 i32.eq i32.eqz @@ -20236,20 +18324,8 @@ unreachable end global.get $std/typedarray/arr - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 2 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load + call $~lib/typedarray/Int32Array#__get i32.const 2 i32.eq i32.eqz @@ -20266,37 +18342,37 @@ call $~lib/typedarray/Float64Array#constructor global.set $std/typedarray/af64 global.get $std/typedarray/af64 - i32.load offset=4 + i32.const 0 f64.const 1 - f64.store + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 - i32.load offset=4 + i32.const 1 f64.const 2 - f64.store offset=8 + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 - i32.load offset=4 + i32.const 2 f64.const 7 - f64.store offset=16 + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 - i32.load offset=4 + i32.const 3 f64.const 6 - f64.store offset=24 + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 - i32.load offset=4 + i32.const 4 f64.const 5 - f64.store offset=32 + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 - i32.load offset=4 + i32.const 5 f64.const 4 - f64.store offset=40 + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 - i32.load offset=4 + i32.const 6 f64.const 3 - f64.store offset=48 + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 - i32.load offset=4 + i32.const 7 f64.const 8 - f64.store offset=56 + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 i32.const 2 i32.const 6 @@ -20354,94 +18430,40 @@ end drop global.get $std/typedarray/af64 - local.tee $0 - i32.load offset=4 i32.const 0 - i32.const 3 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/typedarray/Float64Array#__get f64.const 4 f64.eq local.tee $0 if (result i32) global.get $std/typedarray/af64 - local.tee $0 - i32.load offset=4 i32.const 1 - i32.const 3 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/typedarray/Float64Array#__get f64.const 5 f64.eq else local.get $0 end local.tee $0 - i32.const 0 - i32.ne if (result i32) global.get $std/typedarray/af64 - local.tee $0 - i32.load offset=4 i32.const 2 - i32.const 3 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/typedarray/Float64Array#__get f64.const 6 f64.eq else local.get $0 end local.tee $0 - i32.const 0 - i32.ne if (result i32) global.get $std/typedarray/af64 - local.tee $0 - i32.load offset=4 - i32.const 3 i32.const 3 - i32.shl - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - f64.load + call $~lib/typedarray/Float64Array#__get f64.const 7 f64.eq else local.get $0 end - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -20456,69 +18478,20 @@ call $~lib/typedarray/Uint8ClampedArray#constructor global.set $std/typedarray/clampedArr global.get $std/typedarray/clampedArr - i32.load offset=4 + i32.const 0 i32.const -32 - local.tee $0 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $0 - i32.sub - i32.const 31 - i32.shr_s - local.get $0 - i32.or - i32.and - i32.store8 + call $~lib/typedarray/Uint8ClampedArray#__set global.get $std/typedarray/clampedArr - i32.load offset=4 + i32.const 1 i32.const 2 - local.tee $0 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $0 - i32.sub - i32.const 31 - i32.shr_s - local.get $0 - i32.or - i32.and - i32.store8 offset=1 + call $~lib/typedarray/Uint8ClampedArray#__set global.get $std/typedarray/clampedArr - i32.load offset=4 + i32.const 2 i32.const 256 - local.tee $0 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i32.const 255 - local.get $0 - i32.sub - i32.const 31 - i32.shr_s - local.get $0 - i32.or - i32.and - i32.store8 offset=2 + call $~lib/typedarray/Uint8ClampedArray#__set global.get $std/typedarray/clampedArr - local.tee $0 - i32.load offset=4 i32.const 0 - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 0 i32.eq i32.eqz @@ -20531,18 +18504,8 @@ unreachable end global.get $std/typedarray/clampedArr - local.tee $0 - i32.load offset=4 i32.const 1 - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 2 i32.eq i32.eqz @@ -20555,18 +18518,8 @@ unreachable end global.get $std/typedarray/clampedArr - local.tee $0 - i32.load offset=4 i32.const 2 - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_u + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 255 i32.eq i32.eqz @@ -20583,25 +18536,25 @@ call $~lib/typedarray/Int8Array#constructor global.set $std/typedarray/arr8 global.get $std/typedarray/arr8 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/arr8 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/arr8 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/arr8 - i32.load offset=4 + i32.const 3 i32.const 4 - i32.store8 offset=3 + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/arr8 - i32.load offset=4 + i32.const 4 i32.const 5 - i32.store8 offset=4 + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/arr8 i32.const 1 i32.const 1 @@ -20610,7 +18563,7 @@ drop global.get $std/typedarray/arr8 block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) - i32.const 152 + i32.const 200 local.set $0 local.get $0 i32.const 15 @@ -20635,7 +18588,7 @@ drop global.get $std/typedarray/arr8 block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 168 + i32.const 256 local.set $0 local.get $0 i32.const 15 @@ -20660,7 +18613,7 @@ drop global.get $std/typedarray/arr8 block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) - i32.const 184 + i32.const 272 local.set $0 local.get $0 i32.const 15 @@ -20685,7 +18638,7 @@ drop global.get $std/typedarray/arr8 block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) - i32.const 200 + i32.const 288 local.set $0 local.get $0 i32.const 15 @@ -20710,7 +18663,7 @@ drop global.get $std/typedarray/arr8 block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) - i32.const 216 + i32.const 304 local.set $0 local.get $0 i32.const 15 @@ -20779,7 +18732,7 @@ end global.get $std/typedarray/sub8 block $~lib/runtime/WRAPARRAY|inlined.5 (result i32) - i32.const 232 + i32.const 320 local.set $0 local.get $0 i32.const 15 @@ -20798,7 +18751,7 @@ end global.get $std/typedarray/arr8 block $~lib/runtime/WRAPARRAY|inlined.6 (result i32) - i32.const 248 + i32.const 336 local.set $0 local.get $0 i32.const 15 @@ -20820,25 +18773,25 @@ call $~lib/typedarray/Int32Array#constructor global.set $std/typedarray/arr32 global.get $std/typedarray/arr32 - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr32 - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store offset=4 + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr32 - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store offset=8 + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr32 - i32.load offset=4 + i32.const 3 i32.const 4 - i32.store offset=12 + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr32 - i32.load offset=4 + i32.const 4 i32.const 5 - i32.store offset=16 + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr32 i32.const 1 i32.const 1 @@ -20847,7 +18800,7 @@ drop global.get $std/typedarray/arr32 block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) - i32.const 264 + i32.const 352 local.set $0 local.get $0 i32.const 16 @@ -20872,7 +18825,7 @@ drop global.get $std/typedarray/arr32 block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 296 + i32.const 384 local.set $0 local.get $0 i32.const 16 @@ -20897,7 +18850,7 @@ drop global.get $std/typedarray/arr32 block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) - i32.const 328 + i32.const 416 local.set $0 local.get $0 i32.const 16 @@ -20922,7 +18875,7 @@ drop global.get $std/typedarray/arr32 block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) - i32.const 360 + i32.const 448 local.set $0 local.get $0 i32.const 16 @@ -20947,7 +18900,7 @@ drop global.get $std/typedarray/arr32 block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) - i32.const 392 + i32.const 480 local.set $0 local.get $0 i32.const 16 @@ -21020,7 +18973,7 @@ end global.get $std/typedarray/sub32 block $~lib/runtime/WRAPARRAY|inlined.5 (result i32) - i32.const 424 + i32.const 512 local.set $0 local.get $0 i32.const 16 @@ -21039,7 +18992,7 @@ end global.get $std/typedarray/arr32 block $~lib/runtime/WRAPARRAY|inlined.6 (result i32) - i32.const 448 + i32.const 536 local.set $0 local.get $0 i32.const 16 @@ -21065,47 +19018,37 @@ call $~lib/typedarray/Int8Array#constructor global.set $std/typedarray/multisubarr global.get $std/typedarray/multisubarr - i32.load offset=4 + i32.const 0 i32.const 1 - i32.store8 + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/multisubarr - i32.load offset=4 + i32.const 1 i32.const 2 - i32.store8 offset=1 + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/multisubarr - i32.load offset=4 + i32.const 2 i32.const 3 - i32.store8 offset=2 + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/multisubarr - i32.load offset=4 + i32.const 3 i32.const 4 - i32.store8 offset=3 + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/multisubarr - i32.load offset=4 + i32.const 4 i32.const 5 - i32.store8 offset=4 + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/multisubarr - i32.load offset=4 + i32.const 5 i32.const 6 - i32.store8 offset=5 + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/multisubarr i32.const 1 i32.const 6 call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/multisubarr1 global.get $std/typedarray/multisubarr1 - local.tee $0 - i32.load offset=4 i32.const 0 - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/typedarray/Int8Array#__get i32.const 2 i32.eq i32.eqz @@ -21162,18 +19105,8 @@ call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/multisubarr2 global.get $std/typedarray/multisubarr2 - local.tee $0 - i32.load offset=4 i32.const 0 - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/typedarray/Int8Array#__get i32.const 3 i32.eq i32.eqz @@ -21230,18 +19163,8 @@ call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/multisubarr3 global.get $std/typedarray/multisubarr3 - local.tee $0 - i32.load offset=4 i32.const 0 - local.tee $1 - i32.add - i32.const -1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.lt_u - select - i32.load8_s + call $~lib/typedarray/Int8Array#__get i32.const 4 i32.eq i32.eqz @@ -21381,9 +19304,9 @@ call $std/typedarray/testArrayReverse call $std/typedarray/testArrayReverse ) - (func $start (; 350 ;) (type $FUNCSIG$v) + (func $start (; 375 ;) (type $FUNCSIG$v) call $start:std/typedarray ) - (func $null (; 351 ;) (type $FUNCSIG$v) + (func $null (; 376 ;) (type $FUNCSIG$v) ) ) From 83566a5512725f1940aa95f2c439fed016ec1ef5 Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 18 Mar 2019 18:27:48 +0100 Subject: [PATCH 048/119] eliminate unnecessary tee+drop in unchecked set --- src/builtins.ts | 7 +-- tests/compiler/std/string.optimized.wat | 61 +++++++++++++------------ tests/compiler/std/string.untouched.wat | 25 ++++------ 3 files changed, 43 insertions(+), 50 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index e5a6253c37..ce6796e238 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -2331,7 +2331,8 @@ export function compileCall( let flow = compiler.currentFlow; let alreadyUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); flow.set(FlowFlags.UNCHECKED_CONTEXT); - let expr = compiler.compileExpressionRetainType(operands[0], contextualType, WrapMode.NONE); + // eliminate unnecessary tees by preferring contextualType(=void): + let expr = compiler.compileExpression(operands[0], contextualType, ConversionKind.NONE, WrapMode.NONE); if (!alreadyUnchecked) flow.unset(FlowFlags.UNCHECKED_CONTEXT); return expr; } @@ -4218,10 +4219,6 @@ export function compileBuiltinArraySetWithValue( valueExpr: ExpressionRef, tee: bool ): ExpressionRef { - - // TODO: check offset - - var program = compiler.program; var type = assert(compiler.program.determineBuiltinArrayType(target)); var module = compiler.module; diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index fa751ca766..8d22b14d3c 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -3335,10 +3335,10 @@ if i32.const 1 call $~lib/array/Array#constructor - local.tee $7 + local.tee $3 local.get $0 call $~lib/array/Array#__set - local.get $7 + local.get $3 return end local.get $0 @@ -3347,7 +3347,7 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $5 + local.set $6 i32.const 2147483647 local.get $2 local.get $2 @@ -3365,40 +3365,41 @@ local.set $9 local.get $3 if - local.get $5 + local.get $6 i32.eqz if i32.const 1 call $~lib/array/Array#constructor - local.tee $3 + local.tee $5 i32.load offset=4 i32.const 312 i32.store - local.get $3 + local.get $5 return end else - local.get $5 + local.get $6 i32.eqz if i32.const 0 call $~lib/array/Array#constructor return end - local.get $5 + local.get $6 + local.tee $3 local.get $2 - local.get $5 + local.get $3 local.get $2 i32.lt_s select - local.tee $5 + local.tee $6 call $~lib/array/Array#constructor - local.tee $7 + local.tee $3 i32.load offset=4 - local.set $3 + local.set $5 loop $repeat|0 local.get $4 - local.get $5 + local.get $6 i32.lt_s if i32.const 2 @@ -3414,7 +3415,7 @@ local.get $4 i32.const 2 i32.shl - local.get $3 + local.get $5 i32.add local.get $1 i32.const 1 @@ -3427,12 +3428,12 @@ br $repeat|0 end end - local.get $7 + local.get $3 return end i32.const 0 call $~lib/array/Array#constructor - local.set $6 + local.set $7 loop $continue|1 local.get $0 local.get $1 @@ -3445,30 +3446,30 @@ local.get $8 local.get $4 i32.sub - local.tee $3 + local.tee $5 i32.const 0 i32.gt_s if - local.get $3 + local.get $5 i32.const 1 i32.shl - local.tee $3 + local.tee $5 call $~lib/runtime/doAllocate - local.tee $7 + local.tee $3 local.get $4 i32.const 1 i32.shl local.get $0 i32.add - local.get $3 + local.get $5 call $~lib/memory/memory.copy - local.get $6 local.get $7 + local.get $3 i32.const 1 call $~lib/runtime/doRegister call $~lib/array/Array#push else - local.get $6 + local.get $7 i32.const 312 call $~lib/array/Array#push end @@ -3479,7 +3480,7 @@ local.get $2 i32.eq if - local.get $6 + local.get $7 return end local.get $8 @@ -3507,7 +3508,7 @@ local.get $3 return end - local.get $5 + local.get $6 local.get $4 i32.sub local.tee $1 @@ -3519,7 +3520,7 @@ i32.shl local.tee $1 call $~lib/runtime/doAllocate - local.tee $3 + local.tee $5 local.get $4 i32.const 1 i32.shl @@ -3527,17 +3528,17 @@ i32.add local.get $1 call $~lib/memory/memory.copy - local.get $6 - local.get $3 + local.get $7 + local.get $5 i32.const 1 call $~lib/runtime/doRegister call $~lib/array/Array#push else - local.get $6 + local.get $7 i32.const 312 call $~lib/array/Array#push end - local.get $6 + local.get $7 ) (func $~lib/array/Array#__get (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 6e5eeebe17..d67287ed46 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -4336,23 +4336,18 @@ i32.const 1 call $~lib/array/Array#constructor local.set $6 - block (result i32) - local.get $6 - local.tee $3 - i32.load offset=4 - block $~lib/runtime/LINK>|inlined.0 (result i32) - local.get $0 - local.set $7 - local.get $7 - local.get $3 - call $~lib/runtime/doLink - local.get $7 - end - local.tee $3 - i32.store + local.get $6 + local.tee $3 + i32.load offset=4 + block $~lib/runtime/LINK>|inlined.0 (result i32) + local.get $0 + local.set $7 + local.get $7 local.get $3 + call $~lib/runtime/doLink + local.get $7 end - drop + i32.store local.get $6 return end From 7693b543f492f5822d9ff6eba6396a1a25f8468c Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 19 Mar 2019 08:20:10 +0100 Subject: [PATCH 049/119] optimize array literal init, warn on unsupported inlining --- src/builtins.ts | 21 +- src/compiler.ts | 155 +- src/diagnosticMessages.generated.ts | 2 + src/diagnosticMessages.json | 1 + std/assembly/array.ts | 48 +- std/assembly/arraybuffer.ts | 2 +- std/assembly/builtins.ts | 17 +- std/assembly/map.ts | 11 +- std/assembly/runtime.ts | 7 +- std/assembly/set.ts | 10 +- std/assembly/string.ts | 8 +- std/assembly/util/number.ts | 8 +- tests/compiler/binary.optimized.wat | 56 +- tests/compiler/binary.untouched.wat | 40 +- tests/compiler/builtins.untouched.wat | 347 +-- tests/compiler/call-super.optimized.wat | 4 +- tests/compiler/call-super.untouched.wat | 4 +- tests/compiler/constructor.optimized.wat | 4 +- tests/compiler/constructor.untouched.wat | 4 +- tests/compiler/exports.optimized.wat | 4 +- tests/compiler/exports.untouched.wat | 4 +- tests/compiler/getter-call.optimized.wat | 4 +- tests/compiler/getter-call.untouched.wat | 4 +- tests/compiler/inlining.optimized.wat | 4 +- tests/compiler/inlining.untouched.wat | 4 +- .../new-without-allocator.untouched.wat | 4 +- tests/compiler/number.optimized.wat | 4 +- tests/compiler/number.untouched.wat | 138 +- tests/compiler/object-literal.optimized.wat | 4 +- tests/compiler/object-literal.untouched.wat | 4 +- .../optional-typeparameters.optimized.wat | 4 +- .../optional-typeparameters.untouched.wat | 4 +- .../compiler/std/array-literal.optimized.wat | 1523 +------------ .../compiler/std/array-literal.untouched.wat | 1972 ++--------------- tests/compiler/std/array.optimized.wat | 139 +- tests/compiler/std/array.untouched.wat | 356 ++- tests/compiler/std/arraybuffer.optimized.wat | 6 +- tests/compiler/std/arraybuffer.untouched.wat | 6 +- tests/compiler/std/dataview.optimized.wat | 4 +- tests/compiler/std/dataview.untouched.wat | 6 +- tests/compiler/std/date.optimized.wat | 4 +- tests/compiler/std/date.untouched.wat | 4 +- tests/compiler/std/map.optimized.wat | 4 +- tests/compiler/std/map.untouched.wat | 4 +- tests/compiler/std/math.optimized.wat | 92 +- tests/compiler/std/math.untouched.wat | 59 +- tests/compiler/std/mod.optimized.wat | 92 +- tests/compiler/std/mod.untouched.wat | 42 +- tests/compiler/std/new.optimized.wat | 4 +- tests/compiler/std/new.untouched.wat | 4 +- .../std/operator-overloading.optimized.wat | 4 +- .../std/operator-overloading.untouched.wat | 4 +- tests/compiler/std/pointer.optimized.wat | 54 +- tests/compiler/std/pointer.ts | 1 - tests/compiler/std/pointer.untouched.wat | 54 +- tests/compiler/std/runtime.optimized.wat | 4 +- tests/compiler/std/runtime.untouched.wat | 4 +- tests/compiler/std/set.optimized.wat | 74 +- tests/compiler/std/set.untouched.wat | 828 +++---- tests/compiler/std/string-utf8.optimized.wat | 12 +- tests/compiler/std/string-utf8.untouched.wat | 12 +- tests/compiler/std/string.optimized.wat | 438 ++-- tests/compiler/std/string.untouched.wat | 203 +- tests/compiler/std/symbol.optimized.wat | 4 +- tests/compiler/std/symbol.untouched.wat | 4 +- tests/compiler/std/typedarray.optimized.wat | 62 +- tests/compiler/std/typedarray.untouched.wat | 184 +- 67 files changed, 1943 insertions(+), 5259 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index ce6796e238..53b72e3fb3 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -633,17 +633,10 @@ export function compileCall( return module.createI32(getExpressionId(expr) == ExpressionId.Const ? 1 : 0); } case BuiltinSymbols.isManaged: { // isManaged() -> bool - if (!compiler.program.gcImplemented) { - compiler.currentType = Type.bool; - return module.createI32(0); - } let type = evaluateConstantType(compiler, typeArguments, operands, reportNode); compiler.currentType = Type.bool; if (!type) return module.createUnreachable(); - let classType = type.classReference; - return classType !== null && !classType.hasDecorator(DecoratorFlags.UNMANAGED) - ? module.createI32(1) - : module.createI32(0); + return module.createI32(type.isManaged(compiler.program) ? 1 : 0); } case BuiltinSymbols.sizeof: { // sizeof() -> usize compiler.currentType = compiler.options.usizeType; @@ -4253,7 +4246,8 @@ export function compileBuiltinArraySetWithValue( } } - var typeIsManaged = type.is(TypeFlags.REFERENCE); // FIXME: .isManaged + var program = compiler.program; + var isManaged = type.isManaged(program) && target.type.isManaged(program); var usizeType = compiler.options.usizeType; var nativeSizeType = compiler.options.nativeSizeType; var thisExpr = compiler.compileExpression( @@ -4263,7 +4257,7 @@ export function compileBuiltinArraySetWithValue( WrapMode.NONE ); var tempThis: Local | null = null; - if (typeIsManaged) { + if (isManaged) { tempThis = compiler.currentFlow.getTempLocal(target.type, false); thisExpr = module.createTeeLocal(tempThis.index, thisExpr); } @@ -4293,8 +4287,8 @@ export function compileBuiltinArraySetWithValue( } } - // handle Array: value = LINK(value, this), value - if (typeIsManaged) { + // handle Array: value = LINK(value, this) + if (isManaged) { let program = compiler.program; let linkPrototype = assert(program.linkPrototype); let linkInstance = compiler.resolver.resolveFunction(linkPrototype, [ type, target.type ]); @@ -4309,9 +4303,6 @@ export function compileBuiltinArraySetWithValue( body.unshift( module.createSetLocal(tempValue.index, valueExpr) ); - body.push( - module.createGetLocal(tempValue.index, nativeSizeType) - ); previousFlow.freeTempLocal(tempValue); previousFlow.freeTempLocal(tempThis!); tempThis = null; compiler.currentFlow = previousFlow; diff --git a/src/compiler.ts b/src/compiler.ts index af223c7631..0cd75989b3 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -3731,7 +3731,7 @@ export class Compiler extends DiagnosticEmitter { if (!(instance && this.compileFunction(instance))) { expr = module.createUnreachable(); } else { - expr = this.makeCallDirect(instance, [ leftExpr, rightExpr ]); + expr = this.makeCallDirect(instance, [ leftExpr, rightExpr ], expression); } break; } @@ -3980,7 +3980,7 @@ export class Compiler extends DiagnosticEmitter { if (!(instance && this.compileFunction(instance))) { expr = module.createUnreachable(); } else { - expr = this.makeCallDirect(instance, [ leftExpr, rightExpr ]); + expr = this.makeCallDirect(instance, [ leftExpr, rightExpr ], expression); } break; } @@ -4011,7 +4011,7 @@ export class Compiler extends DiagnosticEmitter { if (!(instance && this.compileFunction(instance))) { expr = module.createUnreachable(); } else { - expr = this.makeCallDirect(instance, [ leftExpr, rightExpr ]); + expr = this.makeCallDirect(instance, [ leftExpr, rightExpr ], expression); } break; } @@ -4904,7 +4904,7 @@ export class Compiler extends DiagnosticEmitter { let setterInstance = this.resolver.resolveFunction(setterPrototype, null, makeMap(), ReportMode.REPORT); if (!setterInstance) return module.createUnreachable(); // call just the setter if the return value isn't of interest - if (!tee) return this.makeCallDirect(setterInstance, [ valueWithCorrectType ]); + if (!tee) return this.makeCallDirect(setterInstance, [ valueWithCorrectType ], expression); // otherwise call the setter first, then the getter let getterPrototype = assert((target).getterPrototype); // must be present let getterInstance = this.resolver.resolveFunction(getterPrototype, null, makeMap(), ReportMode.REPORT); @@ -4912,8 +4912,8 @@ export class Compiler extends DiagnosticEmitter { let returnType = getterInstance.signature.returnType; let nativeReturnType = returnType.toNativeType(); return module.createBlock(null, [ - this.makeCallDirect(setterInstance, [ valueWithCorrectType ]), - this.makeCallDirect(getterInstance) // sets currentType + this.makeCallDirect(setterInstance, [ valueWithCorrectType ], expression), + this.makeCallDirect(getterInstance, null, expression) // sets currentType ], nativeReturnType); } case ElementKind.PROPERTY: { // instance property @@ -4932,7 +4932,7 @@ export class Compiler extends DiagnosticEmitter { this.options.usizeType, WrapMode.NONE ); - return this.makeCallDirect(setterInstance, [ thisExpr, valueWithCorrectType ]); + return this.makeCallDirect(setterInstance, [ thisExpr, valueWithCorrectType ], expression); } // otherwise call the setter first, then the getter let getterInstance = assert((target).getterInstance); // must be present @@ -4949,10 +4949,10 @@ export class Compiler extends DiagnosticEmitter { this.makeCallDirect(setterInstance, [ // set and remember the target module.createTeeLocal(tempLocalIndex, thisExpr), valueWithCorrectType - ]), + ], expression), this.makeCallDirect(getterInstance, [ // get from remembered target module.createGetLocal(tempLocalIndex, nativeReturnType) - ]) + ], expression) ], nativeReturnType); } case ElementKind.CLASS: { @@ -5012,18 +5012,18 @@ export class Compiler extends DiagnosticEmitter { module.createTeeLocal(tempLocalTarget.index, thisExpr), module.createTeeLocal(tempLocalElement.index, elementExpr), valueWithCorrectType - ]), + ], expression), this.makeCallDirect(indexedGet, [ module.createGetLocal(tempLocalTarget.index, tempLocalTarget.type.toNativeType()), module.createGetLocal(tempLocalElement.index, tempLocalElement.type.toNativeType()) - ]) + ], expression) ], returnType.toNativeType()); } else { return this.makeCallDirect(indexedSet, [ thisExpr, elementExpr, valueWithCorrectType - ]); + ], expression); } } // fall-through @@ -5211,7 +5211,7 @@ export class Compiler extends DiagnosticEmitter { makeMap(flow.contextualTypeArguments) ); if (!instance) return this.module.createUnreachable(); - return this.makeCallDirect(instance, argumentExprs); + return this.makeCallDirect(instance, argumentExprs, expression); // TODO: this skips inlining because inlining requires compiling its temporary locals in // the scope of the inlined flow. might need another mechanism to lock temp. locals early, // so inlining can be performed in `makeCallDirect` instead? @@ -5515,7 +5515,7 @@ export class Compiler extends DiagnosticEmitter { ); } assert(index == numArgumentsInclThis); - return this.makeCallDirect(instance, operands); + return this.makeCallDirect(instance, operands, reportNode); } // Depends on being pre-checked in compileCallDirect @@ -5788,8 +5788,15 @@ export class Compiler extends DiagnosticEmitter { /** Creates a direct call to the specified function. */ makeCallDirect( instance: Function, - operands: ExpressionRef[] | null = null + operands: ExpressionRef[] | null, + reportNode: Node ): ExpressionRef { + if (instance.hasDecorator(DecoratorFlags.INLINE)) { + this.warning( + DiagnosticCode.TODO_Cannot_inline_inferred_calls_and_specific_internals_yet, + reportNode.range, instance.internalName + ); + } var numOperands = operands ? operands.length : 0; var numArguments = numOperands; var minArguments = instance.signature.requiredParameters; @@ -6619,40 +6626,37 @@ export class Compiler extends DiagnosticEmitter { // find out whether all elements are constant (array is static) var length = expressions.length; - var compiledValues = new Array(length); - var constantValues = new Array(length); + var constantValues: ExpressionRef[] | null = new Array(length); var nativeElementType = elementType.toNativeType(); - var isStatic = true; for (let i = 0; i < length; ++i) { let expression = expressions[i]; let expr = expression ? this.compileExpression(expression, elementType, ConversionKind.IMPLICIT, WrapMode.NONE) : elementType.toNativeZero(module); - compiledValues[i] = expr; - if (isStatic) { - expr = module.precomputeExpression(expr); - if (getExpressionId(expr) == ExpressionId.Const) { - assert(getExpressionType(expr) == nativeElementType); - constantValues[i] = expr; - } else { - if (isConst) { - this.warning( - DiagnosticCode.Compiling_constant_with_non_constant_initializer_as_mutable, - reportNode.range - ); - } - isStatic = false; + expr = module.precomputeExpression(expr); + if (getExpressionId(expr) == ExpressionId.Const) { + assert(getExpressionType(expr) == nativeElementType); + constantValues![i] = expr; + } else { + if (isConst) { + this.warning( + DiagnosticCode.Compiling_constant_with_non_constant_initializer_as_mutable, + reportNode.range + ); } + constantValues = null; + break; } } var program = this.program; var arrayPrototype = assert(program.arrayPrototype); var arrayInstance = assert(this.resolver.resolveClass(arrayPrototype, [ elementType ])); + var arrayBufferInstance = assert(program.arrayBufferInstance); var arrayType = arrayInstance.type; // if the array is static, make a static arraybuffer segment - if (isStatic) { + if (constantValues) { let runtimeHeaderSize = program.runtimeHeaderSize; let bufferSegment = this.ensureStaticArrayBuffer(elementType, constantValues); let bufferAddress = i64_add(bufferSegment.offset, i64_new(runtimeHeaderSize)); @@ -6669,7 +6673,6 @@ export class Compiler extends DiagnosticEmitter { // otherwise allocate a new array header and make it wrap a copy of the static buffer } else { - let arrayBufferInstance = assert(program.arrayBufferInstance); let wrapArrayPrototype = assert(program.wrapArrayPrototype); let wrapArrayInstance = this.resolver.resolveFunction(wrapArrayPrototype, [ elementType ]); if (!wrapArrayInstance) { @@ -6708,25 +6711,73 @@ export class Compiler extends DiagnosticEmitter { } var nativeArrayType = arrayType.toNativeType(); var flow = this.currentFlow; - var tempLocal = flow.parentFunction.addLocal(arrayType); // can't reuse a temp (used in compiledValues) - var stmts = new Array(2 + length); - var index = 0; - stmts[index++] = module.createSetLocal(tempLocal.index, - this.makeCallDirect(assert(arrayInstance.constructorInstance), [ - module.createI32(0), // this - module.createI32(length) - ]) + var tempThis = flow.getTempLocal(arrayType, false); + var tempDataStart = flow.getTempLocal(arrayBufferInstance.type); + var stmts = new Array(); + // tempThis = new Array(length) + stmts.push( + module.createSetLocal(tempThis.index, + this.makeCallDirect(assert(arrayInstance.constructorInstance), [ + module.createI32(0), // this + module.createI32(length) + ], reportNode) + ) ); - for (let i = 0; i < length; ++i) { - stmts[index++] = this.makeCallDirect(setter, [ - module.createGetLocal(tempLocal.index, nativeArrayType), // this - module.createI32(i), - compiledValues[i] - ]); + // tempData = tempThis.dataStart + var dataStart = assert(arrayInstance.lookupInSelf("dataStart")); + assert(dataStart.kind == ElementKind.FIELD); + stmts.push( + module.createSetLocal(tempDataStart.index, + module.createLoad(arrayType.byteSize, false, + module.createGetLocal(tempThis.index, nativeArrayType), + nativeArrayType, + (dataStart).memoryOffset + ) + ) + ); + var isManaged = elementType.isManaged(program) && arrayType.isManaged(program); + var linkInstance = isManaged + ? this.resolver.resolveFunction(assert(program.linkPrototype), [ elementType, arrayType ]) + : null; + for (let i = 0, alignLog2 = elementType.alignLog2; i < length; ++i) { + let valueExpression = expressions[i]; + let valueExpr = valueExpression + ? this.compileExpression(valueExpression, elementType, ConversionKind.IMPLICIT, WrapMode.NONE) + : elementType.toNativeZero(module); + if (isManaged) { + if (!linkInstance) { + valueExpr = module.createUnreachable(); + } else { + // value = LINK(value, tempThis) + let tempValue = flow.getAndFreeTempLocal(elementType, false); + let inlineFlow = Flow.createInline(flow.parentFunction, linkInstance); + inlineFlow.addScopedAlias(linkInstance.signature.getParameterName(0), elementType, tempValue.index); + inlineFlow.addScopedAlias(linkInstance.signature.getParameterName(1), arrayType, tempThis.index); + this.currentFlow = inlineFlow; + let body = this.compileFunctionBody(linkInstance); + stmts.push( + module.createSetLocal(tempValue.index, valueExpr) + ); + valueExpr = module.createBlock(inlineFlow.inlineReturnLabel, body, nativeElementType); + this.currentFlow = flow; + } + } + // store(tempData, value, immOffset) + stmts.push( + module.createStore(elementType.byteSize, + module.createGetLocal(tempDataStart.index, nativeArrayType), + valueExpr, + nativeElementType, + i << alignLog2 + ) + ); } - assert(index + 1 == stmts.length); - stmts[index] = module.createGetLocal(tempLocal.index, nativeArrayType); - flow.freeTempLocal(tempLocal); // but can be reused now + // -> tempThis + stmts.push( + module.createGetLocal(tempThis.index, nativeArrayType) + ); + flow.freeTempLocal(tempThis); // but can be reused now + flow.freeTempLocal(tempDataStart); this.currentType = arrayType; return module.createBlock(null, stmts, nativeArrayType); } @@ -6942,7 +6993,7 @@ export class Compiler extends DiagnosticEmitter { // TODO: base constructor might be inlined, but makeCallDirect can't do this stmts.push( module.createSetLocal(0, - this.makeCallDirect(assert(baseClass.constructorInstance), operands) + this.makeCallDirect(assert(baseClass.constructorInstance), operands, reportNode) ) ); } diff --git a/src/diagnosticMessages.generated.ts b/src/diagnosticMessages.generated.ts index dd8d451261..b77cfa3f83 100644 --- a/src/diagnosticMessages.generated.ts +++ b/src/diagnosticMessages.generated.ts @@ -34,6 +34,7 @@ export enum DiagnosticCode { Module_cannot_have_multiple_start_functions = 221, _0_must_be_a_value_between_1_and_2_inclusive = 222, _0_must_be_a_power_of_two = 223, + TODO_Cannot_inline_inferred_calls_and_specific_internals_yet = 224, Unterminated_string_literal = 1002, Identifier_expected = 1003, _0_expected = 1005, @@ -169,6 +170,7 @@ export function diagnosticCodeToString(code: DiagnosticCode): string { case 221: return "Module cannot have multiple start functions."; case 222: return "'{0}' must be a value between '{1}' and '{2}' inclusive."; case 223: return "'{0}' must be a power of two."; + case 224: return "TODO: Cannot inline inferred calls and specific internals yet."; case 1002: return "Unterminated string literal."; case 1003: return "Identifier expected."; case 1005: return "'{0}' expected."; diff --git a/src/diagnosticMessages.json b/src/diagnosticMessages.json index 128062772e..44b5a36330 100644 --- a/src/diagnosticMessages.json +++ b/src/diagnosticMessages.json @@ -26,6 +26,7 @@ "Module cannot have multiple start functions.": 221, "'{0}' must be a value between '{1}' and '{2}' inclusive.": 222, "'{0}' must be a power of two.": 223, + "TODO: Cannot inline inferred calls and specific internals yet.": 224, "Unterminated string literal.": 1002, "Identifier expected.": 1003, diff --git a/std/assembly/array.ts b/std/assembly/array.ts index e4af4d441a..554d1a1531 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -72,8 +72,11 @@ export class Array extends ArrayBufferView { @operator("[]=") // unchecked is built-in private __set(index: i32, value: T): void { ensureCapacity(this, index + 1, alignof()); - store(this.dataStart + (index << alignof()), value); - if (isManaged()) LINK(value, this); + store(this.dataStart + (index << alignof()), + isManaged() + ? LINK(value, this) + : value + ); if (index >= this.length_) this.length_ = index + 1; } @@ -131,8 +134,11 @@ export class Array extends ArrayBufferView { var newLength = this.length_ + 1; ensureCapacity(this, newLength, alignof()); this.length_ = newLength; - store(this.dataStart + ((newLength - 1) << alignof()), element); - if (isManaged()) LINK(element, this); + store(this.dataStart + ((newLength - 1) << alignof()), + isManaged() + ? LINK(element, this) + : element + ); return newLength; } @@ -146,15 +152,13 @@ export class Array extends ArrayBufferView { let thisStart = this.dataStart; for (let offset: usize = 0; offset < thisSize; offset += sizeof()) { let element = load(thisStart + offset); - store(outStart + offset, element); - LINK(element, out); + store(outStart + offset, LINK>(element, out)); } let otherStart = other.dataStart; let otherSize = otherLen << alignof(); for (let offset: usize = 0; offset < otherSize; offset += sizeof()) { let element = load(otherStart + offset); - store(outStart + thisSize + offset, element); - LINK(element, out); + store(outStart + thisSize + offset, LINK>(element, out)); } } else { memory.copy(outStart, this.dataStart, thisSize); @@ -211,8 +215,11 @@ export class Array extends ArrayBufferView { for (let index = 0; index < min(length, this.length_); ++index) { let value = load(this.dataStart + (index << alignof())); let result = callbackfn(value, index, this); - store(outStart + (index << alignof()), result); - if (isManaged()) LINK(result, out); + store(outStart + (index << alignof()), + isManaged() + ? LINK>(result, out) + : result + ); } return out; } @@ -283,8 +290,11 @@ export class Array extends ArrayBufferView { base, (newLength - 1) << alignof() ); - store(base, element); - if (isManaged()) LINK(element, this); + store(base, + isManaged() + ? LINK(element, this) + : element + ); this.length_ = newLength; return newLength; } @@ -300,8 +310,11 @@ export class Array extends ArrayBufferView { for (let i = 0; i < length; ++i) { let offset = i << alignof(); let element = load(thisBase + offset); - store(sliceBase + offset, element); - if (isManaged()) LINK(element, slice); + store(sliceBase + offset, + isManaged() + ? LINK>(element, slice) + : element + ); } return slice; } @@ -316,8 +329,11 @@ export class Array extends ArrayBufferView { var thisBase = thisStart + (start << alignof()); for (let i = 0; i < deleteCount; ++i) { let element = load(thisBase + (i << alignof())); - store(spliceStart + (i << alignof()), element); - if (isManaged()) LINK(element, splice); + store(spliceStart + (i << alignof()), + isManaged() + ? LINK>(element, splice) + : element + ); } memory.copy( splice.dataStart, diff --git a/std/assembly/arraybuffer.ts b/std/assembly/arraybuffer.ts index a9c3e1e91e..a24247f28a 100644 --- a/std/assembly/arraybuffer.ts +++ b/std/assembly/arraybuffer.ts @@ -2,7 +2,7 @@ import { ALLOCATE, REGISTER, HEADER, HEADER_SIZE, MAX_BYTELENGTH } from "./runti @sealed export class ArrayBuffer { - @inline static isView(value: T): bool { + static isView(value: T): bool { if (value) { if (value instanceof Int8Array) return true; if (value instanceof Uint8Array) return true; diff --git a/std/assembly/builtins.ts b/std/assembly/builtins.ts index ac0f1439d2..be4f79055e 100644 --- a/std/assembly/builtins.ts +++ b/std/assembly/builtins.ts @@ -58,14 +58,17 @@ export declare function isConstant(expression: void): bool; @builtin export declare function isManaged(value?: T): bool; -// @ts-ignore: decorator -@inline -export function isNaN(value: T): bool { return value != value; } +export function isNaN(value: T): bool { + if (!isFloat()) { + if (!isInteger()) ERROR("numeric type expected"); + } + return value != value; +} -// @ts-ignore: decorator -@inline -export function isFinite(value: T): bool { - // @ts-ignore: type +export function isFinite(value: T): bool { + if (!isFloat()) { + if (!isInteger()) ERROR("numeric type expected"); + } return value - value == 0; } diff --git a/std/assembly/map.ts b/std/assembly/map.ts index c57658d84d..48dcb309a1 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -119,15 +119,18 @@ export class Map { entry = changetype>( changetype(entries) + this.entriesOffset++ * ENTRY_SIZE() ); - entry.key = key; - entry.value = value; + // link with the map (entry is unmanaged) + entry.key = isManaged() + ? LINK(key, this) + : key; + entry.value = isManaged() + ? LINK(value, this) + : value; ++this.entriesCount; // link with previous entry in bucket let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE; entry.taggedNext = load(bucketPtrBase); store(bucketPtrBase, changetype(entry)); - if (isManaged()) LINK(key, this); - if (isManaged()) LINK(value, this); } } diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index c932623038..f30d41db3a 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -137,10 +137,11 @@ function doRegister(ref: usize, classId: u32): usize { /** Links a registered object with the (registered) object now referencing it. */ // @ts-ignore: decorator @unsafe @inline -export function LINK(ref: T, parentRef: TParent): void { - if (!isReference()) ERROR("reference expected"); - if (!isReference()) ERROR("reference expected"); +export function LINK(ref: T, parentRef: TParent): T { + if (!isManaged()) ERROR("managed reference expected"); + if (!isManaged()) ERROR("managed reference expected"); doLink(changetype(ref), changetype(parentRef)); + return ref; } function doLink(ref: usize, parentRef: usize): void { diff --git a/std/assembly/set.ts b/std/assembly/set.ts index 804fa16e6a..991741ec52 100644 --- a/std/assembly/set.ts +++ b/std/assembly/set.ts @@ -88,11 +88,11 @@ export class Set { } has(key: K): bool { - return this.find(key, HASH(key)) !== null; + return this.find(key, HASH(key)) !== null; } add(key: K): void { - var hashCode = HASH(key); + var hashCode = HASH(key); var entry = this.find(key, hashCode); if (!entry) { // check if rehashing is necessary @@ -108,13 +108,15 @@ export class Set { entry = changetype>( changetype(entries) + this.entriesOffset++ * ENTRY_SIZE() ); - entry.key = key; + // link with the set itself (entry is unmanaged) + entry.key = isManaged() + ? LINK(key, this) + : key; ++this.entriesCount; // link with previous entry in bucket let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE; entry.taggedNext = load(bucketPtrBase); store(bucketPtrBase, changetype(entry)); - if (isManaged()) LINK(key, this); } } diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 139838f73c..d766661133 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -362,8 +362,12 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut charStr, load(changetype(this) + (i << 1)) ); - store(resultStart + (i << alignof()), REGISTER(charStr)); // result[i] = charStr - if (isManaged()) LINK(changetype(charStr), result); + // result[i] = charStr + store(resultStart + (i << alignof()), + isManaged() + ? LINK>(REGISTER(charStr), result) + : REGISTER(charStr) + ); } return result; } else if (!length) { diff --git a/std/assembly/util/number.ts b/std/assembly/util/number.ts index 1156f8a145..11278c70e3 100644 --- a/std/assembly/util/number.ts +++ b/std/assembly/util/number.ts @@ -620,8 +620,8 @@ export function dtoa_core(buffer: usize, value: f64): i32 { export function dtoa(value: f64): String { if (value == 0) return "0.0"; - if (!isFinite(value)) { - if (isNaN(value)) return "NaN"; + if (!isFinite(value)) { + if (isNaN(value)) return "NaN"; return select("-Infinity", "Infinity", value < 0); } var temp = ALLOCATE(MAX_DOUBLE_LENGTH << 1); @@ -681,8 +681,8 @@ export function dtoa_stream(buffer: usize, offset: usize, value: f64): u32 { store(buffer, CharCode._0, 4); return 3; } - if (!isFinite(value)) { - if (isNaN(value)) { + if (!isFinite(value)) { + if (isNaN(value)) { store(buffer, CharCode.N); store(buffer, CharCode.a, 2); store(buffer, CharCode.N, 4); diff --git a/tests/compiler/binary.optimized.wat b/tests/compiler/binary.optimized.wat index 1fc55b7bab..fa85b282c3 100644 --- a/tests/compiler/binary.optimized.wat +++ b/tests/compiler/binary.optimized.wat @@ -83,24 +83,24 @@ local.get $0 i32.reinterpret_f32 local.tee $1 + i32.const -2147483648 + i32.and + local.set $4 + local.get $1 i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $2 - local.get $1 - i32.const -2147483648 - i32.and - local.set $4 - local.get $2 + local.tee $2 i32.const 255 i32.eq local.tee $3 - if (result i32) - local.get $3 - else + i32.eqz + if i32.const 0 + local.set $3 end + local.get $3 if local.get $0 local.get $0 @@ -151,7 +151,7 @@ local.get $1 i32.const 8388608 i32.ge_u - if + if (result i32) local.get $1 i32.const 8388608 i32.eq @@ -159,9 +159,9 @@ local.get $1 i32.const 8388608 i32.sub - local.set $1 + else + local.get $1 end - local.get $1 i32.const 1 i32.shl local.set $1 @@ -254,29 +254,29 @@ (local $1 i64) (local $2 i64) (local $3 i64) - (local $4 i64) - (local $5 i32) + (local $4 i32) + (local $5 i64) local.get $0 i64.reinterpret_f64 local.tee $1 + i64.const 63 + i64.shr_u + local.set $5 + local.get $1 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $2 - local.get $1 - i64.const 63 - i64.shr_u - local.set $4 - local.get $2 + local.tee $2 i64.const 2047 i64.eq - local.tee $5 - if (result i32) - local.get $5 - else + local.tee $4 + i32.eqz + if i32.const 0 + local.set $4 end + local.get $4 if local.get $0 local.get $0 @@ -330,7 +330,7 @@ local.get $1 i64.const 4503599627370496 i64.ge_u - if + if (result i64) local.get $1 i64.const 4503599627370496 i64.eq @@ -338,9 +338,9 @@ local.get $1 i64.const 4503599627370496 i64.sub - local.set $1 + else + local.get $1 end - local.get $1 i64.const 1 i64.shl local.set $1 @@ -395,7 +395,7 @@ i64.add i64.shr_u end - local.get $4 + local.get $5 i64.const 63 i64.shl i64.or diff --git a/tests/compiler/binary.untouched.wat b/tests/compiler/binary.untouched.wat index d029b4474b..1952084715 100644 --- a/tests/compiler/binary.untouched.wat +++ b/tests/compiler/binary.untouched.wat @@ -2,7 +2,9 @@ (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$ddi (func (param f64 i32) (result f64))) (type $FUNCSIG$fff (func (param f32 f32) (result f32))) + (type $FUNCSIG$if (func (param f32) (result i32))) (type $FUNCSIG$ffi (func (param f32 i32) (result f32))) + (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$v (func)) (memory $0 0) (table $0 1 funcref) @@ -1195,7 +1197,12 @@ local.get $16 f64.mul ) - (func $~lib/math/NativeMathf.mod (; 2 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/builtins/isNaN (; 2 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + local.get $0 + local.get $0 + f32.ne + ) + (func $~lib/math/NativeMathf.mod (; 3 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1248,13 +1255,8 @@ local.get $8 else local.get $1 - local.set $9 - local.get $9 - local.get $9 - f32.ne + call $~lib/builtins/isNaN end - i32.const 0 - i32.ne if local.get $0 local.get $1 @@ -1451,7 +1453,7 @@ local.get $2 f32.reinterpret_i32 ) - (func $~lib/math/NativeMathf.scalbn (; 3 ;) (type $FUNCSIG$ffi) (param $0 f32) (param $1 i32) (result f32) + (func $~lib/math/NativeMathf.scalbn (; 4 ;) (type $FUNCSIG$ffi) (param $0 f32) (param $1 i32) (result f32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -1541,7 +1543,7 @@ f32.reinterpret_i32 f32.mul ) - (func $~lib/math/NativeMathf.pow (; 4 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.pow (; 5 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2479,7 +2481,12 @@ local.get $11 f32.mul ) - (func $~lib/math/NativeMath.mod (; 5 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/builtins/isNaN (; 6 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + local.get $0 + local.get $0 + f64.ne + ) + (func $~lib/math/NativeMath.mod (; 7 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -2532,13 +2539,8 @@ local.get $8 else local.get $1 - local.set $9 - local.get $9 - local.get $9 - f64.ne + call $~lib/builtins/isNaN end - i32.const 0 - i32.ne if local.get $0 local.get $1 @@ -2737,7 +2739,7 @@ local.get $2 f64.reinterpret_i64 ) - (func $start:binary (; 6 ;) (type $FUNCSIG$v) + (func $start:binary (; 8 ;) (type $FUNCSIG$v) global.get $binary/i i32.const 1 i32.lt_s @@ -3345,9 +3347,9 @@ call $~lib/math/NativeMath.pow global.set $binary/F ) - (func $start (; 7 ;) (type $FUNCSIG$v) + (func $start (; 9 ;) (type $FUNCSIG$v) call $start:binary ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 10 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/builtins.untouched.wat b/tests/compiler/builtins.untouched.wat index 61f4c7f32e..05cdea32a9 100644 --- a/tests/compiler/builtins.untouched.wat +++ b/tests/compiler/builtins.untouched.wat @@ -1,5 +1,7 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$if (func (param f32) (result i32))) + (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -54,16 +56,38 @@ (export "table" (table $0)) (export "test" (func $builtins/test)) (start $start) - (func $start:builtins~anonymous|0 (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/builtins/isNaN (; 1 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + local.get $0 + local.get $0 + f32.ne + ) + (func $~lib/builtins/isFinite (; 2 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.eq + ) + (func $~lib/builtins/isNaN (; 3 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + local.get $0 + local.get $0 + f64.ne + ) + (func $~lib/builtins/isFinite (; 4 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.eq + ) + (func $start:builtins~anonymous|0 (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $start:builtins (; 2 ;) (type $FUNCSIG$v) + (func $start:builtins (; 6 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i64) (local $3 i64) - (local $4 f32) - (local $5 f64) i32.const 1 i32.eqz if @@ -728,15 +752,8 @@ f32.const 1.25 f32.trunc drop - block $~lib/builtins/isNaN|inlined.0 (result i32) - f32.const 1.25 - local.set $4 - local.get $4 - local.get $4 - f32.ne - end - i32.const 0 - i32.ne + f32.const 1.25 + call $~lib/builtins/isNaN i32.const 0 i32.eq i32.eqz @@ -748,15 +765,8 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isNaN|inlined.1 (result i32) - f32.const nan:0x400000 - local.set $4 - local.get $4 - local.get $4 - f32.ne - end - i32.const 0 - i32.ne + f32.const nan:0x400000 + call $~lib/builtins/isNaN i32.const 1 i32.eq i32.eqz @@ -768,17 +778,8 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isFinite|inlined.0 (result i32) - f32.const 1.25 - local.set $4 - local.get $4 - local.get $4 - f32.sub - f32.const 0 - f32.eq - end - i32.const 0 - i32.ne + f32.const 1.25 + call $~lib/builtins/isFinite i32.const 1 i32.eq i32.eqz @@ -790,17 +791,8 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isFinite|inlined.1 (result i32) - f32.const inf - local.set $4 - local.get $4 - local.get $4 - f32.sub - f32.const 0 - f32.eq - end - i32.const 0 - i32.ne + f32.const inf + call $~lib/builtins/isFinite i32.const 0 i32.eq i32.eqz @@ -812,18 +804,9 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isFinite|inlined.2 (result i32) - f32.const inf - f32.neg - local.set $4 - local.get $4 - local.get $4 - f32.sub - f32.const 0 - f32.eq - end - i32.const 0 - i32.ne + f32.const inf + f32.neg + call $~lib/builtins/isFinite i32.const 0 i32.eq i32.eqz @@ -835,17 +818,8 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isFinite|inlined.3 (result i32) - f32.const nan:0x400000 - local.set $4 - local.get $4 - local.get $4 - f32.sub - f32.const 0 - f32.eq - end - i32.const 0 - i32.ne + f32.const nan:0x400000 + call $~lib/builtins/isFinite i32.const 0 i32.eq i32.eqz @@ -891,27 +865,11 @@ f32.const 1.25 f32.trunc global.set $builtins/f - block $~lib/builtins/isNaN|inlined.2 (result i32) - f32.const 1.25 - local.set $4 - local.get $4 - local.get $4 - f32.ne - end - i32.const 0 - i32.ne + f32.const 1.25 + call $~lib/builtins/isNaN global.set $builtins/b - block $~lib/builtins/isFinite|inlined.4 (result i32) - f32.const 1.25 - local.set $4 - local.get $4 - local.get $4 - f32.sub - f32.const 0 - f32.eq - end - i32.const 0 - i32.ne + f32.const 1.25 + call $~lib/builtins/isFinite global.set $builtins/b f64.const nan:0x8000000000000 drop @@ -951,15 +909,8 @@ f64.const 1.25 f64.trunc drop - block $~lib/builtins/isNaN|inlined.0 (result i32) - f64.const 1.25 - local.set $5 - local.get $5 - local.get $5 - f64.ne - end - i32.const 0 - i32.ne + f64.const 1.25 + call $~lib/builtins/isNaN i32.const 0 i32.eq i32.eqz @@ -971,15 +922,8 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isNaN|inlined.1 (result i32) - f64.const nan:0x8000000000000 - local.set $5 - local.get $5 - local.get $5 - f64.ne - end - i32.const 0 - i32.ne + f64.const nan:0x8000000000000 + call $~lib/builtins/isNaN i32.const 1 i32.eq i32.eqz @@ -991,17 +935,8 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isFinite|inlined.0 (result i32) - f64.const 1.25 - local.set $5 - local.get $5 - local.get $5 - f64.sub - f64.const 0 - f64.eq - end - i32.const 0 - i32.ne + f64.const 1.25 + call $~lib/builtins/isFinite i32.const 1 i32.eq i32.eqz @@ -1013,17 +948,8 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isFinite|inlined.1 (result i32) - f64.const inf - local.set $5 - local.get $5 - local.get $5 - f64.sub - f64.const 0 - f64.eq - end - i32.const 0 - i32.ne + f64.const inf + call $~lib/builtins/isFinite i32.const 0 i32.eq i32.eqz @@ -1035,18 +961,9 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isFinite|inlined.2 (result i32) - f64.const inf - f64.neg - local.set $5 - local.get $5 - local.get $5 - f64.sub - f64.const 0 - f64.eq - end - i32.const 0 - i32.ne + f64.const inf + f64.neg + call $~lib/builtins/isFinite i32.const 0 i32.eq i32.eqz @@ -1058,17 +975,8 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isFinite|inlined.3 (result i32) - f64.const nan:0x8000000000000 - local.set $5 - local.get $5 - local.get $5 - f64.sub - f64.const 0 - f64.eq - end - i32.const 0 - i32.ne + f64.const nan:0x8000000000000 + call $~lib/builtins/isFinite i32.const 0 i32.eq i32.eqz @@ -1114,27 +1022,11 @@ f64.const 1.25 f64.trunc global.set $builtins/F - block $~lib/builtins/isNaN|inlined.2 (result i32) - f64.const 1.25 - local.set $5 - local.get $5 - local.get $5 - f64.ne - end - i32.const 0 - i32.ne + f64.const 1.25 + call $~lib/builtins/isNaN global.set $builtins/b - block $~lib/builtins/isFinite|inlined.4 (result i32) - f64.const 1.25 - local.set $5 - local.get $5 - local.get $5 - f64.sub - f64.const 0 - f64.eq - end - i32.const 0 - i32.ne + f64.const 1.25 + call $~lib/builtins/isFinite global.set $builtins/b i32.const 8 i32.load @@ -1664,15 +1556,8 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isNaN|inlined.3 (result i32) - f32.const nan:0x400000 - local.set $4 - local.get $4 - local.get $4 - f32.ne - end - i32.const 0 - i32.ne + f32.const nan:0x400000 + call $~lib/builtins/isNaN i32.eqz if i32.const 0 @@ -1682,15 +1567,8 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isNaN|inlined.3 (result i32) - f64.const nan:0x8000000000000 - local.set $5 - local.get $5 - local.get $5 - f64.ne - end - i32.const 0 - i32.ne + f64.const nan:0x8000000000000 + call $~lib/builtins/isNaN i32.eqz if i32.const 0 @@ -1700,17 +1578,8 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isFinite|inlined.5 (result i32) - f32.const nan:0x400000 - local.set $4 - local.get $4 - local.get $4 - f32.sub - f32.const 0 - f32.eq - end - i32.const 0 - i32.ne + f32.const nan:0x400000 + call $~lib/builtins/isFinite i32.eqz i32.eqz if @@ -1721,17 +1590,8 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isFinite|inlined.6 (result i32) - f32.const inf - local.set $4 - local.get $4 - local.get $4 - f32.sub - f32.const 0 - f32.eq - end - i32.const 0 - i32.ne + f32.const inf + call $~lib/builtins/isFinite i32.eqz i32.eqz if @@ -1742,17 +1602,8 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isFinite|inlined.5 (result i32) - f64.const nan:0x8000000000000 - local.set $5 - local.get $5 - local.get $5 - f64.sub - f64.const 0 - f64.eq - end - i32.const 0 - i32.ne + f64.const nan:0x8000000000000 + call $~lib/builtins/isFinite i32.eqz i32.eqz if @@ -1763,17 +1614,8 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isFinite|inlined.6 (result i32) - f64.const inf - local.set $5 - local.get $5 - local.get $5 - f64.sub - f64.const 0 - f64.eq - end - i32.const 0 - i32.ne + f64.const inf + call $~lib/builtins/isFinite i32.eqz i32.eqz if @@ -1784,17 +1626,8 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isFinite|inlined.7 (result i32) - f32.const 0 - local.set $4 - local.get $4 - local.get $4 - f32.sub - f32.const 0 - f32.eq - end - i32.const 0 - i32.ne + f32.const 0 + call $~lib/builtins/isFinite i32.eqz if i32.const 0 @@ -1804,17 +1637,8 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isFinite|inlined.7 (result i32) - f64.const 0 - local.set $5 - local.get $5 - local.get $5 - f64.sub - f64.const 0 - f64.eq - end - i32.const 0 - i32.ne + f64.const 0 + call $~lib/builtins/isFinite i32.eqz if i32.const 0 @@ -2391,21 +2215,16 @@ f64.const 1 f64.trunc drop - block $~lib/builtins/isNaN|inlined.4 (result i32) - f64.const 1 - local.set $5 - local.get $5 - local.get $5 - f64.ne - end + f64.const 1 + call $~lib/builtins/isNaN drop ) - (func $builtins/test (; 3 ;) (type $FUNCSIG$v) + (func $builtins/test (; 7 ;) (type $FUNCSIG$v) nop ) - (func $start (; 4 ;) (type $FUNCSIG$v) + (func $start (; 8 ;) (type $FUNCSIG$v) call $start:builtins ) - (func $null (; 5 ;) (type $FUNCSIG$v) + (func $null (; 9 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 0ad4a80034..c6b381100b 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -106,7 +106,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -120,7 +120,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index c9ce533705..d20fa9682e 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -145,7 +145,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -160,7 +160,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index 98c0a13f5e..62ed911391 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -116,7 +116,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -130,7 +130,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index 000ac7d8a7..87791bf47a 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -155,7 +155,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -170,7 +170,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index 35b75ab2a6..ae4c975d71 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -145,7 +145,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 9c3e2d56dd..d31780812b 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -197,7 +197,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -212,7 +212,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index e35e6b1de8..e9582f39ab 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -85,7 +85,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -99,7 +99,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index f7e0305258..25ed4620d7 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -147,7 +147,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -162,7 +162,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index 97b00f42cd..ea75033460 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 48 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -145,7 +145,7 @@ if i32.const 0 i32.const 48 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 2a270c2600..c109fa0ee8 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -411,7 +411,7 @@ if i32.const 0 i32.const 48 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -426,7 +426,7 @@ if i32.const 0 i32.const 48 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/new-without-allocator.untouched.wat b/tests/compiler/new-without-allocator.untouched.wat index 67b603f01c..8536842a39 100644 --- a/tests/compiler/new-without-allocator.untouched.wat +++ b/tests/compiler/new-without-allocator.untouched.wat @@ -61,7 +61,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -76,7 +76,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 3dd9e1065f..371c950dd8 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -302,7 +302,7 @@ if i32.const 0 i32.const 464 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -316,7 +316,7 @@ if i32.const 0 i32.const 464 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index c248e7f24b..3e29c6ccb3 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -399,7 +399,7 @@ if i32.const 0 i32.const 464 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -414,7 +414,7 @@ if i32.const 0 i32.const 464 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable @@ -3609,7 +3609,12 @@ i32.const 1792 end ) - (func $~lib/number/F32.isSafeInteger (; 27 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 27 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + local.get $0 + local.get $0 + f32.ne + ) + (func $~lib/number/F32.isSafeInteger (; 28 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) (local $1 i32) local.get $0 f32.abs @@ -3625,31 +3630,28 @@ local.get $1 end ) - (func $~lib/number/F32.isInteger (; 28 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) - (local $1 f32) - (local $2 i32) - block $~lib/builtins/isFinite|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - local.get $1 - f32.sub - f32.const 0 - f32.eq - end - local.tee $2 - i32.const 0 - i32.ne + (func $~lib/builtins/isFinite (; 29 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.eq + ) + (func $~lib/number/F32.isInteger (; 30 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/builtins/isFinite + local.tee $1 if (result i32) local.get $0 f32.trunc local.get $0 f32.eq else - local.get $2 + local.get $1 end ) - (func $~lib/number/F64.isSafeInteger (; 29 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/number/F64.isSafeInteger (; 31 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) local.get $0 f64.abs @@ -3665,34 +3667,22 @@ local.get $1 end ) - (func $~lib/number/F64.isInteger (; 30 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) - (local $1 f64) - (local $2 i32) - block $~lib/builtins/isFinite|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - end - local.tee $2 - i32.const 0 - i32.ne + (func $~lib/number/F64.isInteger (; 32 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (local $1 i32) + local.get $0 + call $~lib/builtins/isFinite + local.tee $1 if (result i32) local.get $0 f64.trunc local.get $0 f64.eq else - local.get $2 + local.get $1 end ) - (func $start:number (; 31 ;) (type $FUNCSIG$v) + (func $start:number (; 33 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 f32) - (local $2 f64) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -3874,15 +3864,8 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isNaN|inlined.0 (result i32) - global.get $~lib/number/F32.NaN - local.set $1 - local.get $1 - local.get $1 - f32.ne - end - i32.const 0 - i32.ne + global.get $~lib/number/F32.NaN + call $~lib/builtins/isNaN i32.eqz if i32.const 0 @@ -4015,8 +3998,6 @@ end f32.const 0 call $~lib/number/F32.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz @@ -4030,8 +4011,6 @@ end f32.const -0 call $~lib/number/F32.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz @@ -4046,8 +4025,6 @@ f32.const nan:0x400000 call $~lib/number/F32.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if @@ -4061,8 +4038,6 @@ f32.const inf call $~lib/number/F32.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if @@ -4076,8 +4051,6 @@ global.get $~lib/builtins/f32.EPSILON call $~lib/number/F32.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if @@ -4090,8 +4063,6 @@ end f32.const 1 call $~lib/number/F32.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz @@ -4105,8 +4076,6 @@ end f32.const -1 call $~lib/number/F32.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz @@ -4120,8 +4089,6 @@ end global.get $~lib/builtins/f32.MIN_SAFE_INTEGER call $~lib/number/F32.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz @@ -4135,8 +4102,6 @@ end global.get $~lib/builtins/f32.MAX_SAFE_INTEGER call $~lib/number/F32.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz @@ -4151,8 +4116,6 @@ f32.const 0.5 call $~lib/number/F32.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if @@ -4166,8 +4129,6 @@ f32.const -1.5 call $~lib/number/F32.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if @@ -4178,15 +4139,8 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isNaN|inlined.0 (result i32) - global.get $~lib/number/F64.NaN - local.set $2 - local.get $2 - local.get $2 - f64.ne - end - i32.const 0 - i32.ne + global.get $~lib/number/F64.NaN + call $~lib/builtins/isNaN i32.eqz if i32.const 0 @@ -4319,8 +4273,6 @@ end f64.const 0 call $~lib/number/F64.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz @@ -4334,8 +4286,6 @@ end f64.const -0 call $~lib/number/F64.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz @@ -4350,8 +4300,6 @@ f64.const nan:0x8000000000000 call $~lib/number/F64.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if @@ -4365,8 +4313,6 @@ f64.const inf call $~lib/number/F64.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if @@ -4380,8 +4326,6 @@ global.get $~lib/builtins/f64.EPSILON call $~lib/number/F64.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if @@ -4394,8 +4338,6 @@ end f64.const 1 call $~lib/number/F64.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz @@ -4409,8 +4351,6 @@ end f64.const -1 call $~lib/number/F64.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz @@ -4424,8 +4364,6 @@ end global.get $~lib/builtins/f64.MIN_SAFE_INTEGER call $~lib/number/F64.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz @@ -4439,8 +4377,6 @@ end global.get $~lib/builtins/f64.MAX_SAFE_INTEGER call $~lib/number/F64.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz @@ -4455,8 +4391,6 @@ f64.const 0.5 call $~lib/number/F64.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if @@ -4470,8 +4404,6 @@ f64.const -1.5 call $~lib/number/F64.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if @@ -4483,9 +4415,9 @@ unreachable end ) - (func $start (; 32 ;) (type $FUNCSIG$v) + (func $start (; 34 ;) (type $FUNCSIG$v) call $start:number ) - (func $null (; 33 ;) (type $FUNCSIG$v) + (func $null (; 35 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index 0f616e2091..d61d498517 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -106,7 +106,7 @@ if i32.const 0 i32.const 48 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -120,7 +120,7 @@ if i32.const 0 i32.const 48 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index 94d788e821..dde2789c27 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -147,7 +147,7 @@ if i32.const 0 i32.const 48 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -162,7 +162,7 @@ if i32.const 0 i32.const 48 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 7809fc3399..bd858688dc 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -114,7 +114,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index f5a70edba2..c2ce724f2e 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -154,7 +154,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -169,7 +169,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index e5b3bd8efd..e9f3794f8d 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -2,7 +2,6 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) @@ -375,1406 +374,124 @@ if i32.const 0 i32.const 224 - i32.const 191 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 8 - i32.sub - i32.load - i32.const -1520547049 - i32.ne - if - i32.const 0 - i32.const 224 - i32.const 192 - i32.const 2 - call $~lib/env/abort - unreachable - end - ) - (func $~lib/runtime/doRegister (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 8 - i32.sub - local.get $1 - i32.store - local.get $0 - ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 264 - i32.const 24 - i32.const 43 - call $~lib/env/abort - unreachable - end - local.get $0 - call $~lib/runtime/doAllocate - local.tee $1 - local.get $0 - call $~lib/memory/memory.fill - local.get $1 - i32.const 1 - call $~lib/runtime/doRegister - ) - (func $~lib/runtime/ArrayBufferView#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - i32.const 3 - i32.const 1073741816 - local.get $1 - i32.shr_u - i32.gt_u - if - i32.const 0 - i32.const 224 - i32.const 226 - i32.const 57 - call $~lib/env/abort - unreachable - end - i32.const 3 - local.get $1 - i32.shl - local.tee $2 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/runtime/doAllocate - i32.const 5 - call $~lib/runtime/doRegister - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 - local.get $2 - i32.store offset=8 - local.get $0 - ) - (func $~lib/util/memory/memcpy (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $continue|0 - local.get $1 - i32.const 3 - i32.and - local.get $2 - local.get $2 - select - if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - local.get $0 - i32.const 3 - i32.and - local.tee $3 - i32.const 1 - i32.ne - if - local.get $3 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $3 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - local.tee $3 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $1 - local.set $0 - local.get $1 - local.get $3 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 13 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 15 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - local.tee $3 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $1 - local.set $0 - local.get $1 - local.get $3 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - local.tee $3 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $1 - local.set $0 - local.get $1 - local.get $3 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - local.tee $3 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $1 - local.set $0 - local.get $1 - local.get $3 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - local.set $3 - end - local.get $3 - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 - end - end - end - loop $continue|2 - local.get $2 - if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|3 - end - end - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - br $continue|4 - end - end - end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end + i32.const 192 + i32.const 2 + call $~lib/env/abort + unreachable end - ) - (func $~lib/runtime/doReallocate (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 i32.const 8 i32.sub - local.tee $3 - i32.load offset=4 - local.tee $2 - local.get $1 - i32.lt_u + i32.load + i32.const -1520547049 + i32.ne 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 304 - i32.gt_u - select - i32.const 1 - i32.const 32 - local.get $1 - i32.const 7 - i32.add - i32.clz - i32.sub - i32.shl - local.tee $4 - i32.lt_u - if - local.get $4 - call $~lib/memory/memory.allocate - local.tee $4 - local.get $3 - i32.load - i32.store - local.get $4 - i32.const 8 - i32.add - local.tee $5 - local.get $0 - local.get $2 - call $~lib/memory/memory.copy - local.get $2 - local.get $5 - i32.add - local.get $1 - local.get $2 - i32.sub - call $~lib/memory/memory.fill - local.get $3 - i32.load - i32.const -1520547049 - i32.eq - if - local.get $0 - i32.const 304 - i32.le_u - if - i32.const 0 - i32.const 224 - i32.const 100 - i32.const 8 - call $~lib/env/abort - unreachable - end - end - local.get $4 - local.set $3 - local.get $5 - local.set $0 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.sub - call $~lib/memory/memory.fill - end + i32.const 224 + i32.const 193 + i32.const 2 + call $~lib/env/abort + unreachable end - local.get $3 + ) + (func $~lib/runtime/doRegister (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + i32.const 8 + i32.sub local.get $1 - i32.store offset=4 + i32.store local.get $0 ) - (func $~lib/array/ensureCapacity (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 - i32.load offset=8 - local.get $2 - i32.shr_u + i32.const 1073741816 i32.gt_u if - local.get $1 - i32.const 1073741816 - local.get $2 - i32.shr_u - i32.gt_u - if - i32.const 0 - i32.const 104 - i32.const 10 - i32.const 64 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load - local.tee $3 - local.get $1 - local.get $2 - i32.shl - local.tee $2 - call $~lib/runtime/doReallocate - local.set $1 - local.get $1 - local.get $3 - i32.ne - if - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.get $2 - i32.store offset=8 + i32.const 0 + i32.const 264 + i32.const 24 + i32.const 43 + call $~lib/env/abort + unreachable end - ) - (func $~lib/array/Array#__set (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 + call $~lib/runtime/doAllocate + local.tee $1 + local.get $0 + call $~lib/memory/memory.fill local.get $1 i32.const 1 - i32.add - i32.const 0 - call $~lib/array/ensureCapacity + call $~lib/runtime/doRegister + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + i32.const 3 + i32.const 1073741816 local.get $1 - local.get $0 - i32.load offset=4 - i32.add - local.get $2 - i32.store8 + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 224 + i32.const 227 + i32.const 57 + call $~lib/env/abort + unreachable + end + i32.const 3 local.get $1 + i32.shl + local.tee $2 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 local.get $0 - i32.load offset=12 - i32.ge_s + i32.eqz if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=12 + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 5 + call $~lib/runtime/doRegister + local.set $0 end - ) - (func $~lib/array/Array#__set (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - call $~lib/array/ensureCapacity + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 local.get $0 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 i32.store + local.get $0 local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 local.get $0 - i32.load offset=12 - i32.ge_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=12 - end ) - (func $std/array-literal/Ref#constructor (; 16 ;) (type $FUNCSIG$i) (result i32) + (func $std/array-literal/Ref#constructor (; 10 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/doAllocate i32.const 6 call $~lib/runtime/doRegister ) - (func $std/array-literal/RefWithCtor#constructor (; 17 ;) (type $FUNCSIG$i) (result i32) + (func $std/array-literal/RefWithCtor#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/doAllocate i32.const 8 call $~lib/runtime/doRegister ) - (func $start:std/array-literal (; 18 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 12 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) + (local $2 i32) i32.const 44 i32.load i32.const 3 @@ -1900,25 +617,26 @@ i32.const 3 i32.store offset=12 local.get $0 - i32.const 0 - global.get $std/array-literal/i - call $~lib/array/Array#__set + i32.load offset=4 + local.tee $1 global.get $std/array-literal/i + local.tee $2 + i32.store8 + local.get $2 i32.const 1 i32.add global.set $std/array-literal/i - local.get $0 - i32.const 1 - global.get $std/array-literal/i - call $~lib/array/Array#__set + local.get $1 global.get $std/array-literal/i + local.tee $2 + i32.store8 offset=1 + local.get $2 i32.const 1 i32.add global.set $std/array-literal/i - local.get $0 - i32.const 2 + local.get $1 global.get $std/array-literal/i - call $~lib/array/Array#__set + i32.store8 offset=2 local.get $0 global.set $std/array-literal/dynamicArrayI8 global.get $std/array-literal/dynamicArrayI8 @@ -1978,33 +696,34 @@ call $~lib/runtime/doRegister i32.const 2 call $~lib/runtime/ArrayBufferView#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.store offset=12 - local.get $0 + local.get $1 i32.const 3 i32.store offset=12 - local.get $0 - i32.const 0 - global.get $std/array-literal/i - call $~lib/array/Array#__set + local.get $1 + i32.load offset=4 + local.tee $0 global.get $std/array-literal/i + local.tee $2 + i32.store + local.get $2 i32.const 1 i32.add global.set $std/array-literal/i local.get $0 - i32.const 1 - global.get $std/array-literal/i - call $~lib/array/Array#__set global.get $std/array-literal/i + local.tee $2 + i32.store offset=4 + local.get $2 i32.const 1 i32.add global.set $std/array-literal/i local.get $0 - i32.const 2 global.get $std/array-literal/i - call $~lib/array/Array#__set - local.get $0 + i32.store offset=8 + local.get $1 global.set $std/array-literal/dynamicArrayI32 global.get $std/array-literal/dynamicArrayI32 i32.load offset=12 @@ -2068,17 +787,16 @@ i32.const 3 i32.store offset=12 local.get $0 - i32.const 0 + i32.load offset=4 + local.tee $1 call $std/array-literal/Ref#constructor - call $~lib/array/Array#__set - local.get $0 - i32.const 1 + i32.store + local.get $1 call $std/array-literal/Ref#constructor - call $~lib/array/Array#__set - local.get $0 - i32.const 2 + i32.store offset=4 + local.get $1 call $std/array-literal/Ref#constructor - call $~lib/array/Array#__set + i32.store offset=8 local.get $0 global.set $std/array-literal/dynamicArrayRef global.get $std/array-literal/dynamicArrayRef @@ -2099,25 +817,24 @@ call $~lib/runtime/doRegister i32.const 2 call $~lib/runtime/ArrayBufferView#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.store offset=12 - local.get $0 + local.get $1 i32.const 3 i32.store offset=12 - local.get $0 - i32.const 0 + local.get $1 + i32.load offset=4 + local.tee $0 call $std/array-literal/RefWithCtor#constructor - call $~lib/array/Array#__set + i32.store local.get $0 - i32.const 1 call $std/array-literal/RefWithCtor#constructor - call $~lib/array/Array#__set + i32.store offset=4 local.get $0 - i32.const 2 call $std/array-literal/RefWithCtor#constructor - call $~lib/array/Array#__set - local.get $0 + i32.store offset=8 + local.get $1 global.set $std/array-literal/dynamicArrayRefWithCtor global.get $std/array-literal/dynamicArrayRefWithCtor i32.load offset=12 @@ -2132,10 +849,10 @@ unreachable end ) - (func $start (; 19 ;) (type $FUNCSIG$v) + (func $start (; 13 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 20 ;) (type $FUNCSIG$v) + (func $null (; 14 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index dcba2a8f16..ed722563aa 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -470,7 +470,7 @@ if i32.const 0 i32.const 224 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -485,7 +485,7 @@ if i32.const 0 i32.const 224 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable @@ -508,1737 +508,95 @@ global.get $~lib/runtime/MAX_BYTELENGTH i32.gt_u if - i32.const 0 - i32.const 264 - i32.const 24 - i32.const 43 - call $~lib/env/abort - unreachable - end - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - local.get $1 - local.set $2 - local.get $2 - call $~lib/runtime/doAllocate - end - local.set $3 - local.get $3 - i32.const 0 - local.get $1 - call $~lib/memory/memory.fill - block $~lib/runtime/REGISTER|inlined.0 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.const 1 - call $~lib/runtime/doRegister - end - ) - (func $~lib/runtime/ALLOCATE (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/ArrayBufferView#constructor (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH - local.get $2 - i32.shr_u - i32.gt_u - if - i32.const 0 - i32.const 224 - i32.const 226 - i32.const 57 - call $~lib/env/abort - unreachable - end - i32.const 0 - local.get $1 - local.get $2 - i32.shl - local.tee $1 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 12 - call $~lib/runtime/ALLOCATE - local.set $4 - local.get $4 - i32.const 5 - call $~lib/runtime/doRegister - end - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - end - local.get $3 - i32.store - local.get $0 - local.get $3 - i32.store offset=4 - local.get $0 - local.get $1 - i32.store offset=8 - local.get $0 - ) - (func $~lib/array/Array#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - if (result i32) - local.get $0 - else - i32.const 16 - call $~lib/runtime/ALLOCATE - local.set $2 - local.get $2 - i32.const 2 - call $~lib/runtime/doRegister - end - local.get $1 - i32.const 0 - call $~lib/runtime/ArrayBufferView#constructor - local.set $0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - local.get $1 - i32.store offset=12 - local.get $0 - ) - (func $~lib/util/memory/memcpy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - end - i32.load8_u - i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - br $continue|1 - end - end - end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|2 - end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - end - br $continue|3 - end - end - end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 - end - end - end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - end - end - ) - (func $~lib/memory/memory.free (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - local.set $1 - ) - (func $~lib/runtime/doReallocate (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - local.set $2 - local.get $2 - i32.load offset=4 - local.set $3 - local.get $3 - local.get $1 - i32.lt_u - if - local.get $1 - call $~lib/runtime/ADJUSTOBLOCK - local.set $4 - local.get $3 - call $~lib/runtime/ADJUSTOBLOCK - i32.const 0 - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.gt_u - select - local.get $4 - i32.lt_u - if - local.get $4 - call $~lib/memory/memory.allocate - local.set $5 - local.get $5 - local.get $2 - i32.load - i32.store - local.get $5 - global.get $~lib/runtime/HEADER_SIZE - i32.add - local.set $6 - local.get $6 - local.get $0 - local.get $3 - call $~lib/memory/memory.copy - local.get $6 - local.get $3 - i32.add - i32.const 0 - local.get $1 - local.get $3 - i32.sub - call $~lib/memory/memory.fill - local.get $2 - i32.load - global.get $~lib/runtime/HEADER_MAGIC - i32.eq - if - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 224 - i32.const 100 - i32.const 8 - call $~lib/env/abort - unreachable - end - local.get $2 - call $~lib/memory/memory.free - else - nop - end - local.get $5 - local.set $2 - local.get $6 - local.set $0 - else - local.get $0 - local.get $3 - i32.add - i32.const 0 - local.get $1 - local.get $3 - i32.sub - call $~lib/memory/memory.fill - end - else - nop + i32.const 0 + i32.const 264 + i32.const 24 + i32.const 43 + call $~lib/env/abort + unreachable end - local.get $2 + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end + local.set $3 + local.get $3 + i32.const 0 local.get $1 - i32.store offset=4 + call $~lib/memory/memory.fill + block $~lib/runtime/REGISTER|inlined.0 (result i32) + local.get $3 + local.set $2 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister + end + ) + (func $~lib/runtime/ALLOCATE (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + call $~lib/runtime/doAllocate ) - (func $~lib/array/ensureCapacity (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 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 $4 i32) - (local $5 i32) - (local $6 i32) local.get $1 - local.get $0 - i32.load offset=8 + global.get $~lib/runtime/MAX_BYTELENGTH local.get $2 i32.shr_u i32.gt_u if - local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH - local.get $2 - i32.shr_u - i32.gt_u - if - i32.const 0 - i32.const 104 - i32.const 10 - i32.const 64 - call $~lib/env/abort - unreachable - end + i32.const 0 + i32.const 224 + i32.const 227 + i32.const 57 + call $~lib/env/abort + unreachable + end + i32.const 0 + local.get $1 + local.get $2 + i32.shl + local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $3 + block (result i32) local.get $0 - i32.load - local.set $3 - local.get $1 - local.get $2 - i32.shl - local.set $4 - block $~lib/runtime/REALLOCATE|inlined.0 (result i32) - local.get $3 - local.set $5 - local.get $4 - local.set $6 - local.get $5 - local.get $6 - call $~lib/runtime/doReallocate - end - local.set $6 - local.get $6 - local.get $3 - i32.ne + i32.eqz if - local.get $0 - local.get $6 - i32.store - local.get $0 - local.get $6 - i32.store offset=4 + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $4 + local.get $4 + i32.const 5 + call $~lib/runtime/doRegister + end + local.set $0 end local.get $0 - local.get $4 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 i32.store offset=8 + local.get $0 end - ) - (func $~lib/array/Array#__set (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $3 + i32.store local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 0 - call $~lib/array/ensureCapacity + local.get $3 + i32.store offset=4 local.get $0 - i32.load offset=4 - local.get $1 - i32.const 0 - i32.shl - i32.add - local.get $2 - i32.store8 local.get $1 + i32.store offset=8 local.get $0 - i32.load offset=12 - i32.ge_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=12 - end ) - (func $~lib/array/Array#constructor (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -2248,11 +606,11 @@ call $~lib/runtime/ALLOCATE local.set $2 local.get $2 - i32.const 4 + i32.const 2 call $~lib/runtime/doRegister end local.get $1 - i32.const 2 + i32.const 0 call $~lib/runtime/ArrayBufferView#constructor local.set $0 local.get $0 @@ -2263,34 +621,32 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#__set (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 4 + call $~lib/runtime/doRegister + end local.get $1 - i32.const 1 - i32.add i32.const 2 - call $~lib/array/ensureCapacity + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store local.get $1 + i32.store offset=12 local.get $0 - i32.load offset=12 - i32.ge_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=12 - end ) - (func $std/array-literal/Ref#constructor (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/Ref#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -2307,7 +663,7 @@ end local.get $0 ) - (func $~lib/array/Array#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -2332,38 +688,11 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#__set (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - call $~lib/array/ensureCapacity - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=12 - end - ) - (func $~lib/array/Array#get:length (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/array-literal/RefWithCtor#constructor (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/RefWithCtor#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -2380,7 +709,7 @@ end local.get $0 ) - (func $~lib/array/Array#constructor (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -2405,42 +734,13 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#__set (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - call $~lib/array/ensureCapacity - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=12 - end - ) - (func $~lib/array/Array#get:length (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $start:std/array-literal (; 31 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 22 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) global.get $std/array-literal/staticArrayI8 call $~lib/array/Array#get:length i32.const 3 @@ -2580,11 +880,12 @@ call $~lib/array/Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 + local.set $1 + local.get $1 global.get $std/array-literal/i - call $~lib/array/Array#__set - local.get $0 - i32.const 1 + i32.store8 + local.get $1 block (result i32) global.get $std/array-literal/i i32.const 1 @@ -2592,9 +893,8 @@ global.set $std/array-literal/i global.get $std/array-literal/i end - call $~lib/array/Array#__set - local.get $0 - i32.const 2 + i32.store8 offset=1 + local.get $1 block (result i32) global.get $std/array-literal/i i32.const 1 @@ -2602,7 +902,7 @@ global.set $std/array-literal/i global.get $std/array-literal/i end - call $~lib/array/Array#__set + i32.store8 offset=2 local.get $0 end global.set $std/array-literal/dynamicArrayI8 @@ -2669,11 +969,12 @@ call $~lib/array/Array#constructor local.set $1 local.get $1 - i32.const 0 + i32.load offset=4 + local.set $0 + local.get $0 global.get $std/array-literal/i - call $~lib/array/Array#__set - local.get $1 - i32.const 1 + i32.store + local.get $0 block (result i32) global.get $std/array-literal/i i32.const 1 @@ -2681,9 +982,8 @@ global.set $std/array-literal/i global.get $std/array-literal/i end - call $~lib/array/Array#__set - local.get $1 - i32.const 2 + i32.store offset=4 + local.get $0 block (result i32) global.get $std/array-literal/i i32.const 1 @@ -2691,7 +991,7 @@ global.set $std/array-literal/i global.get $std/array-literal/i end - call $~lib/array/Array#__set + i32.store offset=8 local.get $1 end global.set $std/array-literal/dynamicArrayI32 @@ -2754,23 +1054,23 @@ i32.const 0 i32.const 3 call $~lib/array/Array#constructor - local.set $2 - local.get $2 - i32.const 0 + local.set $0 + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 i32.const 0 call $std/array-literal/Ref#constructor - call $~lib/array/Array#__set - local.get $2 - i32.const 1 + i32.store + local.get $1 i32.const 0 call $std/array-literal/Ref#constructor - call $~lib/array/Array#__set - local.get $2 - i32.const 2 + i32.store offset=4 + local.get $1 i32.const 0 call $std/array-literal/Ref#constructor - call $~lib/array/Array#__set - local.get $2 + i32.store offset=8 + local.get $0 end global.set $std/array-literal/dynamicArrayRef global.get $std/array-literal/dynamicArrayRef @@ -2790,23 +1090,23 @@ i32.const 0 i32.const 3 call $~lib/array/Array#constructor - local.set $3 - local.get $3 - i32.const 0 + local.set $1 + local.get $1 + i32.load offset=4 + local.set $0 + local.get $0 i32.const 0 call $std/array-literal/RefWithCtor#constructor - call $~lib/array/Array#__set - local.get $3 - i32.const 1 + i32.store + local.get $0 i32.const 0 call $std/array-literal/RefWithCtor#constructor - call $~lib/array/Array#__set - local.get $3 - i32.const 2 + i32.store offset=4 + local.get $0 i32.const 0 call $std/array-literal/RefWithCtor#constructor - call $~lib/array/Array#__set - local.get $3 + i32.store offset=8 + local.get $1 end global.set $std/array-literal/dynamicArrayRefWithCtor global.get $std/array-literal/dynamicArrayRefWithCtor @@ -2823,9 +1123,9 @@ unreachable end ) - (func $start (; 32 ;) (type $FUNCSIG$v) + (func $start (; 23 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 33 ;) (type $FUNCSIG$v) + (func $null (; 24 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 7a6281cd22..5251bf5efd 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -216,11 +216,16 @@ (data (i32.const 6296) "\02\00\00\00\10\00\00\00\c8\15\00\00h\18\00\00\00\00\00\00x\18") (data (i32.const 6320) "\01\00\00\00\0c\00\00\001\00,\002\00,\00,\004") (data (i32.const 6344) "\02\00\00\00\08\00\00\00\01\00\00\00\02") - (data (i32.const 6360) "\02\00\00\00\08\00\00\00\03\00\00\00\04") - (data (i32.const 6376) "\01\00\00\00\0e\00\00\001\00,\002\00,\003\00,\004") - (data (i32.const 6400) "\02\00\00\00\02\00\00\00\01\02") - (data (i32.const 6416) "\02\00\00\00\02\00\00\00\03\04") - (data (i32.const 6432) "\02\00\00\00\04\00\00\00\01") + (data (i32.const 6360) "\02\00\00\00\08\00\00\00\01\00\00\00\02") + (data (i32.const 6376) "\02\00\00\00\08\00\00\00\03\00\00\00\04") + (data (i32.const 6392) "\01\00\00\00\0e\00\00\001\00,\002\00,\003\00,\004") + (data (i32.const 6416) "\02\00\00\00\02\00\00\00\01\02") + (data (i32.const 6432) "\02\00\00\00\02\00\00\00\01\02") + (data (i32.const 6448) "\02\00\00\00\02\00\00\00\03\04") + (data (i32.const 6464) "\02\00\00\00\04\00\00\00\01") + (data (i32.const 6480) "\02\00\00\00\04\00\00\00\01") + (data (i32.const 6496) "\02\00\00\00\04\00\00\00\01") + (data (i32.const 6512) "\02\00\00\00\04\00\00\00\01") (table $0 56 funcref) (elem (i32.const 0) $null $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|2 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|16 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -591,12 +596,12 @@ ) (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 6444 + i32.const 6524 i32.le_u if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -610,7 +615,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable @@ -658,7 +663,7 @@ if i32.const 0 i32.const 16 - i32.const 226 + i32.const 227 i32.const 57 call $~lib/env/abort unreachable @@ -2142,7 +2147,7 @@ i32.shl i32.const 0 local.get $0 - i32.const 6444 + i32.const 6524 i32.gt_u select i32.const 1 @@ -2183,7 +2188,7 @@ i32.eq if local.get $0 - i32.const 6444 + i32.const 6524 i32.le_u if i32.const 0 @@ -2293,7 +2298,7 @@ if i32.const 0 i32.const 208 - i32.const 195 + i32.const 199 i32.const 20 call $~lib/env/abort unreachable @@ -2560,7 +2565,7 @@ if i32.const 0 i32.const 208 - i32.const 253 + i32.const 260 i32.const 20 call $~lib/env/abort unreachable @@ -4091,7 +4096,7 @@ if i32.const 0 i32.const 208 - i32.const 357 + i32.const 373 i32.const 4 call $~lib/env/abort unreachable @@ -4587,7 +4592,7 @@ if i32.const 0 i32.const 208 - i32.const 357 + i32.const 373 i32.const 4 call $~lib/env/abort unreachable @@ -5106,7 +5111,7 @@ if i32.const 0 i32.const 208 - i32.const 357 + i32.const 373 i32.const 4 call $~lib/env/abort unreachable @@ -5431,7 +5436,7 @@ if i32.const 0 i32.const 208 - i32.const 357 + i32.const 373 i32.const 4 call $~lib/env/abort unreachable @@ -9685,7 +9690,8 @@ (func $start:std/array (; 158 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - i32.const 6448 + (local $2 i32) + i32.const 6528 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -13217,6 +13223,8 @@ i32.const 0 global.set $~lib/argc global.get $std/array/f32ArrayTyped + local.set $1 + i32.const 0 local.set $0 block $1of1 block $0of1 @@ -13227,10 +13235,10 @@ unreachable end i32.const 44 - local.set $1 + local.set $0 end - local.get $0 local.get $1 + local.get $0 call $~lib/array/Array#sort global.get $std/array/f32ArrayTyped i32.const 2576 @@ -13250,9 +13258,9 @@ i32.const 0 global.set $~lib/argc global.get $std/array/f64ArrayTyped - local.set $0 - i32.const 0 local.set $1 + i32.const 0 + local.set $0 block $1of143 block $0of144 block $outOfRange45 @@ -13262,10 +13270,10 @@ unreachable end i32.const 45 - local.set $1 + local.set $0 end - local.get $0 local.get $1 + local.get $0 call $~lib/array/Array#sort global.get $std/array/f64ArrayTyped i32.const 2712 @@ -13285,9 +13293,9 @@ i32.const 0 global.set $~lib/argc global.get $std/array/i32ArrayTyped - local.set $0 - i32.const 0 local.set $1 + i32.const 0 + local.set $0 block $1of146 block $0of147 block $outOfRange48 @@ -13297,10 +13305,10 @@ unreachable end i32.const 46 - local.set $1 + local.set $0 end - local.get $0 local.get $1 + local.get $0 call $~lib/array/Array#sort drop global.get $std/array/i32ArrayTyped @@ -13322,9 +13330,9 @@ i32.const 0 global.set $~lib/argc global.get $std/array/u32ArrayTyped - local.set $0 - i32.const 0 local.set $1 + i32.const 0 + local.set $0 block $1of149 block $0of150 block $outOfRange51 @@ -13334,10 +13342,10 @@ unreachable end i32.const 47 - local.set $1 + local.set $0 end - local.get $0 local.get $1 + local.get $0 call $~lib/array/Array#sort drop global.get $std/array/u32ArrayTyped @@ -13650,17 +13658,16 @@ i32.const 3 i32.store offset=12 local.get $0 - i32.const 0 + i32.load offset=4 + local.tee $1 call $std/array/Ref#constructor - call $~lib/array/Array#__set - local.get $0 - i32.const 1 + i32.store + local.get $1 i32.const 0 - call $~lib/array/Array#__set - local.get $0 - i32.const 2 + i32.store offset=4 + local.get $1 call $std/array/Ref#constructor - call $~lib/array/Array#__set + i32.store offset=8 local.get $0 global.set $std/array/refArr global.get $std/array/refArr @@ -13823,25 +13830,25 @@ end i32.const 2 call $~lib/array/Array>#constructor + local.tee $1 + i32.load offset=4 local.tee $0 - i32.const 0 - i32.const 6352 + i32.const 6368 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray - call $~lib/array/Array#__set + i32.store local.get $0 - i32.const 1 - i32.const 6368 + i32.const 6384 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray - call $~lib/array/Array#__set - local.get $0 + i32.store offset=4 + local.get $1 global.set $std/array/subarr32 global.get $std/array/subarr32 call $~lib/array/Array>#join_arr - i32.const 6384 + i32.const 6400 call $~lib/string/String.__eq i32.eqz if @@ -13866,24 +13873,24 @@ i32.const 2 i32.store offset=12 local.get $0 - i32.const 0 - i32.const 6408 + i32.load offset=4 + local.tee $1 + i32.const 6440 i32.const 7 i32.const 0 call $~lib/runtime/doWrapArray - call $~lib/array/Array#__set - local.get $0 - i32.const 1 - i32.const 6424 + i32.store + local.get $1 + i32.const 6456 i32.const 7 i32.const 0 call $~lib/runtime/doWrapArray - call $~lib/array/Array#__set + i32.store offset=4 local.get $0 global.set $std/array/subarr8 global.get $std/array/subarr8 call $~lib/array/Array>#join_arr - i32.const 6384 + i32.const 6400 call $~lib/string/String.__eq i32.eqz if @@ -13907,6 +13914,9 @@ local.get $0 i32.const 1 i32.store offset=12 + local.get $0 + i32.load offset=4 + local.set $1 i32.const 16 call $~lib/runtime/doAllocate i32.const 24 @@ -13914,23 +13924,22 @@ i32.const 1 i32.const 2 call $~lib/runtime/ArrayBufferView#constructor - local.tee $1 + local.tee $2 i32.const 0 i32.store offset=12 - local.get $1 + local.get $2 i32.const 1 i32.store offset=12 - local.get $1 - i32.const 0 - i32.const 6440 + local.get $2 + i32.load offset=4 + i32.const 6520 i32.const 8 i32.const 2 call $~lib/runtime/doWrapArray - call $~lib/array/Array#__set - local.get $0 - i32.const 0 + i32.store local.get $1 - call $~lib/array/Array#__set + local.get $2 + i32.store local.get $0 global.set $std/array/subarrU32 global.get $std/array/subarrU32 diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index d312389857..da2fc61539 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -210,11 +210,16 @@ (data (i32.const 6296) "\02\00\00\00\10\00\00\00\c8\15\00\00h\18\00\00\00\00\00\00x\18\00\00") (data (i32.const 6320) "\01\00\00\00\0c\00\00\001\00,\002\00,\00,\004\00") (data (i32.const 6344) "\02\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 6360) "\02\00\00\00\08\00\00\00\03\00\00\00\04\00\00\00") - (data (i32.const 6376) "\01\00\00\00\0e\00\00\001\00,\002\00,\003\00,\004\00") - (data (i32.const 6400) "\02\00\00\00\02\00\00\00\01\02") - (data (i32.const 6416) "\02\00\00\00\02\00\00\00\03\04") - (data (i32.const 6432) "\02\00\00\00\04\00\00\00\01\00\00\00") + (data (i32.const 6360) "\02\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 6376) "\02\00\00\00\08\00\00\00\03\00\00\00\04\00\00\00") + (data (i32.const 6392) "\01\00\00\00\0e\00\00\001\00,\002\00,\003\00,\004\00") + (data (i32.const 6416) "\02\00\00\00\02\00\00\00\01\02") + (data (i32.const 6432) "\02\00\00\00\02\00\00\00\01\02") + (data (i32.const 6448) "\02\00\00\00\02\00\00\00\03\04") + (data (i32.const 6464) "\02\00\00\00\04\00\00\00\01\00\00\00") + (data (i32.const 6480) "\02\00\00\00\04\00\00\00\01\00\00\00") + (data (i32.const 6496) "\02\00\00\00\04\00\00\00\01\00\00\00") + (data (i32.const 6512) "\02\00\00\00\04\00\00\00\01\00\00\00") (table $0 56 funcref) (elem (i32.const 0) $null $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|4 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|18 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|30 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|34 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|38 $start:std/array~anonymous|39 $start:std/array~anonymous|40 $start:std/array~anonymous|41 $start:std/array~anonymous|42 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR~anonymous|0) (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) @@ -285,7 +290,7 @@ (global $std/array/subarr32 (mut i32) (i32.const 0)) (global $std/array/subarr8 (mut i32) (i32.const 0)) (global $std/array/subarrU32 (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 6444)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 6524)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -666,7 +671,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -681,7 +686,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable @@ -745,7 +750,7 @@ if i32.const 0 i32.const 16 - i32.const 226 + i32.const 227 i32.const 57 call $~lib/env/abort unreachable @@ -2947,7 +2952,7 @@ if i32.const 0 i32.const 208 - i32.const 195 + i32.const 199 i32.const 20 call $~lib/env/abort unreachable @@ -3306,7 +3311,7 @@ if i32.const 0 i32.const 208 - i32.const 253 + i32.const 260 i32.const 20 call $~lib/env/abort unreachable @@ -5278,7 +5283,7 @@ if i32.const 0 i32.const 208 - i32.const 357 + i32.const 373 i32.const 4 call $~lib/env/abort unreachable @@ -5888,7 +5893,7 @@ if i32.const 0 i32.const 208 - i32.const 357 + i32.const 373 i32.const 4 call $~lib/env/abort unreachable @@ -6523,7 +6528,7 @@ if i32.const 0 i32.const 208 - i32.const 357 + i32.const 373 i32.const 4 call $~lib/env/abort unreachable @@ -7027,7 +7032,7 @@ if i32.const 0 i32.const 208 - i32.const 357 + i32.const 373 i32.const 4 call $~lib/env/abort unreachable @@ -7598,7 +7603,7 @@ if i32.const 0 i32.const 208 - i32.const 357 + i32.const 373 i32.const 4 call $~lib/env/abort unreachable @@ -7954,7 +7959,7 @@ if i32.const 0 i32.const 208 - i32.const 357 + i32.const 373 i32.const 4 call $~lib/env/abort unreachable @@ -8211,7 +8216,7 @@ if i32.const 0 i32.const 208 - i32.const 357 + i32.const 373 i32.const 4 call $~lib/env/abort unreachable @@ -11808,34 +11813,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#__set (; 216 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - call $~lib/array/ensureCapacity - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=12 - end - ) - (func $~lib/array/Array#join_ref (; 217 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_ref (; 216 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11997,18 +11975,18 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 218 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 217 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_ref return ) - (func $~lib/array/Array#toString (; 219 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 218 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa (; 220 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 219 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -12017,7 +11995,7 @@ call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 221 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 220 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12092,7 +12070,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12238,25 +12216,25 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 223 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 224 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa (; 225 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 224 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 65535 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 226 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12301,7 +12279,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 227 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12447,18 +12425,18 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 228 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 227 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 229 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 228 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/util/number/decimalCount64 (; 230 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 229 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -12527,7 +12505,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 231 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 230 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -12655,7 +12633,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 232 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 231 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12735,12 +12713,12 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa (; 233 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 232 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/utoa64 return ) - (func $~lib/util/number/itoa_stream (; 234 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 233 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12806,7 +12784,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 235 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 234 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12952,18 +12930,18 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 235 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 237 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 236 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa64 (; 238 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 237 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13065,12 +13043,12 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa (; 239 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 238 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/itoa64 return ) - (func $~lib/util/number/itoa_stream (; 240 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 239 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13158,7 +13136,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 241 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 240 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13304,23 +13282,23 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 242 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 241 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 243 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 242 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/array/Array#toString (; 244 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 243 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/array/Array>#join_arr (; 245 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 244 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13424,18 +13402,18 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 245 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>#toString (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#toString (; 246 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array>#join ) - (func $~lib/array/Array>#constructor (; 248 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 247 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -13460,41 +13438,14 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>#__set (; 249 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - call $~lib/array/ensureCapacity - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=12 - end - ) - (func $~lib/util/number/itoa (; 250 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 248 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 251 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 249 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13539,7 +13490,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13685,13 +13636,13 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 253 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 251 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array>#join_arr (; 254 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13795,18 +13746,18 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 253 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>#toString (; 256 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#toString (; 254 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array>#join ) - (func $~lib/array/Array>#constructor (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -13831,34 +13782,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>#__set (; 258 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - call $~lib/array/ensureCapacity - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=12 - end - ) - (func $~lib/array/Array>>#constructor (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#constructor (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -13883,34 +13807,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>>#__set (; 260 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - call $~lib/array/ensureCapacity - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=12 - end - ) - (func $~lib/array/Array>#join_arr (; 261 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14014,13 +13911,13 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>>#join_arr (; 263 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#join_arr (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14124,24 +14021,23 @@ end local.get $3 ) - (func $~lib/array/Array>>#join (; 264 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#join (; 260 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>>#join_arr return ) - (func $~lib/array/Array>>#toString (; 265 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>>#toString (; 261 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array>>#join ) - (func $start:std/array (; 266 ;) (type $FUNCSIG$v) + (func $start:std/array (; 262 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -18630,22 +18526,22 @@ i32.const 0 i32.const 3 call $~lib/array/Array#constructor + local.set $0 + local.get $0 + i32.load offset=4 local.set $1 local.get $1 i32.const 0 - i32.const 0 call $std/array/Ref#constructor - call $~lib/array/Array#__set + i32.store local.get $1 - i32.const 1 i32.const 0 - call $~lib/array/Array#__set + i32.store offset=4 local.get $1 - i32.const 2 i32.const 0 call $std/array/Ref#constructor - call $~lib/array/Array#__set - local.get $1 + i32.store offset=8 + local.get $0 end global.set $std/array/refArr global.get $std/array/refArr @@ -18831,35 +18727,36 @@ i32.const 0 i32.const 2 call $~lib/array/Array>#constructor - local.set $2 - local.get $2 - i32.const 0 - block $~lib/runtime/WRAPARRAY|inlined.70 (result i32) - i32.const 6352 - local.set $1 - local.get $1 + local.set $1 + local.get $1 + i32.load offset=4 + local.set $0 + local.get $0 + block $~lib/runtime/WRAPARRAY|inlined.71 (result i32) + i32.const 6368 + local.set $2 + local.get $2 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray end - call $~lib/array/Array>#__set - local.get $2 - i32.const 1 - block $~lib/runtime/WRAPARRAY|inlined.71 (result i32) - i32.const 6368 - local.set $1 - local.get $1 + i32.store + local.get $0 + block $~lib/runtime/WRAPARRAY|inlined.72 (result i32) + i32.const 6384 + local.set $2 + local.get $2 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray end - call $~lib/array/Array>#__set - local.get $2 + i32.store offset=4 + local.get $1 end global.set $std/array/subarr32 global.get $std/array/subarr32 call $~lib/array/Array>#toString - i32.const 6384 + i32.const 6400 call $~lib/string/String.__eq i32.eqz if @@ -18874,35 +18771,36 @@ i32.const 0 i32.const 2 call $~lib/array/Array>#constructor - local.set $3 - local.get $3 - i32.const 0 - block $~lib/runtime/WRAPARRAY|inlined.5 (result i32) - i32.const 6408 + local.set $0 + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + block $~lib/runtime/WRAPARRAY|inlined.6 (result i32) + i32.const 6440 local.set $2 local.get $2 i32.const 7 i32.const 0 call $~lib/runtime/doWrapArray end - call $~lib/array/Array>#__set - local.get $3 - i32.const 1 - block $~lib/runtime/WRAPARRAY|inlined.6 (result i32) - i32.const 6424 + i32.store + local.get $1 + block $~lib/runtime/WRAPARRAY|inlined.7 (result i32) + i32.const 6456 local.set $2 local.get $2 i32.const 7 i32.const 0 call $~lib/runtime/doWrapArray end - call $~lib/array/Array>#__set - local.get $3 + i32.store offset=4 + local.get $0 end global.set $std/array/subarr8 global.get $std/array/subarr8 call $~lib/array/Array>#toString - i32.const 6384 + i32.const 6400 call $~lib/string/String.__eq i32.eqz if @@ -18917,29 +18815,33 @@ i32.const 0 i32.const 1 call $~lib/array/Array>>#constructor - local.set $5 - local.get $5 - i32.const 0 + local.set $0 + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 block (result i32) i32.const 0 i32.const 1 call $~lib/array/Array>#constructor - local.set $4 - local.get $4 - i32.const 0 - block $~lib/runtime/WRAPARRAY|inlined.8 (result i32) - i32.const 6440 - local.set $3 - local.get $3 + local.set $2 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $3 + block $~lib/runtime/WRAPARRAY|inlined.11 (result i32) + i32.const 6520 + local.set $4 + local.get $4 i32.const 8 i32.const 2 call $~lib/runtime/doWrapArray end - call $~lib/array/Array>#__set - local.get $4 + i32.store + local.get $2 end - call $~lib/array/Array>>#__set - local.get $5 + i32.store + local.get $0 end global.set $std/array/subarrU32 global.get $std/array/subarrU32 @@ -18956,9 +18858,9 @@ unreachable end ) - (func $start (; 267 ;) (type $FUNCSIG$v) + (func $start (; 263 ;) (type $FUNCSIG$v) call $start:std/array ) - (func $null (; 268 ;) (type $FUNCSIG$v) + (func $null (; 264 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 7fbd45db3b..7cd6dda983 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -326,7 +326,7 @@ if i32.const 0 i32.const 64 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -340,7 +340,7 @@ if i32.const 0 i32.const 64 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable @@ -1552,7 +1552,7 @@ if i32.const 0 i32.const 64 - i32.const 226 + i32.const 227 i32.const 57 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 992570e81b..5d56658c92 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -408,7 +408,7 @@ if i32.const 0 i32.const 64 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -423,7 +423,7 @@ if i32.const 0 i32.const 64 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable @@ -2052,7 +2052,7 @@ if i32.const 0 i32.const 64 - i32.const 226 + i32.const 227 i32.const 57 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index e155ad9c9f..4a05a9cb9e 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -163,7 +163,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -177,7 +177,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index f0a7ba271a..9bc3fc2419 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -414,7 +414,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -429,7 +429,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable @@ -493,7 +493,7 @@ if i32.const 0 i32.const 16 - i32.const 226 + i32.const 227 i32.const 57 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 16c498b0a0..900c23f494 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -90,7 +90,7 @@ if i32.const 0 i32.const 48 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -104,7 +104,7 @@ if i32.const 0 i32.const 48 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 949c64322a..66eb060ad8 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -154,7 +154,7 @@ if i32.const 0 i32.const 48 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -169,7 +169,7 @@ if i32.const 0 i32.const 48 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index f9cc0a7cf6..2f38ffe765 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -123,7 +123,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -137,7 +137,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index deb133fbd3..daeb9b1e5a 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -160,7 +160,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -175,7 +175,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index b223702c11..f81a2dbc16 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -6281,35 +6281,37 @@ i64.const 63 i64.shr_u local.set $8 - local.get $3 - i64.const 1 - i64.shl - local.tee $7 - i64.const 0 - i64.eq - local.tee $6 - i32.eqz - if - local.get $4 - i64.const 2047 + block (result i32) + local.get $3 + i64.const 1 + i64.shl + local.tee $7 + i64.const 0 i64.eq - local.set $6 + local.tee $6 + i32.eqz + if + local.get $4 + i64.const 2047 + i64.eq + local.set $6 + end + local.get $6 + i32.eqz end - local.get $6 - i32.eqz - if + if (result i32) local.get $1 local.get $1 f64.ne - local.set $6 + else + local.get $6 end - local.get $6 if local.get $0 local.get $1 f64.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 f64.div return end @@ -6384,7 +6386,7 @@ local.get $2 local.get $3 i64.ge_u - if (result i64) + if local.get $2 local.get $3 i64.eq @@ -6392,9 +6394,9 @@ local.get $2 local.get $3 i64.sub - else - local.get $2 + local.set $2 end + local.get $2 i64.const 1 i64.shl local.set $2 @@ -6508,34 +6510,36 @@ i32.const -2147483648 i32.and local.set $8 - local.get $4 - i32.const 1 - i32.shl - local.tee $7 - i32.eqz - local.tee $5 - i32.eqz - if - local.get $3 - i32.const 255 - i32.eq - local.set $5 + block (result i32) + local.get $4 + i32.const 1 + i32.shl + local.tee $7 + i32.eqz + local.tee $5 + i32.eqz + if + local.get $3 + i32.const 255 + i32.eq + local.set $5 + end + local.get $5 + i32.eqz end - local.get $5 - i32.eqz - if + if (result i32) local.get $1 local.get $1 f32.ne - local.set $5 + else + local.get $5 end - local.get $5 if local.get $0 local.get $1 f32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 f32.div return end @@ -6604,7 +6608,7 @@ local.get $2 local.get $4 i32.ge_u - if (result i32) + if local.get $2 local.get $4 i32.eq @@ -6612,9 +6616,9 @@ local.get $2 local.get $4 i32.sub - else - local.get $2 + local.set $2 end + local.get $2 i32.const 1 i32.shl local.set $2 diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index 64ab902580..4072254d88 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -7798,13 +7798,8 @@ local.get $8 else local.get $1 - local.set $9 - local.get $9 - local.get $9 - f64.ne + call $~lib/builtins/isNaN end - i32.const 0 - i32.ne if local.get $0 local.get $1 @@ -8085,13 +8080,8 @@ local.get $8 else local.get $1 - local.set $9 - local.get $9 - local.get $9 - f32.ne + call $~lib/builtins/isNaN end - i32.const 0 - i32.ne if local.get $0 local.get $1 @@ -47424,17 +47414,10 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isNaN|inlined.2 (result i32) - f32.const nan:0x400000 - i32.const 1 - call $~lib/math/ipow32f - local.set $4 - local.get $4 - local.get $4 - f32.ne - end - i32.const 0 - i32.ne + f32.const nan:0x400000 + i32.const 1 + call $~lib/math/ipow32f + call $~lib/builtins/isNaN i32.eqz if i32.const 0 @@ -47444,17 +47427,10 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isNaN|inlined.3 (result i32) - f32.const nan:0x400000 - i32.const -1 - call $~lib/math/ipow32f - local.set $4 - local.get $4 - local.get $4 - f32.ne - end - i32.const 0 - i32.ne + f32.const nan:0x400000 + i32.const -1 + call $~lib/math/ipow32f + call $~lib/builtins/isNaN i32.eqz if i32.const 0 @@ -47464,17 +47440,10 @@ call $~lib/env/abort unreachable end - block $~lib/builtins/isNaN|inlined.4 (result i32) - f32.const nan:0x400000 - i32.const 2 - call $~lib/math/ipow32f - local.set $4 - local.get $4 - local.get $4 - f32.ne - end - i32.const 0 - i32.ne + f32.const nan:0x400000 + i32.const 2 + call $~lib/math/ipow32f + call $~lib/builtins/isNaN i32.eqz if i32.const 0 diff --git a/tests/compiler/std/mod.optimized.wat b/tests/compiler/std/mod.optimized.wat index 7cfa243903..83246d1dfc 100644 --- a/tests/compiler/std/mod.optimized.wat +++ b/tests/compiler/std/mod.optimized.wat @@ -46,35 +46,37 @@ i64.const 63 i64.shr_u local.set $8 - local.get $3 - i64.const 1 - i64.shl - local.tee $7 - i64.const 0 - i64.eq - local.tee $6 - i32.eqz - if - local.get $4 - i64.const 2047 + block (result i32) + local.get $3 + i64.const 1 + i64.shl + local.tee $7 + i64.const 0 i64.eq - local.set $6 + local.tee $6 + i32.eqz + if + local.get $4 + i64.const 2047 + i64.eq + local.set $6 + end + local.get $6 + i32.eqz end - local.get $6 - i32.eqz - if + if (result i32) local.get $1 local.get $1 f64.ne - local.set $6 + else + local.get $6 end - local.get $6 if local.get $0 local.get $1 f64.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 f64.div return end @@ -149,7 +151,7 @@ local.get $2 local.get $3 i64.ge_u - if (result i64) + if local.get $2 local.get $3 i64.eq @@ -157,9 +159,9 @@ local.get $2 local.get $3 i64.sub - else - local.get $2 + local.set $2 end + local.get $2 i64.const 1 i64.shl local.set $2 @@ -298,34 +300,36 @@ i32.const -2147483648 i32.and local.set $8 - local.get $4 - i32.const 1 - i32.shl - local.tee $7 - i32.eqz - local.tee $5 - i32.eqz - if - local.get $3 - i32.const 255 - i32.eq - local.set $5 + block (result i32) + local.get $4 + i32.const 1 + i32.shl + local.tee $7 + i32.eqz + local.tee $5 + i32.eqz + if + local.get $3 + i32.const 255 + i32.eq + local.set $5 + end + local.get $5 + i32.eqz end - local.get $5 - i32.eqz - if + if (result i32) local.get $1 local.get $1 f32.ne - local.set $5 + else + local.get $5 end - local.get $5 if local.get $0 local.get $1 f32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 f32.div return end @@ -394,7 +398,7 @@ local.get $2 local.get $4 i32.ge_u - if (result i32) + if local.get $2 local.get $4 i32.eq @@ -402,9 +406,9 @@ local.get $2 local.get $4 i32.sub - else - local.get $2 + local.set $2 end + local.get $2 i32.const 1 i32.shl local.set $2 diff --git a/tests/compiler/std/mod.untouched.wat b/tests/compiler/std/mod.untouched.wat index 4d4deb257a..15146cdec6 100644 --- a/tests/compiler/std/mod.untouched.wat +++ b/tests/compiler/std/mod.untouched.wat @@ -1,13 +1,13 @@ (module (type $FUNCSIG$iddd (func (param f64 f64 f64) (result i32))) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) - (type $FUNCSIG$idd (func (param f64 f64) (result i32))) (type $FUNCSIG$id (func (param f64) (result i32))) + (type $FUNCSIG$idd (func (param f64 f64) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ifff (func (param f32 f32 f32) (result i32))) (type $FUNCSIG$fff (func (param f32 f32) (result f32))) - (type $FUNCSIG$iff (func (param f32 f32) (result i32))) (type $FUNCSIG$if (func (param f32) (result i32))) + (type $FUNCSIG$iff (func (param f32 f32) (result i32))) (type $FUNCSIG$v (func)) (import "math" "mod" (func $std/mod/mod (param f64 f64) (result f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -21,7 +21,12 @@ (export "table" (table $0)) (export "mod" (func $std/mod/mod)) (start $start) - (func $~lib/math/NativeMath.mod (; 2 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/builtins/isNaN (; 2 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + local.get $0 + local.get $0 + f64.ne + ) + (func $~lib/math/NativeMath.mod (; 3 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -74,13 +79,8 @@ local.get $8 else local.get $1 - local.set $9 - local.get $9 - local.get $9 - f64.ne + call $~lib/builtins/isNaN end - i32.const 0 - i32.ne if local.get $0 local.get $1 @@ -279,11 +279,6 @@ local.get $2 f64.reinterpret_i64 ) - (func $~lib/builtins/isNaN (; 3 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) - local.get $0 - local.get $0 - f64.ne - ) (func $std/mod/check (; 4 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) local.get $1 call $~lib/builtins/isNaN @@ -335,7 +330,12 @@ local.get $3 end ) - (func $~lib/math/NativeMathf.mod (; 6 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/builtins/isNaN (; 6 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + local.get $0 + local.get $0 + f32.ne + ) + (func $~lib/math/NativeMathf.mod (; 7 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -388,13 +388,8 @@ local.get $8 else local.get $1 - local.set $9 - local.get $9 - local.get $9 - f32.ne + call $~lib/builtins/isNaN end - i32.const 0 - i32.ne if local.get $0 local.get $1 @@ -591,11 +586,6 @@ local.get $2 f32.reinterpret_i32 ) - (func $~lib/builtins/isNaN (; 7 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) - local.get $0 - local.get $0 - f32.ne - ) (func $std/mod/check (; 8 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) local.get $1 call $~lib/builtins/isNaN diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index ffd13cd2a9..6cb9c5eb85 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -84,7 +84,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -98,7 +98,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 1e15eedfdd..c053cb9a36 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -147,7 +147,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -162,7 +162,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 4a930e3c11..8542a050a8 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -167,7 +167,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -181,7 +181,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 9f0b83fa98..21a621b6f2 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -215,7 +215,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -230,7 +230,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index 4aac78e367..4941333cee 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -1119,7 +1119,7 @@ if i32.const 0 i32.const 16 - i32.const 79 + i32.const 78 i32.const 0 call $~lib/env/abort unreachable @@ -1130,7 +1130,7 @@ if i32.const 0 i32.const 16 - i32.const 80 + i32.const 79 i32.const 0 call $~lib/env/abort unreachable @@ -1149,7 +1149,7 @@ if i32.const 0 i32.const 16 - i32.const 84 + i32.const 83 i32.const 0 call $~lib/env/abort unreachable @@ -1161,7 +1161,7 @@ if i32.const 0 i32.const 16 - i32.const 85 + i32.const 84 i32.const 0 call $~lib/env/abort unreachable @@ -1176,7 +1176,7 @@ if i32.const 0 i32.const 16 - i32.const 88 + i32.const 87 i32.const 0 call $~lib/env/abort unreachable @@ -1191,7 +1191,7 @@ if i32.const 0 i32.const 16 - i32.const 91 + i32.const 90 i32.const 0 call $~lib/env/abort unreachable @@ -1202,7 +1202,7 @@ if i32.const 0 i32.const 16 - i32.const 93 + i32.const 92 i32.const 0 call $~lib/env/abort unreachable @@ -1220,7 +1220,7 @@ if i32.const 0 i32.const 16 - i32.const 95 + i32.const 94 i32.const 0 call $~lib/env/abort unreachable @@ -1231,7 +1231,7 @@ if i32.const 0 i32.const 16 - i32.const 96 + i32.const 95 i32.const 0 call $~lib/env/abort unreachable @@ -1242,7 +1242,7 @@ if i32.const 0 i32.const 16 - i32.const 98 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -1261,7 +1261,7 @@ if i32.const 0 i32.const 16 - i32.const 101 + i32.const 100 i32.const 0 call $~lib/env/abort unreachable @@ -1273,7 +1273,7 @@ if i32.const 0 i32.const 16 - i32.const 102 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable @@ -1285,7 +1285,7 @@ if i32.const 0 i32.const 16 - i32.const 103 + i32.const 102 i32.const 0 call $~lib/env/abort unreachable @@ -1308,7 +1308,7 @@ if i32.const 0 i32.const 16 - i32.const 106 + i32.const 105 i32.const 0 call $~lib/env/abort unreachable @@ -1320,7 +1320,7 @@ if i32.const 0 i32.const 16 - i32.const 107 + i32.const 106 i32.const 0 call $~lib/env/abort unreachable @@ -1332,7 +1332,7 @@ if i32.const 0 i32.const 16 - i32.const 108 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable @@ -1354,7 +1354,7 @@ if i32.const 0 i32.const 16 - i32.const 114 + i32.const 113 i32.const 0 call $~lib/env/abort unreachable @@ -1368,7 +1368,7 @@ if i32.const 0 i32.const 16 - i32.const 115 + i32.const 114 i32.const 0 call $~lib/env/abort unreachable @@ -1380,7 +1380,7 @@ if i32.const 0 i32.const 16 - i32.const 117 + i32.const 116 i32.const 0 call $~lib/env/abort unreachable @@ -1394,7 +1394,7 @@ if i32.const 0 i32.const 16 - i32.const 118 + i32.const 117 i32.const 0 call $~lib/env/abort unreachable @@ -1406,7 +1406,7 @@ if i32.const 0 i32.const 16 - i32.const 120 + i32.const 119 i32.const 0 call $~lib/env/abort unreachable @@ -1418,7 +1418,7 @@ if i32.const 0 i32.const 16 - i32.const 121 + i32.const 120 i32.const 0 call $~lib/env/abort unreachable @@ -1436,7 +1436,7 @@ if i32.const 0 i32.const 16 - i32.const 124 + i32.const 123 i32.const 0 call $~lib/env/abort unreachable @@ -1450,7 +1450,7 @@ if i32.const 0 i32.const 16 - i32.const 125 + i32.const 124 i32.const 0 call $~lib/env/abort unreachable @@ -1462,7 +1462,7 @@ if i32.const 0 i32.const 16 - i32.const 126 + i32.const 125 i32.const 0 call $~lib/env/abort unreachable @@ -1477,7 +1477,7 @@ if i32.const 0 i32.const 16 - i32.const 129 + i32.const 128 i32.const 0 call $~lib/env/abort unreachable @@ -1489,7 +1489,7 @@ if i32.const 0 i32.const 16 - i32.const 130 + i32.const 129 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/pointer.ts b/tests/compiler/std/pointer.ts index bece2e1879..b9605afd67 100644 --- a/tests/compiler/std/pointer.ts +++ b/tests/compiler/std/pointer.ts @@ -2,7 +2,6 @@ class Pointer { - // FIXME: does not inline, always yields a trampoline @inline constructor(offset: usize = 0) { return changetype>(offset); } diff --git a/tests/compiler/std/pointer.untouched.wat b/tests/compiler/std/pointer.untouched.wat index 748c64584a..7c94a31b22 100644 --- a/tests/compiler/std/pointer.untouched.wat +++ b/tests/compiler/std/pointer.untouched.wat @@ -1767,7 +1767,7 @@ if i32.const 0 i32.const 16 - i32.const 79 + i32.const 78 i32.const 0 call $~lib/env/abort unreachable @@ -1783,7 +1783,7 @@ if i32.const 0 i32.const 16 - i32.const 80 + i32.const 79 i32.const 0 call $~lib/env/abort unreachable @@ -1817,7 +1817,7 @@ if i32.const 0 i32.const 16 - i32.const 84 + i32.const 83 i32.const 0 call $~lib/env/abort unreachable @@ -1835,7 +1835,7 @@ if i32.const 0 i32.const 16 - i32.const 85 + i32.const 84 i32.const 0 call $~lib/env/abort unreachable @@ -1861,7 +1861,7 @@ if i32.const 0 i32.const 16 - i32.const 88 + i32.const 87 i32.const 0 call $~lib/env/abort unreachable @@ -1887,7 +1887,7 @@ if i32.const 0 i32.const 16 - i32.const 91 + i32.const 90 i32.const 0 call $~lib/env/abort unreachable @@ -1903,7 +1903,7 @@ if i32.const 0 i32.const 16 - i32.const 93 + i32.const 92 i32.const 0 call $~lib/env/abort unreachable @@ -1927,7 +1927,7 @@ if i32.const 0 i32.const 16 - i32.const 95 + i32.const 94 i32.const 0 call $~lib/env/abort unreachable @@ -1943,7 +1943,7 @@ if i32.const 0 i32.const 16 - i32.const 96 + i32.const 95 i32.const 0 call $~lib/env/abort unreachable @@ -1959,7 +1959,7 @@ if i32.const 0 i32.const 16 - i32.const 98 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -1991,7 +1991,7 @@ if i32.const 0 i32.const 16 - i32.const 101 + i32.const 100 i32.const 0 call $~lib/env/abort unreachable @@ -2009,7 +2009,7 @@ if i32.const 0 i32.const 16 - i32.const 102 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable @@ -2027,7 +2027,7 @@ if i32.const 0 i32.const 16 - i32.const 103 + i32.const 102 i32.const 0 call $~lib/env/abort unreachable @@ -2055,7 +2055,7 @@ if i32.const 0 i32.const 16 - i32.const 106 + i32.const 105 i32.const 0 call $~lib/env/abort unreachable @@ -2073,7 +2073,7 @@ if i32.const 0 i32.const 16 - i32.const 107 + i32.const 106 i32.const 0 call $~lib/env/abort unreachable @@ -2091,7 +2091,7 @@ if i32.const 0 i32.const 16 - i32.const 108 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable @@ -2130,7 +2130,7 @@ if i32.const 0 i32.const 16 - i32.const 114 + i32.const 113 i32.const 0 call $~lib/env/abort unreachable @@ -2153,7 +2153,7 @@ if i32.const 0 i32.const 16 - i32.const 115 + i32.const 114 i32.const 0 call $~lib/env/abort unreachable @@ -2176,7 +2176,7 @@ if i32.const 0 i32.const 16 - i32.const 117 + i32.const 116 i32.const 0 call $~lib/env/abort unreachable @@ -2199,7 +2199,7 @@ if i32.const 0 i32.const 16 - i32.const 118 + i32.const 117 i32.const 0 call $~lib/env/abort unreachable @@ -2212,7 +2212,7 @@ if i32.const 0 i32.const 16 - i32.const 120 + i32.const 119 i32.const 0 call $~lib/env/abort unreachable @@ -2225,7 +2225,7 @@ if i32.const 0 i32.const 16 - i32.const 121 + i32.const 120 i32.const 0 call $~lib/env/abort unreachable @@ -2263,7 +2263,7 @@ if i32.const 0 i32.const 16 - i32.const 124 + i32.const 123 i32.const 0 call $~lib/env/abort unreachable @@ -2286,7 +2286,7 @@ if i32.const 0 i32.const 16 - i32.const 125 + i32.const 124 i32.const 0 call $~lib/env/abort unreachable @@ -2299,7 +2299,7 @@ if i32.const 0 i32.const 16 - i32.const 126 + i32.const 125 i32.const 0 call $~lib/env/abort unreachable @@ -2320,7 +2320,7 @@ if i32.const 0 i32.const 16 - i32.const 129 + i32.const 128 i32.const 0 call $~lib/env/abort unreachable @@ -2333,7 +2333,7 @@ if i32.const 0 i32.const 16 - i32.const 130 + i32.const 129 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index adaa3012be..2b0b25aa1e 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -2653,7 +2653,7 @@ if i32.const 0 i32.const 232 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -2667,7 +2667,7 @@ if i32.const 0 i32.const 232 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index a91a32ae47..492ff4fde8 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -3342,7 +3342,7 @@ if i32.const 0 i32.const 232 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -3357,7 +3357,7 @@ if i32.const 0 i32.const 232 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 08556684c7..73811b2e8d 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -11,11 +11,9 @@ (type $FUNCSIG$iiji (func (param i32 i64 i32) (result i32))) (type $FUNCSIG$vij (func (param i32 i64))) (type $FUNCSIG$iif (func (param i32 f32) (result i32))) - (type $FUNCSIG$if (func (param f32) (result i32))) (type $FUNCSIG$iifi (func (param i32 f32 i32) (result i32))) (type $FUNCSIG$vif (func (param i32 f32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) - (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iidi (func (param i32 f64 i32) (result i32))) (type $FUNCSIG$vid (func (param i32 f64))) (type $FUNCSIG$i (func (result i32))) @@ -121,7 +119,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -135,7 +133,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable @@ -2960,13 +2958,11 @@ (local $2 i32) (local $3 i32) (local $4 i32) - local.get $1 - call $~lib/util/hash/hash32 - local.tee $2 - local.set $4 local.get $0 local.get $1 - local.get $2 + local.get $1 + call $~lib/util/hash/hash32 + local.tee $4 call $~lib/set/Set#find i32.eqz if @@ -3888,13 +3884,11 @@ (local $2 i32) (local $3 i32) (local $4 i32) - local.get $1 - call $~lib/util/hash/hash64 - local.tee $2 - local.set $4 local.get $0 local.get $1 - local.get $2 + local.get $1 + call $~lib/util/hash/hash64 + local.tee $4 call $~lib/set/Set#find i32.eqz if @@ -4576,12 +4570,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/HASH (; 56 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - ) - (func $~lib/set/Set#find (; 57 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 56 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -4624,16 +4613,17 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 58 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 57 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.reinterpret_f32 + call $~lib/util/hash/hash32 call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 59 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 58 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4731,14 +4721,15 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 60 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#add (; 59 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.reinterpret_f32 + call $~lib/util/hash/hash32 local.tee $4 call $~lib/set/Set#find i32.eqz @@ -4814,7 +4805,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 61 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#delete (; 60 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -4876,7 +4867,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 62 ;) (type $FUNCSIG$v) + (func $std/set/test (; 61 ;) (type $FUNCSIG$v) (local $0 f32) (local $1 i32) call $~lib/set/Set#constructor @@ -5121,7 +5112,7 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 63 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 62 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/doAllocate @@ -5149,12 +5140,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/HASH (; 64 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - ) - (func $~lib/set/Set#find (; 65 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 63 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -5197,16 +5183,17 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 66 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 64 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i64.reinterpret_f64 + call $~lib/util/hash/hash64 call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 67 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 65 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5304,14 +5291,15 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 68 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#add (; 66 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i64.reinterpret_f64 + call $~lib/util/hash/hash64 local.tee $4 call $~lib/set/Set#find i32.eqz @@ -5387,7 +5375,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 69 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#delete (; 67 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -5449,7 +5437,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 70 ;) (type $FUNCSIG$v) + (func $std/set/test (; 68 ;) (type $FUNCSIG$v) (local $0 f64) (local $1 i32) call $~lib/set/Set#constructor @@ -5694,7 +5682,7 @@ unreachable end ) - (func $start (; 71 ;) (type $FUNCSIG$v) + (func $start (; 69 ;) (type $FUNCSIG$v) i32.const 128 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset @@ -5710,7 +5698,7 @@ call $std/set/test call $std/set/test ) - (func $null (; 72 ;) (type $FUNCSIG$v) + (func $null (; 70 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 486977343b..73a1c56c02 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -12,11 +12,9 @@ (type $FUNCSIG$iiji (func (param i32 i64 i32) (result i32))) (type $FUNCSIG$vij (func (param i32 i64))) (type $FUNCSIG$iif (func (param i32 f32) (result i32))) - (type $FUNCSIG$if (func (param f32) (result i32))) (type $FUNCSIG$iifi (func (param i32 f32 i32) (result i32))) (type $FUNCSIG$vif (func (param i32 f32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) - (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iidi (func (param i32 f64 i32) (result i32))) (type $FUNCSIG$vid (func (param i32 f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -162,7 +160,7 @@ if i32.const 0 i32.const 16 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -177,7 +175,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable @@ -554,16 +552,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/util/hash/HASH (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - return - ) - (func $~lib/set/Set#find (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -618,16 +607,26 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -698,13 +697,13 @@ local.get $9 i32.load8_s i32.store8 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load8_s local.set $11 local.get $11 call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.0 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -757,20 +756,29 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -804,8 +812,8 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 + local.set $2 + local.get $2 block (result i32) local.get $0 local.get $0 @@ -821,8 +829,8 @@ end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i32.store8 local.get $0 @@ -833,7 +841,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -841,27 +849,27 @@ i32.mul i32.add local.set $5 - local.get $3 + local.get $4 local.get $5 i32.load i32.store offset=4 local.get $5 - local.get $3 + local.get $4 i32.store end ) - (func $~lib/set/Set#get:size (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 @@ -870,7 +878,7 @@ i32.const 24 i32.shr_s call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.1 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -931,7 +939,7 @@ end i32.const 1 ) - (func $std/set/test (; 19 ;) (type $FUNCSIG$v) + (func $std/set/test (; 18 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1214,7 +1222,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -1240,7 +1248,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -1279,14 +1287,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/HASH (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - return - ) - (func $~lib/set/Set#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1339,16 +1340,24 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.const 255 + i32.and + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1419,13 +1428,13 @@ local.get $9 i32.load8_u i32.store8 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load8_u local.set $11 local.get $11 call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.0 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -1478,20 +1487,27 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.const 255 + i32.and + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -1525,8 +1541,8 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 + local.set $2 + local.get $2 block (result i32) local.get $0 local.get $0 @@ -1542,8 +1558,8 @@ end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i32.store8 local.get $0 @@ -1554,7 +1570,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -1562,34 +1578,34 @@ i32.mul i32.add local.set $5 - local.get $3 + local.get $4 local.get $5 i32.load i32.store offset=4 local.get $5 - local.get $3 + local.get $4 i32.store end ) - (func $~lib/set/Set#get:size (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 i32.const 255 i32.and call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.1 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -1650,7 +1666,7 @@ end i32.const 1 ) - (func $std/set/test (; 29 ;) (type $FUNCSIG$v) + (func $std/set/test (; 27 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1933,7 +1949,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -1959,7 +1975,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -1998,7 +2014,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -2020,16 +2036,7 @@ local.set $1 local.get $1 ) - (func $~lib/util/hash/HASH (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - return - ) - (func $~lib/set/Set#find (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2084,16 +2091,26 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2164,13 +2181,13 @@ local.get $9 i32.load16_s i32.store16 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load16_s local.set $11 local.get $11 call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.0 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -2223,20 +2240,29 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -2270,8 +2296,8 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 + local.set $2 + local.get $2 block (result i32) local.get $0 local.get $0 @@ -2287,8 +2313,8 @@ end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i32.store16 local.get $0 @@ -2299,7 +2325,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -2307,27 +2333,27 @@ i32.mul i32.add local.set $5 - local.get $3 + local.get $4 local.get $5 i32.load i32.store offset=4 local.get $5 - local.get $3 + local.get $4 i32.store end ) - (func $~lib/set/Set#get:size (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 @@ -2336,7 +2362,7 @@ i32.const 16 i32.shr_s call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.1 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -2397,7 +2423,7 @@ end i32.const 1 ) - (func $std/set/test (; 40 ;) (type $FUNCSIG$v) + (func $std/set/test (; 37 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2680,7 +2706,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -2706,7 +2732,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -2745,14 +2771,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/HASH (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - return - ) - (func $~lib/set/Set#find (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2805,16 +2824,24 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 46 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 42 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2885,13 +2912,13 @@ local.get $9 i32.load16_u i32.store16 - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load16_u local.set $11 local.get $11 call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.0 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -2944,20 +2971,27 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 47 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 43 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -2991,8 +3025,8 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 + local.set $2 + local.get $2 block (result i32) local.get $0 local.get $0 @@ -3008,8 +3042,8 @@ end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i32.store16 local.get $0 @@ -3020,7 +3054,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -3028,34 +3062,34 @@ i32.mul i32.add local.set $5 - local.get $3 + local.get $4 local.get $5 i32.load i32.store offset=4 local.get $5 - local.get $3 + local.get $4 i32.store end ) - (func $~lib/set/Set#get:size (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 i32.const 65535 i32.and call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.1 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -3116,7 +3150,7 @@ end i32.const 1 ) - (func $std/set/test (; 50 ;) (type $FUNCSIG$v) + (func $std/set/test (; 46 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3399,7 +3433,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 51 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 47 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -3425,7 +3459,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -3464,7 +3498,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -3506,12 +3540,7 @@ local.set $1 local.get $1 ) - (func $~lib/util/hash/HASH (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/util/hash/hash32 - return - ) - (func $~lib/set/Set#find (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3562,16 +3591,22 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 57 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 52 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3642,13 +3677,13 @@ local.get $9 i32.load i32.store - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load local.set $11 local.get $11 call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -3701,20 +3736,25 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 58 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -3748,8 +3788,8 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 + local.set $2 + local.get $2 block (result i32) local.get $0 local.get $0 @@ -3765,8 +3805,8 @@ end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i32.store local.get $0 @@ -3777,7 +3817,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -3785,32 +3825,32 @@ i32.mul i32.add local.set $5 - local.get $3 + local.get $4 local.get $5 i32.load i32.store offset=4 local.get $5 - local.get $3 + local.get $4 i32.store end ) - (func $~lib/set/Set#get:size (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -3871,7 +3911,7 @@ end i32.const 1 ) - (func $std/set/test (; 61 ;) (type $FUNCSIG$v) + (func $std/set/test (; 56 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4154,7 +4194,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 57 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -4180,7 +4220,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 63 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -4219,12 +4259,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/HASH (; 64 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/util/hash/hash32 - return - ) - (func $~lib/set/Set#find (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4275,16 +4310,22 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 67 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 61 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4355,13 +4396,13 @@ local.get $9 i32.load i32.store - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load local.set $11 local.get $11 call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -4414,20 +4455,25 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 68 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 62 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -4461,8 +4507,8 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 + local.set $2 + local.get $2 block (result i32) local.get $0 local.get $0 @@ -4478,8 +4524,8 @@ end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i32.store local.get $0 @@ -4490,7 +4536,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -4498,32 +4544,32 @@ i32.mul i32.add local.set $5 - local.get $3 + local.get $4 local.get $5 i32.load i32.store offset=4 local.get $5 - local.get $3 + local.get $4 i32.store end ) - (func $~lib/set/Set#get:size (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 63 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -4584,7 +4630,7 @@ end i32.const 1 ) - (func $std/set/test (; 71 ;) (type $FUNCSIG$v) + (func $std/set/test (; 65 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4867,7 +4913,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 72 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 66 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -4893,7 +4939,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 67 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -4932,7 +4978,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 74 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 68 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5020,12 +5066,7 @@ local.set $3 local.get $3 ) - (func $~lib/util/hash/HASH (; 75 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) - local.get $0 - call $~lib/util/hash/hash64 - return - ) - (func $~lib/set/Set#find (; 76 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 69 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5076,16 +5117,22 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 77 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 70 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (local $2 i64) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 78 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 71 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5157,13 +5204,13 @@ local.get $9 i64.load i64.store - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i64.load local.set $11 local.get $11 call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -5216,20 +5263,26 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 79 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) - (local $2 i32) + (func $~lib/set/Set#add (; 72 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (local $2 i64) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 + (local $6 i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -5263,25 +5316,25 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 + local.set $5 + local.get $5 block (result i32) local.get $0 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $6 i32.const 1 i32.add i32.store offset=16 - local.get $5 + local.get $6 end block $~lib/set/ENTRY_SIZE|inlined.5 (result i32) i32.const 16 end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i64.store local.get $0 @@ -5292,28 +5345,28 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $5 - local.get $3 - local.get $5 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=8 - local.get $5 - local.get $3 + local.get $6 + local.get $4 i32.store end ) - (func $~lib/set/Set#get:size (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 81 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 74 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -5321,12 +5374,12 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -5387,7 +5440,7 @@ end i32.const 1 ) - (func $std/set/test (; 82 ;) (type $FUNCSIG$v) + (func $std/set/test (; 75 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5670,7 +5723,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 83 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 76 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -5696,7 +5749,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 84 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 77 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -5735,12 +5788,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/HASH (; 85 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) - local.get $0 - call $~lib/util/hash/hash64 - return - ) - (func $~lib/set/Set#find (; 86 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 78 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5791,16 +5839,22 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 87 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 79 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (local $2 i64) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 88 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 80 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5872,13 +5926,13 @@ local.get $9 i64.load i64.store - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i64.load local.set $11 local.get $11 call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -5931,20 +5985,26 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 89 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) - (local $2 i32) + (func $~lib/set/Set#add (; 81 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (local $2 i64) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 + (local $6 i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -5978,25 +6038,25 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 + local.set $5 + local.get $5 block (result i32) local.get $0 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $6 i32.const 1 i32.add i32.store offset=16 - local.get $5 + local.get $6 end block $~lib/set/ENTRY_SIZE|inlined.5 (result i32) i32.const 16 end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i64.store local.get $0 @@ -6007,28 +6067,28 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $5 - local.get $3 - local.get $5 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=8 - local.get $5 - local.get $3 + local.get $6 + local.get $4 i32.store end ) - (func $~lib/set/Set#get:size (; 90 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 82 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 91 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 83 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6036,12 +6096,12 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -6102,7 +6162,7 @@ end i32.const 1 ) - (func $std/set/test (; 92 ;) (type $FUNCSIG$v) + (func $std/set/test (; 84 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6385,7 +6445,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 93 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 85 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -6411,7 +6471,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 86 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -6450,13 +6510,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/HASH (; 95 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - return - ) - (func $~lib/set/Set#find (; 96 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 87 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6507,16 +6561,23 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 97 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 88 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (local $2 f32) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 98 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 89 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6588,14 +6649,14 @@ local.get $9 f32.load f32.store - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 f32.load local.set $11 local.get $11 i32.reinterpret_f32 call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -6648,20 +6709,27 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 99 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) - (local $2 i32) + (func $~lib/set/Set#add (; 90 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (local $2 f32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 + (local $6 i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -6695,25 +6763,25 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 + local.set $5 + local.get $5 block (result i32) local.get $0 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $6 i32.const 1 i32.add i32.store offset=16 - local.get $5 + local.get $6 end block $~lib/set/ENTRY_SIZE|inlined.5 (result i32) i32.const 8 end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 f32.store local.get $0 @@ -6724,28 +6792,28 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $5 - local.get $3 - local.get $5 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=4 - local.get $5 - local.get $3 + local.get $6 + local.get $4 i32.store end ) - (func $~lib/set/Set#get:size (; 100 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 91 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 101 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#delete (; 92 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -6753,13 +6821,13 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 i32.reinterpret_f32 call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -6820,7 +6888,7 @@ end i32.const 1 ) - (func $std/set/test (; 102 ;) (type $FUNCSIG$v) + (func $std/set/test (; 93 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -7103,7 +7171,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 103 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 94 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -7129,7 +7197,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 104 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 95 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -7168,13 +7236,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/HASH (; 105 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - return - ) - (func $~lib/set/Set#find (; 106 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 96 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7225,16 +7287,23 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 107 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 97 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) local.get $0 local.get $1 - local.get $1 - call $~lib/util/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 108 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 98 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7306,14 +7375,14 @@ local.get $9 f64.load f64.store - block $~lib/util/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 f64.load local.set $11 local.get $11 i64.reinterpret_f64 call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -7366,20 +7435,27 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 109 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) - (local $2 i32) + (func $~lib/set/Set#add (; 99 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (local $2 f64) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/util/hash/HASH - local.set $2 + (local $6 i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -7413,25 +7489,25 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 + local.set $5 + local.get $5 block (result i32) local.get $0 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $6 i32.const 1 i32.add i32.store offset=16 - local.get $5 + local.get $6 end block $~lib/set/ENTRY_SIZE|inlined.5 (result i32) i32.const 16 end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 f64.store local.get $0 @@ -7442,28 +7518,28 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $5 - local.get $3 - local.get $5 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=8 - local.get $5 - local.get $3 + local.get $6 + local.get $4 i32.store end ) - (func $~lib/set/Set#get:size (; 110 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 100 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 111 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#delete (; 101 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -7471,13 +7547,13 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 i64.reinterpret_f64 call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -7538,7 +7614,7 @@ end i32.const 1 ) - (func $std/set/test (; 112 ;) (type $FUNCSIG$v) + (func $std/set/test (; 102 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -7821,7 +7897,7 @@ unreachable end ) - (func $start:std/set (; 113 ;) (type $FUNCSIG$v) + (func $start:std/set (; 103 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -7843,9 +7919,9 @@ call $std/set/test call $std/set/test ) - (func $start (; 114 ;) (type $FUNCSIG$v) + (func $start (; 104 ;) (type $FUNCSIG$v) call $start:std/set ) - (func $null (; 115 ;) (type $FUNCSIG$v) + (func $null (; 105 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index c19c6db4af..a13199bf15 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -1514,7 +1514,7 @@ if i32.const 0 i32.const 136 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -1528,7 +1528,7 @@ if i32.const 0 i32.const 136 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable @@ -1596,7 +1596,7 @@ if i32.const 0 i32.const 96 - i32.const 443 + i32.const 447 i32.const 8 call $~lib/env/abort unreachable @@ -1643,7 +1643,7 @@ if i32.const 0 i32.const 96 - i32.const 447 + i32.const 451 i32.const 8 call $~lib/env/abort unreachable @@ -1716,7 +1716,7 @@ if i32.const 0 i32.const 96 - i32.const 459 + i32.const 463 i32.const 8 call $~lib/env/abort unreachable @@ -1769,7 +1769,7 @@ if i32.const 0 i32.const 96 - i32.const 468 + i32.const 472 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index eda61e0eb9..505a71eb49 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -1926,7 +1926,7 @@ if i32.const 0 i32.const 136 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -1941,7 +1941,7 @@ if i32.const 0 i32.const 136 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable @@ -2034,7 +2034,7 @@ if i32.const 0 i32.const 96 - i32.const 443 + i32.const 447 i32.const 8 call $~lib/env/abort unreachable @@ -2088,7 +2088,7 @@ if i32.const 0 i32.const 96 - i32.const 447 + i32.const 451 i32.const 8 call $~lib/env/abort unreachable @@ -2183,7 +2183,7 @@ if i32.const 0 i32.const 96 - i32.const 459 + i32.const 463 i32.const 8 call $~lib/env/abort unreachable @@ -2246,7 +2246,7 @@ if i32.const 0 i32.const 96 - i32.const 468 + i32.const 472 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 8d22b14d3c..4e3860b901 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -283,7 +283,7 @@ if i32.const 0 i32.const 96 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -297,7 +297,7 @@ if i32.const 0 i32.const 96 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable @@ -2387,7 +2387,7 @@ if i32.const 0 i32.const 168 - i32.const 565 + i32.const 569 i32.const 10 call $~lib/env/abort unreachable @@ -3052,7 +3052,7 @@ if i32.const 0 i32.const 96 - i32.const 226 + i32.const 227 i32.const 57 call $~lib/env/abort unreachable @@ -3247,25 +3247,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - i32.const 1 - call $~lib/array/ensureCapacity - local.get $0 - i32.load offset=4 - local.get $1 - i32.store - i32.const 0 - local.get $0 - i32.load offset=12 - i32.ge_s - if - local.get $0 - i32.const 1 - i32.store offset=12 - end - ) - (func $~lib/array/Array#push (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $0 @@ -3288,23 +3270,7 @@ local.get $1 i32.store ) - (func $~lib/runtime/assertRegistered (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.const 8 - i32.sub - i32.load - i32.const -1520547049 - i32.eq - if - i32.const 0 - i32.const 96 - i32.const 199 - i32.const 2 - call $~lib/env/abort - unreachable - end - ) - (func $~lib/string/String#split (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3330,217 +3296,205 @@ call $~lib/array/Array#constructor return end - local.get $1 - i32.eqz - if + block $folding-inner0 + local.get $1 + i32.eqz + br_if $folding-inner0 + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 i32.const 1 - call $~lib/array/Array#constructor + i32.shr_u + local.set $4 + i32.const 2147483647 + local.get $2 + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $2 + local.get $1 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $3 - local.get $0 - call $~lib/array/Array#__set + local.set $9 local.get $3 - return - end - local.get $0 - i32.const 8 - i32.sub - i32.load offset=4 - i32.const 1 - i32.shr_u - local.set $6 - i32.const 2147483647 - local.get $2 - local.get $2 - i32.const 0 - i32.lt_s - select - local.set $2 - local.get $1 - i32.const 8 - i32.sub - i32.load offset=4 - i32.const 1 - i32.shr_u - local.tee $3 - local.set $9 - local.get $3 - if - local.get $6 - i32.eqz if - i32.const 1 + local.get $4 + i32.eqz + if + i32.const 1 + call $~lib/array/Array#constructor + local.tee $3 + i32.load offset=4 + i32.const 312 + i32.store + local.get $3 + return + end + else + local.get $4 + i32.eqz + if + i32.const 0 + call $~lib/array/Array#constructor + return + end + local.get $4 + local.get $2 + local.get $4 + local.get $2 + i32.lt_s + select + local.tee $4 call $~lib/array/Array#constructor - local.tee $5 + local.tee $7 i32.load offset=4 - i32.const 312 - i32.store - local.get $5 - return - end - else - local.get $6 - i32.eqz - if + local.set $3 i32.const 0 - call $~lib/array/Array#constructor + local.set $1 + loop $repeat|0 + local.get $1 + local.get $4 + i32.lt_s + if + i32.const 2 + call $~lib/runtime/doAllocate + local.tee $2 + local.get $1 + i32.const 1 + i32.shl + local.get $0 + i32.add + i32.load16_u + i32.store16 + local.get $1 + i32.const 2 + i32.shl + local.get $3 + i32.add + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister + i32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end + end + local.get $7 return end - local.get $6 - local.tee $3 - local.get $2 - local.get $3 - local.get $2 - i32.lt_s - select - local.tee $6 + i32.const 0 call $~lib/array/Array#constructor - local.tee $3 - i32.load offset=4 local.set $5 - loop $repeat|0 - local.get $4 + loop $continue|1 + local.get $0 + local.get $1 local.get $6 - i32.lt_s + call $~lib/string/String#indexOf + local.tee $8 + i32.const -1 + i32.ne if - i32.const 2 - call $~lib/runtime/doAllocate - local.tee $1 - local.get $4 + local.get $8 + local.get $6 + i32.sub + local.tee $3 + i32.const 0 + i32.gt_s + if + local.get $3 + i32.const 1 + i32.shl + local.tee $3 + call $~lib/runtime/doAllocate + local.tee $7 + local.get $6 + i32.const 1 + i32.shl + local.get $0 + i32.add + local.get $3 + call $~lib/memory/memory.copy + local.get $5 + local.get $7 + i32.const 1 + call $~lib/runtime/doRegister + call $~lib/array/Array#push + else + local.get $5 + i32.const 312 + call $~lib/array/Array#push + end + local.get $10 i32.const 1 - i32.shl - local.get $0 i32.add - i32.load16_u - i32.store16 - local.get $4 - i32.const 2 - i32.shl - local.get $5 - i32.add - local.get $1 - i32.const 1 - call $~lib/runtime/doRegister - i32.store - local.get $4 - i32.const 1 + local.tee $10 + local.get $2 + i32.eq + if + local.get $5 + return + end + local.get $8 + local.get $9 i32.add - local.set $4 - br $repeat|0 + local.set $6 + br $continue|1 end end - local.get $3 - return - end - i32.const 0 - call $~lib/array/Array#constructor - local.set $7 - loop $continue|1 - local.get $0 - local.get $1 + local.get $6 + i32.eqz + br_if $folding-inner0 local.get $4 - call $~lib/string/String#indexOf - local.tee $8 - i32.const -1 - i32.ne + local.get $6 + i32.sub + local.tee $1 + i32.const 0 + i32.gt_s if - local.get $8 - local.get $4 - i32.sub - local.tee $5 - i32.const 0 - i32.gt_s - if - local.get $5 - i32.const 1 - i32.shl - local.tee $5 - call $~lib/runtime/doAllocate - local.tee $3 - local.get $4 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $5 - call $~lib/memory/memory.copy - local.get $7 - local.get $3 - i32.const 1 - call $~lib/runtime/doRegister - call $~lib/array/Array#push - else - local.get $7 - i32.const 312 - call $~lib/array/Array#push - end - local.get $10 + local.get $1 i32.const 1 + i32.shl + local.tee $1 + call $~lib/runtime/doAllocate + local.tee $3 + local.get $6 + i32.const 1 + i32.shl + local.get $0 i32.add - local.tee $10 - local.get $2 - i32.eq - if - local.get $7 - return - end - local.get $8 - local.get $9 - i32.add - local.set $4 - br $continue|1 + local.get $1 + call $~lib/memory/memory.copy + local.get $5 + local.get $3 + i32.const 1 + call $~lib/runtime/doRegister + call $~lib/array/Array#push + else + local.get $5 + i32.const 312 + call $~lib/array/Array#push end - end - local.get $4 - i32.eqz - if - i32.const 1 - call $~lib/array/Array#constructor - local.tee $3 - i32.load offset=4 - local.set $1 - local.get $0 - call $~lib/runtime/assertRegistered - local.get $3 - call $~lib/runtime/assertRegistered - local.get $1 - local.get $0 - i32.store - local.get $3 - return - end - local.get $6 - local.get $4 - i32.sub - local.tee $1 - i32.const 0 - i32.gt_s - if - local.get $1 - i32.const 1 - i32.shl - local.tee $1 - call $~lib/runtime/doAllocate - local.tee $5 - local.get $4 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $1 - call $~lib/memory/memory.copy - local.get $7 local.get $5 - i32.const 1 - call $~lib/runtime/doRegister - call $~lib/array/Array#push - else - local.get $7 - i32.const 312 - call $~lib/array/Array#push + return end - local.get $7 + i32.const 1 + call $~lib/array/Array#constructor + local.tee $3 + i32.load offset=4 + local.get $0 + i32.store + local.get $3 ) - (func $~lib/array/Array#__get (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3563,7 +3517,7 @@ i32.add i32.load ) - (func $~lib/util/number/decimalCount32 (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -3617,7 +3571,7 @@ end end ) - (func $~lib/util/number/utoa32_lut (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) i32.const 2060 @@ -3727,7 +3681,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3769,7 +3723,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/utoa32 (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3792,7 +3746,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/decimalCount64 (; 44 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 42 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -3846,7 +3800,7 @@ end end ) - (func $~lib/util/number/utoa64_lut (; 45 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 43 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3943,7 +3897,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 46 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 44 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3985,7 +3939,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa64 (; 47 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4050,7 +4004,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (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) + (func $~lib/util/number/genDigits (; 46 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -4468,7 +4422,7 @@ local.get $7 end ) - (func $~lib/util/number/prettify (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4729,7 +4683,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 50 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 48 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i64) (local $4 i64) @@ -5041,7 +4995,7 @@ local.get $12 i32.add ) - (func $~lib/string/String#substring (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5139,7 +5093,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/dtoa (; 52 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 50 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5184,7 +5138,7 @@ call $~lib/runtime/assertUnregistered local.get $1 ) - (func $start:std/string (; 53 ;) (type $FUNCSIG$v) + (func $start:std/string (; 51 ;) (type $FUNCSIG$v) (local $0 i32) global.get $std/string/str i32.const 16 @@ -8511,13 +8465,13 @@ unreachable end ) - (func $std/string/getString (; 54 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 52 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 55 ;) (type $FUNCSIG$v) + (func $start (; 53 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 56 ;) (type $FUNCSIG$v) + (func $null (; 54 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index d67287ed46..828f2f2bd9 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -8,7 +8,6 @@ (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$di (func (param i32) (result f64))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (type $FUNCSIG$id (func (param f64) (result i32))) @@ -354,7 +353,7 @@ if i32.const 0 i32.const 96 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -369,7 +368,7 @@ if i32.const 0 i32.const 96 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable @@ -3010,7 +3009,7 @@ if i32.const 0 i32.const 168 - i32.const 565 + i32.const 569 i32.const 10 call $~lib/env/abort unreachable @@ -3782,7 +3781,7 @@ if i32.const 0 i32.const 96 - i32.const 226 + i32.const 227 i32.const 57 call $~lib/env/abort unreachable @@ -4014,34 +4013,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - call $~lib/array/ensureCapacity - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=12 - end - ) - (func $~lib/array/Array#push (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -4067,30 +4039,7 @@ i32.store local.get $2 ) - (func $~lib/runtime/assertRegistered (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - i32.load - global.get $~lib/runtime/HEADER_MAGIC - i32.ne - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 199 - i32.const 2 - call $~lib/env/abort - unreachable - end - ) - (func $~lib/runtime/doLink (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - call $~lib/runtime/assertRegistered - local.get $1 - call $~lib/runtime/assertRegistered - ) - (func $~lib/string/String#split (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4133,19 +4082,21 @@ call $~lib/array/Array#constructor local.set $3 local.get $3 - i32.const 0 + i32.load offset=4 + local.set $4 + local.get $4 local.get $0 - call $~lib/array/Array#__set + i32.store local.get $3 end return end local.get $0 call $~lib/string/String#get:length - local.set $4 + local.set $5 local.get $1 call $~lib/string/String#get:length - local.set $5 + local.set $6 local.get $2 i32.const 0 i32.lt_s @@ -4153,10 +4104,10 @@ global.get $~lib/builtins/i32.MAX_VALUE local.set $2 end - local.get $5 + local.get $6 i32.eqz if - local.get $4 + local.get $5 i32.eqz if i32.const 0 @@ -4164,28 +4115,28 @@ call $~lib/array/Array#constructor return end - local.get $4 - local.tee $3 + local.get $5 + local.tee $4 local.get $2 - local.tee $6 + local.tee $3 + local.get $4 local.get $3 - local.get $6 i32.lt_s select - local.set $4 + local.set $5 i32.const 0 - local.get $4 + local.get $5 call $~lib/array/Array#constructor - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.load offset=4 - local.set $6 + local.set $3 block $break|0 i32.const 0 local.set $7 loop $repeat|0 local.get $7 - local.get $4 + local.get $5 i32.lt_s i32.eqz br_if $break|0 @@ -4205,7 +4156,7 @@ i32.add i32.load16_u i32.store16 - local.get $6 + local.get $3 local.get $7 i32.const 2 i32.shl @@ -4228,21 +4179,21 @@ end unreachable end - local.get $3 + local.get $4 return else - local.get $4 + local.get $5 i32.eqz if i32.const 0 i32.const 1 call $~lib/array/Array#constructor - local.set $6 - local.get $6 + local.set $3 + local.get $3 i32.load offset=4 i32.const 312 i32.store - local.get $6 + local.get $3 return end end @@ -4270,33 +4221,33 @@ local.get $11 local.get $12 i32.sub - local.set $6 - local.get $6 + local.set $3 + local.get $3 i32.const 0 i32.gt_s if block $~lib/runtime/ALLOCATE|inlined.9 (result i32) - local.get $6 + local.get $3 i32.const 1 i32.shl - local.set $3 - local.get $3 + local.set $4 + local.get $4 call $~lib/runtime/doAllocate end - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $0 local.get $12 i32.const 1 i32.shl i32.add - local.get $6 + local.get $3 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $10 block $~lib/runtime/REGISTER|inlined.8 (result i32) - local.get $3 + local.get $4 local.set $7 local.get $7 i32.const 1 @@ -4321,7 +4272,7 @@ return end local.get $11 - local.get $5 + local.get $6 i32.add local.set $12 end @@ -4335,23 +4286,15 @@ i32.const 0 i32.const 1 call $~lib/array/Array#constructor - local.set $6 - local.get $6 - local.tee $3 + local.set $3 + local.get $3 i32.load offset=4 - block $~lib/runtime/LINK>|inlined.0 (result i32) - local.get $0 - local.set $7 - local.get $7 - local.get $3 - call $~lib/runtime/doLink - local.get $7 - end + local.get $0 i32.store - local.get $6 + local.get $3 return end - local.get $4 + local.get $5 local.get $12 i32.sub local.set $14 @@ -4363,12 +4306,12 @@ local.get $14 i32.const 1 i32.shl - local.set $6 - local.get $6 + local.set $3 + local.get $3 call $~lib/runtime/doAllocate end - local.set $6 - local.get $6 + local.set $3 + local.get $3 local.get $0 local.get $12 i32.const 1 @@ -4380,9 +4323,9 @@ call $~lib/memory/memory.copy local.get $10 block $~lib/runtime/REGISTER|inlined.9 (result i32) - local.get $6 - local.set $3 local.get $3 + local.set $4 + local.get $4 i32.const 1 call $~lib/runtime/doRegister end @@ -4396,11 +4339,11 @@ end local.get $10 ) - (func $~lib/array/Array#get:length (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4423,7 +4366,7 @@ i32.add i32.load ) - (func $~lib/util/number/decimalCount32 (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -4492,7 +4435,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa32_lut (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 46 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4635,7 +4578,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4699,7 +4642,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/utoa32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4743,7 +4686,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/decimalCount64 (; 52 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 49 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -4812,7 +4755,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 53 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 50 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -4940,7 +4883,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 54 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 51 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5020,7 +4963,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa64 (; 55 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 52 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5122,19 +5065,19 @@ call $~lib/runtime/doRegister end ) - (func $~lib/builtins/isFinite (; 56 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 53 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 57 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 54 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/util/number/genDigits (; 58 ;) (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 (; 55 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -5705,7 +5648,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6038,7 +5981,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 60 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 57 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -6484,7 +6427,7 @@ local.get $2 i32.add ) - (func $~lib/string/String#substring (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6610,7 +6553,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/runtime/doDiscard (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/doDiscard (; 59 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -6618,7 +6561,7 @@ i32.sub call $~lib/memory/memory.free ) - (func $~lib/util/number/dtoa (; 63 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 60 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6674,7 +6617,7 @@ end local.get $4 ) - (func $start:std/string (; 64 ;) (type $FUNCSIG$v) + (func $start:std/string (; 61 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10066,12 +10009,12 @@ unreachable end ) - (func $std/string/getString (; 65 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 62 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 66 ;) (type $FUNCSIG$v) + (func $start (; 63 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 67 ;) (type $FUNCSIG$v) + (func $null (; 64 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 2113f214a7..759ef8a490 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 72 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -157,7 +157,7 @@ if i32.const 0 i32.const 72 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 50b9392d62..3dd3e95e0d 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -205,7 +205,7 @@ if i32.const 0 i32.const 72 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -220,7 +220,7 @@ if i32.const 0 i32.const 72 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 6e9cc65350..d82c5665be 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -403,7 +403,7 @@ if i32.const 0 i32.const 64 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -417,7 +417,7 @@ if i32.const 0 i32.const 64 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable @@ -465,7 +465,7 @@ if i32.const 0 i32.const 64 - i32.const 226 + i32.const 227 i32.const 57 call $~lib/env/abort unreachable @@ -8606,24 +8606,24 @@ local.get $0 i32.reinterpret_f32 local.tee $1 + i32.const -2147483648 + i32.and + local.set $4 + local.get $1 i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $2 - local.get $1 - i32.const -2147483648 - i32.and - local.set $4 - local.get $2 + local.tee $2 i32.const 255 i32.eq local.tee $3 - if (result i32) - local.get $3 - else + i32.eqz + if i32.const 0 + local.set $3 end + local.get $3 if local.get $0 f32.const 2 @@ -8677,7 +8677,7 @@ local.get $1 i32.const 8388608 i32.ge_u - if + if (result i32) local.get $1 i32.const 8388608 i32.eq @@ -8685,9 +8685,9 @@ local.get $1 i32.const 8388608 i32.sub - local.set $1 + else + local.get $1 end - local.get $1 i32.const 1 i32.shl local.set $1 @@ -8843,29 +8843,29 @@ (local $1 i64) (local $2 i64) (local $3 i64) - (local $4 i64) - (local $5 i32) + (local $4 i32) + (local $5 i64) local.get $0 i64.reinterpret_f64 local.tee $1 + i64.const 63 + i64.shr_u + local.set $5 + local.get $1 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $2 - local.get $1 - i64.const 63 - i64.shr_u - local.set $4 - local.get $2 + local.tee $2 i64.const 2047 i64.eq - local.tee $5 - if (result i32) - local.get $5 - else + local.tee $4 + i32.eqz + if i32.const 0 + local.set $4 end + local.get $4 if local.get $0 f64.const 2 @@ -8922,7 +8922,7 @@ local.get $1 i64.const 4503599627370496 i64.ge_u - if + if (result i64) local.get $1 i64.const 4503599627370496 i64.eq @@ -8930,9 +8930,9 @@ local.get $1 i64.const 4503599627370496 i64.sub - local.set $1 + else + local.get $1 end - local.get $1 i64.const 1 i64.shl local.set $1 @@ -8987,7 +8987,7 @@ i64.add i64.shr_u end - local.get $4 + local.get $5 i64.const 63 i64.shl i64.or diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index e34ee8789a..18a8381d2c 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -27,7 +27,9 @@ (type $FUNCSIG$ifii (func (param f32 i32 i32) (result i32))) (type $FUNCSIG$idii (func (param f64 i32 i32) (result i32))) (type $FUNCSIG$fff (func (param f32 f32) (result f32))) + (type $FUNCSIG$if (func (param f32) (result i32))) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) + (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vjii (func (param i64 i32 i32))) (type $FUNCSIG$vfii (func (param f32 i32 i32))) @@ -484,7 +486,7 @@ if i32.const 0 i32.const 64 - i32.const 191 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -499,7 +501,7 @@ if i32.const 0 i32.const 64 - i32.const 192 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable @@ -563,7 +565,7 @@ if i32.const 0 i32.const 64 - i32.const 226 + i32.const 227 i32.const 57 call $~lib/env/abort unreachable @@ -12258,7 +12260,12 @@ unreachable end ) - (func $~lib/math/NativeMathf.mod (; 301 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/builtins/isNaN (; 301 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + local.get $0 + local.get $0 + f32.ne + ) + (func $~lib/math/NativeMathf.mod (; 302 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12311,13 +12318,8 @@ local.get $8 else local.get $1 - local.set $9 - local.get $9 - local.get $9 - f32.ne + call $~lib/builtins/isNaN end - i32.const 0 - i32.ne if local.get $0 local.get $1 @@ -12514,14 +12516,14 @@ local.get $2 f32.reinterpret_i32 ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 302 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 303 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 303 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 304 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12588,12 +12590,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 304 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 305 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $std/typedarray/testArrayEvery (; 305 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 306 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12647,7 +12649,12 @@ unreachable end ) - (func $~lib/math/NativeMath.mod (; 306 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/builtins/isNaN (; 307 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + local.get $0 + local.get $0 + f64.ne + ) + (func $~lib/math/NativeMath.mod (; 308 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -12700,13 +12707,8 @@ local.get $8 else local.get $1 - local.set $9 - local.get $9 - local.get $9 - f64.ne + call $~lib/builtins/isNaN end - i32.const 0 - i32.ne if local.get $0 local.get $1 @@ -12905,14 +12907,14 @@ local.get $2 f64.reinterpret_i64 ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 307 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 309 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 308 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 310 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12979,12 +12981,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 309 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 311 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $std/typedarray/testArrayEvery (; 310 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 312 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13038,7 +13040,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 311 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 313 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13093,7 +13095,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 312 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#forEach (; 314 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13138,7 +13140,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 313 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 315 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13194,7 +13196,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 314 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 316 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13245,7 +13247,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8Array#forEach (; 315 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 317 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13290,7 +13292,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 316 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 318 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13340,7 +13342,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 317 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 319 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13391,7 +13393,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8ClampedArray#forEach (; 318 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#forEach (; 320 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13436,7 +13438,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 319 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 321 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13486,7 +13488,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 320 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 322 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13541,7 +13543,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 321 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#forEach (; 323 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13586,7 +13588,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 322 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 324 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13642,7 +13644,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 323 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 325 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13693,7 +13695,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint16Array#forEach (; 324 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 326 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13738,7 +13740,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 325 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 327 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13788,7 +13790,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 326 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 328 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13835,7 +13837,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 327 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 329 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13880,7 +13882,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 328 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 330 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13924,7 +13926,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 329 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 331 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13971,7 +13973,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint32Array#forEach (; 330 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint32Array#forEach (; 332 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14016,7 +14018,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 331 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 333 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14060,7 +14062,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 332 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 334 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14108,7 +14110,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 333 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 335 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14153,7 +14155,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 334 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 336 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14200,7 +14202,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 335 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 337 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14248,7 +14250,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint64Array#forEach (; 336 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint64Array#forEach (; 338 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14293,7 +14295,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 337 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 339 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14340,7 +14342,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 338 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 340 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14388,7 +14390,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 339 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#forEach (; 341 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14433,7 +14435,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 340 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 342 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14480,7 +14482,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 341 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 343 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14528,7 +14530,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 342 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#forEach (; 344 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14573,7 +14575,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 343 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 345 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14620,7 +14622,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#reverse (; 344 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 346 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14690,7 +14692,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse (; 345 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 347 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14854,7 +14856,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 346 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 348 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14924,7 +14926,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8Array#subarray (; 347 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 349 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15038,7 +15040,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 348 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 350 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15196,7 +15198,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#reverse (; 349 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reverse (; 351 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15266,7 +15268,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 350 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 352 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15380,7 +15382,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 351 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 353 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15538,7 +15540,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 352 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 354 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15608,7 +15610,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int16Array#subarray (; 353 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 355 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15722,7 +15724,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 354 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 356 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15886,7 +15888,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 355 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 357 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15956,7 +15958,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint16Array#subarray (; 356 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 358 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16070,7 +16072,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 357 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 359 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16228,7 +16230,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 358 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 360 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16298,7 +16300,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse (; 359 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 361 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16450,7 +16452,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#reverse (; 360 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reverse (; 362 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16520,7 +16522,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint32Array#subarray (; 361 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 363 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16634,7 +16636,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 362 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 364 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16786,7 +16788,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#reverse (; 363 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 365 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16856,7 +16858,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int64Array#subarray (; 364 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 366 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16970,7 +16972,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 365 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 367 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17125,7 +17127,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#reverse (; 366 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#reverse (; 368 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17195,7 +17197,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint64Array#subarray (; 367 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 369 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17309,7 +17311,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 368 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 370 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17464,7 +17466,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 369 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 371 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17534,7 +17536,7 @@ end local.get $1 ) - (func $~lib/typedarray/Float32Array#subarray (; 370 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 372 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17648,7 +17650,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 371 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 373 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17803,7 +17805,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 372 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 374 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17873,7 +17875,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse (; 373 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 375 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18028,7 +18030,7 @@ unreachable end ) - (func $start:std/typedarray (; 374 ;) (type $FUNCSIG$v) + (func $start:std/typedarray (; 376 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32.const 1 @@ -19304,9 +19306,9 @@ call $std/typedarray/testArrayReverse call $std/typedarray/testArrayReverse ) - (func $start (; 375 ;) (type $FUNCSIG$v) + (func $start (; 377 ;) (type $FUNCSIG$v) call $start:std/typedarray ) - (func $null (; 376 ;) (type $FUNCSIG$v) + (func $null (; 378 ;) (type $FUNCSIG$v) ) ) From d42ef51cf07f82a653e32019d33077f900bd44dd Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 19 Mar 2019 10:09:06 +0100 Subject: [PATCH 050/119] update n-body for comparison --- examples/n-body/assembly/index.ts | 4 +- examples/n-body/build/index.asm.js | 419 +++++---- examples/n-body/build/optimized.wasm | Bin 2128 -> 2241 bytes examples/n-body/build/optimized.wat | 614 +++++++------ examples/n-body/build/untouched.wat | 1256 +++++++++++++------------- src/resolver.ts | 12 + 6 files changed, 1209 insertions(+), 1096 deletions(-) diff --git a/examples/n-body/assembly/index.ts b/examples/n-body/assembly/index.ts index 6f3ea91260..9a37c2d6ae 100644 --- a/examples/n-body/assembly/index.ts +++ b/examples/n-body/assembly/index.ts @@ -96,7 +96,7 @@ class NBodySystem { py += b.vy * m; pz += b.vz * m; } - bodies[0].offsetMomentum(px, py, pz); + unchecked(bodies[0]).offsetMomentum(px, py, pz); } advance(dt: float): void { @@ -206,5 +206,5 @@ export function bench(steps: u32): void { export function getBody(index: i32): Body | null { var bodies = system.bodies; - return index < bodies.length ? bodies[index] : null; + return index < bodies.length ? unchecked(bodies[index]) : null; } diff --git a/examples/n-body/build/index.asm.js b/examples/n-body/build/index.asm.js index 8dd198d0fc..f9dbb20de6 100644 --- a/examples/n-body/build/index.asm.js +++ b/examples/n-body/build/index.asm.js @@ -20,32 +20,45 @@ function asmFunc(global, env, buffer) { var abort = env.abort; var nan = global.NaN; var infinity = global.Infinity; + var assembly_index_system = 0; var $lib_allocator_arena_startOffset = 0; var $lib_allocator_arena_offset = 0; - var assembly_index_system = 0; var i64toi32_i32$HIGH_BITS = 0; - function $lib_allocator_arena___memory_allocate($0) { + function $lib_memory_memory_allocate($0) { $0 = $0 | 0; var $1 = 0, $2 = 0, $3 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0; if ($0 >>> 0 > 1073741824 >>> 0) abort(); $1 = $lib_allocator_arena_offset; - $2 = (($1 + (wasm2js_i32$0 = $0, wasm2js_i32$1 = 1, wasm2js_i32$2 = $0 >>> 0 > 1 >>> 0, wasm2js_i32$2 ? wasm2js_i32$0 : wasm2js_i32$1) | 0) + 7 | 0) & 4294967288 | 0; - $3 = __wasm_current_memory(); - if ($2 >>> 0 > ($3 << 16 | 0) >>> 0) { - $0 = ((($2 - $1 | 0) + 65535 | 0) & 4294901760 | 0) >>> 16 | 0; - if ((__wasm_grow_memory((wasm2js_i32$0 = $3, wasm2js_i32$1 = $0, wasm2js_i32$2 = ($3 | 0) > ($0 | 0), wasm2js_i32$2 ? wasm2js_i32$0 : wasm2js_i32$1) | 0) | 0) < (0 | 0)) if ((__wasm_grow_memory($0 | 0) | 0) < (0 | 0)) abort();; + $0 = (($1 + (wasm2js_i32$0 = $0, wasm2js_i32$1 = 1, wasm2js_i32$2 = $0 >>> 0 > 1 >>> 0, wasm2js_i32$2 ? wasm2js_i32$0 : wasm2js_i32$1) | 0) + 7 | 0) & 4294967288 | 0; + $2 = __wasm_current_memory(); + if ($0 >>> 0 > ($2 << 16 | 0) >>> 0) { + $3 = ((($0 - $1 | 0) + 65535 | 0) & 4294901760 | 0) >>> 16 | 0; + if ((__wasm_grow_memory((wasm2js_i32$0 = $2, wasm2js_i32$1 = $3, wasm2js_i32$2 = ($2 | 0) > ($3 | 0), wasm2js_i32$2 ? wasm2js_i32$0 : wasm2js_i32$1) | 0) | 0) < (0 | 0)) if ((__wasm_grow_memory($3 | 0) | 0) < (0 | 0)) abort();; } - $lib_allocator_arena_offset = $2; + $lib_allocator_arena_offset = $0; return $1 | 0; } + function $lib_runtime_doAllocate($0) { + $0 = $0 | 0; + var $1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; + $1 = $lib_memory_memory_allocate(1 << (32 - Math_clz32($0 + 7 | 0) | 0) | 0 | 0) | 0; + wasm2js_i32$0 = $1; + wasm2js_i32$1 = 2774420247; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $1; + wasm2js_i32$1 = $0; + HEAP32[(wasm2js_i32$0 + 4 | 0) >> 2] = wasm2js_i32$1; + return $1 + 8 | 0 | 0; + } + function assembly_index_NBodySystem_constructor($0) { $0 = $0 | 0; - var $1 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $49 = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0; - $7 = HEAP32[($0 + 4 | 0) >> 2] | 0; + var $1 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0; + $7 = HEAP32[($0 + 12 | 0) >> 2] | 0; repeat_0 : do { if (($1 | 0) < ($7 | 0)) { - $2 = HEAPU32[(((HEAPU32[$0 >> 2] | 0) + ($1 << 2 | 0) | 0) + 8 | 0) >> 2] | 0; + $2 = HEAPU32[((HEAP32[($0 + 4 | 0) >> 2] | 0) + ($1 << 2 | 0) | 0) >> 2] | 0; $3 = +HEAPF64[($2 + 48 | 0) >> 3]; $4 = $4 + +HEAPF64[($2 + 24 | 0) >> 3] * $3; $5 = $5 + +HEAPF64[($2 + 32 | 0) >> 3] * $3; @@ -55,9 +68,7 @@ function asmFunc(global, env, buffer) { } break repeat_0; } while (1); - $1 = HEAPU32[$0 >> 2] | 0; - if (0 >>> 0 < ((HEAP32[$1 >> 2] | 0) >>> 2 | 0) >>> 0) $49 = HEAPU32[($1 + 8 | 0) >> 2] | 0; else abort(); - $1 = $49; + $1 = HEAPU32[(HEAP32[($0 + 4 | 0) >> 2] | 0) >> 2] | 0; wasm2js_i32$0 = $1; wasm2js_f64$0 = -$4 / 39.47841760435743; HEAPF64[(wasm2js_i32$0 + 24 | 0) >> 3] = wasm2js_f64$0; @@ -67,7 +78,10 @@ function asmFunc(global, env, buffer) { wasm2js_i32$0 = $1; wasm2js_f64$0 = -$6 / 39.47841760435743; HEAPF64[(wasm2js_i32$0 + 40 | 0) >> 3] = wasm2js_f64$0; - $1 = $lib_allocator_arena___memory_allocate(4 | 0) | 0; + $1 = $lib_runtime_doAllocate(4 | 0) | 0; + wasm2js_i32$0 = $1 - 8 | 0; + wasm2js_i32$1 = 1; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; wasm2js_i32$0 = $1; wasm2js_i32$1 = $0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -82,8 +96,11 @@ function asmFunc(global, env, buffer) { $4 = +$4; $5 = +$5; $6 = +$6; - var $7 = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0; - $7 = $lib_allocator_arena___memory_allocate(56 | 0) | 0; + var $7 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_f64$0 = 0.0; + $7 = $lib_runtime_doAllocate(56 | 0) | 0; + wasm2js_i32$0 = $7 - 8 | 0; + wasm2js_i32$1 = 2; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; wasm2js_i32$0 = $7; wasm2js_f64$0 = $0; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; @@ -108,174 +125,201 @@ function asmFunc(global, env, buffer) { return $7 | 0; } - function $lib_internal_memory_memset($0) { + function $lib_memory_memory_fill($0) { $0 = $0 | 0; var $1 = 0, $2 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0, wasm2js_i32$3 = 0; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - $1 = $0 + 20 | 0; - wasm2js_i32$0 = $1 - 1 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 1 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 2 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - wasm2js_i32$0 = $1 - 2 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - wasm2js_i32$0 = $1 - 3 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 3 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - wasm2js_i32$0 = $1 - 4 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - $1 = (0 - $0 | 0) & 3 | 0; - $0 = $1 + $0 | 0; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - $2 = (20 - $1 | 0) & 4294967292 | 0; - wasm2js_i32$0 = ($2 + $0 | 0) - 4 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - if ($2 >>> 0 <= 8 >>> 0) return; - wasm2js_i32$0 = $0 + 4 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 8 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - $1 = $0 + $2 | 0; - wasm2js_i32$0 = $1 - 12 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + $lib_util_memory_memset_inlined_0 : { + wasm2js_i32$0 = $0; + wasm2js_i32$1 = 0; + HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; + $1 = $0 + 20 | 0; + wasm2js_i32$0 = $1 - 1 | 0; + wasm2js_i32$1 = 0; + HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; + wasm2js_i32$0 = $0 + 1 | 0; + wasm2js_i32$1 = 0; + HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; + wasm2js_i32$0 = $0 + 2 | 0; + wasm2js_i32$1 = 0; + HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; + wasm2js_i32$0 = $1 - 2 | 0; + wasm2js_i32$1 = 0; + HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; + wasm2js_i32$0 = $1 - 3 | 0; + wasm2js_i32$1 = 0; + HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; + wasm2js_i32$0 = $0 + 3 | 0; + wasm2js_i32$1 = 0; + HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; + wasm2js_i32$0 = $1 - 4 | 0; + wasm2js_i32$1 = 0; + HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; + $1 = (0 - $0 | 0) & 3 | 0; + $2 = 20 - $1 | 0; + $0 = $0 + $1 | 0; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + $2 = $2 & 4294967292 | 0; + wasm2js_i32$0 = ($2 + $0 | 0) - 4 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + if ($2 >>> 0 <= 8 >>> 0) break $lib_util_memory_memset_inlined_0; + wasm2js_i32$0 = $0 + 4 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0 + 8 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + $1 = $0 + $2 | 0; + wasm2js_i32$0 = $1 - 12 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $1 - 8 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + if ($2 >>> 0 <= 24 >>> 0) break $lib_util_memory_memset_inlined_0; + wasm2js_i32$0 = $0 + 12 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0 + 16 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0 + 20 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0 + 24 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + $1 = $0 + $2 | 0; + wasm2js_i32$0 = $1 - 28 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $1 - 24 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $1 - 20 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $1 - 16 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + $1 = ($0 & 4 | 0) + 24 | 0; + $0 = $1 + $0 | 0; + $2 = $2 - $1 | 0; + continue_0 : do { + if ($2 >>> 0 >= 32 >>> 0) { + i64toi32_i32$1 = $0; + i64toi32_i32$0 = 0; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = i64toi32_i32$0; + (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; + i64toi32_i32$1 = $0 + 8 | 0; + i64toi32_i32$0 = 0; + wasm2js_i32$0 = i64toi32_i32$1; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = i64toi32_i32$1; + wasm2js_i32$1 = i64toi32_i32$0; + (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; + i64toi32_i32$1 = $0 + 16 | 0; + i64toi32_i32$0 = 0; + wasm2js_i32$0 = i64toi32_i32$1; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = i64toi32_i32$1; + wasm2js_i32$1 = i64toi32_i32$0; + (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; + i64toi32_i32$1 = $0 + 24 | 0; + i64toi32_i32$0 = 0; + wasm2js_i32$0 = i64toi32_i32$1; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = i64toi32_i32$1; + wasm2js_i32$1 = i64toi32_i32$0; + (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; + $2 = $2 - 32 | 0; + $0 = $0 + 32 | 0; + continue continue_0; + } + break continue_0; + } while (1); + }; + } + + function $lib_runtime_ArrayBufferView_constructor($0) { + $0 = $0 | 0; + var $1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; + $1 = $lib_runtime_doAllocate(20 | 0) | 0; + $lib_memory_memory_fill($1 | 0); wasm2js_i32$0 = $1 - 8 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - if ($2 >>> 0 <= 24 >>> 0) return; - wasm2js_i32$0 = $0 + 12 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 16 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 20 | 0; - wasm2js_i32$1 = 0; + wasm2js_i32$1 = 4; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 24 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - $1 = $0 + $2 | 0; - wasm2js_i32$0 = $1 - 28 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $1 - 24 | 0; + if (($0 | 0) == (0 | 0)) { + $0 = $lib_runtime_doAllocate(12 | 0) | 0; + wasm2js_i32$0 = $0 - 8 | 0; + wasm2js_i32$1 = 5; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + } + wasm2js_i32$0 = $0; wasm2js_i32$1 = 0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $1 - 20 | 0; + wasm2js_i32$0 = $0; wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $1 - 16 | 0; + HEAP32[(wasm2js_i32$0 + 4 | 0) >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; wasm2js_i32$1 = 0; + HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = $1; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - $1 = ($0 & 4 | 0) + 24 | 0; - $0 = $1 + $0 | 0; - $2 = $2 - $1 | 0; - continue_0 : do { - if ($2 >>> 0 >= 32 >>> 0) { - i64toi32_i32$1 = $0; - i64toi32_i32$0 = 0; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = i64toi32_i32$0; - (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; - i64toi32_i32$1 = $0 + 8 | 0; - i64toi32_i32$0 = 0; - wasm2js_i32$0 = i64toi32_i32$1; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = i64toi32_i32$1; - wasm2js_i32$1 = i64toi32_i32$0; - (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; - i64toi32_i32$1 = $0 + 16 | 0; - i64toi32_i32$0 = 0; - wasm2js_i32$0 = i64toi32_i32$1; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = i64toi32_i32$1; - wasm2js_i32$1 = i64toi32_i32$0; - (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; - i64toi32_i32$1 = $0 + 24 | 0; - i64toi32_i32$0 = 0; - wasm2js_i32$0 = i64toi32_i32$1; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = i64toi32_i32$1; - wasm2js_i32$1 = i64toi32_i32$0; - (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; - $2 = $2 - 32 | 0; - $0 = $0 + 32 | 0; - continue continue_0; - } - break continue_0; - } while (1); + wasm2js_i32$0 = $0; + wasm2js_i32$1 = $1; + HEAP32[(wasm2js_i32$0 + 4 | 0) >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = 20; + HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; + return $0 | 0; } function $lib_array_Array_Body__constructor() { - var $0 = 0, $1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; - $1 = $lib_allocator_arena___memory_allocate(32 | 0) | 0; - wasm2js_i32$0 = $1; - wasm2js_i32$1 = 20; + var $0 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; + $0 = $lib_runtime_doAllocate(16 | 0) | 0; + wasm2js_i32$0 = $0 - 8 | 0; + wasm2js_i32$1 = 6; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - $0 = $lib_allocator_arena___memory_allocate(8 | 0) | 0; + $0 = $lib_runtime_ArrayBufferView_constructor($0 | 0) | 0; wasm2js_i32$0 = $0; wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = 0; - HEAP32[(wasm2js_i32$0 + 4 | 0) >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = $1; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + HEAP32[(wasm2js_i32$0 + 12 | 0) >> 2] = wasm2js_i32$1; wasm2js_i32$0 = $0; wasm2js_i32$1 = 5; - HEAP32[(wasm2js_i32$0 + 4 | 0) >> 2] = wasm2js_i32$1; - $lib_internal_memory_memset($1 + 8 | 0 | 0); + HEAP32[(wasm2js_i32$0 + 12 | 0) >> 2] = wasm2js_i32$1; return $0 | 0; } function assembly_index_init() { var $0 = 0, $1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; $1 = $lib_array_Array_Body__constructor() | 0; - $0 = assembly_index_Body_constructor(+(0.0), +(0.0), +(0.0), +(0.0), +(0.0), +(0.0), +(39.47841760435743)) | 0; - wasm2js_i32$0 = HEAPU32[$1 >> 2] | 0; - wasm2js_i32$1 = $0; - HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; - $0 = assembly_index_Body_constructor(+(4.841431442464721), +(-1.1603200440274284), +(-.10362204447112311), +(.606326392995832), +(2.81198684491626), +(-.02521836165988763), +(.03769367487038949)) | 0; - wasm2js_i32$0 = (HEAPU32[$1 >> 2] | 0) + 4 | 0; - wasm2js_i32$1 = $0; - HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; - $0 = assembly_index_Body_constructor(+(8.34336671824458), +(4.124798564124305), +(-.4035234171143214), +(-1.0107743461787924), +(1.8256623712304119), +(.008415761376584154), +(.011286326131968767)) | 0; - wasm2js_i32$0 = (HEAPU32[$1 >> 2] | 0) + 8 | 0; - wasm2js_i32$1 = $0; - HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; - $0 = assembly_index_Body_constructor(+(12.894369562139131), +(-15.111151401698631), +(-.22330757889265573), +(1.0827910064415354), +(.8687130181696082), +(-.010832637401363636), +(1.7237240570597112e-03)) | 0; - wasm2js_i32$0 = (HEAPU32[$1 >> 2] | 0) + 12 | 0; - wasm2js_i32$1 = $0; - HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; - $0 = assembly_index_Body_constructor(+(15.379697114850917), +(-25.919314609987964), +(.17925877295037118), +(.979090732243898), +(.5946989986476762), +(-.034755955504078104), +(2.0336868699246304e-03)) | 0; - wasm2js_i32$0 = (HEAPU32[$1 >> 2] | 0) + 16 | 0; - wasm2js_i32$1 = $0; + $0 = HEAPU32[($1 + 4 | 0) >> 2] | 0; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = assembly_index_Body_constructor(+(0.0), +(0.0), +(0.0), +(0.0), +(0.0), +(0.0), +(39.47841760435743)) | 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = assembly_index_Body_constructor(+(4.841431442464721), +(-1.1603200440274284), +(-.10362204447112311), +(.606326392995832), +(2.81198684491626), +(-.02521836165988763), +(.03769367487038949)) | 0; + HEAP32[(wasm2js_i32$0 + 4 | 0) >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = assembly_index_Body_constructor(+(8.34336671824458), +(4.124798564124305), +(-.4035234171143214), +(-1.0107743461787924), +(1.8256623712304119), +(.008415761376584154), +(.011286326131968767)) | 0; HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = assembly_index_Body_constructor(+(12.894369562139131), +(-15.111151401698631), +(-.22330757889265573), +(1.0827910064415354), +(.8687130181696082), +(-.010832637401363636), +(1.7237240570597112e-03)) | 0; + HEAP32[(wasm2js_i32$0 + 12 | 0) >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = assembly_index_Body_constructor(+(15.379697114850917), +(-25.919314609987964), +(.17925877295037118), +(.979090732243898), +(.5946989986476762), +(-.034755955504078104), +(2.0336868699246304e-03)) | 0; + HEAP32[(wasm2js_i32$0 + 16 | 0) >> 2] = wasm2js_i32$1; assembly_index_system = assembly_index_NBodySystem_constructor($1 | 0) | 0; } @@ -283,10 +327,10 @@ function asmFunc(global, env, buffer) { $0 = $0 | 0; var $1 = 0, $2 = 0.0, $8 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $9 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $18 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0; $12 = HEAPU32[$0 >> 2] | 0; - $13 = HEAP32[($12 + 4 | 0) >> 2] | 0; + $13 = HEAP32[($12 + 12 | 0) >> 2] | 0; repeat_0 : do { if ($3 >>> 0 < $13 >>> 0) { - $0 = HEAPU32[(((HEAPU32[$12 >> 2] | 0) + ($3 << 2 | 0) | 0) + 8 | 0) >> 2] | 0; + $0 = HEAPU32[((HEAP32[($12 + 4 | 0) >> 2] | 0) + ($3 << 2 | 0) | 0) >> 2] | 0; $14 = +HEAPF64[$0 >> 3]; $15 = +HEAPF64[($0 + 8 | 0) >> 3]; $16 = +HEAPF64[($0 + 16 | 0) >> 3]; @@ -297,7 +341,7 @@ function asmFunc(global, env, buffer) { $7 = $3 + 1 | 0; repeat_1 : do { if ($7 >>> 0 < $13 >>> 0) { - $1 = HEAPU32[(((HEAPU32[$12 >> 2] | 0) + ($7 << 2 | 0) | 0) + 8 | 0) >> 2] | 0; + $1 = HEAPU32[((HEAP32[($12 + 4 | 0) >> 2] | 0) + ($7 << 2 | 0) | 0) >> 2] | 0; $18 = $14 - +HEAPF64[$1 >> 3]; $2 = $18; $9 = $15 - +HEAPF64[($1 + 8 | 0) >> 3]; @@ -351,33 +395,35 @@ function asmFunc(global, env, buffer) { function assembly_index_NBodySystem_energy($0) { $0 = $0 | 0; - var $1 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $10 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, $30 = 0.0, $39 = 0.0, $45 = 0.0, $69 = 0.0, $84 = 0.0; + var $1 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $9 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $30 = 0.0, $39 = 0.0, $45 = 0.0, $10 = 0.0, $72 = 0.0, $86 = 0.0; $4 = HEAPU32[$0 >> 2] | 0; - $5 = HEAP32[($4 + 4 | 0) >> 2] | 0; + $5 = HEAP32[($4 + 12 | 0) >> 2] | 0; repeat_0 : do { if ($2 >>> 0 < $5 >>> 0) { - $0 = HEAPU32[(((HEAPU32[$4 >> 2] | 0) + ($2 << 2 | 0) | 0) + 8 | 0) >> 2] | 0; - $7 = +HEAPF64[$0 >> 3]; - $8 = +HEAPF64[($0 + 8 | 0) >> 3]; - $9 = +HEAPF64[($0 + 16 | 0) >> 3]; + $0 = HEAPU32[((HEAP32[($4 + 4 | 0) >> 2] | 0) + ($2 << 2 | 0) | 0) >> 2] | 0; + $6 = +HEAPF64[$0 >> 3]; + $7 = +HEAPF64[($0 + 8 | 0) >> 3]; + $8 = +HEAPF64[($0 + 16 | 0) >> 3]; $30 = $1; - $10 = +HEAPF64[($0 + 48 | 0) >> 3]; + $9 = +HEAPF64[($0 + 48 | 0) >> 3]; $1 = +HEAPF64[($0 + 24 | 0) >> 3]; $39 = $1 * $1; $1 = +HEAPF64[($0 + 32 | 0) >> 3]; $45 = $39 + $1 * $1; $1 = +HEAPF64[($0 + 40 | 0) >> 3]; - $1 = $30 + .5 * $10 * ($45 + $1 * $1); + $1 = $30 + .5 * $9 * ($45 + $1 * $1); $0 = $2 + 1 | 0; repeat_1 : do { if ($0 >>> 0 < $5 >>> 0) { - $3 = HEAPU32[(((HEAPU32[$4 >> 2] | 0) + ($0 << 2 | 0) | 0) + 8 | 0) >> 2] | 0; - $6 = $7 - +HEAPF64[$3 >> 3]; - $69 = $1; - $1 = $8 - +HEAPF64[($3 + 8 | 0) >> 3]; - $84 = $6 * $6 + $1 * $1; - $1 = $9 - +HEAPF64[($3 + 16 | 0) >> 3]; - $1 = $69 - $10 * +HEAPF64[($3 + 48 | 0) >> 3] / Math_sqrt($84 + $1 * $1); + $10 = $1; + $3 = HEAPU32[((HEAP32[($4 + 4 | 0) >> 2] | 0) + ($0 << 2 | 0) | 0) >> 2] | 0; + $1 = $6 - +HEAPF64[$3 >> 3]; + $72 = $1 * $1; + $1 = $7 - +HEAPF64[($3 + 8 | 0) >> 3]; + $1 = $72 + $1 * $1; + $86 = $1; + $1 = $8 - +HEAPF64[($3 + 16 | 0) >> 3]; + $1 = $10 - $9 * +HEAPF64[($3 + 48 | 0) >> 3] / Math_sqrt($86 + $1 * $1); $0 = $0 + 1 | 0; continue repeat_1; } @@ -412,18 +458,14 @@ function asmFunc(global, env, buffer) { function assembly_index_getBody($0) { $0 = $0 | 0; - var $1 = 0, $22 = 0, $20 = 0; + var $1 = 0, $14 = 0; $1 = HEAPU32[assembly_index_system >> 2] | 0; - if ($0 >>> 0 < (HEAP32[($1 + 4 | 0) >> 2] | 0) >>> 0) { - $1 = HEAPU32[$1 >> 2] | 0; - if ($0 >>> 0 < ((HEAP32[$1 >> 2] | 0) >>> 2 | 0) >>> 0) $20 = HEAPU32[((($0 << 2 | 0) + $1 | 0) + 8 | 0) >> 2] | 0; else abort(); - $22 = $20; - } else $22 = 0; - return $22 | 0; + if ($0 >>> 0 < (HEAP32[($1 + 12 | 0) >> 2] | 0) >>> 0) $14 = HEAPU32[((HEAP32[($1 + 4 | 0) >> 2] | 0) + ($0 << 2 | 0) | 0) >> 2] | 0; else $14 = 0; + return $14 | 0; } function start() { - $lib_allocator_arena_startOffset = 40; + $lib_allocator_arena_startOffset = 96; $lib_allocator_arena_offset = $lib_allocator_arena_startOffset; } @@ -493,7 +535,8 @@ const assignasmFunc = ( } } )(memasmFunc); -assignasmFunc(8, "DQAAAH4AbABpAGIALwBhAHIAcgBhAHkALgB0AHM="); +assignasmFunc(8, "AwAAAB4AAAB+AGwAaQBiAC8AcgB1AG4AdABpAG0AZQAuAHQAcw=="); +assignasmFunc(48, "AwAAACYAAAB+AGwAaQBiAC8AYQByAHIAYQB5AGIAdQBmAGYAZQByAC4AdABz"); const retasmFunc = asmFunc({Math,Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,NaN,Infinity}, {abort:function() { throw new Error('abort'); }},memasmFunc); export const memory = retasmFunc.memory; export const init = retasmFunc.init; diff --git a/examples/n-body/build/optimized.wasm b/examples/n-body/build/optimized.wasm index e299a576636a897ddadd808bbeae47acd411cfac..8405b87c4fea16867f61732a02b3ddfa72505970 100644 GIT binary patch delta 985 zcmY*YziSjh6n<}h-0o%W%qZysIyZL-5s3+kN1|YM#1LZ;5kV`9B%X=88ogvAi3C^d zMP(tjnnn;S#XrDOw6L}@opzRDrEhjm#XXic-<$V+^WL{}pY*%Ek6ozy5m5?!GIJse z#9G?94SjNJ|;YEEO zh{!KVHosghNjiT~E{UH15YaIz&;~VYfqKB1%<6^jV1+kdlKITYSu&rnAOm{lZ^)TG zVR#R|c`vJY;VUwcReE&p>7w{{!qW-=`*s!%acEQwg|HF$pc|o)r=fUur+jAIR`X`i zo{*+elA(8)Wkh~%rI9-(Fa*L9JZnf(^>}>8NE7Cdg3%0g*aTfw2gptq72Ux3I#MpA zi-d6lYoO?k4$;1WCS5SPl+^jG$c(p?oGu5J^oLOj+%B}Ri7lo$pi)=pj)ZE6Q``IL zy$3hoIxN5#tin31KzfqkP3XX3NMQ}!xEl4P!~d1eQ}HUy!zK~e;TruqgbT)RLgbd$ delta 875 zcmYjP!Dd|E#W>G;c$gZFn94m&FL(%K$WT6>w!6AuF|7ete#Bc%xnP(N$=o7h z;TICfN=rA)A3`e1WqL9v2{ydi41xVjN|k8e4881bW+a%`8x_dp?L(bUyYf3-*Ol>? zJ}oau9?y~%eKSz4n4>H*F-fLbejX|SZ-R&3_7j89TA*ibCRpv^g4k z`OVy|i-cqM^K?|h$G?$u5sm38&~>Gn4s`J+RD&4>Y0Pri)P^HTYi#a7_54~2$ZS?G z*W>y5ctjNePX&jgG!n(@LG#(6$Q=#Y2FD&{hRyJhYvs@QNJ_(|_~hz@3K+xE$pRVKe^&?JX+sOz=oFxn%@>K? crG|8|2QT2#constructor (; 4 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array#constructor (; 6 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) - (local $1 i32) - i32.const 32 - call $~lib/allocator/arena/__memory_allocate - local.tee $1 - i32.const 20 - i32.store - i32.const 8 - call $~lib/allocator/arena/__memory_allocate + i32.const 16 + call $~lib/runtime/doAllocate local.tee $0 - i32.const 0 + i32.const 8 + i32.sub + i32.const 6 i32.store local.get $0 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $0 i32.const 0 - i32.store offset=4 - local.get $0 - local.get $1 - i32.store + i32.store offset=12 local.get $0 i32.const 5 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - call $~lib/internal/memory/memset + i32.store offset=12 local.get $0 ) - (func $assembly/index/init (; 5 ;) (type $FUNCSIG$v) + (func $assembly/index/init (; 7 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/array/Array#constructor - local.set $1 + local.tee $1 + i32.load offset=4 + local.tee $0 f64.const 0 f64.const 0 f64.const 0 @@ -436,11 +492,8 @@ f64.const 0 f64.const 39.47841760435743 call $assembly/index/Body#constructor - local.set $0 - local.get $1 - i32.load + i32.store local.get $0 - i32.store offset=8 f64.const 4.841431442464721 f64.const -1.1603200440274284 f64.const -0.10362204447112311 @@ -449,13 +502,8 @@ f64.const -0.02521836165988763 f64.const 0.03769367487038949 call $assembly/index/Body#constructor - local.set $0 - local.get $1 - i32.load - i32.const 4 - i32.add + i32.store offset=4 local.get $0 - i32.store offset=8 f64.const 8.34336671824458 f64.const 4.124798564124305 f64.const -0.4035234171143214 @@ -464,13 +512,8 @@ f64.const 0.008415761376584154 f64.const 0.011286326131968767 call $assembly/index/Body#constructor - local.set $0 - local.get $1 - i32.load - i32.const 8 - i32.add - local.get $0 i32.store offset=8 + local.get $0 f64.const 12.894369562139131 f64.const -15.111151401698631 f64.const -0.22330757889265573 @@ -479,13 +522,8 @@ f64.const -0.010832637401363636 f64.const 1.7237240570597112e-03 call $assembly/index/Body#constructor - local.set $0 - local.get $1 - i32.load - i32.const 12 - i32.add + i32.store offset=12 local.get $0 - i32.store offset=8 f64.const 15.379697114850917 f64.const -25.919314609987964 f64.const 0.17925877295037118 @@ -494,18 +532,12 @@ f64.const -0.034755955504078104 f64.const 2.0336868699246304e-03 call $assembly/index/Body#constructor - local.set $0 - local.get $1 - i32.load - i32.const 16 - i32.add - local.get $0 - i32.store offset=8 + i32.store offset=16 local.get $1 call $assembly/index/NBodySystem#constructor global.set $assembly/index/system ) - (func $assembly/index/NBodySystem#advance (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/NBodySystem#advance (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 f64) (local $3 i32) @@ -527,7 +559,7 @@ local.get $0 i32.load local.tee $12 - i32.load offset=4 + i32.load offset=12 local.set $13 loop $repeat|0 local.get $3 @@ -535,12 +567,12 @@ i32.lt_u if local.get $12 - i32.load + i32.load offset=4 local.get $3 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.tee $0 f64.load local.set $14 @@ -573,12 +605,12 @@ if local.get $14 local.get $12 - i32.load + i32.load offset=4 local.get $7 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.tee $1 f64.load f64.sub @@ -707,7 +739,7 @@ end end ) - (func $assembly/index/NBodySystem#energy (; 7 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $assembly/index/NBodySystem#energy (; 9 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -721,7 +753,7 @@ local.get $0 i32.load local.tee $4 - i32.load offset=4 + i32.load offset=12 local.set $5 loop $repeat|0 local.get $2 @@ -729,26 +761,26 @@ i32.lt_u if local.get $4 - i32.load + i32.load offset=4 local.get $2 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.tee $0 f64.load - local.set $7 + local.set $6 local.get $0 f64.load offset=8 - local.set $8 + local.set $7 local.get $0 f64.load offset=16 - local.set $9 + local.set $8 local.get $1 f64.const 0.5 local.get $0 f64.load offset=48 - local.tee $10 + local.tee $9 f64.mul local.get $0 f64.load offset=24 @@ -779,27 +811,23 @@ local.get $5 i32.lt_u if - local.get $7 + local.get $1 + local.set $10 + local.get $6 local.get $4 - i32.load + i32.load offset=4 local.get $0 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.tee $3 f64.load f64.sub - local.set $6 + local.tee $1 local.get $1 - local.get $10 - local.get $3 - f64.load offset=48 - f64.mul - local.get $6 - local.get $6 f64.mul - local.get $8 + local.get $7 local.get $3 f64.load offset=8 f64.sub @@ -807,8 +835,15 @@ local.get $1 f64.mul f64.add + local.set $1 + local.get $10 local.get $9 local.get $3 + f64.load offset=48 + f64.mul + local.get $1 + local.get $8 + local.get $3 f64.load offset=16 f64.sub local.tee $1 @@ -835,13 +870,13 @@ end local.get $1 ) - (func $assembly/index/step (; 8 ;) (type $FUNCSIG$d) (result f64) + (func $assembly/index/step (; 10 ;) (type $FUNCSIG$d) (result f64) global.get $assembly/index/system call $assembly/index/NBodySystem#advance global.get $assembly/index/system call $assembly/index/NBodySystem#energy ) - (func $assembly/index/bench (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/bench (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) block $break|0 loop $repeat|0 @@ -861,44 +896,33 @@ unreachable end ) - (func $assembly/index/getBody (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/getBody (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 global.get $assembly/index/system i32.load local.tee $1 - i32.load offset=4 + i32.load offset=12 i32.lt_u if (result i32) - local.get $0 local.get $1 - i32.load - local.tee $1 - i32.load + i32.load offset=4 + local.get $0 i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end + i32.shl + i32.add + i32.load else i32.const 0 end ) - (func $start (; 11 ;) (type $FUNCSIG$v) - i32.const 40 + (func $start (; 13 ;) (type $FUNCSIG$v) + i32.const 96 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 14 ;) (type $FUNCSIG$v) nop ) ) diff --git a/examples/n-body/build/untouched.wat b/examples/n-body/build/untouched.wat index 8077faeef7..0532282d10 100644 --- a/examples/n-body/build/untouched.wat +++ b/examples/n-body/build/untouched.wat @@ -1,29 +1,35 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$iiddd (func (param i32 f64 f64 f64) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iiddd (func (param i32 f64 f64 f64) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iiddddddd (func (param i32 f64 f64 f64 f64 f64 f64 f64) (result i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$d (func (result f64))) (type $FUNCSIG$vid (func (param i32 f64))) (type $FUNCSIG$di (func (param i32) (result f64))) - (type $FUNCSIG$vi (func (param i32))) (import "env" "memory" (memory $0 1)) - (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 40) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 48) "\02\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") (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/math/NativeMath.PI f64 (f64.const 3.141592653589793)) (global $assembly/index/SOLAR_MASS f64 (f64.const 39.47841760435743)) (global $assembly/index/DAYS_PER_YEAR f64 (f64.const 365.24)) (global $assembly/index/system (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 100)) + (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/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 96)) (export "memory" (memory $0)) (export "table" (table $0)) (export "init" (func $assembly/index/init)) @@ -31,75 +37,11 @@ (export "bench" (func $assembly/index/bench)) (export "getBody" (func $assembly/index/getBody)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $start:assembly/index (; 2 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena - ) - (func $~lib/array/Array#__unchecked_get (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - i32.const 0 - local.set $4 - local.get $2 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - ) - (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end + i32.load offset=12 ) - (func $assembly/index/Body#offsetMomentum (; 5 ;) (type $FUNCSIG$iiddd) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (func $assembly/index/Body#offsetMomentum (; 2 ;) (type $FUNCSIG$iiddd) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) local.get $0 local.get $1 f64.neg @@ -120,91 +62,163 @@ f64.store offset=40 local.get $0 ) - (func $~lib/allocator/arena/__memory_allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset local.set $2 - local.get $5 - local.tee $3 local.get $2 - local.tee $6 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 local.get $3 - local.get $6 - i32.gt_s + local.get $4 + i32.gt_u select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end - local.get $4 - global.set $~lib/allocator/arena/offset + return + ) + (func $~lib/runtime/doAllocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/ADJUSTOBLOCK + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add ) - (func $~lib/memory/memory.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/doAllocate + ) + (func $~lib/runtime/assertUnregistered (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 192 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 193 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store local.get $0 - call $~lib/allocator/arena/__memory_allocate - return ) - (func $assembly/index/NBodySystem#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $assembly/index/NBodySystem#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 f64) (local $3 f64) (local $4 f64) @@ -218,26 +232,26 @@ local.set $3 f64.const 0 local.set $4 - block $~lib/array/Array#get:length|inlined.0 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=4 - end - local.set $6 + local.get $1 + call $~lib/array/Array#get:length + local.set $5 block $break|0 i32.const 0 - local.set $5 + local.set $6 loop $repeat|0 - local.get $5 local.get $6 + local.get $5 i32.lt_s i32.eqz br_if $break|0 block local.get $1 - local.get $5 - call $~lib/array/Array#__unchecked_get + i32.load offset=4 + local.get $6 + i32.const 2 + i32.shl + i32.add + i32.load local.set $7 local.get $7 f64.load offset=48 @@ -264,18 +278,18 @@ f64.add local.set $4 end - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $repeat|0 unreachable end unreachable end local.get $1 - i32.const 0 - call $~lib/array/Array#__get + i32.load offset=4 + i32.load local.get $2 local.get $3 local.get $4 @@ -284,8 +298,14 @@ local.get $0 i32.eqz if - i32.const 4 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 4 + call $~lib/runtime/ALLOCATE + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -293,12 +313,19 @@ i32.store local.get $0 ) - (func $assembly/index/Body#constructor (; 9 ;) (type $FUNCSIG$iiddddddd) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (result i32) + (func $assembly/index/Body#constructor (; 10 ;) (type $FUNCSIG$iiddddddd) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (result i32) + (local $8 i32) local.get $0 i32.eqz if - i32.const 56 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 56 + call $~lib/runtime/ALLOCATE + local.set $8 + local.get $8 + i32.const 3 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -324,7 +351,7 @@ f64.store offset=48 local.get $0 ) - (func $assembly/index/Sun (; 10 ;) (type $FUNCSIG$i) (result i32) + (func $assembly/index/Sun (; 11 ;) (type $FUNCSIG$i) (result i32) i32.const 0 f64.const 0 f64.const 0 @@ -335,407 +362,330 @@ global.get $assembly/index/SOLAR_MASS call $assembly/index/Body#constructor ) - (func $assembly/index/Jupiter (; 11 ;) (type $FUNCSIG$i) (result i32) - i32.const 0 - f64.const 4.841431442464721 - f64.const -1.1603200440274284 - f64.const -0.10362204447112311 - f64.const 0.001660076642744037 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const 0.007699011184197404 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const -6.90460016972063e-05 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const 9.547919384243266e-04 - global.get $assembly/index/SOLAR_MASS - f64.mul - call $assembly/index/Body#constructor - ) - (func $assembly/index/Saturn (; 12 ;) (type $FUNCSIG$i) (result i32) - i32.const 0 - f64.const 8.34336671824458 - f64.const 4.124798564124305 - f64.const -0.4035234171143214 - f64.const -0.002767425107268624 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const 0.004998528012349172 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const 2.3041729757376393e-05 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const 2.858859806661308e-04 - global.get $assembly/index/SOLAR_MASS - f64.mul - call $assembly/index/Body#constructor - ) - (func $assembly/index/Uranus (; 13 ;) (type $FUNCSIG$i) (result i32) - i32.const 0 - f64.const 12.894369562139131 - f64.const -15.111151401698631 - f64.const -0.22330757889265573 - f64.const 0.002964601375647616 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const 2.3784717395948095e-03 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const -2.9658956854023756e-05 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const 4.366244043351563e-05 - global.get $assembly/index/SOLAR_MASS - f64.mul - call $assembly/index/Body#constructor - ) - (func $assembly/index/Neptune (; 14 ;) (type $FUNCSIG$i) (result i32) - i32.const 0 - f64.const 15.379697114850917 - f64.const -25.919314609987964 - f64.const 0.17925877295037118 - f64.const 2.6806777249038932e-03 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const 0.001628241700382423 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const -9.515922545197159e-05 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const 5.1513890204661145e-05 - global.get $assembly/index/SOLAR_MASS - f64.mul - call $assembly/index/Body#constructor - ) - (func $~lib/internal/arraybuffer/computeSize (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 8 - i32.add - i32.const 1 - i32.sub - i32.clz - i32.sub - i32.shl - ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 40 - i32.const 26 + (func $~lib/memory/memory.fill (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 1 + i32.add + local.get $1 + i32.store8 + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 local.get $0 - call $~lib/internal/arraybuffer/computeSize + i32.sub + i32.const 3 + i32.and + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub local.set $2 local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end - local.set $1 - local.get $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/internal/memory/memset (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i64) - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $4 + local.get $0 + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 12 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 24 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 20 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.get $4 + i32.store + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $4 + i64.extend_i32_u + local.get $4 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $5 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $5 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $5 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + end + br $continue|0 end - br $continue|0 end end end ) - (func $~lib/array/Array#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH + i32.gt_u + if + i32.const 0 + i32.const 56 + i32.const 24 + i32.const 43 + call $~lib/env/abort + unreachable + end + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end + local.set $3 + local.get $3 + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + block $~lib/runtime/REGISTER|inlined.0 (result i32) + local.get $3 + local.set $2 + local.get $2 + i32.const 4 + call $~lib/runtime/doRegister + end + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $1 - i32.const 268435454 + global.get $~lib/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u i32.gt_u if i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 + i32.const 16 + i32.const 227 + i32.const 57 call $~lib/env/abort unreachable end + i32.const 0 local.get $1 - i32.const 2 - i32.shl - local.set $2 local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe + i32.shl + local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 block (result i32) local.get $0 i32.eqz if - i32.const 8 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $4 + local.get $4 + i32.const 5 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -745,54 +695,124 @@ i32.const 0 i32.store offset=4 local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 end local.get $3 i32.store local.get $0 - local.get $1 + local.get $3 i32.store offset=4 - block $~lib/memory/memory.fill|inlined.0 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 + local.get $0 + local.get $1 + i32.store offset=8 + local.get $0 + ) + (func $~lib/array/Array#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset + i32.const 6 + call $~lib/runtime/doRegister end + local.get $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 local.get $0 - ) - (func $~lib/array/Array#__unchecked_set (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + i32.const 0 + i32.store offset=12 local.get $0 - i32.load - local.set $3 local.get $1 - local.set $4 - local.get $2 - local.set $5 + i32.store offset=12 + local.get $0 + ) + (func $assembly/index/Jupiter (; 16 ;) (type $FUNCSIG$i) (result i32) i32.const 0 - local.set $6 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store offset=8 + f64.const 4.841431442464721 + f64.const -1.1603200440274284 + f64.const -0.10362204447112311 + f64.const 0.001660076642744037 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const 0.007699011184197404 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const -6.90460016972063e-05 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const 9.547919384243266e-04 + global.get $assembly/index/SOLAR_MASS + f64.mul + call $assembly/index/Body#constructor + ) + (func $assembly/index/Saturn (; 17 ;) (type $FUNCSIG$i) (result i32) + i32.const 0 + f64.const 8.34336671824458 + f64.const 4.124798564124305 + f64.const -0.4035234171143214 + f64.const -0.002767425107268624 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const 0.004998528012349172 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const 2.3041729757376393e-05 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const 2.858859806661308e-04 + global.get $assembly/index/SOLAR_MASS + f64.mul + call $assembly/index/Body#constructor + ) + (func $assembly/index/Uranus (; 18 ;) (type $FUNCSIG$i) (result i32) + i32.const 0 + f64.const 12.894369562139131 + f64.const -15.111151401698631 + f64.const -0.22330757889265573 + f64.const 0.002964601375647616 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const 2.3784717395948095e-03 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const -2.9658956854023756e-05 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const 4.366244043351563e-05 + global.get $assembly/index/SOLAR_MASS + f64.mul + call $assembly/index/Body#constructor + ) + (func $assembly/index/Neptune (; 19 ;) (type $FUNCSIG$i) (result i32) + i32.const 0 + f64.const 15.379697114850917 + f64.const -25.919314609987964 + f64.const 0.17925877295037118 + f64.const 2.6806777249038932e-03 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const 0.001628241700382423 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const -9.515922545197159e-05 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const 5.1513890204661145e-05 + global.get $assembly/index/SOLAR_MASS + f64.mul + call $assembly/index/Body#constructor ) (func $assembly/index/init (; 20 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) i32.const 0 block (result i32) i32.const 0 @@ -800,25 +820,23 @@ call $~lib/array/Array#constructor local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 + local.set $1 + local.get $1 call $assembly/index/Sun - call $~lib/array/Array#__unchecked_set - local.get $0 - i32.const 1 + i32.store + local.get $1 call $assembly/index/Jupiter - call $~lib/array/Array#__unchecked_set - local.get $0 - i32.const 2 + i32.store offset=4 + local.get $1 call $assembly/index/Saturn - call $~lib/array/Array#__unchecked_set - local.get $0 - i32.const 3 + i32.store offset=8 + local.get $1 call $assembly/index/Uranus - call $~lib/array/Array#__unchecked_set - local.get $0 - i32.const 4 + i32.store offset=12 + local.get $1 call $assembly/index/Neptune - call $~lib/array/Array#__unchecked_set + i32.store offset=16 local.get $0 end call $assembly/index/NBodySystem#constructor @@ -849,26 +867,26 @@ local.get $0 i32.load local.set $2 - block $~lib/array/Array#get:length|inlined.1 (result i32) - local.get $2 - local.set $3 - local.get $3 - i32.load offset=4 - end - local.set $4 + local.get $2 + call $~lib/array/Array#get:length + local.set $3 block $break|0 i32.const 0 - local.set $3 + local.set $4 loop $repeat|0 - local.get $3 local.get $4 + local.get $3 i32.lt_u i32.eqz br_if $break|0 block local.get $2 - local.get $3 - call $~lib/array/Array#__unchecked_get + i32.load offset=4 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load local.set $5 local.get $5 f64.load @@ -892,20 +910,24 @@ f64.load offset=48 local.set $12 block $break|1 - local.get $3 + local.get $4 i32.const 1 i32.add local.set $13 loop $repeat|1 local.get $13 - local.get $4 + local.get $3 i32.lt_u i32.eqz br_if $break|1 block local.get $2 + i32.load offset=4 local.get $13 - call $~lib/array/Array#__unchecked_get + i32.const 2 + i32.shl + i32.add + i32.load local.set $14 local.get $6 local.get $14 @@ -1042,10 +1064,10 @@ f64.add f64.store offset=16 end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $repeat|0 unreachable end @@ -1080,12 +1102,8 @@ block i32.const 0 local.set $3 - block $~lib/array/Array#get:length|inlined.2 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=4 - end + local.get $2 + call $~lib/array/Array#get:length local.set $4 end loop $repeat|0 @@ -1096,8 +1114,12 @@ br_if $break|0 block local.get $2 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__unchecked_get + i32.const 2 + i32.shl + i32.add + i32.load local.set $5 local.get $5 f64.load @@ -1151,8 +1173,12 @@ br_if $break|1 block local.get $2 + i32.load offset=4 local.get $13 - call $~lib/array/Array#__unchecked_get + i32.const 2 + i32.shl + i32.add + i32.load local.set $14 local.get $6 local.get $14 @@ -1250,28 +1276,36 @@ ) (func $assembly/index/getBody (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $assembly/index/system i32.load local.set $1 local.get $0 - block $~lib/array/Array#get:length|inlined.4 (result i32) - local.get $1 - local.set $2 - local.get $2 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.lt_u if (result i32) local.get $1 + i32.load offset=4 local.get $0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + i32.add + i32.load else i32.const 0 end ) (func $start (; 26 ;) (type $FUNCSIG$v) - call $start:assembly/index + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset ) (func $null (; 27 ;) (type $FUNCSIG$v) ) diff --git a/src/resolver.ts b/src/resolver.ts index 0c3fa35b56..e057fbccec 100644 --- a/src/resolver.ts +++ b/src/resolver.ts @@ -82,6 +82,10 @@ import { Token } from "./tokenizer"; +import { + BuiltinSymbols +} from "./builtins"; + /** Indicates whether errors are reported or not. */ export enum ReportMode { /** Report errors. */ @@ -1208,6 +1212,14 @@ export class Resolver extends DiagnosticEmitter { ); if (!target) return null; if (target.kind == ElementKind.FUNCTION_PROTOTYPE) { + // `unchecked(expr: *): *` is special + if ( + (target).internalName == BuiltinSymbols.unchecked && + expression.arguments.length > 0 + ) { + return this.resolveExpression(expression.arguments[0], flow, contextualType, reportMode); + } + // otherwise resolve normally let instance = this.resolveFunctionInclTypeArguments( target, expression.typeArguments, From 74789c9c1e5d24374eb329afb7bf2f9260b93de5 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 19 Mar 2019 14:40:37 +0100 Subject: [PATCH 051/119] aliased makeCallInline, unmanaged rt alloc --- src/builtins.ts | 18 +- src/common.ts | 1 + src/compiler.ts | 185 ++-- src/program.ts | 6 + std/assembly/runtime.ts | 7 + tests/compiler/call-super.optimized.wat | 12 +- tests/compiler/call-super.untouched.wat | 128 ++- tests/compiler/constructor.optimized.wat | 10 +- tests/compiler/constructor.untouched.wat | 118 ++- tests/compiler/exports.optimized.wat | 4 +- tests/compiler/exports.untouched.wat | 66 +- tests/compiler/getter-call.optimized.wat | 4 +- tests/compiler/getter-call.untouched.wat | 32 +- tests/compiler/inlining.optimized.wat | 4 +- tests/compiler/inlining.untouched.wat | 36 +- .../new-without-allocator.untouched.wat | 26 +- tests/compiler/number.optimized.wat | 4 +- tests/compiler/number.untouched.wat | 4 +- tests/compiler/object-literal.optimized.wat | 4 +- tests/compiler/object-literal.untouched.wat | 54 +- .../optional-typeparameters.optimized.wat | 4 +- .../optional-typeparameters.untouched.wat | 42 +- .../compiler/std/array-literal.optimized.wat | 6 +- .../compiler/std/array-literal.untouched.wat | 90 +- tests/compiler/std/array.optimized.wat | 16 +- tests/compiler/std/array.untouched.wat | 676 +++++++------- tests/compiler/std/arraybuffer.optimized.wat | 14 +- tests/compiler/std/arraybuffer.untouched.wat | 60 +- tests/compiler/std/dataview.optimized.wat | 10 +- tests/compiler/std/dataview.untouched.wat | 108 ++- tests/compiler/std/date.optimized.wat | 4 +- tests/compiler/std/date.untouched.wat | 32 +- tests/compiler/std/map.optimized.wat | 4 +- tests/compiler/std/map.untouched.wat | 312 ++++--- tests/compiler/std/new.optimized.wat | 4 +- tests/compiler/std/new.untouched.wat | 28 +- .../std/operator-overloading.optimized.wat | 4 +- .../std/operator-overloading.untouched.wat | 104 ++- tests/compiler/std/runtime.optimized.wat | 6 +- tests/compiler/std/runtime.untouched.wat | 6 +- tests/compiler/std/set.optimized.wat | 4 +- tests/compiler/std/set.untouched.wat | 292 +++--- tests/compiler/std/static-array.untouched.wat | 2 +- tests/compiler/std/string-utf8.optimized.wat | 4 +- tests/compiler/std/string-utf8.untouched.wat | 4 +- tests/compiler/std/string.optimized.wat | 8 +- tests/compiler/std/string.untouched.wat | 108 +-- tests/compiler/std/symbol.optimized.wat | 4 +- tests/compiler/std/symbol.untouched.wat | 94 +- tests/compiler/std/typedarray.optimized.wat | 6 +- tests/compiler/std/typedarray.untouched.wat | 868 +++++++++--------- 51 files changed, 1992 insertions(+), 1655 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index 53b72e3fb3..bb6b4cf0f1 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -4293,20 +4293,10 @@ export function compileBuiltinArraySetWithValue( let linkPrototype = assert(program.linkPrototype); let linkInstance = compiler.resolver.resolveFunction(linkPrototype, [ type, target.type ]); if (!linkInstance) return module.createUnreachable(); - let previousFlow = compiler.currentFlow; - let tempValue = previousFlow.getTempLocal(type, false); - let flow = Flow.createInline(previousFlow.parentFunction, linkInstance); - compiler.currentFlow = flow; - flow.addScopedAlias(linkInstance.signature.getParameterName(0), type, tempValue.index); - flow.addScopedAlias(linkInstance.signature.getParameterName(1), target.type, assert(tempThis).index); - let body = compiler.compileFunctionBody(linkInstance); - body.unshift( - module.createSetLocal(tempValue.index, valueExpr) - ); - previousFlow.freeTempLocal(tempValue); - previousFlow.freeTempLocal(tempThis!); tempThis = null; - compiler.currentFlow = previousFlow; - valueExpr = module.createBlock(flow.inlineReturnLabel, body, nativeSizeType); + valueExpr = compiler.makeCallInline(linkInstance, [ + valueExpr, + module.createGetLocal(assert(tempThis).index, nativeSizeType) + ], 0, true); // handle Uint8ClampedArray: value = ~(value >> 31) & (((255 - value) >> 31) | value) } else if (target.internalName == BuiltinSymbols.Uint8ClampedArray) { diff --git a/src/common.ts b/src/common.ts index 4b37928576..91d64faae5 100644 --- a/src/common.ts +++ b/src/common.ts @@ -182,6 +182,7 @@ export namespace LibrarySymbols { // runtime export const abort = "abort"; export const ALLOCATE = "ALLOCATE"; + export const ALLOCATE_UNMANAGED = "ALLOCATE_UNMANAGED"; export const REALLOCATE = "REALLOCATE"; export const DISCARD = "DISCARD"; export const REGISTER = "REGISTER"; diff --git a/src/compiler.ts b/src/compiler.ts index 0cd75989b3..66a9041767 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -1086,16 +1086,15 @@ export class Compiler extends DiagnosticEmitter { } /** Compiles the body of a function within the specified flow. */ - compileFunctionBody(instance: Function): ExpressionRef[] { + compileFunctionBody(instance: Function, stmts: ExpressionRef[] | null = null): ExpressionRef[] { var module = this.module; var bodyNode = assert(instance.prototype.bodyNode); var returnType = instance.signature.returnType; var flow = this.currentFlow; // compile statements - var stmts: BinaryenExportRef[]; if (bodyNode.kind == NodeKind.BLOCK) { - stmts = this.compileStatements((bodyNode).statements, true); + stmts = this.compileStatements((bodyNode).statements, true, stmts); } else { // must be an expression statement if not a block assert(bodyNode.kind == NodeKind.EXPRESSION); @@ -1114,7 +1113,8 @@ export class Compiler extends DiagnosticEmitter { ); flow.set(FlowFlags.RETURNS); if (!flow.canOverflow(stmt, returnType)) flow.set(FlowFlags.RETURNS_WRAPPED); - stmts = [ stmt ]; + if (!stmts) stmts = [ stmt ]; + else stmts.push(stmt); } // make the main function call `start` implicitly, but only once @@ -1574,10 +1574,16 @@ export class Compiler extends DiagnosticEmitter { return stmt; } - compileStatements(statements: Statement[], isBody: bool = false): ExpressionRef[] { + compileStatements( + statements: Statement[], + isBody: bool = false, + stmts: ExpressionRef[] | null = null + ): ExpressionRef[] { var numStatements = statements.length; - var stmts = new Array(numStatements); - stmts.length = 0; + if (!stmts) { + stmts = new Array(numStatements); + stmts.length = 0; + } var flow = this.currentFlow; for (let i = 0; i < numStatements; ++i) { let stmt = this.compileStatement(statements[i], isBody && i == numStatements - 1); @@ -5471,13 +5477,13 @@ export class Compiler extends DiagnosticEmitter { ): ExpressionRef { var numArguments = argumentExpressions.length; var signature = instance.signature; - if (!this.checkCallSignature( // reports signature, numArguments, thisArg != 0, reportNode )) { + this.currentType = signature.returnType; return this.module.createUnreachable(); } @@ -5518,23 +5524,62 @@ export class Compiler extends DiagnosticEmitter { return this.makeCallDirect(instance, operands, reportNode); } - // Depends on being pre-checked in compileCallDirect + compileCallInline( + instance: Function, + argumentExpressions: Expression[], + thisArg: ExpressionRef, + reportNode: Node, + canAlias: bool = false + ): ExpressionRef { + var numArguments = argumentExpressions.length; + var signature = instance.signature; + if (!this.checkCallSignature( // reports + signature, + numArguments, + thisArg != 0, + reportNode + )) { + this.currentType = instance.signature.returnType; + return this.module.createUnreachable(); + } + return this.compileCallInlinePrechecked(instance, argumentExpressions, thisArg, canAlias); + } + private compileCallInlinePrechecked( instance: Function, argumentExpressions: Expression[], thisArg: ExpressionRef = 0, canAlias: bool = false + ): ExpressionRef { + var numArguments = argumentExpressions.length; + var signature = instance.signature; + var parameterTypes = signature.parameterTypes; + var args = new Array(numArguments); + for (let i = 0; i < numArguments; ++i) { + args[i] = this.compileExpression( + argumentExpressions[i], + parameterTypes[i], + ConversionKind.IMPLICIT, + WrapMode.NONE + ); + } + return this.makeCallInline(instance, args, thisArg, canAlias); + } + + makeCallInline( + instance: Function, + args: ExpressionRef[], + thisArg: ExpressionRef = 0, + canAlias: bool = false ): ExpressionRef { var module = this.module; // Create a new inline flow and use it to compile the function as a block var previousFlow = this.currentFlow; var flow = Flow.createInline(previousFlow.parentFunction, instance); - - // Convert provided call arguments to temporary locals. It is important that these are compiled - // here, with their respective locals being blocked. There is no 'makeCallInline'. var body = []; + // Convert provided call arguments to temporary locals if (thisArg) { let classInstance = assert(instance.parent); assert(classInstance.kind == ElementKind.CLASS); let thisType = assert(instance.signature.thisType); @@ -5550,18 +5595,14 @@ export class Compiler extends DiagnosticEmitter { let baseInstance = (classInstance).base; if (baseInstance) flow.addScopedAlias(CommonSymbols.super_, baseInstance.type, thisLocal.index); } + } else { + assert(!instance.signature.thisType); } - - var numArguments = argumentExpressions.length; + var numArguments = args.length; var signature = instance.signature; var parameterTypes = signature.parameterTypes; for (let i = 0; i < numArguments; ++i) { - let paramExpr = this.compileExpression( - argumentExpressions[i], - parameterTypes[i], - ConversionKind.IMPLICIT, - WrapMode.NONE - ); + let paramExpr = args[i]; if (canAlias && getExpressionId(paramExpr) == ExpressionId.GetLocal) { flow.addScopedAlias(signature.getParameterName(i), parameterTypes[i], getGetLocalIndex(paramExpr)); } else { @@ -5601,10 +5642,7 @@ export class Compiler extends DiagnosticEmitter { } // Compile the called function's body in the scope of the inlined flow - { - let stmts = this.compileFunctionBody(instance); - for (let i = 0, k = stmts.length; i < k; ++i) body.push(stmts[i]); - } + this.compileFunctionBody(instance, body); // Free any new scoped locals and reset to the original flow flow.freeScopedLocals(); @@ -6679,23 +6717,13 @@ export class Compiler extends DiagnosticEmitter { this.currentType = arrayType; return module.createUnreachable(); } - let previousFlow = this.currentFlow; - let tempLocal = previousFlow.getTempLocal(arrayBufferInstance.type, false); - let flow = Flow.createInline(previousFlow.parentFunction, wrapArrayInstance); - flow.addScopedAlias(wrapArrayInstance.signature.getParameterName(0), arrayBufferInstance.type, tempLocal.index); - this.currentFlow = flow; - let body = this.compileFunctionBody(wrapArrayInstance); - body.unshift( - module.createSetLocal(tempLocal.index, - program.options.isWasm64 - ? this.module.createI64(i64_low(bufferAddress), i64_high(bufferAddress)) - : this.module.createI32(i64_low(bufferAddress)) - ) - ); - previousFlow.freeTempLocal(tempLocal); - this.currentFlow = previousFlow; + let body = this.makeCallInline(wrapArrayInstance, [ + program.options.isWasm64 + ? this.module.createI64(i64_low(bufferAddress), i64_high(bufferAddress)) + : this.module.createI32(i64_low(bufferAddress)) + ], 0, true); this.currentType = arrayType; - return module.createBlock(flow.inlineReturnLabel, body, this.options.nativeSizeType); + return body; } } @@ -6749,16 +6777,10 @@ export class Compiler extends DiagnosticEmitter { valueExpr = module.createUnreachable(); } else { // value = LINK(value, tempThis) - let tempValue = flow.getAndFreeTempLocal(elementType, false); - let inlineFlow = Flow.createInline(flow.parentFunction, linkInstance); - inlineFlow.addScopedAlias(linkInstance.signature.getParameterName(0), elementType, tempValue.index); - inlineFlow.addScopedAlias(linkInstance.signature.getParameterName(1), arrayType, tempThis.index); - this.currentFlow = inlineFlow; - let body = this.compileFunctionBody(linkInstance); - stmts.push( - module.createSetLocal(tempValue.index, valueExpr) - ); - valueExpr = module.createBlock(inlineFlow.inlineReturnLabel, body, nativeElementType); + valueExpr = this.makeCallInline(linkInstance, [ + valueExpr, + module.createGetLocal(tempThis.index, nativeArrayType) + ], 0, true); this.currentFlow = flow; } } @@ -7985,47 +8007,40 @@ export class Compiler extends DiagnosticEmitter { assert(classInstance.program == program); var module = this.module; var options = this.options; - var nativeSizeType = options.nativeSizeType; var classType = classInstance.type; + var body: ExpressionRef; - // ALLOCATE(payloadSize: usize) -> usize - var allocateInstance = assert(program.allocateInstance); - if (!this.compileFunction(allocateInstance)) { - this.currentType = classInstance.type; - return module.createUnreachable(); - } + if (classInstance.hasDecorator(DecoratorFlags.UNMANAGED)) { + // ALLOCATE_UNMANAGED(sizeof()) + let allocateInstance = assert(program.allocateUnmanagedInstance); + body = this.makeCallInline(allocateInstance, [ + options.isWasm64 + ? module.createI64(classInstance.currentMemoryOffset) + : module.createI32(classInstance.currentMemoryOffset) + ], 0, true); - // REGISTER(ref: usize) -> usize - var registerPrototype = assert(program.registerPrototype); - var registerInstance = this.resolver.resolveFunction(registerPrototype, [ classType ]); - if (!registerInstance) { this.currentType = classType; - return module.createUnreachable(); - } + return body; - // REGISTER(ALLOCATE(sizeof())) - var previousFlow = this.currentFlow; - var tempLocal = previousFlow.getTempLocal(classType, false); - var flow = Flow.createInline(previousFlow.parentFunction, registerInstance); - flow.addScopedAlias(registerInstance.signature.getParameterName(0), this.options.usizeType, tempLocal.index); - this.currentFlow = flow; - var body = this.compileFunctionBody(registerInstance); - body.unshift( - module.createSetLocal(tempLocal.index, - module.createCall( - allocateInstance.internalName, [ - options.isWasm64 - ? module.createI64(classInstance.currentMemoryOffset) - : module.createI32(classInstance.currentMemoryOffset) - ], - nativeSizeType - ) - ) - ); - previousFlow.freeTempLocal(tempLocal); - this.currentFlow = previousFlow; + } else { + // REGISTER(ALLOCATE(sizeof())) + let allocateInstance = assert(program.allocateInstance); + let registerPrototype = assert(program.registerPrototype); + let registerInstance = this.resolver.resolveFunction(registerPrototype, [ classType ]); + if (!registerInstance) { + this.currentType = classType; + return module.createUnreachable(); + } + body = this.makeCallInline(registerInstance, [ + this.makeCallInline(allocateInstance, [ + options.isWasm64 + ? module.createI64(classInstance.currentMemoryOffset) + : module.createI32(classInstance.currentMemoryOffset) + ], 0, true) + ], 0, true); + } this.currentType = classType; - return module.createBlock(flow.inlineReturnLabel, body, nativeSizeType); + return body; } /** Makes the initializers for a class's fields. */ diff --git a/src/program.ts b/src/program.ts index a8deb0a917..035b7678a3 100644 --- a/src/program.ts +++ b/src/program.ts @@ -354,6 +354,8 @@ export class Program extends DiagnosticEmitter { abortInstance: Function | null = null; /** Runtime allocation function. */ allocateInstance: Function | null = null; + /** Unmanaged allocation function. */ + allocateUnmanagedInstance: Function | null = null; /** Runtime reallocation function. */ reallocateInstance: Function | null = null; /** Runtime discard function. */ @@ -804,6 +806,10 @@ export class Program extends DiagnosticEmitter { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.allocateInstance = this.resolver.resolveFunction(element, null); } + if (element = this.lookupGlobal(LibrarySymbols.ALLOCATE_UNMANAGED)) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.allocateUnmanagedInstance = this.resolver.resolveFunction(element, null); + } if (element = this.lookupGlobal(LibrarySymbols.REALLOCATE)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.reallocateInstance = this.resolver.resolveFunction(element, null); diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index f30d41db3a..b19f5adc5c 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -68,6 +68,13 @@ function doAllocate(payloadSize: usize): usize { return changetype(header) + HEADER_SIZE; } +/** Allocates an object explicitly declared as unmanaged and returns a pointer to it. */ +// @ts-ignore: decorator +@unsafe @inline +export function ALLOCATE_UNMANAGED(size: usize): usize { + return memory.allocate(size); +} + /** Reallocates an object if necessary. Returns a pointer to its (moved) payload. */ // @ts-ignore: decorator @unsafe @inline diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index c6b381100b..74c23cbbe4 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -106,7 +106,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -120,7 +120,7 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable @@ -390,9 +390,7 @@ (func $call-super/test4 (; 13 ;) (type $FUNCSIG$v) (local $0 i32) block (result i32) - block (result i32) - call $call-super/H#constructor - end + call $call-super/H#constructor end local.tee $0 i32.load @@ -445,9 +443,7 @@ (func $call-super/test5 (; 15 ;) (type $FUNCSIG$v) (local $0 i32) block (result i32) - block (result i32) - call $call-super/J#constructor - end + call $call-super/J#constructor end local.tee $0 i32.load diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index d20fa9682e..6d121a35d6 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -133,11 +133,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -145,7 +141,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -160,13 +156,13 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -176,15 +172,19 @@ i32.store local.get $0 ) - (func $call-super/A#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/A#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + i32.const 4 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 1 @@ -211,14 +211,18 @@ end local.get $0 ) - (func $call-super/B#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/B#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 if (result i32) local.get $0 else - i32.const 8 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + i32.const 8 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 3 @@ -257,7 +261,7 @@ end local.get $0 ) - (func $call-super/test1 (; 9 ;) (type $FUNCSIG$v) + (func $call-super/test1 (; 8 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/B#constructor @@ -289,14 +293,18 @@ unreachable end ) - (func $call-super/C#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/C#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + i32.const 4 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 4 @@ -309,14 +317,18 @@ i32.store local.get $0 ) - (func $call-super/D#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/D#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 if (result i32) local.get $0 else - i32.const 8 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.3 (result i32) + i32.const 8 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 5 @@ -355,7 +367,7 @@ end local.get $0 ) - (func $call-super/test2 (; 12 ;) (type $FUNCSIG$v) + (func $call-super/test2 (; 11 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/D#constructor @@ -387,15 +399,19 @@ unreachable end ) - (func $call-super/E#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/E#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.4 (result i32) + i32.const 4 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 6 @@ -422,14 +438,18 @@ end local.get $0 ) - (func $call-super/F#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/F#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 8 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.5 (result i32) + i32.const 8 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 7 @@ -445,7 +465,7 @@ i32.store offset=4 local.get $0 ) - (func $call-super/test3 (; 15 ;) (type $FUNCSIG$v) + (func $call-super/test3 (; 14 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/F#constructor @@ -477,14 +497,18 @@ unreachable end ) - (func $call-super/G#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/G#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.6 (result i32) + i32.const 4 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 8 @@ -497,14 +521,18 @@ i32.store local.get $0 ) - (func $call-super/H#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/H#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 8 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.7 (result i32) + i32.const 8 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 9 @@ -520,7 +548,7 @@ i32.store offset=4 local.get $0 ) - (func $call-super/test4 (; 18 ;) (type $FUNCSIG$v) + (func $call-super/test4 (; 17 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/H#constructor @@ -552,14 +580,18 @@ unreachable end ) - (func $call-super/I#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/I#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.8 (result i32) + i32.const 4 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 10 @@ -572,14 +604,18 @@ i32.store local.get $0 ) - (func $call-super/J#constructor (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/J#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 8 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.9 (result i32) + i32.const 8 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 11 @@ -595,7 +631,7 @@ i32.store offset=4 local.get $0 ) - (func $call-super/test5 (; 21 ;) (type $FUNCSIG$v) + (func $call-super/test5 (; 20 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/J#constructor @@ -627,7 +663,7 @@ unreachable end ) - (func $start:call-super (; 22 ;) (type $FUNCSIG$v) + (func $start:call-super (; 21 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -644,9 +680,9 @@ call $call-super/test4 call $call-super/test5 ) - (func $start (; 23 ;) (type $FUNCSIG$v) + (func $start (; 22 ;) (type $FUNCSIG$v) call $start:call-super ) - (func $null (; 24 ;) (type $FUNCSIG$v) + (func $null (; 23 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index 62ed911391..ac790d7659 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -116,7 +116,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -130,7 +130,7 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable @@ -160,14 +160,14 @@ local.get $0 i32.eqz end - if (result i32) + if i32.const 0 call $~lib/runtime/doAllocate i32.const 10 call $~lib/runtime/doRegister - else - local.get $0 + local.set $0 end + local.get $0 ) (func $start:constructor (; 6 ;) (type $FUNCSIG$v) (local $0 i32) diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index 87791bf47a..138362f6d9 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -143,11 +143,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -155,7 +151,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -170,13 +166,13 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -186,14 +182,18 @@ i32.store local.get $0 ) - (func $constructor/EmptyCtor#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtor#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + i32.const 0 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 1 @@ -203,14 +203,18 @@ end local.get $0 ) - (func $constructor/EmptyCtorWithFieldInit#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtorWithFieldInit#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + i32.const 4 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 3 @@ -223,14 +227,18 @@ i32.store local.get $0 ) - (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + i32.const 4 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 4 @@ -243,14 +251,18 @@ i32.store local.get $0 ) - (func $constructor/None#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/None#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.3 (result i32) + i32.const 0 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 5 @@ -260,14 +272,18 @@ end local.get $0 ) - (func $constructor/JustFieldInit#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/JustFieldInit#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.4 (result i32) + i32.const 4 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 6 @@ -280,14 +296,18 @@ i32.store local.get $0 ) - (func $constructor/JustFieldNoInit#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/JustFieldNoInit#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.5 (result i32) + i32.const 4 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 7 @@ -300,11 +320,11 @@ i32.store local.get $0 ) - (func $constructor/CtorReturns#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorReturns#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 call $~lib/memory/memory.allocate ) - (func $constructor/CtorConditionallyReturns#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorConditionallyReturns#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) global.get $constructor/b if @@ -316,8 +336,12 @@ i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.6 (result i32) + i32.const 0 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 8 @@ -327,15 +351,19 @@ end local.get $0 ) - (func $constructor/CtorAllocates#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorAllocates#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.7 (result i32) + i32.const 0 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 9 @@ -348,7 +376,7 @@ drop local.get $0 ) - (func $constructor/CtorConditionallyAllocates#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorConditionallyAllocates#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) global.get $constructor/b if @@ -357,8 +385,12 @@ i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.8 (result i32) + i32.const 0 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 10 @@ -374,8 +406,12 @@ i32.eqz if block $~lib/runtime/REGISTER|inlined.1 (result i32) - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.9 (result i32) + i32.const 0 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 10 @@ -385,7 +421,7 @@ end local.get $0 ) - (func $start:constructor (; 17 ;) (type $FUNCSIG$v) + (func $start:constructor (; 16 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -427,9 +463,9 @@ call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates ) - (func $start (; 18 ;) (type $FUNCSIG$v) + (func $start (; 17 ;) (type $FUNCSIG$v) call $start:constructor ) - (func $null (; 19 ;) (type $FUNCSIG$v) + (func $null (; 18 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index ae4c975d71..27d4706247 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -145,7 +145,7 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index d31780812b..b0ba341509 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -185,11 +185,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/ALLOCATE (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/assertUnregistered (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -197,7 +193,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -212,13 +208,13 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/doRegister (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doRegister (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -228,15 +224,19 @@ i32.store local.get $0 ) - (func $exports/Car#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + i32.const 4 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 1 @@ -253,30 +253,34 @@ i32.store local.get $0 ) - (func $exports/Car#get:numDoors (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $exports/Car#get:numDoors (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/Car#set:numDoors (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $exports/Car#set:numDoors (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#openDoors (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $exports/Car#openDoors (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $exports/vehicles.Car.getNumTires (; 15 ;) (type $FUNCSIG$i) (result i32) + (func $exports/vehicles.Car.getNumTires (; 14 ;) (type $FUNCSIG$i) (result i32) global.get $exports/vehicles.Car.TIRES ) - (func $exports/vehicles.Car#constructor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/vehicles.Car#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.1 (result i32) - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + i32.const 4 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 1 @@ -293,19 +297,19 @@ i32.store local.get $0 ) - (func $exports/vehicles.Car#get:numDoors (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $exports/vehicles.Car#get:numDoors (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/vehicles.Car#set:numDoors (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $exports/vehicles.Car#set:numDoors (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/vehicles.Car#openDoors (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $exports/vehicles.Car#openDoors (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $start (; 20 ;) (type $FUNCSIG$v) + (func $start (; 19 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -317,9 +321,9 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 21 ;) (type $FUNCSIG$v) + (func $null (; 20 ;) (type $FUNCSIG$v) ) - (func $exports/subOpt|trampoline (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt|trampoline (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -337,20 +341,20 @@ local.get $1 call $exports/subOpt ) - (func $~lib/setargc (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) - (func $Car#get:doors (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $Car#get:doors (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $Car#set:doors (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $Car#set:doors (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#constructor|trampoline (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor|trampoline (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -366,16 +370,16 @@ local.get $1 call $exports/Car#constructor ) - (func $vehicles.Car#get:doors (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $vehicles.Car#get:doors (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $vehicles.Car#set:doors (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $vehicles.Car#set:doors (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/vehicles.Car#constructor|trampoline (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/vehicles.Car#constructor|trampoline (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index e9582f39ab..164ddf508e 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -85,7 +85,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -99,7 +99,7 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index 25ed4620d7..4b271b9320 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -135,11 +135,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -147,7 +143,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -162,13 +158,13 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -178,14 +174,18 @@ i32.store local.get $0 ) - (func $getter-call/C#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $getter-call/C#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + i32.const 0 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 1 @@ -195,13 +195,13 @@ end local.get $0 ) - (func $getter-call/C#get:x~anonymous|0 (; 8 ;) (type $FUNCSIG$i) (result i32) + (func $getter-call/C#get:x~anonymous|0 (; 7 ;) (type $FUNCSIG$i) (result i32) i32.const 42 ) - (func $getter-call/C#get:x (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $getter-call/C#get:x (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 ) - (func $getter-call/test (; 10 ;) (type $FUNCSIG$i) (result i32) + (func $getter-call/test (; 9 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 0 call $getter-call/C#constructor @@ -212,7 +212,7 @@ call $getter-call/C#get:x call_indirect (type $FUNCSIG$i) ) - (func $start (; 11 ;) (type $FUNCSIG$v) + (func $start (; 10 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -224,6 +224,6 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 11 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index ea75033460..ea70140533 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 48 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -145,7 +145,7 @@ if i32.const 0 i32.const 48 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index c109fa0ee8..8151e451df 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -399,11 +399,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/ALLOCATE (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/assertUnregistered (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -411,7 +407,7 @@ if i32.const 0 i32.const 48 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -426,13 +422,13 @@ if i32.const 0 i32.const 48 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/doRegister (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doRegister (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -442,7 +438,7 @@ i32.store local.get $0 ) - (func $inlining/test_ctor (; 10 ;) (type $FUNCSIG$v) + (func $inlining/test_ctor (; 9 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -459,8 +455,12 @@ if (result i32) local.get $0 else - i32.const 16 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + i32.const 16 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 2 @@ -474,8 +474,12 @@ i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 8 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + i32.const 8 + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + end local.set $4 local.get $4 i32.const 3 @@ -561,7 +565,7 @@ unreachable end ) - (func $start:inlining (; 11 ;) (type $FUNCSIG$v) + (func $start:inlining (; 10 ;) (type $FUNCSIG$v) call $inlining/test i32.const 3 i32.eq @@ -587,9 +591,9 @@ global.set $~lib/allocator/arena/offset call $inlining/test_ctor ) - (func $start (; 12 ;) (type $FUNCSIG$v) + (func $start (; 11 ;) (type $FUNCSIG$v) call $start:inlining ) - (func $null (; 13 ;) (type $FUNCSIG$v) + (func $null (; 12 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/new-without-allocator.untouched.wat b/tests/compiler/new-without-allocator.untouched.wat index 8536842a39..88dd8b39f3 100644 --- a/tests/compiler/new-without-allocator.untouched.wat +++ b/tests/compiler/new-without-allocator.untouched.wat @@ -49,11 +49,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -61,7 +57,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -76,13 +72,13 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -92,14 +88,18 @@ i32.store local.get $0 ) - (func $new-without-allocator/A#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $new-without-allocator/A#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + i32.const 0 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 1 @@ -109,13 +109,13 @@ end local.get $0 ) - (func $new-without-allocator/test (; 8 ;) (type $FUNCSIG$i) (result i32) + (func $new-without-allocator/test (; 7 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 0 call $new-without-allocator/A#constructor local.set $0 i32.const 3 ) - (func $null (; 9 ;) (type $FUNCSIG$v) + (func $null (; 8 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 371c950dd8..85af8213ca 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -302,7 +302,7 @@ if i32.const 0 i32.const 464 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -316,7 +316,7 @@ if i32.const 0 i32.const 464 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 3e29c6ccb3..4f469d751a 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -399,7 +399,7 @@ if i32.const 0 i32.const 464 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -414,7 +414,7 @@ if i32.const 0 i32.const 464 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index d61d498517..55797952fc 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -106,7 +106,7 @@ if i32.const 0 i32.const 48 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -120,7 +120,7 @@ if i32.const 0 i32.const 48 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index dde2789c27..fc9db2bd2a 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -135,11 +135,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -147,7 +143,7 @@ if i32.const 0 i32.const 48 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -162,13 +158,13 @@ if i32.const 0 i32.const 48 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -178,7 +174,7 @@ i32.store local.get $0 ) - (func $~lib/string/String#get:length (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -186,7 +182,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 8 ;) (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 $6 i32) (local $7 i32) @@ -239,7 +235,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -283,7 +279,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $object-literal/bar (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $object-literal/bar (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 1 @@ -311,7 +307,7 @@ unreachable end ) - (func $object-literal/bar2 (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $object-literal/bar2 (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 2 @@ -326,7 +322,7 @@ unreachable end ) - (func $object-literal/Foo2#test (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $object-literal/Foo2#test (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 3 @@ -341,7 +337,7 @@ unreachable end ) - (func $start:object-literal (; 13 ;) (type $FUNCSIG$v) + (func $start:object-literal (; 12 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -358,8 +354,12 @@ global.set $~lib/allocator/arena/offset block (result i32) block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 8 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + i32.const 8 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 2 @@ -377,8 +377,12 @@ call $object-literal/bar block (result i32) block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + i32.const 4 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 3 @@ -393,8 +397,12 @@ call $object-literal/bar2 block (result i32) block $~lib/runtime/REGISTER|inlined.1 (result i32) - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + i32.const 4 + local.set $3 + local.get $3 + call $~lib/runtime/doAllocate + end local.set $3 local.get $3 i32.const 3 @@ -408,9 +416,9 @@ end call $object-literal/Foo2#test ) - (func $start (; 14 ;) (type $FUNCSIG$v) + (func $start (; 13 ;) (type $FUNCSIG$v) call $start:object-literal ) - (func $null (; 15 ;) (type $FUNCSIG$v) + (func $null (; 14 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index bd858688dc..bdd395848f 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -114,7 +114,7 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index c2ce724f2e..752be6bfde 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -142,11 +142,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/ALLOCATE (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/assertUnregistered (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -154,7 +150,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -169,13 +165,13 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/doRegister (; 8 ;) (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 call $~lib/runtime/assertUnregistered local.get $0 @@ -185,14 +181,18 @@ i32.store local.get $0 ) - (func $optional-typeparameters/TestConcrete#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $optional-typeparameters/TestConcrete#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + i32.const 0 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 1 @@ -202,19 +202,23 @@ end local.get $0 ) - (func $optional-typeparameters/TestConcrete#test (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $optional-typeparameters/TestConcrete#test (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 local.get $2 i32.add ) - (func $optional-typeparameters/TestDerived#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $optional-typeparameters/TestDerived#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + i32.const 0 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 3 @@ -224,12 +228,12 @@ end local.get $0 ) - (func $optional-typeparameters/TestDerived#test (; 12 ;) (type $FUNCSIG$didd) (param $0 i32) (param $1 f64) (param $2 f64) (result f64) + (func $optional-typeparameters/TestDerived#test (; 11 ;) (type $FUNCSIG$didd) (param $0 i32) (param $1 f64) (param $2 f64) (result f64) local.get $1 local.get $2 f64.add ) - (func $start:optional-typeparameters (; 13 ;) (type $FUNCSIG$v) + (func $start:optional-typeparameters (; 12 ;) (type $FUNCSIG$v) i32.const 1 call $optional-typeparameters/testConcrete drop @@ -263,9 +267,9 @@ call $optional-typeparameters/TestDerived#test drop ) - (func $start (; 14 ;) (type $FUNCSIG$v) + (func $start (; 13 ;) (type $FUNCSIG$v) call $start:optional-typeparameters ) - (func $null (; 15 ;) (type $FUNCSIG$v) + (func $null (; 14 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index e9f3794f8d..77f6d07f0b 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -374,7 +374,7 @@ if i32.const 0 i32.const 224 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -388,7 +388,7 @@ if i32.const 0 i32.const 224 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable @@ -436,7 +436,7 @@ if i32.const 0 i32.const 224 - i32.const 227 + i32.const 234 i32.const 57 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index ed722563aa..2b9c508301 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -470,7 +470,7 @@ if i32.const 0 i32.const 224 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -485,7 +485,7 @@ if i32.const 0 i32.const 224 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable @@ -534,11 +534,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/runtime/ALLOCATE (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/ArrayBufferView#constructor (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -549,7 +545,7 @@ if i32.const 0 i32.const 224 - i32.const 227 + i32.const 234 i32.const 57 call $~lib/env/abort unreachable @@ -566,8 +562,12 @@ i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + i32.const 12 + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + end local.set $4 local.get $4 i32.const 5 @@ -596,14 +596,18 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 16 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + i32.const 16 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 2 @@ -621,14 +625,18 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 16 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.3 (result i32) + i32.const 16 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 4 @@ -646,14 +654,18 @@ i32.store offset=12 local.get $0 ) - (func $std/array-literal/Ref#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/Ref#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.4 (result i32) + i32.const 0 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 6 @@ -663,14 +675,18 @@ end local.get $0 ) - (func $~lib/array/Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 16 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.5 (result i32) + i32.const 16 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 7 @@ -688,18 +704,22 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#get:length (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/array-literal/RefWithCtor#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/RefWithCtor#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.6 (result i32) + i32.const 0 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 8 @@ -709,14 +729,18 @@ end local.get $0 ) - (func $~lib/array/Array#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 16 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.7 (result i32) + i32.const 16 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 9 @@ -734,11 +758,11 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#get:length (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $start:std/array-literal (; 22 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 21 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) global.get $std/array-literal/staticArrayI8 @@ -1123,9 +1147,9 @@ unreachable end ) - (func $start (; 23 ;) (type $FUNCSIG$v) + (func $start (; 22 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 24 ;) (type $FUNCSIG$v) + (func $null (; 23 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 5251bf5efd..216f99a566 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -601,7 +601,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -615,7 +615,7 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable @@ -663,7 +663,7 @@ if i32.const 0 i32.const 16 - i32.const 227 + i32.const 234 i32.const 57 call $~lib/env/abort unreachable @@ -2193,7 +2193,7 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 107 i32.const 8 call $~lib/env/abort unreachable @@ -5530,10 +5530,6 @@ if local.get $0 i32.load offset=12 - i32.const 1 - i32.sub - local.get $1 - i32.sub local.set $2 i32.const 4 call $~lib/runtime/doAllocate @@ -5541,6 +5537,10 @@ call $~lib/runtime/doRegister local.tee $3 local.get $2 + i32.const 1 + i32.sub + local.get $1 + i32.sub i32.store local.get $0 local.get $1 diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index da2fc61539..9b64bcf307 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -671,7 +671,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -686,7 +686,7 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable @@ -735,11 +735,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/runtime/ALLOCATE (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/ArrayBufferView#constructor (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -750,7 +746,7 @@ if i32.const 0 i32.const 16 - i32.const 227 + i32.const 234 i32.const 57 call $~lib/env/abort unreachable @@ -767,8 +763,12 @@ i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + i32.const 12 + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + end local.set $4 local.get $4 i32.const 3 @@ -797,14 +797,18 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 16 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + i32.const 16 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 4 @@ -822,7 +826,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array.isArray | null> (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray | null> (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 if (result i32) local.get $0 @@ -832,7 +836,7 @@ i32.const 1 end ) - (func $~lib/array/Array.isArray> (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray> (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 if (result i32) local.get $0 @@ -842,14 +846,18 @@ i32.const 1 end ) - (func $std/array/P#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/P#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER

|inlined.0 (result i32) - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.3 (result i32) + i32.const 0 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 5 @@ -859,7 +867,7 @@ end local.get $0 ) - (func $~lib/array/Array.isArray

(; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray

(; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -869,14 +877,18 @@ i32.const 0 end ) - (func $~lib/typedarray/Uint8Array#constructor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.4 (result i32) + i32.const 12 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 6 @@ -888,7 +900,7 @@ local.set $0 local.get $0 ) - (func $~lib/array/Array.isArray (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -898,7 +910,7 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -908,7 +920,7 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -918,7 +930,7 @@ i32.const 0 end ) - (func $~lib/array/Array#fill (; 20 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 19 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -994,13 +1006,13 @@ end local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $~lib/util/memory/memcpy (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2201,7 +2213,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 @@ -2430,7 +2442,7 @@ end end ) - (func $~lib/runtime/doWrapArray (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/doWrapArray (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2467,11 +2479,11 @@ call $~lib/memory/memory.copy local.get $3 ) - (func $~lib/array/Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2494,7 +2506,7 @@ i32.add i32.load8_u ) - (func $std/array/isArraysEqual (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 26 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2549,7 +2561,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 28 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 27 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2635,11 +2647,11 @@ end local.get $0 ) - (func $~lib/array/Array#get:length (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2662,7 +2674,7 @@ i32.add i32.load ) - (func $std/array/isArraysEqual (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2717,11 +2729,11 @@ end i32.const 1 ) - (func $~lib/array/Array#get:length (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/array/internalCapacity (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/internalCapacity (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -2731,12 +2743,12 @@ i32.const 2 i32.shr_s ) - (func $~lib/memory/memory.free (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 local.set $1 ) - (func $~lib/runtime/doReallocate (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doReallocate (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2801,7 +2813,7 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 107 i32.const 8 call $~lib/env/abort unreachable @@ -2833,7 +2845,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2891,7 +2903,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -2917,7 +2929,7 @@ i32.store local.get $2 ) - (func $~lib/array/Array#__get (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2940,7 +2952,7 @@ i32.add i32.load ) - (func $~lib/array/Array#pop (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2973,7 +2985,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#concat (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3019,7 +3031,7 @@ call $~lib/memory/memory.copy local.get $4 ) - (func $~lib/array/Array#copyWithin (; 41 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3209,7 +3221,7 @@ end local.get $0 ) - (func $std/array/isArraysEqual (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -3264,7 +3276,7 @@ end i32.const 1 ) - (func $~lib/array/Array#unshift (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#unshift (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3297,7 +3309,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#shift (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3346,7 +3358,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#reverse (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#reverse (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3401,7 +3413,7 @@ end local.get $0 ) - (func $~lib/array/Array#indexOf (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3473,7 +3485,7 @@ end i32.const -1 ) - (func $~lib/array/Array#includes (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 local.get $2 @@ -3481,7 +3493,7 @@ i32.const 0 i32.ge_s ) - (func $~lib/array/Array#splice (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3621,7 +3633,7 @@ i32.store offset=12 local.get $6 ) - (func $~lib/array/Array#__set (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 48 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 @@ -3648,12 +3660,12 @@ i32.store offset=12 end ) - (func $start:std/array~anonymous|0 (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $~lib/array/Array#findIndex (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3712,17 +3724,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3731,12 +3743,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|4 (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|4 (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3744,12 +3756,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3809,12 +3821,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3823,12 +3835,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3836,12 +3848,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 63 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3900,12 +3912,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3914,12 +3926,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3927,13 +3939,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 69 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 68 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 70 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 69 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3985,7 +3997,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 71 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 70 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3995,13 +4007,13 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|18 (; 72 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|18 (; 71 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 73 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 72 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -4010,7 +4022,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 74 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 73 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.const 0 @@ -4125,18 +4137,22 @@ end end ) - (func $start:std/array~anonymous|21 (; 75 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 74 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#constructor (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 75 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 16 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.5 (result i32) + i32.const 16 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 9 @@ -4154,7 +4170,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#map (; 77 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4227,11 +4243,11 @@ end local.get $3 ) - (func $~lib/array/Array#get:length (; 78 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 77 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 79 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 78 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -4254,7 +4270,7 @@ i32.add f32.load ) - (func $start:std/array~anonymous|22 (; 80 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 79 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4265,7 +4281,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 81 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 80 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4337,14 +4353,14 @@ end local.get $3 ) - (func $start:std/array~anonymous|23 (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 81 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 83 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4354,12 +4370,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 84 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 83 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 85 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 84 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4429,7 +4445,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|26 (; 86 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 85 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4442,7 +4458,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 86 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -4451,7 +4467,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 88 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4463,12 +4479,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 89 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 88 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 90 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 89 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4526,12 +4542,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|30 (; 91 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|30 (; 90 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|31 (; 92 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 91 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4543,7 +4559,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduce (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 92 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4601,7 +4617,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|32 (; 94 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 93 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4613,7 +4629,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|33 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 94 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4622,12 +4638,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|34 (; 96 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|34 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 97 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 96 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4635,12 +4651,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|36 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|36 (; 97 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 99 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 98 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4685,12 +4701,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|37 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|37 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|38 (; 101 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|38 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4702,7 +4718,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduceRight (; 102 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 101 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4747,7 +4763,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|39 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|39 (; 102 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4759,7 +4775,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|40 (; 104 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|40 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4768,12 +4784,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|41 (; 105 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|41 (; 104 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|42 (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|42 (; 105 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4781,7 +4797,7 @@ local.get $1 i32.add ) - (func $~lib/math/murmurHash3 (; 107 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 106 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -4810,7 +4826,7 @@ local.set $0 local.get $0 ) - (func $~lib/math/splitMix32 (; 108 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 107 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -4845,7 +4861,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 109 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 108 ;) (type $FUNCSIG$vj) (param $0 i64) local.get $0 i64.eqz if @@ -4874,7 +4890,7 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/util/sort/insertionSort (; 110 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 109 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f32) (local $5 i32) @@ -4970,7 +4986,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 111 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 110 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5270,7 +5286,7 @@ local.get $10 f32.store ) - (func $~lib/array/Array#sort (; 112 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 111 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -5356,7 +5372,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 113 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 112 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5389,7 +5405,7 @@ i32.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 114 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -5408,12 +5424,12 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/builtins/isNaN (; 115 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 114 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $std/array/isArraysEqual (; 116 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 115 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -5484,7 +5500,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 117 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 116 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) @@ -5580,7 +5596,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 118 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 117 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5880,7 +5896,7 @@ local.get $10 f64.store ) - (func $~lib/array/Array#sort (; 119 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 118 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -5966,7 +5982,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 120 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 119 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -5999,7 +6015,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6018,11 +6034,11 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/array/Array#get:length (; 122 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 121 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 123 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 122 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -6045,12 +6061,12 @@ i32.add f64.load ) - (func $~lib/builtins/isNaN (; 124 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 123 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $std/array/isArraysEqual (; 125 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 124 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -6121,7 +6137,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 126 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 125 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6217,7 +6233,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 127 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 126 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6517,7 +6533,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6601,12 +6617,12 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 130 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6625,7 +6641,7 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/util/sort/insertionSort (; 131 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 130 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6721,7 +6737,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 132 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 131 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7021,7 +7037,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7105,7 +7121,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 134 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -7114,7 +7130,7 @@ i32.lt_u i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 134 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -7133,7 +7149,7 @@ local.get $1 call $~lib/array/Array#sort ) - (func $std/array/createReverseOrderedArray (; 136 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 135 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -7170,7 +7186,7 @@ end local.get $1 ) - (func $~lib/math/NativeMath.random (; 137 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 136 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) (local $2 i64) @@ -7227,7 +7243,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 138 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 137 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -7264,12 +7280,12 @@ end local.get $1 ) - (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $std/array/isSorted (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -7317,7 +7333,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 141 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 140 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -7333,7 +7349,7 @@ unreachable end ) - (func $std/array/assertSortedDefault (; 142 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 141 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 block $~lib/util/sort/COMPARATOR|inlined.1 (result i32) i32.const 48 @@ -7341,34 +7357,38 @@ end call $std/array/assertSorted ) - (func $start:std/array~anonymous|43 (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|43 (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|44 (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $start:std/array~anonymous|45 (; 145 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|45 (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|46 (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|46 (; 145 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array>#constructor (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 16 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.6 (result i32) + i32.const 16 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 11 @@ -7386,11 +7406,11 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>#get:length (; 148 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#get:length (; 147 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array>#__set (; 149 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__set (; 148 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 @@ -7417,7 +7437,7 @@ i32.store offset=12 end ) - (func $~lib/array/Array>#__get (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__get (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7440,7 +7460,7 @@ i32.add i32.load ) - (func $std/array/createReverseOrderedNestedArray (; 151 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 150 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -7487,7 +7507,7 @@ end local.get $1 ) - (func $start:std/array~anonymous|47 (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -7496,7 +7516,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/util/sort/insertionSort> (; 153 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort> (; 152 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7592,7 +7612,7 @@ unreachable end ) - (func $~lib/array/Array>#sort (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7666,7 +7686,7 @@ end local.get $0 ) - (func $std/array/isSorted> (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -7714,7 +7734,7 @@ end i32.const 1 ) - (func $std/array/assertSorted> (; 156 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 155 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -7730,14 +7750,18 @@ unreachable end ) - (func $~lib/array/Array>#constructor (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 156 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 16 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.7 (result i32) + i32.const 16 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 12 @@ -7755,18 +7779,22 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>#get:length (; 158 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#get:length (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/array/Proxy#constructor (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/Proxy#constructor (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 4 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.8 (result i32) + i32.const 4 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 13 @@ -7779,7 +7807,7 @@ i32.store local.get $0 ) - (func $~lib/array/Array>#__set (; 160 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__set (; 159 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 @@ -7806,7 +7834,7 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedElementsArray (; 161 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 160 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -7845,14 +7873,14 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/util/sort/insertionSort> (; 163 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort> (; 162 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7948,7 +7976,7 @@ unreachable end ) - (func $~lib/array/Array>#sort (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8022,7 +8050,7 @@ end local.get $0 ) - (func $~lib/array/Array>#__get (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__get (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -8045,7 +8073,7 @@ i32.add i32.load ) - (func $std/array/isSorted> (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -8093,7 +8121,7 @@ end i32.const 1 ) - (func $std/array/assertSorted> (; 167 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 166 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -8109,7 +8137,7 @@ unreachable end ) - (func $~lib/util/sort/insertionSort (; 168 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 167 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8205,7 +8233,7 @@ unreachable end ) - (func $~lib/array/Array#sort (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8279,11 +8307,11 @@ end local.get $0 ) - (func $~lib/array/Array#get:length (; 170 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 169 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -8306,7 +8334,7 @@ i32.add i32.load ) - (func $std/array/isSorted (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -8354,7 +8382,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 173 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 172 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -8370,7 +8398,7 @@ unreachable end ) - (func $~lib/string/String#get:length (; 174 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 173 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -8378,7 +8406,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 175 ;) (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 (; 174 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -8431,7 +8459,7 @@ end local.get $5 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8504,7 +8532,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted|trampoline (; 177 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted|trampoline (; 176 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $1of1 block $0of1 block $outOfRange @@ -8525,7 +8553,7 @@ local.get $1 call $std/array/assertSorted ) - (func $~lib/string/String.__eq (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -8569,13 +8597,13 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.__ne (; 179 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__eq i32.eqz ) - (func $std/array/isArraysEqual (; 180 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 179 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -8630,14 +8658,18 @@ end i32.const 1 ) - (func $~lib/array/Array#constructor (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 16 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.9 (result i32) + i32.const 16 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 14 @@ -8655,7 +8687,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/string/String#charAt (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#charAt (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -8678,7 +8710,7 @@ i32.const 3264 return end - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + block $~lib/runtime/ALLOCATE|inlined.10 (result i32) i32.const 2 local.set $2 local.get $2 @@ -8701,7 +8733,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/string/String#concat (; 183 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8735,7 +8767,7 @@ i32.const 3264 return end - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + block $~lib/runtime/ALLOCATE|inlined.11 (result i32) local.get $4 local.set $5 local.get $5 @@ -8760,7 +8792,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/string/String.__concat (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 183 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 3440 local.get $0 @@ -8770,7 +8802,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 185 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 184 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -8812,7 +8844,7 @@ end local.get $1 ) - (func $~lib/array/Array#__set (; 186 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 185 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 @@ -8839,7 +8871,7 @@ i32.store offset=12 end ) - (func $std/array/createRandomStringArray (; 187 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomStringArray (; 186 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -8875,7 +8907,7 @@ end local.get $1 ) - (func $~lib/string/String#substring (; 188 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 187 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8980,7 +9012,7 @@ local.get $0 return end - block $~lib/runtime/ALLOCATE|inlined.4 (result i32) + block $~lib/runtime/ALLOCATE|inlined.13 (result i32) local.get $3 local.set $4 local.get $4 @@ -9001,7 +9033,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/runtime/doDiscard (; 189 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/doDiscard (; 188 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -9009,7 +9041,7 @@ i32.sub call $~lib/memory/memory.free ) - (func $~lib/array/Array#join_bool (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_bool (; 189 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9060,7 +9092,7 @@ local.get $5 i32.add local.set $6 - block $~lib/runtime/ALLOCATE|inlined.3 (result i32) + block $~lib/runtime/ALLOCATE|inlined.12 (result i32) local.get $6 i32.const 1 i32.shl @@ -9196,13 +9228,13 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_bool return ) - (func $~lib/util/number/decimalCount32 (; 192 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 191 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -9271,7 +9303,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa32_lut (; 193 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 192 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9414,7 +9446,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 194 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 193 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9443,7 +9475,7 @@ local.get $1 i32.add local.set $2 - block $~lib/runtime/ALLOCATE|inlined.5 (result i32) + block $~lib/runtime/ALLOCATE|inlined.14 (result i32) local.get $2 i32.const 1 i32.shl @@ -9478,12 +9510,12 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa (; 195 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 194 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 196 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 195 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9542,7 +9574,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9586,7 +9618,7 @@ i32.const 11 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.6 (result i32) + block $~lib/runtime/ALLOCATE|inlined.15 (result i32) local.get $5 i32.const 1 i32.shl @@ -9688,13 +9720,13 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/util/number/utoa32 (; 199 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 198 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9709,7 +9741,7 @@ local.get $0 call $~lib/util/number/decimalCount32 local.set $1 - block $~lib/runtime/ALLOCATE|inlined.7 (result i32) + block $~lib/runtime/ALLOCATE|inlined.16 (result i32) local.get $1 i32.const 1 i32.shl @@ -9738,12 +9770,12 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa (; 200 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 199 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 201 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 200 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9782,7 +9814,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 201 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9826,7 +9858,7 @@ i32.const 10 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.8 (result i32) + block $~lib/runtime/ALLOCATE|inlined.17 (result i32) local.get $5 i32.const 1 i32.shl @@ -9928,20 +9960,20 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 203 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/builtins/isFinite (; 204 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 203 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/util/number/genDigits (; 205 ;) (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 (; 204 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -10512,7 +10544,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 206 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 205 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10845,7 +10877,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 207 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 206 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -11291,7 +11323,7 @@ local.get $2 i32.add ) - (func $~lib/util/number/dtoa (; 208 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 207 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11321,7 +11353,7 @@ select return end - block $~lib/runtime/ALLOCATE|inlined.9 (result i32) + block $~lib/runtime/ALLOCATE|inlined.18 (result i32) i32.const 28 i32.const 1 i32.shl @@ -11347,7 +11379,7 @@ end local.get $4 ) - (func $~lib/util/number/dtoa_stream (; 209 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 208 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11421,7 +11453,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join_flt (; 210 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_flt (; 209 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11465,7 +11497,7 @@ i32.const 28 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.10 (result i32) + block $~lib/runtime/ALLOCATE|inlined.19 (result i32) local.get $5 i32.const 1 i32.shl @@ -11567,13 +11599,13 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 211 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 210 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_flt return ) - (func $~lib/array/Array#join_str (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_str (; 211 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11655,7 +11687,7 @@ end i32.const 0 local.set $9 - block $~lib/runtime/ALLOCATE|inlined.11 (result i32) + block $~lib/runtime/ALLOCATE|inlined.20 (result i32) local.get $5 local.get $4 local.get $2 @@ -11765,20 +11797,24 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 213 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_str return ) - (func $std/array/Ref#constructor (; 214 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/Ref#constructor (; 213 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 0 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.21 (result i32) + i32.const 0 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 18 @@ -11788,14 +11824,18 @@ end local.get $0 ) - (func $~lib/array/Array#constructor (; 215 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 16 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.22 (result i32) + i32.const 16 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 19 @@ -11813,7 +11853,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#join_ref (; 216 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_ref (; 215 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11855,7 +11895,7 @@ i32.const 15 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.12 (result i32) + block $~lib/runtime/ALLOCATE|inlined.23 (result i32) local.get $5 i32.const 1 i32.shl @@ -11975,18 +12015,18 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 217 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 216 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_ref return ) - (func $~lib/array/Array#toString (; 218 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 217 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa (; 219 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 218 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11995,7 +12035,7 @@ call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 220 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 219 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12070,7 +12110,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 220 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12114,7 +12154,7 @@ i32.const 11 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.13 (result i32) + block $~lib/runtime/ALLOCATE|inlined.24 (result i32) local.get $5 i32.const 1 i32.shl @@ -12216,25 +12256,25 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 222 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa (; 224 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 65535 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 224 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12279,7 +12319,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12323,7 +12363,7 @@ i32.const 10 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.14 (result i32) + block $~lib/runtime/ALLOCATE|inlined.25 (result i32) local.get $5 i32.const 1 i32.shl @@ -12425,18 +12465,18 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 227 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 228 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 227 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/util/number/decimalCount64 (; 229 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 228 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -12505,7 +12545,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 230 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 229 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -12633,7 +12673,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 231 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 230 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12658,7 +12698,7 @@ local.get $2 call $~lib/util/number/decimalCount32 local.set $3 - block $~lib/runtime/ALLOCATE|inlined.15 (result i32) + block $~lib/runtime/ALLOCATE|inlined.26 (result i32) local.get $3 i32.const 1 i32.shl @@ -12683,7 +12723,7 @@ local.get $0 call $~lib/util/number/decimalCount64 local.set $3 - block $~lib/runtime/ALLOCATE|inlined.16 (result i32) + block $~lib/runtime/ALLOCATE|inlined.27 (result i32) local.get $3 i32.const 1 i32.shl @@ -12713,12 +12753,12 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa (; 232 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 231 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/utoa64 return ) - (func $~lib/util/number/itoa_stream (; 233 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 232 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12784,7 +12824,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 234 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 233 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12828,7 +12868,7 @@ i32.const 20 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.17 (result i32) + block $~lib/runtime/ALLOCATE|inlined.28 (result i32) local.get $5 i32.const 1 i32.shl @@ -12930,18 +12970,18 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 235 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 234 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 236 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 235 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa64 (; 237 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 236 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12980,7 +13020,7 @@ local.get $1 i32.add local.set $4 - block $~lib/runtime/ALLOCATE|inlined.18 (result i32) + block $~lib/runtime/ALLOCATE|inlined.29 (result i32) local.get $4 i32.const 1 i32.shl @@ -13007,7 +13047,7 @@ local.get $1 i32.add local.set $4 - block $~lib/runtime/ALLOCATE|inlined.19 (result i32) + block $~lib/runtime/ALLOCATE|inlined.30 (result i32) local.get $4 i32.const 1 i32.shl @@ -13043,12 +13083,12 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa (; 238 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 237 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/itoa64 return ) - (func $~lib/util/number/itoa_stream (; 239 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 238 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13136,7 +13176,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 240 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 239 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13180,7 +13220,7 @@ i32.const 21 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.20 (result i32) + block $~lib/runtime/ALLOCATE|inlined.31 (result i32) local.get $5 i32.const 1 i32.shl @@ -13282,23 +13322,23 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 241 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 240 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 242 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 241 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/array/Array#toString (; 243 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 242 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array#join ) - (func $~lib/array/Array>#join_arr (; 244 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 243 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13402,25 +13442,29 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 245 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 244 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>#toString (; 246 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#toString (; 245 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array>#join ) - (func $~lib/array/Array>#constructor (; 247 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 16 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.32 (result i32) + i32.const 16 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 23 @@ -13438,14 +13482,14 @@ i32.store offset=12 local.get $0 ) - (func $~lib/util/number/itoa (; 248 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 249 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 248 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13490,7 +13534,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 249 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13534,7 +13578,7 @@ i32.const 10 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.21 (result i32) + block $~lib/runtime/ALLOCATE|inlined.33 (result i32) local.get $5 i32.const 1 i32.shl @@ -13636,13 +13680,13 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 251 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array>#join_arr (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 251 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13746,25 +13790,29 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 253 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>#toString (; 254 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#toString (; 253 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array>#join ) - (func $~lib/array/Array>#constructor (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 254 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 16 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.34 (result i32) + i32.const 16 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 24 @@ -13782,14 +13830,18 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>>#constructor (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#constructor (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 16 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.35 (result i32) + i32.const 16 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 25 @@ -13807,7 +13859,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>#join_arr (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13911,13 +13963,13 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>>#join_arr (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#join_arr (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14021,18 +14073,18 @@ end local.get $3 ) - (func $~lib/array/Array>>#join (; 260 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#join (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>>#join_arr return ) - (func $~lib/array/Array>>#toString (; 261 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>>#toString (; 260 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 3512 call $~lib/array/Array>>#join ) - (func $start:std/array (; 262 ;) (type $FUNCSIG$v) + (func $start:std/array (; 261 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18858,9 +18910,9 @@ unreachable end ) - (func $start (; 263 ;) (type $FUNCSIG$v) + (func $start (; 262 ;) (type $FUNCSIG$v) call $start:std/array ) - (func $null (; 264 ;) (type $FUNCSIG$v) + (func $null (; 263 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 7cd6dda983..f9fd20d002 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -326,7 +326,7 @@ if i32.const 0 i32.const 64 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -340,7 +340,7 @@ if i32.const 0 i32.const 64 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable @@ -1552,7 +1552,7 @@ if i32.const 0 i32.const 64 - i32.const 227 + i32.const 234 i32.const 57 call $~lib/env/abort unreachable @@ -1884,10 +1884,12 @@ global.set $std/arraybuffer/arr8 call $~lib/runtime/doWrapArray drop - i32.const 1 - i32.const 0 global.get $std/arraybuffer/arr8 - select + if (result i32) + i32.const 1 + else + i32.const 0 + end i32.eqz if i32.const 0 diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 5d56658c92..d185562933 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -408,7 +408,7 @@ if i32.const 0 i32.const 64 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -423,7 +423,7 @@ if i32.const 0 i32.const 64 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable @@ -2037,11 +2037,7 @@ end i32.const 0 ) - (func $~lib/runtime/ALLOCATE (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/ArrayBufferView#constructor (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -2052,7 +2048,7 @@ if i32.const 0 i32.const 64 - i32.const 227 + i32.const 234 i32.const 57 call $~lib/env/abort unreachable @@ -2069,8 +2065,12 @@ i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + i32.const 12 + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + end local.set $4 local.get $4 i32.const 3 @@ -2099,14 +2099,18 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.3 (result i32) + i32.const 12 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 4 @@ -2118,7 +2122,7 @@ local.set $0 local.get $0 ) - (func $~lib/runtime/doWrapArray (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/doWrapArray (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2155,14 +2159,18 @@ call $~lib/memory/memory.copy local.get $3 ) - (func $~lib/typedarray/Int32Array#constructor (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.4 (result i32) + i32.const 12 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 6 @@ -2174,7 +2182,7 @@ local.set $0 local.get $0 ) - (func $~lib/dataview/DataView#constructor (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 21 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $3 @@ -2217,8 +2225,12 @@ i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.5 (result i32) + i32.const 12 + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + end local.set $4 local.get $4 i32.const 7 @@ -2251,11 +2263,11 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#get:buffer (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#get:buffer (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $start:std/arraybuffer (; 24 ;) (type $FUNCSIG$v) + (func $start:std/arraybuffer (; 23 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/memory/HEAP_BASE i32.const 7 @@ -2576,9 +2588,9 @@ unreachable end ) - (func $start (; 25 ;) (type $FUNCSIG$v) + (func $start (; 24 ;) (type $FUNCSIG$v) call $start:std/arraybuffer ) - (func $null (; 26 ;) (type $FUNCSIG$v) + (func $null (; 25 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 4a05a9cb9e..6c1fe71849 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -163,7 +163,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -177,7 +177,7 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable @@ -1012,14 +1012,14 @@ i32.const 95 call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array - local.tee $0 i32.load - local.get $0 + global.get $std/dataview/array + local.tee $0 i32.load offset=4 local.get $0 i32.load i32.sub - local.get $0 + global.get $std/dataview/array i32.load offset=8 call $~lib/dataview/DataView#constructor global.set $std/dataview/view diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 9bc3fc2419..d66ae25174 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -414,7 +414,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -429,7 +429,7 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable @@ -478,11 +478,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/runtime/ALLOCATE (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/ArrayBufferView#constructor (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -493,7 +489,7 @@ if i32.const 0 i32.const 16 - i32.const 227 + i32.const 234 i32.const 57 call $~lib/env/abort unreachable @@ -510,8 +506,12 @@ i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + i32.const 12 + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + end local.set $4 local.get $4 i32.const 3 @@ -540,14 +540,18 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + i32.const 12 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 4 @@ -559,7 +563,7 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint8Array#__set (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -579,13 +583,13 @@ local.get $2 i32.store8 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $~lib/dataview/DataView#constructor (; 13 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 12 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $3 @@ -628,8 +632,12 @@ i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.3 (result i32) + i32.const 12 + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + end local.set $4 local.get $4 i32.const 5 @@ -662,22 +670,22 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#get:buffer (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#get:buffer (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load i32.sub ) - (func $~lib/runtime/ArrayBufferView#get:byteLength (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#get:byteLength (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 ) - (func $~lib/polyfills/bswap (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const -16711936 i32.and @@ -691,7 +699,7 @@ i32.or return ) - (func $~lib/dataview/DataView#getFloat32 (; 18 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $~lib/dataview/DataView#getFloat32 (; 17 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $1 i32.const 0 i32.lt_s @@ -729,7 +737,7 @@ f32.reinterpret_i32 end ) - (func $~lib/polyfills/bswap (; 19 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 18 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -768,7 +776,7 @@ i64.rotr return ) - (func $~lib/dataview/DataView#getFloat64 (; 20 ;) (type $FUNCSIG$diii) (param $0 i32) (param $1 i32) (param $2 i32) (result f64) + (func $~lib/dataview/DataView#getFloat64 (; 19 ;) (type $FUNCSIG$diii) (param $0 i32) (param $1 i32) (param $2 i32) (result f64) local.get $1 i32.const 0 i32.lt_s @@ -806,7 +814,7 @@ f64.reinterpret_i64 end ) - (func $~lib/dataview/DataView#getInt8 (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getInt8 (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -825,7 +833,7 @@ i32.add i32.load8_s ) - (func $~lib/polyfills/bswap (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.shl @@ -841,7 +849,7 @@ i32.or return ) - (func $~lib/dataview/DataView#getInt16 (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt16 (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 0 @@ -877,7 +885,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/polyfills/bswap (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const -16711936 i32.and @@ -891,7 +899,7 @@ i32.or return ) - (func $~lib/dataview/DataView#getInt32 (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt32 (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 0 @@ -927,7 +935,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/polyfills/bswap (; 26 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 25 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -966,7 +974,7 @@ i64.rotr return ) - (func $~lib/dataview/DataView#getInt64 (; 27 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) + (func $~lib/dataview/DataView#getInt64 (; 26 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) (local $3 i64) local.get $1 i32.const 0 @@ -1002,7 +1010,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint8 (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getUint8 (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1021,7 +1029,7 @@ i32.add i32.load8_u ) - (func $~lib/polyfills/bswap (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.shl @@ -1035,7 +1043,7 @@ i32.or return ) - (func $~lib/dataview/DataView#getUint16 (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint16 (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 0 @@ -1071,7 +1079,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint32 (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint32 (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 0 @@ -1107,7 +1115,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint64 (; 32 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) + (func $~lib/dataview/DataView#getUint64 (; 31 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) (local $3 i64) local.get $1 i32.const 0 @@ -1143,7 +1151,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#setFloat32 (; 33 ;) (type $FUNCSIG$viifi) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) + (func $~lib/dataview/DataView#setFloat32 (; 32 ;) (type $FUNCSIG$viifi) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1183,7 +1191,7 @@ i32.store end ) - (func $~lib/dataview/DataView#setFloat64 (; 34 ;) (type $FUNCSIG$viidi) (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) + (func $~lib/dataview/DataView#setFloat64 (; 33 ;) (type $FUNCSIG$viidi) (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1223,7 +1231,7 @@ i64.store end ) - (func $~lib/dataview/DataView#setInt8 (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt8 (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1243,7 +1251,7 @@ local.get $2 i32.store8 ) - (func $~lib/dataview/DataView#setInt16 (; 36 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/dataview/DataView#setInt16 (; 35 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1277,7 +1285,7 @@ end i32.store16 ) - (func $~lib/dataview/DataView#setInt32 (; 37 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/dataview/DataView#setInt32 (; 36 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1311,7 +1319,7 @@ end i32.store ) - (func $~lib/dataview/DataView#setInt64 (; 38 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) + (func $~lib/dataview/DataView#setInt64 (; 37 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1345,7 +1353,7 @@ end i64.store ) - (func $~lib/dataview/DataView#setUint8 (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint8 (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1365,7 +1373,7 @@ local.get $2 i32.store8 ) - (func $~lib/dataview/DataView#setUint16 (; 40 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/dataview/DataView#setUint16 (; 39 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1399,7 +1407,7 @@ end i32.store16 ) - (func $~lib/dataview/DataView#setUint32 (; 41 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/dataview/DataView#setUint32 (; 40 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1433,7 +1441,7 @@ end i32.store ) - (func $~lib/dataview/DataView#setUint64 (; 42 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) + (func $~lib/dataview/DataView#setUint64 (; 41 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1467,7 +1475,7 @@ end i64.store ) - (func $start:std/dataview (; 43 ;) (type $FUNCSIG$v) + (func $start:std/dataview (; 42 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -3160,9 +3168,9 @@ unreachable end ) - (func $start (; 44 ;) (type $FUNCSIG$v) + (func $start (; 43 ;) (type $FUNCSIG$v) call $start:std/dataview ) - (func $null (; 45 ;) (type $FUNCSIG$v) + (func $null (; 44 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 900c23f494..af285a5efe 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -90,7 +90,7 @@ if i32.const 0 i32.const 48 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -104,7 +104,7 @@ if i32.const 0 i32.const 48 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 66eb060ad8..789077586d 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -142,11 +142,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/ALLOCATE (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/assertUnregistered (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -154,7 +150,7 @@ if i32.const 0 i32.const 48 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -169,13 +165,13 @@ if i32.const 0 i32.const 48 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/doRegister (; 8 ;) (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 call $~lib/runtime/assertUnregistered local.get $0 @@ -185,15 +181,19 @@ i32.store local.get $0 ) - (func $~lib/date/Date#constructor (; 9 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/date/Date#constructor (; 8 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 8 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + i32.const 8 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 2 @@ -210,17 +210,17 @@ i64.store local.get $0 ) - (func $~lib/date/Date#getTime (; 10 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) + (func $~lib/date/Date#getTime (; 9 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) local.get $0 i64.load ) - (func $~lib/date/Date#setTime (; 11 ;) (type $FUNCSIG$jij) (param $0 i32) (param $1 i64) (result i64) + (func $~lib/date/Date#setTime (; 10 ;) (type $FUNCSIG$jij) (param $0 i32) (param $1 i64) (result i64) local.get $0 local.get $1 i64.store local.get $1 ) - (func $start:std/date (; 12 ;) (type $FUNCSIG$v) + (func $start:std/date (; 11 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -405,9 +405,9 @@ unreachable end ) - (func $start (; 13 ;) (type $FUNCSIG$v) + (func $start (; 12 ;) (type $FUNCSIG$v) call $start:std/date ) - (func $null (; 14 ;) (type $FUNCSIG$v) + (func $null (; 13 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 2f38ffe765..b876f1ad9f 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -123,7 +123,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -137,7 +137,7 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index daeb9b1e5a..c91cfcde55 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -148,11 +148,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -160,7 +156,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -175,13 +171,13 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -191,7 +187,7 @@ i32.store local.get $0 ) - (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) @@ -447,7 +443,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -461,7 +457,7 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) local.get $1 local.set $2 local.get $2 @@ -480,7 +476,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/map/Map#clear (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -506,15 +502,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 1 @@ -545,14 +545,14 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash8 (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const -2128831035 local.get $0 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -607,7 +607,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -626,7 +626,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -760,7 +760,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -868,7 +868,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -894,11 +894,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -975,7 +975,7 @@ end i32.const 1 ) - (func $std/map/test (; 19 ;) (type $FUNCSIG$v) + (func $std/map/test (; 18 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1359,7 +1359,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -1385,15 +1385,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 4 @@ -1424,7 +1428,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1477,7 +1481,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1494,7 +1498,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1628,7 +1632,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1734,7 +1738,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -1758,11 +1762,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1837,7 +1841,7 @@ end i32.const 1 ) - (func $std/map/test (; 29 ;) (type $FUNCSIG$v) + (func $std/map/test (; 28 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2207,7 +2211,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -2233,15 +2237,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.3 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 5 @@ -2272,7 +2280,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -2294,7 +2302,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2349,7 +2357,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2368,7 +2376,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2502,7 +2510,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2610,7 +2618,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2636,11 +2644,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2717,7 +2725,7 @@ end i32.const 1 ) - (func $std/map/test (; 40 ;) (type $FUNCSIG$v) + (func $std/map/test (; 39 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3101,7 +3109,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -3127,15 +3135,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.4 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 6 @@ -3166,7 +3178,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3219,7 +3231,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -3236,7 +3248,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3370,7 +3382,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 46 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3476,7 +3488,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3500,11 +3512,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3579,7 +3591,7 @@ end i32.const 1 ) - (func $std/map/test (; 50 ;) (type $FUNCSIG$v) + (func $std/map/test (; 49 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3949,7 +3961,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 51 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -3975,15 +3987,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.5 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 7 @@ -4014,7 +4030,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -4056,7 +4072,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4107,7 +4123,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -4122,7 +4138,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 56 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4256,7 +4272,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 57 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 56 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4360,7 +4376,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4382,11 +4398,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4459,7 +4475,7 @@ end i32.const 1 ) - (func $std/map/test (; 61 ;) (type $FUNCSIG$v) + (func $std/map/test (; 60 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4815,7 +4831,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 61 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -4841,15 +4857,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 63 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.6 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 8 @@ -4880,7 +4900,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4931,7 +4951,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -4946,7 +4966,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 66 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 65 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5080,7 +5100,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 67 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 66 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5184,7 +5204,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 68 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5206,11 +5226,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 68 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 69 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5283,7 +5303,7 @@ end i32.const 1 ) - (func $std/map/test (; 71 ;) (type $FUNCSIG$v) + (func $std/map/test (; 70 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5639,7 +5659,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 72 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 71 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -5665,15 +5685,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 72 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.7 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 9 @@ -5704,7 +5728,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 74 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 73 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5792,7 +5816,7 @@ local.set $3 local.get $3 ) - (func $~lib/map/Map#find (; 75 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 74 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5843,7 +5867,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 76 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 75 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -5858,7 +5882,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 77 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 76 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5993,7 +6017,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 78 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 77 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) @@ -6098,7 +6122,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 79 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 78 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) local.get $0 @@ -6120,11 +6144,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 81 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 80 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6198,7 +6222,7 @@ end i32.const 1 ) - (func $std/map/test (; 82 ;) (type $FUNCSIG$v) + (func $std/map/test (; 81 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6561,7 +6585,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 83 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 82 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -6587,15 +6611,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 84 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 83 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.8 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 10 @@ -6626,7 +6654,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 85 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 84 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6677,7 +6705,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 86 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 85 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -6692,7 +6720,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 87 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 86 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6827,7 +6855,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 88 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 87 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) @@ -6932,7 +6960,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 89 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 88 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) local.get $0 @@ -6954,11 +6982,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 90 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 89 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 91 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 90 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -7032,7 +7060,7 @@ end i32.const 1 ) - (func $std/map/test (; 92 ;) (type $FUNCSIG$v) + (func $std/map/test (; 91 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -7395,7 +7423,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 93 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 92 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -7421,15 +7449,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.9 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 11 @@ -7460,7 +7492,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 95 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 94 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7511,7 +7543,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 96 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 95 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) local.get $0 local.get $1 @@ -7527,7 +7559,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 97 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 96 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7663,7 +7695,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 98 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/map/Map#set (; 97 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) (local $3 f32) (local $4 i32) (local $5 i32) @@ -7769,7 +7801,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 99 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 98 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) local.get $0 @@ -7792,11 +7824,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 100 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 99 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 101 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#delete (; 100 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -7871,7 +7903,7 @@ end i32.const 1 ) - (func $std/map/test (; 102 ;) (type $FUNCSIG$v) + (func $std/map/test (; 101 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -8234,7 +8266,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 103 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 102 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -8260,15 +8292,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 104 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 103 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.10 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 12 @@ -8299,7 +8335,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 105 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 104 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -8350,7 +8386,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 106 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 105 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) local.get $0 local.get $1 @@ -8366,7 +8402,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 107 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 106 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8502,7 +8538,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 108 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/map/Map#set (; 107 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) (local $3 f64) (local $4 i32) (local $5 i32) @@ -8608,7 +8644,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 109 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 108 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) local.get $0 @@ -8631,11 +8667,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 110 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 109 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 111 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#delete (; 110 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -8710,7 +8746,7 @@ end i32.const 1 ) - (func $std/map/test (; 112 ;) (type $FUNCSIG$v) + (func $std/map/test (; 111 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -9073,7 +9109,7 @@ unreachable end ) - (func $start:std/map (; 113 ;) (type $FUNCSIG$v) + (func $start:std/map (; 112 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -9095,9 +9131,9 @@ call $std/map/test call $std/map/test ) - (func $start (; 114 ;) (type $FUNCSIG$v) + (func $start (; 113 ;) (type $FUNCSIG$v) call $start:std/map ) - (func $null (; 115 ;) (type $FUNCSIG$v) + (func $null (; 114 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 6cb9c5eb85..44b7c90a08 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -84,7 +84,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -98,7 +98,7 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index c053cb9a36..4746071ebb 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -135,11 +135,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -147,7 +143,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -162,13 +158,13 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -178,7 +174,7 @@ i32.store local.get $0 ) - (func $std/new/AClass#constructor (; 7 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $std/new/AClass#constructor (; 6 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) local.get $0 block (result i32) @@ -186,8 +182,12 @@ i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 8 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + i32.const 8 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 1 @@ -212,7 +212,7 @@ f32.store offset=4 local.get $0 ) - (func $start:std/new (; 8 ;) (type $FUNCSIG$v) + (func $start:std/new (; 7 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -228,9 +228,9 @@ call $std/new/AClass#constructor global.set $std/new/aClass ) - (func $start (; 9 ;) (type $FUNCSIG$v) + (func $start (; 8 ;) (type $FUNCSIG$v) call $start:std/new ) - (func $null (; 10 ;) (type $FUNCSIG$v) + (func $null (; 9 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 8542a050a8..3216562137 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -167,7 +167,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -181,7 +181,7 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 21a621b6f2..ea13f29e14 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -203,11 +203,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -215,7 +211,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -230,13 +226,13 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -246,14 +242,18 @@ i32.store local.get $0 ) - (func $std/operator-overloading/Tester#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/operator-overloading/Tester#constructor (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 8 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + i32.const 8 + local.set $3 + local.get $3 + call $~lib/runtime/doAllocate + end local.set $3 local.get $3 i32.const 1 @@ -269,7 +269,7 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/Tester.add (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.add (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -283,7 +283,7 @@ i32.add call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.sub (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.sub (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -297,7 +297,7 @@ i32.sub call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.mul (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.mul (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -311,7 +311,7 @@ i32.mul call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.div (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.div (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -325,7 +325,7 @@ i32.div_s call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.mod (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.mod (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -339,7 +339,7 @@ i32.rem_s call $std/operator-overloading/Tester#constructor ) - (func $~lib/math/NativeMath.scalbn (; 13 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 12 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) (local $2 f64) (local $3 i32) (local $4 i32) @@ -430,7 +430,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/math/NativeMath.pow (; 14 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 13 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -1518,7 +1518,7 @@ local.get $16 f64.mul ) - (func $std/operator-overloading/Tester.pow (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.pow (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1538,7 +1538,7 @@ i32.trunc_f64_s call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.and (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.and (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1552,7 +1552,7 @@ i32.and call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.or (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.or (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1566,7 +1566,7 @@ i32.or call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.xor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.xor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1580,7 +1580,7 @@ i32.xor call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.equals (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.equals (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1598,7 +1598,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.notEquals (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.notEquals (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1616,7 +1616,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.greater (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.greater (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1634,7 +1634,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.greaterEquals (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.greaterEquals (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1652,7 +1652,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.less (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.less (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1670,7 +1670,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.lessEquals (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.lessEquals (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1688,7 +1688,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.shr (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shr (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1700,7 +1700,7 @@ i32.shr_s call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.shu (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shu (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1712,7 +1712,7 @@ i32.shr_u call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.shl (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shl (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1724,7 +1724,7 @@ i32.shl call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.pos (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.pos (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1732,7 +1732,7 @@ i32.load offset=4 call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.neg (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.neg (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.const 0 local.get $0 @@ -1744,7 +1744,7 @@ i32.sub call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.not (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.not (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1756,7 +1756,7 @@ i32.xor call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.excl (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.excl (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -1770,7 +1770,7 @@ local.get $1 end ) - (func $std/operator-overloading/Tester#inc (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#inc (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 local.get $0 i32.load @@ -1785,7 +1785,7 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/Tester#dec (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#dec (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 local.get $0 i32.load @@ -1800,7 +1800,7 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/Tester#postInc (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#postInc (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1812,7 +1812,7 @@ i32.add call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester#postDec (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#postDec (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1824,14 +1824,18 @@ i32.sub call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/TesterInlineStatic#constructor (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/operator-overloading/TesterInlineStatic#constructor (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 8 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + i32.const 8 + local.set $3 + local.get $3 + call $~lib/runtime/doAllocate + end local.set $3 local.get $3 i32.const 3 @@ -1847,14 +1851,18 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/TesterInlineInstance#constructor (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/operator-overloading/TesterInlineInstance#constructor (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 8 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + i32.const 8 + local.set $3 + local.get $3 + call $~lib/runtime/doAllocate + end local.set $3 local.get $3 i32.const 4 @@ -1870,7 +1878,7 @@ i32.store offset=4 local.get $0 ) - (func $start:std/operator-overloading (; 38 ;) (type $FUNCSIG$v) + (func $start:std/operator-overloading (; 37 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) global.get $~lib/memory/HEAP_BASE @@ -2931,9 +2939,9 @@ unreachable end ) - (func $start (; 39 ;) (type $FUNCSIG$v) + (func $start (; 38 ;) (type $FUNCSIG$v) call $start:std/operator-overloading ) - (func $null (; 40 ;) (type $FUNCSIG$v) + (func $null (; 39 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 2b0b25aa1e..acdde4446d 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -2616,7 +2616,7 @@ if i32.const 0 i32.const 232 - i32.const 100 + i32.const 107 i32.const 8 call $~lib/env/abort unreachable @@ -2653,7 +2653,7 @@ if i32.const 0 i32.const 232 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -2667,7 +2667,7 @@ if i32.const 0 i32.const 232 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 492ff4fde8..c1a0470056 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -3301,7 +3301,7 @@ if i32.const 0 i32.const 232 - i32.const 100 + i32.const 107 i32.const 8 call $~lib/env/abort unreachable @@ -3342,7 +3342,7 @@ if i32.const 0 i32.const 232 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -3357,7 +3357,7 @@ if i32.const 0 i32.const 232 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 73811b2e8d..7821ac7fac 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -119,7 +119,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -133,7 +133,7 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 73a1c56c02..5e87e83ba6 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -148,11 +148,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/ALLOCATE (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -160,7 +156,7 @@ if i32.const 0 i32.const 16 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -175,13 +171,13 @@ if i32.const 0 i32.const 16 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -191,7 +187,7 @@ i32.store local.get $0 ) - (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) @@ -447,7 +443,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -461,7 +457,7 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) local.get $1 local.set $2 local.get $2 @@ -480,7 +476,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/set/Set#clear (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -506,15 +502,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 1 @@ -545,14 +545,14 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash8 (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const -2128831035 local.get $0 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -607,7 +607,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -626,7 +626,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -756,7 +756,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -858,11 +858,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -939,7 +939,7 @@ end i32.const 1 ) - (func $std/set/test (; 18 ;) (type $FUNCSIG$v) + (func $std/set/test (; 17 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1222,7 +1222,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -1248,15 +1248,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 4 @@ -1287,7 +1291,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1340,7 +1344,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1357,7 +1361,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1487,7 +1491,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1587,11 +1591,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1666,7 +1670,7 @@ end i32.const 1 ) - (func $std/set/test (; 27 ;) (type $FUNCSIG$v) + (func $std/set/test (; 26 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1949,7 +1953,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -1975,15 +1979,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.3 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 5 @@ -2014,7 +2022,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -2036,7 +2044,7 @@ local.set $1 local.get $1 ) - (func $~lib/set/Set#find (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2091,7 +2099,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2110,7 +2118,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2240,7 +2248,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2342,11 +2350,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2423,7 +2431,7 @@ end i32.const 1 ) - (func $std/set/test (; 37 ;) (type $FUNCSIG$v) + (func $std/set/test (; 36 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2706,7 +2714,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -2732,15 +2740,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.4 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 6 @@ -2771,7 +2783,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2824,7 +2836,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2841,7 +2853,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 42 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2971,7 +2983,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 43 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 42 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3071,11 +3083,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3150,7 +3162,7 @@ end i32.const 1 ) - (func $std/set/test (; 46 ;) (type $FUNCSIG$v) + (func $std/set/test (; 45 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3433,7 +3445,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 47 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -3459,15 +3471,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.5 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 7 @@ -3498,7 +3514,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -3540,7 +3556,7 @@ local.set $1 local.get $1 ) - (func $~lib/set/Set#find (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3591,7 +3607,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -3606,7 +3622,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 52 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 51 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3736,7 +3752,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 52 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3834,11 +3850,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3911,7 +3927,7 @@ end i32.const 1 ) - (func $std/set/test (; 56 ;) (type $FUNCSIG$v) + (func $std/set/test (; 55 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4194,7 +4210,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 57 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -4220,15 +4236,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.6 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 8 @@ -4259,7 +4279,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4310,7 +4330,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -4325,7 +4345,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 61 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 60 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4455,7 +4475,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 62 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 61 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4553,11 +4573,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 63 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 63 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4630,7 +4650,7 @@ end i32.const 1 ) - (func $std/set/test (; 65 ;) (type $FUNCSIG$v) + (func $std/set/test (; 64 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4913,7 +4933,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 66 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 65 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -4939,15 +4959,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 67 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 66 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.7 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 9 @@ -4978,7 +5002,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 68 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 67 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5066,7 +5090,7 @@ local.set $3 local.get $3 ) - (func $~lib/set/Set#find (; 69 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 68 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5117,7 +5141,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 70 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 69 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -5132,7 +5156,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 71 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 70 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5263,7 +5287,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 72 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 71 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -5362,11 +5386,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 72 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 74 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 73 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -5440,7 +5464,7 @@ end i32.const 1 ) - (func $std/set/test (; 75 ;) (type $FUNCSIG$v) + (func $std/set/test (; 74 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5723,7 +5747,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 76 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 75 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -5749,15 +5773,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 77 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 76 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.8 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 10 @@ -5788,7 +5816,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 78 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 77 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5839,7 +5867,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 79 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 78 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -5854,7 +5882,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 80 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 79 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5985,7 +6013,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 81 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 80 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6084,11 +6112,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 82 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 81 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 83 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 82 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6162,7 +6190,7 @@ end i32.const 1 ) - (func $std/set/test (; 84 ;) (type $FUNCSIG$v) + (func $std/set/test (; 83 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6445,7 +6473,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 85 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 84 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -6471,15 +6499,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 86 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 85 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.9 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 11 @@ -6510,7 +6542,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 87 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 86 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6561,7 +6593,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 88 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 87 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) local.get $0 local.get $1 @@ -6577,7 +6609,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 89 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 88 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6709,7 +6741,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 90 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#add (; 89 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -6809,11 +6841,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 91 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 90 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 92 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#delete (; 91 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -6888,7 +6920,7 @@ end i32.const 1 ) - (func $std/set/test (; 93 ;) (type $FUNCSIG$v) + (func $std/set/test (; 92 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -7171,7 +7203,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 94 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 93 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -7197,15 +7229,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 95 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.10 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 12 @@ -7236,7 +7272,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 96 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 95 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7287,7 +7323,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 97 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 96 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) local.get $0 local.get $1 @@ -7303,7 +7339,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 98 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 97 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7435,7 +7471,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 99 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#add (; 98 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 f64) (local $3 i32) (local $4 i32) @@ -7535,11 +7571,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 100 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 99 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 101 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#delete (; 100 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -7614,7 +7650,7 @@ end i32.const 1 ) - (func $std/set/test (; 102 ;) (type $FUNCSIG$v) + (func $std/set/test (; 101 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -7897,7 +7933,7 @@ unreachable end ) - (func $start:std/set (; 103 ;) (type $FUNCSIG$v) + (func $start:std/set (; 102 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -7919,9 +7955,9 @@ call $std/set/test call $std/set/test ) - (func $start (; 104 ;) (type $FUNCSIG$v) + (func $start (; 103 ;) (type $FUNCSIG$v) call $start:std/set ) - (func $null (; 105 ;) (type $FUNCSIG$v) + (func $null (; 104 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 85a9a4dce0..83797ee8c7 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -1834,7 +1834,7 @@ if i32.const 0 i32.const 280 - i32.const 100 + i32.const 107 i32.const 8 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index a13199bf15..3c99f9069a 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -1514,7 +1514,7 @@ if i32.const 0 i32.const 136 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -1528,7 +1528,7 @@ if i32.const 0 i32.const 136 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index 505a71eb49..9dc4016a1e 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -1926,7 +1926,7 @@ if i32.const 0 i32.const 136 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -1941,7 +1941,7 @@ if i32.const 0 i32.const 136 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 4e3860b901..0d53a666e3 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -283,7 +283,7 @@ if i32.const 0 i32.const 96 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -297,7 +297,7 @@ if i32.const 0 i32.const 96 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable @@ -3052,7 +3052,7 @@ if i32.const 0 i32.const 96 - i32.const 227 + i32.const 234 i32.const 57 call $~lib/env/abort unreachable @@ -3177,7 +3177,7 @@ if i32.const 0 i32.const 96 - i32.const 100 + i32.const 107 i32.const 8 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 828f2f2bd9..888a29ff53 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -353,7 +353,7 @@ if i32.const 0 i32.const 96 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -368,7 +368,7 @@ if i32.const 0 i32.const 96 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable @@ -3766,11 +3766,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/runtime/ALLOCATE (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/ArrayBufferView#constructor (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -3781,7 +3777,7 @@ if i32.const 0 i32.const 96 - i32.const 227 + i32.const 234 i32.const 57 call $~lib/env/abort unreachable @@ -3798,8 +3794,12 @@ i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.8 (result i32) + i32.const 12 + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + end local.set $4 local.get $4 i32.const 3 @@ -3828,14 +3828,18 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 16 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.9 (result i32) + i32.const 16 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 4 @@ -3853,12 +3857,12 @@ i32.store offset=12 local.get $0 ) - (func $~lib/memory/memory.free (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 local.set $1 ) - (func $~lib/runtime/doReallocate (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doReallocate (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3923,7 +3927,7 @@ if i32.const 0 i32.const 96 - i32.const 100 + i32.const 107 i32.const 8 call $~lib/env/abort unreachable @@ -3955,7 +3959,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4013,7 +4017,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -4039,7 +4043,7 @@ i32.store local.get $2 ) - (func $~lib/string/String#split (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4141,7 +4145,7 @@ i32.eqz br_if $break|0 block - block $~lib/runtime/ALLOCATE|inlined.8 (result i32) + block $~lib/runtime/ALLOCATE|inlined.10 (result i32) i32.const 2 local.set $8 local.get $8 @@ -4226,7 +4230,7 @@ i32.const 0 i32.gt_s if - block $~lib/runtime/ALLOCATE|inlined.9 (result i32) + block $~lib/runtime/ALLOCATE|inlined.11 (result i32) local.get $3 i32.const 1 i32.shl @@ -4302,7 +4306,7 @@ i32.const 0 i32.gt_s if - block $~lib/runtime/ALLOCATE|inlined.10 (result i32) + block $~lib/runtime/ALLOCATE|inlined.12 (result i32) local.get $14 i32.const 1 i32.shl @@ -4339,11 +4343,11 @@ end local.get $10 ) - (func $~lib/array/Array#get:length (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4366,7 +4370,7 @@ i32.add i32.load ) - (func $~lib/util/number/decimalCount32 (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -4435,7 +4439,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa32_lut (; 46 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4578,7 +4582,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4607,7 +4611,7 @@ local.get $1 i32.add local.set $2 - block $~lib/runtime/ALLOCATE|inlined.11 (result i32) + block $~lib/runtime/ALLOCATE|inlined.13 (result i32) local.get $2 i32.const 1 i32.shl @@ -4642,7 +4646,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/utoa32 (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4657,7 +4661,7 @@ local.get $0 call $~lib/util/number/decimalCount32 local.set $1 - block $~lib/runtime/ALLOCATE|inlined.12 (result i32) + block $~lib/runtime/ALLOCATE|inlined.14 (result i32) local.get $1 i32.const 1 i32.shl @@ -4686,7 +4690,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/decimalCount64 (; 49 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 48 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -4755,7 +4759,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 50 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 49 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -4883,7 +4887,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 51 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 50 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4908,7 +4912,7 @@ local.get $2 call $~lib/util/number/decimalCount32 local.set $3 - block $~lib/runtime/ALLOCATE|inlined.13 (result i32) + block $~lib/runtime/ALLOCATE|inlined.15 (result i32) local.get $3 i32.const 1 i32.shl @@ -4933,7 +4937,7 @@ local.get $0 call $~lib/util/number/decimalCount64 local.set $3 - block $~lib/runtime/ALLOCATE|inlined.14 (result i32) + block $~lib/runtime/ALLOCATE|inlined.16 (result i32) local.get $3 i32.const 1 i32.shl @@ -4963,7 +4967,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa64 (; 52 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 51 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5002,7 +5006,7 @@ local.get $1 i32.add local.set $4 - block $~lib/runtime/ALLOCATE|inlined.15 (result i32) + block $~lib/runtime/ALLOCATE|inlined.17 (result i32) local.get $4 i32.const 1 i32.shl @@ -5029,7 +5033,7 @@ local.get $1 i32.add local.set $4 - block $~lib/runtime/ALLOCATE|inlined.16 (result i32) + block $~lib/runtime/ALLOCATE|inlined.18 (result i32) local.get $4 i32.const 1 i32.shl @@ -5065,19 +5069,19 @@ call $~lib/runtime/doRegister end ) - (func $~lib/builtins/isFinite (; 53 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 52 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 54 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 53 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/util/number/genDigits (; 55 ;) (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 (; 54 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -5648,7 +5652,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5981,7 +5985,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 57 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 56 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -6427,7 +6431,7 @@ local.get $2 i32.add ) - (func $~lib/string/String#substring (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6532,7 +6536,7 @@ local.get $0 return end - block $~lib/runtime/ALLOCATE|inlined.18 (result i32) + block $~lib/runtime/ALLOCATE|inlined.20 (result i32) local.get $3 local.set $4 local.get $4 @@ -6553,7 +6557,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/runtime/doDiscard (; 59 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/doDiscard (; 58 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -6561,7 +6565,7 @@ i32.sub call $~lib/memory/memory.free ) - (func $~lib/util/number/dtoa (; 60 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 59 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6591,7 +6595,7 @@ select return end - block $~lib/runtime/ALLOCATE|inlined.17 (result i32) + block $~lib/runtime/ALLOCATE|inlined.19 (result i32) i32.const 28 i32.const 1 i32.shl @@ -6617,7 +6621,7 @@ end local.get $4 ) - (func $start:std/string (; 61 ;) (type $FUNCSIG$v) + (func $start:std/string (; 60 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10009,12 +10013,12 @@ unreachable end ) - (func $std/string/getString (; 62 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 61 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 63 ;) (type $FUNCSIG$v) + (func $start (; 62 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 64 ;) (type $FUNCSIG$v) + (func $null (; 63 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 759ef8a490..1c377a2613 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 72 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -157,7 +157,7 @@ if i32.const 0 i32.const 72 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 3dd3e95e0d..5bdcfb14f2 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -193,11 +193,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/ALLOCATE (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/assertUnregistered (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -205,7 +201,7 @@ if i32.const 0 i32.const 72 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -220,13 +216,13 @@ if i32.const 0 i32.const 72 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/doRegister (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -236,7 +232,7 @@ i32.store local.get $0 ) - (func $~lib/memory/memory.fill (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) @@ -492,7 +488,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -506,7 +502,7 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) local.get $1 local.set $2 local.get $2 @@ -525,7 +521,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/map/Map#clear (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -551,15 +547,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 2 @@ -590,7 +590,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#clear (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -616,15 +616,19 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - i32.const 24 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + i32.const 24 + local.set $1 + local.get $1 + call $~lib/runtime/doAllocate + end local.set $1 local.get $1 i32.const 4 @@ -655,7 +659,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/string/String#get:length (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -663,7 +667,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/hash/hashStr (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hashStr (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -710,7 +714,7 @@ end local.get $1 ) - (func $~lib/util/string/compareImpl (; 16 ;) (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 (; 15 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -763,7 +767,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -807,7 +811,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/map/Map#find (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -858,7 +862,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -873,7 +877,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -895,7 +899,7 @@ unreachable end ) - (func $~lib/map/Map#rehash (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1029,7 +1033,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1133,7 +1137,7 @@ i32.store end ) - (func $~lib/util/hash/hash32 (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -1175,7 +1179,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1226,7 +1230,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1360,7 +1364,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1464,7 +1468,7 @@ i32.store end ) - (func $~lib/symbol/_Symbol.for (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.for (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) global.get $~lib/symbol/stringToId @@ -1511,7 +1515,7 @@ call $~lib/map/Map#set local.get $2 ) - (func $~lib/map/Map#has (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1526,7 +1530,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -1548,7 +1552,7 @@ unreachable end ) - (func $~lib/symbol/_Symbol.keyFor (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.keyFor (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) global.get $~lib/symbol/idToString i32.const 0 @@ -1569,7 +1573,7 @@ i32.const 0 end ) - (func $~lib/util/memory/memcpy (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2770,7 +2774,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 32 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 @@ -2999,7 +3003,7 @@ end end ) - (func $~lib/string/String#concat (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3033,7 +3037,7 @@ i32.const 160 return end - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + block $~lib/runtime/ALLOCATE|inlined.3 (result i32) local.get $4 local.set $5 local.get $5 @@ -3058,7 +3062,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/string/String.__concat (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 512 local.get $0 @@ -3068,7 +3072,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/symbol/_Symbol#toString (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol#toString (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3254,7 +3258,7 @@ i32.const 528 call $~lib/string/String.__concat ) - (func $start:std/symbol (; 36 ;) (type $FUNCSIG$v) + (func $start:std/symbol (; 35 ;) (type $FUNCSIG$v) i32.const 16 call $~lib/symbol/Symbol global.set $std/symbol/sym1 @@ -3423,9 +3427,9 @@ global.get $~lib/symbol/_Symbol.isConcatSpreadable drop ) - (func $start (; 37 ;) (type $FUNCSIG$v) + (func $start (; 36 ;) (type $FUNCSIG$v) call $start:std/symbol ) - (func $null (; 38 ;) (type $FUNCSIG$v) + (func $null (; 37 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index d82c5665be..2248e8523b 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -403,7 +403,7 @@ if i32.const 0 i32.const 64 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -417,7 +417,7 @@ if i32.const 0 i32.const 64 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable @@ -465,7 +465,7 @@ if i32.const 0 i32.const 64 - i32.const 227 + i32.const 234 i32.const 57 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 18a8381d2c..5e62bd2a54 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -486,7 +486,7 @@ if i32.const 0 i32.const 64 - i32.const 192 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable @@ -501,7 +501,7 @@ if i32.const 0 i32.const 64 - i32.const 193 + i32.const 200 i32.const 2 call $~lib/env/abort unreachable @@ -550,11 +550,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/runtime/ALLOCATE (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/ArrayBufferView#constructor (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -565,7 +561,7 @@ if i32.const 0 i32.const 64 - i32.const 227 + i32.const 234 i32.const 57 call $~lib/env/abort unreachable @@ -582,8 +578,12 @@ i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + i32.const 12 + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + end local.set $4 local.get $4 i32.const 3 @@ -612,14 +612,18 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Int8Array#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + i32.const 12 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 4 @@ -631,29 +635,33 @@ local.set $0 local.get $0 ) - (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load i32.sub ) - (func $~lib/runtime/ArrayBufferView#get:byteLength (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#get:byteLength (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 ) - (func $~lib/typedarray/Int8Array#get:length (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#get:length (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Uint8Array#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.3 (result i32) + i32.const 12 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 5 @@ -665,18 +673,22 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint8Array#get:length (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#get:length (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Uint8ClampedArray#constructor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.4 (result i32) + i32.const 12 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 6 @@ -688,18 +700,22 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint8ClampedArray#get:length (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#get:length (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Int16Array#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.5 (result i32) + i32.const 12 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 7 @@ -711,20 +727,24 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int16Array#get:length (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#get:length (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 1 i32.shr_u ) - (func $~lib/typedarray/Uint16Array#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.6 (result i32) + i32.const 12 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 8 @@ -736,20 +756,24 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint16Array#get:length (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#get:length (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 1 i32.shr_u ) - (func $~lib/typedarray/Int32Array#constructor (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#constructor (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.7 (result i32) + i32.const 12 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 9 @@ -761,20 +785,24 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int32Array#get:length (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#get:length (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Uint32Array#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#constructor (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.8 (result i32) + i32.const 12 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 10 @@ -786,20 +814,24 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint32Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#get:length (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Int64Array#constructor (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#constructor (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.9 (result i32) + i32.const 12 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 11 @@ -811,20 +843,24 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int64Array#get:length (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#get:length (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $~lib/typedarray/Uint64Array#constructor (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#constructor (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.10 (result i32) + i32.const 12 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 12 @@ -836,20 +872,24 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint64Array#get:length (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#get:length (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $~lib/typedarray/Float32Array#constructor (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#constructor (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.11 (result i32) + i32.const 12 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 13 @@ -861,20 +901,24 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Float32Array#get:length (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#get:length (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Float64Array#constructor (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#constructor (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - i32.const 12 - call $~lib/runtime/ALLOCATE + block $~lib/runtime/ALLOCATE|inlined.12 (result i32) + i32.const 12 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $2 local.get $2 i32.const 14 @@ -886,13 +930,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Float64Array#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#get:length (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $std/typedarray/testInstantiate (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/typedarray/testInstantiate (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1400,7 +1444,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#__set (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#__set (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1424,7 +1468,7 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int32Array#__get (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#__get (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1447,7 +1491,7 @@ i32.add i32.load ) - (func $~lib/typedarray/Int32Array#subarray (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1524,7 +1568,7 @@ local.set $5 end block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + block $~lib/runtime/ALLOCATE|inlined.13 (result i32) i32.const 12 local.set $7 local.get $7 @@ -1561,7 +1605,7 @@ i32.store offset=8 local.get $7 ) - (func $~lib/typedarray/Float64Array#__set (; 38 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/typedarray/Float64Array#__set (; 37 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 local.get $0 i32.load offset=8 @@ -1585,7 +1629,7 @@ local.get $2 f64.store ) - (func $~lib/typedarray/Float64Array#subarray (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#subarray (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1662,7 +1706,7 @@ local.set $5 end block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + block $~lib/runtime/ALLOCATE|inlined.14 (result i32) i32.const 12 local.set $7 local.get $7 @@ -1699,7 +1743,7 @@ i32.store offset=8 local.get $7 ) - (func $~lib/util/sort/insertionSort (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) @@ -1795,12 +1839,12 @@ unreachable end ) - (func $~lib/memory/memory.free (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 local.set $1 ) - (func $~lib/util/sort/weakHeapSort (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2100,7 +2144,7 @@ local.get $10 f64.store ) - (func $~lib/typedarray/Float64Array#sort (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2184,7 +2228,7 @@ local.get $2 end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 44 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 43 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -2217,7 +2261,7 @@ i64.lt_s i32.sub ) - (func $~lib/typedarray/Float64Array#sort|trampoline (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort|trampoline (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2236,7 +2280,7 @@ local.get $1 call $~lib/typedarray/Float64Array#sort ) - (func $~lib/typedarray/Float64Array#__get (; 46 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/typedarray/Float64Array#__get (; 45 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -2259,7 +2303,7 @@ i32.add f64.load ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 47 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 46 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2291,7 +2335,7 @@ i32.and i32.store8 ) - (func $~lib/typedarray/Uint8ClampedArray#__get (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#__get (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2310,7 +2354,7 @@ i32.add i32.load8_u ) - (func $~lib/typedarray/Int8Array#__set (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int8Array#__set (; 48 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2330,7 +2374,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Int8Array#fill (; 50 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int8Array#fill (; 49 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2418,13 +2462,13 @@ end local.get $4 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $~lib/util/memory/memcpy (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3625,7 +3669,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 @@ -3854,7 +3898,7 @@ end end ) - (func $~lib/runtime/doWrapArray (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/doWrapArray (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3891,11 +3935,11 @@ call $~lib/memory/memory.copy local.get $3 ) - (func $~lib/array/Array#get:length (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/typedarray/Int8Array#__get (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3914,7 +3958,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__get (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3937,7 +3981,7 @@ i32.add i32.load8_s ) - (func $std/typedarray/isInt8ArrayEqual (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3985,7 +4029,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4062,7 +4106,7 @@ local.set $5 end block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.3 (result i32) + block $~lib/runtime/ALLOCATE|inlined.15 (result i32) i32.const 12 local.set $7 local.get $7 @@ -4099,7 +4143,7 @@ i32.store offset=8 local.get $7 ) - (func $~lib/typedarray/Int32Array#fill (; 60 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#fill (; 59 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -4197,11 +4241,11 @@ end local.get $4 ) - (func $~lib/array/Array#get:length (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 62 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4224,7 +4268,7 @@ i32.add i32.load ) - (func $std/typedarray/isInt32ArrayEqual (; 63 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 62 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4272,12 +4316,12 @@ end i32.const 1 ) - (func $std/typedarray/testReduce~anonymous|0 (; 64 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 63 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduce (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4334,7 +4378,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 66 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 65 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4375,7 +4419,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#__set (; 67 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 66 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4395,12 +4439,12 @@ local.get $2 i32.store8 ) - (func $std/typedarray/testReduce~anonymous|0 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 67 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduce (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4457,7 +4501,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 70 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 69 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4496,12 +4540,12 @@ unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 70 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduce (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduce (; 71 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4558,7 +4602,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 73 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 72 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4597,7 +4641,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#__set (; 74 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 73 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4621,12 +4665,12 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce~anonymous|0 (; 75 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 74 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduce (; 76 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduce (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4683,7 +4727,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 77 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 76 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4724,7 +4768,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#__set (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4748,12 +4792,12 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce~anonymous|0 (; 79 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 78 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduce (; 80 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduce (; 79 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4810,7 +4854,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 81 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 80 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4849,12 +4893,12 @@ unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 82 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 81 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduce (; 83 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4911,7 +4955,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 84 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 83 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4948,7 +4992,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#__set (; 85 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint32Array#__set (; 84 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4972,12 +5016,12 @@ local.get $2 i32.store ) - (func $std/typedarray/testReduce~anonymous|0 (; 86 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 85 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduce (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduce (; 86 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5034,7 +5078,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 88 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 87 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5071,7 +5115,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#__set (; 89 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 88 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -5095,12 +5139,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce~anonymous|0 (; 90 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce~anonymous|0 (; 89 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 91 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 90 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -5157,7 +5201,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 92 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 91 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5194,7 +5238,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#__set (; 93 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Uint64Array#__set (; 92 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -5218,12 +5262,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce~anonymous|0 (; 94 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce~anonymous|0 (; 93 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduce (; 95 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduce (; 94 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -5280,7 +5324,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 96 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 95 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5317,7 +5361,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#__set (; 97 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 96 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -5341,12 +5385,12 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce~anonymous|0 (; 98 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce~anonymous|0 (; 97 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 99 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduce (; 98 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -5403,7 +5447,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 100 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 99 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -5440,12 +5484,12 @@ unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 101 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce~anonymous|0 (; 100 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 102 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduce (; 101 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) @@ -5502,7 +5546,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 103 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 102 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -5539,12 +5583,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 104 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduceRight (; 105 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduceRight (; 104 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5598,7 +5642,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 106 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 105 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5639,12 +5683,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 108 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 107 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5698,7 +5742,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 109 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 108 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5737,12 +5781,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 110 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 109 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 111 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 110 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5796,7 +5840,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 112 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 111 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5835,12 +5879,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 113 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 112 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduceRight (; 114 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduceRight (; 113 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5894,7 +5938,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 115 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 114 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5935,12 +5979,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 116 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 115 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 117 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 116 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5994,7 +6038,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 118 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 117 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6033,12 +6077,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 119 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 118 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduceRight (; 120 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 119 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6092,7 +6136,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 121 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 120 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6129,12 +6173,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 122 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 121 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduceRight (; 123 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduceRight (; 122 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6188,7 +6232,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 124 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 123 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6225,12 +6269,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 125 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight~anonymous|0 (; 124 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduceRight (; 126 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 125 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -6284,7 +6328,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 127 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 126 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6321,12 +6365,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 128 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight~anonymous|0 (; 127 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduceRight (; 129 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduceRight (; 128 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -6380,7 +6424,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 130 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 129 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6417,12 +6461,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 131 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 130 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduceRight (; 132 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduceRight (; 131 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -6476,7 +6520,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 133 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 132 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -6513,12 +6557,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 134 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduceRight~anonymous|0 (; 133 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduceRight (; 135 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduceRight (; 134 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) @@ -6572,7 +6616,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 136 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 135 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -6609,12 +6653,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 136 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6679,7 +6723,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 139 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 138 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6745,12 +6789,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 140 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 139 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8Array#map (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6815,7 +6859,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint8Array#__get (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__get (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -6834,7 +6878,7 @@ i32.add i32.load8_u ) - (func $std/typedarray/testArrayMap (; 143 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 142 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6900,12 +6944,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 144 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 143 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 145 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6970,7 +7014,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 146 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 145 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7036,12 +7080,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 147 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 146 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int16Array#map (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7106,7 +7150,7 @@ end local.get $6 ) - (func $~lib/typedarray/Int16Array#__get (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7129,7 +7173,7 @@ i32.add i32.load16_s ) - (func $std/typedarray/testArrayMap (; 150 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 149 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7195,12 +7239,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 151 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 150 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint16Array#map (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7265,7 +7309,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint16Array#__get (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7288,7 +7332,7 @@ i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap (; 154 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 153 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7354,12 +7398,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 155 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 154 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int32Array#map (; 156 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7424,7 +7468,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 157 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 156 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7490,12 +7534,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 158 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 157 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint32Array#map (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7560,7 +7604,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint32Array#__get (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7583,7 +7627,7 @@ i32.add i32.load ) - (func $std/typedarray/testArrayMap (; 161 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 160 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7649,12 +7693,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 162 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 161 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7719,7 +7763,7 @@ end local.get $6 ) - (func $~lib/typedarray/Int64Array#__get (; 164 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 163 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -7742,7 +7786,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap (; 165 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 164 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7808,12 +7852,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 166 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 165 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Uint64Array#map (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7878,7 +7922,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint64Array#__get (; 168 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__get (; 167 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -7901,7 +7945,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap (; 169 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 168 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7967,12 +8011,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 170 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 169 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8037,7 +8081,7 @@ end local.get $6 ) - (func $~lib/typedarray/Float32Array#__get (; 172 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 171 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -8060,7 +8104,7 @@ i32.add f32.load ) - (func $std/typedarray/testArrayMap (; 173 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 172 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8126,12 +8170,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 174 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 173 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8196,7 +8240,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 176 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 175 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8262,7 +8306,7 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 177 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 176 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -8271,7 +8315,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8331,7 +8375,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 179 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 178 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -8340,7 +8384,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 180 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 179 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8394,14 +8438,14 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 181 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 180 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#some (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8461,14 +8505,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 183 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 182 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 184 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 183 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8522,14 +8566,14 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 185 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 184 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#some (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#some (; 185 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8589,14 +8633,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 187 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 186 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 188 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 187 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8650,7 +8694,7 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 189 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 188 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8659,7 +8703,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 189 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8719,7 +8763,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 191 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 190 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8728,7 +8772,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 192 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 191 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8782,14 +8826,14 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 192 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#some (; 194 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 193 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8849,14 +8893,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 195 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 194 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 196 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 195 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8910,12 +8954,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 197 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 196 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8975,12 +9019,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 199 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 198 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 200 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 199 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9034,12 +9078,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 201 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 200 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#some (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#some (; 201 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9099,12 +9143,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 203 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 202 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 204 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 203 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9158,12 +9202,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 205 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 204 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 205 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9223,12 +9267,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 207 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 206 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome (; 208 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 207 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9282,12 +9326,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 209 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 208 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#some (; 210 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#some (; 209 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9347,12 +9391,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 211 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 210 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome (; 212 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 211 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9406,12 +9450,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 213 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 212 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 213 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9471,12 +9515,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 215 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 214 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome (; 216 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 215 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9530,12 +9574,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 217 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 216 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 218 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 217 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9595,12 +9639,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 219 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 218 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome (; 220 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 219 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9654,7 +9698,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 221 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 220 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9663,7 +9707,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#findIndex (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9723,7 +9767,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 223 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 222 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9732,7 +9776,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 224 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 223 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9785,14 +9829,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 224 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#findIndex (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9852,14 +9896,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 227 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 226 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 228 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 227 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9912,14 +9956,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 229 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 228 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 230 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 229 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9979,14 +10023,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 231 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 230 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 232 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 231 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10039,7 +10083,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 233 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 232 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10048,7 +10092,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#findIndex (; 234 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 233 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10108,7 +10152,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 235 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 234 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10117,7 +10161,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 236 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 235 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10170,14 +10214,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 237 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 236 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#findIndex (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 237 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10237,14 +10281,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 239 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 238 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 240 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 239 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10297,12 +10341,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 241 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 240 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#findIndex (; 242 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 241 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10362,12 +10406,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 243 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 242 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 244 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 243 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10420,12 +10464,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 245 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 244 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#findIndex (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#findIndex (; 245 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10485,12 +10529,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 247 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 246 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 248 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 247 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10543,12 +10587,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 249 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 248 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#findIndex (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 249 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10608,12 +10652,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 251 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 250 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex (; 252 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 251 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10666,12 +10710,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 253 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 252 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#findIndex (; 254 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#findIndex (; 253 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10731,12 +10775,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 255 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 254 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex (; 256 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 255 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10789,12 +10833,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 257 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 256 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#findIndex (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10854,12 +10898,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 259 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 258 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex (; 260 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 259 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10912,12 +10956,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 261 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 260 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#findIndex (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 261 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10977,12 +11021,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 263 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 262 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex (; 264 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 263 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11035,7 +11079,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 265 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 264 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11046,7 +11090,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int8Array#every (; 266 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 265 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11113,7 +11157,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 267 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 266 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11122,7 +11166,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 268 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 267 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11176,7 +11220,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 269 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 268 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -11185,7 +11229,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8Array#every (; 270 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 269 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11252,14 +11296,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 271 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 270 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 272 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 271 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11313,7 +11357,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 273 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 272 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -11322,7 +11366,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#every (; 274 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#every (; 273 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11389,14 +11433,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 275 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 274 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 276 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 275 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11450,7 +11494,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 277 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 276 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11461,7 +11505,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int16Array#every (; 278 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 277 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11528,7 +11572,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 279 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 278 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11537,7 +11581,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 280 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 279 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11591,7 +11635,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 281 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 280 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and @@ -11600,7 +11644,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint16Array#every (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 281 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11667,14 +11711,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 283 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 282 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 284 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 283 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11728,14 +11772,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 285 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 284 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.const 0 i32.eq ) - (func $~lib/typedarray/Int32Array#every (; 286 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 285 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11802,12 +11846,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 287 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 286 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 288 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 287 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11861,14 +11905,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 289 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 288 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_u i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint32Array#every (; 290 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#every (; 289 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11935,12 +11979,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 291 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 290 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 292 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 291 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11994,14 +12038,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 293 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 292 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (; 294 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 293 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12068,12 +12112,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 295 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 294 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery (; 296 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 295 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12127,14 +12171,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 297 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 296 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $~lib/typedarray/Uint64Array#every (; 298 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#every (; 297 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12201,12 +12245,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 299 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 298 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery (; 300 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 299 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12260,12 +12304,12 @@ unreachable end ) - (func $~lib/builtins/isNaN (; 301 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 300 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $~lib/math/NativeMathf.mod (; 302 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 301 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12516,14 +12560,14 @@ local.get $2 f32.reinterpret_i32 ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 303 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 302 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 304 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 303 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12590,12 +12634,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 305 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 304 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $std/typedarray/testArrayEvery (; 306 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 305 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12649,12 +12693,12 @@ unreachable end ) - (func $~lib/builtins/isNaN (; 307 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 306 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/math/NativeMath.mod (; 308 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 307 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -12907,14 +12951,14 @@ local.get $2 f64.reinterpret_i64 ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 309 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 308 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 310 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 309 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12981,12 +13025,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 311 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 310 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $std/typedarray/testArrayEvery (; 312 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 311 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13040,7 +13084,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 313 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 312 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13095,7 +13139,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 314 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#forEach (; 313 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13140,7 +13184,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 315 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 314 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13196,7 +13240,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 316 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 315 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13247,7 +13291,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8Array#forEach (; 317 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 316 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13292,7 +13336,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 318 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 317 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13342,7 +13386,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 319 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 318 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13393,7 +13437,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8ClampedArray#forEach (; 320 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#forEach (; 319 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13438,7 +13482,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 321 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 320 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13488,7 +13532,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 322 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 321 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13543,7 +13587,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 323 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#forEach (; 322 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13588,7 +13632,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 324 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 323 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13644,7 +13688,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 325 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 324 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13695,7 +13739,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint16Array#forEach (; 326 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 325 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13740,7 +13784,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 327 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 326 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13790,7 +13834,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 328 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 327 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13837,7 +13881,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 329 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 328 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13882,7 +13926,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 330 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 329 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13926,7 +13970,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 331 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 330 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13973,7 +14017,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint32Array#forEach (; 332 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint32Array#forEach (; 331 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14018,7 +14062,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 333 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 332 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14062,7 +14106,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 334 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 333 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14110,7 +14154,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 335 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 334 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14155,7 +14199,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 336 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 335 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14202,7 +14246,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 337 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 336 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14250,7 +14294,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint64Array#forEach (; 338 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint64Array#forEach (; 337 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14295,7 +14339,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 339 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 338 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14342,7 +14386,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 340 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 339 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14390,7 +14434,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 341 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#forEach (; 340 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14435,7 +14479,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 342 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 341 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14482,7 +14526,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 343 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 342 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14530,7 +14574,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 344 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#forEach (; 343 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14575,7 +14619,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 345 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 344 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14622,7 +14666,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#reverse (; 346 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 345 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14692,7 +14736,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse (; 347 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 346 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14856,7 +14900,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 348 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 347 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14926,7 +14970,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8Array#subarray (; 349 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 348 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15003,7 +15047,7 @@ local.set $5 end block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.4 (result i32) + block $~lib/runtime/ALLOCATE|inlined.16 (result i32) i32.const 12 local.set $7 local.get $7 @@ -15040,7 +15084,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 350 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 349 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15198,7 +15242,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#reverse (; 351 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reverse (; 350 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15268,7 +15312,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 352 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 351 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15345,7 +15389,7 @@ local.set $5 end block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.5 (result i32) + block $~lib/runtime/ALLOCATE|inlined.17 (result i32) i32.const 12 local.set $7 local.get $7 @@ -15382,7 +15426,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 353 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 352 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15540,7 +15584,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 354 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 353 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15610,7 +15654,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int16Array#subarray (; 355 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 354 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15687,7 +15731,7 @@ local.set $5 end block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.6 (result i32) + block $~lib/runtime/ALLOCATE|inlined.18 (result i32) i32.const 12 local.set $7 local.get $7 @@ -15724,7 +15768,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 356 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 355 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15888,7 +15932,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 357 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 356 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15958,7 +16002,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint16Array#subarray (; 358 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 357 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16035,7 +16079,7 @@ local.set $5 end block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.7 (result i32) + block $~lib/runtime/ALLOCATE|inlined.19 (result i32) i32.const 12 local.set $7 local.get $7 @@ -16072,7 +16116,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 359 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 358 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16230,7 +16274,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 360 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 359 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16300,7 +16344,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse (; 361 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 360 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16452,7 +16496,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#reverse (; 362 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reverse (; 361 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16522,7 +16566,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint32Array#subarray (; 363 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 362 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16599,7 +16643,7 @@ local.set $5 end block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.8 (result i32) + block $~lib/runtime/ALLOCATE|inlined.20 (result i32) i32.const 12 local.set $7 local.get $7 @@ -16636,7 +16680,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 364 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 363 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16788,7 +16832,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#reverse (; 365 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 364 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16858,7 +16902,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int64Array#subarray (; 366 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 365 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16935,7 +16979,7 @@ local.set $5 end block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.9 (result i32) + block $~lib/runtime/ALLOCATE|inlined.21 (result i32) i32.const 12 local.set $7 local.get $7 @@ -16972,7 +17016,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 367 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 366 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17127,7 +17171,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#reverse (; 368 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#reverse (; 367 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17197,7 +17241,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint64Array#subarray (; 369 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 368 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17274,7 +17318,7 @@ local.set $5 end block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.10 (result i32) + block $~lib/runtime/ALLOCATE|inlined.22 (result i32) i32.const 12 local.set $7 local.get $7 @@ -17311,7 +17355,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 370 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 369 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17466,7 +17510,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 371 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 370 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17536,7 +17580,7 @@ end local.get $1 ) - (func $~lib/typedarray/Float32Array#subarray (; 372 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 371 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17613,7 +17657,7 @@ local.set $5 end block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.11 (result i32) + block $~lib/runtime/ALLOCATE|inlined.23 (result i32) i32.const 12 local.set $7 local.get $7 @@ -17650,7 +17694,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 373 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 372 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17805,7 +17849,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 374 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 373 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17875,7 +17919,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse (; 375 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 374 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18030,7 +18074,7 @@ unreachable end ) - (func $start:std/typedarray (; 376 ;) (type $FUNCSIG$v) + (func $start:std/typedarray (; 375 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32.const 1 @@ -19306,9 +19350,9 @@ call $std/typedarray/testArrayReverse call $std/typedarray/testArrayReverse ) - (func $start (; 377 ;) (type $FUNCSIG$v) + (func $start (; 376 ;) (type $FUNCSIG$v) call $start:std/typedarray ) - (func $null (; 378 ;) (type $FUNCSIG$v) + (func $null (; 377 ;) (type $FUNCSIG$v) ) ) From 81039c416782a71c68e82e269e68910652a2b416 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 19 Mar 2019 15:43:05 +0100 Subject: [PATCH 052/119] FixedArray experimentation --- examples/n-body/assembly/index.ts | 18 +- examples/n-body/build/index.asm.js | 239 +++---- examples/n-body/build/optimized.wasm | Bin 2241 -> 2090 bytes examples/n-body/build/optimized.wat | 355 +++++----- examples/n-body/build/untouched.wat | 659 ++++++++---------- src/common.ts | 1 + src/compiler.ts | 21 +- src/program.ts | 6 + std/assembly/array.ts | 3 +- std/assembly/fixedarray.ts | 48 ++ std/assembly/index.d.ts | 7 + std/assembly/runtime.ts | 1 - std/assembly/typedarray.ts | 11 + tests/compiler/nonNullAssertion.optimized.wat | 2 +- tests/compiler/nonNullAssertion.untouched.wat | 4 +- tests/compiler/std/array-access.optimized.wat | 2 +- tests/compiler/std/array-access.untouched.wat | 8 +- .../compiler/std/array-literal.optimized.wat | 6 +- .../compiler/std/array-literal.untouched.wat | 6 +- tests/compiler/std/array.optimized.wat | 22 +- tests/compiler/std/array.untouched.wat | 36 +- tests/compiler/std/arraybuffer.optimized.wat | 2 +- tests/compiler/std/arraybuffer.untouched.wat | 2 +- tests/compiler/std/dataview.optimized.wat | 2 +- tests/compiler/std/dataview.untouched.wat | 4 +- tests/compiler/std/static-array.optimized.wat | 8 +- tests/compiler/std/static-array.untouched.wat | 8 +- tests/compiler/std/string.optimized.wat | 4 +- tests/compiler/std/string.untouched.wat | 4 +- tests/compiler/std/typedarray.optimized.wat | 50 +- tests/compiler/std/typedarray.untouched.wat | 50 +- 31 files changed, 748 insertions(+), 841 deletions(-) create mode 100644 std/assembly/fixedarray.ts diff --git a/examples/n-body/assembly/index.ts b/examples/n-body/assembly/index.ts index 9a37c2d6ae..8741406e7e 100644 --- a/examples/n-body/assembly/index.ts +++ b/examples/n-body/assembly/index.ts @@ -84,7 +84,7 @@ function Neptune(): Body { class NBodySystem { - constructor(public bodies: Body[]) { + constructor(public bodies: FixedArray) { var px: float = 0.0; var py: float = 0.0; var pz: float = 0.0; @@ -186,13 +186,15 @@ class NBodySystem { var system: NBodySystem; export function init(): void { - system = new NBodySystem([ - Sun(), - Jupiter(), - Saturn(), - Uranus(), - Neptune() - ]); + var bodies = new FixedArray(5); + unchecked(( + bodies[0] = Sun(), + bodies[1] = Jupiter(), + bodies[2] = Saturn(), + bodies[3] = Uranus(), + bodies[4] = Neptune() + )); + system = new NBodySystem(bodies); } export function step(): float { diff --git a/examples/n-body/build/index.asm.js b/examples/n-body/build/index.asm.js index f9dbb20de6..a06bcd502d 100644 --- a/examples/n-body/build/index.asm.js +++ b/examples/n-body/build/index.asm.js @@ -52,79 +52,6 @@ function asmFunc(global, env, buffer) { return $1 + 8 | 0 | 0; } - function assembly_index_NBodySystem_constructor($0) { - $0 = $0 | 0; - var $1 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0; - $7 = HEAP32[($0 + 12 | 0) >> 2] | 0; - repeat_0 : do { - if (($1 | 0) < ($7 | 0)) { - $2 = HEAPU32[((HEAP32[($0 + 4 | 0) >> 2] | 0) + ($1 << 2 | 0) | 0) >> 2] | 0; - $3 = +HEAPF64[($2 + 48 | 0) >> 3]; - $4 = $4 + +HEAPF64[($2 + 24 | 0) >> 3] * $3; - $5 = $5 + +HEAPF64[($2 + 32 | 0) >> 3] * $3; - $6 = $6 + +HEAPF64[($2 + 40 | 0) >> 3] * $3; - $1 = $1 + 1 | 0; - continue repeat_0; - } - break repeat_0; - } while (1); - $1 = HEAPU32[(HEAP32[($0 + 4 | 0) >> 2] | 0) >> 2] | 0; - wasm2js_i32$0 = $1; - wasm2js_f64$0 = -$4 / 39.47841760435743; - HEAPF64[(wasm2js_i32$0 + 24 | 0) >> 3] = wasm2js_f64$0; - wasm2js_i32$0 = $1; - wasm2js_f64$0 = -$5 / 39.47841760435743; - HEAPF64[(wasm2js_i32$0 + 32 | 0) >> 3] = wasm2js_f64$0; - wasm2js_i32$0 = $1; - wasm2js_f64$0 = -$6 / 39.47841760435743; - HEAPF64[(wasm2js_i32$0 + 40 | 0) >> 3] = wasm2js_f64$0; - $1 = $lib_runtime_doAllocate(4 | 0) | 0; - wasm2js_i32$0 = $1 - 8 | 0; - wasm2js_i32$1 = 1; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $1; - wasm2js_i32$1 = $0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - return $1 | 0; - } - - function assembly_index_Body_constructor($0, $1, $2, $3, $4, $5, $6) { - $0 = +$0; - $1 = +$1; - $2 = +$2; - $3 = +$3; - $4 = +$4; - $5 = +$5; - $6 = +$6; - var $7 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_f64$0 = 0.0; - $7 = $lib_runtime_doAllocate(56 | 0) | 0; - wasm2js_i32$0 = $7 - 8 | 0; - wasm2js_i32$1 = 2; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $7; - wasm2js_f64$0 = $0; - HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; - wasm2js_i32$0 = $7; - wasm2js_f64$0 = $1; - HEAPF64[(wasm2js_i32$0 + 8 | 0) >> 3] = wasm2js_f64$0; - wasm2js_i32$0 = $7; - wasm2js_f64$0 = $2; - HEAPF64[(wasm2js_i32$0 + 16 | 0) >> 3] = wasm2js_f64$0; - wasm2js_i32$0 = $7; - wasm2js_f64$0 = $3; - HEAPF64[(wasm2js_i32$0 + 24 | 0) >> 3] = wasm2js_f64$0; - wasm2js_i32$0 = $7; - wasm2js_f64$0 = $4; - HEAPF64[(wasm2js_i32$0 + 32 | 0) >> 3] = wasm2js_f64$0; - wasm2js_i32$0 = $7; - wasm2js_f64$0 = $5; - HEAPF64[(wasm2js_i32$0 + 40 | 0) >> 3] = wasm2js_f64$0; - wasm2js_i32$0 = $7; - wasm2js_f64$0 = $6; - HEAPF64[(wasm2js_i32$0 + 48 | 0) >> 3] = wasm2js_f64$0; - return $7 | 0; - } - function $lib_memory_memory_fill($0) { $0 = $0 | 0; var $1 = 0, $2 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0, wasm2js_i32$3 = 0; @@ -250,87 +177,112 @@ function asmFunc(global, env, buffer) { }; } - function $lib_runtime_ArrayBufferView_constructor($0) { + function assembly_index_Body_constructor($0, $1, $2, $3, $4, $5, $6) { + $0 = +$0; + $1 = +$1; + $2 = +$2; + $3 = +$3; + $4 = +$4; + $5 = +$5; + $6 = +$6; + var $7 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_f64$0 = 0.0; + $7 = $lib_runtime_doAllocate(56 | 0) | 0; + wasm2js_i32$0 = $7 - 8 | 0; + wasm2js_i32$1 = 3; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $7; + wasm2js_f64$0 = $0; + HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $7; + wasm2js_f64$0 = $1; + HEAPF64[(wasm2js_i32$0 + 8 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $7; + wasm2js_f64$0 = $2; + HEAPF64[(wasm2js_i32$0 + 16 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $7; + wasm2js_f64$0 = $3; + HEAPF64[(wasm2js_i32$0 + 24 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $7; + wasm2js_f64$0 = $4; + HEAPF64[(wasm2js_i32$0 + 32 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $7; + wasm2js_f64$0 = $5; + HEAPF64[(wasm2js_i32$0 + 40 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $7; + wasm2js_f64$0 = $6; + HEAPF64[(wasm2js_i32$0 + 48 | 0) >> 3] = wasm2js_f64$0; + return $7 | 0; + } + + function assembly_index_NBodySystem_constructor($0) { $0 = $0 | 0; - var $1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; - $1 = $lib_runtime_doAllocate(20 | 0) | 0; - $lib_memory_memory_fill($1 | 0); + var $1 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0; + $7 = (HEAPU32[(($0 - 8 | 0) + 4 | 0) >> 2] | 0) >>> 2 | 0; + repeat_0 : do { + if (($1 | 0) < ($7 | 0)) { + $2 = HEAPU32[(($1 << 2 | 0) + $0 | 0) >> 2] | 0; + $3 = +HEAPF64[($2 + 48 | 0) >> 3]; + $4 = $4 + +HEAPF64[($2 + 24 | 0) >> 3] * $3; + $5 = $5 + +HEAPF64[($2 + 32 | 0) >> 3] * $3; + $6 = $6 + +HEAPF64[($2 + 40 | 0) >> 3] * $3; + $1 = $1 + 1 | 0; + continue repeat_0; + } + break repeat_0; + } while (1); + $1 = HEAPU32[$0 >> 2] | 0; + wasm2js_i32$0 = $1; + wasm2js_f64$0 = -$4 / 39.47841760435743; + HEAPF64[(wasm2js_i32$0 + 24 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $1; + wasm2js_f64$0 = -$5 / 39.47841760435743; + HEAPF64[(wasm2js_i32$0 + 32 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $1; + wasm2js_f64$0 = -$6 / 39.47841760435743; + HEAPF64[(wasm2js_i32$0 + 40 | 0) >> 3] = wasm2js_f64$0; + $1 = $lib_runtime_doAllocate(4 | 0) | 0; wasm2js_i32$0 = $1 - 8 | 0; wasm2js_i32$1 = 4; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - if (($0 | 0) == (0 | 0)) { - $0 = $lib_runtime_doAllocate(12 | 0) | 0; - wasm2js_i32$0 = $0 - 8 | 0; - wasm2js_i32$1 = 5; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - } - wasm2js_i32$0 = $0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = 0; - HEAP32[(wasm2js_i32$0 + 4 | 0) >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = 0; - HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = $1; + wasm2js_i32$0 = $1; + wasm2js_i32$1 = $0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = $1; - HEAP32[(wasm2js_i32$0 + 4 | 0) >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = 20; - HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; - return $0 | 0; + return $1 | 0; } - function $lib_array_Array_Body__constructor() { + function assembly_index_init() { var $0 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; - $0 = $lib_runtime_doAllocate(16 | 0) | 0; + $0 = $lib_runtime_doAllocate(20 | 0) | 0; + $lib_memory_memory_fill($0 | 0); wasm2js_i32$0 = $0 - 8 | 0; - wasm2js_i32$1 = 6; + wasm2js_i32$1 = 2; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - $0 = $lib_runtime_ArrayBufferView_constructor($0 | 0) | 0; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = 0; - HEAP32[(wasm2js_i32$0 + 12 | 0) >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = 5; - HEAP32[(wasm2js_i32$0 + 12 | 0) >> 2] = wasm2js_i32$1; - return $0 | 0; - } - - function assembly_index_init() { - var $0 = 0, $1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; - $1 = $lib_array_Array_Body__constructor() | 0; - $0 = HEAPU32[($1 + 4 | 0) >> 2] | 0; wasm2js_i32$0 = $0; wasm2js_i32$1 = assembly_index_Body_constructor(+(0.0), +(0.0), +(0.0), +(0.0), +(0.0), +(0.0), +(39.47841760435743)) | 0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0; + wasm2js_i32$0 = $0 + 4 | 0; wasm2js_i32$1 = assembly_index_Body_constructor(+(4.841431442464721), +(-1.1603200440274284), +(-.10362204447112311), +(.606326392995832), +(2.81198684491626), +(-.02521836165988763), +(.03769367487038949)) | 0; - HEAP32[(wasm2js_i32$0 + 4 | 0) >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0 + 8 | 0; wasm2js_i32$1 = assembly_index_Body_constructor(+(8.34336671824458), +(4.124798564124305), +(-.4035234171143214), +(-1.0107743461787924), +(1.8256623712304119), +(.008415761376584154), +(.011286326131968767)) | 0; - HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0 + 12 | 0; wasm2js_i32$1 = assembly_index_Body_constructor(+(12.894369562139131), +(-15.111151401698631), +(-.22330757889265573), +(1.0827910064415354), +(.8687130181696082), +(-.010832637401363636), +(1.7237240570597112e-03)) | 0; - HEAP32[(wasm2js_i32$0 + 12 | 0) >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0 + 16 | 0; wasm2js_i32$1 = assembly_index_Body_constructor(+(15.379697114850917), +(-25.919314609987964), +(.17925877295037118), +(.979090732243898), +(.5946989986476762), +(-.034755955504078104), +(2.0336868699246304e-03)) | 0; - HEAP32[(wasm2js_i32$0 + 16 | 0) >> 2] = wasm2js_i32$1; - assembly_index_system = assembly_index_NBodySystem_constructor($1 | 0) | 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + assembly_index_system = assembly_index_NBodySystem_constructor($0 | 0) | 0; } function assembly_index_NBodySystem_advance($0) { $0 = $0 | 0; var $1 = 0, $2 = 0.0, $8 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $9 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $18 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0; $12 = HEAPU32[$0 >> 2] | 0; - $13 = HEAP32[($12 + 12 | 0) >> 2] | 0; + $13 = (HEAPU32[(($12 - 8 | 0) + 4 | 0) >> 2] | 0) >>> 2 | 0; repeat_0 : do { if ($3 >>> 0 < $13 >>> 0) { - $0 = HEAPU32[((HEAP32[($12 + 4 | 0) >> 2] | 0) + ($3 << 2 | 0) | 0) >> 2] | 0; + $0 = HEAPU32[(($3 << 2 | 0) + $12 | 0) >> 2] | 0; $14 = +HEAPF64[$0 >> 3]; $15 = +HEAPF64[($0 + 8 | 0) >> 3]; $16 = +HEAPF64[($0 + 16 | 0) >> 3]; @@ -341,7 +293,7 @@ function asmFunc(global, env, buffer) { $7 = $3 + 1 | 0; repeat_1 : do { if ($7 >>> 0 < $13 >>> 0) { - $1 = HEAPU32[((HEAP32[($12 + 4 | 0) >> 2] | 0) + ($7 << 2 | 0) | 0) >> 2] | 0; + $1 = HEAPU32[(($7 << 2 | 0) + $12 | 0) >> 2] | 0; $18 = $14 - +HEAPF64[$1 >> 3]; $2 = $18; $9 = $15 - +HEAPF64[($1 + 8 | 0) >> 3]; @@ -395,28 +347,28 @@ function asmFunc(global, env, buffer) { function assembly_index_NBodySystem_energy($0) { $0 = $0 | 0; - var $1 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $9 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $30 = 0.0, $39 = 0.0, $45 = 0.0, $10 = 0.0, $72 = 0.0, $86 = 0.0; + var $1 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $9 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $31 = 0.0, $40 = 0.0, $46 = 0.0, $10 = 0.0, $72 = 0.0, $86 = 0.0; $4 = HEAPU32[$0 >> 2] | 0; - $5 = HEAP32[($4 + 12 | 0) >> 2] | 0; + $5 = (HEAPU32[(($4 - 8 | 0) + 4 | 0) >> 2] | 0) >>> 2 | 0; repeat_0 : do { if ($2 >>> 0 < $5 >>> 0) { - $0 = HEAPU32[((HEAP32[($4 + 4 | 0) >> 2] | 0) + ($2 << 2 | 0) | 0) >> 2] | 0; + $0 = HEAPU32[(($2 << 2 | 0) + $4 | 0) >> 2] | 0; $6 = +HEAPF64[$0 >> 3]; $7 = +HEAPF64[($0 + 8 | 0) >> 3]; $8 = +HEAPF64[($0 + 16 | 0) >> 3]; - $30 = $1; + $31 = $1; $9 = +HEAPF64[($0 + 48 | 0) >> 3]; $1 = +HEAPF64[($0 + 24 | 0) >> 3]; - $39 = $1 * $1; + $40 = $1 * $1; $1 = +HEAPF64[($0 + 32 | 0) >> 3]; - $45 = $39 + $1 * $1; + $46 = $40 + $1 * $1; $1 = +HEAPF64[($0 + 40 | 0) >> 3]; - $1 = $30 + .5 * $9 * ($45 + $1 * $1); + $1 = $31 + .5 * $9 * ($46 + $1 * $1); $0 = $2 + 1 | 0; repeat_1 : do { if ($0 >>> 0 < $5 >>> 0) { $10 = $1; - $3 = HEAPU32[((HEAP32[($4 + 4 | 0) >> 2] | 0) + ($0 << 2 | 0) | 0) >> 2] | 0; + $3 = HEAPU32[(($0 << 2 | 0) + $4 | 0) >> 2] | 0; $1 = $6 - +HEAPF64[$3 >> 3]; $72 = $1 * $1; $1 = $7 - +HEAPF64[($3 + 8 | 0) >> 3]; @@ -458,14 +410,14 @@ function asmFunc(global, env, buffer) { function assembly_index_getBody($0) { $0 = $0 | 0; - var $1 = 0, $14 = 0; + var $1 = 0, $15 = 0; $1 = HEAPU32[assembly_index_system >> 2] | 0; - if ($0 >>> 0 < (HEAP32[($1 + 12 | 0) >> 2] | 0) >>> 0) $14 = HEAPU32[((HEAP32[($1 + 4 | 0) >> 2] | 0) + ($0 << 2 | 0) | 0) >> 2] | 0; else $14 = 0; - return $14 | 0; + if ($0 >>> 0 < ((HEAPU32[(($1 - 8 | 0) + 4 | 0) >> 2] | 0) >>> 2 | 0) >>> 0) $15 = HEAPU32[(($0 << 2 | 0) + $1 | 0) >> 2] | 0; else $15 = 0; + return $15 | 0; } function start() { - $lib_allocator_arena_startOffset = 96; + $lib_allocator_arena_startOffset = 56; $lib_allocator_arena_offset = $lib_allocator_arena_startOffset; } @@ -535,8 +487,7 @@ const assignasmFunc = ( } } )(memasmFunc); -assignasmFunc(8, "AwAAAB4AAAB+AGwAaQBiAC8AcgB1AG4AdABpAG0AZQAuAHQAcw=="); -assignasmFunc(48, "AwAAACYAAAB+AGwAaQBiAC8AYQByAHIAYQB5AGIAdQBmAGYAZQByAC4AdABz"); +assignasmFunc(8, "AQAAACQAAAB+AGwAaQBiAC8AZgBpAHgAZQBkAGEAcgByAGEAeQAuAHQAcw=="); const retasmFunc = asmFunc({Math,Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,NaN,Infinity}, {abort:function() { throw new Error('abort'); }},memasmFunc); export const memory = retasmFunc.memory; export const init = retasmFunc.init; diff --git a/examples/n-body/build/optimized.wasm b/examples/n-body/build/optimized.wasm index 8405b87c4fea16867f61732a02b3ddfa72505970..47d60e671710a32d5a1b5ffb34f31bba6a999a75 100644 GIT binary patch delta 504 zcmYL`PfHt76vfZI@4cCrmzYtyDK4Ctp@a&yZd6*3yo%Ix(|vbIo&Fh3BFSJI5CbmU zhxZ-25OLA$1Q-1V{YbqtEtSXPUd}lje!TZ<iBn$lZt{~@&GbbKk=m>spEs52#1yL|EyHmh!}rPgALO3t9fnvahrL!s z-xKLW#ASiw!tpQlTjg}-zv+Vjg^~G(e`_uC%KTNM%y-Sfwge)bz+Ndfv$}w^85{bM z#t03^rYkgD&}e^ejsjJ#3mdG_+GAFisdeSXkQ@KSrx0q5th&En-ncnIIZ@UR#CROQ=N&TLrRqTVB0lH;XS!&indt}vVuOD$ z)ZVqYG`iP+aH-%QPdW#$(k+r29Sh8|Q4LnwsN>RI9mZaQWIXp*O0^CO^W}B!fuNKsa%j88V+-Gs+ z_&SZLdEgtX+@Qjb;HL5pY^y<;F%3^?ri|rp2`yjLACy>rM<9LiSicnSD(W$_norUgl)uoU zF7diX@&Et; diff --git a/examples/n-body/build/optimized.wat b/examples/n-body/build/optimized.wat index b11978f399..4c40794ce6 100644 --- a/examples/n-body/build/optimized.wat +++ b/examples/n-body/build/optimized.wat @@ -5,10 +5,8 @@ (type $FUNCSIG$di (func (param i32) (result f64))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iddddddd (func (param f64 f64 f64 f64 f64 f64 f64) (result i32))) - (type $FUNCSIG$i (func (result i32))) (import "env" "memory" (memory $0 1)) - (data (i32.const 8) "\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 48) "\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 8) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00f\00i\00x\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $assembly/index/system (mut i32) (i32.const 0)) @@ -104,126 +102,7 @@ i32.const 8 i32.add ) - (func $assembly/index/NBodySystem#constructor (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 i32) - local.get $0 - i32.load offset=12 - local.set $7 - loop $repeat|0 - local.get $1 - local.get $7 - i32.lt_s - if - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $2 - f64.load offset=48 - local.set $3 - local.get $4 - local.get $2 - f64.load offset=24 - local.get $3 - f64.mul - f64.add - local.set $4 - local.get $5 - local.get $2 - f64.load offset=32 - local.get $3 - f64.mul - f64.add - local.set $5 - local.get $6 - local.get $2 - f64.load offset=40 - local.get $3 - f64.mul - f64.add - local.set $6 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $repeat|0 - end - end - local.get $0 - i32.load offset=4 - i32.load - local.tee $1 - local.get $4 - f64.neg - f64.const 39.47841760435743 - f64.div - f64.store offset=24 - local.get $1 - local.get $5 - f64.neg - f64.const 39.47841760435743 - f64.div - f64.store offset=32 - local.get $1 - local.get $6 - f64.neg - f64.const 39.47841760435743 - f64.div - f64.store offset=40 - i32.const 4 - call $~lib/runtime/doAllocate - local.tee $1 - i32.const 8 - i32.sub - i32.const 1 - i32.store - local.get $1 - local.get $0 - i32.store - local.get $1 - ) - (func $assembly/index/Body#constructor (; 3 ;) (type $FUNCSIG$iddddddd) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) - (local $7 i32) - i32.const 56 - call $~lib/runtime/doAllocate - local.tee $7 - i32.const 8 - i32.sub - i32.const 2 - i32.store - local.get $7 - local.get $0 - f64.store - local.get $7 - local.get $1 - f64.store offset=8 - local.get $7 - local.get $2 - f64.store offset=16 - local.get $7 - local.get $3 - f64.store offset=24 - local.get $7 - local.get $4 - f64.store offset=32 - local.get $7 - local.get $5 - f64.store offset=40 - local.get $7 - local.get $6 - f64.store offset=48 - local.get $7 - ) - (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.fill (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 @@ -416,74 +295,139 @@ end end ) - (func $~lib/runtime/ArrayBufferView#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - i32.const 20 + (func $assembly/index/Body#constructor (; 3 ;) (type $FUNCSIG$iddddddd) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (local $7 i32) + i32.const 56 call $~lib/runtime/doAllocate - local.tee $1 - call $~lib/memory/memory.fill - local.get $1 + local.tee $7 i32.const 8 i32.sub - i32.const 4 - i32.store - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/runtime/doAllocate - local.tee $0 - i32.const 8 - i32.sub - i32.const 5 - i32.store - end - local.get $0 - i32.const 0 + i32.const 3 i32.store + local.get $7 local.get $0 - i32.const 0 - i32.store offset=4 + f64.store + local.get $7 + local.get $1 + f64.store offset=8 + local.get $7 + local.get $2 + f64.store offset=16 + local.get $7 + local.get $3 + f64.store offset=24 + local.get $7 + local.get $4 + f64.store offset=32 + local.get $7 + local.get $5 + f64.store offset=40 + local.get $7 + local.get $6 + f64.store offset=48 + local.get $7 + ) + (func $assembly/index/NBodySystem#constructor (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 i32) local.get $0 - i32.const 0 - i32.store offset=8 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 2 + i32.shr_u + local.set $7 + loop $repeat|0 + local.get $1 + local.get $7 + i32.lt_s + if + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load + local.tee $2 + f64.load offset=48 + local.set $3 + local.get $4 + local.get $2 + f64.load offset=24 + local.get $3 + f64.mul + f64.add + local.set $4 + local.get $5 + local.get $2 + f64.load offset=32 + local.get $3 + f64.mul + f64.add + local.set $5 + local.get $6 + local.get $2 + f64.load offset=40 + local.get $3 + f64.mul + f64.add + local.set $6 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end + end local.get $0 + i32.load + local.tee $1 + local.get $4 + f64.neg + f64.const 39.47841760435743 + f64.div + f64.store offset=24 local.get $1 + local.get $5 + f64.neg + f64.const 39.47841760435743 + f64.div + f64.store offset=32 + local.get $1 + local.get $6 + f64.neg + f64.const 39.47841760435743 + f64.div + f64.store offset=40 + i32.const 4 + call $~lib/runtime/doAllocate + local.tee $1 + i32.const 8 + i32.sub + i32.const 4 i32.store - local.get $0 local.get $1 - i32.store offset=4 - local.get $0 - i32.const 20 - i32.store offset=8 local.get $0 + i32.store + local.get $1 ) - (func $~lib/array/Array#constructor (; 6 ;) (type $FUNCSIG$i) (result i32) + (func $assembly/index/init (; 5 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 16 + i32.const 20 call $~lib/runtime/doAllocate local.tee $0 + call $~lib/memory/memory.fill + local.get $0 i32.const 8 i32.sub - i32.const 6 + i32.const 2 i32.store local.get $0 - call $~lib/runtime/ArrayBufferView#constructor - local.tee $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 5 - i32.store offset=12 - local.get $0 - ) - (func $assembly/index/init (; 7 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - call $~lib/array/Array#constructor - local.tee $1 - i32.load offset=4 - local.tee $0 f64.const 0 f64.const 0 f64.const 0 @@ -494,6 +438,8 @@ call $assembly/index/Body#constructor i32.store local.get $0 + i32.const 4 + i32.add f64.const 4.841431442464721 f64.const -1.1603200440274284 f64.const -0.10362204447112311 @@ -502,8 +448,10 @@ f64.const -0.02521836165988763 f64.const 0.03769367487038949 call $assembly/index/Body#constructor - i32.store offset=4 + i32.store local.get $0 + i32.const 8 + i32.add f64.const 8.34336671824458 f64.const 4.124798564124305 f64.const -0.4035234171143214 @@ -512,8 +460,10 @@ f64.const 0.008415761376584154 f64.const 0.011286326131968767 call $assembly/index/Body#constructor - i32.store offset=8 + i32.store local.get $0 + i32.const 12 + i32.add f64.const 12.894369562139131 f64.const -15.111151401698631 f64.const -0.22330757889265573 @@ -522,8 +472,10 @@ f64.const -0.010832637401363636 f64.const 1.7237240570597112e-03 call $assembly/index/Body#constructor - i32.store offset=12 + i32.store local.get $0 + i32.const 16 + i32.add f64.const 15.379697114850917 f64.const -25.919314609987964 f64.const 0.17925877295037118 @@ -532,12 +484,12 @@ f64.const -0.034755955504078104 f64.const 2.0336868699246304e-03 call $assembly/index/Body#constructor - i32.store offset=16 - local.get $1 + i32.store + local.get $0 call $assembly/index/NBodySystem#constructor global.set $assembly/index/system ) - (func $assembly/index/NBodySystem#advance (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/NBodySystem#advance (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 f64) (local $3 i32) @@ -559,18 +511,21 @@ local.get $0 i32.load local.tee $12 - i32.load offset=12 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 2 + i32.shr_u local.set $13 loop $repeat|0 local.get $3 local.get $13 i32.lt_u if - local.get $12 - i32.load offset=4 local.get $3 i32.const 2 i32.shl + local.get $12 i32.add i32.load local.tee $0 @@ -604,11 +559,10 @@ i32.lt_u if local.get $14 - local.get $12 - i32.load offset=4 local.get $7 i32.const 2 i32.shl + local.get $12 i32.add i32.load local.tee $1 @@ -739,7 +693,7 @@ end end ) - (func $assembly/index/NBodySystem#energy (; 9 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $assembly/index/NBodySystem#energy (; 7 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -753,18 +707,21 @@ local.get $0 i32.load local.tee $4 - i32.load offset=12 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 2 + i32.shr_u local.set $5 loop $repeat|0 local.get $2 local.get $5 i32.lt_u if - local.get $4 - i32.load offset=4 local.get $2 i32.const 2 i32.shl + local.get $4 i32.add i32.load local.tee $0 @@ -814,11 +771,10 @@ local.get $1 local.set $10 local.get $6 - local.get $4 - i32.load offset=4 local.get $0 i32.const 2 i32.shl + local.get $4 i32.add i32.load local.tee $3 @@ -870,13 +826,13 @@ end local.get $1 ) - (func $assembly/index/step (; 10 ;) (type $FUNCSIG$d) (result f64) + (func $assembly/index/step (; 8 ;) (type $FUNCSIG$d) (result f64) global.get $assembly/index/system call $assembly/index/NBodySystem#advance global.get $assembly/index/system call $assembly/index/NBodySystem#energy ) - (func $assembly/index/bench (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/bench (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) block $break|0 loop $repeat|0 @@ -896,33 +852,36 @@ unreachable end ) - (func $assembly/index/getBody (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/getBody (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 global.get $assembly/index/system i32.load local.tee $1 - i32.load offset=12 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 2 + i32.shr_u i32.lt_u if (result i32) - local.get $1 - i32.load offset=4 local.get $0 i32.const 2 i32.shl + local.get $1 i32.add i32.load else i32.const 0 end ) - (func $start (; 13 ;) (type $FUNCSIG$v) - i32.const 96 + (func $start (; 11 ;) (type $FUNCSIG$v) + i32.const 56 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 14 ;) (type $FUNCSIG$v) + (func $null (; 12 ;) (type $FUNCSIG$v) nop ) ) diff --git a/examples/n-body/build/untouched.wat b/examples/n-body/build/untouched.wat index 0532282d10..6712a5379c 100644 --- a/examples/n-body/build/untouched.wat +++ b/examples/n-body/build/untouched.wat @@ -1,20 +1,19 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$iiddd (func (param i32 f64 f64 f64) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iiddddddd (func (param i32 f64 f64 f64 f64 f64 f64 f64) (result i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$iiddd (func (param i32 f64 f64 f64) (result i32))) (type $FUNCSIG$d (func (result f64))) (type $FUNCSIG$vid (func (param i32 f64))) (type $FUNCSIG$di (func (param i32) (result f64))) (import "env" "memory" (memory $0 1)) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 48) "\02\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 8) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00f\00i\00x\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 56) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (table $0 1 funcref) (elem (i32.const 0) $null) @@ -25,10 +24,10 @@ (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/memory/HEAP_BASE i32 (i32.const 96)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -37,32 +36,7 @@ (export "bench" (func $assembly/index/bench)) (export "getBody" (func $assembly/index/getBody)) (start $start) - (func $~lib/array/Array#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=12 - ) - (func $assembly/index/Body#offsetMomentum (; 2 ;) (type $FUNCSIG$iiddd) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) - local.get $0 - local.get $1 - f64.neg - global.get $assembly/index/SOLAR_MASS - f64.div - f64.store offset=24 - local.get $0 - local.get $2 - f64.neg - global.get $assembly/index/SOLAR_MASS - f64.div - f64.store offset=32 - local.get $0 - local.get $3 - f64.neg - global.get $assembly/index/SOLAR_MASS - f64.div - f64.store offset=40 - local.get $0 - ) - (func $~lib/runtime/ADJUSTOBLOCK (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -74,7 +48,7 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -159,7 +133,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -175,194 +149,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/ALLOCATE (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/doAllocate - ) - (func $~lib/runtime/assertUnregistered (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 16 - i32.const 192 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - i32.load - global.get $~lib/runtime/HEADER_MAGIC - i32.eq - i32.eqz - if - i32.const 0 - i32.const 16 - i32.const 193 - i32.const 2 - call $~lib/env/abort - unreachable - end - ) - (func $~lib/runtime/doRegister (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - local.get $1 - i32.store - local.get $0 - ) - (func $assembly/index/NBodySystem#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 f64) - f64.const 0 - local.set $2 - f64.const 0 - local.set $3 - f64.const 0 - local.set $4 - local.get $1 - call $~lib/array/Array#get:length - local.set $5 - block $break|0 - i32.const 0 - local.set $6 - loop $repeat|0 - local.get $6 - local.get $5 - i32.lt_s - i32.eqz - br_if $break|0 - block - local.get $1 - i32.load offset=4 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $7 - local.get $7 - f64.load offset=48 - local.set $8 - local.get $2 - local.get $7 - f64.load offset=24 - local.get $8 - f64.mul - f64.add - local.set $2 - local.get $3 - local.get $7 - f64.load offset=32 - local.get $8 - f64.mul - f64.add - local.set $3 - local.get $4 - local.get $7 - f64.load offset=40 - local.get $8 - f64.mul - f64.add - local.set $4 - end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $repeat|0 - unreachable - end - unreachable - end - local.get $1 - i32.load offset=4 - i32.load - local.get $2 - local.get $3 - local.get $4 - call $assembly/index/Body#offsetMomentum - drop - local.get $0 - i32.eqz - if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 4 - call $~lib/runtime/ALLOCATE - local.set $6 - local.get $6 - i32.const 1 - call $~lib/runtime/doRegister - end - local.set $0 - end - local.get $0 - local.get $1 - i32.store - local.get $0 - ) - (func $assembly/index/Body#constructor (; 10 ;) (type $FUNCSIG$iiddddddd) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (result i32) - (local $8 i32) - local.get $0 - i32.eqz - if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 56 - call $~lib/runtime/ALLOCATE - local.set $8 - local.get $8 - i32.const 3 - call $~lib/runtime/doRegister - end - local.set $0 - end - local.get $0 - local.get $1 - f64.store - local.get $0 - local.get $2 - f64.store offset=8 - local.get $0 - local.get $3 - f64.store offset=16 - local.get $0 - local.get $4 - f64.store offset=24 - local.get $0 - local.get $5 - f64.store offset=32 - local.get $0 - local.get $6 - f64.store offset=40 - local.get $0 - local.get $7 - f64.store offset=48 - local.get $0 - ) - (func $assembly/index/Sun (; 11 ;) (type $FUNCSIG$i) (result i32) - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - global.get $assembly/index/SOLAR_MASS - call $assembly/index/Body#constructor - ) - (func $~lib/memory/memory.fill (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) @@ -618,123 +405,148 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE i32.gt_u + i32.eqz if i32.const 0 - i32.const 56 - i32.const 24 - i32.const 43 + i32.const 64 + i32.const 199 + i32.const 2 call $~lib/env/abort unreachable end - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - local.get $1 - local.set $2 - local.get $2 - call $~lib/runtime/doAllocate + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 64 + i32.const 200 + i32.const 2 + call $~lib/env/abort + unreachable end - local.set $3 - local.get $3 - i32.const 0 + ) + (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub local.get $1 - call $~lib/memory/memory.fill - block $~lib/runtime/REGISTER|inlined.0 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.const 4 - call $~lib/runtime/doRegister - end + i32.store + local.get $0 ) - (func $~lib/runtime/ArrayBufferView#constructor (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/fixedarray/FixedArray#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 i32) (local $4 i32) local.get $1 global.get $~lib/runtime/MAX_BYTELENGTH - local.get $2 + i32.const 2 i32.shr_u i32.gt_u if i32.const 0 i32.const 16 - i32.const 227 - i32.const 57 + i32.const 12 + i32.const 60 call $~lib/env/abort unreachable end - i32.const 0 local.get $1 - local.get $2 + i32.const 2 i32.shl - local.tee $1 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - i32.const 12 - call $~lib/runtime/ALLOCATE - local.set $4 - local.get $4 - i32.const 5 - call $~lib/runtime/doRegister + local.set $2 + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + local.get $2 + local.set $3 + local.get $3 + call $~lib/runtime/doAllocate + end + local.set $4 + local.get $4 + i32.const 0 + local.get $2 + call $~lib/memory/memory.fill + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + local.get $4 + local.set $3 + local.get $3 + i32.const 2 + call $~lib/runtime/doRegister + end + ) + (func $assembly/index/Body#constructor (; 8 ;) (type $FUNCSIG$iiddddddd) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (result i32) + (local $8 i32) + local.get $0 + i32.eqz + if + block $~lib/runtime/REGISTER|inlined.0 (result i32) + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + i32.const 56 + local.set $8 + local.get $8 + call $~lib/runtime/doAllocate end - local.set $0 + local.set $8 + local.get $8 + i32.const 3 + call $~lib/runtime/doRegister end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 + local.set $0 end - local.get $3 - i32.store + local.get $0 + local.get $1 + f64.store + local.get $0 + local.get $2 + f64.store offset=8 local.get $0 local.get $3 - i32.store offset=4 + f64.store offset=16 local.get $0 - local.get $1 - i32.store offset=8 + local.get $4 + f64.store offset=24 local.get $0 - ) - (func $~lib/array/Array#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + local.get $5 + f64.store offset=32 local.get $0 - if (result i32) - local.get $0 - else - i32.const 16 - call $~lib/runtime/ALLOCATE - local.set $2 - local.get $2 - i32.const 6 - call $~lib/runtime/doRegister - end - local.get $1 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.set $0 + local.get $6 + f64.store offset=40 + local.get $0 + local.get $7 + f64.store offset=48 local.get $0 + ) + (func $assembly/index/Sun (; 9 ;) (type $FUNCSIG$i) (result i32) i32.const 0 - i32.store offset=12 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + global.get $assembly/index/SOLAR_MASS + call $assembly/index/Body#constructor + ) + (func $~lib/fixedarray/FixedArray#__unchecked_set (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 - i32.store offset=12 - local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store ) - (func $assembly/index/Jupiter (; 16 ;) (type $FUNCSIG$i) (result i32) + (func $assembly/index/Jupiter (; 11 ;) (type $FUNCSIG$i) (result i32) i32.const 0 f64.const 4.841431442464721 f64.const -1.1603200440274284 @@ -753,7 +565,7 @@ f64.mul call $assembly/index/Body#constructor ) - (func $assembly/index/Saturn (; 17 ;) (type $FUNCSIG$i) (result i32) + (func $assembly/index/Saturn (; 12 ;) (type $FUNCSIG$i) (result i32) i32.const 0 f64.const 8.34336671824458 f64.const 4.124798564124305 @@ -772,7 +584,7 @@ f64.mul call $assembly/index/Body#constructor ) - (func $assembly/index/Uranus (; 18 ;) (type $FUNCSIG$i) (result i32) + (func $assembly/index/Uranus (; 13 ;) (type $FUNCSIG$i) (result i32) i32.const 0 f64.const 12.894369562139131 f64.const -15.111151401698631 @@ -791,7 +603,7 @@ f64.mul call $assembly/index/Body#constructor ) - (func $assembly/index/Neptune (; 19 ;) (type $FUNCSIG$i) (result i32) + (func $assembly/index/Neptune (; 14 ;) (type $FUNCSIG$i) (result i32) i32.const 0 f64.const 15.379697114850917 f64.const -25.919314609987964 @@ -810,39 +622,170 @@ f64.mul call $assembly/index/Body#constructor ) - (func $assembly/index/init (; 20 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - i32.const 0 - block (result i32) + (func $~lib/fixedarray/FixedArray#get:length (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + i32.const 2 + i32.shr_u + ) + (func $~lib/fixedarray/FixedArray#__unchecked_get (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $assembly/index/Body#offsetMomentum (; 17 ;) (type $FUNCSIG$iiddd) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + local.get $0 + local.get $1 + f64.neg + global.get $assembly/index/SOLAR_MASS + f64.div + f64.store offset=24 + local.get $0 + local.get $2 + f64.neg + global.get $assembly/index/SOLAR_MASS + f64.div + f64.store offset=32 + local.get $0 + local.get $3 + f64.neg + global.get $assembly/index/SOLAR_MASS + f64.div + f64.store offset=40 + local.get $0 + ) + (func $assembly/index/NBodySystem#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 f64) + f64.const 0 + local.set $2 + f64.const 0 + local.set $3 + f64.const 0 + local.set $4 + local.get $1 + call $~lib/fixedarray/FixedArray#get:length + local.set $5 + block $break|0 i32.const 0 - i32.const 5 - call $~lib/array/Array#constructor + local.set $6 + loop $repeat|0 + local.get $6 + local.get $5 + i32.lt_s + i32.eqz + br_if $break|0 + block + local.get $1 + local.get $6 + call $~lib/fixedarray/FixedArray#__unchecked_get + local.set $7 + local.get $7 + f64.load offset=48 + local.set $8 + local.get $2 + local.get $7 + f64.load offset=24 + local.get $8 + f64.mul + f64.add + local.set $2 + local.get $3 + local.get $7 + f64.load offset=32 + local.get $8 + f64.mul + f64.add + local.set $3 + local.get $4 + local.get $7 + f64.load offset=40 + local.get $8 + f64.mul + f64.add + local.set $4 + end + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $repeat|0 + unreachable + end + unreachable + end + local.get $1 + i32.const 0 + call $~lib/fixedarray/FixedArray#__unchecked_get + local.get $2 + local.get $3 + local.get $4 + call $assembly/index/Body#offsetMomentum + drop + local.get $0 + i32.eqz + if + block $~lib/runtime/REGISTER|inlined.0 (result i32) + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + i32.const 4 + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $6 + local.get $6 + i32.const 4 + call $~lib/runtime/doRegister + end local.set $0 - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - call $assembly/index/Sun - i32.store - local.get $1 - call $assembly/index/Jupiter - i32.store offset=4 - local.get $1 - call $assembly/index/Saturn - i32.store offset=8 - local.get $1 - call $assembly/index/Uranus - i32.store offset=12 - local.get $1 - call $assembly/index/Neptune - i32.store offset=16 - local.get $0 end + local.get $0 + local.get $1 + i32.store + local.get $0 + ) + (func $assembly/index/init (; 19 ;) (type $FUNCSIG$v) + (local $0 i32) + i32.const 0 + i32.const 5 + call $~lib/fixedarray/FixedArray#constructor + local.set $0 + local.get $0 + i32.const 0 + call $assembly/index/Sun + call $~lib/fixedarray/FixedArray#__unchecked_set + local.get $0 + i32.const 1 + call $assembly/index/Jupiter + call $~lib/fixedarray/FixedArray#__unchecked_set + local.get $0 + i32.const 2 + call $assembly/index/Saturn + call $~lib/fixedarray/FixedArray#__unchecked_set + local.get $0 + i32.const 3 + call $assembly/index/Uranus + call $~lib/fixedarray/FixedArray#__unchecked_set + local.get $0 + i32.const 4 + call $assembly/index/Neptune + call $~lib/fixedarray/FixedArray#__unchecked_set + i32.const 0 + local.get $0 call $assembly/index/NBodySystem#constructor global.set $assembly/index/system ) - (func $assembly/index/NBodySystem#advance (; 21 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $assembly/index/NBodySystem#advance (; 20 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -868,7 +811,7 @@ i32.load local.set $2 local.get $2 - call $~lib/array/Array#get:length + call $~lib/fixedarray/FixedArray#get:length local.set $3 block $break|0 i32.const 0 @@ -881,12 +824,8 @@ br_if $break|0 block local.get $2 - i32.load offset=4 local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load + call $~lib/fixedarray/FixedArray#__unchecked_get local.set $5 local.get $5 f64.load @@ -922,12 +861,8 @@ br_if $break|1 block local.get $2 - i32.load offset=4 local.get $13 - i32.const 2 - i32.shl - i32.add - i32.load + call $~lib/fixedarray/FixedArray#__unchecked_get local.set $14 local.get $6 local.get $14 @@ -1074,7 +1009,7 @@ unreachable end ) - (func $assembly/index/NBodySystem#energy (; 22 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $assembly/index/NBodySystem#energy (; 21 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -1103,7 +1038,7 @@ i32.const 0 local.set $3 local.get $2 - call $~lib/array/Array#get:length + call $~lib/fixedarray/FixedArray#get:length local.set $4 end loop $repeat|0 @@ -1114,12 +1049,8 @@ br_if $break|0 block local.get $2 - i32.load offset=4 local.get $3 - i32.const 2 - i32.shl - i32.add - i32.load + call $~lib/fixedarray/FixedArray#__unchecked_get local.set $5 local.get $5 f64.load @@ -1173,12 +1104,8 @@ br_if $break|1 block local.get $2 - i32.load offset=4 local.get $13 - i32.const 2 - i32.shl - i32.add - i32.load + call $~lib/fixedarray/FixedArray#__unchecked_get local.set $14 local.get $6 local.get $14 @@ -1243,14 +1170,14 @@ end local.get $1 ) - (func $assembly/index/step (; 23 ;) (type $FUNCSIG$d) (result f64) + (func $assembly/index/step (; 22 ;) (type $FUNCSIG$d) (result f64) global.get $assembly/index/system f64.const 0.01 call $assembly/index/NBodySystem#advance global.get $assembly/index/system call $assembly/index/NBodySystem#energy ) - (func $assembly/index/bench (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/bench (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) block $break|0 i32.const 0 @@ -1274,28 +1201,24 @@ unreachable end ) - (func $assembly/index/getBody (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/getBody (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) global.get $assembly/index/system i32.load local.set $1 local.get $0 local.get $1 - call $~lib/array/Array#get:length + call $~lib/fixedarray/FixedArray#get:length i32.lt_u if (result i32) local.get $1 - i32.load offset=4 local.get $0 - i32.const 2 - i32.shl - i32.add - i32.load + call $~lib/fixedarray/FixedArray#__unchecked_get else i32.const 0 end ) - (func $start (; 26 ;) (type $FUNCSIG$v) + (func $start (; 25 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -1307,6 +1230,6 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 27 ;) (type $FUNCSIG$v) + (func $null (; 26 ;) (type $FUNCSIG$v) ) ) diff --git a/src/common.ts b/src/common.ts index 91d64faae5..f53af582dc 100644 --- a/src/common.ts +++ b/src/common.ts @@ -175,6 +175,7 @@ export namespace LibrarySymbols { export const V128 = "V128"; export const String = "String"; export const Array = "Array"; + export const FixedArray = "FixedArray"; export const ArrayBufferView = "ArrayBufferView"; export const ArrayBuffer = "ArrayBuffer"; export const Math = "Math"; diff --git a/src/compiler.ts b/src/compiler.ts index 66a9041767..452eb7f788 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -6445,17 +6445,16 @@ export class Compiler extends DiagnosticEmitter { case LiteralKind.ARRAY: { assert(!implicitNegate); let classType = contextualType.classReference; - if ( - classType && - classType.prototype == this.program.arrayPrototype - ) { - return this.compileArrayLiteral( - assert(classType.typeArguments)[0], - (expression).elementExpressions, - false, // TODO: isConst? - expression, - context - ); + if (classType) { + if (classType.prototype == this.program.arrayPrototype) { + return this.compileArrayLiteral( + assert(classType.typeArguments)[0], + (expression).elementExpressions, + false, // TODO: isConst? + expression, + context + ); + } } this.error( DiagnosticCode.Operation_not_supported, diff --git a/src/program.ts b/src/program.ts index 035b7678a3..c194322eae 100644 --- a/src/program.ts +++ b/src/program.ts @@ -348,6 +348,8 @@ export class Program extends DiagnosticEmitter { arrayBufferInstance: Class | null = null; /** Array prototype reference. */ arrayPrototype: ClassPrototype | null = null; + /** Fixed array prototype reference. */ + fixedArrayPrototype: ClassPrototype | null = null; /** String instance reference. */ stringInstance: Class | null = null; /** Abort function reference, if present. */ @@ -798,6 +800,10 @@ export class Program extends DiagnosticEmitter { assert(element.kind == ElementKind.CLASS_PROTOTYPE); this.arrayPrototype = element; } + if (element = this.lookupGlobal(LibrarySymbols.FixedArray)) { + assert(element.kind == ElementKind.CLASS_PROTOTYPE); + this.fixedArrayPrototype = element; + } if (element = this.lookupGlobal(LibrarySymbols.abort)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.abortInstance = this.resolver.resolveFunction(element, null); diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 554d1a1531..ac91a75cf3 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -20,6 +20,7 @@ function ensureCapacity(array: ArrayBufferView, minCapacity: i32, alignLog2: u32 } export class Array extends ArrayBufferView { + [key: number]: T; // 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 @@ -65,7 +66,7 @@ export class Array extends ArrayBufferView { @operator("[]") // unchecked is built-in private __get(index: i32): T { - if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + if (index >= this.dataLength >>> alignof()) throw new RangeError("Offset out of bounds"); return load(this.dataStart + (index << alignof())); } diff --git a/std/assembly/fixedarray.ts b/std/assembly/fixedarray.ts new file mode 100644 index 0000000000..954c4e1168 --- /dev/null +++ b/std/assembly/fixedarray.ts @@ -0,0 +1,48 @@ +import { ALLOCATE, REGISTER, MAX_BYTELENGTH, HEADER, HEADER_SIZE, LINK } from "./runtime"; + +// NOTE: DO NOT USE YET! + +// TODO: FixedArray with S being the static size, i.e. `new FixedArray`. +// Then hard-wire this special type to the compiler and do static length checks instead :) + +export class FixedArray { + [key: number]: T; + + constructor(length: i32) { + if (length > MAX_BYTELENGTH >>> alignof()) throw new RangeError("Invalid length"); + var outSize = length << alignof(); + var out = ALLOCATE(outSize); + memory.fill(out, 0, outSize); + return REGISTER>(out); + } + + get length(): i32 { + return changetype

(changetype(this) - HEADER_SIZE).payloadSize >>> alignof(); + } + + @operator("[]") private __get(index: i32): T { + if (index >= this.length) throw new RangeError("Offset out of bounds"); + return load(changetype(this) + (index << alignof())); + } + + @operator("[]=") private __set(index: i32, value: T): void { + if (index >= this.length) throw new RangeError("Offset out of bounds"); + store(changetype(this) + (index << alignof()), + isManaged() + ? LINK(value, this) + : value + ); + } + + @operator("{}") private __unchecked_get(index: i32): T { + return load(changetype(this) + (index << alignof())); + } + + @operator("{}=") private __unchecked_set(index: i32, value: T): void { + store(changetype(this) + (index << alignof()), + isManaged() + ? LINK(value, this) + : value + ); + } +} diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index 4b43f4ed81..5b6ba56d55 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -1205,6 +1205,13 @@ declare class Array { toString(): string; } +/** Class representing a fixed sequence of values of type `T`. */ +declare class FixedArray { + [key: number]: T; + readonly length: i32; + constructor(capacity?: i32); +} + /** Class representing a sequence of characters. */ declare class String { diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index b19f5adc5c..c0d78cf6fa 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -216,7 +216,6 @@ export const MAX_BYTELENGTH: i32 = MAX_SIZE_32 - HEADER_SIZE; /** Hard wired ArrayBufferView interface. */ export abstract class ArrayBufferView { - [key: number]: number; // @ts-ignore: decorator @unsafe diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index 93d7526b61..a28f867c42 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -2,6 +2,7 @@ import { ALLOCATE, REGISTER, ArrayBufferView } from "./runtime"; import { COMPARATOR, SORT as SORT_IMPL } from "./util/sort"; export class Int8Array extends ArrayBufferView { + [key: number]: i8; // @ts-ignore: decorator @lazy @@ -83,6 +84,7 @@ export class Int8Array extends ArrayBufferView { } export class Uint8Array extends ArrayBufferView { + [key: number]: u8; // @ts-ignore: decorator @lazy @@ -164,6 +166,7 @@ export class Uint8Array extends ArrayBufferView { } export class Uint8ClampedArray extends ArrayBufferView { + [key: number]: u8; // @ts-ignore: decorator @lazy @@ -245,6 +248,7 @@ export class Uint8ClampedArray extends ArrayBufferView { } export class Int16Array extends ArrayBufferView { + [key: number]: i16; // @ts-ignore: decorator @lazy @@ -326,6 +330,7 @@ export class Int16Array extends ArrayBufferView { } export class Uint16Array extends ArrayBufferView { + [key: number]: u16; // @ts-ignore: decorator @lazy @@ -407,6 +412,7 @@ export class Uint16Array extends ArrayBufferView { } export class Int32Array extends ArrayBufferView { + [key: number]: i32; // @ts-ignore: decorator @lazy @@ -488,6 +494,7 @@ export class Int32Array extends ArrayBufferView { } export class Uint32Array extends ArrayBufferView { + [key: number]: u32; // @ts-ignore: decorator @lazy @@ -569,6 +576,7 @@ export class Uint32Array extends ArrayBufferView { } export class Int64Array extends ArrayBufferView { + [key: number]: i64; // @ts-ignore: decorator @lazy @@ -650,6 +658,7 @@ export class Int64Array extends ArrayBufferView { } export class Uint64Array extends ArrayBufferView { + [key: number]: u64; // @ts-ignore: decorator @lazy @@ -731,6 +740,7 @@ export class Uint64Array extends ArrayBufferView { } export class Float32Array extends ArrayBufferView { + [key: number]: f32; // @ts-ignore: decorator @lazy @@ -812,6 +822,7 @@ export class Float32Array extends ArrayBufferView { } export class Float64Array extends ArrayBufferView { + [key: number]: f64; // @ts-ignore: decorator @lazy diff --git a/tests/compiler/nonNullAssertion.optimized.wat b/tests/compiler/nonNullAssertion.optimized.wat index 77e861e59d..286ef2a737 100644 --- a/tests/compiler/nonNullAssertion.optimized.wat +++ b/tests/compiler/nonNullAssertion.optimized.wat @@ -40,7 +40,7 @@ if i32.const 0 i32.const 16 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/nonNullAssertion.untouched.wat b/tests/compiler/nonNullAssertion.untouched.wat index a30d61ce19..05c15e4d6a 100644 --- a/tests/compiler/nonNullAssertion.untouched.wat +++ b/tests/compiler/nonNullAssertion.untouched.wat @@ -49,7 +49,7 @@ if i32.const 0 i32.const 16 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -77,7 +77,7 @@ if i32.const 0 i32.const 16 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 784af276fd..2cc5e90cbf 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -29,7 +29,7 @@ if i32.const 0 i32.const 16 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 27f875bb85..5d8df860bb 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -34,7 +34,7 @@ if i32.const 0 i32.const 16 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -57,7 +57,7 @@ if i32.const 0 i32.const 16 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -87,7 +87,7 @@ if i32.const 0 i32.const 16 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -252,7 +252,7 @@ if i32.const 0 i32.const 16 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 77f6d07f0b..238ad2f4b8 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -39,7 +39,7 @@ if i32.const 0 i32.const 104 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -60,7 +60,7 @@ if i32.const 0 i32.const 104 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -436,7 +436,7 @@ if i32.const 0 i32.const 224 - i32.const 234 + i32.const 233 i32.const 57 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 2b9c508301..94995810b7 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -53,7 +53,7 @@ if i32.const 0 i32.const 104 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -80,7 +80,7 @@ if i32.const 0 i32.const 104 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -545,7 +545,7 @@ if i32.const 0 i32.const 224 - i32.const 234 + i32.const 233 i32.const 57 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 216f99a566..ade649cde2 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -663,7 +663,7 @@ if i32.const 0 i32.const 16 - i32.const 234 + i32.const 233 i32.const 57 call $~lib/env/abort unreachable @@ -1919,7 +1919,7 @@ if i32.const 0 i32.const 208 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -2060,7 +2060,7 @@ if i32.const 0 i32.const 208 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -2298,7 +2298,7 @@ if i32.const 0 i32.const 208 - i32.const 199 + i32.const 200 i32.const 20 call $~lib/env/abort unreachable @@ -2565,7 +2565,7 @@ if i32.const 0 i32.const 208 - i32.const 260 + i32.const 261 i32.const 20 call $~lib/env/abort unreachable @@ -3345,7 +3345,7 @@ if i32.const 0 i32.const 208 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -4096,7 +4096,7 @@ if i32.const 0 i32.const 208 - i32.const 373 + i32.const 374 i32.const 4 call $~lib/env/abort unreachable @@ -4592,7 +4592,7 @@ if i32.const 0 i32.const 208 - i32.const 373 + i32.const 374 i32.const 4 call $~lib/env/abort unreachable @@ -4690,7 +4690,7 @@ if i32.const 0 i32.const 208 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -5111,7 +5111,7 @@ if i32.const 0 i32.const 208 - i32.const 373 + i32.const 374 i32.const 4 call $~lib/env/abort unreachable @@ -5436,7 +5436,7 @@ if i32.const 0 i32.const 208 - i32.const 373 + i32.const 374 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 9b64bcf307..dd435298d2 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -746,7 +746,7 @@ if i32.const 0 i32.const 16 - i32.const 234 + i32.const 233 i32.const 57 call $~lib/env/abort unreachable @@ -2493,7 +2493,7 @@ if i32.const 0 i32.const 208 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -2661,7 +2661,7 @@ if i32.const 0 i32.const 208 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -2939,7 +2939,7 @@ if i32.const 0 i32.const 208 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -2964,7 +2964,7 @@ if i32.const 0 i32.const 208 - i32.const 199 + i32.const 200 i32.const 20 call $~lib/env/abort unreachable @@ -3323,7 +3323,7 @@ if i32.const 0 i32.const 208 - i32.const 260 + i32.const 261 i32.const 20 call $~lib/env/abort unreachable @@ -4257,7 +4257,7 @@ if i32.const 0 i32.const 208 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -5299,7 +5299,7 @@ if i32.const 0 i32.const 208 - i32.const 373 + i32.const 374 i32.const 4 call $~lib/env/abort unreachable @@ -5909,7 +5909,7 @@ if i32.const 0 i32.const 208 - i32.const 373 + i32.const 374 i32.const 4 call $~lib/env/abort unreachable @@ -6048,7 +6048,7 @@ if i32.const 0 i32.const 208 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -6544,7 +6544,7 @@ if i32.const 0 i32.const 208 - i32.const 373 + i32.const 374 i32.const 4 call $~lib/env/abort unreachable @@ -7048,7 +7048,7 @@ if i32.const 0 i32.const 208 - i32.const 373 + i32.const 374 i32.const 4 call $~lib/env/abort unreachable @@ -7447,7 +7447,7 @@ if i32.const 0 i32.const 208 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -7623,7 +7623,7 @@ if i32.const 0 i32.const 208 - i32.const 373 + i32.const 374 i32.const 4 call $~lib/env/abort unreachable @@ -7987,7 +7987,7 @@ if i32.const 0 i32.const 208 - i32.const 373 + i32.const 374 i32.const 4 call $~lib/env/abort unreachable @@ -8060,7 +8060,7 @@ if i32.const 0 i32.const 208 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -8244,7 +8244,7 @@ if i32.const 0 i32.const 208 - i32.const 373 + i32.const 374 i32.const 4 call $~lib/env/abort unreachable @@ -8321,7 +8321,7 @@ if i32.const 0 i32.const 208 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index f9fd20d002..ca63c55787 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1552,7 +1552,7 @@ if i32.const 0 i32.const 64 - i32.const 234 + i32.const 233 i32.const 57 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index d185562933..ff9b3ed33e 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -2048,7 +2048,7 @@ if i32.const 0 i32.const 64 - i32.const 234 + i32.const 233 i32.const 57 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 6c1fe71849..892b29bac7 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -240,7 +240,7 @@ if i32.const 0 i32.const 104 - i32.const 111 + i32.const 113 i32.const 44 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index d66ae25174..8338c1e396 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -489,7 +489,7 @@ if i32.const 0 i32.const 16 - i32.const 234 + i32.const 233 i32.const 57 call $~lib/env/abort unreachable @@ -571,7 +571,7 @@ if i32.const 0 i32.const 104 - i32.const 111 + i32.const 113 i32.const 44 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 0e885be7dc..f454ea8148 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -36,7 +36,7 @@ if i32.const 0 i32.const 240 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -387,7 +387,7 @@ if i32.const 0 i32.const 240 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -428,7 +428,7 @@ if i32.const 0 i32.const 240 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -469,7 +469,7 @@ if i32.const 0 i32.const 240 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 83797ee8c7..ad621033e7 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -52,7 +52,7 @@ if i32.const 0 i32.const 240 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -1965,7 +1965,7 @@ if i32.const 0 i32.const 240 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -2019,7 +2019,7 @@ if i32.const 0 i32.const 240 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -2073,7 +2073,7 @@ if i32.const 0 i32.const 240 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 0d53a666e3..8df4d63ef1 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -3052,7 +3052,7 @@ if i32.const 0 i32.const 96 - i32.const 234 + i32.const 233 i32.const 57 call $~lib/env/abort unreachable @@ -3504,7 +3504,7 @@ if i32.const 0 i32.const 1440 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 888a29ff53..db33c25efc 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -3777,7 +3777,7 @@ if i32.const 0 i32.const 96 - i32.const 234 + i32.const 233 i32.const 57 call $~lib/env/abort unreachable @@ -4357,7 +4357,7 @@ if i32.const 0 i32.const 1440 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 2248e8523b..5eee3c92a4 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -465,7 +465,7 @@ if i32.const 0 i32.const 64 - i32.const 234 + i32.const 233 i32.const 57 call $~lib/env/abort unreachable @@ -1078,7 +1078,7 @@ if i32.const 0 i32.const 152 - i32.const 435 + i32.const 441 i32.const 63 call $~lib/env/abort unreachable @@ -1102,7 +1102,7 @@ if i32.const 0 i32.const 152 - i32.const 429 + i32.const 435 i32.const 63 call $~lib/env/abort unreachable @@ -1212,7 +1212,7 @@ if i32.const 0 i32.const 152 - i32.const 840 + i32.const 851 i32.const 63 call $~lib/env/abort unreachable @@ -1750,7 +1750,7 @@ if i32.const 0 i32.const 152 - i32.const 834 + i32.const 845 i32.const 63 call $~lib/env/abort unreachable @@ -1771,7 +1771,7 @@ if i32.const 0 i32.const 152 - i32.const 192 + i32.const 195 i32.const 44 call $~lib/env/abort unreachable @@ -1803,7 +1803,7 @@ if i32.const 0 i32.const 152 - i32.const 186 + i32.const 189 i32.const 44 call $~lib/env/abort unreachable @@ -1822,7 +1822,7 @@ if i32.const 0 i32.const 152 - i32.const 30 + i32.const 31 i32.const 44 call $~lib/env/abort unreachable @@ -3035,7 +3035,7 @@ if i32.const 0 i32.const 152 - i32.const 24 + i32.const 25 i32.const 44 call $~lib/env/abort unreachable @@ -3054,7 +3054,7 @@ if i32.const 0 i32.const 216 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -3274,7 +3274,7 @@ if i32.const 0 i32.const 216 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -3414,7 +3414,7 @@ if i32.const 0 i32.const 152 - i32.const 111 + i32.const 113 i32.const 44 call $~lib/env/abort unreachable @@ -3537,7 +3537,7 @@ if i32.const 0 i32.const 152 - i32.const 273 + i32.const 277 i32.const 63 call $~lib/env/abort unreachable @@ -3633,7 +3633,7 @@ if i32.const 0 i32.const 152 - i32.const 354 + i32.const 359 i32.const 63 call $~lib/env/abort unreachable @@ -3800,7 +3800,7 @@ if i32.const 0 i32.const 152 - i32.const 516 + i32.const 523 i32.const 63 call $~lib/env/abort unreachable @@ -3854,7 +3854,7 @@ if i32.const 0 i32.const 152 - i32.const 597 + i32.const 605 i32.const 63 call $~lib/env/abort unreachable @@ -3954,7 +3954,7 @@ if i32.const 0 i32.const 152 - i32.const 678 + i32.const 687 i32.const 63 call $~lib/env/abort unreachable @@ -4008,7 +4008,7 @@ if i32.const 0 i32.const 152 - i32.const 759 + i32.const 769 i32.const 63 call $~lib/env/abort unreachable @@ -4998,7 +4998,7 @@ if i32.const 0 i32.const 152 - i32.const 105 + i32.const 107 i32.const 44 call $~lib/env/abort unreachable @@ -5236,7 +5236,7 @@ if i32.const 0 i32.const 152 - i32.const 267 + i32.const 271 i32.const 63 call $~lib/env/abort unreachable @@ -5372,7 +5372,7 @@ if i32.const 0 i32.const 152 - i32.const 348 + i32.const 353 i32.const 63 call $~lib/env/abort unreachable @@ -5621,7 +5621,7 @@ if i32.const 0 i32.const 152 - i32.const 510 + i32.const 517 i32.const 63 call $~lib/env/abort unreachable @@ -5762,7 +5762,7 @@ if i32.const 0 i32.const 152 - i32.const 591 + i32.const 599 i32.const 63 call $~lib/env/abort unreachable @@ -5898,7 +5898,7 @@ if i32.const 0 i32.const 152 - i32.const 672 + i32.const 681 i32.const 63 call $~lib/env/abort unreachable @@ -6039,7 +6039,7 @@ if i32.const 0 i32.const 152 - i32.const 753 + i32.const 763 i32.const 63 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 5e62bd2a54..89f7791d35 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -561,7 +561,7 @@ if i32.const 0 i32.const 64 - i32.const 234 + i32.const 233 i32.const 57 call $~lib/env/abort unreachable @@ -1454,7 +1454,7 @@ if i32.const 0 i32.const 152 - i32.const 435 + i32.const 441 i32.const 63 call $~lib/env/abort unreachable @@ -1478,7 +1478,7 @@ if i32.const 0 i32.const 152 - i32.const 429 + i32.const 435 i32.const 63 call $~lib/env/abort unreachable @@ -1615,7 +1615,7 @@ if i32.const 0 i32.const 152 - i32.const 840 + i32.const 851 i32.const 63 call $~lib/env/abort unreachable @@ -2290,7 +2290,7 @@ if i32.const 0 i32.const 152 - i32.const 834 + i32.const 845 i32.const 63 call $~lib/env/abort unreachable @@ -2311,7 +2311,7 @@ if i32.const 0 i32.const 152 - i32.const 192 + i32.const 195 i32.const 44 call $~lib/env/abort unreachable @@ -2343,7 +2343,7 @@ if i32.const 0 i32.const 152 - i32.const 186 + i32.const 189 i32.const 44 call $~lib/env/abort unreachable @@ -2362,7 +2362,7 @@ if i32.const 0 i32.const 152 - i32.const 30 + i32.const 31 i32.const 44 call $~lib/env/abort unreachable @@ -3947,7 +3947,7 @@ if i32.const 0 i32.const 152 - i32.const 24 + i32.const 25 i32.const 44 call $~lib/env/abort unreachable @@ -3968,7 +3968,7 @@ if i32.const 0 i32.const 216 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -4255,7 +4255,7 @@ if i32.const 0 i32.const 216 - i32.const 68 + i32.const 69 i32.const 61 call $~lib/env/abort unreachable @@ -4427,7 +4427,7 @@ if i32.const 0 i32.const 152 - i32.const 111 + i32.const 113 i32.const 44 call $~lib/env/abort unreachable @@ -4651,7 +4651,7 @@ if i32.const 0 i32.const 152 - i32.const 273 + i32.const 277 i32.const 63 call $~lib/env/abort unreachable @@ -4778,7 +4778,7 @@ if i32.const 0 i32.const 152 - i32.const 354 + i32.const 359 i32.const 63 call $~lib/env/abort unreachable @@ -5002,7 +5002,7 @@ if i32.const 0 i32.const 152 - i32.const 516 + i32.const 523 i32.const 63 call $~lib/env/abort unreachable @@ -5125,7 +5125,7 @@ if i32.const 0 i32.const 152 - i32.const 597 + i32.const 605 i32.const 63 call $~lib/env/abort unreachable @@ -5248,7 +5248,7 @@ if i32.const 0 i32.const 152 - i32.const 678 + i32.const 687 i32.const 63 call $~lib/env/abort unreachable @@ -5371,7 +5371,7 @@ if i32.const 0 i32.const 152 - i32.const 759 + i32.const 769 i32.const 63 call $~lib/env/abort unreachable @@ -6867,7 +6867,7 @@ if i32.const 0 i32.const 152 - i32.const 105 + i32.const 107 i32.const 44 call $~lib/env/abort unreachable @@ -7160,7 +7160,7 @@ if i32.const 0 i32.const 152 - i32.const 267 + i32.const 271 i32.const 63 call $~lib/env/abort unreachable @@ -7319,7 +7319,7 @@ if i32.const 0 i32.const 152 - i32.const 348 + i32.const 353 i32.const 63 call $~lib/env/abort unreachable @@ -7614,7 +7614,7 @@ if i32.const 0 i32.const 152 - i32.const 510 + i32.const 517 i32.const 63 call $~lib/env/abort unreachable @@ -7773,7 +7773,7 @@ if i32.const 0 i32.const 152 - i32.const 591 + i32.const 599 i32.const 63 call $~lib/env/abort unreachable @@ -7932,7 +7932,7 @@ if i32.const 0 i32.const 152 - i32.const 672 + i32.const 681 i32.const 63 call $~lib/env/abort unreachable @@ -8091,7 +8091,7 @@ if i32.const 0 i32.const 152 - i32.const 753 + i32.const 763 i32.const 63 call $~lib/env/abort unreachable From 89b9d46fa39705d86c373ef1601f157180e1ab55 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 19 Mar 2019 19:52:47 +0100 Subject: [PATCH 053/119] link on property assign --- src/compiler.ts | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index 452eb7f788..82b8dd9f6b 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -4860,35 +4860,52 @@ export class Compiler extends DiagnosticEmitter { this.options.usizeType, WrapMode.NONE ); + let thisType = this.currentType; let type = (target).type; - this.currentType = tee ? type : Type.void; let nativeType = type.toNativeType(); if (type.kind == TypeKind.BOOL) { // make sure bools are wrapped (usually are) when storing as 8 bits valueWithCorrectType = this.ensureSmallIntegerWrap(valueWithCorrectType, type); } + let program = this.program; + let tempThis: Local | null = null; + if (type.isManaged(program) && thisType.isManaged(program)) { + let linkInstance = this.resolver.resolveFunction(assert(program.linkPrototype), [ type, thisType ]); + if (!linkInstance) { + this.currentType = tee ? type : Type.void; + return module.createUnreachable(); + } + tempThis = this.currentFlow.getTempLocal(thisType, false); + // this = (tempThis = this) + thisExpr = module.createTeeLocal(tempThis.index, thisExpr); + // value = LINK(value, tempThis) + valueWithCorrectType = this.makeCallInline(linkInstance, [ + valueWithCorrectType, + module.createGetLocal(tempThis.index, this.options.nativeSizeType) + ], 0, true); + } if (tee) { - let flow = this.currentFlow; - let tempLocal = flow.getAndFreeTempLocal( + let tempValue = this.currentFlow.getAndFreeTempLocal( type, !flow.canOverflow(valueWithCorrectType, type) ); - let tempLocalIndex = tempLocal.index; - // TODO: simplify if valueWithCorrectType has no side effects - // TODO: call __gc_link here if a GC is present + if (tempThis) this.currentFlow.freeTempLocal(tempThis); + this.currentType = type; + // (this.field = (tempValue = value)), tempValue return module.createBlock(null, [ - module.createSetLocal(tempLocalIndex, valueWithCorrectType), module.createStore( type.byteSize, thisExpr, - module.createGetLocal(tempLocalIndex, nativeType), + module.createTeeLocal(tempValue.index, valueWithCorrectType), nativeType, (target).memoryOffset ), - module.createGetLocal(tempLocalIndex, nativeType) + module.createGetLocal(tempValue.index, nativeType) ], nativeType); } else { - // TODO: call __gc_link here if a GC is present + if (tempThis) this.currentFlow.freeTempLocal(tempThis); + this.currentType = Type.void; + // this.field = value return module.createStore( type.byteSize, thisExpr, From 5fb3077064f23bcf95b50af73bef3766c2b07fb7 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 20 Mar 2019 06:30:12 +0100 Subject: [PATCH 054/119] rt unlink --- std/assembly/runtime.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index c0d78cf6fa..5a3dd1fb24 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -141,7 +141,7 @@ function doRegister(ref: usize, classId: u32): usize { return ref; } -/** Links a registered object with the (registered) object now referencing it. */ +/** Links a registered object with an object that is now referencing it. */ // @ts-ignore: decorator @unsafe @inline export function LINK(ref: T, parentRef: TParent): T { @@ -160,6 +160,24 @@ function doLink(ref: usize, parentRef: usize): void { if (GC_IMPLEMENTED) __gc_link(changetype(ref), changetype(parentRef)); } +/** Unlinks a registered object from an object that was referencing it. */ +// @ts-ignore: decorator +@unsafe @inline +export function UNLINK(ref: T, parentRef: TParent): void { + if (!isManaged()) ERROR("managed reference expected"); + if (!isManaged()) ERROR("managed reference expected"); + doUnlink(changetype(ref), changetype(parentRef)); +} + +function doUnlink(ref: usize, parentRef: usize): void { + if (!ASC_NO_ASSERT) { + assertRegistered(ref); + assertRegistered(parentRef); + } + // @ts-ignore: stub + if (GC_IMPLEMENTED) __gc_unlink(changetype(ref), changetype(parentRef)); +} + /** Discards an unregistered object that turned out to be unnecessary. */ // @ts-ignore: decorator @unsafe @inline From 9b664dc1751281e392876c70b5bf3c8a7902e0bc Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 20 Mar 2019 14:16:18 +0100 Subject: [PATCH 055/119] harden / elaborate on makeCallInline --- src/builtins.ts | 2 +- src/compiler.ts | 31 +- src/flow.ts | 21 + tests/compiler/call-super.optimized.wat | 4 +- tests/compiler/call-super.untouched.wat | 4 +- tests/compiler/constructor.optimized.wat | 4 +- tests/compiler/constructor.untouched.wat | 4 +- tests/compiler/exports.optimized.wat | 4 +- tests/compiler/exports.untouched.wat | 4 +- tests/compiler/getter-call.optimized.wat | 4 +- tests/compiler/getter-call.untouched.wat | 4 +- .../inlining-blocklocals.optimized.wat | 55 + tests/compiler/inlining-blocklocals.ts | 19 + .../inlining-blocklocals.untouched.wat | 73 + tests/compiler/inlining.optimized.wat | 4 +- tests/compiler/inlining.untouched.wat | 54 +- .../new-without-allocator.untouched.wat | 4 +- tests/compiler/number.optimized.wat | 332 ++-- tests/compiler/number.untouched.wat | 246 +-- tests/compiler/object-literal.optimized.wat | 4 +- tests/compiler/object-literal.untouched.wat | 4 +- .../optional-typeparameters.optimized.wat | 4 +- .../optional-typeparameters.untouched.wat | 4 +- .../std/allocator_arena.optimized.wat | 20 +- .../std/allocator_arena.untouched.wat | 77 +- .../compiler/std/array-literal.optimized.wat | 6 +- .../compiler/std/array-literal.untouched.wat | 31 +- tests/compiler/std/array.optimized.wat | 439 +++--- tests/compiler/std/array.untouched.wat | 475 +++--- tests/compiler/std/arraybuffer.optimized.wat | 6 +- tests/compiler/std/arraybuffer.untouched.wat | 53 +- tests/compiler/std/dataview.optimized.wat | 4 +- tests/compiler/std/dataview.untouched.wat | 31 +- tests/compiler/std/date.optimized.wat | 4 +- tests/compiler/std/date.untouched.wat | 48 +- tests/compiler/std/libm.untouched.wat | 12 +- tests/compiler/std/map.optimized.wat | 4 +- tests/compiler/std/map.untouched.wat | 29 +- tests/compiler/std/math.untouched.wat | 54 +- tests/compiler/std/new.optimized.wat | 4 +- tests/compiler/std/new.untouched.wat | 4 +- .../std/operator-overloading.optimized.wat | 20 +- .../std/operator-overloading.untouched.wat | 26 +- tests/compiler/std/pointer.optimized.wat | 2 +- tests/compiler/std/pointer.untouched.wat | 87 +- tests/compiler/std/runtime.optimized.wat | 8 +- tests/compiler/std/runtime.untouched.wat | 57 +- tests/compiler/std/set.optimized.wat | 4 +- tests/compiler/std/set.untouched.wat | 29 +- tests/compiler/std/static-array.untouched.wat | 61 +- tests/compiler/std/string-utf8.optimized.wat | 4 +- tests/compiler/std/string-utf8.untouched.wat | 26 +- tests/compiler/std/string.optimized.wat | 409 +++-- tests/compiler/std/string.untouched.wat | 479 +++--- tests/compiler/std/symbol.optimized.wat | 4 +- tests/compiler/std/symbol.untouched.wat | 51 +- tests/compiler/std/typedarray.optimized.wat | 6 +- tests/compiler/std/typedarray.untouched.wat | 1349 +++++++++-------- 58 files changed, 2504 insertions(+), 2308 deletions(-) create mode 100644 tests/compiler/inlining-blocklocals.optimized.wat create mode 100644 tests/compiler/inlining-blocklocals.ts create mode 100644 tests/compiler/inlining-blocklocals.untouched.wat diff --git a/src/builtins.ts b/src/builtins.ts index bb6b4cf0f1..142011a537 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -4293,7 +4293,7 @@ export function compileBuiltinArraySetWithValue( let linkPrototype = assert(program.linkPrototype); let linkInstance = compiler.resolver.resolveFunction(linkPrototype, [ type, target.type ]); if (!linkInstance) return module.createUnreachable(); - valueExpr = compiler.makeCallInline(linkInstance, [ + valueExpr = compiler.makeCallInlinePrechecked(linkInstance, [ valueExpr, module.createGetLocal(assert(tempThis).index, nativeSizeType) ], 0, true); diff --git a/src/compiler.ts b/src/compiler.ts index 82b8dd9f6b..98ccb0c203 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -4879,7 +4879,7 @@ export class Compiler extends DiagnosticEmitter { // this = (tempThis = this) thisExpr = module.createTeeLocal(tempThis.index, thisExpr); // value = LINK(value, tempThis) - valueWithCorrectType = this.makeCallInline(linkInstance, [ + valueWithCorrectType = this.makeCallInlinePrechecked(linkInstance, [ valueWithCorrectType, module.createGetLocal(tempThis.index, this.options.nativeSizeType) ], 0, true); @@ -5571,7 +5571,12 @@ export class Compiler extends DiagnosticEmitter { var numArguments = argumentExpressions.length; var signature = instance.signature; var parameterTypes = signature.parameterTypes; + assert(numArguments <= parameterTypes.length); var args = new Array(numArguments); + var flow = this.currentFlow; + + // compile arguments possibly using their own temp locals + var temps = flow.blockLocalsBeforeInlining(instance); for (let i = 0; i < numArguments; ++i) { args[i] = this.compileExpression( argumentExpressions[i], @@ -5580,15 +5585,25 @@ export class Compiler extends DiagnosticEmitter { WrapMode.NONE ); } - return this.makeCallInline(instance, args, thisArg, canAlias); + flow.unblockLocals(temps); + + return this.makeCallInlinePrechecked(instance, args, thisArg, canAlias); } - makeCallInline( + makeCallInlinePrechecked( instance: Function, args: ExpressionRef[], thisArg: ExpressionRef = 0, canAlias: bool = false ): ExpressionRef { + + // CAUTION: Imagine a call like `theCall(a, b)`. Unless canAlias, inlining needs a temporary local for + // each argument, looking something like `BLOCK { t1 = a, t2 = b, inlinedTheCall }`. Now, if argument b, + // which is compiled beforehand, itself required a temporary local, it is likely that it did pick `t1` + // for this, making it something like `BLOCK { t1 = a, t2 = (t1 = c, t1), inlinedTheCall }`, which is + // overwriting t1. Hence, whenever makeCallInline is used, this condition must be taken into account. + // Flows provide the helpers Flow#blockLocalsBeforeInlining and Flow#unblockLocals for this. + var module = this.module; // Create a new inline flow and use it to compile the function as a block @@ -6733,7 +6748,7 @@ export class Compiler extends DiagnosticEmitter { this.currentType = arrayType; return module.createUnreachable(); } - let body = this.makeCallInline(wrapArrayInstance, [ + let body = this.makeCallInlinePrechecked(wrapArrayInstance, [ program.options.isWasm64 ? this.module.createI64(i64_low(bufferAddress), i64_high(bufferAddress)) : this.module.createI32(i64_low(bufferAddress)) @@ -6793,7 +6808,7 @@ export class Compiler extends DiagnosticEmitter { valueExpr = module.createUnreachable(); } else { // value = LINK(value, tempThis) - valueExpr = this.makeCallInline(linkInstance, [ + valueExpr = this.makeCallInlinePrechecked(linkInstance, [ valueExpr, module.createGetLocal(tempThis.index, nativeArrayType) ], 0, true); @@ -8029,7 +8044,7 @@ export class Compiler extends DiagnosticEmitter { if (classInstance.hasDecorator(DecoratorFlags.UNMANAGED)) { // ALLOCATE_UNMANAGED(sizeof()) let allocateInstance = assert(program.allocateUnmanagedInstance); - body = this.makeCallInline(allocateInstance, [ + body = this.makeCallInlinePrechecked(allocateInstance, [ options.isWasm64 ? module.createI64(classInstance.currentMemoryOffset) : module.createI32(classInstance.currentMemoryOffset) @@ -8047,8 +8062,8 @@ export class Compiler extends DiagnosticEmitter { this.currentType = classType; return module.createUnreachable(); } - body = this.makeCallInline(registerInstance, [ - this.makeCallInline(allocateInstance, [ + body = this.makeCallInlinePrechecked(registerInstance, [ + this.makeCallInlinePrechecked(allocateInstance, [ options.isWasm64 ? module.createI64(classInstance.currentMemoryOffset) : module.createI32(classInstance.currentMemoryOffset) diff --git a/src/flow.ts b/src/flow.ts index 928c2e9280..a43672b315 100644 --- a/src/flow.ts +++ b/src/flow.ts @@ -400,6 +400,27 @@ export class Flow { return scopedAlias; } + /** Blocks any locals that might be used in an inlining operation. */ + blockLocalsBeforeInlining(instance: Function): Local[] { + var signature = instance.signature; + var parameterTypes = signature.parameterTypes; + var numParameters = parameterTypes.length; + var temps = new Array(numParameters); + for (let i = 0; i < numParameters; ++i) { + temps[i] = this.getTempLocal(parameterTypes[i], false); + } + var thisType = signature.thisType; + if (thisType) temps.push(this.getTempLocal(thisType, false)); + return temps; + } + + /** Unblocks the specified locals. */ + unblockLocals(temps: Local[]): void { + for (let i = 0, k = temps.length; i < k; ++i) { + this.freeTempLocal(temps[i]); + } + } + /** Frees this flow's scoped variables and returns its parent flow. */ freeScopedLocals(): void { if (this.scopedLocals) { diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 74c23cbbe4..959044e00b 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -106,7 +106,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -120,7 +120,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index 6d121a35d6..4dbbfc358e 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -141,7 +141,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -156,7 +156,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index ac790d7659..876ae3cd95 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -116,7 +116,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -130,7 +130,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index 138362f6d9..168ebc1c66 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -151,7 +151,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -166,7 +166,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index 27d4706247..b462084731 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -145,7 +145,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index b0ba341509..a7da4e1df3 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -193,7 +193,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -208,7 +208,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 164ddf508e..68eddd6be6 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -85,7 +85,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -99,7 +99,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index 4b271b9320..5ffa1d6cc1 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining-blocklocals.optimized.wat b/tests/compiler/inlining-blocklocals.optimized.wat new file mode 100644 index 0000000000..ce8a09fdc6 --- /dev/null +++ b/tests/compiler/inlining-blocklocals.optimized.wat @@ -0,0 +1,55 @@ +(module + (type $FUNCSIG$v (func)) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\01\00\00\00.\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00-\00b\00l\00o\00c\00k\00l\00o\00c\00a\00l\00s\00.\00t\00s") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $inlining-blocklocals/b (mut i32) (i32.const 2)) + (global $inlining-blocklocals/theCall_a (mut i32) (i32.const 0)) + (global $inlining-blocklocals/theCall_b (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (start $start) + (func $inlining-blocklocals/test (; 1 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $inlining-blocklocals/b + local.tee $0 + i32.const 1 + i32.add + global.set $inlining-blocklocals/b + i32.const 1 + global.set $inlining-blocklocals/theCall_a + local.get $0 + global.set $inlining-blocklocals/theCall_b + global.get $inlining-blocklocals/theCall_a + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 16 + i32.const 16 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $inlining-blocklocals/theCall_b + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 16 + i32.const 17 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $start (; 2 ;) (type $FUNCSIG$v) + call $inlining-blocklocals/test + ) + (func $null (; 3 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/inlining-blocklocals.ts b/tests/compiler/inlining-blocklocals.ts new file mode 100644 index 0000000000..b03de78e63 --- /dev/null +++ b/tests/compiler/inlining-blocklocals.ts @@ -0,0 +1,19 @@ +var b: i32 = 2; + +var theCall_a: i32; +var theCall_b: i32; + +@inline function theCall(a: i32, b: i32): void { + theCall_a = a; + theCall_b = b; +} + +function test(): void { + var a = 1; + // no blocking: t1 = a; t2 = (t1 = b) + 1, t1; theCall ✖ + // blocking: t1 = a; t2 = (t3 = b) + 1, t3; theCall ✔ + theCall(a, b++); + assert(theCall_a == 1); + assert(theCall_b == 2); +} +test(); diff --git a/tests/compiler/inlining-blocklocals.untouched.wat b/tests/compiler/inlining-blocklocals.untouched.wat new file mode 100644 index 0000000000..9d3b327fb4 --- /dev/null +++ b/tests/compiler/inlining-blocklocals.untouched.wat @@ -0,0 +1,73 @@ +(module + (type $FUNCSIG$v (func)) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\01\00\00\00.\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00-\00b\00l\00o\00c\00k\00l\00o\00c\00a\00l\00s\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $inlining-blocklocals/b (mut i32) (i32.const 2)) + (global $inlining-blocklocals/theCall_a (mut i32) (i32.const 0)) + (global $inlining-blocklocals/theCall_b (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (start $start) + (func $inlining-blocklocals/test (; 1 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 1 + local.set $0 + block $inlining-blocklocals/theCall|inlined.0 + local.get $0 + local.set $2 + block (result i32) + global.get $inlining-blocklocals/b + local.tee $3 + i32.const 1 + i32.add + global.set $inlining-blocklocals/b + local.get $3 + end + local.set $1 + local.get $2 + global.set $inlining-blocklocals/theCall_a + local.get $1 + global.set $inlining-blocklocals/theCall_b + end + global.get $inlining-blocklocals/theCall_a + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 16 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $inlining-blocklocals/theCall_b + i32.const 2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 17 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $start:inlining-blocklocals (; 2 ;) (type $FUNCSIG$v) + call $inlining-blocklocals/test + ) + (func $start (; 3 ;) (type $FUNCSIG$v) + call $start:inlining-blocklocals + ) + (func $null (; 4 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index ea70140533..f1a4912ecf 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 48 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -145,7 +145,7 @@ if i32.const 0 i32.const 48 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 8151e451df..09c3f4f919 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -245,11 +245,11 @@ end block $inlining/Foo.method_static|inlined.0 (result i32) i32.const 42 - local.set $2 - i32.const 2 local.set $3 - local.get $2 + i32.const 2 + local.set $2 local.get $3 + local.get $2 i32.add end i32.const 44 @@ -267,12 +267,12 @@ local.set $7 block $inlining/Foo#method_this|inlined.0 (result i32) local.get $7 - local.set $3 + local.set $4 i32.const 43 - local.set $2 + local.set $3 i32.const 3 - local.set $4 - local.get $3 + local.set $2 + local.get $4 end i32.const 123 i32.eq @@ -407,7 +407,7 @@ if i32.const 0 i32.const 48 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -422,7 +422,7 @@ if i32.const 0 i32.const 48 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -447,13 +447,13 @@ (local $5 i32) block $inlining/Bar#constructor|inlined.0 (result i32) i32.const 0 - local.set $0 - i32.const 4 local.set $1 + i32.const 4 + local.set $0 block $inlining/Baz#constructor|inlined.0 (result i32) - local.get $0 + local.get $1 if (result i32) - local.get $0 + local.get $1 else block $~lib/runtime/ALLOCATE|inlined.0 (result i32) i32.const 16 @@ -466,11 +466,11 @@ i32.const 2 call $~lib/runtime/doRegister end - local.set $2 - i32.const 2 local.set $3 + i32.const 2 + local.set $2 block (result i32) - local.get $2 + local.get $3 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) @@ -485,31 +485,31 @@ i32.const 3 call $~lib/runtime/doRegister end - local.set $2 + local.set $3 end - local.get $2 + local.get $3 i32.const 1 i32.store - local.get $2 + local.get $3 i32.const 0 i32.store offset=4 - local.get $2 + local.get $3 end - local.get $3 - i32.store offset=4 local.get $2 + i32.store offset=4 + local.get $3 end - local.set $0 - local.get $0 + local.set $1 + local.get $1 i32.const 3 i32.store offset=8 - local.get $0 + local.get $1 i32.const 0 i32.store offset=12 - local.get $0 local.get $1 - i32.store offset=12 local.get $0 + i32.store offset=12 + local.get $1 end local.set $5 local.get $5 diff --git a/tests/compiler/new-without-allocator.untouched.wat b/tests/compiler/new-without-allocator.untouched.wat index 88dd8b39f3..886f4e0f88 100644 --- a/tests/compiler/new-without-allocator.untouched.wat +++ b/tests/compiler/new-without-allocator.untouched.wat @@ -57,7 +57,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -72,7 +72,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 85af8213ca..804baca181 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -302,7 +302,7 @@ if i32.const 0 i32.const 464 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -316,7 +316,7 @@ if i32.const 0 i32.const 464 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -457,32 +457,32 @@ (local $7 i32) (local $8 i32) (local $9 i64) - (local $10 i32) + (local $10 i64) (local $11 i64) (local $12 i32) - (local $13 i64) + (local $13 i32) (local $14 i64) local.get $3 local.get $1 i64.sub - local.set $11 + local.set $9 i64.const 1 i32.const 0 local.get $4 i32.sub - local.tee $10 + local.tee $12 i64.extend_i32_s - local.tee $13 + local.tee $1 i64.shl - local.tee $9 + local.tee $10 i64.const 1 i64.sub local.tee $14 local.get $3 i64.and - local.set $1 + local.set $11 local.get $3 - local.get $13 + local.get $1 i64.shr_u i32.wrap_i64 local.tee $6 @@ -490,14 +490,14 @@ local.set $8 i32.const 1628 i32.load - local.set $12 + local.set $13 loop $continue|0 local.get $8 i32.const 0 i32.gt_s if local.get $8 - local.set $2 + local.set $4 block $break|1 block $case10|1 block $case9|1 @@ -513,7 +513,7 @@ i32.const 10 i32.ne if - local.get $2 + local.get $4 i32.const 1 i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 @@ -521,7 +521,7 @@ local.get $6 i32.const 1000000000 i32.div_u - local.set $4 + local.set $2 local.get $6 i32.const 1000000000 i32.rem_u @@ -531,7 +531,7 @@ local.get $6 i32.const 100000000 i32.div_u - local.set $4 + local.set $2 local.get $6 i32.const 100000000 i32.rem_u @@ -541,7 +541,7 @@ local.get $6 i32.const 10000000 i32.div_u - local.set $4 + local.set $2 local.get $6 i32.const 10000000 i32.rem_u @@ -551,7 +551,7 @@ local.get $6 i32.const 1000000 i32.div_u - local.set $4 + local.set $2 local.get $6 i32.const 1000000 i32.rem_u @@ -561,7 +561,7 @@ local.get $6 i32.const 100000 i32.div_u - local.set $4 + local.set $2 local.get $6 i32.const 100000 i32.rem_u @@ -571,7 +571,7 @@ local.get $6 i32.const 10000 i32.div_u - local.set $4 + local.set $2 local.get $6 i32.const 10000 i32.rem_u @@ -581,7 +581,7 @@ local.get $6 i32.const 1000 i32.div_u - local.set $4 + local.set $2 local.get $6 i32.const 1000 i32.rem_u @@ -591,7 +591,7 @@ local.get $6 i32.const 100 i32.div_u - local.set $4 + local.set $2 local.get $6 i32.const 100 i32.rem_u @@ -601,7 +601,7 @@ local.get $6 i32.const 10 i32.div_u - local.set $4 + local.set $2 local.get $6 i32.const 10 i32.rem_u @@ -609,29 +609,29 @@ br $break|1 end local.get $6 - local.set $4 + local.set $2 i32.const 0 local.set $6 br $break|1 end i32.const 0 - local.set $4 + local.set $2 end - local.get $4 + local.get $2 local.get $7 i32.or if local.get $7 - local.tee $2 + local.tee $4 i32.const 1 i32.add local.set $7 - local.get $2 + local.get $4 i32.const 1 i32.shl local.get $0 i32.add - local.get $4 + local.get $2 i32.const 65535 i32.and i32.const 48 @@ -644,12 +644,12 @@ local.set $8 local.get $6 i64.extend_i32_u - local.get $10 + local.get $12 i64.extend_i32_s i64.shl - local.get $1 + local.get $11 i64.add - local.tee $3 + local.tee $1 local.get $5 i64.le_u if @@ -657,43 +657,38 @@ local.get $8 i32.add global.set $~lib/util/number/_K - local.get $5 - local.set $9 - local.get $3 - local.set $1 local.get $8 i32.const 2 i32.shl - local.get $12 + local.get $13 i32.add i64.load32_u - local.get $10 + local.get $12 i64.extend_i32_s i64.shl - local.set $3 - local.get $11 - local.set $5 + local.set $10 local.get $7 + local.tee $4 i32.const 1 i32.sub i32.const 1 i32.shl local.get $0 i32.add - local.tee $4 + local.tee $7 i32.load16_u local.set $6 loop $continue|2 block (result i32) local.get $1 - local.get $5 + local.get $9 i64.lt_u local.tee $0 if - local.get $9 + local.get $5 local.get $1 i64.sub - local.get $3 + local.get $10 i64.ge_u local.set $0 end @@ -701,21 +696,21 @@ end if (result i32) local.get $1 - local.get $3 + local.get $10 i64.add - local.get $5 + local.get $9 i64.lt_u local.tee $0 if (result i32) local.get $0 else - local.get $5 + local.get $9 local.get $1 i64.sub local.get $1 - local.get $3 + local.get $10 i64.add - local.get $5 + local.get $9 i64.sub i64.gt_u end @@ -728,16 +723,16 @@ i32.sub local.set $6 local.get $1 - local.get $3 + local.get $10 i64.add local.set $1 br $continue|2 end end - local.get $4 + local.get $7 local.get $6 i32.store16 - local.get $7 + local.get $4 return end br $continue|0 @@ -748,14 +743,14 @@ i64.const 10 i64.mul local.set $5 - local.get $1 + local.get $11 i64.const 10 i64.mul - local.tee $1 - local.get $10 + local.tee $11 + local.get $12 i64.extend_i32_s i64.shr_u - local.tee $3 + local.tee $1 local.get $7 i64.extend_i32_s i64.or @@ -763,16 +758,16 @@ i64.ne if local.get $7 - local.tee $4 + local.tee $2 i32.const 1 i32.add local.set $7 - local.get $4 + local.get $2 i32.const 1 i32.shl local.get $0 i32.add - local.get $3 + local.get $1 i32.wrap_i64 i32.const 65535 i32.and @@ -784,10 +779,10 @@ i32.const 1 i32.sub local.set $8 - local.get $1 + local.get $11 local.get $14 i64.and - local.tee $1 + local.tee $11 local.get $5 i64.ge_u br_if $continue|3 @@ -796,87 +791,85 @@ local.get $8 i32.add global.set $~lib/util/number/_K - local.get $1 - local.set $3 - local.get $9 + local.get $11 local.set $1 i32.const 0 local.get $8 i32.sub i32.const 2 i32.shl - local.get $12 + local.get $13 i32.add i64.load32_u - local.get $11 + local.get $9 i64.mul local.set $9 local.get $7 - local.tee $6 + local.tee $2 i32.const 1 i32.sub i32.const 1 i32.shl local.get $0 i32.add - local.tee $4 + local.tee $7 i32.load16_u - local.set $7 + local.set $4 loop $continue|4 block (result i32) - local.get $3 + local.get $1 local.get $9 i64.lt_u - local.tee $2 + local.tee $0 if local.get $5 - local.get $3 - i64.sub local.get $1 + i64.sub + local.get $10 i64.ge_u - local.set $2 + local.set $0 end - local.get $2 + local.get $0 end if (result i32) local.get $1 - local.get $3 + local.get $10 i64.add local.get $9 i64.lt_u - local.tee $2 + local.tee $0 if (result i32) - local.get $2 + local.get $0 else local.get $9 - local.get $3 + local.get $1 i64.sub local.get $1 - local.get $3 + local.get $10 i64.add local.get $9 i64.sub i64.gt_u end else - local.get $2 + local.get $0 end if - local.get $7 + local.get $4 i32.const 1 i32.sub - local.set $7 + local.set $4 local.get $1 - local.get $3 + local.get $10 i64.add - local.set $3 + local.set $1 br $continue|4 end end - local.get $4 local.get $7 + local.get $4 i32.store16 - local.get $6 + local.get $2 ) (func $~lib/util/memory/memcpy (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -1972,6 +1965,7 @@ (func $~lib/util/number/prettify (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $2 i32.eqz if @@ -1991,78 +1985,78 @@ local.get $1 local.get $2 i32.add - local.tee $3 - i32.le_s local.tee $4 + i32.le_s + local.tee $3 if - local.get $3 + local.get $4 i32.const 21 i32.le_s - local.set $4 + local.set $3 end - local.get $4 + local.get $3 if (result i32) local.get $1 - local.set $4 + local.set $3 loop $repeat|0 block $break|0 - local.get $4 local.get $3 + local.get $4 i32.ge_s br_if $break|0 - local.get $4 + local.get $3 i32.const 1 i32.shl local.get $0 i32.add i32.const 48 i32.store16 - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 end end - local.get $3 + local.get $4 i32.const 1 i32.shl local.get $0 i32.add i32.const 3145774 i32.store - local.get $3 + local.get $4 i32.const 2 i32.add else - local.get $3 + local.get $4 i32.const 0 i32.gt_s - local.tee $4 + local.tee $3 if - local.get $3 + local.get $4 i32.const 21 i32.le_s - local.set $4 + local.set $3 end - local.get $4 + local.get $3 if (result i32) - local.get $3 + local.get $4 i32.const 1 i32.shl local.get $0 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.add - local.get $4 + local.get $3 i32.const 0 local.get $2 i32.sub i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $4 + local.get $3 i32.const 46 i32.store16 local.get $1 @@ -2070,21 +2064,21 @@ i32.add else i32.const -6 - local.get $3 + local.get $4 i32.lt_s - local.tee $4 + local.tee $3 if - local.get $3 + local.get $4 i32.const 0 i32.le_s - local.set $4 + local.set $3 end - local.get $4 + local.get $3 if (result i32) i32.const 2 - local.get $3 + local.get $4 i32.sub - local.tee $4 + local.tee $3 i32.const 1 i32.shl local.get $0 @@ -2098,29 +2092,29 @@ i32.const 3014704 i32.store i32.const 2 - local.set $3 + local.set $5 loop $repeat|1 block $break|1 + local.get $5 local.get $3 - local.get $4 i32.ge_s br_if $break|1 - local.get $3 + local.get $5 i32.const 1 i32.shl local.get $0 i32.add i32.const 48 i32.store16 - local.get $3 + local.get $5 i32.const 1 i32.add - local.set $3 + local.set $5 br $repeat|1 end end local.get $1 - local.get $4 + local.get $3 i32.add else local.get $1 @@ -2133,9 +2127,9 @@ local.get $0 i32.const 4 i32.add - local.tee $4 + local.tee $5 block (result i32) - local.get $3 + local.get $4 i32.const 1 i32.sub local.tee $3 @@ -2156,7 +2150,7 @@ i32.add local.tee $2 call $~lib/util/number/utoa32_lut - local.get $4 + local.get $5 i32.const 45 i32.const 43 local.get $0 @@ -2191,37 +2185,37 @@ local.get $0 i32.const 4 i32.add - local.tee $0 + local.tee $3 block (result i32) - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $0 i32.const 0 i32.lt_s - local.tee $4 + local.tee $5 if i32.const 0 - local.get $3 + local.get $0 i32.sub - local.set $3 + local.set $0 end - local.get $3 + local.get $0 end - local.get $3 + local.get $0 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.tee $2 + local.tee $0 call $~lib/util/number/utoa32_lut - local.get $0 + local.get $3 i32.const 45 i32.const 43 - local.get $4 + local.get $5 select i32.store16 + local.get $0 local.get $1 - local.get $2 i32.add i32.const 2 i32.add @@ -2233,8 +2227,8 @@ (func $~lib/util/number/dtoa_core (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) - (local $3 i64) - (local $4 i32) + (local $3 i32) + (local $4 i64) (local $5 i64) (local $6 i64) (local $7 i64) @@ -2260,8 +2254,8 @@ f64.add local.tee $9 i32.trunc_f64_s - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f64.convert_i32_s local.get $9 f64.ne @@ -2270,7 +2264,7 @@ i32.shr_s i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 3 i32.shl local.tee $10 @@ -2284,14 +2278,14 @@ global.set $~lib/util/number/_frc_pow i32.const 1556 i32.load - local.get $4 + local.get $3 i32.const 1 i32.shl i32.add i32.load16_s global.set $~lib/util/number/_exp_pow global.get $~lib/util/number/_frc_pow - local.tee $5 + local.tee $6 i64.const 4294967295 i64.and local.tee $2 @@ -2299,7 +2293,7 @@ i64.mul i64.const 0 i64.add - local.tee $3 + local.tee $4 i64.const 4294967295 i64.and i64.const 0 @@ -2308,34 +2302,34 @@ i64.add i64.const 32 i64.shr_u - local.get $5 + local.get $6 i64.const 32 i64.shr_u - local.tee $6 + local.tee $7 i64.const 2147483648 i64.mul - local.get $3 + local.get $4 i64.const 32 i64.shr_u i64.add i64.add local.set $11 + local.get $7 global.get $~lib/util/number/_frc_plus - local.tee $3 + local.tee $4 i64.const 4294967295 i64.and - local.tee $7 - local.get $6 + local.tee $5 i64.mul local.get $2 local.tee $1 - local.get $3 + local.get $4 i64.const 32 i64.shr_u local.tee $2 i64.mul local.get $1 - local.get $7 + local.get $5 i64.mul i64.const 32 i64.shr_u @@ -2349,16 +2343,16 @@ i64.const 32 i64.shr_u local.get $2 - local.get $6 + local.get $7 i64.mul local.get $1 i64.const 32 i64.shr_u i64.add i64.add - local.set $1 - local.get $5 - local.tee $3 + local.set $5 + local.get $6 + local.tee $1 i64.const 4294967295 i64.and local.set $2 @@ -2366,27 +2360,27 @@ local.get $0 local.get $11 global.get $~lib/util/number/_exp_pow - local.tee $4 + local.tee $3 i32.const 2 i32.add - local.get $1 + local.get $5 i64.const 1 i64.sub - local.tee $5 - local.get $4 + local.tee $6 + local.get $3 local.get $8 i32.add i32.const -64 i32.sub - local.get $5 + local.get $6 + local.get $1 + i64.const 32 + i64.shr_u + local.tee $5 global.get $~lib/util/number/_frc_minus local.tee $1 i64.const 4294967295 i64.and - local.tee $6 - local.get $3 - i64.const 32 - i64.shr_u local.tee $7 i64.mul local.get $2 @@ -2396,12 +2390,12 @@ local.tee $1 i64.mul local.get $2 - local.get $6 + local.get $7 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $3 + local.tee $4 i64.const 4294967295 i64.and i64.add @@ -2410,9 +2404,9 @@ i64.const 32 i64.shr_u local.get $1 - local.get $7 + local.get $5 i64.mul - local.get $3 + local.get $4 i64.const 32 i64.shr_u i64.add diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 4f469d751a..f63eeacac6 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -399,7 +399,7 @@ if i32.const 0 i32.const 464 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -414,7 +414,7 @@ if i32.const 0 i32.const 464 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -470,14 +470,14 @@ local.set $4 block $~lib/util/number/utoa32_core|inlined.0 local.get $4 - local.set $3 + local.set $6 local.get $0 local.set $5 local.get $2 - local.set $6 - local.get $3 - local.get $5 + local.set $3 local.get $6 + local.get $5 + local.get $3 call $~lib/util/number/utoa32_lut end local.get $1 @@ -488,8 +488,8 @@ end block $~lib/runtime/REGISTER|inlined.0 (result i32) local.get $4 - local.set $6 - local.get $6 + local.set $3 + local.get $3 i32.const 1 call $~lib/runtime/doRegister end @@ -931,13 +931,13 @@ global.set $~lib/util/number/_K block $~lib/util/number/grisuRound|inlined.0 local.get $0 - local.set $18 - local.get $15 local.set $20 + local.get $15 + local.set $18 local.get $5 - local.set $21 + local.set $24 local.get $19 - local.set $22 + local.set $23 local.get $16 local.get $14 i32.const 2 @@ -947,11 +947,11 @@ local.get $7 i64.extend_i32_s i64.shl - local.set $23 + local.set $22 local.get $10 - local.set $24 - local.get $18 + local.set $21 local.get $20 + local.get $18 i32.const 1 i32.sub i32.const 1 @@ -963,37 +963,37 @@ local.set $26 block $break|2 loop $continue|2 - local.get $22 - local.get $24 + local.get $23 + local.get $21 i64.lt_u local.tee $27 if (result i32) - local.get $21 - local.get $22 - i64.sub + local.get $24 local.get $23 + i64.sub + local.get $22 i64.ge_u else local.get $27 end local.tee $27 if (result i32) - local.get $22 local.get $23 + local.get $22 i64.add - local.get $24 + local.get $21 i64.lt_u local.tee $27 if (result i32) local.get $27 else - local.get $24 - local.get $22 + local.get $21 + local.get $23 i64.sub - local.get $22 local.get $23 + local.get $22 i64.add - local.get $24 + local.get $21 i64.sub i64.gt_u end @@ -1006,10 +1006,10 @@ i32.const 1 i32.sub local.set $26 - local.get $22 local.get $23 + local.get $22 i64.add - local.set $22 + local.set $23 end br $continue|2 end @@ -1101,9 +1101,9 @@ local.set $10 block $~lib/util/number/grisuRound|inlined.1 local.get $0 - local.set $17 - local.get $15 local.set $26 + local.get $15 + local.set $17 local.get $5 local.set $24 local.get $13 @@ -1112,8 +1112,8 @@ local.set $22 local.get $10 local.set $21 - local.get $17 local.get $26 + local.get $17 i32.const 1 i32.sub i32.const 1 @@ -1122,13 +1122,13 @@ local.set $25 local.get $25 i32.load16_u - local.set $20 + local.set $18 block $break|4 loop $continue|4 local.get $23 local.get $21 i64.lt_u - local.tee $18 + local.tee $20 if (result i32) local.get $24 local.get $23 @@ -1136,18 +1136,18 @@ local.get $22 i64.ge_u else - local.get $18 + local.get $20 end - local.tee $18 + local.tee $20 if (result i32) local.get $23 local.get $22 i64.add local.get $21 i64.lt_u - local.tee $18 + local.tee $20 if (result i32) - local.get $18 + local.get $20 else local.get $21 local.get $23 @@ -1160,14 +1160,14 @@ i64.gt_u end else - local.get $18 + local.get $20 end if block - local.get $20 + local.get $18 i32.const 1 i32.sub - local.set $20 + local.set $18 local.get $23 local.get $22 i64.add @@ -1178,7 +1178,7 @@ end end local.get $25 - local.get $20 + local.get $18 i32.store16 end local.get $15 @@ -2394,6 +2394,8 @@ ) (func $~lib/memory/memory.copy (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 local.get $1 @@ -2406,9 +2408,9 @@ i32.add local.get $0 i32.le_u - local.tee $3 + local.tee $5 if (result i32) - local.get $3 + local.get $5 else local.get $0 local.get $2 @@ -2453,19 +2455,19 @@ local.set $2 block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -2510,19 +2512,19 @@ block block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -2821,40 +2823,40 @@ local.get $0 i32.const 4 i32.add - local.set $4 + local.set $5 local.get $3 i32.const 1 i32.sub - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.const 0 i32.lt_s local.set $6 local.get $6 if i32.const 0 - local.get $5 + local.get $4 i32.sub - local.set $5 + local.set $4 end - local.get $5 + local.get $4 call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.set $7 block $~lib/util/number/utoa32_core|inlined.1 - local.get $4 - local.set $8 local.get $5 + local.set $10 + local.get $4 local.set $9 local.get $7 - local.set $10 - local.get $8 - local.get $9 + local.set $8 local.get $10 + local.get $9 + local.get $8 call $~lib/util/number/utoa32_lut end - local.get $4 + local.get $5 i32.const 45 i32.const 43 local.get $6 @@ -2897,46 +2899,46 @@ i32.add i32.const 4 i32.add - local.set $6 + local.set $4 local.get $3 i32.const 1 i32.sub - local.set $5 - local.get $5 + local.set $6 + local.get $6 i32.const 0 i32.lt_s - local.set $4 - local.get $4 + local.set $5 + local.get $5 if i32.const 0 - local.get $5 + local.get $6 i32.sub - local.set $5 + local.set $6 end - local.get $5 + local.get $6 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $10 + local.set $8 block $~lib/util/number/utoa32_core|inlined.2 + local.get $4 + local.set $11 local.get $6 + local.set $10 + local.get $8 local.set $9 - local.get $5 - local.set $8 + local.get $11 local.get $10 - local.set $11 local.get $9 - local.get $8 - local.get $11 call $~lib/util/number/utoa32_lut end - local.get $6 + local.get $4 i32.const 45 i32.const 43 - local.get $4 + local.get $5 select i32.store16 - local.get $10 + local.get $8 end i32.add local.set $1 @@ -2999,9 +3001,9 @@ local.get $1 local.set $3 local.get $0 - local.set $4 - local.get $2 local.set $5 + local.get $2 + local.set $4 local.get $3 i64.reinterpret_f64 local.set $6 @@ -3159,22 +3161,22 @@ local.set $14 block $~lib/util/number/umul64f|inlined.0 (result i64) local.get $9 - local.set $10 - local.get $12 local.set $17 - local.get $10 + local.get $12 + local.set $10 + local.get $17 i64.const 4294967295 i64.and local.set $18 - local.get $17 + local.get $10 i64.const 4294967295 i64.and local.set $19 - local.get $10 + local.get $17 i64.const 32 i64.shr_u local.set $20 - local.get $17 + local.get $10 i64.const 32 i64.shr_u local.set $21 @@ -3221,53 +3223,53 @@ local.set $24 block $~lib/util/number/umul64e|inlined.0 (result i32) local.get $7 - local.set $15 - local.get $14 local.set $11 - local.get $15 + local.get $14 + local.set $15 local.get $11 + local.get $15 i32.add i32.const 64 i32.add end - local.set $11 + local.set $15 block $~lib/util/number/umul64f|inlined.1 (result i64) global.get $~lib/util/number/_frc_plus - local.set $23 - local.get $12 local.set $22 - local.get $23 + local.get $12 + local.set $23 + local.get $22 i64.const 4294967295 i64.and local.set $21 - local.get $22 + local.get $23 i64.const 4294967295 i64.and local.set $20 - local.get $23 + local.get $22 i64.const 32 i64.shr_u local.set $19 - local.get $22 + local.get $23 i64.const 32 i64.shr_u local.set $18 local.get $21 local.get $20 i64.mul - local.set $17 + local.set $10 local.get $19 local.get $20 i64.mul - local.get $17 + local.get $10 i64.const 32 i64.shr_u i64.add - local.set $10 + local.set $17 local.get $21 local.get $18 i64.mul - local.get $10 + local.get $17 i64.const 4294967295 i64.and i64.add @@ -3276,10 +3278,10 @@ i64.const 2147483647 i64.add local.set $25 - local.get $10 + local.get $17 i64.const 32 i64.shr_u - local.set $10 + local.set $17 local.get $25 i64.const 32 i64.shr_u @@ -3287,7 +3289,7 @@ local.get $19 local.get $18 i64.mul - local.get $10 + local.get $17 i64.add local.get $25 i64.add @@ -3297,16 +3299,16 @@ local.set $25 block $~lib/util/number/umul64e|inlined.1 (result i32) global.get $~lib/util/number/_exp - local.set $15 - local.get $14 local.set $26 - local.get $15 + local.get $14 + local.set $11 local.get $26 + local.get $11 i32.add i32.const 64 i32.add end - local.set $26 + local.set $11 block $~lib/util/number/umul64f|inlined.2 (result i64) global.get $~lib/util/number/_frc_minus local.set $10 @@ -3331,19 +3333,19 @@ local.get $18 local.get $19 i64.mul - local.set $22 + local.set $23 local.get $20 local.get $19 i64.mul - local.get $22 + local.get $23 i64.const 32 i64.shr_u i64.add - local.set $23 + local.set $22 local.get $18 local.get $21 i64.mul - local.get $23 + local.get $22 i64.const 4294967295 i64.and i64.add @@ -3352,10 +3354,10 @@ i64.const 2147483647 i64.add local.set $27 - local.get $23 + local.get $22 i64.const 32 i64.shr_u - local.set $23 + local.set $22 local.get $27 i64.const 32 i64.shr_u @@ -3363,7 +3365,7 @@ local.get $20 local.get $21 i64.mul - local.get $23 + local.get $22 i64.add local.get $27 i64.add @@ -3374,14 +3376,14 @@ local.get $25 local.get $27 i64.sub - local.set $23 - local.get $4 + local.set $22 + local.get $5 local.get $24 - local.get $11 + local.get $15 local.get $25 - local.get $26 - local.get $23 - local.get $5 + local.get $11 + local.get $22 + local.get $4 call $~lib/util/number/genDigits end local.set $28 diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index 55797952fc..c2f6e76cfe 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -106,7 +106,7 @@ if i32.const 0 i32.const 48 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -120,7 +120,7 @@ if i32.const 0 i32.const 48 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index fc9db2bd2a..20f6479859 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 48 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 48 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index bdd395848f..a7a6a8bb11 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -114,7 +114,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index 752be6bfde..cd804e59f9 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -150,7 +150,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -165,7 +165,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/allocator_arena.optimized.wat b/tests/compiler/std/allocator_arena.optimized.wat index c6cd247c22..94bd9521fa 100644 --- a/tests/compiler/std/allocator_arena.optimized.wat +++ b/tests/compiler/std/allocator_arena.optimized.wat @@ -1398,9 +1398,9 @@ i32.const 42 local.set $0 i32.const 0 - global.get $std/allocator_arena/ptr1 - local.tee $1 global.get $std/allocator_arena/ptr2 + local.tee $1 + global.get $std/allocator_arena/ptr1 local.tee $2 i32.eq br_if $~lib/util/memory/memcmp|inlined.0 @@ -1411,10 +1411,10 @@ i32.ne local.tee $3 if (result i32) - local.get $1 - i32.load8_u local.get $2 i32.load8_u + local.get $1 + i32.load8_u i32.eq else local.get $3 @@ -1424,23 +1424,23 @@ i32.const 1 i32.sub local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 local.get $2 i32.const 1 i32.add local.set $2 + local.get $1 + i32.const 1 + i32.add + local.set $1 br $continue|2 end end local.get $0 if (result i32) - local.get $1 - i32.load8_u local.get $2 i32.load8_u + local.get $1 + i32.load8_u i32.sub else i32.const 0 diff --git a/tests/compiler/std/allocator_arena.untouched.wat b/tests/compiler/std/allocator_arena.untouched.wat index 293188e421..0c8bdaf6aa 100644 --- a/tests/compiler/std/allocator_arena.untouched.wat +++ b/tests/compiler/std/allocator_arena.untouched.wat @@ -107,7 +107,8 @@ (func $~lib/memory/memory.fill (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) + (local $5 i32) + (local $6 i64) block $~lib/util/memory/memset|inlined.0 local.get $2 i32.eqz @@ -183,13 +184,13 @@ i32.sub i32.const 3 i32.and - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $2 @@ -303,13 +304,13 @@ i32.const 4 i32.and i32.add - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $4 @@ -319,7 +320,7 @@ i64.const 32 i64.shl i64.or - local.set $5 + local.set $6 block $break|0 loop $continue|0 local.get $2 @@ -328,22 +329,22 @@ if block local.get $0 - local.get $5 + local.get $6 i64.store local.get $0 i32.const 8 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 16 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 24 i32.add - local.get $5 + local.get $6 i64.store local.get $2 i32.const 32 @@ -1563,6 +1564,8 @@ ) (func $~lib/memory/memory.copy (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 local.get $1 @@ -1575,9 +1578,9 @@ i32.add local.get $0 i32.le_u - local.tee $3 + local.tee $5 if (result i32) - local.get $3 + local.get $5 else local.get $0 local.get $2 @@ -1622,19 +1625,19 @@ local.set $2 block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -1679,19 +1682,19 @@ block block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -1911,19 +1914,19 @@ end block $~lib/memory/memory.compare|inlined.0 (result i32) global.get $std/allocator_arena/ptr1 - local.set $0 + local.set $2 global.get $std/allocator_arena/ptr2 local.set $1 global.get $std/allocator_arena/size - local.set $2 + local.set $0 block $~lib/util/memory/memcmp|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $4 local.get $2 local.set $5 - local.get $3 + local.get $1 + local.set $4 + local.get $0 + local.set $3 + local.get $5 local.get $4 i32.eq if @@ -1932,12 +1935,12 @@ end block $break|2 loop $continue|2 - local.get $5 + local.get $3 i32.const 0 i32.ne local.tee $6 if (result i32) - local.get $3 + local.get $5 i32.load8_u local.get $4 i32.load8_u @@ -1947,14 +1950,14 @@ end if block - local.get $5 + local.get $3 i32.const 1 i32.sub - local.set $5 - local.get $3 + local.set $3 + local.get $5 i32.const 1 i32.add - local.set $3 + local.set $5 local.get $4 i32.const 1 i32.add @@ -1964,9 +1967,9 @@ end end end - local.get $5 + local.get $3 if (result i32) - local.get $3 + local.get $5 i32.load8_u local.get $4 i32.load8_u diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 238ad2f4b8..00f7cf0646 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -374,7 +374,7 @@ if i32.const 0 i32.const 224 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -388,7 +388,7 @@ if i32.const 0 i32.const 224 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -436,7 +436,7 @@ if i32.const 0 i32.const 224 - i32.const 233 + i32.const 251 i32.const 57 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 94995810b7..ceb8495605 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -209,7 +209,8 @@ (func $~lib/memory/memory.fill (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) + (local $5 i32) + (local $6 i64) block $~lib/util/memory/memset|inlined.0 local.get $2 i32.eqz @@ -285,13 +286,13 @@ i32.sub i32.const 3 i32.and - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $2 @@ -405,13 +406,13 @@ i32.const 4 i32.and i32.add - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $4 @@ -421,7 +422,7 @@ i64.const 32 i64.shl i64.or - local.set $5 + local.set $6 block $break|0 loop $continue|0 local.get $2 @@ -430,22 +431,22 @@ if block local.get $0 - local.get $5 + local.get $6 i64.store local.get $0 i32.const 8 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 16 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 24 i32.add - local.get $5 + local.get $6 i64.store local.get $2 i32.const 32 @@ -470,7 +471,7 @@ if i32.const 0 i32.const 224 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -485,7 +486,7 @@ if i32.const 0 i32.const 224 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -545,7 +546,7 @@ if i32.const 0 i32.const 224 - i32.const 233 + i32.const 251 i32.const 57 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index ade649cde2..81675dfde0 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -601,7 +601,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -615,7 +615,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -663,7 +663,7 @@ if i32.const 0 i32.const 16 - i32.const 233 + i32.const 251 i32.const 57 call $~lib/env/abort unreachable @@ -5157,20 +5157,20 @@ local.get $0 return end - local.get $3 + local.get $1 local.set $4 local.get $2 i32.const 256 i32.lt_s if - local.get $4 + local.get $3 local.get $2 - local.get $1 + local.get $4 call $~lib/util/sort/insertionSort else - local.get $4 + local.get $3 local.get $2 - local.get $1 + local.get $4 call $~lib/util/sort/weakHeapSort end local.get $0 @@ -6733,44 +6733,44 @@ ) (func $~lib/util/number/genDigits (; 128 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) + (local $8 i64) + (local $9 i32) + (local $10 i64) (local $11 i64) (local $12 i32) - (local $13 i64) + (local $13 i32) (local $14 i64) local.get $3 local.get $1 i64.sub - local.set $11 + local.set $8 i64.const 1 i32.const 0 local.get $4 i32.sub - local.tee $10 + local.tee $12 i64.extend_i32_s - local.tee $13 + local.tee $1 i64.shl - local.tee $9 + local.tee $10 i64.const 1 i64.sub local.tee $14 local.get $3 i64.and - local.set $1 + local.set $11 local.get $3 - local.get $13 + local.get $1 i64.shr_u i32.wrap_i64 local.tee $7 call $~lib/util/number/decimalCount32 - local.set $8 + local.set $9 i32.const 5412 i32.load - local.set $12 + local.set $13 loop $continue|0 - local.get $8 + local.get $9 i32.const 0 i32.gt_s if @@ -6785,12 +6785,12 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $8 - local.tee $2 + local.get $9 + local.tee $4 i32.const 10 i32.ne if - local.get $2 + local.get $4 i32.const 1 i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 @@ -6798,7 +6798,7 @@ local.get $7 i32.const 1000000000 i32.div_u - local.set $4 + local.set $2 local.get $7 i32.const 1000000000 i32.rem_u @@ -6808,7 +6808,7 @@ local.get $7 i32.const 100000000 i32.div_u - local.set $4 + local.set $2 local.get $7 i32.const 100000000 i32.rem_u @@ -6818,7 +6818,7 @@ local.get $7 i32.const 10000000 i32.div_u - local.set $4 + local.set $2 local.get $7 i32.const 10000000 i32.rem_u @@ -6828,7 +6828,7 @@ local.get $7 i32.const 1000000 i32.div_u - local.set $4 + local.set $2 local.get $7 i32.const 1000000 i32.rem_u @@ -6838,7 +6838,7 @@ local.get $7 i32.const 100000 i32.div_u - local.set $4 + local.set $2 local.get $7 i32.const 100000 i32.rem_u @@ -6848,7 +6848,7 @@ local.get $7 i32.const 10000 i32.div_u - local.set $4 + local.set $2 local.get $7 i32.const 10000 i32.rem_u @@ -6858,7 +6858,7 @@ local.get $7 i32.const 1000 i32.div_u - local.set $4 + local.set $2 local.get $7 i32.const 1000 i32.rem_u @@ -6868,7 +6868,7 @@ local.get $7 i32.const 100 i32.div_u - local.set $4 + local.set $2 local.get $7 i32.const 100 i32.rem_u @@ -6878,7 +6878,7 @@ local.get $7 i32.const 10 i32.div_u - local.set $4 + local.set $2 local.get $7 i32.const 10 i32.rem_u @@ -6886,110 +6886,105 @@ br $break|1 end local.get $7 - local.set $4 + local.set $2 i32.const 0 local.set $7 br $break|1 end i32.const 0 - local.set $4 + local.set $2 end - local.get $4 + local.get $2 local.get $6 i32.or if local.get $6 - local.tee $2 + local.tee $4 i32.const 1 i32.add local.set $6 - local.get $2 + local.get $4 i32.const 1 i32.shl local.get $0 i32.add - local.get $4 + local.get $2 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 end - local.get $8 + local.get $9 i32.const 1 i32.sub - local.set $8 + local.set $9 local.get $7 i64.extend_i32_u - local.get $10 + local.get $12 i64.extend_i32_s i64.shl - local.get $1 + local.get $11 i64.add - local.tee $3 + local.tee $1 local.get $5 i64.le_u if global.get $~lib/util/number/_K - local.get $8 + local.get $9 i32.add global.set $~lib/util/number/_K - local.get $5 - local.set $9 - local.get $3 - local.set $1 - local.get $8 + local.get $9 i32.const 2 i32.shl - local.get $12 + local.get $13 i32.add i64.load32_u - local.get $10 + local.get $12 i64.extend_i32_s i64.shl - local.set $3 - local.get $11 - local.set $5 + local.set $10 local.get $6 + local.tee $4 i32.const 1 i32.sub i32.const 1 i32.shl local.get $0 i32.add - local.tee $4 + local.tee $6 i32.load16_u local.set $7 loop $continue|2 local.get $1 - local.get $5 + local.get $8 i64.lt_u local.tee $0 if - local.get $9 + local.get $5 local.get $1 i64.sub - local.get $3 + local.get $10 i64.ge_u local.set $0 end local.get $0 if local.get $1 - local.get $3 + local.get $10 i64.add - local.get $5 + local.get $8 i64.lt_u local.tee $0 i32.eqz if - local.get $5 + local.get $8 local.get $1 i64.sub local.get $1 - local.get $3 + local.get $10 i64.add - local.get $5 + local.get $8 i64.sub i64.gt_u local.set $0 @@ -7002,16 +6997,16 @@ i32.sub local.set $7 local.get $1 - local.get $3 + local.get $10 i64.add local.set $1 br $continue|2 end end - local.get $4 + local.get $6 local.get $7 i32.store16 - local.get $6 + local.get $4 return end br $continue|0 @@ -7022,14 +7017,14 @@ i64.const 10 i64.mul local.set $5 - local.get $1 + local.get $11 i64.const 10 i64.mul - local.tee $1 - local.get $10 + local.tee $11 + local.get $12 i64.extend_i32_s i64.shr_u - local.tee $3 + local.tee $1 local.get $6 i64.extend_i32_s i64.or @@ -7037,16 +7032,16 @@ i64.ne if local.get $6 - local.tee $4 + local.tee $2 i32.const 1 i32.add local.set $6 - local.get $4 + local.get $2 i32.const 1 i32.shl local.get $0 i32.add - local.get $3 + local.get $1 i32.wrap_i64 i32.const 65535 i32.and @@ -7054,104 +7049,103 @@ i32.add i32.store16 end - local.get $8 + local.get $9 i32.const 1 i32.sub - local.set $8 - local.get $1 + local.set $9 + local.get $11 local.get $14 i64.and - local.tee $1 + local.tee $11 local.get $5 i64.ge_u br_if $continue|3 global.get $~lib/util/number/_K - local.get $8 + local.get $9 i32.add global.set $~lib/util/number/_K - local.get $1 - local.set $3 - local.get $9 + local.get $11 local.set $1 i32.const 0 - local.get $8 + local.get $9 i32.sub i32.const 2 i32.shl - local.get $12 + local.get $13 i32.add i64.load32_u - local.get $11 + local.get $8 i64.mul - local.set $9 + local.set $8 local.get $6 - local.tee $7 + local.tee $2 i32.const 1 i32.sub i32.const 1 i32.shl local.get $0 i32.add - local.tee $4 + local.tee $6 i32.load16_u - local.set $6 + local.set $4 loop $continue|4 - local.get $3 - local.get $9 + local.get $1 + local.get $8 i64.lt_u - local.tee $2 + local.tee $0 if local.get $5 - local.get $3 - i64.sub local.get $1 + i64.sub + local.get $10 i64.ge_u - local.set $2 + local.set $0 end - local.get $2 + local.get $0 if local.get $1 - local.get $3 + local.get $10 i64.add - local.get $9 + local.get $8 i64.lt_u - local.tee $2 + local.tee $0 i32.eqz if - local.get $9 - local.get $3 + local.get $8 + local.get $1 i64.sub local.get $1 - local.get $3 + local.get $10 i64.add - local.get $9 + local.get $8 i64.sub i64.gt_u - local.set $2 + local.set $0 end end - local.get $2 + local.get $0 if - local.get $6 + local.get $4 i32.const 1 i32.sub - local.set $6 + local.set $4 local.get $1 - local.get $3 + local.get $10 i64.add - local.set $3 + local.set $1 br $continue|4 end end - local.get $4 local.get $6 + local.get $4 i32.store16 - local.get $7 + local.get $2 end ) (func $~lib/util/number/prettify (; 129 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $2 i32.eqz if @@ -7171,78 +7165,78 @@ local.get $1 local.get $2 i32.add - local.tee $3 - i32.le_s local.tee $4 + i32.le_s + local.tee $3 if - local.get $3 + local.get $4 i32.const 21 i32.le_s - local.set $4 + local.set $3 end - local.get $4 + local.get $3 if (result i32) local.get $1 - local.set $4 + local.set $3 loop $repeat|0 block $break|0 - local.get $4 local.get $3 + local.get $4 i32.ge_s br_if $break|0 - local.get $4 + local.get $3 i32.const 1 i32.shl local.get $0 i32.add i32.const 48 i32.store16 - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 end end - local.get $3 + local.get $4 i32.const 1 i32.shl local.get $0 i32.add i32.const 3145774 i32.store - local.get $3 + local.get $4 i32.const 2 i32.add else - local.get $3 + local.get $4 i32.const 0 i32.gt_s - local.tee $4 + local.tee $3 if - local.get $3 + local.get $4 i32.const 21 i32.le_s - local.set $4 + local.set $3 end - local.get $4 + local.get $3 if (result i32) - local.get $3 + local.get $4 i32.const 1 i32.shl local.get $0 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.add - local.get $4 + local.get $3 i32.const 0 local.get $2 i32.sub i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $4 + local.get $3 i32.const 46 i32.store16 local.get $1 @@ -7250,21 +7244,21 @@ i32.add else i32.const -6 - local.get $3 + local.get $4 i32.lt_s - local.tee $4 + local.tee $3 if - local.get $3 + local.get $4 i32.const 0 i32.le_s - local.set $4 + local.set $3 end - local.get $4 + local.get $3 if (result i32) i32.const 2 - local.get $3 + local.get $4 i32.sub - local.tee $4 + local.tee $3 i32.const 1 i32.shl local.get $0 @@ -7278,29 +7272,29 @@ i32.const 3014704 i32.store i32.const 2 - local.set $3 + local.set $5 loop $repeat|1 block $break|1 + local.get $5 local.get $3 - local.get $4 i32.ge_s br_if $break|1 - local.get $3 + local.get $5 i32.const 1 i32.shl local.get $0 i32.add i32.const 48 i32.store16 - local.get $3 + local.get $5 i32.const 1 i32.add - local.set $3 + local.set $5 br $repeat|1 end end local.get $1 - local.get $4 + local.get $3 i32.add else local.get $1 @@ -7313,9 +7307,9 @@ local.get $0 i32.const 4 i32.add - local.tee $4 + local.tee $5 block (result i32) - local.get $3 + local.get $4 i32.const 1 i32.sub local.tee $3 @@ -7336,7 +7330,7 @@ i32.add local.tee $2 call $~lib/util/number/utoa32_lut - local.get $4 + local.get $5 i32.const 45 i32.const 43 local.get $0 @@ -7371,37 +7365,37 @@ local.get $0 i32.const 4 i32.add - local.tee $0 + local.tee $3 block (result i32) - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $0 i32.const 0 i32.lt_s - local.tee $4 + local.tee $5 if i32.const 0 - local.get $3 + local.get $0 i32.sub - local.set $3 + local.set $0 end - local.get $3 + local.get $0 end - local.get $3 + local.get $0 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.tee $2 + local.tee $0 call $~lib/util/number/utoa32_lut - local.get $0 + local.get $3 i32.const 45 i32.const 43 - local.get $4 + local.get $5 select i32.store16 + local.get $0 local.get $1 - local.get $2 i32.add i32.const 2 i32.add @@ -7411,8 +7405,8 @@ end ) (func $~lib/util/number/dtoa_core (; 130 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i64) (local $5 i64) (local $6 i64) @@ -7420,14 +7414,13 @@ (local $8 i32) (local $9 i64) (local $10 i64) - (local $11 i64) - (local $12 i32) + (local $11 i32) + (local $12 i64) (local $13 i64) - (local $14 i64) local.get $1 f64.const 0 f64.lt - local.tee $12 + local.tee $11 if (result f64) local.get $0 i32.const 45 @@ -7438,14 +7431,14 @@ local.get $1 end i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 9218868437227405312 i64.and i64.const 52 i64.shr_u i32.wrap_i64 local.set $7 - local.get $3 + local.get $2 i64.const 4503599627370495 i64.and local.get $7 @@ -7456,7 +7449,7 @@ i64.const 52 i64.shl i64.add - local.tee $3 + local.tee $2 i64.const 1 i64.shl i64.const 1 @@ -7464,9 +7457,9 @@ local.tee $5 i64.clz i32.wrap_i64 - local.set $2 + local.set $3 local.get $5 - local.get $2 + local.get $3 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus @@ -7479,11 +7472,11 @@ local.tee $7 i32.const 1 i32.sub - local.get $2 - i32.sub - local.set $2 - local.get $3 local.get $3 + i32.sub + local.set $3 + local.get $2 + local.get $2 i64.const 4503599627370496 i64.eq i32.const 1 @@ -7496,12 +7489,12 @@ local.get $7 local.get $8 i32.sub - local.get $2 + local.get $3 i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus - local.get $2 + local.get $3 global.set $~lib/util/number/_exp i32.const 348 i32.const -61 @@ -7514,8 +7507,8 @@ f64.add local.tee $1 i32.trunc_f64_s - local.tee $2 - local.get $2 + local.tee $3 + local.get $3 f64.convert_i32_s local.get $1 f64.ne @@ -7524,7 +7517,7 @@ i32.shr_s i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 3 i32.shl local.tee $8 @@ -7538,20 +7531,20 @@ global.set $~lib/util/number/_frc_pow i32.const 5340 i32.load - local.get $2 + local.get $3 i32.const 1 i32.shl i32.add i32.load16_s global.set $~lib/util/number/_exp_pow - local.get $3 - local.get $3 + local.get $2 + local.get $2 i64.clz i32.wrap_i64 - local.tee $2 + local.tee $3 i64.extend_i32_s i64.shl - local.tee $3 + local.tee $2 i64.const 4294967295 i64.and local.tee $9 @@ -7565,13 +7558,13 @@ local.get $5 i64.const 32 i64.shr_u - local.tee $11 + local.tee $6 local.get $9 i64.mul - local.get $3 + local.get $2 i64.const 32 i64.shr_u - local.tee $6 + local.tee $2 local.get $10 i64.mul local.get $4 @@ -7586,43 +7579,43 @@ i64.add i64.const 32 i64.shr_u + local.get $2 local.get $6 - local.get $11 i64.mul local.get $4 i64.const 32 i64.shr_u i64.add i64.add - local.set $14 + local.set $13 local.get $5 i64.const 4294967295 i64.and - local.tee $6 + local.tee $2 global.get $~lib/util/number/_frc_plus local.tee $4 i64.const 4294967295 i64.and - local.tee $11 + local.tee $6 i64.mul - local.set $3 - local.get $11 + local.set $12 + local.get $6 local.get $5 i64.const 32 i64.shr_u local.tee $9 i64.mul - local.get $6 + local.get $2 local.get $4 i64.const 32 i64.shr_u local.tee $10 i64.mul - local.get $3 + local.get $12 i64.const 32 i64.shr_u i64.add - local.tee $13 + local.tee $2 i64.const 4294967295 i64.and i64.add @@ -7633,19 +7626,19 @@ local.get $9 local.get $10 i64.mul - local.get $13 + local.get $2 i64.const 32 i64.shr_u i64.add i64.add local.set $6 global.get $~lib/util/number/_frc_minus - local.tee $13 + local.tee $12 i64.const 4294967295 i64.and local.tee $9 local.get $5 - local.tee $3 + local.tee $2 i64.const 4294967295 i64.and local.tee $10 @@ -7655,16 +7648,16 @@ i64.const 1 i64.sub local.tee $5 - local.get $3 + local.get $2 i64.const 32 i64.shr_u - local.tee $11 + local.tee $6 local.get $9 i64.mul - local.get $13 + local.get $12 i64.const 32 i64.shr_u - local.tee $6 + local.tee $2 local.get $10 i64.mul local.get $4 @@ -7679,8 +7672,8 @@ i64.add i64.const 32 i64.shr_u + local.get $2 local.get $6 - local.get $11 i64.mul local.get $4 i64.const 32 @@ -7691,35 +7684,35 @@ i64.add i64.sub local.set $4 - local.get $12 + local.get $11 i32.const 1 i32.shl local.get $0 i32.add local.get $0 - local.get $14 + local.get $13 local.get $7 - local.get $2 + local.get $3 i32.sub global.get $~lib/util/number/_exp_pow - local.tee $2 + local.tee $3 i32.add i32.const -64 i32.sub local.get $5 global.get $~lib/util/number/_exp - local.get $2 + local.get $3 i32.add i32.const -64 i32.sub local.get $4 - local.get $12 + local.get $11 call $~lib/util/number/genDigits - local.get $12 + local.get $11 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.get $12 + local.get $11 i32.add ) (func $~lib/util/number/dtoa (; 131 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) @@ -8797,22 +8790,22 @@ if local.get $2 i32.wrap_i64 - local.tee $1 + local.tee $3 call $~lib/util/number/decimalCount32 - local.set $3 + local.set $1 local.get $0 - local.get $1 local.get $3 + local.get $1 call $~lib/util/number/utoa32_lut else local.get $0 local.get $2 local.get $2 call $~lib/util/number/decimalCount64 - local.tee $3 + local.tee $1 call $~lib/util/number/utoa64_lut end - local.get $3 + local.get $1 ) (func $~lib/array/Array#join_int (; 147 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -9031,14 +9024,14 @@ if local.get $2 i32.wrap_i64 - local.tee $1 + local.tee $4 call $~lib/util/number/decimalCount32 local.get $3 i32.add - local.set $4 + local.set $1 local.get $0 - local.get $1 local.get $4 + local.get $1 call $~lib/util/number/utoa32_lut else local.get $0 @@ -9047,7 +9040,7 @@ call $~lib/util/number/decimalCount64 local.get $3 i32.add - local.tee $4 + local.tee $1 call $~lib/util/number/utoa64_lut end local.get $3 @@ -9056,7 +9049,7 @@ i32.const 45 i32.store16 end - local.get $4 + local.get $1 ) (func $~lib/array/Array#join_int (; 150 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index dd435298d2..45a5bbf6fa 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -410,7 +410,8 @@ (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) + (local $5 i32) + (local $6 i64) block $~lib/util/memory/memset|inlined.0 local.get $2 i32.eqz @@ -486,13 +487,13 @@ i32.sub i32.const 3 i32.and - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $2 @@ -606,13 +607,13 @@ i32.const 4 i32.and i32.add - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $4 @@ -622,7 +623,7 @@ i64.const 32 i64.shl i64.or - local.set $5 + local.set $6 block $break|0 loop $continue|0 local.get $2 @@ -631,22 +632,22 @@ if block local.get $0 - local.get $5 + local.get $6 i64.store local.get $0 i32.const 8 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 16 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 24 i32.add - local.get $5 + local.get $6 i64.store local.get $2 i32.const 32 @@ -671,7 +672,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -686,7 +687,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -746,7 +747,7 @@ if i32.const 0 i32.const 16 - i32.const 233 + i32.const 251 i32.const 57 call $~lib/env/abort unreachable @@ -2215,6 +2216,8 @@ ) (func $~lib/memory/memory.copy (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 local.get $1 @@ -2227,9 +2230,9 @@ i32.add local.get $0 i32.le_u - local.tee $3 + local.tee $5 if (result i32) - local.get $3 + local.get $5 else local.get $0 local.get $2 @@ -2274,19 +2277,19 @@ local.set $2 block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -2331,19 +2334,19 @@ block block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -2879,23 +2882,23 @@ local.set $4 block $~lib/runtime/REALLOCATE|inlined.0 (result i32) local.get $3 - local.set $5 - local.get $4 local.set $6 - local.get $5 + local.get $4 + local.set $5 local.get $6 + local.get $5 call $~lib/runtime/doReallocate end - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $3 i32.ne if local.get $0 - local.get $6 + local.get $5 i32.store local.get $0 - local.get $6 + local.get $5 i32.store offset=4 end local.get $0 @@ -5350,23 +5353,23 @@ end block $~lib/util/sort/SORT|inlined.0 local.get $3 - local.set $6 + local.set $8 local.get $2 local.set $7 local.get $1 - local.set $8 + local.set $6 local.get $7 i32.const 256 i32.lt_s if - local.get $6 - local.get $7 local.get $8 + local.get $7 + local.get $6 call $~lib/util/sort/insertionSort else - local.get $6 - local.get $7 local.get $8 + local.get $7 + local.get $6 call $~lib/util/sort/weakHeapSort end end @@ -5960,23 +5963,23 @@ end block $~lib/util/sort/SORT|inlined.0 local.get $3 - local.set $6 + local.set $8 local.get $2 local.set $7 local.get $1 - local.set $8 + local.set $6 local.get $7 i32.const 256 i32.lt_s if - local.get $6 - local.get $7 local.get $8 + local.get $7 + local.get $6 call $~lib/util/sort/insertionSort else - local.get $6 - local.get $7 local.get $8 + local.get $7 + local.get $6 call $~lib/util/sort/weakHeapSort end end @@ -6595,23 +6598,23 @@ end block $~lib/util/sort/SORT|inlined.0 local.get $3 - local.set $5 + local.set $6 local.get $2 local.set $4 local.get $1 - local.set $6 + local.set $5 local.get $4 i32.const 256 i32.lt_s if - local.get $5 - local.get $4 local.get $6 + local.get $4 + local.get $5 call $~lib/util/sort/insertionSort else - local.get $5 - local.get $4 local.get $6 + local.get $4 + local.get $5 call $~lib/util/sort/weakHeapSort end end @@ -7099,23 +7102,23 @@ end block $~lib/util/sort/SORT|inlined.0 local.get $3 - local.set $5 + local.set $6 local.get $2 local.set $4 local.get $1 - local.set $6 + local.set $5 local.get $4 i32.const 256 i32.lt_s if - local.get $5 - local.get $4 local.get $6 + local.get $4 + local.get $5 call $~lib/util/sort/insertionSort else - local.get $5 - local.get $4 local.get $6 + local.get $4 + local.get $5 call $~lib/util/sort/weakHeapSort end end @@ -7674,14 +7677,14 @@ end block $~lib/util/sort/SORT>|inlined.0 local.get $3 - local.set $5 + local.set $6 local.get $2 local.set $4 local.get $1 - local.set $6 - local.get $5 - local.get $4 + local.set $5 local.get $6 + local.get $4 + local.get $5 call $~lib/util/sort/insertionSort> end local.get $0 @@ -8038,14 +8041,14 @@ end block $~lib/util/sort/SORT>|inlined.0 local.get $3 - local.set $5 + local.set $6 local.get $2 local.set $4 local.get $1 - local.set $6 - local.get $5 - local.get $4 + local.set $5 local.get $6 + local.get $4 + local.get $5 call $~lib/util/sort/insertionSort> end local.get $0 @@ -8295,14 +8298,14 @@ end block $~lib/util/sort/SORT|inlined.0 local.get $3 - local.set $5 + local.set $6 local.get $2 local.set $4 local.get $1 - local.set $6 - local.get $5 - local.get $4 + local.set $5 local.get $6 + local.get $4 + local.get $5 call $~lib/util/sort/insertionSort end local.get $0 @@ -9486,14 +9489,14 @@ local.set $4 block $~lib/util/number/utoa32_core|inlined.0 local.get $4 - local.set $3 + local.set $6 local.get $0 local.set $5 local.get $2 - local.set $6 - local.get $3 - local.get $5 + local.set $3 local.get $6 + local.get $5 + local.get $3 call $~lib/util/number/utoa32_lut end local.get $1 @@ -9504,8 +9507,8 @@ end block $~lib/runtime/REGISTER|inlined.4 (result i32) local.get $4 - local.set $6 - local.get $6 + local.set $3 + local.get $3 i32.const 1 call $~lib/runtime/doRegister end @@ -9556,14 +9559,14 @@ local.set $3 block $~lib/util/number/utoa32_core|inlined.1 local.get $0 - local.set $5 + local.set $7 local.get $2 local.set $6 local.get $3 - local.set $7 - local.get $5 - local.get $6 + local.set $5 local.get $7 + local.get $6 + local.get $5 call $~lib/util/number/utoa32_lut end local.get $4 @@ -9752,20 +9755,20 @@ local.set $3 block $~lib/util/number/utoa32_core|inlined.2 local.get $3 - local.set $2 + local.set $5 local.get $0 local.set $4 local.get $1 - local.set $5 - local.get $2 - local.get $4 + local.set $2 local.get $5 + local.get $4 + local.get $2 call $~lib/util/number/utoa32_lut end block $~lib/runtime/REGISTER|inlined.6 (result i32) local.get $3 - local.set $5 - local.get $5 + local.set $2 + local.get $2 i32.const 1 call $~lib/runtime/doRegister end @@ -9802,14 +9805,14 @@ local.set $3 block $~lib/util/number/utoa32_core|inlined.3 local.get $0 - local.set $4 + local.set $6 local.get $2 local.set $5 local.get $3 - local.set $6 - local.get $4 - local.get $5 + local.set $4 local.get $6 + local.get $5 + local.get $4 call $~lib/util/number/utoa32_lut end local.get $3 @@ -10284,13 +10287,13 @@ global.set $~lib/util/number/_K block $~lib/util/number/grisuRound|inlined.0 local.get $0 - local.set $18 - local.get $15 local.set $20 + local.get $15 + local.set $18 local.get $5 - local.set $21 + local.set $24 local.get $19 - local.set $22 + local.set $23 local.get $16 local.get $14 i32.const 2 @@ -10300,11 +10303,11 @@ local.get $7 i64.extend_i32_s i64.shl - local.set $23 + local.set $22 local.get $10 - local.set $24 - local.get $18 + local.set $21 local.get $20 + local.get $18 i32.const 1 i32.sub i32.const 1 @@ -10316,37 +10319,37 @@ local.set $26 block $break|2 loop $continue|2 - local.get $22 - local.get $24 + local.get $23 + local.get $21 i64.lt_u local.tee $27 if (result i32) - local.get $21 - local.get $22 - i64.sub + local.get $24 local.get $23 + i64.sub + local.get $22 i64.ge_u else local.get $27 end local.tee $27 if (result i32) - local.get $22 local.get $23 + local.get $22 i64.add - local.get $24 + local.get $21 i64.lt_u local.tee $27 if (result i32) local.get $27 else - local.get $24 - local.get $22 + local.get $21 + local.get $23 i64.sub - local.get $22 local.get $23 + local.get $22 i64.add - local.get $24 + local.get $21 i64.sub i64.gt_u end @@ -10359,10 +10362,10 @@ i32.const 1 i32.sub local.set $26 - local.get $22 local.get $23 + local.get $22 i64.add - local.set $22 + local.set $23 end br $continue|2 end @@ -10454,9 +10457,9 @@ local.set $10 block $~lib/util/number/grisuRound|inlined.1 local.get $0 - local.set $17 - local.get $15 local.set $26 + local.get $15 + local.set $17 local.get $5 local.set $24 local.get $13 @@ -10465,8 +10468,8 @@ local.set $22 local.get $10 local.set $21 - local.get $17 local.get $26 + local.get $17 i32.const 1 i32.sub i32.const 1 @@ -10475,13 +10478,13 @@ local.set $25 local.get $25 i32.load16_u - local.set $20 + local.set $18 block $break|4 loop $continue|4 local.get $23 local.get $21 i64.lt_u - local.tee $18 + local.tee $20 if (result i32) local.get $24 local.get $23 @@ -10489,18 +10492,18 @@ local.get $22 i64.ge_u else - local.get $18 + local.get $20 end - local.tee $18 + local.tee $20 if (result i32) local.get $23 local.get $22 i64.add local.get $21 i64.lt_u - local.tee $18 + local.tee $20 if (result i32) - local.get $18 + local.get $20 else local.get $21 local.get $23 @@ -10513,14 +10516,14 @@ i64.gt_u end else - local.get $18 + local.get $20 end if block - local.get $20 + local.get $18 i32.const 1 i32.sub - local.set $20 + local.set $18 local.get $23 local.get $22 i64.add @@ -10531,7 +10534,7 @@ end end local.get $25 - local.get $20 + local.get $18 i32.store16 end local.get $15 @@ -10744,40 +10747,40 @@ local.get $0 i32.const 4 i32.add - local.set $4 + local.set $5 local.get $3 i32.const 1 i32.sub - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.const 0 i32.lt_s local.set $6 local.get $6 if i32.const 0 - local.get $5 + local.get $4 i32.sub - local.set $5 + local.set $4 end - local.get $5 + local.get $4 call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.set $7 block $~lib/util/number/utoa32_core|inlined.4 - local.get $4 - local.set $8 local.get $5 + local.set $10 + local.get $4 local.set $9 local.get $7 - local.set $10 - local.get $8 - local.get $9 + local.set $8 local.get $10 + local.get $9 + local.get $8 call $~lib/util/number/utoa32_lut end - local.get $4 + local.get $5 i32.const 45 i32.const 43 local.get $6 @@ -10820,46 +10823,46 @@ i32.add i32.const 4 i32.add - local.set $6 + local.set $4 local.get $3 i32.const 1 i32.sub - local.set $5 - local.get $5 + local.set $6 + local.get $6 i32.const 0 i32.lt_s - local.set $4 - local.get $4 + local.set $5 + local.get $5 if i32.const 0 - local.get $5 + local.get $6 i32.sub - local.set $5 + local.set $6 end - local.get $5 + local.get $6 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $10 + local.set $8 block $~lib/util/number/utoa32_core|inlined.5 + local.get $4 + local.set $11 local.get $6 + local.set $10 + local.get $8 local.set $9 - local.get $5 - local.set $8 + local.get $11 local.get $10 - local.set $11 local.get $9 - local.get $8 - local.get $11 call $~lib/util/number/utoa32_lut end - local.get $6 + local.get $4 i32.const 45 i32.const 43 - local.get $4 + local.get $5 select i32.store16 - local.get $10 + local.get $8 end i32.add local.set $1 @@ -10922,9 +10925,9 @@ local.get $1 local.set $3 local.get $0 - local.set $4 - local.get $2 local.set $5 + local.get $2 + local.set $4 local.get $3 i64.reinterpret_f64 local.set $6 @@ -11082,22 +11085,22 @@ local.set $14 block $~lib/util/number/umul64f|inlined.0 (result i64) local.get $9 - local.set $10 - local.get $12 local.set $17 - local.get $10 + local.get $12 + local.set $10 + local.get $17 i64.const 4294967295 i64.and local.set $18 - local.get $17 + local.get $10 i64.const 4294967295 i64.and local.set $19 - local.get $10 + local.get $17 i64.const 32 i64.shr_u local.set $20 - local.get $17 + local.get $10 i64.const 32 i64.shr_u local.set $21 @@ -11144,53 +11147,53 @@ local.set $24 block $~lib/util/number/umul64e|inlined.0 (result i32) local.get $7 - local.set $15 - local.get $14 local.set $11 - local.get $15 + local.get $14 + local.set $15 local.get $11 + local.get $15 i32.add i32.const 64 i32.add end - local.set $11 + local.set $15 block $~lib/util/number/umul64f|inlined.1 (result i64) global.get $~lib/util/number/_frc_plus - local.set $23 - local.get $12 local.set $22 - local.get $23 + local.get $12 + local.set $23 + local.get $22 i64.const 4294967295 i64.and local.set $21 - local.get $22 + local.get $23 i64.const 4294967295 i64.and local.set $20 - local.get $23 + local.get $22 i64.const 32 i64.shr_u local.set $19 - local.get $22 + local.get $23 i64.const 32 i64.shr_u local.set $18 local.get $21 local.get $20 i64.mul - local.set $17 + local.set $10 local.get $19 local.get $20 i64.mul - local.get $17 + local.get $10 i64.const 32 i64.shr_u i64.add - local.set $10 + local.set $17 local.get $21 local.get $18 i64.mul - local.get $10 + local.get $17 i64.const 4294967295 i64.and i64.add @@ -11199,10 +11202,10 @@ i64.const 2147483647 i64.add local.set $25 - local.get $10 + local.get $17 i64.const 32 i64.shr_u - local.set $10 + local.set $17 local.get $25 i64.const 32 i64.shr_u @@ -11210,7 +11213,7 @@ local.get $19 local.get $18 i64.mul - local.get $10 + local.get $17 i64.add local.get $25 i64.add @@ -11220,16 +11223,16 @@ local.set $25 block $~lib/util/number/umul64e|inlined.1 (result i32) global.get $~lib/util/number/_exp - local.set $15 - local.get $14 local.set $26 - local.get $15 + local.get $14 + local.set $11 local.get $26 + local.get $11 i32.add i32.const 64 i32.add end - local.set $26 + local.set $11 block $~lib/util/number/umul64f|inlined.2 (result i64) global.get $~lib/util/number/_frc_minus local.set $10 @@ -11254,19 +11257,19 @@ local.get $18 local.get $19 i64.mul - local.set $22 + local.set $23 local.get $20 local.get $19 i64.mul - local.get $22 + local.get $23 i64.const 32 i64.shr_u i64.add - local.set $23 + local.set $22 local.get $18 local.get $21 i64.mul - local.get $23 + local.get $22 i64.const 4294967295 i64.and i64.add @@ -11275,10 +11278,10 @@ i64.const 2147483647 i64.add local.set $27 - local.get $23 + local.get $22 i64.const 32 i64.shr_u - local.set $23 + local.set $22 local.get $27 i64.const 32 i64.shr_u @@ -11286,7 +11289,7 @@ local.get $20 local.get $21 i64.mul - local.get $23 + local.get $22 i64.add local.get $27 i64.add @@ -11297,14 +11300,14 @@ local.get $25 local.get $27 i64.sub - local.set $23 - local.get $4 + local.set $22 + local.get $5 local.get $24 - local.get $11 + local.get $15 local.get $25 - local.get $26 - local.get $23 - local.get $5 + local.get $11 + local.get $22 + local.get $4 call $~lib/util/number/genDigits end local.set $28 @@ -12088,7 +12091,7 @@ local.set $3 block $~lib/util/number/utoa32_core|inlined.6 local.get $0 - local.set $5 + local.set $7 local.get $2 i32.const 24 i32.shl @@ -12096,10 +12099,10 @@ i32.shr_s local.set $6 local.get $3 - local.set $7 - local.get $5 - local.get $6 + local.set $5 local.get $7 + local.get $6 + local.get $5 call $~lib/util/number/utoa32_lut end local.get $4 @@ -12305,16 +12308,16 @@ local.set $3 block $~lib/util/number/utoa32_core|inlined.7 local.get $0 - local.set $4 + local.set $6 local.get $2 i32.const 65535 i32.and local.set $5 local.get $3 - local.set $6 - local.get $4 - local.get $5 + local.set $4 local.get $6 + local.get $5 + local.get $4 call $~lib/util/number/utoa32_lut end local.get $3 @@ -12709,14 +12712,14 @@ local.set $1 block $~lib/util/number/utoa32_core|inlined.8 local.get $1 - local.set $4 + local.set $6 local.get $2 local.set $5 local.get $3 - local.set $6 - local.get $4 - local.get $5 + local.set $4 local.get $6 + local.get $5 + local.get $4 call $~lib/util/number/utoa32_lut end else @@ -12734,14 +12737,14 @@ local.set $1 block $~lib/util/number/utoa64_core|inlined.0 local.get $1 - local.set $2 + local.set $4 local.get $0 local.set $7 local.get $3 - local.set $6 - local.get $2 + local.set $2 + local.get $4 local.get $7 - local.get $6 + local.get $2 call $~lib/util/number/utoa64_lut end end @@ -12795,14 +12798,14 @@ local.set $3 block $~lib/util/number/utoa32_core|inlined.9 local.get $0 - local.set $5 + local.set $7 local.get $4 local.set $6 local.get $3 - local.set $7 - local.get $5 - local.get $6 + local.set $5 local.get $7 + local.get $6 + local.get $5 call $~lib/util/number/utoa32_lut end else @@ -12811,14 +12814,14 @@ local.set $3 block $~lib/util/number/utoa64_core|inlined.1 local.get $0 - local.set $4 + local.set $5 local.get $2 local.set $8 local.get $3 - local.set $7 - local.get $4 + local.set $4 + local.get $5 local.get $8 - local.get $7 + local.get $4 call $~lib/util/number/utoa64_lut end end @@ -13031,14 +13034,14 @@ local.set $2 block $~lib/util/number/utoa32_core|inlined.10 local.get $2 - local.set $5 + local.set $7 local.get $3 local.set $6 local.get $4 - local.set $7 - local.get $5 - local.get $6 + local.set $5 local.get $7 + local.get $6 + local.get $5 call $~lib/util/number/utoa32_lut end else @@ -13058,14 +13061,14 @@ local.set $2 block $~lib/util/number/utoa64_core|inlined.2 local.get $2 - local.set $3 + local.set $5 local.get $0 local.set $8 local.get $4 - local.set $7 - local.get $3 + local.set $3 + local.get $5 local.get $8 - local.get $7 + local.get $3 call $~lib/util/number/utoa64_lut end end @@ -13139,14 +13142,14 @@ local.set $3 block $~lib/util/number/utoa32_core|inlined.11 local.get $0 - local.set $6 + local.set $8 local.get $5 local.set $7 local.get $3 - local.set $8 - local.get $6 - local.get $7 + local.set $6 local.get $8 + local.get $7 + local.get $6 call $~lib/util/number/utoa32_lut end else @@ -13157,14 +13160,14 @@ local.set $3 block $~lib/util/number/utoa64_core|inlined.3 local.get $0 - local.set $5 + local.set $6 local.get $2 local.set $9 local.get $3 - local.set $8 - local.get $5 + local.set $5 + local.get $6 local.get $9 - local.get $8 + local.get $5 call $~lib/util/number/utoa64_lut end end @@ -13520,16 +13523,16 @@ local.set $3 block $~lib/util/number/utoa32_core|inlined.12 local.get $0 - local.set $4 + local.set $6 local.get $2 i32.const 255 i32.and local.set $5 local.get $3 - local.set $6 - local.get $4 - local.get $5 + local.set $4 local.get $6 + local.get $5 + local.get $4 call $~lib/util/number/utoa32_lut end local.get $3 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index ca63c55787..ab1b14bc25 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -326,7 +326,7 @@ if i32.const 0 i32.const 64 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -340,7 +340,7 @@ if i32.const 0 i32.const 64 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -1552,7 +1552,7 @@ if i32.const 0 i32.const 64 - i32.const 233 + i32.const 251 i32.const 57 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index ff9b3ed33e..234c9b46a3 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -147,7 +147,8 @@ (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) + (local $5 i32) + (local $6 i64) block $~lib/util/memory/memset|inlined.0 local.get $2 i32.eqz @@ -223,13 +224,13 @@ i32.sub i32.const 3 i32.and - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $2 @@ -343,13 +344,13 @@ i32.const 4 i32.and i32.add - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $4 @@ -359,7 +360,7 @@ i64.const 32 i64.shl i64.or - local.set $5 + local.set $6 block $break|0 loop $continue|0 local.get $2 @@ -368,22 +369,22 @@ if block local.get $0 - local.get $5 + local.get $6 i64.store local.get $0 i32.const 8 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 16 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 24 i32.add - local.get $5 + local.get $6 i64.store local.get $2 i32.const 32 @@ -408,7 +409,7 @@ if i32.const 0 i32.const 64 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -423,7 +424,7 @@ if i32.const 0 i32.const 64 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -1681,6 +1682,8 @@ ) (func $~lib/memory/memory.copy (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 local.get $1 @@ -1693,9 +1696,9 @@ i32.add local.get $0 i32.le_u - local.tee $3 + local.tee $5 if (result i32) - local.get $3 + local.get $5 else local.get $0 local.get $2 @@ -1740,19 +1743,19 @@ local.set $2 block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -1797,19 +1800,19 @@ block block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -2048,7 +2051,7 @@ if i32.const 0 i32.const 64 - i32.const 233 + i32.const 251 i32.const 57 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 892b29bac7..7da2c2e4e6 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -163,7 +163,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -177,7 +177,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 8338c1e396..341c0304c4 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -153,7 +153,8 @@ (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) + (local $5 i32) + (local $6 i64) block $~lib/util/memory/memset|inlined.0 local.get $2 i32.eqz @@ -229,13 +230,13 @@ i32.sub i32.const 3 i32.and - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $2 @@ -349,13 +350,13 @@ i32.const 4 i32.and i32.add - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $4 @@ -365,7 +366,7 @@ i64.const 32 i64.shl i64.or - local.set $5 + local.set $6 block $break|0 loop $continue|0 local.get $2 @@ -374,22 +375,22 @@ if block local.get $0 - local.get $5 + local.get $6 i64.store local.get $0 i32.const 8 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 16 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 24 i32.add - local.get $5 + local.get $6 i64.store local.get $2 i32.const 32 @@ -414,7 +415,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -429,7 +430,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -489,7 +490,7 @@ if i32.const 0 i32.const 16 - i32.const 233 + i32.const 251 i32.const 57 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index af285a5efe..b247ef689d 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -90,7 +90,7 @@ if i32.const 0 i32.const 48 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -104,7 +104,7 @@ if i32.const 0 i32.const 48 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 789077586d..8586728975 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -150,7 +150,7 @@ if i32.const 0 i32.const 48 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -165,7 +165,7 @@ if i32.const 0 i32.const 48 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -230,25 +230,25 @@ (local $6 i64) block $~lib/date/Date.UTC|inlined.0 (result i64) i32.const 1970 - local.set $0 + local.set $5 i32.const 0 - local.set $1 + local.set $4 i32.const 1 - local.set $2 - i32.const 0 local.set $3 i32.const 0 - local.set $4 + local.set $2 i32.const 0 - local.set $5 + local.set $1 + i32.const 0 + local.set $0 i64.const 0 local.set $6 - local.get $0 - local.get $1 - local.get $2 - local.get $3 - local.get $4 local.get $5 + local.get $4 + local.get $3 + local.get $2 + local.get $1 + local.get $0 local.get $6 f64.convert_i64_s call $~lib/bindings/Date/UTC @@ -304,25 +304,25 @@ end block $~lib/date/Date.UTC|inlined.2 (result i64) i32.const 2018 - local.set $0 + local.set $5 i32.const 10 - local.set $1 + local.set $4 i32.const 10 - local.set $2 - i32.const 11 local.set $3 + i32.const 11 + local.set $2 i32.const 0 - local.set $4 + local.set $1 i32.const 0 - local.set $5 + local.set $0 i64.const 1 local.set $6 - local.get $0 - local.get $1 - local.get $2 - local.get $3 - local.get $4 local.get $5 + local.get $4 + local.get $3 + local.get $2 + local.get $1 + local.get $0 local.get $6 f64.convert_i64_s call $~lib/bindings/Date/UTC diff --git a/tests/compiler/std/libm.untouched.wat b/tests/compiler/std/libm.untouched.wat index 1c951af01a..5d0679607f 100644 --- a/tests/compiler/std/libm.untouched.wat +++ b/tests/compiler/std/libm.untouched.wat @@ -3439,22 +3439,22 @@ (local $2 f64) (local $3 f64) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 local.get $3 + local.get $2 f64.max ) (func $std/libm/min (; 47 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 local.get $3 + local.get $2 f64.min ) (func $~lib/math/NativeMath.pow (; 48 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index b876f1ad9f..cbd7668582 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -123,7 +123,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -137,7 +137,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index c91cfcde55..772abc7c25 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -156,7 +156,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -171,7 +171,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -190,7 +190,8 @@ (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) + (local $5 i32) + (local $6 i64) block $~lib/util/memory/memset|inlined.0 local.get $2 i32.eqz @@ -266,13 +267,13 @@ i32.sub i32.const 3 i32.and - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $2 @@ -386,13 +387,13 @@ i32.const 4 i32.and i32.add - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $4 @@ -402,7 +403,7 @@ i64.const 32 i64.shl i64.or - local.set $5 + local.set $6 block $break|0 loop $continue|0 local.get $2 @@ -411,22 +412,22 @@ if block local.get $0 - local.get $5 + local.get $6 i64.store local.get $0 i32.const 8 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 16 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 24 i32.add - local.get $5 + local.get $6 i64.store local.get $2 i32.const 32 diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index 4072254d88..1b0516bbcc 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -4696,10 +4696,10 @@ local.get $0 local.set $8 local.get $1 - local.set $9 - local.get $2 local.set $10 - local.get $9 + local.get $2 + local.set $9 + local.get $10 i32.const 1305022427 i32.lt_u if @@ -4727,7 +4727,7 @@ block $~lib/math/pio2_large_quot|inlined.0 (result i32) local.get $8 local.set $11 - local.get $9 + local.get $10 local.set $12 local.get $12 i32.const 23 @@ -4859,7 +4859,7 @@ local.get $23 i32.sub local.get $23 - local.get $10 + local.get $9 select end local.set $24 @@ -7643,11 +7643,11 @@ (local $7 i32) block $~lib/math/NativeMath.max|inlined.0 (result f64) local.get $0 - local.set $5 - local.get $1 local.set $6 - local.get $5 + local.get $1 + local.set $5 local.get $6 + local.get $5 f64.max end local.get $2 @@ -7679,11 +7679,11 @@ (local $6 f32) block $~lib/math/NativeMathf.max|inlined.0 (result f32) local.get $0 - local.set $5 - local.get $1 local.set $6 - local.get $5 + local.get $1 + local.set $5 local.get $6 + local.get $5 f32.max end local.get $2 @@ -7697,11 +7697,11 @@ (local $7 i32) block $~lib/math/NativeMath.min|inlined.0 (result f64) local.get $0 - local.set $5 - local.get $1 local.set $6 - local.get $5 + local.get $1 + local.set $5 local.get $6 + local.get $5 f64.min end local.get $2 @@ -7733,11 +7733,11 @@ (local $6 f32) block $~lib/math/NativeMathf.min|inlined.0 (result f32) local.get $0 - local.set $5 - local.get $1 local.set $6 - local.get $5 + local.get $1 + local.set $5 local.get $6 + local.get $5 f32.min end local.get $2 @@ -11708,10 +11708,10 @@ local.get $0 local.set $8 local.get $1 - local.set $9 - local.get $2 local.set $10 - local.get $9 + local.get $2 + local.set $9 + local.get $10 i32.const 1305022427 i32.lt_u if @@ -11739,7 +11739,7 @@ block $~lib/math/pio2_large_quot|inlined.1 (result i32) local.get $8 local.set $11 - local.get $9 + local.get $10 local.set $12 local.get $12 i32.const 23 @@ -11871,7 +11871,7 @@ local.get $23 i32.sub local.get $23 - local.get $10 + local.get $9 select end local.set $24 @@ -12700,10 +12700,10 @@ local.get $0 local.set $11 local.get $1 - local.set $4 - local.get $2 local.set $12 - local.get $4 + local.get $2 + local.set $4 + local.get $12 i32.const 1305022427 i32.lt_u if @@ -12731,7 +12731,7 @@ block $~lib/math/pio2_large_quot|inlined.2 (result i32) local.get $11 local.set $13 - local.get $4 + local.get $12 local.set $14 local.get $14 i32.const 23 @@ -12863,7 +12863,7 @@ local.get $25 i32.sub local.get $25 - local.get $12 + local.get $4 select end local.set $26 diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 44b7c90a08..8789eb6086 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -84,7 +84,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -98,7 +98,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 4746071ebb..da0ceebc6b 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 3216562137..a832a2246f 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -167,7 +167,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -181,7 +181,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -2435,16 +2435,16 @@ call $std/operator-overloading/TesterInlineStatic#constructor global.set $std/operator-overloading/ais2 global.get $std/operator-overloading/ais1 - local.tee $0 + local.tee $1 i32.load global.get $std/operator-overloading/ais2 - local.tee $1 + local.tee $0 i32.load i32.add - local.get $0 - i32.load offset=4 local.get $1 i32.load offset=4 + local.get $0 + i32.load offset=4 i32.add call $std/operator-overloading/TesterInlineStatic#constructor global.set $std/operator-overloading/ais @@ -2452,14 +2452,14 @@ i32.load i32.const 4 i32.eq - local.tee $1 + local.tee $0 if (result i32) global.get $std/operator-overloading/ais i32.load offset=4 i32.const 6 i32.eq else - local.get $1 + local.get $0 end i32.eqz if @@ -2475,11 +2475,11 @@ call $std/operator-overloading/TesterInlineInstance#constructor global.set $std/operator-overloading/aii1 global.get $std/operator-overloading/aii1 - local.tee $1 + local.tee $0 i32.load i32.const 1 i32.add - local.get $1 + local.get $0 i32.load offset=4 i32.const 1 i32.add diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index ea13f29e14..08efa6cb52 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -211,7 +211,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -226,7 +226,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -2833,19 +2833,19 @@ global.set $std/operator-overloading/ais2 block $std/operator-overloading/TesterInlineStatic.add|inlined.0 (result i32) global.get $std/operator-overloading/ais1 - local.set $0 - global.get $std/operator-overloading/ais2 local.set $1 + global.get $std/operator-overloading/ais2 + local.set $0 i32.const 0 - local.get $0 - i32.load local.get $1 i32.load - i32.add local.get $0 - i32.load offset=4 + i32.load + i32.add local.get $1 i32.load offset=4 + local.get $0 + i32.load offset=4 i32.add call $std/operator-overloading/TesterInlineStatic#constructor end @@ -2854,14 +2854,14 @@ i32.load i32.const 4 i32.eq - local.tee $1 + local.tee $0 if (result i32) global.get $std/operator-overloading/ais i32.load offset=4 i32.const 6 i32.eq else - local.get $1 + local.get $0 end i32.eqz if @@ -2879,13 +2879,13 @@ global.set $std/operator-overloading/aii1 block $std/operator-overloading/TesterInlineInstance#postInc|inlined.0 (result i32) global.get $std/operator-overloading/aii1 - local.set $1 + local.set $0 i32.const 0 - local.get $1 + local.get $0 i32.load i32.const 1 i32.add - local.get $1 + local.get $0 i32.load offset=4 i32.const 1 i32.add diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index 4941333cee..dbe7d21bba 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -1166,8 +1166,8 @@ call $~lib/env/abort unreachable end - global.get $std/pointer/one global.get $std/pointer/two + global.get $std/pointer/one i32.add global.set $std/pointer/add global.get $std/pointer/add diff --git a/tests/compiler/std/pointer.untouched.wat b/tests/compiler/std/pointer.untouched.wat index 7c94a31b22..dfb9770502 100644 --- a/tests/compiler/std/pointer.untouched.wat +++ b/tests/compiler/std/pointer.untouched.wat @@ -23,7 +23,8 @@ (func $~lib/memory/memory.fill (; 1 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) + (local $5 i32) + (local $6 i64) block $~lib/util/memory/memset|inlined.0 local.get $2 i32.eqz @@ -99,13 +100,13 @@ i32.sub i32.const 3 i32.and - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $2 @@ -219,13 +220,13 @@ i32.const 4 i32.and i32.add - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $4 @@ -235,7 +236,7 @@ i64.const 32 i64.shl i64.or - local.set $5 + local.set $6 block $break|0 loop $continue|0 local.get $2 @@ -244,22 +245,22 @@ if block local.get $0 - local.get $5 + local.get $6 i64.store local.get $0 i32.const 8 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 16 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 24 i32.add - local.get $5 + local.get $6 i64.store local.get $2 i32.const 32 @@ -1479,6 +1480,8 @@ ) (func $~lib/memory/memory.copy (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 local.get $1 @@ -1491,9 +1494,9 @@ i32.add local.get $0 i32.le_u - local.tee $3 + local.tee $5 if (result i32) - local.get $3 + local.get $5 else local.get $0 local.get $2 @@ -1538,19 +1541,19 @@ local.set $2 block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -1595,19 +1598,19 @@ block block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -1742,10 +1745,10 @@ (local $2 f32) block $std/pointer/Pointer#constructor|inlined.0 (result i32) i32.const 0 - local.set $0 - i32.const 8 local.set $1 - local.get $1 + i32.const 8 + local.set $0 + local.get $0 end global.set $std/pointer/one block $std/pointer/Pointer#constructor|inlined.1 (result i32) @@ -1842,18 +1845,18 @@ end block $std/pointer/Pointer#add|inlined.0 (result i32) global.get $std/pointer/one - local.set $0 - global.get $std/pointer/two local.set $1 - local.get $0 + global.get $std/pointer/two + local.set $0 local.get $1 + local.get $0 i32.add end global.set $std/pointer/add block $std/pointer/Pointer#get:offset|inlined.2 (result i32) global.get $std/pointer/add - local.set $1 - local.get $1 + local.set $0 + local.get $0 end i32.const 32 i32.eq @@ -2097,11 +2100,11 @@ unreachable end block $std/pointer/Pointer#constructor|inlined.0 (result i32) - i32.const 0 - local.set $0 i32.const 0 local.set $1 - local.get $1 + i32.const 0 + local.set $0 + local.get $0 end global.set $std/pointer/buf global.get $std/pointer/buf @@ -2137,11 +2140,11 @@ end block $std/pointer/Pointer#get|inlined.1 (result f32) global.get $std/pointer/buf - local.set $0 - i32.const 1 local.set $1 - local.get $0 + i32.const 1 + local.set $0 local.get $1 + local.get $0 i32.const 4 i32.mul i32.add @@ -2183,11 +2186,11 @@ end block $std/pointer/Pointer#get|inlined.3 (result f32) global.get $std/pointer/buf - local.set $0 - i32.const 1 local.set $1 - local.get $0 + i32.const 1 + local.set $0 local.get $1 + local.get $0 i32.const 4 i32.mul i32.add @@ -2247,11 +2250,11 @@ end block $std/pointer/Pointer#get|inlined.4 (result f32) global.get $std/pointer/buf - local.set $0 - i32.const 2 local.set $1 - local.get $0 + i32.const 2 + local.set $0 local.get $1 + local.get $0 i32.const 4 i32.mul i32.add diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index acdde4446d..6d39f7a03e 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -2653,7 +2653,7 @@ if i32.const 0 i32.const 232 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -2667,7 +2667,7 @@ if i32.const 0 i32.const 232 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -2845,11 +2845,9 @@ end global.get $std/runtime/ref1 local.tee $1 + local.get $1 global.get $std/runtime/barrier1 call $~lib/runtime/doReallocate - local.set $2 - local.get $1 - local.get $2 i32.ne if i32.const 0 diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index c1a0470056..50d34f1774 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -2697,6 +2697,8 @@ ) (func $~lib/memory/memory.copy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 local.get $1 @@ -2709,9 +2711,9 @@ i32.add local.get $0 i32.le_u - local.tee $3 + local.tee $5 if (result i32) - local.get $3 + local.get $5 else local.get $0 local.get $2 @@ -2756,19 +2758,19 @@ local.set $2 block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -2813,19 +2815,19 @@ block block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -2927,7 +2929,8 @@ (func $~lib/memory/memory.fill (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) + (local $5 i32) + (local $6 i64) block $~lib/util/memory/memset|inlined.0 local.get $2 i32.eqz @@ -3003,13 +3006,13 @@ i32.sub i32.const 3 i32.and - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $2 @@ -3123,13 +3126,13 @@ i32.const 4 i32.and i32.add - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $4 @@ -3139,7 +3142,7 @@ i64.const 32 i64.shl i64.or - local.set $5 + local.set $6 block $break|0 loop $continue|0 local.get $2 @@ -3148,22 +3151,22 @@ if block local.get $0 - local.get $5 + local.get $6 i64.store local.get $0 i32.const 8 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 16 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 24 i32.add - local.get $5 + local.get $6 i64.store local.get $2 i32.const 32 @@ -3342,7 +3345,7 @@ if i32.const 0 i32.const 232 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -3357,7 +3360,7 @@ if i32.const 0 i32.const 232 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -3570,11 +3573,11 @@ global.get $std/runtime/ref1 block $~lib/runtime/REALLOCATE|inlined.0 (result i32) global.get $std/runtime/ref1 - local.set $0 - global.get $std/runtime/barrier1 local.set $1 - local.get $0 + global.get $std/runtime/barrier1 + local.set $0 local.get $1 + local.get $0 call $~lib/runtime/doReallocate end i32.eq diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 7821ac7fac..e660806a8c 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -119,7 +119,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -133,7 +133,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 5e87e83ba6..603f72dae4 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -156,7 +156,7 @@ if i32.const 0 i32.const 16 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -171,7 +171,7 @@ if i32.const 0 i32.const 16 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -190,7 +190,8 @@ (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) + (local $5 i32) + (local $6 i64) block $~lib/util/memory/memset|inlined.0 local.get $2 i32.eqz @@ -266,13 +267,13 @@ i32.sub i32.const 3 i32.and - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $2 @@ -386,13 +387,13 @@ i32.const 4 i32.and i32.add - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $4 @@ -402,7 +403,7 @@ i64.const 32 i64.shl i64.or - local.set $5 + local.set $6 block $break|0 loop $continue|0 local.get $2 @@ -411,22 +412,22 @@ if block local.get $0 - local.get $5 + local.get $6 i64.store local.get $0 i32.const 8 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 16 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 24 i32.add - local.get $5 + local.get $6 i64.store local.get $2 i32.const 32 diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index ad621033e7..7933e1633d 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -1283,6 +1283,8 @@ ) (func $~lib/memory/memory.copy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 local.get $1 @@ -1295,9 +1297,9 @@ i32.add local.get $0 i32.le_u - local.tee $3 + local.tee $5 if (result i32) - local.get $3 + local.get $5 else local.get $0 local.get $2 @@ -1342,19 +1344,19 @@ local.set $2 block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -1399,19 +1401,19 @@ block block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -1513,7 +1515,8 @@ (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) + (local $5 i32) + (local $6 i64) block $~lib/util/memory/memset|inlined.0 local.get $2 i32.eqz @@ -1589,13 +1592,13 @@ i32.sub i32.const 3 i32.and - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $2 @@ -1709,13 +1712,13 @@ i32.const 4 i32.and i32.add - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $4 @@ -1725,7 +1728,7 @@ i64.const 32 i64.shl i64.or - local.set $5 + local.set $6 block $break|0 loop $continue|0 local.get $2 @@ -1734,22 +1737,22 @@ if block local.get $0 - local.get $5 + local.get $6 i64.store local.get $0 i32.const 8 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 16 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 24 i32.add - local.get $5 + local.get $6 i64.store local.get $2 i32.const 32 @@ -1900,23 +1903,23 @@ local.set $4 block $~lib/runtime/REALLOCATE|inlined.0 (result i32) local.get $3 - local.set $5 - local.get $4 local.set $6 - local.get $5 + local.get $4 + local.set $5 local.get $6 + local.get $5 call $~lib/runtime/doReallocate end - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $3 i32.ne if local.get $0 - local.get $6 + local.get $5 i32.store local.get $0 - local.get $6 + local.get $5 i32.store offset=4 end local.get $0 diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index 3c99f9069a..17aeccc587 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -1514,7 +1514,7 @@ if i32.const 0 i32.const 136 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -1528,7 +1528,7 @@ if i32.const 0 i32.const 136 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index 9dc4016a1e..a9a73b1400 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -1686,6 +1686,8 @@ ) (func $~lib/memory/memory.copy (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 local.get $1 @@ -1698,9 +1700,9 @@ i32.add local.get $0 i32.le_u - local.tee $3 + local.tee $5 if (result i32) - local.get $3 + local.get $5 else local.get $0 local.get $2 @@ -1745,19 +1747,19 @@ local.set $2 block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -1802,19 +1804,19 @@ block block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -1926,7 +1928,7 @@ if i32.const 0 i32.const 136 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -1941,7 +1943,7 @@ if i32.const 0 i32.const 136 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 8df4d63ef1..227ab04126 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -283,7 +283,7 @@ if i32.const 0 i32.const 96 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -297,7 +297,7 @@ if i32.const 0 i32.const 96 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -3052,7 +3052,7 @@ if i32.const 0 i32.const 96 - i32.const 233 + i32.const 251 i32.const 57 call $~lib/env/abort unreachable @@ -4006,44 +4006,44 @@ ) (func $~lib/util/number/genDigits (; 46 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) + (local $8 i64) + (local $9 i32) + (local $10 i64) (local $11 i64) (local $12 i32) - (local $13 i64) + (local $13 i32) (local $14 i64) local.get $3 local.get $1 i64.sub - local.set $11 + local.set $8 i64.const 1 i32.const 0 local.get $4 i32.sub - local.tee $10 + local.tee $12 i64.extend_i32_s - local.tee $13 + local.tee $1 i64.shl - local.tee $9 + local.tee $10 i64.const 1 i64.sub local.tee $14 local.get $3 i64.and - local.set $1 + local.set $11 local.get $3 - local.get $13 + local.get $1 i64.shr_u i32.wrap_i64 local.tee $7 call $~lib/util/number/decimalCount32 - local.set $8 + local.set $9 i32.const 4108 i32.load - local.set $12 + local.set $13 loop $continue|0 - local.get $8 + local.get $9 i32.const 0 i32.gt_s if @@ -4058,12 +4058,12 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $8 - local.tee $2 + local.get $9 + local.tee $4 i32.const 10 i32.ne if - local.get $2 + local.get $4 i32.const 1 i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 @@ -4071,7 +4071,7 @@ local.get $7 i32.const 1000000000 i32.div_u - local.set $4 + local.set $2 local.get $7 i32.const 1000000000 i32.rem_u @@ -4081,7 +4081,7 @@ local.get $7 i32.const 100000000 i32.div_u - local.set $4 + local.set $2 local.get $7 i32.const 100000000 i32.rem_u @@ -4091,7 +4091,7 @@ local.get $7 i32.const 10000000 i32.div_u - local.set $4 + local.set $2 local.get $7 i32.const 10000000 i32.rem_u @@ -4101,7 +4101,7 @@ local.get $7 i32.const 1000000 i32.div_u - local.set $4 + local.set $2 local.get $7 i32.const 1000000 i32.rem_u @@ -4111,7 +4111,7 @@ local.get $7 i32.const 100000 i32.div_u - local.set $4 + local.set $2 local.get $7 i32.const 100000 i32.rem_u @@ -4121,7 +4121,7 @@ local.get $7 i32.const 10000 i32.div_u - local.set $4 + local.set $2 local.get $7 i32.const 10000 i32.rem_u @@ -4131,7 +4131,7 @@ local.get $7 i32.const 1000 i32.div_u - local.set $4 + local.set $2 local.get $7 i32.const 1000 i32.rem_u @@ -4141,7 +4141,7 @@ local.get $7 i32.const 100 i32.div_u - local.set $4 + local.set $2 local.get $7 i32.const 100 i32.rem_u @@ -4151,7 +4151,7 @@ local.get $7 i32.const 10 i32.div_u - local.set $4 + local.set $2 local.get $7 i32.const 10 i32.rem_u @@ -4159,110 +4159,105 @@ br $break|1 end local.get $7 - local.set $4 + local.set $2 i32.const 0 local.set $7 br $break|1 end i32.const 0 - local.set $4 + local.set $2 end - local.get $4 + local.get $2 local.get $6 i32.or if local.get $6 - local.tee $2 + local.tee $4 i32.const 1 i32.add local.set $6 - local.get $2 + local.get $4 i32.const 1 i32.shl local.get $0 i32.add - local.get $4 + local.get $2 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 end - local.get $8 + local.get $9 i32.const 1 i32.sub - local.set $8 + local.set $9 local.get $7 i64.extend_i32_u - local.get $10 + local.get $12 i64.extend_i32_s i64.shl - local.get $1 + local.get $11 i64.add - local.tee $3 + local.tee $1 local.get $5 i64.le_u if global.get $~lib/util/number/_K - local.get $8 + local.get $9 i32.add global.set $~lib/util/number/_K - local.get $5 - local.set $9 - local.get $3 - local.set $1 - local.get $8 + local.get $9 i32.const 2 i32.shl - local.get $12 + local.get $13 i32.add i64.load32_u - local.get $10 + local.get $12 i64.extend_i32_s i64.shl - local.set $3 - local.get $11 - local.set $5 + local.set $10 local.get $6 + local.tee $4 i32.const 1 i32.sub i32.const 1 i32.shl local.get $0 i32.add - local.tee $4 + local.tee $6 i32.load16_u local.set $7 loop $continue|2 local.get $1 - local.get $5 + local.get $8 i64.lt_u local.tee $0 if - local.get $9 + local.get $5 local.get $1 i64.sub - local.get $3 + local.get $10 i64.ge_u local.set $0 end local.get $0 if local.get $1 - local.get $3 + local.get $10 i64.add - local.get $5 + local.get $8 i64.lt_u local.tee $0 i32.eqz if - local.get $5 + local.get $8 local.get $1 i64.sub local.get $1 - local.get $3 + local.get $10 i64.add - local.get $5 + local.get $8 i64.sub i64.gt_u local.set $0 @@ -4275,16 +4270,16 @@ i32.sub local.set $7 local.get $1 - local.get $3 + local.get $10 i64.add local.set $1 br $continue|2 end end - local.get $4 + local.get $6 local.get $7 i32.store16 - local.get $6 + local.get $4 return end br $continue|0 @@ -4295,14 +4290,14 @@ i64.const 10 i64.mul local.set $5 - local.get $1 + local.get $11 i64.const 10 i64.mul - local.tee $1 - local.get $10 + local.tee $11 + local.get $12 i64.extend_i32_s i64.shr_u - local.tee $3 + local.tee $1 local.get $6 i64.extend_i32_s i64.or @@ -4310,16 +4305,16 @@ i64.ne if local.get $6 - local.tee $4 + local.tee $2 i32.const 1 i32.add local.set $6 - local.get $4 + local.get $2 i32.const 1 i32.shl local.get $0 i32.add - local.get $3 + local.get $1 i32.wrap_i64 i32.const 65535 i32.and @@ -4327,104 +4322,103 @@ i32.add i32.store16 end - local.get $8 + local.get $9 i32.const 1 i32.sub - local.set $8 - local.get $1 + local.set $9 + local.get $11 local.get $14 i64.and - local.tee $1 + local.tee $11 local.get $5 i64.ge_u br_if $continue|3 global.get $~lib/util/number/_K - local.get $8 + local.get $9 i32.add global.set $~lib/util/number/_K - local.get $1 - local.set $3 - local.get $9 + local.get $11 local.set $1 i32.const 0 - local.get $8 + local.get $9 i32.sub i32.const 2 i32.shl - local.get $12 + local.get $13 i32.add i64.load32_u - local.get $11 + local.get $8 i64.mul - local.set $9 + local.set $8 local.get $6 - local.tee $7 + local.tee $2 i32.const 1 i32.sub i32.const 1 i32.shl local.get $0 i32.add - local.tee $4 + local.tee $6 i32.load16_u - local.set $6 + local.set $4 loop $continue|4 - local.get $3 - local.get $9 + local.get $1 + local.get $8 i64.lt_u - local.tee $2 + local.tee $0 if local.get $5 - local.get $3 - i64.sub local.get $1 + i64.sub + local.get $10 i64.ge_u - local.set $2 + local.set $0 end - local.get $2 + local.get $0 if local.get $1 - local.get $3 + local.get $10 i64.add - local.get $9 + local.get $8 i64.lt_u - local.tee $2 + local.tee $0 i32.eqz if - local.get $9 - local.get $3 + local.get $8 + local.get $1 i64.sub local.get $1 - local.get $3 + local.get $10 i64.add - local.get $9 + local.get $8 i64.sub i64.gt_u - local.set $2 + local.set $0 end end - local.get $2 + local.get $0 if - local.get $6 + local.get $4 i32.const 1 i32.sub - local.set $6 + local.set $4 local.get $1 - local.get $3 + local.get $10 i64.add - local.set $3 + local.set $1 br $continue|4 end end - local.get $4 local.get $6 + local.get $4 i32.store16 - local.get $7 + local.get $2 end ) (func $~lib/util/number/prettify (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $2 i32.eqz if @@ -4444,78 +4438,78 @@ local.get $1 local.get $2 i32.add - local.tee $3 - i32.le_s local.tee $4 + i32.le_s + local.tee $3 if - local.get $3 + local.get $4 i32.const 21 i32.le_s - local.set $4 + local.set $3 end - local.get $4 + local.get $3 if (result i32) local.get $1 - local.set $4 + local.set $3 loop $repeat|0 block $break|0 - local.get $4 local.get $3 + local.get $4 i32.ge_s br_if $break|0 - local.get $4 + local.get $3 i32.const 1 i32.shl local.get $0 i32.add i32.const 48 i32.store16 - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 end end - local.get $3 + local.get $4 i32.const 1 i32.shl local.get $0 i32.add i32.const 3145774 i32.store - local.get $3 + local.get $4 i32.const 2 i32.add else - local.get $3 + local.get $4 i32.const 0 i32.gt_s - local.tee $4 + local.tee $3 if - local.get $3 + local.get $4 i32.const 21 i32.le_s - local.set $4 + local.set $3 end - local.get $4 + local.get $3 if (result i32) - local.get $3 + local.get $4 i32.const 1 i32.shl local.get $0 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.add - local.get $4 + local.get $3 i32.const 0 local.get $2 i32.sub i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $4 + local.get $3 i32.const 46 i32.store16 local.get $1 @@ -4523,21 +4517,21 @@ i32.add else i32.const -6 - local.get $3 + local.get $4 i32.lt_s - local.tee $4 + local.tee $3 if - local.get $3 + local.get $4 i32.const 0 i32.le_s - local.set $4 + local.set $3 end - local.get $4 + local.get $3 if (result i32) i32.const 2 - local.get $3 + local.get $4 i32.sub - local.tee $4 + local.tee $3 i32.const 1 i32.shl local.get $0 @@ -4551,29 +4545,29 @@ i32.const 3014704 i32.store i32.const 2 - local.set $3 + local.set $5 loop $repeat|1 block $break|1 + local.get $5 local.get $3 - local.get $4 i32.ge_s br_if $break|1 - local.get $3 + local.get $5 i32.const 1 i32.shl local.get $0 i32.add i32.const 48 i32.store16 - local.get $3 + local.get $5 i32.const 1 i32.add - local.set $3 + local.set $5 br $repeat|1 end end local.get $1 - local.get $4 + local.get $3 i32.add else local.get $1 @@ -4586,9 +4580,9 @@ local.get $0 i32.const 4 i32.add - local.tee $4 + local.tee $5 block (result i32) - local.get $3 + local.get $4 i32.const 1 i32.sub local.tee $3 @@ -4609,7 +4603,7 @@ i32.add local.tee $2 call $~lib/util/number/utoa32_lut - local.get $4 + local.get $5 i32.const 45 i32.const 43 local.get $0 @@ -4644,37 +4638,37 @@ local.get $0 i32.const 4 i32.add - local.tee $0 + local.tee $3 block (result i32) - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $0 i32.const 0 i32.lt_s - local.tee $4 + local.tee $5 if i32.const 0 - local.get $3 + local.get $0 i32.sub - local.set $3 + local.set $0 end - local.get $3 + local.get $0 end - local.get $3 + local.get $0 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.tee $2 + local.tee $0 call $~lib/util/number/utoa32_lut - local.get $0 + local.get $3 i32.const 45 i32.const 43 - local.get $4 + local.get $5 select i32.store16 + local.get $0 local.get $1 - local.get $2 i32.add i32.const 2 i32.add @@ -4684,8 +4678,8 @@ end ) (func $~lib/util/number/dtoa_core (; 48 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i64) (local $5 i64) (local $6 i64) @@ -4693,14 +4687,13 @@ (local $8 i32) (local $9 i64) (local $10 i64) - (local $11 i64) - (local $12 i32) + (local $11 i32) + (local $12 i64) (local $13 i64) - (local $14 i64) local.get $1 f64.const 0 f64.lt - local.tee $12 + local.tee $11 if (result f64) local.get $0 i32.const 45 @@ -4711,14 +4704,14 @@ local.get $1 end i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 9218868437227405312 i64.and i64.const 52 i64.shr_u i32.wrap_i64 local.set $7 - local.get $3 + local.get $2 i64.const 4503599627370495 i64.and local.get $7 @@ -4729,7 +4722,7 @@ i64.const 52 i64.shl i64.add - local.tee $3 + local.tee $2 i64.const 1 i64.shl i64.const 1 @@ -4737,9 +4730,9 @@ local.tee $5 i64.clz i32.wrap_i64 - local.set $2 + local.set $3 local.get $5 - local.get $2 + local.get $3 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus @@ -4752,11 +4745,11 @@ local.tee $7 i32.const 1 i32.sub - local.get $2 - i32.sub - local.set $2 - local.get $3 local.get $3 + i32.sub + local.set $3 + local.get $2 + local.get $2 i64.const 4503599627370496 i64.eq i32.const 1 @@ -4769,12 +4762,12 @@ local.get $7 local.get $8 i32.sub - local.get $2 + local.get $3 i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus - local.get $2 + local.get $3 global.set $~lib/util/number/_exp i32.const 348 i32.const -61 @@ -4787,8 +4780,8 @@ f64.add local.tee $1 i32.trunc_f64_s - local.tee $2 - local.get $2 + local.tee $3 + local.get $3 f64.convert_i32_s local.get $1 f64.ne @@ -4797,7 +4790,7 @@ i32.shr_s i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 3 i32.shl local.tee $8 @@ -4811,20 +4804,20 @@ global.set $~lib/util/number/_frc_pow i32.const 4036 i32.load - local.get $2 + local.get $3 i32.const 1 i32.shl i32.add i32.load16_s global.set $~lib/util/number/_exp_pow - local.get $3 - local.get $3 + local.get $2 + local.get $2 i64.clz i32.wrap_i64 - local.tee $2 + local.tee $3 i64.extend_i32_s i64.shl - local.tee $3 + local.tee $2 i64.const 4294967295 i64.and local.tee $9 @@ -4838,13 +4831,13 @@ local.get $5 i64.const 32 i64.shr_u - local.tee $11 + local.tee $6 local.get $9 i64.mul - local.get $3 + local.get $2 i64.const 32 i64.shr_u - local.tee $6 + local.tee $2 local.get $10 i64.mul local.get $4 @@ -4859,43 +4852,43 @@ i64.add i64.const 32 i64.shr_u + local.get $2 local.get $6 - local.get $11 i64.mul local.get $4 i64.const 32 i64.shr_u i64.add i64.add - local.set $14 + local.set $13 local.get $5 i64.const 4294967295 i64.and - local.tee $6 + local.tee $2 global.get $~lib/util/number/_frc_plus local.tee $4 i64.const 4294967295 i64.and - local.tee $11 + local.tee $6 i64.mul - local.set $3 - local.get $11 + local.set $12 + local.get $6 local.get $5 i64.const 32 i64.shr_u local.tee $9 i64.mul - local.get $6 + local.get $2 local.get $4 i64.const 32 i64.shr_u local.tee $10 i64.mul - local.get $3 + local.get $12 i64.const 32 i64.shr_u i64.add - local.tee $13 + local.tee $2 i64.const 4294967295 i64.and i64.add @@ -4906,19 +4899,19 @@ local.get $9 local.get $10 i64.mul - local.get $13 + local.get $2 i64.const 32 i64.shr_u i64.add i64.add local.set $6 global.get $~lib/util/number/_frc_minus - local.tee $13 + local.tee $12 i64.const 4294967295 i64.and local.tee $9 local.get $5 - local.tee $3 + local.tee $2 i64.const 4294967295 i64.and local.tee $10 @@ -4928,16 +4921,16 @@ i64.const 1 i64.sub local.tee $5 - local.get $3 + local.get $2 i64.const 32 i64.shr_u - local.tee $11 + local.tee $6 local.get $9 i64.mul - local.get $13 + local.get $12 i64.const 32 i64.shr_u - local.tee $6 + local.tee $2 local.get $10 i64.mul local.get $4 @@ -4952,8 +4945,8 @@ i64.add i64.const 32 i64.shr_u + local.get $2 local.get $6 - local.get $11 i64.mul local.get $4 i64.const 32 @@ -4964,35 +4957,35 @@ i64.add i64.sub local.set $4 - local.get $12 + local.get $11 i32.const 1 i32.shl local.get $0 i32.add local.get $0 - local.get $14 + local.get $13 local.get $7 - local.get $2 + local.get $3 i32.sub global.get $~lib/util/number/_exp_pow - local.tee $2 + local.tee $3 i32.add i32.const -64 i32.sub local.get $5 global.get $~lib/util/number/_exp - local.get $2 + local.get $3 i32.add i32.const -64 i32.sub local.get $4 - local.get $12 + local.get $11 call $~lib/util/number/genDigits - local.get $12 + local.get $11 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.get $12 + local.get $11 i32.add ) (func $~lib/string/String#substring (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index db33c25efc..e960f3eaf5 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -353,7 +353,7 @@ if i32.const 0 i32.const 96 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -368,7 +368,7 @@ if i32.const 0 i32.const 96 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -2001,6 +2001,8 @@ ) (func $~lib/memory/memory.copy (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 local.get $1 @@ -2013,9 +2015,9 @@ i32.add local.get $0 i32.le_u - local.tee $3 + local.tee $5 if (result i32) - local.get $3 + local.get $5 else local.get $0 local.get $2 @@ -2060,19 +2062,19 @@ local.set $2 block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -2117,19 +2119,19 @@ block block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -3480,7 +3482,8 @@ (func $~lib/memory/memory.fill (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) + (local $5 i32) + (local $6 i64) block $~lib/util/memory/memset|inlined.0 local.get $2 i32.eqz @@ -3556,13 +3559,13 @@ i32.sub i32.const 3 i32.and - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $2 @@ -3676,13 +3679,13 @@ i32.const 4 i32.and i32.add - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $4 @@ -3692,7 +3695,7 @@ i64.const 32 i64.shl i64.or - local.set $5 + local.set $6 block $break|0 loop $continue|0 local.get $2 @@ -3701,22 +3704,22 @@ if block local.get $0 - local.get $5 + local.get $6 i64.store local.get $0 i32.const 8 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 16 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 24 i32.add - local.get $5 + local.get $6 i64.store local.get $2 i32.const 32 @@ -3777,7 +3780,7 @@ if i32.const 0 i32.const 96 - i32.const 233 + i32.const 251 i32.const 57 call $~lib/env/abort unreachable @@ -3993,23 +3996,23 @@ local.set $4 block $~lib/runtime/REALLOCATE|inlined.0 (result i32) local.get $3 - local.set $5 - local.get $4 local.set $6 - local.get $5 + local.get $4 + local.set $5 local.get $6 + local.get $5 call $~lib/runtime/doReallocate end - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $3 i32.ne if local.get $0 - local.get $6 + local.get $5 i32.store local.get $0 - local.get $6 + local.get $5 i32.store offset=4 end local.get $0 @@ -4622,14 +4625,14 @@ local.set $4 block $~lib/util/number/utoa32_core|inlined.0 local.get $4 - local.set $3 + local.set $6 local.get $0 local.set $5 local.get $2 - local.set $6 - local.get $3 - local.get $5 + local.set $3 local.get $6 + local.get $5 + local.get $3 call $~lib/util/number/utoa32_lut end local.get $1 @@ -4640,8 +4643,8 @@ end block $~lib/runtime/REGISTER|inlined.10 (result i32) local.get $4 - local.set $6 - local.get $6 + local.set $3 + local.get $3 i32.const 1 call $~lib/runtime/doRegister end @@ -4672,20 +4675,20 @@ local.set $3 block $~lib/util/number/utoa32_core|inlined.1 local.get $3 - local.set $2 + local.set $5 local.get $0 local.set $4 local.get $1 - local.set $5 - local.get $2 - local.get $4 + local.set $2 local.get $5 + local.get $4 + local.get $2 call $~lib/util/number/utoa32_lut end block $~lib/runtime/REGISTER|inlined.11 (result i32) local.get $3 - local.set $5 - local.get $5 + local.set $2 + local.get $2 i32.const 1 call $~lib/runtime/doRegister end @@ -4923,14 +4926,14 @@ local.set $1 block $~lib/util/number/utoa32_core|inlined.2 local.get $1 - local.set $4 + local.set $6 local.get $2 local.set $5 local.get $3 - local.set $6 - local.get $4 - local.get $5 + local.set $4 local.get $6 + local.get $5 + local.get $4 call $~lib/util/number/utoa32_lut end else @@ -4948,14 +4951,14 @@ local.set $1 block $~lib/util/number/utoa64_core|inlined.0 local.get $1 - local.set $2 + local.set $4 local.get $0 local.set $7 local.get $3 - local.set $6 - local.get $2 + local.set $2 + local.get $4 local.get $7 - local.get $6 + local.get $2 call $~lib/util/number/utoa64_lut end end @@ -5017,14 +5020,14 @@ local.set $2 block $~lib/util/number/utoa32_core|inlined.3 local.get $2 - local.set $5 + local.set $7 local.get $3 local.set $6 local.get $4 - local.set $7 - local.get $5 - local.get $6 + local.set $5 local.get $7 + local.get $6 + local.get $5 call $~lib/util/number/utoa32_lut end else @@ -5044,14 +5047,14 @@ local.set $2 block $~lib/util/number/utoa64_core|inlined.1 local.get $2 - local.set $3 + local.set $5 local.get $0 local.set $8 local.get $4 - local.set $7 - local.get $3 + local.set $3 + local.get $5 local.get $8 - local.get $7 + local.get $3 call $~lib/util/number/utoa64_lut end end @@ -5392,13 +5395,13 @@ global.set $~lib/util/number/_K block $~lib/util/number/grisuRound|inlined.0 local.get $0 - local.set $18 - local.get $15 local.set $20 + local.get $15 + local.set $18 local.get $5 - local.set $21 + local.set $24 local.get $19 - local.set $22 + local.set $23 local.get $16 local.get $14 i32.const 2 @@ -5408,11 +5411,11 @@ local.get $7 i64.extend_i32_s i64.shl - local.set $23 + local.set $22 local.get $10 - local.set $24 - local.get $18 + local.set $21 local.get $20 + local.get $18 i32.const 1 i32.sub i32.const 1 @@ -5424,37 +5427,37 @@ local.set $26 block $break|2 loop $continue|2 - local.get $22 - local.get $24 + local.get $23 + local.get $21 i64.lt_u local.tee $27 if (result i32) - local.get $21 - local.get $22 - i64.sub + local.get $24 local.get $23 + i64.sub + local.get $22 i64.ge_u else local.get $27 end local.tee $27 if (result i32) - local.get $22 local.get $23 + local.get $22 i64.add - local.get $24 + local.get $21 i64.lt_u local.tee $27 if (result i32) local.get $27 else - local.get $24 - local.get $22 + local.get $21 + local.get $23 i64.sub - local.get $22 local.get $23 + local.get $22 i64.add - local.get $24 + local.get $21 i64.sub i64.gt_u end @@ -5467,10 +5470,10 @@ i32.const 1 i32.sub local.set $26 - local.get $22 local.get $23 + local.get $22 i64.add - local.set $22 + local.set $23 end br $continue|2 end @@ -5562,9 +5565,9 @@ local.set $10 block $~lib/util/number/grisuRound|inlined.1 local.get $0 - local.set $17 - local.get $15 local.set $26 + local.get $15 + local.set $17 local.get $5 local.set $24 local.get $13 @@ -5573,8 +5576,8 @@ local.set $22 local.get $10 local.set $21 - local.get $17 local.get $26 + local.get $17 i32.const 1 i32.sub i32.const 1 @@ -5583,13 +5586,13 @@ local.set $25 local.get $25 i32.load16_u - local.set $20 + local.set $18 block $break|4 loop $continue|4 local.get $23 local.get $21 i64.lt_u - local.tee $18 + local.tee $20 if (result i32) local.get $24 local.get $23 @@ -5597,18 +5600,18 @@ local.get $22 i64.ge_u else - local.get $18 + local.get $20 end - local.tee $18 + local.tee $20 if (result i32) local.get $23 local.get $22 i64.add local.get $21 i64.lt_u - local.tee $18 + local.tee $20 if (result i32) - local.get $18 + local.get $20 else local.get $21 local.get $23 @@ -5621,14 +5624,14 @@ i64.gt_u end else - local.get $18 + local.get $20 end if block - local.get $20 + local.get $18 i32.const 1 i32.sub - local.set $20 + local.set $18 local.get $23 local.get $22 i64.add @@ -5639,7 +5642,7 @@ end end local.get $25 - local.get $20 + local.get $18 i32.store16 end local.get $15 @@ -5852,40 +5855,40 @@ local.get $0 i32.const 4 i32.add - local.set $4 + local.set $5 local.get $3 i32.const 1 i32.sub - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.const 0 i32.lt_s local.set $6 local.get $6 if i32.const 0 - local.get $5 + local.get $4 i32.sub - local.set $5 + local.set $4 end - local.get $5 + local.get $4 call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.set $7 block $~lib/util/number/utoa32_core|inlined.4 - local.get $4 - local.set $8 local.get $5 + local.set $10 + local.get $4 local.set $9 local.get $7 - local.set $10 - local.get $8 - local.get $9 + local.set $8 local.get $10 + local.get $9 + local.get $8 call $~lib/util/number/utoa32_lut end - local.get $4 + local.get $5 i32.const 45 i32.const 43 local.get $6 @@ -5928,46 +5931,46 @@ i32.add i32.const 4 i32.add - local.set $6 + local.set $4 local.get $3 i32.const 1 i32.sub - local.set $5 - local.get $5 + local.set $6 + local.get $6 i32.const 0 i32.lt_s - local.set $4 - local.get $4 + local.set $5 + local.get $5 if i32.const 0 - local.get $5 + local.get $6 i32.sub - local.set $5 + local.set $6 end - local.get $5 + local.get $6 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $10 + local.set $8 block $~lib/util/number/utoa32_core|inlined.5 + local.get $4 + local.set $11 local.get $6 + local.set $10 + local.get $8 local.set $9 - local.get $5 - local.set $8 + local.get $11 local.get $10 - local.set $11 local.get $9 - local.get $8 - local.get $11 call $~lib/util/number/utoa32_lut end - local.get $6 + local.get $4 i32.const 45 i32.const 43 - local.get $4 + local.get $5 select i32.store16 - local.get $10 + local.get $8 end i32.add local.set $1 @@ -6030,9 +6033,9 @@ local.get $1 local.set $3 local.get $0 - local.set $4 - local.get $2 local.set $5 + local.get $2 + local.set $4 local.get $3 i64.reinterpret_f64 local.set $6 @@ -6190,22 +6193,22 @@ local.set $14 block $~lib/util/number/umul64f|inlined.0 (result i64) local.get $9 - local.set $10 - local.get $12 local.set $17 - local.get $10 + local.get $12 + local.set $10 + local.get $17 i64.const 4294967295 i64.and local.set $18 - local.get $17 + local.get $10 i64.const 4294967295 i64.and local.set $19 - local.get $10 + local.get $17 i64.const 32 i64.shr_u local.set $20 - local.get $17 + local.get $10 i64.const 32 i64.shr_u local.set $21 @@ -6252,53 +6255,53 @@ local.set $24 block $~lib/util/number/umul64e|inlined.0 (result i32) local.get $7 - local.set $15 - local.get $14 local.set $11 - local.get $15 + local.get $14 + local.set $15 local.get $11 + local.get $15 i32.add i32.const 64 i32.add end - local.set $11 + local.set $15 block $~lib/util/number/umul64f|inlined.1 (result i64) global.get $~lib/util/number/_frc_plus - local.set $23 - local.get $12 local.set $22 - local.get $23 + local.get $12 + local.set $23 + local.get $22 i64.const 4294967295 i64.and local.set $21 - local.get $22 + local.get $23 i64.const 4294967295 i64.and local.set $20 - local.get $23 + local.get $22 i64.const 32 i64.shr_u local.set $19 - local.get $22 + local.get $23 i64.const 32 i64.shr_u local.set $18 local.get $21 local.get $20 i64.mul - local.set $17 + local.set $10 local.get $19 local.get $20 i64.mul - local.get $17 + local.get $10 i64.const 32 i64.shr_u i64.add - local.set $10 + local.set $17 local.get $21 local.get $18 i64.mul - local.get $10 + local.get $17 i64.const 4294967295 i64.and i64.add @@ -6307,10 +6310,10 @@ i64.const 2147483647 i64.add local.set $25 - local.get $10 + local.get $17 i64.const 32 i64.shr_u - local.set $10 + local.set $17 local.get $25 i64.const 32 i64.shr_u @@ -6318,7 +6321,7 @@ local.get $19 local.get $18 i64.mul - local.get $10 + local.get $17 i64.add local.get $25 i64.add @@ -6328,16 +6331,16 @@ local.set $25 block $~lib/util/number/umul64e|inlined.1 (result i32) global.get $~lib/util/number/_exp - local.set $15 - local.get $14 local.set $26 - local.get $15 + local.get $14 + local.set $11 local.get $26 + local.get $11 i32.add i32.const 64 i32.add end - local.set $26 + local.set $11 block $~lib/util/number/umul64f|inlined.2 (result i64) global.get $~lib/util/number/_frc_minus local.set $10 @@ -6362,19 +6365,19 @@ local.get $18 local.get $19 i64.mul - local.set $22 + local.set $23 local.get $20 local.get $19 i64.mul - local.get $22 + local.get $23 i64.const 32 i64.shr_u i64.add - local.set $23 + local.set $22 local.get $18 local.get $21 i64.mul - local.get $23 + local.get $22 i64.const 4294967295 i64.and i64.add @@ -6383,10 +6386,10 @@ i64.const 2147483647 i64.add local.set $27 - local.get $23 + local.get $22 i64.const 32 i64.shr_u - local.set $23 + local.set $22 local.get $27 i64.const 32 i64.shr_u @@ -6394,7 +6397,7 @@ local.get $20 local.get $21 i64.mul - local.get $23 + local.get $22 i64.add local.get $27 i64.add @@ -6405,14 +6408,14 @@ local.get $25 local.get $27 i64.sub - local.set $23 - local.get $4 + local.set $22 + local.get $5 local.get $24 - local.get $11 + local.get $15 local.get $25 - local.get $26 - local.get $23 - local.get $5 + local.get $11 + local.get $22 + local.get $4 call $~lib/util/number/genDigits end local.set $28 @@ -6780,14 +6783,14 @@ end block $~lib/string/String#includes|inlined.0 (result i32) global.get $std/string/str - local.set $0 + local.set $2 i32.const 280 local.set $1 i32.const 0 - local.set $2 - local.get $0 - local.get $1 + local.set $0 local.get $2 + local.get $1 + local.get $0 call $~lib/string/String#indexOf i32.const -1 i32.ne @@ -8195,7 +8198,7 @@ call $~lib/array/Array#get:length i32.const 1 i32.eq - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -8203,7 +8206,7 @@ i32.const 312 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end i32.eqz if @@ -8241,7 +8244,7 @@ call $~lib/array/Array#get:length i32.const 1 i32.eq - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -8249,7 +8252,7 @@ i32.const 312 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end i32.eqz if @@ -8269,7 +8272,7 @@ call $~lib/array/Array#get:length i32.const 1 i32.eq - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -8277,7 +8280,7 @@ i32.const 1480 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end i32.eqz if @@ -8297,7 +8300,7 @@ call $~lib/array/Array#get:length i32.const 3 i32.eq - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -8305,9 +8308,9 @@ i32.const 336 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 1 @@ -8315,9 +8318,9 @@ i32.const 824 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 2 @@ -8325,7 +8328,7 @@ i32.const 1520 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end i32.eqz if @@ -8345,7 +8348,7 @@ call $~lib/array/Array#get:length i32.const 3 i32.eq - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -8353,9 +8356,9 @@ i32.const 336 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 1 @@ -8363,9 +8366,9 @@ i32.const 824 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 2 @@ -8373,7 +8376,7 @@ i32.const 1520 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end i32.eqz if @@ -8393,7 +8396,7 @@ call $~lib/array/Array#get:length i32.const 4 i32.eq - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -8401,9 +8404,9 @@ i32.const 336 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 1 @@ -8411,9 +8414,9 @@ i32.const 824 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 2 @@ -8421,9 +8424,9 @@ i32.const 312 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 3 @@ -8431,7 +8434,7 @@ i32.const 1520 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end i32.eqz if @@ -8451,7 +8454,7 @@ call $~lib/array/Array#get:length i32.const 4 i32.eq - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -8459,9 +8462,9 @@ i32.const 312 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 1 @@ -8469,9 +8472,9 @@ i32.const 336 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 2 @@ -8479,9 +8482,9 @@ i32.const 824 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 3 @@ -8489,7 +8492,7 @@ i32.const 1520 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end i32.eqz if @@ -8509,7 +8512,7 @@ call $~lib/array/Array#get:length i32.const 4 i32.eq - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -8517,9 +8520,9 @@ i32.const 336 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 1 @@ -8527,9 +8530,9 @@ i32.const 824 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 2 @@ -8537,9 +8540,9 @@ i32.const 1520 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 3 @@ -8547,7 +8550,7 @@ i32.const 312 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end i32.eqz if @@ -8567,7 +8570,7 @@ call $~lib/array/Array#get:length i32.const 3 i32.eq - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -8575,9 +8578,9 @@ i32.const 336 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 1 @@ -8585,9 +8588,9 @@ i32.const 824 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 2 @@ -8595,7 +8598,7 @@ i32.const 1520 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end i32.eqz if @@ -8633,7 +8636,7 @@ call $~lib/array/Array#get:length i32.const 1 i32.eq - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -8641,7 +8644,7 @@ i32.const 336 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end i32.eqz if @@ -8661,7 +8664,7 @@ call $~lib/array/Array#get:length i32.const 1 i32.eq - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -8669,7 +8672,7 @@ i32.const 336 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end i32.eqz if @@ -8689,7 +8692,7 @@ call $~lib/array/Array#get:length i32.const 3 i32.eq - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -8697,9 +8700,9 @@ i32.const 336 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 1 @@ -8707,9 +8710,9 @@ i32.const 824 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 2 @@ -8717,7 +8720,7 @@ i32.const 1520 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end i32.eqz if @@ -8737,7 +8740,7 @@ call $~lib/array/Array#get:length i32.const 3 i32.eq - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -8745,9 +8748,9 @@ i32.const 336 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 1 @@ -8755,9 +8758,9 @@ i32.const 824 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 2 @@ -8765,7 +8768,7 @@ i32.const 1520 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end i32.eqz if @@ -8785,7 +8788,7 @@ call $~lib/array/Array#get:length i32.const 3 i32.eq - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -8793,9 +8796,9 @@ i32.const 336 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 1 @@ -8803,9 +8806,9 @@ i32.const 824 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end - local.tee $2 + local.tee $0 if (result i32) global.get $std/string/sa i32.const 2 @@ -8813,7 +8816,7 @@ i32.const 1520 call $~lib/string/String.__eq else - local.get $2 + local.get $0 end i32.eqz if diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 1c377a2613..56520d6799 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 72 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -157,7 +157,7 @@ if i32.const 0 i32.const 72 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 5bdcfb14f2..9291829172 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -201,7 +201,7 @@ if i32.const 0 i32.const 72 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -216,7 +216,7 @@ if i32.const 0 i32.const 72 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -235,7 +235,8 @@ (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) + (local $5 i32) + (local $6 i64) block $~lib/util/memory/memset|inlined.0 local.get $2 i32.eqz @@ -311,13 +312,13 @@ i32.sub i32.const 3 i32.and - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $2 @@ -431,13 +432,13 @@ i32.const 4 i32.and i32.add - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $4 @@ -447,7 +448,7 @@ i64.const 32 i64.shl i64.or - local.set $5 + local.set $6 block $break|0 loop $continue|0 local.get $2 @@ -456,22 +457,22 @@ if block local.get $0 - local.get $5 + local.get $6 i64.store local.get $0 i32.const 8 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 16 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 24 i32.add - local.get $5 + local.get $6 i64.store local.get $2 i32.const 32 @@ -2776,6 +2777,8 @@ ) (func $~lib/memory/memory.copy (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 local.get $1 @@ -2788,9 +2791,9 @@ i32.add local.get $0 i32.le_u - local.tee $3 + local.tee $5 if (result i32) - local.get $3 + local.get $5 else local.get $0 local.get $2 @@ -2835,19 +2838,19 @@ local.set $2 block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -2892,19 +2895,19 @@ block block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 5eee3c92a4..75c82fb96e 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -403,7 +403,7 @@ if i32.const 0 i32.const 64 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -417,7 +417,7 @@ if i32.const 0 i32.const 64 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -465,7 +465,7 @@ if i32.const 0 i32.const 64 - i32.const 233 + i32.const 251 i32.const 57 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 89f7791d35..aa6c188f6d 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -225,7 +225,8 @@ (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) + (local $5 i32) + (local $6 i64) block $~lib/util/memory/memset|inlined.0 local.get $2 i32.eqz @@ -301,13 +302,13 @@ i32.sub i32.const 3 i32.and - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $2 @@ -421,13 +422,13 @@ i32.const 4 i32.and i32.add - local.set $3 + local.set $5 local.get $0 - local.get $3 + local.get $5 i32.add local.set $0 local.get $2 - local.get $3 + local.get $5 i32.sub local.set $2 local.get $4 @@ -437,7 +438,7 @@ i64.const 32 i64.shl i64.or - local.set $5 + local.set $6 block $break|0 loop $continue|0 local.get $2 @@ -446,22 +447,22 @@ if block local.get $0 - local.get $5 + local.get $6 i64.store local.get $0 i32.const 8 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 16 i32.add - local.get $5 + local.get $6 i64.store local.get $0 i32.const 24 i32.add - local.get $5 + local.get $6 i64.store local.get $2 i32.const 32 @@ -486,7 +487,7 @@ if i32.const 0 i32.const 64 - i32.const 199 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -501,7 +502,7 @@ if i32.const 0 i32.const 64 - i32.const 200 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -561,7 +562,7 @@ if i32.const 0 i32.const 64 - i32.const 233 + i32.const 251 i32.const 57 call $~lib/env/abort unreachable @@ -1500,12 +1501,12 @@ (local $8 i32) (local $9 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 call $~lib/typedarray/Int32Array#get:length local.set $6 local.get $4 @@ -1534,12 +1535,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -1548,9 +1549,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -1565,13 +1566,13 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 end block $~lib/runtime/REGISTER|inlined.1 (result i32) block $~lib/runtime/ALLOCATE|inlined.13 (result i32) i32.const 12 - local.set $7 - local.get $7 + local.set $8 + local.get $8 call $~lib/runtime/doAllocate end local.set $7 @@ -1580,10 +1581,10 @@ call $~lib/runtime/doRegister end local.set $7 - local.get $3 + local.get $5 i32.load local.set $8 - local.get $3 + local.get $5 i32.load offset=4 local.set $9 local.get $7 @@ -1597,7 +1598,7 @@ i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 2 @@ -1638,12 +1639,12 @@ (local $8 i32) (local $9 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 call $~lib/typedarray/Float64Array#get:length local.set $6 local.get $4 @@ -1672,12 +1673,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -1686,9 +1687,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -1703,13 +1704,13 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 end block $~lib/runtime/REGISTER|inlined.1 (result i32) block $~lib/runtime/ALLOCATE|inlined.14 (result i32) i32.const 12 - local.set $7 - local.get $7 + local.set $8 + local.get $8 call $~lib/runtime/doAllocate end local.set $7 @@ -1718,10 +1719,10 @@ call $~lib/runtime/doRegister end local.set $7 - local.get $3 + local.get $5 i32.load local.set $8 - local.get $3 + local.get $5 i32.load offset=4 local.set $9 local.get $7 @@ -1735,7 +1736,7 @@ i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 3 @@ -2156,20 +2157,20 @@ (local $10 i32) block $~lib/typedarray/SORT|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 call $~lib/typedarray/Float64Array#get:length local.set $4 local.get $4 i32.const 1 i32.le_s if - local.get $2 + local.get $3 br $~lib/typedarray/SORT|inlined.0 end - local.get $2 + local.get $3 i32.load offset=4 local.set $5 local.get $4 @@ -2187,7 +2188,7 @@ global.set $~lib/argc local.get $6 local.get $7 - local.get $3 + local.get $2 call_indirect (type $FUNCSIG$idd) end i32.const 0 @@ -2200,32 +2201,32 @@ local.get $6 f64.store end - local.get $2 + local.get $3 br $~lib/typedarray/SORT|inlined.0 end block $~lib/util/sort/SORT|inlined.0 local.get $5 - local.set $8 + local.set $10 local.get $4 local.set $9 - local.get $3 - local.set $10 + local.get $2 + local.set $8 local.get $9 i32.const 256 i32.lt_s if - local.get $8 - local.get $9 local.get $10 + local.get $9 + local.get $8 call $~lib/util/sort/insertionSort else - local.get $8 - local.get $9 local.get $10 + local.get $9 + local.get $8 call $~lib/util/sort/weakHeapSort end end - local.get $2 + local.get $3 end ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 43 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) @@ -2384,25 +2385,25 @@ (local $10 i32) (local $11 i32) local.get $0 - local.set $4 + local.set $7 local.get $1 - local.set $5 - local.get $2 local.set $6 + local.get $2 + local.set $5 local.get $3 - local.set $7 - local.get $4 + local.set $4 + local.get $7 i32.load offset=4 local.set $8 - local.get $4 + local.get $7 call $~lib/typedarray/Int8Array#get:length local.set $9 - local.get $6 + local.get $5 i32.const 0 i32.lt_s if (result i32) local.get $9 - local.get $6 + local.get $5 i32.add local.tee $10 i32.const 0 @@ -2412,7 +2413,7 @@ i32.gt_s select else - local.get $6 + local.get $5 local.tee $10 local.get $9 local.tee $11 @@ -2421,13 +2422,13 @@ i32.lt_s select end - local.set $6 - local.get $7 + local.set $5 + local.get $4 i32.const 0 i32.lt_s if (result i32) local.get $9 - local.get $7 + local.get $4 i32.add local.tee $10 i32.const 0 @@ -2437,7 +2438,7 @@ i32.gt_s select else - local.get $7 + local.get $4 local.tee $10 local.get $9 local.tee $11 @@ -2446,21 +2447,21 @@ i32.lt_s select end - local.set $7 - local.get $6 - local.get $7 + local.set $4 + local.get $5 + local.get $4 i32.lt_s if local.get $8 - local.get $6 - i32.add local.get $5 - local.get $7 + i32.add local.get $6 + local.get $4 + local.get $5 i32.sub call $~lib/memory/memory.fill end - local.get $4 + local.get $7 ) (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -3671,6 +3672,8 @@ ) (func $~lib/memory/memory.copy (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 local.get $1 @@ -3683,9 +3686,9 @@ i32.add local.get $0 i32.le_u - local.tee $3 + local.tee $5 if (result i32) - local.get $3 + local.get $5 else local.get $0 local.get $2 @@ -3730,19 +3733,19 @@ local.set $2 block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -3787,19 +3790,19 @@ block block (result i32) local.get $0 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 end i32.load8_u i32.store8 @@ -4038,12 +4041,12 @@ (local $8 i32) (local $9 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 call $~lib/typedarray/Int8Array#get:length local.set $6 local.get $4 @@ -4072,12 +4075,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -4086,9 +4089,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -4103,13 +4106,13 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 end block $~lib/runtime/REGISTER|inlined.1 (result i32) block $~lib/runtime/ALLOCATE|inlined.15 (result i32) i32.const 12 - local.set $7 - local.get $7 + local.set $8 + local.get $8 call $~lib/runtime/doAllocate end local.set $7 @@ -4118,10 +4121,10 @@ call $~lib/runtime/doRegister end local.set $7 - local.get $3 + local.get $5 i32.load local.set $8 - local.get $3 + local.get $5 i32.load offset=4 local.set $9 local.get $7 @@ -4135,7 +4138,7 @@ i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 0 @@ -4153,25 +4156,25 @@ (local $10 i32) (local $11 i32) local.get $0 - local.set $4 + local.set $7 local.get $1 - local.set $5 - local.get $2 local.set $6 + local.get $2 + local.set $5 local.get $3 - local.set $7 - local.get $4 + local.set $4 + local.get $7 i32.load offset=4 local.set $8 - local.get $4 + local.get $7 call $~lib/typedarray/Int32Array#get:length local.set $9 - local.get $6 + local.get $5 i32.const 0 i32.lt_s if (result i32) local.get $9 - local.get $6 + local.get $5 i32.add local.tee $10 i32.const 0 @@ -4181,7 +4184,7 @@ i32.gt_s select else - local.get $6 + local.get $5 local.tee $10 local.get $9 local.tee $11 @@ -4190,13 +4193,13 @@ i32.lt_s select end - local.set $6 - local.get $7 + local.set $5 + local.get $4 i32.const 0 i32.lt_s if (result i32) local.get $9 - local.get $7 + local.get $4 i32.add local.tee $10 i32.const 0 @@ -4206,7 +4209,7 @@ i32.gt_s select else - local.get $7 + local.get $4 local.tee $10 local.get $9 local.tee $11 @@ -4215,31 +4218,31 @@ i32.lt_s select end - local.set $7 + local.set $4 block $break|0 loop $repeat|0 - local.get $6 - local.get $7 + local.get $5 + local.get $4 i32.lt_s i32.eqz br_if $break|0 local.get $8 - local.get $6 + local.get $5 i32.const 2 i32.shl i32.add - local.get $5 - i32.store local.get $6 + i32.store + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $repeat|0 unreachable end unreachable end - local.get $4 + local.get $7 ) (func $~lib/array/Array#get:length (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -4329,19 +4332,19 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 local.set $6 block $break|0 block i32.const 0 local.set $7 - local.get $3 + local.get $5 call $~lib/typedarray/Int8Array#get:length local.set $8 end @@ -4354,7 +4357,7 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 + local.get $3 local.get $6 local.get $7 i32.const 0 @@ -4362,11 +4365,11 @@ i32.add i32.load8_s local.get $7 - local.get $3 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 + local.set $3 local.get $7 i32.const 1 i32.add @@ -4376,7 +4379,7 @@ end unreachable end - local.get $5 + local.get $3 ) (func $std/typedarray/testReduce (; 65 ;) (type $FUNCSIG$v) (local $0 i32) @@ -4452,19 +4455,19 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 local.set $6 block $break|0 block i32.const 0 local.set $7 - local.get $3 + local.get $5 call $~lib/typedarray/Uint8Array#get:length local.set $8 end @@ -4477,7 +4480,7 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 + local.get $3 local.get $6 local.get $7 i32.const 0 @@ -4485,11 +4488,11 @@ i32.add i32.load8_u local.get $7 - local.get $3 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 + local.set $3 local.get $7 i32.const 1 i32.add @@ -4499,7 +4502,7 @@ end unreachable end - local.get $5 + local.get $3 ) (func $std/typedarray/testReduce (; 69 ;) (type $FUNCSIG$v) (local $0 i32) @@ -4553,19 +4556,19 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 local.set $6 block $break|0 block i32.const 0 local.set $7 - local.get $3 + local.get $5 call $~lib/typedarray/Uint8ClampedArray#get:length local.set $8 end @@ -4578,7 +4581,7 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 + local.get $3 local.get $6 local.get $7 i32.const 0 @@ -4586,11 +4589,11 @@ i32.add i32.load8_u local.get $7 - local.get $3 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 + local.set $3 local.get $7 i32.const 1 i32.add @@ -4600,7 +4603,7 @@ end unreachable end - local.get $5 + local.get $3 ) (func $std/typedarray/testReduce (; 72 ;) (type $FUNCSIG$v) (local $0 i32) @@ -4678,19 +4681,19 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 local.set $6 block $break|0 block i32.const 0 local.set $7 - local.get $3 + local.get $5 call $~lib/typedarray/Int16Array#get:length local.set $8 end @@ -4703,7 +4706,7 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 + local.get $3 local.get $6 local.get $7 i32.const 1 @@ -4711,11 +4714,11 @@ i32.add i32.load16_s local.get $7 - local.get $3 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 + local.set $3 local.get $7 i32.const 1 i32.add @@ -4725,7 +4728,7 @@ end unreachable end - local.get $5 + local.get $3 ) (func $std/typedarray/testReduce (; 76 ;) (type $FUNCSIG$v) (local $0 i32) @@ -4805,19 +4808,19 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 local.set $6 block $break|0 block i32.const 0 local.set $7 - local.get $3 + local.get $5 call $~lib/typedarray/Uint16Array#get:length local.set $8 end @@ -4830,7 +4833,7 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 + local.get $3 local.get $6 local.get $7 i32.const 1 @@ -4838,11 +4841,11 @@ i32.add i32.load16_u local.get $7 - local.get $3 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 + local.set $3 local.get $7 i32.const 1 i32.add @@ -4852,7 +4855,7 @@ end unreachable end - local.get $5 + local.get $3 ) (func $std/typedarray/testReduce (; 80 ;) (type $FUNCSIG$v) (local $0 i32) @@ -4906,19 +4909,19 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 local.set $6 block $break|0 block i32.const 0 local.set $7 - local.get $3 + local.get $5 call $~lib/typedarray/Int32Array#get:length local.set $8 end @@ -4931,7 +4934,7 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 + local.get $3 local.get $6 local.get $7 i32.const 2 @@ -4939,11 +4942,11 @@ i32.add i32.load local.get $7 - local.get $3 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 + local.set $3 local.get $7 i32.const 1 i32.add @@ -4953,7 +4956,7 @@ end unreachable end - local.get $5 + local.get $3 ) (func $std/typedarray/testReduce (; 83 ;) (type $FUNCSIG$v) (local $0 i32) @@ -5029,19 +5032,19 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 local.set $6 block $break|0 block i32.const 0 local.set $7 - local.get $3 + local.get $5 call $~lib/typedarray/Uint32Array#get:length local.set $8 end @@ -5054,7 +5057,7 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 + local.get $3 local.get $6 local.get $7 i32.const 2 @@ -5062,11 +5065,11 @@ i32.add i32.load local.get $7 - local.get $3 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 + local.set $3 local.get $7 i32.const 1 i32.add @@ -5076,7 +5079,7 @@ end unreachable end - local.get $5 + local.get $3 ) (func $std/typedarray/testReduce (; 87 ;) (type $FUNCSIG$v) (local $0 i32) @@ -5152,19 +5155,19 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $3 - local.get $1 local.set $4 + local.get $1 + local.set $3 local.get $2 local.set $5 - local.get $3 + local.get $4 i32.load offset=4 local.set $6 block $break|0 block i32.const 0 local.set $7 - local.get $3 + local.get $4 call $~lib/typedarray/Int64Array#get:length local.set $8 end @@ -5185,8 +5188,8 @@ i32.add i64.load local.get $7 - local.get $3 local.get $4 + local.get $3 call_indirect (type $FUNCSIG$jjjii) end local.set $5 @@ -5275,19 +5278,19 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $3 - local.get $1 local.set $4 + local.get $1 + local.set $3 local.get $2 local.set $5 - local.get $3 + local.get $4 i32.load offset=4 local.set $6 block $break|0 block i32.const 0 local.set $7 - local.get $3 + local.get $4 call $~lib/typedarray/Uint64Array#get:length local.set $8 end @@ -5308,8 +5311,8 @@ i32.add i64.load local.get $7 - local.get $3 local.get $4 + local.get $3 call_indirect (type $FUNCSIG$jjjii) end local.set $5 @@ -5398,19 +5401,19 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $3 - local.get $1 local.set $4 + local.get $1 + local.set $3 local.get $2 local.set $5 - local.get $3 + local.get $4 i32.load offset=4 local.set $6 block $break|0 block i32.const 0 local.set $7 - local.get $3 + local.get $4 call $~lib/typedarray/Float32Array#get:length local.set $8 end @@ -5431,8 +5434,8 @@ i32.add f32.load local.get $7 - local.get $3 local.get $4 + local.get $3 call_indirect (type $FUNCSIG$fffii) end local.set $5 @@ -5497,19 +5500,19 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $3 - local.get $1 local.set $4 + local.get $1 + local.set $3 local.get $2 local.set $5 - local.get $3 + local.get $4 i32.load offset=4 local.set $6 block $break|0 block i32.const 0 local.set $7 - local.get $3 + local.get $4 call $~lib/typedarray/Float64Array#get:length local.set $8 end @@ -5530,8 +5533,8 @@ i32.add f64.load local.get $7 - local.get $3 local.get $4 + local.get $3 call_indirect (type $FUNCSIG$dddii) end local.set $5 @@ -5595,16 +5598,16 @@ (local $6 i32) (local $7 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 local.set $6 block $break|0 - local.get $3 + local.get $5 call $~lib/typedarray/Int8Array#get:length i32.const 1 i32.sub @@ -5618,7 +5621,7 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 + local.get $3 local.get $6 local.get $7 i32.const 0 @@ -5626,11 +5629,11 @@ i32.add i32.load8_s local.get $7 - local.get $3 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 + local.set $3 local.get $7 i32.const 1 i32.sub @@ -5640,7 +5643,7 @@ end unreachable end - local.get $5 + local.get $3 ) (func $std/typedarray/testReduceRight (; 105 ;) (type $FUNCSIG$v) (local $0 i32) @@ -5695,16 +5698,16 @@ (local $6 i32) (local $7 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 local.set $6 block $break|0 - local.get $3 + local.get $5 call $~lib/typedarray/Uint8Array#get:length i32.const 1 i32.sub @@ -5718,7 +5721,7 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 + local.get $3 local.get $6 local.get $7 i32.const 0 @@ -5726,11 +5729,11 @@ i32.add i32.load8_u local.get $7 - local.get $3 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 + local.set $3 local.get $7 i32.const 1 i32.sub @@ -5740,7 +5743,7 @@ end unreachable end - local.get $5 + local.get $3 ) (func $std/typedarray/testReduceRight (; 108 ;) (type $FUNCSIG$v) (local $0 i32) @@ -5793,16 +5796,16 @@ (local $6 i32) (local $7 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 local.set $6 block $break|0 - local.get $3 + local.get $5 call $~lib/typedarray/Uint8ClampedArray#get:length i32.const 1 i32.sub @@ -5816,7 +5819,7 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 + local.get $3 local.get $6 local.get $7 i32.const 0 @@ -5824,11 +5827,11 @@ i32.add i32.load8_u local.get $7 - local.get $3 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 + local.set $3 local.get $7 i32.const 1 i32.sub @@ -5838,7 +5841,7 @@ end unreachable end - local.get $5 + local.get $3 ) (func $std/typedarray/testReduceRight (; 111 ;) (type $FUNCSIG$v) (local $0 i32) @@ -5891,16 +5894,16 @@ (local $6 i32) (local $7 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 local.set $6 block $break|0 - local.get $3 + local.get $5 call $~lib/typedarray/Int16Array#get:length i32.const 1 i32.sub @@ -5914,7 +5917,7 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 + local.get $3 local.get $6 local.get $7 i32.const 1 @@ -5922,11 +5925,11 @@ i32.add i32.load16_s local.get $7 - local.get $3 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 + local.set $3 local.get $7 i32.const 1 i32.sub @@ -5936,7 +5939,7 @@ end unreachable end - local.get $5 + local.get $3 ) (func $std/typedarray/testReduceRight (; 114 ;) (type $FUNCSIG$v) (local $0 i32) @@ -5991,16 +5994,16 @@ (local $6 i32) (local $7 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 local.set $6 block $break|0 - local.get $3 + local.get $5 call $~lib/typedarray/Uint16Array#get:length i32.const 1 i32.sub @@ -6014,7 +6017,7 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 + local.get $3 local.get $6 local.get $7 i32.const 1 @@ -6022,11 +6025,11 @@ i32.add i32.load16_u local.get $7 - local.get $3 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 + local.set $3 local.get $7 i32.const 1 i32.sub @@ -6036,7 +6039,7 @@ end unreachable end - local.get $5 + local.get $3 ) (func $std/typedarray/testReduceRight (; 117 ;) (type $FUNCSIG$v) (local $0 i32) @@ -6089,16 +6092,16 @@ (local $6 i32) (local $7 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 local.set $6 block $break|0 - local.get $3 + local.get $5 call $~lib/typedarray/Int32Array#get:length i32.const 1 i32.sub @@ -6112,7 +6115,7 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 + local.get $3 local.get $6 local.get $7 i32.const 2 @@ -6120,11 +6123,11 @@ i32.add i32.load local.get $7 - local.get $3 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 + local.set $3 local.get $7 i32.const 1 i32.sub @@ -6134,7 +6137,7 @@ end unreachable end - local.get $5 + local.get $3 ) (func $std/typedarray/testReduceRight (; 120 ;) (type $FUNCSIG$v) (local $0 i32) @@ -6185,16 +6188,16 @@ (local $6 i32) (local $7 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 local.set $6 block $break|0 - local.get $3 + local.get $5 call $~lib/typedarray/Uint32Array#get:length i32.const 1 i32.sub @@ -6208,7 +6211,7 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 + local.get $3 local.get $6 local.get $7 i32.const 2 @@ -6216,11 +6219,11 @@ i32.add i32.load local.get $7 - local.get $3 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 + local.set $3 local.get $7 i32.const 1 i32.sub @@ -6230,7 +6233,7 @@ end unreachable end - local.get $5 + local.get $3 ) (func $std/typedarray/testReduceRight (; 123 ;) (type $FUNCSIG$v) (local $0 i32) @@ -6281,16 +6284,16 @@ (local $6 i32) (local $7 i32) local.get $0 - local.set $3 - local.get $1 local.set $4 + local.get $1 + local.set $3 local.get $2 local.set $5 - local.get $3 + local.get $4 i32.load offset=4 local.set $6 block $break|0 - local.get $3 + local.get $4 call $~lib/typedarray/Int64Array#get:length i32.const 1 i32.sub @@ -6312,8 +6315,8 @@ i32.add i64.load local.get $7 - local.get $3 local.get $4 + local.get $3 call_indirect (type $FUNCSIG$jjjii) end local.set $5 @@ -6377,16 +6380,16 @@ (local $6 i32) (local $7 i32) local.get $0 - local.set $3 - local.get $1 local.set $4 + local.get $1 + local.set $3 local.get $2 local.set $5 - local.get $3 + local.get $4 i32.load offset=4 local.set $6 block $break|0 - local.get $3 + local.get $4 call $~lib/typedarray/Uint64Array#get:length i32.const 1 i32.sub @@ -6408,8 +6411,8 @@ i32.add i64.load local.get $7 - local.get $3 local.get $4 + local.get $3 call_indirect (type $FUNCSIG$jjjii) end local.set $5 @@ -6473,16 +6476,16 @@ (local $6 i32) (local $7 i32) local.get $0 - local.set $3 - local.get $1 local.set $4 + local.get $1 + local.set $3 local.get $2 local.set $5 - local.get $3 + local.get $4 i32.load offset=4 local.set $6 block $break|0 - local.get $3 + local.get $4 call $~lib/typedarray/Float32Array#get:length i32.const 1 i32.sub @@ -6504,8 +6507,8 @@ i32.add f32.load local.get $7 - local.get $3 local.get $4 + local.get $3 call_indirect (type $FUNCSIG$fffii) end local.set $5 @@ -6569,16 +6572,16 @@ (local $6 i32) (local $7 i32) local.get $0 - local.set $3 - local.get $1 local.set $4 + local.get $1 + local.set $3 local.get $2 local.set $5 - local.get $3 + local.get $4 i32.load offset=4 local.set $6 block $break|0 - local.get $3 + local.get $4 call $~lib/typedarray/Float64Array#get:length i32.const 1 i32.sub @@ -6600,8 +6603,8 @@ i32.add f64.load local.get $7 - local.get $3 local.get $4 + local.get $3 call_indirect (type $FUNCSIG$dddii) end local.set $5 @@ -6667,13 +6670,13 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 call $~lib/typedarray/Int8Array#get:length local.set $4 - local.get $2 + local.get $3 i32.load offset=4 local.set $5 i32.const 0 @@ -6707,8 +6710,8 @@ i32.add i32.load8_s local.get $8 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.store8 @@ -6803,13 +6806,13 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 call $~lib/typedarray/Uint8Array#get:length local.set $4 - local.get $2 + local.get $3 i32.load offset=4 local.set $5 i32.const 0 @@ -6843,8 +6846,8 @@ i32.add i32.load8_u local.get $8 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.store8 @@ -6958,13 +6961,13 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 call $~lib/typedarray/Uint8ClampedArray#get:length local.set $4 - local.get $2 + local.get $3 i32.load offset=4 local.set $5 i32.const 0 @@ -6998,8 +7001,8 @@ i32.add i32.load8_u local.get $8 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.store8 @@ -7094,13 +7097,13 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 call $~lib/typedarray/Int16Array#get:length local.set $4 - local.get $2 + local.get $3 i32.load offset=4 local.set $5 i32.const 0 @@ -7134,8 +7137,8 @@ i32.add i32.load16_s local.get $8 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.store16 @@ -7253,13 +7256,13 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 call $~lib/typedarray/Uint16Array#get:length local.set $4 - local.get $2 + local.get $3 i32.load offset=4 local.set $5 i32.const 0 @@ -7293,8 +7296,8 @@ i32.add i32.load16_u local.get $8 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.store16 @@ -7412,13 +7415,13 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 call $~lib/typedarray/Int32Array#get:length local.set $4 - local.get $2 + local.get $3 i32.load offset=4 local.set $5 i32.const 0 @@ -7452,8 +7455,8 @@ i32.add i32.load local.get $8 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.store @@ -7548,13 +7551,13 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 call $~lib/typedarray/Uint32Array#get:length local.set $4 - local.get $2 + local.get $3 i32.load offset=4 local.set $5 i32.const 0 @@ -7588,8 +7591,8 @@ i32.add i32.load local.get $8 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.store @@ -7707,13 +7710,13 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 call $~lib/typedarray/Int64Array#get:length local.set $4 - local.get $2 + local.get $3 i32.load offset=4 local.set $5 i32.const 0 @@ -7747,8 +7750,8 @@ i32.add i64.load local.get $8 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$jjii) end i64.store @@ -7866,13 +7869,13 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 call $~lib/typedarray/Uint64Array#get:length local.set $4 - local.get $2 + local.get $3 i32.load offset=4 local.set $5 i32.const 0 @@ -7906,8 +7909,8 @@ i32.add i64.load local.get $8 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$jjii) end i64.store @@ -8025,13 +8028,13 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 call $~lib/typedarray/Float32Array#get:length local.set $4 - local.get $2 + local.get $3 i32.load offset=4 local.set $5 i32.const 0 @@ -8065,8 +8068,8 @@ i32.add f32.load local.get $8 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ffii) end f32.store @@ -8184,13 +8187,13 @@ (local $7 i32) (local $8 i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 call $~lib/typedarray/Float64Array#get:length local.set $4 - local.get $2 + local.get $3 i32.load offset=4 local.set $5 i32.const 0 @@ -8224,8 +8227,8 @@ i32.add f64.load local.get $8 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ddii) end f64.store @@ -8323,17 +8326,17 @@ (local $6 i32) block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Int8Array#get:length local.set $6 end @@ -8353,8 +8356,8 @@ i32.add i32.load8_s local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -8453,17 +8456,17 @@ (local $6 i32) block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Uint8Array#get:length local.set $6 end @@ -8483,8 +8486,8 @@ i32.add i32.load8_u local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -8581,17 +8584,17 @@ (local $6 i32) block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Uint8ClampedArray#get:length local.set $6 end @@ -8611,8 +8614,8 @@ i32.add i32.load8_u local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -8711,17 +8714,17 @@ (local $6 i32) block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Int16Array#get:length local.set $6 end @@ -8741,8 +8744,8 @@ i32.add i32.load16_s local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -8841,17 +8844,17 @@ (local $6 i32) block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Uint16Array#get:length local.set $6 end @@ -8871,8 +8874,8 @@ i32.add i32.load16_u local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -8967,17 +8970,17 @@ (local $6 i32) block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Int32Array#get:length local.set $6 end @@ -8997,8 +9000,8 @@ i32.add i32.load local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -9091,17 +9094,17 @@ (local $6 i32) block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Uint32Array#get:length local.set $6 end @@ -9121,8 +9124,8 @@ i32.add i32.load local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -9215,17 +9218,17 @@ (local $6 i32) block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Int64Array#get:length local.set $6 end @@ -9245,8 +9248,8 @@ i32.add i64.load local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ijii) end i32.const 0 @@ -9339,17 +9342,17 @@ (local $6 i32) block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Uint64Array#get:length local.set $6 end @@ -9369,8 +9372,8 @@ i32.add i64.load local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ijii) end i32.const 0 @@ -9463,17 +9466,17 @@ (local $6 i32) block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Float32Array#get:length local.set $6 end @@ -9493,8 +9496,8 @@ i32.add f32.load local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ifii) end i32.const 0 @@ -9587,17 +9590,17 @@ (local $6 i32) block $~lib/typedarray/SOME|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Float64Array#get:length local.set $6 end @@ -9617,8 +9620,8 @@ i32.add f64.load local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$idii) end i32.const 0 @@ -9715,17 +9718,17 @@ (local $6 i32) block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Int8Array#get:length local.set $6 end @@ -9745,8 +9748,8 @@ i32.add i32.load8_s local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -9844,17 +9847,17 @@ (local $6 i32) block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Uint8Array#get:length local.set $6 end @@ -9874,8 +9877,8 @@ i32.add i32.load8_u local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -9971,17 +9974,17 @@ (local $6 i32) block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Uint8ClampedArray#get:length local.set $6 end @@ -10001,8 +10004,8 @@ i32.add i32.load8_u local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -10100,17 +10103,17 @@ (local $6 i32) block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Int16Array#get:length local.set $6 end @@ -10130,8 +10133,8 @@ i32.add i32.load16_s local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -10229,17 +10232,17 @@ (local $6 i32) block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Uint16Array#get:length local.set $6 end @@ -10259,8 +10262,8 @@ i32.add i32.load16_u local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -10354,17 +10357,17 @@ (local $6 i32) block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Int32Array#get:length local.set $6 end @@ -10384,8 +10387,8 @@ i32.add i32.load local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -10477,17 +10480,17 @@ (local $6 i32) block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Uint32Array#get:length local.set $6 end @@ -10507,8 +10510,8 @@ i32.add i32.load local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -10600,17 +10603,17 @@ (local $6 i32) block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Int64Array#get:length local.set $6 end @@ -10630,8 +10633,8 @@ i32.add i64.load local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ijii) end i32.const 0 @@ -10723,17 +10726,17 @@ (local $6 i32) block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Uint64Array#get:length local.set $6 end @@ -10753,8 +10756,8 @@ i32.add i64.load local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ijii) end i32.const 0 @@ -10846,17 +10849,17 @@ (local $6 i32) block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Float32Array#get:length local.set $6 end @@ -10876,8 +10879,8 @@ i32.add f32.load local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ifii) end i32.const 0 @@ -10969,17 +10972,17 @@ (local $6 i32) block $~lib/typedarray/FIND_INDEX|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Float64Array#get:length local.set $6 end @@ -10999,8 +11002,8 @@ i32.add f64.load local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$idii) end i32.const 0 @@ -11098,17 +11101,17 @@ (local $6 i32) block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Int8Array#get:length local.set $6 end @@ -11130,8 +11133,8 @@ i32.add i32.load8_s local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -11237,17 +11240,17 @@ (local $6 i32) block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Uint8Array#get:length local.set $6 end @@ -11269,8 +11272,8 @@ i32.add i32.load8_u local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -11374,17 +11377,17 @@ (local $6 i32) block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Uint8ClampedArray#get:length local.set $6 end @@ -11406,8 +11409,8 @@ i32.add i32.load8_u local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -11513,17 +11516,17 @@ (local $6 i32) block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Int16Array#get:length local.set $6 end @@ -11545,8 +11548,8 @@ i32.add i32.load16_s local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -11652,17 +11655,17 @@ (local $6 i32) block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Uint16Array#get:length local.set $6 end @@ -11684,8 +11687,8 @@ i32.add i32.load16_u local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -11787,17 +11790,17 @@ (local $6 i32) block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Int32Array#get:length local.set $6 end @@ -11819,8 +11822,8 @@ i32.add i32.load local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -11920,17 +11923,17 @@ (local $6 i32) block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Uint32Array#get:length local.set $6 end @@ -11952,8 +11955,8 @@ i32.add i32.load local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end i32.const 0 @@ -12053,17 +12056,17 @@ (local $6 i32) block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Int64Array#get:length local.set $6 end @@ -12085,8 +12088,8 @@ i32.add i64.load local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ijii) end i32.const 0 @@ -12186,17 +12189,17 @@ (local $6 i32) block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Uint64Array#get:length local.set $6 end @@ -12218,8 +12221,8 @@ i32.add i64.load local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ijii) end i32.const 0 @@ -12575,17 +12578,17 @@ (local $6 i32) block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Float32Array#get:length local.set $6 end @@ -12607,8 +12610,8 @@ i32.add f32.load local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ifii) end i32.const 0 @@ -12966,17 +12969,17 @@ (local $6 i32) block $~lib/typedarray/EVERY|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 block $break|0 block i32.const 0 local.set $5 - local.get $2 + local.get $3 call $~lib/typedarray/Float64Array#get:length local.set $6 end @@ -12998,8 +13001,8 @@ i32.add f64.load local.get $5 - local.get $2 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$idii) end i32.const 0 @@ -13145,17 +13148,17 @@ (local $4 i32) local.get $0 i32.load offset=4 - local.set $2 + local.set $3 block $break|0 block i32.const 0 - local.set $3 + local.set $2 local.get $0 call $~lib/typedarray/Int8Array#get:length local.set $4 end loop $repeat|0 - local.get $3 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -13163,21 +13166,21 @@ block i32.const 3 global.set $~lib/argc - local.get $2 local.get $3 + local.get $2 i32.const 0 i32.shl i32.add i32.load8_s - local.get $3 + local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 unreachable end @@ -13297,17 +13300,17 @@ (local $4 i32) local.get $0 i32.load offset=4 - local.set $2 + local.set $3 block $break|0 block i32.const 0 - local.set $3 + local.set $2 local.get $0 call $~lib/typedarray/Uint8Array#get:length local.set $4 end loop $repeat|0 - local.get $3 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -13315,21 +13318,21 @@ block i32.const 3 global.set $~lib/argc - local.get $2 local.get $3 + local.get $2 i32.const 0 i32.shl i32.add i32.load8_u - local.get $3 + local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 unreachable end @@ -13443,17 +13446,17 @@ (local $4 i32) local.get $0 i32.load offset=4 - local.set $2 + local.set $3 block $break|0 block i32.const 0 - local.set $3 + local.set $2 local.get $0 call $~lib/typedarray/Uint8ClampedArray#get:length local.set $4 end loop $repeat|0 - local.get $3 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -13461,21 +13464,21 @@ block i32.const 3 global.set $~lib/argc - local.get $2 local.get $3 + local.get $2 i32.const 0 i32.shl i32.add i32.load8_u - local.get $3 + local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 unreachable end @@ -13593,17 +13596,17 @@ (local $4 i32) local.get $0 i32.load offset=4 - local.set $2 + local.set $3 block $break|0 block i32.const 0 - local.set $3 + local.set $2 local.get $0 call $~lib/typedarray/Int16Array#get:length local.set $4 end loop $repeat|0 - local.get $3 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -13611,21 +13614,21 @@ block i32.const 3 global.set $~lib/argc - local.get $2 local.get $3 + local.get $2 i32.const 1 i32.shl i32.add i32.load16_s - local.get $3 + local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 unreachable end @@ -13745,17 +13748,17 @@ (local $4 i32) local.get $0 i32.load offset=4 - local.set $2 + local.set $3 block $break|0 block i32.const 0 - local.set $3 + local.set $2 local.get $0 call $~lib/typedarray/Uint16Array#get:length local.set $4 end loop $repeat|0 - local.get $3 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -13763,21 +13766,21 @@ block i32.const 3 global.set $~lib/argc - local.get $2 local.get $3 + local.get $2 i32.const 1 i32.shl i32.add i32.load16_u - local.get $3 + local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 unreachable end @@ -13887,17 +13890,17 @@ (local $4 i32) local.get $0 i32.load offset=4 - local.set $2 + local.set $3 block $break|0 block i32.const 0 - local.set $3 + local.set $2 local.get $0 call $~lib/typedarray/Int32Array#get:length local.set $4 end loop $repeat|0 - local.get $3 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -13905,21 +13908,21 @@ block i32.const 3 global.set $~lib/argc - local.get $2 local.get $3 + local.get $2 i32.const 2 i32.shl i32.add i32.load - local.get $3 + local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 unreachable end @@ -14023,17 +14026,17 @@ (local $4 i32) local.get $0 i32.load offset=4 - local.set $2 + local.set $3 block $break|0 block i32.const 0 - local.set $3 + local.set $2 local.get $0 call $~lib/typedarray/Uint32Array#get:length local.set $4 end loop $repeat|0 - local.get $3 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -14041,21 +14044,21 @@ block i32.const 3 global.set $~lib/argc - local.get $2 local.get $3 + local.get $2 i32.const 2 i32.shl i32.add i32.load - local.get $3 + local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 unreachable end @@ -14160,17 +14163,17 @@ (local $4 i32) local.get $0 i32.load offset=4 - local.set $2 + local.set $3 block $break|0 block i32.const 0 - local.set $3 + local.set $2 local.get $0 call $~lib/typedarray/Int64Array#get:length local.set $4 end loop $repeat|0 - local.get $3 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -14178,21 +14181,21 @@ block i32.const 3 global.set $~lib/argc - local.get $2 local.get $3 + local.get $2 i32.const 3 i32.shl i32.add i64.load - local.get $3 + local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$vjii) end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 unreachable end @@ -14300,17 +14303,17 @@ (local $4 i32) local.get $0 i32.load offset=4 - local.set $2 + local.set $3 block $break|0 block i32.const 0 - local.set $3 + local.set $2 local.get $0 call $~lib/typedarray/Uint64Array#get:length local.set $4 end loop $repeat|0 - local.get $3 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -14318,21 +14321,21 @@ block i32.const 3 global.set $~lib/argc - local.get $2 local.get $3 + local.get $2 i32.const 3 i32.shl i32.add i64.load - local.get $3 + local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$vjii) end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 unreachable end @@ -14440,17 +14443,17 @@ (local $4 i32) local.get $0 i32.load offset=4 - local.set $2 + local.set $3 block $break|0 block i32.const 0 - local.set $3 + local.set $2 local.get $0 call $~lib/typedarray/Float32Array#get:length local.set $4 end loop $repeat|0 - local.get $3 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -14458,21 +14461,21 @@ block i32.const 3 global.set $~lib/argc - local.get $2 local.get $3 + local.get $2 i32.const 2 i32.shl i32.add f32.load - local.get $3 + local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$vfii) end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 unreachable end @@ -14580,17 +14583,17 @@ (local $4 i32) local.get $0 i32.load offset=4 - local.set $2 + local.set $3 block $break|0 block i32.const 0 - local.set $3 + local.set $2 local.get $0 call $~lib/typedarray/Float64Array#get:length local.set $4 end loop $repeat|0 - local.get $3 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -14598,21 +14601,21 @@ block i32.const 3 global.set $~lib/argc - local.get $2 local.get $3 + local.get $2 i32.const 3 i32.shl i32.add f64.load - local.get $3 + local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$vdii) end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 unreachable end @@ -14979,12 +14982,12 @@ (local $8 i32) (local $9 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 call $~lib/typedarray/Uint8Array#get:length local.set $6 local.get $4 @@ -15013,12 +15016,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -15027,9 +15030,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -15044,13 +15047,13 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 end block $~lib/runtime/REGISTER|inlined.1 (result i32) block $~lib/runtime/ALLOCATE|inlined.16 (result i32) i32.const 12 - local.set $7 - local.get $7 + local.set $8 + local.get $8 call $~lib/runtime/doAllocate end local.set $7 @@ -15059,10 +15062,10 @@ call $~lib/runtime/doRegister end local.set $7 - local.get $3 + local.get $5 i32.load local.set $8 - local.get $3 + local.get $5 i32.load offset=4 local.set $9 local.get $7 @@ -15076,7 +15079,7 @@ i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 0 @@ -15321,12 +15324,12 @@ (local $8 i32) (local $9 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 call $~lib/typedarray/Uint8ClampedArray#get:length local.set $6 local.get $4 @@ -15355,12 +15358,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -15369,9 +15372,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -15386,13 +15389,13 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 end block $~lib/runtime/REGISTER|inlined.1 (result i32) block $~lib/runtime/ALLOCATE|inlined.17 (result i32) i32.const 12 - local.set $7 - local.get $7 + local.set $8 + local.get $8 call $~lib/runtime/doAllocate end local.set $7 @@ -15401,10 +15404,10 @@ call $~lib/runtime/doRegister end local.set $7 - local.get $3 + local.get $5 i32.load local.set $8 - local.get $3 + local.get $5 i32.load offset=4 local.set $9 local.get $7 @@ -15418,7 +15421,7 @@ i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 0 @@ -15663,12 +15666,12 @@ (local $8 i32) (local $9 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 call $~lib/typedarray/Int16Array#get:length local.set $6 local.get $4 @@ -15697,12 +15700,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -15711,9 +15714,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -15728,13 +15731,13 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 end block $~lib/runtime/REGISTER|inlined.1 (result i32) block $~lib/runtime/ALLOCATE|inlined.18 (result i32) i32.const 12 - local.set $7 - local.get $7 + local.set $8 + local.get $8 call $~lib/runtime/doAllocate end local.set $7 @@ -15743,10 +15746,10 @@ call $~lib/runtime/doRegister end local.set $7 - local.get $3 + local.get $5 i32.load local.set $8 - local.get $3 + local.get $5 i32.load offset=4 local.set $9 local.get $7 @@ -15760,7 +15763,7 @@ i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 1 @@ -16011,12 +16014,12 @@ (local $8 i32) (local $9 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 call $~lib/typedarray/Uint16Array#get:length local.set $6 local.get $4 @@ -16045,12 +16048,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -16059,9 +16062,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -16076,13 +16079,13 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 end block $~lib/runtime/REGISTER|inlined.1 (result i32) block $~lib/runtime/ALLOCATE|inlined.19 (result i32) i32.const 12 - local.set $7 - local.get $7 + local.set $8 + local.get $8 call $~lib/runtime/doAllocate end local.set $7 @@ -16091,10 +16094,10 @@ call $~lib/runtime/doRegister end local.set $7 - local.get $3 + local.get $5 i32.load local.set $8 - local.get $3 + local.get $5 i32.load offset=4 local.set $9 local.get $7 @@ -16108,7 +16111,7 @@ i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 1 @@ -16575,12 +16578,12 @@ (local $8 i32) (local $9 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 call $~lib/typedarray/Uint32Array#get:length local.set $6 local.get $4 @@ -16609,12 +16612,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -16623,9 +16626,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -16640,13 +16643,13 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 end block $~lib/runtime/REGISTER|inlined.1 (result i32) block $~lib/runtime/ALLOCATE|inlined.20 (result i32) i32.const 12 - local.set $7 - local.get $7 + local.set $8 + local.get $8 call $~lib/runtime/doAllocate end local.set $7 @@ -16655,10 +16658,10 @@ call $~lib/runtime/doRegister end local.set $7 - local.get $3 + local.get $5 i32.load local.set $8 - local.get $3 + local.get $5 i32.load offset=4 local.set $9 local.get $7 @@ -16672,7 +16675,7 @@ i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 2 @@ -16911,12 +16914,12 @@ (local $8 i32) (local $9 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 call $~lib/typedarray/Int64Array#get:length local.set $6 local.get $4 @@ -16945,12 +16948,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -16959,9 +16962,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -16976,13 +16979,13 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 end block $~lib/runtime/REGISTER|inlined.1 (result i32) block $~lib/runtime/ALLOCATE|inlined.21 (result i32) i32.const 12 - local.set $7 - local.get $7 + local.set $8 + local.get $8 call $~lib/runtime/doAllocate end local.set $7 @@ -16991,10 +16994,10 @@ call $~lib/runtime/doRegister end local.set $7 - local.get $3 + local.get $5 i32.load local.set $8 - local.get $3 + local.get $5 i32.load offset=4 local.set $9 local.get $7 @@ -17008,7 +17011,7 @@ i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 3 @@ -17250,12 +17253,12 @@ (local $8 i32) (local $9 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 call $~lib/typedarray/Uint64Array#get:length local.set $6 local.get $4 @@ -17284,12 +17287,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -17298,9 +17301,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -17315,13 +17318,13 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 end block $~lib/runtime/REGISTER|inlined.1 (result i32) block $~lib/runtime/ALLOCATE|inlined.22 (result i32) i32.const 12 - local.set $7 - local.get $7 + local.set $8 + local.get $8 call $~lib/runtime/doAllocate end local.set $7 @@ -17330,10 +17333,10 @@ call $~lib/runtime/doRegister end local.set $7 - local.get $3 + local.get $5 i32.load local.set $8 - local.get $3 + local.get $5 i32.load offset=4 local.set $9 local.get $7 @@ -17347,7 +17350,7 @@ i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 3 @@ -17589,12 +17592,12 @@ (local $8 i32) (local $9 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 + local.set $3 + local.get $5 call $~lib/typedarray/Float32Array#get:length local.set $6 local.get $4 @@ -17623,12 +17626,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -17637,9 +17640,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -17654,13 +17657,13 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 end block $~lib/runtime/REGISTER|inlined.1 (result i32) block $~lib/runtime/ALLOCATE|inlined.23 (result i32) i32.const 12 - local.set $7 - local.get $7 + local.set $8 + local.get $8 call $~lib/runtime/doAllocate end local.set $7 @@ -17669,10 +17672,10 @@ call $~lib/runtime/doRegister end local.set $7 - local.get $3 + local.get $5 i32.load local.set $8 - local.get $3 + local.get $5 i32.load offset=4 local.set $9 local.get $7 @@ -17686,7 +17689,7 @@ i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 2 From 952ac8627d44390d3e6f44122af7df80b76510c3 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 20 Mar 2019 17:12:33 +0100 Subject: [PATCH 056/119] stdlib unlink wiring --- std/assembly/array.ts | 36 ++++++++++++++------------ std/assembly/fixedarray.ts | 23 ++++++++-------- std/assembly/map.ts | 24 ++++++++++------- std/assembly/set.ts | 11 ++++---- tests/compiler/std/array.optimized.wat | 12 ++++----- tests/compiler/std/array.untouched.wat | 18 ++++++------- 6 files changed, 65 insertions(+), 59 deletions(-) diff --git a/std/assembly/array.ts b/std/assembly/array.ts index ac91a75cf3..c500c8787e 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -1,4 +1,4 @@ -import { ALLOCATE, REALLOCATE, DISCARD, LINK, REGISTER, MAX_BYTELENGTH, ArrayBufferView } from "./runtime"; +import { ALLOCATE, REALLOCATE, DISCARD, LINK, REGISTER, MAX_BYTELENGTH, ArrayBufferView, UNLINK } from "./runtime"; import { ArrayBuffer } from "./arraybuffer"; import { COMPARATOR, SORT } from "./util/sort"; import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number"; @@ -73,11 +73,14 @@ export class Array extends ArrayBufferView { @operator("[]=") // unchecked is built-in private __set(index: i32, value: T): void { ensureCapacity(this, index + 1, alignof()); - store(this.dataStart + (index << alignof()), - isManaged() - ? LINK(value, this) - : value - ); + if (isManaged()) { + let offset = this.dataStart + (index << alignof()); + let oldValue = load(offset); + store(offset, LINK(value, this)); + UNLINK(oldValue, this); // order is important + } else { + store(this.dataStart + (index << alignof()), value); + } if (index >= this.length_) this.length_ = index + 1; } @@ -324,20 +327,21 @@ export class Array extends ArrayBufferView { var length = this.length_; start = start < 0 ? max(length + start, 0) : min(start, length); deleteCount = max(min(deleteCount, length - start), 0); - var splice = new Array(deleteCount); - var spliceStart = splice.dataStart; + var result = new Array(deleteCount); + var resultStart = result.dataStart; var thisStart = this.dataStart; var thisBase = thisStart + (start << alignof()); for (let i = 0; i < deleteCount; ++i) { - let element = load(thisBase + (i << alignof())); - store(spliceStart + (i << alignof()), - isManaged() - ? LINK>(element, splice) - : element - ); + let deleted = load(thisBase + (i << alignof())); + if (isManaged()) { + store(resultStart + (i << alignof()), LINK>(deleted, result)); + UNLINK(deleted, this); // order is important + } else { + store(resultStart + (i << alignof()), deleted); + } } memory.copy( - splice.dataStart, + result.dataStart, thisBase, deleteCount << alignof() ); @@ -350,7 +354,7 @@ export class Array extends ArrayBufferView { ); } this.length_ = length - deleteCount; - return splice; + return result; } reverse(): Array { diff --git a/std/assembly/fixedarray.ts b/std/assembly/fixedarray.ts index 954c4e1168..b888eeaabe 100644 --- a/std/assembly/fixedarray.ts +++ b/std/assembly/fixedarray.ts @@ -1,4 +1,4 @@ -import { ALLOCATE, REGISTER, MAX_BYTELENGTH, HEADER, HEADER_SIZE, LINK } from "./runtime"; +import { ALLOCATE, REGISTER, MAX_BYTELENGTH, HEADER, HEADER_SIZE, LINK, UNLINK } from "./runtime"; // NOTE: DO NOT USE YET! @@ -22,16 +22,12 @@ export class FixedArray { @operator("[]") private __get(index: i32): T { if (index >= this.length) throw new RangeError("Offset out of bounds"); - return load(changetype(this) + (index << alignof())); + return this.__unchecked_get(index); } @operator("[]=") private __set(index: i32, value: T): void { if (index >= this.length) throw new RangeError("Offset out of bounds"); - store(changetype(this) + (index << alignof()), - isManaged() - ? LINK(value, this) - : value - ); + return this.__unchecked_set(index, value); } @operator("{}") private __unchecked_get(index: i32): T { @@ -39,10 +35,13 @@ export class FixedArray { } @operator("{}=") private __unchecked_set(index: i32, value: T): void { - store(changetype(this) + (index << alignof()), - isManaged() - ? LINK(value, this) - : value - ); + if (isManaged()) { + let offset = changetype(this) + (index << alignof()); + let oldValue = load(offset); + store(offset, LINK(value, this)); + UNLINK(oldValue, this); // order is important + } else { + store(changetype(this) + (index << alignof()), value); + } } } diff --git a/std/assembly/map.ts b/std/assembly/map.ts index 48dcb309a1..93784ff1c4 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -1,4 +1,4 @@ -import { LINK } from "./runtime"; +import { LINK, UNLINK } from "./runtime"; import { HASH } from "./util/hash"; // A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht @@ -102,9 +102,15 @@ export class Map { set(key: K, value: V): void { var hashCode = HASH(key); - var entry = this.find(key, hashCode); + var entry = this.find(key, hashCode); // unmanaged! if (entry) { - entry.value = value; + if (isManaged()) { + let oldValue = entry.value; + entry.value = LINK(value, this); + UNLINK(oldValue, this); // order is important + } else { + entry.value = value; + } } else { // check if rehashing is necessary if (this.entriesOffset == this.entriesCapacity) { @@ -119,13 +125,9 @@ export class Map { entry = changetype>( changetype(entries) + this.entriesOffset++ * ENTRY_SIZE() ); - // link with the map (entry is unmanaged) - entry.key = isManaged() - ? LINK(key, this) - : key; - entry.value = isManaged() - ? LINK(value, this) - : value; + // link with the map + entry.key = isManaged() ? LINK(key, this) : key; + entry.value = isManaged() ? LINK(value, this) : value; ++this.entriesCount; // link with previous entry in bucket let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE; @@ -137,6 +139,8 @@ export class Map { delete(key: K): bool { var entry = this.find(key, HASH(key)); if (!entry) return false; + if (isManaged()) UNLINK(entry.key, this); + if (isManaged()) UNLINK(entry.value, this); entry.taggedNext |= EMPTY; --this.entriesCount; // check if rehashing is appropriate diff --git a/std/assembly/set.ts b/std/assembly/set.ts index 991741ec52..8d070e1749 100644 --- a/std/assembly/set.ts +++ b/std/assembly/set.ts @@ -1,4 +1,4 @@ -import { LINK } from "./runtime"; +import { LINK, UNLINK } from "./runtime"; import { HASH } from "./util/hash"; // A deterministic hash set based on CloseTable from https://github.com/jorendorff/dht @@ -93,7 +93,7 @@ export class Set { add(key: K): void { var hashCode = HASH(key); - var entry = this.find(key, hashCode); + var entry = this.find(key, hashCode); // unmanaged! if (!entry) { // check if rehashing is necessary if (this.entriesOffset == this.entriesCapacity) { @@ -108,10 +108,8 @@ export class Set { entry = changetype>( changetype(entries) + this.entriesOffset++ * ENTRY_SIZE() ); - // link with the set itself (entry is unmanaged) - entry.key = isManaged() - ? LINK(key, this) - : key; + // link with the set + entry.key = isManaged() ? LINK(key, this) : key; ++this.entriesCount; // link with previous entry in bucket let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE; @@ -123,6 +121,7 @@ export class Set { delete(key: K): bool { var entry = this.find(key, HASH(key)); if (!entry) return false; + if (isManaged()) UNLINK(entry.key, this); entry.taggedNext |= EMPTY; --this.entriesCount; // check if rehashing is appropriate diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 81675dfde0..c814bd71cc 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2298,7 +2298,7 @@ if i32.const 0 i32.const 208 - i32.const 200 + i32.const 203 i32.const 20 call $~lib/env/abort unreachable @@ -2565,7 +2565,7 @@ if i32.const 0 i32.const 208 - i32.const 261 + i32.const 264 i32.const 20 call $~lib/env/abort unreachable @@ -4096,7 +4096,7 @@ if i32.const 0 i32.const 208 - i32.const 374 + i32.const 378 i32.const 4 call $~lib/env/abort unreachable @@ -4592,7 +4592,7 @@ if i32.const 0 i32.const 208 - i32.const 374 + i32.const 378 i32.const 4 call $~lib/env/abort unreachable @@ -5111,7 +5111,7 @@ if i32.const 0 i32.const 208 - i32.const 374 + i32.const 378 i32.const 4 call $~lib/env/abort unreachable @@ -5436,7 +5436,7 @@ if i32.const 0 i32.const 208 - i32.const 374 + i32.const 378 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 45a5bbf6fa..09ee0b989c 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -2967,7 +2967,7 @@ if i32.const 0 i32.const 208 - i32.const 200 + i32.const 203 i32.const 20 call $~lib/env/abort unreachable @@ -3326,7 +3326,7 @@ if i32.const 0 i32.const 208 - i32.const 261 + i32.const 264 i32.const 20 call $~lib/env/abort unreachable @@ -5302,7 +5302,7 @@ if i32.const 0 i32.const 208 - i32.const 374 + i32.const 378 i32.const 4 call $~lib/env/abort unreachable @@ -5912,7 +5912,7 @@ if i32.const 0 i32.const 208 - i32.const 374 + i32.const 378 i32.const 4 call $~lib/env/abort unreachable @@ -6547,7 +6547,7 @@ if i32.const 0 i32.const 208 - i32.const 374 + i32.const 378 i32.const 4 call $~lib/env/abort unreachable @@ -7051,7 +7051,7 @@ if i32.const 0 i32.const 208 - i32.const 374 + i32.const 378 i32.const 4 call $~lib/env/abort unreachable @@ -7626,7 +7626,7 @@ if i32.const 0 i32.const 208 - i32.const 374 + i32.const 378 i32.const 4 call $~lib/env/abort unreachable @@ -7990,7 +7990,7 @@ if i32.const 0 i32.const 208 - i32.const 374 + i32.const 378 i32.const 4 call $~lib/env/abort unreachable @@ -8247,7 +8247,7 @@ if i32.const 0 i32.const 208 - i32.const 374 + i32.const 378 i32.const 4 call $~lib/env/abort unreachable From f44dbf26462bb99b5d066474c88176deb819481a Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 20 Mar 2019 18:36:58 +0100 Subject: [PATCH 057/119] quick pure gc prototype --- std/assembly/allocator/tlsf.ts | 5 + std/assembly/collector/pure.ts | 261 +++++++++++++++++++++++++++++++++ 2 files changed, 266 insertions(+) create mode 100644 std/assembly/collector/pure.ts diff --git a/std/assembly/allocator/tlsf.ts b/std/assembly/allocator/tlsf.ts index c4bf9991e4..bb843b3dc7 100644 --- a/std/assembly/allocator/tlsf.ts +++ b/std/assembly/allocator/tlsf.ts @@ -1,3 +1,8 @@ +// Two-Level Segregate Fit Memory Allocator. +// +// A general purpose dynamic memory allocator specifically designed to meet real-time requirements. +// Always aligns to 8 bytes. + // ╒══════════════ Block size interpretation (32-bit) ═════════════╕ // 3 2 1 // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits diff --git a/std/assembly/collector/pure.ts b/std/assembly/collector/pure.ts new file mode 100644 index 0000000000..d10e40fa25 --- /dev/null +++ b/std/assembly/collector/pure.ts @@ -0,0 +1,261 @@ +// A Pure Reference Counting Garbage Collector +// +// After the paper by DAVID F. BACON, CLEMENT R. ATTANASIO, V.T. RAJAN, STEPHEN E.SMITH +// D.Bacon, IBM T.J. Watson Research Center +// 2001 ACM 0164-0925/99/0100-0111 $00.75 + +import { HEADER, HEADER_SIZE } from "../runtime"; + +ERROR("not implemented"); + +/* tslint:disable */ + +// TODO: new builtin +declare function ITERATECHILDREN(s: Header, fn: (t: Header) => void): void; + +/** Object Colorings for Cycle Collection */ +const enum Color { + /** In use or free. */ + BLACK = 0, + /** Possible member of cycle. */ + GRAY = 1, + /** Member of garbage cycle. */ + WHITE = 2, + /** Possible root of cycle. */ + PURPLE = 3, + /** Acyclic. */ + GREEN = 4 +} + +// TODO: this is a placeholder -> map this to HEADER +class Header { + rc: u32; + color: Color; + buffered: bool; +} + +// When reference counts are decremented, we place potential roots of cyclic garbage into a buffer +// called Roots. Periodically, we process this buffer and look for cycles by subtracting internal +// reference counts. + +var rootsBuffer: usize = 0; +var rootsOffset: usize = 0; // insertion offset +var rootsLength: usize = 0; // insertion limit + +function appendRoot(header: Header): void { + if (rootsOffset >= rootsLength) { + // grow for now + let newLength = rootsLength ? 2 * rootsLength : 256 * sizeof(); + let newBuffer = memory.allocate(newLength); + memory.copy(newBuffer, rootsBuffer, rootsLength); + rootsBuffer = newBuffer; + rootsLength = newLength; + } + store(rootsBuffer + rootsOffset, header); + rootsOffset += sizeof(); +} + +function systemFree(s: Header): void { + memory.free(changetype(s)); +} + +// When a reference to a node S is created, the reference count of T is incremented and it is +// colored black, since any object whose reference count was just incremented can not be garbage. + +function increment(s: Header): void { + s.rc += 1; + s.color = Color.BLACK; +} + +// When a reference to a node S is deleted, the reference count is decremented. If the reference +// count reaches zero, the procedure Release is invoked to free the garbage node. If the reference +// count does not reach zero, the node is considered as a possible root of a cycle. + +function decrement(s: Header): void { + s.rc -= 1; + if (!s.rc) release(s); + else possibleRoot(s); +} + +// When the reference count of a node reaches zero, the contained pointers are deleted, the object +// is colored black, and unless it has been buffered, it is freed. If it has been buffered, it is +// in the Roots buffer and will be freed later (in the procedure MarkRoots). + +function release(s: Header): void { + ITERATECHILDREN(s, t => decrement(t)); + s.color = Color.BLACK; + if (!s.buffered) systemFree(s); +} + +// When the reference count of S is decremented but does not reach zero, it is considered as a +// possible root of a garbage cycle. If its color is already purple, then it is already a candidate +// root; if not, its color is set to purple. Then the buffered flag is checked to see if it has +// been purple since we last performed a cycle collection. If it is not buffered, it is added to +// the buffer of possible roots. + +function possibleRoot(s: Header): void { + if (s.color != Color.PURPLE) { + s.color = Color.PURPLE; + if (!s.buffered) { + s.buffered = true; + appendRoot(s); + } + } +} + +// When the root buffer is full, or when some other condition, such as low memory occurs, the +// actual cycle collection operation is invoked. This operation has three phases: MarkRoots, which +// removes internal reference counts; ScanRoots, which restores reference counts when they are +// non-zero; and finally CollectRoots, which actually collects the cyclic garbage. + +function collectCycles(): void { + markRoots(); + scanRoots(); + collectRoots(); +} + +// The marking phase looks at all the nodes S whose pointers have been stored in the Roots buffer +// since the last cycle collection. If the color of the node is purple (indicating a possible root +// of a garbage cycle) and the reference count has not become zero, then MarkGray(S) is invoked to +// perform a depth-first search in which the reached nodes are colored gray and internal reference +// counts are subtracted. Otherwise, the node is removed from the Roots buffer, the buffered flag +// is cleared, and if the reference count is zero the object is freed. + +function markRoots(): void { + var readOffset = rootsBuffer; + var writeOffset = readOffset; + var readLimit = readOffset + rootsOffset; + while (readOffset < readLimit) { + let s = load
(readOffset); + if (s.color == Color.PURPLE && s.rc > 0) { + markGray(s); + store
(writeOffset, s); + writeOffset += sizeof(); + } else { + s.buffered = false; + // remove from roots + if (s.color == Color.BLACK && !s.rc) systemFree(s); + } + readOffset += sizeof(); + } + rootsOffset = writeOffset - rootsBuffer; +} + +// For each node S that was considered by MarkGray(S), this procedure invokes Scan(S) to either +// color the garbage subgraph white or re-color the live subgraph black. + +function scanRoots(): void { + var readOffset = rootsBuffer; + var readLimit = readOffset + rootsOffset; + while (readOffset < readLimit) { + scan(load
(readOffset)); + readOffset += sizeof(); + } +} + +// After the ScanRoots phase of the CollectCycles procedure, any remaining white nodes will be +// cyclic garbage and will be reachable from the Roots buffer. This prodecure invokes CollectWhite +// for each node in the Roots buffer to collect the garbage; all nodes in the root buffer are +// removed and their buffered flag is cleared. + +function collectRoots(): void { + var readOffset = rootsBuffer; + var readLimit = readOffset + rootsOffset; + while (readOffset < readLimit) { + let s = load
(readOffset); + // remove from roots + s.buffered = false; + collectWhite(s); + } + rootsOffset = 0; +} + +// This procedure performs a simple depth-first traversal of the graph beginning at S, marking +// visited nodes gray and removing internal reference counts as it goes. + +function markGray(s: Header): void { + if (s.color != Color.GRAY) { + s.color = Color.GRAY; + ITERATECHILDREN(s, t => { + t.rc -= 1; + markGray(t); + }); + } +} + +// If this procedure finds a gray object whose reference count is greater than one, then that +// object and everything reachable from it are live data; it will therefore call ScanBlack(S) in +// order to re-color the reachable subgraph and restore the reference counts subtracted by +// MarkGray. However, if the color of an object is gray and its reference count is zero, then it is +// colored white, and Scan is invoked upon its chldren. Note that an object may be colored white +// and then re-colored black if it is reachable from some subsequently discovered live node. + +function scan(s: Header): void { + if (s.color == Color.GRAY) { + if (s.rc > 0) scanBlack(s); + else { + s.color = Color.WHITE; + ITERATECHILDREN(s, t => scan(t)); + } + } + +} + +// This procedure performs the inverse operation of MarkGray, visiting the nodes, changing the +// color of objects back to black, and restoring their reference counts. + +function scanBlack(s: Header): void { + s.color = Color.BLACK; + ITERATECHILDREN(s, t => { + t.rc += 1; + if (t.color == Color.BLACK) scanBlack(t); + }); +} + +// This procedure recursively frees all white objects, re-coloring them black as it goes. If a +// white object is buffered, it is not freed; it will be freed later when it is found in the Roots +// buffer. + +function collectWhite(s: Header): void { + if (s.color == Color.WHITE && !s.buffered) { + s.color = Color.BLACK; + ITERATECHILDREN(s, t => collectWhite(t)); + systemFree(s); + } +} + +// Garbage collector interface + +// @ts-ignore: decorator +@global +function __gc_link(ref: usize, parentRef: usize): void { + increment(changetype
(ref - HEADER_SIZE)); +} + +// @ts-ignore: decorator +@global +function __gc_unlink(ref: usize, parentRef: usize): void { + decrement(changetype
(ref - HEADER_SIZE)) +} + +// @ts-ignore: decorator +@global +function __gc_collect(): void { + collectCycles(); +} + +// TODO: + +// A significant constant-factor improvement can be obtained for cycle collection by observice that +// some objects are inherently acyclic. We speculate that they will comprise the majorits of +// objects in many applications. Therefore, if we can avoid cycle collection for inherently acyclic +// object, we will significantly reduce the overhead of cycle collection as a whole. [...] +// +// Acyclic classes may contain: +// - scalars; +// - references to classes that are both acyclic and final; and +// - arrays of either of the above. +// +// Our implementation marks objects whose class is acyclic with the special color green. Green +// objects are ignored by the cycle collection algorithm, except that when a dead cycle refers to +// green objects, they are collected along with the dead cycle. From 88a595f4cb2cac4f1e1b579523459025ea2319d1 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 20 Mar 2019 22:40:07 +0100 Subject: [PATCH 058/119] some thoughts on pure gc --- std/assembly/collector/pure.ts | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/std/assembly/collector/pure.ts b/std/assembly/collector/pure.ts index d10e40fa25..f6fff12f62 100644 --- a/std/assembly/collector/pure.ts +++ b/std/assembly/collector/pure.ts @@ -1,7 +1,7 @@ // A Pure Reference Counting Garbage Collector // -// After the paper by DAVID F. BACON, CLEMENT R. ATTANASIO, V.T. RAJAN, STEPHEN E.SMITH -// D.Bacon, IBM T.J. Watson Research Center +// After the paper by DAVID F. BACON, CLEMENT R. ATTANASIO, V.T. RAJAN, STEPHEN E. SMITH +// D. Bacon, IBM T.J. Watson Research Center // 2001 ACM 0164-0925/99/0100-0111 $00.75 import { HEADER, HEADER_SIZE } from "../runtime"; @@ -10,8 +10,9 @@ ERROR("not implemented"); /* tslint:disable */ -// TODO: new builtin +// TODO: new builtins declare function ITERATECHILDREN(s: Header, fn: (t: Header) => void): void; +declare function ISACYCLIC(s: Header): bool; /** Object Colorings for Cycle Collection */ const enum Color { @@ -42,16 +43,17 @@ var rootsBuffer: usize = 0; var rootsOffset: usize = 0; // insertion offset var rootsLength: usize = 0; // insertion limit -function appendRoot(header: Header): void { +function appendRoot(s: Header): void { if (rootsOffset >= rootsLength) { // grow for now let newLength = rootsLength ? 2 * rootsLength : 256 * sizeof(); let newBuffer = memory.allocate(newLength); - memory.copy(newBuffer, rootsBuffer, rootsLength); + memory.copy(newBuffer, rootsBuffer, rootsOffset); rootsBuffer = newBuffer; rootsLength = newLength; + memory.free(rootsBuffer); } - store(rootsBuffer + rootsOffset, header); + store(rootsBuffer + rootsOffset, s); rootsOffset += sizeof(); } @@ -64,7 +66,7 @@ function systemFree(s: Header): void { function increment(s: Header): void { s.rc += 1; - s.color = Color.BLACK; + s.color = ISACYCLIC(s) ? Color.GREEN : Color.BLACK; // TODO: is this about correct? } // When a reference to a node S is deleted, the reference count is decremented. If the reference @@ -73,8 +75,15 @@ function increment(s: Header): void { function decrement(s: Header): void { s.rc -= 1; - if (!s.rc) release(s); - else possibleRoot(s); + if (s.color == Color.GREEN) { // if (ISACYCLIC()) { ... } + if (!s.rc) systemFree(s); + // TODO: is this correct? here, if `decrement` was generic (propagate from UNLINK) + // the green condition could be eliminated both here and in increment (just using black). + // acyclic types also don't need ITERATECHILDREN then as these really just inc/dec/free. + } else { + if (!s.rc) release(s); + else possibleRoot(s); + } } // When the reference count of a node reaches zero, the contained pointers are deleted, the object @@ -82,7 +91,7 @@ function decrement(s: Header): void { // in the Roots buffer and will be freed later (in the procedure MarkRoots). function release(s: Header): void { - ITERATECHILDREN(s, t => decrement(t)); + ITERATECHILDREN(s, t => decrement(t)); // TODO: skip if acyclic ? s.color = Color.BLACK; if (!s.buffered) systemFree(s); } @@ -208,7 +217,7 @@ function scanBlack(s: Header): void { s.color = Color.BLACK; ITERATECHILDREN(s, t => { t.rc += 1; - if (t.color == Color.BLACK) scanBlack(t); + if (t.color != Color.BLACK) scanBlack(t); }); } @@ -246,7 +255,7 @@ function __gc_collect(): void { // TODO: -// A significant constant-factor improvement can be obtained for cycle collection by observice that +// A significant constant-factor improvement can be obtained for cycle collection by observing that // some objects are inherently acyclic. We speculate that they will comprise the majorits of // objects in many applications. Therefore, if we can avoid cycle collection for inherently acyclic // object, we will significantly reduce the overhead of cycle collection as a whole. [...] From 658a380786b532bf80513b291b4b3483a2bdb252 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 20 Mar 2019 22:43:12 +0100 Subject: [PATCH 059/119] whoops --- std/assembly/collector/pure.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/std/assembly/collector/pure.ts b/std/assembly/collector/pure.ts index f6fff12f62..99478f6d26 100644 --- a/std/assembly/collector/pure.ts +++ b/std/assembly/collector/pure.ts @@ -49,9 +49,9 @@ function appendRoot(s: Header): void { let newLength = rootsLength ? 2 * rootsLength : 256 * sizeof(); let newBuffer = memory.allocate(newLength); memory.copy(newBuffer, rootsBuffer, rootsOffset); + memory.free(rootsBuffer); rootsBuffer = newBuffer; rootsLength = newLength; - memory.free(rootsBuffer); } store(rootsBuffer + rootsOffset, s); rootsOffset += sizeof(); From 3fc9f550ad92accd63a950d9958ae564db79cf18 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 21 Mar 2019 10:44:14 +0100 Subject: [PATCH 060/119] more general gc hooks? --- src/builtins.ts | 9 ++- src/common.ts | 3 +- src/compiler.ts | 18 +++--- src/program.ts | 14 +++-- std/assembly/array.ts | 47 +++++++------- std/assembly/collector/pure.ts | 5 +- std/assembly/fixedarray.ts | 19 +++++- std/assembly/map.ts | 52 +++++++-------- std/assembly/runtime.ts | 16 ++--- std/assembly/set.ts | 38 +++++------ std/assembly/string.ts | 4 +- tests/compiler/std/runtime.optimized.wat | 76 +++++++++++----------- tests/compiler/std/runtime.untouched.wat | 80 ++++++++++++------------ 13 files changed, 200 insertions(+), 181 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index 142011a537..2ff4516d7c 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -4287,13 +4287,12 @@ export function compileBuiltinArraySetWithValue( } } - // handle Array: value = LINK(value, this) + // handle Array: value = RETAIN(value, this) if (isManaged) { let program = compiler.program; - let linkPrototype = assert(program.linkPrototype); - let linkInstance = compiler.resolver.resolveFunction(linkPrototype, [ type, target.type ]); - if (!linkInstance) return module.createUnreachable(); - valueExpr = compiler.makeCallInlinePrechecked(linkInstance, [ + let retainInstance = compiler.resolver.resolveFunction(assert(program.retainPrototype), [ type, target.type ]); + if (!retainInstance) return module.createUnreachable(); + valueExpr = compiler.makeCallInlinePrechecked(retainInstance, [ valueExpr, module.createGetLocal(assert(tempThis).index, nativeSizeType) ], 0, true); diff --git a/src/common.ts b/src/common.ts index f53af582dc..dc38a71dee 100644 --- a/src/common.ts +++ b/src/common.ts @@ -187,7 +187,8 @@ export namespace LibrarySymbols { export const REALLOCATE = "REALLOCATE"; export const DISCARD = "DISCARD"; export const REGISTER = "REGISTER"; - export const LINK = "LINK"; + export const RETAIN = "RETAIN"; + export const RELEASE = "RELEASE"; export const WRAPARRAY = "WRAPARRAY"; // other export const length = "length"; diff --git a/src/compiler.ts b/src/compiler.ts index 98ccb0c203..3a8d86506b 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -4870,16 +4870,16 @@ export class Compiler extends DiagnosticEmitter { let program = this.program; let tempThis: Local | null = null; if (type.isManaged(program) && thisType.isManaged(program)) { - let linkInstance = this.resolver.resolveFunction(assert(program.linkPrototype), [ type, thisType ]); - if (!linkInstance) { + let retainInstance = this.resolver.resolveFunction(assert(program.retainPrototype), [ type, thisType ]); + if (!retainInstance) { this.currentType = tee ? type : Type.void; return module.createUnreachable(); } tempThis = this.currentFlow.getTempLocal(thisType, false); // this = (tempThis = this) thisExpr = module.createTeeLocal(tempThis.index, thisExpr); - // value = LINK(value, tempThis) - valueWithCorrectType = this.makeCallInlinePrechecked(linkInstance, [ + // value = RETAIN(value, tempThis) + valueWithCorrectType = this.makeCallInlinePrechecked(retainInstance, [ valueWithCorrectType, module.createGetLocal(tempThis.index, this.options.nativeSizeType) ], 0, true); @@ -6795,8 +6795,8 @@ export class Compiler extends DiagnosticEmitter { ) ); var isManaged = elementType.isManaged(program) && arrayType.isManaged(program); - var linkInstance = isManaged - ? this.resolver.resolveFunction(assert(program.linkPrototype), [ elementType, arrayType ]) + var retainInstance = isManaged + ? this.resolver.resolveFunction(assert(program.retainPrototype), [ elementType, arrayType ]) : null; for (let i = 0, alignLog2 = elementType.alignLog2; i < length; ++i) { let valueExpression = expressions[i]; @@ -6804,11 +6804,11 @@ export class Compiler extends DiagnosticEmitter { ? this.compileExpression(valueExpression, elementType, ConversionKind.IMPLICIT, WrapMode.NONE) : elementType.toNativeZero(module); if (isManaged) { - if (!linkInstance) { + if (!retainInstance) { valueExpr = module.createUnreachable(); } else { - // value = LINK(value, tempThis) - valueExpr = this.makeCallInlinePrechecked(linkInstance, [ + // value = RETAIN(value, tempThis) + valueExpr = this.makeCallInlinePrechecked(retainInstance, [ valueExpr, module.createGetLocal(tempThis.index, nativeArrayType) ], 0, true); diff --git a/src/program.ts b/src/program.ts index c194322eae..809995c6ae 100644 --- a/src/program.ts +++ b/src/program.ts @@ -364,8 +364,10 @@ export class Program extends DiagnosticEmitter { discardInstance: Function | null = null; /** Runtime register function. */ registerPrototype: FunctionPrototype | null = null; - /** Runtime link function. */ - linkPrototype: FunctionPrototype | null = null; + /** Runtime retain function. */ + retainPrototype: FunctionPrototype | null = null; + /** Runtime release function. */ + releasePrototype: FunctionPrototype | null = null; /** Runtime wrap array function. */ wrapArrayPrototype: FunctionPrototype | null = null; @@ -828,9 +830,13 @@ export class Program extends DiagnosticEmitter { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.registerPrototype = element; } - if (element = this.lookupGlobal(LibrarySymbols.LINK)) { + if (element = this.lookupGlobal(LibrarySymbols.RETAIN)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); - this.linkPrototype = element; + this.retainPrototype = element; + } + if (element = this.lookupGlobal(LibrarySymbols.RELEASE)) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.releasePrototype = element; } if (element = this.lookupGlobal(LibrarySymbols.WRAPARRAY)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); diff --git a/std/assembly/array.ts b/std/assembly/array.ts index c500c8787e..4fbebd339d 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -1,4 +1,4 @@ -import { ALLOCATE, REALLOCATE, DISCARD, LINK, REGISTER, MAX_BYTELENGTH, ArrayBufferView, UNLINK } from "./runtime"; +import { ALLOCATE, REALLOCATE, DISCARD, RETAIN, RELEASE, REGISTER, MAX_BYTELENGTH, ArrayBufferView } from "./runtime"; import { ArrayBuffer } from "./arraybuffer"; import { COMPARATOR, SORT } from "./util/sort"; import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number"; @@ -76,8 +76,8 @@ export class Array extends ArrayBufferView { if (isManaged()) { let offset = this.dataStart + (index << alignof()); let oldValue = load(offset); - store(offset, LINK(value, this)); - UNLINK(oldValue, this); // order is important + store(offset, RETAIN(value, this)); + RELEASE(oldValue, this); // order is important } else { store(this.dataStart + (index << alignof()), value); } @@ -140,7 +140,7 @@ export class Array extends ArrayBufferView { this.length_ = newLength; store(this.dataStart + ((newLength - 1) << alignof()), isManaged() - ? LINK(element, this) + ? RETAIN(element, this) : element ); return newLength; @@ -156,13 +156,13 @@ export class Array extends ArrayBufferView { let thisStart = this.dataStart; for (let offset: usize = 0; offset < thisSize; offset += sizeof()) { let element = load(thisStart + offset); - store(outStart + offset, LINK>(element, out)); + store(outStart + offset, RETAIN>(element, out)); } let otherStart = other.dataStart; let otherSize = otherLen << alignof(); for (let offset: usize = 0; offset < otherSize; offset += sizeof()) { let element = load(otherStart + offset); - store(outStart + thisSize + offset, LINK>(element, out)); + store(outStart + thisSize + offset, RETAIN>(element, out)); } } else { memory.copy(outStart, this.dataStart, thisSize); @@ -221,7 +221,7 @@ export class Array extends ArrayBufferView { let result = callbackfn(value, index, this); store(outStart + (index << alignof()), isManaged() - ? LINK>(result, out) + ? RETAIN>(result, out) : result ); } @@ -296,7 +296,7 @@ export class Array extends ArrayBufferView { ); store(base, isManaged() - ? LINK(element, this) + ? RETAIN(element, this) : element ); this.length_ = newLength; @@ -316,7 +316,7 @@ export class Array extends ArrayBufferView { let element = load(thisBase + offset); store(sliceBase + offset, isManaged() - ? LINK>(element, slice) + ? RETAIN>(element, slice) : element ); } @@ -334,8 +334,8 @@ export class Array extends ArrayBufferView { for (let i = 0; i < deleteCount; ++i) { let deleted = load(thisBase + (i << alignof())); if (isManaged()) { - store(resultStart + (i << alignof()), LINK>(deleted, result)); - UNLINK(deleted, this); // order is important + store(resultStart + (i << alignof()), RETAIN>(deleted, result)); + RELEASE(deleted, this); // order is important } else { store(resultStart + (i << alignof()), deleted); } @@ -655,16 +655,17 @@ export class Array extends ArrayBufferView { return this.join(); } - // private __gc(): void { - // var buffer = this.buffer_; - // __gc_mark(changetype(buffer)); // tslint:disable-line - // if (isManaged()) { - // let offset: usize = 0; - // let end = this.length_ << alignof(); - // while (offset < end) { - // __gc_mark(load(changetype(buffer) + offset, HEADER_SIZE)); // tslint:disable-line - // offset += sizeof(); - // } - // } - // } + // GC integration + + @unsafe private __iter(fn: (ref: usize) => void): void { + fn(changetype(this.data)); + if (isManaged()) { + let cur = this.dataStart; + let end = cur + this.dataLength; + while (cur < end) { + fn(load(cur)); + cur += sizeof(); + } + } + } } diff --git a/std/assembly/collector/pure.ts b/std/assembly/collector/pure.ts index 99478f6d26..0ced1fc4c4 100644 --- a/std/assembly/collector/pure.ts +++ b/std/assembly/collector/pure.ts @@ -1,8 +1,7 @@ // A Pure Reference Counting Garbage Collector // -// After the paper by DAVID F. BACON, CLEMENT R. ATTANASIO, V.T. RAJAN, STEPHEN E. SMITH -// D. Bacon, IBM T.J. Watson Research Center -// 2001 ACM 0164-0925/99/0100-0111 $00.75 +// After the paper by D. Bacon et al., 2001, IBM T.J. Watson Research Center +// https://researcher.watson.ibm.com/researcher/files/us-bacon/Bacon03Pure.pdf import { HEADER, HEADER_SIZE } from "../runtime"; diff --git a/std/assembly/fixedarray.ts b/std/assembly/fixedarray.ts index b888eeaabe..fc209af901 100644 --- a/std/assembly/fixedarray.ts +++ b/std/assembly/fixedarray.ts @@ -1,4 +1,4 @@ -import { ALLOCATE, REGISTER, MAX_BYTELENGTH, HEADER, HEADER_SIZE, LINK, UNLINK } from "./runtime"; +import { ALLOCATE, REGISTER, MAX_BYTELENGTH, HEADER, HEADER_SIZE, RETAIN, RELEASE } from "./runtime"; // NOTE: DO NOT USE YET! @@ -38,10 +38,23 @@ export class FixedArray { if (isManaged()) { let offset = changetype(this) + (index << alignof()); let oldValue = load(offset); - store(offset, LINK(value, this)); - UNLINK(oldValue, this); // order is important + store(offset, RETAIN(value, this)); + RELEASE(oldValue, this); // order is important } else { store(changetype(this) + (index << alignof()), value); } } + + // GC integration + + @unsafe private __iter(fn: (ref: usize) => void): void { + if (isManaged()) { + let cur = changetype(this); + let end = cur + changetype
(changetype(this) - HEADER_SIZE).payloadSize; + while (cur < end) { + fn(load(cur)); + cur += sizeof(); + } + } + } } diff --git a/std/assembly/map.ts b/std/assembly/map.ts index 93784ff1c4..3e72b880db 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -1,4 +1,4 @@ -import { LINK, UNLINK } from "./runtime"; +import { RETAIN, RELEASE, HEADER } from "./runtime"; import { HASH } from "./util/hash"; // A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht @@ -106,8 +106,8 @@ export class Map { if (entry) { if (isManaged()) { let oldValue = entry.value; - entry.value = LINK(value, this); - UNLINK(oldValue, this); // order is important + entry.value = RETAIN(value, this); + RELEASE(oldValue, this); // order is important } else { entry.value = value; } @@ -126,8 +126,8 @@ export class Map { changetype(entries) + this.entriesOffset++ * ENTRY_SIZE() ); // link with the map - entry.key = isManaged() ? LINK(key, this) : key; - entry.value = isManaged() ? LINK(value, this) : value; + entry.key = isManaged() ? RETAIN(key, this) : key; + entry.value = isManaged() ? RETAIN(value, this) : value; ++this.entriesCount; // link with previous entry in bucket let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE; @@ -139,8 +139,8 @@ export class Map { delete(key: K): bool { var entry = this.find(key, HASH(key)); if (!entry) return false; - if (isManaged()) UNLINK(entry.key, this); - if (isManaged()) UNLINK(entry.value, this); + if (isManaged()) RELEASE(entry.key, this); + if (isManaged()) RELEASE(entry.value, this); entry.taggedNext |= EMPTY; --this.entriesCount; // check if rehashing is appropriate @@ -188,23 +188,23 @@ export class Map { return "[object Map]"; } - // private __gc(): void { - // __gc_mark(changetype(this.buckets)); // tslint:disable-line - // var entries = this.entries; - // __gc_mark(changetype(entries)); // tslint:disable-line - // if (isManaged() || isManaged()) { - // let offset: usize = 0; - // let end: usize = this.entriesOffset * ENTRY_SIZE(); - // while (offset < end) { - // let entry = changetype>( - // changetype(entries) + HEADER_SIZE_AB + offset * ENTRY_SIZE() - // ); - // if (!(entry.taggedNext & EMPTY)) { - // if (isManaged()) __gc_mark(changetype(entry.key)); // tslint:disable-line - // if (isManaged()) __gc_mark(changetype(entry.value)); // tslint:disable-line - // } - // offset += ENTRY_SIZE(); - // } - // } - // } + // GC integration + + @unsafe private __iter(fn: (ref: usize) => void): void { + fn(changetype(this.buckets)); + var entries = this.entries; + fn(changetype(entries)); + if (isManaged() || isManaged()) { + let cur = changetype(entries); + let end = cur + this.entriesOffset * ENTRY_SIZE(); + while (cur < end) { + let entry = changetype>(cur); + if (!(entry.taggedNext & EMPTY)) { + if (isManaged()) fn(changetype(entry.key)); + if (isManaged()) fn(changetype(entry.value)); + } + cur += ENTRY_SIZE(); + } + } + } } diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 5a3dd1fb24..e92d3e807d 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -141,17 +141,17 @@ function doRegister(ref: usize, classId: u32): usize { return ref; } -/** Links a registered object with an object that is now referencing it. */ +/** Retains a registered object. */ // @ts-ignore: decorator @unsafe @inline -export function LINK(ref: T, parentRef: TParent): T { +export function RETAIN(ref: T, parentRef: TParent): T { if (!isManaged()) ERROR("managed reference expected"); if (!isManaged()) ERROR("managed reference expected"); - doLink(changetype(ref), changetype(parentRef)); + doRetain(changetype(ref), changetype(parentRef)); return ref; } -function doLink(ref: usize, parentRef: usize): void { +function doRetain(ref: usize, parentRef: usize): void { if (!ASC_NO_ASSERT) { assertRegistered(ref); assertRegistered(parentRef); @@ -160,16 +160,16 @@ function doLink(ref: usize, parentRef: usize): void { if (GC_IMPLEMENTED) __gc_link(changetype(ref), changetype(parentRef)); } -/** Unlinks a registered object from an object that was referencing it. */ +/** Releases a registered object. */ // @ts-ignore: decorator @unsafe @inline -export function UNLINK(ref: T, parentRef: TParent): void { +export function RELEASE(ref: T, parentRef: TParent): void { if (!isManaged()) ERROR("managed reference expected"); if (!isManaged()) ERROR("managed reference expected"); - doUnlink(changetype(ref), changetype(parentRef)); + doRelease(changetype(ref), changetype(parentRef)); } -function doUnlink(ref: usize, parentRef: usize): void { +function doRelease(ref: usize, parentRef: usize): void { if (!ASC_NO_ASSERT) { assertRegistered(ref); assertRegistered(parentRef); diff --git a/std/assembly/set.ts b/std/assembly/set.ts index 8d070e1749..fd0b006d7d 100644 --- a/std/assembly/set.ts +++ b/std/assembly/set.ts @@ -1,4 +1,4 @@ -import { LINK, UNLINK } from "./runtime"; +import { RETAIN, RELEASE } from "./runtime"; import { HASH } from "./util/hash"; // A deterministic hash set based on CloseTable from https://github.com/jorendorff/dht @@ -109,7 +109,7 @@ export class Set { changetype(entries) + this.entriesOffset++ * ENTRY_SIZE() ); // link with the set - entry.key = isManaged() ? LINK(key, this) : key; + entry.key = isManaged() ? RETAIN(key, this) : key; ++this.entriesCount; // link with previous entry in bucket let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE; @@ -121,7 +121,7 @@ export class Set { delete(key: K): bool { var entry = this.find(key, HASH(key)); if (!entry) return false; - if (isManaged()) UNLINK(entry.key, this); + if (isManaged()) RELEASE(entry.key, this); entry.taggedNext |= EMPTY; --this.entriesCount; // check if rehashing is appropriate @@ -168,20 +168,20 @@ export class Set { return "[object Set]"; } - // private __gc(): void { - // __gc_mark(changetype(this.buckets)); // tslint:disable-line - // var entries = this.entries; - // __gc_mark(changetype(entries)); // tslint:disable-line - // if (isManaged()) { - // let offset: usize = 0; - // let end: usize = this.entriesOffset * ENTRY_SIZE(); - // while (offset < end) { - // let entry = changetype>( - // changetype(entries) + HEADER_SIZE_AB + offset * ENTRY_SIZE() - // ); - // if (!(entry.taggedNext & EMPTY)) __gc_mark(changetype(entry.key)); // tslint:disable-line - // offset += ENTRY_SIZE(); - // } - // } - // } + // GC integration + + @unsafe private __iter(fn: (ref: usize) => void): void { + fn(changetype(this.buckets)); + var entries = this.entries; + fn(changetype(entries)); + if (isManaged()) { + let cur = changetype(entries); + let end = cur + this.entriesOffset * ENTRY_SIZE(); + while (cur < end) { + let entry = changetype>(cur); + if (!(entry.taggedNext & EMPTY)) fn(changetype(entry.key)); + cur += ENTRY_SIZE(); + } + } + } } diff --git a/std/assembly/string.ts b/std/assembly/string.ts index d766661133..1da0438915 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -1,4 +1,4 @@ -import { ALLOCATE, REGISTER, HEADER, HEADER_SIZE, ArrayBufferView, LINK } from "./runtime"; +import { ALLOCATE, REGISTER, HEADER, HEADER_SIZE, ArrayBufferView, RETAIN } from "./runtime"; import { MAX_SIZE_32 } from "./util/allocator"; import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./util/string"; @@ -365,7 +365,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut // result[i] = charStr store(resultStart + (i << alignof()), isManaged() - ? LINK>(REGISTER(charStr), result) + ? RETAIN>(REGISTER(charStr), result) : REGISTER(charStr) ); } diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 6d39f7a03e..15d8230dfb 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -50,7 +50,7 @@ if i32.const 0 i32.const 24 - i32.const 130 + i32.const 135 i32.const 4 call $~lib/env/abort unreachable @@ -70,7 +70,7 @@ if i32.const 0 i32.const 24 - i32.const 153 + i32.const 158 i32.const 4 call $~lib/env/abort unreachable @@ -81,7 +81,7 @@ if i32.const 0 i32.const 24 - i32.const 154 + i32.const 159 i32.const 4 call $~lib/env/abort unreachable @@ -107,7 +107,7 @@ if i32.const 0 i32.const 24 - i32.const 76 + i32.const 81 i32.const 4 call $~lib/env/abort unreachable @@ -125,7 +125,7 @@ if i32.const 0 i32.const 24 - i32.const 77 + i32.const 82 i32.const 11 call $~lib/env/abort unreachable @@ -138,7 +138,7 @@ if i32.const 0 i32.const 24 - i32.const 414 + i32.const 419 i32.const 2 call $~lib/env/abort unreachable @@ -155,7 +155,7 @@ if i32.const 0 i32.const 24 - i32.const 144 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -166,7 +166,7 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 150 i32.const 4 call $~lib/env/abort unreachable @@ -189,7 +189,7 @@ if i32.const 0 i32.const 24 - i32.const 124 + i32.const 129 i32.const 4 call $~lib/env/abort unreachable @@ -215,7 +215,7 @@ if i32.const 0 i32.const 24 - i32.const 244 + i32.const 249 i32.const 4 call $~lib/env/abort unreachable @@ -238,7 +238,7 @@ if i32.const 0 i32.const 24 - i32.const 246 + i32.const 251 i32.const 4 call $~lib/env/abort unreachable @@ -339,7 +339,7 @@ if i32.const 0 i32.const 24 - i32.const 68 + i32.const 73 i32.const 4 call $~lib/env/abort unreachable @@ -353,7 +353,7 @@ if i32.const 0 i32.const 24 - i32.const 69 + i32.const 74 i32.const 11 call $~lib/env/abort unreachable @@ -369,7 +369,7 @@ if i32.const 0 i32.const 24 - i32.const 320 + i32.const 325 i32.const 4 call $~lib/env/abort unreachable @@ -381,7 +381,7 @@ if i32.const 0 i32.const 24 - i32.const 321 + i32.const 326 i32.const 4 call $~lib/env/abort unreachable @@ -394,7 +394,7 @@ if i32.const 0 i32.const 24 - i32.const 322 + i32.const 327 i32.const 4 call $~lib/env/abort unreachable @@ -416,7 +416,7 @@ if i32.const 0 i32.const 24 - i32.const 175 + i32.const 180 i32.const 4 call $~lib/env/abort unreachable @@ -430,7 +430,7 @@ if i32.const 0 i32.const 24 - i32.const 177 + i32.const 182 i32.const 4 call $~lib/env/abort unreachable @@ -454,7 +454,7 @@ if i32.const 0 i32.const 24 - i32.const 179 + i32.const 184 i32.const 4 call $~lib/env/abort unreachable @@ -466,7 +466,7 @@ if i32.const 0 i32.const 24 - i32.const 183 + i32.const 188 i32.const 23 call $~lib/env/abort unreachable @@ -508,7 +508,7 @@ if i32.const 0 i32.const 24 - i32.const 197 + i32.const 202 i32.const 24 call $~lib/env/abort unreachable @@ -522,7 +522,7 @@ if i32.const 0 i32.const 24 - i32.const 199 + i32.const 204 i32.const 6 call $~lib/env/abort unreachable @@ -571,7 +571,7 @@ if i32.const 0 i32.const 24 - i32.const 212 + i32.const 217 i32.const 4 call $~lib/env/abort unreachable @@ -650,7 +650,7 @@ if i32.const 0 i32.const 24 - i32.const 363 + i32.const 368 i32.const 4 call $~lib/env/abort unreachable @@ -661,7 +661,7 @@ if i32.const 0 i32.const 24 - i32.const 364 + i32.const 369 i32.const 4 call $~lib/env/abort unreachable @@ -672,7 +672,7 @@ if i32.const 0 i32.const 24 - i32.const 365 + i32.const 370 i32.const 4 call $~lib/env/abort unreachable @@ -689,7 +689,7 @@ if i32.const 0 i32.const 24 - i32.const 370 + i32.const 375 i32.const 6 call $~lib/env/abort unreachable @@ -717,7 +717,7 @@ if i32.const 0 i32.const 24 - i32.const 379 + i32.const 384 i32.const 6 call $~lib/env/abort unreachable @@ -770,7 +770,7 @@ if i32.const 0 i32.const 24 - i32.const 408 + i32.const 413 i32.const 2 call $~lib/env/abort unreachable @@ -795,7 +795,7 @@ if i32.const 0 i32.const 24 - i32.const 282 + i32.const 287 i32.const 4 call $~lib/env/abort unreachable @@ -875,7 +875,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 314 i32.const 16 call $~lib/env/abort unreachable @@ -903,7 +903,7 @@ if i32.const 0 i32.const 24 - i32.const 334 + i32.const 339 i32.const 4 call $~lib/env/abort unreachable @@ -923,7 +923,7 @@ if i32.const 0 i32.const 24 - i32.const 335 + i32.const 340 i32.const 4 call $~lib/env/abort unreachable @@ -934,7 +934,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 341 i32.const 4 call $~lib/env/abort unreachable @@ -986,7 +986,7 @@ if i32.const 0 i32.const 24 - i32.const 354 + i32.const 359 i32.const 25 call $~lib/env/abort unreachable @@ -1149,7 +1149,7 @@ if i32.const 0 i32.const 24 - i32.const 467 + i32.const 472 i32.const 12 call $~lib/env/abort unreachable @@ -1164,7 +1164,7 @@ if i32.const 0 i32.const 24 - i32.const 470 + i32.const 475 i32.const 2 call $~lib/env/abort unreachable @@ -2523,7 +2523,7 @@ if i32.const 0 i32.const 24 - i32.const 483 + i32.const 488 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 50d34f1774..59331d296b 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -70,7 +70,7 @@ if i32.const 0 i32.const 24 - i32.const 109 + i32.const 114 i32.const 0 call $~lib/env/abort unreachable @@ -119,7 +119,7 @@ if i32.const 0 i32.const 24 - i32.const 130 + i32.const 135 i32.const 4 call $~lib/env/abort unreachable @@ -140,7 +140,7 @@ if i32.const 0 i32.const 24 - i32.const 153 + i32.const 158 i32.const 4 call $~lib/env/abort unreachable @@ -152,7 +152,7 @@ if i32.const 0 i32.const 24 - i32.const 154 + i32.const 159 i32.const 4 call $~lib/env/abort unreachable @@ -185,7 +185,7 @@ if i32.const 0 i32.const 24 - i32.const 76 + i32.const 81 i32.const 4 call $~lib/env/abort unreachable @@ -205,7 +205,7 @@ if (result i32) i32.const 0 i32.const 24 - i32.const 77 + i32.const 82 i32.const 11 call $~lib/env/abort unreachable @@ -221,7 +221,7 @@ if i32.const 0 i32.const 24 - i32.const 414 + i32.const 419 i32.const 2 call $~lib/env/abort unreachable @@ -239,7 +239,7 @@ if i32.const 0 i32.const 24 - i32.const 144 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -251,7 +251,7 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 150 i32.const 4 call $~lib/env/abort unreachable @@ -275,7 +275,7 @@ if i32.const 0 i32.const 24 - i32.const 124 + i32.const 129 i32.const 4 call $~lib/env/abort unreachable @@ -305,7 +305,7 @@ if i32.const 0 i32.const 24 - i32.const 244 + i32.const 249 i32.const 4 call $~lib/env/abort unreachable @@ -331,7 +331,7 @@ if i32.const 0 i32.const 24 - i32.const 246 + i32.const 251 i32.const 4 call $~lib/env/abort unreachable @@ -442,7 +442,7 @@ if i32.const 0 i32.const 24 - i32.const 68 + i32.const 73 i32.const 4 call $~lib/env/abort unreachable @@ -456,7 +456,7 @@ if (result i32) i32.const 0 i32.const 24 - i32.const 69 + i32.const 74 i32.const 11 call $~lib/env/abort unreachable @@ -473,7 +473,7 @@ if i32.const 0 i32.const 24 - i32.const 320 + i32.const 325 i32.const 4 call $~lib/env/abort unreachable @@ -486,7 +486,7 @@ if i32.const 0 i32.const 24 - i32.const 321 + i32.const 326 i32.const 4 call $~lib/env/abort unreachable @@ -499,7 +499,7 @@ if i32.const 0 i32.const 24 - i32.const 322 + i32.const 327 i32.const 4 call $~lib/env/abort unreachable @@ -525,7 +525,7 @@ if i32.const 0 i32.const 24 - i32.const 175 + i32.const 180 i32.const 4 call $~lib/env/abort unreachable @@ -540,7 +540,7 @@ if i32.const 0 i32.const 24 - i32.const 177 + i32.const 182 i32.const 4 call $~lib/env/abort unreachable @@ -566,7 +566,7 @@ if i32.const 0 i32.const 24 - i32.const 179 + i32.const 184 i32.const 4 call $~lib/env/abort unreachable @@ -578,7 +578,7 @@ if (result i32) i32.const 0 i32.const 24 - i32.const 183 + i32.const 188 i32.const 23 call $~lib/env/abort unreachable @@ -626,7 +626,7 @@ if (result i32) i32.const 0 i32.const 24 - i32.const 197 + i32.const 202 i32.const 24 call $~lib/env/abort unreachable @@ -644,7 +644,7 @@ if i32.const 0 i32.const 24 - i32.const 199 + i32.const 204 i32.const 6 call $~lib/env/abort unreachable @@ -699,7 +699,7 @@ if i32.const 0 i32.const 24 - i32.const 212 + i32.const 217 i32.const 4 call $~lib/env/abort unreachable @@ -790,7 +790,7 @@ if i32.const 0 i32.const 24 - i32.const 363 + i32.const 368 i32.const 4 call $~lib/env/abort unreachable @@ -803,7 +803,7 @@ if i32.const 0 i32.const 24 - i32.const 364 + i32.const 369 i32.const 4 call $~lib/env/abort unreachable @@ -816,7 +816,7 @@ if i32.const 0 i32.const 24 - i32.const 365 + i32.const 370 i32.const 4 call $~lib/env/abort unreachable @@ -837,7 +837,7 @@ if i32.const 0 i32.const 24 - i32.const 370 + i32.const 375 i32.const 6 call $~lib/env/abort unreachable @@ -866,7 +866,7 @@ if i32.const 0 i32.const 24 - i32.const 379 + i32.const 384 i32.const 6 call $~lib/env/abort unreachable @@ -937,7 +937,7 @@ if i32.const 0 i32.const 24 - i32.const 408 + i32.const 413 i32.const 2 call $~lib/env/abort unreachable @@ -953,7 +953,7 @@ if i32.const 0 i32.const 24 - i32.const 408 + i32.const 413 i32.const 2 call $~lib/env/abort unreachable @@ -983,7 +983,7 @@ if i32.const 0 i32.const 24 - i32.const 282 + i32.const 287 i32.const 4 call $~lib/env/abort unreachable @@ -1079,7 +1079,7 @@ else i32.const 0 i32.const 24 - i32.const 309 + i32.const 314 i32.const 16 call $~lib/env/abort unreachable @@ -1116,7 +1116,7 @@ if i32.const 0 i32.const 24 - i32.const 334 + i32.const 339 i32.const 4 call $~lib/env/abort unreachable @@ -1136,7 +1136,7 @@ if i32.const 0 i32.const 24 - i32.const 335 + i32.const 340 i32.const 4 call $~lib/env/abort unreachable @@ -1149,7 +1149,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 341 i32.const 4 call $~lib/env/abort unreachable @@ -1209,7 +1209,7 @@ if (result i32) i32.const 0 i32.const 24 - i32.const 354 + i32.const 359 i32.const 25 call $~lib/env/abort unreachable @@ -1439,7 +1439,7 @@ if (result i32) i32.const 0 i32.const 24 - i32.const 467 + i32.const 472 i32.const 12 call $~lib/env/abort unreachable @@ -1460,7 +1460,7 @@ if i32.const 0 i32.const 24 - i32.const 470 + i32.const 475 i32.const 2 call $~lib/env/abort unreachable @@ -3211,7 +3211,7 @@ if i32.const 0 i32.const 24 - i32.const 483 + i32.const 488 i32.const 6 call $~lib/env/abort unreachable From d4d5814fc281b77370a8ba76a45cb07eb6669a79 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 21 Mar 2019 12:29:49 +0100 Subject: [PATCH 061/119] rt docs, initial itcm wiring --- src/builtins.ts | 66 +++++++++++++++++----------------- src/compiler.ts | 1 - std/assembly/collector/itcm.ts | 57 ++++++++++++++--------------- std/assembly/runtime.ts | 66 ++++++++++++++++++++++++++++++++-- 4 files changed, 124 insertions(+), 66 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index 2ff4516d7c..d07292c82d 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -4367,17 +4367,20 @@ export function ensureGCHook( // check if the class implements a custom GC function (only valid for library elements) var members = classInstance.members; if (classInstance.isDeclaredInLibrary) { - if (members !== null && members.has("__gc")) { - let gcPrototype = assert(members.get("__gc")); - assert(gcPrototype.kind == ElementKind.FUNCTION_PROTOTYPE); - let gcInstance = assert(program.resolver.resolveFunction(gcPrototype, null)); - assert(gcInstance.is(CommonFlags.PRIVATE | CommonFlags.INSTANCE)); - assert(!gcInstance.isAny(CommonFlags.AMBIENT | CommonFlags.VIRTUAL)); - assert(gcInstance.signature.parameterTypes.length == 0); - assert(gcInstance.signature.returnType == Type.void); - gcInstance.internalName = classInstance.internalName + "~gc"; - assert(compiler.compileFunction(gcInstance)); - let index = compiler.ensureFunctionTableEntry(gcInstance); + if (members !== null && members.has("__iter")) { + let iterPrototype = assert(members.get("__iter")); + assert(iterPrototype.kind == ElementKind.FUNCTION_PROTOTYPE); + let iterInstance = assert(program.resolver.resolveFunction(iterPrototype, null)); + assert(iterInstance.is(CommonFlags.PRIVATE | CommonFlags.INSTANCE)); + assert(!iterInstance.isAny(CommonFlags.AMBIENT | CommonFlags.VIRTUAL)); + let signature = iterInstance.signature; + let parameterTypes = signature.parameterTypes; + assert(parameterTypes.length == 1); + assert(parameterTypes[0].signatureReference); + assert(signature.returnType == Type.void); + iterInstance.internalName = classInstance.internalName + "~iter"; + assert(compiler.compileFunction(iterInstance)); + let index = compiler.ensureFunctionTableEntry(iterInstance); classInstance.gcHookIndex = index; return index; } @@ -4408,7 +4411,7 @@ export function ensureGCHook( functionTable.push(""); classInstance.gcHookIndex = gcHookIndex; - // if the class extends a base class, call its hook first (calls mark) + // if the class extends a base class, call its hook first var baseInstance = classInstance.base; if (baseInstance) { assert(baseInstance.type.isManaged(program)); @@ -4418,19 +4421,12 @@ export function ensureGCHook( ensureGCHook(compiler, baseInstance.type.classReference) ), [ - module.createGetLocal(0, nativeSizeType) + module.createGetLocal(0, nativeSizeType), // this + module.createGetLocal(1, NativeType.I32) // fn ], - "FUNCSIG$" + (nativeSizeType == NativeType.I64 ? "vj" : "vi") + "FUNCSIG$" + (nativeSizeType == NativeType.I64 ? "vji" : "vii") ) ); - - // if this class is the top-most base class, mark the instance - } else { - body.push( - module.createCall(assert(program.gcMarkInstance).internalName, [ - module.createGetLocal(0, nativeSizeType) - ], NativeType.None) - ); } // mark instances assigned to own fields that are again references @@ -4442,16 +4438,20 @@ export function ensureGCHook( if (type.isManaged(program)) { let offset = (member).memoryOffset; assert(offset >= 0); - body.push( - module.createCall(assert(program.gcMarkInstance).internalName, [ - module.createLoad( - nativeSizeSize, - false, - module.createGetLocal(0, nativeSizeType), - nativeSizeType, - offset - ) - ], NativeType.None) + body.push( // fn(fieldValue) + module.createCallIndirect( + module.createGetLocal(1, NativeType.I32), + [ + module.createLoad( + nativeSizeSize, + false, + module.createGetLocal(0, nativeSizeType), + nativeSizeType, + offset + ), + ], + "FUNCSIG$vi" + ) ); } } @@ -4460,7 +4460,7 @@ export function ensureGCHook( } // add the function to the module and return its table index - var funcName = classInstance.internalName + "~gc"; + var funcName = classInstance.internalName + "~iter"; module.addFunction( funcName, compiler.ensureFunctionType(null, Type.void, options.usizeType), diff --git a/src/compiler.ts b/src/compiler.ts index 3a8d86506b..17ec7670e3 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -7,7 +7,6 @@ import { compileCall as compileBuiltinCall, compileAbort, compileIterateRoots, - ensureGCHook, BuiltinSymbols, compileBuiltinArrayGet, compileBuiltinArraySet, diff --git a/std/assembly/collector/itcm.ts b/std/assembly/collector/itcm.ts index 3c65ed5b8d..26dedc7ed6 100644 --- a/std/assembly/collector/itcm.ts +++ b/std/assembly/collector/itcm.ts @@ -4,13 +4,7 @@ @inline const TRACE = false; -/** Size of a managed object header. */ -// @ts-ignore: decorator -@inline -export const HEADER_SIZE: usize = (offsetof() + AL_MASK) & ~AL_MASK; - -import { ITERATEROOTS } from "../runtime"; -import { AL_MASK, MAX_SIZE_32 } from "../util/allocator"; +import { ITERATEROOTS, HEADER_SIZE } from "../runtime"; /** Collector states. */ const enum State { @@ -51,6 +45,11 @@ var iter: ManagedObject; /** Represents a managed object in memory, consisting of a header followed by the object's data. */ @unmanaged class ManagedObject { + //
+ classId: u32; + payloadSize: u32; + //
+ /** Pointer to the next object with color flags stored in the alignment bits. */ nextWithColor: usize; @@ -58,7 +57,9 @@ var iter: ManagedObject; prev: ManagedObject; /** Class-specific hook function called with the user-space reference. */ - hookFn: (ref: usize) => void; + get hookFn(): (ref: usize) => void { + return changetype<(ref: usize) => void>(this.classId); + } /** Gets the pointer to the next object. */ get next(): ManagedObject { @@ -128,10 +129,10 @@ function step(): void { case State.INIT: { if (TRACE) trace("gc~step/INIT"); fromSpace = changetype(memory.allocate(HEADER_SIZE)); - fromSpace.hookFn = changetype<(ref: usize) => void>(-1); // would error + fromSpace.classId = -1; // would error fromSpace.clear(); toSpace = changetype(memory.allocate(HEADER_SIZE)); - toSpace.hookFn = changetype<(ref: usize) => void>(-1); // would error + toSpace.classId = -1; // would error toSpace.clear(); iter = toSpace; state = State.IDLE; @@ -140,7 +141,10 @@ function step(): void { } case State.IDLE: { if (TRACE) trace("gc~step/IDLE"); - ITERATEROOTS(__gc_mark); + ITERATEROOTS((ref: usize): void => { + var obj = refToObj(ref); + if (obj.color == white) obj.makeGray(); + }); state = State.MARK; if (TRACE) trace("gc~state = MARK"); break; @@ -161,7 +165,10 @@ function step(): void { obj.hookFn(objToRef(obj)); } else { if (TRACE) trace("gc~step/MARK finish"); - ITERATEROOTS(__gc_mark); + ITERATEROOTS((ref: usize): void => { + var obj = refToObj(ref); + if (obj.color == white) obj.makeGray(); + }); obj = iter.next; if (obj === toSpace) { let from = fromSpace; @@ -206,36 +213,26 @@ function objToRef(obj: ManagedObject): usize { // @ts-ignore: decorator @global @unsafe -export function __gc_allocate( // TODO: make this register only / reuse header - size: usize, - markFn: (ref: usize) => void -): usize { - if (TRACE) trace("gc.allocate", 1, size); - if (size > MAX_SIZE_32 - HEADER_SIZE) unreachable(); +export function __gc_register(ref: usize): void { + if (TRACE) trace("gc.register", 2, ref); step(); // also makes sure it's initialized - var obj = changetype(memory.allocate(HEADER_SIZE + size)); - obj.hookFn = markFn; + var obj = refToObj(ref); obj.color = white; fromSpace.push(obj); - return objToRef(obj); } // @ts-ignore: decorator @global @unsafe -export function __gc_link(parentRef: usize, childRef: usize): void { - if (TRACE) trace("gc.link", 2, parentRef, childRef); +export function __gc_retain(ref: usize, parentRef: usize): void { + if (TRACE) trace("gc.retain", 2, ref, parentRef); var parent = refToObj(parentRef); - if (parent.color == i32(!white) && refToObj(childRef).color == white) parent.makeGray(); + if (parent.color == i32(!white) && refToObj(ref).color == white) parent.makeGray(); } // @ts-ignore: decorator @global @unsafe -export function __gc_mark(ref: usize): void { - if (TRACE) trace("gc.mark", 1, ref); - if (ref) { - let obj = refToObj(ref); - if (obj.color == white) obj.makeGray(); - } +export function __gc_release(ref: usize, parentRef: usize): void { + if (TRACE) trace("gc.release", 2, ref, parentRef); } // @ts-ignore: decorator diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index e92d3e807d..10b42ab737 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -1,6 +1,68 @@ +// The runtime provides a set of macros for dealing with common AssemblyScript internals, like +// allocation, memory management in general, integration with a (potenial) garbage collector +// and interfaces to hard-wired data types like buffers and their views. Doing so ensures that +// no matter which underlying implementation of a memory allocator or garbage collector is used, +// as long as all runtime/managed objects adhere to the runtime conventions, it'll all play well +// together. The compiler assumes that it can itself use the macros with the signatures declared +// in this file, so changing anything here will most likely require changes to the compiler, too. + import { AL_MASK, MAX_SIZE_32 } from "./util/allocator"; import { HEAP_BASE, memory } from "./memory"; +// ALLOCATE(size) +// -------------- +// Allocates a runtime object that might eventually make its way into GC'ed userland as a +// managed object. Implicitly prepends the common runtime header to the allocation. +// +// REALLOCATE(ref, size) +// --------------------- +// Changes the size of a previously allocated, but not yet registered, runtime object, for +// example when a pre-allocated buffer turned out to be too small or too large. This works by +// aligning dynamic allocations to actual block size internally so in the best case REALLOCATE +// only changes a size while in the worst case moves the object to larger block. +// +// DISCARD(ref) +// ------------ +// Discards a runtime object that has not been registed and turned out to be unnecessary. +// Essentially undoes the forgoing ALLOCATE. Should be avoided where possible, of course. +// +// REGISTER(ref) +// ---------------- +// Registers a runtime object of kind T. Sets the internal class id within the runtime header +// and asserts that the object hasn't been registered yet. If a tracing garbage collector is +// present that requires initial insertion, the macro also forwards a call to it. Once a +// runtime object has been registed (makes it into userland), it cannot be DISCARD'ed anymore. +// +// RETAIN(ref, parentRef) +// --------------------------------- +// Introduces a new reference to ref hold by parentRef. A tracing garbage collector will most +// likely link the runtime object within its internal graph when RETAIN is called, while a +// reference counting collector will increment the reference count. +// +// RELEASE(ref, parentRef) +// ---------------------------------- +// Releases a reference to ref hold by parentRef. A tracing garbage collector will most likely +// ignore this by design, while a reference counting collector decrements the reference count +// and potentially frees the runtime object. +// +// ALLOCATE_UNMANAGED(size) +// ------------------------ +// Allocates an unmanaged struct-like object. This is used by the compiler as an abstraction +// to memory.allocate just in case, and is usually not used directly. +// +// WRAPARRAY(buffer) +// -------------------- +// Wraps a buffer's data as a standard array of element type T. Used by the compiler when +// creating an array from a static data segment, but is usually not used directly. +// +// HEADER +// ------ +// The common runtime object header prepended to all managed objects. Has a size of 16 bytes in +// WASM32 and contains a classId (e.g. for instanceof checks), the allocation size (e.g. for +// .byteLength and .length computation) and additional reserved fields to be used by GC. If no +// GC is present, the HEADER is cut into half excluding the reserved fields, as indicated by +// HEADER_SIZE. + /** Whether the memory manager interface is implemented. */ // @ts-ignore: decorator, stub @lazy export const MM_IMPLEMENTED: bool = isDefined(__memory_allocate); @@ -157,7 +219,7 @@ function doRetain(ref: usize, parentRef: usize): void { assertRegistered(parentRef); } // @ts-ignore: stub - if (GC_IMPLEMENTED) __gc_link(changetype(ref), changetype(parentRef)); + if (GC_IMPLEMENTED) __gc_retain(changetype(ref), changetype(parentRef)); } /** Releases a registered object. */ @@ -175,7 +237,7 @@ function doRelease(ref: usize, parentRef: usize): void { assertRegistered(parentRef); } // @ts-ignore: stub - if (GC_IMPLEMENTED) __gc_unlink(changetype(ref), changetype(parentRef)); + if (GC_IMPLEMENTED) __gc_release(changetype(ref), changetype(parentRef)); } /** Discards an unregistered object that turned out to be unnecessary. */ From d9463c5484623426f2338cae8ce328a4ff96ad89 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 21 Mar 2019 17:34:51 +0100 Subject: [PATCH 062/119] dummy gc --- std/assembly/array.ts | 23 +- std/assembly/collector/dummy.ts | 35 + std/assembly/collector/itcm.ts | 2 +- std/assembly/fixedarray.ts | 6 +- std/assembly/map.ts | 6 +- std/assembly/runtime.ts | 63 +- std/assembly/string.ts | 8 +- tests/compiler.js | 3 +- tests/compiler/std/array.optimized.wat | 2680 ++++++++++++---------- tests/compiler/std/array.ts | 3 + tests/compiler/std/array.untouched.wat | 2815 +++++++++++++----------- 11 files changed, 3177 insertions(+), 2467 deletions(-) create mode 100644 std/assembly/collector/dummy.ts diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 4fbebd339d..67051cbf1a 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -1,4 +1,4 @@ -import { ALLOCATE, REALLOCATE, DISCARD, RETAIN, RELEASE, REGISTER, MAX_BYTELENGTH, ArrayBufferView } from "./runtime"; +import { ALLOCATE, REALLOCATE, DISCARD, RETAIN, RELEASE, REGISTER, MAX_BYTELENGTH, ArrayBufferView, MOVE } from "./runtime"; import { ArrayBuffer } from "./arraybuffer"; import { COMPARATOR, SORT } from "./util/sort"; import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number"; @@ -76,8 +76,10 @@ export class Array extends ArrayBufferView { if (isManaged()) { let offset = this.dataStart + (index << alignof()); let oldValue = load(offset); - store(offset, RETAIN(value, this)); - RELEASE(oldValue, this); // order is important + if (value !== oldValue) { + RELEASE(oldValue, this); + store(offset, RETAIN(value, this)); + } } else { store(this.dataStart + (index << alignof()), value); } @@ -155,8 +157,7 @@ export class Array extends ArrayBufferView { if (isManaged()) { let thisStart = this.dataStart; for (let offset: usize = 0; offset < thisSize; offset += sizeof()) { - let element = load(thisStart + offset); - store(outStart + offset, RETAIN>(element, out)); + store(outStart + offset, RETAIN>(load(thisStart + offset), out)); } let otherStart = other.dataStart; let otherSize = otherLen << alignof(); @@ -332,13 +333,11 @@ export class Array extends ArrayBufferView { var thisStart = this.dataStart; var thisBase = thisStart + (start << alignof()); for (let i = 0; i < deleteCount; ++i) { - let deleted = load(thisBase + (i << alignof())); - if (isManaged()) { - store(resultStart + (i << alignof()), RETAIN>(deleted, result)); - RELEASE(deleted, this); // order is important - } else { - store(resultStart + (i << alignof()), deleted); - } + store(resultStart + (i << alignof()), + isManaged() + ? MOVE>(load(thisBase + (i << alignof())), this, result) + : load(thisBase + (i << alignof())) + ); } memory.copy( result.dataStart, diff --git a/std/assembly/collector/dummy.ts b/std/assembly/collector/dummy.ts new file mode 100644 index 0000000000..eef7048baf --- /dev/null +++ b/std/assembly/collector/dummy.ts @@ -0,0 +1,35 @@ +// A dummy GC for looking at generated GC code without actually implementing it. + +// @ts-ignore: decorator +@inline +const TRACE = false; + +// @ts-ignore: decorator +@global @unsafe +function __gc_register(ref: usize): void { + if (TRACE) trace("gc.register", 1, ref); +} + +// @ts-ignore: decorator +@global @unsafe +function __gc_retain(ref: usize, parentRef: usize): void { + if (TRACE) trace("gc.retain", 2, ref, parentRef); +} + +// @ts-ignore: decorator +@global @unsafe +function __gc_release(ref: usize, parentRef: usize): void { + if (TRACE) trace("gc.release", 2, ref, parentRef); +} + +// @ts-ignore: decorator +@global @unsafe +function __gc_move(ref: usize, oldParentRef: usize, newParentRef: usize): void { + if (TRACE) trace("gc.move", 3, ref, oldParentRef, newParentRef); +} + +// @ts-ignore: decorator +@global @unsafe +function __gc_collect(): void { + if (TRACE) trace("gc.collect"); +} diff --git a/std/assembly/collector/itcm.ts b/std/assembly/collector/itcm.ts index 26dedc7ed6..1a0a11e23d 100644 --- a/std/assembly/collector/itcm.ts +++ b/std/assembly/collector/itcm.ts @@ -214,7 +214,7 @@ function objToRef(obj: ManagedObject): usize { // @ts-ignore: decorator @global @unsafe export function __gc_register(ref: usize): void { - if (TRACE) trace("gc.register", 2, ref); + if (TRACE) trace("gc.register", 1, ref); step(); // also makes sure it's initialized var obj = refToObj(ref); obj.color = white; diff --git a/std/assembly/fixedarray.ts b/std/assembly/fixedarray.ts index fc209af901..637453b972 100644 --- a/std/assembly/fixedarray.ts +++ b/std/assembly/fixedarray.ts @@ -38,8 +38,10 @@ export class FixedArray { if (isManaged()) { let offset = changetype(this) + (index << alignof()); let oldValue = load(offset); - store(offset, RETAIN(value, this)); - RELEASE(oldValue, this); // order is important + if (value !== oldValue) { + RELEASE(oldValue, this); + store(offset, RETAIN(value, this)); + } } else { store(changetype(this) + (index << alignof()), value); } diff --git a/std/assembly/map.ts b/std/assembly/map.ts index 3e72b880db..9eace7e201 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -106,8 +106,10 @@ export class Map { if (entry) { if (isManaged()) { let oldValue = entry.value; - entry.value = RETAIN(value, this); - RELEASE(oldValue, this); // order is important + if (value !== oldValue) { + RELEASE(oldValue, this); + entry.value = RETAIN(value, this); + } } else { entry.value = value; } diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 10b42ab737..8ee4d5ba3b 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -1,5 +1,5 @@ // The runtime provides a set of macros for dealing with common AssemblyScript internals, like -// allocation, memory management in general, integration with a (potenial) garbage collector +// allocation, memory management in general, integration with a (potential) garbage collector // and interfaces to hard-wired data types like buffers and their views. Doing so ensures that // no matter which underlying implementation of a memory allocator or garbage collector is used, // as long as all runtime/managed objects adhere to the runtime conventions, it'll all play well @@ -19,7 +19,7 @@ import { HEAP_BASE, memory } from "./memory"; // Changes the size of a previously allocated, but not yet registered, runtime object, for // example when a pre-allocated buffer turned out to be too small or too large. This works by // aligning dynamic allocations to actual block size internally so in the best case REALLOCATE -// only changes a size while in the worst case moves the object to larger block. +// only updates payload size while in the worst case moves the object to larger a block. // // DISCARD(ref) // ------------ @@ -45,6 +45,14 @@ import { HEAP_BASE, memory } from "./memory"; // ignore this by design, while a reference counting collector decrements the reference count // and potentially frees the runtime object. // +// MOVE(ref, oldParentRef, newParentRef) +// -------------------------------------------------------------- +// Moves a reference to ref hold by oldParentRef to be now hold by newParentRef. This is a +// special case of first RELEASE'ing a reference on one and instantly RETAIN'ing the reference +// on another parent. A tracing garbage collector will most likely link the runtime object as if +// RETAIN'ed on the new parent only, while a reference counting collector can skip increment and +// decrement, as decrementing might otherwise involve a costly check for cyclic garbage. +// // ALLOCATE_UNMANAGED(size) // ------------------------ // Allocates an unmanaged struct-like object. This is used by the compiler as an abstraction @@ -209,7 +217,11 @@ function doRegister(ref: usize, classId: u32): usize { export function RETAIN(ref: T, parentRef: TParent): T { if (!isManaged()) ERROR("managed reference expected"); if (!isManaged()) ERROR("managed reference expected"); - doRetain(changetype(ref), changetype(parentRef)); + if (isNullable()) { + if (ref !== null) doRetain(changetype(ref), changetype(parentRef)); + } else { + doRetain(changetype(ref), changetype(parentRef)); + } return ref; } @@ -228,7 +240,13 @@ function doRetain(ref: usize, parentRef: usize): void { export function RELEASE(ref: T, parentRef: TParent): void { if (!isManaged()) ERROR("managed reference expected"); if (!isManaged()) ERROR("managed reference expected"); - doRelease(changetype(ref), changetype(parentRef)); + // FIXME: new Array(10) has non-nullable elements but still contains `null`s. + // In the future, something like this should probably initialize with `new Ref()`s. + // if (isNullable()) { + if (ref !== null) doRelease(changetype(ref), changetype(parentRef)); + // } else { + // doRelease(changetype(ref), changetype(parentRef)); + // } } function doRelease(ref: usize, parentRef: usize): void { @@ -240,6 +258,41 @@ function doRelease(ref: usize, parentRef: usize): void { if (GC_IMPLEMENTED) __gc_release(changetype(ref), changetype(parentRef)); } +/** Moves a registered object from one parent to another. */ +// @ts-ignore: decorator +@unsafe @inline +export function MOVE(ref: T, oldParentRef: TOldParent, newParentRef: TNewParent): T { + if (!isManaged()) ERROR("managed reference expected"); + if (!isManaged()) ERROR("managed reference expected"); + if (!isManaged()) ERROR("managed reference expected"); + if (isNullable()) { + if (ref !== null) doMove(changetype(ref), changetype(oldParentRef), changetype(newParentRef)); + } else { + doMove(changetype(ref), changetype(oldParentRef), changetype(newParentRef)); + } + return ref; +} + +function doMove(ref: usize, oldParentRef: usize, newParentRef: usize): void { + if (!ASC_NO_ASSERT) { + assertRegistered(ref); + assertRegistered(oldParentRef); + assertRegistered(newParentRef); + } + if (GC_IMPLEMENTED) { + // @ts-ignore: stub + if (isDefined(__gc_move)) { + // @ts-ignore: stub + __gc_move(changetype(ref), changetype(oldParentRef), changetype(newParentRef)); + } else { + // @ts-ignore: stub + __gc_retain(changetype(ref), changetype(newParentRef)); + // @ts-ignore: stub + __gc_release(changetype(ref), changetype(oldParentRef)); + } + } +} + /** Discards an unregistered object that turned out to be unnecessary. */ // @ts-ignore: decorator @unsafe @inline @@ -283,7 +336,7 @@ function assertUnregistered(ref: usize): void { /** Asserts that a managed object has already been registered. */ // @ts-ignore: decorator function assertRegistered(ref: usize): void { - // may be a static string or buffer (not a heap object) + assert(ref !== null); // may be a static string or buffer (not a heap object) assert(changetype
(ref - HEADER_SIZE).classId != HEADER_MAGIC); } diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 1da0438915..9d4209c6a1 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -357,16 +357,16 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut let result = new Array(length); let resultStart = changetype(result).dataStart; for (let i: isize = 0; i < length; ++i) { - let charStr = ALLOCATE(2); + let charStr = REGISTER(ALLOCATE(2)); store( - charStr, + changetype(charStr), load(changetype(this) + (i << 1)) ); // result[i] = charStr store(resultStart + (i << alignof()), isManaged() - ? RETAIN>(REGISTER(charStr), result) - : REGISTER(charStr) + ? RETAIN>(charStr, result) + : charStr ); } return result; diff --git a/tests/compiler.js b/tests/compiler.js index 5b5c1405ed..1691b65037 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -231,9 +231,8 @@ tests.forEach(filename => { let memory = new WebAssembly.Memory({ initial: 10 }); let exports = {}; - const RUNTIME_HEADER_SIZE = 8; // 16 if GC is present - function getString(ptr) { + const RUNTIME_HEADER_SIZE = exports[".capabilities"] & 2 ? 16 : 8; if (!ptr) return "null"; var U32 = new Uint32Array(exports.memory ? exports.memory.buffer : memory.buffer); var U16 = new Uint16Array(exports.memory ? exports.memory.buffer : memory.buffer); diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index c814bd71cc..6cb604efb8 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -5,8 +5,8 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$fii (func (param i32 i32) (result f32))) (type $FUNCSIG$d (func (result f64))) @@ -26,221 +26,397 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 48) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 96) "\01\00\00\00\06\00\00\00a\00b\00c") - (data (i32.const 112) "\01\00\00\00\18\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 144) "\02\00\00\00\05\00\00\00\01\02\03\04\05") - (data (i32.const 160) "\07\00\00\00\10\00\00\00\98\00\00\00\98\00\00\00\05\00\00\00\05") - (data (i32.const 184) "\02\00\00\00\05\00\00\00\01\01\01\04\05") - (data (i32.const 200) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 240) "\02\00\00\00\05") - (data (i32.const 256) "\02\00\00\00\05\00\00\00\01\01") - (data (i32.const 272) "\02\00\00\00\05\00\00\00\01\01\00\02\02") - (data (i32.const 288) "\02\00\00\00\05\00\00\00\01\01\00\02\02") - (data (i32.const 304) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 336) "\08\00\00\00\10\00\00\008\01\00\008\01\00\00\14\00\00\00\05") - (data (i32.const 360) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") - (data (i32.const 392) "\02\00\00\00\14") - (data (i32.const 424) "\02\00\00\00\14\00\00\00\01\00\00\00\01") - (data (i32.const 456) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 488) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 520) "\02") - (data (i32.const 528) "\02") - (data (i32.const 536) "\04\00\00\00\10\00\00\00\18\02\00\00\18\02") - (data (i32.const 560) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 592) "\02\00\00\00\14\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 624) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 656) "\02\00\00\00\14\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05") - (data (i32.const 688) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 720) "\02\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") - (data (i32.const 752) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 784) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 816) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 848) "\02\00\00\00\14\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 880) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 912) "\02\00\00\00\14\00\00\00\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 944) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 976) "\02\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") - (data (i32.const 1008) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1040) "\02\00\00\00\14\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1072) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1104) "\02\00\00\00\14\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1136) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1168) "\02\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1200) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1232) "\02\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") - (data (i32.const 1264) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1296) "\02\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") - (data (i32.const 1328) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1360) "\04\00\00\00\10\00\00\008\05\00\008\05\00\00\14\00\00\00\05") - (data (i32.const 1384) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1416) "\02") - (data (i32.const 1424) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1456) "\02\00\00\00\0c\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1480) "\02\00\00\00\08\00\00\00\01\00\00\00\02") - (data (i32.const 1496) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1528) "\02\00\00\00\08\00\00\00\03\00\00\00\04") - (data (i32.const 1544) "\02\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\05") - (data (i32.const 1568) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1600) "\02\00\00\00\04\00\00\00\01") - (data (i32.const 1616) "\02\00\00\00\10\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1640) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1672) "\02\00\00\00\04\00\00\00\05") - (data (i32.const 1688) "\02\00\00\00\10\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04") - (data (i32.const 1712) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1744) "\02\00\00\00\08\00\00\00\04\00\00\00\05") - (data (i32.const 1760) "\02\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 1784) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1816) "\02\00\00\00\04\00\00\00\04") - (data (i32.const 1832) "\02\00\00\00\10\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05") - (data (i32.const 1856) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1888) "\02\00\00\00\04\00\00\00\01") - (data (i32.const 1904) "\02\00\00\00\10\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1928) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1960) "\02") - (data (i32.const 1968) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2000) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2032) "\02") - (data (i32.const 2040) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2072) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2104) "\02") - (data (i32.const 2112) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2144) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2176) "\02") - (data (i32.const 2184) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2216) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2248) "\02") - (data (i32.const 2256) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2288) "\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") - (data (i32.const 2320) "\01\00\00\00\ac\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?") - (data (i32.const 2504) "\02\00\00\00 \00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") - (data (i32.const 2544) "\t\00\00\00\10\00\00\00\d0\t\00\00\d0\t\00\00 \00\00\00\08") - (data (i32.const 2568) "\02\00\00\00 \00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") - (data (i32.const 2608) "\02\00\00\00@") - (data (i32.const 2622) "\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?") - (data (i32.const 2662) "\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") - (data (i32.const 2680) "\n\00\00\00\10\00\00\008\n\00\008\n\00\00@\00\00\00\08") - (data (i32.const 2704) "\02\00\00\00@") - (data (i32.const 2718) "\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf") - (data (i32.const 2750) "\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") - (data (i32.const 2776) "\02\00\00\00\14\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02") - (data (i32.const 2808) "\04\00\00\00\10\00\00\00\e0\n\00\00\e0\n\00\00\14\00\00\00\05") - (data (i32.const 2832) "\02\00\00\00\14\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02") - (data (i32.const 2864) "\02\00\00\00\14\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02") - (data (i32.const 2896) "\08\00\00\00\10\00\00\008\0b\00\008\0b\00\00\14\00\00\00\05") - (data (i32.const 2920) "\02\00\00\00\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") - (data (i32.const 2952) "\02") - (data (i32.const 2960) "\04\00\00\00\10\00\00\00\90\0b\00\00\90\0b") - (data (i32.const 2984) "\02\00\00\00\04\00\00\00\01") - (data (i32.const 3000) "\04\00\00\00\10\00\00\00\b0\0b\00\00\b0\0b\00\00\04\00\00\00\01") - (data (i32.const 3024) "\02\00\00\00\08\00\00\00\02\00\00\00\01") - (data (i32.const 3040) "\04\00\00\00\10\00\00\00\d8\0b\00\00\d8\0b\00\00\08\00\00\00\02") - (data (i32.const 3064) "\02\00\00\00\10\00\00\00\03\00\00\00\02\00\00\00\01") - (data (i32.const 3088) "\04\00\00\00\10\00\00\00\00\0c\00\00\00\0c\00\00\10\00\00\00\04") - (data (i32.const 3112) "\02\00\00\00\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 3136) "\04\00\00\00\10\00\00\000\0c\00\000\0c\00\00\10\00\00\00\04") - (data (i32.const 3160) "\02\00\00\00\04\00\00\00\01") - (data (i32.const 3176) "\02\00\00\00\08\00\00\00\01\00\00\00\02") - (data (i32.const 3192) "\01\00\00\00\02\00\00\00a") - (data (i32.const 3208) "\01\00\00\00\02\00\00\00b") - (data (i32.const 3224) "\01\00\00\00\04\00\00\00a\00b") - (data (i32.const 3240) "\01\00\00\00\04\00\00\00b\00a") - (data (i32.const 3256) "\01") - (data (i32.const 3264) "\02\00\00\00\1c\00\00\00\80\0c\00\00\90\0c\00\00\80\0c\00\00\a0\0c\00\00\b0\0c\00\00\c0\0c") - (data (i32.const 3304) "\0e\00\00\00\10\00\00\00\c8\0c\00\00\c8\0c\00\00\1c\00\00\00\07") - (data (i32.const 3328) "\02\00\00\00\1c\00\00\00\c0\0c\00\00\80\0c\00\00\80\0c\00\00\a0\0c\00\00\90\0c\00\00\b0\0c") - (data (i32.const 3368) "\0e\00\00\00\10\00\00\00\08\0d\00\00\08\0d\00\00\1c\00\00\00\07") - (data (i32.const 3392) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 3432) "\01\00\00\00\08\00\00\00n\00u\00l\00l") - (data (i32.const 3448) "\02\00\00\00\02\00\00\00\01") - (data (i32.const 3464) "\01\00\00\00\08\00\00\00t\00r\00u\00e") - (data (i32.const 3480) "\01\00\00\00\n\00\00\00f\00a\00l\00s\00e") - (data (i32.const 3504) "\01\00\00\00\02\00\00\00,") - (data (i32.const 3520) "\02\00\00\00\02\00\00\00\01") - (data (i32.const 3536) "\01\00\00\00\14\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e") - (data (i32.const 3568) "\02\00\00\00\0c\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 3592) "\01\00\00\00\02\00\00\000") - (data (i32.const 3608) "\02\00\00\00\90\01\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 4016) "\08\00\00\00\10\00\00\00 \0e\00\00 \0e\00\00\90\01\00\00d") - (data (i32.const 4040) "\02\00\00\00\0c\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 4064) "\01\00\00\00\n\00\00\001\00-\002\00-\003") - (data (i32.const 4088) "\02\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 4112) "\01\00\00\00\02\00\00\00-") - (data (i32.const 4128) "\02\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 4152) "\02\00\00\00\08\00\00\00\00\00\00\80\00\00\00\80") - (data (i32.const 4168) "\01\00\00\00\04\00\00\00_\00_") - (data (i32.const 4184) "\02\00\00\00\08\00\00\00\00\00\00\80\00\00\00\80") - (data (i32.const 4200) "\01\00\00\000\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 4256) "\02\00\00\000") - (data (i32.const 4278) "\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") - (data (i32.const 4312) "\01\00\00\00\04\00\00\00,\00 ") - (data (i32.const 4328) "\01\00\00\00\06\00\00\000\00.\000") - (data (i32.const 4344) "\01\00\00\00\06\00\00\00N\00a\00N") - (data (i32.const 4360) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 4392) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 4416) "\02\00\00\00\b8\02\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\00*\00&\00$\00%\00^\00@\00#\00!\00?") + (data (i32.const 3208) "\02\00\00\00 ") + (data (i32.const 3226) "\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") + (data (i32.const 3256) "\t\00\00\00\10") + (data (i32.const 3272) "\98\0c\00\00\98\0c\00\00 \00\00\00\08") + (data (i32.const 3288) "\02\00\00\00 ") + (data (i32.const 3306) "\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") + (data (i32.const 3336) "\02\00\00\00@") + (data (i32.const 3358) "\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?") + (data (i32.const 3398) "\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") + (data (i32.const 3416) "\n\00\00\00\10") + (data (i32.const 3432) "\18\0d\00\00\18\0d\00\00@\00\00\00\08") + (data (i32.const 3448) "\02\00\00\00@") + (data (i32.const 3470) "\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf") + (data (i32.const 3502) "\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") + (data (i32.const 3528) "\02\00\00\00\14") + (data (i32.const 3544) "\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02") + (data (i32.const 3568) "\04\00\00\00\10") + (data (i32.const 3584) "\d8\0d\00\00\d8\0d\00\00\14\00\00\00\05") + (data (i32.const 3600) "\02\00\00\00\14") + (data (i32.const 3616) "\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02") + (data (i32.const 3640) "\02\00\00\00\14") + (data (i32.const 3656) "\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02") + (data (i32.const 3680) "\08\00\00\00\10") + (data (i32.const 3696) "H\0e\00\00H\0e\00\00\14\00\00\00\05") + (data (i32.const 3712) "\02\00\00\00\14") + (data (i32.const 3732) "\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") + (data (i32.const 3752) "\02") + (data (i32.const 3768) "\04\00\00\00\10") + (data (i32.const 3784) "\b8\0e\00\00\b8\0e") + (data (i32.const 3800) "\02\00\00\00\04") + (data (i32.const 3816) "\01") + (data (i32.const 3824) "\04\00\00\00\10") + (data (i32.const 3840) "\e8\0e\00\00\e8\0e\00\00\04\00\00\00\01") + (data (i32.const 3856) "\02\00\00\00\08") + (data (i32.const 3872) "\02\00\00\00\01") + (data (i32.const 3880) "\04\00\00\00\10") + (data (i32.const 3896) " \0f\00\00 \0f\00\00\08\00\00\00\02") + (data (i32.const 3912) "\02\00\00\00\10") + (data (i32.const 3928) "\03\00\00\00\02\00\00\00\01") + (data (i32.const 3944) "\04\00\00\00\10") + (data (i32.const 3960) "X\0f\00\00X\0f\00\00\10\00\00\00\04") + (data (i32.const 3976) "\02\00\00\00\10") + (data (i32.const 3996) "\01\00\00\00\02\00\00\00\03") + (data (i32.const 4008) "\04\00\00\00\10") + (data (i32.const 4024) "\98\0f\00\00\98\0f\00\00\10\00\00\00\04") + (data (i32.const 4040) "\02\00\00\00\04") + (data (i32.const 4056) "\01") + (data (i32.const 4064) "\02\00\00\00\08") + (data (i32.const 4080) "\01\00\00\00\02") + (data (i32.const 4088) "\01\00\00\00\02") + (data (i32.const 4104) "a") + (data (i32.const 4112) "\01\00\00\00\02") + (data (i32.const 4128) "b") + (data (i32.const 4136) "\01\00\00\00\04") + (data (i32.const 4152) "a\00b") + (data (i32.const 4160) "\01\00\00\00\04") + (data (i32.const 4176) "b\00a") + (data (i32.const 4184) "\01") + (data (i32.const 4200) "\02\00\00\00\1c") + (data (i32.const 4216) "\08\10\00\00 \10\00\00\08\10\00\008\10\00\00P\10\00\00h\10") + (data (i32.const 4248) "\0e\00\00\00\10") + (data (i32.const 4264) "x\10\00\00x\10\00\00\1c\00\00\00\07") + (data (i32.const 4280) "\02\00\00\00\1c") + (data (i32.const 4296) "h\10\00\00\08\10\00\00\08\10\00\008\10\00\00 \10\00\00P\10") + (data (i32.const 4328) "\0e\00\00\00\10") + (data (i32.const 4344) "\c8\10\00\00\c8\10\00\00\1c\00\00\00\07") + (data (i32.const 4360) "\01\00\00\00\1c") + (data (i32.const 4376) "~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 4408) "\01\00\00\00\08") + (data (i32.const 4424) "n\00u\00l\00l") + (data (i32.const 4432) "\02\00\00\00\02") + (data (i32.const 4448) "\01") + (data (i32.const 4456) "\01\00\00\00\08") + (data (i32.const 4472) "t\00r\00u\00e") + (data (i32.const 4480) "\01\00\00\00\n") + (data (i32.const 4496) "f\00a\00l\00s\00e") + (data (i32.const 4512) "\01\00\00\00\02") + (data (i32.const 4528) ",") + (data (i32.const 4536) "\02\00\00\00\02") + (data (i32.const 4552) "\01") + (data (i32.const 4560) "\01\00\00\00\14") + (data (i32.const 4576) "t\00r\00u\00e\00,\00f\00a\00l\00s\00e") + (data (i32.const 4600) "\02\00\00\00\0c") + (data (i32.const 4616) "\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 4632) "\01\00\00\00\02") + (data (i32.const 4648) "0") + (data (i32.const 4656) "\02\00\00\00\90\01") + (data (i32.const 4672) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") + (data (i32.const 5072) "\08\00\00\00\10") + (data (i32.const 5088) "@\12\00\00@\12\00\00\90\01\00\00d") + (data (i32.const 5104) "\02\00\00\00\0c") + (data (i32.const 5120) "\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 5136) "\01\00\00\00\n") + (data (i32.const 5152) "1\00-\002\00-\003") + (data (i32.const 5168) "\02\00\00\00\0c") + (data (i32.const 5184) "\01\00\00\00\02\00\00\00\03") + (data (i32.const 5200) "\01\00\00\00\02") + (data (i32.const 5216) "-") + (data (i32.const 5224) "\02\00\00\00\0c") + (data (i32.const 5240) "\01\00\00\00\02\00\00\00\03") + (data (i32.const 5256) "\02\00\00\00\08") + (data (i32.const 5275) "\80\00\00\00\80") + (data (i32.const 5280) "\01\00\00\00\04") + (data (i32.const 5296) "_\00_") + (data (i32.const 5304) "\02\00\00\00\08") + (data (i32.const 5323) "\80\00\00\00\80") + (data (i32.const 5328) "\01\00\00\000") + (data (i32.const 5344) "-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008") + (data (i32.const 5392) "\02\00\00\000") + (data (i32.const 5422) "\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") + (data (i32.const 5456) "\01\00\00\00\04") + (data (i32.const 5472) ",\00 ") + (data (i32.const 5480) "\01\00\00\00\06") + (data (i32.const 5496) "0\00.\000") + (data (i32.const 5504) "\01\00\00\00\06") + (data (i32.const 5520) "N\00a\00N") + (data (i32.const 5528) "\01\00\00\00\12") + (data (i32.const 5544) "-\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 5568) "\01\00\00\00\10") + (data (i32.const 5584) "I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 5600) "\02\00\00\00\b8\02") + (data (i32.const 5616) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/Null (mut i32) (i32.const 0)) - (global $std/array/arr8 (mut i32) (i32.const 168)) - (global $std/array/arr32 (mut i32) (i32.const 344)) + (global $std/array/arr8 (mut i32) (i32.const 216)) + (global $std/array/arr32 (mut i32) (i32.const 456)) (global $std/array/i (mut i32) (i32.const 0)) (global $std/array/other (mut i32) (i32.const 0)) (global $std/array/out (mut i32) (i32.const 0)) - (global $std/array/source (mut i32) (i32.const 544)) + (global $std/array/source (mut i32) (i32.const 720)) (global $std/array/cwArr (mut i32) (i32.const 0)) (global $std/array/includes (mut i32) (i32.const 0)) - (global $std/array/sarr (mut i32) (i32.const 1368)) + (global $std/array/sarr (mut i32) (i32.const 1752)) (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/every (mut i32) (i32.const 0)) (global $std/array/some (mut i32) (i32.const 0)) @@ -252,15 +428,15 @@ (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) (global $~lib/math/random_state0_32 (mut i32) (i32.const 0)) (global $~lib/math/random_state1_32 (mut i32) (i32.const 0)) - (global $std/array/f32ArrayTyped (mut i32) (i32.const 2552)) - (global $std/array/f64ArrayTyped (mut i32) (i32.const 2688)) - (global $std/array/i32ArrayTyped (mut i32) (i32.const 2816)) - (global $std/array/u32ArrayTyped (mut i32) (i32.const 2904)) - (global $std/array/reversed0 (mut i32) (i32.const 2968)) - (global $std/array/reversed1 (mut i32) (i32.const 3008)) - (global $std/array/reversed2 (mut i32) (i32.const 3048)) - (global $std/array/reversed4 (mut i32) (i32.const 3096)) - (global $std/array/expected4 (mut i32) (i32.const 3144)) + (global $std/array/f32ArrayTyped (mut i32) (i32.const 3272)) + (global $std/array/f64ArrayTyped (mut i32) (i32.const 3432)) + (global $std/array/i32ArrayTyped (mut i32) (i32.const 3584)) + (global $std/array/u32ArrayTyped (mut i32) (i32.const 3696)) + (global $std/array/reversed0 (mut i32) (i32.const 3784)) + (global $std/array/reversed1 (mut i32) (i32.const 3840)) + (global $std/array/reversed2 (mut i32) (i32.const 3896)) + (global $std/array/reversed4 (mut i32) (i32.const 3960)) + (global $std/array/expected4 (mut i32) (i32.const 4024)) (global $std/array/reversed64 (mut i32) (i32.const 0)) (global $std/array/reversed128 (mut i32) (i32.const 0)) (global $std/array/reversed1024 (mut i32) (i32.const 0)) @@ -270,8 +446,8 @@ (global $std/array/randomized257 (mut i32) (i32.const 0)) (global $std/array/reversedNested512 (mut i32) (i32.const 0)) (global $std/array/reversedElements512 (mut i32) (i32.const 0)) - (global $std/array/randomStringsActual (mut i32) (i32.const 3312)) - (global $std/array/randomStringsExpected (mut i32) (i32.const 3376)) + (global $std/array/randomStringsActual (mut i32) (i32.const 4264)) + (global $std/array/randomStringsExpected (mut i32) (i32.const 4344)) (global $std/array/randomStrings400 (mut i32) (i32.const 0)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) @@ -283,9 +459,12 @@ (global $std/array/subarr32 (mut i32) (i32.const 0)) (global $std/array/subarr8 (mut i32) (i32.const 0)) (global $std/array/subarrU32 (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (start $start) + (export "main" (func $std/array/main)) + (export ".capabilities" (global $~lib/capabilities)) (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -353,7 +532,7 @@ i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -366,7 +545,13 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 i32.add ) (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -596,26 +781,26 @@ ) (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 6524 + i32.const 8060 i32.le_u if i32.const 0 - i32.const 16 - i32.const 217 + i32.const 24 + i32.const 332 i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load i32.const -1520547049 i32.ne if i32.const 0 - i32.const 16 - i32.const 218 + i32.const 24 + i32.const 333 i32.const 2 call $~lib/env/abort unreachable @@ -625,7 +810,7 @@ local.get $0 call $~lib/runtime/assertUnregistered local.get $0 - i32.const 8 + i32.const 16 i32.sub local.get $1 i32.store @@ -634,11 +819,11 @@ (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 1073741816 + i32.const 1073741808 i32.gt_u if i32.const 0 - i32.const 56 + i32.const 72 i32.const 24 i32.const 43 call $~lib/env/abort @@ -654,16 +839,48 @@ i32.const 2 call $~lib/runtime/doRegister ) - (func $~lib/runtime/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/assertRegistered (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 339 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const -1520547049 + i32.eq + if + i32.const 0 + i32.const 24 + i32.const 340 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRetain (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + call $~lib/runtime/assertRegistered + local.get $1 + call $~lib/runtime/assertRegistered + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 - i32.const 1073741816 + i32.const 1073741808 local.get $2 i32.shr_u i32.gt_u if i32.const 0 - i32.const 16 - i32.const 251 + i32.const 24 + i32.const 366 i32.const 57 call $~lib/env/abort unreachable @@ -692,6 +909,9 @@ local.get $0 i32.const 0 i32.store offset=8 + local.get $2 + local.get $0 + call $~lib/runtime/doRetain local.get $0 local.get $2 i32.store @@ -703,7 +923,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 16 call $~lib/runtime/doAllocate @@ -720,7 +940,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/array/Array#fill (; 10 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/array/Array#fill (; 12 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) local.get $0 @@ -785,7 +1005,7 @@ call $~lib/memory/memory.fill end ) - (func $~lib/util/memory/memcpy (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1682,7 +1902,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1876,16 +2096,16 @@ end end ) - (func $~lib/runtime/doWrapArray (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/doWrapArray (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) i32.const 16 call $~lib/runtime/doAllocate local.get $1 call $~lib/runtime/doRegister - local.tee $3 + local.set $3 local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 local.tee $4 @@ -1893,6 +2113,10 @@ local.get $1 call $~lib/runtime/doRegister local.tee $1 + local.get $3 + call $~lib/runtime/doRetain + local.get $3 + local.get $1 i32.store local.get $3 local.get $1 @@ -1911,14 +2135,14 @@ call $~lib/memory/memory.copy local.get $3 ) - (func $~lib/array/Array#__get (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 16 ;) (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 208 + i32.const 272 i32.const 69 i32.const 61 call $~lib/env/abort @@ -1930,7 +2154,7 @@ i32.add i32.load8_u ) - (func $std/array/isArraysEqual (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -1977,7 +2201,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 16 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/array/Array#fill (; 18 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) local.get $0 @@ -2050,7 +2274,7 @@ end end ) - (func $~lib/array/Array#__get (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2059,7 +2283,7 @@ i32.ge_u if i32.const 0 - i32.const 208 + i32.const 272 i32.const 69 i32.const 61 call $~lib/env/abort @@ -2073,7 +2297,7 @@ i32.add i32.load ) - (func $std/array/isArraysEqual (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2123,13 +2347,13 @@ end i32.const 1 ) - (func $~lib/runtime/doReallocate (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doReallocate (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $3 i32.load offset=4 @@ -2140,20 +2364,20 @@ i32.const 1 i32.const 32 local.get $2 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub i32.shl i32.const 0 local.get $0 - i32.const 6524 + i32.const 8060 i32.gt_u select i32.const 1 i32.const 32 local.get $1 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -2163,19 +2387,25 @@ if local.get $4 call $~lib/memory/memory.allocate - local.tee $4 + local.tee $5 local.get $3 i32.load i32.store - local.get $4 - i32.const 8 + local.get $5 + i32.const 0 + i32.store offset=8 + local.get $5 + i32.const 0 + i32.store offset=12 + local.get $5 + i32.const 16 i32.add - local.tee $5 + local.tee $4 local.get $0 local.get $2 call $~lib/memory/memory.copy local.get $2 - local.get $5 + local.get $4 i32.add i32.const 0 local.get $1 @@ -2188,20 +2418,20 @@ i32.eq if local.get $0 - i32.const 6524 + i32.const 8060 i32.le_u if i32.const 0 - i32.const 16 - i32.const 107 + i32.const 24 + i32.const 177 i32.const 8 call $~lib/env/abort unreachable end end - local.get $4 - local.set $3 local.get $5 + local.set $3 + local.get $4 local.set $0 else local.get $0 @@ -2219,7 +2449,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureCapacity (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -2230,11 +2460,11 @@ i32.gt_u if local.get $1 - i32.const 268435454 + i32.const 268435452 i32.gt_u if i32.const 0 - i32.const 208 + i32.const 272 i32.const 10 i32.const 64 call $~lib/env/abort @@ -2252,6 +2482,9 @@ local.get $2 i32.ne if + local.get $1 + local.get $0 + call $~lib/runtime/doRetain local.get $0 local.get $1 i32.store @@ -2264,7 +2497,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $0 @@ -2287,7 +2520,7 @@ local.get $1 i32.store ) - (func $~lib/array/Array#pop (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2297,8 +2530,8 @@ i32.lt_s if i32.const 0 - i32.const 208 - i32.const 203 + i32.const 272 + i32.const 204 i32.const 20 call $~lib/env/abort unreachable @@ -2319,7 +2552,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#concat (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2356,7 +2589,7 @@ call $~lib/memory/memory.copy local.get $4 ) - (func $~lib/array/Array#copyWithin (; 24 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 26 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2523,7 +2756,7 @@ end local.get $0 ) - (func $~lib/array/Array#unshift (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#unshift (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2552,7 +2785,7 @@ local.get $2 i32.store offset=12 ) - (func $~lib/array/Array#shift (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2564,8 +2797,8 @@ i32.lt_s if i32.const 0 - i32.const 208 - i32.const 264 + i32.const 272 + i32.const 265 i32.const 20 call $~lib/env/abort unreachable @@ -2597,7 +2830,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#reverse (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#reverse (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2644,7 +2877,7 @@ end end ) - (func $~lib/array/Array#indexOf (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2708,7 +2941,7 @@ end i32.const -1 ) - (func $~lib/array/Array#includes (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 local.get $2 @@ -2716,7 +2949,7 @@ i32.const 0 i32.ge_s ) - (func $~lib/array/Array#splice (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2724,7 +2957,6 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) local.get $2 local.get $0 i32.load offset=12 @@ -2752,9 +2984,9 @@ end local.tee $1 i32.sub - local.tee $5 + local.tee $3 local.get $2 - local.get $5 + local.get $3 i32.lt_s select local.tee $3 @@ -2765,17 +2997,17 @@ select local.tee $2 call $~lib/array/Array#constructor - local.tee $7 + local.tee $6 i32.load offset=4 - local.set $8 + local.set $7 local.get $0 i32.load offset=4 - local.tee $9 + local.tee $8 local.get $1 i32.const 2 i32.shl i32.add - local.set $6 + local.set $5 i32.const 0 local.set $3 loop $repeat|0 @@ -2787,15 +3019,13 @@ local.get $3 i32.const 2 i32.shl - local.tee $10 - local.get $6 - i32.add - i32.load - local.set $5 - local.get $8 - local.get $10 + local.tee $9 + local.get $7 i32.add local.get $5 + local.get $9 + i32.add + i32.load i32.store local.get $3 i32.const 1 @@ -2804,9 +3034,9 @@ br $repeat|0 end end - local.get $7 - i32.load offset=4 local.get $6 + i32.load offset=4 + local.get $5 local.get $2 i32.const 2 i32.shl @@ -2818,11 +3048,11 @@ local.get $4 i32.ne if - local.get $6 + local.get $5 local.get $1 i32.const 2 i32.shl - local.get $9 + local.get $8 i32.add local.get $4 local.get $1 @@ -2836,9 +3066,9 @@ local.get $2 i32.sub i32.store offset=12 - local.get $7 + local.get $6 ) - (func $~lib/array/Array#__set (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 @@ -2864,11 +3094,11 @@ i32.store offset=12 end ) - (func $start:std/array~anonymous|0 (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $~lib/array/Array#findIndex (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2916,17 +3146,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -2934,7 +3164,7 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -2942,12 +3172,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2995,12 +3225,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3008,12 +3238,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3021,12 +3251,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3074,12 +3304,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3087,12 +3317,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3100,13 +3330,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 51 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3149,7 +3379,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3158,7 +3388,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -3167,7 +3397,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 56 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.eqz @@ -3256,19 +3486,19 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 559 + i32.const 152 + i32.const 562 i32.const 4 call $~lib/env/abort unreachable end end ) - (func $start:std/array~anonymous|21 (; 55 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 57 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#map (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#map (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3335,7 +3565,7 @@ end local.get $3 ) - (func $~lib/array/Array#__get (; 57 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 59 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -3344,7 +3574,7 @@ i32.ge_u if i32.const 0 - i32.const 208 + i32.const 272 i32.const 69 i32.const 61 call $~lib/env/abort @@ -3358,7 +3588,7 @@ i32.add f32.load ) - (func $start:std/array~anonymous|22 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3368,7 +3598,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 59 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#map (; 61 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3420,14 +3650,14 @@ end end ) - (func $start:std/array~anonymous|23 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3437,12 +3667,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 63 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3495,7 +3725,7 @@ end local.get $4 ) - (func $start:std/array~anonymous|26 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3507,7 +3737,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -3516,7 +3746,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3528,12 +3758,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 67 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 69 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3577,7 +3807,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|31 (; 69 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.eqz if @@ -3588,7 +3818,7 @@ end local.get $0 ) - (func $start:std/array~anonymous|32 (; 70 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 72 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.eqz if @@ -3599,7 +3829,7 @@ end local.get $0 ) - (func $start:std/array~anonymous|33 (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 73 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -3607,7 +3837,7 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 72 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 74 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -3615,7 +3845,7 @@ local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 73 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3652,7 +3882,7 @@ end local.get $2 ) - (func $~lib/math/splitMix32 (; 74 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 76 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -3684,13 +3914,13 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 75 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 77 ;) (type $FUNCSIG$vj) (param $0 i64) (local $1 i64) local.get $0 i64.eqz if i32.const 0 - i32.const 2296 + i32.const 2992 i32.const 1021 i32.const 4 call $~lib/env/abort @@ -3749,7 +3979,7 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/util/sort/insertionSort (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -3831,7 +4061,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 79 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4087,7 +4317,7 @@ local.get $6 f32.store ) - (func $~lib/array/Array#sort (; 78 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 80 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f32) (local $4 f32) @@ -4095,8 +4325,8 @@ i32.eqz if i32.const 0 - i32.const 208 - i32.const 378 + i32.const 272 + i32.const 377 i32.const 4 call $~lib/env/abort unreachable @@ -4155,7 +4385,7 @@ call $~lib/util/sort/weakHeapSort end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 79 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 81 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4184,7 +4414,7 @@ i32.lt_s i32.sub ) - (func $std/array/isArraysEqual (; 80 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 82 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 f32) (local $4 i32) @@ -4245,7 +4475,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 81 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 83 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) @@ -4327,7 +4557,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 82 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 84 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4583,7 +4813,7 @@ local.get $6 f64.store ) - (func $~lib/array/Array#sort (; 83 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 85 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 f64) @@ -4591,8 +4821,8 @@ i32.eqz if i32.const 0 - i32.const 208 - i32.const 378 + i32.const 272 + i32.const 377 i32.const 4 call $~lib/env/abort unreachable @@ -4651,7 +4881,7 @@ call $~lib/util/sort/weakHeapSort end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 84 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 86 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -4680,7 +4910,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#__get (; 85 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 87 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -4689,7 +4919,7 @@ i32.ge_u if i32.const 0 - i32.const 208 + i32.const 272 i32.const 69 i32.const 61 call $~lib/env/abort @@ -4703,7 +4933,7 @@ i32.add f64.load ) - (func $std/array/isArraysEqual (; 86 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 88 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -4764,7 +4994,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 87 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 89 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4846,7 +5076,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 88 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 90 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5102,7 +5332,7 @@ local.get $1 i32.store ) - (func $~lib/array/Array#sort (; 89 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 91 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5110,8 +5340,8 @@ i32.eqz if i32.const 0 - i32.const 208 - i32.const 378 + i32.const 272 + i32.const 377 i32.const 4 call $~lib/env/abort unreachable @@ -5175,12 +5405,12 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 90 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 92 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 91 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 93 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -5189,7 +5419,7 @@ i32.lt_u i32.sub ) - (func $std/array/createReverseOrderedArray (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/array/Array#constructor @@ -5220,14 +5450,14 @@ end local.get $1 ) - (func $~lib/math/NativeMath.random (; 93 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 95 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) global.get $~lib/math/random_seeded i32.eqz if i32.const 0 - i32.const 2296 + i32.const 2992 i32.const 1030 i32.const 24 call $~lib/env/abort @@ -5267,7 +5497,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 96 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/array/Array#constructor @@ -5296,7 +5526,7 @@ end local.get $0 ) - (func $std/array/isSorted (; 95 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 97 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -5338,7 +5568,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 96 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 98 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -5347,24 +5577,24 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 810 + i32.const 152 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/array/assertSortedDefault (; 97 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 99 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 48 call $std/array/assertSorted ) - (func $start:std/array~anonymous|44 (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 100 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array>#constructor (; 99 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#constructor (; 101 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 16 call $~lib/runtime/doAllocate @@ -5381,7 +5611,56 @@ i32.store offset=12 local.get $1 ) - (func $std/array/createReverseOrderedNestedArray (; 100 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array>#__set (; 102 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + call $~lib/array/ensureCapacity + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.tee $4 + i32.load + local.tee $3 + local.get $2 + i32.ne + if + local.get $0 + local.set $5 + local.get $3 + if + local.get $3 + local.get $5 + call $~lib/runtime/doRetain + end + local.get $2 + local.tee $3 + local.get $0 + call $~lib/runtime/doRetain + local.get $4 + local.get $3 + i32.store + end + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $std/array/createReverseOrderedNestedArray (; 103 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) i32.const 512 @@ -5397,7 +5676,7 @@ local.get $1 i32.const 1 call $~lib/array/Array#constructor - call $~lib/array/Array#__set + call $~lib/array/Array>#__set local.get $0 local.get $1 call $~lib/array/Array#__get @@ -5418,7 +5697,7 @@ end local.get $0 ) - (func $start:std/array~anonymous|47 (; 101 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 104 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -5427,7 +5706,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/array/Array>#sort (; 102 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 105 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5435,8 +5714,8 @@ i32.eqz if i32.const 0 - i32.const 208 - i32.const 378 + i32.const 272 + i32.const 377 i32.const 4 call $~lib/env/abort unreachable @@ -5488,7 +5767,7 @@ call $~lib/util/sort/insertionSort local.get $0 ) - (func $std/array/assertSorted> (; 103 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 106 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -5497,14 +5776,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 810 + i32.const 152 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/array/createReverseOrderedElementsArray (; 104 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 107 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5545,7 +5824,7 @@ local.get $0 local.get $1 local.get $3 - call $~lib/array/Array#__set + call $~lib/array/Array>#__set local.get $1 i32.const 1 i32.add @@ -5555,14 +5834,14 @@ end local.get $0 ) - (func $start:std/array~anonymous|48 (; 105 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/util/string/compareImpl (; 106 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 109 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 @@ -5595,7 +5874,7 @@ end local.get $3 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 107 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 110 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5624,14 +5903,14 @@ return end local.get $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 i32.shr_u local.set $3 local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -5672,7 +5951,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted|trampoline (; 108 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSorted|trampoline (; 111 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) block $1of1 block $0of1 @@ -5691,7 +5970,7 @@ local.get $1 call $std/array/assertSorted> ) - (func $~lib/string/String.__eq (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 112 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -5714,14 +5993,14 @@ return end local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 i32.shr_u local.tee $2 local.get $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -5737,7 +6016,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array/isArraysEqual (; 110 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5784,16 +6063,16 @@ end i32.const 1 ) - (func $~lib/string/String#charAt (; 111 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#charAt (; 114 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 2324 + i32.const 3020 i32.load i32.const 1 i32.shr_u i32.ge_u if - i32.const 3264 + i32.const 4200 return end i32.const 2 @@ -5802,7 +6081,7 @@ local.get $0 i32.const 1 i32.shl - i32.const 2328 + i32.const 3032 i32.add i32.load16_u i32.store16 @@ -5810,16 +6089,16 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/string/String#concat (; 112 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 115 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $1 - i32.const 3440 + i32.const 4424 local.get $1 select local.tee $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -5828,7 +6107,7 @@ i32.shl local.tee $4 local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -5840,7 +6119,7 @@ local.tee $2 i32.eqz if - i32.const 3264 + i32.const 4200 return end local.get $2 @@ -5859,18 +6138,18 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/string/String.__concat (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 3440 + i32.const 4424 local.get $0 select local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 114 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 117 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - i32.const 3264 + i32.const 4200 local.set $1 loop $repeat|0 local.get $2 @@ -5879,7 +6158,7 @@ if local.get $1 call $~lib/math/NativeMath.random - i32.const 2324 + i32.const 3020 i32.load i32.const 1 i32.shr_u @@ -5899,7 +6178,7 @@ end local.get $1 ) - (func $std/array/createRandomStringArray (; 115 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createRandomStringArray (; 118 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) i32.const 16 @@ -5928,7 +6207,7 @@ f64.mul i32.trunc_f64_s call $std/array/createRandomString - call $~lib/array/Array#__set + call $~lib/array/Array>#__set local.get $1 i32.const 1 i32.add @@ -5938,7 +6217,7 @@ end local.get $0 ) - (func $~lib/string/String#substring (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 119 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5946,7 +6225,7 @@ i32.eqz if i32.const 0 - i32.const 3400 + i32.const 4376 i32.const 186 i32.const 4 call $~lib/env/abort @@ -5960,7 +6239,7 @@ select local.tee $2 local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -6000,7 +6279,7 @@ local.tee $3 i32.eqz if - i32.const 3264 + i32.const 4200 return end local.get $4 @@ -6008,7 +6287,7 @@ local.tee $2 if local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -6036,7 +6315,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join_bool (; 117 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_bool (; 120 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6053,7 +6332,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -6062,14 +6341,14 @@ local.get $4 i32.eqz if - i32.const 3472 - i32.const 3488 + i32.const 4472 + i32.const 4496 local.get $5 i32.load8_u select return end - i32.const 3508 + i32.const 4516 i32.load i32.const 1 i32.shr_u @@ -6108,8 +6387,8 @@ i32.shl local.get $2 i32.add - i32.const 3472 - i32.const 3488 + i32.const 4472 + i32.const 4496 local.get $8 select local.get $3 @@ -6127,7 +6406,7 @@ i32.shl local.get $2 i32.add - i32.const 3512 + i32.const 4528 local.get $6 i32.const 1 i32.shl @@ -6160,8 +6439,8 @@ i32.shl local.get $2 i32.add - i32.const 3472 - i32.const 3488 + i32.const 4472 + i32.const 4496 local.get $0 select local.get $3 @@ -6188,7 +6467,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/decimalCount32 (; 118 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 121 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -6242,10 +6521,10 @@ end end ) - (func $~lib/util/number/utoa32_lut (; 119 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 122 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - i32.const 4028 + i32.const 5092 i32.load local.set $3 loop $continue|0 @@ -6352,14 +6631,14 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 120 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 i32.eqz if - i32.const 3600 + i32.const 4648 return end local.get $0 @@ -6394,7 +6673,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 121 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 124 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6438,7 +6717,7 @@ end local.get $2 ) - (func $~lib/array/Array#join_int (; 122 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 125 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6453,7 +6732,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -6468,7 +6747,7 @@ return end local.get $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -6556,18 +6835,18 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join (; 123 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int ) - (func $~lib/util/number/utoa32 (; 124 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 127 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 i32.eqz if - i32.const 3600 + i32.const 4648 return end local.get $0 @@ -6584,7 +6863,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 125 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 128 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6608,7 +6887,7 @@ call $~lib/util/number/utoa32_lut local.get $0 ) - (func $~lib/array/Array#join_int (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6623,7 +6902,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -6638,7 +6917,7 @@ return end local.get $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -6726,12 +7005,12 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 130 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int ) - (func $~lib/util/number/genDigits (; 128 ;) (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 (; 131 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i32) @@ -6766,7 +7045,7 @@ local.tee $7 call $~lib/util/number/decimalCount32 local.set $9 - i32.const 5412 + i32.const 6644 i32.load local.set $13 loop $continue|0 @@ -7142,7 +7421,7 @@ local.get $2 end ) - (func $~lib/util/number/prettify (; 129 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 132 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7404,7 +7683,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 130 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 133 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -7523,13 +7802,13 @@ local.tee $8 i32.sub global.set $~lib/util/number/_K - i32.const 5132 + i32.const 6332 i32.load local.get $8 i32.add i64.load global.set $~lib/util/number/_frc_pow - i32.const 5340 + i32.const 6556 i32.load local.get $3 i32.const 1 @@ -7715,14 +7994,14 @@ local.get $11 i32.add ) - (func $~lib/util/number/dtoa (; 131 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 134 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 f64.const 0 f64.eq if - i32.const 4336 + i32.const 5496 return end local.get $0 @@ -7735,11 +8014,11 @@ local.get $0 f64.ne if - i32.const 4352 + i32.const 5520 return end - i32.const 4368 - i32.const 4400 + i32.const 5544 + i32.const 5584 local.get $0 f64.const 0 f64.lt @@ -7760,7 +8039,7 @@ call $~lib/runtime/assertUnregistered local.get $1 ) - (func $~lib/util/number/dtoa_stream (; 132 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 135 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) local.get $1 i32.const 1 i32.shl @@ -7806,8 +8085,8 @@ return else local.get $0 - i32.const 4368 - i32.const 4400 + i32.const 5544 + i32.const 5584 local.get $2 f64.const 0 f64.lt @@ -7829,7 +8108,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join_flt (; 133 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_flt (; 136 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7844,7 +8123,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -7858,7 +8137,7 @@ call $~lib/util/number/dtoa return end - i32.const 4316 + i32.const 5460 i32.load i32.const 1 i32.shr_u @@ -7900,7 +8179,7 @@ i32.shl local.get $2 i32.add - i32.const 4320 + i32.const 5472 local.get $5 i32.const 1 i32.shl @@ -7945,7 +8224,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join_str (; 134 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_str (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7961,7 +8240,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -7975,7 +8254,7 @@ return end local.get $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -7999,7 +8278,7 @@ local.tee $4 if local.get $4 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -8046,7 +8325,7 @@ i32.add local.get $4 local.get $4 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -8099,7 +8378,7 @@ i32.add local.get $4 local.get $4 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -8112,18 +8391,18 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_str ) - (func $std/array/Ref#constructor (; 136 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/Ref#constructor (; 139 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/doAllocate i32.const 18 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join_ref (; 137 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_ref (; 140 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8138,7 +8417,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -8147,10 +8426,10 @@ local.get $3 i32.eqz if - i32.const 5640 + i32.const 6920 return end - i32.const 3508 + i32.const 4516 i32.load i32.const 1 i32.shr_u @@ -8185,7 +8464,7 @@ i32.shl local.get $2 i32.add - i32.const 5640 + i32.const 6920 i32.const 30 call $~lib/memory/memory.copy local.get $1 @@ -8200,7 +8479,7 @@ i32.shl local.get $2 i32.add - i32.const 3512 + i32.const 4528 local.get $4 i32.const 1 i32.shl @@ -8230,7 +8509,7 @@ i32.shl local.get $2 i32.add - i32.const 5640 + i32.const 6920 i32.const 30 call $~lib/memory/memory.copy local.get $1 @@ -8256,12 +8535,12 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#toString (; 138 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 141 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 3512 + i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa_stream (; 139 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 142 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -8316,7 +8595,7 @@ end local.get $1 ) - (func $~lib/array/Array#join_int (; 140 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8331,7 +8610,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -8345,7 +8624,7 @@ call $~lib/util/number/itoa32 return end - i32.const 3508 + i32.const 4516 i32.load i32.const 1 i32.shr_u @@ -8385,7 +8664,7 @@ i32.shl local.get $2 i32.add - i32.const 3512 + i32.const 4528 local.get $5 i32.const 1 i32.shl @@ -8428,7 +8707,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 141 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 144 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -8458,7 +8737,7 @@ call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join_int (; 142 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8473,7 +8752,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -8487,7 +8766,7 @@ call $~lib/util/number/utoa32 return end - i32.const 3508 + i32.const 4516 i32.load i32.const 1 i32.shr_u @@ -8529,7 +8808,7 @@ i32.shl local.get $2 i32.add - i32.const 3512 + i32.const 4528 local.get $5 i32.const 1 i32.shl @@ -8574,7 +8853,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/decimalCount64 (; 143 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 146 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -8628,12 +8907,12 @@ end end ) - (func $~lib/util/number/utoa64_lut (; 144 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 147 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 4028 + i32.const 5092 i32.load local.set $3 loop $continue|0 @@ -8725,14 +9004,14 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 145 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 148 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 i64.eqz if - i32.const 3600 + i32.const 4648 return end local.get $0 @@ -8767,7 +9046,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 146 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 149 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -8807,7 +9086,7 @@ end local.get $1 ) - (func $~lib/array/Array#join_int (; 147 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 150 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8822,7 +9101,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -8836,7 +9115,7 @@ call $~lib/util/number/utoa64 return end - i32.const 3508 + i32.const 4516 i32.load i32.const 1 i32.shr_u @@ -8878,7 +9157,7 @@ i32.shl local.get $2 i32.add - i32.const 3512 + i32.const 4528 local.get $5 i32.const 1 i32.shl @@ -8923,7 +9202,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa64 (; 148 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 151 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8931,7 +9210,7 @@ local.get $0 i64.eqz if - i32.const 3600 + i32.const 4648 return end block (result i32) @@ -8988,7 +9267,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 149 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 152 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -9051,7 +9330,7 @@ end local.get $1 ) - (func $~lib/array/Array#join_int (; 150 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 153 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9066,7 +9345,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -9080,7 +9359,7 @@ call $~lib/util/number/itoa64 return end - i32.const 3508 + i32.const 4516 i32.load i32.const 1 i32.shr_u @@ -9122,7 +9401,7 @@ i32.shl local.get $2 i32.add - i32.const 3512 + i32.const 4528 local.get $5 i32.const 1 i32.shl @@ -9167,12 +9446,12 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#toString (; 151 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 154 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 3512 + i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array>#join_arr (; 152 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 155 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9186,12 +9465,12 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end - i32.const 3264 + i32.const 4200 local.set $1 - i32.const 3508 + i32.const 4516 i32.load i32.const 1 i32.shr_u @@ -9207,10 +9486,10 @@ local.tee $0 if (result i32) local.get $0 - i32.const 3512 + i32.const 4528 call $~lib/array/Array#join else - i32.const 3264 + i32.const 4200 end return end @@ -9229,7 +9508,7 @@ if local.get $1 local.get $0 - i32.const 3512 + i32.const 4528 call $~lib/array/Array#join call $~lib/string/String.__concat local.set $1 @@ -9237,7 +9516,7 @@ local.get $5 if local.get $1 - i32.const 3512 + i32.const 4528 call $~lib/string/String.__concat local.set $1 end @@ -9258,14 +9537,14 @@ if (result i32) local.get $1 local.get $0 - i32.const 3512 + i32.const 4528 call $~lib/array/Array#join call $~lib/string/String.__concat else local.get $1 end ) - (func $~lib/util/number/itoa_stream (; 153 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 156 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -9295,7 +9574,7 @@ call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join_int (; 154 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9310,7 +9589,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -9324,7 +9603,7 @@ call $~lib/util/number/utoa32 return end - i32.const 3508 + i32.const 4516 i32.load i32.const 1 i32.shr_u @@ -9364,7 +9643,7 @@ i32.shl local.get $2 i32.add - i32.const 3512 + i32.const 4528 local.get $5 i32.const 1 i32.shl @@ -9407,7 +9686,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array>#join_arr (; 155 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 158 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9421,12 +9700,12 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end - i32.const 3264 + i32.const 4200 local.set $1 - i32.const 3508 + i32.const 4516 i32.load i32.const 1 i32.shr_u @@ -9444,7 +9723,7 @@ local.get $0 call $~lib/array/Array#join_int else - i32.const 3264 + i32.const 4200 end return end @@ -9470,7 +9749,7 @@ local.get $5 if local.get $1 - i32.const 3512 + i32.const 4528 call $~lib/string/String.__concat local.set $1 end @@ -9497,7 +9776,7 @@ local.get $1 end ) - (func $~lib/array/Array>#join_arr (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 159 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9511,12 +9790,12 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end - i32.const 3264 + i32.const 4200 local.set $1 - i32.const 3508 + i32.const 4516 i32.load i32.const 1 i32.shr_u @@ -9532,10 +9811,10 @@ local.tee $0 if (result i32) local.get $0 - i32.const 3512 + i32.const 4528 call $~lib/array/Array#join else - i32.const 3264 + i32.const 4200 end return end @@ -9554,7 +9833,7 @@ if local.get $1 local.get $0 - i32.const 3512 + i32.const 4528 call $~lib/array/Array#join call $~lib/string/String.__concat local.set $1 @@ -9562,7 +9841,7 @@ local.get $5 if local.get $1 - i32.const 3512 + i32.const 4528 call $~lib/string/String.__concat local.set $1 end @@ -9583,14 +9862,14 @@ if (result i32) local.get $1 local.get $0 - i32.const 3512 + i32.const 4528 call $~lib/array/Array#join call $~lib/string/String.__concat else local.get $1 end ) - (func $~lib/array/Array>>#join_arr (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>>#join_arr (; 160 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9604,12 +9883,12 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end - i32.const 3264 + i32.const 4200 local.set $1 - i32.const 3508 + i32.const 4516 i32.load i32.const 1 i32.shr_u @@ -9627,7 +9906,7 @@ local.get $0 call $~lib/array/Array>#join_arr else - i32.const 3264 + i32.const 4200 end return end @@ -9653,7 +9932,7 @@ local.get $5 if local.get $1 - i32.const 3512 + i32.const 4528 call $~lib/string/String.__concat local.set $1 end @@ -9680,11 +9959,13 @@ local.get $1 end ) - (func $start:std/array (; 158 ;) (type $FUNCSIG$v) + (func $start:std/array (; 161 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) - i32.const 6528 + (local $3 i32) + (local $4 i32) + i32.const 8064 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -9694,8 +9975,8 @@ global.get $std/array/Null if i32.const 0 - i32.const 120 - i32.const 37 + i32.const 152 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable @@ -9707,8 +9988,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 38 + i32.const 152 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable @@ -9732,7 +10013,7 @@ i32.const 3 call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 192 + i32.const 248 i32.const 7 i32.const 0 call $~lib/runtime/doWrapArray @@ -9740,8 +10021,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 49 + i32.const 152 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -9752,7 +10033,7 @@ i32.const 2147483647 call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 248 + i32.const 320 i32.const 7 i32.const 0 call $~lib/runtime/doWrapArray @@ -9760,8 +10041,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 52 + i32.const 152 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable @@ -9772,7 +10053,7 @@ i32.const -3 call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 264 + i32.const 344 i32.const 7 i32.const 0 call $~lib/runtime/doWrapArray @@ -9780,8 +10061,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 55 + i32.const 152 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -9792,7 +10073,7 @@ i32.const 2147483647 call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 280 + i32.const 368 i32.const 7 i32.const 0 call $~lib/runtime/doWrapArray @@ -9800,8 +10081,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 58 + i32.const 152 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -9812,7 +10093,7 @@ i32.const 0 call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 296 + i32.const 392 i32.const 7 i32.const 0 call $~lib/runtime/doWrapArray @@ -9820,8 +10101,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 61 + i32.const 152 + i32.const 64 i32.const 0 call $~lib/env/abort unreachable @@ -9832,7 +10113,7 @@ i32.const 3 call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 368 + i32.const 488 i32.const 8 i32.const 2 call $~lib/runtime/doWrapArray @@ -9841,8 +10122,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 66 + i32.const 152 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable @@ -9853,7 +10134,7 @@ i32.const 2147483647 call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 400 + i32.const 528 i32.const 8 i32.const 2 call $~lib/runtime/doWrapArray @@ -9862,8 +10143,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 69 + i32.const 152 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable @@ -9874,7 +10155,7 @@ i32.const -3 call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 432 + i32.const 568 i32.const 8 i32.const 2 call $~lib/runtime/doWrapArray @@ -9883,8 +10164,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 72 + i32.const 152 + i32.const 75 i32.const 0 call $~lib/env/abort unreachable @@ -9895,7 +10176,7 @@ i32.const 2147483647 call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 464 + i32.const 608 i32.const 8 i32.const 2 call $~lib/runtime/doWrapArray @@ -9904,8 +10185,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 75 + i32.const 152 + i32.const 78 i32.const 0 call $~lib/env/abort unreachable @@ -9916,7 +10197,7 @@ i32.const 0 call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 496 + i32.const 648 i32.const 8 i32.const 2 call $~lib/runtime/doWrapArray @@ -9925,8 +10206,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 78 + i32.const 152 + i32.const 81 i32.const 0 call $~lib/env/abort unreachable @@ -9935,23 +10216,23 @@ i32.load offset=12 if i32.const 0 - i32.const 120 - i32.const 82 + i32.const 152 + i32.const 85 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/arr i32.load - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 2 i32.shr_s if i32.const 0 - i32.const 120 - i32.const 83 + i32.const 152 + i32.const 86 i32.const 0 call $~lib/env/abort unreachable @@ -9966,8 +10247,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 87 + i32.const 152 + i32.const 90 i32.const 0 call $~lib/env/abort unreachable @@ -9978,15 +10259,15 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 88 + i32.const 152 + i32.const 91 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/arr i32.load - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 2 @@ -9995,8 +10276,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 89 + i32.const 152 + i32.const 92 i32.const 0 call $~lib/env/abort unreachable @@ -10009,8 +10290,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 93 + i32.const 152 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable @@ -10019,15 +10300,15 @@ i32.load offset=12 if i32.const 0 - i32.const 120 - i32.const 94 + i32.const 152 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/arr i32.load - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 2 @@ -10036,8 +10317,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 95 + i32.const 152 + i32.const 98 i32.const 0 call $~lib/env/abort unreachable @@ -10051,15 +10332,15 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 99 + i32.const 152 + i32.const 102 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/arr i32.load - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 2 @@ -10068,8 +10349,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 100 + i32.const 152 + i32.const 103 i32.const 0 call $~lib/env/abort unreachable @@ -10081,8 +10362,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 101 + i32.const 152 + i32.const 104 i32.const 0 call $~lib/env/abort unreachable @@ -10096,15 +10377,15 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 105 + i32.const 152 + i32.const 108 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/arr i32.load - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 2 @@ -10113,8 +10394,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 106 + i32.const 152 + i32.const 109 i32.const 0 call $~lib/env/abort unreachable @@ -10126,8 +10407,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 107 + i32.const 152 + i32.const 110 i32.const 0 call $~lib/env/abort unreachable @@ -10139,8 +10420,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 108 + i32.const 152 + i32.const 111 i32.const 0 call $~lib/env/abort unreachable @@ -10154,15 +10435,15 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 112 + i32.const 152 + i32.const 115 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/arr i32.load - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 2 @@ -10171,8 +10452,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 113 + i32.const 152 + i32.const 116 i32.const 0 call $~lib/env/abort unreachable @@ -10184,8 +10465,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 114 + i32.const 152 + i32.const 117 i32.const 0 call $~lib/env/abort unreachable @@ -10197,8 +10478,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 115 + i32.const 152 + i32.const 118 i32.const 0 call $~lib/env/abort unreachable @@ -10210,8 +10491,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 116 + i32.const 152 + i32.const 119 i32.const 0 call $~lib/env/abort unreachable @@ -10225,7 +10506,7 @@ global.set $std/array/out global.get $std/array/arr i32.load - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 2 @@ -10234,8 +10515,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 123 + i32.const 152 + i32.const 126 i32.const 0 call $~lib/env/abort unreachable @@ -10246,8 +10527,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 124 + i32.const 152 + i32.const 127 i32.const 0 call $~lib/env/abort unreachable @@ -10258,14 +10539,14 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 125 + i32.const 152 + i32.const 128 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/out - i32.const 528 + i32.const 688 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10273,7 +10554,7 @@ drop global.get $std/array/arr i32.load - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 2 @@ -10282,8 +10563,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 128 + i32.const 152 + i32.const 131 i32.const 0 call $~lib/env/abort unreachable @@ -10295,8 +10576,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 130 + i32.const 152 + i32.const 133 i32.const 0 call $~lib/env/abort unreachable @@ -10308,8 +10589,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 131 + i32.const 152 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -10321,8 +10602,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 132 + i32.const 152 + i32.const 135 i32.const 0 call $~lib/env/abort unreachable @@ -10339,7 +10620,7 @@ global.set $std/array/out global.get $std/array/arr i32.load - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 2 @@ -10348,8 +10629,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 139 + i32.const 152 + i32.const 142 i32.const 0 call $~lib/env/abort unreachable @@ -10360,8 +10641,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 140 + i32.const 152 + i32.const 143 i32.const 0 call $~lib/env/abort unreachable @@ -10372,8 +10653,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 141 + i32.const 152 + i32.const 144 i32.const 0 call $~lib/env/abort unreachable @@ -10385,8 +10666,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 142 + i32.const 152 + i32.const 145 i32.const 0 call $~lib/env/abort unreachable @@ -10398,8 +10679,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 143 + i32.const 152 + i32.const 146 i32.const 0 call $~lib/env/abort unreachable @@ -10411,8 +10692,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 144 + i32.const 152 + i32.const 147 i32.const 0 call $~lib/env/abort unreachable @@ -10424,8 +10705,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 145 + i32.const 152 + i32.const 148 i32.const 0 call $~lib/env/abort unreachable @@ -10437,8 +10718,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 146 + i32.const 152 + i32.const 149 i32.const 0 call $~lib/env/abort unreachable @@ -10452,8 +10733,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 149 + i32.const 152 + i32.const 152 i32.const 0 call $~lib/env/abort unreachable @@ -10468,8 +10749,8 @@ i32.ne if i32.const 0 - i32.const 120 i32.const 152 + i32.const 155 i32.const 0 call $~lib/env/abort unreachable @@ -10481,8 +10762,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 153 + i32.const 152 + i32.const 156 i32.const 0 call $~lib/env/abort unreachable @@ -10491,8 +10772,8 @@ i32.load offset=12 if i32.const 0 - i32.const 120 - i32.const 156 + i32.const 152 + i32.const 159 i32.const 0 call $~lib/env/abort unreachable @@ -10507,8 +10788,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 158 + i32.const 152 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable @@ -10517,13 +10798,13 @@ i32.load offset=12 if i32.const 0 - i32.const 120 - i32.const 159 + i32.const 152 + i32.const 162 i32.const 0 call $~lib/env/abort unreachable end - i32.const 568 + i32.const 752 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10533,7 +10814,7 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - i32.const 600 + i32.const 792 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10542,13 +10823,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 165 + i32.const 152 + i32.const 168 i32.const 0 call $~lib/env/abort unreachable end - i32.const 632 + i32.const 832 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10558,7 +10839,7 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - i32.const 664 + i32.const 872 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10567,13 +10848,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 167 + i32.const 152 + i32.const 170 i32.const 0 call $~lib/env/abort unreachable end - i32.const 696 + i32.const 912 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10583,7 +10864,7 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - i32.const 728 + i32.const 952 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10592,13 +10873,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 169 + i32.const 152 + i32.const 172 i32.const 0 call $~lib/env/abort unreachable end - i32.const 760 + i32.const 992 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10608,7 +10889,7 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - i32.const 792 + i32.const 1032 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10617,13 +10898,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 171 + i32.const 152 + i32.const 174 i32.const 0 call $~lib/env/abort unreachable end - i32.const 824 + i32.const 1072 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10633,7 +10914,7 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 856 + i32.const 1112 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10642,13 +10923,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 173 + i32.const 152 + i32.const 176 i32.const 0 call $~lib/env/abort unreachable end - i32.const 888 + i32.const 1152 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10658,7 +10939,7 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 920 + i32.const 1192 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10667,13 +10948,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 175 + i32.const 152 + i32.const 178 i32.const 0 call $~lib/env/abort unreachable end - i32.const 952 + i32.const 1232 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10683,7 +10964,7 @@ i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 984 + i32.const 1272 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10692,13 +10973,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 177 + i32.const 152 + i32.const 180 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1016 + i32.const 1312 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10708,7 +10989,7 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#copyWithin - i32.const 1048 + i32.const 1352 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10717,13 +10998,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 179 + i32.const 152 + i32.const 182 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1080 + i32.const 1392 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10733,7 +11014,7 @@ i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - i32.const 1112 + i32.const 1432 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10742,13 +11023,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 181 + i32.const 152 + i32.const 184 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1144 + i32.const 1472 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10758,7 +11039,7 @@ i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - i32.const 1176 + i32.const 1512 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10767,13 +11048,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 183 + i32.const 152 + i32.const 186 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1208 + i32.const 1552 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10783,7 +11064,7 @@ i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - i32.const 1240 + i32.const 1592 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10792,13 +11073,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 185 + i32.const 152 + i32.const 188 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1272 + i32.const 1632 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10808,7 +11089,7 @@ i32.const -3 i32.const 2147483647 call $~lib/array/Array#copyWithin - i32.const 1304 + i32.const 1672 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -10817,8 +11098,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 187 + i32.const 152 + i32.const 190 i32.const 0 call $~lib/env/abort unreachable @@ -10832,15 +11113,15 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 193 + i32.const 152 + i32.const 196 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/arr i32.load - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 2 @@ -10849,8 +11130,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 194 + i32.const 152 + i32.const 197 i32.const 0 call $~lib/env/abort unreachable @@ -10862,8 +11143,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 195 + i32.const 152 + i32.const 198 i32.const 0 call $~lib/env/abort unreachable @@ -10875,8 +11156,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 196 + i32.const 152 + i32.const 199 i32.const 0 call $~lib/env/abort unreachable @@ -10888,8 +11169,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 197 + i32.const 152 + i32.const 200 i32.const 0 call $~lib/env/abort unreachable @@ -10901,8 +11182,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 198 + i32.const 152 + i32.const 201 i32.const 0 call $~lib/env/abort unreachable @@ -10916,15 +11197,15 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 202 + i32.const 152 + i32.const 205 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/arr i32.load - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 2 @@ -10933,8 +11214,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 203 + i32.const 152 + i32.const 206 i32.const 0 call $~lib/env/abort unreachable @@ -10946,8 +11227,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 204 + i32.const 152 + i32.const 207 i32.const 0 call $~lib/env/abort unreachable @@ -10959,8 +11240,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 205 + i32.const 152 + i32.const 208 i32.const 0 call $~lib/env/abort unreachable @@ -10972,8 +11253,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 206 + i32.const 152 + i32.const 209 i32.const 0 call $~lib/env/abort unreachable @@ -10985,8 +11266,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 207 + i32.const 152 + i32.const 210 i32.const 0 call $~lib/env/abort unreachable @@ -10998,8 +11279,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 208 + i32.const 152 + i32.const 211 i32.const 0 call $~lib/env/abort unreachable @@ -11012,8 +11293,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 214 + i32.const 152 + i32.const 217 i32.const 0 call $~lib/env/abort unreachable @@ -11024,15 +11305,15 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 215 + i32.const 152 + i32.const 218 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/arr i32.load - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 2 @@ -11041,8 +11322,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 216 + i32.const 152 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -11054,8 +11335,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 217 + i32.const 152 + i32.const 220 i32.const 0 call $~lib/env/abort unreachable @@ -11067,8 +11348,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 218 + i32.const 152 + i32.const 221 i32.const 0 call $~lib/env/abort unreachable @@ -11080,8 +11361,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 219 + i32.const 152 + i32.const 222 i32.const 0 call $~lib/env/abort unreachable @@ -11093,8 +11374,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 220 + i32.const 152 + i32.const 223 i32.const 0 call $~lib/env/abort unreachable @@ -11107,8 +11388,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 224 + i32.const 152 + i32.const 227 i32.const 0 call $~lib/env/abort unreachable @@ -11119,15 +11400,15 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 225 + i32.const 152 + i32.const 228 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/arr i32.load - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 2 @@ -11136,8 +11417,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 226 + i32.const 152 + i32.const 229 i32.const 0 call $~lib/env/abort unreachable @@ -11149,8 +11430,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 227 + i32.const 152 + i32.const 230 i32.const 0 call $~lib/env/abort unreachable @@ -11162,8 +11443,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 228 + i32.const 152 + i32.const 231 i32.const 0 call $~lib/env/abort unreachable @@ -11175,8 +11456,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 229 + i32.const 152 + i32.const 232 i32.const 0 call $~lib/env/abort unreachable @@ -11189,15 +11470,15 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 235 + i32.const 152 + i32.const 238 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/arr i32.load - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 2 @@ -11206,8 +11487,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 236 + i32.const 152 + i32.const 239 i32.const 0 call $~lib/env/abort unreachable @@ -11219,8 +11500,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 237 + i32.const 152 + i32.const 240 i32.const 0 call $~lib/env/abort unreachable @@ -11232,8 +11513,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 238 + i32.const 152 + i32.const 241 i32.const 0 call $~lib/env/abort unreachable @@ -11245,8 +11526,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 239 + i32.const 152 + i32.const 242 i32.const 0 call $~lib/env/abort unreachable @@ -11265,8 +11546,8 @@ global.get $std/array/i if i32.const 0 - i32.const 120 - i32.const 248 + i32.const 152 + i32.const 251 i32.const 0 call $~lib/env/abort unreachable @@ -11281,8 +11562,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 252 + i32.const 152 + i32.const 255 i32.const 0 call $~lib/env/abort unreachable @@ -11297,8 +11578,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 256 + i32.const 152 + i32.const 259 i32.const 0 call $~lib/env/abort unreachable @@ -11313,8 +11594,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 260 + i32.const 152 + i32.const 263 i32.const 0 call $~lib/env/abort unreachable @@ -11329,8 +11610,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 264 + i32.const 152 + i32.const 267 i32.const 0 call $~lib/env/abort unreachable @@ -11345,8 +11626,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 268 + i32.const 152 + i32.const 271 i32.const 0 call $~lib/env/abort unreachable @@ -11361,8 +11642,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 272 + i32.const 152 + i32.const 275 i32.const 0 call $~lib/env/abort unreachable @@ -11377,8 +11658,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 276 + i32.const 152 + i32.const 279 i32.const 0 call $~lib/env/abort unreachable @@ -11393,8 +11674,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 280 + i32.const 152 + i32.const 283 i32.const 0 call $~lib/env/abort unreachable @@ -11409,8 +11690,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 284 + i32.const 152 + i32.const 287 i32.const 0 call $~lib/env/abort unreachable @@ -11425,8 +11706,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 290 + i32.const 152 + i32.const 293 i32.const 0 call $~lib/env/abort unreachable @@ -11441,8 +11722,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 294 + i32.const 152 + i32.const 297 i32.const 0 call $~lib/env/abort unreachable @@ -11455,8 +11736,8 @@ global.get $std/array/includes if i32.const 0 - i32.const 120 - i32.const 298 + i32.const 152 + i32.const 301 i32.const 0 call $~lib/env/abort unreachable @@ -11469,8 +11750,8 @@ global.get $std/array/includes if i32.const 0 - i32.const 120 - i32.const 302 + i32.const 152 + i32.const 305 i32.const 0 call $~lib/env/abort unreachable @@ -11485,8 +11766,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 306 + i32.const 152 + i32.const 309 i32.const 0 call $~lib/env/abort unreachable @@ -11501,8 +11782,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 310 + i32.const 152 + i32.const 313 i32.const 0 call $~lib/env/abort unreachable @@ -11517,8 +11798,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 314 + i32.const 152 + i32.const 317 i32.const 0 call $~lib/env/abort unreachable @@ -11533,8 +11814,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 318 + i32.const 152 + i32.const 321 i32.const 0 call $~lib/env/abort unreachable @@ -11549,8 +11830,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 322 + i32.const 152 + i32.const 325 i32.const 0 call $~lib/env/abort unreachable @@ -11565,8 +11846,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 326 + i32.const 152 + i32.const 329 i32.const 0 call $~lib/env/abort unreachable @@ -11582,15 +11863,15 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 330 + i32.const 152 + i32.const 333 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/arr i32.load - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 2 @@ -11599,8 +11880,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 331 + i32.const 152 + i32.const 334 i32.const 0 call $~lib/env/abort unreachable @@ -11612,8 +11893,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 332 + i32.const 152 + i32.const 335 i32.const 0 call $~lib/env/abort unreachable @@ -11625,8 +11906,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 333 + i32.const 152 + i32.const 336 i32.const 0 call $~lib/env/abort unreachable @@ -11635,7 +11916,7 @@ i32.const 0 i32.const 2147483647 call $~lib/array/Array#splice - i32.const 1392 + i32.const 1784 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11644,14 +11925,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 338 + i32.const 152 + i32.const 341 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr - i32.const 1424 + i32.const 1824 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11660,13 +11941,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 339 + i32.const 152 + i32.const 342 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1432 + i32.const 1840 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11675,7 +11956,7 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#splice - i32.const 1464 + i32.const 1880 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11684,14 +11965,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 342 + i32.const 152 + i32.const 345 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr - i32.const 1488 + i32.const 1912 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11700,13 +11981,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 343 + i32.const 152 + i32.const 346 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1504 + i32.const 1936 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11715,7 +11996,7 @@ i32.const 2 i32.const 2 call $~lib/array/Array#splice - i32.const 1536 + i32.const 1976 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11724,14 +12005,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 346 + i32.const 152 + i32.const 349 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr - i32.const 1552 + i32.const 2000 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11740,13 +12021,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 347 + i32.const 152 + i32.const 350 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1576 + i32.const 2032 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11755,7 +12036,7 @@ i32.const 0 i32.const 1 call $~lib/array/Array#splice - i32.const 1608 + i32.const 2072 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11764,14 +12045,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 350 + i32.const 152 + i32.const 353 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr - i32.const 1624 + i32.const 2096 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11780,13 +12061,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 351 + i32.const 152 + i32.const 354 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1648 + i32.const 2128 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11795,7 +12076,7 @@ i32.const -1 i32.const 2147483647 call $~lib/array/Array#splice - i32.const 1680 + i32.const 2168 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11804,14 +12085,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 354 + i32.const 152 + i32.const 357 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr - i32.const 1696 + i32.const 2192 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11820,13 +12101,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 355 + i32.const 152 + i32.const 358 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1720 + i32.const 2224 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11835,7 +12116,7 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#splice - i32.const 1752 + i32.const 2264 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11844,14 +12125,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 358 + i32.const 152 + i32.const 361 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr - i32.const 1768 + i32.const 2288 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11860,13 +12141,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 359 + i32.const 152 + i32.const 362 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1792 + i32.const 2320 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11875,7 +12156,7 @@ i32.const -2 i32.const 1 call $~lib/array/Array#splice - i32.const 1824 + i32.const 2360 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11884,14 +12165,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 362 + i32.const 152 + i32.const 365 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr - i32.const 1840 + i32.const 2384 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11900,13 +12181,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 363 + i32.const 152 + i32.const 366 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1864 + i32.const 2416 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11915,7 +12196,7 @@ i32.const -7 i32.const 1 call $~lib/array/Array#splice - i32.const 1896 + i32.const 2456 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11924,14 +12205,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 366 + i32.const 152 + i32.const 369 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr - i32.const 1912 + i32.const 2480 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11940,13 +12221,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 367 + i32.const 152 + i32.const 370 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1936 + i32.const 2512 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11955,7 +12236,7 @@ i32.const -2 i32.const -1 call $~lib/array/Array#splice - i32.const 1968 + i32.const 2552 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11964,14 +12245,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 370 + i32.const 152 + i32.const 373 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr - i32.const 1976 + i32.const 2568 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11980,13 +12261,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 371 + i32.const 152 + i32.const 374 i32.const 0 call $~lib/env/abort unreachable end - i32.const 2008 + i32.const 2608 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -11995,7 +12276,7 @@ i32.const 1 i32.const -2 call $~lib/array/Array#splice - i32.const 2040 + i32.const 2648 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -12004,14 +12285,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 374 + i32.const 152 + i32.const 377 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr - i32.const 2048 + i32.const 2664 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -12020,13 +12301,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 375 + i32.const 152 + i32.const 378 i32.const 0 call $~lib/env/abort unreachable end - i32.const 2080 + i32.const 2704 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -12035,7 +12316,7 @@ i32.const 4 i32.const 0 call $~lib/array/Array#splice - i32.const 2112 + i32.const 2744 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -12044,14 +12325,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 378 + i32.const 152 + i32.const 381 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr - i32.const 2120 + i32.const 2760 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -12060,13 +12341,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 379 + i32.const 152 + i32.const 382 i32.const 0 call $~lib/env/abort unreachable end - i32.const 2152 + i32.const 2800 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -12075,7 +12356,7 @@ i32.const 7 i32.const 0 call $~lib/array/Array#splice - i32.const 2184 + i32.const 2840 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -12084,14 +12365,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 382 + i32.const 152 + i32.const 385 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr - i32.const 2192 + i32.const 2856 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -12100,13 +12381,13 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 383 + i32.const 152 + i32.const 386 i32.const 0 call $~lib/env/abort unreachable end - i32.const 2224 + i32.const 2896 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -12115,7 +12396,7 @@ i32.const 7 i32.const 5 call $~lib/array/Array#splice - i32.const 2256 + i32.const 2936 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -12124,14 +12405,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 386 + i32.const 152 + i32.const 389 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr - i32.const 2264 + i32.const 2952 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -12140,8 +12421,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 387 + i32.const 152 + i32.const 390 i32.const 0 call $~lib/env/abort unreachable @@ -12169,8 +12450,8 @@ global.get $std/array/i if i32.const 0 - i32.const 120 - i32.const 397 + i32.const 152 + i32.const 400 i32.const 0 call $~lib/env/abort unreachable @@ -12184,8 +12465,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 400 + i32.const 152 + i32.const 403 i32.const 0 call $~lib/env/abort unreachable @@ -12199,8 +12480,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 403 + i32.const 152 + i32.const 406 i32.const 0 call $~lib/env/abort unreachable @@ -12214,8 +12495,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 411 + i32.const 152 + i32.const 414 i32.const 0 call $~lib/env/abort unreachable @@ -12226,8 +12507,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 412 + i32.const 152 + i32.const 415 i32.const 0 call $~lib/env/abort unreachable @@ -12241,8 +12522,8 @@ i32.eq if i32.const 0 - i32.const 120 - i32.const 414 + i32.const 152 + i32.const 417 i32.const 0 call $~lib/env/abort unreachable @@ -12268,8 +12549,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 427 + i32.const 152 + i32.const 430 i32.const 0 call $~lib/env/abort unreachable @@ -12280,8 +12561,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 428 + i32.const 152 + i32.const 431 i32.const 0 call $~lib/env/abort unreachable @@ -12301,8 +12582,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 436 + i32.const 152 + i32.const 439 i32.const 0 call $~lib/env/abort unreachable @@ -12314,8 +12595,8 @@ global.get $std/array/every if i32.const 0 - i32.const 120 - i32.const 439 + i32.const 152 + i32.const 442 i32.const 0 call $~lib/env/abort unreachable @@ -12329,8 +12610,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 447 + i32.const 152 + i32.const 450 i32.const 0 call $~lib/env/abort unreachable @@ -12341,8 +12622,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 448 + i32.const 152 + i32.const 451 i32.const 0 call $~lib/env/abort unreachable @@ -12354,8 +12635,8 @@ global.get $std/array/every if i32.const 0 - i32.const 120 - i32.const 450 + i32.const 152 + i32.const 453 i32.const 0 call $~lib/env/abort unreachable @@ -12381,8 +12662,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 463 + i32.const 152 + i32.const 466 i32.const 0 call $~lib/env/abort unreachable @@ -12393,8 +12674,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 464 + i32.const 152 + i32.const 467 i32.const 0 call $~lib/env/abort unreachable @@ -12414,8 +12695,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 472 + i32.const 152 + i32.const 475 i32.const 0 call $~lib/env/abort unreachable @@ -12427,8 +12708,8 @@ global.get $std/array/some if i32.const 0 - i32.const 120 - i32.const 475 + i32.const 152 + i32.const 478 i32.const 0 call $~lib/env/abort unreachable @@ -12440,8 +12721,8 @@ global.get $std/array/some if i32.const 0 - i32.const 120 - i32.const 483 + i32.const 152 + i32.const 486 i32.const 0 call $~lib/env/abort unreachable @@ -12452,8 +12733,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 484 + i32.const 152 + i32.const 487 i32.const 0 call $~lib/env/abort unreachable @@ -12467,8 +12748,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 486 + i32.const 152 + i32.const 489 i32.const 0 call $~lib/env/abort unreachable @@ -12492,8 +12773,8 @@ global.get $std/array/some if i32.const 0 - i32.const 120 - i32.const 499 + i32.const 152 + i32.const 502 i32.const 0 call $~lib/env/abort unreachable @@ -12504,8 +12785,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 500 + i32.const 152 + i32.const 503 i32.const 0 call $~lib/env/abort unreachable @@ -12526,8 +12807,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 509 + i32.const 152 + i32.const 512 i32.const 0 call $~lib/env/abort unreachable @@ -12542,8 +12823,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 518 + i32.const 152 + i32.const 521 i32.const 0 call $~lib/env/abort unreachable @@ -12554,8 +12835,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 519 + i32.const 152 + i32.const 522 i32.const 0 call $~lib/env/abort unreachable @@ -12570,8 +12851,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 522 + i32.const 152 + i32.const 525 i32.const 0 call $~lib/env/abort unreachable @@ -12598,8 +12879,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 536 + i32.const 152 + i32.const 539 i32.const 0 call $~lib/env/abort unreachable @@ -12610,8 +12891,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 537 + i32.const 152 + i32.const 540 i32.const 0 call $~lib/env/abort unreachable @@ -12631,8 +12912,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 562 + i32.const 152 + i32.const 565 i32.const 0 call $~lib/env/abort unreachable @@ -12673,8 +12954,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 573 + i32.const 152 + i32.const 576 i32.const 0 call $~lib/env/abort unreachable @@ -12689,8 +12970,8 @@ f32.ne if i32.const 0 - i32.const 120 - i32.const 574 + i32.const 152 + i32.const 577 i32.const 0 call $~lib/env/abort unreachable @@ -12705,8 +12986,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 583 + i32.const 152 + i32.const 586 i32.const 0 call $~lib/env/abort unreachable @@ -12717,8 +12998,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 584 + i32.const 152 + i32.const 587 i32.const 0 call $~lib/env/abort unreachable @@ -12733,8 +13014,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 591 + i32.const 152 + i32.const 594 i32.const 0 call $~lib/env/abort unreachable @@ -12761,8 +13042,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 606 + i32.const 152 + i32.const 609 i32.const 0 call $~lib/env/abort unreachable @@ -12773,8 +13054,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 607 + i32.const 152 + i32.const 610 i32.const 0 call $~lib/env/abort unreachable @@ -12795,8 +13076,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 615 + i32.const 152 + i32.const 618 i32.const 0 call $~lib/env/abort unreachable @@ -12812,8 +13093,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 624 + i32.const 152 + i32.const 627 i32.const 0 call $~lib/env/abort unreachable @@ -12824,8 +13105,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 625 + i32.const 152 + i32.const 628 i32.const 0 call $~lib/env/abort unreachable @@ -12841,8 +13122,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 632 + i32.const 152 + i32.const 635 i32.const 0 call $~lib/env/abort unreachable @@ -12870,8 +13151,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 647 + i32.const 152 + i32.const 650 i32.const 0 call $~lib/env/abort unreachable @@ -12882,8 +13163,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 648 + i32.const 152 + i32.const 651 i32.const 0 call $~lib/env/abort unreachable @@ -12904,8 +13185,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 656 + i32.const 152 + i32.const 659 i32.const 0 call $~lib/env/abort unreachable @@ -12920,8 +13201,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 660 + i32.const 152 + i32.const 663 i32.const 0 call $~lib/env/abort unreachable @@ -12938,8 +13219,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 663 + i32.const 152 + i32.const 666 i32.const 0 call $~lib/env/abort unreachable @@ -12954,8 +13235,8 @@ global.get $std/array/boolVal if i32.const 0 - i32.const 120 - i32.const 666 + i32.const 152 + i32.const 669 i32.const 0 call $~lib/env/abort unreachable @@ -12970,8 +13251,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 674 + i32.const 152 + i32.const 677 i32.const 0 call $~lib/env/abort unreachable @@ -12982,8 +13263,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 675 + i32.const 152 + i32.const 678 i32.const 0 call $~lib/env/abort unreachable @@ -12998,8 +13279,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 677 + i32.const 152 + i32.const 680 i32.const 0 call $~lib/env/abort unreachable @@ -13026,8 +13307,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 690 + i32.const 152 + i32.const 693 i32.const 0 call $~lib/env/abort unreachable @@ -13038,8 +13319,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 691 + i32.const 152 + i32.const 694 i32.const 0 call $~lib/env/abort unreachable @@ -13060,8 +13341,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 699 + i32.const 152 + i32.const 702 i32.const 0 call $~lib/env/abort unreachable @@ -13076,8 +13357,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 703 + i32.const 152 + i32.const 706 i32.const 0 call $~lib/env/abort unreachable @@ -13094,8 +13375,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 706 + i32.const 152 + i32.const 709 i32.const 0 call $~lib/env/abort unreachable @@ -13110,8 +13391,8 @@ global.get $std/array/boolVal if i32.const 0 - i32.const 120 - i32.const 709 + i32.const 152 + i32.const 712 i32.const 0 call $~lib/env/abort unreachable @@ -13126,8 +13407,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 717 + i32.const 152 + i32.const 720 i32.const 0 call $~lib/env/abort unreachable @@ -13138,8 +13419,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 718 + i32.const 152 + i32.const 721 i32.const 0 call $~lib/env/abort unreachable @@ -13154,8 +13435,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 720 + i32.const 152 + i32.const 723 i32.const 0 call $~lib/env/abort unreachable @@ -13182,8 +13463,8 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 733 + i32.const 152 + i32.const 736 i32.const 0 call $~lib/env/abort unreachable @@ -13192,8 +13473,8 @@ i32.load offset=12 if i32.const 0 - i32.const 120 - i32.const 734 + i32.const 152 + i32.const 737 i32.const 0 call $~lib/env/abort unreachable @@ -13234,7 +13515,7 @@ local.get $0 call $~lib/array/Array#sort global.get $std/array/f32ArrayTyped - i32.const 2576 + i32.const 3304 i32.const 9 i32.const 2 call $~lib/runtime/doWrapArray @@ -13242,8 +13523,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 821 + i32.const 152 + i32.const 824 i32.const 0 call $~lib/env/abort unreachable @@ -13269,7 +13550,7 @@ local.get $0 call $~lib/array/Array#sort global.get $std/array/f64ArrayTyped - i32.const 2712 + i32.const 3464 i32.const 10 i32.const 3 call $~lib/runtime/doWrapArray @@ -13277,8 +13558,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 825 + i32.const 152 + i32.const 828 i32.const 0 call $~lib/env/abort unreachable @@ -13305,7 +13586,7 @@ call $~lib/array/Array#sort drop global.get $std/array/i32ArrayTyped - i32.const 2840 + i32.const 3616 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -13314,8 +13595,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 829 + i32.const 152 + i32.const 832 i32.const 0 call $~lib/env/abort unreachable @@ -13342,7 +13623,7 @@ call $~lib/array/Array#sort drop global.get $std/array/u32ArrayTyped - i32.const 2928 + i32.const 3728 i32.const 8 i32.const 2 call $~lib/runtime/doWrapArray @@ -13351,8 +13632,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 833 + i32.const 152 + i32.const 836 i32.const 0 call $~lib/env/abort unreachable @@ -13377,7 +13658,7 @@ global.get $std/array/reversed1 call $std/array/assertSortedDefault global.get $std/array/reversed1 - i32.const 3168 + i32.const 4056 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -13386,8 +13667,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 853 + i32.const 152 + i32.const 856 i32.const 0 call $~lib/env/abort unreachable @@ -13395,7 +13676,7 @@ global.get $std/array/reversed2 call $std/array/assertSortedDefault global.get $std/array/reversed2 - i32.const 3184 + i32.const 4080 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray @@ -13404,8 +13685,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 856 + i32.const 152 + i32.const 859 i32.const 0 call $~lib/env/abort unreachable @@ -13419,8 +13700,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 859 + i32.const 152 + i32.const 862 i32.const 0 call $~lib/env/abort unreachable @@ -13434,8 +13715,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 862 + i32.const 152 + i32.const 865 i32.const 0 call $~lib/env/abort unreachable @@ -13449,8 +13730,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 865 + i32.const 152 + i32.const 868 i32.const 0 call $~lib/env/abort unreachable @@ -13464,8 +13745,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 868 + i32.const 152 + i32.const 871 i32.const 0 call $~lib/env/abort unreachable @@ -13479,8 +13760,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 871 + i32.const 152 + i32.const 874 i32.const 0 call $~lib/env/abort unreachable @@ -13525,8 +13806,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 901 + i32.const 152 + i32.const 904 i32.const 0 call $~lib/env/abort unreachable @@ -13537,102 +13818,102 @@ global.set $~lib/argc global.get $std/array/randomStrings400 call $std/array/assertSorted|trampoline - i32.const 3528 + i32.const 4552 i32.const 15 i32.const 0 call $~lib/runtime/doWrapArray call $~lib/array/Array#join_bool - i32.const 3544 + i32.const 4576 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 910 + i32.const 152 + i32.const 913 i32.const 0 call $~lib/env/abort unreachable end - i32.const 4048 + i32.const 5120 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray - i32.const 3264 + i32.const 4200 call $~lib/array/Array#join - i32.const 4072 + i32.const 5152 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 911 + i32.const 152 + i32.const 914 i32.const 0 call $~lib/env/abort unreachable end - i32.const 4136 + i32.const 5240 i32.const 8 i32.const 2 call $~lib/runtime/doWrapArray - i32.const 4120 + i32.const 5216 call $~lib/array/Array#join - i32.const 4072 + i32.const 5152 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 912 + i32.const 152 + i32.const 915 i32.const 0 call $~lib/env/abort unreachable end - i32.const 4192 + i32.const 5320 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray - i32.const 4176 + i32.const 5296 call $~lib/array/Array#join - i32.const 4208 + i32.const 5344 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 913 + i32.const 152 + i32.const 916 i32.const 0 call $~lib/env/abort unreachable end - i32.const 5432 + i32.const 6672 i32.const 10 i32.const 3 call $~lib/runtime/doWrapArray call $~lib/array/Array#join_flt - i32.const 5488 + i32.const 6736 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 914 + i32.const 152 + i32.const 917 i32.const 0 call $~lib/env/abort unreachable end - i32.const 5616 + i32.const 6888 i32.const 14 i32.const 2 call $~lib/runtime/doWrapArray - i32.const 3264 + i32.const 4200 call $~lib/array/Array#join - i32.const 5576 + i32.const 6832 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 915 + i32.const 152 + i32.const 918 i32.const 0 call $~lib/env/abort unreachable @@ -13652,202 +13933,227 @@ i32.store offset=12 local.get $0 i32.load offset=4 - local.tee $1 + local.tee $2 + local.set $3 call $std/array/Ref#constructor - i32.store + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/runtime/doRetain + end + local.get $3 local.get $1 + i32.store + local.get $2 i32.const 0 i32.store offset=4 - local.get $1 call $std/array/Ref#constructor + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/runtime/doRetain + end + local.get $2 + local.get $1 i32.store offset=8 local.get $0 global.set $std/array/refArr global.get $std/array/refArr call $~lib/array/Array#join_ref - i32.const 5680 + i32.const 6968 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 917 + i32.const 152 + i32.const 920 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/reversed0 call $~lib/array/Array#toString - i32.const 3264 + i32.const 4200 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 921 + i32.const 152 + i32.const 924 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/reversed1 call $~lib/array/Array#toString - i32.const 5576 + i32.const 6832 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 922 + i32.const 152 + i32.const 925 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/reversed2 call $~lib/array/Array#toString - i32.const 5752 + i32.const 7048 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 923 + i32.const 152 + i32.const 926 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/reversed4 call $~lib/array/Array#toString - i32.const 5768 + i32.const 7072 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 924 + i32.const 152 + i32.const 927 i32.const 0 call $~lib/env/abort unreachable end - i32.const 5808 + i32.const 7128 i32.const 20 i32.const 0 call $~lib/runtime/doWrapArray call $~lib/array/Array#join_int - i32.const 5824 + i32.const 7152 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 926 + i32.const 152 + i32.const 929 i32.const 0 call $~lib/env/abort unreachable end - i32.const 5864 + i32.const 7208 i32.const 21 i32.const 1 call $~lib/runtime/doWrapArray call $~lib/array/Array#join_int - i32.const 5880 + i32.const 7232 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 927 + i32.const 152 + i32.const 930 i32.const 0 call $~lib/env/abort unreachable end - i32.const 5944 + i32.const 7312 i32.const 16 i32.const 3 call $~lib/runtime/doWrapArray call $~lib/array/Array#join_int - i32.const 5976 + i32.const 7352 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 928 + i32.const 152 + i32.const 931 i32.const 0 call $~lib/env/abort unreachable end - i32.const 6072 + i32.const 7464 i32.const 22 i32.const 3 call $~lib/runtime/doWrapArray call $~lib/array/Array#join_int - i32.const 6112 + i32.const 7512 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 929 + i32.const 152 + i32.const 932 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/randomStringsExpected call $~lib/array/Array#toString - i32.const 6208 + i32.const 7616 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 930 + i32.const 152 + i32.const 933 i32.const 0 call $~lib/env/abort unreachable end - i32.const 6304 + i32.const 7744 i32.const 14 i32.const 2 call $~lib/runtime/doWrapArray call $~lib/array/Array#toString - i32.const 6328 + i32.const 7776 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 931 + i32.const 152 + i32.const 934 i32.const 0 call $~lib/env/abort unreachable end i32.const 2 call $~lib/array/Array>#constructor - local.tee $1 + local.tee $2 i32.load offset=4 - local.tee $0 - i32.const 6368 + local.set $0 + i32.const 7832 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray - i32.store + local.tee $1 + local.get $2 + call $~lib/runtime/doRetain local.get $0 - i32.const 6384 + local.get $1 + i32.store + i32.const 7856 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray - i32.store offset=4 + local.tee $1 + local.get $2 + call $~lib/runtime/doRetain + local.get $0 local.get $1 + i32.store offset=4 + local.get $2 global.set $std/array/subarr32 global.get $std/array/subarr32 call $~lib/array/Array>#join_arr - i32.const 6400 + i32.const 7880 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 934 + i32.const 152 + i32.const 937 i32.const 0 call $~lib/env/abort unreachable @@ -13867,29 +14173,38 @@ i32.store offset=12 local.get $0 i32.load offset=4 - local.tee $1 - i32.const 6440 + local.set $2 + i32.const 7936 i32.const 7 i32.const 0 call $~lib/runtime/doWrapArray - i32.store + local.tee $1 + local.get $0 + call $~lib/runtime/doRetain + local.get $2 local.get $1 - i32.const 6456 + i32.store + i32.const 7960 i32.const 7 i32.const 0 call $~lib/runtime/doWrapArray + local.tee $1 + local.get $0 + call $~lib/runtime/doRetain + local.get $2 + local.get $1 i32.store offset=4 local.get $0 global.set $std/array/subarr8 global.get $std/array/subarr8 call $~lib/array/Array>#join_arr - i32.const 6400 + i32.const 7880 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 937 + i32.const 152 + i32.const 940 i32.const 0 call $~lib/env/abort unreachable @@ -13909,7 +14224,7 @@ i32.store offset=12 local.get $0 i32.load offset=4 - local.set $1 + local.set $2 i32.const 16 call $~lib/runtime/doAllocate i32.const 24 @@ -13917,42 +14232,57 @@ i32.const 1 i32.const 2 call $~lib/runtime/ArrayBufferView#constructor - local.tee $2 + local.tee $1 i32.const 0 i32.store offset=12 - local.get $2 + local.get $1 i32.const 1 i32.store offset=12 - local.get $2 + local.get $1 i32.load offset=4 - i32.const 6520 + local.set $3 + i32.const 8056 i32.const 8 i32.const 2 call $~lib/runtime/doWrapArray + local.tee $4 + local.get $1 + call $~lib/runtime/doRetain + local.get $3 + local.get $4 i32.store local.get $1 + local.get $0 + call $~lib/runtime/doRetain local.get $2 + local.get $1 i32.store local.get $0 global.set $std/array/subarrU32 global.get $std/array/subarrU32 call $~lib/array/Array>>#join_arr - i32.const 5576 + i32.const 6832 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 940 + i32.const 152 + i32.const 943 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 159 ;) (type $FUNCSIG$v) - call $start:std/array + (func $std/array/main (; 162 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start:std/array + i32.const 1 + global.set $~lib/started + end ) - (func $null (; 160 ;) (type $FUNCSIG$v) + (func $null (; 163 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array.ts b/tests/compiler/std/array.ts index fb38652bcf..b1d2653b7f 100644 --- a/tests/compiler/std/array.ts +++ b/tests/compiler/std/array.ts @@ -1,7 +1,10 @@ import "allocator/arena"; +import "collector/dummy"; import { Array } from "array"; import { COMPARATOR } from "util/sort"; +@start export function main(): void {} + // Obtains the internal capacity of an array from its backing buffer. function internalCapacity(array: Array): i32 { // the memory region used by the backing buffer might still be larger in that the ArrayBuffer diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 09ee0b989c..aeb7260b17 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -5,8 +5,8 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$fii (func (param i32 i32) (result f32))) (type $FUNCSIG$d (func (result f64))) @@ -28,221 +28,221 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 48) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 96) "\01\00\00\00\06\00\00\00a\00b\00c\00") - (data (i32.const 112) "\01\00\00\00\18\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 144) "\02\00\00\00\05\00\00\00\01\02\03\04\05") - (data (i32.const 160) "\07\00\00\00\10\00\00\00\98\00\00\00\98\00\00\00\05\00\00\00\05\00\00\00") - (data (i32.const 184) "\02\00\00\00\05\00\00\00\01\01\01\04\05") - (data (i32.const 200) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 240) "\02\00\00\00\05\00\00\00\00\00\00\00\00") - (data (i32.const 256) "\02\00\00\00\05\00\00\00\01\01\00\00\00") - (data (i32.const 272) "\02\00\00\00\05\00\00\00\01\01\00\02\02") - (data (i32.const 288) "\02\00\00\00\05\00\00\00\01\01\00\02\02") - (data (i32.const 304) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 336) "\08\00\00\00\10\00\00\008\01\00\008\01\00\00\14\00\00\00\05\00\00\00") - (data (i32.const 360) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 392) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 424) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 456) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") - (data (i32.const 488) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") - (data (i32.const 520) "\02\00\00\00\00\00\00\00") - (data (i32.const 528) "\02\00\00\00\00\00\00\00") - (data (i32.const 536) "\04\00\00\00\10\00\00\00\18\02\00\00\18\02\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 560) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 592) "\02\00\00\00\14\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 624) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 656) "\02\00\00\00\14\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 688) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 720) "\02\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00") - (data (i32.const 752) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 784) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 816) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 848) "\02\00\00\00\14\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 880) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 912) "\02\00\00\00\14\00\00\00\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 944) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 976) "\02\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1008) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1040) "\02\00\00\00\14\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1072) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1104) "\02\00\00\00\14\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1136) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1168) "\02\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1200) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1232) "\02\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1264) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1296) "\02\00\00\00\14\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00") - (data (i32.const 1328) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1360) "\04\00\00\00\10\00\00\008\05\00\008\05\00\00\14\00\00\00\05\00\00\00") - (data (i32.const 1384) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1416) "\02\00\00\00\00\00\00\00") - (data (i32.const 1424) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1456) "\02\00\00\00\0c\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1480) "\02\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 1496) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1528) "\02\00\00\00\08\00\00\00\03\00\00\00\04\00\00\00") - (data (i32.const 1544) "\02\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\05\00\00\00") - (data (i32.const 1568) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1600) "\02\00\00\00\04\00\00\00\01\00\00\00") - (data (i32.const 1616) "\02\00\00\00\10\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1640) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1672) "\02\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1688) "\02\00\00\00\10\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00") - (data (i32.const 1712) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1744) "\02\00\00\00\08\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1760) "\02\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") - (data (i32.const 1784) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1816) "\02\00\00\00\04\00\00\00\04\00\00\00") - (data (i32.const 1832) "\02\00\00\00\10\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05\00\00\00") - (data (i32.const 1856) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1888) "\02\00\00\00\04\00\00\00\01\00\00\00") - (data (i32.const 1904) "\02\00\00\00\10\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1928) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1960) "\02\00\00\00\00\00\00\00") - (data (i32.const 1968) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2000) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2032) "\02\00\00\00\00\00\00\00") - (data (i32.const 2040) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2072) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2104) "\02\00\00\00\00\00\00\00") - (data (i32.const 2112) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2144) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2176) "\02\00\00\00\00\00\00\00") - (data (i32.const 2184) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2216) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2248) "\02\00\00\00\00\00\00\00") - (data (i32.const 2256) "\02\00\00\00\14\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2288) "\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") - (data (i32.const 2320) "\01\00\00\00\ac\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?\00") - (data (i32.const 2504) "\02\00\00\00 \00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") - (data (i32.const 2544) "\t\00\00\00\10\00\00\00\d0\t\00\00\d0\t\00\00 \00\00\00\08\00\00\00") - (data (i32.const 2568) "\02\00\00\00 \00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") - (data (i32.const 2608) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") - (data (i32.const 2680) "\n\00\00\00\10\00\00\008\n\00\008\n\00\00@\00\00\00\08\00\00\00") - (data (i32.const 2704) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") - (data (i32.const 2776) "\02\00\00\00\14\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02\00\00\00") - (data (i32.const 2808) "\04\00\00\00\10\00\00\00\e0\n\00\00\e0\n\00\00\14\00\00\00\05\00\00\00") - (data (i32.const 2832) "\02\00\00\00\14\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 2864) "\02\00\00\00\14\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02\00\00\00") - (data (i32.const 2896) "\08\00\00\00\10\00\00\008\0b\00\008\0b\00\00\14\00\00\00\05\00\00\00") - (data (i32.const 2920) "\02\00\00\00\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") - (data (i32.const 2952) "\02\00\00\00\00\00\00\00") - (data (i32.const 2960) "\04\00\00\00\10\00\00\00\90\0b\00\00\90\0b\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2984) "\02\00\00\00\04\00\00\00\01\00\00\00") - (data (i32.const 3000) "\04\00\00\00\10\00\00\00\b0\0b\00\00\b0\0b\00\00\04\00\00\00\01\00\00\00") - (data (i32.const 3024) "\02\00\00\00\08\00\00\00\02\00\00\00\01\00\00\00") - (data (i32.const 3040) "\04\00\00\00\10\00\00\00\d8\0b\00\00\d8\0b\00\00\08\00\00\00\02\00\00\00") - (data (i32.const 3064) "\02\00\00\00\10\00\00\00\03\00\00\00\02\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 3088) "\04\00\00\00\10\00\00\00\00\0c\00\00\00\0c\00\00\10\00\00\00\04\00\00\00") - (data (i32.const 3112) "\02\00\00\00\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") - (data (i32.const 3136) "\04\00\00\00\10\00\00\000\0c\00\000\0c\00\00\10\00\00\00\04\00\00\00") - (data (i32.const 3160) "\02\00\00\00\04\00\00\00\01\00\00\00") - (data (i32.const 3176) "\02\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 3192) "\01\00\00\00\02\00\00\00a\00") - (data (i32.const 3208) "\01\00\00\00\02\00\00\00b\00") - (data (i32.const 3224) "\01\00\00\00\04\00\00\00a\00b\00") - (data (i32.const 3240) "\01\00\00\00\04\00\00\00b\00a\00") - (data (i32.const 3256) "\01\00\00\00\00\00\00\00") - (data (i32.const 3264) "\02\00\00\00\1c\00\00\00\80\0c\00\00\90\0c\00\00\80\0c\00\00\a0\0c\00\00\b0\0c\00\00\c0\0c\00\00\00\00\00\00") - (data (i32.const 3304) "\0e\00\00\00\10\00\00\00\c8\0c\00\00\c8\0c\00\00\1c\00\00\00\07\00\00\00") - (data (i32.const 3328) "\02\00\00\00\1c\00\00\00\c0\0c\00\00\80\0c\00\00\80\0c\00\00\a0\0c\00\00\90\0c\00\00\b0\0c\00\00\00\00\00\00") - (data (i32.const 3368) "\0e\00\00\00\10\00\00\00\08\0d\00\00\08\0d\00\00\1c\00\00\00\07\00\00\00") - (data (i32.const 3392) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 3432) "\01\00\00\00\08\00\00\00n\00u\00l\00l\00") - (data (i32.const 3448) "\02\00\00\00\02\00\00\00\01\00") - (data (i32.const 3464) "\01\00\00\00\08\00\00\00t\00r\00u\00e\00") - (data (i32.const 3480) "\01\00\00\00\n\00\00\00f\00a\00l\00s\00e\00") - (data (i32.const 3504) "\01\00\00\00\02\00\00\00,\00") - (data (i32.const 3520) "\02\00\00\00\02\00\00\00\01\00") - (data (i32.const 3536) "\01\00\00\00\14\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e\00") - (data (i32.const 3568) "\02\00\00\00\0c\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 3592) "\01\00\00\00\02\00\00\000\00") - (data (i32.const 3608) "\02\00\00\00\90\01\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") - (data (i32.const 4016) "\08\00\00\00\10\00\00\00 \0e\00\00 \0e\00\00\90\01\00\00d\00\00\00") - (data (i32.const 4040) "\02\00\00\00\0c\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 4064) "\01\00\00\00\n\00\00\001\00-\002\00-\003\00") - (data (i32.const 4088) "\02\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") - (data (i32.const 4112) "\01\00\00\00\02\00\00\00-\00") - (data (i32.const 4128) "\02\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") - (data (i32.const 4152) "\02\00\00\00\08\00\00\00\00\00\00\80\00\00\00\80") - (data (i32.const 4168) "\01\00\00\00\04\00\00\00_\00_\00") - (data (i32.const 4184) "\02\00\00\00\08\00\00\00\00\00\00\80\00\00\00\80") - (data (i32.const 4200) "\01\00\00\000\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 4256) "\02\00\00\000\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") - (data (i32.const 4312) "\01\00\00\00\04\00\00\00,\00 \00") - (data (i32.const 4328) "\01\00\00\00\06\00\00\000\00.\000\00") - (data (i32.const 4344) "\01\00\00\00\06\00\00\00N\00a\00N\00") - (data (i32.const 4360) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 4392) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 4416) "\02\00\00\00\b8\02\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\00*\00&\00$\00%\00^\00@\00#\00!\00?\00") + (data (i32.const 3208) "\02\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") + (data (i32.const 3256) "\t\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\98\0c\00\00\98\0c\00\00 \00\00\00\08\00\00\00") + (data (i32.const 3288) "\02\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") + (data (i32.const 3336) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") + (data (i32.const 3416) "\n\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\18\0d\00\00\18\0d\00\00@\00\00\00\08\00\00\00") + (data (i32.const 3448) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") + (data (i32.const 3528) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02\00\00\00") + (data (i32.const 3568) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\d8\0d\00\00\d8\0d\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 3600) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 3640) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02\00\00\00") + (data (i32.const 3680) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00H\0e\00\00H\0e\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 3712) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") + (data (i32.const 3752) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 3768) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\b8\0e\00\00\b8\0e\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 3800) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") + (data (i32.const 3824) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\e8\0e\00\00\e8\0e\00\00\04\00\00\00\01\00\00\00") + (data (i32.const 3856) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\01\00\00\00") + (data (i32.const 3880) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00 \0f\00\00 \0f\00\00\08\00\00\00\02\00\00\00") + (data (i32.const 3912) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01\00\00\00\00\00\00\00") + (data (i32.const 3944) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00X\0f\00\00X\0f\00\00\10\00\00\00\04\00\00\00") + (data (i32.const 3976) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 4008) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\98\0f\00\00\98\0f\00\00\10\00\00\00\04\00\00\00") + (data (i32.const 4040) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") + (data (i32.const 4064) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 4088) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00a\00") + (data (i32.const 4112) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00b\00") + (data (i32.const 4136) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00a\00b\00") + (data (i32.const 4160) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00b\00a\00") + (data (i32.const 4184) "\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 4200) "\02\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00\08\10\00\00 \10\00\00\08\10\00\008\10\00\00P\10\00\00h\10\00\00\00\00\00\00") + (data (i32.const 4248) "\0e\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00x\10\00\00x\10\00\00\1c\00\00\00\07\00\00\00") + (data (i32.const 4280) "\02\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00h\10\00\00\08\10\00\00\08\10\00\008\10\00\00 \10\00\00P\10\00\00\00\00\00\00") + (data (i32.const 4328) "\0e\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c8\10\00\00\c8\10\00\00\1c\00\00\00\07\00\00\00") + (data (i32.const 4360) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 4408) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00n\00u\00l\00l\00") + (data (i32.const 4432) "\02\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\01\00") + (data (i32.const 4456) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00t\00r\00u\00e\00") + (data (i32.const 4480) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00f\00a\00l\00s\00e\00") + (data (i32.const 4512) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00,\00") + (data (i32.const 4536) "\02\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\01\00") + (data (i32.const 4560) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e\00") + (data (i32.const 4600) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 4632) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\000\00") + (data (i32.const 4656) "\02\00\00\00\90\01\00\00\00\00\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") + (data (i32.const 5072) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00@\12\00\00@\12\00\00\90\01\00\00d\00\00\00") + (data (i32.const 5104) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 5136) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\001\00-\002\00-\003\00") + (data (i32.const 5168) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 5200) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00-\00") + (data (i32.const 5224) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 5256) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\00\00\00\80") + (data (i32.const 5280) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00_\00_\00") + (data (i32.const 5304) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\00\00\00\80") + (data (i32.const 5328) "\01\00\00\000\00\00\00\00\00\00\00\00\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008\00") + (data (i32.const 5392) "\02\00\00\000\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") + (data (i32.const 5456) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00,\00 \00") + (data (i32.const 5480) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\000\00.\000\00") + (data (i32.const 5504) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00N\00a\00N\00") + (data (i32.const 5528) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") + (data (i32.const 5568) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") + (data (i32.const 5600) "\02\00\00\00\b8\02\00\00\00\00\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR~anonymous|0) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 1)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) - (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/num (mut i32) (i32.const 1)) (global $std/array/Null (mut i32) (i32.const 0)) - (global $std/array/str (mut i32) (i32.const 104)) - (global $std/array/arr8 (mut i32) (i32.const 168)) + (global $std/array/str (mut i32) (i32.const 128)) + (global $std/array/arr8 (mut i32) (i32.const 216)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) - (global $std/array/arr32 (mut i32) (i32.const 344)) + (global $std/array/arr32 (mut i32) (i32.const 456)) (global $std/array/i (mut i32) (i32.const 0)) (global $std/array/other (mut i32) (i32.const 0)) (global $std/array/out (mut i32) (i32.const 0)) - (global $std/array/source (mut i32) (i32.const 544)) + (global $std/array/source (mut i32) (i32.const 720)) (global $std/array/cwArr (mut i32) (i32.const 0)) (global $std/array/includes (mut i32) (i32.const 0)) - (global $std/array/sarr (mut i32) (i32.const 1368)) + (global $std/array/sarr (mut i32) (i32.const 1752)) (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/every (mut i32) (i32.const 0)) (global $std/array/some (mut i32) (i32.const 0)) @@ -254,16 +254,16 @@ (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) (global $~lib/math/random_state0_32 (mut i32) (i32.const 0)) (global $~lib/math/random_state1_32 (mut i32) (i32.const 0)) - (global $std/array/charset i32 (i32.const 2328)) - (global $std/array/f32ArrayTyped (mut i32) (i32.const 2552)) - (global $std/array/f64ArrayTyped (mut i32) (i32.const 2688)) - (global $std/array/i32ArrayTyped (mut i32) (i32.const 2816)) - (global $std/array/u32ArrayTyped (mut i32) (i32.const 2904)) - (global $std/array/reversed0 (mut i32) (i32.const 2968)) - (global $std/array/reversed1 (mut i32) (i32.const 3008)) - (global $std/array/reversed2 (mut i32) (i32.const 3048)) - (global $std/array/reversed4 (mut i32) (i32.const 3096)) - (global $std/array/expected4 (mut i32) (i32.const 3144)) + (global $std/array/charset i32 (i32.const 3032)) + (global $std/array/f32ArrayTyped (mut i32) (i32.const 3272)) + (global $std/array/f64ArrayTyped (mut i32) (i32.const 3432)) + (global $std/array/i32ArrayTyped (mut i32) (i32.const 3584)) + (global $std/array/u32ArrayTyped (mut i32) (i32.const 3696)) + (global $std/array/reversed0 (mut i32) (i32.const 3784)) + (global $std/array/reversed1 (mut i32) (i32.const 3840)) + (global $std/array/reversed2 (mut i32) (i32.const 3896)) + (global $std/array/reversed4 (mut i32) (i32.const 3960)) + (global $std/array/expected4 (mut i32) (i32.const 4024)) (global $std/array/reversed64 (mut i32) (i32.const 0)) (global $std/array/reversed128 (mut i32) (i32.const 0)) (global $std/array/reversed1024 (mut i32) (i32.const 0)) @@ -273,8 +273,8 @@ (global $std/array/randomized257 (mut i32) (i32.const 0)) (global $std/array/reversedNested512 (mut i32) (i32.const 0)) (global $std/array/reversedElements512 (mut i32) (i32.const 0)) - (global $std/array/randomStringsActual (mut i32) (i32.const 3312)) - (global $std/array/randomStringsExpected (mut i32) (i32.const 3376)) + (global $std/array/randomStringsActual (mut i32) (i32.const 4264)) + (global $std/array/randomStringsExpected (mut i32) (i32.const 4344)) (global $std/array/randomStrings400 (mut i32) (i32.const 0)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) @@ -290,10 +290,13 @@ (global $std/array/subarr32 (mut i32) (i32.const 0)) (global $std/array/subarr8 (mut i32) (i32.const 0)) (global $std/array/subarrU32 (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 6524)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 8060)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (start $start) + (export "main" (func $std/array/main)) + (export ".capabilities" (global $~lib/capabilities)) (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 @@ -404,6 +407,12 @@ local.get $0 i32.store offset=4 local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 global.get $~lib/runtime/HEADER_SIZE i32.add ) @@ -671,8 +680,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 217 + i32.const 24 + i32.const 332 i32.const 2 call $~lib/env/abort unreachable @@ -686,14 +695,17 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 218 + i32.const 24 + i32.const 333 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/doRegister (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/collector/dummy/__gc_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/doRegister (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -702,8 +714,10 @@ local.get $1 i32.store local.get $0 + call $~lib/collector/dummy/__gc_register + local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -711,7 +725,7 @@ i32.gt_u if i32.const 0 - i32.const 56 + i32.const 72 i32.const 24 i32.const 43 call $~lib/env/abort @@ -736,7 +750,48 @@ call $~lib/runtime/doRegister end ) - (func $~lib/runtime/ArrayBufferView#constructor (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/assertRegistered (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 339 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 340 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/collector/dummy/__gc_retain (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/runtime/doRetain (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + call $~lib/runtime/assertRegistered + local.get $1 + call $~lib/runtime/assertRegistered + local.get $0 + local.get $1 + call $~lib/collector/dummy/__gc_retain + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -746,8 +801,8 @@ i32.gt_u if i32.const 0 - i32.const 16 - i32.const 251 + i32.const 24 + i32.const 366 i32.const 57 call $~lib/env/abort unreachable @@ -788,7 +843,13 @@ i32.store offset=8 local.get $0 end - local.get $3 + local.tee $4 + block $~lib/runtime/RETAIN|inlined.0 (result i32) + local.get $3 + local.get $4 + call $~lib/runtime/doRetain + local.get $3 + end i32.store local.get $0 local.get $3 @@ -798,7 +859,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -827,7 +888,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array.isArray | null> (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray | null> (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 if (result i32) local.get $0 @@ -837,7 +898,7 @@ i32.const 1 end ) - (func $~lib/array/Array.isArray> (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray> (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 if (result i32) local.get $0 @@ -847,7 +908,7 @@ i32.const 1 end ) - (func $std/array/P#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/P#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -868,7 +929,7 @@ end local.get $0 ) - (func $~lib/array/Array.isArray

(; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray

(; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -878,7 +939,7 @@ i32.const 0 end ) - (func $~lib/typedarray/Uint8Array#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -901,7 +962,7 @@ local.set $0 local.get $0 ) - (func $~lib/array/Array.isArray (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -911,7 +972,7 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -921,7 +982,7 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -931,7 +992,7 @@ i32.const 0 end ) - (func $~lib/array/Array#fill (; 19 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 23 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1007,13 +1068,13 @@ end local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $~lib/util/memory/memcpy (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2214,7 +2275,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2445,10 +2506,11 @@ end end ) - (func $~lib/runtime/doWrapArray (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/doWrapArray (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 16 call $~lib/runtime/doAllocate local.get $1 @@ -2463,7 +2525,13 @@ call $~lib/runtime/doRegister local.set $5 local.get $3 - local.get $5 + local.tee $6 + block $~lib/runtime/RETAIN|inlined.1 (result i32) + local.get $5 + local.get $6 + call $~lib/runtime/doRetain + local.get $5 + end i32.store local.get $3 local.get $5 @@ -2482,11 +2550,11 @@ call $~lib/memory/memory.copy local.get $3 ) - (func $~lib/array/Array#get:length (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2495,7 +2563,7 @@ i32.ge_u if i32.const 0 - i32.const 208 + i32.const 272 i32.const 69 i32.const 61 call $~lib/env/abort @@ -2509,7 +2577,7 @@ i32.add i32.load8_u ) - (func $std/array/isArraysEqual (; 26 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2564,7 +2632,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 27 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 31 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2650,11 +2718,11 @@ end local.get $0 ) - (func $~lib/array/Array#get:length (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2663,7 +2731,7 @@ i32.ge_u if i32.const 0 - i32.const 208 + i32.const 272 i32.const 69 i32.const 61 call $~lib/env/abort @@ -2677,7 +2745,7 @@ i32.add i32.load ) - (func $std/array/isArraysEqual (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2732,11 +2800,11 @@ end i32.const 1 ) - (func $~lib/array/Array#get:length (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/array/internalCapacity (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/internalCapacity (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -2746,12 +2814,12 @@ i32.const 2 i32.shr_s ) - (func $~lib/memory/memory.free (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 local.set $1 ) - (func $~lib/runtime/doReallocate (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doReallocate (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2789,6 +2857,12 @@ i32.load i32.store local.get $5 + i32.const 0 + i32.store offset=8 + local.get $5 + i32.const 0 + i32.store offset=12 + local.get $5 global.get $~lib/runtime/HEADER_SIZE i32.add local.set $6 @@ -2815,8 +2889,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 107 + i32.const 24 + i32.const 177 i32.const 8 call $~lib/env/abort unreachable @@ -2824,7 +2898,8 @@ local.get $2 call $~lib/memory/memory.free else - nop + local.get $0 + call $~lib/collector/dummy/__gc_register end local.get $5 local.set $2 @@ -2848,7 +2923,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2867,7 +2942,7 @@ i32.gt_u if i32.const 0 - i32.const 208 + i32.const 272 i32.const 10 i32.const 64 call $~lib/env/abort @@ -2895,7 +2970,13 @@ i32.ne if local.get $0 - local.get $5 + local.tee $6 + block $~lib/runtime/RETAIN|inlined.2 (result i32) + local.get $5 + local.get $6 + call $~lib/runtime/doRetain + local.get $5 + end i32.store local.get $0 local.get $5 @@ -2906,7 +2987,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -2932,7 +3013,7 @@ i32.store local.get $2 ) - (func $~lib/array/Array#__get (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2941,7 +3022,7 @@ i32.ge_u if i32.const 0 - i32.const 208 + i32.const 272 i32.const 69 i32.const 61 call $~lib/env/abort @@ -2955,7 +3036,7 @@ i32.add i32.load ) - (func $~lib/array/Array#pop (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2966,8 +3047,8 @@ i32.lt_s if i32.const 0 - i32.const 208 - i32.const 203 + i32.const 272 + i32.const 204 i32.const 20 call $~lib/env/abort unreachable @@ -2988,7 +3069,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#concat (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3034,7 +3115,7 @@ call $~lib/memory/memory.copy local.get $4 ) - (func $~lib/array/Array#copyWithin (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 44 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3224,7 +3305,7 @@ end local.get $0 ) - (func $std/array/isArraysEqual (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -3279,7 +3360,7 @@ end i32.const 1 ) - (func $~lib/array/Array#unshift (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#unshift (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3312,7 +3393,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#shift (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3325,8 +3406,8 @@ i32.lt_s if i32.const 0 - i32.const 208 - i32.const 264 + i32.const 272 + i32.const 265 i32.const 20 call $~lib/env/abort unreachable @@ -3361,7 +3442,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#reverse (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#reverse (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3416,7 +3497,7 @@ end local.get $0 ) - (func $~lib/array/Array#indexOf (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3488,7 +3569,7 @@ end i32.const -1 ) - (func $~lib/array/Array#includes (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 local.get $2 @@ -3496,7 +3577,7 @@ i32.const 0 i32.ge_s ) - (func $~lib/array/Array#splice (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3576,22 +3657,18 @@ i32.lt_s i32.eqz br_if $break|0 - block - local.get $9 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $5 - local.get $7 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.store - end + local.get $7 + local.get $4 + i32.const 2 + i32.shl + i32.add + local.get $9 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load + i32.store local.get $4 i32.const 1 i32.add @@ -3636,7 +3713,7 @@ i32.store offset=12 local.get $6 ) - (func $~lib/array/Array#__set (; 48 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 @@ -3663,12 +3740,12 @@ i32.store offset=12 end ) - (func $start:std/array~anonymous|0 (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $~lib/array/Array#findIndex (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3727,17 +3804,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3746,12 +3823,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|4 (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|4 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3759,12 +3836,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3824,12 +3901,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3838,12 +3915,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3851,12 +3928,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 63 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3915,12 +3992,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3929,12 +4006,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 71 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3942,13 +4019,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 68 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 72 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 69 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 73 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4000,7 +4077,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 70 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 74 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4010,13 +4087,13 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|18 (; 71 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|18 (; 75 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 72 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -4025,7 +4102,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 73 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.const 0 @@ -4132,19 +4209,19 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 559 + i32.const 152 + i32.const 562 i32.const 4 call $~lib/env/abort unreachable end end ) - (func $start:std/array~anonymous|21 (; 74 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 78 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#constructor (; 75 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 79 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -4173,7 +4250,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#map (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 80 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4246,11 +4323,11 @@ end local.get $3 ) - (func $~lib/array/Array#get:length (; 77 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 81 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 78 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 82 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -4259,7 +4336,7 @@ i32.ge_u if i32.const 0 - i32.const 208 + i32.const 272 i32.const 69 i32.const 61 call $~lib/env/abort @@ -4273,7 +4350,7 @@ i32.add f32.load ) - (func $start:std/array~anonymous|22 (; 79 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 83 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4284,7 +4361,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 80 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 84 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4356,14 +4433,14 @@ end local.get $3 ) - (func $start:std/array~anonymous|23 (; 81 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 85 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 86 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4373,12 +4450,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 83 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 84 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 88 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4448,7 +4525,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|26 (; 85 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 89 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4461,7 +4538,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 86 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 90 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -4470,7 +4547,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 91 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4482,12 +4559,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 88 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 92 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 89 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4545,12 +4622,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|30 (; 90 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|30 (; 94 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|31 (; 91 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4562,7 +4639,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduce (; 92 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 96 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4620,7 +4697,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|32 (; 93 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 97 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4632,7 +4709,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|33 (; 94 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4641,12 +4718,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|34 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|34 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 96 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4654,12 +4731,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|36 (; 97 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|36 (; 101 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 98 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 102 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4704,12 +4781,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|37 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|37 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|38 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|38 (; 104 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4721,7 +4798,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduceRight (; 101 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 105 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4766,7 +4843,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|39 (; 102 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|39 (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4778,7 +4855,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|40 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|40 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4787,12 +4864,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|41 (; 104 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|41 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|42 (; 105 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|42 (; 109 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4800,7 +4877,7 @@ local.get $1 i32.add ) - (func $~lib/math/murmurHash3 (; 106 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 110 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -4829,7 +4906,7 @@ local.set $0 local.get $0 ) - (func $~lib/math/splitMix32 (; 107 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 111 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -4864,12 +4941,12 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 108 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 112 ;) (type $FUNCSIG$vj) (param $0 i64) local.get $0 i64.eqz if i32.const 0 - i32.const 2296 + i32.const 2992 i32.const 1021 i32.const 4 call $~lib/env/abort @@ -4893,7 +4970,7 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/util/sort/insertionSort (; 109 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 113 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f32) (local $5 i32) @@ -4989,7 +5066,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 110 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 114 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5289,7 +5366,7 @@ local.get $10 f32.store ) - (func $~lib/array/Array#sort (; 111 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 115 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -5301,8 +5378,8 @@ i32.eqz if i32.const 0 - i32.const 208 - i32.const 378 + i32.const 272 + i32.const 377 i32.const 4 call $~lib/env/abort unreachable @@ -5375,7 +5452,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 112 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 116 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5408,7 +5485,7 @@ i32.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -5427,12 +5504,12 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/builtins/isNaN (; 114 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 118 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $std/array/isArraysEqual (; 115 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 119 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -5503,7 +5580,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 116 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 120 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) @@ -5599,7 +5676,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 117 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 121 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5899,7 +5976,7 @@ local.get $10 f64.store ) - (func $~lib/array/Array#sort (; 118 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 122 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -5911,8 +5988,8 @@ i32.eqz if i32.const 0 - i32.const 208 - i32.const 378 + i32.const 272 + i32.const 377 i32.const 4 call $~lib/env/abort unreachable @@ -5985,7 +6062,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 119 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 123 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -6018,7 +6095,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 124 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6037,11 +6114,11 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/array/Array#get:length (; 121 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 125 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 122 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 126 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -6050,7 +6127,7 @@ i32.ge_u if i32.const 0 - i32.const 208 + i32.const 272 i32.const 69 i32.const 61 call $~lib/env/abort @@ -6064,12 +6141,12 @@ i32.add f64.load ) - (func $~lib/builtins/isNaN (; 123 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 127 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $std/array/isArraysEqual (; 124 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 128 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -6140,7 +6217,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 125 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 129 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6236,7 +6313,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 126 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 130 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6536,7 +6613,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 131 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6546,8 +6623,8 @@ i32.eqz if i32.const 0 - i32.const 208 - i32.const 378 + i32.const 272 + i32.const 377 i32.const 4 call $~lib/env/abort unreachable @@ -6620,12 +6697,12 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6644,7 +6721,7 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/util/sort/insertionSort (; 130 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 134 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6740,7 +6817,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 131 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 135 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7040,7 +7117,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7050,8 +7127,8 @@ i32.eqz if i32.const 0 - i32.const 208 - i32.const 378 + i32.const 272 + i32.const 377 i32.const 4 call $~lib/env/abort unreachable @@ -7124,7 +7201,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -7133,7 +7210,7 @@ i32.lt_u i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 134 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -7152,7 +7229,7 @@ local.get $1 call $~lib/array/Array#sort ) - (func $std/array/createReverseOrderedArray (; 135 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 139 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -7189,7 +7266,7 @@ end local.get $1 ) - (func $~lib/math/NativeMath.random (; 136 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 140 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) (local $2 i64) @@ -7197,7 +7274,7 @@ i32.eqz if i32.const 0 - i32.const 2296 + i32.const 2992 i32.const 1030 i32.const 24 call $~lib/env/abort @@ -7246,7 +7323,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 137 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 141 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -7283,12 +7360,12 @@ end local.get $1 ) - (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $std/array/isSorted (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -7336,7 +7413,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 140 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 144 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -7345,14 +7422,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 810 + i32.const 152 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/array/assertSortedDefault (; 141 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 145 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 block $~lib/util/sort/COMPARATOR|inlined.1 (result i32) i32.const 48 @@ -7360,27 +7437,27 @@ end call $std/array/assertSorted ) - (func $start:std/array~anonymous|43 (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|43 (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|44 (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $start:std/array~anonymous|45 (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|45 (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|46 (; 145 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|46 (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array>#constructor (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -7409,11 +7486,27 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>#get:length (; 147 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#get:length (; 151 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array>#__set (; 148 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/collector/dummy/__gc_release (; 152 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/runtime/doRelease (; 153 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + call $~lib/runtime/assertRegistered + local.get $1 + call $~lib/runtime/assertRegistered + local.get $0 + local.get $1 + call $~lib/collector/dummy/__gc_release + ) + (func $~lib/array/Array>#__set (; 154 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $0 local.get $1 i32.const 1 @@ -7426,8 +7519,41 @@ i32.const 2 i32.shl i32.add + local.set $3 + local.get $3 + i32.load + local.set $4 local.get $2 - i32.store + local.get $4 + i32.ne + if + block $~lib/runtime/RELEASE,Array>>|inlined.0 + local.get $4 + local.set $6 + local.get $0 + local.set $5 + local.get $6 + i32.const 0 + i32.ne + if + local.get $6 + local.get $5 + call $~lib/runtime/doRelease + end + end + local.get $3 + block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) + local.get $2 + local.set $6 + local.get $0 + local.set $5 + local.get $6 + local.get $5 + call $~lib/runtime/doRetain + local.get $6 + end + i32.store + end local.get $1 local.get $0 i32.load offset=12 @@ -7440,7 +7566,7 @@ i32.store offset=12 end ) - (func $~lib/array/Array>#__get (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__get (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7449,7 +7575,7 @@ i32.ge_u if i32.const 0 - i32.const 208 + i32.const 272 i32.const 69 i32.const 61 call $~lib/env/abort @@ -7463,7 +7589,7 @@ i32.add i32.load ) - (func $std/array/createReverseOrderedNestedArray (; 150 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -7510,7 +7636,7 @@ end local.get $1 ) - (func $start:std/array~anonymous|47 (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -7519,7 +7645,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/util/sort/insertionSort> (; 152 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort> (; 158 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7615,7 +7741,7 @@ unreachable end ) - (func $~lib/array/Array>#sort (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7625,8 +7751,8 @@ i32.eqz if i32.const 0 - i32.const 208 - i32.const 378 + i32.const 272 + i32.const 377 i32.const 4 call $~lib/env/abort unreachable @@ -7689,7 +7815,7 @@ end local.get $0 ) - (func $std/array/isSorted> (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -7737,7 +7863,7 @@ end i32.const 1 ) - (func $std/array/assertSorted> (; 155 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 161 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -7746,14 +7872,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 810 + i32.const 152 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/array/Array>#constructor (; 156 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -7782,11 +7908,11 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>#get:length (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#get:length (; 163 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/array/Proxy#constructor (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/Proxy#constructor (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.eqz @@ -7810,7 +7936,11 @@ i32.store local.get $0 ) - (func $~lib/array/Array>#__set (; 159 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__set (; 165 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $0 local.get $1 i32.const 1 @@ -7823,8 +7953,41 @@ i32.const 2 i32.shl i32.add + local.set $3 + local.get $3 + i32.load + local.set $4 local.get $2 - i32.store + local.get $4 + i32.ne + if + block $~lib/runtime/RELEASE,Array>>|inlined.0 + local.get $4 + local.set $6 + local.get $0 + local.set $5 + local.get $6 + i32.const 0 + i32.ne + if + local.get $6 + local.get $5 + call $~lib/runtime/doRelease + end + end + local.get $3 + block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) + local.get $2 + local.set $6 + local.get $0 + local.set $5 + local.get $6 + local.get $5 + call $~lib/runtime/doRetain + local.get $6 + end + i32.store + end local.get $1 local.get $0 i32.load offset=12 @@ -7837,7 +8000,7 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedElementsArray (; 160 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 166 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -7876,14 +8039,14 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/util/sort/insertionSort> (; 162 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort> (; 168 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7979,7 +8142,7 @@ unreachable end ) - (func $~lib/array/Array>#sort (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7989,8 +8152,8 @@ i32.eqz if i32.const 0 - i32.const 208 - i32.const 378 + i32.const 272 + i32.const 377 i32.const 4 call $~lib/env/abort unreachable @@ -8053,7 +8216,7 @@ end local.get $0 ) - (func $~lib/array/Array>#__get (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__get (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -8062,7 +8225,7 @@ i32.ge_u if i32.const 0 - i32.const 208 + i32.const 272 i32.const 69 i32.const 61 call $~lib/env/abort @@ -8076,7 +8239,7 @@ i32.add i32.load ) - (func $std/array/isSorted> (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -8124,7 +8287,7 @@ end i32.const 1 ) - (func $std/array/assertSorted> (; 166 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 172 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -8133,14 +8296,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 810 + i32.const 152 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/util/sort/insertionSort (; 167 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 173 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8236,7 +8399,7 @@ unreachable end ) - (func $~lib/array/Array#sort (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8246,8 +8409,8 @@ i32.eqz if i32.const 0 - i32.const 208 - i32.const 378 + i32.const 272 + i32.const 377 i32.const 4 call $~lib/env/abort unreachable @@ -8310,11 +8473,11 @@ end local.get $0 ) - (func $~lib/array/Array#get:length (; 169 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 175 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -8323,7 +8486,7 @@ i32.ge_u if i32.const 0 - i32.const 208 + i32.const 272 i32.const 69 i32.const 61 call $~lib/env/abort @@ -8337,7 +8500,7 @@ i32.add i32.load ) - (func $std/array/isSorted (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -8385,7 +8548,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 172 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 178 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -8394,14 +8557,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 810 + i32.const 152 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/string/String#get:length (; 173 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 179 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -8409,7 +8572,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 174 ;) (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 (; 180 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -8462,7 +8625,7 @@ end local.get $5 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8535,7 +8698,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted|trampoline (; 176 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted|trampoline (; 182 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $1of1 block $0of1 block $outOfRange @@ -8556,7 +8719,7 @@ local.get $1 call $std/array/assertSorted ) - (func $~lib/string/String.__eq (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 183 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -8600,13 +8763,13 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.__ne (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__eq i32.eqz ) - (func $std/array/isArraysEqual (; 179 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 185 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -8661,7 +8824,7 @@ end i32.const 1 ) - (func $~lib/array/Array#constructor (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -8690,7 +8853,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/string/String#charAt (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#charAt (; 187 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -8699,7 +8862,7 @@ i32.eqz if i32.const 0 - i32.const 3400 + i32.const 4376 i32.const 36 i32.const 4 call $~lib/env/abort @@ -8710,7 +8873,7 @@ call $~lib/string/String#get:length i32.ge_u if - i32.const 3264 + i32.const 4200 return end block $~lib/runtime/ALLOCATE|inlined.10 (result i32) @@ -8736,7 +8899,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/string/String#concat (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8746,7 +8909,7 @@ i32.const 0 i32.eq if - i32.const 3440 + i32.const 4424 local.set $1 end local.get $0 @@ -8767,7 +8930,7 @@ i32.const 0 i32.eq if - i32.const 3264 + i32.const 4200 return end block $~lib/runtime/ALLOCATE|inlined.11 (result i32) @@ -8795,9 +8958,9 @@ call $~lib/runtime/doRegister end ) - (func $~lib/string/String.__concat (; 183 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 189 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 3440 + i32.const 4424 local.get $0 i32.const 0 i32.ne @@ -8805,11 +8968,11 @@ local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 184 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 190 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) - i32.const 3264 + i32.const 4200 local.set $1 block $break|0 i32.const 0 @@ -8847,7 +9010,11 @@ end local.get $1 ) - (func $~lib/array/Array#__set (; 185 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 191 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $0 local.get $1 i32.const 1 @@ -8860,25 +9027,58 @@ i32.const 2 i32.shl i32.add + local.set $3 + local.get $3 + i32.load + local.set $4 local.get $2 - i32.store - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_s + local.get $4 + i32.ne if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=12 - end - ) - (func $std/array/createRandomStringArray (; 186 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 0 - local.get $0 + block $~lib/runtime/RELEASE>|inlined.0 + local.get $4 + local.set $6 + local.get $0 + local.set $5 + local.get $6 + i32.const 0 + i32.ne + if + local.get $6 + local.get $5 + call $~lib/runtime/doRelease + end + end + local.get $3 + block $~lib/runtime/RETAIN>|inlined.0 (result i32) + local.get $2 + local.set $6 + local.get $0 + local.set $5 + local.get $6 + local.get $5 + call $~lib/runtime/doRetain + local.get $6 + end + i32.store + end + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $std/array/createRandomStringArray (; 192 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + i32.const 0 + local.get $0 call $~lib/array/Array#constructor local.set $1 block $break|0 @@ -8910,7 +9110,7 @@ end local.get $1 ) - (func $~lib/string/String#substring (; 187 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8925,7 +9125,7 @@ i32.eqz if i32.const 0 - i32.const 3400 + i32.const 4376 i32.const 186 i32.const 4 call $~lib/env/abort @@ -8995,7 +9195,7 @@ local.get $3 i32.eqz if - i32.const 3264 + i32.const 4200 return end local.get $8 @@ -9036,7 +9236,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/runtime/doDiscard (; 188 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/doDiscard (; 194 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -9044,7 +9244,7 @@ i32.sub call $~lib/memory/memory.free ) - (func $~lib/array/Array#join_bool (; 189 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_bool (; 195 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9064,7 +9264,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -9073,8 +9273,8 @@ local.get $2 i32.eqz if - i32.const 3472 - i32.const 3488 + i32.const 4472 + i32.const 4496 local.get $3 i32.load8_u i32.const 0 @@ -9133,8 +9333,8 @@ i32.const 1 i32.shl i32.add - i32.const 3472 - i32.const 3488 + i32.const 4472 + i32.const 4496 local.get $10 i32.const 0 i32.ne @@ -9191,8 +9391,8 @@ i32.const 1 i32.shl i32.add - i32.const 3472 - i32.const 3488 + i32.const 4472 + i32.const 4496 local.get $10 i32.const 0 i32.ne @@ -9231,13 +9431,13 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_bool return ) - (func $~lib/util/number/decimalCount32 (; 191 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 197 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -9306,7 +9506,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa32_lut (; 192 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 198 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9314,7 +9514,7 @@ (local $7 i32) (local $8 i64) (local $9 i64) - i32.const 4024 + i32.const 5088 i32.load offset=4 local.set $3 block $break|0 @@ -9449,7 +9649,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 193 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 199 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9459,7 +9659,7 @@ local.get $0 i32.eqz if - i32.const 3600 + i32.const 4648 return end local.get $0 @@ -9513,12 +9713,12 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa (; 194 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 200 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 195 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 201 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9577,7 +9777,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9596,7 +9796,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -9723,13 +9923,13 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 203 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/util/number/utoa32 (; 198 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 204 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9738,7 +9938,7 @@ local.get $0 i32.eqz if - i32.const 3600 + i32.const 4648 return end local.get $0 @@ -9773,12 +9973,12 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa (; 199 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 205 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 200 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 206 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9817,7 +10017,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 201 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9836,7 +10036,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -9963,20 +10163,20 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/builtins/isFinite (; 203 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 209 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/util/number/genDigits (; 204 ;) (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 (; 210 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -10032,7 +10232,7 @@ local.set $14 local.get $6 local.set $15 - i32.const 5408 + i32.const 6640 i32.load offset=4 local.set $16 block $break|0 @@ -10547,7 +10747,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 205 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 211 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10880,7 +11080,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 206 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 212 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -11049,7 +11249,7 @@ i32.shl i32.sub global.set $~lib/util/number/_K - i32.const 5128 + i32.const 6328 i32.load offset=4 local.get $13 i32.const 3 @@ -11057,7 +11257,7 @@ i32.add i64.load global.set $~lib/util/number/_frc_pow - i32.const 5336 + i32.const 6552 i32.load offset=4 local.get $13 i32.const 1 @@ -11326,7 +11526,7 @@ local.get $2 i32.add ) - (func $~lib/util/number/dtoa (; 207 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 213 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11335,7 +11535,7 @@ f64.const 0 f64.eq if - i32.const 4336 + i32.const 5496 return end local.get $0 @@ -11345,11 +11545,11 @@ local.get $0 call $~lib/builtins/isNaN if - i32.const 4352 + i32.const 5520 return end - i32.const 4368 - i32.const 4400 + i32.const 5544 + i32.const 5584 local.get $0 f64.const 0 f64.lt @@ -11382,7 +11582,7 @@ end local.get $4 ) - (func $~lib/util/number/dtoa_stream (; 208 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 214 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11435,8 +11635,8 @@ local.get $3 i32.add local.set $4 - i32.const 4368 - i32.const 4400 + i32.const 5544 + i32.const 5584 local.get $3 select local.set $5 @@ -11456,7 +11656,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join_flt (; 209 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_flt (; 215 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11475,7 +11675,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -11602,13 +11802,13 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 210 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 216 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_flt return ) - (func $~lib/array/Array#join_str (; 211 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_str (; 217 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11627,7 +11827,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -11800,13 +12000,13 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 218 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_str return ) - (func $std/array/Ref#constructor (; 213 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/Ref#constructor (; 219 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -11827,7 +12027,7 @@ end local.get $0 ) - (func $~lib/array/Array#constructor (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 220 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -11856,7 +12056,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#join_ref (; 215 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_ref (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11875,7 +12075,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -11884,7 +12084,7 @@ local.get $2 i32.eqz if - i32.const 5640 + i32.const 6920 return end local.get $1 @@ -11933,7 +12133,7 @@ i32.const 1 i32.shl i32.add - i32.const 5640 + i32.const 6920 i32.const 15 i32.const 1 i32.shl @@ -11982,7 +12182,7 @@ i32.const 1 i32.shl i32.add - i32.const 5640 + i32.const 6920 i32.const 15 i32.const 1 i32.shl @@ -12018,18 +12218,18 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 216 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_ref return ) - (func $~lib/array/Array#toString (; 217 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 3512 + i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa (; 218 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 224 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -12038,7 +12238,7 @@ call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 219 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12113,7 +12313,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 220 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12132,7 +12332,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -12259,25 +12459,25 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 227 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 222 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 228 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 3512 + i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 229 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 65535 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 224 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 230 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12322,7 +12522,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 231 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12341,7 +12541,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -12468,18 +12668,18 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 232 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 227 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 233 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 3512 + i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/decimalCount64 (; 228 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 234 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -12548,7 +12748,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 229 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 235 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -12560,7 +12760,7 @@ (local $11 i32) (local $12 i64) (local $13 i64) - i32.const 4024 + i32.const 5088 i32.load offset=4 local.set $3 block $break|0 @@ -12676,7 +12876,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 230 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 236 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12687,7 +12887,7 @@ local.get $0 i64.eqz if - i32.const 3600 + i32.const 4648 return end local.get $0 @@ -12756,12 +12956,12 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa (; 231 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 237 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/utoa64 return ) - (func $~lib/util/number/itoa_stream (; 232 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 238 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12827,7 +13027,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 233 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 239 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12846,7 +13046,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -12973,18 +13173,18 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 234 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 240 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 235 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 241 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 3512 + i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa64 (; 236 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 242 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12996,7 +13196,7 @@ local.get $0 i64.eqz if - i32.const 3600 + i32.const 4648 return end local.get $0 @@ -13086,12 +13286,12 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa (; 237 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 243 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/itoa64 return ) - (func $~lib/util/number/itoa_stream (; 238 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 244 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13179,7 +13379,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 239 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 245 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13198,7 +13398,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -13325,23 +13525,23 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 240 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 241 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 3512 + i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array#toString (; 242 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 248 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 3512 + i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array>#join_arr (; 243 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 249 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13357,10 +13557,10 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end - i32.const 3264 + i32.const 4200 local.set $3 local.get $1 call $~lib/string/String#get:length @@ -13380,7 +13580,7 @@ local.get $1 call $~lib/array/Array#join else - i32.const 3264 + i32.const 4200 end return end @@ -13445,18 +13645,18 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 244 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>#toString (; 245 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#toString (; 251 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 3512 + i32.const 4528 call $~lib/array/Array>#join ) - (func $~lib/array/Array>#constructor (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -13485,14 +13685,14 @@ i32.store offset=12 local.get $0 ) - (func $~lib/util/number/itoa (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 253 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 248 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 254 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13537,7 +13737,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 249 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13556,7 +13756,7 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end local.get $0 @@ -13683,13 +13883,13 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array>#join_arr (; 251 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13705,10 +13905,10 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end - i32.const 3264 + i32.const 4200 local.set $3 local.get $1 call $~lib/string/String#get:length @@ -13728,7 +13928,7 @@ local.get $1 call $~lib/array/Array#join else - i32.const 3264 + i32.const 4200 end return end @@ -13793,18 +13993,18 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>#toString (; 253 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#toString (; 259 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 3512 + i32.const 4528 call $~lib/array/Array>#join ) - (func $~lib/array/Array>#constructor (; 254 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 260 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -13833,7 +14033,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>>#constructor (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#constructor (; 261 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -13862,7 +14062,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>#join_arr (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13878,10 +14078,10 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end - i32.const 3264 + i32.const 4200 local.set $3 local.get $1 call $~lib/string/String#get:length @@ -13901,7 +14101,7 @@ local.get $1 call $~lib/array/Array#join else - i32.const 3264 + i32.const 4200 end return end @@ -13966,13 +14166,13 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 263 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>>#join_arr (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#join_arr (; 264 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13988,10 +14188,10 @@ i32.const 0 i32.lt_s if - i32.const 3264 + i32.const 4200 return end - i32.const 3264 + i32.const 4200 local.set $3 local.get $1 call $~lib/string/String#get:length @@ -14011,7 +14211,7 @@ local.get $1 call $~lib/array/Array>#join else - i32.const 3264 + i32.const 4200 end return end @@ -14076,18 +14276,18 @@ end local.get $3 ) - (func $~lib/array/Array>>#join (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#join (; 265 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>>#join_arr return ) - (func $~lib/array/Array>>#toString (; 260 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>>#toString (; 266 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 3512 + i32.const 4528 call $~lib/array/Array>>#join ) - (func $start:std/array (; 261 ;) (type $FUNCSIG$v) + (func $start:std/array (; 267 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14114,8 +14314,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 37 + i32.const 152 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable @@ -14127,8 +14327,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 38 + i32.const 152 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable @@ -14141,8 +14341,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 39 + i32.const 152 + i32.const 42 i32.const 0 call $~lib/env/abort unreachable @@ -14156,8 +14356,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 40 + i32.const 152 + i32.const 43 i32.const 0 call $~lib/env/abort unreachable @@ -14169,8 +14369,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 41 + i32.const 152 + i32.const 44 i32.const 0 call $~lib/env/abort unreachable @@ -14182,8 +14382,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 42 + i32.const 152 + i32.const 45 i32.const 0 call $~lib/env/abort unreachable @@ -14196,7 +14396,7 @@ drop global.get $std/array/arr8 block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) - i32.const 192 + i32.const 248 local.set $0 local.get $0 i32.const 7 @@ -14208,8 +14408,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 49 + i32.const 152 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -14222,7 +14422,7 @@ drop global.get $std/array/arr8 block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 248 + i32.const 320 local.set $0 local.get $0 i32.const 7 @@ -14234,8 +14434,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 52 + i32.const 152 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable @@ -14248,7 +14448,7 @@ drop global.get $std/array/arr8 block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) - i32.const 264 + i32.const 344 local.set $0 local.get $0 i32.const 7 @@ -14260,8 +14460,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 55 + i32.const 152 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -14274,7 +14474,7 @@ drop global.get $std/array/arr8 block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) - i32.const 280 + i32.const 368 local.set $0 local.get $0 i32.const 7 @@ -14286,8 +14486,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 58 + i32.const 152 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -14300,7 +14500,7 @@ drop global.get $std/array/arr8 block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) - i32.const 296 + i32.const 392 local.set $0 local.get $0 i32.const 7 @@ -14312,8 +14512,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 61 + i32.const 152 + i32.const 64 i32.const 0 call $~lib/env/abort unreachable @@ -14326,7 +14526,7 @@ drop global.get $std/array/arr32 block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) - i32.const 368 + i32.const 488 local.set $0 local.get $0 i32.const 8 @@ -14338,8 +14538,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 66 + i32.const 152 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable @@ -14352,7 +14552,7 @@ drop global.get $std/array/arr32 block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 400 + i32.const 528 local.set $0 local.get $0 i32.const 8 @@ -14364,8 +14564,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 69 + i32.const 152 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable @@ -14378,7 +14578,7 @@ drop global.get $std/array/arr32 block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) - i32.const 432 + i32.const 568 local.set $0 local.get $0 i32.const 8 @@ -14390,8 +14590,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 72 + i32.const 152 + i32.const 75 i32.const 0 call $~lib/env/abort unreachable @@ -14404,7 +14604,7 @@ drop global.get $std/array/arr32 block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) - i32.const 464 + i32.const 608 local.set $0 local.get $0 i32.const 8 @@ -14416,8 +14616,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 75 + i32.const 152 + i32.const 78 i32.const 0 call $~lib/env/abort unreachable @@ -14430,7 +14630,7 @@ drop global.get $std/array/arr32 block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) - i32.const 496 + i32.const 648 local.set $0 local.get $0 i32.const 8 @@ -14442,8 +14642,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 78 + i32.const 152 + i32.const 81 i32.const 0 call $~lib/env/abort unreachable @@ -14455,8 +14655,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 82 + i32.const 152 + i32.const 85 i32.const 0 call $~lib/env/abort unreachable @@ -14468,8 +14668,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 83 + i32.const 152 + i32.const 86 i32.const 0 call $~lib/env/abort unreachable @@ -14486,8 +14686,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 87 + i32.const 152 + i32.const 90 i32.const 0 call $~lib/env/abort unreachable @@ -14499,8 +14699,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 88 + i32.const 152 + i32.const 91 i32.const 0 call $~lib/env/abort unreachable @@ -14512,8 +14712,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 89 + i32.const 152 + i32.const 92 i32.const 0 call $~lib/env/abort unreachable @@ -14527,8 +14727,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 93 + i32.const 152 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable @@ -14540,8 +14740,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 94 + i32.const 152 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -14553,8 +14753,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 95 + i32.const 152 + i32.const 98 i32.const 0 call $~lib/env/abort unreachable @@ -14570,8 +14770,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 99 + i32.const 152 + i32.const 102 i32.const 0 call $~lib/env/abort unreachable @@ -14583,8 +14783,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 100 + i32.const 152 + i32.const 103 i32.const 0 call $~lib/env/abort unreachable @@ -14597,8 +14797,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 101 + i32.const 152 + i32.const 104 i32.const 0 call $~lib/env/abort unreachable @@ -14614,8 +14814,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 105 + i32.const 152 + i32.const 108 i32.const 0 call $~lib/env/abort unreachable @@ -14627,8 +14827,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 106 + i32.const 152 + i32.const 109 i32.const 0 call $~lib/env/abort unreachable @@ -14641,8 +14841,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 107 + i32.const 152 + i32.const 110 i32.const 0 call $~lib/env/abort unreachable @@ -14655,8 +14855,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 108 + i32.const 152 + i32.const 111 i32.const 0 call $~lib/env/abort unreachable @@ -14672,8 +14872,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 112 + i32.const 152 + i32.const 115 i32.const 0 call $~lib/env/abort unreachable @@ -14685,8 +14885,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 113 + i32.const 152 + i32.const 116 i32.const 0 call $~lib/env/abort unreachable @@ -14699,8 +14899,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 114 + i32.const 152 + i32.const 117 i32.const 0 call $~lib/env/abort unreachable @@ -14713,8 +14913,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 115 + i32.const 152 + i32.const 118 i32.const 0 call $~lib/env/abort unreachable @@ -14727,8 +14927,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 116 + i32.const 152 + i32.const 119 i32.const 0 call $~lib/env/abort unreachable @@ -14748,8 +14948,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 123 + i32.const 152 + i32.const 126 i32.const 0 call $~lib/env/abort unreachable @@ -14761,8 +14961,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 124 + i32.const 152 + i32.const 127 i32.const 0 call $~lib/env/abort unreachable @@ -14774,15 +14974,15 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 125 + i32.const 152 + i32.const 128 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/out block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) - i32.const 528 + i32.const 688 local.set $0 local.get $0 i32.const 4 @@ -14798,8 +14998,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 128 + i32.const 152 + i32.const 131 i32.const 0 call $~lib/env/abort unreachable @@ -14812,8 +15012,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 130 + i32.const 152 + i32.const 133 i32.const 0 call $~lib/env/abort unreachable @@ -14826,8 +15026,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 131 + i32.const 152 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -14840,8 +15040,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 132 + i32.const 152 + i32.const 135 i32.const 0 call $~lib/env/abort unreachable @@ -14865,8 +15065,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 139 + i32.const 152 + i32.const 142 i32.const 0 call $~lib/env/abort unreachable @@ -14878,8 +15078,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 140 + i32.const 152 + i32.const 143 i32.const 0 call $~lib/env/abort unreachable @@ -14891,8 +15091,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 141 + i32.const 152 + i32.const 144 i32.const 0 call $~lib/env/abort unreachable @@ -14905,8 +15105,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 142 + i32.const 152 + i32.const 145 i32.const 0 call $~lib/env/abort unreachable @@ -14919,8 +15119,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 143 + i32.const 152 + i32.const 146 i32.const 0 call $~lib/env/abort unreachable @@ -14933,8 +15133,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 144 + i32.const 152 + i32.const 147 i32.const 0 call $~lib/env/abort unreachable @@ -14947,8 +15147,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 145 + i32.const 152 + i32.const 148 i32.const 0 call $~lib/env/abort unreachable @@ -14961,8 +15161,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 146 + i32.const 152 + i32.const 149 i32.const 0 call $~lib/env/abort unreachable @@ -14977,8 +15177,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 149 + i32.const 152 + i32.const 152 i32.const 0 call $~lib/env/abort unreachable @@ -14994,8 +15194,8 @@ i32.eqz if i32.const 0 - i32.const 120 i32.const 152 + i32.const 155 i32.const 0 call $~lib/env/abort unreachable @@ -15008,8 +15208,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 153 + i32.const 152 + i32.const 156 i32.const 0 call $~lib/env/abort unreachable @@ -15021,8 +15221,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 156 + i32.const 152 + i32.const 159 i32.const 0 call $~lib/env/abort unreachable @@ -15038,8 +15238,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 158 + i32.const 152 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable @@ -15051,14 +15251,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 159 + i32.const 152 + i32.const 162 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 568 + i32.const 752 local.set $0 local.get $0 i32.const 4 @@ -15072,7 +15272,7 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) - i32.const 600 + i32.const 792 local.set $0 local.get $0 i32.const 4 @@ -15084,14 +15284,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 165 + i32.const 152 + i32.const 168 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) - i32.const 632 + i32.const 832 local.set $0 local.get $0 i32.const 4 @@ -15105,7 +15305,7 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) - i32.const 664 + i32.const 872 local.set $0 local.get $0 i32.const 4 @@ -15117,14 +15317,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 167 + i32.const 152 + i32.const 170 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.5 (result i32) - i32.const 696 + i32.const 912 local.set $0 local.get $0 i32.const 4 @@ -15138,7 +15338,7 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin block $~lib/runtime/WRAPARRAY|inlined.6 (result i32) - i32.const 728 + i32.const 952 local.set $0 local.get $0 i32.const 4 @@ -15150,14 +15350,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 169 + i32.const 152 + i32.const 172 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.7 (result i32) - i32.const 760 + i32.const 992 local.set $0 local.get $0 i32.const 4 @@ -15171,7 +15371,7 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin block $~lib/runtime/WRAPARRAY|inlined.8 (result i32) - i32.const 792 + i32.const 1032 local.set $0 local.get $0 i32.const 4 @@ -15183,14 +15383,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 171 + i32.const 152 + i32.const 174 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.9 (result i32) - i32.const 824 + i32.const 1072 local.set $0 local.get $0 i32.const 4 @@ -15204,7 +15404,7 @@ i32.const 4 call $~lib/array/Array#copyWithin block $~lib/runtime/WRAPARRAY|inlined.10 (result i32) - i32.const 856 + i32.const 1112 local.set $0 local.get $0 i32.const 4 @@ -15216,14 +15416,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 173 + i32.const 152 + i32.const 176 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.11 (result i32) - i32.const 888 + i32.const 1152 local.set $0 local.get $0 i32.const 4 @@ -15237,7 +15437,7 @@ i32.const 4 call $~lib/array/Array#copyWithin block $~lib/runtime/WRAPARRAY|inlined.12 (result i32) - i32.const 920 + i32.const 1192 local.set $0 local.get $0 i32.const 4 @@ -15249,14 +15449,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 175 + i32.const 152 + i32.const 178 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.13 (result i32) - i32.const 952 + i32.const 1232 local.set $0 local.get $0 i32.const 4 @@ -15270,7 +15470,7 @@ i32.const 4 call $~lib/array/Array#copyWithin block $~lib/runtime/WRAPARRAY|inlined.14 (result i32) - i32.const 984 + i32.const 1272 local.set $0 local.get $0 i32.const 4 @@ -15282,14 +15482,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 177 + i32.const 152 + i32.const 180 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.15 (result i32) - i32.const 1016 + i32.const 1312 local.set $0 local.get $0 i32.const 4 @@ -15303,7 +15503,7 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin block $~lib/runtime/WRAPARRAY|inlined.16 (result i32) - i32.const 1048 + i32.const 1352 local.set $0 local.get $0 i32.const 4 @@ -15315,14 +15515,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 179 + i32.const 152 + i32.const 182 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.17 (result i32) - i32.const 1080 + i32.const 1392 local.set $0 local.get $0 i32.const 4 @@ -15336,7 +15536,7 @@ i32.const -1 call $~lib/array/Array#copyWithin block $~lib/runtime/WRAPARRAY|inlined.18 (result i32) - i32.const 1112 + i32.const 1432 local.set $0 local.get $0 i32.const 4 @@ -15348,14 +15548,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 181 + i32.const 152 + i32.const 184 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.19 (result i32) - i32.const 1144 + i32.const 1472 local.set $0 local.get $0 i32.const 4 @@ -15369,7 +15569,7 @@ i32.const -2 call $~lib/array/Array#copyWithin block $~lib/runtime/WRAPARRAY|inlined.20 (result i32) - i32.const 1176 + i32.const 1512 local.set $0 local.get $0 i32.const 4 @@ -15381,14 +15581,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 183 + i32.const 152 + i32.const 186 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.21 (result i32) - i32.const 1208 + i32.const 1552 local.set $0 local.get $0 i32.const 4 @@ -15402,7 +15602,7 @@ i32.const -1 call $~lib/array/Array#copyWithin block $~lib/runtime/WRAPARRAY|inlined.22 (result i32) - i32.const 1240 + i32.const 1592 local.set $0 local.get $0 i32.const 4 @@ -15414,14 +15614,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 185 + i32.const 152 + i32.const 188 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.23 (result i32) - i32.const 1272 + i32.const 1632 local.set $0 local.get $0 i32.const 4 @@ -15435,7 +15635,7 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin block $~lib/runtime/WRAPARRAY|inlined.24 (result i32) - i32.const 1304 + i32.const 1672 local.set $0 local.get $0 i32.const 4 @@ -15447,8 +15647,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 187 + i32.const 152 + i32.const 190 i32.const 0 call $~lib/env/abort unreachable @@ -15464,8 +15664,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 193 + i32.const 152 + i32.const 196 i32.const 0 call $~lib/env/abort unreachable @@ -15477,8 +15677,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 194 + i32.const 152 + i32.const 197 i32.const 0 call $~lib/env/abort unreachable @@ -15491,8 +15691,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 195 + i32.const 152 + i32.const 198 i32.const 0 call $~lib/env/abort unreachable @@ -15505,8 +15705,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 196 + i32.const 152 + i32.const 199 i32.const 0 call $~lib/env/abort unreachable @@ -15519,8 +15719,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 197 + i32.const 152 + i32.const 200 i32.const 0 call $~lib/env/abort unreachable @@ -15533,8 +15733,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 198 + i32.const 152 + i32.const 201 i32.const 0 call $~lib/env/abort unreachable @@ -15550,8 +15750,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 202 + i32.const 152 + i32.const 205 i32.const 0 call $~lib/env/abort unreachable @@ -15563,8 +15763,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 203 + i32.const 152 + i32.const 206 i32.const 0 call $~lib/env/abort unreachable @@ -15577,8 +15777,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 204 + i32.const 152 + i32.const 207 i32.const 0 call $~lib/env/abort unreachable @@ -15591,8 +15791,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 205 + i32.const 152 + i32.const 208 i32.const 0 call $~lib/env/abort unreachable @@ -15605,8 +15805,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 206 + i32.const 152 + i32.const 209 i32.const 0 call $~lib/env/abort unreachable @@ -15619,8 +15819,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 207 + i32.const 152 + i32.const 210 i32.const 0 call $~lib/env/abort unreachable @@ -15633,8 +15833,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 208 + i32.const 152 + i32.const 211 i32.const 0 call $~lib/env/abort unreachable @@ -15648,8 +15848,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 214 + i32.const 152 + i32.const 217 i32.const 0 call $~lib/env/abort unreachable @@ -15661,8 +15861,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 215 + i32.const 152 + i32.const 218 i32.const 0 call $~lib/env/abort unreachable @@ -15674,8 +15874,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 216 + i32.const 152 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -15688,8 +15888,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 217 + i32.const 152 + i32.const 220 i32.const 0 call $~lib/env/abort unreachable @@ -15702,8 +15902,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 218 + i32.const 152 + i32.const 221 i32.const 0 call $~lib/env/abort unreachable @@ -15716,8 +15916,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 219 + i32.const 152 + i32.const 222 i32.const 0 call $~lib/env/abort unreachable @@ -15730,8 +15930,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 220 + i32.const 152 + i32.const 223 i32.const 0 call $~lib/env/abort unreachable @@ -15745,8 +15945,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 224 + i32.const 152 + i32.const 227 i32.const 0 call $~lib/env/abort unreachable @@ -15758,8 +15958,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 225 + i32.const 152 + i32.const 228 i32.const 0 call $~lib/env/abort unreachable @@ -15771,8 +15971,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 226 + i32.const 152 + i32.const 229 i32.const 0 call $~lib/env/abort unreachable @@ -15785,8 +15985,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 227 + i32.const 152 + i32.const 230 i32.const 0 call $~lib/env/abort unreachable @@ -15799,8 +15999,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 228 + i32.const 152 + i32.const 231 i32.const 0 call $~lib/env/abort unreachable @@ -15813,8 +16013,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 229 + i32.const 152 + i32.const 232 i32.const 0 call $~lib/env/abort unreachable @@ -15829,8 +16029,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 235 + i32.const 152 + i32.const 238 i32.const 0 call $~lib/env/abort unreachable @@ -15842,8 +16042,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 236 + i32.const 152 + i32.const 239 i32.const 0 call $~lib/env/abort unreachable @@ -15856,8 +16056,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 237 + i32.const 152 + i32.const 240 i32.const 0 call $~lib/env/abort unreachable @@ -15870,8 +16070,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 238 + i32.const 152 + i32.const 241 i32.const 0 call $~lib/env/abort unreachable @@ -15884,8 +16084,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 239 + i32.const 152 + i32.const 242 i32.const 0 call $~lib/env/abort unreachable @@ -15909,8 +16109,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 248 + i32.const 152 + i32.const 251 i32.const 0 call $~lib/env/abort unreachable @@ -15926,8 +16126,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 252 + i32.const 152 + i32.const 255 i32.const 0 call $~lib/env/abort unreachable @@ -15943,8 +16143,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 256 + i32.const 152 + i32.const 259 i32.const 0 call $~lib/env/abort unreachable @@ -15960,8 +16160,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 260 + i32.const 152 + i32.const 263 i32.const 0 call $~lib/env/abort unreachable @@ -15977,8 +16177,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 264 + i32.const 152 + i32.const 267 i32.const 0 call $~lib/env/abort unreachable @@ -15994,8 +16194,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 268 + i32.const 152 + i32.const 271 i32.const 0 call $~lib/env/abort unreachable @@ -16011,8 +16211,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 272 + i32.const 152 + i32.const 275 i32.const 0 call $~lib/env/abort unreachable @@ -16028,8 +16228,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 276 + i32.const 152 + i32.const 279 i32.const 0 call $~lib/env/abort unreachable @@ -16045,8 +16245,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 280 + i32.const 152 + i32.const 283 i32.const 0 call $~lib/env/abort unreachable @@ -16062,8 +16262,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 284 + i32.const 152 + i32.const 287 i32.const 0 call $~lib/env/abort unreachable @@ -16079,8 +16279,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 290 + i32.const 152 + i32.const 293 i32.const 0 call $~lib/env/abort unreachable @@ -16096,8 +16296,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 294 + i32.const 152 + i32.const 297 i32.const 0 call $~lib/env/abort unreachable @@ -16113,8 +16313,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 298 + i32.const 152 + i32.const 301 i32.const 0 call $~lib/env/abort unreachable @@ -16130,8 +16330,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 302 + i32.const 152 + i32.const 305 i32.const 0 call $~lib/env/abort unreachable @@ -16147,8 +16347,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 306 + i32.const 152 + i32.const 309 i32.const 0 call $~lib/env/abort unreachable @@ -16164,8 +16364,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 310 + i32.const 152 + i32.const 313 i32.const 0 call $~lib/env/abort unreachable @@ -16181,8 +16381,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 314 + i32.const 152 + i32.const 317 i32.const 0 call $~lib/env/abort unreachable @@ -16198,8 +16398,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 318 + i32.const 152 + i32.const 321 i32.const 0 call $~lib/env/abort unreachable @@ -16215,8 +16415,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 322 + i32.const 152 + i32.const 325 i32.const 0 call $~lib/env/abort unreachable @@ -16232,8 +16432,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 326 + i32.const 152 + i32.const 329 i32.const 0 call $~lib/env/abort unreachable @@ -16250,8 +16450,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 330 + i32.const 152 + i32.const 333 i32.const 0 call $~lib/env/abort unreachable @@ -16263,8 +16463,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 331 + i32.const 152 + i32.const 334 i32.const 0 call $~lib/env/abort unreachable @@ -16277,8 +16477,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 332 + i32.const 152 + i32.const 335 i32.const 0 call $~lib/env/abort unreachable @@ -16291,8 +16491,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 333 + i32.const 152 + i32.const 336 i32.const 0 call $~lib/env/abort unreachable @@ -16302,7 +16502,7 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#splice block $~lib/runtime/WRAPARRAY|inlined.25 (result i32) - i32.const 1392 + i32.const 1784 local.set $0 local.get $0 i32.const 4 @@ -16314,15 +16514,15 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 338 + i32.const 152 + i32.const 341 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr block $~lib/runtime/WRAPARRAY|inlined.26 (result i32) - i32.const 1424 + i32.const 1824 local.set $0 local.get $0 i32.const 4 @@ -16334,14 +16534,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 339 + i32.const 152 + i32.const 342 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.27 (result i32) - i32.const 1432 + i32.const 1840 local.set $0 local.get $0 i32.const 4 @@ -16354,7 +16554,7 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#splice block $~lib/runtime/WRAPARRAY|inlined.28 (result i32) - i32.const 1464 + i32.const 1880 local.set $0 local.get $0 i32.const 4 @@ -16366,15 +16566,15 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 342 + i32.const 152 + i32.const 345 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr block $~lib/runtime/WRAPARRAY|inlined.29 (result i32) - i32.const 1488 + i32.const 1912 local.set $0 local.get $0 i32.const 4 @@ -16386,14 +16586,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 343 + i32.const 152 + i32.const 346 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.30 (result i32) - i32.const 1504 + i32.const 1936 local.set $0 local.get $0 i32.const 4 @@ -16406,7 +16606,7 @@ i32.const 2 call $~lib/array/Array#splice block $~lib/runtime/WRAPARRAY|inlined.31 (result i32) - i32.const 1536 + i32.const 1976 local.set $0 local.get $0 i32.const 4 @@ -16418,15 +16618,15 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 346 + i32.const 152 + i32.const 349 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr block $~lib/runtime/WRAPARRAY|inlined.32 (result i32) - i32.const 1552 + i32.const 2000 local.set $0 local.get $0 i32.const 4 @@ -16438,14 +16638,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 347 + i32.const 152 + i32.const 350 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.33 (result i32) - i32.const 1576 + i32.const 2032 local.set $0 local.get $0 i32.const 4 @@ -16458,7 +16658,7 @@ i32.const 1 call $~lib/array/Array#splice block $~lib/runtime/WRAPARRAY|inlined.34 (result i32) - i32.const 1608 + i32.const 2072 local.set $0 local.get $0 i32.const 4 @@ -16470,15 +16670,15 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 350 + i32.const 152 + i32.const 353 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr block $~lib/runtime/WRAPARRAY|inlined.35 (result i32) - i32.const 1624 + i32.const 2096 local.set $0 local.get $0 i32.const 4 @@ -16490,14 +16690,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 351 + i32.const 152 + i32.const 354 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.36 (result i32) - i32.const 1648 + i32.const 2128 local.set $0 local.get $0 i32.const 4 @@ -16510,7 +16710,7 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#splice block $~lib/runtime/WRAPARRAY|inlined.37 (result i32) - i32.const 1680 + i32.const 2168 local.set $0 local.get $0 i32.const 4 @@ -16522,15 +16722,15 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 354 + i32.const 152 + i32.const 357 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr block $~lib/runtime/WRAPARRAY|inlined.38 (result i32) - i32.const 1696 + i32.const 2192 local.set $0 local.get $0 i32.const 4 @@ -16542,14 +16742,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 355 + i32.const 152 + i32.const 358 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.39 (result i32) - i32.const 1720 + i32.const 2224 local.set $0 local.get $0 i32.const 4 @@ -16562,7 +16762,7 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#splice block $~lib/runtime/WRAPARRAY|inlined.40 (result i32) - i32.const 1752 + i32.const 2264 local.set $0 local.get $0 i32.const 4 @@ -16574,15 +16774,15 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 358 + i32.const 152 + i32.const 361 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr block $~lib/runtime/WRAPARRAY|inlined.41 (result i32) - i32.const 1768 + i32.const 2288 local.set $0 local.get $0 i32.const 4 @@ -16594,14 +16794,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 359 + i32.const 152 + i32.const 362 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.42 (result i32) - i32.const 1792 + i32.const 2320 local.set $0 local.get $0 i32.const 4 @@ -16614,7 +16814,7 @@ i32.const 1 call $~lib/array/Array#splice block $~lib/runtime/WRAPARRAY|inlined.43 (result i32) - i32.const 1824 + i32.const 2360 local.set $0 local.get $0 i32.const 4 @@ -16626,15 +16826,15 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 362 + i32.const 152 + i32.const 365 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr block $~lib/runtime/WRAPARRAY|inlined.44 (result i32) - i32.const 1840 + i32.const 2384 local.set $0 local.get $0 i32.const 4 @@ -16646,14 +16846,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 363 + i32.const 152 + i32.const 366 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.45 (result i32) - i32.const 1864 + i32.const 2416 local.set $0 local.get $0 i32.const 4 @@ -16666,7 +16866,7 @@ i32.const 1 call $~lib/array/Array#splice block $~lib/runtime/WRAPARRAY|inlined.46 (result i32) - i32.const 1896 + i32.const 2456 local.set $0 local.get $0 i32.const 4 @@ -16678,15 +16878,15 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 366 + i32.const 152 + i32.const 369 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr block $~lib/runtime/WRAPARRAY|inlined.47 (result i32) - i32.const 1912 + i32.const 2480 local.set $0 local.get $0 i32.const 4 @@ -16698,14 +16898,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 367 + i32.const 152 + i32.const 370 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.48 (result i32) - i32.const 1936 + i32.const 2512 local.set $0 local.get $0 i32.const 4 @@ -16718,7 +16918,7 @@ i32.const -1 call $~lib/array/Array#splice block $~lib/runtime/WRAPARRAY|inlined.49 (result i32) - i32.const 1968 + i32.const 2552 local.set $0 local.get $0 i32.const 4 @@ -16730,15 +16930,15 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 370 + i32.const 152 + i32.const 373 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr block $~lib/runtime/WRAPARRAY|inlined.50 (result i32) - i32.const 1976 + i32.const 2568 local.set $0 local.get $0 i32.const 4 @@ -16750,14 +16950,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 371 + i32.const 152 + i32.const 374 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.51 (result i32) - i32.const 2008 + i32.const 2608 local.set $0 local.get $0 i32.const 4 @@ -16770,7 +16970,7 @@ i32.const -2 call $~lib/array/Array#splice block $~lib/runtime/WRAPARRAY|inlined.52 (result i32) - i32.const 2040 + i32.const 2648 local.set $0 local.get $0 i32.const 4 @@ -16782,15 +16982,15 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 374 + i32.const 152 + i32.const 377 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr block $~lib/runtime/WRAPARRAY|inlined.53 (result i32) - i32.const 2048 + i32.const 2664 local.set $0 local.get $0 i32.const 4 @@ -16802,14 +17002,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 375 + i32.const 152 + i32.const 378 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.54 (result i32) - i32.const 2080 + i32.const 2704 local.set $0 local.get $0 i32.const 4 @@ -16822,7 +17022,7 @@ i32.const 0 call $~lib/array/Array#splice block $~lib/runtime/WRAPARRAY|inlined.55 (result i32) - i32.const 2112 + i32.const 2744 local.set $0 local.get $0 i32.const 4 @@ -16834,15 +17034,15 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 378 + i32.const 152 + i32.const 381 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr block $~lib/runtime/WRAPARRAY|inlined.56 (result i32) - i32.const 2120 + i32.const 2760 local.set $0 local.get $0 i32.const 4 @@ -16854,14 +17054,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 379 + i32.const 152 + i32.const 382 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.57 (result i32) - i32.const 2152 + i32.const 2800 local.set $0 local.get $0 i32.const 4 @@ -16874,7 +17074,7 @@ i32.const 0 call $~lib/array/Array#splice block $~lib/runtime/WRAPARRAY|inlined.58 (result i32) - i32.const 2184 + i32.const 2840 local.set $0 local.get $0 i32.const 4 @@ -16886,15 +17086,15 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 382 + i32.const 152 + i32.const 385 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr block $~lib/runtime/WRAPARRAY|inlined.59 (result i32) - i32.const 2192 + i32.const 2856 local.set $0 local.get $0 i32.const 4 @@ -16906,14 +17106,14 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 383 + i32.const 152 + i32.const 386 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.60 (result i32) - i32.const 2224 + i32.const 2896 local.set $0 local.get $0 i32.const 4 @@ -16926,7 +17126,7 @@ i32.const 5 call $~lib/array/Array#splice block $~lib/runtime/WRAPARRAY|inlined.61 (result i32) - i32.const 2256 + i32.const 2936 local.set $0 local.get $0 i32.const 4 @@ -16938,15 +17138,15 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 386 + i32.const 152 + i32.const 389 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/sarr block $~lib/runtime/WRAPARRAY|inlined.62 (result i32) - i32.const 2264 + i32.const 2952 local.set $0 local.get $0 i32.const 4 @@ -16958,8 +17158,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 387 + i32.const 152 + i32.const 390 i32.const 0 call $~lib/env/abort unreachable @@ -16990,8 +17190,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 397 + i32.const 152 + i32.const 400 i32.const 0 call $~lib/env/abort unreachable @@ -17006,8 +17206,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 400 + i32.const 152 + i32.const 403 i32.const 0 call $~lib/env/abort unreachable @@ -17022,8 +17222,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 403 + i32.const 152 + i32.const 406 i32.const 0 call $~lib/env/abort unreachable @@ -17038,8 +17238,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 411 + i32.const 152 + i32.const 414 i32.const 0 call $~lib/env/abort unreachable @@ -17051,8 +17251,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 412 + i32.const 152 + i32.const 415 i32.const 0 call $~lib/env/abort unreachable @@ -17067,8 +17267,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 414 + i32.const 152 + i32.const 417 i32.const 0 call $~lib/env/abort unreachable @@ -17095,8 +17295,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 427 + i32.const 152 + i32.const 430 i32.const 0 call $~lib/env/abort unreachable @@ -17108,8 +17308,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 428 + i32.const 152 + i32.const 431 i32.const 0 call $~lib/env/abort unreachable @@ -17132,8 +17332,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 436 + i32.const 152 + i32.const 439 i32.const 0 call $~lib/env/abort unreachable @@ -17148,8 +17348,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 439 + i32.const 152 + i32.const 442 i32.const 0 call $~lib/env/abort unreachable @@ -17164,8 +17364,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 447 + i32.const 152 + i32.const 450 i32.const 0 call $~lib/env/abort unreachable @@ -17177,8 +17377,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 448 + i32.const 152 + i32.const 451 i32.const 0 call $~lib/env/abort unreachable @@ -17193,8 +17393,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 450 + i32.const 152 + i32.const 453 i32.const 0 call $~lib/env/abort unreachable @@ -17221,8 +17421,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 463 + i32.const 152 + i32.const 466 i32.const 0 call $~lib/env/abort unreachable @@ -17234,8 +17434,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 464 + i32.const 152 + i32.const 467 i32.const 0 call $~lib/env/abort unreachable @@ -17258,8 +17458,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 472 + i32.const 152 + i32.const 475 i32.const 0 call $~lib/env/abort unreachable @@ -17274,8 +17474,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 475 + i32.const 152 + i32.const 478 i32.const 0 call $~lib/env/abort unreachable @@ -17290,8 +17490,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 483 + i32.const 152 + i32.const 486 i32.const 0 call $~lib/env/abort unreachable @@ -17303,8 +17503,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 484 + i32.const 152 + i32.const 487 i32.const 0 call $~lib/env/abort unreachable @@ -17319,8 +17519,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 486 + i32.const 152 + i32.const 489 i32.const 0 call $~lib/env/abort unreachable @@ -17347,8 +17547,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 499 + i32.const 152 + i32.const 502 i32.const 0 call $~lib/env/abort unreachable @@ -17360,8 +17560,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 500 + i32.const 152 + i32.const 503 i32.const 0 call $~lib/env/abort unreachable @@ -17385,8 +17585,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 509 + i32.const 152 + i32.const 512 i32.const 0 call $~lib/env/abort unreachable @@ -17402,8 +17602,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 518 + i32.const 152 + i32.const 521 i32.const 0 call $~lib/env/abort unreachable @@ -17415,8 +17615,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 519 + i32.const 152 + i32.const 522 i32.const 0 call $~lib/env/abort unreachable @@ -17432,8 +17632,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 522 + i32.const 152 + i32.const 525 i32.const 0 call $~lib/env/abort unreachable @@ -17461,8 +17661,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 536 + i32.const 152 + i32.const 539 i32.const 0 call $~lib/env/abort unreachable @@ -17474,8 +17674,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 537 + i32.const 152 + i32.const 540 i32.const 0 call $~lib/env/abort unreachable @@ -17498,8 +17698,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 562 + i32.const 152 + i32.const 565 i32.const 0 call $~lib/env/abort unreachable @@ -17552,8 +17752,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 573 + i32.const 152 + i32.const 576 i32.const 0 call $~lib/env/abort unreachable @@ -17569,8 +17769,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 574 + i32.const 152 + i32.const 577 i32.const 0 call $~lib/env/abort unreachable @@ -17587,8 +17787,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 583 + i32.const 152 + i32.const 586 i32.const 0 call $~lib/env/abort unreachable @@ -17600,8 +17800,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 584 + i32.const 152 + i32.const 587 i32.const 0 call $~lib/env/abort unreachable @@ -17618,8 +17818,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 591 + i32.const 152 + i32.const 594 i32.const 0 call $~lib/env/abort unreachable @@ -17648,8 +17848,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 606 + i32.const 152 + i32.const 609 i32.const 0 call $~lib/env/abort unreachable @@ -17661,8 +17861,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 607 + i32.const 152 + i32.const 610 i32.const 0 call $~lib/env/abort unreachable @@ -17686,8 +17886,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 615 + i32.const 152 + i32.const 618 i32.const 0 call $~lib/env/abort unreachable @@ -17704,8 +17904,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 624 + i32.const 152 + i32.const 627 i32.const 0 call $~lib/env/abort unreachable @@ -17717,8 +17917,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 625 + i32.const 152 + i32.const 628 i32.const 0 call $~lib/env/abort unreachable @@ -17735,8 +17935,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 632 + i32.const 152 + i32.const 635 i32.const 0 call $~lib/env/abort unreachable @@ -17765,8 +17965,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 647 + i32.const 152 + i32.const 650 i32.const 0 call $~lib/env/abort unreachable @@ -17778,8 +17978,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 648 + i32.const 152 + i32.const 651 i32.const 0 call $~lib/env/abort unreachable @@ -17803,8 +18003,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 656 + i32.const 152 + i32.const 659 i32.const 0 call $~lib/env/abort unreachable @@ -17820,8 +18020,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 660 + i32.const 152 + i32.const 663 i32.const 0 call $~lib/env/abort unreachable @@ -17839,8 +18039,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 663 + i32.const 152 + i32.const 666 i32.const 0 call $~lib/env/abort unreachable @@ -17858,8 +18058,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 666 + i32.const 152 + i32.const 669 i32.const 0 call $~lib/env/abort unreachable @@ -17875,8 +18075,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 674 + i32.const 152 + i32.const 677 i32.const 0 call $~lib/env/abort unreachable @@ -17888,8 +18088,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 675 + i32.const 152 + i32.const 678 i32.const 0 call $~lib/env/abort unreachable @@ -17905,8 +18105,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 677 + i32.const 152 + i32.const 680 i32.const 0 call $~lib/env/abort unreachable @@ -17934,8 +18134,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 690 + i32.const 152 + i32.const 693 i32.const 0 call $~lib/env/abort unreachable @@ -17947,8 +18147,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 691 + i32.const 152 + i32.const 694 i32.const 0 call $~lib/env/abort unreachable @@ -17972,8 +18172,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 699 + i32.const 152 + i32.const 702 i32.const 0 call $~lib/env/abort unreachable @@ -17989,8 +18189,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 703 + i32.const 152 + i32.const 706 i32.const 0 call $~lib/env/abort unreachable @@ -18008,8 +18208,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 706 + i32.const 152 + i32.const 709 i32.const 0 call $~lib/env/abort unreachable @@ -18027,8 +18227,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 709 + i32.const 152 + i32.const 712 i32.const 0 call $~lib/env/abort unreachable @@ -18044,8 +18244,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 717 + i32.const 152 + i32.const 720 i32.const 0 call $~lib/env/abort unreachable @@ -18057,8 +18257,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 718 + i32.const 152 + i32.const 721 i32.const 0 call $~lib/env/abort unreachable @@ -18074,8 +18274,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 720 + i32.const 152 + i32.const 723 i32.const 0 call $~lib/env/abort unreachable @@ -18103,8 +18303,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 733 + i32.const 152 + i32.const 736 i32.const 0 call $~lib/env/abort unreachable @@ -18116,8 +18316,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 734 + i32.const 152 + i32.const 737 i32.const 0 call $~lib/env/abort unreachable @@ -18151,7 +18351,7 @@ drop global.get $std/array/f32ArrayTyped block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) - i32.const 2576 + i32.const 3304 local.set $0 local.get $0 i32.const 9 @@ -18163,8 +18363,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 821 + i32.const 152 + i32.const 824 i32.const 0 call $~lib/env/abort unreachable @@ -18179,7 +18379,7 @@ drop global.get $std/array/f64ArrayTyped block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) - i32.const 2712 + i32.const 3464 local.set $0 local.get $0 i32.const 10 @@ -18191,8 +18391,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 825 + i32.const 152 + i32.const 828 i32.const 0 call $~lib/env/abort unreachable @@ -18207,7 +18407,7 @@ drop global.get $std/array/i32ArrayTyped block $~lib/runtime/WRAPARRAY|inlined.63 (result i32) - i32.const 2840 + i32.const 3616 local.set $0 local.get $0 i32.const 4 @@ -18219,8 +18419,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 829 + i32.const 152 + i32.const 832 i32.const 0 call $~lib/env/abort unreachable @@ -18235,7 +18435,7 @@ drop global.get $std/array/u32ArrayTyped block $~lib/runtime/WRAPARRAY|inlined.5 (result i32) - i32.const 2928 + i32.const 3728 local.set $0 local.get $0 i32.const 8 @@ -18247,8 +18447,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 833 + i32.const 152 + i32.const 836 i32.const 0 call $~lib/env/abort unreachable @@ -18274,7 +18474,7 @@ call $std/array/assertSortedDefault global.get $std/array/reversed1 block $~lib/runtime/WRAPARRAY|inlined.64 (result i32) - i32.const 3168 + i32.const 4056 local.set $0 local.get $0 i32.const 4 @@ -18286,8 +18486,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 853 + i32.const 152 + i32.const 856 i32.const 0 call $~lib/env/abort unreachable @@ -18296,7 +18496,7 @@ call $std/array/assertSortedDefault global.get $std/array/reversed2 block $~lib/runtime/WRAPARRAY|inlined.65 (result i32) - i32.const 3184 + i32.const 4080 local.set $0 local.get $0 i32.const 4 @@ -18308,8 +18508,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 856 + i32.const 152 + i32.const 859 i32.const 0 call $~lib/env/abort unreachable @@ -18323,8 +18523,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 859 + i32.const 152 + i32.const 862 i32.const 0 call $~lib/env/abort unreachable @@ -18338,8 +18538,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 862 + i32.const 152 + i32.const 865 i32.const 0 call $~lib/env/abort unreachable @@ -18353,8 +18553,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 865 + i32.const 152 + i32.const 868 i32.const 0 call $~lib/env/abort unreachable @@ -18368,8 +18568,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 868 + i32.const 152 + i32.const 871 i32.const 0 call $~lib/env/abort unreachable @@ -18383,8 +18583,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 871 + i32.const 152 + i32.const 874 i32.const 0 call $~lib/env/abort unreachable @@ -18435,8 +18635,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 901 + i32.const 152 + i32.const 904 i32.const 0 call $~lib/env/abort unreachable @@ -18452,127 +18652,127 @@ call $std/array/assertSorted|trampoline end block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 3528 + i32.const 4552 local.set $0 local.get $0 i32.const 15 i32.const 0 call $~lib/runtime/doWrapArray end - i32.const 3512 + i32.const 4528 call $~lib/array/Array#join - i32.const 3544 + i32.const 4576 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 910 + i32.const 152 + i32.const 913 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.67 (result i32) - i32.const 4048 + i32.const 5120 local.set $0 local.get $0 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray end - i32.const 3264 + i32.const 4200 call $~lib/array/Array#join - i32.const 4072 + i32.const 5152 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 911 + i32.const 152 + i32.const 914 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.7 (result i32) - i32.const 4136 + i32.const 5240 local.set $0 local.get $0 i32.const 8 i32.const 2 call $~lib/runtime/doWrapArray end - i32.const 4120 + i32.const 5216 call $~lib/array/Array#join - i32.const 4072 + i32.const 5152 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 912 + i32.const 152 + i32.const 915 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.69 (result i32) - i32.const 4192 + i32.const 5320 local.set $0 local.get $0 i32.const 4 i32.const 2 call $~lib/runtime/doWrapArray end - i32.const 4176 + i32.const 5296 call $~lib/array/Array#join - i32.const 4208 + i32.const 5344 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 913 + i32.const 152 + i32.const 916 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) - i32.const 5432 + i32.const 6672 local.set $0 local.get $0 i32.const 10 i32.const 3 call $~lib/runtime/doWrapArray end - i32.const 4320 + i32.const 5472 call $~lib/array/Array#join - i32.const 5488 + i32.const 6736 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 914 + i32.const 152 + i32.const 917 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 5616 + i32.const 6888 local.set $0 local.get $0 i32.const 14 i32.const 2 call $~lib/runtime/doWrapArray end - i32.const 3264 + i32.const 4200 call $~lib/array/Array#join - i32.const 5576 + i32.const 6832 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 915 + i32.const 152 + i32.const 918 i32.const 0 call $~lib/env/abort unreachable @@ -18586,87 +18786,123 @@ i32.load offset=4 local.set $1 local.get $1 - i32.const 0 - call $std/array/Ref#constructor + block $~lib/runtime/RETAIN>|inlined.0 (result i32) + i32.const 0 + call $std/array/Ref#constructor + local.set $2 + local.get $2 + i32.const 0 + i32.ne + if + local.get $2 + local.get $0 + call $~lib/runtime/doRetain + end + local.get $2 + end i32.store local.get $1 - i32.const 0 + block $~lib/runtime/RETAIN>|inlined.1 (result i32) + i32.const 0 + local.set $2 + local.get $2 + i32.const 0 + i32.ne + if + local.get $2 + local.get $0 + call $~lib/runtime/doRetain + end + local.get $2 + end i32.store offset=4 local.get $1 - i32.const 0 - call $std/array/Ref#constructor + block $~lib/runtime/RETAIN>|inlined.2 (result i32) + i32.const 0 + call $std/array/Ref#constructor + local.set $2 + local.get $2 + i32.const 0 + i32.ne + if + local.get $2 + local.get $0 + call $~lib/runtime/doRetain + end + local.get $2 + end i32.store offset=8 local.get $0 end global.set $std/array/refArr global.get $std/array/refArr - i32.const 3512 + i32.const 4528 call $~lib/array/Array#join - i32.const 5680 + i32.const 6968 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 917 + i32.const 152 + i32.const 920 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/reversed0 call $~lib/array/Array#toString - i32.const 3264 + i32.const 4200 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 921 + i32.const 152 + i32.const 924 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/reversed1 call $~lib/array/Array#toString - i32.const 5576 + i32.const 6832 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 922 + i32.const 152 + i32.const 925 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/reversed2 call $~lib/array/Array#toString - i32.const 5752 + i32.const 7048 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 923 + i32.const 152 + i32.const 926 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/reversed4 call $~lib/array/Array#toString - i32.const 5768 + i32.const 7072 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 924 + i32.const 152 + i32.const 927 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 5808 + i32.const 7128 local.set $1 local.get $1 i32.const 20 @@ -18674,19 +18910,19 @@ call $~lib/runtime/doWrapArray end call $~lib/array/Array#toString - i32.const 5824 + i32.const 7152 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 926 + i32.const 152 + i32.const 929 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 5864 + i32.const 7208 local.set $1 local.get $1 i32.const 21 @@ -18694,19 +18930,19 @@ call $~lib/runtime/doWrapArray end call $~lib/array/Array#toString - i32.const 5880 + i32.const 7232 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 927 + i32.const 152 + i32.const 930 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 5944 + i32.const 7312 local.set $1 local.get $1 i32.const 16 @@ -18714,19 +18950,19 @@ call $~lib/runtime/doWrapArray end call $~lib/array/Array#toString - i32.const 5976 + i32.const 7352 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 928 + i32.const 152 + i32.const 931 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 6072 + i32.const 7464 local.set $1 local.get $1 i32.const 22 @@ -18734,32 +18970,32 @@ call $~lib/runtime/doWrapArray end call $~lib/array/Array#toString - i32.const 6112 + i32.const 7512 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 929 + i32.const 152 + i32.const 932 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/randomStringsExpected call $~lib/array/Array#toString - i32.const 6208 + i32.const 7616 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 930 + i32.const 152 + i32.const 933 i32.const 0 call $~lib/env/abort unreachable end block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) - i32.const 6304 + i32.const 7744 local.set $1 local.get $1 i32.const 14 @@ -18767,13 +19003,13 @@ call $~lib/runtime/doWrapArray end call $~lib/array/Array#toString - i32.const 6328 + i32.const 7776 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 931 + i32.const 152 + i32.const 934 i32.const 0 call $~lib/env/abort unreachable @@ -18787,23 +19023,37 @@ i32.load offset=4 local.set $0 local.get $0 - block $~lib/runtime/WRAPARRAY|inlined.71 (result i32) - i32.const 6368 + block $~lib/runtime/RETAIN,Array>>|inlined.1 (result i32) + block $~lib/runtime/WRAPARRAY|inlined.71 (result i32) + i32.const 7832 + local.set $2 + local.get $2 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end local.set $2 local.get $2 - i32.const 4 - i32.const 2 - call $~lib/runtime/doWrapArray + local.get $1 + call $~lib/runtime/doRetain + local.get $2 end i32.store local.get $0 - block $~lib/runtime/WRAPARRAY|inlined.72 (result i32) - i32.const 6384 + block $~lib/runtime/RETAIN,Array>>|inlined.2 (result i32) + block $~lib/runtime/WRAPARRAY|inlined.72 (result i32) + i32.const 7856 + local.set $2 + local.get $2 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end local.set $2 local.get $2 - i32.const 4 - i32.const 2 - call $~lib/runtime/doWrapArray + local.get $1 + call $~lib/runtime/doRetain + local.get $2 end i32.store offset=4 local.get $1 @@ -18811,13 +19061,13 @@ global.set $std/array/subarr32 global.get $std/array/subarr32 call $~lib/array/Array>#toString - i32.const 6400 + i32.const 7880 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 934 + i32.const 152 + i32.const 937 i32.const 0 call $~lib/env/abort unreachable @@ -18831,23 +19081,37 @@ i32.load offset=4 local.set $1 local.get $1 - block $~lib/runtime/WRAPARRAY|inlined.6 (result i32) - i32.const 6440 + block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) + block $~lib/runtime/WRAPARRAY|inlined.6 (result i32) + i32.const 7936 + local.set $2 + local.get $2 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + end local.set $2 local.get $2 - i32.const 7 - i32.const 0 - call $~lib/runtime/doWrapArray + local.get $0 + call $~lib/runtime/doRetain + local.get $2 end i32.store local.get $1 - block $~lib/runtime/WRAPARRAY|inlined.7 (result i32) - i32.const 6456 + block $~lib/runtime/RETAIN,Array>>|inlined.1 (result i32) + block $~lib/runtime/WRAPARRAY|inlined.7 (result i32) + i32.const 7960 + local.set $2 + local.get $2 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + end local.set $2 local.get $2 - i32.const 7 - i32.const 0 - call $~lib/runtime/doWrapArray + local.get $0 + call $~lib/runtime/doRetain + local.get $2 end i32.store offset=4 local.get $0 @@ -18855,13 +19119,13 @@ global.set $std/array/subarr8 global.get $std/array/subarr8 call $~lib/array/Array>#toString - i32.const 6400 + i32.const 7880 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 937 + i32.const 152 + i32.const 940 i32.const 0 call $~lib/env/abort unreachable @@ -18875,25 +19139,39 @@ i32.load offset=4 local.set $1 local.get $1 - block (result i32) - i32.const 0 - i32.const 1 - call $~lib/array/Array>#constructor - local.set $2 - local.get $2 - i32.load offset=4 + block $~lib/runtime/RETAIN>,Array>>>|inlined.0 (result i32) + block (result i32) + i32.const 0 + i32.const 1 + call $~lib/array/Array>#constructor + local.set $2 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $3 + block $~lib/runtime/RETAIN,Array>>|inlined.1 (result i32) + block $~lib/runtime/WRAPARRAY|inlined.11 (result i32) + i32.const 8056 + local.set $4 + local.get $4 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + end + local.set $4 + local.get $4 + local.get $2 + call $~lib/runtime/doRetain + local.get $4 + end + i32.store + local.get $2 + end local.set $3 local.get $3 - block $~lib/runtime/WRAPARRAY|inlined.11 (result i32) - i32.const 6520 - local.set $4 - local.get $4 - i32.const 8 - i32.const 2 - call $~lib/runtime/doWrapArray - end - i32.store - local.get $2 + local.get $0 + call $~lib/runtime/doRetain + local.get $3 end i32.store local.get $0 @@ -18901,21 +19179,30 @@ global.set $std/array/subarrU32 global.get $std/array/subarrU32 call $~lib/array/Array>>#toString - i32.const 5576 + i32.const 6832 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 940 + i32.const 152 + i32.const 943 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 262 ;) (type $FUNCSIG$v) + (func $std/array/main (; 268 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started + end + ) + (func $start (; 269 ;) (type $FUNCSIG$v) call $start:std/array ) - (func $null (; 263 ;) (type $FUNCSIG$v) + (func $null (; 270 ;) (type $FUNCSIG$v) ) ) From e57fa14ff962557e75d4ad526304eeea58c6c36c Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 21 Mar 2019 18:30:36 +0100 Subject: [PATCH 063/119] give it a shot --- std/assembly/array.ts | 16 + std/assembly/runtime.ts | 2 +- tests/compiler/std/array.optimized.wat | 481 ++++++++++++++++++------- tests/compiler/std/array.ts | 2 +- tests/compiler/std/array.untouched.wat | 441 +++++++++++++++++++---- 5 files changed, 739 insertions(+), 203 deletions(-) diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 67051cbf1a..2ef05f709c 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -34,6 +34,22 @@ export class Array extends ArrayBufferView { constructor(length: i32 = 0) { super(length, alignof()); + if (isReference()) { + if (!isNullable()) { + let cur = this.dataStart; + let end = cur + (length << alignof()); + while (cur < end) { + // TODO: probably a common reason for complaints of T not having a default ctor. what if + // the array ctor would also take default arguments, like `new Array(10, ...args)`? + store(cur, + isString() + ? "" // no need to instantiate + : RETAIN(instantiate(), this) + ); + cur += sizeof(); + } + } + } this.length_ = length; } diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 8ee4d5ba3b..7df000f9bb 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -19,7 +19,7 @@ import { HEAP_BASE, memory } from "./memory"; // Changes the size of a previously allocated, but not yet registered, runtime object, for // example when a pre-allocated buffer turned out to be too small or too large. This works by // aligning dynamic allocations to actual block size internally so in the best case REALLOCATE -// only updates payload size while in the worst case moves the object to larger a block. +// only updates payload size while in the worst case moves the object to a larger block. // // DISCARD(ref) // ------------ diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 6cb604efb8..a1982e5b24 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2143,7 +2143,7 @@ if i32.const 0 i32.const 272 - i32.const 69 + i32.const 85 i32.const 61 call $~lib/env/abort unreachable @@ -2284,7 +2284,7 @@ if i32.const 0 i32.const 272 - i32.const 69 + i32.const 85 i32.const 61 call $~lib/env/abort unreachable @@ -2531,7 +2531,7 @@ if i32.const 0 i32.const 272 - i32.const 204 + i32.const 220 i32.const 20 call $~lib/env/abort unreachable @@ -2798,7 +2798,7 @@ if i32.const 0 i32.const 272 - i32.const 265 + i32.const 281 i32.const 20 call $~lib/env/abort unreachable @@ -3575,7 +3575,7 @@ if i32.const 0 i32.const 272 - i32.const 69 + i32.const 85 i32.const 61 call $~lib/env/abort unreachable @@ -4326,7 +4326,7 @@ if i32.const 0 i32.const 272 - i32.const 377 + i32.const 393 i32.const 4 call $~lib/env/abort unreachable @@ -4822,7 +4822,7 @@ if i32.const 0 i32.const 272 - i32.const 377 + i32.const 393 i32.const 4 call $~lib/env/abort unreachable @@ -4920,7 +4920,7 @@ if i32.const 0 i32.const 272 - i32.const 69 + i32.const 85 i32.const 61 call $~lib/env/abort unreachable @@ -5341,7 +5341,7 @@ if i32.const 0 i32.const 272 - i32.const 377 + i32.const 393 i32.const 4 call $~lib/env/abort unreachable @@ -5596,6 +5596,9 @@ ) (func $~lib/array/Array>#constructor (; 101 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) i32.const 16 call $~lib/runtime/doAllocate i32.const 11 @@ -5607,6 +5610,34 @@ i32.const 0 i32.store offset=12 local.get $1 + i32.load offset=4 + local.tee $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + i32.const 0 + call $~lib/array/Array#constructor + local.tee $4 + local.get $1 + call $~lib/runtime/doRetain + local.get $2 + local.get $4 + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $continue|0 + end + end + local.get $1 local.get $0 i32.store offset=12 local.get $1 @@ -5715,7 +5746,7 @@ if i32.const 0 i32.const 272 - i32.const 377 + i32.const 393 i32.const 4 call $~lib/env/abort unreachable @@ -5783,7 +5814,18 @@ unreachable end ) - (func $std/array/createReverseOrderedElementsArray (; 107 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/Proxy#constructor (; 107 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 4 + call $~lib/runtime/doAllocate + i32.const 13 + call $~lib/runtime/doRegister + local.tee $1 + local.get $0 + i32.store + local.get $1 + ) + (func $~lib/array/Array>#constructor (; 108 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5799,31 +5841,56 @@ i32.const 0 i32.store offset=12 local.get $0 + i32.load offset=4 + local.tee $1 + i32.const 2048 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + i32.const 0 + call $std/array/Proxy#constructor + local.tee $3 + local.get $0 + call $~lib/runtime/doRetain + local.get $1 + local.get $3 + i32.store + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + local.get $0 i32.const 512 i32.store offset=12 + local.get $0 + ) + (func $std/array/createReverseOrderedElementsArray (; 109 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/array/Array>#constructor + local.set $0 loop $repeat|0 local.get $1 local.get $0 i32.load offset=12 i32.lt_s if + local.get $0 + local.get $1 local.get $0 i32.load offset=12 - local.set $2 - i32.const 4 - call $~lib/runtime/doAllocate - i32.const 13 - call $~lib/runtime/doRegister - local.tee $3 - local.get $2 i32.const 1 i32.sub local.get $1 i32.sub - i32.store - local.get $0 - local.get $1 - local.get $3 + call $std/array/Proxy#constructor call $~lib/array/Array>#__set local.get $1 i32.const 1 @@ -5834,14 +5901,14 @@ end local.get $0 ) - (func $start:std/array~anonymous|48 (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 110 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/util/string/compareImpl (; 109 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 111 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 @@ -5874,7 +5941,7 @@ end local.get $3 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 110 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 112 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5951,7 +6018,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted|trampoline (; 111 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSorted|trampoline (; 113 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) block $1of1 block $0of1 @@ -5970,7 +6037,7 @@ local.get $1 call $std/array/assertSorted> ) - (func $~lib/string/String.__eq (; 112 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 114 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -6016,7 +6083,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array/isArraysEqual (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 115 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -6063,7 +6130,47 @@ end i32.const 1 ) - (func $~lib/string/String#charAt (; 114 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (; 116 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 14 + call $~lib/runtime/doRegister + i32.const 400 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.load offset=4 + local.tee $0 + i32.const 1600 + i32.add + local.set $2 + loop $continue|0 + local.get $0 + local.get $2 + i32.lt_u + if + local.get $0 + i32.const 4200 + i32.store + local.get $0 + i32.const 4 + i32.add + local.set $0 + br $continue|0 + end + end + local.get $1 + i32.const 400 + i32.store offset=12 + local.get $1 + ) + (func $~lib/string/String#charAt (; 117 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 3020 @@ -6089,7 +6196,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/string/String#concat (; 115 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 118 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6138,7 +6245,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/string/String.__concat (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 119 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 4424 local.get $0 @@ -6146,7 +6253,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 117 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 120 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 4200 @@ -6178,22 +6285,11 @@ end local.get $1 ) - (func $std/array/createRandomStringArray (; 118 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createRandomStringArray (; 121 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) - i32.const 16 - call $~lib/runtime/doAllocate - i32.const 14 - call $~lib/runtime/doRegister - i32.const 400 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.tee $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 400 - i32.store offset=12 + call $~lib/array/Array#constructor + local.set $0 loop $repeat|0 local.get $1 local.get $0 @@ -6217,7 +6313,7 @@ end local.get $0 ) - (func $~lib/string/String#substring (; 119 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 122 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6315,7 +6411,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join_bool (; 120 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_bool (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6467,7 +6563,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/decimalCount32 (; 121 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 124 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -6521,7 +6617,7 @@ end end ) - (func $~lib/util/number/utoa32_lut (; 122 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 125 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) i32.const 5092 @@ -6631,7 +6727,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 126 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6673,7 +6769,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 124 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 127 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6717,7 +6813,7 @@ end local.get $2 ) - (func $~lib/array/Array#join_int (; 125 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6835,12 +6931,12 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int ) - (func $~lib/util/number/utoa32 (; 127 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 130 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -6863,7 +6959,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 128 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6887,7 +6983,7 @@ call $~lib/util/number/utoa32_lut local.get $0 ) - (func $~lib/array/Array#join_int (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7005,12 +7101,12 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join (; 130 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int ) - (func $~lib/util/number/genDigits (; 131 ;) (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 (; 134 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i32) @@ -7421,7 +7517,7 @@ local.get $2 end ) - (func $~lib/util/number/prettify (; 132 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 135 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7683,7 +7779,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 133 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 136 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -7994,7 +8090,7 @@ local.get $11 i32.add ) - (func $~lib/util/number/dtoa (; 134 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 137 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -8039,7 +8135,7 @@ call $~lib/runtime/assertUnregistered local.get $1 ) - (func $~lib/util/number/dtoa_stream (; 135 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 138 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) local.get $1 i32.const 1 i32.shl @@ -8108,7 +8204,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join_flt (; 136 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_flt (; 139 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8224,7 +8320,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join_str (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_str (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8391,18 +8487,18 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_str ) - (func $std/array/Ref#constructor (; 139 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/Ref#constructor (; 142 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/doAllocate i32.const 18 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join_ref (; 140 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_ref (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8535,12 +8631,12 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#toString (; 141 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 144 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa_stream (; 142 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 145 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -8595,7 +8691,7 @@ end local.get $1 ) - (func $~lib/array/Array#join_int (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 146 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8707,7 +8803,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 144 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 147 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -8737,7 +8833,7 @@ call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join_int (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 148 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8853,7 +8949,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/decimalCount64 (; 146 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 149 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -8907,7 +9003,7 @@ end end ) - (func $~lib/util/number/utoa64_lut (; 147 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 150 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9004,7 +9100,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 148 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 151 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9046,7 +9142,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 149 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 152 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -9086,7 +9182,7 @@ end local.get $1 ) - (func $~lib/array/Array#join_int (; 150 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 153 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9202,7 +9298,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa64 (; 151 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 154 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9267,7 +9363,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 152 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 155 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -9330,7 +9426,7 @@ end local.get $1 ) - (func $~lib/array/Array#join_int (; 153 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9446,12 +9542,12 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#toString (; 154 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array>#join_arr (; 155 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 158 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9544,7 +9640,64 @@ local.get $1 end ) - (func $~lib/util/number/itoa_stream (; 156 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array>#constructor (; 159 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 23 + call $~lib/runtime/doRegister + i32.const 2 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const 8 + i32.add + local.set $3 + loop $continue|0 + local.get $1 + local.get $3 + i32.lt_u + if + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 7 + call $~lib/runtime/doRegister + i32.const 0 + i32.const 0 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $0 + call $~lib/runtime/doRetain + local.get $1 + local.get $2 + i32.store + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + local.get $0 + i32.const 2 + i32.store offset=12 + local.get $0 + ) + (func $~lib/util/number/itoa_stream (; 160 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -9574,7 +9727,7 @@ call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join_int (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 161 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9686,7 +9839,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array>#join_arr (; 158 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9776,7 +9929,112 @@ local.get $1 end ) - (func $~lib/array/Array>#join_arr (; 159 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#constructor (; 163 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 24 + call $~lib/runtime/doRegister + local.get $0 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.load offset=4 + local.tee $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.set $4 + loop $continue|0 + local.get $2 + local.get $4 + i32.lt_u + if + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 8 + call $~lib/runtime/doRegister + i32.const 0 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $3 + i32.const 0 + i32.store offset=12 + local.get $3 + i32.const 0 + i32.store offset=12 + local.get $3 + local.get $1 + call $~lib/runtime/doRetain + local.get $2 + local.get $3 + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $continue|0 + end + end + local.get $1 + local.get $0 + i32.store offset=12 + local.get $1 + ) + (func $~lib/array/Array>>#constructor (; 164 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 25 + call $~lib/runtime/doRegister + i32.const 1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const 4 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + i32.const 0 + call $~lib/array/Array>#constructor + local.tee $3 + local.get $0 + call $~lib/runtime/doRetain + local.get $1 + local.get $3 + i32.store + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + local.get $0 + i32.const 1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/array/Array>#join_arr (; 165 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9869,7 +10127,7 @@ local.get $1 end ) - (func $~lib/array/Array>>#join_arr (; 160 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>>#join_arr (; 166 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9959,7 +10217,7 @@ local.get $1 end ) - (func $start:std/array (; 161 ;) (type $FUNCSIG$v) + (func $start:std/array (; 167 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14158,20 +14416,8 @@ call $~lib/env/abort unreachable end - i32.const 16 - call $~lib/runtime/doAllocate - i32.const 23 - call $~lib/runtime/doRegister - i32.const 2 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/array/Array>#constructor local.tee $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 2 - i32.store offset=12 - local.get $0 i32.load offset=4 local.set $2 i32.const 7936 @@ -14209,36 +14455,13 @@ call $~lib/env/abort unreachable end - i32.const 16 - call $~lib/runtime/doAllocate - i32.const 25 - call $~lib/runtime/doRegister - i32.const 1 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/array/Array>>#constructor local.tee $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 1 - i32.store offset=12 - local.get $0 i32.load offset=4 local.set $2 - i32.const 16 - call $~lib/runtime/doAllocate - i32.const 24 - call $~lib/runtime/doRegister i32.const 1 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/array/Array>#constructor local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 1 - i32.store offset=12 - local.get $1 i32.load offset=4 local.set $3 i32.const 8056 @@ -14273,7 +14496,7 @@ unreachable end ) - (func $std/array/main (; 162 ;) (type $FUNCSIG$v) + (func $std/array/main (; 168 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -14282,7 +14505,7 @@ global.set $~lib/started end ) - (func $null (; 163 ;) (type $FUNCSIG$v) + (func $null (; 169 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array.ts b/tests/compiler/std/array.ts index b1d2653b7f..7e272f7e47 100644 --- a/tests/compiler/std/array.ts +++ b/tests/compiler/std/array.ts @@ -779,7 +779,7 @@ function createReverseOrderedNestedArray(size: i32): Array> { } class Proxy { - constructor(public x: T) {} + constructor(public x: T = 0) {} } function createReverseOrderedElementsArray(size: i32): Proxy[] { diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index aeb7260b17..97abb0647d 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -2564,7 +2564,7 @@ if i32.const 0 i32.const 272 - i32.const 69 + i32.const 85 i32.const 61 call $~lib/env/abort unreachable @@ -2732,7 +2732,7 @@ if i32.const 0 i32.const 272 - i32.const 69 + i32.const 85 i32.const 61 call $~lib/env/abort unreachable @@ -3023,7 +3023,7 @@ if i32.const 0 i32.const 272 - i32.const 69 + i32.const 85 i32.const 61 call $~lib/env/abort unreachable @@ -3048,7 +3048,7 @@ if i32.const 0 i32.const 272 - i32.const 204 + i32.const 220 i32.const 20 call $~lib/env/abort unreachable @@ -3407,7 +3407,7 @@ if i32.const 0 i32.const 272 - i32.const 265 + i32.const 281 i32.const 20 call $~lib/env/abort unreachable @@ -4337,7 +4337,7 @@ if i32.const 0 i32.const 272 - i32.const 69 + i32.const 85 i32.const 61 call $~lib/env/abort unreachable @@ -5379,7 +5379,7 @@ if i32.const 0 i32.const 272 - i32.const 377 + i32.const 393 i32.const 4 call $~lib/env/abort unreachable @@ -5989,7 +5989,7 @@ if i32.const 0 i32.const 272 - i32.const 377 + i32.const 393 i32.const 4 call $~lib/env/abort unreachable @@ -6128,7 +6128,7 @@ if i32.const 0 i32.const 272 - i32.const 69 + i32.const 85 i32.const 61 call $~lib/env/abort unreachable @@ -6624,7 +6624,7 @@ if i32.const 0 i32.const 272 - i32.const 377 + i32.const 393 i32.const 4 call $~lib/env/abort unreachable @@ -7128,7 +7128,7 @@ if i32.const 0 i32.const 272 - i32.const 377 + i32.const 393 i32.const 4 call $~lib/env/abort unreachable @@ -7459,6 +7459,9 @@ ) (func $~lib/array/Array>#constructor (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 if (result i32) local.get $0 @@ -7482,6 +7485,45 @@ i32.const 0 i32.store offset=12 local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) + i32.const 0 + i32.const 0 + call $~lib/array/Array#constructor + local.set $5 + local.get $0 + local.set $4 + local.get $5 + local.get $4 + call $~lib/runtime/doRetain + local.get $5 + end + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + end + br $continue|0 + end + end + end + local.get $0 local.get $1 i32.store offset=12 local.get $0 @@ -7542,7 +7584,7 @@ end end local.get $3 - block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) + block $~lib/runtime/RETAIN,Array>>|inlined.1 (result i32) local.get $2 local.set $6 local.get $0 @@ -7576,7 +7618,7 @@ if i32.const 0 i32.const 272 - i32.const 69 + i32.const 85 i32.const 61 call $~lib/env/abort unreachable @@ -7752,7 +7794,7 @@ if i32.const 0 i32.const 272 - i32.const 377 + i32.const 393 i32.const 4 call $~lib/env/abort unreachable @@ -7879,8 +7921,35 @@ unreachable end ) - (func $~lib/array/Array>#constructor (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/Proxy#constructor (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.eqz + if + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + block $~lib/runtime/ALLOCATE|inlined.8 (result i32) + i32.const 4 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end + local.set $2 + local.get $2 + i32.const 13 + call $~lib/runtime/doRegister + end + local.set $0 + end + local.get $0 + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/array/Array>#constructor (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 if (result i32) local.get $0 @@ -7904,38 +7973,53 @@ i32.const 0 i32.store offset=12 local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 local.get $1 - i32.store offset=12 - local.get $0 - ) - (func $~lib/array/Array>#get:length (; 163 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=12 - ) - (func $std/array/Proxy#constructor (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - i32.eqz - if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.8 (result i32) - i32.const 4 - local.set $2 - local.get $2 - call $~lib/runtime/doAllocate - end - local.set $2 + i32.const 2 + i32.shl + i32.add + local.set $3 + block $break|0 + loop $continue|0 local.get $2 - i32.const 13 - call $~lib/runtime/doRegister + local.get $3 + i32.lt_u + if + block + local.get $2 + block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) + i32.const 0 + i32.const 0 + call $std/array/Proxy#constructor + local.set $5 + local.get $0 + local.set $4 + local.get $5 + local.get $4 + call $~lib/runtime/doRetain + local.get $5 + end + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + end + br $continue|0 + end end - local.set $0 end local.get $0 local.get $1 - i32.store + i32.store offset=12 local.get $0 ) + (func $~lib/array/Array>#get:length (; 164 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) (func $~lib/array/Array>#__set (; 165 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -7976,7 +8060,7 @@ end end local.get $3 - block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) + block $~lib/runtime/RETAIN,Array>>|inlined.1 (result i32) local.get $2 local.set $6 local.get $0 @@ -8153,7 +8237,7 @@ if i32.const 0 i32.const 272 - i32.const 377 + i32.const 393 i32.const 4 call $~lib/env/abort unreachable @@ -8226,7 +8310,7 @@ if i32.const 0 i32.const 272 - i32.const 69 + i32.const 85 i32.const 61 call $~lib/env/abort unreachable @@ -8410,7 +8494,7 @@ if i32.const 0 i32.const 272 - i32.const 377 + i32.const 393 i32.const 4 call $~lib/env/abort unreachable @@ -8487,7 +8571,7 @@ if i32.const 0 i32.const 272 - i32.const 69 + i32.const 85 i32.const 61 call $~lib/env/abort unreachable @@ -8826,6 +8910,7 @@ ) (func $~lib/array/Array#constructor (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $0 if (result i32) local.get $0 @@ -8849,6 +8934,34 @@ i32.const 0 i32.store offset=12 local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + i32.const 4200 + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + end + br $continue|0 + end + end + end + local.get $0 local.get $1 i32.store offset=12 local.get $0 @@ -13656,9 +13769,41 @@ i32.const 4528 call $~lib/array/Array>#join ) - (func $~lib/array/Array>#constructor (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 + if (result i32) + local.get $0 + else + block $~lib/runtime/ALLOCATE|inlined.33 (result i32) + i32.const 16 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end + local.set $2 + local.get $2 + i32.const 7 + call $~lib/runtime/doRegister + end + local.get $1 + i32.const 0 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/array/Array>#constructor (; 253 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 if (result i32) local.get $0 else @@ -13681,18 +13826,57 @@ i32.const 0 i32.store offset=12 local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) + i32.const 0 + i32.const 0 + call $~lib/array/Array#constructor + local.set $5 + local.get $0 + local.set $4 + local.get $5 + local.get $4 + call $~lib/runtime/doRetain + local.get $5 + end + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + end + br $continue|0 + end + end + end + local.get $0 local.get $1 i32.store offset=12 local.get $0 ) - (func $~lib/util/number/itoa (; 253 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 254 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 254 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 255 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13737,7 +13921,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13781,7 +13965,7 @@ i32.const 10 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.33 (result i32) + block $~lib/runtime/ALLOCATE|inlined.34 (result i32) local.get $5 i32.const 1 i32.shl @@ -13883,13 +14067,13 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array>#join_arr (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13993,24 +14177,24 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>#toString (; 259 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#toString (; 260 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array>#join ) - (func $~lib/array/Array>#constructor (; 260 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 261 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) local.get $0 else - block $~lib/runtime/ALLOCATE|inlined.34 (result i32) + block $~lib/runtime/ALLOCATE|inlined.36 (result i32) i32.const 16 local.set $2 local.get $2 @@ -14018,7 +14202,7 @@ end local.set $2 local.get $2 - i32.const 24 + i32.const 8 call $~lib/runtime/doRegister end local.get $1 @@ -14033,8 +14217,11 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>>#constructor (; 261 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 if (result i32) local.get $0 @@ -14047,6 +14234,77 @@ end local.set $2 local.get $2 + i32.const 24 + call $~lib/runtime/doRegister + end + local.get $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) + i32.const 0 + i32.const 0 + call $~lib/array/Array#constructor + local.set $5 + local.get $0 + local.set $4 + local.get $5 + local.get $4 + call $~lib/runtime/doRetain + local.get $5 + end + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + end + br $continue|0 + end + end + end + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/array/Array>>#constructor (; 263 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + if (result i32) + local.get $0 + else + block $~lib/runtime/ALLOCATE|inlined.37 (result i32) + i32.const 16 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end + local.set $2 + local.get $2 i32.const 25 call $~lib/runtime/doRegister end @@ -14058,11 +14316,50 @@ i32.const 0 i32.store offset=12 local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + block $~lib/runtime/RETAIN>,Array>>>|inlined.0 (result i32) + i32.const 0 + i32.const 0 + call $~lib/array/Array>#constructor + local.set $5 + local.get $0 + local.set $4 + local.get $5 + local.get $4 + call $~lib/runtime/doRetain + local.get $5 + end + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + end + br $continue|0 + end + end + end + local.get $0 local.get $1 i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>#join_arr (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 264 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14166,13 +14463,13 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 263 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 265 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>>#join_arr (; 264 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#join_arr (; 266 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14276,18 +14573,18 @@ end local.get $3 ) - (func $~lib/array/Array>>#join (; 265 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#join (; 267 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>>#join_arr return ) - (func $~lib/array/Array>>#toString (; 266 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>>#toString (; 268 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array>>#join ) - (func $start:std/array (; 267 ;) (type $FUNCSIG$v) + (func $start:std/array (; 269 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -19023,7 +19320,7 @@ i32.load offset=4 local.set $0 local.get $0 - block $~lib/runtime/RETAIN,Array>>|inlined.1 (result i32) + block $~lib/runtime/RETAIN,Array>>|inlined.2 (result i32) block $~lib/runtime/WRAPARRAY|inlined.71 (result i32) i32.const 7832 local.set $2 @@ -19040,7 +19337,7 @@ end i32.store local.get $0 - block $~lib/runtime/RETAIN,Array>>|inlined.2 (result i32) + block $~lib/runtime/RETAIN,Array>>|inlined.3 (result i32) block $~lib/runtime/WRAPARRAY|inlined.72 (result i32) i32.const 7856 local.set $2 @@ -19081,7 +19378,7 @@ i32.load offset=4 local.set $1 local.get $1 - block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) + block $~lib/runtime/RETAIN,Array>>|inlined.1 (result i32) block $~lib/runtime/WRAPARRAY|inlined.6 (result i32) i32.const 7936 local.set $2 @@ -19098,7 +19395,7 @@ end i32.store local.get $1 - block $~lib/runtime/RETAIN,Array>>|inlined.1 (result i32) + block $~lib/runtime/RETAIN,Array>>|inlined.2 (result i32) block $~lib/runtime/WRAPARRAY|inlined.7 (result i32) i32.const 7960 local.set $2 @@ -19139,7 +19436,7 @@ i32.load offset=4 local.set $1 local.get $1 - block $~lib/runtime/RETAIN>,Array>>>|inlined.0 (result i32) + block $~lib/runtime/RETAIN>,Array>>>|inlined.1 (result i32) block (result i32) i32.const 0 i32.const 1 @@ -19149,7 +19446,7 @@ i32.load offset=4 local.set $3 local.get $3 - block $~lib/runtime/RETAIN,Array>>|inlined.1 (result i32) + block $~lib/runtime/RETAIN,Array>>|inlined.2 (result i32) block $~lib/runtime/WRAPARRAY|inlined.11 (result i32) i32.const 8056 local.set $4 @@ -19191,7 +19488,7 @@ unreachable end ) - (func $std/array/main (; 268 ;) (type $FUNCSIG$v) + (func $std/array/main (; 270 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -19200,9 +19497,9 @@ global.set $~lib/started end ) - (func $start (; 269 ;) (type $FUNCSIG$v) + (func $start (; 271 ;) (type $FUNCSIG$v) call $start:std/array ) - (func $null (; 270 ;) (type $FUNCSIG$v) + (func $null (; 272 ;) (type $FUNCSIG$v) ) ) From c2ac1a03756a00e29ddf2f4f8120960048e60fb7 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 21 Mar 2019 22:46:10 +0100 Subject: [PATCH 064/119] what if.. --- std/assembly/array.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 2ef05f709c..ce13b79a0c 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -32,22 +32,22 @@ export class Array extends ArrayBufferView { return builtin_isArray(value) && value !== null; } + static create(capacity: i32): Array { + if (capacity > MAX_BYTELENGTH >>> alignof()) throw new RangeError("Invalid length"); + var buffer = new ArrayBuffer(capacity = capacity << alignof()); + var out = REGISTER>(ALLOCATE(offsetof>())); + out.data = buffer; // links + out.dataStart = changetype(buffer); + out.dataLength = capacity; + out.length_ = 0; + return out; + } + constructor(length: i32 = 0) { super(length, alignof()); if (isReference()) { if (!isNullable()) { - let cur = this.dataStart; - let end = cur + (length << alignof()); - while (cur < end) { - // TODO: probably a common reason for complaints of T not having a default ctor. what if - // the array ctor would also take default arguments, like `new Array(10, ...args)`? - store(cur, - isString() - ? "" // no need to instantiate - : RETAIN(instantiate(), this) - ); - cur += sizeof(); - } + if (length) throw new Error("T must be nullable if length > 0"); } } this.length_ = length; From 7c0dc6684929b8acf6f8510896607feed8a57f81 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 22 Mar 2019 15:43:07 +0100 Subject: [PATCH 065/119] guard, info on never null, more general array rt --- src/common.ts | 2 +- src/compiler.ts | 41 +- src/diagnosticMessages.generated.ts | 2 + src/diagnosticMessages.json | 1 + src/program.ts | 8 +- std/assembly/array.ts | 69 +- std/assembly/arraybuffer.ts | 3 +- std/assembly/dataview.ts | 49 +- std/assembly/fixedarray.ts | 12 +- std/assembly/index.d.ts | 5 +- std/assembly/runtime.ts | 160 +- std/assembly/string.ts | 17 +- std/assembly/typedarray.ts | 45 +- std/assembly/util/error.ts | 18 + std/portable/index.d.ts | 1 + std/portable/index.js | 8 +- tests/compiler/call-super.optimized.wat | 4 +- tests/compiler/call-super.untouched.wat | 4 +- tests/compiler/constructor.optimized.wat | 4 +- tests/compiler/constructor.untouched.wat | 4 +- tests/compiler/exports.optimized.wat | 4 +- tests/compiler/exports.untouched.wat | 4 +- tests/compiler/getter-call.optimized.wat | 4 +- tests/compiler/getter-call.untouched.wat | 4 +- tests/compiler/inlining.optimized.wat | 4 +- tests/compiler/inlining.untouched.wat | 4 +- .../new-without-allocator.untouched.wat | 4 +- tests/compiler/nonNullAssertion.optimized.wat | 145 +- tests/compiler/nonNullAssertion.ts | 2 +- tests/compiler/nonNullAssertion.untouched.wat | 136 +- tests/compiler/number.optimized.wat | 6 +- tests/compiler/number.untouched.wat | 6 +- tests/compiler/object-literal.optimized.wat | 4 +- tests/compiler/object-literal.untouched.wat | 4 +- .../optional-typeparameters.optimized.wat | 4 +- .../optional-typeparameters.untouched.wat | 4 +- tests/compiler/std/array-access.optimized.wat | 56 +- tests/compiler/std/array-access.untouched.wat | 46 +- .../compiler/std/array-literal.optimized.wat | 360 +-- .../compiler/std/array-literal.untouched.wat | 2013 ++++++++++--- tests/compiler/std/array.optimized.wat | 1340 ++++----- tests/compiler/std/array.ts | 33 +- tests/compiler/std/array.untouched.wat | 2614 +++++++++-------- tests/compiler/std/arraybuffer.optimized.wat | 44 +- tests/compiler/std/arraybuffer.untouched.wat | 77 +- tests/compiler/std/dataview.optimized.wat | 75 +- tests/compiler/std/dataview.untouched.wat | 63 +- tests/compiler/std/date.optimized.wat | 4 +- tests/compiler/std/date.untouched.wat | 4 +- tests/compiler/std/map.optimized.wat | 6 +- tests/compiler/std/map.untouched.wat | 6 +- tests/compiler/std/new.optimized.wat | 4 +- tests/compiler/std/new.untouched.wat | 4 +- .../std/operator-overloading.optimized.wat | 4 +- .../std/operator-overloading.untouched.wat | 4 +- tests/compiler/std/runtime.optimized.wat | 6 +- tests/compiler/std/runtime.untouched.wat | 6 +- tests/compiler/std/set.optimized.wat | 6 +- tests/compiler/std/set.untouched.wat | 6 +- tests/compiler/std/static-array.optimized.wat | 38 +- tests/compiler/std/static-array.untouched.wat | 40 +- tests/compiler/std/string-utf8.optimized.wat | 12 +- tests/compiler/std/string-utf8.untouched.wat | 12 +- tests/compiler/std/string.optimized.wat | 972 +++--- tests/compiler/std/string.untouched.wat | 869 +++--- tests/compiler/std/symbol.optimized.wat | 6 +- tests/compiler/std/symbol.untouched.wat | 6 +- tests/compiler/std/typedarray.optimized.wat | 137 +- tests/compiler/std/typedarray.untouched.wat | 873 +++--- 69 files changed, 5839 insertions(+), 4703 deletions(-) create mode 100644 std/assembly/util/error.ts diff --git a/src/common.ts b/src/common.ts index dc38a71dee..97eaf2c315 100644 --- a/src/common.ts +++ b/src/common.ts @@ -189,7 +189,7 @@ export namespace LibrarySymbols { export const REGISTER = "REGISTER"; export const RETAIN = "RETAIN"; export const RELEASE = "RELEASE"; - export const WRAPARRAY = "WRAPARRAY"; + export const MAKEARRAY = "MAKEARRAY"; // other export const length = "length"; export const byteLength = "byteLength"; diff --git a/src/compiler.ts b/src/compiler.ts index 17ec7670e3..8450e877f0 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -2689,10 +2689,11 @@ export class Compiler extends DiagnosticEmitter { switch (expression.assertionKind) { case AssertionKind.PREFIX: case AssertionKind.AS: { + let flow = this.currentFlow; let toType = this.resolver.resolveType( // reports assert(expression.toType), - this.currentFlow.actualFunction, - this.currentFlow.contextualTypeArguments + flow.actualFunction, + flow.contextualTypeArguments ); if (!toType) return this.module.createUnreachable(); return this.compileExpression(expression.expression, toType, ConversionKind.EXPLICIT, WrapMode.NONE); @@ -2700,6 +2701,22 @@ export class Compiler extends DiagnosticEmitter { case AssertionKind.NONNULL: { assert(!expression.toType); let expr = this.compileExpressionRetainType(expression.expression, contextualType, WrapMode.NONE); + let type = this.currentType; + if (!type.is(TypeFlags.NULLABLE | TypeFlags.REFERENCE)) { + this.info( + DiagnosticCode.Expression_is_never_null, + expression.expression.range + ); + } else if (!this.options.noAssert) { + let module = this.module; + let flow = this.currentFlow; + let tempIndex = flow.getAndFreeTempLocal(type, !flow.canOverflow(expr, type)).index; + expr = module.createIf( + module.createTeeLocal(tempIndex, expr), + module.createGetLocal(tempIndex, type.toNativeType()), + module.createUnreachable() + ); + } this.currentType = this.currentType.nonNullableType; return expr; } @@ -6741,13 +6758,13 @@ export class Compiler extends DiagnosticEmitter { // otherwise allocate a new array header and make it wrap a copy of the static buffer } else { - let wrapArrayPrototype = assert(program.wrapArrayPrototype); - let wrapArrayInstance = this.resolver.resolveFunction(wrapArrayPrototype, [ elementType ]); - if (!wrapArrayInstance) { + let makeArrayInstance = this.resolver.resolveFunction(assert(program.makeArrayPrototype), [ elementType ]); + if (!makeArrayInstance) { this.currentType = arrayType; return module.createUnreachable(); } - let body = this.makeCallInlinePrechecked(wrapArrayInstance, [ + let body = this.makeCallInlinePrechecked(makeArrayInstance, [ + this.module.createI32(length), program.options.isWasm64 ? this.module.createI64(i64_low(bufferAddress), i64_high(bufferAddress)) : this.module.createI32(i64_low(bufferAddress)) @@ -6771,14 +6788,18 @@ export class Compiler extends DiagnosticEmitter { var flow = this.currentFlow; var tempThis = flow.getTempLocal(arrayType, false); var tempDataStart = flow.getTempLocal(arrayBufferInstance.type); + var makeArrayInstance = this.resolver.resolveFunction(assert(program.makeArrayPrototype), [ elementType ]); + if (!makeArrayInstance) { + this.currentType = arrayType; + return module.createUnreachable(); + } var stmts = new Array(); - // tempThis = new Array(length) + // tempThis = MAKEARRAY(length) stmts.push( module.createSetLocal(tempThis.index, - this.makeCallDirect(assert(arrayInstance.constructorInstance), [ - module.createI32(0), // this + this.makeCallInlinePrechecked(makeArrayInstance, [ module.createI32(length) - ], reportNode) + ], 0, true), ) ); // tempData = tempThis.dataStart diff --git a/src/diagnosticMessages.generated.ts b/src/diagnosticMessages.generated.ts index b77cfa3f83..9fc1e2e429 100644 --- a/src/diagnosticMessages.generated.ts +++ b/src/diagnosticMessages.generated.ts @@ -35,6 +35,7 @@ export enum DiagnosticCode { _0_must_be_a_value_between_1_and_2_inclusive = 222, _0_must_be_a_power_of_two = 223, TODO_Cannot_inline_inferred_calls_and_specific_internals_yet = 224, + Expression_is_never_null = 225, Unterminated_string_literal = 1002, Identifier_expected = 1003, _0_expected = 1005, @@ -171,6 +172,7 @@ export function diagnosticCodeToString(code: DiagnosticCode): string { case 222: return "'{0}' must be a value between '{1}' and '{2}' inclusive."; case 223: return "'{0}' must be a power of two."; case 224: return "TODO: Cannot inline inferred calls and specific internals yet."; + case 225: return "Expression is never 'null'."; case 1002: return "Unterminated string literal."; case 1003: return "Identifier expected."; case 1005: return "'{0}' expected."; diff --git a/src/diagnosticMessages.json b/src/diagnosticMessages.json index 44b5a36330..906e67129c 100644 --- a/src/diagnosticMessages.json +++ b/src/diagnosticMessages.json @@ -27,6 +27,7 @@ "'{0}' must be a value between '{1}' and '{2}' inclusive.": 222, "'{0}' must be a power of two.": 223, "TODO: Cannot inline inferred calls and specific internals yet.": 224, + "Expression is never 'null'.": 225, "Unterminated string literal.": 1002, "Identifier expected.": 1003, diff --git a/src/program.ts b/src/program.ts index 809995c6ae..3306dc87a7 100644 --- a/src/program.ts +++ b/src/program.ts @@ -368,8 +368,8 @@ export class Program extends DiagnosticEmitter { retainPrototype: FunctionPrototype | null = null; /** Runtime release function. */ releasePrototype: FunctionPrototype | null = null; - /** Runtime wrap array function. */ - wrapArrayPrototype: FunctionPrototype | null = null; + /** Runtime make array function. */ + makeArrayPrototype: FunctionPrototype | null = null; /** Next class id. */ nextClassId: u32 = 1; @@ -838,9 +838,9 @@ export class Program extends DiagnosticEmitter { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.releasePrototype = element; } - if (element = this.lookupGlobal(LibrarySymbols.WRAPARRAY)) { + if (element = this.lookupGlobal(LibrarySymbols.MAKEARRAY)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); - this.wrapArrayPrototype = element; + this.makeArrayPrototype = element; } } diff --git a/std/assembly/array.ts b/std/assembly/array.ts index ce13b79a0c..6188ce1aa9 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -1,13 +1,17 @@ -import { ALLOCATE, REALLOCATE, DISCARD, RETAIN, RELEASE, REGISTER, MAX_BYTELENGTH, ArrayBufferView, MOVE } from "./runtime"; +import { + ALLOCATE, REALLOCATE, DISCARD, RETAIN, RELEASE, REGISTER, MAX_BYTELENGTH, MOVE, MAKEARRAY, + ArrayBufferView +} from "./runtime"; import { ArrayBuffer } from "./arraybuffer"; import { COMPARATOR, SORT } from "./util/sort"; import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number"; import { isArray as builtin_isArray } from "./builtins"; +import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_EMPTYARRAY, E_HOLEYARRAY } from "./util/error"; /** Ensures that the given array has _at least_ the specified capacity. */ function ensureCapacity(array: ArrayBufferView, minCapacity: i32, alignLog2: u32): void { if (minCapacity > array.dataLength >>> alignLog2) { - if (minCapacity > (MAX_BYTELENGTH >>> alignLog2)) throw new RangeError("Invalid array length"); + if (minCapacity > (MAX_BYTELENGTH >>> alignLog2)) throw new RangeError(E_INVALIDLENGTH); let oldData = array.data; let newByteLength = minCapacity << alignLog2; let newData = REALLOCATE(changetype(oldData), newByteLength); // registers on move @@ -26,28 +30,29 @@ export class Array extends ArrayBufferView { // to work with typed and normal arrays interchangeably. Technically, normal arrays do not need // `dataStart` (equals `data`) and `dataLength` (equals computed `data.byteLength`). + // Also note that Array with non-nullable T must guard against implicit null values whenever + // length is modified in a way that a null value would exist. Otherwise, the compiler wouldn't be + // able to guarantee type-safety anymore. For lack of a better word, such an array is "holey". + private length_: i32; static isArray(value: U): bool { return builtin_isArray(value) && value !== null; } - static create(capacity: i32): Array { - if (capacity > MAX_BYTELENGTH >>> alignof()) throw new RangeError("Invalid length"); - var buffer = new ArrayBuffer(capacity = capacity << alignof()); - var out = REGISTER>(ALLOCATE(offsetof>())); - out.data = buffer; // links - out.dataStart = changetype(buffer); - out.dataLength = capacity; - out.length_ = 0; - return out; + static create(capacity: i32 = 0): Array { + if (capacity > MAX_BYTELENGTH >>> alignof()) throw new RangeError(E_INVALIDLENGTH); + var array = MAKEARRAY(capacity); + memory.fill(array.dataStart, 0, array.dataLength); + array.length_ = 0; // ! + return array; } constructor(length: i32 = 0) { super(length, alignof()); if (isReference()) { if (!isNullable()) { - if (length) throw new Error("T must be nullable if length > 0"); + if (length) throw new Error(E_HOLEYARRAY); } } this.length_ = length; @@ -62,6 +67,11 @@ export class Array extends ArrayBufferView { } set length(length: i32) { + if (isReference()) { + if (!isNullable()) { + if (length > this.length_) throw new Error(E_HOLEYARRAY); + } + } ensureCapacity(this, length, alignof()); this.length_ = length; } @@ -82,24 +92,39 @@ export class Array extends ArrayBufferView { @operator("[]") // unchecked is built-in private __get(index: i32): T { - if (index >= this.dataLength >>> alignof()) throw new RangeError("Offset out of bounds"); + if (isReference()) { + if (!isNullable()) { + if (index >= this.length_) throw new Error(E_HOLEYARRAY); + } + } + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); return load(this.dataStart + (index << alignof())); } @operator("[]=") // unchecked is built-in private __set(index: i32, value: T): void { + var length = this.length_; + if (isReference()) { + if (!isNullable()) { + if (index > length) throw new Error(E_HOLEYARRAY); + } + } ensureCapacity(this, index + 1, alignof()); if (isManaged()) { let offset = this.dataStart + (index << alignof()); let oldValue = load(offset); if (value !== oldValue) { - RELEASE(oldValue, this); + if (isNullable()) { + RELEASE(oldValue, this); // handles != null + } else if (oldValue !== null) { + RELEASE(oldValue, this); // requires != null + } store(offset, RETAIN(value, this)); } } else { store(this.dataStart + (index << alignof()), value); } - if (index >= this.length_) this.length_ = index + 1; + if (index >= length) this.length_ = index + 1; } fill(value: T, start: i32 = 0, end: i32 = i32.MAX_VALUE): this { @@ -167,7 +192,7 @@ export class Array extends ArrayBufferView { concat(other: Array): Array { var thisLen = this.length_; var otherLen = select(0, other.length_, other === null); - var out = new Array(thisLen + otherLen); + var out = MAKEARRAY(thisLen + otherLen); var outStart = out.dataStart; var thisSize = thisLen << alignof(); if (isManaged()) { @@ -217,7 +242,7 @@ export class Array extends ArrayBufferView { pop(): T { var length = this.length_; - if (length < 1) throw new RangeError("Array is empty"); + if (length < 1) throw new RangeError(E_EMPTYARRAY); var element = load(this.dataStart + ((--length) << alignof())); this.length_ = length; return element; @@ -231,7 +256,7 @@ export class Array extends ArrayBufferView { map(callbackfn: (value: T, index: i32, array: Array) => U): Array { var length = this.length_; - var out = new Array(length); + var out = MAKEARRAY(length); var outStart = out.dataStart; for (let index = 0; index < min(length, this.length_); ++index) { let value = load(this.dataStart + (index << alignof())); @@ -246,7 +271,7 @@ export class Array extends ArrayBufferView { } filter(callbackfn: (value: T, index: i32, array: Array) => bool): Array { - var result = new Array(); + var result = MAKEARRAY(0); for (let index = 0, length = this.length_; index < min(length, this.length_); ++index) { let value = load(this.dataStart + (index << alignof())); if (callbackfn(value, index, this)) result.push(value); @@ -278,7 +303,7 @@ export class Array extends ArrayBufferView { shift(): T { var length = this.length_; - if (length < 1) throw new RangeError("Array is empty"); + if (length < 1) throw new RangeError(E_EMPTYARRAY); var base = this.dataStart; var element = load(base); var lastIndex = length - 1; @@ -325,7 +350,7 @@ export class Array extends ArrayBufferView { begin = begin < 0 ? max(begin + length, 0) : min(begin, length); end = end < 0 ? max(end + length, 0) : min(end , length); length = max(end - begin, 0); - var slice = new Array(length); + var slice = MAKEARRAY(length); var sliceBase = slice.dataStart; var thisBase = this.dataStart + (begin << alignof()); for (let i = 0; i < length; ++i) { @@ -344,7 +369,7 @@ export class Array extends ArrayBufferView { var length = this.length_; start = start < 0 ? max(length + start, 0) : min(start, length); deleteCount = max(min(deleteCount, length - start), 0); - var result = new Array(deleteCount); + var result = MAKEARRAY(deleteCount); var resultStart = result.dataStart; var thisStart = this.dataStart; var thisBase = thisStart + (start << alignof()); diff --git a/std/assembly/arraybuffer.ts b/std/assembly/arraybuffer.ts index a24247f28a..2461cdd882 100644 --- a/std/assembly/arraybuffer.ts +++ b/std/assembly/arraybuffer.ts @@ -1,4 +1,5 @@ import { ALLOCATE, REGISTER, HEADER, HEADER_SIZE, MAX_BYTELENGTH } from "./runtime"; +import { E_INVALIDLENGTH } from "./util/error"; @sealed export class ArrayBuffer { @@ -21,7 +22,7 @@ import { ALLOCATE, REGISTER, HEADER, HEADER_SIZE, MAX_BYTELENGTH } from "./runti } constructor(length: i32) { - if (length > MAX_BYTELENGTH) throw new RangeError("Invalid array buffer length"); + if (length > MAX_BYTELENGTH) throw new RangeError(E_INVALIDLENGTH); var buffer = ALLOCATE(length); memory.fill(changetype(buffer), 0, length); return REGISTER(buffer); diff --git a/std/assembly/dataview.ts b/std/assembly/dataview.ts index 3c842854b1..0e285c465c 100644 --- a/std/assembly/dataview.ts +++ b/std/assembly/dataview.ts @@ -1,5 +1,6 @@ import { MAX_BYTELENGTH } from "./runtime"; import { ArrayBuffer } from "./arraybuffer"; +import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH } from "./util/error"; // TODO: there is probably a smarter way to check byteOffset for accesses larger than 1 byte @@ -12,11 +13,13 @@ export class DataView { constructor( buffer: ArrayBuffer, byteOffset: i32 = 0, - byteLength: i32 = i32.MIN_VALUE // FIXME + byteLength: i32 = i32.MIN_VALUE // FIXME: TS2304: Cannot find name 'buffer'. ) { if (byteLength === i32.MIN_VALUE) byteLength = buffer.byteLength - byteOffset; // FIXME - if (byteLength > MAX_BYTELENGTH) throw new RangeError("Invalid byteLength"); - if (byteOffset + byteLength > buffer.byteLength) throw new RangeError("Invalid length"); + if ( + i32(byteLength > MAX_BYTELENGTH) | + i32(byteOffset + byteLength > buffer.byteLength) + ) throw new RangeError(E_INVALIDLENGTH); this.data = buffer; // links var dataStart = changetype(buffer) + byteOffset; this.dataStart = dataStart; @@ -39,7 +42,7 @@ export class DataView { if ( i32(byteOffset < 0) | i32(byteOffset + 4 > this.dataLength) - ) throw new Error("Offset out of bounds"); + ) throw new RangeError(E_INDEXOUTOFRANGE); return littleEndian ? load(this.dataStart + byteOffset) : reinterpret( @@ -53,7 +56,7 @@ export class DataView { if ( i32(byteOffset < 0) | i32(byteOffset + 8 > this.dataLength) - ) throw new Error("Offset out of bounds"); + ) throw new RangeError(E_INDEXOUTOFRANGE); return littleEndian ? load(this.dataStart + byteOffset) : reinterpret( @@ -64,7 +67,7 @@ export class DataView { } getInt8(byteOffset: i32): i8 { - if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); + if (byteOffset >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); return load(this.dataStart + byteOffset); } @@ -72,7 +75,7 @@ export class DataView { if ( i32(byteOffset < 0) | i32(byteOffset + 2 > this.dataLength) - ) throw new Error("Offset out of bounds"); + ) throw new RangeError(E_INDEXOUTOFRANGE); var result: i16 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } @@ -81,13 +84,13 @@ export class DataView { if ( i32(byteOffset < 0) | i32(byteOffset + 4 > this.dataLength) - ) throw new Error("Offset out of bounds"); + ) throw new RangeError(E_INDEXOUTOFRANGE); var result: i32 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } getUint8(byteOffset: i32): u8 { - if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); + if (byteOffset >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); return load(this.dataStart + byteOffset); } @@ -95,7 +98,7 @@ export class DataView { if ( i32(byteOffset < 0) | i32(byteOffset + 2 > this.dataLength) - ) throw new Error("Offset out of bounds"); + ) throw new RangeError(E_INDEXOUTOFRANGE); var result: u16 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } @@ -104,7 +107,7 @@ export class DataView { if ( i32(byteOffset < 0) | i32(byteOffset + 4 > this.dataLength) - ) throw new Error("Offset out of bounds"); + ) throw new RangeError(E_INDEXOUTOFRANGE); var result: u32 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } @@ -113,7 +116,7 @@ export class DataView { if ( i32(byteOffset < 0) | i32(byteOffset + 4 > this.dataLength) - ) throw new Error("Offset out of bounds"); + ) throw new RangeError(E_INDEXOUTOFRANGE); if (littleEndian) store(this.dataStart + byteOffset, value); else store(this.dataStart + byteOffset, bswap(reinterpret(value))); } @@ -122,13 +125,13 @@ export class DataView { if ( i32(byteOffset < 0) | i32(byteOffset + 8 > this.dataLength) - ) throw new Error("Offset out of bounds"); + ) throw new RangeError(E_INDEXOUTOFRANGE); if (littleEndian) store(this.dataStart + byteOffset, value); else store(this.dataStart + byteOffset, bswap(reinterpret(value))); } setInt8(byteOffset: i32, value: i8): void { - if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); + if (byteOffset >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); store(this.dataStart + byteOffset, value); } @@ -136,7 +139,7 @@ export class DataView { if ( i32(byteOffset < 0) | i32(byteOffset + 2 > this.dataLength) - ) throw new Error("Offset out of bounds"); + ) throw new RangeError(E_INDEXOUTOFRANGE); store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } @@ -144,12 +147,12 @@ export class DataView { if ( i32(byteOffset < 0) | i32(byteOffset + 4 > this.dataLength) - ) throw new Error("Offset out of bounds"); + ) throw new RangeError(E_INDEXOUTOFRANGE); store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } setUint8(byteOffset: i32, value: u8): void { - if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); + if (byteOffset >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); store(this.dataStart + byteOffset, value); } @@ -157,7 +160,7 @@ export class DataView { if ( i32(byteOffset < 0) | i32(byteOffset + 2 > this.dataLength) - ) throw new Error("Offset out of bounds"); + ) throw new RangeError(E_INDEXOUTOFRANGE); store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } @@ -165,7 +168,7 @@ export class DataView { if ( i32(byteOffset < 0) | i32(byteOffset + 4 > this.dataLength) - ) throw new Error("Offset out of bounds"); + ) throw new RangeError(E_INDEXOUTOFRANGE); store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } @@ -175,7 +178,7 @@ export class DataView { if ( i32(byteOffset < 0) | i32(byteOffset + 8 > this.dataLength) - ) throw new Error("Offset out of bounds"); + ) throw new RangeError(E_INDEXOUTOFRANGE); var result: i64 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } @@ -184,7 +187,7 @@ export class DataView { if ( i32(byteOffset < 0) | i32(byteOffset + 8 > this.dataLength) - ) throw new Error("Offset out of bounds"); + ) throw new RangeError(E_INDEXOUTOFRANGE); var result = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } @@ -193,7 +196,7 @@ export class DataView { if ( i32(byteOffset < 0) | i32(byteOffset + 8 > this.dataLength) - ) throw new Error("Offset out of bounds"); + ) throw new RangeError(E_INDEXOUTOFRANGE); store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } @@ -201,7 +204,7 @@ export class DataView { if ( i32(byteOffset < 0) | i32(byteOffset + 8 > this.dataLength) - ) throw new Error("Offset out of bounds"); + ) throw new RangeError(E_INDEXOUTOFRANGE); store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } diff --git a/std/assembly/fixedarray.ts b/std/assembly/fixedarray.ts index 637453b972..5e99fa6570 100644 --- a/std/assembly/fixedarray.ts +++ b/std/assembly/fixedarray.ts @@ -1,4 +1,5 @@ import { ALLOCATE, REGISTER, MAX_BYTELENGTH, HEADER, HEADER_SIZE, RETAIN, RELEASE } from "./runtime"; +import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_HOLEYARRAY } from "./util/error"; // NOTE: DO NOT USE YET! @@ -9,7 +10,12 @@ export class FixedArray { [key: number]: T; constructor(length: i32) { - if (length > MAX_BYTELENGTH >>> alignof()) throw new RangeError("Invalid length"); + if (length > MAX_BYTELENGTH >>> alignof()) throw new RangeError(E_INVALIDLENGTH); + if (isReference()) { + if (!isNullable()) { + if (length) throw new Error(E_HOLEYARRAY); + } + } var outSize = length << alignof(); var out = ALLOCATE(outSize); memory.fill(out, 0, outSize); @@ -21,12 +27,12 @@ export class FixedArray { } @operator("[]") private __get(index: i32): T { - if (index >= this.length) throw new RangeError("Offset out of bounds"); + if (index >= this.length) throw new RangeError(E_INDEXOUTOFRANGE); return this.__unchecked_get(index); } @operator("[]=") private __set(index: i32, value: T): void { - if (index >= this.length) throw new RangeError("Offset out of bounds"); + if (index >= this.length) throw new RangeError(E_INDEXOUTOFRANGE); return this.__unchecked_set(index, value); } diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index 5b6ba56d55..68a648d60c 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -1171,12 +1171,15 @@ declare class Float64Array extends TypedArray {} /** Class representing a sequence of values of type `T`. */ declare class Array { + /** Tests if a value is an array. */ static isArray(value: any): value is Array; + /** Creates a new array with at least the specified capacity and length zero. */ + static create(capacity?: i32): Array; [key: number]: T; /** Current length of the array. */ length: i32; - /** Constructs a new array. */ + /** Constructs a new array. If length is greater than zero and T is a non-nullable reference, use `Array.create` instead.*/ constructor(capacity?: i32); fill(value: T, start?: i32, end?: i32): this; diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 7df000f9bb..fe6b27fe75 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -8,68 +8,7 @@ import { AL_MASK, MAX_SIZE_32 } from "./util/allocator"; import { HEAP_BASE, memory } from "./memory"; - -// ALLOCATE(size) -// -------------- -// Allocates a runtime object that might eventually make its way into GC'ed userland as a -// managed object. Implicitly prepends the common runtime header to the allocation. -// -// REALLOCATE(ref, size) -// --------------------- -// Changes the size of a previously allocated, but not yet registered, runtime object, for -// example when a pre-allocated buffer turned out to be too small or too large. This works by -// aligning dynamic allocations to actual block size internally so in the best case REALLOCATE -// only updates payload size while in the worst case moves the object to a larger block. -// -// DISCARD(ref) -// ------------ -// Discards a runtime object that has not been registed and turned out to be unnecessary. -// Essentially undoes the forgoing ALLOCATE. Should be avoided where possible, of course. -// -// REGISTER(ref) -// ---------------- -// Registers a runtime object of kind T. Sets the internal class id within the runtime header -// and asserts that the object hasn't been registered yet. If a tracing garbage collector is -// present that requires initial insertion, the macro also forwards a call to it. Once a -// runtime object has been registed (makes it into userland), it cannot be DISCARD'ed anymore. -// -// RETAIN(ref, parentRef) -// --------------------------------- -// Introduces a new reference to ref hold by parentRef. A tracing garbage collector will most -// likely link the runtime object within its internal graph when RETAIN is called, while a -// reference counting collector will increment the reference count. -// -// RELEASE(ref, parentRef) -// ---------------------------------- -// Releases a reference to ref hold by parentRef. A tracing garbage collector will most likely -// ignore this by design, while a reference counting collector decrements the reference count -// and potentially frees the runtime object. -// -// MOVE(ref, oldParentRef, newParentRef) -// -------------------------------------------------------------- -// Moves a reference to ref hold by oldParentRef to be now hold by newParentRef. This is a -// special case of first RELEASE'ing a reference on one and instantly RETAIN'ing the reference -// on another parent. A tracing garbage collector will most likely link the runtime object as if -// RETAIN'ed on the new parent only, while a reference counting collector can skip increment and -// decrement, as decrementing might otherwise involve a costly check for cyclic garbage. -// -// ALLOCATE_UNMANAGED(size) -// ------------------------ -// Allocates an unmanaged struct-like object. This is used by the compiler as an abstraction -// to memory.allocate just in case, and is usually not used directly. -// -// WRAPARRAY(buffer) -// -------------------- -// Wraps a buffer's data as a standard array of element type T. Used by the compiler when -// creating an array from a static data segment, but is usually not used directly. -// -// HEADER -// ------ -// The common runtime object header prepended to all managed objects. Has a size of 16 bytes in -// WASM32 and contains a classId (e.g. for instanceof checks), the allocation size (e.g. for -// .byteLength and .length computation) and additional reserved fields to be used by GC. If no -// GC is present, the HEADER is cut into half excluding the reserved fields, as indicated by -// HEADER_SIZE. +import { Array } from "./array"; /** Whether the memory manager interface is implemented. */ // @ts-ignore: decorator, stub @@ -79,7 +18,13 @@ import { HEAP_BASE, memory } from "./memory"; // @ts-ignore: decorator, stub @lazy export const GC_IMPLEMENTED: bool = isDefined(__gc_register); -/** Common runtime header. Each managed object has one. */ +/** + * The common runtime object header prepended to all managed objects. Has a size of 16 bytes in + * WASM32 and contains a classId (e.g. for instanceof checks), the allocation size (e.g. for + * .byteLength and .length computation) and additional reserved fields to be used by GC. If no + * GC is present, the HEADER is cut into half excluding the reserved fields, as indicated by + * HEADER_SIZE. +*/ @unmanaged export class HEADER { /** Unique id of the respective class or a magic value if not yet registered.*/ classId: u32; @@ -120,7 +65,10 @@ export function ADJUSTOBLOCK(payloadSize: usize): usize { return 1 << (32 - clz(payloadSize + HEADER_SIZE - 1)); } -/** Allocates a new object and returns a pointer to its payload. Does not fill. */ +/** + * Allocates a runtime object that might eventually make its way into GC'ed userland as a + * managed object. Implicitly prepends the common runtime header to the allocation. + */ // @ts-ignore: decorator @unsafe @inline export function ALLOCATE(payloadSize: usize): usize { @@ -138,14 +86,22 @@ function doAllocate(payloadSize: usize): usize { return changetype(header) + HEADER_SIZE; } -/** Allocates an object explicitly declared as unmanaged and returns a pointer to it. */ +/** + * Allocates an unmanaged struct-like object. This is used by the compiler as an abstraction + * to memory.allocate just in case, and is usually not used directly. + */ // @ts-ignore: decorator @unsafe @inline export function ALLOCATE_UNMANAGED(size: usize): usize { return memory.allocate(size); } -/** Reallocates an object if necessary. Returns a pointer to its (moved) payload. */ +/** + * Changes the size of a previously allocated, but not yet registered, runtime object, for + * example when a pre-allocated buffer turned out to be too small or too large. This works by + * aligning dynamic allocations to actual block size internally so in the best case REALLOCATE + * only updates payload size while in the worst case moves the object to a larger block. + */ // @ts-ignore: decorator @unsafe @inline export function REALLOCATE(ref: usize, newPayloadSize: usize): usize { @@ -195,7 +151,12 @@ function doReallocate(ref: usize, newPayloadSize: usize): usize { return ref; } -/** Registers a managed object to be tracked by the garbage collector, if present. */ +/** + * Registers a runtime object of kind T. Sets the internal class id within the runtime header + * and asserts that the object hasn't been registered yet. If a tracing garbage collector is + * present that requires initial insertion, the macro usually forwards a call to it. Once a + * runtime object has been registed (makes it into userland), it cannot be DISCARD'ed anymore. + */ // @ts-ignore: decorator @unsafe @inline export function REGISTER(ref: usize): T { @@ -211,7 +172,12 @@ function doRegister(ref: usize, classId: u32): usize { return ref; } -/** Retains a registered object. */ +/** + * Introduces a new reference to ref hold by parentRef. A tracing garbage collector will most + * likely link the runtime object within its internal graph when RETAIN is called, while a + * reference counting collector will increment the reference count. If a reference is moved + * from one parent to another, use MOVE instead. + */ // @ts-ignore: decorator @unsafe @inline export function RETAIN(ref: T, parentRef: TParent): T { @@ -234,19 +200,21 @@ function doRetain(ref: usize, parentRef: usize): void { if (GC_IMPLEMENTED) __gc_retain(changetype(ref), changetype(parentRef)); } -/** Releases a registered object. */ +/** + * Releases a reference to ref hold by parentRef. A tracing garbage collector will most likely + * ignore this by design, while a reference counting collector decrements the reference count + * and potentially frees the runtime object. + */ // @ts-ignore: decorator @unsafe @inline export function RELEASE(ref: T, parentRef: TParent): void { if (!isManaged()) ERROR("managed reference expected"); if (!isManaged()) ERROR("managed reference expected"); - // FIXME: new Array(10) has non-nullable elements but still contains `null`s. - // In the future, something like this should probably initialize with `new Ref()`s. - // if (isNullable()) { + if (isNullable()) { if (ref !== null) doRelease(changetype(ref), changetype(parentRef)); - // } else { - // doRelease(changetype(ref), changetype(parentRef)); - // } + } else { + doRelease(changetype(ref), changetype(parentRef)); + } } function doRelease(ref: usize, parentRef: usize): void { @@ -258,7 +226,13 @@ function doRelease(ref: usize, parentRef: usize): void { if (GC_IMPLEMENTED) __gc_release(changetype(ref), changetype(parentRef)); } -/** Moves a registered object from one parent to another. */ +/** + * Moves a reference to ref hold by oldParentRef to be now hold by newParentRef. This is a + * special case of first RELEASE'ing a reference on one and instantly RETAIN'ing the reference + * on another parent. A tracing garbage collector will most likely link the runtime object as if + * RETAIN'ed on the new parent only, while a reference counting collector can skip increment and + * decrement, as decrementing might otherwise involve a costly check for cyclic garbage. + */ // @ts-ignore: decorator @unsafe @inline export function MOVE(ref: T, oldParentRef: TOldParent, newParentRef: TNewParent): T { @@ -293,7 +267,10 @@ function doMove(ref: usize, oldParentRef: usize, newParentRef: usize): void { } } -/** Discards an unregistered object that turned out to be unnecessary. */ +/** + * Discards a runtime object that has not been registed and turned out to be unnecessary. + * Essentially undoes the forgoing ALLOCATE. Should be avoided where possible. + */ // @ts-ignore: decorator @unsafe @inline export function DISCARD(ref: usize): void { @@ -305,23 +282,27 @@ function doDiscard(ref: usize): void { memory.free(changetype(ref - HEADER_SIZE)); } -/** Wraps a static buffer within an array by copying its contents. */ +/** + * Makes a new array and optionally initializes is with existing data from source. Used by the + * compiler to either wrap static array data in a new instance or pre-initialize the memory used + * by an array literal. Does not zero the backing buffer! + */ // @ts-ignore: decorator @unsafe @inline -export function WRAPARRAY(buffer: ArrayBuffer): T[] { - return changetype(doWrapArray(buffer, CLASSID(), alignof())); +export function MAKEARRAY(capacity: i32, source: usize = 0): Array { + return changetype>(doMakeArray(capacity, source, CLASSID(), alignof())); } -function doWrapArray(buffer: ArrayBuffer, classId: u32, alignLog2: usize): usize { +function doMakeArray(capacity: i32, source: usize, classId: u32, alignLog2: usize): usize { var array = doRegister(doAllocate(offsetof()), classId); - var bufferSize = buffer.byteLength; - var newBuffer = doRegister(doAllocate(bufferSize), classId); - changetype(array).data = changetype(newBuffer); // links - changetype(array).dataStart = changetype(newBuffer); + var bufferSize = capacity << alignLog2; + var buffer = doRegister(doAllocate(capacity << alignLog2), CLASSID()); + changetype(array).data = changetype(buffer); // links + changetype(array).dataStart = buffer; changetype(array).dataLength = bufferSize; - store(changetype(array), (bufferSize >>> alignLog2), offsetof("length_")); - memory.copy(changetype(newBuffer), changetype(buffer), bufferSize); - return changetype(array); + store(changetype(array), capacity, offsetof("length_")); + if (source) memory.copy(buffer, source, bufferSize); + return array; } // Helpers @@ -341,6 +322,7 @@ function assertRegistered(ref: usize): void { } import { ArrayBuffer } from "./arraybuffer"; +import { E_INVALIDLENGTH } from "./util/error"; /** Maximum byte length of any buffer. */ // @ts-ignore: decorator @@ -363,7 +345,7 @@ export abstract class ArrayBufferView { dataLength: u32; protected constructor(length: i32, alignLog2: i32) { - if (length > MAX_BYTELENGTH >>> alignLog2) throw new RangeError("Invalid length"); + if (length > MAX_BYTELENGTH >>> alignLog2) throw new RangeError(E_INVALIDLENGTH); var buffer = new ArrayBuffer(length = length << alignLog2); this.data = buffer; this.dataStart = changetype(buffer); diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 9d4209c6a1..5b7550289f 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -1,6 +1,7 @@ -import { ALLOCATE, REGISTER, HEADER, HEADER_SIZE, ArrayBufferView, RETAIN } from "./runtime"; +import { ALLOCATE, REGISTER, HEADER, HEADER_SIZE, RETAIN, MAKEARRAY, ArrayBufferView } from "./runtime"; import { MAX_SIZE_32 } from "./util/allocator"; import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./util/string"; +import { E_INVALIDLENGTH } from "./util/error"; @sealed export abstract class String { @@ -322,7 +323,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut // Most browsers can't handle strings 1 << 28 chars or longer if (count < 0 || length * count > (1 << 28)) { - throw new RangeError("Invalid count value"); + throw new RangeError(E_INVALIDLENGTH); } if (count == 0 || !length) return changetype(""); @@ -345,16 +346,16 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut split(separator: String | null = null, limit: i32 = i32.MAX_VALUE): String[] { assert(this !== null); - if (!limit) return new Array(); + if (!limit) return MAKEARRAY(0); if (separator === null) return [this]; var length: isize = this.length; var sepLen: isize = separator.length; if (limit < 0) limit = i32.MAX_VALUE; if (!sepLen) { - if (!length) return new Array(); + if (!length) return MAKEARRAY(0); // split by chars length = min(length, limit); - let result = new Array(length); + let result = MAKEARRAY(length); let resultStart = changetype(result).dataStart; for (let i: isize = 0; i < length; ++i) { let charStr = REGISTER(ALLOCATE(2)); @@ -371,11 +372,11 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut } return result; } else if (!length) { - let result = new Array(1); + let result = MAKEARRAY(1); store(changetype(result).dataStart, ""); // no need to register/link return result; } - var result = new Array(); + var result = MAKEARRAY(0); var end = 0, start = 0, i = 0; while ((end = this.indexOf(separator!, start)) != -1) { let len = end - start; @@ -390,7 +391,7 @@ import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./ut start = end + sepLen; } if (!start) { - let result = new Array(1); + let result = MAKEARRAY(1); unchecked(result[0] = this); return result; } diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index a28f867c42..6c450fb150 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -1,5 +1,6 @@ import { ALLOCATE, REGISTER, ArrayBufferView } from "./runtime"; import { COMPARATOR, SORT as SORT_IMPL } from "./util/sort"; +import { E_INDEXOUTOFRANGE } from "./util/error"; export class Int8Array extends ArrayBufferView { [key: number]: i8; @@ -22,13 +23,13 @@ export class Int8Array extends ArrayBufferView { @operator("[]") // unchecked is built-in private __get(index: i32): i8 { - if (index >= this.dataLength) throw new Error("Offset out of bounds"); + if (index >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); return load(this.dataStart + index); } @operator("[]=") // unchecked is built-in private __set(index: i32, value: native): void { - if (index >= this.dataLength) throw new Error("Offset out of bounds"); + if (index >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); store(this.dataStart + index, value); } @@ -104,13 +105,13 @@ export class Uint8Array extends ArrayBufferView { @operator("[]") // unchecked is built-in private __get(index: i32): u8 { - if (index >= this.dataLength) throw new Error("Offset out of bounds"); + if (index >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); return load(this.dataStart + index); } @operator("[]=") // unchecked is built-in private __set(index: i32, value: native): void { - if (index >= this.dataLength) throw new Error("Offset out of bounds"); + if (index >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); store(this.dataStart + index, value); } @@ -186,13 +187,13 @@ export class Uint8ClampedArray extends ArrayBufferView { @operator("[]") // unchecked is built-in private __get(index: i32): u8 { - if (index >= this.dataLength) throw new Error("Offset out of bounds"); + if (index >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); return load(this.dataStart + index); } @operator("[]=") // unchecked is built-in private __set(index: i32, value: native): void { - if (index >= this.dataLength) throw new Error("Offset out of bounds"); + if (index >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); store(this.dataStart + index, ~(value >> 31) & (((255 - value) >> 31) | value)); } @@ -268,13 +269,13 @@ export class Int16Array extends ArrayBufferView { @operator("[]") // unchecked is built-in private __get(index: i32): i16 { - if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); return load(this.dataStart + (index << alignof())); } @operator("[]=") // unchecked is built-in private __set(index: i32, value: native): void { - if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); store(this.dataStart + (index << alignof()), value); } @@ -350,13 +351,13 @@ export class Uint16Array extends ArrayBufferView { @operator("[]") // unchecked is built-in private __get(index: i32): u16 { - if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); return load(this.dataStart + (index << alignof())); } @operator("[]=") // unchecked is built-in private __set(index: i32, value: native): void { - if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); store(this.dataStart + (index << alignof()), value); } @@ -432,13 +433,13 @@ export class Int32Array extends ArrayBufferView { @operator("[]") // unchecked is built-in private __get(index: i32): i32 { - if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); return load(this.dataStart + (index << alignof())); } @operator("[]=") // unchecked is built-in private __set(index: i32, value: i32): void { - if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); store(this.dataStart + (index << alignof()), value); } @@ -514,13 +515,13 @@ export class Uint32Array extends ArrayBufferView { @operator("[]") // unchecked is built-in private __get(index: i32): u32 { - if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); return load(this.dataStart + (index << alignof())); } @operator("[]=") // unchecked is built-in private __set(index: i32, value: u32): void { - if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); store(this.dataStart + (index << alignof()), value); } @@ -596,13 +597,13 @@ export class Int64Array extends ArrayBufferView { @operator("[]") // unchecked is built-in private __get(index: i32): i64 { - if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); return load(this.dataStart + (index << alignof())); } @operator("[]=") // unchecked is built-in private __set(index: i32, value: i64): void { - if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); store(this.dataStart + (index << alignof()), value); } @@ -678,13 +679,13 @@ export class Uint64Array extends ArrayBufferView { @operator("[]") // unchecked is built-in private __get(index: i32): u64 { - if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); return load(this.dataStart + (index << alignof())); } @operator("[]=") // unchecked is built-in private __set(index: i32, value: u64): void { - if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); store(this.dataStart + (index << alignof()), value); } @@ -760,13 +761,13 @@ export class Float32Array extends ArrayBufferView { @operator("[]") // unchecked is built-in private __get(index: i32): f32 { - if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); return load(this.dataStart + (index << alignof())); } @operator("[]=") // unchecked is built-in private __set(index: i32, value: f32): void { - if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); store(this.dataStart + (index << alignof()), value); } @@ -842,13 +843,13 @@ export class Float64Array extends ArrayBufferView { @operator("[]") // unchecked is built-in private __get(index: i32): f64 { - if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); return load(this.dataStart + (index << alignof())); } @operator("[]=") // unchecked is built-in private __set(index: i32, value: f64): void { - if (index >= this.dataLength >>> alignof()) throw new Error("Offset out of bounds"); + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); store(this.dataStart + (index << alignof()), value); } diff --git a/std/assembly/util/error.ts b/std/assembly/util/error.ts new file mode 100644 index 0000000000..c9c1dbc119 --- /dev/null +++ b/std/assembly/util/error.ts @@ -0,0 +1,18 @@ +// Common error messages for use accross the standard library. Keeping error messages compact +// and reusing them where possible ensures minimal static data in binaries. + +// @ts-ignore: decorator +@lazy @inline +export const E_INDEXOUTOFRANGE: string = "Index out of range"; + +// @ts-ignore: decorator +@lazy @inline +export const E_INVALIDLENGTH: string = "Invalid length"; + +// @ts-ignore: decorator +@lazy @inline +export const E_EMPTYARRAY: string = "Array is empty"; + +// @ts-ignore: decorator +@lazy @inline +export const E_HOLEYARRAY: string = "Element type must be nullable if array is holey"; diff --git a/std/portable/index.d.ts b/std/portable/index.d.ts index 3e54395fae..ebb098ab1a 100644 --- a/std/portable/index.d.ts +++ b/std/portable/index.d.ts @@ -376,6 +376,7 @@ declare class DataView { declare class Array { static isArray(value: any): value is Array; + static create(capacity?: i32): Array; [key: number]: T; length: i32; diff --git a/std/portable/index.js b/std/portable/index.js index 00aa35e1af..06c0a4adf8 100644 --- a/std/portable/index.js +++ b/std/portable/index.js @@ -229,7 +229,13 @@ globalScope["isArrayLike"] = function isArrayLike(expr) { && typeof expr.length === 'number' && expr.length >= 0 && Math.trunc(expr.length) === expr.length; -} +}; + +Array.create = function(capacity) { + var arr = new Array(capacity); + arr.length = 0; + return arr; +}; globalScope["isDefined"] = function isDefined(expr) { return typeof expr !== "undefined"; diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 959044e00b..1e564d3568 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -106,7 +106,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -120,7 +120,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index 4dbbfc358e..c711af9bd3 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -141,7 +141,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -156,7 +156,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index 876ae3cd95..496d7c4dc3 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -116,7 +116,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -130,7 +130,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index 168ebc1c66..9e469b6b0a 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -151,7 +151,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -166,7 +166,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index b462084731..3211901148 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -145,7 +145,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index a7da4e1df3..b95764606b 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -193,7 +193,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -208,7 +208,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 68eddd6be6..1ac3e8f315 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -85,7 +85,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -99,7 +99,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index 5ffa1d6cc1..801c6ebfec 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index f1a4912ecf..b443fc1c95 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 48 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -145,7 +145,7 @@ if i32.const 0 i32.const 48 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 09c3f4f919..b31601b244 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -407,7 +407,7 @@ if i32.const 0 i32.const 48 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -422,7 +422,7 @@ if i32.const 0 i32.const 48 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/new-without-allocator.untouched.wat b/tests/compiler/new-without-allocator.untouched.wat index 886f4e0f88..affb6fe190 100644 --- a/tests/compiler/new-without-allocator.untouched.wat +++ b/tests/compiler/new-without-allocator.untouched.wat @@ -57,7 +57,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -72,7 +72,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/nonNullAssertion.optimized.wat b/tests/compiler/nonNullAssertion.optimized.wat index 286ef2a737..ef911b7544 100644 --- a/tests/compiler/nonNullAssertion.optimized.wat +++ b/tests/compiler/nonNullAssertion.optimized.wat @@ -13,24 +13,56 @@ (export "table" (table $0)) (export "testVar" (func $nonNullAssertion/testVar)) (export "testObj" (func $nonNullAssertion/testObj)) - (export "testProp" (func $nonNullAssertion/testObj)) + (export "testProp" (func $nonNullAssertion/testProp)) (export "testArr" (func $nonNullAssertion/testArr)) - (export "testElem" (func $nonNullAssertion/testArr)) + (export "testElem" (func $nonNullAssertion/testElem)) (export "testAll" (func $nonNullAssertion/testAll)) (export "testAll2" (func $nonNullAssertion/testAll)) (export "testFn" (func $nonNullAssertion/testFn)) - (export "testFn2" (func $nonNullAssertion/testFn)) - (export "testRet" (func $nonNullAssertion/testFn)) + (export "testFn2" (func $nonNullAssertion/testFn2)) + (export "testRet" (func $nonNullAssertion/testRet)) (export "testObjFn" (func $nonNullAssertion/testObjFn)) - (export "testObjRet" (func $nonNullAssertion/testObjFn)) + (export "testObjRet" (func $nonNullAssertion/testObjRet)) (func $nonNullAssertion/testVar (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + i32.eqz + if + unreachable + end + local.get $0 ) (func $nonNullAssertion/testObj (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + unreachable + end local.get $0 i32.load ) - (func $~lib/array/Array#__get (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testProp (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + local.tee $0 + i32.eqz + if + unreachable + end + local.get $0 + ) + (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 16 + i32.const 97 + i32.const 45 + call $~lib/env/abort + unreachable + end i32.const 0 local.get $0 i32.load offset=8 @@ -40,7 +72,7 @@ if i32.const 0 i32.const 16 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -49,29 +81,116 @@ i32.load offset=4 i32.load ) - (func $nonNullAssertion/testArr (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testArr (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + unreachable + end local.get $0 call $~lib/array/Array#__get ) - (func $nonNullAssertion/testAll (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#__get (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + 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 100 + i32.const 61 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.load + ) + (func $nonNullAssertion/testElem (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/array/Array#__get + local.tee $0 + i32.eqz + if + unreachable + end + local.get $0 + ) + (func $nonNullAssertion/testAll (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + unreachable + end + local.get $0 + call $~lib/array/Array#__get + local.tee $0 + i32.eqz + if + unreachable + end local.get $0 - call $~lib/array/Array#__get i32.load + local.tee $0 + i32.eqz + if + unreachable + end + local.get $0 + ) + (func $nonNullAssertion/testFn (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + global.set $~lib/argc + local.get $0 + call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testFn (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testFn2 (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + unreachable + end i32.const 0 global.set $~lib/argc local.get $0 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testObjFn (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testRet (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + global.set $~lib/argc + local.get $0 + call_indirect (type $FUNCSIG$i) + local.tee $0 + i32.eqz + if + unreachable + end + local.get $0 + ) + (func $nonNullAssertion/testObjFn (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 i32.load offset=4 call_indirect (type $FUNCSIG$i) ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $nonNullAssertion/testObjRet (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + global.set $~lib/argc + local.get $0 + i32.load offset=4 + call_indirect (type $FUNCSIG$i) + local.tee $0 + i32.eqz + if + unreachable + end + local.get $0 + ) + (func $null (; 14 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/nonNullAssertion.ts b/tests/compiler/nonNullAssertion.ts index 73aa8be880..6e4eed6dfb 100644 --- a/tests/compiler/nonNullAssertion.ts +++ b/tests/compiler/nonNullAssertion.ts @@ -30,7 +30,7 @@ export function testAll(foo: Array | null): Foo { } export function testAll2(foo: Array | null): Foo { - return foo!![0]!!!.bar!!!!; + return foo!![0]!!.bar!!; // 3x AS225: Expression is never 'null' } export function testFn(fn: (() => Foo | null) | null): Foo | null { diff --git a/tests/compiler/nonNullAssertion.untouched.wat b/tests/compiler/nonNullAssertion.untouched.wat index 05c15e4d6a..9bf07bb867 100644 --- a/tests/compiler/nonNullAssertion.untouched.wat +++ b/tests/compiler/nonNullAssertion.untouched.wat @@ -29,17 +29,50 @@ (export "testObjFn" (func $nonNullAssertion/testObjFn)) (export "testObjRet" (func $nonNullAssertion/testObjRet)) (func $nonNullAssertion/testVar (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end ) (func $nonNullAssertion/testObj (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end i32.load ) (func $nonNullAssertion/testProp (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.load + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end ) (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 16 + i32.const 97 + i32.const 45 + call $~lib/env/abort + unreachable + end local.get $1 local.get $0 i32.load offset=8 @@ -49,7 +82,7 @@ if i32.const 0 i32.const 16 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -63,7 +96,14 @@ i32.load ) (func $nonNullAssertion/testArr (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end i32.const 0 call $~lib/array/Array#__get ) @@ -77,7 +117,7 @@ if i32.const 0 i32.const 16 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -91,21 +131,66 @@ i32.load ) (func $nonNullAssertion/testElem (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.const 0 call $~lib/array/Array#__get + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end ) (func $nonNullAssertion/testAll (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end i32.const 0 call $~lib/array/Array#__get + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end i32.load + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end ) (func $nonNullAssertion/testAll2 (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end i32.const 0 call $~lib/array/Array#__get + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end i32.load + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end ) (func $nonNullAssertion/testFn (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 @@ -115,18 +200,34 @@ ) (func $nonNullAssertion/testFn2 (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) local.get $0 - local.set $1 + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end + local.set $2 i32.const 0 global.set $~lib/argc - local.get $1 + local.get $2 call_indirect (type $FUNCSIG$i) ) (func $nonNullAssertion/testRet (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 - global.set $~lib/argc - local.get $0 - call_indirect (type $FUNCSIG$i) + (local $1 i32) + block (result i32) + i32.const 0 + global.set $~lib/argc + local.get $0 + call_indirect (type $FUNCSIG$i) + end + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end ) (func $nonNullAssertion/testObjFn (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 @@ -136,11 +237,20 @@ call_indirect (type $FUNCSIG$i) ) (func $nonNullAssertion/testObjRet (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 - global.set $~lib/argc - local.get $0 - i32.load offset=4 - call_indirect (type $FUNCSIG$i) + (local $1 i32) + block (result i32) + i32.const 0 + global.set $~lib/argc + local.get $0 + i32.load offset=4 + call_indirect (type $FUNCSIG$i) + end + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end ) (func $null (; 15 ;) (type $FUNCSIG$v) ) diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 804baca181..c6e1868b95 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -302,7 +302,7 @@ if i32.const 0 i32.const 464 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -316,7 +316,7 @@ if i32.const 0 i32.const 464 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable @@ -2427,7 +2427,7 @@ if i32.const 0 i32.const 1648 - i32.const 186 + i32.const 187 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index f63eeacac6..63be6f3278 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -399,7 +399,7 @@ if i32.const 0 i32.const 464 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -414,7 +414,7 @@ if i32.const 0 i32.const 464 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable @@ -3418,7 +3418,7 @@ if i32.const 0 i32.const 1648 - i32.const 186 + i32.const 187 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index c2f6e76cfe..4cfb97f250 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -106,7 +106,7 @@ if i32.const 0 i32.const 48 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -120,7 +120,7 @@ if i32.const 0 i32.const 48 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index 20f6479859..04b5ce343a 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 48 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 48 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index a7a6a8bb11..14c0d23dbc 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -114,7 +114,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index cd804e59f9..7fb60b50a8 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -150,7 +150,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -165,7 +165,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 2cc5e90cbf..2b2dfbe020 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -20,6 +20,18 @@ (export "stringArrayArrayPropertyAccess" (func $std/array-access/stringArrayArrayPropertyAccess)) (export "stringArrayArrayMethodCall" (func $std/array-access/stringArrayArrayMethodCall)) (func $~lib/array/Array>#__get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 16 + i32.const 97 + i32.const 45 + call $~lib/env/abort + unreachable + end local.get $1 local.get $0 i32.load offset=8 @@ -29,7 +41,7 @@ if i32.const 0 i32.const 16 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -42,14 +54,34 @@ i32.add i32.load ) - (func $std/array-access/i32ArrayArrayElementAccess (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#__get (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 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 100 + i32.const 61 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 4 + 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>#__get - i32.const 1 - call $~lib/array/Array>#__get + call $~lib/array/Array#__get ) - (func $std/array-access/stringArrayPropertyAccess (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-access/stringArrayPropertyAccess (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array>#__get @@ -59,7 +91,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 4 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) i32.const 56 @@ -101,7 +133,7 @@ end local.get $4 ) - (func $~lib/string/String#startsWith (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#startsWith (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -110,7 +142,7 @@ if i32.const 0 i32.const 64 - i32.const 161 + i32.const 162 i32.const 4 call $~lib/env/abort unreachable @@ -148,13 +180,13 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array-access/stringArrayMethodCall (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-access/stringArrayMethodCall (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array>#__get call $~lib/string/String#startsWith ) - (func $std/array-access/stringArrayArrayPropertyAccess (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-access/stringArrayArrayPropertyAccess (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array>#__get @@ -166,7 +198,7 @@ i32.const 1 i32.shr_u ) - (func $std/array-access/stringArrayArrayMethodCall (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-access/stringArrayArrayMethodCall (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array>#__get @@ -174,7 +206,7 @@ call $~lib/array/Array>#__get call $~lib/string/String#startsWith ) - (func $null (; 9 ;) (type $FUNCSIG$v) + (func $null (; 10 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 5d8df860bb..b70d96aab1 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -25,6 +25,18 @@ (export "stringArrayArrayPropertyAccess" (func $std/array-access/stringArrayArrayPropertyAccess)) (export "stringArrayArrayMethodCall" (func $std/array-access/stringArrayArrayMethodCall)) (func $~lib/array/Array>#__get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 16 + i32.const 97 + i32.const 45 + call $~lib/env/abort + unreachable + end local.get $1 local.get $0 i32.load offset=8 @@ -34,7 +46,7 @@ if i32.const 0 i32.const 16 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -57,7 +69,7 @@ if i32.const 0 i32.const 16 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -78,6 +90,18 @@ call $~lib/array/Array#__get ) (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 16 + i32.const 97 + i32.const 45 + call $~lib/env/abort + unreachable + end local.get $1 local.get $0 i32.load offset=8 @@ -87,7 +111,7 @@ if i32.const 0 i32.const 16 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -181,7 +205,7 @@ if i32.const 0 i32.const 64 - i32.const 161 + i32.const 162 i32.const 4 call $~lib/env/abort unreachable @@ -243,6 +267,18 @@ call $~lib/string/String#startsWith ) (func $~lib/array/Array>#__get (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 16 + i32.const 97 + i32.const 45 + call $~lib/env/abort + unreachable + end local.get $1 local.get $0 i32.load offset=8 @@ -252,7 +288,7 @@ if i32.const 0 i32.const 16 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 00f7cf0646..c5076e0820 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -4,7 +4,6 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -17,7 +16,6 @@ (data (i32.const 184) "\01") (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\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\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) (elem (i32.const 0) $null) (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 200)) @@ -39,7 +37,7 @@ if i32.const 0 i32.const 104 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -60,7 +58,7 @@ if i32.const 0 i32.const 104 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -156,225 +154,14 @@ i32.const 8 i32.add ) - (func $~lib/memory/memory.fill (; 5 ;) (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/assertUnregistered (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 304 + i32.const 256 i32.le_u if i32.const 0 i32.const 224 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -388,13 +175,13 @@ if i32.const 0 i32.const 224 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/doRegister (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -404,91 +191,46 @@ i32.store local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 264 - i32.const 24 - i32.const 43 - call $~lib/env/abort - unreachable - end - local.get $0 + (func $~lib/runtime/doMakeArray (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + i32.const 16 call $~lib/runtime/doAllocate - local.tee $1 local.get $0 - call $~lib/memory/memory.fill - local.get $1 - i32.const 1 call $~lib/runtime/doRegister - ) - (func $~lib/runtime/ArrayBufferView#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - i32.const 3 - i32.const 1073741816 - local.get $1 - i32.shr_u - i32.gt_u - if - i32.const 0 - i32.const 224 - i32.const 251 - i32.const 57 - call $~lib/env/abort - unreachable - end + local.tee $0 i32.const 3 local.get $1 i32.shl + local.tee $1 + call $~lib/runtime/doAllocate + i32.const 1 + call $~lib/runtime/doRegister local.tee $2 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/runtime/doAllocate - i32.const 5 - call $~lib/runtime/doRegister - local.set $0 - end - local.get $0 - i32.const 0 i32.store local.get $0 - i32.const 0 + local.get $2 i32.store offset=4 local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 local.get $1 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 - local.get $2 i32.store offset=8 local.get $0 + i32.const 3 + i32.store offset=12 + local.get $0 ) - (func $std/array-literal/Ref#constructor (; 10 ;) (type $FUNCSIG$i) (result i32) + (func $std/array-literal/Ref#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/doAllocate - i32.const 6 + i32.const 5 call $~lib/runtime/doRegister ) - (func $std/array-literal/RefWithCtor#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) + (func $std/array-literal/RefWithCtor#constructor (; 9 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/doAllocate - i32.const 8 + i32.const 7 call $~lib/runtime/doRegister ) - (func $start:std/array-literal (; 12 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 10 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -600,23 +342,14 @@ call $~lib/env/abort unreachable end - i32.const 304 + i32.const 256 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - i32.const 16 - call $~lib/runtime/doAllocate i32.const 2 - call $~lib/runtime/doRegister i32.const 0 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/runtime/doMakeArray local.tee $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 3 - i32.store offset=12 - local.get $0 i32.load offset=4 local.tee $1 global.get $std/array-literal/i @@ -690,19 +423,10 @@ end i32.const 0 global.set $std/array-literal/i - i32.const 16 - call $~lib/runtime/doAllocate i32.const 4 - call $~lib/runtime/doRegister i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/runtime/doMakeArray local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 3 - i32.store offset=12 - local.get $1 i32.load offset=4 local.tee $0 global.get $std/array-literal/i @@ -774,19 +498,10 @@ call $~lib/env/abort unreachable end - i32.const 16 - call $~lib/runtime/doAllocate - i32.const 7 - call $~lib/runtime/doRegister + i32.const 6 i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/runtime/doMakeArray local.tee $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 3 - i32.store offset=12 - local.get $0 i32.load offset=4 local.tee $1 call $std/array-literal/Ref#constructor @@ -811,19 +526,10 @@ call $~lib/env/abort unreachable end - i32.const 16 - call $~lib/runtime/doAllocate - i32.const 9 - call $~lib/runtime/doRegister + i32.const 8 i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/runtime/doMakeArray local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 3 - i32.store offset=12 - local.get $1 i32.load offset=4 local.tee $0 call $std/array-literal/RefWithCtor#constructor @@ -849,10 +555,10 @@ unreachable end ) - (func $start (; 13 ;) (type $FUNCSIG$v) + (func $start (; 11 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 14 ;) (type $FUNCSIG$v) + (func $null (; 12 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index ceb8495605..6f19a66ee7 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -2,9 +2,9 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -17,7 +17,6 @@ (data (i32.const 184) "\01\00\00\00\00\00\00\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\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\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) (elem (i32.const 0) $null) (global $std/array-literal/staticArrayI8 i32 (i32.const 32)) @@ -27,7 +26,6 @@ (global $std/array-literal/staticArrayI32 i32 (i32.const 168)) (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 200)) (global $std/array-literal/i (mut i32) (i32.const 0)) - (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) @@ -35,7 +33,7 @@ (global $std/array-literal/dynamicArrayI32 (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 $~lib/memory/HEAP_BASE i32 (i32.const 304)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 256)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -53,7 +51,7 @@ if i32.const 0 i32.const 104 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -80,7 +78,7 @@ if i32.const 0 i32.const 104 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -206,462 +204,1525 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/memory/memory.fill (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/runtime/assertUnregistered (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 224 + i32.const 313 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 224 + i32.const 314 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/util/memory/memcpy (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i64) - block $~lib/util/memory/memset|inlined.0 - local.get $2 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 + block $break|0 + loop $continue|0 + local.get $2 + if (result i32) + local.get $1 + i32.const 3 + i32.and + else + local.get $2 + end + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|0 + end end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 3 + i32.and + i32.const 0 + i32.eq + if + block $break|1 + loop $continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + block + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|1 + end + end end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u + i32.const 8 + i32.and if - br $~lib/util/memory/memset|inlined.0 + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 local.get $2 - i32.add i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u + i32.and if - br $~lib/util/memory/memset|inlined.0 + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.set $0 + local.get $1 + i32.const 4 + i32.add + local.set $1 end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $5 - local.get $0 - local.get $5 - i32.add - local.set $0 - local.get $2 - local.get $5 - i32.sub - local.set $2 local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 + i32.const 2 i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u if - br $~lib/util/memory/memset|inlined.0 + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $0 + i32.const 2 + i32.add + local.set $0 + local.get $1 + i32.const 2 + i32.add + local.set $1 end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store local.get $2 - i32.const 24 - i32.le_u + i32.const 1 + i32.and if - br $~lib/util/memory/memset|inlined.0 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + block $case0|2 + local.get $0 + i32.const 3 + i32.and + local.set $5 + local.get $5 + i32.const 1 + i32.eq + br_if $case0|2 + local.get $5 + i32.const 2 + i32.eq + br_if $case1|2 + local.get $5 + i32.const 3 + i32.eq + br_if $case2|2 + br $break|2 + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + block $break|3 + loop $continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + block + local.get $1 + i32.const 1 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 5 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 9 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 13 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|3 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + block $break|4 + loop $continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + block + local.get $1 + i32.const 2 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 6 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 10 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 14 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|4 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block $break|5 + loop $continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + block + local.get $1 + i32.const 3 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 7 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 11 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 15 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|5 + end + end + end + br $break|2 + unreachable + end + unreachable + end + end + local.get $2 + i32.const 16 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + ) + (func $~lib/memory/memory.copy (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $1 local.get $2 i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $5 local.get $0 - local.get $5 - i32.add - local.set $0 - local.get $2 - local.get $5 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $6 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $6 - i64.store + i32.le_u + local.tee $5 + if (result i32) + local.get $5 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 i32.const 8 - i32.add - local.get $6 - i64.store + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|2 + end + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 local.get $0 - i32.const 16 + local.get $2 i32.add - local.get $6 - i64.store + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if local.get $0 - i32.const 24 - i32.add - local.get $6 - i64.store local.get $2 - i32.const 32 + i32.const 1 i32.sub - local.set $2 - local.get $0 - i32.const 32 + local.tee $2 i32.add - local.set $0 + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 end - br $continue|0 end end end end ) - (func $~lib/runtime/assertUnregistered (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 224 - i32.const 217 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - i32.load - global.get $~lib/runtime/HEADER_MAGIC - i32.eq - i32.eqz - if - i32.const 0 - i32.const 224 - i32.const 218 - i32.const 2 - call $~lib/env/abort - unreachable - end - ) - (func $~lib/runtime/doRegister (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - local.get $1 - i32.store - local.get $0 - ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH - i32.gt_u - if - i32.const 0 - i32.const 264 - i32.const 24 - i32.const 43 - call $~lib/env/abort - unreachable - end - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - local.get $1 - local.set $2 - local.get $2 - call $~lib/runtime/doAllocate - end - local.set $3 - local.get $3 - i32.const 0 - local.get $1 - call $~lib/memory/memory.fill - block $~lib/runtime/REGISTER|inlined.0 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.const 1 - call $~lib/runtime/doRegister - end - ) - (func $~lib/runtime/ArrayBufferView#constructor (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) + (func $~lib/runtime/doMakeArray (; 12 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) - local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH - local.get $2 - i32.shr_u - i32.gt_u - if - i32.const 0 - i32.const 224 - i32.const 251 - i32.const 57 - call $~lib/env/abort - unreachable - end - i32.const 0 - local.get $1 + (local $5 i32) + (local $6 i32) + i32.const 16 + call $~lib/runtime/doAllocate local.get $2 - i32.shl - local.tee $1 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - i32.const 12 - local.set $4 - local.get $4 - call $~lib/runtime/doAllocate - end - local.set $4 - local.get $4 - i32.const 5 - call $~lib/runtime/doRegister - end - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - end + call $~lib/runtime/doRegister + local.set $4 + local.get $0 local.get $3 - i32.store + i32.shl + local.set $5 local.get $0 local.get $3 + i32.shl + call $~lib/runtime/doAllocate + i32.const 1 + call $~lib/runtime/doRegister + local.set $6 + local.get $4 + local.get $6 + i32.store + local.get $4 + local.get $6 i32.store offset=4 - local.get $0 - local.get $1 + local.get $4 + local.get $5 i32.store offset=8 + local.get $4 local.get $0 - ) - (func $~lib/array/Array#constructor (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - if (result i32) - local.get $0 - else - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) - i32.const 16 - local.set $2 - local.get $2 - call $~lib/runtime/doAllocate - end - local.set $2 - local.get $2 - i32.const 2 - call $~lib/runtime/doRegister - end - local.get $1 - i32.const 0 - call $~lib/runtime/ArrayBufferView#constructor - local.set $0 - local.get $0 - i32.const 0 i32.store offset=12 - local.get $0 local.get $1 - i32.store offset=12 - local.get $0 - ) - (func $~lib/array/Array#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - if (result i32) - local.get $0 - else - block $~lib/runtime/ALLOCATE|inlined.3 (result i32) - i32.const 16 - local.set $2 - local.get $2 - call $~lib/runtime/doAllocate - end - local.set $2 - local.get $2 - i32.const 4 - call $~lib/runtime/doRegister + if + local.get $6 + local.get $1 + local.get $5 + call $~lib/memory/memory.copy end - local.get $1 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.set $0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - local.get $1 - i32.store offset=12 - local.get $0 + local.get $4 ) - (func $std/array-literal/Ref#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/Ref#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.4 (result i32) + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) i32.const 0 local.set $1 local.get $1 @@ -669,53 +1730,24 @@ end local.set $1 local.get $1 - i32.const 6 + i32.const 5 call $~lib/runtime/doRegister end local.set $0 end local.get $0 ) - (func $~lib/array/Array#constructor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - if (result i32) - local.get $0 - else - block $~lib/runtime/ALLOCATE|inlined.5 (result i32) - i32.const 16 - local.set $2 - local.get $2 - call $~lib/runtime/doAllocate - end - local.set $2 - local.get $2 - i32.const 7 - call $~lib/runtime/doRegister - end - local.get $1 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.set $0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - local.get $1 - i32.store offset=12 - local.get $0 - ) - (func $~lib/array/Array#get:length (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/array-literal/RefWithCtor#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/RefWithCtor#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.6 (result i32) + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) i32.const 0 local.set $1 local.get $1 @@ -723,49 +1755,22 @@ end local.set $1 local.get $1 - i32.const 8 + i32.const 7 call $~lib/runtime/doRegister end local.set $0 end local.get $0 ) - (func $~lib/array/Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - if (result i32) - local.get $0 - else - block $~lib/runtime/ALLOCATE|inlined.7 (result i32) - i32.const 16 - local.set $2 - local.get $2 - call $~lib/runtime/doAllocate - end - local.set $2 - local.get $2 - i32.const 9 - call $~lib/runtime/doRegister - end - local.get $1 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.set $0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - local.get $1 - i32.store offset=12 - local.get $0 - ) - (func $~lib/array/Array#get:length (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $start:std/array-literal (; 21 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 17 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) global.get $std/array-literal/staticArrayI8 call $~lib/array/Array#get:length i32.const 3 @@ -900,9 +1905,17 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset block (result i32) - i32.const 0 - i32.const 3 - call $~lib/array/Array#constructor + block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) + i32.const 3 + local.set $2 + i32.const 0 + local.set $3 + local.get $2 + local.get $3 + i32.const 2 + i32.const 0 + call $~lib/runtime/doMakeArray + end local.set $0 local.get $0 i32.load offset=4 @@ -989,9 +2002,17 @@ i32.const 0 global.set $std/array-literal/i block (result i32) - i32.const 0 - i32.const 3 - call $~lib/array/Array#constructor + block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) + i32.const 3 + local.set $3 + i32.const 0 + local.set $2 + local.get $3 + local.get $2 + i32.const 4 + i32.const 2 + call $~lib/runtime/doMakeArray + end local.set $1 local.get $1 i32.load offset=4 @@ -1076,9 +2097,17 @@ unreachable end block (result i32) - i32.const 0 - i32.const 3 - call $~lib/array/Array#constructor + block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) + i32.const 3 + local.set $2 + i32.const 0 + local.set $3 + local.get $2 + local.get $3 + i32.const 6 + i32.const 2 + call $~lib/runtime/doMakeArray + end local.set $0 local.get $0 i32.load offset=4 @@ -1112,9 +2141,17 @@ unreachable end block (result i32) - i32.const 0 - i32.const 3 - call $~lib/array/Array#constructor + block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) + i32.const 3 + local.set $3 + i32.const 0 + local.set $2 + local.get $3 + local.get $2 + i32.const 8 + i32.const 2 + call $~lib/runtime/doMakeArray + end local.set $1 local.get $1 i32.load offset=4 @@ -1148,9 +2185,9 @@ unreachable end ) - (func $start (; 22 ;) (type $FUNCSIG$v) + (func $start (; 18 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 23 ;) (type $FUNCSIG$v) + (func $null (; 19 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index a1982e5b24..14e06c2d3c 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -786,7 +786,7 @@ if i32.const 0 i32.const 24 - i32.const 332 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -800,7 +800,7 @@ if i32.const 0 i32.const 24 - i32.const 333 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable @@ -824,7 +824,7 @@ if i32.const 0 i32.const 72 - i32.const 24 + i32.const 25 i32.const 43 call $~lib/env/abort unreachable @@ -845,7 +845,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 320 i32.const 2 call $~lib/env/abort unreachable @@ -859,7 +859,7 @@ if i32.const 0 i32.const 24 - i32.const 340 + i32.const 321 i32.const 2 call $~lib/env/abort unreachable @@ -880,7 +880,7 @@ if i32.const 0 i32.const 24 - i32.const 366 + i32.const 348 i32.const 57 call $~lib/env/abort unreachable @@ -923,22 +923,22 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/array/Array#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) i32.const 16 call $~lib/runtime/doAllocate i32.const 4 call $~lib/runtime/doRegister - local.get $0 + i32.const 0 i32.const 2 call $~lib/runtime/ArrayBufferView#constructor - local.tee $1 + local.tee $0 i32.const 0 i32.store offset=12 - local.get $1 local.get $0 + i32.const 0 i32.store offset=12 - local.get $1 + local.get $0 ) (func $~lib/array/Array#fill (; 12 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) @@ -2096,44 +2096,43 @@ end end ) - (func $~lib/runtime/doWrapArray (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) + (func $~lib/runtime/doMakeArray (; 15 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) i32.const 16 call $~lib/runtime/doAllocate - local.get $1 + local.get $2 call $~lib/runtime/doRegister - local.set $3 + local.set $2 local.get $0 - i32.const 16 - i32.sub - i32.load offset=4 + local.get $3 + i32.shl local.tee $4 call $~lib/runtime/doAllocate - local.get $1 + i32.const 2 call $~lib/runtime/doRegister - local.tee $1 - local.get $3 + local.tee $3 + local.get $2 call $~lib/runtime/doRetain + local.get $2 local.get $3 - local.get $1 i32.store + local.get $2 local.get $3 - local.get $1 i32.store offset=4 - local.get $3 + local.get $2 local.get $4 i32.store offset=8 - local.get $3 - local.get $4 local.get $2 - i32.shr_u + local.get $0 i32.store offset=12 local.get $1 - local.get $0 - local.get $4 - call $~lib/memory/memory.copy - local.get $3 + if + local.get $3 + local.get $1 + local.get $4 + call $~lib/memory/memory.copy + end + local.get $2 ) (func $~lib/array/Array#__get (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -2143,7 +2142,7 @@ if i32.const 0 i32.const 272 - i32.const 85 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -2284,7 +2283,7 @@ if i32.const 0 i32.const 272 - i32.const 85 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -2423,7 +2422,7 @@ if i32.const 0 i32.const 24 - i32.const 177 + i32.const 133 i32.const 8 call $~lib/env/abort unreachable @@ -2465,7 +2464,7 @@ if i32.const 0 i32.const 272 - i32.const 10 + i32.const 14 i32.const 64 call $~lib/env/abort unreachable @@ -2531,7 +2530,7 @@ if i32.const 0 i32.const 272 - i32.const 220 + i32.const 245 i32.const 20 call $~lib/env/abort unreachable @@ -2567,7 +2566,10 @@ select local.tee $3 i32.add - call $~lib/array/Array#constructor + i32.const 0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doMakeArray local.tee $4 i32.load offset=4 local.tee $5 @@ -2798,7 +2800,7 @@ if i32.const 0 i32.const 272 - i32.const 281 + i32.const 306 i32.const 20 call $~lib/env/abort unreachable @@ -2996,7 +2998,10 @@ i32.gt_s select local.tee $2 - call $~lib/array/Array#constructor + i32.const 0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doMakeArray local.tee $6 i32.load offset=4 local.set $7 @@ -3069,6 +3074,10 @@ local.get $6 ) (func $~lib/array/Array#__set (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.set $3 local.get $0 local.get $1 i32.const 1 @@ -3083,8 +3092,7 @@ local.get $2 i32.store local.get $1 - local.get $0 - i32.load offset=12 + local.get $3 i32.ge_s if local.get $0 @@ -3507,36 +3515,27 @@ (local $6 i32) local.get $0 i32.load offset=12 - local.set $1 - i32.const 16 - call $~lib/runtime/doAllocate - i32.const 9 - call $~lib/runtime/doRegister - local.get $1 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor local.tee $3 i32.const 0 - i32.store offset=12 - local.get $3 - local.get $1 - i32.store offset=12 - local.get $3 + i32.const 9 + i32.const 2 + call $~lib/runtime/doMakeArray + local.tee $4 i32.load offset=4 local.set $5 loop $repeat|0 - local.get $2 local.get $1 + local.get $3 local.get $0 i32.load offset=12 - local.tee $4 - local.get $1 - local.get $4 + local.tee $2 + local.get $3 + local.get $2 i32.lt_s select i32.lt_s if - local.get $2 + local.get $1 i32.const 2 i32.shl local.tee $6 @@ -3544,26 +3543,26 @@ i32.load offset=4 i32.add i32.load - local.set $4 + local.set $2 i32.const 3 global.set $~lib/argc local.get $5 local.get $6 i32.add - local.get $4 local.get $2 + local.get $1 local.get $0 i32.const 22 call_indirect (type $FUNCSIG$fiii) f32.store - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $repeat|0 end end - local.get $3 + local.get $4 ) (func $~lib/array/Array#__get (; 59 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 @@ -3575,7 +3574,7 @@ if i32.const 0 i32.const 272 - i32.const 85 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -3607,7 +3606,10 @@ local.get $0 i32.load offset=12 local.tee $4 - call $~lib/array/Array#constructor + i32.const 0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doMakeArray i32.load offset=4 local.set $5 loop $repeat|0 @@ -3678,7 +3680,10 @@ (local $4 i32) (local $5 i32) i32.const 0 - call $~lib/array/Array#constructor + i32.const 0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doMakeArray local.set $4 local.get $0 i32.load offset=12 @@ -4326,7 +4331,7 @@ if i32.const 0 i32.const 272 - i32.const 393 + i32.const 418 i32.const 4 call $~lib/env/abort unreachable @@ -4822,7 +4827,7 @@ if i32.const 0 i32.const 272 - i32.const 393 + i32.const 418 i32.const 4 call $~lib/env/abort unreachable @@ -4920,7 +4925,7 @@ if i32.const 0 i32.const 272 - i32.const 85 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -5341,7 +5346,7 @@ if i32.const 0 i32.const 272 - i32.const 393 + i32.const 418 i32.const 4 call $~lib/env/abort unreachable @@ -5419,38 +5424,64 @@ i32.lt_u i32.sub ) - (func $std/array/createReverseOrderedArray (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/array/Array.create (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 268435452 + i32.gt_u + if + i32.const 0 + i32.const 272 + i32.const 44 + i32.const 62 + call $~lib/env/abort + unreachable + end local.get $0 - call $~lib/array/Array#constructor - local.set $1 i32.const 0 - local.set $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doMakeArray + local.tee $0 + i32.load offset=4 + i32.const 0 + local.get $0 + i32.load offset=8 + call $~lib/memory/memory.fill + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + ) + (func $std/array/createReverseOrderedArray (; 95 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + call $~lib/array/Array.create + local.set $2 loop $repeat|0 - local.get $0 - local.get $1 - i32.load offset=12 - i32.lt_s - if + block $break|0 local.get $1 local.get $0 + i32.ge_s + br_if $break|0 + local.get $2 local.get $1 - i32.load offset=12 + local.get $0 i32.const 1 i32.sub - local.get $0 + local.get $1 i32.sub call $~lib/array/Array#__set - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $repeat|0 end end - local.get $1 + local.get $2 ) - (func $~lib/math/NativeMath.random (; 95 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 96 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) global.get $~lib/math/random_seeded @@ -5497,22 +5528,22 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 96 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 97 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) local.get $0 - call $~lib/array/Array#constructor - local.set $0 + call $~lib/array/Array.create + local.set $2 loop $repeat|0 - local.get $1 - local.get $0 - i32.load offset=12 - i32.lt_s - if + block $break|0 + local.get $1 local.get $0 + i32.ge_s + br_if $break|0 + local.get $2 local.get $1 call $~lib/math/NativeMath.random local.get $0 - i32.load offset=12 f64.convert_i32_s f64.mul i32.trunc_f64_s @@ -5524,9 +5555,9 @@ br $repeat|0 end end - local.get $0 + local.get $2 ) - (func $std/array/isSorted (; 97 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -5568,7 +5599,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 98 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 99 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -5578,74 +5609,57 @@ if i32.const 0 i32.const 152 - i32.const 813 + i32.const 814 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/array/assertSortedDefault (; 99 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 100 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 48 call $std/array/assertSorted ) - (func $start:std/array~anonymous|44 (; 100 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 101 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array>#constructor (; 101 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 16 - call $~lib/runtime/doAllocate + (func $~lib/array/Array.create> (; 102 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 512 + i32.const 0 i32.const 11 - call $~lib/runtime/doRegister - local.get $0 i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 + call $~lib/runtime/doMakeArray + local.tee $0 i32.load offset=4 - local.tee $2 + i32.const 0 local.get $0 - i32.const 2 - i32.shl - i32.add - local.set $3 - loop $continue|0 - local.get $2 - local.get $3 - i32.lt_u - if - i32.const 0 - call $~lib/array/Array#constructor - local.tee $4 - local.get $1 - call $~lib/runtime/doRetain - local.get $2 - local.get $4 - i32.store - local.get $2 - i32.const 4 - i32.add - local.set $2 - br $continue|0 - end - end - local.get $1 + i32.load offset=8 + call $~lib/memory/memory.fill local.get $0 + i32.const 0 i32.store offset=12 - local.get $1 + local.get $0 ) - (func $~lib/array/Array>#__set (; 102 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__set (; 103 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + local.get $1 + local.get $0 + i32.load offset=12 + local.tee $4 + i32.gt_u + if + i32.const 0 + i32.const 272 + i32.const 109 + i32.const 38 + call $~lib/env/abort + unreachable + end local.get $0 local.get $1 i32.const 1 @@ -5657,31 +5671,27 @@ i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $5 i32.load local.tee $3 local.get $2 i32.ne if - local.get $0 - local.set $5 local.get $3 if local.get $3 - local.get $5 + local.get $0 call $~lib/runtime/doRetain end local.get $2 - local.tee $3 local.get $0 call $~lib/runtime/doRetain - local.get $4 - local.get $3 + local.get $5 + local.get $2 i32.store end local.get $1 - local.get $0 - i32.load offset=12 + local.get $4 i32.ge_s if local.get $0 @@ -5691,44 +5701,39 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedNestedArray (; 103 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 104 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) - i32.const 512 - call $~lib/array/Array>#constructor - local.set $0 + (local $2 i32) + call $~lib/array/Array.create> + local.set $1 loop $repeat|0 - local.get $1 local.get $0 - i32.load offset=12 + i32.const 512 i32.lt_s if - local.get $0 - local.get $1 i32.const 1 - call $~lib/array/Array#constructor - call $~lib/array/Array>#__set - local.get $0 - local.get $1 - call $~lib/array/Array#__get + call $~lib/array/Array.create + local.tee $2 i32.const 0 + i32.const 511 local.get $0 - i32.load offset=12 - i32.const 1 - i32.sub - local.get $1 i32.sub call $~lib/array/Array#__set local.get $1 + local.get $0 + local.get $2 + call $~lib/array/Array>#__set + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end - local.get $0 + local.get $1 ) - (func $start:std/array~anonymous|47 (; 104 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 105 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -5737,7 +5742,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/array/Array>#sort (; 105 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5746,7 +5751,7 @@ if i32.const 0 i32.const 272 - i32.const 393 + i32.const 418 i32.const 4 call $~lib/env/abort unreachable @@ -5798,117 +5803,158 @@ call $~lib/util/sort/insertionSort local.get $0 ) - (func $std/array/assertSorted> (; 106 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/array/Array>#__get (; 107 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 - call $~lib/array/Array>#sort + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 272 + i32.const 97 + i32.const 45 + call $~lib/env/abort + unreachable + end local.get $1 - call $std/array/isSorted - i32.eqz + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ge_u if i32.const 0 - i32.const 152 - i32.const 813 - i32.const 2 + i32.const 272 + i32.const 100 + i32.const 61 call $~lib/env/abort unreachable end - ) - (func $std/array/Proxy#constructor (; 107 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - i32.const 4 - call $~lib/runtime/doAllocate - i32.const 13 - call $~lib/runtime/doRegister - local.tee $1 local.get $0 - i32.store + i32.load offset=4 local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load ) - (func $~lib/array/Array>#constructor (; 108 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - (local $1 i32) + (func $std/array/isSorted> (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 16 - call $~lib/runtime/doAllocate - i32.const 12 - call $~lib/runtime/doRegister - i32.const 512 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.tee $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const 2048 - i32.add + i32.const 1 local.set $2 - loop $continue|0 - local.get $1 + local.get $0 + i32.load offset=12 + local.set $3 + loop $repeat|0 local.get $2 - i32.lt_u + local.get $3 + i32.lt_s if - i32.const 0 - call $std/array/Proxy#constructor - local.tee $3 + i32.const 2 + global.set $~lib/argc local.get $0 - call $~lib/runtime/doRetain - local.get $1 - local.get $3 - i32.store + local.get $2 + i32.const 1 + i32.sub + call $~lib/array/Array>#__get + local.get $0 + local.get $2 + call $~lib/array/Array>#__get local.get $1 - i32.const 4 - i32.add - local.set $1 - br $continue|0 + call_indirect (type $FUNCSIG$iii) + i32.const 0 + i32.gt_s + if + i32.const 0 + return + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + end + unreachable end end + i32.const 1 + ) + (func $std/array/assertSorted> (; 109 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 + local.get $1 + call $~lib/array/Array>#sort + local.get $1 + call $std/array/isSorted> + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 814 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/array/Array.create> (; 110 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) i32.const 512 + i32.const 0 + i32.const 12 + i32.const 2 + call $~lib/runtime/doMakeArray + local.tee $0 + i32.load offset=4 + i32.const 0 + local.get $0 + i32.load offset=8 + call $~lib/memory/memory.fill + local.get $0 + i32.const 0 i32.store offset=12 local.get $0 ) - (func $std/array/createReverseOrderedElementsArray (; 109 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 111 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) - call $~lib/array/Array>#constructor - local.set $0 + (local $2 i32) + call $~lib/array/Array.create> + local.set $1 loop $repeat|0 - local.get $1 local.get $0 - i32.load offset=12 + i32.const 512 i32.lt_s if + i32.const 4 + call $~lib/runtime/doAllocate + i32.const 13 + call $~lib/runtime/doRegister + local.tee $2 + i32.const 511 local.get $0 - local.get $1 - local.get $0 - i32.load offset=12 - i32.const 1 i32.sub + i32.store local.get $1 - i32.sub - call $std/array/Proxy#constructor + local.get $0 + local.get $2 call $~lib/array/Array>#__set - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end - local.get $0 + local.get $1 ) - (func $start:std/array~anonymous|48 (; 110 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 112 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/util/string/compareImpl (; 111 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 113 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 @@ -5941,7 +5987,7 @@ end local.get $3 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 112 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 114 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6018,7 +6064,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted|trampoline (; 113 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSorted|trampoline (; 115 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) block $1of1 block $0of1 @@ -6037,7 +6083,7 @@ local.get $1 call $std/array/assertSorted> ) - (func $~lib/string/String.__eq (; 114 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -6083,7 +6129,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array/isArraysEqual (; 115 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -6110,10 +6156,10 @@ if local.get $0 local.get $2 - call $~lib/array/Array#__get + call $~lib/array/Array>#__get local.get $1 local.get $2 - call $~lib/array/Array#__get + call $~lib/array/Array>#__get call $~lib/string/String.__eq if local.get $2 @@ -6130,47 +6176,25 @@ end i32.const 1 ) - (func $~lib/array/Array#constructor (; 116 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array.create (; 118 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 16 - call $~lib/runtime/doAllocate - i32.const 14 - call $~lib/runtime/doRegister i32.const 400 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.tee $1 i32.const 0 - i32.store offset=12 - local.get $1 - i32.load offset=4 + i32.const 14 + i32.const 2 + call $~lib/runtime/doMakeArray local.tee $0 - i32.const 1600 - i32.add - local.set $2 - loop $continue|0 - local.get $0 - local.get $2 - i32.lt_u - if - local.get $0 - i32.const 4200 - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - br $continue|0 - end - end - local.get $1 - i32.const 400 + i32.load offset=4 + i32.const 0 + local.get $0 + i32.load offset=8 + call $~lib/memory/memory.fill + local.get $0 + i32.const 0 i32.store offset=12 - local.get $1 + local.get $0 ) - (func $~lib/string/String#charAt (; 117 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#charAt (; 119 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 3020 @@ -6196,7 +6220,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/string/String#concat (; 118 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6245,7 +6269,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/string/String.__concat (; 119 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 4424 local.get $0 @@ -6253,7 +6277,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 120 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 122 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 4200 @@ -6285,35 +6309,34 @@ end local.get $1 ) - (func $std/array/createRandomStringArray (; 121 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createRandomStringArray (; 123 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) - call $~lib/array/Array#constructor - local.set $0 + call $~lib/array/Array.create + local.set $1 loop $repeat|0 - local.get $1 local.get $0 - i32.load offset=12 + i32.const 400 i32.lt_s if - local.get $0 local.get $1 + local.get $0 call $~lib/math/NativeMath.random f64.const 32 f64.mul i32.trunc_f64_s call $std/array/createRandomString call $~lib/array/Array>#__set - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end - local.get $0 + local.get $1 ) - (func $~lib/string/String#substring (; 122 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 124 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6322,7 +6345,7 @@ if i32.const 0 i32.const 4376 - i32.const 186 + i32.const 187 i32.const 4 call $~lib/env/abort unreachable @@ -6411,7 +6434,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join_bool (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_bool (; 125 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6563,7 +6586,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/decimalCount32 (; 124 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 126 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -6617,7 +6640,7 @@ end end ) - (func $~lib/util/number/utoa32_lut (; 125 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 127 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) i32.const 5092 @@ -6727,7 +6750,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 126 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 128 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6769,7 +6792,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 127 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 129 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6813,7 +6836,7 @@ end local.get $2 ) - (func $~lib/array/Array#join_int (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 130 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6931,12 +6954,12 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 131 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int ) - (func $~lib/util/number/utoa32 (; 130 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 132 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -6959,7 +6982,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 133 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6983,7 +7006,7 @@ call $~lib/util/number/utoa32_lut local.get $0 ) - (func $~lib/array/Array#join_int (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 134 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7101,12 +7124,12 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int ) - (func $~lib/util/number/genDigits (; 134 ;) (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 (; 136 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i32) @@ -7517,7 +7540,7 @@ local.get $2 end ) - (func $~lib/util/number/prettify (; 135 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7779,7 +7802,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 136 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 138 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -8090,7 +8113,7 @@ local.get $11 i32.add ) - (func $~lib/util/number/dtoa (; 137 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 139 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -8135,7 +8158,7 @@ call $~lib/runtime/assertUnregistered local.get $1 ) - (func $~lib/util/number/dtoa_stream (; 138 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 140 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) local.get $1 i32.const 1 i32.shl @@ -8204,7 +8227,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join_flt (; 139 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_flt (; 141 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8320,7 +8343,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join_str (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_str (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8487,18 +8510,18 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_str ) - (func $std/array/Ref#constructor (; 142 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/Ref#constructor (; 144 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/doAllocate i32.const 18 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join_ref (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_ref (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8631,12 +8654,12 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#toString (; 144 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 146 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa_stream (; 145 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 147 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -8691,7 +8714,7 @@ end local.get $1 ) - (func $~lib/array/Array#join_int (; 146 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 148 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8803,7 +8826,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 147 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 149 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -8833,7 +8856,7 @@ call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join_int (; 148 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 150 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8949,7 +8972,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/decimalCount64 (; 149 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 151 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -9003,7 +9026,7 @@ end end ) - (func $~lib/util/number/utoa64_lut (; 150 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 152 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9100,7 +9123,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 151 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 153 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9142,7 +9165,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 152 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 154 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -9182,7 +9205,7 @@ end local.get $1 ) - (func $~lib/array/Array#join_int (; 153 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 155 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9298,7 +9321,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa64 (; 154 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 156 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9363,7 +9386,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa_stream (; 155 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 157 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -9426,7 +9449,7 @@ end local.get $1 ) - (func $~lib/array/Array#join_int (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 158 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9542,12 +9565,12 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array#toString (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 159 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array>#join_arr (; 158 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 160 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9640,64 +9663,7 @@ local.get $1 end ) - (func $~lib/array/Array>#constructor (; 159 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 16 - call $~lib/runtime/doAllocate - i32.const 23 - call $~lib/runtime/doRegister - i32.const 2 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.tee $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const 8 - i32.add - local.set $3 - loop $continue|0 - local.get $1 - local.get $3 - i32.lt_u - if - i32.const 16 - call $~lib/runtime/doAllocate - i32.const 7 - call $~lib/runtime/doRegister - i32.const 0 - i32.const 0 - call $~lib/runtime/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $0 - call $~lib/runtime/doRetain - local.get $1 - local.get $2 - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $continue|0 - end - end - local.get $0 - i32.const 2 - i32.store offset=12 - local.get $0 - ) - (func $~lib/util/number/itoa_stream (; 160 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 161 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -9727,7 +9693,7 @@ call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join_int (; 161 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9839,7 +9805,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/array/Array>#join_arr (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 163 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9893,148 +9859,43 @@ i32.load local.tee $0 if - local.get $1 - local.get $0 - call $~lib/array/Array#join_int - call $~lib/string/String.__concat - local.set $1 - end - local.get $5 - if - local.get $1 - i32.const 4528 - call $~lib/string/String.__concat - local.set $1 - end - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $repeat|0 - end - end - local.get $2 - i32.const 2 - i32.shl - local.get $3 - i32.add - i32.load - local.tee $0 - if (result i32) - local.get $1 - local.get $0 - call $~lib/array/Array#join_int - call $~lib/string/String.__concat - else - local.get $1 - end - ) - (func $~lib/array/Array>#constructor (; 163 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 16 - call $~lib/runtime/doAllocate - i32.const 24 - call $~lib/runtime/doRegister - local.get $0 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.load offset=4 - local.tee $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - local.set $4 - loop $continue|0 - local.get $2 - local.get $4 - i32.lt_u - if - i32.const 16 - call $~lib/runtime/doAllocate - i32.const 8 - call $~lib/runtime/doRegister - i32.const 0 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.tee $3 - i32.const 0 - i32.store offset=12 - local.get $3 - i32.const 0 - i32.store offset=12 - local.get $3 - local.get $1 - call $~lib/runtime/doRetain - local.get $2 - local.get $3 - i32.store - local.get $2 - i32.const 4 + local.get $1 + local.get $0 + call $~lib/array/Array#join_int + call $~lib/string/String.__concat + local.set $1 + end + local.get $5 + if + local.get $1 + i32.const 4528 + call $~lib/string/String.__concat + local.set $1 + end + local.get $4 + i32.const 1 i32.add - local.set $2 - br $continue|0 + local.set $4 + br $repeat|0 end end - local.get $1 - local.get $0 - i32.store offset=12 - local.get $1 - ) - (func $~lib/array/Array>>#constructor (; 164 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 16 - call $~lib/runtime/doAllocate - i32.const 25 - call $~lib/runtime/doRegister - i32.const 1 + local.get $2 i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.tee $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const 4 + i32.shl + local.get $3 i32.add - local.set $2 - loop $continue|0 + i32.load + local.tee $0 + if (result i32) + local.get $1 + local.get $0 + call $~lib/array/Array#join_int + call $~lib/string/String.__concat + else local.get $1 - local.get $2 - i32.lt_u - if - i32.const 0 - call $~lib/array/Array>#constructor - local.tee $3 - local.get $0 - call $~lib/runtime/doRetain - local.get $1 - local.get $3 - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $continue|0 - end end - local.get $0 - i32.const 1 - i32.store offset=12 - local.get $0 ) - (func $~lib/array/Array>#join_arr (; 165 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 164 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10127,7 +9988,7 @@ local.get $1 end ) - (func $~lib/array/Array>>#join_arr (; 166 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>>#join_arr (; 165 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10217,7 +10078,7 @@ local.get $1 end ) - (func $start:std/array (; 167 ;) (type $FUNCSIG$v) + (func $start:std/array (; 166 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10227,7 +10088,6 @@ global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - i32.const 0 call $~lib/array/Array#constructor global.set $std/array/arr global.get $std/array/Null @@ -10271,10 +10131,11 @@ i32.const 3 call $~lib/array/Array#fill global.get $std/array/arr8 + i32.const 5 i32.const 248 i32.const 7 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/array/isArraysEqual i32.eqz if @@ -10291,10 +10152,11 @@ i32.const 2147483647 call $~lib/array/Array#fill global.get $std/array/arr8 + i32.const 5 i32.const 320 i32.const 7 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/array/isArraysEqual i32.eqz if @@ -10311,10 +10173,11 @@ i32.const -3 call $~lib/array/Array#fill global.get $std/array/arr8 + i32.const 5 i32.const 344 i32.const 7 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/array/isArraysEqual i32.eqz if @@ -10331,10 +10194,11 @@ i32.const 2147483647 call $~lib/array/Array#fill global.get $std/array/arr8 + i32.const 5 i32.const 368 i32.const 7 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/array/isArraysEqual i32.eqz if @@ -10351,10 +10215,11 @@ i32.const 0 call $~lib/array/Array#fill global.get $std/array/arr8 + i32.const 5 i32.const 392 i32.const 7 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/array/isArraysEqual i32.eqz if @@ -10371,10 +10236,11 @@ i32.const 3 call $~lib/array/Array#fill global.get $std/array/arr32 + i32.const 5 i32.const 488 i32.const 8 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10392,10 +10258,11 @@ i32.const 2147483647 call $~lib/array/Array#fill global.get $std/array/arr32 + i32.const 5 i32.const 528 i32.const 8 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10413,10 +10280,11 @@ i32.const -3 call $~lib/array/Array#fill global.get $std/array/arr32 + i32.const 5 i32.const 568 i32.const 8 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10434,10 +10302,11 @@ i32.const 2147483647 call $~lib/array/Array#fill global.get $std/array/arr32 + i32.const 5 i32.const 608 i32.const 8 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10455,10 +10324,11 @@ i32.const 0 call $~lib/array/Array#fill global.get $std/array/arr32 + i32.const 5 i32.const 648 i32.const 8 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10755,7 +10625,6 @@ call $~lib/env/abort unreachable end - i32.const 0 call $~lib/array/Array#constructor global.set $std/array/other global.get $std/array/arr @@ -10804,10 +10673,11 @@ unreachable end global.get $std/array/out + i32.const 0 i32.const 688 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $~lib/array/Array#concat drop global.get $std/array/arr @@ -11062,20 +10932,22 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 752 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin + i32.const 5 i32.const 792 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11087,20 +10959,22 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 832 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin + i32.const 5 i32.const 872 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11112,20 +10986,22 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 912 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin + i32.const 5 i32.const 952 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11137,20 +11013,22 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 992 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 2 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin + i32.const 5 i32.const 1032 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11162,20 +11040,22 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 1072 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin + i32.const 5 i32.const 1112 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11187,20 +11067,22 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 1152 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin + i32.const 5 i32.const 1192 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11212,20 +11094,22 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 1232 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin + i32.const 5 i32.const 1272 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11237,20 +11121,22 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 1312 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const -2 i32.const 2147483647 call $~lib/array/Array#copyWithin + i32.const 5 i32.const 1352 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11262,20 +11148,22 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 1392 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin + i32.const 5 i32.const 1432 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11287,20 +11175,22 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 1472 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin + i32.const 5 i32.const 1512 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11312,20 +11202,22 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 1552 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin + i32.const 5 i32.const 1592 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11337,20 +11229,22 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 1632 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 i32.const 2147483647 call $~lib/array/Array#copyWithin + i32.const 5 i32.const 1672 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12174,10 +12068,11 @@ i32.const 0 i32.const 2147483647 call $~lib/array/Array#splice + i32.const 5 i32.const 1784 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12190,10 +12085,11 @@ unreachable end global.get $std/array/sarr + i32.const 0 i32.const 1824 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12205,19 +12101,21 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 1840 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 i32.const 2147483647 call $~lib/array/Array#splice + i32.const 3 i32.const 1880 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12230,10 +12128,11 @@ unreachable end global.get $std/array/sarr + i32.const 2 i32.const 1912 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12245,19 +12144,21 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 1936 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 i32.const 2 call $~lib/array/Array#splice + i32.const 2 i32.const 1976 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12270,10 +12171,11 @@ unreachable end global.get $std/array/sarr + i32.const 3 i32.const 2000 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12285,19 +12187,21 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 2032 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 0 i32.const 1 call $~lib/array/Array#splice + i32.const 1 i32.const 2072 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12310,10 +12214,11 @@ unreachable end global.get $std/array/sarr + i32.const 4 i32.const 2096 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12325,19 +12230,21 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 2128 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -1 i32.const 2147483647 call $~lib/array/Array#splice + i32.const 1 i32.const 2168 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12350,10 +12257,11 @@ unreachable end global.get $std/array/sarr + i32.const 4 i32.const 2192 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12365,19 +12273,21 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 2224 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const 2147483647 call $~lib/array/Array#splice + i32.const 2 i32.const 2264 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12390,10 +12300,11 @@ unreachable end global.get $std/array/sarr + i32.const 3 i32.const 2288 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12405,19 +12316,21 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 2320 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const 1 call $~lib/array/Array#splice + i32.const 1 i32.const 2360 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12430,10 +12343,11 @@ unreachable end global.get $std/array/sarr + i32.const 4 i32.const 2384 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12445,19 +12359,21 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 2416 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -7 i32.const 1 call $~lib/array/Array#splice + i32.const 1 i32.const 2456 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12470,10 +12386,11 @@ unreachable end global.get $std/array/sarr + i32.const 4 i32.const 2480 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12485,19 +12402,21 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 2512 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const -1 call $~lib/array/Array#splice + i32.const 0 i32.const 2552 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12510,10 +12429,11 @@ unreachable end global.get $std/array/sarr + i32.const 5 i32.const 2568 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12525,19 +12445,21 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 2608 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 1 i32.const -2 call $~lib/array/Array#splice + i32.const 0 i32.const 2648 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12550,10 +12472,11 @@ unreachable end global.get $std/array/sarr + i32.const 5 i32.const 2664 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12565,19 +12488,21 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 2704 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 4 i32.const 0 call $~lib/array/Array#splice + i32.const 0 i32.const 2744 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12590,10 +12515,11 @@ unreachable end global.get $std/array/sarr + i32.const 5 i32.const 2760 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12605,19 +12531,21 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 2800 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 0 call $~lib/array/Array#splice + i32.const 0 i32.const 2840 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12630,10 +12558,11 @@ unreachable end global.get $std/array/sarr + i32.const 5 i32.const 2856 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12645,19 +12574,21 @@ call $~lib/env/abort unreachable end + i32.const 5 i32.const 2896 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 5 call $~lib/array/Array#splice + i32.const 0 i32.const 2936 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12670,10 +12601,11 @@ unreachable end global.get $std/array/sarr + i32.const 5 i32.const 2952 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13773,16 +13705,17 @@ local.get $0 call $~lib/array/Array#sort global.get $std/array/f32ArrayTyped + i32.const 8 i32.const 3304 i32.const 9 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 152 - i32.const 824 + i32.const 825 i32.const 0 call $~lib/env/abort unreachable @@ -13808,16 +13741,17 @@ local.get $0 call $~lib/array/Array#sort global.get $std/array/f64ArrayTyped + i32.const 8 i32.const 3464 i32.const 10 i32.const 3 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 152 - i32.const 828 + i32.const 829 i32.const 0 call $~lib/env/abort unreachable @@ -13844,17 +13778,18 @@ call $~lib/array/Array#sort drop global.get $std/array/i32ArrayTyped + i32.const 5 i32.const 3616 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 152 - i32.const 832 + i32.const 833 i32.const 0 call $~lib/env/abort unreachable @@ -13881,17 +13816,18 @@ call $~lib/array/Array#sort drop global.get $std/array/u32ArrayTyped + i32.const 5 i32.const 3728 i32.const 8 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 152 - i32.const 836 + i32.const 837 i32.const 0 call $~lib/env/abort unreachable @@ -13916,17 +13852,18 @@ global.get $std/array/reversed1 call $std/array/assertSortedDefault global.get $std/array/reversed1 + i32.const 1 i32.const 4056 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 152 - i32.const 856 + i32.const 857 i32.const 0 call $~lib/env/abort unreachable @@ -13934,17 +13871,18 @@ global.get $std/array/reversed2 call $std/array/assertSortedDefault global.get $std/array/reversed2 + i32.const 2 i32.const 4080 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 152 - i32.const 859 + i32.const 860 i32.const 0 call $~lib/env/abort unreachable @@ -13959,7 +13897,7 @@ if i32.const 0 i32.const 152 - i32.const 862 + i32.const 863 i32.const 0 call $~lib/env/abort unreachable @@ -13974,7 +13912,7 @@ if i32.const 0 i32.const 152 - i32.const 865 + i32.const 866 i32.const 0 call $~lib/env/abort unreachable @@ -13989,7 +13927,7 @@ if i32.const 0 i32.const 152 - i32.const 868 + i32.const 869 i32.const 0 call $~lib/env/abort unreachable @@ -14004,7 +13942,7 @@ if i32.const 0 i32.const 152 - i32.const 871 + i32.const 872 i32.const 0 call $~lib/env/abort unreachable @@ -14019,7 +13957,7 @@ if i32.const 0 i32.const 152 - i32.const 874 + i32.const 875 i32.const 0 call $~lib/env/abort unreachable @@ -14065,7 +14003,7 @@ if i32.const 0 i32.const 152 - i32.const 904 + i32.const 905 i32.const 0 call $~lib/env/abort unreachable @@ -14076,10 +14014,11 @@ global.set $~lib/argc global.get $std/array/randomStrings400 call $std/array/assertSorted|trampoline + i32.const 2 i32.const 4552 i32.const 15 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $~lib/array/Array#join_bool i32.const 4576 call $~lib/string/String.__eq @@ -14087,15 +14026,16 @@ if i32.const 0 i32.const 152 - i32.const 913 + i32.const 914 i32.const 0 call $~lib/env/abort unreachable end + i32.const 3 i32.const 5120 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 4200 call $~lib/array/Array#join i32.const 5152 @@ -14104,15 +14044,16 @@ if i32.const 0 i32.const 152 - i32.const 914 + i32.const 915 i32.const 0 call $~lib/env/abort unreachable end + i32.const 3 i32.const 5240 i32.const 8 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 5216 call $~lib/array/Array#join i32.const 5152 @@ -14121,15 +14062,16 @@ if i32.const 0 i32.const 152 - i32.const 915 + i32.const 916 i32.const 0 call $~lib/env/abort unreachable end + i32.const 2 i32.const 5320 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 5296 call $~lib/array/Array#join i32.const 5344 @@ -14138,15 +14080,16 @@ if i32.const 0 i32.const 152 - i32.const 916 + i32.const 917 i32.const 0 call $~lib/env/abort unreachable end + i32.const 6 i32.const 6672 i32.const 10 i32.const 3 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $~lib/array/Array#join_flt i32.const 6736 call $~lib/string/String.__eq @@ -14154,15 +14097,16 @@ if i32.const 0 i32.const 152 - i32.const 917 + i32.const 918 i32.const 0 call $~lib/env/abort unreachable end + i32.const 3 i32.const 6888 i32.const 14 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray i32.const 4200 call $~lib/array/Array#join i32.const 6832 @@ -14171,25 +14115,17 @@ if i32.const 0 i32.const 152 - i32.const 918 + i32.const 919 i32.const 0 call $~lib/env/abort unreachable end - i32.const 16 - call $~lib/runtime/doAllocate - i32.const 19 - call $~lib/runtime/doRegister i32.const 3 + i32.const 0 + i32.const 19 i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/runtime/doMakeArray local.tee $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 3 - i32.store offset=12 - local.get $0 i32.load offset=4 local.tee $2 local.set $3 @@ -14226,7 +14162,7 @@ if i32.const 0 i32.const 152 - i32.const 920 + i32.const 921 i32.const 0 call $~lib/env/abort unreachable @@ -14239,7 +14175,7 @@ if i32.const 0 i32.const 152 - i32.const 924 + i32.const 925 i32.const 0 call $~lib/env/abort unreachable @@ -14252,7 +14188,7 @@ if i32.const 0 i32.const 152 - i32.const 925 + i32.const 926 i32.const 0 call $~lib/env/abort unreachable @@ -14265,7 +14201,7 @@ if i32.const 0 i32.const 152 - i32.const 926 + i32.const 927 i32.const 0 call $~lib/env/abort unreachable @@ -14278,15 +14214,16 @@ if i32.const 0 i32.const 152 - i32.const 927 + i32.const 928 i32.const 0 call $~lib/env/abort unreachable end + i32.const 3 i32.const 7128 i32.const 20 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $~lib/array/Array#join_int i32.const 7152 call $~lib/string/String.__eq @@ -14294,15 +14231,16 @@ if i32.const 0 i32.const 152 - i32.const 929 + i32.const 930 i32.const 0 call $~lib/env/abort unreachable end + i32.const 3 i32.const 7208 i32.const 21 i32.const 1 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $~lib/array/Array#join_int i32.const 7232 call $~lib/string/String.__eq @@ -14310,15 +14248,16 @@ if i32.const 0 i32.const 152 - i32.const 930 + i32.const 931 i32.const 0 call $~lib/env/abort unreachable end + i32.const 3 i32.const 7312 i32.const 16 i32.const 3 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $~lib/array/Array#join_int i32.const 7352 call $~lib/string/String.__eq @@ -14326,15 +14265,16 @@ if i32.const 0 i32.const 152 - i32.const 931 + i32.const 932 i32.const 0 call $~lib/env/abort unreachable end + i32.const 4 i32.const 7464 i32.const 22 i32.const 3 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $~lib/array/Array#join_int i32.const 7512 call $~lib/string/String.__eq @@ -14342,7 +14282,7 @@ if i32.const 0 i32.const 152 - i32.const 932 + i32.const 933 i32.const 0 call $~lib/env/abort unreachable @@ -14355,15 +14295,16 @@ if i32.const 0 i32.const 152 - i32.const 933 + i32.const 934 i32.const 0 call $~lib/env/abort unreachable end + i32.const 4 i32.const 7744 i32.const 14 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $~lib/array/Array#toString i32.const 7776 call $~lib/string/String.__eq @@ -14371,37 +14312,42 @@ if i32.const 0 i32.const 152 - i32.const 934 + i32.const 935 i32.const 0 call $~lib/env/abort unreachable end i32.const 2 - call $~lib/array/Array>#constructor - local.tee $2 + i32.const 0 + i32.const 11 + i32.const 2 + call $~lib/runtime/doMakeArray + local.tee $0 i32.load offset=4 - local.set $0 + local.set $2 + i32.const 2 i32.const 7832 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray local.tee $1 - local.get $2 - call $~lib/runtime/doRetain local.get $0 + call $~lib/runtime/doRetain + local.get $2 local.get $1 i32.store + i32.const 2 i32.const 7856 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray - local.tee $1 - local.get $2 - call $~lib/runtime/doRetain + call $~lib/runtime/doMakeArray + local.tee $3 local.get $0 - local.get $1 - i32.store offset=4 + call $~lib/runtime/doRetain local.get $2 + local.get $3 + i32.store offset=4 + local.get $0 global.set $std/array/subarr32 global.get $std/array/subarr32 call $~lib/array/Array>#join_arr @@ -14411,29 +14357,35 @@ if i32.const 0 i32.const 152 - i32.const 937 + i32.const 938 i32.const 0 call $~lib/env/abort unreachable end - call $~lib/array/Array>#constructor + i32.const 2 + i32.const 0 + i32.const 23 + i32.const 2 + call $~lib/runtime/doMakeArray local.tee $0 i32.load offset=4 local.set $2 + i32.const 2 i32.const 7936 i32.const 7 i32.const 0 - call $~lib/runtime/doWrapArray - local.tee $1 + call $~lib/runtime/doMakeArray + local.tee $3 local.get $0 call $~lib/runtime/doRetain local.get $2 - local.get $1 + local.get $3 i32.store + i32.const 2 i32.const 7960 i32.const 7 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray local.tee $1 local.get $0 call $~lib/runtime/doRetain @@ -14450,24 +14402,32 @@ if i32.const 0 i32.const 152 - i32.const 940 + i32.const 941 i32.const 0 call $~lib/env/abort unreachable end - call $~lib/array/Array>>#constructor - local.tee $0 + i32.const 1 + i32.const 0 + i32.const 25 + i32.const 2 + call $~lib/runtime/doMakeArray + local.tee $2 i32.load offset=4 - local.set $2 + local.set $0 i32.const 1 - call $~lib/array/Array>#constructor + i32.const 0 + i32.const 24 + i32.const 2 + call $~lib/runtime/doMakeArray local.tee $1 i32.load offset=4 local.set $3 + i32.const 1 i32.const 8056 i32.const 8 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray local.tee $4 local.get $1 call $~lib/runtime/doRetain @@ -14475,12 +14435,12 @@ local.get $4 i32.store local.get $1 - local.get $0 - call $~lib/runtime/doRetain local.get $2 + call $~lib/runtime/doRetain + local.get $0 local.get $1 i32.store - local.get $0 + local.get $2 global.set $std/array/subarrU32 global.get $std/array/subarrU32 call $~lib/array/Array>>#join_arr @@ -14490,13 +14450,13 @@ if i32.const 0 i32.const 152 - i32.const 943 + i32.const 944 i32.const 0 call $~lib/env/abort unreachable end ) - (func $std/array/main (; 168 ;) (type $FUNCSIG$v) + (func $std/array/main (; 167 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -14505,7 +14465,7 @@ global.set $~lib/started end ) - (func $null (; 169 ;) (type $FUNCSIG$v) + (func $null (; 168 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array.ts b/tests/compiler/std/array.ts index 7e272f7e47..b72b3055b1 100644 --- a/tests/compiler/std/array.ts +++ b/tests/compiler/std/array.ts @@ -752,9 +752,9 @@ function isSorted(data: Array, comparator: (a: T, b: T) => i32 = COMPARATO } function createReverseOrderedArray(size: i32): Array { - var arr = new Array(size); - for (let i = 0; i < arr.length; i++) { - arr[i] = arr.length - 1 - i; + var arr = Array.create(size); + for (let i = 0; i < size; i++) { + arr[i] = size - 1 - i; } return arr; } @@ -762,30 +762,31 @@ function createReverseOrderedArray(size: i32): Array { NativeMath.seedRandom(reinterpret(JSMath.random())); function createRandomOrderedArray(size: i32): Array { - var arr = new Array(size); - for (let i = 0; i < arr.length; i++) { - arr[i] = (NativeMath.random() * arr.length); + var arr = Array.create(size); + for (let i = 0; i < size; i++) { + arr[i] = (NativeMath.random() *size); } return arr; } function createReverseOrderedNestedArray(size: i32): Array> { - var arr = new Array>(size); - for (let i: i32 = 0; i < arr.length; i++) { - arr[i] = new Array(1); - arr[i][0] = arr.length - 1 - i; + var arr = Array.create>(size); + for (let i: i32 = 0; i < size; i++) { + let inner = Array.create(1); + inner[0] = size - 1 - i; + arr[i] = inner; } return arr; } class Proxy { - constructor(public x: T = 0) {} + constructor(public x: T) {} } function createReverseOrderedElementsArray(size: i32): Proxy[] { - var arr = new Array>(size); - for (let i: i32 = 0; i < arr.length; i++) { - arr[i] = new Proxy(arr.length - 1 - i); + var arr = Array.create>(size); + for (let i: i32 = 0; i < size; i++) { + arr[i] = new Proxy(size - 1 - i); } return arr; } @@ -802,8 +803,8 @@ function createRandomString(len: i32): string { } function createRandomStringArray(size: i32): string[] { - var arr = new Array(size); - for (let i: i32 = 0; i < arr.length; i++) { + var arr = Array.create(size); + for (let i: i32 = 0; i < size; i++) { arr[i] = createRandomString((NativeMath.random() * 32)); } return arr; diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 97abb0647d..e0b4592ab2 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -681,7 +681,7 @@ if i32.const 0 i32.const 24 - i32.const 332 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -696,7 +696,7 @@ if i32.const 0 i32.const 24 - i32.const 333 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable @@ -726,7 +726,7 @@ if i32.const 0 i32.const 72 - i32.const 24 + i32.const 25 i32.const 43 call $~lib/env/abort unreachable @@ -758,7 +758,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 320 i32.const 2 call $~lib/env/abort unreachable @@ -773,7 +773,7 @@ if i32.const 0 i32.const 24 - i32.const 340 + i32.const 321 i32.const 2 call $~lib/env/abort unreachable @@ -802,7 +802,7 @@ if i32.const 0 i32.const 24 - i32.const 366 + i32.const 348 i32.const 57 call $~lib/env/abort unreachable @@ -1068,13 +1068,7 @@ end local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - i32.load offset=4 - ) - (func $~lib/util/memory/memcpy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2275,7 +2269,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2506,55 +2500,59 @@ end end ) - (func $~lib/runtime/doWrapArray (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) + (func $~lib/runtime/doMakeArray (; 26 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) i32.const 16 call $~lib/runtime/doAllocate - local.get $1 + local.get $2 call $~lib/runtime/doRegister - local.set $3 - local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.set $4 - local.get $4 - call $~lib/runtime/doAllocate - local.get $1 - call $~lib/runtime/doRegister + local.get $0 + local.get $3 + i32.shl local.set $5 + local.get $0 local.get $3 - local.tee $6 + i32.shl + call $~lib/runtime/doAllocate + i32.const 2 + call $~lib/runtime/doRegister + local.set $6 + local.get $4 + local.tee $7 block $~lib/runtime/RETAIN|inlined.1 (result i32) - local.get $5 local.get $6 + local.get $7 call $~lib/runtime/doRetain - local.get $5 + local.get $6 end i32.store - local.get $3 - local.get $5 + local.get $4 + local.get $6 i32.store offset=4 - local.get $3 local.get $4 + local.get $5 i32.store offset=8 - local.get $3 local.get $4 - local.get $2 - i32.shr_u - i32.store offset=12 - local.get $5 local.get $0 + i32.store offset=12 + local.get $1 + if + local.get $6 + local.get $1 + local.get $5 + call $~lib/memory/memory.copy + end local.get $4 - call $~lib/memory/memory.copy - local.get $3 ) - (func $~lib/array/Array#get:length (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2564,7 +2562,7 @@ if i32.const 0 i32.const 272 - i32.const 85 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -2577,7 +2575,7 @@ i32.add i32.load8_u ) - (func $std/array/isArraysEqual (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2632,7 +2630,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 31 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 30 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2718,11 +2716,11 @@ end local.get $0 ) - (func $~lib/array/Array#get:length (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2732,7 +2730,7 @@ if i32.const 0 i32.const 272 - i32.const 85 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -2745,7 +2743,7 @@ i32.add i32.load ) - (func $std/array/isArraysEqual (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2800,10 +2798,16 @@ end i32.const 1 ) - (func $~lib/array/Array#get:length (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) (func $std/array/internalCapacity (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 @@ -2890,7 +2894,7 @@ if i32.const 0 i32.const 24 - i32.const 177 + i32.const 133 i32.const 8 call $~lib/env/abort unreachable @@ -2943,7 +2947,7 @@ if i32.const 0 i32.const 272 - i32.const 10 + i32.const 14 i32.const 64 call $~lib/env/abort unreachable @@ -3023,7 +3027,7 @@ if i32.const 0 i32.const 272 - i32.const 85 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -3048,7 +3052,7 @@ if i32.const 0 i32.const 272 - i32.const 220 + i32.const 245 i32.const 20 call $~lib/env/abort unreachable @@ -3075,6 +3079,8 @@ (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) + (local $8 i32) local.get $0 i32.load offset=12 local.set $2 @@ -3086,26 +3092,34 @@ i32.eq select local.set $3 - i32.const 0 - local.get $2 - local.get $3 - i32.add - call $~lib/array/Array#constructor - local.set $4 - local.get $4 + block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) + local.get $2 + local.get $3 + i32.add + local.set $5 + i32.const 0 + local.set $4 + local.get $5 + local.get $4 + i32.const 4 + i32.const 2 + call $~lib/runtime/doMakeArray + end + local.set $6 + local.get $6 i32.load offset=4 - local.set $5 + local.set $7 local.get $2 i32.const 2 i32.shl - local.set $6 - local.get $5 + local.set $8 + local.get $7 local.get $0 i32.load offset=4 - local.get $6 + local.get $8 call $~lib/memory/memory.copy - local.get $5 - local.get $6 + local.get $7 + local.get $8 i32.add local.get $1 i32.load offset=4 @@ -3113,7 +3127,7 @@ i32.const 2 i32.shl call $~lib/memory/memory.copy - local.get $4 + local.get $6 ) (func $~lib/array/Array#copyWithin (; 44 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) @@ -3407,7 +3421,7 @@ if i32.const 0 i32.const 272 - i32.const 281 + i32.const 306 i32.const 20 call $~lib/env/abort unreachable @@ -3632,9 +3646,17 @@ i32.gt_s select local.set $2 - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor + block $~lib/runtime/MAKEARRAY|inlined.26 (result i32) + local.get $2 + local.set $5 + i32.const 0 + local.set $4 + local.get $5 + local.get $4 + i32.const 4 + i32.const 2 + call $~lib/runtime/doMakeArray + end local.set $6 local.get $6 i32.load offset=4 @@ -3714,6 +3736,10 @@ local.get $6 ) (func $~lib/array/Array#__set (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.set $3 local.get $0 local.get $1 i32.const 1 @@ -3729,8 +3755,7 @@ local.get $2 i32.store local.get $1 - local.get $0 - i32.load offset=12 + local.get $3 i32.ge_s if local.get $0 @@ -4221,36 +4246,7 @@ local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#constructor (; 79 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - if (result i32) - local.get $0 - else - block $~lib/runtime/ALLOCATE|inlined.5 (result i32) - i32.const 16 - local.set $2 - local.get $2 - call $~lib/runtime/doAllocate - end - local.set $2 - local.get $2 - i32.const 9 - call $~lib/runtime/doRegister - end - local.get $1 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.set $0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - local.get $1 - i32.store offset=12 - local.get $0 - ) - (func $~lib/array/Array#map (; 80 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 79 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4261,24 +4257,32 @@ local.get $0 i32.load offset=12 local.set $2 - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.set $3 - local.get $3 + block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) + local.get $2 + local.set $4 + i32.const 0 + local.set $3 + local.get $4 + local.get $3 + i32.const 9 + i32.const 2 + call $~lib/runtime/doMakeArray + end + local.set $5 + local.get $5 i32.load offset=4 - local.set $4 + local.set $6 block $break|0 i32.const 0 - local.set $5 + local.set $3 loop $repeat|0 - local.get $5 + local.get $3 local.get $2 - local.tee $6 + local.tee $4 local.get $0 i32.load offset=12 local.tee $7 - local.get $6 + local.get $4 local.get $7 i32.lt_s select @@ -4288,46 +4292,46 @@ block local.get $0 i32.load offset=4 - local.get $5 + local.get $3 i32.const 2 i32.shl i32.add i32.load - local.set $6 + local.set $4 block (result f32) i32.const 3 global.set $~lib/argc - local.get $6 - local.get $5 + local.get $4 + local.get $3 local.get $0 local.get $1 call_indirect (type $FUNCSIG$fiii) end local.set $8 - local.get $4 - local.get $5 + local.get $6 + local.get $3 i32.const 2 i32.shl i32.add local.get $8 f32.store end - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $repeat|0 unreachable end unreachable end - local.get $3 + local.get $5 ) - (func $~lib/array/Array#get:length (; 81 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 82 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 81 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -4337,7 +4341,7 @@ if i32.const 0 i32.const 272 - i32.const 85 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -4350,7 +4354,7 @@ i32.add f32.load ) - (func $start:std/array~anonymous|22 (; 83 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4361,7 +4365,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 84 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 83 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4371,24 +4375,32 @@ local.get $0 i32.load offset=12 local.set $2 - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.set $3 - local.get $3 + block $~lib/runtime/MAKEARRAY|inlined.65 (result i32) + local.get $2 + local.set $4 + i32.const 0 + local.set $3 + local.get $4 + local.get $3 + i32.const 4 + i32.const 2 + call $~lib/runtime/doMakeArray + end + local.set $5 + local.get $5 i32.load offset=4 - local.set $4 + local.set $6 block $break|0 i32.const 0 - local.set $5 + local.set $3 loop $repeat|0 - local.get $5 + local.get $3 local.get $2 - local.tee $6 + local.tee $4 local.get $0 i32.load offset=12 local.tee $7 - local.get $6 + local.get $4 local.get $7 i32.lt_s select @@ -4398,49 +4410,49 @@ block local.get $0 i32.load offset=4 - local.get $5 + local.get $3 i32.const 2 i32.shl i32.add i32.load - local.set $6 + local.set $4 block (result i32) i32.const 3 global.set $~lib/argc - local.get $6 - local.get $5 + local.get $4 + local.get $3 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) end local.set $7 - local.get $4 - local.get $5 + local.get $6 + local.get $3 i32.const 2 i32.shl i32.add local.get $7 i32.store end - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $repeat|0 unreachable end unreachable end - local.get $3 + local.get $5 ) - (func $start:std/array~anonymous|23 (; 85 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 84 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 86 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 85 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4450,32 +4462,40 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 86 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 88 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 87 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 0 - i32.const 0 - call $~lib/array/Array#constructor - local.set $2 - block $break|0 - block - i32.const 0 - local.set $3 - local.get $0 - i32.load offset=12 - local.set $4 + block $~lib/runtime/MAKEARRAY|inlined.66 (result i32) + i32.const 0 + local.set $3 + i32.const 0 + local.set $2 + local.get $3 + local.get $2 + i32.const 4 + i32.const 2 + call $~lib/runtime/doMakeArray + end + local.set $4 + block $break|0 + block + i32.const 0 + local.set $2 + local.get $0 + i32.load offset=12 + local.set $3 end loop $repeat|0 + local.get $2 local.get $3 - local.get $4 local.tee $5 local.get $0 i32.load offset=12 @@ -4490,7 +4510,7 @@ block local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add @@ -4500,7 +4520,7 @@ i32.const 3 global.set $~lib/argc local.get $5 - local.get $3 + local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) @@ -4508,24 +4528,24 @@ i32.const 0 i32.ne if - local.get $2 + local.get $4 local.get $5 call $~lib/array/Array#push drop end end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 unreachable end unreachable end - local.get $2 + local.get $4 ) - (func $start:std/array~anonymous|26 (; 89 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 88 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4538,7 +4558,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 90 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 89 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -4547,7 +4567,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 91 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 90 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4559,12 +4579,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 92 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 91 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 92 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4622,12 +4642,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|30 (; 94 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|30 (; 93 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|31 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 94 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4639,7 +4659,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduce (; 96 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 95 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4697,7 +4717,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|32 (; 97 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 96 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4709,7 +4729,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|33 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 97 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4718,12 +4738,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|34 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|34 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4731,12 +4751,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|36 (; 101 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|36 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 102 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 101 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4781,12 +4801,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|37 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|37 (; 102 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|38 (; 104 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|38 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4798,7 +4818,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduceRight (; 105 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 104 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4843,7 +4863,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|39 (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|39 (; 105 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4855,7 +4875,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|40 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|40 (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4864,12 +4884,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|41 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|41 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|42 (; 109 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|42 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4877,7 +4897,7 @@ local.get $1 i32.add ) - (func $~lib/math/murmurHash3 (; 110 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 109 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -4906,7 +4926,7 @@ local.set $0 local.get $0 ) - (func $~lib/math/splitMix32 (; 111 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 110 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -4941,7 +4961,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 112 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 111 ;) (type $FUNCSIG$vj) (param $0 i64) local.get $0 i64.eqz if @@ -4970,7 +4990,7 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/util/sort/insertionSort (; 113 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 112 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f32) (local $5 i32) @@ -5066,7 +5086,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 114 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 113 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5366,7 +5386,7 @@ local.get $10 f32.store ) - (func $~lib/array/Array#sort (; 115 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 114 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -5379,7 +5399,7 @@ if i32.const 0 i32.const 272 - i32.const 393 + i32.const 418 i32.const 4 call $~lib/env/abort unreachable @@ -5452,7 +5472,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 116 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 115 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5485,7 +5505,7 @@ i32.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -5504,12 +5524,12 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/builtins/isNaN (; 118 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 117 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $std/array/isArraysEqual (; 119 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 118 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -5580,7 +5600,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 120 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 119 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) @@ -5676,7 +5696,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 121 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 120 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5976,7 +5996,7 @@ local.get $10 f64.store ) - (func $~lib/array/Array#sort (; 122 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -5989,7 +6009,7 @@ if i32.const 0 i32.const 272 - i32.const 393 + i32.const 418 i32.const 4 call $~lib/env/abort unreachable @@ -6062,7 +6082,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 123 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 122 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -6095,7 +6115,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 124 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 123 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6114,11 +6134,11 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/array/Array#get:length (; 125 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 124 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 126 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 125 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -6128,7 +6148,7 @@ if i32.const 0 i32.const 272 - i32.const 85 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -6141,12 +6161,12 @@ i32.add f64.load ) - (func $~lib/builtins/isNaN (; 127 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 126 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $std/array/isArraysEqual (; 128 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 127 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -6217,7 +6237,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 129 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 128 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6313,7 +6333,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 130 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 129 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6613,7 +6633,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 131 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 130 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6624,7 +6644,7 @@ if i32.const 0 i32.const 272 - i32.const 393 + i32.const 418 i32.const 4 call $~lib/env/abort unreachable @@ -6697,12 +6717,12 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 131 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6721,7 +6741,7 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/util/sort/insertionSort (; 134 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 133 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6817,7 +6837,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 135 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 134 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7117,7 +7137,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7128,7 +7148,7 @@ if i32.const 0 i32.const 272 - i32.const 393 + i32.const 418 i32.const 4 call $~lib/env/abort unreachable @@ -7201,7 +7221,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -7210,7 +7230,7 @@ i32.lt_u i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -7229,27 +7249,64 @@ local.get $1 call $~lib/array/Array#sort ) - (func $std/array/createReverseOrderedArray (; 139 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create (; 138 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/runtime/MAX_BYTELENGTH + i32.const 2 + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 272 + i32.const 44 + i32.const 62 + call $~lib/env/abort + unreachable + end + block $~lib/runtime/MAKEARRAY|inlined.68 (result i32) + local.get $0 + local.set $2 + i32.const 0 + local.set $1 + local.get $2 + local.get $1 + i32.const 4 + i32.const 2 + call $~lib/runtime/doMakeArray + end + local.set $3 + local.get $3 + i32.load offset=4 + i32.const 0 + local.get $3 + i32.load offset=8 + call $~lib/memory/memory.fill + local.get $3 i32.const 0 + i32.store offset=12 + local.get $3 + ) + (func $std/array/createReverseOrderedArray (; 139 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) local.get $0 - call $~lib/array/Array#constructor + call $~lib/array/Array.create local.set $1 block $break|0 i32.const 0 local.set $2 loop $repeat|0 local.get $2 - local.get $1 - call $~lib/array/Array#get:length + local.get $0 i32.lt_s i32.eqz br_if $break|0 local.get $1 local.get $2 - local.get $1 - call $~lib/array/Array#get:length + local.get $0 i32.const 1 i32.sub local.get $2 @@ -7326,25 +7383,22 @@ (func $std/array/createRandomOrderedArray (; 141 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - i32.const 0 local.get $0 - call $~lib/array/Array#constructor + call $~lib/array/Array.create local.set $1 block $break|0 i32.const 0 local.set $2 loop $repeat|0 local.get $2 - local.get $1 - call $~lib/array/Array#get:length + local.get $0 i32.lt_s i32.eqz br_if $break|0 local.get $1 local.get $2 call $~lib/math/NativeMath.random - local.get $1 - call $~lib/array/Array#get:length + local.get $0 f64.convert_i32_s f64.mul i32.trunc_f64_s @@ -7423,7 +7477,7 @@ if i32.const 0 i32.const 152 - i32.const 813 + i32.const 814 i32.const 2 call $~lib/env/abort unreachable @@ -7457,85 +7511,50 @@ local.get $0 i32.sub ) - (func $~lib/array/Array>#constructor (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array.create> (; 150 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 - if (result i32) + global.get $~lib/runtime/MAX_BYTELENGTH + i32.const 2 + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 272 + i32.const 44 + i32.const 62 + call $~lib/env/abort + unreachable + end + block $~lib/runtime/MAKEARRAY>|inlined.0 (result i32) local.get $0 - else - block $~lib/runtime/ALLOCATE|inlined.6 (result i32) - i32.const 16 - local.set $2 - local.get $2 - call $~lib/runtime/doAllocate - end local.set $2 + i32.const 0 + local.set $1 local.get $2 + local.get $1 i32.const 11 - call $~lib/runtime/doRegister + i32.const 2 + call $~lib/runtime/doMakeArray end - local.get $1 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.set $0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.load offset=4 - local.set $2 - local.get $2 - local.get $1 - i32.const 2 - i32.shl - i32.add local.set $3 - block $break|0 - loop $continue|0 - local.get $2 - local.get $3 - i32.lt_u - if - block - local.get $2 - block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) - i32.const 0 - i32.const 0 - call $~lib/array/Array#constructor - local.set $5 - local.get $0 - local.set $4 - local.get $5 - local.get $4 - call $~lib/runtime/doRetain - local.get $5 - end - i32.store - local.get $2 - i32.const 4 - i32.add - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - local.get $1 + local.get $3 + i32.load offset=4 + i32.const 0 + local.get $3 + i32.load offset=8 + call $~lib/memory/memory.fill + local.get $3 + i32.const 0 i32.store offset=12 - local.get $0 - ) - (func $~lib/array/Array>#get:length (; 151 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=12 + local.get $3 ) - (func $~lib/collector/dummy/__gc_release (; 152 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__gc_release (; 151 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/runtime/doRelease (; 153 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/runtime/doRelease (; 152 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 call $~lib/runtime/assertRegistered local.get $1 @@ -7544,11 +7563,26 @@ local.get $1 call $~lib/collector/dummy/__gc_release ) - (func $~lib/array/Array>#__set (; 154 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__set (; 153 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) + local.get $0 + i32.load offset=12 + local.set $3 + local.get $1 + local.get $3 + i32.gt_u + if + i32.const 0 + i32.const 272 + i32.const 109 + i32.const 38 + call $~lib/env/abort + unreachable + end local.get $0 local.get $1 i32.const 1 @@ -7561,44 +7595,41 @@ i32.const 2 i32.shl i32.add - local.set $3 - local.get $3 - i32.load local.set $4 - local.get $2 local.get $4 + i32.load + local.set $5 + local.get $2 + local.get $5 i32.ne if - block $~lib/runtime/RELEASE,Array>>|inlined.0 - local.get $4 - local.set $6 + local.get $5 + i32.const 0 + i32.ne + if + local.get $5 + local.set $7 local.get $0 - local.set $5 + local.set $6 + local.get $7 local.get $6 - i32.const 0 - i32.ne - if - local.get $6 - local.get $5 - call $~lib/runtime/doRelease - end + call $~lib/runtime/doRelease end - local.get $3 - block $~lib/runtime/RETAIN,Array>>|inlined.1 (result i32) + local.get $4 + block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) local.get $2 - local.set $6 + local.set $7 local.get $0 - local.set $5 + local.set $6 + local.get $7 local.get $6 - local.get $5 call $~lib/runtime/doRetain - local.get $6 + local.get $7 end i32.store end local.get $1 - local.get $0 - i32.load offset=12 + local.get $3 i32.ge_s if local.get $0 @@ -7608,64 +7639,38 @@ i32.store offset=12 end ) - (func $~lib/array/Array>#__get (; 155 ;) (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 272 - i32.const 85 - 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/createReverseOrderedNestedArray (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 154 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - i32.const 0 + (local $3 i32) local.get $0 - call $~lib/array/Array>#constructor + call $~lib/array/Array.create> local.set $1 block $break|0 i32.const 0 local.set $2 loop $repeat|0 local.get $2 - local.get $1 - call $~lib/array/Array>#get:length + local.get $0 i32.lt_s i32.eqz br_if $break|0 block - local.get $1 - local.get $2 + i32.const 1 + call $~lib/array/Array.create + local.set $3 + local.get $3 i32.const 0 - i32.const 1 - call $~lib/array/Array#constructor - call $~lib/array/Array>#__set - local.get $1 - local.get $2 - call $~lib/array/Array>#__get - i32.const 0 - local.get $1 - call $~lib/array/Array>#get:length + local.get $0 i32.const 1 i32.sub local.get $2 i32.sub call $~lib/array/Array#__set + local.get $1 + local.get $2 + local.get $3 + call $~lib/array/Array>#__set end local.get $2 i32.const 1 @@ -7678,7 +7683,7 @@ end local.get $1 ) - (func $start:std/array~anonymous|47 (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -7687,7 +7692,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/util/sort/insertionSort> (; 158 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort> (; 156 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7783,7 +7788,7 @@ unreachable end ) - (func $~lib/array/Array>#sort (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7794,7 +7799,7 @@ if i32.const 0 i32.const 272 - i32.const 393 + i32.const 418 i32.const 4 call $~lib/env/abort unreachable @@ -7857,6 +7862,45 @@ end local.get $0 ) + (func $~lib/array/Array>#get:length (; 158 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $~lib/array/Array>#__get (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 272 + i32.const 97 + i32.const 45 + call $~lib/env/abort + unreachable + end + 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 272 + i32.const 100 + 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/isSorted> (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -7915,19 +7959,59 @@ if i32.const 0 i32.const 152 - i32.const 813 + i32.const 814 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/array/Proxy#constructor (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array.create> (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/runtime/MAX_BYTELENGTH + i32.const 2 + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 272 + i32.const 44 + i32.const 62 + call $~lib/env/abort + unreachable + end + block $~lib/runtime/MAKEARRAY>|inlined.0 (result i32) + local.get $0 + local.set $2 + i32.const 0 + local.set $1 + local.get $2 + local.get $1 + i32.const 12 + i32.const 2 + call $~lib/runtime/doMakeArray + end + local.set $3 + local.get $3 + i32.load offset=4 + i32.const 0 + local.get $3 + i32.load offset=8 + call $~lib/memory/memory.fill + local.get $3 + i32.const 0 + i32.store offset=12 + local.get $3 + ) + (func $std/array/Proxy#constructor (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.eqz if block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.8 (result i32) + block $~lib/runtime/ALLOCATE|inlined.5 (result i32) i32.const 4 local.set $2 local.get $2 @@ -7945,86 +8029,26 @@ i32.store local.get $0 ) - (func $~lib/array/Array>#constructor (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/array/Array>#__set (; 164 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) + (local $7 i32) local.get $0 - if (result i32) - local.get $0 - else - block $~lib/runtime/ALLOCATE|inlined.7 (result i32) - i32.const 16 - local.set $2 - local.get $2 - call $~lib/runtime/doAllocate - end - local.set $2 - local.get $2 - i32.const 12 - call $~lib/runtime/doRegister - end - local.get $1 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.set $0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.load offset=4 - local.set $2 - local.get $2 - local.get $1 - i32.const 2 - i32.shl - i32.add + i32.load offset=12 local.set $3 - block $break|0 - loop $continue|0 - local.get $2 - local.get $3 - i32.lt_u - if - block - local.get $2 - block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) - i32.const 0 - i32.const 0 - call $std/array/Proxy#constructor - local.set $5 - local.get $0 - local.set $4 - local.get $5 - local.get $4 - call $~lib/runtime/doRetain - local.get $5 - end - i32.store - local.get $2 - i32.const 4 - i32.add - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 local.get $1 - i32.store offset=12 - local.get $0 - ) - (func $~lib/array/Array>#get:length (; 164 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=12 - ) - (func $~lib/array/Array>#__set (; 165 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + local.get $3 + i32.gt_u + if + i32.const 0 + i32.const 272 + i32.const 109 + i32.const 38 + call $~lib/env/abort + unreachable + end local.get $0 local.get $1 i32.const 1 @@ -8037,44 +8061,41 @@ i32.const 2 i32.shl i32.add - local.set $3 - local.get $3 - i32.load local.set $4 - local.get $2 local.get $4 + i32.load + local.set $5 + local.get $2 + local.get $5 i32.ne if - block $~lib/runtime/RELEASE,Array>>|inlined.0 - local.get $4 - local.set $6 + local.get $5 + i32.const 0 + i32.ne + if + local.get $5 + local.set $7 local.get $0 - local.set $5 + local.set $6 + local.get $7 local.get $6 - i32.const 0 - i32.ne - if - local.get $6 - local.get $5 - call $~lib/runtime/doRelease - end + call $~lib/runtime/doRelease end - local.get $3 - block $~lib/runtime/RETAIN,Array>>|inlined.1 (result i32) + local.get $4 + block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) local.get $2 - local.set $6 + local.set $7 local.get $0 - local.set $5 + local.set $6 + local.get $7 local.get $6 - local.get $5 call $~lib/runtime/doRetain - local.get $6 + local.get $7 end i32.store end local.get $1 - local.get $0 - i32.load offset=12 + local.get $3 i32.ge_s if local.get $0 @@ -8084,28 +8105,25 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedElementsArray (; 166 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 165 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - i32.const 0 local.get $0 - call $~lib/array/Array>#constructor + call $~lib/array/Array.create> local.set $1 block $break|0 i32.const 0 local.set $2 loop $repeat|0 local.get $2 - local.get $1 - call $~lib/array/Array>#get:length + local.get $0 i32.lt_s i32.eqz br_if $break|0 local.get $1 local.get $2 i32.const 0 - local.get $1 - call $~lib/array/Array>#get:length + local.get $0 i32.const 1 i32.sub local.get $2 @@ -8123,14 +8141,14 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/util/sort/insertionSort> (; 168 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort> (; 167 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8226,7 +8244,7 @@ unreachable end ) - (func $~lib/array/Array>#sort (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8237,7 +8255,7 @@ if i32.const 0 i32.const 272 - i32.const 393 + i32.const 418 i32.const 4 call $~lib/env/abort unreachable @@ -8300,7 +8318,23 @@ end local.get $0 ) + (func $~lib/array/Array>#get:length (; 169 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) (func $~lib/array/Array>#__get (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 272 + i32.const 97 + i32.const 45 + call $~lib/env/abort + unreachable + end local.get $1 local.get $0 i32.load offset=8 @@ -8310,7 +8344,7 @@ if i32.const 0 i32.const 272 - i32.const 85 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -8381,7 +8415,7 @@ if i32.const 0 i32.const 152 - i32.const 813 + i32.const 814 i32.const 2 call $~lib/env/abort unreachable @@ -8494,7 +8528,7 @@ if i32.const 0 i32.const 272 - i32.const 393 + i32.const 418 i32.const 4 call $~lib/env/abort unreachable @@ -8562,6 +8596,18 @@ i32.load offset=12 ) (func $~lib/array/Array#__get (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 272 + i32.const 97 + i32.const 45 + call $~lib/env/abort + unreachable + end local.get $1 local.get $0 i32.load offset=8 @@ -8571,7 +8617,7 @@ if i32.const 0 i32.const 272 - i32.const 85 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -8642,7 +8688,7 @@ if i32.const 0 i32.const 152 - i32.const 813 + i32.const 814 i32.const 2 call $~lib/env/abort unreachable @@ -8908,63 +8954,45 @@ end i32.const 1 ) - (func $~lib/array/Array#constructor (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array.create (; 186 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 - if (result i32) + global.get $~lib/runtime/MAX_BYTELENGTH + i32.const 2 + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 272 + i32.const 44 + i32.const 62 + call $~lib/env/abort + unreachable + end + block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) local.get $0 - else - block $~lib/runtime/ALLOCATE|inlined.9 (result i32) - i32.const 16 - local.set $2 - local.get $2 - call $~lib/runtime/doAllocate - end local.set $2 + i32.const 0 + local.set $1 local.get $2 + local.get $1 i32.const 14 - call $~lib/runtime/doRegister + i32.const 2 + call $~lib/runtime/doMakeArray end - local.get $1 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.set $0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.load offset=4 - local.set $2 - local.get $2 - local.get $1 - i32.const 2 - i32.shl - i32.add local.set $3 - block $break|0 - loop $continue|0 - local.get $2 - local.get $3 - i32.lt_u - if - block - local.get $2 - i32.const 4200 - i32.store - local.get $2 - i32.const 4 - i32.add - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - local.get $1 + local.get $3 + i32.load offset=4 + i32.const 0 + local.get $3 + i32.load offset=8 + call $~lib/memory/memory.fill + local.get $3 + i32.const 0 i32.store offset=12 - local.get $0 + local.get $3 ) (func $~lib/string/String#charAt (; 187 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -8976,7 +9004,7 @@ if i32.const 0 i32.const 4376 - i32.const 36 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -8989,7 +9017,7 @@ i32.const 4200 return end - block $~lib/runtime/ALLOCATE|inlined.10 (result i32) + block $~lib/runtime/ALLOCATE|inlined.6 (result i32) i32.const 2 local.set $2 local.get $2 @@ -9046,7 +9074,7 @@ i32.const 4200 return end - block $~lib/runtime/ALLOCATE|inlined.11 (result i32) + block $~lib/runtime/ALLOCATE|inlined.7 (result i32) local.get $4 local.set $5 local.get $5 @@ -9128,6 +9156,21 @@ (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) + local.get $0 + i32.load offset=12 + local.set $3 + local.get $1 + local.get $3 + i32.gt_u + if + i32.const 0 + i32.const 272 + i32.const 109 + i32.const 38 + call $~lib/env/abort + unreachable + end local.get $0 local.get $1 i32.const 1 @@ -9140,44 +9183,41 @@ i32.const 2 i32.shl i32.add - local.set $3 - local.get $3 - i32.load local.set $4 - local.get $2 local.get $4 + i32.load + local.set $5 + local.get $2 + local.get $5 i32.ne if - block $~lib/runtime/RELEASE>|inlined.0 - local.get $4 - local.set $6 + local.get $5 + i32.const 0 + i32.ne + if + local.get $5 + local.set $7 local.get $0 - local.set $5 + local.set $6 + local.get $7 local.get $6 - i32.const 0 - i32.ne - if - local.get $6 - local.get $5 - call $~lib/runtime/doRelease - end + call $~lib/runtime/doRelease end - local.get $3 + local.get $4 block $~lib/runtime/RETAIN>|inlined.0 (result i32) local.get $2 - local.set $6 + local.set $7 local.get $0 - local.set $5 + local.set $6 + local.get $7 local.get $6 - local.get $5 call $~lib/runtime/doRetain - local.get $6 + local.get $7 end i32.store end local.get $1 - local.get $0 - i32.load offset=12 + local.get $3 i32.ge_s if local.get $0 @@ -9190,17 +9230,15 @@ (func $std/array/createRandomStringArray (; 192 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - i32.const 0 local.get $0 - call $~lib/array/Array#constructor + call $~lib/array/Array.create local.set $1 block $break|0 i32.const 0 local.set $2 loop $repeat|0 local.get $2 - local.get $1 - call $~lib/array/Array#get:length + local.get $0 i32.lt_s i32.eqz br_if $break|0 @@ -9239,7 +9277,7 @@ if i32.const 0 i32.const 4376 - i32.const 186 + i32.const 187 i32.const 4 call $~lib/env/abort unreachable @@ -9328,7 +9366,7 @@ local.get $0 return end - block $~lib/runtime/ALLOCATE|inlined.13 (result i32) + block $~lib/runtime/ALLOCATE|inlined.9 (result i32) local.get $3 local.set $4 local.get $4 @@ -9408,7 +9446,7 @@ local.get $5 i32.add local.set $6 - block $~lib/runtime/ALLOCATE|inlined.12 (result i32) + block $~lib/runtime/ALLOCATE|inlined.8 (result i32) local.get $6 i32.const 1 i32.shl @@ -9791,7 +9829,7 @@ local.get $1 i32.add local.set $2 - block $~lib/runtime/ALLOCATE|inlined.14 (result i32) + block $~lib/runtime/ALLOCATE|inlined.10 (result i32) local.get $2 i32.const 1 i32.shl @@ -9934,7 +9972,7 @@ i32.const 11 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.15 (result i32) + block $~lib/runtime/ALLOCATE|inlined.11 (result i32) local.get $5 i32.const 1 i32.shl @@ -10057,7 +10095,7 @@ local.get $0 call $~lib/util/number/decimalCount32 local.set $1 - block $~lib/runtime/ALLOCATE|inlined.16 (result i32) + block $~lib/runtime/ALLOCATE|inlined.12 (result i32) local.get $1 i32.const 1 i32.shl @@ -10174,7 +10212,7 @@ i32.const 10 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.17 (result i32) + block $~lib/runtime/ALLOCATE|inlined.13 (result i32) local.get $5 i32.const 1 i32.shl @@ -11669,7 +11707,7 @@ select return end - block $~lib/runtime/ALLOCATE|inlined.18 (result i32) + block $~lib/runtime/ALLOCATE|inlined.14 (result i32) i32.const 28 i32.const 1 i32.shl @@ -11813,7 +11851,7 @@ i32.const 28 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.19 (result i32) + block $~lib/runtime/ALLOCATE|inlined.15 (result i32) local.get $5 i32.const 1 i32.shl @@ -12003,7 +12041,7 @@ end i32.const 0 local.set $9 - block $~lib/runtime/ALLOCATE|inlined.20 (result i32) + block $~lib/runtime/ALLOCATE|inlined.16 (result i32) local.get $5 local.get $4 local.get $2 @@ -12125,7 +12163,7 @@ i32.eqz if block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.21 (result i32) + block $~lib/runtime/ALLOCATE|inlined.17 (result i32) i32.const 0 local.set $1 local.get $1 @@ -12140,36 +12178,7 @@ end local.get $0 ) - (func $~lib/array/Array#constructor (; 220 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - if (result i32) - local.get $0 - else - block $~lib/runtime/ALLOCATE|inlined.22 (result i32) - i32.const 16 - local.set $2 - local.get $2 - call $~lib/runtime/doAllocate - end - local.set $2 - local.get $2 - i32.const 19 - call $~lib/runtime/doRegister - end - local.get $1 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.set $0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - local.get $1 - i32.store offset=12 - local.get $0 - ) - (func $~lib/array/Array#join_ref (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_ref (; 220 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12211,7 +12220,7 @@ i32.const 15 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.23 (result i32) + block $~lib/runtime/ALLOCATE|inlined.18 (result i32) local.get $5 i32.const 1 i32.shl @@ -12331,18 +12340,18 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_ref return ) - (func $~lib/array/Array#toString (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 222 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa (; 224 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -12351,7 +12360,7 @@ call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 224 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12426,7 +12435,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12470,7 +12479,7 @@ i32.const 11 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.24 (result i32) + block $~lib/runtime/ALLOCATE|inlined.19 (result i32) local.get $5 i32.const 1 i32.shl @@ -12572,25 +12581,25 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 227 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 228 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 227 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa (; 229 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 228 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 65535 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 230 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 229 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12635,7 +12644,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 231 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 230 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12679,7 +12688,7 @@ i32.const 10 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.25 (result i32) + block $~lib/runtime/ALLOCATE|inlined.20 (result i32) local.get $5 i32.const 1 i32.shl @@ -12781,18 +12790,18 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 232 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 231 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 233 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 232 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/decimalCount64 (; 234 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 233 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -12861,7 +12870,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 235 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 234 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -12989,7 +12998,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 236 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 235 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13014,7 +13023,7 @@ local.get $2 call $~lib/util/number/decimalCount32 local.set $3 - block $~lib/runtime/ALLOCATE|inlined.26 (result i32) + block $~lib/runtime/ALLOCATE|inlined.21 (result i32) local.get $3 i32.const 1 i32.shl @@ -13039,7 +13048,7 @@ local.get $0 call $~lib/util/number/decimalCount64 local.set $3 - block $~lib/runtime/ALLOCATE|inlined.27 (result i32) + block $~lib/runtime/ALLOCATE|inlined.22 (result i32) local.get $3 i32.const 1 i32.shl @@ -13069,12 +13078,12 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa (; 237 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 236 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/utoa64 return ) - (func $~lib/util/number/itoa_stream (; 238 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 237 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13140,7 +13149,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 239 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13184,7 +13193,7 @@ i32.const 20 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.28 (result i32) + block $~lib/runtime/ALLOCATE|inlined.23 (result i32) local.get $5 i32.const 1 i32.shl @@ -13286,18 +13295,18 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 240 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 239 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 241 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 240 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa64 (; 242 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 241 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13336,7 +13345,7 @@ local.get $1 i32.add local.set $4 - block $~lib/runtime/ALLOCATE|inlined.29 (result i32) + block $~lib/runtime/ALLOCATE|inlined.24 (result i32) local.get $4 i32.const 1 i32.shl @@ -13363,7 +13372,7 @@ local.get $1 i32.add local.set $4 - block $~lib/runtime/ALLOCATE|inlined.30 (result i32) + block $~lib/runtime/ALLOCATE|inlined.25 (result i32) local.get $4 i32.const 1 i32.shl @@ -13399,12 +13408,12 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa (; 243 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 242 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/itoa64 return ) - (func $~lib/util/number/itoa_stream (; 244 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 243 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13492,7 +13501,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 245 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 244 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13536,7 +13545,7 @@ i32.const 21 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.31 (result i32) + block $~lib/runtime/ALLOCATE|inlined.26 (result i32) local.get $5 i32.const 1 i32.shl @@ -13638,23 +13647,23 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 245 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 246 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array#toString (; 248 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array>#join_arr (; 249 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 248 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13758,125 +13767,25 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 249 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>#toString (; 251 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#toString (; 250 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array>#join ) - (func $~lib/array/Array#constructor (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - if (result i32) - local.get $0 - else - block $~lib/runtime/ALLOCATE|inlined.33 (result i32) - i32.const 16 - local.set $2 - local.get $2 - call $~lib/runtime/doAllocate - end - local.set $2 - local.get $2 - i32.const 7 - call $~lib/runtime/doRegister - end - local.get $1 - i32.const 0 - call $~lib/runtime/ArrayBufferView#constructor - local.set $0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - local.get $1 - i32.store offset=12 - local.get $0 - ) - (func $~lib/array/Array>#constructor (; 253 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - if (result i32) - local.get $0 - else - block $~lib/runtime/ALLOCATE|inlined.32 (result i32) - i32.const 16 - local.set $2 - local.get $2 - call $~lib/runtime/doAllocate - end - local.set $2 - local.get $2 - i32.const 23 - call $~lib/runtime/doRegister - end - local.get $1 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.set $0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.load offset=4 - local.set $2 - local.get $2 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.set $3 - block $break|0 - loop $continue|0 - local.get $2 - local.get $3 - i32.lt_u - if - block - local.get $2 - block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) - i32.const 0 - i32.const 0 - call $~lib/array/Array#constructor - local.set $5 - local.get $0 - local.set $4 - local.get $5 - local.get $4 - call $~lib/runtime/doRetain - local.get $5 - end - i32.store - local.get $2 - i32.const 4 - i32.add - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - local.get $1 - i32.store offset=12 - local.get $0 - ) - (func $~lib/util/number/itoa (; 254 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 251 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 255 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 252 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13921,7 +13830,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 253 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13965,7 +13874,7 @@ i32.const 10 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.34 (result i32) + block $~lib/runtime/ALLOCATE|inlined.27 (result i32) local.get $5 i32.const 1 i32.shl @@ -14067,13 +13976,13 @@ call $~lib/runtime/doRegister end ) - (func $~lib/array/Array#join (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 254 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array>#join_arr (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14177,195 +14086,24 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>#toString (; 260 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#toString (; 257 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array>#join ) - (func $~lib/array/Array#constructor (; 261 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - local.get $0 - if (result i32) - local.get $0 - else - block $~lib/runtime/ALLOCATE|inlined.36 (result i32) - i32.const 16 - local.set $2 - local.get $2 - call $~lib/runtime/doAllocate - end - local.set $2 - local.get $2 - i32.const 8 - call $~lib/runtime/doRegister - end - local.get $1 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.set $0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - local.get $1 - i32.store offset=12 - local.get $0 - ) - (func $~lib/array/Array>#constructor (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - if (result i32) - local.get $0 - else - block $~lib/runtime/ALLOCATE|inlined.35 (result i32) - i32.const 16 - local.set $2 - local.get $2 - call $~lib/runtime/doAllocate - end - local.set $2 - local.get $2 - i32.const 24 - call $~lib/runtime/doRegister - end - local.get $1 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.set $0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.load offset=4 - local.set $2 - local.get $2 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.set $3 - block $break|0 - loop $continue|0 - local.get $2 - local.get $3 - i32.lt_u - if - block - local.get $2 - block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) - i32.const 0 - i32.const 0 - call $~lib/array/Array#constructor - local.set $5 - local.get $0 - local.set $4 - local.get $5 - local.get $4 - call $~lib/runtime/doRetain - local.get $5 - end - i32.store - local.get $2 - i32.const 4 - i32.add - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - local.get $1 - i32.store offset=12 - local.get $0 - ) - (func $~lib/array/Array>>#constructor (; 263 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - if (result i32) - local.get $0 - else - block $~lib/runtime/ALLOCATE|inlined.37 (result i32) - i32.const 16 - local.set $2 - local.get $2 - call $~lib/runtime/doAllocate - end - local.set $2 - local.get $2 - i32.const 25 - call $~lib/runtime/doRegister - end - local.get $1 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.set $0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.load offset=4 - local.set $2 - local.get $2 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.set $3 - block $break|0 - loop $continue|0 - local.get $2 - local.get $3 - i32.lt_u - if - block - local.get $2 - block $~lib/runtime/RETAIN>,Array>>>|inlined.0 (result i32) - i32.const 0 - i32.const 0 - call $~lib/array/Array>#constructor - local.set $5 - local.get $0 - local.set $4 - local.get $5 - local.get $4 - call $~lib/runtime/doRetain - local.get $5 - end - i32.store - local.get $2 - i32.const 4 - i32.add - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - local.get $1 - i32.store offset=12 - local.get $0 - ) - (func $~lib/array/Array>#join_arr (; 264 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) local.get $0 i32.load offset=12 i32.const 1 @@ -14463,13 +14201,13 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 265 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>>#join_arr (; 266 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#join_arr (; 260 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14573,23 +14311,24 @@ end local.get $3 ) - (func $~lib/array/Array>>#join (; 267 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#join (; 261 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>>#join_arr return ) - (func $~lib/array/Array>>#toString (; 268 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>>#toString (; 262 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array>>#join ) - (func $start:std/array (; 269 ;) (type $FUNCSIG$v) + (func $start:std/array (; 263 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -14692,13 +14431,16 @@ call $~lib/array/Array#fill drop global.get $std/array/arr8 - block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) - i32.const 248 + block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) + i32.const 5 local.set $0 + i32.const 248 + local.set $1 local.get $0 + local.get $1 i32.const 7 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -14718,13 +14460,16 @@ call $~lib/array/Array#fill drop global.get $std/array/arr8 - block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) + i32.const 5 + local.set $1 i32.const 320 local.set $0 + local.get $1 local.get $0 i32.const 7 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -14744,13 +14489,16 @@ call $~lib/array/Array#fill drop global.get $std/array/arr8 - block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) - i32.const 344 + block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) + i32.const 5 local.set $0 + i32.const 344 + local.set $1 local.get $0 + local.get $1 i32.const 7 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -14770,13 +14518,16 @@ call $~lib/array/Array#fill drop global.get $std/array/arr8 - block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.3 (result i32) + i32.const 5 + local.set $1 i32.const 368 local.set $0 + local.get $1 local.get $0 i32.const 7 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -14796,13 +14547,16 @@ call $~lib/array/Array#fill drop global.get $std/array/arr8 - block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) - i32.const 392 + block $~lib/runtime/MAKEARRAY|inlined.4 (result i32) + i32.const 5 local.set $0 + i32.const 392 + local.set $1 local.get $0 + local.get $1 i32.const 7 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -14822,13 +14576,16 @@ call $~lib/array/Array#fill drop global.get $std/array/arr32 - block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) + i32.const 5 + local.set $1 i32.const 488 local.set $0 + local.get $1 local.get $0 i32.const 8 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -14848,13 +14605,16 @@ call $~lib/array/Array#fill drop global.get $std/array/arr32 - block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 528 + block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) + i32.const 5 local.set $0 + i32.const 528 + local.set $1 local.get $0 + local.get $1 i32.const 8 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -14874,13 +14634,16 @@ call $~lib/array/Array#fill drop global.get $std/array/arr32 - block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) + i32.const 5 + local.set $1 i32.const 568 local.set $0 + local.get $1 local.get $0 i32.const 8 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -14900,13 +14663,16 @@ call $~lib/array/Array#fill drop global.get $std/array/arr32 - block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) - i32.const 608 + block $~lib/runtime/MAKEARRAY|inlined.3 (result i32) + i32.const 5 local.set $0 + i32.const 608 + local.set $1 local.get $0 + local.get $1 i32.const 8 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -14926,13 +14692,16 @@ call $~lib/array/Array#fill drop global.get $std/array/arr32 - block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.4 (result i32) + i32.const 5 + local.set $1 i32.const 648 local.set $0 + local.get $1 local.get $0 i32.const 8 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -15278,13 +15047,16 @@ unreachable end global.get $std/array/out - block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) - i32.const 688 + block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) + i32.const 0 local.set $0 + i32.const 688 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $~lib/array/Array#concat drop @@ -15554,13 +15326,16 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) + i32.const 5 + local.set $1 i32.const 752 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15568,13 +15343,16 @@ i32.const 3 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin - block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) - i32.const 792 + block $~lib/runtime/MAKEARRAY|inlined.3 (result i32) + i32.const 5 local.set $0 + i32.const 792 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -15587,13 +15365,16 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.4 (result i32) + i32.const 5 + local.set $1 i32.const 832 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15601,13 +15382,16 @@ i32.const 3 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin - block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) - i32.const 872 + block $~lib/runtime/MAKEARRAY|inlined.5 (result i32) + i32.const 5 local.set $0 + i32.const 872 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -15620,13 +15404,16 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.5 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.6 (result i32) + i32.const 5 + local.set $1 i32.const 912 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15634,13 +15421,16 @@ i32.const 2 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin - block $~lib/runtime/WRAPARRAY|inlined.6 (result i32) - i32.const 952 + block $~lib/runtime/MAKEARRAY|inlined.7 (result i32) + i32.const 5 local.set $0 + i32.const 952 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -15653,13 +15443,16 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.7 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.8 (result i32) + i32.const 5 + local.set $1 i32.const 992 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15667,13 +15460,16 @@ i32.const 2 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin - block $~lib/runtime/WRAPARRAY|inlined.8 (result i32) - i32.const 1032 + block $~lib/runtime/MAKEARRAY|inlined.9 (result i32) + i32.const 5 local.set $0 + i32.const 1032 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -15686,13 +15482,16 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.9 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.10 (result i32) + i32.const 5 + local.set $1 i32.const 1072 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15700,13 +15499,16 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - block $~lib/runtime/WRAPARRAY|inlined.10 (result i32) - i32.const 1112 + block $~lib/runtime/MAKEARRAY|inlined.11 (result i32) + i32.const 5 local.set $0 + i32.const 1112 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -15719,13 +15521,16 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.11 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.12 (result i32) + i32.const 5 + local.set $1 i32.const 1152 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15733,13 +15538,16 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - block $~lib/runtime/WRAPARRAY|inlined.12 (result i32) - i32.const 1192 + block $~lib/runtime/MAKEARRAY|inlined.13 (result i32) + i32.const 5 local.set $0 + i32.const 1192 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -15752,13 +15560,16 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.13 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.14 (result i32) + i32.const 5 + local.set $1 i32.const 1232 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15766,13 +15577,16 @@ i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - block $~lib/runtime/WRAPARRAY|inlined.14 (result i32) - i32.const 1272 + block $~lib/runtime/MAKEARRAY|inlined.15 (result i32) + i32.const 5 local.set $0 + i32.const 1272 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -15785,13 +15599,16 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.15 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.16 (result i32) + i32.const 5 + local.set $1 i32.const 1312 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15799,13 +15616,16 @@ i32.const -2 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin - block $~lib/runtime/WRAPARRAY|inlined.16 (result i32) - i32.const 1352 + block $~lib/runtime/MAKEARRAY|inlined.17 (result i32) + i32.const 5 local.set $0 + i32.const 1352 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -15818,13 +15638,16 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.17 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.18 (result i32) + i32.const 5 + local.set $1 i32.const 1392 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15832,13 +15655,16 @@ i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - block $~lib/runtime/WRAPARRAY|inlined.18 (result i32) - i32.const 1432 + block $~lib/runtime/MAKEARRAY|inlined.19 (result i32) + i32.const 5 local.set $0 + i32.const 1432 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -15851,13 +15677,16 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.19 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.20 (result i32) + i32.const 5 + local.set $1 i32.const 1472 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15865,13 +15694,16 @@ i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - block $~lib/runtime/WRAPARRAY|inlined.20 (result i32) - i32.const 1512 + block $~lib/runtime/MAKEARRAY|inlined.21 (result i32) + i32.const 5 local.set $0 - local.get $0 + i32.const 1512 + local.set $1 + local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -15884,13 +15716,16 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.21 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.22 (result i32) + i32.const 5 + local.set $1 i32.const 1552 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15898,13 +15733,16 @@ i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - block $~lib/runtime/WRAPARRAY|inlined.22 (result i32) - i32.const 1592 + block $~lib/runtime/MAKEARRAY|inlined.23 (result i32) + i32.const 5 local.set $0 + i32.const 1592 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -15917,13 +15755,16 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.23 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.24 (result i32) + i32.const 5 + local.set $1 i32.const 1632 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15931,13 +15772,16 @@ i32.const -3 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin - block $~lib/runtime/WRAPARRAY|inlined.24 (result i32) - i32.const 1672 + block $~lib/runtime/MAKEARRAY|inlined.25 (result i32) + i32.const 5 local.set $0 + i32.const 1672 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -16798,13 +16642,16 @@ i32.const 0 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#splice - block $~lib/runtime/WRAPARRAY|inlined.25 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.27 (result i32) + i32.const 5 + local.set $1 i32.const 1784 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -16818,13 +16665,16 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/WRAPARRAY|inlined.26 (result i32) - i32.const 1824 + block $~lib/runtime/MAKEARRAY|inlined.28 (result i32) + i32.const 0 local.set $0 + i32.const 1824 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -16837,26 +16687,32 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.27 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.29 (result i32) + i32.const 5 + local.set $1 i32.const 1840 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/sarr global.get $std/array/sarr i32.const 2 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#splice - block $~lib/runtime/WRAPARRAY|inlined.28 (result i32) - i32.const 1880 + block $~lib/runtime/MAKEARRAY|inlined.30 (result i32) + i32.const 3 local.set $0 + i32.const 1880 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -16870,13 +16726,16 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/WRAPARRAY|inlined.29 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.31 (result i32) + i32.const 2 + local.set $1 i32.const 1912 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -16889,26 +16748,32 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.30 (result i32) - i32.const 1936 + block $~lib/runtime/MAKEARRAY|inlined.32 (result i32) + i32.const 5 local.set $0 + i32.const 1936 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/sarr global.get $std/array/sarr i32.const 2 i32.const 2 call $~lib/array/Array#splice - block $~lib/runtime/WRAPARRAY|inlined.31 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.33 (result i32) + i32.const 2 + local.set $1 i32.const 1976 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -16922,13 +16787,16 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/WRAPARRAY|inlined.32 (result i32) - i32.const 2000 + block $~lib/runtime/MAKEARRAY|inlined.34 (result i32) + i32.const 3 local.set $0 + i32.const 2000 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -16941,26 +16809,32 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.33 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.35 (result i32) + i32.const 5 + local.set $1 i32.const 2032 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/sarr global.get $std/array/sarr i32.const 0 i32.const 1 call $~lib/array/Array#splice - block $~lib/runtime/WRAPARRAY|inlined.34 (result i32) - i32.const 2072 + block $~lib/runtime/MAKEARRAY|inlined.36 (result i32) + i32.const 1 local.set $0 + i32.const 2072 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -16974,13 +16848,16 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/WRAPARRAY|inlined.35 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.37 (result i32) + i32.const 4 + local.set $1 i32.const 2096 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -16993,26 +16870,32 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.36 (result i32) - i32.const 2128 + block $~lib/runtime/MAKEARRAY|inlined.38 (result i32) + i32.const 5 local.set $0 + i32.const 2128 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/sarr global.get $std/array/sarr i32.const -1 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#splice - block $~lib/runtime/WRAPARRAY|inlined.37 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.39 (result i32) + i32.const 1 + local.set $1 i32.const 2168 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -17026,13 +16909,16 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/WRAPARRAY|inlined.38 (result i32) - i32.const 2192 + block $~lib/runtime/MAKEARRAY|inlined.40 (result i32) + i32.const 4 local.set $0 + i32.const 2192 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -17045,26 +16931,32 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.39 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.41 (result i32) + i32.const 5 + local.set $1 i32.const 2224 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/sarr global.get $std/array/sarr i32.const -2 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#splice - block $~lib/runtime/WRAPARRAY|inlined.40 (result i32) - i32.const 2264 + block $~lib/runtime/MAKEARRAY|inlined.42 (result i32) + i32.const 2 local.set $0 + i32.const 2264 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -17078,13 +16970,16 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/WRAPARRAY|inlined.41 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.43 (result i32) + i32.const 3 + local.set $1 i32.const 2288 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -17097,26 +16992,32 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.42 (result i32) - i32.const 2320 + block $~lib/runtime/MAKEARRAY|inlined.44 (result i32) + i32.const 5 local.set $0 + i32.const 2320 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const 1 call $~lib/array/Array#splice - block $~lib/runtime/WRAPARRAY|inlined.43 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.45 (result i32) + i32.const 1 + local.set $1 i32.const 2360 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -17130,13 +17031,16 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/WRAPARRAY|inlined.44 (result i32) - i32.const 2384 + block $~lib/runtime/MAKEARRAY|inlined.46 (result i32) + i32.const 4 local.set $0 + i32.const 2384 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -17149,26 +17053,32 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.45 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.47 (result i32) + i32.const 5 + local.set $1 i32.const 2416 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/sarr global.get $std/array/sarr i32.const -7 i32.const 1 call $~lib/array/Array#splice - block $~lib/runtime/WRAPARRAY|inlined.46 (result i32) - i32.const 2456 + block $~lib/runtime/MAKEARRAY|inlined.48 (result i32) + i32.const 1 local.set $0 + i32.const 2456 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -17182,13 +17092,16 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/WRAPARRAY|inlined.47 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.49 (result i32) + i32.const 4 + local.set $1 i32.const 2480 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -17201,26 +17114,32 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.48 (result i32) - i32.const 2512 + block $~lib/runtime/MAKEARRAY|inlined.50 (result i32) + i32.const 5 local.set $0 + i32.const 2512 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const -1 call $~lib/array/Array#splice - block $~lib/runtime/WRAPARRAY|inlined.49 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.51 (result i32) + i32.const 0 + local.set $1 i32.const 2552 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -17234,13 +17153,16 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/WRAPARRAY|inlined.50 (result i32) - i32.const 2568 + block $~lib/runtime/MAKEARRAY|inlined.52 (result i32) + i32.const 5 local.set $0 + i32.const 2568 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -17253,26 +17175,32 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.51 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.53 (result i32) + i32.const 5 + local.set $1 i32.const 2608 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/sarr global.get $std/array/sarr i32.const 1 i32.const -2 call $~lib/array/Array#splice - block $~lib/runtime/WRAPARRAY|inlined.52 (result i32) - i32.const 2648 + block $~lib/runtime/MAKEARRAY|inlined.54 (result i32) + i32.const 0 local.set $0 + i32.const 2648 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -17286,13 +17214,16 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/WRAPARRAY|inlined.53 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.55 (result i32) + i32.const 5 + local.set $1 i32.const 2664 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -17305,26 +17236,32 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.54 (result i32) - i32.const 2704 + block $~lib/runtime/MAKEARRAY|inlined.56 (result i32) + i32.const 5 local.set $0 + i32.const 2704 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/sarr global.get $std/array/sarr i32.const 4 i32.const 0 call $~lib/array/Array#splice - block $~lib/runtime/WRAPARRAY|inlined.55 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.57 (result i32) + i32.const 0 + local.set $1 i32.const 2744 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -17338,13 +17275,16 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/WRAPARRAY|inlined.56 (result i32) - i32.const 2760 + block $~lib/runtime/MAKEARRAY|inlined.58 (result i32) + i32.const 5 local.set $0 + i32.const 2760 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -17357,26 +17297,32 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.57 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.59 (result i32) + i32.const 5 + local.set $1 i32.const 2800 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 0 call $~lib/array/Array#splice - block $~lib/runtime/WRAPARRAY|inlined.58 (result i32) - i32.const 2840 + block $~lib/runtime/MAKEARRAY|inlined.60 (result i32) + i32.const 0 local.set $0 + i32.const 2840 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -17390,13 +17336,16 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/WRAPARRAY|inlined.59 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.61 (result i32) + i32.const 5 + local.set $1 i32.const 2856 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -17409,26 +17358,32 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.60 (result i32) - i32.const 2896 + block $~lib/runtime/MAKEARRAY|inlined.62 (result i32) + i32.const 5 local.set $0 + i32.const 2896 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 5 call $~lib/array/Array#splice - block $~lib/runtime/WRAPARRAY|inlined.61 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.63 (result i32) + i32.const 0 + local.set $1 i32.const 2936 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -17442,13 +17397,16 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/WRAPARRAY|inlined.62 (result i32) - i32.const 2952 + block $~lib/runtime/MAKEARRAY|inlined.64 (result i32) + i32.const 5 local.set $0 + i32.const 2952 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -18003,9 +17961,9 @@ end block $break|0 i32.const 0 - local.set $0 + local.set $1 loop $repeat|0 - local.get $0 + local.get $1 i32.const 100 i32.lt_s i32.eqz @@ -18013,10 +17971,10 @@ global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $repeat|0 unreachable end @@ -18647,13 +18605,16 @@ end drop global.get $std/array/f32ArrayTyped - block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) + i32.const 8 + local.set $1 i32.const 3304 local.set $0 + local.get $1 local.get $0 i32.const 9 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -18661,7 +18622,7 @@ if i32.const 0 i32.const 152 - i32.const 824 + i32.const 825 i32.const 0 call $~lib/env/abort unreachable @@ -18675,13 +18636,16 @@ end drop global.get $std/array/f64ArrayTyped - block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) - i32.const 3464 + block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) + i32.const 8 local.set $0 + i32.const 3464 + local.set $1 local.get $0 + local.get $1 i32.const 10 i32.const 3 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -18689,7 +18653,7 @@ if i32.const 0 i32.const 152 - i32.const 828 + i32.const 829 i32.const 0 call $~lib/env/abort unreachable @@ -18703,13 +18667,16 @@ end drop global.get $std/array/i32ArrayTyped - block $~lib/runtime/WRAPARRAY|inlined.63 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.67 (result i32) + i32.const 5 + local.set $1 i32.const 3616 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -18717,7 +18684,7 @@ if i32.const 0 i32.const 152 - i32.const 832 + i32.const 833 i32.const 0 call $~lib/env/abort unreachable @@ -18731,13 +18698,16 @@ end drop global.get $std/array/u32ArrayTyped - block $~lib/runtime/WRAPARRAY|inlined.5 (result i32) - i32.const 3728 + block $~lib/runtime/MAKEARRAY|inlined.5 (result i32) + i32.const 5 local.set $0 + i32.const 3728 + local.set $1 local.get $0 + local.get $1 i32.const 8 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -18745,7 +18715,7 @@ if i32.const 0 i32.const 152 - i32.const 836 + i32.const 837 i32.const 0 call $~lib/env/abort unreachable @@ -18770,13 +18740,16 @@ global.get $std/array/reversed1 call $std/array/assertSortedDefault global.get $std/array/reversed1 - block $~lib/runtime/WRAPARRAY|inlined.64 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.69 (result i32) + i32.const 1 + local.set $1 i32.const 4056 local.set $0 + local.get $1 local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -18784,7 +18757,7 @@ if i32.const 0 i32.const 152 - i32.const 856 + i32.const 857 i32.const 0 call $~lib/env/abort unreachable @@ -18792,13 +18765,16 @@ global.get $std/array/reversed2 call $std/array/assertSortedDefault global.get $std/array/reversed2 - block $~lib/runtime/WRAPARRAY|inlined.65 (result i32) - i32.const 4080 + block $~lib/runtime/MAKEARRAY|inlined.70 (result i32) + i32.const 2 local.set $0 + i32.const 4080 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 0 call $std/array/isArraysEqual @@ -18806,7 +18782,7 @@ if i32.const 0 i32.const 152 - i32.const 859 + i32.const 860 i32.const 0 call $~lib/env/abort unreachable @@ -18821,7 +18797,7 @@ if i32.const 0 i32.const 152 - i32.const 862 + i32.const 863 i32.const 0 call $~lib/env/abort unreachable @@ -18836,7 +18812,7 @@ if i32.const 0 i32.const 152 - i32.const 865 + i32.const 866 i32.const 0 call $~lib/env/abort unreachable @@ -18851,7 +18827,7 @@ if i32.const 0 i32.const 152 - i32.const 868 + i32.const 869 i32.const 0 call $~lib/env/abort unreachable @@ -18866,7 +18842,7 @@ if i32.const 0 i32.const 152 - i32.const 871 + i32.const 872 i32.const 0 call $~lib/env/abort unreachable @@ -18881,7 +18857,7 @@ if i32.const 0 i32.const 152 - i32.const 874 + i32.const 875 i32.const 0 call $~lib/env/abort unreachable @@ -18933,7 +18909,7 @@ if i32.const 0 i32.const 152 - i32.const 904 + i32.const 905 i32.const 0 call $~lib/env/abort unreachable @@ -18948,13 +18924,16 @@ i32.const 0 call $std/array/assertSorted|trampoline end - block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 4552 + block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) + i32.const 2 local.set $0 + i32.const 4552 + local.set $1 local.get $0 + local.get $1 i32.const 15 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 4528 call $~lib/array/Array#join @@ -18964,18 +18943,21 @@ if i32.const 0 i32.const 152 - i32.const 913 + i32.const 914 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.67 (result i32) - i32.const 5120 + block $~lib/runtime/MAKEARRAY|inlined.72 (result i32) + i32.const 3 local.set $0 + i32.const 5120 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 4200 call $~lib/array/Array#join @@ -18985,18 +18967,21 @@ if i32.const 0 i32.const 152 - i32.const 914 + i32.const 915 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.7 (result i32) - i32.const 5240 + block $~lib/runtime/MAKEARRAY|inlined.7 (result i32) + i32.const 3 local.set $0 + i32.const 5240 + local.set $1 local.get $0 + local.get $1 i32.const 8 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 5216 call $~lib/array/Array#join @@ -19006,18 +18991,21 @@ if i32.const 0 i32.const 152 - i32.const 915 + i32.const 916 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.69 (result i32) - i32.const 5320 + block $~lib/runtime/MAKEARRAY|inlined.74 (result i32) + i32.const 2 local.set $0 + i32.const 5320 + local.set $1 local.get $0 + local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 5296 call $~lib/array/Array#join @@ -19027,18 +19015,21 @@ if i32.const 0 i32.const 152 - i32.const 916 + i32.const 917 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) - i32.const 6672 + block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) + i32.const 6 local.set $0 + i32.const 6672 + local.set $1 local.get $0 + local.get $1 i32.const 10 i32.const 3 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 5472 call $~lib/array/Array#join @@ -19048,18 +19039,21 @@ if i32.const 0 i32.const 152 - i32.const 917 + i32.const 918 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 6888 + block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) + i32.const 3 local.set $0 + i32.const 6888 + local.set $1 local.get $0 + local.get $1 i32.const 14 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end i32.const 4200 call $~lib/array/Array#join @@ -19069,67 +19063,75 @@ if i32.const 0 i32.const 152 - i32.const 918 + i32.const 919 i32.const 0 call $~lib/env/abort unreachable end block (result i32) - i32.const 0 - i32.const 3 - call $~lib/array/Array#constructor - local.set $0 - local.get $0 - i32.load offset=4 + block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) + i32.const 3 + local.set $2 + i32.const 0 + local.set $3 + local.get $2 + local.get $3 + i32.const 19 + i32.const 2 + call $~lib/runtime/doMakeArray + end local.set $1 local.get $1 + i32.load offset=4 + local.set $0 + local.get $0 block $~lib/runtime/RETAIN>|inlined.0 (result i32) i32.const 0 call $std/array/Ref#constructor - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.const 0 i32.ne if - local.get $2 - local.get $0 + local.get $3 + local.get $1 call $~lib/runtime/doRetain end - local.get $2 + local.get $3 end i32.store - local.get $1 + local.get $0 block $~lib/runtime/RETAIN>|inlined.1 (result i32) i32.const 0 - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.const 0 i32.ne if - local.get $2 - local.get $0 + local.get $3 + local.get $1 call $~lib/runtime/doRetain end - local.get $2 + local.get $3 end i32.store offset=4 - local.get $1 + local.get $0 block $~lib/runtime/RETAIN>|inlined.2 (result i32) i32.const 0 call $std/array/Ref#constructor - local.set $2 - local.get $2 + local.set $3 + local.get $3 i32.const 0 i32.ne if - local.get $2 - local.get $0 + local.get $3 + local.get $1 call $~lib/runtime/doRetain end - local.get $2 + local.get $3 end i32.store offset=8 - local.get $0 + local.get $1 end global.set $std/array/refArr global.get $std/array/refArr @@ -19141,7 +19143,7 @@ if i32.const 0 i32.const 152 - i32.const 920 + i32.const 921 i32.const 0 call $~lib/env/abort unreachable @@ -19154,7 +19156,7 @@ if i32.const 0 i32.const 152 - i32.const 924 + i32.const 925 i32.const 0 call $~lib/env/abort unreachable @@ -19167,7 +19169,7 @@ if i32.const 0 i32.const 152 - i32.const 925 + i32.const 926 i32.const 0 call $~lib/env/abort unreachable @@ -19180,7 +19182,7 @@ if i32.const 0 i32.const 152 - i32.const 926 + i32.const 927 i32.const 0 call $~lib/env/abort unreachable @@ -19193,18 +19195,21 @@ if i32.const 0 i32.const 152 - i32.const 927 + i32.const 928 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 7128 + block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) + i32.const 3 local.set $1 + i32.const 7128 + local.set $0 local.get $1 + local.get $0 i32.const 20 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $~lib/array/Array#toString i32.const 7152 @@ -19213,18 +19218,21 @@ if i32.const 0 i32.const 152 - i32.const 929 + i32.const 930 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 7208 + block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) + i32.const 3 local.set $1 + i32.const 7208 + local.set $0 local.get $1 + local.get $0 i32.const 21 i32.const 1 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $~lib/array/Array#toString i32.const 7232 @@ -19233,18 +19241,21 @@ if i32.const 0 i32.const 152 - i32.const 930 + i32.const 931 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 7312 + block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) + i32.const 3 local.set $1 + i32.const 7312 + local.set $0 local.get $1 + local.get $0 i32.const 16 i32.const 3 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $~lib/array/Array#toString i32.const 7352 @@ -19253,18 +19264,21 @@ if i32.const 0 i32.const 152 - i32.const 931 + i32.const 932 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 7464 + block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) + i32.const 4 local.set $1 + i32.const 7464 + local.set $0 local.get $1 + local.get $0 i32.const 22 i32.const 3 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $~lib/array/Array#toString i32.const 7512 @@ -19273,7 +19287,7 @@ if i32.const 0 i32.const 152 - i32.const 932 + i32.const 933 i32.const 0 call $~lib/env/abort unreachable @@ -19286,18 +19300,21 @@ if i32.const 0 i32.const 152 - i32.const 933 + i32.const 934 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) - i32.const 7744 + block $~lib/runtime/MAKEARRAY|inlined.4 (result i32) + i32.const 4 local.set $1 + i32.const 7744 + local.set $0 local.get $1 + local.get $0 i32.const 14 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $~lib/array/Array#toString i32.const 7776 @@ -19306,45 +19323,59 @@ if i32.const 0 i32.const 152 - i32.const 934 + i32.const 935 i32.const 0 call $~lib/env/abort unreachable end block (result i32) - i32.const 0 - i32.const 2 - call $~lib/array/Array>#constructor + block $~lib/runtime/MAKEARRAY>|inlined.1 (result i32) + i32.const 2 + local.set $3 + i32.const 0 + local.set $2 + local.get $3 + local.get $2 + i32.const 11 + i32.const 2 + call $~lib/runtime/doMakeArray + end local.set $1 local.get $1 i32.load offset=4 local.set $0 local.get $0 - block $~lib/runtime/RETAIN,Array>>|inlined.2 (result i32) - block $~lib/runtime/WRAPARRAY|inlined.71 (result i32) - i32.const 7832 + block $~lib/runtime/RETAIN,Array>>|inlined.1 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.76 (result i32) + i32.const 2 local.set $2 + i32.const 7832 + local.set $3 local.get $2 + local.get $3 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end - local.set $2 - local.get $2 + local.set $3 + local.get $3 local.get $1 call $~lib/runtime/doRetain - local.get $2 + local.get $3 end i32.store local.get $0 - block $~lib/runtime/RETAIN,Array>>|inlined.3 (result i32) - block $~lib/runtime/WRAPARRAY|inlined.72 (result i32) + block $~lib/runtime/RETAIN,Array>>|inlined.2 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.77 (result i32) + i32.const 2 + local.set $3 i32.const 7856 local.set $2 + local.get $3 local.get $2 i32.const 4 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end local.set $2 local.get $2 @@ -19364,54 +19395,68 @@ if i32.const 0 i32.const 152 - i32.const 937 + i32.const 938 i32.const 0 call $~lib/env/abort unreachable end block (result i32) - i32.const 0 - i32.const 2 - call $~lib/array/Array>#constructor - local.set $0 - local.get $0 - i32.load offset=4 + block $~lib/runtime/MAKEARRAY>|inlined.0 (result i32) + i32.const 2 + local.set $2 + i32.const 0 + local.set $3 + local.get $2 + local.get $3 + i32.const 23 + i32.const 2 + call $~lib/runtime/doMakeArray + end local.set $1 local.get $1 - block $~lib/runtime/RETAIN,Array>>|inlined.1 (result i32) - block $~lib/runtime/WRAPARRAY|inlined.6 (result i32) + i32.load offset=4 + local.set $0 + local.get $0 + block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.6 (result i32) + i32.const 2 + local.set $3 i32.const 7936 local.set $2 + local.get $3 local.get $2 i32.const 7 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end local.set $2 local.get $2 - local.get $0 + local.get $1 call $~lib/runtime/doRetain local.get $2 end i32.store - local.get $1 - block $~lib/runtime/RETAIN,Array>>|inlined.2 (result i32) - block $~lib/runtime/WRAPARRAY|inlined.7 (result i32) - i32.const 7960 + local.get $0 + block $~lib/runtime/RETAIN,Array>>|inlined.1 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.7 (result i32) + i32.const 2 local.set $2 + i32.const 7960 + local.set $3 local.get $2 + local.get $3 i32.const 7 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end - local.set $2 - local.get $2 - local.get $0 + local.set $3 + local.get $3 + local.get $1 call $~lib/runtime/doRetain - local.get $2 + local.get $3 end i32.store offset=4 - local.get $0 + local.get $1 end global.set $std/array/subarr8 global.get $std/array/subarr8 @@ -19422,53 +19467,72 @@ if i32.const 0 i32.const 152 - i32.const 940 + i32.const 941 i32.const 0 call $~lib/env/abort unreachable end block (result i32) - i32.const 0 - i32.const 1 - call $~lib/array/Array>>#constructor + block $~lib/runtime/MAKEARRAY>>|inlined.0 (result i32) + i32.const 1 + local.set $3 + i32.const 0 + local.set $2 + local.get $3 + local.get $2 + i32.const 25 + i32.const 2 + call $~lib/runtime/doMakeArray + end local.set $0 local.get $0 i32.load offset=4 local.set $1 local.get $1 - block $~lib/runtime/RETAIN>,Array>>>|inlined.1 (result i32) + block $~lib/runtime/RETAIN>,Array>>>|inlined.0 (result i32) block (result i32) - i32.const 0 - i32.const 1 - call $~lib/array/Array>#constructor - local.set $2 - local.get $2 - i32.load offset=4 + block $~lib/runtime/MAKEARRAY>|inlined.1 (result i32) + i32.const 1 + local.set $4 + i32.const 0 + local.set $5 + local.get $4 + local.get $5 + i32.const 24 + i32.const 2 + call $~lib/runtime/doMakeArray + end local.set $3 local.get $3 - block $~lib/runtime/RETAIN,Array>>|inlined.2 (result i32) - block $~lib/runtime/WRAPARRAY|inlined.11 (result i32) + i32.load offset=4 + local.set $2 + local.get $2 + block $~lib/runtime/RETAIN,Array>>|inlined.1 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.11 (result i32) + i32.const 1 + local.set $5 i32.const 8056 local.set $4 + local.get $5 local.get $4 i32.const 8 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end local.set $4 local.get $4 - local.get $2 + local.get $3 call $~lib/runtime/doRetain local.get $4 end i32.store - local.get $2 + local.get $3 end - local.set $3 - local.get $3 + local.set $2 + local.get $2 local.get $0 call $~lib/runtime/doRetain - local.get $3 + local.get $2 end i32.store local.get $0 @@ -19482,13 +19546,13 @@ if i32.const 0 i32.const 152 - i32.const 943 + i32.const 944 i32.const 0 call $~lib/env/abort unreachable end ) - (func $std/array/main (; 270 ;) (type $FUNCSIG$v) + (func $std/array/main (; 264 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -19497,9 +19561,9 @@ global.set $~lib/started end ) - (func $start (; 271 ;) (type $FUNCSIG$v) + (func $start (; 265 ;) (type $FUNCSIG$v) call $start:std/array ) - (func $null (; 272 ;) (type $FUNCSIG$v) + (func $null (; 266 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index ab1b14bc25..9ae8355e63 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -326,7 +326,7 @@ if i32.const 0 i32.const 64 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -340,7 +340,7 @@ if i32.const 0 i32.const 64 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable @@ -364,7 +364,7 @@ if i32.const 0 i32.const 16 - i32.const 24 + i32.const 25 i32.const 43 call $~lib/env/abort unreachable @@ -1552,7 +1552,7 @@ if i32.const 0 i32.const 64 - i32.const 251 + i32.const 348 i32.const 57 call $~lib/env/abort unreachable @@ -1592,37 +1592,32 @@ i32.store offset=8 local.get $0 ) - (func $~lib/runtime/doWrapArray (; 11 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/runtime/doMakeArray (; 11 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) - (local $2 i32) i32.const 16 call $~lib/runtime/doAllocate i32.const 5 call $~lib/runtime/doRegister local.tee $0 - i32.const 148 - i32.load - local.tee $1 + i32.const 8 call $~lib/runtime/doAllocate - i32.const 5 + i32.const 2 call $~lib/runtime/doRegister - local.tee $2 + local.tee $1 i32.store local.get $0 - local.get $2 + local.get $1 i32.store offset=4 local.get $0 - local.get $1 + i32.const 8 i32.store offset=8 local.get $0 - local.get $1 i32.const 2 - i32.shr_u i32.store offset=12 - local.get $2 - i32.const 152 local.get $1 + i32.const 152 + i32.const 8 call $~lib/memory/memory.copy local.get $0 ) @@ -1636,25 +1631,18 @@ local.tee $2 i32.const 1073741816 i32.gt_u - if - i32.const 0 - i32.const 168 - i32.const 18 - i32.const 47 - call $~lib/env/abort - unreachable - end local.get $2 local.get $0 i32.const 8 i32.sub i32.load offset=4 i32.gt_u + i32.or if i32.const 0 i32.const 168 - i32.const 19 - i32.const 63 + i32.const 22 + i32.const 6 call $~lib/env/abort unreachable end @@ -1882,7 +1870,7 @@ i32.const 0 call $~lib/runtime/ArrayBufferView#constructor global.set $std/arraybuffer/arr8 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray drop global.get $std/arraybuffer/arr8 if (result i32) diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 234c9b46a3..22b2ee62a7 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -409,7 +409,7 @@ if i32.const 0 i32.const 64 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -424,7 +424,7 @@ if i32.const 0 i32.const 64 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable @@ -449,7 +449,7 @@ if i32.const 0 i32.const 16 - i32.const 24 + i32.const 25 i32.const 43 call $~lib/env/abort unreachable @@ -2051,7 +2051,7 @@ if i32.const 0 i32.const 64 - i32.const 251 + i32.const 348 i32.const 57 call $~lib/env/abort unreachable @@ -2125,42 +2125,46 @@ local.set $0 local.get $0 ) - (func $~lib/runtime/doWrapArray (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) + (func $~lib/runtime/doMakeArray (; 19 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 16 call $~lib/runtime/doAllocate - local.get $1 + local.get $2 call $~lib/runtime/doRegister - local.set $3 - local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.set $4 - local.get $4 - call $~lib/runtime/doAllocate - local.get $1 - call $~lib/runtime/doRegister + local.get $0 + local.get $3 + i32.shl local.set $5 + local.get $0 local.get $3 - local.get $5 + i32.shl + call $~lib/runtime/doAllocate + i32.const 2 + call $~lib/runtime/doRegister + local.set $6 + local.get $4 + local.get $6 i32.store - local.get $3 - local.get $5 + local.get $4 + local.get $6 i32.store offset=4 - local.get $3 local.get $4 + local.get $5 i32.store offset=8 - local.get $3 local.get $4 - local.get $2 - i32.shr_u - i32.store offset=12 - local.get $5 local.get $0 + i32.store offset=12 + local.get $1 + if + local.get $6 + local.get $1 + local.get $5 + call $~lib/memory/memory.copy + end local.get $4 - call $~lib/memory/memory.copy - local.get $3 ) (func $~lib/typedarray/Int32Array#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -2201,25 +2205,18 @@ local.get $3 global.get $~lib/runtime/MAX_BYTELENGTH i32.gt_u - if - i32.const 0 - i32.const 168 - i32.const 18 - i32.const 47 - call $~lib/env/abort - unreachable - end local.get $2 local.get $3 i32.add local.get $1 call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.gt_u + i32.or if i32.const 0 i32.const 168 - i32.const 19 - i32.const 63 + i32.const 22 + i32.const 6 call $~lib/env/abort unreachable end @@ -2272,6 +2269,7 @@ ) (func $start:std/arraybuffer (; 23 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -2531,13 +2529,16 @@ i32.const 1 call $~lib/typedarray/Uint8Array#constructor global.set $std/arraybuffer/arr8 - block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) - i32.const 152 + block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) + i32.const 2 local.set $0 + i32.const 152 + local.set $1 local.get $0 + local.get $1 i32.const 5 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $~lib/arraybuffer/ArrayBuffer.isView> i32.eqz diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 7da2c2e4e6..5ec579874a 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -163,7 +163,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -177,7 +177,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable @@ -240,7 +240,7 @@ if i32.const 0 i32.const 104 - i32.const 113 + i32.const 114 i32.const 44 call $~lib/env/abort unreachable @@ -270,28 +270,21 @@ local.get $2 i32.const 1073741816 i32.gt_u + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 + i32.gt_u + i32.or end if i32.const 0 i32.const 152 - i32.const 18 - i32.const 47 - call $~lib/env/abort - unreachable - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.const 8 - i32.sub - i32.load offset=4 - i32.gt_u - if - i32.const 0 - i32.const 152 - i32.const 19 - i32.const 63 + i32.const 22 + i32.const 6 call $~lib/env/abort unreachable end @@ -335,7 +328,7 @@ if i32.const 0 i32.const 152 - i32.const 42 + i32.const 45 i32.const 6 call $~lib/env/abort unreachable @@ -401,7 +394,7 @@ if i32.const 0 i32.const 152 - i32.const 56 + i32.const 59 i32.const 7 call $~lib/env/abort unreachable @@ -427,7 +420,7 @@ if i32.const 0 i32.const 152 - i32.const 67 + i32.const 70 i32.const 49 call $~lib/env/abort unreachable @@ -452,7 +445,7 @@ if i32.const 0 i32.const 152 - i32.const 75 + i32.const 78 i32.const 7 call $~lib/env/abort unreachable @@ -494,7 +487,7 @@ if i32.const 0 i32.const 152 - i32.const 84 + i32.const 87 i32.const 7 call $~lib/env/abort unreachable @@ -531,7 +524,7 @@ if i32.const 0 i32.const 152 - i32.const 178 + i32.const 181 i32.const 6 call $~lib/env/abort unreachable @@ -556,7 +549,7 @@ if i32.const 0 i32.const 152 - i32.const 90 + i32.const 93 i32.const 49 call $~lib/env/abort unreachable @@ -581,7 +574,7 @@ if i32.const 0 i32.const 152 - i32.const 98 + i32.const 101 i32.const 6 call $~lib/env/abort unreachable @@ -621,7 +614,7 @@ if i32.const 0 i32.const 152 - i32.const 107 + i32.const 110 i32.const 6 call $~lib/env/abort unreachable @@ -658,7 +651,7 @@ if i32.const 0 i32.const 152 - i32.const 187 + i32.const 190 i32.const 6 call $~lib/env/abort unreachable @@ -683,7 +676,7 @@ if i32.const 0 i32.const 152 - i32.const 116 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -721,7 +714,7 @@ if i32.const 0 i32.const 152 - i32.const 125 + i32.const 128 i32.const 6 call $~lib/env/abort unreachable @@ -749,7 +742,7 @@ if i32.const 0 i32.const 152 - i32.const 131 + i32.const 134 i32.const 49 call $~lib/env/abort unreachable @@ -767,7 +760,7 @@ if i32.const 0 i32.const 152 - i32.const 139 + i32.const 142 i32.const 6 call $~lib/env/abort unreachable @@ -803,7 +796,7 @@ if i32.const 0 i32.const 152 - i32.const 147 + i32.const 150 i32.const 6 call $~lib/env/abort unreachable @@ -839,7 +832,7 @@ if i32.const 0 i32.const 152 - i32.const 196 + i32.const 199 i32.const 6 call $~lib/env/abort unreachable @@ -863,7 +856,7 @@ if i32.const 0 i32.const 152 - i32.const 152 + i32.const 155 i32.const 49 call $~lib/env/abort unreachable @@ -881,7 +874,7 @@ if i32.const 0 i32.const 152 - i32.const 160 + i32.const 163 i32.const 6 call $~lib/env/abort unreachable @@ -915,7 +908,7 @@ if i32.const 0 i32.const 152 - i32.const 168 + i32.const 171 i32.const 6 call $~lib/env/abort unreachable @@ -951,7 +944,7 @@ if i32.const 0 i32.const 152 - i32.const 204 + i32.const 207 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 341c0304c4..76ae06d921 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -415,7 +415,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -430,7 +430,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable @@ -455,7 +455,7 @@ if i32.const 0 i32.const 56 - i32.const 24 + i32.const 25 i32.const 43 call $~lib/env/abort unreachable @@ -490,7 +490,7 @@ if i32.const 0 i32.const 16 - i32.const 251 + i32.const 348 i32.const 57 call $~lib/env/abort unreachable @@ -572,7 +572,7 @@ if i32.const 0 i32.const 104 - i32.const 113 + i32.const 114 i32.const 44 call $~lib/env/abort unreachable @@ -606,25 +606,18 @@ local.get $3 global.get $~lib/runtime/MAX_BYTELENGTH i32.gt_u - if - i32.const 0 - i32.const 152 - i32.const 18 - i32.const 47 - call $~lib/env/abort - unreachable - end local.get $2 local.get $3 i32.add local.get $1 call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.gt_u + i32.or if i32.const 0 i32.const 152 - i32.const 19 - i32.const 63 + i32.const 22 + i32.const 6 call $~lib/env/abort unreachable end @@ -714,7 +707,7 @@ if i32.const 0 i32.const 152 - i32.const 42 + i32.const 45 i32.const 6 call $~lib/env/abort unreachable @@ -791,7 +784,7 @@ if i32.const 0 i32.const 152 - i32.const 56 + i32.const 59 i32.const 7 call $~lib/env/abort unreachable @@ -823,7 +816,7 @@ if i32.const 0 i32.const 152 - i32.const 67 + i32.const 70 i32.const 49 call $~lib/env/abort unreachable @@ -865,7 +858,7 @@ if i32.const 0 i32.const 152 - i32.const 75 + i32.const 78 i32.const 7 call $~lib/env/abort unreachable @@ -915,7 +908,7 @@ if i32.const 0 i32.const 152 - i32.const 84 + i32.const 87 i32.const 7 call $~lib/env/abort unreachable @@ -990,7 +983,7 @@ if i32.const 0 i32.const 152 - i32.const 178 + i32.const 181 i32.const 6 call $~lib/env/abort unreachable @@ -1019,7 +1012,7 @@ if i32.const 0 i32.const 152 - i32.const 90 + i32.const 93 i32.const 49 call $~lib/env/abort unreachable @@ -1059,7 +1052,7 @@ if i32.const 0 i32.const 152 - i32.const 98 + i32.const 101 i32.const 6 call $~lib/env/abort unreachable @@ -1095,7 +1088,7 @@ if i32.const 0 i32.const 152 - i32.const 107 + i32.const 110 i32.const 6 call $~lib/env/abort unreachable @@ -1131,7 +1124,7 @@ if i32.const 0 i32.const 152 - i32.const 187 + i32.const 190 i32.const 6 call $~lib/env/abort unreachable @@ -1166,7 +1159,7 @@ if i32.const 0 i32.const 152 - i32.const 116 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -1206,7 +1199,7 @@ if i32.const 0 i32.const 152 - i32.const 125 + i32.const 128 i32.const 6 call $~lib/env/abort unreachable @@ -1240,7 +1233,7 @@ if i32.const 0 i32.const 152 - i32.const 131 + i32.const 134 i32.const 49 call $~lib/env/abort unreachable @@ -1266,7 +1259,7 @@ if i32.const 0 i32.const 152 - i32.const 139 + i32.const 142 i32.const 6 call $~lib/env/abort unreachable @@ -1300,7 +1293,7 @@ if i32.const 0 i32.const 152 - i32.const 147 + i32.const 150 i32.const 6 call $~lib/env/abort unreachable @@ -1334,7 +1327,7 @@ if i32.const 0 i32.const 152 - i32.const 196 + i32.const 199 i32.const 6 call $~lib/env/abort unreachable @@ -1362,7 +1355,7 @@ if i32.const 0 i32.const 152 - i32.const 152 + i32.const 155 i32.const 49 call $~lib/env/abort unreachable @@ -1388,7 +1381,7 @@ if i32.const 0 i32.const 152 - i32.const 160 + i32.const 163 i32.const 6 call $~lib/env/abort unreachable @@ -1422,7 +1415,7 @@ if i32.const 0 i32.const 152 - i32.const 168 + i32.const 171 i32.const 6 call $~lib/env/abort unreachable @@ -1456,7 +1449,7 @@ if i32.const 0 i32.const 152 - i32.const 204 + i32.const 207 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index b247ef689d..cae69d82d5 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -90,7 +90,7 @@ if i32.const 0 i32.const 48 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -104,7 +104,7 @@ if i32.const 0 i32.const 48 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 8586728975..48194f0e3c 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -150,7 +150,7 @@ if i32.const 0 i32.const 48 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -165,7 +165,7 @@ if i32.const 0 i32.const 48 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index cbd7668582..feb6b7cde8 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -123,7 +123,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -137,7 +137,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable @@ -372,7 +372,7 @@ if i32.const 0 i32.const 56 - i32.const 24 + i32.const 25 i32.const 43 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 772abc7c25..3387747c4e 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -156,7 +156,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -171,7 +171,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable @@ -453,7 +453,7 @@ if i32.const 0 i32.const 56 - i32.const 24 + i32.const 25 i32.const 43 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 8789eb6086..9e8d6bd301 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -84,7 +84,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -98,7 +98,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index da0ceebc6b..ed9fb28621 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index a832a2246f..dc664bda89 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -167,7 +167,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -181,7 +181,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 08efa6cb52..842394a795 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -211,7 +211,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -226,7 +226,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 15d8230dfb..240f256f33 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -2616,7 +2616,7 @@ if i32.const 0 i32.const 232 - i32.const 107 + i32.const 133 i32.const 8 call $~lib/env/abort unreachable @@ -2653,7 +2653,7 @@ if i32.const 0 i32.const 232 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -2667,7 +2667,7 @@ if i32.const 0 i32.const 232 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 59331d296b..41a292af12 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -3304,7 +3304,7 @@ if i32.const 0 i32.const 232 - i32.const 107 + i32.const 133 i32.const 8 call $~lib/env/abort unreachable @@ -3345,7 +3345,7 @@ if i32.const 0 i32.const 232 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -3360,7 +3360,7 @@ if i32.const 0 i32.const 232 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index e660806a8c..c0ecab42da 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -119,7 +119,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -133,7 +133,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable @@ -368,7 +368,7 @@ if i32.const 0 i32.const 56 - i32.const 24 + i32.const 25 i32.const 43 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 603f72dae4..17a61b7157 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -156,7 +156,7 @@ if i32.const 0 i32.const 16 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -171,7 +171,7 @@ if i32.const 0 i32.const 16 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable @@ -453,7 +453,7 @@ if i32.const 0 i32.const 56 - i32.const 24 + i32.const 25 i32.const 43 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index f454ea8148..da37a58ed1 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -36,7 +36,7 @@ if i32.const 0 i32.const 240 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -329,7 +329,7 @@ if i32.const 0 i32.const 240 - i32.const 10 + i32.const 14 i32.const 64 call $~lib/env/abort unreachable @@ -360,6 +360,10 @@ end ) (func $~lib/array/Array#__set (; 5 ;) (type $FUNCSIG$v) + (local $0 i32) + i32.const 44 + i32.load + local.set $0 i32.const 32 i32.const 2 call $~lib/array/ensureCapacity @@ -368,8 +372,7 @@ i32.const 2 i32.store i32.const 0 - i32.const 44 - i32.load + local.get $0 i32.ge_s if i32.const 44 @@ -387,7 +390,7 @@ if i32.const 0 i32.const 240 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -401,6 +404,10 @@ i64.load ) (func $~lib/array/Array#__set (; 7 ;) (type $FUNCSIG$v) + (local $0 i32) + i32.const 92 + i32.load + local.set $0 i32.const 80 i32.const 3 call $~lib/array/ensureCapacity @@ -409,8 +416,7 @@ i64.const 4 i64.store i32.const 0 - i32.const 92 - i32.load + local.get $0 i32.ge_s if i32.const 92 @@ -428,7 +434,7 @@ if i32.const 0 i32.const 240 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -442,6 +448,10 @@ f32.load ) (func $~lib/array/Array#__set (; 9 ;) (type $FUNCSIG$v) + (local $0 i32) + i32.const 132 + i32.load + local.set $0 i32.const 120 i32.const 2 call $~lib/array/ensureCapacity @@ -450,8 +460,7 @@ f32.const 2.5 f32.store i32.const 0 - i32.const 132 - i32.load + local.get $0 i32.ge_s if i32.const 132 @@ -469,7 +478,7 @@ if i32.const 0 i32.const 240 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -483,6 +492,10 @@ f64.load ) (func $~lib/array/Array#__set (; 11 ;) (type $FUNCSIG$v) + (local $0 i32) + i32.const 180 + i32.load + local.set $0 i32.const 168 i32.const 3 call $~lib/array/ensureCapacity @@ -491,8 +504,7 @@ f64.const 2.25 f64.store i32.const 0 - i32.const 180 - i32.load + local.get $0 i32.ge_s if i32.const 180 diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 7933e1633d..29eefd5c1a 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -52,7 +52,7 @@ if i32.const 0 i32.const 240 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -1837,7 +1837,7 @@ if i32.const 0 i32.const 280 - i32.const 107 + i32.const 133 i32.const 8 call $~lib/env/abort unreachable @@ -1889,7 +1889,7 @@ if i32.const 0 i32.const 240 - i32.const 10 + i32.const 14 i32.const 64 call $~lib/env/abort unreachable @@ -1928,6 +1928,10 @@ end ) (func $~lib/array/Array#__set (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.set $3 local.get $0 local.get $1 i32.const 1 @@ -1943,8 +1947,7 @@ local.get $2 i32.store local.get $1 - local.get $0 - i32.load offset=12 + local.get $3 i32.ge_s if local.get $0 @@ -1968,7 +1971,7 @@ if i32.const 0 i32.const 240 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -1982,6 +1985,10 @@ i64.load ) (func $~lib/array/Array#__set (; 14 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.set $3 local.get $0 local.get $1 i32.const 1 @@ -1997,8 +2004,7 @@ local.get $2 i64.store local.get $1 - local.get $0 - i32.load offset=12 + local.get $3 i32.ge_s if local.get $0 @@ -2022,7 +2028,7 @@ if i32.const 0 i32.const 240 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -2036,6 +2042,10 @@ f32.load ) (func $~lib/array/Array#__set (; 17 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.set $3 local.get $0 local.get $1 i32.const 1 @@ -2051,8 +2061,7 @@ local.get $2 f32.store local.get $1 - local.get $0 - i32.load offset=12 + local.get $3 i32.ge_s if local.get $0 @@ -2076,7 +2085,7 @@ if i32.const 0 i32.const 240 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -2090,6 +2099,10 @@ f64.load ) (func $~lib/array/Array#__set (; 20 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.set $3 local.get $0 local.get $1 i32.const 1 @@ -2105,8 +2118,7 @@ local.get $2 f64.store local.get $1 - local.get $0 - i32.load offset=12 + local.get $3 i32.ge_s if local.get $0 diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index 17aeccc587..0c17afed36 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -1514,7 +1514,7 @@ if i32.const 0 i32.const 136 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -1528,7 +1528,7 @@ if i32.const 0 i32.const 136 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable @@ -1596,7 +1596,7 @@ if i32.const 0 i32.const 96 - i32.const 447 + i32.const 448 i32.const 8 call $~lib/env/abort unreachable @@ -1643,7 +1643,7 @@ if i32.const 0 i32.const 96 - i32.const 451 + i32.const 452 i32.const 8 call $~lib/env/abort unreachable @@ -1716,7 +1716,7 @@ if i32.const 0 i32.const 96 - i32.const 463 + i32.const 464 i32.const 8 call $~lib/env/abort unreachable @@ -1769,7 +1769,7 @@ if i32.const 0 i32.const 96 - i32.const 472 + i32.const 473 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index a9a73b1400..d2237c0f20 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -1928,7 +1928,7 @@ if i32.const 0 i32.const 136 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -1943,7 +1943,7 @@ if i32.const 0 i32.const 136 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable @@ -2036,7 +2036,7 @@ if i32.const 0 i32.const 96 - i32.const 447 + i32.const 448 i32.const 8 call $~lib/env/abort unreachable @@ -2090,7 +2090,7 @@ if i32.const 0 i32.const 96 - i32.const 451 + i32.const 452 i32.const 8 call $~lib/env/abort unreachable @@ -2185,7 +2185,7 @@ if i32.const 0 i32.const 96 - i32.const 463 + i32.const 464 i32.const 8 call $~lib/env/abort unreachable @@ -2248,7 +2248,7 @@ if i32.const 0 i32.const 96 - i32.const 472 + i32.const 473 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 227ab04126..3e9750993e 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -81,98 +81,97 @@ (data (i32.const 1296) "\01\00\00\00\n\00\00\00c\00d\00e\00f\00g") (data (i32.const 1320) "\01\00\00\00\n\00\00\00d\00e\00f\00g\00h") (data (i32.const 1344) "\01\00\00\00\1a\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m") - (data (i32.const 1384) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 1432) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1472) "\01\00\00\00\n\00\00\00a\00,\00b\00,\00c") - (data (i32.const 1496) "\01\00\00\00\02\00\00\00.") - (data (i32.const 1512) "\01\00\00\00\02\00\00\00c") - (data (i32.const 1528) "\01\00\00\00\0e\00\00\00a\00,\00 \00b\00,\00 \00c") - (data (i32.const 1552) "\01\00\00\00\04\00\00\00,\00 ") - (data (i32.const 1568) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00,\00c") - (data (i32.const 1592) "\01\00\00\00\0c\00\00\00,\00a\00,\00b\00,\00c") - (data (i32.const 1616) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00c\00,") - (data (i32.const 1640) "\02\00\00\00\90\01\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 2048) "\05\00\00\00\10\00\00\00p\06\00\00p\06\00\00\90\01\00\00d") - (data (i32.const 2072) "\01\00\00\00\02\00\00\008") - (data (i32.const 2088) "\01\00\00\00\n\00\00\00-\001\000\000\000") - (data (i32.const 2112) "\01\00\00\00\08\00\00\001\002\003\004") - (data (i32.const 2128) "\01\00\00\00\n\00\00\001\002\003\004\005") - (data (i32.const 2152) "\01\00\00\00\0c\00\00\001\002\003\004\005\006") - (data (i32.const 2176) "\01\00\00\00\0e\00\00\001\001\001\001\001\001\001") - (data (i32.const 2200) "\01\00\00\00\0e\00\00\001\002\003\004\005\006\007") - (data (i32.const 2224) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\006") - (data (i32.const 2256) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\007") - (data (i32.const 2288) "\01\00\00\00\16\00\00\00-\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 2320) "\01\00\00\00\04\00\00\00-\001") - (data (i32.const 2336) "\01\00\00\00\08\00\00\001\000\000\000") - (data (i32.const 2352) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 2384) "\01\00\00\00\14\00\00\004\002\009\004\009\006\007\002\009\005") - (data (i32.const 2416) "\01\00\00\00\10\00\00\009\009\009\009\009\009\009\009") - (data (i32.const 2440) "\01\00\00\00\12\00\00\001\000\000\000\000\000\000\000\000") - (data (i32.const 2472) "\01\00\00\00\16\00\00\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2504) "\01\00\00\00\18\00\00\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2536) "\01\00\00\00\1e\00\00\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2576) "\01\00\00\00 \00\00\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2616) "\01\00\00\00\"\00\00\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2664) "\01\00\00\00(\00\00\001\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005") - (data (i32.const 2712) "\01\00\00\00\n\00\00\00-\001\002\003\004") - (data (i32.const 2736) "\01\00\00\00\16\00\00\00-\004\002\009\004\009\006\007\002\009\005") - (data (i32.const 2768) "\01\00\00\00\18\00\00\00-\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2800) "\01\00\00\00\1a\00\00\00-\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2840) "\01\00\00\00 \00\00\00-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2880) "\01\00\00\00$\00\00\00-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2928) "\01\00\00\00&\00\00\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007") - (data (i32.const 2976) "\01\00\00\00(\00\00\00-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008") - (data (i32.const 3024) "\01\00\00\00\06\00\00\000\00.\000") - (data (i32.const 3040) "\01\00\00\00\06\00\00\00N\00a\00N") - (data (i32.const 3056) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3088) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3112) "\02\00\00\00\b8\02\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8#constructor (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - i32.const 16 - call $~lib/runtime/doAllocate - i32.const 4 - call $~lib/runtime/doRegister - local.get $0 - call $~lib/runtime/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - local.get $0 - i32.store offset=12 - local.get $1 - ) - (func $~lib/runtime/doReallocate (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doReallocate (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3132,7 +3074,7 @@ i32.shl i32.const 0 local.get $0 - i32.const 5544 + i32.const 5496 i32.gt_u select i32.const 1 @@ -3172,12 +3114,12 @@ i32.eq if local.get $0 - i32.const 5544 + i32.const 5496 i32.le_u if i32.const 0 i32.const 96 - i32.const 107 + i32.const 133 i32.const 8 call $~lib/env/abort unreachable @@ -3202,7 +3144,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureCapacity (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3217,8 +3159,8 @@ i32.gt_u if i32.const 0 - i32.const 1440 - i32.const 10 + i32.const 1392 + i32.const 14 i32.const 64 call $~lib/env/abort unreachable @@ -3247,7 +3189,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $0 @@ -3270,7 +3212,7 @@ local.get $1 i32.store ) - (func $~lib/string/String#split (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3284,217 +3226,231 @@ if i32.const 0 i32.const 168 - i32.const 347 + i32.const 348 i32.const 4 call $~lib/env/abort unreachable end - local.get $2 - i32.eqz - if - i32.const 0 - call $~lib/array/Array#constructor - return - end - block $folding-inner0 - local.get $1 - i32.eqz - br_if $folding-inner0 - local.get $0 - i32.const 8 - i32.sub - i32.load offset=4 - i32.const 1 - i32.shr_u - local.set $4 - i32.const 2147483647 - local.get $2 - local.get $2 - i32.const 0 - i32.lt_s - select - local.set $2 - local.get $1 - i32.const 8 - i32.sub - i32.load offset=4 - i32.const 1 - i32.shr_u - local.tee $3 - local.set $9 - local.get $3 - if - local.get $4 + block $folding-inner1 + block $folding-inner0 + local.get $2 i32.eqz - if - i32.const 1 - call $~lib/array/Array#constructor - local.tee $3 - i32.load offset=4 - i32.const 312 - i32.store - local.get $3 - return - end - else - local.get $4 + br_if $folding-inner0 + local.get $1 i32.eqz - if - i32.const 0 - call $~lib/array/Array#constructor - return - end - local.get $4 + br_if $folding-inner1 + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.set $4 + i32.const 2147483647 local.get $2 - local.get $4 local.get $2 + i32.const 0 i32.lt_s select - local.tee $4 - call $~lib/array/Array#constructor - local.tee $7 + local.set $2 + local.get $1 + i32.const 8 + i32.sub i32.load offset=4 - local.set $3 - i32.const 0 - local.set $1 - loop $repeat|0 - local.get $1 + i32.const 1 + i32.shr_u + local.tee $3 + local.set $9 + local.get $3 + if local.get $4 - i32.lt_s + i32.eqz if - i32.const 2 - call $~lib/runtime/doAllocate - local.tee $2 - local.get $1 i32.const 1 - i32.shl - local.get $0 - i32.add - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.shl - local.get $3 - i32.add - local.get $2 - i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/doMakeArray + local.tee $3 + i32.load offset=4 + i32.const 312 i32.store + local.get $3 + return + end + else + local.get $4 + i32.eqz + br_if $folding-inner0 + local.get $4 + local.get $2 + local.get $4 + local.get $2 + i32.lt_s + select + local.tee $4 + call $~lib/runtime/doMakeArray + local.tee $7 + i32.load offset=4 + local.set $3 + i32.const 0 + local.set $1 + loop $repeat|0 local.get $1 - i32.const 1 - i32.add - local.set $1 - br $repeat|0 + local.get $4 + i32.lt_s + if + i32.const 2 + call $~lib/runtime/doAllocate + i32.const 1 + call $~lib/runtime/doRegister + local.tee $2 + local.get $1 + i32.const 1 + i32.shl + local.get $0 + i32.add + i32.load16_u + i32.store16 + local.get $1 + i32.const 2 + i32.shl + local.get $3 + i32.add + local.get $2 + i32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end end + local.get $7 + return end - local.get $7 - return - end - i32.const 0 - call $~lib/array/Array#constructor - local.set $5 - loop $continue|1 - local.get $0 - local.get $1 - local.get $6 - call $~lib/string/String#indexOf - local.tee $8 - i32.const -1 - i32.ne - if - local.get $8 + i32.const 0 + call $~lib/runtime/doMakeArray + local.set $5 + loop $continue|1 + local.get $1 + i32.eqz + if + unreachable + end + local.get $0 + local.get $1 local.get $6 - i32.sub - local.tee $3 - i32.const 0 - i32.gt_s + call $~lib/string/String#indexOf + local.tee $8 + i32.const -1 + i32.ne if - local.get $3 - i32.const 1 - i32.shl - local.tee $3 - call $~lib/runtime/doAllocate - local.tee $7 + local.get $8 local.get $6 + i32.sub + local.tee $3 + i32.const 0 + i32.gt_s + if + local.get $3 + i32.const 1 + i32.shl + local.tee $3 + call $~lib/runtime/doAllocate + local.tee $7 + local.get $6 + i32.const 1 + i32.shl + local.get $0 + i32.add + local.get $3 + call $~lib/memory/memory.copy + local.get $5 + local.get $7 + i32.const 1 + call $~lib/runtime/doRegister + call $~lib/array/Array#push + else + local.get $5 + i32.const 312 + call $~lib/array/Array#push + end + local.get $10 i32.const 1 - i32.shl - local.get $0 i32.add - local.get $3 - call $~lib/memory/memory.copy - local.get $5 - local.get $7 - i32.const 1 - call $~lib/runtime/doRegister - call $~lib/array/Array#push - else - local.get $5 - i32.const 312 - call $~lib/array/Array#push + local.tee $10 + local.get $2 + i32.eq + if + local.get $5 + return + end + local.get $8 + local.get $9 + i32.add + local.set $6 + br $continue|1 end - local.get $10 + end + local.get $6 + i32.eqz + br_if $folding-inner1 + local.get $4 + local.get $6 + i32.sub + local.tee $1 + i32.const 0 + i32.gt_s + if + local.get $1 i32.const 1 + i32.shl + local.tee $1 + call $~lib/runtime/doAllocate + local.tee $3 + local.get $6 + i32.const 1 + i32.shl + local.get $0 i32.add - local.tee $10 - local.get $2 - i32.eq - if - local.get $5 - return - end - local.get $8 - local.get $9 - i32.add - local.set $6 - br $continue|1 + local.get $1 + call $~lib/memory/memory.copy + local.get $5 + local.get $3 + i32.const 1 + call $~lib/runtime/doRegister + call $~lib/array/Array#push + else + local.get $5 + i32.const 312 + call $~lib/array/Array#push end - end - local.get $6 - i32.eqz - br_if $folding-inner0 - local.get $4 - local.get $6 - i32.sub - local.tee $1 - i32.const 0 - i32.gt_s - if - local.get $1 - i32.const 1 - i32.shl - local.tee $1 - call $~lib/runtime/doAllocate - local.tee $3 - local.get $6 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $1 - call $~lib/memory/memory.copy local.get $5 - local.get $3 - i32.const 1 - call $~lib/runtime/doRegister - call $~lib/array/Array#push - else - local.get $5 - i32.const 312 - call $~lib/array/Array#push + return end - local.get $5 + i32.const 0 + call $~lib/runtime/doMakeArray return end i32.const 1 - call $~lib/array/Array#constructor + call $~lib/runtime/doMakeArray local.tee $3 i32.load offset=4 local.get $0 i32.store local.get $3 ) - (func $~lib/array/Array#__get (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 1392 + i32.const 97 + i32.const 45 + call $~lib/env/abort + unreachable + end local.get $1 local.get $0 i32.load offset=8 @@ -3503,8 +3459,8 @@ i32.ge_u if i32.const 0 - i32.const 1440 - i32.const 69 + i32.const 1392 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -3517,7 +3473,7 @@ i32.add i32.load ) - (func $~lib/util/number/decimalCount32 (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -3571,10 +3527,10 @@ end end ) - (func $~lib/util/number/utoa32_lut (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - i32.const 2060 + i32.const 2012 i32.load local.set $3 loop $continue|0 @@ -3681,7 +3637,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3723,7 +3679,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/utoa32 (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3746,7 +3702,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/decimalCount64 (; 42 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 40 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -3800,12 +3756,12 @@ end end ) - (func $~lib/util/number/utoa64_lut (; 43 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 41 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 2060 + i32.const 2012 i32.load local.set $3 loop $continue|0 @@ -3897,7 +3853,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 44 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 42 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3939,7 +3895,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/itoa64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 43 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4004,7 +3960,7 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/genDigits (; 46 ;) (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 (; 44 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i32) @@ -4039,7 +3995,7 @@ local.tee $7 call $~lib/util/number/decimalCount32 local.set $9 - i32.const 4108 + i32.const 4060 i32.load local.set $13 loop $continue|0 @@ -4415,7 +4371,7 @@ local.get $2 end ) - (func $~lib/util/number/prettify (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4677,7 +4633,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 48 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 46 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -4796,13 +4752,13 @@ local.tee $8 i32.sub global.set $~lib/util/number/_K - i32.const 3828 + i32.const 3780 i32.load local.get $8 i32.add i64.load global.set $~lib/util/number/_frc_pow - i32.const 4036 + i32.const 3988 i32.load local.get $3 i32.const 1 @@ -4988,7 +4944,7 @@ local.get $11 i32.add ) - (func $~lib/string/String#substring (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4997,7 +4953,7 @@ if i32.const 0 i32.const 168 - i32.const 186 + i32.const 187 i32.const 4 call $~lib/env/abort unreachable @@ -5086,14 +5042,14 @@ i32.const 1 call $~lib/runtime/doRegister ) - (func $~lib/util/number/dtoa (; 50 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 48 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 f64.const 0 f64.eq if - i32.const 3032 + i32.const 2984 return end local.get $0 @@ -5106,11 +5062,11 @@ local.get $0 f64.ne if - i32.const 3048 + i32.const 3000 return end - i32.const 3064 - i32.const 3096 + i32.const 3016 + i32.const 3048 local.get $0 f64.const 0 f64.lt @@ -5131,7 +5087,7 @@ call $~lib/runtime/assertUnregistered local.get $1 ) - (func $start:std/string (; 51 ;) (type $FUNCSIG$v) + (func $start:std/string (; 49 ;) (type $FUNCSIG$v) (local $0 i32) global.get $std/string/str i32.const 16 @@ -5186,7 +5142,7 @@ call $~lib/env/abort unreachable end - i32.const 5544 + i32.const 5496 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -6692,8 +6648,8 @@ call $~lib/env/abort unreachable end - i32.const 1480 - i32.const 1504 + i32.const 1432 + i32.const 1456 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -6706,7 +6662,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 1480 + i32.const 1432 call $~lib/string/String.__eq local.set $0 end @@ -6720,7 +6676,7 @@ call $~lib/env/abort unreachable end - i32.const 1480 + i32.const 1432 i32.const 528 i32.const 2147483647 call $~lib/string/String#split @@ -6756,7 +6712,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1520 + i32.const 1472 call $~lib/string/String.__eq local.set $0 end @@ -6770,8 +6726,8 @@ call $~lib/env/abort unreachable end - i32.const 1536 - i32.const 1560 + i32.const 1488 + i32.const 1512 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -6806,7 +6762,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1520 + i32.const 1472 call $~lib/string/String.__eq local.set $0 end @@ -6820,7 +6776,7 @@ call $~lib/env/abort unreachable end - i32.const 1576 + i32.const 1528 i32.const 528 i32.const 2147483647 call $~lib/string/String#split @@ -6867,7 +6823,7 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array#__get - i32.const 1520 + i32.const 1472 call $~lib/string/String.__eq local.set $0 end @@ -6881,7 +6837,7 @@ call $~lib/env/abort unreachable end - i32.const 1600 + i32.const 1552 i32.const 528 i32.const 2147483647 call $~lib/string/String#split @@ -6928,7 +6884,7 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array#__get - i32.const 1520 + i32.const 1472 call $~lib/string/String.__eq local.set $0 end @@ -6942,7 +6898,7 @@ call $~lib/env/abort unreachable end - i32.const 1624 + i32.const 1576 i32.const 528 i32.const 2147483647 call $~lib/string/String#split @@ -6979,7 +6935,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1520 + i32.const 1472 call $~lib/string/String.__eq local.set $0 end @@ -7039,7 +6995,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1520 + i32.const 1472 call $~lib/string/String.__eq local.set $0 end @@ -7096,7 +7052,7 @@ call $~lib/env/abort unreachable end - i32.const 1480 + i32.const 1432 i32.const 528 i32.const 1 call $~lib/string/String#split @@ -7160,7 +7116,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1520 + i32.const 1472 call $~lib/string/String.__eq local.set $0 end @@ -7210,7 +7166,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1520 + i32.const 1472 call $~lib/string/String.__eq local.set $0 end @@ -7224,7 +7180,7 @@ call $~lib/env/abort unreachable end - i32.const 1480 + i32.const 1432 i32.const 528 i32.const -1 call $~lib/string/String#split @@ -7260,7 +7216,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1520 + i32.const 1472 call $~lib/string/String.__eq local.set $0 end @@ -7302,7 +7258,7 @@ end i32.const 8 call $~lib/util/number/itoa32 - i32.const 2080 + i32.const 2032 call $~lib/string/String.__eq i32.eqz if @@ -7328,7 +7284,7 @@ end i32.const -1000 call $~lib/util/number/itoa32 - i32.const 2096 + i32.const 2048 call $~lib/string/String.__eq i32.eqz if @@ -7341,7 +7297,7 @@ end i32.const 1234 call $~lib/util/number/itoa32 - i32.const 2120 + i32.const 2072 call $~lib/string/String.__eq i32.eqz if @@ -7354,7 +7310,7 @@ end i32.const 12345 call $~lib/util/number/itoa32 - i32.const 2136 + i32.const 2088 call $~lib/string/String.__eq i32.eqz if @@ -7367,7 +7323,7 @@ end i32.const 123456 call $~lib/util/number/itoa32 - i32.const 2160 + i32.const 2112 call $~lib/string/String.__eq i32.eqz if @@ -7380,7 +7336,7 @@ end i32.const 1111111 call $~lib/util/number/itoa32 - i32.const 2184 + i32.const 2136 call $~lib/string/String.__eq i32.eqz if @@ -7393,7 +7349,7 @@ end i32.const 1234567 call $~lib/util/number/itoa32 - i32.const 2208 + i32.const 2160 call $~lib/string/String.__eq i32.eqz if @@ -7406,7 +7362,7 @@ end i32.const 2147483646 call $~lib/util/number/itoa32 - i32.const 2232 + i32.const 2184 call $~lib/string/String.__eq i32.eqz if @@ -7419,7 +7375,7 @@ end i32.const 2147483647 call $~lib/util/number/itoa32 - i32.const 2264 + i32.const 2216 call $~lib/string/String.__eq i32.eqz if @@ -7432,7 +7388,7 @@ end i32.const -2147483648 call $~lib/util/number/itoa32 - i32.const 2296 + i32.const 2248 call $~lib/string/String.__eq i32.eqz if @@ -7445,7 +7401,7 @@ end i32.const -1 call $~lib/util/number/itoa32 - i32.const 2328 + i32.const 2280 call $~lib/string/String.__eq i32.eqz if @@ -7471,7 +7427,7 @@ end i32.const 1000 call $~lib/util/number/utoa32 - i32.const 2344 + i32.const 2296 call $~lib/string/String.__eq i32.eqz if @@ -7484,7 +7440,7 @@ end i32.const 2147483647 call $~lib/util/number/utoa32 - i32.const 2264 + i32.const 2216 call $~lib/string/String.__eq i32.eqz if @@ -7497,7 +7453,7 @@ end i32.const -2147483648 call $~lib/util/number/utoa32 - i32.const 2360 + i32.const 2312 call $~lib/string/String.__eq i32.eqz if @@ -7510,7 +7466,7 @@ end i32.const -1 call $~lib/util/number/utoa32 - i32.const 2392 + i32.const 2344 call $~lib/string/String.__eq i32.eqz if @@ -7536,7 +7492,7 @@ end i64.const 1234 call $~lib/util/number/utoa64 - i32.const 2120 + i32.const 2072 call $~lib/string/String.__eq i32.eqz if @@ -7549,7 +7505,7 @@ end i64.const 99999999 call $~lib/util/number/utoa64 - i32.const 2424 + i32.const 2376 call $~lib/string/String.__eq i32.eqz if @@ -7562,7 +7518,7 @@ end i64.const 100000000 call $~lib/util/number/utoa64 - i32.const 2448 + i32.const 2400 call $~lib/string/String.__eq i32.eqz if @@ -7575,7 +7531,7 @@ end i64.const 4294967295 call $~lib/util/number/utoa64 - i32.const 2392 + i32.const 2344 call $~lib/string/String.__eq i32.eqz if @@ -7588,7 +7544,7 @@ end i64.const 68719476735 call $~lib/util/number/utoa64 - i32.const 2480 + i32.const 2432 call $~lib/string/String.__eq i32.eqz if @@ -7601,7 +7557,7 @@ end i64.const 868719476735 call $~lib/util/number/utoa64 - i32.const 2512 + i32.const 2464 call $~lib/string/String.__eq i32.eqz if @@ -7614,7 +7570,7 @@ end i64.const 999868719476735 call $~lib/util/number/utoa64 - i32.const 2544 + i32.const 2496 call $~lib/string/String.__eq i32.eqz if @@ -7627,7 +7583,7 @@ end i64.const 9999868719476735 call $~lib/util/number/utoa64 - i32.const 2584 + i32.const 2536 call $~lib/string/String.__eq i32.eqz if @@ -7640,7 +7596,7 @@ end i64.const 19999868719476735 call $~lib/util/number/utoa64 - i32.const 2624 + i32.const 2576 call $~lib/string/String.__eq i32.eqz if @@ -7653,7 +7609,7 @@ end i64.const -1 call $~lib/util/number/utoa64 - i32.const 2672 + i32.const 2624 call $~lib/string/String.__eq i32.eqz if @@ -7679,7 +7635,7 @@ end i64.const -1234 call $~lib/util/number/itoa64 - i32.const 2720 + i32.const 2672 call $~lib/string/String.__eq i32.eqz if @@ -7692,7 +7648,7 @@ end i64.const 4294967295 call $~lib/util/number/itoa64 - i32.const 2392 + i32.const 2344 call $~lib/string/String.__eq i32.eqz if @@ -7705,7 +7661,7 @@ end i64.const -4294967295 call $~lib/util/number/itoa64 - i32.const 2744 + i32.const 2696 call $~lib/string/String.__eq i32.eqz if @@ -7718,7 +7674,7 @@ end i64.const 68719476735 call $~lib/util/number/itoa64 - i32.const 2480 + i32.const 2432 call $~lib/string/String.__eq i32.eqz if @@ -7731,7 +7687,7 @@ end i64.const -68719476735 call $~lib/util/number/itoa64 - i32.const 2776 + i32.const 2728 call $~lib/string/String.__eq i32.eqz if @@ -7744,7 +7700,7 @@ end i64.const -868719476735 call $~lib/util/number/itoa64 - i32.const 2808 + i32.const 2760 call $~lib/string/String.__eq i32.eqz if @@ -7757,7 +7713,7 @@ end i64.const -999868719476735 call $~lib/util/number/itoa64 - i32.const 2848 + i32.const 2800 call $~lib/string/String.__eq i32.eqz if @@ -7770,7 +7726,7 @@ end i64.const -19999868719476735 call $~lib/util/number/itoa64 - i32.const 2888 + i32.const 2840 call $~lib/string/String.__eq i32.eqz if @@ -7783,7 +7739,7 @@ end i64.const 9223372036854775807 call $~lib/util/number/itoa64 - i32.const 2936 + i32.const 2888 call $~lib/string/String.__eq i32.eqz if @@ -7796,7 +7752,7 @@ end i64.const -9223372036854775808 call $~lib/util/number/itoa64 - i32.const 2984 + i32.const 2936 call $~lib/string/String.__eq i32.eqz if @@ -7809,7 +7765,7 @@ end f64.const 0 call $~lib/util/number/dtoa - i32.const 3032 + i32.const 2984 call $~lib/string/String.__eq i32.eqz if @@ -7822,7 +7778,7 @@ end f64.const -0 call $~lib/util/number/dtoa - i32.const 3032 + i32.const 2984 call $~lib/string/String.__eq i32.eqz if @@ -7835,7 +7791,7 @@ end f64.const nan:0x8000000000000 call $~lib/util/number/dtoa - i32.const 3048 + i32.const 3000 call $~lib/string/String.__eq i32.eqz if @@ -7848,7 +7804,7 @@ end f64.const inf call $~lib/util/number/dtoa - i32.const 3096 + i32.const 3048 call $~lib/string/String.__eq i32.eqz if @@ -7861,7 +7817,7 @@ end f64.const -inf call $~lib/util/number/dtoa - i32.const 3064 + i32.const 3016 call $~lib/string/String.__eq i32.eqz if @@ -7874,7 +7830,7 @@ end f64.const 2.220446049250313e-16 call $~lib/util/number/dtoa - i32.const 4128 + i32.const 4080 call $~lib/string/String.__eq i32.eqz if @@ -7887,7 +7843,7 @@ end f64.const -2.220446049250313e-16 call $~lib/util/number/dtoa - i32.const 4184 + i32.const 4136 call $~lib/string/String.__eq i32.eqz if @@ -7900,7 +7856,7 @@ end f64.const 1797693134862315708145274e284 call $~lib/util/number/dtoa - i32.const 4240 + i32.const 4192 call $~lib/string/String.__eq i32.eqz if @@ -7913,7 +7869,7 @@ end f64.const -1797693134862315708145274e284 call $~lib/util/number/dtoa - i32.const 4296 + i32.const 4248 call $~lib/string/String.__eq i32.eqz if @@ -7926,7 +7882,7 @@ end f64.const 4185580496821356722454785e274 call $~lib/util/number/dtoa - i32.const 4352 + i32.const 4304 call $~lib/string/String.__eq i32.eqz if @@ -7939,7 +7895,7 @@ end f64.const 2.2250738585072014e-308 call $~lib/util/number/dtoa - i32.const 4408 + i32.const 4360 call $~lib/string/String.__eq i32.eqz if @@ -7952,7 +7908,7 @@ end f64.const 4.940656e-318 call $~lib/util/number/dtoa - i32.const 4464 + i32.const 4416 call $~lib/string/String.__eq i32.eqz if @@ -7965,7 +7921,7 @@ end f64.const 9060801153433600 call $~lib/util/number/dtoa - i32.const 4504 + i32.const 4456 call $~lib/string/String.__eq i32.eqz if @@ -7978,7 +7934,7 @@ end f64.const 4708356024711512064 call $~lib/util/number/dtoa - i32.const 4552 + i32.const 4504 call $~lib/string/String.__eq i32.eqz if @@ -7991,7 +7947,7 @@ end f64.const 9409340012568248320 call $~lib/util/number/dtoa - i32.const 4608 + i32.const 4560 call $~lib/string/String.__eq i32.eqz if @@ -8004,7 +7960,7 @@ end f64.const 5e-324 call $~lib/util/number/dtoa - i32.const 4664 + i32.const 4616 call $~lib/string/String.__eq i32.eqz if @@ -8017,7 +7973,7 @@ end f64.const 1 call $~lib/util/number/dtoa - i32.const 4688 + i32.const 4640 call $~lib/string/String.__eq i32.eqz if @@ -8043,7 +7999,7 @@ end f64.const -1 call $~lib/util/number/dtoa - i32.const 4704 + i32.const 4656 call $~lib/string/String.__eq i32.eqz if @@ -8056,7 +8012,7 @@ end f64.const -0.1 call $~lib/util/number/dtoa - i32.const 4720 + i32.const 4672 call $~lib/string/String.__eq i32.eqz if @@ -8069,7 +8025,7 @@ end f64.const 1e6 call $~lib/util/number/dtoa - i32.const 4736 + i32.const 4688 call $~lib/string/String.__eq i32.eqz if @@ -8082,7 +8038,7 @@ end f64.const 1e-06 call $~lib/util/number/dtoa - i32.const 4768 + i32.const 4720 call $~lib/string/String.__eq i32.eqz if @@ -8095,7 +8051,7 @@ end f64.const -1e6 call $~lib/util/number/dtoa - i32.const 4792 + i32.const 4744 call $~lib/string/String.__eq i32.eqz if @@ -8108,7 +8064,7 @@ end f64.const -1e-06 call $~lib/util/number/dtoa - i32.const 4824 + i32.const 4776 call $~lib/string/String.__eq i32.eqz if @@ -8121,7 +8077,7 @@ end f64.const 1e7 call $~lib/util/number/dtoa - i32.const 4856 + i32.const 4808 call $~lib/string/String.__eq i32.eqz if @@ -8134,7 +8090,7 @@ end f64.const 1e-07 call $~lib/util/number/dtoa - i32.const 4888 + i32.const 4840 call $~lib/string/String.__eq i32.eqz if @@ -8147,7 +8103,7 @@ end f64.const 1.e+308 call $~lib/util/number/dtoa - i32.const 4904 + i32.const 4856 call $~lib/string/String.__eq i32.eqz if @@ -8160,7 +8116,7 @@ end f64.const -1.e+308 call $~lib/util/number/dtoa - i32.const 4928 + i32.const 4880 call $~lib/string/String.__eq i32.eqz if @@ -8173,7 +8129,7 @@ end f64.const inf call $~lib/util/number/dtoa - i32.const 3096 + i32.const 3048 call $~lib/string/String.__eq i32.eqz if @@ -8186,7 +8142,7 @@ end f64.const -inf call $~lib/util/number/dtoa - i32.const 3064 + i32.const 3016 call $~lib/string/String.__eq i32.eqz if @@ -8199,7 +8155,7 @@ end f64.const 1e-308 call $~lib/util/number/dtoa - i32.const 4952 + i32.const 4904 call $~lib/string/String.__eq i32.eqz if @@ -8212,7 +8168,7 @@ end f64.const -1e-308 call $~lib/util/number/dtoa - i32.const 4976 + i32.const 4928 call $~lib/string/String.__eq i32.eqz if @@ -8225,7 +8181,7 @@ end f64.const 1e-323 call $~lib/util/number/dtoa - i32.const 5000 + i32.const 4952 call $~lib/string/String.__eq i32.eqz if @@ -8238,7 +8194,7 @@ end f64.const -1e-323 call $~lib/util/number/dtoa - i32.const 5024 + i32.const 4976 call $~lib/string/String.__eq i32.eqz if @@ -8251,7 +8207,7 @@ end f64.const 0 call $~lib/util/number/dtoa - i32.const 3032 + i32.const 2984 call $~lib/string/String.__eq i32.eqz if @@ -8264,7 +8220,7 @@ end f64.const 4294967272 call $~lib/util/number/dtoa - i32.const 5048 + i32.const 5000 call $~lib/string/String.__eq i32.eqz if @@ -8277,7 +8233,7 @@ end f64.const 1.2312145673456234e-08 call $~lib/util/number/dtoa - i32.const 5080 + i32.const 5032 call $~lib/string/String.__eq i32.eqz if @@ -8290,7 +8246,7 @@ end f64.const 555555555.5555556 call $~lib/util/number/dtoa - i32.const 5136 + i32.const 5088 call $~lib/string/String.__eq i32.eqz if @@ -8303,7 +8259,7 @@ end f64.const 0.9999999999999999 call $~lib/util/number/dtoa - i32.const 5184 + i32.const 5136 call $~lib/string/String.__eq i32.eqz if @@ -8316,7 +8272,7 @@ end f64.const 1 call $~lib/util/number/dtoa - i32.const 4688 + i32.const 4640 call $~lib/string/String.__eq i32.eqz if @@ -8329,7 +8285,7 @@ end f64.const 12.34 call $~lib/util/number/dtoa - i32.const 5232 + i32.const 5184 call $~lib/string/String.__eq i32.eqz if @@ -8342,7 +8298,7 @@ end f64.const 0.3333333333333333 call $~lib/util/number/dtoa - i32.const 5256 + i32.const 5208 call $~lib/string/String.__eq i32.eqz if @@ -8355,7 +8311,7 @@ end f64.const 1234e17 call $~lib/util/number/dtoa - i32.const 5304 + i32.const 5256 call $~lib/string/String.__eq i32.eqz if @@ -8368,7 +8324,7 @@ end f64.const 1234e18 call $~lib/util/number/dtoa - i32.const 5360 + i32.const 5312 call $~lib/string/String.__eq i32.eqz if @@ -8381,7 +8337,7 @@ end f64.const 2.71828 call $~lib/util/number/dtoa - i32.const 5392 + i32.const 5344 call $~lib/string/String.__eq i32.eqz if @@ -8394,7 +8350,7 @@ end f64.const 0.0271828 call $~lib/util/number/dtoa - i32.const 5416 + i32.const 5368 call $~lib/string/String.__eq i32.eqz if @@ -8407,7 +8363,7 @@ end f64.const 271.828 call $~lib/util/number/dtoa - i32.const 5448 + i32.const 5400 call $~lib/string/String.__eq i32.eqz if @@ -8420,7 +8376,7 @@ end f64.const 1.1e+128 call $~lib/util/number/dtoa - i32.const 5472 + i32.const 5424 call $~lib/string/String.__eq i32.eqz if @@ -8433,7 +8389,7 @@ end f64.const 1.1e-64 call $~lib/util/number/dtoa - i32.const 5496 + i32.const 5448 call $~lib/string/String.__eq i32.eqz if @@ -8446,7 +8402,7 @@ end f64.const 0.000035689 call $~lib/util/number/dtoa - i32.const 5520 + i32.const 5472 call $~lib/string/String.__eq i32.eqz if @@ -8458,13 +8414,13 @@ unreachable end ) - (func $std/string/getString (; 52 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 50 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 53 ;) (type $FUNCSIG$v) + (func $start (; 51 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 54 ;) (type $FUNCSIG$v) + (func $null (; 52 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index e960f3eaf5..55cfeb8d6c 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -8,6 +8,7 @@ (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$di (func (param i32) (result f64))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (type $FUNCSIG$id (func (param f64) (result i32))) @@ -81,98 +82,97 @@ (data (i32.const 1296) "\01\00\00\00\n\00\00\00c\00d\00e\00f\00g\00") (data (i32.const 1320) "\01\00\00\00\n\00\00\00d\00e\00f\00g\00h\00") (data (i32.const 1344) "\01\00\00\00\1a\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00") - (data (i32.const 1384) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 1432) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 1472) "\01\00\00\00\n\00\00\00a\00,\00b\00,\00c\00") - (data (i32.const 1496) "\01\00\00\00\02\00\00\00.\00") - (data (i32.const 1512) "\01\00\00\00\02\00\00\00c\00") - (data (i32.const 1528) "\01\00\00\00\0e\00\00\00a\00,\00 \00b\00,\00 \00c\00") - (data (i32.const 1552) "\01\00\00\00\04\00\00\00,\00 \00") - (data (i32.const 1568) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00,\00c\00") - (data (i32.const 1592) "\01\00\00\00\0c\00\00\00,\00a\00,\00b\00,\00c\00") - (data (i32.const 1616) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00c\00,\00") - (data (i32.const 1640) "\02\00\00\00\90\01\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") - (data (i32.const 2048) "\05\00\00\00\10\00\00\00p\06\00\00p\06\00\00\90\01\00\00d\00\00\00") - (data (i32.const 2072) "\01\00\00\00\02\00\00\008\00") - (data (i32.const 2088) "\01\00\00\00\n\00\00\00-\001\000\000\000\00") - (data (i32.const 2112) "\01\00\00\00\08\00\00\001\002\003\004\00") - (data (i32.const 2128) "\01\00\00\00\n\00\00\001\002\003\004\005\00") - (data (i32.const 2152) "\01\00\00\00\0c\00\00\001\002\003\004\005\006\00") - (data (i32.const 2176) "\01\00\00\00\0e\00\00\001\001\001\001\001\001\001\00") - (data (i32.const 2200) "\01\00\00\00\0e\00\00\001\002\003\004\005\006\007\00") - (data (i32.const 2224) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\006\00") - (data (i32.const 2256) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\007\00") - (data (i32.const 2288) "\01\00\00\00\16\00\00\00-\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 2320) "\01\00\00\00\04\00\00\00-\001\00") - (data (i32.const 2336) "\01\00\00\00\08\00\00\001\000\000\000\00") - (data (i32.const 2352) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 2384) "\01\00\00\00\14\00\00\004\002\009\004\009\006\007\002\009\005\00") - (data (i32.const 2416) "\01\00\00\00\10\00\00\009\009\009\009\009\009\009\009\00") - (data (i32.const 2440) "\01\00\00\00\12\00\00\001\000\000\000\000\000\000\000\000\00") - (data (i32.const 2472) "\01\00\00\00\16\00\00\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2504) "\01\00\00\00\18\00\00\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2536) "\01\00\00\00\1e\00\00\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2576) "\01\00\00\00 \00\00\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2616) "\01\00\00\00\"\00\00\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2664) "\01\00\00\00(\00\00\001\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005\00") - (data (i32.const 2712) "\01\00\00\00\n\00\00\00-\001\002\003\004\00") - (data (i32.const 2736) "\01\00\00\00\16\00\00\00-\004\002\009\004\009\006\007\002\009\005\00") - (data (i32.const 2768) "\01\00\00\00\18\00\00\00-\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2800) "\01\00\00\00\1a\00\00\00-\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2840) "\01\00\00\00 \00\00\00-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2880) "\01\00\00\00$\00\00\00-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2928) "\01\00\00\00&\00\00\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007\00") - (data (i32.const 2976) "\01\00\00\00(\00\00\00-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008\00") - (data (i32.const 3024) "\01\00\00\00\06\00\00\000\00.\000\00") - (data (i32.const 3040) "\01\00\00\00\06\00\00\00N\00a\00N\00") - (data (i32.const 3056) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 3088) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 3112) "\02\00\00\00\b8\02\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8|inlined.0 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.const 2 - call $~lib/runtime/doRegister - end - ) - (func $~lib/runtime/ArrayBufferView#constructor (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH - local.get $2 - i32.shr_u - i32.gt_u - if - i32.const 0 - i32.const 96 - i32.const 251 - i32.const 57 - call $~lib/env/abort - unreachable - end - i32.const 0 - local.get $1 - local.get $2 - i32.shl - local.tee $1 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.8 (result i32) - i32.const 12 - local.set $4 - local.get $4 - call $~lib/runtime/doAllocate - end - local.set $4 - local.get $4 - i32.const 3 - call $~lib/runtime/doRegister - end - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - end - local.get $3 - i32.store - local.get $0 - local.get $3 - i32.store offset=4 - local.get $0 - local.get $1 - i32.store offset=8 - local.get $0 - ) - (func $~lib/array/Array#constructor (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - if (result i32) - local.get $0 - else - block $~lib/runtime/ALLOCATE|inlined.9 (result i32) - i32.const 16 - local.set $2 - local.get $2 - call $~lib/runtime/doAllocate - end - local.set $2 - local.get $2 - i32.const 4 - call $~lib/runtime/doRegister - end - local.get $1 - i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor - local.set $0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - local.get $1 - i32.store offset=12 - local.get $0 - ) - (func $~lib/memory/memory.free (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 local.set $1 ) - (func $~lib/runtime/doReallocate (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doReallocate (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3930,7 +3847,7 @@ if i32.const 0 i32.const 96 - i32.const 107 + i32.const 133 i32.const 8 call $~lib/env/abort unreachable @@ -3962,7 +3879,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3981,8 +3898,8 @@ i32.gt_u if i32.const 0 - i32.const 1440 - i32.const 10 + i32.const 1392 + i32.const 14 i32.const 64 call $~lib/env/abort unreachable @@ -4020,7 +3937,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -4046,7 +3963,7 @@ i32.store local.get $2 ) - (func $~lib/string/String#split (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4066,7 +3983,7 @@ if i32.const 0 i32.const 168 - i32.const 347 + i32.const 348 i32.const 4 call $~lib/env/abort unreachable @@ -4074,9 +3991,17 @@ local.get $2 i32.eqz if - i32.const 0 - i32.const 0 - call $~lib/array/Array#constructor + block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) + i32.const 0 + local.set $4 + i32.const 0 + local.set $3 + local.get $4 + local.get $3 + i32.const 2 + i32.const 2 + call $~lib/runtime/doMakeArray + end return end local.get $1 @@ -4084,9 +4009,17 @@ i32.eq if block (result i32) - i32.const 0 - i32.const 1 - call $~lib/array/Array#constructor + block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) + i32.const 1 + local.set $5 + i32.const 0 + local.set $6 + local.get $5 + local.get $6 + i32.const 2 + i32.const 2 + call $~lib/runtime/doMakeArray + end local.set $3 local.get $3 i32.load offset=4 @@ -4100,10 +4033,10 @@ end local.get $0 call $~lib/string/String#get:length - local.set $5 + local.set $7 local.get $1 call $~lib/string/String#get:length - local.set $6 + local.set $8 local.get $2 i32.const 0 i32.lt_s @@ -4111,18 +4044,26 @@ global.get $~lib/builtins/i32.MAX_VALUE local.set $2 end - local.get $6 + local.get $8 i32.eqz if - local.get $5 + local.get $7 i32.eqz if - i32.const 0 - i32.const 0 - call $~lib/array/Array#constructor + block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) + i32.const 0 + local.set $3 + i32.const 0 + local.set $4 + local.get $3 + local.get $4 + i32.const 2 + i32.const 2 + call $~lib/runtime/doMakeArray + end return end - local.get $5 + local.get $7 local.tee $4 local.get $2 local.tee $3 @@ -4130,57 +4071,65 @@ local.get $3 i32.lt_s select - local.set $5 - i32.const 0 - local.get $5 - call $~lib/array/Array#constructor + local.set $7 + block $~lib/runtime/MAKEARRAY|inlined.3 (result i32) + local.get $7 + local.set $3 + i32.const 0 + local.set $4 + local.get $3 + local.get $4 + i32.const 2 + i32.const 2 + call $~lib/runtime/doMakeArray + end local.set $4 local.get $4 i32.load offset=4 local.set $3 block $break|0 i32.const 0 - local.set $7 + local.set $6 loop $repeat|0 + local.get $6 local.get $7 - local.get $5 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/runtime/ALLOCATE|inlined.10 (result i32) - i32.const 2 - local.set $8 - local.get $8 - call $~lib/runtime/doAllocate + block $~lib/runtime/REGISTER|inlined.7 (result i32) + block $~lib/runtime/ALLOCATE|inlined.7 (result i32) + i32.const 2 + local.set $9 + local.get $9 + call $~lib/runtime/doAllocate + end + local.set $5 + local.get $5 + i32.const 1 + call $~lib/runtime/doRegister end - local.set $8 - local.get $8 + local.set $5 + local.get $5 local.get $0 - local.get $7 + local.get $6 i32.const 1 i32.shl i32.add i32.load16_u i32.store16 local.get $3 - local.get $7 + local.get $6 i32.const 2 i32.shl i32.add - block $~lib/runtime/REGISTER|inlined.7 (result i32) - local.get $8 - local.set $9 - local.get $9 - i32.const 1 - call $~lib/runtime/doRegister - end + local.get $5 i32.store end - local.get $7 + local.get $6 i32.const 1 i32.add - local.set $7 + local.set $6 br $repeat|0 unreachable end @@ -4189,12 +4138,20 @@ local.get $4 return else - local.get $5 + local.get $7 i32.eqz if - i32.const 0 - i32.const 1 - call $~lib/array/Array#constructor + block $~lib/runtime/MAKEARRAY|inlined.4 (result i32) + i32.const 1 + local.set $4 + i32.const 0 + local.set $3 + local.get $4 + local.get $3 + i32.const 2 + i32.const 2 + call $~lib/runtime/doMakeArray + end local.set $3 local.get $3 i32.load offset=4 @@ -4204,9 +4161,17 @@ return end end - i32.const 0 - i32.const 0 - call $~lib/array/Array#constructor + block $~lib/runtime/MAKEARRAY|inlined.5 (result i32) + i32.const 0 + local.set $4 + i32.const 0 + local.set $3 + local.get $4 + local.get $3 + i32.const 2 + i32.const 2 + call $~lib/runtime/doMakeArray + end local.set $10 i32.const 0 local.set $11 @@ -4218,6 +4183,12 @@ loop $continue|1 local.get $0 local.get $1 + local.tee $3 + if (result i32) + local.get $3 + else + unreachable + end local.get $12 call $~lib/string/String#indexOf local.tee $11 @@ -4233,7 +4204,7 @@ i32.const 0 i32.gt_s if - block $~lib/runtime/ALLOCATE|inlined.11 (result i32) + block $~lib/runtime/ALLOCATE|inlined.8 (result i32) local.get $3 i32.const 1 i32.shl @@ -4255,8 +4226,8 @@ local.get $10 block $~lib/runtime/REGISTER|inlined.8 (result i32) local.get $4 - local.set $7 - local.get $7 + local.set $6 + local.get $6 i32.const 1 call $~lib/runtime/doRegister end @@ -4279,7 +4250,7 @@ return end local.get $11 - local.get $6 + local.get $8 i32.add local.set $12 end @@ -4290,9 +4261,17 @@ local.get $12 i32.eqz if - i32.const 0 - i32.const 1 - call $~lib/array/Array#constructor + block $~lib/runtime/MAKEARRAY|inlined.6 (result i32) + i32.const 1 + local.set $4 + i32.const 0 + local.set $3 + local.get $4 + local.get $3 + i32.const 2 + i32.const 2 + call $~lib/runtime/doMakeArray + end local.set $3 local.get $3 i32.load offset=4 @@ -4301,7 +4280,7 @@ local.get $3 return end - local.get $5 + local.get $7 local.get $12 i32.sub local.set $14 @@ -4309,7 +4288,7 @@ i32.const 0 i32.gt_s if - block $~lib/runtime/ALLOCATE|inlined.12 (result i32) + block $~lib/runtime/ALLOCATE|inlined.9 (result i32) local.get $14 i32.const 1 i32.shl @@ -4346,11 +4325,23 @@ end local.get $10 ) - (func $~lib/array/Array#get:length (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 1392 + i32.const 97 + i32.const 45 + call $~lib/env/abort + unreachable + end local.get $1 local.get $0 i32.load offset=8 @@ -4359,8 +4350,8 @@ i32.ge_u if i32.const 0 - i32.const 1440 - i32.const 69 + i32.const 1392 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -4373,7 +4364,7 @@ i32.add i32.load ) - (func $~lib/util/number/decimalCount32 (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -4442,7 +4433,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa32_lut (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 43 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4450,7 +4441,7 @@ (local $7 i32) (local $8 i64) (local $9 i64) - i32.const 2056 + i32.const 2008 i32.load offset=4 local.set $3 block $break|0 @@ -4585,7 +4576,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4614,7 +4605,7 @@ local.get $1 i32.add local.set $2 - block $~lib/runtime/ALLOCATE|inlined.13 (result i32) + block $~lib/runtime/ALLOCATE|inlined.10 (result i32) local.get $2 i32.const 1 i32.shl @@ -4649,7 +4640,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/utoa32 (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4664,7 +4655,7 @@ local.get $0 call $~lib/util/number/decimalCount32 local.set $1 - block $~lib/runtime/ALLOCATE|inlined.14 (result i32) + block $~lib/runtime/ALLOCATE|inlined.11 (result i32) local.get $1 i32.const 1 i32.shl @@ -4693,7 +4684,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/decimalCount64 (; 48 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 46 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -4762,7 +4753,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 49 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 47 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -4774,7 +4765,7 @@ (local $11 i32) (local $12 i64) (local $13 i64) - i32.const 2056 + i32.const 2008 i32.load offset=4 local.set $3 block $break|0 @@ -4890,7 +4881,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 50 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 48 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4915,7 +4906,7 @@ local.get $2 call $~lib/util/number/decimalCount32 local.set $3 - block $~lib/runtime/ALLOCATE|inlined.15 (result i32) + block $~lib/runtime/ALLOCATE|inlined.12 (result i32) local.get $3 i32.const 1 i32.shl @@ -4940,7 +4931,7 @@ local.get $0 call $~lib/util/number/decimalCount64 local.set $3 - block $~lib/runtime/ALLOCATE|inlined.16 (result i32) + block $~lib/runtime/ALLOCATE|inlined.13 (result i32) local.get $3 i32.const 1 i32.shl @@ -4970,7 +4961,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/util/number/itoa64 (; 51 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 49 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5009,7 +5000,7 @@ local.get $1 i32.add local.set $4 - block $~lib/runtime/ALLOCATE|inlined.17 (result i32) + block $~lib/runtime/ALLOCATE|inlined.14 (result i32) local.get $4 i32.const 1 i32.shl @@ -5036,7 +5027,7 @@ local.get $1 i32.add local.set $4 - block $~lib/runtime/ALLOCATE|inlined.18 (result i32) + block $~lib/runtime/ALLOCATE|inlined.15 (result i32) local.get $4 i32.const 1 i32.shl @@ -5072,19 +5063,19 @@ call $~lib/runtime/doRegister end ) - (func $~lib/builtins/isFinite (; 52 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 50 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 53 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 51 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/util/number/genDigits (; 54 ;) (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 (; 52 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -5140,7 +5131,7 @@ local.set $14 local.get $6 local.set $15 - i32.const 4104 + i32.const 4056 i32.load offset=4 local.set $16 block $break|0 @@ -5655,7 +5646,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5988,7 +5979,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 56 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 54 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -6157,7 +6148,7 @@ i32.shl i32.sub global.set $~lib/util/number/_K - i32.const 3824 + i32.const 3776 i32.load offset=4 local.get $13 i32.const 3 @@ -6165,7 +6156,7 @@ i32.add i64.load global.set $~lib/util/number/_frc_pow - i32.const 4032 + i32.const 3984 i32.load offset=4 local.get $13 i32.const 1 @@ -6434,7 +6425,7 @@ local.get $2 i32.add ) - (func $~lib/string/String#substring (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6450,7 +6441,7 @@ if i32.const 0 i32.const 168 - i32.const 186 + i32.const 187 i32.const 4 call $~lib/env/abort unreachable @@ -6539,7 +6530,7 @@ local.get $0 return end - block $~lib/runtime/ALLOCATE|inlined.20 (result i32) + block $~lib/runtime/ALLOCATE|inlined.17 (result i32) local.get $3 local.set $4 local.get $4 @@ -6560,7 +6551,7 @@ call $~lib/runtime/doRegister end ) - (func $~lib/runtime/doDiscard (; 58 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/doDiscard (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/runtime/assertUnregistered local.get $0 @@ -6568,7 +6559,7 @@ i32.sub call $~lib/memory/memory.free ) - (func $~lib/util/number/dtoa (; 59 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 57 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6577,7 +6568,7 @@ f64.const 0 f64.eq if - i32.const 3032 + i32.const 2984 return end local.get $0 @@ -6587,18 +6578,18 @@ local.get $0 call $~lib/builtins/isNaN if - i32.const 3048 + i32.const 3000 return end - i32.const 3064 - i32.const 3096 + i32.const 3016 + i32.const 3048 local.get $0 f64.const 0 f64.lt select return end - block $~lib/runtime/ALLOCATE|inlined.19 (result i32) + block $~lib/runtime/ALLOCATE|inlined.16 (result i32) i32.const 28 i32.const 1 i32.shl @@ -6624,7 +6615,7 @@ end local.get $4 ) - (func $start:std/string (; 60 ;) (type $FUNCSIG$v) + (func $start:std/string (; 58 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8263,8 +8254,8 @@ call $~lib/env/abort unreachable end - i32.const 1480 - i32.const 1504 + i32.const 1432 + i32.const 1456 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -8277,7 +8268,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 1480 + i32.const 1432 call $~lib/string/String.__eq else local.get $0 @@ -8291,7 +8282,7 @@ call $~lib/env/abort unreachable end - i32.const 1480 + i32.const 1432 i32.const 528 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split @@ -8325,7 +8316,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1520 + i32.const 1472 call $~lib/string/String.__eq else local.get $0 @@ -8339,8 +8330,8 @@ call $~lib/env/abort unreachable end - i32.const 1536 - i32.const 1560 + i32.const 1488 + i32.const 1512 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -8373,7 +8364,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1520 + i32.const 1472 call $~lib/string/String.__eq else local.get $0 @@ -8387,7 +8378,7 @@ call $~lib/env/abort unreachable end - i32.const 1576 + i32.const 1528 i32.const 528 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split @@ -8431,7 +8422,7 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array#__get - i32.const 1520 + i32.const 1472 call $~lib/string/String.__eq else local.get $0 @@ -8445,7 +8436,7 @@ call $~lib/env/abort unreachable end - i32.const 1600 + i32.const 1552 i32.const 528 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split @@ -8489,7 +8480,7 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array#__get - i32.const 1520 + i32.const 1472 call $~lib/string/String.__eq else local.get $0 @@ -8503,7 +8494,7 @@ call $~lib/env/abort unreachable end - i32.const 1624 + i32.const 1576 i32.const 528 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split @@ -8537,7 +8528,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1520 + i32.const 1472 call $~lib/string/String.__eq else local.get $0 @@ -8595,7 +8586,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1520 + i32.const 1472 call $~lib/string/String.__eq else local.get $0 @@ -8655,7 +8646,7 @@ call $~lib/env/abort unreachable end - i32.const 1480 + i32.const 1432 i32.const 528 i32.const 1 call $~lib/string/String#split @@ -8717,7 +8708,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1520 + i32.const 1472 call $~lib/string/String.__eq else local.get $0 @@ -8765,7 +8756,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1520 + i32.const 1472 call $~lib/string/String.__eq else local.get $0 @@ -8779,7 +8770,7 @@ call $~lib/env/abort unreachable end - i32.const 1480 + i32.const 1432 i32.const 528 i32.const -1 call $~lib/string/String#split @@ -8813,7 +8804,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1520 + i32.const 1472 call $~lib/string/String.__eq else local.get $0 @@ -8855,7 +8846,7 @@ end i32.const 8 call $~lib/util/number/itoa32 - i32.const 2080 + i32.const 2032 call $~lib/string/String.__eq i32.eqz if @@ -8881,7 +8872,7 @@ end i32.const -1000 call $~lib/util/number/itoa32 - i32.const 2096 + i32.const 2048 call $~lib/string/String.__eq i32.eqz if @@ -8894,7 +8885,7 @@ end i32.const 1234 call $~lib/util/number/itoa32 - i32.const 2120 + i32.const 2072 call $~lib/string/String.__eq i32.eqz if @@ -8907,7 +8898,7 @@ end i32.const 12345 call $~lib/util/number/itoa32 - i32.const 2136 + i32.const 2088 call $~lib/string/String.__eq i32.eqz if @@ -8920,7 +8911,7 @@ end i32.const 123456 call $~lib/util/number/itoa32 - i32.const 2160 + i32.const 2112 call $~lib/string/String.__eq i32.eqz if @@ -8933,7 +8924,7 @@ end i32.const 1111111 call $~lib/util/number/itoa32 - i32.const 2184 + i32.const 2136 call $~lib/string/String.__eq i32.eqz if @@ -8946,7 +8937,7 @@ end i32.const 1234567 call $~lib/util/number/itoa32 - i32.const 2208 + i32.const 2160 call $~lib/string/String.__eq i32.eqz if @@ -8959,7 +8950,7 @@ end i32.const 2147483646 call $~lib/util/number/itoa32 - i32.const 2232 + i32.const 2184 call $~lib/string/String.__eq i32.eqz if @@ -8972,7 +8963,7 @@ end i32.const 2147483647 call $~lib/util/number/itoa32 - i32.const 2264 + i32.const 2216 call $~lib/string/String.__eq i32.eqz if @@ -8985,7 +8976,7 @@ end i32.const -2147483648 call $~lib/util/number/itoa32 - i32.const 2296 + i32.const 2248 call $~lib/string/String.__eq i32.eqz if @@ -8998,7 +8989,7 @@ end i32.const -1 call $~lib/util/number/itoa32 - i32.const 2328 + i32.const 2280 call $~lib/string/String.__eq i32.eqz if @@ -9024,7 +9015,7 @@ end i32.const 1000 call $~lib/util/number/utoa32 - i32.const 2344 + i32.const 2296 call $~lib/string/String.__eq i32.eqz if @@ -9037,7 +9028,7 @@ end i32.const 2147483647 call $~lib/util/number/utoa32 - i32.const 2264 + i32.const 2216 call $~lib/string/String.__eq i32.eqz if @@ -9050,7 +9041,7 @@ end i32.const -2147483648 call $~lib/util/number/utoa32 - i32.const 2360 + i32.const 2312 call $~lib/string/String.__eq i32.eqz if @@ -9063,7 +9054,7 @@ end global.get $~lib/builtins/u32.MAX_VALUE call $~lib/util/number/utoa32 - i32.const 2392 + i32.const 2344 call $~lib/string/String.__eq i32.eqz if @@ -9089,7 +9080,7 @@ end i64.const 1234 call $~lib/util/number/utoa64 - i32.const 2120 + i32.const 2072 call $~lib/string/String.__eq i32.eqz if @@ -9102,7 +9093,7 @@ end i64.const 99999999 call $~lib/util/number/utoa64 - i32.const 2424 + i32.const 2376 call $~lib/string/String.__eq i32.eqz if @@ -9115,7 +9106,7 @@ end i64.const 100000000 call $~lib/util/number/utoa64 - i32.const 2448 + i32.const 2400 call $~lib/string/String.__eq i32.eqz if @@ -9128,7 +9119,7 @@ end i64.const 4294967295 call $~lib/util/number/utoa64 - i32.const 2392 + i32.const 2344 call $~lib/string/String.__eq i32.eqz if @@ -9141,7 +9132,7 @@ end i64.const 68719476735 call $~lib/util/number/utoa64 - i32.const 2480 + i32.const 2432 call $~lib/string/String.__eq i32.eqz if @@ -9154,7 +9145,7 @@ end i64.const 868719476735 call $~lib/util/number/utoa64 - i32.const 2512 + i32.const 2464 call $~lib/string/String.__eq i32.eqz if @@ -9167,7 +9158,7 @@ end i64.const 999868719476735 call $~lib/util/number/utoa64 - i32.const 2544 + i32.const 2496 call $~lib/string/String.__eq i32.eqz if @@ -9180,7 +9171,7 @@ end i64.const 9999868719476735 call $~lib/util/number/utoa64 - i32.const 2584 + i32.const 2536 call $~lib/string/String.__eq i32.eqz if @@ -9193,7 +9184,7 @@ end i64.const 19999868719476735 call $~lib/util/number/utoa64 - i32.const 2624 + i32.const 2576 call $~lib/string/String.__eq i32.eqz if @@ -9206,7 +9197,7 @@ end global.get $~lib/builtins/u64.MAX_VALUE call $~lib/util/number/utoa64 - i32.const 2672 + i32.const 2624 call $~lib/string/String.__eq i32.eqz if @@ -9232,7 +9223,7 @@ end i64.const -1234 call $~lib/util/number/itoa64 - i32.const 2720 + i32.const 2672 call $~lib/string/String.__eq i32.eqz if @@ -9245,7 +9236,7 @@ end i64.const 4294967295 call $~lib/util/number/itoa64 - i32.const 2392 + i32.const 2344 call $~lib/string/String.__eq i32.eqz if @@ -9258,7 +9249,7 @@ end i64.const -4294967295 call $~lib/util/number/itoa64 - i32.const 2744 + i32.const 2696 call $~lib/string/String.__eq i32.eqz if @@ -9271,7 +9262,7 @@ end i64.const 68719476735 call $~lib/util/number/itoa64 - i32.const 2480 + i32.const 2432 call $~lib/string/String.__eq i32.eqz if @@ -9284,7 +9275,7 @@ end i64.const -68719476735 call $~lib/util/number/itoa64 - i32.const 2776 + i32.const 2728 call $~lib/string/String.__eq i32.eqz if @@ -9297,7 +9288,7 @@ end i64.const -868719476735 call $~lib/util/number/itoa64 - i32.const 2808 + i32.const 2760 call $~lib/string/String.__eq i32.eqz if @@ -9310,7 +9301,7 @@ end i64.const -999868719476735 call $~lib/util/number/itoa64 - i32.const 2848 + i32.const 2800 call $~lib/string/String.__eq i32.eqz if @@ -9323,7 +9314,7 @@ end i64.const -19999868719476735 call $~lib/util/number/itoa64 - i32.const 2888 + i32.const 2840 call $~lib/string/String.__eq i32.eqz if @@ -9336,7 +9327,7 @@ end global.get $~lib/builtins/i64.MAX_VALUE call $~lib/util/number/itoa64 - i32.const 2936 + i32.const 2888 call $~lib/string/String.__eq i32.eqz if @@ -9349,7 +9340,7 @@ end global.get $~lib/builtins/i64.MIN_VALUE call $~lib/util/number/itoa64 - i32.const 2984 + i32.const 2936 call $~lib/string/String.__eq i32.eqz if @@ -9362,7 +9353,7 @@ end f64.const 0 call $~lib/util/number/dtoa - i32.const 3032 + i32.const 2984 call $~lib/string/String.__eq i32.eqz if @@ -9375,7 +9366,7 @@ end f64.const -0 call $~lib/util/number/dtoa - i32.const 3032 + i32.const 2984 call $~lib/string/String.__eq i32.eqz if @@ -9388,7 +9379,7 @@ end f64.const nan:0x8000000000000 call $~lib/util/number/dtoa - i32.const 3048 + i32.const 3000 call $~lib/string/String.__eq i32.eqz if @@ -9401,7 +9392,7 @@ end f64.const inf call $~lib/util/number/dtoa - i32.const 3096 + i32.const 3048 call $~lib/string/String.__eq i32.eqz if @@ -9415,7 +9406,7 @@ f64.const inf f64.neg call $~lib/util/number/dtoa - i32.const 3064 + i32.const 3016 call $~lib/string/String.__eq i32.eqz if @@ -9428,7 +9419,7 @@ end global.get $~lib/builtins/f64.EPSILON call $~lib/util/number/dtoa - i32.const 4128 + i32.const 4080 call $~lib/string/String.__eq i32.eqz if @@ -9442,7 +9433,7 @@ global.get $~lib/builtins/f64.EPSILON f64.neg call $~lib/util/number/dtoa - i32.const 4184 + i32.const 4136 call $~lib/string/String.__eq i32.eqz if @@ -9455,7 +9446,7 @@ end global.get $~lib/builtins/f64.MAX_VALUE call $~lib/util/number/dtoa - i32.const 4240 + i32.const 4192 call $~lib/string/String.__eq i32.eqz if @@ -9469,7 +9460,7 @@ global.get $~lib/builtins/f64.MAX_VALUE f64.neg call $~lib/util/number/dtoa - i32.const 4296 + i32.const 4248 call $~lib/string/String.__eq i32.eqz if @@ -9482,7 +9473,7 @@ end f64.const 4185580496821356722454785e274 call $~lib/util/number/dtoa - i32.const 4352 + i32.const 4304 call $~lib/string/String.__eq i32.eqz if @@ -9495,7 +9486,7 @@ end f64.const 2.2250738585072014e-308 call $~lib/util/number/dtoa - i32.const 4408 + i32.const 4360 call $~lib/string/String.__eq i32.eqz if @@ -9508,7 +9499,7 @@ end f64.const 4.940656e-318 call $~lib/util/number/dtoa - i32.const 4464 + i32.const 4416 call $~lib/string/String.__eq i32.eqz if @@ -9521,7 +9512,7 @@ end f64.const 9060801153433600 call $~lib/util/number/dtoa - i32.const 4504 + i32.const 4456 call $~lib/string/String.__eq i32.eqz if @@ -9534,7 +9525,7 @@ end f64.const 4708356024711512064 call $~lib/util/number/dtoa - i32.const 4552 + i32.const 4504 call $~lib/string/String.__eq i32.eqz if @@ -9547,7 +9538,7 @@ end f64.const 9409340012568248320 call $~lib/util/number/dtoa - i32.const 4608 + i32.const 4560 call $~lib/string/String.__eq i32.eqz if @@ -9560,7 +9551,7 @@ end f64.const 5e-324 call $~lib/util/number/dtoa - i32.const 4664 + i32.const 4616 call $~lib/string/String.__eq i32.eqz if @@ -9573,7 +9564,7 @@ end f64.const 1 call $~lib/util/number/dtoa - i32.const 4688 + i32.const 4640 call $~lib/string/String.__eq i32.eqz if @@ -9599,7 +9590,7 @@ end f64.const -1 call $~lib/util/number/dtoa - i32.const 4704 + i32.const 4656 call $~lib/string/String.__eq i32.eqz if @@ -9612,7 +9603,7 @@ end f64.const -0.1 call $~lib/util/number/dtoa - i32.const 4720 + i32.const 4672 call $~lib/string/String.__eq i32.eqz if @@ -9625,7 +9616,7 @@ end f64.const 1e6 call $~lib/util/number/dtoa - i32.const 4736 + i32.const 4688 call $~lib/string/String.__eq i32.eqz if @@ -9638,7 +9629,7 @@ end f64.const 1e-06 call $~lib/util/number/dtoa - i32.const 4768 + i32.const 4720 call $~lib/string/String.__eq i32.eqz if @@ -9651,7 +9642,7 @@ end f64.const -1e6 call $~lib/util/number/dtoa - i32.const 4792 + i32.const 4744 call $~lib/string/String.__eq i32.eqz if @@ -9664,7 +9655,7 @@ end f64.const -1e-06 call $~lib/util/number/dtoa - i32.const 4824 + i32.const 4776 call $~lib/string/String.__eq i32.eqz if @@ -9677,7 +9668,7 @@ end f64.const 1e7 call $~lib/util/number/dtoa - i32.const 4856 + i32.const 4808 call $~lib/string/String.__eq i32.eqz if @@ -9690,7 +9681,7 @@ end f64.const 1e-07 call $~lib/util/number/dtoa - i32.const 4888 + i32.const 4840 call $~lib/string/String.__eq i32.eqz if @@ -9703,7 +9694,7 @@ end f64.const 1.e+308 call $~lib/util/number/dtoa - i32.const 4904 + i32.const 4856 call $~lib/string/String.__eq i32.eqz if @@ -9716,7 +9707,7 @@ end f64.const -1.e+308 call $~lib/util/number/dtoa - i32.const 4928 + i32.const 4880 call $~lib/string/String.__eq i32.eqz if @@ -9729,7 +9720,7 @@ end f64.const inf call $~lib/util/number/dtoa - i32.const 3096 + i32.const 3048 call $~lib/string/String.__eq i32.eqz if @@ -9742,7 +9733,7 @@ end f64.const -inf call $~lib/util/number/dtoa - i32.const 3064 + i32.const 3016 call $~lib/string/String.__eq i32.eqz if @@ -9755,7 +9746,7 @@ end f64.const 1e-308 call $~lib/util/number/dtoa - i32.const 4952 + i32.const 4904 call $~lib/string/String.__eq i32.eqz if @@ -9768,7 +9759,7 @@ end f64.const -1e-308 call $~lib/util/number/dtoa - i32.const 4976 + i32.const 4928 call $~lib/string/String.__eq i32.eqz if @@ -9781,7 +9772,7 @@ end f64.const 1e-323 call $~lib/util/number/dtoa - i32.const 5000 + i32.const 4952 call $~lib/string/String.__eq i32.eqz if @@ -9794,7 +9785,7 @@ end f64.const -1e-323 call $~lib/util/number/dtoa - i32.const 5024 + i32.const 4976 call $~lib/string/String.__eq i32.eqz if @@ -9807,7 +9798,7 @@ end f64.const 0 call $~lib/util/number/dtoa - i32.const 3032 + i32.const 2984 call $~lib/string/String.__eq i32.eqz if @@ -9820,7 +9811,7 @@ end f64.const 4294967272 call $~lib/util/number/dtoa - i32.const 5048 + i32.const 5000 call $~lib/string/String.__eq i32.eqz if @@ -9833,7 +9824,7 @@ end f64.const 1.2312145673456234e-08 call $~lib/util/number/dtoa - i32.const 5080 + i32.const 5032 call $~lib/string/String.__eq i32.eqz if @@ -9846,7 +9837,7 @@ end f64.const 555555555.5555556 call $~lib/util/number/dtoa - i32.const 5136 + i32.const 5088 call $~lib/string/String.__eq i32.eqz if @@ -9859,7 +9850,7 @@ end f64.const 0.9999999999999999 call $~lib/util/number/dtoa - i32.const 5184 + i32.const 5136 call $~lib/string/String.__eq i32.eqz if @@ -9872,7 +9863,7 @@ end f64.const 1 call $~lib/util/number/dtoa - i32.const 4688 + i32.const 4640 call $~lib/string/String.__eq i32.eqz if @@ -9885,7 +9876,7 @@ end f64.const 12.34 call $~lib/util/number/dtoa - i32.const 5232 + i32.const 5184 call $~lib/string/String.__eq i32.eqz if @@ -9900,7 +9891,7 @@ f64.const 3 f64.div call $~lib/util/number/dtoa - i32.const 5256 + i32.const 5208 call $~lib/string/String.__eq i32.eqz if @@ -9913,7 +9904,7 @@ end f64.const 1234e17 call $~lib/util/number/dtoa - i32.const 5304 + i32.const 5256 call $~lib/string/String.__eq i32.eqz if @@ -9926,7 +9917,7 @@ end f64.const 1234e18 call $~lib/util/number/dtoa - i32.const 5360 + i32.const 5312 call $~lib/string/String.__eq i32.eqz if @@ -9939,7 +9930,7 @@ end f64.const 2.71828 call $~lib/util/number/dtoa - i32.const 5392 + i32.const 5344 call $~lib/string/String.__eq i32.eqz if @@ -9952,7 +9943,7 @@ end f64.const 0.0271828 call $~lib/util/number/dtoa - i32.const 5416 + i32.const 5368 call $~lib/string/String.__eq i32.eqz if @@ -9965,7 +9956,7 @@ end f64.const 271.828 call $~lib/util/number/dtoa - i32.const 5448 + i32.const 5400 call $~lib/string/String.__eq i32.eqz if @@ -9978,7 +9969,7 @@ end f64.const 1.1e+128 call $~lib/util/number/dtoa - i32.const 5472 + i32.const 5424 call $~lib/string/String.__eq i32.eqz if @@ -9991,7 +9982,7 @@ end f64.const 1.1e-64 call $~lib/util/number/dtoa - i32.const 5496 + i32.const 5448 call $~lib/string/String.__eq i32.eqz if @@ -10004,7 +9995,7 @@ end f64.const 0.000035689 call $~lib/util/number/dtoa - i32.const 5520 + i32.const 5472 call $~lib/string/String.__eq i32.eqz if @@ -10016,12 +10007,12 @@ unreachable end ) - (func $std/string/getString (; 61 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 59 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 62 ;) (type $FUNCSIG$v) + (func $start (; 60 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 63 ;) (type $FUNCSIG$v) + (func $null (; 61 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 56520d6799..1079090e89 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 72 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -157,7 +157,7 @@ if i32.const 0 i32.const 72 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable @@ -392,7 +392,7 @@ if i32.const 0 i32.const 112 - i32.const 24 + i32.const 25 i32.const 43 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 9291829172..bf082c1d8a 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -201,7 +201,7 @@ if i32.const 0 i32.const 72 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -216,7 +216,7 @@ if i32.const 0 i32.const 72 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable @@ -498,7 +498,7 @@ if i32.const 0 i32.const 112 - i32.const 24 + i32.const 25 i32.const 43 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 75c82fb96e..4abc73d726 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -403,7 +403,7 @@ if i32.const 0 i32.const 64 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -417,7 +417,7 @@ if i32.const 0 i32.const 64 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable @@ -441,7 +441,7 @@ if i32.const 0 i32.const 104 - i32.const 24 + i32.const 25 i32.const 43 call $~lib/env/abort unreachable @@ -465,7 +465,7 @@ if i32.const 0 i32.const 64 - i32.const 251 + i32.const 348 i32.const 57 call $~lib/env/abort unreachable @@ -1078,7 +1078,7 @@ if i32.const 0 i32.const 152 - i32.const 441 + i32.const 442 i32.const 63 call $~lib/env/abort unreachable @@ -1102,7 +1102,7 @@ if i32.const 0 i32.const 152 - i32.const 435 + i32.const 436 i32.const 63 call $~lib/env/abort unreachable @@ -1212,7 +1212,7 @@ if i32.const 0 i32.const 152 - i32.const 851 + i32.const 852 i32.const 63 call $~lib/env/abort unreachable @@ -1750,7 +1750,7 @@ if i32.const 0 i32.const 152 - i32.const 845 + i32.const 846 i32.const 63 call $~lib/env/abort unreachable @@ -1771,7 +1771,7 @@ if i32.const 0 i32.const 152 - i32.const 195 + i32.const 196 i32.const 44 call $~lib/env/abort unreachable @@ -1803,7 +1803,7 @@ if i32.const 0 i32.const 152 - i32.const 189 + i32.const 190 i32.const 44 call $~lib/env/abort unreachable @@ -1822,7 +1822,7 @@ if i32.const 0 i32.const 152 - i32.const 31 + i32.const 32 i32.const 44 call $~lib/env/abort unreachable @@ -2992,40 +2992,39 @@ end end ) - (func $~lib/runtime/doWrapArray (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) + (func $~lib/runtime/doMakeArray (; 36 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) i32.const 16 call $~lib/runtime/doAllocate - local.get $1 + local.get $2 call $~lib/runtime/doRegister - local.tee $3 + local.tee $2 local.get $0 - i32.const 8 - i32.sub - i32.load offset=4 - local.tee $4 + local.get $3 + i32.shl + local.tee $3 call $~lib/runtime/doAllocate - local.get $1 + i32.const 2 call $~lib/runtime/doRegister - local.tee $1 + local.tee $4 i32.store - local.get $3 - local.get $1 + local.get $2 + local.get $4 i32.store offset=4 + local.get $2 local.get $3 - local.get $4 i32.store offset=8 - local.get $3 - local.get $4 local.get $2 - i32.shr_u + local.get $0 i32.store offset=12 local.get $1 - local.get $0 - local.get $4 - call $~lib/memory/memory.copy - local.get $3 + if + local.get $4 + local.get $1 + local.get $3 + call $~lib/memory/memory.copy + end + local.get $2 ) (func $~lib/typedarray/Int8Array#__get (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -3035,7 +3034,7 @@ if i32.const 0 i32.const 152 - i32.const 25 + i32.const 26 i32.const 44 call $~lib/env/abort unreachable @@ -3054,7 +3053,7 @@ if i32.const 0 i32.const 216 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -3274,7 +3273,7 @@ if i32.const 0 i32.const 216 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -3414,7 +3413,7 @@ if i32.const 0 i32.const 152 - i32.const 113 + i32.const 114 i32.const 44 call $~lib/env/abort unreachable @@ -3537,7 +3536,7 @@ if i32.const 0 i32.const 152 - i32.const 277 + i32.const 278 i32.const 63 call $~lib/env/abort unreachable @@ -3633,7 +3632,7 @@ if i32.const 0 i32.const 152 - i32.const 359 + i32.const 360 i32.const 63 call $~lib/env/abort unreachable @@ -3800,7 +3799,7 @@ if i32.const 0 i32.const 152 - i32.const 523 + i32.const 524 i32.const 63 call $~lib/env/abort unreachable @@ -3854,7 +3853,7 @@ if i32.const 0 i32.const 152 - i32.const 605 + i32.const 606 i32.const 63 call $~lib/env/abort unreachable @@ -3954,7 +3953,7 @@ if i32.const 0 i32.const 152 - i32.const 687 + i32.const 688 i32.const 63 call $~lib/env/abort unreachable @@ -4008,7 +4007,7 @@ if i32.const 0 i32.const 152 - i32.const 769 + i32.const 770 i32.const 63 call $~lib/env/abort unreachable @@ -4998,7 +4997,7 @@ if i32.const 0 i32.const 152 - i32.const 107 + i32.const 108 i32.const 44 call $~lib/env/abort unreachable @@ -5236,7 +5235,7 @@ if i32.const 0 i32.const 152 - i32.const 271 + i32.const 272 i32.const 63 call $~lib/env/abort unreachable @@ -5372,7 +5371,7 @@ if i32.const 0 i32.const 152 - i32.const 353 + i32.const 354 i32.const 63 call $~lib/env/abort unreachable @@ -5621,7 +5620,7 @@ if i32.const 0 i32.const 152 - i32.const 517 + i32.const 518 i32.const 63 call $~lib/env/abort unreachable @@ -5762,7 +5761,7 @@ if i32.const 0 i32.const 152 - i32.const 599 + i32.const 600 i32.const 63 call $~lib/env/abort unreachable @@ -5898,7 +5897,7 @@ if i32.const 0 i32.const 152 - i32.const 681 + i32.const 682 i32.const 63 call $~lib/env/abort unreachable @@ -6039,7 +6038,7 @@ if i32.const 0 i32.const 152 - i32.const 763 + i32.const 764 i32.const 63 call $~lib/env/abort unreachable @@ -12892,10 +12891,11 @@ i32.const 3 call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 + i32.const 5 i32.const 200 i32.const 15 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -12912,10 +12912,11 @@ i32.const 2147483647 call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 + i32.const 5 i32.const 256 i32.const 15 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -12932,10 +12933,11 @@ i32.const -3 call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 + i32.const 5 i32.const 272 i32.const 15 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -12952,10 +12954,11 @@ i32.const 2147483647 call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 + i32.const 5 i32.const 288 i32.const 15 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -12972,10 +12975,11 @@ i32.const 0 call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 + i32.const 5 i32.const 304 i32.const 15 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -13037,10 +13041,11 @@ unreachable end global.get $std/typedarray/sub8 + i32.const 3 i32.const 320 i32.const 15 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -13052,10 +13057,11 @@ unreachable end global.get $std/typedarray/arr8 + i32.const 5 i32.const 336 i32.const 15 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -13095,10 +13101,11 @@ i32.const 3 call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 + i32.const 5 i32.const 352 i32.const 16 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -13115,10 +13122,11 @@ i32.const 2147483647 call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 + i32.const 5 i32.const 384 i32.const 16 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -13135,10 +13143,11 @@ i32.const -3 call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 + i32.const 5 i32.const 416 i32.const 16 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -13155,10 +13164,11 @@ i32.const 2147483647 call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 + i32.const 5 i32.const 448 i32.const 16 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -13175,10 +13185,11 @@ i32.const 0 call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 + i32.const 5 i32.const 480 i32.const 16 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -13242,10 +13253,11 @@ unreachable end global.get $std/typedarray/sub32 + i32.const 3 i32.const 512 i32.const 16 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -13257,10 +13269,11 @@ unreachable end global.get $std/typedarray/arr32 + i32.const 5 i32.const 536 i32.const 16 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index aa6c188f6d..8eab4d0534 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -487,7 +487,7 @@ if i32.const 0 i32.const 64 - i32.const 217 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -502,7 +502,7 @@ if i32.const 0 i32.const 64 - i32.const 218 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable @@ -527,7 +527,7 @@ if i32.const 0 i32.const 104 - i32.const 24 + i32.const 25 i32.const 43 call $~lib/env/abort unreachable @@ -562,7 +562,7 @@ if i32.const 0 i32.const 64 - i32.const 251 + i32.const 348 i32.const 57 call $~lib/env/abort unreachable @@ -1455,7 +1455,7 @@ if i32.const 0 i32.const 152 - i32.const 441 + i32.const 442 i32.const 63 call $~lib/env/abort unreachable @@ -1479,7 +1479,7 @@ if i32.const 0 i32.const 152 - i32.const 435 + i32.const 436 i32.const 63 call $~lib/env/abort unreachable @@ -1616,7 +1616,7 @@ if i32.const 0 i32.const 152 - i32.const 851 + i32.const 852 i32.const 63 call $~lib/env/abort unreachable @@ -2291,7 +2291,7 @@ if i32.const 0 i32.const 152 - i32.const 845 + i32.const 846 i32.const 63 call $~lib/env/abort unreachable @@ -2312,7 +2312,7 @@ if i32.const 0 i32.const 152 - i32.const 195 + i32.const 196 i32.const 44 call $~lib/env/abort unreachable @@ -2344,7 +2344,7 @@ if i32.const 0 i32.const 152 - i32.const 189 + i32.const 190 i32.const 44 call $~lib/env/abort unreachable @@ -2363,7 +2363,7 @@ if i32.const 0 i32.const 152 - i32.const 31 + i32.const 32 i32.const 44 call $~lib/env/abort unreachable @@ -2463,13 +2463,7 @@ end local.get $7 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - i32.load offset=4 - ) - (func $~lib/util/memory/memcpy (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3670,7 +3664,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3901,48 +3895,52 @@ end end ) - (func $~lib/runtime/doWrapArray (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) + (func $~lib/runtime/doMakeArray (; 52 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 16 call $~lib/runtime/doAllocate - local.get $1 + local.get $2 call $~lib/runtime/doRegister - local.set $3 - local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.set $4 - local.get $4 - call $~lib/runtime/doAllocate - local.get $1 - call $~lib/runtime/doRegister + local.get $0 + local.get $3 + i32.shl local.set $5 + local.get $0 local.get $3 - local.get $5 + i32.shl + call $~lib/runtime/doAllocate + i32.const 2 + call $~lib/runtime/doRegister + local.set $6 + local.get $4 + local.get $6 i32.store - local.get $3 - local.get $5 + local.get $4 + local.get $6 i32.store offset=4 - local.get $3 local.get $4 + local.get $5 i32.store offset=8 - local.get $3 local.get $4 - local.get $2 - i32.shr_u - i32.store offset=12 - local.get $5 local.get $0 + i32.store offset=12 + local.get $1 + if + local.get $6 + local.get $1 + local.get $5 + call $~lib/memory/memory.copy + end local.get $4 - call $~lib/memory/memory.copy - local.get $3 ) - (func $~lib/array/Array#get:length (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/typedarray/Int8Array#__get (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3950,7 +3948,7 @@ if i32.const 0 i32.const 152 - i32.const 25 + i32.const 26 i32.const 44 call $~lib/env/abort unreachable @@ -3961,7 +3959,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__get (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3971,7 +3969,7 @@ if i32.const 0 i32.const 216 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -3984,7 +3982,7 @@ i32.add i32.load8_s ) - (func $std/typedarray/isInt8ArrayEqual (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4032,7 +4030,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4146,7 +4144,7 @@ i32.store offset=8 local.get $7 ) - (func $~lib/typedarray/Int32Array#fill (; 59 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#fill (; 58 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -4244,11 +4242,11 @@ end local.get $7 ) - (func $~lib/array/Array#get:length (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4258,7 +4256,7 @@ if i32.const 0 i32.const 216 - i32.const 69 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -4271,7 +4269,7 @@ i32.add i32.load ) - (func $std/typedarray/isInt32ArrayEqual (; 62 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4319,12 +4317,12 @@ end i32.const 1 ) - (func $std/typedarray/testReduce~anonymous|0 (; 63 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 62 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduce (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4381,7 +4379,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 65 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 64 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4422,7 +4420,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#__set (; 66 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 65 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4430,7 +4428,7 @@ if i32.const 0 i32.const 152 - i32.const 113 + i32.const 114 i32.const 44 call $~lib/env/abort unreachable @@ -4442,12 +4440,12 @@ local.get $2 i32.store8 ) - (func $std/typedarray/testReduce~anonymous|0 (; 67 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 66 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduce (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4504,7 +4502,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 69 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 68 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4543,12 +4541,12 @@ unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 70 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 69 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduce (; 71 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduce (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4605,7 +4603,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 72 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 71 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4644,7 +4642,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#__set (; 73 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 72 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4654,7 +4652,7 @@ if i32.const 0 i32.const 152 - i32.const 277 + i32.const 278 i32.const 63 call $~lib/env/abort unreachable @@ -4668,12 +4666,12 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce~anonymous|0 (; 74 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 73 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduce (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduce (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4730,7 +4728,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 76 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 75 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4771,7 +4769,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#__set (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4781,7 +4779,7 @@ if i32.const 0 i32.const 152 - i32.const 359 + i32.const 360 i32.const 63 call $~lib/env/abort unreachable @@ -4795,12 +4793,12 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce~anonymous|0 (; 78 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 77 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduce (; 79 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduce (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4857,7 +4855,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 80 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 79 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4896,12 +4894,12 @@ unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 81 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 80 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduce (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 81 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4958,7 +4956,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 83 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 82 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4995,7 +4993,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#__set (; 84 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint32Array#__set (; 83 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -5005,7 +5003,7 @@ if i32.const 0 i32.const 152 - i32.const 523 + i32.const 524 i32.const 63 call $~lib/env/abort unreachable @@ -5019,12 +5017,12 @@ local.get $2 i32.store ) - (func $std/typedarray/testReduce~anonymous|0 (; 85 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 84 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduce (; 86 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduce (; 85 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5081,7 +5079,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 87 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 86 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5118,7 +5116,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#__set (; 88 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 87 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -5128,7 +5126,7 @@ if i32.const 0 i32.const 152 - i32.const 605 + i32.const 606 i32.const 63 call $~lib/env/abort unreachable @@ -5142,12 +5140,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce~anonymous|0 (; 89 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce~anonymous|0 (; 88 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 90 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 89 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -5204,7 +5202,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 91 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 90 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5241,7 +5239,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#__set (; 92 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Uint64Array#__set (; 91 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -5251,7 +5249,7 @@ if i32.const 0 i32.const 152 - i32.const 687 + i32.const 688 i32.const 63 call $~lib/env/abort unreachable @@ -5265,12 +5263,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce~anonymous|0 (; 93 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce~anonymous|0 (; 92 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduce (; 94 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduce (; 93 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -5327,7 +5325,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 95 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 94 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5364,7 +5362,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#__set (; 96 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 95 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -5374,7 +5372,7 @@ if i32.const 0 i32.const 152 - i32.const 769 + i32.const 770 i32.const 63 call $~lib/env/abort unreachable @@ -5388,12 +5386,12 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce~anonymous|0 (; 97 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce~anonymous|0 (; 96 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 98 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduce (; 97 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -5450,7 +5448,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 99 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 98 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -5487,12 +5485,12 @@ unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 100 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce~anonymous|0 (; 99 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 101 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduce (; 100 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) @@ -5549,7 +5547,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 102 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 101 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -5586,12 +5584,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 102 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduceRight (; 104 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduceRight (; 103 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5645,7 +5643,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 105 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 104 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5686,12 +5684,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 105 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 107 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 106 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5745,7 +5743,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 108 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 107 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5784,12 +5782,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 109 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 110 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 109 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5843,7 +5841,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 111 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 110 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5882,12 +5880,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 112 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 111 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduceRight (; 113 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduceRight (; 112 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5941,7 +5939,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 114 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 113 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5982,12 +5980,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 115 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 114 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 116 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 115 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6041,7 +6039,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 117 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 116 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6080,12 +6078,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 118 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 117 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduceRight (; 119 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 118 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6139,7 +6137,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 120 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 119 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6176,12 +6174,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 121 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 120 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduceRight (; 122 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduceRight (; 121 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6235,7 +6233,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 123 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 122 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6272,12 +6270,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 124 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight~anonymous|0 (; 123 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduceRight (; 125 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 124 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -6331,7 +6329,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 126 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 125 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6368,12 +6366,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 127 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight~anonymous|0 (; 126 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduceRight (; 128 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduceRight (; 127 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -6427,7 +6425,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 129 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 128 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6464,12 +6462,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 130 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 129 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduceRight (; 131 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduceRight (; 130 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -6523,7 +6521,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 132 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 131 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -6560,12 +6558,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 133 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduceRight~anonymous|0 (; 132 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduceRight (; 134 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduceRight (; 133 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) @@ -6619,7 +6617,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 135 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 134 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -6656,12 +6654,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 136 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 135 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6726,7 +6724,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 138 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 137 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6792,12 +6790,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 139 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 138 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8Array#map (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6862,7 +6860,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint8Array#__get (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__get (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -6870,7 +6868,7 @@ if i32.const 0 i32.const 152 - i32.const 107 + i32.const 108 i32.const 44 call $~lib/env/abort unreachable @@ -6881,7 +6879,7 @@ i32.add i32.load8_u ) - (func $std/typedarray/testArrayMap (; 142 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 141 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6947,12 +6945,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 143 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 142 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7017,7 +7015,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 145 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 144 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7083,12 +7081,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 146 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 145 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int16Array#map (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7153,7 +7151,7 @@ end local.get $6 ) - (func $~lib/typedarray/Int16Array#__get (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7163,7 +7161,7 @@ if i32.const 0 i32.const 152 - i32.const 271 + i32.const 272 i32.const 63 call $~lib/env/abort unreachable @@ -7176,7 +7174,7 @@ i32.add i32.load16_s ) - (func $std/typedarray/testArrayMap (; 149 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 148 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7242,12 +7240,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 150 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 149 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint16Array#map (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7312,7 +7310,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint16Array#__get (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7322,7 +7320,7 @@ if i32.const 0 i32.const 152 - i32.const 353 + i32.const 354 i32.const 63 call $~lib/env/abort unreachable @@ -7335,7 +7333,7 @@ i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap (; 153 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 152 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7401,12 +7399,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 154 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 153 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int32Array#map (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7471,7 +7469,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 156 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 155 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7537,12 +7535,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 157 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 156 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint32Array#map (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7607,7 +7605,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint32Array#__get (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7617,7 +7615,7 @@ if i32.const 0 i32.const 152 - i32.const 517 + i32.const 518 i32.const 63 call $~lib/env/abort unreachable @@ -7630,7 +7628,7 @@ i32.add i32.load ) - (func $std/typedarray/testArrayMap (; 160 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 159 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7696,12 +7694,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 161 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 160 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7766,7 +7764,7 @@ end local.get $6 ) - (func $~lib/typedarray/Int64Array#__get (; 163 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 162 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -7776,7 +7774,7 @@ if i32.const 0 i32.const 152 - i32.const 599 + i32.const 600 i32.const 63 call $~lib/env/abort unreachable @@ -7789,7 +7787,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap (; 164 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 163 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7855,12 +7853,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 165 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 164 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Uint64Array#map (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7925,7 +7923,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint64Array#__get (; 167 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__get (; 166 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -7935,7 +7933,7 @@ if i32.const 0 i32.const 152 - i32.const 681 + i32.const 682 i32.const 63 call $~lib/env/abort unreachable @@ -7948,7 +7946,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap (; 168 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 167 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8014,12 +8012,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 169 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 168 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8084,7 +8082,7 @@ end local.get $6 ) - (func $~lib/typedarray/Float32Array#__get (; 171 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 170 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -8094,7 +8092,7 @@ if i32.const 0 i32.const 152 - i32.const 763 + i32.const 764 i32.const 63 call $~lib/env/abort unreachable @@ -8107,7 +8105,7 @@ i32.add f32.load ) - (func $std/typedarray/testArrayMap (; 172 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 171 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8173,12 +8171,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 173 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 172 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8243,7 +8241,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 175 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 174 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8309,7 +8307,7 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 176 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 175 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -8318,7 +8316,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8378,7 +8376,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 178 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 177 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -8387,7 +8385,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 179 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 178 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8441,14 +8439,14 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 180 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 179 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#some (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8508,14 +8506,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 182 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 181 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 183 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 182 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8569,14 +8567,14 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 184 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 183 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#some (; 185 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#some (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8636,14 +8634,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 186 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 185 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 187 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 186 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8697,7 +8695,7 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 188 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 187 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8706,7 +8704,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 189 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8766,7 +8764,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 190 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 189 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8775,7 +8773,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 191 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 190 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8829,14 +8827,14 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 192 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 191 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#some (; 193 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8896,14 +8894,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 194 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 195 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 194 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8957,12 +8955,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 196 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 195 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9022,12 +9020,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 198 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 197 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 199 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 198 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9081,12 +9079,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 200 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 199 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#some (; 201 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#some (; 200 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9146,12 +9144,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 202 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 201 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 203 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 202 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9205,12 +9203,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 204 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 203 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 205 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 204 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9270,12 +9268,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 206 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 205 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome (; 207 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 206 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9329,12 +9327,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 208 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 207 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#some (; 209 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#some (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9394,12 +9392,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 210 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 209 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome (; 211 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 210 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9453,12 +9451,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 212 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 211 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 213 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9518,12 +9516,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 214 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 213 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome (; 215 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 214 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9577,12 +9575,12 @@ unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 216 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 215 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 217 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 216 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9642,12 +9640,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 218 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 217 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome (; 219 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 218 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9701,7 +9699,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 220 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 219 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9710,7 +9708,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#findIndex (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 220 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9770,7 +9768,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 222 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 221 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9779,7 +9777,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 223 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 222 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9832,14 +9830,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 224 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 223 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#findIndex (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 224 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9899,14 +9897,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 226 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 227 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 226 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9959,14 +9957,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 228 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 227 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 229 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 228 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10026,14 +10024,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 230 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 229 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 231 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 230 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10086,7 +10084,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 232 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 231 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10095,7 +10093,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#findIndex (; 233 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 232 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10155,7 +10153,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 234 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 233 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10164,7 +10162,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 235 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 234 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10217,14 +10215,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 236 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 235 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#findIndex (; 237 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10284,14 +10282,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 238 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 237 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 239 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 238 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10344,12 +10342,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 240 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 239 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#findIndex (; 241 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 240 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10409,12 +10407,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 242 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 241 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 243 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 242 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10467,12 +10465,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 244 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 243 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#findIndex (; 245 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#findIndex (; 244 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10532,12 +10530,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 246 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 245 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 247 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 246 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10590,12 +10588,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 248 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 247 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#findIndex (; 249 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 248 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10655,12 +10653,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 250 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 249 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex (; 251 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 250 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10713,12 +10711,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 252 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 251 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#findIndex (; 253 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#findIndex (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10778,12 +10776,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 254 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 253 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex (; 255 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 254 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10836,12 +10834,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 256 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 255 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#findIndex (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10901,12 +10899,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 258 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 257 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex (; 259 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 258 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10959,12 +10957,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 260 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 259 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#findIndex (; 261 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 260 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11024,12 +11022,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 262 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 261 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex (; 263 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 262 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11082,7 +11080,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 264 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 263 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11093,7 +11091,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int8Array#every (; 265 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 264 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11160,7 +11158,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 266 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 265 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11169,7 +11167,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 267 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 266 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11223,7 +11221,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 268 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 267 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -11232,7 +11230,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8Array#every (; 269 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 268 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11299,14 +11297,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 270 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 269 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 271 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 270 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11360,7 +11358,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 272 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 271 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -11369,7 +11367,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#every (; 273 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#every (; 272 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11436,14 +11434,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 274 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 273 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 275 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 274 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11497,7 +11495,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 276 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 275 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11508,7 +11506,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int16Array#every (; 277 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 276 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11575,7 +11573,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 278 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 277 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11584,7 +11582,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 279 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 278 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11638,7 +11636,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 280 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 279 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and @@ -11647,7 +11645,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint16Array#every (; 281 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 280 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11714,14 +11712,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 282 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 281 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 283 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 282 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11775,14 +11773,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 284 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 283 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.const 0 i32.eq ) - (func $~lib/typedarray/Int32Array#every (; 285 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 284 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11849,12 +11847,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 286 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 285 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 287 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 286 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11908,14 +11906,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 288 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 287 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_u i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint32Array#every (; 289 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#every (; 288 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11982,12 +11980,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 290 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 289 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 291 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 290 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12041,14 +12039,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 292 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 291 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (; 293 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 292 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12115,12 +12113,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 294 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 293 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery (; 295 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 294 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12174,14 +12172,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 296 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 295 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $~lib/typedarray/Uint64Array#every (; 297 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#every (; 296 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12248,12 +12246,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 298 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 297 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery (; 299 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 298 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12307,12 +12305,12 @@ unreachable end ) - (func $~lib/builtins/isNaN (; 300 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 299 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $~lib/math/NativeMathf.mod (; 301 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 300 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12563,14 +12561,14 @@ local.get $2 f32.reinterpret_i32 ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 302 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 301 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 303 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 302 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12637,12 +12635,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 304 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 303 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $std/typedarray/testArrayEvery (; 305 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 304 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12696,12 +12694,12 @@ unreachable end ) - (func $~lib/builtins/isNaN (; 306 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 305 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/math/NativeMath.mod (; 307 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 306 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -12954,14 +12952,14 @@ local.get $2 f64.reinterpret_i64 ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 308 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 307 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 309 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 308 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13028,12 +13026,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 310 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 309 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $std/typedarray/testArrayEvery (; 311 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 310 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13087,7 +13085,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 312 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 311 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13142,7 +13140,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 313 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#forEach (; 312 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13187,7 +13185,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 314 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 313 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13243,7 +13241,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 315 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 314 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13294,7 +13292,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8Array#forEach (; 316 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 315 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13339,7 +13337,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 317 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 316 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13389,7 +13387,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 318 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 317 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13440,7 +13438,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8ClampedArray#forEach (; 319 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#forEach (; 318 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13485,7 +13483,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 320 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 319 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13535,7 +13533,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 321 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 320 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13590,7 +13588,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 322 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#forEach (; 321 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13635,7 +13633,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 323 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 322 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13691,7 +13689,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 324 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 323 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13742,7 +13740,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint16Array#forEach (; 325 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 324 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13787,7 +13785,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 326 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 325 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13837,7 +13835,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 327 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 326 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13884,7 +13882,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 328 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 327 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13929,7 +13927,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 329 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 328 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13973,7 +13971,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 330 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 329 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14020,7 +14018,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint32Array#forEach (; 331 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint32Array#forEach (; 330 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14065,7 +14063,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 332 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 331 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14109,7 +14107,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 333 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 332 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14157,7 +14155,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 334 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 333 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14202,7 +14200,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 335 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 334 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14249,7 +14247,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 336 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 335 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14297,7 +14295,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint64Array#forEach (; 337 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint64Array#forEach (; 336 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14342,7 +14340,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 338 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 337 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14389,7 +14387,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 339 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 338 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14437,7 +14435,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 340 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#forEach (; 339 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14482,7 +14480,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 341 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 340 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14529,7 +14527,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 342 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 341 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14577,7 +14575,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 343 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#forEach (; 342 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14622,7 +14620,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 344 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 343 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14669,7 +14667,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#reverse (; 345 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 344 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14739,7 +14737,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse (; 346 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 345 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14903,7 +14901,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 347 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 346 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14973,7 +14971,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8Array#subarray (; 348 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 347 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15087,7 +15085,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 349 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 348 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15245,7 +15243,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#reverse (; 350 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reverse (; 349 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15315,7 +15313,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 351 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 350 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15429,7 +15427,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 352 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 351 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15587,7 +15585,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 353 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 352 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15657,7 +15655,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int16Array#subarray (; 354 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 353 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15771,7 +15769,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 355 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 354 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15935,7 +15933,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 356 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 355 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16005,7 +16003,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint16Array#subarray (; 357 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 356 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16119,7 +16117,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 358 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 357 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16277,7 +16275,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 359 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 358 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16347,7 +16345,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse (; 360 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 359 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16499,7 +16497,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#reverse (; 361 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reverse (; 360 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16569,7 +16567,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint32Array#subarray (; 362 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 361 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16683,7 +16681,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 363 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 362 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16835,7 +16833,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#reverse (; 364 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 363 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16905,7 +16903,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int64Array#subarray (; 365 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 364 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17019,7 +17017,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 366 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 365 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17174,7 +17172,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#reverse (; 367 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#reverse (; 366 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17244,7 +17242,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint64Array#subarray (; 368 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 367 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17358,7 +17356,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 369 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 368 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17513,7 +17511,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 370 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 369 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17583,7 +17581,7 @@ end local.get $1 ) - (func $~lib/typedarray/Float32Array#subarray (; 371 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 370 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17697,7 +17695,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 372 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 371 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17852,7 +17850,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 373 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 372 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17922,7 +17920,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse (; 374 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 373 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18077,8 +18075,9 @@ unreachable end ) - (func $start:std/typedarray (; 375 ;) (type $FUNCSIG$v) + (func $start:std/typedarray (; 374 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32.const 1 i32.eq @@ -18611,13 +18610,16 @@ call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) - i32.const 200 + block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) + i32.const 5 local.set $0 + i32.const 200 + local.set $1 local.get $0 + local.get $1 i32.const 15 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -18636,13 +18638,16 @@ call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) + i32.const 5 + local.set $1 i32.const 256 local.set $0 + local.get $1 local.get $0 i32.const 15 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -18661,13 +18666,16 @@ call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) - i32.const 272 + block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) + i32.const 5 local.set $0 + i32.const 272 + local.set $1 local.get $0 + local.get $1 i32.const 15 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -18686,13 +18694,16 @@ call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.3 (result i32) + i32.const 5 + local.set $1 i32.const 288 local.set $0 + local.get $1 local.get $0 i32.const 15 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -18711,13 +18722,16 @@ call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) - i32.const 304 + block $~lib/runtime/MAKEARRAY|inlined.4 (result i32) + i32.const 5 local.set $0 + i32.const 304 + local.set $1 local.get $0 + local.get $1 i32.const 15 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -18780,13 +18794,16 @@ unreachable end global.get $std/typedarray/sub8 - block $~lib/runtime/WRAPARRAY|inlined.5 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.5 (result i32) + i32.const 3 + local.set $1 i32.const 320 local.set $0 + local.get $1 local.get $0 i32.const 15 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -18799,13 +18816,16 @@ unreachable end global.get $std/typedarray/arr8 - block $~lib/runtime/WRAPARRAY|inlined.6 (result i32) - i32.const 336 + block $~lib/runtime/MAKEARRAY|inlined.6 (result i32) + i32.const 5 local.set $0 + i32.const 336 + local.set $1 local.get $0 + local.get $1 i32.const 15 i32.const 0 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -18848,13 +18868,16 @@ call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) + i32.const 5 + local.set $1 i32.const 352 local.set $0 + local.get $1 local.get $0 i32.const 16 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -18873,13 +18896,16 @@ call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) - i32.const 384 + block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) + i32.const 5 local.set $0 + i32.const 384 + local.set $1 local.get $0 + local.get $1 i32.const 16 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -18898,13 +18924,16 @@ call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) + i32.const 5 + local.set $1 i32.const 416 local.set $0 + local.get $1 local.get $0 i32.const 16 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -18923,13 +18952,16 @@ call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) - i32.const 448 + block $~lib/runtime/MAKEARRAY|inlined.3 (result i32) + i32.const 5 local.set $0 + i32.const 448 + local.set $1 local.get $0 + local.get $1 i32.const 16 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -18948,13 +18980,16 @@ call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.4 (result i32) + i32.const 5 + local.set $1 i32.const 480 local.set $0 + local.get $1 local.get $0 i32.const 16 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -19021,13 +19056,16 @@ unreachable end global.get $std/typedarray/sub32 - block $~lib/runtime/WRAPARRAY|inlined.5 (result i32) - i32.const 512 + block $~lib/runtime/MAKEARRAY|inlined.5 (result i32) + i32.const 3 local.set $0 + i32.const 512 + local.set $1 local.get $0 + local.get $1 i32.const 16 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -19040,13 +19078,16 @@ unreachable end global.get $std/typedarray/arr32 - block $~lib/runtime/WRAPARRAY|inlined.6 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.6 (result i32) + i32.const 5 + local.set $1 i32.const 536 local.set $0 + local.get $1 local.get $0 i32.const 16 i32.const 2 - call $~lib/runtime/doWrapArray + call $~lib/runtime/doMakeArray end call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -19353,9 +19394,9 @@ call $std/typedarray/testArrayReverse call $std/typedarray/testArrayReverse ) - (func $start (; 376 ;) (type $FUNCSIG$v) + (func $start (; 375 ;) (type $FUNCSIG$v) call $start:std/typedarray ) - (func $null (; 377 ;) (type $FUNCSIG$v) + (func $null (; 376 ;) (type $FUNCSIG$v) ) ) From 3146f8f9e019a43d2369193c21f7ddbbdadcb72f Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 26 Mar 2019 23:35:08 +0100 Subject: [PATCH 066/119] use gc interface directly, document --- src/builtins.ts | 271 -- src/codegen/array.ts | 281 ++ src/codegen/gc.ts | 156 + src/common.ts | 2 + src/compiler.ts | 382 +-- src/flow.ts | 27 +- src/program.ts | 97 +- src/resolver.ts | 32 +- src/types.ts | 6 +- std/assembly/array.ts | 217 +- std/assembly/collector/README.md | 107 + std/assembly/collector/dummy.ts | 36 +- std/assembly/collector/index.d.ts | 11 + std/assembly/collector/itcm.ts | 40 +- std/assembly/collector/pure.ts | 18 +- std/assembly/fixedarray.ts | 21 +- std/assembly/gc.ts | 39 +- std/assembly/map.ts | 90 +- std/assembly/runtime.ts | 190 +- std/assembly/set.ts | 37 +- std/assembly/string.ts | 27 +- tests/binaryen/break-value.js | 24 + tests/compiler/call-super.optimized.wat | 89 +- tests/compiler/call-super.untouched.wat | 101 +- tests/compiler/comma.optimized.wat | 5 +- tests/compiler/comma.untouched.wat | 6 +- tests/compiler/constructor.optimized.wat | 71 +- tests/compiler/constructor.untouched.wat | 91 +- tests/compiler/exports.optimized.wat | 84 +- tests/compiler/exports.untouched.wat | 72 +- tests/compiler/for.optimized.wat | 3 +- tests/compiler/for.untouched.wat | 23 +- tests/compiler/getter-call.optimized.wat | 43 +- tests/compiler/getter-call.untouched.wat | 41 +- tests/compiler/inlining.optimized.wat | 37 +- tests/compiler/inlining.untouched.wat | 41 +- .../new-without-allocator.untouched.wat | 35 +- tests/compiler/nonNullAssertion.optimized.wat | 6 +- tests/compiler/nonNullAssertion.untouched.wat | 61 +- tests/compiler/number.optimized.wat | 111 +- tests/compiler/number.untouched.wat | 161 +- tests/compiler/object-literal.optimized.wat | 48 +- tests/compiler/object-literal.untouched.wat | 56 +- .../optional-typeparameters.optimized.wat | 35 +- .../optional-typeparameters.untouched.wat | 47 +- tests/compiler/std/array-access.optimized.wat | 8 +- tests/compiler/std/array-access.untouched.wat | 93 +- .../compiler/std/array-literal.optimized.wat | 293 +- tests/compiler/std/array-literal.ts | 1 + .../compiler/std/array-literal.untouched.wat | 345 +- tests/compiler/std/array.optimized.wat | 1245 ++++--- tests/compiler/std/array.ts | 4 +- tests/compiler/std/array.untouched.wat | 2251 ++++++++----- tests/compiler/std/arraybuffer.optimized.wat | 79 +- tests/compiler/std/arraybuffer.untouched.wat | 99 +- tests/compiler/std/dataview.optimized.wat | 94 +- tests/compiler/std/dataview.untouched.wat | 119 +- tests/compiler/std/date.optimized.wat | 75 +- tests/compiler/std/date.untouched.wat | 41 +- tests/compiler/std/hash.untouched.wat | 1 - tests/compiler/std/map.optimized.wat | 1511 +++++---- tests/compiler/std/map.ts | 23 +- tests/compiler/std/map.untouched.wat | 1897 ++++++++--- tests/compiler/std/math.optimized.wat | 1687 +++++----- tests/compiler/std/math.untouched.wat | 228 +- tests/compiler/std/new.optimized.wat | 25 +- tests/compiler/std/new.untouched.wat | 37 +- .../std/operator-overloading.optimized.wat | 53 +- .../std/operator-overloading.untouched.wat | 105 +- tests/compiler/std/pointer.optimized.wat | 6 +- tests/compiler/std/pointer.untouched.wat | 3 +- tests/compiler/std/runtime.optimized.wat | 146 +- tests/compiler/std/runtime.ts | 9 +- tests/compiler/std/runtime.untouched.wat | 120 +- tests/compiler/std/set.optimized.wat | 1227 ++++--- tests/compiler/std/set.ts | 23 +- tests/compiler/std/set.untouched.wat | 1723 +++++++--- tests/compiler/std/static-array.optimized.wat | 14 +- tests/compiler/std/static-array.untouched.wat | 159 +- tests/compiler/std/string-utf8.optimized.wat | 37 +- tests/compiler/std/string-utf8.untouched.wat | 48 +- tests/compiler/std/string.optimized.wat | 2983 +++++++++-------- tests/compiler/std/string.ts | 2 + tests/compiler/std/string.untouched.wat | 2407 +++++++------ tests/compiler/std/symbol.optimized.wat | 104 +- tests/compiler/std/symbol.ts | 4 +- tests/compiler/std/symbol.untouched.wat | 119 +- tests/compiler/std/typedarray.optimized.wat | 2498 +++++++------- tests/compiler/std/typedarray.ts | 5 +- tests/compiler/std/typedarray.untouched.wat | 2903 +++++++++------- tests/compiler/unary.optimized.wat | 24 + tests/compiler/unary.untouched.wat | 24 +- tests/compiler/while.optimized.wat | 3 +- tests/compiler/while.untouched.wat | 3 +- tslint.json | 6 - 95 files changed, 16074 insertions(+), 12218 deletions(-) create mode 100644 src/codegen/array.ts create mode 100644 src/codegen/gc.ts create mode 100644 std/assembly/collector/README.md create mode 100644 std/assembly/collector/index.d.ts create mode 100644 tests/binaryen/break-value.js diff --git a/src/builtins.ts b/src/builtins.ts index d07292c82d..55163dbf7f 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -4079,277 +4079,6 @@ export function compileIterateRoots(compiler: Compiler): void { ); } -export function compileBuiltinArrayGet( - compiler: Compiler, - target: Class, - thisExpression: Expression, - elementExpression: Expression, - contextualType: Type -): ExpressionRef { - var type = assert(compiler.program.determineBuiltinArrayType(target)); - var module = compiler.module; - var outType = ( - type.is(TypeFlags.INTEGER) && - contextualType.is(TypeFlags.INTEGER) && - contextualType.size > type.size - ) ? contextualType : type; - - var dataStart = assert(target.lookupInSelf("dataStart")); - assert(dataStart.kind == ElementKind.FIELD); - var dataLength = assert(target.lookupInSelf("dataLength")); - assert(dataLength.kind == ElementKind.FIELD); - - // compile the index expression and shift it to become the actual byteOffset - var dynamicOffset = compiler.compileExpression( - elementExpression, - Type.i32, - ConversionKind.IMPLICIT, - WrapMode.NONE - ); - var alignLog2 = type.alignLog2; - if (alignLog2) { - dynamicOffset = module.createBinary(BinaryOp.ShlI32, - dynamicOffset, - module.createI32(alignLog2) - ); - } - - var usizeType = compiler.options.usizeType; - var nativeSizeType = compiler.options.nativeSizeType; - var ptrExpr: ExpressionRef; - var constantOffset: i32 = 0; - - // precompute byteOffset into a constant and a dynamic part - dynamicOffset = module.precomputeExpression(dynamicOffset); - if (getExpressionId(dynamicOffset) == ExpressionId.Const) { - constantOffset = getConstValueI32(dynamicOffset); - dynamicOffset = 0; - } else if (getExpressionId(dynamicOffset) == ExpressionId.Binary) { - if (getBinaryOp(dynamicOffset) == BinaryOp.AddI32) { - let left = getBinaryLeft(dynamicOffset); - let right = getBinaryRight(dynamicOffset); - if (getExpressionId(left) == ExpressionId.Const) { - constantOffset = getConstValueI32(left); - dynamicOffset = right; - } else if (getExpressionId(right) == ExpressionId.Const) { - constantOffset = getConstValueI32(right); - dynamicOffset = left; - } - } - } - // ptr = this.dataStart - ptrExpr = module.createLoad(usizeType.byteSize, true, - compiler.compileExpression( - thisExpression, - target.type, - ConversionKind.IMPLICIT, - WrapMode.NONE - ), - nativeSizeType, (dataStart).memoryOffset - ); - // ptr = ptr + dynamicOffset - if (dynamicOffset) { - if (nativeSizeType == NativeType.I64) { - ptrExpr = module.createBinary(BinaryOp.AddI64, - ptrExpr, - module.createUnary(UnaryOp.ExtendU32, dynamicOffset) - ); - } else { - ptrExpr = module.createBinary(BinaryOp.AddI32, - ptrExpr, - dynamicOffset - ); - } - } - - compiler.currentType = outType; - return module.createLoad( - type.byteSize, - type.is(TypeFlags.SIGNED), - ptrExpr, - outType.toNativeType(), - constantOffset - ); -} - -export function compileBuiltinArraySet( - compiler: Compiler, - target: Class, - thisExpression: Expression, - elementExpression: Expression, - valueExpression: Expression, - contextualType: Type -): ExpressionRef { - var type = assert(compiler.program.determineBuiltinArrayType(target)); - return compileBuiltinArraySetWithValue( - compiler, - target, - thisExpression, - elementExpression, - compiler.compileExpression( - valueExpression, - type.is(TypeFlags.INTEGER | TypeFlags.VALUE) - ? type.is(TypeFlags.LONG) - ? type.is(TypeFlags.SIGNED) - ? Type.i64 - : Type.u64 - : type.is(TypeFlags.SIGNED) - ? Type.i32 - : Type.u32 - : type, - ConversionKind.IMPLICIT, - WrapMode.NONE - ), - contextualType != Type.void - ); -} - -export function compileBuiltinArraySetWithValue( - compiler: Compiler, - target: Class, - thisExpression: Expression, - elementExpression: Expression, - valueExpr: ExpressionRef, - tee: bool -): ExpressionRef { - var type = assert(compiler.program.determineBuiltinArrayType(target)); - var module = compiler.module; - - var dataStart = assert(target.lookupInSelf("dataStart")); - assert(dataStart.kind == ElementKind.FIELD); - var dataLength = assert(target.lookupInSelf("dataLength")); - assert(dataLength.kind == ElementKind.FIELD); - - var constantOffset: i32 = 0; - var dynamicOffset = module.precomputeExpression( - compiler.compileExpression( - elementExpression, - Type.i32, - ConversionKind.IMPLICIT, - WrapMode.NONE - ) - ); - if (getExpressionId(dynamicOffset) == ExpressionId.Const) { - constantOffset = getConstValueI32(dynamicOffset); - dynamicOffset = 0; - } else if (getExpressionId(dynamicOffset) == ExpressionId.Binary) { - if (getBinaryOp(dynamicOffset) == BinaryOp.AddI32) { - let left = getBinaryLeft(dynamicOffset); - let right = getBinaryRight(dynamicOffset); - if (getExpressionId(left) == ExpressionId.Const) { - constantOffset = getConstValueI32(left); - dynamicOffset = right; - } else if (getExpressionId(right) == ExpressionId.Const) { - constantOffset = getConstValueI32(right); - dynamicOffset = left; - } - } - } - - var program = compiler.program; - var isManaged = type.isManaged(program) && target.type.isManaged(program); - var usizeType = compiler.options.usizeType; - var nativeSizeType = compiler.options.nativeSizeType; - var thisExpr = compiler.compileExpression( - thisExpression, - target.type, - ConversionKind.IMPLICIT, - WrapMode.NONE - ); - var tempThis: Local | null = null; - if (isManaged) { - tempThis = compiler.currentFlow.getTempLocal(target.type, false); - thisExpr = module.createTeeLocal(tempThis.index, thisExpr); - } - var dataStartExpr = module.createLoad(usizeType.byteSize, true, - thisExpr, nativeSizeType, (dataStart).memoryOffset - ); - - var typeAlignLog2 = type.alignLog2; - constantOffset <<= typeAlignLog2; - if (dynamicOffset) { - if (typeAlignLog2) { - dynamicOffset = module.createBinary(BinaryOp.ShlI32, - dynamicOffset, - module.createI32(typeAlignLog2) - ); - } - if (nativeSizeType == NativeType.I64) { - dataStartExpr = module.createBinary(BinaryOp.AddI64, - dataStartExpr, - module.createUnary(UnaryOp.ExtendU32, dynamicOffset) - ); - } else { - dataStartExpr = module.createBinary(BinaryOp.AddI32, - dataStartExpr, - dynamicOffset - ); - } - } - - // handle Array: value = RETAIN(value, this) - if (isManaged) { - let program = compiler.program; - let retainInstance = compiler.resolver.resolveFunction(assert(program.retainPrototype), [ type, target.type ]); - if (!retainInstance) return module.createUnreachable(); - valueExpr = compiler.makeCallInlinePrechecked(retainInstance, [ - valueExpr, - module.createGetLocal(assert(tempThis).index, nativeSizeType) - ], 0, true); - - // handle Uint8ClampedArray: value = ~(value >> 31) & (((255 - value) >> 31) | value) - } else if (target.internalName == BuiltinSymbols.Uint8ClampedArray) { - let tempLocal = compiler.currentFlow.getAndFreeTempLocal(Type.i32, true); - valueExpr = module.createBinary(BinaryOp.AndI32, - module.createBinary(BinaryOp.XorI32, - module.createBinary(BinaryOp.ShrI32, - module.createTeeLocal(tempLocal.index, valueExpr), - module.createI32(31) - ), - module.createI32(-1) - ), - module.createBinary(BinaryOp.OrI32, - module.createBinary(BinaryOp.ShrI32, - module.createBinary(BinaryOp.SubI32, - module.createI32(255), - module.createGetLocal(tempLocal.index, NativeType.I32) - ), - module.createI32(31) - ), - module.createGetLocal(tempLocal.index, NativeType.I32) - ) - ); - } - assert(!tempThis); - - var nativeType = type.toNativeType(); - - if (!tee) { - compiler.currentType = Type.void; - return module.createStore( - type.byteSize, - dataStartExpr, - valueExpr, - nativeType, - constantOffset - ); - } else { - let flow = compiler.currentFlow; - let tempLocal = flow.getAndFreeTempLocal(type, false); - compiler.currentType = type; - return module.createBlock(null, [ - module.createStore( - type.byteSize, - dataStartExpr, - module.createTeeLocal(tempLocal.index, valueExpr), - nativeType, - constantOffset - ), - module.createGetLocal(tempLocal.index, nativeType) - ], nativeType); - } -} - /** Ensures that the specified class's GC hook exists and returns its function table index. */ export function ensureGCHook( compiler: Compiler, diff --git a/src/codegen/array.ts b/src/codegen/array.ts new file mode 100644 index 0000000000..42d9e4e98e --- /dev/null +++ b/src/codegen/array.ts @@ -0,0 +1,281 @@ +// TBD: managed reference handling makes this cumbersome, and there is a binaryen pass that can +// help propagating constant offsets. ideally, using operator overloads would be enough because +// it's the most flexible way to do this. + +// import { Compiler, ConversionKind, WrapMode } from "../compiler"; +// import { Class, ElementKind, Field, Local } from "../program"; +// import { Expression } from "../ast"; +// import { Type, TypeFlags } from "../types"; +// import { ExpressionRef, getExpressionId, getBinaryOp, getBinaryLeft, getBinaryRight, getConstValueI32, ExpressionId, BinaryOp, NativeType, UnaryOp } from "../module"; +// import { BuiltinSymbols } from "../builtins"; + +// export function makeArrayGet( +// compiler: Compiler, +// target: Class, +// thisExpression: Expression, +// elementExpression: Expression, +// contextualType: Type +// ): ExpressionRef { +// var type = assert(compiler.program.determineBuiltinArrayType(target)); +// var module = compiler.module; +// var outType = ( +// type.is(TypeFlags.INTEGER) && +// contextualType.is(TypeFlags.INTEGER) && +// contextualType.size > type.size +// ) ? contextualType : type; + +// var dataStart = assert(target.lookupInSelf("dataStart")); +// assert(dataStart.kind == ElementKind.FIELD); +// var dataLength = assert(target.lookupInSelf("dataLength")); +// assert(dataLength.kind == ElementKind.FIELD); + +// // compile the index expression and shift it to become the actual byteOffset +// var dynamicOffset = compiler.compileExpression( +// elementExpression, +// Type.i32, +// ConversionKind.IMPLICIT, +// WrapMode.NONE +// ); +// var alignLog2 = type.alignLog2; +// if (alignLog2) { +// dynamicOffset = module.createBinary(BinaryOp.ShlI32, +// dynamicOffset, +// module.createI32(alignLog2) +// ); +// } + +// var usizeType = compiler.options.usizeType; +// var nativeSizeType = compiler.options.nativeSizeType; +// var ptrExpr: ExpressionRef; +// var constantOffset: i32 = 0; + +// // precompute byteOffset into a constant and a dynamic part +// dynamicOffset = module.precomputeExpression(dynamicOffset); +// if (getExpressionId(dynamicOffset) == ExpressionId.Const) { +// constantOffset = getConstValueI32(dynamicOffset); +// dynamicOffset = 0; +// } else if (getExpressionId(dynamicOffset) == ExpressionId.Binary) { +// if (getBinaryOp(dynamicOffset) == BinaryOp.AddI32) { +// let left = getBinaryLeft(dynamicOffset); +// let right = getBinaryRight(dynamicOffset); +// if (getExpressionId(left) == ExpressionId.Const) { +// constantOffset = getConstValueI32(left); +// dynamicOffset = right; +// } else if (getExpressionId(right) == ExpressionId.Const) { +// constantOffset = getConstValueI32(right); +// dynamicOffset = left; +// } +// } +// } +// // ptr = this.dataStart +// ptrExpr = module.createLoad(usizeType.byteSize, true, +// compiler.compileExpression( +// thisExpression, +// target.type, +// ConversionKind.IMPLICIT, +// WrapMode.NONE +// ), +// nativeSizeType, (dataStart).memoryOffset +// ); +// // ptr = ptr + dynamicOffset +// if (dynamicOffset) { +// if (nativeSizeType == NativeType.I64) { +// ptrExpr = module.createBinary(BinaryOp.AddI64, +// ptrExpr, +// module.createUnary(UnaryOp.ExtendU32, dynamicOffset) +// ); +// } else { +// ptrExpr = module.createBinary(BinaryOp.AddI32, +// ptrExpr, +// dynamicOffset +// ); +// } +// } + +// compiler.currentType = outType; +// return module.createLoad( +// type.byteSize, +// type.is(TypeFlags.SIGNED), +// ptrExpr, +// outType.toNativeType(), +// constantOffset +// ); +// } + +// export function makeArraySet( +// compiler: Compiler, +// target: Class, +// thisExpression: Expression, +// elementExpression: Expression, +// valueExpression: Expression, +// contextualType: Type +// ): ExpressionRef { +// var type = assert(compiler.program.determineBuiltinArrayType(target)); +// return makeArraySetWithValue( +// compiler, +// target, +// thisExpression, +// elementExpression, +// compiler.compileExpression( +// valueExpression, +// type.is(TypeFlags.INTEGER | TypeFlags.VALUE) +// ? type.is(TypeFlags.LONG) +// ? type.is(TypeFlags.SIGNED) +// ? Type.i64 +// : Type.u64 +// : type.is(TypeFlags.SIGNED) +// ? Type.i32 +// : Type.u32 +// : type, +// ConversionKind.IMPLICIT, +// WrapMode.NONE +// ), +// contextualType != Type.void +// ); +// } + +// export function makeArraySetWithValue( +// compiler: Compiler, +// target: Class, +// thisExpression: Expression, +// elementExpression: Expression, +// valueExpr: ExpressionRef, +// tee: bool +// ): ExpressionRef { +// var type = assert(compiler.program.determineBuiltinArrayType(target)); +// var module = compiler.module; + +// var dataStart = assert(target.lookupInSelf("dataStart")); +// assert(dataStart.kind == ElementKind.FIELD); +// var dataLength = assert(target.lookupInSelf("dataLength")); +// assert(dataLength.kind == ElementKind.FIELD); + +// var constantOffset: i32 = 0; +// var dynamicOffset = module.precomputeExpression( +// compiler.compileExpression( +// elementExpression, +// Type.i32, +// ConversionKind.IMPLICIT, +// WrapMode.NONE +// ) +// ); +// if (getExpressionId(dynamicOffset) == ExpressionId.Const) { +// constantOffset = getConstValueI32(dynamicOffset); +// dynamicOffset = 0; +// } else if (getExpressionId(dynamicOffset) == ExpressionId.Binary) { +// if (getBinaryOp(dynamicOffset) == BinaryOp.AddI32) { +// let left = getBinaryLeft(dynamicOffset); +// let right = getBinaryRight(dynamicOffset); +// if (getExpressionId(left) == ExpressionId.Const) { +// constantOffset = getConstValueI32(left); +// dynamicOffset = right; +// } else if (getExpressionId(right) == ExpressionId.Const) { +// constantOffset = getConstValueI32(right); +// dynamicOffset = left; +// } +// } +// } + +// var program = compiler.program; +// var isManaged = type.isManaged(program) && target.type.isManaged(program); +// var usizeType = compiler.options.usizeType; +// var nativeSizeType = compiler.options.nativeSizeType; +// var thisExpr = compiler.compileExpression( +// thisExpression, +// target.type, +// ConversionKind.IMPLICIT, +// WrapMode.NONE +// ); +// var tempThis: Local | null = null; +// if (isManaged) { +// tempThis = compiler.currentFlow.getTempLocal(target.type, false); +// thisExpr = module.createTeeLocal(tempThis.index, thisExpr); +// } +// var dataStartExpr = module.createLoad(usizeType.byteSize, true, +// thisExpr, nativeSizeType, (dataStart).memoryOffset +// ); + +// var typeAlignLog2 = type.alignLog2; +// constantOffset <<= typeAlignLog2; +// if (dynamicOffset) { +// if (typeAlignLog2) { +// dynamicOffset = module.createBinary(BinaryOp.ShlI32, +// dynamicOffset, +// module.createI32(typeAlignLog2) +// ); +// } +// if (nativeSizeType == NativeType.I64) { +// dataStartExpr = module.createBinary(BinaryOp.AddI64, +// dataStartExpr, +// module.createUnary(UnaryOp.ExtendU32, dynamicOffset) +// ); +// } else { +// dataStartExpr = module.createBinary(BinaryOp.AddI32, +// dataStartExpr, +// dynamicOffset +// ); +// } +// } + +// // handle Array: value = RETAIN(value, this) +// if (isManaged) { +// let program = compiler.program; +// let retainInstance = compiler.resolver.resolveFunction(assert(program.retainPrototype), [ type, target.type ]); +// if (!retainInstance) return module.createUnreachable(); +// valueExpr = compiler.makeCallInlinePrechecked(retainInstance, [ +// valueExpr, +// module.createGetLocal(assert(tempThis).index, nativeSizeType) +// ], 0, true); + +// // handle Uint8ClampedArray: value = ~(value >> 31) & (((255 - value) >> 31) | value) +// } else if (target.internalName == BuiltinSymbols.Uint8ClampedArray) { +// let tempLocal = compiler.currentFlow.getAndFreeTempLocal(Type.i32, true); +// valueExpr = module.createBinary(BinaryOp.AndI32, +// module.createBinary(BinaryOp.XorI32, +// module.createBinary(BinaryOp.ShrI32, +// module.createTeeLocal(tempLocal.index, valueExpr), +// module.createI32(31) +// ), +// module.createI32(-1) +// ), +// module.createBinary(BinaryOp.OrI32, +// module.createBinary(BinaryOp.ShrI32, +// module.createBinary(BinaryOp.SubI32, +// module.createI32(255), +// module.createGetLocal(tempLocal.index, NativeType.I32) +// ), +// module.createI32(31) +// ), +// module.createGetLocal(tempLocal.index, NativeType.I32) +// ) +// ); +// } +// assert(!tempThis); + +// var nativeType = type.toNativeType(); + +// if (!tee) { +// compiler.currentType = Type.void; +// return module.createStore( +// type.byteSize, +// dataStartExpr, +// valueExpr, +// nativeType, +// constantOffset +// ); +// } else { +// let flow = compiler.currentFlow; +// let tempLocal = flow.getAndFreeTempLocal(type, false); +// compiler.currentType = type; +// return module.createBlock(null, [ +// module.createStore( +// type.byteSize, +// dataStartExpr, +// module.createTeeLocal(tempLocal.index, valueExpr), +// nativeType, +// constantOffset +// ), +// module.createGetLocal(tempLocal.index, nativeType) +// ], nativeType); +// } +// } diff --git a/src/codegen/gc.ts b/src/codegen/gc.ts new file mode 100644 index 0000000000..52dde0008b --- /dev/null +++ b/src/codegen/gc.ts @@ -0,0 +1,156 @@ +import { Compiler } from "../compiler"; +import { ExpressionRef, NativeType, BinaryOp } from "../module"; +import { Local, Function, Class } from "../program"; +import { Type } from "../types"; + +/** Prepares the insertion of a reference into an _uninitialized_ parent using the GC interface. */ +export function makeInsertRef( + compiler: Compiler, + valueExpr: ExpressionRef, + tempParent: Local, + nullable: bool +): ExpressionRef { + var module = compiler.module; + var program = compiler.program; + var usizeType = compiler.options.usizeType; + var nativeSizeType = compiler.options.nativeSizeType; + var flow = compiler.currentFlow; + var tempValue = flow.getTempLocal(usizeType, false); + var handle: ExpressionRef; + var fn: Function | null; + if (fn = program.linkRef) { // tracing + handle = module.createCall(fn.internalName, [ + module.createGetLocal(tempValue.index, nativeSizeType), + module.createGetLocal(tempParent.index, nativeSizeType) + ], NativeType.None); + } else if (fn = program.retainRef) { // arc + handle = module.createCall(fn.internalName, [ + module.createGetLocal(tempValue.index, nativeSizeType) + ], NativeType.None); + } else { + assert(false); + return module.createUnreachable(); + } + flow.freeTempLocal(tempValue); + if (!compiler.compileFunction(fn)) return module.createUnreachable(); + // { + // [if (value !== null)] link/retain(value[, parent]) + // } -> value + return module.createBlock(null, [ + module.createSetLocal(tempValue.index, valueExpr), + nullable + ? module.createIf( + module.createGetLocal(tempValue.index, nativeSizeType), + handle + ) + : handle, + module.createGetLocal(tempValue.index, nativeSizeType) + ], nativeSizeType); +} + +/** Prepares the replaces a reference hold by an _initialized_ parent using the GC interface. */ +export function makeReplaceRef( + compiler: Compiler, + valueExpr: ExpressionRef, + oldValueExpr: ExpressionRef, + tempParent: Local, + nullable: bool +): ExpressionRef { + var module = compiler.module; + var program = compiler.program; + var usizeType = compiler.options.usizeType; + var nativeSizeType = compiler.options.nativeSizeType; + var flow = compiler.currentFlow; + var tempValue = flow.getTempLocal(usizeType, false); + var tempOldValue = flow.getTempLocal(usizeType, false); + var handleOld: ExpressionRef; + var handleNew: ExpressionRef; + var fn1: Function | null, fn2: Function | null; + if (fn1 = program.linkRef) { // tracing + fn2 = assert(program.unlinkRef); + handleOld = module.createCall(fn2.internalName, [ + module.createGetLocal(tempOldValue.index, nativeSizeType), + module.createGetLocal(tempParent.index, nativeSizeType) + ], NativeType.None); + handleNew = module.createCall(fn1.internalName, [ + module.createGetLocal(tempValue.index, nativeSizeType), + module.createGetLocal(tempParent.index, nativeSizeType) + ], NativeType.None); + } else if (fn1 = program.retainRef) { // arc + fn2 = assert(program.releaseRef); + handleOld = module.createCall(fn2.internalName, [ + module.createGetLocal(tempOldValue.index, nativeSizeType) + ], NativeType.None); + handleNew = module.createCall(fn1.internalName, [ + module.createGetLocal(tempValue.index, nativeSizeType) + ], NativeType.None); + } else { + assert(false); + return module.createUnreachable(); + } + flow.freeTempLocal(tempValue); + flow.freeTempLocal(tempOldValue); + if (!compiler.compileFunction(fn1) || !compiler.compileFunction(fn2)) return module.createUnreachable(); + // if (value != oldValue) { + // if (oldValue !== null) unlink/release(oldValue[, parent]) + // [if (value !== null)] link/retain(value[, parent]) + // } -> value + return module.createIf( + module.createBinary(nativeSizeType == NativeType.I32 ? BinaryOp.NeI32 : BinaryOp.NeI64, + module.createTeeLocal(tempValue.index, valueExpr), + module.createTeeLocal(tempOldValue.index, oldValueExpr) + ), + module.createBlock(null, [ + module.createIf( + module.createGetLocal(tempOldValue.index, nativeSizeType), + handleOld + ), + nullable + ? module.createIf( + module.createGetLocal(tempValue.index, nativeSizeType), + handleNew + ) + : handleNew, + module.createGetLocal(tempValue.index, nativeSizeType) + ], nativeSizeType), + module.createGetLocal(tempValue.index, nativeSizeType) + ); +} + +export function makeInstanceOfClass( + compiler: Compiler, + expr: ExpressionRef, + classInstance: Class +): ExpressionRef { + var module = compiler.module; + var flow = compiler.currentFlow; + var idTemp = flow.getTempLocal(Type.i32, false); + var idExpr = module.createLoad(4, false, + module.createBinary(BinaryOp.SubI32, + expr, + module.createI32(compiler.program.runtimeHeaderSize) + ), + NativeType.I32 + ); + var label = "instanceof_" + classInstance.name + "|" + flow.pushBreakLabel(); + var conditions: ExpressionRef[] = []; + conditions.push( + module.createDrop( // br_if returns the value too + module.createBreak(label, + module.createBinary(BinaryOp.EqI32, // classId == class.id + module.createTeeLocal(idTemp.index, idExpr), + module.createI32(classInstance.id) + ), + module.createI32(1) // ? true + ) + ) + ); + // TODO: insert conditions for all possible subclasses (i.e. cat is also animal) + // TODO: simplify if there are none + conditions.push( + module.createI32(0) // : false + ); + flow.freeTempLocal(idTemp); + flow.popBreakLabel(); + return module.createBlock(label, conditions, NativeType.I32); +} diff --git a/src/common.ts b/src/common.ts index 97eaf2c315..07fe82bd2e 100644 --- a/src/common.ts +++ b/src/common.ts @@ -189,6 +189,8 @@ export namespace LibrarySymbols { export const REGISTER = "REGISTER"; export const RETAIN = "RETAIN"; export const RELEASE = "RELEASE"; + export const MOVE = "MOVE"; + export const REPLACE = "REPLACE"; export const MAKEARRAY = "MAKEARRAY"; // other export const length = "length"; diff --git a/src/compiler.ts b/src/compiler.ts index 8450e877f0..1f847cdeb4 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -7,10 +7,7 @@ import { compileCall as compileBuiltinCall, compileAbort, compileIterateRoots, - BuiltinSymbols, - compileBuiltinArrayGet, - compileBuiltinArraySet, - compileBuiltinArraySetWithValue + BuiltinSymbols } from "./builtins"; import { @@ -174,6 +171,8 @@ import { makeMap } from "./util"; +import { makeInsertRef, makeReplaceRef } from "./codegen/gc"; + /** Compilation target. */ export enum Target { /** WebAssembly with 32-bit pointers. */ @@ -1010,7 +1009,7 @@ export class Compiler extends DiagnosticEmitter { if (initInStart) { module.addGlobal(val.internalName, NativeType.I32, true, module.createI32(0)); this.currentBody.push( - module.createSetGlobal(val.internalName, initExpr) + this.makeGlobalAssignment(val, initExpr, false) ); previousValueIsMut = true; } else { @@ -4745,19 +4744,19 @@ export class Compiler extends DiagnosticEmitter { let elementExpression = resolver.currentElementExpression; if (elementExpression) { // indexed access let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); - if (isUnchecked) { - let arrayType = this.program.determineBuiltinArrayType(target); - if (arrayType) { - return compileBuiltinArraySet( - this, - target, - assert(this.resolver.currentThisExpression), - elementExpression, - valueExpression, - contextualType - ); - } - } + // if (isUnchecked) { + // let arrayType = this.program.determineBuiltinArrayType(target); + // if (arrayType) { + // return compileBuiltinArraySet( + // this, + // target, + // assert(this.resolver.currentThisExpression), + // elementExpression, + // valueExpression, + // contextualType + // ); + // } + // } let indexedSet = (target).lookupOverload(OperatorKind.INDEXED_SET, isUnchecked); if (!indexedSet) { let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); @@ -4801,7 +4800,7 @@ export class Compiler extends DiagnosticEmitter { compileAssignmentWithValue( expression: Expression, - valueWithCorrectType: ExpressionRef, + valueExpr: ExpressionRef, tee: bool = false ): ExpressionRef { var module = this.module; @@ -4811,49 +4810,28 @@ export class Compiler extends DiagnosticEmitter { switch (target.kind) { case ElementKind.LOCAL: { - let type = (target).type; - assert(type != Type.void); - this.currentType = tee ? type : Type.void; - if ((target).is(CommonFlags.CONST)) { + if (target.is(CommonFlags.CONST)) { this.error( DiagnosticCode.Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property, expression.range, target.internalName ); + this.currentType = tee ? (target).type : Type.void; return module.createUnreachable(); } - let localIndex = (target).index; - if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) { - if (!flow.canOverflow(valueWithCorrectType, type)) flow.setLocalFlag(localIndex, LocalFlags.WRAPPED); - else flow.unsetLocalFlag(localIndex, LocalFlags.WRAPPED); - } - return tee - ? module.createTeeLocal(localIndex, valueWithCorrectType) - : module.createSetLocal(localIndex, valueWithCorrectType); + return this.makeLocalAssignment(target, valueExpr, tee); } case ElementKind.GLOBAL: { if (!this.compileGlobal(target)) return module.createUnreachable(); - let type = (target).type; - assert(type != Type.void); - this.currentType = tee ? type : Type.void; - if ((target).is(CommonFlags.CONST)) { + if (target.is(CommonFlags.CONST)) { this.error( DiagnosticCode.Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property, expression.range, target.internalName ); + this.currentType = tee ? (target).type : Type.void; return module.createUnreachable(); } - valueWithCorrectType = this.ensureSmallIntegerWrap(valueWithCorrectType, type); // guaranteed - if (tee) { - let nativeType = type.toNativeType(); - let internalName = target.internalName; - return module.createBlock(null, [ // emulated teeGlobal - module.createSetGlobal(internalName, valueWithCorrectType), - module.createGetGlobal(internalName, nativeType) - ], nativeType); - } else { - return module.createSetGlobal(target.internalName, valueWithCorrectType); - } + return this.makeGlobalAssignment(target, valueExpr, tee); } case ElementKind.FIELD: { let initializerNode = (target).initializerNode; @@ -4870,66 +4848,15 @@ export class Compiler extends DiagnosticEmitter { ); return module.createUnreachable(); } - let thisExpression = assert(this.resolver.currentThisExpression); - let thisExpr = this.compileExpressionRetainType( - thisExpression, - this.options.usizeType, - WrapMode.NONE + return this.makeFieldAssignment(target, + valueExpr, + this.compileExpressionRetainType( + assert(this.resolver.currentThisExpression), + // FIXME: explicit type (currently fails due to missing null checking) + this.options.usizeType, WrapMode.NONE + ), + tee ); - let thisType = this.currentType; - let type = (target).type; - let nativeType = type.toNativeType(); - if (type.kind == TypeKind.BOOL) { - // make sure bools are wrapped (usually are) when storing as 8 bits - valueWithCorrectType = this.ensureSmallIntegerWrap(valueWithCorrectType, type); - } - let program = this.program; - let tempThis: Local | null = null; - if (type.isManaged(program) && thisType.isManaged(program)) { - let retainInstance = this.resolver.resolveFunction(assert(program.retainPrototype), [ type, thisType ]); - if (!retainInstance) { - this.currentType = tee ? type : Type.void; - return module.createUnreachable(); - } - tempThis = this.currentFlow.getTempLocal(thisType, false); - // this = (tempThis = this) - thisExpr = module.createTeeLocal(tempThis.index, thisExpr); - // value = RETAIN(value, tempThis) - valueWithCorrectType = this.makeCallInlinePrechecked(retainInstance, [ - valueWithCorrectType, - module.createGetLocal(tempThis.index, this.options.nativeSizeType) - ], 0, true); - } - if (tee) { - let tempValue = this.currentFlow.getAndFreeTempLocal( - type, - !flow.canOverflow(valueWithCorrectType, type) - ); - if (tempThis) this.currentFlow.freeTempLocal(tempThis); - this.currentType = type; - // (this.field = (tempValue = value)), tempValue - return module.createBlock(null, [ - module.createStore( - type.byteSize, - thisExpr, - module.createTeeLocal(tempValue.index, valueWithCorrectType), - nativeType, - (target).memoryOffset - ), - module.createGetLocal(tempValue.index, nativeType) - ], nativeType); - } else { - if (tempThis) this.currentFlow.freeTempLocal(tempThis); - this.currentType = Type.void; - // this.field = value - return module.createStore( - type.byteSize, - thisExpr, - valueWithCorrectType, - nativeType, - (target).memoryOffset - ); - } } case ElementKind.PROPERTY_PROTOTYPE: { // static property let setterPrototype = (target).setterPrototype; @@ -4943,7 +4870,7 @@ export class Compiler extends DiagnosticEmitter { let setterInstance = this.resolver.resolveFunction(setterPrototype, null, makeMap(), ReportMode.REPORT); if (!setterInstance) return module.createUnreachable(); // call just the setter if the return value isn't of interest - if (!tee) return this.makeCallDirect(setterInstance, [ valueWithCorrectType ], expression); + if (!tee) return this.makeCallDirect(setterInstance, [ valueExpr ], expression); // otherwise call the setter first, then the getter let getterPrototype = assert((target).getterPrototype); // must be present let getterInstance = this.resolver.resolveFunction(getterPrototype, null, makeMap(), ReportMode.REPORT); @@ -4951,7 +4878,7 @@ export class Compiler extends DiagnosticEmitter { let returnType = getterInstance.signature.returnType; let nativeReturnType = returnType.toNativeType(); return module.createBlock(null, [ - this.makeCallDirect(setterInstance, [ valueWithCorrectType ], expression), + this.makeCallDirect(setterInstance, [ valueExpr ], expression), this.makeCallDirect(getterInstance, null, expression) // sets currentType ], nativeReturnType); } @@ -4968,10 +4895,9 @@ export class Compiler extends DiagnosticEmitter { if (!tee) { let thisExpr = this.compileExpressionRetainType( assert(this.resolver.currentThisExpression), - this.options.usizeType, - WrapMode.NONE + this.options.usizeType, WrapMode.NONE ); - return this.makeCallDirect(setterInstance, [ thisExpr, valueWithCorrectType ], expression); + return this.makeCallDirect(setterInstance, [ thisExpr, valueExpr ], expression); } // otherwise call the setter first, then the getter let getterInstance = assert((target).getterInstance); // must be present @@ -4987,7 +4913,7 @@ export class Compiler extends DiagnosticEmitter { return module.createBlock(null, [ this.makeCallDirect(setterInstance, [ // set and remember the target module.createTeeLocal(tempLocalIndex, thisExpr), - valueWithCorrectType + valueExpr ], expression), this.makeCallDirect(getterInstance, [ // get from remembered target module.createGetLocal(tempLocalIndex, nativeReturnType) @@ -4998,19 +4924,19 @@ export class Compiler extends DiagnosticEmitter { let elementExpression = this.resolver.currentElementExpression; if (elementExpression) { let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); - if (isUnchecked) { - let arrayType = this.program.determineBuiltinArrayType(target); - if (arrayType) { - return compileBuiltinArraySetWithValue( - this, - target, - assert(this.resolver.currentThisExpression), - elementExpression, - valueWithCorrectType, - tee - ); - } - } + // if (isUnchecked) { + // let arrayType = this.program.determineBuiltinArrayType(target); + // if (arrayType) { + // return compileBuiltinArraySetWithValue( + // this, + // target, + // assert(this.resolver.currentThisExpression), + // elementExpression, + // valueExpr, + // tee + // ); + // } + // } let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); if (!indexedGet) { this.error( @@ -5050,7 +4976,7 @@ export class Compiler extends DiagnosticEmitter { this.makeCallDirect(indexedSet, [ module.createTeeLocal(tempLocalTarget.index, thisExpr), module.createTeeLocal(tempLocalElement.index, elementExpr), - valueWithCorrectType + valueExpr ], expression), this.makeCallDirect(indexedGet, [ module.createGetLocal(tempLocalTarget.index, tempLocalTarget.type.toNativeType()), @@ -5061,7 +4987,7 @@ export class Compiler extends DiagnosticEmitter { return this.makeCallDirect(indexedSet, [ thisExpr, elementExpr, - valueWithCorrectType + valueExpr ], expression); } } @@ -5075,6 +5001,126 @@ export class Compiler extends DiagnosticEmitter { return module.createUnreachable(); } + makeLocalAssignment(local: Local, valueExpr: ExpressionRef, tee: bool): ExpressionRef { + // TBD: use REPLACE macro to keep track of managed refcounts? or can the compiler evaluate + // this statically in closed contexts like functions in order to safe the extra work? + var type = local.type; + assert(type != Type.void); + var localIndex = local.index; + if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) { + let flow = this.currentFlow; + if (!flow.canOverflow(valueExpr, type)) flow.setLocalFlag(localIndex, LocalFlags.WRAPPED); + else flow.unsetLocalFlag(localIndex, LocalFlags.WRAPPED); + } + if (tee) { + this.currentType = type; + return this.module.createTeeLocal(localIndex, valueExpr); + } else { + this.currentType = Type.void; + return this.module.createSetLocal(localIndex, valueExpr) + } + } + + makeGlobalAssignment(global: Global, valueExpr: ExpressionRef, tee: bool): ExpressionRef { + // TBD: use REPLACE macro to keep track of managed refcounts? currently this doesn't work + // because there isn't a parent ref here. a tracing GC wouldn't need the hook at all while + // a reference counting gc doesn't need a parent. + var type = global.type; + assert(type != Type.void); + valueExpr = this.ensureSmallIntegerWrap(valueExpr, type); // global values must be wrapped + if (tee) { + let module = this.module; + let nativeType = type.toNativeType(); + let tempValue = this.currentFlow.getAndFreeTempLocal(type, true); + this.currentType = type; + return module.createBlock(null, [ + module.createSetGlobal(global.internalName, + module.createTeeLocal(tempValue.index, valueExpr) + ), + module.createGetLocal(tempValue.index, nativeType) + ], nativeType); + } else { + this.currentType = Type.void; + return this.module.createSetGlobal(global.internalName, valueExpr); + } + } + + makeFieldAssignment(field: Field, valueExpr: ExpressionRef, thisExpr: ExpressionRef, tee: bool): ExpressionRef { + var program = this.program; + var module = this.module; + var flow = this.currentFlow; + var fieldType = field.type; + var nativeFieldType = fieldType.toNativeType(); + assert(field.parent.kind == ElementKind.CLASS); + var thisType = (field.parent).type; + var nativeThisType = thisType.toNativeType(); + + // MANAGED: this.field = replace(value, this.field) + if (fieldType.isManaged(program)) { + let tempThis = flow.getTempLocal(thisType, false); + let expr: ExpressionRef; + if (tee) { // tee value to a temp local and make it the block's result + let tempValue = flow.getTempLocal(fieldType, !flow.canOverflow(valueExpr, fieldType)); + expr = module.createBlock(null, [ + module.createStore(fieldType.byteSize, + module.createTeeLocal(tempThis.index, thisExpr), + makeReplaceRef(this, + module.createTeeLocal(tempValue.index, valueExpr), + module.createLoad(fieldType.byteSize, fieldType.is(TypeFlags.SIGNED), + module.createGetLocal(tempThis.index, nativeThisType), + nativeFieldType, field.memoryOffset + ), + tempThis, + fieldType.is(TypeFlags.NULLABLE) + ), + nativeFieldType, field.memoryOffset + ), + module.createGetLocal(tempValue.index, nativeFieldType) + ], nativeFieldType); + flow.freeTempLocal(tempValue); + this.currentType = fieldType; + } else { // no need for a temp local + expr = module.createStore(fieldType.byteSize, + module.createTeeLocal(tempThis.index, thisExpr), + makeReplaceRef(this, + valueExpr, + module.createLoad(fieldType.byteSize, fieldType.is(TypeFlags.SIGNED), + module.createGetLocal(tempThis.index, nativeThisType), + nativeFieldType, field.memoryOffset + ), + tempThis, + fieldType.is(TypeFlags.NULLABLE) + ), + nativeFieldType, field.memoryOffset + ); + this.currentType = Type.void; + } + flow.freeTempLocal(tempThis); + return expr; + } + + // UNMANAGED: this.field = value + if (tee) { + this.currentType = fieldType; + let tempValue = flow.getAndFreeTempLocal(fieldType, !flow.canOverflow(valueExpr, fieldType)); + return module.createBlock(null, [ + module.createStore(fieldType.byteSize, + thisExpr, + module.createTeeLocal(tempValue.index, valueExpr), + nativeFieldType, field.memoryOffset + ), + module.createGetLocal(tempValue.index, nativeFieldType) + ], nativeFieldType); + } else { + this.currentType = Type.void; + return module.createStore(fieldType.byteSize, + thisExpr, + valueExpr, + nativeFieldType, field.memoryOffset + ); + } + } + compileCallExpression( expression: CallExpression, contextualType: Type, @@ -6072,18 +6118,18 @@ export class Compiler extends DiagnosticEmitter { switch (target.kind) { case ElementKind.CLASS: { let isUnchecked = this.currentFlow.is(FlowFlags.UNCHECKED_CONTEXT); - if (isUnchecked) { - let arrayType = this.program.determineBuiltinArrayType(target); - if (arrayType) { - return compileBuiltinArrayGet( - this, - target, - expression.expression, - expression.elementExpression, - contextualType - ); - } - } + // if (isUnchecked) { + // let arrayType = this.program.determineBuiltinArrayType(target); + // if (arrayType) { + // return compileBuiltinArrayGet( + // this, + // target, + // expression.expression, + // expression.elementExpression, + // contextualType + // ); + // } + // } let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); if (!indexedGet) { this.error( @@ -6814,26 +6860,19 @@ export class Compiler extends DiagnosticEmitter { ) ) ); - var isManaged = elementType.isManaged(program) && arrayType.isManaged(program); - var retainInstance = isManaged - ? this.resolver.resolveFunction(assert(program.retainPrototype), [ elementType, arrayType ]) - : null; + var isManaged = elementType.isManaged(program); for (let i = 0, alignLog2 = elementType.alignLog2; i < length; ++i) { let valueExpression = expressions[i]; let valueExpr = valueExpression ? this.compileExpression(valueExpression, elementType, ConversionKind.IMPLICIT, WrapMode.NONE) : elementType.toNativeZero(module); if (isManaged) { - if (!retainInstance) { - valueExpr = module.createUnreachable(); - } else { - // value = RETAIN(value, tempThis) - valueExpr = this.makeCallInlinePrechecked(retainInstance, [ - valueExpr, - module.createGetLocal(tempThis.index, nativeArrayType) - ], 0, true); - this.currentFlow = flow; - } + // value = link/retain(value[, tempThis]) + valueExpr = makeInsertRef(this, + valueExpr, + tempThis, + elementType.is(TypeFlags.NULLABLE) + ); } // store(tempData, value, immOffset) stmts.push( @@ -6849,7 +6888,7 @@ export class Compiler extends DiagnosticEmitter { stmts.push( module.createGetLocal(tempThis.index, nativeArrayType) ); - flow.freeTempLocal(tempThis); // but can be reused now + flow.freeTempLocal(tempThis); flow.freeTempLocal(tempDataStart); this.currentType = arrayType; return module.createBlock(null, stmts, nativeArrayType); @@ -7212,43 +7251,6 @@ export class Compiler extends DiagnosticEmitter { return module.createUnreachable(); } - private compileGetter(target: PropertyPrototype, reportNode: Node): ExpressionRef { - var prototype = target.getterPrototype; - if (prototype) { - let instance = this.resolver.resolveFunction(prototype, null); - if (!instance) return this.module.createUnreachable(); - let signature = instance.signature; - if (!this.checkCallSignature( // reports - signature, - 0, - instance.is(CommonFlags.INSTANCE), - reportNode - )) { - return this.module.createUnreachable(); - } - if (instance.is(CommonFlags.INSTANCE)) { - let classInstance = assert(instance.parent); assert(classInstance.kind == ElementKind.CLASS); - let thisExpression = assert(this.resolver.currentThisExpression); //!!! - let thisExpr = this.compileExpressionRetainType( - thisExpression, - this.options.usizeType, - WrapMode.NONE - ); - this.currentType = signature.returnType; - return this.compileCallDirect(instance, [], reportNode, thisExpr); - } else { - this.currentType = signature.returnType; - return this.compileCallDirect(instance, [], reportNode, 0); - } - } else { - this.error( - DiagnosticCode.Property_0_does_not_exist_on_type_1, - reportNode.range, (target).name, (target).parent.toString() - ); - return this.module.createUnreachable(); - } - } - compileTernaryExpression(expression: TernaryExpression, contextualType: Type): ExpressionRef { var ifThen = expression.ifThen; var ifElse = expression.ifElse; diff --git a/src/flow.ts b/src/flow.ts index a43672b315..56839b0843 100644 --- a/src/flow.ts +++ b/src/flow.ts @@ -156,7 +156,30 @@ export enum LocalFlags { export namespace LocalFlags { export function join(left: LocalFlags, right: LocalFlags): LocalFlags { return ((left & LocalFlags.ANY_CATEGORICAL) & (right & LocalFlags.ANY_CATEGORICAL)) - | (left & LocalFlags.ANY_CONDITIONAL) | (right & LocalFlags.ANY_CONDITIONAL); + | (left & LocalFlags.ANY_CONDITIONAL) | (right & LocalFlags.ANY_CONDITIONAL); + } +} + +/** Flags indicating the current state of a field. */ +export enum FieldFlags { + /** No specific conditions. */ + NONE = 0, + + /** Field is initialized. Relevant in constructors. */ + INITIALIZED = 1 << 0, + /** Field is conditionally initialized. Relevant in constructors. */ + CONDITIONALLY_INITIALIZED = 1 << 1, + + /** Any categorical flag. */ + ANY_CATEGORICAL = INITIALIZED, + + /** Any conditional flag. */ + ANY_CONDITIONAL = CONDITIONALLY_INITIALIZED +} +export namespace FieldFlags { + export function join(left: FieldFlags, right: FieldFlags): FieldFlags { + return ((left & FieldFlags.ANY_CATEGORICAL) & (right & FieldFlags.ANY_CATEGORICAL)) + | (left & FieldFlags.ANY_CONDITIONAL) | (right & FieldFlags.ANY_CONDITIONAL); } } @@ -181,6 +204,8 @@ export class Flow { scopedLocals: Map | null = null; /** Local flags. */ localFlags: LocalFlags[]; + /** Field flags. Relevant in constructors. */ + fieldFlags: Map | null = null; /** Function being inlined, when inlining. */ inlineFunction: Function | null; /** The label we break to when encountering a return statement, when inlining. */ diff --git a/src/program.ts b/src/program.ts index 3306dc87a7..db976f6f8b 100644 --- a/src/program.ts +++ b/src/program.ts @@ -354,23 +354,25 @@ export class Program extends DiagnosticEmitter { stringInstance: Class | null = null; /** Abort function reference, if present. */ abortInstance: Function | null = null; - /** Runtime allocation function. */ + + /** Runtime allocation macro. `ALLOCATE(payloadSize: usize): usize` */ allocateInstance: Function | null = null; - /** Unmanaged allocation function. */ + /** Unmanaged allocation macro. `ALLOCATE_UNMANAGED(size: usize): usize` */ allocateUnmanagedInstance: Function | null = null; - /** Runtime reallocation function. */ + /** Runtime reallocation macro. `REALLOCATE(ref: usize, newPayloadSize: usize): usize` */ reallocateInstance: Function | null = null; - /** Runtime discard function. */ + /** Runtime discard macro. `DISCARD(ref: usize): void` */ discardInstance: Function | null = null; - /** Runtime register function. */ + /** Runtime register macro. `REGISTER(ref: usize): T` */ registerPrototype: FunctionPrototype | null = null; - /** Runtime retain function. */ - retainPrototype: FunctionPrototype | null = null; - /** Runtime release function. */ - releasePrototype: FunctionPrototype | null = null; - /** Runtime make array function. */ + /** Runtime make array macro. `MAKEARRAY(capacity: i32, source: usize = 0): Array` */ makeArrayPrototype: FunctionPrototype | null = null; + linkRef: Function | null = null; + unlinkRef: Function | null = null; + retainRef: Function | null = null; + releaseRef: Function | null = null; + /** Next class id. */ nextClassId: u32 = 1; @@ -378,7 +380,7 @@ export class Program extends DiagnosticEmitter { /** Whether a garbage collector is present or not. */ get gcImplemented(): bool { - return this.lookupGlobal("__gc_register") !== null; + return this.lookupGlobal("__ref_collect") !== null; } /** Garbage collector mark function called to on reachable managed objects. */ gcMarkInstance: Function | null = null; // FIXME @@ -830,18 +832,25 @@ export class Program extends DiagnosticEmitter { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.registerPrototype = element; } - if (element = this.lookupGlobal(LibrarySymbols.RETAIN)) { - assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); - this.retainPrototype = element; - } - if (element = this.lookupGlobal(LibrarySymbols.RELEASE)) { - assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); - this.releasePrototype = element; - } if (element = this.lookupGlobal(LibrarySymbols.MAKEARRAY)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.makeArrayPrototype = element; } + if (this.lookupGlobal("__ref_collect")) { + if (element = this.lookupGlobal("__ref_link")) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.linkRef = this.resolver.resolveFunction(element, null); + element = assert(this.lookupGlobal("__ref_unlink")); + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.unlinkRef = this.resolver.resolveFunction(element, null); + } else if (element = this.lookupGlobal("__ref_retain")) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.retainRef = this.resolver.resolveFunction(element, null); + element = assert(this.lookupGlobal("__ref_release")); + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.releaseRef = this.resolver.resolveFunction(element, null); + } + } } // mark module exports, i.e. to apply proper wrapping behavior on the boundaries @@ -1726,31 +1735,31 @@ export class Program extends DiagnosticEmitter { } /** Determines the element type of a built-in array. */ - determineBuiltinArrayType(target: Class): Type | null { - switch (target.internalName) { - case BuiltinSymbols.Int8Array: return Type.i8; - case BuiltinSymbols.Uint8ClampedArray: - case BuiltinSymbols.Uint8Array: return Type.u8; - case BuiltinSymbols.Int16Array: return Type.i16; - case BuiltinSymbols.Uint16Array: return Type.u16; - case BuiltinSymbols.Int32Array: return Type.i32; - case BuiltinSymbols.Uint32Array: return Type.u32; - case BuiltinSymbols.Int64Array: return Type.i64; - case BuiltinSymbols.Uint64Array: return Type.u64; - case BuiltinSymbols.Float32Array: return Type.f32; - case BuiltinSymbols.Float64Array: return Type.f64; - } - var current: Class | null = target; - var arrayPrototype = this.arrayPrototype; - do { - if (current.prototype == arrayPrototype) { // Array - let typeArguments = assert(current.typeArguments); - assert(typeArguments.length == 1); - return typeArguments[0]; - } - } while (current = current.base); - return null; - } + // determineBuiltinArrayType(target: Class): Type | null { + // switch (target.internalName) { + // case BuiltinSymbols.Int8Array: return Type.i8; + // case BuiltinSymbols.Uint8ClampedArray: + // case BuiltinSymbols.Uint8Array: return Type.u8; + // case BuiltinSymbols.Int16Array: return Type.i16; + // case BuiltinSymbols.Uint16Array: return Type.u16; + // case BuiltinSymbols.Int32Array: return Type.i32; + // case BuiltinSymbols.Uint32Array: return Type.u32; + // case BuiltinSymbols.Int64Array: return Type.i64; + // case BuiltinSymbols.Uint64Array: return Type.u64; + // case BuiltinSymbols.Float32Array: return Type.f32; + // case BuiltinSymbols.Float64Array: return Type.f64; + // } + // var current: Class | null = target; + // var arrayPrototype = this.arrayPrototype; + // do { + // if (current.prototype == arrayPrototype) { // Array + // let typeArguments = assert(current.typeArguments); + // assert(typeArguments.length == 1); + // return typeArguments[0]; + // } + // } while (current = current.base); + // return null; + // } } /** Indicates the specific kind of an {@link Element}. */ diff --git a/src/resolver.ts b/src/resolver.ts index e057fbccec..d1b9aee16c 100644 --- a/src/resolver.ts +++ b/src/resolver.ts @@ -372,12 +372,26 @@ export class Resolver extends DiagnosticEmitter { ); // recoverable } - return this.resolveType( + let type = this.resolveType( (element).typeNode, element, contextualTypeArguments, reportMode ); + if (!type) return null; + if (node.isNullable) { + if (!type.is(TypeFlags.REFERENCE)) { + if (reportMode == ReportMode.REPORT) { + this.error( + DiagnosticCode.Basic_type_0_cannot_be_nullable, + typeNode.name.range, typeName.identifier.text + ); + } + } else { + return type.asNullable(); + } + } + return type; } if (reportMode == ReportMode.REPORT) { this.error( @@ -614,8 +628,8 @@ export class Resolver extends DiagnosticEmitter { case ElementKind.CLASS: { // property access on element access? let elementExpression = this.currentElementExpression; if (elementExpression) { - let arrayType = this.program.determineBuiltinArrayType(target); - if (!arrayType) { + // let arrayType = this.program.determineBuiltinArrayType(target); + // if (!arrayType) { let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET); if (!indexedGet) { this.error( @@ -624,8 +638,8 @@ export class Resolver extends DiagnosticEmitter { ); return null; } - arrayType = indexedGet.signature.returnType; - } + let arrayType = indexedGet.signature.returnType; + // } if (!(target = arrayType.classReference)) { this.error( DiagnosticCode.Property_0_does_not_exist_on_type_1, @@ -726,8 +740,8 @@ export class Resolver extends DiagnosticEmitter { break; } case ElementKind.CLASS: { - let arrayType = this.program.determineBuiltinArrayType(target); - if (!arrayType) { + // let arrayType = this.program.determineBuiltinArrayType(target); + // if (!arrayType) { let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET); if (!indexedGet) { if (reportMode == ReportMode.REPORT) { @@ -738,8 +752,8 @@ export class Resolver extends DiagnosticEmitter { } return null; } - arrayType = indexedGet.signature.returnType; - } + let arrayType = indexedGet.signature.returnType; + // } if (targetExpression.kind == NodeKind.ELEMENTACCESS) { // nested element access if (target = arrayType.classReference) { this.currentThisExpression = targetExpression; diff --git a/src/types.ts b/src/types.ts index c3193e6556..2c92bbe752 100644 --- a/src/types.ts +++ b/src/types.ts @@ -212,7 +212,9 @@ export class Type { var targetFunction: Signature | null; if (this.is(TypeFlags.REFERENCE)) { if (target.is(TypeFlags.REFERENCE)) { - if (!this.is(TypeFlags.NULLABLE) || target.is(TypeFlags.NULLABLE)) { + // FIXME: turned out resolveType didn't handle nullability properly, and fixing it there + // leads to this check failing all over the place due to not yet implemented null states. + // if (!this.is(TypeFlags.NULLABLE) || target.is(TypeFlags.NULLABLE)) { if (currentClass = this.classReference) { if (targetClass = target.classReference) { return currentClass.isAssignableTo(targetClass); @@ -222,7 +224,7 @@ export class Type { return currentFunction.isAssignableTo(targetFunction); } } - } + // } } } else if (!target.is(TypeFlags.REFERENCE)) { if (this.is(TypeFlags.INTEGER)) { diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 6188ce1aa9..86704f8318 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -1,7 +1,6 @@ -import { - ALLOCATE, REALLOCATE, DISCARD, RETAIN, RELEASE, REGISTER, MAX_BYTELENGTH, MOVE, MAKEARRAY, - ArrayBufferView -} from "./runtime"; +/// + +import { ALLOCATE, REALLOCATE, DISCARD, REGISTER, MAX_BYTELENGTH, MAKEARRAY, ArrayBufferView } from "./runtime"; import { ArrayBuffer } from "./arraybuffer"; import { COMPARATOR, SORT } from "./util/sort"; import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number"; @@ -90,19 +89,21 @@ export class Array extends ArrayBufferView { return -1; } - @operator("[]") // unchecked is built-in - private __get(index: i32): T { + @operator("[]") private __get(index: i32): T { if (isReference()) { if (!isNullable()) { if (index >= this.length_) throw new Error(E_HOLEYARRAY); } } if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); + return this.__unchecked_get(index); + } + + @operator("{}") private __unchecked_get(index: i32): T { return load(this.dataStart + (index << alignof())); } - @operator("[]=") // unchecked is built-in - private __set(index: i32, value: T): void { + @operator("[]=") private __set(index: i32, value: T): void { var length = this.length_; if (isReference()) { if (!isNullable()) { @@ -110,21 +111,37 @@ export class Array extends ArrayBufferView { } } ensureCapacity(this, index + 1, alignof()); + this.__unchecked_set(index, value); + if (index >= length) this.length_ = index + 1; + } + + @operator("{}=") private __unchecked_set(index: i32, value: T): void { if (isManaged()) { let offset = this.dataStart + (index << alignof()); let oldValue = load(offset); if (value !== oldValue) { + store(offset, value); if (isNullable()) { - RELEASE(oldValue, this); // handles != null - } else if (oldValue !== null) { - RELEASE(oldValue, this); // requires != null + if (isDefined(__ref_link)) { + if (oldValue !== null) __ref_unlink(changetype(oldValue), changetype(this)); + if (value !== null) __ref_link(changetype(value), changetype(this)); + } else if (__ref_retain) { + if (oldValue !== null) __ref_release(changetype(oldValue)); + if (value !== null) __ref_retain(changetype(value)); + } else assert(false); + } else { + if (isDefined(__ref_link)) { + if (oldValue !== null) __ref_unlink(changetype(oldValue), changetype(this)); + __ref_link(changetype(value), changetype(this)); + } else if (__ref_retain) { + if (oldValue !== null) __ref_release(changetype(oldValue)); + __ref_retain(changetype(value)); + } else assert(false); } - store(offset, RETAIN(value, this)); } } else { store(this.dataStart + (index << alignof()), value); } - if (index >= length) this.length_ = index + 1; } fill(value: T, start: i32 = 0, end: i32 = i32.MAX_VALUE): this { @@ -177,15 +194,37 @@ export class Array extends ArrayBufferView { return -1; } - push(element: T): i32 { - var newLength = this.length_ + 1; + push(value: T): i32 { + var length = this.length_; + var newLength = length + 1; ensureCapacity(this, newLength, alignof()); + if (isManaged()) { + let offset = this.dataStart + (length << alignof()); + let oldValue = load(offset); + if (oldValue !== value) { + store(offset, value); + if (isNullable()) { + if (isDefined(__ref_link)) { + if (value !== null) __ref_link(changetype(value), changetype(this)); + if (oldValue !== null) __ref_unlink(changetype(oldValue), changetype(this)); + } else if (__ref_retain) { + if (oldValue !== null) __ref_retain(changetype(value)); + if (value !== null) __ref_release(changetype(oldValue)); + } else assert(false); + } else { + if (isDefined(__ref_link)) { + __ref_link(changetype(value), changetype(this)); + if (oldValue !== null) __ref_unlink(changetype(oldValue), changetype(this)); + } else if (__ref_retain) { + __ref_retain(changetype(value)); + if (oldValue !== null) __ref_release(changetype(oldValue)); + } else assert(false); + } + } + } else { + store(this.dataStart + (length << alignof()), value); + } this.length_ = newLength; - store(this.dataStart + ((newLength - 1) << alignof()), - isManaged() - ? RETAIN(element, this) - : element - ); return newLength; } @@ -198,13 +237,37 @@ export class Array extends ArrayBufferView { if (isManaged()) { let thisStart = this.dataStart; for (let offset: usize = 0; offset < thisSize; offset += sizeof()) { - store(outStart + offset, RETAIN>(load(thisStart + offset), out)); + let ref = load(thisStart + offset); + store(outStart + offset, ref); + if (isNullable()) { + if (ref) { + if (isDefined(__ref_link)) __ref_link(ref, changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_link(ref, changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } } + outStart += thisSize; let otherStart = other.dataStart; let otherSize = otherLen << alignof(); for (let offset: usize = 0; offset < otherSize; offset += sizeof()) { - let element = load(otherStart + offset); - store(outStart + thisSize + offset, RETAIN>(element, out)); + let ref = load(otherStart + offset); + store(outStart + offset, ref); + if (isNullable()) { + if (ref) { + if (isDefined(__ref_link)) __ref_link(ref, changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_link(ref, changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } } } else { memory.copy(outStart, this.dataStart, thisSize); @@ -260,12 +323,23 @@ export class Array extends ArrayBufferView { var outStart = out.dataStart; for (let index = 0; index < min(length, this.length_); ++index) { let value = load(this.dataStart + (index << alignof())); - let result = callbackfn(value, index, this); - store(outStart + (index << alignof()), - isManaged() - ? RETAIN>(result, out) - : result - ); + if (isManaged()) { + let ref = changetype(callbackfn(value, index, this)); + store(outStart + (index << alignof()), ref); + if (isNullable()) { + if (ref) { + if (isDefined(__ref_link)) __ref_link(ref, changetype(out)); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_link(ref, changetype(out)); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } + } else { + store(outStart + (index << alignof()), callbackfn(value, index, this)); + } } return out; } @@ -330,17 +404,26 @@ export class Array extends ArrayBufferView { unshift(element: T): i32 { var newLength = this.length_ + 1; ensureCapacity(this, newLength, alignof()); - var base = this.dataStart; + var dataStart = this.dataStart; memory.copy( - base + sizeof(), - base, + dataStart + sizeof(), + dataStart, (newLength - 1) << alignof() ); - store(base, - isManaged() - ? RETAIN(element, this) - : element - ); + store(dataStart, element); + if (isManaged()) { + if (isNullable()) { + if (element !== null) { + if (isDefined(__ref_link)) __ref_link(changetype(element), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(element)); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_link(changetype(element), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(element)); + else assert(false); + } + } this.length_ = newLength; return newLength; } @@ -353,14 +436,27 @@ export class Array extends ArrayBufferView { var slice = MAKEARRAY(length); var sliceBase = slice.dataStart; var thisBase = this.dataStart + (begin << alignof()); - for (let i = 0; i < length; ++i) { - let offset = i << alignof(); - let element = load(thisBase + offset); - store(sliceBase + offset, - isManaged() - ? RETAIN>(element, slice) - : element - ); + if (isManaged()) { + let off = 0; + let end = length << alignof(); + while (off < end) { + let ref = load(thisBase + off); + store(sliceBase + off, ref); + if (isNullable()) { + if (ref) { + if (isDefined(__ref_link)) __ref_link(ref, changetype(slice)); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_link(ref, changetype(slice)); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } + off += sizeof(); + } + } else { + memory.copy(sliceBase, thisBase, length << alignof()); } return slice; } @@ -373,18 +469,29 @@ export class Array extends ArrayBufferView { var resultStart = result.dataStart; var thisStart = this.dataStart; var thisBase = thisStart + (start << alignof()); - for (let i = 0; i < deleteCount; ++i) { - store(resultStart + (i << alignof()), - isManaged() - ? MOVE>(load(thisBase + (i << alignof())), this, result) - : load(thisBase + (i << alignof())) + if (isManaged()) { + for (let i = 0; i < deleteCount; ++i) { + let ref = load(thisBase + (i << alignof())); + store(resultStart + (i << alignof()), ref); + if (isDefined(__ref_link)) { + if (isNullable()) { + if (ref) { + __ref_unlink(ref, changetype(this)); + __ref_link(ref, changetype(result)); + } + } else { + __ref_unlink(ref, changetype(this)); + __ref_link(ref, changetype(result)); + } + } + } + } else { + memory.copy( + result.dataStart, + thisBase, + deleteCount << alignof() ); } - memory.copy( - result.dataStart, - thisBase, - deleteCount << alignof() - ); var offset = start + deleteCount; if (length != offset) { memory.copy( diff --git a/std/assembly/collector/README.md b/std/assembly/collector/README.md new file mode 100644 index 0000000000..7f66d8022f --- /dev/null +++ b/std/assembly/collector/README.md @@ -0,0 +1,107 @@ +Garbage collector interface +=========================== + +A garbage collector for AssemblyScript must implement the common and either of the tracing or reference counting interfaces. + +Common +------ + +* **__ref_collect**()
+ Triggers a full garbage collection cycle. + +Tracing +------- + +* **__ref_register**(ref: `usize`)
+ Sets up a new reference. + +* **__ref_link**(ref: `usize`, parentRef: `usize`)
+ Links a reference to a parent that is now referencing it. + +* **__ref_unlink**(ref: `usize`, parentRef: `usize`)
+ Unlinks a reference from a parent that was referencing it. + +Reference counting +------------------ + +* **__ref_retain**(ref: `usize`)
+ Retains a reference, usually incrementing RC. + +* **__ref_release**(ref: `usize`)
+ Releases a reference, usually decrementing RC. + +Reference counting may also implement `__ref_register` if necessary. + +Typical patterns +---------------- + +Standard library components make use of the interface where managed references are stored or deleted. Common patterns are: + +### General + +```ts +/// + +if (isManaged()) { + // compiled only if T is a managed reference + ... pattern ... +} +``` + +### Insertion + +```ts +if (isNullable()) { + if (ref) { + if (isDefined(__ref_link)) __ref_link(ref, parentRef); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } +} else { + if (isDefined(__ref_link)) __ref_link(ref, parentRef); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); +} +``` + +### Replacement + +```ts +if (ref !== oldRef) { + if (isNullable()) { + if (isDefined(__ref_link)) { + if (oldRef) __ref_unlink(oldRef, parentRef); + if (ref) __ref_link(ref, parentRef); + } else if (isDefined(__ref_retain)) { + if (oldRef) __ref_release(oldRef); + if (ref) __ref_retain(ref); + } else assert(false); + } else { + if (isDefined(__ref_link)) { + __ref_unlink(oldRef, parentRef); + __ref_link(ref, parentRef); + } else if (isDefined(__ref_retain)) { + __ref_release(oldRef); + __ref_retain(ref); + } else assert(false); + } +} +``` + +### Deletion + +```ts +if (isNullable()) { + if (ref) { + if (isDefined(__ref_link)) __ref_unlink(ref, parentRef); + else if (isDefined(__ref_retain)) __ref_release(ref); + else assert(false); + } +} else { + if (isDefined(__ref_link)) __ref_unlink(ref, parentRef); + else if (isDefined(__ref_retain)) __ref_release(ref); + else assert(false); +} +``` + +Note that some data structures may contain `null` values even though the value type isn't nullable. May be the case when appending a new element to an array for example. diff --git a/std/assembly/collector/dummy.ts b/std/assembly/collector/dummy.ts index eef7048baf..86b5dd229e 100644 --- a/std/assembly/collector/dummy.ts +++ b/std/assembly/collector/dummy.ts @@ -6,30 +6,40 @@ const TRACE = false; // @ts-ignore: decorator @global @unsafe -function __gc_register(ref: usize): void { - if (TRACE) trace("gc.register", 1, ref); +function __ref_register(ref: usize): void { + if (TRACE) trace("dummy.register", 1, ref); } // @ts-ignore: decorator @global @unsafe -function __gc_retain(ref: usize, parentRef: usize): void { - if (TRACE) trace("gc.retain", 2, ref, parentRef); +function __ref_collect(): void { + if (TRACE) trace("dummy.collect"); } -// @ts-ignore: decorator -@global @unsafe -function __gc_release(ref: usize, parentRef: usize): void { - if (TRACE) trace("gc.release", 2, ref, parentRef); -} +// Tracing // @ts-ignore: decorator @global @unsafe -function __gc_move(ref: usize, oldParentRef: usize, newParentRef: usize): void { - if (TRACE) trace("gc.move", 3, ref, oldParentRef, newParentRef); +function __ref_link(ref: usize, parentRef: usize): void { + if (TRACE) trace("dummy.link", 2, ref, parentRef); } // @ts-ignore: decorator @global @unsafe -function __gc_collect(): void { - if (TRACE) trace("gc.collect"); +function __ref_unlink(ref: usize, parentRef: usize): void { + if (TRACE) trace("dummy.unlink", 2, ref, parentRef); } + +// Reference counting + +// // @ts-ignore: decorator +// @global @unsafe +// function __ref_retain(ref: usize): void { +// if (TRACE) trace("dummy.retain", 1, ref); +// } + +// // @ts-ignore: decorator +// @global @unsafe +// function __ref_release(ref: usize): void { +// if (TRACE) trace("dummy.release", 1, ref); +// } diff --git a/std/assembly/collector/index.d.ts b/std/assembly/collector/index.d.ts new file mode 100644 index 0000000000..e7d28756fe --- /dev/null +++ b/std/assembly/collector/index.d.ts @@ -0,0 +1,11 @@ +// common +declare function __ref_collect(): void; + +// tracing +declare function __ref_register(ref: usize): void; +declare function __ref_link(ref: usize, parentRef: usize): void; +declare function __ref_unlink(ref: usize, parentRef: usize): void; + +// reference counting +declare function __ref_retain(ref: usize): void; +declare function __ref_release(ref: usize): void; diff --git a/std/assembly/collector/itcm.ts b/std/assembly/collector/itcm.ts index 1a0a11e23d..c38696b15f 100644 --- a/std/assembly/collector/itcm.ts +++ b/std/assembly/collector/itcm.ts @@ -211,10 +211,25 @@ function objToRef(obj: ManagedObject): usize { return changetype(obj) + HEADER_SIZE; } +// Garbage collector interface + +// @ts-ignore: decorator +@global @unsafe +export function __ref_collect(): void { + if (TRACE) trace("itcm.collect"); + // begin collecting if not yet collecting + switch (state) { + case State.INIT: + case State.IDLE: step(); + } + // finish the cycle + while (state != State.IDLE) step(); +} + // @ts-ignore: decorator @global @unsafe -export function __gc_register(ref: usize): void { - if (TRACE) trace("gc.register", 1, ref); +export function __ref_register(ref: usize): void { + if (TRACE) trace("itcm.register", 1, ref); step(); // also makes sure it's initialized var obj = refToObj(ref); obj.color = white; @@ -223,27 +238,14 @@ export function __gc_register(ref: usize): void { // @ts-ignore: decorator @global @unsafe -export function __gc_retain(ref: usize, parentRef: usize): void { - if (TRACE) trace("gc.retain", 2, ref, parentRef); +export function __ref_link(ref: usize, parentRef: usize): void { + if (TRACE) trace("itcm.link", 2, ref, parentRef); var parent = refToObj(parentRef); if (parent.color == i32(!white) && refToObj(ref).color == white) parent.makeGray(); } // @ts-ignore: decorator @global @unsafe -export function __gc_release(ref: usize, parentRef: usize): void { - if (TRACE) trace("gc.release", 2, ref, parentRef); -} - -// @ts-ignore: decorator -@global @unsafe -export function __gc_collect(): void { - if (TRACE) trace("gc.collect"); - // begin collecting if not yet collecting - switch (state) { - case State.INIT: - case State.IDLE: step(); - } - // finish the cycle - while (state != State.IDLE) step(); +export function __ref_unlink(ref: usize, parentRef: usize): void { + if (TRACE) trace("itcm.unlink", 2, ref, parentRef); } diff --git a/std/assembly/collector/pure.ts b/std/assembly/collector/pure.ts index 0ced1fc4c4..32c80d11f5 100644 --- a/std/assembly/collector/pure.ts +++ b/std/assembly/collector/pure.ts @@ -235,21 +235,21 @@ function collectWhite(s: Header): void { // Garbage collector interface // @ts-ignore: decorator -@global -function __gc_link(ref: usize, parentRef: usize): void { - increment(changetype

(ref - HEADER_SIZE)); +@global @unsafe +function __ref_collect(): void { + collectCycles(); } // @ts-ignore: decorator -@global -function __gc_unlink(ref: usize, parentRef: usize): void { - decrement(changetype
(ref - HEADER_SIZE)) +@global @unsafe +function __ref_retain(ref: usize): void { + increment(changetype
(ref - HEADER_SIZE)); } // @ts-ignore: decorator -@global -function __gc_collect(): void { - collectCycles(); +@global @unsafe +function __ref_release(ref: usize): void { + decrement(changetype
(ref - HEADER_SIZE)) } // TODO: diff --git a/std/assembly/fixedarray.ts b/std/assembly/fixedarray.ts index 5e99fa6570..e01d12ad76 100644 --- a/std/assembly/fixedarray.ts +++ b/std/assembly/fixedarray.ts @@ -1,4 +1,4 @@ -import { ALLOCATE, REGISTER, MAX_BYTELENGTH, HEADER, HEADER_SIZE, RETAIN, RELEASE } from "./runtime"; +import { ALLOCATE, REGISTER, MAX_BYTELENGTH, HEADER, HEADER_SIZE } from "./runtime"; import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_HOLEYARRAY } from "./util/error"; // NOTE: DO NOT USE YET! @@ -45,8 +45,23 @@ export class FixedArray { let offset = changetype(this) + (index << alignof()); let oldValue = load(offset); if (value !== oldValue) { - RELEASE(oldValue, this); - store(offset, RETAIN(value, this)); + store(offset, value); + if (oldValue !== null) { + if (isDefined(__ref_link)) __ref_unlink(changetype(oldValue), changetype(this)); + else if (isDefined(__ref_retain)) __ref_release(changetype(oldValue)); + else assert(false); + } + if (isNullable()) { + if (value !== null) { + if (isDefined(__ref_link)) __ref_link(changetype(value), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(value)); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_link(changetype(value), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(value)); + else assert(false); + } } } else { store(changetype(this) + (index << alignof()), value); diff --git a/std/assembly/gc.ts b/std/assembly/gc.ts index 7da225a49e..4edf24aa12 100644 --- a/std/assembly/gc.ts +++ b/std/assembly/gc.ts @@ -1,47 +1,16 @@ +/// + /** Garbage collector interface. */ export namespace gc { /** Whether the garbage collector interface is implemented. */ // @ts-ignore: decorator @lazy - export const IMPLEMENTED: bool = isDefined( - // @ts-ignore: stub - __gc_register - ); - - /** Registers a managed object to be tracked by the garbage collector. */ - // @ts-ignore: decorator - @unsafe @inline - export function register(ref: usize): void { - // @ts-ignore: stub - if (isDefined(__gc_register)) __gc_register(ref); - else WARNING("missing implementation: gc.register"); - } - - /** Links a registered object with the registered object now referencing it. */ - // @ts-ignore: decorator - @unsafe @inline - export function link(ref: usize, parentRef: usize): void { - // @ts-ignore: stub - if (isDefined(__gc_link)) __gc_link(ref, parentRef); - else WARNING("missing implementation: gc.link"); - } - - /** Marks an object as being reachable. */ - // @ts-ignore: decorator - @unsafe - export function mark(ref: usize): void { - // @ts-ignore: stub - if (isDefined(__gc_mark)) __gc_mark(ref); - else WARNING("missing implementation: gc.mark"); - } + export const IMPLEMENTED: bool = isDefined(__ref_collect); /** Performs a full garbage collection cycle. */ export function collect(): void { - // @ts-ignore: stub - if (isDefined(__gc_collect)) __gc_collect(); + if (isDefined(__ref_collect)) __ref_collect(); else WARNING("missing implementation: gc.collect"); } } - -// TODO: move marking into userspace using builtins like iterateFields? diff --git a/std/assembly/map.ts b/std/assembly/map.ts index 9eace7e201..130d6c63e9 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -1,4 +1,5 @@ -import { RETAIN, RELEASE, HEADER } from "./runtime"; +/// + import { HASH } from "./util/hash"; // A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht @@ -107,8 +108,27 @@ export class Map { if (isManaged()) { let oldValue = entry.value; if (value !== oldValue) { - RELEASE(oldValue, this); - entry.value = RETAIN(value, this); + entry.value = value; + if (isNullable()) { + if (oldValue !== null) { + if (isDefined(__ref_link)) __ref_unlink(changetype(oldValue), changetype(this)); + else if (isDefined(__ref_retain)) __ref_release(changetype(oldValue)); + else assert(false); + } + if (value !== null) { + if (isDefined(__ref_link)) __ref_link(changetype(value), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(value)); + else assert(false); + } + } else { + if (isDefined(__ref_link)) { + __ref_unlink(changetype(oldValue), changetype(this)); + __ref_link(changetype(value), changetype(this)); + } else if (isDefined(__ref_retain)) { + __ref_release(changetype(oldValue)); + __ref_retain(changetype(value)); + } else assert(false); + } } } else { entry.value = value; @@ -124,12 +144,36 @@ export class Map { } // append new entry let entries = this.entries; - entry = changetype>( - changetype(entries) + this.entriesOffset++ * ENTRY_SIZE() - ); + entry = changetype>(changetype(entries) + this.entriesOffset++ * ENTRY_SIZE()); + entry.key = key; + entry.value = value; // link with the map - entry.key = isManaged() ? RETAIN(key, this) : key; - entry.value = isManaged() ? RETAIN(value, this) : value; + if (isManaged()) { + if (isNullable()) { + if (key !== null) { + if (isDefined(__ref_link)) __ref_link(changetype(key), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(key)); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_link(changetype(key), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(key)); + else assert(false); + } + } + if (isManaged()) { + if (isNullable()) { + if (value !== null) { + if (isDefined(__ref_link)) __ref_link(changetype(value), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(value)); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_link(changetype(value), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(value)); + else assert(false); + } + } ++this.entriesCount; // link with previous entry in bucket let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE; @@ -141,8 +185,34 @@ export class Map { delete(key: K): bool { var entry = this.find(key, HASH(key)); if (!entry) return false; - if (isManaged()) RELEASE(entry.key, this); - if (isManaged()) RELEASE(entry.value, this); + if (isManaged()) { + let oldKey = entry.key; + if (isNullable()) { + if (oldKey !== null) { + if (isDefined(__ref_link)) __ref_unlink(changetype(oldKey), changetype(this)); + else if (isDefined(__ref_retain)) __ref_release(changetype(oldKey)); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_unlink(changetype(oldKey), changetype(this)); + else if (isDefined(__ref_retain)) __ref_release(changetype(oldKey)); + else assert(false); + } + } + if (isManaged()) { + let oldValue = entry.key; + if (isNullable()) { + if (oldValue !== null) { + if (isDefined(__ref_link)) __ref_unlink(changetype(oldValue), changetype(this)); + else if (isDefined(__ref_retain)) __ref_release(changetype(oldValue)); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_unlink(changetype(oldValue), changetype(this)); + else if (isDefined(__ref_retain)) __ref_release(changetype(oldValue)); + else assert(false); + } + } entry.taggedNext |= EMPTY; --this.entriesCount; // check if rehashing is appropriate diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index fe6b27fe75..3eb29c5aa7 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -10,14 +10,6 @@ import { AL_MASK, MAX_SIZE_32 } from "./util/allocator"; import { HEAP_BASE, memory } from "./memory"; import { Array } from "./array"; -/** Whether the memory manager interface is implemented. */ -// @ts-ignore: decorator, stub -@lazy export const MM_IMPLEMENTED: bool = isDefined(__memory_allocate); - -/** Whether the garbage collector interface is implemented. */ -// @ts-ignore: decorator, stub -@lazy export const GC_IMPLEMENTED: bool = isDefined(__gc_register); - /** * The common runtime object header prepended to all managed objects. Has a size of 16 bytes in * WASM32 and contains a classId (e.g. for instanceof checks), the allocation size (e.g. for @@ -31,15 +23,15 @@ import { Array } from "./array"; /** Size of the allocated payload. */ payloadSize: u32; /** Reserved field for use by GC. Only present if GC is. */ - gc1: usize; // itcm: tagged next + reserved1: usize; // itcm: tagged next /** Reserved field for use by GC. Only present if GC is. */ - gc2: usize; // itcm: prev + reserved2: usize; // itcm: prev } /** Common runtime header size. */ -export const HEADER_SIZE: usize = GC_IMPLEMENTED - ? (offsetof
( ) + AL_MASK) & ~AL_MASK // full header if GC is present - : (offsetof
("gc1") + AL_MASK) & ~AL_MASK; // half header if GC is absent +export const HEADER_SIZE: usize = isDefined(__ref_collect) + ? (offsetof
( ) + AL_MASK) & ~AL_MASK // full header if GC is present + : (offsetof
("reserved1") + AL_MASK) & ~AL_MASK; // half header if GC is absent /** Common runtime header magic. Used to assert registered/unregistered status. */ export const HEADER_MAGIC: u32 = 0xA55E4B17; @@ -72,16 +64,16 @@ export function ADJUSTOBLOCK(payloadSize: usize): usize { // @ts-ignore: decorator @unsafe @inline export function ALLOCATE(payloadSize: usize): usize { - return doAllocate(payloadSize); + return allocate(payloadSize); } -function doAllocate(payloadSize: usize): usize { +function allocate(payloadSize: usize): usize { var header = changetype
(memory.allocate(ADJUSTOBLOCK(payloadSize))); header.classId = HEADER_MAGIC; header.payloadSize = payloadSize; - if (GC_IMPLEMENTED) { - header.gc1 = 0; - header.gc2 = 0; + if (isDefined(__ref_collect)) { + header.reserved1 = 0; + header.reserved2 = 0; } return changetype(header) + HEADER_SIZE; } @@ -105,10 +97,10 @@ export function ALLOCATE_UNMANAGED(size: usize): usize { // @ts-ignore: decorator @unsafe @inline export function REALLOCATE(ref: usize, newPayloadSize: usize): usize { - return doReallocate(ref, newPayloadSize); + return reallocate(ref, newPayloadSize); } -function doReallocate(ref: usize, newPayloadSize: usize): usize { +function reallocate(ref: usize, newPayloadSize: usize): usize { // Background: When managed objects are allocated these aren't immediately registered with GC // but can be used as scratch objects while unregistered. This is useful in situations where // the object must be reallocated multiple times because its final size isn't known beforehand, @@ -121,9 +113,9 @@ function doReallocate(ref: usize, newPayloadSize: usize): usize { // move if the allocation isn't large enough or not a heap object let newHeader = changetype
(memory.allocate(newAdjustedSize)); newHeader.classId = header.classId; - if (GC_IMPLEMENTED) { - newHeader.gc1 = 0; - newHeader.gc2 = 0; + if (isDefined(__ref_collect)) { + newHeader.reserved1 = 0; + newHeader.reserved2 = 0; } let newRef = changetype(newHeader) + HEADER_SIZE; memory.copy(newRef, ref, payloadSize); @@ -132,10 +124,10 @@ function doReallocate(ref: usize, newPayloadSize: usize): usize { // free right away if not registered yet assert(ref > HEAP_BASE); // static objects aren't scratch objects memory.free(changetype(header)); - } else if (GC_IMPLEMENTED) { + } else if (isDefined(__ref_collect)) { // if previously registered, register again // @ts-ignore: stub - __gc_register(ref); + __ref_register(ref); } header = newHeader; ref = newRef; @@ -161,112 +153,23 @@ function doReallocate(ref: usize, newPayloadSize: usize): usize { @unsafe @inline export function REGISTER(ref: usize): T { if (!isReference()) ERROR("reference expected"); - return changetype(doRegister(ref, CLASSID())); -} - -function doRegister(ref: usize, classId: u32): usize { - if (!ASC_NO_ASSERT) assertUnregistered(ref); - changetype
(ref - HEADER_SIZE).classId = classId; - // @ts-ignore: stub - if (GC_IMPLEMENTED) __gc_register(ref); - return ref; -} - -/** - * Introduces a new reference to ref hold by parentRef. A tracing garbage collector will most - * likely link the runtime object within its internal graph when RETAIN is called, while a - * reference counting collector will increment the reference count. If a reference is moved - * from one parent to another, use MOVE instead. - */ -// @ts-ignore: decorator -@unsafe @inline -export function RETAIN(ref: T, parentRef: TParent): T { - if (!isManaged()) ERROR("managed reference expected"); - if (!isManaged()) ERROR("managed reference expected"); - if (isNullable()) { - if (ref !== null) doRetain(changetype(ref), changetype(parentRef)); - } else { - doRetain(changetype(ref), changetype(parentRef)); - } - return ref; + return changetype(register(ref, CLASSID())); } -function doRetain(ref: usize, parentRef: usize): void { +function register(ref: usize, classId: u32): usize { if (!ASC_NO_ASSERT) { - assertRegistered(ref); - assertRegistered(parentRef); - } - // @ts-ignore: stub - if (GC_IMPLEMENTED) __gc_retain(changetype(ref), changetype(parentRef)); -} - -/** - * Releases a reference to ref hold by parentRef. A tracing garbage collector will most likely - * ignore this by design, while a reference counting collector decrements the reference count - * and potentially frees the runtime object. - */ -// @ts-ignore: decorator -@unsafe @inline -export function RELEASE(ref: T, parentRef: TParent): void { - if (!isManaged()) ERROR("managed reference expected"); - if (!isManaged()) ERROR("managed reference expected"); - if (isNullable()) { - if (ref !== null) doRelease(changetype(ref), changetype(parentRef)); + assert(ref > HEAP_BASE); // must be a heap object + let header = changetype
(ref - HEADER_SIZE); + assert(header.classId == HEADER_MAGIC); + header.classId = classId; } else { - doRelease(changetype(ref), changetype(parentRef)); - } -} - -function doRelease(ref: usize, parentRef: usize): void { - if (!ASC_NO_ASSERT) { - assertRegistered(ref); - assertRegistered(parentRef); + changetype
(ref - HEADER_SIZE).classId = classId; } // @ts-ignore: stub - if (GC_IMPLEMENTED) __gc_release(changetype(ref), changetype(parentRef)); -} - -/** - * Moves a reference to ref hold by oldParentRef to be now hold by newParentRef. This is a - * special case of first RELEASE'ing a reference on one and instantly RETAIN'ing the reference - * on another parent. A tracing garbage collector will most likely link the runtime object as if - * RETAIN'ed on the new parent only, while a reference counting collector can skip increment and - * decrement, as decrementing might otherwise involve a costly check for cyclic garbage. - */ -// @ts-ignore: decorator -@unsafe @inline -export function MOVE(ref: T, oldParentRef: TOldParent, newParentRef: TNewParent): T { - if (!isManaged()) ERROR("managed reference expected"); - if (!isManaged()) ERROR("managed reference expected"); - if (!isManaged()) ERROR("managed reference expected"); - if (isNullable()) { - if (ref !== null) doMove(changetype(ref), changetype(oldParentRef), changetype(newParentRef)); - } else { - doMove(changetype(ref), changetype(oldParentRef), changetype(newParentRef)); - } + if (isDefined(__ref_register)) __ref_register(ref); return ref; } -function doMove(ref: usize, oldParentRef: usize, newParentRef: usize): void { - if (!ASC_NO_ASSERT) { - assertRegistered(ref); - assertRegistered(oldParentRef); - assertRegistered(newParentRef); - } - if (GC_IMPLEMENTED) { - // @ts-ignore: stub - if (isDefined(__gc_move)) { - // @ts-ignore: stub - __gc_move(changetype(ref), changetype(oldParentRef), changetype(newParentRef)); - } else { - // @ts-ignore: stub - __gc_retain(changetype(ref), changetype(newParentRef)); - // @ts-ignore: stub - __gc_release(changetype(ref), changetype(oldParentRef)); - } - } -} - /** * Discards a runtime object that has not been registed and turned out to be unnecessary. * Essentially undoes the forgoing ALLOCATE. Should be avoided where possible. @@ -274,12 +177,18 @@ function doMove(ref: usize, oldParentRef: usize, newParentRef: usize): void { // @ts-ignore: decorator @unsafe @inline export function DISCARD(ref: usize): void { - doDiscard(ref); + discard(ref); } -function doDiscard(ref: usize): void { - if (!ASC_NO_ASSERT) assertUnregistered(ref); - memory.free(changetype(ref - HEADER_SIZE)); +function discard(ref: usize): void { + if (!ASC_NO_ASSERT) { + assert(ref > HEAP_BASE); // must be a heap object + let header = changetype
(ref - HEADER_SIZE); + assert(header.classId == HEADER_MAGIC); + memory.free(changetype(header)); + } else { + memory.free(changetype(ref - HEADER_SIZE)); + } } /** @@ -289,14 +198,14 @@ function doDiscard(ref: usize): void { */ // @ts-ignore: decorator @unsafe @inline -export function MAKEARRAY(capacity: i32, source: usize = 0): Array { - return changetype>(doMakeArray(capacity, source, CLASSID(), alignof())); +export function MAKEARRAY(capacity: i32, source: usize = 0): Array { + return changetype>(makeArray(capacity, source, CLASSID(), alignof())); } -function doMakeArray(capacity: i32, source: usize, classId: u32, alignLog2: usize): usize { - var array = doRegister(doAllocate(offsetof()), classId); +function makeArray(capacity: i32, source: usize, classId: u32, alignLog2: usize): usize { + var array = register(allocate(offsetof()), classId); var bufferSize = capacity << alignLog2; - var buffer = doRegister(doAllocate(capacity << alignLog2), CLASSID()); + var buffer = register(allocate(capacity << alignLog2), CLASSID()); changetype(array).data = changetype(buffer); // links changetype(array).dataStart = buffer; changetype(array).dataLength = bufferSize; @@ -305,22 +214,6 @@ function doMakeArray(capacity: i32, source: usize, classId: u32, alignLog2: usiz return array; } -// Helpers - -/** Asserts that a managed object is still unregistered. */ -// @ts-ignore: decorator -function assertUnregistered(ref: usize): void { - assert(ref > HEAP_BASE); // must be a heap object - assert(changetype
(ref - HEADER_SIZE).classId == HEADER_MAGIC); -} - -/** Asserts that a managed object has already been registered. */ -// @ts-ignore: decorator -function assertRegistered(ref: usize): void { - assert(ref !== null); // may be a static string or buffer (not a heap object) - assert(changetype
(ref - HEADER_SIZE).classId != HEADER_MAGIC); -} - import { ArrayBuffer } from "./arraybuffer"; import { E_INVALIDLENGTH } from "./util/error"; @@ -332,14 +225,17 @@ export const MAX_BYTELENGTH: i32 = MAX_SIZE_32 - HEADER_SIZE; /** Hard wired ArrayBufferView interface. */ export abstract class ArrayBufferView { + /** Backing buffer. */ // @ts-ignore: decorator @unsafe data: ArrayBuffer; + /** Data start offset in memory. */ // @ts-ignore: decorator @unsafe dataStart: usize; + /** Data length in memory, counted from `dataStart`. */ // @ts-ignore: decorator @unsafe dataLength: u32; diff --git a/std/assembly/set.ts b/std/assembly/set.ts index fd0b006d7d..5820094fb1 100644 --- a/std/assembly/set.ts +++ b/std/assembly/set.ts @@ -1,4 +1,5 @@ -import { RETAIN, RELEASE } from "./runtime"; +/// + import { HASH } from "./util/hash"; // A deterministic hash set based on CloseTable from https://github.com/jorendorff/dht @@ -105,11 +106,22 @@ export class Set { } // append new entry let entries = this.entries; - entry = changetype>( - changetype(entries) + this.entriesOffset++ * ENTRY_SIZE() - ); + entry = changetype>(changetype(entries) + this.entriesOffset++ * ENTRY_SIZE()); + entry.key = key; // link with the set - entry.key = isManaged() ? RETAIN(key, this) : key; + if (isManaged()) { + if (isNullable()) { + if (key !== null) { + if (isDefined(__ref_link)) __ref_link(changetype(key), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(key)); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_link(changetype(key), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(key)); + else assert(false); + } + } ++this.entriesCount; // link with previous entry in bucket let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE; @@ -121,7 +133,20 @@ export class Set { delete(key: K): bool { var entry = this.find(key, HASH(key)); if (!entry) return false; - if (isManaged()) RELEASE(entry.key, this); + if (isManaged()) { + key = entry.key; // exact, e.g. string + if (isNullable()) { + if (key !== null) { + if (isDefined(__ref_link)) __ref_unlink(changetype(key), changetype(this)); + else if (isDefined(__ref_retain)) __ref_release(changetype(key)); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_unlink(changetype(key), changetype(this)); + else if (isDefined(__ref_retain)) __ref_release(changetype(key)); + else assert(false); + } + } entry.taggedNext |= EMPTY; --this.entriesCount; // check if rehashing is appropriate diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 5b7550289f..cdf4e4c9d2 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -1,4 +1,6 @@ -import { ALLOCATE, REGISTER, HEADER, HEADER_SIZE, RETAIN, MAKEARRAY, ArrayBufferView } from "./runtime"; +/// + +import { ALLOCATE, REGISTER, HEADER, HEADER_SIZE, MAKEARRAY, ArrayBufferView } from "./runtime"; import { MAX_SIZE_32 } from "./util/allocator"; import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./util/string"; import { E_INVALIDLENGTH } from "./util/error"; @@ -82,7 +84,7 @@ import { E_INVALIDLENGTH } from "./util/error"; return !compareImpl(this, start, searchString, 0, searchLength); } - @operator("==") private static __eq(left: String, right: String): bool { + @operator("==") private static __eq(left: String | null, right: String | null): bool { if (left === right) return true; if (left === null || right === null) return false; var leftLength = left.length; @@ -91,11 +93,11 @@ import { E_INVALIDLENGTH } from "./util/error"; return !compareImpl(left, 0, right, 0, leftLength); } - @operator("!=") private static __ne(left: String, right: String): bool { + @operator("!=") private static __ne(left: String | null, right: String | null): bool { return !this.__eq(left, right); } - @operator(">") private static __gt(left: String, right: String): bool { + @operator(">") private static __gt(left: String | null, right: String | null): bool { if (left === right || left === null || right === null) return false; var leftLength = left.length; var rightLength = right.length; @@ -359,16 +361,13 @@ import { E_INVALIDLENGTH } from "./util/error"; let resultStart = changetype(result).dataStart; for (let i: isize = 0; i < length; ++i) { let charStr = REGISTER(ALLOCATE(2)); - store( - changetype(charStr), - load(changetype(this) + (i << 1)) - ); - // result[i] = charStr - store(resultStart + (i << alignof()), - isManaged() - ? RETAIN>(charStr, result) - : charStr - ); + store(changetype(charStr), load(changetype(this) + (i << 1))); + store(resultStart + (i << alignof()), charStr); // result[i] = charStr + if (isManaged()) { + if (isDefined(__ref_link)) __ref_link(changetype(charStr), changetype(result)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(charStr)); + else assert(false); + } } return result; } else if (!length) { diff --git a/tests/binaryen/break-value.js b/tests/binaryen/break-value.js new file mode 100644 index 0000000000..dc280ddd90 --- /dev/null +++ b/tests/binaryen/break-value.js @@ -0,0 +1,24 @@ +var binaryen = require("binaryen"); + +var mod = new binaryen.Module(); +var ftype = mod.addFunctionType("ii", binaryen.i32, [ binaryen.i32 ]); +mod.addFunction("test", ftype, [], + mod.block("label", [ + mod.drop( // "br_if returns the value too" + mod.break("label", + // condition: $0 == 1 + mod.i32.eq( + mod.getLocal(0, binaryen.i32), + mod.i32.const(1) + ), + // value: 1 + mod.i32.const(1) + ) + ), + // push: 0 + mod.i32.const(0) + ], binaryen.i32) +); +console.log(mod.emitText()); + +mod.validate(); diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 1e564d3568..5cb4052656 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -2,7 +2,6 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -78,7 +77,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -99,51 +98,47 @@ i32.const 8 i32.add ) - (func $~lib/runtime/assertUnregistered (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 i32.const 84 i32.le_u if i32.const 0 i32.const 16 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 i32.const 8 i32.sub + local.tee $2 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 16 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 8 - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $call-super/A#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/A#constructor (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 end local.get $0 @@ -163,12 +158,12 @@ end local.get $0 ) - (func $call-super/B#constructor (; 6 ;) (type $FUNCSIG$i) (result i32) + (func $call-super/B#constructor (; 5 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register call $call-super/A#constructor local.tee $0 i32.const 2 @@ -199,7 +194,7 @@ end local.get $0 ) - (func $call-super/test1 (; 7 ;) (type $FUNCSIG$v) + (func $call-super/test1 (; 6 ;) (type $FUNCSIG$v) (local $0 i32) call $call-super/B#constructor local.tee $0 @@ -227,19 +222,19 @@ unreachable end ) - (func $call-super/D#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) + (func $call-super/D#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 5 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.eqz if i32.const 4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 end local.get $0 @@ -274,7 +269,7 @@ end local.get $0 ) - (func $call-super/test2 (; 9 ;) (type $FUNCSIG$v) + (func $call-super/test2 (; 8 ;) (type $FUNCSIG$v) (local $0 i32) call $call-super/D#constructor local.tee $0 @@ -302,14 +297,14 @@ unreachable end ) - (func $call-super/E#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/E#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 6 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 end local.get $0 @@ -329,12 +324,12 @@ end local.get $0 ) - (func $call-super/test3 (; 11 ;) (type $FUNCSIG$v) + (func $call-super/test3 (; 10 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 7 - call $~lib/runtime/doRegister + call $~lib/runtime/register call $call-super/E#constructor local.tee $0 i32.const 2 @@ -364,19 +359,19 @@ unreachable end ) - (func $call-super/H#constructor (; 12 ;) (type $FUNCSIG$i) (result i32) + (func $call-super/H#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 9 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.eqz if i32.const 4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 8 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 end local.get $0 @@ -387,7 +382,7 @@ i32.store offset=4 local.get $0 ) - (func $call-super/test4 (; 13 ;) (type $FUNCSIG$v) + (func $call-super/test4 (; 12 ;) (type $FUNCSIG$v) (local $0 i32) block (result i32) call $call-super/H#constructor @@ -417,19 +412,19 @@ unreachable end ) - (func $call-super/J#constructor (; 14 ;) (type $FUNCSIG$i) (result i32) + (func $call-super/J#constructor (; 13 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 11 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.eqz if i32.const 4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 10 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 end local.get $0 @@ -440,7 +435,7 @@ i32.store offset=4 local.get $0 ) - (func $call-super/test5 (; 15 ;) (type $FUNCSIG$v) + (func $call-super/test5 (; 14 ;) (type $FUNCSIG$v) (local $0 i32) block (result i32) call $call-super/J#constructor @@ -470,7 +465,7 @@ unreachable end ) - (func $start (; 16 ;) (type $FUNCSIG$v) + (func $start (; 15 ;) (type $FUNCSIG$v) i32.const 88 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset @@ -481,7 +476,7 @@ call $call-super/test4 call $call-super/test5 ) - (func $null (; 17 ;) (type $FUNCSIG$v) + (func $null (; 16 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index c711af9bd3..2f4427b6f4 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -2,7 +2,6 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -10,7 +9,6 @@ (data (i32.const 48) "\02\00\00\00\1a\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -117,7 +115,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -133,7 +131,8 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -141,14 +140,16 @@ if i32.const 0 i32.const 16 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq @@ -156,23 +157,17 @@ if i32.const 0 i32.const 16 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $call-super/A#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/A#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -183,12 +178,12 @@ i32.const 4 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -211,7 +206,7 @@ end local.get $0 ) - (func $call-super/B#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/B#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 if (result i32) @@ -221,12 +216,12 @@ i32.const 8 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register end call $call-super/A#constructor local.set $0 @@ -261,7 +256,7 @@ end local.get $0 ) - (func $call-super/test1 (; 8 ;) (type $FUNCSIG$v) + (func $call-super/test1 (; 7 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/B#constructor @@ -293,7 +288,7 @@ unreachable end ) - (func $call-super/C#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/C#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -303,12 +298,12 @@ i32.const 4 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -317,7 +312,7 @@ i32.store local.get $0 ) - (func $call-super/D#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/D#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 if (result i32) @@ -327,12 +322,12 @@ i32.const 8 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 5 - call $~lib/runtime/doRegister + call $~lib/runtime/register end call $call-super/C#constructor local.set $0 @@ -367,7 +362,7 @@ end local.get $0 ) - (func $call-super/test2 (; 11 ;) (type $FUNCSIG$v) + (func $call-super/test2 (; 10 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/D#constructor @@ -399,7 +394,7 @@ unreachable end ) - (func $call-super/E#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/E#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -410,12 +405,12 @@ i32.const 4 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 6 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -438,7 +433,7 @@ end local.get $0 ) - (func $call-super/F#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/F#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -448,12 +443,12 @@ i32.const 8 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 7 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -465,7 +460,7 @@ i32.store offset=4 local.get $0 ) - (func $call-super/test3 (; 14 ;) (type $FUNCSIG$v) + (func $call-super/test3 (; 13 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/F#constructor @@ -497,7 +492,7 @@ unreachable end ) - (func $call-super/G#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/G#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -507,12 +502,12 @@ i32.const 4 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 8 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -521,7 +516,7 @@ i32.store local.get $0 ) - (func $call-super/H#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/H#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -531,12 +526,12 @@ i32.const 8 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 9 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -548,7 +543,7 @@ i32.store offset=4 local.get $0 ) - (func $call-super/test4 (; 17 ;) (type $FUNCSIG$v) + (func $call-super/test4 (; 16 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/H#constructor @@ -580,7 +575,7 @@ unreachable end ) - (func $call-super/I#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/I#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -590,12 +585,12 @@ i32.const 4 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 10 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -604,7 +599,7 @@ i32.store local.get $0 ) - (func $call-super/J#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/J#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -614,12 +609,12 @@ i32.const 8 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 11 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -631,7 +626,7 @@ i32.store offset=4 local.get $0 ) - (func $call-super/test5 (; 20 ;) (type $FUNCSIG$v) + (func $call-super/test5 (; 19 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/J#constructor @@ -663,7 +658,7 @@ unreachable end ) - (func $start:call-super (; 21 ;) (type $FUNCSIG$v) + (func $start:call-super (; 20 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -680,9 +675,9 @@ call $call-super/test4 call $call-super/test5 ) - (func $start (; 22 ;) (type $FUNCSIG$v) + (func $start (; 21 ;) (type $FUNCSIG$v) call $start:call-super ) - (func $null (; 23 ;) (type $FUNCSIG$v) + (func $null (; 22 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/comma.optimized.wat b/tests/compiler/comma.optimized.wat index c7af0887b3..a0cd1da7b4 100644 --- a/tests/compiler/comma.optimized.wat +++ b/tests/compiler/comma.optimized.wat @@ -71,7 +71,7 @@ end i32.const 0 global.set $comma/b - global.get $comma/b + i32.const 0 global.set $comma/a global.get $comma/a i32.const 1 @@ -107,8 +107,9 @@ i32.add global.set $comma/a global.get $comma/a + local.tee $0 global.set $comma/b - global.get $comma/b + local.get $0 global.set $comma/a global.get $comma/a i32.const 2 diff --git a/tests/compiler/comma.untouched.wat b/tests/compiler/comma.untouched.wat index 21671a4254..b454fae08d 100644 --- a/tests/compiler/comma.untouched.wat +++ b/tests/compiler/comma.untouched.wat @@ -86,8 +86,9 @@ end block (result i32) i32.const 0 + local.tee $0 global.set $comma/b - global.get $comma/b + local.get $0 end global.set $comma/a block (result i32) @@ -129,8 +130,9 @@ global.set $comma/a block (result i32) global.get $comma/a + local.tee $0 global.set $comma/b - global.get $comma/b + local.get $0 end end global.set $comma/a diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index 496d7c4dc3..ff0bacf768 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -1,7 +1,6 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) @@ -88,7 +87,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -109,52 +108,48 @@ i32.const 8 i32.add ) - (func $~lib/runtime/assertUnregistered (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 i32.const 48 i32.le_u if i32.const 0 i32.const 16 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 i32.const 8 i32.sub + local.tee $2 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 16 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 8 - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $constructor/CtorConditionallyAllocates#constructor (; 5 ;) (type $FUNCSIG$i) (result i32) + (func $constructor/CtorConditionallyAllocates#constructor (; 4 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) block (result i32) global.get $constructor/b if i32.const 0 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 10 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 end local.get $0 @@ -162,60 +157,60 @@ end if i32.const 0 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 10 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 end local.get $0 ) - (func $start:constructor (; 6 ;) (type $FUNCSIG$v) + (func $start:constructor (; 5 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 48 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 0 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register global.set $constructor/emptyCtor i32.const 4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 1 i32.store local.get $0 global.set $constructor/emptyCtorWithFieldInit i32.const 4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store local.get $0 global.set $constructor/emptyCtorWithFieldNoInit i32.const 0 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 5 - call $~lib/runtime/doRegister + call $~lib/runtime/register global.set $constructor/none i32.const 4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 6 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 1 i32.store local.get $0 global.set $constructor/justFieldInit i32.const 4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 7 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -232,23 +227,23 @@ br $__inlined_func$constructor/CtorConditionallyReturns#constructor end i32.const 0 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 8 - call $~lib/runtime/doRegister + call $~lib/runtime/register end global.set $constructor/ctorConditionallyReturns i32.const 0 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 9 - call $~lib/runtime/doRegister + call $~lib/runtime/register global.set $constructor/ctorAllocates call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates ) - (func $start (; 7 ;) (type $FUNCSIG$v) + (func $start (; 6 ;) (type $FUNCSIG$v) call $start:constructor ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 7 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index 9e469b6b0a..474bf55900 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -1,7 +1,6 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -9,7 +8,6 @@ (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -127,7 +125,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -143,7 +141,8 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -151,14 +150,16 @@ if i32.const 0 i32.const 16 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq @@ -166,23 +167,17 @@ if i32.const 0 i32.const 16 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $constructor/EmptyCtor#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtor#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -192,18 +187,18 @@ i32.const 0 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end local.get $0 ) - (func $constructor/EmptyCtorWithFieldInit#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtorWithFieldInit#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -213,12 +208,12 @@ i32.const 4 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -227,7 +222,7 @@ i32.store local.get $0 ) - (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -237,12 +232,12 @@ i32.const 4 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -251,7 +246,7 @@ i32.store local.get $0 ) - (func $constructor/None#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/None#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -261,18 +256,18 @@ i32.const 0 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 5 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end local.get $0 ) - (func $constructor/JustFieldInit#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/JustFieldInit#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -282,12 +277,12 @@ i32.const 4 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 6 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -296,7 +291,7 @@ i32.store local.get $0 ) - (func $constructor/JustFieldNoInit#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/JustFieldNoInit#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -306,12 +301,12 @@ i32.const 4 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 7 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -320,11 +315,11 @@ i32.store local.get $0 ) - (func $constructor/CtorReturns#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorReturns#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 call $~lib/memory/memory.allocate ) - (func $constructor/CtorConditionallyReturns#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorConditionallyReturns#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) global.get $constructor/b if @@ -340,18 +335,18 @@ i32.const 0 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 8 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end local.get $0 ) - (func $constructor/CtorAllocates#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorAllocates#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -362,12 +357,12 @@ i32.const 0 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 9 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -376,7 +371,7 @@ drop local.get $0 ) - (func $constructor/CtorConditionallyAllocates#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorConditionallyAllocates#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) global.get $constructor/b if @@ -389,12 +384,12 @@ i32.const 0 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 10 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -410,18 +405,18 @@ i32.const 0 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 10 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end local.get $0 ) - (func $start:constructor (; 16 ;) (type $FUNCSIG$v) + (func $start:constructor (; 15 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -463,9 +458,9 @@ call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates ) - (func $start (; 17 ;) (type $FUNCSIG$v) + (func $start (; 16 ;) (type $FUNCSIG$v) call $start:constructor ) - (func $null (; 18 ;) (type $FUNCSIG$v) + (func $null (; 17 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index 3211901148..59a6bda002 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -2,9 +2,9 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -124,86 +124,61 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.const 48 i32.le_u if i32.const 0 i32.const 16 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 i32.const 8 i32.sub + local.tee $1 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 16 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $exports/Car#constructor (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 16 - call $~lib/memory/memory.allocate - local.tee $0 - i32.const -1520547049 - i32.store - local.get $0 - i32.const 4 - i32.store offset=4 - local.get $0 - i32.const 8 - i32.add - local.tee $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 8 - i32.sub - i32.const 1 - i32.store - end - local.get $0 - local.get $1 - i32.store - local.get $0 local.get $1 + i32.const 1 i32.store local.get $0 ) - (func $exports/Car#get:numDoors (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $exports/Car#get:numDoors (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/Car#set:numDoors (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $exports/Car#set:numDoors (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#openDoors (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $exports/Car#openDoors (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $start (; 10 ;) (type $FUNCSIG$v) + (func $start (; 9 ;) (type $FUNCSIG$v) i32.const 48 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 11 ;) (type $FUNCSIG$v) + (func $null (; 10 ;) (type $FUNCSIG$v) nop ) - (func $exports/subOpt|trampoline (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt|trampoline (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -221,11 +196,11 @@ local.get $1 i32.sub ) - (func $~lib/setargc (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) - (func $exports/Car#constructor|trampoline (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor|trampoline (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -237,10 +212,29 @@ i32.const 2 local.set $1 end - block (result i32) + local.get $0 + i32.eqz + if + i32.const 16 + call $~lib/memory/memory.allocate + local.tee $0 + i32.const -1520547049 + i32.store local.get $0 - local.get $1 - call $exports/Car#constructor + i32.const 4 + i32.store offset=4 + local.get $0 + i32.const 8 + i32.add + call $~lib/runtime/register + local.set $0 end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store + local.get $0 ) ) diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index b95764606b..7582116c81 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -2,9 +2,9 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -18,7 +18,6 @@ (global $exports/Car.TIRES i32 (i32.const 4)) (global $exports/vehicles.Car.TIRES i32 (i32.const 4)) (global $exports/outer.inner.a i32 (i32.const 42)) - (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/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -169,7 +168,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -185,7 +184,8 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/assertUnregistered (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -193,14 +193,16 @@ if i32.const 0 i32.const 16 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq @@ -208,23 +210,17 @@ if i32.const 0 i32.const 16 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $exports/Car#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block (result i32) local.get $0 @@ -235,12 +231,12 @@ i32.const 4 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -253,22 +249,22 @@ i32.store local.get $0 ) - (func $exports/Car#get:numDoors (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $exports/Car#get:numDoors (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/Car#set:numDoors (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $exports/Car#set:numDoors (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#openDoors (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $exports/Car#openDoors (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $exports/vehicles.Car.getNumTires (; 14 ;) (type $FUNCSIG$i) (result i32) + (func $exports/vehicles.Car.getNumTires (; 13 ;) (type $FUNCSIG$i) (result i32) global.get $exports/vehicles.Car.TIRES ) - (func $exports/vehicles.Car#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/vehicles.Car#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block (result i32) local.get $0 @@ -279,12 +275,12 @@ i32.const 4 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -297,19 +293,19 @@ i32.store local.get $0 ) - (func $exports/vehicles.Car#get:numDoors (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $exports/vehicles.Car#get:numDoors (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/vehicles.Car#set:numDoors (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $exports/vehicles.Car#set:numDoors (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/vehicles.Car#openDoors (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $exports/vehicles.Car#openDoors (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $start (; 19 ;) (type $FUNCSIG$v) + (func $start (; 18 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -321,9 +317,9 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 20 ;) (type $FUNCSIG$v) + (func $null (; 19 ;) (type $FUNCSIG$v) ) - (func $exports/subOpt|trampoline (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt|trampoline (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -341,20 +337,20 @@ local.get $1 call $exports/subOpt ) - (func $~lib/setargc (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) - (func $Car#get:doors (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $Car#get:doors (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $Car#set:doors (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $Car#set:doors (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#constructor|trampoline (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor|trampoline (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -370,16 +366,16 @@ local.get $1 call $exports/Car#constructor ) - (func $vehicles.Car#get:doors (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $vehicles.Car#get:doors (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $vehicles.Car#set:doors (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $vehicles.Car#set:doors (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/vehicles.Car#constructor|trampoline (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/vehicles.Car#constructor|trampoline (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index a7bed008ab..82032018fa 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -91,8 +91,9 @@ global.get $for/i i32.const 1 i32.sub + local.tee $0 global.set $for/i - global.get $for/i + local.get $0 br_if $repeat|4 end i32.const 0 diff --git a/tests/compiler/for.untouched.wat b/tests/compiler/for.untouched.wat index 45e07de2e3..222039d806 100644 --- a/tests/compiler/for.untouched.wat +++ b/tests/compiler/for.untouched.wat @@ -124,8 +124,9 @@ global.get $for/i i32.const 1 i32.sub + local.tee $1 global.set $for/i - global.get $for/i + local.get $1 end i32.const 0 i32.eq @@ -139,26 +140,26 @@ end block $break|5 i32.const 0 - local.set $1 + local.set $2 loop $repeat|5 block $continue|5 - local.get $1 + local.get $2 i32.const 10 i32.lt_s i32.eqz br_if $break|5 br $continue|5 end - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $repeat|5 unreachable end unreachable end - local.get $1 + local.get $2 i32.const 10 i32.eq i32.eqz @@ -172,9 +173,9 @@ end block $break|6 i32.const 0 - local.set $2 + local.set $1 loop $repeat|6 - local.get $2 + local.get $1 i32.const 10 i32.lt_s i32.eqz @@ -189,7 +190,7 @@ i32.lt_s i32.eqz br_if $break|7 - local.get $2 + local.get $1 local.get $3 i32.eq if @@ -205,10 +206,10 @@ end unreachable end - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $repeat|6 unreachable end diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 1ac3e8f315..29a6fcb3b2 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -1,7 +1,6 @@ (module (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -78,34 +77,43 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/assertUnregistered (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.const 48 i32.le_u if i32.const 0 i32.const 16 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 i32.const 8 i32.sub + local.tee $1 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 16 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end + local.get $1 + i32.const 1 + i32.store + local.get $0 + ) + (func $getter-call/C#get:x~anonymous|0 (; 3 ;) (type $FUNCSIG$i) (result i32) + i32.const 42 ) - (func $getter-call/C#constructor (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $getter-call/test (; 4 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 call $~lib/memory/memory.allocate @@ -118,35 +126,20 @@ local.get $0 i32.const 8 i32.add - local.tee $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 8 - i32.sub - i32.const 1 - i32.store - local.get $0 - ) - (func $getter-call/C#get:x~anonymous|0 (; 4 ;) (type $FUNCSIG$i) (result i32) - i32.const 42 - ) - (func $getter-call/test (; 5 ;) (type $FUNCSIG$i) (result i32) - block (result i32) - call $getter-call/C#constructor - end + call $~lib/runtime/register drop i32.const 0 global.set $~lib/argc i32.const 1 call_indirect (type $FUNCSIG$i) ) - (func $start (; 6 ;) (type $FUNCSIG$v) + (func $start (; 5 ;) (type $FUNCSIG$v) i32.const 48 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 7 ;) (type $FUNCSIG$v) + (func $null (; 6 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index 801c6ebfec..5eb46ec011 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -2,7 +2,6 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -10,7 +9,6 @@ (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 2 funcref) (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|0) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -119,7 +117,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -135,7 +133,8 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -143,14 +142,16 @@ if i32.const 0 i32.const 16 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq @@ -158,23 +159,17 @@ if i32.const 0 i32.const 16 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $getter-call/C#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $getter-call/C#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -184,24 +179,24 @@ i32.const 0 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end local.get $0 ) - (func $getter-call/C#get:x~anonymous|0 (; 7 ;) (type $FUNCSIG$i) (result i32) + (func $getter-call/C#get:x~anonymous|0 (; 6 ;) (type $FUNCSIG$i) (result i32) i32.const 42 ) - (func $getter-call/C#get:x (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $getter-call/C#get:x (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 ) - (func $getter-call/test (; 9 ;) (type $FUNCSIG$i) (result i32) + (func $getter-call/test (; 8 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 0 call $getter-call/C#constructor @@ -212,7 +207,7 @@ call $getter-call/C#get:x call_indirect (type $FUNCSIG$i) ) - (func $start (; 10 ;) (type $FUNCSIG$v) + (func $start (; 9 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -224,6 +219,6 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 11 ;) (type $FUNCSIG$v) + (func $null (; 10 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index b443fc1c95..7af4956e2b 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -4,7 +4,6 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\16\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s") @@ -103,7 +102,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/doAllocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -124,56 +123,52 @@ i32.const 8 i32.add ) - (func $~lib/runtime/assertUnregistered (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 i32.const 80 i32.le_u if i32.const 0 i32.const 48 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 i32.const 8 i32.sub + local.tee $2 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 48 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 8 - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $inlining/test_ctor (; 8 ;) (type $FUNCSIG$v) + (func $inlining/test_ctor (; 7 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 16 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.eqz if i32.const 8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 end local.get $0 @@ -243,7 +238,7 @@ unreachable end ) - (func $start (; 9 ;) (type $FUNCSIG$v) + (func $start (; 8 ;) (type $FUNCSIG$v) call $inlining/test_funcs i32.const 80 global.set $~lib/allocator/arena/startOffset @@ -251,7 +246,7 @@ global.set $~lib/allocator/arena/offset call $inlining/test_ctor ) - (func $null (; 10 ;) (type $FUNCSIG$v) + (func $null (; 9 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index b31601b244..3037ca0b80 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -4,7 +4,6 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\16\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s\00") @@ -13,7 +12,6 @@ (elem (i32.const 0) $null $inlining/func_fe~anonymous|0) (global $inlining/constantGlobal i32 (i32.const 1)) (global $~lib/argc (mut 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_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -383,7 +381,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -399,7 +397,8 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/assertUnregistered (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -407,14 +406,16 @@ if i32.const 0 i32.const 48 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq @@ -422,23 +423,17 @@ if i32.const 0 i32.const 48 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $inlining/test_ctor (; 9 ;) (type $FUNCSIG$v) + (func $inlining/test_ctor (; 8 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -459,12 +454,12 @@ i32.const 16 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $3 i32.const 2 @@ -478,12 +473,12 @@ i32.const 8 local.set $4 local.get $4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $4 local.get $4 i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $3 end @@ -565,7 +560,7 @@ unreachable end ) - (func $start:inlining (; 10 ;) (type $FUNCSIG$v) + (func $start:inlining (; 9 ;) (type $FUNCSIG$v) call $inlining/test i32.const 3 i32.eq @@ -591,9 +586,9 @@ global.set $~lib/allocator/arena/offset call $inlining/test_ctor ) - (func $start (; 11 ;) (type $FUNCSIG$v) + (func $start (; 10 ;) (type $FUNCSIG$v) call $start:inlining ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 11 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/new-without-allocator.untouched.wat b/tests/compiler/new-without-allocator.untouched.wat index affb6fe190..5652461f72 100644 --- a/tests/compiler/new-without-allocator.untouched.wat +++ b/tests/compiler/new-without-allocator.untouched.wat @@ -2,7 +2,6 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -10,7 +9,6 @@ (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) @@ -33,7 +31,7 @@ (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) unreachable ) - (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -49,7 +47,8 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -57,14 +56,16 @@ if i32.const 0 i32.const 16 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq @@ -72,23 +73,17 @@ if i32.const 0 i32.const 16 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $new-without-allocator/A#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $new-without-allocator/A#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -98,24 +93,24 @@ i32.const 0 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end local.get $0 ) - (func $new-without-allocator/test (; 7 ;) (type $FUNCSIG$i) (result i32) + (func $new-without-allocator/test (; 6 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 0 call $new-without-allocator/A#constructor local.set $0 i32.const 3 ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 7 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/nonNullAssertion.optimized.wat b/tests/compiler/nonNullAssertion.optimized.wat index ef911b7544..9184c2463c 100644 --- a/tests/compiler/nonNullAssertion.optimized.wat +++ b/tests/compiler/nonNullAssertion.optimized.wat @@ -58,7 +58,7 @@ if i32.const 0 i32.const 16 - i32.const 97 + i32.const 95 i32.const 45 call $~lib/env/abort unreachable @@ -72,7 +72,7 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/nonNullAssertion.untouched.wat b/tests/compiler/nonNullAssertion.untouched.wat index 9bf07bb867..68ba24f6d5 100644 --- a/tests/compiler/nonNullAssertion.untouched.wat +++ b/tests/compiler/nonNullAssertion.untouched.wat @@ -9,7 +9,6 @@ (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) (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)) @@ -60,7 +59,16 @@ unreachable end ) - (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $~lib/array/Array#__get (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -68,7 +76,7 @@ if i32.const 0 i32.const 16 - i32.const 97 + i32.const 95 i32.const 45 call $~lib/env/abort unreachable @@ -82,20 +90,16 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 98 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 + call $~lib/array/Array#__unchecked_get ) - (func $nonNullAssertion/testArr (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testArr (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 local.tee $1 @@ -107,7 +111,16 @@ i32.const 0 call $~lib/array/Array#__get ) - (func $~lib/array/Array#__get (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $~lib/array/Array#__get (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -117,20 +130,16 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 98 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 + call $~lib/array/Array#__unchecked_get ) - (func $nonNullAssertion/testElem (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testElem (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 0 @@ -142,7 +151,7 @@ unreachable end ) - (func $nonNullAssertion/testAll (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testAll (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 local.tee $1 @@ -167,7 +176,7 @@ unreachable end ) - (func $nonNullAssertion/testAll2 (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testAll2 (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 local.tee $1 @@ -192,13 +201,13 @@ unreachable end ) - (func $nonNullAssertion/testFn (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testFn (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testFn2 (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testFn2 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -214,7 +223,7 @@ local.get $2 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testRet (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testRet (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) i32.const 0 @@ -229,14 +238,14 @@ unreachable end ) - (func $nonNullAssertion/testObjFn (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testObjFn (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 i32.load offset=4 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testObjRet (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testObjRet (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) i32.const 0 @@ -252,6 +261,6 @@ unreachable end ) - (func $null (; 15 ;) (type $FUNCSIG$v) + (func $null (; 17 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index c6e1868b95..339d2c67f9 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -2,9 +2,9 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$iijijij (func (param i32 i64 i32 i64 i32 i64) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -164,7 +164,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -295,44 +295,40 @@ i32.store16 end ) - (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.const 1804 i32.le_u if i32.const 0 i32.const 464 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 i32.const 8 i32.sub + local.tee $1 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 464 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 8 - i32.sub + local.get $1 i32.const 1 i32.store local.get $0 ) - (func $~lib/util/number/itoa32 (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -359,7 +355,7 @@ local.tee $3 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $2 local.get $0 local.get $3 @@ -371,9 +367,9 @@ i32.store16 end local.get $2 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/util/string/compareImpl (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 @@ -406,7 +402,7 @@ end local.get $3 ) - (func $~lib/string/String.__eq (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -452,7 +448,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/number/genDigits (; 10 ;) (type $FUNCSIG$iijijij) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (; 9 ;) (type $FUNCSIG$iijijij) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) (local $7 i32) (local $8 i32) @@ -871,7 +867,7 @@ i32.store16 local.get $2 ) - (func $~lib/util/memory/memcpy (; 11 ;) (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 $4 i32) (local $5 i32) @@ -1768,7 +1764,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 12 ;) (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 $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1962,7 +1958,7 @@ end end ) - (func $~lib/util/number/prettify (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2224,7 +2220,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa_core (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) (local $3 i32) @@ -2232,10 +2228,9 @@ (local $5 i64) (local $6 i64) (local $7 i64) - (local $8 i32) - (local $9 f64) - (local $10 i32) - (local $11 i64) + (local $8 f64) + (local $9 i32) + (local $10 i64) i64.const -9223372036854774784 global.set $~lib/util/number/_frc_plus i64.const 9223372036854775296 @@ -2245,19 +2240,18 @@ i32.const 348 i32.const -61 global.get $~lib/util/number/_exp - local.tee $8 i32.sub f64.convert_i32_s f64.const 0.30102999566398114 f64.mul f64.const 347 f64.add - local.tee $9 + local.tee $8 i32.trunc_f64_s local.tee $3 local.get $3 f64.convert_i32_s - local.get $9 + local.get $8 f64.ne i32.add i32.const 3 @@ -2267,12 +2261,12 @@ local.tee $3 i32.const 3 i32.shl - local.tee $10 + local.tee $9 i32.sub global.set $~lib/util/number/_K i32.const 1348 i32.load - local.get $10 + local.get $9 i32.add i64.load global.set $~lib/util/number/_frc_pow @@ -2313,7 +2307,7 @@ i64.shr_u i64.add i64.add - local.set $11 + local.set $10 local.get $7 global.get $~lib/util/number/_frc_plus local.tee $4 @@ -2358,7 +2352,7 @@ local.set $2 local.get $0 local.get $0 - local.get $11 + local.get $10 global.get $~lib/util/number/_exp_pow local.tee $3 i32.const 2 @@ -2367,8 +2361,8 @@ i64.const 1 i64.sub local.tee $6 + global.get $~lib/util/number/_exp local.get $3 - local.get $8 i32.add i32.const -64 i32.sub @@ -2418,7 +2412,7 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2427,7 +2421,7 @@ if i32.const 0 i32.const 1648 - i32.const 187 + i32.const 189 i32.const 4 call $~lib/env/abort unreachable @@ -2505,7 +2499,7 @@ return end local.get $3 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $2 local.get $0 local.get $4 @@ -2513,7 +2507,34 @@ local.get $3 call $~lib/memory/memory.copy local.get $2 - call $~lib/runtime/doRegister + call $~lib/runtime/register + ) + (func $~lib/runtime/discard (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 1804 + i32.le_u + if + i32.const 0 + i32.const 464 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 8 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 464 + i32.const 187 + i32.const 4 + call $~lib/env/abort + unreachable + end ) (func $start:number (; 16 ;) (type $FUNCSIG$v) (local $0 i32) @@ -2536,7 +2557,7 @@ unreachable end i32.const 56 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $1 call $~lib/util/number/dtoa_core local.set $0 @@ -2545,7 +2566,7 @@ call $~lib/string/String#substring local.set $0 local.get $1 - call $~lib/runtime/assertUnregistered + call $~lib/runtime/discard local.get $0 i32.const 1696 call $~lib/string/String.__eq @@ -2600,8 +2621,9 @@ global.get $number/a i32.const 1 i32.add + local.tee $0 global.set $number/a - global.get $number/a + local.get $0 call $~lib/util/number/itoa32 i32.const 1760 call $~lib/string/String.__eq @@ -2617,8 +2639,9 @@ global.get $number/a i32.const 1 i32.sub + local.tee $0 global.set $number/a - global.get $number/a + local.get $0 call $~lib/util/number/itoa32 i32.const 504 call $~lib/string/String.__eq diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 63be6f3278..327dd38b78 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -2,13 +2,14 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) + (type $FUNCSIG$jii (func (param i32 i32) (result i64))) (type $FUNCSIG$iijijiji (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$if (func (param f32) (result i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -41,7 +42,6 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $number/a (mut i32) (i32.const 1)) - (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/ASC_SHRINK_LEVEL i32 (i32.const 0)) @@ -232,7 +232,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -391,7 +391,8 @@ i32.store16 end ) - (func $~lib/runtime/assertUnregistered (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -399,14 +400,16 @@ if i32.const 0 i32.const 464 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq @@ -414,23 +417,17 @@ if i32.const 0 i32.const 464 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $~lib/util/number/itoa32 (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -465,7 +462,7 @@ i32.shl local.set $3 local.get $3 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $4 block $~lib/util/number/utoa32_core|inlined.0 @@ -491,19 +488,19 @@ local.set $3 local.get $3 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/util/number/itoa (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/itoa32 return ) - (func $~lib/number/I32#toString (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/number/I32#toString (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/itoa ) - (func $~lib/string/String#get:length (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -511,7 +508,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 12 ;) (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 (; 11 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -564,7 +561,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -608,19 +605,37 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/builtins/isFinite (; 14 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 13 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 15 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 14 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/util/number/genDigits (; 16 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 15 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $~lib/array/Array#__unchecked_get (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + ) + (func $~lib/util/number/genDigits (; 17 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -1191,7 +1206,7 @@ end local.get $15 ) - (func $~lib/util/memory/memcpy (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2392,7 +2407,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2623,7 +2638,7 @@ end end ) - (func $~lib/util/number/prettify (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2956,7 +2971,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 20 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 21 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -3126,20 +3141,12 @@ i32.sub global.set $~lib/util/number/_K i32.const 1344 - i32.load offset=4 local.get $13 - i32.const 3 - i32.shl - i32.add - i64.load + call $~lib/array/Array#__unchecked_get global.set $~lib/util/number/_frc_pow i32.const 1552 - i32.load offset=4 local.get $13 - i32.const 1 - i32.shl - i32.add - i32.load16_s + call $~lib/array/Array#__unchecked_get global.set $~lib/util/number/_exp_pow end local.get $9 @@ -3402,7 +3409,7 @@ local.get $2 i32.add ) - (func $~lib/string/String#substring (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3418,7 +3425,7 @@ if i32.const 0 i32.const 1648 - i32.const 187 + i32.const 189 i32.const 4 call $~lib/env/abort unreachable @@ -3511,7 +3518,7 @@ local.get $3 local.set $4 local.get $4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $10 local.get $10 @@ -3525,23 +3532,49 @@ local.set $4 local.get $4 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/memory/memory.free (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 local.set $1 ) - (func $~lib/runtime/doDiscard (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/discard (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 - call $~lib/runtime/assertUnregistered + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 464 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable + end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $1 + local.get $1 + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 464 + i32.const 187 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 call $~lib/memory/memory.free ) - (func $~lib/util/number/dtoa (; 24 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 25 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3577,7 +3610,7 @@ i32.shl local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 @@ -3593,15 +3626,15 @@ local.get $2 local.set $1 local.get $1 - call $~lib/runtime/doDiscard + call $~lib/runtime/discard end local.get $4 ) - (func $~lib/number/F64#toString (; 25 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/number/F64#toString (; 26 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 call $~lib/util/number/dtoa ) - (func $~lib/number/Bool#toString (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/number/Bool#toString (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -3611,12 +3644,12 @@ i32.const 1792 end ) - (func $~lib/builtins/isNaN (; 27 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 28 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $~lib/number/F32.isSafeInteger (; 28 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/number/F32.isSafeInteger (; 29 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) (local $1 i32) local.get $0 f32.abs @@ -3632,14 +3665,14 @@ local.get $1 end ) - (func $~lib/builtins/isFinite (; 29 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isFinite (; 30 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.sub f32.const 0 f32.eq ) - (func $~lib/number/F32.isInteger (; 30 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/number/F32.isInteger (; 31 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) (local $1 i32) local.get $0 call $~lib/builtins/isFinite @@ -3653,7 +3686,7 @@ local.get $1 end ) - (func $~lib/number/F64.isSafeInteger (; 31 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/number/F64.isSafeInteger (; 32 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) local.get $0 f64.abs @@ -3669,7 +3702,7 @@ local.get $1 end ) - (func $~lib/number/F64.isInteger (; 32 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/number/F64.isInteger (; 33 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) local.get $0 call $~lib/builtins/isFinite @@ -3683,7 +3716,7 @@ local.get $1 end ) - (func $start:number (; 33 ;) (type $FUNCSIG$v) + (func $start:number (; 34 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/memory/HEAP_BASE i32.const 7 @@ -3764,8 +3797,9 @@ global.get $number/a i32.const 1 i32.add + local.tee $0 global.set $number/a - global.get $number/a + local.get $0 end call $~lib/number/I32#toString i32.const 1760 @@ -3783,8 +3817,9 @@ global.get $number/a i32.const 1 i32.sub + local.tee $0 global.set $number/a - global.get $number/a + local.get $0 end call $~lib/number/I32#toString i32.const 504 @@ -4417,9 +4452,9 @@ unreachable end ) - (func $start (; 34 ;) (type $FUNCSIG$v) + (func $start (; 35 ;) (type $FUNCSIG$v) call $start:number ) - (func $null (; 35 ;) (type $FUNCSIG$v) + (func $null (; 36 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index 4cfb97f250..ff4f0679d3 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -1,8 +1,8 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -78,7 +78,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -99,44 +99,40 @@ i32.const 8 i32.add ) - (func $~lib/runtime/assertUnregistered (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 i32.const 124 i32.le_u if i32.const 0 i32.const 48 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 i32.const 8 i32.sub + local.tee $2 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 48 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 8 - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $~lib/util/string/compareImpl (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/compareImpl (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 16 @@ -172,7 +168,7 @@ end local.get $3 ) - (func $~lib/string/String.__eq (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.__eq (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -215,7 +211,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $object-literal/bar (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $object-literal/bar (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 1 @@ -241,16 +237,16 @@ unreachable end ) - (func $start:object-literal (; 8 ;) (type $FUNCSIG$v) + (func $start:object-literal (; 7 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 128 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 1 i32.store @@ -260,9 +256,9 @@ local.get $0 call $object-literal/bar i32.const 4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 2 i32.store @@ -279,9 +275,9 @@ unreachable end i32.const 4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 3 i32.store @@ -298,10 +294,10 @@ unreachable end ) - (func $start (; 9 ;) (type $FUNCSIG$v) + (func $start (; 8 ;) (type $FUNCSIG$v) call $start:object-literal ) - (func $null (; 10 ;) (type $FUNCSIG$v) + (func $null (; 9 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index 04b5ce343a..6f45527778 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -1,8 +1,8 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -12,7 +12,6 @@ (data (i32.const 80) "\01\00\00\00\"\00\00\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -119,7 +118,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -135,7 +134,8 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -143,14 +143,16 @@ if i32.const 0 i32.const 48 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq @@ -158,23 +160,17 @@ if i32.const 0 i32.const 48 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $~lib/string/String#get:length (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -182,7 +178,7 @@ i32.const 1 i32.shr_u ) - (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) + (func $~lib/util/string/compareImpl (; 6 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -235,7 +231,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -279,7 +275,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $object-literal/bar (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $object-literal/bar (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 1 @@ -307,7 +303,7 @@ unreachable end ) - (func $object-literal/bar2 (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $object-literal/bar2 (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 2 @@ -322,7 +318,7 @@ unreachable end ) - (func $object-literal/Foo2#test (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $object-literal/Foo2#test (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 3 @@ -337,7 +333,7 @@ unreachable end ) - (func $start:object-literal (; 12 ;) (type $FUNCSIG$v) + (func $start:object-literal (; 11 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -358,12 +354,12 @@ i32.const 8 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 local.get $0 @@ -381,12 +377,12 @@ i32.const 4 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $1 local.get $1 @@ -401,12 +397,12 @@ i32.const 4 local.set $3 local.get $3 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $3 local.get $3 i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $2 local.get $2 @@ -416,9 +412,9 @@ end call $object-literal/Foo2#test ) - (func $start (; 13 ;) (type $FUNCSIG$v) + (func $start (; 12 ;) (type $FUNCSIG$v) call $start:object-literal ) - (func $null (; 14 ;) (type $FUNCSIG$v) + (func $null (; 13 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 14c0d23dbc..3b46416744 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -1,7 +1,6 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) @@ -79,7 +78,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 call $~lib/memory/memory.allocate @@ -93,58 +92,54 @@ i32.const 8 i32.add ) - (func $~lib/runtime/assertUnregistered (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 i32.const 48 i32.le_u if i32.const 0 i32.const 16 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 i32.const 8 i32.sub + local.tee $2 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 16 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 8 - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $start (; 5 ;) (type $FUNCSIG$v) + (func $start (; 4 ;) (type $FUNCSIG$v) i32.const 48 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register global.set $optional-typeparameters/tConcrete - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register global.set $optional-typeparameters/tDerived ) - (func $null (; 6 ;) (type $FUNCSIG$v) + (func $null (; 5 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index 7fb60b50a8..0ce99141c8 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -1,7 +1,6 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$didd (func (param i32 f64 f64) (result f64))) @@ -11,7 +10,6 @@ (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -126,7 +124,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -142,7 +140,8 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/assertUnregistered (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -150,14 +149,16 @@ if i32.const 0 i32.const 16 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq @@ -165,23 +166,17 @@ if i32.const 0 i32.const 16 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $optional-typeparameters/TestConcrete#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $optional-typeparameters/TestConcrete#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -191,23 +186,23 @@ i32.const 0 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end local.get $0 ) - (func $optional-typeparameters/TestConcrete#test (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $optional-typeparameters/TestConcrete#test (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 local.get $2 i32.add ) - (func $optional-typeparameters/TestDerived#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $optional-typeparameters/TestDerived#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -217,23 +212,23 @@ i32.const 0 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end local.get $0 ) - (func $optional-typeparameters/TestDerived#test (; 11 ;) (type $FUNCSIG$didd) (param $0 i32) (param $1 f64) (param $2 f64) (result f64) + (func $optional-typeparameters/TestDerived#test (; 10 ;) (type $FUNCSIG$didd) (param $0 i32) (param $1 f64) (param $2 f64) (result f64) local.get $1 local.get $2 f64.add ) - (func $start:optional-typeparameters (; 12 ;) (type $FUNCSIG$v) + (func $start:optional-typeparameters (; 11 ;) (type $FUNCSIG$v) i32.const 1 call $optional-typeparameters/testConcrete drop @@ -267,9 +262,9 @@ call $optional-typeparameters/TestDerived#test drop ) - (func $start (; 13 ;) (type $FUNCSIG$v) + (func $start (; 12 ;) (type $FUNCSIG$v) call $start:optional-typeparameters ) - (func $null (; 14 ;) (type $FUNCSIG$v) + (func $null (; 13 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 2b2dfbe020..31ebf409bd 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -27,7 +27,7 @@ if i32.const 0 i32.const 16 - i32.const 97 + i32.const 95 i32.const 45 call $~lib/env/abort unreachable @@ -41,7 +41,7 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable @@ -64,7 +64,7 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable @@ -142,7 +142,7 @@ if i32.const 0 i32.const 64 - i32.const 162 + i32.const 164 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index b70d96aab1..b9f2a08782 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -13,7 +13,6 @@ (data (i32.const 96) "\01\00\00\00\08\00\00\00n\00u\00l\00l\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/memory/HEAP_BASE i32 (i32.const 112)) @@ -24,7 +23,16 @@ (export "stringArrayMethodCall" (func $std/array-access/stringArrayMethodCall)) (export "stringArrayArrayPropertyAccess" (func $std/array-access/stringArrayArrayPropertyAccess)) (export "stringArrayArrayMethodCall" (func $std/array-access/stringArrayArrayMethodCall)) - (func $~lib/array/Array>#__get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__unchecked_get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $~lib/array/Array>#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -32,7 +40,7 @@ if i32.const 0 i32.const 16 - i32.const 97 + i32.const 95 i32.const 45 call $~lib/env/abort unreachable @@ -46,11 +54,16 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array>#__unchecked_get + ) + (func $~lib/array/Array#__unchecked_get (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -59,7 +72,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -69,27 +82,32 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 98 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 + call $~lib/array/Array#__unchecked_get ) - (func $std/array-access/i32ArrayArrayElementAccess (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-access/i32ArrayArrayElementAccess (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array>#__get i32.const 1 call $~lib/array/Array#__get ) - (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $~lib/array/Array#__get (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -97,7 +115,7 @@ if i32.const 0 i32.const 16 - i32.const 97 + i32.const 95 i32.const 45 call $~lib/env/abort unreachable @@ -111,20 +129,16 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 98 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 + call $~lib/array/Array#__unchecked_get ) - (func $~lib/string/String#get:length (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -132,13 +146,13 @@ i32.const 1 i32.shr_u ) - (func $std/array-access/stringArrayPropertyAccess (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-access/stringArrayPropertyAccess (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get call $~lib/string/String#get:length ) - (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) + (func $~lib/util/string/compareImpl (; 10 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -191,7 +205,7 @@ end local.get $5 ) - (func $~lib/string/String#startsWith (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#startsWith (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -205,7 +219,7 @@ if i32.const 0 i32.const 64 - i32.const 162 + i32.const 164 i32.const 4 call $~lib/env/abort unreachable @@ -258,7 +272,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array-access/stringArrayMethodCall (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-access/stringArrayMethodCall (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -266,7 +280,16 @@ i32.const 0 call $~lib/string/String#startsWith ) - (func $~lib/array/Array>#__get (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__unchecked_get (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $~lib/array/Array>#__get (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -274,7 +297,7 @@ if i32.const 0 i32.const 16 - i32.const 97 + i32.const 95 i32.const 45 call $~lib/env/abort unreachable @@ -288,20 +311,16 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 98 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 + call $~lib/array/Array>#__unchecked_get ) - (func $std/array-access/stringArrayArrayPropertyAccess (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-access/stringArrayArrayPropertyAccess (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array>#__get @@ -309,7 +328,7 @@ call $~lib/array/Array#__get call $~lib/string/String#get:length ) - (func $std/array-access/stringArrayArrayMethodCall (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-access/stringArrayArrayMethodCall (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array>#__get @@ -319,6 +338,6 @@ i32.const 0 call $~lib/string/String#startsWith ) - (func $null (; 13 ;) (type $FUNCSIG$v) + (func $null (; 17 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index c5076e0820..a38833e097 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -2,23 +2,30 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\03\00\00\00\00\01\02") - (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\03\00\00\00\03") - (data (i32.const 48) "\03\00\00\00(\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") - (data (i32.const 96) "\03\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 136) "\01\00\00\00\0c\00\00\00\00\00\00\00\01\00\00\00\02") - (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 184) "\01") - (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\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\03") + (data (i32.const 25) "\01\02") + (data (i32.const 32) "\02\00\00\00\10") + (data (i32.const 48) "\18\00\00\00\18\00\00\00\03\00\00\00\03") + (data (i32.const 64) "\03\00\00\00(") + (data (i32.const 80) "s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") + (data (i32.const 120) "\03\00\00\00\1a") + (data (i32.const 136) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 168) "\01\00\00\00\0c") + (data (i32.const 188) "\01\00\00\00\02") + (data (i32.const 200) "\04\00\00\00\10") + (data (i32.const 216) "\b8\00\00\00\b8\00\00\00\0c\00\00\00\03") + (data (i32.const 232) "\01") + (data (i32.const 248) "\04\00\00\00\10") + (data (i32.const 264) "\f8\00\00\00\f8") + (data (i32.const 280) "\03\00\00\00\1e") + (data (i32.const 296) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 200)) + (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 264)) (global $std/array-literal/i (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)) @@ -26,8 +33,10 @@ (global $std/array-literal/dynamicArrayI32 (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 $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/array/Array#__get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -36,15 +45,15 @@ i32.ge_u if i32.const 0 - i32.const 104 - i32.const 100 + i32.const 136 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable end - local.get $1 local.get $0 i32.load offset=4 + local.get $1 i32.add i32.load8_s ) @@ -57,8 +66,8 @@ i32.ge_u if i32.const 0 - i32.const 104 - i32.const 100 + i32.const 136 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable @@ -133,12 +142,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/doAllocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -151,183 +160,193 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 i32.add ) - (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - i32.const 256 + i32.const 328 i32.le_u if i32.const 0 - i32.const 224 - i32.const 313 - i32.const 2 + i32.const 296 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub + local.tee $2 i32.load i32.const -1520547049 i32.ne if i32.const 0 - i32.const 224 - i32.const 314 - i32.const 2 + i32.const 296 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 8 - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $~lib/runtime/doMakeArray (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/makeArray (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) i32.const 16 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.get $0 - call $~lib/runtime/doRegister - local.tee $0 + call $~lib/runtime/register + local.set $2 i32.const 3 local.get $1 i32.shl local.tee $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 1 - call $~lib/runtime/doRegister - local.tee $2 - i32.store + call $~lib/runtime/register + local.tee $3 + local.tee $0 + local.get $2 + i32.load + i32.ne + drop + local.get $2 local.get $0 + i32.store local.get $2 + local.get $3 i32.store offset=4 - local.get $0 + local.get $2 local.get $1 i32.store offset=8 - local.get $0 + local.get $2 i32.const 3 i32.store offset=12 - local.get $0 + local.get $2 ) - (func $std/array-literal/Ref#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) + (func $std/array-literal/Ref#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) i32.const 0 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 5 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $std/array-literal/RefWithCtor#constructor (; 9 ;) (type $FUNCSIG$i) (result i32) + (func $std/array-literal/RefWithCtor#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) i32.const 0 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 7 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $start:std/array-literal (; 10 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 9 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) - i32.const 44 + i32.const 60 i32.load i32.const 3 i32.ne if i32.const 0 - i32.const 56 - i32.const 4 + i32.const 80 + i32.const 5 i32.const 0 call $~lib/env/abort unreachable end - i32.const 32 + i32.const 48 i32.const 0 call $~lib/array/Array#__get if i32.const 0 - i32.const 56 - i32.const 5 + i32.const 80 + i32.const 6 i32.const 0 call $~lib/env/abort unreachable end - i32.const 32 + i32.const 48 i32.const 1 call $~lib/array/Array#__get i32.const 1 i32.ne if i32.const 0 - i32.const 56 - i32.const 6 + i32.const 80 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable end - i32.const 32 + i32.const 48 i32.const 2 call $~lib/array/Array#__get i32.const 2 i32.ne if i32.const 0 - i32.const 56 - i32.const 7 + i32.const 80 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable end - i32.const 180 + i32.const 228 i32.load i32.const 3 i32.ne if i32.const 0 - i32.const 56 - i32.const 10 + i32.const 80 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable end - i32.const 168 + i32.const 216 i32.const 0 call $~lib/array/Array#__get if i32.const 0 - i32.const 56 - i32.const 11 + i32.const 80 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable end - i32.const 168 + i32.const 216 i32.const 1 call $~lib/array/Array#__get i32.const 1 i32.ne if i32.const 0 - i32.const 56 - i32.const 12 + i32.const 80 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable end - i32.const 168 + i32.const 216 i32.const 2 call $~lib/array/Array#__get i32.const 2 i32.ne if i32.const 0 - i32.const 56 - i32.const 13 + i32.const 80 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -336,41 +355,42 @@ i32.load offset=12 if i32.const 0 - i32.const 56 - i32.const 16 + i32.const 80 + i32.const 17 i32.const 0 call $~lib/env/abort unreachable end - i32.const 256 + i32.const 328 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 2 i32.const 0 - call $~lib/runtime/doMakeArray - local.tee $0 - i32.load offset=4 + call $~lib/runtime/makeArray local.tee $1 - global.get $std/array-literal/i + i32.load offset=4 local.tee $2 + global.get $std/array-literal/i + local.tee $0 i32.store8 - local.get $2 + local.get $0 i32.const 1 i32.add + local.tee $0 global.set $std/array-literal/i - local.get $1 - global.get $std/array-literal/i - local.tee $2 - i32.store8 offset=1 local.get $2 + local.get $0 + i32.store8 offset=1 + global.get $std/array-literal/i i32.const 1 i32.add + local.tee $0 global.set $std/array-literal/i - local.get $1 - global.get $std/array-literal/i - i32.store8 offset=2 + local.get $2 local.get $0 + i32.store8 offset=2 + local.get $1 global.set $std/array-literal/dynamicArrayI8 global.get $std/array-literal/dynamicArrayI8 i32.load offset=12 @@ -378,8 +398,8 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 21 + i32.const 80 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -389,8 +409,8 @@ call $~lib/array/Array#__get if i32.const 0 - i32.const 56 - i32.const 22 + i32.const 80 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -402,8 +422,8 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 23 + i32.const 80 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -415,8 +435,8 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 24 + i32.const 80 + i32.const 25 i32.const 0 call $~lib/env/abort unreachable @@ -425,29 +445,30 @@ global.set $std/array-literal/i i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray - local.tee $1 + call $~lib/runtime/makeArray + local.tee $2 i32.load offset=4 - local.tee $0 + local.tee $1 global.get $std/array-literal/i - local.tee $2 + local.tee $0 i32.store - local.get $2 + local.get $0 i32.const 1 i32.add + local.tee $0 global.set $std/array-literal/i + local.get $1 local.get $0 - global.get $std/array-literal/i - local.tee $2 i32.store offset=4 - local.get $2 + global.get $std/array-literal/i i32.const 1 i32.add + local.tee $0 global.set $std/array-literal/i + local.get $1 local.get $0 - global.get $std/array-literal/i i32.store offset=8 - local.get $1 + local.get $2 global.set $std/array-literal/dynamicArrayI32 global.get $std/array-literal/dynamicArrayI32 i32.load offset=12 @@ -455,8 +476,8 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 29 + i32.const 80 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -466,8 +487,8 @@ call $~lib/array/Array#__get if i32.const 0 - i32.const 56 - i32.const 30 + i32.const 80 + i32.const 31 i32.const 0 call $~lib/env/abort unreachable @@ -479,8 +500,8 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 31 + i32.const 80 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -492,27 +513,27 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 32 + i32.const 80 + i32.const 33 i32.const 0 call $~lib/env/abort unreachable end i32.const 6 i32.const 2 - call $~lib/runtime/doMakeArray - local.tee $0 - i32.load offset=4 + call $~lib/runtime/makeArray local.tee $1 + i32.load offset=4 + local.tee $2 call $std/array-literal/Ref#constructor i32.store - local.get $1 + local.get $2 call $std/array-literal/Ref#constructor i32.store offset=4 - local.get $1 + local.get $2 call $std/array-literal/Ref#constructor i32.store offset=8 - local.get $0 + local.get $1 global.set $std/array-literal/dynamicArrayRef global.get $std/array-literal/dynamicArrayRef i32.load offset=12 @@ -520,27 +541,27 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 36 + i32.const 80 + i32.const 37 i32.const 0 call $~lib/env/abort unreachable end i32.const 8 i32.const 2 - call $~lib/runtime/doMakeArray - local.tee $1 + call $~lib/runtime/makeArray + local.tee $2 i32.load offset=4 - local.tee $0 + local.tee $1 call $std/array-literal/RefWithCtor#constructor i32.store - local.get $0 + local.get $1 call $std/array-literal/RefWithCtor#constructor i32.store offset=4 - local.get $0 + local.get $1 call $std/array-literal/RefWithCtor#constructor i32.store offset=8 - local.get $1 + local.get $2 global.set $std/array-literal/dynamicArrayRefWithCtor global.get $std/array-literal/dynamicArrayRefWithCtor i32.load offset=12 @@ -548,17 +569,17 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 40 + i32.const 80 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 11 ;) (type $FUNCSIG$v) + (func $start (; 10 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 11 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array-literal.ts b/tests/compiler/std/array-literal.ts index 1fdd31d51e..89371eb6c6 100644 --- a/tests/compiler/std/array-literal.ts +++ b/tests/compiler/std/array-literal.ts @@ -1,4 +1,5 @@ import "allocator/arena"; +import "collector/dummy"; const staticArrayI8: i8[] = [0, 1, 2]; assert(staticArrayI8.length == 3); diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 6f19a66ee7..5ff0a18282 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -4,27 +4,27 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\03\00\00\00\00\01\02") - (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\03\00\00\00\03\00\00\00") - (data (i32.const 48) "\03\00\00\00(\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") - (data (i32.const 96) "\03\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\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 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 184) "\01\00\00\00\00\00\00\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\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\01\02") + (data (i32.const 32) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\18\00\00\00\03\00\00\00\03\00\00\00") + (data (i32.const 64) "\03\00\00\00(\00\00\00\00\00\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 120) "\03\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 168) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 200) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\b8\00\00\00\b8\00\00\00\0c\00\00\00\03\00\00\00") + (data (i32.const 232) "\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 248) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\f8\00\00\00\f8\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 280) "\03\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $std/array-literal/staticArrayI8 i32 (i32.const 32)) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $std/array-literal/staticArrayI8 i32 (i32.const 48)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) - (global $std/array-literal/staticArrayI32 i32 (i32.const 168)) - (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 200)) + (global $std/array-literal/staticArrayI32 i32 (i32.const 216)) + (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 264)) (global $std/array-literal/i (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)) @@ -33,15 +33,26 @@ (global $std/array-literal/dynamicArrayI32 (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 $~lib/memory/HEAP_BASE i32 (i32.const 256)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 328)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/array/Array#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 0 + i32.shl + i32.add + i32.load8_s + ) + (func $~lib/array/Array#__get (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -50,25 +61,30 @@ i32.ge_u if i32.const 0 - i32.const 104 - i32.const 100 + i32.const 136 + i32.const 98 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 + call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#get:length (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $~lib/array/Array#__get (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -77,21 +93,17 @@ i32.ge_u if i32.const 0 - i32.const 104 - i32.const 100 + i32.const 136 + i32.const 98 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 + call $~lib/array/Array#__unchecked_get ) - (func $~lib/runtime/ADJUSTOBLOCK (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -103,7 +115,7 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -188,7 +200,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -201,49 +213,63 @@ local.get $0 i32.store offset=4 local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/assertUnregistered (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/register (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u i32.eqz if i32.const 0 - i32.const 224 - i32.const 313 - i32.const 2 + i32.const 296 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 - i32.const 224 - i32.const 314 - i32.const 2 + i32.const 296 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 + call $~lib/collector/dummy/__ref_register + local.get $0 + ) + (func $~lib/collector/dummy/__ref_link (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop ) - (func $~lib/util/memory/memcpy (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/collector/dummy/__ref_unlink (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/util/memory/memcpy (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1444,7 +1470,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1675,14 +1701,17 @@ end end ) - (func $~lib/runtime/doMakeArray (; 12 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/makeArray (; 16 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) i32.const 16 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.get $2 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $4 local.get $0 local.get $3 @@ -1691,12 +1720,32 @@ local.get $0 local.get $3 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $6 local.get $4 + local.tee $7 local.get $6 + local.tee $8 + local.get $7 + i32.load + local.tee $9 + i32.ne + if (result i32) + local.get $9 + if + local.get $9 + local.get $7 + call $~lib/collector/dummy/__ref_unlink + end + local.get $8 + local.get $7 + call $~lib/collector/dummy/__ref_link + local.get $8 + else + local.get $8 + end i32.store local.get $4 local.get $6 @@ -1716,7 +1765,7 @@ end local.get $4 ) - (func $std/array-literal/Ref#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/Ref#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -1726,22 +1775,22 @@ i32.const 0 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 5 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end local.get $0 ) - (func $~lib/array/Array#get:length (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/array-literal/RefWithCtor#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/RefWithCtor#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -1751,22 +1800,22 @@ i32.const 0 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 7 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end local.get $0 ) - (func $~lib/array/Array#get:length (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $start:std/array-literal (; 17 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 21 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1778,8 +1827,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 4 + i32.const 80 + i32.const 5 i32.const 0 call $~lib/env/abort unreachable @@ -1792,8 +1841,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 5 + i32.const 80 + i32.const 6 i32.const 0 call $~lib/env/abort unreachable @@ -1806,8 +1855,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 6 + i32.const 80 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -1820,8 +1869,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 7 + i32.const 80 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -1833,8 +1882,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 10 + i32.const 80 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -1847,8 +1896,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 11 + i32.const 80 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -1861,8 +1910,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 12 + i32.const 80 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -1875,8 +1924,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 13 + i32.const 80 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -1888,8 +1937,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 16 + i32.const 80 + i32.const 17 i32.const 0 call $~lib/env/abort unreachable @@ -1914,7 +1963,7 @@ local.get $3 i32.const 2 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $0 local.get $0 @@ -1928,8 +1977,9 @@ global.get $std/array-literal/i i32.const 1 i32.add + local.tee $3 global.set $std/array-literal/i - global.get $std/array-literal/i + local.get $3 end i32.store8 offset=1 local.get $1 @@ -1937,8 +1987,9 @@ global.get $std/array-literal/i i32.const 1 i32.add + local.tee $3 global.set $std/array-literal/i - global.get $std/array-literal/i + local.get $3 end i32.store8 offset=2 local.get $0 @@ -1951,8 +2002,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 21 + i32.const 80 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -1965,8 +2016,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 22 + i32.const 80 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -1979,8 +2030,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 23 + i32.const 80 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -1993,8 +2044,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 24 + i32.const 80 + i32.const 25 i32.const 0 call $~lib/env/abort unreachable @@ -2011,7 +2062,7 @@ local.get $2 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $1 local.get $1 @@ -2025,8 +2076,9 @@ global.get $std/array-literal/i i32.const 1 i32.add + local.tee $2 global.set $std/array-literal/i - global.get $std/array-literal/i + local.get $2 end i32.store offset=4 local.get $0 @@ -2034,8 +2086,9 @@ global.get $std/array-literal/i i32.const 1 i32.add + local.tee $2 global.set $std/array-literal/i - global.get $std/array-literal/i + local.get $2 end i32.store offset=8 local.get $1 @@ -2048,8 +2101,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 29 + i32.const 80 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -2062,8 +2115,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 30 + i32.const 80 + i32.const 31 i32.const 0 call $~lib/env/abort unreachable @@ -2076,8 +2129,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 31 + i32.const 80 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -2090,8 +2143,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 32 + i32.const 80 + i32.const 33 i32.const 0 call $~lib/env/abort unreachable @@ -2106,23 +2159,44 @@ local.get $3 i32.const 6 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $0 local.get $0 i32.load offset=4 local.set $1 local.get $1 - i32.const 0 - call $std/array-literal/Ref#constructor + block (result i32) + i32.const 0 + call $std/array-literal/Ref#constructor + local.set $3 + local.get $3 + local.get $0 + call $~lib/collector/dummy/__ref_link + local.get $3 + end i32.store local.get $1 - i32.const 0 - call $std/array-literal/Ref#constructor + block (result i32) + i32.const 0 + call $std/array-literal/Ref#constructor + local.set $3 + local.get $3 + local.get $0 + call $~lib/collector/dummy/__ref_link + local.get $3 + end i32.store offset=4 local.get $1 - i32.const 0 - call $std/array-literal/Ref#constructor + block (result i32) + i32.const 0 + call $std/array-literal/Ref#constructor + local.set $3 + local.get $3 + local.get $0 + call $~lib/collector/dummy/__ref_link + local.get $3 + end i32.store offset=8 local.get $0 end @@ -2134,8 +2208,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 36 + i32.const 80 + i32.const 37 i32.const 0 call $~lib/env/abort unreachable @@ -2150,23 +2224,44 @@ local.get $2 i32.const 8 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $1 local.get $1 i32.load offset=4 local.set $0 local.get $0 - i32.const 0 - call $std/array-literal/RefWithCtor#constructor + block (result i32) + i32.const 0 + call $std/array-literal/RefWithCtor#constructor + local.set $2 + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + end i32.store local.get $0 - i32.const 0 - call $std/array-literal/RefWithCtor#constructor + block (result i32) + i32.const 0 + call $std/array-literal/RefWithCtor#constructor + local.set $2 + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + end i32.store offset=4 local.get $0 - i32.const 0 - call $std/array-literal/RefWithCtor#constructor + block (result i32) + i32.const 0 + call $std/array-literal/RefWithCtor#constructor + local.set $2 + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + end i32.store offset=8 local.get $1 end @@ -2178,16 +2273,16 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 40 + i32.const 80 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 18 ;) (type $FUNCSIG$v) + (func $start (; 22 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 19 ;) (type $FUNCSIG$v) + (func $null (; 23 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 14e06c2d3c..77219d56d4 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -314,11 +314,11 @@ (data (i32.const 5584) "I\00n\00f\00i\00n\00i\00t\00y") (data (i32.const 5600) "\02\00\00\00\b8\02") (data (i32.const 5616) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR~anonymous|0) + (table $0 57 funcref) + (elem (i32.const 0) $null $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|2 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|16 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) @@ -527,7 +527,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -779,44 +779,40 @@ end end ) - (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 i32.const 8060 i32.le_u if i32.const 0 i32.const 24 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 i32.const 16 i32.sub + local.tee $2 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 24 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 16 - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -830,48 +826,17 @@ unreachable end local.get $0 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $1 i32.const 0 local.get $0 call $~lib/memory/memory.fill local.get $1 i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/runtime/assertRegistered (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 320 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const -1520547049 - i32.eq - if - i32.const 0 - i32.const 24 - i32.const 321 - i32.const 2 - call $~lib/env/abort - unreachable - end - ) - (func $~lib/runtime/doRetain (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - call $~lib/runtime/assertRegistered - local.get $1 - call $~lib/runtime/assertRegistered - ) - (func $~lib/runtime/ArrayBufferView#constructor (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) local.get $1 i32.const 1073741808 local.get $2 @@ -880,7 +845,7 @@ if i32.const 0 i32.const 24 - i32.const 348 + i32.const 244 i32.const 57 call $~lib/env/abort unreachable @@ -890,14 +855,14 @@ i32.shl local.tee $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 + local.set $3 local.get $0 i32.eqz if i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 end local.get $0 @@ -909,26 +874,31 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $2 - local.get $0 - call $~lib/runtime/doRetain local.get $0 + local.set $2 + local.get $3 + local.tee $0 + local.get $2 + i32.load + i32.ne + drop local.get $2 - i32.store local.get $0 + i32.store local.get $2 - i32.store offset=4 local.get $0 + i32.store offset=4 + local.get $2 local.get $1 i32.store offset=8 - local.get $0 + local.get $2 ) - (func $~lib/array/Array#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register i32.const 0 i32.const 2 call $~lib/runtime/ArrayBufferView#constructor @@ -940,7 +910,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#fill (; 12 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/array/Array#fill (; 9 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) local.get $0 @@ -1005,7 +975,7 @@ call $~lib/memory/memory.fill end ) - (func $~lib/util/memory/memcpy (; 13 ;) (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 $4 i32) (local $5 i32) @@ -1902,7 +1872,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 14 ;) (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 $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2096,45 +2066,49 @@ end end ) - (func $~lib/runtime/doMakeArray (; 15 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/makeArray (; 12 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) + (local $5 i32) i32.const 16 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.get $2 - call $~lib/runtime/doRegister - local.set $2 + call $~lib/runtime/register + local.set $4 local.get $0 local.get $3 i32.shl - local.tee $4 - call $~lib/runtime/doAllocate - i32.const 2 - call $~lib/runtime/doRegister local.tee $3 + call $~lib/runtime/allocate + i32.const 2 + call $~lib/runtime/register + local.tee $5 + local.tee $2 + local.get $4 + i32.load + i32.ne + drop + local.get $4 local.get $2 - call $~lib/runtime/doRetain - local.get $2 - local.get $3 i32.store - local.get $2 - local.get $3 + local.get $4 + local.get $5 i32.store offset=4 - local.get $2 local.get $4 + local.get $3 i32.store offset=8 - local.get $2 + local.get $4 local.get $0 i32.store offset=12 local.get $1 if - local.get $3 + local.get $5 local.get $1 - local.get $4 + local.get $3 call $~lib/memory/memory.copy end - local.get $2 + local.get $4 ) - (func $~lib/array/Array#__get (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2142,18 +2116,18 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable end - local.get $1 local.get $0 i32.load offset=4 + local.get $1 i32.add i32.load8_u ) - (func $std/array/isArraysEqual (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2200,7 +2174,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 18 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/array/Array#fill (; 15 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) local.get $0 @@ -2273,7 +2247,7 @@ end end ) - (func $~lib/array/Array#__get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2283,7 +2257,7 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable @@ -2296,7 +2270,7 @@ i32.add i32.load ) - (func $std/array/isArraysEqual (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2346,7 +2320,7 @@ end i32.const 1 ) - (func $~lib/runtime/doReallocate (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2422,7 +2396,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 125 i32.const 8 call $~lib/env/abort unreachable @@ -2448,7 +2422,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureCapacity (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -2464,7 +2438,7 @@ if i32.const 0 i32.const 272 - i32.const 14 + i32.const 13 i32.const 64 call $~lib/env/abort unreachable @@ -2476,14 +2450,14 @@ i32.const 2 i32.shl local.tee $3 - call $~lib/runtime/doReallocate + call $~lib/runtime/reallocate local.tee $1 local.get $2 i32.ne if - local.get $1 local.get $0 - call $~lib/runtime/doRetain + i32.load + drop local.get $0 local.get $1 i32.store @@ -2496,30 +2470,30 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.get $0 i32.load offset=12 + local.tee $2 i32.const 1 i32.add - local.tee $2 + local.tee $3 call $~lib/array/ensureCapacity local.get $0 - local.get $2 - i32.store offset=12 - local.get $0 i32.load offset=4 local.get $2 - i32.const 1 - i32.sub i32.const 2 i32.shl i32.add local.get $1 i32.store + local.get $0 + local.get $3 + i32.store offset=12 ) - (func $~lib/array/Array#pop (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2530,7 +2504,7 @@ if i32.const 0 i32.const 272 - i32.const 245 + i32.const 308 i32.const 20 call $~lib/env/abort unreachable @@ -2551,7 +2525,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2569,7 +2543,7 @@ i32.const 0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray local.tee $4 i32.load offset=4 local.tee $5 @@ -2591,7 +2565,7 @@ call $~lib/memory/memory.copy local.get $4 ) - (func $~lib/array/Array#copyWithin (; 26 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 23 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2758,7 +2732,7 @@ end local.get $0 ) - (func $~lib/array/Array#unshift (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#unshift (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2787,7 +2761,7 @@ local.get $2 i32.store offset=12 ) - (func $~lib/array/Array#shift (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2800,7 +2774,7 @@ if i32.const 0 i32.const 272 - i32.const 306 + i32.const 380 i32.const 20 call $~lib/env/abort unreachable @@ -2832,7 +2806,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#reverse (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#reverse (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2879,7 +2853,7 @@ end end ) - (func $~lib/array/Array#indexOf (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2943,7 +2917,7 @@ end i32.const -1 ) - (func $~lib/array/Array#includes (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 local.get $2 @@ -2951,14 +2925,11 @@ i32.const 0 i32.ge_s ) - (func $~lib/array/Array#splice (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $2 local.get $0 i32.load offset=12 @@ -3001,47 +2972,20 @@ i32.const 0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray - local.tee $6 + call $~lib/runtime/makeArray + local.tee $5 + i32.load offset=4 + drop + local.get $5 i32.load offset=4 - local.set $7 local.get $0 i32.load offset=4 - local.tee $8 + local.tee $6 local.get $1 i32.const 2 i32.shl i32.add - local.set $5 - i32.const 0 - local.set $3 - loop $repeat|0 - block $break|0 - local.get $3 - local.get $2 - i32.ge_s - br_if $break|0 - local.get $3 - i32.const 2 - i32.shl - local.tee $9 - local.get $7 - i32.add - local.get $5 - local.get $9 - i32.add - i32.load - i32.store - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $repeat|0 - end - end - local.get $6 - i32.load offset=4 - local.get $5 + local.tee $3 local.get $2 i32.const 2 i32.shl @@ -3053,11 +2997,11 @@ local.get $4 i32.ne if - local.get $5 + local.get $3 local.get $1 i32.const 2 i32.shl - local.get $8 + local.get $6 i32.add local.get $4 local.get $1 @@ -3071,9 +3015,9 @@ local.get $2 i32.sub i32.store offset=12 - local.get $6 + local.get $5 ) - (func $~lib/array/Array#__set (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3102,11 +3046,11 @@ i32.store offset=12 end ) - (func $start:std/array~anonymous|0 (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $~lib/array/Array#findIndex (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3154,17 +3098,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3172,7 +3116,7 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3180,12 +3124,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3233,12 +3177,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3246,12 +3190,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3259,12 +3203,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3312,12 +3256,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3325,12 +3269,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3338,13 +3282,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 50 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3387,7 +3331,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3396,7 +3340,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -3405,7 +3349,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 56 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.eqz @@ -3502,11 +3446,11 @@ end end ) - (func $start:std/array~anonymous|21 (; 57 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 54 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#map (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#map (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3519,7 +3463,7 @@ i32.const 0 i32.const 9 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray local.tee $4 i32.load offset=4 local.set $5 @@ -3564,7 +3508,7 @@ end local.get $4 ) - (func $~lib/array/Array#__get (; 59 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 56 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -3574,7 +3518,7 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable @@ -3587,7 +3531,7 @@ i32.add f32.load ) - (func $start:std/array~anonymous|22 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3597,7 +3541,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 61 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#map (; 58 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3609,7 +3553,7 @@ i32.const 0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.load offset=4 local.set $5 loop $repeat|0 @@ -3652,14 +3596,14 @@ end end ) - (func $start:std/array~anonymous|23 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3669,12 +3613,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 62 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3683,7 +3627,7 @@ i32.const 0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray local.set $4 local.get $0 i32.load offset=12 @@ -3730,7 +3674,7 @@ end local.get $4 ) - (func $start:std/array~anonymous|26 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3742,7 +3686,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -3751,7 +3695,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3763,12 +3707,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 69 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 66 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3812,7 +3756,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|31 (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.eqz if @@ -3823,7 +3767,7 @@ end local.get $0 ) - (func $start:std/array~anonymous|32 (; 72 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 69 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.eqz if @@ -3834,7 +3778,7 @@ end local.get $0 ) - (func $start:std/array~anonymous|33 (; 73 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 70 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -3842,7 +3786,7 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 74 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -3850,7 +3794,7 @@ local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3887,7 +3831,7 @@ end local.get $2 ) - (func $~lib/math/splitMix32 (; 76 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -3919,7 +3863,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 77 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 74 ;) (type $FUNCSIG$vj) (param $0 i64) (local $1 i64) local.get $0 i64.eqz @@ -3984,7 +3928,7 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/util/sort/insertionSort (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 75 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -4066,7 +4010,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 79 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4322,7 +4266,7 @@ local.get $6 f32.store ) - (func $~lib/array/Array#sort (; 80 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 77 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f32) (local $4 f32) @@ -4331,7 +4275,7 @@ if i32.const 0 i32.const 272 - i32.const 418 + i32.const 525 i32.const 4 call $~lib/env/abort unreachable @@ -4390,7 +4334,7 @@ call $~lib/util/sort/weakHeapSort end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 81 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 78 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4419,7 +4363,7 @@ i32.lt_s i32.sub ) - (func $std/array/isArraysEqual (; 82 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 79 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 f32) (local $4 i32) @@ -4480,7 +4424,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 83 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 80 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) @@ -4562,7 +4506,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 84 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 81 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4818,7 +4762,7 @@ local.get $6 f64.store ) - (func $~lib/array/Array#sort (; 85 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 82 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 f64) @@ -4827,7 +4771,7 @@ if i32.const 0 i32.const 272 - i32.const 418 + i32.const 525 i32.const 4 call $~lib/env/abort unreachable @@ -4886,7 +4830,7 @@ call $~lib/util/sort/weakHeapSort end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 86 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 83 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -4915,7 +4859,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#__get (; 87 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 84 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -4925,7 +4869,7 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable @@ -4938,7 +4882,7 @@ i32.add f64.load ) - (func $std/array/isArraysEqual (; 88 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 85 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -4999,7 +4943,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 89 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 86 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5081,7 +5025,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 90 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 87 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5337,7 +5281,7 @@ local.get $1 i32.store ) - (func $~lib/array/Array#sort (; 91 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 88 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5346,7 +5290,7 @@ if i32.const 0 i32.const 272 - i32.const 418 + i32.const 525 i32.const 4 call $~lib/env/abort unreachable @@ -5410,12 +5354,12 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 92 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 89 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 93 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 90 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -5424,14 +5368,14 @@ i32.lt_u i32.sub ) - (func $~lib/array/Array.create (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create (; 91 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 268435452 i32.gt_u if i32.const 0 i32.const 272 - i32.const 44 + i32.const 43 i32.const 62 call $~lib/env/abort unreachable @@ -5440,7 +5384,7 @@ i32.const 0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray local.tee $0 i32.load offset=4 i32.const 0 @@ -5452,7 +5396,7 @@ i32.store offset=12 local.get $0 ) - (func $std/array/createReverseOrderedArray (; 95 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5481,7 +5425,7 @@ end local.get $2 ) - (func $~lib/math/NativeMath.random (; 96 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 93 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) global.get $~lib/math/random_seeded @@ -5528,7 +5472,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 97 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5557,7 +5501,7 @@ end local.get $2 ) - (func $std/array/isSorted (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 95 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -5599,7 +5543,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 99 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 96 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -5615,23 +5559,23 @@ unreachable end ) - (func $std/array/assertSortedDefault (; 100 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 97 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 48 call $std/array/assertSorted ) - (func $start:std/array~anonymous|44 (; 101 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array.create> (; 102 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array.create> (; 99 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 512 i32.const 0 i32.const 11 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray local.tee $0 i32.load offset=4 i32.const 0 @@ -5643,19 +5587,18 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array>#__set (; 103 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__set (; 100 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $1 local.get $0 i32.load offset=12 - local.tee $4 + local.tee $3 i32.gt_u if i32.const 0 i32.const 272 - i32.const 109 + i32.const 110 i32.const 38 call $~lib/env/abort unreachable @@ -5671,27 +5614,17 @@ i32.const 2 i32.shl i32.add - local.tee $5 + local.tee $4 i32.load - local.tee $3 local.get $2 i32.ne if - local.get $3 - if - local.get $3 - local.get $0 - call $~lib/runtime/doRetain - end - local.get $2 - local.get $0 - call $~lib/runtime/doRetain - local.get $5 + local.get $4 local.get $2 i32.store end local.get $1 - local.get $4 + local.get $3 i32.ge_s if local.get $0 @@ -5701,7 +5634,7 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedNestedArray (; 104 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 101 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5733,7 +5666,7 @@ end local.get $1 ) - (func $start:std/array~anonymous|47 (; 105 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 102 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -5742,7 +5675,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/array/Array>#sort (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 103 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5751,7 +5684,7 @@ if i32.const 0 i32.const 272 - i32.const 418 + i32.const 525 i32.const 4 call $~lib/env/abort unreachable @@ -5803,7 +5736,7 @@ call $~lib/util/sort/insertionSort local.get $0 ) - (func $~lib/array/Array>#__get (; 107 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__get (; 104 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -5811,7 +5744,7 @@ if i32.const 0 i32.const 272 - i32.const 97 + i32.const 95 i32.const 45 call $~lib/env/abort unreachable @@ -5825,7 +5758,7 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable @@ -5838,7 +5771,7 @@ i32.add i32.load ) - (func $std/array/isSorted> (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 105 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -5880,7 +5813,7 @@ end i32.const 1 ) - (func $std/array/assertSorted> (; 109 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 106 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -5896,13 +5829,13 @@ unreachable end ) - (func $~lib/array/Array.create> (; 110 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array.create> (; 107 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 512 i32.const 0 i32.const 12 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray local.tee $0 i32.load offset=4 i32.const 0 @@ -5914,7 +5847,7 @@ i32.store offset=12 local.get $0 ) - (func $std/array/createReverseOrderedElementsArray (; 111 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 108 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5926,9 +5859,9 @@ i32.lt_s if i32.const 4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 13 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $2 i32.const 511 local.get $0 @@ -5947,14 +5880,14 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 112 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/util/string/compareImpl (; 113 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 110 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 @@ -5987,7 +5920,7 @@ end local.get $3 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 114 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 111 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6064,7 +5997,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted|trampoline (; 115 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSorted|trampoline (; 112 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) block $1of1 block $0of1 @@ -6081,9 +6014,20 @@ end local.get $0 local.get $1 - call $std/array/assertSorted> + call $~lib/array/Array>#sort + local.get $1 + call $std/array/isSorted + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 814 + i32.const 2 + call $~lib/env/abort + unreachable + end ) - (func $~lib/string/String.__eq (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -6129,7 +6073,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array/isArraysEqual (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 114 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -6156,10 +6100,10 @@ if local.get $0 local.get $2 - call $~lib/array/Array>#__get + call $~lib/array/Array#__get local.get $1 local.get $2 - call $~lib/array/Array>#__get + call $~lib/array/Array#__get call $~lib/string/String.__eq if local.get $2 @@ -6176,13 +6120,13 @@ end i32.const 1 ) - (func $~lib/array/Array.create (; 118 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array.create (; 115 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 400 i32.const 0 - i32.const 14 + i32.const 15 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray local.tee $0 i32.load offset=4 i32.const 0 @@ -6194,7 +6138,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/string/String#charAt (; 119 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#charAt (; 116 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 3020 @@ -6207,7 +6151,7 @@ return end i32.const 2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $1 local.get $0 i32.const 1 @@ -6218,9 +6162,9 @@ i32.store16 local.get $1 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/string/String#concat (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6254,7 +6198,7 @@ return end local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $2 local.get $0 local.get $3 @@ -6267,9 +6211,9 @@ call $~lib/memory/memory.copy local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/string/String.__concat (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 118 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 4424 local.get $0 @@ -6277,7 +6221,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 122 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 119 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 4200 @@ -6309,7 +6253,7 @@ end local.get $1 ) - (func $std/array/createRandomStringArray (; 123 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createRandomStringArray (; 120 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) call $~lib/array/Array.create @@ -6336,7 +6280,7 @@ end local.get $1 ) - (func $~lib/string/String#substring (; 124 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6345,7 +6289,7 @@ if i32.const 0 i32.const 4376 - i32.const 187 + i32.const 189 i32.const 4 call $~lib/env/abort unreachable @@ -6423,7 +6367,7 @@ return end local.get $3 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $2 local.get $0 local.get $4 @@ -6432,9 +6376,36 @@ call $~lib/memory/memory.copy local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register + ) + (func $~lib/runtime/discard (; 122 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 8060 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 187 + i32.const 4 + call $~lib/env/abort + unreachable + end ) - (func $~lib/array/Array#join_bool (; 125 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_bool (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6481,7 +6452,7 @@ local.tee $7 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.set $2 i32.const 0 local.set $0 @@ -6578,15 +6549,15 @@ call $~lib/string/String#substring local.set $0 local.get $2 - call $~lib/runtime/assertUnregistered + call $~lib/runtime/discard local.get $0 return end local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/util/number/decimalCount32 (; 126 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 124 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -6640,7 +6611,7 @@ end end ) - (func $~lib/util/number/utoa32_lut (; 127 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 125 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) i32.const 5092 @@ -6750,7 +6721,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 128 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 126 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6777,7 +6748,7 @@ local.tee $3 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $2 local.get $0 local.get $3 @@ -6790,9 +6761,9 @@ end local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/util/number/itoa_stream (; 129 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 127 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6836,7 +6807,7 @@ end local.get $2 ) - (func $~lib/array/Array#join_int (; 130 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6881,7 +6852,7 @@ local.tee $7 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.set $3 i32.const 0 local.set $0 @@ -6946,20 +6917,20 @@ call $~lib/string/String#substring local.set $0 local.get $3 - call $~lib/runtime/assertUnregistered + call $~lib/runtime/discard local.get $0 return end local.get $3 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/array/Array#join (; 131 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int ) - (func $~lib/util/number/utoa32 (; 132 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 130 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -6973,16 +6944,16 @@ local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $2 local.get $0 local.get $1 call $~lib/util/number/utoa32_lut local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/util/number/itoa_stream (; 133 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -7006,7 +6977,7 @@ call $~lib/util/number/utoa32_lut local.get $0 ) - (func $~lib/array/Array#join_int (; 134 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7051,7 +7022,7 @@ local.tee $7 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.set $3 i32.const 0 local.set $0 @@ -7116,20 +7087,20 @@ call $~lib/string/String#substring local.set $0 local.get $3 - call $~lib/runtime/assertUnregistered + call $~lib/runtime/discard local.get $0 return end local.get $3 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/array/Array#join (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int ) - (func $~lib/util/number/genDigits (; 136 ;) (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 (; 134 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i32) @@ -7540,7 +7511,7 @@ local.get $2 end ) - (func $~lib/util/number/prettify (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 135 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7802,14 +7773,14 @@ end end ) - (func $~lib/util/number/dtoa_core (; 138 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 136 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) - (local $5 i64) + (local $5 i32) (local $6 i64) (local $7 i32) - (local $8 i32) + (local $8 i64) (local $9 i64) (local $10 i64) (local $11 i32) @@ -7819,15 +7790,15 @@ f64.const 0 f64.lt local.tee $11 - if (result f64) + if local.get $0 i32.const 45 i32.store16 local.get $1 f64.neg - else - local.get $1 + local.set $1 end + local.get $1 i64.reinterpret_f64 local.tee $2 i64.const 9218868437227405312 @@ -7835,14 +7806,14 @@ i64.const 52 i64.shr_u i32.wrap_i64 + local.tee $5 + i32.const 0 + i32.ne local.set $7 local.get $2 i64.const 4503599627370495 i64.and local.get $7 - i32.const 0 - i32.ne - local.tee $8 i64.extend_i32_u i64.const 52 i64.shl @@ -7852,43 +7823,43 @@ i64.shl i64.const 1 i64.add - local.tee $5 + local.tee $8 i64.clz i32.wrap_i64 local.set $3 - local.get $5 + local.get $8 local.get $3 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus - local.get $7 + local.get $5 i32.const 1 - local.get $8 + local.get $7 select i32.const 1075 i32.sub - local.tee $7 - i32.const 1 - i32.sub - local.get $3 - i32.sub - local.set $3 + local.set $5 local.get $2 local.get $2 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $8 + local.tee $7 i64.extend_i32_s i64.shl i64.const 1 i64.sub + local.get $5 local.get $7 - local.get $8 + i32.sub + local.get $5 + i32.const 1 i32.sub local.get $3 i32.sub + local.tee $3 + i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus @@ -7918,12 +7889,12 @@ local.tee $3 i32.const 3 i32.shl - local.tee $8 + local.tee $7 i32.sub global.set $~lib/util/number/_K i32.const 6332 i32.load - local.get $8 + local.get $7 i32.add i64.load global.set $~lib/util/number/_frc_pow @@ -7935,6 +7906,16 @@ i32.add i32.load16_s global.set $~lib/util/number/_exp_pow + global.get $~lib/util/number/_frc_pow + local.tee $8 + i64.const 4294967295 + i64.and + local.set $4 + local.get $8 + i64.const 32 + i64.shr_u + local.tee $12 + local.tee $6 local.get $2 local.get $2 i64.clz @@ -7946,30 +7927,20 @@ i64.const 4294967295 i64.and local.tee $9 - global.get $~lib/util/number/_frc_pow - local.tee $5 - i64.const 4294967295 - i64.and - local.tee $10 - i64.mul - local.set $4 - local.get $5 - i64.const 32 - i64.shr_u - local.tee $6 - local.get $9 i64.mul + local.get $4 local.get $2 i64.const 32 i64.shr_u local.tee $2 - local.get $10 i64.mul local.get $4 + local.get $9 + i64.mul i64.const 32 i64.shr_u i64.add - local.tee $4 + local.tee $10 i64.const 4294967295 i64.and i64.add @@ -7980,36 +7951,30 @@ local.get $2 local.get $6 i64.mul - local.get $4 + local.get $10 i64.const 32 i64.shr_u i64.add i64.add local.set $13 - local.get $5 - i64.const 4294967295 - i64.and - local.tee $2 global.get $~lib/util/number/_frc_plus - local.tee $4 + local.tee $10 i64.const 4294967295 i64.and local.tee $6 - i64.mul - local.set $12 - local.get $6 - local.get $5 - i64.const 32 - i64.shr_u + local.get $12 local.tee $9 i64.mul - local.get $2 local.get $4 + local.tee $2 + local.get $10 i64.const 32 i64.shr_u - local.tee $10 + local.tee $4 + i64.mul + local.get $2 + local.get $6 i64.mul - local.get $12 i64.const 32 i64.shr_u i64.add @@ -8021,8 +7986,8 @@ i64.add i64.const 32 i64.shr_u + local.get $4 local.get $9 - local.get $10 i64.mul local.get $2 i64.const 32 @@ -8030,39 +7995,61 @@ i64.add i64.add local.set $6 - global.get $~lib/util/number/_frc_minus - local.tee $12 - i64.const 4294967295 - i64.and - local.tee $9 - local.get $5 + local.get $8 local.tee $2 i64.const 4294967295 i64.and - local.tee $10 - i64.mul local.set $4 + local.get $5 + local.get $3 + i32.sub + local.set $5 + local.get $11 + i32.const 1 + i32.shl + local.get $0 + i32.add + local.get $0 + local.get $13 + local.get $5 + global.get $~lib/util/number/_exp_pow + local.tee $3 + i32.add + i32.const -64 + i32.sub local.get $6 i64.const 1 i64.sub - local.tee $5 + local.tee $8 + global.get $~lib/util/number/_exp + local.get $3 + i32.add + i32.const -64 + i32.sub + local.get $8 local.get $2 i64.const 32 i64.shr_u local.tee $6 - local.get $9 + global.get $~lib/util/number/_frc_minus + local.tee $2 + i64.const 4294967295 + i64.and + local.tee $9 i64.mul - local.get $12 + local.get $4 + local.get $2 i64.const 32 i64.shr_u local.tee $2 - local.get $10 i64.mul local.get $4 + local.get $9 + i64.mul i64.const 32 i64.shr_u i64.add - local.tee $4 + local.tee $10 i64.const 4294967295 i64.and i64.add @@ -8073,7 +8060,7 @@ local.get $2 local.get $6 i64.mul - local.get $4 + local.get $10 i64.const 32 i64.shr_u i64.add @@ -8081,29 +8068,6 @@ i64.const 1 i64.add i64.sub - local.set $4 - local.get $11 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $0 - local.get $13 - local.get $7 - local.get $3 - i32.sub - global.get $~lib/util/number/_exp_pow - local.tee $3 - i32.add - i32.const -64 - i32.sub - local.get $5 - global.get $~lib/util/number/_exp - local.get $3 - i32.add - i32.const -64 - i32.sub - local.get $4 local.get $11 call $~lib/util/number/genDigits local.get $11 @@ -8113,7 +8077,7 @@ local.get $11 i32.add ) - (func $~lib/util/number/dtoa (; 139 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 137 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -8145,7 +8109,7 @@ return end i32.const 56 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $2 local.get $0 call $~lib/util/number/dtoa_core @@ -8155,10 +8119,10 @@ call $~lib/string/String#substring local.set $1 local.get $2 - call $~lib/runtime/assertUnregistered + call $~lib/runtime/discard local.get $1 ) - (func $~lib/util/number/dtoa_stream (; 140 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 138 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) local.get $1 i32.const 1 i32.shl @@ -8227,7 +8191,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join_flt (; 141 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_flt (; 139 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8270,7 +8234,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.set $2 i32.const 0 local.set $0 @@ -8335,15 +8299,15 @@ call $~lib/string/String#substring local.set $0 local.get $2 - call $~lib/runtime/assertUnregistered + call $~lib/runtime/discard local.get $0 return end local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/array/Array#join_str (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_str (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8420,7 +8384,7 @@ i32.add i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.set $2 i32.const 0 local.set $0 @@ -8508,20 +8472,20 @@ end local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/array/Array#join (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_str ) - (func $std/array/Ref#constructor (; 144 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/Ref#constructor (; 142 ;) (type $FUNCSIG$i) (result i32) i32.const 0 - call $~lib/runtime/doAllocate - i32.const 18 - call $~lib/runtime/doRegister + call $~lib/runtime/allocate + i32.const 19 + call $~lib/runtime/register ) - (func $~lib/array/Array#join_ref (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_ref (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8562,7 +8526,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.set $2 i32.const 0 local.set $0 @@ -8646,20 +8610,20 @@ call $~lib/string/String#substring local.set $0 local.get $2 - call $~lib/runtime/assertUnregistered + call $~lib/runtime/discard local.get $0 return end local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/array/Array#toString (; 146 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 144 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa_stream (; 147 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 145 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -8714,7 +8678,7 @@ end local.get $1 ) - (func $~lib/array/Array#join_int (; 148 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 146 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8757,7 +8721,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.set $2 i32.const 0 local.set $0 @@ -8818,15 +8782,15 @@ call $~lib/string/String#substring local.set $0 local.get $2 - call $~lib/runtime/assertUnregistered + call $~lib/runtime/discard local.get $0 return end local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/util/number/itoa_stream (; 149 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 147 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -8856,7 +8820,7 @@ call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join_int (; 150 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 148 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8899,7 +8863,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.set $2 i32.const 0 local.set $0 @@ -8964,15 +8928,15 @@ call $~lib/string/String#substring local.set $0 local.get $2 - call $~lib/runtime/assertUnregistered + call $~lib/runtime/discard local.get $0 return end local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/util/number/decimalCount64 (; 151 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 149 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -9026,7 +8990,7 @@ end end ) - (func $~lib/util/number/utoa64_lut (; 152 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 150 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9123,7 +9087,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 153 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 151 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9144,7 +9108,7 @@ local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $2 local.get $3 local.get $1 @@ -9155,7 +9119,7 @@ local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $2 local.get $0 local.get $1 @@ -9163,9 +9127,9 @@ end local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/util/number/itoa_stream (; 154 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 152 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -9205,7 +9169,7 @@ end local.get $1 ) - (func $~lib/array/Array#join_int (; 155 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 153 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9248,7 +9212,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.set $2 i32.const 0 local.set $0 @@ -9313,15 +9277,15 @@ call $~lib/string/String#substring local.set $0 local.get $2 - call $~lib/runtime/assertUnregistered + call $~lib/runtime/discard local.get $0 return end local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/util/number/itoa64 (; 156 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 154 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9357,7 +9321,7 @@ local.tee $2 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $3 local.get $4 local.get $2 @@ -9370,7 +9334,7 @@ local.tee $2 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $3 local.get $0 local.get $2 @@ -9384,9 +9348,9 @@ end local.get $3 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/util/number/itoa_stream (; 157 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 155 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -9449,7 +9413,7 @@ end local.get $1 ) - (func $~lib/array/Array#join_int (; 158 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9492,7 +9456,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.set $2 i32.const 0 local.set $0 @@ -9557,20 +9521,20 @@ call $~lib/string/String#substring local.set $0 local.get $2 - call $~lib/runtime/assertUnregistered + call $~lib/runtime/discard local.get $0 return end local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/array/Array#toString (; 159 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array>#join_arr (; 160 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 158 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9663,7 +9627,7 @@ local.get $1 end ) - (func $~lib/util/number/itoa_stream (; 161 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 159 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -9693,7 +9657,7 @@ call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join_int (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 160 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9736,7 +9700,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.set $2 i32.const 0 local.set $0 @@ -9797,15 +9761,15 @@ call $~lib/string/String#substring local.set $0 local.get $2 - call $~lib/runtime/assertUnregistered + call $~lib/runtime/discard local.get $0 return end local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/array/Array>#join_arr (; 163 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 161 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9895,7 +9859,7 @@ local.get $1 end ) - (func $~lib/array/Array>#join_arr (; 164 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9988,7 +9952,7 @@ local.get $1 end ) - (func $~lib/array/Array>>#join_arr (; 165 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>>#join_arr (; 163 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10078,12 +10042,10 @@ local.get $1 end ) - (func $start:std/array (; 166 ;) (type $FUNCSIG$v) + (func $start:std/array (; 164 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) i32.const 8064 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset @@ -10113,14 +10075,14 @@ unreachable end i32.const 0 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 5 - call $~lib/runtime/doRegister + call $~lib/runtime/register drop i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 6 - call $~lib/runtime/doRegister + call $~lib/runtime/register i32.const 1 i32.const 0 call $~lib/runtime/ArrayBufferView#constructor @@ -10135,7 +10097,7 @@ i32.const 248 i32.const 7 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/array/isArraysEqual i32.eqz if @@ -10156,7 +10118,7 @@ i32.const 320 i32.const 7 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/array/isArraysEqual i32.eqz if @@ -10177,7 +10139,7 @@ i32.const 344 i32.const 7 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/array/isArraysEqual i32.eqz if @@ -10198,7 +10160,7 @@ i32.const 368 i32.const 7 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/array/isArraysEqual i32.eqz if @@ -10219,7 +10181,7 @@ i32.const 392 i32.const 7 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/array/isArraysEqual i32.eqz if @@ -10240,7 +10202,7 @@ i32.const 488 i32.const 8 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10262,7 +10224,7 @@ i32.const 528 i32.const 8 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10284,7 +10246,7 @@ i32.const 568 i32.const 8 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10306,7 +10268,7 @@ i32.const 608 i32.const 8 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10328,7 +10290,7 @@ i32.const 648 i32.const 8 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10677,7 +10639,7 @@ i32.const 688 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $~lib/array/Array#concat drop global.get $std/array/arr @@ -10936,7 +10898,7 @@ i32.const 752 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -10947,7 +10909,7 @@ i32.const 792 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10963,7 +10925,7 @@ i32.const 832 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -10974,7 +10936,7 @@ i32.const 872 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10990,7 +10952,7 @@ i32.const 912 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -11001,7 +10963,7 @@ i32.const 952 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11017,7 +10979,7 @@ i32.const 992 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 2 @@ -11028,7 +10990,7 @@ i32.const 1032 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11044,7 +11006,7 @@ i32.const 1072 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -11055,7 +11017,7 @@ i32.const 1112 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11071,7 +11033,7 @@ i32.const 1152 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -11082,7 +11044,7 @@ i32.const 1192 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11098,7 +11060,7 @@ i32.const 1232 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -11109,7 +11071,7 @@ i32.const 1272 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11125,7 +11087,7 @@ i32.const 1312 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -11136,7 +11098,7 @@ i32.const 1352 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11152,7 +11114,7 @@ i32.const 1392 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -11163,7 +11125,7 @@ i32.const 1432 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11179,7 +11141,7 @@ i32.const 1472 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -11190,7 +11152,7 @@ i32.const 1512 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11206,7 +11168,7 @@ i32.const 1552 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -11217,7 +11179,7 @@ i32.const 1592 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11233,7 +11195,7 @@ i32.const 1632 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -11244,7 +11206,7 @@ i32.const 1672 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12072,7 +12034,7 @@ i32.const 1784 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12089,7 +12051,7 @@ i32.const 1824 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12105,7 +12067,7 @@ i32.const 1840 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 @@ -12115,7 +12077,7 @@ i32.const 1880 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12132,7 +12094,7 @@ i32.const 1912 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12148,7 +12110,7 @@ i32.const 1936 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 @@ -12158,7 +12120,7 @@ i32.const 1976 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12175,7 +12137,7 @@ i32.const 2000 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12191,7 +12153,7 @@ i32.const 2032 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 0 @@ -12201,7 +12163,7 @@ i32.const 2072 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12218,7 +12180,7 @@ i32.const 2096 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12234,7 +12196,7 @@ i32.const 2128 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -1 @@ -12244,7 +12206,7 @@ i32.const 2168 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12261,7 +12223,7 @@ i32.const 2192 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12277,7 +12239,7 @@ i32.const 2224 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 @@ -12287,7 +12249,7 @@ i32.const 2264 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12304,7 +12266,7 @@ i32.const 2288 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12320,7 +12282,7 @@ i32.const 2320 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 @@ -12330,7 +12292,7 @@ i32.const 2360 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12347,7 +12309,7 @@ i32.const 2384 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12363,7 +12325,7 @@ i32.const 2416 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -7 @@ -12373,7 +12335,7 @@ i32.const 2456 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12390,7 +12352,7 @@ i32.const 2480 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12406,7 +12368,7 @@ i32.const 2512 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 @@ -12416,7 +12378,7 @@ i32.const 2552 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12433,7 +12395,7 @@ i32.const 2568 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12449,7 +12411,7 @@ i32.const 2608 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 1 @@ -12459,7 +12421,7 @@ i32.const 2648 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12476,7 +12438,7 @@ i32.const 2664 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12492,7 +12454,7 @@ i32.const 2704 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 4 @@ -12502,7 +12464,7 @@ i32.const 2744 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12519,7 +12481,7 @@ i32.const 2760 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12535,7 +12497,7 @@ i32.const 2800 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 @@ -12545,7 +12507,7 @@ i32.const 2840 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12562,7 +12524,7 @@ i32.const 2856 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12578,7 +12540,7 @@ i32.const 2896 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 @@ -12588,7 +12550,7 @@ i32.const 2936 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12605,7 +12567,7 @@ i32.const 2952 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13709,7 +13671,7 @@ i32.const 3304 i32.const 9 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/array/isArraysEqual i32.eqz if @@ -13745,7 +13707,7 @@ i32.const 3464 i32.const 10 i32.const 3 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/array/isArraysEqual i32.eqz if @@ -13782,7 +13744,7 @@ i32.const 3616 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13820,7 +13782,7 @@ i32.const 3728 i32.const 8 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13856,7 +13818,7 @@ i32.const 4056 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13875,7 +13837,7 @@ i32.const 4080 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13995,10 +13957,10 @@ i32.const 1 global.set $~lib/argc global.get $std/array/randomStringsActual - call $std/array/assertSorted|trampoline + call $std/array/assertSorted|trampoline global.get $std/array/randomStringsActual global.get $std/array/randomStringsExpected - call $std/array/isArraysEqual + call $std/array/isArraysEqual i32.eqz if i32.const 0 @@ -14013,12 +13975,30 @@ i32.const 1 global.set $~lib/argc global.get $std/array/randomStrings400 - call $std/array/assertSorted|trampoline + local.set $1 + i32.const 0 + local.set $0 + block $1of152 + block $0of153 + block $outOfRange54 + global.get $~lib/argc + i32.const 1 + i32.sub + br_table $0of153 $1of152 $outOfRange54 + end + unreachable + end + i32.const 56 + local.set $0 + end + local.get $1 + local.get $0 + call $std/array/assertSorted> i32.const 2 i32.const 4552 - i32.const 15 + i32.const 16 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $~lib/array/Array#join_bool i32.const 4576 call $~lib/string/String.__eq @@ -14035,7 +14015,7 @@ i32.const 5120 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 4200 call $~lib/array/Array#join i32.const 5152 @@ -14053,7 +14033,7 @@ i32.const 5240 i32.const 8 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 5216 call $~lib/array/Array#join i32.const 5152 @@ -14071,7 +14051,7 @@ i32.const 5320 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 5296 call $~lib/array/Array#join i32.const 5344 @@ -14089,7 +14069,7 @@ i32.const 6672 i32.const 10 i32.const 3 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $~lib/array/Array#join_flt i32.const 6736 call $~lib/string/String.__eq @@ -14104,9 +14084,9 @@ end i32.const 3 i32.const 6888 - i32.const 14 + i32.const 15 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray i32.const 4200 call $~lib/array/Array#join i32.const 6832 @@ -14122,35 +14102,19 @@ end i32.const 3 i32.const 0 - i32.const 19 + i32.const 20 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray local.tee $0 i32.load offset=4 - local.tee $2 - local.set $3 - call $std/array/Ref#constructor local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/runtime/doRetain - end - local.get $3 - local.get $1 + call $std/array/Ref#constructor i32.store - local.get $2 + local.get $1 i32.const 0 i32.store offset=4 - call $std/array/Ref#constructor - local.tee $1 - if - local.get $1 - local.get $0 - call $~lib/runtime/doRetain - end - local.get $2 local.get $1 + call $std/array/Ref#constructor i32.store offset=8 local.get $0 global.set $std/array/refArr @@ -14221,9 +14185,9 @@ end i32.const 3 i32.const 7128 - i32.const 20 + i32.const 21 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $~lib/array/Array#join_int i32.const 7152 call $~lib/string/String.__eq @@ -14238,9 +14202,9 @@ end i32.const 3 i32.const 7208 - i32.const 21 + i32.const 22 i32.const 1 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $~lib/array/Array#join_int i32.const 7232 call $~lib/string/String.__eq @@ -14255,9 +14219,9 @@ end i32.const 3 i32.const 7312 - i32.const 16 + i32.const 17 i32.const 3 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $~lib/array/Array#join_int i32.const 7352 call $~lib/string/String.__eq @@ -14272,9 +14236,9 @@ end i32.const 4 i32.const 7464 - i32.const 22 + i32.const 23 i32.const 3 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $~lib/array/Array#join_int i32.const 7512 call $~lib/string/String.__eq @@ -14288,7 +14252,7 @@ unreachable end global.get $std/array/randomStringsExpected - call $~lib/array/Array#toString + call $~lib/array/Array#toString i32.const 7616 call $~lib/string/String.__eq i32.eqz @@ -14302,10 +14266,10 @@ end i32.const 4 i32.const 7744 - i32.const 14 + i32.const 15 i32.const 2 - call $~lib/runtime/doMakeArray - call $~lib/array/Array#toString + call $~lib/runtime/makeArray + call $~lib/array/Array#toString i32.const 7776 call $~lib/string/String.__eq i32.eqz @@ -14321,31 +14285,22 @@ i32.const 0 i32.const 11 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray local.tee $0 i32.load offset=4 - local.set $2 + local.tee $1 i32.const 2 i32.const 7832 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray - local.tee $1 - local.get $0 - call $~lib/runtime/doRetain - local.get $2 - local.get $1 + call $~lib/runtime/makeArray i32.store + local.get $1 i32.const 2 i32.const 7856 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray - local.tee $3 - local.get $0 - call $~lib/runtime/doRetain - local.get $2 - local.get $3 + call $~lib/runtime/makeArray i32.store offset=4 local.get $0 global.set $std/array/subarr32 @@ -14364,33 +14319,24 @@ end i32.const 2 i32.const 0 - i32.const 23 + i32.const 24 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray local.tee $0 i32.load offset=4 - local.set $2 + local.tee $1 i32.const 2 i32.const 7936 i32.const 7 i32.const 0 - call $~lib/runtime/doMakeArray - local.tee $3 - local.get $0 - call $~lib/runtime/doRetain - local.get $2 - local.get $3 + call $~lib/runtime/makeArray i32.store + local.get $1 i32.const 2 i32.const 7960 i32.const 7 i32.const 0 - call $~lib/runtime/doMakeArray - local.tee $1 - local.get $0 - call $~lib/runtime/doRetain - local.get $2 - local.get $1 + call $~lib/runtime/makeArray i32.store offset=4 local.get $0 global.set $std/array/subarr8 @@ -14409,38 +14355,29 @@ end i32.const 1 i32.const 0 - i32.const 25 + i32.const 26 i32.const 2 - call $~lib/runtime/doMakeArray - local.tee $2 + call $~lib/runtime/makeArray + local.tee $1 i32.load offset=4 local.set $0 i32.const 1 i32.const 0 - i32.const 24 + i32.const 25 i32.const 2 - call $~lib/runtime/doMakeArray - local.tee $1 + call $~lib/runtime/makeArray + local.tee $2 i32.load offset=4 - local.set $3 i32.const 1 i32.const 8056 i32.const 8 i32.const 2 - call $~lib/runtime/doMakeArray - local.tee $4 - local.get $1 - call $~lib/runtime/doRetain - local.get $3 - local.get $4 + call $~lib/runtime/makeArray i32.store - local.get $1 - local.get $2 - call $~lib/runtime/doRetain local.get $0 - local.get $1 - i32.store local.get $2 + i32.store + local.get $1 global.set $std/array/subarrU32 global.get $std/array/subarrU32 call $~lib/array/Array>>#join_arr @@ -14456,7 +14393,7 @@ unreachable end ) - (func $std/array/main (; 167 ;) (type $FUNCSIG$v) + (func $std/array/main (; 165 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -14465,7 +14402,7 @@ global.set $~lib/started end ) - (func $null (; 168 ;) (type $FUNCSIG$v) + (func $null (; 166 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array.ts b/tests/compiler/std/array.ts index b72b3055b1..6306cbefc1 100644 --- a/tests/compiler/std/array.ts +++ b/tests/compiler/std/array.ts @@ -901,8 +901,8 @@ assertSorted>(reversedElements512, (a: Proxy, b: Proxy): i3 var randomStringsActual: (string | null)[] = ["a", "b", "a", "ab", "ba", "", null]; var randomStringsExpected: (string | null)[] = ["", "a", "a", "ab", "b", "ba", null]; -assertSorted(randomStringsActual); -assert(isArraysEqual(randomStringsActual, randomStringsExpected)); +assertSorted(randomStringsActual); +assert(isArraysEqual(randomStringsActual, randomStringsExpected)); var randomStrings400 = createRandomStringArray(400); assertSorted(randomStrings400); diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index e0b4592ab2..bdfc3fb568 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -19,6 +19,7 @@ (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) + (type $FUNCSIG$jii (func (param i32 i32) (result i64))) (type $FUNCSIG$iijijiji (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $FUNCSIG$iiid (func (param i32 i32 f64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) @@ -177,9 +178,9 @@ (data (i32.const 5528) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") (data (i32.const 5568) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") (data (i32.const 5600) "\02\00\00\00\b8\02\00\00\00\00\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR~anonymous|0) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 1)) + (table $0 57 funcref) + (elem (i32.const 0) $null $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|4 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|18 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|30 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|34 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|38 $start:std/array~anonymous|39 $start:std/array~anonymous|40 $start:std/array~anonymous|41 $start:std/array~anonymous|42 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) @@ -394,7 +394,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -673,7 +673,11 @@ end end ) - (func $~lib/runtime/assertUnregistered (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -681,14 +685,16 @@ if i32.const 0 i32.const 24 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq @@ -696,28 +702,19 @@ if i32.const 0 i32.const 24 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/collector/dummy/__gc_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/runtime/doRegister (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 - call $~lib/collector/dummy/__gc_register + call $~lib/collector/dummy/__ref_register 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 (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -735,7 +732,7 @@ local.get $1 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $3 local.get $3 @@ -747,53 +744,20 @@ local.set $2 local.get $2 i32.const 2 - call $~lib/runtime/doRegister - end - ) - (func $~lib/runtime/assertRegistered (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 320 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - i32.load - global.get $~lib/runtime/HEADER_MAGIC - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 321 - i32.const 2 - call $~lib/env/abort - unreachable + call $~lib/runtime/register end ) - (func $~lib/collector/dummy/__gc_retain (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/runtime/doRetain (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - call $~lib/runtime/assertRegistered - local.get $1 - call $~lib/runtime/assertRegistered - local.get $0 - local.get $1 - call $~lib/collector/dummy/__gc_retain + (func $~lib/collector/dummy/__ref_unlink (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop ) - (func $~lib/runtime/ArrayBufferView#constructor (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $1 global.get $~lib/runtime/MAX_BYTELENGTH local.get $2 @@ -802,7 +766,7 @@ if i32.const 0 i32.const 24 - i32.const 348 + i32.const 244 i32.const 57 call $~lib/env/abort unreachable @@ -823,12 +787,12 @@ i32.const 12 local.set $4 local.get $4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $4 local.get $4 i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -844,11 +808,25 @@ local.get $0 end local.tee $4 - block $~lib/runtime/RETAIN|inlined.0 (result i32) - local.get $3 + local.get $3 + local.tee $5 + local.get $4 + i32.load + local.tee $6 + i32.ne + if (result i32) + local.get $6 + if + local.get $6 + local.get $4 + call $~lib/collector/dummy/__ref_unlink + end + local.get $5 local.get $4 - call $~lib/runtime/doRetain - local.get $3 + call $~lib/collector/dummy/__ref_link + local.get $5 + else + local.get $5 end i32.store local.get $0 @@ -859,7 +837,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -869,12 +847,12 @@ i32.const 16 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.get $1 i32.const 2 @@ -888,7 +866,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array.isArray | null> (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray | null> (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 if (result i32) local.get $0 @@ -898,7 +876,7 @@ i32.const 1 end ) - (func $~lib/array/Array.isArray> (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray> (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 if (result i32) local.get $0 @@ -908,7 +886,7 @@ i32.const 1 end ) - (func $std/array/P#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/P#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -918,18 +896,18 @@ i32.const 0 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 5 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end local.get $0 ) - (func $~lib/array/Array.isArray

(; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray

(; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -939,7 +917,7 @@ i32.const 0 end ) - (func $~lib/typedarray/Uint8Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -949,12 +927,12 @@ i32.const 12 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 6 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.get $1 i32.const 0 @@ -962,7 +940,7 @@ local.set $0 local.get $0 ) - (func $~lib/array/Array.isArray (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -972,7 +950,7 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -982,7 +960,7 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -992,7 +970,7 @@ i32.const 0 end ) - (func $~lib/array/Array#fill (; 23 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 21 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1068,7 +1046,7 @@ end local.get $0 ) - (func $~lib/util/memory/memcpy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2269,7 +2247,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2500,15 +2478,17 @@ end end ) - (func $~lib/runtime/doMakeArray (; 26 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/makeArray (; 24 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + (local $9 i32) i32.const 16 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.get $2 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $4 local.get $0 local.get $3 @@ -2517,17 +2497,31 @@ local.get $0 local.get $3 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $6 local.get $4 local.tee $7 - block $~lib/runtime/RETAIN|inlined.1 (result i32) - local.get $6 + local.get $6 + local.tee $8 + local.get $7 + i32.load + local.tee $9 + i32.ne + if (result i32) + local.get $9 + if + local.get $9 + local.get $7 + call $~lib/collector/dummy/__ref_unlink + end + local.get $8 local.get $7 - call $~lib/runtime/doRetain - local.get $6 + call $~lib/collector/dummy/__ref_link + local.get $8 + else + local.get $8 end i32.store local.get $4 @@ -2548,11 +2542,20 @@ end local.get $4 ) - (func $~lib/array/Array#get:length (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 0 + i32.shl + i32.add + i32.load8_u + ) + (func $~lib/array/Array#__get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2562,20 +2565,16 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 98 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_u + call $~lib/array/Array#__unchecked_get ) - (func $std/array/isArraysEqual (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2630,7 +2629,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 30 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 29 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2716,10 +2715,19 @@ end local.get $0 ) - (func $~lib/array/Array#get:length (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) + (func $~lib/array/Array#__unchecked_get (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) (func $~lib/array/Array#__get (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 @@ -2730,18 +2738,14 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 98 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 + call $~lib/array/Array#__unchecked_get ) (func $std/array/isArraysEqual (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -2823,7 +2827,7 @@ local.get $0 local.set $1 ) - (func $~lib/runtime/doReallocate (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2894,7 +2898,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 125 i32.const 8 call $~lib/env/abort unreachable @@ -2903,7 +2907,7 @@ call $~lib/memory/memory.free else local.get $0 - call $~lib/collector/dummy/__gc_register + call $~lib/collector/dummy/__ref_register end local.get $5 local.set $2 @@ -2932,6 +2936,8 @@ (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) + (local $8 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2947,7 +2953,7 @@ if i32.const 0 i32.const 272 - i32.const 14 + i32.const 13 i32.const 64 call $~lib/env/abort unreachable @@ -2966,7 +2972,7 @@ local.set $5 local.get $6 local.get $5 - call $~lib/runtime/doReallocate + call $~lib/runtime/reallocate end local.set $5 local.get $5 @@ -2975,11 +2981,25 @@ if local.get $0 local.tee $6 - block $~lib/runtime/RETAIN|inlined.2 (result i32) - local.get $5 + local.get $5 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + local.get $8 + if + local.get $8 + local.get $6 + call $~lib/collector/dummy/__ref_unlink + end + local.get $7 local.get $6 - call $~lib/runtime/doRetain - local.get $5 + call $~lib/collector/dummy/__ref_link + local.get $7 + else + local.get $7 end i32.store local.get $0 @@ -2993,31 +3013,41 @@ ) (func $~lib/array/Array#push (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $0 i32.load offset=12 + local.set $2 + local.get $2 i32.const 1 i32.add - local.set $2 + local.set $3 local.get $0 - local.get $2 + local.get $3 i32.const 2 call $~lib/array/ensureCapacity local.get $0 - local.get $2 - i32.store offset=12 - local.get $0 i32.load offset=4 local.get $2 - i32.const 1 - i32.sub i32.const 2 i32.shl i32.add local.get $1 i32.store - local.get $2 + local.get $0 + local.get $3 + i32.store offset=12 + local.get $3 + ) + (func $~lib/array/Array#__unchecked_get (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load ) - (func $~lib/array/Array#__get (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3027,20 +3057,16 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 98 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 + call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#pop (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3052,7 +3078,7 @@ if i32.const 0 i32.const 272 - i32.const 245 + i32.const 308 i32.const 20 call $~lib/env/abort unreachable @@ -3073,7 +3099,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#concat (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3103,7 +3129,7 @@ local.get $4 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $6 local.get $6 @@ -3129,7 +3155,7 @@ call $~lib/memory/memory.copy local.get $6 ) - (func $~lib/array/Array#copyWithin (; 44 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 45 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3319,7 +3345,7 @@ end local.get $0 ) - (func $std/array/isArraysEqual (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -3374,7 +3400,7 @@ end i32.const 1 ) - (func $~lib/array/Array#unshift (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#unshift (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3407,7 +3433,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#shift (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3421,7 +3447,7 @@ if i32.const 0 i32.const 272 - i32.const 306 + i32.const 380 i32.const 20 call $~lib/env/abort unreachable @@ -3456,7 +3482,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#reverse (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#reverse (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3511,7 +3537,7 @@ end local.get $0 ) - (func $~lib/array/Array#indexOf (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3583,7 +3609,7 @@ end i32.const -1 ) - (func $~lib/array/Array#includes (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 local.get $2 @@ -3591,7 +3617,7 @@ i32.const 0 i32.ge_s ) - (func $~lib/array/Array#splice (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3655,7 +3681,7 @@ local.get $4 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $6 local.get $6 @@ -3670,36 +3696,6 @@ i32.shl i32.add local.set $9 - block $break|0 - i32.const 0 - local.set $4 - loop $repeat|0 - local.get $4 - local.get $2 - i32.lt_s - i32.eqz - br_if $break|0 - local.get $7 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $9 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load - i32.store - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $repeat|0 - unreachable - end - unreachable - end local.get $6 i32.load offset=4 local.get $9 @@ -3735,7 +3731,17 @@ i32.store offset=12 local.get $6 ) - (func $~lib/array/Array#__set (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + ) + (func $~lib/array/Array#__set (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3747,13 +3753,9 @@ i32.const 2 call $~lib/array/ensureCapacity local.get $0 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - i32.add local.get $2 - i32.store + call $~lib/array/Array#__unchecked_set local.get $1 local.get $3 i32.ge_s @@ -3765,12 +3767,12 @@ i32.store offset=12 end ) - (func $start:std/array~anonymous|0 (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $~lib/array/Array#findIndex (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3829,17 +3831,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3848,12 +3850,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|4 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|4 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3861,12 +3863,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 63 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3926,12 +3928,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3940,12 +3942,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3953,12 +3955,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 69 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4017,12 +4019,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 71 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4031,12 +4033,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 71 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 73 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4044,13 +4046,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 72 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 74 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 73 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 75 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4102,7 +4104,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 74 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4112,13 +4114,13 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|18 (; 75 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|18 (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -4127,7 +4129,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 79 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.const 0 @@ -4242,18 +4244,17 @@ end end ) - (func $start:std/array~anonymous|21 (; 78 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 80 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#map (; 79 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 81 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 f32) local.get $0 i32.load offset=12 local.set $2 @@ -4266,7 +4267,7 @@ local.get $3 i32.const 9 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $5 local.get $5 @@ -4298,6 +4299,11 @@ i32.add i32.load local.set $4 + local.get $6 + local.get $3 + i32.const 2 + i32.shl + i32.add block (result f32) i32.const 3 global.set $~lib/argc @@ -4307,13 +4313,6 @@ local.get $1 call_indirect (type $FUNCSIG$fiii) end - local.set $8 - local.get $6 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $8 f32.store end local.get $3 @@ -4327,11 +4326,20 @@ end local.get $5 ) - (func $~lib/array/Array#get:length (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 82 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 81 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__unchecked_get (; 83 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + ) + (func $~lib/array/Array#__get (; 84 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -4341,20 +4349,16 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 98 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 - f32.load + call $~lib/array/Array#__unchecked_get ) - (func $start:std/array~anonymous|22 (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 85 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4365,7 +4369,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 83 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 86 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4384,7 +4388,7 @@ local.get $3 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $5 local.get $5 @@ -4416,6 +4420,11 @@ i32.add i32.load local.set $4 + local.get $6 + local.get $3 + i32.const 2 + i32.shl + i32.add block (result i32) i32.const 3 global.set $~lib/argc @@ -4425,13 +4434,6 @@ local.get $1 call_indirect (type $FUNCSIG$iiii) end - local.set $7 - local.get $6 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $7 i32.store end local.get $3 @@ -4445,14 +4447,14 @@ end local.get $5 ) - (func $start:std/array~anonymous|23 (; 84 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 85 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 88 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4462,12 +4464,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 86 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 89 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 87 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 90 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4482,7 +4484,7 @@ local.get $2 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $4 block $break|0 @@ -4545,7 +4547,7 @@ end local.get $4 ) - (func $start:std/array~anonymous|26 (; 88 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 91 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4558,7 +4560,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 89 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 92 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -4567,7 +4569,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 90 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4579,12 +4581,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 91 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 94 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 92 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 95 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4642,12 +4644,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|30 (; 93 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|30 (; 96 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|31 (; 94 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 97 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4659,7 +4661,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduce (; 95 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 98 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4717,7 +4719,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|32 (; 96 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4729,7 +4731,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|33 (; 97 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4738,12 +4740,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|34 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|34 (; 101 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 102 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4751,12 +4753,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|36 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|36 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 101 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 104 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4801,12 +4803,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|37 (; 102 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|37 (; 105 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|38 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|38 (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4818,7 +4820,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduceRight (; 104 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 107 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4863,7 +4865,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|39 (; 105 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|39 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4875,7 +4877,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|40 (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|40 (; 109 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4884,12 +4886,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|41 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|41 (; 110 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|42 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|42 (; 111 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4897,7 +4899,7 @@ local.get $1 i32.add ) - (func $~lib/math/murmurHash3 (; 109 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 112 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -4926,7 +4928,7 @@ local.set $0 local.get $0 ) - (func $~lib/math/splitMix32 (; 110 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 113 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -4961,7 +4963,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 111 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 114 ;) (type $FUNCSIG$vj) (param $0 i64) local.get $0 i64.eqz if @@ -4990,7 +4992,7 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/util/sort/insertionSort (; 112 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 115 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f32) (local $5 i32) @@ -5086,7 +5088,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 113 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 116 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5386,7 +5388,7 @@ local.get $10 f32.store ) - (func $~lib/array/Array#sort (; 114 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -5399,7 +5401,7 @@ if i32.const 0 i32.const 272 - i32.const 418 + i32.const 525 i32.const 4 call $~lib/env/abort unreachable @@ -5472,7 +5474,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 115 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 118 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5505,7 +5507,7 @@ i32.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 119 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -5524,12 +5526,12 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/builtins/isNaN (; 117 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 120 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $std/array/isArraysEqual (; 118 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 121 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -5600,7 +5602,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 119 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 122 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) @@ -5696,7 +5698,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 120 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 123 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5996,7 +5998,7 @@ local.get $10 f64.store ) - (func $~lib/array/Array#sort (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 124 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -6009,7 +6011,7 @@ if i32.const 0 i32.const 272 - i32.const 418 + i32.const 525 i32.const 4 call $~lib/env/abort unreachable @@ -6082,7 +6084,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 122 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 125 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -6115,7 +6117,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 123 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6134,11 +6136,20 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/array/Array#get:length (; 124 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 127 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 125 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__unchecked_get (; 128 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + ) + (func $~lib/array/Array#__get (; 129 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -6148,25 +6159,21 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load + call $~lib/array/Array#__unchecked_get ) - (func $~lib/builtins/isNaN (; 126 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 130 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $std/array/isArraysEqual (; 127 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -6237,7 +6244,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 128 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 132 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6333,7 +6340,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 129 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 133 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6633,7 +6640,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 130 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 134 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6644,7 +6651,7 @@ if i32.const 0 i32.const 272 - i32.const 418 + i32.const 525 i32.const 4 call $~lib/env/abort unreachable @@ -6717,12 +6724,12 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 131 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6741,7 +6748,7 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/util/sort/insertionSort (; 133 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 137 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6837,7 +6844,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 134 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 138 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7137,7 +7144,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7148,7 +7155,7 @@ if i32.const 0 i32.const 272 - i32.const 418 + i32.const 525 i32.const 4 call $~lib/env/abort unreachable @@ -7221,7 +7228,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -7230,7 +7237,7 @@ i32.lt_u i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -7249,7 +7256,7 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/array/Array.create (; 138 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create (; 142 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7261,7 +7268,7 @@ if i32.const 0 i32.const 272 - i32.const 44 + i32.const 43 i32.const 62 call $~lib/env/abort unreachable @@ -7275,7 +7282,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $3 local.get $3 @@ -7289,7 +7296,7 @@ i32.store offset=12 local.get $3 ) - (func $std/array/createReverseOrderedArray (; 139 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -7323,7 +7330,7 @@ end local.get $1 ) - (func $~lib/math/NativeMath.random (; 140 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 144 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) (local $2 i64) @@ -7380,7 +7387,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 141 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -7414,12 +7421,12 @@ end local.get $1 ) - (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $std/array/isSorted (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -7467,7 +7474,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 144 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 148 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -7483,7 +7490,7 @@ unreachable end ) - (func $std/array/assertSortedDefault (; 145 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 149 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 block $~lib/util/sort/COMPARATOR|inlined.1 (result i32) i32.const 48 @@ -7491,27 +7498,27 @@ end call $std/array/assertSorted ) - (func $start:std/array~anonymous|43 (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|43 (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|44 (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $start:std/array~anonymous|45 (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|45 (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|46 (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|46 (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array.create> (; 150 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create> (; 154 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7523,7 +7530,7 @@ if i32.const 0 i32.const 272 - i32.const 44 + i32.const 43 i32.const 62 call $~lib/env/abort unreachable @@ -7537,7 +7544,7 @@ local.get $1 i32.const 11 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $3 local.get $3 @@ -7551,24 +7558,41 @@ i32.store offset=12 local.get $3 ) - (func $~lib/collector/dummy/__gc_release (; 151 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/runtime/doRelease (; 152 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - call $~lib/runtime/assertRegistered - local.get $1 - call $~lib/runtime/assertRegistered + (func $~lib/array/Array>#__unchecked_set (; 155 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 + i32.load offset=4 local.get $1 - call $~lib/collector/dummy/__gc_release + i32.const 2 + i32.shl + i32.add + local.set $3 + local.get $3 + i32.load + local.set $4 + local.get $2 + local.get $4 + i32.ne + if + local.get $3 + local.get $2 + i32.store + local.get $4 + i32.const 0 + i32.ne + if + local.get $4 + local.get $0 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $0 + call $~lib/collector/dummy/__ref_link + end ) - (func $~lib/array/Array>#__set (; 153 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__set (; 156 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) local.get $0 i32.load offset=12 local.set $3 @@ -7578,7 +7602,7 @@ if i32.const 0 i32.const 272 - i32.const 109 + i32.const 110 i32.const 38 call $~lib/env/abort unreachable @@ -7590,44 +7614,9 @@ i32.const 2 call $~lib/array/ensureCapacity local.get $0 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - i32.add - local.set $4 - local.get $4 - i32.load - local.set $5 local.get $2 - local.get $5 - i32.ne - if - local.get $5 - i32.const 0 - i32.ne - if - local.get $5 - local.set $7 - local.get $0 - local.set $6 - local.get $7 - local.get $6 - call $~lib/runtime/doRelease - end - local.get $4 - block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) - local.get $2 - local.set $7 - local.get $0 - local.set $6 - local.get $7 - local.get $6 - call $~lib/runtime/doRetain - local.get $7 - end - i32.store - end + call $~lib/array/Array>#__unchecked_set local.get $1 local.get $3 i32.ge_s @@ -7639,7 +7628,7 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedNestedArray (; 154 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7683,7 +7672,7 @@ end local.get $1 ) - (func $start:std/array~anonymous|47 (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -7692,7 +7681,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/util/sort/insertionSort> (; 156 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort> (; 159 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7788,7 +7777,7 @@ unreachable end ) - (func $~lib/array/Array>#sort (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7799,7 +7788,7 @@ if i32.const 0 i32.const 272 - i32.const 418 + i32.const 525 i32.const 4 call $~lib/env/abort unreachable @@ -7862,11 +7851,20 @@ end local.get $0 ) - (func $~lib/array/Array>#get:length (; 158 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#get:length (; 161 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array>#__get (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__unchecked_get (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $~lib/array/Array>#__get (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -7874,7 +7872,7 @@ if i32.const 0 i32.const 272 - i32.const 97 + i32.const 95 i32.const 45 call $~lib/env/abort unreachable @@ -7888,20 +7886,16 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 98 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 + call $~lib/array/Array>#__unchecked_get ) - (func $std/array/isSorted> (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -7949,7 +7943,7 @@ end i32.const 1 ) - (func $std/array/assertSorted> (; 161 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 165 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -7965,7 +7959,7 @@ unreachable end ) - (func $~lib/array/Array.create> (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create> (; 166 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7977,7 +7971,7 @@ if i32.const 0 i32.const 272 - i32.const 44 + i32.const 43 i32.const 62 call $~lib/env/abort unreachable @@ -7991,7 +7985,7 @@ local.get $1 i32.const 12 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $3 local.get $3 @@ -8005,7 +7999,7 @@ i32.store offset=12 local.get $3 ) - (func $std/array/Proxy#constructor (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/Proxy#constructor (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.eqz @@ -8015,12 +8009,12 @@ i32.const 4 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 13 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -8029,12 +8023,41 @@ i32.store local.get $0 ) - (func $~lib/array/Array>#__set (; 164 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__unchecked_set (; 168 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $3 + local.get $3 + i32.load + local.set $4 + local.get $2 + local.get $4 + i32.ne + if + local.get $3 + local.get $2 + i32.store + local.get $4 + i32.const 0 + i32.ne + if + local.get $4 + local.get $0 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $0 + call $~lib/collector/dummy/__ref_link + end + ) + (func $~lib/array/Array>#__set (; 169 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) local.get $0 i32.load offset=12 local.set $3 @@ -8044,7 +8067,7 @@ if i32.const 0 i32.const 272 - i32.const 109 + i32.const 110 i32.const 38 call $~lib/env/abort unreachable @@ -8056,44 +8079,9 @@ i32.const 2 call $~lib/array/ensureCapacity local.get $0 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - i32.add - local.set $4 - local.get $4 - i32.load - local.set $5 local.get $2 - local.get $5 - i32.ne - if - local.get $5 - i32.const 0 - i32.ne - if - local.get $5 - local.set $7 - local.get $0 - local.set $6 - local.get $7 - local.get $6 - call $~lib/runtime/doRelease - end - local.get $4 - block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) - local.get $2 - local.set $7 - local.get $0 - local.set $6 - local.get $7 - local.get $6 - call $~lib/runtime/doRetain - local.get $7 - end - i32.store - end + call $~lib/array/Array>#__unchecked_set local.get $1 local.get $3 i32.ge_s @@ -8105,7 +8093,7 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedElementsArray (; 165 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 170 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -8141,14 +8129,14 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/util/sort/insertionSort> (; 167 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort> (; 172 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8244,7 +8232,7 @@ unreachable end ) - (func $~lib/array/Array>#sort (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8255,7 +8243,7 @@ if i32.const 0 i32.const 272 - i32.const 418 + i32.const 525 i32.const 4 call $~lib/env/abort unreachable @@ -8318,11 +8306,20 @@ end local.get $0 ) - (func $~lib/array/Array>#get:length (; 169 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#get:length (; 174 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array>#__get (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__unchecked_get (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $~lib/array/Array>#__get (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -8330,7 +8327,7 @@ if i32.const 0 i32.const 272 - i32.const 97 + i32.const 95 i32.const 45 call $~lib/env/abort unreachable @@ -8344,20 +8341,16 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 98 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 + call $~lib/array/Array>#__unchecked_get ) - (func $std/array/isSorted> (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -8405,7 +8398,7 @@ end i32.const 1 ) - (func $std/array/assertSorted> (; 172 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 178 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -8421,7 +8414,7 @@ unreachable end ) - (func $~lib/util/sort/insertionSort (; 173 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 179 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8517,7 +8510,7 @@ unreachable end ) - (func $~lib/array/Array#sort (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8528,7 +8521,7 @@ if i32.const 0 i32.const 272 - i32.const 418 + i32.const 525 i32.const 4 call $~lib/env/abort unreachable @@ -8577,7 +8570,7 @@ local.get $0 return end - block $~lib/util/sort/SORT|inlined.0 + block $~lib/util/sort/SORT|inlined.0 local.get $3 local.set $6 local.get $2 @@ -8587,27 +8580,24 @@ local.get $6 local.get $4 local.get $5 - call $~lib/util/sort/insertionSort + call $~lib/util/sort/insertionSort end local.get $0 ) - (func $~lib/array/Array#get:length (; 175 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 181 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $1 + (func $~lib/array/Array#__unchecked_get (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 0 - i32.const 272 - i32.const 97 - i32.const 45 - call $~lib/env/abort - unreachable - end + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $~lib/array/Array#__get (; 183 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -8617,20 +8607,16 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 98 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 + call $~lib/array/Array#__unchecked_get ) - (func $std/array/isSorted (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -8638,7 +8624,7 @@ i32.const 1 local.set $2 local.get $0 - call $~lib/array/Array#get:length + call $~lib/array/Array#get:length local.set $3 end loop $repeat|0 @@ -8654,10 +8640,10 @@ local.get $2 i32.const 1 i32.sub - call $~lib/array/Array#__get + call $~lib/array/Array#__get local.get $0 local.get $2 - call $~lib/array/Array#__get + call $~lib/array/Array#__get local.get $1 call_indirect (type $FUNCSIG$iii) end @@ -8678,12 +8664,12 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 178 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 185 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 - call $~lib/array/Array#sort + call $~lib/array/Array#sort local.get $1 - call $std/array/isSorted + call $std/array/isSorted i32.eqz if i32.const 0 @@ -8694,7 +8680,7 @@ unreachable end ) - (func $~lib/string/String#get:length (; 179 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 186 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -8702,7 +8688,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 180 ;) (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 (; 187 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -8755,7 +8741,7 @@ end local.get $5 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8828,7 +8814,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted|trampoline (; 182 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted|trampoline (; 189 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $1of1 block $0of1 block $outOfRange @@ -8839,17 +8825,17 @@ end unreachable end - block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) i32.const 55 - br $~lib/util/sort/COMPARATOR|inlined.0 + br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 end local.get $0 local.get $1 - call $std/array/assertSorted + call $std/array/assertSorted ) - (func $~lib/string/String.__eq (; 183 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -8893,23 +8879,23 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.__ne (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__eq i32.eqz ) - (func $std/array/isArraysEqual (; 185 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 192 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz if local.get $0 - call $~lib/array/Array#get:length + call $~lib/array/Array#get:length local.set $2 local.get $2 local.get $1 - call $~lib/array/Array#get:length + call $~lib/array/Array#get:length i32.ne if i32.const 0 @@ -8934,10 +8920,10 @@ br_if $break|0 local.get $0 local.get $3 - call $~lib/array/Array#__get + call $~lib/array/Array#__get local.get $1 local.get $3 - call $~lib/array/Array#__get + call $~lib/array/Array#__get call $~lib/string/String.__ne if i32.const 0 @@ -8954,7 +8940,7 @@ end i32.const 1 ) - (func $~lib/array/Array.create (; 186 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create (; 193 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8966,7 +8952,7 @@ if i32.const 0 i32.const 272 - i32.const 44 + i32.const 43 i32.const 62 call $~lib/env/abort unreachable @@ -8978,9 +8964,9 @@ local.set $1 local.get $2 local.get $1 - i32.const 14 + i32.const 15 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $3 local.get $3 @@ -8994,7 +8980,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/string/String#charAt (; 187 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#charAt (; 194 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -9004,7 +8990,7 @@ if i32.const 0 i32.const 4376 - i32.const 37 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -9021,7 +9007,7 @@ i32.const 2 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $3 local.get $3 @@ -9037,10 +9023,10 @@ local.set $2 local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/string/String#concat (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 195 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9078,7 +9064,7 @@ local.get $4 local.set $5 local.get $5 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $6 local.get $6 @@ -9096,10 +9082,10 @@ local.set $5 local.get $5 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/string/String.__concat (; 189 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 4424 local.get $0 @@ -9109,7 +9095,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 190 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 197 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -9151,22 +9137,51 @@ end local.get $1 ) - (func $~lib/array/Array#__set (; 191 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 198 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) local.get $0 - i32.load offset=12 - local.set $3 + i32.load offset=4 local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $3 local.get $3 - i32.gt_u + i32.load + local.set $4 + local.get $2 + local.get $4 + i32.ne + if + local.get $3 + local.get $2 + i32.store + local.get $4 + i32.const 0 + i32.ne + if + local.get $4 + local.get $0 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $0 + call $~lib/collector/dummy/__ref_link + end + ) + (func $~lib/array/Array#__set (; 199 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.set $3 + local.get $1 + local.get $3 + i32.gt_u if i32.const 0 i32.const 272 - i32.const 109 + i32.const 110 i32.const 38 call $~lib/env/abort unreachable @@ -9178,44 +9193,9 @@ i32.const 2 call $~lib/array/ensureCapacity local.get $0 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - i32.add - local.set $4 - local.get $4 - i32.load - local.set $5 local.get $2 - local.get $5 - i32.ne - if - local.get $5 - i32.const 0 - i32.ne - if - local.get $5 - local.set $7 - local.get $0 - local.set $6 - local.get $7 - local.get $6 - call $~lib/runtime/doRelease - end - local.get $4 - block $~lib/runtime/RETAIN>|inlined.0 (result i32) - local.get $2 - local.set $7 - local.get $0 - local.set $6 - local.get $7 - local.get $6 - call $~lib/runtime/doRetain - local.get $7 - end - i32.store - end + call $~lib/array/Array#__unchecked_set local.get $1 local.get $3 i32.ge_s @@ -9227,7 +9207,7 @@ i32.store offset=12 end ) - (func $std/array/createRandomStringArray (; 192 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomStringArray (; 200 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -9261,7 +9241,379 @@ end local.get $1 ) - (func $~lib/string/String#substring (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/sort/insertionSort (; 201 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + block $break|0 + i32.const 0 + local.set $3 + loop $repeat|0 + local.get $3 + local.get $1 + i32.lt_s + i32.eqz + br_if $break|0 + block + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $4 + local.get $3 + i32.const 1 + i32.sub + local.set $5 + block $break|1 + loop $continue|1 + local.get $5 + i32.const 0 + i32.ge_s + if + block + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + block (result i32) + i32.const 2 + global.set $~lib/argc + local.get $4 + local.get $6 + local.get $2 + call_indirect (type $FUNCSIG$iii) + end + i32.const 0 + i32.lt_s + if + local.get $0 + block (result i32) + local.get $5 + local.tee $7 + i32.const 1 + i32.sub + local.set $5 + local.get $7 + end + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $6 + i32.store + else + br $break|1 + end + end + br $continue|1 + end + end + end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + i32.store + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $repeat|0 + unreachable + end + unreachable + end + ) + (func $~lib/array/Array#sort (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 272 + i32.const 525 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=12 + local.set $2 + local.get $2 + i32.const 1 + i32.le_s + if + local.get $0 + return + end + local.get $0 + i32.load offset=4 + local.set $3 + local.get $2 + i32.const 2 + i32.eq + if + local.get $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load + local.set $5 + block (result i32) + i32.const 2 + global.set $~lib/argc + local.get $4 + local.get $5 + local.get $1 + call_indirect (type $FUNCSIG$iii) + end + i32.const 0 + i32.lt_s + if + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store + end + local.get $0 + return + end + block $~lib/util/sort/SORT|inlined.0 + local.get $3 + local.set $6 + local.get $2 + local.set $4 + local.get $1 + local.set $5 + local.get $6 + local.get $4 + local.get $5 + call $~lib/util/sort/insertionSort + end + local.get $0 + ) + (func $~lib/array/Array#get:length (; 203 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $~lib/array/Array#__unchecked_get (; 204 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $~lib/array/Array#__get (; 205 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 272 + i32.const 95 + i32.const 45 + call $~lib/env/abort + unreachable + end + 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 272 + i32.const 98 + i32.const 61 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get + ) + (func $std/array/isSorted (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + block $break|0 + block + i32.const 1 + local.set $2 + local.get $0 + call $~lib/array/Array#get:length + local.set $3 + end + loop $repeat|0 + local.get $2 + local.get $3 + i32.lt_s + i32.eqz + br_if $break|0 + block (result i32) + i32.const 2 + global.set $~lib/argc + local.get $0 + local.get $2 + i32.const 1 + i32.sub + call $~lib/array/Array#__get + local.get $0 + local.get $2 + call $~lib/array/Array#__get + local.get $1 + call_indirect (type $FUNCSIG$iii) + end + i32.const 0 + i32.gt_s + if + i32.const 0 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + unreachable + end + unreachable + end + i32.const 1 + ) + (func $std/array/assertSorted (; 207 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/array/Array#sort + local.get $1 + call $std/array/isSorted + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 814 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + local.get $1 + i32.eq + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + i32.const 0 + i32.eq + end + local.tee $2 + if (result i32) + local.get $2 + else + local.get $1 + i32.const 0 + i32.eq + end + if + i32.const 0 + return + end + local.get $0 + call $~lib/string/String#get:length + local.set $3 + local.get $1 + call $~lib/string/String#get:length + local.set $4 + local.get $3 + i32.eqz + local.tee $2 + if (result i32) + local.get $4 + i32.eqz + else + local.get $2 + end + if + i32.const 0 + return + end + local.get $3 + i32.eqz + if + i32.const -1 + return + end + local.get $4 + i32.eqz + if + i32.const 1 + return + end + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + local.get $3 + local.tee $2 + local.get $4 + local.tee $5 + local.get $2 + local.get $5 + i32.lt_s + select + call $~lib/util/string/compareImpl + ) + (func $std/array/assertSorted|trampoline (; 209 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) + i32.const 56 + br $~lib/util/sort/COMPARATOR|inlined.0 + end + local.set $1 + end + local.get $0 + local.get $1 + call $std/array/assertSorted + ) + (func $~lib/string/String#substring (; 210 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9277,7 +9629,7 @@ if i32.const 0 i32.const 4376 - i32.const 187 + i32.const 189 i32.const 4 call $~lib/env/abort unreachable @@ -9370,7 +9722,7 @@ local.get $3 local.set $4 local.get $4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $10 local.get $10 @@ -9384,18 +9736,44 @@ local.set $4 local.get $4 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/runtime/doDiscard (; 194 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/discard (; 211 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 - call $~lib/runtime/assertUnregistered + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable + end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $1 + local.get $1 + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 187 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 call $~lib/memory/memory.free ) - (func $~lib/array/Array#join_bool (; 195 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_bool (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9452,7 +9830,7 @@ i32.shl local.set $7 local.get $7 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $8 i32.const 0 @@ -9569,7 +9947,7 @@ local.get $8 local.set $11 local.get $11 - call $~lib/runtime/doDiscard + call $~lib/runtime/discard end local.get $7 return @@ -9579,16 +9957,16 @@ local.set $7 local.get $7 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 213 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_bool return ) - (func $~lib/util/number/decimalCount32 (; 197 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 214 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -9657,7 +10035,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa32_lut (; 198 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 215 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9800,7 +10178,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 199 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 216 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9835,7 +10213,7 @@ i32.shl local.set $3 local.get $3 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $4 block $~lib/util/number/utoa32_core|inlined.0 @@ -9861,15 +10239,15 @@ local.set $3 local.get $3 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/util/number/itoa (; 200 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 217 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 201 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 218 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9928,7 +10306,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 219 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9978,7 +10356,7 @@ i32.shl local.set $6 local.get $6 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 i32.const 0 @@ -10061,7 +10439,7 @@ local.get $7 local.set $10 local.get $10 - call $~lib/runtime/doDiscard + call $~lib/runtime/discard end local.get $6 return @@ -10071,16 +10449,16 @@ local.set $6 local.get $6 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 203 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 220 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/util/number/utoa32 (; 204 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 221 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10101,7 +10479,7 @@ i32.shl local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $3 block $~lib/util/number/utoa32_core|inlined.2 @@ -10121,15 +10499,15 @@ local.set $2 local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/util/number/itoa (; 205 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 222 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 206 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 223 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10168,7 +10546,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 224 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10218,7 +10596,7 @@ i32.shl local.set $6 local.get $6 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 i32.const 0 @@ -10301,7 +10679,7 @@ local.get $7 local.set $10 local.get $10 - call $~lib/runtime/doDiscard + call $~lib/runtime/discard end local.get $6 return @@ -10311,23 +10689,41 @@ local.set $6 local.get $6 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/builtins/isFinite (; 209 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 226 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/util/number/genDigits (; 210 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 227 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $~lib/array/Array#__unchecked_get (; 228 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + ) + (func $~lib/util/number/genDigits (; 229 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -10898,7 +11294,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 211 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 230 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11231,7 +11627,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 212 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 231 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -11401,20 +11797,12 @@ i32.sub global.set $~lib/util/number/_K i32.const 6328 - i32.load offset=4 local.get $13 - i32.const 3 - i32.shl - i32.add - i64.load + call $~lib/array/Array#__unchecked_get global.set $~lib/util/number/_frc_pow i32.const 6552 - i32.load offset=4 local.get $13 - i32.const 1 - i32.shl - i32.add - i32.load16_s + call $~lib/array/Array#__unchecked_get global.set $~lib/util/number/_exp_pow end local.get $9 @@ -11677,7 +12065,7 @@ local.get $2 i32.add ) - (func $~lib/util/number/dtoa (; 213 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 232 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11713,7 +12101,7 @@ i32.shl local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 @@ -11729,11 +12117,11 @@ local.get $2 local.set $1 local.get $1 - call $~lib/runtime/doDiscard + call $~lib/runtime/discard end local.get $4 ) - (func $~lib/util/number/dtoa_stream (; 214 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 233 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11807,7 +12195,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join_flt (; 215 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_flt (; 234 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11857,7 +12245,7 @@ i32.shl local.set $6 local.get $6 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 i32.const 0 @@ -11940,7 +12328,7 @@ local.get $7 local.set $10 local.get $10 - call $~lib/runtime/doDiscard + call $~lib/runtime/discard end local.get $6 return @@ -11950,16 +12338,16 @@ local.set $6 local.get $6 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 216 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 235 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_flt return ) - (func $~lib/array/Array#join_str (; 217 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_str (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12051,7 +12439,7 @@ i32.shl local.set $8 local.get $8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $10 block $break|1 @@ -12148,16 +12536,16 @@ local.set $8 local.get $8 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 218 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 237 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_str return ) - (func $std/array/Ref#constructor (; 219 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/Ref#constructor (; 238 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -12167,18 +12555,18 @@ i32.const 0 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 - i32.const 18 - call $~lib/runtime/doRegister + i32.const 19 + call $~lib/runtime/register end local.set $0 end local.get $0 ) - (func $~lib/array/Array#join_ref (; 220 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_ref (; 239 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12226,7 +12614,7 @@ i32.shl local.set $6 local.get $6 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 i32.const 0 @@ -12327,7 +12715,7 @@ local.get $7 local.set $10 local.get $10 - call $~lib/runtime/doDiscard + call $~lib/runtime/discard end local.get $6 return @@ -12337,21 +12725,21 @@ local.set $6 local.get $6 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 240 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_ref return ) - (func $~lib/array/Array#toString (; 222 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 241 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 242 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -12360,7 +12748,7 @@ call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 224 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 243 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12435,7 +12823,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 244 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12485,7 +12873,7 @@ i32.shl local.set $6 local.get $6 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 i32.const 0 @@ -12568,7 +12956,7 @@ local.get $7 local.set $10 local.get $10 - call $~lib/runtime/doDiscard + call $~lib/runtime/discard end local.get $6 return @@ -12578,28 +12966,28 @@ local.set $6 local.get $6 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 245 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 227 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 246 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa (; 228 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 65535 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 229 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 248 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12644,7 +13032,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 230 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 249 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12694,7 +13082,7 @@ i32.shl local.set $6 local.get $6 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 i32.const 0 @@ -12777,7 +13165,7 @@ local.get $7 local.set $10 local.get $10 - call $~lib/runtime/doDiscard + call $~lib/runtime/discard end local.get $6 return @@ -12787,21 +13175,21 @@ local.set $6 local.get $6 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 231 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 232 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 251 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/decimalCount64 (; 233 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 252 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -12870,7 +13258,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 234 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 253 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -12998,7 +13386,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 235 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 254 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13029,7 +13417,7 @@ i32.shl local.set $4 local.get $4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 block $~lib/util/number/utoa32_core|inlined.8 @@ -13054,7 +13442,7 @@ i32.shl local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 block $~lib/util/number/utoa64_core|inlined.0 @@ -13075,15 +13463,15 @@ local.set $3 local.get $3 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/util/number/itoa (; 236 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 255 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/utoa64 return ) - (func $~lib/util/number/itoa_stream (; 237 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 256 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13149,7 +13537,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13199,7 +13587,7 @@ i32.shl local.set $6 local.get $6 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 i32.const 0 @@ -13282,7 +13670,7 @@ local.get $7 local.set $10 local.get $10 - call $~lib/runtime/doDiscard + call $~lib/runtime/discard end local.get $6 return @@ -13292,21 +13680,21 @@ local.set $6 local.get $6 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 239 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 240 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 259 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa64 (; 241 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 260 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13351,7 +13739,7 @@ i32.shl local.set $5 local.get $5 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 block $~lib/util/number/utoa32_core|inlined.10 @@ -13378,7 +13766,7 @@ i32.shl local.set $3 local.get $3 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 block $~lib/util/number/utoa64_core|inlined.2 @@ -13405,15 +13793,15 @@ local.set $4 local.get $4 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/util/number/itoa (; 242 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 261 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/itoa64 return ) - (func $~lib/util/number/itoa_stream (; 243 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 262 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13501,7 +13889,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 244 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 263 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13551,7 +13939,7 @@ i32.shl local.set $6 local.get $6 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 i32.const 0 @@ -13634,7 +14022,7 @@ local.get $7 local.set $10 local.get $10 - call $~lib/runtime/doDiscard + call $~lib/runtime/discard end local.get $6 return @@ -13644,26 +14032,229 @@ local.set $6 local.get $6 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 245 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 264 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 246 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 265 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array#toString (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_str (; 266 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $0 + i32.load offset=12 + i32.const 1 + i32.sub + local.set $2 + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 4200 + return + end + local.get $0 + i32.load offset=4 + local.set $3 + local.get $2 + i32.eqz + if + local.get $3 + i32.load + return + end + local.get $1 + call $~lib/string/String#get:length + local.set $4 + i32.const 0 + local.set $5 + block $break|0 + block + i32.const 0 + local.set $7 + local.get $2 + i32.const 1 + i32.add + local.set $8 + end + loop $repeat|0 + local.get $7 + local.get $8 + i32.lt_s + i32.eqz + br_if $break|0 + block + local.get $3 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 + i32.const 0 + i32.ne + if + local.get $5 + local.get $6 + call $~lib/string/String#get:length + i32.add + local.set $5 + end + end + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $repeat|0 + unreachable + end + unreachable + end + i32.const 0 + local.set $9 + block $~lib/runtime/ALLOCATE|inlined.27 (result i32) + local.get $5 + local.get $4 + local.get $2 + i32.mul + i32.add + i32.const 1 + i32.shl + local.set $8 + local.get $8 + call $~lib/runtime/allocate + end + local.set $10 + block $break|1 + i32.const 0 + local.set $8 + loop $repeat|1 + local.get $8 + local.get $2 + i32.lt_s + i32.eqz + br_if $break|1 + block + local.get $3 + local.get $8 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 + i32.const 0 + i32.ne + if + local.get $6 + call $~lib/string/String#get:length + local.set $7 + local.get $10 + local.get $9 + i32.const 1 + i32.shl + i32.add + local.get $6 + local.get $7 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $9 + local.get $7 + i32.add + local.set $9 + end + local.get $4 + if + local.get $10 + local.get $9 + i32.const 1 + i32.shl + i32.add + local.get $1 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $9 + local.get $4 + i32.add + local.set $9 + end + end + local.get $8 + i32.const 1 + i32.add + local.set $8 + br $repeat|1 + unreachable + end + unreachable + end + local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 + i32.const 0 + i32.ne + if + local.get $10 + local.get $9 + i32.const 1 + i32.shl + i32.add + local.get $6 + local.get $6 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + end + block $~lib/runtime/REGISTER|inlined.17 (result i32) + local.get $10 + local.set $8 + local.get $8 + i32.const 1 + call $~lib/runtime/register + end + ) + (func $~lib/array/Array#join (; 267 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_str + return + ) + (func $~lib/array/Array#toString (; 268 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 4528 + call $~lib/array/Array#join + ) + (func $~lib/array/Array#toString (; 269 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array>#join_arr (; 248 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 270 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13767,25 +14358,25 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 249 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 271 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>#toString (; 250 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#toString (; 272 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array>#join ) - (func $~lib/util/number/itoa (; 251 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 273 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 252 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 274 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13830,7 +14421,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 253 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 275 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13874,13 +14465,13 @@ i32.const 10 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.27 (result i32) + block $~lib/runtime/ALLOCATE|inlined.28 (result i32) local.get $5 i32.const 1 i32.shl local.set $6 local.get $6 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 i32.const 0 @@ -13963,26 +14554,26 @@ local.get $7 local.set $10 local.get $10 - call $~lib/runtime/doDiscard + call $~lib/runtime/discard end local.get $6 return end - block $~lib/runtime/REGISTER|inlined.17 (result i32) + block $~lib/runtime/REGISTER|inlined.18 (result i32) local.get $7 local.set $6 local.get $6 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 254 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 276 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array>#join_arr (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 277 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14086,18 +14677,18 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 278 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>#toString (; 257 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#toString (; 279 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array>#join ) - (func $~lib/array/Array>#join_arr (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 280 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14201,13 +14792,13 @@ end local.get $3 ) - (func $~lib/array/Array>#join (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join (; 281 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>>#join_arr (; 260 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#join_arr (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14311,18 +14902,18 @@ end local.get $3 ) - (func $~lib/array/Array>>#join (; 261 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#join (; 283 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array>>#join_arr return ) - (func $~lib/array/Array>>#toString (; 262 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>>#toString (; 284 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array>>#join ) - (func $start:std/array (; 263 ;) (type $FUNCSIG$v) + (func $start:std/array (; 285 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14440,7 +15031,7 @@ local.get $1 i32.const 7 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -14469,7 +15060,7 @@ local.get $0 i32.const 7 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -14498,7 +15089,7 @@ local.get $1 i32.const 7 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -14527,7 +15118,7 @@ local.get $0 i32.const 7 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -14556,7 +15147,7 @@ local.get $1 i32.const 7 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -14585,7 +15176,7 @@ local.get $0 i32.const 8 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -14614,7 +15205,7 @@ local.get $1 i32.const 8 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -14643,7 +15234,7 @@ local.get $0 i32.const 8 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -14672,7 +15263,7 @@ local.get $1 i32.const 8 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -14701,7 +15292,7 @@ local.get $0 i32.const 8 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -15056,7 +15647,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $~lib/array/Array#concat drop @@ -15335,7 +15926,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15352,7 +15943,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -15374,7 +15965,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15391,7 +15982,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -15413,7 +16004,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15430,7 +16021,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -15452,7 +16043,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15469,7 +16060,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -15491,7 +16082,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15508,7 +16099,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -15530,7 +16121,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15547,7 +16138,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -15569,7 +16160,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15586,7 +16177,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -15608,7 +16199,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15625,7 +16216,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -15647,7 +16238,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15664,7 +16255,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -15686,7 +16277,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15703,7 +16294,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -15725,7 +16316,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15742,7 +16333,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -15764,7 +16355,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/cwArr global.get $std/array/cwArr @@ -15781,7 +16372,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -16651,7 +17242,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -16674,7 +17265,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -16696,7 +17287,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/sarr global.get $std/array/sarr @@ -16712,7 +17303,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -16735,7 +17326,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -16757,7 +17348,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/sarr global.get $std/array/sarr @@ -16773,7 +17364,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -16796,7 +17387,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -16818,7 +17409,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/sarr global.get $std/array/sarr @@ -16834,7 +17425,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -16857,7 +17448,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -16879,7 +17470,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/sarr global.get $std/array/sarr @@ -16895,7 +17486,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -16918,7 +17509,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -16940,7 +17531,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/sarr global.get $std/array/sarr @@ -16956,7 +17547,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -16979,7 +17570,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -17001,7 +17592,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/sarr global.get $std/array/sarr @@ -17017,7 +17608,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -17040,7 +17631,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -17062,7 +17653,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/sarr global.get $std/array/sarr @@ -17078,7 +17669,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -17101,7 +17692,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -17123,7 +17714,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/sarr global.get $std/array/sarr @@ -17139,7 +17730,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -17162,7 +17753,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -17184,7 +17775,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/sarr global.get $std/array/sarr @@ -17200,7 +17791,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -17223,7 +17814,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -17245,7 +17836,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/sarr global.get $std/array/sarr @@ -17261,7 +17852,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -17284,7 +17875,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -17306,7 +17897,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/sarr global.get $std/array/sarr @@ -17322,7 +17913,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -17345,7 +17936,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -17367,7 +17958,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end global.set $std/array/sarr global.get $std/array/sarr @@ -17383,7 +17974,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -17406,7 +17997,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -18614,7 +19205,7 @@ local.get $0 i32.const 9 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -18645,7 +19236,7 @@ local.get $1 i32.const 10 i32.const 3 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -18676,7 +19267,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -18707,7 +19298,7 @@ local.get $1 i32.const 8 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -18749,7 +19340,7 @@ local.get $0 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -18774,7 +19365,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 0 call $std/array/isArraysEqual @@ -18899,12 +19490,12 @@ global.set $~lib/argc global.get $std/array/randomStringsActual i32.const 0 - call $std/array/assertSorted|trampoline + call $std/array/assertSorted|trampoline end global.get $std/array/randomStringsActual global.get $std/array/randomStringsExpected i32.const 0 - call $std/array/isArraysEqual + call $std/array/isArraysEqual i32.eqz if i32.const 0 @@ -18931,9 +19522,9 @@ local.set $1 local.get $0 local.get $1 - i32.const 15 + i32.const 16 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 4528 call $~lib/array/Array#join @@ -18957,7 +19548,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 4200 call $~lib/array/Array#join @@ -18981,7 +19572,7 @@ local.get $1 i32.const 8 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 5216 call $~lib/array/Array#join @@ -19005,7 +19596,7 @@ local.get $1 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 5296 call $~lib/array/Array#join @@ -19029,7 +19620,7 @@ local.get $1 i32.const 10 i32.const 3 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 5472 call $~lib/array/Array#join @@ -19051,9 +19642,9 @@ local.set $1 local.get $0 local.get $1 - i32.const 14 + i32.const 15 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end i32.const 4200 call $~lib/array/Array#join @@ -19076,57 +19667,51 @@ local.set $3 local.get $2 local.get $3 - i32.const 19 + i32.const 20 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $1 local.get $1 i32.load offset=4 local.set $0 local.get $0 - block $~lib/runtime/RETAIN>|inlined.0 (result i32) + block (result i32) i32.const 0 call $std/array/Ref#constructor local.set $3 local.get $3 - i32.const 0 - i32.ne if local.get $3 local.get $1 - call $~lib/runtime/doRetain + call $~lib/collector/dummy/__ref_link end local.get $3 end i32.store local.get $0 - block $~lib/runtime/RETAIN>|inlined.1 (result i32) + block (result i32) i32.const 0 local.set $3 local.get $3 - i32.const 0 - i32.ne if local.get $3 local.get $1 - call $~lib/runtime/doRetain + call $~lib/collector/dummy/__ref_link end local.get $3 end i32.store offset=4 local.get $0 - block $~lib/runtime/RETAIN>|inlined.2 (result i32) + block (result i32) i32.const 0 call $std/array/Ref#constructor local.set $3 local.get $3 - i32.const 0 - i32.ne if local.get $3 local.get $1 - call $~lib/runtime/doRetain + call $~lib/collector/dummy/__ref_link end local.get $3 end @@ -19207,9 +19792,9 @@ local.set $0 local.get $1 local.get $0 - i32.const 20 + i32.const 21 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $~lib/array/Array#toString i32.const 7152 @@ -19230,9 +19815,9 @@ local.set $0 local.get $1 local.get $0 - i32.const 21 + i32.const 22 i32.const 1 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $~lib/array/Array#toString i32.const 7232 @@ -19253,9 +19838,9 @@ local.set $0 local.get $1 local.get $0 - i32.const 16 + i32.const 17 i32.const 3 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $~lib/array/Array#toString i32.const 7352 @@ -19276,9 +19861,9 @@ local.set $0 local.get $1 local.get $0 - i32.const 22 + i32.const 23 i32.const 3 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $~lib/array/Array#toString i32.const 7512 @@ -19293,7 +19878,7 @@ unreachable end global.get $std/array/randomStringsExpected - call $~lib/array/Array#toString + call $~lib/array/Array#toString i32.const 7616 call $~lib/string/String.__eq i32.eqz @@ -19312,9 +19897,9 @@ local.set $0 local.get $1 local.get $0 - i32.const 14 + i32.const 15 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $~lib/array/Array#toString i32.const 7776 @@ -19338,14 +19923,14 @@ local.get $2 i32.const 11 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $1 local.get $1 i32.load offset=4 local.set $0 local.get $0 - block $~lib/runtime/RETAIN,Array>>|inlined.1 (result i32) + block (result i32) block $~lib/runtime/MAKEARRAY|inlined.76 (result i32) i32.const 2 local.set $2 @@ -19355,17 +19940,17 @@ local.get $3 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $3 local.get $3 local.get $1 - call $~lib/runtime/doRetain + call $~lib/collector/dummy/__ref_link local.get $3 end i32.store local.get $0 - block $~lib/runtime/RETAIN,Array>>|inlined.2 (result i32) + block (result i32) block $~lib/runtime/MAKEARRAY|inlined.77 (result i32) i32.const 2 local.set $3 @@ -19375,12 +19960,12 @@ local.get $2 i32.const 4 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $2 local.get $2 local.get $1 - call $~lib/runtime/doRetain + call $~lib/collector/dummy/__ref_link local.get $2 end i32.store offset=4 @@ -19408,16 +19993,16 @@ local.set $3 local.get $2 local.get $3 - i32.const 23 + i32.const 24 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $1 local.get $1 i32.load offset=4 local.set $0 local.get $0 - block $~lib/runtime/RETAIN,Array>>|inlined.0 (result i32) + block (result i32) block $~lib/runtime/MAKEARRAY|inlined.6 (result i32) i32.const 2 local.set $3 @@ -19427,17 +20012,17 @@ local.get $2 i32.const 7 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $2 local.get $2 local.get $1 - call $~lib/runtime/doRetain + call $~lib/collector/dummy/__ref_link local.get $2 end i32.store local.get $0 - block $~lib/runtime/RETAIN,Array>>|inlined.1 (result i32) + block (result i32) block $~lib/runtime/MAKEARRAY|inlined.7 (result i32) i32.const 2 local.set $2 @@ -19447,12 +20032,12 @@ local.get $3 i32.const 7 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $3 local.get $3 local.get $1 - call $~lib/runtime/doRetain + call $~lib/collector/dummy/__ref_link local.get $3 end i32.store offset=4 @@ -19480,16 +20065,16 @@ local.set $2 local.get $3 local.get $2 - i32.const 25 + i32.const 26 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $0 local.get $0 i32.load offset=4 local.set $1 local.get $1 - block $~lib/runtime/RETAIN>,Array>>>|inlined.0 (result i32) + block (result i32) block (result i32) block $~lib/runtime/MAKEARRAY>|inlined.1 (result i32) i32.const 1 @@ -19498,16 +20083,16 @@ local.set $5 local.get $4 local.get $5 - i32.const 24 + i32.const 25 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $3 local.get $3 i32.load offset=4 local.set $2 local.get $2 - block $~lib/runtime/RETAIN,Array>>|inlined.1 (result i32) + block (result i32) block $~lib/runtime/MAKEARRAY|inlined.11 (result i32) i32.const 1 local.set $5 @@ -19517,12 +20102,12 @@ local.get $4 i32.const 8 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $4 local.get $4 local.get $3 - call $~lib/runtime/doRetain + call $~lib/collector/dummy/__ref_link local.get $4 end i32.store @@ -19531,7 +20116,7 @@ local.set $2 local.get $2 local.get $0 - call $~lib/runtime/doRetain + call $~lib/collector/dummy/__ref_link local.get $2 end i32.store @@ -19552,7 +20137,7 @@ unreachable end ) - (func $std/array/main (; 264 ;) (type $FUNCSIG$v) + (func $std/array/main (; 286 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -19561,9 +20146,9 @@ global.set $~lib/started end ) - (func $start (; 265 ;) (type $FUNCSIG$v) + (func $start (; 287 ;) (type $FUNCSIG$v) call $start:std/array ) - (func $null (; 266 ;) (type $FUNCSIG$v) + (func $null (; 288 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 9ae8355e63..22b3f93cda 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -3,7 +3,6 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) @@ -87,7 +86,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -319,44 +318,40 @@ end end ) - (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 i32.const 200 i32.le_u if i32.const 0 i32.const 64 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 i32.const 8 i32.sub + local.tee $2 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 64 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 8 - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741816 @@ -370,15 +365,15 @@ unreachable end local.get $0 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $1 local.get $0 call $~lib/memory/memory.fill local.get $1 i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/util/memory/memcpy (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1275,7 +1270,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1469,7 +1464,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1531,7 +1526,7 @@ i32.gt_s select local.tee $3 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $2 local.get $0 local.get $1 @@ -1540,9 +1535,9 @@ call $~lib/memory/memory.copy local.get $2 i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/runtime/ArrayBufferView#constructor (; 10 ;) (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) i32.const 1 i32.const 1073741816 @@ -1552,7 +1547,7 @@ if i32.const 0 i32.const 64 - i32.const 348 + i32.const 244 i32.const 57 call $~lib/env/abort unreachable @@ -1567,9 +1562,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 end local.get $0 @@ -1592,18 +1587,18 @@ i32.store offset=8 local.get $0 ) - (func $~lib/runtime/doMakeArray (; 11 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/runtime/makeArray (; 10 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) i32.const 16 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 5 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $1 i32.store local.get $0 @@ -1621,7 +1616,7 @@ call $~lib/memory/memory.copy local.get $0 ) - (func $~lib/dataview/DataView#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1647,9 +1642,9 @@ unreachable end i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 7 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $1 i32.const 0 i32.store @@ -1670,7 +1665,7 @@ i32.store offset=8 local.get $1 ) - (func $start:std/arraybuffer (; 13 ;) (type $FUNCSIG$v) + (func $start:std/arraybuffer (; 12 ;) (type $FUNCSIG$v) i32.const 200 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset @@ -1864,13 +1859,13 @@ unreachable end i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register i32.const 0 call $~lib/runtime/ArrayBufferView#constructor global.set $std/arraybuffer/arr8 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray drop global.get $std/arraybuffer/arr8 if (result i32) @@ -1890,9 +1885,9 @@ block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView13 (result i32) i32.const 1 i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 6 - call $~lib/runtime/doRegister + call $~lib/runtime/register i32.const 2 call $~lib/runtime/ArrayBufferView#constructor br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView13 @@ -1927,10 +1922,10 @@ unreachable end ) - (func $start (; 14 ;) (type $FUNCSIG$v) + (func $start (; 13 ;) (type $FUNCSIG$v) call $start:std/arraybuffer ) - (func $null (; 15 ;) (type $FUNCSIG$v) + (func $null (; 14 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 22b2ee62a7..2e376b9a38 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -3,7 +3,6 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) @@ -16,7 +15,6 @@ (data (i32.const 160) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) @@ -128,7 +126,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -401,7 +399,8 @@ end end ) - (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -409,14 +408,16 @@ if i32.const 0 i32.const 64 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq @@ -424,23 +425,17 @@ if i32.const 0 i32.const 64 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -458,7 +453,7 @@ local.get $1 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $3 local.get $3 @@ -470,16 +465,16 @@ local.set $2 local.get $2 i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $~lib/util/memory/memcpy (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1680,7 +1675,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1911,7 +1906,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1985,7 +1980,7 @@ local.get $6 local.set $4 local.get $4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 local.get $7 @@ -1999,24 +1994,24 @@ local.set $4 local.get $4 i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/arraybuffer/ArrayBuffer.isView> (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView> (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if nop end i32.const 0 ) - (func $~lib/arraybuffer/ArrayBuffer.isView (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if nop end i32.const 0 ) - (func $~lib/arraybuffer/ArrayBuffer.isView (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if i32.const 1 @@ -2024,7 +2019,7 @@ end i32.const 0 ) - (func $~lib/arraybuffer/ArrayBuffer.isView (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if i32.const 1 @@ -2032,7 +2027,7 @@ end i32.const 0 ) - (func $~lib/arraybuffer/ArrayBuffer.isView (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if i32.const 1 @@ -2040,7 +2035,7 @@ end i32.const 0 ) - (func $~lib/runtime/ArrayBufferView#constructor (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -2051,7 +2046,7 @@ if i32.const 0 i32.const 64 - i32.const 348 + i32.const 244 i32.const 57 call $~lib/env/abort unreachable @@ -2072,12 +2067,12 @@ i32.const 12 local.set $4 local.get $4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $4 local.get $4 i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -2102,7 +2097,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -2112,12 +2107,12 @@ i32.const 12 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.get $1 i32.const 0 @@ -2125,14 +2120,14 @@ local.set $0 local.get $0 ) - (func $~lib/runtime/doMakeArray (; 19 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/makeArray (; 18 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) i32.const 16 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.get $2 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $4 local.get $0 local.get $3 @@ -2141,9 +2136,9 @@ local.get $0 local.get $3 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $6 local.get $4 local.get $6 @@ -2166,7 +2161,7 @@ end local.get $4 ) - (func $~lib/typedarray/Int32Array#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -2176,12 +2171,12 @@ i32.const 12 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 6 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.get $1 i32.const 2 @@ -2189,7 +2184,7 @@ local.set $0 local.get $0 ) - (func $~lib/dataview/DataView#constructor (; 21 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 20 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $3 @@ -2229,12 +2224,12 @@ i32.const 12 local.set $4 local.get $4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $4 local.get $4 i32.const 7 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -2263,11 +2258,11 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#get:buffer (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#get:buffer (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $start:std/arraybuffer (; 23 ;) (type $FUNCSIG$v) + (func $start:std/arraybuffer (; 22 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) global.get $~lib/memory/HEAP_BASE @@ -2538,7 +2533,7 @@ local.get $1 i32.const 5 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $~lib/arraybuffer/ArrayBuffer.isView> i32.eqz @@ -2592,9 +2587,9 @@ unreachable end ) - (func $start (; 24 ;) (type $FUNCSIG$v) + (func $start (; 23 ;) (type $FUNCSIG$v) call $start:std/arraybuffer ) - (func $null (; 25 ;) (type $FUNCSIG$v) + (func $null (; 24 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 5ec579874a..fd7eadd7e4 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -4,10 +4,10 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$jj (func (param i64) (result i64))) (type $FUNCSIG$v (func)) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$jii (func (param i32 i32) (result i64))) (type $FUNCSIG$vifi (func (param i32 f32 i32))) @@ -91,7 +91,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -156,60 +156,56 @@ i32.const 0 i32.store8 ) - (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 i32.const 224 i32.le_u if i32.const 0 i32.const 16 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 i32.const 8 i32.sub + local.tee $2 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 16 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 8 - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $~lib/runtime/ArrayBufferView#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $1 call $~lib/memory/memory.fill local.get $1 i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $1 local.get $0 i32.eqz if i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 end local.get $0 @@ -232,7 +228,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#__set (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -252,7 +248,7 @@ local.get $2 i32.store8 ) - (func $~lib/dataview/DataView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block (result i32) local.get $2 @@ -289,9 +285,9 @@ unreachable end i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 5 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $3 i32.const 0 i32.store @@ -314,7 +310,7 @@ i32.store offset=8 local.get $3 ) - (func $~lib/dataview/DataView#getFloat32 (; 9 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $~lib/dataview/DataView#getFloat32 (; 8 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $1 i32.const 0 i32.lt_s @@ -360,7 +356,7 @@ f32.reinterpret_i32 end ) - (func $~lib/polyfills/bswap (; 10 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 9 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 i64.const 8 i64.shr_u @@ -386,7 +382,7 @@ i64.const 32 i64.rotr ) - (func $~lib/dataview/DataView#getFloat64 (; 11 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/dataview/DataView#getFloat64 (; 10 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) i32.const 8 local.get $0 i32.load offset=8 @@ -412,7 +408,7 @@ f64.reinterpret_i64 end ) - (func $~lib/dataview/DataView#getInt8 (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getInt8 (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -431,7 +427,7 @@ i32.add i32.load8_s ) - (func $~lib/dataview/DataView#getInt16 (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt16 (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 0 i32.lt_s @@ -473,7 +469,7 @@ i32.or end ) - (func $~lib/dataview/DataView#getInt32 (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt32 (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 0 i32.lt_s @@ -515,7 +511,7 @@ i32.or end ) - (func $~lib/dataview/DataView#getInt64 (; 15 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/dataview/DataView#getInt64 (; 14 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i64) i32.const 8 local.get $0 @@ -541,7 +537,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint8 (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getUint8 (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -560,7 +556,7 @@ i32.add i32.load8_u ) - (func $~lib/dataview/DataView#getUint16 (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint16 (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 0 i32.lt_s @@ -600,7 +596,7 @@ i32.or end ) - (func $~lib/dataview/DataView#getUint32 (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint32 (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 0 i32.lt_s @@ -642,7 +638,7 @@ i32.or end ) - (func $~lib/dataview/DataView#getUint64 (; 19 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/dataview/DataView#getUint64 (; 18 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i64) i32.const 8 local.get $0 @@ -668,7 +664,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#setFloat32 (; 20 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/dataview/DataView#setFloat32 (; 19 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -706,7 +702,7 @@ i32.store end ) - (func $~lib/dataview/DataView#setFloat64 (; 21 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/dataview/DataView#setFloat64 (; 20 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -734,7 +730,7 @@ i64.store end ) - (func $~lib/dataview/DataView#setInt8 (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/dataview/DataView#setInt8 (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 0 local.get $0 i32.load offset=8 @@ -752,7 +748,7 @@ i32.const 108 i32.store8 ) - (func $~lib/dataview/DataView#setInt16 (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt16 (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 @@ -788,7 +784,7 @@ local.get $1 i32.store16 ) - (func $~lib/dataview/DataView#setInt32 (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt32 (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -824,7 +820,7 @@ local.get $1 i32.store ) - (func $~lib/dataview/DataView#setInt64 (; 25 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/dataview/DataView#setInt64 (; 24 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -848,7 +844,7 @@ end i64.store ) - (func $~lib/dataview/DataView#setUint8 (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/dataview/DataView#setUint8 (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 0 local.get $0 i32.load offset=8 @@ -866,7 +862,7 @@ i32.const 238 i32.store8 ) - (func $~lib/dataview/DataView#setUint16 (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint16 (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 @@ -900,7 +896,7 @@ local.get $1 i32.store16 ) - (func $~lib/dataview/DataView#setUint32 (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint32 (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -936,7 +932,7 @@ local.get $1 i32.store ) - (func $~lib/dataview/DataView#setUint64 (; 29 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/dataview/DataView#setUint64 (; 28 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -960,16 +956,16 @@ end i64.store ) - (func $start:std/dataview (; 30 ;) (type $FUNCSIG$v) + (func $start:std/dataview (; 29 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 224 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register call $~lib/runtime/ArrayBufferView#constructor global.set $std/dataview/array global.get $std/dataview/array @@ -2491,10 +2487,10 @@ unreachable end ) - (func $start (; 31 ;) (type $FUNCSIG$v) + (func $start (; 30 ;) (type $FUNCSIG$v) call $start:std/dataview ) - (func $null (; 32 ;) (type $FUNCSIG$v) + (func $null (; 31 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 76ae06d921..01e8b4d801 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -4,7 +4,6 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$diii (func (param i32 i32 i32) (result f64))) @@ -23,7 +22,6 @@ (data (i32.const 184) "\01\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) @@ -134,7 +132,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -407,7 +405,8 @@ end end ) - (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -415,14 +414,16 @@ if i32.const 0 i32.const 16 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq @@ -430,23 +431,17 @@ if i32.const 0 i32.const 16 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -464,7 +459,7 @@ local.get $1 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $3 local.get $3 @@ -476,10 +471,10 @@ local.set $2 local.get $2 i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/runtime/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -490,7 +485,7 @@ if i32.const 0 i32.const 16 - i32.const 348 + i32.const 244 i32.const 57 call $~lib/env/abort unreachable @@ -511,12 +506,12 @@ i32.const 12 local.set $4 local.get $4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $4 local.get $4 i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -541,7 +536,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -551,12 +546,12 @@ i32.const 12 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.get $1 i32.const 0 @@ -564,7 +559,7 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint8Array#__set (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -584,13 +579,13 @@ local.get $2 i32.store8 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $~lib/dataview/DataView#constructor (; 12 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 11 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $3 @@ -630,12 +625,12 @@ i32.const 12 local.set $4 local.get $4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $4 local.get $4 i32.const 5 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -664,22 +659,22 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#get:buffer (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#get:buffer (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load i32.sub ) - (func $~lib/runtime/ArrayBufferView#get:byteLength (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#get:byteLength (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 ) - (func $~lib/polyfills/bswap (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const -16711936 i32.and @@ -693,7 +688,7 @@ i32.or return ) - (func $~lib/dataview/DataView#getFloat32 (; 17 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $~lib/dataview/DataView#getFloat32 (; 16 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $1 i32.const 0 i32.lt_s @@ -731,7 +726,7 @@ f32.reinterpret_i32 end ) - (func $~lib/polyfills/bswap (; 18 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 17 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -770,7 +765,7 @@ i64.rotr return ) - (func $~lib/dataview/DataView#getFloat64 (; 19 ;) (type $FUNCSIG$diii) (param $0 i32) (param $1 i32) (param $2 i32) (result f64) + (func $~lib/dataview/DataView#getFloat64 (; 18 ;) (type $FUNCSIG$diii) (param $0 i32) (param $1 i32) (param $2 i32) (result f64) local.get $1 i32.const 0 i32.lt_s @@ -808,7 +803,7 @@ f64.reinterpret_i64 end ) - (func $~lib/dataview/DataView#getInt8 (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getInt8 (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -827,7 +822,7 @@ i32.add i32.load8_s ) - (func $~lib/polyfills/bswap (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.shl @@ -843,7 +838,7 @@ i32.or return ) - (func $~lib/dataview/DataView#getInt16 (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt16 (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 0 @@ -879,7 +874,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/polyfills/bswap (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const -16711936 i32.and @@ -893,7 +888,7 @@ i32.or return ) - (func $~lib/dataview/DataView#getInt32 (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt32 (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 0 @@ -929,7 +924,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/polyfills/bswap (; 25 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 24 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -968,7 +963,7 @@ i64.rotr return ) - (func $~lib/dataview/DataView#getInt64 (; 26 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) + (func $~lib/dataview/DataView#getInt64 (; 25 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) (local $3 i64) local.get $1 i32.const 0 @@ -1004,7 +999,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint8 (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getUint8 (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1023,7 +1018,7 @@ i32.add i32.load8_u ) - (func $~lib/polyfills/bswap (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.shl @@ -1037,7 +1032,7 @@ i32.or return ) - (func $~lib/dataview/DataView#getUint16 (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint16 (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 0 @@ -1073,7 +1068,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint32 (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint32 (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 0 @@ -1109,7 +1104,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint64 (; 31 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) + (func $~lib/dataview/DataView#getUint64 (; 30 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) (local $3 i64) local.get $1 i32.const 0 @@ -1145,7 +1140,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#setFloat32 (; 32 ;) (type $FUNCSIG$viifi) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) + (func $~lib/dataview/DataView#setFloat32 (; 31 ;) (type $FUNCSIG$viifi) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1185,7 +1180,7 @@ i32.store end ) - (func $~lib/dataview/DataView#setFloat64 (; 33 ;) (type $FUNCSIG$viidi) (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) + (func $~lib/dataview/DataView#setFloat64 (; 32 ;) (type $FUNCSIG$viidi) (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1225,7 +1220,7 @@ i64.store end ) - (func $~lib/dataview/DataView#setInt8 (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt8 (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1245,7 +1240,7 @@ local.get $2 i32.store8 ) - (func $~lib/dataview/DataView#setInt16 (; 35 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/dataview/DataView#setInt16 (; 34 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1279,7 +1274,7 @@ end i32.store16 ) - (func $~lib/dataview/DataView#setInt32 (; 36 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/dataview/DataView#setInt32 (; 35 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1313,7 +1308,7 @@ end i32.store ) - (func $~lib/dataview/DataView#setInt64 (; 37 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) + (func $~lib/dataview/DataView#setInt64 (; 36 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1347,7 +1342,7 @@ end i64.store ) - (func $~lib/dataview/DataView#setUint8 (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint8 (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1367,7 +1362,7 @@ local.get $2 i32.store8 ) - (func $~lib/dataview/DataView#setUint16 (; 39 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/dataview/DataView#setUint16 (; 38 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1401,7 +1396,7 @@ end i32.store16 ) - (func $~lib/dataview/DataView#setUint32 (; 40 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/dataview/DataView#setUint32 (; 39 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1435,7 +1430,7 @@ end i32.store ) - (func $~lib/dataview/DataView#setUint64 (; 41 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) + (func $~lib/dataview/DataView#setUint64 (; 40 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1469,7 +1464,7 @@ end i64.store ) - (func $start:std/dataview (; 42 ;) (type $FUNCSIG$v) + (func $start:std/dataview (; 41 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -3162,9 +3157,9 @@ unreachable end ) - (func $start (; 43 ;) (type $FUNCSIG$v) + (func $start (; 42 ;) (type $FUNCSIG$v) call $start:std/dataview ) - (func $null (; 44 ;) (type $FUNCSIG$v) + (func $null (; 43 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index cae69d82d5..9bcf0e6790 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -3,9 +3,7 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$d (func (result f64))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (type $FUNCSIG$ij (func (param i64) (result i32))) (import "Date" "UTC" (func $~lib/bindings/Date/UTC (param i32 i32 i32 i32 i32 i32 f64) (result f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "Date" "now" (func $~lib/bindings/Date/now (result f64))) @@ -83,62 +81,42 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.const 80 i32.le_u if i32.const 0 i32.const 48 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 i32.const 8 i32.sub + local.tee $1 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 48 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/date/Date#constructor (; 5 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) - (local $1 i32) - i32.const 16 - call $~lib/memory/memory.allocate - local.tee $1 - i32.const -1520547049 - i32.store - local.get $1 - i32.const 8 - i32.store offset=4 local.get $1 - i32.const 8 - i32.add - local.tee $1 - call $~lib/runtime/assertUnregistered - local.get $1 - i32.const 8 - i32.sub i32.const 2 i32.store - local.get $1 - i64.const 0 - i64.store - local.get $1 local.get $0 - i64.store - local.get $1 ) - (func $start:std/date (; 6 ;) (type $FUNCSIG$v) + (func $start:std/date (; 5 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i64) i32.const 1970 i32.const 0 i32.const 1 @@ -215,7 +193,26 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset global.get $std/date/creationTime - call $~lib/date/Date#constructor + local.set $1 + i32.const 16 + call $~lib/memory/memory.allocate + local.tee $0 + i32.const -1520547049 + i32.store + local.get $0 + i32.const 8 + i32.store offset=4 + local.get $0 + i32.const 8 + i32.add + call $~lib/runtime/register + local.tee $0 + i64.const 0 + i64.store + local.get $0 + local.get $1 + i64.store + local.get $0 global.set $std/date/date global.get $std/date/creationTime global.get $std/date/date @@ -230,15 +227,15 @@ unreachable end global.get $std/date/date + local.tee $0 global.get $std/date/creationTime i64.const 1 i64.add + local.tee $1 i64.store - global.get $std/date/date + local.get $0 i64.load - global.get $std/date/creationTime - i64.const 1 - i64.add + local.get $1 i64.ne if i32.const 0 @@ -249,10 +246,10 @@ unreachable end ) - (func $start (; 7 ;) (type $FUNCSIG$v) + (func $start (; 6 ;) (type $FUNCSIG$v) call $start:std/date ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 7 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 48194f0e3c..023d2cec94 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -5,7 +5,6 @@ (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$ji (func (param i32) (result i64))) (type $FUNCSIG$jij (func (param i32 i64) (result i64))) (type $FUNCSIG$v (func)) @@ -18,7 +17,6 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/date/creationTime (mut i64) (i64.const 0)) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -126,7 +124,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -142,7 +140,8 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/assertUnregistered (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -150,14 +149,16 @@ if i32.const 0 i32.const 48 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq @@ -165,23 +166,17 @@ if i32.const 0 i32.const 48 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $~lib/date/Date#constructor (; 8 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/date/Date#constructor (; 7 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) block (result i32) local.get $0 @@ -192,12 +187,12 @@ i32.const 8 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -210,17 +205,17 @@ i64.store local.get $0 ) - (func $~lib/date/Date#getTime (; 9 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) + (func $~lib/date/Date#getTime (; 8 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) local.get $0 i64.load ) - (func $~lib/date/Date#setTime (; 10 ;) (type $FUNCSIG$jij) (param $0 i32) (param $1 i64) (result i64) + (func $~lib/date/Date#setTime (; 9 ;) (type $FUNCSIG$jij) (param $0 i32) (param $1 i64) (result i64) local.get $0 local.get $1 i64.store local.get $1 ) - (func $start:std/date (; 11 ;) (type $FUNCSIG$v) + (func $start:std/date (; 10 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -405,9 +400,9 @@ unreachable end ) - (func $start (; 12 ;) (type $FUNCSIG$v) + (func $start (; 11 ;) (type $FUNCSIG$v) call $start:std/date ) - (func $null (; 13 ;) (type $FUNCSIG$v) + (func $null (; 12 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index a136108cf0..5d7cff97f3 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -9,7 +9,6 @@ (data (i32.const 48) "\01\00\00\00\06\00\00\00a\00b\00c\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index feb6b7cde8..b7a0b6e4c2 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -2,11 +2,11 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$iiji (func (param i32 i64 i32) (result i32))) @@ -23,15 +23,20 @@ (type $FUNCSIG$vid (func (param i32 f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 48) "\02\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 96) "\02\00\00\00\14\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s") + (data (i32.const 8) "\02\00\00\00\1e") + (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 56) "\02\00\00\00&") + (data (i32.const 72) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 112) "\02\00\00\00\14") + (data (i32.const 128) "s\00t\00d\00/\00m\00a\00p\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -95,12 +100,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -113,47 +118,49 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 i32.add ) - (func $~lib/runtime/assertUnregistered (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - i32.const 124 + i32.const 148 i32.le_u if i32.const 0 - i32.const 16 - i32.const 313 - i32.const 2 + i32.const 24 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub + local.tee $2 i32.load i32.const -1520547049 i32.ne if i32.const 0 - i32.const 16 - i32.const 314 - i32.const 2 + i32.const 24 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 8 - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -364,39 +371,51 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 1073741816 + i32.const 1073741808 i32.gt_u if i32.const 0 - i32.const 56 + i32.const 72 i32.const 25 i32.const 43 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $1 local.get $0 call $~lib/memory/memory.fill local.get $1 i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/map/Map#clear (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 + (func $~lib/map/Map#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 + local.get $0 + i32.load + drop + local.get $0 + local.get $1 i32.store local.get $0 i32.const 3 i32.store offset=4 - local.get $0 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + local.get $0 + i32.load offset=8 + i32.ne + drop + local.get $0 + local.get $1 i32.store offset=8 local.get $0 i32.const 4 @@ -408,12 +427,12 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -436,7 +455,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -481,7 +500,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -497,7 +516,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -508,12 +527,12 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $4 + local.get $3 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -522,39 +541,39 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add local.set $7 - local.get $4 - local.set $3 + local.get $5 + local.set $2 loop $continue|0 - local.get $2 + local.get $3 local.get $7 i32.ne if - local.get $2 + local.get $3 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 local.get $2 + local.get $3 i32.load8_s i32.store8 - local.get $3 local.get $2 + local.get $3 i32.load offset=4 i32.store offset=4 - local.get $3 local.get $2 + local.get $3 i32.load8_s i32.const -2128831035 i32.xor @@ -564,44 +583,54 @@ i32.and i32.const 2 i32.shl - local.get $5 + local.get $4 i32.add local.tee $8 i32.load i32.store offset=8 local.get $8 - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 12 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $3 i32.const 12 i32.add - local.set $2 + local.set $3 br $continue|0 end end local.get $0 - local.get $5 + local.tee $2 + i32.load + drop + local.get $2 + local.get $4 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 + local.get $5 + local.tee $0 + local.get $2 + i32.load offset=8 + i32.ne + drop + local.get $2 local.get $0 - local.get $4 i32.store offset=8 - local.get $0 + local.get $2 local.get $6 i32.store offset=12 - local.get $0 - local.get $0 + local.get $2 + local.get $2 i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -700,7 +729,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -721,7 +750,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -788,7 +817,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 15 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 14 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -803,8 +832,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -825,8 +854,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -844,8 +873,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -865,8 +894,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -884,8 +913,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -903,8 +932,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -925,8 +954,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -944,8 +973,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -965,8 +994,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -984,8 +1013,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -1003,8 +1032,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -1017,8 +1046,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -1038,8 +1067,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -1056,8 +1085,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -1078,8 +1107,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -1092,8 +1121,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -1113,8 +1142,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -1125,19 +1154,19 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#constructor (; 16 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 15 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -1160,7 +1189,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#has (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1174,7 +1203,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1185,12 +1214,12 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $4 + local.get $3 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -1199,39 +1228,39 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add local.set $7 - local.get $4 - local.set $3 + local.get $5 + local.set $2 loop $continue|0 - local.get $2 + local.get $3 local.get $7 i32.ne if - local.get $2 + local.get $3 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 local.get $2 + local.get $3 i32.load8_u i32.store8 - local.get $3 local.get $2 + local.get $3 i32.load offset=4 i32.store offset=4 - local.get $3 local.get $2 + local.get $3 i32.load8_u i32.const -2128831035 i32.xor @@ -1241,44 +1270,54 @@ i32.and i32.const 2 i32.shl - local.get $5 + local.get $4 i32.add local.tee $8 i32.load i32.store offset=8 local.get $8 - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 12 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $3 i32.const 12 i32.add - local.set $2 + local.set $3 br $continue|0 end end local.get $0 - local.get $5 + local.tee $2 + i32.load + drop + local.get $2 + local.get $4 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 + local.get $5 + local.tee $0 + local.get $2 + i32.load offset=8 + i32.ne + drop + local.get $2 local.get $0 - local.get $4 i32.store offset=8 - local.get $0 + local.get $2 local.get $6 i32.store offset=12 - local.get $0 - local.get $0 + local.get $2 + local.get $2 i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1375,7 +1414,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1394,7 +1433,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -1459,7 +1498,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 22 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 21 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -1474,8 +1513,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -1494,8 +1533,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -1511,8 +1550,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -1532,8 +1571,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -1551,8 +1590,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -1568,8 +1607,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -1588,8 +1627,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -1605,8 +1644,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -1626,8 +1665,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -1645,8 +1684,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -1662,8 +1701,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -1676,8 +1715,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -1697,8 +1736,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -1715,8 +1754,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -1735,8 +1774,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -1749,8 +1788,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -1770,8 +1809,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -1782,19 +1821,19 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#constructor (; 23 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 22 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 5 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -1817,7 +1856,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -1862,7 +1901,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1887,7 +1926,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1898,12 +1937,12 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $4 + local.set $5 + local.get $3 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -1912,48 +1951,48 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $6 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add local.set $8 - local.get $4 - local.set $3 + local.get $6 + local.set $2 loop $continue|0 - local.get $2 + local.get $3 local.get $8 i32.ne if - local.get $2 + local.get $3 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 local.get $2 + local.get $3 i32.load16_s i32.store16 - local.get $3 local.get $2 + local.get $3 i32.load offset=4 i32.store offset=4 - local.get $3 local.get $2 + local.get $3 i32.load16_s - local.tee $5 + local.tee $4 i32.const 255 i32.and i32.const -2128831035 i32.xor i32.const 16777619 i32.mul - local.get $5 + local.get $4 i32.const 8 i32.shr_u i32.xor @@ -1963,44 +2002,57 @@ i32.and i32.const 2 i32.shl - local.get $6 + local.get $5 i32.add - local.tee $5 + local.tee $4 i32.load i32.store offset=8 - local.get $5 - local.get $3 + local.get $4 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 12 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $3 i32.const 12 i32.add - local.set $2 + local.set $3 br $continue|0 end end + local.get $5 + local.tee $4 local.get $0 - local.get $6 + local.tee $2 + i32.load + i32.ne + drop + local.get $2 + local.get $4 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 + local.get $6 + local.tee $0 + local.get $2 + i32.load offset=8 + i32.ne + drop + local.get $2 local.get $0 - local.get $4 i32.store offset=8 - local.get $0 + local.get $2 local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $2 + local.get $2 i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2108,7 +2160,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2138,7 +2190,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2214,7 +2266,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 30 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 29 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -2229,8 +2281,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -2251,8 +2303,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -2270,8 +2322,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -2291,8 +2343,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -2310,8 +2362,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -2329,8 +2381,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -2351,8 +2403,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -2370,8 +2422,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -2391,8 +2443,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -2410,8 +2462,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -2429,8 +2481,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -2443,8 +2495,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -2464,8 +2516,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -2482,8 +2534,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -2504,8 +2556,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -2518,8 +2570,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -2539,8 +2591,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -2551,19 +2603,19 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#constructor (; 31 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 30 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 6 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -2586,7 +2638,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#has (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2609,7 +2661,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2620,12 +2672,12 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $4 + local.set $5 + local.get $3 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -2634,48 +2686,48 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $6 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add local.set $8 - local.get $4 - local.set $3 + local.get $6 + local.set $2 loop $continue|0 - local.get $2 + local.get $3 local.get $8 i32.ne if - local.get $2 + local.get $3 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 local.get $2 + local.get $3 i32.load16_u i32.store16 - local.get $3 local.get $2 + local.get $3 i32.load offset=4 i32.store offset=4 - local.get $3 local.get $2 + local.get $3 i32.load16_u - local.tee $5 + local.tee $4 i32.const 255 i32.and i32.const -2128831035 i32.xor i32.const 16777619 i32.mul - local.get $5 + local.get $4 i32.const 8 i32.shr_u i32.xor @@ -2685,44 +2737,57 @@ i32.and i32.const 2 i32.shl - local.get $6 + local.get $5 i32.add - local.tee $5 + local.tee $4 i32.load i32.store offset=8 - local.get $5 - local.get $3 + local.get $4 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 12 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $3 i32.const 12 i32.add - local.set $2 + local.set $3 br $continue|0 end end + local.get $5 + local.tee $4 local.get $0 - local.get $6 + local.tee $2 + i32.load + i32.ne + drop + local.get $2 + local.get $4 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 + local.get $6 + local.tee $0 + local.get $2 + i32.load offset=8 + i32.ne + drop + local.get $2 local.get $0 - local.get $4 i32.store offset=8 - local.get $0 + local.get $2 local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $2 + local.get $2 i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2828,7 +2893,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2856,7 +2921,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2930,7 +2995,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 37 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 36 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -2945,8 +3010,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -2965,8 +3030,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -2982,8 +3047,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -3003,8 +3068,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -3022,8 +3087,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -3039,8 +3104,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -3059,8 +3124,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -3076,8 +3141,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -3097,8 +3162,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -3116,8 +3181,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -3133,8 +3198,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -3147,8 +3212,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -3168,8 +3233,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -3186,8 +3251,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -3206,8 +3271,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -3220,8 +3285,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -3241,8 +3306,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -3253,19 +3318,19 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#constructor (; 38 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 37 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 7 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -3288,7 +3353,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -3319,7 +3384,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -3362,7 +3427,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -3371,7 +3436,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 42 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3382,12 +3447,12 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $4 + local.get $3 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -3396,83 +3461,93 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add local.set $7 - local.get $4 - local.set $3 + local.get $5 + local.set $2 loop $continue|0 - local.get $2 + local.get $3 local.get $7 i32.ne if - local.get $2 + local.get $3 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 local.get $2 + local.get $3 i32.load i32.store - local.get $3 local.get $2 + local.get $3 i32.load offset=4 i32.store offset=4 - local.get $3 local.get $2 + local.get $3 i32.load call $~lib/util/hash/hash32 local.get $1 i32.and i32.const 2 i32.shl - local.get $5 + local.get $4 i32.add local.tee $8 i32.load i32.store offset=8 local.get $8 - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 12 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $3 i32.const 12 i32.add - local.set $2 + local.set $3 br $continue|0 end end local.get $0 - local.get $5 + local.tee $2 + i32.load + drop + local.get $2 + local.get $4 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 + local.get $5 + local.tee $0 + local.get $2 + i32.load offset=8 + i32.ne + drop + local.get $2 local.get $0 - local.get $4 i32.store offset=8 - local.get $0 + local.get $2 local.get $6 i32.store offset=12 - local.get $0 - local.get $0 + local.get $2 + local.get $2 i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 43 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3562,7 +3637,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -3576,7 +3651,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3636,7 +3711,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 46 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 45 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -3651,8 +3726,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -3669,8 +3744,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -3684,8 +3759,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -3705,8 +3780,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -3724,8 +3799,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -3739,8 +3814,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -3757,8 +3832,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -3772,8 +3847,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -3793,8 +3868,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -3812,8 +3887,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -3827,8 +3902,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -3841,8 +3916,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -3862,8 +3937,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -3880,8 +3955,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -3898,8 +3973,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -3912,8 +3987,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -3933,8 +4008,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -3945,19 +4020,19 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#constructor (; 47 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 46 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 8 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -3980,7 +4055,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $std/map/test (; 48 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 47 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -3995,8 +4070,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -4013,8 +4088,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -4028,8 +4103,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -4049,8 +4124,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -4068,8 +4143,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -4083,8 +4158,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -4101,8 +4176,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -4116,8 +4191,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -4137,8 +4212,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -4156,8 +4231,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -4171,8 +4246,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -4185,8 +4260,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -4206,8 +4281,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -4224,8 +4299,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -4242,8 +4317,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -4256,8 +4331,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -4277,8 +4352,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -4289,24 +4364,36 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 + (func $~lib/map/Map#clear (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 + local.get $0 + i32.load + drop + local.get $0 + local.get $1 i32.store local.get $0 i32.const 3 i32.store offset=4 - local.get $0 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + local.get $0 + i32.load offset=8 + i32.ne + drop + local.get $0 + local.get $1 i32.store offset=8 local.get $0 i32.const 4 @@ -4318,12 +4405,12 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 50 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 49 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 9 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -4346,7 +4433,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 51 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 50 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -4412,7 +4499,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 52 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 51 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -4455,7 +4542,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 53 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 52 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -4464,7 +4551,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4475,12 +4562,12 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $4 + local.get $3 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -4489,83 +4576,93 @@ i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 4 i32.shl i32.add local.set $7 - local.get $4 - local.set $3 + local.get $5 + local.set $2 loop $continue|0 - local.get $2 + local.get $3 local.get $7 i32.ne if - local.get $2 + local.get $3 i32.load offset=12 i32.const 1 i32.and i32.eqz if - local.get $3 local.get $2 + local.get $3 i64.load i64.store - local.get $3 local.get $2 + local.get $3 i32.load offset=8 i32.store offset=8 - local.get $3 local.get $2 + local.get $3 i64.load call $~lib/util/hash/hash64 local.get $1 i32.and i32.const 2 i32.shl - local.get $5 + local.get $4 i32.add local.tee $8 i32.load i32.store offset=12 local.get $8 - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 16 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $3 i32.const 16 i32.add - local.set $2 + local.set $3 br $continue|0 end end local.get $0 - local.get $5 + local.tee $2 + i32.load + drop + local.get $2 + local.get $4 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 + local.get $5 + local.tee $0 + local.get $2 + i32.load offset=8 + i32.ne + drop + local.get $2 local.get $0 - local.get $4 i32.store offset=8 - local.get $0 + local.get $2 local.get $6 i32.store offset=12 - local.get $0 - local.get $0 + local.get $2 + local.get $2 i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 55 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 54 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4655,7 +4752,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 56 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 55 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -4669,7 +4766,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 57 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/map/Map#delete (; 56 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -4730,7 +4827,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 58 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 57 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/map/Map#constructor @@ -4745,8 +4842,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -4764,8 +4861,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -4780,8 +4877,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -4801,8 +4898,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -4820,8 +4917,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -4836,8 +4933,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -4855,8 +4952,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -4871,8 +4968,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -4892,8 +4989,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -4911,8 +5008,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -4927,8 +5024,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -4941,8 +5038,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -4962,8 +5059,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -4980,8 +5077,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -4999,8 +5096,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -5013,8 +5110,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -5034,8 +5131,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -5046,19 +5143,19 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#constructor (; 59 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 58 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 10 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -5081,7 +5178,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $std/map/test (; 60 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 59 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/map/Map#constructor @@ -5096,8 +5193,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -5115,8 +5212,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -5131,8 +5228,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -5152,8 +5249,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -5171,8 +5268,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -5187,8 +5284,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -5206,8 +5303,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -5222,8 +5319,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -5243,8 +5340,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -5262,8 +5359,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -5278,8 +5375,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -5292,8 +5389,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -5313,8 +5410,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -5331,8 +5428,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -5350,8 +5447,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -5364,8 +5461,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -5385,8 +5482,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -5397,19 +5494,19 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#constructor (; 61 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 60 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 11 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -5432,7 +5529,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 62 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 61 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -5475,7 +5572,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 63 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 62 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -5485,7 +5582,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 64 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5496,12 +5593,12 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $4 + local.get $3 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -5510,39 +5607,39 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add local.set $7 - local.get $4 - local.set $3 + local.get $5 + local.set $2 loop $continue|0 - local.get $2 + local.get $3 local.get $7 i32.ne if - local.get $2 + local.get $3 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 local.get $2 + local.get $3 f32.load f32.store - local.get $3 local.get $2 + local.get $3 i32.load offset=4 i32.store offset=4 - local.get $3 local.get $2 + local.get $3 f32.load i32.reinterpret_f32 call $~lib/util/hash/hash32 @@ -5550,44 +5647,54 @@ i32.and i32.const 2 i32.shl - local.get $5 + local.get $4 i32.add local.tee $8 i32.load i32.store offset=8 local.get $8 - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 12 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $3 i32.const 12 i32.add - local.set $2 + local.set $3 br $continue|0 end end local.get $0 - local.get $5 + local.tee $2 + i32.load + drop + local.get $2 + local.get $4 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 + local.get $5 + local.tee $0 + local.get $2 + i32.load offset=8 + i32.ne + drop + local.get $2 local.get $0 - local.get $4 i32.store offset=8 - local.get $0 + local.get $2 local.get $6 i32.store offset=12 - local.get $0 - local.get $0 + local.get $2 + local.get $2 i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 65 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/map/Map#set (; 64 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5678,7 +5785,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 66 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 65 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -5693,7 +5800,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 67 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/map/Map#delete (; 66 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -5755,7 +5862,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 68 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 67 ;) (type $FUNCSIG$v) (local $0 f32) (local $1 i32) call $~lib/map/Map#constructor @@ -5770,8 +5877,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -5789,8 +5896,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -5805,8 +5912,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -5826,8 +5933,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -5845,8 +5952,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -5861,8 +5968,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -5880,8 +5987,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -5896,8 +6003,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -5917,8 +6024,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -5936,8 +6043,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -5952,8 +6059,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -5966,8 +6073,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -5987,8 +6094,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -6005,8 +6112,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -6024,8 +6131,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -6038,8 +6145,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -6059,8 +6166,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -6071,19 +6178,19 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#constructor (; 69 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 68 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 12 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -6106,7 +6213,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 70 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 69 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -6149,7 +6256,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 71 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 70 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -6159,7 +6266,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 72 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 71 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6170,12 +6277,12 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $4 + local.get $3 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -6184,39 +6291,39 @@ i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 4 i32.shl i32.add local.set $7 - local.get $4 - local.set $3 + local.get $5 + local.set $2 loop $continue|0 - local.get $2 + local.get $3 local.get $7 i32.ne if - local.get $2 + local.get $3 i32.load offset=12 i32.const 1 i32.and i32.eqz if - local.get $3 local.get $2 + local.get $3 f64.load f64.store - local.get $3 local.get $2 + local.get $3 i32.load offset=8 i32.store offset=8 - local.get $3 local.get $2 + local.get $3 f64.load i64.reinterpret_f64 call $~lib/util/hash/hash64 @@ -6224,44 +6331,54 @@ i32.and i32.const 2 i32.shl - local.get $5 + local.get $4 i32.add local.tee $8 i32.load i32.store offset=12 local.get $8 - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 16 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $3 i32.const 16 i32.add - local.set $2 + local.set $3 br $continue|0 end end local.get $0 - local.get $5 + local.tee $2 + i32.load + drop + local.get $2 + local.get $4 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 + local.get $5 + local.tee $0 + local.get $2 + i32.load offset=8 + i32.ne + drop + local.get $2 local.get $0 - local.get $4 i32.store offset=8 - local.get $0 + local.get $2 local.get $6 i32.store offset=12 - local.get $0 - local.get $0 + local.get $2 + local.get $2 i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 73 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/map/Map#set (; 72 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6352,7 +6469,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 74 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 73 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -6367,7 +6484,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 75 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/map/Map#delete (; 74 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -6429,7 +6546,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 76 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 75 ;) (type $FUNCSIG$v) (local $0 f64) (local $1 i32) call $~lib/map/Map#constructor @@ -6444,8 +6561,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -6463,8 +6580,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -6479,8 +6596,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -6500,8 +6617,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -6519,8 +6636,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -6535,8 +6652,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -6554,8 +6671,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -6570,8 +6687,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -6591,8 +6708,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -6610,8 +6727,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -6626,8 +6743,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -6640,8 +6757,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -6661,8 +6778,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -6679,8 +6796,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -6698,8 +6815,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -6712,8 +6829,8 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -6733,8 +6850,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -6745,30 +6862,30 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start (; 77 ;) (type $FUNCSIG$v) - i32.const 128 + (func $start (; 76 ;) (type $FUNCSIG$v) + i32.const 152 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric ) - (func $null (; 78 ;) (type $FUNCSIG$v) + (func $null (; 77 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/map.ts b/tests/compiler/std/map.ts index 4fc1487360..bcf018b362 100644 --- a/tests/compiler/std/map.ts +++ b/tests/compiler/std/map.ts @@ -1,6 +1,7 @@ import "allocator/arena"; +import "collector/dummy"; -function test(): void { +function testNumeric(): void { var map = new Map(); // insert new @@ -46,13 +47,13 @@ function test(): void { assert(map.size == 0); } -test(); -test(); -test(); -test(); -test(); -test(); -test(); -test(); -test(); -test(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 3387747c4e..0a4689938f 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -2,11 +2,11 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$iiji (func (param i32 i64 i32) (result i32))) @@ -19,21 +19,22 @@ (type $FUNCSIG$vidi (func (param i32 f64 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 48) "\02\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 96) "\02\00\00\00\14\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") + (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\02\00\00\00&\00\00\00\00\00\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 112) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 124)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 148)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -132,7 +133,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -145,47 +146,55 @@ local.get $0 i32.store offset=4 local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u i32.eqz if i32.const 0 - i32.const 16 - i32.const 313 - i32.const 2 + i32.const 24 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 - i32.const 16 - i32.const 314 - i32.const 2 + i32.const 24 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 + call $~lib/collector/dummy/__ref_register + local.get $0 ) (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -452,7 +461,7 @@ i32.gt_u if i32.const 0 - i32.const 56 + i32.const 72 i32.const 25 i32.const 43 call $~lib/env/abort @@ -462,7 +471,7 @@ local.get $1 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $3 local.get $3 @@ -474,14 +483,43 @@ local.set $2 local.get $2 i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/map/Map#clear (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_link (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/collector/dummy/__ref_unlink (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/map/Map#clear (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -489,9 +527,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -503,7 +561,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -514,12 +572,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -546,14 +604,14 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash8 (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const -2128831035 local.get $0 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -608,7 +666,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -627,7 +685,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -745,13 +803,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -761,7 +859,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -869,7 +967,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -895,11 +993,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -976,7 +1074,7 @@ end i32.const 1 ) - (func $std/map/test (; 18 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 20 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -999,8 +1097,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -1021,8 +1119,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -1041,8 +1139,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -1064,8 +1162,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -1086,8 +1184,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -1106,8 +1204,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -1128,8 +1226,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -1148,8 +1246,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -1171,8 +1269,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -1193,8 +1291,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -1213,8 +1311,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -1230,8 +1328,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -1253,8 +1351,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -1276,8 +1374,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -1298,8 +1396,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -1315,8 +1413,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -1338,8 +1436,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -1353,18 +1451,41 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -1372,9 +1493,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -1386,7 +1527,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -1397,12 +1538,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -1429,7 +1570,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1482,7 +1623,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1499,7 +1640,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1617,13 +1758,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -1633,7 +1814,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1739,7 +1920,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -1763,11 +1944,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1842,7 +2023,7 @@ end i32.const 1 ) - (func $std/map/test (; 28 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 30 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1865,8 +2046,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -1885,8 +2066,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -1903,8 +2084,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -1926,8 +2107,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -1948,8 +2129,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -1966,8 +2147,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -1986,8 +2167,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -2004,8 +2185,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -2027,8 +2208,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -2049,8 +2230,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -2067,8 +2248,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -2084,8 +2265,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -2107,8 +2288,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -2130,8 +2311,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -2150,8 +2331,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -2167,8 +2348,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -2190,8 +2371,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -2205,18 +2386,41 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -2224,9 +2428,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -2238,7 +2462,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -2249,12 +2473,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 5 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -2281,7 +2505,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -2303,7 +2527,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2358,7 +2582,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2377,7 +2601,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2495,13 +2719,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -2511,7 +2775,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2619,7 +2883,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2645,11 +2909,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2726,7 +2990,7 @@ end i32.const 1 ) - (func $std/map/test (; 39 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 41 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2749,8 +3013,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -2771,8 +3035,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -2791,8 +3055,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -2814,8 +3078,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -2836,8 +3100,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -2856,8 +3120,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -2878,8 +3142,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -2898,8 +3162,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -2921,8 +3185,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -2943,8 +3207,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -2963,8 +3227,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -2980,8 +3244,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -3003,8 +3267,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -3026,8 +3290,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -3048,8 +3312,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -3065,8 +3329,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -3088,8 +3352,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -3103,18 +3367,41 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -3122,9 +3409,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -3136,7 +3443,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -3147,12 +3454,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 6 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -3179,7 +3486,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3232,7 +3539,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -3249,7 +3556,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 46 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3367,13 +3674,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -3383,7 +3730,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 47 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3489,7 +3836,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3513,11 +3860,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3592,7 +3939,7 @@ end i32.const 1 ) - (func $std/map/test (; 49 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 51 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3615,8 +3962,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -3635,8 +3982,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -3653,8 +4000,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -3676,8 +4023,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -3698,8 +4045,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -3716,8 +4063,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -3736,8 +4083,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -3754,8 +4101,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -3777,8 +4124,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -3799,8 +4146,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -3817,8 +4164,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -3834,8 +4181,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -3857,8 +4204,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -3880,8 +4227,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -3900,8 +4247,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -3917,8 +4264,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -3940,8 +4287,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -3955,18 +4302,41 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 52 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -3974,9 +4344,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -3988,7 +4378,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -3999,12 +4389,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 7 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -4031,7 +4421,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -4073,7 +4463,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4124,7 +4514,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -4139,7 +4529,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 57 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4257,13 +4647,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -4273,7 +4703,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 56 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 58 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4377,7 +4807,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4399,11 +4829,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4476,7 +4906,7 @@ end i32.const 1 ) - (func $std/map/test (; 60 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 62 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4499,8 +4929,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -4517,8 +4947,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -4533,8 +4963,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -4556,8 +4986,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -4578,8 +5008,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -4594,8 +5024,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -4612,8 +5042,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -4628,8 +5058,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -4651,8 +5081,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -4673,8 +5103,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -4689,8 +5119,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -4706,8 +5136,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -4729,8 +5159,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -4752,8 +5182,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -4770,8 +5200,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -4787,8 +5217,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -4810,8 +5240,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -4825,18 +5255,41 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 61 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 63 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -4844,9 +5297,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -4858,7 +5331,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 64 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -4869,12 +5342,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 8 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -4901,7 +5374,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4952,7 +5425,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -4967,7 +5440,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 65 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 67 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5084,14 +5557,54 @@ end end end - local.get $0 - local.get $3 + local.get $0 + local.tee $9 + local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -5101,7 +5614,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 66 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 68 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5205,7 +5718,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 69 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5227,11 +5740,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 68 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 70 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 69 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 71 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5304,7 +5817,7 @@ end i32.const 1 ) - (func $std/map/test (; 70 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 72 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5327,8 +5840,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -5345,8 +5858,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -5361,8 +5874,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -5384,8 +5897,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -5406,8 +5919,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -5422,8 +5935,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -5440,8 +5953,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -5456,8 +5969,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -5479,8 +5992,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -5501,8 +6014,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -5517,8 +6030,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -5534,8 +6047,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -5557,8 +6070,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -5580,8 +6093,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -5598,8 +6111,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -5615,8 +6128,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -5638,8 +6151,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -5653,18 +6166,41 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 71 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 73 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -5672,9 +6208,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -5686,7 +6242,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 72 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 74 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -5697,12 +6253,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 9 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -5729,7 +6285,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 73 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 75 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5817,7 +6373,7 @@ local.set $3 local.get $3 ) - (func $~lib/map/Map#find (; 74 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 76 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5868,7 +6424,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 75 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 77 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -5883,7 +6439,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 76 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 78 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6002,13 +6558,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $13 + local.get $9 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $13 + else + local.get $13 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $12 + local.get $9 + i32.load offset=8 + local.tee $13 + i32.ne + if (result i32) + local.get $13 + if + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store offset=8 local.get $0 local.get $4 @@ -6018,7 +6614,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 77 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 79 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) @@ -6123,7 +6719,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 78 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 80 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) local.get $0 @@ -6145,11 +6741,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 81 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 80 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 82 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6223,7 +6819,7 @@ end i32.const 1 ) - (func $std/map/test (; 81 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 83 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6246,8 +6842,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -6265,8 +6861,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -6282,8 +6878,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -6305,8 +6901,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -6327,8 +6923,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -6344,8 +6940,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -6363,8 +6959,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -6380,8 +6976,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -6403,8 +6999,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -6425,8 +7021,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -6442,8 +7038,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -6459,8 +7055,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -6482,8 +7078,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -6505,8 +7101,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -6524,8 +7120,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -6541,8 +7137,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -6564,8 +7160,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -6579,18 +7175,41 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 82 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 84 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -6598,9 +7217,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -6612,7 +7251,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 83 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 85 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -6623,12 +7262,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 10 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -6655,7 +7294,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 84 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 86 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6706,7 +7345,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 85 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 87 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -6721,7 +7360,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 86 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 88 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6840,13 +7479,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $13 + local.get $9 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $13 + else + local.get $13 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $12 + local.get $9 + i32.load offset=8 + local.tee $13 + i32.ne + if (result i32) + local.get $13 + if + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store offset=8 local.get $0 local.get $4 @@ -6856,7 +7535,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 87 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 89 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) @@ -6961,7 +7640,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 88 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 90 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) local.get $0 @@ -6983,11 +7662,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 89 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 91 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 90 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 92 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -7061,7 +7740,7 @@ end i32.const 1 ) - (func $std/map/test (; 91 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 93 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -7084,8 +7763,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -7103,8 +7782,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -7120,8 +7799,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -7143,8 +7822,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -7165,8 +7844,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -7182,8 +7861,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -7201,8 +7880,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -7218,8 +7897,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -7241,8 +7920,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -7263,8 +7942,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -7280,8 +7959,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -7297,8 +7976,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -7320,8 +7999,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -7343,8 +8022,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -7362,8 +8041,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -7379,8 +8058,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -7402,8 +8081,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -7417,18 +8096,41 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 92 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 94 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -7436,9 +8138,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 48 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -7450,7 +8172,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 95 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -7461,12 +8183,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 11 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -7493,7 +8215,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 94 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 96 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7544,7 +8266,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 95 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 97 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) local.get $0 local.get $1 @@ -7560,7 +8282,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 96 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 98 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7680,13 +8402,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $13 + local.get $9 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $13 + else + local.get $13 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $12 + local.get $9 + i32.load offset=8 + local.tee $13 + i32.ne + if (result i32) + local.get $13 + if + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store offset=8 local.get $0 local.get $4 @@ -7696,7 +8458,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 97 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/map/Map#set (; 99 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) (local $3 f32) (local $4 i32) (local $5 i32) @@ -7802,7 +8564,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 98 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 100 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) local.get $0 @@ -7825,11 +8587,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 99 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 101 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 100 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#delete (; 102 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -7904,7 +8666,7 @@ end i32.const 1 ) - (func $std/map/test (; 101 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 103 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -7927,8 +8689,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -7946,8 +8708,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -7963,8 +8725,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -7986,8 +8748,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -8008,8 +8770,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -8025,8 +8787,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -8044,8 +8806,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -8061,8 +8823,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -8084,8 +8846,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -8106,8 +8868,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -8123,8 +8885,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -8140,8 +8902,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -8163,8 +8925,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -8186,8 +8948,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -8205,8 +8967,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -8222,8 +8984,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -8245,8 +9007,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -8260,18 +9022,41 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/map/Map#clear (; 102 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 104 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -8279,9 +9064,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -8293,7 +9098,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 103 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 105 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -8304,12 +9109,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 12 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -8336,7 +9141,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 104 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 106 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -8387,7 +9192,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 105 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 107 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) local.get $0 local.get $1 @@ -8403,7 +9208,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 106 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 108 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8523,13 +9328,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $13 + local.get $9 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $13 + else + local.get $13 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $12 + local.get $9 + i32.load offset=8 + local.tee $13 + i32.ne + if (result i32) + local.get $13 + if + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store offset=8 local.get $0 local.get $4 @@ -8539,7 +9384,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 107 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/map/Map#set (; 109 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) (local $3 f64) (local $4 i32) (local $5 i32) @@ -8645,7 +9490,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 108 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 110 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) local.get $0 @@ -8668,11 +9513,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 109 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 111 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 110 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#delete (; 112 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -8747,7 +9592,7 @@ end i32.const 1 ) - (func $std/map/test (; 111 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 113 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -8770,8 +9615,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -8789,8 +9634,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -8806,8 +9651,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 11 + i32.const 128 + i32.const 12 i32.const 4 call $~lib/env/abort unreachable @@ -8829,8 +9674,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 13 + i32.const 128 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -8851,8 +9696,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 17 + i32.const 128 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -8868,8 +9713,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -8887,8 +9732,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -8904,8 +9749,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 21 + i32.const 128 + i32.const 22 i32.const 4 call $~lib/env/abort unreachable @@ -8927,8 +9772,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 23 + i32.const 128 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -8949,8 +9794,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 27 + i32.const 128 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -8966,8 +9811,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 4 call $~lib/env/abort unreachable @@ -8983,8 +9828,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 30 + i32.const 128 + i32.const 31 i32.const 4 call $~lib/env/abort unreachable @@ -9006,8 +9851,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -9029,8 +9874,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -9048,8 +9893,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -9065,8 +9910,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 40 + i32.const 128 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -9088,8 +9933,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable @@ -9103,14 +9948,14 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 46 + i32.const 128 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start:std/map (; 112 ;) (type $FUNCSIG$v) + (func $start:std/map (; 114 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -9121,20 +9966,20 @@ global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric ) - (func $start (; 113 ;) (type $FUNCSIG$v) + (func $start (; 115 ;) (type $FUNCSIG$v) call $start:std/map ) - (func $null (; 114 ;) (type $FUNCSIG$v) + (func $null (; 116 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index f81a2dbc16..8a1096e9b7 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -3488,8 +3488,8 @@ (local $6 i32) (local $7 i32) (local $8 i64) - (local $9 i32) - (local $10 i64) + (local $9 i64) + (local $10 i32) local.get $0 i32.reinterpret_f32 local.tee $3 @@ -3532,10 +3532,10 @@ if local.get $0 f64.promote_f32 + local.tee $1 f64.const 3.141592653589793 f64.add - local.get $0 - f64.promote_f32 + local.get $1 f64.const 3.141592653589793 f64.sub local.get $7 @@ -3654,10 +3654,10 @@ if local.get $0 f64.promote_f32 + local.tee $1 f64.const 6.283185307179586 f64.add - local.get $0 - f64.promote_f32 + local.get $1 f64.const 6.283185307179586 f64.sub local.get $7 @@ -3791,15 +3791,15 @@ local.tee $6 i32.const 6 i32.shr_s - local.tee $9 + local.tee $10 i32.const 3 i32.shl i32.add i64.load - local.set $10 + local.set $8 i32.const 92 i32.load - local.get $9 + local.get $10 i32.const 1 i32.add i32.const 3 @@ -3822,7 +3822,7 @@ i64.shl i32.const 92 i32.load - local.get $9 + local.get $10 i32.const 2 i32.add i32.const 3 @@ -3843,11 +3843,7 @@ i64.sub i64.shr_u end - local.set $8 - f64.const 8.515303950216386e-20 - local.get $0 - f64.promote_f32 - f64.copysign + local.set $9 local.get $5 i64.const 64 local.get $6 @@ -3855,10 +3851,16 @@ local.tee $5 i64.sub i64.shr_u - local.get $10 + local.get $8 local.get $5 i64.shl i64.or + local.set $8 + f64.const 8.515303950216386e-20 + local.get $0 + f64.promote_f32 + f64.copysign + local.get $8 local.get $3 i32.const 8388607 i32.and @@ -3868,7 +3870,7 @@ local.tee $5 i64.mul local.get $5 - local.get $8 + local.get $9 i64.mul i64.const 32 i64.shr_u @@ -3876,7 +3878,7 @@ local.tee $5 i64.const 2 i64.shl - local.tee $8 + local.tee $9 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y @@ -3884,7 +3886,7 @@ local.get $5 i64.const 62 i64.shr_u - local.get $8 + local.get $9 i64.const 63 i64.shr_u i64.add @@ -3960,17 +3962,15 @@ f32.demote_f64 end local.set $0 + local.get $0 + f32.neg + local.get $0 local.get $3 i32.const 1 i32.add i32.const 2 i32.and - if - local.get $0 - f32.neg - local.set $0 - end - local.get $0 + select return end f64.const 1 @@ -9289,520 +9289,502 @@ (local $6 i32) (local $7 i32) (local $8 i64) - (local $9 i32) - (local $10 i64) + (local $9 i64) + (local $10 i32) local.get $0 i32.reinterpret_f32 local.tee $3 i32.const 31 i32.shr_u local.set $7 - local.get $3 - i32.const 2147483647 - i32.and - local.tee $3 - i32.const 1061752794 - i32.le_u - if - local.get $3 - i32.const 964689920 - i32.lt_u - if - local.get $0 - return - end - local.get $0 - f64.promote_f32 - local.tee $4 - local.get $4 - f64.mul - local.tee $1 - local.get $4 - f64.mul - local.set $2 - local.get $4 - local.get $2 - f64.const -0.16666666641626524 - local.get $1 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add - local.get $2 - local.get $1 - local.get $1 - f64.mul - f64.mul - f64.const -1.9839334836096632e-04 - local.get $1 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - return - end - local.get $3 - i32.const 1081824209 - i32.le_u - if + block $folding-inner0 local.get $3 - i32.const 1075235811 + i32.const 2147483647 + i32.and + local.tee $3 + i32.const 1061752794 i32.le_u if - local.get $7 - if (result f32) - local.get $0 - f64.promote_f32 - f64.const 1.5707963267948966 - f64.add - local.tee $2 - local.get $2 - f64.mul - local.tee $1 - local.get $1 - f64.mul - local.set $2 - f64.const 1 - local.get $1 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $2 - f64.const 0.04166662332373906 - f64.mul - f64.add - local.get $2 - local.get $1 - f64.mul - f64.const -0.001388676377460993 - local.get $1 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - f32.neg - else + local.get $3 + i32.const 964689920 + i32.lt_u + if local.get $0 - f64.promote_f32 - f64.const 1.5707963267948966 - f64.sub - local.tee $1 - local.get $1 - f64.mul - local.tee $2 - local.get $2 - f64.mul - local.set $1 - f64.const 1 - local.get $2 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $1 - f64.const 0.04166662332373906 - f64.mul - f64.add - local.get $1 - local.get $2 - f64.mul - f64.const -0.001388676377460993 - local.get $2 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 + return end - return + local.get $0 + f64.promote_f32 + local.tee $4 + local.get $4 + f64.mul + local.tee $1 + local.get $4 + f64.mul + local.set $2 + br $folding-inner0 end - local.get $0 - f64.promote_f32 - f64.const 3.141592653589793 - f64.add - local.get $0 - f64.promote_f32 - f64.const 3.141592653589793 - f64.sub - local.get $7 - select - f64.neg - local.tee $2 - local.get $2 - f64.mul - local.tee $1 - local.get $2 - f64.mul - local.set $4 - local.get $2 - local.get $4 - f64.const -0.16666666641626524 - local.get $1 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add - local.get $4 - local.get $1 - local.get $1 - f64.mul - f64.mul - f64.const -1.9839334836096632e-04 - local.get $1 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - return - end - local.get $3 - i32.const 1088565717 - i32.le_u - if local.get $3 - i32.const 1085271519 + i32.const 1081824209 i32.le_u if - local.get $7 - if (result f32) - local.get $0 - f64.promote_f32 - f64.const 4.71238898038469 - f64.add - local.tee $4 - local.get $4 - f64.mul - local.tee $1 - local.get $1 - f64.mul - local.set $2 - f64.const 1 - local.get $1 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $2 - f64.const 0.04166662332373906 - f64.mul - f64.add - local.get $2 - local.get $1 - f64.mul - f64.const -0.001388676377460993 - local.get $1 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - else - local.get $0 - f64.promote_f32 - f64.const 4.71238898038469 - f64.sub - local.tee $1 - local.get $1 - f64.mul - local.tee $2 - local.get $2 - f64.mul - local.set $1 - f64.const 1 - local.get $2 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $1 - f64.const 0.04166662332373906 - f64.mul - f64.add - local.get $1 - local.get $2 - f64.mul - f64.const -0.001388676377460993 - local.get $2 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - f32.neg + local.get $3 + i32.const 1075235811 + i32.le_u + if + local.get $7 + if (result f32) + local.get $0 + f64.promote_f32 + f64.const 1.5707963267948966 + f64.add + local.tee $2 + local.get $2 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.set $2 + f64.const 1 + local.get $1 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $2 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $2 + local.get $1 + f64.mul + f64.const -0.001388676377460993 + local.get $1 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + f32.neg + else + local.get $0 + f64.promote_f32 + f64.const 1.5707963267948966 + f64.sub + local.tee $1 + local.get $1 + f64.mul + local.tee $2 + local.get $2 + f64.mul + local.set $1 + f64.const 1 + local.get $2 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $1 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $1 + local.get $2 + f64.mul + f64.const -0.001388676377460993 + local.get $2 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + end + return end + local.get $0 + f64.promote_f32 + local.tee $1 + f64.const 3.141592653589793 + f64.add + local.get $1 + f64.const 3.141592653589793 + f64.sub + local.get $7 + select + f64.neg + local.tee $2 + local.get $2 + f64.mul + local.tee $1 + local.get $2 + f64.mul + local.set $4 + local.get $2 + local.get $4 + f64.const -0.16666666641626524 + local.get $1 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $4 + local.get $1 + local.get $1 + f64.mul + f64.mul + f64.const -1.9839334836096632e-04 + local.get $1 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 return end - local.get $0 - f64.promote_f32 - f64.const 6.283185307179586 - f64.add - local.get $0 - f64.promote_f32 - f64.const 6.283185307179586 - f64.sub - local.get $7 - select - local.tee $4 - local.get $4 - local.get $4 - f64.mul - local.tee $1 - local.get $4 - f64.mul - local.tee $2 - f64.const -0.16666666641626524 - local.get $1 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add - local.get $2 - local.get $1 - local.get $1 - f64.mul - f64.mul - f64.const -1.9839334836096632e-04 - local.get $1 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - return - end - local.get $3 - i32.const 2139095040 - i32.ge_u - if - local.get $0 - local.get $0 - f32.sub - return - end - block $~lib/math/rempio2f|inlined.1 (result i32) local.get $3 - i32.const 1305022427 - i32.lt_u + i32.const 1088565717 + i32.le_u if + local.get $3 + i32.const 1085271519 + i32.le_u + if + local.get $7 + if (result f32) + local.get $0 + f64.promote_f32 + f64.const 4.71238898038469 + f64.add + local.tee $4 + local.get $4 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.set $2 + f64.const 1 + local.get $1 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $2 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $2 + local.get $1 + f64.mul + f64.const -0.001388676377460993 + local.get $1 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + else + local.get $0 + f64.promote_f32 + f64.const 4.71238898038469 + f64.sub + local.tee $1 + local.get $1 + f64.mul + local.tee $2 + local.get $2 + f64.mul + local.set $1 + f64.const 1 + local.get $2 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $1 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $1 + local.get $2 + f64.mul + f64.const -0.001388676377460993 + local.get $2 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + f32.neg + end + return + end local.get $0 f64.promote_f32 local.tee $1 - f64.const 0.6366197723675814 - f64.mul - f64.nearest - local.set $2 + f64.const 6.283185307179586 + f64.add local.get $1 - local.get $2 - f64.const 1.5707963109016418 - f64.mul + f64.const 6.283185307179586 f64.sub - local.get $2 - f64.const 1.5893254773528196e-08 + local.get $7 + select + local.tee $4 + local.get $4 f64.mul - f64.sub - global.set $~lib/math/rempio2f_y - local.get $2 - i32.trunc_f64_s - br $~lib/math/rempio2f|inlined.1 + local.tee $1 + local.get $4 + f64.mul + local.set $2 + br $folding-inner0 end - i32.const 92 - i32.load local.get $3 - i32.const 23 - i32.shr_s - i32.const 152 - i32.sub - local.tee $6 - i32.const 6 - i32.shr_s - local.tee $9 - i32.const 3 - i32.shl - i32.add - i64.load - local.set $10 - i32.const 92 - i32.load - local.get $9 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - i64.load - local.set $5 - local.get $6 - i32.const 63 - i32.and - local.tee $6 - i32.const 32 - i32.gt_s - if (result i64) - local.get $5 - local.get $6 - i32.const 32 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + local.get $0 + f32.sub + return + end + block $~lib/math/rempio2f|inlined.1 (result i32) + local.get $3 + i32.const 1305022427 + i32.lt_u + if + local.get $0 + f64.promote_f32 + local.tee $1 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.set $2 + local.get $1 + local.get $2 + f64.const 1.5707963109016418 + f64.mul + f64.sub + local.get $2 + f64.const 1.5893254773528196e-08 + f64.mul + f64.sub + global.set $~lib/math/rempio2f_y + local.get $2 + i32.trunc_f64_s + br $~lib/math/rempio2f|inlined.1 + end + i32.const 92 + i32.load + local.get $3 + i32.const 23 + i32.shr_s + i32.const 152 i32.sub - i64.extend_i32_s - i64.shl + local.tee $6 + i32.const 6 + i32.shr_s + local.tee $10 + i32.const 3 + i32.shl + i32.add + i64.load + local.set $8 i32.const 92 i32.load - local.get $9 - i32.const 2 + local.get $10 + i32.const 1 i32.add i32.const 3 i32.shl i32.add i64.load - i64.const 96 + local.set $5 + local.get $6 + i32.const 63 + i32.and + local.tee $6 + i32.const 32 + i32.gt_s + if (result i64) + local.get $5 + local.get $6 + i32.const 32 + i32.sub + i64.extend_i32_s + i64.shl + i32.const 92 + i32.load + local.get $10 + i32.const 2 + i32.add + i32.const 3 + i32.shl + i32.add + i64.load + i64.const 96 + local.get $6 + i64.extend_i32_s + i64.sub + i64.shr_u + i64.or + else + local.get $5 + i64.const 32 + local.get $6 + i64.extend_i32_s + i64.sub + i64.shr_u + end + local.set $9 + local.get $5 + i64.const 64 local.get $6 i64.extend_i32_s + local.tee $5 i64.sub i64.shr_u + local.get $8 + local.get $5 + i64.shl i64.or - else + local.set $8 + f64.const 8.515303950216386e-20 + local.get $0 + f64.promote_f32 + f64.copysign + local.get $8 + local.get $3 + i32.const 8388607 + i32.and + i32.const 8388608 + i32.or + i64.extend_i32_s + local.tee $5 + i64.mul local.get $5 + local.get $9 + i64.mul i64.const 32 - local.get $6 - i64.extend_i32_s - i64.sub i64.shr_u + i64.add + local.tee $5 + i64.const 2 + i64.shl + local.tee $9 + f64.convert_i64_s + f64.mul + global.set $~lib/math/rempio2f_y + i32.const 0 + local.get $5 + i64.const 62 + i64.shr_u + local.get $9 + i64.const 63 + i64.shr_u + i64.add + i32.wrap_i64 + local.tee $3 + i32.sub + local.get $3 + local.get $7 + select end - local.set $8 - f64.const 8.515303950216386e-20 + local.set $3 + global.get $~lib/math/rempio2f_y + local.set $1 + local.get $3 + i32.const 1 + i32.and + if (result f32) + local.get $1 + local.get $1 + f64.mul + local.tee $1 + local.get $1 + f64.mul + local.set $2 + f64.const 1 + local.get $1 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $2 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $2 + local.get $1 + f64.mul + f64.const -0.001388676377460993 + local.get $1 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + else + local.get $1 + local.get $1 + local.get $1 + f64.mul + local.tee $2 + local.get $1 + f64.mul + local.tee $4 + f64.const -0.16666666641626524 + local.get $2 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $4 + local.get $2 + local.get $2 + f64.mul + f64.mul + f64.const -1.9839334836096632e-04 + local.get $2 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + end + local.set $0 + local.get $0 + f32.neg local.get $0 - f64.promote_f32 - f64.copysign - local.get $5 - i64.const 64 - local.get $6 - i64.extend_i32_s - local.tee $5 - i64.sub - i64.shr_u - local.get $10 - local.get $5 - i64.shl - i64.or local.get $3 - i32.const 8388607 + i32.const 2 i32.and - i32.const 8388608 - i32.or - i64.extend_i32_s - local.tee $5 - i64.mul - local.get $5 - local.get $8 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $5 - i64.const 2 - i64.shl - local.tee $8 - f64.convert_i64_s - f64.mul - global.set $~lib/math/rempio2f_y - i32.const 0 - local.get $5 - i64.const 62 - i64.shr_u - local.get $8 - i64.const 63 - i64.shr_u - i64.add - i32.wrap_i64 - local.tee $3 - i32.sub - local.get $3 - local.get $7 select + return end - local.set $3 - global.get $~lib/math/rempio2f_y - local.set $1 - local.get $3 - i32.const 1 - i32.and - if (result f32) - local.get $1 - local.get $1 - f64.mul - local.tee $1 - local.get $1 - f64.mul - local.set $2 - f64.const 1 - local.get $1 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $2 - f64.const 0.04166662332373906 - f64.mul - f64.add - local.get $2 - local.get $1 - f64.mul - f64.const -0.001388676377460993 - local.get $1 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - else - local.get $1 - local.get $1 - local.get $1 - f64.mul - local.tee $2 - local.get $1 - f64.mul - local.tee $4 - f64.const -0.16666666641626524 - local.get $2 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add - local.get $4 - local.get $2 - local.get $2 - f64.mul - f64.mul - f64.const -1.9839334836096632e-04 - local.get $2 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - end - local.set $0 - local.get $3 - i32.const 2 - i32.and - if - local.get $0 - f32.neg - local.set $0 - end - local.get $0 + local.get $4 + local.get $2 + f64.const -0.16666666641626524 + local.get $1 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $2 + local.get $1 + local.get $1 + f64.mul + f64.mul + f64.const -1.9839334836096632e-04 + local.get $1 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 ) (func $std/math/test_sinf (; 136 ;) (type $FUNCSIG$ifff) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 @@ -10019,207 +10001,299 @@ (local $6 i32) (local $7 i32) (local $8 i64) - (local $9 i32) - (local $10 i64) + (local $9 i64) + (local $10 i32) local.get $0 i32.reinterpret_f32 local.tee $4 i32.const 31 i32.shr_u local.set $7 - local.get $4 - i32.const 2147483647 - i32.and - local.tee $4 - i32.const 1061752794 - i32.le_u - if - local.get $4 - i32.const 964689920 - i32.lt_u - if - local.get $0 - return - end - local.get $0 - f64.promote_f32 - local.tee $1 - local.get $1 - f64.mul - local.tee $2 - local.get $1 - f64.mul - local.set $3 - local.get $1 - local.get $3 - f64.const 0.3333313950307914 - local.get $2 - f64.const 0.13339200271297674 - f64.mul - f64.add - f64.mul - f64.add - local.get $3 - local.get $2 - local.get $2 - f64.mul - local.tee $1 - f64.mul - f64.const 0.05338123784456704 - local.get $2 - f64.const 0.024528318116654728 - f64.mul - f64.add - local.get $1 - f64.const 0.002974357433599673 - local.get $2 - f64.const 0.009465647849436732 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - return - end - local.get $4 - i32.const 1081824209 - i32.le_u - if - local.get $4 - i32.const 1075235811 - i32.le_u - if - f64.const -1 - local.get $0 - f64.promote_f32 - f64.const 1.5707963267948966 - f64.add - local.get $0 - f64.promote_f32 - f64.const 1.5707963267948966 - f64.sub - local.get $7 - select - local.tee $1 - local.get $1 - local.get $1 - f64.mul - local.tee $3 - local.get $1 - f64.mul - local.tee $2 - f64.const 0.3333313950307914 - local.get $3 - f64.const 0.13339200271297674 - f64.mul - f64.add - f64.mul - f64.add - local.get $2 - local.get $3 - local.get $3 - f64.mul - local.tee $1 - f64.mul - f64.const 0.05338123784456704 - local.get $3 - f64.const 0.024528318116654728 - f64.mul - f64.add - local.get $1 - f64.const 0.002974357433599673 - local.get $3 - f64.const 0.009465647849436732 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f64.div - f32.demote_f64 - return - else - local.get $0 - f64.promote_f32 - f64.const 3.141592653589793 - f64.add - local.get $0 - f64.promote_f32 - f64.const 3.141592653589793 - f64.sub - local.get $7 - select - local.tee $1 - local.get $1 - local.get $1 - f64.mul - local.tee $2 - local.get $1 - f64.mul - local.tee $3 - f64.const 0.3333313950307914 - local.get $2 - f64.const 0.13339200271297674 - f64.mul - f64.add - f64.mul - f64.add - local.get $3 - local.get $2 - local.get $2 - f64.mul - local.tee $1 - f64.mul - f64.const 0.05338123784456704 - local.get $2 - f64.const 0.024528318116654728 - f64.mul - f64.add - local.get $1 - f64.const 0.002974357433599673 - local.get $2 - f64.const 0.009465647849436732 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - return - end - unreachable - end - local.get $4 - i32.const 1088565717 - i32.le_u - if - local.get $4 - i32.const 1085271519 - i32.le_u - if - f64.const -1 - local.get $0 - f64.promote_f32 - f64.const 4.71238898038469 - f64.add - local.get $0 - f64.promote_f32 - f64.const 4.71238898038469 - f64.sub - local.get $7 - select + block $folding-inner1 + block $folding-inner0 + local.get $4 + i32.const 2147483647 + i32.and + local.tee $4 + i32.const 1061752794 + i32.le_u + if + local.get $4 + i32.const 964689920 + i32.lt_u + if + local.get $0 + return + end + local.get $0 + f64.promote_f32 + local.tee $1 + local.get $1 + f64.mul + local.tee $2 + local.get $1 + f64.mul + local.set $3 + br $folding-inner0 + end + local.get $4 + i32.const 1081824209 + i32.le_u + if + local.get $4 + i32.const 1075235811 + i32.le_u + if + local.get $0 + f64.promote_f32 + local.tee $1 + f64.const 1.5707963267948966 + f64.add + local.get $1 + f64.const 1.5707963267948966 + f64.sub + local.get $7 + select + local.tee $1 + local.get $1 + f64.mul + local.tee $3 + local.get $1 + f64.mul + local.set $2 + br $folding-inner1 + else + local.get $0 + f64.promote_f32 + local.tee $1 + f64.const 3.141592653589793 + f64.add + local.get $1 + f64.const 3.141592653589793 + f64.sub + local.get $7 + select + local.tee $1 + local.get $1 + f64.mul + local.tee $2 + local.get $1 + f64.mul + local.set $3 + br $folding-inner0 + end + unreachable + end + local.get $4 + i32.const 1088565717 + i32.le_u + if + local.get $4 + i32.const 1085271519 + i32.le_u + if + local.get $0 + f64.promote_f32 + local.tee $1 + f64.const 4.71238898038469 + f64.add + local.get $1 + f64.const 4.71238898038469 + f64.sub + local.get $7 + select + local.tee $1 + local.get $1 + f64.mul + local.tee $3 + local.get $1 + f64.mul + local.set $2 + br $folding-inner1 + else + local.get $0 + f64.promote_f32 + local.tee $1 + f64.const 6.283185307179586 + f64.add + local.get $1 + f64.const 6.283185307179586 + f64.sub + local.get $7 + select + local.tee $1 + local.get $1 + f64.mul + local.tee $2 + local.get $1 + f64.mul + local.set $3 + br $folding-inner0 + end + unreachable + end + local.get $4 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + local.get $0 + f32.sub + return + end + block $~lib/math/rempio2f|inlined.2 (result i32) + local.get $4 + i32.const 1305022427 + i32.lt_u + if + local.get $0 + f64.promote_f32 + local.tee $2 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.set $1 + local.get $2 + local.get $1 + f64.const 1.5707963109016418 + f64.mul + f64.sub + local.get $1 + f64.const 1.5893254773528196e-08 + f64.mul + f64.sub + global.set $~lib/math/rempio2f_y + local.get $1 + i32.trunc_f64_s + br $~lib/math/rempio2f|inlined.2 + end + i32.const 92 + i32.load + local.get $4 + i32.const 23 + i32.shr_s + i32.const 152 + i32.sub + local.tee $6 + i32.const 6 + i32.shr_s + local.tee $10 + i32.const 3 + i32.shl + i32.add + i64.load + local.set $8 + i32.const 92 + i32.load + local.get $10 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + i64.load + local.set $5 + local.get $6 + i32.const 63 + i32.and + local.tee $6 + i32.const 32 + i32.gt_s + if (result i64) + local.get $5 + local.get $6 + i32.const 32 + i32.sub + i64.extend_i32_s + i64.shl + i32.const 92 + i32.load + local.get $10 + i32.const 2 + i32.add + i32.const 3 + i32.shl + i32.add + i64.load + i64.const 96 + local.get $6 + i64.extend_i32_s + i64.sub + i64.shr_u + i64.or + else + local.get $5 + i64.const 32 + local.get $6 + i64.extend_i32_s + i64.sub + i64.shr_u + end + local.set $9 + local.get $5 + i64.const 64 + local.get $6 + i64.extend_i32_s + local.tee $5 + i64.sub + i64.shr_u + local.get $8 + local.get $5 + i64.shl + i64.or + local.set $8 + f64.const 8.515303950216386e-20 + local.get $0 + f64.promote_f32 + f64.copysign + local.get $8 + local.get $4 + i32.const 8388607 + i32.and + i32.const 8388608 + i32.or + i64.extend_i32_s + local.tee $5 + i64.mul + local.get $5 + local.get $9 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.tee $5 + i64.const 2 + i64.shl + local.tee $9 + f64.convert_i64_s + f64.mul + global.set $~lib/math/rempio2f_y + i32.const 0 + local.get $5 + i64.const 62 + i64.shr_u + local.get $9 + i64.const 63 + i64.shr_u + i64.add + i32.wrap_i64 + local.tee $4 + i32.sub + local.get $4 + local.get $7 + select + end + local.set $4 + global.get $~lib/math/rempio2f_y local.tee $1 local.get $1 - local.get $1 f64.mul local.tee $3 local.get $1 f64.mul - local.tee $2 + local.set $2 + local.get $1 + local.get $2 f64.const 0.3333313950307914 local.get $3 f64.const 0.13339200271297674 @@ -10248,219 +10322,52 @@ f64.add f64.mul f64.add - f64.div - f32.demote_f64 - return - else - local.get $0 - f64.promote_f32 - f64.const 6.283185307179586 - f64.add - local.get $0 - f64.promote_f32 - f64.const 6.283185307179586 - f64.sub - local.get $7 - select - local.tee $1 - local.get $1 - local.get $1 - f64.mul - local.tee $2 + local.set $1 + f64.const -1 local.get $1 - f64.mul - local.tee $3 - f64.const 0.3333313950307914 - local.get $2 - f64.const 0.13339200271297674 - f64.mul - f64.add - f64.mul - f64.add - local.get $3 - local.get $2 - local.get $2 - f64.mul - local.tee $1 - f64.mul - f64.const 0.05338123784456704 - local.get $2 - f64.const 0.024528318116654728 - f64.mul - f64.add + f64.div local.get $1 - f64.const 0.002974357433599673 - local.get $2 - f64.const 0.009465647849436732 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add + local.get $4 + i32.const 1 + i32.and + select f32.demote_f64 return end - unreachable - end - local.get $4 - i32.const 2139095040 - i32.ge_u - if - local.get $0 - local.get $0 - f32.sub - return - end - block $~lib/math/rempio2f|inlined.2 (result i32) - local.get $4 - i32.const 1305022427 - i32.lt_u - if - local.get $0 - f64.promote_f32 - local.tee $2 - f64.const 0.6366197723675814 - f64.mul - f64.nearest - local.set $1 - local.get $2 - local.get $1 - f64.const 1.5707963109016418 - f64.mul - f64.sub - local.get $1 - f64.const 1.5893254773528196e-08 - f64.mul - f64.sub - global.set $~lib/math/rempio2f_y - local.get $1 - i32.trunc_f64_s - br $~lib/math/rempio2f|inlined.2 - end - i32.const 92 - i32.load - local.get $4 - i32.const 23 - i32.shr_s - i32.const 152 - i32.sub - local.tee $6 - i32.const 6 - i32.shr_s - local.tee $9 - i32.const 3 - i32.shl - i32.add - i64.load - local.set $10 - i32.const 92 - i32.load - local.get $9 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - i64.load - local.set $5 - local.get $6 - i32.const 63 - i32.and - local.tee $6 - i32.const 32 - i32.gt_s - if (result i64) - local.get $5 - local.get $6 - i32.const 32 - i32.sub - i64.extend_i32_s - i64.shl - i32.const 92 - i32.load - local.get $9 - i32.const 2 - i32.add - i32.const 3 - i32.shl - i32.add - i64.load - i64.const 96 - local.get $6 - i64.extend_i32_s - i64.sub - i64.shr_u - i64.or - else - local.get $5 - i64.const 32 - local.get $6 - i64.extend_i32_s - i64.sub - i64.shr_u - end - local.set $8 - f64.const 8.515303950216386e-20 - local.get $0 - f64.promote_f32 - f64.copysign - local.get $5 - i64.const 64 - local.get $6 - i64.extend_i32_s - local.tee $5 - i64.sub - i64.shr_u - local.get $10 - local.get $5 - i64.shl - i64.or - local.get $4 - i32.const 8388607 - i32.and - i32.const 8388608 - i32.or - i64.extend_i32_s - local.tee $5 - i64.mul - local.get $5 - local.get $8 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $5 - i64.const 2 - i64.shl - local.tee $8 - f64.convert_i64_s + local.get $1 + local.get $3 + f64.const 0.3333313950307914 + local.get $2 + f64.const 0.13339200271297674 f64.mul - global.set $~lib/math/rempio2f_y - i32.const 0 - local.get $5 - i64.const 62 - i64.shr_u - local.get $8 - i64.const 63 - i64.shr_u - i64.add - i32.wrap_i64 - local.tee $4 - i32.sub - local.get $4 - local.get $7 - select + f64.add + f64.mul + f64.add + local.get $3 + local.get $2 + local.get $2 + f64.mul + local.tee $1 + f64.mul + f64.const 0.05338123784456704 + local.get $2 + f64.const 0.024528318116654728 + f64.mul + f64.add + local.get $1 + f64.const 0.002974357433599673 + local.get $2 + f64.const 0.009465647849436732 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + return end - local.set $4 - global.get $~lib/math/rempio2f_y - local.tee $1 - local.get $1 - f64.mul - local.tee $3 - local.get $1 - f64.mul - local.set $2 + f64.const -1 local.get $1 local.get $2 f64.const 0.3333313950307914 @@ -10491,17 +10398,7 @@ f64.add f64.mul f64.add - local.set $1 - local.get $4 - i32.const 1 - i32.and - if - f64.const -1 - local.get $1 - f64.div - local.set $1 - end - local.get $1 + f64.div f32.demote_f64 ) (func $std/math/test_tanf (; 144 ;) (type $FUNCSIG$ifff) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index 1b0516bbcc..7762cdf468 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -16,6 +16,7 @@ (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$iffffi (func (param f32 f32 f32 f32 i32) (result i32))) (type $FUNCSIG$fff (func (param f32 f32) (result f32))) + (type $FUNCSIG$jii (func (param i32 i32) (result i64))) (type $FUNCSIG$d (func (result f64))) (type $FUNCSIG$vj (func (param i64))) (type $FUNCSIG$jj (func (param i64) (result i64))) @@ -90,6 +91,8 @@ (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/math/rempio2f_y (mut f64) (f64.const 0)) (global $~lib/math/PIO2_TABLE i32 (i32.const 88)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/builtins/f32.MAX_VALUE f32 (f32.const 3402823466385288598117041e14)) (global $~lib/builtins/f64.MIN_VALUE f64 (f64.const 5e-324)) (global $~lib/math/random_seeded (mut i32) (i32.const 0)) @@ -4308,7 +4311,16 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMathf.cos (; 86 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/array/Array#__unchecked_get (; 86 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $~lib/math/NativeMathf.cos (; 87 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -4744,38 +4756,26 @@ i32.and local.set $15 i32.const 88 - i32.load offset=4 local.get $14 i32.const 0 i32.add - i32.const 3 - i32.shl - i32.add - i64.load + call $~lib/array/Array#__unchecked_get local.set $16 i32.const 88 - i32.load offset=4 local.get $14 i32.const 1 i32.add - i32.const 3 - i32.shl - i32.add - i64.load + call $~lib/array/Array#__unchecked_get local.set $17 local.get $15 i32.const 32 i32.gt_s if i32.const 88 - i32.load offset=4 local.get $14 i32.const 2 i32.add - i32.const 3 - i32.shl - i32.add - i64.load + call $~lib/array/Array#__unchecked_get local.set $19 local.get $19 i64.const 96 @@ -4953,7 +4953,7 @@ local.get $26 end ) - (func $std/math/test_cosf (; 87 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_cosf (; 88 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.cos local.get $1 @@ -4961,7 +4961,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.expm1 (; 88 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.expm1 (; 89 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i32) (local $3 i32) @@ -5275,7 +5275,7 @@ local.get $14 f64.mul ) - (func $~lib/math/NativeMath.exp (; 89 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.exp (; 90 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i32) (local $2 i32) (local $3 f64) @@ -5440,7 +5440,7 @@ local.get $5 call $~lib/math/NativeMath.scalbn ) - (func $~lib/math/NativeMath.cosh (; 90 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cosh (; 91 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i32) (local $3 f64) @@ -5535,7 +5535,7 @@ local.set $3 local.get $3 ) - (func $std/math/test_cosh (; 91 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_cosh (; 92 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 i32) local.get $0 call $~lib/math/NativeMath.cosh @@ -5562,7 +5562,7 @@ local.get $4 end ) - (func $~lib/math/NativeMathf.expm1 (; 92 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.expm1 (; 93 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5857,7 +5857,7 @@ local.get $13 f32.mul ) - (func $~lib/math/NativeMathf.exp (; 93 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.exp (; 94 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -6001,7 +6001,7 @@ local.get $5 call $~lib/math/NativeMathf.scalbn ) - (func $~lib/math/NativeMathf.cosh (; 94 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cosh (; 95 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -6084,7 +6084,7 @@ f32.mul end ) - (func $std/math/test_coshf (; 95 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_coshf (; 96 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.cosh local.get $1 @@ -6092,7 +6092,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_exp (; 96 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_exp (; 97 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 i32) local.get $0 call $~lib/math/NativeMath.exp @@ -6119,7 +6119,7 @@ local.get $4 end ) - (func $std/math/test_expf (; 97 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_expf (; 98 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.exp local.get $1 @@ -6127,7 +6127,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_expm1 (; 98 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_expm1 (; 99 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 i32) local.get $0 call $~lib/math/NativeMath.expm1 @@ -6154,7 +6154,7 @@ local.get $4 end ) - (func $std/math/test_expm1f (; 99 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_expm1f (; 100 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.expm1 local.get $1 @@ -6162,7 +6162,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_floor (; 100 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_floor (; 101 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) (local $5 i32) block $~lib/math/NativeMath.floor|inlined.0 (result f64) @@ -6194,7 +6194,7 @@ local.get $5 end ) - (func $std/math/test_floorf (; 101 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_floorf (; 102 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) (local $4 f32) block $~lib/math/NativeMathf.floor|inlined.0 (result f32) local.get $0 @@ -6207,7 +6207,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.hypot (; 102 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.hypot (; 103 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -6408,7 +6408,7 @@ f64.sqrt f64.mul ) - (func $std/math/test_hypot (; 103 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (func $std/math/test_hypot (; 104 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) (local $5 i32) local.get $0 local.get $1 @@ -6437,7 +6437,7 @@ local.get $5 end ) - (func $~lib/math/NativeMathf.hypot (; 104 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.hypot (; 105 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6570,7 +6570,7 @@ f32.sqrt f32.mul ) - (func $std/math/test_hypotf (; 105 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) + (func $std/math/test_hypotf (; 106 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.hypot @@ -6579,7 +6579,7 @@ local.get $4 call $std/math/check ) - (func $std/math/test_log (; 106 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_log (; 107 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 i32) local.get $0 call $~lib/math/NativeMath.log @@ -6606,7 +6606,7 @@ local.get $4 end ) - (func $std/math/test_logf (; 107 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_logf (; 108 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.log local.get $1 @@ -6614,7 +6614,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.log10 (; 108 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log10 (; 109 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i32) (local $3 i32) @@ -6877,7 +6877,7 @@ local.get $9 f64.add ) - (func $std/math/test_log10 (; 109 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_log10 (; 110 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 i32) local.get $0 call $~lib/math/NativeMath.log10 @@ -6904,7 +6904,7 @@ local.get $4 end ) - (func $~lib/math/NativeMathf.log10 (; 110 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log10 (; 111 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7106,7 +7106,7 @@ f32.mul f32.add ) - (func $std/math/test_log10f (; 111 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_log10f (; 112 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.log10 local.get $1 @@ -7114,7 +7114,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_log1p (; 112 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_log1p (; 113 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 i32) local.get $0 call $~lib/math/NativeMath.log1p @@ -7141,7 +7141,7 @@ local.get $4 end ) - (func $std/math/test_log1pf (; 113 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_log1pf (; 114 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.log1p local.get $1 @@ -7149,7 +7149,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.log2 (; 114 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log2 (; 115 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i32) (local $3 i32) @@ -7405,7 +7405,7 @@ local.get $15 f64.add ) - (func $std/math/test_log2 (; 115 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_log2 (; 116 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 i32) local.get $0 call $~lib/math/NativeMath.log2 @@ -7432,7 +7432,7 @@ local.get $4 end ) - (func $~lib/math/NativeMathf.log2 (; 116 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log2 (; 117 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7629,7 +7629,7 @@ local.get $15 f32.add ) - (func $std/math/test_log2f (; 117 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_log2f (; 118 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.log2 local.get $1 @@ -7637,7 +7637,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_max (; 118 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (func $std/math/test_max (; 119 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) (local $5 f64) (local $6 f64) (local $7 i32) @@ -7674,7 +7674,7 @@ local.get $7 end ) - (func $std/math/test_maxf (; 119 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) + (func $std/math/test_maxf (; 120 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) (local $5 f32) (local $6 f32) block $~lib/math/NativeMathf.max|inlined.0 (result f32) @@ -7691,7 +7691,7 @@ local.get $4 call $std/math/check ) - (func $std/math/test_min (; 120 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (func $std/math/test_min (; 121 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) (local $5 f64) (local $6 f64) (local $7 i32) @@ -7728,7 +7728,7 @@ local.get $7 end ) - (func $std/math/test_minf (; 121 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) + (func $std/math/test_minf (; 122 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) (local $5 f32) (local $6 f32) block $~lib/math/NativeMathf.min|inlined.0 (result f32) @@ -7745,7 +7745,7 @@ local.get $4 call $std/math/check ) - (func $~lib/math/NativeMath.mod (; 122 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 123 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -7998,7 +7998,7 @@ local.get $2 f64.reinterpret_i64 ) - (func $std/math/test_mod (; 123 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (func $std/math/test_mod (; 124 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) (local $5 i32) local.get $0 local.get $1 @@ -8027,7 +8027,7 @@ local.get $5 end ) - (func $~lib/math/NativeMathf.mod (; 124 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 125 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8278,7 +8278,7 @@ local.get $2 f32.reinterpret_i32 ) - (func $std/math/test_modf (; 125 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) + (func $std/math/test_modf (; 126 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.mod @@ -8287,7 +8287,7 @@ local.get $4 call $std/math/check ) - (func $~lib/math/NativeMath.pow (; 126 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 127 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -9375,7 +9375,7 @@ local.get $16 f64.mul ) - (func $std/math/test_pow (; 127 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (func $std/math/test_pow (; 128 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) (local $5 i32) local.get $0 local.get $1 @@ -9404,7 +9404,7 @@ local.get $5 end ) - (func $~lib/math/NativeMathf.pow (; 128 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.pow (; 129 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10342,7 +10342,7 @@ local.get $11 f32.mul ) - (func $std/math/test_powf (; 129 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) + (func $std/math/test_powf (; 130 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.pow @@ -10351,7 +10351,7 @@ local.get $4 call $std/math/check ) - (func $~lib/math/murmurHash3 (; 130 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 131 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -10380,7 +10380,7 @@ local.set $0 local.get $0 ) - (func $~lib/math/splitMix32 (; 131 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 132 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -10415,7 +10415,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 132 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 133 ;) (type $FUNCSIG$vj) (param $0 i64) local.get $0 i64.eqz if @@ -10444,7 +10444,7 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/math/NativeMath.random (; 133 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 134 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) (local $2 i64) @@ -10501,7 +10501,7 @@ f64.const 1 f64.sub ) - (func $~lib/math/NativeMathf.random (; 134 ;) (type $FUNCSIG$f) (result f32) + (func $~lib/math/NativeMathf.random (; 135 ;) (type $FUNCSIG$f) (result f32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10556,7 +10556,7 @@ f32.const 1 f32.sub ) - (func $std/math/test_round (; 135 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_round (; 136 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) block $~lib/math/NativeMath.round|inlined.0 (result f64) local.get $0 @@ -10573,7 +10573,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_roundf (; 136 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_roundf (; 137 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) (local $4 f32) block $~lib/math/NativeMathf.round|inlined.0 (result f32) local.get $0 @@ -10590,7 +10590,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_sign (; 137 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_sign (; 138 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) (local $5 i32) block $~lib/math/NativeMath.sign|inlined.0 (result f64) @@ -10636,7 +10636,7 @@ local.get $5 end ) - (func $std/math/test_signf (; 138 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_signf (; 139 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) (local $4 f32) block $~lib/math/NativeMathf.sign|inlined.0 (result f32) local.get $0 @@ -10663,7 +10663,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.rem (; 139 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.rem (; 140 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -10986,7 +10986,7 @@ local.get $0 end ) - (func $std/math/test_rem (; 140 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (func $std/math/test_rem (; 141 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.rem @@ -10995,7 +10995,7 @@ local.get $4 call $std/math/check ) - (func $~lib/math/NativeMathf.rem (; 141 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.rem (; 142 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11315,7 +11315,7 @@ local.get $0 end ) - (func $std/math/test_remf (; 142 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) + (func $std/math/test_remf (; 143 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.rem @@ -11324,7 +11324,7 @@ local.get $4 call $std/math/check ) - (func $~lib/math/NativeMathf.sin (; 143 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sin (; 144 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -11756,38 +11756,26 @@ i32.and local.set $15 i32.const 88 - i32.load offset=4 local.get $14 i32.const 0 i32.add - i32.const 3 - i32.shl - i32.add - i64.load + call $~lib/array/Array#__unchecked_get local.set $16 i32.const 88 - i32.load offset=4 local.get $14 i32.const 1 i32.add - i32.const 3 - i32.shl - i32.add - i64.load + call $~lib/array/Array#__unchecked_get local.set $17 local.get $15 i32.const 32 i32.gt_s if i32.const 88 - i32.load offset=4 local.get $14 i32.const 2 i32.add - i32.const 3 - i32.shl - i32.add - i64.load + call $~lib/array/Array#__unchecked_get local.set $19 local.get $19 i64.const 96 @@ -11963,7 +11951,7 @@ local.get $26 end ) - (func $std/math/test_sinf (; 144 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_sinf (; 145 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.sin local.get $1 @@ -11971,7 +11959,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.sinh (; 145 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sinh (; 146 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 f64) (local $3 i32) @@ -12075,7 +12063,7 @@ local.set $4 local.get $4 ) - (func $std/math/test_sinh (; 146 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_sinh (; 147 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 i32) local.get $0 call $~lib/math/NativeMath.sinh @@ -12102,7 +12090,7 @@ local.get $4 end ) - (func $~lib/math/NativeMathf.sinh (; 147 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sinh (; 148 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -12197,7 +12185,7 @@ local.set $3 local.get $3 ) - (func $std/math/test_sinhf (; 148 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_sinhf (; 149 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.sinh local.get $1 @@ -12205,7 +12193,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_sqrt (; 149 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_sqrt (; 150 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) (local $5 i32) block $~lib/math/NativeMath.sqrt|inlined.0 (result f64) @@ -12237,7 +12225,7 @@ local.get $5 end ) - (func $std/math/test_sqrtf (; 150 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_sqrtf (; 151 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) (local $4 f32) block $~lib/math/NativeMathf.sqrt|inlined.0 (result f32) local.get $0 @@ -12250,7 +12238,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMathf.tan (; 151 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tan (; 152 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -12748,38 +12736,26 @@ i32.and local.set $17 i32.const 88 - i32.load offset=4 local.get $16 i32.const 0 i32.add - i32.const 3 - i32.shl - i32.add - i64.load + call $~lib/array/Array#__unchecked_get local.set $18 i32.const 88 - i32.load offset=4 local.get $16 i32.const 1 i32.add - i32.const 3 - i32.shl - i32.add - i64.load + call $~lib/array/Array#__unchecked_get local.set $19 local.get $17 i32.const 32 i32.gt_s if i32.const 88 - i32.load offset=4 local.get $16 i32.const 2 i32.add - i32.const 3 - i32.shl - i32.add - i64.load + call $~lib/array/Array#__unchecked_get local.set $21 local.get $21 i64.const 96 @@ -12934,7 +12910,7 @@ f32.demote_f64 end ) - (func $std/math/test_tanf (; 152 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_tanf (; 153 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.tan local.get $1 @@ -12942,7 +12918,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.tanh (; 153 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tanh (; 154 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 f64) (local $3 i32) @@ -13034,7 +13010,7 @@ local.get $0 f64.copysign ) - (func $std/math/test_tanh (; 154 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_tanh (; 155 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 i32) local.get $0 call $~lib/math/NativeMath.tanh @@ -13061,7 +13037,7 @@ local.get $4 end ) - (func $~lib/math/NativeMathf.tanh (; 155 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tanh (; 156 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -13147,7 +13123,7 @@ local.get $0 f32.copysign ) - (func $std/math/test_tanhf (; 156 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_tanhf (; 157 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.tanh local.get $1 @@ -13155,7 +13131,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_trunc (; 157 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $std/math/test_trunc (; 158 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) (local $5 i32) block $~lib/math/NativeMath.trunc|inlined.0 (result f64) @@ -13187,7 +13163,7 @@ local.get $5 end ) - (func $std/math/test_truncf (; 158 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + (func $std/math/test_truncf (; 159 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) (local $4 f32) block $~lib/math/NativeMathf.trunc|inlined.0 (result f32) local.get $0 @@ -13200,7 +13176,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.imul (; 159 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.imul (; 160 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 f64.add @@ -13233,7 +13209,7 @@ i32.mul f64.convert_i32_s ) - (func $~lib/math/NativeMath.clz32 (; 160 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.clz32 (; 161 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) local.get $0 call $~lib/builtins/isFinite i32.eqz @@ -13256,7 +13232,7 @@ i32.clz f64.convert_i32_s ) - (func $~lib/math/ipow64 (; 161 ;) (type $FUNCSIG$jji) (param $0 i64) (param $1 i32) (result i64) + (func $~lib/math/ipow64 (; 162 ;) (type $FUNCSIG$jji) (param $0 i64) (param $1 i32) (result i64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -13488,7 +13464,7 @@ end local.get $2 ) - (func $~lib/math/ipow32f (; 162 ;) (type $FUNCSIG$ffi) (param $0 f32) (param $1 i32) (result f32) + (func $~lib/math/ipow32f (; 163 ;) (type $FUNCSIG$ffi) (param $0 f32) (param $1 i32) (result f32) (local $2 i32) (local $3 f32) local.get $1 @@ -13539,7 +13515,7 @@ local.get $3 end ) - (func $~lib/math/ipow64f (; 163 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/ipow64f (; 164 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) (local $2 i32) (local $3 f64) local.get $1 @@ -13590,7 +13566,7 @@ local.get $3 end ) - (func $start:std/math (; 164 ;) (type $FUNCSIG$v) + (func $start:std/math (; 165 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) (local $2 i32) @@ -47837,9 +47813,9 @@ unreachable end ) - (func $start (; 165 ;) (type $FUNCSIG$v) + (func $start (; 166 ;) (type $FUNCSIG$v) call $start:std/math ) - (func $null (; 166 ;) (type $FUNCSIG$v) + (func $null (; 167 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 9e8d6bd301..85bcd14fbc 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -1,6 +1,5 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) @@ -77,32 +76,38 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/assertUnregistered (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.const 48 i32.le_u if i32.const 0 i32.const 16 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 i32.const 8 i32.sub + local.tee $1 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 16 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end + local.get $1 + i32.const 1 + i32.store + local.get $0 ) (func $std/new/AClass#constructor (; 3 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) @@ -117,14 +122,8 @@ local.get $0 i32.const 8 i32.add + call $~lib/runtime/register local.tee $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 8 - i32.sub - i32.const 1 - i32.store - local.get $0 i32.const 1 i32.store local.get $0 diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index ed9fb28621..460fb5f87d 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -2,7 +2,6 @@ (type $FUNCSIG$iif (func (param i32 f32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -11,7 +10,6 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/new/AClass.aStaticField (mut 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_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -119,7 +117,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -135,7 +133,8 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -143,14 +142,16 @@ if i32.const 0 i32.const 16 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq @@ -158,23 +159,17 @@ if i32.const 0 i32.const 16 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $std/new/AClass#constructor (; 6 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $std/new/AClass#constructor (; 5 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) local.get $0 block (result i32) @@ -186,12 +181,12 @@ i32.const 8 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -212,7 +207,7 @@ f32.store offset=4 local.get $0 ) - (func $start:std/new (; 7 ;) (type $FUNCSIG$v) + (func $start:std/new (; 6 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -228,9 +223,9 @@ call $std/new/AClass#constructor global.set $std/new/aClass ) - (func $start (; 8 ;) (type $FUNCSIG$v) + (func $start (; 7 ;) (type $FUNCSIG$v) call $start:std/new ) - (func $null (; 9 ;) (type $FUNCSIG$v) + (func $null (; 8 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index dc664bda89..5a73a2f5d7 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -1,7 +1,6 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$ddi (func (param f64 i32) (result f64))) @@ -146,7 +145,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 call $~lib/memory/memory.allocate @@ -160,48 +159,44 @@ i32.const 8 i32.add ) - (func $~lib/runtime/assertUnregistered (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 i32.const 112 i32.le_u if i32.const 0 i32.const 16 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 i32.const 8 i32.sub + local.tee $2 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 16 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 8 - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $std/operator-overloading/Tester#constructor (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester#constructor (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $2 local.get $0 i32.store @@ -210,7 +205,7 @@ i32.store offset=4 local.get $2 ) - (func $~lib/math/NativeMath.scalbn (; 6 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 5 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -287,7 +282,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/math/NativeMath.pow (; 7 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 6 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -1226,7 +1221,7 @@ f64.const 1e-300 f64.mul ) - (func $std/operator-overloading/Tester.pow (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.pow (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load f64.convert_i32_s @@ -1245,11 +1240,11 @@ i32.trunc_f64_s call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/TesterInlineStatic#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/TesterInlineStatic#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $2 local.get $0 i32.store @@ -1258,11 +1253,11 @@ i32.store offset=4 local.get $2 ) - (func $std/operator-overloading/TesterInlineInstance#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/TesterInlineInstance#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $2 local.get $0 i32.store @@ -1271,7 +1266,7 @@ i32.store offset=4 local.get $2 ) - (func $start:std/operator-overloading (; 11 ;) (type $FUNCSIG$v) + (func $start:std/operator-overloading (; 10 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2526,10 +2521,10 @@ unreachable end ) - (func $start (; 12 ;) (type $FUNCSIG$v) + (func $start (; 11 ;) (type $FUNCSIG$v) call $start:std/operator-overloading ) - (func $null (; 13 ;) (type $FUNCSIG$v) + (func $null (; 12 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 842394a795..e3c97224ec 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -2,7 +2,6 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$ddi (func (param f64 i32) (result f64))) @@ -13,7 +12,6 @@ (data (i32.const 48) "\02\00\00\006\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -187,7 +185,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -203,7 +201,8 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -211,14 +210,16 @@ if i32.const 0 i32.const 16 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq @@ -226,23 +227,17 @@ if i32.const 0 i32.const 16 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $std/operator-overloading/Tester#constructor (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/operator-overloading/Tester#constructor (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.eqz @@ -252,12 +247,12 @@ i32.const 8 local.set $3 local.get $3 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $3 local.get $3 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -269,7 +264,7 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/Tester.add (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.add (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -283,7 +278,7 @@ i32.add call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.sub (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.sub (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -297,7 +292,7 @@ i32.sub call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.mul (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.mul (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -311,7 +306,7 @@ i32.mul call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.div (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.div (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -325,7 +320,7 @@ i32.div_s call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.mod (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.mod (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -339,7 +334,7 @@ i32.rem_s call $std/operator-overloading/Tester#constructor ) - (func $~lib/math/NativeMath.scalbn (; 12 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 11 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) (local $2 f64) (local $3 i32) (local $4 i32) @@ -430,7 +425,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/math/NativeMath.pow (; 13 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 12 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -1518,7 +1513,7 @@ local.get $16 f64.mul ) - (func $std/operator-overloading/Tester.pow (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.pow (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1538,7 +1533,7 @@ i32.trunc_f64_s call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.and (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.and (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1552,7 +1547,7 @@ i32.and call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.or (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.or (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1566,7 +1561,7 @@ i32.or call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.xor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.xor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1580,7 +1575,7 @@ i32.xor call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.equals (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.equals (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1598,7 +1593,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.notEquals (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.notEquals (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1616,7 +1611,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.greater (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.greater (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1634,7 +1629,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.greaterEquals (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.greaterEquals (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1652,7 +1647,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.less (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.less (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1670,7 +1665,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.lessEquals (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.lessEquals (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1688,7 +1683,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.shr (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shr (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1700,7 +1695,7 @@ i32.shr_s call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.shu (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shu (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1712,7 +1707,7 @@ i32.shr_u call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.shl (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shl (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1724,7 +1719,7 @@ i32.shl call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.pos (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.pos (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1732,7 +1727,7 @@ i32.load offset=4 call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.neg (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.neg (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.const 0 local.get $0 @@ -1744,7 +1739,7 @@ i32.sub call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.not (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.not (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1756,7 +1751,7 @@ i32.xor call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.excl (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.excl (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -1770,7 +1765,7 @@ local.get $1 end ) - (func $std/operator-overloading/Tester#inc (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#inc (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 local.get $0 i32.load @@ -1785,7 +1780,7 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/Tester#dec (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#dec (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 local.get $0 i32.load @@ -1800,7 +1795,7 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/Tester#postInc (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#postInc (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1812,7 +1807,7 @@ i32.add call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester#postDec (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#postDec (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1824,7 +1819,7 @@ i32.sub call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/TesterInlineStatic#constructor (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/operator-overloading/TesterInlineStatic#constructor (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.eqz @@ -1834,12 +1829,12 @@ i32.const 8 local.set $3 local.get $3 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $3 local.get $3 i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -1851,7 +1846,7 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/TesterInlineInstance#constructor (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/operator-overloading/TesterInlineInstance#constructor (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.eqz @@ -1861,12 +1856,12 @@ i32.const 8 local.set $3 local.get $3 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $3 local.get $3 i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -1878,7 +1873,7 @@ i32.store offset=4 local.get $0 ) - (func $start:std/operator-overloading (; 37 ;) (type $FUNCSIG$v) + (func $start:std/operator-overloading (; 36 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) global.get $~lib/memory/HEAP_BASE @@ -2939,9 +2934,9 @@ unreachable end ) - (func $start (; 38 ;) (type $FUNCSIG$v) + (func $start (; 37 ;) (type $FUNCSIG$v) call $start:std/operator-overloading ) - (func $null (; 39 ;) (type $FUNCSIG$v) + (func $null (; 38 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index dbe7d21bba..a78cd814d9 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -1210,12 +1210,12 @@ global.get $std/pointer/one i32.const 8 i32.add - global.set $std/pointer/one - global.get $std/pointer/one local.tee $0 + global.set $std/pointer/one + local.get $0 global.set $std/pointer/nextOne global.get $std/pointer/nextOne - local.get $0 + global.get $std/pointer/one i32.ne if i32.const 0 diff --git a/tests/compiler/std/pointer.untouched.wat b/tests/compiler/std/pointer.untouched.wat index dfb9770502..293507f19d 100644 --- a/tests/compiler/std/pointer.untouched.wat +++ b/tests/compiler/std/pointer.untouched.wat @@ -1919,8 +1919,9 @@ i32.const 8 i32.add end + local.tee $0 global.set $std/pointer/one - global.get $std/pointer/one + local.get $0 end global.set $std/pointer/nextOne global.get $std/pointer/nextOne diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 240f256f33..0c5eca5904 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -1174,7 +1174,7 @@ local.get $2 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/doAllocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -2541,7 +2541,7 @@ end end ) - (func $~lib/runtime/doReallocate (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2616,7 +2616,7 @@ if i32.const 0 i32.const 232 - i32.const 133 + i32.const 125 i32.const 8 call $~lib/env/abort unreachable @@ -2646,74 +2646,111 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/assertUnregistered (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/discard (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 264 i32.le_u if i32.const 0 i32.const 232 - i32.const 313 - i32.const 2 + i32.const 185 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 i32.const 16 i32.sub + local.tee $0 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 232 - i32.const 314 - i32.const 2 + i32.const 187 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/memory/memory.free + ) + (func $~lib/runtime/register (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.const 264 + i32.le_u + if + i32.const 0 + i32.const 232 + i32.const 161 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 232 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end + local.get $1 + i32.const 2 + i32.store + local.get $0 + global.set $std/runtime/register_ref ) - (func $start:std/runtime (; 24 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 25 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) loop $repeat|0 - local.get $1 + local.get $0 i32.const 9000 i32.lt_s if i32.const 1 i32.const 32 - local.get $1 + local.get $0 i32.const 15 i32.add i32.clz i32.sub i32.shl - local.tee $2 + local.tee $1 i32.const 0 i32.ne - local.tee $0 - if - local.get $2 + local.tee $2 + if (result i32) + local.get $1 i32.const 1 i32.sub - local.get $2 + local.get $1 i32.and i32.eqz - local.set $0 + else + local.get $2 end - local.get $0 if - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 else i32.const 0 i32.const 88 - i32.const 31 + i32.const 34 i32.const 2 call $~lib/env/abort unreachable @@ -2731,7 +2768,6 @@ i32.const 1 i32.const 32 global.get $std/runtime/barrier2 - local.tee $0 i32.const 16 i32.add i32.clz @@ -2739,7 +2775,7 @@ i32.shl i32.const 1 i32.const 32 - local.get $0 + global.get $std/runtime/barrier2 i32.const 15 i32.add i32.clz @@ -2762,7 +2798,6 @@ i32.const 1 i32.const 32 global.get $std/runtime/barrier3 - local.tee $0 i32.const 16 i32.add i32.clz @@ -2770,7 +2805,7 @@ i32.shl i32.const 1 i32.const 32 - local.get $0 + global.get $std/runtime/barrier3 i32.const 15 i32.add i32.clz @@ -2813,7 +2848,7 @@ f64.const 0 call $~lib/env/trace i32.const 1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate global.set $std/runtime/ref1 global.get $std/runtime/ref1 i32.const 16 @@ -2826,7 +2861,7 @@ if i32.const 0 i32.const 88 - i32.const 46 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -2838,21 +2873,21 @@ if i32.const 0 i32.const 88 - i32.const 47 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref1 - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 global.get $std/runtime/barrier1 - call $~lib/runtime/doReallocate + call $~lib/runtime/reallocate i32.ne if i32.const 0 i32.const 88 - i32.const 48 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -2864,14 +2899,14 @@ if i32.const 0 i32.const 88 - i32.const 49 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref1 global.get $std/runtime/barrier2 - call $~lib/runtime/doReallocate + call $~lib/runtime/reallocate global.set $std/runtime/ref2 global.get $std/runtime/ref1 global.get $std/runtime/ref2 @@ -2879,7 +2914,7 @@ if i32.const 0 i32.const 88 - i32.const 51 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -2895,20 +2930,15 @@ if i32.const 0 i32.const 88 - i32.const 53 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref2 - local.tee $1 - call $~lib/runtime/assertUnregistered - local.get $1 - i32.const 16 - i32.sub - call $~lib/memory/memory.free + call $~lib/runtime/discard global.get $std/runtime/barrier2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate global.set $std/runtime/ref3 global.get $std/runtime/ref1 global.get $std/runtime/ref3 @@ -2916,31 +2946,23 @@ if i32.const 0 i32.const 88 - i32.const 56 + i32.const 59 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/barrier1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate global.set $std/runtime/ref4 global.get $std/runtime/ref4 - local.tee $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 16 - i32.sub - i32.const 2 - i32.store - local.get $0 - global.set $std/runtime/register_ref + call $~lib/runtime/register global.get $std/runtime/register_ref global.get $std/runtime/ref4 i32.ne if i32.const 0 i32.const 88 - i32.const 60 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -2956,7 +2978,7 @@ if i32.const 0 i32.const 88 - i32.const 62 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable @@ -2968,13 +2990,13 @@ if i32.const 0 i32.const 88 - i32.const 63 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable end i32.const 10 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate global.set $std/runtime/ref5 global.get $std/runtime/ref5 i32.const 16 @@ -2985,7 +3007,7 @@ if i32.const 0 i32.const 88 - i32.const 66 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable @@ -3001,16 +3023,16 @@ if i32.const 0 i32.const 88 - i32.const 67 + i32.const 70 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 25 ;) (type $FUNCSIG$v) + (func $start (; 26 ;) (type $FUNCSIG$v) call $start:std/runtime ) - (func $null (; 26 ;) (type $FUNCSIG$v) + (func $null (; 27 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/runtime.ts b/tests/compiler/std/runtime.ts index 0782ff84e3..50a0bdc9c0 100644 --- a/tests/compiler/std/runtime.ts +++ b/tests/compiler/std/runtime.ts @@ -3,19 +3,22 @@ import { CLASSID, ADJUSTOBLOCK, ALLOCATE, REALLOCATE, REGISTER, DISCARD, HEADER, var register_ref: usize = 0; -@global function __gc_register(ref: usize): void { +@global function __ref_register(ref: usize): void { register_ref = ref; } var link_ref: usize = 0; var link_parentRef: usize = 0; -@global function __gc_link(ref: usize, parentRef: usize): void { +@global function __ref_link(ref: usize, parentRef: usize): void { link_ref = ref; link_parentRef = parentRef; } -@global function __gc_collect(): void { +@global function __ref_unlink(ref: usize, parentRef: usize): void { +} + +@global function __ref_collect(): void { } class A {} diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 41a292af12..b1e3fdc5aa 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -36,7 +36,6 @@ (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 1)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $std/runtime/register_ref (mut i32) (i32.const 0)) @@ -1472,7 +1471,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -3229,11 +3228,11 @@ end end ) - (func $std/runtime/__gc_register (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/runtime/__ref_register (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $std/runtime/register_ref ) - (func $~lib/runtime/doReallocate (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3304,7 +3303,7 @@ if i32.const 0 i32.const 232 - i32.const 133 + i32.const 125 i32.const 8 call $~lib/env/abort unreachable @@ -3313,7 +3312,7 @@ call $~lib/memory/memory.free else local.get $0 - call $std/runtime/__gc_register + call $std/runtime/__ref_register end local.get $5 local.set $2 @@ -3337,7 +3336,8 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/assertUnregistered (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/discard (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -3345,14 +3345,16 @@ if i32.const 0 i32.const 232 - i32.const 313 - i32.const 2 + i32.const 185 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $1 + local.get $1 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq @@ -3360,39 +3362,59 @@ if i32.const 0 i32.const 232 - i32.const 314 - i32.const 2 + i32.const 187 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doDiscard (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $1 call $~lib/memory/memory.free ) - (func $~lib/runtime/doRegister (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - call $~lib/runtime/assertUnregistered + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 232 + i32.const 161 + i32.const 4 + call $~lib/env/abort + unreachable + end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 232 + i32.const 163 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 local.get $1 i32.store local.get $0 - call $std/runtime/__gc_register + call $std/runtime/__ref_register local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $~lib/string/String#get:length (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -3400,7 +3422,7 @@ i32.const 1 i32.shr_u ) - (func $start:std/runtime (; 35 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 34 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $start:~lib/allocator/tlsf @@ -3411,7 +3433,7 @@ if i32.const 0 i32.const 88 - i32.const 23 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -3424,7 +3446,7 @@ if i32.const 0 i32.const 88 - i32.const 29 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -3445,7 +3467,7 @@ if i32.const 0 i32.const 88 - i32.const 31 + i32.const 34 i32.const 2 call $~lib/env/abort unreachable @@ -3537,7 +3559,7 @@ i32.const 1 local.set $0 local.get $0 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end global.set $std/runtime/ref1 global.get $std/runtime/ref1 @@ -3552,7 +3574,7 @@ if i32.const 0 i32.const 88 - i32.const 46 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -3565,7 +3587,7 @@ if i32.const 0 i32.const 88 - i32.const 47 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -3578,14 +3600,14 @@ local.set $0 local.get $1 local.get $0 - call $~lib/runtime/doReallocate + call $~lib/runtime/reallocate end i32.eq i32.eqz if i32.const 0 i32.const 88 - i32.const 48 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -3598,7 +3620,7 @@ if i32.const 0 i32.const 88 - i32.const 49 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -3610,7 +3632,7 @@ local.set $0 local.get $1 local.get $0 - call $~lib/runtime/doReallocate + call $~lib/runtime/reallocate end global.set $std/runtime/ref2 global.get $std/runtime/ref1 @@ -3620,7 +3642,7 @@ if i32.const 0 i32.const 88 - i32.const 51 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -3637,7 +3659,7 @@ if i32.const 0 i32.const 88 - i32.const 53 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -3646,13 +3668,13 @@ global.get $std/runtime/ref2 local.set $0 local.get $0 - call $~lib/runtime/doDiscard + call $~lib/runtime/discard end block $~lib/runtime/ALLOCATE|inlined.1 (result i32) global.get $std/runtime/barrier2 local.set $0 local.get $0 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end global.set $std/runtime/ref3 global.get $std/runtime/ref1 @@ -3662,7 +3684,7 @@ if i32.const 0 i32.const 88 - i32.const 56 + i32.const 59 i32.const 0 call $~lib/env/abort unreachable @@ -3671,7 +3693,7 @@ global.get $std/runtime/barrier1 local.set $0 local.get $0 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end global.set $std/runtime/ref4 block $~lib/runtime/REGISTER|inlined.0 (result i32) @@ -3679,7 +3701,7 @@ local.set $0 local.get $0 i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register end drop global.get $std/runtime/register_ref @@ -3689,7 +3711,7 @@ if i32.const 0 i32.const 88 - i32.const 60 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -3706,7 +3728,7 @@ if i32.const 0 i32.const 88 - i32.const 62 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable @@ -3719,7 +3741,7 @@ if i32.const 0 i32.const 88 - i32.const 63 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable @@ -3728,7 +3750,7 @@ i32.const 10 local.set $0 local.get $0 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end global.set $std/runtime/ref5 global.get $std/runtime/ref5 @@ -3739,7 +3761,7 @@ if i32.const 0 i32.const 88 - i32.const 66 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable @@ -3752,15 +3774,15 @@ if i32.const 0 i32.const 88 - i32.const 67 + i32.const 70 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 36 ;) (type $FUNCSIG$v) + (func $start (; 35 ;) (type $FUNCSIG$v) call $start:std/runtime ) - (func $null (; 37 ;) (type $FUNCSIG$v) + (func $null (; 36 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index c0ecab42da..5bf37495b4 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -2,10 +2,10 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$iiji (func (param i32 i64 i32) (result i32))) @@ -19,15 +19,20 @@ (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 48) "\02\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 96) "\02\00\00\00\14\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s") + (data (i32.const 8) "\02\00\00\00\1e") + (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 56) "\02\00\00\00&") + (data (i32.const 72) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 112) "\02\00\00\00\14") + (data (i32.const 128) "s\00t\00d\00/\00s\00e\00t\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -91,12 +96,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -109,47 +114,49 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 i32.add ) - (func $~lib/runtime/assertUnregistered (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - i32.const 124 + i32.const 148 i32.le_u if i32.const 0 - i32.const 16 - i32.const 313 - i32.const 2 + i32.const 24 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub + local.tee $2 i32.load i32.const -1520547049 i32.ne if i32.const 0 - i32.const 16 - i32.const 314 - i32.const 2 + i32.const 24 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 8 - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -360,39 +367,51 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 1073741816 + i32.const 1073741808 i32.gt_u if i32.const 0 - i32.const 56 + i32.const 72 i32.const 25 i32.const 43 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $1 local.get $0 call $~lib/memory/memory.fill local.get $1 i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/set/Set#clear (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 + (func $~lib/set/Set#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 + local.get $0 + i32.load + drop + local.get $0 + local.get $1 i32.store local.get $0 i32.const 3 i32.store offset=4 - local.get $0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + local.get $0 + i32.load offset=8 + i32.ne + drop + local.get $0 + local.get $1 i32.store offset=8 local.get $0 i32.const 4 @@ -404,12 +423,12 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -432,7 +451,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -477,7 +496,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -493,7 +512,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -504,12 +523,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $4 - local.get $2 + local.get $3 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -521,7 +540,7 @@ local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 3 @@ -529,24 +548,24 @@ i32.add local.set $7 local.get $5 - local.set $3 + local.set $2 loop $continue|0 - local.get $2 + local.get $3 local.get $7 i32.ne if - local.get $2 + local.get $3 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $3 local.get $2 + local.get $3 i32.load8_s i32.store8 - local.get $3 local.get $2 + local.get $3 i32.load8_s i32.const -2128831035 i32.xor @@ -562,38 +581,48 @@ i32.load i32.store offset=4 local.get $8 - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 8 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $3 i32.const 8 i32.add - local.set $2 + local.set $3 br $continue|0 end end local.get $0 + local.tee $2 + i32.load + drop + local.get $2 local.get $4 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $0 local.get $5 - i32.store offset=8 + local.tee $0 + local.get $2 + i32.load offset=8 + i32.ne + drop + local.get $2 local.get $0 + i32.store offset=8 + local.get $2 local.get $6 i32.store offset=12 - local.get $0 - local.get $0 + local.get $2 + local.get $2 i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -685,7 +714,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -752,7 +781,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 14 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 13 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -767,8 +796,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -787,8 +816,8 @@ br $repeat|0 else i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -802,8 +831,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -821,8 +850,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -841,8 +870,8 @@ br $repeat|1 else i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -856,8 +885,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -875,8 +904,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -889,8 +918,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -910,8 +939,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -928,8 +957,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -943,8 +972,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -957,8 +986,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -978,8 +1007,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -990,19 +1019,19 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#constructor (; 15 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 14 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -1025,7 +1054,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#has (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1039,7 +1068,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1050,12 +1079,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $4 - local.get $2 + local.get $3 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -1067,7 +1096,7 @@ local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 3 @@ -1075,24 +1104,24 @@ i32.add local.set $7 local.get $5 - local.set $3 + local.set $2 loop $continue|0 - local.get $2 + local.get $3 local.get $7 i32.ne if - local.get $2 + local.get $3 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $3 local.get $2 + local.get $3 i32.load8_u i32.store8 - local.get $3 local.get $2 + local.get $3 i32.load8_u i32.const -2128831035 i32.xor @@ -1108,38 +1137,48 @@ i32.load i32.store offset=4 local.get $8 - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 8 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $3 i32.const 8 i32.add - local.set $2 + local.set $3 br $continue|0 end end local.get $0 + local.tee $2 + i32.load + drop + local.get $2 local.get $4 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $0 local.get $5 - i32.store offset=8 + local.tee $0 + local.get $2 + i32.load offset=8 + i32.ne + drop + local.get $2 local.get $0 + i32.store offset=8 + local.get $2 local.get $6 i32.store offset=12 - local.get $0 - local.get $0 + local.get $2 + local.get $2 i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1229,7 +1268,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -1294,7 +1333,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 20 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 19 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -1309,8 +1348,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -1329,8 +1368,8 @@ br $repeat|0 else i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -1344,8 +1383,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -1363,8 +1402,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -1383,8 +1422,8 @@ br $repeat|1 else i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -1398,8 +1437,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -1417,8 +1456,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -1431,8 +1470,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -1452,8 +1491,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -1470,8 +1509,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -1485,8 +1524,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -1499,8 +1538,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -1520,8 +1559,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -1532,19 +1571,19 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#constructor (; 21 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 20 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 5 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -1567,7 +1606,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -1612,7 +1651,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1637,7 +1676,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1648,12 +1687,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 - local.get $2 + local.get $3 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -1665,7 +1704,7 @@ local.set $6 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 3 @@ -1673,24 +1712,24 @@ i32.add local.set $8 local.get $6 - local.set $3 + local.set $2 loop $continue|0 - local.get $2 + local.get $3 local.get $8 i32.ne if - local.get $2 + local.get $3 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $3 local.get $2 + local.get $3 i32.load16_s i32.store16 - local.get $3 local.get $2 + local.get $3 i32.load16_s local.tee $4 i32.const 255 @@ -1715,38 +1754,51 @@ i32.load i32.store offset=4 local.get $4 - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 8 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $3 i32.const 8 i32.add - local.set $2 + local.set $3 br $continue|0 end end - local.get $0 local.get $5 - i32.store + local.tee $4 local.get $0 + local.tee $2 + i32.load + i32.ne + drop + local.get $2 + local.get $4 + i32.store + local.get $2 local.get $1 i32.store offset=4 - local.get $0 local.get $6 - i32.store offset=8 + local.tee $0 + local.get $2 + i32.load offset=8 + i32.ne + drop + local.get $2 local.get $0 + i32.store offset=8 + local.get $2 local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $2 + local.get $2 i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1847,7 +1899,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -1923,7 +1975,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 27 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 26 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -1938,8 +1990,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -1958,8 +2010,8 @@ br $repeat|0 else i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -1973,8 +2025,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -1992,8 +2044,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -2012,8 +2064,8 @@ br $repeat|1 else i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -2027,8 +2079,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -2046,8 +2098,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -2060,8 +2112,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -2081,8 +2133,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -2099,8 +2151,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -2114,8 +2166,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -2128,8 +2180,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -2149,8 +2201,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -2161,19 +2213,19 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#constructor (; 28 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 27 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 6 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -2196,7 +2248,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#has (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2219,7 +2271,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2230,12 +2282,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 - local.get $2 + local.get $3 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -2247,7 +2299,7 @@ local.set $6 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 3 @@ -2255,24 +2307,24 @@ i32.add local.set $8 local.get $6 - local.set $3 + local.set $2 loop $continue|0 - local.get $2 + local.get $3 local.get $8 i32.ne if - local.get $2 + local.get $3 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $3 local.get $2 + local.get $3 i32.load16_u i32.store16 - local.get $3 local.get $2 + local.get $3 i32.load16_u local.tee $4 i32.const 255 @@ -2297,38 +2349,51 @@ i32.load i32.store offset=4 local.get $4 - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 8 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $3 i32.const 8 i32.add - local.set $2 + local.set $3 br $continue|0 end end - local.get $0 local.get $5 - i32.store + local.tee $4 local.get $0 + local.tee $2 + i32.load + i32.ne + drop + local.get $2 + local.get $4 + i32.store + local.get $2 local.get $1 i32.store offset=4 - local.get $0 local.get $6 - i32.store offset=8 + local.tee $0 + local.get $2 + i32.load offset=8 + i32.ne + drop + local.get $2 local.get $0 + i32.store offset=8 + local.get $2 local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $2 + local.get $2 i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2427,7 +2492,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2501,7 +2566,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 33 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 32 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -2516,8 +2581,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -2536,8 +2601,8 @@ br $repeat|0 else i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -2551,8 +2616,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -2570,8 +2635,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -2590,8 +2655,8 @@ br $repeat|1 else i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -2605,8 +2670,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -2624,8 +2689,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -2638,8 +2703,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -2659,8 +2724,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -2677,8 +2742,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -2692,8 +2757,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -2706,8 +2771,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -2727,8 +2792,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -2739,19 +2804,19 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#constructor (; 34 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 33 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 7 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -2774,7 +2839,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -2805,7 +2870,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -2848,7 +2913,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2857,7 +2922,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2868,12 +2933,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $4 - local.get $2 + local.get $3 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -2885,7 +2950,7 @@ local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 3 @@ -2893,24 +2958,24 @@ i32.add local.set $7 local.get $5 - local.set $3 + local.set $2 loop $continue|0 - local.get $2 + local.get $3 local.get $7 i32.ne if - local.get $2 + local.get $3 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $3 local.get $2 + local.get $3 i32.load i32.store - local.get $3 local.get $2 + local.get $3 i32.load call $~lib/util/hash/hash32 local.get $1 @@ -2923,38 +2988,48 @@ i32.load i32.store offset=4 local.get $8 - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 8 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $3 i32.const 8 i32.add - local.set $2 + local.set $3 br $continue|0 end end local.get $0 + local.tee $2 + i32.load + drop + local.get $2 local.get $4 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $0 local.get $5 - i32.store offset=8 + local.tee $0 + local.get $2 + i32.load offset=8 + i32.ne + drop + local.get $2 local.get $0 + i32.store offset=8 + local.get $2 local.get $6 i32.store offset=12 - local.get $0 - local.get $0 + local.get $2 + local.get $2 i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3037,7 +3112,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 40 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3097,7 +3172,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 41 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 40 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -3112,8 +3187,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -3132,8 +3207,8 @@ br $repeat|0 else i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -3147,8 +3222,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -3166,8 +3241,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -3186,8 +3261,8 @@ br $repeat|1 else i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -3201,8 +3276,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -3220,8 +3295,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -3234,8 +3309,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -3255,8 +3330,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -3273,8 +3348,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -3288,8 +3363,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -3302,8 +3377,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -3323,8 +3398,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -3335,19 +3410,19 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#constructor (; 42 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 41 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 8 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -3370,7 +3445,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $std/set/test (; 43 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 42 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -3385,8 +3460,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -3405,8 +3480,8 @@ br $repeat|0 else i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -3420,8 +3495,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -3439,8 +3514,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -3459,8 +3534,8 @@ br $repeat|1 else i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -3474,8 +3549,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -3493,8 +3568,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -3507,8 +3582,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -3528,8 +3603,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -3546,8 +3621,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -3561,8 +3636,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -3575,8 +3650,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -3596,8 +3671,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -3608,24 +3683,36 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#clear (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 + (func $~lib/set/Set#clear (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 + local.get $0 + i32.load + drop + local.get $0 + local.get $1 i32.store local.get $0 i32.const 3 i32.store offset=4 - local.get $0 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + local.get $0 + i32.load offset=8 + i32.ne + drop + local.get $0 + local.get $1 i32.store offset=8 local.get $0 i32.const 4 @@ -3637,12 +3724,12 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 45 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 44 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 9 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -3665,7 +3752,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 46 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -3731,7 +3818,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 47 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 46 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -3774,7 +3861,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 48 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 47 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -3783,7 +3870,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 49 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 48 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3794,12 +3881,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $4 - local.get $2 + local.get $3 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -3811,7 +3898,7 @@ local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 4 @@ -3819,24 +3906,24 @@ i32.add local.set $7 local.get $5 - local.set $3 + local.set $2 loop $continue|0 - local.get $2 + local.get $3 local.get $7 i32.ne if - local.get $2 + local.get $3 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 local.get $2 + local.get $3 i64.load i64.store - local.get $3 local.get $2 + local.get $3 i64.load call $~lib/util/hash/hash64 local.get $1 @@ -3849,38 +3936,48 @@ i32.load i32.store offset=8 local.get $8 - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 16 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $3 i32.const 16 i32.add - local.set $2 + local.set $3 br $continue|0 end end local.get $0 + local.tee $2 + i32.load + drop + local.get $2 local.get $4 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $0 local.get $5 - i32.store offset=8 + local.tee $0 + local.get $2 + i32.load offset=8 + i32.ne + drop + local.get $2 local.get $0 + i32.store offset=8 + local.get $2 local.get $6 i32.store offset=12 - local.get $0 - local.get $0 + local.get $2 + local.get $2 i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 50 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 49 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3963,7 +4060,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 51 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#delete (; 50 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -4024,7 +4121,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 52 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 51 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/set/Set#constructor @@ -4039,8 +4136,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -4059,8 +4156,8 @@ br $repeat|0 else i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -4074,8 +4171,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -4093,8 +4190,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -4113,8 +4210,8 @@ br $repeat|1 else i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -4128,8 +4225,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -4147,8 +4244,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -4161,8 +4258,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -4182,8 +4279,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -4200,8 +4297,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -4215,8 +4312,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -4229,8 +4326,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -4250,8 +4347,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -4262,19 +4359,19 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#constructor (; 53 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 52 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 10 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -4297,7 +4394,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $std/set/test (; 54 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 53 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/set/Set#constructor @@ -4312,8 +4409,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -4332,8 +4429,8 @@ br $repeat|0 else i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -4347,8 +4444,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -4366,8 +4463,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -4386,8 +4483,8 @@ br $repeat|1 else i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -4401,8 +4498,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -4420,8 +4517,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -4434,8 +4531,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -4455,8 +4552,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -4473,8 +4570,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -4488,8 +4585,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -4502,8 +4599,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -4523,8 +4620,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -4535,19 +4632,19 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#constructor (; 55 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 54 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 11 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -4570,7 +4667,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 56 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 55 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -4613,7 +4710,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 57 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 56 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -4623,7 +4720,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 58 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 57 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4634,12 +4731,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $4 - local.get $2 + local.get $3 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -4651,7 +4748,7 @@ local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 3 @@ -4659,24 +4756,24 @@ i32.add local.set $7 local.get $5 - local.set $3 + local.set $2 loop $continue|0 - local.get $2 + local.get $3 local.get $7 i32.ne if - local.get $2 + local.get $3 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $3 local.get $2 + local.get $3 f32.load f32.store - local.get $3 local.get $2 + local.get $3 f32.load i32.reinterpret_f32 call $~lib/util/hash/hash32 @@ -4690,38 +4787,48 @@ i32.load i32.store offset=4 local.get $8 - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 8 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $3 i32.const 8 i32.add - local.set $2 + local.set $3 br $continue|0 end end local.get $0 + local.tee $2 + i32.load + drop + local.get $2 local.get $4 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $0 local.get $5 - i32.store offset=8 + local.tee $0 + local.get $2 + i32.load offset=8 + i32.ne + drop + local.get $2 local.get $0 + i32.store offset=8 + local.get $2 local.get $6 i32.store offset=12 - local.get $0 - local.get $0 + local.get $2 + local.get $2 i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 59 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#add (; 58 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4805,7 +4912,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 60 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#delete (; 59 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -4867,7 +4974,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 61 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 60 ;) (type $FUNCSIG$v) (local $0 f32) (local $1 i32) call $~lib/set/Set#constructor @@ -4882,8 +4989,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -4902,8 +5009,8 @@ br $repeat|0 else i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -4917,8 +5024,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -4936,8 +5043,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -4956,8 +5063,8 @@ br $repeat|1 else i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -4971,8 +5078,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -4990,8 +5097,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -5004,8 +5111,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -5025,8 +5132,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -5043,8 +5150,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -5058,8 +5165,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -5072,8 +5179,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -5093,8 +5200,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -5105,19 +5212,19 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#constructor (; 62 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 61 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 12 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -5140,7 +5247,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 63 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 62 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -5183,7 +5290,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 64 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 63 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -5193,7 +5300,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 65 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 64 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5204,12 +5311,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $4 - local.get $2 + local.get $3 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -5221,7 +5328,7 @@ local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 4 @@ -5229,24 +5336,24 @@ i32.add local.set $7 local.get $5 - local.set $3 + local.set $2 loop $continue|0 - local.get $2 + local.get $3 local.get $7 i32.ne if - local.get $2 + local.get $3 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 local.get $2 + local.get $3 f64.load f64.store - local.get $3 local.get $2 + local.get $3 f64.load i64.reinterpret_f64 call $~lib/util/hash/hash64 @@ -5260,38 +5367,48 @@ i32.load i32.store offset=8 local.get $8 - local.get $3 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 16 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $3 i32.const 16 i32.add - local.set $2 + local.set $3 br $continue|0 end end local.get $0 + local.tee $2 + i32.load + drop + local.get $2 local.get $4 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $0 local.get $5 - i32.store offset=8 + local.tee $0 + local.get $2 + i32.load offset=8 + i32.ne + drop + local.get $2 local.get $0 + i32.store offset=8 + local.get $2 local.get $6 i32.store offset=12 - local.get $0 - local.get $0 + local.get $2 + local.get $2 i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 66 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#add (; 65 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5375,7 +5492,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 67 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#delete (; 66 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -5437,7 +5554,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 68 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 67 ;) (type $FUNCSIG$v) (local $0 f64) (local $1 i32) call $~lib/set/Set#constructor @@ -5452,8 +5569,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -5472,8 +5589,8 @@ br $repeat|0 else i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -5487,8 +5604,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -5506,8 +5623,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -5526,8 +5643,8 @@ br $repeat|1 else i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -5541,8 +5658,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -5560,8 +5677,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -5574,8 +5691,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -5595,8 +5712,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -5613,8 +5730,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -5628,8 +5745,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -5642,8 +5759,8 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -5663,8 +5780,8 @@ i32.ne if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -5675,30 +5792,30 @@ i32.load offset=20 if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start (; 69 ;) (type $FUNCSIG$v) - i32.const 128 + (func $start (; 68 ;) (type $FUNCSIG$v) + i32.const 152 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric ) - (func $null (; 70 ;) (type $FUNCSIG$v) + (func $null (; 69 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/set.ts b/tests/compiler/std/set.ts index 353ff8051c..1efb84ee32 100644 --- a/tests/compiler/std/set.ts +++ b/tests/compiler/std/set.ts @@ -1,6 +1,7 @@ import "allocator/arena"; +import "collector/dummy"; -function test(): void { +function testNumeric(): void { var set = new Set(); // insert new @@ -42,13 +43,13 @@ function test(): void { assert(set.size == 0); } -test(); -test(); -test(); -test(); -test(); -test(); -test(); -test(); -test(); -test(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 17a61b7157..9bef69a835 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -2,11 +2,11 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$iiji (func (param i32 i64 i32) (result i32))) @@ -19,21 +19,22 @@ (type $FUNCSIG$vid (func (param i32 f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 48) "\02\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 96) "\02\00\00\00\14\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") + (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\02\00\00\00&\00\00\00\00\00\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 112) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 124)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 148)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -132,7 +133,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -145,47 +146,55 @@ local.get $0 i32.store offset=4 local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u i32.eqz if i32.const 0 - i32.const 16 - i32.const 313 - i32.const 2 + i32.const 24 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 - i32.const 16 - i32.const 314 - i32.const 2 + i32.const 24 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 + call $~lib/collector/dummy/__ref_register + local.get $0 ) (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -452,7 +461,7 @@ i32.gt_u if i32.const 0 - i32.const 56 + i32.const 72 i32.const 25 i32.const 43 call $~lib/env/abort @@ -462,7 +471,7 @@ local.get $1 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $3 local.get $3 @@ -474,14 +483,43 @@ local.set $2 local.get $2 i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/set/Set#clear (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_link (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/collector/dummy/__ref_unlink (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/set/Set#clear (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -489,9 +527,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -503,7 +561,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -514,12 +572,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -546,14 +604,14 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash8 (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const -2128831035 local.get $0 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -608,7 +666,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -627,7 +685,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -741,13 +799,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -757,7 +855,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -859,11 +957,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -940,7 +1038,7 @@ end i32.const 1 ) - (func $std/set/test (; 17 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 19 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -963,8 +1061,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -978,8 +1076,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -1001,8 +1099,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -1023,8 +1121,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -1038,8 +1136,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -1061,8 +1159,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -1083,8 +1181,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -1100,8 +1198,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -1123,8 +1221,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -1146,8 +1244,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -1161,8 +1259,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -1178,8 +1276,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -1201,8 +1299,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -1216,18 +1314,41 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#clear (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -1235,9 +1356,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -1249,7 +1390,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -1260,12 +1401,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -1292,7 +1433,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1345,7 +1486,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1362,7 +1503,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1476,13 +1617,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -1492,7 +1673,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1592,11 +1773,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1671,7 +1852,7 @@ end i32.const 1 ) - (func $std/set/test (; 26 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 28 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1694,8 +1875,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -1709,8 +1890,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -1732,8 +1913,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -1754,8 +1935,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -1769,8 +1950,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -1792,8 +1973,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -1814,8 +1995,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -1831,8 +2012,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -1854,8 +2035,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -1877,8 +2058,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -1892,8 +2073,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -1909,8 +2090,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -1932,8 +2113,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -1947,18 +2128,41 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#clear (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -1966,9 +2170,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -1980,7 +2204,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -1991,12 +2215,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 5 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -2023,7 +2247,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -2045,7 +2269,7 @@ local.set $1 local.get $1 ) - (func $~lib/set/Set#find (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2100,7 +2324,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2119,7 +2343,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2233,13 +2457,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -2249,7 +2513,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2351,11 +2615,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2432,7 +2696,7 @@ end i32.const 1 ) - (func $std/set/test (; 36 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 38 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2455,8 +2719,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -2470,8 +2734,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -2493,8 +2757,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -2515,8 +2779,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -2530,8 +2794,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -2553,8 +2817,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -2575,8 +2839,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -2592,8 +2856,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -2615,8 +2879,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -2638,8 +2902,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -2653,8 +2917,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -2670,8 +2934,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -2693,8 +2957,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -2708,18 +2972,41 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#clear (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -2727,9 +3014,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -2741,7 +3048,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -2752,12 +3059,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 6 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -2784,7 +3091,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2837,7 +3144,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2854,7 +3161,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 43 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2968,13 +3275,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -2984,7 +3331,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 42 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3084,11 +3431,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3163,7 +3510,7 @@ end i32.const 1 ) - (func $std/set/test (; 45 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 47 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3186,8 +3533,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -3201,8 +3548,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -3224,8 +3571,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -3246,8 +3593,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -3261,8 +3608,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -3284,8 +3631,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -3306,8 +3653,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -3323,8 +3670,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -3346,8 +3693,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -3369,8 +3716,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -3384,8 +3731,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -3401,8 +3748,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -3424,8 +3771,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -3439,18 +3786,41 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#clear (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -3458,9 +3828,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -3472,7 +3862,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -3483,12 +3873,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 7 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -3515,7 +3905,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -3557,7 +3947,7 @@ local.set $1 local.get $1 ) - (func $~lib/set/Set#find (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3608,7 +3998,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -3623,7 +4013,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 51 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3737,13 +4127,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -3753,7 +4183,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 52 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3851,11 +4281,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3928,7 +4358,7 @@ end i32.const 1 ) - (func $std/set/test (; 55 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 57 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3951,8 +4381,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -3966,8 +4396,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -3989,8 +4419,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -4011,8 +4441,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -4026,8 +4456,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -4049,8 +4479,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -4071,8 +4501,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -4088,8 +4518,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -4111,8 +4541,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -4134,8 +4564,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -4149,8 +4579,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -4166,8 +4596,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -4189,8 +4619,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -4204,18 +4634,41 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end - ) - (func $~lib/set/Set#clear (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.const 0 - i32.const 16 - call $~lib/arraybuffer/ArrayBuffer#constructor + ) + (func $~lib/set/Set#clear (; 58 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + local.tee $1 + i32.const 0 + i32.const 16 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -4223,9 +4676,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -4237,7 +4710,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -4248,12 +4721,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 8 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -4280,7 +4753,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4331,7 +4804,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -4346,7 +4819,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 60 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 62 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4460,13 +4933,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -4476,7 +4989,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 61 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4574,11 +5087,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 64 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 63 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4651,7 +5164,7 @@ end i32.const 1 ) - (func $std/set/test (; 64 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 66 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4674,8 +5187,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -4689,8 +5202,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -4712,8 +5225,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -4734,8 +5247,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -4749,8 +5262,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -4772,8 +5285,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -4794,8 +5307,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -4811,8 +5324,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -4834,8 +5347,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -4857,8 +5370,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -4872,8 +5385,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -4889,8 +5402,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -4912,8 +5425,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -4927,18 +5440,41 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#clear (; 65 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 67 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -4946,9 +5482,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -4960,7 +5516,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 66 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 68 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -4971,12 +5527,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 9 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -5003,7 +5559,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 67 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 69 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5091,7 +5647,7 @@ local.set $3 local.get $3 ) - (func $~lib/set/Set#find (; 68 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 70 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5142,7 +5698,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 69 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 71 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -5157,7 +5713,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 70 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 72 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5272,13 +5828,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $13 + local.get $9 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $13 + else + local.get $13 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $12 + local.get $9 + i32.load offset=8 + local.tee $13 + i32.ne + if (result i32) + local.get $13 + if + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store offset=8 local.get $0 local.get $4 @@ -5288,7 +5884,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 71 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 73 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -5387,11 +5983,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 72 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 74 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 73 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 75 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -5465,7 +6061,7 @@ end i32.const 1 ) - (func $std/set/test (; 74 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 76 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5488,8 +6084,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -5503,8 +6099,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -5526,8 +6122,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -5548,8 +6144,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -5563,8 +6159,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -5586,8 +6182,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -5608,8 +6204,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -5625,8 +6221,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -5648,8 +6244,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -5671,8 +6267,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -5686,8 +6282,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -5703,8 +6299,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -5726,8 +6322,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -5741,18 +6337,41 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#clear (; 75 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 77 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -5760,9 +6379,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -5774,7 +6413,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 76 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 78 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -5785,12 +6424,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 10 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -5817,7 +6456,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 77 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 79 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5868,7 +6507,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 78 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 80 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -5883,7 +6522,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 79 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 81 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5998,13 +6637,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $13 + local.get $9 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $13 + else + local.get $13 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $12 + local.get $9 + i32.load offset=8 + local.tee $13 + i32.ne + if (result i32) + local.get $13 + if + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store offset=8 local.get $0 local.get $4 @@ -6014,7 +6693,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 80 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 82 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6113,11 +6792,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 81 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 83 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 82 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 84 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6191,7 +6870,7 @@ end i32.const 1 ) - (func $std/set/test (; 83 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 85 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6214,8 +6893,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -6229,8 +6908,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -6252,8 +6931,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -6274,8 +6953,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -6289,8 +6968,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -6312,8 +6991,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -6334,8 +7013,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -6351,8 +7030,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -6374,8 +7053,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -6397,8 +7076,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -6412,8 +7091,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -6429,8 +7108,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -6452,8 +7131,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -6467,18 +7146,41 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#clear (; 84 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 86 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -6486,9 +7188,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -6500,7 +7222,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 85 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 87 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -6511,12 +7233,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 11 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -6543,7 +7265,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 86 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 88 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6594,7 +7316,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 87 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 89 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) local.get $0 local.get $1 @@ -6610,7 +7332,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 88 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 90 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6726,13 +7448,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $13 + local.get $9 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $13 + else + local.get $13 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $12 + local.get $9 + i32.load offset=8 + local.tee $13 + i32.ne + if (result i32) + local.get $13 + if + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store offset=8 local.get $0 local.get $4 @@ -6742,7 +7504,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 89 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#add (; 91 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -6842,11 +7604,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 90 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 91 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#delete (; 93 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -6921,7 +7683,7 @@ end i32.const 1 ) - (func $std/set/test (; 92 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 94 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -6944,8 +7706,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -6959,8 +7721,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -6982,8 +7744,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -7004,8 +7766,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -7019,8 +7781,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -7042,8 +7804,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -7064,8 +7826,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -7081,8 +7843,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -7104,8 +7866,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -7127,8 +7889,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -7142,8 +7904,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -7159,8 +7921,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -7182,8 +7944,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -7197,18 +7959,41 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/set/Set#clear (; 93 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 95 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -7216,9 +8001,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 64 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -7230,7 +8035,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 96 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -7241,12 +8046,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 12 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -7273,7 +8078,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 95 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 97 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7324,7 +8129,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 96 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 98 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) local.get $0 local.get $1 @@ -7340,7 +8145,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 97 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 99 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7456,13 +8261,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $13 + local.get $9 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $13 + else + local.get $13 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $12 + local.get $9 + i32.load offset=8 + local.tee $13 + i32.ne + if (result i32) + local.get $13 + if + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store offset=8 local.get $0 local.get $4 @@ -7472,7 +8317,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 98 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#add (; 100 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 f64) (local $3 i32) (local $4 i32) @@ -7572,11 +8417,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 99 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 101 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 100 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#delete (; 102 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -7651,7 +8496,7 @@ end i32.const 1 ) - (func $std/set/test (; 101 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 103 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -7674,8 +8519,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 8 + i32.const 128 + i32.const 9 i32.const 4 call $~lib/env/abort unreachable @@ -7689,8 +8534,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 10 + i32.const 128 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -7712,8 +8557,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 12 + i32.const 128 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -7734,8 +8579,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 16 + i32.const 128 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -7749,8 +8594,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 18 + i32.const 128 + i32.const 19 i32.const 4 call $~lib/env/abort unreachable @@ -7772,8 +8617,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 20 + i32.const 128 + i32.const 21 i32.const 2 call $~lib/env/abort unreachable @@ -7794,8 +8639,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 24 + i32.const 128 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -7811,8 +8656,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 26 + i32.const 128 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -7834,8 +8679,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 28 + i32.const 128 + i32.const 29 i32.const 2 call $~lib/env/abort unreachable @@ -7857,8 +8702,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 32 + i32.const 128 + i32.const 33 i32.const 4 call $~lib/env/abort unreachable @@ -7872,8 +8717,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 34 + i32.const 128 + i32.const 35 i32.const 4 call $~lib/env/abort unreachable @@ -7889,8 +8734,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 36 + i32.const 128 + i32.const 37 i32.const 4 call $~lib/env/abort unreachable @@ -7912,8 +8757,8 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 38 + i32.const 128 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -7927,14 +8772,14 @@ i32.eqz if i32.const 0 - i32.const 104 - i32.const 42 + i32.const 128 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start:std/set (; 102 ;) (type $FUNCSIG$v) + (func $start:std/set (; 104 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -7945,20 +8790,20 @@ global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric ) - (func $start (; 103 ;) (type $FUNCSIG$v) + (func $start (; 105 ;) (type $FUNCSIG$v) call $start:std/set ) - (func $null (; 104 ;) (type $FUNCSIG$v) + (func $null (; 106 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index da37a58ed1..c2e0578688 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -36,7 +36,7 @@ if i32.const 0 i32.const 240 - i32.const 100 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable @@ -260,7 +260,7 @@ end end ) - (func $~lib/runtime/doReallocate (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -329,7 +329,7 @@ if i32.const 0 i32.const 240 - i32.const 14 + i32.const 13 i32.const 64 call $~lib/env/abort unreachable @@ -341,7 +341,7 @@ local.get $1 i32.shl local.tee $1 - call $~lib/runtime/doReallocate + call $~lib/runtime/reallocate local.set $2 local.get $2 local.get $3 @@ -390,7 +390,7 @@ if i32.const 0 i32.const 240 - i32.const 100 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable @@ -434,7 +434,7 @@ if i32.const 0 i32.const 240 - i32.const 100 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable @@ -478,7 +478,7 @@ if i32.const 0 i32.const 240 - i32.const 100 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 29eefd5c1a..170389a6fc 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -30,7 +30,6 @@ (global $std/static-array/I i32 (i32.const 80)) (global $std/static-array/f i32 (i32.const 120)) (global $std/static-array/F i32 (i32.const 168)) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) @@ -42,7 +41,16 @@ local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $~lib/array/Array#__get (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -52,20 +60,16 @@ if i32.const 0 i32.const 240 - i32.const 100 + i32.const 98 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 + call $~lib/array/Array#__unchecked_get ) - (func $~lib/runtime/ADJUSTOBLOCK (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -77,10 +81,10 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) unreachable ) - (func $~lib/util/memory/memcpy (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1281,7 +1285,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1512,7 +1516,7 @@ end end ) - (func $~lib/memory/memory.fill (; 7 ;) (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 $4 i32) (local $5 i32) @@ -1769,10 +1773,10 @@ end end ) - (func $~lib/memory/memory.free (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/doReallocate (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1837,7 +1841,7 @@ if i32.const 0 i32.const 280 - i32.const 133 + i32.const 125 i32.const 8 call $~lib/env/abort unreachable @@ -1869,7 +1873,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1889,7 +1893,7 @@ if i32.const 0 i32.const 240 - i32.const 14 + i32.const 13 i32.const 64 call $~lib/env/abort unreachable @@ -1908,7 +1912,7 @@ local.set $5 local.get $6 local.get $5 - call $~lib/runtime/doReallocate + call $~lib/runtime/reallocate end local.set $5 local.get $5 @@ -1927,7 +1931,17 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + ) + (func $~lib/array/Array#__set (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -1939,13 +1953,9 @@ i32.const 2 call $~lib/array/ensureCapacity local.get $0 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - i32.add local.get $2 - i32.store + call $~lib/array/Array#__unchecked_set local.get $1 local.get $3 i32.ge_s @@ -1957,11 +1967,20 @@ i32.store offset=12 end ) - (func $~lib/array/Array#get:length (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 13 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__unchecked_get (; 15 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $~lib/array/Array#__get (; 16 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -1971,20 +1990,26 @@ if i32.const 0 i32.const 240 - i32.const 100 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get + ) + (func $~lib/array/Array#__unchecked_set (; 17 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $0 i32.load offset=4 local.get $1 i32.const 3 i32.shl i32.add - i64.load + local.get $2 + i64.store ) - (func $~lib/array/Array#__set (; 14 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (; 18 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) local.get $0 i32.load offset=12 @@ -1996,13 +2021,9 @@ i32.const 3 call $~lib/array/ensureCapacity local.get $0 - i32.load offset=4 local.get $1 - i32.const 3 - i32.shl - i32.add local.get $2 - i64.store + call $~lib/array/Array#__unchecked_set local.get $1 local.get $3 i32.ge_s @@ -2014,11 +2035,20 @@ i32.store offset=12 end ) - (func $~lib/array/Array#get:length (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 16 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__unchecked_get (; 20 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + ) + (func $~lib/array/Array#__get (; 21 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -2028,20 +2058,26 @@ if i32.const 0 i32.const 240 - i32.const 100 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get + ) + (func $~lib/array/Array#__unchecked_set (; 22 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $0 i32.load offset=4 local.get $1 i32.const 2 i32.shl i32.add - f32.load + local.get $2 + f32.store ) - (func $~lib/array/Array#__set (; 17 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/array/Array#__set (; 23 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) (local $3 i32) local.get $0 i32.load offset=12 @@ -2053,13 +2089,9 @@ i32.const 2 call $~lib/array/ensureCapacity local.get $0 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - i32.add local.get $2 - f32.store + call $~lib/array/Array#__unchecked_set local.get $1 local.get $3 i32.ge_s @@ -2071,11 +2103,20 @@ i32.store offset=12 end ) - (func $~lib/array/Array#get:length (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 19 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__unchecked_get (; 25 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + ) + (func $~lib/array/Array#__get (; 26 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -2085,20 +2126,26 @@ if i32.const 0 i32.const 240 - i32.const 100 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get + ) + (func $~lib/array/Array#__unchecked_set (; 27 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) local.get $0 i32.load offset=4 local.get $1 i32.const 3 i32.shl i32.add - f64.load + local.get $2 + f64.store ) - (func $~lib/array/Array#__set (; 20 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/array/Array#__set (; 28 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) (local $3 i32) local.get $0 i32.load offset=12 @@ -2110,13 +2157,9 @@ i32.const 3 call $~lib/array/ensureCapacity local.get $0 - i32.load offset=4 local.get $1 - i32.const 3 - i32.shl - i32.add local.get $2 - f64.store + call $~lib/array/Array#__unchecked_set local.get $1 local.get $3 i32.ge_s @@ -2128,7 +2171,7 @@ i32.store offset=12 end ) - (func $start:std/static-array (; 21 ;) (type $FUNCSIG$v) + (func $start:std/static-array (; 29 ;) (type $FUNCSIG$v) global.get $std/static-array/i call $~lib/array/Array#get:length i32.const 2 @@ -2366,9 +2409,9 @@ unreachable end ) - (func $start (; 22 ;) (type $FUNCSIG$v) + (func $start (; 30 ;) (type $FUNCSIG$v) call $start:std/static-array ) - (func $null (; 23 ;) (type $FUNCSIG$v) + (func $null (; 31 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index 0c17afed36..b414463378 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -3,7 +3,6 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -395,7 +394,7 @@ i32.store8 local.get $5 ) - (func $~lib/runtime/doAllocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -1507,32 +1506,38 @@ end end ) - (func $~lib/runtime/assertUnregistered (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.const 228 i32.le_u if i32.const 0 i32.const 136 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 i32.const 8 i32.sub + local.tee $1 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 136 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end + local.get $1 + i32.const 1 + i32.store + local.get $0 ) (func $~lib/string/String.fromUTF8 (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -1596,7 +1601,7 @@ if i32.const 0 i32.const 96 - i32.const 448 + i32.const 447 i32.const 8 call $~lib/env/abort unreachable @@ -1643,7 +1648,7 @@ if i32.const 0 i32.const 96 - i32.const 452 + i32.const 451 i32.const 8 call $~lib/env/abort unreachable @@ -1716,7 +1721,7 @@ if i32.const 0 i32.const 96 - i32.const 464 + i32.const 463 i32.const 8 call $~lib/env/abort unreachable @@ -1769,25 +1774,19 @@ if i32.const 0 i32.const 96 - i32.const 473 + i32.const 472 i32.const 4 call $~lib/env/abort unreachable end local.get $4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $3 local.get $5 local.get $4 call $~lib/memory/memory.copy local.get $3 - call $~lib/runtime/assertUnregistered - local.get $3 - i32.const 8 - i32.sub - i32.const 1 - i32.store - local.get $3 + call $~lib/runtime/register ) (func $~lib/util/string/compareImpl (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index d2237c0f20..07c3f866b0 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -20,7 +20,6 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/string-utf8/str (mut i32) (i32.const 16)) - (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 $std/string-utf8/len (mut i32) (i32.const 0)) @@ -467,7 +466,7 @@ i32.sub i32.shl ) - (func $~lib/runtime/doAllocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -1920,7 +1919,8 @@ local.get $0 local.set $1 ) - (func $~lib/runtime/assertUnregistered (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -1928,14 +1928,16 @@ if i32.const 0 i32.const 136 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq @@ -1943,23 +1945,17 @@ if i32.const 0 i32.const 136 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $~lib/string/String.fromUTF8 (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.fromUTF8 (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2036,7 +2032,7 @@ if i32.const 0 i32.const 96 - i32.const 448 + i32.const 447 i32.const 8 call $~lib/env/abort unreachable @@ -2090,7 +2086,7 @@ if i32.const 0 i32.const 96 - i32.const 452 + i32.const 451 i32.const 8 call $~lib/env/abort unreachable @@ -2185,7 +2181,7 @@ if i32.const 0 i32.const 96 - i32.const 464 + i32.const 463 i32.const 8 call $~lib/env/abort unreachable @@ -2248,7 +2244,7 @@ if i32.const 0 i32.const 96 - i32.const 473 + i32.const 472 i32.const 4 call $~lib/env/abort unreachable @@ -2257,7 +2253,7 @@ local.get $4 local.set $5 local.get $5 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 local.get $7 @@ -2271,10 +2267,10 @@ local.set $5 local.get $5 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/util/string/compareImpl (; 13 ;) (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 (; 12 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -2327,7 +2323,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2371,7 +2367,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $start:std/string-utf8 (; 15 ;) (type $FUNCSIG$v) + (func $start:std/string-utf8 (; 14 ;) (type $FUNCSIG$v) global.get $std/string-utf8/str call $~lib/string/String#get:lengthUTF8 global.set $std/string-utf8/len @@ -2638,9 +2634,9 @@ global.get $std/string-utf8/ptr call $~lib/memory/memory.free ) - (func $start (; 16 ;) (type $FUNCSIG$v) + (func $start (; 15 ;) (type $FUNCSIG$v) call $start:std/string-utf8 ) - (func $null (; 17 ;) (type $FUNCSIG$v) + (func $null (; 16 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 3e9750993e..98c1e44b43 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -17,164 +17,317 @@ (type $FUNCSIG$vii (func (param i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00 \00\00\00h\00i\00,\00 \00I\00\'\00m\00 \00a\00 \00s\00t\00r\00i\00n\00g") - (data (i32.const 48) "\01\00\00\00\1a\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 88) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 128) "\01\00\00\00\02") - (data (i32.const 144) "\01\00\00\00\02\00\00\006") - (data (i32.const 160) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 200) "\01\00\00\00\04\00\00\004\d8\06\df") - (data (i32.const 216) "\01\00\00\00\04\00\00\00h\00i") - (data (i32.const 232) "\01\00\00\00\08\00\00\00n\00u\00l\00l") - (data (i32.const 248) "\01\00\00\00\0c\00\00\00s\00t\00r\00i\00n\00g") - (data (i32.const 272) "\01\00\00\00\06\00\00\00I\00\'\00m") - (data (i32.const 288) "\01\00\00\00\02\00\00\00 ") - (data (i32.const 304) "\01") - (data (i32.const 312) "\01\00\00\00\06\00\00\00 \00 \00 ") - (data (i32.const 328) "\01\00\00\00\02\00\00\00a") - (data (i32.const 344) "\01\00\00\00\06\00\00\00a\00b\00c") - (data (i32.const 360) "\01\00\00\00\n\00\00\00 \00 \00a\00b\00c") - (data (i32.const 384) "\01\00\00\00\06\00\00\001\002\003") - (data (i32.const 400) "\01\00\00\00\0c\00\00\001\002\003\00a\00b\00c") - (data (i32.const 424) "\01\00\00\00\10\00\00\001\002\003\001\002\00a\00b\00c") - (data (i32.const 448) "\01\00\00\00\n\00\00\00a\00b\00c\00 \00 ") - (data (i32.const 472) "\01\00\00\00\0c\00\00\00a\00b\00c\00a\00b\00c") - (data (i32.const 496) "\01\00\00\00\10\00\00\00a\00b\00c\00a\00b\00c\00a\00b") - (data (i32.const 520) "\01\00\00\00\02\00\00\00,") - (data (i32.const 536) "\01\00\00\00\02\00\00\00x") - (data (i32.const 552) "\01\00\00\00\06\00\00\00,\00 \00I") - (data (i32.const 568) "\01\00\00\00\02\00\00\00g") - (data (i32.const 584) "\01\00\00\00\02\00\00\00i") - (data (i32.const 600) "\01\00\00\00\02\00\00\000") - (data (i32.const 616) "\01\00\00\00\02\00\00\001") - (data (i32.const 632) "\01\00\00\00\n\00\00\000\00b\001\000\001") - (data (i32.const 656) "\01\00\00\00\n\00\00\000\00o\007\000\007") - (data (i32.const 680) "\01\00\00\00\n\00\00\000\00x\00f\000\00f") - (data (i32.const 704) "\01\00\00\00\n\00\00\000\00x\00F\000\00F") - (data (i32.const 728) "\01\00\00\00\06\00\00\000\001\001") - (data (i32.const 744) "\01\00\00\00\08\00\00\000\00x\001\00g") - (data (i32.const 760) "\01\00\00\00\06\00\00\000\00.\001") - (data (i32.const 776) "\01\00\00\00\06\00\00\00.\002\005") - (data (i32.const 792) "\01\00\00\00\10\00\00\00.\001\00f\00o\00o\00b\00a\00r") - (data (i32.const 816) "\01\00\00\00\02\00\00\00b") - (data (i32.const 832) "\01\00\00\00\04\00\00\00a\00b") - (data (i32.const 848) "\01\00\00\00\08\00\00\00k\00e\00y\001") - (data (i32.const 864) "\01\00\00\00\08\00\00\00k\00e\00y\002") - (data (i32.const 880) "\01\00\00\00\06\00\00\00k\00e\001") - (data (i32.const 896) "\01\00\00\00\06\00\00\00k\00e\002") - (data (i32.const 912) "\01\00\00\00\n\00\00\00k\00e\00y\001\002") - (data (i32.const 936) "\01\00\00\00\n\00\00\00k\00e\00y\001\001") - (data (i32.const 960) "\01\00\00\00\0e\00\00\00\a40\ed0\cf0\cb0\db0\d80\c80") - (data (i32.const 984) "\01\00\00\00\0e\00\00\00\a60\f00\ce0\aa0\af0\e40\de0") - (data (i32.const 1008) "\01\00\00\00\16\00\00\00D\00\19 f\00h\00u\00a\00s\00c\00a\00i\00l") - (data (i32.const 1040) "\01\00\00\00\14\00\00\00D\00\19 \1f\1eu\00a\00s\00c\00a\00i\00l") - (data (i32.const 1072) "\01\00\00\00\04\00\00\00b\00a") - (data (i32.const 1088) "\01\00\00\00\04\00\00\00a\00a") - (data (i32.const 1104) "\01\00\00\00\06\00\00\00a\00a\00a") - (data (i32.const 1120) "\01\00\00\00\10\00\00\00a\00b\00a\00b\00a\00b\00a\00b") - (data (i32.const 1144) "\01\00\00\00\n\00\00\00a\00a\00a\00a\00a") - (data (i32.const 1168) "\01\00\00\00\0c\00\00\00a\00a\00a\00a\00a\00a") - (data (i32.const 1192) "\01\00\00\00\0e\00\00\00a\00a\00a\00a\00a\00a\00a") - (data (i32.const 1216) "\01\00\00\00\1c\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n") - (data (i32.const 1256) "\01\00\00\00\02\00\00\00n") - (data (i32.const 1272) "\01\00\00\00\n\00\00\00j\00k\00l\00m\00n") - (data (i32.const 1296) "\01\00\00\00\n\00\00\00c\00d\00e\00f\00g") - (data (i32.const 1320) "\01\00\00\00\n\00\00\00d\00e\00f\00g\00h") - (data (i32.const 1344) "\01\00\00\00\1a\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m") - (data (i32.const 1384) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1424) "\01\00\00\00\n\00\00\00a\00,\00b\00,\00c") - (data (i32.const 1448) "\01\00\00\00\02\00\00\00.") - (data (i32.const 1464) "\01\00\00\00\02\00\00\00c") - (data (i32.const 1480) "\01\00\00\00\0e\00\00\00a\00,\00 \00b\00,\00 \00c") - (data (i32.const 1504) "\01\00\00\00\04\00\00\00,\00 ") - (data (i32.const 1520) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00,\00c") - (data (i32.const 1544) "\01\00\00\00\0c\00\00\00,\00a\00,\00b\00,\00c") - (data (i32.const 1568) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00c\00,") - (data (i32.const 1592) "\03\00\00\00\90\01\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 2000) "\04\00\00\00\10\00\00\00@\06\00\00@\06\00\00\90\01\00\00d") - (data (i32.const 2024) "\01\00\00\00\02\00\00\008") - (data (i32.const 2040) "\01\00\00\00\n\00\00\00-\001\000\000\000") - (data (i32.const 2064) "\01\00\00\00\08\00\00\001\002\003\004") - (data (i32.const 2080) "\01\00\00\00\n\00\00\001\002\003\004\005") - (data (i32.const 2104) "\01\00\00\00\0c\00\00\001\002\003\004\005\006") - (data (i32.const 2128) "\01\00\00\00\0e\00\00\001\001\001\001\001\001\001") - (data (i32.const 2152) "\01\00\00\00\0e\00\00\001\002\003\004\005\006\007") - (data (i32.const 2176) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\006") - (data (i32.const 2208) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\007") - (data (i32.const 2240) "\01\00\00\00\16\00\00\00-\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 2272) "\01\00\00\00\04\00\00\00-\001") - (data (i32.const 2288) "\01\00\00\00\08\00\00\001\000\000\000") - (data (i32.const 2304) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 2336) "\01\00\00\00\14\00\00\004\002\009\004\009\006\007\002\009\005") - (data (i32.const 2368) "\01\00\00\00\10\00\00\009\009\009\009\009\009\009\009") - (data (i32.const 2392) "\01\00\00\00\12\00\00\001\000\000\000\000\000\000\000\000") - (data (i32.const 2424) "\01\00\00\00\16\00\00\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2456) "\01\00\00\00\18\00\00\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2488) "\01\00\00\00\1e\00\00\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2528) "\01\00\00\00 \00\00\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2568) "\01\00\00\00\"\00\00\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2616) "\01\00\00\00(\00\00\001\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005") - (data (i32.const 2664) "\01\00\00\00\n\00\00\00-\001\002\003\004") - (data (i32.const 2688) "\01\00\00\00\16\00\00\00-\004\002\009\004\009\006\007\002\009\005") - (data (i32.const 2720) "\01\00\00\00\18\00\00\00-\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2752) "\01\00\00\00\1a\00\00\00-\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2792) "\01\00\00\00 \00\00\00-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2832) "\01\00\00\00$\00\00\00-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2880) "\01\00\00\00&\00\00\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007") - (data (i32.const 2928) "\01\00\00\00(\00\00\00-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008") - (data (i32.const 2976) "\01\00\00\00\06\00\00\000\00.\000") - (data (i32.const 2992) "\01\00\00\00\06\00\00\00N\00a\00N") - (data (i32.const 3008) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3040) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3064) "\03\00\00\00\b8\02\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8 (; 18 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/util/string/parse (; 17 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2045,7 +2202,7 @@ (local $5 f64) (local $6 f64) local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -2274,7 +2431,7 @@ local.get $5 f64.mul ) - (func $~lib/string/parseFloat (; 19 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 18 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2282,7 +2439,7 @@ (local $5 f64) (local $6 f64) local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -2385,8 +2542,8 @@ end if i32.const 0 - i32.const 168 - i32.const 570 + i32.const 216 + i32.const 569 i32.const 10 call $~lib/env/abort unreachable @@ -2445,16 +2602,16 @@ local.get $4 f64.mul ) - (func $~lib/string/String#concat (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $1 - i32.const 240 + i32.const 312 local.get $1 select local.tee $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -2463,7 +2620,7 @@ i32.shl local.tee $4 local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -2475,11 +2632,11 @@ local.tee $2 i32.eqz if - i32.const 312 + i32.const 416 return end local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $2 local.get $0 local.get $3 @@ -2492,23 +2649,23 @@ call $~lib/memory/memory.copy local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/string/String.__concat (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 240 + i32.const 312 local.get $0 select local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.__ne (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__eq i32.eqz ) - (func $~lib/string/String.__gt (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block (result i32) @@ -2536,14 +2693,14 @@ return end local.get $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 i32.shr_u local.set $3 local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -2573,7 +2730,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.__lt (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block (result i32) @@ -2601,14 +2758,14 @@ return end local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 i32.shr_u local.set $2 local.get $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -2638,33 +2795,33 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String.__gte (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gte (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__lt i32.eqz ) - (func $~lib/string/String.__lte (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 312 + (func $~lib/string/String.__lte (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 416 local.get $0 call $~lib/string/String.__gt i32.eqz ) - (func $~lib/string/String#repeat (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 i32.eqz if i32.const 0 - i32.const 168 - i32.const 321 + i32.const 216 + i32.const 323 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -2687,8 +2844,8 @@ end if i32.const 0 - i32.const 168 - i32.const 326 + i32.const 216 + i32.const 328 i32.const 6 call $~lib/env/abort unreachable @@ -2703,7 +2860,7 @@ i32.eqz end if - i32.const 312 + i32.const 416 return end local.get $1 @@ -2718,7 +2875,7 @@ i32.mul i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $2 local.get $0 local.get $3 @@ -2728,13 +2885,13 @@ call $~lib/memory/memory.repeat local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/string/String#slice (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -2790,14 +2947,14 @@ i32.const 0 i32.le_s if - i32.const 312 + i32.const 416 return end local.get $3 i32.const 1 i32.shl local.tee $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $1 local.get $4 i32.const 1 @@ -2808,25 +2965,32 @@ call $~lib/memory/memory.copy local.get $1 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/runtime/doMakeArray (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/makeArray (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) i32.const 16 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 2 - call $~lib/runtime/doRegister - local.tee $1 + call $~lib/runtime/register + local.set $1 local.get $0 i32.const 2 i32.shl local.tee $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $3 + local.set $4 + local.get $1 + i32.load + drop + local.get $1 + local.get $4 i32.store local.get $1 local.get $3 @@ -2839,7 +3003,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/memory/memory.fill (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -3050,13 +3214,13 @@ end end ) - (func $~lib/runtime/doReallocate (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $3 i32.load offset=4 @@ -3067,20 +3231,20 @@ i32.const 1 i32.const 32 local.get $2 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub i32.shl i32.const 0 local.get $0 - i32.const 5496 + i32.const 6736 i32.gt_u select i32.const 1 i32.const 32 local.get $1 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -3090,19 +3254,25 @@ if local.get $4 call $~lib/memory/memory.allocate - local.tee $4 + local.tee $5 local.get $3 i32.load i32.store - local.get $4 - i32.const 8 + local.get $5 + i32.const 0 + i32.store offset=8 + local.get $5 + i32.const 0 + i32.store offset=12 + local.get $5 + i32.const 16 i32.add - local.tee $5 + local.tee $4 local.get $0 local.get $2 call $~lib/memory/memory.copy local.get $2 - local.get $5 + local.get $4 i32.add local.get $1 local.get $2 @@ -3114,20 +3284,20 @@ i32.eq if local.get $0 - i32.const 5496 + i32.const 6736 i32.le_u if i32.const 0 - i32.const 96 - i32.const 133 + i32.const 120 + i32.const 125 i32.const 8 call $~lib/env/abort unreachable end end - local.get $4 - local.set $3 local.get $5 + local.set $3 + local.get $4 local.set $0 else local.get $0 @@ -3144,7 +3314,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureCapacity (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3155,12 +3325,12 @@ i32.gt_u if local.get $1 - i32.const 268435454 + i32.const 268435452 i32.gt_u if i32.const 0 - i32.const 1392 - i32.const 14 + i32.const 1912 + i32.const 13 i32.const 64 call $~lib/env/abort unreachable @@ -3172,11 +3342,14 @@ i32.const 2 i32.shl local.tee $3 - call $~lib/runtime/doReallocate + call $~lib/runtime/reallocate local.tee $1 local.get $2 i32.ne if + local.get $0 + i32.load + drop local.get $0 local.get $1 i32.store @@ -3189,30 +3362,37 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.get $0 i32.load offset=12 + local.tee $2 i32.const 1 i32.add - local.tee $2 + local.tee $3 call $~lib/array/ensureCapacity local.get $0 - local.get $2 - i32.store offset=12 - local.get $0 i32.load offset=4 local.get $2 - i32.const 1 - i32.sub i32.const 2 i32.shl i32.add + local.tee $2 + i32.load local.get $1 - i32.store + i32.ne + if + local.get $2 + local.get $1 + i32.store + end + local.get $0 + local.get $3 + i32.store offset=12 ) - (func $~lib/string/String#split (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3225,228 +3405,241 @@ i32.eqz if i32.const 0 - i32.const 168 - i32.const 348 + i32.const 216 + i32.const 350 i32.const 4 call $~lib/env/abort unreachable end - block $folding-inner1 - block $folding-inner0 - local.get $2 + block $folding-inner0 + local.get $2 + i32.eqz + br_if $folding-inner0 + local.get $1 + i32.eqz + if + i32.const 1 + call $~lib/runtime/makeArray + local.tee $3 + i32.load offset=4 + local.get $0 + i32.store + local.get $3 + return + end + local.get $0 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.set $5 + i32.const 2147483647 + local.get $2 + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $2 + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.tee $3 + local.set $9 + local.get $3 + if + local.get $5 i32.eqz - br_if $folding-inner0 - local.get $1 + if + i32.const 1 + call $~lib/runtime/makeArray + local.tee $3 + i32.load offset=4 + i32.const 416 + i32.store + local.get $3 + return + end + else + local.get $5 i32.eqz - br_if $folding-inner1 - local.get $0 - i32.const 8 - i32.sub - i32.load offset=4 - i32.const 1 - i32.shr_u - local.set $4 - i32.const 2147483647 + br_if $folding-inner0 + local.get $5 local.get $2 + local.get $5 local.get $2 - i32.const 0 i32.lt_s select - local.set $2 - local.get $1 - i32.const 8 - i32.sub + local.tee $5 + call $~lib/runtime/makeArray + local.tee $7 i32.load offset=4 - i32.const 1 - i32.shr_u - local.tee $3 - local.set $9 - local.get $3 - if + local.set $3 + loop $repeat|0 local.get $4 - i32.eqz + local.get $5 + i32.lt_s if + i32.const 2 + call $~lib/runtime/allocate i32.const 1 - call $~lib/runtime/doMakeArray - local.tee $3 - i32.load offset=4 - i32.const 312 - i32.store + call $~lib/runtime/register + local.tee $1 + local.get $4 + i32.const 1 + i32.shl + local.get $0 + i32.add + i32.load16_u + i32.store16 + local.get $4 + i32.const 2 + i32.shl local.get $3 - return + i32.add + local.get $1 + i32.store + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $repeat|0 end - else - local.get $4 - i32.eqz - br_if $folding-inner0 - local.get $4 - local.get $2 + end + local.get $7 + return + end + i32.const 0 + call $~lib/runtime/makeArray + local.set $6 + loop $continue|1 + local.get $1 + i32.eqz + if + unreachable + end + local.get $0 + local.get $1 + local.get $4 + call $~lib/string/String#indexOf + local.tee $8 + i32.const -1 + i32.ne + if + local.get $8 local.get $4 - local.get $2 - i32.lt_s - select - local.tee $4 - call $~lib/runtime/doMakeArray - local.tee $7 - i32.load offset=4 - local.set $3 + i32.sub + local.tee $3 i32.const 0 - local.set $1 - loop $repeat|0 - local.get $1 - local.get $4 - i32.lt_s - if - i32.const 2 - call $~lib/runtime/doAllocate - i32.const 1 - call $~lib/runtime/doRegister - local.tee $2 - local.get $1 - i32.const 1 - i32.shl - local.get $0 - i32.add - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.shl - local.get $3 - i32.add - local.get $2 - i32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $repeat|0 - end - end - local.get $7 - return - end - i32.const 0 - call $~lib/runtime/doMakeArray - local.set $5 - loop $continue|1 - local.get $1 - i32.eqz - if - unreachable - end - local.get $0 - local.get $1 - local.get $6 - call $~lib/string/String#indexOf - local.tee $8 - i32.const -1 - i32.ne + i32.gt_s if - local.get $8 - local.get $6 - i32.sub + local.get $3 + i32.const 1 + i32.shl local.tee $3 - i32.const 0 - i32.gt_s - if - local.get $3 - i32.const 1 - i32.shl - local.tee $3 - call $~lib/runtime/doAllocate - local.tee $7 - local.get $6 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $3 - call $~lib/memory/memory.copy - local.get $5 - local.get $7 - i32.const 1 - call $~lib/runtime/doRegister - call $~lib/array/Array#push - else - local.get $5 - i32.const 312 - call $~lib/array/Array#push - end - local.get $10 + call $~lib/runtime/allocate + local.tee $7 + local.get $4 i32.const 1 + i32.shl + local.get $0 i32.add - local.tee $10 - local.get $2 - i32.eq - if - local.get $5 - return - end - local.get $8 - local.get $9 - i32.add - local.set $6 - br $continue|1 + local.get $3 + call $~lib/memory/memory.copy + local.get $6 + local.get $7 + i32.const 1 + call $~lib/runtime/register + call $~lib/array/Array#push + else + local.get $6 + i32.const 416 + call $~lib/array/Array#push + end + local.get $10 + i32.const 1 + i32.add + local.tee $10 + local.get $2 + i32.eq + if + local.get $6 + return end + local.get $8 + local.get $9 + i32.add + local.set $4 + br $continue|1 end - local.get $6 - i32.eqz - br_if $folding-inner1 - local.get $4 - local.get $6 - i32.sub + end + local.get $4 + i32.eqz + if + i32.const 1 + call $~lib/runtime/makeArray + local.tee $3 + i32.load offset=4 local.tee $1 - i32.const 0 - i32.gt_s + i32.load + local.get $0 + i32.ne if local.get $1 - i32.const 1 - i32.shl - local.tee $1 - call $~lib/runtime/doAllocate - local.tee $3 - local.get $6 - i32.const 1 - i32.shl local.get $0 - i32.add - local.get $1 - call $~lib/memory/memory.copy - local.get $5 - local.get $3 - i32.const 1 - call $~lib/runtime/doRegister - call $~lib/array/Array#push - else - local.get $5 - i32.const 312 - call $~lib/array/Array#push + i32.store end - local.get $5 + local.get $3 return end + local.get $5 + local.get $4 + i32.sub + local.tee $1 i32.const 0 - call $~lib/runtime/doMakeArray + i32.gt_s + if + local.get $1 + i32.const 1 + i32.shl + local.tee $1 + call $~lib/runtime/allocate + local.tee $3 + local.get $4 + i32.const 1 + i32.shl + local.get $0 + i32.add + local.get $1 + call $~lib/memory/memory.copy + local.get $6 + local.get $3 + i32.const 1 + call $~lib/runtime/register + call $~lib/array/Array#push + else + local.get $6 + i32.const 416 + call $~lib/array/Array#push + end + local.get $6 return end - i32.const 1 - call $~lib/runtime/doMakeArray - local.tee $3 - i32.load offset=4 - local.get $0 - i32.store - local.get $3 + i32.const 0 + call $~lib/runtime/makeArray ) - (func $~lib/array/Array#__get (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 i32.ge_u if i32.const 0 - i32.const 1392 - i32.const 97 + i32.const 1912 + i32.const 95 i32.const 45 call $~lib/env/abort unreachable @@ -3459,8 +3652,8 @@ i32.ge_u if i32.const 0 - i32.const 1392 - i32.const 100 + i32.const 1912 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable @@ -3473,7 +3666,7 @@ i32.add i32.load ) - (func $~lib/util/number/decimalCount32 (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -3527,10 +3720,10 @@ end end ) - (func $~lib/util/number/utoa32_lut (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - i32.const 2012 + i32.const 2612 i32.load local.set $3 loop $continue|0 @@ -3637,14 +3830,14 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 i32.eqz if - i32.const 608 + i32.const 840 return end local.get $0 @@ -3664,7 +3857,7 @@ local.tee $3 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $2 local.get $0 local.get $3 @@ -3677,15 +3870,15 @@ end local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/util/number/utoa32 (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 i32.eqz if - i32.const 608 + i32.const 840 return end local.get $0 @@ -3693,16 +3886,16 @@ local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $2 local.get $0 local.get $1 call $~lib/util/number/utoa32_lut local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/util/number/decimalCount64 (; 40 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 39 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -3756,12 +3949,12 @@ end end ) - (func $~lib/util/number/utoa64_lut (; 41 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 40 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 2012 + i32.const 2612 i32.load local.set $3 loop $continue|0 @@ -3853,14 +4046,14 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 42 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 41 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 i64.eqz if - i32.const 608 + i32.const 840 return end local.get $0 @@ -3874,7 +4067,7 @@ local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $2 local.get $3 local.get $1 @@ -3885,7 +4078,7 @@ local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $2 local.get $0 local.get $1 @@ -3893,9 +4086,9 @@ end local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/util/number/itoa64 (; 43 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 42 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3903,7 +4096,7 @@ local.get $0 i64.eqz if - i32.const 608 + i32.const 840 return end block (result i32) @@ -3931,7 +4124,7 @@ local.tee $2 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $3 local.get $4 local.get $2 @@ -3944,7 +4137,7 @@ local.tee $2 i32.const 1 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $3 local.get $0 local.get $2 @@ -3958,9 +4151,9 @@ end local.get $3 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/util/number/genDigits (; 44 ;) (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 (; 43 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i32) @@ -3995,7 +4188,7 @@ local.tee $7 call $~lib/util/number/decimalCount32 local.set $9 - i32.const 4060 + i32.const 4980 i32.load local.set $13 loop $continue|0 @@ -4371,7 +4564,7 @@ local.get $2 end ) - (func $~lib/util/number/prettify (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4633,14 +4826,14 @@ end end ) - (func $~lib/util/number/dtoa_core (; 46 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 45 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) - (local $5 i64) + (local $5 i32) (local $6 i64) (local $7 i32) - (local $8 i32) + (local $8 i64) (local $9 i64) (local $10 i64) (local $11 i32) @@ -4650,15 +4843,15 @@ f64.const 0 f64.lt local.tee $11 - if (result f64) + if local.get $0 i32.const 45 i32.store16 local.get $1 f64.neg - else - local.get $1 + local.set $1 end + local.get $1 i64.reinterpret_f64 local.tee $2 i64.const 9218868437227405312 @@ -4666,14 +4859,14 @@ i64.const 52 i64.shr_u i32.wrap_i64 + local.tee $5 + i32.const 0 + i32.ne local.set $7 local.get $2 i64.const 4503599627370495 i64.and local.get $7 - i32.const 0 - i32.ne - local.tee $8 i64.extend_i32_u i64.const 52 i64.shl @@ -4683,43 +4876,43 @@ i64.shl i64.const 1 i64.add - local.tee $5 + local.tee $8 i64.clz i32.wrap_i64 local.set $3 - local.get $5 + local.get $8 local.get $3 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus - local.get $7 + local.get $5 i32.const 1 - local.get $8 + local.get $7 select i32.const 1075 i32.sub - local.tee $7 - i32.const 1 - i32.sub - local.get $3 - i32.sub - local.set $3 + local.set $5 local.get $2 local.get $2 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $8 + local.tee $7 i64.extend_i32_s i64.shl i64.const 1 i64.sub + local.get $5 local.get $7 - local.get $8 + i32.sub + local.get $5 + i32.const 1 i32.sub local.get $3 i32.sub + local.tee $3 + i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus @@ -4749,16 +4942,16 @@ local.tee $3 i32.const 3 i32.shl - local.tee $8 + local.tee $7 i32.sub global.set $~lib/util/number/_K - i32.const 3780 + i32.const 4668 i32.load - local.get $8 + local.get $7 i32.add i64.load global.set $~lib/util/number/_frc_pow - i32.const 3988 + i32.const 4892 i32.load local.get $3 i32.const 1 @@ -4766,6 +4959,16 @@ i32.add i32.load16_s global.set $~lib/util/number/_exp_pow + global.get $~lib/util/number/_frc_pow + local.tee $8 + i64.const 4294967295 + i64.and + local.set $4 + local.get $8 + i64.const 32 + i64.shr_u + local.tee $12 + local.tee $6 local.get $2 local.get $2 i64.clz @@ -4777,30 +4980,20 @@ i64.const 4294967295 i64.and local.tee $9 - global.get $~lib/util/number/_frc_pow - local.tee $5 - i64.const 4294967295 - i64.and - local.tee $10 - i64.mul - local.set $4 - local.get $5 - i64.const 32 - i64.shr_u - local.tee $6 - local.get $9 i64.mul + local.get $4 local.get $2 i64.const 32 i64.shr_u local.tee $2 - local.get $10 i64.mul local.get $4 + local.get $9 + i64.mul i64.const 32 i64.shr_u i64.add - local.tee $4 + local.tee $10 i64.const 4294967295 i64.and i64.add @@ -4811,36 +5004,30 @@ local.get $2 local.get $6 i64.mul - local.get $4 + local.get $10 i64.const 32 i64.shr_u i64.add i64.add local.set $13 - local.get $5 - i64.const 4294967295 - i64.and - local.tee $2 global.get $~lib/util/number/_frc_plus - local.tee $4 + local.tee $10 i64.const 4294967295 i64.and local.tee $6 - i64.mul - local.set $12 - local.get $6 - local.get $5 - i64.const 32 - i64.shr_u + local.get $12 local.tee $9 i64.mul - local.get $2 local.get $4 + local.tee $2 + local.get $10 i64.const 32 i64.shr_u - local.tee $10 + local.tee $4 + i64.mul + local.get $2 + local.get $6 i64.mul - local.get $12 i64.const 32 i64.shr_u i64.add @@ -4852,8 +5039,8 @@ i64.add i64.const 32 i64.shr_u + local.get $4 local.get $9 - local.get $10 i64.mul local.get $2 i64.const 32 @@ -4861,39 +5048,61 @@ i64.add i64.add local.set $6 - global.get $~lib/util/number/_frc_minus - local.tee $12 - i64.const 4294967295 - i64.and - local.tee $9 - local.get $5 + local.get $8 local.tee $2 i64.const 4294967295 i64.and - local.tee $10 - i64.mul local.set $4 + local.get $5 + local.get $3 + i32.sub + local.set $5 + local.get $11 + i32.const 1 + i32.shl + local.get $0 + i32.add + local.get $0 + local.get $13 + local.get $5 + global.get $~lib/util/number/_exp_pow + local.tee $3 + i32.add + i32.const -64 + i32.sub local.get $6 i64.const 1 i64.sub - local.tee $5 + local.tee $8 + global.get $~lib/util/number/_exp + local.get $3 + i32.add + i32.const -64 + i32.sub + local.get $8 local.get $2 i64.const 32 i64.shr_u local.tee $6 - local.get $9 + global.get $~lib/util/number/_frc_minus + local.tee $2 + i64.const 4294967295 + i64.and + local.tee $9 i64.mul - local.get $12 + local.get $4 + local.get $2 i64.const 32 i64.shr_u local.tee $2 - local.get $10 i64.mul local.get $4 + local.get $9 + i64.mul i64.const 32 i64.shr_u i64.add - local.tee $4 + local.tee $10 i64.const 4294967295 i64.and i64.add @@ -4904,7 +5113,7 @@ local.get $2 local.get $6 i64.mul - local.get $4 + local.get $10 i64.const 32 i64.shr_u i64.add @@ -4912,29 +5121,6 @@ i64.const 1 i64.add i64.sub - local.set $4 - local.get $11 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $0 - local.get $13 - local.get $7 - local.get $3 - i32.sub - global.get $~lib/util/number/_exp_pow - local.tee $3 - i32.add - i32.const -64 - i32.sub - local.get $5 - global.get $~lib/util/number/_exp - local.get $3 - i32.add - i32.const -64 - i32.sub - local.get $4 local.get $11 call $~lib/util/number/genDigits local.get $11 @@ -4944,7 +5130,7 @@ local.get $11 i32.add ) - (func $~lib/string/String#substring (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4952,8 +5138,8 @@ i32.eqz if i32.const 0 - i32.const 168 - i32.const 187 + i32.const 216 + i32.const 189 i32.const 4 call $~lib/env/abort unreachable @@ -4966,7 +5152,7 @@ select local.tee $2 local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -5006,7 +5192,7 @@ local.tee $3 i32.eqz if - i32.const 312 + i32.const 416 return end local.get $4 @@ -5014,7 +5200,7 @@ local.tee $2 if local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -5031,7 +5217,7 @@ return end local.get $3 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $2 local.get $0 local.get $4 @@ -5040,7 +5226,34 @@ call $~lib/memory/memory.copy local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register + ) + (func $~lib/runtime/discard (; 47 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 6736 + i32.le_u + if + i32.const 0 + i32.const 120 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 120 + i32.const 187 + i32.const 4 + call $~lib/env/abort + unreachable + end ) (func $~lib/util/number/dtoa (; 48 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) @@ -5049,7 +5262,7 @@ f64.const 0 f64.eq if - i32.const 2984 + i32.const 3832 return end local.get $0 @@ -5062,11 +5275,11 @@ local.get $0 f64.ne if - i32.const 3000 + i32.const 3856 return end - i32.const 3016 - i32.const 3048 + i32.const 3880 + i32.const 3920 local.get $0 f64.const 0 f64.lt @@ -5074,7 +5287,7 @@ return end i32.const 56 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $2 local.get $0 call $~lib/util/number/dtoa_core @@ -5084,24 +5297,24 @@ call $~lib/string/String#substring local.set $1 local.get $2 - call $~lib/runtime/assertUnregistered + call $~lib/runtime/discard local.get $1 ) (func $start:std/string (; 49 ;) (type $FUNCSIG$v) (local $0 i32) global.get $std/string/str - i32.const 16 + i32.const 24 i32.ne if i32.const 0 - i32.const 56 - i32.const 16 + i32.const 72 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -5110,8 +5323,8 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 18 + i32.const 72 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -5121,7 +5334,7 @@ i32.const 0 global.get $std/string/str local.tee $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -5136,77 +5349,77 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 19 + i32.const 72 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable end - i32.const 5496 + i32.const 6736 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 0 call $~lib/string/String.fromCharCode - i32.const 136 + i32.const 168 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 21 + i32.const 72 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable end i32.const 54 call $~lib/string/String.fromCharCode - i32.const 152 + i32.const 192 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 22 + i32.const 72 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable end i32.const 65590 call $~lib/string/String.fromCharCode - i32.const 152 + i32.const 192 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 23 + i32.const 72 + i32.const 25 i32.const 0 call $~lib/env/abort unreachable end i32.const 0 call $~lib/string/String.fromCodePoint - i32.const 136 + i32.const 168 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 25 + i32.const 72 + i32.const 27 i32.const 0 call $~lib/env/abort unreachable end i32.const 54 call $~lib/string/String.fromCodePoint - i32.const 152 + i32.const 192 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 26 + i32.const 72 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -5215,9 +5428,9 @@ call $~lib/string/String.fromCodePoint i32.eqz if - i32.const 208 - i32.const 56 - i32.const 27 + i32.const 264 + i32.const 72 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable @@ -5227,8 +5440,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 29 + i32.const 72 + i32.const 31 i32.const 0 call $~lib/env/abort unreachable @@ -5238,300 +5451,300 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 30 + i32.const 72 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 280 + i32.const 368 i32.const 0 call $~lib/string/String#indexOf i32.const -1 i32.eq if i32.const 0 - i32.const 56 - i32.const 31 + i32.const 72 + i32.const 33 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str i32.const 0 - i32.const 296 + i32.const 392 call $~lib/string/String#padStart global.get $std/string/str call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 33 + i32.const 72 + i32.const 35 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str i32.const 15 - i32.const 296 + i32.const 392 call $~lib/string/String#padStart global.get $std/string/str call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 34 + i32.const 72 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 + i32.const 416 i32.const 3 - i32.const 296 + i32.const 392 call $~lib/string/String#padStart - i32.const 320 + i32.const 432 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 35 + i32.const 72 + i32.const 37 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 + i32.const 416 i32.const 10 - i32.const 312 + i32.const 416 call $~lib/string/String#padStart - i32.const 312 + i32.const 416 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 36 + i32.const 72 + i32.const 38 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 + i32.const 456 i32.const 100 - i32.const 312 + i32.const 416 call $~lib/string/String#padStart - i32.const 336 + i32.const 456 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 37 + i32.const 72 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 + i32.const 480 i32.const 5 - i32.const 296 + i32.const 392 call $~lib/string/String#padStart - i32.const 368 + i32.const 504 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 38 + i32.const 72 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 + i32.const 480 i32.const 6 - i32.const 392 + i32.const 536 call $~lib/string/String#padStart - i32.const 408 + i32.const 560 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 39 + i32.const 72 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 + i32.const 480 i32.const 8 - i32.const 392 + i32.const 536 call $~lib/string/String#padStart - i32.const 432 + i32.const 592 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 40 + i32.const 72 + i32.const 42 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str i32.const 0 - i32.const 296 + i32.const 392 call $~lib/string/String#padEnd global.get $std/string/str call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 42 + i32.const 72 + i32.const 44 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str i32.const 15 - i32.const 296 + i32.const 392 call $~lib/string/String#padEnd global.get $std/string/str call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 43 + i32.const 72 + i32.const 45 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 + i32.const 416 i32.const 3 - i32.const 296 + i32.const 392 call $~lib/string/String#padEnd - i32.const 320 + i32.const 432 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 44 + i32.const 72 + i32.const 46 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 + i32.const 416 i32.const 10 - i32.const 312 + i32.const 416 call $~lib/string/String#padEnd - i32.const 312 + i32.const 416 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 45 + i32.const 72 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 + i32.const 456 i32.const 100 - i32.const 312 + i32.const 416 call $~lib/string/String#padEnd - i32.const 336 + i32.const 456 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 46 + i32.const 72 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 + i32.const 480 i32.const 5 - i32.const 296 + i32.const 392 call $~lib/string/String#padEnd - i32.const 456 + i32.const 624 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 47 + i32.const 72 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 + i32.const 480 i32.const 6 - i32.const 352 - call $~lib/string/String#padEnd i32.const 480 + call $~lib/string/String#padEnd + i32.const 656 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 48 + i32.const 72 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 + i32.const 480 i32.const 8 - i32.const 352 + i32.const 480 call $~lib/string/String#padEnd - i32.const 504 + i32.const 688 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 49 + i32.const 72 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 312 + i32.const 416 + i32.const 416 i32.const 0 call $~lib/string/String#indexOf if i32.const 0 - i32.const 56 - i32.const 51 + i32.const 72 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 224 + i32.const 416 + i32.const 288 i32.const 0 call $~lib/string/String#indexOf i32.const -1 i32.ne if i32.const 0 - i32.const 56 - i32.const 52 + i32.const 72 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 - i32.const 336 + i32.const 456 + i32.const 456 i32.const 0 call $~lib/string/String#indexOf if i32.const 0 - i32.const 56 - i32.const 53 + i32.const 72 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable @@ -5543,126 +5756,126 @@ call $~lib/string/String#indexOf if i32.const 0 + i32.const 72 i32.const 56 - i32.const 54 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 312 + i32.const 416 i32.const 0 call $~lib/string/String#indexOf if i32.const 0 - i32.const 56 - i32.const 55 + i32.const 72 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 528 + i32.const 720 i32.const 0 call $~lib/string/String#indexOf i32.const 2 i32.ne if i32.const 0 - i32.const 56 - i32.const 56 + i32.const 72 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 544 + i32.const 744 i32.const 0 call $~lib/string/String#indexOf i32.const -1 i32.ne if i32.const 0 - i32.const 56 - i32.const 57 + i32.const 72 + i32.const 59 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 528 + i32.const 720 i32.const 2 call $~lib/string/String#indexOf i32.const 2 i32.ne if i32.const 0 - i32.const 56 - i32.const 58 + i32.const 72 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 528 + i32.const 720 i32.const 3 call $~lib/string/String#indexOf i32.const -1 i32.ne if i32.const 0 - i32.const 56 - i32.const 59 + i32.const 72 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 560 + i32.const 768 i32.const -1 call $~lib/string/String#indexOf i32.const 2 i32.ne if i32.const 0 - i32.const 56 - i32.const 60 + i32.const 72 + i32.const 62 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 312 + i32.const 416 + i32.const 416 i32.const 2147483647 call $~lib/string/String#lastIndexOf if i32.const 0 - i32.const 56 - i32.const 62 + i32.const 72 + i32.const 64 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 224 + i32.const 416 + i32.const 288 i32.const 2147483647 call $~lib/string/String#lastIndexOf i32.const -1 i32.ne if i32.const 0 - i32.const 56 - i32.const 63 + i32.const 72 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 312 + i32.const 416 i32.const 2147483647 call $~lib/string/String#lastIndexOf global.get $std/string/str - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -5670,641 +5883,641 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 64 + i32.const 72 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 528 + i32.const 720 i32.const 2147483647 call $~lib/string/String#lastIndexOf i32.const 2 i32.ne if i32.const 0 - i32.const 56 - i32.const 65 + i32.const 72 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 544 + i32.const 744 i32.const 2147483647 call $~lib/string/String#lastIndexOf i32.const -1 i32.ne if i32.const 0 - i32.const 56 - i32.const 66 + i32.const 72 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 576 + i32.const 792 i32.const 2147483647 call $~lib/string/String#lastIndexOf i32.const 15 i32.ne if i32.const 0 - i32.const 56 - i32.const 67 + i32.const 72 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 528 + i32.const 720 i32.const 2 call $~lib/string/String#lastIndexOf i32.const 2 i32.ne if i32.const 0 - i32.const 56 - i32.const 68 + i32.const 72 + i32.const 70 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 528 + i32.const 720 i32.const 3 call $~lib/string/String#lastIndexOf i32.const 2 i32.ne if i32.const 0 - i32.const 56 - i32.const 69 + i32.const 72 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 560 + i32.const 768 i32.const -1 call $~lib/string/String#lastIndexOf i32.const -1 i32.ne if i32.const 0 - i32.const 56 - i32.const 70 + i32.const 72 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 592 + i32.const 816 i32.const 0 call $~lib/string/String#lastIndexOf i32.const -1 i32.ne if i32.const 0 - i32.const 56 - i32.const 71 + i32.const 72 + i32.const 73 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 224 + i32.const 288 i32.const 0 call $~lib/string/String#lastIndexOf if i32.const 0 - i32.const 56 i32.const 72 + i32.const 74 i32.const 0 call $~lib/env/abort unreachable end - i32.const 608 + i32.const 840 call $~lib/util/string/parse f64.const 0 f64.ne if i32.const 0 - i32.const 56 - i32.const 78 + i32.const 72 + i32.const 80 i32.const 0 call $~lib/env/abort unreachable end - i32.const 624 + i32.const 864 call $~lib/util/string/parse f64.const 1 f64.ne if i32.const 0 - i32.const 56 - i32.const 79 + i32.const 72 + i32.const 81 i32.const 0 call $~lib/env/abort unreachable end - i32.const 640 + i32.const 888 call $~lib/util/string/parse f64.const 5 f64.ne if i32.const 0 - i32.const 56 - i32.const 80 + i32.const 72 + i32.const 82 i32.const 0 call $~lib/env/abort unreachable end - i32.const 664 + i32.const 920 call $~lib/util/string/parse f64.const 455 f64.ne if i32.const 0 - i32.const 56 - i32.const 81 + i32.const 72 + i32.const 83 i32.const 0 call $~lib/env/abort unreachable end - i32.const 688 + i32.const 952 call $~lib/util/string/parse f64.const 3855 f64.ne if i32.const 0 - i32.const 56 - i32.const 82 + i32.const 72 + i32.const 84 i32.const 0 call $~lib/env/abort unreachable end - i32.const 712 + i32.const 984 call $~lib/util/string/parse f64.const 3855 f64.ne if i32.const 0 - i32.const 56 - i32.const 83 + i32.const 72 + i32.const 85 i32.const 0 call $~lib/env/abort unreachable end - i32.const 736 + i32.const 1016 call $~lib/util/string/parse f64.const 11 f64.ne if i32.const 0 - i32.const 56 - i32.const 84 + i32.const 72 + i32.const 86 i32.const 0 call $~lib/env/abort unreachable end - i32.const 752 + i32.const 1040 call $~lib/util/string/parse f64.const 1 f64.ne if i32.const 0 - i32.const 56 - i32.const 85 + i32.const 72 + i32.const 87 i32.const 0 call $~lib/env/abort unreachable end - i32.const 608 + i32.const 840 call $~lib/string/parseFloat f64.const 0 f64.ne if i32.const 0 - i32.const 56 - i32.const 87 + i32.const 72 + i32.const 89 i32.const 0 call $~lib/env/abort unreachable end - i32.const 624 + i32.const 864 call $~lib/string/parseFloat f64.const 1 f64.ne if i32.const 0 - i32.const 56 - i32.const 88 + i32.const 72 + i32.const 90 i32.const 0 call $~lib/env/abort unreachable end - i32.const 768 + i32.const 1064 call $~lib/string/parseFloat f64.const 0.1 f64.ne if i32.const 0 - i32.const 56 - i32.const 89 + i32.const 72 + i32.const 91 i32.const 0 call $~lib/env/abort unreachable end - i32.const 784 + i32.const 1088 call $~lib/string/parseFloat f64.const 0.25 f64.ne if i32.const 0 - i32.const 56 - i32.const 90 + i32.const 72 + i32.const 92 i32.const 0 call $~lib/env/abort unreachable end - i32.const 800 + i32.const 1112 call $~lib/string/parseFloat f64.const 0.1 f64.ne if i32.const 0 - i32.const 56 - i32.const 91 + i32.const 72 + i32.const 93 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 - i32.const 824 + i32.const 456 + i32.const 1144 call $~lib/string/String.__concat global.set $std/string/c global.get $std/string/c - i32.const 840 + i32.const 1168 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 94 + i32.const 72 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/c - i32.const 336 + i32.const 456 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 56 - i32.const 95 + i32.const 72 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 312 + i32.const 416 + i32.const 416 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 96 + i32.const 72 + i32.const 98 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 + i32.const 416 global.get $std/string/nullStr call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 56 - i32.const 97 + i32.const 72 + i32.const 99 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/nullStr - i32.const 312 + i32.const 416 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 56 - i32.const 98 + i32.const 72 + i32.const 100 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 - i32.const 824 + i32.const 456 + i32.const 1144 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 56 - i32.const 99 + i32.const 72 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 - i32.const 336 + i32.const 456 + i32.const 456 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 100 + i32.const 72 + i32.const 102 i32.const 0 call $~lib/env/abort unreachable end - i32.const 856 - i32.const 872 + i32.const 1192 + i32.const 1216 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 56 - i32.const 101 + i32.const 72 + i32.const 103 i32.const 0 call $~lib/env/abort unreachable end - i32.const 856 - i32.const 856 + i32.const 1192 + i32.const 1192 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 102 + i32.const 72 + i32.const 104 i32.const 0 call $~lib/env/abort unreachable end - i32.const 888 - i32.const 904 + i32.const 1240 + i32.const 1264 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 56 - i32.const 103 + i32.const 72 + i32.const 105 i32.const 0 call $~lib/env/abort unreachable end - i32.const 920 - i32.const 944 + i32.const 1288 + i32.const 1320 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 56 - i32.const 104 + i32.const 72 + i32.const 106 i32.const 0 call $~lib/env/abort unreachable end - i32.const 968 - i32.const 968 + i32.const 1352 + i32.const 1352 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 105 + i32.const 72 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable end - i32.const 968 - i32.const 992 + i32.const 1352 + i32.const 1384 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 56 - i32.const 106 + i32.const 72 + i32.const 108 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1016 - i32.const 1048 + i32.const 1416 + i32.const 1456 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 56 - i32.const 107 + i32.const 72 + i32.const 109 i32.const 0 call $~lib/env/abort unreachable end - i32.const 824 - i32.const 336 + i32.const 1144 + i32.const 456 call $~lib/string/String.__gt i32.eqz if i32.const 0 - i32.const 56 - i32.const 109 + i32.const 72 + i32.const 111 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1080 - i32.const 336 + i32.const 1496 + i32.const 456 call $~lib/string/String.__gt i32.eqz if i32.const 0 - i32.const 56 - i32.const 110 + i32.const 72 + i32.const 112 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1080 - i32.const 1096 + i32.const 1496 + i32.const 1520 call $~lib/string/String.__gte i32.eqz if i32.const 0 - i32.const 56 - i32.const 111 + i32.const 72 + i32.const 113 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1080 - i32.const 840 + i32.const 1496 + i32.const 1168 call $~lib/string/String.__gt i32.eqz if i32.const 0 - i32.const 56 - i32.const 112 + i32.const 72 + i32.const 114 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1080 - i32.const 840 + i32.const 1496 + i32.const 1168 call $~lib/string/String.__lt if i32.const 0 - i32.const 56 - i32.const 113 + i32.const 72 + i32.const 115 i32.const 0 call $~lib/env/abort unreachable end - i32.const 824 + i32.const 1144 global.get $std/string/nullStr call $~lib/string/String.__lt if i32.const 0 - i32.const 56 - i32.const 115 + i32.const 72 + i32.const 117 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/nullStr - i32.const 824 + i32.const 1144 call $~lib/string/String.__lt if i32.const 0 - i32.const 56 - i32.const 116 + i32.const 72 + i32.const 118 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 - i32.const 312 + i32.const 480 + i32.const 416 call $~lib/string/String.__gt i32.eqz if i32.const 0 - i32.const 56 - i32.const 118 + i32.const 72 + i32.const 120 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 352 + i32.const 416 + i32.const 480 call $~lib/string/String.__lt i32.eqz if i32.const 0 - i32.const 56 - i32.const 119 + i32.const 72 + i32.const 121 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 - i32.const 312 + i32.const 480 + i32.const 416 call $~lib/string/String.__gte i32.eqz if i32.const 0 - i32.const 56 - i32.const 120 + i32.const 72 + i32.const 122 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 + i32.const 480 call $~lib/string/String.__lte i32.eqz if i32.const 0 - i32.const 56 - i32.const 121 + i32.const 72 + i32.const 123 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 - i32.const 312 + i32.const 480 + i32.const 416 call $~lib/string/String.__lt if i32.const 0 - i32.const 56 - i32.const 122 + i32.const 72 + i32.const 124 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 352 + i32.const 416 + i32.const 480 call $~lib/string/String.__gt if i32.const 0 - i32.const 56 - i32.const 123 + i32.const 72 + i32.const 125 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 312 + i32.const 416 + i32.const 416 call $~lib/string/String.__lt if i32.const 0 - i32.const 56 - i32.const 124 + i32.const 72 + i32.const 126 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 312 + i32.const 416 + i32.const 416 call $~lib/string/String.__gt if i32.const 0 - i32.const 56 - i32.const 125 + i32.const 72 + i32.const 127 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 312 + i32.const 416 + i32.const 416 call $~lib/string/String.__gte i32.eqz if i32.const 0 - i32.const 56 - i32.const 126 + i32.const 72 + i32.const 128 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 + i32.const 416 call $~lib/string/String.__lte i32.eqz if i32.const 0 - i32.const 56 - i32.const 127 + i32.const 72 + i32.const 129 i32.const 0 call $~lib/env/abort unreachable @@ -6324,13 +6537,13 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 131 + i32.const 72 + i32.const 133 i32.const 0 call $~lib/env/abort unreachable end - i32.const 388 + i32.const 524 i32.load i32.const 1 i32.shr_u @@ -6338,151 +6551,151 @@ i32.ne if i32.const 0 - i32.const 56 - i32.const 133 + i32.const 72 + i32.const 135 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 + i32.const 416 i32.const 100 call $~lib/string/String#repeat - i32.const 312 + i32.const 416 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 135 + i32.const 72 + i32.const 137 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 + i32.const 456 i32.const 0 call $~lib/string/String#repeat - i32.const 312 + i32.const 416 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 136 + i32.const 72 + i32.const 138 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 + i32.const 456 i32.const 1 call $~lib/string/String#repeat - i32.const 336 + i32.const 456 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 137 + i32.const 72 + i32.const 139 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 + i32.const 456 i32.const 2 call $~lib/string/String#repeat - i32.const 1096 + i32.const 1520 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 138 + i32.const 72 + i32.const 140 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 + i32.const 456 i32.const 3 call $~lib/string/String#repeat - i32.const 1112 + i32.const 1544 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 139 + i32.const 72 + i32.const 141 i32.const 0 call $~lib/env/abort unreachable end - i32.const 840 + i32.const 1168 i32.const 4 call $~lib/string/String#repeat - i32.const 1128 + i32.const 1568 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 140 + i32.const 72 + i32.const 142 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 + i32.const 456 i32.const 5 call $~lib/string/String#repeat - i32.const 1152 + i32.const 1600 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 141 + i32.const 72 + i32.const 143 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 + i32.const 456 i32.const 6 call $~lib/string/String#repeat - i32.const 1176 + i32.const 1632 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 142 + i32.const 72 + i32.const 144 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 + i32.const 456 i32.const 7 call $~lib/string/String#repeat - i32.const 1200 + i32.const 1664 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 143 + i32.const 72 + i32.const 145 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1224 + i32.const 1696 global.set $std/string/str global.get $std/string/str i32.const 0 i32.const 2147483647 call $~lib/string/String#slice - i32.const 1224 + i32.const 1696 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 147 + i32.const 72 + i32.const 149 i32.const 0 call $~lib/env/abort unreachable @@ -6491,13 +6704,13 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#slice - i32.const 1264 + i32.const 1744 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 148 + i32.const 72 + i32.const 150 i32.const 0 call $~lib/env/abort unreachable @@ -6506,13 +6719,13 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#slice - i32.const 1280 + i32.const 1768 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 149 + i32.const 72 + i32.const 151 i32.const 0 call $~lib/env/abort unreachable @@ -6521,13 +6734,13 @@ i32.const 2 i32.const 7 call $~lib/string/String#slice - i32.const 1304 + i32.const 1800 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 150 + i32.const 72 + i32.const 152 i32.const 0 call $~lib/env/abort unreachable @@ -6536,13 +6749,13 @@ i32.const -11 i32.const -6 call $~lib/string/String#slice - i32.const 1328 + i32.const 1832 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 151 + i32.const 72 + i32.const 153 i32.const 0 call $~lib/env/abort unreachable @@ -6551,13 +6764,13 @@ i32.const 4 i32.const 3 call $~lib/string/String#slice - i32.const 312 + i32.const 416 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 152 + i32.const 72 + i32.const 154 i32.const 0 call $~lib/env/abort unreachable @@ -6566,18 +6779,18 @@ i32.const 0 i32.const -1 call $~lib/string/String#slice - i32.const 1352 + i32.const 1864 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 153 + i32.const 72 + i32.const 155 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 + i32.const 416 i32.const 0 i32.const 2147483647 call $~lib/string/String#split @@ -6591,7 +6804,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 312 + i32.const 416 call $~lib/string/String.__eq local.set $0 end @@ -6599,14 +6812,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 158 + i32.const 72 + i32.const 160 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 312 + i32.const 416 + i32.const 416 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -6614,14 +6827,14 @@ i32.load offset=12 if i32.const 0 - i32.const 56 - i32.const 160 + i32.const 72 + i32.const 162 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 528 + i32.const 416 + i32.const 720 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -6634,7 +6847,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 312 + i32.const 416 call $~lib/string/String.__eq local.set $0 end @@ -6642,14 +6855,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 162 + i32.const 72 + i32.const 164 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1432 - i32.const 1456 + i32.const 1960 + i32.const 1992 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -6662,7 +6875,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 1432 + i32.const 1960 call $~lib/string/String.__eq local.set $0 end @@ -6670,14 +6883,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 164 + i32.const 72 + i32.const 166 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1432 - i32.const 528 + i32.const 1960 + i32.const 720 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -6692,7 +6905,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq local.set $0 end @@ -6702,7 +6915,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 824 + i32.const 1144 call $~lib/string/String.__eq local.set $0 end @@ -6712,7 +6925,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1472 + i32.const 2016 call $~lib/string/String.__eq local.set $0 end @@ -6720,14 +6933,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 166 + i32.const 72 + i32.const 168 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1488 - i32.const 1512 + i32.const 2040 + i32.const 2072 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -6742,7 +6955,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq local.set $0 end @@ -6752,7 +6965,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 824 + i32.const 1144 call $~lib/string/String.__eq local.set $0 end @@ -6762,7 +6975,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1472 + i32.const 2016 call $~lib/string/String.__eq local.set $0 end @@ -6770,14 +6983,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 168 + i32.const 72 + i32.const 170 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1528 - i32.const 528 + i32.const 2096 + i32.const 720 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -6793,7 +7006,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq local.set $0 end @@ -6803,7 +7016,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 824 + i32.const 1144 call $~lib/string/String.__eq local.set $0 end @@ -6813,7 +7026,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 312 + i32.const 416 call $~lib/string/String.__eq local.set $0 end @@ -6823,7 +7036,7 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array#__get - i32.const 1472 + i32.const 2016 call $~lib/string/String.__eq local.set $0 end @@ -6831,14 +7044,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 170 + i32.const 72 + i32.const 172 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1552 - i32.const 528 + i32.const 2128 + i32.const 720 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -6854,7 +7067,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 312 + i32.const 416 call $~lib/string/String.__eq local.set $0 end @@ -6864,7 +7077,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq local.set $0 end @@ -6874,7 +7087,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 824 + i32.const 1144 call $~lib/string/String.__eq local.set $0 end @@ -6884,7 +7097,7 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array#__get - i32.const 1472 + i32.const 2016 call $~lib/string/String.__eq local.set $0 end @@ -6892,14 +7105,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 172 + i32.const 72 + i32.const 174 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1576 - i32.const 528 + i32.const 2160 + i32.const 720 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -6915,7 +7128,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq local.set $0 end @@ -6925,7 +7138,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 824 + i32.const 1144 call $~lib/string/String.__eq local.set $0 end @@ -6935,7 +7148,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1472 + i32.const 2016 call $~lib/string/String.__eq local.set $0 end @@ -6945,7 +7158,7 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array#__get - i32.const 312 + i32.const 416 call $~lib/string/String.__eq local.set $0 end @@ -6953,14 +7166,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 174 + i32.const 72 + i32.const 176 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 - i32.const 312 + i32.const 480 + i32.const 416 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -6975,7 +7188,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq local.set $0 end @@ -6985,7 +7198,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 824 + i32.const 1144 call $~lib/string/String.__eq local.set $0 end @@ -6995,7 +7208,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1472 + i32.const 2016 call $~lib/string/String.__eq local.set $0 end @@ -7003,14 +7216,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 176 + i32.const 72 + i32.const 178 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 - i32.const 312 + i32.const 480 + i32.const 416 i32.const 0 call $~lib/string/String#split global.set $std/string/sa @@ -7018,14 +7231,14 @@ i32.load offset=12 if i32.const 0 - i32.const 56 - i32.const 178 + i32.const 72 + i32.const 180 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 - i32.const 312 + i32.const 480 + i32.const 416 i32.const 1 call $~lib/string/String#split global.set $std/string/sa @@ -7038,7 +7251,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq local.set $0 end @@ -7046,14 +7259,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 180 + i32.const 72 + i32.const 182 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1432 - i32.const 528 + i32.const 1960 + i32.const 720 i32.const 1 call $~lib/string/String#split global.set $std/string/sa @@ -7066,7 +7279,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq local.set $0 end @@ -7074,14 +7287,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 182 + i32.const 72 + i32.const 184 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 - i32.const 312 + i32.const 480 + i32.const 416 i32.const 4 call $~lib/string/String#split global.set $std/string/sa @@ -7096,7 +7309,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq local.set $0 end @@ -7106,7 +7319,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 824 + i32.const 1144 call $~lib/string/String.__eq local.set $0 end @@ -7116,7 +7329,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1472 + i32.const 2016 call $~lib/string/String.__eq local.set $0 end @@ -7124,14 +7337,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 184 + i32.const 72 + i32.const 186 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 - i32.const 312 + i32.const 480 + i32.const 416 i32.const -1 call $~lib/string/String#split global.set $std/string/sa @@ -7146,7 +7359,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq local.set $0 end @@ -7156,7 +7369,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 824 + i32.const 1144 call $~lib/string/String.__eq local.set $0 end @@ -7166,7 +7379,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1472 + i32.const 2016 call $~lib/string/String.__eq local.set $0 end @@ -7174,14 +7387,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 186 + i32.const 72 + i32.const 188 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1432 - i32.const 528 + i32.const 1960 + i32.const 720 i32.const -1 call $~lib/string/String#split global.set $std/string/sa @@ -7196,7 +7409,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq local.set $0 end @@ -7206,7 +7419,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 824 + i32.const 1144 call $~lib/string/String.__eq local.set $0 end @@ -7216,7 +7429,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1472 + i32.const 2016 call $~lib/string/String.__eq local.set $0 end @@ -7224,1191 +7437,1191 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 188 + i32.const 72 + i32.const 190 i32.const 0 call $~lib/env/abort unreachable end i32.const 0 call $~lib/util/number/itoa32 - i32.const 608 + i32.const 840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 190 + i32.const 72 + i32.const 192 i32.const 0 call $~lib/env/abort unreachable end i32.const 1 call $~lib/util/number/itoa32 - i32.const 624 + i32.const 864 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 191 + i32.const 72 + i32.const 193 i32.const 0 call $~lib/env/abort unreachable end i32.const 8 call $~lib/util/number/itoa32 - i32.const 2032 + i32.const 2640 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 192 + i32.const 72 + i32.const 194 i32.const 0 call $~lib/env/abort unreachable end i32.const 123 call $~lib/util/number/itoa32 - i32.const 392 + i32.const 536 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 193 + i32.const 72 + i32.const 195 i32.const 0 call $~lib/env/abort unreachable end i32.const -1000 call $~lib/util/number/itoa32 - i32.const 2048 + i32.const 2664 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 194 + i32.const 72 + i32.const 196 i32.const 0 call $~lib/env/abort unreachable end i32.const 1234 call $~lib/util/number/itoa32 - i32.const 2072 + i32.const 2696 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 195 + i32.const 72 + i32.const 197 i32.const 0 call $~lib/env/abort unreachable end i32.const 12345 call $~lib/util/number/itoa32 - i32.const 2088 + i32.const 2720 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 196 + i32.const 72 + i32.const 198 i32.const 0 call $~lib/env/abort unreachable end i32.const 123456 call $~lib/util/number/itoa32 - i32.const 2112 + i32.const 2752 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 197 + i32.const 72 + i32.const 199 i32.const 0 call $~lib/env/abort unreachable end i32.const 1111111 call $~lib/util/number/itoa32 - i32.const 2136 + i32.const 2784 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 198 + i32.const 72 + i32.const 200 i32.const 0 call $~lib/env/abort unreachable end i32.const 1234567 call $~lib/util/number/itoa32 - i32.const 2160 + i32.const 2816 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 199 + i32.const 72 + i32.const 201 i32.const 0 call $~lib/env/abort unreachable end i32.const 2147483646 call $~lib/util/number/itoa32 - i32.const 2184 + i32.const 2848 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 200 + i32.const 72 + i32.const 202 i32.const 0 call $~lib/env/abort unreachable end i32.const 2147483647 call $~lib/util/number/itoa32 - i32.const 2216 + i32.const 2888 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 201 + i32.const 72 + i32.const 203 i32.const 0 call $~lib/env/abort unreachable end i32.const -2147483648 call $~lib/util/number/itoa32 - i32.const 2248 + i32.const 2928 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 202 + i32.const 72 + i32.const 204 i32.const 0 call $~lib/env/abort unreachable end i32.const -1 call $~lib/util/number/itoa32 - i32.const 2280 + i32.const 2968 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 203 + i32.const 72 + i32.const 205 i32.const 0 call $~lib/env/abort unreachable end i32.const 0 call $~lib/util/number/utoa32 - i32.const 608 + i32.const 840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 205 + i32.const 72 + i32.const 207 i32.const 0 call $~lib/env/abort unreachable end i32.const 1000 call $~lib/util/number/utoa32 - i32.const 2296 + i32.const 2992 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 206 + i32.const 72 + i32.const 208 i32.const 0 call $~lib/env/abort unreachable end i32.const 2147483647 call $~lib/util/number/utoa32 - i32.const 2216 + i32.const 2888 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 207 + i32.const 72 + i32.const 209 i32.const 0 call $~lib/env/abort unreachable end i32.const -2147483648 call $~lib/util/number/utoa32 - i32.const 2312 + i32.const 3016 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 208 + i32.const 72 + i32.const 210 i32.const 0 call $~lib/env/abort unreachable end i32.const -1 call $~lib/util/number/utoa32 - i32.const 2344 + i32.const 3056 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 209 + i32.const 72 + i32.const 211 i32.const 0 call $~lib/env/abort unreachable end i64.const 0 call $~lib/util/number/utoa64 - i32.const 608 + i32.const 840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 211 + i32.const 72 + i32.const 213 i32.const 0 call $~lib/env/abort unreachable end i64.const 1234 call $~lib/util/number/utoa64 - i32.const 2072 + i32.const 2696 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 212 + i32.const 72 + i32.const 214 i32.const 0 call $~lib/env/abort unreachable end i64.const 99999999 call $~lib/util/number/utoa64 - i32.const 2376 + i32.const 3096 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 213 + i32.const 72 + i32.const 215 i32.const 0 call $~lib/env/abort unreachable end i64.const 100000000 call $~lib/util/number/utoa64 - i32.const 2400 + i32.const 3128 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 214 + i32.const 72 + i32.const 216 i32.const 0 call $~lib/env/abort unreachable end i64.const 4294967295 call $~lib/util/number/utoa64 - i32.const 2344 + i32.const 3056 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 215 + i32.const 72 + i32.const 217 i32.const 0 call $~lib/env/abort unreachable end i64.const 68719476735 call $~lib/util/number/utoa64 - i32.const 2432 + i32.const 3168 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 216 + i32.const 72 + i32.const 218 i32.const 0 call $~lib/env/abort unreachable end i64.const 868719476735 call $~lib/util/number/utoa64 - i32.const 2464 + i32.const 3208 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 217 + i32.const 72 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable end i64.const 999868719476735 call $~lib/util/number/utoa64 - i32.const 2496 + i32.const 3248 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 218 + i32.const 72 + i32.const 220 i32.const 0 call $~lib/env/abort unreachable end i64.const 9999868719476735 call $~lib/util/number/utoa64 - i32.const 2536 + i32.const 3296 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 219 + i32.const 72 + i32.const 221 i32.const 0 call $~lib/env/abort unreachable end i64.const 19999868719476735 call $~lib/util/number/utoa64 - i32.const 2576 + i32.const 3344 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 220 + i32.const 72 + i32.const 222 i32.const 0 call $~lib/env/abort unreachable end i64.const -1 call $~lib/util/number/utoa64 - i32.const 2624 + i32.const 3400 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 221 + i32.const 72 + i32.const 223 i32.const 0 call $~lib/env/abort unreachable end i64.const 0 call $~lib/util/number/itoa64 - i32.const 608 + i32.const 840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 223 + i32.const 72 + i32.const 225 i32.const 0 call $~lib/env/abort unreachable end i64.const -1234 call $~lib/util/number/itoa64 - i32.const 2672 + i32.const 3456 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 224 + i32.const 72 + i32.const 226 i32.const 0 call $~lib/env/abort unreachable end i64.const 4294967295 call $~lib/util/number/itoa64 - i32.const 2344 + i32.const 3056 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 225 + i32.const 72 + i32.const 227 i32.const 0 call $~lib/env/abort unreachable end i64.const -4294967295 call $~lib/util/number/itoa64 - i32.const 2696 + i32.const 3488 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 226 + i32.const 72 + i32.const 228 i32.const 0 call $~lib/env/abort unreachable end i64.const 68719476735 call $~lib/util/number/itoa64 - i32.const 2432 + i32.const 3168 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 227 + i32.const 72 + i32.const 229 i32.const 0 call $~lib/env/abort unreachable end i64.const -68719476735 call $~lib/util/number/itoa64 - i32.const 2728 + i32.const 3528 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 228 + i32.const 72 + i32.const 230 i32.const 0 call $~lib/env/abort unreachable end i64.const -868719476735 call $~lib/util/number/itoa64 - i32.const 2760 + i32.const 3568 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 229 + i32.const 72 + i32.const 231 i32.const 0 call $~lib/env/abort unreachable end i64.const -999868719476735 call $~lib/util/number/itoa64 - i32.const 2800 + i32.const 3616 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 230 + i32.const 72 + i32.const 232 i32.const 0 call $~lib/env/abort unreachable end i64.const -19999868719476735 call $~lib/util/number/itoa64 - i32.const 2840 + i32.const 3664 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 231 + i32.const 72 + i32.const 233 i32.const 0 call $~lib/env/abort unreachable end i64.const 9223372036854775807 call $~lib/util/number/itoa64 - i32.const 2888 + i32.const 3720 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 232 + i32.const 72 + i32.const 234 i32.const 0 call $~lib/env/abort unreachable end i64.const -9223372036854775808 call $~lib/util/number/itoa64 - i32.const 2936 + i32.const 3776 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 233 + i32.const 72 + i32.const 235 i32.const 0 call $~lib/env/abort unreachable end f64.const 0 call $~lib/util/number/dtoa - i32.const 2984 + i32.const 3832 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 236 + i32.const 72 + i32.const 238 i32.const 0 call $~lib/env/abort unreachable end f64.const -0 call $~lib/util/number/dtoa - i32.const 2984 + i32.const 3832 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 237 + i32.const 72 + i32.const 239 i32.const 0 call $~lib/env/abort unreachable end f64.const nan:0x8000000000000 call $~lib/util/number/dtoa - i32.const 3000 + i32.const 3856 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 238 + i32.const 72 + i32.const 240 i32.const 0 call $~lib/env/abort unreachable end f64.const inf call $~lib/util/number/dtoa - i32.const 3048 + i32.const 3920 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 239 + i32.const 72 + i32.const 241 i32.const 0 call $~lib/env/abort unreachable end f64.const -inf call $~lib/util/number/dtoa - i32.const 3016 + i32.const 3880 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 240 + i32.const 72 + i32.const 242 i32.const 0 call $~lib/env/abort unreachable end f64.const 2.220446049250313e-16 call $~lib/util/number/dtoa - i32.const 4080 + i32.const 5008 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 241 + i32.const 72 + i32.const 243 i32.const 0 call $~lib/env/abort unreachable end f64.const -2.220446049250313e-16 call $~lib/util/number/dtoa - i32.const 4136 + i32.const 5072 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 242 + i32.const 72 + i32.const 244 i32.const 0 call $~lib/env/abort unreachable end f64.const 1797693134862315708145274e284 call $~lib/util/number/dtoa - i32.const 4192 + i32.const 5136 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 243 + i32.const 72 + i32.const 245 i32.const 0 call $~lib/env/abort unreachable end f64.const -1797693134862315708145274e284 call $~lib/util/number/dtoa - i32.const 4248 + i32.const 5200 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 244 + i32.const 72 + i32.const 246 i32.const 0 call $~lib/env/abort unreachable end f64.const 4185580496821356722454785e274 call $~lib/util/number/dtoa - i32.const 4304 + i32.const 5264 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 245 + i32.const 72 + i32.const 247 i32.const 0 call $~lib/env/abort unreachable end f64.const 2.2250738585072014e-308 call $~lib/util/number/dtoa - i32.const 4360 + i32.const 5328 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 246 + i32.const 72 + i32.const 248 i32.const 0 call $~lib/env/abort unreachable end f64.const 4.940656e-318 call $~lib/util/number/dtoa - i32.const 4416 + i32.const 5392 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 249 + i32.const 72 + i32.const 251 i32.const 0 call $~lib/env/abort unreachable end f64.const 9060801153433600 call $~lib/util/number/dtoa - i32.const 4456 + i32.const 5440 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 250 + i32.const 72 + i32.const 252 i32.const 0 call $~lib/env/abort unreachable end f64.const 4708356024711512064 call $~lib/util/number/dtoa - i32.const 4504 + i32.const 5496 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 251 + i32.const 72 + i32.const 253 i32.const 0 call $~lib/env/abort unreachable end f64.const 9409340012568248320 call $~lib/util/number/dtoa - i32.const 4560 + i32.const 5560 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 252 + i32.const 72 + i32.const 254 i32.const 0 call $~lib/env/abort unreachable end f64.const 5e-324 call $~lib/util/number/dtoa - i32.const 4616 + i32.const 5624 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 253 + i32.const 72 + i32.const 255 i32.const 0 call $~lib/env/abort unreachable end f64.const 1 call $~lib/util/number/dtoa - i32.const 4640 + i32.const 5656 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 259 + i32.const 72 + i32.const 261 i32.const 0 call $~lib/env/abort unreachable end f64.const 0.1 call $~lib/util/number/dtoa - i32.const 768 + i32.const 1064 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 260 + i32.const 72 + i32.const 262 i32.const 0 call $~lib/env/abort unreachable end f64.const -1 call $~lib/util/number/dtoa - i32.const 4656 + i32.const 5680 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 261 + i32.const 72 + i32.const 263 i32.const 0 call $~lib/env/abort unreachable end f64.const -0.1 call $~lib/util/number/dtoa - i32.const 4672 + i32.const 5704 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 262 + i32.const 72 + i32.const 264 i32.const 0 call $~lib/env/abort unreachable end f64.const 1e6 call $~lib/util/number/dtoa - i32.const 4688 + i32.const 5728 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 264 + i32.const 72 + i32.const 266 i32.const 0 call $~lib/env/abort unreachable end f64.const 1e-06 call $~lib/util/number/dtoa - i32.const 4720 + i32.const 5768 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 265 + i32.const 72 + i32.const 267 i32.const 0 call $~lib/env/abort unreachable end f64.const -1e6 call $~lib/util/number/dtoa - i32.const 4744 + i32.const 5800 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 266 + i32.const 72 + i32.const 268 i32.const 0 call $~lib/env/abort unreachable end f64.const -1e-06 call $~lib/util/number/dtoa - i32.const 4776 + i32.const 5840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 267 + i32.const 72 + i32.const 269 i32.const 0 call $~lib/env/abort unreachable end f64.const 1e7 call $~lib/util/number/dtoa - i32.const 4808 + i32.const 5880 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 268 + i32.const 72 + i32.const 270 i32.const 0 call $~lib/env/abort unreachable end f64.const 1e-07 call $~lib/util/number/dtoa - i32.const 4840 + i32.const 5920 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 269 + i32.const 72 + i32.const 271 i32.const 0 call $~lib/env/abort unreachable end f64.const 1.e+308 call $~lib/util/number/dtoa - i32.const 4856 + i32.const 5944 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 271 + i32.const 72 + i32.const 273 i32.const 0 call $~lib/env/abort unreachable end f64.const -1.e+308 call $~lib/util/number/dtoa - i32.const 4880 + i32.const 5976 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 272 + i32.const 72 + i32.const 274 i32.const 0 call $~lib/env/abort unreachable end f64.const inf call $~lib/util/number/dtoa - i32.const 3048 + i32.const 3920 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 273 + i32.const 72 + i32.const 275 i32.const 0 call $~lib/env/abort unreachable end f64.const -inf call $~lib/util/number/dtoa - i32.const 3016 + i32.const 3880 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 274 + i32.const 72 + i32.const 276 i32.const 0 call $~lib/env/abort unreachable end f64.const 1e-308 call $~lib/util/number/dtoa - i32.const 4904 + i32.const 6008 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 275 + i32.const 72 + i32.const 277 i32.const 0 call $~lib/env/abort unreachable end f64.const -1e-308 call $~lib/util/number/dtoa - i32.const 4928 + i32.const 6040 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 276 + i32.const 72 + i32.const 278 i32.const 0 call $~lib/env/abort unreachable end f64.const 1e-323 call $~lib/util/number/dtoa - i32.const 4952 + i32.const 6072 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 277 + i32.const 72 + i32.const 279 i32.const 0 call $~lib/env/abort unreachable end f64.const -1e-323 call $~lib/util/number/dtoa - i32.const 4976 + i32.const 6104 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 278 + i32.const 72 + i32.const 280 i32.const 0 call $~lib/env/abort unreachable end f64.const 0 call $~lib/util/number/dtoa - i32.const 2984 + i32.const 3832 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 279 + i32.const 72 + i32.const 281 i32.const 0 call $~lib/env/abort unreachable end f64.const 4294967272 call $~lib/util/number/dtoa - i32.const 5000 + i32.const 6136 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 281 + i32.const 72 + i32.const 283 i32.const 0 call $~lib/env/abort unreachable end f64.const 1.2312145673456234e-08 call $~lib/util/number/dtoa - i32.const 5032 + i32.const 6176 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 282 + i32.const 72 + i32.const 284 i32.const 0 call $~lib/env/abort unreachable end f64.const 555555555.5555556 call $~lib/util/number/dtoa - i32.const 5088 + i32.const 6240 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 284 + i32.const 72 + i32.const 286 i32.const 0 call $~lib/env/abort unreachable end f64.const 0.9999999999999999 call $~lib/util/number/dtoa - i32.const 5136 + i32.const 6296 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 285 + i32.const 72 + i32.const 287 i32.const 0 call $~lib/env/abort unreachable end f64.const 1 call $~lib/util/number/dtoa - i32.const 4640 + i32.const 5656 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 286 + i32.const 72 + i32.const 288 i32.const 0 call $~lib/env/abort unreachable end f64.const 12.34 call $~lib/util/number/dtoa - i32.const 5184 + i32.const 6352 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 287 + i32.const 72 + i32.const 289 i32.const 0 call $~lib/env/abort unreachable end f64.const 0.3333333333333333 call $~lib/util/number/dtoa - i32.const 5208 + i32.const 6384 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 289 + i32.const 72 + i32.const 291 i32.const 0 call $~lib/env/abort unreachable end f64.const 1234e17 call $~lib/util/number/dtoa - i32.const 5256 + i32.const 6440 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 290 + i32.const 72 + i32.const 292 i32.const 0 call $~lib/env/abort unreachable end f64.const 1234e18 call $~lib/util/number/dtoa - i32.const 5312 + i32.const 6504 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 291 + i32.const 72 + i32.const 293 i32.const 0 call $~lib/env/abort unreachable end f64.const 2.71828 call $~lib/util/number/dtoa - i32.const 5344 + i32.const 6544 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 292 + i32.const 72 + i32.const 294 i32.const 0 call $~lib/env/abort unreachable end f64.const 0.0271828 call $~lib/util/number/dtoa - i32.const 5368 + i32.const 6576 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 293 + i32.const 72 + i32.const 295 i32.const 0 call $~lib/env/abort unreachable end f64.const 271.828 call $~lib/util/number/dtoa - i32.const 5400 + i32.const 6616 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 294 + i32.const 72 + i32.const 296 i32.const 0 call $~lib/env/abort unreachable end f64.const 1.1e+128 call $~lib/util/number/dtoa - i32.const 5424 + i32.const 6648 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 295 + i32.const 72 + i32.const 297 i32.const 0 call $~lib/env/abort unreachable end f64.const 1.1e-64 call $~lib/util/number/dtoa - i32.const 5448 + i32.const 6680 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 296 + i32.const 72 + i32.const 298 i32.const 0 call $~lib/env/abort unreachable end f64.const 0.000035689 call $~lib/util/number/dtoa - i32.const 5472 + i32.const 6712 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 297 + i32.const 72 + i32.const 299 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.ts b/tests/compiler/std/string.ts index 5642cfb2e3..e448e0f3d0 100644 --- a/tests/compiler/std/string.ts +++ b/tests/compiler/std/string.ts @@ -1,4 +1,6 @@ import "allocator/arena"; +import "collector/dummy"; + import { utoa32, itoa32, diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 55cfeb8d6c..3a3b500dbb 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -9,187 +9,188 @@ (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$di (func (param i32) (result f64))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) + (type $FUNCSIG$jii (func (param i32 i32) (result i64))) (type $FUNCSIG$iijijiji (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00 \00\00\00h\00i\00,\00 \00I\00\'\00m\00 \00a\00 \00s\00t\00r\00i\00n\00g\00") - (data (i32.const 48) "\01\00\00\00\1a\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 88) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 128) "\01\00\00\00\02\00\00\00\00\00") - (data (i32.const 144) "\01\00\00\00\02\00\00\006\00") - (data (i32.const 160) "\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 200) "\01\00\00\00\04\00\00\004\d8\06\df") - (data (i32.const 216) "\01\00\00\00\04\00\00\00h\00i\00") - (data (i32.const 232) "\01\00\00\00\08\00\00\00n\00u\00l\00l\00") - (data (i32.const 248) "\01\00\00\00\0c\00\00\00s\00t\00r\00i\00n\00g\00") - (data (i32.const 272) "\01\00\00\00\06\00\00\00I\00\'\00m\00") - (data (i32.const 288) "\01\00\00\00\02\00\00\00 \00") - (data (i32.const 304) "\01\00\00\00\00\00\00\00") - (data (i32.const 312) "\01\00\00\00\06\00\00\00 \00 \00 \00") - (data (i32.const 328) "\01\00\00\00\02\00\00\00a\00") - (data (i32.const 344) "\01\00\00\00\06\00\00\00a\00b\00c\00") - (data (i32.const 360) "\01\00\00\00\n\00\00\00 \00 \00a\00b\00c\00") - (data (i32.const 384) "\01\00\00\00\06\00\00\001\002\003\00") - (data (i32.const 400) "\01\00\00\00\0c\00\00\001\002\003\00a\00b\00c\00") - (data (i32.const 424) "\01\00\00\00\10\00\00\001\002\003\001\002\00a\00b\00c\00") - (data (i32.const 448) "\01\00\00\00\n\00\00\00a\00b\00c\00 \00 \00") - (data (i32.const 472) "\01\00\00\00\0c\00\00\00a\00b\00c\00a\00b\00c\00") - (data (i32.const 496) "\01\00\00\00\10\00\00\00a\00b\00c\00a\00b\00c\00a\00b\00") - (data (i32.const 520) "\01\00\00\00\02\00\00\00,\00") - (data (i32.const 536) "\01\00\00\00\02\00\00\00x\00") - (data (i32.const 552) "\01\00\00\00\06\00\00\00,\00 \00I\00") - (data (i32.const 568) "\01\00\00\00\02\00\00\00g\00") - (data (i32.const 584) "\01\00\00\00\02\00\00\00i\00") - (data (i32.const 600) "\01\00\00\00\02\00\00\000\00") - (data (i32.const 616) "\01\00\00\00\02\00\00\001\00") - (data (i32.const 632) "\01\00\00\00\n\00\00\000\00b\001\000\001\00") - (data (i32.const 656) "\01\00\00\00\n\00\00\000\00o\007\000\007\00") - (data (i32.const 680) "\01\00\00\00\n\00\00\000\00x\00f\000\00f\00") - (data (i32.const 704) "\01\00\00\00\n\00\00\000\00x\00F\000\00F\00") - (data (i32.const 728) "\01\00\00\00\06\00\00\000\001\001\00") - (data (i32.const 744) "\01\00\00\00\08\00\00\000\00x\001\00g\00") - (data (i32.const 760) "\01\00\00\00\06\00\00\000\00.\001\00") - (data (i32.const 776) "\01\00\00\00\06\00\00\00.\002\005\00") - (data (i32.const 792) "\01\00\00\00\10\00\00\00.\001\00f\00o\00o\00b\00a\00r\00") - (data (i32.const 816) "\01\00\00\00\02\00\00\00b\00") - (data (i32.const 832) "\01\00\00\00\04\00\00\00a\00b\00") - (data (i32.const 848) "\01\00\00\00\08\00\00\00k\00e\00y\001\00") - (data (i32.const 864) "\01\00\00\00\08\00\00\00k\00e\00y\002\00") - (data (i32.const 880) "\01\00\00\00\06\00\00\00k\00e\001\00") - (data (i32.const 896) "\01\00\00\00\06\00\00\00k\00e\002\00") - (data (i32.const 912) "\01\00\00\00\n\00\00\00k\00e\00y\001\002\00") - (data (i32.const 936) "\01\00\00\00\n\00\00\00k\00e\00y\001\001\00") - (data (i32.const 960) "\01\00\00\00\0e\00\00\00\a40\ed0\cf0\cb0\db0\d80\c80") - (data (i32.const 984) "\01\00\00\00\0e\00\00\00\a60\f00\ce0\aa0\af0\e40\de0") - (data (i32.const 1008) "\01\00\00\00\16\00\00\00D\00\19 f\00h\00u\00a\00s\00c\00a\00i\00l\00") - (data (i32.const 1040) "\01\00\00\00\14\00\00\00D\00\19 \1f\1eu\00a\00s\00c\00a\00i\00l\00") - (data (i32.const 1072) "\01\00\00\00\04\00\00\00b\00a\00") - (data (i32.const 1088) "\01\00\00\00\04\00\00\00a\00a\00") - (data (i32.const 1104) "\01\00\00\00\06\00\00\00a\00a\00a\00") - (data (i32.const 1120) "\01\00\00\00\10\00\00\00a\00b\00a\00b\00a\00b\00a\00b\00") - (data (i32.const 1144) "\01\00\00\00\n\00\00\00a\00a\00a\00a\00a\00") - (data (i32.const 1168) "\01\00\00\00\0c\00\00\00a\00a\00a\00a\00a\00a\00") - (data (i32.const 1192) "\01\00\00\00\0e\00\00\00a\00a\00a\00a\00a\00a\00a\00") - (data (i32.const 1216) "\01\00\00\00\1c\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00") - (data (i32.const 1256) "\01\00\00\00\02\00\00\00n\00") - (data (i32.const 1272) "\01\00\00\00\n\00\00\00j\00k\00l\00m\00n\00") - (data (i32.const 1296) "\01\00\00\00\n\00\00\00c\00d\00e\00f\00g\00") - (data (i32.const 1320) "\01\00\00\00\n\00\00\00d\00e\00f\00g\00h\00") - (data (i32.const 1344) "\01\00\00\00\1a\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00") - (data (i32.const 1384) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 1424) "\01\00\00\00\n\00\00\00a\00,\00b\00,\00c\00") - (data (i32.const 1448) "\01\00\00\00\02\00\00\00.\00") - (data (i32.const 1464) "\01\00\00\00\02\00\00\00c\00") - (data (i32.const 1480) "\01\00\00\00\0e\00\00\00a\00,\00 \00b\00,\00 \00c\00") - (data (i32.const 1504) "\01\00\00\00\04\00\00\00,\00 \00") - (data (i32.const 1520) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00,\00c\00") - (data (i32.const 1544) "\01\00\00\00\0c\00\00\00,\00a\00,\00b\00,\00c\00") - (data (i32.const 1568) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00c\00,\00") - (data (i32.const 1592) "\03\00\00\00\90\01\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") - (data (i32.const 2000) "\04\00\00\00\10\00\00\00@\06\00\00@\06\00\00\90\01\00\00d\00\00\00") - (data (i32.const 2024) "\01\00\00\00\02\00\00\008\00") - (data (i32.const 2040) "\01\00\00\00\n\00\00\00-\001\000\000\000\00") - (data (i32.const 2064) "\01\00\00\00\08\00\00\001\002\003\004\00") - (data (i32.const 2080) "\01\00\00\00\n\00\00\001\002\003\004\005\00") - (data (i32.const 2104) "\01\00\00\00\0c\00\00\001\002\003\004\005\006\00") - (data (i32.const 2128) "\01\00\00\00\0e\00\00\001\001\001\001\001\001\001\00") - (data (i32.const 2152) "\01\00\00\00\0e\00\00\001\002\003\004\005\006\007\00") - (data (i32.const 2176) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\006\00") - (data (i32.const 2208) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\007\00") - (data (i32.const 2240) "\01\00\00\00\16\00\00\00-\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 2272) "\01\00\00\00\04\00\00\00-\001\00") - (data (i32.const 2288) "\01\00\00\00\08\00\00\001\000\000\000\00") - (data (i32.const 2304) "\01\00\00\00\14\00\00\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 2336) "\01\00\00\00\14\00\00\004\002\009\004\009\006\007\002\009\005\00") - (data (i32.const 2368) "\01\00\00\00\10\00\00\009\009\009\009\009\009\009\009\00") - (data (i32.const 2392) "\01\00\00\00\12\00\00\001\000\000\000\000\000\000\000\000\00") - (data (i32.const 2424) "\01\00\00\00\16\00\00\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2456) "\01\00\00\00\18\00\00\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2488) "\01\00\00\00\1e\00\00\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2528) "\01\00\00\00 \00\00\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2568) "\01\00\00\00\"\00\00\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2616) "\01\00\00\00(\00\00\001\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005\00") - (data (i32.const 2664) "\01\00\00\00\n\00\00\00-\001\002\003\004\00") - (data (i32.const 2688) "\01\00\00\00\16\00\00\00-\004\002\009\004\009\006\007\002\009\005\00") - (data (i32.const 2720) "\01\00\00\00\18\00\00\00-\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2752) "\01\00\00\00\1a\00\00\00-\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2792) "\01\00\00\00 \00\00\00-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2832) "\01\00\00\00$\00\00\00-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2880) "\01\00\00\00&\00\00\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007\00") - (data (i32.const 2928) "\01\00\00\00(\00\00\00-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008\00") - (data (i32.const 2976) "\01\00\00\00\06\00\00\000\00.\000\00") - (data (i32.const 2992) "\01\00\00\00\06\00\00\00N\00a\00N\00") - (data (i32.const 3008) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 3040) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 3064) "\03\00\00\00\b8\02\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8#push (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 i32.load offset=12 + local.set $2 + local.get $2 i32.const 1 i32.add - local.set $2 + local.set $3 local.get $0 - local.get $2 + local.get $3 i32.const 2 call $~lib/array/ensureCapacity local.get $0 + i32.load offset=4 local.get $2 + i32.const 2 + i32.shl + i32.add + local.set $4 + local.get $4 + i32.load + local.set $5 + local.get $5 + local.get $1 + i32.ne + if + local.get $4 + local.get $1 + i32.store + local.get $1 + local.get $0 + call $~lib/collector/dummy/__ref_link + local.get $5 + i32.const 0 + i32.ne + if + local.get $5 + local.get $0 + call $~lib/collector/dummy/__ref_unlink + end + end + local.get $0 + local.get $3 i32.store offset=12 + local.get $3 + ) + (func $~lib/array/Array#__unchecked_set (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 i32.load offset=4 - local.get $2 - i32.const 1 - i32.sub + local.get $1 i32.const 2 i32.shl i32.add - local.get $1 - i32.store + local.set $3 + local.get $3 + i32.load + local.set $4 local.get $2 + local.get $4 + i32.ne + if + local.get $3 + local.get $2 + i32.store + local.get $4 + i32.const 0 + i32.ne + if + local.get $4 + local.get $0 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $0 + call $~lib/collector/dummy/__ref_link + end ) - (func $~lib/string/String#split (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3982,8 +4108,8 @@ i32.eqz if i32.const 0 - i32.const 168 - i32.const 348 + i32.const 216 + i32.const 350 i32.const 4 call $~lib/env/abort unreachable @@ -4000,7 +4126,7 @@ local.get $3 i32.const 2 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end return end @@ -4018,14 +4144,21 @@ local.get $6 i32.const 2 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $3 local.get $3 i32.load offset=4 local.set $4 local.get $4 - local.get $0 + block (result i32) + local.get $0 + local.set $6 + local.get $6 + local.get $3 + call $~lib/collector/dummy/__ref_link + local.get $6 + end i32.store local.get $3 end @@ -4059,7 +4192,7 @@ local.get $4 i32.const 2 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end return end @@ -4081,7 +4214,7 @@ local.get $4 i32.const 2 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $4 local.get $4 @@ -4102,12 +4235,12 @@ i32.const 2 local.set $9 local.get $9 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $5 local.get $5 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $5 local.get $5 @@ -4125,6 +4258,9 @@ i32.add local.get $5 i32.store + local.get $5 + local.get $4 + call $~lib/collector/dummy/__ref_link end local.get $6 i32.const 1 @@ -4150,12 +4286,12 @@ local.get $3 i32.const 2 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $3 local.get $3 i32.load offset=4 - i32.const 312 + i32.const 416 i32.store local.get $3 return @@ -4170,7 +4306,7 @@ local.get $3 i32.const 2 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $10 i32.const 0 @@ -4210,7 +4346,7 @@ i32.shl local.set $4 local.get $4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $4 local.get $4 @@ -4229,13 +4365,13 @@ local.set $6 local.get $6 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end call $~lib/array/Array#push drop else local.get $10 - i32.const 312 + i32.const 416 call $~lib/array/Array#push drop end @@ -4270,13 +4406,13 @@ local.get $3 i32.const 2 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end local.set $3 local.get $3 - i32.load offset=4 + i32.const 0 local.get $0 - i32.store + call $~lib/array/Array#__unchecked_set local.get $3 return end @@ -4294,7 +4430,7 @@ i32.shl local.set $3 local.get $3 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $3 local.get $3 @@ -4313,31 +4449,40 @@ local.set $4 local.get $4 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end call $~lib/array/Array#push drop else local.get $10 - i32.const 312 + i32.const 416 call $~lib/array/Array#push drop end local.get $10 ) - (func $~lib/array/Array#get:length (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $~lib/array/Array#__get (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 i32.ge_u if i32.const 0 - i32.const 1392 - i32.const 97 + i32.const 1912 + i32.const 95 i32.const 45 call $~lib/env/abort unreachable @@ -4350,21 +4495,17 @@ i32.ge_u if i32.const 0 - i32.const 1392 - i32.const 100 + i32.const 1912 + i32.const 98 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 + call $~lib/array/Array#__unchecked_get ) - (func $~lib/util/number/decimalCount32 (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -4433,7 +4574,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa32_lut (; 43 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 47 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4441,7 +4582,7 @@ (local $7 i32) (local $8 i64) (local $9 i64) - i32.const 2008 + i32.const 2608 i32.load offset=4 local.set $3 block $break|0 @@ -4576,7 +4717,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4586,7 +4727,7 @@ local.get $0 i32.eqz if - i32.const 608 + i32.const 840 return end local.get $0 @@ -4611,7 +4752,7 @@ i32.shl local.set $3 local.get $3 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $4 block $~lib/util/number/utoa32_core|inlined.0 @@ -4637,10 +4778,10 @@ local.set $3 local.get $3 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/util/number/utoa32 (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4649,7 +4790,7 @@ local.get $0 i32.eqz if - i32.const 608 + i32.const 840 return end local.get $0 @@ -4661,7 +4802,7 @@ i32.shl local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $3 block $~lib/util/number/utoa32_core|inlined.1 @@ -4681,10 +4822,10 @@ local.set $2 local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/util/number/decimalCount64 (; 46 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 50 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -4753,7 +4894,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 47 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 51 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -4765,7 +4906,7 @@ (local $11 i32) (local $12 i64) (local $13 i64) - i32.const 2008 + i32.const 2608 i32.load offset=4 local.set $3 block $break|0 @@ -4881,7 +5022,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 48 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 52 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4892,7 +5033,7 @@ local.get $0 i64.eqz if - i32.const 608 + i32.const 840 return end local.get $0 @@ -4912,7 +5053,7 @@ i32.shl local.set $4 local.get $4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 block $~lib/util/number/utoa32_core|inlined.2 @@ -4937,7 +5078,7 @@ i32.shl local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 block $~lib/util/number/utoa64_core|inlined.0 @@ -4958,10 +5099,10 @@ local.set $3 local.get $3 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/util/number/itoa64 (; 49 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 53 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4973,7 +5114,7 @@ local.get $0 i64.eqz if - i32.const 608 + i32.const 840 return end local.get $0 @@ -5006,7 +5147,7 @@ i32.shl local.set $5 local.get $5 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 block $~lib/util/number/utoa32_core|inlined.3 @@ -5033,7 +5174,7 @@ i32.shl local.set $3 local.get $3 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 block $~lib/util/number/utoa64_core|inlined.1 @@ -5060,22 +5201,40 @@ local.set $4 local.get $4 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/builtins/isFinite (; 50 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 54 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 51 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 55 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/util/number/genDigits (; 52 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 56 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $~lib/array/Array#__unchecked_get (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + ) + (func $~lib/util/number/genDigits (; 58 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -5131,7 +5290,7 @@ local.set $14 local.get $6 local.set $15 - i32.const 4056 + i32.const 4976 i32.load offset=4 local.set $16 block $break|0 @@ -5646,7 +5805,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5979,7 +6138,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 54 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 60 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -6148,21 +6307,13 @@ i32.shl i32.sub global.set $~lib/util/number/_K - i32.const 3776 - i32.load offset=4 + i32.const 4664 local.get $13 - i32.const 3 - i32.shl - i32.add - i64.load + call $~lib/array/Array#__unchecked_get global.set $~lib/util/number/_frc_pow - i32.const 3984 - i32.load offset=4 + i32.const 4888 local.get $13 - i32.const 1 - i32.shl - i32.add - i32.load16_s + call $~lib/array/Array#__unchecked_get global.set $~lib/util/number/_exp_pow end local.get $9 @@ -6425,7 +6576,7 @@ local.get $2 i32.add ) - (func $~lib/string/String#substring (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6440,8 +6591,8 @@ i32.eqz if i32.const 0 - i32.const 168 - i32.const 187 + i32.const 216 + i32.const 189 i32.const 4 call $~lib/env/abort unreachable @@ -6510,7 +6661,7 @@ local.get $3 i32.eqz if - i32.const 312 + i32.const 416 return end local.get $8 @@ -6534,7 +6685,7 @@ local.get $3 local.set $4 local.get $4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $10 local.get $10 @@ -6548,41 +6699,67 @@ local.set $4 local.get $4 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/runtime/doDiscard (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - call $~lib/memory/memory.free - ) - (func $~lib/util/number/dtoa (; 57 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/runtime/discard (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) local.get $0 - f64.const 0 - f64.eq + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz if - i32.const 2984 - return + i32.const 0 + i32.const 120 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable end local.get $0 - call $~lib/builtins/isFinite - i32.eqz - if + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.set $1 + local.get $1 + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 187 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/memory/memory.free + ) + (func $~lib/util/number/dtoa (; 63 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + f64.const 0 + f64.eq + if + i32.const 3832 + return + end + local.get $0 + call $~lib/builtins/isFinite + i32.eqz + if local.get $0 call $~lib/builtins/isNaN if - i32.const 3000 + i32.const 3856 return end - i32.const 3016 - i32.const 3048 + i32.const 3880 + i32.const 3920 local.get $0 f64.const 0 f64.lt @@ -6595,7 +6772,7 @@ i32.shl local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 @@ -6611,22 +6788,22 @@ local.get $2 local.set $1 local.get $1 - call $~lib/runtime/doDiscard + call $~lib/runtime/discard end local.get $4 ) - (func $start:std/string (; 58 ;) (type $FUNCSIG$v) + (func $start:std/string (; 64 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) global.get $std/string/str - i32.const 16 + i32.const 24 i32.eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 16 + i32.const 72 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -6638,8 +6815,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 18 + i32.const 72 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -6652,8 +6829,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 19 + i32.const 72 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -6670,26 +6847,26 @@ global.set $~lib/allocator/arena/offset i32.const 0 call $~lib/string/String.fromCharCode - i32.const 136 + i32.const 168 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 21 + i32.const 72 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable end i32.const 54 call $~lib/string/String.fromCharCode - i32.const 152 + i32.const 192 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 22 + i32.const 72 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -6698,39 +6875,39 @@ i32.const 54 i32.add call $~lib/string/String.fromCharCode - i32.const 152 + i32.const 192 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 23 + i32.const 72 + i32.const 25 i32.const 0 call $~lib/env/abort unreachable end i32.const 0 call $~lib/string/String.fromCodePoint - i32.const 136 + i32.const 168 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 25 + i32.const 72 + i32.const 27 i32.const 0 call $~lib/env/abort unreachable end i32.const 54 call $~lib/string/String.fromCodePoint - i32.const 152 + i32.const 192 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 26 + i32.const 72 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -6739,35 +6916,35 @@ call $~lib/string/String.fromCodePoint i32.eqz if - i32.const 208 - i32.const 56 - i32.const 27 + i32.const 264 + i32.const 72 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 224 + i32.const 288 i32.const 0 call $~lib/string/String#startsWith i32.eqz if i32.const 0 - i32.const 56 - i32.const 29 + i32.const 72 + i32.const 31 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 256 + i32.const 336 global.get $~lib/string/String.MAX_LENGTH call $~lib/string/String#endsWith i32.eqz if i32.const 0 - i32.const 56 - i32.const 30 + i32.const 72 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -6775,7 +6952,7 @@ block $~lib/string/String#includes|inlined.0 (result i32) global.get $std/string/str local.set $2 - i32.const 280 + i32.const 368 local.set $1 i32.const 0 local.set $0 @@ -6791,254 +6968,254 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 31 + i32.const 72 + i32.const 33 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str i32.const 0 - i32.const 296 + i32.const 392 call $~lib/string/String#padStart global.get $std/string/str call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 33 + i32.const 72 + i32.const 35 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str i32.const 15 - i32.const 296 + i32.const 392 call $~lib/string/String#padStart global.get $std/string/str call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 34 + i32.const 72 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 + i32.const 416 i32.const 3 - i32.const 296 + i32.const 392 call $~lib/string/String#padStart - i32.const 320 + i32.const 432 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 35 + i32.const 72 + i32.const 37 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 + i32.const 416 i32.const 10 - i32.const 312 + i32.const 416 call $~lib/string/String#padStart - i32.const 312 + i32.const 416 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 36 + i32.const 72 + i32.const 38 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 + i32.const 456 i32.const 100 - i32.const 312 + i32.const 416 call $~lib/string/String#padStart - i32.const 336 + i32.const 456 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 37 + i32.const 72 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 + i32.const 480 i32.const 5 - i32.const 296 + i32.const 392 call $~lib/string/String#padStart - i32.const 368 + i32.const 504 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 38 + i32.const 72 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 + i32.const 480 i32.const 6 - i32.const 392 + i32.const 536 call $~lib/string/String#padStart - i32.const 408 + i32.const 560 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 39 + i32.const 72 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 + i32.const 480 i32.const 8 - i32.const 392 + i32.const 536 call $~lib/string/String#padStart - i32.const 432 + i32.const 592 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 40 + i32.const 72 + i32.const 42 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str i32.const 0 - i32.const 296 + i32.const 392 call $~lib/string/String#padEnd global.get $std/string/str call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 42 + i32.const 72 + i32.const 44 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str i32.const 15 - i32.const 296 + i32.const 392 call $~lib/string/String#padEnd global.get $std/string/str call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 43 + i32.const 72 + i32.const 45 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 + i32.const 416 i32.const 3 - i32.const 296 + i32.const 392 call $~lib/string/String#padEnd - i32.const 320 + i32.const 432 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 44 + i32.const 72 + i32.const 46 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 + i32.const 416 i32.const 10 - i32.const 312 + i32.const 416 call $~lib/string/String#padEnd - i32.const 312 + i32.const 416 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 45 + i32.const 72 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 + i32.const 456 i32.const 100 - i32.const 312 + i32.const 416 call $~lib/string/String#padEnd - i32.const 336 + i32.const 456 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 46 + i32.const 72 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 + i32.const 480 i32.const 5 - i32.const 296 + i32.const 392 call $~lib/string/String#padEnd - i32.const 456 + i32.const 624 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 47 + i32.const 72 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 + i32.const 480 i32.const 6 - i32.const 352 - call $~lib/string/String#padEnd i32.const 480 + call $~lib/string/String#padEnd + i32.const 656 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 48 + i32.const 72 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 + i32.const 480 i32.const 8 - i32.const 352 + i32.const 480 call $~lib/string/String#padEnd - i32.const 504 + i32.const 688 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 49 + i32.const 72 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 312 + i32.const 416 + i32.const 416 i32.const 0 call $~lib/string/String#indexOf i32.const 0 @@ -7046,14 +7223,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 51 + i32.const 72 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 224 + i32.const 416 + i32.const 288 i32.const 0 call $~lib/string/String#indexOf i32.const -1 @@ -7061,14 +7238,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 52 + i32.const 72 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 - i32.const 336 + i32.const 456 + i32.const 456 i32.const 0 call $~lib/string/String#indexOf i32.const 0 @@ -7076,8 +7253,8 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 53 + i32.const 72 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable @@ -7091,14 +7268,14 @@ i32.eqz if i32.const 0 + i32.const 72 i32.const 56 - i32.const 54 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 312 + i32.const 416 i32.const 0 call $~lib/string/String#indexOf i32.const 0 @@ -7106,14 +7283,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 55 + i32.const 72 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 528 + i32.const 720 i32.const 0 call $~lib/string/String#indexOf i32.const 2 @@ -7121,14 +7298,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 56 + i32.const 72 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 544 + i32.const 744 i32.const 0 call $~lib/string/String#indexOf i32.const -1 @@ -7136,14 +7313,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 57 + i32.const 72 + i32.const 59 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 528 + i32.const 720 i32.const 2 call $~lib/string/String#indexOf i32.const 2 @@ -7151,14 +7328,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 58 + i32.const 72 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 528 + i32.const 720 i32.const 3 call $~lib/string/String#indexOf i32.const -1 @@ -7166,14 +7343,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 59 + i32.const 72 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 560 + i32.const 768 i32.const -1 call $~lib/string/String#indexOf i32.const 2 @@ -7181,14 +7358,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 60 + i32.const 72 + i32.const 62 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 312 + i32.const 416 + i32.const 416 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#lastIndexOf i32.const 0 @@ -7196,14 +7373,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 62 + i32.const 72 + i32.const 64 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 224 + i32.const 416 + i32.const 288 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#lastIndexOf i32.const -1 @@ -7211,14 +7388,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 63 + i32.const 72 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 312 + i32.const 416 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#lastIndexOf global.get $std/string/str @@ -7227,14 +7404,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 64 + i32.const 72 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 528 + i32.const 720 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#lastIndexOf i32.const 2 @@ -7242,14 +7419,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 65 + i32.const 72 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 544 + i32.const 744 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#lastIndexOf i32.const -1 @@ -7257,14 +7434,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 66 + i32.const 72 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 576 + i32.const 792 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#lastIndexOf i32.const 15 @@ -7272,14 +7449,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 67 + i32.const 72 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 528 + i32.const 720 i32.const 2 call $~lib/string/String#lastIndexOf i32.const 2 @@ -7287,14 +7464,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 68 + i32.const 72 + i32.const 70 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 528 + i32.const 720 i32.const 3 call $~lib/string/String#lastIndexOf i32.const 2 @@ -7302,14 +7479,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 69 + i32.const 72 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 560 + i32.const 768 i32.const -1 call $~lib/string/String#lastIndexOf i32.const -1 @@ -7317,14 +7494,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 70 + i32.const 72 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 592 + i32.const 816 i32.const 0 call $~lib/string/String#lastIndexOf i32.const -1 @@ -7332,14 +7509,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 71 + i32.const 72 + i32.const 73 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/str - i32.const 224 + i32.const 288 i32.const 0 call $~lib/string/String#lastIndexOf i32.const 0 @@ -7347,13 +7524,13 @@ i32.eqz if i32.const 0 - i32.const 56 i32.const 72 + i32.const 74 i32.const 0 call $~lib/env/abort unreachable end - i32.const 608 + i32.const 840 i32.const 0 call $~lib/string/parseInt f64.const 0 @@ -7361,13 +7538,13 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 78 + i32.const 72 + i32.const 80 i32.const 0 call $~lib/env/abort unreachable end - i32.const 624 + i32.const 864 i32.const 0 call $~lib/string/parseInt f64.const 1 @@ -7375,13 +7552,13 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 79 + i32.const 72 + i32.const 81 i32.const 0 call $~lib/env/abort unreachable end - i32.const 640 + i32.const 888 i32.const 0 call $~lib/string/parseInt f64.const 5 @@ -7389,13 +7566,13 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 80 + i32.const 72 + i32.const 82 i32.const 0 call $~lib/env/abort unreachable end - i32.const 664 + i32.const 920 i32.const 0 call $~lib/string/parseInt f64.const 455 @@ -7403,13 +7580,13 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 81 + i32.const 72 + i32.const 83 i32.const 0 call $~lib/env/abort unreachable end - i32.const 688 + i32.const 952 i32.const 0 call $~lib/string/parseInt f64.const 3855 @@ -7417,13 +7594,13 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 82 + i32.const 72 + i32.const 84 i32.const 0 call $~lib/env/abort unreachable end - i32.const 712 + i32.const 984 i32.const 0 call $~lib/string/parseInt f64.const 3855 @@ -7431,13 +7608,13 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 83 + i32.const 72 + i32.const 85 i32.const 0 call $~lib/env/abort unreachable end - i32.const 736 + i32.const 1016 i32.const 0 call $~lib/string/parseInt f64.const 11 @@ -7445,13 +7622,13 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 84 + i32.const 72 + i32.const 86 i32.const 0 call $~lib/env/abort unreachable end - i32.const 752 + i32.const 1040 i32.const 0 call $~lib/string/parseInt f64.const 1 @@ -7459,456 +7636,456 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 85 + i32.const 72 + i32.const 87 i32.const 0 call $~lib/env/abort unreachable end - i32.const 608 + i32.const 840 call $~lib/string/parseFloat f64.const 0 f64.eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 87 + i32.const 72 + i32.const 89 i32.const 0 call $~lib/env/abort unreachable end - i32.const 624 + i32.const 864 call $~lib/string/parseFloat f64.const 1 f64.eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 88 + i32.const 72 + i32.const 90 i32.const 0 call $~lib/env/abort unreachable end - i32.const 768 + i32.const 1064 call $~lib/string/parseFloat f64.const 0.1 f64.eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 89 + i32.const 72 + i32.const 91 i32.const 0 call $~lib/env/abort unreachable end - i32.const 784 + i32.const 1088 call $~lib/string/parseFloat f64.const 0.25 f64.eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 90 + i32.const 72 + i32.const 92 i32.const 0 call $~lib/env/abort unreachable end - i32.const 800 + i32.const 1112 call $~lib/string/parseFloat f64.const 0.1 f64.eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 91 + i32.const 72 + i32.const 93 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 - i32.const 824 + i32.const 456 + i32.const 1144 call $~lib/string/String.__concat global.set $std/string/c global.get $std/string/c - i32.const 840 + i32.const 1168 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 94 + i32.const 72 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/c - i32.const 336 + i32.const 456 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 56 - i32.const 95 + i32.const 72 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 312 + i32.const 416 + i32.const 416 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 96 + i32.const 72 + i32.const 98 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 + i32.const 416 global.get $std/string/nullStr call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 56 - i32.const 97 + i32.const 72 + i32.const 99 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/nullStr - i32.const 312 + i32.const 416 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 56 - i32.const 98 + i32.const 72 + i32.const 100 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 - i32.const 824 + i32.const 456 + i32.const 1144 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 56 - i32.const 99 + i32.const 72 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 - i32.const 336 + i32.const 456 + i32.const 456 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 100 + i32.const 72 + i32.const 102 i32.const 0 call $~lib/env/abort unreachable end - i32.const 856 - i32.const 872 + i32.const 1192 + i32.const 1216 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 56 - i32.const 101 + i32.const 72 + i32.const 103 i32.const 0 call $~lib/env/abort unreachable end - i32.const 856 - i32.const 856 + i32.const 1192 + i32.const 1192 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 102 + i32.const 72 + i32.const 104 i32.const 0 call $~lib/env/abort unreachable end - i32.const 888 - i32.const 904 + i32.const 1240 + i32.const 1264 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 56 - i32.const 103 + i32.const 72 + i32.const 105 i32.const 0 call $~lib/env/abort unreachable end - i32.const 920 - i32.const 944 + i32.const 1288 + i32.const 1320 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 56 - i32.const 104 + i32.const 72 + i32.const 106 i32.const 0 call $~lib/env/abort unreachable end - i32.const 968 - i32.const 968 + i32.const 1352 + i32.const 1352 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 105 + i32.const 72 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable end - i32.const 968 - i32.const 992 + i32.const 1352 + i32.const 1384 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 56 - i32.const 106 + i32.const 72 + i32.const 108 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1016 - i32.const 1048 + i32.const 1416 + i32.const 1456 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 56 - i32.const 107 + i32.const 72 + i32.const 109 i32.const 0 call $~lib/env/abort unreachable end - i32.const 824 - i32.const 336 + i32.const 1144 + i32.const 456 call $~lib/string/String.__gt i32.eqz if i32.const 0 - i32.const 56 - i32.const 109 + i32.const 72 + i32.const 111 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1080 - i32.const 336 + i32.const 1496 + i32.const 456 call $~lib/string/String.__gt i32.eqz if i32.const 0 - i32.const 56 - i32.const 110 + i32.const 72 + i32.const 112 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1080 - i32.const 1096 + i32.const 1496 + i32.const 1520 call $~lib/string/String.__gte i32.eqz if i32.const 0 - i32.const 56 - i32.const 111 + i32.const 72 + i32.const 113 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1080 - i32.const 840 + i32.const 1496 + i32.const 1168 call $~lib/string/String.__gt i32.eqz if i32.const 0 - i32.const 56 - i32.const 112 + i32.const 72 + i32.const 114 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1080 - i32.const 840 + i32.const 1496 + i32.const 1168 call $~lib/string/String.__lt i32.eqz i32.eqz if i32.const 0 - i32.const 56 - i32.const 113 + i32.const 72 + i32.const 115 i32.const 0 call $~lib/env/abort unreachable end - i32.const 824 + i32.const 1144 global.get $std/string/nullStr call $~lib/string/String.__lt i32.eqz i32.eqz if i32.const 0 - i32.const 56 - i32.const 115 + i32.const 72 + i32.const 117 i32.const 0 call $~lib/env/abort unreachable end global.get $std/string/nullStr - i32.const 824 + i32.const 1144 call $~lib/string/String.__lt i32.eqz i32.eqz if i32.const 0 - i32.const 56 - i32.const 116 + i32.const 72 + i32.const 118 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 - i32.const 312 + i32.const 480 + i32.const 416 call $~lib/string/String.__gt i32.eqz if i32.const 0 - i32.const 56 - i32.const 118 + i32.const 72 + i32.const 120 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 352 + i32.const 416 + i32.const 480 call $~lib/string/String.__lt i32.eqz if i32.const 0 - i32.const 56 - i32.const 119 + i32.const 72 + i32.const 121 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 - i32.const 312 + i32.const 480 + i32.const 416 call $~lib/string/String.__gte i32.eqz if i32.const 0 - i32.const 56 - i32.const 120 + i32.const 72 + i32.const 122 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 352 + i32.const 416 + i32.const 480 call $~lib/string/String.__lte i32.eqz if i32.const 0 - i32.const 56 - i32.const 121 + i32.const 72 + i32.const 123 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 - i32.const 312 + i32.const 480 + i32.const 416 call $~lib/string/String.__lt i32.eqz i32.eqz if i32.const 0 - i32.const 56 - i32.const 122 + i32.const 72 + i32.const 124 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 352 + i32.const 416 + i32.const 480 call $~lib/string/String.__gt i32.eqz i32.eqz if i32.const 0 - i32.const 56 - i32.const 123 + i32.const 72 + i32.const 125 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 312 + i32.const 416 + i32.const 416 call $~lib/string/String.__lt i32.eqz i32.eqz if i32.const 0 - i32.const 56 - i32.const 124 + i32.const 72 + i32.const 126 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 312 + i32.const 416 + i32.const 416 call $~lib/string/String.__gt i32.eqz i32.eqz if i32.const 0 - i32.const 56 - i32.const 125 + i32.const 72 + i32.const 127 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 312 + i32.const 416 + i32.const 416 call $~lib/string/String.__gte i32.eqz if i32.const 0 - i32.const 56 - i32.const 126 + i32.const 72 + i32.const 128 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 312 + i32.const 416 + i32.const 416 call $~lib/string/String.__lte i32.eqz if i32.const 0 - i32.const 56 - i32.const 127 + i32.const 72 + i32.const 129 i32.const 0 call $~lib/env/abort unreachable @@ -7928,164 +8105,164 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 131 + i32.const 72 + i32.const 133 i32.const 0 call $~lib/env/abort unreachable end - i32.const 392 + i32.const 536 call $~lib/string/String#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 133 + i32.const 72 + i32.const 135 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 + i32.const 416 i32.const 100 call $~lib/string/String#repeat - i32.const 312 + i32.const 416 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 135 + i32.const 72 + i32.const 137 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 + i32.const 456 i32.const 0 call $~lib/string/String#repeat - i32.const 312 + i32.const 416 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 136 + i32.const 72 + i32.const 138 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 + i32.const 456 i32.const 1 call $~lib/string/String#repeat - i32.const 336 + i32.const 456 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 137 + i32.const 72 + i32.const 139 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 + i32.const 456 i32.const 2 call $~lib/string/String#repeat - i32.const 1096 + i32.const 1520 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 138 + i32.const 72 + i32.const 140 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 + i32.const 456 i32.const 3 call $~lib/string/String#repeat - i32.const 1112 + i32.const 1544 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 139 + i32.const 72 + i32.const 141 i32.const 0 call $~lib/env/abort unreachable end - i32.const 840 + i32.const 1168 i32.const 4 call $~lib/string/String#repeat - i32.const 1128 + i32.const 1568 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 140 + i32.const 72 + i32.const 142 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 + i32.const 456 i32.const 5 call $~lib/string/String#repeat - i32.const 1152 + i32.const 1600 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 141 + i32.const 72 + i32.const 143 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 + i32.const 456 i32.const 6 call $~lib/string/String#repeat - i32.const 1176 + i32.const 1632 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 142 + i32.const 72 + i32.const 144 i32.const 0 call $~lib/env/abort unreachable end - i32.const 336 + i32.const 456 i32.const 7 call $~lib/string/String#repeat - i32.const 1200 + i32.const 1664 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 143 + i32.const 72 + i32.const 145 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1224 + i32.const 1696 global.set $std/string/str global.get $std/string/str i32.const 0 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#slice - i32.const 1224 + i32.const 1696 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 147 + i32.const 72 + i32.const 149 i32.const 0 call $~lib/env/abort unreachable @@ -8094,13 +8271,13 @@ i32.const -1 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#slice - i32.const 1264 + i32.const 1744 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 148 + i32.const 72 + i32.const 150 i32.const 0 call $~lib/env/abort unreachable @@ -8109,13 +8286,13 @@ i32.const -5 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#slice - i32.const 1280 + i32.const 1768 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 149 + i32.const 72 + i32.const 151 i32.const 0 call $~lib/env/abort unreachable @@ -8124,13 +8301,13 @@ i32.const 2 i32.const 7 call $~lib/string/String#slice - i32.const 1304 + i32.const 1800 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 150 + i32.const 72 + i32.const 152 i32.const 0 call $~lib/env/abort unreachable @@ -8139,13 +8316,13 @@ i32.const -11 i32.const -6 call $~lib/string/String#slice - i32.const 1328 + i32.const 1832 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 151 + i32.const 72 + i32.const 153 i32.const 0 call $~lib/env/abort unreachable @@ -8154,13 +8331,13 @@ i32.const 4 i32.const 3 call $~lib/string/String#slice - i32.const 312 + i32.const 416 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 152 + i32.const 72 + i32.const 154 i32.const 0 call $~lib/env/abort unreachable @@ -8169,18 +8346,18 @@ i32.const 0 i32.const -1 call $~lib/string/String#slice - i32.const 1352 + i32.const 1864 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 153 + i32.const 72 + i32.const 155 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 + i32.const 416 i32.const 0 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split @@ -8194,7 +8371,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 312 + i32.const 416 call $~lib/string/String.__eq else local.get $0 @@ -8202,14 +8379,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 158 + i32.const 72 + i32.const 160 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 312 + i32.const 416 + i32.const 416 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -8220,14 +8397,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 160 + i32.const 72 + i32.const 162 i32.const 0 call $~lib/env/abort unreachable end - i32.const 312 - i32.const 528 + i32.const 416 + i32.const 720 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -8240,7 +8417,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 312 + i32.const 416 call $~lib/string/String.__eq else local.get $0 @@ -8248,14 +8425,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 162 + i32.const 72 + i32.const 164 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1432 - i32.const 1456 + i32.const 1960 + i32.const 1992 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -8268,7 +8445,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 1432 + i32.const 1960 call $~lib/string/String.__eq else local.get $0 @@ -8276,14 +8453,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 164 + i32.const 72 + i32.const 166 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1432 - i32.const 528 + i32.const 1960 + i32.const 720 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -8296,7 +8473,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq else local.get $0 @@ -8306,7 +8483,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 824 + i32.const 1144 call $~lib/string/String.__eq else local.get $0 @@ -8316,7 +8493,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1472 + i32.const 2016 call $~lib/string/String.__eq else local.get $0 @@ -8324,14 +8501,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 166 + i32.const 72 + i32.const 168 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1488 - i32.const 1512 + i32.const 2040 + i32.const 2072 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -8344,7 +8521,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq else local.get $0 @@ -8354,7 +8531,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 824 + i32.const 1144 call $~lib/string/String.__eq else local.get $0 @@ -8364,7 +8541,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1472 + i32.const 2016 call $~lib/string/String.__eq else local.get $0 @@ -8372,14 +8549,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 168 + i32.const 72 + i32.const 170 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1528 - i32.const 528 + i32.const 2096 + i32.const 720 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -8392,7 +8569,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq else local.get $0 @@ -8402,7 +8579,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 824 + i32.const 1144 call $~lib/string/String.__eq else local.get $0 @@ -8412,7 +8589,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 312 + i32.const 416 call $~lib/string/String.__eq else local.get $0 @@ -8422,7 +8599,7 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array#__get - i32.const 1472 + i32.const 2016 call $~lib/string/String.__eq else local.get $0 @@ -8430,14 +8607,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 170 + i32.const 72 + i32.const 172 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1552 - i32.const 528 + i32.const 2128 + i32.const 720 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -8450,7 +8627,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 312 + i32.const 416 call $~lib/string/String.__eq else local.get $0 @@ -8460,7 +8637,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq else local.get $0 @@ -8470,7 +8647,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 824 + i32.const 1144 call $~lib/string/String.__eq else local.get $0 @@ -8480,7 +8657,7 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array#__get - i32.const 1472 + i32.const 2016 call $~lib/string/String.__eq else local.get $0 @@ -8488,14 +8665,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 172 + i32.const 72 + i32.const 174 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1576 - i32.const 528 + i32.const 2160 + i32.const 720 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -8508,7 +8685,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq else local.get $0 @@ -8518,7 +8695,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 824 + i32.const 1144 call $~lib/string/String.__eq else local.get $0 @@ -8528,7 +8705,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1472 + i32.const 2016 call $~lib/string/String.__eq else local.get $0 @@ -8538,7 +8715,7 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array#__get - i32.const 312 + i32.const 416 call $~lib/string/String.__eq else local.get $0 @@ -8546,14 +8723,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 174 + i32.const 72 + i32.const 176 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 - i32.const 312 + i32.const 480 + i32.const 416 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -8566,7 +8743,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq else local.get $0 @@ -8576,7 +8753,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 824 + i32.const 1144 call $~lib/string/String.__eq else local.get $0 @@ -8586,7 +8763,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1472 + i32.const 2016 call $~lib/string/String.__eq else local.get $0 @@ -8594,14 +8771,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 176 + i32.const 72 + i32.const 178 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 - i32.const 312 + i32.const 480 + i32.const 416 i32.const 0 call $~lib/string/String#split global.set $std/string/sa @@ -8612,14 +8789,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 178 + i32.const 72 + i32.const 180 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 - i32.const 312 + i32.const 480 + i32.const 416 i32.const 1 call $~lib/string/String#split global.set $std/string/sa @@ -8632,7 +8809,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq else local.get $0 @@ -8640,14 +8817,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 180 + i32.const 72 + i32.const 182 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1432 - i32.const 528 + i32.const 1960 + i32.const 720 i32.const 1 call $~lib/string/String#split global.set $std/string/sa @@ -8660,7 +8837,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq else local.get $0 @@ -8668,14 +8845,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 182 + i32.const 72 + i32.const 184 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 - i32.const 312 + i32.const 480 + i32.const 416 i32.const 4 call $~lib/string/String#split global.set $std/string/sa @@ -8688,7 +8865,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq else local.get $0 @@ -8698,7 +8875,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 824 + i32.const 1144 call $~lib/string/String.__eq else local.get $0 @@ -8708,7 +8885,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1472 + i32.const 2016 call $~lib/string/String.__eq else local.get $0 @@ -8716,14 +8893,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 184 + i32.const 72 + i32.const 186 i32.const 0 call $~lib/env/abort unreachable end - i32.const 352 - i32.const 312 + i32.const 480 + i32.const 416 i32.const -1 call $~lib/string/String#split global.set $std/string/sa @@ -8736,7 +8913,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq else local.get $0 @@ -8746,7 +8923,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 824 + i32.const 1144 call $~lib/string/String.__eq else local.get $0 @@ -8756,7 +8933,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1472 + i32.const 2016 call $~lib/string/String.__eq else local.get $0 @@ -8764,14 +8941,14 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 186 + i32.const 72 + i32.const 188 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1432 - i32.const 528 + i32.const 1960 + i32.const 720 i32.const -1 call $~lib/string/String#split global.set $std/string/sa @@ -8784,7 +8961,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array#__get - i32.const 336 + i32.const 456 call $~lib/string/String.__eq else local.get $0 @@ -8794,7 +8971,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array#__get - i32.const 824 + i32.const 1144 call $~lib/string/String.__eq else local.get $0 @@ -8804,7 +8981,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array#__get - i32.const 1472 + i32.const 2016 call $~lib/string/String.__eq else local.get $0 @@ -8812,593 +8989,593 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 188 + i32.const 72 + i32.const 190 i32.const 0 call $~lib/env/abort unreachable end i32.const 0 call $~lib/util/number/itoa32 - i32.const 608 + i32.const 840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 190 + i32.const 72 + i32.const 192 i32.const 0 call $~lib/env/abort unreachable end i32.const 1 call $~lib/util/number/itoa32 - i32.const 624 + i32.const 864 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 191 + i32.const 72 + i32.const 193 i32.const 0 call $~lib/env/abort unreachable end i32.const 8 call $~lib/util/number/itoa32 - i32.const 2032 + i32.const 2640 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 192 + i32.const 72 + i32.const 194 i32.const 0 call $~lib/env/abort unreachable end i32.const 123 call $~lib/util/number/itoa32 - i32.const 392 + i32.const 536 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 193 + i32.const 72 + i32.const 195 i32.const 0 call $~lib/env/abort unreachable end i32.const -1000 call $~lib/util/number/itoa32 - i32.const 2048 + i32.const 2664 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 194 + i32.const 72 + i32.const 196 i32.const 0 call $~lib/env/abort unreachable end i32.const 1234 call $~lib/util/number/itoa32 - i32.const 2072 + i32.const 2696 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 195 + i32.const 72 + i32.const 197 i32.const 0 call $~lib/env/abort unreachable end i32.const 12345 call $~lib/util/number/itoa32 - i32.const 2088 + i32.const 2720 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 196 + i32.const 72 + i32.const 198 i32.const 0 call $~lib/env/abort unreachable end i32.const 123456 call $~lib/util/number/itoa32 - i32.const 2112 + i32.const 2752 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 197 + i32.const 72 + i32.const 199 i32.const 0 call $~lib/env/abort unreachable end i32.const 1111111 call $~lib/util/number/itoa32 - i32.const 2136 + i32.const 2784 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 198 + i32.const 72 + i32.const 200 i32.const 0 call $~lib/env/abort unreachable end i32.const 1234567 call $~lib/util/number/itoa32 - i32.const 2160 + i32.const 2816 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 199 + i32.const 72 + i32.const 201 i32.const 0 call $~lib/env/abort unreachable end i32.const 2147483646 call $~lib/util/number/itoa32 - i32.const 2184 + i32.const 2848 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 200 + i32.const 72 + i32.const 202 i32.const 0 call $~lib/env/abort unreachable end i32.const 2147483647 call $~lib/util/number/itoa32 - i32.const 2216 + i32.const 2888 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 201 + i32.const 72 + i32.const 203 i32.const 0 call $~lib/env/abort unreachable end i32.const -2147483648 call $~lib/util/number/itoa32 - i32.const 2248 + i32.const 2928 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 202 + i32.const 72 + i32.const 204 i32.const 0 call $~lib/env/abort unreachable end i32.const -1 call $~lib/util/number/itoa32 - i32.const 2280 + i32.const 2968 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 203 + i32.const 72 + i32.const 205 i32.const 0 call $~lib/env/abort unreachable end i32.const 0 call $~lib/util/number/utoa32 - i32.const 608 + i32.const 840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 205 + i32.const 72 + i32.const 207 i32.const 0 call $~lib/env/abort unreachable end i32.const 1000 call $~lib/util/number/utoa32 - i32.const 2296 + i32.const 2992 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 206 + i32.const 72 + i32.const 208 i32.const 0 call $~lib/env/abort unreachable end i32.const 2147483647 call $~lib/util/number/utoa32 - i32.const 2216 + i32.const 2888 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 207 + i32.const 72 + i32.const 209 i32.const 0 call $~lib/env/abort unreachable end i32.const -2147483648 call $~lib/util/number/utoa32 - i32.const 2312 + i32.const 3016 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 208 + i32.const 72 + i32.const 210 i32.const 0 call $~lib/env/abort unreachable end global.get $~lib/builtins/u32.MAX_VALUE call $~lib/util/number/utoa32 - i32.const 2344 + i32.const 3056 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 209 + i32.const 72 + i32.const 211 i32.const 0 call $~lib/env/abort unreachable end i64.const 0 call $~lib/util/number/utoa64 - i32.const 608 + i32.const 840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 211 + i32.const 72 + i32.const 213 i32.const 0 call $~lib/env/abort unreachable end i64.const 1234 call $~lib/util/number/utoa64 - i32.const 2072 + i32.const 2696 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 212 + i32.const 72 + i32.const 214 i32.const 0 call $~lib/env/abort unreachable end i64.const 99999999 call $~lib/util/number/utoa64 - i32.const 2376 + i32.const 3096 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 213 + i32.const 72 + i32.const 215 i32.const 0 call $~lib/env/abort unreachable end i64.const 100000000 call $~lib/util/number/utoa64 - i32.const 2400 + i32.const 3128 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 214 + i32.const 72 + i32.const 216 i32.const 0 call $~lib/env/abort unreachable end i64.const 4294967295 call $~lib/util/number/utoa64 - i32.const 2344 + i32.const 3056 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 215 - i32.const 0 + i32.const 72 + i32.const 217 + i32.const 0 call $~lib/env/abort unreachable end i64.const 68719476735 call $~lib/util/number/utoa64 - i32.const 2432 + i32.const 3168 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 216 + i32.const 72 + i32.const 218 i32.const 0 call $~lib/env/abort unreachable end i64.const 868719476735 call $~lib/util/number/utoa64 - i32.const 2464 + i32.const 3208 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 217 + i32.const 72 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable end i64.const 999868719476735 call $~lib/util/number/utoa64 - i32.const 2496 + i32.const 3248 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 218 + i32.const 72 + i32.const 220 i32.const 0 call $~lib/env/abort unreachable end i64.const 9999868719476735 call $~lib/util/number/utoa64 - i32.const 2536 + i32.const 3296 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 219 + i32.const 72 + i32.const 221 i32.const 0 call $~lib/env/abort unreachable end i64.const 19999868719476735 call $~lib/util/number/utoa64 - i32.const 2576 + i32.const 3344 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 220 + i32.const 72 + i32.const 222 i32.const 0 call $~lib/env/abort unreachable end global.get $~lib/builtins/u64.MAX_VALUE call $~lib/util/number/utoa64 - i32.const 2624 + i32.const 3400 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 221 + i32.const 72 + i32.const 223 i32.const 0 call $~lib/env/abort unreachable end i64.const 0 call $~lib/util/number/itoa64 - i32.const 608 + i32.const 840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 223 + i32.const 72 + i32.const 225 i32.const 0 call $~lib/env/abort unreachable end i64.const -1234 call $~lib/util/number/itoa64 - i32.const 2672 + i32.const 3456 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 224 + i32.const 72 + i32.const 226 i32.const 0 call $~lib/env/abort unreachable end i64.const 4294967295 call $~lib/util/number/itoa64 - i32.const 2344 + i32.const 3056 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 225 + i32.const 72 + i32.const 227 i32.const 0 call $~lib/env/abort unreachable end i64.const -4294967295 call $~lib/util/number/itoa64 - i32.const 2696 + i32.const 3488 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 226 + i32.const 72 + i32.const 228 i32.const 0 call $~lib/env/abort unreachable end i64.const 68719476735 call $~lib/util/number/itoa64 - i32.const 2432 + i32.const 3168 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 227 + i32.const 72 + i32.const 229 i32.const 0 call $~lib/env/abort unreachable end i64.const -68719476735 call $~lib/util/number/itoa64 - i32.const 2728 + i32.const 3528 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 228 + i32.const 72 + i32.const 230 i32.const 0 call $~lib/env/abort unreachable end i64.const -868719476735 call $~lib/util/number/itoa64 - i32.const 2760 + i32.const 3568 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 229 + i32.const 72 + i32.const 231 i32.const 0 call $~lib/env/abort unreachable end i64.const -999868719476735 call $~lib/util/number/itoa64 - i32.const 2800 + i32.const 3616 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 230 + i32.const 72 + i32.const 232 i32.const 0 call $~lib/env/abort unreachable end i64.const -19999868719476735 call $~lib/util/number/itoa64 - i32.const 2840 + i32.const 3664 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 231 + i32.const 72 + i32.const 233 i32.const 0 call $~lib/env/abort unreachable end global.get $~lib/builtins/i64.MAX_VALUE call $~lib/util/number/itoa64 - i32.const 2888 + i32.const 3720 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 232 + i32.const 72 + i32.const 234 i32.const 0 call $~lib/env/abort unreachable end global.get $~lib/builtins/i64.MIN_VALUE call $~lib/util/number/itoa64 - i32.const 2936 + i32.const 3776 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 233 + i32.const 72 + i32.const 235 i32.const 0 call $~lib/env/abort unreachable end f64.const 0 call $~lib/util/number/dtoa - i32.const 2984 + i32.const 3832 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 236 + i32.const 72 + i32.const 238 i32.const 0 call $~lib/env/abort unreachable end f64.const -0 call $~lib/util/number/dtoa - i32.const 2984 + i32.const 3832 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 237 + i32.const 72 + i32.const 239 i32.const 0 call $~lib/env/abort unreachable end f64.const nan:0x8000000000000 call $~lib/util/number/dtoa - i32.const 3000 + i32.const 3856 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 238 + i32.const 72 + i32.const 240 i32.const 0 call $~lib/env/abort unreachable end f64.const inf call $~lib/util/number/dtoa - i32.const 3048 + i32.const 3920 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 239 + i32.const 72 + i32.const 241 i32.const 0 call $~lib/env/abort unreachable @@ -9406,26 +9583,26 @@ f64.const inf f64.neg call $~lib/util/number/dtoa - i32.const 3016 + i32.const 3880 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 240 + i32.const 72 + i32.const 242 i32.const 0 call $~lib/env/abort unreachable end global.get $~lib/builtins/f64.EPSILON call $~lib/util/number/dtoa - i32.const 4080 + i32.const 5008 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 241 + i32.const 72 + i32.const 243 i32.const 0 call $~lib/env/abort unreachable @@ -9433,26 +9610,26 @@ global.get $~lib/builtins/f64.EPSILON f64.neg call $~lib/util/number/dtoa - i32.const 4136 + i32.const 5072 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 242 + i32.const 72 + i32.const 244 i32.const 0 call $~lib/env/abort unreachable end global.get $~lib/builtins/f64.MAX_VALUE call $~lib/util/number/dtoa - i32.const 4192 + i32.const 5136 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 243 + i32.const 72 + i32.const 245 i32.const 0 call $~lib/env/abort unreachable @@ -9460,429 +9637,429 @@ global.get $~lib/builtins/f64.MAX_VALUE f64.neg call $~lib/util/number/dtoa - i32.const 4248 + i32.const 5200 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 244 + i32.const 72 + i32.const 246 i32.const 0 call $~lib/env/abort unreachable end f64.const 4185580496821356722454785e274 call $~lib/util/number/dtoa - i32.const 4304 + i32.const 5264 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 245 + i32.const 72 + i32.const 247 i32.const 0 call $~lib/env/abort unreachable end f64.const 2.2250738585072014e-308 call $~lib/util/number/dtoa - i32.const 4360 + i32.const 5328 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 246 + i32.const 72 + i32.const 248 i32.const 0 call $~lib/env/abort unreachable end f64.const 4.940656e-318 call $~lib/util/number/dtoa - i32.const 4416 + i32.const 5392 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 249 + i32.const 72 + i32.const 251 i32.const 0 call $~lib/env/abort unreachable end f64.const 9060801153433600 call $~lib/util/number/dtoa - i32.const 4456 + i32.const 5440 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 250 + i32.const 72 + i32.const 252 i32.const 0 call $~lib/env/abort unreachable end f64.const 4708356024711512064 call $~lib/util/number/dtoa - i32.const 4504 + i32.const 5496 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 251 + i32.const 72 + i32.const 253 i32.const 0 call $~lib/env/abort unreachable end f64.const 9409340012568248320 call $~lib/util/number/dtoa - i32.const 4560 + i32.const 5560 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 252 + i32.const 72 + i32.const 254 i32.const 0 call $~lib/env/abort unreachable end f64.const 5e-324 call $~lib/util/number/dtoa - i32.const 4616 + i32.const 5624 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 253 + i32.const 72 + i32.const 255 i32.const 0 call $~lib/env/abort unreachable end f64.const 1 call $~lib/util/number/dtoa - i32.const 4640 + i32.const 5656 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 259 + i32.const 72 + i32.const 261 i32.const 0 call $~lib/env/abort unreachable end f64.const 0.1 call $~lib/util/number/dtoa - i32.const 768 + i32.const 1064 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 260 + i32.const 72 + i32.const 262 i32.const 0 call $~lib/env/abort unreachable end f64.const -1 call $~lib/util/number/dtoa - i32.const 4656 + i32.const 5680 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 261 + i32.const 72 + i32.const 263 i32.const 0 call $~lib/env/abort unreachable end f64.const -0.1 call $~lib/util/number/dtoa - i32.const 4672 + i32.const 5704 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 262 + i32.const 72 + i32.const 264 i32.const 0 call $~lib/env/abort unreachable end f64.const 1e6 call $~lib/util/number/dtoa - i32.const 4688 + i32.const 5728 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 264 + i32.const 72 + i32.const 266 i32.const 0 call $~lib/env/abort unreachable end f64.const 1e-06 call $~lib/util/number/dtoa - i32.const 4720 + i32.const 5768 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 265 + i32.const 72 + i32.const 267 i32.const 0 call $~lib/env/abort unreachable end f64.const -1e6 call $~lib/util/number/dtoa - i32.const 4744 + i32.const 5800 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 266 + i32.const 72 + i32.const 268 i32.const 0 call $~lib/env/abort unreachable end f64.const -1e-06 call $~lib/util/number/dtoa - i32.const 4776 + i32.const 5840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 267 + i32.const 72 + i32.const 269 i32.const 0 call $~lib/env/abort unreachable end f64.const 1e7 call $~lib/util/number/dtoa - i32.const 4808 + i32.const 5880 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 268 + i32.const 72 + i32.const 270 i32.const 0 call $~lib/env/abort unreachable end f64.const 1e-07 call $~lib/util/number/dtoa - i32.const 4840 + i32.const 5920 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 269 + i32.const 72 + i32.const 271 i32.const 0 call $~lib/env/abort unreachable end f64.const 1.e+308 call $~lib/util/number/dtoa - i32.const 4856 + i32.const 5944 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 271 + i32.const 72 + i32.const 273 i32.const 0 call $~lib/env/abort unreachable end f64.const -1.e+308 call $~lib/util/number/dtoa - i32.const 4880 + i32.const 5976 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 272 + i32.const 72 + i32.const 274 i32.const 0 call $~lib/env/abort unreachable end f64.const inf call $~lib/util/number/dtoa - i32.const 3048 + i32.const 3920 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 273 + i32.const 72 + i32.const 275 i32.const 0 call $~lib/env/abort unreachable end f64.const -inf call $~lib/util/number/dtoa - i32.const 3016 + i32.const 3880 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 274 + i32.const 72 + i32.const 276 i32.const 0 call $~lib/env/abort unreachable end f64.const 1e-308 call $~lib/util/number/dtoa - i32.const 4904 + i32.const 6008 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 275 + i32.const 72 + i32.const 277 i32.const 0 call $~lib/env/abort unreachable end f64.const -1e-308 call $~lib/util/number/dtoa - i32.const 4928 + i32.const 6040 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 276 + i32.const 72 + i32.const 278 i32.const 0 call $~lib/env/abort unreachable end f64.const 1e-323 call $~lib/util/number/dtoa - i32.const 4952 + i32.const 6072 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 277 + i32.const 72 + i32.const 279 i32.const 0 call $~lib/env/abort unreachable end f64.const -1e-323 call $~lib/util/number/dtoa - i32.const 4976 + i32.const 6104 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 278 + i32.const 72 + i32.const 280 i32.const 0 call $~lib/env/abort unreachable end f64.const 0 call $~lib/util/number/dtoa - i32.const 2984 + i32.const 3832 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 279 + i32.const 72 + i32.const 281 i32.const 0 call $~lib/env/abort unreachable end f64.const 4294967272 call $~lib/util/number/dtoa - i32.const 5000 + i32.const 6136 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 281 + i32.const 72 + i32.const 283 i32.const 0 call $~lib/env/abort unreachable end f64.const 1.2312145673456234e-08 call $~lib/util/number/dtoa - i32.const 5032 + i32.const 6176 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 282 + i32.const 72 + i32.const 284 i32.const 0 call $~lib/env/abort unreachable end f64.const 555555555.5555556 call $~lib/util/number/dtoa - i32.const 5088 + i32.const 6240 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 284 + i32.const 72 + i32.const 286 i32.const 0 call $~lib/env/abort unreachable end f64.const 0.9999999999999999 call $~lib/util/number/dtoa - i32.const 5136 + i32.const 6296 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 285 + i32.const 72 + i32.const 287 i32.const 0 call $~lib/env/abort unreachable end f64.const 1 call $~lib/util/number/dtoa - i32.const 4640 + i32.const 5656 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 286 + i32.const 72 + i32.const 288 i32.const 0 call $~lib/env/abort unreachable end f64.const 12.34 call $~lib/util/number/dtoa - i32.const 5184 + i32.const 6352 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 287 + i32.const 72 + i32.const 289 i32.const 0 call $~lib/env/abort unreachable @@ -9891,128 +10068,128 @@ f64.const 3 f64.div call $~lib/util/number/dtoa - i32.const 5208 + i32.const 6384 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 289 + i32.const 72 + i32.const 291 i32.const 0 call $~lib/env/abort unreachable end f64.const 1234e17 call $~lib/util/number/dtoa - i32.const 5256 + i32.const 6440 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 290 + i32.const 72 + i32.const 292 i32.const 0 call $~lib/env/abort unreachable end f64.const 1234e18 call $~lib/util/number/dtoa - i32.const 5312 + i32.const 6504 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 291 + i32.const 72 + i32.const 293 i32.const 0 call $~lib/env/abort unreachable end f64.const 2.71828 call $~lib/util/number/dtoa - i32.const 5344 + i32.const 6544 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 292 + i32.const 72 + i32.const 294 i32.const 0 call $~lib/env/abort unreachable end f64.const 0.0271828 call $~lib/util/number/dtoa - i32.const 5368 + i32.const 6576 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 293 + i32.const 72 + i32.const 295 i32.const 0 call $~lib/env/abort unreachable end f64.const 271.828 call $~lib/util/number/dtoa - i32.const 5400 + i32.const 6616 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 294 + i32.const 72 + i32.const 296 i32.const 0 call $~lib/env/abort unreachable end f64.const 1.1e+128 call $~lib/util/number/dtoa - i32.const 5424 + i32.const 6648 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 295 + i32.const 72 + i32.const 297 i32.const 0 call $~lib/env/abort unreachable end f64.const 1.1e-64 call $~lib/util/number/dtoa - i32.const 5448 + i32.const 6680 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 296 + i32.const 72 + i32.const 298 i32.const 0 call $~lib/env/abort unreachable end f64.const 0.000035689 call $~lib/util/number/dtoa - i32.const 5472 + i32.const 6712 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 56 - i32.const 297 + i32.const 72 + i32.const 299 i32.const 0 call $~lib/env/abort unreachable end ) - (func $std/string/getString (; 59 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 65 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 60 ;) (type $FUNCSIG$v) + (func $start (; 66 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 61 ;) (type $FUNCSIG$v) + (func $null (; 67 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 1079090e89..c5763b4b93 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -115,7 +115,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -136,44 +136,40 @@ i32.const 8 i32.add ) - (func $~lib/runtime/assertUnregistered (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 i32.const 700 i32.le_u if i32.const 0 i32.const 72 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 i32.const 8 i32.sub + local.tee $2 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 72 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 8 - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -384,7 +380,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741816 @@ -398,15 +394,15 @@ unreachable end local.get $0 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $1 local.get $0 call $~lib/memory/memory.fill local.get $1 i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/map/Map#clear (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -428,12 +424,12 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -456,12 +452,12 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#constructor (; 9 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.tee $0 i32.const 0 i32.store @@ -484,7 +480,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hashStr (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hashStr (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -528,7 +524,7 @@ end local.get $1 ) - (func $~lib/util/string/compareImpl (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 @@ -561,7 +557,7 @@ end local.get $3 ) - (func $~lib/string/String.__eq (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -607,7 +603,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/map/Map#find (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#find (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $0 @@ -650,7 +646,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -751,7 +747,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -840,7 +836,7 @@ i32.store end ) - (func $~lib/util/hash/hash32 (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -871,7 +867,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -914,7 +910,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1015,7 +1011,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1105,7 +1101,7 @@ i32.store end ) - (func $~lib/symbol/_Symbol.for (; 20 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/symbol/_Symbol.for (; 19 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) global.get $~lib/symbol/stringToId if @@ -1151,7 +1147,7 @@ call $~lib/map/Map#set local.get $0 ) - (func $~lib/map/Map#has (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1160,7 +1156,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1174,7 +1170,7 @@ unreachable end ) - (func $~lib/symbol/_Symbol.keyFor (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.keyFor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) global.get $~lib/symbol/idToString i32.const 0 @@ -1195,7 +1191,7 @@ i32.const 0 end ) - (func $~lib/util/memory/memcpy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2092,7 +2088,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2286,7 +2282,7 @@ end end ) - (func $~lib/string/String#concat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2320,7 +2316,7 @@ return end local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $2 local.get $0 local.get $3 @@ -2333,9 +2329,9 @@ call $~lib/memory/memory.copy local.get $2 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/string/String.__concat (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 512 local.get $0 @@ -2343,7 +2339,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/symbol/_Symbol#toString (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol#toString (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 160 @@ -2427,7 +2423,7 @@ i32.const 528 call $~lib/string/String.__concat ) - (func $start:std/symbol (; 29 ;) (type $FUNCSIG$v) + (func $start:std/symbol (; 28 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/symbol/nextId local.tee $0 @@ -2509,9 +2505,21 @@ end global.get $std/symbol/sym3 call $~lib/symbol/_Symbol.keyFor + local.tee $0 + i32.eqz + if + unreachable + end + local.get $0 global.set $std/symbol/key3 global.get $std/symbol/sym4 call $~lib/symbol/_Symbol.keyFor + local.tee $0 + i32.eqz + if + unreachable + end + local.get $0 global.set $std/symbol/key4 global.get $std/symbol/key3 i32.const 16 @@ -2604,10 +2612,10 @@ unreachable end ) - (func $start (; 30 ;) (type $FUNCSIG$v) + (func $start (; 29 ;) (type $FUNCSIG$v) call $start:std/symbol ) - (func $null (; 31 ;) (type $FUNCSIG$v) + (func $null (; 30 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/symbol.ts b/tests/compiler/std/symbol.ts index e5168b36aa..9604825bfe 100644 --- a/tests/compiler/std/symbol.ts +++ b/tests/compiler/std/symbol.ts @@ -16,8 +16,8 @@ var key2 = Symbol.keyFor(sym2); assert(key1 === null); assert(key2 === null); -var key3 = Symbol.keyFor(sym3); -var key4 = Symbol.keyFor(sym4); +var key3 = Symbol.keyFor(sym3)!; +var key4 = Symbol.keyFor(sym4)!; assert(key3 == "123"); assert(key3 == key4); diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index bf082c1d8a..efdc7242dc 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -35,13 +35,12 @@ (data (i32.const 640) "\01\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/symbol/nextId (mut i32) (i32.const 12)) (global $std/symbol/sym1 (mut i32) (i32.const 0)) (global $std/symbol/sym2 (mut i32) (i32.const 0)) (global $~lib/symbol/stringToId (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) @@ -177,7 +176,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -193,7 +192,8 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u @@ -201,14 +201,16 @@ if i32.const 0 i32.const 72 - i32.const 313 - i32.const 2 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq @@ -216,23 +218,17 @@ if i32.const 0 i32.const 72 - i32.const 314 - i32.const 2 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -489,7 +485,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -507,7 +503,7 @@ local.get $1 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $3 local.get $3 @@ -519,10 +515,10 @@ local.set $2 local.get $2 i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/map/Map#clear (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -548,7 +544,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -559,12 +555,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -591,7 +587,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#clear (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -617,7 +613,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) local.get $0 @@ -628,12 +624,12 @@ i32.const 24 local.set $1 local.get $1 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $1 local.get $1 i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -660,7 +656,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/string/String#get:length (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -668,7 +664,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/hash/hashStr (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hashStr (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -715,7 +711,7 @@ end local.get $1 ) - (func $~lib/util/string/compareImpl (; 15 ;) (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 (; 14 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -768,7 +764,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -812,7 +808,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/map/Map#find (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -863,7 +859,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -878,7 +874,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -900,7 +896,7 @@ unreachable end ) - (func $~lib/map/Map#rehash (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1034,7 +1030,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1138,7 +1134,7 @@ i32.store end ) - (func $~lib/util/hash/hash32 (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -1180,7 +1176,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1231,7 +1227,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1365,7 +1361,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1469,7 +1465,7 @@ i32.store end ) - (func $~lib/symbol/_Symbol.for (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.for (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) global.get $~lib/symbol/stringToId @@ -1516,7 +1512,7 @@ call $~lib/map/Map#set local.get $2 ) - (func $~lib/map/Map#has (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1531,7 +1527,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -1553,7 +1549,7 @@ unreachable end ) - (func $~lib/symbol/_Symbol.keyFor (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.keyFor (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) global.get $~lib/symbol/idToString i32.const 0 @@ -1574,7 +1570,7 @@ i32.const 0 end ) - (func $~lib/util/memory/memcpy (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2775,7 +2771,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3006,7 +3002,7 @@ end end ) - (func $~lib/string/String#concat (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3044,7 +3040,7 @@ local.get $4 local.set $5 local.get $5 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $6 local.get $6 @@ -3062,10 +3058,10 @@ local.set $5 local.get $5 i32.const 1 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/string/String.__concat (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 512 local.get $0 @@ -3075,7 +3071,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/symbol/_Symbol#toString (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol#toString (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3261,7 +3257,8 @@ i32.const 528 call $~lib/string/String.__concat ) - (func $start:std/symbol (; 35 ;) (type $FUNCSIG$v) + (func $start:std/symbol (; 34 ;) (type $FUNCSIG$v) + (local $0 i32) i32.const 16 call $~lib/symbol/Symbol global.set $std/symbol/sym1 @@ -3340,9 +3337,21 @@ end global.get $std/symbol/sym3 call $~lib/symbol/_Symbol.keyFor + local.tee $0 + if (result i32) + local.get $0 + else + unreachable + end global.set $std/symbol/key3 global.get $std/symbol/sym4 call $~lib/symbol/_Symbol.keyFor + local.tee $0 + if (result i32) + local.get $0 + else + unreachable + end global.set $std/symbol/key4 global.get $std/symbol/key3 i32.const 16 @@ -3430,9 +3439,9 @@ global.get $~lib/symbol/_Symbol.isConcatSpreadable drop ) - (func $start (; 36 ;) (type $FUNCSIG$v) + (func $start (; 35 ;) (type $FUNCSIG$v) call $start:std/symbol ) - (func $null (; 37 ;) (type $FUNCSIG$v) + (func $null (; 36 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 4abc73d726..6dd364663b 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -5,6 +5,7 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viid (func (param i32 i32 f64))) (type $FUNCSIG$idd (func (param f64 f64) (result i32))) (type $FUNCSIG$dii (func (param i32 i32) (result f64))) @@ -23,7 +24,6 @@ (type $FUNCSIG$ijii (func (param i64 i32 i32) (result i32))) (type $FUNCSIG$ifii (func (param f32 i32 i32) (result i32))) (type $FUNCSIG$idii (func (param f64 i32 i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vjii (func (param i64 i32 i32))) (type $FUNCSIG$vfii (func (param f32 i32 i32))) (type $FUNCSIG$vdii (func (param f64 i32 i32))) @@ -33,38 +33,65 @@ (type $FUNCSIG$dd (func (param f64) (result f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\"\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 56) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 96) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 144) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 192) "\02\00\00\00\05\00\00\00\01\01\01\04\05") - (data (i32.const 208) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 248) "\02\00\00\00\05") - (data (i32.const 264) "\02\00\00\00\05\00\00\00\01\01") - (data (i32.const 280) "\02\00\00\00\05\00\00\00\01\01\00\02\02") - (data (i32.const 296) "\02\00\00\00\05\00\00\00\01\01\00\02\02") - (data (i32.const 312) "\02\00\00\00\03") - (data (i32.const 328) "\02\00\00\00\05\00\00\00\01\00\00\00\02") - (data (i32.const 344) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") - (data (i32.const 376) "\02\00\00\00\14") - (data (i32.const 408) "\02\00\00\00\14\00\00\00\01\00\00\00\01") - (data (i32.const 440) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 472) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 504) "\02\00\00\00\0c") - (data (i32.const 528) "\02\00\00\00\14\00\00\00\01") - (data (i32.const 552) "\02") - (data (i32.const 560) "\01\00\00\00\1e\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 600) "\01\00\00\00(\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 648) "\02\00\00\00\0c\00\00\00\n\00\00\00\0c\00\00\00\0e") - (data (i32.const 672) "\10\00\00\00\10\00\00\00\90\02\00\00\90\02\00\00\0c\00\00\00\03") - (data (i32.const 696) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 752) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 808) "\01\00\00\00>\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 880) "\01\00\00\006\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 944) "\02\00\00\00$\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") - (data (i32.const 992) "\10\00\00\00\10\00\00\00\b8\03\00\00\b8\03\00\00$\00\00\00\t") - (data (i32.const 1016) "\01\00\00\00B\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 1096) "\01\00\00\00V\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 8) "\01\00\00\00\"") + (data (i32.const 24) "s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 64) "\01\00\00\00\1e") + (data (i32.const 80) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 112) "\01\00\00\00&") + (data (i32.const 128) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 168) "\01\00\00\00$") + (data (i32.const 184) "~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 224) "\02\00\00\00\05") + (data (i32.const 240) "\01\01\01\04\05") + (data (i32.const 248) "\01\00\00\00\1a") + (data (i32.const 264) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 296) "\02\00\00\00\05") + (data (i32.const 320) "\02\00\00\00\05") + (data (i32.const 336) "\01\01") + (data (i32.const 344) "\02\00\00\00\05") + (data (i32.const 360) "\01\01\00\02\02") + (data (i32.const 368) "\02\00\00\00\05") + (data (i32.const 384) "\01\01\00\02\02") + (data (i32.const 392) "\02\00\00\00\03") + (data (i32.const 416) "\02\00\00\00\05") + (data (i32.const 432) "\01\00\00\00\02") + (data (i32.const 440) "\02\00\00\00\14") + (data (i32.const 456) "\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") + (data (i32.const 480) "\02\00\00\00\14") + (data (i32.const 520) "\02\00\00\00\14") + (data (i32.const 536) "\01\00\00\00\01") + (data (i32.const 560) "\02\00\00\00\14") + (data (i32.const 576) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") + (data (i32.const 600) "\02\00\00\00\14") + (data (i32.const 616) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") + (data (i32.const 640) "\02\00\00\00\0c") + (data (i32.const 672) "\02\00\00\00\14") + (data (i32.const 688) "\01") + (data (i32.const 704) "\02") + (data (i32.const 712) "\01\00\00\00\1e") + (data (i32.const 728) "r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 760) "\01\00\00\00(") + (data (i32.const 776) "f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 816) "\02\00\00\00\0c") + (data (i32.const 832) "\n\00\00\00\0c\00\00\00\0e") + (data (i32.const 848) "\10\00\00\00\10") + (data (i32.const 864) "@\03\00\00@\03\00\00\0c\00\00\00\03") + (data (i32.const 880) "\01\00\00\00,") + (data (i32.const 896) "f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 944) "\01\00\00\00,") + (data (i32.const 960) "f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 1008) "\01\00\00\00>") + (data (i32.const 1024) "f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 1088) "\01\00\00\006") + (data (i32.const 1104) "f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 1160) "\02\00\00\00$") + (data (i32.const 1176) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") + (data (i32.const 1216) "\10\00\00\00\10") + (data (i32.const 1232) "\98\04\00\00\98\04\00\00$\00\00\00\t") + (data (i32.const 1248) "\01\00\00\00B") + (data (i32.const 1264) "T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 1336) "\01\00\00\00V") + (data (i32.const 1352) "T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") (table $0 112 funcref) (elem (i32.const 0) $null $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -83,10 +110,12 @@ (global $std/typedarray/multisubarr3 (mut i32) (i32.const 0)) (global $std/typedarray/forEachCallCount (mut i32) (i32.const 0)) (global $std/typedarray/forEachSelf (mut i32) (i32.const 0)) - (global $std/typedarray/forEachValues (mut i32) (i32.const 680)) - (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 1000)) + (global $std/typedarray/forEachValues (mut i32) (i32.const 864)) + (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 1232)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -150,12 +179,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -168,7 +197,13 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 i32.add ) (func $~lib/memory/memory.fill (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -396,76 +431,73 @@ end end ) - (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - i32.const 1192 + i32.const 1440 i32.le_u if i32.const 0 - i32.const 64 - i32.const 313 - i32.const 2 + i32.const 80 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub + local.tee $2 i32.load i32.const -1520547049 i32.ne if i32.const 0 - i32.const 64 - i32.const 314 - i32.const 2 + i32.const 80 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - i32.const 8 - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 1073741816 + i32.const 1073741808 i32.gt_u if i32.const 0 - i32.const 104 + i32.const 128 i32.const 25 i32.const 43 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.tee $1 i32.const 0 local.get $0 call $~lib/memory/memory.fill local.get $1 i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register ) - (func $~lib/runtime/ArrayBufferView#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) local.get $1 - i32.const 1073741816 + i32.const 1073741808 local.get $2 i32.shr_u i32.gt_u if i32.const 0 - i32.const 64 - i32.const 348 + i32.const 80 + i32.const 244 i32.const 57 call $~lib/env/abort unreachable @@ -475,14 +507,14 @@ i32.shl local.tee $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 + local.set $3 local.get $0 i32.eqz if i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 end local.get $0 @@ -495,116 +527,124 @@ i32.const 0 i32.store offset=8 local.get $0 + local.set $2 + local.get $3 + local.tee $0 + local.get $2 + i32.load + i32.ne + drop local.get $2 - i32.store local.get $0 + i32.store local.get $2 - i32.store offset=4 local.get $0 + i32.store offset=4 + local.get $2 local.get $1 i32.store offset=8 - local.get $0 + local.get $2 ) - (func $~lib/typedarray/Int8Array#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.get $0 i32.const 0 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint8Array#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 5 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.get $0 i32.const 0 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint8ClampedArray#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 6 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.get $0 i32.const 0 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int16Array#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 7 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.get $0 i32.const 1 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint16Array#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 8 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.get $0 i32.const 1 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int32Array#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 9 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.get $0 i32.const 2 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint32Array#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 10 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.get $0 i32.const 2 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int64Array#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 11 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.get $0 i32.const 3 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint64Array#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 12 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.get $0 i32.const 3 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Float32Array#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 13 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.get $0 i32.const 2 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Float64Array#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 14 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.get $0 i32.const 3 call $~lib/runtime/ArrayBufferView#constructor ) - (func $std/typedarray/testInstantiate (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/typedarray/testInstantiate (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 call $~lib/typedarray/Int8Array#constructor @@ -615,8 +655,8 @@ i32.sub if i32.const 0 - i32.const 16 - i32.const 34 + i32.const 24 + i32.const 35 i32.const 2 call $~lib/env/abort unreachable @@ -627,8 +667,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 35 + i32.const 24 + i32.const 36 i32.const 2 call $~lib/env/abort unreachable @@ -639,8 +679,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 36 + i32.const 24 + i32.const 37 i32.const 2 call $~lib/env/abort unreachable @@ -654,8 +694,8 @@ i32.sub if i32.const 0 - i32.const 16 - i32.const 39 + i32.const 24 + i32.const 40 i32.const 2 call $~lib/env/abort unreachable @@ -666,8 +706,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 40 + i32.const 24 + i32.const 41 i32.const 2 call $~lib/env/abort unreachable @@ -678,8 +718,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 41 + i32.const 24 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -693,8 +733,8 @@ i32.sub if i32.const 0 - i32.const 16 - i32.const 44 + i32.const 24 + i32.const 45 i32.const 2 call $~lib/env/abort unreachable @@ -705,8 +745,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 45 + i32.const 24 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -717,8 +757,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 46 + i32.const 24 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable @@ -732,8 +772,8 @@ i32.sub if i32.const 0 - i32.const 16 - i32.const 49 + i32.const 24 + i32.const 50 i32.const 2 call $~lib/env/abort unreachable @@ -746,8 +786,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 50 + i32.const 24 + i32.const 51 i32.const 2 call $~lib/env/abort unreachable @@ -760,8 +800,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 51 + i32.const 24 + i32.const 52 i32.const 2 call $~lib/env/abort unreachable @@ -775,8 +815,8 @@ i32.sub if i32.const 0 - i32.const 16 - i32.const 54 + i32.const 24 + i32.const 55 i32.const 2 call $~lib/env/abort unreachable @@ -789,8 +829,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 55 + i32.const 24 + i32.const 56 i32.const 2 call $~lib/env/abort unreachable @@ -803,8 +843,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 56 + i32.const 24 + i32.const 57 i32.const 2 call $~lib/env/abort unreachable @@ -818,8 +858,8 @@ i32.sub if i32.const 0 - i32.const 16 - i32.const 59 + i32.const 24 + i32.const 60 i32.const 2 call $~lib/env/abort unreachable @@ -832,8 +872,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 60 + i32.const 24 + i32.const 61 i32.const 2 call $~lib/env/abort unreachable @@ -846,8 +886,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 61 + i32.const 24 + i32.const 62 i32.const 2 call $~lib/env/abort unreachable @@ -861,8 +901,8 @@ i32.sub if i32.const 0 - i32.const 16 - i32.const 64 + i32.const 24 + i32.const 65 i32.const 2 call $~lib/env/abort unreachable @@ -875,8 +915,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 65 + i32.const 24 + i32.const 66 i32.const 2 call $~lib/env/abort unreachable @@ -889,8 +929,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 66 + i32.const 24 + i32.const 67 i32.const 2 call $~lib/env/abort unreachable @@ -904,8 +944,8 @@ i32.sub if i32.const 0 - i32.const 16 - i32.const 69 + i32.const 24 + i32.const 70 i32.const 2 call $~lib/env/abort unreachable @@ -918,8 +958,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 70 + i32.const 24 + i32.const 71 i32.const 2 call $~lib/env/abort unreachable @@ -932,8 +972,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 71 + i32.const 24 + i32.const 72 i32.const 2 call $~lib/env/abort unreachable @@ -947,8 +987,8 @@ i32.sub if i32.const 0 - i32.const 16 - i32.const 74 + i32.const 24 + i32.const 75 i32.const 2 call $~lib/env/abort unreachable @@ -961,8 +1001,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 75 + i32.const 24 + i32.const 76 i32.const 2 call $~lib/env/abort unreachable @@ -975,8 +1015,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 76 + i32.const 24 + i32.const 77 i32.const 2 call $~lib/env/abort unreachable @@ -990,8 +1030,8 @@ i32.sub if i32.const 0 - i32.const 16 - i32.const 79 + i32.const 24 + i32.const 80 i32.const 2 call $~lib/env/abort unreachable @@ -1004,8 +1044,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 80 + i32.const 24 + i32.const 81 i32.const 2 call $~lib/env/abort unreachable @@ -1018,8 +1058,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 81 + i32.const 24 + i32.const 82 i32.const 2 call $~lib/env/abort unreachable @@ -1033,8 +1073,8 @@ i32.sub if i32.const 0 - i32.const 16 - i32.const 84 + i32.const 24 + i32.const 85 i32.const 2 call $~lib/env/abort unreachable @@ -1047,8 +1087,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 85 + i32.const 24 + i32.const 86 i32.const 2 call $~lib/env/abort unreachable @@ -1061,14 +1101,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 86 + i32.const 24 + i32.const 87 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int32Array#__set (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#__set (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1077,7 +1117,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 442 i32.const 63 call $~lib/env/abort @@ -1092,7 +1132,7 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int32Array#__get (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#__get (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1101,7 +1141,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 436 i32.const 63 call $~lib/env/abort @@ -1115,9 +1155,10 @@ i32.add i32.load ) - (func $~lib/typedarray/Int32Array#subarray (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $0 local.tee $4 i32.load offset=8 @@ -1175,34 +1216,42 @@ end local.set $2 i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 9 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 local.get $4 i32.load offset=4 - local.set $3 + local.set $5 local.get $0 + local.set $3 local.get $4 i32.load - i32.store + local.tee $0 + local.get $3 + i32.load + i32.ne + drop + local.get $3 local.get $0 + i32.store + local.get $3 local.get $1 i32.const 2 i32.shl - local.get $3 + local.get $5 i32.add i32.store offset=4 - local.get $0 + local.get $3 local.get $2 local.get $1 i32.sub i32.const 2 i32.shl i32.store offset=8 - local.get $0 + local.get $3 ) - (func $~lib/typedarray/Float64Array#__set (; 23 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/typedarray/Float64Array#__set (; 22 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 local.get $0 i32.load offset=8 @@ -1211,7 +1260,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 852 i32.const 63 call $~lib/env/abort @@ -1226,9 +1275,10 @@ local.get $2 f64.store ) - (func $~lib/typedarray/Float64Array#subarray (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#subarray (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $0 local.tee $4 i32.load offset=8 @@ -1286,34 +1336,42 @@ end local.set $2 i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 14 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 local.get $4 i32.load offset=4 - local.set $3 + local.set $5 local.get $0 + local.set $3 local.get $4 i32.load - i32.store + local.tee $0 + local.get $3 + i32.load + i32.ne + drop + local.get $3 local.get $0 + i32.store + local.get $3 local.get $1 i32.const 3 i32.shl - local.get $3 + local.get $5 i32.add i32.store offset=4 - local.get $0 + local.get $3 local.get $2 local.get $1 i32.sub i32.const 3 i32.shl i32.store offset=8 - local.get $0 + local.get $3 ) - (func $~lib/util/sort/insertionSort (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) @@ -1395,7 +1453,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1651,7 +1709,7 @@ local.get $6 f64.store ) - (func $~lib/typedarray/Float64Array#sort (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#sort (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 f64) @@ -1711,7 +1769,7 @@ end end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 28 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 27 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -1740,7 +1798,7 @@ i64.lt_s i32.sub ) - (func $~lib/typedarray/Float64Array#__get (; 29 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/typedarray/Float64Array#__get (; 28 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -1749,7 +1807,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 846 i32.const 63 call $~lib/env/abort @@ -1763,14 +1821,14 @@ i32.add f64.load ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 196 i32.const 44 call $~lib/env/abort @@ -1795,14 +1853,14 @@ i32.and i32.store8 ) - (func $~lib/typedarray/Uint8ClampedArray#__get (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#__get (; 30 ;) (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 152 + i32.const 184 i32.const 190 i32.const 44 call $~lib/env/abort @@ -1814,14 +1872,14 @@ i32.add i32.load8_u ) - (func $~lib/typedarray/Int8Array#__set (; 32 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int8Array#__set (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 32 i32.const 44 call $~lib/env/abort @@ -1834,7 +1892,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Int8Array#fill (; 33 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/typedarray/Int8Array#fill (; 32 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) local.get $0 @@ -1901,7 +1959,7 @@ call $~lib/memory/memory.fill end ) - (func $~lib/util/memory/memcpy (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2798,7 +2856,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2992,48 +3050,55 @@ end end ) - (func $~lib/runtime/doMakeArray (; 36 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/makeArray (; 35 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) + (local $5 i32) i32.const 16 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.get $2 - call $~lib/runtime/doRegister - local.tee $2 + call $~lib/runtime/register + local.set $4 local.get $0 local.get $3 i32.shl - local.tee $3 - call $~lib/runtime/doAllocate + local.tee $5 + call $~lib/runtime/allocate i32.const 2 - call $~lib/runtime/doRegister - local.tee $4 - i32.store - local.get $2 + call $~lib/runtime/register + local.tee $3 + local.set $2 + local.get $4 + i32.load + drop local.get $4 - i32.store offset=4 local.get $2 + i32.store + local.get $4 local.get $3 + i32.store offset=4 + local.get $4 + local.get $5 i32.store offset=8 - local.get $2 + local.get $4 local.get $0 i32.store offset=12 local.get $1 if - local.get $4 - local.get $1 local.get $3 + local.get $1 + local.get $5 call $~lib/memory/memory.copy end - local.get $2 + local.get $4 ) - (func $~lib/typedarray/Int8Array#__get (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 36 ;) (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 152 + i32.const 184 i32.const 26 i32.const 44 call $~lib/env/abort @@ -3045,26 +3110,26 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__get (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 37 ;) (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 216 - i32.const 100 + i32.const 264 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable end - local.get $1 local.get $0 i32.load offset=4 + local.get $1 i32.add i32.load8_s ) - (func $std/typedarray/isInt8ArrayEqual (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3106,9 +3171,10 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $0 local.tee $4 i32.load offset=8 @@ -3164,30 +3230,38 @@ end local.set $2 i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 local.get $4 i32.load offset=4 - local.set $3 + local.set $5 local.get $0 + local.set $3 local.get $4 i32.load - i32.store + local.tee $0 + local.get $3 + i32.load + i32.ne + drop + local.get $3 local.get $0 - local.get $1 + i32.store local.get $3 + local.get $1 + local.get $5 i32.add i32.store offset=4 - local.get $0 + local.get $3 local.get $2 local.get $1 i32.sub i32.store offset=8 - local.get $0 + local.get $3 ) - (func $~lib/typedarray/Int32Array#fill (; 41 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/typedarray/Int32Array#fill (; 40 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) local.get $0 @@ -3263,7 +3337,7 @@ end end ) - (func $~lib/array/Array#__get (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3272,8 +3346,8 @@ i32.ge_u if i32.const 0 - i32.const 216 - i32.const 100 + i32.const 264 + i32.const 98 i32.const 61 call $~lib/env/abort unreachable @@ -3286,7 +3360,7 @@ i32.add i32.load ) - (func $std/typedarray/isInt32ArrayEqual (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3332,12 +3406,12 @@ end i32.const 1 ) - (func $std/typedarray/testReduce~anonymous|0 (; 44 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 43 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduce (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3374,7 +3448,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce (; 46 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 45 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -3398,21 +3472,21 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#__set (; 47 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 46 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 114 i32.const 44 call $~lib/env/abort @@ -3425,7 +3499,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Uint8Array#reduce (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3462,7 +3536,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 49 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 48 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -3487,14 +3561,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduce (; 50 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 49 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -3519,14 +3593,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int16Array#__set (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3535,7 +3609,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 278 i32.const 63 call $~lib/env/abort @@ -3550,7 +3624,7 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Int16Array#reduce (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduce (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3591,7 +3665,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce (; 53 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 52 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -3615,14 +3689,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#__set (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3631,7 +3705,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 360 i32.const 63 call $~lib/env/abort @@ -3646,7 +3720,7 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Uint16Array#reduce (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduce (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3687,7 +3761,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce (; 56 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 55 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -3711,14 +3785,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int32Array#reduce (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3759,7 +3833,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 58 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 57 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -3782,14 +3856,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint32Array#__set (; 59 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint32Array#__set (; 58 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3798,7 +3872,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 524 i32.const 63 call $~lib/env/abort @@ -3813,7 +3887,7 @@ local.get $2 i32.store ) - (func $std/typedarray/testReduce (; 60 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 59 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -3836,14 +3910,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int64Array#__set (; 61 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 60 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -3852,7 +3926,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 606 i32.const 63 call $~lib/env/abort @@ -3867,12 +3941,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce~anonymous|0 (; 62 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce~anonymous|0 (; 61 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 63 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 62 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -3913,7 +3987,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 64 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 63 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -3936,14 +4010,14 @@ i64.ne if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint64Array#__set (; 65 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Uint64Array#__set (; 64 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -3952,7 +4026,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 688 i32.const 63 call $~lib/env/abort @@ -3967,7 +4041,7 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce (; 66 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 65 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -3990,14 +4064,14 @@ i64.ne if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Float32Array#__set (; 67 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 66 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -4006,7 +4080,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 770 i32.const 63 call $~lib/env/abort @@ -4021,12 +4095,12 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce~anonymous|0 (; 68 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce~anonymous|0 (; 67 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 69 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $~lib/typedarray/Float32Array#reduce (; 68 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) (local $1 i32) (local $2 f32) (local $3 i32) @@ -4067,7 +4141,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce (; 70 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 69 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -4089,19 +4163,19 @@ f32.ne if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 71 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce~anonymous|0 (; 70 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 72 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/typedarray/Float64Array#reduce (; 71 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -4142,7 +4216,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce (; 73 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 72 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -4164,14 +4238,14 @@ f64.ne if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int8Array#reduceRight (; 74 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduceRight (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4209,7 +4283,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight (; 75 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 74 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -4233,14 +4307,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 75 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4278,7 +4352,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 77 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 76 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -4303,14 +4377,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight (; 78 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 77 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -4335,14 +4409,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int16Array#reduceRight (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduceRight (; 78 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4384,7 +4458,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight (; 80 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 79 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -4408,14 +4482,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 81 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4457,7 +4531,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight (; 82 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 81 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -4481,14 +4555,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int32Array#reduceRight (; 83 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 82 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4530,7 +4604,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 84 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 83 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -4553,14 +4627,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight (; 85 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 84 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -4583,14 +4657,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int64Array#reduceRight (; 86 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 85 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -4632,7 +4706,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 87 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 86 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -4655,14 +4729,14 @@ i64.ne if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight (; 88 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 87 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -4685,14 +4759,14 @@ i64.ne if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Float32Array#reduceRight (; 89 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $~lib/typedarray/Float32Array#reduceRight (; 88 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) (local $1 i32) (local $2 f32) (local $3 i32) @@ -4734,7 +4808,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight (; 90 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 89 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -4756,14 +4830,14 @@ f32.ne if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Float64Array#reduceRight (; 91 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/typedarray/Float64Array#reduceRight (; 90 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -4805,7 +4879,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight (; 92 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 91 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -4827,19 +4901,19 @@ f64.ne if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 92 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4885,7 +4959,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap (; 95 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 94 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -4910,8 +4984,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -4923,8 +4997,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -4936,14 +5010,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#map (; 96 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 95 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4989,14 +5063,14 @@ end local.get $2 ) - (func $~lib/typedarray/Uint8Array#__get (; 97 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__get (; 96 ;) (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 152 + i32.const 184 i32.const 108 i32.const 44 call $~lib/env/abort @@ -5008,7 +5082,7 @@ i32.add i32.load8_u ) - (func $std/typedarray/testArrayMap (; 98 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 97 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -5033,8 +5107,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5046,8 +5120,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5059,14 +5133,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 99 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 98 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5112,7 +5186,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap (; 100 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 99 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -5137,8 +5211,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5150,8 +5224,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5163,14 +5237,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int16Array#map (; 101 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 100 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5225,7 +5299,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#__get (; 102 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 101 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5234,7 +5308,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 272 i32.const 63 call $~lib/env/abort @@ -5248,7 +5322,7 @@ i32.add i32.load16_s ) - (func $std/typedarray/testArrayMap (; 103 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 102 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -5273,8 +5347,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5286,8 +5360,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5299,14 +5373,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#map (; 104 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 103 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5361,7 +5435,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint16Array#__get (; 105 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 104 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5370,7 +5444,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 354 i32.const 63 call $~lib/env/abort @@ -5384,7 +5458,7 @@ i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap (; 106 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 105 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -5409,8 +5483,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5422,8 +5496,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5435,14 +5509,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int32Array#map (; 107 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 106 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5497,7 +5571,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap (; 108 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 107 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -5522,8 +5596,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5535,8 +5609,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5548,14 +5622,14 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint32Array#map (; 109 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 108 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5610,7 +5684,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint32Array#__get (; 110 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5619,7 +5693,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 518 i32.const 63 call $~lib/env/abort @@ -5633,7 +5707,7 @@ i32.add i32.load ) - (func $std/typedarray/testArrayMap (; 111 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 110 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -5658,8 +5732,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5671,8 +5745,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5684,19 +5758,19 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 112 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 111 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 113 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 112 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5751,7 +5825,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#__get (; 114 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 113 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -5760,7 +5834,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 600 i32.const 63 call $~lib/env/abort @@ -5774,7 +5848,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap (; 115 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 114 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -5799,8 +5873,8 @@ i64.ne if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5812,8 +5886,8 @@ i64.ne if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5825,14 +5899,14 @@ i64.ne if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint64Array#map (; 116 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5887,7 +5961,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint64Array#__get (; 117 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__get (; 116 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -5896,7 +5970,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 682 i32.const 63 call $~lib/env/abort @@ -5910,7 +5984,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap (; 118 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 117 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -5935,8 +6009,8 @@ i64.ne if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5948,8 +6022,8 @@ i64.ne if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5961,19 +6035,19 @@ i64.ne if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 119 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 118 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 120 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 119 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6028,7 +6102,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#__get (; 121 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 120 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -6037,7 +6111,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 764 i32.const 63 call $~lib/env/abort @@ -6051,7 +6125,7 @@ i32.add f32.load ) - (func $std/typedarray/testArrayMap (; 122 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 121 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -6076,8 +6150,8 @@ f32.ne if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -6089,8 +6163,8 @@ f32.ne if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -6102,19 +6176,19 @@ f32.ne if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 123 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 122 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 124 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6169,7 +6243,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap (; 125 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 124 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -6194,8 +6268,8 @@ f64.ne if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -6207,8 +6281,8 @@ f64.ne if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -6220,21 +6294,21 @@ f64.ne if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 126 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 125 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6273,13 +6347,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 128 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 127 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.eqz ) - (func $std/typedarray/testArraySome (; 129 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 128 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -6301,8 +6375,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -6312,14 +6386,14 @@ call $~lib/typedarray/Int8Array#some if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#some (; 130 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6358,7 +6432,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome (; 131 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 130 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -6380,8 +6454,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -6391,14 +6465,14 @@ call $~lib/typedarray/Uint8Array#some if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome (; 132 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 131 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -6420,8 +6494,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -6431,21 +6505,21 @@ call $~lib/typedarray/Uint8Array#some if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 133 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 132 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 134 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6488,13 +6562,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 135 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 134 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.eqz ) - (func $std/typedarray/testArraySome (; 136 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 135 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -6516,8 +6590,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -6527,14 +6601,14 @@ call $~lib/typedarray/Int16Array#some if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#some (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6577,7 +6651,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome (; 138 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 137 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -6599,8 +6673,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -6610,19 +6684,19 @@ call $~lib/typedarray/Uint16Array#some if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 139 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 138 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6665,11 +6739,11 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 141 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 140 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $std/typedarray/testArraySome (; 142 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 141 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -6691,8 +6765,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -6702,14 +6776,14 @@ call $~lib/typedarray/Int32Array#some if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome (; 143 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 142 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -6731,8 +6805,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -6742,19 +6816,19 @@ call $~lib/typedarray/Int32Array#some if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 144 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 143 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 145 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6797,12 +6871,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 146 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 145 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome (; 147 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 146 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -6824,8 +6898,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -6835,14 +6909,14 @@ call $~lib/typedarray/Int64Array#some if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome (; 148 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 147 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -6864,8 +6938,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -6875,19 +6949,19 @@ call $~lib/typedarray/Int64Array#some if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 149 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 148 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6930,12 +7004,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 151 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 150 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome (; 152 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 151 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -6957,8 +7031,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -6968,19 +7042,19 @@ call $~lib/typedarray/Float32Array#some if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 153 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 152 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7023,12 +7097,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 155 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 154 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome (; 156 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 155 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -7050,8 +7124,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -7061,14 +7135,14 @@ call $~lib/typedarray/Float64Array#some if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int8Array#findIndex (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 156 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7110,14 +7184,14 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 158 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 157 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 159 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 158 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -7139,9 +7213,9 @@ i32.const 1 i32.ne if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -7152,15 +7226,15 @@ i32.const -1 i32.ne if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#findIndex (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7202,7 +7276,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex (; 161 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 160 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -7224,9 +7298,9 @@ i32.const 1 i32.ne if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -7237,15 +7311,15 @@ i32.const -1 i32.ne if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex (; 162 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 161 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -7267,9 +7341,9 @@ i32.const 1 i32.ne if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -7280,15 +7354,15 @@ i32.const -1 i32.ne if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int16Array#findIndex (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7334,14 +7408,14 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 164 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 163 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 165 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 164 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -7363,9 +7437,9 @@ i32.const 1 i32.ne if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -7376,15 +7450,15 @@ i32.const -1 i32.ne if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#findIndex (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7430,7 +7504,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex (; 167 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 166 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -7452,9 +7526,9 @@ i32.const 1 i32.ne if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -7465,15 +7539,15 @@ i32.const -1 i32.ne if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int32Array#findIndex (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7519,12 +7593,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 169 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 168 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 170 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 169 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -7546,9 +7620,9 @@ i32.const 1 i32.ne if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -7559,15 +7633,15 @@ i32.const -1 i32.ne if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex (; 171 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 170 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -7589,9 +7663,9 @@ i32.const 1 i32.ne if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -7602,15 +7676,15 @@ i32.const -1 i32.ne if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int64Array#findIndex (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7656,12 +7730,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 173 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 172 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex (; 174 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 173 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -7683,9 +7757,9 @@ i32.const 1 i32.ne if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -7696,15 +7770,15 @@ i32.const -1 i32.ne if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex (; 175 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 174 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -7726,9 +7800,9 @@ i32.const 1 i32.ne if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -7739,15 +7813,15 @@ i32.const -1 i32.ne if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Float32Array#findIndex (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7793,12 +7867,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 177 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 176 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex (; 178 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 177 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -7820,9 +7894,9 @@ i32.const 1 i32.ne if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -7833,15 +7907,15 @@ i32.const -1 i32.ne if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Float64Array#findIndex (; 179 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7887,12 +7961,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 180 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 179 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex (; 181 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 180 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -7914,9 +7988,9 @@ i32.const 1 i32.ne if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -7927,15 +8001,15 @@ i32.const -1 i32.ne if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 182 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 181 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -7945,7 +8019,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int8Array#every (; 183 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7985,7 +8059,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 184 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 183 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -8007,8 +8081,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -8018,20 +8092,20 @@ call $~lib/typedarray/Int8Array#every if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 185 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 184 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#every (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 185 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8071,7 +8145,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 187 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 186 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -8093,8 +8167,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -8104,14 +8178,14 @@ call $~lib/typedarray/Uint8Array#every if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery (; 188 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 187 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -8133,8 +8207,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -8144,14 +8218,14 @@ call $~lib/typedarray/Uint8Array#every if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 189 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 188 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8161,7 +8235,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int16Array#every (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 189 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8205,7 +8279,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 191 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 190 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -8227,8 +8301,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -8238,14 +8312,14 @@ call $~lib/typedarray/Int16Array#every if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#every (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8289,7 +8363,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 193 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 192 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -8311,8 +8385,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -8322,20 +8396,20 @@ call $~lib/typedarray/Uint16Array#every if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 194 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int32Array#every (; 195 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 194 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8379,7 +8453,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 196 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 195 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -8401,8 +8475,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -8412,14 +8486,14 @@ call $~lib/typedarray/Int32Array#every if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery (; 197 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 196 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -8441,8 +8515,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -8452,21 +8526,21 @@ call $~lib/typedarray/Int32Array#every if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 198 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 197 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (; 199 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8510,7 +8584,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 200 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 199 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -8532,8 +8606,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -8543,21 +8617,21 @@ call $~lib/typedarray/Int64Array#every if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 201 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 200 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $std/typedarray/testArrayEvery (; 202 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 201 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -8579,8 +8653,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -8590,14 +8664,14 @@ call $~lib/typedarray/Int64Array#every if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/math/NativeMathf.mod (; 203 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 202 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8748,13 +8822,13 @@ local.get $0 f32.mul ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 204 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 203 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 205 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 204 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8798,7 +8872,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 206 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 205 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -8820,8 +8894,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -8831,14 +8905,14 @@ call $~lib/typedarray/Float32Array#every if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/math/NativeMath.mod (; 207 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 206 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -8997,13 +9071,13 @@ local.get $0 f64.mul ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 208 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 207 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 209 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9047,7 +9121,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery (; 210 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 209 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -9069,8 +9143,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -9080,14 +9154,14 @@ call $~lib/typedarray/Float64Array#every if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 211 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 210 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 255 i32.and @@ -9098,9 +9172,9 @@ i32.and i32.ne if - i32.const 704 - i32.const 16 - i32.const 425 + i32.const 896 + i32.const 24 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -9109,9 +9183,9 @@ global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 760 - i32.const 16 - i32.const 426 + i32.const 960 + i32.const 24 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -9120,9 +9194,9 @@ global.get $std/typedarray/forEachSelf i32.ne if - i32.const 816 - i32.const 16 - i32.const 427 + i32.const 1024 + i32.const 24 + i32.const 428 i32.const 4 call $~lib/env/abort unreachable @@ -9132,7 +9206,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 212 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Int8Array#forEach (; 211 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9165,7 +9239,7 @@ end end ) - (func $std/typedarray/testArrayForEach (; 213 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 212 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9209,15 +9283,15 @@ i32.const 3 i32.ne if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#forEach (; 214 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 213 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9250,7 +9324,7 @@ end end ) - (func $std/typedarray/testArrayForEach (; 215 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 214 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9289,15 +9363,15 @@ i32.const 3 i32.ne if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach (; 216 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 215 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9336,15 +9410,15 @@ i32.const 3 i32.ne if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 217 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 216 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 65535 i32.and @@ -9355,9 +9429,9 @@ i32.and i32.ne if - i32.const 704 - i32.const 16 - i32.const 425 + i32.const 896 + i32.const 24 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -9366,9 +9440,9 @@ global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 760 - i32.const 16 - i32.const 426 + i32.const 960 + i32.const 24 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -9377,9 +9451,9 @@ global.get $std/typedarray/forEachSelf i32.ne if - i32.const 816 - i32.const 16 - i32.const 427 + i32.const 1024 + i32.const 24 + i32.const 428 i32.const 4 call $~lib/env/abort unreachable @@ -9389,7 +9463,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 218 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Int16Array#forEach (; 217 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9426,7 +9500,7 @@ end end ) - (func $std/typedarray/testArrayForEach (; 219 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 218 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9470,15 +9544,15 @@ i32.const 3 i32.ne if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#forEach (; 220 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 219 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9515,7 +9589,7 @@ end end ) - (func $std/typedarray/testArrayForEach (; 221 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 220 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9553,24 +9627,24 @@ i32.const 3 i32.ne if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 222 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 221 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/typedarray/forEachValues local.get $1 call $~lib/array/Array#__get local.get $0 i32.ne if - i32.const 704 - i32.const 16 - i32.const 425 + i32.const 896 + i32.const 24 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -9579,9 +9653,9 @@ global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 760 - i32.const 16 - i32.const 426 + i32.const 960 + i32.const 24 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -9590,9 +9664,9 @@ global.get $std/typedarray/forEachSelf i32.ne if - i32.const 816 - i32.const 16 - i32.const 427 + i32.const 1024 + i32.const 24 + i32.const 428 i32.const 4 call $~lib/env/abort unreachable @@ -9602,7 +9676,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 223 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 222 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9639,7 +9713,7 @@ end end ) - (func $std/typedarray/testArrayForEach (; 224 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 223 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9672,15 +9746,15 @@ i32.const 3 i32.ne if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach (; 225 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 224 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9713,15 +9787,15 @@ i32.const 3 i32.ne if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 226 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 225 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) local.get $0 global.get $std/typedarray/forEachValues local.get $1 @@ -9729,9 +9803,9 @@ i64.extend_i32_s i64.ne if - i32.const 704 - i32.const 16 - i32.const 425 + i32.const 896 + i32.const 24 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -9740,9 +9814,9 @@ global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 760 - i32.const 16 - i32.const 426 + i32.const 960 + i32.const 24 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -9751,9 +9825,9 @@ global.get $std/typedarray/forEachSelf i32.ne if - i32.const 816 - i32.const 16 - i32.const 427 + i32.const 1024 + i32.const 24 + i32.const 428 i32.const 4 call $~lib/env/abort unreachable @@ -9763,7 +9837,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 227 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 226 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9800,7 +9874,7 @@ end end ) - (func $std/typedarray/testArrayForEach (; 228 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 227 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9836,15 +9910,15 @@ i32.const 3 i32.ne if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach (; 229 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 228 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9880,15 +9954,15 @@ i32.const 3 i32.ne if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 230 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 229 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) local.get $0 global.get $std/typedarray/forEachValues local.get $1 @@ -9896,9 +9970,9 @@ f32.convert_i32_s f32.ne if - i32.const 704 - i32.const 16 - i32.const 425 + i32.const 896 + i32.const 24 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -9907,9 +9981,9 @@ global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 760 - i32.const 16 - i32.const 426 + i32.const 960 + i32.const 24 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -9918,9 +9992,9 @@ global.get $std/typedarray/forEachSelf i32.ne if - i32.const 816 - i32.const 16 - i32.const 427 + i32.const 1024 + i32.const 24 + i32.const 428 i32.const 4 call $~lib/env/abort unreachable @@ -9930,7 +10004,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 231 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Float32Array#forEach (; 230 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9967,7 +10041,7 @@ end end ) - (func $std/typedarray/testArrayForEach (; 232 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 231 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -10002,15 +10076,15 @@ i32.const 3 i32.ne if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 233 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 232 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) local.get $0 global.get $std/typedarray/forEachValues local.get $1 @@ -10018,9 +10092,9 @@ f64.convert_i32_s f64.ne if - i32.const 704 - i32.const 16 - i32.const 425 + i32.const 896 + i32.const 24 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -10029,9 +10103,9 @@ global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 760 - i32.const 16 - i32.const 426 + i32.const 960 + i32.const 24 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -10040,9 +10114,9 @@ global.get $std/typedarray/forEachSelf i32.ne if - i32.const 816 - i32.const 16 - i32.const 427 + i32.const 1024 + i32.const 24 + i32.const 428 i32.const 4 call $~lib/env/abort unreachable @@ -10052,7 +10126,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 234 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Float64Array#forEach (; 233 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10089,7 +10163,7 @@ end end ) - (func $std/typedarray/testArrayForEach (; 235 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 234 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -10124,15 +10198,15 @@ i32.const 3 i32.ne if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int8Array#reverse (; 236 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 235 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10180,7 +10254,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayReverse (; 237 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 236 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10251,9 +10325,9 @@ i32.shr_s i32.ne if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -10278,9 +10352,9 @@ i32.const 8 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -10291,9 +10365,9 @@ i32.const 7 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -10304,9 +10378,9 @@ i32.const 6 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -10317,15 +10391,15 @@ i32.const 5 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 238 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 237 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10373,11 +10447,12 @@ end local.get $0 ) - (func $~lib/typedarray/Uint8Array#subarray (; 239 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 238 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) i32.const 8 local.get $0 local.tee $3 @@ -10401,30 +10476,38 @@ select local.set $4 i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 5 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 local.get $3 i32.load offset=4 - local.set $1 + local.set $5 local.get $0 + local.set $1 local.get $3 i32.load - i32.store + local.tee $0 + local.get $1 + i32.load + i32.ne + drop + local.get $1 local.get $0 + i32.store local.get $1 local.get $2 + local.get $5 i32.add i32.store offset=4 - local.get $0 + local.get $1 local.get $4 local.get $2 i32.sub i32.store offset=8 - local.get $0 + local.get $1 ) - (func $std/typedarray/testArrayReverse (; 240 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 239 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10489,9 +10572,9 @@ i32.and i32.ne if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -10514,9 +10597,9 @@ i32.const 8 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -10527,9 +10610,9 @@ i32.const 7 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -10540,9 +10623,9 @@ i32.const 6 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -10553,19 +10636,20 @@ i32.const 5 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 241 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 240 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) i32.const 8 local.get $0 local.tee $3 @@ -10589,30 +10673,38 @@ select local.set $4 i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 6 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 local.get $3 i32.load offset=4 - local.set $1 + local.set $5 local.get $0 + local.set $1 local.get $3 i32.load - i32.store + local.tee $0 + local.get $1 + i32.load + i32.ne + drop + local.get $1 local.get $0 + i32.store local.get $1 local.get $2 + local.get $5 i32.add i32.store offset=4 - local.get $0 + local.get $1 local.get $4 local.get $2 i32.sub i32.store offset=8 - local.get $0 + local.get $1 ) - (func $std/typedarray/testArrayReverse (; 242 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 241 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10677,9 +10769,9 @@ i32.and i32.ne if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -10702,9 +10794,9 @@ i32.const 8 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -10715,9 +10807,9 @@ i32.const 7 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -10728,9 +10820,9 @@ i32.const 6 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -10741,15 +10833,15 @@ i32.const 5 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 243 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 242 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10803,11 +10895,12 @@ end local.get $0 ) - (func $~lib/typedarray/Int16Array#subarray (; 244 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 243 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) i32.const 8 local.get $0 local.tee $3 @@ -10833,34 +10926,42 @@ select local.set $4 i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 7 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 local.get $3 i32.load offset=4 - local.set $1 + local.set $5 local.get $0 + local.set $1 local.get $3 i32.load - i32.store + local.tee $0 + local.get $1 + i32.load + i32.ne + drop + local.get $1 local.get $0 + i32.store + local.get $1 local.get $2 i32.const 1 i32.shl - local.get $1 + local.get $5 i32.add i32.store offset=4 - local.get $0 + local.get $1 local.get $4 local.get $2 i32.sub i32.const 1 i32.shl i32.store offset=8 - local.get $0 + local.get $1 ) - (func $std/typedarray/testArrayReverse (; 245 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 244 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10931,9 +11032,9 @@ i32.shr_s i32.ne if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -10956,9 +11057,9 @@ i32.const 8 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -10969,9 +11070,9 @@ i32.const 7 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -10982,9 +11083,9 @@ i32.const 6 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -10995,15 +11096,15 @@ i32.const 5 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 246 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 245 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11057,11 +11158,12 @@ end local.get $0 ) - (func $~lib/typedarray/Uint16Array#subarray (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 246 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) i32.const 8 local.get $0 local.tee $3 @@ -11087,34 +11189,42 @@ select local.set $4 i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 8 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 local.get $3 i32.load offset=4 - local.set $1 + local.set $5 local.get $0 + local.set $1 local.get $3 i32.load - i32.store - local.get $0 + local.tee $0 + local.get $1 + i32.load + i32.ne + drop + local.get $1 + local.get $0 + i32.store + local.get $1 local.get $2 i32.const 1 i32.shl - local.get $1 + local.get $5 i32.add i32.store offset=4 - local.get $0 + local.get $1 local.get $4 local.get $2 i32.sub i32.const 1 i32.shl i32.store offset=8 - local.get $0 + local.get $1 ) - (func $std/typedarray/testArrayReverse (; 248 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 247 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11179,9 +11289,9 @@ i32.and i32.ne if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -11204,9 +11314,9 @@ i32.const 8 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -11217,9 +11327,9 @@ i32.const 7 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -11230,9 +11340,9 @@ i32.const 6 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -11243,15 +11353,15 @@ i32.const 5 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 249 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 248 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11305,7 +11415,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayReverse (; 250 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 249 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11364,9 +11474,9 @@ call $~lib/array/Array#__get i32.ne if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -11391,9 +11501,9 @@ i32.const 8 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -11404,9 +11514,9 @@ i32.const 7 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -11417,9 +11527,9 @@ i32.const 6 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -11430,19 +11540,20 @@ i32.const 5 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint32Array#subarray (; 251 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 250 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) i32.const 8 local.get $0 local.tee $3 @@ -11468,34 +11579,42 @@ select local.set $4 i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 10 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 local.get $3 i32.load offset=4 - local.set $1 + local.set $5 local.get $0 + local.set $1 local.get $3 i32.load - i32.store + local.tee $0 + local.get $1 + i32.load + i32.ne + drop + local.get $1 local.get $0 + i32.store + local.get $1 local.get $2 i32.const 2 i32.shl - local.get $1 + local.get $5 i32.add i32.store offset=4 - local.get $0 + local.get $1 local.get $4 local.get $2 i32.sub i32.const 2 i32.shl i32.store offset=8 - local.get $0 + local.get $1 ) - (func $std/typedarray/testArrayReverse (; 252 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 251 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11554,9 +11673,9 @@ call $~lib/array/Array#__get i32.ne if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -11579,9 +11698,9 @@ i32.const 8 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -11592,9 +11711,9 @@ i32.const 7 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -11605,9 +11724,9 @@ i32.const 6 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -11618,15 +11737,15 @@ i32.const 5 i32.ne if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int64Array#reverse (; 253 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 252 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11680,11 +11799,12 @@ end local.get $0 ) - (func $~lib/typedarray/Int64Array#subarray (; 254 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 253 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) i32.const 8 local.get $0 local.tee $3 @@ -11710,34 +11830,42 @@ select local.set $4 i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 11 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 local.get $3 i32.load offset=4 - local.set $1 + local.set $5 local.get $0 + local.set $1 local.get $3 i32.load - i32.store + local.tee $0 + local.get $1 + i32.load + i32.ne + drop + local.get $1 local.get $0 + i32.store + local.get $1 local.get $2 i32.const 3 i32.shl - local.get $1 + local.get $5 i32.add i32.store offset=4 - local.get $0 + local.get $1 local.get $4 local.get $2 i32.sub i32.const 3 i32.shl i32.store offset=8 - local.get $0 + local.get $1 ) - (func $std/typedarray/testArrayReverse (; 255 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 254 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11799,9 +11927,9 @@ i64.extend_i32_s i64.ne if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -11824,9 +11952,9 @@ i64.const 8 i64.ne if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -11837,9 +11965,9 @@ i64.const 7 i64.ne if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -11850,9 +11978,9 @@ i64.const 6 i64.ne if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -11863,19 +11991,20 @@ i64.const 5 i64.ne if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint64Array#subarray (; 256 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 255 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) i32.const 8 local.get $0 local.tee $3 @@ -11901,34 +12030,42 @@ select local.set $4 i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 12 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 local.get $3 i32.load offset=4 - local.set $1 + local.set $5 local.get $0 + local.set $1 local.get $3 i32.load - i32.store + local.tee $0 + local.get $1 + i32.load + i32.ne + drop + local.get $1 local.get $0 + i32.store + local.get $1 local.get $2 i32.const 3 i32.shl - local.get $1 + local.get $5 i32.add i32.store offset=4 - local.get $0 + local.get $1 local.get $4 local.get $2 i32.sub i32.const 3 i32.shl i32.store offset=8 - local.get $0 + local.get $1 ) - (func $std/typedarray/testArrayReverse (; 257 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 256 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11990,9 +12127,9 @@ i64.extend_i32_s i64.ne if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -12015,9 +12152,9 @@ i64.const 8 i64.ne if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -12028,9 +12165,9 @@ i64.const 7 i64.ne if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -12041,9 +12178,9 @@ i64.const 6 i64.ne if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -12054,15 +12191,15 @@ i64.const 5 i64.ne if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 258 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 257 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12116,11 +12253,12 @@ end local.get $0 ) - (func $~lib/typedarray/Float32Array#subarray (; 259 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 258 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) i32.const 8 local.get $0 local.tee $3 @@ -12146,34 +12284,42 @@ select local.set $4 i32.const 12 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 13 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $0 local.get $3 i32.load offset=4 - local.set $1 + local.set $5 local.get $0 + local.set $1 local.get $3 i32.load - i32.store + local.tee $0 + local.get $1 + i32.load + i32.ne + drop + local.get $1 local.get $0 + i32.store + local.get $1 local.get $2 i32.const 2 i32.shl - local.get $1 + local.get $5 i32.add i32.store offset=4 - local.get $0 + local.get $1 local.get $4 local.get $2 i32.sub i32.const 2 i32.shl i32.store offset=8 - local.get $0 + local.get $1 ) - (func $std/typedarray/testArrayReverse (; 260 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 259 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12235,9 +12381,9 @@ f32.convert_i32_s f32.ne if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -12260,9 +12406,9 @@ f32.const 8 f32.ne if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -12273,9 +12419,9 @@ f32.const 7 f32.ne if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -12286,9 +12432,9 @@ f32.const 6 f32.ne if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -12299,15 +12445,15 @@ f32.const 5 f32.ne if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 261 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 260 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12361,7 +12507,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayReverse (; 262 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 261 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12423,9 +12569,9 @@ f64.convert_i32_s f64.ne if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -12450,9 +12596,9 @@ f64.const 8 f64.ne if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -12463,9 +12609,9 @@ f64.const 7 f64.ne if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -12476,9 +12622,9 @@ f64.const 6 f64.ne if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -12489,18 +12635,18 @@ f64.const 5 f64.ne if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start:std/typedarray (; 263 ;) (type $FUNCSIG$v) + (func $start:std/typedarray (; 262 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - i32.const 1192 + i32.const 1440 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -12531,8 +12677,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 96 + i32.const 24 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -12545,8 +12691,8 @@ i32.sub if i32.const 0 - i32.const 16 - i32.const 97 + i32.const 24 + i32.const 98 i32.const 0 call $~lib/env/abort unreachable @@ -12557,8 +12703,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 98 + i32.const 24 + i32.const 99 i32.const 0 call $~lib/env/abort unreachable @@ -12570,8 +12716,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 99 + i32.const 24 + i32.const 100 i32.const 0 call $~lib/env/abort unreachable @@ -12583,8 +12729,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 100 + i32.const 24 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable @@ -12596,8 +12742,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 101 + i32.const 24 + i32.const 102 i32.const 0 call $~lib/env/abort unreachable @@ -12615,8 +12761,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 104 + i32.const 24 + i32.const 105 i32.const 0 call $~lib/env/abort unreachable @@ -12631,8 +12777,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 105 + i32.const 24 + i32.const 106 i32.const 0 call $~lib/env/abort unreachable @@ -12643,8 +12789,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 106 + i32.const 24 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable @@ -12656,8 +12802,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 107 + i32.const 24 + i32.const 108 i32.const 0 call $~lib/env/abort unreachable @@ -12710,8 +12856,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 121 + i32.const 24 + i32.const 122 i32.const 0 call $~lib/env/abort unreachable @@ -12726,8 +12872,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 122 + i32.const 24 + i32.const 123 i32.const 0 call $~lib/env/abort unreachable @@ -12738,8 +12884,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 123 + i32.const 24 + i32.const 124 i32.const 0 call $~lib/env/abort unreachable @@ -12804,8 +12950,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 125 + i32.const 24 + i32.const 126 i32.const 0 call $~lib/env/abort unreachable @@ -12830,8 +12976,8 @@ call $~lib/typedarray/Uint8ClampedArray#__get if i32.const 0 - i32.const 16 - i32.const 132 + i32.const 24 + i32.const 133 i32.const 0 call $~lib/env/abort unreachable @@ -12843,8 +12989,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 133 + i32.const 24 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -12856,8 +13002,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 134 + i32.const 24 + i32.const 135 i32.const 0 call $~lib/env/abort unreachable @@ -12892,16 +13038,16 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 200 + i32.const 240 i32.const 15 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 144 + i32.const 24 + i32.const 145 i32.const 0 call $~lib/env/abort unreachable @@ -12913,16 +13059,16 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 256 + i32.const 312 i32.const 15 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 147 + i32.const 24 + i32.const 148 i32.const 0 call $~lib/env/abort unreachable @@ -12934,16 +13080,16 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 272 + i32.const 336 i32.const 15 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 150 + i32.const 24 + i32.const 151 i32.const 0 call $~lib/env/abort unreachable @@ -12955,16 +13101,16 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 288 + i32.const 360 i32.const 15 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 153 + i32.const 24 + i32.const 154 i32.const 0 call $~lib/env/abort unreachable @@ -12976,16 +13122,16 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 304 + i32.const 384 i32.const 15 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 156 + i32.const 24 + i32.const 157 i32.const 0 call $~lib/env/abort unreachable @@ -13006,8 +13152,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 160 + i32.const 24 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable @@ -13022,8 +13168,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 161 + i32.const 24 + i32.const 162 i32.const 0 call $~lib/env/abort unreachable @@ -13034,40 +13180,40 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 162 + i32.const 24 + i32.const 163 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/sub8 i32.const 3 - i32.const 320 + i32.const 408 i32.const 15 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 163 + i32.const 24 + i32.const 164 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr8 i32.const 5 - i32.const 336 + i32.const 432 i32.const 15 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 164 + i32.const 24 + i32.const 165 i32.const 0 call $~lib/env/abort unreachable @@ -13102,16 +13248,16 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 352 + i32.const 456 i32.const 16 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 174 + i32.const 24 + i32.const 175 i32.const 0 call $~lib/env/abort unreachable @@ -13123,16 +13269,16 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 384 + i32.const 496 i32.const 16 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 177 + i32.const 24 + i32.const 178 i32.const 0 call $~lib/env/abort unreachable @@ -13144,16 +13290,16 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 416 + i32.const 536 i32.const 16 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 180 + i32.const 24 + i32.const 181 i32.const 0 call $~lib/env/abort unreachable @@ -13165,16 +13311,16 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 448 + i32.const 576 i32.const 16 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 183 + i32.const 24 + i32.const 184 i32.const 0 call $~lib/env/abort unreachable @@ -13186,16 +13332,16 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 480 + i32.const 616 i32.const 16 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 186 + i32.const 24 + i32.const 187 i32.const 0 call $~lib/env/abort unreachable @@ -13218,8 +13364,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 190 + i32.const 24 + i32.const 191 i32.const 0 call $~lib/env/abort unreachable @@ -13234,8 +13380,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 191 + i32.const 24 + i32.const 192 i32.const 0 call $~lib/env/abort unreachable @@ -13246,45 +13392,45 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 192 + i32.const 24 + i32.const 193 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/sub32 i32.const 3 - i32.const 512 + i32.const 656 i32.const 16 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 193 + i32.const 24 + i32.const 194 i32.const 0 call $~lib/env/abort unreachable end global.get $std/typedarray/arr32 i32.const 5 - i32.const 536 + i32.const 688 i32.const 16 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 194 + i32.const 24 + i32.const 195 i32.const 0 call $~lib/env/abort unreachable end - i32.const 134217727 + i32.const 134217726 call $~lib/typedarray/Float64Array#constructor drop i32.const 6 @@ -13326,8 +13472,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 211 + i32.const 24 + i32.const 212 i32.const 0 call $~lib/env/abort unreachable @@ -13338,8 +13484,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 212 + i32.const 24 + i32.const 213 i32.const 0 call $~lib/env/abort unreachable @@ -13354,8 +13500,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 213 + i32.const 24 + i32.const 214 i32.const 0 call $~lib/env/abort unreachable @@ -13366,8 +13512,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 214 + i32.const 24 + i32.const 215 i32.const 0 call $~lib/env/abort unreachable @@ -13384,8 +13530,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 217 + i32.const 24 + i32.const 218 i32.const 0 call $~lib/env/abort unreachable @@ -13396,8 +13542,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 218 + i32.const 24 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -13412,8 +13558,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 219 + i32.const 24 + i32.const 220 i32.const 0 call $~lib/env/abort unreachable @@ -13424,8 +13570,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 220 + i32.const 24 + i32.const 221 i32.const 0 call $~lib/env/abort unreachable @@ -13442,8 +13588,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 223 + i32.const 24 + i32.const 224 i32.const 0 call $~lib/env/abort unreachable @@ -13454,8 +13600,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 224 + i32.const 24 + i32.const 225 i32.const 0 call $~lib/env/abort unreachable @@ -13470,8 +13616,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 225 + i32.const 24 + i32.const 226 i32.const 0 call $~lib/env/abort unreachable @@ -13482,8 +13628,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 226 + i32.const 24 + i32.const 227 i32.const 0 call $~lib/env/abort unreachable @@ -13577,10 +13723,10 @@ call $std/typedarray/testArrayReverse call $std/typedarray/testArrayReverse ) - (func $start (; 264 ;) (type $FUNCSIG$v) + (func $start (; 263 ;) (type $FUNCSIG$v) call $start:std/typedarray ) - (func $null (; 265 ;) (type $FUNCSIG$v) + (func $null (; 264 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/typedarray.ts b/tests/compiler/std/typedarray.ts index a283106c5d..380aa16f83 100644 --- a/tests/compiler/std/typedarray.ts +++ b/tests/compiler/std/typedarray.ts @@ -1,3 +1,6 @@ +import "allocator/arena"; +import "collector/dummy"; + assert(Int8Array.BYTES_PER_ELEMENT == 1); assert(Uint8Array.BYTES_PER_ELEMENT == 1); assert(Uint8ClampedArray.BYTES_PER_ELEMENT == 1); @@ -26,8 +29,6 @@ function isInt32ArrayEqual(a: Int32Array, b: Array): bool { return true; } -import "allocator/arena"; - function testInstantiate(len: i32): void { var i8a = new Int8Array(len); diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 8eab4d0534..768405ab36 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -5,6 +5,7 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viid (func (param i32 i32 f64))) (type $FUNCSIG$idd (func (param f64 f64) (result i32))) (type $FUNCSIG$dii (func (param i32 i32) (result f64))) @@ -30,43 +31,42 @@ (type $FUNCSIG$if (func (param f32) (result i32))) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$id (func (param f64) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vjii (func (param i64 i32 i32))) (type $FUNCSIG$vfii (func (param f32 i32 i32))) (type $FUNCSIG$vdii (func (param f64 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\"\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 56) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 96) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 144) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 192) "\02\00\00\00\05\00\00\00\01\01\01\04\05") - (data (i32.const 208) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 248) "\02\00\00\00\05\00\00\00\00\00\00\00\00") - (data (i32.const 264) "\02\00\00\00\05\00\00\00\01\01\00\00\00") - (data (i32.const 280) "\02\00\00\00\05\00\00\00\01\01\00\02\02") - (data (i32.const 296) "\02\00\00\00\05\00\00\00\01\01\00\02\02") - (data (i32.const 312) "\02\00\00\00\03\00\00\00\00\00\00") - (data (i32.const 328) "\02\00\00\00\05\00\00\00\01\00\00\00\02") - (data (i32.const 344) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 376) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 408) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 440) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") - (data (i32.const 472) "\02\00\00\00\14\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") - (data (i32.const 504) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 528) "\02\00\00\00\14\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00") - (data (i32.const 560) "\01\00\00\00\1e\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 600) "\01\00\00\00(\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 648) "\02\00\00\00\0c\00\00\00\n\00\00\00\0c\00\00\00\0e\00\00\00") - (data (i32.const 672) "\10\00\00\00\10\00\00\00\90\02\00\00\90\02\00\00\0c\00\00\00\03\00\00\00") - (data (i32.const 696) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 752) "\01\00\00\00,\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 808) "\01\00\00\00>\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 880) "\01\00\00\006\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 944) "\02\00\00\00$\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00") - (data (i32.const 992) "\10\00\00\00\10\00\00\00\b8\03\00\00\b8\03\00\00$\00\00\00\t\00\00\00") - (data (i32.const 1016) "\01\00\00\00B\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 1096) "\01\00\00\00V\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 8) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 64) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 112) "\01\00\00\00&\00\00\00\00\00\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 168) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 224) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\01\04\05") + (data (i32.const 248) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 296) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 320) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\00\00") + (data (i32.const 344) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") + (data (i32.const 368) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") + (data (i32.const 392) "\02\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 416) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02") + (data (i32.const 440) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 480) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 520) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 560) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") + (data (i32.const 600) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") + (data (i32.const 640) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 672) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00") + (data (i32.const 712) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 760) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 816) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\0c\00\00\00\0e\00\00\00") + (data (i32.const 848) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00@\03\00\00@\03\00\00\0c\00\00\00\03\00\00\00") + (data (i32.const 880) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 944) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1008) "\01\00\00\00>\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1088) "\01\00\00\006\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1160) "\02\00\00\00$\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00") + (data (i32.const 1216) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\98\04\00\00\98\04\00\00$\00\00\00\t\00\00\00") + (data (i32.const 1248) "\01\00\00\00B\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1336) "\01\00\00\00V\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (table $0 112 funcref) (elem (i32.const 0) $null $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduce~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testReduceRight~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArrayMap~anonymous|0 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArraySome~anonymous|0 $std/typedarray/testArraySome~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayFindIndex~anonymous|0 $std/typedarray/testArrayFindIndex~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayEvery~anonymous|0 $std/typedarray/testArrayEvery~anonymous|1 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0 $std/typedarray/testArrayForEach~anonymous|0) (global $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32 (i32.const 1)) @@ -80,10 +80,9 @@ (global $~lib/typedarray/Uint64Array.BYTES_PER_ELEMENT i32 (i32.const 8)) (global $~lib/typedarray/Float32Array.BYTES_PER_ELEMENT i32 (i32.const 4)) (global $~lib/typedarray/Float64Array.BYTES_PER_ELEMENT i32 (i32.const 8)) - (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 16)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) - (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) @@ -96,18 +95,20 @@ (global $std/typedarray/sub8 (mut i32) (i32.const 0)) (global $std/typedarray/arr32 (mut i32) (i32.const 0)) (global $std/typedarray/sub32 (mut i32) (i32.const 0)) - (global $std/typedarray/MAX_F64LENGTH i32 (i32.const 134217727)) + (global $std/typedarray/MAX_F64LENGTH i32 (i32.const 134217726)) (global $std/typedarray/multisubarr (mut i32) (i32.const 0)) (global $std/typedarray/multisubarr1 (mut i32) (i32.const 0)) (global $std/typedarray/multisubarr2 (mut i32) (i32.const 0)) (global $std/typedarray/multisubarr3 (mut i32) (i32.const 0)) (global $std/typedarray/forEachCallCount (mut i32) (i32.const 0)) (global $std/typedarray/forEachSelf (mut i32) (i32.const 0)) - (global $std/typedarray/forEachValues (mut i32) (i32.const 680)) - (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 1000)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 1192)) + (global $std/typedarray/forEachValues (mut i32) (i32.const 864)) + (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 1232)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 1440)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -206,7 +207,7 @@ end return ) - (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -219,6 +220,12 @@ local.get $0 i32.store offset=4 local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 global.get $~lib/runtime/HEADER_SIZE i32.add ) @@ -479,44 +486,46 @@ end end ) - (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u i32.eqz if i32.const 0 - i32.const 64 - i32.const 313 - i32.const 2 + i32.const 80 + i32.const 161 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load global.get $~lib/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 - i32.const 64 - i32.const 314 - i32.const 2 + i32.const 80 + i32.const 163 + i32.const 4 call $~lib/env/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 + call $~lib/collector/dummy/__ref_register + local.get $0 ) (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -526,7 +535,7 @@ i32.gt_u if i32.const 0 - i32.const 104 + i32.const 128 i32.const 25 i32.const 43 call $~lib/env/abort @@ -536,7 +545,7 @@ local.get $1 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $3 local.get $3 @@ -548,12 +557,20 @@ local.set $2 local.get $2 i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register end ) - (func $~lib/runtime/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/collector/dummy/__ref_link (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/collector/dummy/__ref_unlink (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $1 global.get $~lib/runtime/MAX_BYTELENGTH local.get $2 @@ -561,8 +578,8 @@ i32.gt_u if i32.const 0 - i32.const 64 - i32.const 348 + i32.const 80 + i32.const 244 i32.const 57 call $~lib/env/abort unreachable @@ -583,12 +600,12 @@ i32.const 12 local.set $4 local.get $4 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $4 local.get $4 i32.const 3 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $0 end @@ -603,7 +620,27 @@ i32.store offset=8 local.get $0 end + local.tee $4 local.get $3 + local.tee $5 + local.get $4 + i32.load + local.tee $6 + i32.ne + if (result i32) + local.get $6 + if + local.get $6 + local.get $4 + call $~lib/collector/dummy/__ref_unlink + end + local.get $5 + local.get $4 + call $~lib/collector/dummy/__ref_link + local.get $5 + else + local.get $5 + end i32.store local.get $0 local.get $3 @@ -613,7 +650,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Int8Array#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -623,12 +660,12 @@ i32.const 12 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.get $1 i32.const 0 @@ -636,22 +673,22 @@ local.set $0 local.get $0 ) - (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load i32.sub ) - (func $~lib/runtime/ArrayBufferView#get:byteLength (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#get:byteLength (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 ) - (func $~lib/typedarray/Int8Array#get:length (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#get:length (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Uint8Array#constructor (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -661,12 +698,12 @@ i32.const 12 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 5 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.get $1 i32.const 0 @@ -674,11 +711,11 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint8Array#get:length (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#get:length (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Uint8ClampedArray#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -688,12 +725,12 @@ i32.const 12 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 6 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.get $1 i32.const 0 @@ -701,11 +738,11 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint8ClampedArray#get:length (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#get:length (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Int16Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -715,12 +752,12 @@ i32.const 12 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 7 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.get $1 i32.const 1 @@ -728,13 +765,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int16Array#get:length (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#get:length (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 1 i32.shr_u ) - (func $~lib/typedarray/Uint16Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#constructor (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -744,12 +781,12 @@ i32.const 12 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 8 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.get $1 i32.const 1 @@ -757,13 +794,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint16Array#get:length (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#get:length (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 1 i32.shr_u ) - (func $~lib/typedarray/Int32Array#constructor (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#constructor (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -773,12 +810,12 @@ i32.const 12 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 9 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.get $1 i32.const 2 @@ -786,13 +823,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int32Array#get:length (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#get:length (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Uint32Array#constructor (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#constructor (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -802,12 +839,12 @@ i32.const 12 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 10 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.get $1 i32.const 2 @@ -815,13 +852,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint32Array#get:length (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#get:length (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Int64Array#constructor (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#constructor (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -831,12 +868,12 @@ i32.const 12 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 11 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.get $1 i32.const 3 @@ -844,13 +881,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int64Array#get:length (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#get:length (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $~lib/typedarray/Uint64Array#constructor (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#constructor (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -860,12 +897,12 @@ i32.const 12 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 12 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.get $1 i32.const 3 @@ -873,13 +910,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint64Array#get:length (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#get:length (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $~lib/typedarray/Float32Array#constructor (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#constructor (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -889,12 +926,12 @@ i32.const 12 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 13 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.get $1 i32.const 2 @@ -902,13 +939,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Float32Array#get:length (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#get:length (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Float64Array#constructor (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#constructor (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -918,12 +955,12 @@ i32.const 12 local.set $2 local.get $2 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $2 local.get $2 i32.const 14 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.get $1 i32.const 3 @@ -931,13 +968,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Float64Array#get:length (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#get:length (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $std/typedarray/testInstantiate (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/typedarray/testInstantiate (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -960,8 +997,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 34 + i32.const 24 + i32.const 35 i32.const 2 call $~lib/env/abort unreachable @@ -975,8 +1012,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 35 + i32.const 24 + i32.const 36 i32.const 2 call $~lib/env/abort unreachable @@ -988,8 +1025,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 36 + i32.const 24 + i32.const 37 i32.const 2 call $~lib/env/abort unreachable @@ -1005,8 +1042,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 39 + i32.const 24 + i32.const 40 i32.const 2 call $~lib/env/abort unreachable @@ -1020,8 +1057,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 40 + i32.const 24 + i32.const 41 i32.const 2 call $~lib/env/abort unreachable @@ -1033,8 +1070,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 41 + i32.const 24 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -1050,8 +1087,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 44 + i32.const 24 + i32.const 45 i32.const 2 call $~lib/env/abort unreachable @@ -1065,8 +1102,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 45 + i32.const 24 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -1078,8 +1115,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 46 + i32.const 24 + i32.const 47 i32.const 2 call $~lib/env/abort unreachable @@ -1095,8 +1132,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 49 + i32.const 24 + i32.const 50 i32.const 2 call $~lib/env/abort unreachable @@ -1110,8 +1147,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 50 + i32.const 24 + i32.const 51 i32.const 2 call $~lib/env/abort unreachable @@ -1123,8 +1160,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 51 + i32.const 24 + i32.const 52 i32.const 2 call $~lib/env/abort unreachable @@ -1140,8 +1177,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 54 + i32.const 24 + i32.const 55 i32.const 2 call $~lib/env/abort unreachable @@ -1155,8 +1192,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 55 + i32.const 24 + i32.const 56 i32.const 2 call $~lib/env/abort unreachable @@ -1168,8 +1205,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 56 + i32.const 24 + i32.const 57 i32.const 2 call $~lib/env/abort unreachable @@ -1185,8 +1222,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 59 + i32.const 24 + i32.const 60 i32.const 2 call $~lib/env/abort unreachable @@ -1200,8 +1237,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 60 + i32.const 24 + i32.const 61 i32.const 2 call $~lib/env/abort unreachable @@ -1213,8 +1250,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 61 + i32.const 24 + i32.const 62 i32.const 2 call $~lib/env/abort unreachable @@ -1230,8 +1267,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 64 + i32.const 24 + i32.const 65 i32.const 2 call $~lib/env/abort unreachable @@ -1245,8 +1282,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 65 + i32.const 24 + i32.const 66 i32.const 2 call $~lib/env/abort unreachable @@ -1258,8 +1295,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 66 + i32.const 24 + i32.const 67 i32.const 2 call $~lib/env/abort unreachable @@ -1275,8 +1312,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 69 + i32.const 24 + i32.const 70 i32.const 2 call $~lib/env/abort unreachable @@ -1290,8 +1327,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 70 + i32.const 24 + i32.const 71 i32.const 2 call $~lib/env/abort unreachable @@ -1303,8 +1340,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 71 + i32.const 24 + i32.const 72 i32.const 2 call $~lib/env/abort unreachable @@ -1320,8 +1357,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 74 + i32.const 24 + i32.const 75 i32.const 2 call $~lib/env/abort unreachable @@ -1335,8 +1372,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 75 + i32.const 24 + i32.const 76 i32.const 2 call $~lib/env/abort unreachable @@ -1348,8 +1385,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 76 + i32.const 24 + i32.const 77 i32.const 2 call $~lib/env/abort unreachable @@ -1365,8 +1402,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 79 + i32.const 24 + i32.const 80 i32.const 2 call $~lib/env/abort unreachable @@ -1380,8 +1417,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 80 + i32.const 24 + i32.const 81 i32.const 2 call $~lib/env/abort unreachable @@ -1393,8 +1430,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 81 + i32.const 24 + i32.const 82 i32.const 2 call $~lib/env/abort unreachable @@ -1410,8 +1447,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 84 + i32.const 24 + i32.const 85 i32.const 2 call $~lib/env/abort unreachable @@ -1425,8 +1462,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 85 + i32.const 24 + i32.const 86 i32.const 2 call $~lib/env/abort unreachable @@ -1438,14 +1475,14 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 86 + i32.const 24 + i32.const 87 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int32Array#__set (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#__set (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1454,7 +1491,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 442 i32.const 63 call $~lib/env/abort @@ -1469,7 +1506,7 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int32Array#__get (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#__get (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1478,7 +1515,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 436 i32.const 63 call $~lib/env/abort @@ -1492,7 +1529,7 @@ i32.add i32.load ) - (func $~lib/typedarray/Int32Array#subarray (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1500,6 +1537,9 @@ (local $7 i32) (local $8 i32) (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 local.set $5 local.get $1 @@ -1573,12 +1613,12 @@ i32.const 12 local.set $8 local.get $8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 local.get $7 i32.const 9 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $7 local.get $5 @@ -1588,7 +1628,27 @@ i32.load offset=4 local.set $9 local.get $7 + local.tee $10 local.get $8 + local.tee $11 + local.get $10 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 local.get $9 @@ -1606,7 +1666,7 @@ i32.store offset=8 local.get $7 ) - (func $~lib/typedarray/Float64Array#__set (; 37 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/typedarray/Float64Array#__set (; 39 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 local.get $0 i32.load offset=8 @@ -1615,7 +1675,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 852 i32.const 63 call $~lib/env/abort @@ -1630,7 +1690,7 @@ local.get $2 f64.store ) - (func $~lib/typedarray/Float64Array#subarray (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#subarray (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1638,6 +1698,9 @@ (local $7 i32) (local $8 i32) (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 local.set $5 local.get $1 @@ -1711,12 +1774,12 @@ i32.const 12 local.set $8 local.get $8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 local.get $7 i32.const 14 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $7 local.get $5 @@ -1726,7 +1789,27 @@ i32.load offset=4 local.set $9 local.get $7 + local.tee $10 local.get $8 + local.tee $11 + local.get $10 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 local.get $9 @@ -1744,7 +1827,7 @@ i32.store offset=8 local.get $7 ) - (func $~lib/util/sort/insertionSort (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) @@ -1840,12 +1923,12 @@ unreachable end ) - (func $~lib/memory/memory.free (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 local.set $1 ) - (func $~lib/util/sort/weakHeapSort (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 43 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2145,7 +2228,7 @@ local.get $10 f64.store ) - (func $~lib/typedarray/Float64Array#sort (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2229,7 +2312,7 @@ local.get $3 end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 43 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 45 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -2262,7 +2345,7 @@ i64.lt_s i32.sub ) - (func $~lib/typedarray/Float64Array#sort|trampoline (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort|trampoline (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2281,7 +2364,7 @@ local.get $1 call $~lib/typedarray/Float64Array#sort ) - (func $~lib/typedarray/Float64Array#__get (; 45 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/typedarray/Float64Array#__get (; 47 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -2290,7 +2373,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 846 i32.const 63 call $~lib/env/abort @@ -2304,14 +2387,14 @@ i32.add f64.load ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 46 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 48 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 196 i32.const 44 call $~lib/env/abort @@ -2336,14 +2419,14 @@ i32.and i32.store8 ) - (func $~lib/typedarray/Uint8ClampedArray#__get (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#__get (; 49 ;) (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 152 + i32.const 184 i32.const 190 i32.const 44 call $~lib/env/abort @@ -2355,14 +2438,14 @@ i32.add i32.load8_u ) - (func $~lib/typedarray/Int8Array#__set (; 48 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int8Array#__set (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 32 i32.const 44 call $~lib/env/abort @@ -2375,7 +2458,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Int8Array#fill (; 49 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int8Array#fill (; 51 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2463,7 +2546,7 @@ end local.get $7 ) - (func $~lib/util/memory/memcpy (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3664,7 +3747,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3895,14 +3978,17 @@ end end ) - (func $~lib/runtime/doMakeArray (; 52 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/makeArray (; 54 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) i32.const 16 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate local.get $2 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $4 local.get $0 local.get $3 @@ -3911,12 +3997,32 @@ local.get $0 local.get $3 i32.shl - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate i32.const 2 - call $~lib/runtime/doRegister + call $~lib/runtime/register local.set $6 local.get $4 + local.tee $7 local.get $6 + local.tee $8 + local.get $7 + i32.load + local.tee $9 + i32.ne + if (result i32) + local.get $9 + if + local.get $9 + local.get $7 + call $~lib/collector/dummy/__ref_unlink + end + local.get $8 + local.get $7 + call $~lib/collector/dummy/__ref_link + local.get $8 + else + local.get $8 + end i32.store local.get $4 local.get $6 @@ -3936,18 +4042,18 @@ end local.get $4 ) - (func $~lib/array/Array#get:length (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/typedarray/Int8Array#__get (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 56 ;) (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 152 + i32.const 184 i32.const 26 i32.const 44 call $~lib/env/abort @@ -3959,7 +4065,16 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__get (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 0 + i32.shl + i32.add + i32.load8_s + ) + (func $~lib/array/Array#__get (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3968,21 +4083,17 @@ i32.ge_u if i32.const 0 - i32.const 216 - i32.const 100 + i32.const 264 + i32.const 98 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 + call $~lib/array/Array#__unchecked_get ) - (func $std/typedarray/isInt8ArrayEqual (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4030,7 +4141,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4038,6 +4149,9 @@ (local $7 i32) (local $8 i32) (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 local.set $5 local.get $1 @@ -4111,12 +4225,12 @@ i32.const 12 local.set $8 local.get $8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 local.get $7 i32.const 4 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $7 local.get $5 @@ -4126,7 +4240,27 @@ i32.load offset=4 local.set $9 local.get $7 + local.tee $10 local.get $8 + local.tee $11 + local.get $10 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 local.get $9 @@ -4144,7 +4278,7 @@ i32.store offset=8 local.get $7 ) - (func $~lib/typedarray/Int32Array#fill (; 58 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#fill (; 61 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -4242,11 +4376,20 @@ end local.get $7 ) - (func $~lib/array/Array#get:length (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__get (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 63 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $~lib/array/Array#__get (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4255,21 +4398,17 @@ i32.ge_u if i32.const 0 - i32.const 216 - i32.const 100 + i32.const 264 + i32.const 98 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 + call $~lib/array/Array#__unchecked_get ) - (func $std/typedarray/isInt32ArrayEqual (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4317,12 +4456,12 @@ end i32.const 1 ) - (func $std/typedarray/testReduce~anonymous|0 (; 62 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 66 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduce (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4379,7 +4518,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 64 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 68 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4413,21 +4552,21 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#__set (; 65 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 69 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 114 i32.const 44 call $~lib/env/abort @@ -4440,12 +4579,12 @@ local.get $2 i32.store8 ) - (func $std/typedarray/testReduce~anonymous|0 (; 66 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 70 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduce (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 71 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4502,7 +4641,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 68 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 72 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4534,19 +4673,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 69 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 73 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduce (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduce (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4603,7 +4742,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 71 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 75 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4635,14 +4774,14 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int16Array#__set (; 72 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4651,7 +4790,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 278 i32.const 63 call $~lib/env/abort @@ -4666,12 +4805,12 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce~anonymous|0 (; 73 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 77 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduce (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduce (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4728,7 +4867,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 75 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 79 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4762,14 +4901,14 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#__set (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 80 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4778,7 +4917,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 360 i32.const 63 call $~lib/env/abort @@ -4793,12 +4932,12 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce~anonymous|0 (; 77 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 81 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduce (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduce (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4855,7 +4994,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 79 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 83 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4887,19 +5026,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 80 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 84 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduce (; 81 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 85 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4956,7 +5095,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 82 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 86 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4986,14 +5125,14 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint32Array#__set (; 83 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint32Array#__set (; 87 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -5002,7 +5141,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 524 i32.const 63 call $~lib/env/abort @@ -5017,12 +5156,12 @@ local.get $2 i32.store ) - (func $std/typedarray/testReduce~anonymous|0 (; 84 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce~anonymous|0 (; 88 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduce (; 85 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduce (; 89 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5079,7 +5218,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce (; 86 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 90 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5109,14 +5248,14 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int64Array#__set (; 87 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 91 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -5125,7 +5264,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 606 i32.const 63 call $~lib/env/abort @@ -5140,12 +5279,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce~anonymous|0 (; 88 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce~anonymous|0 (; 92 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 89 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 93 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -5202,7 +5341,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 90 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 94 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5232,14 +5371,14 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint64Array#__set (; 91 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Uint64Array#__set (; 95 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -5248,7 +5387,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 688 i32.const 63 call $~lib/env/abort @@ -5263,12 +5402,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce~anonymous|0 (; 92 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce~anonymous|0 (; 96 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduce (; 93 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduce (; 97 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -5325,7 +5464,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 94 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 98 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5355,14 +5494,14 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Float32Array#__set (; 95 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 99 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -5371,7 +5510,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 770 i32.const 63 call $~lib/env/abort @@ -5386,12 +5525,12 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce~anonymous|0 (; 96 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce~anonymous|0 (; 100 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 97 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduce (; 101 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -5448,7 +5587,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 98 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 102 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -5478,19 +5617,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduce~anonymous|0 (; 99 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce~anonymous|0 (; 103 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 100 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduce (; 104 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) @@ -5547,7 +5686,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce (; 101 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce (; 105 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -5577,19 +5716,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 252 + i32.const 24 + i32.const 253 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 102 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduceRight (; 103 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduceRight (; 107 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5643,7 +5782,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 104 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 108 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5677,19 +5816,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 105 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 109 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 106 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 110 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5743,7 +5882,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 107 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 111 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5775,19 +5914,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 112 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 109 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 113 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5841,7 +5980,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 110 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 114 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5873,19 +6012,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 111 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 115 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduceRight (; 112 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduceRight (; 116 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5939,7 +6078,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 113 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 117 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5973,19 +6112,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 114 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 118 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 115 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 119 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6039,7 +6178,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 116 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 120 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6071,19 +6210,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 117 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 121 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduceRight (; 118 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 122 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6137,7 +6276,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 119 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 123 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6167,19 +6306,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 120 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 124 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduceRight (; 121 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduceRight (; 125 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6233,7 +6372,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight (; 122 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 126 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6263,19 +6402,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 123 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight~anonymous|0 (; 127 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduceRight (; 124 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 128 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -6329,7 +6468,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 125 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 129 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6359,19 +6498,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 126 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight~anonymous|0 (; 130 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduceRight (; 127 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduceRight (; 131 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -6425,7 +6564,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 128 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 132 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6455,19 +6594,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 129 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduceRight~anonymous|0 (; 133 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduceRight (; 130 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduceRight (; 134 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -6521,7 +6660,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 131 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 135 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -6551,19 +6690,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testReduceRight~anonymous|0 (; 132 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduceRight~anonymous|0 (; 136 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduceRight (; 133 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduceRight (; 137 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) @@ -6617,7 +6756,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight (; 134 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight (; 138 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -6647,19 +6786,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 135 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 139 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6724,7 +6863,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 137 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 141 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6755,8 +6894,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -6769,8 +6908,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -6783,19 +6922,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 138 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 142 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8Array#map (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6860,14 +6999,14 @@ end local.get $6 ) - (func $~lib/typedarray/Uint8Array#__get (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__get (; 144 ;) (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 152 + i32.const 184 i32.const 108 i32.const 44 call $~lib/env/abort @@ -6879,7 +7018,7 @@ i32.add i32.load8_u ) - (func $std/typedarray/testArrayMap (; 141 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 145 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6910,8 +7049,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -6924,8 +7063,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -6938,19 +7077,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 142 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 146 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7015,7 +7154,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 144 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 148 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7046,8 +7185,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -7060,8 +7199,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7074,19 +7213,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 145 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 149 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int16Array#map (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7151,7 +7290,7 @@ end local.get $6 ) - (func $~lib/typedarray/Int16Array#__get (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7160,7 +7299,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 272 i32.const 63 call $~lib/env/abort @@ -7174,7 +7313,7 @@ i32.add i32.load16_s ) - (func $std/typedarray/testArrayMap (; 148 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 152 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7205,8 +7344,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -7219,8 +7358,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7233,19 +7372,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 149 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 153 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint16Array#map (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7310,7 +7449,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint16Array#__get (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7319,7 +7458,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 354 i32.const 63 call $~lib/env/abort @@ -7333,7 +7472,7 @@ i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap (; 152 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 156 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7364,8 +7503,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -7378,8 +7517,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7392,19 +7531,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 153 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 157 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int32Array#map (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7469,7 +7608,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 155 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 159 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7500,8 +7639,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -7514,8 +7653,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7528,19 +7667,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 156 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 160 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint32Array#map (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7605,7 +7744,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint32Array#__get (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7614,7 +7753,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 518 i32.const 63 call $~lib/env/abort @@ -7628,7 +7767,7 @@ i32.add i32.load ) - (func $std/typedarray/testArrayMap (; 159 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 163 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7659,8 +7798,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -7673,8 +7812,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7687,19 +7826,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 160 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 164 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7764,7 +7903,7 @@ end local.get $6 ) - (func $~lib/typedarray/Int64Array#__get (; 162 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 166 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -7773,7 +7912,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 600 i32.const 63 call $~lib/env/abort @@ -7787,7 +7926,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap (; 163 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 167 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7818,8 +7957,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -7832,8 +7971,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7846,19 +7985,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 164 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 168 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Uint64Array#map (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7923,7 +8062,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint64Array#__get (; 166 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__get (; 170 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -7932,7 +8071,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 682 i32.const 63 call $~lib/env/abort @@ -7946,7 +8085,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap (; 167 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 171 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7977,8 +8116,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -7991,8 +8130,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -8005,19 +8144,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 168 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap~anonymous|0 (; 172 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8082,7 +8221,7 @@ end local.get $6 ) - (func $~lib/typedarray/Float32Array#__get (; 170 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 174 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -8091,7 +8230,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 184 i32.const 764 i32.const 63 call $~lib/env/abort @@ -8105,7 +8244,7 @@ i32.add f32.load ) - (func $std/typedarray/testArrayMap (; 171 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 175 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8136,8 +8275,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -8150,8 +8289,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -8164,19 +8303,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayMap~anonymous|0 (; 172 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap~anonymous|0 (; 176 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8241,7 +8380,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap (; 174 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap (; 178 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8272,8 +8411,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 306 + i32.const 24 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -8286,8 +8425,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 307 + i32.const 24 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -8300,14 +8439,14 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 308 + i32.const 24 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 175 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 179 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -8316,7 +8455,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8376,7 +8515,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 177 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 181 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -8385,7 +8524,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 178 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 182 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8415,8 +8554,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -8432,21 +8571,21 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 179 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 183 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#some (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8506,14 +8645,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 181 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 185 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 182 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 186 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8543,8 +8682,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -8560,21 +8699,21 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 183 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 187 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#some (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#some (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8634,14 +8773,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 185 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 189 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 186 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 190 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8671,8 +8810,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -8688,14 +8827,14 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 187 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 191 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8704,7 +8843,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8764,7 +8903,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 189 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8773,7 +8912,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 190 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 194 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8803,8 +8942,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -8820,21 +8959,21 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 191 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 195 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#some (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8894,14 +9033,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 197 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 194 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 198 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8931,8 +9070,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -8948,19 +9087,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 195 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 199 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 200 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9020,12 +9159,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 197 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 201 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 198 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 202 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9055,8 +9194,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -9072,19 +9211,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 199 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 203 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#some (; 200 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#some (; 204 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9144,12 +9283,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 201 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 205 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome (; 202 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 206 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9179,8 +9318,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -9196,19 +9335,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 203 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 207 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 204 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9268,12 +9407,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 205 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 209 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome (; 206 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 210 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9303,8 +9442,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -9320,19 +9459,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 207 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 211 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#some (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#some (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9392,12 +9531,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 209 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 213 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome (; 210 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 214 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9427,8 +9566,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -9444,19 +9583,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 211 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 215 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 216 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9516,12 +9655,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 213 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 217 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome (; 214 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 218 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9551,8 +9690,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -9568,19 +9707,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArraySome~anonymous|0 (; 215 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|0 (; 219 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 216 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 220 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9640,12 +9779,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome~anonymous|1 (; 217 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome~anonymous|1 (; 221 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome (; 218 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome (; 222 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9675,8 +9814,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -9692,14 +9831,14 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 219 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 223 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9708,7 +9847,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#findIndex (; 220 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 224 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9768,7 +9907,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 221 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9777,7 +9916,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 222 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 226 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9806,9 +9945,9 @@ i32.eq i32.eqz if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -9822,22 +9961,22 @@ i32.eq i32.eqz if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 223 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 227 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#findIndex (; 224 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 228 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9897,14 +10036,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 229 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 226 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 230 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9933,9 +10072,9 @@ i32.eq i32.eqz if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -9949,22 +10088,22 @@ i32.eq i32.eqz if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 227 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 231 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 228 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 232 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10024,14 +10163,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 229 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 233 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 230 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 234 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10060,9 +10199,9 @@ i32.eq i32.eqz if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -10076,15 +10215,15 @@ i32.eq i32.eqz if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 231 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 235 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10093,7 +10232,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#findIndex (; 232 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10153,7 +10292,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 233 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 237 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10162,7 +10301,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 234 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 238 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10191,9 +10330,9 @@ i32.eq i32.eqz if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -10207,22 +10346,22 @@ i32.eq i32.eqz if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 235 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 239 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#findIndex (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 240 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10282,14 +10421,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 237 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 241 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 238 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 242 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10318,9 +10457,9 @@ i32.eq i32.eqz if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -10334,20 +10473,20 @@ i32.eq i32.eqz if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 239 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 243 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#findIndex (; 240 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 244 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10407,12 +10546,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 241 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 245 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 242 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 246 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10441,9 +10580,9 @@ i32.eq i32.eqz if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -10457,20 +10596,20 @@ i32.eq i32.eqz if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 243 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 247 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#findIndex (; 244 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#findIndex (; 248 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10530,12 +10669,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 245 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 249 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex (; 246 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 250 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10564,9 +10703,9 @@ i32.eq i32.eqz if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -10580,20 +10719,20 @@ i32.eq i32.eqz if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 247 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 251 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#findIndex (; 248 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10653,12 +10792,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 249 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 253 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex (; 250 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 254 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10687,9 +10826,9 @@ i32.eq i32.eqz if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -10703,20 +10842,20 @@ i32.eq i32.eqz if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 251 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 255 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#findIndex (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#findIndex (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10776,12 +10915,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 253 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 257 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex (; 254 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 258 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10810,9 +10949,9 @@ i32.eq i32.eqz if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -10826,20 +10965,20 @@ i32.eq i32.eqz if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 255 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 259 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#findIndex (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 260 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10899,12 +11038,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 257 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 261 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex (; 258 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 262 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10933,9 +11072,9 @@ i32.eq i32.eqz if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -10949,20 +11088,20 @@ i32.eq i32.eqz if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 259 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|0 (; 263 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#findIndex (; 260 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 264 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11022,12 +11161,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 261 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex~anonymous|1 (; 265 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex (; 262 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex (; 266 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11056,9 +11195,9 @@ i32.eq i32.eqz if - i32.const 568 - i32.const 16 - i32.const 365 + i32.const 728 + i32.const 24 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -11072,15 +11211,15 @@ i32.eq i32.eqz if - i32.const 608 - i32.const 16 - i32.const 368 + i32.const 776 + i32.const 24 + i32.const 369 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 263 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 267 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11091,7 +11230,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int8Array#every (; 264 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 268 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11158,7 +11297,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 265 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 269 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11167,7 +11306,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 266 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 270 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11197,8 +11336,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -11214,14 +11353,14 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 267 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 271 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -11230,7 +11369,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8Array#every (; 268 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 272 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11297,14 +11436,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 269 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 273 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 270 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 274 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11334,8 +11473,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -11351,14 +11490,14 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 271 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 275 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -11367,7 +11506,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#every (; 272 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#every (; 276 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11434,14 +11573,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 273 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 277 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 274 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 278 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11471,8 +11610,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -11488,14 +11627,14 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 275 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 279 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11506,7 +11645,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int16Array#every (; 276 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 280 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11573,7 +11712,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 277 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 281 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11582,7 +11721,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 278 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 282 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11612,8 +11751,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -11629,14 +11768,14 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 279 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 283 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and @@ -11645,7 +11784,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint16Array#every (; 280 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 284 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11712,14 +11851,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 281 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 285 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 282 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 286 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11749,8 +11888,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -11766,21 +11905,21 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 283 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 287 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.const 0 i32.eq ) - (func $~lib/typedarray/Int32Array#every (; 284 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 288 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11847,12 +11986,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 285 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 289 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 286 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 290 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11882,8 +12021,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -11899,21 +12038,21 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 287 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 291 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_u i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint32Array#every (; 288 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#every (; 292 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11980,12 +12119,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 289 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 293 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery (; 290 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 294 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12015,8 +12154,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -12032,21 +12171,21 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 291 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 295 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (; 292 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 296 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12113,12 +12252,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 293 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 297 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery (; 294 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 298 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12148,8 +12287,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -12165,21 +12304,21 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 295 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 299 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $~lib/typedarray/Uint64Array#every (; 296 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#every (; 300 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12246,12 +12385,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 297 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 301 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery (; 298 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 302 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12281,8 +12420,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -12298,19 +12437,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/builtins/isNaN (; 299 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 303 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $~lib/math/NativeMathf.mod (; 300 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 304 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12561,14 +12700,14 @@ local.get $2 f32.reinterpret_i32 ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 301 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 305 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 302 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 306 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12635,12 +12774,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 303 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 307 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $std/typedarray/testArrayEvery (; 304 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 308 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12670,8 +12809,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -12687,19 +12826,19 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/builtins/isNaN (; 305 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 309 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/math/NativeMath.mod (; 306 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 310 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -12952,14 +13091,14 @@ local.get $2 f64.reinterpret_i64 ) - (func $std/typedarray/testArrayEvery~anonymous|0 (; 307 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|0 (; 311 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 308 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 312 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13026,12 +13165,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery~anonymous|1 (; 309 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery~anonymous|1 (; 313 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $std/typedarray/testArrayEvery (; 310 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery (; 314 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13061,8 +13200,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 395 + i32.const 24 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable @@ -13078,14 +13217,14 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 398 + i32.const 24 + i32.const 399 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 311 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 315 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13104,9 +13243,9 @@ i32.eq i32.eqz if - i32.const 704 - i32.const 16 - i32.const 425 + i32.const 896 + i32.const 24 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -13116,9 +13255,9 @@ i32.eq i32.eqz if - i32.const 760 - i32.const 16 - i32.const 426 + i32.const 960 + i32.const 24 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -13128,9 +13267,9 @@ i32.eq i32.eqz if - i32.const 816 - i32.const 16 - i32.const 427 + i32.const 1024 + i32.const 24 + i32.const 428 i32.const 4 call $~lib/env/abort unreachable @@ -13140,7 +13279,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 312 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#forEach (; 316 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13185,7 +13324,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 313 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 317 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13233,15 +13372,15 @@ i32.eq i32.eqz if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 314 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 318 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13256,9 +13395,9 @@ i32.eq i32.eqz if - i32.const 704 - i32.const 16 - i32.const 425 + i32.const 896 + i32.const 24 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -13268,9 +13407,9 @@ i32.eq i32.eqz if - i32.const 760 - i32.const 16 - i32.const 426 + i32.const 960 + i32.const 24 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -13280,9 +13419,9 @@ i32.eq i32.eqz if - i32.const 816 - i32.const 16 - i32.const 427 + i32.const 1024 + i32.const 24 + i32.const 428 i32.const 4 call $~lib/env/abort unreachable @@ -13292,7 +13431,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8Array#forEach (; 315 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 319 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13337,7 +13476,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 316 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 320 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13379,15 +13518,15 @@ i32.eq i32.eqz if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 317 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 321 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13402,9 +13541,9 @@ i32.eq i32.eqz if - i32.const 704 - i32.const 16 - i32.const 425 + i32.const 896 + i32.const 24 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -13414,9 +13553,9 @@ i32.eq i32.eqz if - i32.const 760 - i32.const 16 - i32.const 426 + i32.const 960 + i32.const 24 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -13426,9 +13565,9 @@ i32.eq i32.eqz if - i32.const 816 - i32.const 16 - i32.const 427 + i32.const 1024 + i32.const 24 + i32.const 428 i32.const 4 call $~lib/env/abort unreachable @@ -13438,7 +13577,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8ClampedArray#forEach (; 318 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#forEach (; 322 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13483,7 +13622,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 319 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 323 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13525,15 +13664,15 @@ i32.eq i32.eqz if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 320 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 324 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13552,9 +13691,9 @@ i32.eq i32.eqz if - i32.const 704 - i32.const 16 - i32.const 425 + i32.const 896 + i32.const 24 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -13564,9 +13703,9 @@ i32.eq i32.eqz if - i32.const 760 - i32.const 16 - i32.const 426 + i32.const 960 + i32.const 24 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -13576,9 +13715,9 @@ i32.eq i32.eqz if - i32.const 816 - i32.const 16 - i32.const 427 + i32.const 1024 + i32.const 24 + i32.const 428 i32.const 4 call $~lib/env/abort unreachable @@ -13588,7 +13727,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 321 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#forEach (; 325 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13633,7 +13772,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 322 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 326 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13681,15 +13820,15 @@ i32.eq i32.eqz if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 323 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 327 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13704,9 +13843,9 @@ i32.eq i32.eqz if - i32.const 704 - i32.const 16 - i32.const 425 + i32.const 896 + i32.const 24 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -13716,9 +13855,9 @@ i32.eq i32.eqz if - i32.const 760 - i32.const 16 - i32.const 426 + i32.const 960 + i32.const 24 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -13728,9 +13867,9 @@ i32.eq i32.eqz if - i32.const 816 - i32.const 16 - i32.const 427 + i32.const 1024 + i32.const 24 + i32.const 428 i32.const 4 call $~lib/env/abort unreachable @@ -13740,7 +13879,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint16Array#forEach (; 324 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 328 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13785,7 +13924,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 325 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 329 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13827,15 +13966,15 @@ i32.eq i32.eqz if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 326 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 330 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13846,9 +13985,9 @@ i32.eq i32.eqz if - i32.const 704 - i32.const 16 - i32.const 425 + i32.const 896 + i32.const 24 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -13858,9 +13997,9 @@ i32.eq i32.eqz if - i32.const 760 - i32.const 16 - i32.const 426 + i32.const 960 + i32.const 24 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -13870,9 +14009,9 @@ i32.eq i32.eqz if - i32.const 816 - i32.const 16 - i32.const 427 + i32.const 1024 + i32.const 24 + i32.const 428 i32.const 4 call $~lib/env/abort unreachable @@ -13882,7 +14021,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 327 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 331 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13927,7 +14066,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 328 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 332 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13963,15 +14102,15 @@ i32.eq i32.eqz if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 329 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 333 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13982,9 +14121,9 @@ i32.eq i32.eqz if - i32.const 704 - i32.const 16 - i32.const 425 + i32.const 896 + i32.const 24 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -13994,9 +14133,9 @@ i32.eq i32.eqz if - i32.const 760 - i32.const 16 - i32.const 426 + i32.const 960 + i32.const 24 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -14006,9 +14145,9 @@ i32.eq i32.eqz if - i32.const 816 - i32.const 16 - i32.const 427 + i32.const 1024 + i32.const 24 + i32.const 428 i32.const 4 call $~lib/env/abort unreachable @@ -14018,7 +14157,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint32Array#forEach (; 330 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint32Array#forEach (; 334 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14063,7 +14202,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 331 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 335 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14099,15 +14238,15 @@ i32.eq i32.eqz if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 332 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 336 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14119,9 +14258,9 @@ i64.eq i32.eqz if - i32.const 704 - i32.const 16 - i32.const 425 + i32.const 896 + i32.const 24 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -14131,9 +14270,9 @@ i32.eq i32.eqz if - i32.const 760 - i32.const 16 - i32.const 426 + i32.const 960 + i32.const 24 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -14143,9 +14282,9 @@ i32.eq i32.eqz if - i32.const 816 - i32.const 16 - i32.const 427 + i32.const 1024 + i32.const 24 + i32.const 428 i32.const 4 call $~lib/env/abort unreachable @@ -14155,7 +14294,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 333 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 337 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14200,7 +14339,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 334 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 338 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14239,15 +14378,15 @@ i32.eq i32.eqz if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 335 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 339 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14259,9 +14398,9 @@ i64.eq i32.eqz if - i32.const 704 - i32.const 16 - i32.const 425 + i32.const 896 + i32.const 24 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -14271,9 +14410,9 @@ i32.eq i32.eqz if - i32.const 760 - i32.const 16 - i32.const 426 + i32.const 960 + i32.const 24 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -14283,9 +14422,9 @@ i32.eq i32.eqz if - i32.const 816 - i32.const 16 - i32.const 427 + i32.const 1024 + i32.const 24 + i32.const 428 i32.const 4 call $~lib/env/abort unreachable @@ -14295,7 +14434,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint64Array#forEach (; 336 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint64Array#forEach (; 340 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14340,7 +14479,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 337 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 341 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14379,15 +14518,15 @@ i32.eq i32.eqz if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 338 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 342 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14399,9 +14538,9 @@ f32.eq i32.eqz if - i32.const 704 - i32.const 16 - i32.const 425 + i32.const 896 + i32.const 24 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -14411,9 +14550,9 @@ i32.eq i32.eqz if - i32.const 760 - i32.const 16 - i32.const 426 + i32.const 960 + i32.const 24 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -14423,9 +14562,9 @@ i32.eq i32.eqz if - i32.const 816 - i32.const 16 - i32.const 427 + i32.const 1024 + i32.const 24 + i32.const 428 i32.const 4 call $~lib/env/abort unreachable @@ -14435,7 +14574,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 339 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#forEach (; 343 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14480,7 +14619,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 340 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 344 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14519,15 +14658,15 @@ i32.eq i32.eqz if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $std/typedarray/testArrayForEach~anonymous|0 (; 341 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach~anonymous|0 (; 345 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14539,9 +14678,9 @@ f64.eq i32.eqz if - i32.const 704 - i32.const 16 - i32.const 425 + i32.const 896 + i32.const 24 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -14551,9 +14690,9 @@ i32.eq i32.eqz if - i32.const 760 - i32.const 16 - i32.const 426 + i32.const 960 + i32.const 24 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -14563,9 +14702,9 @@ i32.eq i32.eqz if - i32.const 816 - i32.const 16 - i32.const 427 + i32.const 1024 + i32.const 24 + i32.const 428 i32.const 4 call $~lib/env/abort unreachable @@ -14575,7 +14714,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 342 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#forEach (; 346 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14620,7 +14759,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach (; 343 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach (; 347 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14659,15 +14798,15 @@ i32.eq i32.eqz if - i32.const 888 - i32.const 16 - i32.const 430 + i32.const 1104 + i32.const 24 + i32.const 431 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int8Array#reverse (; 344 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 348 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14737,7 +14876,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse (; 345 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 349 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14822,9 +14961,9 @@ i32.eq i32.eqz if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -14851,9 +14990,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -14865,9 +15004,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -14879,9 +15018,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -14893,15 +15032,15 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 346 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 350 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14971,7 +15110,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8Array#subarray (; 347 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 351 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -14979,6 +15118,9 @@ (local $7 i32) (local $8 i32) (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 local.set $5 local.get $1 @@ -15052,12 +15194,12 @@ i32.const 12 local.set $8 local.get $8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 local.get $7 i32.const 5 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $7 local.get $5 @@ -15067,7 +15209,27 @@ i32.load offset=4 local.set $9 local.get $7 + local.tee $10 local.get $8 + local.tee $11 + local.get $10 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 local.get $9 @@ -15085,7 +15247,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 348 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 352 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15164,9 +15326,9 @@ i32.eq i32.eqz if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -15193,9 +15355,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -15207,9 +15369,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -15221,9 +15383,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -15235,15 +15397,15 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#reverse (; 349 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reverse (; 353 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15313,7 +15475,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 350 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 354 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15321,6 +15483,9 @@ (local $7 i32) (local $8 i32) (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 local.set $5 local.get $1 @@ -15394,12 +15559,12 @@ i32.const 12 local.set $8 local.get $8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 local.get $7 i32.const 6 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $7 local.get $5 @@ -15409,7 +15574,27 @@ i32.load offset=4 local.set $9 local.get $7 + local.tee $10 local.get $8 + local.tee $11 + local.get $10 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 local.get $9 @@ -15427,7 +15612,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 351 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 355 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15506,9 +15691,9 @@ i32.eq i32.eqz if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -15535,9 +15720,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -15549,10 +15734,10 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 467 - i32.const 2 + i32.const 1352 + i32.const 24 + i32.const 468 + i32.const 2 call $~lib/env/abort unreachable end @@ -15563,9 +15748,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -15577,15 +15762,15 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 352 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 356 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15655,7 +15840,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int16Array#subarray (; 353 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 357 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15663,6 +15848,9 @@ (local $7 i32) (local $8 i32) (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 local.set $5 local.get $1 @@ -15736,12 +15924,12 @@ i32.const 12 local.set $8 local.get $8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 local.get $7 i32.const 7 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $7 local.get $5 @@ -15751,7 +15939,27 @@ i32.load offset=4 local.set $9 local.get $7 + local.tee $10 local.get $8 + local.tee $11 + local.get $10 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 local.get $9 @@ -15769,7 +15977,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 354 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 358 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15854,9 +16062,9 @@ i32.eq i32.eqz if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -15883,9 +16091,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -15897,9 +16105,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -15911,9 +16119,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -15925,15 +16133,15 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 355 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 359 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16003,7 +16211,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint16Array#subarray (; 356 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 360 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16011,6 +16219,9 @@ (local $7 i32) (local $8 i32) (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 local.set $5 local.get $1 @@ -16084,12 +16295,12 @@ i32.const 12 local.set $8 local.get $8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 local.get $7 i32.const 8 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $7 local.get $5 @@ -16099,7 +16310,27 @@ i32.load offset=4 local.set $9 local.get $7 + local.tee $10 local.get $8 + local.tee $11 + local.get $10 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 local.get $9 @@ -16117,7 +16348,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 357 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 361 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16196,9 +16427,9 @@ i32.eq i32.eqz if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -16225,9 +16456,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -16239,9 +16470,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -16253,9 +16484,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -16267,15 +16498,15 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 358 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 362 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16345,7 +16576,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse (; 359 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 363 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16418,9 +16649,9 @@ i32.eq i32.eqz if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -16447,9 +16678,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -16461,9 +16692,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -16475,9 +16706,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -16489,15 +16720,15 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint32Array#reverse (; 360 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reverse (; 364 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16567,7 +16798,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint32Array#subarray (; 361 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 365 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16575,6 +16806,9 @@ (local $7 i32) (local $8 i32) (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 local.set $5 local.get $1 @@ -16648,12 +16882,12 @@ i32.const 12 local.set $8 local.get $8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 local.get $7 i32.const 10 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $7 local.get $5 @@ -16663,7 +16897,27 @@ i32.load offset=4 local.set $9 local.get $7 + local.tee $10 local.get $8 + local.tee $11 + local.get $10 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 local.get $9 @@ -16681,7 +16935,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 362 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 366 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16754,9 +17008,9 @@ i32.eq i32.eqz if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -16783,9 +17037,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -16797,9 +17051,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -16811,9 +17065,9 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -16825,15 +17079,15 @@ i32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Int64Array#reverse (; 363 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 367 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16903,7 +17157,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int64Array#subarray (; 364 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 368 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16911,6 +17165,9 @@ (local $7 i32) (local $8 i32) (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 local.set $5 local.get $1 @@ -16984,12 +17241,12 @@ i32.const 12 local.set $8 local.get $8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 local.get $7 i32.const 11 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $7 local.get $5 @@ -16999,7 +17256,27 @@ i32.load offset=4 local.set $9 local.get $7 + local.tee $10 local.get $8 + local.tee $11 + local.get $10 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 local.get $9 @@ -17017,7 +17294,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 365 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 369 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17093,9 +17370,9 @@ i64.eq i32.eqz if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -17122,9 +17399,9 @@ i64.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -17136,9 +17413,9 @@ i64.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -17150,9 +17427,9 @@ i64.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -17164,15 +17441,15 @@ i64.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Uint64Array#reverse (; 366 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#reverse (; 370 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17242,7 +17519,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint64Array#subarray (; 367 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 371 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17250,6 +17527,9 @@ (local $7 i32) (local $8 i32) (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 local.set $5 local.get $1 @@ -17323,12 +17603,12 @@ i32.const 12 local.set $8 local.get $8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 local.get $7 i32.const 12 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $7 local.get $5 @@ -17338,7 +17618,27 @@ i32.load offset=4 local.set $9 local.get $7 + local.tee $10 local.get $8 + local.tee $11 + local.get $10 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 local.get $9 @@ -17356,7 +17656,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 368 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 372 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17432,9 +17732,9 @@ i64.eq i32.eqz if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -17461,9 +17761,9 @@ i64.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -17475,9 +17775,9 @@ i64.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -17489,9 +17789,9 @@ i64.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -17503,15 +17803,15 @@ i64.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 369 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 373 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17581,7 +17881,7 @@ end local.get $1 ) - (func $~lib/typedarray/Float32Array#subarray (; 370 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 374 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17589,6 +17889,9 @@ (local $7 i32) (local $8 i32) (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 local.set $5 local.get $1 @@ -17662,12 +17965,12 @@ i32.const 12 local.set $8 local.get $8 - call $~lib/runtime/doAllocate + call $~lib/runtime/allocate end local.set $7 local.get $7 i32.const 13 - call $~lib/runtime/doRegister + call $~lib/runtime/register end local.set $7 local.get $5 @@ -17677,7 +17980,27 @@ i32.load offset=4 local.set $9 local.get $7 + local.tee $10 local.get $8 + local.tee $11 + local.get $10 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 local.get $9 @@ -17695,7 +18018,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse (; 371 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 375 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17771,9 +18094,9 @@ f32.eq i32.eqz if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -17800,9 +18123,9 @@ f32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -17814,9 +18137,9 @@ f32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -17828,9 +18151,9 @@ f32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -17842,15 +18165,15 @@ f32.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 372 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 376 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17920,7 +18243,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse (; 373 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse (; 377 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17996,9 +18319,9 @@ f64.eq i32.eqz if - i32.const 1024 - i32.const 16 - i32.const 461 + i32.const 1264 + i32.const 24 + i32.const 462 i32.const 4 call $~lib/env/abort unreachable @@ -18025,9 +18348,9 @@ f64.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 466 + i32.const 1352 + i32.const 24 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -18039,9 +18362,9 @@ f64.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 467 + i32.const 1352 + i32.const 24 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -18053,9 +18376,9 @@ f64.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 468 + i32.const 1352 + i32.const 24 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -18067,15 +18390,15 @@ f64.eq i32.eqz if - i32.const 1104 - i32.const 16 - i32.const 469 + i32.const 1352 + i32.const 24 + i32.const 470 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start:std/typedarray (; 374 ;) (type $FUNCSIG$v) + (func $start:std/typedarray (; 378 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT @@ -18084,8 +18407,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 1 + i32.const 24 + i32.const 4 i32.const 0 call $~lib/env/abort unreachable @@ -18096,8 +18419,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 2 + i32.const 24 + i32.const 5 i32.const 0 call $~lib/env/abort unreachable @@ -18108,8 +18431,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 3 + i32.const 24 + i32.const 6 i32.const 0 call $~lib/env/abort unreachable @@ -18120,8 +18443,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 4 + i32.const 24 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -18132,8 +18455,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 5 + i32.const 24 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -18144,8 +18467,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 6 + i32.const 24 + i32.const 9 i32.const 0 call $~lib/env/abort unreachable @@ -18156,8 +18479,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 7 + i32.const 24 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -18168,8 +18491,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 8 + i32.const 24 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -18180,8 +18503,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 9 + i32.const 24 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -18192,8 +18515,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 10 + i32.const 24 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -18204,8 +18527,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 11 + i32.const 24 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -18247,8 +18570,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 96 + i32.const 24 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -18260,8 +18583,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 97 + i32.const 24 + i32.const 98 i32.const 0 call $~lib/env/abort unreachable @@ -18275,8 +18598,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 98 + i32.const 24 + i32.const 99 i32.const 0 call $~lib/env/abort unreachable @@ -18289,8 +18612,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 99 + i32.const 24 + i32.const 100 i32.const 0 call $~lib/env/abort unreachable @@ -18303,8 +18626,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 100 + i32.const 24 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable @@ -18317,8 +18640,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 101 + i32.const 24 + i32.const 102 i32.const 0 call $~lib/env/abort unreachable @@ -18335,8 +18658,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 104 + i32.const 24 + i32.const 105 i32.const 0 call $~lib/env/abort unreachable @@ -18350,8 +18673,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 105 + i32.const 24 + i32.const 106 i32.const 0 call $~lib/env/abort unreachable @@ -18365,8 +18688,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 106 + i32.const 24 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable @@ -18379,8 +18702,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 107 + i32.const 24 + i32.const 108 i32.const 0 call $~lib/env/abort unreachable @@ -18433,8 +18756,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 121 + i32.const 24 + i32.const 122 i32.const 0 call $~lib/env/abort unreachable @@ -18448,8 +18771,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 122 + i32.const 24 + i32.const 123 i32.const 0 call $~lib/env/abort unreachable @@ -18463,8 +18786,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 123 + i32.const 24 + i32.const 124 i32.const 0 call $~lib/env/abort unreachable @@ -18515,8 +18838,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 125 + i32.const 24 + i32.const 126 i32.const 0 call $~lib/env/abort unreachable @@ -18545,8 +18868,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 132 + i32.const 24 + i32.const 133 i32.const 0 call $~lib/env/abort unreachable @@ -18559,8 +18882,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 133 + i32.const 24 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -18573,8 +18896,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 134 + i32.const 24 + i32.const 135 i32.const 0 call $~lib/env/abort unreachable @@ -18613,20 +18936,20 @@ block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) i32.const 5 local.set $0 - i32.const 200 + i32.const 240 local.set $1 local.get $0 local.get $1 i32.const 15 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 144 + i32.const 24 + i32.const 145 i32.const 0 call $~lib/env/abort unreachable @@ -18641,20 +18964,20 @@ block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) i32.const 5 local.set $1 - i32.const 256 + i32.const 312 local.set $0 local.get $1 local.get $0 i32.const 15 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 147 + i32.const 24 + i32.const 148 i32.const 0 call $~lib/env/abort unreachable @@ -18669,20 +18992,20 @@ block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) i32.const 5 local.set $0 - i32.const 272 + i32.const 336 local.set $1 local.get $0 local.get $1 i32.const 15 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 150 + i32.const 24 + i32.const 151 i32.const 0 call $~lib/env/abort unreachable @@ -18697,20 +19020,20 @@ block $~lib/runtime/MAKEARRAY|inlined.3 (result i32) i32.const 5 local.set $1 - i32.const 288 + i32.const 360 local.set $0 local.get $1 local.get $0 i32.const 15 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 153 + i32.const 24 + i32.const 154 i32.const 0 call $~lib/env/abort unreachable @@ -18725,20 +19048,20 @@ block $~lib/runtime/MAKEARRAY|inlined.4 (result i32) i32.const 5 local.set $0 - i32.const 304 + i32.const 384 local.set $1 local.get $0 local.get $1 i32.const 15 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 156 + i32.const 24 + i32.const 157 i32.const 0 call $~lib/env/abort unreachable @@ -18761,8 +19084,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 160 + i32.const 24 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable @@ -18774,8 +19097,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 161 + i32.const 24 + i32.const 162 i32.const 0 call $~lib/env/abort unreachable @@ -18787,8 +19110,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 162 + i32.const 24 + i32.const 163 i32.const 0 call $~lib/env/abort unreachable @@ -18797,20 +19120,20 @@ block $~lib/runtime/MAKEARRAY|inlined.5 (result i32) i32.const 3 local.set $1 - i32.const 320 + i32.const 408 local.set $0 local.get $1 local.get $0 i32.const 15 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 163 + i32.const 24 + i32.const 164 i32.const 0 call $~lib/env/abort unreachable @@ -18819,20 +19142,20 @@ block $~lib/runtime/MAKEARRAY|inlined.6 (result i32) i32.const 5 local.set $0 - i32.const 336 + i32.const 432 local.set $1 local.get $0 local.get $1 i32.const 15 i32.const 0 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 164 + i32.const 24 + i32.const 165 i32.const 0 call $~lib/env/abort unreachable @@ -18871,20 +19194,20 @@ block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) i32.const 5 local.set $1 - i32.const 352 + i32.const 456 local.set $0 local.get $1 local.get $0 i32.const 16 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 174 + i32.const 24 + i32.const 175 i32.const 0 call $~lib/env/abort unreachable @@ -18899,20 +19222,20 @@ block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) i32.const 5 local.set $0 - i32.const 384 + i32.const 496 local.set $1 local.get $0 local.get $1 i32.const 16 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 177 + i32.const 24 + i32.const 178 i32.const 0 call $~lib/env/abort unreachable @@ -18927,20 +19250,20 @@ block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) i32.const 5 local.set $1 - i32.const 416 + i32.const 536 local.set $0 local.get $1 local.get $0 i32.const 16 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 180 + i32.const 24 + i32.const 181 i32.const 0 call $~lib/env/abort unreachable @@ -18955,20 +19278,20 @@ block $~lib/runtime/MAKEARRAY|inlined.3 (result i32) i32.const 5 local.set $0 - i32.const 448 + i32.const 576 local.set $1 local.get $0 local.get $1 i32.const 16 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 183 + i32.const 24 + i32.const 184 i32.const 0 call $~lib/env/abort unreachable @@ -18983,20 +19306,20 @@ block $~lib/runtime/MAKEARRAY|inlined.4 (result i32) i32.const 5 local.set $1 - i32.const 480 + i32.const 616 local.set $0 local.get $1 local.get $0 i32.const 16 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 186 + i32.const 24 + i32.const 187 i32.const 0 call $~lib/env/abort unreachable @@ -19019,8 +19342,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 190 + i32.const 24 + i32.const 191 i32.const 0 call $~lib/env/abort unreachable @@ -19034,8 +19357,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 191 + i32.const 24 + i32.const 192 i32.const 0 call $~lib/env/abort unreachable @@ -19049,8 +19372,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 192 + i32.const 24 + i32.const 193 i32.const 0 call $~lib/env/abort unreachable @@ -19059,20 +19382,20 @@ block $~lib/runtime/MAKEARRAY|inlined.5 (result i32) i32.const 3 local.set $0 - i32.const 512 + i32.const 656 local.set $1 local.get $0 local.get $1 i32.const 16 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 193 + i32.const 24 + i32.const 194 i32.const 0 call $~lib/env/abort unreachable @@ -19081,20 +19404,20 @@ block $~lib/runtime/MAKEARRAY|inlined.6 (result i32) i32.const 5 local.set $1 - i32.const 536 + i32.const 688 local.set $0 local.get $1 local.get $0 i32.const 16 i32.const 2 - call $~lib/runtime/doMakeArray + call $~lib/runtime/makeArray end call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 16 - i32.const 194 + i32.const 24 + i32.const 195 i32.const 0 call $~lib/env/abort unreachable @@ -19144,8 +19467,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 211 + i32.const 24 + i32.const 212 i32.const 0 call $~lib/env/abort unreachable @@ -19157,8 +19480,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 212 + i32.const 24 + i32.const 213 i32.const 0 call $~lib/env/abort unreachable @@ -19170,8 +19493,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 213 + i32.const 24 + i32.const 214 i32.const 0 call $~lib/env/abort unreachable @@ -19183,8 +19506,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 214 + i32.const 24 + i32.const 215 i32.const 0 call $~lib/env/abort unreachable @@ -19202,8 +19525,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 217 + i32.const 24 + i32.const 218 i32.const 0 call $~lib/env/abort unreachable @@ -19215,8 +19538,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 218 + i32.const 24 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -19228,8 +19551,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 219 + i32.const 24 + i32.const 220 i32.const 0 call $~lib/env/abort unreachable @@ -19241,8 +19564,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 220 + i32.const 24 + i32.const 221 i32.const 0 call $~lib/env/abort unreachable @@ -19260,8 +19583,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 223 + i32.const 24 + i32.const 224 i32.const 0 call $~lib/env/abort unreachable @@ -19273,8 +19596,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 224 + i32.const 24 + i32.const 225 i32.const 0 call $~lib/env/abort unreachable @@ -19286,8 +19609,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 225 + i32.const 24 + i32.const 226 i32.const 0 call $~lib/env/abort unreachable @@ -19299,8 +19622,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 226 + i32.const 24 + i32.const 227 i32.const 0 call $~lib/env/abort unreachable @@ -19394,9 +19717,9 @@ call $std/typedarray/testArrayReverse call $std/typedarray/testArrayReverse ) - (func $start (; 375 ;) (type $FUNCSIG$v) + (func $start (; 379 ;) (type $FUNCSIG$v) call $start:std/typedarray ) - (func $null (; 376 ;) (type $FUNCSIG$v) + (func $null (; 380 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/unary.optimized.wat b/tests/compiler/unary.optimized.wat index 1e04efb779..a56a7f4140 100644 --- a/tests/compiler/unary.optimized.wat +++ b/tests/compiler/unary.optimized.wat @@ -53,10 +53,16 @@ global.get $unary/i i32.const 1 i32.add + local.tee $2 + global.set $unary/i + local.get $2 global.set $unary/i global.get $unary/i i32.const 1 i32.sub + local.tee $2 + global.set $unary/i + local.get $2 global.set $unary/i global.get $unary/i local.tee $2 @@ -111,10 +117,16 @@ global.get $unary/I i64.const 1 i64.add + local.tee $3 + global.set $unary/I + local.get $3 global.set $unary/I global.get $unary/I i64.const 1 i64.sub + local.tee $3 + global.set $unary/I + local.get $3 global.set $unary/I global.get $unary/I local.tee $3 @@ -163,10 +175,16 @@ local.get $0 f32.const 1 f32.add + local.tee $0 + global.set $unary/f + local.get $0 global.set $unary/f global.get $unary/f f32.const 1 f32.sub + local.tee $0 + global.set $unary/f + local.get $0 global.set $unary/f global.get $unary/f local.tee $0 @@ -216,10 +234,16 @@ local.get $1 f64.const 1 f64.add + local.tee $1 + global.set $unary/F + local.get $1 global.set $unary/F global.get $unary/F f64.const 1 f64.sub + local.tee $1 + global.set $unary/F + local.get $1 global.set $unary/F global.get $unary/F local.tee $1 diff --git a/tests/compiler/unary.untouched.wat b/tests/compiler/unary.untouched.wat index 2a3437b0d1..0114ad8060 100644 --- a/tests/compiler/unary.untouched.wat +++ b/tests/compiler/unary.untouched.wat @@ -92,16 +92,18 @@ global.get $unary/i i32.const 1 i32.add + local.tee $0 global.set $unary/i - global.get $unary/i + local.get $0 end global.set $unary/i block (result i32) global.get $unary/i i32.const 1 i32.sub + local.tee $0 global.set $unary/i - global.get $unary/i + local.get $0 end global.set $unary/i block (result i32) @@ -181,16 +183,18 @@ global.get $unary/I i64.const 1 i64.add + local.tee $1 global.set $unary/I - global.get $unary/I + local.get $1 end global.set $unary/I block (result i64) global.get $unary/I i64.const 1 i64.sub + local.tee $1 global.set $unary/I - global.get $unary/I + local.get $1 end global.set $unary/I block (result i64) @@ -257,16 +261,18 @@ global.get $unary/f f32.const 1 f32.add + local.tee $2 global.set $unary/f - global.get $unary/f + local.get $2 end global.set $unary/f block (result f32) global.get $unary/f f32.const 1 f32.sub + local.tee $2 global.set $unary/f - global.get $unary/f + local.get $2 end global.set $unary/f block (result f32) @@ -335,16 +341,18 @@ global.get $unary/F f64.const 1 f64.add + local.tee $3 global.set $unary/F - global.get $unary/F + local.get $3 end global.set $unary/F block (result f64) global.get $unary/F f64.const 1 f64.sub + local.tee $3 global.set $unary/F - global.get $unary/F + local.get $3 end global.set $unary/F block (result f64) diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 6f28b55620..41f4f950ba 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -146,9 +146,8 @@ global.get $while/m i32.const 1 i32.add + local.tee $0 global.set $while/m - global.get $while/m - local.set $0 end local.get $0 br_if $continue|3 diff --git a/tests/compiler/while.untouched.wat b/tests/compiler/while.untouched.wat index 68278d4a2b..ea0fecdcf7 100644 --- a/tests/compiler/while.untouched.wat +++ b/tests/compiler/while.untouched.wat @@ -176,8 +176,9 @@ global.get $while/m i32.const 1 i32.add + local.tee $0 global.set $while/m - global.get $while/m + local.get $0 else local.get $0 end diff --git a/tslint.json b/tslint.json index dbd2c28b27..e075f8c784 100644 --- a/tslint.json +++ b/tslint.json @@ -7,12 +7,6 @@ "indent": { "options": ["spaces", 2] }, - "max-line-length": { - "options": [{ - "limit": 120, - "ignore-pattern": " *DiagnosticCode\\.[^ ]+,$" - }] - }, "member-access": { "options": ["no-public"] }, From bb1609c9ea8051460ea6acbca50a204ffee3b5db Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 27 Mar 2019 14:43:35 +0100 Subject: [PATCH 067/119] baseline --- src/builtins.ts | 34 +- src/codegen/array.ts | 281 -- src/codegen/gc.ts | 156 - src/common.ts | 22 +- src/compiler.ts | 684 +++-- src/program.ts | 108 +- std/assembly/collector/README.md | 7 +- std/assembly/collector/dummy.ts | 18 +- std/assembly/collector/dummyrc.ts | 29 + std/assembly/collector/itcm.ts | 6 +- std/assembly/runtime.ts | 24 +- tests/compiler/call-super.optimized.wat | 4 +- tests/compiler/call-super.untouched.wat | 162 +- tests/compiler/constructor.optimized.wat | 4 +- tests/compiler/constructor.untouched.wat | 173 +- tests/compiler/exports.optimized.wat | 85 +- tests/compiler/exports.untouched.wat | 38 +- tests/compiler/gc/README.md | 1 + tests/compiler/gc/_dummy.ts | 47 + tests/compiler/gc/global-assign.optimized.wat | 251 ++ tests/compiler/gc/global-assign.ts | 21 + tests/compiler/gc/global-assign.untouched.wat | 331 +++ tests/compiler/gc/global-init.optimized.wat | 248 ++ tests/compiler/gc/global-init.ts | 18 + tests/compiler/gc/global-init.untouched.wat | 328 +++ tests/compiler/gc/rc/README.md | 1 + tests/compiler/gc/rc/_dummy.ts | 43 + .../gc/rc/global-assign.optimized.wat | 349 +++ tests/compiler/gc/rc/global-assign.ts | 24 + .../gc/rc/global-assign.untouched.wat | 425 +++ .../compiler/gc/rc/global-init.optimized.wat | 253 ++ tests/compiler/gc/rc/global-init.ts | 14 + .../compiler/gc/rc/global-init.untouched.wat | 324 +++ tests/compiler/getter-call.optimized.wat | 4 +- tests/compiler/getter-call.untouched.wat | 21 +- tests/compiler/inlining.optimized.wat | 4 +- tests/compiler/inlining.untouched.wat | 41 +- .../new-without-allocator.untouched.wat | 21 +- tests/compiler/number.optimized.wat | 8 +- tests/compiler/number.untouched.wat | 8 +- tests/compiler/object-literal.optimized.wat | 4 +- tests/compiler/object-literal.untouched.wat | 53 +- .../optional-typeparameters.optimized.wat | 4 +- .../optional-typeparameters.untouched.wat | 38 +- tests/compiler/simd.optimized.wat | 13 +- tests/compiler/simd.ts | 2 - tests/compiler/simd.untouched.wat | 695 +++-- .../compiler/std/array-literal.optimized.wat | 4 +- .../compiler/std/array-literal.untouched.wat | 139 +- tests/compiler/std/array.optimized.wat | 274 +- tests/compiler/std/array.untouched.wat | 1876 ++++-------- tests/compiler/std/arraybuffer.optimized.wat | 6 +- tests/compiler/std/arraybuffer.untouched.wat | 94 +- tests/compiler/std/dataview.optimized.wat | 4 +- tests/compiler/std/dataview.untouched.wat | 55 +- tests/compiler/std/date.optimized.wat | 4 +- tests/compiler/std/date.untouched.wat | 21 +- tests/compiler/std/gc-array.optimized.wat | 1954 ------------- tests/compiler/std/gc-array.ts | 24 - tests/compiler/std/gc-array.untouched.wat | 2540 ----------------- tests/compiler/std/gc-basics.optimized.wat | 481 ---- tests/compiler/std/gc-basics.ts | 35 - tests/compiler/std/gc-basics.untouched.wat | 629 ---- .../compiler/std/gc-integration.optimized.wat | 67 - tests/compiler/std/gc-integration.ts | 19 - .../compiler/std/gc-integration.untouched.wat | 81 - tests/compiler/std/gc-object.optimized.wat | 437 --- tests/compiler/std/gc-object.ts | 25 - tests/compiler/std/gc-object.untouched.wat | 569 ---- tests/compiler/std/map.optimized.wat | 4 +- tests/compiler/std/map.untouched.wat | 176 +- tests/compiler/std/new.optimized.wat | 4 +- tests/compiler/std/new.untouched.wat | 21 +- .../std/operator-overloading.optimized.wat | 4 +- .../std/operator-overloading.untouched.wat | 55 +- tests/compiler/std/runtime.optimized.wat | 49 +- tests/compiler/std/runtime.ts | 8 +- tests/compiler/std/runtime.untouched.wat | 56 +- tests/compiler/std/set.optimized.wat | 4 +- tests/compiler/std/set.untouched.wat | 176 +- tests/compiler/std/static-array.optimized.wat | 1289 ++++++++- tests/compiler/std/static-array.ts | 2 + tests/compiler/std/static-array.untouched.wat | 134 +- tests/compiler/std/string-utf8.optimized.wat | 4 +- tests/compiler/std/string-utf8.untouched.wat | 4 +- tests/compiler/std/string.optimized.wat | 10 +- tests/compiler/std/string.untouched.wat | 112 +- tests/compiler/std/symbol.optimized.wat | 4 +- tests/compiler/std/symbol.untouched.wat | 42 +- tests/compiler/std/typedarray.optimized.wat | 50 +- tests/compiler/std/typedarray.untouched.wat | 422 +-- 91 files changed, 6407 insertions(+), 10990 deletions(-) delete mode 100644 src/codegen/array.ts delete mode 100644 src/codegen/gc.ts create mode 100644 std/assembly/collector/dummyrc.ts create mode 100644 tests/compiler/gc/README.md create mode 100644 tests/compiler/gc/_dummy.ts create mode 100644 tests/compiler/gc/global-assign.optimized.wat create mode 100644 tests/compiler/gc/global-assign.ts create mode 100644 tests/compiler/gc/global-assign.untouched.wat create mode 100644 tests/compiler/gc/global-init.optimized.wat create mode 100644 tests/compiler/gc/global-init.ts create mode 100644 tests/compiler/gc/global-init.untouched.wat create mode 100644 tests/compiler/gc/rc/README.md create mode 100644 tests/compiler/gc/rc/_dummy.ts create mode 100644 tests/compiler/gc/rc/global-assign.optimized.wat create mode 100644 tests/compiler/gc/rc/global-assign.ts create mode 100644 tests/compiler/gc/rc/global-assign.untouched.wat create mode 100644 tests/compiler/gc/rc/global-init.optimized.wat create mode 100644 tests/compiler/gc/rc/global-init.ts create mode 100644 tests/compiler/gc/rc/global-init.untouched.wat delete mode 100644 tests/compiler/std/gc-array.optimized.wat delete mode 100644 tests/compiler/std/gc-array.ts delete mode 100644 tests/compiler/std/gc-array.untouched.wat delete mode 100644 tests/compiler/std/gc-basics.optimized.wat delete mode 100644 tests/compiler/std/gc-basics.ts delete mode 100644 tests/compiler/std/gc-basics.untouched.wat delete mode 100644 tests/compiler/std/gc-integration.optimized.wat delete mode 100644 tests/compiler/std/gc-integration.ts delete mode 100644 tests/compiler/std/gc-integration.untouched.wat delete mode 100644 tests/compiler/std/gc-object.optimized.wat delete mode 100644 tests/compiler/std/gc-object.ts delete mode 100644 tests/compiler/std/gc-object.untouched.wat diff --git a/src/builtins.ts b/src/builtins.ts index 55163dbf7f..5868befc8a 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -48,10 +48,7 @@ import { getConstValueI64Low, getConstValueI32, getConstValueF32, - getConstValueF64, - getBinaryOp, - getBinaryLeft, - getBinaryRight + getConstValueF64 } from "./module"; import { @@ -60,14 +57,11 @@ import { Class, Field, Global, - DecoratorFlags, - Local, - Program + DecoratorFlags } from "./program"; import { - FlowFlags, - Flow + FlowFlags } from "./flow"; import { @@ -478,10 +472,18 @@ export namespace BuiltinSymbols { export const memory_grow = "~lib/memory/memory.grow"; export const memory_copy = "~lib/memory/memory.copy"; export const memory_fill = "~lib/memory/memory.fill"; + export const memory_allocate = "~lib/memory/memory.allocate"; + export const memory_free = "~lib/memory/memory.free"; + export const memory_reset = "~lib/memory/memory.reset"; // std/runtime.ts - export const CLASSID = "~lib/runtime/CLASSID"; - export const ITERATEROOTS = "~lib/runtime/ITERATEROOTS"; + export const classId = "~lib/runtime/classId"; + export const iterateRoots = "~lib/runtime/iterateRoots"; + export const allocate = "~lib/runtime/allocate"; + export const reallocate = "~lib/runtime/reallocate"; + export const register = "~lib/runtime/register"; + export const discard = "~lib/runtime/discard"; + export const makeArray = "~lib/runtime/makeArray"; // std/typedarray.ts export const Int8Array = "~lib/typedarray/Int8Array"; @@ -495,6 +497,12 @@ export namespace BuiltinSymbols { export const Uint8ClampedArray = "~lib/typedarray/Uint8ClampedArray"; export const Float32Array = "~lib/typedarray/Float32Array"; export const Float64Array = "~lib/typedarray/Float64Array"; + + // compiler generated + export const started = "~lib/started"; + export const argc = "~lib/argc"; + export const setargc = "~lib/setargc"; + export const capabilities = "~lib/capabilities"; } /** Compiles a call to a built-in function. */ @@ -3607,7 +3615,7 @@ export function compileCall( // === Internal runtime ======================================================================= - case BuiltinSymbols.CLASSID: { + case BuiltinSymbols.classId: { let type = evaluateConstantType(compiler, typeArguments, operands, reportNode); compiler.currentType = Type.u32; if (!type) return module.createUnreachable(); @@ -3615,7 +3623,7 @@ export function compileCall( if (!classReference) return module.createUnreachable(); return module.createI32(classReference.id); } - case BuiltinSymbols.ITERATEROOTS: { + case BuiltinSymbols.iterateRoots: { if ( checkTypeAbsent(typeArguments, reportNode, prototype) | checkArgsRequired(operands, 1, reportNode, compiler) diff --git a/src/codegen/array.ts b/src/codegen/array.ts deleted file mode 100644 index 42d9e4e98e..0000000000 --- a/src/codegen/array.ts +++ /dev/null @@ -1,281 +0,0 @@ -// TBD: managed reference handling makes this cumbersome, and there is a binaryen pass that can -// help propagating constant offsets. ideally, using operator overloads would be enough because -// it's the most flexible way to do this. - -// import { Compiler, ConversionKind, WrapMode } from "../compiler"; -// import { Class, ElementKind, Field, Local } from "../program"; -// import { Expression } from "../ast"; -// import { Type, TypeFlags } from "../types"; -// import { ExpressionRef, getExpressionId, getBinaryOp, getBinaryLeft, getBinaryRight, getConstValueI32, ExpressionId, BinaryOp, NativeType, UnaryOp } from "../module"; -// import { BuiltinSymbols } from "../builtins"; - -// export function makeArrayGet( -// compiler: Compiler, -// target: Class, -// thisExpression: Expression, -// elementExpression: Expression, -// contextualType: Type -// ): ExpressionRef { -// var type = assert(compiler.program.determineBuiltinArrayType(target)); -// var module = compiler.module; -// var outType = ( -// type.is(TypeFlags.INTEGER) && -// contextualType.is(TypeFlags.INTEGER) && -// contextualType.size > type.size -// ) ? contextualType : type; - -// var dataStart = assert(target.lookupInSelf("dataStart")); -// assert(dataStart.kind == ElementKind.FIELD); -// var dataLength = assert(target.lookupInSelf("dataLength")); -// assert(dataLength.kind == ElementKind.FIELD); - -// // compile the index expression and shift it to become the actual byteOffset -// var dynamicOffset = compiler.compileExpression( -// elementExpression, -// Type.i32, -// ConversionKind.IMPLICIT, -// WrapMode.NONE -// ); -// var alignLog2 = type.alignLog2; -// if (alignLog2) { -// dynamicOffset = module.createBinary(BinaryOp.ShlI32, -// dynamicOffset, -// module.createI32(alignLog2) -// ); -// } - -// var usizeType = compiler.options.usizeType; -// var nativeSizeType = compiler.options.nativeSizeType; -// var ptrExpr: ExpressionRef; -// var constantOffset: i32 = 0; - -// // precompute byteOffset into a constant and a dynamic part -// dynamicOffset = module.precomputeExpression(dynamicOffset); -// if (getExpressionId(dynamicOffset) == ExpressionId.Const) { -// constantOffset = getConstValueI32(dynamicOffset); -// dynamicOffset = 0; -// } else if (getExpressionId(dynamicOffset) == ExpressionId.Binary) { -// if (getBinaryOp(dynamicOffset) == BinaryOp.AddI32) { -// let left = getBinaryLeft(dynamicOffset); -// let right = getBinaryRight(dynamicOffset); -// if (getExpressionId(left) == ExpressionId.Const) { -// constantOffset = getConstValueI32(left); -// dynamicOffset = right; -// } else if (getExpressionId(right) == ExpressionId.Const) { -// constantOffset = getConstValueI32(right); -// dynamicOffset = left; -// } -// } -// } -// // ptr = this.dataStart -// ptrExpr = module.createLoad(usizeType.byteSize, true, -// compiler.compileExpression( -// thisExpression, -// target.type, -// ConversionKind.IMPLICIT, -// WrapMode.NONE -// ), -// nativeSizeType, (dataStart).memoryOffset -// ); -// // ptr = ptr + dynamicOffset -// if (dynamicOffset) { -// if (nativeSizeType == NativeType.I64) { -// ptrExpr = module.createBinary(BinaryOp.AddI64, -// ptrExpr, -// module.createUnary(UnaryOp.ExtendU32, dynamicOffset) -// ); -// } else { -// ptrExpr = module.createBinary(BinaryOp.AddI32, -// ptrExpr, -// dynamicOffset -// ); -// } -// } - -// compiler.currentType = outType; -// return module.createLoad( -// type.byteSize, -// type.is(TypeFlags.SIGNED), -// ptrExpr, -// outType.toNativeType(), -// constantOffset -// ); -// } - -// export function makeArraySet( -// compiler: Compiler, -// target: Class, -// thisExpression: Expression, -// elementExpression: Expression, -// valueExpression: Expression, -// contextualType: Type -// ): ExpressionRef { -// var type = assert(compiler.program.determineBuiltinArrayType(target)); -// return makeArraySetWithValue( -// compiler, -// target, -// thisExpression, -// elementExpression, -// compiler.compileExpression( -// valueExpression, -// type.is(TypeFlags.INTEGER | TypeFlags.VALUE) -// ? type.is(TypeFlags.LONG) -// ? type.is(TypeFlags.SIGNED) -// ? Type.i64 -// : Type.u64 -// : type.is(TypeFlags.SIGNED) -// ? Type.i32 -// : Type.u32 -// : type, -// ConversionKind.IMPLICIT, -// WrapMode.NONE -// ), -// contextualType != Type.void -// ); -// } - -// export function makeArraySetWithValue( -// compiler: Compiler, -// target: Class, -// thisExpression: Expression, -// elementExpression: Expression, -// valueExpr: ExpressionRef, -// tee: bool -// ): ExpressionRef { -// var type = assert(compiler.program.determineBuiltinArrayType(target)); -// var module = compiler.module; - -// var dataStart = assert(target.lookupInSelf("dataStart")); -// assert(dataStart.kind == ElementKind.FIELD); -// var dataLength = assert(target.lookupInSelf("dataLength")); -// assert(dataLength.kind == ElementKind.FIELD); - -// var constantOffset: i32 = 0; -// var dynamicOffset = module.precomputeExpression( -// compiler.compileExpression( -// elementExpression, -// Type.i32, -// ConversionKind.IMPLICIT, -// WrapMode.NONE -// ) -// ); -// if (getExpressionId(dynamicOffset) == ExpressionId.Const) { -// constantOffset = getConstValueI32(dynamicOffset); -// dynamicOffset = 0; -// } else if (getExpressionId(dynamicOffset) == ExpressionId.Binary) { -// if (getBinaryOp(dynamicOffset) == BinaryOp.AddI32) { -// let left = getBinaryLeft(dynamicOffset); -// let right = getBinaryRight(dynamicOffset); -// if (getExpressionId(left) == ExpressionId.Const) { -// constantOffset = getConstValueI32(left); -// dynamicOffset = right; -// } else if (getExpressionId(right) == ExpressionId.Const) { -// constantOffset = getConstValueI32(right); -// dynamicOffset = left; -// } -// } -// } - -// var program = compiler.program; -// var isManaged = type.isManaged(program) && target.type.isManaged(program); -// var usizeType = compiler.options.usizeType; -// var nativeSizeType = compiler.options.nativeSizeType; -// var thisExpr = compiler.compileExpression( -// thisExpression, -// target.type, -// ConversionKind.IMPLICIT, -// WrapMode.NONE -// ); -// var tempThis: Local | null = null; -// if (isManaged) { -// tempThis = compiler.currentFlow.getTempLocal(target.type, false); -// thisExpr = module.createTeeLocal(tempThis.index, thisExpr); -// } -// var dataStartExpr = module.createLoad(usizeType.byteSize, true, -// thisExpr, nativeSizeType, (dataStart).memoryOffset -// ); - -// var typeAlignLog2 = type.alignLog2; -// constantOffset <<= typeAlignLog2; -// if (dynamicOffset) { -// if (typeAlignLog2) { -// dynamicOffset = module.createBinary(BinaryOp.ShlI32, -// dynamicOffset, -// module.createI32(typeAlignLog2) -// ); -// } -// if (nativeSizeType == NativeType.I64) { -// dataStartExpr = module.createBinary(BinaryOp.AddI64, -// dataStartExpr, -// module.createUnary(UnaryOp.ExtendU32, dynamicOffset) -// ); -// } else { -// dataStartExpr = module.createBinary(BinaryOp.AddI32, -// dataStartExpr, -// dynamicOffset -// ); -// } -// } - -// // handle Array: value = RETAIN(value, this) -// if (isManaged) { -// let program = compiler.program; -// let retainInstance = compiler.resolver.resolveFunction(assert(program.retainPrototype), [ type, target.type ]); -// if (!retainInstance) return module.createUnreachable(); -// valueExpr = compiler.makeCallInlinePrechecked(retainInstance, [ -// valueExpr, -// module.createGetLocal(assert(tempThis).index, nativeSizeType) -// ], 0, true); - -// // handle Uint8ClampedArray: value = ~(value >> 31) & (((255 - value) >> 31) | value) -// } else if (target.internalName == BuiltinSymbols.Uint8ClampedArray) { -// let tempLocal = compiler.currentFlow.getAndFreeTempLocal(Type.i32, true); -// valueExpr = module.createBinary(BinaryOp.AndI32, -// module.createBinary(BinaryOp.XorI32, -// module.createBinary(BinaryOp.ShrI32, -// module.createTeeLocal(tempLocal.index, valueExpr), -// module.createI32(31) -// ), -// module.createI32(-1) -// ), -// module.createBinary(BinaryOp.OrI32, -// module.createBinary(BinaryOp.ShrI32, -// module.createBinary(BinaryOp.SubI32, -// module.createI32(255), -// module.createGetLocal(tempLocal.index, NativeType.I32) -// ), -// module.createI32(31) -// ), -// module.createGetLocal(tempLocal.index, NativeType.I32) -// ) -// ); -// } -// assert(!tempThis); - -// var nativeType = type.toNativeType(); - -// if (!tee) { -// compiler.currentType = Type.void; -// return module.createStore( -// type.byteSize, -// dataStartExpr, -// valueExpr, -// nativeType, -// constantOffset -// ); -// } else { -// let flow = compiler.currentFlow; -// let tempLocal = flow.getAndFreeTempLocal(type, false); -// compiler.currentType = type; -// return module.createBlock(null, [ -// module.createStore( -// type.byteSize, -// dataStartExpr, -// module.createTeeLocal(tempLocal.index, valueExpr), -// nativeType, -// constantOffset -// ), -// module.createGetLocal(tempLocal.index, nativeType) -// ], nativeType); -// } -// } diff --git a/src/codegen/gc.ts b/src/codegen/gc.ts deleted file mode 100644 index 52dde0008b..0000000000 --- a/src/codegen/gc.ts +++ /dev/null @@ -1,156 +0,0 @@ -import { Compiler } from "../compiler"; -import { ExpressionRef, NativeType, BinaryOp } from "../module"; -import { Local, Function, Class } from "../program"; -import { Type } from "../types"; - -/** Prepares the insertion of a reference into an _uninitialized_ parent using the GC interface. */ -export function makeInsertRef( - compiler: Compiler, - valueExpr: ExpressionRef, - tempParent: Local, - nullable: bool -): ExpressionRef { - var module = compiler.module; - var program = compiler.program; - var usizeType = compiler.options.usizeType; - var nativeSizeType = compiler.options.nativeSizeType; - var flow = compiler.currentFlow; - var tempValue = flow.getTempLocal(usizeType, false); - var handle: ExpressionRef; - var fn: Function | null; - if (fn = program.linkRef) { // tracing - handle = module.createCall(fn.internalName, [ - module.createGetLocal(tempValue.index, nativeSizeType), - module.createGetLocal(tempParent.index, nativeSizeType) - ], NativeType.None); - } else if (fn = program.retainRef) { // arc - handle = module.createCall(fn.internalName, [ - module.createGetLocal(tempValue.index, nativeSizeType) - ], NativeType.None); - } else { - assert(false); - return module.createUnreachable(); - } - flow.freeTempLocal(tempValue); - if (!compiler.compileFunction(fn)) return module.createUnreachable(); - // { - // [if (value !== null)] link/retain(value[, parent]) - // } -> value - return module.createBlock(null, [ - module.createSetLocal(tempValue.index, valueExpr), - nullable - ? module.createIf( - module.createGetLocal(tempValue.index, nativeSizeType), - handle - ) - : handle, - module.createGetLocal(tempValue.index, nativeSizeType) - ], nativeSizeType); -} - -/** Prepares the replaces a reference hold by an _initialized_ parent using the GC interface. */ -export function makeReplaceRef( - compiler: Compiler, - valueExpr: ExpressionRef, - oldValueExpr: ExpressionRef, - tempParent: Local, - nullable: bool -): ExpressionRef { - var module = compiler.module; - var program = compiler.program; - var usizeType = compiler.options.usizeType; - var nativeSizeType = compiler.options.nativeSizeType; - var flow = compiler.currentFlow; - var tempValue = flow.getTempLocal(usizeType, false); - var tempOldValue = flow.getTempLocal(usizeType, false); - var handleOld: ExpressionRef; - var handleNew: ExpressionRef; - var fn1: Function | null, fn2: Function | null; - if (fn1 = program.linkRef) { // tracing - fn2 = assert(program.unlinkRef); - handleOld = module.createCall(fn2.internalName, [ - module.createGetLocal(tempOldValue.index, nativeSizeType), - module.createGetLocal(tempParent.index, nativeSizeType) - ], NativeType.None); - handleNew = module.createCall(fn1.internalName, [ - module.createGetLocal(tempValue.index, nativeSizeType), - module.createGetLocal(tempParent.index, nativeSizeType) - ], NativeType.None); - } else if (fn1 = program.retainRef) { // arc - fn2 = assert(program.releaseRef); - handleOld = module.createCall(fn2.internalName, [ - module.createGetLocal(tempOldValue.index, nativeSizeType) - ], NativeType.None); - handleNew = module.createCall(fn1.internalName, [ - module.createGetLocal(tempValue.index, nativeSizeType) - ], NativeType.None); - } else { - assert(false); - return module.createUnreachable(); - } - flow.freeTempLocal(tempValue); - flow.freeTempLocal(tempOldValue); - if (!compiler.compileFunction(fn1) || !compiler.compileFunction(fn2)) return module.createUnreachable(); - // if (value != oldValue) { - // if (oldValue !== null) unlink/release(oldValue[, parent]) - // [if (value !== null)] link/retain(value[, parent]) - // } -> value - return module.createIf( - module.createBinary(nativeSizeType == NativeType.I32 ? BinaryOp.NeI32 : BinaryOp.NeI64, - module.createTeeLocal(tempValue.index, valueExpr), - module.createTeeLocal(tempOldValue.index, oldValueExpr) - ), - module.createBlock(null, [ - module.createIf( - module.createGetLocal(tempOldValue.index, nativeSizeType), - handleOld - ), - nullable - ? module.createIf( - module.createGetLocal(tempValue.index, nativeSizeType), - handleNew - ) - : handleNew, - module.createGetLocal(tempValue.index, nativeSizeType) - ], nativeSizeType), - module.createGetLocal(tempValue.index, nativeSizeType) - ); -} - -export function makeInstanceOfClass( - compiler: Compiler, - expr: ExpressionRef, - classInstance: Class -): ExpressionRef { - var module = compiler.module; - var flow = compiler.currentFlow; - var idTemp = flow.getTempLocal(Type.i32, false); - var idExpr = module.createLoad(4, false, - module.createBinary(BinaryOp.SubI32, - expr, - module.createI32(compiler.program.runtimeHeaderSize) - ), - NativeType.I32 - ); - var label = "instanceof_" + classInstance.name + "|" + flow.pushBreakLabel(); - var conditions: ExpressionRef[] = []; - conditions.push( - module.createDrop( // br_if returns the value too - module.createBreak(label, - module.createBinary(BinaryOp.EqI32, // classId == class.id - module.createTeeLocal(idTemp.index, idExpr), - module.createI32(classInstance.id) - ), - module.createI32(1) // ? true - ) - ) - ); - // TODO: insert conditions for all possible subclasses (i.e. cat is also animal) - // TODO: simplify if there are none - conditions.push( - module.createI32(0) // : false - ); - flow.freeTempLocal(idTemp); - flow.popBreakLabel(); - return module.createBlock(label, conditions, NativeType.I32); -} diff --git a/src/common.ts b/src/common.ts index 07fe82bd2e..8068571db8 100644 --- a/src/common.ts +++ b/src/common.ts @@ -142,10 +142,6 @@ export namespace CommonSymbols { export const this_ = "this"; export const super_ = "super"; export const constructor = "constructor"; -} - -/** Common standard library symbols. */ -export namespace LibrarySymbols { // constants export const ASC_TARGET = "ASC_TARGET"; export const ASC_NO_TREESHAKING = "ASC_NO_TREESHAKING"; @@ -182,19 +178,11 @@ export namespace LibrarySymbols { export const Mathf = "Mathf"; // runtime export const abort = "abort"; - export const ALLOCATE = "ALLOCATE"; - export const ALLOCATE_UNMANAGED = "ALLOCATE_UNMANAGED"; - export const REALLOCATE = "REALLOCATE"; - export const DISCARD = "DISCARD"; - export const REGISTER = "REGISTER"; - export const RETAIN = "RETAIN"; - export const RELEASE = "RELEASE"; - export const MOVE = "MOVE"; - export const REPLACE = "REPLACE"; - export const MAKEARRAY = "MAKEARRAY"; - // other - export const length = "length"; - export const byteLength = "byteLength"; export const pow = "pow"; export const mod = "mod"; + export const allocate = "allocate"; + export const reallocate = "reallocate"; + export const register = "register"; + export const discard = "discard"; + export const makeArray = "makeArray"; } diff --git a/src/compiler.ts b/src/compiler.ts index 1f847cdeb4..fc6b9555d6 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -46,7 +46,6 @@ import { STATIC_DELIMITER, GETTER_PREFIX, SETTER_PREFIX, - LibrarySymbols, CommonSymbols, INDEX_SUFFIX } from "./common"; @@ -171,8 +170,6 @@ import { makeMap } from "./util"; -import { makeInsertRef, makeReplaceRef } from "./codegen/gc"; - /** Compilation target. */ export enum Target { /** WebAssembly with 32-bit pointers. */ @@ -442,7 +439,7 @@ export class Compiler extends DiagnosticEmitter { // set up module exports for (let file of this.program.filesByName.values()) { - if (file.source.isEntry) this.makeModuleExports(file); + if (file.source.isEntry) this.ensureModuleExports(file); } // set up gc @@ -453,24 +450,24 @@ export class Compiler extends DiagnosticEmitter { if (program.options.isWasm64) capabilities |= Capability.WASM64; if (program.gcImplemented) capabilities |= Capability.GC; if (capabilities != 0) { - module.addGlobal(CompilerSymbols.capabilities, NativeType.I32, false, module.createI32(capabilities)); - module.addGlobalExport(CompilerSymbols.capabilities, ".capabilities"); + module.addGlobal(BuiltinSymbols.capabilities, NativeType.I32, false, module.createI32(capabilities)); + module.addGlobalExport(BuiltinSymbols.capabilities, ".capabilities"); } return module; } /** Applies the respective module exports for the specified file. */ - private makeModuleExports(file: File): void { + private ensureModuleExports(file: File): void { var members = file.exports; - if (members) for (let [name, member] of members) this.makeModuleExport(name, member); + if (members) for (let [name, member] of members) this.ensureModuleExport(name, member); var exportsStar = file.exportsStar; if (exportsStar) { - for (let i = 0, k = exportsStar.length; i < k; ++i) this.makeModuleExports(exportsStar[i]); + for (let i = 0, k = exportsStar.length; i < k; ++i) this.ensureModuleExports(exportsStar[i]); } } /** Applies the respective module export(s) for the specified element. */ - private makeModuleExport(name: string, element: Element, prefix: string = ""): void { + private ensureModuleExport(name: string, element: Element, prefix: string = ""): void { switch (element.kind) { // traverse instances @@ -483,7 +480,7 @@ export class Compiler extends DiagnosticEmitter { let fullName = instance.internalName; instanceName += fullName.substring(fullName.lastIndexOf("<")); } - this.makeModuleExport(instanceName, instance, prefix); + this.ensureModuleExport(instanceName, instance, prefix); } } break; @@ -497,7 +494,7 @@ export class Compiler extends DiagnosticEmitter { let fullName = instance.internalName; instanceName += fullName.substring(fullName.lastIndexOf("<")); } - this.makeModuleExport(instanceName, instance, prefix); + this.ensureModuleExport(instanceName, instance, prefix); } } break; @@ -505,8 +502,8 @@ export class Compiler extends DiagnosticEmitter { case ElementKind.PROPERTY_PROTOTYPE: { let getter = (element).getterPrototype; let setter = (element).setterPrototype; - if (getter) this.makeModuleExport(GETTER_PREFIX + name, getter, prefix); - if (setter) this.makeModuleExport(SETTER_PREFIX + name, setter, prefix); + if (getter) this.ensureModuleExport(GETTER_PREFIX + name, getter, prefix); + if (setter) this.ensureModuleExport(SETTER_PREFIX + name, setter, prefix); break; } @@ -547,9 +544,9 @@ export class Compiler extends DiagnosticEmitter { } case ElementKind.PROPERTY: { let getter = (element).getterInstance; - if (getter) this.makeModuleExport(GETTER_PREFIX + name, getter, prefix); + if (getter) this.ensureModuleExport(GETTER_PREFIX + name, getter, prefix); let setter = (element).setterInstance; - if (setter) this.makeModuleExport(SETTER_PREFIX + name, setter, prefix); + if (setter) this.ensureModuleExport(SETTER_PREFIX + name, setter, prefix); break; } case ElementKind.FIELD: { @@ -619,18 +616,18 @@ export class Compiler extends DiagnosticEmitter { ) { for (let member of members.values()) { if (!member.is(CommonFlags.EXPORT)) continue; - this.makeModuleExport(member.name, member, subPrefix); + this.ensureModuleExport(member.name, member, subPrefix); } } else { for (let member of members.values()) { if (member.is(CommonFlags.PRIVATE)) continue; - this.makeModuleExport(member.name, member, subPrefix); + this.ensureModuleExport(member.name, member, subPrefix); } } } } - // general + // === Elements ================================================================================= /** Compiles any element. */ compileElement(element: Element, compileMembers: bool = true): void { @@ -750,7 +747,7 @@ export class Compiler extends DiagnosticEmitter { } } - // globals + // === Globals ================================================================================== compileGlobal(global: Global): bool { if (global.is(CommonFlags.COMPILED)) return true; @@ -810,7 +807,8 @@ export class Compiler extends DiagnosticEmitter { // ambient builtins like 'HEAP_BASE' need to be resolved but are added explicitly if (global.is(CommonFlags.AMBIENT) && global.hasDecorator(DecoratorFlags.BUILTIN)) return true; - var nativeType = global.type.toNativeType(); + var type = global.type; + var nativeType = type.toNativeType(); var isDeclaredConstant = global.is(CommonFlags.CONST) || global.is(CommonFlags.STATIC | CommonFlags.READONLY); // handle imports @@ -852,7 +850,7 @@ export class Compiler extends DiagnosticEmitter { } initExpr = this.compileExpression( initializerNode, - global.type, + type, ConversionKind.IMPLICIT, WrapMode.WRAP, global @@ -915,7 +913,7 @@ export class Compiler extends DiagnosticEmitter { // initialize to zero if there's no initializer } else { - initExpr = global.type.toNativeZero(module); + initExpr = type.toNativeZero(module); } var internalName = global.internalName; @@ -927,16 +925,20 @@ export class Compiler extends DiagnosticEmitter { assert(findDecorator(DecoratorKind.INLINE, global.decoratorNodes)).range, "inline" ); } - module.addGlobal(internalName, nativeType, true, global.type.toNativeZero(module)); - this.currentBody.push(module.createSetGlobal(internalName, initExpr)); - + module.addGlobal(internalName, nativeType, true, type.toNativeZero(module)); + if (type.isManaged(this.program) && this.program.retainRef) { + initExpr = this.makeInsertRef(initExpr, null, type.is(TypeFlags.NULLABLE)); + } + this.currentBody.push( + module.createSetGlobal(internalName, initExpr) + ); } else if (!global.hasDecorator(DecoratorFlags.INLINE)) { // compile normally module.addGlobal(internalName, nativeType, !isDeclaredConstant, initExpr); } return true; } - // enums + // === Enums ==================================================================================== compileEnum(element: Enum): bool { if (element.is(CommonFlags.COMPILED)) return true; @@ -1030,7 +1032,7 @@ export class Compiler extends DiagnosticEmitter { return true; } - // functions + // === Functions ================================================================================ /** Resolves the specified type arguments prior to compiling the resulting function instance. */ compileFunctionUsingTypeArguments( @@ -1117,16 +1119,16 @@ export class Compiler extends DiagnosticEmitter { // make the main function call `start` implicitly, but only once if (instance.prototype == this.program.explicitStartFunction) { - module.addGlobal(CompilerSymbols.started, NativeType.I32, true, module.createI32(0)); + module.addGlobal(BuiltinSymbols.started, NativeType.I32, true, module.createI32(0)); stmts.unshift( module.createIf( module.createUnary( UnaryOp.EqzI32, - module.createGetGlobal(CompilerSymbols.started, NativeType.I32) + module.createGetGlobal(BuiltinSymbols.started, NativeType.I32) ), module.createBlock(null, [ module.createCall("start", null, NativeType.None), - module.createSetGlobal(CompilerSymbols.started, module.createI32(1)) + module.createSetGlobal(BuiltinSymbols.started, module.createI32(1)) ]) ) ); @@ -1156,7 +1158,7 @@ export class Compiler extends DiagnosticEmitter { module.createGetLocal(thisLocalIndex, nativeSizeType) ), module.createSetLocal(thisLocalIndex, - this.makeAllocation(classInstance) + this.makeAllocation(classInstance, instance.identifierNode) ) ) ); @@ -1265,7 +1267,7 @@ export class Compiler extends DiagnosticEmitter { return true; } - // classes + // === Classes ================================================================================== compileClassUsingTypeArguments( prototype: ClassPrototype, @@ -1384,7 +1386,7 @@ export class Compiler extends DiagnosticEmitter { ); } - // memory + // === Memory =================================================================================== /** Adds a static memory segment with the specified data. */ addMemorySegment(buffer: Uint8Array, alignment: i32 = 8): MemorySegment { @@ -1395,7 +1397,144 @@ export class Compiler extends DiagnosticEmitter { return segment; } - // function table + /** Ensures that the specified string exists in static memory and returns a pointer to it. */ + ensureStaticString(stringValue: string): ExpressionRef { + var program = this.program; + var rtHeaderSize = program.runtimeHeaderSize; + var stringInstance = assert(program.stringInstance); + var stringSegment: MemorySegment; + var segments = this.stringSegments; + if (segments.has(stringValue)) { + stringSegment = segments.get(stringValue)!; // reuse + } else { + let length = stringValue.length; + let buffer = new Uint8Array(rtHeaderSize + (length << 1)); + program.writeRuntimeHeader(buffer, 0, stringInstance, length << 1); + for (let i = 0; i < length; ++i) { + writeI16(stringValue.charCodeAt(i), buffer, rtHeaderSize + (i << 1)); + } + stringSegment = this.addMemorySegment(buffer); + segments.set(stringValue, stringSegment); + } + var ref = i64_add(stringSegment.offset, i64_new(rtHeaderSize)); + this.currentType = stringInstance.type; + if (this.options.isWasm64) { + return this.module.createI64(i64_low(ref), i64_high(ref)); + } else { + assert(i64_is_u32(ref)); + return this.module.createI32(i64_low(ref)); + } + } + + ensureStaticArrayBuffer(elementType: Type, values: ExpressionRef[]): MemorySegment { + var program = this.program; + var length = values.length; + var byteSize = elementType.byteSize; + var byteLength = length * byteSize; + var bufferInstance = assert(program.arrayBufferInstance); + var runtimeHeaderSize = program.runtimeHeaderSize; + + var buf = new Uint8Array(runtimeHeaderSize + byteLength); + program.writeRuntimeHeader(buf, 0, bufferInstance, byteLength); + var pos = runtimeHeaderSize; + var nativeType = elementType.toNativeType(); + switch (nativeType) { + case NativeType.I32: { + switch (byteSize) { + case 1: { + for (let i = 0; i < length; ++i) { + let value = values[i]; + assert(getExpressionType(value) == nativeType); + assert(getExpressionId(value) == ExpressionId.Const); + writeI8(getConstValueI32(value), buf, pos); + pos += 1; + } + break; + } + case 2: { + for (let i = 0; i < length; ++i) { + let value = values[i]; + assert(getExpressionType(value) == nativeType); + assert(getExpressionId(value) == ExpressionId.Const); + writeI16(getConstValueI32(value), buf, pos); + pos += 2; + } + break; + } + case 4: { + for (let i = 0; i < length; ++i) { + let value = values[i]; + assert(getExpressionType(value) == nativeType); + assert(getExpressionId(value) == ExpressionId.Const); + writeI32(getConstValueI32(value), buf, pos); + pos += 4; + } + break; + } + default: assert(false); + } + break; + } + case NativeType.I64: { + for (let i = 0; i < length; ++i) { + let value = values[i]; + assert(getExpressionType(value) == nativeType); + assert(getExpressionId(value) == ExpressionId.Const); + writeI64(i64_new(getConstValueI64Low(value), getConstValueI64High(value)), buf, pos); + pos += 8; + } + break; + } + case NativeType.F32: { + for (let i = 0; i < length; ++i) { + let value = values[i]; + assert(getExpressionType(value) == nativeType); + assert(getExpressionId(value) == ExpressionId.Const); + writeF32(getConstValueF32(value), buf, pos); + pos += 4; + } + break; + } + case NativeType.F64: { + for (let i = 0; i < length; ++i) { + let value = values[i]; + assert(getExpressionType(value) == nativeType); + assert(getExpressionId(value) == ExpressionId.Const); + writeF64(getConstValueF64(value), buf, pos); + pos += 8; + } + break; + } + default: assert(false); + } + assert(pos == buf.length); + + return this.addMemorySegment(buf); + } + + ensureStaticArrayHeader(elementType: Type, bufferSegment: MemorySegment): MemorySegment { + var program = this.program; + var runtimeHeaderSize = program.runtimeHeaderSize; + var arrayPrototype = assert(program.arrayPrototype); + var arrayInstance = assert(this.resolver.resolveClass(arrayPrototype, [ elementType ])); + var arrayInstanceSize = arrayInstance.currentMemoryOffset; + var bufferLength = bufferSegment.buffer.length - runtimeHeaderSize; + var arrayLength = i32(bufferLength / elementType.byteSize); + + var buf = new Uint8Array(runtimeHeaderSize + arrayInstanceSize); + program.writeRuntimeHeader(buf, 0, arrayInstance, arrayInstanceSize); + + var bufferAddress32 = i64_low(bufferSegment.offset) + runtimeHeaderSize; + assert(!program.options.isWasm64); // TODO + assert(arrayInstance.writeField("data", bufferAddress32, buf, runtimeHeaderSize)); + assert(arrayInstance.writeField("dataStart", bufferAddress32, buf, runtimeHeaderSize)); + assert(arrayInstance.writeField("dataLength", bufferLength, buf, runtimeHeaderSize)); + assert(arrayInstance.writeField("length_", arrayLength, buf, runtimeHeaderSize)); + + return this.addMemorySegment(buf); + } + + // === Table ==================================================================================== /** Ensures that a table entry exists for the specified function and returns its index. */ ensureFunctionTableEntry(func: Function): i32 { @@ -1414,7 +1553,7 @@ export class Compiler extends DiagnosticEmitter { return index; } - // statements + // === Statements =============================================================================== compileTopLevelStatement(statement: Statement, body: ExpressionRef[]): void { switch (statement.kind) { @@ -2286,7 +2425,7 @@ export class Compiler extends DiagnosticEmitter { ]); } - // expressions + // === Expressions ============================================================================== /** * Compiles the value of an inlined constant element. @@ -3685,7 +3824,7 @@ export class Compiler extends DiagnosticEmitter { rightExpr = this.compileExpression(right, Type.f32, ConversionKind.IMPLICIT, WrapMode.NONE); rightType = this.currentType; if (!(instance = this.f32PowInstance)) { - let namespace = this.program.lookupGlobal(LibrarySymbols.Mathf); + let namespace = this.program.lookupGlobal(CommonSymbols.Mathf); if (!namespace) { this.error( DiagnosticCode.Cannot_find_name_0, @@ -3694,7 +3833,7 @@ export class Compiler extends DiagnosticEmitter { expr = module.createUnreachable(); break; } - let prototype = namespace.members ? namespace.members.get(LibrarySymbols.pow) : null; + let prototype = namespace.members ? namespace.members.get(CommonSymbols.pow) : null; if (!prototype) { this.error( DiagnosticCode.Cannot_find_name_0, @@ -3727,7 +3866,7 @@ export class Compiler extends DiagnosticEmitter { ); rightType = this.currentType; if (!(instance = this.f64PowInstance)) { - let namespace = this.program.lookupGlobal(LibrarySymbols.Math); + let namespace = this.program.lookupGlobal(CommonSymbols.Math); if (!namespace) { this.error( DiagnosticCode.Cannot_find_name_0, @@ -3736,7 +3875,7 @@ export class Compiler extends DiagnosticEmitter { expr = module.createUnreachable(); break; } - let prototype = namespace.members ? namespace.members.get(LibrarySymbols.pow) : null; + let prototype = namespace.members ? namespace.members.get(CommonSymbols.pow) : null; if (!prototype) { this.error( DiagnosticCode.Cannot_find_name_0, @@ -3977,7 +4116,7 @@ export class Compiler extends DiagnosticEmitter { case TypeKind.F32: { let instance = this.f32ModInstance; if (!instance) { - let namespace = this.program.lookupGlobal(LibrarySymbols.Mathf); + let namespace = this.program.lookupGlobal(CommonSymbols.Mathf); if (!namespace) { this.error( DiagnosticCode.Cannot_find_name_0, @@ -3986,7 +4125,7 @@ export class Compiler extends DiagnosticEmitter { expr = module.createUnreachable(); break; } - let prototype = namespace.members ? namespace.members.get(LibrarySymbols.mod) : null; + let prototype = namespace.members ? namespace.members.get(CommonSymbols.mod) : null; if (!prototype) { this.error( DiagnosticCode.Cannot_find_name_0, @@ -4008,7 +4147,7 @@ export class Compiler extends DiagnosticEmitter { case TypeKind.F64: { let instance = this.f64ModInstance; if (!instance) { - let namespace = this.program.lookupGlobal(LibrarySymbols.Math); + let namespace = this.program.lookupGlobal(CommonSymbols.Math); if (!namespace) { this.error( DiagnosticCode.Cannot_find_name_0, @@ -4017,7 +4156,7 @@ export class Compiler extends DiagnosticEmitter { expr = module.createUnreachable(); break; } - let prototype = namespace.members ? namespace.members.get(LibrarySymbols.mod) : null; + let prototype = namespace.members ? namespace.members.get(CommonSymbols.mod) : null; if (!prototype) { this.error( DiagnosticCode.Cannot_find_name_0, @@ -5017,20 +5156,33 @@ export class Compiler extends DiagnosticEmitter { return this.module.createTeeLocal(localIndex, valueExpr); } else { this.currentType = Type.void; - return this.module.createSetLocal(localIndex, valueExpr) + return this.module.createSetLocal(localIndex, valueExpr); } } makeGlobalAssignment(global: Global, valueExpr: ExpressionRef, tee: bool): ExpressionRef { - // TBD: use REPLACE macro to keep track of managed refcounts? currently this doesn't work - // because there isn't a parent ref here. a tracing GC wouldn't need the hook at all while - // a reference counting gc doesn't need a parent. + var module = this.module; var type = global.type; assert(type != Type.void); - valueExpr = this.ensureSmallIntegerWrap(valueExpr, type); // global values must be wrapped + var nativeType = type.toNativeType(); + + // MANAGED (reference counting) + if (type.isManaged(this.program)) { + if (this.program.retainRef) { + valueExpr = this.makeReplaceRef( + valueExpr, + module.createGetGlobal(global.internalName, nativeType), + null, + type.is(TypeFlags.NULLABLE) + ); + } + + // UNMANAGED + } else { + valueExpr = this.ensureSmallIntegerWrap(valueExpr, type); // global values must be wrapped + } + if (tee) { - let module = this.module; - let nativeType = type.toNativeType(); let tempValue = this.currentFlow.getAndFreeTempLocal(type, true); this.currentType = type; return module.createBlock(null, [ @@ -5064,7 +5216,7 @@ export class Compiler extends DiagnosticEmitter { expr = module.createBlock(null, [ module.createStore(fieldType.byteSize, module.createTeeLocal(tempThis.index, thisExpr), - makeReplaceRef(this, + this.makeReplaceRef( module.createTeeLocal(tempValue.index, valueExpr), module.createLoad(fieldType.byteSize, fieldType.is(TypeFlags.SIGNED), module.createGetLocal(tempThis.index, nativeThisType), @@ -5082,7 +5234,7 @@ export class Compiler extends DiagnosticEmitter { } else { // no need for a temp local expr = module.createStore(fieldType.byteSize, module.createTeeLocal(tempThis.index, thisExpr), - makeReplaceRef(this, + this.makeReplaceRef( valueExpr, module.createLoad(fieldType.byteSize, fieldType.is(TypeFlags.SIGNED), module.createGetLocal(tempThis.index, nativeThisType), @@ -5160,7 +5312,7 @@ export class Compiler extends DiagnosticEmitter { module.createIf( module.createGetLocal(thisLocal.index, nativeSizeType), module.createGetLocal(thisLocal.index, nativeSizeType), - this.makeAllocation(classInstance) + this.makeAllocation(classInstance, expression) ) ) ) @@ -5827,10 +5979,10 @@ export class Compiler extends DiagnosticEmitter { minArguments ? module.createBinary( BinaryOp.SubI32, - module.createGetGlobal(CompilerSymbols.argc, NativeType.I32), + module.createGetGlobal(BuiltinSymbols.argc, NativeType.I32), module.createI32(minArguments) ) - : module.createGetGlobal(CompilerSymbols.argc, NativeType.I32) + : module.createGetGlobal(BuiltinSymbols.argc, NativeType.I32) ) ]), module.createUnreachable() @@ -5891,30 +6043,29 @@ export class Compiler extends DiagnosticEmitter { if (!this.argcVar) { let module = this.module; this.argcVar = module.addGlobal( - CompilerSymbols.argc, + BuiltinSymbols.argc, NativeType.I32, true, module.createI32(0) ); } - return CompilerSymbols.argc; + return BuiltinSymbols.argc; } /** Makes sure that the argument count helper setter is present and returns its name. */ private ensureArgcSet(): string { - var internalName = CompilerSymbols.setargc; if (!this.argcSet) { let module = this.module; - this.argcSet = module.addFunction(internalName, + this.argcSet = module.addFunction(BuiltinSymbols.setargc, this.ensureFunctionType([ Type.u32 ], Type.void), null, module.createSetGlobal(this.ensureArgcVar(), module.createGetLocal(0, NativeType.I32) ) ); - module.addFunctionExport(internalName, ".setargc"); + module.addFunctionExport(BuiltinSymbols.setargc, ".setargc"); } - return internalName; + return BuiltinSymbols.setargc; } /** Creates a direct call to the specified function. */ @@ -6357,7 +6508,7 @@ export class Compiler extends DiagnosticEmitter { module.createGetLocal(thisLocal.index, nativeSizeType) ), module.createSetLocal(thisLocal.index, - this.makeAllocation(classInstance) + this.makeAllocation(classInstance, expression) ) ) ]; @@ -6605,147 +6756,10 @@ export class Compiler extends DiagnosticEmitter { return module.createUnreachable(); } - /** Ensures that the specified string exists in static memory and returns a pointer to it. */ - ensureStaticString(stringValue: string): ExpressionRef { - var program = this.program; - var rtHeaderSize = program.runtimeHeaderSize; - var stringInstance = assert(program.stringInstance); - var stringSegment: MemorySegment; - var segments = this.stringSegments; - if (segments.has(stringValue)) { - stringSegment = segments.get(stringValue)!; // reuse - } else { - let length = stringValue.length; - let buffer = new Uint8Array(rtHeaderSize + (length << 1)); - program.writeRuntimeHeader(buffer, 0, stringInstance, length << 1); - for (let i = 0; i < length; ++i) { - writeI16(stringValue.charCodeAt(i), buffer, rtHeaderSize + (i << 1)); - } - stringSegment = this.addMemorySegment(buffer); - segments.set(stringValue, stringSegment); - } - var ref = i64_add(stringSegment.offset, i64_new(rtHeaderSize)); - this.currentType = stringInstance.type; - if (this.options.isWasm64) { - return this.module.createI64(i64_low(ref), i64_high(ref)); - } else { - assert(i64_is_u32(ref)); - return this.module.createI32(i64_low(ref)); - } - } - compileStringLiteral(expression: StringLiteralExpression): ExpressionRef { return this.ensureStaticString(expression.value); } - ensureStaticArrayBuffer(elementType: Type, values: ExpressionRef[]): MemorySegment { - var program = this.program; - var length = values.length; - var byteSize = elementType.byteSize; - var byteLength = length * byteSize; - var bufferInstance = assert(program.arrayBufferInstance); - var runtimeHeaderSize = program.runtimeHeaderSize; - - var buf = new Uint8Array(runtimeHeaderSize + byteLength); - program.writeRuntimeHeader(buf, 0, bufferInstance, byteLength); - var pos = runtimeHeaderSize; - var nativeType = elementType.toNativeType(); - switch (nativeType) { - case NativeType.I32: { - switch (byteSize) { - case 1: { - for (let i = 0; i < length; ++i) { - let value = values[i]; - assert(getExpressionType(value) == nativeType); - assert(getExpressionId(value) == ExpressionId.Const); - writeI8(getConstValueI32(value), buf, pos); - pos += 1; - } - break; - } - case 2: { - for (let i = 0; i < length; ++i) { - let value = values[i]; - assert(getExpressionType(value) == nativeType); - assert(getExpressionId(value) == ExpressionId.Const); - writeI16(getConstValueI32(value), buf, pos); - pos += 2; - } - break; - } - case 4: { - for (let i = 0; i < length; ++i) { - let value = values[i]; - assert(getExpressionType(value) == nativeType); - assert(getExpressionId(value) == ExpressionId.Const); - writeI32(getConstValueI32(value), buf, pos); - pos += 4; - } - break; - } - default: assert(false); - } - break; - } - case NativeType.I64: { - for (let i = 0; i < length; ++i) { - let value = values[i]; - assert(getExpressionType(value) == nativeType); - assert(getExpressionId(value) == ExpressionId.Const); - writeI64(i64_new(getConstValueI64Low(value), getConstValueI64High(value)), buf, pos); - pos += 8; - } - break; - } - case NativeType.F32: { - for (let i = 0; i < length; ++i) { - let value = values[i]; - assert(getExpressionType(value) == nativeType); - assert(getExpressionId(value) == ExpressionId.Const); - writeF32(getConstValueF32(value), buf, pos); - pos += 4; - } - break; - } - case NativeType.F64: { - for (let i = 0; i < length; ++i) { - let value = values[i]; - assert(getExpressionType(value) == nativeType); - assert(getExpressionId(value) == ExpressionId.Const); - writeF64(getConstValueF64(value), buf, pos); - pos += 8; - } - break; - } - default: assert(false); - } - assert(pos == buf.length); - - return this.addMemorySegment(buf); - } - - ensureStaticArrayHeader(elementType: Type, bufferSegment: MemorySegment): MemorySegment { - var program = this.program; - var runtimeHeaderSize = program.runtimeHeaderSize; - var arrayPrototype = assert(program.arrayPrototype); - var arrayInstance = assert(this.resolver.resolveClass(arrayPrototype, [ elementType ])); - var arrayInstanceSize = arrayInstance.currentMemoryOffset; - var bufferLength = bufferSegment.buffer.length - runtimeHeaderSize; - var arrayLength = i32(bufferLength / elementType.byteSize); - - var buf = new Uint8Array(runtimeHeaderSize + arrayInstanceSize); - program.writeRuntimeHeader(buf, 0, arrayInstance, arrayInstanceSize); - - var bufferAddress32 = i64_low(bufferSegment.offset) + runtimeHeaderSize; - assert(!program.options.isWasm64); // TODO - assert(arrayInstance.writeField("data", bufferAddress32, buf, runtimeHeaderSize)); - assert(arrayInstance.writeField("dataStart", bufferAddress32, buf, runtimeHeaderSize)); - assert(arrayInstance.writeField("dataLength", bufferLength, buf, runtimeHeaderSize)); - assert(arrayInstance.writeField("length_", arrayLength, buf, runtimeHeaderSize)); - - return this.addMemorySegment(buf); - } - compileArrayLiteral( elementType: Type, expressions: (Expression | null)[], @@ -6804,19 +6818,19 @@ export class Compiler extends DiagnosticEmitter { // otherwise allocate a new array header and make it wrap a copy of the static buffer } else { - let makeArrayInstance = this.resolver.resolveFunction(assert(program.makeArrayPrototype), [ elementType ]); - if (!makeArrayInstance) { - this.currentType = arrayType; - return module.createUnreachable(); - } - let body = this.makeCallInlinePrechecked(makeArrayInstance, [ - this.module.createI32(length), + // makeArray(length, classId, alignLog2, staticBuffer) + let expr = this.makeCallDirect(assert(program.makeArrayInstance), [ + module.createI32(length), + module.createI32(arrayInstance.id), + program.options.isWasm64 + ? module.createI64(elementType.alignLog2) + : module.createI32(elementType.alignLog2), program.options.isWasm64 - ? this.module.createI64(i64_low(bufferAddress), i64_high(bufferAddress)) - : this.module.createI32(i64_low(bufferAddress)) - ], 0, true); + ? module.createI64(i64_low(bufferAddress), i64_high(bufferAddress)) + : module.createI32(i64_low(bufferAddress)) + ], reportNode); this.currentType = arrayType; - return body; + return expr; } } @@ -6834,18 +6848,21 @@ export class Compiler extends DiagnosticEmitter { var flow = this.currentFlow; var tempThis = flow.getTempLocal(arrayType, false); var tempDataStart = flow.getTempLocal(arrayBufferInstance.type); - var makeArrayInstance = this.resolver.resolveFunction(assert(program.makeArrayPrototype), [ elementType ]); - if (!makeArrayInstance) { - this.currentType = arrayType; - return module.createUnreachable(); - } + var makeArrayInstance = assert(program.makeArrayInstance); var stmts = new Array(); - // tempThis = MAKEARRAY(length) + // tempThis = makeArray(length, classId, alignLog2, source = 0) stmts.push( module.createSetLocal(tempThis.index, - this.makeCallInlinePrechecked(makeArrayInstance, [ - module.createI32(length) - ], 0, true), + this.makeCallDirect(makeArrayInstance, [ + module.createI32(length), + module.createI32(arrayInstance.id), + program.options.isWasm64 + ? module.createI64(elementType.alignLog2) + : module.createI32(elementType.alignLog2), + program.options.isWasm64 + ? module.createI64(0) + : module.createI32(0) + ], reportNode), ) ); // tempData = tempThis.dataStart @@ -6868,7 +6885,7 @@ export class Compiler extends DiagnosticEmitter { : elementType.toNativeZero(module); if (isManaged) { // value = link/retain(value[, tempThis]) - valueExpr = makeInsertRef(this, + valueExpr = this.makeInsertRef( valueExpr, tempThis, elementType.is(TypeFlags.NULLABLE) @@ -6970,12 +6987,13 @@ export class Compiler extends DiagnosticEmitter { // allocate a new instance first and assign 'this' to the temp. local exprs[0] = module.createSetLocal( tempLocal.index, - this.makeAllocation(classReference) + this.makeAllocation(classReference, expression) ); // once all field values have been set, return 'this' exprs[exprs.length - 1] = module.createGetLocal(tempLocal.index, this.options.nativeSizeType); + this.currentType = classReference.type; return module.createBlock(null, exprs, this.options.nativeSizeType); } @@ -7090,7 +7108,7 @@ export class Compiler extends DiagnosticEmitter { module.createGetLocal(0, nativeSizeType) ), module.createSetLocal(0, - this.makeAllocation(classInstance) + this.makeAllocation(classInstance, reportNode) ) ) ); @@ -7978,6 +7996,17 @@ export class Compiler extends DiagnosticEmitter { return expr; } + /** Adds the debug location of the specified expression at the specified range to the source map. */ + addDebugLocation(expr: ExpressionRef, range: Range): void { + var parentFunction = this.currentFlow.parentFunction; + var source = range.source; + if (source.debugInfoIndex < 0) source.debugInfoIndex = this.module.addDebugInfoFile(source.normalizedPath); + range.debugInfoRef = expr; + parentFunction.debugLocations.push(range); + } + + // === Specialized code generation ============================================================== + /** Creates a comparison whether an expression is 'false' in a broader sense. */ makeIsFalseish(expr: ExpressionRef, type: Type): ExpressionRef { var module = this.module; @@ -8055,49 +8084,41 @@ export class Compiler extends DiagnosticEmitter { } /** Makes an allocation suitable to hold the data of an instance of the given class. */ - makeAllocation(classInstance: Class): ExpressionRef { + makeAllocation(classInstance: Class, reportNode: Node): ExpressionRef { var program = this.program; assert(classInstance.program == program); var module = this.module; var options = this.options; var classType = classInstance.type; - var body: ExpressionRef; if (classInstance.hasDecorator(DecoratorFlags.UNMANAGED)) { - // ALLOCATE_UNMANAGED(sizeof()) - let allocateInstance = assert(program.allocateUnmanagedInstance); - body = this.makeCallInlinePrechecked(allocateInstance, [ + // memory.allocate(sizeof()) + this.currentType = classType; + return this.makeCallDirect(assert(program.memoryAllocateInstance), [ options.isWasm64 ? module.createI64(classInstance.currentMemoryOffset) : module.createI32(classInstance.currentMemoryOffset) - ], 0, true); - - this.currentType = classType; - return body; + ], reportNode); } else { - // REGISTER(ALLOCATE(sizeof())) - let allocateInstance = assert(program.allocateInstance); - let registerPrototype = assert(program.registerPrototype); - let registerInstance = this.resolver.resolveFunction(registerPrototype, [ classType ]); - if (!registerInstance) { - this.currentType = classType; - return module.createUnreachable(); - } - body = this.makeCallInlinePrechecked(registerInstance, [ - this.makeCallInlinePrechecked(allocateInstance, [ + // register(allocate(sizeof()), classId) + this.currentType = classType; + return this.makeCallDirect(assert(program.registerInstance), [ + this.makeCallDirect(assert(program.allocateInstance), [ options.isWasm64 ? module.createI64(classInstance.currentMemoryOffset) : module.createI32(classInstance.currentMemoryOffset) - ], 0, true) - ], 0, true); + ], reportNode), + module.createI32(classInstance.id) + ], reportNode); } - this.currentType = classType; - return body; } /** Makes the initializers for a class's fields. */ - makeFieldInitialization(classInstance: Class, stmts: ExpressionRef[] = []): ExpressionRef[] { + makeFieldInitialization( + classInstance: Class, + stmts: ExpressionRef[] = [] + ): ExpressionRef[] { var members = classInstance.members; if (!members) return []; @@ -8155,13 +8176,154 @@ export class Compiler extends DiagnosticEmitter { return stmts; } - /** Adds the debug location of the specified expression at the specified range to the source map. */ - addDebugLocation(expr: ExpressionRef, range: Range): void { - var parentFunction = this.currentFlow.parentFunction; - var source = range.source; - if (source.debugInfoIndex < 0) source.debugInfoIndex = this.module.addDebugInfoFile(source.normalizedPath); - range.debugInfoRef = expr; - parentFunction.debugLocations.push(range); + /** Prepares the insertion of a reference into an _uninitialized_ parent using the GC interface. */ + makeInsertRef( + valueExpr: ExpressionRef, + tempParent: Local | null, + nullable: bool + ): ExpressionRef { + var module = this.module; + var program = this.program; + var usizeType = this.options.usizeType; + var nativeSizeType = this.options.nativeSizeType; + var flow = this.currentFlow; + var tempValue = flow.getTempLocal(usizeType, false); + var handle: ExpressionRef; + var fn: Function | null; + if (fn = program.linkRef) { // tracing + handle = module.createCall(fn.internalName, [ + module.createGetLocal(tempValue.index, nativeSizeType), + module.createGetLocal(assert(tempParent).index, nativeSizeType) + ], NativeType.None); + } else if (fn = program.retainRef) { // arc + handle = module.createCall(fn.internalName, [ + module.createGetLocal(tempValue.index, nativeSizeType) + ], NativeType.None); + } else { + assert(false); + return module.createUnreachable(); + } + flow.freeTempLocal(tempValue); + if (!this.compileFunction(fn)) return module.createUnreachable(); + // { + // [if (value !== null)] link/retain(value[, parent]) + // } -> value + return module.createBlock(null, [ + module.createSetLocal(tempValue.index, valueExpr), + nullable + ? module.createIf( + module.createGetLocal(tempValue.index, nativeSizeType), + handle + ) + : handle, + module.createGetLocal(tempValue.index, nativeSizeType) + ], nativeSizeType); + } + + /** Prepares the replaces a reference hold by an _initialized_ parent using the GC interface. */ + makeReplaceRef( + valueExpr: ExpressionRef, + oldValueExpr: ExpressionRef, + tempParent: Local | null, + nullable: bool + ): ExpressionRef { + var module = this.module; + var program = this.program; + var usizeType = this.options.usizeType; + var nativeSizeType = this.options.nativeSizeType; + var flow = this.currentFlow; + var tempValue = flow.getTempLocal(usizeType, false); + var tempOldValue = flow.getTempLocal(usizeType, false); + var handleOld: ExpressionRef; + var handleNew: ExpressionRef; + var fn1: Function | null, fn2: Function | null; + if (fn1 = program.linkRef) { // tracing + tempParent = assert(tempParent); + fn2 = assert(program.unlinkRef); + handleOld = module.createCall(fn2.internalName, [ + module.createGetLocal(tempOldValue.index, nativeSizeType), + module.createGetLocal(tempParent.index, nativeSizeType) + ], NativeType.None); + handleNew = module.createCall(fn1.internalName, [ + module.createGetLocal(tempValue.index, nativeSizeType), + module.createGetLocal(tempParent.index, nativeSizeType) + ], NativeType.None); + } else if (fn1 = program.retainRef) { // arc + fn2 = assert(program.releaseRef); + handleOld = module.createCall(fn2.internalName, [ + module.createGetLocal(tempOldValue.index, nativeSizeType) + ], NativeType.None); + handleNew = module.createCall(fn1.internalName, [ + module.createGetLocal(tempValue.index, nativeSizeType) + ], NativeType.None); + } else { + assert(false); + return module.createUnreachable(); + } + flow.freeTempLocal(tempValue); + flow.freeTempLocal(tempOldValue); + if (!this.compileFunction(fn1) || !this.compileFunction(fn2)) return module.createUnreachable(); + // if (value != oldValue) { + // if (oldValue !== null) unlink/release(oldValue[, parent]) + // [if (value !== null)] link/retain(value[, parent]) + // } -> value + return module.createIf( + module.createBinary(nativeSizeType == NativeType.I32 ? BinaryOp.NeI32 : BinaryOp.NeI64, + module.createTeeLocal(tempValue.index, valueExpr), + module.createTeeLocal(tempOldValue.index, oldValueExpr) + ), + module.createBlock(null, [ + module.createIf( + module.createGetLocal(tempOldValue.index, nativeSizeType), + handleOld + ), + nullable + ? module.createIf( + module.createGetLocal(tempValue.index, nativeSizeType), + handleNew + ) + : handleNew, + module.createGetLocal(tempValue.index, nativeSizeType) + ], nativeSizeType), + module.createGetLocal(tempValue.index, nativeSizeType) + ); + } + + makeInstanceOfClass( + expr: ExpressionRef, + classInstance: Class + ): ExpressionRef { + var module = this.module; + var flow = this.currentFlow; + var idTemp = flow.getTempLocal(Type.i32, false); + var idExpr = module.createLoad(4, false, + module.createBinary(BinaryOp.SubI32, + expr, + module.createI32(this.program.runtimeHeaderSize) + ), + NativeType.I32 + ); + var label = "instanceof_" + classInstance.name + "|" + flow.pushBreakLabel(); + var conditions: ExpressionRef[] = []; + conditions.push( + module.createDrop( // br_if returns the value too + module.createBreak(label, + module.createBinary(BinaryOp.EqI32, // classId == class.id + module.createTeeLocal(idTemp.index, idExpr), + module.createI32(classInstance.id) + ), + module.createI32(1) // ? true + ) + ) + ); + // TODO: insert conditions for all possible subclasses (i.e. cat is also animal) + // TODO: simplify if there are none + conditions.push( + module.createI32(0) // : false + ); + flow.freeTempLocal(idTemp); + flow.popBreakLabel(); + return module.createBlock(label, conditions, NativeType.I32); } } @@ -8222,15 +8384,3 @@ function mangleImportName( var mangleImportName_moduleName: string; var mangleImportName_elementName: string; - -/** Special compiler symbols. */ -namespace CompilerSymbols { - /** Module started global. Used if an explicit start function is present. */ - export const started = "~lib/started"; - /** Argument count global. Used to call trampolines for varargs functions. */ - export const argc = "~lib/argc"; - /** Argument count setter. Exported for use by host calls. */ - export const setargc = "~lib/setargc"; - /** Module capabilities. Exported for evaluation by the host. */ - export const capabilities = "~lib/capabilities"; -} diff --git a/src/program.ts b/src/program.ts index db976f6f8b..9cff3fc7af 100644 --- a/src/program.ts +++ b/src/program.ts @@ -13,8 +13,7 @@ import { INNER_DELIMITER, LIBRARY_SUBST, INDEX_SUFFIX, - CommonSymbols, - LibrarySymbols + CommonSymbols } from "./common"; import { @@ -355,18 +354,18 @@ export class Program extends DiagnosticEmitter { /** Abort function reference, if present. */ abortInstance: Function | null = null; - /** Runtime allocation macro. `ALLOCATE(payloadSize: usize): usize` */ + /** Runtime allocation function. `allocate(payloadSize: usize): usize` */ allocateInstance: Function | null = null; - /** Unmanaged allocation macro. `ALLOCATE_UNMANAGED(size: usize): usize` */ - allocateUnmanagedInstance: Function | null = null; - /** Runtime reallocation macro. `REALLOCATE(ref: usize, newPayloadSize: usize): usize` */ + /** Memory allocation function. `memory.allocate(size)` */ + memoryAllocateInstance: Function | null = null; + /** Runtime reallocation function. `reallocate(ref: usize, newPayloadSize: usize): usize` */ reallocateInstance: Function | null = null; - /** Runtime discard macro. `DISCARD(ref: usize): void` */ + /** Runtime discard function. `discard(ref: usize): void` */ discardInstance: Function | null = null; - /** Runtime register macro. `REGISTER(ref: usize): T` */ - registerPrototype: FunctionPrototype | null = null; - /** Runtime make array macro. `MAKEARRAY(capacity: i32, source: usize = 0): Array` */ - makeArrayPrototype: FunctionPrototype | null = null; + /** Runtime register function. `register(ref: usize, cid: u32): usize` */ + registerInstance: Function | null = null; + /** Runtime make array function. `makeArray(capacity: i32, source: usize = 0, cid: u32): usize` */ + makeArrayInstance: Function | null = null; linkRef: Function | null = null; unlinkRef: Function | null = null; @@ -542,25 +541,25 @@ export class Program extends DiagnosticEmitter { if (options.hasFeature(Feature.SIMD)) this.registerNativeType(CommonSymbols.v128, Type.v128); // register compiler hints - this.registerConstantInteger(LibrarySymbols.ASC_TARGET, Type.i32, + this.registerConstantInteger(CommonSymbols.ASC_TARGET, Type.i32, i64_new(options.isWasm64 ? 2 : 1)); - this.registerConstantInteger(LibrarySymbols.ASC_NO_ASSERT, Type.bool, + this.registerConstantInteger(CommonSymbols.ASC_NO_ASSERT, Type.bool, i64_new(options.noAssert ? 1 : 0, 0)); - this.registerConstantInteger(LibrarySymbols.ASC_MEMORY_BASE, Type.i32, + this.registerConstantInteger(CommonSymbols.ASC_MEMORY_BASE, Type.i32, i64_new(options.memoryBase, 0)); - this.registerConstantInteger(LibrarySymbols.ASC_OPTIMIZE_LEVEL, Type.i32, + this.registerConstantInteger(CommonSymbols.ASC_OPTIMIZE_LEVEL, Type.i32, i64_new(options.optimizeLevelHint, 0)); - this.registerConstantInteger(LibrarySymbols.ASC_SHRINK_LEVEL, Type.i32, + this.registerConstantInteger(CommonSymbols.ASC_SHRINK_LEVEL, Type.i32, i64_new(options.shrinkLevelHint, 0)); - this.registerConstantInteger(LibrarySymbols.ASC_FEATURE_MUTABLE_GLOBAL, Type.bool, + this.registerConstantInteger(CommonSymbols.ASC_FEATURE_MUTABLE_GLOBAL, Type.bool, i64_new(options.hasFeature(Feature.MUTABLE_GLOBAL) ? 1 : 0, 0)); - this.registerConstantInteger(LibrarySymbols.ASC_FEATURE_SIGN_EXTENSION, Type.bool, + this.registerConstantInteger(CommonSymbols.ASC_FEATURE_SIGN_EXTENSION, Type.bool, i64_new(options.hasFeature(Feature.SIGN_EXTENSION) ? 1 : 0, 0)); - this.registerConstantInteger(LibrarySymbols.ASC_FEATURE_BULK_MEMORY, Type.bool, + this.registerConstantInteger(CommonSymbols.ASC_FEATURE_BULK_MEMORY, Type.bool, i64_new(options.hasFeature(Feature.BULK_MEMORY) ? 1 : 0, 0)); - this.registerConstantInteger(LibrarySymbols.ASC_FEATURE_SIMD, Type.bool, + this.registerConstantInteger(CommonSymbols.ASC_FEATURE_SIMD, Type.bool, i64_new(options.hasFeature(Feature.SIMD) ? 1 : 0, 0)); - this.registerConstantInteger(LibrarySymbols.ASC_FEATURE_THREADS, Type.bool, + this.registerConstantInteger(CommonSymbols.ASC_FEATURE_THREADS, Type.bool, i64_new(options.hasFeature(Feature.THREADS) ? 1 : 0, 0)); // remember deferred elements @@ -720,20 +719,20 @@ export class Program extends DiagnosticEmitter { } // register classes backing basic types - this.registerNativeTypeClass(TypeKind.I8, LibrarySymbols.I8); - this.registerNativeTypeClass(TypeKind.I16, LibrarySymbols.I16); - this.registerNativeTypeClass(TypeKind.I32, LibrarySymbols.I32); - this.registerNativeTypeClass(TypeKind.I64, LibrarySymbols.I64); - this.registerNativeTypeClass(TypeKind.ISIZE, LibrarySymbols.Isize); - this.registerNativeTypeClass(TypeKind.U8, LibrarySymbols.U8); - this.registerNativeTypeClass(TypeKind.U16, LibrarySymbols.U16); - this.registerNativeTypeClass(TypeKind.U32, LibrarySymbols.U32); - this.registerNativeTypeClass(TypeKind.U64, LibrarySymbols.U64); - this.registerNativeTypeClass(TypeKind.USIZE, LibrarySymbols.Usize); - this.registerNativeTypeClass(TypeKind.BOOL, LibrarySymbols.Bool); - this.registerNativeTypeClass(TypeKind.F32, LibrarySymbols.F32); - this.registerNativeTypeClass(TypeKind.F64, LibrarySymbols.F64); - if (options.hasFeature(Feature.SIMD)) this.registerNativeTypeClass(TypeKind.V128, LibrarySymbols.V128); + this.registerNativeTypeClass(TypeKind.I8, CommonSymbols.I8); + this.registerNativeTypeClass(TypeKind.I16, CommonSymbols.I16); + this.registerNativeTypeClass(TypeKind.I32, CommonSymbols.I32); + this.registerNativeTypeClass(TypeKind.I64, CommonSymbols.I64); + this.registerNativeTypeClass(TypeKind.ISIZE, CommonSymbols.Isize); + this.registerNativeTypeClass(TypeKind.U8, CommonSymbols.U8); + this.registerNativeTypeClass(TypeKind.U16, CommonSymbols.U16); + this.registerNativeTypeClass(TypeKind.U32, CommonSymbols.U32); + this.registerNativeTypeClass(TypeKind.U64, CommonSymbols.U64); + this.registerNativeTypeClass(TypeKind.USIZE, CommonSymbols.Usize); + this.registerNativeTypeClass(TypeKind.BOOL, CommonSymbols.Bool); + this.registerNativeTypeClass(TypeKind.F32, CommonSymbols.F32); + this.registerNativeTypeClass(TypeKind.F64, CommonSymbols.F64); + if (options.hasFeature(Feature.SIMD)) this.registerNativeTypeClass(TypeKind.V128, CommonSymbols.V128); // resolve base prototypes of derived classes var resolver = this.resolver; @@ -785,56 +784,56 @@ export class Program extends DiagnosticEmitter { } } - // register global library elements + // register library elements { let element: Element | null; - if (element = this.lookupGlobal(LibrarySymbols.ArrayBufferView)) { + if (element = this.lookupGlobal(CommonSymbols.ArrayBufferView)) { assert(element.kind == ElementKind.CLASS_PROTOTYPE); this.arrayBufferViewInstance = resolver.resolveClass(element, null); } - if (element = this.lookupGlobal(LibrarySymbols.ArrayBuffer)) { + if (element = this.lookupGlobal(CommonSymbols.ArrayBuffer)) { assert(element.kind == ElementKind.CLASS_PROTOTYPE); this.arrayBufferInstance = resolver.resolveClass(element, null); } - if (element = this.lookupGlobal(LibrarySymbols.String)) { + if (element = this.lookupGlobal(CommonSymbols.String)) { assert(element.kind == ElementKind.CLASS_PROTOTYPE); this.stringInstance = resolver.resolveClass(element, null); } - if (element = this.lookupGlobal(LibrarySymbols.Array)) { + if (element = this.lookupGlobal(CommonSymbols.Array)) { assert(element.kind == ElementKind.CLASS_PROTOTYPE); this.arrayPrototype = element; } - if (element = this.lookupGlobal(LibrarySymbols.FixedArray)) { + if (element = this.lookupGlobal(CommonSymbols.FixedArray)) { assert(element.kind == ElementKind.CLASS_PROTOTYPE); this.fixedArrayPrototype = element; } - if (element = this.lookupGlobal(LibrarySymbols.abort)) { + if (element = this.lookupGlobal(CommonSymbols.abort)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.abortInstance = this.resolver.resolveFunction(element, null); } - if (element = this.lookupGlobal(LibrarySymbols.ALLOCATE)) { + if (element = this.lookupGlobal(BuiltinSymbols.allocate)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.allocateInstance = this.resolver.resolveFunction(element, null); } - if (element = this.lookupGlobal(LibrarySymbols.ALLOCATE_UNMANAGED)) { + if (element = this.lookupGlobal(BuiltinSymbols.memory_allocate)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); - this.allocateUnmanagedInstance = this.resolver.resolveFunction(element, null); + this.memoryAllocateInstance = this.resolver.resolveFunction(element, null); } - if (element = this.lookupGlobal(LibrarySymbols.REALLOCATE)) { + if (element = this.lookupGlobal(BuiltinSymbols.reallocate)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.reallocateInstance = this.resolver.resolveFunction(element, null); } - if (element = this.lookupGlobal(LibrarySymbols.DISCARD)) { + if (element = this.lookupGlobal(BuiltinSymbols.discard)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.discardInstance = this.resolver.resolveFunction(element, null); } - if (element = this.lookupGlobal(LibrarySymbols.REGISTER)) { + if (element = this.lookupGlobal(BuiltinSymbols.register)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); - this.registerPrototype = element; + this.registerInstance = this.resolver.resolveFunction(element, null); } - if (element = this.lookupGlobal(LibrarySymbols.MAKEARRAY)) { + if (element = this.lookupGlobal(BuiltinSymbols.makeArray)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); - this.makeArrayPrototype = element; + this.makeArrayInstance = this.resolver.resolveFunction(element, null); } if (this.lookupGlobal("__ref_collect")) { if (element = this.lookupGlobal("__ref_link")) { @@ -970,6 +969,13 @@ export class Program extends DiagnosticEmitter { return null; } + /** Looks up the element of the specified name in the global scope. Errors if not present. */ + requireGlobal(name: string): Element { + var elements = this.elementsByName; + if (elements.has(name)) return elements.get(name)!; + throw new Error("missing global"); + } + /** Tries to locate a foreign file given its normalized path. */ private lookupForeignFile( /** Normalized path to the other file. */ diff --git a/std/assembly/collector/README.md b/std/assembly/collector/README.md index 7f66d8022f..c1d7ae40d2 100644 --- a/std/assembly/collector/README.md +++ b/std/assembly/collector/README.md @@ -7,7 +7,7 @@ Common ------ * **__ref_collect**()
- Triggers a full garbage collection cycle. + Triggers a full garbage collection cycle. Also indicates the presence of a GC. Tracing ------- @@ -24,14 +24,15 @@ Tracing Reference counting ------------------ +* **__ref_register**(ref: `usize`)
+ Sets up a new reference. Implementation is optional for reference counting GCs. + * **__ref_retain**(ref: `usize`)
Retains a reference, usually incrementing RC. * **__ref_release**(ref: `usize`)
Releases a reference, usually decrementing RC. -Reference counting may also implement `__ref_register` if necessary. - Typical patterns ---------------- diff --git a/std/assembly/collector/dummy.ts b/std/assembly/collector/dummy.ts index 86b5dd229e..98690829ff 100644 --- a/std/assembly/collector/dummy.ts +++ b/std/assembly/collector/dummy.ts @@ -1,8 +1,8 @@ -// A dummy GC for looking at generated GC code without actually implementing it. +// A tracing dummy GC. // @ts-ignore: decorator @inline -const TRACE = false; +const TRACE = isDefined(GC_TRACE); // @ts-ignore: decorator @global @unsafe @@ -29,17 +29,3 @@ function __ref_link(ref: usize, parentRef: usize): void { function __ref_unlink(ref: usize, parentRef: usize): void { if (TRACE) trace("dummy.unlink", 2, ref, parentRef); } - -// Reference counting - -// // @ts-ignore: decorator -// @global @unsafe -// function __ref_retain(ref: usize): void { -// if (TRACE) trace("dummy.retain", 1, ref); -// } - -// // @ts-ignore: decorator -// @global @unsafe -// function __ref_release(ref: usize): void { -// if (TRACE) trace("dummy.release", 1, ref); -// } diff --git a/std/assembly/collector/dummyrc.ts b/std/assembly/collector/dummyrc.ts new file mode 100644 index 0000000000..676e8deb94 --- /dev/null +++ b/std/assembly/collector/dummyrc.ts @@ -0,0 +1,29 @@ +// A reference counting dummy GC. + +// @ts-ignore: decorator +@inline +const TRACE = isDefined(GC_TRACE); + +// @ts-ignore: decorator +@global @unsafe +function __ref_register(ref: usize): void { + if (TRACE) trace("dummyrc.register", 1, ref); +} + +// @ts-ignore: decorator +@global @unsafe +function __ref_collect(): void { + if (TRACE) trace("dummyrc.collect"); +} + +// @ts-ignore: decorator +@global @unsafe +function __ref_retain(ref: usize): void { + if (TRACE) trace("dummyrc.retain", 1, ref); +} + +// @ts-ignore: decorator +@global @unsafe +function __ref_release(ref: usize): void { + if (TRACE) trace("dummyrc.release", 1, ref); +} diff --git a/std/assembly/collector/itcm.ts b/std/assembly/collector/itcm.ts index c38696b15f..cd16fcf2c9 100644 --- a/std/assembly/collector/itcm.ts +++ b/std/assembly/collector/itcm.ts @@ -4,7 +4,7 @@ @inline const TRACE = false; -import { ITERATEROOTS, HEADER_SIZE } from "../runtime"; +import { iterateRoots, HEADER_SIZE } from "../runtime"; /** Collector states. */ const enum State { @@ -141,7 +141,7 @@ function step(): void { } case State.IDLE: { if (TRACE) trace("gc~step/IDLE"); - ITERATEROOTS((ref: usize): void => { + iterateRoots((ref: usize): void => { var obj = refToObj(ref); if (obj.color == white) obj.makeGray(); }); @@ -165,7 +165,7 @@ function step(): void { obj.hookFn(objToRef(obj)); } else { if (TRACE) trace("gc~step/MARK finish"); - ITERATEROOTS((ref: usize): void => { + iterateRoots((ref: usize): void => { var obj = refToObj(ref); if (obj.color == white) obj.makeGray(); }); diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 3eb29c5aa7..2d253ccef1 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -39,12 +39,12 @@ export const HEADER_MAGIC: u32 = 0xA55E4B17; /** Gets the computed unique class id of a class type. */ // @ts-ignore: decorator @unsafe @builtin -export declare function CLASSID(): u32; +export declare function classId(): u32; /** Iterates over all root objects of a reference type. */ // @ts-ignore: decorator @unsafe @builtin -export declare function ITERATEROOTS(fn: (ref: usize) => void): void; +export declare function iterateRoots(fn: (ref: usize) => void): void; /** Adjusts an allocation to actual block size. Primarily targets TLSF. */ export function ADJUSTOBLOCK(payloadSize: usize): usize { @@ -78,16 +78,6 @@ function allocate(payloadSize: usize): usize { return changetype(header) + HEADER_SIZE; } -/** - * Allocates an unmanaged struct-like object. This is used by the compiler as an abstraction - * to memory.allocate just in case, and is usually not used directly. - */ -// @ts-ignore: decorator -@unsafe @inline -export function ALLOCATE_UNMANAGED(size: usize): usize { - return memory.allocate(size); -} - /** * Changes the size of a previously allocated, but not yet registered, runtime object, for * example when a pre-allocated buffer turned out to be too small or too large. This works by @@ -153,7 +143,7 @@ function reallocate(ref: usize, newPayloadSize: usize): usize { @unsafe @inline export function REGISTER(ref: usize): T { if (!isReference()) ERROR("reference expected"); - return changetype(register(ref, CLASSID())); + return changetype(register(ref, classId())); } function register(ref: usize, classId: u32): usize { @@ -199,13 +189,13 @@ function discard(ref: usize): void { // @ts-ignore: decorator @unsafe @inline export function MAKEARRAY(capacity: i32, source: usize = 0): Array { - return changetype>(makeArray(capacity, source, CLASSID(), alignof())); + return changetype>(makeArray(capacity, classId(), alignof(), source)); } -function makeArray(capacity: i32, source: usize, classId: u32, alignLog2: usize): usize { - var array = register(allocate(offsetof()), classId); +function makeArray(capacity: i32, cid: u32, alignLog2: usize, source: usize): usize { + var array = register(allocate(offsetof()), cid); var bufferSize = capacity << alignLog2; - var buffer = register(allocate(capacity << alignLog2), CLASSID()); + var buffer = register(allocate(capacity << alignLog2), classId()); changetype(array).data = changetype(buffer); // links changetype(array).dataStart = buffer; changetype(array).dataLength = bufferSize; diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 5cb4052656..00944eb637 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -106,7 +106,7 @@ if i32.const 0 i32.const 16 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -121,7 +121,7 @@ if i32.const 0 i32.const 16 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index 2f4427b6f4..f24e6291b8 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -140,7 +140,7 @@ if i32.const 0 i32.const 16 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -157,7 +157,7 @@ if i32.const 0 i32.const 16 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -168,23 +168,14 @@ local.get $0 ) (func $call-super/A#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER
|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - i32.const 4 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 1 - call $~lib/runtime/register - end + i32.const 4 + call $~lib/runtime/allocate + i32.const 1 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -207,19 +198,12 @@ local.get $0 ) (func $call-super/B#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 if (result i32) local.get $0 else - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - i32.const 8 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 + i32.const 8 + call $~lib/runtime/allocate i32.const 3 call $~lib/runtime/register end @@ -289,22 +273,13 @@ end ) (func $call-super/C#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) - i32.const 4 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 4 - call $~lib/runtime/register - end + i32.const 4 + call $~lib/runtime/allocate + i32.const 4 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -313,19 +288,12 @@ local.get $0 ) (func $call-super/D#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 if (result i32) local.get $0 else - block $~lib/runtime/ALLOCATE|inlined.3 (result i32) - i32.const 8 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 + i32.const 8 + call $~lib/runtime/allocate i32.const 5 call $~lib/runtime/register end @@ -395,23 +363,14 @@ end ) (func $call-super/E#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.4 (result i32) - i32.const 4 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 6 - call $~lib/runtime/register - end + i32.const 4 + call $~lib/runtime/allocate + i32.const 6 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -434,22 +393,13 @@ local.get $0 ) (func $call-super/F#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.5 (result i32) - i32.const 8 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 7 - call $~lib/runtime/register - end + i32.const 8 + call $~lib/runtime/allocate + i32.const 7 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -493,22 +443,13 @@ end ) (func $call-super/G#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.6 (result i32) - i32.const 4 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 8 - call $~lib/runtime/register - end + i32.const 4 + call $~lib/runtime/allocate + i32.const 8 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -517,22 +458,13 @@ local.get $0 ) (func $call-super/H#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.7 (result i32) - i32.const 8 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 9 - call $~lib/runtime/register - end + i32.const 8 + call $~lib/runtime/allocate + i32.const 9 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -576,22 +508,13 @@ end ) (func $call-super/I#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.8 (result i32) - i32.const 4 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 10 - call $~lib/runtime/register - end + i32.const 4 + call $~lib/runtime/allocate + i32.const 10 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -600,22 +523,13 @@ local.get $0 ) (func $call-super/J#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.9 (result i32) - i32.const 8 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 11 - call $~lib/runtime/register - end + i32.const 8 + call $~lib/runtime/allocate + i32.const 11 + call $~lib/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index ff0bacf768..334f69fe8d 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -116,7 +116,7 @@ if i32.const 0 i32.const 16 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -131,7 +131,7 @@ if i32.const 0 i32.const 16 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index 474bf55900..b2da31411f 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -150,7 +150,7 @@ if i32.const 0 i32.const 16 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -167,7 +167,7 @@ if i32.const 0 i32.const 16 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -178,43 +178,25 @@ local.get $0 ) (func $constructor/EmptyCtor#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - i32.const 0 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 1 - call $~lib/runtime/register - end + i32.const 0 + call $~lib/runtime/allocate + i32.const 1 + call $~lib/runtime/register local.set $0 end local.get $0 ) (func $constructor/EmptyCtorWithFieldInit#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - i32.const 4 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 3 - call $~lib/runtime/register - end + i32.const 4 + call $~lib/runtime/allocate + i32.const 3 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -223,22 +205,13 @@ local.get $0 ) (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) - i32.const 4 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 4 - call $~lib/runtime/register - end + i32.const 4 + call $~lib/runtime/allocate + i32.const 4 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -247,43 +220,25 @@ local.get $0 ) (func $constructor/None#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.3 (result i32) - i32.const 0 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 5 - call $~lib/runtime/register - end + i32.const 0 + call $~lib/runtime/allocate + i32.const 5 + call $~lib/runtime/register local.set $0 end local.get $0 ) (func $constructor/JustFieldInit#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.4 (result i32) - i32.const 4 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 6 - call $~lib/runtime/register - end + i32.const 4 + call $~lib/runtime/allocate + i32.const 6 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -292,22 +247,13 @@ local.get $0 ) (func $constructor/JustFieldNoInit#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.5 (result i32) - i32.const 4 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 7 - call $~lib/runtime/register - end + i32.const 4 + call $~lib/runtime/allocate + i32.const 7 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -320,7 +266,6 @@ call $~lib/memory/memory.allocate ) (func $constructor/CtorConditionallyReturns#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) global.get $constructor/b if i32.const 0 @@ -330,40 +275,23 @@ local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.6 (result i32) - i32.const 0 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 8 - call $~lib/runtime/register - end + i32.const 0 + call $~lib/runtime/allocate + i32.const 8 + call $~lib/runtime/register local.set $0 end local.get $0 ) (func $constructor/CtorAllocates#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.7 (result i32) - i32.const 0 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 9 - call $~lib/runtime/register - end + i32.const 0 + call $~lib/runtime/allocate + i32.const 9 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -372,25 +300,16 @@ local.get $0 ) (func $constructor/CtorConditionallyAllocates#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) global.get $constructor/b if block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.8 (result i32) - i32.const 0 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 10 - call $~lib/runtime/register - end + i32.const 0 + call $~lib/runtime/allocate + i32.const 10 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -400,18 +319,10 @@ local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.9 (result i32) - i32.const 0 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 10 - call $~lib/runtime/register - end + i32.const 0 + call $~lib/runtime/allocate + i32.const 10 + call $~lib/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index 59a6bda002..62811a3404 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -41,7 +41,7 @@ (export "Car.getNumTires" (func $exports/Car.getNumTires)) (export "vehicles.Car#get:doors" (func $exports/Car#get:numDoors)) (export "vehicles.Car#set:doors" (func $exports/Car#set:numDoors)) - (export "vehicles.Car#constructor" (func $exports/Car#constructor|trampoline)) + (export "vehicles.Car#constructor" (func $exports/vehicles.Car#constructor|trampoline)) (export "vehicles.Car#get:numDoors" (func $exports/Car#get:numDoors)) (export "vehicles.Car#set:numDoors" (func $exports/Car#set:numDoors)) (export "vehicles.Car#openDoors" (func $exports/Car#openDoors)) @@ -124,15 +124,29 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 16 + call $~lib/memory/memory.allocate + local.tee $0 + i32.const -1520547049 + i32.store + local.get $0 + i32.const 4 + i32.store offset=4 + local.get $0 + i32.const 8 + i32.add + ) + (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 i32.const 48 i32.le_u if i32.const 0 i32.const 16 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -140,45 +154,45 @@ local.get $0 i32.const 8 i32.sub - local.tee $1 + local.tee $2 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 16 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable end + local.get $2 local.get $1 - i32.const 1 i32.store local.get $0 ) - (func $exports/Car#get:numDoors (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $exports/Car#get:numDoors (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/Car#set:numDoors (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $exports/Car#set:numDoors (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#openDoors (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $exports/Car#openDoors (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $start (; 9 ;) (type $FUNCSIG$v) + (func $start (; 10 ;) (type $FUNCSIG$v) i32.const 48 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 10 ;) (type $FUNCSIG$v) + (func $null (; 11 ;) (type $FUNCSIG$v) nop ) - (func $exports/subOpt|trampoline (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt|trampoline (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -196,11 +210,11 @@ local.get $1 i32.sub ) - (func $~lib/setargc (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) - (func $exports/Car#constructor|trampoline (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor|trampoline (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -215,17 +229,36 @@ local.get $0 i32.eqz if - i32.const 16 - call $~lib/memory/memory.allocate - local.tee $0 - i32.const -1520547049 - i32.store - local.get $0 - i32.const 4 - i32.store offset=4 - local.get $0 - i32.const 8 - i32.add + call $~lib/runtime/allocate + i32.const 1 + call $~lib/runtime/register + local.set $0 + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store + local.get $0 + ) + (func $exports/vehicles.Car#constructor|trampoline (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 2 + local.set $1 + end + local.get $0 + i32.eqz + if + call $~lib/runtime/allocate + i32.const 3 call $~lib/runtime/register local.set $0 end diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 7582116c81..189a9c0b2e 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -193,7 +193,7 @@ if i32.const 0 i32.const 16 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -210,7 +210,7 @@ if i32.const 0 i32.const 16 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -221,23 +221,14 @@ local.get $0 ) (func $exports/Car#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - i32.const 4 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 - i32.const 1 - call $~lib/runtime/register - end + i32.const 4 + call $~lib/runtime/allocate + i32.const 1 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -265,23 +256,14 @@ global.get $exports/vehicles.Car.TIRES ) (func $exports/vehicles.Car#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - i32.const 4 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 - i32.const 1 - call $~lib/runtime/register - end + i32.const 4 + call $~lib/runtime/allocate + i32.const 3 + call $~lib/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/gc/README.md b/tests/compiler/gc/README.md new file mode 100644 index 0000000000..5fa7126fbe --- /dev/null +++ b/tests/compiler/gc/README.md @@ -0,0 +1 @@ +Tracing GC tests diff --git a/tests/compiler/gc/_dummy.ts b/tests/compiler/gc/_dummy.ts new file mode 100644 index 0000000000..6dde53b948 --- /dev/null +++ b/tests/compiler/gc/_dummy.ts @@ -0,0 +1,47 @@ +// A dummy tracing GC for testing. + +export var collect_count = 0; + +// @ts-ignore: decorator +@global @unsafe +function __ref_collect(): void { + trace("gc.collect"); + collect_count++; +} + +export var register_count = 0; +export var register_ref: usize = 0; + +// @ts-ignore: decorator +@global @unsafe +function __ref_register(ref: usize): void { + trace("gc.register", 1, ref); + register_count++; + register_ref = ref; +} + +export var link_count = 0; +export var link_ref: usize = 0; +export var link_parentRef: usize = 0; + +// @ts-ignore: decorator +@global @unsafe +function __ref_link(ref: usize, parentRef: usize): void { + trace("gc.link", 2, ref, parentRef); + link_count++; + link_ref = ref; + link_parentRef = ref; +} + +export var unlink_count = 0; +export var unlink_ref: usize = 0; +export var unlink_parentRef: usize = 0; + +// @ts-ignore: decorator +@global @unsafe +function __ref_unlink(ref: usize, parentRef: usize): void { + trace("gc.unlink", 2, ref, parentRef); + unlink_count++; + unlink_ref = ref; + unlink_parentRef = parentRef; +} diff --git a/tests/compiler/gc/global-assign.optimized.wat b/tests/compiler/gc/global-assign.optimized.wat new file mode 100644 index 0000000000..d8e4d6a436 --- /dev/null +++ b/tests/compiler/gc/global-assign.optimized.wat @@ -0,0 +1,251 @@ +(module + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$i (func (result i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\02\00\00\00\1e") + (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 56) "\02\00\00\00\16") + (data (i32.const 72) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 96) "\02\00\00\00&") + (data (i32.const 112) "g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $gc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_count (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_count (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 $gc/global-assign/global (mut i32) (i32.const 0)) + (global $gc/global-assign/globalRef (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/capabilities i32 (i32.const 2)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (export "main" (func $gc/global-assign/main)) + (export ".capabilities" (global $~lib/capabilities)) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.tee $1 + local.get $0 + i32.const 1 + local.get $0 + i32.const 1 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + current_memory + local.tee $2 + i32.const 16 + i32.shl + i32.gt_u + if + local.get $2 + local.get $0 + local.get $1 + i32.sub + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $2 + local.get $3 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $0 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 16 + call $~lib/memory/memory.allocate + local.tee $0 + i32.const -1520547049 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 16 + i32.add + ) + (func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 72 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/_dummy/register_count + local.get $0 + global.set $gc/_dummy/register_ref + ) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 152 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 151 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 1 + i32.store + local.get $0 + call $gc/_dummy/__ref_register + local.get $0 + ) + (func $start:gc/global-assign (; 6 ;) (type $FUNCSIG$v) + i32.const 152 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + call $~lib/runtime/allocate + call $~lib/runtime/register + global.set $gc/global-assign/global + global.get $gc/global-assign/global + global.set $gc/global-assign/globalRef + global.get $gc/_dummy/register_count + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 112 + i32.const 12 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/link_count + if + i32.const 0 + i32.const 112 + i32.const 13 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/unlink_count + if + i32.const 0 + i32.const 112 + i32.const 14 + i32.const 0 + call $~lib/env/abort + unreachable + end + call $~lib/runtime/allocate + call $~lib/runtime/register + global.set $gc/global-assign/global + global.get $gc/_dummy/register_count + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 112 + i32.const 19 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/link_count + if + i32.const 0 + i32.const 112 + i32.const 20 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/unlink_count + if + i32.const 0 + i32.const 112 + i32.const 21 + i32.const 0 + call $~lib/env/abort + unreachable + end + ) + (func $gc/global-assign/main (; 7 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start:gc/global-assign + i32.const 1 + global.set $~lib/started + end + ) + (func $null (; 8 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/gc/global-assign.ts b/tests/compiler/gc/global-assign.ts new file mode 100644 index 0000000000..3240387d1c --- /dev/null +++ b/tests/compiler/gc/global-assign.ts @@ -0,0 +1,21 @@ +import "allocator/arena"; +import { register_count, link_count, unlink_count } from "./_dummy"; + +@start export function main(): void {} + +class Ref {} + +// should register only + +var global: Ref = new Ref(); +var globalRef = changetype(global); +assert(register_count == 1); +assert(link_count == 0); +assert(unlink_count == 0); + +// should register only + +global = new Ref(); +assert(register_count == 2); +assert(link_count == 0); +assert(unlink_count == 0); diff --git a/tests/compiler/gc/global-assign.untouched.wat b/tests/compiler/gc/global-assign.untouched.wat new file mode 100644 index 0000000000..2587e1c8e4 --- /dev/null +++ b/tests/compiler/gc/global-assign.untouched.wat @@ -0,0 +1,331 @@ +(module + (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$vi (func (param i32))) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 96) "\02\00\00\00&\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_count (mut i32) (i32.const 0)) + (global $gc/_dummy/link_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_parentRef (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_count (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_parentRef (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $gc/global-assign/global (mut i32) (i32.const 0)) + (global $gc/global-assign/globalRef (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 152)) + (global $~lib/capabilities i32 (i32.const 2)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (export "main" (func $gc/global-assign/main)) + (export ".capabilities" (global $~lib/capabilities)) + (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $2 + local.get $2 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 + local.get $3 + local.get $4 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $3 + current_memory + local.set $4 + local.get $3 + local.get $4 + i32.const 16 + i32.shl + i32.gt_u + if + local.get $3 + local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 + end + return + ) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/ADJUSTOBLOCK + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + ) + (func $gc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 72 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/_dummy/register_count + local.get $0 + global.set $gc/_dummy/register_ref + ) + (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 151 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $gc/_dummy/__ref_register + local.get $0 + ) + (func $gc/global-assign/Ref#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/runtime/allocate + i32.const 1 + call $~lib/runtime/register + local.set $0 + end + local.get $0 + ) + (func $start:gc/global-assign (; 8 ;) (type $FUNCSIG$v) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + i32.const 0 + call $gc/global-assign/Ref#constructor + global.set $gc/global-assign/global + global.get $gc/global-assign/global + global.set $gc/global-assign/globalRef + global.get $gc/_dummy/register_count + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 12 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/link_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 13 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/unlink_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 14 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 0 + call $gc/global-assign/Ref#constructor + global.set $gc/global-assign/global + global.get $gc/_dummy/register_count + i32.const 2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 19 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/link_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 20 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/unlink_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 21 + i32.const 0 + call $~lib/env/abort + unreachable + end + ) + (func $gc/global-assign/main (; 9 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started + end + ) + (func $start (; 10 ;) (type $FUNCSIG$v) + call $start:gc/global-assign + ) + (func $null (; 11 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/gc/global-init.optimized.wat b/tests/compiler/gc/global-init.optimized.wat new file mode 100644 index 0000000000..e986aa1efc --- /dev/null +++ b/tests/compiler/gc/global-init.optimized.wat @@ -0,0 +1,248 @@ +(module + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$i (func (result i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\02\00\00\00\1e") + (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 56) "\02\00\00\00\16") + (data (i32.const 72) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 96) "\02\00\00\00\"") + (data (i32.const 112) "g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $gc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_count (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_count (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 $gc/global-init/global (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/capabilities i32 (i32.const 2)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (export "main" (func $gc/global-init/main)) + (export ".capabilities" (global $~lib/capabilities)) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.tee $1 + local.get $0 + i32.const 1 + local.get $0 + i32.const 1 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + current_memory + local.tee $2 + i32.const 16 + i32.shl + i32.gt_u + if + local.get $2 + local.get $0 + local.get $1 + i32.sub + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $2 + local.get $3 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $0 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 16 + call $~lib/memory/memory.allocate + local.tee $0 + i32.const -1520547049 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 16 + i32.add + ) + (func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 72 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/_dummy/register_count + local.get $0 + global.set $gc/_dummy/register_ref + ) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 148 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 151 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 1 + i32.store + local.get $0 + call $gc/_dummy/__ref_register + local.get $0 + ) + (func $start:gc/global-init (; 6 ;) (type $FUNCSIG$v) + i32.const 152 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + call $~lib/runtime/allocate + call $~lib/runtime/register + global.set $gc/global-init/global + global.get $gc/_dummy/register_count + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 112 + i32.const 11 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/link_count + if + i32.const 0 + i32.const 112 + i32.const 12 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/unlink_count + if + i32.const 0 + i32.const 112 + i32.const 13 + i32.const 0 + call $~lib/env/abort + unreachable + end + call $~lib/runtime/allocate + call $~lib/runtime/register + global.set $gc/global-init/global + global.get $gc/_dummy/register_count + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 112 + i32.const 16 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/link_count + if + i32.const 0 + i32.const 112 + i32.const 17 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/unlink_count + if + i32.const 0 + i32.const 112 + i32.const 18 + i32.const 0 + call $~lib/env/abort + unreachable + end + ) + (func $gc/global-init/main (; 7 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start:gc/global-init + i32.const 1 + global.set $~lib/started + end + ) + (func $null (; 8 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/gc/global-init.ts b/tests/compiler/gc/global-init.ts new file mode 100644 index 0000000000..9f89bc7ad6 --- /dev/null +++ b/tests/compiler/gc/global-init.ts @@ -0,0 +1,18 @@ +import "allocator/arena"; +import { register_count, link_count, unlink_count } from "./_dummy"; + +@start export function main(): void {} + +class Ref {} + +// should register only + +var global: Ref = new Ref(); +assert(register_count == 1); +assert(link_count == 0); +assert(unlink_count == 0); + +global = new Ref(); +assert(register_count == 2); +assert(link_count == 0); +assert(unlink_count == 0); diff --git a/tests/compiler/gc/global-init.untouched.wat b/tests/compiler/gc/global-init.untouched.wat new file mode 100644 index 0000000000..bf8afc5d57 --- /dev/null +++ b/tests/compiler/gc/global-init.untouched.wat @@ -0,0 +1,328 @@ +(module + (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$vi (func (param i32))) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 96) "\02\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_count (mut i32) (i32.const 0)) + (global $gc/_dummy/link_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_parentRef (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_count (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_parentRef (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $gc/global-init/global (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 148)) + (global $~lib/capabilities i32 (i32.const 2)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (export "main" (func $gc/global-init/main)) + (export ".capabilities" (global $~lib/capabilities)) + (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $2 + local.get $2 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 + local.get $3 + local.get $4 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $3 + current_memory + local.set $4 + local.get $3 + local.get $4 + i32.const 16 + i32.shl + i32.gt_u + if + local.get $3 + local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 + end + return + ) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/ADJUSTOBLOCK + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + ) + (func $gc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 72 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/_dummy/register_count + local.get $0 + global.set $gc/_dummy/register_ref + ) + (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 151 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $gc/_dummy/__ref_register + local.get $0 + ) + (func $gc/global-init/Ref#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/runtime/allocate + i32.const 1 + call $~lib/runtime/register + local.set $0 + end + local.get $0 + ) + (func $start:gc/global-init (; 8 ;) (type $FUNCSIG$v) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + i32.const 0 + call $gc/global-init/Ref#constructor + global.set $gc/global-init/global + global.get $gc/_dummy/register_count + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 11 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/link_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 12 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/unlink_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 13 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 0 + call $gc/global-init/Ref#constructor + global.set $gc/global-init/global + global.get $gc/_dummy/register_count + i32.const 2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 16 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/link_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 17 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/unlink_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 18 + i32.const 0 + call $~lib/env/abort + unreachable + end + ) + (func $gc/global-init/main (; 9 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started + end + ) + (func $start (; 10 ;) (type $FUNCSIG$v) + call $start:gc/global-init + ) + (func $null (; 11 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/gc/rc/README.md b/tests/compiler/gc/rc/README.md new file mode 100644 index 0000000000..0e4679f8bf --- /dev/null +++ b/tests/compiler/gc/rc/README.md @@ -0,0 +1 @@ +Reference counting GC tests diff --git a/tests/compiler/gc/rc/_dummy.ts b/tests/compiler/gc/rc/_dummy.ts new file mode 100644 index 0000000000..74716fe322 --- /dev/null +++ b/tests/compiler/gc/rc/_dummy.ts @@ -0,0 +1,43 @@ +// A dummy reference counting GC for testing. + +export var collect_count = 0; + +// @ts-ignore: decorator +@global @unsafe +function __ref_collect(): void { + trace("gc.collect"); + collect_count++; +} + +export var register_count = 0; +export var register_ref: usize = 0; + +// @ts-ignore: decorator +@global @unsafe +function __ref_register(ref: usize): void { + trace("gc.register", 1, ref); + register_count++; + register_ref = ref; +} + +export var retain_count = 0; +export var retain_ref: usize = 0; + +// @ts-ignore: decorator +@global @unsafe +function __ref_retain(ref: usize): void { + trace("gc.retain", 1, ref); + retain_count++; + retain_ref = ref; +} + +export var release_count = 0; +export var release_ref: usize = 0; + +// @ts-ignore: decorator +@global @unsafe +function __ref_release(ref: usize): void { + trace("gc.release", 1, ref); + release_count++; + release_ref = ref; +} diff --git a/tests/compiler/gc/rc/global-assign.optimized.wat b/tests/compiler/gc/rc/global-assign.optimized.wat new file mode 100644 index 0000000000..b9ab6d27a0 --- /dev/null +++ b/tests/compiler/gc/rc/global-assign.optimized.wat @@ -0,0 +1,349 @@ +(module + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$i (func (result i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\02\00\00\00\1e") + (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 56) "\02\00\00\00\16") + (data (i32.const 72) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 96) "\02\00\00\00\12") + (data (i32.const 112) "g\00c\00.\00r\00e\00t\00a\00i\00n") + (data (i32.const 136) "\02\00\00\00,") + (data (i32.const 152) "g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s") + (data (i32.const 200) "\02\00\00\00\14") + (data (i32.const 216) "g\00c\00.\00r\00e\00l\00e\00a\00s\00e") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $gc/rc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/retain_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/retain_ref (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/release_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/release_ref (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 $gc/rc/global-assign/global (mut i32) (i32.const 0)) + (global $gc/rc/global-assign/globalRef (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/capabilities i32 (i32.const 2)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (export "main" (func $gc/rc/global-assign/main)) + (export ".capabilities" (global $~lib/capabilities)) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.tee $1 + local.get $0 + i32.const 1 + local.get $0 + i32.const 1 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + current_memory + local.tee $2 + i32.const 16 + i32.shl + i32.gt_u + if + local.get $2 + local.get $0 + local.get $1 + i32.sub + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $2 + local.get $3 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $0 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 16 + call $~lib/memory/memory.allocate + local.tee $0 + i32.const -1520547049 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 16 + i32.add + ) + (func $gc/rc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 72 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/rc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/register_count + local.get $0 + global.set $gc/rc/_dummy/register_ref + ) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 236 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 151 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 1 + i32.store + local.get $0 + call $gc/rc/_dummy/__ref_register + local.get $0 + ) + (func $gc/rc/_dummy/__ref_retain (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 112 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/rc/_dummy/retain_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/retain_count + local.get $0 + global.set $gc/rc/_dummy/retain_ref + ) + (func $gc/rc/_dummy/__ref_release (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 216 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/rc/_dummy/release_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/release_count + local.get $0 + global.set $gc/rc/_dummy/release_ref + ) + (func $start:gc/rc/global-assign (; 8 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + i32.const 240 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + call $~lib/runtime/allocate + call $~lib/runtime/register + local.tee $0 + call $gc/rc/_dummy/__ref_retain + local.get $0 + global.set $gc/rc/global-assign/global + global.get $gc/rc/global-assign/global + global.set $gc/rc/global-assign/globalRef + global.get $gc/rc/_dummy/register_count + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 12 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/retain_count + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 13 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/retain_ref + global.get $gc/rc/global-assign/globalRef + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 14 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/release_count + if + i32.const 0 + i32.const 152 + i32.const 15 + i32.const 0 + call $~lib/env/abort + unreachable + end + call $~lib/runtime/allocate + call $~lib/runtime/register + local.tee $0 + global.get $gc/rc/global-assign/global + local.tee $1 + i32.ne + if + local.get $1 + if + local.get $1 + call $gc/rc/_dummy/__ref_release + end + local.get $0 + call $gc/rc/_dummy/__ref_retain + end + local.get $0 + global.set $gc/rc/global-assign/global + global.get $gc/rc/_dummy/register_count + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 20 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/retain_count + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 21 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/retain_ref + global.get $gc/rc/global-assign/global + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 22 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/release_count + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 23 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/release_ref + global.get $gc/rc/global-assign/globalRef + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 24 + i32.const 0 + call $~lib/env/abort + unreachable + end + ) + (func $gc/rc/global-assign/main (; 9 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start:gc/rc/global-assign + i32.const 1 + global.set $~lib/started + end + ) + (func $null (; 10 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/gc/rc/global-assign.ts b/tests/compiler/gc/rc/global-assign.ts new file mode 100644 index 0000000000..6fb0bb400c --- /dev/null +++ b/tests/compiler/gc/rc/global-assign.ts @@ -0,0 +1,24 @@ +import "allocator/arena"; +import { register_count, retain_count, retain_ref, release_count, release_ref } from "./_dummy"; + +@start export function main(): void {} + +class Ref {} + +// should register and retain + +var global: Ref = new Ref(); +var globalRef = changetype(global); +assert(register_count == 1); +assert(retain_count == 1); +assert(retain_ref == globalRef); +assert(release_count == 0); + +// should register, release old and retain new + +global = new Ref(); +assert(register_count == 2); +assert(retain_count == 2); +assert(retain_ref == changetype(global)); +assert(release_count == 1); +assert(release_ref == globalRef); diff --git a/tests/compiler/gc/rc/global-assign.untouched.wat b/tests/compiler/gc/rc/global-assign.untouched.wat new file mode 100644 index 0000000000..41567e392c --- /dev/null +++ b/tests/compiler/gc/rc/global-assign.untouched.wat @@ -0,0 +1,425 @@ +(module + (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$vi (func (param i32))) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 96) "\02\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00t\00a\00i\00n\00") + (data (i32.const 136) "\02\00\00\00,\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s\00") + (data (i32.const 200) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00l\00e\00a\00s\00e\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $gc/rc/_dummy/collect_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/retain_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/retain_ref (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/release_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/release_ref (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $gc/rc/global-assign/global (mut i32) (i32.const 0)) + (global $gc/rc/global-assign/globalRef (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 236)) + (global $~lib/capabilities i32 (i32.const 2)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (export "main" (func $gc/rc/global-assign/main)) + (export ".capabilities" (global $~lib/capabilities)) + (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $2 + local.get $2 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 + local.get $3 + local.get $4 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $3 + current_memory + local.set $4 + local.get $3 + local.get $4 + i32.const 16 + i32.shl + i32.gt_u + if + local.get $3 + local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 + end + return + ) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/ADJUSTOBLOCK + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + ) + (func $gc/rc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 72 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/rc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/register_count + local.get $0 + global.set $gc/rc/_dummy/register_ref + ) + (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 151 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $gc/rc/_dummy/__ref_register + local.get $0 + ) + (func $gc/rc/global-assign/Ref#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/runtime/allocate + i32.const 1 + call $~lib/runtime/register + local.set $0 + end + local.get $0 + ) + (func $gc/rc/_dummy/__ref_retain (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 112 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/rc/_dummy/retain_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/retain_count + local.get $0 + global.set $gc/rc/_dummy/retain_ref + ) + (func $gc/rc/_dummy/__ref_release (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 216 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/rc/_dummy/release_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/release_count + local.get $0 + global.set $gc/rc/_dummy/release_ref + ) + (func $start:gc/rc/global-assign (; 10 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + block (result i32) + i32.const 0 + call $gc/rc/global-assign/Ref#constructor + local.set $0 + local.get $0 + call $gc/rc/_dummy/__ref_retain + local.get $0 + end + global.set $gc/rc/global-assign/global + global.get $gc/rc/global-assign/global + global.set $gc/rc/global-assign/globalRef + global.get $gc/rc/_dummy/register_count + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 12 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/retain_count + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 13 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/retain_ref + global.get $gc/rc/global-assign/globalRef + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 14 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/release_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 15 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 0 + call $gc/rc/global-assign/Ref#constructor + local.tee $0 + global.get $gc/rc/global-assign/global + local.tee $1 + i32.ne + if (result i32) + local.get $1 + if + local.get $1 + call $gc/rc/_dummy/__ref_release + end + local.get $0 + call $gc/rc/_dummy/__ref_retain + local.get $0 + else + local.get $0 + end + global.set $gc/rc/global-assign/global + global.get $gc/rc/_dummy/register_count + i32.const 2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 20 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/retain_count + i32.const 2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 21 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/retain_ref + global.get $gc/rc/global-assign/global + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 22 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/release_count + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 23 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/release_ref + global.get $gc/rc/global-assign/globalRef + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 24 + i32.const 0 + call $~lib/env/abort + unreachable + end + ) + (func $gc/rc/global-assign/main (; 11 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started + end + ) + (func $start (; 12 ;) (type $FUNCSIG$v) + call $start:gc/rc/global-assign + ) + (func $null (; 13 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/gc/rc/global-init.optimized.wat b/tests/compiler/gc/rc/global-init.optimized.wat new file mode 100644 index 0000000000..57902cd967 --- /dev/null +++ b/tests/compiler/gc/rc/global-init.optimized.wat @@ -0,0 +1,253 @@ +(module + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$i (func (result i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\02\00\00\00\1e") + (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 56) "\02\00\00\00\16") + (data (i32.const 72) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 96) "\02\00\00\00\12") + (data (i32.const 112) "g\00c\00.\00r\00e\00t\00a\00i\00n") + (data (i32.const 136) "\02\00\00\00(") + (data (i32.const 152) "g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $gc/rc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/retain_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/retain_ref (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/release_count (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 $gc/rc/global-init/global (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/capabilities i32 (i32.const 2)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (export "main" (func $gc/rc/global-init/main)) + (export ".capabilities" (global $~lib/capabilities)) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.tee $1 + local.get $0 + i32.const 1 + local.get $0 + i32.const 1 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + current_memory + local.tee $2 + i32.const 16 + i32.shl + i32.gt_u + if + local.get $2 + local.get $0 + local.get $1 + i32.sub + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $2 + local.get $3 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $0 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 16 + call $~lib/memory/memory.allocate + local.tee $0 + i32.const -1520547049 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 16 + i32.add + ) + (func $gc/rc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 72 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/rc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/register_count + local.get $0 + global.set $gc/rc/_dummy/register_ref + ) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 192 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 151 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 1 + i32.store + local.get $0 + call $gc/rc/_dummy/__ref_register + local.get $0 + ) + (func $gc/rc/_dummy/__ref_retain (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 112 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/rc/_dummy/retain_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/retain_count + local.get $0 + global.set $gc/rc/_dummy/retain_ref + ) + (func $start:gc/rc/global-init (; 7 ;) (type $FUNCSIG$v) + (local $0 i32) + i32.const 192 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + call $~lib/runtime/allocate + call $~lib/runtime/register + local.tee $0 + call $gc/rc/_dummy/__ref_retain + local.get $0 + global.set $gc/rc/global-init/global + global.get $gc/rc/_dummy/register_count + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 11 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/retain_count + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 12 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/retain_ref + global.get $gc/rc/global-init/global + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 13 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/release_count + if + i32.const 0 + i32.const 152 + i32.const 14 + i32.const 0 + call $~lib/env/abort + unreachable + end + ) + (func $gc/rc/global-init/main (; 8 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start:gc/rc/global-init + i32.const 1 + global.set $~lib/started + end + ) + (func $null (; 9 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/gc/rc/global-init.ts b/tests/compiler/gc/rc/global-init.ts new file mode 100644 index 0000000000..46c36ba565 --- /dev/null +++ b/tests/compiler/gc/rc/global-init.ts @@ -0,0 +1,14 @@ +import "allocator/arena"; +import { register_count, retain_count, retain_ref, release_count } from "./_dummy"; + +@start export function main(): void {} + +class Ref {} + +// should register and retain, with nothing to release + +var global = new Ref(); +assert(register_count == 1); +assert(retain_count == 1); +assert(retain_ref == changetype(global)); +assert(release_count == 0); diff --git a/tests/compiler/gc/rc/global-init.untouched.wat b/tests/compiler/gc/rc/global-init.untouched.wat new file mode 100644 index 0000000000..38a1a42847 --- /dev/null +++ b/tests/compiler/gc/rc/global-init.untouched.wat @@ -0,0 +1,324 @@ +(module + (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$vi (func (param i32))) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 96) "\02\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00t\00a\00i\00n\00") + (data (i32.const 136) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $gc/rc/_dummy/collect_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/retain_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/retain_ref (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/release_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/release_ref (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $gc/rc/global-init/global (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 192)) + (global $~lib/capabilities i32 (i32.const 2)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (export "main" (func $gc/rc/global-init/main)) + (export ".capabilities" (global $~lib/capabilities)) + (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $2 + local.get $2 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 + local.get $3 + local.get $4 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $3 + current_memory + local.set $4 + local.get $3 + local.get $4 + i32.const 16 + i32.shl + i32.gt_u + if + local.get $3 + local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 + end + return + ) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/ADJUSTOBLOCK + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + ) + (func $gc/rc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 72 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/rc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/register_count + local.get $0 + global.set $gc/rc/_dummy/register_ref + ) + (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 151 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $gc/rc/_dummy/__ref_register + local.get $0 + ) + (func $gc/rc/global-init/Ref#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/runtime/allocate + i32.const 1 + call $~lib/runtime/register + local.set $0 + end + local.get $0 + ) + (func $gc/rc/_dummy/__ref_retain (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 112 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/rc/_dummy/retain_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/retain_count + local.get $0 + global.set $gc/rc/_dummy/retain_ref + ) + (func $start:gc/rc/global-init (; 9 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + block (result i32) + i32.const 0 + call $gc/rc/global-init/Ref#constructor + local.set $0 + local.get $0 + call $gc/rc/_dummy/__ref_retain + local.get $0 + end + global.set $gc/rc/global-init/global + global.get $gc/rc/_dummy/register_count + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 11 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/retain_count + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 12 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/retain_ref + global.get $gc/rc/global-init/global + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 13 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $gc/rc/_dummy/release_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 14 + i32.const 0 + call $~lib/env/abort + unreachable + end + ) + (func $gc/rc/global-init/main (; 10 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started + end + ) + (func $start (; 11 ;) (type $FUNCSIG$v) + call $start:gc/rc/global-init + ) + (func $null (; 12 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 29a6fcb3b2..1550e69e86 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -85,7 +85,7 @@ if i32.const 0 i32.const 16 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index 5eb46ec011..f2e5837dda 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -142,7 +142,7 @@ if i32.const 0 i32.const 16 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -159,7 +159,7 @@ if i32.const 0 i32.const 16 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -170,22 +170,13 @@ local.get $0 ) (func $getter-call/C#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - i32.const 0 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 1 - call $~lib/runtime/register - end + i32.const 0 + call $~lib/runtime/allocate + i32.const 1 + call $~lib/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index 7af4956e2b..33619e1a37 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 48 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -146,7 +146,7 @@ if i32.const 0 i32.const 48 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 3037ca0b80..e3d45a84b6 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -406,7 +406,7 @@ if i32.const 0 i32.const 48 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -423,7 +423,7 @@ if i32.const 0 i32.const 48 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -439,7 +439,6 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) block $inlining/Bar#constructor|inlined.0 (result i32) i32.const 0 local.set $1 @@ -450,14 +449,8 @@ if (result i32) local.get $1 else - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - i32.const 16 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 16 + call $~lib/runtime/allocate i32.const 2 call $~lib/runtime/register end @@ -468,18 +461,10 @@ local.get $3 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - i32.const 8 - local.set $4 - local.get $4 - call $~lib/runtime/allocate - end - local.set $4 - local.get $4 - i32.const 3 - call $~lib/runtime/register - end + i32.const 8 + call $~lib/runtime/allocate + i32.const 3 + call $~lib/runtime/register local.set $3 end local.get $3 @@ -506,8 +491,8 @@ i32.store offset=12 local.get $1 end - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.load i32.const 1 i32.eq @@ -520,7 +505,7 @@ call $~lib/env/abort unreachable end - local.get $5 + local.get $4 i32.load offset=4 i32.const 2 i32.eq @@ -533,7 +518,7 @@ call $~lib/env/abort unreachable end - local.get $5 + local.get $4 i32.load offset=8 i32.const 3 i32.eq @@ -546,7 +531,7 @@ call $~lib/env/abort unreachable end - local.get $5 + local.get $4 i32.load offset=12 i32.const 4 i32.eq diff --git a/tests/compiler/new-without-allocator.untouched.wat b/tests/compiler/new-without-allocator.untouched.wat index 5652461f72..1716c926a6 100644 --- a/tests/compiler/new-without-allocator.untouched.wat +++ b/tests/compiler/new-without-allocator.untouched.wat @@ -56,7 +56,7 @@ if i32.const 0 i32.const 16 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -73,7 +73,7 @@ if i32.const 0 i32.const 16 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -84,22 +84,13 @@ local.get $0 ) (func $new-without-allocator/A#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - i32.const 0 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 1 - call $~lib/runtime/register - end + i32.const 0 + call $~lib/runtime/allocate + i32.const 1 + call $~lib/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 339d2c67f9..85118b4aec 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -303,7 +303,7 @@ if i32.const 0 i32.const 464 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -318,7 +318,7 @@ if i32.const 0 i32.const 464 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -2516,7 +2516,7 @@ if i32.const 0 i32.const 464 - i32.const 185 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable @@ -2530,7 +2530,7 @@ if i32.const 0 i32.const 464 - i32.const 187 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 327dd38b78..09fe06e6e2 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -400,7 +400,7 @@ if i32.const 0 i32.const 464 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -417,7 +417,7 @@ if i32.const 0 i32.const 464 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -3549,7 +3549,7 @@ if i32.const 0 i32.const 464 - i32.const 185 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable @@ -3566,7 +3566,7 @@ if i32.const 0 i32.const 464 - i32.const 187 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index ff4f0679d3..67841af09a 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -107,7 +107,7 @@ if i32.const 0 i32.const 48 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -122,7 +122,7 @@ if i32.const 0 i32.const 48 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index 6f45527778..42ecc4cc96 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 48 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -160,7 +160,7 @@ if i32.const 0 i32.const 48 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -337,7 +337,6 @@ (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -349,18 +348,10 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset block (result i32) - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - i32.const 8 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 2 - call $~lib/runtime/register - end + i32.const 8 + call $~lib/runtime/allocate + i32.const 2 + call $~lib/runtime/register local.set $0 local.get $0 i32.const 1 @@ -372,18 +363,10 @@ end call $object-literal/bar block (result i32) - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - i32.const 4 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 - i32.const 3 - call $~lib/runtime/register - end + i32.const 4 + call $~lib/runtime/allocate + i32.const 3 + call $~lib/runtime/register local.set $1 local.get $1 i32.const 2 @@ -392,18 +375,10 @@ end call $object-literal/bar2 block (result i32) - block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) - i32.const 4 - local.set $3 - local.get $3 - call $~lib/runtime/allocate - end - local.set $3 - local.get $3 - i32.const 3 - call $~lib/runtime/register - end + i32.const 4 + call $~lib/runtime/allocate + i32.const 3 + call $~lib/runtime/register local.set $2 local.get $2 i32.const 3 diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 3b46416744..fa432d295f 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -115,7 +115,7 @@ if i32.const 0 i32.const 16 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index 0ce99141c8..324a9f1e3f 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -149,7 +149,7 @@ if i32.const 0 i32.const 16 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -166,7 +166,7 @@ if i32.const 0 i32.const 16 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -177,22 +177,13 @@ local.get $0 ) (func $optional-typeparameters/TestConcrete#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - i32.const 0 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 1 - call $~lib/runtime/register - end + i32.const 0 + call $~lib/runtime/allocate + i32.const 1 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -203,22 +194,13 @@ i32.add ) (func $optional-typeparameters/TestDerived#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - i32.const 0 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 3 - call $~lib/runtime/register - end + i32.const 0 + call $~lib/runtime/allocate + i32.const 3 + call $~lib/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/simd.optimized.wat b/tests/compiler/simd.optimized.wat index 2505ac86a0..73244308c4 100644 --- a/tests/compiler/simd.optimized.wat +++ b/tests/compiler/simd.optimized.wat @@ -1,21 +1,12 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\07\00\00\00s\00i\00m\00d\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\0e\00\00\00s\00i\00m\00d\00.\00t\00s") (table $0 1 funcref) - (elem (i32.const 0) $null) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (elem (i32.const 0) $start) (export "memory" (memory $0)) (export "table" (table $0)) - (start $start) (func $start (; 0 ;) (type $FUNCSIG$v) - i32.const 32 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $null (; 1 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/simd.ts b/tests/compiler/simd.ts index 677f95852b..d3642682c3 100644 --- a/tests/compiler/simd.ts +++ b/tests/compiler/simd.ts @@ -1,7 +1,5 @@ // hint: asc tests/compiler/simd --enable simd --validate -import "allocator/arena"; - function test_v128(): void { // equality and inequality assert( diff --git a/tests/compiler/simd.untouched.wat b/tests/compiler/simd.untouched.wat index 9781a39ee2..6b4e62066a 100644 --- a/tests/compiler/simd.untouched.wat +++ b/tests/compiler/simd.untouched.wat @@ -3,29 +3,15 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\07\00\00\00s\00i\00m\00d\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\0e\00\00\00s\00i\00m\00d\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/ASC_FEATURE_SIMD i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 28)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $simd/test_v128 (; 2 ;) (type $FUNCSIG$v) + (func $simd/test_v128 (; 1 ;) (type $FUNCSIG$v) v128.const i32 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d v128.const i32 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d i8x16.eq @@ -35,8 +21,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 7 + i32.const 16 + i32.const 5 i32.const 2 call $~lib/env/abort unreachable @@ -50,8 +36,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 12 + i32.const 16 + i32.const 10 i32.const 2 call $~lib/env/abort unreachable @@ -67,8 +53,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 18 + i32.const 16 + i32.const 16 i32.const 2 call $~lib/env/abort unreachable @@ -84,8 +70,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 25 + i32.const 16 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -101,8 +87,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 32 + i32.const 16 + i32.const 30 i32.const 2 call $~lib/env/abort unreachable @@ -117,8 +103,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 39 + i32.const 16 + i32.const 37 i32.const 2 call $~lib/env/abort unreachable @@ -135,14 +121,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 45 + i32.const 16 + i32.const 43 i32.const 2 call $~lib/env/abort unreachable end ) - (func $simd/test_i8x16 (; 3 ;) (type $FUNCSIG$v) + (func $simd/test_i8x16 (; 2 ;) (type $FUNCSIG$v) (local $0 v128) (local $1 v128) (local $2 v128) @@ -161,8 +147,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 62 + i32.const 16 + i32.const 60 i32.const 2 call $~lib/env/abort unreachable @@ -179,8 +165,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 64 + i32.const 16 + i32.const 62 i32.const 2 call $~lib/env/abort unreachable @@ -198,8 +184,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 66 + i32.const 16 + i32.const 64 i32.const 2 call $~lib/env/abort unreachable @@ -215,8 +201,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 67 + i32.const 16 + i32.const 65 i32.const 2 call $~lib/env/abort unreachable @@ -232,8 +218,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 68 + i32.const 16 + i32.const 66 i32.const 2 call $~lib/env/abort unreachable @@ -248,8 +234,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 69 + i32.const 16 + i32.const 67 i32.const 2 call $~lib/env/abort unreachable @@ -265,8 +251,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 74 + i32.const 16 + i32.const 72 i32.const 2 call $~lib/env/abort unreachable @@ -282,8 +268,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 75 + i32.const 16 + i32.const 73 i32.const 2 call $~lib/env/abort unreachable @@ -297,8 +283,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 76 + i32.const 16 + i32.const 74 i32.const 2 call $~lib/env/abort unreachable @@ -314,8 +300,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 77 + i32.const 16 + i32.const 75 i32.const 2 call $~lib/env/abort unreachable @@ -331,8 +317,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 82 + i32.const 16 + i32.const 80 i32.const 2 call $~lib/env/abort unreachable @@ -350,8 +336,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 87 + i32.const 16 + i32.const 85 i32.const 2 call $~lib/env/abort unreachable @@ -369,8 +355,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 93 + i32.const 16 + i32.const 91 i32.const 2 call $~lib/env/abort unreachable @@ -388,8 +374,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 99 + i32.const 16 + i32.const 97 i32.const 2 call $~lib/env/abort unreachable @@ -407,8 +393,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 105 + i32.const 16 + i32.const 103 i32.const 2 call $~lib/env/abort unreachable @@ -426,8 +412,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 111 + i32.const 16 + i32.const 109 i32.const 2 call $~lib/env/abort unreachable @@ -445,8 +431,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 112 + i32.const 16 + i32.const 110 i32.const 2 call $~lib/env/abort unreachable @@ -464,8 +450,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 113 + i32.const 16 + i32.const 111 i32.const 2 call $~lib/env/abort unreachable @@ -479,8 +465,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 114 + i32.const 16 + i32.const 112 i32.const 2 call $~lib/env/abort unreachable @@ -495,8 +481,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 115 + i32.const 16 + i32.const 113 i32.const 2 call $~lib/env/abort unreachable @@ -527,8 +513,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 120 + i32.const 16 + i32.const 118 i32.const 2 call $~lib/env/abort unreachable @@ -544,8 +530,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 121 + i32.const 16 + i32.const 119 i32.const 2 call $~lib/env/abort unreachable @@ -561,8 +547,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 122 + i32.const 16 + i32.const 120 i32.const 2 call $~lib/env/abort unreachable @@ -578,8 +564,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 123 + i32.const 16 + i32.const 121 i32.const 2 call $~lib/env/abort unreachable @@ -595,8 +581,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 124 + i32.const 16 + i32.const 122 i32.const 2 call $~lib/env/abort unreachable @@ -612,8 +598,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 125 + i32.const 16 + i32.const 123 i32.const 2 call $~lib/env/abort unreachable @@ -629,8 +615,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 126 + i32.const 16 + i32.const 124 i32.const 2 call $~lib/env/abort unreachable @@ -646,8 +632,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 127 + i32.const 16 + i32.const 125 i32.const 2 call $~lib/env/abort unreachable @@ -663,8 +649,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 128 + i32.const 16 + i32.const 126 i32.const 2 call $~lib/env/abort unreachable @@ -680,14 +666,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 129 + i32.const 16 + i32.const 127 i32.const 2 call $~lib/env/abort unreachable end ) - (func $simd/test_i16x8 (; 4 ;) (type $FUNCSIG$v) + (func $simd/test_i16x8 (; 3 ;) (type $FUNCSIG$v) (local $0 v128) (local $1 v128) (local $2 v128) @@ -706,8 +692,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 134 + i32.const 16 + i32.const 132 i32.const 2 call $~lib/env/abort unreachable @@ -724,8 +710,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 136 + i32.const 16 + i32.const 134 i32.const 2 call $~lib/env/abort unreachable @@ -743,8 +729,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 138 + i32.const 16 + i32.const 136 i32.const 2 call $~lib/env/abort unreachable @@ -760,8 +746,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 139 + i32.const 16 + i32.const 137 i32.const 2 call $~lib/env/abort unreachable @@ -777,8 +763,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 140 + i32.const 16 + i32.const 138 i32.const 2 call $~lib/env/abort unreachable @@ -793,8 +779,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 141 + i32.const 16 + i32.const 139 i32.const 2 call $~lib/env/abort unreachable @@ -810,8 +796,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 146 + i32.const 16 + i32.const 144 i32.const 2 call $~lib/env/abort unreachable @@ -827,8 +813,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 147 + i32.const 16 + i32.const 145 i32.const 2 call $~lib/env/abort unreachable @@ -842,8 +828,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 148 + i32.const 16 + i32.const 146 i32.const 2 call $~lib/env/abort unreachable @@ -859,8 +845,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 149 + i32.const 16 + i32.const 147 i32.const 2 call $~lib/env/abort unreachable @@ -876,8 +862,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 154 + i32.const 16 + i32.const 152 i32.const 2 call $~lib/env/abort unreachable @@ -895,8 +881,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 159 + i32.const 16 + i32.const 157 i32.const 2 call $~lib/env/abort unreachable @@ -914,8 +900,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 165 + i32.const 16 + i32.const 163 i32.const 2 call $~lib/env/abort unreachable @@ -933,8 +919,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 171 + i32.const 16 + i32.const 169 i32.const 2 call $~lib/env/abort unreachable @@ -952,8 +938,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 177 + i32.const 16 + i32.const 175 i32.const 2 call $~lib/env/abort unreachable @@ -971,8 +957,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 183 + i32.const 16 + i32.const 181 i32.const 2 call $~lib/env/abort unreachable @@ -990,8 +976,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 184 + i32.const 16 + i32.const 182 i32.const 2 call $~lib/env/abort unreachable @@ -1009,8 +995,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 185 + i32.const 16 + i32.const 183 i32.const 2 call $~lib/env/abort unreachable @@ -1024,8 +1010,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 186 + i32.const 16 + i32.const 184 i32.const 2 call $~lib/env/abort unreachable @@ -1040,8 +1026,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 187 + i32.const 16 + i32.const 185 i32.const 2 call $~lib/env/abort unreachable @@ -1072,8 +1058,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 192 + i32.const 16 + i32.const 190 i32.const 2 call $~lib/env/abort unreachable @@ -1089,8 +1075,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 193 + i32.const 16 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -1106,8 +1092,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 194 + i32.const 16 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -1123,8 +1109,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 195 + i32.const 16 + i32.const 193 i32.const 2 call $~lib/env/abort unreachable @@ -1140,8 +1126,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 196 + i32.const 16 + i32.const 194 i32.const 2 call $~lib/env/abort unreachable @@ -1157,8 +1143,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 197 + i32.const 16 + i32.const 195 i32.const 2 call $~lib/env/abort unreachable @@ -1174,8 +1160,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 198 + i32.const 16 + i32.const 196 i32.const 2 call $~lib/env/abort unreachable @@ -1191,8 +1177,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 199 + i32.const 16 + i32.const 197 i32.const 2 call $~lib/env/abort unreachable @@ -1208,8 +1194,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 200 + i32.const 16 + i32.const 198 i32.const 2 call $~lib/env/abort unreachable @@ -1225,14 +1211,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 201 + i32.const 16 + i32.const 199 i32.const 2 call $~lib/env/abort unreachable end ) - (func $simd/test_i32x4 (; 5 ;) (type $FUNCSIG$v) + (func $simd/test_i32x4 (; 4 ;) (type $FUNCSIG$v) (local $0 v128) (local $1 v128) (local $2 v128) @@ -1251,8 +1237,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 206 + i32.const 16 + i32.const 204 i32.const 2 call $~lib/env/abort unreachable @@ -1269,8 +1255,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 208 + i32.const 16 + i32.const 206 i32.const 2 call $~lib/env/abort unreachable @@ -1288,8 +1274,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 210 + i32.const 16 + i32.const 208 i32.const 2 call $~lib/env/abort unreachable @@ -1305,8 +1291,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 211 + i32.const 16 + i32.const 209 i32.const 2 call $~lib/env/abort unreachable @@ -1322,8 +1308,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 212 + i32.const 16 + i32.const 210 i32.const 2 call $~lib/env/abort unreachable @@ -1338,8 +1324,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 213 + i32.const 16 + i32.const 211 i32.const 2 call $~lib/env/abort unreachable @@ -1351,8 +1337,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 218 + i32.const 16 + i32.const 216 i32.const 2 call $~lib/env/abort unreachable @@ -1364,8 +1350,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 219 + i32.const 16 + i32.const 217 i32.const 2 call $~lib/env/abort unreachable @@ -1381,8 +1367,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 220 + i32.const 16 + i32.const 218 i32.const 2 call $~lib/env/abort unreachable @@ -1398,8 +1384,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 225 + i32.const 16 + i32.const 223 i32.const 2 call $~lib/env/abort unreachable @@ -1417,8 +1403,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 230 + i32.const 16 + i32.const 228 i32.const 2 call $~lib/env/abort unreachable @@ -1436,8 +1422,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 231 + i32.const 16 + i32.const 229 i32.const 2 call $~lib/env/abort unreachable @@ -1455,8 +1441,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 232 + i32.const 16 + i32.const 230 i32.const 2 call $~lib/env/abort unreachable @@ -1470,8 +1456,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 233 + i32.const 16 + i32.const 231 i32.const 2 call $~lib/env/abort unreachable @@ -1486,8 +1472,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 234 + i32.const 16 + i32.const 232 i32.const 2 call $~lib/env/abort unreachable @@ -1518,8 +1504,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 239 + i32.const 16 + i32.const 237 i32.const 2 call $~lib/env/abort unreachable @@ -1535,8 +1521,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 240 + i32.const 16 + i32.const 238 i32.const 2 call $~lib/env/abort unreachable @@ -1552,8 +1538,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 241 + i32.const 16 + i32.const 239 i32.const 2 call $~lib/env/abort unreachable @@ -1569,8 +1555,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 242 + i32.const 16 + i32.const 240 i32.const 2 call $~lib/env/abort unreachable @@ -1586,8 +1572,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 243 + i32.const 16 + i32.const 241 i32.const 2 call $~lib/env/abort unreachable @@ -1603,8 +1589,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 244 + i32.const 16 + i32.const 242 i32.const 2 call $~lib/env/abort unreachable @@ -1620,8 +1606,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 245 + i32.const 16 + i32.const 243 i32.const 2 call $~lib/env/abort unreachable @@ -1637,8 +1623,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 246 + i32.const 16 + i32.const 244 i32.const 2 call $~lib/env/abort unreachable @@ -1654,8 +1640,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 247 + i32.const 16 + i32.const 245 i32.const 2 call $~lib/env/abort unreachable @@ -1671,8 +1657,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 248 + i32.const 16 + i32.const 246 i32.const 2 call $~lib/env/abort unreachable @@ -1689,8 +1675,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 249 + i32.const 16 + i32.const 247 i32.const 2 call $~lib/env/abort unreachable @@ -1707,14 +1693,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 254 + i32.const 16 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable end ) - (func $simd/test_i64x2 (; 6 ;) (type $FUNCSIG$v) + (func $simd/test_i64x2 (; 5 ;) (type $FUNCSIG$v) (local $0 v128) (local $1 v128) (local $2 v128) @@ -1729,8 +1715,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 263 + i32.const 16 + i32.const 261 i32.const 2 call $~lib/env/abort unreachable @@ -1747,8 +1733,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 265 + i32.const 16 + i32.const 263 i32.const 2 call $~lib/env/abort unreachable @@ -1766,8 +1752,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 267 + i32.const 16 + i32.const 265 i32.const 2 call $~lib/env/abort unreachable @@ -1783,8 +1769,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 268 + i32.const 16 + i32.const 266 i32.const 2 call $~lib/env/abort unreachable @@ -1799,8 +1785,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 269 + i32.const 16 + i32.const 267 i32.const 2 call $~lib/env/abort unreachable @@ -1812,8 +1798,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 274 + i32.const 16 + i32.const 272 i32.const 2 call $~lib/env/abort unreachable @@ -1825,8 +1811,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 275 + i32.const 16 + i32.const 273 i32.const 2 call $~lib/env/abort unreachable @@ -1842,8 +1828,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 276 + i32.const 16 + i32.const 274 i32.const 2 call $~lib/env/abort unreachable @@ -1859,8 +1845,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 281 + i32.const 16 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -1878,8 +1864,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 286 + i32.const 16 + i32.const 284 i32.const 2 call $~lib/env/abort unreachable @@ -1897,8 +1883,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 287 + i32.const 16 + i32.const 285 i32.const 2 call $~lib/env/abort unreachable @@ -1916,8 +1902,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 288 + i32.const 16 + i32.const 286 i32.const 2 call $~lib/env/abort unreachable @@ -1931,8 +1917,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 289 + i32.const 16 + i32.const 287 i32.const 2 call $~lib/env/abort unreachable @@ -1947,8 +1933,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 290 + i32.const 16 + i32.const 288 i32.const 2 call $~lib/env/abort unreachable @@ -1965,8 +1951,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 291 + i32.const 16 + i32.const 289 i32.const 2 call $~lib/env/abort unreachable @@ -1983,14 +1969,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 296 + i32.const 16 + i32.const 294 i32.const 2 call $~lib/env/abort unreachable end ) - (func $simd/test_f32x4 (; 7 ;) (type $FUNCSIG$v) + (func $simd/test_f32x4 (; 6 ;) (type $FUNCSIG$v) (local $0 v128) (local $1 v128) (local $2 v128) @@ -2010,8 +1996,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 305 + i32.const 16 + i32.const 303 i32.const 2 call $~lib/env/abort unreachable @@ -2028,8 +2014,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 307 + i32.const 16 + i32.const 305 i32.const 2 call $~lib/env/abort unreachable @@ -2047,8 +2033,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 309 + i32.const 16 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -2064,8 +2050,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 310 + i32.const 16 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -2081,8 +2067,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 311 + i32.const 16 + i32.const 309 i32.const 2 call $~lib/env/abort unreachable @@ -2102,8 +2088,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 313 + i32.const 16 + i32.const 311 i32.const 2 call $~lib/env/abort unreachable @@ -2119,8 +2105,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 314 + i32.const 16 + i32.const 312 i32.const 2 call $~lib/env/abort unreachable @@ -2135,8 +2121,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 315 + i32.const 16 + i32.const 313 i32.const 2 call $~lib/env/abort unreachable @@ -2148,8 +2134,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 316 + i32.const 16 + i32.const 314 i32.const 2 call $~lib/env/abort unreachable @@ -2161,8 +2147,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 317 + i32.const 16 + i32.const 315 i32.const 2 call $~lib/env/abort unreachable @@ -2178,8 +2164,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 318 + i32.const 16 + i32.const 316 i32.const 2 call $~lib/env/abort unreachable @@ -2195,8 +2181,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 323 + i32.const 16 + i32.const 321 i32.const 2 call $~lib/env/abort unreachable @@ -2226,8 +2212,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 332 + i32.const 16 + i32.const 330 i32.const 2 call $~lib/env/abort unreachable @@ -2243,8 +2229,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 333 + i32.const 16 + i32.const 331 i32.const 2 call $~lib/env/abort unreachable @@ -2260,8 +2246,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 334 + i32.const 16 + i32.const 332 i32.const 2 call $~lib/env/abort unreachable @@ -2277,8 +2263,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 335 + i32.const 16 + i32.const 333 i32.const 2 call $~lib/env/abort unreachable @@ -2294,8 +2280,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 336 + i32.const 16 + i32.const 334 i32.const 2 call $~lib/env/abort unreachable @@ -2311,8 +2297,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 337 + i32.const 16 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -2328,8 +2314,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 338 + i32.const 16 + i32.const 336 i32.const 2 call $~lib/env/abort unreachable @@ -2345,8 +2331,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 339 + i32.const 16 + i32.const 337 i32.const 2 call $~lib/env/abort unreachable @@ -2361,8 +2347,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 340 + i32.const 16 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -2377,8 +2363,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 341 + i32.const 16 + i32.const 339 i32.const 2 call $~lib/env/abort unreachable @@ -2395,8 +2381,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 342 + i32.const 16 + i32.const 340 i32.const 2 call $~lib/env/abort unreachable @@ -2413,14 +2399,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 347 + i32.const 16 + i32.const 345 i32.const 2 call $~lib/env/abort unreachable end ) - (func $simd/test_f64x2 (; 8 ;) (type $FUNCSIG$v) + (func $simd/test_f64x2 (; 7 ;) (type $FUNCSIG$v) (local $0 v128) (local $1 v128) (local $2 v128) @@ -2440,8 +2426,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 356 + i32.const 16 + i32.const 354 i32.const 2 call $~lib/env/abort unreachable @@ -2458,8 +2444,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 358 + i32.const 16 + i32.const 356 i32.const 2 call $~lib/env/abort unreachable @@ -2477,8 +2463,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 360 + i32.const 16 + i32.const 358 i32.const 2 call $~lib/env/abort unreachable @@ -2494,8 +2480,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 361 + i32.const 16 + i32.const 359 i32.const 2 call $~lib/env/abort unreachable @@ -2511,8 +2497,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 362 + i32.const 16 + i32.const 360 i32.const 2 call $~lib/env/abort unreachable @@ -2532,8 +2518,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 364 + i32.const 16 + i32.const 362 i32.const 2 call $~lib/env/abort unreachable @@ -2549,8 +2535,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 365 + i32.const 16 + i32.const 363 i32.const 2 call $~lib/env/abort unreachable @@ -2565,8 +2551,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 366 + i32.const 16 + i32.const 364 i32.const 2 call $~lib/env/abort unreachable @@ -2578,8 +2564,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 367 + i32.const 16 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -2591,8 +2577,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 368 + i32.const 16 + i32.const 366 i32.const 2 call $~lib/env/abort unreachable @@ -2608,8 +2594,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 369 + i32.const 16 + i32.const 367 i32.const 2 call $~lib/env/abort unreachable @@ -2625,8 +2611,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 374 + i32.const 16 + i32.const 372 i32.const 2 call $~lib/env/abort unreachable @@ -2656,8 +2642,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 383 + i32.const 16 + i32.const 381 i32.const 2 call $~lib/env/abort unreachable @@ -2673,8 +2659,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 384 + i32.const 16 + i32.const 382 i32.const 2 call $~lib/env/abort unreachable @@ -2690,8 +2676,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 385 + i32.const 16 + i32.const 383 i32.const 2 call $~lib/env/abort unreachable @@ -2707,8 +2693,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 386 + i32.const 16 + i32.const 384 i32.const 2 call $~lib/env/abort unreachable @@ -2724,8 +2710,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 387 + i32.const 16 + i32.const 385 i32.const 2 call $~lib/env/abort unreachable @@ -2741,8 +2727,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 388 + i32.const 16 + i32.const 386 i32.const 2 call $~lib/env/abort unreachable @@ -2758,8 +2744,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 389 + i32.const 16 + i32.const 387 i32.const 2 call $~lib/env/abort unreachable @@ -2775,8 +2761,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 390 + i32.const 16 + i32.const 388 i32.const 2 call $~lib/env/abort unreachable @@ -2791,8 +2777,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 391 + i32.const 16 + i32.const 389 i32.const 2 call $~lib/env/abort unreachable @@ -2807,8 +2793,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 392 + i32.const 16 + i32.const 390 i32.const 2 call $~lib/env/abort unreachable @@ -2825,8 +2811,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 393 + i32.const 16 + i32.const 391 i32.const 2 call $~lib/env/abort unreachable @@ -2843,14 +2829,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 398 + i32.const 16 + i32.const 396 i32.const 2 call $~lib/env/abort unreachable end ) - (func $simd/test_v8x16 (; 9 ;) (type $FUNCSIG$v) + (func $simd/test_v8x16 (; 8 ;) (type $FUNCSIG$v) (local $0 v128) (local $1 v128) v128.const i32 0x03020100 0x07060504 0x0b0a0908 0x0f0e0d0c @@ -2868,29 +2854,26 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 408 + i32.const 16 + i32.const 406 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start:simd (; 10 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena - block - call $simd/test_v128 - call $simd/test_i8x16 - call $simd/test_i16x8 - call $simd/test_i32x4 - call $simd/test_i64x2 - call $simd/test_f32x4 - call $simd/test_f64x2 - call $simd/test_v8x16 - end + (func $start:simd (; 9 ;) (type $FUNCSIG$v) + call $simd/test_v128 + call $simd/test_i8x16 + call $simd/test_i16x8 + call $simd/test_i32x4 + call $simd/test_i64x2 + call $simd/test_f32x4 + call $simd/test_f64x2 + call $simd/test_v8x16 ) - (func $start (; 11 ;) (type $FUNCSIG$v) + (func $start (; 10 ;) (type $FUNCSIG$v) call $start:simd ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 11 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index a38833e097..e513bbdf20 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -177,7 +177,7 @@ if i32.const 0 i32.const 296 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -192,7 +192,7 @@ if i32.const 0 i32.const 296 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 5ff0a18282..6aa27f8294 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -234,7 +234,7 @@ if i32.const 0 i32.const 296 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -251,7 +251,7 @@ if i32.const 0 i32.const 296 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -1710,15 +1710,15 @@ (local $9 i32) i32.const 16 call $~lib/runtime/allocate - local.get $2 + local.get $1 call $~lib/runtime/register local.set $4 local.get $0 - local.get $3 + local.get $2 i32.shl local.set $5 local.get $0 - local.get $3 + local.get $2 i32.shl call $~lib/runtime/allocate i32.const 1 @@ -1756,32 +1756,23 @@ local.get $4 local.get $0 i32.store offset=12 - local.get $1 + local.get $3 if local.get $6 - local.get $1 + local.get $3 local.get $5 call $~lib/memory/memory.copy end local.get $4 ) (func $std/array-literal/Ref#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - i32.const 0 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 5 - call $~lib/runtime/register - end + i32.const 0 + call $~lib/runtime/allocate + i32.const 5 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -1791,22 +1782,13 @@ i32.load offset=12 ) (func $std/array-literal/RefWithCtor#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - i32.const 0 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 7 - call $~lib/runtime/register - end + i32.const 0 + call $~lib/runtime/allocate + i32.const 7 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -1819,7 +1801,6 @@ (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) global.get $std/array-literal/staticArrayI8 call $~lib/array/Array#get:length i32.const 3 @@ -1954,17 +1935,11 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset block (result i32) - block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) - i32.const 3 - local.set $2 - i32.const 0 - local.set $3 - local.get $2 - local.get $3 - i32.const 2 - i32.const 0 - call $~lib/runtime/makeArray - end + i32.const 3 + i32.const 2 + i32.const 0 + i32.const 0 + call $~lib/runtime/makeArray local.set $0 local.get $0 i32.load offset=4 @@ -1977,9 +1952,9 @@ global.get $std/array-literal/i i32.const 1 i32.add - local.tee $3 + local.tee $2 global.set $std/array-literal/i - local.get $3 + local.get $2 end i32.store8 offset=1 local.get $1 @@ -1987,9 +1962,9 @@ global.get $std/array-literal/i i32.const 1 i32.add - local.tee $3 + local.tee $2 global.set $std/array-literal/i - local.get $3 + local.get $2 end i32.store8 offset=2 local.get $0 @@ -2053,17 +2028,11 @@ i32.const 0 global.set $std/array-literal/i block (result i32) - block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) - i32.const 3 - local.set $3 - i32.const 0 - local.set $2 - local.get $3 - local.get $2 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 3 + i32.const 4 + i32.const 2 + i32.const 0 + call $~lib/runtime/makeArray local.set $1 local.get $1 i32.load offset=4 @@ -2150,17 +2119,11 @@ unreachable end block (result i32) - block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) - i32.const 3 - local.set $2 - i32.const 0 - local.set $3 - local.get $2 - local.get $3 - i32.const 6 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 3 + i32.const 6 + i32.const 2 + i32.const 0 + call $~lib/runtime/makeArray local.set $0 local.get $0 i32.load offset=4 @@ -2169,33 +2132,33 @@ block (result i32) i32.const 0 call $std/array-literal/Ref#constructor - local.set $3 - local.get $3 + local.set $2 + local.get $2 local.get $0 call $~lib/collector/dummy/__ref_link - local.get $3 + local.get $2 end i32.store local.get $1 block (result i32) i32.const 0 call $std/array-literal/Ref#constructor - local.set $3 - local.get $3 + local.set $2 + local.get $2 local.get $0 call $~lib/collector/dummy/__ref_link - local.get $3 + local.get $2 end i32.store offset=4 local.get $1 block (result i32) i32.const 0 call $std/array-literal/Ref#constructor - local.set $3 - local.get $3 + local.set $2 + local.get $2 local.get $0 call $~lib/collector/dummy/__ref_link - local.get $3 + local.get $2 end i32.store offset=8 local.get $0 @@ -2215,17 +2178,11 @@ unreachable end block (result i32) - block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) - i32.const 3 - local.set $3 - i32.const 0 - local.set $2 - local.get $3 - local.get $2 - i32.const 8 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 3 + i32.const 8 + i32.const 2 + i32.const 0 + call $~lib/runtime/makeArray local.set $1 local.get $1 i32.load offset=4 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 77219d56d4..d24bd4a6d8 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -787,7 +787,7 @@ if i32.const 0 i32.const 24 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -802,7 +802,7 @@ if i32.const 0 i32.const 24 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -845,7 +845,7 @@ if i32.const 0 i32.const 24 - i32.const 244 + i32.const 234 i32.const 57 call $~lib/env/abort unreachable @@ -2071,39 +2071,39 @@ (local $5 i32) i32.const 16 call $~lib/runtime/allocate - local.get $2 + local.get $1 call $~lib/runtime/register local.set $4 local.get $0 - local.get $3 + local.get $2 i32.shl - local.tee $3 + local.tee $2 call $~lib/runtime/allocate i32.const 2 call $~lib/runtime/register local.tee $5 - local.tee $2 + local.tee $1 local.get $4 i32.load i32.ne drop local.get $4 - local.get $2 + local.get $1 i32.store local.get $4 local.get $5 i32.store offset=4 local.get $4 - local.get $3 + local.get $2 i32.store offset=8 local.get $4 local.get $0 i32.store offset=12 - local.get $1 + local.get $3 if local.get $5 - local.get $1 local.get $3 + local.get $2 call $~lib/memory/memory.copy end local.get $4 @@ -2396,7 +2396,7 @@ if i32.const 0 i32.const 24 - i32.const 125 + i32.const 115 i32.const 8 call $~lib/env/abort unreachable @@ -2540,9 +2540,9 @@ select local.tee $3 i32.add - i32.const 0 i32.const 4 i32.const 2 + i32.const 0 call $~lib/runtime/makeArray local.tee $4 i32.load offset=4 @@ -2969,9 +2969,9 @@ i32.gt_s select local.tee $2 - i32.const 0 i32.const 4 i32.const 2 + i32.const 0 call $~lib/runtime/makeArray local.tee $5 i32.load offset=4 @@ -3460,9 +3460,9 @@ local.get $0 i32.load offset=12 local.tee $3 - i32.const 0 i32.const 9 i32.const 2 + i32.const 0 call $~lib/runtime/makeArray local.tee $4 i32.load offset=4 @@ -3550,9 +3550,9 @@ local.get $0 i32.load offset=12 local.tee $4 - i32.const 0 i32.const 4 i32.const 2 + i32.const 0 call $~lib/runtime/makeArray i32.load offset=4 local.set $5 @@ -3624,9 +3624,9 @@ (local $4 i32) (local $5 i32) i32.const 0 - i32.const 0 i32.const 4 i32.const 2 + i32.const 0 call $~lib/runtime/makeArray local.set $4 local.get $0 @@ -5381,9 +5381,9 @@ unreachable end local.get $0 - i32.const 0 i32.const 4 i32.const 2 + i32.const 0 call $~lib/runtime/makeArray local.tee $0 i32.load offset=4 @@ -5572,9 +5572,9 @@ (func $~lib/array/Array.create> (; 99 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 512 - i32.const 0 i32.const 11 i32.const 2 + i32.const 0 call $~lib/runtime/makeArray local.tee $0 i32.load offset=4 @@ -5832,9 +5832,9 @@ (func $~lib/array/Array.create> (; 107 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 512 - i32.const 0 i32.const 12 i32.const 2 + i32.const 0 call $~lib/runtime/makeArray local.tee $0 i32.load offset=4 @@ -6123,9 +6123,9 @@ (func $~lib/array/Array.create (; 115 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 400 - i32.const 0 i32.const 15 i32.const 2 + i32.const 0 call $~lib/runtime/makeArray local.tee $0 i32.load offset=4 @@ -6385,7 +6385,7 @@ if i32.const 0 i32.const 24 - i32.const 185 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable @@ -6399,7 +6399,7 @@ if i32.const 0 i32.const 24 - i32.const 187 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -10094,9 +10094,9 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 248 i32.const 7 i32.const 0 + i32.const 248 call $~lib/runtime/makeArray call $std/array/isArraysEqual i32.eqz @@ -10115,9 +10115,9 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 320 i32.const 7 i32.const 0 + i32.const 320 call $~lib/runtime/makeArray call $std/array/isArraysEqual i32.eqz @@ -10136,9 +10136,9 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 344 i32.const 7 i32.const 0 + i32.const 344 call $~lib/runtime/makeArray call $std/array/isArraysEqual i32.eqz @@ -10157,9 +10157,9 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 368 i32.const 7 i32.const 0 + i32.const 368 call $~lib/runtime/makeArray call $std/array/isArraysEqual i32.eqz @@ -10178,9 +10178,9 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 392 i32.const 7 i32.const 0 + i32.const 392 call $~lib/runtime/makeArray call $std/array/isArraysEqual i32.eqz @@ -10199,9 +10199,9 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 488 i32.const 8 i32.const 2 + i32.const 488 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -10221,9 +10221,9 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 528 i32.const 8 i32.const 2 + i32.const 528 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -10243,9 +10243,9 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 568 i32.const 8 i32.const 2 + i32.const 568 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -10265,9 +10265,9 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 608 i32.const 8 i32.const 2 + i32.const 608 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -10287,9 +10287,9 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 648 i32.const 8 i32.const 2 + i32.const 648 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -10636,9 +10636,9 @@ end global.get $std/array/out i32.const 0 - i32.const 688 i32.const 4 i32.const 2 + i32.const 688 call $~lib/runtime/makeArray call $~lib/array/Array#concat drop @@ -10895,9 +10895,9 @@ unreachable end i32.const 5 - i32.const 752 i32.const 4 i32.const 2 + i32.const 752 call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10906,9 +10906,9 @@ i32.const 2147483647 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 792 i32.const 4 i32.const 2 + i32.const 792 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -10922,9 +10922,9 @@ unreachable end i32.const 5 - i32.const 832 i32.const 4 i32.const 2 + i32.const 832 call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10933,9 +10933,9 @@ i32.const 2147483647 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 872 i32.const 4 i32.const 2 + i32.const 872 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -10949,9 +10949,9 @@ unreachable end i32.const 5 - i32.const 912 i32.const 4 i32.const 2 + i32.const 912 call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10960,9 +10960,9 @@ i32.const 2147483647 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 952 i32.const 4 i32.const 2 + i32.const 952 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -10976,9 +10976,9 @@ unreachable end i32.const 5 - i32.const 992 i32.const 4 i32.const 2 + i32.const 992 call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10987,9 +10987,9 @@ i32.const 2147483647 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 1032 i32.const 4 i32.const 2 + i32.const 1032 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -11003,9 +11003,9 @@ unreachable end i32.const 5 - i32.const 1072 i32.const 4 i32.const 2 + i32.const 1072 call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -11014,9 +11014,9 @@ i32.const 4 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 1112 i32.const 4 i32.const 2 + i32.const 1112 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -11030,9 +11030,9 @@ unreachable end i32.const 5 - i32.const 1152 i32.const 4 i32.const 2 + i32.const 1152 call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -11041,9 +11041,9 @@ i32.const 4 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 1192 i32.const 4 i32.const 2 + i32.const 1192 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -11057,9 +11057,9 @@ unreachable end i32.const 5 - i32.const 1232 i32.const 4 i32.const 2 + i32.const 1232 call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -11068,9 +11068,9 @@ i32.const 4 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 1272 i32.const 4 i32.const 2 + i32.const 1272 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -11084,9 +11084,9 @@ unreachable end i32.const 5 - i32.const 1312 i32.const 4 i32.const 2 + i32.const 1312 call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -11095,9 +11095,9 @@ i32.const 2147483647 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 1352 i32.const 4 i32.const 2 + i32.const 1352 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -11111,9 +11111,9 @@ unreachable end i32.const 5 - i32.const 1392 i32.const 4 i32.const 2 + i32.const 1392 call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -11122,9 +11122,9 @@ i32.const -1 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 1432 i32.const 4 i32.const 2 + i32.const 1432 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -11138,9 +11138,9 @@ unreachable end i32.const 5 - i32.const 1472 i32.const 4 i32.const 2 + i32.const 1472 call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -11149,9 +11149,9 @@ i32.const -2 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 1512 i32.const 4 i32.const 2 + i32.const 1512 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -11165,9 +11165,9 @@ unreachable end i32.const 5 - i32.const 1552 i32.const 4 i32.const 2 + i32.const 1552 call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -11176,9 +11176,9 @@ i32.const -1 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 1592 i32.const 4 i32.const 2 + i32.const 1592 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -11192,9 +11192,9 @@ unreachable end i32.const 5 - i32.const 1632 i32.const 4 i32.const 2 + i32.const 1632 call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -11203,9 +11203,9 @@ i32.const 2147483647 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 1672 i32.const 4 i32.const 2 + i32.const 1672 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12031,9 +12031,9 @@ i32.const 2147483647 call $~lib/array/Array#splice i32.const 5 - i32.const 1784 i32.const 4 i32.const 2 + i32.const 1784 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12048,9 +12048,9 @@ end global.get $std/array/sarr i32.const 0 - i32.const 1824 i32.const 4 i32.const 2 + i32.const 1824 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12064,9 +12064,9 @@ unreachable end i32.const 5 - i32.const 1840 i32.const 4 i32.const 2 + i32.const 1840 call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr @@ -12074,9 +12074,9 @@ i32.const 2147483647 call $~lib/array/Array#splice i32.const 3 - i32.const 1880 i32.const 4 i32.const 2 + i32.const 1880 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12091,9 +12091,9 @@ end global.get $std/array/sarr i32.const 2 - i32.const 1912 i32.const 4 i32.const 2 + i32.const 1912 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12107,9 +12107,9 @@ unreachable end i32.const 5 - i32.const 1936 i32.const 4 i32.const 2 + i32.const 1936 call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr @@ -12117,9 +12117,9 @@ i32.const 2 call $~lib/array/Array#splice i32.const 2 - i32.const 1976 i32.const 4 i32.const 2 + i32.const 1976 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12134,9 +12134,9 @@ end global.get $std/array/sarr i32.const 3 - i32.const 2000 i32.const 4 i32.const 2 + i32.const 2000 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12150,9 +12150,9 @@ unreachable end i32.const 5 - i32.const 2032 i32.const 4 i32.const 2 + i32.const 2032 call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr @@ -12160,9 +12160,9 @@ i32.const 1 call $~lib/array/Array#splice i32.const 1 - i32.const 2072 i32.const 4 i32.const 2 + i32.const 2072 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12177,9 +12177,9 @@ end global.get $std/array/sarr i32.const 4 - i32.const 2096 i32.const 4 i32.const 2 + i32.const 2096 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12193,9 +12193,9 @@ unreachable end i32.const 5 - i32.const 2128 i32.const 4 i32.const 2 + i32.const 2128 call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr @@ -12203,9 +12203,9 @@ i32.const 2147483647 call $~lib/array/Array#splice i32.const 1 - i32.const 2168 i32.const 4 i32.const 2 + i32.const 2168 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12220,9 +12220,9 @@ end global.get $std/array/sarr i32.const 4 - i32.const 2192 i32.const 4 i32.const 2 + i32.const 2192 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12236,9 +12236,9 @@ unreachable end i32.const 5 - i32.const 2224 i32.const 4 i32.const 2 + i32.const 2224 call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr @@ -12246,9 +12246,9 @@ i32.const 2147483647 call $~lib/array/Array#splice i32.const 2 - i32.const 2264 i32.const 4 i32.const 2 + i32.const 2264 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12263,9 +12263,9 @@ end global.get $std/array/sarr i32.const 3 - i32.const 2288 i32.const 4 i32.const 2 + i32.const 2288 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12279,9 +12279,9 @@ unreachable end i32.const 5 - i32.const 2320 i32.const 4 i32.const 2 + i32.const 2320 call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr @@ -12289,9 +12289,9 @@ i32.const 1 call $~lib/array/Array#splice i32.const 1 - i32.const 2360 i32.const 4 i32.const 2 + i32.const 2360 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12306,9 +12306,9 @@ end global.get $std/array/sarr i32.const 4 - i32.const 2384 i32.const 4 i32.const 2 + i32.const 2384 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12322,9 +12322,9 @@ unreachable end i32.const 5 - i32.const 2416 i32.const 4 i32.const 2 + i32.const 2416 call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr @@ -12332,9 +12332,9 @@ i32.const 1 call $~lib/array/Array#splice i32.const 1 - i32.const 2456 i32.const 4 i32.const 2 + i32.const 2456 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12349,9 +12349,9 @@ end global.get $std/array/sarr i32.const 4 - i32.const 2480 i32.const 4 i32.const 2 + i32.const 2480 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12365,9 +12365,9 @@ unreachable end i32.const 5 - i32.const 2512 i32.const 4 i32.const 2 + i32.const 2512 call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr @@ -12375,9 +12375,9 @@ i32.const -1 call $~lib/array/Array#splice i32.const 0 - i32.const 2552 i32.const 4 i32.const 2 + i32.const 2552 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12392,9 +12392,9 @@ end global.get $std/array/sarr i32.const 5 - i32.const 2568 i32.const 4 i32.const 2 + i32.const 2568 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12408,9 +12408,9 @@ unreachable end i32.const 5 - i32.const 2608 i32.const 4 i32.const 2 + i32.const 2608 call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr @@ -12418,9 +12418,9 @@ i32.const -2 call $~lib/array/Array#splice i32.const 0 - i32.const 2648 i32.const 4 i32.const 2 + i32.const 2648 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12435,9 +12435,9 @@ end global.get $std/array/sarr i32.const 5 - i32.const 2664 i32.const 4 i32.const 2 + i32.const 2664 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12451,9 +12451,9 @@ unreachable end i32.const 5 - i32.const 2704 i32.const 4 i32.const 2 + i32.const 2704 call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr @@ -12461,9 +12461,9 @@ i32.const 0 call $~lib/array/Array#splice i32.const 0 - i32.const 2744 i32.const 4 i32.const 2 + i32.const 2744 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12478,9 +12478,9 @@ end global.get $std/array/sarr i32.const 5 - i32.const 2760 i32.const 4 i32.const 2 + i32.const 2760 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12494,9 +12494,9 @@ unreachable end i32.const 5 - i32.const 2800 i32.const 4 i32.const 2 + i32.const 2800 call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr @@ -12504,9 +12504,9 @@ i32.const 0 call $~lib/array/Array#splice i32.const 0 - i32.const 2840 i32.const 4 i32.const 2 + i32.const 2840 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12521,9 +12521,9 @@ end global.get $std/array/sarr i32.const 5 - i32.const 2856 i32.const 4 i32.const 2 + i32.const 2856 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12537,9 +12537,9 @@ unreachable end i32.const 5 - i32.const 2896 i32.const 4 i32.const 2 + i32.const 2896 call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr @@ -12547,9 +12547,9 @@ i32.const 5 call $~lib/array/Array#splice i32.const 0 - i32.const 2936 i32.const 4 i32.const 2 + i32.const 2936 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -12564,9 +12564,9 @@ end global.get $std/array/sarr i32.const 5 - i32.const 2952 i32.const 4 i32.const 2 + i32.const 2952 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -13668,9 +13668,9 @@ call $~lib/array/Array#sort global.get $std/array/f32ArrayTyped i32.const 8 - i32.const 3304 i32.const 9 i32.const 2 + i32.const 3304 call $~lib/runtime/makeArray call $std/array/isArraysEqual i32.eqz @@ -13704,9 +13704,9 @@ call $~lib/array/Array#sort global.get $std/array/f64ArrayTyped i32.const 8 - i32.const 3464 i32.const 10 i32.const 3 + i32.const 3464 call $~lib/runtime/makeArray call $std/array/isArraysEqual i32.eqz @@ -13741,9 +13741,9 @@ drop global.get $std/array/i32ArrayTyped i32.const 5 - i32.const 3616 i32.const 4 i32.const 2 + i32.const 3616 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -13779,9 +13779,9 @@ drop global.get $std/array/u32ArrayTyped i32.const 5 - i32.const 3728 i32.const 8 i32.const 2 + i32.const 3728 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -13815,9 +13815,9 @@ call $std/array/assertSortedDefault global.get $std/array/reversed1 i32.const 1 - i32.const 4056 i32.const 4 i32.const 2 + i32.const 4056 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -13834,9 +13834,9 @@ call $std/array/assertSortedDefault global.get $std/array/reversed2 i32.const 2 - i32.const 4080 i32.const 4 i32.const 2 + i32.const 4080 call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual @@ -13995,9 +13995,9 @@ local.get $0 call $std/array/assertSorted> i32.const 2 - i32.const 4552 i32.const 16 i32.const 0 + i32.const 4552 call $~lib/runtime/makeArray call $~lib/array/Array#join_bool i32.const 4576 @@ -14012,9 +14012,9 @@ unreachable end i32.const 3 - i32.const 5120 i32.const 4 i32.const 2 + i32.const 5120 call $~lib/runtime/makeArray i32.const 4200 call $~lib/array/Array#join @@ -14030,9 +14030,9 @@ unreachable end i32.const 3 - i32.const 5240 i32.const 8 i32.const 2 + i32.const 5240 call $~lib/runtime/makeArray i32.const 5216 call $~lib/array/Array#join @@ -14048,9 +14048,9 @@ unreachable end i32.const 2 - i32.const 5320 i32.const 4 i32.const 2 + i32.const 5320 call $~lib/runtime/makeArray i32.const 5296 call $~lib/array/Array#join @@ -14066,9 +14066,9 @@ unreachable end i32.const 6 - i32.const 6672 i32.const 10 i32.const 3 + i32.const 6672 call $~lib/runtime/makeArray call $~lib/array/Array#join_flt i32.const 6736 @@ -14083,9 +14083,9 @@ unreachable end i32.const 3 - i32.const 6888 i32.const 15 i32.const 2 + i32.const 6888 call $~lib/runtime/makeArray i32.const 4200 call $~lib/array/Array#join @@ -14101,19 +14101,19 @@ unreachable end i32.const 3 - i32.const 0 i32.const 20 i32.const 2 + i32.const 0 call $~lib/runtime/makeArray local.tee $0 i32.load offset=4 - local.tee $1 + local.tee $2 call $std/array/Ref#constructor i32.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=4 - local.get $1 + local.get $2 call $std/array/Ref#constructor i32.store offset=8 local.get $0 @@ -14184,9 +14184,9 @@ unreachable end i32.const 3 - i32.const 7128 i32.const 21 i32.const 0 + i32.const 7128 call $~lib/runtime/makeArray call $~lib/array/Array#join_int i32.const 7152 @@ -14201,9 +14201,9 @@ unreachable end i32.const 3 - i32.const 7208 i32.const 22 i32.const 1 + i32.const 7208 call $~lib/runtime/makeArray call $~lib/array/Array#join_int i32.const 7232 @@ -14218,9 +14218,9 @@ unreachable end i32.const 3 - i32.const 7312 i32.const 17 i32.const 3 + i32.const 7312 call $~lib/runtime/makeArray call $~lib/array/Array#join_int i32.const 7352 @@ -14235,9 +14235,9 @@ unreachable end i32.const 4 - i32.const 7464 i32.const 23 i32.const 3 + i32.const 7464 call $~lib/runtime/makeArray call $~lib/array/Array#join_int i32.const 7512 @@ -14265,9 +14265,9 @@ unreachable end i32.const 4 - i32.const 7744 i32.const 15 i32.const 2 + i32.const 7744 call $~lib/runtime/makeArray call $~lib/array/Array#toString i32.const 7776 @@ -14282,27 +14282,27 @@ unreachable end i32.const 2 - i32.const 0 i32.const 11 i32.const 2 + i32.const 0 call $~lib/runtime/makeArray - local.tee $0 + local.tee $2 i32.load offset=4 - local.tee $1 + local.tee $0 i32.const 2 - i32.const 7832 i32.const 4 i32.const 2 + i32.const 7832 call $~lib/runtime/makeArray i32.store - local.get $1 + local.get $0 i32.const 2 - i32.const 7856 i32.const 4 i32.const 2 + i32.const 7856 call $~lib/runtime/makeArray i32.store offset=4 - local.get $0 + local.get $2 global.set $std/array/subarr32 global.get $std/array/subarr32 call $~lib/array/Array>#join_arr @@ -14318,24 +14318,24 @@ unreachable end i32.const 2 - i32.const 0 i32.const 24 i32.const 2 + i32.const 0 call $~lib/runtime/makeArray local.tee $0 i32.load offset=4 - local.tee $1 + local.tee $2 i32.const 2 - i32.const 7936 i32.const 7 i32.const 0 + i32.const 7936 call $~lib/runtime/makeArray i32.store - local.get $1 + local.get $2 i32.const 2 - i32.const 7960 i32.const 7 i32.const 0 + i32.const 7960 call $~lib/runtime/makeArray i32.store offset=4 local.get $0 @@ -14354,30 +14354,30 @@ unreachable end i32.const 1 - i32.const 0 i32.const 26 i32.const 2 + i32.const 0 call $~lib/runtime/makeArray - local.tee $1 + local.tee $0 i32.load offset=4 - local.set $0 + local.set $2 i32.const 1 - i32.const 0 i32.const 25 i32.const 2 + i32.const 0 call $~lib/runtime/makeArray - local.tee $2 + local.tee $1 i32.load offset=4 i32.const 1 - i32.const 8056 i32.const 8 i32.const 2 + i32.const 8056 call $~lib/runtime/makeArray i32.store - local.get $0 local.get $2 - i32.store local.get $1 + i32.store + local.get $0 global.set $std/array/subarrU32 global.get $std/array/subarrU32 call $~lib/array/Array>>#join_arr diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index bdfc3fb568..e917b4f7a5 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -685,7 +685,7 @@ if i32.const 0 i32.const 24 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -702,7 +702,7 @@ if i32.const 0 i32.const 24 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -766,7 +766,7 @@ if i32.const 0 i32.const 24 - i32.const 244 + i32.const 234 i32.const 57 call $~lib/env/abort unreachable @@ -782,18 +782,10 @@ local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - i32.const 12 - local.set $4 - local.get $4 - call $~lib/runtime/allocate - end - local.set $4 - local.get $4 - i32.const 3 - call $~lib/runtime/register - end + i32.const 12 + call $~lib/runtime/allocate + i32.const 3 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -838,19 +830,12 @@ local.get $0 ) (func $~lib/array/Array#constructor (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 if (result i32) local.get $0 else - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) - i32.const 16 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 16 + call $~lib/runtime/allocate i32.const 4 call $~lib/runtime/register end @@ -887,22 +872,13 @@ end ) (func $std/array/P#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER

|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.3 (result i32) - i32.const 0 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 5 - call $~lib/runtime/register - end + i32.const 0 + call $~lib/runtime/allocate + i32.const 5 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -918,19 +894,12 @@ end ) (func $~lib/typedarray/Uint8Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 if (result i32) local.get $0 else - block $~lib/runtime/ALLOCATE|inlined.4 (result i32) - i32.const 12 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 12 + call $~lib/runtime/allocate i32.const 6 call $~lib/runtime/register end @@ -2487,15 +2456,15 @@ (local $9 i32) i32.const 16 call $~lib/runtime/allocate - local.get $2 + local.get $1 call $~lib/runtime/register local.set $4 local.get $0 - local.get $3 + local.get $2 i32.shl local.set $5 local.get $0 - local.get $3 + local.get $2 i32.shl call $~lib/runtime/allocate i32.const 2 @@ -2533,10 +2502,10 @@ local.get $4 local.get $0 i32.store offset=12 - local.get $1 + local.get $3 if local.get $6 - local.get $1 + local.get $3 local.get $5 call $~lib/memory/memory.copy end @@ -2898,7 +2867,7 @@ if i32.const 0 i32.const 24 - i32.const 125 + i32.const 115 i32.const 8 call $~lib/env/abort unreachable @@ -3126,9 +3095,9 @@ i32.const 0 local.set $4 local.get $5 - local.get $4 i32.const 4 i32.const 2 + local.get $4 call $~lib/runtime/makeArray end local.set $6 @@ -3672,15 +3641,15 @@ i32.gt_s select local.set $2 - block $~lib/runtime/MAKEARRAY|inlined.26 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) local.get $2 local.set $5 i32.const 0 local.set $4 local.get $5 - local.get $4 i32.const 4 i32.const 2 + local.get $4 call $~lib/runtime/makeArray end local.set $6 @@ -4264,9 +4233,9 @@ i32.const 0 local.set $3 local.get $4 - local.get $3 i32.const 9 i32.const 2 + local.get $3 call $~lib/runtime/makeArray end local.set $5 @@ -4379,15 +4348,15 @@ local.get $0 i32.load offset=12 local.set $2 - block $~lib/runtime/MAKEARRAY|inlined.65 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) local.get $2 local.set $4 i32.const 0 local.set $3 local.get $4 - local.get $3 i32.const 4 i32.const 2 + local.get $3 call $~lib/runtime/makeArray end local.set $5 @@ -4475,15 +4444,15 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/runtime/MAKEARRAY|inlined.66 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.3 (result i32) i32.const 0 local.set $3 i32.const 0 local.set $2 local.get $3 - local.get $2 i32.const 4 i32.const 2 + local.get $2 call $~lib/runtime/makeArray end local.set $4 @@ -7273,15 +7242,15 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.68 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.4 (result i32) local.get $0 local.set $2 i32.const 0 local.set $1 local.get $2 - local.get $1 i32.const 4 i32.const 2 + local.get $1 call $~lib/runtime/makeArray end local.set $3 @@ -7541,9 +7510,9 @@ i32.const 0 local.set $1 local.get $2 - local.get $1 i32.const 11 i32.const 2 + local.get $1 call $~lib/runtime/makeArray end local.set $3 @@ -7982,9 +7951,9 @@ i32.const 0 local.set $1 local.get $2 - local.get $1 i32.const 12 i32.const 2 + local.get $1 call $~lib/runtime/makeArray end local.set $3 @@ -8000,22 +7969,13 @@ local.get $3 ) (func $std/array/Proxy#constructor (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.5 (result i32) - i32.const 4 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 - i32.const 13 - call $~lib/runtime/register - end + i32.const 4 + call $~lib/runtime/allocate + i32.const 13 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -8963,9 +8923,9 @@ i32.const 0 local.set $1 local.get $2 - local.get $1 i32.const 15 i32.const 2 + local.get $1 call $~lib/runtime/makeArray end local.set $3 @@ -9003,7 +8963,7 @@ i32.const 4200 return end - block $~lib/runtime/ALLOCATE|inlined.6 (result i32) + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) i32.const 2 local.set $2 local.get $2 @@ -9060,7 +9020,7 @@ i32.const 4200 return end - block $~lib/runtime/ALLOCATE|inlined.7 (result i32) + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) local.get $4 local.set $5 local.get $5 @@ -9718,7 +9678,7 @@ local.get $0 return end - block $~lib/runtime/ALLOCATE|inlined.9 (result i32) + block $~lib/runtime/ALLOCATE|inlined.4 (result i32) local.get $3 local.set $4 local.get $4 @@ -9748,7 +9708,7 @@ if i32.const 0 i32.const 24 - i32.const 185 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable @@ -9765,7 +9725,7 @@ if i32.const 0 i32.const 24 - i32.const 187 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -9824,7 +9784,7 @@ local.get $5 i32.add local.set $6 - block $~lib/runtime/ALLOCATE|inlined.8 (result i32) + block $~lib/runtime/ALLOCATE|inlined.3 (result i32) local.get $6 i32.const 1 i32.shl @@ -10207,7 +10167,7 @@ local.get $1 i32.add local.set $2 - block $~lib/runtime/ALLOCATE|inlined.10 (result i32) + block $~lib/runtime/ALLOCATE|inlined.5 (result i32) local.get $2 i32.const 1 i32.shl @@ -10350,7 +10310,7 @@ i32.const 11 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.11 (result i32) + block $~lib/runtime/ALLOCATE|inlined.6 (result i32) local.get $5 i32.const 1 i32.shl @@ -10473,7 +10433,7 @@ local.get $0 call $~lib/util/number/decimalCount32 local.set $1 - block $~lib/runtime/ALLOCATE|inlined.12 (result i32) + block $~lib/runtime/ALLOCATE|inlined.7 (result i32) local.get $1 i32.const 1 i32.shl @@ -10590,7 +10550,7 @@ i32.const 10 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.13 (result i32) + block $~lib/runtime/ALLOCATE|inlined.8 (result i32) local.get $5 i32.const 1 i32.shl @@ -12095,7 +12055,7 @@ select return end - block $~lib/runtime/ALLOCATE|inlined.14 (result i32) + block $~lib/runtime/ALLOCATE|inlined.9 (result i32) i32.const 28 i32.const 1 i32.shl @@ -12239,7 +12199,7 @@ i32.const 28 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.15 (result i32) + block $~lib/runtime/ALLOCATE|inlined.10 (result i32) local.get $5 i32.const 1 i32.shl @@ -12429,7 +12389,7 @@ end i32.const 0 local.set $9 - block $~lib/runtime/ALLOCATE|inlined.16 (result i32) + block $~lib/runtime/ALLOCATE|inlined.11 (result i32) local.get $5 local.get $4 local.get $2 @@ -12546,22 +12506,13 @@ return ) (func $std/array/Ref#constructor (; 238 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.17 (result i32) - i32.const 0 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 19 - call $~lib/runtime/register - end + i32.const 0 + call $~lib/runtime/allocate + i32.const 19 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -12608,7 +12559,7 @@ i32.const 15 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.18 (result i32) + block $~lib/runtime/ALLOCATE|inlined.12 (result i32) local.get $5 i32.const 1 i32.shl @@ -12867,7 +12818,7 @@ i32.const 11 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.19 (result i32) + block $~lib/runtime/ALLOCATE|inlined.13 (result i32) local.get $5 i32.const 1 i32.shl @@ -13076,7 +13027,7 @@ i32.const 10 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.20 (result i32) + block $~lib/runtime/ALLOCATE|inlined.14 (result i32) local.get $5 i32.const 1 i32.shl @@ -13411,7 +13362,7 @@ local.get $2 call $~lib/util/number/decimalCount32 local.set $3 - block $~lib/runtime/ALLOCATE|inlined.21 (result i32) + block $~lib/runtime/ALLOCATE|inlined.15 (result i32) local.get $3 i32.const 1 i32.shl @@ -13436,7 +13387,7 @@ local.get $0 call $~lib/util/number/decimalCount64 local.set $3 - block $~lib/runtime/ALLOCATE|inlined.22 (result i32) + block $~lib/runtime/ALLOCATE|inlined.16 (result i32) local.get $3 i32.const 1 i32.shl @@ -13581,7 +13532,7 @@ i32.const 20 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.23 (result i32) + block $~lib/runtime/ALLOCATE|inlined.17 (result i32) local.get $5 i32.const 1 i32.shl @@ -13733,7 +13684,7 @@ local.get $1 i32.add local.set $4 - block $~lib/runtime/ALLOCATE|inlined.24 (result i32) + block $~lib/runtime/ALLOCATE|inlined.18 (result i32) local.get $4 i32.const 1 i32.shl @@ -13760,7 +13711,7 @@ local.get $1 i32.add local.set $4 - block $~lib/runtime/ALLOCATE|inlined.25 (result i32) + block $~lib/runtime/ALLOCATE|inlined.19 (result i32) local.get $4 i32.const 1 i32.shl @@ -13933,7 +13884,7 @@ i32.const 21 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.26 (result i32) + block $~lib/runtime/ALLOCATE|inlined.20 (result i32) local.get $5 i32.const 1 i32.shl @@ -14128,7 +14079,7 @@ end i32.const 0 local.set $9 - block $~lib/runtime/ALLOCATE|inlined.27 (result i32) + block $~lib/runtime/ALLOCATE|inlined.21 (result i32) local.get $5 local.get $4 local.get $2 @@ -14465,7 +14416,7 @@ i32.const 10 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.28 (result i32) + block $~lib/runtime/ALLOCATE|inlined.22 (result i32) local.get $5 i32.const 1 i32.shl @@ -14919,7 +14870,6 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -15022,17 +14972,11 @@ call $~lib/array/Array#fill drop global.get $std/array/arr8 - block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) - i32.const 5 - local.set $0 - i32.const 248 - local.set $1 - local.get $0 - local.get $1 - i32.const 7 - i32.const 0 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 7 + i32.const 0 + i32.const 248 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15051,17 +14995,11 @@ call $~lib/array/Array#fill drop global.get $std/array/arr8 - block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) - i32.const 5 - local.set $1 - i32.const 320 - local.set $0 - local.get $1 - local.get $0 - i32.const 7 - i32.const 0 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 7 + i32.const 0 + i32.const 320 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15080,17 +15018,11 @@ call $~lib/array/Array#fill drop global.get $std/array/arr8 - block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) - i32.const 5 - local.set $0 - i32.const 344 - local.set $1 - local.get $0 - local.get $1 - i32.const 7 - i32.const 0 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 7 + i32.const 0 + i32.const 344 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15109,17 +15041,11 @@ call $~lib/array/Array#fill drop global.get $std/array/arr8 - block $~lib/runtime/MAKEARRAY|inlined.3 (result i32) - i32.const 5 - local.set $1 - i32.const 368 - local.set $0 - local.get $1 - local.get $0 - i32.const 7 - i32.const 0 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 7 + i32.const 0 + i32.const 368 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15138,17 +15064,11 @@ call $~lib/array/Array#fill drop global.get $std/array/arr8 - block $~lib/runtime/MAKEARRAY|inlined.4 (result i32) - i32.const 5 - local.set $0 - i32.const 392 - local.set $1 - local.get $0 - local.get $1 - i32.const 7 - i32.const 0 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 7 + i32.const 0 + i32.const 392 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15167,17 +15087,11 @@ call $~lib/array/Array#fill drop global.get $std/array/arr32 - block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) - i32.const 5 - local.set $1 - i32.const 488 - local.set $0 - local.get $1 - local.get $0 - i32.const 8 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 8 + i32.const 2 + i32.const 488 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15196,17 +15110,11 @@ call $~lib/array/Array#fill drop global.get $std/array/arr32 - block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) - i32.const 5 - local.set $0 - i32.const 528 - local.set $1 - local.get $0 - local.get $1 - i32.const 8 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 8 + i32.const 2 + i32.const 528 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15225,17 +15133,11 @@ call $~lib/array/Array#fill drop global.get $std/array/arr32 - block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) - i32.const 5 - local.set $1 - i32.const 568 - local.set $0 - local.get $1 - local.get $0 - i32.const 8 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 8 + i32.const 2 + i32.const 568 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15254,17 +15156,11 @@ call $~lib/array/Array#fill drop global.get $std/array/arr32 - block $~lib/runtime/MAKEARRAY|inlined.3 (result i32) - i32.const 5 - local.set $0 - i32.const 608 - local.set $1 - local.get $0 - local.get $1 - i32.const 8 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 8 + i32.const 2 + i32.const 608 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15283,17 +15179,11 @@ call $~lib/array/Array#fill drop global.get $std/array/arr32 - block $~lib/runtime/MAKEARRAY|inlined.4 (result i32) - i32.const 5 - local.set $1 - i32.const 648 - local.set $0 - local.get $1 - local.get $0 - i32.const 8 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 8 + i32.const 2 + i32.const 648 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15638,18 +15528,12 @@ unreachable end global.get $std/array/out - block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) - i32.const 0 - local.set $0 - i32.const 688 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end - call $~lib/array/Array#concat + i32.const 0 + i32.const 4 + i32.const 2 + i32.const 688 + call $~lib/runtime/makeArray + call $~lib/array/Array#concat drop global.get $std/array/arr call $std/array/internalCapacity @@ -15917,34 +15801,22 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) - i32.const 5 - local.set $1 - i32.const 752 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 752 + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const 3 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin - block $~lib/runtime/MAKEARRAY|inlined.3 (result i32) - i32.const 5 - local.set $0 - i32.const 792 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 792 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15956,34 +15828,22 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.4 (result i32) - i32.const 5 - local.set $1 - i32.const 832 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 832 + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 3 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin - block $~lib/runtime/MAKEARRAY|inlined.5 (result i32) - i32.const 5 - local.set $0 - i32.const 872 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 872 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15995,34 +15855,22 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.6 (result i32) - i32.const 5 - local.set $1 - i32.const 912 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 912 + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 2 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin - block $~lib/runtime/MAKEARRAY|inlined.7 (result i32) - i32.const 5 - local.set $0 - i32.const 952 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 952 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16034,34 +15882,22 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.8 (result i32) - i32.const 5 - local.set $1 - i32.const 992 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 992 + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 2 i32.const 2 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin - block $~lib/runtime/MAKEARRAY|inlined.9 (result i32) - i32.const 5 - local.set $0 - i32.const 1032 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1032 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16073,34 +15909,22 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.10 (result i32) - i32.const 5 - local.set $1 - i32.const 1072 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1072 + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - block $~lib/runtime/MAKEARRAY|inlined.11 (result i32) - i32.const 5 - local.set $0 - i32.const 1112 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1112 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16112,34 +15936,22 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.12 (result i32) - i32.const 5 - local.set $1 - i32.const 1152 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1152 + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - block $~lib/runtime/MAKEARRAY|inlined.13 (result i32) - i32.const 5 - local.set $0 - i32.const 1192 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1192 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16151,34 +15963,22 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.14 (result i32) - i32.const 5 - local.set $1 - i32.const 1232 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1232 + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - block $~lib/runtime/MAKEARRAY|inlined.15 (result i32) - i32.const 5 - local.set $0 - i32.const 1272 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1272 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16190,34 +15990,22 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.16 (result i32) - i32.const 5 - local.set $1 - i32.const 1312 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1312 + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const -2 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin - block $~lib/runtime/MAKEARRAY|inlined.17 (result i32) - i32.const 5 - local.set $0 - i32.const 1352 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1352 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16229,34 +16017,22 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.18 (result i32) - i32.const 5 - local.set $1 - i32.const 1392 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1392 + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - block $~lib/runtime/MAKEARRAY|inlined.19 (result i32) - i32.const 5 - local.set $0 - i32.const 1432 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1432 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16268,34 +16044,22 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.20 (result i32) - i32.const 5 - local.set $1 - i32.const 1472 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1472 + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - block $~lib/runtime/MAKEARRAY|inlined.21 (result i32) - i32.const 5 - local.set $0 - i32.const 1512 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1512 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16307,34 +16071,22 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.22 (result i32) - i32.const 5 - local.set $1 - i32.const 1552 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1552 + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - block $~lib/runtime/MAKEARRAY|inlined.23 (result i32) - i32.const 5 - local.set $0 - i32.const 1592 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1592 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16346,34 +16098,22 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.24 (result i32) - i32.const 5 - local.set $1 - i32.const 1632 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1632 + call $~lib/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin - block $~lib/runtime/MAKEARRAY|inlined.25 (result i32) - i32.const 5 - local.set $0 - i32.const 1672 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1672 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17233,17 +16973,11 @@ i32.const 0 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#splice - block $~lib/runtime/MAKEARRAY|inlined.27 (result i32) - i32.const 5 - local.set $1 - i32.const 1784 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1784 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17256,17 +16990,11 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/MAKEARRAY|inlined.28 (result i32) - i32.const 0 - local.set $0 - i32.const 1824 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 0 + i32.const 4 + i32.const 2 + i32.const 1824 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17278,33 +17006,21 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.29 (result i32) - i32.const 5 - local.set $1 - i32.const 1840 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1840 + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#splice - block $~lib/runtime/MAKEARRAY|inlined.30 (result i32) - i32.const 3 - local.set $0 - i32.const 1880 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 3 + i32.const 4 + i32.const 2 + i32.const 1880 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17317,17 +17033,11 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/MAKEARRAY|inlined.31 (result i32) - i32.const 2 - local.set $1 - i32.const 1912 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 2 + i32.const 4 + i32.const 2 + i32.const 1912 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17339,33 +17049,21 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.32 (result i32) - i32.const 5 - local.set $0 - i32.const 1936 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 1936 + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 i32.const 2 call $~lib/array/Array#splice - block $~lib/runtime/MAKEARRAY|inlined.33 (result i32) - i32.const 2 - local.set $1 - i32.const 1976 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 2 + i32.const 4 + i32.const 2 + i32.const 1976 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17378,17 +17076,11 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/MAKEARRAY|inlined.34 (result i32) - i32.const 3 - local.set $0 - i32.const 2000 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 3 + i32.const 4 + i32.const 2 + i32.const 2000 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17400,33 +17092,21 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.35 (result i32) - i32.const 5 - local.set $1 - i32.const 2032 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 2032 + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 0 i32.const 1 call $~lib/array/Array#splice - block $~lib/runtime/MAKEARRAY|inlined.36 (result i32) - i32.const 1 - local.set $0 - i32.const 2072 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 1 + i32.const 4 + i32.const 2 + i32.const 2072 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17439,17 +17119,11 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/MAKEARRAY|inlined.37 (result i32) - i32.const 4 - local.set $1 - i32.const 2096 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 4 + i32.const 4 + i32.const 2 + i32.const 2096 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17461,33 +17135,21 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.38 (result i32) - i32.const 5 - local.set $0 - i32.const 2128 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 2128 + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -1 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#splice - block $~lib/runtime/MAKEARRAY|inlined.39 (result i32) - i32.const 1 - local.set $1 - i32.const 2168 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 1 + i32.const 4 + i32.const 2 + i32.const 2168 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17500,17 +17162,11 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/MAKEARRAY|inlined.40 (result i32) - i32.const 4 - local.set $0 - i32.const 2192 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 4 + i32.const 4 + i32.const 2 + i32.const 2192 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17522,33 +17178,21 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.41 (result i32) - i32.const 5 - local.set $1 - i32.const 2224 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 2224 + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#splice - block $~lib/runtime/MAKEARRAY|inlined.42 (result i32) - i32.const 2 - local.set $0 - i32.const 2264 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 2 + i32.const 4 + i32.const 2 + i32.const 2264 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17561,17 +17205,11 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/MAKEARRAY|inlined.43 (result i32) - i32.const 3 - local.set $1 - i32.const 2288 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 3 + i32.const 4 + i32.const 2 + i32.const 2288 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17583,33 +17221,21 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.44 (result i32) - i32.const 5 - local.set $0 - i32.const 2320 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 2320 + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const 1 call $~lib/array/Array#splice - block $~lib/runtime/MAKEARRAY|inlined.45 (result i32) - i32.const 1 - local.set $1 - i32.const 2360 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 1 + i32.const 4 + i32.const 2 + i32.const 2360 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17622,17 +17248,11 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/MAKEARRAY|inlined.46 (result i32) - i32.const 4 - local.set $0 - i32.const 2384 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 4 + i32.const 4 + i32.const 2 + i32.const 2384 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17644,33 +17264,21 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.47 (result i32) - i32.const 5 - local.set $1 - i32.const 2416 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 2416 + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -7 i32.const 1 call $~lib/array/Array#splice - block $~lib/runtime/MAKEARRAY|inlined.48 (result i32) - i32.const 1 - local.set $0 - i32.const 2456 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 1 + i32.const 4 + i32.const 2 + i32.const 2456 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17683,17 +17291,11 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/MAKEARRAY|inlined.49 (result i32) - i32.const 4 - local.set $1 - i32.const 2480 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 4 + i32.const 4 + i32.const 2 + i32.const 2480 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17705,33 +17307,21 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.50 (result i32) - i32.const 5 - local.set $0 - i32.const 2512 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 2512 + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const -1 call $~lib/array/Array#splice - block $~lib/runtime/MAKEARRAY|inlined.51 (result i32) - i32.const 0 - local.set $1 - i32.const 2552 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 0 + i32.const 4 + i32.const 2 + i32.const 2552 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17744,17 +17334,11 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/MAKEARRAY|inlined.52 (result i32) - i32.const 5 - local.set $0 - i32.const 2568 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 2568 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17766,33 +17350,21 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.53 (result i32) - i32.const 5 - local.set $1 - i32.const 2608 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 2608 + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 1 i32.const -2 call $~lib/array/Array#splice - block $~lib/runtime/MAKEARRAY|inlined.54 (result i32) - i32.const 0 - local.set $0 - i32.const 2648 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 0 + i32.const 4 + i32.const 2 + i32.const 2648 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17805,17 +17377,11 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/MAKEARRAY|inlined.55 (result i32) - i32.const 5 - local.set $1 - i32.const 2664 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 2664 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17827,33 +17393,21 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.56 (result i32) - i32.const 5 - local.set $0 - i32.const 2704 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 2704 + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 4 i32.const 0 call $~lib/array/Array#splice - block $~lib/runtime/MAKEARRAY|inlined.57 (result i32) - i32.const 0 - local.set $1 - i32.const 2744 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 0 + i32.const 4 + i32.const 2 + i32.const 2744 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17866,17 +17420,11 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/MAKEARRAY|inlined.58 (result i32) - i32.const 5 - local.set $0 - i32.const 2760 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 2760 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17888,33 +17436,21 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.59 (result i32) - i32.const 5 - local.set $1 - i32.const 2800 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 2800 + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 0 call $~lib/array/Array#splice - block $~lib/runtime/MAKEARRAY|inlined.60 (result i32) - i32.const 0 - local.set $0 - i32.const 2840 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 0 + i32.const 4 + i32.const 2 + i32.const 2840 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17927,17 +17463,11 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/MAKEARRAY|inlined.61 (result i32) - i32.const 5 - local.set $1 - i32.const 2856 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 2856 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17949,33 +17479,21 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.62 (result i32) - i32.const 5 - local.set $0 - i32.const 2896 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 2896 + call $~lib/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 5 call $~lib/array/Array#splice - block $~lib/runtime/MAKEARRAY|inlined.63 (result i32) - i32.const 0 - local.set $1 - i32.const 2936 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 0 + i32.const 4 + i32.const 2 + i32.const 2936 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17988,17 +17506,11 @@ unreachable end global.get $std/array/sarr - block $~lib/runtime/MAKEARRAY|inlined.64 (result i32) - i32.const 5 - local.set $0 - i32.const 2952 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 2952 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18552,9 +18064,9 @@ end block $break|0 i32.const 0 - local.set $1 + local.set $0 loop $repeat|0 - local.get $1 + local.get $0 i32.const 100 i32.lt_s i32.eqz @@ -18562,10 +18074,10 @@ global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 unreachable end @@ -19196,17 +18708,11 @@ end drop global.get $std/array/f32ArrayTyped - block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) - i32.const 8 - local.set $1 - i32.const 3304 - local.set $0 - local.get $1 - local.get $0 - i32.const 9 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 8 + i32.const 9 + i32.const 2 + i32.const 3304 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19227,17 +18733,11 @@ end drop global.get $std/array/f64ArrayTyped - block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) - i32.const 8 - local.set $0 - i32.const 3464 - local.set $1 - local.get $0 - local.get $1 - i32.const 10 - i32.const 3 - call $~lib/runtime/makeArray - end + i32.const 8 + i32.const 10 + i32.const 3 + i32.const 3464 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19258,17 +18758,11 @@ end drop global.get $std/array/i32ArrayTyped - block $~lib/runtime/MAKEARRAY|inlined.67 (result i32) - i32.const 5 - local.set $1 - i32.const 3616 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 4 + i32.const 2 + i32.const 3616 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19289,17 +18783,11 @@ end drop global.get $std/array/u32ArrayTyped - block $~lib/runtime/MAKEARRAY|inlined.5 (result i32) - i32.const 5 - local.set $0 - i32.const 3728 - local.set $1 - local.get $0 - local.get $1 - i32.const 8 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 8 + i32.const 2 + i32.const 3728 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19331,17 +18819,11 @@ global.get $std/array/reversed1 call $std/array/assertSortedDefault global.get $std/array/reversed1 - block $~lib/runtime/MAKEARRAY|inlined.69 (result i32) - i32.const 1 - local.set $1 - i32.const 4056 - local.set $0 - local.get $1 - local.get $0 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 1 + i32.const 4 + i32.const 2 + i32.const 4056 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19356,17 +18838,11 @@ global.get $std/array/reversed2 call $std/array/assertSortedDefault global.get $std/array/reversed2 - block $~lib/runtime/MAKEARRAY|inlined.70 (result i32) - i32.const 2 - local.set $0 - i32.const 4080 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 2 + i32.const 4 + i32.const 2 + i32.const 4080 + call $~lib/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19515,17 +18991,11 @@ i32.const 0 call $std/array/assertSorted|trampoline end - block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) - i32.const 2 - local.set $0 - i32.const 4552 - local.set $1 - local.get $0 - local.get $1 - i32.const 16 - i32.const 0 - call $~lib/runtime/makeArray - end + i32.const 2 + i32.const 16 + i32.const 0 + i32.const 4552 + call $~lib/runtime/makeArray i32.const 4528 call $~lib/array/Array#join i32.const 4576 @@ -19539,17 +19009,11 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.72 (result i32) - i32.const 3 - local.set $0 - i32.const 5120 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 3 + i32.const 4 + i32.const 2 + i32.const 5120 + call $~lib/runtime/makeArray i32.const 4200 call $~lib/array/Array#join i32.const 5152 @@ -19563,17 +19027,11 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.7 (result i32) - i32.const 3 - local.set $0 - i32.const 5240 - local.set $1 - local.get $0 - local.get $1 - i32.const 8 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 3 + i32.const 8 + i32.const 2 + i32.const 5240 + call $~lib/runtime/makeArray i32.const 5216 call $~lib/array/Array#join i32.const 5152 @@ -19587,17 +19045,11 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.74 (result i32) - i32.const 2 - local.set $0 - i32.const 5320 - local.set $1 - local.get $0 - local.get $1 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 2 + i32.const 4 + i32.const 2 + i32.const 5320 + call $~lib/runtime/makeArray i32.const 5296 call $~lib/array/Array#join i32.const 5344 @@ -19611,17 +19063,11 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) - i32.const 6 - local.set $0 - i32.const 6672 - local.set $1 - local.get $0 - local.get $1 - i32.const 10 - i32.const 3 - call $~lib/runtime/makeArray - end + i32.const 6 + i32.const 10 + i32.const 3 + i32.const 6672 + call $~lib/runtime/makeArray i32.const 5472 call $~lib/array/Array#join i32.const 6736 @@ -19635,17 +19081,11 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) - i32.const 3 - local.set $0 - i32.const 6888 - local.set $1 - local.get $0 - local.get $1 - i32.const 15 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 3 + i32.const 15 + i32.const 2 + i32.const 6888 + call $~lib/runtime/makeArray i32.const 4200 call $~lib/array/Array#join i32.const 6832 @@ -19660,63 +19100,57 @@ unreachable end block (result i32) - block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) - i32.const 3 - local.set $2 - i32.const 0 - local.set $3 - local.get $2 - local.get $3 - i32.const 20 - i32.const 2 - call $~lib/runtime/makeArray - end - local.set $1 - local.get $1 - i32.load offset=4 + i32.const 3 + i32.const 20 + i32.const 2 + i32.const 0 + call $~lib/runtime/makeArray local.set $0 local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 block (result i32) i32.const 0 call $std/array/Ref#constructor - local.set $3 - local.get $3 + local.set $2 + local.get $2 if - local.get $3 - local.get $1 + local.get $2 + local.get $0 call $~lib/collector/dummy/__ref_link end - local.get $3 + local.get $2 end i32.store - local.get $0 + local.get $1 block (result i32) i32.const 0 - local.set $3 - local.get $3 + local.set $2 + local.get $2 if - local.get $3 - local.get $1 + local.get $2 + local.get $0 call $~lib/collector/dummy/__ref_link end - local.get $3 + local.get $2 end i32.store offset=4 - local.get $0 + local.get $1 block (result i32) i32.const 0 call $std/array/Ref#constructor - local.set $3 - local.get $3 + local.set $2 + local.get $2 if - local.get $3 - local.get $1 + local.get $2 + local.get $0 call $~lib/collector/dummy/__ref_link end - local.get $3 + local.get $2 end i32.store offset=8 - local.get $1 + local.get $0 end global.set $std/array/refArr global.get $std/array/refArr @@ -19785,17 +19219,11 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) - i32.const 3 - local.set $1 - i32.const 7128 - local.set $0 - local.get $1 - local.get $0 - i32.const 21 - i32.const 0 - call $~lib/runtime/makeArray - end + i32.const 3 + i32.const 21 + i32.const 0 + i32.const 7128 + call $~lib/runtime/makeArray call $~lib/array/Array#toString i32.const 7152 call $~lib/string/String.__eq @@ -19808,17 +19236,11 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) - i32.const 3 - local.set $1 - i32.const 7208 - local.set $0 - local.get $1 - local.get $0 - i32.const 22 - i32.const 1 - call $~lib/runtime/makeArray - end + i32.const 3 + i32.const 22 + i32.const 1 + i32.const 7208 + call $~lib/runtime/makeArray call $~lib/array/Array#toString i32.const 7232 call $~lib/string/String.__eq @@ -19831,17 +19253,11 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) - i32.const 3 - local.set $1 - i32.const 7312 - local.set $0 - local.get $1 - local.get $0 - i32.const 17 - i32.const 3 - call $~lib/runtime/makeArray - end + i32.const 3 + i32.const 17 + i32.const 3 + i32.const 7312 + call $~lib/runtime/makeArray call $~lib/array/Array#toString i32.const 7352 call $~lib/string/String.__eq @@ -19854,17 +19270,11 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) - i32.const 4 - local.set $1 - i32.const 7464 - local.set $0 - local.get $1 - local.get $0 - i32.const 23 - i32.const 3 - call $~lib/runtime/makeArray - end + i32.const 4 + i32.const 23 + i32.const 3 + i32.const 7464 + call $~lib/runtime/makeArray call $~lib/array/Array#toString i32.const 7512 call $~lib/string/String.__eq @@ -19890,17 +19300,11 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.4 (result i32) - i32.const 4 - local.set $1 - i32.const 7744 - local.set $0 - local.get $1 - local.get $0 - i32.const 15 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 4 + i32.const 15 + i32.const 2 + i32.const 7744 + call $~lib/runtime/makeArray call $~lib/array/Array#toString i32.const 7776 call $~lib/string/String.__eq @@ -19914,54 +19318,36 @@ unreachable end block (result i32) - block $~lib/runtime/MAKEARRAY>|inlined.1 (result i32) - i32.const 2 - local.set $3 - i32.const 0 - local.set $2 - local.get $3 - local.get $2 - i32.const 11 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 2 + i32.const 11 + i32.const 2 + i32.const 0 + call $~lib/runtime/makeArray local.set $1 local.get $1 i32.load offset=4 local.set $0 local.get $0 block (result i32) - block $~lib/runtime/MAKEARRAY|inlined.76 (result i32) - i32.const 2 - local.set $2 - i32.const 7832 - local.set $3 - local.get $2 - local.get $3 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end - local.set $3 - local.get $3 + i32.const 2 + i32.const 4 + i32.const 2 + i32.const 7832 + call $~lib/runtime/makeArray + local.set $2 + local.get $2 local.get $1 call $~lib/collector/dummy/__ref_link - local.get $3 + local.get $2 end i32.store local.get $0 block (result i32) - block $~lib/runtime/MAKEARRAY|inlined.77 (result i32) - i32.const 2 - local.set $3 - i32.const 7856 - local.set $2 - local.get $3 - local.get $2 - i32.const 4 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 2 + i32.const 4 + i32.const 2 + i32.const 7856 + call $~lib/runtime/makeArray local.set $2 local.get $2 local.get $1 @@ -19986,62 +19372,44 @@ unreachable end block (result i32) - block $~lib/runtime/MAKEARRAY>|inlined.0 (result i32) - i32.const 2 - local.set $2 - i32.const 0 - local.set $3 - local.get $2 - local.get $3 - i32.const 24 - i32.const 2 - call $~lib/runtime/makeArray - end - local.set $1 - local.get $1 - i32.load offset=4 + i32.const 2 + i32.const 24 + i32.const 2 + i32.const 0 + call $~lib/runtime/makeArray local.set $0 local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 block (result i32) - block $~lib/runtime/MAKEARRAY|inlined.6 (result i32) - i32.const 2 - local.set $3 - i32.const 7936 - local.set $2 - local.get $3 - local.get $2 - i32.const 7 - i32.const 0 - call $~lib/runtime/makeArray - end + i32.const 2 + i32.const 7 + i32.const 0 + i32.const 7936 + call $~lib/runtime/makeArray local.set $2 local.get $2 - local.get $1 + local.get $0 call $~lib/collector/dummy/__ref_link local.get $2 end i32.store - local.get $0 + local.get $1 block (result i32) - block $~lib/runtime/MAKEARRAY|inlined.7 (result i32) - i32.const 2 - local.set $2 - i32.const 7960 - local.set $3 - local.get $2 - local.get $3 - i32.const 7 - i32.const 0 - call $~lib/runtime/makeArray - end - local.set $3 - local.get $3 - local.get $1 + i32.const 2 + i32.const 7 + i32.const 0 + i32.const 7960 + call $~lib/runtime/makeArray + local.set $2 + local.get $2 + local.get $0 call $~lib/collector/dummy/__ref_link - local.get $3 + local.get $2 end i32.store offset=4 - local.get $1 + local.get $0 end global.set $std/array/subarr8 global.get $std/array/subarr8 @@ -20058,17 +19426,11 @@ unreachable end block (result i32) - block $~lib/runtime/MAKEARRAY>>|inlined.0 (result i32) - i32.const 1 - local.set $3 - i32.const 0 - local.set $2 - local.get $3 - local.get $2 - i32.const 26 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 1 + i32.const 26 + i32.const 2 + i32.const 0 + call $~lib/runtime/makeArray local.set $0 local.get $0 i32.load offset=4 @@ -20076,48 +19438,36 @@ local.get $1 block (result i32) block (result i32) - block $~lib/runtime/MAKEARRAY>|inlined.1 (result i32) - i32.const 1 - local.set $4 - i32.const 0 - local.set $5 - local.get $4 - local.get $5 - i32.const 25 - i32.const 2 - call $~lib/runtime/makeArray - end - local.set $3 - local.get $3 - i32.load offset=4 + i32.const 1 + i32.const 25 + i32.const 2 + i32.const 0 + call $~lib/runtime/makeArray local.set $2 local.get $2 + i32.load offset=4 + local.set $3 + local.get $3 block (result i32) - block $~lib/runtime/MAKEARRAY|inlined.11 (result i32) - i32.const 1 - local.set $5 - i32.const 8056 - local.set $4 - local.get $5 - local.get $4 - i32.const 8 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 1 + i32.const 8 + i32.const 2 + i32.const 8056 + call $~lib/runtime/makeArray local.set $4 local.get $4 - local.get $3 + local.get $2 call $~lib/collector/dummy/__ref_link local.get $4 end i32.store - local.get $3 + local.get $2 end - local.set $2 - local.get $2 + local.set $3 + local.get $3 local.get $0 call $~lib/collector/dummy/__ref_link - local.get $2 + local.get $3 end i32.store local.get $0 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 22b3f93cda..263dfcf891 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -326,7 +326,7 @@ if i32.const 0 i32.const 64 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -341,7 +341,7 @@ if i32.const 0 i32.const 64 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -1547,7 +1547,7 @@ if i32.const 0 i32.const 64 - i32.const 244 + i32.const 234 i32.const 57 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 2e376b9a38..1198df61ae 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -408,7 +408,7 @@ if i32.const 0 i32.const 64 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -425,7 +425,7 @@ if i32.const 0 i32.const 64 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -2037,7 +2037,6 @@ ) (func $~lib/runtime/ArrayBufferView#constructor (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $1 global.get $~lib/runtime/MAX_BYTELENGTH local.get $2 @@ -2046,7 +2045,7 @@ if i32.const 0 i32.const 64 - i32.const 244 + i32.const 234 i32.const 57 call $~lib/env/abort unreachable @@ -2062,18 +2061,10 @@ local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) - i32.const 12 - local.set $4 - local.get $4 - call $~lib/runtime/allocate - end - local.set $4 - local.get $4 - i32.const 3 - call $~lib/runtime/register - end + i32.const 12 + call $~lib/runtime/allocate + i32.const 3 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -2098,19 +2089,12 @@ local.get $0 ) (func $~lib/typedarray/Uint8Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 if (result i32) local.get $0 else - block $~lib/runtime/ALLOCATE|inlined.3 (result i32) - i32.const 12 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 12 + call $~lib/runtime/allocate i32.const 4 call $~lib/runtime/register end @@ -2126,15 +2110,15 @@ (local $6 i32) i32.const 16 call $~lib/runtime/allocate - local.get $2 + local.get $1 call $~lib/runtime/register local.set $4 local.get $0 - local.get $3 + local.get $2 i32.shl local.set $5 local.get $0 - local.get $3 + local.get $2 i32.shl call $~lib/runtime/allocate i32.const 2 @@ -2152,29 +2136,22 @@ local.get $4 local.get $0 i32.store offset=12 - local.get $1 + local.get $3 if local.get $6 - local.get $1 + local.get $3 local.get $5 call $~lib/memory/memory.copy end local.get $4 ) (func $~lib/typedarray/Int32Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 if (result i32) local.get $0 else - block $~lib/runtime/ALLOCATE|inlined.4 (result i32) - i32.const 12 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 12 + call $~lib/runtime/allocate i32.const 6 call $~lib/runtime/register end @@ -2186,7 +2163,6 @@ ) (func $~lib/dataview/DataView#constructor (; 20 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) - (local $5 i32) local.get $3 global.get $~lib/builtins/i32.MIN_VALUE i32.eq @@ -2219,18 +2195,10 @@ local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.5 (result i32) - i32.const 12 - local.set $4 - local.get $4 - call $~lib/runtime/allocate - end - local.set $4 - local.get $4 - i32.const 7 - call $~lib/runtime/register - end + i32.const 12 + call $~lib/runtime/allocate + i32.const 7 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -2249,9 +2217,9 @@ local.get $1 local.get $2 i32.add - local.set $5 + local.set $4 local.get $0 - local.get $5 + local.get $4 i32.store offset=4 local.get $0 local.get $3 @@ -2263,8 +2231,6 @@ i32.load ) (func $start:std/arraybuffer (; 22 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -2524,17 +2490,11 @@ i32.const 1 call $~lib/typedarray/Uint8Array#constructor global.set $std/arraybuffer/arr8 - block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) - i32.const 2 - local.set $0 - i32.const 152 - local.set $1 - local.get $0 - local.get $1 - i32.const 5 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 2 + i32.const 5 + i32.const 2 + i32.const 152 + call $~lib/runtime/makeArray call $~lib/arraybuffer/ArrayBuffer.isView> i32.eqz i32.eqz diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index fd7eadd7e4..6cb289f8dd 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -164,7 +164,7 @@ if i32.const 0 i32.const 16 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -179,7 +179,7 @@ if i32.const 0 i32.const 16 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 01e8b4d801..20171a35d3 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -414,7 +414,7 @@ if i32.const 0 i32.const 16 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -431,7 +431,7 @@ if i32.const 0 i32.const 16 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -476,7 +476,6 @@ ) (func $~lib/runtime/ArrayBufferView#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $1 global.get $~lib/runtime/MAX_BYTELENGTH local.get $2 @@ -485,7 +484,7 @@ if i32.const 0 i32.const 16 - i32.const 244 + i32.const 234 i32.const 57 call $~lib/env/abort unreachable @@ -501,18 +500,10 @@ local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - i32.const 12 - local.set $4 - local.get $4 - call $~lib/runtime/allocate - end - local.set $4 - local.get $4 - i32.const 3 - call $~lib/runtime/register - end + i32.const 12 + call $~lib/runtime/allocate + i32.const 3 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -537,19 +528,12 @@ local.get $0 ) (func $~lib/typedarray/Uint8Array#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 if (result i32) local.get $0 else - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) - i32.const 12 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 12 + call $~lib/runtime/allocate i32.const 4 call $~lib/runtime/register end @@ -587,7 +571,6 @@ ) (func $~lib/dataview/DataView#constructor (; 11 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) - (local $5 i32) local.get $3 global.get $~lib/builtins/i32.MIN_VALUE i32.eq @@ -620,18 +603,10 @@ local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.3 (result i32) - i32.const 12 - local.set $4 - local.get $4 - call $~lib/runtime/allocate - end - local.set $4 - local.get $4 - i32.const 5 - call $~lib/runtime/register - end + i32.const 12 + call $~lib/runtime/allocate + i32.const 5 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -650,9 +625,9 @@ local.get $1 local.get $2 i32.add - local.set $5 + local.set $4 local.get $0 - local.get $5 + local.get $4 i32.store offset=4 local.get $0 local.get $3 diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 9bcf0e6790..31f2864435 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -89,7 +89,7 @@ if i32.const 0 i32.const 48 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -104,7 +104,7 @@ if i32.const 0 i32.const 48 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 023d2cec94..057f6d40a0 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -149,7 +149,7 @@ if i32.const 0 i32.const 48 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -166,7 +166,7 @@ if i32.const 0 i32.const 48 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -177,23 +177,14 @@ local.get $0 ) (func $~lib/date/Date#constructor (; 7 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - i32.const 8 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 - i32.const 2 - call $~lib/runtime/register - end + i32.const 8 + call $~lib/runtime/allocate + i32.const 2 + call $~lib/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/std/gc-array.optimized.wat b/tests/compiler/std/gc-array.optimized.wat deleted file mode 100644 index 00336ae364..0000000000 --- a/tests/compiler/std/gc-array.optimized.wat +++ /dev/null @@ -1,1954 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 16) "\01") - (data (i32.const 40) "\02\00\00\00\00\00\00\00\18") - (data (i32.const 64) "\05\00\00\00\00\00\00\00\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 112) "\05\00\00\00\00\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (table $0 7 funcref) - (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~gc $~lib/array/Array~gc $~lib/collector/itcm/__gc_mark $~lib/arraybuffer/ArrayBuffer~gc $~lib/arraybuffer/ArrayBuffer~gc $~lib/allocator/arena/__memory_free) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $std/gc-array/arr (mut i32) (i32.const 48)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/started (mut i32) (i32.const 0)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (export "main" (func $std/gc-array/main)) - (func $~lib/arraybuffer/ArrayBuffer~gc (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - local.get $1 - i32.load - i32.const 3 - i32.and - local.get $0 - i32.or - i32.store - local.get $1 - local.get $2 - i32.store offset=4 - local.get $2 - local.get $2 - i32.load - i32.const 3 - i32.and - local.get $1 - i32.or - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/collector/itcm/iter - local.get $0 - i32.eq - if - local.get $0 - i32.load offset=4 - global.set $~lib/collector/itcm/iter - end - local.get $0 - i32.load - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.load offset=4 - local.tee $1 - i32.store offset=4 - local.get $1 - local.get $1 - i32.load - i32.const 3 - i32.and - local.get $2 - i32.or - i32.store - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load - i32.const -4 - i32.and - i32.const 2 - i32.or - i32.store - ) - (func $~lib/collector/itcm/__gc_mark (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - if - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end - end - ) - (func $~lib/array/Array~gc (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load - local.tee $2 - call $~lib/collector/itcm/__gc_mark - local.get $0 - i32.load offset=4 - i32.const 2 - i32.shl - local.set $0 - loop $continue|0 - local.get $1 - local.get $0 - i32.lt_u - if - local.get $1 - local.get $2 - i32.add - i32.load offset=8 - call $~lib/collector/itcm/__gc_mark - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $continue|0 - end - end - ) - (func $~lib/allocator/arena/__memory_allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.tee $1 - local.get $0 - i32.const 1 - local.get $0 - i32.const 1 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const -8 - i32.and - local.tee $2 - current_memory - local.tee $3 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $3 - local.get $2 - local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $0 - local.get $3 - local.get $0 - i32.gt_s - select - grow_memory - i32.const 0 - i32.lt_s - if - local.get $0 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $2 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/allocator/arena/__memory_free (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/collector/itcm/step (; 8 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - if - local.get $0 - i32.const 1 - i32.sub - br_table $case1|0 $case2|0 $case3|0 $break|0 - end - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - local.tee $0 - i32.const -1 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - local.tee $0 - i32.const -1 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - global.get $std/gc-array/arr - i32.const 3 - call_indirect (type $FUNCSIG$vi) - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - end - global.get $~lib/collector/itcm/iter - i32.load - i32.const -4 - i32.and - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - local.get $0 - i32.load - i32.const -4 - i32.and - i32.or - i32.store - i32.const 1 - global.set $~lib/argc - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load offset=8 - call_indirect (type $FUNCSIG$vi) - else - global.get $std/gc-array/arr - i32.const 3 - call_indirect (type $FUNCSIG$vi) - global.get $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/iter - i32.load - i32.const -4 - i32.and - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $0 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $0 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $0 - i32.load - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - end - global.get $~lib/collector/itcm/iter - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - i32.load - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - else - global.get $~lib/collector/itcm/toSpace - local.tee $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - i32.const 1 - global.set $~lib/collector/itcm/state - end - end - ) - (func $~lib/collector/itcm/__gc_collect (; 9 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - i32.eqz - br_if $case1|0 - local.get $0 - i32.const 1 - i32.eq - br_if $case1|0 - br $break|0 - end - call $~lib/collector/itcm/step - end - loop $continue|1 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|1 - end - end - ) - (func $~lib/collector/itcm/__gc_allocate (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - call $~lib/collector/itcm/step - local.get $0 - i32.const 16 - i32.add - call $~lib/allocator/arena/__memory_allocate - local.tee $0 - local.get $1 - i32.store offset=8 - local.get $0 - global.get $~lib/collector/itcm/white - local.get $0 - i32.load - i32.const -4 - i32.and - i32.or - i32.store - global.get $~lib/collector/itcm/fromSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - i32.const 16 - i32.add - ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 120 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - i32.const 1 - i32.const 32 - local.get $0 - i32.const 7 - i32.add - i32.clz - i32.sub - i32.shl - i32.const 6 - call $~lib/collector/itcm/__gc_allocate - local.tee $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/internal/memory/memcpy (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $continue|0 - local.get $1 - i32.const 3 - i32.and - local.get $2 - local.get $2 - select - if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - local.get $0 - i32.const 3 - i32.and - local.tee $3 - i32.const 1 - i32.ne - if - local.get $3 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $3 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - local.tee $3 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $1 - local.set $0 - local.get $1 - local.get $3 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 13 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 15 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - local.tee $3 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $1 - local.set $0 - local.get $1 - local.get $3 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - local.tee $3 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $1 - local.set $0 - local.get $1 - local.get $3 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - local.tee $3 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $1 - local.set $0 - local.get $1 - local.get $3 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/internal/memory/memmove (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - local.set $3 - end - local.get $3 - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 - end - end - end - loop $continue|2 - local.get $2 - if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|3 - end - end - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - br $continue|4 - end - end - end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - ) - (func $~lib/internal/memory/memset (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $1 - i32.eqz - if - return - end - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $2 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - local.get $0 - i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $1 - local.get $0 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 16 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 20 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $2 - local.get $0 - i32.add - local.set $0 - local.get $1 - local.get $2 - i32.sub - local.set $1 - loop $continue|0 - 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 - ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - local.get $0 - i32.load - local.tee $2 - i32.gt_s - if - local.get $1 - i32.const 1073741816 - i32.gt_s - if - i32.const 0 - i32.const 120 - i32.const 40 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 1 - i32.const 32 - local.get $2 - i32.const 7 - i32.add - i32.clz - i32.sub - i32.shl - i32.const 8 - i32.sub - i32.le_s - if - local.get $0 - local.get $1 - i32.store - else - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $3 - i32.const 8 - i32.add - local.get $0 - i32.const 8 - i32.add - local.get $2 - call $~lib/internal/memory/memmove - local.get $3 - local.set $0 - end - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.sub - call $~lib/internal/memory/memset - else - local.get $1 - local.get $2 - i32.lt_s - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 0 - i32.const 120 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - i32.store - end - end - local.get $0 - ) - (func $~lib/collector/itcm/__gc_link (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - global.get $~lib/collector/itcm/white - i32.eqz - local.get $0 - i32.const 16 - i32.sub - local.tee $2 - i32.load - i32.const 3 - i32.and - i32.eq - local.tee $0 - if (result i32) - global.get $~lib/collector/itcm/white - local.get $1 - i32.const 16 - i32.sub - i32.load - i32.const 3 - i32.and - i32.eq - else - local.get $0 - end - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/array/Array#__set (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $0 - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u - i32.ge_u - if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 72 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.tee $3 - i32.store - local.get $0 - local.get $4 - i32.store offset=4 - end - local.get $3 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=8 - local.get $0 - local.get $2 - call $~lib/collector/itcm/__gc_link - ) - (func $start:std/gc-array (; 18 ;) (type $FUNCSIG$v) - i32.const 184 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - call $~lib/collector/itcm/__gc_collect - global.get $std/gc-array/arr - i32.const 0 - i32.const 0 - i32.const 4 - call $~lib/collector/itcm/__gc_allocate - call $~lib/array/Array#__set - call $~lib/collector/itcm/__gc_collect - global.get $std/gc-array/arr - i32.const 1 - i32.const 0 - i32.const 4 - call $~lib/collector/itcm/__gc_allocate - call $~lib/array/Array#__set - call $~lib/collector/itcm/__gc_collect - global.get $std/gc-array/arr - i32.const 0 - i32.const 0 - i32.const 4 - call $~lib/collector/itcm/__gc_allocate - call $~lib/array/Array#__set - call $~lib/collector/itcm/__gc_collect - ) - (func $std/gc-array/main (; 19 ;) (type $FUNCSIG$i) (result i32) - global.get $~lib/started - i32.eqz - if - call $start:std/gc-array - i32.const 1 - global.set $~lib/started - end - i32.const 0 - ) - (func $null (; 20 ;) (type $FUNCSIG$v) - nop - ) -) diff --git a/tests/compiler/std/gc-array.ts b/tests/compiler/std/gc-array.ts deleted file mode 100644 index f42c59d20c..0000000000 --- a/tests/compiler/std/gc-array.ts +++ /dev/null @@ -1,24 +0,0 @@ -import "allocator/arena"; -import "collector/itcm"; - -class Foo { -} - -var arr: Foo[] = []; - -gc.collect(); // should do nothing - -arr[0] = {}; - -gc.collect(); // should do nothing - -arr[1] = {}; - -gc.collect(); // should do nothing - -arr[0] = {}; - -gc.collect(); // should collect the old one - -@start -export function main(): i32 { return 0; } diff --git a/tests/compiler/std/gc-array.untouched.wat b/tests/compiler/std/gc-array.untouched.wat deleted file mode 100644 index 87e67dd513..0000000000 --- a/tests/compiler/std/gc-array.untouched.wat +++ /dev/null @@ -1,2540 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 8) "\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 32) "\00\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\18\00\00\00\00\00\00\00") - (data (i32.const 56) "\00\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 104) "\00\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (table $0 7 funcref) - (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~gc $~lib/array/Array~gc $~lib/collector/itcm/__gc_mark $std/gc-array/Foo~gc $~lib/string/String~gc $~lib/internal/arraybuffer/__gc) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $std/gc-array/arr (mut i32) (i32.const 48)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 180)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (export "main" (func $std/gc-array/main)) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $~lib/arraybuffer/ArrayBuffer~gc (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const 3 - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 - i32.load - i32.const 3 - i32.and - i32.or - i32.store - ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - local.set $1 - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - local.get $2 - i32.store offset=4 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - local.get $0 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $1 - local.get $2 - i32.store offset=4 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/collector/itcm/iter - i32.eq - if - local.get $0 - i32.load offset=4 - global.set $~lib/collector/itcm/iter - end - local.get $0 - call $~lib/collector/itcm/ManagedObject#unlink - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 2 - i32.or - i32.store - ) - (func $~lib/collector/itcm/__gc_mark (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - if - block $~lib/collector/itcm/refToObj|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 16 - i32.sub - end - local.set $1 - local.get $1 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - if - local.get $1 - call $~lib/collector/itcm/ManagedObject#makeGray - end - end - ) - (func $~lib/array/Array~gc (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load - local.set $1 - local.get $1 - call $~lib/collector/itcm/__gc_mark - i32.const 0 - local.set $2 - local.get $0 - i32.load offset=4 - i32.const 2 - i32.shl - local.set $3 - block $break|0 - loop $continue|0 - local.get $2 - local.get $3 - i32.lt_u - if - block - local.get $1 - local.get $2 - i32.add - i32.load offset=8 - call $~lib/collector/itcm/__gc_mark - local.get $2 - i32.const 4 - i32.add - local.set $2 - end - br $continue|0 - end - end - end - ) - (func $~lib/allocator/arena/__memory_allocate (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 - local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $2 - local.get $5 - local.tee $3 - local.get $2 - local.tee $6 - local.get $3 - local.get $6 - i32.gt_s - select - local.set $3 - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - local.get $2 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/collector/itcm/ManagedObjectList#clear (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - ) - (func $~lib/collector/itcm/ManagedObject#set:color (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $1 - i32.or - i32.store - ) - (func $~lib/allocator/arena/__memory_free (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/collector/itcm/step (; 15 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - block $case0|0 - global.get $~lib/collector/itcm/state - local.set $1 - local.get $1 - i32.const 0 - i32.eq - br_if $case0|0 - local.get $1 - i32.const 1 - i32.eq - br_if $case1|0 - local.get $1 - i32.const 2 - i32.eq - br_if $case2|0 - local.get $1 - i32.const 3 - i32.eq - br_if $case3|0 - br $break|0 - end - block - block $~lib/memory/memory.allocate|inlined.0 (result i32) - i32.const 16 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - i32.const -1 - i32.store offset=8 - global.get $~lib/collector/itcm/fromSpace - call $~lib/collector/itcm/ManagedObjectList#clear - block $~lib/memory/memory.allocate|inlined.1 (result i32) - i32.const 16 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 - end - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - i32.const -1 - i32.store offset=8 - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - end - block - i32.const 3 - call $~iterateRoots - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - call $~lib/collector/itcm/ManagedObject#set:color - i32.const 1 - global.set $~lib/argc - block $~lib/collector/itcm/objToRef|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 16 - i32.add - end - local.get $0 - i32.load offset=8 - call_indirect (type $FUNCSIG$vi) - else - i32.const 3 - call $~iterateRoots - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $1 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $1 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $1 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.ge_u - if - block $~lib/memory/memory.free|inlined.0 - local.get $0 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 - end - end - else - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - i32.const 1 - global.set $~lib/collector/itcm/state - end - br $break|0 - unreachable - end - unreachable - end - ) - (func $~lib/collector/itcm/__gc_collect (; 16 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case1|0 - block $case0|0 - global.get $~lib/collector/itcm/state - local.set $0 - local.get $0 - i32.const 0 - i32.eq - br_if $case0|0 - local.get $0 - i32.const 1 - i32.eq - br_if $case1|0 - br $break|0 - end - end - call $~lib/collector/itcm/step - end - block $break|1 - loop $continue|1 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|1 - end - end - end - ) - (func $~lib/gc/gc.collect (; 17 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/__gc_collect - return - ) - (func $~lib/collector/itcm/__gc_allocate (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741824 - i32.const 16 - i32.sub - i32.gt_u - if - unreachable - end - call $~lib/collector/itcm/step - block $~lib/memory/memory.allocate|inlined.2 (result i32) - i32.const 16 - local.get $0 - i32.add - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.2 - end - local.set $3 - local.get $3 - local.get $1 - i32.store offset=8 - local.get $3 - global.get $~lib/collector/itcm/white - call $~lib/collector/itcm/ManagedObject#set:color - global.get $~lib/collector/itcm/fromSpace - local.get $3 - call $~lib/collector/itcm/ManagedObjectList#push - block $~lib/collector/itcm/objToRef|inlined.1 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.const 16 - i32.add - end - ) - (func $std/gc-array/Foo~gc (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $~lib/string/String~gc (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $~lib/internal/arraybuffer/computeSize (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 8 - i32.add - i32.const 1 - i32.sub - i32.clz - i32.sub - i32.shl - ) - (func $~lib/internal/arraybuffer/__gc (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - call $~lib/internal/arraybuffer/computeSize - i32.const 6 - call $~lib/collector/itcm/__gc_allocate - local.set $1 - local.get $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/internal/memory/memcpy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - ) - (func $~lib/internal/memory/memmove (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - end - i32.load8_u - i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - br $continue|1 - end - end - end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|2 - end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - end - br $continue|3 - end - end - end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 - end - end - end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - end - ) - (func $~lib/internal/memory/memset (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i64) - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - end - br $continue|0 - end - end - end - ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.gt_s - if - local.get $1 - i32.const 1073741816 - i32.le_s - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 40 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - local.get $2 - call $~lib/internal/arraybuffer/computeSize - i32.const 8 - i32.sub - i32.le_s - if - local.get $0 - local.get $1 - i32.store - else - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.copy|inlined.0 - local.get $3 - i32.const 8 - i32.add - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memmove - end - local.get $3 - local.set $0 - end - block $~lib/memory/memory.fill|inlined.0 - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.add - local.set $3 - i32.const 0 - local.set $6 - local.get $1 - local.get $2 - i32.sub - local.set $5 - local.get $3 - local.get $6 - local.get $5 - call $~lib/internal/memory/memset - end - else - local.get $1 - local.get $2 - i32.lt_s - if - local.get $1 - i32.const 0 - i32.ge_s - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - i32.store - end - end - local.get $0 - ) - (func $~lib/collector/itcm/__gc_link (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - block $~lib/collector/itcm/refToObj|inlined.1 (result i32) - local.get $0 - local.set $2 - local.get $2 - i32.const 16 - i32.sub - end - local.set $3 - local.get $3 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eqz - i32.eq - local.tee $2 - if (result i32) - block $~lib/collector/itcm/refToObj|inlined.3 (result i32) - local.get $1 - local.set $2 - local.get $2 - i32.const 16 - i32.sub - end - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - else - local.get $2 - end - if - local.get $3 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/array/Array#__set (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 - i32.load - local.set $3 - local.get $3 - i32.load - i32.const 2 - i32.shr_u - local.set $4 - local.get $1 - local.get $4 - i32.ge_u - if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 72 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $3 - local.set $5 - local.get $1 - local.set $6 - local.get $2 - local.set $7 - i32.const 0 - local.set $8 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $7 - i32.store offset=8 - end - local.get $0 - local.get $2 - call $~lib/collector/itcm/__gc_link - ) - (func $start:std/gc-array (; 30 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - (local $2 i32) - call $start:~lib/allocator/arena - call $~lib/gc/gc.collect - global.get $std/gc-array/arr - i32.const 0 - block (result i32) - i32.const 0 - i32.const 4 - call $~lib/collector/itcm/__gc_allocate - local.set $0 - local.get $0 - end - call $~lib/array/Array#__set - call $~lib/gc/gc.collect - global.get $std/gc-array/arr - i32.const 1 - block (result i32) - i32.const 0 - i32.const 4 - call $~lib/collector/itcm/__gc_allocate - local.set $1 - local.get $1 - end - call $~lib/array/Array#__set - call $~lib/gc/gc.collect - global.get $std/gc-array/arr - i32.const 0 - block (result i32) - i32.const 0 - i32.const 4 - call $~lib/collector/itcm/__gc_allocate - local.set $2 - local.get $2 - end - call $~lib/array/Array#__set - call $~lib/gc/gc.collect - ) - (func $std/gc-array/main (; 31 ;) (type $FUNCSIG$i) (result i32) - global.get $~lib/started - i32.eqz - if - call $start - i32.const 1 - global.set $~lib/started - end - i32.const 0 - ) - (func $start (; 32 ;) (type $FUNCSIG$v) - call $start:std/gc-array - ) - (func $null (; 33 ;) (type $FUNCSIG$v) - ) - (func $~iterateRoots (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) - global.get $std/gc-array/arr - local.get $0 - call_indirect (type $FUNCSIG$vi) - ) -) diff --git a/tests/compiler/std/gc-basics.optimized.wat b/tests/compiler/std/gc-basics.optimized.wat deleted file mode 100644 index 5e8cf42ed8..0000000000 --- a/tests/compiler/std/gc-basics.optimized.wat +++ /dev/null @@ -1,481 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 16) "\03\00\00\00\00\00\00\00\10\00\00\00s\00t\00d\00/\00g\00c\00-\00b\00a\00s\00i\00c\00s\00.\00t\00s") - (table $0 4 funcref) - (elem (i32.const 0) $null $std/gc-basics/MyObject_visit $~lib/collector/itcm/__gc_mark $~lib/string/String~gc) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $std/gc-basics/obj (mut i32) (i32.const 0)) - (global $std/gc-basics/obj2 (mut i32) (i32.const 0)) - (global $~lib/started (mut i32) (i32.const 0)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (export "main" (func $std/gc-basics/main)) - (func $std/gc-basics/MyObject_visit (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.tee $1 - local.get $0 - i32.const 1 - local.get $0 - i32.const 1 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const -8 - i32.and - local.tee $2 - current_memory - local.tee $3 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $3 - local.get $2 - local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $0 - local.get $3 - local.get $0 - i32.gt_s - select - grow_memory - i32.const 0 - i32.lt_s - if - local.get $0 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $2 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - local.get $1 - i32.load - i32.const 3 - i32.and - local.get $0 - i32.or - i32.store - local.get $1 - local.get $2 - i32.store offset=4 - local.get $2 - local.get $2 - i32.load - i32.const 3 - i32.and - local.get $1 - i32.or - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/collector/itcm/iter - local.get $0 - i32.eq - if - local.get $0 - i32.load offset=4 - global.set $~lib/collector/itcm/iter - end - local.get $0 - i32.load - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.load offset=4 - local.tee $1 - i32.store offset=4 - local.get $1 - local.get $1 - i32.load - i32.const 3 - i32.and - local.get $2 - i32.or - i32.store - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load - i32.const -4 - i32.and - i32.const 2 - i32.or - i32.store - ) - (func $~lib/collector/itcm/__gc_mark (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - if - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end - end - ) - (func $~lib/collector/itcm/step (; 6 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - if - local.get $0 - i32.const 1 - i32.sub - br_table $case1|0 $case2|0 $case3|0 $break|0 - end - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - local.tee $0 - i32.const -1 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - local.tee $0 - i32.const -1 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - global.get $std/gc-basics/obj - i32.const 2 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-basics/obj2 - i32.const 2 - call_indirect (type $FUNCSIG$vi) - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - end - global.get $~lib/collector/itcm/iter - i32.load - i32.const -4 - i32.and - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - local.get $0 - i32.load - i32.const -4 - i32.and - i32.or - i32.store - i32.const 1 - global.set $~lib/argc - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load offset=8 - call_indirect (type $FUNCSIG$vi) - else - global.get $std/gc-basics/obj - i32.const 2 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-basics/obj2 - i32.const 2 - call_indirect (type $FUNCSIG$vi) - global.get $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/iter - i32.load - i32.const -4 - i32.and - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $0 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $0 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $0 - i32.load - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - end - global.get $~lib/collector/itcm/iter - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - i32.load - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - else - global.get $~lib/collector/itcm/toSpace - local.tee $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - i32.const 1 - global.set $~lib/collector/itcm/state - end - end - ) - (func $~lib/collector/itcm/__gc_allocate (; 7 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - call $~lib/collector/itcm/step - i32.const 20 - call $~lib/allocator/arena/__memory_allocate - local.tee $0 - i32.const 1 - i32.store offset=8 - local.get $0 - global.get $~lib/collector/itcm/white - local.get $0 - i32.load - i32.const -4 - i32.and - i32.or - i32.store - global.get $~lib/collector/itcm/fromSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - i32.const 16 - i32.add - ) - (func $~lib/string/String~gc (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $~lib/collector/itcm/__gc_collect (; 9 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - i32.eqz - br_if $case1|0 - local.get $0 - i32.const 1 - i32.eq - br_if $case1|0 - br $break|0 - end - call $~lib/collector/itcm/step - end - loop $continue|1 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|1 - end - end - ) - (func $start:std/gc-basics (; 10 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 64 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - call $~lib/collector/itcm/__gc_allocate - global.set $std/gc-basics/obj - global.get $std/gc-basics/obj - local.tee $0 - i32.const 123 - i32.store - local.get $0 - i32.const 16 - i32.sub - local.tee $1 - i32.load offset=4 - local.set $2 - block (result i32) - local.get $1 - i32.load - i32.const -4 - i32.and - local.tee $3 - i32.const 0 - i32.ne - local.tee $0 - if - local.get $2 - i32.const 0 - i32.ne - local.set $0 - end - local.get $0 - end - if (result i32) - local.get $2 - local.get $3 - i32.eq - else - local.get $0 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 19 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load offset=8 - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 24 - i32.const 21 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load offset=12 - if - i32.const 0 - i32.const 24 - i32.const 23 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load offset=16 - i32.const 123 - i32.ne - if - i32.const 0 - i32.const 24 - i32.const 25 - i32.const 2 - call $~lib/env/abort - unreachable - end - call $~lib/collector/itcm/__gc_collect - i32.const 0 - global.set $std/gc-basics/obj - call $~lib/collector/itcm/__gc_collect - ) - (func $std/gc-basics/main (; 11 ;) (type $FUNCSIG$i) (result i32) - global.get $~lib/started - i32.eqz - if - call $start:std/gc-basics - i32.const 1 - global.set $~lib/started - end - i32.const 0 - ) - (func $null (; 12 ;) (type $FUNCSIG$v) - nop - ) -) diff --git a/tests/compiler/std/gc-basics.ts b/tests/compiler/std/gc-basics.ts deleted file mode 100644 index fc79941f51..0000000000 --- a/tests/compiler/std/gc-basics.ts +++ /dev/null @@ -1,35 +0,0 @@ -import "allocator/arena"; -import "collector/itcm"; - -// a class to test with -class MyObject { - a: u32; -} -function MyObject_visit(ref: usize): void {} // function table index == classId ? - -// allocate a managed instance -var obj: MyObject | null = changetype(__gc_allocate(offsetof(), MyObject_visit)); -obj.a = 123; - -// check header -{ - let head = changetype(obj) - 16; - let next = load(head, 0) & ~3; - let prev = load(head, 4); - assert(next != 0 && prev != 0 && next == prev); - let visitFn = load(head, 8); - assert(visitFn == changetype(MyObject_visit)); - let unused = load(head, 12); - assert(unused == 0); - let a = load(head, 16); - assert(a == 123); -} - -gc.collect(); // should keep 'obj' because it's a referenced root (see trace output) -obj = null; -gc.collect(); // should free 'obj' because it isn't referenced anymore (see trace output) - -var obj2: MyObject; // should also iterate globals defined late - -@start -export function main(): i32 { return 0; } diff --git a/tests/compiler/std/gc-basics.untouched.wat b/tests/compiler/std/gc-basics.untouched.wat deleted file mode 100644 index e24be9c925..0000000000 --- a/tests/compiler/std/gc-basics.untouched.wat +++ /dev/null @@ -1,629 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 8) "\00\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\10\00\00\00s\00t\00d\00/\00g\00c\00-\00b\00a\00s\00i\00c\00s\00.\00t\00s\00") - (table $0 4 funcref) - (elem (i32.const 0) $null $std/gc-basics/MyObject_visit $~lib/collector/itcm/__gc_mark $~lib/string/String~gc) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $std/gc-basics/obj (mut i32) (i32.const 0)) - (global $std/gc-basics/obj2 (mut i32) (i32.const 0)) - (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 60)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (export "main" (func $std/gc-basics/main)) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $std/gc-basics/MyObject_visit (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 - local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $2 - local.get $5 - local.tee $3 - local.get $2 - local.tee $6 - local.get $3 - local.get $6 - i32.gt_s - select - local.set $3 - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - local.get $2 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/collector/itcm/ManagedObjectList#clear (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const 3 - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 - i32.load - i32.const 3 - i32.and - i32.or - i32.store - ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - local.set $1 - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - local.get $2 - i32.store offset=4 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - local.get $0 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $1 - local.get $2 - i32.store offset=4 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/collector/itcm/iter - i32.eq - if - local.get $0 - i32.load offset=4 - global.set $~lib/collector/itcm/iter - end - local.get $0 - call $~lib/collector/itcm/ManagedObject#unlink - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 2 - i32.or - i32.store - ) - (func $~lib/collector/itcm/__gc_mark (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - if - block $~lib/collector/itcm/refToObj|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 16 - i32.sub - end - local.set $1 - local.get $1 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - if - local.get $1 - call $~lib/collector/itcm/ManagedObject#makeGray - end - end - ) - (func $~lib/collector/itcm/ManagedObject#set:color (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $1 - i32.or - i32.store - ) - (func $~lib/allocator/arena/__memory_free (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/collector/itcm/step (; 14 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - block $case0|0 - global.get $~lib/collector/itcm/state - local.set $1 - local.get $1 - i32.const 0 - i32.eq - br_if $case0|0 - local.get $1 - i32.const 1 - i32.eq - br_if $case1|0 - local.get $1 - i32.const 2 - i32.eq - br_if $case2|0 - local.get $1 - i32.const 3 - i32.eq - br_if $case3|0 - br $break|0 - end - block - block $~lib/memory/memory.allocate|inlined.0 (result i32) - i32.const 16 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - i32.const -1 - i32.store offset=8 - global.get $~lib/collector/itcm/fromSpace - call $~lib/collector/itcm/ManagedObjectList#clear - block $~lib/memory/memory.allocate|inlined.1 (result i32) - i32.const 16 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 - end - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - i32.const -1 - i32.store offset=8 - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - end - block - i32.const 2 - call $~iterateRoots - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - call $~lib/collector/itcm/ManagedObject#set:color - i32.const 1 - global.set $~lib/argc - block $~lib/collector/itcm/objToRef|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 16 - i32.add - end - local.get $0 - i32.load offset=8 - call_indirect (type $FUNCSIG$vi) - else - i32.const 2 - call $~iterateRoots - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $1 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $1 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $1 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.ge_u - if - block $~lib/memory/memory.free|inlined.0 - local.get $0 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 - end - end - else - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - i32.const 1 - global.set $~lib/collector/itcm/state - end - br $break|0 - unreachable - end - unreachable - end - ) - (func $~lib/collector/itcm/__gc_allocate (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741824 - i32.const 16 - i32.sub - i32.gt_u - if - unreachable - end - call $~lib/collector/itcm/step - block $~lib/memory/memory.allocate|inlined.2 (result i32) - i32.const 16 - local.get $0 - i32.add - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.2 - end - local.set $3 - local.get $3 - local.get $1 - i32.store offset=8 - local.get $3 - global.get $~lib/collector/itcm/white - call $~lib/collector/itcm/ManagedObject#set:color - global.get $~lib/collector/itcm/fromSpace - local.get $3 - call $~lib/collector/itcm/ManagedObjectList#push - block $~lib/collector/itcm/objToRef|inlined.1 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.const 16 - i32.add - end - ) - (func $~lib/string/String~gc (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $~lib/collector/itcm/__gc_collect (; 17 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case1|0 - block $case0|0 - global.get $~lib/collector/itcm/state - local.set $0 - local.get $0 - i32.const 0 - i32.eq - br_if $case0|0 - local.get $0 - i32.const 1 - i32.eq - br_if $case1|0 - br $break|0 - end - end - call $~lib/collector/itcm/step - end - block $break|1 - loop $continue|1 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|1 - end - end - end - ) - (func $~lib/gc/gc.collect (; 18 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/__gc_collect - return - ) - (func $start:std/gc-basics (; 19 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - call $start:~lib/allocator/arena - i32.const 4 - i32.const 1 - call $~lib/collector/itcm/__gc_allocate - global.set $std/gc-basics/obj - global.get $std/gc-basics/obj - i32.const 123 - i32.store - block - global.get $std/gc-basics/obj - i32.const 16 - i32.sub - local.set $0 - local.get $0 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.set $1 - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - i32.const 0 - i32.ne - local.tee $3 - if (result i32) - local.get $2 - i32.const 0 - i32.ne - else - local.get $3 - end - local.tee $3 - if (result i32) - local.get $1 - local.get $2 - i32.eq - else - local.get $3 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 19 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=8 - local.set $3 - local.get $3 - i32.const 1 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 21 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=12 - local.set $4 - local.get $4 - i32.const 0 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 23 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=16 - local.set $5 - local.get $5 - i32.const 123 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 25 - i32.const 2 - call $~lib/env/abort - unreachable - end - end - call $~lib/gc/gc.collect - i32.const 0 - global.set $std/gc-basics/obj - call $~lib/gc/gc.collect - ) - (func $std/gc-basics/main (; 20 ;) (type $FUNCSIG$i) (result i32) - global.get $~lib/started - i32.eqz - if - call $start - i32.const 1 - global.set $~lib/started - end - i32.const 0 - ) - (func $start (; 21 ;) (type $FUNCSIG$v) - call $start:std/gc-basics - ) - (func $null (; 22 ;) (type $FUNCSIG$v) - ) - (func $~iterateRoots (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) - global.get $std/gc-basics/obj - local.get $0 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-basics/obj2 - local.get $0 - call_indirect (type $FUNCSIG$vi) - ) -) diff --git a/tests/compiler/std/gc-integration.optimized.wat b/tests/compiler/std/gc-integration.optimized.wat deleted file mode 100644 index e884820744..0000000000 --- a/tests/compiler/std/gc-integration.optimized.wat +++ /dev/null @@ -1,67 +0,0 @@ -(module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 8) "\15\00\00\00s\00t\00d\00/\00g\00c\00-\00i\00n\00t\00e\00g\00r\00a\00t\00i\00o\00n\00.\00t\00s") - (table $0 2 funcref) - (elem (i32.const 0) $null $start:std/gc-integration~anonymous|0) - (global $std/gc-integration/B.d (mut i32) (i32.const 16)) - (global $std/gc-integration/a_ref (mut i32) (i32.const 24)) - (global $std/gc-integration/b_ref (mut i32) (i32.const 32)) - (global $std/gc-integration/i (mut i32) (i32.const 0)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (start $start) - (func $start:std/gc-integration~anonymous|0 (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - global.get $std/gc-integration/i - i32.const 1 - i32.add - global.set $std/gc-integration/i - local.get $0 - global.get $std/gc-integration/i - i32.const 3 - i32.shl - i32.ne - if - i32.const 0 - i32.const 8 - i32.const 18 - i32.const 42 - call $~lib/env/abort - unreachable - end - ) - (func $start:std/gc-integration (; 2 ;) (type $FUNCSIG$v) - i32.const 8 - i32.const 1 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-integration/B.d - i32.const 1 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-integration/a_ref - i32.const 1 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-integration/b_ref - i32.const 1 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-integration/i - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 8 - i32.const 19 - i32.const 0 - call $~lib/env/abort - unreachable - end - ) - (func $start (; 3 ;) (type $FUNCSIG$v) - call $start:std/gc-integration - ) - (func $null (; 4 ;) (type $FUNCSIG$v) - nop - ) -) diff --git a/tests/compiler/std/gc-integration.ts b/tests/compiler/std/gc-integration.ts deleted file mode 100644 index f89638759e..0000000000 --- a/tests/compiler/std/gc-integration.ts +++ /dev/null @@ -1,19 +0,0 @@ -// declare classes to test with -class A {} -class B { - static readonly c: B = changetype(8); // static root, readonly - static d: A = changetype(16); // static root, writable -} - -// make sure static properties are compiled -B.c; -B.d; - -// declare roots -var no_ref: usize = 64; // NOT a root, basic value -var a_ref: A | null = changetype(24); // global root, nullable -var b_ref: B = changetype(32); // global root, non-nullable - -var i: i32 = 0; -__rt_iterateroots((ref: usize): void => { assert(ref == ++i << 3); }); -assert(i == 4); diff --git a/tests/compiler/std/gc-integration.untouched.wat b/tests/compiler/std/gc-integration.untouched.wat deleted file mode 100644 index 7bd4f80b4e..0000000000 --- a/tests/compiler/std/gc-integration.untouched.wat +++ /dev/null @@ -1,81 +0,0 @@ -(module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 8) "\15\00\00\00s\00t\00d\00/\00g\00c\00-\00i\00n\00t\00e\00g\00r\00a\00t\00i\00o\00n\00.\00t\00s\00") - (table $0 2 funcref) - (elem (i32.const 0) $null $start:std/gc-integration~anonymous|0) - (global $std/gc-integration/B.c i32 (i32.const 8)) - (global $std/gc-integration/B.d (mut i32) (i32.const 16)) - (global $std/gc-integration/no_ref (mut i32) (i32.const 64)) - (global $std/gc-integration/a_ref (mut i32) (i32.const 24)) - (global $std/gc-integration/b_ref (mut i32) (i32.const 32)) - (global $std/gc-integration/i (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (start $start) - (func $start:std/gc-integration~anonymous|0 (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - block (result i32) - global.get $std/gc-integration/i - i32.const 1 - i32.add - global.set $std/gc-integration/i - global.get $std/gc-integration/i - end - i32.const 3 - i32.shl - i32.eq - i32.eqz - if - i32.const 0 - i32.const 8 - i32.const 18 - i32.const 42 - call $~lib/env/abort - unreachable - end - ) - (func $start:std/gc-integration (; 2 ;) (type $FUNCSIG$v) - global.get $std/gc-integration/B.c - drop - global.get $std/gc-integration/B.d - drop - i32.const 1 - call $~iterateRoots - global.get $std/gc-integration/i - i32.const 4 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 8 - i32.const 19 - i32.const 0 - call $~lib/env/abort - unreachable - end - ) - (func $start (; 3 ;) (type $FUNCSIG$v) - call $start:std/gc-integration - ) - (func $null (; 4 ;) (type $FUNCSIG$v) - ) - (func $~iterateRoots (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) - global.get $std/gc-integration/B.c - local.get $0 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-integration/B.d - local.get $0 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-integration/a_ref - local.get $0 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-integration/b_ref - local.get $0 - call_indirect (type $FUNCSIG$vi) - ) -) diff --git a/tests/compiler/std/gc-object.optimized.wat b/tests/compiler/std/gc-object.optimized.wat deleted file mode 100644 index 96919b6e96..0000000000 --- a/tests/compiler/std/gc-object.optimized.wat +++ /dev/null @@ -1,437 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (memory $0 0) - (table $0 4 funcref) - (elem (i32.const 0) $null $~lib/collector/itcm/__gc_mark $std/gc-object/Base~gc $std/gc-object/Custom~gc) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $std/gc-object/obj (mut i32) (i32.const 0)) - (global $~lib/started (mut i32) (i32.const 0)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (export "main" (func $std/gc-object/main)) - (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.tee $1 - local.get $0 - i32.const 1 - local.get $0 - i32.const 1 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const -8 - i32.and - local.tee $2 - current_memory - local.tee $3 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $3 - local.get $2 - local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $0 - local.get $3 - local.get $0 - i32.gt_s - select - grow_memory - i32.const 0 - i32.lt_s - if - local.get $0 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $2 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - local.get $1 - i32.load - i32.const 3 - i32.and - local.get $0 - i32.or - i32.store - local.get $1 - local.get $2 - i32.store offset=4 - local.get $2 - local.get $2 - i32.load - i32.const 3 - i32.and - local.get $1 - i32.or - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/collector/itcm/iter - local.get $0 - i32.eq - if - local.get $0 - i32.load offset=4 - global.set $~lib/collector/itcm/iter - end - local.get $0 - i32.load - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.load offset=4 - local.tee $1 - i32.store offset=4 - local.get $1 - local.get $1 - i32.load - i32.const 3 - i32.and - local.get $2 - i32.or - i32.store - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load - i32.const -4 - i32.and - i32.const 2 - i32.or - i32.store - ) - (func $~lib/collector/itcm/__gc_mark (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - if - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end - end - ) - (func $~lib/collector/itcm/step (; 4 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - if - local.get $0 - i32.const 1 - i32.sub - br_table $case1|0 $case2|0 $case3|0 $break|0 - end - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - local.tee $0 - i32.const -1 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - local.tee $0 - i32.const -1 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - global.get $std/gc-object/obj - i32.const 1 - call_indirect (type $FUNCSIG$vi) - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - end - global.get $~lib/collector/itcm/iter - i32.load - i32.const -4 - i32.and - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - local.get $0 - i32.load - i32.const -4 - i32.and - i32.or - i32.store - i32.const 1 - global.set $~lib/argc - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load offset=8 - call_indirect (type $FUNCSIG$vi) - else - global.get $std/gc-object/obj - i32.const 1 - call_indirect (type $FUNCSIG$vi) - global.get $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/iter - i32.load - i32.const -4 - i32.and - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $0 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $0 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $0 - i32.load - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - end - global.get $~lib/collector/itcm/iter - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - i32.load - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - else - global.get $~lib/collector/itcm/toSpace - local.tee $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - i32.const 1 - global.set $~lib/collector/itcm/state - end - end - ) - (func $~lib/collector/itcm/__gc_allocate (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - call $~lib/collector/itcm/step - local.get $0 - i32.const 16 - i32.add - call $~lib/allocator/arena/__memory_allocate - local.tee $0 - local.get $1 - i32.store offset=8 - local.get $0 - global.get $~lib/collector/itcm/white - local.get $0 - i32.load - i32.const -4 - i32.and - i32.or - i32.store - global.get $~lib/collector/itcm/fromSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - i32.const 16 - i32.add - ) - (func $std/gc-object/Base~gc (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $std/gc-object/Custom~gc (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - i32.const 2 - call_indirect (type $FUNCSIG$vi) - local.get $0 - i32.load - call $~lib/collector/itcm/__gc_mark - local.get $0 - i32.load offset=4 - call $~lib/collector/itcm/__gc_mark - ) - (func $std/gc-object/Custom#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - i32.const 8 - i32.const 3 - call $~lib/collector/itcm/__gc_allocate - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 2 - call $~lib/collector/itcm/__gc_allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - ) - (func $~lib/collector/itcm/__gc_collect (; 9 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - i32.eqz - br_if $case1|0 - local.get $0 - i32.const 1 - i32.eq - br_if $case1|0 - br $break|0 - end - call $~lib/collector/itcm/step - end - loop $continue|1 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|1 - end - end - ) - (func $start:std/gc-object (; 10 ;) (type $FUNCSIG$v) - (local $0 i32) - i32.const 8 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - call $std/gc-object/Custom#constructor - global.set $std/gc-object/obj - call $~lib/collector/itcm/__gc_collect - global.get $std/gc-object/obj - local.tee $0 - local.get $0 - i32.store - call $~lib/collector/itcm/__gc_collect - i32.const 0 - global.set $std/gc-object/obj - call $~lib/collector/itcm/__gc_collect - ) - (func $std/gc-object/main (; 11 ;) (type $FUNCSIG$v) - global.get $~lib/started - i32.eqz - if - call $start:std/gc-object - i32.const 1 - global.set $~lib/started - end - ) - (func $null (; 12 ;) (type $FUNCSIG$v) - nop - ) -) diff --git a/tests/compiler/std/gc-object.ts b/tests/compiler/std/gc-object.ts deleted file mode 100644 index 9a96a6a1c7..0000000000 --- a/tests/compiler/std/gc-object.ts +++ /dev/null @@ -1,25 +0,0 @@ -import "allocator/arena"; -import "collector/itcm"; - -class Base { -} - -class Custom extends Base { - a: Custom; - b: Base; -} - -var obj: Custom | null = new Custom(); - -gc.collect(); - -obj.a = obj; - -gc.collect(); - -obj = null; - -gc.collect(); - -@start -export function main(): void {} diff --git a/tests/compiler/std/gc-object.untouched.wat b/tests/compiler/std/gc-object.untouched.wat deleted file mode 100644 index afb65dc886..0000000000 --- a/tests/compiler/std/gc-object.untouched.wat +++ /dev/null @@ -1,569 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (memory $0 0) - (table $0 4 funcref) - (elem (i32.const 0) $null $~lib/collector/itcm/__gc_mark $std/gc-object/Base~gc $std/gc-object/Custom~gc) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $std/gc-object/obj (mut i32) (i32.const 0)) - (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (export "main" (func $std/gc-object/main)) - (func $start:~lib/allocator/arena (; 0 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 - local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $2 - local.get $5 - local.tee $3 - local.get $2 - local.tee $6 - local.get $3 - local.get $6 - i32.gt_s - select - local.set $3 - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - local.get $2 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/collector/itcm/ManagedObjectList#clear (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const 3 - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 - i32.load - i32.const 3 - i32.and - i32.or - i32.store - ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - local.set $1 - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - local.get $2 - i32.store offset=4 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - local.get $0 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $1 - local.get $2 - i32.store offset=4 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/collector/itcm/iter - i32.eq - if - local.get $0 - i32.load offset=4 - global.set $~lib/collector/itcm/iter - end - local.get $0 - call $~lib/collector/itcm/ManagedObject#unlink - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 2 - i32.or - i32.store - ) - (func $~lib/collector/itcm/__gc_mark (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - if - block $~lib/collector/itcm/refToObj|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 16 - i32.sub - end - local.set $1 - local.get $1 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - if - local.get $1 - call $~lib/collector/itcm/ManagedObject#makeGray - end - end - ) - (func $~lib/collector/itcm/ManagedObject#set:color (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $1 - i32.or - i32.store - ) - (func $~lib/allocator/arena/__memory_free (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/collector/itcm/step (; 12 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - block $case0|0 - global.get $~lib/collector/itcm/state - local.set $1 - local.get $1 - i32.const 0 - i32.eq - br_if $case0|0 - local.get $1 - i32.const 1 - i32.eq - br_if $case1|0 - local.get $1 - i32.const 2 - i32.eq - br_if $case2|0 - local.get $1 - i32.const 3 - i32.eq - br_if $case3|0 - br $break|0 - end - block - block $~lib/memory/memory.allocate|inlined.0 (result i32) - i32.const 16 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - i32.const -1 - i32.store offset=8 - global.get $~lib/collector/itcm/fromSpace - call $~lib/collector/itcm/ManagedObjectList#clear - block $~lib/memory/memory.allocate|inlined.1 (result i32) - i32.const 16 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 - end - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - i32.const -1 - i32.store offset=8 - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - end - block - i32.const 1 - call $~iterateRoots - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - call $~lib/collector/itcm/ManagedObject#set:color - i32.const 1 - global.set $~lib/argc - block $~lib/collector/itcm/objToRef|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 16 - i32.add - end - local.get $0 - i32.load offset=8 - call_indirect (type $FUNCSIG$vi) - else - i32.const 1 - call $~iterateRoots - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $1 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $1 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $1 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.ge_u - if - block $~lib/memory/memory.free|inlined.0 - local.get $0 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 - end - end - else - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - i32.const 1 - global.set $~lib/collector/itcm/state - end - br $break|0 - unreachable - end - unreachable - end - ) - (func $~lib/collector/itcm/__gc_allocate (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741824 - i32.const 16 - i32.sub - i32.gt_u - if - unreachable - end - call $~lib/collector/itcm/step - block $~lib/memory/memory.allocate|inlined.2 (result i32) - i32.const 16 - local.get $0 - i32.add - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.2 - end - local.set $3 - local.get $3 - local.get $1 - i32.store offset=8 - local.get $3 - global.get $~lib/collector/itcm/white - call $~lib/collector/itcm/ManagedObject#set:color - global.get $~lib/collector/itcm/fromSpace - local.get $3 - call $~lib/collector/itcm/ManagedObjectList#push - block $~lib/collector/itcm/objToRef|inlined.1 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.const 16 - i32.add - end - ) - (func $std/gc-object/Base~gc (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $std/gc-object/Base#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 2 - call $~lib/collector/itcm/__gc_allocate - local.set $0 - end - local.get $0 - ) - (func $std/gc-object/Custom~gc (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - i32.const 2 - call_indirect (type $FUNCSIG$vi) - local.get $0 - i32.load - call $~lib/collector/itcm/__gc_mark - local.get $0 - i32.load offset=4 - call $~lib/collector/itcm/__gc_mark - ) - (func $std/gc-object/Custom#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - i32.const 3 - call $~lib/collector/itcm/__gc_allocate - local.set $0 - end - local.get $0 - call $std/gc-object/Base#constructor - local.set $0 - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - ) - (func $~lib/collector/itcm/__gc_collect (; 18 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case1|0 - block $case0|0 - global.get $~lib/collector/itcm/state - local.set $0 - local.get $0 - i32.const 0 - i32.eq - br_if $case0|0 - local.get $0 - i32.const 1 - i32.eq - br_if $case1|0 - br $break|0 - end - end - call $~lib/collector/itcm/step - end - block $break|1 - loop $continue|1 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|1 - end - end - end - ) - (func $~lib/gc/gc.collect (; 19 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/__gc_collect - return - ) - (func $start:std/gc-object (; 20 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena - i32.const 0 - call $std/gc-object/Custom#constructor - global.set $std/gc-object/obj - call $~lib/gc/gc.collect - global.get $std/gc-object/obj - global.get $std/gc-object/obj - i32.store - call $~lib/gc/gc.collect - i32.const 0 - global.set $std/gc-object/obj - call $~lib/gc/gc.collect - ) - (func $std/gc-object/main (; 21 ;) (type $FUNCSIG$v) - global.get $~lib/started - i32.eqz - if - call $start - i32.const 1 - global.set $~lib/started - end - ) - (func $start (; 22 ;) (type $FUNCSIG$v) - call $start:std/gc-object - ) - (func $null (; 23 ;) (type $FUNCSIG$v) - ) - (func $~iterateRoots (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) - global.get $std/gc-object/obj - local.get $0 - call_indirect (type $FUNCSIG$vi) - ) -) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index b7a0b6e4c2..085c417c39 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -135,7 +135,7 @@ if i32.const 0 i32.const 24 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -150,7 +150,7 @@ if i32.const 0 i32.const 24 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 0a4689938f..8e434e9b1c 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -167,7 +167,7 @@ if i32.const 0 i32.const 24 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -184,7 +184,7 @@ if i32.const 0 i32.const 24 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -467,7 +467,7 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 @@ -562,23 +562,14 @@ i32.store offset=20 ) (func $~lib/map/Map#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 1 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 1 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -1528,23 +1519,14 @@ i32.store offset=20 ) (func $~lib/map/Map#constructor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 4 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 4 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -2463,23 +2445,14 @@ i32.store offset=20 ) (func $~lib/map/Map#constructor (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.3 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 5 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 5 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -3444,23 +3417,14 @@ i32.store offset=20 ) (func $~lib/map/Map#constructor (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.4 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 6 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 6 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -4379,23 +4343,14 @@ i32.store offset=20 ) (func $~lib/map/Map#constructor (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.5 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 7 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 7 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -5332,23 +5287,14 @@ i32.store offset=20 ) (func $~lib/map/Map#constructor (; 64 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.6 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 8 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 8 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -6243,23 +6189,14 @@ i32.store offset=20 ) (func $~lib/map/Map#constructor (; 74 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.7 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 9 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 9 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -7252,23 +7189,14 @@ i32.store offset=20 ) (func $~lib/map/Map#constructor (; 85 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.8 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 10 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 10 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -8173,23 +8101,14 @@ i32.store offset=20 ) (func $~lib/map/Map#constructor (; 95 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.9 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 11 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 11 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -9099,23 +9018,14 @@ i32.store offset=20 ) (func $~lib/map/Map#constructor (; 105 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.10 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 12 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 12 + call $~lib/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 85bcd14fbc..fd7b8f26c2 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -84,7 +84,7 @@ if i32.const 0 i32.const 16 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -99,7 +99,7 @@ if i32.const 0 i32.const 16 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 460fb5f87d..01cbdc1431 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -142,7 +142,7 @@ if i32.const 0 i32.const 16 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -159,7 +159,7 @@ if i32.const 0 i32.const 16 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -170,24 +170,15 @@ local.get $0 ) (func $std/new/AClass#constructor (; 5 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) - (local $2 i32) local.get $0 block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - i32.const 8 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 - i32.const 1 - call $~lib/runtime/register - end + i32.const 8 + call $~lib/runtime/allocate + i32.const 1 + call $~lib/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 5a73a2f5d7..2582c45569 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -167,7 +167,7 @@ if i32.const 0 i32.const 16 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -182,7 +182,7 @@ if i32.const 0 i32.const 16 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index e3c97224ec..0d5539cda7 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -210,7 +210,7 @@ if i32.const 0 i32.const 16 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -227,7 +227,7 @@ if i32.const 0 i32.const 16 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -238,22 +238,13 @@ local.get $0 ) (func $std/operator-overloading/Tester#constructor (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - i32.const 8 - local.set $3 - local.get $3 - call $~lib/runtime/allocate - end - local.set $3 - local.get $3 - i32.const 1 - call $~lib/runtime/register - end + i32.const 8 + call $~lib/runtime/allocate + i32.const 1 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -1820,22 +1811,13 @@ call $std/operator-overloading/Tester#constructor ) (func $std/operator-overloading/TesterInlineStatic#constructor (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - i32.const 8 - local.set $3 - local.get $3 - call $~lib/runtime/allocate - end - local.set $3 - local.get $3 - i32.const 3 - call $~lib/runtime/register - end + i32.const 8 + call $~lib/runtime/allocate + i32.const 3 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -1847,22 +1829,13 @@ local.get $0 ) (func $std/operator-overloading/TesterInlineInstance#constructor (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) - i32.const 8 - local.set $3 - local.get $3 - call $~lib/runtime/allocate - end - local.set $3 - local.get $3 - i32.const 4 - call $~lib/runtime/register - end + i32.const 8 + call $~lib/runtime/allocate + i32.const 4 + call $~lib/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 0c5eca5904..f15914c5a1 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -38,11 +38,12 @@ (global $std/runtime/ref4 (mut i32) (i32.const 0)) (global $std/runtime/header4 (mut i32) (i32.const 0)) (global $std/runtime/ref5 (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export "main" (func $std/runtime/main)) (export ".capabilities" (global $~lib/capabilities)) - (start $start) (func $~lib/allocator/tlsf/Root#setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.const 22 @@ -2616,7 +2617,7 @@ if i32.const 0 i32.const 232 - i32.const 125 + i32.const 115 i32.const 8 call $~lib/env/abort unreachable @@ -2653,7 +2654,7 @@ if i32.const 0 i32.const 232 - i32.const 185 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable @@ -2668,7 +2669,7 @@ if i32.const 0 i32.const 232 - i32.const 187 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -2684,7 +2685,7 @@ if i32.const 0 i32.const 232 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -2699,7 +2700,7 @@ if i32.const 0 i32.const 232 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -2750,7 +2751,7 @@ else i32.const 0 i32.const 88 - i32.const 34 + i32.const 36 i32.const 2 call $~lib/env/abort unreachable @@ -2861,7 +2862,7 @@ if i32.const 0 i32.const 88 - i32.const 49 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -2873,7 +2874,7 @@ if i32.const 0 i32.const 88 - i32.const 50 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -2887,7 +2888,7 @@ if i32.const 0 i32.const 88 - i32.const 51 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable @@ -2899,7 +2900,7 @@ if i32.const 0 i32.const 88 - i32.const 52 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -2914,7 +2915,7 @@ if i32.const 0 i32.const 88 - i32.const 54 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -2930,7 +2931,7 @@ if i32.const 0 i32.const 88 - i32.const 56 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -2946,7 +2947,7 @@ if i32.const 0 i32.const 88 - i32.const 59 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -2962,7 +2963,7 @@ if i32.const 0 i32.const 88 - i32.const 63 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable @@ -2978,7 +2979,7 @@ if i32.const 0 i32.const 88 - i32.const 65 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -2990,7 +2991,7 @@ if i32.const 0 i32.const 88 - i32.const 66 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable @@ -3007,7 +3008,7 @@ if i32.const 0 i32.const 88 - i32.const 69 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable @@ -3023,14 +3024,20 @@ if i32.const 0 i32.const 88 - i32.const 70 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 26 ;) (type $FUNCSIG$v) - call $start:std/runtime + (func $std/runtime/main (; 26 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start:std/runtime + i32.const 1 + global.set $~lib/started + end ) (func $null (; 27 ;) (type $FUNCSIG$v) nop diff --git a/tests/compiler/std/runtime.ts b/tests/compiler/std/runtime.ts index 50a0bdc9c0..b83875c7cd 100644 --- a/tests/compiler/std/runtime.ts +++ b/tests/compiler/std/runtime.ts @@ -1,5 +1,7 @@ import "allocator/tlsf"; -import { CLASSID, ADJUSTOBLOCK, ALLOCATE, REALLOCATE, REGISTER, DISCARD, HEADER, HEADER_SIZE, HEADER_MAGIC } from "runtime"; +import { classId, ADJUSTOBLOCK, ALLOCATE, REALLOCATE, REGISTER, DISCARD, HEADER, HEADER_SIZE, HEADER_MAGIC } from "runtime"; + +@start export function main(): void {} var register_ref: usize = 0; @@ -23,7 +25,7 @@ var link_parentRef: usize = 0; class A {} class B {} -assert(CLASSID() != CLASSID()); +assert(classId() != classId()); function isPowerOf2(x: i32): bool { return x != 0 && (x & (x - 1)) == 0; @@ -62,7 +64,7 @@ var ref4 = ALLOCATE(barrier1); REGISTER(ref4); // should call __gc_register assert(register_ref == ref4); var header4 = changetype

(register_ref - HEADER_SIZE); -assert(header4.classId == CLASSID()); +assert(header4.classId == classId()); assert(header4.payloadSize == barrier1); var ref5 = ALLOCATE(10); diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index b1e3fdc5aa..57b6b1c66d 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -53,12 +53,13 @@ (global $std/runtime/ref4 (mut i32) (i32.const 0)) (global $std/runtime/header4 (mut i32) (i32.const 0)) (global $std/runtime/ref5 (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 264)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export "main" (func $std/runtime/main)) (export ".capabilities" (global $~lib/capabilities)) - (start $start) (func $start:~lib/allocator/tlsf (; 2 ;) (type $FUNCSIG$v) i32.const 1 global.get $~lib/allocator/tlsf/SL_BITS @@ -3303,7 +3304,7 @@ if i32.const 0 i32.const 232 - i32.const 125 + i32.const 115 i32.const 8 call $~lib/env/abort unreachable @@ -3345,7 +3346,7 @@ if i32.const 0 i32.const 232 - i32.const 185 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable @@ -3362,7 +3363,7 @@ if i32.const 0 i32.const 232 - i32.const 187 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -3379,7 +3380,7 @@ if i32.const 0 i32.const 232 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -3396,7 +3397,7 @@ if i32.const 0 i32.const 232 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -3433,7 +3434,7 @@ if i32.const 0 i32.const 88 - i32.const 26 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -3446,7 +3447,7 @@ if i32.const 0 i32.const 88 - i32.const 32 + i32.const 34 i32.const 0 call $~lib/env/abort unreachable @@ -3467,7 +3468,7 @@ if i32.const 0 i32.const 88 - i32.const 34 + i32.const 36 i32.const 2 call $~lib/env/abort unreachable @@ -3574,7 +3575,7 @@ if i32.const 0 i32.const 88 - i32.const 49 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -3587,7 +3588,7 @@ if i32.const 0 i32.const 88 - i32.const 50 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -3607,7 +3608,7 @@ if i32.const 0 i32.const 88 - i32.const 51 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable @@ -3620,7 +3621,7 @@ if i32.const 0 i32.const 88 - i32.const 52 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -3642,7 +3643,7 @@ if i32.const 0 i32.const 88 - i32.const 54 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -3659,7 +3660,7 @@ if i32.const 0 i32.const 88 - i32.const 56 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -3684,7 +3685,7 @@ if i32.const 0 i32.const 88 - i32.const 59 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -3711,7 +3712,7 @@ if i32.const 0 i32.const 88 - i32.const 63 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable @@ -3728,7 +3729,7 @@ if i32.const 0 i32.const 88 - i32.const 65 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -3741,7 +3742,7 @@ if i32.const 0 i32.const 88 - i32.const 66 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable @@ -3761,7 +3762,7 @@ if i32.const 0 i32.const 88 - i32.const 69 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable @@ -3774,15 +3775,24 @@ if i32.const 0 i32.const 88 - i32.const 70 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 35 ;) (type $FUNCSIG$v) + (func $std/runtime/main (; 35 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started + end + ) + (func $start (; 36 ;) (type $FUNCSIG$v) call $start:std/runtime ) - (func $null (; 36 ;) (type $FUNCSIG$v) + (func $null (; 37 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 5bf37495b4..9253add897 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 24 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -146,7 +146,7 @@ if i32.const 0 i32.const 24 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 9bef69a835..a966c05386 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -167,7 +167,7 @@ if i32.const 0 i32.const 24 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -184,7 +184,7 @@ if i32.const 0 i32.const 24 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -467,7 +467,7 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 @@ -562,23 +562,14 @@ i32.store offset=20 ) (func $~lib/set/Set#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 1 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 1 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -1391,23 +1382,14 @@ i32.store offset=20 ) (func $~lib/set/Set#constructor (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 4 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 4 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -2205,23 +2187,14 @@ i32.store offset=20 ) (func $~lib/set/Set#constructor (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.3 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 5 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 5 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -3049,23 +3022,14 @@ i32.store offset=20 ) (func $~lib/set/Set#constructor (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.4 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 6 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 6 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -3863,23 +3827,14 @@ i32.store offset=20 ) (func $~lib/set/Set#constructor (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.5 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 7 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 7 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -4711,23 +4666,14 @@ i32.store offset=20 ) (func $~lib/set/Set#constructor (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.6 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 8 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 8 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -5517,23 +5463,14 @@ i32.store offset=20 ) (func $~lib/set/Set#constructor (; 68 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.7 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 9 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 9 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -6414,23 +6351,14 @@ i32.store offset=20 ) (func $~lib/set/Set#constructor (; 78 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.8 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 10 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 10 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -7223,23 +7151,14 @@ i32.store offset=20 ) (func $~lib/set/Set#constructor (; 87 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.9 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 11 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 11 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -8036,23 +7955,14 @@ i32.store offset=20 ) (func $~lib/set/Set#constructor (; 96 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.10 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 12 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 12 + call $~lib/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index c2e0578688..dff911d940 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -1,8 +1,9 @@ (module + (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (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))) @@ -23,6 +24,8 @@ (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) (elem (i32.const 0) $null) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -34,22 +37,1175 @@ i32.shr_u i32.ge_u if - i32.const 0 - i32.const 240 - i32.const 98 - i32.const 61 - call $~lib/env/abort - unreachable + i32.const 0 + i32.const 240 + i32.const 98 + 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.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.tee $1 + local.get $0 + i32.const 1 + local.get $0 + i32.const 1 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + current_memory + local.tee $2 + i32.const 16 + i32.shl + i32.gt_u + if + local.get $2 + local.get $0 + local.get $1 + i32.sub + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $2 + local.get $3 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $0 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/util/memory/memcpy (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + loop $continue|0 + local.get $1 + i32.const 3 + i32.and + local.get $2 + local.get $2 + select + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|0 + end + end + local.get $0 + i32.const 3 + i32.and + i32.eqz + if + loop $continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|1 + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 8 + i32.add + local.set $0 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $1 + i32.const 4 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.add + local.set $0 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $1 + i32.const 2 + i32.add + local.set $1 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + local.get $0 + i32.const 3 + i32.and + local.tee $3 + i32.const 1 + i32.ne + if + local.get $3 + i32.const 2 + i32.eq + br_if $case1|2 + local.get $3 + i32.const 3 + i32.eq + br_if $case2|2 + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.get $1 + local.tee $3 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $1 + local.set $0 + local.get $1 + local.get $3 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + loop $continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + local.get $5 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 5 + i32.add + i32.load + local.tee $5 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 9 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + local.get $5 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 13 + i32.add + i32.load + local.tee $5 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|3 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + loop $continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 2 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 6 + i32.add + i32.load + local.tee $5 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 10 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 14 + i32.add + i32.load + local.tee $5 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|4 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + loop $continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 3 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + local.get $5 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 7 + i32.add + i32.load + local.tee $5 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 11 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + local.get $5 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 15 + i32.add + i32.load + local.tee $5 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|5 + end + end + end + end + local.get $2 + i32.const 16 + i32.and + if + local.get $0 + local.get $1 + local.tee $3 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $1 + local.set $0 + local.get $1 + local.get $3 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + local.tee $3 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $1 + local.set $0 + local.get $1 + local.get $3 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 end - i32.const 36 - i32.load - local.get $0 + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + local.tee $3 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $1 + local.set $0 + local.get $1 + local.get $3 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + local.set $0 + local.get $3 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + end + local.get $2 i32.const 2 - i32.shl - i32.add - i32.load + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + end + ) + (func $~lib/memory/memory.copy (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + local.tee $3 + i32.eqz + if + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + local.set $3 + end + local.get $3 + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + br $continue|0 + end + end + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 + end + end + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end + end + end + loop $continue|5 + local.get $2 + if + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end ) - (func $~lib/memory/memory.fill (; 2 ;) (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) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -260,9 +1416,11 @@ end end ) - (func $~lib/runtime/reallocate (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 i32.const 8 i32.sub @@ -293,9 +1451,50 @@ i32.clz i32.sub i32.shl + local.tee $4 i32.lt_u if - unreachable + local.get $4 + call $~lib/memory/memory.allocate + local.tee $4 + local.get $3 + i32.load + i32.store + local.get $4 + i32.const 8 + i32.add + local.tee $5 + local.get $0 + local.get $2 + call $~lib/memory/memory.copy + local.get $2 + local.get $5 + i32.add + local.get $1 + local.get $2 + i32.sub + call $~lib/memory/memory.fill + local.get $3 + i32.load + i32.const -1520547049 + i32.eq + if + local.get $0 + i32.const 312 + i32.le_u + if + i32.const 0 + i32.const 280 + i32.const 115 + i32.const 8 + call $~lib/env/abort + unreachable + end + end + local.get $4 + local.set $3 + local.get $5 + local.set $0 else local.get $0 local.get $2 @@ -311,7 +1510,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureCapacity (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -359,7 +1558,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 5 ;) (type $FUNCSIG$v) + (func $~lib/array/Array#__set (; 8 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 44 i32.load @@ -380,7 +1579,7 @@ i32.store end ) - (func $~lib/array/Array#__get (; 6 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) + (func $~lib/array/Array#__get (; 9 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) local.get $0 i32.const 88 i32.load @@ -403,7 +1602,7 @@ i32.add i64.load ) - (func $~lib/array/Array#__set (; 7 ;) (type $FUNCSIG$v) + (func $~lib/array/Array#__set (; 10 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 92 i32.load @@ -424,7 +1623,7 @@ i32.store end ) - (func $~lib/array/Array#__get (; 8 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $~lib/array/Array#__get (; 11 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) local.get $0 i32.const 128 i32.load @@ -447,7 +1646,7 @@ i32.add f32.load ) - (func $~lib/array/Array#__set (; 9 ;) (type $FUNCSIG$v) + (func $~lib/array/Array#__set (; 12 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 132 i32.load @@ -468,7 +1667,7 @@ i32.store end ) - (func $~lib/array/Array#__get (; 10 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/array/Array#__get (; 13 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) local.get $0 i32.const 176 i32.load @@ -491,7 +1690,7 @@ i32.add f64.load ) - (func $~lib/array/Array#__set (; 11 ;) (type $FUNCSIG$v) + (func $~lib/array/Array#__set (; 14 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 180 i32.load @@ -512,7 +1711,7 @@ i32.store end ) - (func $start:std/static-array (; 12 ;) (type $FUNCSIG$v) + (func $start:std/static-array (; 15 ;) (type $FUNCSIG$v) i32.const 44 i32.load i32.const 2 @@ -520,7 +1719,7 @@ if i32.const 0 i32.const 192 - i32.const 6 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -532,7 +1731,7 @@ if i32.const 0 i32.const 192 - i32.const 7 + i32.const 9 i32.const 0 call $~lib/env/abort unreachable @@ -544,11 +1743,15 @@ if i32.const 0 i32.const 192 - i32.const 8 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable end + i32.const 312 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset call $~lib/array/Array#__set i32.const 0 call $~lib/array/Array#__get @@ -557,7 +1760,7 @@ if i32.const 0 i32.const 192 - i32.const 10 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -569,7 +1772,7 @@ if i32.const 0 i32.const 192 - i32.const 12 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -581,7 +1784,7 @@ if i32.const 0 i32.const 192 - i32.const 13 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -593,7 +1796,7 @@ if i32.const 0 i32.const 192 - i32.const 14 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -606,7 +1809,7 @@ if i32.const 0 i32.const 192 - i32.const 16 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -618,7 +1821,7 @@ if i32.const 0 i32.const 192 - i32.const 18 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -630,7 +1833,7 @@ if i32.const 0 i32.const 192 - i32.const 19 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -642,7 +1845,7 @@ if i32.const 0 i32.const 192 - i32.const 20 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -655,7 +1858,7 @@ if i32.const 0 i32.const 192 - i32.const 22 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -667,7 +1870,7 @@ if i32.const 0 i32.const 192 - i32.const 24 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -679,7 +1882,7 @@ if i32.const 0 i32.const 192 - i32.const 25 + i32.const 27 i32.const 0 call $~lib/env/abort unreachable @@ -691,7 +1894,7 @@ if i32.const 0 i32.const 192 - i32.const 26 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -704,16 +1907,16 @@ if i32.const 0 i32.const 192 - i32.const 28 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 13 ;) (type $FUNCSIG$v) + (func $start (; 16 ;) (type $FUNCSIG$v) call $start:std/static-array ) - (func $null (; 14 ;) (type $FUNCSIG$v) + (func $null (; 17 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/static-array.ts b/tests/compiler/std/static-array.ts index 4fee0db3e0..851e819833 100644 --- a/tests/compiler/std/static-array.ts +++ b/tests/compiler/std/static-array.ts @@ -1,3 +1,5 @@ +import "allocator/arena"; // assignment checks for possible resize + const i: i32[] = [1, 2]; const I: i64[] = [3, 4]; const f: f32[] = [1.5, 2.5]; diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 170389a6fc..ef7fc73743 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -33,6 +33,8 @@ (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 312)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -82,7 +84,89 @@ i32.shl ) (func $~lib/memory/memory.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - unreachable + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $2 + local.get $2 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 + local.get $3 + local.get $4 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $3 + current_memory + local.set $4 + local.get $3 + local.get $4 + i32.const 16 + i32.shl + i32.gt_u + if + local.get $3 + local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 + end + return ) (func $~lib/util/memory/memcpy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -1774,7 +1858,9 @@ end ) (func $~lib/memory/memory.free (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) - nop + (local $1 i32) + local.get $0 + local.set $1 ) (func $~lib/runtime/reallocate (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -1841,7 +1927,7 @@ if i32.const 0 i32.const 280 - i32.const 125 + i32.const 115 i32.const 8 call $~lib/env/abort unreachable @@ -2180,7 +2266,7 @@ if i32.const 0 i32.const 192 - i32.const 6 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -2194,7 +2280,7 @@ if i32.const 0 i32.const 192 - i32.const 7 + i32.const 9 i32.const 0 call $~lib/env/abort unreachable @@ -2208,11 +2294,21 @@ if i32.const 0 i32.const 192 - i32.const 8 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable end + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset global.get $std/static-array/i i32.const 0 i32.const 2 @@ -2226,7 +2322,7 @@ if i32.const 0 i32.const 192 - i32.const 10 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -2239,7 +2335,7 @@ if i32.const 0 i32.const 192 - i32.const 12 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -2253,7 +2349,7 @@ if i32.const 0 i32.const 192 - i32.const 13 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -2267,7 +2363,7 @@ if i32.const 0 i32.const 192 - i32.const 14 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -2285,7 +2381,7 @@ if i32.const 0 i32.const 192 - i32.const 16 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -2298,7 +2394,7 @@ if i32.const 0 i32.const 192 - i32.const 18 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -2312,7 +2408,7 @@ if i32.const 0 i32.const 192 - i32.const 19 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -2326,7 +2422,7 @@ if i32.const 0 i32.const 192 - i32.const 20 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -2344,7 +2440,7 @@ if i32.const 0 i32.const 192 - i32.const 22 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -2357,7 +2453,7 @@ if i32.const 0 i32.const 192 - i32.const 24 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -2371,7 +2467,7 @@ if i32.const 0 i32.const 192 - i32.const 25 + i32.const 27 i32.const 0 call $~lib/env/abort unreachable @@ -2385,7 +2481,7 @@ if i32.const 0 i32.const 192 - i32.const 26 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -2403,7 +2499,7 @@ if i32.const 0 i32.const 192 - i32.const 28 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index b414463378..0f0e29d915 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -1514,7 +1514,7 @@ if i32.const 0 i32.const 136 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -1529,7 +1529,7 @@ if i32.const 0 i32.const 136 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index 07c3f866b0..fb86de89ff 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -1928,7 +1928,7 @@ if i32.const 0 i32.const 136 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -1945,7 +1945,7 @@ if i32.const 0 i32.const 136 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 98c1e44b43..cf7ff82d40 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -444,7 +444,7 @@ if i32.const 0 i32.const 120 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -459,7 +459,7 @@ if i32.const 0 i32.const 120 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -3289,7 +3289,7 @@ if i32.const 0 i32.const 120 - i32.const 125 + i32.const 115 i32.const 8 call $~lib/env/abort unreachable @@ -5235,7 +5235,7 @@ if i32.const 0 i32.const 120 - i32.const 185 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable @@ -5249,7 +5249,7 @@ if i32.const 0 i32.const 120 - i32.const 187 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 3a3b500dbb..691b2a94d0 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -366,7 +366,7 @@ if i32.const 0 i32.const 120 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -383,7 +383,7 @@ if i32.const 0 i32.const 120 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -3505,15 +3505,15 @@ (local $9 i32) i32.const 16 call $~lib/runtime/allocate - local.get $2 + local.get $1 call $~lib/runtime/register local.set $4 local.get $0 - local.get $3 + local.get $2 i32.shl local.set $5 local.get $0 - local.get $3 + local.get $2 i32.shl call $~lib/runtime/allocate i32.const 3 @@ -3551,10 +3551,10 @@ local.get $4 local.get $0 i32.store offset=12 - local.get $1 + local.get $3 if local.get $6 - local.get $1 + local.get $3 local.get $5 call $~lib/memory/memory.copy end @@ -3893,7 +3893,7 @@ if i32.const 0 i32.const 120 - i32.const 125 + i32.const 115 i32.const 8 call $~lib/env/abort unreachable @@ -4123,9 +4123,9 @@ i32.const 0 local.set $3 local.get $4 - local.get $3 i32.const 2 i32.const 2 + local.get $3 call $~lib/runtime/makeArray end return @@ -4135,17 +4135,11 @@ i32.eq if block (result i32) - block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $5 - local.get $6 - i32.const 2 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 1 + i32.const 2 + i32.const 2 + i32.const 0 + call $~lib/runtime/makeArray local.set $3 local.get $3 i32.load offset=4 @@ -4153,11 +4147,11 @@ local.get $4 block (result i32) local.get $0 - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $3 call $~lib/collector/dummy/__ref_link - local.get $6 + local.get $5 end i32.store local.get $3 @@ -4166,10 +4160,10 @@ end local.get $0 call $~lib/string/String#get:length - local.set $7 + local.set $6 local.get $1 call $~lib/string/String#get:length - local.set $8 + local.set $7 local.get $2 i32.const 0 i32.lt_s @@ -4177,26 +4171,26 @@ global.get $~lib/builtins/i32.MAX_VALUE local.set $2 end - local.get $8 + local.get $7 i32.eqz if - local.get $7 + local.get $6 i32.eqz if - block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) i32.const 0 local.set $3 i32.const 0 local.set $4 local.get $3 - local.get $4 i32.const 2 i32.const 2 + local.get $4 call $~lib/runtime/makeArray end return end - local.get $7 + local.get $6 local.tee $4 local.get $2 local.tee $3 @@ -4204,16 +4198,16 @@ local.get $3 i32.lt_s select - local.set $7 - block $~lib/runtime/MAKEARRAY|inlined.3 (result i32) - local.get $7 + local.set $6 + block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) + local.get $6 local.set $3 i32.const 0 local.set $4 local.get $3 - local.get $4 i32.const 2 i32.const 2 + local.get $4 call $~lib/runtime/makeArray end local.set $4 @@ -4222,10 +4216,10 @@ local.set $3 block $break|0 i32.const 0 - local.set $6 + local.set $5 loop $repeat|0 + local.get $5 local.get $6 - local.get $7 i32.lt_s i32.eqz br_if $break|0 @@ -4237,35 +4231,35 @@ local.get $9 call $~lib/runtime/allocate end - local.set $5 - local.get $5 + local.set $8 + local.get $8 i32.const 1 call $~lib/runtime/register end - local.set $5 - local.get $5 + local.set $8 + local.get $8 local.get $0 - local.get $6 + local.get $5 i32.const 1 i32.shl i32.add i32.load16_u i32.store16 local.get $3 - local.get $6 + local.get $5 i32.const 2 i32.shl i32.add - local.get $5 + local.get $8 i32.store - local.get $5 + local.get $8 local.get $4 call $~lib/collector/dummy/__ref_link end - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $repeat|0 unreachable end @@ -4274,18 +4268,18 @@ local.get $4 return else - local.get $7 + local.get $6 i32.eqz if - block $~lib/runtime/MAKEARRAY|inlined.4 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.3 (result i32) i32.const 1 local.set $4 i32.const 0 local.set $3 local.get $4 - local.get $3 i32.const 2 i32.const 2 + local.get $3 call $~lib/runtime/makeArray end local.set $3 @@ -4297,15 +4291,15 @@ return end end - block $~lib/runtime/MAKEARRAY|inlined.5 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.4 (result i32) i32.const 0 local.set $4 i32.const 0 local.set $3 local.get $4 - local.get $3 i32.const 2 i32.const 2 + local.get $3 call $~lib/runtime/makeArray end local.set $10 @@ -4362,8 +4356,8 @@ local.get $10 block $~lib/runtime/REGISTER|inlined.8 (result i32) local.get $4 - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 1 call $~lib/runtime/register end @@ -4386,7 +4380,7 @@ return end local.get $11 - local.get $8 + local.get $7 i32.add local.set $12 end @@ -4397,15 +4391,15 @@ local.get $12 i32.eqz if - block $~lib/runtime/MAKEARRAY|inlined.6 (result i32) + block $~lib/runtime/MAKEARRAY|inlined.5 (result i32) i32.const 1 local.set $4 i32.const 0 local.set $3 local.get $4 - local.get $3 i32.const 2 i32.const 2 + local.get $3 call $~lib/runtime/makeArray end local.set $3 @@ -4416,7 +4410,7 @@ local.get $3 return end - local.get $7 + local.get $6 local.get $12 i32.sub local.set $14 @@ -6711,7 +6705,7 @@ if i32.const 0 i32.const 120 - i32.const 185 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable @@ -6728,7 +6722,7 @@ if i32.const 0 i32.const 120 - i32.const 187 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index c5763b4b93..5bb97e79a0 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -144,7 +144,7 @@ if i32.const 0 i32.const 72 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -159,7 +159,7 @@ if i32.const 0 i32.const 72 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index efdc7242dc..8c3296f702 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -201,7 +201,7 @@ if i32.const 0 i32.const 72 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -218,7 +218,7 @@ if i32.const 0 i32.const 72 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -499,7 +499,7 @@ call $~lib/env/abort unreachable end - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 @@ -545,23 +545,14 @@ i32.store offset=20 ) (func $~lib/map/Map#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 2 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 2 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -614,23 +605,14 @@ i32.store offset=20 ) (func $~lib/map/Map#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) - i32.const 24 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $1 - local.get $1 - i32.const 4 - call $~lib/runtime/register - end + i32.const 24 + call $~lib/runtime/allocate + i32.const 4 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -3036,7 +3018,7 @@ i32.const 160 return end - block $~lib/runtime/ALLOCATE|inlined.3 (result i32) + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) local.get $4 local.set $5 local.get $5 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 6dd364663b..e3a5e1ecbf 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -439,7 +439,7 @@ if i32.const 0 i32.const 80 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -454,7 +454,7 @@ if i32.const 0 i32.const 80 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -497,7 +497,7 @@ if i32.const 0 i32.const 80 - i32.const 244 + i32.const 234 i32.const 57 call $~lib/env/abort unreachable @@ -3055,26 +3055,26 @@ (local $5 i32) i32.const 16 call $~lib/runtime/allocate - local.get $2 + local.get $1 call $~lib/runtime/register local.set $4 local.get $0 - local.get $3 + local.get $2 i32.shl local.tee $5 call $~lib/runtime/allocate i32.const 2 call $~lib/runtime/register - local.tee $3 - local.set $2 + local.tee $2 + local.set $1 local.get $4 i32.load drop local.get $4 - local.get $2 + local.get $1 i32.store local.get $4 - local.get $3 + local.get $2 i32.store offset=4 local.get $4 local.get $5 @@ -3082,10 +3082,10 @@ local.get $4 local.get $0 i32.store offset=12 - local.get $1 + local.get $3 if + local.get $2 local.get $3 - local.get $1 local.get $5 call $~lib/memory/memory.copy end @@ -13038,9 +13038,9 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 240 i32.const 15 i32.const 0 + i32.const 240 call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -13059,9 +13059,9 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 312 i32.const 15 i32.const 0 + i32.const 312 call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -13080,9 +13080,9 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 336 i32.const 15 i32.const 0 + i32.const 336 call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -13101,9 +13101,9 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 360 i32.const 15 i32.const 0 + i32.const 360 call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -13122,9 +13122,9 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 384 i32.const 15 i32.const 0 + i32.const 384 call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -13188,9 +13188,9 @@ end global.get $std/typedarray/sub8 i32.const 3 - i32.const 408 i32.const 15 i32.const 0 + i32.const 408 call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -13204,9 +13204,9 @@ end global.get $std/typedarray/arr8 i32.const 5 - i32.const 432 i32.const 15 i32.const 0 + i32.const 432 call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -13248,9 +13248,9 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 456 i32.const 16 i32.const 2 + i32.const 456 call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -13269,9 +13269,9 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 496 i32.const 16 i32.const 2 + i32.const 496 call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -13290,9 +13290,9 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 536 i32.const 16 i32.const 2 + i32.const 536 call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -13311,9 +13311,9 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 576 i32.const 16 i32.const 2 + i32.const 576 call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -13332,9 +13332,9 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 616 i32.const 16 i32.const 2 + i32.const 616 call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -13400,9 +13400,9 @@ end global.get $std/typedarray/sub32 i32.const 3 - i32.const 656 i32.const 16 i32.const 2 + i32.const 656 call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -13416,9 +13416,9 @@ end global.get $std/typedarray/arr32 i32.const 5 - i32.const 688 i32.const 16 i32.const 2 + i32.const 688 call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 768405ab36..11b32d9081 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -498,7 +498,7 @@ if i32.const 0 i32.const 80 - i32.const 161 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -515,7 +515,7 @@ if i32.const 0 i32.const 80 - i32.const 163 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -579,7 +579,7 @@ if i32.const 0 i32.const 80 - i32.const 244 + i32.const 234 i32.const 57 call $~lib/env/abort unreachable @@ -595,18 +595,10 @@ local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - i32.const 12 - local.set $4 - local.get $4 - call $~lib/runtime/allocate - end - local.set $4 - local.get $4 - i32.const 3 - call $~lib/runtime/register - end + i32.const 12 + call $~lib/runtime/allocate + i32.const 3 + call $~lib/runtime/register local.set $0 end local.get $0 @@ -651,19 +643,12 @@ local.get $0 ) (func $~lib/typedarray/Int8Array#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 if (result i32) local.get $0 else - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) - i32.const 12 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 12 + call $~lib/runtime/allocate i32.const 4 call $~lib/runtime/register end @@ -689,19 +674,12 @@ call $~lib/runtime/ArrayBufferView#get:byteLength ) (func $~lib/typedarray/Uint8Array#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 if (result i32) local.get $0 else - block $~lib/runtime/ALLOCATE|inlined.3 (result i32) - i32.const 12 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 12 + call $~lib/runtime/allocate i32.const 5 call $~lib/runtime/register end @@ -716,19 +694,12 @@ call $~lib/runtime/ArrayBufferView#get:byteLength ) (func $~lib/typedarray/Uint8ClampedArray#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 if (result i32) local.get $0 else - block $~lib/runtime/ALLOCATE|inlined.4 (result i32) - i32.const 12 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 12 + call $~lib/runtime/allocate i32.const 6 call $~lib/runtime/register end @@ -743,19 +714,12 @@ call $~lib/runtime/ArrayBufferView#get:byteLength ) (func $~lib/typedarray/Int16Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 if (result i32) local.get $0 else - block $~lib/runtime/ALLOCATE|inlined.5 (result i32) - i32.const 12 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 12 + call $~lib/runtime/allocate i32.const 7 call $~lib/runtime/register end @@ -772,19 +736,12 @@ i32.shr_u ) (func $~lib/typedarray/Uint16Array#constructor (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 if (result i32) local.get $0 else - block $~lib/runtime/ALLOCATE|inlined.6 (result i32) - i32.const 12 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 12 + call $~lib/runtime/allocate i32.const 8 call $~lib/runtime/register end @@ -801,19 +758,12 @@ i32.shr_u ) (func $~lib/typedarray/Int32Array#constructor (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 if (result i32) local.get $0 else - block $~lib/runtime/ALLOCATE|inlined.7 (result i32) - i32.const 12 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 12 + call $~lib/runtime/allocate i32.const 9 call $~lib/runtime/register end @@ -830,19 +780,12 @@ i32.shr_u ) (func $~lib/typedarray/Uint32Array#constructor (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 if (result i32) local.get $0 else - block $~lib/runtime/ALLOCATE|inlined.8 (result i32) - i32.const 12 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 12 + call $~lib/runtime/allocate i32.const 10 call $~lib/runtime/register end @@ -859,19 +802,12 @@ i32.shr_u ) (func $~lib/typedarray/Int64Array#constructor (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 if (result i32) local.get $0 else - block $~lib/runtime/ALLOCATE|inlined.9 (result i32) - i32.const 12 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 12 + call $~lib/runtime/allocate i32.const 11 call $~lib/runtime/register end @@ -888,19 +824,12 @@ i32.shr_u ) (func $~lib/typedarray/Uint64Array#constructor (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 if (result i32) local.get $0 else - block $~lib/runtime/ALLOCATE|inlined.10 (result i32) - i32.const 12 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 12 + call $~lib/runtime/allocate i32.const 12 call $~lib/runtime/register end @@ -917,19 +846,12 @@ i32.shr_u ) (func $~lib/typedarray/Float32Array#constructor (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 if (result i32) local.get $0 else - block $~lib/runtime/ALLOCATE|inlined.11 (result i32) - i32.const 12 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 12 + call $~lib/runtime/allocate i32.const 13 call $~lib/runtime/register end @@ -946,19 +868,12 @@ i32.shr_u ) (func $~lib/typedarray/Float64Array#constructor (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 if (result i32) local.get $0 else - block $~lib/runtime/ALLOCATE|inlined.12 (result i32) - i32.const 12 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 12 + call $~lib/runtime/allocate i32.const 14 call $~lib/runtime/register end @@ -1608,8 +1523,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.13 (result i32) + block $~lib/runtime/REGISTER|inlined.0 (result i32) + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) i32.const 12 local.set $8 local.get $8 @@ -1769,8 +1684,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.14 (result i32) + block $~lib/runtime/REGISTER|inlined.0 (result i32) + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) i32.const 12 local.set $8 local.get $8 @@ -3987,15 +3902,15 @@ (local $9 i32) i32.const 16 call $~lib/runtime/allocate - local.get $2 + local.get $1 call $~lib/runtime/register local.set $4 local.get $0 - local.get $3 + local.get $2 i32.shl local.set $5 local.get $0 - local.get $3 + local.get $2 i32.shl call $~lib/runtime/allocate i32.const 2 @@ -4033,10 +3948,10 @@ local.get $4 local.get $0 i32.store offset=12 - local.get $1 + local.get $3 if local.get $6 - local.get $1 + local.get $3 local.get $5 call $~lib/memory/memory.copy end @@ -4220,8 +4135,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.15 (result i32) + block $~lib/runtime/REGISTER|inlined.0 (result i32) + block $~lib/runtime/ALLOCATE|inlined.3 (result i32) i32.const 12 local.set $8 local.get $8 @@ -15189,8 +15104,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.16 (result i32) + block $~lib/runtime/REGISTER|inlined.0 (result i32) + block $~lib/runtime/ALLOCATE|inlined.4 (result i32) i32.const 12 local.set $8 local.get $8 @@ -15554,8 +15469,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.17 (result i32) + block $~lib/runtime/REGISTER|inlined.0 (result i32) + block $~lib/runtime/ALLOCATE|inlined.5 (result i32) i32.const 12 local.set $8 local.get $8 @@ -15919,8 +15834,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.18 (result i32) + block $~lib/runtime/REGISTER|inlined.0 (result i32) + block $~lib/runtime/ALLOCATE|inlined.6 (result i32) i32.const 12 local.set $8 local.get $8 @@ -16290,8 +16205,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.19 (result i32) + block $~lib/runtime/REGISTER|inlined.0 (result i32) + block $~lib/runtime/ALLOCATE|inlined.7 (result i32) i32.const 12 local.set $8 local.get $8 @@ -16877,8 +16792,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.20 (result i32) + block $~lib/runtime/REGISTER|inlined.0 (result i32) + block $~lib/runtime/ALLOCATE|inlined.8 (result i32) i32.const 12 local.set $8 local.get $8 @@ -17236,8 +17151,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.21 (result i32) + block $~lib/runtime/REGISTER|inlined.0 (result i32) + block $~lib/runtime/ALLOCATE|inlined.9 (result i32) i32.const 12 local.set $8 local.get $8 @@ -17598,8 +17513,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.22 (result i32) + block $~lib/runtime/REGISTER|inlined.0 (result i32) + block $~lib/runtime/ALLOCATE|inlined.10 (result i32) i32.const 12 local.set $8 local.get $8 @@ -17960,8 +17875,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER|inlined.1 (result i32) - block $~lib/runtime/ALLOCATE|inlined.23 (result i32) + block $~lib/runtime/REGISTER|inlined.0 (result i32) + block $~lib/runtime/ALLOCATE|inlined.11 (result i32) i32.const 12 local.set $8 local.get $8 @@ -18400,7 +18315,6 @@ ) (func $start:std/typedarray (; 378 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32.const 1 i32.eq @@ -18933,17 +18847,11 @@ call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) - i32.const 5 - local.set $0 - i32.const 240 - local.set $1 - local.get $0 - local.get $1 - i32.const 15 - i32.const 0 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 15 + i32.const 0 + i32.const 240 + call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -18961,17 +18869,11 @@ call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) - i32.const 5 - local.set $1 - i32.const 312 - local.set $0 - local.get $1 - local.get $0 - i32.const 15 - i32.const 0 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 15 + i32.const 0 + i32.const 312 + call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -18989,17 +18891,11 @@ call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) - i32.const 5 - local.set $0 - i32.const 336 - local.set $1 - local.get $0 - local.get $1 - i32.const 15 - i32.const 0 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 15 + i32.const 0 + i32.const 336 + call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -19017,17 +18913,11 @@ call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - block $~lib/runtime/MAKEARRAY|inlined.3 (result i32) - i32.const 5 - local.set $1 - i32.const 360 - local.set $0 - local.get $1 - local.get $0 - i32.const 15 - i32.const 0 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 15 + i32.const 0 + i32.const 360 + call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -19045,17 +18935,11 @@ call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - block $~lib/runtime/MAKEARRAY|inlined.4 (result i32) - i32.const 5 - local.set $0 - i32.const 384 - local.set $1 - local.get $0 - local.get $1 - i32.const 15 - i32.const 0 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 15 + i32.const 0 + i32.const 384 + call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -19117,17 +19001,11 @@ unreachable end global.get $std/typedarray/sub8 - block $~lib/runtime/MAKEARRAY|inlined.5 (result i32) - i32.const 3 - local.set $1 - i32.const 408 - local.set $0 - local.get $1 - local.get $0 - i32.const 15 - i32.const 0 - call $~lib/runtime/makeArray - end + i32.const 3 + i32.const 15 + i32.const 0 + i32.const 408 + call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -19139,17 +19017,11 @@ unreachable end global.get $std/typedarray/arr8 - block $~lib/runtime/MAKEARRAY|inlined.6 (result i32) - i32.const 5 - local.set $0 - i32.const 432 - local.set $1 - local.get $0 - local.get $1 - i32.const 15 - i32.const 0 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 15 + i32.const 0 + i32.const 432 + call $~lib/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -19191,17 +19063,11 @@ call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) - i32.const 5 - local.set $1 - i32.const 456 - local.set $0 - local.get $1 - local.get $0 - i32.const 16 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 16 + i32.const 2 + i32.const 456 + call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -19219,17 +19085,11 @@ call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) - i32.const 5 - local.set $0 - i32.const 496 - local.set $1 - local.get $0 - local.get $1 - i32.const 16 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 16 + i32.const 2 + i32.const 496 + call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -19247,17 +19107,11 @@ call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) - i32.const 5 - local.set $1 - i32.const 536 - local.set $0 - local.get $1 - local.get $0 - i32.const 16 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 16 + i32.const 2 + i32.const 536 + call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -19275,17 +19129,11 @@ call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - block $~lib/runtime/MAKEARRAY|inlined.3 (result i32) - i32.const 5 - local.set $0 - i32.const 576 - local.set $1 - local.get $0 - local.get $1 - i32.const 16 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 16 + i32.const 2 + i32.const 576 + call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -19303,17 +19151,11 @@ call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - block $~lib/runtime/MAKEARRAY|inlined.4 (result i32) - i32.const 5 - local.set $1 - i32.const 616 - local.set $0 - local.get $1 - local.get $0 - i32.const 16 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 16 + i32.const 2 + i32.const 616 + call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -19379,17 +19221,11 @@ unreachable end global.get $std/typedarray/sub32 - block $~lib/runtime/MAKEARRAY|inlined.5 (result i32) - i32.const 3 - local.set $0 - i32.const 656 - local.set $1 - local.get $0 - local.get $1 - i32.const 16 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 3 + i32.const 16 + i32.const 2 + i32.const 656 + call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -19401,17 +19237,11 @@ unreachable end global.get $std/typedarray/arr32 - block $~lib/runtime/MAKEARRAY|inlined.6 (result i32) - i32.const 5 - local.set $1 - i32.const 688 - local.set $0 - local.get $1 - local.get $0 - i32.const 16 - i32.const 2 - call $~lib/runtime/makeArray - end + i32.const 5 + i32.const 16 + i32.const 2 + i32.const 688 + call $~lib/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if From f7ad5f85ca9f927853c0fc151dd9c387d1c01a05 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 27 Mar 2019 15:05:45 +0100 Subject: [PATCH 068/119] fixes --- src/compiler.ts | 7 + src/diagnosticMessages.generated.ts | 4 +- src/diagnosticMessages.json | 2 +- src/program.ts | 11 + std/assembly/memory.ts | 11 +- tests/allocators/arena/optimized.wat | 1420 ++++++++++- tests/allocators/arena/untouched.wat | 1729 ++++++++++++- tests/allocators/buddy/assembly/buddy.ts | 535 ++++ tests/allocators/buddy/assembly/index.ts | 2 +- tests/allocators/buddy/optimized.wat | 1656 ++++++++++-- tests/allocators/buddy/untouched.wat | 1936 ++++++++++++-- tests/allocators/tlsf/optimized.wat | 1537 +++++++++++- tests/allocators/tlsf/untouched.wat | 2218 ++++++++++++++--- tests/compiler/new-without-allocator.ts | 1 + .../new-without-allocator.untouched.wat | 107 - 15 files changed, 9932 insertions(+), 1244 deletions(-) create mode 100644 tests/allocators/buddy/assembly/buddy.ts diff --git a/src/compiler.ts b/src/compiler.ts index fc6b9555d6..04bf6e5b6b 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -8091,6 +8091,13 @@ export class Compiler extends DiagnosticEmitter { var options = this.options; var classType = classInstance.type; + if (!program.allocateMem) { + this.error( + DiagnosticCode.An_allocator_must_be_present_to_use_0, + reportNode.range, "new" + ); + } + if (classInstance.hasDecorator(DecoratorFlags.UNMANAGED)) { // memory.allocate(sizeof()) this.currentType = classType; diff --git a/src/diagnosticMessages.generated.ts b/src/diagnosticMessages.generated.ts index 9fc1e2e429..d678ac493c 100644 --- a/src/diagnosticMessages.generated.ts +++ b/src/diagnosticMessages.generated.ts @@ -24,7 +24,7 @@ export enum DiagnosticCode { Class_0_is_sealed_and_cannot_be_extended = 211, Decorator_0_is_not_valid_here = 212, Duplicate_decorator = 213, - An_allocator_must_be_declared_to_allocate_memory_Try_importing_allocator_arena_or_allocator_tlsf = 214, + An_allocator_must_be_present_to_use_0 = 214, Optional_parameter_must_have_an_initializer = 215, Constructor_of_class_0_must_not_require_any_arguments = 216, Function_0_cannot_be_inlined_into_itself = 217, @@ -161,7 +161,7 @@ export function diagnosticCodeToString(code: DiagnosticCode): string { case 211: return "Class '{0}' is sealed and cannot be extended."; case 212: return "Decorator '{0}' is not valid here."; case 213: return "Duplicate decorator."; - case 214: return "An allocator must be declared to allocate memory. Try importing allocator/arena or allocator/tlsf."; + case 214: return "An allocator must be present to use '{0}'."; case 215: return "Optional parameter must have an initializer."; case 216: return "Constructor of class '{0}' must not require any arguments."; case 217: return "Function '{0}' cannot be inlined into itself."; diff --git a/src/diagnosticMessages.json b/src/diagnosticMessages.json index 906e67129c..6516c953af 100644 --- a/src/diagnosticMessages.json +++ b/src/diagnosticMessages.json @@ -16,7 +16,7 @@ "Class '{0}' is sealed and cannot be extended.": 211, "Decorator '{0}' is not valid here.": 212, "Duplicate decorator.": 213, - "An allocator must be declared to allocate memory. Try importing allocator/arena or allocator/tlsf.": 214, + "An allocator must be present to use '{0}'.": 214, "Optional parameter must have an initializer.": 215, "Constructor of class '{0}' must not require any arguments.": 216, "Function '{0}' cannot be inlined into itself.": 217, diff --git a/src/program.ts b/src/program.ts index 9cff3fc7af..f677e9a3d2 100644 --- a/src/program.ts +++ b/src/program.ts @@ -367,6 +367,8 @@ export class Program extends DiagnosticEmitter { /** Runtime make array function. `makeArray(capacity: i32, source: usize = 0, cid: u32): usize` */ makeArrayInstance: Function | null = null; + allocateMem: Function | null = null; + freeMem: Function | null = null; linkRef: Function | null = null; unlinkRef: Function | null = null; retainRef: Function | null = null; @@ -835,6 +837,15 @@ export class Program extends DiagnosticEmitter { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.makeArrayInstance = this.resolver.resolveFunction(element, null); } + // memory allocator interface + if (element = this.lookupGlobal("__memory_allocate")) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.allocateMem = this.resolver.resolveFunction(element, null); + element = assert(this.lookupGlobal("__memory_free")); + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.freeMem = this.resolver.resolveFunction(element, null); + } + // garbage collector interface if (this.lookupGlobal("__ref_collect")) { if (element = this.lookupGlobal("__ref_link")) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); diff --git a/std/assembly/memory.ts b/std/assembly/memory.ts index 190e995f80..3e86001f1b 100644 --- a/std/assembly/memory.ts +++ b/std/assembly/memory.ts @@ -35,14 +35,14 @@ export namespace memory { // @ts-ignore: decorator @unsafe export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void { - ERROR("not implemented"); + unreachable(); // not yet implemented } /** Drops a memory segment. */ // @ts-ignore: decorator @unsafe export function drop(segmentIndex: u32): void { - ERROR("not implemented"); + unreachable(); // not yet implemented } /** Dynamically allocates a section of memory and returns its address. */ @@ -51,8 +51,7 @@ export namespace memory { export function allocate(size: usize): usize { // @ts-ignore: stub if (isDefined(__memory_allocate)) return __memory_allocate(size); - else WARNING("missing implementation: memory.allocate"); - return unreachable(); + else return unreachable(); } /** Dynamically frees a section of memory by the previously allocated address. */ @@ -61,7 +60,7 @@ export namespace memory { export function free(ptr: usize): void { // @ts-ignore: stub if (isDefined(__memory_free)) __memory_free(ptr); - else WARNING("missing implementation: memory.free"); + else unreachable(); } /** Resets the memory to its initial state. Arena allocator only. */ @@ -70,7 +69,7 @@ export namespace memory { export function reset(): void { // @ts-ignore: stub if (isDefined(__memory_reset)) __memory_reset(); - else WARNING("missing implementation: memory.reset"); + else unreachable(); } /** Repeats a section of memory at a specific address. */ diff --git a/tests/allocators/arena/optimized.wat b/tests/allocators/arena/optimized.wat index 0756cb695a..b4b341e5d9 100644 --- a/tests/allocators/arena/optimized.wat +++ b/tests/allocators/arena/optimized.wat @@ -1,8 +1,10 @@ (module - (type $_ (func)) - (type $iiii (func (param i32 i32 i32) (result i32))) - (type $ii (func (param i32) (result i32))) - (type $i_ (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) @@ -10,68 +12,22 @@ (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "memory.compare" (func $~lib/memory/memory.compare)) + (export "memory.copy" (func $~lib/memory/memory.copy)) + (export "memory.init" (func $~lib/memory/memory.init)) + (export "memory.drop" (func $~lib/memory/memory.drop)) (export "memory.allocate" (func $~lib/memory/memory.allocate)) (export "memory.free" (func $~lib/memory/memory.free)) (export "memory.reset" (func $~lib/memory/memory.reset)) + (export "memory.repeat" (func $~lib/memory/memory.repeat)) + (export "memory.compare" (func $~lib/memory/memory.compare)) (start $start) - (func $~lib/internal/memory/memcmp (; 0 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 0 - return - end - loop $continue|0 - local.get $2 - i32.const 0 - i32.ne - local.tee $3 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.eq - else - local.get $3 - end - if - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $continue|0 - end - end - local.get $2 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.sub - else - i32.const 0 - end + (func $~lib/memory/memory.init (; 0 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + unreachable ) - (func $~lib/memory/memory.compare (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcmp + (func $~lib/memory/memory.drop (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + unreachable ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -96,7 +52,7 @@ i32.add i32.const -8 i32.and - local.tee $3 + local.tee $0 current_memory local.tee $1 i32.const 16 @@ -104,7 +60,7 @@ i32.gt_u if local.get $1 - local.get $3 + local.get $0 local.get $2 i32.sub i32.const 65535 @@ -113,7 +69,7 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 + local.tee $3 local.tee $4 local.get $1 local.get $4 @@ -123,7 +79,7 @@ i32.const 0 i32.lt_s if - local.get $0 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -132,28 +88,1346 @@ end end end - local.get $3 + local.get $0 global.set $~lib/allocator/arena/offset local.get $2 ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/arena/__memory_allocate - ) - (func $~lib/memory/memory.free (; 4 ;) (type $i_) (param $0 i32) + (func $~lib/memory/memory.free (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.reset (; 5 ;) (type $_) + (func $~lib/memory/memory.reset (; 4 ;) (type $FUNCSIG$v) global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $start (; 6 ;) (type $_) + (func $~lib/util/memory/memcpy (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + loop $continue|0 + local.get $1 + i32.const 3 + i32.and + local.get $2 + local.get $2 + select + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|0 + end + end + local.get $0 + i32.const 3 + i32.and + i32.eqz + if + loop $continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|1 + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 8 + i32.add + local.set $0 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $1 + i32.const 4 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.add + local.set $0 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $1 + i32.const 2 + i32.add + local.set $1 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.set $3 + local.get $3 + block (result i32) + local.get $1 + local.set $3 + local.get $3 + i32.load8_u + end + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + block $case0|2 + local.get $0 + i32.const 3 + i32.and + i32.const 1 + i32.sub + br_table $case0|2 $case1|2 $case2|2 $break|2 + end + local.get $1 + i32.load + local.set $4 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + loop $continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + local.get $4 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 5 + i32.add + i32.load + local.tee $4 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 9 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + local.get $4 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 13 + i32.add + i32.load + local.tee $4 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|3 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $4 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + loop $continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 2 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + local.get $4 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 6 + i32.add + i32.load + local.tee $4 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 10 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + local.get $4 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 14 + i32.add + i32.load + local.tee $4 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|4 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $4 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + loop $continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 3 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + local.get $4 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 7 + i32.add + i32.load + local.tee $4 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 11 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + local.get $4 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 15 + i32.add + i32.load + local.tee $4 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|5 + end + end + end + end + local.get $2 + i32.const 16 + i32.and + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.set $3 + local.get $3 + block (result i32) + local.get $1 + local.set $3 + local.get $3 + i32.load8_u + end + i32.store8 + end + ) + (func $~lib/memory/memory.copy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + local.tee $3 + if (result i32) + local.get $3 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + br $continue|0 + end + end + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 + end + end + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end + end + end + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + ) + (func $~lib/memory/memory.repeat (; 7 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + local.get $2 + local.get $3 + i32.mul + local.set $3 + loop $continue|0 + local.get $4 + local.get $3 + i32.lt_u + if + local.get $0 + local.get $4 + i32.add + local.get $1 + local.get $2 + call $~lib/memory/memory.copy + local.get $2 + local.get $4 + i32.add + local.set $4 + br $continue|0 + end + end + ) + (func $~lib/memory/memory.compare (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + local.get $1 + i32.eq + if (result i32) + i32.const 0 + else + loop $continue|0 + local.get $2 + i32.const 0 + i32.ne + local.tee $3 + if (result i32) + local.get $0 + i32.load8_u + local.get $1 + i32.load8_u + i32.eq + else + local.get $3 + end + if + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $continue|0 + end + end + local.get $2 + if (result i32) + local.get $0 + i32.load8_u + local.get $1 + i32.load8_u + i32.sub + else + i32.const 0 + end + end + ) + (func $start (; 9 ;) (type $FUNCSIG$v) i32.const 8 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 7 ;) (type $_) + (func $null (; 10 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/allocators/arena/untouched.wat b/tests/allocators/arena/untouched.wat index 664649377e..47f9113ff6 100644 --- a/tests/allocators/arena/untouched.wat +++ b/tests/allocators/arena/untouched.wat @@ -1,8 +1,10 @@ (module - (type $_ (func)) - (type $iiii (func (param i32 i32 i32) (result i32))) - (type $ii (func (param i32) (result i32))) - (type $i_ (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) @@ -11,189 +13,1656 @@ (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "memory.compare" (func $~lib/memory/memory.compare)) + (export "memory.copy" (func $~lib/memory/memory.copy)) + (export "memory.init" (func $~lib/memory/memory.init)) + (export "memory.drop" (func $~lib/memory/memory.drop)) (export "memory.allocate" (func $~lib/memory/memory.allocate)) (export "memory.free" (func $~lib/memory/memory.free)) (export "memory.reset" (func $~lib/memory/memory.reset)) + (export "memory.repeat" (func $~lib/memory/memory.repeat)) + (export "memory.compare" (func $~lib/memory/memory.compare)) (start $start) - (func $start:~lib/allocator/arena (; 0 ;) (type $_) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset + (func $~lib/memory/memory.init (; 0 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + unreachable ) - (func $start:assembly/index (; 1 ;) (type $_) - call $start:~lib/allocator/arena + (func $~lib/memory/memory.drop (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + unreachable ) - (func $~lib/internal/memory/memcmp (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 0 - return + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $2 + local.get $2 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 + local.get $3 + local.get $4 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $3 + current_memory + local.set $4 + local.get $3 + local.get $4 + i32.const 16 + i32.shl + i32.gt_u + if + local.get $3 + local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 end + return + ) + (func $~lib/memory/memory.free (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + local.set $1 + ) + (func $~lib/memory/memory.reset (; 4 ;) (type $FUNCSIG$v) + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + ) + (func $~lib/util/memory/memcpy (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) block $break|0 loop $continue|0 local.get $2 - i32.const 0 - i32.ne - local.tee $3 if (result i32) - local.get $0 - i32.load8_u local.get $1 - i32.load8_u - i32.eq + i32.const 3 + i32.and else - local.get $3 + local.get $2 end if block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 local.get $2 i32.const 1 i32.sub local.set $2 + end + br $continue|0 + end + end + end + local.get $0 + i32.const 3 + i32.and + i32.const 0 + i32.eq + if + block $break|1 + loop $continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + block + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|1 + end + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.set $0 + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $0 + i32.const 2 + i32.add + local.set $0 + local.get $1 + i32.const 2 + i32.add + local.set $1 + end + local.get $2 + i32.const 1 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + block $case0|2 + local.get $0 + i32.const 3 + i32.and + local.set $5 + local.get $5 + i32.const 1 + i32.eq + br_if $case0|2 + local.get $5 + i32.const 2 + i32.eq + br_if $case1|2 + local.get $5 + i32.const 3 + i32.eq + br_if $case2|2 + br $break|2 + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + block $break|3 + loop $continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + block + local.get $1 + i32.const 1 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 5 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 9 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 13 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|3 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + block $break|4 + loop $continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + block + local.get $1 + i32.const 2 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 6 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 10 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 14 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|4 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) local.get $0 + local.tee $5 i32.const 1 i32.add local.set $0 + local.get $5 + end + block (result i32) local.get $1 + local.tee $5 i32.const 1 i32.add local.set $1 + local.get $5 end - br $continue|0 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block $break|5 + loop $continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + block + local.get $1 + i32.const 3 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 7 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 11 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 15 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|5 + end + end + end + br $break|2 + unreachable end + unreachable end end local.get $2 - if (result i32) - local.get $0 + i32.const 16 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end i32.load8_u - local.get $1 + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end i32.load8_u - i32.sub - else - i32.const 0 + i32.store8 end - ) - (func $~lib/memory/memory.compare (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 local.get $2 - call $~lib/internal/memory/memcmp + i32.const 8 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/memory/memory.copy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + local.tee $5 + if (result i32) + local.get $5 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|2 + end + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 + ) + (func $~lib/memory/memory.repeat (; 7 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + local.set $4 local.get $2 local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory + i32.mul local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + block $break|0 + loop $continue|0 + local.get $4 + local.get $5 + i32.lt_u + if + block + local.get $0 + local.get $4 + i32.add + local.get $1 + local.get $2 + call $~lib/memory/memory.copy + local.get $4 + local.get $2 + i32.add + local.set $4 + end + br $continue|0 + end + end + end + ) + (func $~lib/memory/memory.compare (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/util/memory/memcmp|inlined.0 (result i32) + local.get $0 + local.set $5 local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $2 - local.get $5 - local.tee $3 + local.set $4 local.get $2 - local.tee $6 - local.get $3 - local.get $6 - i32.gt_s - select local.set $3 - local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $5 + local.get $4 + i32.eq if - local.get $2 - grow_memory i32.const 0 - i32.lt_s - if - unreachable + br $~lib/util/memory/memcmp|inlined.0 + end + block $break|0 + loop $continue|0 + local.get $3 + i32.const 0 + i32.ne + local.tee $6 + if (result i32) + local.get $5 + i32.load8_u + local.get $4 + i32.load8_u + i32.eq + else + local.get $6 + end + if + block + local.get $3 + i32.const 1 + i32.sub + local.set $3 + local.get $5 + i32.const 1 + i32.add + local.set $5 + local.get $4 + i32.const 1 + i32.add + local.set $4 + end + br $continue|0 + end end end + local.get $3 + if (result i32) + local.get $5 + i32.load8_u + local.get $4 + i32.load8_u + i32.sub + else + i32.const 0 + end end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/memory/memory.allocate (; 5 ;) (type $ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/arena/__memory_allocate - return - ) - (func $~lib/allocator/arena/__memory_free (; 6 ;) (type $i_) (param $0 i32) - nop - ) - (func $~lib/memory/memory.free (; 7 ;) (type $i_) (param $0 i32) - local.get $0 - call $~lib/allocator/arena/__memory_free - return ) - (func $~lib/allocator/arena/__memory_reset (; 8 ;) (type $_) + (func $start (; 9 ;) (type $FUNCSIG$v) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $~lib/memory/memory.reset (; 9 ;) (type $_) - call $~lib/allocator/arena/__memory_reset - return - ) - (func $start (; 10 ;) (type $_) - call $start:assembly/index - ) - (func $null (; 11 ;) (type $_) + (func $null (; 10 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/allocators/buddy/assembly/buddy.ts b/tests/allocators/buddy/assembly/buddy.ts new file mode 100644 index 0000000000..88c1a104e3 --- /dev/null +++ b/tests/allocators/buddy/assembly/buddy.ts @@ -0,0 +1,535 @@ +/* + Copyright 2018 Evan Wallace + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +*/// see: https://github.com/evanw/buddy-malloc + +/* + * This file implements a buddy memory allocator, which is an allocator that + * allocates memory within a fixed linear address range. It spans the address + * range with a binary tree that tracks free space. Both "malloc" and "free" + * are O(log N) time where N is the maximum possible number of allocations. + * + * The "buddy" term comes from how the tree is used. When memory is allocated, + * nodes in the tree are split recursively until a node of the appropriate size + * is reached. Every split results in two child nodes, each of which is the + * buddy of the other. When a node is freed, the node and its buddy can be + * merged again if the buddy is also free. This makes the memory available + * for larger allocations again. + */ + +/* + * Every allocation needs an 8-byte header to store the allocation size while + * staying 8-byte aligned. The address returned by "malloc" is the address + * right after this header (i.e. the size occupies the 8 bytes before the + * returned address). + */ +const HEADER_SIZE: usize = 8; + +/* + * The minimum allocation size is 16 bytes because we have an 8-byte header and + * we need to stay 8-byte aligned. + */ +const MIN_ALLOC_LOG2: usize = 4; +const MIN_ALLOC: usize = 1 << MIN_ALLOC_LOG2; + +/* + * The maximum allocation size is currently set to 2gb. This is the total size + * of the heap. It's technically also the maximum allocation size because the + * heap could consist of a single allocation of this size. But of course real + * heaps will have multiple allocations, so the real maximum allocation limit + * is at most 1gb. + */ +const MAX_ALLOC_LOG2: usize = 30; // 31; +const MAX_ALLOC: usize = 1 << MAX_ALLOC_LOG2; + +/* + * Allocations are done in powers of two starting from MIN_ALLOC and ending at + * MAX_ALLOC inclusive. Each allocation size has a bucket that stores the free + * list for that allocation size. + * + * Given a bucket index, the size of the allocations in that bucket can be + * found with "(size_t)1 << (MAX_ALLOC_LOG2 - bucket)". + */ +const BUCKET_COUNT: usize = MAX_ALLOC_LOG2 - MIN_ALLOC_LOG2 + 1; + +/* + * Free lists are stored as circular doubly-linked lists. Every possible + * allocation size has an associated free list that is threaded through all + * currently free blocks of that size. That means MIN_ALLOC must be at least + * "sizeof(list_t)". MIN_ALLOC is currently 16 bytes, so this will be true for + * both 32-bit and 64-bit. + */ +@unmanaged +class List { + prev: List; + next: List; + static readonly SIZE: usize = 2 * sizeof(); +} + +/* + * Each bucket corresponds to a certain allocation size and stores a free list + * for that size. The bucket at index 0 corresponds to an allocation size of + * MAX_ALLOC (i.e. the whole address space). + */ +var BUCKETS_START: usize = HEAP_BASE; +var BUCKETS_END: usize = BUCKETS_START + BUCKET_COUNT * List.SIZE; + +function buckets$get(index: usize): List { + assert(index < BUCKET_COUNT); + return changetype(BUCKETS_START + index * List.SIZE); +} + +/* + * We could initialize the allocator by giving it one free block the size of + * the entire address space. However, this would cause us to instantly reserve + * half of the entire address space on the first allocation, since the first + * split would store a free list entry at the start of the right child of the + * root. Instead, we have the tree start out small and grow the size of the + * tree as we use more memory. The size of the tree is tracked by this value. + */ +var bucket_limit: usize; + +/* + * This array represents a linearized binary tree of bits. Every possible + * allocation larger than MIN_ALLOC has a node in this tree (and therefore a + * bit in this array). + * + * Given the index for a node, lineraized binary trees allow you to traverse to + * the parent node or the child nodes just by doing simple arithmetic on the + * index: + * + * - Move to parent: index = (index - 1) / 2; + * - Move to left child: index = index * 2 + 1; + * - Move to right child: index = index * 2 + 2; + * - Move to sibling: index = ((index - 1) ^ 1) + 1; + * + * Each node in this tree can be in one of several states: + * + * - UNUSED (both children are UNUSED) + * - SPLIT (one child is UNUSED and the other child isn't) + * - USED (neither children are UNUSED) + * + * These states take two bits to store. However, it turns out we have enough + * information to distinguish between UNUSED and USED from context, so we only + * need to store SPLIT or not, which only takes a single bit. + * + * Note that we don't need to store any nodes for allocations of size MIN_ALLOC + * since we only ever care about parent nodes. + */ +const SPLIT_COUNT: usize = (1 << (BUCKET_COUNT - 1)) / 8; +var NODE_IS_SPLIT_START: usize = BUCKETS_END; +var NODE_IS_SPLIT_END: usize = NODE_IS_SPLIT_START + SPLIT_COUNT * sizeof(); + +function node_is_split$get(index: usize): i32 { + assert(index < SPLIT_COUNT); + return load(NODE_IS_SPLIT_START + index); +} + +function node_is_split$set(index: usize, state: i32): void { + assert(index < SPLIT_COUNT); + store(NODE_IS_SPLIT_START + index, state); +} + +/* + * This is the starting address of the address range for this allocator. Every + * returned allocation will be an offset of this pointer from 0 to MAX_ALLOC. + */ +var base_ptr: usize; + +/* + * This is the maximum address that has ever been used by the allocator. It's + * used to know when to call "brk" to request more memory from the kernel. + */ +var max_ptr: usize; + +/* + * Make sure all addresses before "new_value" are valid and can be used. Memory + * is allocated in a 2gb address range but that memory is not reserved up + * front. It's only reserved when it's needed by calling this function. This + * will return false if the memory could not be reserved. + */ +function update_max_ptr(new_value: usize): i32 { + if (new_value > max_ptr) { + // if (brk(new_value)) { + // return 0; + // } + let oldPages = memory.size(); + let newPages = (((new_value + 0xffff) & ~0xffff) >>> 16); + assert(newPages > oldPages); + if (memory.grow(newPages - oldPages) < 0) { + return 0; + } + // max_ptr = new_value; + max_ptr = newPages << 16; + } + return 1; +} + +/* + * Initialize a list to empty. Because these are circular lists, an "empty" + * list is an entry where both links point to itself. This makes insertion + * and removal simpler because they don't need any branches. + */ +function list_init(list: List): void { + list.prev = list; + list.next = list; +} + +/* + * Append the provided entry to the end of the list. This assumes the entry + * isn't in a list already because it overwrites the linked list pointers. + */ +function list_push(list: List, entry: List): void { + var prev = list.prev; + entry.prev = prev; + entry.next = list; + prev.next = entry; + list.prev = entry; +} + +/* + * Remove the provided entry from whichever list it's currently in. This + * assumes that the entry is in a list. You don't need to provide the list + * because the lists are circular, so the list's pointers will automatically + * be updated if the first or last entries are removed. + */ +function list_remove(entry: List): void { + var prev = entry.prev; + var next = entry.next; + prev.next = next; + next.prev = prev; +} + +/* + * Remove and return the first entry in the list or NULL if the list is empty. + */ +function list_pop(list: List): List | null { + var back = list.prev; + if (back == list) return null; + list_remove(back); + return back; +} + +/* + * This maps from the index of a node to the address of memory that node + * represents. The bucket can be derived from the index using a loop but is + * required to be provided here since having them means we can avoid the loop + * and have this function return in constant time. + */ +function ptr_for_node(index: usize, bucket: usize): usize { + return base_ptr + ((index - (1 << bucket) + 1) << (MAX_ALLOC_LOG2 - bucket)); +} + +/* + * This maps from an address of memory to the node that represents that + * address. There are often many nodes that all map to the same address, so + * the bucket is needed to uniquely identify a node. + */ +function node_for_ptr(ptr: usize, bucket: usize): usize { + return ((ptr - base_ptr) >> (MAX_ALLOC_LOG2 - bucket)) + (1 << bucket) - 1; +} + +/* + * Given the index of a node, this returns the "is split" flag of the parent. + */ +function parent_is_split(index: usize): bool { + index = (index - 1) / 2; + return ((node_is_split$get(index / 8) >>> (index % 8)) & 1) == 1; +} + +/* + * Given the index of a node, this flips the "is split" flag of the parent. + */ +function flip_parent_is_split(index: usize): void { + index = (index - 1) / 2; + var indexDiv8 = index / 8; + node_is_split$set(indexDiv8, + node_is_split$get(indexDiv8) ^ (1 << (index % 8)) + ); +} + +/* + * Given the requested size passed to "malloc", this function returns the index + * of the smallest bucket that can fit that size. + */ +function bucket_for_request(request: usize): usize { + var bucket = BUCKET_COUNT - 1; + var size = MIN_ALLOC; + + while (size < request) { + bucket--; + size *= 2; + } + + return bucket; +} + +/* + * The tree is always rooted at the current bucket limit. This call grows the + * tree by repeatedly doubling it in size until the root lies at the provided + * bucket index. Each doubling lowers the bucket limit by 1. + */ +function lower_bucket_limit(bucket: usize): u32 { + while (bucket < bucket_limit) { + let root = node_for_ptr(base_ptr, bucket_limit); + let right_child: usize; + + /* + * If the parent isn't SPLIT, that means the node at the current bucket + * limit is UNUSED and our address space is entirely free. In that case, + * clear the root free list, increase the bucket limit, and add a single + * block with the newly-expanded address space to the new root free list. + */ + if (!parent_is_split(root)) { + list_remove(changetype(base_ptr)); + list_init(buckets$get(--bucket_limit)); + list_push(buckets$get(bucket_limit), changetype(base_ptr)); + continue; + } + + /* + * Otherwise, the tree is currently in use. Create a parent node for the + * current root node in the SPLIT state with a right child on the free + * list. Make sure to reserve the memory for the free list entry before + * writing to it. Note that we do not need to flip the "is split" flag for + * our current parent because it's already on (we know because we just + * checked it above). + */ + right_child = ptr_for_node(root + 1, bucket_limit); + if (!update_max_ptr(right_child + List.SIZE)) { + return 0; + } + list_push(buckets$get(bucket_limit), changetype(right_child)); + list_init(buckets$get(--bucket_limit)); + + /* + * Set the grandparent's SPLIT flag so if we need to lower the bucket limit + * again, we'll know that the new root node we just added is in use. + */ + root = (root - 1) / 2; + if (root != 0) { + flip_parent_is_split(root); + } + } + + return 1; +} + +// Memory allocator interface + +@global export function __memory_allocate(request: usize): usize { + var original_bucket: usize, bucket: usize; + + /* + * Make sure it's possible for an allocation of this size to succeed. There's + * a hard-coded limit on the maximum allocation size because of the way this + * allocator works. + */ + if (request > MAX_ALLOC - HEADER_SIZE) unreachable(); + + /* + * Initialize our global state if this is the first call to "malloc". At the + * beginning, the tree has a single node that represents the smallest + * possible allocation size. More memory will be reserved later as needed. + */ + if (base_ptr == 0) { + // base_ptr = max_ptr = (uint8_t *)sbrk(0); + base_ptr = (NODE_IS_SPLIT_END + 7) & ~7; // must be aligned + max_ptr = memory.size() << 16; // must grow first + bucket_limit = BUCKET_COUNT - 1; + if (!update_max_ptr(base_ptr + List.SIZE)) { + return 0; + } + list_init(buckets$get(BUCKET_COUNT - 1)); + list_push(buckets$get(BUCKET_COUNT - 1), changetype(base_ptr)); + } + + /* + * Find the smallest bucket that will fit this request. This doesn't check + * that there's space for the request yet. + */ + bucket = bucket_for_request(request + HEADER_SIZE); + original_bucket = bucket; + + /* + * Search for a bucket with a non-empty free list that's as large or larger + * than what we need. If there isn't an exact match, we'll need to split a + * larger one to get a match. + */ + while (bucket + 1 != 0) { + let size: usize, bytes_needed: usize, i: usize; + let ptr: usize; + + /* + * We may need to grow the tree to be able to fit an allocation of this + * size. Try to grow the tree and stop here if we can't. + */ + if (!lower_bucket_limit(bucket)) { + return 0; + } + + /* + * Try to pop a block off the free list for this bucket. If the free list + * is empty, we're going to have to split a larger block instead. + */ + ptr = changetype(list_pop(buckets$get(bucket))); + if (!ptr) { + /* + * If we're not at the root of the tree or it's impossible to grow the + * tree any more, continue on to the next bucket. + */ + if (bucket != bucket_limit || bucket == 0) { + bucket--; + continue; + } + + /* + * Otherwise, grow the tree one more level and then pop a block off the + * free list again. Since we know the root of the tree is used (because + * the free list was empty), this will add a parent above this node in + * the SPLIT state and then add the new right child node to the free list + * for this bucket. Popping the free list will give us this right child. + */ + if (!lower_bucket_limit(bucket - 1)) { + return 0; + } + ptr = changetype(list_pop(buckets$get(bucket))); + } + + /* + * Try to expand the address space first before going any further. If we + * have run out of space, put this block back on the free list and fail. + */ + size = 1 << (MAX_ALLOC_LOG2 - bucket); + bytes_needed = bucket < original_bucket ? size / 2 + List.SIZE : size; + if (!update_max_ptr(ptr + bytes_needed)) { + list_push(buckets$get(bucket), changetype(ptr)); + return 0; + } + + /* + * If we got a node off the free list, change the node from UNUSED to USED. + * This involves flipping our parent's "is split" bit because that bit is + * the exclusive-or of the UNUSED flags of both children, and our UNUSED + * flag (which isn't ever stored explicitly) has just changed. + * + * Note that we shouldn't ever need to flip the "is split" bit of our + * grandparent because we know our buddy is USED so it's impossible for our + * grandparent to be UNUSED (if our buddy chunk was UNUSED, our parent + * wouldn't ever have been split in the first place). + */ + i = node_for_ptr(ptr, bucket); + if (i != 0) { + flip_parent_is_split(i); + } + + /* + * If the node we got is larger than we need, split it down to the correct + * size and put the new unused child nodes on the free list in the + * corresponding bucket. This is done by repeatedly moving to the left + * child, splitting the parent, and then adding the right child to the free + * list. + */ + while (bucket < original_bucket) { + i = i * 2 + 1; + bucket++; + flip_parent_is_split(i); + list_push( + buckets$get(bucket), + changetype(ptr_for_node(i + 1, bucket)) + ); + } + + /* + * Now that we have a memory address, write the block header (just the size + * of the allocation) and return the address immediately after the header. + */ + store(ptr, request); + return ptr + HEADER_SIZE; + } + + return 0; +} + +@global export function __memory_free(ptr: usize): void { + var bucket: usize, i: usize; + + /* + * Ignore any attempts to free a NULL pointer. + */ + if (!ptr) { + return; + } + + /* + * We were given the address returned by "malloc" so get back to the actual + * address of the node by subtracting off the size of the block header. Then + * look up the index of the node corresponding to this address. + */ + ptr = ptr - HEADER_SIZE; + bucket = bucket_for_request(load(ptr) + HEADER_SIZE); + i = node_for_ptr(ptr, bucket); + + /* + * Traverse up to the root node, flipping USED blocks to UNUSED and merging + * UNUSED buddies together into a single UNUSED parent. + */ + while (i != 0) { + /* + * Change this node from UNUSED to USED. This involves flipping our + * parent's "is split" bit because that bit is the exclusive-or of the + * UNUSED flags of both children, and our UNUSED flag (which isn't ever + * stored explicitly) has just changed. + */ + flip_parent_is_split(i); + + /* + * If the parent is now SPLIT, that means our buddy is USED, so don't merge + * with it. Instead, stop the iteration here and add ourselves to the free + * list for our bucket. + * + * Also stop here if we're at the current root node, even if that root node + * is now UNUSED. Root nodes don't have a buddy so we can't merge with one. + */ + if (parent_is_split(i) || bucket == bucket_limit) { + break; + } + + /* + * If we get here, we know our buddy is UNUSED. In this case we should + * merge with that buddy and continue traversing up to the root node. We + * need to remove the buddy from its free list here but we don't need to + * add the merged parent to its free list yet. That will be done once after + * this loop is finished. + */ + list_remove(changetype(ptr_for_node(((i - 1) ^ 1) + 1, bucket))); + i = (i - 1) / 2; + bucket--; + } + + /* + * Add ourselves to the free list for our bucket. We add to the back of the + * list because "malloc" takes from the back of the list and we want a "free" + * followed by a "malloc" of the same size to ideally use the same address + * for better memory locality. + */ + list_push(buckets$get(bucket), changetype(ptr_for_node(i, bucket))); +} diff --git a/tests/allocators/buddy/assembly/index.ts b/tests/allocators/buddy/assembly/index.ts index 2fe5eda08a..b850ffb0e2 100644 --- a/tests/allocators/buddy/assembly/index.ts +++ b/tests/allocators/buddy/assembly/index.ts @@ -1,2 +1,2 @@ -import "allocator/buddy"; +import "./buddy"; export { memory }; diff --git a/tests/allocators/buddy/optimized.wat b/tests/allocators/buddy/optimized.wat index 234ec45d80..4624ce8211 100644 --- a/tests/allocators/buddy/optimized.wat +++ b/tests/allocators/buddy/optimized.wat @@ -1,87 +1,42 @@ (module - (type $_ (func)) - (type $iiii (func (param i32 i32 i32) (result i32))) - (type $ii (func (param i32) (result i32))) - (type $i_ (func (param i32))) - (type $ii_ (func (param i32 i32))) - (type $iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/allocator/buddy/BUCKETS_START (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/BUCKETS_END (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/bucket_limit (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/NODE_IS_SPLIT_START (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/NODE_IS_SPLIT_END (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/base_ptr (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/max_ptr (mut i32) (i32.const 0)) + (global $assembly/buddy/BUCKETS_START (mut i32) (i32.const 0)) + (global $assembly/buddy/BUCKETS_END (mut i32) (i32.const 0)) + (global $assembly/buddy/bucket_limit (mut i32) (i32.const 0)) + (global $assembly/buddy/NODE_IS_SPLIT_START (mut i32) (i32.const 0)) + (global $assembly/buddy/NODE_IS_SPLIT_END (mut i32) (i32.const 0)) + (global $assembly/buddy/base_ptr (mut i32) (i32.const 0)) + (global $assembly/buddy/max_ptr (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "memory.compare" (func $~lib/memory/memory.compare)) + (export "memory.copy" (func $~lib/memory/memory.copy)) + (export "memory.init" (func $~lib/memory/memory.init)) + (export "memory.drop" (func $~lib/memory/memory.drop)) (export "memory.allocate" (func $~lib/memory/memory.allocate)) (export "memory.free" (func $~lib/memory/memory.free)) (export "memory.reset" (func $~lib/memory/memory.reset)) + (export "memory.repeat" (func $~lib/memory/memory.repeat)) + (export "memory.compare" (func $~lib/memory/memory.compare)) (start $start) - (func $~lib/internal/memory/memcmp (; 0 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 0 - return - end - loop $continue|0 - local.get $2 - i32.const 0 - i32.ne - local.tee $3 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.eq - else - local.get $3 - end - if - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $continue|0 - end - end - local.get $2 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.sub - else - i32.const 0 - end + (func $~lib/memory/memory.init (; 0 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + unreachable ) - (func $~lib/memory/memory.compare (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcmp + (func $~lib/memory/memory.drop (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + unreachable ) - (func $~lib/allocator/buddy/update_max_ptr (; 2 ;) (type $ii) (param $0 i32) (result i32) - (local $1 i32) + (func $assembly/buddy/update_max_ptr (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - global.get $~lib/allocator/buddy/max_ptr + global.get $assembly/buddy/max_ptr i32.gt_u if local.get $0 @@ -91,7 +46,7 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $0 current_memory i32.sub grow_memory @@ -101,21 +56,21 @@ i32.const 0 return end - local.get $1 + local.get $0 i32.const 16 i32.shl - global.set $~lib/allocator/buddy/max_ptr + global.set $assembly/buddy/max_ptr end i32.const 1 ) - (func $~lib/allocator/buddy/buckets$get (; 3 ;) (type $ii) (param $0 i32) (result i32) - global.get $~lib/allocator/buddy/BUCKETS_START + (func $assembly/buddy/buckets$get (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + global.get $assembly/buddy/BUCKETS_START local.get $0 i32.const 3 i32.shl i32.add ) - (func $~lib/allocator/buddy/list_init (; 4 ;) (type $i_) (param $0 i32) + (func $assembly/buddy/list_init (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.store @@ -123,7 +78,7 @@ local.get $0 i32.store offset=4 ) - (func $~lib/allocator/buddy/list_push (; 5 ;) (type $ii_) (param $0 i32) (param $1 i32) + (func $assembly/buddy/list_push (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 local.get $0 @@ -140,7 +95,7 @@ local.get $1 i32.store ) - (func $~lib/allocator/buddy/bucket_for_request (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/bucket_for_request (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 26 @@ -165,12 +120,12 @@ end local.get $1 ) - (func $~lib/allocator/buddy/node_for_ptr (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $assembly/buddy/node_for_ptr (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 1 local.get $1 i32.shl local.get $0 - global.get $~lib/allocator/buddy/base_ptr + global.get $assembly/buddy/base_ptr i32.sub i32.const 30 local.get $1 @@ -180,13 +135,13 @@ i32.const 1 i32.sub ) - (func $~lib/allocator/buddy/node_is_split$get (; 8 ;) (type $ii) (param $0 i32) (result i32) - global.get $~lib/allocator/buddy/NODE_IS_SPLIT_START + (func $assembly/buddy/node_is_split$get (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + global.get $assembly/buddy/NODE_IS_SPLIT_START local.get $0 i32.add i32.load8_u ) - (func $~lib/allocator/buddy/parent_is_split (; 9 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/parent_is_split (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1 i32.sub @@ -195,7 +150,7 @@ local.tee $0 i32.const 8 i32.div_u - call $~lib/allocator/buddy/node_is_split$get + call $assembly/buddy/node_is_split$get local.get $0 i32.const 7 i32.and @@ -205,7 +160,7 @@ i32.const 1 i32.eq ) - (func $~lib/allocator/buddy/list_remove (; 10 ;) (type $i_) (param $0 i32) + (func $assembly/buddy/list_remove (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load @@ -218,8 +173,8 @@ local.get $1 i32.store ) - (func $~lib/allocator/buddy/ptr_for_node (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/allocator/buddy/base_ptr + (func $assembly/buddy/ptr_for_node (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + global.get $assembly/buddy/base_ptr local.get $0 i32.const 1 local.get $1 @@ -233,7 +188,7 @@ i32.shl i32.add ) - (func $~lib/allocator/buddy/flip_parent_is_split (; 12 ;) (type $i_) (param $0 i32) + (func $assembly/buddy/flip_parent_is_split (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -247,7 +202,7 @@ local.tee $1 local.set $2 local.get $1 - call $~lib/allocator/buddy/node_is_split$get + call $assembly/buddy/node_is_split$get i32.const 1 local.get $0 i32.const 7 @@ -255,102 +210,103 @@ i32.shl i32.xor local.set $0 - global.get $~lib/allocator/buddy/NODE_IS_SPLIT_START + global.get $assembly/buddy/NODE_IS_SPLIT_START local.get $2 i32.add local.get $0 i32.store8 ) - (func $~lib/allocator/buddy/lower_bucket_limit (; 13 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/lower_bucket_limit (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) loop $continue|0 local.get $0 - global.get $~lib/allocator/buddy/bucket_limit + global.get $assembly/buddy/bucket_limit i32.lt_u if - global.get $~lib/allocator/buddy/base_ptr - global.get $~lib/allocator/buddy/bucket_limit - call $~lib/allocator/buddy/node_for_ptr - local.tee $1 - call $~lib/allocator/buddy/parent_is_split + global.get $assembly/buddy/base_ptr + global.get $assembly/buddy/bucket_limit + call $assembly/buddy/node_for_ptr + local.tee $2 + call $assembly/buddy/parent_is_split i32.eqz if - global.get $~lib/allocator/buddy/base_ptr - call $~lib/allocator/buddy/list_remove + global.get $assembly/buddy/base_ptr + call $assembly/buddy/list_remove block (result i32) - global.get $~lib/allocator/buddy/bucket_limit + global.get $assembly/buddy/bucket_limit i32.const 1 i32.sub - global.set $~lib/allocator/buddy/bucket_limit - global.get $~lib/allocator/buddy/bucket_limit + local.tee $1 + global.set $assembly/buddy/bucket_limit + local.get $1 end - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_init - global.get $~lib/allocator/buddy/bucket_limit - call $~lib/allocator/buddy/buckets$get - global.get $~lib/allocator/buddy/base_ptr - call $~lib/allocator/buddy/list_push + call $assembly/buddy/buckets$get + call $assembly/buddy/list_init + global.get $assembly/buddy/bucket_limit + call $assembly/buddy/buckets$get + global.get $assembly/buddy/base_ptr + call $assembly/buddy/list_push br $continue|0 end - local.get $1 + local.get $2 i32.const 1 i32.add - global.get $~lib/allocator/buddy/bucket_limit - call $~lib/allocator/buddy/ptr_for_node - local.tee $2 + global.get $assembly/buddy/bucket_limit + call $assembly/buddy/ptr_for_node + local.tee $1 i32.const 8 i32.add - call $~lib/allocator/buddy/update_max_ptr + call $assembly/buddy/update_max_ptr i32.eqz if i32.const 0 return end - global.get $~lib/allocator/buddy/bucket_limit - call $~lib/allocator/buddy/buckets$get - local.get $2 - call $~lib/allocator/buddy/list_push + global.get $assembly/buddy/bucket_limit + call $assembly/buddy/buckets$get + local.get $1 + call $assembly/buddy/list_push block (result i32) - global.get $~lib/allocator/buddy/bucket_limit + global.get $assembly/buddy/bucket_limit i32.const 1 i32.sub - global.set $~lib/allocator/buddy/bucket_limit - global.get $~lib/allocator/buddy/bucket_limit + local.tee $1 + global.set $assembly/buddy/bucket_limit + local.get $1 end - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_init - local.get $1 + call $assembly/buddy/buckets$get + call $assembly/buddy/list_init + local.get $2 i32.const 1 i32.sub i32.const 2 i32.div_u - local.tee $1 + local.tee $2 if - local.get $1 - call $~lib/allocator/buddy/flip_parent_is_split + local.get $2 + call $assembly/buddy/flip_parent_is_split end br $continue|0 end end i32.const 1 ) - (func $~lib/allocator/buddy/list_pop (; 14 ;) (type $ii) (param $0 i32) (result i32) - (local $1 i32) + (func $assembly/buddy/list_pop (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.tee $1 local.get $0 + i32.load + local.tee $0 i32.eq if i32.const 0 return end - local.get $1 - call $~lib/allocator/buddy/list_remove - local.get $1 + local.get $0 + call $assembly/buddy/list_remove + local.get $0 ) - (func $~lib/allocator/buddy/__memory_allocate (; 15 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/__memory_allocate (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -361,42 +317,42 @@ if unreachable end - global.get $~lib/allocator/buddy/base_ptr + global.get $assembly/buddy/base_ptr i32.eqz if - global.get $~lib/allocator/buddy/NODE_IS_SPLIT_END + global.get $assembly/buddy/NODE_IS_SPLIT_END i32.const 7 i32.add i32.const -8 i32.and - global.set $~lib/allocator/buddy/base_ptr + global.set $assembly/buddy/base_ptr current_memory i32.const 16 i32.shl - global.set $~lib/allocator/buddy/max_ptr + global.set $assembly/buddy/max_ptr i32.const 26 - global.set $~lib/allocator/buddy/bucket_limit - global.get $~lib/allocator/buddy/base_ptr + global.set $assembly/buddy/bucket_limit + global.get $assembly/buddy/base_ptr i32.const 8 i32.add - call $~lib/allocator/buddy/update_max_ptr + call $assembly/buddy/update_max_ptr i32.eqz if i32.const 0 return end i32.const 26 - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_init + call $assembly/buddy/buckets$get + call $assembly/buddy/list_init i32.const 26 - call $~lib/allocator/buddy/buckets$get - global.get $~lib/allocator/buddy/base_ptr - call $~lib/allocator/buddy/list_push + call $assembly/buddy/buckets$get + global.get $assembly/buddy/base_ptr + call $assembly/buddy/list_push end local.get $0 i32.const 8 i32.add - call $~lib/allocator/buddy/bucket_for_request + call $assembly/buddy/bucket_for_request local.tee $1 local.set $4 loop $continue|0 @@ -405,20 +361,20 @@ i32.ne if local.get $1 - call $~lib/allocator/buddy/lower_bucket_limit + call $assembly/buddy/lower_bucket_limit i32.eqz if i32.const 0 return end local.get $1 - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_pop + call $assembly/buddy/buckets$get + call $assembly/buddy/list_pop local.tee $2 i32.eqz if local.get $1 - global.get $~lib/allocator/buddy/bucket_limit + global.get $assembly/buddy/bucket_limit i32.ne local.tee $2 if (result i32) @@ -437,15 +393,15 @@ local.get $1 i32.const 1 i32.sub - call $~lib/allocator/buddy/lower_bucket_limit + call $assembly/buddy/lower_bucket_limit i32.eqz if i32.const 0 return end local.get $1 - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_pop + call $assembly/buddy/buckets$get + call $assembly/buddy/list_pop local.set $2 end i32.const 1 @@ -468,23 +424,23 @@ end local.get $2 i32.add - call $~lib/allocator/buddy/update_max_ptr + call $assembly/buddy/update_max_ptr i32.eqz if local.get $1 - call $~lib/allocator/buddy/buckets$get + call $assembly/buddy/buckets$get local.get $2 - call $~lib/allocator/buddy/list_push + call $assembly/buddy/list_push i32.const 0 return end local.get $2 local.get $1 - call $~lib/allocator/buddy/node_for_ptr + call $assembly/buddy/node_for_ptr local.tee $3 if local.get $3 - call $~lib/allocator/buddy/flip_parent_is_split + call $assembly/buddy/flip_parent_is_split end loop $continue|1 local.get $1 @@ -497,18 +453,18 @@ i32.const 1 i32.add local.tee $3 - call $~lib/allocator/buddy/flip_parent_is_split + call $assembly/buddy/flip_parent_is_split local.get $1 i32.const 1 i32.add local.tee $1 - call $~lib/allocator/buddy/buckets$get + call $assembly/buddy/buckets$get local.get $3 i32.const 1 i32.add local.get $1 - call $~lib/allocator/buddy/ptr_for_node - call $~lib/allocator/buddy/list_push + call $assembly/buddy/ptr_for_node + call $assembly/buddy/list_push br $continue|1 end end @@ -523,11 +479,11 @@ end i32.const 0 ) - (func $~lib/memory/memory.allocate (; 16 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/buddy/__memory_allocate + call $assembly/buddy/__memory_allocate ) - (func $~lib/allocator/buddy/__memory_free (; 17 ;) (type $i_) (param $0 i32) + (func $assembly/buddy/__memory_free (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -542,26 +498,26 @@ i32.load i32.const 8 i32.add - call $~lib/allocator/buddy/bucket_for_request + call $assembly/buddy/bucket_for_request local.set $1 local.get $0 local.get $1 - call $~lib/allocator/buddy/node_for_ptr + call $assembly/buddy/node_for_ptr local.set $0 loop $continue|0 local.get $0 if block $break|0 local.get $0 - call $~lib/allocator/buddy/flip_parent_is_split + call $assembly/buddy/flip_parent_is_split local.get $0 - call $~lib/allocator/buddy/parent_is_split + call $assembly/buddy/parent_is_split local.tee $2 if (result i32) local.get $2 else local.get $1 - global.get $~lib/allocator/buddy/bucket_limit + global.get $assembly/buddy/bucket_limit i32.eq end br_if $break|0 @@ -573,8 +529,8 @@ i32.const 1 i32.add local.get $1 - call $~lib/allocator/buddy/ptr_for_node - call $~lib/allocator/buddy/list_remove + call $assembly/buddy/ptr_for_node + call $assembly/buddy/list_remove local.get $0 i32.const 1 i32.sub @@ -590,34 +546,1356 @@ end end local.get $1 - call $~lib/allocator/buddy/buckets$get + call $assembly/buddy/buckets$get local.get $0 local.get $1 - call $~lib/allocator/buddy/ptr_for_node - call $~lib/allocator/buddy/list_push + call $assembly/buddy/ptr_for_node + call $assembly/buddy/list_push ) - (func $~lib/memory/memory.free (; 18 ;) (type $i_) (param $0 i32) + (func $~lib/memory/memory.free (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $~lib/allocator/buddy/__memory_free + call $assembly/buddy/__memory_free ) - (func $~lib/memory/memory.reset (; 19 ;) (type $_) + (func $~lib/memory/memory.reset (; 19 ;) (type $FUNCSIG$v) unreachable ) - (func $start (; 20 ;) (type $_) + (func $~lib/util/memory/memcpy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + loop $continue|0 + local.get $1 + i32.const 3 + i32.and + local.get $2 + local.get $2 + select + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|0 + end + end + local.get $0 + i32.const 3 + i32.and + i32.eqz + if + loop $continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|1 + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 8 + i32.add + local.set $0 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $1 + i32.const 4 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.add + local.set $0 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $1 + i32.const 2 + i32.add + local.set $1 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.set $3 + local.get $3 + block (result i32) + local.get $1 + local.set $3 + local.get $3 + i32.load8_u + end + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + block $case0|2 + local.get $0 + i32.const 3 + i32.and + i32.const 1 + i32.sub + br_table $case0|2 $case1|2 $case2|2 $break|2 + end + local.get $1 + i32.load + local.set $4 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + loop $continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + local.get $4 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 5 + i32.add + i32.load + local.tee $4 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 9 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + local.get $4 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 13 + i32.add + i32.load + local.tee $4 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|3 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $4 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + loop $continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 2 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + local.get $4 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 6 + i32.add + i32.load + local.tee $4 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 10 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + local.get $4 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 14 + i32.add + i32.load + local.tee $4 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|4 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $4 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + loop $continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 3 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + local.get $4 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 7 + i32.add + i32.load + local.tee $4 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 11 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + local.get $4 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 15 + i32.add + i32.load + local.tee $4 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|5 + end + end + end + end + local.get $2 + i32.const 16 + i32.and + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.set $3 + local.get $3 + block (result i32) + local.get $1 + local.set $3 + local.get $3 + i32.load8_u + end + i32.store8 + end + ) + (func $~lib/memory/memory.copy (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + local.tee $3 + if (result i32) + local.get $3 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + br $continue|0 + end + end + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 + end + end + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end + end + end + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + ) + (func $~lib/memory/memory.repeat (; 22 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + local.get $2 + local.get $3 + i32.mul + local.set $3 + loop $continue|0 + local.get $4 + local.get $3 + i32.lt_u + if + local.get $0 + local.get $4 + i32.add + local.get $1 + local.get $2 + call $~lib/memory/memory.copy + local.get $2 + local.get $4 + i32.add + local.set $4 + br $continue|0 + end + end + ) + (func $~lib/memory/memory.compare (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + local.get $1 + i32.eq + if (result i32) + i32.const 0 + else + loop $continue|0 + local.get $2 + i32.const 0 + i32.ne + local.tee $3 + if (result i32) + local.get $0 + i32.load8_u + local.get $1 + i32.load8_u + i32.eq + else + local.get $3 + end + if + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $continue|0 + end + end + local.get $2 + if (result i32) + local.get $0 + i32.load8_u + local.get $1 + i32.load8_u + i32.sub + else + i32.const 0 + end + end + ) + (func $start (; 24 ;) (type $FUNCSIG$v) i32.const 8 - global.set $~lib/allocator/buddy/BUCKETS_START - global.get $~lib/allocator/buddy/BUCKETS_START + global.set $assembly/buddy/BUCKETS_START + global.get $assembly/buddy/BUCKETS_START i32.const 216 i32.add - global.set $~lib/allocator/buddy/BUCKETS_END - global.get $~lib/allocator/buddy/BUCKETS_END - global.set $~lib/allocator/buddy/NODE_IS_SPLIT_START - global.get $~lib/allocator/buddy/NODE_IS_SPLIT_START + global.set $assembly/buddy/BUCKETS_END + global.get $assembly/buddy/BUCKETS_END + global.set $assembly/buddy/NODE_IS_SPLIT_START + global.get $assembly/buddy/NODE_IS_SPLIT_START i32.const 8388608 i32.add - global.set $~lib/allocator/buddy/NODE_IS_SPLIT_END + global.set $assembly/buddy/NODE_IS_SPLIT_END ) - (func $null (; 21 ;) (type $_) + (func $null (; 25 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/allocators/buddy/untouched.wat b/tests/allocators/buddy/untouched.wat index b67987cb56..5f8c771ffb 100644 --- a/tests/allocators/buddy/untouched.wat +++ b/tests/allocators/buddy/untouched.wat @@ -1,125 +1,76 @@ (module - (type $_ (func)) - (type $iiii (func (param i32 i32 i32) (result i32))) - (type $ii (func (param i32) (result i32))) - (type $iiii_ (func (param i32 i32 i32 i32))) - (type $i_ (func (param i32))) - (type $ii_ (func (param i32 i32))) - (type $iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\17\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00b\00u\00d\00d\00y\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\"\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00b\00u\00d\00d\00y\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/allocator/buddy/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/allocator/buddy/MIN_ALLOC_LOG2 i32 (i32.const 4)) - (global $~lib/allocator/buddy/MIN_ALLOC i32 (i32.const 16)) - (global $~lib/allocator/buddy/MAX_ALLOC_LOG2 i32 (i32.const 30)) - (global $~lib/allocator/buddy/MAX_ALLOC i32 (i32.const 1073741824)) - (global $~lib/allocator/buddy/BUCKET_COUNT i32 (i32.const 27)) - (global $~lib/allocator/buddy/List.SIZE i32 (i32.const 8)) - (global $~lib/allocator/buddy/BUCKETS_START (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/BUCKETS_END (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/bucket_limit (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/SPLIT_COUNT i32 (i32.const 8388608)) - (global $~lib/allocator/buddy/NODE_IS_SPLIT_START (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/NODE_IS_SPLIT_END (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/base_ptr (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/max_ptr (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 60)) + (global $assembly/buddy/HEADER_SIZE i32 (i32.const 8)) + (global $assembly/buddy/MIN_ALLOC_LOG2 i32 (i32.const 4)) + (global $assembly/buddy/MIN_ALLOC i32 (i32.const 16)) + (global $assembly/buddy/MAX_ALLOC_LOG2 i32 (i32.const 30)) + (global $assembly/buddy/MAX_ALLOC i32 (i32.const 1073741824)) + (global $assembly/buddy/BUCKET_COUNT i32 (i32.const 27)) + (global $assembly/buddy/List.SIZE i32 (i32.const 8)) + (global $assembly/buddy/BUCKETS_START (mut i32) (i32.const 0)) + (global $assembly/buddy/BUCKETS_END (mut i32) (i32.const 0)) + (global $assembly/buddy/bucket_limit (mut i32) (i32.const 0)) + (global $assembly/buddy/SPLIT_COUNT i32 (i32.const 8388608)) + (global $assembly/buddy/NODE_IS_SPLIT_START (mut i32) (i32.const 0)) + (global $assembly/buddy/NODE_IS_SPLIT_END (mut i32) (i32.const 0)) + (global $assembly/buddy/base_ptr (mut i32) (i32.const 0)) + (global $assembly/buddy/max_ptr (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 52)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "memory.compare" (func $~lib/memory/memory.compare)) + (export "memory.copy" (func $~lib/memory/memory.copy)) + (export "memory.init" (func $~lib/memory/memory.init)) + (export "memory.drop" (func $~lib/memory/memory.drop)) (export "memory.allocate" (func $~lib/memory/memory.allocate)) (export "memory.free" (func $~lib/memory/memory.free)) (export "memory.reset" (func $~lib/memory/memory.reset)) + (export "memory.repeat" (func $~lib/memory/memory.repeat)) + (export "memory.compare" (func $~lib/memory/memory.compare)) (start $start) - (func $start:~lib/allocator/buddy (; 1 ;) (type $_) + (func $start:assembly/buddy (; 1 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE - global.set $~lib/allocator/buddy/BUCKETS_START - global.get $~lib/allocator/buddy/BUCKETS_START - global.get $~lib/allocator/buddy/BUCKET_COUNT - global.get $~lib/allocator/buddy/List.SIZE + global.set $assembly/buddy/BUCKETS_START + global.get $assembly/buddy/BUCKETS_START + global.get $assembly/buddy/BUCKET_COUNT + global.get $assembly/buddy/List.SIZE i32.mul i32.add - global.set $~lib/allocator/buddy/BUCKETS_END - global.get $~lib/allocator/buddy/BUCKETS_END - global.set $~lib/allocator/buddy/NODE_IS_SPLIT_START - global.get $~lib/allocator/buddy/NODE_IS_SPLIT_START - global.get $~lib/allocator/buddy/SPLIT_COUNT + global.set $assembly/buddy/BUCKETS_END + global.get $assembly/buddy/BUCKETS_END + global.set $assembly/buddy/NODE_IS_SPLIT_START + global.get $assembly/buddy/NODE_IS_SPLIT_START + global.get $assembly/buddy/SPLIT_COUNT i32.const 1 i32.mul i32.add - global.set $~lib/allocator/buddy/NODE_IS_SPLIT_END + global.set $assembly/buddy/NODE_IS_SPLIT_END ) - (func $start:assembly/index (; 2 ;) (type $_) - call $start:~lib/allocator/buddy + (func $start:assembly/index (; 2 ;) (type $FUNCSIG$v) + call $start:assembly/buddy ) - (func $~lib/internal/memory/memcmp (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 0 - return - end - block $break|0 - loop $continue|0 - local.get $2 - i32.const 0 - i32.ne - local.tee $3 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.eq - else - local.get $3 - end - if - block - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - end - br $continue|0 - end - end - end - local.get $2 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.sub - else - i32.const 0 - end + (func $~lib/memory/memory.init (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + unreachable ) - (func $~lib/memory/memory.compare (; 4 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcmp + (func $~lib/memory/memory.drop (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + unreachable ) - (func $~lib/allocator/buddy/update_max_ptr (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/update_max_ptr (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 - global.get $~lib/allocator/buddy/max_ptr + global.get $assembly/buddy/max_ptr i32.gt_u if current_memory @@ -140,8 +91,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 181 + i32.const 16 + i32.const 176 i32.const 4 call $~lib/env/abort unreachable @@ -159,30 +110,30 @@ local.get $2 i32.const 16 i32.shl - global.set $~lib/allocator/buddy/max_ptr + global.set $assembly/buddy/max_ptr end i32.const 1 ) - (func $~lib/allocator/buddy/buckets$get (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/buckets$get (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - global.get $~lib/allocator/buddy/BUCKET_COUNT + global.get $assembly/buddy/BUCKET_COUNT i32.lt_u i32.eqz if i32.const 0 - i32.const 8 - i32.const 101 + i32.const 16 + i32.const 96 i32.const 2 call $~lib/env/abort unreachable end - global.get $~lib/allocator/buddy/BUCKETS_START + global.get $assembly/buddy/BUCKETS_START local.get $0 - global.get $~lib/allocator/buddy/List.SIZE + global.get $assembly/buddy/List.SIZE i32.mul i32.add ) - (func $~lib/allocator/buddy/list_init (; 7 ;) (type $i_) (param $0 i32) + (func $assembly/buddy/list_init (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.store @@ -190,7 +141,7 @@ local.get $0 i32.store offset=4 ) - (func $~lib/allocator/buddy/list_push (; 8 ;) (type $ii_) (param $0 i32) (param $1 i32) + (func $assembly/buddy/list_push (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load @@ -208,14 +159,14 @@ local.get $1 i32.store ) - (func $~lib/allocator/buddy/bucket_for_request (; 9 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/bucket_for_request (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - global.get $~lib/allocator/buddy/BUCKET_COUNT + global.get $assembly/buddy/BUCKET_COUNT i32.const 1 i32.sub local.set $1 - global.get $~lib/allocator/buddy/MIN_ALLOC + global.get $assembly/buddy/MIN_ALLOC local.set $2 block $break|0 loop $continue|0 @@ -239,11 +190,11 @@ end local.get $1 ) - (func $~lib/allocator/buddy/node_for_ptr (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $assembly/buddy/node_for_ptr (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - global.get $~lib/allocator/buddy/base_ptr + global.get $assembly/buddy/base_ptr i32.sub - global.get $~lib/allocator/buddy/MAX_ALLOC_LOG2 + global.get $assembly/buddy/MAX_ALLOC_LOG2 local.get $1 i32.sub i32.shr_u @@ -254,25 +205,25 @@ i32.const 1 i32.sub ) - (func $~lib/allocator/buddy/node_is_split$get (; 11 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/node_is_split$get (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - global.get $~lib/allocator/buddy/SPLIT_COUNT + global.get $assembly/buddy/SPLIT_COUNT i32.lt_u i32.eqz if i32.const 0 - i32.const 8 - i32.const 147 + i32.const 16 + i32.const 142 i32.const 2 call $~lib/env/abort unreachable end - global.get $~lib/allocator/buddy/NODE_IS_SPLIT_START + global.get $assembly/buddy/NODE_IS_SPLIT_START local.get $0 i32.add i32.load8_u ) - (func $~lib/allocator/buddy/parent_is_split (; 12 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/parent_is_split (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1 i32.sub @@ -282,7 +233,7 @@ local.get $0 i32.const 8 i32.div_u - call $~lib/allocator/buddy/node_is_split$get + call $assembly/buddy/node_is_split$get local.get $0 i32.const 8 i32.rem_u @@ -292,7 +243,7 @@ i32.const 1 i32.eq ) - (func $~lib/allocator/buddy/list_remove (; 13 ;) (type $i_) (param $0 i32) + (func $assembly/buddy/list_remove (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -308,8 +259,8 @@ local.get $1 i32.store ) - (func $~lib/allocator/buddy/ptr_for_node (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/allocator/buddy/base_ptr + (func $assembly/buddy/ptr_for_node (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + global.get $assembly/buddy/base_ptr local.get $0 i32.const 1 local.get $1 @@ -317,32 +268,32 @@ i32.sub i32.const 1 i32.add - global.get $~lib/allocator/buddy/MAX_ALLOC_LOG2 + global.get $assembly/buddy/MAX_ALLOC_LOG2 local.get $1 i32.sub i32.shl i32.add ) - (func $~lib/allocator/buddy/node_is_split$set (; 15 ;) (type $ii_) (param $0 i32) (param $1 i32) + (func $assembly/buddy/node_is_split$set (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 - global.get $~lib/allocator/buddy/SPLIT_COUNT + global.get $assembly/buddy/SPLIT_COUNT i32.lt_u i32.eqz if i32.const 0 - i32.const 8 - i32.const 152 + i32.const 16 + i32.const 147 i32.const 2 call $~lib/env/abort unreachable end - global.get $~lib/allocator/buddy/NODE_IS_SPLIT_START + global.get $assembly/buddy/NODE_IS_SPLIT_START local.get $0 i32.add local.get $1 i32.store8 ) - (func $~lib/allocator/buddy/flip_parent_is_split (; 16 ;) (type $i_) (param $0 i32) + (func $assembly/buddy/flip_parent_is_split (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.const 1 @@ -356,78 +307,81 @@ local.set $1 local.get $1 local.get $1 - call $~lib/allocator/buddy/node_is_split$get + call $assembly/buddy/node_is_split$get i32.const 1 local.get $0 i32.const 8 i32.rem_u i32.shl i32.xor - call $~lib/allocator/buddy/node_is_split$set + call $assembly/buddy/node_is_split$set ) - (func $~lib/allocator/buddy/lower_bucket_limit (; 17 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/lower_bucket_limit (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) block $break|0 loop $continue|0 local.get $0 - global.get $~lib/allocator/buddy/bucket_limit + global.get $assembly/buddy/bucket_limit i32.lt_u if block - global.get $~lib/allocator/buddy/base_ptr - global.get $~lib/allocator/buddy/bucket_limit - call $~lib/allocator/buddy/node_for_ptr + global.get $assembly/buddy/base_ptr + global.get $assembly/buddy/bucket_limit + call $assembly/buddy/node_for_ptr local.set $1 local.get $1 - call $~lib/allocator/buddy/parent_is_split + call $assembly/buddy/parent_is_split i32.eqz if - global.get $~lib/allocator/buddy/base_ptr - call $~lib/allocator/buddy/list_remove + global.get $assembly/buddy/base_ptr + call $assembly/buddy/list_remove block (result i32) - global.get $~lib/allocator/buddy/bucket_limit + global.get $assembly/buddy/bucket_limit i32.const 1 i32.sub - global.set $~lib/allocator/buddy/bucket_limit - global.get $~lib/allocator/buddy/bucket_limit + local.tee $3 + global.set $assembly/buddy/bucket_limit + local.get $3 end - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_init - global.get $~lib/allocator/buddy/bucket_limit - call $~lib/allocator/buddy/buckets$get - global.get $~lib/allocator/buddy/base_ptr - call $~lib/allocator/buddy/list_push + call $assembly/buddy/buckets$get + call $assembly/buddy/list_init + global.get $assembly/buddy/bucket_limit + call $assembly/buddy/buckets$get + global.get $assembly/buddy/base_ptr + call $assembly/buddy/list_push br $continue|0 end local.get $1 i32.const 1 i32.add - global.get $~lib/allocator/buddy/bucket_limit - call $~lib/allocator/buddy/ptr_for_node + global.get $assembly/buddy/bucket_limit + call $assembly/buddy/ptr_for_node local.set $2 local.get $2 - global.get $~lib/allocator/buddy/List.SIZE + global.get $assembly/buddy/List.SIZE i32.add - call $~lib/allocator/buddy/update_max_ptr + call $assembly/buddy/update_max_ptr i32.eqz if i32.const 0 return end - global.get $~lib/allocator/buddy/bucket_limit - call $~lib/allocator/buddy/buckets$get + global.get $assembly/buddy/bucket_limit + call $assembly/buddy/buckets$get local.get $2 - call $~lib/allocator/buddy/list_push + call $assembly/buddy/list_push block (result i32) - global.get $~lib/allocator/buddy/bucket_limit + global.get $assembly/buddy/bucket_limit i32.const 1 i32.sub - global.set $~lib/allocator/buddy/bucket_limit - global.get $~lib/allocator/buddy/bucket_limit + local.tee $3 + global.set $assembly/buddy/bucket_limit + local.get $3 end - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_init + call $assembly/buddy/buckets$get + call $assembly/buddy/list_init local.get $1 i32.const 1 i32.sub @@ -439,7 +393,7 @@ i32.ne if local.get $1 - call $~lib/allocator/buddy/flip_parent_is_split + call $assembly/buddy/flip_parent_is_split end end br $continue|0 @@ -448,7 +402,7 @@ end i32.const 1 ) - (func $~lib/allocator/buddy/list_pop (; 18 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/list_pop (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -461,10 +415,10 @@ return end local.get $1 - call $~lib/allocator/buddy/list_remove + call $assembly/buddy/list_remove local.get $1 ) - (func $~lib/allocator/buddy/__memory_allocate (; 19 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/__memory_allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -473,58 +427,58 @@ (local $6 i32) (local $7 i32) local.get $0 - global.get $~lib/allocator/buddy/MAX_ALLOC - global.get $~lib/allocator/buddy/HEADER_SIZE + global.get $assembly/buddy/MAX_ALLOC + global.get $assembly/buddy/HEADER_SIZE i32.sub i32.gt_u if unreachable end - global.get $~lib/allocator/buddy/base_ptr + global.get $assembly/buddy/base_ptr i32.const 0 i32.eq if - global.get $~lib/allocator/buddy/NODE_IS_SPLIT_END + global.get $assembly/buddy/NODE_IS_SPLIT_END i32.const 7 i32.add i32.const 7 i32.const -1 i32.xor i32.and - global.set $~lib/allocator/buddy/base_ptr + global.set $assembly/buddy/base_ptr current_memory i32.const 16 i32.shl - global.set $~lib/allocator/buddy/max_ptr - global.get $~lib/allocator/buddy/BUCKET_COUNT + global.set $assembly/buddy/max_ptr + global.get $assembly/buddy/BUCKET_COUNT i32.const 1 i32.sub - global.set $~lib/allocator/buddy/bucket_limit - global.get $~lib/allocator/buddy/base_ptr - global.get $~lib/allocator/buddy/List.SIZE + global.set $assembly/buddy/bucket_limit + global.get $assembly/buddy/base_ptr + global.get $assembly/buddy/List.SIZE i32.add - call $~lib/allocator/buddy/update_max_ptr + call $assembly/buddy/update_max_ptr i32.eqz if i32.const 0 return end - global.get $~lib/allocator/buddy/BUCKET_COUNT + global.get $assembly/buddy/BUCKET_COUNT i32.const 1 i32.sub - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_init - global.get $~lib/allocator/buddy/BUCKET_COUNT + call $assembly/buddy/buckets$get + call $assembly/buddy/list_init + global.get $assembly/buddy/BUCKET_COUNT i32.const 1 i32.sub - call $~lib/allocator/buddy/buckets$get - global.get $~lib/allocator/buddy/base_ptr - call $~lib/allocator/buddy/list_push + call $assembly/buddy/buckets$get + global.get $assembly/buddy/base_ptr + call $assembly/buddy/list_push end local.get $0 - global.get $~lib/allocator/buddy/HEADER_SIZE + global.get $assembly/buddy/HEADER_SIZE i32.add - call $~lib/allocator/buddy/bucket_for_request + call $assembly/buddy/bucket_for_request local.set $2 local.get $2 local.set $1 @@ -537,21 +491,21 @@ i32.ne if local.get $2 - call $~lib/allocator/buddy/lower_bucket_limit + call $assembly/buddy/lower_bucket_limit i32.eqz if i32.const 0 return end local.get $2 - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_pop + call $assembly/buddy/buckets$get + call $assembly/buddy/list_pop local.set $6 local.get $6 i32.eqz if local.get $2 - global.get $~lib/allocator/buddy/bucket_limit + global.get $assembly/buddy/bucket_limit i32.ne local.tee $7 if (result i32) @@ -571,19 +525,19 @@ local.get $2 i32.const 1 i32.sub - call $~lib/allocator/buddy/lower_bucket_limit + call $assembly/buddy/lower_bucket_limit i32.eqz if i32.const 0 return end local.get $2 - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_pop + call $assembly/buddy/buckets$get + call $assembly/buddy/list_pop local.set $6 end i32.const 1 - global.get $~lib/allocator/buddy/MAX_ALLOC_LOG2 + global.get $assembly/buddy/MAX_ALLOC_LOG2 local.get $2 i32.sub i32.shl @@ -595,7 +549,7 @@ local.get $3 i32.const 2 i32.div_u - global.get $~lib/allocator/buddy/List.SIZE + global.get $assembly/buddy/List.SIZE i32.add else local.get $3 @@ -604,26 +558,26 @@ local.get $6 local.get $4 i32.add - call $~lib/allocator/buddy/update_max_ptr + call $assembly/buddy/update_max_ptr i32.eqz if local.get $2 - call $~lib/allocator/buddy/buckets$get + call $assembly/buddy/buckets$get local.get $6 - call $~lib/allocator/buddy/list_push + call $assembly/buddy/list_push i32.const 0 return end local.get $6 local.get $2 - call $~lib/allocator/buddy/node_for_ptr + call $assembly/buddy/node_for_ptr local.set $5 local.get $5 i32.const 0 i32.ne if local.get $5 - call $~lib/allocator/buddy/flip_parent_is_split + call $assembly/buddy/flip_parent_is_split end block $break|1 loop $continue|1 @@ -643,15 +597,15 @@ i32.add local.set $2 local.get $5 - call $~lib/allocator/buddy/flip_parent_is_split + call $assembly/buddy/flip_parent_is_split local.get $2 - call $~lib/allocator/buddy/buckets$get + call $assembly/buddy/buckets$get local.get $5 i32.const 1 i32.add local.get $2 - call $~lib/allocator/buddy/ptr_for_node - call $~lib/allocator/buddy/list_push + call $assembly/buddy/ptr_for_node + call $assembly/buddy/list_push end br $continue|1 end @@ -661,7 +615,7 @@ local.get $0 i32.store local.get $6 - global.get $~lib/allocator/buddy/HEADER_SIZE + global.get $assembly/buddy/HEADER_SIZE i32.add return end @@ -669,12 +623,12 @@ end i32.const 0 ) - (func $~lib/memory/memory.allocate (; 20 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/buddy/__memory_allocate + call $assembly/buddy/__memory_allocate return ) - (func $~lib/allocator/buddy/__memory_free (; 21 ;) (type $i_) (param $0 i32) + (func $assembly/buddy/__memory_free (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -684,18 +638,18 @@ return end local.get $0 - global.get $~lib/allocator/buddy/HEADER_SIZE + global.get $assembly/buddy/HEADER_SIZE i32.sub local.set $0 local.get $0 i32.load - global.get $~lib/allocator/buddy/HEADER_SIZE + global.get $assembly/buddy/HEADER_SIZE i32.add - call $~lib/allocator/buddy/bucket_for_request + call $assembly/buddy/bucket_for_request local.set $1 local.get $0 local.get $1 - call $~lib/allocator/buddy/node_for_ptr + call $assembly/buddy/node_for_ptr local.set $2 block $break|0 loop $continue|0 @@ -705,15 +659,15 @@ if block local.get $2 - call $~lib/allocator/buddy/flip_parent_is_split + call $assembly/buddy/flip_parent_is_split local.get $2 - call $~lib/allocator/buddy/parent_is_split + call $assembly/buddy/parent_is_split local.tee $3 if (result i32) local.get $3 else local.get $1 - global.get $~lib/allocator/buddy/bucket_limit + global.get $assembly/buddy/bucket_limit i32.eq end if @@ -727,8 +681,8 @@ i32.const 1 i32.add local.get $1 - call $~lib/allocator/buddy/ptr_for_node - call $~lib/allocator/buddy/list_remove + call $assembly/buddy/ptr_for_node + call $assembly/buddy/list_remove local.get $2 i32.const 1 i32.sub @@ -745,23 +699,1551 @@ end end local.get $1 - call $~lib/allocator/buddy/buckets$get + call $assembly/buddy/buckets$get local.get $2 local.get $1 - call $~lib/allocator/buddy/ptr_for_node - call $~lib/allocator/buddy/list_push + call $assembly/buddy/ptr_for_node + call $assembly/buddy/list_push ) - (func $~lib/memory/memory.free (; 22 ;) (type $i_) (param $0 i32) + (func $~lib/memory/memory.free (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $~lib/allocator/buddy/__memory_free - return + call $assembly/buddy/__memory_free ) - (func $~lib/memory/memory.reset (; 23 ;) (type $_) + (func $~lib/memory/memory.reset (; 23 ;) (type $FUNCSIG$v) unreachable ) - (func $start (; 24 ;) (type $_) + (func $~lib/util/memory/memcpy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $break|0 + loop $continue|0 + local.get $2 + if (result i32) + local.get $1 + i32.const 3 + i32.and + else + local.get $2 + end + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|0 + end + end + end + local.get $0 + i32.const 3 + i32.and + i32.const 0 + i32.eq + if + block $break|1 + loop $continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + block + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|1 + end + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.set $0 + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $0 + i32.const 2 + i32.add + local.set $0 + local.get $1 + i32.const 2 + i32.add + local.set $1 + end + local.get $2 + i32.const 1 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + block $case0|2 + local.get $0 + i32.const 3 + i32.and + local.set $5 + local.get $5 + i32.const 1 + i32.eq + br_if $case0|2 + local.get $5 + i32.const 2 + i32.eq + br_if $case1|2 + local.get $5 + i32.const 3 + i32.eq + br_if $case2|2 + br $break|2 + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + block $break|3 + loop $continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + block + local.get $1 + i32.const 1 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 5 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 9 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 13 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|3 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + block $break|4 + loop $continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + block + local.get $1 + i32.const 2 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 6 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 10 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 14 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|4 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block $break|5 + loop $continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + block + local.get $1 + i32.const 3 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 7 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 11 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 15 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|5 + end + end + end + br $break|2 + unreachable + end + unreachable + end + end + local.get $2 + i32.const 16 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + ) + (func $~lib/memory/memory.copy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + local.tee $5 + if (result i32) + local.get $5 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|2 + end + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + end + ) + (func $~lib/memory/memory.repeat (; 26 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + local.set $4 + local.get $2 + local.get $3 + i32.mul + local.set $5 + block $break|0 + loop $continue|0 + local.get $4 + local.get $5 + i32.lt_u + if + block + local.get $0 + local.get $4 + i32.add + local.get $1 + local.get $2 + call $~lib/memory/memory.copy + local.get $4 + local.get $2 + i32.add + local.set $4 + end + br $continue|0 + end + end + end + ) + (func $~lib/memory/memory.compare (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/util/memory/memcmp|inlined.0 (result i32) + local.get $0 + local.set $5 + local.get $1 + local.set $4 + local.get $2 + local.set $3 + local.get $5 + local.get $4 + i32.eq + if + i32.const 0 + br $~lib/util/memory/memcmp|inlined.0 + end + block $break|0 + loop $continue|0 + local.get $3 + i32.const 0 + i32.ne + local.tee $6 + if (result i32) + local.get $5 + i32.load8_u + local.get $4 + i32.load8_u + i32.eq + else + local.get $6 + end + if + block + local.get $3 + i32.const 1 + i32.sub + local.set $3 + local.get $5 + i32.const 1 + i32.add + local.set $5 + local.get $4 + i32.const 1 + i32.add + local.set $4 + end + br $continue|0 + end + end + end + local.get $3 + if (result i32) + local.get $5 + i32.load8_u + local.get $4 + i32.load8_u + i32.sub + else + i32.const 0 + end + end + ) + (func $start (; 28 ;) (type $FUNCSIG$v) call $start:assembly/index ) - (func $null (; 25 ;) (type $_) + (func $null (; 29 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/allocators/tlsf/optimized.wat b/tests/allocators/tlsf/optimized.wat index a0da81d08a..edc38303d9 100644 --- a/tests/allocators/tlsf/optimized.wat +++ b/tests/allocators/tlsf/optimized.wat @@ -1,85 +1,38 @@ (module - (type $iiii (func (param i32 i32 i32) (result i32))) - (type $ii (func (param i32) (result i32))) - (type $ii_ (func (param i32 i32))) - (type $iii_ (func (param i32 i32 i32))) - (type $iiii_ (func (param i32 i32 i32 i32))) - (type $iii (func (param i32 i32) (result i32))) - (type $i_ (func (param i32))) - (type $_ (func)) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$v (func)) (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "memory.compare" (func $~lib/memory/memory.compare)) + (export "memory.copy" (func $~lib/memory/memory.copy)) + (export "memory.init" (func $~lib/memory/memory.init)) + (export "memory.drop" (func $~lib/memory/memory.drop)) (export "memory.allocate" (func $~lib/memory/memory.allocate)) (export "memory.free" (func $~lib/memory/memory.free)) (export "memory.reset" (func $~lib/memory/memory.reset)) - (func $~lib/internal/memory/memcmp (; 0 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 0 - return - end - loop $continue|0 - local.get $2 - i32.const 0 - i32.ne - local.tee $3 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.eq - else - local.get $3 - end - if - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $continue|0 - end - end - local.get $2 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.sub - else - i32.const 0 - end + (export "memory.repeat" (func $~lib/memory/memory.repeat)) + (export "memory.compare" (func $~lib/memory/memory.compare)) + (func $~lib/memory/memory.init (; 0 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + unreachable ) - (func $~lib/memory/memory.compare (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcmp + (func $~lib/memory/memory.drop (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + unreachable ) (func $~lib/allocator/tlsf/Root#set:tailRef (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 2912 local.get $0 i32.store ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $iii_) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 2 @@ -88,7 +41,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 4 ;) (type $iiii_) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 4 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $1 i32.const 5 @@ -101,7 +54,7 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Block#get:right (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.add @@ -111,13 +64,13 @@ i32.and i32.add ) - (func $~lib/allocator/tlsf/fls (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 31 local.get $0 i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 5 @@ -129,7 +82,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.const 2 @@ -137,7 +90,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 9 ;) (type $ii_) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -233,7 +186,7 @@ end end ) - (func $~lib/allocator/tlsf/Root#insert (; 10 ;) (type $ii_) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -373,7 +326,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 11 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $2 block (result i32) @@ -403,7 +356,6 @@ i32.const 32 i32.lt_u if - i32.const 0 return end local.get $1 @@ -436,9 +388,8 @@ local.get $0 local.get $1 call $~lib/allocator/tlsf/Root#insert - i32.const 1 ) - (func $~lib/allocator/tlsf/Root#search (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -519,7 +470,7 @@ end end ) - (func $~lib/allocator/tlsf/Root#use (; 13 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -578,91 +529,93 @@ i32.const 8 i32.add ) - (func $~lib/allocator/tlsf/__memory_allocate (; 14 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + local.get $0 + local.set $3 global.get $~lib/allocator/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 8 - local.tee $4 + local.tee $5 i32.const 68451 i32.add i32.const -65536 i32.and i32.const 16 i32.shr_u - local.tee $5 + local.tee $1 current_memory - local.tee $2 + local.tee $4 i32.gt_s - local.tee $3 + local.tee $2 if (result i32) - local.get $5 - local.get $2 + local.get $1 + local.get $4 i32.sub grow_memory i32.const 0 i32.lt_s else - local.get $3 + local.get $2 end if unreachable end - local.get $4 - local.tee $1 + local.get $5 + local.tee $0 global.set $~lib/allocator/tlsf/ROOT i32.const 0 call $~lib/allocator/tlsf/Root#set:tailRef - local.get $1 + local.get $0 i32.const 0 i32.store i32.const 0 - local.set $3 + local.set $2 loop $repeat|0 block $break|0 - local.get $3 + local.get $2 i32.const 22 i32.ge_u br_if $break|0 - local.get $1 - local.get $3 + local.get $0 + local.get $2 i32.const 0 call $~lib/allocator/tlsf/Root#setSLMap i32.const 0 - local.set $2 + local.set $1 loop $repeat|1 block $break|1 - local.get $2 + local.get $1 i32.const 32 i32.ge_u br_if $break|1 - local.get $1 - local.get $3 + local.get $0 local.get $2 + local.get $1 i32.const 0 call $~lib/allocator/tlsf/Root#setHead - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $repeat|1 end end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 end end - local.get $1 - local.get $4 + local.get $0 + local.get $5 i32.const 2923 i32.add i32.const -8 @@ -671,55 +624,54 @@ i32.const 16 i32.shl call $~lib/allocator/tlsf/Root#addMemory - drop end - local.get $0 + local.get $3 i32.const 1073741824 i32.gt_u if unreachable end - local.get $1 - local.get $1 local.get $0 + local.get $0 + local.get $3 i32.const 7 i32.add i32.const -8 i32.and - local.tee $5 + local.tee $1 i32.const 16 - local.tee $2 - local.get $5 - local.get $2 + local.tee $4 + local.get $1 + local.get $4 i32.gt_u select - local.tee $0 + local.tee $3 call $~lib/allocator/tlsf/Root#search - local.tee $4 + local.tee $1 if (result i32) - local.get $4 + local.get $1 else current_memory - local.tee $5 local.tee $4 - local.get $0 + local.tee $2 + local.get $3 i32.const 65535 i32.add i32.const -65536 i32.and i32.const 16 i32.shr_u - local.tee $2 - local.tee $3 - local.get $4 - local.get $3 + local.tee $5 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $2 + local.get $5 grow_memory i32.const 0 i32.lt_s @@ -727,27 +679,22 @@ unreachable end end - local.get $1 - local.get $5 + local.get $0 + local.get $4 i32.const 16 i32.shl current_memory i32.const 16 i32.shl call $~lib/allocator/tlsf/Root#addMemory - drop - local.get $1 local.get $0 + local.get $3 call $~lib/allocator/tlsf/Root#search end - local.get $0 + local.get $3 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/memory/memory.allocate (; 15 ;) (type $ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/tlsf/__memory_allocate - ) - (func $~lib/allocator/tlsf/__memory_free (; 16 ;) (type $i_) (param $0 i32) + (func $~lib/memory/memory.free (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -772,14 +719,1332 @@ end end ) - (func $~lib/memory/memory.free (; 17 ;) (type $i_) (param $0 i32) - local.get $0 - call $~lib/allocator/tlsf/__memory_free - ) - (func $~lib/memory/memory.reset (; 18 ;) (type $_) + (func $~lib/memory/memory.reset (; 16 ;) (type $FUNCSIG$v) unreachable ) - (func $null (; 19 ;) (type $_) + (func $~lib/util/memory/memcpy (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + loop $continue|0 + local.get $1 + i32.const 3 + i32.and + local.get $2 + local.get $2 + select + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|0 + end + end + local.get $0 + i32.const 3 + i32.and + i32.eqz + if + loop $continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|1 + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 8 + i32.add + local.set $0 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $1 + i32.const 4 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.add + local.set $0 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $1 + i32.const 2 + i32.add + local.set $1 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.set $3 + local.get $3 + block (result i32) + local.get $1 + local.set $3 + local.get $3 + i32.load8_u + end + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + block $case0|2 + local.get $0 + i32.const 3 + i32.and + i32.const 1 + i32.sub + br_table $case0|2 $case1|2 $case2|2 $break|2 + end + local.get $1 + i32.load + local.set $4 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + loop $continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + local.get $4 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 5 + i32.add + i32.load + local.tee $4 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 9 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + local.get $4 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 13 + i32.add + i32.load + local.tee $4 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|3 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $4 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + loop $continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 2 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + local.get $4 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 6 + i32.add + i32.load + local.tee $4 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 10 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + local.get $4 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 14 + i32.add + i32.load + local.tee $4 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|4 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $4 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + loop $continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 3 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + local.get $4 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 7 + i32.add + i32.load + local.tee $4 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 11 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + local.get $4 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 15 + i32.add + i32.load + local.tee $4 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|5 + end + end + end + end + local.get $2 + i32.const 16 + i32.and + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.set $3 + local.get $3 + block (result i32) + local.get $1 + local.set $3 + local.get $3 + i32.load8_u + end + i32.store8 + end + ) + (func $~lib/memory/memory.copy (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + local.tee $3 + if (result i32) + local.get $3 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + br $continue|0 + end + end + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 + end + end + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end + end + end + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + ) + (func $~lib/memory/memory.repeat (; 19 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + local.get $2 + local.get $3 + i32.mul + local.set $3 + loop $continue|0 + local.get $4 + local.get $3 + i32.lt_u + if + local.get $0 + local.get $4 + i32.add + local.get $1 + local.get $2 + call $~lib/memory/memory.copy + local.get $2 + local.get $4 + i32.add + local.set $4 + br $continue|0 + end + end + ) + (func $~lib/memory/memory.compare (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + local.get $1 + i32.eq + if (result i32) + i32.const 0 + else + loop $continue|0 + local.get $2 + i32.const 0 + i32.ne + local.tee $3 + if (result i32) + local.get $0 + i32.load8_u + local.get $1 + i32.load8_u + i32.eq + else + local.get $3 + end + if + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $continue|0 + end + end + local.get $2 + if (result i32) + local.get $0 + i32.load8_u + local.get $1 + i32.load8_u + i32.sub + else + i32.const 0 + end + end + ) + (func $null (; 21 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/allocators/tlsf/untouched.wat b/tests/allocators/tlsf/untouched.wat index ba07ee7756..eefda93712 100644 --- a/tests/allocators/tlsf/untouched.wat +++ b/tests/allocators/tlsf/untouched.wat @@ -1,15 +1,15 @@ (module - (type $iiii_ (func (param i32 i32 i32 i32))) - (type $_ (func)) - (type $iiii (func (param i32 i32 i32) (result i32))) - (type $ii (func (param i32) (result i32))) - (type $ii_ (func (param i32 i32))) - (type $iii_ (func (param i32 i32 i32))) - (type $iii (func (param i32 i32) (result i32))) - (type $i_ (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\16\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00,\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) @@ -29,15 +29,19 @@ (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 60)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "memory.compare" (func $~lib/memory/memory.compare)) + (export "memory.copy" (func $~lib/memory/memory.copy)) + (export "memory.init" (func $~lib/memory/memory.init)) + (export "memory.drop" (func $~lib/memory/memory.drop)) (export "memory.allocate" (func $~lib/memory/memory.allocate)) (export "memory.free" (func $~lib/memory/memory.free)) (export "memory.reset" (func $~lib/memory/memory.reset)) + (export "memory.repeat" (func $~lib/memory/memory.repeat)) + (export "memory.compare" (func $~lib/memory/memory.compare)) (start $start) - (func $start:~lib/allocator/tlsf (; 1 ;) (type $_) + (func $start:~lib/allocator/tlsf (; 1 ;) (type $FUNCSIG$v) i32.const 1 global.get $~lib/allocator/tlsf/SL_BITS i32.shl @@ -46,90 +50,36 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 122 + i32.const 16 + i32.const 114 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start:assembly/index (; 2 ;) (type $_) + (func $start:assembly/index (; 2 ;) (type $FUNCSIG$v) call $start:~lib/allocator/tlsf ) - (func $~lib/internal/memory/memcmp (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 0 - return - end - block $break|0 - loop $continue|0 - local.get $2 - i32.const 0 - i32.ne - local.tee $3 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.eq - else - local.get $3 - end - if - block - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - end - br $continue|0 - end - end - end - local.get $2 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.sub - else - i32.const 0 - end + (func $~lib/memory/memory.init (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + unreachable ) - (func $~lib/memory/memory.compare (; 4 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcmp + (func $~lib/memory/memory.drop (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + unreachable ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 5 ;) (type $ii_) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 0 local.get $1 i32.store offset=2912 ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 6 ;) (type $iii_) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u i32.eqz if i32.const 0 - i32.const 8 - i32.const 144 + i32.const 16 + i32.const 135 i32.const 4 call $~lib/env/abort unreachable @@ -142,15 +92,15 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 7 ;) (type $iiii_) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 7 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u i32.eqz if i32.const 0 - i32.const 8 - i32.const 167 + i32.const 16 + i32.const 158 i32.const 4 call $~lib/env/abort unreachable @@ -161,8 +111,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 168 + i32.const 16 + i32.const 159 i32.const 4 call $~lib/env/abort unreachable @@ -179,11 +129,11 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Root#get:tailRef (; 8 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.load offset=2912 ) - (func $~lib/allocator/tlsf/Block#get:right (; 9 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -194,8 +144,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 89 + i32.const 16 + i32.const 81 i32.const 4 call $~lib/env/abort unreachable @@ -214,8 +164,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 8 - i32.const 90 + i32.const 16 + i32.const 82 i32.const 11 call $~lib/env/abort unreachable @@ -223,15 +173,15 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/fls (; 10 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 8 - i32.const 428 + i32.const 16 + i32.const 419 i32.const 2 call $~lib/env/abort unreachable @@ -241,15 +191,15 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 11 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u i32.eqz if i32.const 0 - i32.const 8 - i32.const 158 + i32.const 16 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -260,8 +210,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 159 + i32.const 16 + i32.const 150 i32.const 4 call $~lib/env/abort unreachable @@ -277,15 +227,15 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u i32.eqz if i32.const 0 - i32.const 8 - i32.const 138 + i32.const 16 + i32.const 129 i32.const 4 call $~lib/env/abort unreachable @@ -297,7 +247,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 13 ;) (type $ii_) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -314,8 +264,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 258 + i32.const 16 + i32.const 249 i32.const 4 call $~lib/env/abort unreachable @@ -340,8 +290,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 260 + i32.const 16 + i32.const 251 i32.const 4 call $~lib/env/abort unreachable @@ -442,7 +392,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 14 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -451,8 +401,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 81 + i32.const 16 + i32.const 73 i32.const 4 call $~lib/env/abort unreachable @@ -465,8 +415,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 8 - i32.const 82 + i32.const 16 + i32.const 74 i32.const 11 call $~lib/env/abort unreachable @@ -474,7 +424,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/Root#setJump (; 15 ;) (type $iii_) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.load global.get $~lib/allocator/tlsf/FREE @@ -482,8 +432,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 334 + i32.const 16 + i32.const 325 i32.const 4 call $~lib/env/abort unreachable @@ -495,8 +445,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 335 + i32.const 16 + i32.const 326 i32.const 4 call $~lib/env/abort unreachable @@ -508,8 +458,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 336 + i32.const 16 + i32.const 327 i32.const 4 call $~lib/env/abort unreachable @@ -520,7 +470,7 @@ local.get $1 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 16 ;) (type $ii_) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -534,8 +484,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 189 + i32.const 16 + i32.const 180 i32.const 4 call $~lib/env/abort unreachable @@ -549,8 +499,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 191 + i32.const 16 + i32.const 182 i32.const 4 call $~lib/env/abort unreachable @@ -575,8 +525,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 193 + i32.const 16 + i32.const 184 i32.const 4 call $~lib/env/abort unreachable @@ -587,8 +537,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 8 - i32.const 197 + i32.const 16 + i32.const 188 i32.const 23 call $~lib/env/abort unreachable @@ -635,8 +585,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 8 - i32.const 211 + i32.const 16 + i32.const 202 i32.const 24 call $~lib/env/abort unreachable @@ -653,8 +603,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 213 + i32.const 16 + i32.const 204 i32.const 6 call $~lib/env/abort unreachable @@ -708,8 +658,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 226 + i32.const 16 + i32.const 217 i32.const 4 call $~lib/env/abort unreachable @@ -786,7 +736,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 17 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -799,8 +749,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 377 + i32.const 16 + i32.const 368 i32.const 4 call $~lib/env/abort unreachable @@ -812,8 +762,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 378 + i32.const 16 + i32.const 369 i32.const 4 call $~lib/env/abort unreachable @@ -825,8 +775,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 379 + i32.const 16 + i32.const 370 i32.const 4 call $~lib/env/abort unreachable @@ -846,8 +796,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 384 + i32.const 16 + i32.const 375 i32.const 6 call $~lib/env/abort unreachable @@ -875,8 +825,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 393 + i32.const 16 + i32.const 384 i32.const 6 call $~lib/env/abort unreachable @@ -939,15 +889,15 @@ call $~lib/allocator/tlsf/Root#insert i32.const 1 ) - (func $~lib/allocator/tlsf/ffs (; 18 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 8 - i32.const 422 + i32.const 16 + i32.const 413 i32.const 2 call $~lib/env/abort unreachable @@ -955,15 +905,15 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/ffs (; 19 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 8 - i32.const 422 + i32.const 16 + i32.const 413 i32.const 2 call $~lib/env/abort unreachable @@ -971,7 +921,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -992,8 +942,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 296 + i32.const 16 + i32.const 287 i32.const 4 call $~lib/env/abort unreachable @@ -1088,8 +1038,8 @@ local.get $7 else i32.const 0 - i32.const 8 - i32.const 323 + i32.const 16 + i32.const 314 i32.const 16 call $~lib/env/abort unreachable @@ -1112,7 +1062,7 @@ end local.get $6 ) - (func $~lib/allocator/tlsf/Root#use (; 21 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1125,8 +1075,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 348 + i32.const 16 + i32.const 339 i32.const 4 call $~lib/env/abort unreachable @@ -1145,8 +1095,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 349 + i32.const 16 + i32.const 340 i32.const 4 call $~lib/env/abort unreachable @@ -1158,8 +1108,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 350 + i32.const 16 + i32.const 341 i32.const 4 call $~lib/env/abort unreachable @@ -1218,8 +1168,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 8 - i32.const 368 + i32.const 16 + i32.const 359 i32.const 25 call $~lib/env/abort unreachable @@ -1240,7 +1190,7 @@ global.get $~lib/allocator/tlsf/Block.INFO i32.add ) - (func $~lib/allocator/tlsf/__memory_allocate (; 22 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1248,297 +1198,1821 @@ (local $5 i32) (local $6 i32) (local $7 i32) - global.get $~lib/allocator/tlsf/ROOT - local.set $1 - local.get $1 - i32.eqz - if - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and + (local $8 i32) + block $~lib/allocator/tlsf/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 + global.get $~lib/allocator/tlsf/ROOT local.set $2 - current_memory - local.set $3 local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $4 - local.get $4 - local.get $3 - i32.gt_s - local.tee $5 - if (result i32) + i32.eqz + if + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $3 + current_memory + local.set $4 + local.get $3 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $5 local.get $4 + i32.gt_s + local.tee $6 + if (result i32) + local.get $5 + local.get $4 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + local.get $6 + end + if + unreachable + end local.get $3 - i32.sub - grow_memory + local.tee $2 + global.set $~lib/allocator/tlsf/ROOT + local.get $2 i32.const 0 - i32.lt_s - else - local.get $5 - end - if - unreachable - end - local.get $2 - local.tee $1 - global.set $~lib/allocator/tlsf/ROOT - local.get $1 - i32.const 0 - call $~lib/allocator/tlsf/Root#set:tailRef - local.get $1 - i32.const 0 - i32.store - block $break|0 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $2 i32.const 0 - local.set $5 - loop $repeat|0 - local.get $5 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - br_if $break|0 - block - local.get $1 - local.get $5 - i32.const 0 - call $~lib/allocator/tlsf/Root#setSLMap - block $break|1 + i32.store + block $break|0 + i32.const 0 + local.set $6 + loop $repeat|0 + local.get $6 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + br_if $break|0 + block + local.get $2 + local.get $6 i32.const 0 - local.set $6 - loop $repeat|1 - local.get $6 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u - i32.eqz - br_if $break|1 - local.get $1 - local.get $5 - local.get $6 + call $~lib/allocator/tlsf/Root#setSLMap + block $break|1 i32.const 0 - call $~lib/allocator/tlsf/Root#setHead - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $repeat|1 + local.set $7 + loop $repeat|1 + local.get $7 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + br_if $break|1 + local.get $2 + local.get $6 + local.get $7 + i32.const 0 + call $~lib/allocator/tlsf/Root#setHead + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $repeat|1 + unreachable + end unreachable end - unreachable end + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $repeat|0 + unreachable end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $repeat|0 unreachable end + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + end + local.get $1 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.gt_u + if unreachable end local.get $1 - local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add i32.const 7 i32.add i32.const 7 i32.const -1 i32.xor i32.and - current_memory - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - drop - end - local.get $0 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.gt_u - if - unreachable - end - local.get $0 - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.tee $4 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - local.tee $3 - local.get $4 - local.get $3 - i32.gt_u - select - local.set $0 - local.get $1 - local.get $0 - call $~lib/allocator/tlsf/Root#search - local.set $7 - local.get $7 - i32.eqz - if - current_memory - local.set $4 - local.get $0 - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $3 - local.get $4 - local.tee $2 - local.get $3 local.tee $5 - local.get $2 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + local.tee $4 local.get $5 - i32.gt_s + local.get $4 + i32.gt_u select - local.set $2 + local.set $1 local.get $2 - grow_memory - i32.const 0 - i32.lt_s + local.get $1 + call $~lib/allocator/tlsf/Root#search + local.set $5 + local.get $5 + i32.eqz if + current_memory + local.set $4 + local.get $1 + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $3 + local.get $4 + local.tee $6 local.get $3 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + current_memory + local.set $7 + local.get $2 + local.get $4 + i32.const 16 + i32.shl + local.get $7 + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/Root#search + local.tee $8 + i32.eqz + if (result i32) + i32.const 0 + i32.const 16 + i32.const 472 + i32.const 12 + call $~lib/env/abort unreachable + else + local.get $8 end + local.set $5 end - current_memory - local.set $5 - local.get $1 - local.get $4 - i32.const 16 - i32.shl local.get $5 - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - drop + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and local.get $1 - local.get $0 - call $~lib/allocator/tlsf/Root#search - local.tee $6 + i32.ge_u i32.eqz - if (result i32) + if i32.const 0 - i32.const 8 - i32.const 480 - i32.const 12 + i32.const 16 + i32.const 475 + i32.const 2 call $~lib/env/abort unreachable - else - local.get $6 end - local.set $7 - end - local.get $7 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.get $0 - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 8 - i32.const 483 - i32.const 2 - call $~lib/env/abort - unreachable + local.get $2 + local.get $5 + local.get $1 + call $~lib/allocator/tlsf/Root#use end - local.get $1 - local.get $7 - local.get $0 - call $~lib/allocator/tlsf/Root#use - ) - (func $~lib/memory/memory.allocate (; 23 ;) (type $ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/tlsf/__memory_allocate return ) - (func $~lib/allocator/tlsf/__memory_free (; 24 ;) (type $i_) (param $0 i32) + (func $~lib/memory/memory.free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $0 + local.set $1 + local.get $1 if global.get $~lib/allocator/tlsf/ROOT - local.set $1 - local.get $1 + local.set $2 + local.get $2 if - local.get $0 + local.get $1 global.get $~lib/allocator/tlsf/Block.INFO i32.sub - local.set $2 - local.get $2 - i32.load local.set $3 local.get $3 + i32.load + local.set $4 + local.get $4 global.get $~lib/allocator/tlsf/FREE i32.and i32.eqz i32.eqz if i32.const 0 - i32.const 8 - i32.const 494 + i32.const 16 + i32.const 488 i32.const 6 call $~lib/env/abort unreachable end - local.get $2 local.get $3 + local.get $4 global.get $~lib/allocator/tlsf/FREE i32.or i32.store + local.get $2 local.get $1 - local.get $0 global.get $~lib/allocator/tlsf/Block.INFO i32.sub call $~lib/allocator/tlsf/Root#insert end end ) - (func $~lib/memory/memory.free (; 25 ;) (type $i_) (param $0 i32) - local.get $0 - call $~lib/allocator/tlsf/__memory_free - return - ) - (func $~lib/allocator/tlsf/__memory_reset (; 26 ;) (type $_) + (func $~lib/memory/memory.reset (; 24 ;) (type $FUNCSIG$v) unreachable ) - (func $~lib/memory/memory.reset (; 27 ;) (type $_) - call $~lib/allocator/tlsf/__memory_reset - return + (func $~lib/util/memory/memcpy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $break|0 + loop $continue|0 + local.get $2 + if (result i32) + local.get $1 + i32.const 3 + i32.and + else + local.get $2 + end + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|0 + end + end + end + local.get $0 + i32.const 3 + i32.and + i32.const 0 + i32.eq + if + block $break|1 + loop $continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + block + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|1 + end + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.set $0 + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $0 + i32.const 2 + i32.add + local.set $0 + local.get $1 + i32.const 2 + i32.add + local.set $1 + end + local.get $2 + i32.const 1 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + block $case0|2 + local.get $0 + i32.const 3 + i32.and + local.set $5 + local.get $5 + i32.const 1 + i32.eq + br_if $case0|2 + local.get $5 + i32.const 2 + i32.eq + br_if $case1|2 + local.get $5 + i32.const 3 + i32.eq + br_if $case2|2 + br $break|2 + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + block $break|3 + loop $continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + block + local.get $1 + i32.const 1 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 5 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 9 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 13 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|3 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + block $break|4 + loop $continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + block + local.get $1 + i32.const 2 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 6 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 10 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 14 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|4 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block $break|5 + loop $continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + block + local.get $1 + i32.const 3 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 7 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 11 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 15 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|5 + end + end + end + br $break|2 + unreachable + end + unreachable + end + end + local.get $2 + i32.const 16 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + ) + (func $~lib/memory/memory.copy (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + local.tee $5 + if (result i32) + local.get $5 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|2 + end + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + end + ) + (func $~lib/memory/memory.repeat (; 27 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + local.set $4 + local.get $2 + local.get $3 + i32.mul + local.set $5 + block $break|0 + loop $continue|0 + local.get $4 + local.get $5 + i32.lt_u + if + block + local.get $0 + local.get $4 + i32.add + local.get $1 + local.get $2 + call $~lib/memory/memory.copy + local.get $4 + local.get $2 + i32.add + local.set $4 + end + br $continue|0 + end + end + end + ) + (func $~lib/memory/memory.compare (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $~lib/util/memory/memcmp|inlined.0 (result i32) + local.get $0 + local.set $5 + local.get $1 + local.set $4 + local.get $2 + local.set $3 + local.get $5 + local.get $4 + i32.eq + if + i32.const 0 + br $~lib/util/memory/memcmp|inlined.0 + end + block $break|0 + loop $continue|0 + local.get $3 + i32.const 0 + i32.ne + local.tee $6 + if (result i32) + local.get $5 + i32.load8_u + local.get $4 + i32.load8_u + i32.eq + else + local.get $6 + end + if + block + local.get $3 + i32.const 1 + i32.sub + local.set $3 + local.get $5 + i32.const 1 + i32.add + local.set $5 + local.get $4 + i32.const 1 + i32.add + local.set $4 + end + br $continue|0 + end + end + end + local.get $3 + if (result i32) + local.get $5 + i32.load8_u + local.get $4 + i32.load8_u + i32.sub + else + i32.const 0 + end + end ) - (func $start (; 28 ;) (type $_) + (func $start (; 29 ;) (type $FUNCSIG$v) call $start:assembly/index ) - (func $null (; 29 ;) (type $_) + (func $null (; 30 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/new-without-allocator.ts b/tests/compiler/new-without-allocator.ts index ff9548d52d..a50aeb6134 100644 --- a/tests/compiler/new-without-allocator.ts +++ b/tests/compiler/new-without-allocator.ts @@ -4,3 +4,4 @@ export function test(): i32 { var a = new A(); return 3; } +// Expect error: AS214 diff --git a/tests/compiler/new-without-allocator.untouched.wat b/tests/compiler/new-without-allocator.untouched.wat index 1716c926a6..e69de29bb2 100644 --- a/tests/compiler/new-without-allocator.untouched.wat +++ b/tests/compiler/new-without-allocator.untouched.wat @@ -1,107 +0,0 @@ -(module - (type $FUNCSIG$i (func (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$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (table $0 1 funcref) - (elem (i32.const 0) $null) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) - (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (export "test" (func $new-without-allocator/test)) - (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 32 - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.add - i32.const 1 - i32.sub - i32.clz - i32.sub - i32.shl - ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - unreachable - ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - call $~lib/runtime/ADJUSTOBLOCK - call $~lib/memory/memory.allocate - local.set $1 - local.get $1 - global.get $~lib/runtime/HEADER_MAGIC - i32.store - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.add - ) - (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 16 - i32.const 151 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - local.set $2 - local.get $2 - i32.load - global.get $~lib/runtime/HEADER_MAGIC - i32.eq - i32.eqz - if - i32.const 0 - i32.const 16 - i32.const 153 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $1 - i32.store - local.get $0 - ) - (func $new-without-allocator/A#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - call $~lib/runtime/allocate - i32.const 1 - call $~lib/runtime/register - local.set $0 - end - local.get $0 - ) - (func $new-without-allocator/test (; 6 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - i32.const 0 - call $new-without-allocator/A#constructor - local.set $0 - i32.const 3 - ) - (func $null (; 7 ;) (type $FUNCSIG$v) - ) -) From e36722f2e60020e91d0ac367338866c1279c807f Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 27 Mar 2019 17:21:52 +0100 Subject: [PATCH 069/119] unify mem/ref interface --- src/program.ts | 4 +- std/assembly/allocator/README.md | 21 + std/assembly/allocator/arena.ts | 12 +- std/assembly/allocator/emscripten.ts | 8 +- std/assembly/allocator/index.d.ts | 3 + std/assembly/allocator/system.ts | 8 +- std/assembly/allocator/tlsf.ts | 8 +- std/assembly/collector/README.md | 2 +- std/assembly/memory.ts | 11 +- std/assembly/runtime.ts | 12 +- tests/compiler/call-super.optimized.wat | 8 +- tests/compiler/call-super.untouched.wat | 165 ++-- tests/compiler/constructor.optimized.wat | 12 +- tests/compiler/constructor.untouched.wat | 155 ++- tests/compiler/exports.optimized.wat | 8 +- tests/compiler/exports.untouched.wat | 167 ++-- tests/compiler/gc/global-assign.optimized.wat | 8 +- tests/compiler/gc/global-assign.untouched.wat | 141 ++- tests/compiler/gc/global-init.optimized.wat | 8 +- tests/compiler/gc/global-init.untouched.wat | 141 ++- .../gc/rc/global-assign.optimized.wat | 8 +- .../gc/rc/global-assign.untouched.wat | 145 ++- .../compiler/gc/rc/global-init.optimized.wat | 8 +- .../compiler/gc/rc/global-init.untouched.wat | 143 ++- tests/compiler/getter-call.optimized.wat | 8 +- tests/compiler/getter-call.untouched.wat | 141 ++- tests/compiler/inlining.optimized.wat | 8 +- tests/compiler/inlining.untouched.wat | 137 ++- tests/compiler/number.optimized.wat | 12 +- tests/compiler/number.untouched.wat | 201 ++-- tests/compiler/object-literal.optimized.wat | 8 +- tests/compiler/object-literal.untouched.wat | 147 ++- .../optional-typeparameters.optimized.wat | 8 +- .../optional-typeparameters.untouched.wat | 143 ++- .../std/allocator_arena.optimized.wat | 14 +- .../std/allocator_arena.untouched.wat | 146 +-- .../compiler/std/array-literal.optimized.wat | 8 +- .../compiler/std/array-literal.untouched.wat | 155 ++- tests/compiler/std/array.optimized.wat | 24 +- tests/compiler/std/array.untouched.wat | 709 +++++++------- tests/compiler/std/arraybuffer.optimized.wat | 10 +- tests/compiler/std/arraybuffer.untouched.wat | 171 ++-- tests/compiler/std/dataview.optimized.wat | 8 +- tests/compiler/std/dataview.untouched.wat | 209 ++-- tests/compiler/std/date.optimized.wat | 8 +- tests/compiler/std/date.untouched.wat | 141 ++- tests/compiler/std/map.optimized.wat | 8 +- tests/compiler/std/map.untouched.wat | 353 ++++--- tests/compiler/std/new.optimized.wat | 8 +- tests/compiler/std/new.untouched.wat | 137 ++- .../std/operator-overloading.optimized.wat | 8 +- .../std/operator-overloading.untouched.wat | 197 ++-- tests/compiler/std/runtime.optimized.wat | 22 +- tests/compiler/std/runtime.untouched.wat | 438 ++++----- tests/compiler/std/set.optimized.wat | 8 +- tests/compiler/std/set.untouched.wat | 333 ++++--- tests/compiler/std/static-array.optimized.wat | 6 +- tests/compiler/std/static-array.untouched.wat | 181 ++-- tests/compiler/std/string-utf8.optimized.wat | 24 +- tests/compiler/std/string-utf8.untouched.wat | 157 ++-- tests/compiler/std/string.optimized.wat | 16 +- tests/compiler/std/string.untouched.wat | 263 +++--- tests/compiler/std/symbol.optimized.wat | 8 +- tests/compiler/std/symbol.untouched.wat | 191 ++-- tests/compiler/std/typedarray.optimized.wat | 12 +- tests/compiler/std/typedarray.untouched.wat | 889 +++++++++--------- 66 files changed, 3446 insertions(+), 3435 deletions(-) create mode 100644 std/assembly/allocator/README.md create mode 100644 std/assembly/allocator/index.d.ts diff --git a/src/program.ts b/src/program.ts index 183f65fbc1..b70f248cfb 100644 --- a/src/program.ts +++ b/src/program.ts @@ -838,10 +838,10 @@ export class Program extends DiagnosticEmitter { this.makeArrayInstance = this.resolver.resolveFunction(element, null); } // memory allocator interface - if (element = this.lookupGlobal("__memory_allocate")) { + if (element = this.lookupGlobal("__mem_allocate")) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.allocateMem = this.resolver.resolveFunction(element, null); - element = assert(this.lookupGlobal("__memory_free")); + element = assert(this.lookupGlobal("__mem_free")); assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.freeMem = this.resolver.resolveFunction(element, null); } diff --git a/std/assembly/allocator/README.md b/std/assembly/allocator/README.md new file mode 100644 index 0000000000..8bb6e9d4e6 --- /dev/null +++ b/std/assembly/allocator/README.md @@ -0,0 +1,21 @@ +Memory manager interface +======================== + +A memory manager for AssemblyScript must implement the following common and may implement any number of optional interfaces: + +Common +------ + +* **__mem_allocate**(size: `usize`): `usize`
+ Dynamically allocates a chunk of memory of at least the specified size and returns its address. + Alignment must be guaranteed to be at least 8 bytes, but there are considerations to increase + alignment to 16 bytes to fit SIMD v128 values. + +* **__mem_free**(ref: `usize`): `void`
+ Frees a dynamically allocated chunk of memory by its address. + +Optional +-------- + +* **__mem_reset**(ref: `usize`, parentRef: `usize`)
+ Resets dynamic memory to its initial state. Used by the arena allocator. diff --git a/std/assembly/allocator/arena.ts b/std/assembly/allocator/arena.ts index b63e0d7fee..759eba2e1d 100644 --- a/std/assembly/allocator/arena.ts +++ b/std/assembly/allocator/arena.ts @@ -10,8 +10,8 @@ var startOffset: usize = (HEAP_BASE + AL_MASK) & ~AL_MASK; var offset: usize = startOffset; // @ts-ignore: decorator -@unsafe @global @inline -function __memory_allocate(size: usize): usize { +@unsafe @global +function __mem_allocate(size: usize): usize { if (size > MAX_SIZE_32) unreachable(); var ptr = offset; var newPtr = (ptr + max(size, 1) + AL_MASK) & ~AL_MASK; @@ -30,12 +30,12 @@ function __memory_allocate(size: usize): usize { } // @ts-ignore: decorator -@unsafe @global @inline -function __memory_free(ptr: usize): void { +@unsafe @global +function __mem_free(ptr: usize): void { } // @ts-ignore: decorator -@unsafe @global @inline -function __memory_reset(): void { +@unsafe @global +function __mem_reset(): void { offset = startOffset; } diff --git a/std/assembly/allocator/emscripten.ts b/std/assembly/allocator/emscripten.ts index e6ef0ae297..c0a6851719 100644 --- a/std/assembly/allocator/emscripten.ts +++ b/std/assembly/allocator/emscripten.ts @@ -7,13 +7,13 @@ declare function _malloc(size: usize): usize; declare function _free(ptr: usize): void; // @ts-ignore: decorator -@unsafe @global @inline -function __memory_allocate(size: usize): usize { +@unsafe @global +function __mem_allocate(size: usize): usize { return _malloc(size); } // @ts-ignore: decorator -@unsafe @global @inline -function __memory_free(ptr: usize): void { +@unsafe @global +function __mem_free(ptr: usize): void { _free(ptr); } diff --git a/std/assembly/allocator/index.d.ts b/std/assembly/allocator/index.d.ts new file mode 100644 index 0000000000..73d569fb59 --- /dev/null +++ b/std/assembly/allocator/index.d.ts @@ -0,0 +1,3 @@ +declare function __mem_allocate(size: usize): usize; +declare function __mem_free(ref: usize): void; +declare function __mem_reset(): void; diff --git a/std/assembly/allocator/system.ts b/std/assembly/allocator/system.ts index e137e43e94..ceeee58001 100644 --- a/std/assembly/allocator/system.ts +++ b/std/assembly/allocator/system.ts @@ -7,13 +7,13 @@ declare function malloc(size: usize): usize; declare function free(ptr: usize): void; // @ts-ignore: decorator -@unsafe @global @inline -function __memory_allocate(size: usize): usize { +@unsafe @global +function __mem_allocate(size: usize): usize { return malloc(size); } // @ts-ignore: decorator -@unsafe @global @inline -function __memory_free(ptr: usize): void { +@unsafe @global +function __mem_free(ptr: usize): void { free(ptr); } diff --git a/std/assembly/allocator/tlsf.ts b/std/assembly/allocator/tlsf.ts index bb843b3dc7..8d7b0f2b79 100644 --- a/std/assembly/allocator/tlsf.ts +++ b/std/assembly/allocator/tlsf.ts @@ -428,8 +428,8 @@ var ROOT: Root = changetype(0); /** Allocates a chunk of memory. */ // @ts-ignore: decorator -@unsafe @global @inline -function __memory_allocate(size: usize): usize { +@unsafe @global +function __mem_allocate(size: usize): usize { // initialize if necessary var root = ROOT; if (!root) { @@ -478,8 +478,8 @@ function __memory_allocate(size: usize): usize { /** Frees the chunk of memory at the specified address. */ // @ts-ignore: decorator -@unsafe @global @inline -function __memory_free(data: usize): void { +@unsafe @global +function __mem_free(data: usize): void { if (data) { let root = ROOT; if (root) { diff --git a/std/assembly/collector/README.md b/std/assembly/collector/README.md index c1d7ae40d2..3e5517e01e 100644 --- a/std/assembly/collector/README.md +++ b/std/assembly/collector/README.md @@ -1,7 +1,7 @@ Garbage collector interface =========================== -A garbage collector for AssemblyScript must implement the common and either of the tracing or reference counting interfaces. +A garbage collector for AssemblyScript must implement the following common and either the tracing or reference counting interfaces: Common ------ diff --git a/std/assembly/memory.ts b/std/assembly/memory.ts index 3e86001f1b..46ee6c449a 100644 --- a/std/assembly/memory.ts +++ b/std/assembly/memory.ts @@ -1,3 +1,5 @@ +/// + import { memcmp, memmove, memset } from "./util/memory"; // @ts-ignore: decorator @@ -49,8 +51,7 @@ export namespace memory { // @ts-ignore: decorator @unsafe export function allocate(size: usize): usize { - // @ts-ignore: stub - if (isDefined(__memory_allocate)) return __memory_allocate(size); + if (isDefined(__mem_allocate)) return __mem_allocate(size); else return unreachable(); } @@ -58,8 +59,7 @@ export namespace memory { // @ts-ignore: decorator @unsafe export function free(ptr: usize): void { - // @ts-ignore: stub - if (isDefined(__memory_free)) __memory_free(ptr); + if (isDefined(__mem_free)) __mem_free(ptr); else unreachable(); } @@ -67,8 +67,7 @@ export namespace memory { // @ts-ignore: decorator @unsafe export function reset(): void { - // @ts-ignore: stub - if (isDefined(__memory_reset)) __memory_reset(); + if (isDefined(__mem_reset)) __mem_reset(); else unreachable(); } diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 2d253ccef1..722016fa09 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -1,10 +1,8 @@ -// The runtime provides a set of macros for dealing with common AssemblyScript internals, like -// allocation, memory management in general, integration with a (potential) garbage collector -// and interfaces to hard-wired data types like buffers and their views. Doing so ensures that -// no matter which underlying implementation of a memory allocator or garbage collector is used, -// as long as all runtime/managed objects adhere to the runtime conventions, it'll all play well -// together. The compiler assumes that it can itself use the macros with the signatures declared -// in this file, so changing anything here will most likely require changes to the compiler, too. +// The runtime provides common functionality that links runtime interfaces for memory management +// and garbage collection to the standard library, making sure it all plays well together. However, +// most of the garbage collector interface must still be implemented explicitly in standard library +// components, because common abstractions for both tracing and reference counting would result in +// unnecessary overhead (e.g. tracing needs parent references while rc does not etc.). import { AL_MASK, MAX_SIZE_32 } from "./util/allocator"; import { HEAP_BASE, memory } from "./memory"; diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 00944eb637..eeb5d1ad37 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -15,7 +15,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -87,7 +87,7 @@ i32.clz i32.sub i32.shl - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 i32.const -1520547049 i32.store @@ -106,7 +106,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -121,7 +121,7 @@ if i32.const 0 i32.const 16 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index f24e6291b8..444e842510 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -30,92 +30,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -131,7 +130,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -140,7 +139,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -157,7 +156,7 @@ if i32.const 0 i32.const 16 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -167,7 +166,7 @@ i32.store local.get $0 ) - (func $call-super/A#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/A#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -197,7 +196,7 @@ end local.get $0 ) - (func $call-super/B#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/B#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -240,7 +239,7 @@ end local.get $0 ) - (func $call-super/test1 (; 7 ;) (type $FUNCSIG$v) + (func $call-super/test1 (; 8 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/B#constructor @@ -272,7 +271,7 @@ unreachable end ) - (func $call-super/C#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/C#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -287,7 +286,7 @@ i32.store local.get $0 ) - (func $call-super/D#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/D#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -330,7 +329,7 @@ end local.get $0 ) - (func $call-super/test2 (; 10 ;) (type $FUNCSIG$v) + (func $call-super/test2 (; 11 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/D#constructor @@ -362,7 +361,7 @@ unreachable end ) - (func $call-super/E#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/E#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -392,7 +391,7 @@ end local.get $0 ) - (func $call-super/F#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/F#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -410,7 +409,7 @@ i32.store offset=4 local.get $0 ) - (func $call-super/test3 (; 13 ;) (type $FUNCSIG$v) + (func $call-super/test3 (; 14 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/F#constructor @@ -442,7 +441,7 @@ unreachable end ) - (func $call-super/G#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/G#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -457,7 +456,7 @@ i32.store local.get $0 ) - (func $call-super/H#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/H#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -475,7 +474,7 @@ i32.store offset=4 local.get $0 ) - (func $call-super/test4 (; 16 ;) (type $FUNCSIG$v) + (func $call-super/test4 (; 17 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/H#constructor @@ -507,7 +506,7 @@ unreachable end ) - (func $call-super/I#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/I#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -522,7 +521,7 @@ i32.store local.get $0 ) - (func $call-super/J#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/J#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -540,7 +539,7 @@ i32.store offset=4 local.get $0 ) - (func $call-super/test5 (; 19 ;) (type $FUNCSIG$v) + (func $call-super/test5 (; 20 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/J#constructor @@ -572,7 +571,7 @@ unreachable end ) - (func $start:call-super (; 20 ;) (type $FUNCSIG$v) + (func $start:call-super (; 21 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -589,9 +588,9 @@ call $call-super/test4 call $call-super/test5 ) - (func $start (; 21 ;) (type $FUNCSIG$v) + (func $start (; 22 ;) (type $FUNCSIG$v) call $start:call-super ) - (func $null (; 22 ;) (type $FUNCSIG$v) + (func $null (; 23 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index 334f69fe8d..ce967eb7b2 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -25,7 +25,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -97,7 +97,7 @@ i32.clz i32.sub i32.shl - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 i32.const -1520547049 i32.store @@ -116,7 +116,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -131,7 +131,7 @@ if i32.const 0 i32.const 16 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -217,13 +217,13 @@ local.get $0 global.set $constructor/justFieldNoInit i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate global.set $constructor/ctorReturns block $__inlined_func$constructor/CtorConditionallyReturns#constructor (result i32) global.get $constructor/b if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate br $__inlined_func$constructor/CtorConditionallyReturns#constructor end i32.const 0 diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index b2da31411f..b4538719a8 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -40,92 +40,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -141,7 +140,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -150,7 +149,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -167,7 +166,7 @@ if i32.const 0 i32.const 16 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -177,7 +176,7 @@ i32.store local.get $0 ) - (func $constructor/EmptyCtor#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtor#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -189,7 +188,7 @@ end local.get $0 ) - (func $constructor/EmptyCtorWithFieldInit#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtorWithFieldInit#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -204,7 +203,7 @@ i32.store local.get $0 ) - (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -219,7 +218,7 @@ i32.store local.get $0 ) - (func $constructor/None#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/None#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -231,7 +230,7 @@ end local.get $0 ) - (func $constructor/JustFieldInit#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/JustFieldInit#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -246,7 +245,7 @@ i32.store local.get $0 ) - (func $constructor/JustFieldNoInit#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/JustFieldNoInit#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -261,11 +260,11 @@ i32.store local.get $0 ) - (func $constructor/CtorReturns#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorReturns#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 call $~lib/memory/memory.allocate ) - (func $constructor/CtorConditionallyReturns#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorConditionallyReturns#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) global.get $constructor/b if i32.const 0 @@ -283,7 +282,7 @@ end local.get $0 ) - (func $constructor/CtorAllocates#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorAllocates#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -299,7 +298,7 @@ drop local.get $0 ) - (func $constructor/CtorConditionallyAllocates#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorConditionallyAllocates#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) global.get $constructor/b if block (result i32) @@ -327,7 +326,7 @@ end local.get $0 ) - (func $start:constructor (; 15 ;) (type $FUNCSIG$v) + (func $start:constructor (; 16 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -369,9 +368,9 @@ call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates ) - (func $start (; 16 ;) (type $FUNCSIG$v) + (func $start (; 17 ;) (type $FUNCSIG$v) call $start:constructor ) - (func $null (; 17 ;) (type $FUNCSIG$v) + (func $null (; 18 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index 62811a3404..da2716973c 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -62,7 +62,7 @@ (func $exports/Car.getNumTires (; 3 ;) (type $FUNCSIG$i) (result i32) i32.const 4 ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -127,7 +127,7 @@ (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $0 i32.const -1520547049 i32.store @@ -146,7 +146,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -161,7 +161,7 @@ if i32.const 0 i32.const 16 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 189a9c0b2e..e943f9a690 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -83,92 +83,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -184,7 +183,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -193,7 +192,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -210,7 +209,7 @@ if i32.const 0 i32.const 16 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -220,7 +219,7 @@ i32.store local.get $0 ) - (func $exports/Car#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -240,22 +239,22 @@ i32.store local.get $0 ) - (func $exports/Car#get:numDoors (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $exports/Car#get:numDoors (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/Car#set:numDoors (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $exports/Car#set:numDoors (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#openDoors (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $exports/Car#openDoors (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $exports/vehicles.Car.getNumTires (; 13 ;) (type $FUNCSIG$i) (result i32) + (func $exports/vehicles.Car.getNumTires (; 14 ;) (type $FUNCSIG$i) (result i32) global.get $exports/vehicles.Car.TIRES ) - (func $exports/vehicles.Car#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/vehicles.Car#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -275,19 +274,19 @@ i32.store local.get $0 ) - (func $exports/vehicles.Car#get:numDoors (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $exports/vehicles.Car#get:numDoors (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/vehicles.Car#set:numDoors (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $exports/vehicles.Car#set:numDoors (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/vehicles.Car#openDoors (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $exports/vehicles.Car#openDoors (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $start (; 18 ;) (type $FUNCSIG$v) + (func $start (; 19 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -299,9 +298,9 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 19 ;) (type $FUNCSIG$v) + (func $null (; 20 ;) (type $FUNCSIG$v) ) - (func $exports/subOpt|trampoline (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt|trampoline (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -319,20 +318,20 @@ local.get $1 call $exports/subOpt ) - (func $~lib/setargc (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) - (func $Car#get:doors (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $Car#get:doors (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $Car#set:doors (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $Car#set:doors (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#constructor|trampoline (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor|trampoline (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -348,16 +347,16 @@ local.get $1 call $exports/Car#constructor ) - (func $vehicles.Car#get:doors (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $vehicles.Car#get:doors (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $vehicles.Car#set:doors (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $vehicles.Car#set:doors (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/vehicles.Car#constructor|trampoline (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/vehicles.Car#constructor|trampoline (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange diff --git a/tests/compiler/gc/global-assign.optimized.wat b/tests/compiler/gc/global-assign.optimized.wat index d8e4d6a436..fcf96b23cb 100644 --- a/tests/compiler/gc/global-assign.optimized.wat +++ b/tests/compiler/gc/global-assign.optimized.wat @@ -30,7 +30,7 @@ (export "table" (table $0)) (export "main" (func $gc/global-assign/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -95,7 +95,7 @@ (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $0 i32.const -1520547049 i32.store @@ -137,7 +137,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -152,7 +152,7 @@ if i32.const 0 i32.const 24 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-assign.untouched.wat b/tests/compiler/gc/global-assign.untouched.wat index 2587e1c8e4..ad3ea50a39 100644 --- a/tests/compiler/gc/global-assign.untouched.wat +++ b/tests/compiler/gc/global-assign.untouched.wat @@ -48,92 +48,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -155,7 +154,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $gc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 i32.const 1 local.get $0 @@ -172,7 +171,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -181,7 +180,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -198,7 +197,7 @@ if i32.const 0 i32.const 24 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -210,7 +209,7 @@ call $gc/_dummy/__ref_register local.get $0 ) - (func $gc/global-assign/Ref#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $gc/global-assign/Ref#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -222,7 +221,7 @@ end local.get $0 ) - (func $start:gc/global-assign (; 8 ;) (type $FUNCSIG$v) + (func $start:gc/global-assign (; 9 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -314,7 +313,7 @@ unreachable end ) - (func $gc/global-assign/main (; 9 ;) (type $FUNCSIG$v) + (func $gc/global-assign/main (; 10 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -323,9 +322,9 @@ global.set $~lib/started end ) - (func $start (; 10 ;) (type $FUNCSIG$v) + (func $start (; 11 ;) (type $FUNCSIG$v) call $start:gc/global-assign ) - (func $null (; 11 ;) (type $FUNCSIG$v) + (func $null (; 12 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/gc/global-init.optimized.wat b/tests/compiler/gc/global-init.optimized.wat index e986aa1efc..082f73d7ca 100644 --- a/tests/compiler/gc/global-init.optimized.wat +++ b/tests/compiler/gc/global-init.optimized.wat @@ -29,7 +29,7 @@ (export "table" (table $0)) (export "main" (func $gc/global-init/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -94,7 +94,7 @@ (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $0 i32.const -1520547049 i32.store @@ -136,7 +136,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -151,7 +151,7 @@ if i32.const 0 i32.const 24 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-init.untouched.wat b/tests/compiler/gc/global-init.untouched.wat index bf8afc5d57..17a72f9b66 100644 --- a/tests/compiler/gc/global-init.untouched.wat +++ b/tests/compiler/gc/global-init.untouched.wat @@ -47,92 +47,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -154,7 +153,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $gc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 i32.const 1 local.get $0 @@ -171,7 +170,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -180,7 +179,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -197,7 +196,7 @@ if i32.const 0 i32.const 24 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -209,7 +208,7 @@ call $gc/_dummy/__ref_register local.get $0 ) - (func $gc/global-init/Ref#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $gc/global-init/Ref#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -221,7 +220,7 @@ end local.get $0 ) - (func $start:gc/global-init (; 8 ;) (type $FUNCSIG$v) + (func $start:gc/global-init (; 9 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -311,7 +310,7 @@ unreachable end ) - (func $gc/global-init/main (; 9 ;) (type $FUNCSIG$v) + (func $gc/global-init/main (; 10 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -320,9 +319,9 @@ global.set $~lib/started end ) - (func $start (; 10 ;) (type $FUNCSIG$v) + (func $start (; 11 ;) (type $FUNCSIG$v) call $start:gc/global-init ) - (func $null (; 11 ;) (type $FUNCSIG$v) + (func $null (; 12 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/gc/rc/global-assign.optimized.wat b/tests/compiler/gc/rc/global-assign.optimized.wat index b397eb812c..7cc9b1e91a 100644 --- a/tests/compiler/gc/rc/global-assign.optimized.wat +++ b/tests/compiler/gc/rc/global-assign.optimized.wat @@ -36,7 +36,7 @@ (export "table" (table $0)) (export "main" (func $gc/rc/global-assign/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -101,7 +101,7 @@ (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $0 i32.const -1520547049 i32.store @@ -143,7 +143,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 24 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-assign.untouched.wat b/tests/compiler/gc/rc/global-assign.untouched.wat index 41567e392c..2a42677d38 100644 --- a/tests/compiler/gc/rc/global-assign.untouched.wat +++ b/tests/compiler/gc/rc/global-assign.untouched.wat @@ -48,92 +48,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -155,7 +154,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $gc/rc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/rc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 i32.const 1 local.get $0 @@ -172,7 +171,7 @@ local.get $0 global.set $gc/rc/_dummy/register_ref ) - (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -181,7 +180,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -198,7 +197,7 @@ if i32.const 0 i32.const 24 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -210,7 +209,7 @@ call $gc/rc/_dummy/__ref_register local.get $0 ) - (func $gc/rc/global-assign/Ref#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $gc/rc/global-assign/Ref#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -222,7 +221,7 @@ end local.get $0 ) - (func $gc/rc/_dummy/__ref_retain (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/rc/_dummy/__ref_retain (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 112 i32.const 1 local.get $0 @@ -239,7 +238,7 @@ local.get $0 global.set $gc/rc/_dummy/retain_ref ) - (func $gc/rc/_dummy/__ref_release (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/rc/_dummy/__ref_release (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 216 i32.const 1 local.get $0 @@ -256,7 +255,7 @@ local.get $0 global.set $gc/rc/_dummy/release_ref ) - (func $start:gc/rc/global-assign (; 10 ;) (type $FUNCSIG$v) + (func $start:gc/rc/global-assign (; 11 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) global.get $~lib/memory/HEAP_BASE @@ -408,7 +407,7 @@ unreachable end ) - (func $gc/rc/global-assign/main (; 11 ;) (type $FUNCSIG$v) + (func $gc/rc/global-assign/main (; 12 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -417,9 +416,9 @@ global.set $~lib/started end ) - (func $start (; 12 ;) (type $FUNCSIG$v) + (func $start (; 13 ;) (type $FUNCSIG$v) call $start:gc/rc/global-assign ) - (func $null (; 13 ;) (type $FUNCSIG$v) + (func $null (; 14 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/gc/rc/global-init.optimized.wat b/tests/compiler/gc/rc/global-init.optimized.wat index 57902cd967..baa5f0cc04 100644 --- a/tests/compiler/gc/rc/global-init.optimized.wat +++ b/tests/compiler/gc/rc/global-init.optimized.wat @@ -32,7 +32,7 @@ (export "table" (table $0)) (export "main" (func $gc/rc/global-init/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -97,7 +97,7 @@ (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $0 i32.const -1520547049 i32.store @@ -139,7 +139,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -154,7 +154,7 @@ if i32.const 0 i32.const 24 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-init.untouched.wat b/tests/compiler/gc/rc/global-init.untouched.wat index 38a1a42847..9b020422d5 100644 --- a/tests/compiler/gc/rc/global-init.untouched.wat +++ b/tests/compiler/gc/rc/global-init.untouched.wat @@ -46,92 +46,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -153,7 +152,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $gc/rc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/rc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 i32.const 1 local.get $0 @@ -170,7 +169,7 @@ local.get $0 global.set $gc/rc/_dummy/register_ref ) - (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -179,7 +178,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -196,7 +195,7 @@ if i32.const 0 i32.const 24 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -208,7 +207,7 @@ call $gc/rc/_dummy/__ref_register local.get $0 ) - (func $gc/rc/global-init/Ref#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $gc/rc/global-init/Ref#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -220,7 +219,7 @@ end local.get $0 ) - (func $gc/rc/_dummy/__ref_retain (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/rc/_dummy/__ref_retain (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 112 i32.const 1 local.get $0 @@ -237,7 +236,7 @@ local.get $0 global.set $gc/rc/_dummy/retain_ref ) - (func $start:gc/rc/global-init (; 9 ;) (type $FUNCSIG$v) + (func $start:gc/rc/global-init (; 10 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/memory/HEAP_BASE i32.const 7 @@ -307,7 +306,7 @@ unreachable end ) - (func $gc/rc/global-init/main (; 10 ;) (type $FUNCSIG$v) + (func $gc/rc/global-init/main (; 11 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -316,9 +315,9 @@ global.set $~lib/started end ) - (func $start (; 11 ;) (type $FUNCSIG$v) + (func $start (; 12 ;) (type $FUNCSIG$v) call $start:gc/rc/global-init ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 13 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 1550e69e86..7e5d36042d 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -15,7 +15,7 @@ (export "table" (table $0)) (export "test" (func $getter-call/test)) (start $start) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -85,7 +85,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -116,7 +116,7 @@ (func $getter-call/test (; 4 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $0 i32.const -1520547049 i32.store diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index f2e5837dda..ddc0e13fc6 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -32,92 +32,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -133,7 +132,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -142,7 +141,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -159,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -169,7 +168,7 @@ i32.store local.get $0 ) - (func $getter-call/C#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $getter-call/C#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -181,13 +180,13 @@ end local.get $0 ) - (func $getter-call/C#get:x~anonymous|0 (; 6 ;) (type $FUNCSIG$i) (result i32) + (func $getter-call/C#get:x~anonymous|0 (; 7 ;) (type $FUNCSIG$i) (result i32) i32.const 42 ) - (func $getter-call/C#get:x (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $getter-call/C#get:x (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 ) - (func $getter-call/test (; 8 ;) (type $FUNCSIG$i) (result i32) + (func $getter-call/test (; 9 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 0 call $getter-call/C#constructor @@ -198,7 +197,7 @@ call $getter-call/C#get:x call_indirect (type $FUNCSIG$i) ) - (func $start (; 9 ;) (type $FUNCSIG$v) + (func $start (; 10 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -210,6 +209,6 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 10 ;) (type $FUNCSIG$v) + (func $null (; 11 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index 33619e1a37..6168f869de 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -40,7 +40,7 @@ unreachable end ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -112,7 +112,7 @@ i32.clz i32.sub i32.shl - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 i32.const -1520547049 i32.store @@ -131,7 +131,7 @@ if i32.const 0 i32.const 48 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -146,7 +146,7 @@ if i32.const 0 i32.const 48 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index e3d45a84b6..d23f392cab 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -296,92 +296,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -397,7 +396,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -406,7 +405,7 @@ if i32.const 0 i32.const 48 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -423,7 +422,7 @@ if i32.const 0 i32.const 48 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -433,7 +432,7 @@ i32.store local.get $0 ) - (func $inlining/test_ctor (; 8 ;) (type $FUNCSIG$v) + (func $inlining/test_ctor (; 9 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -545,7 +544,7 @@ unreachable end ) - (func $start:inlining (; 9 ;) (type $FUNCSIG$v) + (func $start:inlining (; 10 ;) (type $FUNCSIG$v) call $inlining/test i32.const 3 i32.eq @@ -571,9 +570,9 @@ global.set $~lib/allocator/arena/offset call $inlining/test_ctor ) - (func $start (; 10 ;) (type $FUNCSIG$v) + (func $start (; 11 ;) (type $FUNCSIG$v) call $start:inlining ) - (func $null (; 11 ;) (type $FUNCSIG$v) + (func $null (; 12 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index fbdcfc95d4..89aa758653 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -102,7 +102,7 @@ end end ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -174,7 +174,7 @@ i32.clz i32.sub i32.shl - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 i32.const -1520547049 i32.store @@ -303,7 +303,7 @@ if i32.const 0 i32.const 464 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -318,7 +318,7 @@ if i32.const 0 i32.const 464 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -2451,7 +2451,7 @@ if i32.const 0 i32.const 464 - i32.const 175 + i32.const 173 i32.const 4 call $~lib/env/abort unreachable @@ -2465,7 +2465,7 @@ if i32.const 0 i32.const 464 - i32.const 177 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 8c8da93824..3032067b46 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -147,92 +147,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -248,7 +247,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/util/number/utoa32_lut (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -391,7 +390,7 @@ i32.store16 end ) - (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -400,7 +399,7 @@ if i32.const 0 i32.const 464 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -417,7 +416,7 @@ if i32.const 0 i32.const 464 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -427,7 +426,7 @@ i32.store local.get $0 ) - (func $~lib/util/number/itoa32 (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -491,16 +490,16 @@ call $~lib/runtime/register end ) - (func $~lib/util/number/itoa (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/itoa32 return ) - (func $~lib/number/I32#toString (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/number/I32#toString (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/itoa ) - (func $~lib/string/String#get:length (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -508,7 +507,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 11 ;) (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 (; 12 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -561,7 +560,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -605,19 +604,19 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/builtins/isFinite (; 13 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 14 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 14 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 15 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/array/Array#__unchecked_get (; 15 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__unchecked_get (; 16 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $0 i32.load offset=4 local.get $1 @@ -626,7 +625,7 @@ i32.add i64.load ) - (func $~lib/array/Array#__unchecked_get (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -635,7 +634,7 @@ i32.add i32.load16_s ) - (func $~lib/util/number/genDigits (; 17 ;) (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 (; 18 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -1206,7 +1205,7 @@ end local.get $15 ) - (func $~lib/util/memory/memcpy (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2407,7 +2406,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2638,7 +2637,7 @@ end end ) - (func $~lib/util/number/prettify (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2971,7 +2970,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 21 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 22 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -3409,7 +3408,7 @@ local.get $2 i32.add ) - (func $~lib/string/String#substring (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3535,12 +3534,14 @@ call $~lib/runtime/register end ) - (func $~lib/memory/memory.free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) + (func $~lib/allocator/arena/__mem_free (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/memory/memory.free (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - local.set $1 + call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/discard (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/discard (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3549,7 +3550,7 @@ if i32.const 0 i32.const 464 - i32.const 175 + i32.const 173 i32.const 4 call $~lib/env/abort unreachable @@ -3566,7 +3567,7 @@ if i32.const 0 i32.const 464 - i32.const 177 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable @@ -3574,7 +3575,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/util/number/dtoa (; 25 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 27 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3630,11 +3631,11 @@ end local.get $4 ) - (func $~lib/number/F64#toString (; 26 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/number/F64#toString (; 28 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 call $~lib/util/number/dtoa ) - (func $~lib/number/Bool#toString (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/number/Bool#toString (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -3644,12 +3645,12 @@ i32.const 1792 end ) - (func $~lib/builtins/isNaN (; 28 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 30 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $~lib/number/F32.isSafeInteger (; 29 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/number/F32.isSafeInteger (; 31 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) (local $1 i32) local.get $0 f32.abs @@ -3665,14 +3666,14 @@ local.get $1 end ) - (func $~lib/builtins/isFinite (; 30 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isFinite (; 32 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.sub f32.const 0 f32.eq ) - (func $~lib/number/F32.isInteger (; 31 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/number/F32.isInteger (; 33 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) (local $1 i32) local.get $0 call $~lib/builtins/isFinite @@ -3686,7 +3687,7 @@ local.get $1 end ) - (func $~lib/number/F64.isSafeInteger (; 32 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/number/F64.isSafeInteger (; 34 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) local.get $0 f64.abs @@ -3702,7 +3703,7 @@ local.get $1 end ) - (func $~lib/number/F64.isInteger (; 33 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/number/F64.isInteger (; 35 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) local.get $0 call $~lib/builtins/isFinite @@ -3716,7 +3717,7 @@ local.get $1 end ) - (func $start:number (; 34 ;) (type $FUNCSIG$v) + (func $start:number (; 36 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/memory/HEAP_BASE i32.const 7 @@ -4452,9 +4453,9 @@ unreachable end ) - (func $start (; 35 ;) (type $FUNCSIG$v) + (func $start (; 37 ;) (type $FUNCSIG$v) call $start:number ) - (func $null (; 36 ;) (type $FUNCSIG$v) + (func $null (; 38 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index 67841af09a..19722400ca 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -16,7 +16,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -88,7 +88,7 @@ i32.clz i32.sub i32.shl - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 i32.const -1520547049 i32.store @@ -107,7 +107,7 @@ if i32.const 0 i32.const 48 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -122,7 +122,7 @@ if i32.const 0 i32.const 48 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index 42ecc4cc96..de5a7b21d9 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -33,92 +33,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -134,7 +133,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -143,7 +142,7 @@ if i32.const 0 i32.const 48 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -160,7 +159,7 @@ if i32.const 0 i32.const 48 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -170,7 +169,7 @@ i32.store local.get $0 ) - (func $~lib/string/String#get:length (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -178,7 +177,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 6 ;) (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 $6 i32) (local $7 i32) @@ -231,7 +230,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -275,7 +274,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $object-literal/bar (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $object-literal/bar (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 1 @@ -303,7 +302,7 @@ unreachable end ) - (func $object-literal/bar2 (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $object-literal/bar2 (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 2 @@ -318,7 +317,7 @@ unreachable end ) - (func $object-literal/Foo2#test (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $object-literal/Foo2#test (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 3 @@ -333,7 +332,7 @@ unreachable end ) - (func $start:object-literal (; 11 ;) (type $FUNCSIG$v) + (func $start:object-literal (; 12 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -387,9 +386,9 @@ end call $object-literal/Foo2#test ) - (func $start (; 12 ;) (type $FUNCSIG$v) + (func $start (; 13 ;) (type $FUNCSIG$v) call $start:object-literal ) - (func $null (; 13 ;) (type $FUNCSIG$v) + (func $null (; 14 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index fa432d295f..559fb02a8c 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -16,7 +16,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -81,7 +81,7 @@ (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $0 i32.const -1520547049 i32.store @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -115,7 +115,7 @@ if i32.const 0 i32.const 16 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index 324a9f1e3f..ce45532e6e 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -39,92 +39,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -140,7 +139,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -149,7 +148,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -166,7 +165,7 @@ if i32.const 0 i32.const 16 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -176,7 +175,7 @@ i32.store local.get $0 ) - (func $optional-typeparameters/TestConcrete#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $optional-typeparameters/TestConcrete#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -188,12 +187,12 @@ end local.get $0 ) - (func $optional-typeparameters/TestConcrete#test (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $optional-typeparameters/TestConcrete#test (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 local.get $2 i32.add ) - (func $optional-typeparameters/TestDerived#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $optional-typeparameters/TestDerived#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -205,12 +204,12 @@ end local.get $0 ) - (func $optional-typeparameters/TestDerived#test (; 10 ;) (type $FUNCSIG$didd) (param $0 i32) (param $1 f64) (param $2 f64) (result f64) + (func $optional-typeparameters/TestDerived#test (; 11 ;) (type $FUNCSIG$didd) (param $0 i32) (param $1 f64) (param $2 f64) (result f64) local.get $1 local.get $2 f64.add ) - (func $start:optional-typeparameters (; 11 ;) (type $FUNCSIG$v) + (func $start:optional-typeparameters (; 12 ;) (type $FUNCSIG$v) i32.const 1 call $optional-typeparameters/testConcrete drop @@ -244,9 +243,9 @@ call $optional-typeparameters/TestDerived#test drop ) - (func $start (; 12 ;) (type $FUNCSIG$v) + (func $start (; 13 ;) (type $FUNCSIG$v) call $start:optional-typeparameters ) - (func $null (; 13 ;) (type $FUNCSIG$v) + (func $null (; 14 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/allocator_arena.optimized.wat b/tests/compiler/std/allocator_arena.optimized.wat index d61419e031..f14cd0cd27 100644 --- a/tests/compiler/std/allocator_arena.optimized.wat +++ b/tests/compiler/std/allocator_arena.optimized.wat @@ -17,7 +17,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1314,9 +1314,9 @@ global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate global.set $std/allocator_arena/ptr1 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate global.set $std/allocator_arena/ptr2 global.get $std/allocator_arena/ptr1 global.get $std/allocator_arena/ptr2 @@ -1410,15 +1410,15 @@ i32.const 0 i32.ne local.tee $3 - if (result i32) + if local.get $2 i32.load8_u local.get $1 i32.load8_u i32.eq - else - local.get $3 + local.set $3 end + local.get $3 if local.get $0 i32.const 1 @@ -1456,7 +1456,7 @@ end global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate global.set $std/allocator_arena/ptr1 global.get $std/allocator_arena/ptr1 i32.const 64 diff --git a/tests/compiler/std/allocator_arena.untouched.wat b/tests/compiler/std/allocator_arena.untouched.wat index 0c8bdaf6aa..2ad5b25654 100644 --- a/tests/compiler/std/allocator_arena.untouched.wat +++ b/tests/compiler/std/allocator_arena.untouched.wat @@ -19,92 +19,91 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/memory/memory.fill (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -361,7 +360,7 @@ end end ) - (func $~lib/util/memory/memcpy (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1562,7 +1561,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1793,16 +1792,21 @@ end end ) - (func $~lib/memory/memory.free (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) + (func $~lib/allocator/arena/__mem_free (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/memory/memory.free (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - local.set $1 + call $~lib/allocator/arena/__mem_free ) - (func $~lib/memory/memory.reset (; 6 ;) (type $FUNCSIG$v) + (func $~lib/allocator/arena/__mem_reset (; 8 ;) (type $FUNCSIG$v) global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $start:std/allocator_arena (; 7 ;) (type $FUNCSIG$v) + (func $~lib/memory/memory.reset (; 9 ;) (type $FUNCSIG$v) + call $~lib/allocator/arena/__mem_reset + ) + (func $start:std/allocator_arena (; 10 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2017,9 +2021,9 @@ unreachable end ) - (func $start (; 8 ;) (type $FUNCSIG$v) + (func $start (; 11 ;) (type $FUNCSIG$v) call $start:std/allocator_arena ) - (func $null (; 9 ;) (type $FUNCSIG$v) + (func $null (; 12 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 4f77a15727..b61fb14755 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -80,7 +80,7 @@ i32.add i32.load ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -152,7 +152,7 @@ i32.clz i32.sub i32.shl - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 i32.const -1520547049 i32.store @@ -177,7 +177,7 @@ if i32.const 0 i32.const 296 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -192,7 +192,7 @@ if i32.const 0 i32.const 296 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index edda1975eb..377d9d77aa 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -115,92 +115,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -222,10 +221,10 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/collector/dummy/__ref_register (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/register (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -234,7 +233,7 @@ if i32.const 0 i32.const 296 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -251,7 +250,7 @@ if i32.const 0 i32.const 296 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -263,13 +262,13 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/collector/dummy/__ref_link (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/util/memory/memcpy (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1470,7 +1469,7 @@ i32.store8 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 $4 i32) (local $5 i32) @@ -1701,7 +1700,7 @@ end end ) - (func $~lib/runtime/makeArray (; 16 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/makeArray (; 17 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1765,7 +1764,7 @@ end local.get $4 ) - (func $std/array-literal/Ref#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/Ref#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -1777,11 +1776,11 @@ end local.get $0 ) - (func $~lib/array/Array#get:length (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/array-literal/RefWithCtor#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/RefWithCtor#constructor (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -1793,11 +1792,11 @@ end local.get $0 ) - (func $~lib/array/Array#get:length (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $start:std/array-literal (; 21 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 22 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2237,9 +2236,9 @@ unreachable end ) - (func $start (; 22 ;) (type $FUNCSIG$v) + (func $start (; 23 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 23 ;) (type $FUNCSIG$v) + (func $null (; 24 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index e55048446a..5ce6486507 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -465,7 +465,7 @@ (export "table" (table $0)) (export "main" (func $std/array/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -537,7 +537,7 @@ i32.clz i32.sub i32.shl - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 i32.const -1520547049 i32.store @@ -787,7 +787,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -802,7 +802,7 @@ if i32.const 0 i32.const 24 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -844,7 +844,7 @@ if i32.const 0 i32.const 24 - i32.const 234 + i32.const 232 i32.const 57 call $~lib/env/abort unreachable @@ -2303,7 +2303,7 @@ i32.lt_u if local.get $5 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $3 local.get $4 i32.load @@ -2340,7 +2340,7 @@ if i32.const 0 i32.const 24 - i32.const 115 + i32.const 113 i32.const 8 call $~lib/env/abort unreachable @@ -3968,7 +3968,7 @@ i32.const 2 i32.shl local.tee $3 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $7 i32.const 0 local.get $3 @@ -4464,7 +4464,7 @@ i32.const 2 i32.shl local.tee $3 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $7 i32.const 0 local.get $3 @@ -4983,7 +4983,7 @@ i32.const 2 i32.shl local.tee $3 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $6 i32.const 0 local.get $3 @@ -6323,7 +6323,7 @@ if i32.const 0 i32.const 24 - i32.const 175 + i32.const 173 i32.const 4 call $~lib/env/abort unreachable @@ -6337,7 +6337,7 @@ if i32.const 0 i32.const 24 - i32.const 177 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index a6f2d065d4..6c0bc57382 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -309,92 +309,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -416,7 +415,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -673,10 +672,10 @@ end end ) - (func $~lib/collector/dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -685,7 +684,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -702,7 +701,7 @@ if i32.const 0 i32.const 24 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -714,7 +713,7 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -747,13 +746,13 @@ call $~lib/runtime/register end ) - (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (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 (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -766,7 +765,7 @@ if i32.const 0 i32.const 24 - i32.const 234 + i32.const 232 i32.const 57 call $~lib/env/abort unreachable @@ -829,7 +828,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -851,7 +850,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array.isArray<~lib/array/Array | null> (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray<~lib/array/Array | null> (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 if (result i32) local.get $0 @@ -861,7 +860,7 @@ i32.const 1 end ) - (func $~lib/array/Array.isArray<~lib/array/Array> (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray<~lib/array/Array> (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 if (result i32) local.get $0 @@ -871,7 +870,7 @@ i32.const 1 end ) - (func $std/array/P#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/P#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -883,7 +882,7 @@ end local.get $0 ) - (func $~lib/array/Array.isArray (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -893,7 +892,7 @@ i32.const 0 end ) - (func $~lib/typedarray/Uint8Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -909,7 +908,7 @@ local.set $0 local.get $0 ) - (func $~lib/array/Array.isArray<~lib/typedarray/Uint8Array> (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray<~lib/typedarray/Uint8Array> (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -919,7 +918,7 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -929,7 +928,7 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray<~lib/string/String> (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray<~lib/string/String> (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -939,7 +938,7 @@ i32.const 0 end ) - (func $~lib/array/Array#fill (; 21 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1015,7 +1014,7 @@ end local.get $0 ) - (func $~lib/util/memory/memcpy (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2216,7 +2215,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2447,7 +2446,7 @@ end end ) - (func $~lib/runtime/makeArray (; 24 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/makeArray (; 25 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2511,11 +2510,11 @@ end local.get $4 ) - (func $~lib/array/Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -2524,7 +2523,7 @@ i32.add i32.load8_u ) - (func $~lib/array/Array#__get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2543,7 +2542,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/array/isArraysEqual (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2598,7 +2597,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 29 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 30 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2684,11 +2683,11 @@ end local.get $0 ) - (func $~lib/array/Array#get:length (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -2697,7 +2696,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2716,7 +2715,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/array/isArraysEqual (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2771,17 +2770,17 @@ end i32.const 1 ) - (func $~lib/array/Array#get:length (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $std/array/internalCapacity (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/internalCapacity (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -2791,12 +2790,14 @@ i32.const 2 i32.shr_s ) - (func $~lib/memory/memory.free (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) + (func $~lib/allocator/arena/__mem_free (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/memory/memory.free (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - local.set $1 + call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/reallocate (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2867,7 +2868,7 @@ if i32.const 0 i32.const 24 - i32.const 115 + i32.const 113 i32.const 8 call $~lib/env/abort unreachable @@ -2900,7 +2901,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2980,7 +2981,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3007,7 +3008,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#__unchecked_get (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -3016,7 +3017,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3035,7 +3036,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#pop (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3068,7 +3069,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#concat (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3124,7 +3125,7 @@ call $~lib/memory/memory.copy local.get $6 ) - (func $~lib/array/Array#copyWithin (; 45 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 47 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3314,7 +3315,7 @@ end local.get $0 ) - (func $std/array/isArraysEqual (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -3369,7 +3370,7 @@ end i32.const 1 ) - (func $~lib/array/Array#unshift (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#unshift (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3402,7 +3403,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#shift (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3451,7 +3452,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#reverse (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#reverse (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3506,7 +3507,7 @@ end local.get $0 ) - (func $~lib/array/Array#indexOf (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3578,7 +3579,7 @@ end i32.const -1 ) - (func $~lib/array/Array#includes (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 local.get $2 @@ -3586,7 +3587,7 @@ i32.const 0 i32.ge_s ) - (func $~lib/array/Array#splice (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3700,7 +3701,7 @@ i32.store offset=12 local.get $6 ) - (func $~lib/array/Array#__unchecked_set (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.load offset=4 local.get $1 @@ -3710,7 +3711,7 @@ local.get $2 i32.store ) - (func $~lib/array/Array#__set (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 56 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3736,12 +3737,12 @@ i32.store offset=12 end ) - (func $start:std/array~anonymous|0 (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $~lib/array/Array#findIndex (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3800,17 +3801,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3819,12 +3820,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|4 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|4 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3832,12 +3833,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 63 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3897,12 +3898,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3911,12 +3912,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3924,12 +3925,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 69 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 71 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3988,12 +3989,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 71 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 73 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4002,12 +4003,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 73 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4015,13 +4016,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 74 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 75 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 77 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4073,7 +4074,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4083,13 +4084,13 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|18 (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|18 (; 79 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 80 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -4098,7 +4099,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 79 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 81 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.const 0 @@ -4213,11 +4214,11 @@ end end ) - (func $start:std/array~anonymous|21 (; 80 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 82 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#map (; 81 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 83 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4295,11 +4296,11 @@ end local.get $5 ) - (func $~lib/array/Array#get:length (; 82 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 84 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 83 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__unchecked_get (; 85 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $0 i32.load offset=4 local.get $1 @@ -4308,7 +4309,7 @@ i32.add f32.load ) - (func $~lib/array/Array#__get (; 84 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 86 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -4327,7 +4328,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $start:std/array~anonymous|22 (; 85 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4338,7 +4339,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 86 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 88 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4416,14 +4417,14 @@ end local.get $5 ) - (func $start:std/array~anonymous|23 (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 89 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 88 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 90 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4433,12 +4434,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 89 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 91 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 90 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 92 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4516,7 +4517,7 @@ end local.get $4 ) - (func $start:std/array~anonymous|26 (; 91 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4529,7 +4530,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 92 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 94 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -4538,7 +4539,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 95 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4550,12 +4551,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 94 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 96 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 95 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 97 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4613,12 +4614,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|30 (; 96 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|30 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|31 (; 97 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4630,7 +4631,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduce (; 98 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 100 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4688,7 +4689,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|32 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 101 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4700,7 +4701,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|33 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 102 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4709,12 +4710,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|34 (; 101 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|34 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 102 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 104 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4722,12 +4723,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|36 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|36 (; 105 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 104 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 106 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4772,12 +4773,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|37 (; 105 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|37 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|38 (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|38 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4789,7 +4790,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduceRight (; 107 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 109 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4834,7 +4835,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|39 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|39 (; 110 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4846,7 +4847,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|40 (; 109 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|40 (; 111 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4855,12 +4856,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|41 (; 110 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|41 (; 112 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|42 (; 111 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|42 (; 113 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4868,7 +4869,7 @@ local.get $1 i32.add ) - (func $~lib/math/murmurHash3 (; 112 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 114 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -4897,7 +4898,7 @@ local.set $0 local.get $0 ) - (func $~lib/math/splitMix32 (; 113 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -4932,7 +4933,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 114 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 116 ;) (type $FUNCSIG$vj) (param $0 i64) local.get $0 i64.eqz if @@ -4961,7 +4962,7 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/util/sort/insertionSort (; 115 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 117 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f32) (local $5 i32) @@ -5057,7 +5058,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 116 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 118 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5357,7 +5358,7 @@ local.get $10 f32.store ) - (func $~lib/array/Array#sort (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 119 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -5443,7 +5444,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 118 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 120 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5476,7 +5477,7 @@ i32.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 119 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -5495,12 +5496,12 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/builtins/isNaN (; 120 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 122 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $std/array/isArraysEqual (; 121 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 123 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -5571,7 +5572,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 122 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 124 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) @@ -5667,7 +5668,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 123 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 125 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5967,7 +5968,7 @@ local.get $10 f64.store ) - (func $~lib/array/Array#sort (; 124 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -6053,7 +6054,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 125 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 127 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -6086,7 +6087,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6105,11 +6106,11 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/array/Array#get:length (; 127 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 129 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 128 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__unchecked_get (; 130 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $0 i32.load offset=4 local.get $1 @@ -6118,7 +6119,7 @@ i32.add f64.load ) - (func $~lib/array/Array#__get (; 129 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 131 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -6137,12 +6138,12 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/builtins/isNaN (; 130 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 132 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $std/array/isArraysEqual (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 133 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -6213,7 +6214,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 132 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 134 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6309,7 +6310,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 133 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 135 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6609,7 +6610,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 134 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6693,12 +6694,12 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6717,7 +6718,7 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/util/sort/insertionSort (; 137 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 139 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6813,7 +6814,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 138 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 140 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7113,7 +7114,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7197,7 +7198,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -7206,7 +7207,7 @@ i32.lt_u i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -7225,7 +7226,7 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/array/Array.create (; 142 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create (; 144 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7265,7 +7266,7 @@ i32.store offset=12 local.get $3 ) - (func $std/array/createReverseOrderedArray (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -7299,7 +7300,7 @@ end local.get $1 ) - (func $~lib/math/NativeMath.random (; 144 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 146 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) (local $2 i64) @@ -7356,7 +7357,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 147 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -7390,12 +7391,12 @@ end local.get $1 ) - (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $std/array/isSorted (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -7443,7 +7444,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 148 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 150 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -7459,7 +7460,7 @@ unreachable end ) - (func $std/array/assertSortedDefault (; 149 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 151 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 block $~lib/util/sort/COMPARATOR|inlined.1 (result i32) i32.const 48 @@ -7467,27 +7468,27 @@ end call $std/array/assertSorted ) - (func $start:std/array~anonymous|43 (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|43 (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|44 (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $start:std/array~anonymous|45 (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|45 (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|46 (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|46 (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array.create<~lib/array/Array> (; 154 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create<~lib/array/Array> (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7527,7 +7528,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array<~lib/array/Array>#__unchecked_set (; 155 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__unchecked_set (; 157 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7560,7 +7561,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/array/Array<~lib/array/Array>#__set (; 156 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__set (; 158 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -7597,7 +7598,7 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedNestedArray (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 159 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7641,7 +7642,7 @@ end local.get $1 ) - (func $start:std/array~anonymous|47 (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -7650,7 +7651,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/util/sort/insertionSort<~lib/array/Array> (; 159 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort<~lib/array/Array> (; 161 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7746,7 +7747,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/array/Array>#sort (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#sort (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7820,11 +7821,11 @@ end local.get $0 ) - (func $~lib/array/Array<~lib/array/Array>#get:length (; 161 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#get:length (; 163 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/array/Array>#__unchecked_get (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#__unchecked_get (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -7833,7 +7834,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/array/Array>#__get (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#__get (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -7864,7 +7865,7 @@ local.get $1 call $~lib/array/Array<~lib/array/Array>#__unchecked_get ) - (func $std/array/isSorted<~lib/array/Array> (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/array/Array> (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -7912,7 +7913,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/array/Array> (; 165 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/array/Array> (; 167 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#sort @@ -7928,7 +7929,7 @@ unreachable end ) - (func $~lib/array/Array.create> (; 166 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create> (; 168 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7968,7 +7969,7 @@ i32.store offset=12 local.get $3 ) - (func $std/array/Proxy#constructor (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/Proxy#constructor (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if @@ -7983,7 +7984,7 @@ i32.store local.get $0 ) - (func $~lib/array/Array>#__unchecked_set (; 168 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__unchecked_set (; 170 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -8016,7 +8017,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/array/Array>#__set (; 169 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__set (; 171 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -8053,7 +8054,7 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedElementsArray (; 170 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 172 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -8089,14 +8090,14 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/util/sort/insertionSort> (; 172 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort> (; 174 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8192,7 +8193,7 @@ unreachable end ) - (func $~lib/array/Array>#sort (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8266,11 +8267,11 @@ end local.get $0 ) - (func $~lib/array/Array>#get:length (; 174 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#get:length (; 176 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array>#__unchecked_get (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__unchecked_get (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -8279,7 +8280,7 @@ i32.add i32.load ) - (func $~lib/array/Array>#__get (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__get (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -8310,7 +8311,7 @@ local.get $1 call $~lib/array/Array>#__unchecked_get ) - (func $std/array/isSorted> (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 179 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -8358,7 +8359,7 @@ end i32.const 1 ) - (func $std/array/assertSorted> (; 178 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 180 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -8374,7 +8375,7 @@ unreachable end ) - (func $~lib/util/sort/insertionSort<~lib/string/String | null> (; 179 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort<~lib/string/String | null> (; 181 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8470,7 +8471,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String | null>#sort (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#sort (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8544,11 +8545,11 @@ end local.get $0 ) - (func $~lib/array/Array<~lib/string/String | null>#get:length (; 181 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#get:length (; 183 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/string/String | null>#__unchecked_get (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#__unchecked_get (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -8557,7 +8558,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/string/String | null>#__get (; 183 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#__get (; 185 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -8576,7 +8577,7 @@ local.get $1 call $~lib/array/Array<~lib/string/String | null>#__unchecked_get ) - (func $std/array/isSorted<~lib/string/String | null> (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/string/String | null> (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -8624,7 +8625,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/string/String | null> (; 185 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String | null> (; 187 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String | null>#sort @@ -8640,7 +8641,7 @@ unreachable end ) - (func $~lib/string/String#get:length (; 186 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 188 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -8648,7 +8649,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 187 ;) (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 (; 189 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -8701,7 +8702,7 @@ end local.get $5 ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8774,7 +8775,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 189 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 191 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $1of1 block $0of1 block $outOfRange @@ -8795,7 +8796,7 @@ local.get $1 call $std/array/assertSorted<~lib/string/String | null> ) - (func $~lib/string/String.__eq (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -8839,13 +8840,13 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.__ne (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 193 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__eq i32.eqz ) - (func $std/array/isArraysEqual<~lib/string/String | null> (; 192 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual<~lib/string/String | null> (; 194 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -8900,7 +8901,7 @@ end i32.const 1 ) - (func $~lib/array/Array.create<~lib/string/String> (; 193 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create<~lib/string/String> (; 195 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8940,7 +8941,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/string/String#charAt (; 194 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#charAt (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -8986,7 +8987,7 @@ call $~lib/runtime/register end ) - (func $~lib/string/String#concat (; 195 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9045,7 +9046,7 @@ call $~lib/runtime/register end ) - (func $~lib/string/String.__concat (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 4424 local.get $0 @@ -9055,7 +9056,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 197 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 199 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -9097,7 +9098,7 @@ end local.get $1 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 198 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 200 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -9130,7 +9131,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/array/Array<~lib/string/String>#__set (; 199 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/string/String>#__set (; 201 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -9167,7 +9168,7 @@ i32.store offset=12 end ) - (func $std/array/createRandomStringArray (; 200 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomStringArray (; 202 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -9201,7 +9202,7 @@ end local.get $1 ) - (func $~lib/util/sort/insertionSort<~lib/string/String> (; 201 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort<~lib/string/String> (; 203 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9297,7 +9298,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String>#sort (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#sort (; 204 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9371,11 +9372,11 @@ end local.get $0 ) - (func $~lib/array/Array<~lib/string/String>#get:length (; 203 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#get:length (; 205 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 204 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -9384,7 +9385,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/string/String>#__get (; 205 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -9415,7 +9416,7 @@ local.get $1 call $~lib/array/Array<~lib/string/String>#__unchecked_get ) - (func $std/array/isSorted<~lib/string/String> (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/string/String> (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -9463,7 +9464,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/string/String> (; 207 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String> (; 209 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String>#sort @@ -9479,7 +9480,7 @@ unreachable end ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 (; 210 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9552,7 +9553,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted<~lib/string/String>|trampoline (; 209 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String>|trampoline (; 211 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $1of1 block $0of1 block $outOfRange @@ -9573,7 +9574,7 @@ local.get $1 call $std/array/assertSorted<~lib/string/String> ) - (func $~lib/string/String#substring (; 210 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 212 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9699,7 +9700,7 @@ call $~lib/runtime/register end ) - (func $~lib/runtime/discard (; 211 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/discard (; 213 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -9708,7 +9709,7 @@ if i32.const 0 i32.const 24 - i32.const 175 + i32.const 173 i32.const 4 call $~lib/env/abort unreachable @@ -9725,7 +9726,7 @@ if i32.const 0 i32.const 24 - i32.const 177 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable @@ -9733,7 +9734,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/array/Array#join_bool (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_bool (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9920,13 +9921,13 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 213 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 215 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_bool return ) - (func $~lib/util/number/decimalCount32 (; 214 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 216 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -9995,7 +9996,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa32_lut (; 215 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 217 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10138,7 +10139,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 216 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 218 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10202,12 +10203,12 @@ call $~lib/runtime/register end ) - (func $~lib/util/number/itoa (; 217 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 219 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 218 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 220 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10266,7 +10267,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 219 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10412,13 +10413,13 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 220 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/util/number/utoa32 (; 221 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10462,12 +10463,12 @@ call $~lib/runtime/register end ) - (func $~lib/util/number/itoa (; 222 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 224 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 223 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10506,7 +10507,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 224 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10652,20 +10653,20 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 227 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/builtins/isFinite (; 226 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 228 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/array/Array#__unchecked_get (; 227 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__unchecked_get (; 229 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $0 i32.load offset=4 local.get $1 @@ -10674,7 +10675,7 @@ i32.add i64.load ) - (func $~lib/array/Array#__unchecked_get (; 228 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 230 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -10683,7 +10684,7 @@ i32.add i32.load16_s ) - (func $~lib/util/number/genDigits (; 229 ;) (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 (; 231 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -11254,7 +11255,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 230 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 232 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11587,7 +11588,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 231 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 233 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -12025,7 +12026,7 @@ local.get $2 i32.add ) - (func $~lib/util/number/dtoa (; 232 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 234 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12081,7 +12082,7 @@ end local.get $4 ) - (func $~lib/util/number/dtoa_stream (; 233 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 235 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12155,7 +12156,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join_flt (; 234 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_flt (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12301,13 +12302,13 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 235 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 237 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_flt return ) - (func $~lib/array/Array<~lib/string/String>#join_str (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join_str (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12499,13 +12500,13 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array<~lib/string/String>#join (; 237 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join (; 239 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String>#join_str return ) - (func $std/array/Ref#constructor (; 238 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/Ref#constructor (; 240 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -12517,7 +12518,7 @@ end local.get $0 ) - (func $~lib/array/Array#join_ref (; 239 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_ref (; 241 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12679,18 +12680,18 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 240 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 242 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_ref return ) - (func $~lib/array/Array#toString (; 241 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 243 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa (; 242 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 244 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -12699,7 +12700,7 @@ call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 243 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 245 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12774,7 +12775,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 244 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12920,25 +12921,25 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 245 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 247 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 246 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 248 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 249 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 65535 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 248 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 250 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12983,7 +12984,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 249 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 251 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13129,18 +13130,18 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 251 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 253 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/decimalCount64 (; 252 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 254 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -13209,7 +13210,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 253 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 255 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -13337,7 +13338,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 254 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 256 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13417,12 +13418,12 @@ call $~lib/runtime/register end ) - (func $~lib/util/number/itoa (; 255 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 257 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/utoa64 return ) - (func $~lib/util/number/itoa_stream (; 256 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 258 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13488,7 +13489,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13634,18 +13635,18 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 260 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 259 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 261 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa64 (; 260 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 262 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13747,12 +13748,12 @@ call $~lib/runtime/register end ) - (func $~lib/util/number/itoa (; 261 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 263 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/itoa64 return ) - (func $~lib/util/number/itoa_stream (; 262 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 264 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13840,7 +13841,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 263 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 265 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13986,18 +13987,18 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 264 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 266 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 265 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 267 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array<~lib/string/String | null>#join_str (; 266 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#join_str (; 268 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14189,23 +14190,23 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array<~lib/string/String | null>#join (; 267 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#join (; 269 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String | null>#join_str return ) - (func $~lib/array/Array<~lib/string/String | null>#toString (; 268 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#toString (; 270 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/string/String | null>#join ) - (func $~lib/array/Array<~lib/string/String>#toString (; 269 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#toString (; 271 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/string/String>#join ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 270 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 272 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14309,25 +14310,25 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array>#join (; 271 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join (; 273 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array>#toString (; 272 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#toString (; 274 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/array/Array>#join ) - (func $~lib/util/number/itoa (; 273 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 275 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 274 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 276 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -14372,7 +14373,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 275 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 277 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14518,13 +14519,13 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 276 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 278 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 277 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 279 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14628,18 +14629,18 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array>#join (; 278 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join (; 280 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array>#toString (; 279 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#toString (; 281 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/array/Array>#join ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 280 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14743,13 +14744,13 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array>#join (; 281 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join (; 283 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 284 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14853,18 +14854,18 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join (; 283 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join (; 285 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#toString (; 284 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#toString (; 286 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join ) - (func $start:std/array (; 285 ;) (type $FUNCSIG$v) + (func $start:std/array (; 287 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -19487,7 +19488,7 @@ unreachable end ) - (func $std/array/main (; 286 ;) (type $FUNCSIG$v) + (func $std/array/main (; 288 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -19496,9 +19497,9 @@ global.set $~lib/started end ) - (func $start (; 287 ;) (type $FUNCSIG$v) + (func $start (; 289 ;) (type $FUNCSIG$v) call $start:std/array ) - (func $null (; 288 ;) (type $FUNCSIG$v) + (func $null (; 290 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 2328918b7b..cedf97f5dc 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -24,7 +24,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -96,7 +96,7 @@ i32.clz i32.sub i32.shl - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 i32.const -1520547049 i32.store @@ -326,7 +326,7 @@ if i32.const 0 i32.const 64 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -341,7 +341,7 @@ if i32.const 0 i32.const 64 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -1494,7 +1494,7 @@ if i32.const 0 i32.const 64 - i32.const 234 + i32.const 232 i32.const 57 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 6e7d036df4..121f179a74 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -41,92 +41,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -142,7 +141,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -399,7 +398,7 @@ end end ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -408,7 +407,7 @@ if i32.const 0 i32.const 64 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -425,7 +424,7 @@ if i32.const 0 i32.const 64 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -435,7 +434,7 @@ i32.store local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -468,13 +467,13 @@ call $~lib/runtime/register end ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $~lib/util/memory/memcpy (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1675,7 +1674,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1906,7 +1905,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1997,21 +1996,21 @@ call $~lib/runtime/register end ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array> (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array> (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if nop end i32.const 0 ) - (func $~lib/arraybuffer/ArrayBuffer.isView (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if nop end i32.const 0 ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array> (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array> (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if i32.const 1 @@ -2019,7 +2018,7 @@ end i32.const 0 ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array> (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array> (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if i32.const 1 @@ -2027,7 +2026,7 @@ end i32.const 0 ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView> (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView> (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if i32.const 1 @@ -2035,7 +2034,7 @@ end i32.const 0 ) - (func $~lib/runtime/ArrayBufferView#constructor (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 global.get $~lib/runtime/MAX_BYTELENGTH @@ -2045,7 +2044,7 @@ if i32.const 0 i32.const 64 - i32.const 234 + i32.const 232 i32.const 57 call $~lib/env/abort unreachable @@ -2088,7 +2087,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -2104,7 +2103,7 @@ local.set $0 local.get $0 ) - (func $~lib/runtime/makeArray (; 18 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/makeArray (; 19 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2145,7 +2144,7 @@ end local.get $4 ) - (func $~lib/typedarray/Int32Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -2161,7 +2160,7 @@ local.set $0 local.get $0 ) - (func $~lib/dataview/DataView#constructor (; 20 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 21 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) local.get $3 global.get $~lib/builtins/i32.MIN_VALUE @@ -2226,11 +2225,11 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#get:buffer (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#get:buffer (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $start:std/arraybuffer (; 22 ;) (type $FUNCSIG$v) + (func $start:std/arraybuffer (; 23 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -2547,9 +2546,9 @@ unreachable end ) - (func $start (; 23 ;) (type $FUNCSIG$v) + (func $start (; 24 ;) (type $FUNCSIG$v) call $start:std/arraybuffer ) - (func $null (; 24 ;) (type $FUNCSIG$v) + (func $null (; 25 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 6cb289f8dd..21c380cd7d 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -29,7 +29,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -101,7 +101,7 @@ i32.clz i32.sub i32.shl - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 i32.const -1520547049 i32.store @@ -164,7 +164,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -179,7 +179,7 @@ if i32.const 0 i32.const 16 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index a3dc4f83ed..b3cb80917c 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -47,92 +47,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -148,7 +147,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -405,7 +404,7 @@ end end ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -414,7 +413,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -431,7 +430,7 @@ if i32.const 0 i32.const 16 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -441,7 +440,7 @@ i32.store local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -474,7 +473,7 @@ call $~lib/runtime/register end ) - (func $~lib/runtime/ArrayBufferView#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 global.get $~lib/runtime/MAX_BYTELENGTH @@ -484,7 +483,7 @@ if i32.const 0 i32.const 16 - i32.const 234 + i32.const 232 i32.const 57 call $~lib/env/abort unreachable @@ -527,7 +526,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -543,7 +542,7 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint8Array#__set (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -563,13 +562,13 @@ local.get $2 i32.store8 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $~lib/dataview/DataView#constructor (; 11 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 12 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) local.get $3 global.get $~lib/builtins/i32.MIN_VALUE @@ -634,22 +633,22 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#get:buffer (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#get:buffer (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load i32.sub ) - (func $~lib/runtime/ArrayBufferView#get:byteLength (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#get:byteLength (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 ) - (func $~lib/polyfills/bswap (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const -16711936 i32.and @@ -663,7 +662,7 @@ i32.or return ) - (func $~lib/dataview/DataView#getFloat32 (; 16 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $~lib/dataview/DataView#getFloat32 (; 17 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $1 i32.const 0 i32.lt_s @@ -701,7 +700,7 @@ f32.reinterpret_i32 end ) - (func $~lib/polyfills/bswap (; 17 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 18 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -740,7 +739,7 @@ i64.rotr return ) - (func $~lib/dataview/DataView#getFloat64 (; 18 ;) (type $FUNCSIG$diii) (param $0 i32) (param $1 i32) (param $2 i32) (result f64) + (func $~lib/dataview/DataView#getFloat64 (; 19 ;) (type $FUNCSIG$diii) (param $0 i32) (param $1 i32) (param $2 i32) (result f64) local.get $1 i32.const 0 i32.lt_s @@ -778,7 +777,7 @@ f64.reinterpret_i64 end ) - (func $~lib/dataview/DataView#getInt8 (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getInt8 (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -797,7 +796,7 @@ i32.add i32.load8_s ) - (func $~lib/polyfills/bswap (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.shl @@ -813,7 +812,7 @@ i32.or return ) - (func $~lib/dataview/DataView#getInt16 (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt16 (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 0 @@ -849,7 +848,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/polyfills/bswap (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const -16711936 i32.and @@ -863,7 +862,7 @@ i32.or return ) - (func $~lib/dataview/DataView#getInt32 (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt32 (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 0 @@ -899,7 +898,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/polyfills/bswap (; 24 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 25 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -938,7 +937,7 @@ i64.rotr return ) - (func $~lib/dataview/DataView#getInt64 (; 25 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) + (func $~lib/dataview/DataView#getInt64 (; 26 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) (local $3 i64) local.get $1 i32.const 0 @@ -974,7 +973,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint8 (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getUint8 (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -993,7 +992,7 @@ i32.add i32.load8_u ) - (func $~lib/polyfills/bswap (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.shl @@ -1007,7 +1006,7 @@ i32.or return ) - (func $~lib/dataview/DataView#getUint16 (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint16 (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 0 @@ -1043,7 +1042,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint32 (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint32 (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 0 @@ -1079,7 +1078,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint64 (; 30 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) + (func $~lib/dataview/DataView#getUint64 (; 31 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) (local $3 i64) local.get $1 i32.const 0 @@ -1115,7 +1114,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#setFloat32 (; 31 ;) (type $FUNCSIG$viifi) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) + (func $~lib/dataview/DataView#setFloat32 (; 32 ;) (type $FUNCSIG$viifi) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1155,7 +1154,7 @@ i32.store end ) - (func $~lib/dataview/DataView#setFloat64 (; 32 ;) (type $FUNCSIG$viidi) (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) + (func $~lib/dataview/DataView#setFloat64 (; 33 ;) (type $FUNCSIG$viidi) (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1195,7 +1194,7 @@ i64.store end ) - (func $~lib/dataview/DataView#setInt8 (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt8 (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1215,7 +1214,7 @@ local.get $2 i32.store8 ) - (func $~lib/dataview/DataView#setInt16 (; 34 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/dataview/DataView#setInt16 (; 35 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1249,7 +1248,7 @@ end i32.store16 ) - (func $~lib/dataview/DataView#setInt32 (; 35 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/dataview/DataView#setInt32 (; 36 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1283,7 +1282,7 @@ end i32.store ) - (func $~lib/dataview/DataView#setInt64 (; 36 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) + (func $~lib/dataview/DataView#setInt64 (; 37 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1317,7 +1316,7 @@ end i64.store ) - (func $~lib/dataview/DataView#setUint8 (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint8 (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1337,7 +1336,7 @@ local.get $2 i32.store8 ) - (func $~lib/dataview/DataView#setUint16 (; 38 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/dataview/DataView#setUint16 (; 39 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1371,7 +1370,7 @@ end i32.store16 ) - (func $~lib/dataview/DataView#setUint32 (; 39 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/dataview/DataView#setUint32 (; 40 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1405,7 +1404,7 @@ end i32.store ) - (func $~lib/dataview/DataView#setUint64 (; 40 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) + (func $~lib/dataview/DataView#setUint64 (; 41 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) local.get $1 i32.const 0 i32.lt_s @@ -1439,7 +1438,7 @@ end i64.store ) - (func $start:std/dataview (; 41 ;) (type $FUNCSIG$v) + (func $start:std/dataview (; 42 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -3132,9 +3131,9 @@ unreachable end ) - (func $start (; 42 ;) (type $FUNCSIG$v) + (func $start (; 43 ;) (type $FUNCSIG$v) call $start:std/dataview ) - (func $null (; 43 ;) (type $FUNCSIG$v) + (func $null (; 44 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 31f2864435..5f6e1524a8 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -19,7 +19,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -89,7 +89,7 @@ if i32.const 0 i32.const 48 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -104,7 +104,7 @@ if i32.const 0 i32.const 48 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -195,7 +195,7 @@ global.get $std/date/creationTime local.set $1 i32.const 16 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $0 i32.const -1520547049 i32.store diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 057f6d40a0..d2d421ff7f 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -39,92 +39,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -140,7 +139,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -149,7 +148,7 @@ if i32.const 0 i32.const 48 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -166,7 +165,7 @@ if i32.const 0 i32.const 48 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -176,7 +175,7 @@ i32.store local.get $0 ) - (func $~lib/date/Date#constructor (; 7 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/date/Date#constructor (; 8 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) block (result i32) local.get $0 i32.eqz @@ -196,17 +195,17 @@ i64.store local.get $0 ) - (func $~lib/date/Date#getTime (; 8 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) + (func $~lib/date/Date#getTime (; 9 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) local.get $0 i64.load ) - (func $~lib/date/Date#setTime (; 9 ;) (type $FUNCSIG$jij) (param $0 i32) (param $1 i64) (result i64) + (func $~lib/date/Date#setTime (; 10 ;) (type $FUNCSIG$jij) (param $0 i32) (param $1 i64) (result i64) local.get $0 local.get $1 i64.store local.get $1 ) - (func $start:std/date (; 10 ;) (type $FUNCSIG$v) + (func $start:std/date (; 11 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -391,9 +390,9 @@ unreachable end ) - (func $start (; 11 ;) (type $FUNCSIG$v) + (func $start (; 12 ;) (type $FUNCSIG$v) call $start:std/date ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 13 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 9654ac77b5..0a1d8a1fb5 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -38,7 +38,7 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -110,7 +110,7 @@ i32.clz i32.sub i32.shl - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 i32.const -1520547049 i32.store @@ -135,7 +135,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -150,7 +150,7 @@ if i32.const 0 i32.const 24 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index e162cb669c..27b1c61eee 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -48,92 +48,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -155,10 +154,10 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/collector/dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -167,7 +166,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -184,7 +183,7 @@ if i32.const 0 i32.const 24 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -196,7 +195,7 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -453,7 +452,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -486,13 +485,13 @@ call $~lib/runtime/register end ) - (func $~lib/collector/dummy/__ref_link (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/map/Map#clear (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -561,7 +560,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -595,14 +594,14 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash8 (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const -2128831035 local.get $0 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -657,7 +656,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -676,7 +675,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -850,7 +849,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -958,7 +957,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -984,11 +983,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1065,7 +1064,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 20 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 21 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1449,7 +1448,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1518,7 +1517,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -1552,7 +1551,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1605,7 +1604,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1622,7 +1621,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1796,7 +1795,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1902,7 +1901,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -1926,11 +1925,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2005,7 +2004,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 30 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 31 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2375,7 +2374,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2444,7 +2443,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -2478,7 +2477,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -2500,7 +2499,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2555,7 +2554,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2574,7 +2573,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2748,7 +2747,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2856,7 +2855,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2882,11 +2881,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2963,7 +2962,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 41 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 42 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3347,7 +3346,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3416,7 +3415,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -3450,7 +3449,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3503,7 +3502,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -3520,7 +3519,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 46 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 47 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3694,7 +3693,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 47 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 48 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3800,7 +3799,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3824,11 +3823,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3903,7 +3902,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 51 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 52 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4273,7 +4272,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 52 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 53 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4342,7 +4341,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -4376,7 +4375,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -4418,7 +4417,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4469,7 +4468,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -4484,7 +4483,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 57 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 58 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4658,7 +4657,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 58 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 59 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4762,7 +4761,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4784,11 +4783,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 62 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4861,7 +4860,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 62 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 63 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5217,7 +5216,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 63 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 64 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5286,7 +5285,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 64 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 65 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -5320,7 +5319,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5371,7 +5370,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -5386,7 +5385,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 67 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 68 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5560,7 +5559,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 68 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 69 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5664,7 +5663,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 69 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5686,11 +5685,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 70 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 71 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 71 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 72 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5763,7 +5762,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 72 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 73 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6119,7 +6118,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 73 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 74 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6188,7 +6187,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 74 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 75 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -6222,7 +6221,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 75 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 76 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6310,7 +6309,7 @@ local.set $3 local.get $3 ) - (func $~lib/map/Map#find (; 76 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 77 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6361,7 +6360,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 77 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 78 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -6376,7 +6375,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 78 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 79 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6551,7 +6550,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 79 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 80 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) @@ -6656,7 +6655,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 80 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 81 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) local.get $0 @@ -6678,11 +6677,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 81 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 82 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 82 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 83 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6756,7 +6755,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 83 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 84 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -7119,7 +7118,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 84 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 85 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7188,7 +7187,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 85 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 86 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -7222,7 +7221,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 86 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 87 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7273,7 +7272,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 87 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 88 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -7288,7 +7287,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 88 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 89 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7463,7 +7462,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 89 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 90 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) @@ -7568,7 +7567,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 90 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 91 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) local.get $0 @@ -7590,11 +7589,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 91 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 92 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 93 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -7668,7 +7667,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 93 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 94 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -8031,7 +8030,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 94 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 95 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8100,7 +8099,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 95 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 96 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -8134,7 +8133,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 96 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 97 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -8185,7 +8184,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 97 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 98 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) local.get $0 local.get $1 @@ -8201,7 +8200,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 98 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 99 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8377,7 +8376,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 99 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/map/Map#set (; 100 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) (local $3 f32) (local $4 i32) (local $5 i32) @@ -8483,7 +8482,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 100 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 101 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) local.get $0 @@ -8506,11 +8505,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 101 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 102 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#delete (; 103 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -8585,7 +8584,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 103 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 104 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -8948,7 +8947,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 104 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 105 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9017,7 +9016,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 105 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 106 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -9051,7 +9050,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 106 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 107 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -9102,7 +9101,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 107 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 108 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) local.get $0 local.get $1 @@ -9118,7 +9117,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 108 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 109 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9294,7 +9293,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 109 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/map/Map#set (; 110 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) (local $3 f64) (local $4 i32) (local $5 i32) @@ -9400,7 +9399,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 110 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 111 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) local.get $0 @@ -9423,11 +9422,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 111 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 112 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 112 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#delete (; 113 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -9502,7 +9501,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 113 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 114 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -9865,7 +9864,7 @@ unreachable end ) - (func $start:std/map (; 114 ;) (type $FUNCSIG$v) + (func $start:std/map (; 115 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -9887,9 +9886,9 @@ call $std/map/testNumeric call $std/map/testNumeric ) - (func $start (; 115 ;) (type $FUNCSIG$v) + (func $start (; 116 ;) (type $FUNCSIG$v) call $start:std/map ) - (func $null (; 116 ;) (type $FUNCSIG$v) + (func $null (; 117 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index fd7b8f26c2..ac0c4944b6 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -14,7 +14,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -84,7 +84,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -99,7 +99,7 @@ if i32.const 0 i32.const 16 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -112,7 +112,7 @@ (func $std/new/AClass#constructor (; 3 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $0 i32.const -1520547049 i32.store diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 01cbdc1431..13b327ae1a 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -32,92 +32,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -133,7 +132,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -142,7 +141,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -159,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -169,7 +168,7 @@ i32.store local.get $0 ) - (func $std/new/AClass#constructor (; 5 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $std/new/AClass#constructor (; 6 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 block (result i32) local.get $0 @@ -198,7 +197,7 @@ f32.store offset=4 local.get $0 ) - (func $start:std/new (; 6 ;) (type $FUNCSIG$v) + (func $start:std/new (; 7 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -214,9 +213,9 @@ call $std/new/AClass#constructor global.set $std/new/aClass ) - (func $start (; 7 ;) (type $FUNCSIG$v) + (func $start (; 8 ;) (type $FUNCSIG$v) call $start:std/new ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 9 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 512bbb0860..2d42564ecb 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -83,7 +83,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -148,7 +148,7 @@ (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $0 i32.const -1520547049 i32.store @@ -167,7 +167,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -182,7 +182,7 @@ if i32.const 0 i32.const 16 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 0d5539cda7..23756cc7b9 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -100,92 +100,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -201,7 +200,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -210,7 +209,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -227,7 +226,7 @@ if i32.const 0 i32.const 16 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -237,7 +236,7 @@ i32.store local.get $0 ) - (func $std/operator-overloading/Tester#constructor (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/operator-overloading/Tester#constructor (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz if @@ -255,7 +254,7 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/Tester.add (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.add (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -269,7 +268,7 @@ i32.add call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.sub (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.sub (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -283,7 +282,7 @@ i32.sub call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.mul (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.mul (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -297,7 +296,7 @@ i32.mul call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.div (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.div (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -311,7 +310,7 @@ i32.div_s call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.mod (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.mod (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -325,7 +324,7 @@ i32.rem_s call $std/operator-overloading/Tester#constructor ) - (func $~lib/math/NativeMath.scalbn (; 11 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 12 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) (local $2 f64) (local $3 i32) (local $4 i32) @@ -416,7 +415,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/math/NativeMath.pow (; 12 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 13 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -1504,7 +1503,7 @@ local.get $16 f64.mul ) - (func $std/operator-overloading/Tester.pow (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.pow (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1524,7 +1523,7 @@ i32.trunc_f64_s call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.and (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.and (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1538,7 +1537,7 @@ i32.and call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.or (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.or (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1552,7 +1551,7 @@ i32.or call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.xor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.xor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1566,7 +1565,7 @@ i32.xor call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.equals (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.equals (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1584,7 +1583,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.notEquals (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.notEquals (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1602,7 +1601,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.greater (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.greater (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1620,7 +1619,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.greaterEquals (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.greaterEquals (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1638,7 +1637,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.less (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.less (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1656,7 +1655,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.lessEquals (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.lessEquals (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.load @@ -1674,7 +1673,7 @@ local.get $2 end ) - (func $std/operator-overloading/Tester.shr (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shr (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1686,7 +1685,7 @@ i32.shr_s call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.shu (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shu (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1698,7 +1697,7 @@ i32.shr_u call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.shl (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shl (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1710,7 +1709,7 @@ i32.shl call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.pos (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.pos (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1718,7 +1717,7 @@ i32.load offset=4 call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.neg (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.neg (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.const 0 local.get $0 @@ -1730,7 +1729,7 @@ i32.sub call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.not (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.not (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1742,7 +1741,7 @@ i32.xor call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.excl (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.excl (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -1756,7 +1755,7 @@ local.get $1 end ) - (func $std/operator-overloading/Tester#inc (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#inc (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 local.get $0 i32.load @@ -1771,7 +1770,7 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/Tester#dec (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#dec (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 local.get $0 i32.load @@ -1786,7 +1785,7 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/Tester#postInc (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#postInc (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1798,7 +1797,7 @@ i32.add call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester#postDec (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#postDec (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1810,7 +1809,7 @@ i32.sub call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/TesterInlineStatic#constructor (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/operator-overloading/TesterInlineStatic#constructor (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz if @@ -1828,7 +1827,7 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/TesterInlineInstance#constructor (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/operator-overloading/TesterInlineInstance#constructor (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz if @@ -1846,7 +1845,7 @@ i32.store offset=4 local.get $0 ) - (func $start:std/operator-overloading (; 36 ;) (type $FUNCSIG$v) + (func $start:std/operator-overloading (; 37 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) global.get $~lib/memory/HEAP_BASE @@ -2907,9 +2906,9 @@ unreachable end ) - (func $start (; 37 ;) (type $FUNCSIG$v) + (func $start (; 38 ;) (type $FUNCSIG$v) call $start:std/operator-overloading ) - (func $null (; 38 ;) (type $FUNCSIG$v) + (func $null (; 39 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 12794253de..9d6c7ed6cd 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -996,7 +996,7 @@ i32.const 8 i32.add ) - (func $~lib/memory/memory.allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1176,7 +1176,7 @@ i32.clz i32.sub i32.shl - call $~lib/memory/memory.allocate + call $~lib/allocator/tlsf/__mem_allocate local.tee $1 i32.const -1520547049 i32.store @@ -2445,7 +2445,7 @@ end end ) - (func $~lib/memory/memory.free (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2524,7 +2524,7 @@ i32.lt_u if local.get $5 - call $~lib/memory/memory.allocate + call $~lib/allocator/tlsf/__mem_allocate local.tee $3 local.get $4 i32.load @@ -2560,13 +2560,13 @@ if i32.const 0 i32.const 232 - i32.const 115 + i32.const 113 i32.const 8 call $~lib/env/abort unreachable end local.get $4 - call $~lib/memory/memory.free + call $~lib/allocator/tlsf/__mem_free else local.get $0 global.set $std/runtime/register_ref @@ -2597,7 +2597,7 @@ if i32.const 0 i32.const 232 - i32.const 175 + i32.const 173 i32.const 4 call $~lib/env/abort unreachable @@ -2612,13 +2612,13 @@ if i32.const 0 i32.const 232 - i32.const 177 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - call $~lib/memory/memory.free + call $~lib/allocator/tlsf/__mem_free ) (func $~lib/runtime/register (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) @@ -2628,7 +2628,7 @@ if i32.const 0 i32.const 232 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -2643,7 +2643,7 @@ if i32.const 0 i32.const 232 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 9ed1929fb1..883c0dae9b 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -1230,7 +1230,7 @@ global.get $~lib/allocator/tlsf/Block.INFO i32.add ) - (func $~lib/memory/memory.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1238,241 +1238,240 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - block $~lib/allocator/tlsf/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - global.get $~lib/allocator/tlsf/ROOT + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + i32.eqz + if + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $2 + current_memory + local.set $3 local.get $2 - i32.eqz - if - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $3 - current_memory - local.set $4 - local.get $3 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $5 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $4 + local.get $4 + local.get $3 + i32.gt_s + local.tee $5 + if (result i32) local.get $4 - i32.gt_s - local.tee $6 - if (result i32) - local.get $5 - local.get $4 - i32.sub - grow_memory - i32.const 0 - i32.lt_s - else - local.get $6 - end - if - unreachable - end local.get $3 - local.tee $2 - global.set $~lib/allocator/tlsf/ROOT - local.get $2 + i32.sub + grow_memory i32.const 0 - call $~lib/allocator/tlsf/Root#set:tailRef - local.get $2 + i32.lt_s + else + local.get $5 + end + if + unreachable + end + local.get $2 + local.tee $1 + global.set $~lib/allocator/tlsf/ROOT + local.get $1 + i32.const 0 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $1 + i32.const 0 + i32.store + block $break|0 i32.const 0 - i32.store - block $break|0 - i32.const 0 - local.set $6 - loop $repeat|0 - local.get $6 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - br_if $break|0 - block - local.get $2 - local.get $6 + local.set $5 + loop $repeat|0 + local.get $5 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + br_if $break|0 + block + local.get $1 + local.get $5 + i32.const 0 + call $~lib/allocator/tlsf/Root#setSLMap + block $break|1 i32.const 0 - call $~lib/allocator/tlsf/Root#setSLMap - block $break|1 + local.set $6 + loop $repeat|1 + local.get $6 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + br_if $break|1 + local.get $1 + local.get $5 + local.get $6 i32.const 0 - local.set $7 - loop $repeat|1 - local.get $7 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u - i32.eqz - br_if $break|1 - local.get $2 - local.get $6 - local.get $7 - i32.const 0 - call $~lib/allocator/tlsf/Root#setHead - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $repeat|1 - unreachable - end + call $~lib/allocator/tlsf/Root#setHead + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $repeat|1 unreachable end + unreachable end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $repeat|0 - unreachable end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $repeat|0 unreachable end - local.get $2 - local.get $3 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - current_memory - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - drop - end - local.get $1 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.gt_u - if unreachable end local.get $1 + local.get $2 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add i32.const 7 i32.add i32.const 7 i32.const -1 i32.xor i32.and + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + end + local.get $0 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.gt_u + if + unreachable + end + local.get $0 + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.tee $4 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + local.tee $3 + local.get $4 + local.get $3 + i32.gt_u + select + local.set $0 + local.get $1 + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.set $7 + local.get $7 + i32.eqz + if + current_memory + local.set $4 + local.get $0 + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $3 + local.get $4 + local.tee $2 + local.get $3 local.tee $5 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - local.tee $4 + local.get $2 local.get $5 - local.get $4 - i32.gt_u + i32.gt_s select - local.set $1 + local.set $2 local.get $2 - local.get $1 - call $~lib/allocator/tlsf/Root#search - local.set $5 - local.get $5 - i32.eqz + grow_memory + i32.const 0 + i32.lt_s if - current_memory - local.set $4 - local.get $1 - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $3 - local.get $4 - local.tee $6 local.get $3 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - current_memory - local.set $7 - local.get $2 - local.get $4 - i32.const 16 - i32.shl - local.get $7 - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - drop - local.get $2 - local.get $1 - call $~lib/allocator/tlsf/Root#search - local.tee $8 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 472 - i32.const 12 - call $~lib/env/abort unreachable - else - local.get $8 end - local.set $5 end + current_memory + local.set $5 + local.get $1 + local.get $4 + i32.const 16 + i32.shl local.get $5 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop local.get $1 - i32.ge_u + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.tee $6 i32.eqz - if + if (result i32) i32.const 0 i32.const 24 - i32.const 475 - i32.const 2 + i32.const 472 + i32.const 12 call $~lib/env/abort unreachable + else + local.get $6 end - local.get $2 - local.get $5 - local.get $1 - call $~lib/allocator/tlsf/Root#use + local.set $7 + end + local.get $7 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.get $0 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 475 + i32.const 2 + call $~lib/env/abort + unreachable end + local.get $1 + local.get $7 + local.get $0 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/memory/memory.allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/runtime/allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -1494,7 +1493,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/util/memory/memcpy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2695,7 +2694,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2926,7 +2925,7 @@ end end ) - (func $~lib/memory/memory.fill (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3183,27 +3182,24 @@ end end ) - (func $~lib/memory/memory.free (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 - local.set $1 - local.get $1 if global.get $~lib/allocator/tlsf/ROOT - local.set $2 - local.get $2 + local.set $1 + local.get $1 if - local.get $1 + local.get $0 global.get $~lib/allocator/tlsf/Block.INFO i32.sub + local.set $2 + local.get $2 + i32.load local.set $3 local.get $3 - i32.load - local.set $4 - local.get $4 global.get $~lib/allocator/tlsf/FREE i32.and i32.eqz @@ -3216,24 +3212,28 @@ call $~lib/env/abort unreachable end + local.get $2 local.get $3 - local.get $4 global.get $~lib/allocator/tlsf/FREE i32.or i32.store - local.get $2 local.get $1 + local.get $0 global.get $~lib/allocator/tlsf/Block.INFO i32.sub call $~lib/allocator/tlsf/Root#insert end end ) - (func $std/runtime/__ref_register (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $std/runtime/__ref_register (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $std/runtime/register_ref ) - (func $~lib/runtime/reallocate (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3304,7 +3304,7 @@ if i32.const 0 i32.const 232 - i32.const 115 + i32.const 113 i32.const 8 call $~lib/env/abort unreachable @@ -3337,7 +3337,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/discard (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/discard (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3346,7 +3346,7 @@ if i32.const 0 i32.const 232 - i32.const 175 + i32.const 173 i32.const 4 call $~lib/env/abort unreachable @@ -3363,7 +3363,7 @@ if i32.const 0 i32.const 232 - i32.const 177 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable @@ -3371,7 +3371,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/runtime/register (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3380,7 +3380,7 @@ if i32.const 0 i32.const 232 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -3397,7 +3397,7 @@ if i32.const 0 i32.const 232 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -3409,13 +3409,13 @@ call $std/runtime/__ref_register local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $~lib/string/String#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -3423,7 +3423,7 @@ i32.const 1 i32.shr_u ) - (func $start:std/runtime (; 34 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 36 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $start:~lib/allocator/tlsf @@ -3781,7 +3781,7 @@ unreachable end ) - (func $std/runtime/main (; 35 ;) (type $FUNCSIG$v) + (func $std/runtime/main (; 37 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -3790,9 +3790,9 @@ global.set $~lib/started end ) - (func $start (; 36 ;) (type $FUNCSIG$v) + (func $start (; 38 ;) (type $FUNCSIG$v) call $start:std/runtime ) - (func $null (; 37 ;) (type $FUNCSIG$v) + (func $null (; 39 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 82ae4932e5..76865ab49c 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -34,7 +34,7 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -106,7 +106,7 @@ i32.clz i32.sub i32.shl - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 i32.const -1520547049 i32.store @@ -131,7 +131,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -146,7 +146,7 @@ if i32.const 0 i32.const 24 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 3d8a6adcfb..9678cc4e59 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -48,92 +48,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -155,10 +154,10 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/collector/dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -167,7 +166,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -184,7 +183,7 @@ if i32.const 0 i32.const 24 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -196,7 +195,7 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -453,7 +452,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -486,13 +485,13 @@ call $~lib/runtime/register end ) - (func $~lib/collector/dummy/__ref_link (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/set/Set#clear (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -561,7 +560,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -595,14 +594,14 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash8 (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const -2128831035 local.get $0 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -657,7 +656,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -676,7 +675,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -846,7 +845,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -948,11 +947,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1029,7 +1028,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 19 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 20 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1312,7 +1311,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1381,7 +1380,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -1415,7 +1414,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1468,7 +1467,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1485,7 +1484,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1655,7 +1654,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1755,11 +1754,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1834,7 +1833,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 28 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 29 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2117,7 +2116,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2186,7 +2185,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -2220,7 +2219,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -2242,7 +2241,7 @@ local.set $1 local.get $1 ) - (func $~lib/set/Set#find (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2297,7 +2296,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2316,7 +2315,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2486,7 +2485,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2588,11 +2587,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2669,7 +2668,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 38 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 39 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2952,7 +2951,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3021,7 +3020,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -3055,7 +3054,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3108,7 +3107,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -3125,7 +3124,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 43 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3295,7 +3294,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3395,11 +3394,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3474,7 +3473,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 47 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 48 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3757,7 +3756,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3826,7 +3825,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -3860,7 +3859,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -3902,7 +3901,7 @@ local.set $1 local.get $1 ) - (func $~lib/set/Set#find (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3953,7 +3952,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -3968,7 +3967,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4138,7 +4137,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4236,11 +4235,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4313,7 +4312,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 57 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 58 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4596,7 +4595,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 58 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 59 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4665,7 +4664,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -4699,7 +4698,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4750,7 +4749,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 62 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -4765,7 +4764,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 62 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4935,7 +4934,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 64 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5033,11 +5032,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 64 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 65 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5110,7 +5109,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 66 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 67 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5393,7 +5392,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 67 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 68 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5462,7 +5461,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 68 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -5496,7 +5495,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 69 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 70 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5584,7 +5583,7 @@ local.set $3 local.get $3 ) - (func $~lib/set/Set#find (; 70 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 71 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5635,7 +5634,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 71 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 72 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -5650,7 +5649,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 72 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 73 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5821,7 +5820,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 73 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 74 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -5920,11 +5919,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 74 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 75 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 75 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 76 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -5998,7 +5997,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 76 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 77 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6281,7 +6280,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 77 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 78 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6350,7 +6349,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 78 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -6384,7 +6383,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 79 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 80 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6435,7 +6434,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 80 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 81 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -6450,7 +6449,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 81 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 82 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6621,7 +6620,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 82 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 83 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6720,11 +6719,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 83 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 84 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 84 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 85 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6798,7 +6797,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 85 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 86 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -7081,7 +7080,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 86 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 87 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7150,7 +7149,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 87 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 88 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -7184,7 +7183,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 88 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 89 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7235,7 +7234,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 89 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 90 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) local.get $0 local.get $1 @@ -7251,7 +7250,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 90 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 91 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7423,7 +7422,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 91 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#add (; 92 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -7523,11 +7522,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 93 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#delete (; 94 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -7602,7 +7601,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 94 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 95 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -7885,7 +7884,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 95 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 96 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7954,7 +7953,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 96 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 97 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -7988,7 +7987,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 97 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 98 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -8039,7 +8038,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 98 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 99 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) local.get $0 local.get $1 @@ -8055,7 +8054,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 99 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 100 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8227,7 +8226,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 100 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#add (; 101 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 f64) (local $3 i32) (local $4 i32) @@ -8327,11 +8326,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 101 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 102 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#delete (; 103 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -8406,7 +8405,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 103 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 104 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -8689,7 +8688,7 @@ unreachable end ) - (func $start:std/set (; 104 ;) (type $FUNCSIG$v) + (func $start:std/set (; 105 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -8711,9 +8710,9 @@ call $std/set/testNumeric call $std/set/testNumeric ) - (func $start (; 105 ;) (type $FUNCSIG$v) + (func $start (; 106 ;) (type $FUNCSIG$v) call $start:std/set ) - (func $null (; 106 ;) (type $FUNCSIG$v) + (func $null (; 107 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 178dc806af..fa2ddb9eb8 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -52,7 +52,7 @@ i32.add i32.load ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1407,7 +1407,7 @@ i32.lt_u if local.get $5 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $4 local.get $3 i32.load @@ -1437,7 +1437,7 @@ if i32.const 0 i32.const 280 - i32.const 115 + i32.const 113 i32.const 8 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index ef7fc73743..35ff2ebe1b 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -83,92 +83,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/util/memory/memcpy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1369,7 +1368,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1600,7 +1599,7 @@ end end ) - (func $~lib/memory/memory.fill (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1857,12 +1856,14 @@ end end ) - (func $~lib/memory/memory.free (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) + (func $~lib/allocator/arena/__mem_free (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/memory/memory.free (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - local.set $1 + call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/reallocate (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1927,7 +1928,7 @@ if i32.const 0 i32.const 280 - i32.const 115 + i32.const 113 i32.const 8 call $~lib/env/abort unreachable @@ -1959,7 +1960,7 @@ i32.store offset=4 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 $4 i32) (local $5 i32) @@ -2017,7 +2018,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__unchecked_set (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.load offset=4 local.get $1 @@ -2027,7 +2028,7 @@ local.get $2 i32.store ) - (func $~lib/array/Array#__set (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -2053,11 +2054,11 @@ i32.store offset=12 end ) - (func $~lib/array/Array#get:length (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 15 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__unchecked_get (; 17 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $0 i32.load offset=4 local.get $1 @@ -2066,7 +2067,7 @@ i32.add i64.load ) - (func $~lib/array/Array#__get (; 16 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__get (; 18 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -2085,7 +2086,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#__unchecked_set (; 17 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__unchecked_set (; 19 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $0 i32.load offset=4 local.get $1 @@ -2095,7 +2096,7 @@ local.get $2 i64.store ) - (func $~lib/array/Array#__set (; 18 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (; 20 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) local.get $0 i32.load offset=12 @@ -2121,11 +2122,11 @@ i32.store offset=12 end ) - (func $~lib/array/Array#get:length (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 20 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__unchecked_get (; 22 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $0 i32.load offset=4 local.get $1 @@ -2134,7 +2135,7 @@ i32.add f32.load ) - (func $~lib/array/Array#__get (; 21 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 23 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -2153,7 +2154,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#__unchecked_set (; 22 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/array/Array#__unchecked_set (; 24 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $0 i32.load offset=4 local.get $1 @@ -2163,7 +2164,7 @@ local.get $2 f32.store ) - (func $~lib/array/Array#__set (; 23 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/array/Array#__set (; 25 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) (local $3 i32) local.get $0 i32.load offset=12 @@ -2189,11 +2190,11 @@ i32.store offset=12 end ) - (func $~lib/array/Array#get:length (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 25 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__unchecked_get (; 27 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $0 i32.load offset=4 local.get $1 @@ -2202,7 +2203,7 @@ i32.add f64.load ) - (func $~lib/array/Array#__get (; 26 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 28 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -2221,7 +2222,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#__unchecked_set (; 27 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/array/Array#__unchecked_set (; 29 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) local.get $0 i32.load offset=4 local.get $1 @@ -2231,7 +2232,7 @@ local.get $2 f64.store ) - (func $~lib/array/Array#__set (; 28 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/array/Array#__set (; 30 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) (local $3 i32) local.get $0 i32.load offset=12 @@ -2257,7 +2258,7 @@ i32.store offset=12 end ) - (func $start:std/static-array (; 29 ;) (type $FUNCSIG$v) + (func $start:std/static-array (; 31 ;) (type $FUNCSIG$v) global.get $std/static-array/i call $~lib/array/Array#get:length i32.const 2 @@ -2505,9 +2506,9 @@ unreachable end ) - (func $start (; 30 ;) (type $FUNCSIG$v) + (func $start (; 32 ;) (type $FUNCSIG$v) call $start:std/static-array ) - (func $null (; 31 ;) (type $FUNCSIG$v) + (func $null (; 33 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index ea76ed8d33..abc325672d 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -133,7 +133,7 @@ end local.get $1 ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -205,7 +205,7 @@ (local $7 i32) local.get $0 call $~lib/string/String#get:lengthUTF8 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.set $5 local.get $0 i32.const 8 @@ -404,7 +404,7 @@ i32.clz i32.sub i32.shl - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 i32.const -1520547049 i32.store @@ -1464,7 +1464,7 @@ if i32.const 0 i32.const 136 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -1479,7 +1479,7 @@ if i32.const 0 i32.const 136 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -1505,7 +1505,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.set $6 loop $continue|0 local.get $2 @@ -1535,13 +1535,13 @@ i32.const 191 i32.gt_u local.tee $3 - if (result i32) + if local.get $4 i32.const 224 i32.lt_u - else - local.get $3 + local.set $3 end + local.get $3 if local.get $2 i32.const 1 @@ -1582,13 +1582,13 @@ i32.const 239 i32.gt_u local.tee $3 - if (result i32) + if local.get $4 i32.const 365 i32.lt_u - else - local.get $3 + local.set $3 end + local.get $3 if local.get $2 i32.const 3 diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index cedd943fac..7872dcdee5 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -152,92 +152,91 @@ end local.get $1 ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/string/String#toUTF8 (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#toUTF8 (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -454,7 +453,7 @@ i32.store8 local.get $1 ) - (func $~lib/runtime/ADJUSTOBLOCK (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -466,7 +465,7 @@ i32.sub i32.shl ) - (func $~lib/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -482,7 +481,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/util/memory/memcpy (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1683,7 +1682,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1914,12 +1913,14 @@ end end ) - (func $~lib/memory/memory.free (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) + (func $~lib/allocator/arena/__mem_free (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/memory/memory.free (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - local.set $1 + call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/register (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -1928,7 +1929,7 @@ if i32.const 0 i32.const 136 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -1945,7 +1946,7 @@ if i32.const 0 i32.const 136 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -1955,7 +1956,7 @@ i32.store local.get $0 ) - (func $~lib/string/String.fromUTF8 (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.fromUTF8 (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2270,7 +2271,7 @@ call $~lib/runtime/register end ) - (func $~lib/util/string/compareImpl (; 12 ;) (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 (; 14 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -2323,7 +2324,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2367,7 +2368,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $start:std/string-utf8 (; 14 ;) (type $FUNCSIG$v) + (func $start:std/string-utf8 (; 16 ;) (type $FUNCSIG$v) global.get $std/string-utf8/str call $~lib/string/String#get:lengthUTF8 global.set $std/string-utf8/len @@ -2634,9 +2635,9 @@ global.get $std/string-utf8/ptr call $~lib/memory/memory.free ) - (func $start (; 15 ;) (type $FUNCSIG$v) + (func $start (; 17 ;) (type $FUNCSIG$v) call $start:std/string-utf8 ) - (func $null (; 16 ;) (type $FUNCSIG$v) + (func $null (; 18 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 9923628e4f..c7226e25ab 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -347,7 +347,7 @@ (export "getString" (func $std/string/getString)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -419,7 +419,7 @@ i32.clz i32.sub i32.shl - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 i32.const -1520547049 i32.store @@ -444,7 +444,7 @@ if i32.const 0 i32.const 120 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -459,7 +459,7 @@ if i32.const 0 i32.const 120 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -3200,7 +3200,7 @@ i32.lt_u if local.get $5 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $3 local.get $4 i32.load @@ -3236,7 +3236,7 @@ if i32.const 0 i32.const 120 - i32.const 115 + i32.const 113 i32.const 8 call $~lib/env/abort unreachable @@ -5166,7 +5166,7 @@ if i32.const 0 i32.const 120 - i32.const 175 + i32.const 173 i32.const 4 call $~lib/env/abort unreachable @@ -5180,7 +5180,7 @@ if i32.const 0 i32.const 120 - i32.const 177 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 5a42d27338..e8e9c3aa52 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -247,92 +247,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -354,10 +353,10 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/collector/dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -366,7 +365,7 @@ if i32.const 0 i32.const 120 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -383,7 +382,7 @@ if i32.const 0 i32.const 120 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -395,7 +394,7 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/string/String.fromCharCode (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.fromCharCode (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) block $~lib/runtime/ALLOCATE|inlined.0 (result i32) @@ -416,7 +415,7 @@ call $~lib/runtime/register end ) - (func $~lib/util/string/compareImpl (; 9 ;) (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 (; 10 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -469,7 +468,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -513,7 +512,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.fromCodePoint (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -584,7 +583,7 @@ call $~lib/runtime/register end ) - (func $~lib/string/String#startsWith (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#startsWith (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -651,7 +650,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String#endsWith (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#endsWith (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -715,7 +714,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String#indexOf (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#indexOf (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -809,7 +808,7 @@ end i32.const -1 ) - (func $~lib/util/memory/memcpy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2010,7 +2009,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2241,7 +2240,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 17 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 18 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) i32.const 0 @@ -2273,7 +2272,7 @@ end end ) - (func $~lib/string/String#padStart (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padStart (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2382,7 +2381,7 @@ call $~lib/runtime/register end ) - (func $~lib/string/String#padEnd (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2495,7 +2494,7 @@ call $~lib/runtime/register end ) - (func $~lib/string/String#lastIndexOf (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2587,7 +2586,7 @@ end i32.const -1 ) - (func $~lib/util/string/parse (; 21 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/util/string/parse (; 22 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2888,12 +2887,12 @@ local.get $7 f64.mul ) - (func $~lib/string/parseInt (; 22 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/string/parseInt (; 23 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $0 local.get $1 call $~lib/util/string/parse ) - (func $~lib/string/parseFloat (; 23 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 24 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3090,7 +3089,7 @@ local.get $5 f64.mul ) - (func $~lib/string/String#concat (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3149,7 +3148,7 @@ call $~lib/runtime/register end ) - (func $~lib/string/String.__concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 312 local.get $0 @@ -3159,13 +3158,13 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.__ne (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__eq i32.eqz ) - (func $~lib/string/String.__gt (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3227,7 +3226,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.__lt (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3289,19 +3288,19 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String.__gte (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gte (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__lt i32.eqz ) - (func $~lib/string/String.__lte (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lte (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__gt i32.eqz ) - (func $~lib/string/String#repeat (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3392,7 +3391,7 @@ call $~lib/runtime/register end ) - (func $~lib/string/String#slice (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3490,13 +3489,13 @@ call $~lib/runtime/register end ) - (func $~lib/collector/dummy/__ref_link (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/runtime/makeArray (; 35 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/makeArray (; 36 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3560,7 +3559,7 @@ end local.get $4 ) - (func $~lib/memory/memory.fill (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3817,12 +3816,14 @@ end end ) - (func $~lib/memory/memory.free (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) + (func $~lib/allocator/arena/__mem_free (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/memory/memory.free (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - local.set $1 + call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/reallocate (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3893,7 +3894,7 @@ if i32.const 0 i32.const 120 - i32.const 115 + i32.const 113 i32.const 8 call $~lib/env/abort unreachable @@ -3926,7 +3927,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4006,7 +4007,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array<~lib/string/String>#push (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#push (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4056,7 +4057,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 43 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4089,7 +4090,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/string/String#split (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4455,11 +4456,11 @@ end local.get $10 ) - (func $~lib/array/Array<~lib/string/String>#get:length (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#get:length (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -4468,7 +4469,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/string/String>#__get (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -4499,7 +4500,7 @@ local.get $1 call $~lib/array/Array<~lib/string/String>#__unchecked_get ) - (func $~lib/util/number/decimalCount32 (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -4568,7 +4569,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa32_lut (; 47 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4711,7 +4712,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4775,7 +4776,7 @@ call $~lib/runtime/register end ) - (func $~lib/util/number/utoa32 (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4819,7 +4820,7 @@ call $~lib/runtime/register end ) - (func $~lib/util/number/decimalCount64 (; 50 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 52 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -4888,7 +4889,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 51 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 53 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -5016,7 +5017,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 52 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 54 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5096,7 +5097,7 @@ call $~lib/runtime/register end ) - (func $~lib/util/number/itoa64 (; 53 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 55 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5198,19 +5199,19 @@ call $~lib/runtime/register end ) - (func $~lib/builtins/isFinite (; 54 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 56 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 55 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 57 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/array/Array#__unchecked_get (; 56 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__unchecked_get (; 58 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $0 i32.load offset=4 local.get $1 @@ -5219,7 +5220,7 @@ i32.add i64.load ) - (func $~lib/array/Array#__unchecked_get (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -5228,7 +5229,7 @@ i32.add i32.load16_s ) - (func $~lib/util/number/genDigits (; 58 ;) (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 (; 60 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -5799,7 +5800,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6132,7 +6133,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 60 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 62 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -6570,7 +6571,7 @@ local.get $2 i32.add ) - (func $~lib/string/String#substring (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6696,7 +6697,7 @@ call $~lib/runtime/register end ) - (func $~lib/runtime/discard (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/discard (; 64 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -6705,7 +6706,7 @@ if i32.const 0 i32.const 120 - i32.const 175 + i32.const 173 i32.const 4 call $~lib/env/abort unreachable @@ -6722,7 +6723,7 @@ if i32.const 0 i32.const 120 - i32.const 177 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable @@ -6730,7 +6731,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/util/number/dtoa (; 63 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 65 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6786,7 +6787,7 @@ end local.get $4 ) - (func $start:std/string (; 64 ;) (type $FUNCSIG$v) + (func $start:std/string (; 66 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10178,12 +10179,12 @@ unreachable end ) - (func $std/string/getString (; 65 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 67 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 66 ;) (type $FUNCSIG$v) + (func $start (; 68 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 67 ;) (type $FUNCSIG$v) + (func $null (; 69 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index dbb52f8f7f..10f7e3cd6c 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -53,7 +53,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -125,7 +125,7 @@ i32.clz i32.sub i32.shl - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 i32.const -1520547049 i32.store @@ -144,7 +144,7 @@ if i32.const 0 i32.const 72 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -159,7 +159,7 @@ if i32.const 0 i32.const 72 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index e078f5fbca..57ee7c1c02 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -91,92 +91,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -192,7 +191,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -201,7 +200,7 @@ if i32.const 0 i32.const 72 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -218,7 +217,7 @@ if i32.const 0 i32.const 72 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -228,7 +227,7 @@ i32.store local.get $0 ) - (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -485,7 +484,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -518,7 +517,7 @@ call $~lib/runtime/register end ) - (func $~lib/map/Map<~lib/string/String,usize>#clear (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map<~lib/string/String,usize>#clear (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -544,7 +543,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map<~lib/string/String,usize>#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map<~lib/string/String,usize>#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -578,7 +577,7 @@ call $~lib/map/Map<~lib/string/String,usize>#clear local.get $0 ) - (func $~lib/map/Map#clear (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 @@ -604,7 +603,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -638,7 +637,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/string/String#get:length (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -646,7 +645,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/hash/hashStr (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hashStr (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -693,7 +692,7 @@ end local.get $1 ) - (func $~lib/util/string/compareImpl (; 14 ;) (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 (; 15 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -746,7 +745,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -790,7 +789,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/map/Map<~lib/string/String,usize>#find (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map<~lib/string/String,usize>#find (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -841,7 +840,7 @@ end i32.const 0 ) - (func $~lib/map/Map<~lib/string/String,usize>#has (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map<~lib/string/String,usize>#has (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -856,7 +855,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map<~lib/string/String,usize>#get (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map<~lib/string/String,usize>#get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -878,7 +877,7 @@ unreachable end ) - (func $~lib/map/Map<~lib/string/String,usize>#rehash (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map<~lib/string/String,usize>#rehash (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1012,7 +1011,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map<~lib/string/String,usize>#set (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map<~lib/string/String,usize>#set (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1116,7 +1115,7 @@ i32.store end ) - (func $~lib/util/hash/hash32 (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -1158,7 +1157,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1209,7 +1208,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1343,7 +1342,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1447,7 +1446,7 @@ i32.store end ) - (func $~lib/symbol/_Symbol.for (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.for (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) global.get $~lib/symbol/stringToId @@ -1494,7 +1493,7 @@ call $~lib/map/Map#set local.get $2 ) - (func $~lib/map/Map#has (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1509,7 +1508,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -1531,7 +1530,7 @@ unreachable end ) - (func $~lib/symbol/_Symbol.keyFor (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.keyFor (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) global.get $~lib/symbol/idToString i32.const 0 @@ -1552,7 +1551,7 @@ i32.const 0 end ) - (func $~lib/util/memory/memcpy (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2753,7 +2752,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2984,7 +2983,7 @@ end end ) - (func $~lib/string/String#concat (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3043,7 +3042,7 @@ call $~lib/runtime/register end ) - (func $~lib/string/String.__concat (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 512 local.get $0 @@ -3053,7 +3052,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/symbol/_Symbol#toString (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol#toString (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3239,7 +3238,7 @@ i32.const 528 call $~lib/string/String.__concat ) - (func $start:std/symbol (; 34 ;) (type $FUNCSIG$v) + (func $start:std/symbol (; 35 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 16 call $~lib/symbol/Symbol @@ -3421,9 +3420,9 @@ global.get $~lib/symbol/_Symbol.isConcatSpreadable drop ) - (func $start (; 35 ;) (type $FUNCSIG$v) + (func $start (; 36 ;) (type $FUNCSIG$v) call $start:std/symbol ) - (func $null (; 36 ;) (type $FUNCSIG$v) + (func $null (; 37 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 82f021baae..ff632e8024 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -117,7 +117,7 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -189,7 +189,7 @@ i32.clz i32.sub i32.shl - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 i32.const -1520547049 i32.store @@ -439,7 +439,7 @@ if i32.const 0 i32.const 80 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -454,7 +454,7 @@ if i32.const 0 i32.const 80 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -496,7 +496,7 @@ if i32.const 0 i32.const 80 - i32.const 234 + i32.const 232 i32.const 57 call $~lib/env/abort unreachable @@ -1454,7 +1454,7 @@ i32.const 2 i32.shl local.tee $3 - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $7 i32.const 0 local.get $3 diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 80b078a72d..76a24d374d 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -122,92 +122,91 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -229,7 +228,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -486,10 +485,10 @@ end end ) - (func $~lib/collector/dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -498,7 +497,7 @@ if i32.const 0 i32.const 80 - i32.const 151 + i32.const 149 i32.const 4 call $~lib/env/abort unreachable @@ -515,7 +514,7 @@ if i32.const 0 i32.const 80 - i32.const 153 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -527,7 +526,7 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -560,13 +559,13 @@ call $~lib/runtime/register end ) - (func $~lib/collector/dummy/__ref_link (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/runtime/ArrayBufferView#constructor (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -579,7 +578,7 @@ if i32.const 0 i32.const 80 - i32.const 234 + i32.const 232 i32.const 57 call $~lib/env/abort unreachable @@ -642,7 +641,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Int8Array#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#constructor (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -658,22 +657,22 @@ local.set $0 local.get $0 ) - (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load i32.sub ) - (func $~lib/runtime/ArrayBufferView#get:byteLength (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#get:byteLength (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 ) - (func $~lib/typedarray/Int8Array#get:length (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#get:length (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Uint8Array#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -689,11 +688,11 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint8Array#get:length (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#get:length (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Uint8ClampedArray#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -709,11 +708,11 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint8ClampedArray#get:length (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#get:length (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Int16Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -729,13 +728,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int16Array#get:length (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#get:length (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 1 i32.shr_u ) - (func $~lib/typedarray/Uint16Array#constructor (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#constructor (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -751,13 +750,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint16Array#get:length (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#get:length (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 1 i32.shr_u ) - (func $~lib/typedarray/Int32Array#constructor (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -773,13 +772,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int32Array#get:length (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Uint32Array#constructor (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#constructor (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -795,13 +794,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint32Array#get:length (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#get:length (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Int64Array#constructor (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#constructor (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -817,13 +816,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int64Array#get:length (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#get:length (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $~lib/typedarray/Uint64Array#constructor (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#constructor (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -839,13 +838,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint64Array#get:length (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#get:length (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $~lib/typedarray/Float32Array#constructor (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#constructor (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -861,13 +860,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Float32Array#get:length (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Float64Array#constructor (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#constructor (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -883,13 +882,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Float64Array#get:length (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#get:length (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $std/typedarray/testInstantiate (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/typedarray/testInstantiate (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1397,7 +1396,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#__set (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#__set (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1421,7 +1420,7 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int32Array#__get (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#__get (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1444,7 +1443,7 @@ i32.add i32.load ) - (func $~lib/typedarray/Int32Array#subarray (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1581,7 +1580,7 @@ i32.store offset=8 local.get $7 ) - (func $~lib/typedarray/Float64Array#__set (; 39 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/typedarray/Float64Array#__set (; 40 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 local.get $0 i32.load offset=8 @@ -1605,7 +1604,7 @@ local.get $2 f64.store ) - (func $~lib/typedarray/Float64Array#subarray (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#subarray (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1742,7 +1741,7 @@ i32.store offset=8 local.get $7 ) - (func $~lib/util/sort/insertionSort (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) @@ -1838,12 +1837,14 @@ unreachable end ) - (func $~lib/memory/memory.free (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) + (func $~lib/allocator/arena/__mem_free (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/memory/memory.free (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - local.set $1 + call $~lib/allocator/arena/__mem_free ) - (func $~lib/util/sort/weakHeapSort (; 43 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2143,7 +2144,7 @@ local.get $10 f64.store ) - (func $~lib/typedarray/Float64Array#sort (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2227,7 +2228,7 @@ local.get $3 end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 45 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 47 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -2260,7 +2261,7 @@ i64.lt_s i32.sub ) - (func $~lib/typedarray/Float64Array#sort|trampoline (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort|trampoline (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2279,7 +2280,7 @@ local.get $1 call $~lib/typedarray/Float64Array#sort ) - (func $~lib/typedarray/Float64Array#__get (; 47 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/typedarray/Float64Array#__get (; 49 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -2302,7 +2303,7 @@ i32.add f64.load ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 48 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2334,7 +2335,7 @@ i32.and i32.store8 ) - (func $~lib/typedarray/Uint8ClampedArray#__get (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#__get (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2353,7 +2354,7 @@ i32.add i32.load8_u ) - (func $~lib/typedarray/Int8Array#__set (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int8Array#__set (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2373,7 +2374,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Int8Array#fill (; 51 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int8Array#fill (; 53 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2461,7 +2462,7 @@ end local.get $7 ) - (func $~lib/util/memory/memcpy (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3662,7 +3663,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3893,7 +3894,7 @@ end end ) - (func $~lib/runtime/makeArray (; 54 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/makeArray (; 56 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3957,11 +3958,11 @@ end local.get $4 ) - (func $~lib/array/Array#get:length (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/typedarray/Int8Array#__get (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3980,7 +3981,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__unchecked_get (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -3989,7 +3990,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__get (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4008,7 +4009,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/typedarray/isInt8ArrayEqual (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4056,7 +4057,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4193,7 +4194,7 @@ i32.store offset=8 local.get $7 ) - (func $~lib/typedarray/Int32Array#fill (; 61 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#fill (; 63 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -4291,11 +4292,11 @@ end local.get $7 ) - (func $~lib/array/Array#get:length (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 64 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 63 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -4304,7 +4305,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4323,7 +4324,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/typedarray/isInt32ArrayEqual (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4371,12 +4372,12 @@ end i32.const 1 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 66 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduce (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4433,7 +4434,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 68 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 70 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4474,7 +4475,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#__set (; 69 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 71 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4494,12 +4495,12 @@ local.get $2 i32.store8 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 70 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 72 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduce (; 71 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 73 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4556,7 +4557,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 72 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 74 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4595,12 +4596,12 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 73 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 75 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduce (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduce (; 76 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4657,7 +4658,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 75 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 77 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4696,7 +4697,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#__set (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4720,12 +4721,12 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 77 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 79 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduce (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduce (; 80 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4782,7 +4783,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 79 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 81 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4823,7 +4824,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#__set (; 80 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 82 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4847,12 +4848,12 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 81 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 83 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduce (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduce (; 84 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4909,7 +4910,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 83 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 85 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4948,12 +4949,12 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 84 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 86 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduce (; 85 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5010,7 +5011,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 86 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 88 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5047,7 +5048,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#__set (; 87 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint32Array#__set (; 89 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -5071,12 +5072,12 @@ local.get $2 i32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 88 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 90 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduce (; 89 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduce (; 91 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5133,7 +5134,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 90 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 92 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5170,7 +5171,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#__set (; 91 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 93 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -5194,12 +5195,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 92 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 94 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 93 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 95 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -5256,7 +5257,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 94 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 96 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5293,7 +5294,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#__set (; 95 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Uint64Array#__set (; 97 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -5317,12 +5318,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 96 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 98 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduce (; 97 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduce (; 99 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -5379,7 +5380,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 98 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 100 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5416,7 +5417,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#__set (; 99 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 101 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -5440,12 +5441,12 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 100 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 102 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 101 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduce (; 103 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -5502,7 +5503,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 102 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 104 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -5539,12 +5540,12 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 103 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 105 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 104 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduce (; 106 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) @@ -5601,7 +5602,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 105 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 107 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -5638,12 +5639,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduceRight (; 107 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduceRight (; 109 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5697,7 +5698,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 108 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 110 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5738,12 +5739,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 109 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 111 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 110 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 112 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5797,7 +5798,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 111 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 113 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5836,12 +5837,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 112 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 114 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 113 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 115 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5895,7 +5896,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 114 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 116 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5934,12 +5935,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 115 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 117 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduceRight (; 116 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduceRight (; 118 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5993,7 +5994,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 117 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 119 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6034,12 +6035,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 118 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 120 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 119 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 121 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6093,7 +6094,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 120 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 122 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6132,12 +6133,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 121 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 123 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduceRight (; 122 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 124 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6191,7 +6192,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 123 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 125 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6228,12 +6229,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 124 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 126 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduceRight (; 125 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduceRight (; 127 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6287,7 +6288,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 126 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 128 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6324,12 +6325,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 127 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 129 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduceRight (; 128 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 130 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -6383,7 +6384,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 129 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 131 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6420,12 +6421,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 130 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 132 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduceRight (; 131 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduceRight (; 133 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -6479,7 +6480,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 132 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 134 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6516,12 +6517,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 133 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 135 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduceRight (; 134 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduceRight (; 136 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -6575,7 +6576,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 135 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 137 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -6612,12 +6613,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 136 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 138 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduceRight (; 137 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduceRight (; 139 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) @@ -6671,7 +6672,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 138 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 140 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -6708,12 +6709,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 139 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 141 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6778,7 +6779,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 141 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 143 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6844,12 +6845,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 142 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 144 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8Array#map (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 145 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6914,7 +6915,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint8Array#__get (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__get (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -6933,7 +6934,7 @@ i32.add i32.load8_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 145 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 147 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6999,12 +7000,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 146 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 148 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7069,7 +7070,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 148 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 150 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7135,12 +7136,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 149 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 151 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int16Array#map (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7205,7 +7206,7 @@ end local.get $6 ) - (func $~lib/typedarray/Int16Array#__get (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7228,7 +7229,7 @@ i32.add i32.load16_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 152 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 154 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7294,12 +7295,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 153 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 155 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint16Array#map (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 156 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7364,7 +7365,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint16Array#__get (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7387,7 +7388,7 @@ i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 156 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 158 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7453,12 +7454,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 157 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 159 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int32Array#map (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7523,7 +7524,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 159 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 161 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7589,12 +7590,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 160 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 162 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint32Array#map (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7659,7 +7660,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint32Array#__get (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7682,7 +7683,7 @@ i32.add i32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 163 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 165 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7748,12 +7749,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 164 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 166 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7818,7 +7819,7 @@ end local.get $6 ) - (func $~lib/typedarray/Int64Array#__get (; 166 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 168 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -7841,7 +7842,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 167 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 169 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7907,12 +7908,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 168 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 170 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Uint64Array#map (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7977,7 +7978,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint64Array#__get (; 170 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__get (; 172 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -8000,7 +8001,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 171 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 173 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8066,12 +8067,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 172 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 174 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8136,7 +8137,7 @@ end local.get $6 ) - (func $~lib/typedarray/Float32Array#__get (; 174 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 176 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -8159,7 +8160,7 @@ i32.add f32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 175 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 177 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8225,12 +8226,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 176 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 178 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 179 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8295,7 +8296,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 178 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 180 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8361,7 +8362,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 179 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 181 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -8370,7 +8371,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8430,7 +8431,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 181 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 183 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -8439,7 +8440,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 182 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 184 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8493,14 +8494,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 183 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 185 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#some (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8560,14 +8561,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 185 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 187 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 186 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 188 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8621,14 +8622,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 187 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 189 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#some (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#some (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8688,14 +8689,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 189 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 191 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 190 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 192 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8749,7 +8750,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 191 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8758,7 +8759,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 194 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8818,7 +8819,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 195 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8827,7 +8828,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 194 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 196 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8881,14 +8882,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 195 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 197 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#some (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8948,14 +8949,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 197 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 199 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 198 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 200 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9009,12 +9010,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 199 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 201 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 200 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9074,12 +9075,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 201 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 203 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 202 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 204 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9133,12 +9134,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 203 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 205 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#some (; 204 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#some (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9198,12 +9199,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 205 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 207 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 206 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 208 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9257,12 +9258,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 207 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 209 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 210 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9322,12 +9323,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 209 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 211 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 210 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 212 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9381,12 +9382,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 211 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 213 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#some (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#some (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9446,12 +9447,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 213 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 215 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 214 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 216 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9505,12 +9506,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 215 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 217 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 216 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 218 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9570,12 +9571,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 217 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 219 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 218 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 220 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9629,12 +9630,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 219 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 221 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 220 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9694,12 +9695,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 221 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 223 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 222 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 224 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9753,7 +9754,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 223 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9762,7 +9763,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#findIndex (; 224 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9822,7 +9823,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 227 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9831,7 +9832,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 226 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 228 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9884,14 +9885,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 227 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 229 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#findIndex (; 228 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 230 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9951,14 +9952,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 229 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 231 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 230 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 232 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10011,14 +10012,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 231 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 233 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 232 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 234 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10078,14 +10079,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 233 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 235 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 234 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 236 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10138,7 +10139,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 235 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 237 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10147,7 +10148,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#findIndex (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10207,7 +10208,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 237 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 239 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10216,7 +10217,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 238 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 240 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10269,14 +10270,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 239 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 241 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#findIndex (; 240 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 242 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10336,14 +10337,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 241 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 243 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 242 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 244 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10396,12 +10397,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 243 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 245 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#findIndex (; 244 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10461,12 +10462,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 245 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 247 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 246 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 248 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10519,12 +10520,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 247 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 249 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#findIndex (; 248 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#findIndex (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10584,12 +10585,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 249 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 251 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 250 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 252 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10642,12 +10643,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 251 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 253 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#findIndex (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 254 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10707,12 +10708,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 253 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 255 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 254 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 256 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10765,12 +10766,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 255 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 257 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#findIndex (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#findIndex (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10830,12 +10831,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 257 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 259 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 258 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 260 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10888,12 +10889,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 259 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 261 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#findIndex (; 260 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10953,12 +10954,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 261 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 263 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 262 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 264 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11011,12 +11012,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 263 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 265 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#findIndex (; 264 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 266 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11076,12 +11077,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 265 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 267 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 266 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 268 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11134,7 +11135,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 267 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 269 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11145,7 +11146,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int8Array#every (; 268 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 270 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11212,7 +11213,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 269 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 271 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11221,7 +11222,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 270 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 272 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11275,7 +11276,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 271 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 273 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -11284,7 +11285,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8Array#every (; 272 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 274 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11351,14 +11352,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 273 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 275 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 274 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 276 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11412,7 +11413,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 275 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 277 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -11421,7 +11422,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#every (; 276 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#every (; 278 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11488,14 +11489,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 277 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 279 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 278 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 280 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11549,7 +11550,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 279 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 281 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11560,7 +11561,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int16Array#every (; 280 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11627,7 +11628,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 281 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 283 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11636,7 +11637,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 282 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 284 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11690,7 +11691,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 283 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 285 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and @@ -11699,7 +11700,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint16Array#every (; 284 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 286 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11766,14 +11767,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 285 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 287 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 286 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 288 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11827,14 +11828,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 287 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 289 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.const 0 i32.eq ) - (func $~lib/typedarray/Int32Array#every (; 288 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 290 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11901,12 +11902,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 289 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 291 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 290 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 292 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11960,14 +11961,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 291 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 293 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_u i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint32Array#every (; 292 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#every (; 294 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12034,12 +12035,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 293 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 295 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 294 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 296 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12093,14 +12094,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 295 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 297 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (; 296 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 298 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12167,12 +12168,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 297 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 299 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 298 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 300 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12226,14 +12227,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 299 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 301 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $~lib/typedarray/Uint64Array#every (; 300 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#every (; 302 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12300,12 +12301,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 301 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 303 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 302 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 304 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12359,12 +12360,12 @@ unreachable end ) - (func $~lib/builtins/isNaN (; 303 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 305 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $~lib/math/NativeMathf.mod (; 304 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 306 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12615,14 +12616,14 @@ local.get $2 f32.reinterpret_i32 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 305 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 307 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 306 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 308 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12689,12 +12690,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 307 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 309 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 308 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 310 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12748,12 +12749,12 @@ unreachable end ) - (func $~lib/builtins/isNaN (; 309 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 311 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/math/NativeMath.mod (; 310 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 312 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -13006,14 +13007,14 @@ local.get $2 f64.reinterpret_i64 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 311 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 313 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 312 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 314 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13080,12 +13081,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 313 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 315 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 314 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 316 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13139,7 +13140,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 315 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 317 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13194,7 +13195,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 316 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#forEach (; 318 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13239,7 +13240,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 317 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 319 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13295,7 +13296,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 318 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 320 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13346,7 +13347,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8Array#forEach (; 319 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 321 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13391,7 +13392,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 320 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 322 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13441,7 +13442,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 321 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 323 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13492,7 +13493,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8ClampedArray#forEach (; 322 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#forEach (; 324 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13537,7 +13538,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 323 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 325 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13587,7 +13588,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 324 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 326 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13642,7 +13643,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 325 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#forEach (; 327 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13687,7 +13688,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 326 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 328 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13743,7 +13744,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 327 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 329 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13794,7 +13795,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint16Array#forEach (; 328 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 330 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13839,7 +13840,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 329 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 331 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13889,7 +13890,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 330 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 332 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13936,7 +13937,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 331 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 333 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13981,7 +13982,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 332 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 334 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14025,7 +14026,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 333 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 335 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14072,7 +14073,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint32Array#forEach (; 334 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint32Array#forEach (; 336 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14117,7 +14118,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 335 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 337 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14161,7 +14162,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 336 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 338 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14209,7 +14210,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 337 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 339 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14254,7 +14255,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 338 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 340 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14301,7 +14302,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 339 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 341 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14349,7 +14350,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint64Array#forEach (; 340 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint64Array#forEach (; 342 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14394,7 +14395,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 341 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 343 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14441,7 +14442,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 342 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 344 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14489,7 +14490,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 343 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#forEach (; 345 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14534,7 +14535,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 344 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 346 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14581,7 +14582,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 345 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 347 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14629,7 +14630,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 346 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#forEach (; 348 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14674,7 +14675,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 347 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 349 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14721,7 +14722,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#reverse (; 348 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 350 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14791,7 +14792,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 349 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 351 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14955,7 +14956,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 350 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 352 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15025,7 +15026,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8Array#subarray (; 351 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 353 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15162,7 +15163,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 352 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 354 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15320,7 +15321,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#reverse (; 353 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reverse (; 355 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15390,7 +15391,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 354 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 356 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15527,7 +15528,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 355 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 357 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15685,7 +15686,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 356 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 358 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15755,7 +15756,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int16Array#subarray (; 357 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 359 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15892,7 +15893,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 358 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 360 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16056,7 +16057,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 359 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 361 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16126,7 +16127,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint16Array#subarray (; 360 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 362 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16263,7 +16264,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 361 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 363 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16421,7 +16422,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 362 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 364 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16491,7 +16492,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 363 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 365 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16643,7 +16644,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#reverse (; 364 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reverse (; 366 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16713,7 +16714,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint32Array#subarray (; 365 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 367 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16850,7 +16851,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 366 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 368 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17002,7 +17003,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#reverse (; 367 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 369 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17072,7 +17073,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int64Array#subarray (; 368 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 370 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17209,7 +17210,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 369 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 371 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17364,7 +17365,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#reverse (; 370 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#reverse (; 372 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17434,7 +17435,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint64Array#subarray (; 371 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 373 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17571,7 +17572,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 372 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 374 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17726,7 +17727,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 373 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 375 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17796,7 +17797,7 @@ end local.get $1 ) - (func $~lib/typedarray/Float32Array#subarray (; 374 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 376 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17933,7 +17934,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 375 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 377 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18088,7 +18089,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 376 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 378 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -18158,7 +18159,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 377 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 379 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18313,7 +18314,7 @@ unreachable end ) - (func $start:std/typedarray (; 378 ;) (type $FUNCSIG$v) + (func $start:std/typedarray (; 380 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32.const 1 @@ -19547,9 +19548,9 @@ call $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> call $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> ) - (func $start (; 379 ;) (type $FUNCSIG$v) + (func $start (; 381 ;) (type $FUNCSIG$v) call $start:std/typedarray ) - (func $null (; 380 ;) (type $FUNCSIG$v) + (func $null (; 382 ;) (type $FUNCSIG$v) ) ) From 41abc0166c8dcbacb5e016333127766a59dbf2bf Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 27 Mar 2019 17:41:06 +0100 Subject: [PATCH 070/119] readme [ci skip] --- std/assembly/allocator/README.md | 2 +- std/assembly/collector/README.md | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/std/assembly/allocator/README.md b/std/assembly/allocator/README.md index 8bb6e9d4e6..d020decec5 100644 --- a/std/assembly/allocator/README.md +++ b/std/assembly/allocator/README.md @@ -17,5 +17,5 @@ Common Optional -------- -* **__mem_reset**(ref: `usize`, parentRef: `usize`)
+* **__mem_reset**(ref: `usize`, parentRef: `usize`): `void`
Resets dynamic memory to its initial state. Used by the arena allocator. diff --git a/std/assembly/collector/README.md b/std/assembly/collector/README.md index 3e5517e01e..7d280e6850 100644 --- a/std/assembly/collector/README.md +++ b/std/assembly/collector/README.md @@ -6,31 +6,31 @@ A garbage collector for AssemblyScript must implement the following common and e Common ------ -* **__ref_collect**()
+* **__ref_collect**(): `void`
Triggers a full garbage collection cycle. Also indicates the presence of a GC. Tracing ------- -* **__ref_register**(ref: `usize`)
+* **__ref_register**(ref: `usize`): `void`
Sets up a new reference. -* **__ref_link**(ref: `usize`, parentRef: `usize`)
+* **__ref_link**(ref: `usize`, parentRef: `usize`): `void`
Links a reference to a parent that is now referencing it. -* **__ref_unlink**(ref: `usize`, parentRef: `usize`)
+* **__ref_unlink**(ref: `usize`, parentRef: `usize`): `void`
Unlinks a reference from a parent that was referencing it. Reference counting ------------------ -* **__ref_register**(ref: `usize`)
+* **__ref_register**(ref: `usize`): `void`
Sets up a new reference. Implementation is optional for reference counting GCs. -* **__ref_retain**(ref: `usize`)
+* **__ref_retain**(ref: `usize`): `void`
Retains a reference, usually incrementing RC. -* **__ref_release**(ref: `usize`)
+* **__ref_release**(ref: `usize`): `void`
Releases a reference, usually decrementing RC. Typical patterns @@ -79,10 +79,10 @@ if (ref !== oldRef) { } else assert(false); } else { if (isDefined(__ref_link)) { - __ref_unlink(oldRef, parentRef); + if (oldRef) __ref_unlink(oldRef, parentRef); // * __ref_link(ref, parentRef); } else if (isDefined(__ref_retain)) { - __ref_release(oldRef); + if (oldRef) __ref_release(oldRef); // * __ref_retain(ref); } else assert(false); } @@ -105,4 +105,4 @@ if (isNullable()) { } ``` -Note that some data structures may contain `null` values even though the value type isn't nullable. May be the case when appending a new element to an array for example. +(*) Note that some data structures may contain `null` values even though the value type isn't nullable. May be the case when appending a new element to an array for example. From 0dcfcc7935d867d67e126d0fd4dbee999ff8c02c Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 28 Mar 2019 11:07:47 +0100 Subject: [PATCH 071/119] external gc interface --- std/assembly/gc.ts | 36 +- std/assembly/index.d.ts | 20 +- std/assembly/memory.ts | 16 +- std/assembly/table.ts | 8 +- std/assembly/util/error.ts | 4 + tests/compiler/gc.optimized.wat | 1118 +++++++++++++++++++++++++ tests/compiler/gc.ts | 39 + tests/compiler/gc.untouched.wat | 1349 +++++++++++++++++++++++++++++++ 8 files changed, 2573 insertions(+), 17 deletions(-) create mode 100644 tests/compiler/gc.optimized.wat create mode 100644 tests/compiler/gc.ts create mode 100644 tests/compiler/gc.untouched.wat diff --git a/std/assembly/gc.ts b/std/assembly/gc.ts index 4edf24aa12..e117ff2391 100644 --- a/std/assembly/gc.ts +++ b/std/assembly/gc.ts @@ -1,16 +1,48 @@ /// +import { E_NOTIMPLEMENTED } from "./util/error"; + +// @ts-ignore +@lazy +var GC_ROOT = new Set(); + /** Garbage collector interface. */ export namespace gc { /** Whether the garbage collector interface is implemented. */ // @ts-ignore: decorator @lazy - export const IMPLEMENTED: bool = isDefined(__ref_collect); + export const implemented: bool = isDefined(__ref_collect); /** Performs a full garbage collection cycle. */ export function collect(): void { if (isDefined(__ref_collect)) __ref_collect(); - else WARNING("missing implementation: gc.collect"); + else throw new Error(E_NOTIMPLEMENTED); + } + + /** Retains a reference, making sure that it doesn't become collected. */ + export function retain(ref: usize): void { + var root = GC_ROOT; + if (!root.has(ref)) { + root.add(ref); + if (implemented) { + if (isDefined(__ref_link)) __ref_link(ref, changetype(root)); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } + } + } + + /** Releases a reference, allowing it to become collected. */ + export function release(ref: usize): void { + var root = GC_ROOT; + if (root.has(ref)) { + root.delete(ref); + if (implemented) { + if (isDefined(__ref_link)) __ref_unlink(ref, changetype(root)); + else if (isDefined(__ref_retain)) __ref_release(ref); + else assert(false); + } + } } } diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index 68a648d60c..67f655cb44 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -974,6 +974,8 @@ declare function bswap16(value: T): T; /** Memory operations. */ declare namespace memory { + /** Whether the memory managed interface is implemented. */ + export const implemented: bool; /** Returns the current memory size in units of pages. One page is 64kb. */ export function size(): i32; /** Grows linear memory by a given unsigned delta of pages. One page is 64kb. Returns the previous memory size in units of pages or `-1` on failure. */ @@ -985,9 +987,9 @@ declare namespace memory { /** Repeats `src` of length `srcLength` `count` times at `dst`. */ export function repeat(dst: usize, src: usize, srcLength: usize, count: usize): void; /** Copies elements from a passive element segment to a table. */ - // export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void; + export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void; /** Prevents further use of a passive element segment. */ - // export function drop(segmentIndex: u32): void; + export function drop(segmentIndex: u32): void; /** Copies elements from one region of a table to another region. */ export function allocate(size: usize): usize; /** Disposes a chunk of memory by its pointer. */ @@ -1000,20 +1002,24 @@ declare namespace memory { /** Garbage collector operations. */ declare namespace gc { - /** Allocates a managed object identified by its visitor function. */ - export function allocate(size: usize, visitFn: (ref: usize) => void): usize; + /** Whether the garbage collector interface is implemented. */ + export const implemented: bool; /** Performs a full garbage collection cycle. */ export function collect(): void; + /** Retains a reference, making sure that it doesn't become collected. */ + export function retain(ref: usize): void; + /** Releases a reference, allowing it to become collected. */ + export function release(ref: usize): void; } /** Table operations. */ declare namespace table { /** Copies elements from a passive element segment to a table. */ - // export function init(elementIndex: u32, srcOffset: u32, dstOffset: u32, n: u32): void; + export function init(elementIndex: u32, srcOffset: u32, dstOffset: u32, n: u32): void; /** Prevents further use of a passive element segment. */ - // export function drop(elementIndex: u32): void; + export function drop(elementIndex: u32): void; /** Copies elements from one region of a table to another region. */ - // export function copy(dest: u32, src: u32, n: u32): void; + export function copy(dest: u32, src: u32, n: u32): void; } /** Class representing a generic, fixed-length raw binary data buffer. */ diff --git a/std/assembly/memory.ts b/std/assembly/memory.ts index 46ee6c449a..6865c3624f 100644 --- a/std/assembly/memory.ts +++ b/std/assembly/memory.ts @@ -1,6 +1,7 @@ /// import { memcmp, memmove, memset } from "./util/memory"; +import { E_NOTIMPLEMENTED } from "./util/error"; // @ts-ignore: decorator @builtin @@ -9,6 +10,11 @@ export declare const HEAP_BASE: usize; /** Memory manager interface. */ export namespace memory { + /** Whether the memory managed interface is implemented. */ + // @ts-ignore: decorator + @lazy + export const implemented: bool = isDefined(__mem_allocate); + /** Gets the size of the memory in pages. */ // @ts-ignore: decorator @builtin @@ -37,14 +43,14 @@ export namespace memory { // @ts-ignore: decorator @unsafe export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void { - unreachable(); // not yet implemented + throw new Error(E_NOTIMPLEMENTED); } /** Drops a memory segment. */ // @ts-ignore: decorator @unsafe export function drop(segmentIndex: u32): void { - unreachable(); // not yet implemented + throw new Error(E_NOTIMPLEMENTED); } /** Dynamically allocates a section of memory and returns its address. */ @@ -52,7 +58,7 @@ export namespace memory { @unsafe export function allocate(size: usize): usize { if (isDefined(__mem_allocate)) return __mem_allocate(size); - else return unreachable(); + else throw new Error(E_NOTIMPLEMENTED); } /** Dynamically frees a section of memory by the previously allocated address. */ @@ -60,7 +66,7 @@ export namespace memory { @unsafe export function free(ptr: usize): void { if (isDefined(__mem_free)) __mem_free(ptr); - else unreachable(); + else throw new Error(E_NOTIMPLEMENTED); } /** Resets the memory to its initial state. Arena allocator only. */ @@ -68,7 +74,7 @@ export namespace memory { @unsafe export function reset(): void { if (isDefined(__mem_reset)) __mem_reset(); - else unreachable(); + else throw new Error(E_NOTIMPLEMENTED); } /** Repeats a section of memory at a specific address. */ diff --git a/std/assembly/table.ts b/std/assembly/table.ts index cc312ade58..5598bc88ae 100644 --- a/std/assembly/table.ts +++ b/std/assembly/table.ts @@ -1,14 +1,16 @@ +import { E_NOTIMPLEMENTED } from "./util/error"; + export namespace table { export function copy(dst: u32, src: u32, n: u32): void { - ERROR("not implemented: table.copy"); + throw new Error(E_NOTIMPLEMENTED); } export function init(elementIndex: u32, srcOffset: u32, dstOffset: u32, n: u32): void { - ERROR("not implemented: table.init"); + throw new Error(E_NOTIMPLEMENTED); } export function drop(elementIndex: u32): void { - ERROR("not implemented: table.drop"); + throw new Error(E_NOTIMPLEMENTED); } } diff --git a/std/assembly/util/error.ts b/std/assembly/util/error.ts index c9c1dbc119..cbee8cbffa 100644 --- a/std/assembly/util/error.ts +++ b/std/assembly/util/error.ts @@ -16,3 +16,7 @@ export const E_EMPTYARRAY: string = "Array is empty"; // @ts-ignore: decorator @lazy @inline export const E_HOLEYARRAY: string = "Element type must be nullable if array is holey"; + +// @ts-ignore: decorator +@lazy @inline +export const E_NOTIMPLEMENTED: string = "Not implemented"; diff --git a/tests/compiler/gc.optimized.wat b/tests/compiler/gc.optimized.wat new file mode 100644 index 0000000000..364307690c --- /dev/null +++ b/tests/compiler/gc.optimized.wat @@ -0,0 +1,1118 @@ +(module + (type $FUNCSIG$v (func)) + (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$vi (func (param i32))) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$i (func (result i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\02\00\00\00\1e") + (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 56) "\02\00\00\00\16") + (data (i32.const 72) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 96) "\02\00\00\00\n") + (data (i32.const 112) "g\00c\00.\00t\00s") + (data (i32.const 128) "\02\00\00\00&") + (data (i32.const 144) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 184) "\02\00\00\00\0e") + (data (i32.const 200) "g\00c\00.\00l\00i\00n\00k") + (data (i32.const 216) "\02\00\00\00\12") + (data (i32.const 232) "g\00c\00.\00u\00n\00l\00i\00n\00k") + (data (i32.const 256) "\02\00\00\00\14") + (data (i32.const 272) "g\00c\00.\00c\00o\00l\00l\00e\00c\00t") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_count (mut i32) (i32.const 0)) + (global $gc/_dummy/link_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_parentRef (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_count (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_parentRef (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/gc/gc.implemented i32 (i32.const 1)) + (global $~lib/gc/GC_ROOT (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/capabilities i32 (i32.const 2)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (export "main" (func $gc/main)) + (export "gc.implemented" (global $~lib/gc/gc.implemented)) + (export "gc.collect" (func $~lib/gc/gc.collect)) + (export "gc.retain" (func $~lib/gc/gc.retain)) + (export "gc.release" (func $~lib/gc/gc.release)) + (export ".capabilities" (global $~lib/capabilities)) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.tee $1 + local.get $0 + i32.const 1 + local.get $0 + i32.const 1 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + current_memory + local.tee $2 + i32.const 16 + i32.shl + i32.gt_u + if + local.get $2 + local.get $0 + local.get $1 + i32.sub + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $2 + local.get $3 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $0 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 + i32.add + ) + (func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 72 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/_dummy/register_count + local.get $0 + global.set $gc/_dummy/register_ref + ) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 292 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 149 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 151 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $gc/_dummy/__ref_register + local.get $0 + ) + (func $~lib/memory/memory.fill (; 6 ;) (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 $1 + i32.sub + local.set $2 + local.get $0 + local.get $1 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $2 + 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/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + i32.const 0 + i32.const 144 + i32.const 25 + i32.const 43 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/runtime/allocate + local.tee $1 + local.get $0 + call $~lib/memory/memory.fill + local.get $1 + i32.const 4 + call $~lib/runtime/register + ) + (func $gc/_dummy/__ref_link (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 200 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/_dummy/link_count + i32.const 1 + i32.add + global.set $gc/_dummy/link_count + local.get $0 + global.set $gc/_dummy/link_ref + local.get $0 + global.set $gc/_dummy/link_parentRef + ) + (func $gc/_dummy/__ref_unlink (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 232 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/_dummy/unlink_count + i32.const 1 + i32.add + global.set $gc/_dummy/unlink_count + local.get $0 + global.set $gc/_dummy/unlink_ref + local.get $1 + global.set $gc/_dummy/unlink_parentRef + ) + (func $~lib/set/Set#clear (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + local.tee $2 + local.set $1 + i32.const 16 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $0 + local.get $1 + i32.load + local.tee $3 + i32.ne + if + local.get $3 + if + local.get $3 + local.get $2 + call $gc/_dummy/__ref_unlink + end + local.get $0 + local.get $2 + call $gc/_dummy/__ref_link + end + local.get $1 + local.get $0 + i32.store + local.get $1 + i32.const 3 + i32.store offset=4 + i32.const 32 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $0 + local.get $1 + local.tee $2 + i32.load offset=8 + local.tee $3 + i32.ne + if + local.get $3 + if + local.get $3 + local.get $2 + call $gc/_dummy/__ref_unlink + end + local.get $0 + local.get $2 + call $gc/_dummy/__ref_link + end + local.get $1 + local.get $0 + i32.store offset=8 + local.get $1 + i32.const 4 + i32.store offset=12 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + ) + (func $~lib/set/Set#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/runtime/allocate + i32.const 3 + call $~lib/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/set/Set#clear + local.get $0 + ) + (func $~lib/util/hash/hash32 (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + local.get $0 + i32.const 8 + i32.shr_u + i32.const 255 + i32.and + i32.xor + i32.const 16777619 + i32.mul + local.get $0 + i32.const 16 + i32.shr_u + i32.const 255 + i32.and + i32.xor + i32.const 16777619 + i32.mul + local.get $0 + i32.const 24 + i32.shr_u + i32.xor + i32.const 16777619 + i32.mul + ) + (func $~lib/set/Set#find (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.load + local.get $0 + i32.load offset=4 + local.get $2 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $2 + loop $continue|0 + local.get $2 + if + local.get $2 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + local.tee $0 + if + local.get $2 + i32.load + local.get $1 + i32.eq + local.set $0 + end + local.get $0 + if + local.get $2 + return + end + local.get $2 + i32.load offset=4 + i32.const -2 + i32.and + local.set $2 + br $continue|0 + end + end + i32.const 0 + ) + (func $~lib/set/Set#has (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find + i32.const 0 + i32.ne + ) + (func $~lib/set/Set#rehash (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + i32.const 1 + i32.add + local.tee $2 + i32.const 2 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $4 + local.get $2 + f64.convert_i32_s + f64.const 2.6666666666666665 + f64.mul + i32.trunc_f64_s + local.tee $6 + i32.const 3 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $5 + local.get $0 + i32.load offset=8 + local.tee $2 + local.get $0 + i32.load offset=16 + i32.const 3 + i32.shl + i32.add + local.set $7 + local.get $5 + local.set $3 + loop $continue|0 + local.get $2 + local.get $7 + i32.ne + if + local.get $2 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $3 + local.get $2 + i32.load + i32.store + local.get $3 + local.get $2 + i32.load + call $~lib/util/hash/hash32 + local.get $1 + i32.and + i32.const 2 + i32.shl + local.get $4 + i32.add + local.tee $8 + i32.load + i32.store offset=4 + local.get $8 + local.get $3 + i32.store + local.get $3 + i32.const 8 + i32.add + local.set $3 + end + local.get $2 + i32.const 8 + i32.add + local.set $2 + br $continue|0 + end + end + local.get $0 + local.tee $3 + local.set $2 + local.get $4 + local.tee $0 + local.get $2 + i32.load + local.tee $4 + i32.ne + if + local.get $4 + if + local.get $4 + local.get $3 + call $gc/_dummy/__ref_unlink + end + local.get $0 + local.get $3 + call $gc/_dummy/__ref_link + end + local.get $2 + local.get $0 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $5 + local.tee $0 + local.get $2 + local.tee $1 + i32.load offset=8 + local.tee $3 + i32.ne + if + local.get $3 + if + local.get $3 + local.get $2 + call $gc/_dummy/__ref_unlink + end + local.get $0 + local.get $2 + call $gc/_dummy/__ref_link + end + local.get $1 + local.get $0 + i32.store offset=8 + local.get $1 + local.get $6 + i32.store offset=12 + local.get $1 + local.get $1 + i32.load offset=20 + i32.store offset=16 + ) + (func $~lib/set/Set#add (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/hash32 + local.tee $3 + call $~lib/set/Set#find + i32.eqz + if + local.get $0 + i32.load offset=16 + local.get $0 + i32.load offset=12 + i32.eq + if + local.get $0 + local.get $0 + i32.load offset=20 + local.get $0 + i32.load offset=12 + f64.convert_i32_s + f64.const 0.75 + f64.mul + i32.trunc_f64_s + i32.lt_s + if (result i32) + local.get $0 + i32.load offset=4 + else + local.get $0 + i32.load offset=4 + i32.const 1 + i32.shl + i32.const 1 + i32.or + end + call $~lib/set/Set#rehash + end + local.get $0 + i32.load offset=8 + local.set $2 + local.get $0 + local.get $0 + i32.load offset=16 + local.tee $4 + i32.const 1 + i32.add + i32.store offset=16 + local.get $4 + i32.const 3 + i32.shl + local.get $2 + i32.add + local.tee $2 + local.get $1 + i32.store + local.get $0 + local.get $0 + i32.load offset=20 + i32.const 1 + i32.add + i32.store offset=20 + local.get $2 + local.get $0 + i32.load + local.get $0 + i32.load offset=4 + local.get $3 + i32.and + i32.const 2 + i32.shl + i32.add + local.tee $0 + i32.load + i32.store offset=4 + local.get $0 + local.get $2 + i32.store + end + ) + (func $~lib/gc/gc.retain (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + global.get $~lib/gc/GC_ROOT + local.tee $1 + local.get $0 + call $~lib/set/Set#has + i32.eqz + if + local.get $1 + local.get $0 + call $~lib/set/Set#add + local.get $0 + local.get $1 + call $gc/_dummy/__ref_link + end + ) + (func $~lib/set/Set#delete (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find + local.tee $1 + i32.eqz + if + return + end + local.get $1 + local.get $1 + i32.load offset=4 + i32.const 1 + i32.or + i32.store offset=4 + local.get $0 + local.get $0 + i32.load offset=20 + i32.const 1 + i32.sub + i32.store offset=20 + local.get $0 + i32.load offset=4 + i32.const 1 + i32.shr_u + local.tee $2 + i32.const 1 + i32.add + i32.const 4 + local.get $0 + i32.load offset=20 + local.tee $1 + i32.const 4 + local.get $1 + i32.gt_u + select + i32.ge_u + local.tee $1 + if (result i32) + local.get $0 + i32.load offset=20 + local.get $0 + i32.load offset=12 + f64.convert_i32_s + f64.const 0.75 + f64.mul + i32.trunc_f64_s + i32.lt_s + else + local.get $1 + end + if + local.get $0 + local.get $2 + call $~lib/set/Set#rehash + end + ) + (func $~lib/gc/gc.release (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + global.get $~lib/gc/GC_ROOT + local.tee $1 + local.get $0 + call $~lib/set/Set#has + if + local.get $1 + local.get $0 + call $~lib/set/Set#delete + local.get $0 + local.get $1 + call $gc/_dummy/__ref_unlink + end + ) + (func $~lib/gc/gc.collect (; 20 ;) (type $FUNCSIG$v) + i32.const 272 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/_dummy/collect_count + i32.const 1 + i32.add + global.set $gc/_dummy/collect_count + ) + (func $gc/main (; 21 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/started + i32.eqz + if + i32.const 296 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + call $~lib/set/Set#constructor + global.set $~lib/gc/GC_ROOT + i32.const 1 + global.set $~lib/started + end + i32.const 0 + call $~lib/runtime/allocate + i32.const 1 + call $~lib/runtime/register + local.set $2 + global.get $gc/_dummy/link_count + local.set $3 + global.get $gc/_dummy/unlink_count + local.set $0 + global.get $gc/_dummy/collect_count + local.set $1 + local.get $2 + call $~lib/gc/gc.retain + global.get $gc/_dummy/link_count + local.get $3 + i32.const 1 + i32.add + i32.ne + if + i32.const 0 + i32.const 112 + i32.const 18 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/unlink_count + local.get $0 + i32.ne + if + i32.const 0 + i32.const 112 + i32.const 19 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/collect_count + local.get $1 + i32.ne + if + i32.const 0 + i32.const 112 + i32.const 20 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/link_count + local.set $3 + global.get $gc/_dummy/unlink_count + local.set $0 + global.get $gc/_dummy/collect_count + local.set $1 + local.get $2 + call $~lib/gc/gc.release + global.get $gc/_dummy/link_count + local.get $3 + i32.ne + if + i32.const 0 + i32.const 112 + i32.const 27 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/unlink_count + local.get $0 + i32.const 1 + i32.add + i32.ne + if + i32.const 0 + i32.const 112 + i32.const 28 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/collect_count + local.get $1 + i32.ne + if + i32.const 0 + i32.const 112 + i32.const 29 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/link_count + local.set $0 + global.get $gc/_dummy/unlink_count + local.set $1 + global.get $gc/_dummy/collect_count + local.set $2 + call $~lib/gc/gc.collect + global.get $gc/_dummy/link_count + local.get $0 + i32.ne + if + i32.const 0 + i32.const 112 + i32.const 36 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/unlink_count + local.get $1 + i32.ne + if + i32.const 0 + i32.const 112 + i32.const 37 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/collect_count + local.get $2 + i32.const 1 + i32.add + i32.ne + if + i32.const 0 + i32.const 112 + i32.const 38 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $null (; 22 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/gc.ts b/tests/compiler/gc.ts new file mode 100644 index 0000000000..af6cb670ef --- /dev/null +++ b/tests/compiler/gc.ts @@ -0,0 +1,39 @@ +import "allocator/arena"; +import { link_count, unlink_count, collect_count } from "./gc/_dummy"; +export { gc }; + +class Ref {} + +@start export function main(): void { + var ref = new Ref(); + + assert(gc.implemented); + + var previous_link_count = link_count; + var previous_unlink_count = unlink_count; + var previous_collect_count = collect_count; + + gc.retain(changetype(ref)); + + assert(link_count == previous_link_count + 1); + assert(unlink_count == previous_unlink_count); + assert(collect_count == previous_collect_count); + previous_link_count = link_count; + previous_unlink_count = unlink_count; + previous_collect_count = collect_count; + + gc.release(changetype(ref)); + + assert(link_count == previous_link_count); + assert(unlink_count == previous_unlink_count + 1); + assert(collect_count == previous_collect_count); + previous_link_count = link_count; + previous_unlink_count = unlink_count; + previous_collect_count = collect_count; + + gc.collect(); + + assert(link_count == previous_link_count); + assert(unlink_count == previous_unlink_count); + assert(collect_count == previous_collect_count + 1); +} diff --git a/tests/compiler/gc.untouched.wat b/tests/compiler/gc.untouched.wat new file mode 100644 index 0000000000..607482d5e4 --- /dev/null +++ b/tests/compiler/gc.untouched.wat @@ -0,0 +1,1349 @@ +(module + (type $FUNCSIG$v (func)) + (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$vi (func (param i32))) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 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" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 96) "\02\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00t\00s\00") + (data (i32.const 128) "\02\00\00\00&\00\00\00\00\00\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 184) "\02\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00l\00i\00n\00k\00") + (data (i32.const 216) "\02\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00u\00n\00l\00i\00n\00k\00") + (data (i32.const 256) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00c\00o\00l\00l\00e\00c\00t\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_count (mut i32) (i32.const 0)) + (global $gc/_dummy/link_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_parentRef (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_count (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_parentRef (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/gc/gc.implemented i32 (i32.const 1)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $~lib/gc/GC_ROOT (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 292)) + (global $~lib/capabilities i32 (i32.const 2)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (export "main" (func $gc/main)) + (export "gc.implemented" (global $~lib/gc/gc.implemented)) + (export "gc.collect" (func $~lib/gc/gc.collect)) + (export "gc.retain" (func $~lib/gc/gc.retain)) + (export "gc.release" (func $~lib/gc/gc.release)) + (export ".capabilities" (global $~lib/capabilities)) + (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if + local.get $4 + local.get $1 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select + local.set $3 + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $2 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate + return + ) + (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/ADJUSTOBLOCK + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + ) + (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 72 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/_dummy/register_count + local.get $0 + global.set $gc/_dummy/register_ref + ) + (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 149 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 151 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $gc/_dummy/__ref_register + local.get $0 + ) + (func $gc/Ref#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/runtime/allocate + i32.const 1 + call $~lib/runtime/register + local.set $0 + end + local.get $0 + ) + (func $~lib/memory/memory.fill (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 1 + i32.add + local.get $1 + i32.store8 + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $4 + local.get $0 + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 12 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 24 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 20 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.get $4 + i32.store + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + i32.sub + local.set $2 + local.get $4 + i64.extend_i32_u + local.get $4 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $6 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $6 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $6 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + end + br $continue|0 + end + end + end + end + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH + i32.gt_u + if + i32.const 0 + i32.const 144 + i32.const 25 + i32.const 43 + call $~lib/env/abort + unreachable + end + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/runtime/allocate + end + local.set $3 + local.get $3 + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + block $~lib/runtime/REGISTER<~lib/arraybuffer/ArrayBuffer>|inlined.0 (result i32) + local.get $3 + local.set $2 + local.get $2 + i32.const 4 + call $~lib/runtime/register + end + ) + (func $gc/_dummy/__ref_link (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 200 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/_dummy/link_count + i32.const 1 + i32.add + global.set $gc/_dummy/link_count + local.get $0 + global.set $gc/_dummy/link_ref + local.get $0 + global.set $gc/_dummy/link_parentRef + ) + (func $gc/_dummy/__ref_unlink (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 232 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/_dummy/unlink_count + i32.const 1 + i32.add + global.set $gc/_dummy/unlink_count + local.get $0 + global.set $gc/_dummy/unlink_ref + local.get $1 + global.set $gc/_dummy/unlink_parentRef + ) + (func $~lib/set/Set#clear (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + local.tee $1 + i32.const 0 + i32.const 16 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $gc/_dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $gc/_dummy/__ref_link + local.get $2 + else + local.get $2 + end + i32.store + local.get $0 + i32.const 4 + i32.const 1 + i32.sub + i32.store offset=4 + local.get $0 + local.tee $1 + i32.const 0 + i32.const 32 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $gc/_dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $gc/_dummy/__ref_link + local.get $3 + else + local.get $3 + end + i32.store offset=8 + local.get $0 + i32.const 4 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + ) + (func $~lib/set/Set#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + block (result i32) + local.get $0 + i32.eqz + if + i32.const 24 + call $~lib/runtime/allocate + i32.const 3 + call $~lib/runtime/register + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + end + call $~lib/set/Set#clear + local.get $0 + ) + (func $~lib/util/hash/hash32 (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const -2128831035 + local.set $1 + local.get $1 + local.get $0 + i32.const 255 + i32.and + i32.xor + i32.const 16777619 + i32.mul + local.set $1 + local.get $1 + local.get $0 + i32.const 8 + i32.shr_u + i32.const 255 + i32.and + i32.xor + i32.const 16777619 + i32.mul + local.set $1 + local.get $1 + local.get $0 + i32.const 16 + i32.shr_u + i32.const 255 + i32.and + i32.xor + i32.const 16777619 + i32.mul + local.set $1 + local.get $1 + local.get $0 + i32.const 24 + i32.shr_u + i32.xor + i32.const 16777619 + i32.mul + local.set $1 + local.get $1 + ) + (func $~lib/set/Set#find (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i32.load offset=4 + i32.and + i32.const 4 + i32.mul + i32.add + i32.load + local.set $3 + block $break|0 + loop $continue|0 + local.get $3 + if + block + local.get $3 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + local.tee $4 + if (result i32) + local.get $3 + i32.load + local.get $1 + i32.eq + else + local.get $4 + end + if + local.get $3 + return + end + local.get $3 + i32.load offset=4 + i32.const 1 + i32.const -1 + i32.xor + i32.and + local.set $3 + end + br $continue|0 + end + end + end + i32.const 0 + ) + (func $~lib/set/Set#has (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 + end + call $~lib/set/Set#find + i32.const 0 + i32.ne + ) + (func $~lib/set/Set#rehash (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + local.get $1 + i32.const 1 + i32.add + local.set $2 + i32.const 0 + local.get $2 + i32.const 4 + i32.mul + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $3 + local.get $2 + f64.convert_i32_s + f64.const 2.6666666666666665 + f64.mul + i32.trunc_f64_s + local.set $4 + i32.const 0 + local.get $4 + block $~lib/set/ENTRY_SIZE|inlined.1 (result i32) + i32.const 8 + end + i32.mul + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $5 + local.get $0 + i32.load offset=8 + local.set $6 + local.get $6 + local.get $0 + i32.load offset=16 + block $~lib/set/ENTRY_SIZE|inlined.2 (result i32) + i32.const 8 + end + i32.mul + i32.add + local.set $7 + local.get $5 + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $7 + i32.ne + if + block + local.get $6 + local.set $9 + local.get $9 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $8 + local.set $10 + local.get $10 + local.get $9 + i32.load + i32.store + block $~lib/util/hash/HASH|inlined.2 (result i32) + local.get $9 + i32.load + local.set $11 + local.get $11 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 + end + local.get $1 + i32.and + local.set $11 + local.get $3 + local.get $11 + i32.const 4 + i32.mul + i32.add + local.set $12 + local.get $10 + local.get $12 + i32.load + i32.store offset=4 + local.get $12 + local.get $8 + i32.store + local.get $8 + block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) + i32.const 8 + end + i32.add + local.set $8 + end + local.get $6 + block $~lib/set/ENTRY_SIZE|inlined.4 (result i32) + i32.const 8 + end + i32.add + local.set $6 + end + br $continue|0 + end + end + end + local.get $0 + local.tee $9 + local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $gc/_dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $gc/_dummy/__ref_link + local.get $12 + else + local.get $12 + end + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.tee $9 + local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $gc/_dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $gc/_dummy/__ref_link + local.get $11 + else + local.get $11 + end + i32.store offset=8 + local.get $0 + local.get $4 + i32.store offset=12 + local.get $0 + local.get $0 + i32.load offset=20 + i32.store offset=16 + ) + (func $~lib/set/Set#add (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 + local.get $0 + local.get $1 + local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 + i32.eqz + if + local.get $0 + i32.load offset=16 + local.get $0 + i32.load offset=12 + i32.eq + if + local.get $0 + local.get $0 + i32.load offset=20 + local.get $0 + i32.load offset=12 + f64.convert_i32_s + f64.const 0.75 + f64.mul + i32.trunc_f64_s + i32.lt_s + if (result i32) + local.get $0 + i32.load offset=4 + else + local.get $0 + i32.load offset=4 + i32.const 1 + i32.shl + i32.const 1 + i32.or + end + call $~lib/set/Set#rehash + end + local.get $0 + i32.load offset=8 + local.set $2 + local.get $2 + block (result i32) + local.get $0 + local.get $0 + i32.load offset=16 + local.tee $5 + i32.const 1 + i32.add + i32.store offset=16 + local.get $5 + end + block $~lib/set/ENTRY_SIZE|inlined.5 (result i32) + i32.const 8 + end + i32.mul + i32.add + local.set $4 + local.get $4 + local.get $1 + i32.store + local.get $0 + local.get $0 + i32.load offset=20 + i32.const 1 + i32.add + i32.store offset=20 + local.get $0 + i32.load + local.get $3 + local.get $0 + i32.load offset=4 + i32.and + i32.const 4 + i32.mul + i32.add + local.set $5 + local.get $4 + local.get $5 + i32.load + i32.store offset=4 + local.get $5 + local.get $4 + i32.store + end + ) + (func $~lib/gc/gc.retain (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + global.get $~lib/gc/GC_ROOT + local.set $1 + local.get $1 + local.get $0 + call $~lib/set/Set#has + i32.eqz + if + local.get $1 + local.get $0 + call $~lib/set/Set#add + local.get $0 + local.get $1 + call $gc/_dummy/__ref_link + end + ) + (func $~lib/set/Set#delete (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + local.get $1 + block $~lib/util/hash/HASH|inlined.3 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 + end + call $~lib/set/Set#find + local.set $3 + local.get $3 + i32.eqz + if + i32.const 0 + return + end + local.get $3 + local.get $3 + i32.load offset=4 + i32.const 1 + i32.or + i32.store offset=4 + local.get $0 + local.get $0 + i32.load offset=20 + i32.const 1 + i32.sub + i32.store offset=20 + local.get $0 + i32.load offset=4 + i32.const 1 + i32.shr_u + local.set $4 + local.get $4 + i32.const 1 + i32.add + i32.const 4 + local.tee $2 + local.get $0 + i32.load offset=20 + local.tee $5 + local.get $2 + local.get $5 + i32.gt_u + select + i32.ge_u + local.tee $2 + if (result i32) + local.get $0 + i32.load offset=20 + local.get $0 + i32.load offset=12 + f64.convert_i32_s + f64.const 0.75 + f64.mul + i32.trunc_f64_s + i32.lt_s + else + local.get $2 + end + if + local.get $0 + local.get $4 + call $~lib/set/Set#rehash + end + i32.const 1 + ) + (func $~lib/gc/gc.release (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + global.get $~lib/gc/GC_ROOT + local.set $1 + local.get $1 + local.get $0 + call $~lib/set/Set#has + if + local.get $1 + local.get $0 + call $~lib/set/Set#delete + drop + local.get $0 + local.get $1 + call $gc/_dummy/__ref_unlink + end + ) + (func $gc/_dummy/__ref_collect (; 23 ;) (type $FUNCSIG$v) + i32.const 272 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/_dummy/collect_count + i32.const 1 + i32.add + global.set $gc/_dummy/collect_count + ) + (func $~lib/gc/gc.collect (; 24 ;) (type $FUNCSIG$v) + call $gc/_dummy/__ref_collect + ) + (func $gc/main (; 25 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started + end + i32.const 0 + call $gc/Ref#constructor + local.set $0 + global.get $~lib/gc/gc.implemented + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 10 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/link_count + local.set $1 + global.get $gc/_dummy/unlink_count + local.set $2 + global.get $gc/_dummy/collect_count + local.set $3 + local.get $0 + call $~lib/gc/gc.retain + global.get $gc/_dummy/link_count + local.get $1 + i32.const 1 + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 18 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/unlink_count + local.get $2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 19 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/collect_count + local.get $3 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 20 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/link_count + local.set $1 + global.get $gc/_dummy/unlink_count + local.set $2 + global.get $gc/_dummy/collect_count + local.set $3 + local.get $0 + call $~lib/gc/gc.release + global.get $gc/_dummy/link_count + local.get $1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 27 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/unlink_count + local.get $2 + i32.const 1 + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 28 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/collect_count + local.get $3 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 29 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/link_count + local.set $1 + global.get $gc/_dummy/unlink_count + local.set $2 + global.get $gc/_dummy/collect_count + local.set $3 + call $~lib/gc/gc.collect + global.get $gc/_dummy/link_count + local.get $1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 36 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/unlink_count + local.get $2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 37 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/collect_count + local.get $3 + i32.const 1 + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 38 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $start (; 26 ;) (type $FUNCSIG$v) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + i32.const 0 + call $~lib/set/Set#constructor + global.set $~lib/gc/GC_ROOT + ) + (func $null (; 27 ;) (type $FUNCSIG$v) + ) +) From 01fad52984d9abb4ddf1858600fa5cddc7a88165 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 29 Mar 2019 11:23:40 +0100 Subject: [PATCH 072/119] fix allocator tests --- tests/allocators/arena/optimized.wat | 451 ++++++----------- tests/allocators/arena/untouched.wat | 168 ++++--- tests/allocators/buddy/assembly/buddy.ts | 4 +- tests/allocators/buddy/optimized.wat | 520 +++++++------------ tests/allocators/buddy/untouched.wat | 38 +- tests/allocators/index.js | 11 +- tests/allocators/tlsf/optimized.wat | 614 +++++++++-------------- tests/allocators/tlsf/untouched.wat | 434 ++++++++-------- 8 files changed, 952 insertions(+), 1288 deletions(-) diff --git a/tests/allocators/arena/optimized.wat b/tests/allocators/arena/optimized.wat index b4b341e5d9..96023e270b 100644 --- a/tests/allocators/arena/optimized.wat +++ b/tests/allocators/arena/optimized.wat @@ -5,13 +5,17 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (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\1c\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/memory/memory.implemented i32 (i32.const 1)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) + (export "memory.implemented" (global $~lib/memory/memory.implemented)) (export "memory.copy" (func $~lib/memory/memory.copy)) (export "memory.init" (func $~lib/memory/memory.init)) (export "memory.drop" (func $~lib/memory/memory.drop)) @@ -21,13 +25,23 @@ (export "memory.repeat" (func $~lib/memory/memory.repeat)) (export "memory.compare" (func $~lib/memory/memory.compare)) (start $start) - (func $~lib/memory/memory.init (; 0 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.init (; 1 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + i32.const 0 + i32.const 16 + i32.const 46 + i32.const 4 + call $~lib/env/abort unreachable ) - (func $~lib/memory/memory.drop (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.drop (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 0 + i32.const 16 + i32.const 53 + i32.const 4 + call $~lib/env/abort unreachable ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -38,8 +52,6 @@ if unreachable end - global.get $~lib/allocator/arena/offset - local.tee $2 local.get $0 i32.const 1 local.tee $1 @@ -47,21 +59,23 @@ local.get $1 i32.gt_u select + global.get $~lib/allocator/arena/offset + local.tee $0 i32.add i32.const 7 i32.add i32.const -8 i32.and - local.tee $0 - current_memory local.tee $1 + current_memory + local.tee $2 i32.const 16 i32.shl i32.gt_u if + local.get $2 local.get $1 local.get $0 - local.get $2 i32.sub i32.const 65535 i32.add @@ -71,7 +85,7 @@ i32.shr_u local.tee $3 local.tee $4 - local.get $1 + local.get $2 local.get $4 i32.gt_s select @@ -88,20 +102,25 @@ end end end - local.get $0 + local.get $1 global.set $~lib/allocator/arena/offset - local.get $2 + local.get $0 + ) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate ) - (func $~lib/memory/memory.free (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.reset (; 4 ;) (type $FUNCSIG$v) + (func $~lib/memory/memory.reset (; 6 ;) (type $FUNCSIG$v) global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $~lib/util/memory/memcpy (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) loop $continue|0 local.get $1 i32.const 3 @@ -250,14 +269,8 @@ i32.and if local.get $0 - local.set $3 - local.get $3 - block (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 end return @@ -281,52 +294,40 @@ i32.load local.set $4 local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 - local.tee $3 i32.const 1 i32.add - local.set $0 - local.get $3 + local.tee $0 + i32.const 1 + i32.add + local.set $3 + local.get $0 block (result i32) local.get $1 - local.tee $3 i32.const 1 i32.add - local.set $1 - local.get $3 + local.tee $0 + i32.const 1 + i32.add + local.set $5 + local.get $0 i32.load8_u end i32.store8 - local.get $0 - local.tee $3 + local.get $3 i32.const 1 i32.add local.set $0 + local.get $5 + i32.const 1 + i32.add + local.set $1 local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $5 + i32.load8_u i32.store8 local.get $2 i32.const 3 @@ -416,22 +417,12 @@ i32.load local.set $4 local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -439,6 +430,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -639,38 +632,12 @@ i32.and if local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 - local.tee $3 i32.const 1 i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 local.tee $3 i32.const 1 i32.add @@ -678,22 +645,8 @@ local.get $3 block (result i32) local.get $1 - local.tee $3 i32.const 1 i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 local.tee $3 i32.const 1 i32.add @@ -703,38 +656,12 @@ end i32.store8 local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 - local.tee $3 i32.const 1 i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 local.tee $3 i32.const 1 i32.add @@ -742,22 +669,8 @@ local.get $3 block (result i32) local.get $1 - local.tee $3 i32.const 1 i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 local.tee $3 i32.const 1 i32.add @@ -767,38 +680,12 @@ end i32.store8 local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 - local.tee $3 i32.const 1 i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 local.tee $3 i32.const 1 i32.add @@ -806,6 +693,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -815,6 +704,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -822,6 +717,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -831,6 +728,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -838,6 +741,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -847,6 +752,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -854,6 +765,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -863,6 +776,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -870,6 +789,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -879,6 +800,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -886,6 +813,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -900,38 +829,12 @@ i32.and if local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 - local.tee $3 i32.const 1 i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 local.tee $3 i32.const 1 i32.add @@ -939,22 +842,8 @@ local.get $3 block (result i32) local.get $1 - local.tee $3 i32.const 1 i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 local.tee $3 i32.const 1 i32.add @@ -964,22 +853,12 @@ end i32.store8 local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -987,6 +866,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -996,6 +877,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1003,6 +890,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1012,6 +901,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1019,6 +914,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1033,38 +930,12 @@ i32.and if local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 - local.tee $3 i32.const 1 i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 local.tee $3 i32.const 1 i32.add @@ -1072,6 +943,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1081,6 +954,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1088,6 +967,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1102,22 +983,12 @@ i32.and if local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1125,6 +996,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1139,18 +1012,12 @@ i32.and if local.get $0 - local.set $3 - local.get $3 - block (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 end ) - (func $~lib/memory/memory.copy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 @@ -1346,7 +1213,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 7 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 9 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $2 local.get $3 @@ -1371,7 +1238,7 @@ end end ) - (func $~lib/memory/memory.compare (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.compare (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -1421,13 +1288,13 @@ end end ) - (func $start (; 9 ;) (type $FUNCSIG$v) - i32.const 8 + (func $start (; 11 ;) (type $FUNCSIG$v) + i32.const 48 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 10 ;) (type $FUNCSIG$v) + (func $null (; 12 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/allocators/arena/untouched.wat b/tests/allocators/arena/untouched.wat index 47f9113ff6..bf627fb60e 100644 --- a/tests/allocators/arena/untouched.wat +++ b/tests/allocators/arena/untouched.wat @@ -5,14 +5,18 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (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\1c\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/memory/memory.implemented i32 (i32.const 1)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (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 "table" (table $0)) + (export "memory.implemented" (global $~lib/memory/memory.implemented)) (export "memory.copy" (func $~lib/memory/memory.copy)) (export "memory.init" (func $~lib/memory/memory.init)) (export "memory.drop" (func $~lib/memory/memory.drop)) @@ -22,107 +26,121 @@ (export "memory.repeat" (func $~lib/memory/memory.repeat)) (export "memory.compare" (func $~lib/memory/memory.compare)) (start $start) - (func $~lib/memory/memory.init (; 0 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.init (; 1 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + i32.const 0 + i32.const 16 + i32.const 46 + i32.const 4 + call $~lib/env/abort unreachable ) - (func $~lib/memory/memory.drop (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.drop (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 0 + i32.const 16 + i32.const 53 + i32.const 4 + call $~lib/env/abort unreachable ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/memory/memory.free (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) + (func $~lib/allocator/arena/__mem_free (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/memory/memory.free (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - local.set $1 + call $~lib/allocator/arena/__mem_free ) - (func $~lib/memory/memory.reset (; 4 ;) (type $FUNCSIG$v) + (func $~lib/allocator/arena/__mem_reset (; 7 ;) (type $FUNCSIG$v) global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $~lib/util/memory/memcpy (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.reset (; 8 ;) (type $FUNCSIG$v) + call $~lib/allocator/arena/__mem_reset + ) + (func $~lib/util/memory/memcpy (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1323,7 +1341,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1554,7 +1572,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 7 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 11 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) i32.const 0 @@ -1586,7 +1604,7 @@ end end ) - (func $~lib/memory/memory.compare (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.compare (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1651,7 +1669,7 @@ end end ) - (func $start (; 9 ;) (type $FUNCSIG$v) + (func $start (; 13 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -1663,6 +1681,6 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 10 ;) (type $FUNCSIG$v) + (func $null (; 14 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/allocators/buddy/assembly/buddy.ts b/tests/allocators/buddy/assembly/buddy.ts index 88c1a104e3..52cff567cc 100644 --- a/tests/allocators/buddy/assembly/buddy.ts +++ b/tests/allocators/buddy/assembly/buddy.ts @@ -335,7 +335,7 @@ function lower_bucket_limit(bucket: usize): u32 { // Memory allocator interface -@global export function __memory_allocate(request: usize): usize { +@global export function __mem_allocate(request: usize): usize { var original_bucket: usize, bucket: usize; /* @@ -469,7 +469,7 @@ function lower_bucket_limit(bucket: usize): u32 { return 0; } -@global export function __memory_free(ptr: usize): void { +@global export function __mem_free(ptr: usize): void { var bucket: usize, i: usize; /* diff --git a/tests/allocators/buddy/optimized.wat b/tests/allocators/buddy/optimized.wat index 4624ce8211..a0be6bb9ad 100644 --- a/tests/allocators/buddy/optimized.wat +++ b/tests/allocators/buddy/optimized.wat @@ -7,7 +7,9 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (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\1c\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $assembly/buddy/BUCKETS_START (mut i32) (i32.const 0)) @@ -17,8 +19,10 @@ (global $assembly/buddy/NODE_IS_SPLIT_END (mut i32) (i32.const 0)) (global $assembly/buddy/base_ptr (mut i32) (i32.const 0)) (global $assembly/buddy/max_ptr (mut i32) (i32.const 0)) + (global $~lib/memory/memory.implemented i32 (i32.const 1)) (export "memory" (memory $0)) (export "table" (table $0)) + (export "memory.implemented" (global $~lib/memory/memory.implemented)) (export "memory.copy" (func $~lib/memory/memory.copy)) (export "memory.init" (func $~lib/memory/memory.init)) (export "memory.drop" (func $~lib/memory/memory.drop)) @@ -28,13 +32,23 @@ (export "memory.repeat" (func $~lib/memory/memory.repeat)) (export "memory.compare" (func $~lib/memory/memory.compare)) (start $start) - (func $~lib/memory/memory.init (; 0 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.init (; 1 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + i32.const 0 + i32.const 16 + i32.const 46 + i32.const 4 + call $~lib/env/abort unreachable ) - (func $~lib/memory/memory.drop (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.drop (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 0 + i32.const 16 + i32.const 53 + i32.const 4 + call $~lib/env/abort unreachable ) - (func $assembly/buddy/update_max_ptr (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/buddy/update_max_ptr (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $assembly/buddy/max_ptr i32.gt_u @@ -63,14 +77,14 @@ end i32.const 1 ) - (func $assembly/buddy/buckets$get (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/buddy/buckets$get (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) global.get $assembly/buddy/BUCKETS_START local.get $0 i32.const 3 i32.shl i32.add ) - (func $assembly/buddy/list_init (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/buddy/list_init (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.store @@ -78,7 +92,7 @@ local.get $0 i32.store offset=4 ) - (func $assembly/buddy/list_push (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/buddy/list_push (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 local.get $0 @@ -95,7 +109,7 @@ local.get $1 i32.store ) - (func $assembly/buddy/bucket_for_request (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/buddy/bucket_for_request (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 26 @@ -120,7 +134,7 @@ end local.get $1 ) - (func $assembly/buddy/node_for_ptr (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $assembly/buddy/node_for_ptr (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 1 local.get $1 i32.shl @@ -135,13 +149,13 @@ i32.const 1 i32.sub ) - (func $assembly/buddy/node_is_split$get (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/buddy/node_is_split$get (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) global.get $assembly/buddy/NODE_IS_SPLIT_START local.get $0 i32.add i32.load8_u ) - (func $assembly/buddy/parent_is_split (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/buddy/parent_is_split (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1 i32.sub @@ -160,7 +174,7 @@ i32.const 1 i32.eq ) - (func $assembly/buddy/list_remove (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/buddy/list_remove (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load @@ -173,7 +187,7 @@ local.get $1 i32.store ) - (func $assembly/buddy/ptr_for_node (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $assembly/buddy/ptr_for_node (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) global.get $assembly/buddy/base_ptr local.get $0 i32.const 1 @@ -188,7 +202,7 @@ i32.shl i32.add ) - (func $assembly/buddy/flip_parent_is_split (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/buddy/flip_parent_is_split (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -216,7 +230,7 @@ local.get $0 i32.store8 ) - (func $assembly/buddy/lower_bucket_limit (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/buddy/lower_bucket_limit (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) loop $continue|0 @@ -227,7 +241,7 @@ global.get $assembly/buddy/base_ptr global.get $assembly/buddy/bucket_limit call $assembly/buddy/node_for_ptr - local.tee $2 + local.tee $1 call $assembly/buddy/parent_is_split i32.eqz if @@ -249,12 +263,12 @@ call $assembly/buddy/list_push br $continue|0 end - local.get $2 + local.get $1 i32.const 1 i32.add global.get $assembly/buddy/bucket_limit call $assembly/buddy/ptr_for_node - local.tee $1 + local.tee $2 i32.const 8 i32.add call $assembly/buddy/update_max_ptr @@ -265,26 +279,26 @@ end global.get $assembly/buddy/bucket_limit call $assembly/buddy/buckets$get - local.get $1 + local.get $2 call $assembly/buddy/list_push block (result i32) global.get $assembly/buddy/bucket_limit i32.const 1 i32.sub - local.tee $1 + local.tee $2 global.set $assembly/buddy/bucket_limit - local.get $1 + local.get $2 end call $assembly/buddy/buckets$get call $assembly/buddy/list_init - local.get $2 + local.get $1 i32.const 1 i32.sub i32.const 2 i32.div_u - local.tee $2 + local.tee $1 if - local.get $2 + local.get $1 call $assembly/buddy/flip_parent_is_split end br $continue|0 @@ -292,7 +306,7 @@ end i32.const 1 ) - (func $assembly/buddy/list_pop (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/buddy/list_pop (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 local.get $0 i32.load @@ -306,7 +320,7 @@ call $assembly/buddy/list_remove local.get $0 ) - (func $assembly/buddy/__memory_allocate (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/buddy/__mem_allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -479,11 +493,11 @@ end i32.const 0 ) - (func $~lib/memory/memory.allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $assembly/buddy/__memory_allocate + call $assembly/buddy/__mem_allocate ) - (func $assembly/buddy/__memory_free (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/buddy/__mem_free (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -494,74 +508,80 @@ local.get $0 i32.const 8 i32.sub - local.tee $0 + local.tee $1 i32.load i32.const 8 i32.add call $assembly/buddy/bucket_for_request - local.set $1 - local.get $0 + local.set $0 local.get $1 + local.get $0 call $assembly/buddy/node_for_ptr - local.set $0 + local.set $1 loop $continue|0 - local.get $0 + local.get $1 if block $break|0 - local.get $0 + local.get $1 call $assembly/buddy/flip_parent_is_split - local.get $0 + local.get $1 call $assembly/buddy/parent_is_split local.tee $2 if (result i32) local.get $2 else - local.get $1 + local.get $0 global.get $assembly/buddy/bucket_limit i32.eq end br_if $break|0 - local.get $0 + local.get $1 i32.const 1 i32.sub i32.const 1 i32.xor i32.const 1 i32.add - local.get $1 + local.get $0 call $assembly/buddy/ptr_for_node call $assembly/buddy/list_remove - local.get $0 + local.get $1 i32.const 1 i32.sub i32.const 2 i32.div_u - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $continue|0 end end end - local.get $1 - call $assembly/buddy/buckets$get local.get $0 + call $assembly/buddy/buckets$get local.get $1 + local.get $0 call $assembly/buddy/ptr_for_node call $assembly/buddy/list_push ) - (func $~lib/memory/memory.free (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $assembly/buddy/__memory_free + call $assembly/buddy/__mem_free ) - (func $~lib/memory/memory.reset (; 19 ;) (type $FUNCSIG$v) + (func $~lib/memory/memory.reset (; 20 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 16 + i32.const 77 + i32.const 9 + call $~lib/env/abort unreachable ) - (func $~lib/util/memory/memcpy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) loop $continue|0 local.get $1 i32.const 3 @@ -710,14 +730,8 @@ i32.and if local.get $0 - local.set $3 - local.get $3 - block (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 end return @@ -741,52 +755,40 @@ i32.load local.set $4 local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 - local.tee $3 i32.const 1 i32.add - local.set $0 - local.get $3 + local.tee $0 + i32.const 1 + i32.add + local.set $3 + local.get $0 block (result i32) local.get $1 - local.tee $3 i32.const 1 i32.add - local.set $1 - local.get $3 + local.tee $0 + i32.const 1 + i32.add + local.set $5 + local.get $0 i32.load8_u end i32.store8 - local.get $0 - local.tee $3 + local.get $3 i32.const 1 i32.add local.set $0 + local.get $5 + i32.const 1 + i32.add + local.set $1 local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $5 + i32.load8_u i32.store8 local.get $2 i32.const 3 @@ -876,22 +878,12 @@ i32.load local.set $4 local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -899,6 +891,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1099,38 +1093,12 @@ i32.and if local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 - local.tee $3 i32.const 1 i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 local.tee $3 i32.const 1 i32.add @@ -1138,22 +1106,8 @@ local.get $3 block (result i32) local.get $1 - local.tee $3 i32.const 1 i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 local.tee $3 i32.const 1 i32.add @@ -1163,38 +1117,12 @@ end i32.store8 local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 - local.tee $3 i32.const 1 i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 local.tee $3 i32.const 1 i32.add @@ -1202,22 +1130,8 @@ local.get $3 block (result i32) local.get $1 - local.tee $3 i32.const 1 i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 local.tee $3 i32.const 1 i32.add @@ -1227,38 +1141,12 @@ end i32.store8 local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 - local.tee $3 i32.const 1 i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 local.tee $3 i32.const 1 i32.add @@ -1266,6 +1154,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1275,6 +1165,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1282,6 +1178,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1291,6 +1189,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1298,6 +1202,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1307,6 +1213,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1314,6 +1226,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1323,6 +1237,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1330,6 +1250,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1339,6 +1261,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1346,6 +1274,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1360,38 +1290,12 @@ i32.and if local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 - local.tee $3 i32.const 1 i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 local.tee $3 i32.const 1 i32.add @@ -1399,22 +1303,8 @@ local.get $3 block (result i32) local.get $1 - local.tee $3 i32.const 1 i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 local.tee $3 i32.const 1 i32.add @@ -1424,22 +1314,12 @@ end i32.store8 local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1447,6 +1327,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1456,6 +1338,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1463,6 +1351,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1472,6 +1362,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1479,6 +1375,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1493,38 +1391,12 @@ i32.and if local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 - local.tee $3 i32.const 1 i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 local.tee $3 i32.const 1 i32.add @@ -1532,6 +1404,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1541,6 +1415,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1548,6 +1428,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1562,22 +1444,12 @@ i32.and if local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1585,6 +1457,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1599,18 +1473,12 @@ i32.and if local.get $0 - local.set $3 - local.get $3 - block (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 end ) - (func $~lib/memory/memory.copy (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 @@ -1806,7 +1674,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 22 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 23 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $2 local.get $3 @@ -1831,7 +1699,7 @@ end end ) - (func $~lib/memory/memory.compare (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.compare (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -1881,8 +1749,8 @@ end end ) - (func $start (; 24 ;) (type $FUNCSIG$v) - i32.const 8 + (func $start (; 25 ;) (type $FUNCSIG$v) + i32.const 44 global.set $assembly/buddy/BUCKETS_START global.get $assembly/buddy/BUCKETS_START i32.const 216 @@ -1895,7 +1763,7 @@ i32.add global.set $assembly/buddy/NODE_IS_SPLIT_END ) - (func $null (; 25 ;) (type $FUNCSIG$v) + (func $null (; 26 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/allocators/buddy/untouched.wat b/tests/allocators/buddy/untouched.wat index 5f8c771ffb..1d9e0dff66 100644 --- a/tests/allocators/buddy/untouched.wat +++ b/tests/allocators/buddy/untouched.wat @@ -9,7 +9,8 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\"\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00b\00u\00d\00d\00y\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") + (data (i32.const 48) "\01\00\00\00\"\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00b\00u\00d\00d\00y\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $assembly/buddy/HEADER_SIZE i32 (i32.const 8)) @@ -27,9 +28,11 @@ (global $assembly/buddy/NODE_IS_SPLIT_END (mut i32) (i32.const 0)) (global $assembly/buddy/base_ptr (mut i32) (i32.const 0)) (global $assembly/buddy/max_ptr (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 52)) + (global $~lib/memory/memory.implemented i32 (i32.const 1)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 92)) (export "memory" (memory $0)) (export "table" (table $0)) + (export "memory.implemented" (global $~lib/memory/memory.implemented)) (export "memory.copy" (func $~lib/memory/memory.copy)) (export "memory.init" (func $~lib/memory/memory.init)) (export "memory.drop" (func $~lib/memory/memory.drop)) @@ -61,9 +64,19 @@ call $start:assembly/buddy ) (func $~lib/memory/memory.init (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + i32.const 0 + i32.const 16 + i32.const 46 + i32.const 4 + call $~lib/env/abort unreachable ) (func $~lib/memory/memory.drop (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 0 + i32.const 16 + i32.const 53 + i32.const 4 + call $~lib/env/abort unreachable ) (func $assembly/buddy/update_max_ptr (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -91,7 +104,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 176 i32.const 4 call $~lib/env/abort @@ -121,7 +134,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 96 i32.const 2 call $~lib/env/abort @@ -212,7 +225,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 142 i32.const 2 call $~lib/env/abort @@ -281,7 +294,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 56 i32.const 147 i32.const 2 call $~lib/env/abort @@ -418,7 +431,7 @@ call $assembly/buddy/list_remove local.get $1 ) - (func $assembly/buddy/__memory_allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/buddy/__mem_allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -625,10 +638,10 @@ ) (func $~lib/memory/memory.allocate (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $assembly/buddy/__memory_allocate + call $assembly/buddy/__mem_allocate return ) - (func $assembly/buddy/__memory_free (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/buddy/__mem_free (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -707,9 +720,14 @@ ) (func $~lib/memory/memory.free (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $assembly/buddy/__memory_free + call $assembly/buddy/__mem_free ) (func $~lib/memory/memory.reset (; 23 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 16 + i32.const 77 + i32.const 9 + call $~lib/env/abort unreachable ) (func $~lib/util/memory/memcpy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) diff --git a/tests/allocators/index.js b/tests/allocators/index.js index f87bd13ed6..754ec8ff34 100644 --- a/tests/allocators/index.js +++ b/tests/allocators/index.js @@ -14,10 +14,15 @@ function test(file) { } }).exports; + const RUNTIME_HEADER_SIZE = exports[".capabilities"] & 2 ? 16 : 8; + function getString(ptr) { - var len = new Uint32Array(exports.memory.buffer, ptr)[0]; - var str = new Uint16Array(exports.memory.buffer, ptr + 4).subarray(0, len); - return String.fromCharCode.apply(String, str); + if (!ptr) return "null"; + var U32 = new Uint32Array(exports.memory.buffer); + var U16 = new Uint16Array(exports.memory.buffer); + var len16 = U32[(ptr - RUNTIME_HEADER_SIZE + 4) >>> 2] >>> 1; + var ptr16 = ptr >>> 1; + return String.fromCharCode.apply(String, U16.subarray(ptr16, ptr16 + len16)); } require("./runner")(exports, 20, 20000); diff --git a/tests/allocators/tlsf/optimized.wat b/tests/allocators/tlsf/optimized.wat index edc38303d9..f37b5d8d57 100644 --- a/tests/allocators/tlsf/optimized.wat +++ b/tests/allocators/tlsf/optimized.wat @@ -7,12 +7,16 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (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\1c\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/memory/memory.implemented i32 (i32.const 1)) (export "memory" (memory $0)) (export "table" (table $0)) + (export "memory.implemented" (global $~lib/memory/memory.implemented)) (export "memory.copy" (func $~lib/memory/memory.copy)) (export "memory.init" (func $~lib/memory/memory.init)) (export "memory.drop" (func $~lib/memory/memory.drop)) @@ -21,18 +25,28 @@ (export "memory.reset" (func $~lib/memory/memory.reset)) (export "memory.repeat" (func $~lib/memory/memory.repeat)) (export "memory.compare" (func $~lib/memory/memory.compare)) - (func $~lib/memory/memory.init (; 0 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.init (; 1 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + i32.const 0 + i32.const 16 + i32.const 46 + i32.const 4 + call $~lib/env/abort unreachable ) - (func $~lib/memory/memory.drop (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.drop (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 0 + i32.const 16 + i32.const 53 + i32.const 4 + call $~lib/env/abort unreachable ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 2912 local.get $0 i32.store ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 2 @@ -41,7 +55,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 4 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 5 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $1 i32.const 5 @@ -54,7 +68,7 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Block#get:right (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.add @@ -64,13 +78,13 @@ i32.and i32.add ) - (func $~lib/allocator/tlsf/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 31 local.get $0 i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 5 @@ -82,7 +96,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.const 2 @@ -90,7 +104,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -186,7 +200,7 @@ end end ) - (func $~lib/allocator/tlsf/Root#insert (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -196,18 +210,18 @@ local.set $2 local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $4 + local.tee $3 i32.load - local.tee $5 + local.tee $4 i32.const 1 i32.and if local.get $0 - local.get $4 + local.get $3 call $~lib/allocator/tlsf/Root#remove local.get $1 local.get $2 - local.get $5 + local.get $4 i32.const -4 i32.and i32.const 8 @@ -217,9 +231,9 @@ i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $4 + local.tee $3 i32.load - local.set $5 + local.set $4 end local.get $2 i32.const 2 @@ -231,29 +245,27 @@ i32.load local.tee $1 i32.load - local.set $3 + local.set $5 local.get $0 local.get $1 call $~lib/allocator/tlsf/Root#remove local.get $1 - local.get $3 + local.get $5 local.get $2 i32.const -4 i32.and i32.const 8 i32.add i32.add - local.tee $3 + local.tee $2 i32.store - local.get $3 - local.set $2 end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -262,32 +274,32 @@ local.get $2 i32.const -4 i32.and - local.tee $3 + local.tee $2 i32.const 256 i32.lt_u if (result i32) - local.get $3 + local.get $2 i32.const 8 i32.div_u - local.set $3 + local.set $2 i32.const 0 else - local.get $3 - local.get $3 + local.get $2 + local.get $2 call $~lib/allocator/tlsf/fls - local.tee $2 + local.tee $3 i32.const 5 i32.sub i32.shr_u i32.const 32 i32.xor - local.set $3 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end - local.tee $2 - local.get $3 + local.tee $3 + local.get $2 call $~lib/allocator/tlsf/Root#getHead local.set $4 local.get $1 @@ -303,30 +315,30 @@ i32.store offset=4 end local.get $0 - local.get $2 local.get $3 + local.get $2 local.get $1 call $~lib/allocator/tlsf/Root#setHead local.get $0 local.get $0 i32.load i32.const 1 - local.get $2 + local.get $3 i32.shl i32.or i32.store local.get $0 - local.get $2 + local.get $3 local.get $0 - local.get $2 + local.get $3 call $~lib/allocator/tlsf/Root#getSLMap i32.const 1 - local.get $3 + local.get $2 i32.shl i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $2 block (result i32) @@ -389,7 +401,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#insert ) - (func $~lib/allocator/tlsf/Root#search (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -457,12 +469,10 @@ local.get $0 local.get $1 i32.ctz - local.tee $2 - call $~lib/allocator/tlsf/Root#getSLMap - local.set $1 + local.tee $1 local.get $0 - local.get $2 local.get $1 + call $~lib/allocator/tlsf/Root#getSLMap i32.ctz call $~lib/allocator/tlsf/Root#getHead else @@ -470,7 +480,7 @@ end end ) - (func $~lib/allocator/tlsf/Root#use (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -518,8 +528,8 @@ i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.load i32.const -3 i32.and @@ -529,50 +539,48 @@ i32.const 8 i32.add ) - (func $~lib/memory/memory.allocate (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.set $3 global.get $~lib/allocator/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if - i32.const 8 - local.tee $5 + i32.const 48 + local.tee $4 i32.const 68451 i32.add i32.const -65536 i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 current_memory - local.tee $4 + local.tee $3 i32.gt_s - local.tee $2 + local.tee $1 if (result i32) - local.get $1 - local.get $4 + local.get $2 + local.get $3 i32.sub grow_memory i32.const 0 i32.lt_s else - local.get $2 + local.get $1 end if unreachable end - local.get $5 - local.tee $0 + local.get $4 + local.tee $1 global.set $~lib/allocator/tlsf/ROOT i32.const 0 call $~lib/allocator/tlsf/Root#set:tailRef - local.get $0 + local.get $1 i32.const 0 i32.store i32.const 0 @@ -583,27 +591,27 @@ i32.const 22 i32.ge_u br_if $break|0 - local.get $0 + local.get $1 local.get $2 i32.const 0 call $~lib/allocator/tlsf/Root#setSLMap i32.const 0 - local.set $1 + local.set $3 loop $repeat|1 block $break|1 - local.get $1 + local.get $3 i32.const 32 i32.ge_u br_if $break|1 - local.get $0 - local.get $2 local.get $1 + local.get $2 + local.get $3 i32.const 0 call $~lib/allocator/tlsf/Root#setHead - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $repeat|1 end end @@ -614,8 +622,8 @@ br $repeat|0 end end - local.get $0 - local.get $5 + local.get $1 + local.get $4 i32.const 2923 i32.add i32.const -8 @@ -625,53 +633,53 @@ i32.shl call $~lib/allocator/tlsf/Root#addMemory end - local.get $3 + local.get $0 i32.const 1073741824 i32.gt_u if unreachable end + local.get $1 + local.get $1 local.get $0 - local.get $0 - local.get $3 i32.const 7 i32.add i32.const -8 i32.and - local.tee $1 - i32.const 16 local.tee $4 - local.get $1 + i32.const 16 + local.tee $0 local.get $4 + local.get $0 i32.gt_u select - local.tee $3 + local.tee $5 call $~lib/allocator/tlsf/Root#search - local.tee $1 + local.tee $0 if (result i32) - local.get $1 + local.get $0 else current_memory - local.tee $4 local.tee $2 - local.get $3 + local.tee $3 + local.get $5 i32.const 65535 i32.add i32.const -65536 i32.and i32.const 16 i32.shr_u - local.tee $5 - local.tee $1 - local.get $2 - local.get $1 + local.tee $4 + local.tee $0 + local.get $3 + local.get $0 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $5 + local.get $4 grow_memory i32.const 0 i32.lt_s @@ -679,22 +687,26 @@ unreachable end end - local.get $0 - local.get $4 + local.get $1 + local.get $2 i32.const 16 i32.shl current_memory i32.const 16 i32.shl call $~lib/allocator/tlsf/Root#addMemory - local.get $0 - local.get $3 + local.get $1 + local.get $5 call $~lib/allocator/tlsf/Root#search end - local.get $3 + local.get $5 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/memory/memory.free (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_allocate + ) + (func $~lib/allocator/tlsf/__mem_free (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -719,12 +731,22 @@ end end ) - (func $~lib/memory/memory.reset (; 16 ;) (type $FUNCSIG$v) + (func $~lib/memory/memory.free (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/memory/memory.reset (; 19 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 16 + i32.const 77 + i32.const 9 + call $~lib/env/abort unreachable ) - (func $~lib/util/memory/memcpy (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) loop $continue|0 local.get $1 i32.const 3 @@ -873,14 +895,8 @@ i32.and if local.get $0 - local.set $3 - local.get $3 - block (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 end return @@ -904,52 +920,40 @@ i32.load local.set $4 local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 - local.tee $3 i32.const 1 i32.add - local.set $0 - local.get $3 + local.tee $0 + i32.const 1 + i32.add + local.set $3 + local.get $0 block (result i32) local.get $1 - local.tee $3 i32.const 1 i32.add - local.set $1 - local.get $3 + local.tee $0 + i32.const 1 + i32.add + local.set $5 + local.get $0 i32.load8_u end i32.store8 - local.get $0 - local.tee $3 + local.get $3 i32.const 1 i32.add local.set $0 + local.get $5 + i32.const 1 + i32.add + local.set $1 local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $5 + i32.load8_u i32.store8 local.get $2 i32.const 3 @@ -1039,22 +1043,12 @@ i32.load local.set $4 local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1062,6 +1056,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1262,6 +1258,12 @@ i32.and if local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1269,6 +1271,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1278,6 +1282,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1285,6 +1295,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1294,6 +1306,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1301,6 +1319,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1310,6 +1330,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1317,6 +1343,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1326,38 +1354,12 @@ end i32.store8 local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 - local.tee $3 i32.const 1 i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 local.tee $3 i32.const 1 i32.add @@ -1365,22 +1367,8 @@ local.get $3 block (result i32) local.get $1 - local.tee $3 i32.const 1 i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 local.tee $3 i32.const 1 i32.add @@ -1390,38 +1378,12 @@ end i32.store8 local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 - local.tee $3 i32.const 1 i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 local.tee $3 i32.const 1 i32.add @@ -1429,22 +1391,8 @@ local.get $3 block (result i32) local.get $1 - local.tee $3 i32.const 1 i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 local.tee $3 i32.const 1 i32.add @@ -1454,38 +1402,12 @@ end i32.store8 local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 - local.tee $3 i32.const 1 i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 local.tee $3 i32.const 1 i32.add @@ -1493,6 +1415,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1502,6 +1426,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1509,6 +1439,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1523,38 +1455,12 @@ i32.and if local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 - local.tee $3 i32.const 1 i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 local.tee $3 i32.const 1 i32.add @@ -1562,22 +1468,8 @@ local.get $3 block (result i32) local.get $1 - local.tee $3 i32.const 1 i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 local.tee $3 i32.const 1 i32.add @@ -1587,22 +1479,12 @@ end i32.store8 local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1610,6 +1492,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1619,6 +1503,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1626,6 +1516,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1635,6 +1527,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1642,6 +1540,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1656,38 +1556,12 @@ i32.and if local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 - local.tee $3 i32.const 1 i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 local.tee $3 i32.const 1 i32.add @@ -1695,6 +1569,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1704,6 +1580,12 @@ end i32.store8 local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1711,6 +1593,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1725,22 +1609,12 @@ i32.and if local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1748,6 +1622,8 @@ local.get $3 block (result i32) local.get $1 + i32.const 1 + i32.add local.tee $3 i32.const 1 i32.add @@ -1762,18 +1638,12 @@ i32.and if local.get $0 - local.set $3 - local.get $3 - block (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load8_u - end + local.get $1 + i32.load8_u i32.store8 end ) - (func $~lib/memory/memory.copy (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 @@ -1969,7 +1839,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 19 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 22 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $2 local.get $3 @@ -1994,7 +1864,7 @@ end end ) - (func $~lib/memory/memory.compare (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.compare (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -2044,7 +1914,7 @@ end end ) - (func $null (; 21 ;) (type $FUNCSIG$v) + (func $null (; 24 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/allocators/tlsf/untouched.wat b/tests/allocators/tlsf/untouched.wat index eefda93712..59c8b75b1d 100644 --- a/tests/allocators/tlsf/untouched.wat +++ b/tests/allocators/tlsf/untouched.wat @@ -10,6 +10,7 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00,\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 64) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) @@ -29,9 +30,11 @@ (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 60)) + (global $~lib/memory/memory.implemented i32 (i32.const 1)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 100)) (export "memory" (memory $0)) (export "table" (table $0)) + (export "memory.implemented" (global $~lib/memory/memory.implemented)) (export "memory.copy" (func $~lib/memory/memory.copy)) (export "memory.init" (func $~lib/memory/memory.init)) (export "memory.drop" (func $~lib/memory/memory.drop)) @@ -61,9 +64,19 @@ call $start:~lib/allocator/tlsf ) (func $~lib/memory/memory.init (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + i32.const 0 + i32.const 72 + i32.const 46 + i32.const 4 + call $~lib/env/abort unreachable ) (func $~lib/memory/memory.drop (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 0 + i32.const 72 + i32.const 53 + i32.const 4 + call $~lib/env/abort unreachable ) (func $~lib/allocator/tlsf/Root#set:tailRef (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) @@ -1190,7 +1203,7 @@ global.get $~lib/allocator/tlsf/Block.INFO i32.add ) - (func $~lib/memory/memory.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1198,261 +1211,257 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - block $~lib/allocator/tlsf/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - global.get $~lib/allocator/tlsf/ROOT + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + i32.eqz + if + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and local.set $2 + current_memory + local.set $3 local.get $2 - i32.eqz - if - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $3 - current_memory - local.set $4 - local.get $3 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $5 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $4 + local.get $4 + local.get $3 + i32.gt_s + local.tee $5 + if (result i32) local.get $4 - i32.gt_s - local.tee $6 - if (result i32) - local.get $5 - local.get $4 - i32.sub - grow_memory - i32.const 0 - i32.lt_s - else - local.get $6 - end - if - unreachable - end local.get $3 - local.tee $2 - global.set $~lib/allocator/tlsf/ROOT - local.get $2 + i32.sub + grow_memory i32.const 0 - call $~lib/allocator/tlsf/Root#set:tailRef - local.get $2 + i32.lt_s + else + local.get $5 + end + if + unreachable + end + local.get $2 + local.tee $1 + global.set $~lib/allocator/tlsf/ROOT + local.get $1 + i32.const 0 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $1 + i32.const 0 + i32.store + block $break|0 i32.const 0 - i32.store - block $break|0 - i32.const 0 - local.set $6 - loop $repeat|0 - local.get $6 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - br_if $break|0 - block - local.get $2 - local.get $6 + local.set $5 + loop $repeat|0 + local.get $5 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + br_if $break|0 + block + local.get $1 + local.get $5 + i32.const 0 + call $~lib/allocator/tlsf/Root#setSLMap + block $break|1 i32.const 0 - call $~lib/allocator/tlsf/Root#setSLMap - block $break|1 + local.set $6 + loop $repeat|1 + local.get $6 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + br_if $break|1 + local.get $1 + local.get $5 + local.get $6 i32.const 0 - local.set $7 - loop $repeat|1 - local.get $7 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u - i32.eqz - br_if $break|1 - local.get $2 - local.get $6 - local.get $7 - i32.const 0 - call $~lib/allocator/tlsf/Root#setHead - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $repeat|1 - unreachable - end + call $~lib/allocator/tlsf/Root#setHead + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $repeat|1 unreachable end + unreachable end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $repeat|0 - unreachable end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $repeat|0 unreachable end - local.get $2 - local.get $3 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - current_memory - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - drop - end - local.get $1 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.gt_u - if unreachable end local.get $1 + local.get $2 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add i32.const 7 i32.add i32.const 7 i32.const -1 i32.xor i32.and + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + end + local.get $0 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.gt_u + if + unreachable + end + local.get $0 + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.tee $4 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + local.tee $3 + local.get $4 + local.get $3 + i32.gt_u + select + local.set $0 + local.get $1 + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.set $7 + local.get $7 + i32.eqz + if + current_memory + local.set $4 + local.get $0 + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $3 + local.get $4 + local.tee $2 + local.get $3 local.tee $5 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - local.tee $4 + local.get $2 local.get $5 - local.get $4 - i32.gt_u + i32.gt_s select - local.set $1 + local.set $2 local.get $2 - local.get $1 - call $~lib/allocator/tlsf/Root#search - local.set $5 - local.get $5 - i32.eqz + grow_memory + i32.const 0 + i32.lt_s if - current_memory - local.set $4 - local.get $1 - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $3 - local.get $4 - local.tee $6 local.get $3 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - current_memory - local.set $7 - local.get $2 - local.get $4 - i32.const 16 - i32.shl - local.get $7 - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - drop - local.get $2 - local.get $1 - call $~lib/allocator/tlsf/Root#search - local.tee $8 - i32.eqz - if (result i32) - i32.const 0 - i32.const 16 - i32.const 472 - i32.const 12 - call $~lib/env/abort unreachable - else - local.get $8 end - local.set $5 end + current_memory + local.set $5 + local.get $1 + local.get $4 + i32.const 16 + i32.shl local.get $5 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop local.get $1 - i32.ge_u + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.tee $6 i32.eqz - if + if (result i32) i32.const 0 i32.const 16 - i32.const 475 - i32.const 2 + i32.const 472 + i32.const 12 call $~lib/env/abort unreachable + else + local.get $6 end - local.get $2 - local.get $5 - local.get $1 - call $~lib/allocator/tlsf/Root#use + local.set $7 end + local.get $7 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.get $0 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 475 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $1 + local.get $7 + local.get $0 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/memory/memory.allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/memory/memory.free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 - local.set $1 - local.get $1 if global.get $~lib/allocator/tlsf/ROOT - local.set $2 - local.get $2 + local.set $1 + local.get $1 if - local.get $1 + local.get $0 global.get $~lib/allocator/tlsf/Block.INFO i32.sub + local.set $2 + local.get $2 + i32.load local.set $3 local.get $3 - i32.load - local.set $4 - local.get $4 global.get $~lib/allocator/tlsf/FREE i32.and i32.eqz @@ -1465,23 +1474,32 @@ call $~lib/env/abort unreachable end + local.get $2 local.get $3 - local.get $4 global.get $~lib/allocator/tlsf/FREE i32.or i32.store - local.get $2 local.get $1 + local.get $0 global.get $~lib/allocator/tlsf/Block.INFO i32.sub call $~lib/allocator/tlsf/Root#insert end end ) - (func $~lib/memory/memory.reset (; 24 ;) (type $FUNCSIG$v) + (func $~lib/memory/memory.free (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/memory/memory.reset (; 26 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 72 + i32.const 77 + i32.const 9 + call $~lib/env/abort unreachable ) - (func $~lib/util/memory/memcpy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2682,7 +2700,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2913,7 +2931,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 27 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 29 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) i32.const 0 @@ -2945,7 +2963,7 @@ end end ) - (func $~lib/memory/memory.compare (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.compare (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3010,9 +3028,9 @@ end end ) - (func $start (; 29 ;) (type $FUNCSIG$v) + (func $start (; 31 ;) (type $FUNCSIG$v) call $start:assembly/index ) - (func $null (; 30 ;) (type $FUNCSIG$v) + (func $null (; 32 ;) (type $FUNCSIG$v) ) ) From 97d1f6e1b72ac7a1c724d58ec9d8b88d9121149e Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 29 Mar 2019 11:40:58 +0100 Subject: [PATCH 073/119] atomics option? --- tests/features.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/features.json b/tests/features.json index 3a203c48ac..9b8ad10d76 100644 --- a/tests/features.json +++ b/tests/features.json @@ -12,7 +12,8 @@ "--enable threads" ], "v8_flags": [ - "--experimental-wasm-threads" + "--experimental-wasm-threads", + "--wasm_atomics_prototype" ] } } From 72c1dbf502647ac18a23d6a76c63f925b8301809 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 29 Mar 2019 11:49:58 +0100 Subject: [PATCH 074/119] maybe.. --- tests/features.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/features.json b/tests/features.json index 9b8ad10d76..0818c7647b 100644 --- a/tests/features.json +++ b/tests/features.json @@ -13,7 +13,7 @@ ], "v8_flags": [ "--experimental-wasm-threads", - "--wasm_atomics_prototype" + "--experimental-wasm-atomics" ] } } From 6911f9d4fcbb755a7d6eec52e419367317fac8cb Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 29 Mar 2019 12:04:14 +0100 Subject: [PATCH 075/119] clear cache, revert --- tests/features.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/features.json b/tests/features.json index 0818c7647b..3a203c48ac 100644 --- a/tests/features.json +++ b/tests/features.json @@ -12,8 +12,7 @@ "--enable threads" ], "v8_flags": [ - "--experimental-wasm-threads", - "--experimental-wasm-atomics" + "--experimental-wasm-threads" ] } } From a3aa9a39616ba97ceff7c96b9c9c1555731c91e3 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 29 Mar 2019 12:23:03 +0100 Subject: [PATCH 076/119] disable caching --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 578df911eb..4a62227ecd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,6 @@ notifications: email: false before_install: npm config set progress=false && npm i -g npm@latest --no-audit install: npm ci --no-audit -cache: - directories: - - node_modules jobs: include: - node_js: lts/* From 6a790321aa38b5137963497a8e2560273e19c668 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 29 Mar 2019 18:56:32 +0100 Subject: [PATCH 077/119] make ref_unlink optional and itcm pass a simple test again note: there's no marking yet --- src/builtins.ts | 48 +- src/compiler.ts | 26 +- src/program.ts | 7 +- std/assembly/array.ts | 12 +- std/assembly/collector/README.md | 18 +- std/assembly/collector/index.d.ts | 5 +- std/assembly/collector/itcm.ts | 42 +- std/assembly/fixedarray.ts | 5 +- std/assembly/gc.ts | 5 +- std/assembly/map.ts | 27 +- std/assembly/set.ts | 10 +- tests/compiler.js | 4 +- tests/compiler/gc/itcm/trace.optimized.wat | 2263 +++++++++++++++ tests/compiler/gc/itcm/trace.ts | 26 + tests/compiler/gc/itcm/trace.untouched.wat | 3036 ++++++++++++++++++++ 15 files changed, 5445 insertions(+), 89 deletions(-) create mode 100644 tests/compiler/gc/itcm/trace.optimized.wat create mode 100644 tests/compiler/gc/itcm/trace.ts create mode 100644 tests/compiler/gc/itcm/trace.untouched.wat diff --git a/src/builtins.ts b/src/builtins.ts index 5868befc8a..61ebb5d9c3 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -4041,6 +4041,7 @@ export function compileIterateRoots(compiler: Compiler): void { var exprs = new Array(); var typeName = Signature.makeSignatureString([ Type.i32 ], Type.void); var typeRef = compiler.ensureFunctionType([ Type.i32 ], Type.void); + var nativeSizeType = compiler.options.nativeSizeType; for (let element of compiler.program.elementsByName.values()) { if (element.kind != ElementKind.GLOBAL) continue; @@ -4053,34 +4054,39 @@ export function compileIterateRoots(compiler: Compiler): void { ) { if (global.is(CommonFlags.INLINED)) { let value = global.constantIntegerValue; - exprs.push( - module.createCallIndirect( - module.createGetLocal(0, NativeType.I32), - [ - compiler.options.isWasm64 - ? module.createI64(i64_low(value), i64_high(value)) - : module.createI32(i64_low(value)) - ], - typeName - ) - ); + if (i64_low(value) || i64_high(value)) { + exprs.push( + module.createCallIndirect( + module.createGetLocal(0, NativeType.I32), + [ + compiler.options.isWasm64 + ? module.createI64(i64_low(value), i64_high(value)) + : module.createI32(i64_low(value)) + ], + typeName + ) + ); + } } else { exprs.push( - module.createCallIndirect( - module.createGetLocal(0, NativeType.I32), - [ - module.createGetGlobal( - global.internalName, - compiler.options.nativeSizeType - ) - ], - typeName + module.createIf( + module.createTeeLocal( + 1, + module.createGetGlobal(global.internalName, nativeSizeType) + ), + module.createCallIndirect( + module.createGetLocal(0, NativeType.I32), + [ + module.createGetLocal(1, nativeSizeType) + ], + typeName + ) ) ); } } } - module.addFunction("~iterateRoots", typeRef, [], + module.addFunction("~iterateRoots", typeRef, [ nativeSizeType ], exprs.length ? module.createBlock(null, exprs) : module.createNop() diff --git a/src/compiler.ts b/src/compiler.ts index e30617abe9..307f3efeac 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -8240,16 +8240,17 @@ export class Compiler extends DiagnosticEmitter { var flow = this.currentFlow; var tempValue = flow.getTempLocal(usizeType, false); var tempOldValue = flow.getTempLocal(usizeType, false); - var handleOld: ExpressionRef; + var handleOld: ExpressionRef = 0; var handleNew: ExpressionRef; var fn1: Function | null, fn2: Function | null; if (fn1 = program.linkRef) { // tracing tempParent = assert(tempParent); - fn2 = assert(program.unlinkRef); - handleOld = module.createCall(fn2.internalName, [ - module.createGetLocal(tempOldValue.index, nativeSizeType), - module.createGetLocal(tempParent.index, nativeSizeType) - ], NativeType.None); + if (fn2 = program.unlinkRef) { + handleOld = module.createCall(fn2.internalName, [ + module.createGetLocal(tempOldValue.index, nativeSizeType), + module.createGetLocal(tempParent.index, nativeSizeType) + ], NativeType.None); + } handleNew = module.createCall(fn1.internalName, [ module.createGetLocal(tempValue.index, nativeSizeType), module.createGetLocal(tempParent.index, nativeSizeType) @@ -8268,7 +8269,8 @@ export class Compiler extends DiagnosticEmitter { } flow.freeTempLocal(tempValue); flow.freeTempLocal(tempOldValue); - if (!this.compileFunction(fn1) || !this.compileFunction(fn2)) return module.createUnreachable(); + if (!this.compileFunction(fn1)) return module.createUnreachable(); + if (fn2 && !this.compileFunction(fn2)) return module.createUnreachable(); // if (value != oldValue) { // if (oldValue !== null) unlink/release(oldValue[, parent]) // [if (value !== null)] link/retain(value[, parent]) @@ -8279,10 +8281,12 @@ export class Compiler extends DiagnosticEmitter { module.createTeeLocal(tempOldValue.index, oldValueExpr) ), module.createBlock(null, [ - module.createIf( - module.createGetLocal(tempOldValue.index, nativeSizeType), - handleOld - ), + handleOld + ? module.createIf( + module.createGetLocal(tempOldValue.index, nativeSizeType), + handleOld + ) + : module.createNop(), nullable ? module.createIf( module.createGetLocal(tempValue.index, nativeSizeType), diff --git a/src/program.ts b/src/program.ts index b70f248cfb..1b05f1e9f5 100644 --- a/src/program.ts +++ b/src/program.ts @@ -850,9 +850,10 @@ export class Program extends DiagnosticEmitter { if (element = this.lookupGlobal("__ref_link")) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.linkRef = this.resolver.resolveFunction(element, null); - element = assert(this.lookupGlobal("__ref_unlink")); - assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); - this.unlinkRef = this.resolver.resolveFunction(element, null); + if (element = this.lookupGlobal("__ref_unlink")) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.unlinkRef = this.resolver.resolveFunction(element, null); + } } else if (element = this.lookupGlobal("__ref_retain")) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.retainRef = this.resolver.resolveFunction(element, null); diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 86704f8318..8a2ef3457b 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -123,7 +123,7 @@ export class Array extends ArrayBufferView { store(offset, value); if (isNullable()) { if (isDefined(__ref_link)) { - if (oldValue !== null) __ref_unlink(changetype(oldValue), changetype(this)); + if (isDefined(__ref_unlink)) if (oldValue !== null) __ref_unlink(changetype(oldValue), changetype(this)); if (value !== null) __ref_link(changetype(value), changetype(this)); } else if (__ref_retain) { if (oldValue !== null) __ref_release(changetype(oldValue)); @@ -131,7 +131,7 @@ export class Array extends ArrayBufferView { } else assert(false); } else { if (isDefined(__ref_link)) { - if (oldValue !== null) __ref_unlink(changetype(oldValue), changetype(this)); + if (isDefined(__ref_unlink)) if (oldValue !== null) __ref_unlink(changetype(oldValue), changetype(this)); __ref_link(changetype(value), changetype(this)); } else if (__ref_retain) { if (oldValue !== null) __ref_release(changetype(oldValue)); @@ -206,7 +206,7 @@ export class Array extends ArrayBufferView { if (isNullable()) { if (isDefined(__ref_link)) { if (value !== null) __ref_link(changetype(value), changetype(this)); - if (oldValue !== null) __ref_unlink(changetype(oldValue), changetype(this)); + if (isDefined(__ref_unlink)) if (oldValue !== null) __ref_unlink(changetype(oldValue), changetype(this)); } else if (__ref_retain) { if (oldValue !== null) __ref_retain(changetype(value)); if (value !== null) __ref_release(changetype(oldValue)); @@ -214,7 +214,7 @@ export class Array extends ArrayBufferView { } else { if (isDefined(__ref_link)) { __ref_link(changetype(value), changetype(this)); - if (oldValue !== null) __ref_unlink(changetype(oldValue), changetype(this)); + if (isDefined(__ref_unlink)) if (oldValue !== null) __ref_unlink(changetype(oldValue), changetype(this)); } else if (__ref_retain) { __ref_retain(changetype(value)); if (oldValue !== null) __ref_release(changetype(oldValue)); @@ -476,11 +476,11 @@ export class Array extends ArrayBufferView { if (isDefined(__ref_link)) { if (isNullable()) { if (ref) { - __ref_unlink(ref, changetype(this)); + if (isDefined(__ref_unlink)) __ref_unlink(ref, changetype(this)); __ref_link(ref, changetype(result)); } } else { - __ref_unlink(ref, changetype(this)); + if (isDefined(__ref_unlink)) __ref_unlink(ref, changetype(this)); __ref_link(ref, changetype(result)); } } diff --git a/std/assembly/collector/README.md b/std/assembly/collector/README.md index 7d280e6850..10fab0278c 100644 --- a/std/assembly/collector/README.md +++ b/std/assembly/collector/README.md @@ -19,13 +19,13 @@ Tracing Links a reference to a parent that is now referencing it. * **__ref_unlink**(ref: `usize`, parentRef: `usize`): `void`
- Unlinks a reference from a parent that was referencing it. + Unlinks a reference from a parent that was referencing it. Implementation is optional. Reference counting ------------------ * **__ref_register**(ref: `usize`): `void`
- Sets up a new reference. Implementation is optional for reference counting GCs. + Sets up a new reference. Implementation is optional. * **__ref_retain**(ref: `usize`): `void`
Retains a reference, usually incrementing RC. @@ -71,7 +71,7 @@ if (isNullable()) { if (ref !== oldRef) { if (isNullable()) { if (isDefined(__ref_link)) { - if (oldRef) __ref_unlink(oldRef, parentRef); + if (isDefined(__ref_unlink)) if (oldRef) __ref_unlink(oldRef, parentRef); if (ref) __ref_link(ref, parentRef); } else if (isDefined(__ref_retain)) { if (oldRef) __ref_release(oldRef); @@ -79,7 +79,7 @@ if (ref !== oldRef) { } else assert(false); } else { if (isDefined(__ref_link)) { - if (oldRef) __ref_unlink(oldRef, parentRef); // * + if (isDefined(__ref_unlink)) if (oldRef) __ref_unlink(oldRef, parentRef); // * __ref_link(ref, parentRef); } else if (isDefined(__ref_retain)) { if (oldRef) __ref_release(oldRef); // * @@ -94,13 +94,15 @@ if (ref !== oldRef) { ```ts if (isNullable()) { if (ref) { - if (isDefined(__ref_link)) __ref_unlink(ref, parentRef); - else if (isDefined(__ref_retain)) __ref_release(ref); + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(ref, parentRef); + } else if (isDefined(__ref_retain)) __ref_release(ref); else assert(false); } } else { - if (isDefined(__ref_link)) __ref_unlink(ref, parentRef); - else if (isDefined(__ref_retain)) __ref_release(ref); + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(ref, parentRef); + } else if (isDefined(__ref_retain)) __ref_release(ref); else assert(false); } ``` diff --git a/std/assembly/collector/index.d.ts b/std/assembly/collector/index.d.ts index e7d28756fe..9b41caf758 100644 --- a/std/assembly/collector/index.d.ts +++ b/std/assembly/collector/index.d.ts @@ -1,11 +1,14 @@ // common declare function __ref_collect(): void; +declare function __ref_register(ref: usize): void; // tracing -declare function __ref_register(ref: usize): void; declare function __ref_link(ref: usize, parentRef: usize): void; declare function __ref_unlink(ref: usize, parentRef: usize): void; // reference counting declare function __ref_retain(ref: usize): void; declare function __ref_release(ref: usize): void; + +// debugging +declare const GC_TRACE: bool; diff --git a/std/assembly/collector/itcm.ts b/std/assembly/collector/itcm.ts index cd16fcf2c9..e49adc4b64 100644 --- a/std/assembly/collector/itcm.ts +++ b/std/assembly/collector/itcm.ts @@ -2,7 +2,7 @@ // @ts-ignore: decorator @inline -const TRACE = false; +const TRACE = isDefined(GC_TRACE); import { iterateRoots, HEADER_SIZE } from "../runtime"; @@ -85,14 +85,14 @@ var iter: ManagedObject; unlink(): void { var next = this.next; var prev = this.prev; - if (TRACE) trace(" unlink", 3, objToRef(prev), objToRef(this), objToRef(next)); + if (TRACE) trace(" unlink [pref, ref, next]", 3, objToRef(prev), objToRef(this), objToRef(next)); next.prev = prev; prev.next = next; } /** Marks this object as gray, that is reachable with unscanned children. */ makeGray(): void { - if (TRACE) trace(" makeGray", 1, objToRef(this)); + if (TRACE) trace(" makeGray", 1, objToRef(this)); const gray = 2; if (this == iter) iter = this.prev; this.unlink(); @@ -107,7 +107,7 @@ var iter: ManagedObject; /** Inserts an object. */ push(obj: ManagedObject): void { var prev = this.prev; - if (TRACE) trace(" push", 3, objToRef(prev), objToRef(obj), objToRef(this)); + if (TRACE) trace(" push [prev, ref, next]", 3, objToRef(prev), objToRef(obj), objToRef(this)); obj.next = this; obj.prev = prev; prev.next = obj; @@ -116,7 +116,7 @@ var iter: ManagedObject; /** Clears this list. */ clear(): void { - if (TRACE) trace(" clear", 1, objToRef(this)); + if (TRACE) trace(" clear", 1, objToRef(this)); this.nextWithColor = changetype(this); this.prev = this; } @@ -127,32 +127,36 @@ function step(): void { var obj: ManagedObject; switch (state) { case State.INIT: { - if (TRACE) trace("gc~step/INIT"); + if (TRACE) trace("itcm~step/INIT"); fromSpace = changetype(memory.allocate(HEADER_SIZE)); + if (TRACE) trace(" fromSpace =", 1, objToRef(fromSpace)); fromSpace.classId = -1; // would error + fromSpace.payloadSize = 0; fromSpace.clear(); toSpace = changetype(memory.allocate(HEADER_SIZE)); + if (TRACE) trace(" toSpace =", 1, objToRef(toSpace)); toSpace.classId = -1; // would error + toSpace.payloadSize = 0; toSpace.clear(); iter = toSpace; state = State.IDLE; - if (TRACE) trace("gc~state = IDLE"); + if (TRACE) trace("itcm~state = IDLE"); // fall-through } case State.IDLE: { - if (TRACE) trace("gc~step/IDLE"); + if (TRACE) trace("itcm~step/IDLE"); iterateRoots((ref: usize): void => { var obj = refToObj(ref); if (obj.color == white) obj.makeGray(); }); state = State.MARK; - if (TRACE) trace("gc~state = MARK"); + if (TRACE) trace("itcm~state = MARK"); break; } case State.MARK: { obj = iter.next; if (obj !== toSpace) { - if (TRACE) trace("gc~step/MARK iterate", 1, objToRef(obj)); + if (TRACE) trace("itcm~step/MARK iterate", 1, objToRef(obj)); iter = obj; obj.color = i32(!white); // if (TRACE) { @@ -164,7 +168,7 @@ function step(): void { // } obj.hookFn(objToRef(obj)); } else { - if (TRACE) trace("gc~step/MARK finish"); + if (TRACE) trace("itcm~step/MARK finish"); iterateRoots((ref: usize): void => { var obj = refToObj(ref); if (obj.color == white) obj.makeGray(); @@ -177,7 +181,7 @@ function step(): void { white = i32(!white); iter = from.next; state = State.SWEEP; - if (TRACE) trace("gc~state = SWEEP"); + if (TRACE) trace("itcm~state = SWEEP"); } } break; @@ -185,14 +189,14 @@ function step(): void { case State.SWEEP: { obj = iter; if (obj !== toSpace) { - if (TRACE) trace("gc~step/SWEEP free", 1, objToRef(obj)); + if (TRACE) trace("itcm~step/SWEEP free", 1, objToRef(obj)); iter = obj.next; if (changetype(obj) >= HEAP_BASE) memory.free(changetype(obj)); } else { - if (TRACE) trace("gc~step/SWEEP finish"); + if (TRACE) trace("itcm~step/SWEEP finish"); toSpace.clear(); state = State.IDLE; - if (TRACE) trace("gc~state = IDLE"); + if (TRACE) trace("itcm~state = IDLE"); } break; } @@ -245,7 +249,7 @@ export function __ref_link(ref: usize, parentRef: usize): void { } // @ts-ignore: decorator -@global @unsafe -export function __ref_unlink(ref: usize, parentRef: usize): void { - if (TRACE) trace("itcm.unlink", 2, ref, parentRef); -} +// @global @unsafe +// export function __ref_unlink(ref: usize, parentRef: usize): void { +// if (TRACE) trace("itcm.unlink", 2, ref, parentRef); +// } diff --git a/std/assembly/fixedarray.ts b/std/assembly/fixedarray.ts index e01d12ad76..6e6e8ca3e6 100644 --- a/std/assembly/fixedarray.ts +++ b/std/assembly/fixedarray.ts @@ -47,8 +47,9 @@ export class FixedArray { if (value !== oldValue) { store(offset, value); if (oldValue !== null) { - if (isDefined(__ref_link)) __ref_unlink(changetype(oldValue), changetype(this)); - else if (isDefined(__ref_retain)) __ref_release(changetype(oldValue)); + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(changetype(oldValue), changetype(this)); + } else if (isDefined(__ref_retain)) __ref_release(changetype(oldValue)); else assert(false); } if (isNullable()) { diff --git a/std/assembly/gc.ts b/std/assembly/gc.ts index e117ff2391..ddd9a0d012 100644 --- a/std/assembly/gc.ts +++ b/std/assembly/gc.ts @@ -39,8 +39,9 @@ export namespace gc { if (root.has(ref)) { root.delete(ref); if (implemented) { - if (isDefined(__ref_link)) __ref_unlink(ref, changetype(root)); - else if (isDefined(__ref_retain)) __ref_release(ref); + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(ref, changetype(root)); + } else if (isDefined(__ref_retain)) __ref_release(ref); else assert(false); } } diff --git a/std/assembly/map.ts b/std/assembly/map.ts index 130d6c63e9..85f75b2abf 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -111,8 +111,9 @@ export class Map { entry.value = value; if (isNullable()) { if (oldValue !== null) { - if (isDefined(__ref_link)) __ref_unlink(changetype(oldValue), changetype(this)); - else if (isDefined(__ref_retain)) __ref_release(changetype(oldValue)); + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(changetype(oldValue), changetype(this)); + } else if (isDefined(__ref_retain)) __ref_release(changetype(oldValue)); else assert(false); } if (value !== null) { @@ -122,7 +123,7 @@ export class Map { } } else { if (isDefined(__ref_link)) { - __ref_unlink(changetype(oldValue), changetype(this)); + if (isDefined(__ref_unlink)) __ref_unlink(changetype(oldValue), changetype(this)); __ref_link(changetype(value), changetype(this)); } else if (isDefined(__ref_retain)) { __ref_release(changetype(oldValue)); @@ -189,13 +190,15 @@ export class Map { let oldKey = entry.key; if (isNullable()) { if (oldKey !== null) { - if (isDefined(__ref_link)) __ref_unlink(changetype(oldKey), changetype(this)); - else if (isDefined(__ref_retain)) __ref_release(changetype(oldKey)); + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(changetype(oldKey), changetype(this)); + } else if (isDefined(__ref_retain)) __ref_release(changetype(oldKey)); else assert(false); } } else { - if (isDefined(__ref_link)) __ref_unlink(changetype(oldKey), changetype(this)); - else if (isDefined(__ref_retain)) __ref_release(changetype(oldKey)); + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(changetype(oldKey), changetype(this)); + } else if (isDefined(__ref_retain)) __ref_release(changetype(oldKey)); else assert(false); } } @@ -203,13 +206,15 @@ export class Map { let oldValue = entry.key; if (isNullable()) { if (oldValue !== null) { - if (isDefined(__ref_link)) __ref_unlink(changetype(oldValue), changetype(this)); - else if (isDefined(__ref_retain)) __ref_release(changetype(oldValue)); + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(changetype(oldValue), changetype(this)); + } else if (isDefined(__ref_retain)) __ref_release(changetype(oldValue)); else assert(false); } } else { - if (isDefined(__ref_link)) __ref_unlink(changetype(oldValue), changetype(this)); - else if (isDefined(__ref_retain)) __ref_release(changetype(oldValue)); + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(changetype(oldValue), changetype(this)); + } else if (isDefined(__ref_retain)) __ref_release(changetype(oldValue)); else assert(false); } } diff --git a/std/assembly/set.ts b/std/assembly/set.ts index 5820094fb1..943bee2842 100644 --- a/std/assembly/set.ts +++ b/std/assembly/set.ts @@ -137,13 +137,15 @@ export class Set { key = entry.key; // exact, e.g. string if (isNullable()) { if (key !== null) { - if (isDefined(__ref_link)) __ref_unlink(changetype(key), changetype(this)); - else if (isDefined(__ref_retain)) __ref_release(changetype(key)); + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(changetype(key), changetype(this)); + } else if (isDefined(__ref_retain)) __ref_release(changetype(key)); else assert(false); } } else { - if (isDefined(__ref_link)) __ref_unlink(changetype(key), changetype(this)); - else if (isDefined(__ref_retain)) __ref_release(changetype(key)); + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(changetype(key), changetype(this)); + } else if (isDefined(__ref_retain)) __ref_release(changetype(key)); else assert(false); } } diff --git a/tests/compiler.js b/tests/compiler.js index 78a5e1cb78..ded0aceaeb 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -293,7 +293,9 @@ tests.forEach(filename => { } }); console.log("- " + colorsUtil.green("instantiate OK") + " (" + asc.formatTime(runTime) + ")"); - console.log("\n " + Object.keys(exports).map(key => "[" + (typeof exports[key]).substring(0, 3) + "] " + key).join("\n ")); + console.log("\n " + Object.keys(exports).map(key => { + return "[" + (typeof exports[key]).substring(0, 3) + "] " + key + " = " + exports[key] + }).join("\n ")); } catch (e) { console.log("- " + colorsUtil.red("instantiate ERROR: ") + e.stack); failed = true; diff --git a/tests/compiler/gc/itcm/trace.optimized.wat b/tests/compiler/gc/itcm/trace.optimized.wat new file mode 100644 index 0000000000..2fc82d78d3 --- /dev/null +++ b/tests/compiler/gc/itcm/trace.optimized.wat @@ -0,0 +1,2263 @@ +(module + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\01\00\00\00 ") + (data (i32.const 24) "g\00c\00/\00i\00t\00c\00m\00/\00t\00r\00a\00c\00e\00.\00t\00s") + (data (i32.const 56) "\01\00\00\00\18") + (data (i32.const 72) "i\00t\00c\00m\00.\00c\00o\00l\00l\00e\00c\00t") + (data (i32.const 96) "\01\00\00\00\1c") + (data (i32.const 112) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00N\00I\00T") + (data (i32.const 144) "\01\00\00\00 ") + (data (i32.const 160) " \00 \00 \00 \00 \00f\00r\00o\00m\00S\00p\00a\00c\00e\00 \00=") + (data (i32.const 192) "\01\00\00\00\14") + (data (i32.const 208) " \00 \00 \00 \00 \00c\00l\00e\00a\00r") + (data (i32.const 232) "\01\00\00\00\1c") + (data (i32.const 248) " \00 \00 \00 \00 \00t\00o\00S\00p\00a\00c\00e\00 \00=") + (data (i32.const 280) "\01\00\00\00\"") + (data (i32.const 296) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00I\00D\00L\00E") + (data (i32.const 336) "\01\00\00\00\1c") + (data (i32.const 352) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E") + (data (i32.const 384) "\01\00\00\00\1a") + (data (i32.const 400) " \00 \00 \00 \00 \00m\00a\00k\00e\00G\00r\00a\00y") + (data (i32.const 432) "\01\00\00\00:") + (data (i32.const 448) " \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]") + (data (i32.const 512) "\01\00\00\006") + (data (i32.const 528) " \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]") + (data (i32.const 584) "\01\00\00\00\"") + (data (i32.const 600) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K") + (data (i32.const 640) "\01\00\00\00,") + (data (i32.const 656) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00i\00t\00e\00r\00a\00t\00e") + (data (i32.const 704) "\01\00\00\00*") + (data (i32.const 720) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h") + (data (i32.const 768) "\01\00\00\00$") + (data (i32.const 784) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P") + (data (i32.const 824) "\01\00\00\00(") + (data (i32.const 840) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e") + (data (i32.const 880) "\01\00\00\00,") + (data (i32.const 896) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h") + (data (i32.const 944) "\01\00\00\00\"") + (data (i32.const 960) "#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)") + (data (i32.const 1000) "\01\00\00\00\1e") + (data (i32.const 1016) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 1048) "\01\00\00\00\1a") + (data (i32.const 1064) "i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 1096) "\01\00\00\00(") + (data (i32.const 1112) "#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)") + (data (i32.const 1152) "\01\00\00\00&") + (data (i32.const 1168) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 1208) "\01\00\00\00\12") + (data (i32.const 1224) "i\00t\00c\00m\00.\00l\00i\00n\00k") + (data (i32.const 1248) "\01\00\00\00\1c") + (data (i32.const 1264) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f") + (data (i32.const 1296) "\01\00\00\00\1a") + (data (i32.const 1312) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 1344) "\01\00\00\00\1e") + (data (i32.const 1360) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l") + (table $0 3 funcref) + (elem (i32.const 0) $null $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|0) + (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (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/argc (mut i32) (i32.const 0)) + (global $gc/itcm/trace/ref (mut i32) (i32.const 0)) + (global $gc/itcm/trace/arr (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/capabilities i32 (i32.const 2)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (export "main" (func $gc/itcm/trace/main)) + (export ".capabilities" (global $~lib/capabilities)) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.tee $1 + local.get $0 + i32.const 1 + local.get $0 + i32.const 1 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + current_memory + local.tee $2 + i32.const 16 + i32.shl + i32.gt_u + if + local.get $2 + local.get $0 + local.get $1 + i32.sub + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $2 + local.get $3 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $0 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 208 + i32.const 1 + local.get $0 + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + ) + (func $~lib/collector/itcm/ManagedObject#unlink (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + i32.const 448 + i32.const 3 + local.get $0 + i32.load offset=12 + local.tee $1 + i32.const 16 + i32.add + f64.convert_i32_u + local.get $0 + i32.const 16 + i32.add + f64.convert_i32_u + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + local.tee $0 + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $0 + local.get $1 + i32.store offset=12 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $0 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 528 + i32.const 3 + local.get $0 + i32.load offset=12 + local.tee $2 + i32.const 16 + i32.add + f64.convert_i32_u + local.get $1 + i32.const 16 + i32.add + f64.convert_i32_u + local.get $0 + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $0 + i32.or + i32.store offset=8 + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.and + local.get $1 + i32.or + i32.store offset=8 + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 400 + i32.const 1 + local.get $0 + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/iter + local.get $0 + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + call $~lib/collector/itcm/ManagedObject#unlink + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/step~anonymous|0 (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/collector/itcm/step (; 8 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + global.get $~lib/collector/itcm/state + local.tee $0 + if + local.get $0 + i32.const 1 + i32.sub + br_table $case1|0 $case2|0 $case3|0 $break|0 + end + i32.const 112 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + i32.const 16 + call $~lib/allocator/arena/__mem_allocate + global.set $~lib/collector/itcm/fromSpace + i32.const 160 + i32.const 1 + global.get $~lib/collector/itcm/fromSpace + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/fromSpace + local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#clear + i32.const 16 + call $~lib/allocator/arena/__mem_allocate + global.set $~lib/collector/itcm/toSpace + i32.const 248 + i32.const 1 + global.get $~lib/collector/itcm/toSpace + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/toSpace + local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter + i32.const 1 + global.set $~lib/collector/itcm/state + i32.const 296 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + end + i32.const 352 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/itcm/trace/ref + local.tee $0 + if + local.get $0 + i32.const 1 + call_indirect (type $FUNCSIG$vi) + end + global.get $gc/itcm/trace/arr + local.tee $0 + if + local.get $0 + i32.const 1 + call_indirect (type $FUNCSIG$vi) + end + i32.const 2 + global.set $~lib/collector/itcm/state + i32.const 600 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + br $break|0 + end + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + i32.const 656 + i32.const 1 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.or + i32.store offset=8 + i32.const 1 + global.set $~lib/argc + local.get $1 + local.get $0 + i32.load + call_indirect (type $FUNCSIG$vi) + else + i32.const 720 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/itcm/trace/ref + local.tee $0 + if + local.get $0 + i32.const 2 + call_indirect (type $FUNCSIG$vi) + end + global.get $gc/itcm/trace/arr + local.tee $0 + if + local.get $0 + i32.const 2 + call_indirect (type $FUNCSIG$vi) + end + global.get $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $0 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $0 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + i32.const 784 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + end + end + br $break|0 + end + global.get $~lib/collector/itcm/iter + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + i32.const 840 + i32.const 1 + local.get $0 + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + else + i32.const 896 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + i32.const 1 + global.set $~lib/collector/itcm/state + i32.const 296 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + end + end + ) + (func $~lib/collector/itcm/__ref_collect (; 9 ;) (type $FUNCSIG$v) + (local $0 i32) + i32.const 72 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + block $break|0 + block $case1|0 + global.get $~lib/collector/itcm/state + local.tee $0 + i32.eqz + br_if $case1|0 + local.get $0 + i32.const 1 + i32.eq + br_if $case1|0 + br $break|0 + end + call $~lib/collector/itcm/step + end + loop $continue|1 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|1 + end + end + ) + (func $~lib/runtime/allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 + i32.add + ) + (func $~lib/collector/itcm/__ref_register (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 1064 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + call $~lib/collector/itcm/step + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + global.get $~lib/collector/itcm/white + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.or + i32.store offset=8 + global.get $~lib/collector/itcm/fromSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + ) + (func $~lib/runtime/register (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 1392 + i32.le_u + if + i32.const 0 + i32.const 1016 + i32.const 149 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 1016 + i32.const 151 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $~lib/collector/itcm/__ref_register + local.get $0 + ) + (func $~lib/memory/memory.fill (; 13 ;) (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 $1 + i32.sub + local.set $2 + local.get $0 + local.get $1 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $2 + 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/collector/itcm/__ref_link (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1224 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/white + i32.eqz + local.get $1 + i32.const 16 + i32.sub + local.tee $2 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + local.tee $1 + if (result i32) + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + else + local.get $1 + end + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 4 + call $~lib/runtime/allocate + local.tee $1 + i32.const 4 + call $~lib/memory/memory.fill + local.get $1 + i32.const 3 + call $~lib/runtime/register + local.set $1 + local.get $0 + i32.eqz + if + i32.const 12 + call $~lib/runtime/allocate + i32.const 4 + call $~lib/runtime/register + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.load + local.get $1 + i32.ne + if + local.get $1 + local.get $0 + call $~lib/collector/itcm/__ref_link + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 4 + i32.store offset=8 + local.get $0 + ) + (func $~lib/util/memory/memcpy (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + loop $continue|0 + local.get $1 + i32.const 3 + i32.and + local.get $2 + local.get $2 + select + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|0 + end + end + local.get $0 + i32.const 3 + i32.and + i32.eqz + if + loop $continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|1 + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 8 + i32.add + local.set $0 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $1 + i32.const 4 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.add + local.set $0 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $1 + i32.const 2 + i32.add + local.set $1 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + local.get $0 + i32.const 3 + i32.and + local.tee $3 + i32.const 1 + i32.ne + if + local.get $3 + i32.const 2 + i32.eq + br_if $case1|2 + local.get $3 + i32.const 3 + i32.eq + br_if $case2|2 + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + loop $continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + local.get $5 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $3 + i32.const 24 + i32.shr_u + local.get $1 + i32.const 5 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 24 + i32.shr_u + local.get $1 + i32.const 9 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 13 + i32.add + i32.load + local.tee $5 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|3 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + loop $continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 2 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $3 + i32.const 16 + i32.shr_u + local.get $1 + i32.const 6 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 16 + i32.shr_u + local.get $1 + i32.const 10 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 14 + i32.add + i32.load + local.tee $5 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|4 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + loop $continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 3 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + local.get $5 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $3 + i32.const 8 + i32.shr_u + local.get $1 + i32.const 7 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 8 + i32.shr_u + local.get $1 + i32.const 11 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 15 + i32.add + i32.load + local.tee $5 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|5 + end + end + end + end + local.get $2 + i32.const 16 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + end + ) + (func $~lib/memory/memory.copy (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + local.tee $3 + i32.eqz + if + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + local.set $3 + end + local.get $3 + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + br $continue|0 + end + end + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 + end + end + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end + end + end + loop $continue|5 + local.get $2 + if + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + ) + (func $~lib/runtime/reallocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load offset=4 + local.tee $1 + i32.const 4 + i32.lt_u + if + i32.const 1 + i32.const 32 + local.get $1 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + i32.const 0 + local.get $0 + i32.const 1392 + i32.gt_u + select + i32.const 32 + i32.lt_u + if + i32.const 32 + call $~lib/allocator/arena/__mem_allocate + local.tee $3 + local.get $2 + i32.load + i32.store + local.get $3 + i32.const 0 + i32.store offset=8 + local.get $3 + i32.const 0 + i32.store offset=12 + local.get $3 + i32.const 16 + i32.add + local.tee $4 + local.get $0 + local.get $1 + call $~lib/memory/memory.copy + local.get $1 + local.get $4 + i32.add + i32.const 4 + local.get $1 + i32.sub + call $~lib/memory/memory.fill + local.get $2 + i32.load + i32.const -1520547049 + i32.eq + if + local.get $0 + i32.const 1392 + i32.le_u + if + i32.const 0 + i32.const 1016 + i32.const 113 + i32.const 8 + call $~lib/env/abort + unreachable + end + else + local.get $0 + call $~lib/collector/itcm/__ref_register + end + local.get $3 + local.set $2 + local.get $4 + local.set $0 + else + local.get $0 + local.get $1 + i32.add + i32.const 4 + local.get $1 + i32.sub + call $~lib/memory/memory.fill + end + end + local.get $2 + i32.const 4 + i32.store offset=4 + local.get $0 + ) + (func $~lib/array/ensureCapacity (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 1 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_u + if + local.get $0 + i32.load + local.tee $2 + call $~lib/runtime/reallocate + local.set $1 + local.get $1 + local.get $2 + i32.ne + if + local.get $0 + i32.load + local.get $1 + i32.ne + if + local.get $1 + local.get $0 + call $~lib/collector/itcm/__ref_link + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + end + local.get $0 + i32.const 4 + i32.store offset=8 + end + ) + (func $~lib/array/Array#__unchecked_set (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $2 + i32.load + local.get $1 + i32.ne + if + local.get $2 + local.get $1 + i32.store + local.get $1 + if + local.get $1 + local.get $0 + call $~lib/collector/itcm/__ref_link + end + end + ) + (func $~lib/array/Array#__set (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $2 + local.get $0 + call $~lib/array/ensureCapacity + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_set + i32.const 0 + local.get $2 + i32.ge_s + if + local.get $0 + i32.const 1 + i32.store offset=12 + end + ) + (func $start:gc/itcm/trace (; 22 ;) (type $FUNCSIG$v) + (local $0 i32) + i32.const 1392 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + call $~lib/collector/itcm/__ref_collect + i32.const 960 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + i32.const 0 + call $~lib/runtime/allocate + i32.const 2 + call $~lib/runtime/register + global.set $gc/itcm/trace/ref + i32.const 1112 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + i32.const 16 + call $~lib/runtime/allocate + i32.const 5 + call $~lib/runtime/register + call $~lib/runtime/ArrayBufferView#constructor + local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 1 + i32.store offset=12 + local.get $0 + global.set $gc/itcm/trace/arr + i32.const 1264 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/itcm/trace/arr + global.get $gc/itcm/trace/ref + call $~lib/array/Array#__set + i32.const 1360 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/itcm/trace/arr + i32.const 0 + call $~lib/array/Array#__set + ) + (func $gc/itcm/trace/main (; 23 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start:gc/itcm/trace + i32.const 1 + global.set $~lib/started + end + ) + (func $null (; 24 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/gc/itcm/trace.ts b/tests/compiler/gc/itcm/trace.ts new file mode 100644 index 0000000000..7e784f75be --- /dev/null +++ b/tests/compiler/gc/itcm/trace.ts @@ -0,0 +1,26 @@ +@global const GC_TRACE = true; + +import "allocator/arena"; +import "collector/itcm"; + +import { HEADER_SIZE } from "runtime"; + +assert(HEADER_SIZE == 16); +assert(gc.implemented); + +gc.collect(); // trigger init + +class Ref {} + +trace("# ref = new Ref()"); +var ref = new Ref(); +trace("# arr = new Array(1)"); +var arr = new Array(1); +trace("# arr[0] = ref"); +arr[0] = ref; +trace("# arr[0] = null"); +arr[0] = null; + +// TODO... + +@start export function main(): void {} diff --git a/tests/compiler/gc/itcm/trace.untouched.wat b/tests/compiler/gc/itcm/trace.untouched.wat new file mode 100644 index 0000000000..eb48feb63a --- /dev/null +++ b/tests/compiler/gc/itcm/trace.untouched.wat @@ -0,0 +1,3036 @@ +(module + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\01\00\00\00 \00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00i\00t\00c\00m\00/\00t\00r\00a\00c\00e\00.\00t\00s\00") + (data (i32.const 56) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00c\00o\00l\00l\00e\00c\00t\00") + (data (i32.const 96) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00N\00I\00T\00") + (data (i32.const 144) "\01\00\00\00 \00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00f\00r\00o\00m\00S\00p\00a\00c\00e\00 \00=\00") + (data (i32.const 192) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00c\00l\00e\00a\00r\00") + (data (i32.const 232) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00t\00o\00S\00p\00a\00c\00e\00 \00=\00") + (data (i32.const 280) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00I\00D\00L\00E\00") + (data (i32.const 336) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E\00") + (data (i32.const 384) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00m\00a\00k\00e\00G\00r\00a\00y\00") + (data (i32.const 432) "\01\00\00\00:\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") + (data (i32.const 512) "\01\00\00\006\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") + (data (i32.const 584) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K\00") + (data (i32.const 640) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00i\00t\00e\00r\00a\00t\00e\00") + (data (i32.const 704) "\01\00\00\00*\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h\00") + (data (i32.const 768) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P\00") + (data (i32.const 824) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e\00") + (data (i32.const 880) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h\00") + (data (i32.const 944) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)\00") + (data (i32.const 1000) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 1048) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 1096) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)\00") + (data (i32.const 1152) "\01\00\00\00&\00\00\00\00\00\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 1208) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00l\00i\00n\00k\00") + (data (i32.const 1248) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f\00") + (data (i32.const 1296) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 1344) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l\00") + (table $0 3 funcref) + (elem (i32.const 0) $null $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1) + (global $gc/itcm/trace/GC_TRACE i32 (i32.const 1)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) + (global $~lib/gc/gc.implemented i32 (i32.const 1)) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $gc/itcm/trace/ref (mut i32) (i32.const 0)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $gc/itcm/trace/arr (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 1392)) + (global $~lib/capabilities i32 (i32.const 2)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (export "main" (func $gc/itcm/trace/main)) + (export ".capabilities" (global $~lib/capabilities)) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if + local.get $4 + local.get $1 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select + local.set $3 + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $2 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate + return + ) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + i32.const 208 + i32.const 1 + block $~lib/collector/itcm/objToRef|inlined.1 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + ) + (func $~lib/collector/itcm/ManagedObject#get:color (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#get:next (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#set:next (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/ManagedObject#unlink (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + local.set $1 + local.get $0 + i32.load offset=12 + local.set $2 + i32.const 448 + i32.const 3 + block $~lib/collector/itcm/objToRef|inlined.4 (result i32) + local.get $2 + local.set $3 + local.get $3 + global.get $~lib/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + block $~lib/collector/itcm/objToRef|inlined.5 (result i32) + local.get $0 + local.set $3 + local.get $3 + global.get $~lib/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + block $~lib/collector/itcm/objToRef|inlined.6 (result i32) + local.get $1 + local.set $3 + local.get $3 + global.get $~lib/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.set $2 + i32.const 528 + i32.const 3 + block $~lib/collector/itcm/objToRef|inlined.7 (result i32) + local.get $2 + local.set $3 + local.get $3 + global.get $~lib/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + block $~lib/collector/itcm/objToRef|inlined.8 (result i32) + local.get $1 + local.set $3 + local.get $3 + global.get $~lib/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + block $~lib/collector/itcm/objToRef|inlined.9 (result i32) + local.get $0 + local.set $3 + local.get $3 + global.get $~lib/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $1 + local.get $0 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + i32.const 400 + i32.const 1 + block $~lib/collector/itcm/objToRef|inlined.3 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $0 + global.get $~lib/collector/itcm/iter + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + call $~lib/collector/itcm/ManagedObject#unlink + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/step~anonymous|0 (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + block $~lib/collector/itcm/refToObj|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/collector/itcm/ManagedObject#set:color (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $1 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/ManagedObject#get:hookFn (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + ) + (func $~lib/collector/itcm/step~anonymous|1 (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + block $~lib/collector/itcm/refToObj|inlined.1 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/allocator/arena/__mem_free (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/memory/memory.free (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/arena/__mem_free + ) + (func $~lib/collector/itcm/step (; 17 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + global.get $~lib/collector/itcm/state + local.set $1 + local.get $1 + i32.const 0 + i32.eq + br_if $case0|0 + local.get $1 + i32.const 1 + i32.eq + br_if $case1|0 + local.get $1 + i32.const 2 + i32.eq + br_if $case2|0 + local.get $1 + i32.const 3 + i32.eq + br_if $case3|0 + br $break|0 + end + block + i32.const 112 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/fromSpace + i32.const 160 + i32.const 1 + block $~lib/collector/itcm/objToRef|inlined.0 (result i32) + global.get $~lib/collector/itcm/fromSpace + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/fromSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/fromSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/fromSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/toSpace + i32.const 248 + i32.const 1 + block $~lib/collector/itcm/objToRef|inlined.2 (result i32) + global.get $~lib/collector/itcm/toSpace + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/toSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/toSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter + i32.const 1 + global.set $~lib/collector/itcm/state + i32.const 296 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + end + end + block + i32.const 352 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + i32.const 1 + call $~iterateRoots + i32.const 2 + global.set $~lib/collector/itcm/state + i32.const 600 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + i32.const 656 + i32.const 1 + block $~lib/collector/itcm/objToRef|inlined.10 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + call $~lib/collector/itcm/ManagedObject#set:color + i32.const 1 + global.set $~lib/argc + block $~lib/collector/itcm/objToRef|inlined.11 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + end + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:hookFn + call_indirect (type $FUNCSIG$vi) + else + i32.const 720 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + i32.const 2 + call $~iterateRoots + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $1 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $1 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $1 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + i32.const 784 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + end + end + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + i32.const 840 + i32.const 1 + block $~lib/collector/itcm/objToRef|inlined.12 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.ge_u + if + local.get $0 + call $~lib/memory/memory.free + end + else + i32.const 896 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + i32.const 1 + global.set $~lib/collector/itcm/state + i32.const 296 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + end + br $break|0 + unreachable + end + unreachable + end + ) + (func $~lib/collector/itcm/__ref_collect (; 18 ;) (type $FUNCSIG$v) + (local $0 i32) + i32.const 72 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + block $break|0 + block $case1|0 + block $case0|0 + global.get $~lib/collector/itcm/state + local.set $0 + local.get $0 + i32.const 0 + i32.eq + br_if $case0|0 + local.get $0 + i32.const 1 + i32.eq + br_if $case1|0 + br $break|0 + end + end + call $~lib/collector/itcm/step + end + block $break|1 + loop $continue|1 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|1 + end + end + end + ) + (func $~lib/gc/gc.collect (; 19 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/__ref_collect + ) + (func $~lib/runtime/ADJUSTOBLOCK (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/runtime/allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/ADJUSTOBLOCK + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/collector/itcm/__ref_register (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 1064 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + call $~lib/collector/itcm/step + block $~lib/collector/itcm/refToObj|inlined.2 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + global.get $~lib/collector/itcm/white + call $~lib/collector/itcm/ManagedObject#set:color + global.get $~lib/collector/itcm/fromSpace + local.get $2 + call $~lib/collector/itcm/ManagedObjectList#push + ) + (func $~lib/runtime/register (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 1016 + i32.const 149 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 1016 + i32.const 151 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $~lib/collector/itcm/__ref_register + local.get $0 + ) + (func $gc/itcm/trace/Ref#constructor (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/runtime/allocate + i32.const 2 + call $~lib/runtime/register + local.set $0 + end + local.get $0 + ) + (func $~lib/memory/memory.fill (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 1 + i32.add + local.get $1 + i32.store8 + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $4 + local.get $0 + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 12 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 24 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 20 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.get $4 + i32.store + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + i32.sub + local.set $2 + local.get $4 + i64.extend_i32_u + local.get $4 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $6 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $6 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $6 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + end + br $continue|0 + end + end + end + end + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH + i32.gt_u + if + i32.const 0 + i32.const 1168 + i32.const 25 + i32.const 43 + call $~lib/env/abort + unreachable + end + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/runtime/allocate + end + local.set $3 + local.get $3 + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + block $~lib/runtime/REGISTER<~lib/arraybuffer/ArrayBuffer>|inlined.0 (result i32) + local.get $3 + local.set $2 + local.get $2 + i32.const 3 + call $~lib/runtime/register + end + ) + (func $~lib/collector/itcm/__ref_link (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 1224 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + block $~lib/collector/itcm/refToObj|inlined.3 (result i32) + local.get $1 + local.set $2 + local.get $2 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + end + local.set $3 + local.get $3 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eqz + i32.eq + local.tee $2 + if (result i32) + block $~lib/collector/itcm/refToObj|inlined.5 (result i32) + local.get $0 + local.set $2 + local.get $2 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + end + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + else + local.get $2 + end + if + local.get $3 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 1016 + i32.const 232 + i32.const 57 + call $~lib/env/abort + unreachable + end + i32.const 0 + local.get $1 + local.get $2 + i32.shl + local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $3 + block (result i32) + local.get $0 + i32.eqz + if + i32.const 12 + call $~lib/runtime/allocate + i32.const 4 + call $~lib/runtime/register + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + end + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + i32.load + local.tee $6 + i32.ne + if (result i32) + nop + local.get $5 + local.get $4 + call $~lib/collector/itcm/__ref_link + local.get $5 + else + local.get $5 + end + i32.store + local.get $0 + local.get $3 + i32.store offset=4 + local.get $0 + local.get $1 + i32.store offset=8 + local.get $0 + ) + (func $~lib/array/Array#constructor (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/allocate + i32.const 5 + call $~lib/runtime/register + end + local.get $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/util/memory/memcpy (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $break|0 + loop $continue|0 + local.get $2 + if (result i32) + local.get $1 + i32.const 3 + i32.and + else + local.get $2 + end + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|0 + end + end + end + local.get $0 + i32.const 3 + i32.and + i32.const 0 + i32.eq + if + block $break|1 + loop $continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + block + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|1 + end + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.set $0 + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $0 + i32.const 2 + i32.add + local.set $0 + local.get $1 + i32.const 2 + i32.add + local.set $1 + end + local.get $2 + i32.const 1 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + block $case0|2 + local.get $0 + i32.const 3 + i32.and + local.set $5 + local.get $5 + i32.const 1 + i32.eq + br_if $case0|2 + local.get $5 + i32.const 2 + i32.eq + br_if $case1|2 + local.get $5 + i32.const 3 + i32.eq + br_if $case2|2 + br $break|2 + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + block $break|3 + loop $continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + block + local.get $1 + i32.const 1 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 5 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 9 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 13 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|3 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + block $break|4 + loop $continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + block + local.get $1 + i32.const 2 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 6 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 10 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 14 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|4 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block $break|5 + loop $continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + block + local.get $1 + i32.const 3 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 7 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 11 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 15 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|5 + end + end + end + br $break|2 + unreachable + end + unreachable + end + end + local.get $2 + i32.const 16 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + ) + (func $~lib/memory/memory.copy (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + local.tee $5 + if (result i32) + local.get $5 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|2 + end + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + end + ) + (func $~lib/runtime/reallocate (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $3 + local.get $1 + i32.lt_u + if + local.get $1 + call $~lib/runtime/ADJUSTOBLOCK + local.set $4 + local.get $3 + call $~lib/runtime/ADJUSTOBLOCK + i32.const 0 + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + select + local.get $4 + i32.lt_u + if + local.get $4 + call $~lib/memory/memory.allocate + local.set $5 + local.get $5 + local.get $2 + i32.load + i32.store + local.get $5 + i32.const 0 + i32.store offset=8 + local.get $5 + i32.const 0 + i32.store offset=12 + local.get $5 + global.get $~lib/runtime/HEADER_SIZE + i32.add + local.set $6 + local.get $6 + local.get $0 + local.get $3 + call $~lib/memory/memory.copy + local.get $6 + local.get $3 + i32.add + i32.const 0 + local.get $1 + local.get $3 + i32.sub + call $~lib/memory/memory.fill + local.get $2 + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + if + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 1016 + i32.const 113 + i32.const 8 + call $~lib/env/abort + unreachable + end + local.get $2 + call $~lib/memory/memory.free + else + local.get $0 + call $~lib/collector/itcm/__ref_register + end + local.get $5 + local.set $2 + local.get $6 + local.set $0 + else + local.get $0 + local.get $3 + i32.add + i32.const 0 + local.get $1 + local.get $3 + i32.sub + call $~lib/memory/memory.fill + end + else + nop + end + local.get $2 + local.get $1 + i32.store offset=4 + local.get $0 + ) + (func $~lib/array/ensureCapacity (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + local.get $0 + i32.load offset=8 + local.get $2 + i32.shr_u + i32.gt_u + if + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 1312 + i32.const 13 + i32.const 64 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load + local.set $3 + local.get $1 + local.get $2 + i32.shl + local.set $4 + block $~lib/runtime/REALLOCATE|inlined.0 (result i32) + local.get $3 + local.set $6 + local.get $4 + local.set $5 + local.get $6 + local.get $5 + call $~lib/runtime/reallocate + end + local.set $5 + local.get $5 + local.get $3 + i32.ne + if + local.get $0 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + nop + local.get $7 + local.get $6 + call $~lib/collector/itcm/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $0 + local.get $5 + i32.store offset=4 + end + local.get $0 + local.get $4 + i32.store offset=8 + end + ) + (func $~lib/array/Array#__unchecked_set (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $3 + local.get $3 + i32.load + local.set $4 + local.get $2 + local.get $4 + i32.ne + if + local.get $3 + local.get $2 + i32.store + local.get $2 + i32.const 0 + i32.ne + if + local.get $2 + local.get $0 + call $~lib/collector/itcm/__ref_link + end + end + ) + (func $~lib/array/Array#__set (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.set $3 + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureCapacity + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#__unchecked_set + local.get $1 + local.get $3 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $start:gc/itcm/trace (; 36 ;) (type $FUNCSIG$v) + global.get $~lib/runtime/HEADER_SIZE + i32.const 16 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 8 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $~lib/gc/gc.implemented + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 9 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + call $~lib/gc/gc.collect + i32.const 960 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + i32.const 0 + call $gc/itcm/trace/Ref#constructor + global.set $gc/itcm/trace/ref + i32.const 1112 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + i32.const 0 + i32.const 1 + call $~lib/array/Array#constructor + global.set $gc/itcm/trace/arr + i32.const 1264 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/itcm/trace/arr + i32.const 0 + global.get $gc/itcm/trace/ref + call $~lib/array/Array#__set + i32.const 1360 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/itcm/trace/arr + i32.const 0 + i32.const 0 + call $~lib/array/Array#__set + ) + (func $gc/itcm/trace/main (; 37 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started + end + ) + (func $start (; 38 ;) (type $FUNCSIG$v) + call $start:gc/itcm/trace + ) + (func $null (; 39 ;) (type $FUNCSIG$v) + ) + (func $~iterateRoots (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + global.get $gc/itcm/trace/ref + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $gc/itcm/trace/arr + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + ) +) From 3e3c393856f99837b030bf7359fb2fbe60670028 Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 30 Mar 2019 13:58:20 +0100 Subject: [PATCH 078/119] finalize GC wiring --- src/builtins.ts | 142 +- src/compiler.ts | 147 +- src/program.ts | 63 +- src/types.ts | 5 +- std/assembly/array.ts | 15 +- std/assembly/collector/itcm.ts | 16 +- std/assembly/fixedarray.ts | 15 +- std/assembly/map.ts | 29 +- std/assembly/set.ts | 16 +- tests/compiler/gc.optimized.wat | 66 +- tests/compiler/gc.untouched.wat | 78 +- tests/compiler/gc/global-assign.optimized.wat | 18 +- tests/compiler/gc/global-assign.untouched.wat | 24 +- tests/compiler/gc/global-init.optimized.wat | 18 +- tests/compiler/gc/global-init.untouched.wat | 24 +- tests/compiler/gc/itcm/trace.optimized.wat | 262 ++-- tests/compiler/gc/itcm/trace.ts | 6 +- tests/compiler/gc/itcm/trace.untouched.wat | 290 ++-- .../compiler/std/array-literal.optimized.wat | 97 +- .../compiler/std/array-literal.untouched.wat | 198 ++- tests/compiler/std/array.optimized.wat | 728 +++++---- tests/compiler/std/array.untouched.wat | 1310 ++++++++++++----- tests/compiler/std/map.optimized.wat | 204 +-- tests/compiler/std/map.untouched.wat | 437 ++++-- tests/compiler/std/runtime.optimized.wat | 61 +- tests/compiler/std/runtime.untouched.wat | 89 +- tests/compiler/std/set.optimized.wat | 188 +-- tests/compiler/std/set.untouched.wat | 417 ++++-- tests/compiler/std/string.optimized.wat | 177 ++- tests/compiler/std/string.untouched.wat | 239 ++- tests/compiler/std/symbol.untouched.wat | 4 +- tests/compiler/std/typedarray.optimized.wat | 809 +++++----- tests/compiler/std/typedarray.untouched.wat | 1126 +++++++------- 33 files changed, 4600 insertions(+), 2718 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index 61ebb5d9c3..131adfba02 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -2370,6 +2370,15 @@ export function compileCall( let typeRef = module.getFunctionTypeBySignature(nativeReturnType, nativeParamTypes); if (!typeRef) typeRef = module.addFunctionType(typeName, nativeReturnType, nativeParamTypes); compiler.currentType = returnType; + // if the index expression is precomputable to a constant value, emit a direct call + if (getExpressionId(arg0 = module.precomputeExpression(arg0)) == ExpressionId.Const) { + assert(getExpressionType(arg0) == NativeType.I32); + let index = getConstValueI32(arg0); + let functionTable = compiler.functionTable; + if (index >= 0 && index < functionTable.length) { + return module.createCall(functionTable[index], operandExprs, nativeReturnType); + } + } // of course this can easily result in a 'RuntimeError: function signature mismatch' trap and // thus must be used with care. it exists because it *might* be useful in specific scenarios. return module.createCallIndirect(arg0, operandExprs, typeName); @@ -3620,8 +3629,16 @@ export function compileCall( compiler.currentType = Type.u32; if (!type) return module.createUnreachable(); let classReference = type.classReference; - if (!classReference) return module.createUnreachable(); - return module.createI32(classReference.id); + if (!classReference || classReference.hasDecorator(DecoratorFlags.UNMANAGED)) { + compiler.error( + DiagnosticCode.Operation_not_supported, + reportNode.range + ); + return module.createUnreachable(); + } + let classId = classReference.ensureClassId(compiler); // involves compile steps + compiler.currentType = Type.u32; + return module.createI32(classId); } case BuiltinSymbols.iterateRoots: { if ( @@ -4093,127 +4110,6 @@ export function compileIterateRoots(compiler: Compiler): void { ); } -/** Ensures that the specified class's GC hook exists and returns its function table index. */ -export function ensureGCHook( - compiler: Compiler, - classInstance: Class -): u32 { - var program = compiler.program; - assert(classInstance.type.isManaged(program)); - - // check if the GC hook has already been created - { - let existingIndex = classInstance.gcHookIndex; - if (existingIndex != -1) return existingIndex; - } - - // check if the class implements a custom GC function (only valid for library elements) - var members = classInstance.members; - if (classInstance.isDeclaredInLibrary) { - if (members !== null && members.has("__iter")) { - let iterPrototype = assert(members.get("__iter")); - assert(iterPrototype.kind == ElementKind.FUNCTION_PROTOTYPE); - let iterInstance = assert(program.resolver.resolveFunction(iterPrototype, null)); - assert(iterInstance.is(CommonFlags.PRIVATE | CommonFlags.INSTANCE)); - assert(!iterInstance.isAny(CommonFlags.AMBIENT | CommonFlags.VIRTUAL)); - let signature = iterInstance.signature; - let parameterTypes = signature.parameterTypes; - assert(parameterTypes.length == 1); - assert(parameterTypes[0].signatureReference); - assert(signature.returnType == Type.void); - iterInstance.internalName = classInstance.internalName + "~iter"; - assert(compiler.compileFunction(iterInstance)); - let index = compiler.ensureFunctionTableEntry(iterInstance); - classInstance.gcHookIndex = index; - return index; - } - } - - var module = compiler.module; - var options = compiler.options; - var nativeSizeType = options.nativeSizeType; - var nativeSizeSize = options.usizeType.byteSize; - var body = new Array(); - - // nothing to mark if 'this' is null - body.push( - module.createIf( - module.createUnary( - options.isWasm64 - ? UnaryOp.EqzI64 - : UnaryOp.EqzI32, - module.createGetLocal(0, nativeSizeType) - ), - module.createReturn() - ) - ); - - // remember the function index so we don't recurse infinitely - var functionTable = compiler.functionTable; - var gcHookIndex = functionTable.length; - functionTable.push(""); - classInstance.gcHookIndex = gcHookIndex; - - // if the class extends a base class, call its hook first - var baseInstance = classInstance.base; - if (baseInstance) { - assert(baseInstance.type.isManaged(program)); - body.push( - module.createCallIndirect( - module.createI32( - ensureGCHook(compiler, baseInstance.type.classReference) - ), - [ - module.createGetLocal(0, nativeSizeType), // this - module.createGetLocal(1, NativeType.I32) // fn - ], - "FUNCSIG$" + (nativeSizeType == NativeType.I64 ? "vji" : "vii") - ) - ); - } - - // mark instances assigned to own fields that are again references - if (members) { - for (let member of members.values()) { - if (member.kind == ElementKind.FIELD) { - if ((member).parent === classInstance) { - let type = (member).type; - if (type.isManaged(program)) { - let offset = (member).memoryOffset; - assert(offset >= 0); - body.push( // fn(fieldValue) - module.createCallIndirect( - module.createGetLocal(1, NativeType.I32), - [ - module.createLoad( - nativeSizeSize, - false, - module.createGetLocal(0, nativeSizeType), - nativeSizeType, - offset - ), - ], - "FUNCSIG$vi" - ) - ); - } - } - } - } - } - - // add the function to the module and return its table index - var funcName = classInstance.internalName + "~iter"; - module.addFunction( - funcName, - compiler.ensureFunctionType(null, Type.void, options.usizeType), - null, - module.createBlock(null, body) - ); - functionTable[gcHookIndex] = funcName; - return gcHookIndex; -} - // Helpers /** Evaluates the constant type of a type argument *or* expression. */ diff --git a/src/compiler.ts b/src/compiler.ts index 307f3efeac..4374121a74 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -71,7 +71,8 @@ import { DecoratorFlags, PropertyPrototype, File, - mangleInternalName + mangleInternalName, + CollectorKind } from "./program"; import { @@ -448,7 +449,7 @@ export class Compiler extends DiagnosticEmitter { // expose module capabilities var capabilities = Capability.NONE; if (program.options.isWasm64) capabilities |= Capability.WASM64; - if (program.gcImplemented) capabilities |= Capability.GC; + if (program.collectorKind != CollectorKind.NONE) capabilities |= Capability.GC; if (capabilities != 0) { module.addGlobal(BuiltinSymbols.capabilities, NativeType.I32, false, module.createI32(capabilities)); module.addGlobalExport(BuiltinSymbols.capabilities, ".capabilities"); @@ -1408,7 +1409,7 @@ export class Compiler extends DiagnosticEmitter { } else { let length = stringValue.length; let buffer = new Uint8Array(rtHeaderSize + (length << 1)); - program.writeRuntimeHeader(buffer, 0, stringInstance, length << 1); + program.writeRuntimeHeader(buffer, 0, stringInstance.ensureClassId(this), length << 1); for (let i = 0; i < length; ++i) { writeI16(stringValue.charCodeAt(i), buffer, rtHeaderSize + (i << 1)); } @@ -1434,7 +1435,7 @@ export class Compiler extends DiagnosticEmitter { var runtimeHeaderSize = program.runtimeHeaderSize; var buf = new Uint8Array(runtimeHeaderSize + byteLength); - program.writeRuntimeHeader(buf, 0, bufferInstance, byteLength); + program.writeRuntimeHeader(buf, 0, bufferInstance.ensureClassId(this), byteLength); var pos = runtimeHeaderSize; var nativeType = elementType.toNativeType(); switch (nativeType) { @@ -1521,7 +1522,7 @@ export class Compiler extends DiagnosticEmitter { var arrayLength = i32(bufferLength / elementType.byteSize); var buf = new Uint8Array(runtimeHeaderSize + arrayInstanceSize); - program.writeRuntimeHeader(buf, 0, arrayInstance, arrayInstanceSize); + program.writeRuntimeHeader(buf, 0, arrayInstance.ensureClassId(this), arrayInstanceSize); var bufferAddress32 = i64_low(bufferSegment.offset) + runtimeHeaderSize; assert(!program.options.isWasm64); // TODO @@ -6820,7 +6821,7 @@ export class Compiler extends DiagnosticEmitter { // makeArray(length, classId, alignLog2, staticBuffer) let expr = this.makeCallDirect(assert(program.makeArrayInstance), [ module.createI32(length), - module.createI32(arrayInstance.id), + module.createI32(arrayInstance.ensureClassId(this)), program.options.isWasm64 ? module.createI64(elementType.alignLog2) : module.createI32(elementType.alignLog2), @@ -6854,7 +6855,7 @@ export class Compiler extends DiagnosticEmitter { module.createSetLocal(tempThis.index, this.makeCallDirect(makeArrayInstance, [ module.createI32(length), - module.createI32(arrayInstance.id), + module.createI32(arrayInstance.ensureClassId(this)), program.options.isWasm64 ? module.createI64(elementType.alignLog2) : module.createI32(elementType.alignLog2), @@ -8115,7 +8116,7 @@ export class Compiler extends DiagnosticEmitter { ? module.createI64(classInstance.currentMemoryOffset) : module.createI32(classInstance.currentMemoryOffset) ], reportNode), - module.createI32(classInstance.id) + module.createI32(classInstance.ensureClassId(this)) ], reportNode); } } @@ -8320,7 +8321,7 @@ export class Compiler extends DiagnosticEmitter { module.createBreak(label, module.createBinary(BinaryOp.EqI32, // classId == class.id module.createTeeLocal(idTemp.index, idExpr), - module.createI32(classInstance.id) + module.createI32(classInstance.ensureClassId(this)) ), module.createI32(1) // ? true ) @@ -8335,6 +8336,134 @@ export class Compiler extends DiagnosticEmitter { flow.popBreakLabel(); return module.createBlock(label, conditions, NativeType.I32); } + + /** Reserves the function index / class id for the following `makeIterate` operation. */ + makeIterateReserve(classInstance: Class): u32 { + var functionTable = this.functionTable; + var functionIndex = functionTable.length; + functionTable.push(classInstance.iterateName); + return functionIndex; + } + + /** Makes the managed iteration function of the specified class. */ + makeIterate(classInstance: Class, functionIndex: i32): void { + var program = this.program; + assert(classInstance.type.isManaged(program)); + + // check if the class implements a custom iteration function (only valid for library elements) + var members = classInstance.members; + if (classInstance.isDeclaredInLibrary) { + if (members !== null && members.has("__iterate")) { + let iterPrototype = members.get("__iterate")!; + assert(iterPrototype.kind == ElementKind.FUNCTION_PROTOTYPE); + let iterInstance = assert(program.resolver.resolveFunction(iterPrototype, null)); + assert(iterInstance.is(CommonFlags.PRIVATE | CommonFlags.INSTANCE)); + assert(iterInstance.hasDecorator(DecoratorFlags.UNSAFE)); + assert(!iterInstance.isAny(CommonFlags.AMBIENT | CommonFlags.VIRTUAL)); + let signature = iterInstance.signature; + let parameterTypes = signature.parameterTypes; + assert(parameterTypes.length == 1); + assert(parameterTypes[0].signatureReference); + assert(signature.returnType == Type.void); + iterInstance.internalName = classInstance.iterateName; + assert(this.compileFunction(iterInstance)); + this.ensureFunctionTableEntry(iterInstance); + return; + } + } + + var module = this.module; + var options = this.options; + var nativeSizeType = options.nativeSizeType; + var nativeSizeSize = options.usizeType.byteSize; + // var signatureStr = Signature.makeSignatureString([ Type.u32 ], Type.void, options.usizeType); + var body = new Array(); + + // nothing to mark if 'this' is null (should not happen) + // body.push( + // module.createIf( + // module.createUnary( + // options.isWasm64 + // ? UnaryOp.EqzI64 + // : UnaryOp.EqzI32, + // module.createGetLocal(0, nativeSizeType) + // ), + // module.createReturn() + // ) + // ); + + // remember the function index so we don't recurse infinitely + var functionTable = this.functionTable; + var functionName = classInstance.iterateName; + assert(functionIndex < functionTable.length); + assert(functionTable[functionIndex] == functionName); + + // if the class extends a base class, call its hook first + var baseInstance = classInstance.base; + if (baseInstance) { + let baseType = baseInstance.type; + let baseClassId = baseInstance.ensureClassId(this); + assert(baseType.isManaged(program)); + body.push( + // BASECLASS~iterate.call(this, fn) + module.createCall(functionTable[baseClassId], [ + module.createGetLocal(0, nativeSizeType), + module.createGetLocal(1, NativeType.I32) + ], NativeType.None) + ); + } + + // iterate references assigned to own fields + if (members) { + for (let member of members.values()) { + if (member.kind == ElementKind.FIELD) { + if ((member).parent === classInstance) { + let fieldType = (member).type; + if (fieldType.isManaged(program)) { + let fieldClass = fieldType.classReference!; + let fieldClassId = fieldClass.ensureClassId(this); + let fieldOffset = (member).memoryOffset; + assert(fieldOffset >= 0); + body.push( + // if ($2 = value) { fn($2); FIELDCLASS~iterate($2, fn); } + module.createIf( + module.createTeeLocal(2, + module.createLoad( + nativeSizeSize, + false, + module.createGetLocal(0, nativeSizeType), + nativeSizeType, + fieldOffset + ) + ), + module.createBlock(null, [ + module.createCallIndirect( + module.createGetLocal(1, NativeType.I32), + [ + module.createGetLocal(2, nativeSizeType) + ], "FUNCSIG$vi" + ), + module.createCall(functionTable[fieldClassId], [ + module.createGetLocal(2, nativeSizeType), + module.createGetLocal(1, NativeType.I32) + ], NativeType.None) + ]) + ) + ); + } + } + } + } + } + + // add the function to the module and return its table index + module.addFunction( + functionName, + this.ensureFunctionType([ Type.u32 ], Type.void, options.usizeType), + members ? [ nativeSizeType ] : null, + module.createBlock(null, body) + ); + } } // helpers diff --git a/src/program.ts b/src/program.ts index 1b05f1e9f5..3441e1c29c 100644 --- a/src/program.ts +++ b/src/program.ts @@ -18,7 +18,8 @@ import { import { Options, - Feature + Feature, + Compiler } from "./compiler"; import { @@ -308,6 +309,13 @@ function operatorKindFromDecorator(decoratorKind: DecoratorKind, arg: string): O return OperatorKind.INVALID; } +/** Garbage collector kind present. */ +export enum CollectorKind { + NONE, + TRACING, + COUNTING +} + /** Represents an AssemblyScript program. */ export class Program extends DiagnosticEmitter { @@ -367,25 +375,24 @@ export class Program extends DiagnosticEmitter { /** Runtime make array function. `makeArray(capacity: i32, source: usize = 0, cid: u32): usize` */ makeArrayInstance: Function | null = null; + /** The kind of garbage collector being present. */ + collectorKind: CollectorKind = CollectorKind.NONE; + /** Memory allocation implementation, if present: `__mem_allocate(size: usize): usize` */ allocateMem: Function | null = null; + /** Memory free implementation, if present: `__mem_free(ref: usize): void` */ freeMem: Function | null = null; + /** Reference link implementation, if present: `__ref_link(ref: usize, parentRef: usize): void` */ linkRef: Function | null = null; + /** Reference unlink implementation, if present: `__ref_unlink(ref: usize, parentRef: usize): void` */ unlinkRef: Function | null = null; + /** Reference retain implementation, if present: `__ref_retain(ref: usize): void` */ retainRef: Function | null = null; + /** Reference release implementation, if present: `__ref_release(ref: usize): void` */ releaseRef: Function | null = null; /** Next class id. */ nextClassId: u32 = 1; - // gc integration - - /** Whether a garbage collector is present or not. */ - get gcImplemented(): bool { - return this.lookupGlobal("__ref_collect") !== null; - } - /** Garbage collector mark function called to on reachable managed objects. */ - gcMarkInstance: Function | null = null; // FIXME - /** Constructs a new program, optionally inheriting parser diagnostics. */ constructor( /** Shared array of diagnostic messages (emitted so far). */ @@ -402,12 +409,12 @@ export class Program extends DiagnosticEmitter { /** Gets the size of a common runtime header. */ get runtimeHeaderSize(): i32 { - return this.gcImplemented ? 16 : 8; + return this.collectorKind ? 16 : 8; } /** Writes a common runtime header to the specified buffer. */ - writeRuntimeHeader(buffer: Uint8Array, offset: i32, classInstance: Class, payloadSize: u32): void { - writeI32(classInstance.id, buffer, offset); + writeRuntimeHeader(buffer: Uint8Array, offset: i32, classId: i32, payloadSize: u32): void { + writeI32(classId, buffer, offset); writeI32(payloadSize, buffer, offset + 4); } @@ -854,12 +861,14 @@ export class Program extends DiagnosticEmitter { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.unlinkRef = this.resolver.resolveFunction(element, null); } + this.collectorKind = CollectorKind.TRACING; } else if (element = this.lookupGlobal("__ref_retain")) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.retainRef = this.resolver.resolveFunction(element, null); element = assert(this.lookupGlobal("__ref_release")); assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.releaseRef = this.resolver.resolveFunction(element, null); + this.collectorKind = CollectorKind.COUNTING; } } } @@ -2999,14 +3008,27 @@ export class Class extends TypedElement { constructorInstance: Function | null = null; /** Operator overloads. */ overloads: Map | null = null; - /** Function index of the GC hook. */ - gcHookIndex: u32 = -1; /** Unique class id. */ private _id: u32 = 0; - /** Gets the unique id of this class. */ - get id(): u32 { + + /** Ensures that this class has an id. */ + ensureClassId(compiler: Compiler): i32 { var id = this._id; - if (!id) this._id = id = this.program.nextClassId++; + if (!id) { + assert(!this.hasDecorator(DecoratorFlags.UNMANAGED)); + let program = this.program; + if (program.collectorKind == CollectorKind.TRACING) { + // tracing GC uses the function index of the iteration function as the + // class's id so it can call the id directly, which avoids to generate + // a helper function with a big switch mapping ids to function indexes. + // here: might be called recursively in makeIterate, so reserve the id. + this._id = id = compiler.makeIterateReserve(this); + compiler.makeIterate(this, id); + } else { + // counting GC or none just increments without any iterate functions + this._id = id = program.nextClassId++; + } + } return id; } @@ -3031,6 +3053,11 @@ export class Class extends TypedElement { ); } + /** Gets the name of this class's GC iteration function. */ + get iterateName(): string { + return this.internalName + "~iterate"; + } + /** Constructs a new class. */ constructor( /** Name incl. type parameters, i.e. `Foo`. */ diff --git a/src/types.ts b/src/types.ts index 3a627d5e65..09b9e1643c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -7,7 +7,8 @@ import { Class, FunctionTarget, Program, - DecoratorFlags + DecoratorFlags, + CollectorKind } from "./program"; import { @@ -152,7 +153,7 @@ export class Type { /** Tests if this is a managed type that needs GC hooks. */ isManaged(program: Program): bool { - if (program.gcImplemented) { + if (program.collectorKind != CollectorKind.NONE) { let classReference = this.classReference; return classReference !== null && !classReference.hasDecorator(DecoratorFlags.UNMANAGED); } diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 8a2ef3457b..7a3a26f01a 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -1,6 +1,6 @@ /// -import { ALLOCATE, REALLOCATE, DISCARD, REGISTER, MAX_BYTELENGTH, MAKEARRAY, ArrayBufferView } from "./runtime"; +import { ALLOCATE, REALLOCATE, DISCARD, REGISTER, MAX_BYTELENGTH, MAKEARRAY, ArrayBufferView, classId } from "./runtime"; import { ArrayBuffer } from "./arraybuffer"; import { COMPARATOR, SORT } from "./util/sort"; import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number"; @@ -804,13 +804,22 @@ export class Array extends ArrayBufferView { // GC integration - @unsafe private __iter(fn: (ref: usize) => void): void { + @unsafe private __iterate(fn: (ref: usize) => void): void { fn(changetype(this.data)); if (isManaged()) { let cur = this.dataStart; let end = cur + this.dataLength; while (cur < end) { - fn(load(cur)); + let val = load(cur); + if (isNullable()) { + if (val) { + fn(val); + call_indirect(classId(), val, fn); + } + } else { + fn(val); + call_indirect(classId(), val, fn); + } cur += sizeof(); } } diff --git a/std/assembly/collector/itcm.ts b/std/assembly/collector/itcm.ts index e49adc4b64..0b6bcf38d1 100644 --- a/std/assembly/collector/itcm.ts +++ b/std/assembly/collector/itcm.ts @@ -159,14 +159,12 @@ function step(): void { if (TRACE) trace("itcm~step/MARK iterate", 1, objToRef(obj)); iter = obj; obj.color = i32(!white); - // if (TRACE) { - // trace(" next/prev/hook", 3, - // changetype(obj.next), - // changetype(obj.prev), - // changetype(obj.hookFn) - // ); - // } - obj.hookFn(objToRef(obj)); + // CLASS~iterate(ref, fn) + call_indirect(obj.classId, objToRef(obj), (ref: usize): void => { + trace(" iter", 1, ref); + var obj = refToObj(ref); + if (obj.color == white) obj.makeGray(); + }); } else { if (TRACE) trace("itcm~step/MARK finish"); iterateRoots((ref: usize): void => { @@ -237,7 +235,7 @@ export function __ref_register(ref: usize): void { step(); // also makes sure it's initialized var obj = refToObj(ref); obj.color = white; - fromSpace.push(obj); + fromSpace.push(obj); // sets gc-reserved header fields } // @ts-ignore: decorator diff --git a/std/assembly/fixedarray.ts b/std/assembly/fixedarray.ts index 6e6e8ca3e6..cd1891ed1e 100644 --- a/std/assembly/fixedarray.ts +++ b/std/assembly/fixedarray.ts @@ -1,4 +1,4 @@ -import { ALLOCATE, REGISTER, MAX_BYTELENGTH, HEADER, HEADER_SIZE } from "./runtime"; +import { ALLOCATE, REGISTER, MAX_BYTELENGTH, HEADER, HEADER_SIZE, classId } from "./runtime"; import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_HOLEYARRAY } from "./util/error"; // NOTE: DO NOT USE YET! @@ -71,12 +71,21 @@ export class FixedArray { // GC integration - @unsafe private __iter(fn: (ref: usize) => void): void { + @unsafe private __iterate(fn: (ref: usize) => void): void { if (isManaged()) { let cur = changetype(this); let end = cur + changetype
(changetype(this) - HEADER_SIZE).payloadSize; while (cur < end) { - fn(load(cur)); + let val = load(cur); + if (isNullable()) { + if (val) { + fn(val); + call_indirect(classId(), val, fn); + } + } else { + fn(val); + call_indirect(classId(), val, fn); + } cur += sizeof(); } } diff --git a/std/assembly/map.ts b/std/assembly/map.ts index 85f75b2abf..73ab45140d 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -1,6 +1,7 @@ /// import { HASH } from "./util/hash"; +import { classId } from "./runtime"; // A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht @@ -267,7 +268,7 @@ export class Map { // GC integration - @unsafe private __iter(fn: (ref: usize) => void): void { + @unsafe private __iterate(fn: (ref: usize) => void): void { fn(changetype(this.buckets)); var entries = this.entries; fn(changetype(entries)); @@ -277,8 +278,30 @@ export class Map { while (cur < end) { let entry = changetype>(cur); if (!(entry.taggedNext & EMPTY)) { - if (isManaged()) fn(changetype(entry.key)); - if (isManaged()) fn(changetype(entry.value)); + if (isManaged()) { + let val = changetype(entry.key); + if (isNullable()) { + if (val) { + fn(val); + call_indirect(classId(), val, fn); + } + } else { + fn(val); + call_indirect(classId(), val, fn); + } + } + if (isManaged()) { + let val = changetype(entry.value); + if (isNullable()) { + if (val) { + fn(val); + call_indirect(classId(), val, fn); + } + } else { + fn(val); + call_indirect(classId(), val, fn); + } + } } cur += ENTRY_SIZE(); } diff --git a/std/assembly/set.ts b/std/assembly/set.ts index 943bee2842..d48d7d1d89 100644 --- a/std/assembly/set.ts +++ b/std/assembly/set.ts @@ -1,6 +1,7 @@ /// import { HASH } from "./util/hash"; +import { classId } from "./runtime"; // A deterministic hash set based on CloseTable from https://github.com/jorendorff/dht @@ -197,7 +198,7 @@ export class Set { // GC integration - @unsafe private __iter(fn: (ref: usize) => void): void { + @unsafe private __iterate(fn: (ref: usize) => void): void { fn(changetype(this.buckets)); var entries = this.entries; fn(changetype(entries)); @@ -206,7 +207,18 @@ export class Set { let end = cur + this.entriesOffset * ENTRY_SIZE(); while (cur < end) { let entry = changetype>(cur); - if (!(entry.taggedNext & EMPTY)) fn(changetype(entry.key)); + if (!(entry.taggedNext & EMPTY)) { + let val = changetype(entry.key); + if (isNullable()) { + if (val) { + fn(val); + call_indirect(classId(), val, fn); + } + } else { + fn(val); + call_indirect(classId(), val, fn); + } + } cur += ENTRY_SIZE(); } } diff --git a/tests/compiler/gc.optimized.wat b/tests/compiler/gc.optimized.wat index 364307690c..736d770dbd 100644 --- a/tests/compiler/gc.optimized.wat +++ b/tests/compiler/gc.optimized.wat @@ -1,11 +1,11 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -25,8 +25,8 @@ (data (i32.const 232) "g\00c\00.\00u\00n\00l\00i\00n\00k") (data (i32.const 256) "\02\00\00\00\14") (data (i32.const 272) "g\00c\00.\00c\00o\00l\00l\00e\00c\00t") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (table $0 6 funcref) + (elem (i32.const 0) $null $gc/Ref~iterate $gc/Ref~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $gc/Ref~iterate) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) @@ -39,6 +39,7 @@ (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/gc/gc.implemented i32 (i32.const 1)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/gc/GC_ROOT (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) @@ -139,7 +140,10 @@ i32.const 16 i32.add ) - (func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/Ref~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $gc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 i32.const 1 local.get $0 @@ -156,7 +160,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 292 @@ -191,7 +195,23 @@ call $gc/_dummy/__ref_register local.get $0 ) - (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set~iterate (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $0 + i32.const 1 + global.set $~lib/argc + local.get $0 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/memory/memory.fill (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -402,7 +422,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -421,10 +441,10 @@ local.get $0 call $~lib/memory/memory.fill local.get $1 - i32.const 4 + i32.const 5 call $~lib/runtime/register ) - (func $gc/_dummy/__ref_link (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $gc/_dummy/__ref_link (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 200 i32.const 2 local.get $0 @@ -444,7 +464,7 @@ local.get $0 global.set $gc/_dummy/link_parentRef ) - (func $gc/_dummy/__ref_unlink (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $gc/_dummy/__ref_unlink (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 232 i32.const 2 local.get $0 @@ -464,7 +484,7 @@ local.get $1 global.set $gc/_dummy/unlink_parentRef ) - (func $~lib/set/Set#clear (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -527,7 +547,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 13 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate @@ -555,7 +575,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -586,7 +606,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -629,7 +649,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -638,7 +658,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -773,7 +793,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -856,7 +876,7 @@ i32.store end ) - (func $~lib/gc/gc.retain (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/gc/gc.retain (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) global.get $~lib/gc/GC_ROOT local.tee $1 @@ -872,7 +892,7 @@ call $gc/_dummy/__ref_link end ) - (func $~lib/set/Set#delete (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -932,7 +952,7 @@ call $~lib/set/Set#rehash end ) - (func $~lib/gc/gc.release (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/gc/gc.release (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) global.get $~lib/gc/GC_ROOT local.tee $1 @@ -947,7 +967,7 @@ call $gc/_dummy/__ref_unlink end ) - (func $~lib/gc/gc.collect (; 20 ;) (type $FUNCSIG$v) + (func $~lib/gc/gc.collect (; 22 ;) (type $FUNCSIG$v) i32.const 272 i32.const 0 f64.const 0 @@ -961,7 +981,7 @@ i32.add global.set $gc/_dummy/collect_count ) - (func $gc/main (; 21 ;) (type $FUNCSIG$v) + (func $gc/main (; 23 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1112,7 +1132,7 @@ unreachable end ) - (func $null (; 22 ;) (type $FUNCSIG$v) + (func $null (; 24 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/gc.untouched.wat b/tests/compiler/gc.untouched.wat index 607482d5e4..eaa108334a 100644 --- a/tests/compiler/gc.untouched.wat +++ b/tests/compiler/gc.untouched.wat @@ -1,12 +1,12 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$vii (func (param i32 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" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) @@ -18,8 +18,8 @@ (data (i32.const 184) "\02\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00l\00i\00n\00k\00") (data (i32.const 216) "\02\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00u\00n\00l\00i\00n\00k\00") (data (i32.const 256) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00c\00o\00l\00l\00e\00c\00t\00") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (table $0 6 funcref) + (elem (i32.const 0) $null $gc/Ref~iterate $~lib/string/String~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/arraybuffer/ArrayBuffer~iterate) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) @@ -35,6 +35,7 @@ (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/gc/gc.implemented i32 (i32.const 1)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/gc/GC_ROOT (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) @@ -166,7 +167,12 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/Ref~iterate (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + ) + (func $~lib/string/String~iterate (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $gc/_dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 i32.const 1 local.get $0 @@ -183,7 +189,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -221,7 +227,7 @@ call $gc/_dummy/__ref_register local.get $0 ) - (func $gc/Ref#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $gc/Ref#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -233,7 +239,24 @@ end local.get $0 ) - (func $~lib/memory/memory.fill (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/set/Set~iterate (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/memory/memory.fill (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -490,7 +513,10 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer~iterate (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -519,11 +545,11 @@ local.get $3 local.set $2 local.get $2 - i32.const 4 + i32.const 5 call $~lib/runtime/register end ) - (func $gc/_dummy/__ref_link (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $gc/_dummy/__ref_link (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 200 i32.const 2 local.get $0 @@ -543,7 +569,7 @@ local.get $0 global.set $gc/_dummy/link_parentRef ) - (func $gc/_dummy/__ref_unlink (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $gc/_dummy/__ref_unlink (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 232 i32.const 2 local.get $0 @@ -563,7 +589,7 @@ local.get $1 global.set $gc/_dummy/unlink_parentRef ) - (func $~lib/set/Set#clear (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -632,7 +658,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -666,7 +692,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -708,7 +734,7 @@ local.set $1 local.get $1 ) - (func $~lib/set/Set#find (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -759,7 +785,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -774,7 +800,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -944,7 +970,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1042,7 +1068,7 @@ i32.store end ) - (func $~lib/gc/gc.retain (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/gc/gc.retain (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) global.get $~lib/gc/GC_ROOT local.set $1 @@ -1059,7 +1085,7 @@ call $gc/_dummy/__ref_link end ) - (func $~lib/set/Set#delete (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1132,7 +1158,7 @@ end i32.const 1 ) - (func $~lib/gc/gc.release (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/gc/gc.release (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) global.get $~lib/gc/GC_ROOT local.set $1 @@ -1149,7 +1175,7 @@ call $gc/_dummy/__ref_unlink end ) - (func $gc/_dummy/__ref_collect (; 23 ;) (type $FUNCSIG$v) + (func $gc/_dummy/__ref_collect (; 27 ;) (type $FUNCSIG$v) i32.const 272 i32.const 0 f64.const 0 @@ -1163,10 +1189,10 @@ i32.add global.set $gc/_dummy/collect_count ) - (func $~lib/gc/gc.collect (; 24 ;) (type $FUNCSIG$v) + (func $~lib/gc/gc.collect (; 28 ;) (type $FUNCSIG$v) call $gc/_dummy/__ref_collect ) - (func $gc/main (; 25 ;) (type $FUNCSIG$v) + (func $gc/main (; 29 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1329,7 +1355,7 @@ unreachable end ) - (func $start (; 26 ;) (type $FUNCSIG$v) + (func $start (; 30 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -1344,6 +1370,6 @@ call $~lib/set/Set#constructor global.set $~lib/gc/GC_ROOT ) - (func $null (; 27 ;) (type $FUNCSIG$v) + (func $null (; 31 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/gc/global-assign.optimized.wat b/tests/compiler/gc/global-assign.optimized.wat index fcf96b23cb..a1dab65e7c 100644 --- a/tests/compiler/gc/global-assign.optimized.wat +++ b/tests/compiler/gc/global-assign.optimized.wat @@ -1,5 +1,6 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) @@ -14,8 +15,8 @@ (data (i32.const 72) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") (data (i32.const 96) "\02\00\00\00&") (data (i32.const 112) "g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (table $0 3 funcref) + (elem (i32.const 0) $null $gc/global-assign/Ref~iterate $gc/global-assign/Ref~iterate) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) (global $gc/_dummy/link_count (mut i32) (i32.const 0)) @@ -112,7 +113,10 @@ i32.const 16 i32.add ) - (func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/global-assign/Ref~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $gc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 i32.const 1 local.get $0 @@ -129,7 +133,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 152 @@ -164,7 +168,7 @@ call $gc/_dummy/__ref_register local.get $0 ) - (func $start:gc/global-assign (; 6 ;) (type $FUNCSIG$v) + (func $start:gc/global-assign (; 7 ;) (type $FUNCSIG$v) i32.const 152 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset @@ -236,7 +240,7 @@ unreachable end ) - (func $gc/global-assign/main (; 7 ;) (type $FUNCSIG$v) + (func $gc/global-assign/main (; 8 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -245,7 +249,7 @@ global.set $~lib/started end ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 9 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/gc/global-assign.untouched.wat b/tests/compiler/gc/global-assign.untouched.wat index ad3ea50a39..ae8392c5e8 100644 --- a/tests/compiler/gc/global-assign.untouched.wat +++ b/tests/compiler/gc/global-assign.untouched.wat @@ -1,5 +1,6 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) @@ -11,8 +12,8 @@ (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 56) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") (data (i32.const 96) "\02\00\00\00&\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s\00") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (table $0 3 funcref) + (elem (i32.const 0) $null $gc/global-assign/Ref~iterate $~lib/string/String~iterate) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) @@ -154,7 +155,12 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/global-assign/Ref~iterate (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + ) + (func $~lib/string/String~iterate (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $gc/_dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 i32.const 1 local.get $0 @@ -171,7 +177,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -209,7 +215,7 @@ call $gc/_dummy/__ref_register local.get $0 ) - (func $gc/global-assign/Ref#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $gc/global-assign/Ref#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -221,7 +227,7 @@ end local.get $0 ) - (func $start:gc/global-assign (; 9 ;) (type $FUNCSIG$v) + (func $start:gc/global-assign (; 11 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -313,7 +319,7 @@ unreachable end ) - (func $gc/global-assign/main (; 10 ;) (type $FUNCSIG$v) + (func $gc/global-assign/main (; 12 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -322,9 +328,9 @@ global.set $~lib/started end ) - (func $start (; 11 ;) (type $FUNCSIG$v) + (func $start (; 13 ;) (type $FUNCSIG$v) call $start:gc/global-assign ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 14 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/gc/global-init.optimized.wat b/tests/compiler/gc/global-init.optimized.wat index 082f73d7ca..9aea1b6d6a 100644 --- a/tests/compiler/gc/global-init.optimized.wat +++ b/tests/compiler/gc/global-init.optimized.wat @@ -1,5 +1,6 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) @@ -14,8 +15,8 @@ (data (i32.const 72) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") (data (i32.const 96) "\02\00\00\00\"") (data (i32.const 112) "g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (table $0 3 funcref) + (elem (i32.const 0) $null $gc/global-init/Ref~iterate $gc/global-init/Ref~iterate) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) (global $gc/_dummy/link_count (mut i32) (i32.const 0)) @@ -111,7 +112,10 @@ i32.const 16 i32.add ) - (func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/global-init/Ref~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $gc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 i32.const 1 local.get $0 @@ -128,7 +132,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 148 @@ -163,7 +167,7 @@ call $gc/_dummy/__ref_register local.get $0 ) - (func $start:gc/global-init (; 6 ;) (type $FUNCSIG$v) + (func $start:gc/global-init (; 7 ;) (type $FUNCSIG$v) i32.const 152 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset @@ -233,7 +237,7 @@ unreachable end ) - (func $gc/global-init/main (; 7 ;) (type $FUNCSIG$v) + (func $gc/global-init/main (; 8 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -242,7 +246,7 @@ global.set $~lib/started end ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 9 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/gc/global-init.untouched.wat b/tests/compiler/gc/global-init.untouched.wat index 17a72f9b66..0a87e6c965 100644 --- a/tests/compiler/gc/global-init.untouched.wat +++ b/tests/compiler/gc/global-init.untouched.wat @@ -1,5 +1,6 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) @@ -11,8 +12,8 @@ (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 56) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") (data (i32.const 96) "\02\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s\00") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (table $0 3 funcref) + (elem (i32.const 0) $null $gc/global-init/Ref~iterate $~lib/string/String~iterate) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) @@ -153,7 +154,12 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/global-init/Ref~iterate (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + ) + (func $~lib/string/String~iterate (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $gc/_dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 i32.const 1 local.get $0 @@ -170,7 +176,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -208,7 +214,7 @@ call $gc/_dummy/__ref_register local.get $0 ) - (func $gc/global-init/Ref#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $gc/global-init/Ref#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -220,7 +226,7 @@ end local.get $0 ) - (func $start:gc/global-init (; 9 ;) (type $FUNCSIG$v) + (func $start:gc/global-init (; 11 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -310,7 +316,7 @@ unreachable end ) - (func $gc/global-init/main (; 10 ;) (type $FUNCSIG$v) + (func $gc/global-init/main (; 12 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -319,9 +325,9 @@ global.set $~lib/started end ) - (func $start (; 11 ;) (type $FUNCSIG$v) + (func $start (; 13 ;) (type $FUNCSIG$v) call $start:gc/global-init ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 14 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/gc/itcm/trace.optimized.wat b/tests/compiler/gc/itcm/trace.optimized.wat index 2fc82d78d3..f7d365420e 100644 --- a/tests/compiler/gc/itcm/trace.optimized.wat +++ b/tests/compiler/gc/itcm/trace.optimized.wat @@ -1,10 +1,10 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -36,34 +36,36 @@ (data (i32.const 600) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K") (data (i32.const 640) "\01\00\00\00,") (data (i32.const 656) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00i\00t\00e\00r\00a\00t\00e") - (data (i32.const 704) "\01\00\00\00*") - (data (i32.const 720) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h") - (data (i32.const 768) "\01\00\00\00$") - (data (i32.const 784) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P") - (data (i32.const 824) "\01\00\00\00(") - (data (i32.const 840) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e") - (data (i32.const 880) "\01\00\00\00,") - (data (i32.const 896) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h") - (data (i32.const 944) "\01\00\00\00\"") - (data (i32.const 960) "#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)") - (data (i32.const 1000) "\01\00\00\00\1e") - (data (i32.const 1016) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 1048) "\01\00\00\00\1a") - (data (i32.const 1064) "i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r") - (data (i32.const 1096) "\01\00\00\00(") - (data (i32.const 1112) "#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)") - (data (i32.const 1152) "\01\00\00\00&") - (data (i32.const 1168) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 1208) "\01\00\00\00\12") - (data (i32.const 1224) "i\00t\00c\00m\00.\00l\00i\00n\00k") - (data (i32.const 1248) "\01\00\00\00\1c") - (data (i32.const 1264) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f") - (data (i32.const 1296) "\01\00\00\00\1a") - (data (i32.const 1312) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1344) "\01\00\00\00\1e") - (data (i32.const 1360) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l") - (table $0 3 funcref) - (elem (i32.const 0) $null $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|0) + (data (i32.const 704) "\01\00\00\00\12") + (data (i32.const 720) " \00 \00 \00 \00 \00i\00t\00e\00r") + (data (i32.const 744) "\01\00\00\00*") + (data (i32.const 760) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h") + (data (i32.const 808) "\01\00\00\00$") + (data (i32.const 824) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P") + (data (i32.const 864) "\01\00\00\00(") + (data (i32.const 880) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e") + (data (i32.const 920) "\01\00\00\00,") + (data (i32.const 936) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h") + (data (i32.const 984) "\01\00\00\00\"") + (data (i32.const 1000) "#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)") + (data (i32.const 1040) "\01\00\00\00\1e") + (data (i32.const 1056) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 1088) "\01\00\00\00\1a") + (data (i32.const 1104) "i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 1136) "\01\00\00\00(") + (data (i32.const 1152) "#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)") + (data (i32.const 1192) "\01\00\00\00&") + (data (i32.const 1208) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 1248) "\01\00\00\00\12") + (data (i32.const 1264) "i\00t\00c\00m\00.\00l\00i\00n\00k") + (data (i32.const 1288) "\01\00\00\00\1c") + (data (i32.const 1304) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f") + (data (i32.const 1336) "\01\00\00\00\1a") + (data (i32.const 1352) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 1384) "\01\00\00\00\1e") + (data (i32.const 1400) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l") + (table $0 10 funcref) + (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1 $~lib/collector/itcm/step~anonymous|0 $gc/itcm/trace/Ref~iterate $~lib/string/String~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) @@ -71,8 +73,8 @@ (global $~lib/collector/itcm/iter (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/argc (mut i32) (i32.const 0)) (global $gc/itcm/trace/ref (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $gc/itcm/trace/arr (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) @@ -80,7 +82,10 @@ (export "table" (table $0)) (export "main" (func $gc/itcm/trace/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -142,7 +147,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/collector/itcm/ManagedObjectList#clear (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 208 i32.const 1 local.get $0 @@ -161,7 +166,7 @@ local.get $0 i32.store offset=12 ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#unlink (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) i32.const 448 i32.const 3 @@ -198,7 +203,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) i32.const 528 i32.const 3 @@ -242,7 +247,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 400 i32.const 1 local.get $0 @@ -276,7 +281,31 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/step~anonymous|0 (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/step~anonymous|0 (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/collector/itcm/step~anonymous|1 (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 720 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace global.get $~lib/collector/itcm/white local.get $0 i32.const 16 @@ -291,7 +320,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/collector/itcm/step (; 8 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/step (; 10 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) block $break|0 @@ -385,14 +414,14 @@ local.tee $0 if local.get $0 - i32.const 1 + i32.const 2 call_indirect (type $FUNCSIG$vi) end global.get $gc/itcm/trace/arr local.tee $0 if local.get $0 - i32.const 1 + i32.const 2 call_indirect (type $FUNCSIG$vi) end i32.const 2 @@ -438,14 +467,13 @@ i32.and i32.or i32.store offset=8 - i32.const 1 - global.set $~lib/argc local.get $1 + i32.const 3 local.get $0 i32.load - call_indirect (type $FUNCSIG$vi) + call_indirect (type $FUNCSIG$vii) else - i32.const 720 + i32.const 760 i32.const 0 f64.const 0 f64.const 0 @@ -457,14 +485,14 @@ local.tee $0 if local.get $0 - i32.const 2 + i32.const 4 call_indirect (type $FUNCSIG$vi) end global.get $gc/itcm/trace/arr local.tee $0 if local.get $0 - i32.const 2 + i32.const 4 call_indirect (type $FUNCSIG$vi) end global.get $~lib/collector/itcm/toSpace @@ -490,7 +518,7 @@ global.set $~lib/collector/itcm/iter i32.const 3 global.set $~lib/collector/itcm/state - i32.const 784 + i32.const 824 i32.const 0 f64.const 0 f64.const 0 @@ -507,7 +535,7 @@ global.get $~lib/collector/itcm/toSpace i32.ne if - i32.const 840 + i32.const 880 i32.const 1 local.get $0 i32.const 16 @@ -524,7 +552,7 @@ i32.and global.set $~lib/collector/itcm/iter else - i32.const 896 + i32.const 936 i32.const 0 f64.const 0 f64.const 0 @@ -547,7 +575,7 @@ end end ) - (func $~lib/collector/itcm/__ref_collect (; 9 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/__ref_collect (; 11 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 72 i32.const 0 @@ -581,7 +609,7 @@ 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 $1 i32) i32.const 1 i32.const 32 @@ -608,8 +636,21 @@ i32.const 16 i32.add ) - (func $~lib/collector/itcm/__ref_register (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 1064 + (func $gc/itcm/trace/Ref~iterate (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + i32.load + local.tee $0 + if + local.get $0 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + local.get $1 + call $gc/itcm/trace/Ref~iterate + end + ) + (func $~lib/collector/itcm/__ref_register (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 1104 i32.const 1 local.get $0 f64.convert_i32_u @@ -634,14 +675,14 @@ local.get $0 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/register (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 1392 + i32.const 1432 i32.le_u if i32.const 0 - i32.const 1016 + i32.const 1056 i32.const 149 i32.const 4 call $~lib/env/abort @@ -656,7 +697,7 @@ i32.ne if i32.const 0 - i32.const 1016 + i32.const 1056 i32.const 151 i32.const 4 call $~lib/env/abort @@ -669,7 +710,7 @@ call $~lib/collector/itcm/__ref_register local.get $0 ) - (func $~lib/memory/memory.fill (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -880,9 +921,19 @@ end end ) - (func $~lib/collector/itcm/__ref_link (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/runtime/ArrayBufferView~iterate (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + i32.load + local.tee $0 + if + local.get $0 + local.get $1 + call_indirect (type $FUNCSIG$vi) + end + ) + (func $~lib/collector/itcm/__ref_link (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) - i32.const 1224 + i32.const 1264 i32.const 2 local.get $0 f64.convert_i32_u @@ -920,7 +971,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/runtime/ArrayBufferView#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 4 call $~lib/runtime/allocate @@ -928,7 +979,7 @@ i32.const 4 call $~lib/memory/memory.fill local.get $1 - i32.const 3 + i32.const 6 call $~lib/runtime/register local.set $1 local.get $0 @@ -936,7 +987,7 @@ if i32.const 12 call $~lib/runtime/allocate - i32.const 4 + i32.const 7 call $~lib/runtime/register local.set $0 end @@ -969,7 +1020,49 @@ i32.store offset=8 local.get $0 ) - (func $~lib/util/memory/memcpy (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array~iterate (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=4 + local.tee $2 + local.get $0 + i32.load offset=8 + i32.add + local.set $3 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + local.get $2 + i32.load + local.tee $0 + if + i32.const 1 + global.set $~lib/argc + local.get $0 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + local.get $1 + call $gc/itcm/trace/Ref~iterate + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $continue|0 + end + end + ) + (func $~lib/util/memory/memcpy (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1816,7 +1909,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2010,7 +2103,7 @@ end end ) - (func $~lib/runtime/reallocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/reallocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2034,7 +2127,7 @@ i32.shl i32.const 0 local.get $0 - i32.const 1392 + i32.const 1432 i32.gt_u select i32.const 32 @@ -2072,11 +2165,11 @@ i32.eq if local.get $0 - i32.const 1392 + i32.const 1432 i32.le_u if i32.const 0 - i32.const 1016 + i32.const 1056 i32.const 113 i32.const 8 call $~lib/env/abort @@ -2105,7 +2198,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/ensureCapacity (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) i32.const 1 @@ -2145,7 +2238,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__unchecked_set (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__unchecked_set (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=4 @@ -2165,7 +2258,7 @@ end end ) - (func $~lib/array/Array#__set (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__set (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -2184,14 +2277,14 @@ i32.store offset=12 end ) - (func $start:gc/itcm/trace (; 22 ;) (type $FUNCSIG$v) + (func $start:gc/itcm/trace (; 27 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 1392 + i32.const 1432 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset call $~lib/collector/itcm/__ref_collect - i32.const 960 + i32.const 1000 i32.const 0 f64.const 0 f64.const 0 @@ -2199,12 +2292,16 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 0 + i32.const 4 call $~lib/runtime/allocate - i32.const 2 + i32.const 5 call $~lib/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 global.set $gc/itcm/trace/ref - i32.const 1112 + i32.const 1152 i32.const 0 f64.const 0 f64.const 0 @@ -2214,7 +2311,7 @@ call $~lib/env/trace i32.const 16 call $~lib/runtime/allocate - i32.const 5 + i32.const 8 call $~lib/runtime/register call $~lib/runtime/ArrayBufferView#constructor local.tee $0 @@ -2225,7 +2322,7 @@ i32.store offset=12 local.get $0 global.set $gc/itcm/trace/arr - i32.const 1264 + i32.const 1304 i32.const 0 f64.const 0 f64.const 0 @@ -2236,7 +2333,7 @@ global.get $gc/itcm/trace/arr global.get $gc/itcm/trace/ref call $~lib/array/Array#__set - i32.const 1360 + i32.const 1400 i32.const 0 f64.const 0 f64.const 0 @@ -2247,8 +2344,9 @@ global.get $gc/itcm/trace/arr i32.const 0 call $~lib/array/Array#__set + call $~lib/collector/itcm/__ref_collect ) - (func $gc/itcm/trace/main (; 23 ;) (type $FUNCSIG$v) + (func $gc/itcm/trace/main (; 28 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -2257,7 +2355,7 @@ global.set $~lib/started end ) - (func $null (; 24 ;) (type $FUNCSIG$v) + (func $null (; 29 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/gc/itcm/trace.ts b/tests/compiler/gc/itcm/trace.ts index 7e784f75be..8c0e269977 100644 --- a/tests/compiler/gc/itcm/trace.ts +++ b/tests/compiler/gc/itcm/trace.ts @@ -10,7 +10,9 @@ assert(gc.implemented); gc.collect(); // trigger init -class Ref {} +class Ref { + inner: Ref; +} trace("# ref = new Ref()"); var ref = new Ref(); @@ -21,6 +23,6 @@ arr[0] = ref; trace("# arr[0] = null"); arr[0] = null; -// TODO... +gc.collect(); // FIXME: should do nothing yet, but collects arr.data ? @start export function main(): void {} diff --git a/tests/compiler/gc/itcm/trace.untouched.wat b/tests/compiler/gc/itcm/trace.untouched.wat index eb48feb63a..b33feda9e6 100644 --- a/tests/compiler/gc/itcm/trace.untouched.wat +++ b/tests/compiler/gc/itcm/trace.untouched.wat @@ -1,10 +1,10 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) @@ -24,21 +24,22 @@ (data (i32.const 512) "\01\00\00\006\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") (data (i32.const 584) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K\00") (data (i32.const 640) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00i\00t\00e\00r\00a\00t\00e\00") - (data (i32.const 704) "\01\00\00\00*\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h\00") - (data (i32.const 768) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P\00") - (data (i32.const 824) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e\00") - (data (i32.const 880) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h\00") - (data (i32.const 944) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)\00") - (data (i32.const 1000) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 1048) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") - (data (i32.const 1096) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)\00") - (data (i32.const 1152) "\01\00\00\00&\00\00\00\00\00\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 1208) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00l\00i\00n\00k\00") - (data (i32.const 1248) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f\00") - (data (i32.const 1296) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 1344) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l\00") - (table $0 3 funcref) - (elem (i32.const 0) $null $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1) + (data (i32.const 704) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00i\00t\00e\00r\00") + (data (i32.const 744) "\01\00\00\00*\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h\00") + (data (i32.const 808) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P\00") + (data (i32.const 864) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e\00") + (data (i32.const 920) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h\00") + (data (i32.const 984) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)\00") + (data (i32.const 1040) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 1088) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 1136) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)\00") + (data (i32.const 1192) "\01\00\00\00&\00\00\00\00\00\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 1248) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00l\00i\00n\00k\00") + (data (i32.const 1288) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f\00") + (data (i32.const 1336) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 1384) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l\00") + (table $0 10 funcref) + (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1 $~lib/collector/itcm/step~anonymous|2 $gc/itcm/trace/Ref~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) (global $gc/itcm/trace/GC_TRACE i32 (i32.const 1)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) @@ -50,19 +51,22 @@ (global $~lib/gc/gc.implemented i32 (i32.const 1)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $gc/itcm/trace/ref (mut i32) (i32.const 0)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $gc/itcm/trace/arr (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 1392)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 1432)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/itcm/trace/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -141,12 +145,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/collector/itcm/ManagedObjectList#clear (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) i32.const 208 i32.const 1 @@ -170,13 +174,13 @@ local.get $0 i32.store offset=12 ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/ManagedObject#get:color (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 i32.and ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/ManagedObject#get:next (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 @@ -184,7 +188,7 @@ i32.xor i32.and ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#set:next (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 local.get $0 @@ -194,7 +198,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#unlink (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -240,7 +244,7 @@ local.get $1 call $~lib/collector/itcm/ManagedObject#set:next ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -288,7 +292,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) i32.const 400 i32.const 1 @@ -329,7 +333,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/step~anonymous|0 (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/step~anonymous|0 (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) block $~lib/collector/itcm/refToObj|inlined.0 (result i32) @@ -349,7 +353,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/collector/itcm/ManagedObject#set:color (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#set:color (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $0 i32.load offset=8 @@ -361,13 +365,18 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/ManagedObject#get:hookFn (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - ) (func $~lib/collector/itcm/step~anonymous|1 (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) + i32.const 720 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace block $~lib/collector/itcm/refToObj|inlined.1 (result i32) local.get $0 local.set $1 @@ -385,14 +394,34 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/allocator/arena/__mem_free (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/step~anonymous|2 (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + block $~lib/collector/itcm/refToObj|inlined.2 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/allocator/arena/__mem_free (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (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.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/collector/itcm/step (; 17 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/step (; 18 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) block $break|0 @@ -504,7 +533,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 1 + i32.const 2 call $~iterateRoots i32.const 2 global.set $~lib/collector/itcm/state @@ -550,8 +579,6 @@ global.get $~lib/collector/itcm/white i32.eqz call $~lib/collector/itcm/ManagedObject#set:color - i32.const 1 - global.set $~lib/argc block $~lib/collector/itcm/objToRef|inlined.11 (result i32) local.get $0 local.set $1 @@ -559,11 +586,12 @@ global.get $~lib/runtime/HEADER_SIZE i32.add end + i32.const 3 local.get $0 - call $~lib/collector/itcm/ManagedObject#get:hookFn - call_indirect (type $FUNCSIG$vi) + i32.load + call_indirect (type $FUNCSIG$vii) else - i32.const 720 + i32.const 760 i32.const 0 f64.const 0 f64.const 0 @@ -571,7 +599,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 2 + i32.const 4 call $~iterateRoots global.get $~lib/collector/itcm/iter call $~lib/collector/itcm/ManagedObject#get:next @@ -594,7 +622,7 @@ global.set $~lib/collector/itcm/iter i32.const 3 global.set $~lib/collector/itcm/state - i32.const 784 + i32.const 824 i32.const 0 f64.const 0 f64.const 0 @@ -616,7 +644,7 @@ global.get $~lib/collector/itcm/toSpace i32.ne if - i32.const 840 + i32.const 880 i32.const 1 block $~lib/collector/itcm/objToRef|inlined.12 (result i32) local.get $0 @@ -642,7 +670,7 @@ call $~lib/memory/memory.free end else - i32.const 896 + i32.const 936 i32.const 0 f64.const 0 f64.const 0 @@ -669,7 +697,7 @@ unreachable end ) - (func $~lib/collector/itcm/__ref_collect (; 18 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/__ref_collect (; 19 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 72 i32.const 0 @@ -709,10 +737,10 @@ end end ) - (func $~lib/gc/gc.collect (; 19 ;) (type $FUNCSIG$v) + (func $~lib/gc/gc.collect (; 20 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/__ref_collect ) - (func $~lib/runtime/ADJUSTOBLOCK (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -724,7 +752,7 @@ i32.sub i32.shl ) - (func $~lib/runtime/allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -746,10 +774,24 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/collector/itcm/__ref_register (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/itcm/trace/Ref~iterate (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load + local.tee $2 + if + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $2 + local.get $1 + call $gc/itcm/trace/Ref~iterate + end + ) + (func $~lib/collector/itcm/__ref_register (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) - i32.const 1064 + i32.const 1104 i32.const 1 local.get $0 f64.convert_i32_u @@ -759,7 +801,7 @@ f64.const 0 call $~lib/env/trace call $~lib/collector/itcm/step - block $~lib/collector/itcm/refToObj|inlined.2 (result i32) + block $~lib/collector/itcm/refToObj|inlined.3 (result i32) local.get $0 local.set $1 local.get $1 @@ -774,7 +816,7 @@ local.get $2 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/register (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -782,7 +824,7 @@ i32.eqz if i32.const 0 - i32.const 1016 + i32.const 1056 i32.const 149 i32.const 4 call $~lib/env/abort @@ -799,7 +841,7 @@ i32.eqz if i32.const 0 - i32.const 1016 + i32.const 1056 i32.const 151 i32.const 4 call $~lib/env/abort @@ -812,19 +854,22 @@ call $~lib/collector/itcm/__ref_register local.get $0 ) - (func $gc/itcm/trace/Ref#constructor (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $gc/itcm/trace/Ref#constructor (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if - i32.const 0 + i32.const 4 call $~lib/runtime/allocate - i32.const 2 + i32.const 5 call $~lib/runtime/register local.set $0 end local.get $0 + i32.const 0 + i32.store + local.get $0 ) - (func $~lib/memory/memory.fill (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1081,7 +1126,10 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer~iterate (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -1089,7 +1137,7 @@ i32.gt_u if i32.const 0 - i32.const 1168 + i32.const 1208 i32.const 25 i32.const 43 call $~lib/env/abort @@ -1110,14 +1158,28 @@ local.get $3 local.set $2 local.get $2 - i32.const 3 + i32.const 6 call $~lib/runtime/register end ) - (func $~lib/collector/itcm/__ref_link (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/runtime/ArrayBufferView~iterate (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load + local.tee $2 + if + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $2 + local.get $1 + call $~lib/arraybuffer/ArrayBuffer~iterate + end + ) + (func $~lib/collector/itcm/__ref_link (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - i32.const 1224 + i32.const 1264 i32.const 2 local.get $0 f64.convert_i32_u @@ -1127,7 +1189,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - block $~lib/collector/itcm/refToObj|inlined.3 (result i32) + block $~lib/collector/itcm/refToObj|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 @@ -1142,7 +1204,7 @@ i32.eq local.tee $2 if (result i32) - block $~lib/collector/itcm/refToObj|inlined.5 (result i32) + block $~lib/collector/itcm/refToObj|inlined.6 (result i32) local.get $0 local.set $2 local.get $2 @@ -1160,7 +1222,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/runtime/ArrayBufferView#constructor (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1172,7 +1234,7 @@ i32.gt_u if i32.const 0 - i32.const 1016 + i32.const 1056 i32.const 232 i32.const 57 call $~lib/env/abort @@ -1191,7 +1253,7 @@ if i32.const 12 call $~lib/runtime/allocate - i32.const 4 + i32.const 7 call $~lib/runtime/register local.set $0 end @@ -1231,14 +1293,63 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array~iterate (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=8 + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + i32.load + local.set $4 + local.get $4 + if + i32.const 1 + global.set $~lib/argc + local.get $4 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $4 + local.get $1 + call $gc/itcm/trace/Ref~iterate + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/array/Array#constructor (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 else i32.const 16 call $~lib/runtime/allocate - i32.const 5 + i32.const 8 call $~lib/runtime/register end local.get $1 @@ -1253,7 +1364,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/util/memory/memcpy (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2454,7 +2565,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2685,7 +2796,7 @@ end end ) - (func $~lib/runtime/reallocate (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2755,7 +2866,7 @@ i32.eqz if i32.const 0 - i32.const 1016 + i32.const 1056 i32.const 113 i32.const 8 call $~lib/env/abort @@ -2789,7 +2900,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2810,7 +2921,7 @@ i32.gt_u if i32.const 0 - i32.const 1312 + i32.const 1352 i32.const 13 i32.const 64 call $~lib/env/abort @@ -2864,7 +2975,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__unchecked_set (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2894,7 +3005,7 @@ end end ) - (func $~lib/array/Array#__set (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -2920,7 +3031,7 @@ i32.store offset=12 end ) - (func $start:gc/itcm/trace (; 36 ;) (type $FUNCSIG$v) + (func $start:gc/itcm/trace (; 41 ;) (type $FUNCSIG$v) global.get $~lib/runtime/HEADER_SIZE i32.const 16 i32.eq @@ -2954,7 +3065,7 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset call $~lib/gc/gc.collect - i32.const 960 + i32.const 1000 i32.const 0 f64.const 0 f64.const 0 @@ -2965,7 +3076,7 @@ i32.const 0 call $gc/itcm/trace/Ref#constructor global.set $gc/itcm/trace/ref - i32.const 1112 + i32.const 1152 i32.const 0 f64.const 0 f64.const 0 @@ -2977,7 +3088,7 @@ i32.const 1 call $~lib/array/Array#constructor global.set $gc/itcm/trace/arr - i32.const 1264 + i32.const 1304 i32.const 0 f64.const 0 f64.const 0 @@ -2989,7 +3100,7 @@ i32.const 0 global.get $gc/itcm/trace/ref call $~lib/array/Array#__set - i32.const 1360 + i32.const 1400 i32.const 0 f64.const 0 f64.const 0 @@ -3001,8 +3112,9 @@ i32.const 0 i32.const 0 call $~lib/array/Array#__set + call $~lib/gc/gc.collect ) - (func $gc/itcm/trace/main (; 37 ;) (type $FUNCSIG$v) + (func $gc/itcm/trace/main (; 42 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -3011,12 +3123,12 @@ global.set $~lib/started end ) - (func $start (; 38 ;) (type $FUNCSIG$v) + (func $start (; 43 ;) (type $FUNCSIG$v) call $start:gc/itcm/trace ) - (func $null (; 39 ;) (type $FUNCSIG$v) + (func $null (; 44 ;) (type $FUNCSIG$v) ) - (func $~iterateRoots (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~iterateRoots (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) global.get $gc/itcm/trace/ref local.tee $1 diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index b61fb14755..4a741d229e 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1,4 +1,6 @@ (module + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -10,21 +12,22 @@ (data (i32.const 25) "\01\02") (data (i32.const 32) "\02\00\00\00\10") (data (i32.const 48) "\18\00\00\00\18\00\00\00\03\00\00\00\03") - (data (i32.const 64) "\03\00\00\00(") + (data (i32.const 64) "\04\00\00\00(") (data (i32.const 80) "s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") - (data (i32.const 120) "\03\00\00\00\1a") + (data (i32.const 120) "\04\00\00\00\1a") (data (i32.const 136) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 168) "\01\00\00\00\0c") (data (i32.const 188) "\01\00\00\00\02") - (data (i32.const 200) "\04\00\00\00\10") + (data (i32.const 200) "\05\00\00\00\10") (data (i32.const 216) "\b8\00\00\00\b8\00\00\00\0c\00\00\00\03") (data (i32.const 232) "\01") - (data (i32.const 248) "\04\00\00\00\10") + (data (i32.const 248) "\05\00\00\00\10") (data (i32.const 264) "\f8\00\00\00\f8") - (data (i32.const 280) "\03\00\00\00\1e") + (data (i32.const 280) "\04\00\00\00\1e") (data (i32.const 296) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (table $0 13 funcref) + (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) + (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 264)) (global $std/array-literal/i (mut i32) (i32.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -38,7 +41,18 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/array/Array#__get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/array/Array~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/array/Array#__get (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -57,7 +71,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -80,7 +94,7 @@ i32.add i32.load ) - (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -142,7 +156,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -169,7 +183,7 @@ i32.const 16 i32.add ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 328 @@ -202,7 +216,7 @@ i32.store local.get $0 ) - (func $~lib/runtime/makeArray (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/makeArray (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 16 @@ -237,19 +251,56 @@ i32.store offset=12 local.get $0 ) - (func $std/array-literal/Ref#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) + (func $std/array-literal/Ref#constructor (; 9 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/allocate - i32.const 5 + i32.const 7 call $~lib/runtime/register ) - (func $std/array-literal/RefWithCtor#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array~iterate (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=4 + local.tee $2 + local.get $0 + i32.load offset=8 + i32.add + local.set $0 + loop $continue|0 + local.get $2 + local.get $0 + i32.lt_u + if + local.get $2 + i32.load + local.set $3 + i32.const 1 + global.set $~lib/argc + local.get $3 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $continue|0 + end + end + ) + (func $std/array-literal/RefWithCtor#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/allocate - i32.const 7 + i32.const 10 call $~lib/runtime/register ) - (func $start:std/array-literal (; 9 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 12 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -443,7 +494,7 @@ end i32.const 0 global.set $std/array-literal/i - i32.const 4 + i32.const 5 i32.const 2 call $~lib/runtime/makeArray local.tee $2 @@ -519,7 +570,7 @@ call $~lib/env/abort unreachable end - i32.const 6 + i32.const 8 i32.const 2 call $~lib/runtime/makeArray local.tee $2 @@ -547,7 +598,7 @@ call $~lib/env/abort unreachable end - i32.const 8 + i32.const 11 i32.const 2 call $~lib/runtime/makeArray local.tee $2 @@ -576,10 +627,10 @@ unreachable end ) - (func $start (; 10 ;) (type $FUNCSIG$v) + (func $start (; 13 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 11 ;) (type $FUNCSIG$v) + (func $null (; 14 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 377d9d77aa..6a93778be0 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -1,28 +1,29 @@ (module + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\01\02") (data (i32.const 32) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\18\00\00\00\03\00\00\00\03\00\00\00") - (data (i32.const 64) "\03\00\00\00(\00\00\00\00\00\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 120) "\03\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 64) "\04\00\00\00(\00\00\00\00\00\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 120) "\04\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 168) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 200) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\b8\00\00\00\b8\00\00\00\0c\00\00\00\03\00\00\00") + (data (i32.const 200) "\05\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\b8\00\00\00\b8\00\00\00\0c\00\00\00\03\00\00\00") (data (i32.const 232) "\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 248) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\f8\00\00\00\f8\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 280) "\03\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (table $0 1 funcref) - (elem (i32.const 0) $null) - (global $std/array-literal/staticArrayI8 i32 (i32.const 48)) + (data (i32.const 248) "\05\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\f8\00\00\00\f8\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 280) "\04\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (table $0 13 funcref) + (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/string/String~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array-literal/Ref~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array-literal/RefWithCtor~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/argc (mut i32) (i32.const 0)) + (global $std/array-literal/staticArrayI8 i32 (i32.const 48)) (global $std/array-literal/staticArrayI32 i32 (i32.const 216)) (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 264)) (global $std/array-literal/i (mut i32) (i32.const 0)) @@ -39,11 +40,25 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/array/Array#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/array/Array~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/array/Array#get:length (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/array/Array#__unchecked_get (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -52,7 +67,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__get (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -71,11 +86,19 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#get:length (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array~iterate (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/array/Array#get:length (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -84,7 +107,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -103,7 +126,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/runtime/ADJUSTOBLOCK (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -115,7 +138,7 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__mem_allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -194,12 +217,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/memory/memory.allocate (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -221,10 +244,10 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/collector/dummy/__ref_register (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/register (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -262,13 +285,13 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/collector/dummy/__ref_link (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/util/memory/memcpy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1469,7 +1492,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1700,7 +1723,7 @@ end end ) - (func $~lib/runtime/makeArray (; 17 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/makeArray (; 21 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1764,39 +1787,136 @@ end local.get $4 ) - (func $std/array-literal/Ref#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/Ref~iterate (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + ) + (func $std/array-literal/Ref#constructor (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 call $~lib/runtime/allocate - i32.const 5 + i32.const 7 call $~lib/runtime/register local.set $0 end local.get $0 ) - (func $~lib/array/Array#get:length (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array~iterate (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=8 + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + i32.load + local.set $4 + i32.const 1 + global.set $~lib/argc + local.get $4 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $4 + local.get $1 + call $std/array-literal/Ref~iterate + local.get $2 + i32.const 4 + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/array/Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/array-literal/RefWithCtor#constructor (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/RefWithCtor~iterate (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $std/array-literal/RefWithCtor#constructor (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 call $~lib/runtime/allocate - i32.const 7 + i32.const 10 call $~lib/runtime/register local.set $0 end local.get $0 ) - (func $~lib/array/Array#get:length (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array~iterate (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=8 + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + i32.load + local.set $4 + i32.const 1 + global.set $~lib/argc + local.get $4 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $4 + local.get $1 + call $std/array-literal/RefWithCtor~iterate + local.get $2 + i32.const 4 + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/array/Array#get:length (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $start:std/array-literal (; 22 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 30 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2028,7 +2148,7 @@ global.set $std/array-literal/i block (result i32) i32.const 3 - i32.const 4 + i32.const 5 i32.const 2 i32.const 0 call $~lib/runtime/makeArray @@ -2119,7 +2239,7 @@ end block (result i32) i32.const 3 - i32.const 6 + i32.const 8 i32.const 2 i32.const 0 call $~lib/runtime/makeArray @@ -2178,7 +2298,7 @@ end block (result i32) i32.const 3 - i32.const 8 + i32.const 11 i32.const 2 i32.const 0 call $~lib/runtime/makeArray @@ -2236,9 +2356,9 @@ unreachable end ) - (func $start (; 23 ;) (type $FUNCSIG$v) + (func $start (; 31 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 24 ;) (type $FUNCSIG$v) + (func $null (; 32 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 5ce6486507..02b007bf2f 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2,10 +2,10 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$fii (func (param i32 i32) (result f32))) @@ -36,7 +36,7 @@ (data (i32.const 152) "s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 176) "\02\00\00\00\05") (data (i32.const 192) "\01\02\03\04\05") - (data (i32.const 200) "\07\00\00\00\10") + (data (i32.const 200) "\08\00\00\00\10") (data (i32.const 216) "\c0\00\00\00\c0\00\00\00\05\00\00\00\05") (data (i32.const 232) "\02\00\00\00\05") (data (i32.const 248) "\01\01\01\04\05") @@ -51,7 +51,7 @@ (data (i32.const 392) "\01\01\00\02\02") (data (i32.const 400) "\02\00\00\00\14") (data (i32.const 416) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 440) "\08\00\00\00\10") + (data (i32.const 440) "\n\00\00\00\10") (data (i32.const 456) "\a0\01\00\00\a0\01\00\00\14\00\00\00\05") (data (i32.const 472) "\02\00\00\00\14") (data (i32.const 488) "\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") @@ -194,14 +194,14 @@ (data (i32.const 3032) "A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?") (data (i32.const 3208) "\02\00\00\00 ") (data (i32.const 3226) "\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") - (data (i32.const 3256) "\t\00\00\00\10") + (data (i32.const 3256) "\"\00\00\00\10") (data (i32.const 3272) "\98\0c\00\00\98\0c\00\00 \00\00\00\08") (data (i32.const 3288) "\02\00\00\00 ") (data (i32.const 3306) "\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") (data (i32.const 3336) "\02\00\00\00@") (data (i32.const 3358) "\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?") (data (i32.const 3398) "\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") - (data (i32.const 3416) "\n\00\00\00\10") + (data (i32.const 3416) ":\00\00\00\10") (data (i32.const 3432) "\18\0d\00\00\18\0d\00\00@\00\00\00\08") (data (i32.const 3448) "\02\00\00\00@") (data (i32.const 3470) "\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf") @@ -214,7 +214,7 @@ (data (i32.const 3616) "\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02") (data (i32.const 3640) "\02\00\00\00\14") (data (i32.const 3656) "\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02") - (data (i32.const 3680) "\08\00\00\00\10") + (data (i32.const 3680) "\n\00\00\00\10") (data (i32.const 3696) "H\0e\00\00H\0e\00\00\14\00\00\00\05") (data (i32.const 3712) "\02\00\00\00\14") (data (i32.const 3732) "\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") @@ -252,11 +252,11 @@ (data (i32.const 4184) "\01") (data (i32.const 4200) "\02\00\00\00\1c") (data (i32.const 4216) "\08\10\00\00 \10\00\00\08\10\00\008\10\00\00P\10\00\00h\10") - (data (i32.const 4248) "\0e\00\00\00\10") + (data (i32.const 4248) "K\00\00\00\10") (data (i32.const 4264) "x\10\00\00x\10\00\00\1c\00\00\00\07") (data (i32.const 4280) "\02\00\00\00\1c") (data (i32.const 4296) "h\10\00\00\08\10\00\00\08\10\00\008\10\00\00 \10\00\00P\10") - (data (i32.const 4328) "\0e\00\00\00\10") + (data (i32.const 4328) "K\00\00\00\10") (data (i32.const 4344) "\c8\10\00\00\c8\10\00\00\1c\00\00\00\07") (data (i32.const 4360) "\01\00\00\00\1c") (data (i32.const 4376) "~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") @@ -280,7 +280,7 @@ (data (i32.const 4648) "0") (data (i32.const 4656) "\02\00\00\00\90\01") (data (i32.const 4672) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 5072) "\08\00\00\00\10") + (data (i32.const 5072) "\n\00\00\00\10") (data (i32.const 5088) "@\12\00\00@\12\00\00\90\01\00\00d") (data (i32.const 5104) "\02\00\00\00\0c") (data (i32.const 5120) "\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") @@ -314,15 +314,15 @@ (data (i32.const 5584) "I\00n\00f\00i\00n\00i\00t\00y") (data (i32.const 5600) "\02\00\00\00\b8\02") (data (i32.const 5616) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0) + (table $0 102 funcref) + (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/string/String~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/string/String~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|2 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|16 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $start:std/array~anonymous|47 $~lib/array/Array>~iterate $~lib/string/String~iterate $~lib/array/Array>~iterate $start:std/array~anonymous|48 $~lib/array/Array<~lib/string/String | null>~iterate $~lib/array/Array<~lib/string/String | null>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/array/Array>~iterate $~lib/array/Array>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/string/String~iterate $~lib/array/Array<~lib/string/String | null>~iterate $~lib/array/Array<~lib/string/String | null>~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/Null (mut i32) (i32.const 0)) (global $std/array/arr8 (mut i32) (i32.const 216)) @@ -417,7 +418,6 @@ (global $std/array/cwArr (mut i32) (i32.const 0)) (global $std/array/includes (mut i32) (i32.const 0)) (global $std/array/sarr (mut i32) (i32.const 1752)) - (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/every (mut i32) (i32.const 0)) (global $std/array/some (mut i32) (i32.const 0)) (global $std/array/newArr (mut i32) (i32.const 0)) @@ -465,7 +465,10 @@ (export "table" (table $0)) (export "main" (func $std/array/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -527,7 +530,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -554,7 +557,7 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) block $~lib/util/memory/memset|inlined.0 @@ -779,7 +782,7 @@ end end ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 8060 @@ -812,7 +815,7 @@ i32.store local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -835,7 +838,17 @@ i32.const 2 call $~lib/runtime/register ) - (func $~lib/runtime/ArrayBufferView#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/ArrayBufferView~iterate (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + i32.load + local.tee $0 + if + local.get $0 + local.get $1 + call_indirect (type $FUNCSIG$vi) + end + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1073741808 local.get $2 @@ -887,7 +900,15 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array~iterate (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/array/Array#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 call $~lib/runtime/allocate @@ -904,7 +925,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#fill (; 9 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/array/Array#fill (; 12 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) local.get $0 @@ -969,7 +990,7 @@ call $~lib/memory/memory.fill end ) - (func $~lib/util/memory/memcpy (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1816,7 +1837,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2010,7 +2031,7 @@ end end ) - (func $~lib/runtime/makeArray (; 12 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/makeArray (; 15 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) i32.const 16 @@ -2051,7 +2072,7 @@ end local.get $1 ) - (func $~lib/array/Array#__get (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2070,7 +2091,7 @@ i32.add i32.load8_u ) - (func $std/array/isArraysEqual (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2117,7 +2138,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 15 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/array/Array#fill (; 18 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $0 i32.load offset=4 @@ -2189,7 +2210,7 @@ end end ) - (func $~lib/array/Array#__get (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2212,7 +2233,7 @@ i32.add i32.load ) - (func $std/array/isArraysEqual (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2262,7 +2283,7 @@ end i32.const 1 ) - (func $~lib/runtime/reallocate (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2366,7 +2387,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureCapacity (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -2415,7 +2436,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2438,7 +2459,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/array/Array#pop (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2470,7 +2491,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#concat (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2510,7 +2531,7 @@ call $~lib/memory/memory.copy local.get $4 ) - (func $~lib/array/Array#copyWithin (; 23 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 26 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 @@ -2675,7 +2696,7 @@ end local.get $0 ) - (func $~lib/array/Array#unshift (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#unshift (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2704,7 +2725,7 @@ local.get $2 i32.store offset=12 ) - (func $~lib/array/Array#shift (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2749,7 +2770,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#reverse (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#reverse (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2796,7 +2817,7 @@ end end ) - (func $~lib/array/Array#indexOf (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2860,7 +2881,7 @@ end i32.const -1 ) - (func $~lib/array/Array#includes (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 local.get $2 @@ -2868,7 +2889,7 @@ i32.const 0 i32.ge_s ) - (func $~lib/array/Array#splice (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2960,7 +2981,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#__set (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -2989,11 +3010,11 @@ i32.store offset=12 end ) - (func $start:std/array~anonymous|0 (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $~lib/array/Array#findIndex (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3041,17 +3062,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3059,7 +3080,7 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3067,12 +3088,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3120,12 +3141,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3133,12 +3154,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3146,12 +3167,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3199,12 +3220,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3212,12 +3233,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3225,13 +3246,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 50 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3274,7 +3295,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3283,7 +3304,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -3292,7 +3313,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 56 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.eqz @@ -3389,11 +3410,11 @@ end end ) - (func $start:std/array~anonymous|21 (; 54 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 57 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#map (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#map (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3403,7 +3424,7 @@ local.get $0 i32.load offset=12 local.tee $3 - i32.const 9 + i32.const 34 i32.const 2 i32.const 0 call $~lib/runtime/makeArray @@ -3439,7 +3460,7 @@ local.get $6 local.get $1 local.get $0 - i32.const 22 + i32.const 33 call_indirect (type $FUNCSIG$fiii) f32.store local.get $1 @@ -3451,7 +3472,7 @@ end local.get $4 ) - (func $~lib/array/Array#__get (; 56 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 59 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -3474,7 +3495,7 @@ i32.add f32.load ) - (func $start:std/array~anonymous|22 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3484,7 +3505,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 58 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#map (; 61 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3539,14 +3560,14 @@ end end ) - (func $start:std/array~anonymous|23 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3556,12 +3577,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 62 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3617,7 +3638,7 @@ end local.get $4 ) - (func $start:std/array~anonymous|26 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3629,7 +3650,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -3638,7 +3659,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3650,12 +3671,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 66 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 69 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3699,7 +3720,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|31 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.eqz if @@ -3710,7 +3731,7 @@ end local.get $0 ) - (func $start:std/array~anonymous|32 (; 69 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 72 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.eqz if @@ -3721,7 +3742,7 @@ end local.get $0 ) - (func $start:std/array~anonymous|33 (; 70 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 73 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -3729,7 +3750,7 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 74 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -3737,7 +3758,7 @@ local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3774,7 +3795,7 @@ end local.get $2 ) - (func $~lib/math/splitMix32 (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 76 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -3806,7 +3827,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 74 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 77 ;) (type $FUNCSIG$vj) (param $0 i64) (local $1 i64) local.get $0 i64.eqz @@ -3871,7 +3892,7 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/util/sort/insertionSort (; 75 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -3953,7 +3974,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 79 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -4209,7 +4230,7 @@ local.get $5 f32.store ) - (func $~lib/array/Array#sort (; 77 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 80 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f32) (local $4 f32) @@ -4277,7 +4298,7 @@ call $~lib/util/sort/weakHeapSort end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 78 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 81 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4306,7 +4327,7 @@ i32.lt_s i32.sub ) - (func $std/array/isArraysEqual (; 79 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 82 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 f32) (local $4 i32) @@ -4367,7 +4388,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 80 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 83 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) @@ -4449,7 +4470,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 81 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 84 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) @@ -4705,7 +4726,7 @@ local.get $5 f64.store ) - (func $~lib/array/Array#sort (; 82 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 85 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 f64) @@ -4773,7 +4794,7 @@ call $~lib/util/sort/weakHeapSort end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 83 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 86 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -4802,7 +4823,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#__get (; 84 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 87 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -4825,7 +4846,7 @@ i32.add f64.load ) - (func $std/array/isArraysEqual (; 85 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 88 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -4886,7 +4907,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 86 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 89 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4968,7 +4989,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 87 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 90 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5224,7 +5245,7 @@ local.get $1 i32.store ) - (func $~lib/array/Array#sort (; 88 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 91 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5295,12 +5316,12 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 89 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 92 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 90 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 93 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -5309,7 +5330,7 @@ i32.lt_u i32.sub ) - (func $~lib/array/Array.create (; 91 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 268435452 i32.gt_u @@ -5337,7 +5358,7 @@ i32.store offset=12 local.get $0 ) - (func $std/array/createReverseOrderedArray (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 95 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5366,7 +5387,7 @@ end local.get $2 ) - (func $~lib/math/NativeMath.random (; 93 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 96 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) global.get $~lib/math/random_seeded @@ -5413,7 +5434,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 97 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5442,7 +5463,7 @@ end local.get $2 ) - (func $std/array/isSorted (; 95 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -5484,7 +5505,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 96 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 99 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -5500,20 +5521,63 @@ unreachable end ) - (func $std/array/assertSortedDefault (; 97 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 100 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 48 + i32.const 63 call $std/array/assertSorted ) - (func $start:std/array~anonymous|44 (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 101 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array.create<~lib/array/Array> (; 99 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array<~lib/array/Array>~iterate (; 102 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=4 + local.tee $2 + local.get $0 + i32.load offset=8 + i32.add + local.set $3 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + local.get $2 + i32.load + local.set $0 + i32.const 1 + global.set $~lib/argc + local.get $0 + local.get $1 + call_indirect (type $FUNCSIG$vi) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $continue|0 + end + end + ) + (func $~lib/array/Array.create<~lib/array/Array> (; 103 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 512 - i32.const 11 + i32.const 68 i32.const 2 i32.const 0 call $~lib/runtime/makeArray @@ -5528,7 +5592,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array<~lib/array/Array>#__set (; 100 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__set (; 104 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -5575,7 +5639,7 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedNestedArray (; 101 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 105 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5607,7 +5671,7 @@ end local.get $1 ) - (func $start:std/array~anonymous|47 (; 102 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -5616,7 +5680,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#sort (; 103 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#sort (; 107 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5677,7 +5741,7 @@ call $~lib/util/sort/insertionSort local.get $0 ) - (func $~lib/array/Array<~lib/array/Array>#__get (; 104 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#__get (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -5712,7 +5776,7 @@ i32.add i32.load ) - (func $std/array/isSorted<~lib/array/Array> (; 105 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/array/Array> (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -5754,7 +5818,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/array/Array> (; 106 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/array/Array> (; 110 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#sort @@ -5770,10 +5834,47 @@ unreachable end ) - (func $~lib/array/Array.create> (; 107 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array>~iterate (; 111 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=4 + local.tee $2 + local.get $0 + i32.load offset=8 + i32.add + local.set $0 + loop $continue|0 + local.get $2 + local.get $0 + i32.lt_u + if + local.get $2 + i32.load + local.set $3 + i32.const 1 + global.set $~lib/argc + local.get $3 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $continue|0 + end + end + ) + (func $~lib/array/Array.create> (; 112 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 512 - i32.const 12 + i32.const 71 i32.const 2 i32.const 0 call $~lib/runtime/makeArray @@ -5788,7 +5889,7 @@ i32.store offset=12 local.get $0 ) - (func $std/array/createReverseOrderedElementsArray (; 108 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 113 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5801,7 +5902,7 @@ if i32.const 4 call $~lib/runtime/allocate - i32.const 13 + i32.const 72 call $~lib/runtime/register local.tee $2 i32.const 511 @@ -5821,14 +5922,53 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 114 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/util/string/compareImpl (; 110 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>~iterate (; 115 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=4 + local.tee $2 + local.get $0 + i32.load offset=8 + i32.add + local.set $0 + loop $continue|0 + local.get $2 + local.get $0 + i32.lt_u + if + local.get $2 + i32.load + local.tee $3 + if + i32.const 1 + global.set $~lib/argc + local.get $3 + local.get $1 + call_indirect (type $FUNCSIG$vi) + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $continue|0 + end + end + ) + (func $~lib/util/string/compareImpl (; 116 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 @@ -5861,7 +6001,7 @@ end local.get $3 ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 111 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5937,7 +6077,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 112 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 118 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) block $1of1 block $0of1 @@ -5949,7 +6089,7 @@ end unreachable end - i32.const 55 + i32.const 77 local.set $1 end local.get $0 @@ -5967,7 +6107,7 @@ unreachable end ) - (func $~lib/string/String.__eq (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 119 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -6013,7 +6153,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array/isArraysEqual<~lib/string/String | null> (; 114 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual<~lib/string/String | null> (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -6060,10 +6200,10 @@ end i32.const 1 ) - (func $~lib/array/Array.create<~lib/string/String> (; 115 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array.create<~lib/string/String> (; 121 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 400 - i32.const 15 + i32.const 78 i32.const 2 i32.const 0 call $~lib/runtime/makeArray @@ -6078,7 +6218,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/string/String#charAt (; 116 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#charAt (; 122 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 3020 @@ -6104,7 +6244,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/string/String#concat (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 123 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6153,7 +6293,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/string/String.__concat (; 118 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 124 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 4424 local.get $0 @@ -6161,7 +6301,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 119 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 125 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 4200 @@ -6193,7 +6333,7 @@ end local.get $1 ) - (func $std/array/createRandomStringArray (; 120 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createRandomStringArray (; 126 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) call $~lib/array/Array.create<~lib/string/String> @@ -6220,7 +6360,7 @@ end local.get $1 ) - (func $~lib/string/String#substring (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6316,7 +6456,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/runtime/discard (; 122 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/discard (; 128 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 8060 i32.le_u @@ -6343,7 +6483,7 @@ unreachable end ) - (func $~lib/array/Array#join_bool (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_bool (; 129 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6495,7 +6635,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/util/number/decimalCount32 (; 124 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 130 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -6549,7 +6689,7 @@ end end ) - (func $~lib/util/number/utoa32_lut (; 125 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 131 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) i32.const 5092 @@ -6659,7 +6799,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 126 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 132 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6701,7 +6841,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/util/number/itoa_stream (; 127 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 133 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6745,7 +6885,7 @@ end local.get $2 ) - (func $~lib/array/Array#join_int (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 134 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6863,12 +7003,12 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/array/Array#join (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int ) - (func $~lib/util/number/utoa32 (; 130 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 136 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -6891,7 +7031,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/util/number/itoa_stream (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6915,7 +7055,7 @@ call $~lib/util/number/utoa32_lut local.get $0 ) - (func $~lib/array/Array#join_int (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7033,12 +7173,12 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/array/Array#join (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int ) - (func $~lib/util/number/genDigits (; 134 ;) (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 (; 140 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -7453,7 +7593,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 135 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 141 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -7712,7 +7852,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 136 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 142 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -8000,7 +8140,7 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 137 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 143 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -8045,7 +8185,7 @@ call $~lib/runtime/discard local.get $1 ) - (func $~lib/util/number/dtoa_stream (; 138 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 144 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -8116,7 +8256,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join_flt (; 139 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_flt (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8232,7 +8372,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/array/Array<~lib/string/String>#join_str (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join_str (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8402,18 +8542,18 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/array/Array<~lib/string/String>#join (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String>#join_str ) - (func $std/array/Ref#constructor (; 142 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/Ref#constructor (; 148 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/allocate - i32.const 19 + i32.const 87 call $~lib/runtime/register ) - (func $~lib/array/Array#join_ref (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_ref (; 149 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8546,12 +8686,12 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/array/Array#toString (; 144 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 150 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa_stream (; 145 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 151 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -8606,7 +8746,7 @@ end local.get $2 ) - (func $~lib/array/Array#join_int (; 146 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 152 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8718,7 +8858,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/util/number/itoa_stream (; 147 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 153 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -8748,7 +8888,7 @@ call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join_int (; 148 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 154 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8864,7 +9004,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/util/number/decimalCount64 (; 149 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 155 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -8918,7 +9058,7 @@ end end ) - (func $~lib/util/number/utoa64_lut (; 150 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 156 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9015,7 +9155,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 151 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 157 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9057,7 +9197,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/util/number/itoa_stream (; 152 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 158 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -9097,7 +9237,7 @@ end local.get $1 ) - (func $~lib/array/Array#join_int (; 153 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 159 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9213,7 +9353,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/util/number/itoa64 (; 154 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 160 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9278,7 +9418,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/util/number/itoa_stream (; 155 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 161 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -9341,7 +9481,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9457,12 +9597,12 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/array/Array<~lib/string/String | null>#toString (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#toString (; 163 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/string/String>#join ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 158 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 164 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9557,7 +9697,7 @@ local.get $1 end ) - (func $~lib/util/number/itoa_stream (; 159 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 165 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -9587,7 +9727,7 @@ call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join_int (; 160 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 166 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9699,7 +9839,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 161 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 167 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9791,7 +9931,47 @@ local.get $1 end ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate (; 168 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=4 + local.tee $2 + local.get $0 + i32.load offset=8 + i32.add + local.set $3 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + local.get $2 + i32.load + local.set $0 + i32.const 1 + global.set $~lib/argc + local.get $0 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array>~iterate + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $continue|0 + end + end + ) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 169 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9886,7 +10066,7 @@ local.get $1 end ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 163 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 170 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9978,7 +10158,7 @@ local.get $1 end ) - (func $start:std/array (; 164 ;) (type $FUNCSIG$v) + (func $start:std/array (; 171 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10012,12 +10192,12 @@ end i32.const 0 call $~lib/runtime/allocate - i32.const 5 + i32.const 6 call $~lib/runtime/register drop i32.const 12 call $~lib/runtime/allocate - i32.const 6 + i32.const 7 call $~lib/runtime/register i32.const 1 i32.const 0 @@ -10030,7 +10210,7 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 7 + i32.const 8 i32.const 0 i32.const 248 call $~lib/runtime/makeArray @@ -10051,7 +10231,7 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 7 + i32.const 8 i32.const 0 i32.const 320 call $~lib/runtime/makeArray @@ -10072,7 +10252,7 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 7 + i32.const 8 i32.const 0 i32.const 344 call $~lib/runtime/makeArray @@ -10093,7 +10273,7 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 7 + i32.const 8 i32.const 0 i32.const 368 call $~lib/runtime/makeArray @@ -10114,7 +10294,7 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 7 + i32.const 8 i32.const 0 i32.const 392 call $~lib/runtime/makeArray @@ -10135,7 +10315,7 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 8 + i32.const 10 i32.const 2 i32.const 488 call $~lib/runtime/makeArray @@ -10157,7 +10337,7 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 8 + i32.const 10 i32.const 2 i32.const 528 call $~lib/runtime/makeArray @@ -10179,7 +10359,7 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 8 + i32.const 10 i32.const 2 i32.const 568 call $~lib/runtime/makeArray @@ -10201,7 +10381,7 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 8 + i32.const 10 i32.const 2 i32.const 608 call $~lib/runtime/makeArray @@ -10223,7 +10403,7 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 8 + i32.const 10 i32.const 2 i32.const 648 call $~lib/runtime/makeArray @@ -12532,7 +12712,7 @@ i32.const 3 call $~lib/array/Array#__set global.get $std/array/arr - i32.const 1 + i32.const 12 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -12545,7 +12725,7 @@ unreachable end global.get $std/array/arr - i32.const 2 + i32.const 13 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -12560,7 +12740,7 @@ unreachable end global.get $std/array/arr - i32.const 3 + i32.const 14 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -12575,7 +12755,7 @@ unreachable end global.get $std/array/arr - i32.const 4 + i32.const 15 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -12602,7 +12782,7 @@ unreachable end global.get $std/array/arr - i32.const 5 + i32.const 16 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -12629,7 +12809,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 6 + i32.const 17 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -12662,7 +12842,7 @@ i32.const 3 call $~lib/array/Array#push global.get $std/array/arr - i32.const 7 + i32.const 18 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -12677,7 +12857,7 @@ unreachable end global.get $std/array/arr - i32.const 8 + i32.const 19 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -12690,7 +12870,7 @@ unreachable end global.get $std/array/arr - i32.const 9 + i32.const 20 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -12717,7 +12897,7 @@ unreachable end global.get $std/array/arr - i32.const 10 + i32.const 21 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -12742,7 +12922,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 11 + i32.const 22 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -12775,7 +12955,7 @@ i32.const 3 call $~lib/array/Array#push global.get $std/array/arr - i32.const 12 + i32.const 23 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -12790,7 +12970,7 @@ unreachable end global.get $std/array/arr - i32.const 13 + i32.const 24 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -12803,7 +12983,7 @@ unreachable end global.get $std/array/arr - i32.const 14 + i32.const 25 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -12828,7 +13008,7 @@ unreachable end global.get $std/array/arr - i32.const 15 + i32.const 26 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -12855,7 +13035,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 16 + i32.const 27 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -12888,7 +13068,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 17 + i32.const 28 call $~lib/array/Array#forEach global.get $std/array/i i32.const 6 @@ -12904,7 +13084,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 18 + i32.const 29 call $~lib/array/Array#forEach global.get $std/array/i i32.const 6 @@ -12932,7 +13112,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 19 + i32.const 30 call $~lib/array/Array#forEach global.get $std/array/i i32.const 406 @@ -12960,7 +13140,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 20 + i32.const 31 call $~lib/array/Array#forEach global.get $std/array/i i32.const 1 @@ -12992,7 +13172,7 @@ i32.const 3 call $~lib/array/Array#push global.get $std/array/arr - i32.const 21 + i32.const 32 call $~lib/array/Array#forEach global.get $std/array/arr i32.load offset=12 @@ -13067,7 +13247,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 23 + i32.const 36 call $~lib/array/Array#map global.get $std/array/i i32.const 6 @@ -13095,7 +13275,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 24 + i32.const 37 call $~lib/array/Array#map global.get $std/array/i i32.const 406 @@ -13123,7 +13303,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 25 + i32.const 38 call $~lib/array/Array#map global.get $std/array/i i32.const 1 @@ -13155,7 +13335,7 @@ i32.const 3 call $~lib/array/Array#push global.get $std/array/arr - i32.const 26 + i32.const 39 call $~lib/array/Array#filter global.set $std/array/filteredArr global.get $std/array/filteredArr @@ -13173,7 +13353,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 27 + i32.const 40 call $~lib/array/Array#filter drop global.get $std/array/i @@ -13202,7 +13382,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 28 + i32.const 41 call $~lib/array/Array#filter drop global.get $std/array/i @@ -13231,7 +13411,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 29 + i32.const 42 call $~lib/array/Array#filter drop global.get $std/array/i @@ -13264,7 +13444,7 @@ i32.const 3 call $~lib/array/Array#push global.get $std/array/arr - i32.const 30 + i32.const 43 i32.const 0 call $~lib/array/Array#reduce global.set $std/array/i @@ -13280,7 +13460,7 @@ unreachable end global.get $std/array/arr - i32.const 31 + i32.const 44 i32.const 4 call $~lib/array/Array#reduce global.set $std/array/i @@ -13296,7 +13476,7 @@ unreachable end global.get $std/array/arr - i32.const 32 + i32.const 45 i32.const 0 call $~lib/array/Array#reduce i32.const 0 @@ -13314,7 +13494,7 @@ unreachable end global.get $std/array/arr - i32.const 33 + i32.const 46 i32.const 0 call $~lib/array/Array#reduce i32.const 0 @@ -13330,7 +13510,7 @@ unreachable end global.get $std/array/arr - i32.const 34 + i32.const 47 i32.const 0 call $~lib/array/Array#reduce global.set $std/array/i @@ -13358,7 +13538,7 @@ unreachable end global.get $std/array/arr - i32.const 35 + i32.const 48 i32.const 0 call $~lib/array/Array#reduce global.set $std/array/i @@ -13386,7 +13566,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 36 + i32.const 49 i32.const 0 call $~lib/array/Array#reduce global.set $std/array/i @@ -13420,7 +13600,7 @@ i32.const 3 call $~lib/array/Array#push global.get $std/array/arr - i32.const 37 + i32.const 50 i32.const 0 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -13436,7 +13616,7 @@ unreachable end global.get $std/array/arr - i32.const 38 + i32.const 51 i32.const 4 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -13452,7 +13632,7 @@ unreachable end global.get $std/array/arr - i32.const 39 + i32.const 52 i32.const 0 call $~lib/array/Array#reduceRight i32.const 0 @@ -13470,7 +13650,7 @@ unreachable end global.get $std/array/arr - i32.const 40 + i32.const 53 i32.const 0 call $~lib/array/Array#reduceRight i32.const 0 @@ -13486,7 +13666,7 @@ unreachable end global.get $std/array/arr - i32.const 41 + i32.const 54 i32.const 0 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -13514,7 +13694,7 @@ unreachable end global.get $std/array/arr - i32.const 42 + i32.const 55 i32.const 0 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -13542,7 +13722,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 43 + i32.const 56 i32.const 0 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -13596,7 +13776,7 @@ end unreachable end - i32.const 44 + i32.const 57 local.set $0 end local.get $1 @@ -13604,7 +13784,7 @@ call $~lib/array/Array#sort global.get $std/array/f32ArrayTyped i32.const 8 - i32.const 9 + i32.const 34 i32.const 2 i32.const 3304 call $~lib/runtime/makeArray @@ -13632,7 +13812,7 @@ end unreachable end - i32.const 45 + i32.const 60 local.set $0 end local.get $1 @@ -13640,7 +13820,7 @@ call $~lib/array/Array#sort global.get $std/array/f64ArrayTyped i32.const 8 - i32.const 10 + i32.const 58 i32.const 3 i32.const 3464 call $~lib/runtime/makeArray @@ -13668,7 +13848,7 @@ end unreachable end - i32.const 46 + i32.const 61 local.set $0 end local.get $1 @@ -13706,7 +13886,7 @@ end unreachable end - i32.const 47 + i32.const 62 local.set $0 end local.get $1 @@ -13715,7 +13895,7 @@ drop global.get $std/array/u32ArrayTyped i32.const 5 - i32.const 8 + i32.const 10 i32.const 2 i32.const 3728 call $~lib/runtime/makeArray @@ -13869,26 +14049,26 @@ call $std/array/createRandomOrderedArray global.set $std/array/randomized257 global.get $std/array/randomized64 - i32.const 49 + i32.const 64 call $std/array/assertSorted global.get $std/array/randomized64 - i32.const 50 + i32.const 65 call $std/array/assertSorted global.get $std/array/randomized257 - i32.const 51 + i32.const 66 call $std/array/assertSorted global.get $std/array/randomized257 - i32.const 52 + i32.const 67 call $std/array/assertSorted call $std/array/createReverseOrderedNestedArray global.set $std/array/reversedNested512 global.get $std/array/reversedNested512 - i32.const 53 + i32.const 70 call $std/array/assertSorted<~lib/array/Array> call $std/array/createReverseOrderedElementsArray global.set $std/array/reversedElements512 global.get $std/array/reversedElements512 - i32.const 54 + i32.const 74 call $std/array/assertSorted<~lib/array/Array> i32.const 1 global.set $~lib/argc @@ -13924,14 +14104,14 @@ end unreachable end - i32.const 56 + i32.const 80 local.set $0 end local.get $1 local.get $0 call $std/array/assertSorted<~lib/array/Array> i32.const 2 - i32.const 16 + i32.const 81 i32.const 0 i32.const 4552 call $~lib/runtime/makeArray @@ -13966,7 +14146,7 @@ unreachable end i32.const 3 - i32.const 8 + i32.const 10 i32.const 2 i32.const 5240 call $~lib/runtime/makeArray @@ -14002,7 +14182,7 @@ unreachable end i32.const 6 - i32.const 10 + i32.const 58 i32.const 3 i32.const 6672 call $~lib/runtime/makeArray @@ -14019,7 +14199,7 @@ unreachable end i32.const 3 - i32.const 15 + i32.const 78 i32.const 2 i32.const 6888 call $~lib/runtime/makeArray @@ -14037,7 +14217,7 @@ unreachable end i32.const 3 - i32.const 20 + i32.const 88 i32.const 2 i32.const 0 call $~lib/runtime/makeArray @@ -14120,7 +14300,7 @@ unreachable end i32.const 3 - i32.const 21 + i32.const 90 i32.const 0 i32.const 7128 call $~lib/runtime/makeArray @@ -14137,7 +14317,7 @@ unreachable end i32.const 3 - i32.const 22 + i32.const 92 i32.const 1 i32.const 7208 call $~lib/runtime/makeArray @@ -14154,7 +14334,7 @@ unreachable end i32.const 3 - i32.const 17 + i32.const 83 i32.const 3 i32.const 7312 call $~lib/runtime/makeArray @@ -14171,7 +14351,7 @@ unreachable end i32.const 4 - i32.const 23 + i32.const 94 i32.const 3 i32.const 7464 call $~lib/runtime/makeArray @@ -14201,7 +14381,7 @@ unreachable end i32.const 4 - i32.const 15 + i32.const 78 i32.const 2 i32.const 7744 call $~lib/runtime/makeArray @@ -14218,7 +14398,7 @@ unreachable end i32.const 2 - i32.const 11 + i32.const 68 i32.const 2 i32.const 0 call $~lib/runtime/makeArray @@ -14254,7 +14434,7 @@ unreachable end i32.const 2 - i32.const 24 + i32.const 96 i32.const 2 i32.const 0 call $~lib/runtime/makeArray @@ -14262,14 +14442,14 @@ i32.load offset=4 local.tee $1 i32.const 2 - i32.const 7 + i32.const 8 i32.const 0 i32.const 7936 call $~lib/runtime/makeArray i32.store local.get $1 i32.const 2 - i32.const 7 + i32.const 8 i32.const 0 i32.const 7960 call $~lib/runtime/makeArray @@ -14290,7 +14470,7 @@ unreachable end i32.const 1 - i32.const 26 + i32.const 100 i32.const 2 i32.const 0 call $~lib/runtime/makeArray @@ -14298,14 +14478,14 @@ i32.load offset=4 local.set $1 i32.const 1 - i32.const 25 + i32.const 98 i32.const 2 i32.const 0 call $~lib/runtime/makeArray local.tee $2 i32.load offset=4 i32.const 1 - i32.const 8 + i32.const 10 i32.const 2 i32.const 8056 call $~lib/runtime/makeArray @@ -14329,7 +14509,7 @@ unreachable end ) - (func $std/array/main (; 165 ;) (type $FUNCSIG$v) + (func $std/array/main (; 172 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -14338,7 +14518,7 @@ global.set $~lib/started end ) - (func $null (; 166 ;) (type $FUNCSIG$v) + (func $null (; 173 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 6c0bc57382..4d57ccbc26 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -2,10 +2,10 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$fii (func (param i32 i32) (result f32))) @@ -34,7 +34,7 @@ (data (i32.const 112) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00") (data (i32.const 136) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 176) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\02\03\04\05") - (data (i32.const 200) "\07\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c0\00\00\00\c0\00\00\00\05\00\00\00\05\00\00\00") + (data (i32.const 200) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c0\00\00\00\c0\00\00\00\05\00\00\00\05\00\00\00") (data (i32.const 232) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\01\04\05") (data (i32.const 256) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 304) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") @@ -42,7 +42,7 @@ (data (i32.const 352) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") (data (i32.const 376) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") (data (i32.const 400) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 440) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a0\01\00\00\a0\01\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 440) "\n\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a0\01\00\00\a0\01\00\00\14\00\00\00\05\00\00\00") (data (i32.const 472) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00") (data (i32.const 512) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 552) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") @@ -118,16 +118,16 @@ (data (i32.const 2976) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") (data (i32.const 3016) "\01\00\00\00\ac\00\00\00\00\00\00\00\00\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?\00") (data (i32.const 3208) "\02\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") - (data (i32.const 3256) "\t\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\98\0c\00\00\98\0c\00\00 \00\00\00\08\00\00\00") + (data (i32.const 3256) "\"\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\98\0c\00\00\98\0c\00\00 \00\00\00\08\00\00\00") (data (i32.const 3288) "\02\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") (data (i32.const 3336) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") - (data (i32.const 3416) "\n\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\18\0d\00\00\18\0d\00\00@\00\00\00\08\00\00\00") + (data (i32.const 3416) ":\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\18\0d\00\00\18\0d\00\00@\00\00\00\08\00\00\00") (data (i32.const 3448) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") (data (i32.const 3528) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02\00\00\00") (data (i32.const 3568) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\d8\0d\00\00\d8\0d\00\00\14\00\00\00\05\00\00\00") (data (i32.const 3600) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02\00\00\00") (data (i32.const 3640) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02\00\00\00") - (data (i32.const 3680) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00H\0e\00\00H\0e\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 3680) "\n\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00H\0e\00\00H\0e\00\00\14\00\00\00\05\00\00\00") (data (i32.const 3712) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") (data (i32.const 3752) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 3768) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\b8\0e\00\00\b8\0e\00\00\00\00\00\00\00\00\00\00") @@ -147,9 +147,9 @@ (data (i32.const 4160) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00b\00a\00") (data (i32.const 4184) "\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 4200) "\02\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00\08\10\00\00 \10\00\00\08\10\00\008\10\00\00P\10\00\00h\10\00\00\00\00\00\00") - (data (i32.const 4248) "\0e\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00x\10\00\00x\10\00\00\1c\00\00\00\07\00\00\00") + (data (i32.const 4248) "K\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00x\10\00\00x\10\00\00\1c\00\00\00\07\00\00\00") (data (i32.const 4280) "\02\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00h\10\00\00\08\10\00\00\08\10\00\008\10\00\00 \10\00\00P\10\00\00\00\00\00\00") - (data (i32.const 4328) "\0e\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c8\10\00\00\c8\10\00\00\1c\00\00\00\07\00\00\00") + (data (i32.const 4328) "K\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c8\10\00\00\c8\10\00\00\1c\00\00\00\07\00\00\00") (data (i32.const 4360) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") (data (i32.const 4408) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00n\00u\00l\00l\00") (data (i32.const 4432) "\02\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\01\00") @@ -161,7 +161,7 @@ (data (i32.const 4600) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") (data (i32.const 4632) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\000\00") (data (i32.const 4656) "\02\00\00\00\90\01\00\00\00\00\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") - (data (i32.const 5072) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00@\12\00\00@\12\00\00\90\01\00\00d\00\00\00") + (data (i32.const 5072) "\n\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00@\12\00\00@\12\00\00\90\01\00\00d\00\00\00") (data (i32.const 5104) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") (data (i32.const 5136) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\001\00-\002\00-\003\00") (data (i32.const 5168) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") @@ -178,11 +178,11 @@ (data (i32.const 5528) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") (data (i32.const 5568) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") (data (i32.const 5600) "\02\00\00\00\b8\02\00\00\00\00\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0) + (table $0 102 funcref) + (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array/P~iterate $~lib/typedarray/Uint8Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|4 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|18 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|30 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|34 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|38 $start:std/array~anonymous|39 $start:std/array~anonymous|40 $start:std/array~anonymous|41 $start:std/array~anonymous|42 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $start:std/array~anonymous|47 $~lib/array/Array>~iterate $std/array/Proxy~iterate $~lib/array/Array>~iterate $start:std/array~anonymous|48 $~lib/array/Array<~lib/string/String | null>~iterate $~lib/array/Array<~lib/string/String | null>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/array/Array<~lib/string/String>~iterate $~lib/array/Array<~lib/string/String>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array/Ref~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/num (mut i32) (i32.const 1)) (global $std/array/Null (mut i32) (i32.const 0)) @@ -243,7 +244,6 @@ (global $std/array/cwArr (mut i32) (i32.const 0)) (global $std/array/includes (mut i32) (i32.const 0)) (global $std/array/sarr (mut i32) (i32.const 1752)) - (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/every (mut i32) (i32.const 0)) (global $std/array/some (mut i32) (i32.const 0)) (global $std/array/newArr (mut i32) (i32.const 0)) @@ -297,7 +297,10 @@ (export "table" (table $0)) (export "main" (func $std/array/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/runtime/ADJUSTOBLOCK (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -309,7 +312,7 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -388,12 +391,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -415,7 +418,7 @@ global.get $~lib/runtime/HEADER_SIZE 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 (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -672,10 +675,13 @@ end end ) - (func $~lib/collector/dummy/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/arraybuffer/ArrayBuffer~iterate (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/collector/dummy/__ref_register (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -713,7 +719,7 @@ call $~lib/collector/dummy/__ref_register 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 $3 i32) local.get $1 @@ -746,13 +752,27 @@ call $~lib/runtime/register end ) - (func $~lib/collector/dummy/__ref_link (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/runtime/ArrayBufferView~iterate (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load + local.tee $2 + if + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $2 + local.get $1 + call $~lib/arraybuffer/ArrayBuffer~iterate + end + ) + (func $~lib/collector/dummy/__ref_link (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/runtime/ArrayBufferView#constructor (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -828,7 +848,15 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array~iterate (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/array/Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -850,7 +878,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array.isArray<~lib/array/Array | null> (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray<~lib/array/Array | null> (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 if (result i32) local.get $0 @@ -860,7 +888,7 @@ i32.const 1 end ) - (func $~lib/array/Array.isArray<~lib/array/Array> (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray<~lib/array/Array> (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 if (result i32) local.get $0 @@ -870,19 +898,21 @@ i32.const 1 end ) - (func $std/array/P#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/P~iterate (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + ) + (func $std/array/P#constructor (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 call $~lib/runtime/allocate - i32.const 5 + i32.const 6 call $~lib/runtime/register local.set $0 end local.get $0 ) - (func $~lib/array/Array.isArray (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -892,14 +922,20 @@ i32.const 0 end ) - (func $~lib/typedarray/Uint8Array#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array~iterate (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + call $~lib/runtime/ArrayBufferView~iterate + ) + (func $~lib/typedarray/Uint8Array#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 else i32.const 12 call $~lib/runtime/allocate - i32.const 6 + i32.const 7 call $~lib/runtime/register end local.get $1 @@ -908,7 +944,7 @@ local.set $0 local.get $0 ) - (func $~lib/array/Array.isArray<~lib/typedarray/Uint8Array> (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray<~lib/typedarray/Uint8Array> (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -918,7 +954,7 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -928,7 +964,7 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray<~lib/string/String> (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray<~lib/string/String> (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -938,7 +974,15 @@ i32.const 0 end ) - (func $~lib/array/Array#fill (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array~iterate (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/array/Array#fill (; 29 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1014,7 +1058,7 @@ end local.get $0 ) - (func $~lib/util/memory/memcpy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2215,7 +2259,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2446,7 +2490,7 @@ end end ) - (func $~lib/runtime/makeArray (; 25 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/makeArray (; 32 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2510,11 +2554,11 @@ end local.get $4 ) - (func $~lib/array/Array#get:length (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -2523,7 +2567,7 @@ i32.add i32.load8_u ) - (func $~lib/array/Array#__get (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2542,7 +2586,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/array/isArraysEqual (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2597,7 +2641,15 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 30 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array~iterate (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/array/Array#fill (; 38 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2683,11 +2735,11 @@ end local.get $0 ) - (func $~lib/array/Array#get:length (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -2696,7 +2748,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2715,7 +2767,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/array/isArraysEqual (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2770,17 +2822,17 @@ end i32.const 1 ) - (func $~lib/array/Array#get:length (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $std/array/internalCapacity (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/internalCapacity (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -2790,14 +2842,14 @@ i32.const 2 i32.shr_s ) - (func $~lib/allocator/arena/__mem_free (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 47 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/reallocate (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2901,7 +2953,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2981,7 +3033,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3008,7 +3060,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#__unchecked_get (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -3017,7 +3069,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3036,7 +3088,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#pop (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3069,7 +3121,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#concat (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3125,7 +3177,7 @@ call $~lib/memory/memory.copy local.get $6 ) - (func $~lib/array/Array#copyWithin (; 47 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 55 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3315,7 +3367,7 @@ end local.get $0 ) - (func $std/array/isArraysEqual (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -3370,7 +3422,7 @@ end i32.const 1 ) - (func $~lib/array/Array#unshift (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#unshift (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3403,7 +3455,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#shift (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3452,7 +3504,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#reverse (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#reverse (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3507,7 +3559,7 @@ end local.get $0 ) - (func $~lib/array/Array#indexOf (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3579,7 +3631,7 @@ end i32.const -1 ) - (func $~lib/array/Array#includes (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 local.get $2 @@ -3587,7 +3639,7 @@ i32.const 0 i32.ge_s ) - (func $~lib/array/Array#splice (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3701,7 +3753,7 @@ i32.store offset=12 local.get $6 ) - (func $~lib/array/Array#__unchecked_set (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 63 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.load offset=4 local.get $1 @@ -3711,7 +3763,7 @@ local.get $2 i32.store ) - (func $~lib/array/Array#__set (; 56 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 64 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3737,12 +3789,12 @@ i32.store offset=12 end ) - (func $start:std/array~anonymous|0 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $~lib/array/Array#findIndex (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3801,17 +3853,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3820,12 +3872,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|4 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|4 (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 71 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3833,12 +3885,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 73 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3898,12 +3950,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3912,12 +3964,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 76 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 77 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3925,12 +3977,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 71 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 79 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3989,12 +4041,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 80 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 73 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 81 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4003,12 +4055,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 83 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4016,13 +4068,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 84 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 77 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 85 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4074,7 +4126,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 86 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4084,13 +4136,13 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|18 (; 79 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|18 (; 87 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 80 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 88 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -4099,7 +4151,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 81 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 89 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.const 0 @@ -4214,11 +4266,19 @@ end end ) - (func $start:std/array~anonymous|21 (; 82 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 90 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#map (; 83 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array~iterate (; 91 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/array/Array#map (; 92 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4234,7 +4294,7 @@ i32.const 0 local.set $3 local.get $4 - i32.const 9 + i32.const 34 i32.const 2 local.get $3 call $~lib/runtime/makeArray @@ -4296,11 +4356,11 @@ end local.get $5 ) - (func $~lib/array/Array#get:length (; 84 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 85 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__unchecked_get (; 94 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $0 i32.load offset=4 local.get $1 @@ -4309,7 +4369,7 @@ i32.add f32.load ) - (func $~lib/array/Array#__get (; 86 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 95 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -4328,7 +4388,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $start:std/array~anonymous|22 (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 96 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4339,7 +4399,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 88 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 97 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4417,14 +4477,14 @@ end local.get $5 ) - (func $start:std/array~anonymous|23 (; 89 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 98 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 90 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 99 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4434,12 +4494,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 91 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 100 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 92 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 101 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4517,7 +4577,7 @@ end local.get $4 ) - (func $start:std/array~anonymous|26 (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 102 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4530,7 +4590,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 94 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 103 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -4539,7 +4599,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 95 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 104 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4551,12 +4611,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 96 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 105 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 97 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 106 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4614,12 +4674,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|30 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|30 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|31 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4631,7 +4691,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduce (; 100 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 109 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4689,7 +4749,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|32 (; 101 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 110 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4701,7 +4761,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|33 (; 102 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 111 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4710,12 +4770,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|34 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|34 (; 112 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 104 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 113 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4723,12 +4783,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|36 (; 105 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|36 (; 114 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 106 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 115 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4773,12 +4833,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|37 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|37 (; 116 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|38 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|38 (; 117 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4790,7 +4850,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduceRight (; 109 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 118 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4835,7 +4895,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|39 (; 110 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|39 (; 119 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4847,7 +4907,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|40 (; 111 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|40 (; 120 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4856,12 +4916,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|41 (; 112 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|41 (; 121 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|42 (; 113 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|42 (; 122 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4869,7 +4929,7 @@ local.get $1 i32.add ) - (func $~lib/math/murmurHash3 (; 114 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 123 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -4898,7 +4958,7 @@ local.set $0 local.get $0 ) - (func $~lib/math/splitMix32 (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 124 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -4933,7 +4993,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 116 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 125 ;) (type $FUNCSIG$vj) (param $0 i64) local.get $0 i64.eqz if @@ -4962,7 +5022,7 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/util/sort/insertionSort (; 117 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 126 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f32) (local $5 i32) @@ -5058,7 +5118,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 118 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 127 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5358,7 +5418,7 @@ local.get $10 f32.store ) - (func $~lib/array/Array#sort (; 119 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -5444,7 +5504,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 120 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 129 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5477,7 +5537,7 @@ i32.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 130 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -5487,7 +5547,7 @@ unreachable end block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) - i32.const 44 + i32.const 57 br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 @@ -5496,12 +5556,12 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/builtins/isNaN (; 122 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 131 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $std/array/isArraysEqual (; 123 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 132 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -5572,7 +5632,15 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 124 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array~iterate (; 133 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/util/sort/insertionSort (; 134 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) @@ -5668,7 +5736,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 125 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 135 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5968,7 +6036,7 @@ local.get $10 f64.store ) - (func $~lib/array/Array#sort (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -6054,7 +6122,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 127 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 137 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -6087,7 +6155,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6097,7 +6165,7 @@ unreachable end block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) - i32.const 45 + i32.const 60 br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 @@ -6106,11 +6174,11 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/array/Array#get:length (; 129 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 139 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 130 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__unchecked_get (; 140 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $0 i32.load offset=4 local.get $1 @@ -6119,7 +6187,7 @@ i32.add f64.load ) - (func $~lib/array/Array#__get (; 131 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 141 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -6138,12 +6206,12 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/builtins/isNaN (; 132 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 142 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $std/array/isArraysEqual (; 133 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 143 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -6214,7 +6282,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 134 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 144 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6310,7 +6378,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 135 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 145 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6610,7 +6678,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6694,12 +6762,12 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6709,7 +6777,7 @@ unreachable end block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) - i32.const 46 + i32.const 61 br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 @@ -6718,7 +6786,7 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/util/sort/insertionSort (; 139 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 149 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6814,7 +6882,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 140 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 150 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7114,7 +7182,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7198,7 +7266,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -7207,7 +7275,7 @@ i32.lt_u i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -7217,7 +7285,7 @@ unreachable end block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) - i32.const 47 + i32.const 62 br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 @@ -7226,7 +7294,7 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/array/Array.create (; 144 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create (; 154 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7266,7 +7334,7 @@ i32.store offset=12 local.get $3 ) - (func $std/array/createReverseOrderedArray (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 155 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -7300,7 +7368,7 @@ end local.get $1 ) - (func $~lib/math/NativeMath.random (; 146 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 156 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) (local $2 i64) @@ -7357,7 +7425,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 147 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -7391,12 +7459,12 @@ end local.get $1 ) - (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $std/array/isSorted (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -7444,7 +7512,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 150 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 160 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -7460,35 +7528,81 @@ unreachable end ) - (func $std/array/assertSortedDefault (; 151 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 161 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 block $~lib/util/sort/COMPARATOR|inlined.1 (result i32) - i32.const 48 + i32.const 63 br $~lib/util/sort/COMPARATOR|inlined.1 end call $std/array/assertSorted ) - (func $start:std/array~anonymous|43 (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|43 (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|44 (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $start:std/array~anonymous|45 (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|45 (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|46 (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|46 (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array.create<~lib/array/Array> (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>~iterate (; 166 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=8 + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + i32.load + local.set $4 + i32.const 1 + global.set $~lib/argc + local.get $4 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $4 + local.get $1 + call $~lib/array/Array~iterate + local.get $2 + i32.const 4 + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/array/Array.create<~lib/array/Array> (; 167 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7511,7 +7625,7 @@ i32.const 0 local.set $1 local.get $2 - i32.const 11 + i32.const 68 i32.const 2 local.get $1 call $~lib/runtime/makeArray @@ -7528,7 +7642,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array<~lib/array/Array>#__unchecked_set (; 157 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__unchecked_set (; 168 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7561,7 +7675,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/array/Array<~lib/array/Array>#__set (; 158 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__set (; 169 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -7598,7 +7712,7 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedNestedArray (; 159 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 170 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7642,7 +7756,7 @@ end local.get $1 ) - (func $start:std/array~anonymous|47 (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -7651,7 +7765,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/util/sort/insertionSort<~lib/array/Array> (; 161 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort<~lib/array/Array> (; 172 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7747,7 +7861,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/array/Array>#sort (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#sort (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7821,11 +7935,11 @@ end local.get $0 ) - (func $~lib/array/Array<~lib/array/Array>#get:length (; 163 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#get:length (; 174 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/array/Array>#__unchecked_get (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#__unchecked_get (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -7834,7 +7948,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/array/Array>#__get (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#__get (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -7865,7 +7979,7 @@ local.get $1 call $~lib/array/Array<~lib/array/Array>#__unchecked_get ) - (func $std/array/isSorted<~lib/array/Array> (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/array/Array> (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -7913,7 +8027,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/array/Array> (; 167 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/array/Array> (; 178 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#sort @@ -7929,7 +8043,56 @@ unreachable end ) - (func $~lib/array/Array.create> (; 168 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/Proxy~iterate (; 179 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/array/Array>~iterate (; 180 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=8 + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + i32.load + local.set $4 + i32.const 1 + global.set $~lib/argc + local.get $4 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $4 + local.get $1 + call $std/array/Proxy~iterate + local.get $2 + i32.const 4 + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/array/Array.create> (; 181 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7952,7 +8115,7 @@ i32.const 0 local.set $1 local.get $2 - i32.const 12 + i32.const 71 i32.const 2 local.get $1 call $~lib/runtime/makeArray @@ -7969,13 +8132,13 @@ i32.store offset=12 local.get $3 ) - (func $std/array/Proxy#constructor (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/Proxy#constructor (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if i32.const 4 call $~lib/runtime/allocate - i32.const 13 + i32.const 72 call $~lib/runtime/register local.set $0 end @@ -7984,7 +8147,7 @@ i32.store local.get $0 ) - (func $~lib/array/Array>#__unchecked_set (; 170 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__unchecked_set (; 183 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -8017,7 +8180,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/array/Array>#__set (; 171 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__set (; 184 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -8054,7 +8217,7 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedElementsArray (; 172 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 185 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -8090,14 +8253,14 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/util/sort/insertionSort> (; 174 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort> (; 187 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8193,7 +8356,7 @@ unreachable end ) - (func $~lib/array/Array>#sort (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8267,11 +8430,11 @@ end local.get $0 ) - (func $~lib/array/Array>#get:length (; 176 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#get:length (; 189 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array>#__unchecked_get (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__unchecked_get (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -8280,7 +8443,7 @@ i32.add i32.load ) - (func $~lib/array/Array>#__get (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__get (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -8311,7 +8474,7 @@ local.get $1 call $~lib/array/Array>#__unchecked_get ) - (func $std/array/isSorted> (; 179 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -8359,7 +8522,7 @@ end i32.const 1 ) - (func $std/array/assertSorted> (; 180 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 193 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -8375,7 +8538,56 @@ unreachable end ) - (func $~lib/util/sort/insertionSort<~lib/string/String | null> (; 181 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/string/String | null>~iterate (; 194 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=8 + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + i32.load + local.set $4 + local.get $4 + if + i32.const 1 + global.set $~lib/argc + local.get $4 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $4 + local.get $1 + call $~lib/string/String~iterate + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/util/sort/insertionSort<~lib/string/String | null> (; 195 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8471,7 +8683,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String | null>#sort (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#sort (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8545,11 +8757,11 @@ end local.get $0 ) - (func $~lib/array/Array<~lib/string/String | null>#get:length (; 183 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#get:length (; 197 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/string/String | null>#__unchecked_get (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#__unchecked_get (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -8558,7 +8770,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/string/String | null>#__get (; 185 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#__get (; 199 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -8577,7 +8789,7 @@ local.get $1 call $~lib/array/Array<~lib/string/String | null>#__unchecked_get ) - (func $std/array/isSorted<~lib/string/String | null> (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/string/String | null> (; 200 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -8625,7 +8837,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/string/String | null> (; 187 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String | null> (; 201 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String | null>#sort @@ -8641,7 +8853,7 @@ unreachable end ) - (func $~lib/string/String#get:length (; 188 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 202 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -8649,7 +8861,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 189 ;) (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 (; 203 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -8702,7 +8914,7 @@ end local.get $5 ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 204 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8775,7 +8987,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 191 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 205 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $1of1 block $0of1 block $outOfRange @@ -8787,7 +8999,7 @@ unreachable end block $~lib/util/sort/COMPARATOR<~lib/string/String | null>|inlined.0 (result i32) - i32.const 55 + i32.const 77 br $~lib/util/sort/COMPARATOR<~lib/string/String | null>|inlined.0 end local.set $1 @@ -8796,7 +9008,7 @@ local.get $1 call $std/array/assertSorted<~lib/string/String | null> ) - (func $~lib/string/String.__eq (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -8840,13 +9052,13 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.__ne (; 193 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__eq i32.eqz ) - (func $std/array/isArraysEqual<~lib/string/String | null> (; 194 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual<~lib/string/String | null> (; 208 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -8901,7 +9113,53 @@ end i32.const 1 ) - (func $~lib/array/Array.create<~lib/string/String> (; 195 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>~iterate (; 209 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=8 + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + i32.load + local.set $4 + i32.const 1 + global.set $~lib/argc + local.get $4 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $4 + local.get $1 + call $~lib/string/String~iterate + local.get $2 + i32.const 4 + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/array/Array.create<~lib/string/String> (; 210 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8924,7 +9182,7 @@ i32.const 0 local.set $1 local.get $2 - i32.const 15 + i32.const 78 i32.const 2 local.get $1 call $~lib/runtime/makeArray @@ -8941,7 +9199,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/string/String#charAt (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#charAt (; 211 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -8987,7 +9245,7 @@ call $~lib/runtime/register end ) - (func $~lib/string/String#concat (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9046,7 +9304,7 @@ call $~lib/runtime/register end ) - (func $~lib/string/String.__concat (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 213 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 4424 local.get $0 @@ -9056,7 +9314,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 199 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 214 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -9098,7 +9356,7 @@ end local.get $1 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 200 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 215 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -9131,7 +9389,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/array/Array<~lib/string/String>#__set (; 201 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/string/String>#__set (; 216 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -9168,7 +9426,7 @@ i32.store offset=12 end ) - (func $std/array/createRandomStringArray (; 202 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomStringArray (; 217 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -9202,7 +9460,7 @@ end local.get $1 ) - (func $~lib/util/sort/insertionSort<~lib/string/String> (; 203 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort<~lib/string/String> (; 218 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9298,7 +9556,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String>#sort (; 204 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#sort (; 219 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9372,11 +9630,11 @@ end local.get $0 ) - (func $~lib/array/Array<~lib/string/String>#get:length (; 205 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#get:length (; 220 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -9385,7 +9643,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/string/String>#__get (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -9416,7 +9674,7 @@ local.get $1 call $~lib/array/Array<~lib/string/String>#__unchecked_get ) - (func $std/array/isSorted<~lib/string/String> (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/string/String> (; 223 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -9464,7 +9722,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/string/String> (; 209 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String> (; 224 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String>#sort @@ -9480,7 +9738,7 @@ unreachable end ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 (; 210 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9553,7 +9811,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted<~lib/string/String>|trampoline (; 211 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String>|trampoline (; 226 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $1of1 block $0of1 block $outOfRange @@ -9565,7 +9823,7 @@ unreachable end block $~lib/util/sort/COMPARATOR<~lib/string/String>|inlined.0 (result i32) - i32.const 56 + i32.const 80 br $~lib/util/sort/COMPARATOR<~lib/string/String>|inlined.0 end local.set $1 @@ -9574,7 +9832,15 @@ local.get $1 call $std/array/assertSorted<~lib/string/String> ) - (func $~lib/string/String#substring (; 212 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array~iterate (; 227 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/string/String#substring (; 228 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9700,7 +9966,7 @@ call $~lib/runtime/register end ) - (func $~lib/runtime/discard (; 213 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/discard (; 229 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -9734,7 +10000,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/array/Array#join_bool (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_bool (; 230 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9921,13 +10187,13 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 215 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 231 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_bool return ) - (func $~lib/util/number/decimalCount32 (; 216 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 232 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -9996,7 +10262,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa32_lut (; 217 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 233 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10139,7 +10405,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 218 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 234 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10203,12 +10469,12 @@ call $~lib/runtime/register end ) - (func $~lib/util/number/itoa (; 219 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 235 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 220 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 236 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10267,7 +10533,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 237 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10413,13 +10679,13 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/util/number/utoa32 (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 239 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10463,12 +10729,12 @@ call $~lib/runtime/register end ) - (func $~lib/util/number/itoa (; 224 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 240 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 241 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10507,7 +10773,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 242 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10653,20 +10919,28 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 227 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 243 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/builtins/isFinite (; 228 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 244 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/array/Array#__unchecked_get (; 229 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array~iterate (; 245 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/array/Array#__unchecked_get (; 246 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $0 i32.load offset=4 local.get $1 @@ -10675,7 +10949,15 @@ i32.add i64.load ) - (func $~lib/array/Array#__unchecked_get (; 230 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array~iterate (; 247 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/array/Array#__unchecked_get (; 248 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -10684,7 +10966,7 @@ i32.add i32.load16_s ) - (func $~lib/util/number/genDigits (; 231 ;) (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 (; 249 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -11255,7 +11537,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 232 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 250 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11588,7 +11870,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 233 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 251 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -12026,7 +12308,7 @@ local.get $2 i32.add ) - (func $~lib/util/number/dtoa (; 234 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 252 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12082,7 +12364,7 @@ end local.get $4 ) - (func $~lib/util/number/dtoa_stream (; 235 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 253 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12156,7 +12438,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join_flt (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_flt (; 254 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12302,13 +12584,13 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 237 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_flt return ) - (func $~lib/array/Array<~lib/string/String>#join_str (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join_str (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12500,38 +12782,90 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array<~lib/string/String>#join (; 239 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String>#join_str return ) - (func $std/array/Ref#constructor (; 240 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/Ref~iterate (; 258 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $std/array/Ref#constructor (; 259 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 call $~lib/runtime/allocate - i32.const 19 + i32.const 87 call $~lib/runtime/register local.set $0 end local.get $0 ) - (func $~lib/array/Array#join_ref (; 241 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array~iterate (; 260 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - local.get $0 - i32.load offset=12 i32.const 1 - i32.sub + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=8 + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + i32.load + local.set $4 + local.get $4 + if + i32.const 1 + global.set $~lib/argc + local.get $4 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $4 + local.get $1 + call $std/array/Ref~iterate + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/array/Array#join_ref (; 261 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $0 + i32.load offset=12 + i32.const 1 + i32.sub local.set $2 local.get $2 i32.const 0 @@ -12680,18 +13014,26 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 242 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_ref return ) - (func $~lib/array/Array#toString (; 243 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 263 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa (; 244 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array~iterate (; 264 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/util/number/itoa (; 265 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -12700,7 +13042,7 @@ call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 245 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 266 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12775,7 +13117,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 267 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12921,25 +13263,33 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 247 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 268 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 248 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 269 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa (; 249 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array~iterate (; 270 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/util/number/itoa (; 271 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 65535 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 250 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 272 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12984,7 +13334,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 251 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 273 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13130,18 +13480,18 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 274 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 253 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 275 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/decimalCount64 (; 254 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 276 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -13210,7 +13560,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 255 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 277 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -13338,7 +13688,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 256 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 278 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13418,12 +13768,12 @@ call $~lib/runtime/register end ) - (func $~lib/util/number/itoa (; 257 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 279 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/utoa64 return ) - (func $~lib/util/number/itoa_stream (; 258 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 280 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13489,7 +13839,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 281 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13635,18 +13985,26 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 260 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 261 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 283 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa64 (; 262 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/array/Array~iterate (; 284 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/util/number/itoa64 (; 285 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13748,12 +14106,12 @@ call $~lib/runtime/register end ) - (func $~lib/util/number/itoa (; 263 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 286 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/itoa64 return ) - (func $~lib/util/number/itoa_stream (; 264 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 287 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13841,7 +14199,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 265 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 288 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13987,18 +14345,18 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 266 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 289 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 267 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 290 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array<~lib/string/String | null>#join_str (; 268 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#join_str (; 291 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14190,23 +14548,23 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array<~lib/string/String | null>#join (; 269 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#join (; 292 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String | null>#join_str return ) - (func $~lib/array/Array<~lib/string/String | null>#toString (; 270 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#toString (; 293 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/string/String | null>#join ) - (func $~lib/array/Array<~lib/string/String>#toString (; 271 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#toString (; 294 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/string/String>#join ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 272 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 295 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14310,25 +14668,71 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array>#join (; 273 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join (; 296 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array>#toString (; 274 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#toString (; 297 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/array/Array>#join ) - (func $~lib/util/number/itoa (; 275 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>~iterate (; 298 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=8 + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + i32.load + local.set $4 + i32.const 1 + global.set $~lib/argc + local.get $4 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $4 + local.get $1 + call $~lib/array/Array~iterate + local.get $2 + i32.const 4 + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/util/number/itoa (; 299 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 276 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 300 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -14373,7 +14777,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 277 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 301 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14519,13 +14923,13 @@ call $~lib/runtime/register end ) - (func $~lib/array/Array#join (; 278 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 302 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 279 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 303 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14629,18 +15033,110 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array>#join (; 280 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join (; 304 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array>#toString (; 281 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#toString (; 305 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/array/Array>#join ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>~iterate (; 306 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=8 + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + i32.load + local.set $4 + i32.const 1 + global.set $~lib/argc + local.get $4 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $4 + local.get $1 + call $~lib/array/Array~iterate + local.get $2 + i32.const 4 + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate (; 307 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=8 + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + i32.load + local.set $4 + i32.const 1 + global.set $~lib/argc + local.get $4 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $4 + local.get $1 + call $~lib/array/Array<~lib/array/Array>~iterate + local.get $2 + i32.const 4 + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 308 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14744,13 +15240,13 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array>#join (; 283 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join (; 309 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 284 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 310 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14854,18 +15350,18 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join (; 285 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join (; 311 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#toString (; 286 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#toString (; 312 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join ) - (func $start:std/array (; 287 ;) (type $FUNCSIG$v) + (func $start:std/array (; 313 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14974,7 +15470,7 @@ drop global.get $std/array/arr8 i32.const 5 - i32.const 7 + i32.const 8 i32.const 0 i32.const 248 call $~lib/runtime/makeArray @@ -14997,7 +15493,7 @@ drop global.get $std/array/arr8 i32.const 5 - i32.const 7 + i32.const 8 i32.const 0 i32.const 320 call $~lib/runtime/makeArray @@ -15020,7 +15516,7 @@ drop global.get $std/array/arr8 i32.const 5 - i32.const 7 + i32.const 8 i32.const 0 i32.const 344 call $~lib/runtime/makeArray @@ -15043,7 +15539,7 @@ drop global.get $std/array/arr8 i32.const 5 - i32.const 7 + i32.const 8 i32.const 0 i32.const 368 call $~lib/runtime/makeArray @@ -15066,7 +15562,7 @@ drop global.get $std/array/arr8 i32.const 5 - i32.const 7 + i32.const 8 i32.const 0 i32.const 392 call $~lib/runtime/makeArray @@ -15089,7 +15585,7 @@ drop global.get $std/array/arr32 i32.const 5 - i32.const 8 + i32.const 10 i32.const 2 i32.const 488 call $~lib/runtime/makeArray @@ -15112,7 +15608,7 @@ drop global.get $std/array/arr32 i32.const 5 - i32.const 8 + i32.const 10 i32.const 2 i32.const 528 call $~lib/runtime/makeArray @@ -15135,7 +15631,7 @@ drop global.get $std/array/arr32 i32.const 5 - i32.const 8 + i32.const 10 i32.const 2 i32.const 568 call $~lib/runtime/makeArray @@ -15158,7 +15654,7 @@ drop global.get $std/array/arr32 i32.const 5 - i32.const 8 + i32.const 10 i32.const 2 i32.const 608 call $~lib/runtime/makeArray @@ -15181,7 +15677,7 @@ drop global.get $std/array/arr32 i32.const 5 - i32.const 8 + i32.const 10 i32.const 2 i32.const 648 call $~lib/runtime/makeArray @@ -17540,7 +18036,7 @@ i32.const 3 call $~lib/array/Array#__set global.get $std/array/arr - i32.const 1 + i32.const 12 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -17556,7 +18052,7 @@ unreachable end global.get $std/array/arr - i32.const 2 + i32.const 13 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -17572,7 +18068,7 @@ unreachable end global.get $std/array/arr - i32.const 3 + i32.const 14 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -17588,7 +18084,7 @@ unreachable end global.get $std/array/arr - i32.const 4 + i32.const 15 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -17617,7 +18113,7 @@ unreachable end global.get $std/array/arr - i32.const 5 + i32.const 16 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -17645,7 +18141,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 6 + i32.const 17 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -17682,7 +18178,7 @@ call $~lib/array/Array#push drop global.get $std/array/arr - i32.const 7 + i32.const 18 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -17698,7 +18194,7 @@ unreachable end global.get $std/array/arr - i32.const 8 + i32.const 19 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -17714,7 +18210,7 @@ unreachable end global.get $std/array/arr - i32.const 9 + i32.const 20 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -17743,7 +18239,7 @@ unreachable end global.get $std/array/arr - i32.const 10 + i32.const 21 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -17771,7 +18267,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 11 + i32.const 22 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -17808,7 +18304,7 @@ call $~lib/array/Array#push drop global.get $std/array/arr - i32.const 12 + i32.const 23 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -17824,7 +18320,7 @@ unreachable end global.get $std/array/arr - i32.const 13 + i32.const 24 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -17840,7 +18336,7 @@ unreachable end global.get $std/array/arr - i32.const 14 + i32.const 25 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -17869,7 +18365,7 @@ unreachable end global.get $std/array/arr - i32.const 15 + i32.const 26 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -17897,7 +18393,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 16 + i32.const 27 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -17936,7 +18432,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 17 + i32.const 28 call $~lib/array/Array#forEach global.get $std/array/i i32.const 6 @@ -17953,7 +18449,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 18 + i32.const 29 call $~lib/array/Array#forEach global.get $std/array/i i32.const 6 @@ -17983,7 +18479,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 19 + i32.const 30 call $~lib/array/Array#forEach global.get $std/array/i i32.const 406 @@ -18012,7 +18508,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 20 + i32.const 31 call $~lib/array/Array#forEach global.get $std/array/i i32.const 1 @@ -18048,7 +18544,7 @@ call $~lib/array/Array#push drop global.get $std/array/arr - i32.const 21 + i32.const 32 call $~lib/array/Array#forEach global.get $std/array/arr call $~lib/array/Array#get:length @@ -18101,7 +18597,7 @@ call $~lib/array/Array#push drop global.get $std/array/arr - i32.const 22 + i32.const 33 call $~lib/array/Array#map global.set $std/array/newArr global.get $std/array/newArr @@ -18137,7 +18633,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 23 + i32.const 36 call $~lib/array/Array#map drop global.get $std/array/i @@ -18168,7 +18664,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 24 + i32.const 37 call $~lib/array/Array#map drop global.get $std/array/i @@ -18198,7 +18694,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 25 + i32.const 38 call $~lib/array/Array#map drop global.get $std/array/i @@ -18235,7 +18731,7 @@ call $~lib/array/Array#push drop global.get $std/array/arr - i32.const 26 + i32.const 39 call $~lib/array/Array#filter global.set $std/array/filteredArr global.get $std/array/filteredArr @@ -18254,7 +18750,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 27 + i32.const 40 call $~lib/array/Array#filter drop global.get $std/array/i @@ -18285,7 +18781,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 28 + i32.const 41 call $~lib/array/Array#filter drop global.get $std/array/i @@ -18315,7 +18811,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 29 + i32.const 42 call $~lib/array/Array#filter drop global.get $std/array/i @@ -18352,7 +18848,7 @@ call $~lib/array/Array#push drop global.get $std/array/arr - i32.const 30 + i32.const 43 i32.const 0 call $~lib/array/Array#reduce global.set $std/array/i @@ -18369,7 +18865,7 @@ unreachable end global.get $std/array/arr - i32.const 31 + i32.const 44 i32.const 4 call $~lib/array/Array#reduce global.set $std/array/i @@ -18386,7 +18882,7 @@ unreachable end global.get $std/array/arr - i32.const 32 + i32.const 45 i32.const 0 call $~lib/array/Array#reduce i32.const 0 @@ -18405,7 +18901,7 @@ unreachable end global.get $std/array/arr - i32.const 33 + i32.const 46 i32.const 0 call $~lib/array/Array#reduce i32.const 0 @@ -18424,7 +18920,7 @@ unreachable end global.get $std/array/arr - i32.const 34 + i32.const 47 i32.const 0 call $~lib/array/Array#reduce global.set $std/array/i @@ -18454,7 +18950,7 @@ unreachable end global.get $std/array/arr - i32.const 35 + i32.const 48 i32.const 0 call $~lib/array/Array#reduce global.set $std/array/i @@ -18483,7 +18979,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 36 + i32.const 49 i32.const 0 call $~lib/array/Array#reduce global.set $std/array/i @@ -18521,7 +19017,7 @@ call $~lib/array/Array#push drop global.get $std/array/arr - i32.const 37 + i32.const 50 i32.const 0 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -18538,7 +19034,7 @@ unreachable end global.get $std/array/arr - i32.const 38 + i32.const 51 i32.const 4 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -18555,7 +19051,7 @@ unreachable end global.get $std/array/arr - i32.const 39 + i32.const 52 i32.const 0 call $~lib/array/Array#reduceRight i32.const 0 @@ -18574,7 +19070,7 @@ unreachable end global.get $std/array/arr - i32.const 40 + i32.const 53 i32.const 0 call $~lib/array/Array#reduceRight i32.const 0 @@ -18593,7 +19089,7 @@ unreachable end global.get $std/array/arr - i32.const 41 + i32.const 54 i32.const 0 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -18623,7 +19119,7 @@ unreachable end global.get $std/array/arr - i32.const 42 + i32.const 55 i32.const 0 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -18652,7 +19148,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 43 + i32.const 56 i32.const 0 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -18710,7 +19206,7 @@ drop global.get $std/array/f32ArrayTyped i32.const 8 - i32.const 9 + i32.const 34 i32.const 2 i32.const 3304 call $~lib/runtime/makeArray @@ -18735,7 +19231,7 @@ drop global.get $std/array/f64ArrayTyped i32.const 8 - i32.const 10 + i32.const 58 i32.const 3 i32.const 3464 call $~lib/runtime/makeArray @@ -18785,7 +19281,7 @@ drop global.get $std/array/u32ArrayTyped i32.const 5 - i32.const 8 + i32.const 10 i32.const 2 i32.const 3728 call $~lib/runtime/makeArray @@ -18939,28 +19435,28 @@ call $std/array/createRandomOrderedArray global.set $std/array/randomized257 global.get $std/array/randomized64 - i32.const 49 + i32.const 64 call $std/array/assertSorted global.get $std/array/randomized64 - i32.const 50 + i32.const 65 call $std/array/assertSorted global.get $std/array/randomized257 - i32.const 51 + i32.const 66 call $std/array/assertSorted global.get $std/array/randomized257 - i32.const 52 + i32.const 67 call $std/array/assertSorted i32.const 512 call $std/array/createReverseOrderedNestedArray global.set $std/array/reversedNested512 global.get $std/array/reversedNested512 - i32.const 53 + i32.const 70 call $std/array/assertSorted<~lib/array/Array> i32.const 512 call $std/array/createReverseOrderedElementsArray global.set $std/array/reversedElements512 global.get $std/array/reversedElements512 - i32.const 54 + i32.const 74 call $std/array/assertSorted> block i32.const 1 @@ -18993,7 +19489,7 @@ call $std/array/assertSorted<~lib/string/String>|trampoline end i32.const 2 - i32.const 16 + i32.const 81 i32.const 0 i32.const 4552 call $~lib/runtime/makeArray @@ -19029,7 +19525,7 @@ unreachable end i32.const 3 - i32.const 8 + i32.const 10 i32.const 2 i32.const 5240 call $~lib/runtime/makeArray @@ -19065,7 +19561,7 @@ unreachable end i32.const 6 - i32.const 10 + i32.const 58 i32.const 3 i32.const 6672 call $~lib/runtime/makeArray @@ -19083,7 +19579,7 @@ unreachable end i32.const 3 - i32.const 15 + i32.const 78 i32.const 2 i32.const 6888 call $~lib/runtime/makeArray @@ -19102,7 +19598,7 @@ end block (result i32) i32.const 3 - i32.const 20 + i32.const 88 i32.const 2 i32.const 0 call $~lib/runtime/makeArray @@ -19221,7 +19717,7 @@ unreachable end i32.const 3 - i32.const 21 + i32.const 90 i32.const 0 i32.const 7128 call $~lib/runtime/makeArray @@ -19238,7 +19734,7 @@ unreachable end i32.const 3 - i32.const 22 + i32.const 92 i32.const 1 i32.const 7208 call $~lib/runtime/makeArray @@ -19255,7 +19751,7 @@ unreachable end i32.const 3 - i32.const 17 + i32.const 83 i32.const 3 i32.const 7312 call $~lib/runtime/makeArray @@ -19272,7 +19768,7 @@ unreachable end i32.const 4 - i32.const 23 + i32.const 94 i32.const 3 i32.const 7464 call $~lib/runtime/makeArray @@ -19302,7 +19798,7 @@ unreachable end i32.const 4 - i32.const 15 + i32.const 78 i32.const 2 i32.const 7744 call $~lib/runtime/makeArray @@ -19320,7 +19816,7 @@ end block (result i32) i32.const 2 - i32.const 11 + i32.const 68 i32.const 2 i32.const 0 call $~lib/runtime/makeArray @@ -19374,7 +19870,7 @@ end block (result i32) i32.const 2 - i32.const 24 + i32.const 96 i32.const 2 i32.const 0 call $~lib/runtime/makeArray @@ -19385,7 +19881,7 @@ local.get $1 block (result i32) i32.const 2 - i32.const 7 + i32.const 8 i32.const 0 i32.const 7936 call $~lib/runtime/makeArray @@ -19399,7 +19895,7 @@ local.get $1 block (result i32) i32.const 2 - i32.const 7 + i32.const 8 i32.const 0 i32.const 7960 call $~lib/runtime/makeArray @@ -19428,7 +19924,7 @@ end block (result i32) i32.const 1 - i32.const 26 + i32.const 100 i32.const 2 i32.const 0 call $~lib/runtime/makeArray @@ -19440,7 +19936,7 @@ block (result i32) block (result i32) i32.const 1 - i32.const 25 + i32.const 98 i32.const 2 i32.const 0 call $~lib/runtime/makeArray @@ -19451,7 +19947,7 @@ local.get $3 block (result i32) i32.const 1 - i32.const 8 + i32.const 10 i32.const 2 i32.const 8056 call $~lib/runtime/makeArray @@ -19488,7 +19984,7 @@ unreachable end ) - (func $std/array/main (; 288 ;) (type $FUNCSIG$v) + (func $std/array/main (; 314 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -19497,9 +19993,9 @@ global.set $~lib/started end ) - (func $start (; 289 ;) (type $FUNCSIG$v) + (func $start (; 315 ;) (type $FUNCSIG$v) call $start:std/array ) - (func $null (; 290 ;) (type $FUNCSIG$v) + (func $null (; 316 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 0a1d8a1fb5..f026b941f4 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1,11 +1,11 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) @@ -23,16 +23,17 @@ (type $FUNCSIG$vid (func (param i32 f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e") + (data (i32.const 8) "\03\00\00\00\1e") (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 56) "\02\00\00\00&") + (data (i32.const 56) "\03\00\00\00&") (data (i32.const 72) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 112) "\02\00\00\00\14") + (data (i32.const 112) "\03\00\00\00\14") (data (i32.const 128) "s\00t\00d\00/\00m\00a\00p\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (table $0 23 funcref) + (elem (i32.const 0) $null $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/string/String~iterate $~lib/string/String~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -127,7 +128,26 @@ i32.const 16 i32.add ) - (func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map~iterate (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $0 + i32.const 1 + global.set $~lib/argc + local.get $0 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/string/String~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 148 @@ -160,7 +180,7 @@ i32.store local.get $0 ) - (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -371,7 +391,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -390,10 +410,10 @@ local.get $0 call $~lib/memory/memory.fill local.get $1 - i32.const 3 + i32.const 4 call $~lib/runtime/register ) - (func $~lib/map/Map#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -428,7 +448,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 9 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate @@ -456,7 +476,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -501,7 +521,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -517,7 +537,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -627,7 +647,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -726,7 +746,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -747,7 +767,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -814,7 +834,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 14 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 16 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -1158,11 +1178,11 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 15 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 17 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate - i32.const 4 + i32.const 5 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -1186,7 +1206,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#has (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1200,7 +1220,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1310,7 +1330,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1407,7 +1427,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1426,7 +1446,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -1491,7 +1511,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 21 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 23 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -1821,11 +1841,11 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 22 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 24 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate - i32.const 5 + i32.const 7 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -1849,7 +1869,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -1894,7 +1914,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1919,7 +1939,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2038,7 +2058,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2146,7 +2166,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2176,7 +2196,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2252,7 +2272,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 29 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 31 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -2596,11 +2616,11 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 30 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 32 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate - i32.const 6 + i32.const 9 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -2624,7 +2644,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#has (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2647,7 +2667,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2766,7 +2786,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2872,7 +2892,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2900,7 +2920,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2974,7 +2994,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 36 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 38 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -3304,11 +3324,11 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 37 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 39 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate - i32.const 7 + i32.const 11 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -3332,7 +3352,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -3363,7 +3383,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -3406,7 +3426,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -3415,7 +3435,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 43 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3522,7 +3542,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 44 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3612,7 +3632,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -3626,7 +3646,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 46 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3686,7 +3706,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 45 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 47 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -4002,11 +4022,11 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 46 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 48 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate - i32.const 8 + i32.const 13 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -4030,7 +4050,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $std/map/testNumeric (; 47 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 49 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -4346,7 +4366,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -4381,11 +4401,11 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 49 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 51 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate - i32.const 9 + i32.const 15 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -4409,7 +4429,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 50 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 52 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -4475,7 +4495,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 51 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 53 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -4518,7 +4538,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 52 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 54 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -4527,7 +4547,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4634,7 +4654,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 54 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 56 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4724,7 +4744,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 55 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 57 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -4738,7 +4758,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 56 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/map/Map#delete (; 58 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -4799,7 +4819,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 57 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 59 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/map/Map#constructor @@ -5122,11 +5142,11 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 58 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 60 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate - i32.const 10 + i32.const 17 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -5150,7 +5170,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $std/map/testNumeric (; 59 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 61 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/map/Map#constructor @@ -5473,11 +5493,11 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 60 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 62 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate - i32.const 11 + i32.const 19 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -5501,7 +5521,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 61 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 63 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -5544,7 +5564,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 62 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 64 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -5554,7 +5574,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 65 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5662,7 +5682,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 64 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/map/Map#set (; 66 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5753,7 +5773,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 65 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 67 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -5768,7 +5788,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 66 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/map/Map#delete (; 68 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -5830,7 +5850,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 67 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 69 ;) (type $FUNCSIG$v) (local $0 f32) (local $1 i32) call $~lib/map/Map#constructor @@ -6153,11 +6173,11 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 68 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 70 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate - i32.const 12 + i32.const 21 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -6181,7 +6201,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 69 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 71 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -6224,7 +6244,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 70 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 72 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -6234,7 +6254,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 71 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 73 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6342,7 +6362,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 72 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/map/Map#set (; 74 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6433,7 +6453,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 73 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 75 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -6448,7 +6468,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 74 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/map/Map#delete (; 76 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -6510,7 +6530,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 75 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 77 ;) (type $FUNCSIG$v) (local $0 f64) (local $1 i32) call $~lib/map/Map#constructor @@ -6833,7 +6853,7 @@ unreachable end ) - (func $start (; 76 ;) (type $FUNCSIG$v) + (func $start (; 78 ;) (type $FUNCSIG$v) i32.const 152 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset @@ -6849,7 +6869,7 @@ call $std/map/testNumeric call $std/map/testNumeric ) - (func $null (; 77 ;) (type $FUNCSIG$v) + (func $null (; 79 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 27b1c61eee..2aa2923823 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -1,11 +1,11 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) @@ -19,15 +19,16 @@ (type $FUNCSIG$vidi (func (param i32 f64 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 56) "\02\00\00\00&\00\00\00\00\00\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 112) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\03\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\03\00\00\00&\00\00\00\00\00\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 112) "\03\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") + (table $0 23 funcref) + (elem (i32.const 0) $null $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/string/String~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/memory/HEAP_BASE i32 (i32.const 148)) @@ -154,10 +155,30 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/collector/dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map~iterate (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/string/String~iterate (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/collector/dummy/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -195,7 +216,7 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -452,7 +473,10 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer~iterate (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -481,17 +505,17 @@ local.get $3 local.set $2 local.get $2 - i32.const 3 + i32.const 4 call $~lib/runtime/register end ) - (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/map/Map#clear (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -560,7 +584,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -594,14 +618,14 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash8 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const -2128831035 local.get $0 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -656,7 +680,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -675,7 +699,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -849,7 +873,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -957,7 +981,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -983,11 +1007,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1064,7 +1088,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 21 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 24 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1448,7 +1472,24 @@ unreachable end ) - (func $~lib/map/Map#clear (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map~iterate (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/map/Map#clear (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1517,14 +1558,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/allocate - i32.const 4 + i32.const 5 call $~lib/runtime/register local.set $0 end @@ -1551,7 +1592,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1604,7 +1645,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1621,7 +1662,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1795,7 +1836,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1901,7 +1942,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -1925,11 +1966,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2004,7 +2045,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 31 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 35 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2374,7 +2415,24 @@ unreachable end ) - (func $~lib/map/Map#clear (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map~iterate (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/map/Map#clear (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2443,14 +2501,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/allocate - i32.const 5 + i32.const 7 call $~lib/runtime/register local.set $0 end @@ -2477,7 +2535,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -2499,7 +2557,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2554,7 +2612,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2573,7 +2631,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 42 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2747,7 +2805,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 43 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2855,7 +2913,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2881,11 +2939,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2962,7 +3020,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 42 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 47 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3346,7 +3404,24 @@ unreachable end ) - (func $~lib/map/Map#clear (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map~iterate (; 48 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/map/Map#clear (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3415,14 +3490,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/allocate - i32.const 6 + i32.const 9 call $~lib/runtime/register local.set $0 end @@ -3449,7 +3524,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3502,7 +3577,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -3519,7 +3594,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 47 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3693,7 +3768,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 48 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3799,7 +3874,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3823,11 +3898,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3902,7 +3977,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 52 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 58 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4272,7 +4347,24 @@ unreachable end ) - (func $~lib/map/Map#clear (; 53 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map~iterate (; 59 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/map/Map#clear (; 60 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4341,14 +4433,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/allocate - i32.const 7 + i32.const 11 call $~lib/runtime/register local.set $0 end @@ -4375,7 +4467,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -4417,7 +4509,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4468,7 +4560,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -4483,7 +4575,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 58 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 65 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4657,7 +4749,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 59 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 66 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4761,7 +4853,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4783,11 +4875,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 68 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 62 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 69 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4860,7 +4952,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 63 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 70 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5216,7 +5308,24 @@ unreachable end ) - (func $~lib/map/Map#clear (; 64 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map~iterate (; 71 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/map/Map#clear (; 72 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5285,14 +5394,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 65 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/allocate - i32.const 8 + i32.const 13 call $~lib/runtime/register local.set $0 end @@ -5319,7 +5428,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5370,7 +5479,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 75 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -5385,7 +5494,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 68 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 76 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5559,7 +5668,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 69 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5663,7 +5772,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 78 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5685,11 +5794,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 71 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 72 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 80 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5762,7 +5871,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 73 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 81 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6118,7 +6227,24 @@ unreachable end ) - (func $~lib/map/Map#clear (; 74 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map~iterate (; 82 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/map/Map#clear (; 83 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6187,14 +6313,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 75 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 84 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/allocate - i32.const 9 + i32.const 15 call $~lib/runtime/register local.set $0 end @@ -6221,7 +6347,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 76 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 85 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6309,7 +6435,7 @@ local.set $3 local.get $3 ) - (func $~lib/map/Map#find (; 77 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 86 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6360,7 +6486,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 78 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 87 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -6375,7 +6501,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 79 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 88 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6550,7 +6676,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 80 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 89 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) @@ -6655,7 +6781,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 81 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 90 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) local.get $0 @@ -6677,11 +6803,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 82 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 91 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 83 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 92 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6755,7 +6881,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 84 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 93 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -7118,7 +7244,24 @@ unreachable end ) - (func $~lib/map/Map#clear (; 85 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map~iterate (; 94 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/map/Map#clear (; 95 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7187,14 +7330,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 86 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 96 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/allocate - i32.const 10 + i32.const 17 call $~lib/runtime/register local.set $0 end @@ -7221,7 +7364,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 87 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 97 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7272,7 +7415,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 88 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 98 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -7287,7 +7430,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 89 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 99 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7462,7 +7605,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 90 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 100 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) @@ -7567,7 +7710,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 91 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 101 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) local.get $0 @@ -7589,11 +7732,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 93 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 103 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -7667,7 +7810,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 94 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 104 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -8030,7 +8173,24 @@ unreachable end ) - (func $~lib/map/Map#clear (; 95 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map~iterate (; 105 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/map/Map#clear (; 106 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8099,14 +8259,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 96 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 107 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/allocate - i32.const 11 + i32.const 19 call $~lib/runtime/register local.set $0 end @@ -8133,7 +8293,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 97 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 108 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -8184,7 +8344,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 98 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 109 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) local.get $0 local.get $1 @@ -8200,7 +8360,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 99 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 110 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8376,7 +8536,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 100 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/map/Map#set (; 111 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) (local $3 f32) (local $4 i32) (local $5 i32) @@ -8482,7 +8642,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 101 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 112 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) local.get $0 @@ -8505,11 +8665,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 113 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 103 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#delete (; 114 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -8584,7 +8744,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 104 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 115 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -8947,7 +9107,24 @@ unreachable end ) - (func $~lib/map/Map#clear (; 105 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map~iterate (; 116 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/map/Map#clear (; 117 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9016,14 +9193,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 106 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 118 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/allocate - i32.const 12 + i32.const 21 call $~lib/runtime/register local.set $0 end @@ -9050,7 +9227,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 107 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 119 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -9101,7 +9278,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 108 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 120 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) local.get $0 local.get $1 @@ -9117,7 +9294,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 109 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 121 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9293,7 +9470,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 110 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/map/Map#set (; 122 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) (local $3 f64) (local $4 i32) (local $5 i32) @@ -9399,7 +9576,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 111 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 123 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) local.get $0 @@ -9422,11 +9599,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 112 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 124 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 113 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#delete (; 125 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -9501,7 +9678,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 114 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 126 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -9864,7 +10041,7 @@ unreachable end ) - (func $start:std/map (; 115 ;) (type $FUNCSIG$v) + (func $start:std/map (; 127 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -9886,9 +10063,9 @@ call $std/map/testNumeric call $std/map/testNumeric ) - (func $start (; 116 ;) (type $FUNCSIG$v) + (func $start (; 128 ;) (type $FUNCSIG$v) call $start:std/map ) - (func $null (; 117 ;) (type $FUNCSIG$v) + (func $null (; 129 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 9d6c7ed6cd..edd65d22ca 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -23,8 +23,8 @@ (data (i32.const 200) "b\00a\00r\00r\00i\00e\00r\003") (data (i32.const 216) "\01\00\00\00\1e") (data (i32.const 232) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (table $0 4 funcref) + (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $std/runtime/register_ref (mut i32) (i32.const 0)) (global $std/runtime/barrier1 (mut i32) (i32.const 0)) @@ -44,7 +44,10 @@ (export "table" (table $0)) (export "main" (func $std/runtime/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/allocator/tlsf/Root#setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/string/String~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.const 22 i32.ge_u @@ -64,7 +67,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 4 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 22 i32.ge_u @@ -99,7 +102,7 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Block#get:right (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const -4 @@ -133,7 +136,7 @@ end local.get $0 ) - (func $~lib/allocator/tlsf/fls (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -149,7 +152,7 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -183,7 +186,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -202,7 +205,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -331,7 +334,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const 2 @@ -361,7 +364,7 @@ end local.get $0 ) - (func $~lib/allocator/tlsf/Root#setJump (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 i32.load i32.const 1 @@ -406,7 +409,7 @@ local.get $0 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -636,7 +639,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -759,7 +762,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#insert ) - (func $~lib/allocator/tlsf/ffs (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -773,7 +776,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -885,7 +888,7 @@ end end ) - (func $~lib/allocator/tlsf/Root#use (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -996,7 +999,7 @@ i32.const 8 i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1166,7 +1169,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -1193,7 +1196,7 @@ i32.const 16 i32.add ) - (func $~lib/util/memory/memcpy (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2040,7 +2043,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2234,7 +2237,7 @@ end end ) - (func $~lib/memory/memory.fill (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -2445,7 +2448,7 @@ end end ) - (func $~lib/allocator/tlsf/__mem_free (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2483,7 +2486,7 @@ end end ) - (func $~lib/runtime/reallocate (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2590,7 +2593,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/discard (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/discard (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 264 i32.le_u @@ -2620,7 +2623,7 @@ local.get $0 call $~lib/allocator/tlsf/__mem_free ) - (func $~lib/runtime/register (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/register (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.const 264 @@ -2654,7 +2657,7 @@ local.get $0 global.set $std/runtime/register_ref ) - (func $start:std/runtime (; 25 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 26 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2973,7 +2976,7 @@ unreachable end ) - (func $std/runtime/main (; 26 ;) (type $FUNCSIG$v) + (func $std/runtime/main (; 27 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -2982,7 +2985,7 @@ global.set $~lib/started end ) - (func $null (; 27 ;) (type $FUNCSIG$v) + (func $null (; 28 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 883c0dae9b..7f2f7fa64d 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -17,8 +17,8 @@ (data (i32.const 152) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\002\00") (data (i32.const 184) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\003\00") (data (i32.const 216) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (table $0 4 funcref) + (elem (i32.const 0) $null $~lib/string/String~iterate $std/runtime/A~iterate $std/runtime/B~iterate) (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) @@ -60,7 +60,10 @@ (export "table" (table $0)) (export "main" (func $std/runtime/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $start:~lib/allocator/tlsf (; 2 ;) (type $FUNCSIG$v) + (func $~lib/string/String~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $start:~lib/allocator/tlsf (; 3 ;) (type $FUNCSIG$v) i32.const 1 global.get $~lib/allocator/tlsf/SL_BITS i32.shl @@ -76,7 +79,11 @@ unreachable end ) - (func $~lib/runtime/ADJUSTOBLOCK (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/runtime/A~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + ) + (func $std/runtime/B~iterate (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + ) + (func $~lib/runtime/ADJUSTOBLOCK (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -88,7 +95,7 @@ i32.sub i32.shl ) - (func $std/runtime/isPowerOf2 (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/runtime/isPowerOf2 (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 0 @@ -106,12 +113,12 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 0 local.get $1 i32.store offset=2912 ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -132,7 +139,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 7 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 10 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -169,11 +176,11 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Root#get:tailRef (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.load offset=2912 ) - (func $~lib/allocator/tlsf/Block#get:right (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -213,7 +220,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/fls (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -231,7 +238,7 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -267,7 +274,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -287,7 +294,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -432,7 +439,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -464,7 +471,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/Root#setJump (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.load global.get $~lib/allocator/tlsf/FREE @@ -510,7 +517,7 @@ local.get $1 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -776,7 +783,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -929,7 +936,7 @@ call $~lib/allocator/tlsf/Root#insert i32.const 1 ) - (func $~lib/allocator/tlsf/ffs (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -945,7 +952,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/ffs (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -961,7 +968,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1102,7 +1109,7 @@ end local.get $6 ) - (func $~lib/allocator/tlsf/Root#use (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1230,7 +1237,7 @@ global.get $~lib/allocator/tlsf/Block.INFO i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1466,12 +1473,12 @@ local.get $0 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/memory/memory.allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/runtime/allocate (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -1493,7 +1500,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/util/memory/memcpy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2694,7 +2701,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2925,7 +2932,7 @@ end end ) - (func $~lib/memory/memory.fill (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3182,7 +3189,7 @@ end end ) - (func $~lib/allocator/tlsf/__mem_free (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3225,15 +3232,15 @@ end end ) - (func $~lib/memory/memory.free (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/tlsf/__mem_free ) - (func $std/runtime/__ref_register (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/runtime/__ref_register (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $std/runtime/register_ref ) - (func $~lib/runtime/reallocate (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3337,7 +3344,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/discard (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/discard (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3371,7 +3378,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/runtime/register (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3409,13 +3416,13 @@ call $std/runtime/__ref_register local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $~lib/string/String#get:length (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -3423,7 +3430,7 @@ i32.const 1 i32.shr_u ) - (func $start:std/runtime (; 36 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 39 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $start:~lib/allocator/tlsf @@ -3781,7 +3788,7 @@ unreachable end ) - (func $std/runtime/main (; 37 ;) (type $FUNCSIG$v) + (func $std/runtime/main (; 40 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -3790,9 +3797,9 @@ global.set $~lib/started end ) - (func $start (; 38 ;) (type $FUNCSIG$v) + (func $start (; 41 ;) (type $FUNCSIG$v) call $start:std/runtime ) - (func $null (; 39 ;) (type $FUNCSIG$v) + (func $null (; 42 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 76865ab49c..1fca9dc689 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1,10 +1,10 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) @@ -19,16 +19,17 @@ (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e") + (data (i32.const 8) "\03\00\00\00\1e") (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 56) "\02\00\00\00&") + (data (i32.const 56) "\03\00\00\00&") (data (i32.const 72) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 112) "\02\00\00\00\14") + (data (i32.const 112) "\03\00\00\00\14") (data (i32.const 128) "s\00t\00d\00/\00s\00e\00t\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (table $0 23 funcref) + (elem (i32.const 0) $null $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/string/String~iterate $~lib/string/String~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -123,7 +124,26 @@ i32.const 16 i32.add ) - (func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set~iterate (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $0 + i32.const 1 + global.set $~lib/argc + local.get $0 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/string/String~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 148 @@ -156,7 +176,7 @@ i32.store local.get $0 ) - (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -367,7 +387,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -386,10 +406,10 @@ local.get $0 call $~lib/memory/memory.fill local.get $1 - i32.const 3 + i32.const 4 call $~lib/runtime/register ) - (func $~lib/set/Set#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -424,7 +444,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 9 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate @@ -452,7 +472,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -497,7 +517,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -513,7 +533,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -619,7 +639,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -711,7 +731,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -778,7 +798,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 13 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 15 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -1023,11 +1043,11 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 14 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 16 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate - i32.const 4 + i32.const 5 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -1051,7 +1071,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#has (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1065,7 +1085,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1171,7 +1191,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1261,7 +1281,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -1326,7 +1346,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 19 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 21 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -1571,11 +1591,11 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 20 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 22 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate - i32.const 5 + i32.const 7 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -1599,7 +1619,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -1644,7 +1664,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1669,7 +1689,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1784,7 +1804,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1885,7 +1905,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -1961,7 +1981,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 26 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 28 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -2206,11 +2226,11 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 27 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 29 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate - i32.const 6 + i32.const 9 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -2234,7 +2254,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#has (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2257,7 +2277,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2372,7 +2392,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2471,7 +2491,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2545,7 +2565,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 32 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 34 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -2790,11 +2810,11 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 33 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 35 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate - i32.const 7 + i32.const 11 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -2818,7 +2838,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -2849,7 +2869,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -2892,7 +2912,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2901,7 +2921,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3004,7 +3024,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 40 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3087,7 +3107,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3147,7 +3167,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 40 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 42 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -3392,11 +3412,11 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 41 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 43 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate - i32.const 8 + i32.const 13 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -3420,7 +3440,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $std/set/testNumeric (; 42 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 44 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -3665,7 +3685,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -3700,11 +3720,11 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 44 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 46 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate - i32.const 9 + i32.const 15 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -3728,7 +3748,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 47 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -3794,7 +3814,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 46 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 48 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -3837,7 +3857,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 47 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 49 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -3846,7 +3866,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 48 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 50 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3949,7 +3969,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 49 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 51 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4032,7 +4052,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 50 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#delete (; 52 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -4093,7 +4113,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 51 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 53 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/set/Set#constructor @@ -4338,11 +4358,11 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 52 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 54 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate - i32.const 10 + i32.const 17 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -4366,7 +4386,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $std/set/testNumeric (; 53 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 55 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/set/Set#constructor @@ -4611,11 +4631,11 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 54 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 56 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate - i32.const 11 + i32.const 19 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -4639,7 +4659,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 55 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 57 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -4682,7 +4702,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 56 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 58 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -4692,7 +4712,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 57 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 59 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4796,7 +4816,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 58 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#add (; 60 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4880,7 +4900,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 59 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#delete (; 61 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -4942,7 +4962,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 60 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 62 ;) (type $FUNCSIG$v) (local $0 f32) (local $1 i32) call $~lib/set/Set#constructor @@ -5187,11 +5207,11 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 61 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 63 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/allocate - i32.const 12 + i32.const 21 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -5215,7 +5235,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 62 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 64 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -5258,7 +5278,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 63 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 65 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -5268,7 +5288,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 64 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 66 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5372,7 +5392,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 65 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#add (; 67 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5456,7 +5476,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 66 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#delete (; 68 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -5518,7 +5538,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 67 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 69 ;) (type $FUNCSIG$v) (local $0 f64) (local $1 i32) call $~lib/set/Set#constructor @@ -5763,7 +5783,7 @@ unreachable end ) - (func $start (; 68 ;) (type $FUNCSIG$v) + (func $start (; 70 ;) (type $FUNCSIG$v) i32.const 152 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset @@ -5779,7 +5799,7 @@ call $std/set/testNumeric call $std/set/testNumeric ) - (func $null (; 69 ;) (type $FUNCSIG$v) + (func $null (; 71 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 9678cc4e59..b2445bfdfb 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -1,11 +1,11 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) @@ -19,15 +19,16 @@ (type $FUNCSIG$vid (func (param i32 f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 56) "\02\00\00\00&\00\00\00\00\00\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 112) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\03\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\03\00\00\00&\00\00\00\00\00\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 112) "\03\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") + (table $0 23 funcref) + (elem (i32.const 0) $null $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/string/String~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/memory/HEAP_BASE i32 (i32.const 148)) @@ -154,10 +155,30 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/collector/dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set~iterate (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/string/String~iterate (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/collector/dummy/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -195,7 +216,7 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -452,7 +473,10 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer~iterate (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -481,17 +505,17 @@ local.get $3 local.set $2 local.get $2 - i32.const 3 + i32.const 4 call $~lib/runtime/register end ) - (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/set/Set#clear (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -560,7 +584,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -594,14 +618,14 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash8 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const -2128831035 local.get $0 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -656,7 +680,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -675,7 +699,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -845,7 +869,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -947,11 +971,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1028,7 +1052,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 20 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 23 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1311,7 +1335,24 @@ unreachable end ) - (func $~lib/set/Set#clear (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set~iterate (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/set/Set#clear (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1380,14 +1421,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/allocate - i32.const 4 + i32.const 5 call $~lib/runtime/register local.set $0 end @@ -1414,7 +1455,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1467,7 +1508,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1484,7 +1525,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1654,7 +1695,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1754,11 +1795,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1833,7 +1874,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 29 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 33 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2116,7 +2157,24 @@ unreachable end ) - (func $~lib/set/Set#clear (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set~iterate (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/set/Set#clear (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2185,14 +2243,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/allocate - i32.const 5 + i32.const 7 call $~lib/runtime/register local.set $0 end @@ -2219,7 +2277,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -2241,7 +2299,7 @@ local.set $1 local.get $1 ) - (func $~lib/set/Set#find (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2296,7 +2354,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2315,7 +2373,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 40 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2485,7 +2543,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2587,11 +2645,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2668,7 +2726,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 39 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 44 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2951,7 +3009,24 @@ unreachable end ) - (func $~lib/set/Set#clear (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set~iterate (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/set/Set#clear (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3020,14 +3095,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/allocate - i32.const 6 + i32.const 9 call $~lib/runtime/register local.set $0 end @@ -3054,7 +3129,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3107,7 +3182,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -3124,7 +3199,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 50 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3294,7 +3369,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 51 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3394,11 +3469,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3473,7 +3548,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 48 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 54 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3756,7 +3831,24 @@ unreachable end ) - (func $~lib/set/Set#clear (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set~iterate (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/set/Set#clear (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3825,14 +3917,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/allocate - i32.const 7 + i32.const 11 call $~lib/runtime/register local.set $0 end @@ -3859,7 +3951,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -3901,7 +3993,7 @@ local.set $1 local.get $1 ) - (func $~lib/set/Set#find (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3952,7 +4044,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -3967,7 +4059,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 61 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4137,7 +4229,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 62 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4235,11 +4327,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 63 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4312,7 +4404,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 58 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 65 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4595,7 +4687,24 @@ unreachable end ) - (func $~lib/set/Set#clear (; 59 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set~iterate (; 66 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/set/Set#clear (; 67 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4664,14 +4773,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 68 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/allocate - i32.const 8 + i32.const 13 call $~lib/runtime/register local.set $0 end @@ -4698,7 +4807,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4749,7 +4858,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 62 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -4764,7 +4873,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 71 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4934,7 +5043,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 64 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 72 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5032,11 +5141,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 65 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 74 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5109,7 +5218,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 67 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 75 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5392,7 +5501,24 @@ unreachable end ) - (func $~lib/set/Set#clear (; 68 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set~iterate (; 76 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/set/Set#clear (; 77 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5461,14 +5587,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 78 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/allocate - i32.const 9 + i32.const 15 call $~lib/runtime/register local.set $0 end @@ -5495,7 +5621,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 70 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 79 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5583,7 +5709,7 @@ local.set $3 local.get $3 ) - (func $~lib/set/Set#find (; 71 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 80 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5634,7 +5760,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 72 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 81 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -5649,7 +5775,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 73 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 82 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5820,7 +5946,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 74 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 83 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -5919,11 +6045,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 75 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 84 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 76 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 85 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -5997,7 +6123,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 77 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 86 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6280,7 +6406,24 @@ unreachable end ) - (func $~lib/set/Set#clear (; 78 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set~iterate (; 87 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/set/Set#clear (; 88 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6349,14 +6492,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 89 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/allocate - i32.const 10 + i32.const 17 call $~lib/runtime/register local.set $0 end @@ -6383,7 +6526,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 80 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 90 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6434,7 +6577,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 81 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 91 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -6449,7 +6592,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 82 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 92 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6620,7 +6763,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 83 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 93 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6719,11 +6862,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 84 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 85 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 95 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6797,7 +6940,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 86 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 96 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -7080,7 +7223,24 @@ unreachable end ) - (func $~lib/set/Set#clear (; 87 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set~iterate (; 97 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/set/Set#clear (; 98 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7149,14 +7309,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 88 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 99 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/allocate - i32.const 11 + i32.const 19 call $~lib/runtime/register local.set $0 end @@ -7183,7 +7343,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 89 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 100 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7234,7 +7394,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 90 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 101 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) local.get $0 local.get $1 @@ -7250,7 +7410,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 91 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 102 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7422,7 +7582,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 92 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#add (; 103 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -7522,11 +7682,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 104 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 94 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#delete (; 105 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -7601,7 +7761,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 95 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 106 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -7884,7 +8044,24 @@ unreachable end ) - (func $~lib/set/Set#clear (; 96 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set~iterate (; 107 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=8 + local.set $2 + i32.const 1 + global.set $~lib/argc + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/set/Set#clear (; 108 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7953,14 +8130,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 97 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 109 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/allocate - i32.const 12 + i32.const 21 call $~lib/runtime/register local.set $0 end @@ -7987,7 +8164,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 98 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 110 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -8038,7 +8215,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 99 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 111 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) local.get $0 local.get $1 @@ -8054,7 +8231,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 100 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 112 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8226,7 +8403,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 101 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#add (; 113 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 f64) (local $3 i32) (local $4 i32) @@ -8326,11 +8503,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 114 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 103 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#delete (; 115 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -8405,7 +8582,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 104 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 116 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -8688,7 +8865,7 @@ unreachable end ) - (func $start:std/set (; 105 ;) (type $FUNCSIG$v) + (func $start:std/set (; 117 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -8710,9 +8887,9 @@ call $std/set/testNumeric call $std/set/testNumeric ) - (func $start (; 106 ;) (type $FUNCSIG$v) + (func $start (; 118 ;) (type $FUNCSIG$v) call $start:std/set ) - (func $null (; 107 ;) (type $FUNCSIG$v) + (func $null (; 119 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index c7226e25ab..bb72370adb 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1,4 +1,5 @@ (module + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -14,7 +15,6 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00 ") @@ -161,9 +161,9 @@ (data (i32.const 2128) ",\00a\00,\00b\00,\00c") (data (i32.const 2144) "\01\00\00\00\0c") (data (i32.const 2160) "a\00,\00b\00,\00c\00,") - (data (i32.const 2176) "\03\00\00\00\90\01") + (data (i32.const 2176) "\04\00\00\00\90\01") (data (i32.const 2192) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 2592) "\04\00\00\00\10") + (data (i32.const 2592) "\05\00\00\00\10") (data (i32.const 2608) "\90\08\00\00\90\08\00\00\90\01\00\00d") (data (i32.const 2624) "\01\00\00\00\02") (data (i32.const 2640) "8") @@ -233,17 +233,17 @@ (data (i32.const 3880) "-\00I\00n\00f\00i\00n\00i\00t\00y") (data (i32.const 3904) "\01\00\00\00\10") (data (i32.const 3920) "I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3936) "\03\00\00\00\b8\02") + (data (i32.const 3936) "\04\00\00\00\b8\02") (data (i32.const 3952) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~iterate $~lib/array/Array<~lib/string/String>~iterate $~lib/string/String~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) (global $std/string/str (mut i32) (i32.const 24)) (global $std/string/nullStr (mut i32) (i32.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -335,6 +335,7 @@ (global $std/string/a (mut i32) (i32.const 0)) (global $std/string/b (mut i32) (i32.const 0)) (global $std/string/sa (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) (global $~lib/util/number/_exp (mut i32) (i32.const 0)) @@ -347,7 +348,10 @@ (export "getString" (func $std/string/getString)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -409,7 +413,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -436,7 +440,7 @@ i32.const 16 i32.add ) - (func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 6736 @@ -469,7 +473,7 @@ i32.store local.get $0 ) - (func $~lib/string/String.fromCharCode (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.fromCharCode (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 2 call $~lib/runtime/allocate @@ -480,7 +484,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/util/string/compareImpl (; 5 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/string/compareImpl (; 6 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) local.get $1 i32.const 1 @@ -519,7 +523,7 @@ end local.get $4 ) - (func $~lib/string/String.__eq (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -566,7 +570,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.fromCodePoint (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -621,7 +625,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/string/String#startsWith (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#startsWith (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -669,7 +673,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String#endsWith (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#endsWith (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -717,7 +721,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String#indexOf (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#indexOf (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -801,7 +805,7 @@ end i32.const -1 ) - (func $~lib/util/memory/memcpy (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1648,7 +1652,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1842,7 +1846,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 13 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 14 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $2 local.get $3 @@ -1867,7 +1871,7 @@ end end ) - (func $~lib/string/String#padStart (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padStart (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1963,7 +1967,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/string/String#padEnd (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2060,7 +2064,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/string/String#lastIndexOf (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2143,7 +2147,7 @@ end i32.const -1 ) - (func $~lib/util/string/parse (; 17 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/util/string/parse (; 18 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2379,7 +2383,7 @@ local.get $5 f64.mul ) - (func $~lib/string/parseFloat (; 18 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 19 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 f64) @@ -2549,7 +2553,7 @@ local.get $3 f64.mul ) - (func $~lib/string/String#concat (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2598,7 +2602,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/string/String.__concat (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 312 local.get $0 @@ -2606,13 +2610,13 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.__ne (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__eq i32.eqz ) - (func $~lib/string/String.__gt (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block (result i32) @@ -2677,7 +2681,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.__lt (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block (result i32) @@ -2742,19 +2746,19 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String.__gte (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gte (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__lt i32.eqz ) - (func $~lib/string/String.__lte (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.__lte (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 416 local.get $0 call $~lib/string/String.__gt i32.eqz ) - (func $~lib/string/String#repeat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2834,7 +2838,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/string/String#slice (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.const 16 @@ -2912,7 +2916,44 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/runtime/makeArray (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>~iterate (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=4 + local.tee $2 + local.get $0 + i32.load offset=8 + i32.add + local.set $0 + loop $continue|0 + local.get $2 + local.get $0 + i32.lt_u + if + local.get $2 + i32.load + local.set $3 + i32.const 1 + global.set $~lib/argc + local.get $3 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $continue|0 + end + end + ) + (func $~lib/runtime/makeArray (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2927,7 +2968,7 @@ i32.shl local.tee $2 call $~lib/runtime/allocate - i32.const 3 + i32.const 4 call $~lib/runtime/register local.tee $3 local.set $4 @@ -2948,7 +2989,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/memory/memory.fill (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -3159,7 +3200,7 @@ end end ) - (func $~lib/runtime/reallocate (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3261,7 +3302,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureCapacity (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3310,7 +3351,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array<~lib/string/String>#push (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#push (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3340,7 +3381,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/string/String#split (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3579,7 +3620,7 @@ i32.const 0 call $~lib/runtime/makeArray ) - (func $~lib/array/Array<~lib/string/String>#__get (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3614,7 +3655,7 @@ i32.add i32.load ) - (func $~lib/util/number/decimalCount32 (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -3668,7 +3709,15 @@ end end ) - (func $~lib/util/number/utoa32_lut (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array~iterate (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/util/number/utoa32_lut (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) i32.const 2612 @@ -3778,7 +3827,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3820,7 +3869,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/util/number/utoa32 (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3843,7 +3892,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/util/number/decimalCount64 (; 39 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 42 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -3897,7 +3946,7 @@ end end ) - (func $~lib/util/number/utoa64_lut (; 40 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 43 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3994,7 +4043,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 41 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 44 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4036,7 +4085,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/util/number/itoa64 (; 42 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4101,7 +4150,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/util/number/genDigits (; 43 ;) (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 (; 46 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -4516,7 +4565,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4775,7 +4824,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 45 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 48 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -5063,7 +5112,7 @@ local.get $10 i32.add ) - (func $~lib/string/String#substring (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5159,7 +5208,7 @@ i32.const 1 call $~lib/runtime/register ) - (func $~lib/runtime/discard (; 47 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/discard (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 6736 i32.le_u @@ -5186,7 +5235,7 @@ unreachable end ) - (func $~lib/util/number/dtoa (; 48 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 51 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5231,7 +5280,7 @@ call $~lib/runtime/discard local.get $1 ) - (func $start:std/string (; 49 ;) (type $FUNCSIG$v) + (func $start:std/string (; 52 ;) (type $FUNCSIG$v) (local $0 i32) global.get $std/string/str i32.const 24 @@ -8558,13 +8607,13 @@ unreachable end ) - (func $std/string/getString (; 50 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 53 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 51 ;) (type $FUNCSIG$v) + (func $start (; 54 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 52 ;) (type $FUNCSIG$v) + (func $null (; 55 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index e8e9c3aa52..8785ede5ca 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -1,4 +1,5 @@ (module + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -9,7 +10,6 @@ (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$di (func (param i32) (result f64))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (type $FUNCSIG$id (func (param f64) (result i32))) @@ -93,8 +93,8 @@ (data (i32.const 2080) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00a\00,\00b\00,\00,\00c\00") (data (i32.const 2112) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00,\00a\00,\00b\00,\00c\00") (data (i32.const 2144) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00a\00,\00b\00,\00c\00,\00") - (data (i32.const 2176) "\03\00\00\00\90\01\00\00\00\00\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") - (data (i32.const 2592) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\90\08\00\00\90\08\00\00\90\01\00\00d\00\00\00") + (data (i32.const 2176) "\04\00\00\00\90\01\00\00\00\00\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") + (data (i32.const 2592) "\05\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\90\08\00\00\90\08\00\00\90\01\00\00d\00\00\00") (data (i32.const 2624) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\008\00") (data (i32.const 2648) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00-\001\000\000\000\00") (data (i32.const 2680) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\001\002\003\004\00") @@ -129,12 +129,12 @@ (data (i32.const 3840) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00N\00a\00N\00") (data (i32.const 3864) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") (data (i32.const 3904) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 3936) "\03\00\00\00\b8\02\00\00\00\00\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~iterate $~lib/array/Array<~lib/string/String>~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $std/string/str (mut i32) (i32.const 24)) @@ -190,6 +190,7 @@ (global $std/string/a (mut i32) (i32.const 0)) (global $std/string/b (mut i32) (i32.const 0)) (global $std/string/sa (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) @@ -211,7 +212,10 @@ (export "getString" (func $std/string/getString)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/string/String#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/string/String#get:length (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -219,7 +223,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/string/String#charCodeAt (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#charCodeAt (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 call $~lib/string/String#get:length @@ -235,7 +239,7 @@ i32.add i32.load16_u ) - (func $~lib/runtime/ADJUSTOBLOCK (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -247,7 +251,7 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__mem_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -326,12 +330,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/memory/memory.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -353,10 +357,10 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/collector/dummy/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -394,7 +398,7 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/string/String.fromCharCode (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.fromCharCode (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) block $~lib/runtime/ALLOCATE|inlined.0 (result i32) @@ -415,7 +419,7 @@ call $~lib/runtime/register end ) - (func $~lib/util/string/compareImpl (; 10 ;) (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 (; 11 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -468,7 +472,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -512,7 +516,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.fromCodePoint (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -583,7 +587,7 @@ call $~lib/runtime/register end ) - (func $~lib/string/String#startsWith (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#startsWith (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -650,7 +654,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String#endsWith (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#endsWith (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -714,7 +718,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String#indexOf (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#indexOf (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -808,7 +812,7 @@ end i32.const -1 ) - (func $~lib/util/memory/memcpy (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2009,7 +2013,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2240,7 +2244,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 18 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 19 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) i32.const 0 @@ -2272,7 +2276,7 @@ end end ) - (func $~lib/string/String#padStart (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padStart (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2381,7 +2385,7 @@ call $~lib/runtime/register end ) - (func $~lib/string/String#padEnd (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2494,7 +2498,7 @@ call $~lib/runtime/register end ) - (func $~lib/string/String#lastIndexOf (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2586,7 +2590,7 @@ end i32.const -1 ) - (func $~lib/util/string/parse (; 22 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/util/string/parse (; 23 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2887,12 +2891,12 @@ local.get $7 f64.mul ) - (func $~lib/string/parseInt (; 23 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/string/parseInt (; 24 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $0 local.get $1 call $~lib/util/string/parse ) - (func $~lib/string/parseFloat (; 24 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 25 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3089,7 +3093,7 @@ local.get $5 f64.mul ) - (func $~lib/string/String#concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3148,7 +3152,7 @@ call $~lib/runtime/register end ) - (func $~lib/string/String.__concat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 312 local.get $0 @@ -3158,13 +3162,13 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.__ne (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__eq i32.eqz ) - (func $~lib/string/String.__gt (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3226,7 +3230,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.__lt (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3288,19 +3292,19 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String.__gte (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gte (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__lt i32.eqz ) - (func $~lib/string/String.__lte (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lte (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__gt i32.eqz ) - (func $~lib/string/String#repeat (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3391,7 +3395,7 @@ call $~lib/runtime/register end ) - (func $~lib/string/String#slice (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3489,13 +3493,62 @@ call $~lib/runtime/register end ) - (func $~lib/collector/dummy/__ref_link (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>~iterate (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=8 + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + i32.load + local.set $4 + i32.const 1 + global.set $~lib/argc + local.get $4 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $4 + local.get $1 + call $~lib/string/String~iterate + local.get $2 + i32.const 4 + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/arraybuffer/ArrayBuffer~iterate (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/collector/dummy/__ref_link (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/runtime/makeArray (; 36 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/makeArray (; 39 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3515,7 +3568,7 @@ local.get $2 i32.shl call $~lib/runtime/allocate - i32.const 3 + i32.const 4 call $~lib/runtime/register local.set $6 local.get $4 @@ -3559,7 +3612,7 @@ end local.get $4 ) - (func $~lib/memory/memory.fill (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3816,14 +3869,14 @@ end end ) - (func $~lib/allocator/arena/__mem_free (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/reallocate (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3927,7 +3980,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 44 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4007,7 +4060,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array<~lib/string/String>#push (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#push (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4057,7 +4110,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 43 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 46 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4090,7 +4143,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/string/String#split (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4456,11 +4509,11 @@ end local.get $10 ) - (func $~lib/array/Array<~lib/string/String>#get:length (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#get:length (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -4469,7 +4522,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/string/String>#__get (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -4500,7 +4553,7 @@ local.get $1 call $~lib/array/Array<~lib/string/String>#__unchecked_get ) - (func $~lib/util/number/decimalCount32 (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -4569,7 +4622,15 @@ unreachable unreachable ) - (func $~lib/util/number/utoa32_lut (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array~iterate (; 52 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/util/number/utoa32_lut (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4712,7 +4773,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4776,7 +4837,7 @@ call $~lib/runtime/register end ) - (func $~lib/util/number/utoa32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4820,7 +4881,7 @@ call $~lib/runtime/register end ) - (func $~lib/util/number/decimalCount64 (; 52 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 56 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -4889,7 +4950,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 53 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 57 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -5017,7 +5078,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 54 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 58 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5097,7 +5158,7 @@ call $~lib/runtime/register end ) - (func $~lib/util/number/itoa64 (; 55 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 59 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5199,19 +5260,27 @@ call $~lib/runtime/register end ) - (func $~lib/builtins/isFinite (; 56 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 60 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 57 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 61 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/array/Array#__unchecked_get (; 58 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array~iterate (; 62 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/array/Array#__unchecked_get (; 63 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $0 i32.load offset=4 local.get $1 @@ -5220,7 +5289,15 @@ i32.add i64.load ) - (func $~lib/array/Array#__unchecked_get (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array~iterate (; 64 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/array/Array#__unchecked_get (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -5229,7 +5306,7 @@ i32.add i32.load16_s ) - (func $~lib/util/number/genDigits (; 60 ;) (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 (; 66 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -5800,7 +5877,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6133,7 +6210,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 62 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 68 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -6571,7 +6648,7 @@ local.get $2 i32.add ) - (func $~lib/string/String#substring (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6697,7 +6774,7 @@ call $~lib/runtime/register end ) - (func $~lib/runtime/discard (; 64 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/discard (; 70 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -6731,7 +6808,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/util/number/dtoa (; 65 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 71 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6787,7 +6864,7 @@ end local.get $4 ) - (func $start:std/string (; 66 ;) (type $FUNCSIG$v) + (func $start:std/string (; 72 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10179,12 +10256,12 @@ unreachable end ) - (func $std/string/getString (; 67 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 73 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 68 ;) (type $FUNCSIG$v) + (func $start (; 74 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 69 ;) (type $FUNCSIG$v) + (func $null (; 75 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 57ee7c1c02..a9ecd20af1 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -35,12 +35,12 @@ (data (i32.const 640) "\01\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/symbol/nextId (mut i32) (i32.const 12)) (global $std/symbol/sym1 (mut i32) (i32.const 0)) (global $std/symbol/sym2 (mut i32) (i32.const 0)) (global $~lib/symbol/stringToId (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index ff632e8024..170cb2a96d 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1,11 +1,11 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viid (func (param i32 i32 f64))) (type $FUNCSIG$idd (func (param f64 f64) (result i32))) (type $FUNCSIG$dii (func (param i32 i32) (result f64))) @@ -74,7 +74,7 @@ (data (i32.const 776) "f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") (data (i32.const 816) "\02\00\00\00\0c") (data (i32.const 832) "\n\00\00\00\0c\00\00\00\0e") - (data (i32.const 848) "\10\00\00\00\10") + (data (i32.const 848) "\12\00\00\00\10") (data (i32.const 864) "@\03\00\00@\03\00\00\0c\00\00\00\03") (data (i32.const 880) "\01\00\00\00,") (data (i32.const 896) "f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") @@ -86,14 +86,14 @@ (data (i32.const 1104) "f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") (data (i32.const 1160) "\02\00\00\00$") (data (i32.const 1176) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") - (data (i32.const 1216) "\10\00\00\00\10") + (data (i32.const 1216) "\12\00\00\00\10") (data (i32.const 1232) "\98\04\00\00\98\04\00\00$\00\00\00\t") (data (i32.const 1248) "\01\00\00\00B") (data (i32.const 1264) "T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") (data (i32.const 1336) "\01\00\00\00V") (data (i32.const 1352) "T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (table $0 112 funcref) - (elem (i32.const 0) $null $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) + (table $0 130 funcref) + (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/string/String~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/typedarray/arr (mut i32) (i32.const 0)) @@ -117,7 +117,10 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -179,7 +182,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -206,7 +209,7 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) block $~lib/util/memory/memset|inlined.0 @@ -431,7 +434,7 @@ end end ) - (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 1440 @@ -464,7 +467,7 @@ i32.store local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -487,7 +490,17 @@ i32.const 2 call $~lib/runtime/register ) - (func $~lib/runtime/ArrayBufferView#constructor (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/runtime/ArrayBufferView~iterate (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + i32.load + local.tee $0 + if + local.get $0 + local.get $1 + call_indirect (type $FUNCSIG$vi) + end + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1073741808 local.get $2 @@ -539,7 +552,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Int8Array#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/allocate i32.const 4 @@ -548,7 +561,7 @@ i32.const 0 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint8Array#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/allocate i32.const 5 @@ -557,7 +570,7 @@ i32.const 0 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint8ClampedArray#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/allocate i32.const 6 @@ -566,7 +579,7 @@ i32.const 0 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int16Array#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/allocate i32.const 7 @@ -575,7 +588,7 @@ i32.const 1 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint16Array#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/allocate i32.const 8 @@ -584,7 +597,7 @@ i32.const 1 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int32Array#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/allocate i32.const 9 @@ -593,7 +606,7 @@ i32.const 2 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint32Array#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/allocate i32.const 10 @@ -602,7 +615,7 @@ i32.const 2 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int64Array#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/allocate i32.const 11 @@ -611,7 +624,7 @@ i32.const 3 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint64Array#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/allocate i32.const 12 @@ -620,7 +633,7 @@ i32.const 3 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Float32Array#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/allocate i32.const 13 @@ -629,7 +642,7 @@ i32.const 2 call $~lib/runtime/ArrayBufferView#constructor ) - (func $~lib/typedarray/Float64Array#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/allocate i32.const 14 @@ -638,7 +651,7 @@ i32.const 3 call $~lib/runtime/ArrayBufferView#constructor ) - (func $std/typedarray/testInstantiate (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/typedarray/testInstantiate (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 call $~lib/typedarray/Int8Array#constructor @@ -1102,7 +1115,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#__set (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#__set (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1126,7 +1139,7 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int32Array#__get (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#__get (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1149,7 +1162,7 @@ i32.add i32.load ) - (func $~lib/typedarray/Int32Array#subarray (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1241,7 +1254,7 @@ i32.store offset=8 local.get $2 ) - (func $~lib/typedarray/Float64Array#__set (; 22 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/typedarray/Float64Array#__set (; 24 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 local.get $0 i32.load offset=8 @@ -1265,7 +1278,7 @@ local.get $2 f64.store ) - (func $~lib/typedarray/Float64Array#subarray (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#subarray (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1357,7 +1370,7 @@ i32.store offset=8 local.get $2 ) - (func $~lib/util/sort/insertionSort (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) @@ -1439,7 +1452,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) @@ -1695,7 +1708,7 @@ local.get $5 f64.store ) - (func $~lib/typedarray/Float64Array#sort (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#sort (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 f64) @@ -1755,7 +1768,7 @@ end end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 27 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 29 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -1784,7 +1797,7 @@ i64.lt_s i32.sub ) - (func $~lib/typedarray/Float64Array#__get (; 28 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/typedarray/Float64Array#__get (; 30 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -1807,7 +1820,7 @@ i32.add f64.load ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1839,7 +1852,7 @@ i32.and i32.store8 ) - (func $~lib/typedarray/Uint8ClampedArray#__get (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#__get (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1858,7 +1871,7 @@ i32.add i32.load8_u ) - (func $~lib/typedarray/Int8Array#__set (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int8Array#__set (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1878,7 +1891,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Int8Array#fill (; 32 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/typedarray/Int8Array#fill (; 34 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) local.get $0 @@ -1943,7 +1956,15 @@ call $~lib/memory/memory.fill end ) - (func $~lib/util/memory/memcpy (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array~iterate (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/util/memory/memcpy (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2790,7 +2811,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2984,7 +3005,7 @@ end end ) - (func $~lib/runtime/makeArray (; 35 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/makeArray (; 38 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) i32.const 16 @@ -3025,7 +3046,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int8Array#__get (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3044,7 +3065,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__get (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3063,7 +3084,7 @@ i32.add i32.load8_s ) - (func $std/typedarray/isInt8ArrayEqual (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3105,7 +3126,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3191,7 +3212,7 @@ i32.store offset=8 local.get $2 ) - (func $~lib/typedarray/Int32Array#fill (; 40 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/typedarray/Int32Array#fill (; 43 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) local.get $1 @@ -3268,7 +3289,7 @@ end end ) - (func $~lib/array/Array#__get (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3291,7 +3312,7 @@ i32.add i32.load ) - (func $std/typedarray/isInt32ArrayEqual (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3337,12 +3358,12 @@ end i32.const 1 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 43 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 46 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduce (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3367,7 +3388,7 @@ i32.load8_s local.get $1 local.get $0 - i32.const 2 + i32.const 20 call_indirect (type $FUNCSIG$iiiii) local.set $2 local.get $1 @@ -3379,7 +3400,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 45 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 48 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -3410,7 +3431,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#__set (; 46 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3430,7 +3451,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Uint8Array#reduce (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3467,7 +3488,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 48 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 51 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -3484,7 +3505,7 @@ i32.const 3 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 3 + i32.const 21 call $~lib/typedarray/Uint8Array#reduce i32.const 255 i32.and @@ -3499,7 +3520,7 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 49 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 52 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -3516,7 +3537,7 @@ i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 4 + i32.const 22 call $~lib/typedarray/Uint8Array#reduce i32.const 255 i32.and @@ -3531,7 +3552,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#__set (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3555,7 +3576,7 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Int16Array#reduce (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduce (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3584,7 +3605,7 @@ i32.load16_s local.get $1 local.get $0 - i32.const 5 + i32.const 23 call_indirect (type $FUNCSIG$iiiii) local.set $2 local.get $1 @@ -3596,7 +3617,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 52 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 55 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -3627,7 +3648,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#__set (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 56 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3651,7 +3672,7 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Uint16Array#reduce (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduce (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3680,7 +3701,7 @@ i32.load16_u local.get $1 local.get $0 - i32.const 6 + i32.const 24 call_indirect (type $FUNCSIG$iiiii) local.set $2 local.get $1 @@ -3692,7 +3713,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 55 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 58 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -3723,7 +3744,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reduce (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3764,7 +3785,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 57 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 60 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -3781,7 +3802,7 @@ i32.const 3 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 7 + i32.const 25 call $~lib/typedarray/Int32Array#reduce i32.const 6 i32.ne @@ -3794,7 +3815,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#__set (; 58 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint32Array#__set (; 61 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3818,7 +3839,7 @@ local.get $2 i32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 59 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 62 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -3835,7 +3856,7 @@ i32.const 3 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 8 + i32.const 26 call $~lib/typedarray/Int32Array#reduce i32.const 6 i32.ne @@ -3848,7 +3869,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#__set (; 60 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 63 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -3872,12 +3893,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 61 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 64 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 62 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 65 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -3918,7 +3939,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 63 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 66 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -3935,7 +3956,7 @@ i64.const 3 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 9 + i32.const 27 call $~lib/typedarray/Int64Array#reduce i64.const 6 i64.ne @@ -3948,7 +3969,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#__set (; 64 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Uint64Array#__set (; 67 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -3972,7 +3993,7 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 65 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 68 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -3989,7 +4010,7 @@ i64.const 3 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 10 + i32.const 28 call $~lib/typedarray/Int64Array#reduce i64.const 6 i64.ne @@ -4002,7 +4023,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#__set (; 66 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 69 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -4026,12 +4047,12 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 67 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 70 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 68 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $~lib/typedarray/Float32Array#reduce (; 71 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) (local $1 i32) (local $2 f32) (local $3 i32) @@ -4060,7 +4081,7 @@ f32.load local.get $1 local.get $0 - i32.const 11 + i32.const 29 call_indirect (type $FUNCSIG$fffii) local.set $2 local.get $1 @@ -4072,7 +4093,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 69 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 72 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -4101,12 +4122,12 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 70 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 73 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 71 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/typedarray/Float64Array#reduce (; 74 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -4135,7 +4156,7 @@ f64.load local.get $1 local.get $0 - i32.const 12 + i32.const 30 call_indirect (type $FUNCSIG$dddii) local.set $2 local.get $1 @@ -4147,7 +4168,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 72 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 75 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -4176,7 +4197,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#reduceRight (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduceRight (; 76 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4202,7 +4223,7 @@ i32.load8_s local.get $1 local.get $0 - i32.const 13 + i32.const 31 call_indirect (type $FUNCSIG$iiiii) local.set $2 local.get $1 @@ -4214,7 +4235,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 74 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 77 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -4245,7 +4266,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 75 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 78 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4283,7 +4304,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 76 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 79 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -4300,7 +4321,7 @@ i32.const 3 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 14 + i32.const 32 call $~lib/typedarray/Uint8Array#reduceRight i32.const 255 i32.and @@ -4315,7 +4336,7 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 77 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 80 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -4332,7 +4353,7 @@ i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 15 + i32.const 33 call $~lib/typedarray/Uint8Array#reduceRight i32.const 255 i32.and @@ -4347,7 +4368,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reduceRight (; 78 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduceRight (; 81 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4377,7 +4398,7 @@ i32.load16_s local.get $1 local.get $0 - i32.const 16 + i32.const 34 call_indirect (type $FUNCSIG$iiiii) local.set $2 local.get $1 @@ -4389,7 +4410,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 79 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 82 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -4420,7 +4441,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 83 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4450,7 +4471,7 @@ i32.load16_u local.get $1 local.get $0 - i32.const 17 + i32.const 35 call_indirect (type $FUNCSIG$iiiii) local.set $2 local.get $1 @@ -4462,7 +4483,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 81 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 84 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -4493,7 +4514,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reduceRight (; 82 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 85 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4535,7 +4556,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 83 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 86 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -4552,7 +4573,7 @@ i32.const 3 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 18 + i32.const 36 call $~lib/typedarray/Int32Array#reduceRight i32.const 6 i32.ne @@ -4565,7 +4586,7 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 84 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 87 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -4582,7 +4603,7 @@ i32.const 3 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 19 + i32.const 37 call $~lib/typedarray/Int32Array#reduceRight i32.const 6 i32.ne @@ -4595,7 +4616,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#reduceRight (; 85 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 88 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -4637,7 +4658,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 86 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 89 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -4654,7 +4675,7 @@ i64.const 3 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 20 + i32.const 38 call $~lib/typedarray/Int64Array#reduceRight i64.const 6 i64.ne @@ -4667,7 +4688,7 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 87 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 90 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -4684,7 +4705,7 @@ i64.const 3 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 21 + i32.const 39 call $~lib/typedarray/Int64Array#reduceRight i64.const 6 i64.ne @@ -4697,7 +4718,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#reduceRight (; 88 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $~lib/typedarray/Float32Array#reduceRight (; 91 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) (local $1 i32) (local $2 f32) (local $3 i32) @@ -4727,7 +4748,7 @@ f32.load local.get $1 local.get $0 - i32.const 22 + i32.const 40 call_indirect (type $FUNCSIG$fffii) local.set $2 local.get $1 @@ -4739,7 +4760,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 89 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 92 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -4768,7 +4789,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#reduceRight (; 90 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/typedarray/Float64Array#reduceRight (; 93 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -4798,7 +4819,7 @@ f64.load local.get $1 local.get $0 - i32.const 23 + i32.const 41 call_indirect (type $FUNCSIG$dddii) local.set $2 local.get $1 @@ -4810,7 +4831,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 91 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 94 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -4839,12 +4860,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 92 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 95 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 96 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4878,7 +4899,7 @@ i32.load8_s local.get $1 local.get $0 - i32.const 24 + i32.const 42 call_indirect (type $FUNCSIG$iiii) i32.store8 local.get $1 @@ -4890,7 +4911,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 94 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 97 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -4948,7 +4969,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#map (; 95 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 98 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4982,7 +5003,7 @@ i32.load8_u local.get $1 local.get $0 - i32.const 25 + i32.const 43 call_indirect (type $FUNCSIG$iiii) i32.store8 local.get $1 @@ -4994,7 +5015,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint8Array#__get (; 96 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__get (; 99 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5013,7 +5034,7 @@ i32.add i32.load8_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 97 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 100 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -5071,7 +5092,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 98 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 101 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5105,7 +5126,7 @@ i32.load8_u local.get $1 local.get $0 - i32.const 26 + i32.const 44 call_indirect (type $FUNCSIG$iiii) i32.store8 local.get $1 @@ -5117,7 +5138,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 99 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 102 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -5175,7 +5196,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#map (; 100 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 103 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5213,7 +5234,7 @@ i32.load16_s local.get $1 local.get $0 - i32.const 27 + i32.const 45 call_indirect (type $FUNCSIG$iiii) local.set $7 local.get $5 @@ -5230,7 +5251,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#__get (; 101 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 104 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5253,7 +5274,7 @@ i32.add i32.load16_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 102 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 105 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -5311,7 +5332,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#map (; 103 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 106 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5349,7 +5370,7 @@ i32.load16_u local.get $1 local.get $0 - i32.const 28 + i32.const 46 call_indirect (type $FUNCSIG$iiii) local.set $7 local.get $5 @@ -5366,7 +5387,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint16Array#__get (; 104 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 107 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5389,7 +5410,7 @@ i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 105 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 108 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -5447,7 +5468,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#map (; 106 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 109 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5485,7 +5506,7 @@ i32.load local.get $1 local.get $0 - i32.const 29 + i32.const 47 call_indirect (type $FUNCSIG$iiii) local.set $7 local.get $5 @@ -5502,7 +5523,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 107 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 110 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -5560,7 +5581,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#map (; 108 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 111 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5598,7 +5619,7 @@ i32.load local.get $1 local.get $0 - i32.const 30 + i32.const 48 call_indirect (type $FUNCSIG$iiii) local.set $7 local.get $5 @@ -5615,7 +5636,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint32Array#__get (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 112 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5638,7 +5659,7 @@ i32.add i32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 110 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 113 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -5696,12 +5717,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 111 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 114 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 112 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5739,7 +5760,7 @@ i64.load local.get $1 local.get $0 - i32.const 31 + i32.const 49 call_indirect (type $FUNCSIG$jjii) local.set $7 local.get $5 @@ -5756,7 +5777,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#__get (; 113 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 116 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -5779,7 +5800,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 114 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 117 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -5837,7 +5858,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#map (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 118 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5875,7 +5896,7 @@ i64.load local.get $1 local.get $0 - i32.const 32 + i32.const 50 call_indirect (type $FUNCSIG$jjii) local.set $7 local.get $5 @@ -5892,7 +5913,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint64Array#__get (; 116 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__get (; 119 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -5915,7 +5936,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 117 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 120 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -5973,12 +5994,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 118 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 121 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 119 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 122 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6016,7 +6037,7 @@ f32.load local.get $1 local.get $0 - i32.const 33 + i32.const 51 call_indirect (type $FUNCSIG$ffii) local.set $7 local.get $5 @@ -6033,7 +6054,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#__get (; 120 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 123 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -6056,7 +6077,7 @@ i32.add f32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 121 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 124 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -6114,12 +6135,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 122 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 125 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 126 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6157,7 +6178,7 @@ f64.load local.get $1 local.get $0 - i32.const 34 + i32.const 52 call_indirect (type $FUNCSIG$ddii) local.set $7 local.get $5 @@ -6174,7 +6195,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 124 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 127 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -6232,14 +6253,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 125 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 128 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6278,13 +6299,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 127 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 130 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 128 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 131 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -6301,7 +6322,7 @@ i32.const 6 call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 35 + i32.const 53 call $~lib/typedarray/Int8Array#some i32.eqz if @@ -6313,7 +6334,7 @@ unreachable end local.get $0 - i32.const 36 + i32.const 54 call $~lib/typedarray/Int8Array#some if i32.const 0 @@ -6324,7 +6345,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#some (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6363,7 +6384,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 130 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 133 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -6380,7 +6401,7 @@ i32.const 6 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 37 + i32.const 55 call $~lib/typedarray/Uint8Array#some i32.eqz if @@ -6392,7 +6413,7 @@ unreachable end local.get $0 - i32.const 38 + i32.const 56 call $~lib/typedarray/Uint8Array#some if i32.const 0 @@ -6403,7 +6424,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 131 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 134 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -6420,7 +6441,7 @@ i32.const 6 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 39 + i32.const 57 call $~lib/typedarray/Uint8Array#some i32.eqz if @@ -6432,7 +6453,7 @@ unreachable end local.get $0 - i32.const 40 + i32.const 58 call $~lib/typedarray/Uint8Array#some if i32.const 0 @@ -6443,14 +6464,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 132 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 135 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6493,13 +6514,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 134 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 135 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 138 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -6516,7 +6537,7 @@ i32.const 6 call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 41 + i32.const 59 call $~lib/typedarray/Int16Array#some i32.eqz if @@ -6528,7 +6549,7 @@ unreachable end local.get $0 - i32.const 42 + i32.const 60 call $~lib/typedarray/Int16Array#some if i32.const 0 @@ -6539,7 +6560,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#some (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6582,7 +6603,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 137 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 140 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -6599,7 +6620,7 @@ i32.const 6 call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 43 + i32.const 61 call $~lib/typedarray/Uint16Array#some i32.eqz if @@ -6611,7 +6632,7 @@ unreachable end local.get $0 - i32.const 44 + i32.const 62 call $~lib/typedarray/Uint16Array#some if i32.const 0 @@ -6622,12 +6643,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 138 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 141 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6670,11 +6691,11 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 140 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 143 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 141 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 144 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -6691,7 +6712,7 @@ i32.const 6 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 45 + i32.const 63 call $~lib/typedarray/Int32Array#some i32.eqz if @@ -6703,7 +6724,7 @@ unreachable end local.get $0 - i32.const 46 + i32.const 64 call $~lib/typedarray/Int32Array#some if i32.const 0 @@ -6714,7 +6735,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 142 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 145 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -6731,7 +6752,7 @@ i32.const 6 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 47 + i32.const 65 call $~lib/typedarray/Int32Array#some i32.eqz if @@ -6743,7 +6764,7 @@ unreachable end local.get $0 - i32.const 48 + i32.const 66 call $~lib/typedarray/Int32Array#some if i32.const 0 @@ -6754,12 +6775,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 143 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 146 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6802,12 +6823,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 145 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 148 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 146 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 149 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -6824,7 +6845,7 @@ i64.const 6 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 49 + i32.const 67 call $~lib/typedarray/Int64Array#some i32.eqz if @@ -6836,7 +6857,7 @@ unreachable end local.get $0 - i32.const 50 + i32.const 68 call $~lib/typedarray/Int64Array#some if i32.const 0 @@ -6847,7 +6868,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 147 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 150 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -6864,7 +6885,7 @@ i64.const 6 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 51 + i32.const 69 call $~lib/typedarray/Int64Array#some i32.eqz if @@ -6876,7 +6897,7 @@ unreachable end local.get $0 - i32.const 52 + i32.const 70 call $~lib/typedarray/Int64Array#some if i32.const 0 @@ -6887,12 +6908,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 148 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 151 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6935,12 +6956,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 150 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 153 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 151 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 154 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -6957,7 +6978,7 @@ f32.const 6 call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 53 + i32.const 71 call $~lib/typedarray/Float32Array#some i32.eqz if @@ -6969,7 +6990,7 @@ unreachable end local.get $0 - i32.const 54 + i32.const 72 call $~lib/typedarray/Float32Array#some if i32.const 0 @@ -6980,12 +7001,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 152 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 155 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 156 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7028,12 +7049,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 154 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 157 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 155 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 158 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -7050,7 +7071,7 @@ f64.const 6 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 55 + i32.const 73 call $~lib/typedarray/Float64Array#some i32.eqz if @@ -7062,7 +7083,7 @@ unreachable end local.get $0 - i32.const 56 + i32.const 74 call $~lib/typedarray/Float64Array#some if i32.const 0 @@ -7073,7 +7094,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#findIndex (; 156 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7115,14 +7136,14 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 157 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 160 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 158 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 161 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -7139,7 +7160,7 @@ i32.const 3 call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 57 + i32.const 75 call $~lib/typedarray/Int8Array#findIndex i32.const 1 i32.ne @@ -7152,7 +7173,7 @@ unreachable end local.get $0 - i32.const 58 + i32.const 76 call $~lib/typedarray/Int8Array#findIndex i32.const -1 i32.ne @@ -7165,7 +7186,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#findIndex (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7207,7 +7228,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 160 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 163 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -7224,7 +7245,7 @@ i32.const 3 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 59 + i32.const 77 call $~lib/typedarray/Uint8Array#findIndex i32.const 1 i32.ne @@ -7237,7 +7258,7 @@ unreachable end local.get $0 - i32.const 60 + i32.const 78 call $~lib/typedarray/Uint8Array#findIndex i32.const -1 i32.ne @@ -7250,7 +7271,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 161 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 164 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -7267,7 +7288,7 @@ i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 61 + i32.const 79 call $~lib/typedarray/Uint8Array#findIndex i32.const 1 i32.ne @@ -7280,7 +7301,7 @@ unreachable end local.get $0 - i32.const 62 + i32.const 80 call $~lib/typedarray/Uint8Array#findIndex i32.const -1 i32.ne @@ -7293,7 +7314,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#findIndex (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7339,14 +7360,14 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 163 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 166 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 164 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 167 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -7363,7 +7384,7 @@ i32.const 3 call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 63 + i32.const 81 call $~lib/typedarray/Int16Array#findIndex i32.const 1 i32.ne @@ -7376,7 +7397,7 @@ unreachable end local.get $0 - i32.const 64 + i32.const 82 call $~lib/typedarray/Int16Array#findIndex i32.const -1 i32.ne @@ -7389,7 +7410,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#findIndex (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7435,7 +7456,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 166 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 169 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -7452,7 +7473,7 @@ i32.const 3 call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 65 + i32.const 83 call $~lib/typedarray/Uint16Array#findIndex i32.const 1 i32.ne @@ -7465,7 +7486,7 @@ unreachable end local.get $0 - i32.const 66 + i32.const 84 call $~lib/typedarray/Uint16Array#findIndex i32.const -1 i32.ne @@ -7478,7 +7499,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#findIndex (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7524,12 +7545,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 168 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 171 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 169 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 172 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -7546,7 +7567,7 @@ i32.const 3 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 67 + i32.const 85 call $~lib/typedarray/Int32Array#findIndex i32.const 1 i32.ne @@ -7559,7 +7580,7 @@ unreachable end local.get $0 - i32.const 68 + i32.const 86 call $~lib/typedarray/Int32Array#findIndex i32.const -1 i32.ne @@ -7572,7 +7593,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 170 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 173 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -7589,7 +7610,7 @@ i32.const 3 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 69 + i32.const 87 call $~lib/typedarray/Int32Array#findIndex i32.const 1 i32.ne @@ -7602,7 +7623,7 @@ unreachable end local.get $0 - i32.const 70 + i32.const 88 call $~lib/typedarray/Int32Array#findIndex i32.const -1 i32.ne @@ -7615,7 +7636,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#findIndex (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7661,12 +7682,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 172 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 175 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 173 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 176 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -7683,7 +7704,7 @@ i64.const 3 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 71 + i32.const 89 call $~lib/typedarray/Int64Array#findIndex i32.const 1 i32.ne @@ -7696,7 +7717,7 @@ unreachable end local.get $0 - i32.const 72 + i32.const 90 call $~lib/typedarray/Int64Array#findIndex i32.const -1 i32.ne @@ -7709,7 +7730,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 174 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 177 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -7726,7 +7747,7 @@ i64.const 3 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 73 + i32.const 91 call $~lib/typedarray/Int64Array#findIndex i32.const 1 i32.ne @@ -7739,7 +7760,7 @@ unreachable end local.get $0 - i32.const 74 + i32.const 92 call $~lib/typedarray/Int64Array#findIndex i32.const -1 i32.ne @@ -7752,7 +7773,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#findIndex (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7798,12 +7819,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 176 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 179 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 177 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 180 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -7820,7 +7841,7 @@ f32.const 3 call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 75 + i32.const 93 call $~lib/typedarray/Float32Array#findIndex i32.const 1 i32.ne @@ -7833,7 +7854,7 @@ unreachable end local.get $0 - i32.const 76 + i32.const 94 call $~lib/typedarray/Float32Array#findIndex i32.const -1 i32.ne @@ -7846,7 +7867,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#findIndex (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7892,12 +7913,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 179 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 182 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 180 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 183 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -7914,7 +7935,7 @@ f64.const 3 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 77 + i32.const 95 call $~lib/typedarray/Float64Array#findIndex i32.const 1 i32.ne @@ -7927,7 +7948,7 @@ unreachable end local.get $0 - i32.const 78 + i32.const 96 call $~lib/typedarray/Float64Array#findIndex i32.const -1 i32.ne @@ -7940,7 +7961,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 181 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 184 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -7950,7 +7971,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int8Array#every (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 185 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7990,7 +8011,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 183 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 186 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -8007,7 +8028,7 @@ i32.const 6 call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 79 + i32.const 97 call $~lib/typedarray/Int8Array#every i32.eqz if @@ -8019,7 +8040,7 @@ unreachable end local.get $0 - i32.const 80 + i32.const 98 call $~lib/typedarray/Int8Array#every if i32.const 0 @@ -8030,13 +8051,13 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 184 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 187 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#every (; 185 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8076,7 +8097,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 186 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 189 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -8093,7 +8114,7 @@ i32.const 6 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 81 + i32.const 99 call $~lib/typedarray/Uint8Array#every i32.eqz if @@ -8105,7 +8126,7 @@ unreachable end local.get $0 - i32.const 82 + i32.const 100 call $~lib/typedarray/Uint8Array#every if i32.const 0 @@ -8116,7 +8137,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 187 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 190 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -8133,7 +8154,7 @@ i32.const 6 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 83 + i32.const 101 call $~lib/typedarray/Uint8Array#every i32.eqz if @@ -8145,7 +8166,7 @@ unreachable end local.get $0 - i32.const 84 + i32.const 102 call $~lib/typedarray/Uint8Array#every if i32.const 0 @@ -8156,7 +8177,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 188 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 191 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8166,7 +8187,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int16Array#every (; 189 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8210,7 +8231,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 190 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 193 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -8227,7 +8248,7 @@ i32.const 6 call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 85 + i32.const 103 call $~lib/typedarray/Int16Array#every i32.eqz if @@ -8239,7 +8260,7 @@ unreachable end local.get $0 - i32.const 86 + i32.const 104 call $~lib/typedarray/Int16Array#every if i32.const 0 @@ -8250,7 +8271,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#every (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 194 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8294,7 +8315,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 192 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 195 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -8311,7 +8332,7 @@ i32.const 6 call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 87 + i32.const 105 call $~lib/typedarray/Uint16Array#every i32.eqz if @@ -8323,7 +8344,7 @@ unreachable end local.get $0 - i32.const 88 + i32.const 106 call $~lib/typedarray/Uint16Array#every if i32.const 0 @@ -8334,13 +8355,13 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 196 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int32Array#every (; 194 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8384,7 +8405,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 195 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 198 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -8401,7 +8422,7 @@ i32.const 6 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 89 + i32.const 107 call $~lib/typedarray/Int32Array#every i32.eqz if @@ -8413,7 +8434,7 @@ unreachable end local.get $0 - i32.const 90 + i32.const 108 call $~lib/typedarray/Int32Array#every if i32.const 0 @@ -8424,7 +8445,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 196 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 199 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -8441,7 +8462,7 @@ i32.const 6 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 91 + i32.const 109 call $~lib/typedarray/Int32Array#every i32.eqz if @@ -8453,7 +8474,7 @@ unreachable end local.get $0 - i32.const 92 + i32.const 110 call $~lib/typedarray/Int32Array#every if i32.const 0 @@ -8464,14 +8485,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 197 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 200 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 201 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8515,7 +8536,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 199 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 202 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -8532,7 +8553,7 @@ i64.const 6 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 93 + i32.const 111 call $~lib/typedarray/Int64Array#every i32.eqz if @@ -8544,7 +8565,7 @@ unreachable end local.get $0 - i32.const 94 + i32.const 112 call $~lib/typedarray/Int64Array#every if i32.const 0 @@ -8555,14 +8576,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 200 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 203 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 201 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 204 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -8579,7 +8600,7 @@ i64.const 6 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 95 + i32.const 113 call $~lib/typedarray/Int64Array#every i32.eqz if @@ -8591,7 +8612,7 @@ unreachable end local.get $0 - i32.const 96 + i32.const 114 call $~lib/typedarray/Int64Array#every if i32.const 0 @@ -8602,7 +8623,7 @@ unreachable end ) - (func $~lib/math/NativeMathf.mod (; 202 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 205 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8753,13 +8774,13 @@ local.get $0 f32.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 203 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 206 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 204 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8803,7 +8824,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 205 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 208 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -8820,7 +8841,7 @@ f32.const 6 call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 97 + i32.const 115 call $~lib/typedarray/Float32Array#every i32.eqz if @@ -8832,7 +8853,7 @@ unreachable end local.get $0 - i32.const 98 + i32.const 116 call $~lib/typedarray/Float32Array#every if i32.const 0 @@ -8843,7 +8864,7 @@ unreachable end ) - (func $~lib/math/NativeMath.mod (; 206 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 209 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -9002,13 +9023,13 @@ local.get $0 f64.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 207 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 210 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 211 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9052,7 +9073,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 209 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 212 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -9069,7 +9090,7 @@ f64.const 6 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 99 + i32.const 117 call $~lib/typedarray/Float64Array#every i32.eqz if @@ -9081,7 +9102,7 @@ unreachable end local.get $0 - i32.const 100 + i32.const 118 call $~lib/typedarray/Float64Array#every if i32.const 0 @@ -9092,7 +9113,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 210 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 213 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 255 i32.and @@ -9137,7 +9158,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 211 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Int8Array#forEach (; 214 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9160,7 +9181,7 @@ i32.load8_s local.get $1 local.get $0 - i32.const 101 + i32.const 119 call_indirect (type $FUNCSIG$viii) local.get $1 i32.const 1 @@ -9170,7 +9191,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 212 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 215 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9222,7 +9243,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#forEach (; 213 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 216 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9255,7 +9276,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 214 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 217 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9288,7 +9309,7 @@ i32.and call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 102 + i32.const 120 call $~lib/typedarray/Uint8Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -9302,7 +9323,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 215 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 218 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9335,7 +9356,7 @@ i32.and call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 103 + i32.const 121 call $~lib/typedarray/Uint8Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -9349,7 +9370,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 216 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 219 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 65535 i32.and @@ -9394,7 +9415,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 217 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Int16Array#forEach (; 220 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9421,7 +9442,7 @@ i32.load16_s local.get $1 local.get $0 - i32.const 104 + i32.const 122 call_indirect (type $FUNCSIG$viii) local.get $1 i32.const 1 @@ -9431,7 +9452,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 218 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 221 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9483,7 +9504,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#forEach (; 219 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 222 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9510,7 +9531,7 @@ i32.load16_u local.get $1 local.get $0 - i32.const 105 + i32.const 123 call_indirect (type $FUNCSIG$viii) local.get $1 i32.const 1 @@ -9520,7 +9541,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 220 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 223 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9566,7 +9587,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 221 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 224 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/typedarray/forEachValues local.get $1 call $~lib/array/Array#__get @@ -9607,7 +9628,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 222 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 225 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9644,7 +9665,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 223 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 226 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9671,7 +9692,7 @@ call $~lib/array/Array#__get call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 106 + i32.const 124 call $~lib/typedarray/Int32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -9685,7 +9706,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 224 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 227 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9712,7 +9733,7 @@ call $~lib/array/Array#__get call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 107 + i32.const 125 call $~lib/typedarray/Int32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -9726,7 +9747,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 225 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 228 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) local.get $0 global.get $std/typedarray/forEachValues local.get $1 @@ -9768,7 +9789,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 226 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 229 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9805,7 +9826,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 227 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 230 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9835,7 +9856,7 @@ i64.extend_i32_s call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 108 + i32.const 126 call $~lib/typedarray/Int64Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -9849,7 +9870,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 228 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 231 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9879,7 +9900,7 @@ i64.extend_i32_s call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 109 + i32.const 127 call $~lib/typedarray/Int64Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -9893,7 +9914,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 229 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 232 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) local.get $0 global.get $std/typedarray/forEachValues local.get $1 @@ -9935,7 +9956,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 230 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Float32Array#forEach (; 233 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9962,7 +9983,7 @@ f32.load local.get $1 local.get $0 - i32.const 110 + i32.const 128 call_indirect (type $FUNCSIG$vfii) local.get $1 i32.const 1 @@ -9972,7 +9993,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 231 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 234 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -10015,7 +10036,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 232 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 235 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) local.get $0 global.get $std/typedarray/forEachValues local.get $1 @@ -10057,7 +10078,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 233 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Float64Array#forEach (; 236 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10084,7 +10105,7 @@ f64.load local.get $1 local.get $0 - i32.const 111 + i32.const 129 call_indirect (type $FUNCSIG$vdii) local.get $1 i32.const 1 @@ -10094,7 +10115,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 234 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 237 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -10137,7 +10158,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#reverse (; 235 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 238 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10185,7 +10206,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 236 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 239 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10330,7 +10351,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 237 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 240 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10378,7 +10399,7 @@ end local.get $0 ) - (func $~lib/typedarray/Uint8Array#subarray (; 238 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 241 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10433,7 +10454,7 @@ i32.store offset=8 local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 239 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 242 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10570,7 +10591,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 240 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 243 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10625,7 +10646,7 @@ i32.store offset=8 local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 241 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 244 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10762,7 +10783,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 242 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 245 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10816,7 +10837,7 @@ end local.get $0 ) - (func $~lib/typedarray/Int16Array#subarray (; 243 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 246 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10877,7 +10898,7 @@ i32.store offset=8 local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 244 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 247 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11020,7 +11041,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 245 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 248 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11074,7 +11095,7 @@ end local.get $0 ) - (func $~lib/typedarray/Uint16Array#subarray (; 246 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 249 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11135,7 +11156,7 @@ i32.store offset=8 local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 247 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 250 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11272,7 +11293,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 248 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 251 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11326,7 +11347,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 249 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 252 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11459,7 +11480,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#subarray (; 250 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 253 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11520,7 +11541,7 @@ i32.store offset=8 local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 251 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 254 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11651,7 +11672,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#reverse (; 252 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 255 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11705,7 +11726,7 @@ end local.get $0 ) - (func $~lib/typedarray/Int64Array#subarray (; 253 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 256 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11766,7 +11787,7 @@ i32.store offset=8 local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 254 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 257 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11900,7 +11921,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#subarray (; 255 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 258 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11961,7 +11982,7 @@ i32.store offset=8 local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 256 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 259 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12095,7 +12116,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 257 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 260 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12149,7 +12170,7 @@ end local.get $0 ) - (func $~lib/typedarray/Float32Array#subarray (; 258 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 261 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12210,7 +12231,7 @@ i32.store offset=8 local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 259 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 262 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12344,7 +12365,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 260 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 263 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12398,7 +12419,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 261 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 264 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12534,7 +12555,7 @@ unreachable end ) - (func $start:std/typedarray (; 262 ;) (type $FUNCSIG$v) + (func $start:std/typedarray (; 265 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 1440 @@ -12795,7 +12816,7 @@ end unreachable end - i32.const 1 + i32.const 15 local.set $0 end local.get $1 @@ -12929,7 +12950,7 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 + i32.const 16 i32.const 0 i32.const 240 call $~lib/runtime/makeArray @@ -12950,7 +12971,7 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 + i32.const 16 i32.const 0 i32.const 312 call $~lib/runtime/makeArray @@ -12971,7 +12992,7 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 + i32.const 16 i32.const 0 i32.const 336 call $~lib/runtime/makeArray @@ -12992,7 +13013,7 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 + i32.const 16 i32.const 0 i32.const 360 call $~lib/runtime/makeArray @@ -13013,7 +13034,7 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 + i32.const 16 i32.const 0 i32.const 384 call $~lib/runtime/makeArray @@ -13079,7 +13100,7 @@ end global.get $std/typedarray/sub8 i32.const 3 - i32.const 15 + i32.const 16 i32.const 0 i32.const 408 call $~lib/runtime/makeArray @@ -13095,7 +13116,7 @@ end global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 + i32.const 16 i32.const 0 i32.const 432 call $~lib/runtime/makeArray @@ -13139,7 +13160,7 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 + i32.const 18 i32.const 2 i32.const 456 call $~lib/runtime/makeArray @@ -13160,7 +13181,7 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 + i32.const 18 i32.const 2 i32.const 496 call $~lib/runtime/makeArray @@ -13181,7 +13202,7 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 + i32.const 18 i32.const 2 i32.const 536 call $~lib/runtime/makeArray @@ -13202,7 +13223,7 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 + i32.const 18 i32.const 2 i32.const 576 call $~lib/runtime/makeArray @@ -13223,7 +13244,7 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 + i32.const 18 i32.const 2 i32.const 616 call $~lib/runtime/makeArray @@ -13291,7 +13312,7 @@ end global.get $std/typedarray/sub32 i32.const 3 - i32.const 16 + i32.const 18 i32.const 2 i32.const 656 call $~lib/runtime/makeArray @@ -13307,7 +13328,7 @@ end global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 + i32.const 18 i32.const 2 i32.const 688 call $~lib/runtime/makeArray @@ -13614,10 +13635,10 @@ call $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> call $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> ) - (func $start (; 263 ;) (type $FUNCSIG$v) + (func $start (; 266 ;) (type $FUNCSIG$v) call $start:std/typedarray ) - (func $null (; 264 ;) (type $FUNCSIG$v) + (func $null (; 267 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 76a24d374d..a90300f4b2 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -1,11 +1,11 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viid (func (param i32 i32 f64))) (type $FUNCSIG$idd (func (param f64 f64) (result i32))) (type $FUNCSIG$dii (func (param i32 i32) (result f64))) @@ -58,17 +58,17 @@ (data (i32.const 712) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 760) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 816) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\0c\00\00\00\0e\00\00\00") - (data (i32.const 848) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00@\03\00\00@\03\00\00\0c\00\00\00\03\00\00\00") + (data (i32.const 848) "\12\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00@\03\00\00@\03\00\00\0c\00\00\00\03\00\00\00") (data (i32.const 880) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 944) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 1008) "\01\00\00\00>\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 1088) "\01\00\00\006\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 1160) "\02\00\00\00$\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00") - (data (i32.const 1216) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\98\04\00\00\98\04\00\00$\00\00\00\t\00\00\00") + (data (i32.const 1216) "\12\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\98\04\00\00\98\04\00\00$\00\00\00\t\00\00\00") (data (i32.const 1248) "\01\00\00\00B\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 1336) "\01\00\00\00V\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (table $0 112 funcref) - (elem (i32.const 0) $null $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) + (table $0 130 funcref) + (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/typedarray/Int8Array~iterate $~lib/typedarray/Uint8Array~iterate $~lib/typedarray/Uint8ClampedArray~iterate $~lib/typedarray/Int16Array~iterate $~lib/typedarray/Uint16Array~iterate $~lib/typedarray/Int32Array~iterate $~lib/typedarray/Uint32Array~iterate $~lib/typedarray/Int64Array~iterate $~lib/typedarray/Uint64Array~iterate $~lib/typedarray/Float32Array~iterate $~lib/typedarray/Float64Array~iterate $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32 (i32.const 1)) (global $~lib/typedarray/Uint8Array.BYTES_PER_ELEMENT i32 (i32.const 1)) (global $~lib/typedarray/Uint8ClampedArray.BYTES_PER_ELEMENT i32 (i32.const 1)) @@ -110,7 +110,10 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -122,7 +125,7 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -201,12 +204,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -228,7 +231,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -485,10 +488,13 @@ end end ) - (func $~lib/collector/dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/arraybuffer/ArrayBuffer~iterate (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/collector/dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -526,7 +532,7 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -559,13 +565,27 @@ call $~lib/runtime/register end ) - (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/runtime/ArrayBufferView~iterate (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load + local.tee $2 + if + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $2 + local.get $1 + call $~lib/arraybuffer/ArrayBuffer~iterate + end + ) + (func $~lib/collector/dummy/__ref_link (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (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 (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -641,7 +661,13 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Int8Array#constructor (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array~iterate (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + call $~lib/runtime/ArrayBufferView~iterate + ) + (func $~lib/typedarray/Int8Array#constructor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -657,22 +683,28 @@ local.set $0 local.get $0 ) - (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load i32.sub ) - (func $~lib/runtime/ArrayBufferView#get:byteLength (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#get:byteLength (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 ) - (func $~lib/typedarray/Int8Array#get:length (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#get:length (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Uint8Array#constructor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array~iterate (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + call $~lib/runtime/ArrayBufferView~iterate + ) + (func $~lib/typedarray/Uint8Array#constructor (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -688,11 +720,17 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint8Array#get:length (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#get:length (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Uint8ClampedArray#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray~iterate (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + call $~lib/runtime/ArrayBufferView~iterate + ) + (func $~lib/typedarray/Uint8ClampedArray#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -708,11 +746,17 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint8ClampedArray#get:length (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Int16Array#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array~iterate (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + call $~lib/runtime/ArrayBufferView~iterate + ) + (func $~lib/typedarray/Int16Array#constructor (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -728,13 +772,19 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int16Array#get:length (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#get:length (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 1 i32.shr_u ) - (func $~lib/typedarray/Uint16Array#constructor (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array~iterate (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + call $~lib/runtime/ArrayBufferView~iterate + ) + (func $~lib/typedarray/Uint16Array#constructor (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -750,13 +800,19 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint16Array#get:length (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#get:length (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 1 i32.shr_u ) - (func $~lib/typedarray/Int32Array#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array~iterate (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + call $~lib/runtime/ArrayBufferView~iterate + ) + (func $~lib/typedarray/Int32Array#constructor (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -772,13 +828,19 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int32Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#get:length (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Uint32Array#constructor (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array~iterate (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + call $~lib/runtime/ArrayBufferView~iterate + ) + (func $~lib/typedarray/Uint32Array#constructor (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -794,13 +856,19 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint32Array#get:length (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#get:length (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Int64Array#constructor (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array~iterate (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + call $~lib/runtime/ArrayBufferView~iterate + ) + (func $~lib/typedarray/Int64Array#constructor (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -816,13 +884,19 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int64Array#get:length (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#get:length (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $~lib/typedarray/Uint64Array#constructor (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array~iterate (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + call $~lib/runtime/ArrayBufferView~iterate + ) + (func $~lib/typedarray/Uint64Array#constructor (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -838,13 +912,19 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint64Array#get:length (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#get:length (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $~lib/typedarray/Float32Array#constructor (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array~iterate (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + call $~lib/runtime/ArrayBufferView~iterate + ) + (func $~lib/typedarray/Float32Array#constructor (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -860,13 +940,19 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Float32Array#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#get:length (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Float64Array#constructor (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array~iterate (; 47 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + call $~lib/runtime/ArrayBufferView~iterate + ) + (func $~lib/typedarray/Float64Array#constructor (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -882,13 +968,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Float64Array#get:length (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#get:length (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/runtime/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $std/typedarray/testInstantiate (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/typedarray/testInstantiate (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1396,7 +1482,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#__set (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#__set (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1420,7 +1506,7 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int32Array#__get (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#__get (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1443,7 +1529,7 @@ i32.add i32.load ) - (func $~lib/typedarray/Int32Array#subarray (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1580,7 +1666,7 @@ i32.store offset=8 local.get $7 ) - (func $~lib/typedarray/Float64Array#__set (; 40 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/typedarray/Float64Array#__set (; 54 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 local.get $0 i32.load offset=8 @@ -1604,7 +1690,7 @@ local.get $2 f64.store ) - (func $~lib/typedarray/Float64Array#subarray (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#subarray (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1741,7 +1827,7 @@ i32.store offset=8 local.get $7 ) - (func $~lib/util/sort/insertionSort (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 56 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) @@ -1837,14 +1923,14 @@ unreachable end ) - (func $~lib/allocator/arena/__mem_free (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 57 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 58 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/util/sort/weakHeapSort (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 59 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2144,7 +2230,7 @@ local.get $10 f64.store ) - (func $~lib/typedarray/Float64Array#sort (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2228,7 +2314,7 @@ local.get $3 end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 47 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 61 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -2261,7 +2347,7 @@ i64.lt_s i32.sub ) - (func $~lib/typedarray/Float64Array#sort|trampoline (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort|trampoline (; 62 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2271,7 +2357,7 @@ unreachable end block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) - i32.const 1 + i32.const 15 br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 @@ -2280,7 +2366,7 @@ local.get $1 call $~lib/typedarray/Float64Array#sort ) - (func $~lib/typedarray/Float64Array#__get (; 49 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/typedarray/Float64Array#__get (; 63 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -2303,7 +2389,7 @@ i32.add f64.load ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 64 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2335,7 +2421,7 @@ i32.and i32.store8 ) - (func $~lib/typedarray/Uint8ClampedArray#__get (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#__get (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2354,7 +2440,7 @@ i32.add i32.load8_u ) - (func $~lib/typedarray/Int8Array#__set (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int8Array#__set (; 66 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2374,7 +2460,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Int8Array#fill (; 53 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int8Array#fill (; 67 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2462,7 +2548,15 @@ end local.get $7 ) - (func $~lib/util/memory/memcpy (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array~iterate (; 68 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/util/memory/memcpy (; 69 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3663,7 +3757,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 70 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3894,7 +3988,7 @@ end end ) - (func $~lib/runtime/makeArray (; 56 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/makeArray (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3958,11 +4052,11 @@ end local.get $4 ) - (func $~lib/array/Array#get:length (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 72 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/typedarray/Int8Array#__get (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 73 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3981,7 +4075,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__unchecked_get (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 74 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -3990,7 +4084,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__get (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 75 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4009,7 +4103,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/typedarray/isInt8ArrayEqual (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4057,7 +4151,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 77 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4194,7 +4288,7 @@ i32.store offset=8 local.get $7 ) - (func $~lib/typedarray/Int32Array#fill (; 63 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#fill (; 78 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -4292,11 +4386,19 @@ end local.get $7 ) - (func $~lib/array/Array#get:length (; 64 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array~iterate (; 79 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 1 + global.set $~lib/argc + local.get $0 + i32.load + local.get $1 + call_indirect (type $FUNCSIG$vi) + ) + (func $~lib/array/Array#get:length (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 81 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -4305,7 +4407,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 82 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4324,7 +4426,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/typedarray/isInt32ArrayEqual (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 83 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4372,12 +4474,12 @@ end i32.const 1 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 84 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduce (; 85 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4434,7 +4536,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 70 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 86 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4454,7 +4556,7 @@ i32.const 3 call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 2 + i32.const 20 i32.const 0 call $~lib/typedarray/Int8Array#reduce local.set $1 @@ -4475,7 +4577,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#__set (; 71 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 87 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4495,12 +4597,12 @@ local.get $2 i32.store8 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 72 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 88 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduce (; 73 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 89 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4557,7 +4659,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 74 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 90 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4577,7 +4679,7 @@ i32.const 3 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 3 + i32.const 21 i32.const 0 call $~lib/typedarray/Uint8Array#reduce local.set $1 @@ -4596,12 +4698,12 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 75 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 91 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduce (; 76 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduce (; 92 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4658,7 +4760,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 77 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 93 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4678,7 +4780,7 @@ i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 4 + i32.const 22 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#reduce local.set $1 @@ -4697,7 +4799,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#__set (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 94 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4721,12 +4823,12 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 79 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduce (; 80 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduce (; 96 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4783,7 +4885,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 81 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 97 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4803,7 +4905,7 @@ i32.const 3 call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 5 + i32.const 23 i32.const 0 call $~lib/typedarray/Int16Array#reduce local.set $1 @@ -4824,7 +4926,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#__set (; 82 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 98 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4848,12 +4950,12 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 83 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduce (; 84 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduce (; 100 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4910,7 +5012,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 85 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 101 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4930,7 +5032,7 @@ i32.const 3 call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 6 + i32.const 24 i32.const 0 call $~lib/typedarray/Uint16Array#reduce local.set $1 @@ -4949,12 +5051,12 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 86 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 102 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduce (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 103 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5011,7 +5113,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 88 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 104 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5031,7 +5133,7 @@ i32.const 3 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 7 + i32.const 25 i32.const 0 call $~lib/typedarray/Int32Array#reduce local.set $1 @@ -5048,7 +5150,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#__set (; 89 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint32Array#__set (; 105 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -5072,12 +5174,12 @@ local.get $2 i32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 90 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduce (; 91 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduce (; 107 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5134,7 +5236,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 92 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 108 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5154,7 +5256,7 @@ i32.const 3 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 8 + i32.const 26 i32.const 0 call $~lib/typedarray/Uint32Array#reduce local.set $1 @@ -5171,7 +5273,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#__set (; 93 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 109 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -5195,12 +5297,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 94 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 110 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 95 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 111 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -5257,7 +5359,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 96 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 112 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5277,7 +5379,7 @@ i64.const 3 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 9 + i32.const 27 i64.const 0 call $~lib/typedarray/Int64Array#reduce local.set $1 @@ -5294,7 +5396,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#__set (; 97 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Uint64Array#__set (; 113 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -5318,12 +5420,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 98 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 114 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduce (; 99 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduce (; 115 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -5380,7 +5482,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 100 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 116 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5400,7 +5502,7 @@ i64.const 3 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 10 + i32.const 28 i64.const 0 call $~lib/typedarray/Uint64Array#reduce local.set $1 @@ -5417,7 +5519,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#__set (; 101 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 117 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -5441,12 +5543,12 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 102 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 118 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 103 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduce (; 119 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -5503,7 +5605,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 104 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 120 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -5523,7 +5625,7 @@ f32.const 3 call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 11 + i32.const 29 f32.const 0 call $~lib/typedarray/Float32Array#reduce local.set $1 @@ -5540,12 +5642,12 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 105 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 121 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 106 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduce (; 122 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) @@ -5602,7 +5704,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 107 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 123 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -5622,7 +5724,7 @@ f64.const 3 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 12 + i32.const 30 f64.const 0 call $~lib/typedarray/Float64Array#reduce local.set $1 @@ -5639,12 +5741,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 124 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduceRight (; 109 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduceRight (; 125 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5698,7 +5800,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 110 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 126 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5718,7 +5820,7 @@ i32.const 3 call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 13 + i32.const 31 i32.const 0 call $~lib/typedarray/Int8Array#reduceRight local.set $1 @@ -5739,12 +5841,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 111 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 127 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 112 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 128 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5798,7 +5900,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 113 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 129 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5818,7 +5920,7 @@ i32.const 3 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 14 + i32.const 32 i32.const 0 call $~lib/typedarray/Uint8Array#reduceRight local.set $1 @@ -5837,12 +5939,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 114 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 130 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 115 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5896,7 +5998,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 116 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 132 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5916,7 +6018,7 @@ i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 15 + i32.const 33 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#reduceRight local.set $1 @@ -5935,12 +6037,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 117 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 133 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduceRight (; 118 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduceRight (; 134 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5994,7 +6096,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 119 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 135 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6014,7 +6116,7 @@ i32.const 3 call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 16 + i32.const 34 i32.const 0 call $~lib/typedarray/Int16Array#reduceRight local.set $1 @@ -6035,12 +6137,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 120 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 136 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 121 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6094,7 +6196,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 122 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 138 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6114,7 +6216,7 @@ i32.const 3 call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 17 + i32.const 35 i32.const 0 call $~lib/typedarray/Uint16Array#reduceRight local.set $1 @@ -6133,12 +6235,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 123 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 139 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduceRight (; 124 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 140 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6192,7 +6294,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 125 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 141 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6212,7 +6314,7 @@ i32.const 3 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 18 + i32.const 36 i32.const 0 call $~lib/typedarray/Int32Array#reduceRight local.set $1 @@ -6229,12 +6331,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 126 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 142 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduceRight (; 127 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduceRight (; 143 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6288,7 +6390,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 128 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 144 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6308,7 +6410,7 @@ i32.const 3 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 19 + i32.const 37 i32.const 0 call $~lib/typedarray/Uint32Array#reduceRight local.set $1 @@ -6325,12 +6427,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 129 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 145 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduceRight (; 130 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 146 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -6384,7 +6486,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 131 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 147 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6404,7 +6506,7 @@ i64.const 3 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 20 + i32.const 38 i64.const 0 call $~lib/typedarray/Int64Array#reduceRight local.set $1 @@ -6421,12 +6523,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 132 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 148 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduceRight (; 133 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduceRight (; 149 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -6480,7 +6582,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 134 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 150 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6500,7 +6602,7 @@ i64.const 3 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 21 + i32.const 39 i64.const 0 call $~lib/typedarray/Uint64Array#reduceRight local.set $1 @@ -6517,12 +6619,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 135 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 151 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduceRight (; 136 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduceRight (; 152 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -6576,7 +6678,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 137 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 153 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -6596,7 +6698,7 @@ f32.const 3 call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 22 + i32.const 40 f32.const 0 call $~lib/typedarray/Float32Array#reduceRight local.set $1 @@ -6613,12 +6715,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 138 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 154 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduceRight (; 139 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduceRight (; 155 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) @@ -6672,7 +6774,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 140 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 156 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -6692,7 +6794,7 @@ f64.const 3 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 23 + i32.const 41 f64.const 0 call $~lib/typedarray/Float64Array#reduceRight local.set $1 @@ -6709,12 +6811,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 141 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 157 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6779,7 +6881,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 143 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 159 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6799,7 +6901,7 @@ i32.const 3 call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 24 + i32.const 42 call $~lib/typedarray/Int8Array#map local.set $1 local.get $1 @@ -6845,12 +6947,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 144 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 160 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8Array#map (; 145 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6915,7 +7017,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint8Array#__get (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__get (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -6934,7 +7036,7 @@ i32.add i32.load8_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 147 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 163 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6954,7 +7056,7 @@ i32.const 3 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 25 + i32.const 43 call $~lib/typedarray/Uint8Array#map local.set $1 local.get $1 @@ -7000,12 +7102,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 148 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 164 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7070,7 +7172,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 150 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 166 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7090,7 +7192,7 @@ i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 26 + i32.const 44 call $~lib/typedarray/Uint8ClampedArray#map local.set $1 local.get $1 @@ -7136,12 +7238,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 151 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 167 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int16Array#map (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7206,7 +7308,7 @@ end local.get $6 ) - (func $~lib/typedarray/Int16Array#__get (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7229,7 +7331,7 @@ i32.add i32.load16_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 154 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 170 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7249,7 +7351,7 @@ i32.const 3 call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 27 + i32.const 45 call $~lib/typedarray/Int16Array#map local.set $1 local.get $1 @@ -7295,12 +7397,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 155 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 171 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint16Array#map (; 156 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7365,7 +7467,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint16Array#__get (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7388,7 +7490,7 @@ i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 158 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 174 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7408,7 +7510,7 @@ i32.const 3 call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 28 + i32.const 46 call $~lib/typedarray/Uint16Array#map local.set $1 local.get $1 @@ -7454,12 +7556,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 159 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 175 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int32Array#map (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7524,7 +7626,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 161 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 177 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7544,7 +7646,7 @@ i32.const 3 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 29 + i32.const 47 call $~lib/typedarray/Int32Array#map local.set $1 local.get $1 @@ -7590,12 +7692,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 162 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 178 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint32Array#map (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 179 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7660,7 +7762,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint32Array#__get (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7683,7 +7785,7 @@ i32.add i32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 165 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 181 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7703,7 +7805,7 @@ i32.const 3 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 30 + i32.const 48 call $~lib/typedarray/Uint32Array#map local.set $1 local.get $1 @@ -7749,12 +7851,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 166 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 182 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 183 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7819,7 +7921,7 @@ end local.get $6 ) - (func $~lib/typedarray/Int64Array#__get (; 168 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 184 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -7842,7 +7944,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 169 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 185 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7862,7 +7964,7 @@ i64.const 3 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 31 + i32.const 49 call $~lib/typedarray/Int64Array#map local.set $1 local.get $1 @@ -7908,12 +8010,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 170 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 186 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Uint64Array#map (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 187 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7978,7 +8080,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint64Array#__get (; 172 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__get (; 188 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -8001,7 +8103,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 173 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 189 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8021,7 +8123,7 @@ i64.const 3 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 32 + i32.const 50 call $~lib/typedarray/Uint64Array#map local.set $1 local.get $1 @@ -8067,12 +8169,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 174 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 190 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8137,7 +8239,7 @@ end local.get $6 ) - (func $~lib/typedarray/Float32Array#__get (; 176 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 192 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -8160,7 +8262,7 @@ i32.add f32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 177 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 193 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8180,7 +8282,7 @@ f32.const 3 call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 33 + i32.const 51 call $~lib/typedarray/Float32Array#map local.set $1 local.get $1 @@ -8226,12 +8328,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 178 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 194 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 179 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 195 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8296,7 +8398,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 180 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 196 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8316,7 +8418,7 @@ f64.const 3 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 34 + i32.const 52 call $~lib/typedarray/Float64Array#map local.set $1 local.get $1 @@ -8362,7 +8464,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 181 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 197 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -8371,7 +8473,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8431,7 +8533,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 183 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 199 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -8440,7 +8542,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 184 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 200 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8461,7 +8563,7 @@ i32.const 6 call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 35 + i32.const 53 call $~lib/typedarray/Int8Array#some local.set $1 local.get $1 @@ -8477,7 +8579,7 @@ unreachable end local.get $0 - i32.const 36 + i32.const 54 call $~lib/typedarray/Int8Array#some local.set $2 local.get $2 @@ -8494,14 +8596,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 185 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 201 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#some (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8561,14 +8663,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 187 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 203 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 188 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 204 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8589,7 +8691,7 @@ i32.const 6 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 37 + i32.const 55 call $~lib/typedarray/Uint8Array#some local.set $1 local.get $1 @@ -8605,7 +8707,7 @@ unreachable end local.get $0 - i32.const 38 + i32.const 56 call $~lib/typedarray/Uint8Array#some local.set $2 local.get $2 @@ -8622,14 +8724,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 189 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 205 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#some (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#some (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8689,14 +8791,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 191 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 207 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 192 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 208 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8717,7 +8819,7 @@ i32.const 6 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 39 + i32.const 57 call $~lib/typedarray/Uint8ClampedArray#some local.set $1 local.get $1 @@ -8733,7 +8835,7 @@ unreachable end local.get $0 - i32.const 40 + i32.const 58 call $~lib/typedarray/Uint8ClampedArray#some local.set $2 local.get $2 @@ -8750,7 +8852,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 209 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8759,7 +8861,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 194 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 210 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8819,7 +8921,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 195 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 211 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8828,7 +8930,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 196 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 212 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8849,7 +8951,7 @@ i32.const 6 call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 41 + i32.const 59 call $~lib/typedarray/Int16Array#some local.set $1 local.get $1 @@ -8865,7 +8967,7 @@ unreachable end local.get $0 - i32.const 42 + i32.const 60 call $~lib/typedarray/Int16Array#some local.set $2 local.get $2 @@ -8882,14 +8984,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 197 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 213 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#some (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8949,14 +9051,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 199 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 215 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 200 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 216 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8977,7 +9079,7 @@ i32.const 6 call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 43 + i32.const 61 call $~lib/typedarray/Uint16Array#some local.set $1 local.get $1 @@ -8993,7 +9095,7 @@ unreachable end local.get $0 - i32.const 44 + i32.const 62 call $~lib/typedarray/Uint16Array#some local.set $2 local.get $2 @@ -9010,12 +9112,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 201 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 217 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 218 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9075,12 +9177,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 203 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 219 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 204 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 220 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9101,7 +9203,7 @@ i32.const 6 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 45 + i32.const 63 call $~lib/typedarray/Int32Array#some local.set $1 local.get $1 @@ -9117,7 +9219,7 @@ unreachable end local.get $0 - i32.const 46 + i32.const 64 call $~lib/typedarray/Int32Array#some local.set $2 local.get $2 @@ -9134,12 +9236,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 205 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 221 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#some (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#some (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9199,12 +9301,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 207 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 223 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 208 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 224 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9225,7 +9327,7 @@ i32.const 6 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 47 + i32.const 65 call $~lib/typedarray/Uint32Array#some local.set $1 local.get $1 @@ -9241,7 +9343,7 @@ unreachable end local.get $0 - i32.const 48 + i32.const 66 call $~lib/typedarray/Uint32Array#some local.set $2 local.get $2 @@ -9258,12 +9360,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 209 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 225 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 210 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9323,12 +9425,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 211 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 227 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 212 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 228 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9349,7 +9451,7 @@ i64.const 6 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 49 + i32.const 67 call $~lib/typedarray/Int64Array#some local.set $1 local.get $1 @@ -9365,7 +9467,7 @@ unreachable end local.get $0 - i32.const 50 + i32.const 68 call $~lib/typedarray/Int64Array#some local.set $2 local.get $2 @@ -9382,12 +9484,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 213 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 229 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#some (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#some (; 230 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9447,12 +9549,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 215 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 231 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 216 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 232 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9473,7 +9575,7 @@ i64.const 6 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 51 + i32.const 69 call $~lib/typedarray/Uint64Array#some local.set $1 local.get $1 @@ -9489,7 +9591,7 @@ unreachable end local.get $0 - i32.const 52 + i32.const 70 call $~lib/typedarray/Uint64Array#some local.set $2 local.get $2 @@ -9506,12 +9608,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 217 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 233 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 218 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 234 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9571,12 +9673,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 219 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 235 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 220 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 236 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9597,7 +9699,7 @@ f32.const 6 call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 53 + i32.const 71 call $~lib/typedarray/Float32Array#some local.set $1 local.get $1 @@ -9613,7 +9715,7 @@ unreachable end local.get $0 - i32.const 54 + i32.const 72 call $~lib/typedarray/Float32Array#some local.set $2 local.get $2 @@ -9630,12 +9732,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 221 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 237 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9695,12 +9797,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 223 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 239 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 224 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 240 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9721,7 +9823,7 @@ f64.const 6 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 55 + i32.const 73 call $~lib/typedarray/Float64Array#some local.set $1 local.get $1 @@ -9737,7 +9839,7 @@ unreachable end local.get $0 - i32.const 56 + i32.const 74 call $~lib/typedarray/Float64Array#some local.set $2 local.get $2 @@ -9754,7 +9856,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 241 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9763,7 +9865,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#findIndex (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 242 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9823,7 +9925,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 227 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 243 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9832,7 +9934,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 228 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 244 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9853,7 +9955,7 @@ i32.const 3 call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 57 + i32.const 75 call $~lib/typedarray/Int8Array#findIndex local.set $1 local.get $1 @@ -9869,7 +9971,7 @@ unreachable end local.get $0 - i32.const 58 + i32.const 76 call $~lib/typedarray/Int8Array#findIndex local.set $2 local.get $2 @@ -9885,14 +9987,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 229 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 245 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#findIndex (; 230 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9952,14 +10054,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 231 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 247 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 232 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 248 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9980,7 +10082,7 @@ i32.const 3 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 59 + i32.const 77 call $~lib/typedarray/Uint8Array#findIndex local.set $1 local.get $1 @@ -9996,7 +10098,7 @@ unreachable end local.get $0 - i32.const 60 + i32.const 78 call $~lib/typedarray/Uint8Array#findIndex local.set $2 local.get $2 @@ -10012,14 +10114,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 233 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 249 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 234 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10079,14 +10181,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 235 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 251 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 236 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 252 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10107,7 +10209,7 @@ i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 61 + i32.const 79 call $~lib/typedarray/Uint8ClampedArray#findIndex local.set $1 local.get $1 @@ -10123,7 +10225,7 @@ unreachable end local.get $0 - i32.const 62 + i32.const 80 call $~lib/typedarray/Uint8ClampedArray#findIndex local.set $2 local.get $2 @@ -10139,7 +10241,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 237 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 253 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10148,7 +10250,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#findIndex (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 254 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10208,7 +10310,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 239 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 255 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10217,7 +10319,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 240 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 256 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10238,7 +10340,7 @@ i32.const 3 call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 63 + i32.const 81 call $~lib/typedarray/Int16Array#findIndex local.set $1 local.get $1 @@ -10254,7 +10356,7 @@ unreachable end local.get $0 - i32.const 64 + i32.const 82 call $~lib/typedarray/Int16Array#findIndex local.set $2 local.get $2 @@ -10270,14 +10372,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 241 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 257 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#findIndex (; 242 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10337,14 +10439,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 243 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 259 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 244 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 260 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10365,7 +10467,7 @@ i32.const 3 call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 65 + i32.const 83 call $~lib/typedarray/Uint16Array#findIndex local.set $1 local.get $1 @@ -10381,7 +10483,7 @@ unreachable end local.get $0 - i32.const 66 + i32.const 84 call $~lib/typedarray/Uint16Array#findIndex local.set $2 local.get $2 @@ -10397,12 +10499,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 245 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 261 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#findIndex (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10462,12 +10564,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 247 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 263 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 248 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 264 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10488,7 +10590,7 @@ i32.const 3 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 67 + i32.const 85 call $~lib/typedarray/Int32Array#findIndex local.set $1 local.get $1 @@ -10504,7 +10606,7 @@ unreachable end local.get $0 - i32.const 68 + i32.const 86 call $~lib/typedarray/Int32Array#findIndex local.set $2 local.get $2 @@ -10520,12 +10622,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 249 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 265 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#findIndex (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#findIndex (; 266 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10585,12 +10687,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 251 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 267 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 252 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 268 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10611,7 +10713,7 @@ i32.const 3 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 69 + i32.const 87 call $~lib/typedarray/Uint32Array#findIndex local.set $1 local.get $1 @@ -10627,7 +10729,7 @@ unreachable end local.get $0 - i32.const 70 + i32.const 88 call $~lib/typedarray/Uint32Array#findIndex local.set $2 local.get $2 @@ -10643,12 +10745,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 253 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 269 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#findIndex (; 254 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 270 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10708,12 +10810,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 255 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 271 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 256 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 272 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10734,7 +10836,7 @@ i64.const 3 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 71 + i32.const 89 call $~lib/typedarray/Int64Array#findIndex local.set $1 local.get $1 @@ -10750,7 +10852,7 @@ unreachable end local.get $0 - i32.const 72 + i32.const 90 call $~lib/typedarray/Int64Array#findIndex local.set $2 local.get $2 @@ -10766,12 +10868,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 257 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 273 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#findIndex (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#findIndex (; 274 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10831,12 +10933,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 259 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 275 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 260 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 276 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10857,7 +10959,7 @@ i64.const 3 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 73 + i32.const 91 call $~lib/typedarray/Uint64Array#findIndex local.set $1 local.get $1 @@ -10873,7 +10975,7 @@ unreachable end local.get $0 - i32.const 74 + i32.const 92 call $~lib/typedarray/Uint64Array#findIndex local.set $2 local.get $2 @@ -10889,12 +10991,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 261 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 277 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#findIndex (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 278 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10954,12 +11056,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 263 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 279 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 264 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 280 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10980,7 +11082,7 @@ f32.const 3 call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 75 + i32.const 93 call $~lib/typedarray/Float32Array#findIndex local.set $1 local.get $1 @@ -10996,7 +11098,7 @@ unreachable end local.get $0 - i32.const 76 + i32.const 94 call $~lib/typedarray/Float32Array#findIndex local.set $2 local.get $2 @@ -11012,12 +11114,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 265 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 281 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#findIndex (; 266 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11077,12 +11179,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 267 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 283 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 268 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 284 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11103,7 +11205,7 @@ f64.const 3 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 77 + i32.const 95 call $~lib/typedarray/Float64Array#findIndex local.set $1 local.get $1 @@ -11119,7 +11221,7 @@ unreachable end local.get $0 - i32.const 78 + i32.const 96 call $~lib/typedarray/Float64Array#findIndex local.set $2 local.get $2 @@ -11135,7 +11237,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 269 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 285 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11146,7 +11248,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int8Array#every (; 270 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 286 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11213,7 +11315,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 271 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 287 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11222,7 +11324,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 272 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 288 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11243,7 +11345,7 @@ i32.const 6 call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 79 + i32.const 97 call $~lib/typedarray/Int8Array#every local.set $1 local.get $1 @@ -11259,7 +11361,7 @@ unreachable end local.get $0 - i32.const 80 + i32.const 98 call $~lib/typedarray/Int8Array#every local.set $2 local.get $2 @@ -11276,7 +11378,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 273 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 289 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -11285,7 +11387,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8Array#every (; 274 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 290 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11352,14 +11454,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 275 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 291 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 276 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 292 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11380,7 +11482,7 @@ i32.const 6 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 81 + i32.const 99 call $~lib/typedarray/Uint8Array#every local.set $1 local.get $1 @@ -11396,7 +11498,7 @@ unreachable end local.get $0 - i32.const 82 + i32.const 100 call $~lib/typedarray/Uint8Array#every local.set $2 local.get $2 @@ -11413,7 +11515,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 277 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 293 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -11422,7 +11524,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#every (; 278 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#every (; 294 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11489,14 +11591,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 279 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 295 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 280 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 296 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11517,7 +11619,7 @@ i32.const 6 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 83 + i32.const 101 call $~lib/typedarray/Uint8ClampedArray#every local.set $1 local.get $1 @@ -11533,7 +11635,7 @@ unreachable end local.get $0 - i32.const 84 + i32.const 102 call $~lib/typedarray/Uint8ClampedArray#every local.set $2 local.get $2 @@ -11550,7 +11652,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 281 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 297 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11561,7 +11663,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int16Array#every (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 298 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11628,7 +11730,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 283 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 299 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11637,7 +11739,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 284 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 300 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11658,7 +11760,7 @@ i32.const 6 call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 85 + i32.const 103 call $~lib/typedarray/Int16Array#every local.set $1 local.get $1 @@ -11674,7 +11776,7 @@ unreachable end local.get $0 - i32.const 86 + i32.const 104 call $~lib/typedarray/Int16Array#every local.set $2 local.get $2 @@ -11691,7 +11793,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 285 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 301 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and @@ -11700,7 +11802,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint16Array#every (; 286 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 302 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11767,14 +11869,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 287 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 303 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 288 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 304 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11795,7 +11897,7 @@ i32.const 6 call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 87 + i32.const 105 call $~lib/typedarray/Uint16Array#every local.set $1 local.get $1 @@ -11811,7 +11913,7 @@ unreachable end local.get $0 - i32.const 88 + i32.const 106 call $~lib/typedarray/Uint16Array#every local.set $2 local.get $2 @@ -11828,14 +11930,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 289 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 305 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.const 0 i32.eq ) - (func $~lib/typedarray/Int32Array#every (; 290 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 306 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11902,12 +12004,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 291 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 307 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 292 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 308 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11928,7 +12030,7 @@ i32.const 6 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 89 + i32.const 107 call $~lib/typedarray/Int32Array#every local.set $1 local.get $1 @@ -11944,7 +12046,7 @@ unreachable end local.get $0 - i32.const 90 + i32.const 108 call $~lib/typedarray/Int32Array#every local.set $2 local.get $2 @@ -11961,14 +12063,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 293 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 309 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_u i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint32Array#every (; 294 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#every (; 310 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12035,12 +12137,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 295 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 311 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 296 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 312 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12061,7 +12163,7 @@ i32.const 6 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 91 + i32.const 109 call $~lib/typedarray/Uint32Array#every local.set $1 local.get $1 @@ -12077,7 +12179,7 @@ unreachable end local.get $0 - i32.const 92 + i32.const 110 call $~lib/typedarray/Uint32Array#every local.set $2 local.get $2 @@ -12094,14 +12196,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 297 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 313 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (; 298 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 314 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12168,12 +12270,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 299 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 315 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 300 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 316 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12194,7 +12296,7 @@ i64.const 6 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 93 + i32.const 111 call $~lib/typedarray/Int64Array#every local.set $1 local.get $1 @@ -12210,7 +12312,7 @@ unreachable end local.get $0 - i32.const 94 + i32.const 112 call $~lib/typedarray/Int64Array#every local.set $2 local.get $2 @@ -12227,14 +12329,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 301 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 317 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $~lib/typedarray/Uint64Array#every (; 302 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#every (; 318 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12301,12 +12403,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 303 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 319 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 304 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 320 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12327,7 +12429,7 @@ i64.const 6 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 95 + i32.const 113 call $~lib/typedarray/Uint64Array#every local.set $1 local.get $1 @@ -12343,7 +12445,7 @@ unreachable end local.get $0 - i32.const 96 + i32.const 114 call $~lib/typedarray/Uint64Array#every local.set $2 local.get $2 @@ -12360,12 +12462,12 @@ unreachable end ) - (func $~lib/builtins/isNaN (; 305 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 321 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $~lib/math/NativeMathf.mod (; 306 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 322 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12616,14 +12718,14 @@ local.get $2 f32.reinterpret_i32 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 307 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 323 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 308 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 324 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12690,12 +12792,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 309 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 325 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 310 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 326 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12716,7 +12818,7 @@ f32.const 6 call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 97 + i32.const 115 call $~lib/typedarray/Float32Array#every local.set $1 local.get $1 @@ -12732,7 +12834,7 @@ unreachable end local.get $0 - i32.const 98 + i32.const 116 call $~lib/typedarray/Float32Array#every local.set $2 local.get $2 @@ -12749,12 +12851,12 @@ unreachable end ) - (func $~lib/builtins/isNaN (; 311 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 327 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/math/NativeMath.mod (; 312 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 328 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -13007,14 +13109,14 @@ local.get $2 f64.reinterpret_i64 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 313 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 329 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 314 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 330 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13081,12 +13183,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 315 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 331 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 316 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 332 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13107,7 +13209,7 @@ f64.const 6 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 99 + i32.const 117 call $~lib/typedarray/Float64Array#every local.set $1 local.get $1 @@ -13123,7 +13225,7 @@ unreachable end local.get $0 - i32.const 100 + i32.const 118 call $~lib/typedarray/Float64Array#every local.set $2 local.get $2 @@ -13140,7 +13242,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 317 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 333 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13195,7 +13297,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 318 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#forEach (; 334 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13240,7 +13342,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 319 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 335 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13281,7 +13383,7 @@ i32.shr_s call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 101 + i32.const 119 call $~lib/typedarray/Int8Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -13296,7 +13398,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 320 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 336 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13347,7 +13449,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8Array#forEach (; 321 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 337 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13392,7 +13494,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 322 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 338 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13427,7 +13529,7 @@ i32.and call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 102 + i32.const 120 call $~lib/typedarray/Uint8Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -13442,7 +13544,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 323 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 339 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13493,7 +13595,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8ClampedArray#forEach (; 324 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#forEach (; 340 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13538,7 +13640,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 325 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 341 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13573,7 +13675,7 @@ i32.and call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 103 + i32.const 121 call $~lib/typedarray/Uint8ClampedArray#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -13588,7 +13690,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 326 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 342 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13643,7 +13745,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 327 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#forEach (; 343 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13688,7 +13790,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 328 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 344 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13729,7 +13831,7 @@ i32.shr_s call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 104 + i32.const 122 call $~lib/typedarray/Int16Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -13744,7 +13846,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 329 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 345 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13795,7 +13897,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint16Array#forEach (; 330 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 346 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13840,7 +13942,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 331 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 347 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13875,7 +13977,7 @@ i32.and call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 105 + i32.const 123 call $~lib/typedarray/Uint16Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -13890,7 +13992,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 332 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 348 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13937,7 +14039,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 333 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 349 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13982,7 +14084,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 334 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 350 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14011,7 +14113,7 @@ call $~lib/array/Array#__get call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 106 + i32.const 124 call $~lib/typedarray/Int32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -14026,7 +14128,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 335 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 351 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14073,7 +14175,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint32Array#forEach (; 336 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint32Array#forEach (; 352 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14118,7 +14220,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 337 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 353 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14147,7 +14249,7 @@ call $~lib/array/Array#__get call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 107 + i32.const 125 call $~lib/typedarray/Uint32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -14162,7 +14264,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 338 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 354 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14210,7 +14312,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 339 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 355 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14255,7 +14357,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 340 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 356 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14287,7 +14389,7 @@ i64.extend_i32_s call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 108 + i32.const 126 call $~lib/typedarray/Int64Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -14302,7 +14404,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 341 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 357 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14350,7 +14452,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint64Array#forEach (; 342 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint64Array#forEach (; 358 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14395,7 +14497,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 343 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 359 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14427,7 +14529,7 @@ i64.extend_i32_s call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 109 + i32.const 127 call $~lib/typedarray/Uint64Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -14442,7 +14544,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 344 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 360 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14490,7 +14592,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 345 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#forEach (; 361 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14535,7 +14637,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 346 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 362 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14567,7 +14669,7 @@ f32.convert_i32_s call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 110 + i32.const 128 call $~lib/typedarray/Float32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -14582,7 +14684,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 347 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 363 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14630,7 +14732,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 348 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#forEach (; 364 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14675,7 +14777,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 349 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 365 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14707,7 +14809,7 @@ f64.convert_i32_s call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 111 + i32.const 129 call $~lib/typedarray/Float64Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -14722,7 +14824,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#reverse (; 350 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 366 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14792,7 +14894,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 351 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 367 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14956,7 +15058,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 352 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 368 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15026,7 +15128,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8Array#subarray (; 353 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 369 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15163,7 +15265,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 354 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 370 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15321,7 +15423,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#reverse (; 355 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reverse (; 371 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15391,7 +15493,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 356 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 372 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15528,7 +15630,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 357 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 373 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15686,7 +15788,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 358 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 374 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15756,7 +15858,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int16Array#subarray (; 359 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 375 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15893,7 +15995,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 360 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 376 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16057,7 +16159,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 361 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 377 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16127,7 +16229,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint16Array#subarray (; 362 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 378 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16264,7 +16366,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 363 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 379 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16422,7 +16524,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 364 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 380 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16492,7 +16594,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 365 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 381 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16644,7 +16746,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#reverse (; 366 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reverse (; 382 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16714,7 +16816,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint32Array#subarray (; 367 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 383 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16851,7 +16953,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 368 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 384 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17003,7 +17105,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#reverse (; 369 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 385 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17073,7 +17175,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int64Array#subarray (; 370 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 386 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17210,7 +17312,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 371 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 387 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17365,7 +17467,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#reverse (; 372 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#reverse (; 388 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17435,7 +17537,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint64Array#subarray (; 373 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 389 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17572,7 +17674,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 374 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 390 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17727,7 +17829,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 375 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 391 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17797,7 +17899,7 @@ end local.get $1 ) - (func $~lib/typedarray/Float32Array#subarray (; 376 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 392 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17934,7 +18036,7 @@ i32.store offset=8 local.get $7 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 377 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 393 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18089,7 +18191,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 378 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 394 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -18159,7 +18261,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 379 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 395 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18314,7 +18416,7 @@ unreachable end ) - (func $start:std/typedarray (; 380 ;) (type $FUNCSIG$v) + (func $start:std/typedarray (; 396 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32.const 1 @@ -18849,7 +18951,7 @@ drop global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 + i32.const 16 i32.const 0 i32.const 240 call $~lib/runtime/makeArray @@ -18871,7 +18973,7 @@ drop global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 + i32.const 16 i32.const 0 i32.const 312 call $~lib/runtime/makeArray @@ -18893,7 +18995,7 @@ drop global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 + i32.const 16 i32.const 0 i32.const 336 call $~lib/runtime/makeArray @@ -18915,7 +19017,7 @@ drop global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 + i32.const 16 i32.const 0 i32.const 360 call $~lib/runtime/makeArray @@ -18937,7 +19039,7 @@ drop global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 + i32.const 16 i32.const 0 i32.const 384 call $~lib/runtime/makeArray @@ -19003,7 +19105,7 @@ end global.get $std/typedarray/sub8 i32.const 3 - i32.const 15 + i32.const 16 i32.const 0 i32.const 408 call $~lib/runtime/makeArray @@ -19019,7 +19121,7 @@ end global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 + i32.const 16 i32.const 0 i32.const 432 call $~lib/runtime/makeArray @@ -19065,7 +19167,7 @@ drop global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 + i32.const 18 i32.const 2 i32.const 456 call $~lib/runtime/makeArray @@ -19087,7 +19189,7 @@ drop global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 + i32.const 18 i32.const 2 i32.const 496 call $~lib/runtime/makeArray @@ -19109,7 +19211,7 @@ drop global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 + i32.const 18 i32.const 2 i32.const 536 call $~lib/runtime/makeArray @@ -19131,7 +19233,7 @@ drop global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 + i32.const 18 i32.const 2 i32.const 576 call $~lib/runtime/makeArray @@ -19153,7 +19255,7 @@ drop global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 + i32.const 18 i32.const 2 i32.const 616 call $~lib/runtime/makeArray @@ -19223,7 +19325,7 @@ end global.get $std/typedarray/sub32 i32.const 3 - i32.const 16 + i32.const 18 i32.const 2 i32.const 656 call $~lib/runtime/makeArray @@ -19239,7 +19341,7 @@ end global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 + i32.const 18 i32.const 2 i32.const 688 call $~lib/runtime/makeArray @@ -19548,9 +19650,9 @@ call $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> call $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> ) - (func $start (; 381 ;) (type $FUNCSIG$v) + (func $start (; 397 ;) (type $FUNCSIG$v) call $start:std/typedarray ) - (func $null (; 382 ;) (type $FUNCSIG$v) + (func $null (; 398 ;) (type $FUNCSIG$v) ) ) From c4a57025d21763310e56373c61e6f8151aba5f55 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 31 Mar 2019 15:42:25 +0200 Subject: [PATCH 079/119] add binaryen fiddles for indirect to direct call optimization --- tests/binaryen/constant-indirect-arg.js | 26 +++++++++++++++++++++++++ tests/binaryen/constant-indirect.js | 22 +++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 tests/binaryen/constant-indirect-arg.js create mode 100644 tests/binaryen/constant-indirect.js diff --git a/tests/binaryen/constant-indirect-arg.js b/tests/binaryen/constant-indirect-arg.js new file mode 100644 index 0000000000..080faed8db --- /dev/null +++ b/tests/binaryen/constant-indirect-arg.js @@ -0,0 +1,26 @@ +var binaryen = require("binaryen"); + +var mod = new binaryen.Module(); + +var ftype_v = mod.addFunctionType("v", binaryen.none, []); +var ftype_vi = mod.addFunctionType("vi", binaryen.none, [ binaryen.i32 ]); + +mod.addFunction("callee-2", ftype_v, [], mod.block(null, [ +])); +mod.addFunction("callee-1", ftype_vi, [], mod.block(null, [ + mod.call_indirect(mod.getLocal(0, binaryen.i32), [], "v"), +])); +mod.setFunctionTable(2, 2, [ "callee-1", "callee-2" ]); + +mod.addFunction("caller", ftype_vi, [ binaryen.i32 ], mod.block(null, [ + mod.call_indirect(mod.getLocal(0, binaryen.i32), [ mod.i32.const(1) ], "vi"), +])); +mod.addFunctionExport("caller", "main"); + +binaryen.setOptimizeLevel(4); +binaryen.setShrinkLevel(0); +binaryen.setDebugInfo(false); +mod.optimize(); +if (!mod.validate()) + console.log("-> does not validate"); +console.log(mod.emitText()); diff --git a/tests/binaryen/constant-indirect.js b/tests/binaryen/constant-indirect.js new file mode 100644 index 0000000000..2b017703de --- /dev/null +++ b/tests/binaryen/constant-indirect.js @@ -0,0 +1,22 @@ +var binaryen = require("binaryen"); + +var mod = new binaryen.Module(); + +var ftype = mod.addFunctionType("v", binaryen.none, []); + +mod.addFunction("callee", ftype, [], mod.block(null, [ +])); +mod.setFunctionTable(1, 1, [ "callee" ]); + +mod.addFunction("caller", ftype, [], mod.block(null, [ + mod.call_indirect(mod.i32.const(0), [], "v"), +])); +mod.addFunctionExport("caller", "main"); + +binaryen.setOptimizeLevel(4); +binaryen.setShrinkLevel(0); +binaryen.setDebugInfo(false); +mod.optimize(); +if (!mod.validate()) + console.log("-> does not validate"); +console.log(mod.emitText()); From 27f19055108024329c56d48bfcd772e2f9184fc7 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 31 Mar 2019 21:58:42 +0200 Subject: [PATCH 080/119] runtime integration and flag --- cli/asc.js | 32 + cli/asc.json | 12 + src/compiler.ts | 7 +- std/assembly/allocator/tlsf.ts | 32 +- std/assembly/collector/itcm.ts | 10 + std/assembly/runtime.ts | 4 + std/runtime/README.md | 38 + std/runtime/arena.ts | 1 + std/runtime/default.ts | 2 + std/runtime/none.ts | 0 std/runtime/tsconfig.json | 6 + tests/compiler/abi.json | 5 + tests/compiler/asc-constants.json | 5 + tests/compiler/assert-nonnull.json | 5 + ...mized.wat => assert-nonnull.optimized.wat} | 56 +- ...{nonNullAssertion.ts => assert-nonnull.ts} | 2 - ...uched.wat => assert-nonnull.untouched.wat} | 70 +- tests/compiler/assert.json | 5 + tests/compiler/basic-nullable.json | 5 + tests/compiler/binary.json | 5 + tests/compiler/bool.json | 5 + tests/compiler/builtins.json | 5 + tests/compiler/call-inferred.json | 5 + tests/compiler/call-optional.json | 5 + tests/compiler/call-super.json | 5 + tests/compiler/call-super.optimized.wat | 36 +- tests/compiler/call-super.ts | 2 - tests/compiler/call-super.untouched.wat | 38 +- tests/compiler/class-extends.json | 1 + tests/compiler/class-extends.optimized.wat | 2 + tests/compiler/class-extends.untouched.wat | 2 + tests/compiler/class-overloading.json | 5 + tests/compiler/class.json | 1 + tests/compiler/class.optimized.wat | 17 +- tests/compiler/class.untouched.wat | 33 +- tests/compiler/closure.json | 1 + tests/compiler/closure.optimized.wat | 2 + tests/compiler/closure.untouched.wat | 2 + tests/compiler/comma.json | 5 + tests/compiler/constructor.json | 1 + tests/compiler/constructor.optimized.wat | 1572 +++++++++- tests/compiler/constructor.ts | 2 - tests/compiler/constructor.untouched.wat | 2057 ++++++++++++- tests/compiler/declare.json | 5 + tests/compiler/do.json | 5 + tests/compiler/empty.json | 5 + tests/compiler/enum.json | 5 + tests/compiler/export.json | 5 + tests/compiler/exports.json | 5 + tests/compiler/exports.optimized.wat | 4 +- tests/compiler/exports.untouched.wat | 6 +- tests/compiler/external.json | 5 + tests/compiler/for.json | 5 + tests/compiler/function-expression.json | 5 + tests/compiler/function-types.json | 5 + tests/compiler/function.json | 5 + tests/compiler/gc.json | 5 + tests/compiler/gc.optimized.wat | 24 +- tests/compiler/gc.ts | 1 - tests/compiler/gc.untouched.wat | 28 +- tests/compiler/gc/global-assign.json | 5 + tests/compiler/gc/global-assign.optimized.wat | 18 +- tests/compiler/gc/global-assign.ts | 1 - tests/compiler/gc/global-assign.untouched.wat | 20 +- tests/compiler/gc/global-init.json | 5 + tests/compiler/gc/global-init.optimized.wat | 18 +- tests/compiler/gc/global-init.ts | 1 - tests/compiler/gc/global-init.untouched.wat | 20 +- tests/compiler/gc/itcm/trace.json | 5 + tests/compiler/gc/itcm/trace.optimized.wat | 14 +- tests/compiler/gc/itcm/trace.ts | 2 - tests/compiler/gc/itcm/trace.untouched.wat | 24 +- tests/compiler/gc/rc/global-assign.json | 5 + .../gc/rc/global-assign.optimized.wat | 22 +- tests/compiler/gc/rc/global-assign.ts | 1 - .../gc/rc/global-assign.untouched.wat | 24 +- tests/compiler/gc/rc/global-init.json | 5 + .../compiler/gc/rc/global-init.optimized.wat | 12 +- tests/compiler/gc/rc/global-init.ts | 1 - .../compiler/gc/rc/global-init.untouched.wat | 14 +- tests/compiler/getter-call.json | 5 + tests/compiler/getter-call.optimized.wat | 4 +- tests/compiler/getter-call.untouched.wat | 6 +- tests/compiler/getter-setter.json | 5 + tests/compiler/i64-polyfill.json | 5 + tests/compiler/if.json | 5 + tests/compiler/import.json | 5 + tests/compiler/infer-type.json | 5 + tests/compiler/inlining-blocklocals.json | 5 + tests/compiler/inlining-recursive.json | 5 + tests/compiler/inlining.json | 5 + tests/compiler/inlining.optimized.wat | 4 +- tests/compiler/inlining.untouched.wat | 6 +- tests/compiler/instanceof.json | 5 + tests/compiler/limits.json | 5 + tests/compiler/literals.json | 5 + tests/compiler/logical.json | 5 + tests/compiler/main.json | 5 + tests/compiler/mandelbrot.json | 5 + tests/compiler/many-locals.json | 5 + tests/compiler/memcpy.json | 5 + tests/compiler/memmove.json | 5 + tests/compiler/memset.json | 5 + tests/compiler/merge.json | 5 + tests/compiler/named-export-default.json | 5 + tests/compiler/named-import-default.json | 5 + tests/compiler/namespace.json | 5 + tests/compiler/new-without-allocator.json | 5 + tests/compiler/number.json | 5 + tests/compiler/number.optimized.wat | 30 +- tests/compiler/number.ts | 2 - tests/compiler/number.untouched.wat | 118 +- tests/compiler/optional-typeparameters.json | 5 + .../optional-typeparameters.optimized.wat | 4 +- .../optional-typeparameters.untouched.wat | 6 +- tests/compiler/overflow.json | 5 + tests/compiler/portable-conversions.json | 5 + tests/compiler/recursive.json | 5 + tests/compiler/reexport.json | 5 + tests/compiler/rereexport.json | 5 + tests/compiler/resolve-nested.json | 5 + tests/compiler/retain-i32.json | 5 + tests/compiler/runtime-arena.json | 5 + tests/compiler/runtime-arena.optimized.wat | 11 + tests/compiler/runtime-arena.ts | 0 tests/compiler/runtime-arena.untouched.wat | 11 + tests/compiler/runtime-default.json | 5 + tests/compiler/runtime-default.optimized.wat | 13 + tests/compiler/runtime-default.ts | 0 tests/compiler/runtime-default.untouched.wat | 13 + tests/compiler/runtime-none.json | 5 + tests/compiler/runtime-none.optimized.wat | 11 + tests/compiler/runtime-none.ts | 0 tests/compiler/runtime-none.untouched.wat | 11 + tests/compiler/scoped.json | 5 + tests/compiler/simd.json | 3 + tests/compiler/static-this.json | 5 + tests/compiler/std/allocator_arena.json | 5 + tests/compiler/std/array-access.json | 5 + tests/compiler/std/array-access.untouched.wat | 1 - tests/compiler/std/array-literal.json | 5 + .../compiler/std/array-literal.optimized.wat | 44 +- tests/compiler/std/array-literal.ts | 1 - .../compiler/std/array-literal.untouched.wat | 48 +- tests/compiler/std/array.json | 5 + tests/compiler/std/array.optimized.wat | 498 ++-- tests/compiler/std/array.ts | 1 - tests/compiler/std/array.untouched.wat | 512 ++-- tests/compiler/std/arraybuffer.json | 5 + tests/compiler/std/arraybuffer.optimized.wat | 34 +- tests/compiler/std/arraybuffer.ts | 2 - tests/compiler/std/arraybuffer.untouched.wat | 48 +- tests/compiler/std/dataview.json | 5 + tests/compiler/std/dataview.optimized.wat | 200 +- tests/compiler/std/dataview.ts | 2 - tests/compiler/std/dataview.untouched.wat | 204 +- tests/compiler/std/date.json | 5 + tests/compiler/std/date.optimized.wat | 16 +- tests/compiler/std/date.ts | 2 - tests/compiler/std/date.untouched.wat | 18 +- tests/compiler/std/gc-array.optimized.wat | 1904 ------------ tests/compiler/std/gc-array.untouched.wat | 2540 ----------------- tests/compiler/std/gc-basics.optimized.wat | 481 ---- tests/compiler/std/gc-object.optimized.wat | 437 --- tests/compiler/std/hash.json | 5 + tests/compiler/std/hash.untouched.wat | 1 - tests/compiler/std/libm.json | 5 + tests/compiler/std/map.json | 5 + tests/compiler/std/map.optimized.wat | 364 +-- tests/compiler/std/map.ts | 1 - tests/compiler/std/map.untouched.wat | 366 +-- tests/compiler/std/math.json | 5 + tests/compiler/std/math.untouched.wat | 2 - tests/compiler/std/mod.json | 5 + tests/compiler/std/new.json | 5 + tests/compiler/std/new.optimized.wat | 4 +- tests/compiler/std/new.ts | 2 - tests/compiler/std/new.untouched.wat | 6 +- tests/compiler/std/object-literal.json | 5 + .../{ => std}/object-literal.optimized.wat | 93 +- tests/compiler/{ => std}/object-literal.ts | 2 +- .../{ => std}/object-literal.untouched.wat | 108 +- tests/compiler/std/operator-overloading.json | 5 + .../std/operator-overloading.optimized.wat | 70 +- tests/compiler/std/operator-overloading.ts | 2 - .../std/operator-overloading.untouched.wat | 72 +- tests/compiler/std/pointer.json | 5 + tests/compiler/std/polyfills.json | 5 + tests/compiler/std/runtime.json | 5 + tests/compiler/std/runtime.optimized.wat | 232 +- tests/compiler/std/runtime.untouched.wat | 361 ++- tests/compiler/std/set.json | 5 + tests/compiler/std/set.optimized.wat | 284 +- tests/compiler/std/set.ts | 1 - tests/compiler/std/set.untouched.wat | 286 +- tests/compiler/std/simd.json | 5 + tests/compiler/std/static-array.json | 5 + tests/compiler/std/static-array.optimized.wat | 34 +- tests/compiler/std/static-array.ts | 2 - tests/compiler/std/static-array.untouched.wat | 36 +- tests/compiler/std/string-utf8.json | 5 + tests/compiler/std/string-utf8.optimized.wat | 40 +- tests/compiler/std/string-utf8.ts | 2 - tests/compiler/std/string-utf8.untouched.wat | 42 +- tests/compiler/std/string.json | 5 + tests/compiler/std/string.optimized.wat | 448 +-- tests/compiler/std/string.ts | 1 - tests/compiler/std/string.untouched.wat | 452 +-- tests/compiler/std/symbol.json | 5 + tests/compiler/std/symbol.optimized.wat | 24 +- tests/compiler/std/symbol.ts | 2 - tests/compiler/std/symbol.untouched.wat | 28 +- tests/compiler/std/trace.json | 5 + tests/compiler/std/typedarray.json | 5 + tests/compiler/std/typedarray.optimized.wat | 582 ++-- tests/compiler/std/typedarray.ts | 1 - tests/compiler/std/typedarray.untouched.wat | 636 ++--- tests/compiler/switch.json | 5 + tests/compiler/ternary.json | 5 + tests/compiler/threads.json | 1 + tests/compiler/typealias.json | 5 + tests/compiler/unary.json | 5 + tests/compiler/void.json | 5 + tests/compiler/while.json | 5 + tests/compiler/wildcard-export.json | 5 + 225 files changed, 7640 insertions(+), 8995 deletions(-) create mode 100644 std/runtime/README.md create mode 100644 std/runtime/arena.ts create mode 100644 std/runtime/default.ts create mode 100644 std/runtime/none.ts create mode 100644 std/runtime/tsconfig.json create mode 100644 tests/compiler/abi.json create mode 100644 tests/compiler/asc-constants.json create mode 100644 tests/compiler/assert-nonnull.json rename tests/compiler/{nonNullAssertion.optimized.wat => assert-nonnull.optimized.wat} (56%) rename tests/compiler/{nonNullAssertion.ts => assert-nonnull.ts} (97%) rename tests/compiler/{nonNullAssertion.untouched.wat => assert-nonnull.untouched.wat} (58%) create mode 100644 tests/compiler/assert.json create mode 100644 tests/compiler/basic-nullable.json create mode 100644 tests/compiler/binary.json create mode 100644 tests/compiler/bool.json create mode 100644 tests/compiler/builtins.json create mode 100644 tests/compiler/call-inferred.json create mode 100644 tests/compiler/call-optional.json create mode 100644 tests/compiler/call-super.json create mode 100644 tests/compiler/class-extends.json create mode 100644 tests/compiler/class-overloading.json create mode 100644 tests/compiler/class.json create mode 100644 tests/compiler/closure.json create mode 100644 tests/compiler/comma.json create mode 100644 tests/compiler/constructor.json create mode 100644 tests/compiler/declare.json create mode 100644 tests/compiler/do.json create mode 100644 tests/compiler/empty.json create mode 100644 tests/compiler/enum.json create mode 100644 tests/compiler/export.json create mode 100644 tests/compiler/exports.json create mode 100644 tests/compiler/external.json create mode 100644 tests/compiler/for.json create mode 100644 tests/compiler/function-expression.json create mode 100644 tests/compiler/function-types.json create mode 100644 tests/compiler/function.json create mode 100644 tests/compiler/gc.json create mode 100644 tests/compiler/gc/global-assign.json create mode 100644 tests/compiler/gc/global-init.json create mode 100644 tests/compiler/gc/itcm/trace.json create mode 100644 tests/compiler/gc/rc/global-assign.json create mode 100644 tests/compiler/gc/rc/global-init.json create mode 100644 tests/compiler/getter-call.json create mode 100644 tests/compiler/getter-setter.json create mode 100644 tests/compiler/i64-polyfill.json create mode 100644 tests/compiler/if.json create mode 100644 tests/compiler/import.json create mode 100644 tests/compiler/infer-type.json create mode 100644 tests/compiler/inlining-blocklocals.json create mode 100644 tests/compiler/inlining-recursive.json create mode 100644 tests/compiler/inlining.json create mode 100644 tests/compiler/instanceof.json create mode 100644 tests/compiler/limits.json create mode 100644 tests/compiler/literals.json create mode 100644 tests/compiler/logical.json create mode 100644 tests/compiler/main.json create mode 100644 tests/compiler/mandelbrot.json create mode 100644 tests/compiler/many-locals.json create mode 100644 tests/compiler/memcpy.json create mode 100644 tests/compiler/memmove.json create mode 100644 tests/compiler/memset.json create mode 100644 tests/compiler/merge.json create mode 100644 tests/compiler/named-export-default.json create mode 100644 tests/compiler/named-import-default.json create mode 100644 tests/compiler/namespace.json create mode 100644 tests/compiler/new-without-allocator.json create mode 100644 tests/compiler/number.json create mode 100644 tests/compiler/optional-typeparameters.json create mode 100644 tests/compiler/overflow.json create mode 100644 tests/compiler/portable-conversions.json create mode 100644 tests/compiler/recursive.json create mode 100644 tests/compiler/reexport.json create mode 100644 tests/compiler/rereexport.json create mode 100644 tests/compiler/resolve-nested.json create mode 100644 tests/compiler/retain-i32.json create mode 100644 tests/compiler/runtime-arena.json create mode 100644 tests/compiler/runtime-arena.optimized.wat create mode 100644 tests/compiler/runtime-arena.ts create mode 100644 tests/compiler/runtime-arena.untouched.wat create mode 100644 tests/compiler/runtime-default.json create mode 100644 tests/compiler/runtime-default.optimized.wat create mode 100644 tests/compiler/runtime-default.ts create mode 100644 tests/compiler/runtime-default.untouched.wat create mode 100644 tests/compiler/runtime-none.json create mode 100644 tests/compiler/runtime-none.optimized.wat create mode 100644 tests/compiler/runtime-none.ts create mode 100644 tests/compiler/runtime-none.untouched.wat create mode 100644 tests/compiler/scoped.json create mode 100644 tests/compiler/static-this.json create mode 100644 tests/compiler/std/allocator_arena.json create mode 100644 tests/compiler/std/array-access.json create mode 100644 tests/compiler/std/array-literal.json create mode 100644 tests/compiler/std/array.json create mode 100644 tests/compiler/std/arraybuffer.json create mode 100644 tests/compiler/std/dataview.json create mode 100644 tests/compiler/std/date.json delete mode 100644 tests/compiler/std/gc-array.optimized.wat delete mode 100644 tests/compiler/std/gc-array.untouched.wat delete mode 100644 tests/compiler/std/gc-basics.optimized.wat delete mode 100644 tests/compiler/std/gc-object.optimized.wat create mode 100644 tests/compiler/std/hash.json create mode 100644 tests/compiler/std/libm.json create mode 100644 tests/compiler/std/map.json create mode 100644 tests/compiler/std/math.json create mode 100644 tests/compiler/std/mod.json create mode 100644 tests/compiler/std/new.json create mode 100644 tests/compiler/std/object-literal.json rename tests/compiler/{ => std}/object-literal.optimized.wat (69%) rename tests/compiler/{ => std}/object-literal.ts (93%) rename tests/compiler/{ => std}/object-literal.untouched.wat (67%) create mode 100644 tests/compiler/std/operator-overloading.json create mode 100644 tests/compiler/std/pointer.json create mode 100644 tests/compiler/std/polyfills.json create mode 100644 tests/compiler/std/runtime.json create mode 100644 tests/compiler/std/set.json create mode 100644 tests/compiler/std/simd.json create mode 100644 tests/compiler/std/static-array.json create mode 100644 tests/compiler/std/string-utf8.json create mode 100644 tests/compiler/std/string.json create mode 100644 tests/compiler/std/symbol.json create mode 100644 tests/compiler/std/trace.json create mode 100644 tests/compiler/std/typedarray.json create mode 100644 tests/compiler/switch.json create mode 100644 tests/compiler/ternary.json create mode 100644 tests/compiler/typealias.json create mode 100644 tests/compiler/unary.json create mode 100644 tests/compiler/void.json create mode 100644 tests/compiler/while.json create mode 100644 tests/compiler/wildcard-export.json diff --git a/cli/asc.js b/cli/asc.js index 0c745a39a2..eda2e339a9 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -82,6 +82,15 @@ exports.libraryFiles = exports.isBundle ? BUNDLE_LIBRARY : (() => { // set up if return bundled; })(); +/** Bundled runtime templates. */ +exports.runtimeTemplates = exports.isBundle ? BUNDLE_RUNTIME : (() => { + const rtDir = path.join(__dirname, "..", "std", "runtime"); + const rtFiles = require("glob").sync("**/!(*.d).ts", { cwd: rtDir }); + const bundled = {}; + rtFiles.forEach(file => bundled[file.replace(/\.ts$/, "")] = fs.readFileSync(path.join(rtDir, file), "utf8" )); + return bundled; +})(); + /** Bundled definition files. */ exports.definitionFiles = exports.isBundle ? BUNDLE_DEFINITIONS : (() => { // set up if not a bundle const stdDir = path.join(__dirname, "..", "std"); @@ -387,11 +396,34 @@ exports.main = function main(argv, options, callback) { stats.parseTime += measure(() => { parser = assemblyscript.parseFile(sourceText, sourcePath, true, parser); }); + } + + // Include runtime template + { + let templateName = String(args.runtime); + let templateText = exports.runtimeTemplates[templateName]; + if (templateText == null) { + templateText = readFile(templateName + ".ts", baseDir); + if (templateText == null) { + return callback(Error("Runtime template '" + templateName + " not found.")); + } + } + stats.parseCount++; + stats.parseTime += measure(() => { + parser = assemblyscript.parseFile(templateText, templateName, true, parser); + }); + } + + // Parse entry files + { let code = parseBacklog(); if (code) return code; } + // Call afterParse transform hook applyTransform("afterParse", parser); + + // Parse additional files, if any { let code = parseBacklog(); if (code) return code; diff --git a/cli/asc.json b/cli/asc.json index 523d2416f9..f5adcac22b 100644 --- a/cli/asc.json +++ b/cli/asc.json @@ -81,6 +81,18 @@ ], "type": "s" }, + "runtime": { + "description": [ + "Specifies the runtime template to include in the program.", + "", + " default TLSF memory allocator and ITCM garbage collector.", + " arena Just the arena memory allocator. No free/GC.", + " none No allocator/GC or compose your own.", + "" + ], + "type": "s", + "default": "default" + }, "debug": { "description": "Enables debug information in emitted binaries.", "type": "b", diff --git a/src/compiler.ts b/src/compiler.ts index 4374121a74..41d643a319 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -8374,9 +8374,9 @@ export class Compiler extends DiagnosticEmitter { var module = this.module; var options = this.options; + var usizeType = options.usizeType; var nativeSizeType = options.nativeSizeType; var nativeSizeSize = options.usizeType.byteSize; - // var signatureStr = Signature.makeSignatureString([ Type.u32 ], Type.void, options.usizeType); var body = new Array(); // nothing to mark if 'this' is null (should not happen) @@ -8398,6 +8398,9 @@ export class Compiler extends DiagnosticEmitter { assert(functionIndex < functionTable.length); assert(functionTable[functionIndex] == functionName); + var fnSig = Signature.makeSignatureString([ usizeType ], Type.void); + this.ensureFunctionType([ usizeType ], Type.void); + // if the class extends a base class, call its hook first var baseInstance = classInstance.base; if (baseInstance) { @@ -8441,7 +8444,7 @@ export class Compiler extends DiagnosticEmitter { module.createGetLocal(1, NativeType.I32), [ module.createGetLocal(2, nativeSizeType) - ], "FUNCSIG$vi" + ], fnSig ), module.createCall(functionTable[fieldClassId], [ module.createGetLocal(2, nativeSizeType), diff --git a/std/assembly/allocator/tlsf.ts b/std/assembly/allocator/tlsf.ts index 8d7b0f2b79..dd08a7361b 100644 --- a/std/assembly/allocator/tlsf.ts +++ b/std/assembly/allocator/tlsf.ts @@ -14,12 +14,24 @@ import { AL_BITS, AL_SIZE, AL_MASK } from "../util/allocator"; import { HEAP_BASE, memory } from "../memory"; +// @ts-ignore: decorator +@lazy const SL_BITS: u32 = 5; + +// @ts-ignore: decorator +@lazy const SL_SIZE: usize = 1 << SL_BITS; +// @ts-ignore: decorator +@lazy const SB_BITS: usize = (SL_BITS + AL_BITS); + +// @ts-ignore: decorator +@lazy const SB_SIZE: usize = 1 << SB_BITS; +// @ts-ignore: decorator +@lazy const FL_BITS: u32 = (sizeof() == sizeof() ? 30 // ^= up to 1GB per block : 32 // ^= up to 4GB per block @@ -42,10 +54,18 @@ const FL_BITS: u32 = (sizeof() == sizeof() // F: FREE, L: LEFT_FREE /** Tag indicating that this block is free. */ +// @ts-ignore: decorator +@lazy const FREE: usize = 1 << 0; + /** Tag indicating that this block's left block is free. */ +// @ts-ignore: decorator +@lazy const LEFT_FREE: usize = 1 << 1; + /** Mask to obtain all tags. */ +// @ts-ignore: decorator +@lazy const TAGS: usize = FREE | LEFT_FREE; /** Block structure. */ @@ -55,6 +75,7 @@ const TAGS: usize = FREE | LEFT_FREE; info: usize; /** End offset of the {@link Block#info} field. User data starts here. */ + @lazy static readonly INFO: usize = (sizeof() + AL_MASK) & ~AL_MASK; /** Previous free block, if any. Only valid if free. */ @@ -63,9 +84,11 @@ const TAGS: usize = FREE | LEFT_FREE; next: Block | null; /** Minimum size of a block, excluding {@link Block#info}. */ + @lazy static readonly MIN_SIZE: usize = (3 * sizeof() + AL_MASK) & ~AL_MASK;// prev + next + jump /** Maximum size of a used block, excluding {@link Block#info}. */ + @lazy static readonly MAX_SIZE: usize = 1 << (FL_BITS + SB_BITS); /** Gets this block's left (free) block in memory. */ @@ -111,7 +134,7 @@ const TAGS: usize = FREE | LEFT_FREE; // └───────────────────────────────────────────────────────────────┘ SIZE ┘ // S: Small blocks map, P: Possibly padded if 64-bit -assert((1 << SL_BITS) <= 32); // second level must fit into 32 bits +// assert((1 << SL_BITS) <= 32); // second level must fit into 32 bits /** Root structure. */ @unmanaged class Root { @@ -120,6 +143,7 @@ assert((1 << SL_BITS) <= 32); // second level must fit into 32 bits flMap: usize = 0; /** Start offset of second level maps. */ + @lazy private static readonly SL_START: usize = sizeof(); // Using *one* SL map per *FL bit* @@ -137,11 +161,13 @@ assert((1 << SL_BITS) <= 32); // second level must fit into 32 bits } /** End offset of second level maps. */ + @lazy private static readonly SL_END: usize = Root.SL_START + FL_BITS * 4; // Using *number bits per SL* heads per *FL bit* /** Start offset of FL/SL heads. */ + @lazy private static readonly HL_START: usize = (Root.SL_END + AL_MASK) & ~AL_MASK; /** Gets the head of the specified first and second level index. */ @@ -164,6 +190,7 @@ assert((1 << SL_BITS) <= 32); // second level must fit into 32 bits } /** End offset of FL/SL heads. */ + @lazy private static readonly HL_END: usize = ( Root.HL_START + FL_BITS * SL_SIZE * sizeof() ); @@ -172,6 +199,7 @@ assert((1 << SL_BITS) <= 32); // second level must fit into 32 bits set tailRef(value: usize) { store(0, value, Root.HL_END); } /** Total size of the {@link Root} structure. */ + @lazy static readonly SIZE: usize = Root.HL_END + sizeof(); /** Inserts a previously used block back into the free list. */ @@ -424,6 +452,8 @@ function fls(word: T): T { } /** Reference to the initialized {@link Root} structure, once initialized. */ +// @ts-ignore: decorator +@lazy var ROOT: Root = changetype(0); /** Allocates a chunk of memory. */ diff --git a/std/assembly/collector/itcm.ts b/std/assembly/collector/itcm.ts index 0b6bcf38d1..5669e32a14 100644 --- a/std/assembly/collector/itcm.ts +++ b/std/assembly/collector/itcm.ts @@ -19,13 +19,23 @@ const enum State { } /** Current collector state. */ +// @ts-ignore: decorator +@lazy var state = State.INIT; /** Current white color value. */ +// @ts-ignore: decorator +@lazy var white = 0; // From and to spaces +// @ts-ignore: decorator +@lazy var fromSpace: ManagedObjectList; +// @ts-ignore: decorator +@lazy var toSpace: ManagedObjectList; +// @ts-ignore: decorator +@lazy var iter: ManagedObject; // ╒═══════════════ Managed object layout (32-bit) ════════════════╕ diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 722016fa09..152aab2be1 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -27,11 +27,15 @@ import { Array } from "./array"; } /** Common runtime header size. */ +// @ts-ignore: decorator +@lazy export const HEADER_SIZE: usize = isDefined(__ref_collect) ? (offsetof
( ) + AL_MASK) & ~AL_MASK // full header if GC is present : (offsetof
("reserved1") + AL_MASK) & ~AL_MASK; // half header if GC is absent /** Common runtime header magic. Used to assert registered/unregistered status. */ +// @ts-ignore: decorator +@lazy export const HEADER_MAGIC: u32 = 0xA55E4B17; /** Gets the computed unique class id of a class type. */ diff --git a/std/runtime/README.md b/std/runtime/README.md new file mode 100644 index 0000000000..97a02d1e2c --- /dev/null +++ b/std/runtime/README.md @@ -0,0 +1,38 @@ +AssemblyScript runtimes +======================= + +Default +------- + +``` +$> asc ... +``` + +The [default runtime](./default.ts) adds proper support for dynamic memory management and garbage collection to your program. + +* [TLSF memory allocator](../assembly/allocator/tlsf.ts) +* [ITCM garbage collector](../assembly/collector/itcm.ts) + +Arena +----- + +``` +$> asc ... --runtime arena +``` + +The [arena runtime](./arena.ts) is just enough to make most language features work, but doesn't have sophisticated support for freeing memory. Useful when prototyping or for simple one-shot modules in that it produces very small modules with minimal overhead. + +* [Arena memory allocator](../assembly/allocator/arena.ts) with `memory.reset()` +* No garbage collector + +None +----------------- + +``` +$> asc ... --runtime none +``` + +[No runtime](./none.ts) features at all. Useful for building low-level modules that do not require language features like managed classes, or if you'd like to compose your own runtime by including a custom memory allocator and garbage collector. + +* No memory allocator +* No garbage collector diff --git a/std/runtime/arena.ts b/std/runtime/arena.ts new file mode 100644 index 0000000000..9a31c7a41c --- /dev/null +++ b/std/runtime/arena.ts @@ -0,0 +1 @@ +import "allocator/arena"; diff --git a/std/runtime/default.ts b/std/runtime/default.ts new file mode 100644 index 0000000000..22cbcdaf0c --- /dev/null +++ b/std/runtime/default.ts @@ -0,0 +1,2 @@ +import "allocator/tlsf"; +import "collector/itcm"; diff --git a/std/runtime/none.ts b/std/runtime/none.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/std/runtime/tsconfig.json b/std/runtime/tsconfig.json new file mode 100644 index 0000000000..e48ae5867b --- /dev/null +++ b/std/runtime/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../assembly.json", + "include": [ + "./**/*.ts" + ] +} diff --git a/tests/compiler/abi.json b/tests/compiler/abi.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/abi.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/asc-constants.json b/tests/compiler/asc-constants.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/asc-constants.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/assert-nonnull.json b/tests/compiler/assert-nonnull.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/assert-nonnull.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/nonNullAssertion.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat similarity index 56% rename from tests/compiler/nonNullAssertion.optimized.wat rename to tests/compiler/assert-nonnull.optimized.wat index d2027bcc91..8f3e285164 100644 --- a/tests/compiler/nonNullAssertion.optimized.wat +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -11,19 +11,19 @@ (global $~lib/argc (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "testVar" (func $nonNullAssertion/testVar)) - (export "testObj" (func $nonNullAssertion/testObj)) - (export "testProp" (func $nonNullAssertion/testProp)) - (export "testArr" (func $nonNullAssertion/testArr)) - (export "testElem" (func $nonNullAssertion/testElem)) - (export "testAll" (func $nonNullAssertion/testAll)) - (export "testAll2" (func $nonNullAssertion/testAll)) - (export "testFn" (func $nonNullAssertion/testFn)) - (export "testFn2" (func $nonNullAssertion/testFn2)) - (export "testRet" (func $nonNullAssertion/testRet)) - (export "testObjFn" (func $nonNullAssertion/testObjFn)) - (export "testObjRet" (func $nonNullAssertion/testObjRet)) - (func $nonNullAssertion/testVar (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (export "testVar" (func $assert-nonnull/testVar)) + (export "testObj" (func $assert-nonnull/testObj)) + (export "testProp" (func $assert-nonnull/testProp)) + (export "testArr" (func $assert-nonnull/testArr)) + (export "testElem" (func $assert-nonnull/testElem)) + (export "testAll" (func $assert-nonnull/testAll)) + (export "testAll2" (func $assert-nonnull/testAll)) + (export "testFn" (func $assert-nonnull/testFn)) + (export "testFn2" (func $assert-nonnull/testFn2)) + (export "testRet" (func $assert-nonnull/testRet)) + (export "testObjFn" (func $assert-nonnull/testObjFn)) + (export "testObjRet" (func $assert-nonnull/testObjRet)) + (func $assert-nonnull/testVar (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -31,7 +31,7 @@ end local.get $0 ) - (func $nonNullAssertion/testObj (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testObj (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -40,7 +40,7 @@ local.get $0 i32.load ) - (func $nonNullAssertion/testProp (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testProp (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load local.tee $0 @@ -50,7 +50,7 @@ end local.get $0 ) - (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load offset=12 @@ -81,16 +81,16 @@ i32.load offset=4 i32.load ) - (func $nonNullAssertion/testArr (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testArr (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if unreachable end local.get $0 - call $~lib/array/Array#__get + call $~lib/array/Array#__get ) - (func $~lib/array/Array#__get (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#__get (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load offset=8 @@ -109,9 +109,9 @@ i32.load offset=4 i32.load ) - (func $nonNullAssertion/testElem (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testElem (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/array/Array#__get + call $~lib/array/Array#__get local.tee $0 i32.eqz if @@ -119,14 +119,14 @@ end local.get $0 ) - (func $nonNullAssertion/testAll (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testAll (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if unreachable end local.get $0 - call $~lib/array/Array#__get + call $~lib/array/Array#__get local.tee $0 i32.eqz if @@ -141,13 +141,13 @@ end local.get $0 ) - (func $nonNullAssertion/testFn (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testFn (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testFn2 (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testFn2 (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -158,7 +158,7 @@ local.get $0 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testRet (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testRet (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 @@ -170,14 +170,14 @@ end local.get $0 ) - (func $nonNullAssertion/testObjFn (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testObjFn (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 i32.load offset=4 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testObjRet (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testObjRet (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 diff --git a/tests/compiler/nonNullAssertion.ts b/tests/compiler/assert-nonnull.ts similarity index 97% rename from tests/compiler/nonNullAssertion.ts rename to tests/compiler/assert-nonnull.ts index 6e4eed6dfb..b50dcb9a9b 100644 --- a/tests/compiler/nonNullAssertion.ts +++ b/tests/compiler/assert-nonnull.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - export function testVar(n: Error | null): Error { return n!; } diff --git a/tests/compiler/nonNullAssertion.untouched.wat b/tests/compiler/assert-nonnull.untouched.wat similarity index 58% rename from tests/compiler/nonNullAssertion.untouched.wat rename to tests/compiler/assert-nonnull.untouched.wat index 6dba00a1aa..e855d4fcce 100644 --- a/tests/compiler/nonNullAssertion.untouched.wat +++ b/tests/compiler/assert-nonnull.untouched.wat @@ -9,25 +9,23 @@ (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) (elem (i32.const 0) $null) - (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/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "testVar" (func $nonNullAssertion/testVar)) - (export "testObj" (func $nonNullAssertion/testObj)) - (export "testProp" (func $nonNullAssertion/testProp)) - (export "testArr" (func $nonNullAssertion/testArr)) - (export "testElem" (func $nonNullAssertion/testElem)) - (export "testAll" (func $nonNullAssertion/testAll)) - (export "testAll2" (func $nonNullAssertion/testAll2)) - (export "testFn" (func $nonNullAssertion/testFn)) - (export "testFn2" (func $nonNullAssertion/testFn2)) - (export "testRet" (func $nonNullAssertion/testRet)) - (export "testObjFn" (func $nonNullAssertion/testObjFn)) - (export "testObjRet" (func $nonNullAssertion/testObjRet)) - (func $nonNullAssertion/testVar (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (export "testVar" (func $assert-nonnull/testVar)) + (export "testObj" (func $assert-nonnull/testObj)) + (export "testProp" (func $assert-nonnull/testProp)) + (export "testArr" (func $assert-nonnull/testArr)) + (export "testElem" (func $assert-nonnull/testElem)) + (export "testAll" (func $assert-nonnull/testAll)) + (export "testAll2" (func $assert-nonnull/testAll2)) + (export "testFn" (func $assert-nonnull/testFn)) + (export "testFn2" (func $assert-nonnull/testFn2)) + (export "testRet" (func $assert-nonnull/testRet)) + (export "testObjFn" (func $assert-nonnull/testObjFn)) + (export "testObjRet" (func $assert-nonnull/testObjRet)) + (func $assert-nonnull/testVar (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 local.tee $1 @@ -37,7 +35,7 @@ unreachable end ) - (func $nonNullAssertion/testObj (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testObj (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 local.tee $1 @@ -48,7 +46,7 @@ end i32.load ) - (func $nonNullAssertion/testProp (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testProp (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -59,7 +57,7 @@ unreachable end ) - (func $~lib/array/Array#__unchecked_get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -68,7 +66,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -97,9 +95,9 @@ end local.get $0 local.get $1 - call $~lib/array/Array#__unchecked_get + call $~lib/array/Array#__unchecked_get ) - (func $nonNullAssertion/testArr (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testArr (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 local.tee $1 @@ -109,9 +107,9 @@ unreachable end i32.const 0 - call $~lib/array/Array#__get + call $~lib/array/Array#__get ) - (func $~lib/array/Array#__unchecked_get (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -120,7 +118,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -137,13 +135,13 @@ end local.get $0 local.get $1 - call $~lib/array/Array#__unchecked_get + call $~lib/array/Array#__unchecked_get ) - (func $nonNullAssertion/testElem (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testElem (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 0 - call $~lib/array/Array#__get + call $~lib/array/Array#__get local.tee $1 if (result i32) local.get $1 @@ -151,7 +149,7 @@ unreachable end ) - (func $nonNullAssertion/testAll (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testAll (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 local.tee $1 @@ -161,7 +159,7 @@ unreachable end i32.const 0 - call $~lib/array/Array#__get + call $~lib/array/Array#__get local.tee $1 if (result i32) local.get $1 @@ -176,7 +174,7 @@ unreachable end ) - (func $nonNullAssertion/testAll2 (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testAll2 (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 local.tee $1 @@ -186,7 +184,7 @@ unreachable end i32.const 0 - call $~lib/array/Array#__get + call $~lib/array/Array#__get local.tee $1 if (result i32) local.get $1 @@ -201,13 +199,13 @@ unreachable end ) - (func $nonNullAssertion/testFn (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testFn (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testFn2 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testFn2 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -223,7 +221,7 @@ local.get $2 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testRet (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testRet (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) i32.const 0 @@ -238,14 +236,14 @@ unreachable end ) - (func $nonNullAssertion/testObjFn (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testObjFn (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 i32.load offset=4 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testObjRet (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testObjRet (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) i32.const 0 diff --git a/tests/compiler/assert.json b/tests/compiler/assert.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/assert.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/basic-nullable.json b/tests/compiler/basic-nullable.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/basic-nullable.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/binary.json b/tests/compiler/binary.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/binary.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/bool.json b/tests/compiler/bool.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/bool.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/builtins.json b/tests/compiler/builtins.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/builtins.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/call-inferred.json b/tests/compiler/call-inferred.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/call-inferred.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/call-optional.json b/tests/compiler/call-optional.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/call-optional.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/call-super.json b/tests/compiler/call-super.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/call-super.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index eeb5d1ad37..43fea1ad1d 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -106,7 +106,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -121,7 +121,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -151,7 +151,7 @@ if i32.const 0 i32.const 56 - i32.const 8 + i32.const 6 i32.const 4 call $~lib/env/abort unreachable @@ -175,7 +175,7 @@ if i32.const 0 i32.const 56 - i32.const 17 + i32.const 15 i32.const 4 call $~lib/env/abort unreachable @@ -187,7 +187,7 @@ if i32.const 0 i32.const 56 - i32.const 18 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -204,7 +204,7 @@ if i32.const 0 i32.const 56 - i32.const 24 + i32.const 22 i32.const 2 call $~lib/env/abort unreachable @@ -216,7 +216,7 @@ if i32.const 0 i32.const 56 - i32.const 25 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -250,7 +250,7 @@ if i32.const 0 i32.const 56 - i32.const 40 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -262,7 +262,7 @@ if i32.const 0 i32.const 56 - i32.const 41 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -279,7 +279,7 @@ if i32.const 0 i32.const 56 - i32.const 47 + i32.const 45 i32.const 2 call $~lib/env/abort unreachable @@ -291,7 +291,7 @@ if i32.const 0 i32.const 56 - i32.const 48 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -317,7 +317,7 @@ if i32.const 0 i32.const 56 - i32.const 58 + i32.const 56 i32.const 4 call $~lib/env/abort unreachable @@ -341,7 +341,7 @@ if i32.const 0 i32.const 56 - i32.const 68 + i32.const 66 i32.const 2 call $~lib/env/abort unreachable @@ -353,7 +353,7 @@ if i32.const 0 i32.const 56 - i32.const 69 + i32.const 67 i32.const 2 call $~lib/env/abort unreachable @@ -394,7 +394,7 @@ if i32.const 0 i32.const 56 - i32.const 86 + i32.const 84 i32.const 2 call $~lib/env/abort unreachable @@ -406,7 +406,7 @@ if i32.const 0 i32.const 56 - i32.const 87 + i32.const 85 i32.const 2 call $~lib/env/abort unreachable @@ -447,7 +447,7 @@ if i32.const 0 i32.const 56 - i32.const 106 + i32.const 104 i32.const 2 call $~lib/env/abort unreachable @@ -459,7 +459,7 @@ if i32.const 0 i32.const 56 - i32.const 107 + i32.const 105 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/call-super.ts b/tests/compiler/call-super.ts index 4145cbceab..aaa5a107dc 100644 --- a/tests/compiler/call-super.ts +++ b/tests/compiler/call-super.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - // both constructors present class A { diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index 444e842510..b5175c2dd5 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -10,9 +10,9 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 84)) (export "memory" (memory $0)) @@ -139,7 +139,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -156,7 +156,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -189,7 +189,7 @@ if i32.const 0 i32.const 56 - i32.const 8 + i32.const 6 i32.const 4 call $~lib/env/abort unreachable @@ -219,7 +219,7 @@ if i32.const 0 i32.const 56 - i32.const 17 + i32.const 15 i32.const 4 call $~lib/env/abort unreachable @@ -232,7 +232,7 @@ if i32.const 0 i32.const 56 - i32.const 18 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -252,7 +252,7 @@ if i32.const 0 i32.const 56 - i32.const 24 + i32.const 22 i32.const 2 call $~lib/env/abort unreachable @@ -265,7 +265,7 @@ if i32.const 0 i32.const 56 - i32.const 25 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -309,7 +309,7 @@ if i32.const 0 i32.const 56 - i32.const 40 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -322,7 +322,7 @@ if i32.const 0 i32.const 56 - i32.const 41 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -342,7 +342,7 @@ if i32.const 0 i32.const 56 - i32.const 47 + i32.const 45 i32.const 2 call $~lib/env/abort unreachable @@ -355,7 +355,7 @@ if i32.const 0 i32.const 56 - i32.const 48 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -384,7 +384,7 @@ if i32.const 0 i32.const 56 - i32.const 58 + i32.const 56 i32.const 4 call $~lib/env/abort unreachable @@ -422,7 +422,7 @@ if i32.const 0 i32.const 56 - i32.const 68 + i32.const 66 i32.const 2 call $~lib/env/abort unreachable @@ -435,7 +435,7 @@ if i32.const 0 i32.const 56 - i32.const 69 + i32.const 67 i32.const 2 call $~lib/env/abort unreachable @@ -487,7 +487,7 @@ if i32.const 0 i32.const 56 - i32.const 86 + i32.const 84 i32.const 2 call $~lib/env/abort unreachable @@ -500,7 +500,7 @@ if i32.const 0 i32.const 56 - i32.const 87 + i32.const 85 i32.const 2 call $~lib/env/abort unreachable @@ -552,7 +552,7 @@ if i32.const 0 i32.const 56 - i32.const 106 + i32.const 104 i32.const 2 call $~lib/env/abort unreachable @@ -565,7 +565,7 @@ if i32.const 0 i32.const 56 - i32.const 107 + i32.const 105 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/class-extends.json b/tests/compiler/class-extends.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/tests/compiler/class-extends.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/compiler/class-extends.optimized.wat b/tests/compiler/class-extends.optimized.wat index 6f25e5d32c..d75befae0d 100644 --- a/tests/compiler/class-extends.optimized.wat +++ b/tests/compiler/class-extends.optimized.wat @@ -4,9 +4,11 @@ (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $class-extends/test)) + (export ".capabilities" (global $~lib/capabilities)) (func $class-extends/test (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load diff --git a/tests/compiler/class-extends.untouched.wat b/tests/compiler/class-extends.untouched.wat index 52e5585c48..98594ca223 100644 --- a/tests/compiler/class-extends.untouched.wat +++ b/tests/compiler/class-extends.untouched.wat @@ -5,9 +5,11 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $class-extends/test)) + (export ".capabilities" (global $~lib/capabilities)) (func $class-extends/test (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load diff --git a/tests/compiler/class-overloading.json b/tests/compiler/class-overloading.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/class-overloading.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/class.json b/tests/compiler/class.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/tests/compiler/class.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index 7531e170a4..ffdd0ac9c3 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -1,14 +1,21 @@ (module + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\10\00\00\00c\00l\00a\00s\00s\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $start) + (data (i32.const 8) "\01\00\00\00\10") + (data (i32.const 24) "c\00l\00a\00s\00s\00.\00t\00s") + (table $0 2 funcref) + (elem (i32.const 0) $start $~lib/string/String~iterate) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $class/test)) - (func $class/test (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (export ".capabilities" (global $~lib/capabilities)) + (func $~lib/string/String~iterate (; 0 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $class/test (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load drop @@ -29,7 +36,7 @@ i32.store8 offset=6 local.get $0 ) - (func $start (; 1 ;) (type $FUNCSIG$v) + (func $start (; 2 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/class.untouched.wat b/tests/compiler/class.untouched.wat index bd5155a745..cbfea5a127 100644 --- a/tests/compiler/class.untouched.wat +++ b/tests/compiler/class.untouched.wat @@ -1,5 +1,7 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$fff (func (param f32 f32) (result f32))) (type $FUNCSIG$v (func)) @@ -8,23 +10,28 @@ (type $FUNCSIG$fiff (func (param i32 f32 f32) (result f32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\10\00\00\00c\00l\00a\00s\00s\00.\00t\00s\00") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00c\00l\00a\00s\00s\00.\00t\00s\00") + (table $0 2 funcref) + (elem (i32.const 0) $null $~lib/string/String~iterate) (global $class/Animal.ONE (mut i32) (i32.const 1)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $class/test)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $class/Animal.add (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $class/Animal.add (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.add global.get $class/Animal.ONE i32.add ) - (func $class/Animal.sub (; 2 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $class/Animal.sub (; 3 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 f32.sub @@ -32,14 +39,14 @@ f32.convert_i32_s f32.add ) - (func $start:class (; 3 ;) (type $FUNCSIG$v) + (func $start:class (; 4 ;) (type $FUNCSIG$v) i32.const 4 i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 13 i32.const 0 call $~lib/env/abort @@ -56,14 +63,14 @@ call $class/Animal.sub drop ) - (func $class/Animal#instanceAdd (; 4 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $class/Animal#instanceAdd (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 local.get $2 i32.add global.get $class/Animal.ONE i32.add ) - (func $class/Animal#instanceSub (; 5 ;) (type $FUNCSIG$fiff) (param $0 i32) (param $1 f32) (param $2 f32) (result f32) + (func $class/Animal#instanceSub (; 6 ;) (type $FUNCSIG$fiff) (param $0 i32) (param $1 f32) (param $2 f32) (result f32) local.get $1 local.get $2 f32.sub @@ -71,7 +78,7 @@ f32.convert_i32_s f32.add ) - (func $class/test (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $class/test (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -116,9 +123,9 @@ local.set $2 local.get $2 ) - (func $start (; 7 ;) (type $FUNCSIG$v) + (func $start (; 8 ;) (type $FUNCSIG$v) call $start:class ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 9 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/closure.json b/tests/compiler/closure.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/tests/compiler/closure.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/compiler/closure.optimized.wat b/tests/compiler/closure.optimized.wat index 587c7142d7..13be3a5fae 100644 --- a/tests/compiler/closure.optimized.wat +++ b/tests/compiler/closure.optimized.wat @@ -3,8 +3,10 @@ (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (func $null (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/closure.untouched.wat b/tests/compiler/closure.untouched.wat index 4560a6a15a..413ff0e872 100644 --- a/tests/compiler/closure.untouched.wat +++ b/tests/compiler/closure.untouched.wat @@ -4,8 +4,10 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (func $null (; 0 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/comma.json b/tests/compiler/comma.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/comma.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/constructor.json b/tests/compiler/constructor.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/tests/compiler/constructor.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index ce967eb7b2..6990d26b17 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -1,16 +1,31 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\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) - (elem (i32.const 0) $null) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (data (i32.const 8) "\01\00\00\00,") + (data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 72) "\01\00\00\00\1e") + (data (i32.const 88) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 120) "\01\00\00\00\12") + (data (i32.const 136) " \00 \00 \00 \00 \00i\00t\00e\00r") + (table $0 14 funcref) + (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/string/String~iterate $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1 $~lib/collector/itcm/step~anonymous|0 $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $constructor/emptyCtor (mut i32) (i32.const 0)) (global $constructor/emptyCtorWithFieldInit (mut i32) (i32.const 0)) (global $constructor/emptyCtorWithFieldNoInit (mut i32) (i32.const 0)) @@ -22,43 +37,1072 @@ (global $constructor/ctorConditionallyReturns (mut i32) (i32.const 0)) (global $constructor/ctorAllocates (mut i32) (i32.const 0)) (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 159 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/allocator/tlsf/Root#setHead (; 4 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 184 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 32 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/allocator/tlsf/Block#get:right (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + i32.const -4 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 104 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 8 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 105 + i32.const 11 + call $~lib/env/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 447 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $~lib/allocator/tlsf/Root#getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 175 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 32 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 176 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load offset=96 + ) + (func $~lib/allocator/tlsf/Root#getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load offset=4 + ) + (func $~lib/allocator/tlsf/Root#remove (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.tee $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 277 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $3 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 279 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + i32.const 256 + i32.lt_u + if (result i32) + local.get $3 + i32.const 8 + i32.div_u + local.set $4 + i32.const 0 + else + local.get $3 + local.get $3 + call $~lib/allocator/tlsf/fls + local.tee $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $4 + local.get $2 + i32.const 7 + i32.sub + end + local.set $2 + local.get $1 + i32.load offset=8 + local.set $3 + local.get $1 + i32.load offset=4 + local.tee $5 + if + local.get $5 + local.get $3 + i32.store offset=8 + end + local.get $3 + if + local.get $3 + local.get $5 + i32.store offset=4 + end + local.get $0 + local.get $2 + local.get $4 + call $~lib/allocator/tlsf/Root#getHead + local.get $1 + i32.eq + if + local.get $0 + local.get $2 + local.get $4 + local.get $3 + call $~lib/allocator/tlsf/Root#setHead + local.get $3 + i32.eqz + if + local.get $0 + local.get $2 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $4 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $1 + call $~lib/allocator/tlsf/Root#setSLMap + local.get $1 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $2 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/allocator/tlsf/Block#get:left (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 96 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 97 + i32.const 11 + call $~lib/env/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/Root#setJump (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + i32.load + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 353 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/Block#get:right + local.get $1 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 354 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 355 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 4 + i32.sub + local.get $0 + i32.store + ) + (func $~lib/allocator/tlsf/Root#insert (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 208 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.tee $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 210 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + i32.const -4 + i32.and + local.tee $4 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $4 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 212 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 216 + i32.const 23 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.load + local.tee $4 + i32.const 1 + i32.and + if + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $4 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $3 + i32.add + local.tee $3 + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $2 + i32.load + local.set $4 + end + local.get $3 + i32.const 2 + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 230 + i32.const 24 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.tee $5 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 232 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $3 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $5 + i32.add + local.tee $3 + i32.store + end + local.get $2 + local.get $4 + i32.const 2 + i32.or + i32.store + local.get $1 + local.get $2 + call $~lib/allocator/tlsf/Root#setJump + local.get $3 + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $3 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 245 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $3 + i32.const 256 + i32.lt_u + if (result i32) + local.get $3 + i32.const 8 + i32.div_u + local.set $3 + i32.const 0 + else + local.get $3 + local.get $3 + call $~lib/allocator/tlsf/fls + local.tee $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $3 + local.get $2 + i32.const 7 + i32.sub + end + local.tee $2 + local.get $3 + call $~lib/allocator/tlsf/Root#getHead + local.set $4 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $4 + i32.store offset=8 + local.get $4 + if + local.get $4 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $2 + local.get $3 + local.get $1 + call $~lib/allocator/tlsf/Root#setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $2 + i32.shl + i32.or + i32.store + local.get $0 + local.get $2 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $3 + i32.shl + i32.or + call $~lib/allocator/tlsf/Root#setSLMap + ) + (func $~lib/allocator/tlsf/Root#addMemory (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + local.get $2 + i32.gt_u + if + i32.const 0 + i32.const 24 + i32.const 396 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 397 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 398 + i32.const 4 + call $~lib/env/abort + unreachable + end + i32.const 2912 + i32.load + local.tee $3 + if + local.get $1 + local.get $3 + i32.const 4 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 403 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 8 + i32.sub + local.get $3 + i32.eq + if + local.get $3 + i32.load + local.set $4 + local.get $1 + i32.const 8 + i32.sub + local.set $1 + end + else + local.get $1 + local.get $0 + i32.const 2916 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 412 + i32.const 6 + call $~lib/env/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.tee $2 + i32.const 32 + i32.lt_u + if + return + end + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $2 + i32.const 16 + i32.sub + i32.const 1 + i32.or + i32.or + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.tee $2 + i32.const 2 + i32.store + i32.const 2912 + local.get $2 + i32.store + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#insert + ) + (func $~lib/allocator/tlsf/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/Root#search (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $1 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 315 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 256 + i32.lt_u + if (result i32) + i32.const 0 + local.set $2 + local.get $1 + i32.const 8 + i32.div_u + else + local.get $1 + call $~lib/allocator/tlsf/fls + local.tee $3 + i32.const 7 + i32.sub + local.set $2 + local.get $1 + local.get $3 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.tee $1 + i32.const 31 + i32.lt_u + if (result i32) + local.get $1 + i32.const 1 + i32.add + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + i32.const 0 + end + end + local.set $1 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const -1 + local.get $1 + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + else + local.get $0 + i32.load + i32.const -1 + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/ffs + local.tee $2 + call $~lib/allocator/tlsf/Root#getSLMap + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 342 + i32.const 16 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + else + i32.const 0 + end + end + ) + (func $~lib/allocator/tlsf/Root#use (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $1 + i32.load + local.tee $4 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 367 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 16 + i32.ge_u + local.tee $3 + if + local.get $2 + i32.const 1073741824 + i32.lt_u + local.set $3 + end + local.get $3 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 368 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 369 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $4 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $3 + i32.const 24 + i32.ge_u + if + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $2 + i32.or + i32.store + local.get $1 + i32.const 8 + i32.add + local.get $2 + i32.add + local.tee $2 + local.get $3 + i32.const 8 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#insert + else + local.get $1 + local.get $4 + i32.const -2 + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 387 + i32.const 25 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $0 + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 + i32.const 8 + i32.add + ) + (func $~lib/allocator/tlsf/__mem_allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + global.get $~lib/allocator/tlsf/ROOT + local.tee $2 + i32.eqz + if + i32.const 1 + current_memory + local.tee $1 + i32.gt_s + local.tee $2 + if (result i32) + i32.const 1 + local.get $1 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + local.get $2 + end + if + unreachable + end + i32.const 160 + local.set $2 + i32.const 160 + global.set $~lib/allocator/tlsf/ROOT + i32.const 2912 + i32.const 0 + i32.store + i32.const 160 + i32.const 0 + i32.store + i32.const 0 + local.set $1 + loop $repeat|0 + local.get $1 + i32.const 22 + i32.lt_u + if + i32.const 160 + local.get $1 + i32.const 0 + call $~lib/allocator/tlsf/Root#setSLMap + i32.const 0 + local.set $3 + loop $repeat|1 + local.get $3 + i32.const 32 + i32.lt_u + if + i32.const 160 + local.get $1 + local.get $3 + i32.const 0 + call $~lib/allocator/tlsf/Root#setHead + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $repeat|1 + end + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end + end + i32.const 160 + i32.const 3080 + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + end local.get $0 i32.const 1073741824 i32.gt_u if unreachable end - global.get $~lib/allocator/arena/offset - local.tee $1 - local.get $0 - i32.const 1 + local.get $2 local.get $0 - i32.const 1 - i32.gt_u - select - i32.add i32.const 7 i32.add i32.const -8 i32.and local.tee $0 - current_memory - local.tee $2 i32.const 16 - i32.shl + local.get $0 + i32.const 16 i32.gt_u + select + local.tee $1 + call $~lib/allocator/tlsf/Root#search + local.tee $0 + i32.eqz if - local.get $2 - local.get $0 + current_memory + local.tee $0 local.get $1 - i32.sub i32.const 65535 i32.add i32.const -65536 @@ -66,7 +1110,7 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $2 + local.get $0 local.get $3 i32.gt_s select @@ -82,22 +1126,58 @@ unreachable end end + local.get $2 + local.get $0 + i32.const 16 + i32.shl + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/Root#search + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 502 + i32.const 12 + call $~lib/env/abort + unreachable + end + end + local.get $0 + i32.load + i32.const -4 + i32.and + local.get $1 + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 505 + i32.const 2 + call $~lib/env/abort + unreachable end + local.get $2 local.get $0 - global.set $~lib/allocator/arena/offset local.get $1 + call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub i32.shl - call $~lib/allocator/arena/__mem_allocate + call $~lib/allocator/tlsf/__mem_allocate local.tee $1 i32.const -1520547049 i32.store @@ -105,24 +1185,335 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 i32.add ) - (func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $0 + i32.or + i32.store offset=8 + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.and + local.get $1 + i32.or + i32.store offset=8 + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/collector/itcm/iter + local.get $0 + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + local.tee $2 + local.get $0 + i32.load offset=12 + local.tee $1 + i32.store offset=12 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $2 + i32.or + i32.store offset=8 + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/step~anonymous|0 (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/collector/itcm/step~anonymous|1 (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 136 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/allocator/tlsf/__mem_free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.tee $1 + if + local.get $0 + i32.const 8 + i32.sub + local.tee $2 + i32.load + local.tee $3 + i32.const 1 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + i32.const 1 + i32.or + i32.store + local.get $1 + local.get $0 + i32.const 8 + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/collector/itcm/step (; 24 ;) (type $FUNCSIG$v) + (local $0 i32) + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + global.get $~lib/collector/itcm/state + local.tee $0 + if + local.get $0 + i32.const 1 + i32.sub + br_table $case1|0 $case2|0 $case3|0 $break|0 + end + i32.const 16 + call $~lib/allocator/tlsf/__mem_allocate + global.set $~lib/collector/itcm/fromSpace + global.get $~lib/collector/itcm/fromSpace + local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + i32.const 16 + call $~lib/allocator/tlsf/__mem_allocate + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/toSpace + local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter + i32.const 1 + global.set $~lib/collector/itcm/state + end + i32.const 3 + call $~iterateRoots + i32.const 2 + global.set $~lib/collector/itcm/state + br $break|0 + end + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.or + i32.store offset=8 + local.get $0 + i32.const 16 + i32.add + i32.const 4 + local.get $0 + i32.load + call_indirect (type $FUNCSIG$vii) + else + i32.const 5 + call $~iterateRoots + global.get $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $0 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $0 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + end + end + br $break|0 + end + global.get $~lib/collector/itcm/iter + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + local.get $0 + i32.const 156 + i32.ge_u + if + local.get $0 + call $~lib/allocator/tlsf/__mem_free + end + else + global.get $~lib/collector/itcm/toSpace + local.tee $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + i32.const 1 + global.set $~lib/collector/itcm/state + end + end + ) + (func $~lib/collector/itcm/__ref_register (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + call $~lib/collector/itcm/step + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + global.get $~lib/collector/itcm/white + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.or + i32.store offset=8 + global.get $~lib/collector/itcm/fromSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + ) + (func $~lib/runtime/register (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 48 + i32.const 156 i32.le_u if i32.const 0 - i32.const 16 - i32.const 149 + i32.const 88 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $2 i32.load @@ -130,8 +1521,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 151 + i32.const 88 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -139,16 +1530,20 @@ local.get $2 local.get $1 i32.store + block + local.get $0 + call $~lib/collector/itcm/__ref_register + end local.get $0 ) - (func $constructor/CtorConditionallyAllocates#constructor (; 4 ;) (type $FUNCSIG$i) (result i32) + (func $constructor/CtorConditionallyAllocates#constructor (; 27 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) block (result i32) global.get $constructor/b if i32.const 0 call $~lib/runtime/allocate - i32.const 10 + i32.const 13 call $~lib/runtime/register local.set $0 end @@ -158,26 +1553,22 @@ if i32.const 0 call $~lib/runtime/allocate - i32.const 10 + i32.const 13 call $~lib/runtime/register local.set $0 end local.get $0 ) - (func $start:constructor (; 5 ;) (type $FUNCSIG$v) + (func $start:constructor (; 28 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 48 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset i32.const 0 call $~lib/runtime/allocate - i32.const 1 + i32.const 2 call $~lib/runtime/register global.set $constructor/emptyCtor i32.const 4 call $~lib/runtime/allocate - i32.const 3 + i32.const 6 call $~lib/runtime/register local.tee $0 i32.const 1 @@ -186,7 +1577,7 @@ global.set $constructor/emptyCtorWithFieldInit i32.const 4 call $~lib/runtime/allocate - i32.const 4 + i32.const 7 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -195,12 +1586,12 @@ global.set $constructor/emptyCtorWithFieldNoInit i32.const 0 call $~lib/runtime/allocate - i32.const 5 + i32.const 8 call $~lib/runtime/register global.set $constructor/none i32.const 4 call $~lib/runtime/allocate - i32.const 6 + i32.const 9 call $~lib/runtime/register local.tee $0 i32.const 1 @@ -209,7 +1600,7 @@ global.set $constructor/justFieldInit i32.const 4 call $~lib/runtime/allocate - i32.const 7 + i32.const 10 call $~lib/runtime/register local.tee $0 i32.const 0 @@ -217,33 +1608,106 @@ local.get $0 global.set $constructor/justFieldNoInit i32.const 0 - call $~lib/allocator/arena/__mem_allocate + call $~lib/allocator/tlsf/__mem_allocate global.set $constructor/ctorReturns block $__inlined_func$constructor/CtorConditionallyReturns#constructor (result i32) global.get $constructor/b if i32.const 0 - call $~lib/allocator/arena/__mem_allocate + call $~lib/allocator/tlsf/__mem_allocate br $__inlined_func$constructor/CtorConditionallyReturns#constructor end i32.const 0 call $~lib/runtime/allocate - i32.const 8 + i32.const 11 call $~lib/runtime/register end global.set $constructor/ctorConditionallyReturns i32.const 0 call $~lib/runtime/allocate - i32.const 9 + i32.const 12 call $~lib/runtime/register global.set $constructor/ctorAllocates call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates ) - (func $start (; 6 ;) (type $FUNCSIG$v) + (func $start (; 29 ;) (type $FUNCSIG$v) call $start:constructor ) - (func $null (; 7 ;) (type $FUNCSIG$v) + (func $null (; 30 ;) (type $FUNCSIG$v) nop ) + (func $~iterateRoots (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + global.get $constructor/emptyCtor + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/emptyCtorWithFieldInit + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/emptyCtorWithFieldNoInit + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/none + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/justFieldInit + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/justFieldNoInit + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/ctorReturns + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/ctorConditionallyReturns + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/ctorAllocates + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/ctorConditionallyAllocates + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + ) ) diff --git a/tests/compiler/constructor.ts b/tests/compiler/constructor.ts index c039c67710..89ee7be427 100644 --- a/tests/compiler/constructor.ts +++ b/tests/compiler/constructor.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - // trailing conditional allocate class EmptyCtor { constructor() {} diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index b4538719a8..c43d2cb476 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -1,18 +1,46 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (table $0 1 funcref) - (elem (i32.const 0) $null) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (data (i32.const 8) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 72) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 120) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00i\00t\00e\00r\00") + (table $0 14 funcref) + (elem (i32.const 0) $null $~lib/string/String~iterate $constructor/EmptyCtor~iterate $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1 $~lib/collector/itcm/step~anonymous|2 $constructor/EmptyCtorWithFieldInit~iterate $constructor/EmptyCtorWithFieldNoInit~iterate $constructor/None~iterate $constructor/JustFieldInit~iterate $constructor/JustFieldNoInit~iterate $constructor/CtorConditionallyReturns~iterate $constructor/CtorAllocates~iterate $constructor/CtorConditionallyAllocates~iterate) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) + (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) + (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) + (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) + (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) + (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) + (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) + (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) + (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) + (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) + (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) + (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) + (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) + (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) + (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $constructor/emptyCtor (mut i32) (i32.const 0)) (global $constructor/emptyCtorWithFieldInit (mut i32) (i32.const 0)) (global $constructor/emptyCtorWithFieldNoInit (mut i32) (i32.const 0)) @@ -24,123 +52,1808 @@ (global $constructor/ctorConditionallyReturns (mut i32) (i32.const 0)) (global $constructor/ctorAllocates (mut i32) (i32.const 0)) (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 156)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.add - i32.const 1 - i32.sub - i32.clz - i32.sub - i32.shl + global.get $~lib/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 0 + local.get $1 + i32.store offset=2912 + ) + (func $~lib/string/String~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 159 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 4 + i32.mul + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/allocator/tlsf/Root#setHead (; 6 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 184 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + i32.load offset=2912 + ) + (func $~lib/allocator/tlsf/Block#get:right (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 104 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 105 + i32.const 11 + call $~lib/env/abort + unreachable + else + local.get $1 + end + ) + (func $~lib/allocator/tlsf/fls (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 447 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $~lib/allocator/tlsf/Root#getHead (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 175 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 176 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + i32.load offset=96 + ) + (func $~lib/allocator/tlsf/Root#getSLMap (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 4 + i32.mul + i32.add + i32.load offset=4 + ) + (func $~lib/allocator/tlsf/Root#remove (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + i32.load + local.set $2 + local.get $2 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 277 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 279 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $5 + local.get $3 + i32.const 8 + i32.div_u + local.set $6 + else + local.get $3 + call $~lib/allocator/tlsf/fls + local.set $5 + local.get $3 + local.get $5 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $6 + local.get $5 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $5 + end + local.get $1 + i32.load offset=4 + local.set $7 + local.get $1 + i32.load offset=8 + local.set $8 + local.get $7 + if + local.get $7 + local.get $8 + i32.store offset=8 + end + local.get $8 + if + local.get $8 + local.get $7 + i32.store offset=4 + end + local.get $1 + local.get $0 + local.get $5 + local.get $6 + call $~lib/allocator/tlsf/Root#getHead + i32.eq + if + local.get $0 + local.get $5 + local.get $6 + local.get $8 + call $~lib/allocator/tlsf/Root#setHead + local.get $8 + i32.eqz + if + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#getSLMap + local.set $4 + local.get $0 + local.get $5 + local.get $4 + i32.const 1 + local.get $6 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $4 + call $~lib/allocator/tlsf/Root#setSLMap + local.get $4 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $5 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/allocator/tlsf/Block#get:left (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 96 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 97 + i32.const 11 + call $~lib/env/abort + unreachable + else + local.get $1 + end + ) + (func $~lib/allocator/tlsf/Root#setJump (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.load + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 353 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.get $2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 354 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 355 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 4 + i32.sub + local.get $1 + i32.store + ) + (func $~lib/allocator/tlsf/Root#insert (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 208 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.set $2 + local.get $2 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 210 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.tee $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 212 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 216 + i32.const 23 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $5 + local.get $5 + i32.load + local.set $6 + local.get $6 + global.get $~lib/allocator/tlsf/FREE + i32.and + if + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $2 + global.get $~lib/allocator/tlsf/Block.INFO + local.get $6 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $2 + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.set $5 + local.get $5 + i32.load + local.set $6 + end + local.get $2 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 230 + i32.const 24 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $4 + local.get $4 + i32.load + local.set $7 + local.get $7 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 232 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#remove + local.get $4 + local.get $7 + global.get $~lib/allocator/tlsf/Block.INFO + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $7 + i32.store + local.get $4 + local.set $1 + local.get $7 + local.set $2 + end + local.get $5 + local.get $6 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.or + i32.store + local.get $0 + local.get $1 + local.get $5 + call $~lib/allocator/tlsf/Root#setJump + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $7 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $7 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 245 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $8 + local.get $3 + i32.const 8 + i32.div_u + local.set $9 + else + local.get $3 + call $~lib/allocator/tlsf/fls + local.set $8 + local.get $3 + local.get $8 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $9 + local.get $8 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $8 + end + local.get $0 + local.get $8 + local.get $9 + call $~lib/allocator/tlsf/Root#getHead + local.set $10 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $10 + i32.store offset=8 + local.get $10 + if + local.get $10 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $8 + local.get $9 + local.get $1 + call $~lib/allocator/tlsf/Root#setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $8 + i32.shl + i32.or + i32.store + local.get $0 + local.get $8 + local.get $0 + local.get $8 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $9 + i32.shl + i32.or + call $~lib/allocator/tlsf/Root#setSLMap + ) + (func $~lib/allocator/tlsf/Root#addMemory (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + local.get $2 + i32.le_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 396 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 397 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 398 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/Root#get:tailRef + local.set $3 + i32.const 0 + local.set $4 + local.get $3 + if + local.get $1 + local.get $3 + i32.const 4 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 403 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.get $3 + i32.eq + if + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $1 + local.get $3 + i32.load + local.set $4 + end + else + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 412 + i32.const 6 + call $~lib/env/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.set $5 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.add + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + i32.lt_u + if + i32.const 0 + return + end + local.get $5 + i32.const 2 + global.get $~lib/allocator/tlsf/Block.INFO + i32.mul + i32.sub + local.set $6 + local.get $1 + local.set $7 + local.get $7 + local.get $6 + global.get $~lib/allocator/tlsf/FREE + i32.or + local.get $4 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.or + i32.store + local.get $7 + i32.const 0 + i32.store offset=4 + local.get $7 + i32.const 0 + i32.store offset=8 + local.get $1 + local.get $5 + i32.add + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $8 + local.get $8 + i32.const 0 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.or + i32.store + local.get $0 + local.get $8 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $0 + local.get $7 + call $~lib/allocator/tlsf/Root#insert + i32.const 1 + ) + (func $~lib/allocator/tlsf/ffs (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/ffs (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/Root#search (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $1 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $2 + if (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $2 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 315 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $3 + local.get $1 + i32.const 8 + i32.div_u + local.set $4 + else + local.get $1 + call $~lib/allocator/tlsf/fls + local.set $3 + local.get $1 + local.get $3 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $4 + local.get $3 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $3 + local.get $4 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 1 + i32.sub + i32.lt_u + if + local.get $4 + i32.const 1 + i32.add + local.set $4 + else + local.get $3 + i32.const 1 + i32.add + local.set $3 + i32.const 0 + local.set $4 + end + end + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 0 + i32.const -1 + i32.xor + local.get $4 + i32.shl + i32.and + local.set $5 + local.get $5 + i32.eqz + if + local.get $0 + i32.load + i32.const 0 + i32.const -1 + i32.xor + local.get $3 + i32.const 1 + i32.add + i32.shl + i32.and + local.set $2 + local.get $2 + i32.eqz + if + i32.const 0 + local.set $6 + else + local.get $2 + call $~lib/allocator/tlsf/ffs + local.set $3 + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#getSLMap + local.tee $7 + if (result i32) + local.get $7 + else + i32.const 0 + i32.const 24 + i32.const 342 + i32.const 16 + call $~lib/env/abort + unreachable + end + local.set $5 + local.get $0 + local.get $3 + local.get $5 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $6 + end + else + local.get $0 + local.get $3 + local.get $5 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $6 + end + local.get $6 + ) + (func $~lib/allocator/tlsf/Root#use (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 367 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $2 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 368 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 369 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $3 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.sub + local.set $5 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.add + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.or + i32.store + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + local.get $2 + i32.add + local.set $4 + local.get $4 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#insert + else + local.get $1 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.const -1 + i32.xor + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 387 + i32.const 25 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $4 + local.get $4 + local.get $4 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const -1 + i32.xor + i32.and + i32.store + end + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + ) + (func $~lib/allocator/tlsf/__mem_allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + i32.eqz + if + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $2 + current_memory + local.set $3 + local.get $2 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $4 + local.get $4 + local.get $3 + i32.gt_s + local.tee $5 + if (result i32) + local.get $4 + local.get $3 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + local.get $5 + end + if + unreachable + end + local.get $2 + local.tee $1 + global.set $~lib/allocator/tlsf/ROOT + local.get $1 + i32.const 0 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $1 + i32.const 0 + i32.store + block $break|0 + i32.const 0 + local.set $5 + loop $repeat|0 + local.get $5 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + br_if $break|0 + block + local.get $1 + local.get $5 + i32.const 0 + call $~lib/allocator/tlsf/Root#setSLMap + block $break|1 + i32.const 0 + local.set $6 + loop $repeat|1 + local.get $6 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + br_if $break|1 + local.get $1 + local.get $5 + local.get $6 + i32.const 0 + call $~lib/allocator/tlsf/Root#setHead + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $repeat|1 + unreachable + end + unreachable + end + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $repeat|0 + unreachable + end + unreachable + end + local.get $1 + local.get $2 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + end + local.get $0 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.gt_u + if + unreachable + end + local.get $0 + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.tee $4 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + local.tee $3 + local.get $4 + local.get $3 + i32.gt_u + select + local.set $0 + local.get $1 + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.set $7 + local.get $7 + i32.eqz + if + current_memory + local.set $4 + local.get $0 + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $3 + local.get $4 + local.tee $2 + local.get $3 + local.tee $5 + local.get $2 + local.get $5 + i32.gt_s + select + local.set $2 + local.get $2 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + current_memory + local.set $5 + local.get $1 + local.get $4 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + local.get $1 + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.tee $6 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 502 + i32.const 12 + call $~lib/env/abort + unreachable + else + local.get $6 + end + local.set $7 + end + local.get $7 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.get $0 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 505 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $1 + local.get $7 + local.get $0 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/memory/memory.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_allocate + return + ) + (func $~lib/runtime/allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/ADJUSTOBLOCK + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + ) + (func $constructor/EmptyCtor~iterate (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + ) + (func $~lib/collector/itcm/ManagedObject#get:color (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#get:next (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#set:next (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.or + i32.store offset=8 ) - (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/ManagedObject#unlink (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset + call $~lib/collector/itcm/ManagedObject#get:next local.set $1 + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $2 local.get $1 local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $1 local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/collector/itcm/iter + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + call $~lib/collector/itcm/ManagedObject#unlink + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 i32.const -1 i32.xor i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/step~anonymous|0 (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + block $~lib/collector/itcm/refToObj|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq if - local.get $4 + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/collector/itcm/ManagedObject#set:color (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $1 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/step~anonymous|1 (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 136 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + block $~lib/collector/itcm/refToObj|inlined.1 (result i32) + local.get $0 + local.set $1 local.get $1 + global.get $~lib/runtime/HEADER_SIZE i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $2 - local.get $5 - local.tee $3 + end + local.set $2 + local.get $2 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + if local.get $2 - local.tee $6 - local.get $3 - local.get $6 - i32.gt_s - select - local.set $3 - local.get $3 - grow_memory - i32.const 0 - i32.lt_s + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/collector/itcm/step~anonymous|2 (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + block $~lib/collector/itcm/refToObj|inlined.2 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/allocator/tlsf/__mem_free (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 if + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $2 local.get $2 - grow_memory - i32.const 0 - i32.lt_s + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + i32.eqz if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort unreachable end + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + call $~lib/allocator/tlsf/Root#insert end end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.free (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $~lib/allocator/arena/__mem_allocate - return + call $~lib/allocator/tlsf/__mem_free ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/step (; 38 ;) (type $FUNCSIG$v) + (local $0 i32) (local $1 i32) - local.get $0 - call $~lib/runtime/ADJUSTOBLOCK - call $~lib/memory/memory.allocate - local.set $1 - local.get $1 - global.get $~lib/runtime/HEADER_MAGIC - i32.store - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.add + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + global.get $~lib/collector/itcm/state + local.set $1 + local.get $1 + i32.const 0 + i32.eq + br_if $case0|0 + local.get $1 + i32.const 1 + i32.eq + br_if $case1|0 + local.get $1 + i32.const 2 + i32.eq + br_if $case2|0 + local.get $1 + i32.const 3 + i32.eq + br_if $case3|0 + br $break|0 + end + block + global.get $~lib/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/fromSpace + global.get $~lib/collector/itcm/fromSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/fromSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/fromSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/toSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/toSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter + i32.const 1 + global.set $~lib/collector/itcm/state + end + end + block + i32.const 3 + call $~iterateRoots + i32.const 2 + global.set $~lib/collector/itcm/state + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + call $~lib/collector/itcm/ManagedObject#set:color + block $~lib/collector/itcm/objToRef|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + end + i32.const 4 + local.get $0 + i32.load + call_indirect (type $FUNCSIG$vii) + else + i32.const 5 + call $~iterateRoots + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $1 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $1 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $1 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + end + end + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.ge_u + if + local.get $0 + call $~lib/memory/memory.free + end + else + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + i32.const 1 + global.set $~lib/collector/itcm/state + end + br $break|0 + unreachable + end + unreachable + end + ) + (func $~lib/collector/itcm/__ref_register (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/collector/itcm/step + block $~lib/collector/itcm/refToObj|inlined.3 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + global.get $~lib/collector/itcm/white + call $~lib/collector/itcm/ManagedObject#set:color + global.get $~lib/collector/itcm/fromSpace + local.get $2 + call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -148,8 +1861,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 149 + i32.const 88 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -165,8 +1878,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 151 + i32.const 88 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -175,26 +1888,31 @@ local.get $1 i32.store local.get $0 + call $~lib/collector/itcm/__ref_register + local.get $0 ) - (func $constructor/EmptyCtor#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtor#constructor (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 call $~lib/runtime/allocate - i32.const 1 + i32.const 2 call $~lib/runtime/register local.set $0 end local.get $0 ) - (func $constructor/EmptyCtorWithFieldInit#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtorWithFieldInit~iterate (; 42 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $constructor/EmptyCtorWithFieldInit#constructor (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 call $~lib/runtime/allocate - i32.const 3 + i32.const 6 call $~lib/runtime/register local.set $0 end @@ -203,13 +1921,16 @@ i32.store local.get $0 ) - (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtorWithFieldNoInit~iterate (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 call $~lib/runtime/allocate - i32.const 4 + i32.const 7 call $~lib/runtime/register local.set $0 end @@ -218,25 +1939,30 @@ i32.store local.get $0 ) - (func $constructor/None#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/None~iterate (; 46 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + ) + (func $constructor/None#constructor (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 call $~lib/runtime/allocate - i32.const 5 + i32.const 8 call $~lib/runtime/register local.set $0 end local.get $0 ) - (func $constructor/JustFieldInit#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/JustFieldInit~iterate (; 48 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $constructor/JustFieldInit#constructor (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 call $~lib/runtime/allocate - i32.const 6 + i32.const 9 call $~lib/runtime/register local.set $0 end @@ -245,13 +1971,16 @@ i32.store local.get $0 ) - (func $constructor/JustFieldNoInit#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/JustFieldNoInit~iterate (; 50 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $constructor/JustFieldNoInit#constructor (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 call $~lib/runtime/allocate - i32.const 7 + i32.const 10 call $~lib/runtime/register local.set $0 end @@ -260,11 +1989,14 @@ i32.store local.get $0 ) - (func $constructor/CtorReturns#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorReturns#constructor (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 call $~lib/memory/memory.allocate ) - (func $constructor/CtorConditionallyReturns#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorConditionallyReturns~iterate (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $constructor/CtorConditionallyReturns#constructor (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) global.get $constructor/b if i32.const 0 @@ -276,20 +2008,23 @@ if i32.const 0 call $~lib/runtime/allocate - i32.const 8 + i32.const 11 call $~lib/runtime/register local.set $0 end local.get $0 ) - (func $constructor/CtorAllocates#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorAllocates~iterate (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $constructor/CtorAllocates#constructor (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 0 call $~lib/runtime/allocate - i32.const 9 + i32.const 12 call $~lib/runtime/register local.set $0 end @@ -298,7 +2033,10 @@ drop local.get $0 ) - (func $constructor/CtorConditionallyAllocates#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorConditionallyAllocates~iterate (; 57 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $constructor/CtorConditionallyAllocates#constructor (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) global.get $constructor/b if block (result i32) @@ -307,7 +2045,7 @@ if i32.const 0 call $~lib/runtime/allocate - i32.const 10 + i32.const 13 call $~lib/runtime/register local.set $0 end @@ -320,23 +2058,13 @@ if i32.const 0 call $~lib/runtime/allocate - i32.const 10 + i32.const 13 call $~lib/runtime/register local.set $0 end local.get $0 ) - (func $start:constructor (; 16 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset + (func $start:constructor (; 59 ;) (type $FUNCSIG$v) i32.const 0 call $constructor/EmptyCtor#constructor global.set $constructor/emptyCtor @@ -368,9 +2096,82 @@ call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates ) - (func $start (; 17 ;) (type $FUNCSIG$v) + (func $start (; 60 ;) (type $FUNCSIG$v) call $start:constructor ) - (func $null (; 18 ;) (type $FUNCSIG$v) + (func $null (; 61 ;) (type $FUNCSIG$v) + ) + (func $~iterateRoots (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + global.get $constructor/emptyCtor + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/emptyCtorWithFieldInit + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/emptyCtorWithFieldNoInit + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/none + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/justFieldInit + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/justFieldNoInit + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/ctorReturns + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/ctorConditionallyReturns + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/ctorAllocates + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/ctorConditionallyAllocates + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end ) ) diff --git a/tests/compiler/declare.json b/tests/compiler/declare.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/declare.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/do.json b/tests/compiler/do.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/do.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/empty.json b/tests/compiler/empty.json new file mode 100644 index 0000000000..453cb07770 --- /dev/null +++ b/tests/compiler/empty.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} diff --git a/tests/compiler/enum.json b/tests/compiler/enum.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/enum.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/export.json b/tests/compiler/export.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/export.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/exports.json b/tests/compiler/exports.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/exports.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index da2716973c..b2e7924f65 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -146,7 +146,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -161,7 +161,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index e943f9a690..96704ef447 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -19,9 +19,9 @@ (global $exports/vehicles.Car.TIRES i32 (i32.const 4)) (global $exports/outer.inner.a i32 (i32.const 42)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (global $~lib/argc (mut i32) (i32.const 0)) @@ -192,7 +192,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -209,7 +209,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/external.json b/tests/compiler/external.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/external.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/for.json b/tests/compiler/for.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/for.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/function-expression.json b/tests/compiler/function-expression.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/function-expression.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/function-types.json b/tests/compiler/function-types.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/function-types.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/function.json b/tests/compiler/function.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/function.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/gc.json b/tests/compiler/gc.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/gc.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/gc.optimized.wat b/tests/compiler/gc.optimized.wat index 736d770dbd..730674c6f5 100644 --- a/tests/compiler/gc.optimized.wat +++ b/tests/compiler/gc.optimized.wat @@ -1,10 +1,10 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$i (func (result i32))) @@ -168,7 +168,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -183,7 +183,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1019,7 +1019,7 @@ if i32.const 0 i32.const 112 - i32.const 18 + i32.const 17 i32.const 2 call $~lib/env/abort unreachable @@ -1030,7 +1030,7 @@ if i32.const 0 i32.const 112 - i32.const 19 + i32.const 18 i32.const 2 call $~lib/env/abort unreachable @@ -1041,7 +1041,7 @@ if i32.const 0 i32.const 112 - i32.const 20 + i32.const 19 i32.const 2 call $~lib/env/abort unreachable @@ -1060,7 +1060,7 @@ if i32.const 0 i32.const 112 - i32.const 27 + i32.const 26 i32.const 2 call $~lib/env/abort unreachable @@ -1073,7 +1073,7 @@ if i32.const 0 i32.const 112 - i32.const 28 + i32.const 27 i32.const 2 call $~lib/env/abort unreachable @@ -1084,7 +1084,7 @@ if i32.const 0 i32.const 112 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -1102,7 +1102,7 @@ if i32.const 0 i32.const 112 - i32.const 36 + i32.const 35 i32.const 2 call $~lib/env/abort unreachable @@ -1113,7 +1113,7 @@ if i32.const 0 i32.const 112 - i32.const 37 + i32.const 36 i32.const 2 call $~lib/env/abort unreachable @@ -1126,7 +1126,7 @@ if i32.const 0 i32.const 112 - i32.const 38 + i32.const 37 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc.ts b/tests/compiler/gc.ts index af6cb670ef..32d0667363 100644 --- a/tests/compiler/gc.ts +++ b/tests/compiler/gc.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import { link_count, unlink_count, collect_count } from "./gc/_dummy"; export { gc }; diff --git a/tests/compiler/gc.untouched.wat b/tests/compiler/gc.untouched.wat index eaa108334a..e41cb42006 100644 --- a/tests/compiler/gc.untouched.wat +++ b/tests/compiler/gc.untouched.wat @@ -1,10 +1,10 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) @@ -30,9 +30,9 @@ (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) (global $gc/_dummy/unlink_parentRef (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/gc/gc.implemented i32 (i32.const 1)) (global $~lib/argc (mut i32) (i32.const 0)) @@ -198,7 +198,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -215,7 +215,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1212,7 +1212,7 @@ if i32.const 0 i32.const 112 - i32.const 10 + i32.const 9 i32.const 2 call $~lib/env/abort unreachable @@ -1234,7 +1234,7 @@ if i32.const 0 i32.const 112 - i32.const 18 + i32.const 17 i32.const 2 call $~lib/env/abort unreachable @@ -1246,7 +1246,7 @@ if i32.const 0 i32.const 112 - i32.const 19 + i32.const 18 i32.const 2 call $~lib/env/abort unreachable @@ -1258,7 +1258,7 @@ if i32.const 0 i32.const 112 - i32.const 20 + i32.const 19 i32.const 2 call $~lib/env/abort unreachable @@ -1278,7 +1278,7 @@ if i32.const 0 i32.const 112 - i32.const 27 + i32.const 26 i32.const 2 call $~lib/env/abort unreachable @@ -1292,7 +1292,7 @@ if i32.const 0 i32.const 112 - i32.const 28 + i32.const 27 i32.const 2 call $~lib/env/abort unreachable @@ -1304,7 +1304,7 @@ if i32.const 0 i32.const 112 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -1323,7 +1323,7 @@ if i32.const 0 i32.const 112 - i32.const 36 + i32.const 35 i32.const 2 call $~lib/env/abort unreachable @@ -1335,7 +1335,7 @@ if i32.const 0 i32.const 112 - i32.const 37 + i32.const 36 i32.const 2 call $~lib/env/abort unreachable @@ -1349,7 +1349,7 @@ if i32.const 0 i32.const 112 - i32.const 38 + i32.const 37 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-assign.json b/tests/compiler/gc/global-assign.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/gc/global-assign.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/gc/global-assign.optimized.wat b/tests/compiler/gc/global-assign.optimized.wat index a1dab65e7c..ddb3eb3375 100644 --- a/tests/compiler/gc/global-assign.optimized.wat +++ b/tests/compiler/gc/global-assign.optimized.wat @@ -1,8 +1,8 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) @@ -141,7 +141,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -156,7 +156,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -184,7 +184,7 @@ if i32.const 0 i32.const 112 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -193,7 +193,7 @@ if i32.const 0 i32.const 112 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -202,7 +202,7 @@ if i32.const 0 i32.const 112 - i32.const 14 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -216,7 +216,7 @@ if i32.const 0 i32.const 112 - i32.const 19 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -225,7 +225,7 @@ if i32.const 0 i32.const 112 - i32.const 20 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -234,7 +234,7 @@ if i32.const 0 i32.const 112 - i32.const 21 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-assign.ts b/tests/compiler/gc/global-assign.ts index 3240387d1c..06b3cf7d06 100644 --- a/tests/compiler/gc/global-assign.ts +++ b/tests/compiler/gc/global-assign.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import { register_count, link_count, unlink_count } from "./_dummy"; @start export function main(): void {} diff --git a/tests/compiler/gc/global-assign.untouched.wat b/tests/compiler/gc/global-assign.untouched.wat index ae8392c5e8..3855c7c761 100644 --- a/tests/compiler/gc/global-assign.untouched.wat +++ b/tests/compiler/gc/global-assign.untouched.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -24,9 +24,9 @@ (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) (global $gc/_dummy/unlink_parentRef (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $gc/global-assign/global (mut i32) (i32.const 0)) (global $gc/global-assign/globalRef (mut i32) (i32.const 0)) @@ -186,7 +186,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -203,7 +203,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -250,7 +250,7 @@ if i32.const 0 i32.const 112 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -262,7 +262,7 @@ if i32.const 0 i32.const 112 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -274,7 +274,7 @@ if i32.const 0 i32.const 112 - i32.const 14 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -289,7 +289,7 @@ if i32.const 0 i32.const 112 - i32.const 19 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -301,7 +301,7 @@ if i32.const 0 i32.const 112 - i32.const 20 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -313,7 +313,7 @@ if i32.const 0 i32.const 112 - i32.const 21 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-init.json b/tests/compiler/gc/global-init.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/gc/global-init.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/gc/global-init.optimized.wat b/tests/compiler/gc/global-init.optimized.wat index 9aea1b6d6a..19f0472ca7 100644 --- a/tests/compiler/gc/global-init.optimized.wat +++ b/tests/compiler/gc/global-init.optimized.wat @@ -1,8 +1,8 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) @@ -140,7 +140,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -155,7 +155,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -181,7 +181,7 @@ if i32.const 0 i32.const 112 - i32.const 11 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -190,7 +190,7 @@ if i32.const 0 i32.const 112 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -199,7 +199,7 @@ if i32.const 0 i32.const 112 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -213,7 +213,7 @@ if i32.const 0 i32.const 112 - i32.const 16 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -222,7 +222,7 @@ if i32.const 0 i32.const 112 - i32.const 17 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -231,7 +231,7 @@ if i32.const 0 i32.const 112 - i32.const 18 + i32.const 17 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-init.ts b/tests/compiler/gc/global-init.ts index 9f89bc7ad6..d4857d001d 100644 --- a/tests/compiler/gc/global-init.ts +++ b/tests/compiler/gc/global-init.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import { register_count, link_count, unlink_count } from "./_dummy"; @start export function main(): void {} diff --git a/tests/compiler/gc/global-init.untouched.wat b/tests/compiler/gc/global-init.untouched.wat index 0a87e6c965..c25cf7ebb2 100644 --- a/tests/compiler/gc/global-init.untouched.wat +++ b/tests/compiler/gc/global-init.untouched.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -24,9 +24,9 @@ (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) (global $gc/_dummy/unlink_parentRef (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $gc/global-init/global (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) @@ -185,7 +185,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -202,7 +202,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -247,7 +247,7 @@ if i32.const 0 i32.const 112 - i32.const 11 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -259,7 +259,7 @@ if i32.const 0 i32.const 112 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -271,7 +271,7 @@ if i32.const 0 i32.const 112 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -286,7 +286,7 @@ if i32.const 0 i32.const 112 - i32.const 16 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -298,7 +298,7 @@ if i32.const 0 i32.const 112 - i32.const 17 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -310,7 +310,7 @@ if i32.const 0 i32.const 112 - i32.const 18 + i32.const 17 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/itcm/trace.json b/tests/compiler/gc/itcm/trace.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/gc/itcm/trace.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/gc/itcm/trace.optimized.wat b/tests/compiler/gc/itcm/trace.optimized.wat index f7d365420e..3d64b6aa57 100644 --- a/tests/compiler/gc/itcm/trace.optimized.wat +++ b/tests/compiler/gc/itcm/trace.optimized.wat @@ -1,10 +1,10 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -67,12 +67,12 @@ (table $0 10 funcref) (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1 $~lib/collector/itcm/step~anonymous|0 $gc/itcm/trace/Ref~iterate $~lib/string/String~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (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/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $gc/itcm/trace/ref (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (global $gc/itcm/trace/arr (mut i32) (i32.const 0)) @@ -683,7 +683,7 @@ if i32.const 0 i32.const 1056 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -698,7 +698,7 @@ if i32.const 0 i32.const 1056 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -2170,7 +2170,7 @@ if i32.const 0 i32.const 1056 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/itcm/trace.ts b/tests/compiler/gc/itcm/trace.ts index 8c0e269977..88e87f75e7 100644 --- a/tests/compiler/gc/itcm/trace.ts +++ b/tests/compiler/gc/itcm/trace.ts @@ -1,6 +1,4 @@ @global const GC_TRACE = true; - -import "allocator/arena"; import "collector/itcm"; import { HEADER_SIZE } from "runtime"; diff --git a/tests/compiler/gc/itcm/trace.untouched.wat b/tests/compiler/gc/itcm/trace.untouched.wat index b33feda9e6..6a84fd72d0 100644 --- a/tests/compiler/gc/itcm/trace.untouched.wat +++ b/tests/compiler/gc/itcm/trace.untouched.wat @@ -1,10 +1,10 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) @@ -42,15 +42,15 @@ (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1 $~lib/collector/itcm/step~anonymous|2 $gc/itcm/trace/Ref~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) (global $gc/itcm/trace/GC_TRACE i32 (i32.const 1)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/gc/gc.implemented i32 (i32.const 1)) (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $~lib/gc/gc.implemented i32 (i32.const 1)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $gc/itcm/trace/ref (mut i32) (i32.const 0)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) @@ -825,7 +825,7 @@ if i32.const 0 i32.const 1056 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -842,7 +842,7 @@ if i32.const 0 i32.const 1056 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1235,7 +1235,7 @@ if i32.const 0 i32.const 1056 - i32.const 232 + i32.const 236 i32.const 57 call $~lib/env/abort unreachable @@ -2867,7 +2867,7 @@ if i32.const 0 i32.const 1056 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable @@ -3039,7 +3039,7 @@ if i32.const 0 i32.const 24 - i32.const 8 + i32.const 6 i32.const 0 call $~lib/env/abort unreachable @@ -3049,7 +3049,7 @@ if i32.const 0 i32.const 24 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-assign.json b/tests/compiler/gc/rc/global-assign.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/gc/rc/global-assign.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/gc/rc/global-assign.optimized.wat b/tests/compiler/gc/rc/global-assign.optimized.wat index 7cc9b1e91a..92f2f955cd 100644 --- a/tests/compiler/gc/rc/global-assign.optimized.wat +++ b/tests/compiler/gc/rc/global-assign.optimized.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -225,7 +225,7 @@ if i32.const 0 i32.const 152 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -236,7 +236,7 @@ if i32.const 0 i32.const 152 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -247,7 +247,7 @@ if i32.const 0 i32.const 152 - i32.const 14 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -256,7 +256,7 @@ if i32.const 0 i32.const 152 - i32.const 15 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -285,7 +285,7 @@ if i32.const 0 i32.const 152 - i32.const 20 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -296,7 +296,7 @@ if i32.const 0 i32.const 152 - i32.const 21 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -307,7 +307,7 @@ if i32.const 0 i32.const 152 - i32.const 22 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -318,7 +318,7 @@ if i32.const 0 i32.const 152 - i32.const 23 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -329,7 +329,7 @@ if i32.const 0 i32.const 152 - i32.const 24 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-assign.ts b/tests/compiler/gc/rc/global-assign.ts index 6fb0bb400c..8102b2cf18 100644 --- a/tests/compiler/gc/rc/global-assign.ts +++ b/tests/compiler/gc/rc/global-assign.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import { register_count, retain_count, retain_ref, release_count, release_ref } from "./_dummy"; @start export function main(): void {} diff --git a/tests/compiler/gc/rc/global-assign.untouched.wat b/tests/compiler/gc/rc/global-assign.untouched.wat index 2a42677d38..70952dc5c1 100644 --- a/tests/compiler/gc/rc/global-assign.untouched.wat +++ b/tests/compiler/gc/rc/global-assign.untouched.wat @@ -23,9 +23,9 @@ (global $gc/rc/_dummy/release_count (mut i32) (i32.const 0)) (global $gc/rc/_dummy/release_ref (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $gc/rc/global-assign/global (mut i32) (i32.const 0)) (global $gc/rc/global-assign/globalRef (mut i32) (i32.const 0)) @@ -180,7 +180,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -197,7 +197,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -286,7 +286,7 @@ if i32.const 0 i32.const 152 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -298,7 +298,7 @@ if i32.const 0 i32.const 152 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -310,7 +310,7 @@ if i32.const 0 i32.const 152 - i32.const 14 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -322,7 +322,7 @@ if i32.const 0 i32.const 152 - i32.const 15 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -353,7 +353,7 @@ if i32.const 0 i32.const 152 - i32.const 20 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -365,7 +365,7 @@ if i32.const 0 i32.const 152 - i32.const 21 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -377,7 +377,7 @@ if i32.const 0 i32.const 152 - i32.const 22 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -389,7 +389,7 @@ if i32.const 0 i32.const 152 - i32.const 23 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -401,7 +401,7 @@ if i32.const 0 i32.const 152 - i32.const 24 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-init.json b/tests/compiler/gc/rc/global-init.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/gc/rc/global-init.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/gc/rc/global-init.optimized.wat b/tests/compiler/gc/rc/global-init.optimized.wat index baa5f0cc04..9d4e47c400 100644 --- a/tests/compiler/gc/rc/global-init.optimized.wat +++ b/tests/compiler/gc/rc/global-init.optimized.wat @@ -139,7 +139,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -154,7 +154,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -201,7 +201,7 @@ if i32.const 0 i32.const 152 - i32.const 11 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -212,7 +212,7 @@ if i32.const 0 i32.const 152 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -223,7 +223,7 @@ if i32.const 0 i32.const 152 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -232,7 +232,7 @@ if i32.const 0 i32.const 152 - i32.const 14 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-init.ts b/tests/compiler/gc/rc/global-init.ts index 46c36ba565..faa6a1e00f 100644 --- a/tests/compiler/gc/rc/global-init.ts +++ b/tests/compiler/gc/rc/global-init.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import { register_count, retain_count, retain_ref, release_count } from "./_dummy"; @start export function main(): void {} diff --git a/tests/compiler/gc/rc/global-init.untouched.wat b/tests/compiler/gc/rc/global-init.untouched.wat index 9b020422d5..e36d384ba8 100644 --- a/tests/compiler/gc/rc/global-init.untouched.wat +++ b/tests/compiler/gc/rc/global-init.untouched.wat @@ -22,9 +22,9 @@ (global $gc/rc/_dummy/release_count (mut i32) (i32.const 0)) (global $gc/rc/_dummy/release_ref (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $gc/rc/global-init/global (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) @@ -178,7 +178,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -195,7 +195,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -264,7 +264,7 @@ if i32.const 0 i32.const 152 - i32.const 11 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -276,7 +276,7 @@ if i32.const 0 i32.const 152 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -288,7 +288,7 @@ if i32.const 0 i32.const 152 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -300,7 +300,7 @@ if i32.const 0 i32.const 152 - i32.const 14 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.json b/tests/compiler/getter-call.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/getter-call.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 7e5d36042d..63396690c1 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -85,7 +85,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index ddc0e13fc6..3bc9afc1a5 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -10,9 +10,9 @@ (table $0 2 funcref) (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|0) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) @@ -141,7 +141,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-setter.json b/tests/compiler/getter-setter.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/getter-setter.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/i64-polyfill.json b/tests/compiler/i64-polyfill.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/i64-polyfill.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/if.json b/tests/compiler/if.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/if.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/import.json b/tests/compiler/import.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/import.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/infer-type.json b/tests/compiler/infer-type.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/infer-type.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/inlining-blocklocals.json b/tests/compiler/inlining-blocklocals.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/inlining-blocklocals.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/inlining-recursive.json b/tests/compiler/inlining-recursive.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/inlining-recursive.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/inlining.json b/tests/compiler/inlining.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/inlining.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index 6168f869de..59d17ecf28 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 48 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -146,7 +146,7 @@ if i32.const 0 i32.const 48 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index d23f392cab..dd25148d18 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -13,9 +13,9 @@ (global $inlining/constantGlobal i32 (i32.const 1)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 80)) (export "memory" (memory $0)) @@ -405,7 +405,7 @@ if i32.const 0 i32.const 48 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -422,7 +422,7 @@ if i32.const 0 i32.const 48 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/instanceof.json b/tests/compiler/instanceof.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/instanceof.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/limits.json b/tests/compiler/limits.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/limits.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/literals.json b/tests/compiler/literals.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/literals.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/logical.json b/tests/compiler/logical.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/logical.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/main.json b/tests/compiler/main.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/main.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/mandelbrot.json b/tests/compiler/mandelbrot.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/mandelbrot.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/many-locals.json b/tests/compiler/many-locals.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/many-locals.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/memcpy.json b/tests/compiler/memcpy.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/memcpy.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/memmove.json b/tests/compiler/memmove.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/memmove.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/memset.json b/tests/compiler/memset.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/memset.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/merge.json b/tests/compiler/merge.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/merge.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/named-export-default.json b/tests/compiler/named-export-default.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/named-export-default.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/named-import-default.json b/tests/compiler/named-import-default.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/named-import-default.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/namespace.json b/tests/compiler/namespace.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/namespace.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/new-without-allocator.json b/tests/compiler/new-without-allocator.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/new-without-allocator.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/number.json b/tests/compiler/number.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/number.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 89aa758653..2b849b70f8 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -303,7 +303,7 @@ if i32.const 0 i32.const 464 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -318,7 +318,7 @@ if i32.const 0 i32.const 464 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -2451,7 +2451,7 @@ if i32.const 0 i32.const 464 - i32.const 173 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -2465,7 +2465,7 @@ if i32.const 0 i32.const 464 - i32.const 175 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -2486,7 +2486,7 @@ if i32.const 0 i32.const 520 - i32.const 7 + i32.const 5 i32.const 0 call $~lib/env/abort unreachable @@ -2509,7 +2509,7 @@ if i32.const 0 i32.const 520 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -2522,7 +2522,7 @@ if i32.const 0 i32.const 520 - i32.const 10 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -2535,7 +2535,7 @@ if i32.const 0 i32.const 520 - i32.const 12 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -2548,7 +2548,7 @@ if i32.const 0 i32.const 520 - i32.const 13 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -2566,7 +2566,7 @@ if i32.const 0 i32.const 520 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -2584,7 +2584,7 @@ if i32.const 0 i32.const 520 - i32.const 15 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -2596,7 +2596,7 @@ if i32.const 0 i32.const 520 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -2608,7 +2608,7 @@ if i32.const 0 i32.const 520 - i32.const 17 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -2626,7 +2626,7 @@ if i32.const 0 i32.const 520 - i32.const 20 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -2644,7 +2644,7 @@ if i32.const 0 i32.const 520 - i32.const 21 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/number.ts b/tests/compiler/number.ts index 853dcb12ad..cf7c76dbfa 100644 --- a/tests/compiler/number.ts +++ b/tests/compiler/number.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - // basic class bindings // variable diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 3032067b46..5b44b8a643 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -42,11 +42,11 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $number/a (mut i32) (i32.const 1)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) @@ -399,7 +399,7 @@ if i32.const 0 i32.const 464 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -416,7 +416,7 @@ if i32.const 0 i32.const 464 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -3550,7 +3550,7 @@ if i32.const 0 i32.const 464 - i32.const 173 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -3567,7 +3567,7 @@ if i32.const 0 i32.const 464 - i32.const 175 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -3737,7 +3737,7 @@ if i32.const 0 i32.const 520 - i32.const 7 + i32.const 5 i32.const 0 call $~lib/env/abort unreachable @@ -3750,7 +3750,7 @@ if i32.const 0 i32.const 520 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -3763,7 +3763,7 @@ if i32.const 0 i32.const 520 - i32.const 10 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -3776,7 +3776,7 @@ if i32.const 0 i32.const 520 - i32.const 12 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -3789,7 +3789,7 @@ if i32.const 0 i32.const 520 - i32.const 13 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -3809,7 +3809,7 @@ if i32.const 0 i32.const 520 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -3829,7 +3829,7 @@ if i32.const 0 i32.const 520 - i32.const 15 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -3843,7 +3843,7 @@ if i32.const 0 i32.const 520 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -3857,7 +3857,7 @@ if i32.const 0 i32.const 520 - i32.const 17 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -3877,7 +3877,7 @@ if i32.const 0 i32.const 520 - i32.const 20 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -3897,7 +3897,7 @@ if i32.const 0 i32.const 520 - i32.const 21 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -3908,7 +3908,7 @@ if i32.const 0 i32.const 520 - i32.const 25 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -3923,7 +3923,7 @@ if i32.const 0 i32.const 520 - i32.const 27 + i32.const 25 i32.const 0 call $~lib/env/abort unreachable @@ -3936,7 +3936,7 @@ if i32.const 0 i32.const 520 - i32.const 28 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -3949,7 +3949,7 @@ if i32.const 0 i32.const 520 - i32.const 29 + i32.const 27 i32.const 0 call $~lib/env/abort unreachable @@ -3962,7 +3962,7 @@ if i32.const 0 i32.const 520 - i32.const 30 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -3975,7 +3975,7 @@ if i32.const 0 i32.const 520 - i32.const 31 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable @@ -3988,7 +3988,7 @@ if i32.const 0 i32.const 520 - i32.const 32 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -4001,7 +4001,7 @@ if i32.const 0 i32.const 520 - i32.const 33 + i32.const 31 i32.const 0 call $~lib/env/abort unreachable @@ -4016,7 +4016,7 @@ if i32.const 0 i32.const 520 - i32.const 34 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -4029,7 +4029,7 @@ if i32.const 0 i32.const 520 - i32.const 35 + i32.const 33 i32.const 0 call $~lib/env/abort unreachable @@ -4042,7 +4042,7 @@ if i32.const 0 i32.const 520 - i32.const 36 + i32.const 34 i32.const 0 call $~lib/env/abort unreachable @@ -4055,7 +4055,7 @@ if i32.const 0 i32.const 520 - i32.const 37 + i32.const 35 i32.const 0 call $~lib/env/abort unreachable @@ -4068,7 +4068,7 @@ if i32.const 0 i32.const 520 - i32.const 38 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -4081,7 +4081,7 @@ if i32.const 0 i32.const 520 - i32.const 39 + i32.const 37 i32.const 0 call $~lib/env/abort unreachable @@ -4094,7 +4094,7 @@ if i32.const 0 i32.const 520 - i32.const 40 + i32.const 38 i32.const 0 call $~lib/env/abort unreachable @@ -4107,7 +4107,7 @@ if i32.const 0 i32.const 520 - i32.const 41 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -4120,7 +4120,7 @@ if i32.const 0 i32.const 520 - i32.const 42 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable @@ -4133,7 +4133,7 @@ if i32.const 0 i32.const 520 - i32.const 43 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable @@ -4146,7 +4146,7 @@ if i32.const 0 i32.const 520 - i32.const 44 + i32.const 42 i32.const 0 call $~lib/env/abort unreachable @@ -4159,7 +4159,7 @@ if i32.const 0 i32.const 520 - i32.const 45 + i32.const 43 i32.const 0 call $~lib/env/abort unreachable @@ -4172,7 +4172,7 @@ if i32.const 0 i32.const 520 - i32.const 46 + i32.const 44 i32.const 0 call $~lib/env/abort unreachable @@ -4183,7 +4183,7 @@ if i32.const 0 i32.const 520 - i32.const 48 + i32.const 46 i32.const 0 call $~lib/env/abort unreachable @@ -4198,7 +4198,7 @@ if i32.const 0 i32.const 520 - i32.const 50 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -4211,7 +4211,7 @@ if i32.const 0 i32.const 520 - i32.const 51 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -4224,7 +4224,7 @@ if i32.const 0 i32.const 520 - i32.const 52 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -4237,7 +4237,7 @@ if i32.const 0 i32.const 520 - i32.const 53 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -4250,7 +4250,7 @@ if i32.const 0 i32.const 520 - i32.const 54 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -4263,7 +4263,7 @@ if i32.const 0 i32.const 520 - i32.const 55 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable @@ -4276,7 +4276,7 @@ if i32.const 0 i32.const 520 - i32.const 56 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -4291,7 +4291,7 @@ if i32.const 0 i32.const 520 - i32.const 57 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable @@ -4304,7 +4304,7 @@ if i32.const 0 i32.const 520 - i32.const 58 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -4317,7 +4317,7 @@ if i32.const 0 i32.const 520 - i32.const 59 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -4330,7 +4330,7 @@ if i32.const 0 i32.const 520 - i32.const 60 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -4343,7 +4343,7 @@ if i32.const 0 i32.const 520 - i32.const 61 + i32.const 59 i32.const 0 call $~lib/env/abort unreachable @@ -4356,7 +4356,7 @@ if i32.const 0 i32.const 520 - i32.const 62 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable @@ -4369,7 +4369,7 @@ if i32.const 0 i32.const 520 - i32.const 63 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -4382,7 +4382,7 @@ if i32.const 0 i32.const 520 - i32.const 64 + i32.const 62 i32.const 0 call $~lib/env/abort unreachable @@ -4395,7 +4395,7 @@ if i32.const 0 i32.const 520 - i32.const 65 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -4408,7 +4408,7 @@ if i32.const 0 i32.const 520 - i32.const 66 + i32.const 64 i32.const 0 call $~lib/env/abort unreachable @@ -4421,7 +4421,7 @@ if i32.const 0 i32.const 520 - i32.const 67 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable @@ -4434,7 +4434,7 @@ if i32.const 0 i32.const 520 - i32.const 68 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable @@ -4447,7 +4447,7 @@ if i32.const 0 i32.const 520 - i32.const 69 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.json b/tests/compiler/optional-typeparameters.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/optional-typeparameters.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 559fb02a8c..841a73e242 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -115,7 +115,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index ce45532e6e..ebc66d120e 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -11,9 +11,9 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $optional-typeparameters/tConcrete (mut i32) (i32.const 0)) (global $optional-typeparameters/tDerived (mut i32) (i32.const 0)) @@ -148,7 +148,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -165,7 +165,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/overflow.json b/tests/compiler/overflow.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/overflow.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/portable-conversions.json b/tests/compiler/portable-conversions.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/portable-conversions.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/recursive.json b/tests/compiler/recursive.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/recursive.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/reexport.json b/tests/compiler/reexport.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/reexport.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/rereexport.json b/tests/compiler/rereexport.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/rereexport.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/resolve-nested.json b/tests/compiler/resolve-nested.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/resolve-nested.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/retain-i32.json b/tests/compiler/retain-i32.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/retain-i32.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/runtime-arena.json b/tests/compiler/runtime-arena.json new file mode 100644 index 0000000000..52d2fbb6c7 --- /dev/null +++ b/tests/compiler/runtime-arena.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} diff --git a/tests/compiler/runtime-arena.optimized.wat b/tests/compiler/runtime-arena.optimized.wat new file mode 100644 index 0000000000..587c7142d7 --- /dev/null +++ b/tests/compiler/runtime-arena.optimized.wat @@ -0,0 +1,11 @@ +(module + (type $FUNCSIG$v (func)) + (memory $0 0) + (table $0 1 funcref) + (elem (i32.const 0) $null) + (export "memory" (memory $0)) + (export "table" (table $0)) + (func $null (; 0 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/runtime-arena.ts b/tests/compiler/runtime-arena.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/compiler/runtime-arena.untouched.wat b/tests/compiler/runtime-arena.untouched.wat new file mode 100644 index 0000000000..4560a6a15a --- /dev/null +++ b/tests/compiler/runtime-arena.untouched.wat @@ -0,0 +1,11 @@ +(module + (type $FUNCSIG$v (func)) + (memory $0 0) + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (func $null (; 0 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/runtime-default.json b/tests/compiler/runtime-default.json new file mode 100644 index 0000000000..02748ee2ac --- /dev/null +++ b/tests/compiler/runtime-default.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime default" + ] +} diff --git a/tests/compiler/runtime-default.optimized.wat b/tests/compiler/runtime-default.optimized.wat new file mode 100644 index 0000000000..13be3a5fae --- /dev/null +++ b/tests/compiler/runtime-default.optimized.wat @@ -0,0 +1,13 @@ +(module + (type $FUNCSIG$v (func)) + (memory $0 0) + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $~lib/capabilities i32 (i32.const 2)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) + (func $null (; 0 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/runtime-default.ts b/tests/compiler/runtime-default.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/compiler/runtime-default.untouched.wat b/tests/compiler/runtime-default.untouched.wat new file mode 100644 index 0000000000..413ff0e872 --- /dev/null +++ b/tests/compiler/runtime-default.untouched.wat @@ -0,0 +1,13 @@ +(module + (type $FUNCSIG$v (func)) + (memory $0 0) + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/capabilities i32 (i32.const 2)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) + (func $null (; 0 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/runtime-none.json b/tests/compiler/runtime-none.json new file mode 100644 index 0000000000..453cb07770 --- /dev/null +++ b/tests/compiler/runtime-none.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} diff --git a/tests/compiler/runtime-none.optimized.wat b/tests/compiler/runtime-none.optimized.wat new file mode 100644 index 0000000000..587c7142d7 --- /dev/null +++ b/tests/compiler/runtime-none.optimized.wat @@ -0,0 +1,11 @@ +(module + (type $FUNCSIG$v (func)) + (memory $0 0) + (table $0 1 funcref) + (elem (i32.const 0) $null) + (export "memory" (memory $0)) + (export "table" (table $0)) + (func $null (; 0 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/runtime-none.ts b/tests/compiler/runtime-none.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/compiler/runtime-none.untouched.wat b/tests/compiler/runtime-none.untouched.wat new file mode 100644 index 0000000000..4560a6a15a --- /dev/null +++ b/tests/compiler/runtime-none.untouched.wat @@ -0,0 +1,11 @@ +(module + (type $FUNCSIG$v (func)) + (memory $0 0) + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (func $null (; 0 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/scoped.json b/tests/compiler/scoped.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/scoped.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/simd.json b/tests/compiler/simd.json index 15ece5b46c..2344125c9b 100644 --- a/tests/compiler/simd.json +++ b/tests/compiler/simd.json @@ -1,5 +1,8 @@ { "features": [ "simd" + ], + "asc_flags": [ + "--runtime none" ] } diff --git a/tests/compiler/static-this.json b/tests/compiler/static-this.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/static-this.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/allocator_arena.json b/tests/compiler/std/allocator_arena.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/std/allocator_arena.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/array-access.json b/tests/compiler/std/array-access.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/std/array-access.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 2d16c9f85b..84d5818ae4 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -14,7 +14,6 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/memory/HEAP_BASE i32 (i32.const 112)) (export "memory" (memory $0)) (export "table" (table $0)) diff --git a/tests/compiler/std/array-literal.json b/tests/compiler/std/array-literal.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/std/array-literal.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 4a741d229e..4a9ecb2bbf 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -191,7 +191,7 @@ if i32.const 0 i32.const 296 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -206,7 +206,7 @@ if i32.const 0 i32.const 296 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -311,7 +311,7 @@ if i32.const 0 i32.const 80 - i32.const 5 + i32.const 4 i32.const 0 call $~lib/env/abort unreachable @@ -322,7 +322,7 @@ if i32.const 0 i32.const 80 - i32.const 6 + i32.const 5 i32.const 0 call $~lib/env/abort unreachable @@ -335,7 +335,7 @@ if i32.const 0 i32.const 80 - i32.const 7 + i32.const 6 i32.const 0 call $~lib/env/abort unreachable @@ -348,7 +348,7 @@ if i32.const 0 i32.const 80 - i32.const 8 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -360,7 +360,7 @@ if i32.const 0 i32.const 80 - i32.const 11 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -371,7 +371,7 @@ if i32.const 0 i32.const 80 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -384,7 +384,7 @@ if i32.const 0 i32.const 80 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -397,7 +397,7 @@ if i32.const 0 i32.const 80 - i32.const 14 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -407,7 +407,7 @@ if i32.const 0 i32.const 80 - i32.const 17 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -450,7 +450,7 @@ if i32.const 0 i32.const 80 - i32.const 22 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -461,7 +461,7 @@ if i32.const 0 i32.const 80 - i32.const 23 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -474,7 +474,7 @@ if i32.const 0 i32.const 80 - i32.const 24 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -487,7 +487,7 @@ if i32.const 0 i32.const 80 - i32.const 25 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -528,7 +528,7 @@ if i32.const 0 i32.const 80 - i32.const 30 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable @@ -539,7 +539,7 @@ if i32.const 0 i32.const 80 - i32.const 31 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -552,7 +552,7 @@ if i32.const 0 i32.const 80 - i32.const 32 + i32.const 31 i32.const 0 call $~lib/env/abort unreachable @@ -565,7 +565,7 @@ if i32.const 0 i32.const 80 - i32.const 33 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -593,7 +593,7 @@ if i32.const 0 i32.const 80 - i32.const 37 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -621,7 +621,7 @@ if i32.const 0 i32.const 80 - i32.const 41 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.ts b/tests/compiler/std/array-literal.ts index 89371eb6c6..2418d30605 100644 --- a/tests/compiler/std/array-literal.ts +++ b/tests/compiler/std/array-literal.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import "collector/dummy"; const staticArrayI8: i8[] = [0, 1, 2]; diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 6a93778be0..c9df2d90f8 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -20,15 +20,15 @@ (data (i32.const 280) "\04\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 13 funcref) (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/string/String~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array-literal/Ref~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array-literal/RefWithCtor~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array-literal/staticArrayI8 i32 (i32.const 48)) (global $std/array-literal/staticArrayI32 i32 (i32.const 216)) (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 264)) (global $std/array-literal/i (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/array-literal/dynamicArrayI8 (mut i32) (i32.const 0)) (global $std/array-literal/dynamicArrayI32 (mut i32) (i32.const 0)) @@ -256,7 +256,7 @@ if i32.const 0 i32.const 296 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -273,7 +273,7 @@ if i32.const 0 i32.const 296 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1928,7 +1928,7 @@ if i32.const 0 i32.const 80 - i32.const 5 + i32.const 4 i32.const 0 call $~lib/env/abort unreachable @@ -1942,7 +1942,7 @@ if i32.const 0 i32.const 80 - i32.const 6 + i32.const 5 i32.const 0 call $~lib/env/abort unreachable @@ -1956,7 +1956,7 @@ if i32.const 0 i32.const 80 - i32.const 7 + i32.const 6 i32.const 0 call $~lib/env/abort unreachable @@ -1970,7 +1970,7 @@ if i32.const 0 i32.const 80 - i32.const 8 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -1983,7 +1983,7 @@ if i32.const 0 i32.const 80 - i32.const 11 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -1997,7 +1997,7 @@ if i32.const 0 i32.const 80 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -2011,7 +2011,7 @@ if i32.const 0 i32.const 80 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -2025,7 +2025,7 @@ if i32.const 0 i32.const 80 - i32.const 14 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -2038,7 +2038,7 @@ if i32.const 0 i32.const 80 - i32.const 17 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -2097,7 +2097,7 @@ if i32.const 0 i32.const 80 - i32.const 22 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -2111,7 +2111,7 @@ if i32.const 0 i32.const 80 - i32.const 23 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -2125,7 +2125,7 @@ if i32.const 0 i32.const 80 - i32.const 24 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -2139,7 +2139,7 @@ if i32.const 0 i32.const 80 - i32.const 25 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -2190,7 +2190,7 @@ if i32.const 0 i32.const 80 - i32.const 30 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable @@ -2204,7 +2204,7 @@ if i32.const 0 i32.const 80 - i32.const 31 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -2218,7 +2218,7 @@ if i32.const 0 i32.const 80 - i32.const 32 + i32.const 31 i32.const 0 call $~lib/env/abort unreachable @@ -2232,7 +2232,7 @@ if i32.const 0 i32.const 80 - i32.const 33 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -2291,7 +2291,7 @@ if i32.const 0 i32.const 80 - i32.const 37 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -2350,7 +2350,7 @@ if i32.const 0 i32.const 80 - i32.const 41 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array.json b/tests/compiler/std/array.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/std/array.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 02b007bf2f..4b393a5e8f 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2,10 +2,10 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$fii (func (param i32 i32) (result f32))) @@ -790,7 +790,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -805,7 +805,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -857,7 +857,7 @@ if i32.const 0 i32.const 24 - i32.const 232 + i32.const 236 i32.const 57 call $~lib/env/abort unreachable @@ -2361,7 +2361,7 @@ if i32.const 0 i32.const 24 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable @@ -3403,7 +3403,7 @@ if i32.const 0 i32.const 152 - i32.const 562 + i32.const 561 i32.const 4 call $~lib/env/abort unreachable @@ -5515,7 +5515,7 @@ if i32.const 0 i32.const 152 - i32.const 814 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable @@ -5828,7 +5828,7 @@ if i32.const 0 i32.const 152 - i32.const 814 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable @@ -6101,7 +6101,7 @@ if i32.const 0 i32.const 152 - i32.const 814 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable @@ -6463,7 +6463,7 @@ if i32.const 0 i32.const 24 - i32.const 173 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -6477,7 +6477,7 @@ if i32.const 0 i32.const 24 - i32.const 175 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -10172,7 +10172,7 @@ if i32.const 0 i32.const 152 - i32.const 40 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -10185,7 +10185,7 @@ if i32.const 0 i32.const 152 - i32.const 41 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable @@ -10219,7 +10219,7 @@ if i32.const 0 i32.const 152 - i32.const 52 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -10240,7 +10240,7 @@ if i32.const 0 i32.const 152 - i32.const 55 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -10261,7 +10261,7 @@ if i32.const 0 i32.const 152 - i32.const 58 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -10282,7 +10282,7 @@ if i32.const 0 i32.const 152 - i32.const 61 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable @@ -10303,7 +10303,7 @@ if i32.const 0 i32.const 152 - i32.const 64 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -10325,7 +10325,7 @@ if i32.const 0 i32.const 152 - i32.const 69 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable @@ -10347,7 +10347,7 @@ if i32.const 0 i32.const 152 - i32.const 72 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable @@ -10369,7 +10369,7 @@ if i32.const 0 i32.const 152 - i32.const 75 + i32.const 74 i32.const 0 call $~lib/env/abort unreachable @@ -10391,7 +10391,7 @@ if i32.const 0 i32.const 152 - i32.const 78 + i32.const 77 i32.const 0 call $~lib/env/abort unreachable @@ -10413,7 +10413,7 @@ if i32.const 0 i32.const 152 - i32.const 81 + i32.const 80 i32.const 0 call $~lib/env/abort unreachable @@ -10423,7 +10423,7 @@ if i32.const 0 i32.const 152 - i32.const 85 + i32.const 84 i32.const 0 call $~lib/env/abort unreachable @@ -10438,7 +10438,7 @@ if i32.const 0 i32.const 152 - i32.const 86 + i32.const 85 i32.const 0 call $~lib/env/abort unreachable @@ -10454,7 +10454,7 @@ if i32.const 0 i32.const 152 - i32.const 90 + i32.const 89 i32.const 0 call $~lib/env/abort unreachable @@ -10466,7 +10466,7 @@ if i32.const 0 i32.const 152 - i32.const 91 + i32.const 90 i32.const 0 call $~lib/env/abort unreachable @@ -10483,7 +10483,7 @@ if i32.const 0 i32.const 152 - i32.const 92 + i32.const 91 i32.const 0 call $~lib/env/abort unreachable @@ -10497,7 +10497,7 @@ if i32.const 0 i32.const 152 - i32.const 96 + i32.const 95 i32.const 0 call $~lib/env/abort unreachable @@ -10507,7 +10507,7 @@ if i32.const 0 i32.const 152 - i32.const 97 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable @@ -10524,7 +10524,7 @@ if i32.const 0 i32.const 152 - i32.const 98 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -10539,7 +10539,7 @@ if i32.const 0 i32.const 152 - i32.const 102 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable @@ -10556,7 +10556,7 @@ if i32.const 0 i32.const 152 - i32.const 103 + i32.const 102 i32.const 0 call $~lib/env/abort unreachable @@ -10569,7 +10569,7 @@ if i32.const 0 i32.const 152 - i32.const 104 + i32.const 103 i32.const 0 call $~lib/env/abort unreachable @@ -10584,7 +10584,7 @@ if i32.const 0 i32.const 152 - i32.const 108 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable @@ -10601,7 +10601,7 @@ if i32.const 0 i32.const 152 - i32.const 109 + i32.const 108 i32.const 0 call $~lib/env/abort unreachable @@ -10614,7 +10614,7 @@ if i32.const 0 i32.const 152 - i32.const 110 + i32.const 109 i32.const 0 call $~lib/env/abort unreachable @@ -10627,7 +10627,7 @@ if i32.const 0 i32.const 152 - i32.const 111 + i32.const 110 i32.const 0 call $~lib/env/abort unreachable @@ -10642,7 +10642,7 @@ if i32.const 0 i32.const 152 - i32.const 115 + i32.const 114 i32.const 0 call $~lib/env/abort unreachable @@ -10659,7 +10659,7 @@ if i32.const 0 i32.const 152 - i32.const 116 + i32.const 115 i32.const 0 call $~lib/env/abort unreachable @@ -10672,7 +10672,7 @@ if i32.const 0 i32.const 152 - i32.const 117 + i32.const 116 i32.const 0 call $~lib/env/abort unreachable @@ -10685,7 +10685,7 @@ if i32.const 0 i32.const 152 - i32.const 118 + i32.const 117 i32.const 0 call $~lib/env/abort unreachable @@ -10698,7 +10698,7 @@ if i32.const 0 i32.const 152 - i32.const 119 + i32.const 118 i32.const 0 call $~lib/env/abort unreachable @@ -10721,7 +10721,7 @@ if i32.const 0 i32.const 152 - i32.const 126 + i32.const 125 i32.const 0 call $~lib/env/abort unreachable @@ -10733,7 +10733,7 @@ if i32.const 0 i32.const 152 - i32.const 127 + i32.const 126 i32.const 0 call $~lib/env/abort unreachable @@ -10745,7 +10745,7 @@ if i32.const 0 i32.const 152 - i32.const 128 + i32.const 127 i32.const 0 call $~lib/env/abort unreachable @@ -10770,7 +10770,7 @@ if i32.const 0 i32.const 152 - i32.const 131 + i32.const 130 i32.const 0 call $~lib/env/abort unreachable @@ -10783,7 +10783,7 @@ if i32.const 0 i32.const 152 - i32.const 133 + i32.const 132 i32.const 0 call $~lib/env/abort unreachable @@ -10796,7 +10796,7 @@ if i32.const 0 i32.const 152 - i32.const 134 + i32.const 133 i32.const 0 call $~lib/env/abort unreachable @@ -10809,7 +10809,7 @@ if i32.const 0 i32.const 152 - i32.const 135 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -10836,7 +10836,7 @@ if i32.const 0 i32.const 152 - i32.const 142 + i32.const 141 i32.const 0 call $~lib/env/abort unreachable @@ -10848,7 +10848,7 @@ if i32.const 0 i32.const 152 - i32.const 143 + i32.const 142 i32.const 0 call $~lib/env/abort unreachable @@ -10860,7 +10860,7 @@ if i32.const 0 i32.const 152 - i32.const 144 + i32.const 143 i32.const 0 call $~lib/env/abort unreachable @@ -10873,7 +10873,7 @@ if i32.const 0 i32.const 152 - i32.const 145 + i32.const 144 i32.const 0 call $~lib/env/abort unreachable @@ -10886,7 +10886,7 @@ if i32.const 0 i32.const 152 - i32.const 146 + i32.const 145 i32.const 0 call $~lib/env/abort unreachable @@ -10899,7 +10899,7 @@ if i32.const 0 i32.const 152 - i32.const 147 + i32.const 146 i32.const 0 call $~lib/env/abort unreachable @@ -10912,7 +10912,7 @@ if i32.const 0 i32.const 152 - i32.const 148 + i32.const 147 i32.const 0 call $~lib/env/abort unreachable @@ -10925,7 +10925,7 @@ if i32.const 0 i32.const 152 - i32.const 149 + i32.const 148 i32.const 0 call $~lib/env/abort unreachable @@ -10940,7 +10940,7 @@ if i32.const 0 i32.const 152 - i32.const 152 + i32.const 151 i32.const 0 call $~lib/env/abort unreachable @@ -10956,7 +10956,7 @@ if i32.const 0 i32.const 152 - i32.const 155 + i32.const 154 i32.const 0 call $~lib/env/abort unreachable @@ -10969,7 +10969,7 @@ if i32.const 0 i32.const 152 - i32.const 156 + i32.const 155 i32.const 0 call $~lib/env/abort unreachable @@ -10979,7 +10979,7 @@ if i32.const 0 i32.const 152 - i32.const 159 + i32.const 158 i32.const 0 call $~lib/env/abort unreachable @@ -10995,7 +10995,7 @@ if i32.const 0 i32.const 152 - i32.const 161 + i32.const 160 i32.const 0 call $~lib/env/abort unreachable @@ -11005,7 +11005,7 @@ if i32.const 0 i32.const 152 - i32.const 162 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable @@ -11032,7 +11032,7 @@ if i32.const 0 i32.const 152 - i32.const 168 + i32.const 167 i32.const 0 call $~lib/env/abort unreachable @@ -11059,7 +11059,7 @@ if i32.const 0 i32.const 152 - i32.const 170 + i32.const 169 i32.const 0 call $~lib/env/abort unreachable @@ -11086,7 +11086,7 @@ if i32.const 0 i32.const 152 - i32.const 172 + i32.const 171 i32.const 0 call $~lib/env/abort unreachable @@ -11113,7 +11113,7 @@ if i32.const 0 i32.const 152 - i32.const 174 + i32.const 173 i32.const 0 call $~lib/env/abort unreachable @@ -11140,7 +11140,7 @@ if i32.const 0 i32.const 152 - i32.const 176 + i32.const 175 i32.const 0 call $~lib/env/abort unreachable @@ -11167,7 +11167,7 @@ if i32.const 0 i32.const 152 - i32.const 178 + i32.const 177 i32.const 0 call $~lib/env/abort unreachable @@ -11194,7 +11194,7 @@ if i32.const 0 i32.const 152 - i32.const 180 + i32.const 179 i32.const 0 call $~lib/env/abort unreachable @@ -11221,7 +11221,7 @@ if i32.const 0 i32.const 152 - i32.const 182 + i32.const 181 i32.const 0 call $~lib/env/abort unreachable @@ -11248,7 +11248,7 @@ if i32.const 0 i32.const 152 - i32.const 184 + i32.const 183 i32.const 0 call $~lib/env/abort unreachable @@ -11275,7 +11275,7 @@ if i32.const 0 i32.const 152 - i32.const 186 + i32.const 185 i32.const 0 call $~lib/env/abort unreachable @@ -11302,7 +11302,7 @@ if i32.const 0 i32.const 152 - i32.const 188 + i32.const 187 i32.const 0 call $~lib/env/abort unreachable @@ -11329,7 +11329,7 @@ if i32.const 0 i32.const 152 - i32.const 190 + i32.const 189 i32.const 0 call $~lib/env/abort unreachable @@ -11344,7 +11344,7 @@ if i32.const 0 i32.const 152 - i32.const 196 + i32.const 195 i32.const 0 call $~lib/env/abort unreachable @@ -11361,7 +11361,7 @@ if i32.const 0 i32.const 152 - i32.const 197 + i32.const 196 i32.const 0 call $~lib/env/abort unreachable @@ -11374,7 +11374,7 @@ if i32.const 0 i32.const 152 - i32.const 198 + i32.const 197 i32.const 0 call $~lib/env/abort unreachable @@ -11387,7 +11387,7 @@ if i32.const 0 i32.const 152 - i32.const 199 + i32.const 198 i32.const 0 call $~lib/env/abort unreachable @@ -11400,7 +11400,7 @@ if i32.const 0 i32.const 152 - i32.const 200 + i32.const 199 i32.const 0 call $~lib/env/abort unreachable @@ -11413,7 +11413,7 @@ if i32.const 0 i32.const 152 - i32.const 201 + i32.const 200 i32.const 0 call $~lib/env/abort unreachable @@ -11428,7 +11428,7 @@ if i32.const 0 i32.const 152 - i32.const 205 + i32.const 204 i32.const 0 call $~lib/env/abort unreachable @@ -11445,7 +11445,7 @@ if i32.const 0 i32.const 152 - i32.const 206 + i32.const 205 i32.const 0 call $~lib/env/abort unreachable @@ -11458,7 +11458,7 @@ if i32.const 0 i32.const 152 - i32.const 207 + i32.const 206 i32.const 0 call $~lib/env/abort unreachable @@ -11471,7 +11471,7 @@ if i32.const 0 i32.const 152 - i32.const 208 + i32.const 207 i32.const 0 call $~lib/env/abort unreachable @@ -11484,7 +11484,7 @@ if i32.const 0 i32.const 152 - i32.const 209 + i32.const 208 i32.const 0 call $~lib/env/abort unreachable @@ -11497,7 +11497,7 @@ if i32.const 0 i32.const 152 - i32.const 210 + i32.const 209 i32.const 0 call $~lib/env/abort unreachable @@ -11510,7 +11510,7 @@ if i32.const 0 i32.const 152 - i32.const 211 + i32.const 210 i32.const 0 call $~lib/env/abort unreachable @@ -11524,7 +11524,7 @@ if i32.const 0 i32.const 152 - i32.const 217 + i32.const 216 i32.const 0 call $~lib/env/abort unreachable @@ -11536,7 +11536,7 @@ if i32.const 0 i32.const 152 - i32.const 218 + i32.const 217 i32.const 0 call $~lib/env/abort unreachable @@ -11553,7 +11553,7 @@ if i32.const 0 i32.const 152 - i32.const 219 + i32.const 218 i32.const 0 call $~lib/env/abort unreachable @@ -11566,7 +11566,7 @@ if i32.const 0 i32.const 152 - i32.const 220 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -11579,7 +11579,7 @@ if i32.const 0 i32.const 152 - i32.const 221 + i32.const 220 i32.const 0 call $~lib/env/abort unreachable @@ -11592,7 +11592,7 @@ if i32.const 0 i32.const 152 - i32.const 222 + i32.const 221 i32.const 0 call $~lib/env/abort unreachable @@ -11605,7 +11605,7 @@ if i32.const 0 i32.const 152 - i32.const 223 + i32.const 222 i32.const 0 call $~lib/env/abort unreachable @@ -11619,7 +11619,7 @@ if i32.const 0 i32.const 152 - i32.const 227 + i32.const 226 i32.const 0 call $~lib/env/abort unreachable @@ -11631,7 +11631,7 @@ if i32.const 0 i32.const 152 - i32.const 228 + i32.const 227 i32.const 0 call $~lib/env/abort unreachable @@ -11648,7 +11648,7 @@ if i32.const 0 i32.const 152 - i32.const 229 + i32.const 228 i32.const 0 call $~lib/env/abort unreachable @@ -11661,7 +11661,7 @@ if i32.const 0 i32.const 152 - i32.const 230 + i32.const 229 i32.const 0 call $~lib/env/abort unreachable @@ -11674,7 +11674,7 @@ if i32.const 0 i32.const 152 - i32.const 231 + i32.const 230 i32.const 0 call $~lib/env/abort unreachable @@ -11687,7 +11687,7 @@ if i32.const 0 i32.const 152 - i32.const 232 + i32.const 231 i32.const 0 call $~lib/env/abort unreachable @@ -11701,7 +11701,7 @@ if i32.const 0 i32.const 152 - i32.const 238 + i32.const 237 i32.const 0 call $~lib/env/abort unreachable @@ -11718,7 +11718,7 @@ if i32.const 0 i32.const 152 - i32.const 239 + i32.const 238 i32.const 0 call $~lib/env/abort unreachable @@ -11731,7 +11731,7 @@ if i32.const 0 i32.const 152 - i32.const 240 + i32.const 239 i32.const 0 call $~lib/env/abort unreachable @@ -11744,7 +11744,7 @@ if i32.const 0 i32.const 152 - i32.const 241 + i32.const 240 i32.const 0 call $~lib/env/abort unreachable @@ -11757,7 +11757,7 @@ if i32.const 0 i32.const 152 - i32.const 242 + i32.const 241 i32.const 0 call $~lib/env/abort unreachable @@ -11777,7 +11777,7 @@ if i32.const 0 i32.const 152 - i32.const 251 + i32.const 250 i32.const 0 call $~lib/env/abort unreachable @@ -11793,7 +11793,7 @@ if i32.const 0 i32.const 152 - i32.const 255 + i32.const 254 i32.const 0 call $~lib/env/abort unreachable @@ -11809,7 +11809,7 @@ if i32.const 0 i32.const 152 - i32.const 259 + i32.const 258 i32.const 0 call $~lib/env/abort unreachable @@ -11825,7 +11825,7 @@ if i32.const 0 i32.const 152 - i32.const 263 + i32.const 262 i32.const 0 call $~lib/env/abort unreachable @@ -11841,7 +11841,7 @@ if i32.const 0 i32.const 152 - i32.const 267 + i32.const 266 i32.const 0 call $~lib/env/abort unreachable @@ -11857,7 +11857,7 @@ if i32.const 0 i32.const 152 - i32.const 271 + i32.const 270 i32.const 0 call $~lib/env/abort unreachable @@ -11873,7 +11873,7 @@ if i32.const 0 i32.const 152 - i32.const 275 + i32.const 274 i32.const 0 call $~lib/env/abort unreachable @@ -11889,7 +11889,7 @@ if i32.const 0 i32.const 152 - i32.const 279 + i32.const 278 i32.const 0 call $~lib/env/abort unreachable @@ -11905,7 +11905,7 @@ if i32.const 0 i32.const 152 - i32.const 283 + i32.const 282 i32.const 0 call $~lib/env/abort unreachable @@ -11921,7 +11921,7 @@ if i32.const 0 i32.const 152 - i32.const 287 + i32.const 286 i32.const 0 call $~lib/env/abort unreachable @@ -11937,7 +11937,7 @@ if i32.const 0 i32.const 152 - i32.const 293 + i32.const 292 i32.const 0 call $~lib/env/abort unreachable @@ -11953,7 +11953,7 @@ if i32.const 0 i32.const 152 - i32.const 297 + i32.const 296 i32.const 0 call $~lib/env/abort unreachable @@ -11967,7 +11967,7 @@ if i32.const 0 i32.const 152 - i32.const 301 + i32.const 300 i32.const 0 call $~lib/env/abort unreachable @@ -11981,7 +11981,7 @@ if i32.const 0 i32.const 152 - i32.const 305 + i32.const 304 i32.const 0 call $~lib/env/abort unreachable @@ -11997,7 +11997,7 @@ if i32.const 0 i32.const 152 - i32.const 309 + i32.const 308 i32.const 0 call $~lib/env/abort unreachable @@ -12013,7 +12013,7 @@ if i32.const 0 i32.const 152 - i32.const 313 + i32.const 312 i32.const 0 call $~lib/env/abort unreachable @@ -12029,7 +12029,7 @@ if i32.const 0 i32.const 152 - i32.const 317 + i32.const 316 i32.const 0 call $~lib/env/abort unreachable @@ -12045,7 +12045,7 @@ if i32.const 0 i32.const 152 - i32.const 321 + i32.const 320 i32.const 0 call $~lib/env/abort unreachable @@ -12061,7 +12061,7 @@ if i32.const 0 i32.const 152 - i32.const 325 + i32.const 324 i32.const 0 call $~lib/env/abort unreachable @@ -12077,7 +12077,7 @@ if i32.const 0 i32.const 152 - i32.const 329 + i32.const 328 i32.const 0 call $~lib/env/abort unreachable @@ -12094,7 +12094,7 @@ if i32.const 0 i32.const 152 - i32.const 333 + i32.const 332 i32.const 0 call $~lib/env/abort unreachable @@ -12111,7 +12111,7 @@ if i32.const 0 i32.const 152 - i32.const 334 + i32.const 333 i32.const 0 call $~lib/env/abort unreachable @@ -12124,7 +12124,7 @@ if i32.const 0 i32.const 152 - i32.const 335 + i32.const 334 i32.const 0 call $~lib/env/abort unreachable @@ -12137,7 +12137,7 @@ if i32.const 0 i32.const 152 - i32.const 336 + i32.const 335 i32.const 0 call $~lib/env/abort unreachable @@ -12157,7 +12157,7 @@ if i32.const 0 i32.const 152 - i32.const 341 + i32.const 340 i32.const 0 call $~lib/env/abort unreachable @@ -12174,7 +12174,7 @@ if i32.const 0 i32.const 152 - i32.const 342 + i32.const 341 i32.const 0 call $~lib/env/abort unreachable @@ -12200,7 +12200,7 @@ if i32.const 0 i32.const 152 - i32.const 345 + i32.const 344 i32.const 0 call $~lib/env/abort unreachable @@ -12217,7 +12217,7 @@ if i32.const 0 i32.const 152 - i32.const 346 + i32.const 345 i32.const 0 call $~lib/env/abort unreachable @@ -12243,7 +12243,7 @@ if i32.const 0 i32.const 152 - i32.const 349 + i32.const 348 i32.const 0 call $~lib/env/abort unreachable @@ -12260,7 +12260,7 @@ if i32.const 0 i32.const 152 - i32.const 350 + i32.const 349 i32.const 0 call $~lib/env/abort unreachable @@ -12286,7 +12286,7 @@ if i32.const 0 i32.const 152 - i32.const 353 + i32.const 352 i32.const 0 call $~lib/env/abort unreachable @@ -12303,7 +12303,7 @@ if i32.const 0 i32.const 152 - i32.const 354 + i32.const 353 i32.const 0 call $~lib/env/abort unreachable @@ -12329,7 +12329,7 @@ if i32.const 0 i32.const 152 - i32.const 357 + i32.const 356 i32.const 0 call $~lib/env/abort unreachable @@ -12346,7 +12346,7 @@ if i32.const 0 i32.const 152 - i32.const 358 + i32.const 357 i32.const 0 call $~lib/env/abort unreachable @@ -12372,7 +12372,7 @@ if i32.const 0 i32.const 152 - i32.const 361 + i32.const 360 i32.const 0 call $~lib/env/abort unreachable @@ -12389,7 +12389,7 @@ if i32.const 0 i32.const 152 - i32.const 362 + i32.const 361 i32.const 0 call $~lib/env/abort unreachable @@ -12415,7 +12415,7 @@ if i32.const 0 i32.const 152 - i32.const 365 + i32.const 364 i32.const 0 call $~lib/env/abort unreachable @@ -12432,7 +12432,7 @@ if i32.const 0 i32.const 152 - i32.const 366 + i32.const 365 i32.const 0 call $~lib/env/abort unreachable @@ -12458,7 +12458,7 @@ if i32.const 0 i32.const 152 - i32.const 369 + i32.const 368 i32.const 0 call $~lib/env/abort unreachable @@ -12475,7 +12475,7 @@ if i32.const 0 i32.const 152 - i32.const 370 + i32.const 369 i32.const 0 call $~lib/env/abort unreachable @@ -12501,7 +12501,7 @@ if i32.const 0 i32.const 152 - i32.const 373 + i32.const 372 i32.const 0 call $~lib/env/abort unreachable @@ -12518,7 +12518,7 @@ if i32.const 0 i32.const 152 - i32.const 374 + i32.const 373 i32.const 0 call $~lib/env/abort unreachable @@ -12544,7 +12544,7 @@ if i32.const 0 i32.const 152 - i32.const 377 + i32.const 376 i32.const 0 call $~lib/env/abort unreachable @@ -12561,7 +12561,7 @@ if i32.const 0 i32.const 152 - i32.const 378 + i32.const 377 i32.const 0 call $~lib/env/abort unreachable @@ -12587,7 +12587,7 @@ if i32.const 0 i32.const 152 - i32.const 381 + i32.const 380 i32.const 0 call $~lib/env/abort unreachable @@ -12604,7 +12604,7 @@ if i32.const 0 i32.const 152 - i32.const 382 + i32.const 381 i32.const 0 call $~lib/env/abort unreachable @@ -12630,7 +12630,7 @@ if i32.const 0 i32.const 152 - i32.const 385 + i32.const 384 i32.const 0 call $~lib/env/abort unreachable @@ -12647,7 +12647,7 @@ if i32.const 0 i32.const 152 - i32.const 386 + i32.const 385 i32.const 0 call $~lib/env/abort unreachable @@ -12673,7 +12673,7 @@ if i32.const 0 i32.const 152 - i32.const 389 + i32.const 388 i32.const 0 call $~lib/env/abort unreachable @@ -12690,7 +12690,7 @@ if i32.const 0 i32.const 152 - i32.const 390 + i32.const 389 i32.const 0 call $~lib/env/abort unreachable @@ -12719,7 +12719,7 @@ if i32.const 0 i32.const 152 - i32.const 400 + i32.const 399 i32.const 0 call $~lib/env/abort unreachable @@ -12734,7 +12734,7 @@ if i32.const 0 i32.const 152 - i32.const 403 + i32.const 402 i32.const 0 call $~lib/env/abort unreachable @@ -12749,7 +12749,7 @@ if i32.const 0 i32.const 152 - i32.const 406 + i32.const 405 i32.const 0 call $~lib/env/abort unreachable @@ -12764,7 +12764,7 @@ if i32.const 0 i32.const 152 - i32.const 414 + i32.const 413 i32.const 0 call $~lib/env/abort unreachable @@ -12776,7 +12776,7 @@ if i32.const 0 i32.const 152 - i32.const 415 + i32.const 414 i32.const 0 call $~lib/env/abort unreachable @@ -12791,7 +12791,7 @@ if i32.const 0 i32.const 152 - i32.const 417 + i32.const 416 i32.const 0 call $~lib/env/abort unreachable @@ -12818,7 +12818,7 @@ if i32.const 0 i32.const 152 - i32.const 430 + i32.const 429 i32.const 0 call $~lib/env/abort unreachable @@ -12830,7 +12830,7 @@ if i32.const 0 i32.const 152 - i32.const 431 + i32.const 430 i32.const 0 call $~lib/env/abort unreachable @@ -12851,7 +12851,7 @@ if i32.const 0 i32.const 152 - i32.const 439 + i32.const 438 i32.const 0 call $~lib/env/abort unreachable @@ -12864,7 +12864,7 @@ if i32.const 0 i32.const 152 - i32.const 442 + i32.const 441 i32.const 0 call $~lib/env/abort unreachable @@ -12879,7 +12879,7 @@ if i32.const 0 i32.const 152 - i32.const 450 + i32.const 449 i32.const 0 call $~lib/env/abort unreachable @@ -12891,7 +12891,7 @@ if i32.const 0 i32.const 152 - i32.const 451 + i32.const 450 i32.const 0 call $~lib/env/abort unreachable @@ -12904,7 +12904,7 @@ if i32.const 0 i32.const 152 - i32.const 453 + i32.const 452 i32.const 0 call $~lib/env/abort unreachable @@ -12931,7 +12931,7 @@ if i32.const 0 i32.const 152 - i32.const 466 + i32.const 465 i32.const 0 call $~lib/env/abort unreachable @@ -12943,7 +12943,7 @@ if i32.const 0 i32.const 152 - i32.const 467 + i32.const 466 i32.const 0 call $~lib/env/abort unreachable @@ -12964,7 +12964,7 @@ if i32.const 0 i32.const 152 - i32.const 475 + i32.const 474 i32.const 0 call $~lib/env/abort unreachable @@ -12977,7 +12977,7 @@ if i32.const 0 i32.const 152 - i32.const 478 + i32.const 477 i32.const 0 call $~lib/env/abort unreachable @@ -12990,7 +12990,7 @@ if i32.const 0 i32.const 152 - i32.const 486 + i32.const 485 i32.const 0 call $~lib/env/abort unreachable @@ -13002,7 +13002,7 @@ if i32.const 0 i32.const 152 - i32.const 487 + i32.const 486 i32.const 0 call $~lib/env/abort unreachable @@ -13017,7 +13017,7 @@ if i32.const 0 i32.const 152 - i32.const 489 + i32.const 488 i32.const 0 call $~lib/env/abort unreachable @@ -13042,7 +13042,7 @@ if i32.const 0 i32.const 152 - i32.const 502 + i32.const 501 i32.const 0 call $~lib/env/abort unreachable @@ -13054,7 +13054,7 @@ if i32.const 0 i32.const 152 - i32.const 503 + i32.const 502 i32.const 0 call $~lib/env/abort unreachable @@ -13076,7 +13076,7 @@ if i32.const 0 i32.const 152 - i32.const 512 + i32.const 511 i32.const 0 call $~lib/env/abort unreachable @@ -13092,7 +13092,7 @@ if i32.const 0 i32.const 152 - i32.const 521 + i32.const 520 i32.const 0 call $~lib/env/abort unreachable @@ -13104,7 +13104,7 @@ if i32.const 0 i32.const 152 - i32.const 522 + i32.const 521 i32.const 0 call $~lib/env/abort unreachable @@ -13120,7 +13120,7 @@ if i32.const 0 i32.const 152 - i32.const 525 + i32.const 524 i32.const 0 call $~lib/env/abort unreachable @@ -13148,7 +13148,7 @@ if i32.const 0 i32.const 152 - i32.const 539 + i32.const 538 i32.const 0 call $~lib/env/abort unreachable @@ -13160,7 +13160,7 @@ if i32.const 0 i32.const 152 - i32.const 540 + i32.const 539 i32.const 0 call $~lib/env/abort unreachable @@ -13181,7 +13181,7 @@ if i32.const 0 i32.const 152 - i32.const 565 + i32.const 564 i32.const 0 call $~lib/env/abort unreachable @@ -13223,7 +13223,7 @@ if i32.const 0 i32.const 152 - i32.const 576 + i32.const 575 i32.const 0 call $~lib/env/abort unreachable @@ -13239,7 +13239,7 @@ if i32.const 0 i32.const 152 - i32.const 577 + i32.const 576 i32.const 0 call $~lib/env/abort unreachable @@ -13255,7 +13255,7 @@ if i32.const 0 i32.const 152 - i32.const 586 + i32.const 585 i32.const 0 call $~lib/env/abort unreachable @@ -13267,7 +13267,7 @@ if i32.const 0 i32.const 152 - i32.const 587 + i32.const 586 i32.const 0 call $~lib/env/abort unreachable @@ -13283,7 +13283,7 @@ if i32.const 0 i32.const 152 - i32.const 594 + i32.const 593 i32.const 0 call $~lib/env/abort unreachable @@ -13311,7 +13311,7 @@ if i32.const 0 i32.const 152 - i32.const 609 + i32.const 608 i32.const 0 call $~lib/env/abort unreachable @@ -13323,7 +13323,7 @@ if i32.const 0 i32.const 152 - i32.const 610 + i32.const 609 i32.const 0 call $~lib/env/abort unreachable @@ -13345,7 +13345,7 @@ if i32.const 0 i32.const 152 - i32.const 618 + i32.const 617 i32.const 0 call $~lib/env/abort unreachable @@ -13362,7 +13362,7 @@ if i32.const 0 i32.const 152 - i32.const 627 + i32.const 626 i32.const 0 call $~lib/env/abort unreachable @@ -13374,7 +13374,7 @@ if i32.const 0 i32.const 152 - i32.const 628 + i32.const 627 i32.const 0 call $~lib/env/abort unreachable @@ -13391,7 +13391,7 @@ if i32.const 0 i32.const 152 - i32.const 635 + i32.const 634 i32.const 0 call $~lib/env/abort unreachable @@ -13420,7 +13420,7 @@ if i32.const 0 i32.const 152 - i32.const 650 + i32.const 649 i32.const 0 call $~lib/env/abort unreachable @@ -13432,7 +13432,7 @@ if i32.const 0 i32.const 152 - i32.const 651 + i32.const 650 i32.const 0 call $~lib/env/abort unreachable @@ -13454,7 +13454,7 @@ if i32.const 0 i32.const 152 - i32.const 659 + i32.const 658 i32.const 0 call $~lib/env/abort unreachable @@ -13470,7 +13470,7 @@ if i32.const 0 i32.const 152 - i32.const 663 + i32.const 662 i32.const 0 call $~lib/env/abort unreachable @@ -13488,7 +13488,7 @@ if i32.const 0 i32.const 152 - i32.const 666 + i32.const 665 i32.const 0 call $~lib/env/abort unreachable @@ -13504,7 +13504,7 @@ if i32.const 0 i32.const 152 - i32.const 669 + i32.const 668 i32.const 0 call $~lib/env/abort unreachable @@ -13520,7 +13520,7 @@ if i32.const 0 i32.const 152 - i32.const 677 + i32.const 676 i32.const 0 call $~lib/env/abort unreachable @@ -13532,7 +13532,7 @@ if i32.const 0 i32.const 152 - i32.const 678 + i32.const 677 i32.const 0 call $~lib/env/abort unreachable @@ -13548,7 +13548,7 @@ if i32.const 0 i32.const 152 - i32.const 680 + i32.const 679 i32.const 0 call $~lib/env/abort unreachable @@ -13576,7 +13576,7 @@ if i32.const 0 i32.const 152 - i32.const 693 + i32.const 692 i32.const 0 call $~lib/env/abort unreachable @@ -13588,7 +13588,7 @@ if i32.const 0 i32.const 152 - i32.const 694 + i32.const 693 i32.const 0 call $~lib/env/abort unreachable @@ -13610,7 +13610,7 @@ if i32.const 0 i32.const 152 - i32.const 702 + i32.const 701 i32.const 0 call $~lib/env/abort unreachable @@ -13626,7 +13626,7 @@ if i32.const 0 i32.const 152 - i32.const 706 + i32.const 705 i32.const 0 call $~lib/env/abort unreachable @@ -13644,7 +13644,7 @@ if i32.const 0 i32.const 152 - i32.const 709 + i32.const 708 i32.const 0 call $~lib/env/abort unreachable @@ -13660,7 +13660,7 @@ if i32.const 0 i32.const 152 - i32.const 712 + i32.const 711 i32.const 0 call $~lib/env/abort unreachable @@ -13676,7 +13676,7 @@ if i32.const 0 i32.const 152 - i32.const 720 + i32.const 719 i32.const 0 call $~lib/env/abort unreachable @@ -13688,7 +13688,7 @@ if i32.const 0 i32.const 152 - i32.const 721 + i32.const 720 i32.const 0 call $~lib/env/abort unreachable @@ -13704,7 +13704,7 @@ if i32.const 0 i32.const 152 - i32.const 723 + i32.const 722 i32.const 0 call $~lib/env/abort unreachable @@ -13732,7 +13732,7 @@ if i32.const 0 i32.const 152 - i32.const 736 + i32.const 735 i32.const 0 call $~lib/env/abort unreachable @@ -13742,7 +13742,7 @@ if i32.const 0 i32.const 152 - i32.const 737 + i32.const 736 i32.const 0 call $~lib/env/abort unreachable @@ -13793,7 +13793,7 @@ if i32.const 0 i32.const 152 - i32.const 825 + i32.const 824 i32.const 0 call $~lib/env/abort unreachable @@ -13829,7 +13829,7 @@ if i32.const 0 i32.const 152 - i32.const 829 + i32.const 828 i32.const 0 call $~lib/env/abort unreachable @@ -13867,7 +13867,7 @@ if i32.const 0 i32.const 152 - i32.const 833 + i32.const 832 i32.const 0 call $~lib/env/abort unreachable @@ -13905,7 +13905,7 @@ if i32.const 0 i32.const 152 - i32.const 837 + i32.const 836 i32.const 0 call $~lib/env/abort unreachable @@ -13941,7 +13941,7 @@ if i32.const 0 i32.const 152 - i32.const 857 + i32.const 856 i32.const 0 call $~lib/env/abort unreachable @@ -13960,7 +13960,7 @@ if i32.const 0 i32.const 152 - i32.const 860 + i32.const 859 i32.const 0 call $~lib/env/abort unreachable @@ -13975,7 +13975,7 @@ if i32.const 0 i32.const 152 - i32.const 863 + i32.const 862 i32.const 0 call $~lib/env/abort unreachable @@ -13990,7 +13990,7 @@ if i32.const 0 i32.const 152 - i32.const 866 + i32.const 865 i32.const 0 call $~lib/env/abort unreachable @@ -14005,7 +14005,7 @@ if i32.const 0 i32.const 152 - i32.const 869 + i32.const 868 i32.const 0 call $~lib/env/abort unreachable @@ -14020,7 +14020,7 @@ if i32.const 0 i32.const 152 - i32.const 872 + i32.const 871 i32.const 0 call $~lib/env/abort unreachable @@ -14035,7 +14035,7 @@ if i32.const 0 i32.const 152 - i32.const 875 + i32.const 874 i32.const 0 call $~lib/env/abort unreachable @@ -14081,7 +14081,7 @@ if i32.const 0 i32.const 152 - i32.const 905 + i32.const 904 i32.const 0 call $~lib/env/abort unreachable @@ -14122,7 +14122,7 @@ if i32.const 0 i32.const 152 - i32.const 914 + i32.const 913 i32.const 0 call $~lib/env/abort unreachable @@ -14140,7 +14140,7 @@ if i32.const 0 i32.const 152 - i32.const 915 + i32.const 914 i32.const 0 call $~lib/env/abort unreachable @@ -14158,7 +14158,7 @@ if i32.const 0 i32.const 152 - i32.const 916 + i32.const 915 i32.const 0 call $~lib/env/abort unreachable @@ -14176,7 +14176,7 @@ if i32.const 0 i32.const 152 - i32.const 917 + i32.const 916 i32.const 0 call $~lib/env/abort unreachable @@ -14193,7 +14193,7 @@ if i32.const 0 i32.const 152 - i32.const 918 + i32.const 917 i32.const 0 call $~lib/env/abort unreachable @@ -14211,7 +14211,7 @@ if i32.const 0 i32.const 152 - i32.const 919 + i32.const 918 i32.const 0 call $~lib/env/abort unreachable @@ -14242,7 +14242,7 @@ if i32.const 0 i32.const 152 - i32.const 921 + i32.const 920 i32.const 0 call $~lib/env/abort unreachable @@ -14255,7 +14255,7 @@ if i32.const 0 i32.const 152 - i32.const 925 + i32.const 924 i32.const 0 call $~lib/env/abort unreachable @@ -14268,7 +14268,7 @@ if i32.const 0 i32.const 152 - i32.const 926 + i32.const 925 i32.const 0 call $~lib/env/abort unreachable @@ -14281,7 +14281,7 @@ if i32.const 0 i32.const 152 - i32.const 927 + i32.const 926 i32.const 0 call $~lib/env/abort unreachable @@ -14294,7 +14294,7 @@ if i32.const 0 i32.const 152 - i32.const 928 + i32.const 927 i32.const 0 call $~lib/env/abort unreachable @@ -14311,7 +14311,7 @@ if i32.const 0 i32.const 152 - i32.const 930 + i32.const 929 i32.const 0 call $~lib/env/abort unreachable @@ -14328,7 +14328,7 @@ if i32.const 0 i32.const 152 - i32.const 931 + i32.const 930 i32.const 0 call $~lib/env/abort unreachable @@ -14345,7 +14345,7 @@ if i32.const 0 i32.const 152 - i32.const 932 + i32.const 931 i32.const 0 call $~lib/env/abort unreachable @@ -14362,7 +14362,7 @@ if i32.const 0 i32.const 152 - i32.const 933 + i32.const 932 i32.const 0 call $~lib/env/abort unreachable @@ -14375,7 +14375,7 @@ if i32.const 0 i32.const 152 - i32.const 934 + i32.const 933 i32.const 0 call $~lib/env/abort unreachable @@ -14392,7 +14392,7 @@ if i32.const 0 i32.const 152 - i32.const 935 + i32.const 934 i32.const 0 call $~lib/env/abort unreachable @@ -14428,7 +14428,7 @@ if i32.const 0 i32.const 152 - i32.const 938 + i32.const 937 i32.const 0 call $~lib/env/abort unreachable @@ -14464,7 +14464,7 @@ if i32.const 0 i32.const 152 - i32.const 941 + i32.const 940 i32.const 0 call $~lib/env/abort unreachable @@ -14503,7 +14503,7 @@ if i32.const 0 i32.const 152 - i32.const 944 + i32.const 943 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array.ts b/tests/compiler/std/array.ts index 6306cbefc1..0a6fce0a1f 100644 --- a/tests/compiler/std/array.ts +++ b/tests/compiler/std/array.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import "collector/dummy"; import { Array } from "array"; import { COMPARATOR } from "util/sort"; diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 4d57ccbc26..09f4066510 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -2,10 +2,10 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$fii (func (param i32 i32) (result f32))) @@ -224,10 +224,10 @@ (table $0 102 funcref) (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array/P~iterate $~lib/typedarray/Uint8Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|4 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|18 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|30 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|34 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|38 $start:std/array~anonymous|39 $start:std/array~anonymous|40 $start:std/array~anonymous|41 $start:std/array~anonymous|42 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $start:std/array~anonymous|47 $~lib/array/Array>~iterate $std/array/Proxy~iterate $~lib/array/Array>~iterate $start:std/array~anonymous|48 $~lib/array/Array<~lib/string/String | null>~iterate $~lib/array/Array<~lib/string/String | null>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/array/Array<~lib/string/String>~iterate $~lib/array/Array<~lib/string/String>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array/Ref~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) @@ -690,7 +690,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -707,7 +707,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -785,7 +785,7 @@ if i32.const 0 i32.const 24 - i32.const 232 + i32.const 236 i32.const 57 call $~lib/env/abort unreachable @@ -2920,7 +2920,7 @@ if i32.const 0 i32.const 24 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable @@ -4259,7 +4259,7 @@ if i32.const 0 i32.const 152 - i32.const 562 + i32.const 561 i32.const 4 call $~lib/env/abort unreachable @@ -7522,7 +7522,7 @@ if i32.const 0 i32.const 152 - i32.const 814 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable @@ -8037,7 +8037,7 @@ if i32.const 0 i32.const 152 - i32.const 814 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable @@ -8532,7 +8532,7 @@ if i32.const 0 i32.const 152 - i32.const 814 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable @@ -8847,7 +8847,7 @@ if i32.const 0 i32.const 152 - i32.const 814 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable @@ -9732,7 +9732,7 @@ if i32.const 0 i32.const 152 - i32.const 814 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable @@ -9975,7 +9975,7 @@ if i32.const 0 i32.const 24 - i32.const 173 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -9992,7 +9992,7 @@ if i32.const 0 i32.const 24 - i32.const 175 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -15389,7 +15389,7 @@ if i32.const 0 i32.const 152 - i32.const 40 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -15402,7 +15402,7 @@ if i32.const 0 i32.const 152 - i32.const 41 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable @@ -15416,7 +15416,7 @@ if i32.const 0 i32.const 152 - i32.const 42 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable @@ -15431,7 +15431,7 @@ if i32.const 0 i32.const 152 - i32.const 43 + i32.const 42 i32.const 0 call $~lib/env/abort unreachable @@ -15444,7 +15444,7 @@ if i32.const 0 i32.const 152 - i32.const 44 + i32.const 43 i32.const 0 call $~lib/env/abort unreachable @@ -15457,7 +15457,7 @@ if i32.const 0 i32.const 152 - i32.const 45 + i32.const 44 i32.const 0 call $~lib/env/abort unreachable @@ -15480,7 +15480,7 @@ if i32.const 0 i32.const 152 - i32.const 52 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -15503,7 +15503,7 @@ if i32.const 0 i32.const 152 - i32.const 55 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -15526,7 +15526,7 @@ if i32.const 0 i32.const 152 - i32.const 58 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -15549,7 +15549,7 @@ if i32.const 0 i32.const 152 - i32.const 61 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable @@ -15572,7 +15572,7 @@ if i32.const 0 i32.const 152 - i32.const 64 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -15595,7 +15595,7 @@ if i32.const 0 i32.const 152 - i32.const 69 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable @@ -15618,7 +15618,7 @@ if i32.const 0 i32.const 152 - i32.const 72 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable @@ -15641,7 +15641,7 @@ if i32.const 0 i32.const 152 - i32.const 75 + i32.const 74 i32.const 0 call $~lib/env/abort unreachable @@ -15664,7 +15664,7 @@ if i32.const 0 i32.const 152 - i32.const 78 + i32.const 77 i32.const 0 call $~lib/env/abort unreachable @@ -15687,7 +15687,7 @@ if i32.const 0 i32.const 152 - i32.const 81 + i32.const 80 i32.const 0 call $~lib/env/abort unreachable @@ -15700,7 +15700,7 @@ if i32.const 0 i32.const 152 - i32.const 85 + i32.const 84 i32.const 0 call $~lib/env/abort unreachable @@ -15713,7 +15713,7 @@ if i32.const 0 i32.const 152 - i32.const 86 + i32.const 85 i32.const 0 call $~lib/env/abort unreachable @@ -15731,7 +15731,7 @@ if i32.const 0 i32.const 152 - i32.const 90 + i32.const 89 i32.const 0 call $~lib/env/abort unreachable @@ -15744,7 +15744,7 @@ if i32.const 0 i32.const 152 - i32.const 91 + i32.const 90 i32.const 0 call $~lib/env/abort unreachable @@ -15757,7 +15757,7 @@ if i32.const 0 i32.const 152 - i32.const 92 + i32.const 91 i32.const 0 call $~lib/env/abort unreachable @@ -15772,7 +15772,7 @@ if i32.const 0 i32.const 152 - i32.const 96 + i32.const 95 i32.const 0 call $~lib/env/abort unreachable @@ -15785,7 +15785,7 @@ if i32.const 0 i32.const 152 - i32.const 97 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable @@ -15798,7 +15798,7 @@ if i32.const 0 i32.const 152 - i32.const 98 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -15815,7 +15815,7 @@ if i32.const 0 i32.const 152 - i32.const 102 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable @@ -15828,7 +15828,7 @@ if i32.const 0 i32.const 152 - i32.const 103 + i32.const 102 i32.const 0 call $~lib/env/abort unreachable @@ -15842,7 +15842,7 @@ if i32.const 0 i32.const 152 - i32.const 104 + i32.const 103 i32.const 0 call $~lib/env/abort unreachable @@ -15859,7 +15859,7 @@ if i32.const 0 i32.const 152 - i32.const 108 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable @@ -15872,7 +15872,7 @@ if i32.const 0 i32.const 152 - i32.const 109 + i32.const 108 i32.const 0 call $~lib/env/abort unreachable @@ -15886,7 +15886,7 @@ if i32.const 0 i32.const 152 - i32.const 110 + i32.const 109 i32.const 0 call $~lib/env/abort unreachable @@ -15900,7 +15900,7 @@ if i32.const 0 i32.const 152 - i32.const 111 + i32.const 110 i32.const 0 call $~lib/env/abort unreachable @@ -15917,7 +15917,7 @@ if i32.const 0 i32.const 152 - i32.const 115 + i32.const 114 i32.const 0 call $~lib/env/abort unreachable @@ -15930,7 +15930,7 @@ if i32.const 0 i32.const 152 - i32.const 116 + i32.const 115 i32.const 0 call $~lib/env/abort unreachable @@ -15944,7 +15944,7 @@ if i32.const 0 i32.const 152 - i32.const 117 + i32.const 116 i32.const 0 call $~lib/env/abort unreachable @@ -15958,7 +15958,7 @@ if i32.const 0 i32.const 152 - i32.const 118 + i32.const 117 i32.const 0 call $~lib/env/abort unreachable @@ -15972,7 +15972,7 @@ if i32.const 0 i32.const 152 - i32.const 119 + i32.const 118 i32.const 0 call $~lib/env/abort unreachable @@ -15993,7 +15993,7 @@ if i32.const 0 i32.const 152 - i32.const 126 + i32.const 125 i32.const 0 call $~lib/env/abort unreachable @@ -16006,7 +16006,7 @@ if i32.const 0 i32.const 152 - i32.const 127 + i32.const 126 i32.const 0 call $~lib/env/abort unreachable @@ -16019,7 +16019,7 @@ if i32.const 0 i32.const 152 - i32.const 128 + i32.const 127 i32.const 0 call $~lib/env/abort unreachable @@ -16040,7 +16040,7 @@ if i32.const 0 i32.const 152 - i32.const 131 + i32.const 130 i32.const 0 call $~lib/env/abort unreachable @@ -16054,7 +16054,7 @@ if i32.const 0 i32.const 152 - i32.const 133 + i32.const 132 i32.const 0 call $~lib/env/abort unreachable @@ -16068,7 +16068,7 @@ if i32.const 0 i32.const 152 - i32.const 134 + i32.const 133 i32.const 0 call $~lib/env/abort unreachable @@ -16082,7 +16082,7 @@ if i32.const 0 i32.const 152 - i32.const 135 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -16107,7 +16107,7 @@ if i32.const 0 i32.const 152 - i32.const 142 + i32.const 141 i32.const 0 call $~lib/env/abort unreachable @@ -16120,7 +16120,7 @@ if i32.const 0 i32.const 152 - i32.const 143 + i32.const 142 i32.const 0 call $~lib/env/abort unreachable @@ -16133,7 +16133,7 @@ if i32.const 0 i32.const 152 - i32.const 144 + i32.const 143 i32.const 0 call $~lib/env/abort unreachable @@ -16147,7 +16147,7 @@ if i32.const 0 i32.const 152 - i32.const 145 + i32.const 144 i32.const 0 call $~lib/env/abort unreachable @@ -16161,7 +16161,7 @@ if i32.const 0 i32.const 152 - i32.const 146 + i32.const 145 i32.const 0 call $~lib/env/abort unreachable @@ -16175,7 +16175,7 @@ if i32.const 0 i32.const 152 - i32.const 147 + i32.const 146 i32.const 0 call $~lib/env/abort unreachable @@ -16189,7 +16189,7 @@ if i32.const 0 i32.const 152 - i32.const 148 + i32.const 147 i32.const 0 call $~lib/env/abort unreachable @@ -16203,7 +16203,7 @@ if i32.const 0 i32.const 152 - i32.const 149 + i32.const 148 i32.const 0 call $~lib/env/abort unreachable @@ -16219,7 +16219,7 @@ if i32.const 0 i32.const 152 - i32.const 152 + i32.const 151 i32.const 0 call $~lib/env/abort unreachable @@ -16236,7 +16236,7 @@ if i32.const 0 i32.const 152 - i32.const 155 + i32.const 154 i32.const 0 call $~lib/env/abort unreachable @@ -16250,7 +16250,7 @@ if i32.const 0 i32.const 152 - i32.const 156 + i32.const 155 i32.const 0 call $~lib/env/abort unreachable @@ -16263,7 +16263,7 @@ if i32.const 0 i32.const 152 - i32.const 159 + i32.const 158 i32.const 0 call $~lib/env/abort unreachable @@ -16280,7 +16280,7 @@ if i32.const 0 i32.const 152 - i32.const 161 + i32.const 160 i32.const 0 call $~lib/env/abort unreachable @@ -16293,7 +16293,7 @@ if i32.const 0 i32.const 152 - i32.const 162 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable @@ -16320,7 +16320,7 @@ if i32.const 0 i32.const 152 - i32.const 168 + i32.const 167 i32.const 0 call $~lib/env/abort unreachable @@ -16347,7 +16347,7 @@ if i32.const 0 i32.const 152 - i32.const 170 + i32.const 169 i32.const 0 call $~lib/env/abort unreachable @@ -16374,7 +16374,7 @@ if i32.const 0 i32.const 152 - i32.const 172 + i32.const 171 i32.const 0 call $~lib/env/abort unreachable @@ -16401,7 +16401,7 @@ if i32.const 0 i32.const 152 - i32.const 174 + i32.const 173 i32.const 0 call $~lib/env/abort unreachable @@ -16428,7 +16428,7 @@ if i32.const 0 i32.const 152 - i32.const 176 + i32.const 175 i32.const 0 call $~lib/env/abort unreachable @@ -16455,7 +16455,7 @@ if i32.const 0 i32.const 152 - i32.const 178 + i32.const 177 i32.const 0 call $~lib/env/abort unreachable @@ -16482,7 +16482,7 @@ if i32.const 0 i32.const 152 - i32.const 180 + i32.const 179 i32.const 0 call $~lib/env/abort unreachable @@ -16509,7 +16509,7 @@ if i32.const 0 i32.const 152 - i32.const 182 + i32.const 181 i32.const 0 call $~lib/env/abort unreachable @@ -16536,7 +16536,7 @@ if i32.const 0 i32.const 152 - i32.const 184 + i32.const 183 i32.const 0 call $~lib/env/abort unreachable @@ -16563,7 +16563,7 @@ if i32.const 0 i32.const 152 - i32.const 186 + i32.const 185 i32.const 0 call $~lib/env/abort unreachable @@ -16590,7 +16590,7 @@ if i32.const 0 i32.const 152 - i32.const 188 + i32.const 187 i32.const 0 call $~lib/env/abort unreachable @@ -16617,7 +16617,7 @@ if i32.const 0 i32.const 152 - i32.const 190 + i32.const 189 i32.const 0 call $~lib/env/abort unreachable @@ -16634,7 +16634,7 @@ if i32.const 0 i32.const 152 - i32.const 196 + i32.const 195 i32.const 0 call $~lib/env/abort unreachable @@ -16647,7 +16647,7 @@ if i32.const 0 i32.const 152 - i32.const 197 + i32.const 196 i32.const 0 call $~lib/env/abort unreachable @@ -16661,7 +16661,7 @@ if i32.const 0 i32.const 152 - i32.const 198 + i32.const 197 i32.const 0 call $~lib/env/abort unreachable @@ -16675,7 +16675,7 @@ if i32.const 0 i32.const 152 - i32.const 199 + i32.const 198 i32.const 0 call $~lib/env/abort unreachable @@ -16689,7 +16689,7 @@ if i32.const 0 i32.const 152 - i32.const 200 + i32.const 199 i32.const 0 call $~lib/env/abort unreachable @@ -16703,7 +16703,7 @@ if i32.const 0 i32.const 152 - i32.const 201 + i32.const 200 i32.const 0 call $~lib/env/abort unreachable @@ -16720,7 +16720,7 @@ if i32.const 0 i32.const 152 - i32.const 205 + i32.const 204 i32.const 0 call $~lib/env/abort unreachable @@ -16733,7 +16733,7 @@ if i32.const 0 i32.const 152 - i32.const 206 + i32.const 205 i32.const 0 call $~lib/env/abort unreachable @@ -16747,7 +16747,7 @@ if i32.const 0 i32.const 152 - i32.const 207 + i32.const 206 i32.const 0 call $~lib/env/abort unreachable @@ -16761,7 +16761,7 @@ if i32.const 0 i32.const 152 - i32.const 208 + i32.const 207 i32.const 0 call $~lib/env/abort unreachable @@ -16775,7 +16775,7 @@ if i32.const 0 i32.const 152 - i32.const 209 + i32.const 208 i32.const 0 call $~lib/env/abort unreachable @@ -16789,7 +16789,7 @@ if i32.const 0 i32.const 152 - i32.const 210 + i32.const 209 i32.const 0 call $~lib/env/abort unreachable @@ -16803,7 +16803,7 @@ if i32.const 0 i32.const 152 - i32.const 211 + i32.const 210 i32.const 0 call $~lib/env/abort unreachable @@ -16818,7 +16818,7 @@ if i32.const 0 i32.const 152 - i32.const 217 + i32.const 216 i32.const 0 call $~lib/env/abort unreachable @@ -16831,7 +16831,7 @@ if i32.const 0 i32.const 152 - i32.const 218 + i32.const 217 i32.const 0 call $~lib/env/abort unreachable @@ -16844,7 +16844,7 @@ if i32.const 0 i32.const 152 - i32.const 219 + i32.const 218 i32.const 0 call $~lib/env/abort unreachable @@ -16858,7 +16858,7 @@ if i32.const 0 i32.const 152 - i32.const 220 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -16872,7 +16872,7 @@ if i32.const 0 i32.const 152 - i32.const 221 + i32.const 220 i32.const 0 call $~lib/env/abort unreachable @@ -16886,7 +16886,7 @@ if i32.const 0 i32.const 152 - i32.const 222 + i32.const 221 i32.const 0 call $~lib/env/abort unreachable @@ -16900,7 +16900,7 @@ if i32.const 0 i32.const 152 - i32.const 223 + i32.const 222 i32.const 0 call $~lib/env/abort unreachable @@ -16915,7 +16915,7 @@ if i32.const 0 i32.const 152 - i32.const 227 + i32.const 226 i32.const 0 call $~lib/env/abort unreachable @@ -16928,7 +16928,7 @@ if i32.const 0 i32.const 152 - i32.const 228 + i32.const 227 i32.const 0 call $~lib/env/abort unreachable @@ -16941,7 +16941,7 @@ if i32.const 0 i32.const 152 - i32.const 229 + i32.const 228 i32.const 0 call $~lib/env/abort unreachable @@ -16955,7 +16955,7 @@ if i32.const 0 i32.const 152 - i32.const 230 + i32.const 229 i32.const 0 call $~lib/env/abort unreachable @@ -16969,7 +16969,7 @@ if i32.const 0 i32.const 152 - i32.const 231 + i32.const 230 i32.const 0 call $~lib/env/abort unreachable @@ -16983,7 +16983,7 @@ if i32.const 0 i32.const 152 - i32.const 232 + i32.const 231 i32.const 0 call $~lib/env/abort unreachable @@ -16999,7 +16999,7 @@ if i32.const 0 i32.const 152 - i32.const 238 + i32.const 237 i32.const 0 call $~lib/env/abort unreachable @@ -17012,7 +17012,7 @@ if i32.const 0 i32.const 152 - i32.const 239 + i32.const 238 i32.const 0 call $~lib/env/abort unreachable @@ -17026,7 +17026,7 @@ if i32.const 0 i32.const 152 - i32.const 240 + i32.const 239 i32.const 0 call $~lib/env/abort unreachable @@ -17040,7 +17040,7 @@ if i32.const 0 i32.const 152 - i32.const 241 + i32.const 240 i32.const 0 call $~lib/env/abort unreachable @@ -17054,7 +17054,7 @@ if i32.const 0 i32.const 152 - i32.const 242 + i32.const 241 i32.const 0 call $~lib/env/abort unreachable @@ -17079,7 +17079,7 @@ if i32.const 0 i32.const 152 - i32.const 251 + i32.const 250 i32.const 0 call $~lib/env/abort unreachable @@ -17096,7 +17096,7 @@ if i32.const 0 i32.const 152 - i32.const 255 + i32.const 254 i32.const 0 call $~lib/env/abort unreachable @@ -17113,7 +17113,7 @@ if i32.const 0 i32.const 152 - i32.const 259 + i32.const 258 i32.const 0 call $~lib/env/abort unreachable @@ -17130,7 +17130,7 @@ if i32.const 0 i32.const 152 - i32.const 263 + i32.const 262 i32.const 0 call $~lib/env/abort unreachable @@ -17147,7 +17147,7 @@ if i32.const 0 i32.const 152 - i32.const 267 + i32.const 266 i32.const 0 call $~lib/env/abort unreachable @@ -17164,7 +17164,7 @@ if i32.const 0 i32.const 152 - i32.const 271 + i32.const 270 i32.const 0 call $~lib/env/abort unreachable @@ -17181,7 +17181,7 @@ if i32.const 0 i32.const 152 - i32.const 275 + i32.const 274 i32.const 0 call $~lib/env/abort unreachable @@ -17198,7 +17198,7 @@ if i32.const 0 i32.const 152 - i32.const 279 + i32.const 278 i32.const 0 call $~lib/env/abort unreachable @@ -17215,7 +17215,7 @@ if i32.const 0 i32.const 152 - i32.const 283 + i32.const 282 i32.const 0 call $~lib/env/abort unreachable @@ -17232,7 +17232,7 @@ if i32.const 0 i32.const 152 - i32.const 287 + i32.const 286 i32.const 0 call $~lib/env/abort unreachable @@ -17249,7 +17249,7 @@ if i32.const 0 i32.const 152 - i32.const 293 + i32.const 292 i32.const 0 call $~lib/env/abort unreachable @@ -17266,7 +17266,7 @@ if i32.const 0 i32.const 152 - i32.const 297 + i32.const 296 i32.const 0 call $~lib/env/abort unreachable @@ -17283,7 +17283,7 @@ if i32.const 0 i32.const 152 - i32.const 301 + i32.const 300 i32.const 0 call $~lib/env/abort unreachable @@ -17300,7 +17300,7 @@ if i32.const 0 i32.const 152 - i32.const 305 + i32.const 304 i32.const 0 call $~lib/env/abort unreachable @@ -17317,7 +17317,7 @@ if i32.const 0 i32.const 152 - i32.const 309 + i32.const 308 i32.const 0 call $~lib/env/abort unreachable @@ -17334,7 +17334,7 @@ if i32.const 0 i32.const 152 - i32.const 313 + i32.const 312 i32.const 0 call $~lib/env/abort unreachable @@ -17351,7 +17351,7 @@ if i32.const 0 i32.const 152 - i32.const 317 + i32.const 316 i32.const 0 call $~lib/env/abort unreachable @@ -17368,7 +17368,7 @@ if i32.const 0 i32.const 152 - i32.const 321 + i32.const 320 i32.const 0 call $~lib/env/abort unreachable @@ -17385,7 +17385,7 @@ if i32.const 0 i32.const 152 - i32.const 325 + i32.const 324 i32.const 0 call $~lib/env/abort unreachable @@ -17402,7 +17402,7 @@ if i32.const 0 i32.const 152 - i32.const 329 + i32.const 328 i32.const 0 call $~lib/env/abort unreachable @@ -17420,7 +17420,7 @@ if i32.const 0 i32.const 152 - i32.const 333 + i32.const 332 i32.const 0 call $~lib/env/abort unreachable @@ -17433,7 +17433,7 @@ if i32.const 0 i32.const 152 - i32.const 334 + i32.const 333 i32.const 0 call $~lib/env/abort unreachable @@ -17447,7 +17447,7 @@ if i32.const 0 i32.const 152 - i32.const 335 + i32.const 334 i32.const 0 call $~lib/env/abort unreachable @@ -17461,7 +17461,7 @@ if i32.const 0 i32.const 152 - i32.const 336 + i32.const 335 i32.const 0 call $~lib/env/abort unreachable @@ -17481,7 +17481,7 @@ if i32.const 0 i32.const 152 - i32.const 341 + i32.const 340 i32.const 0 call $~lib/env/abort unreachable @@ -17498,7 +17498,7 @@ if i32.const 0 i32.const 152 - i32.const 342 + i32.const 341 i32.const 0 call $~lib/env/abort unreachable @@ -17524,7 +17524,7 @@ if i32.const 0 i32.const 152 - i32.const 345 + i32.const 344 i32.const 0 call $~lib/env/abort unreachable @@ -17541,7 +17541,7 @@ if i32.const 0 i32.const 152 - i32.const 346 + i32.const 345 i32.const 0 call $~lib/env/abort unreachable @@ -17567,7 +17567,7 @@ if i32.const 0 i32.const 152 - i32.const 349 + i32.const 348 i32.const 0 call $~lib/env/abort unreachable @@ -17584,7 +17584,7 @@ if i32.const 0 i32.const 152 - i32.const 350 + i32.const 349 i32.const 0 call $~lib/env/abort unreachable @@ -17610,7 +17610,7 @@ if i32.const 0 i32.const 152 - i32.const 353 + i32.const 352 i32.const 0 call $~lib/env/abort unreachable @@ -17627,7 +17627,7 @@ if i32.const 0 i32.const 152 - i32.const 354 + i32.const 353 i32.const 0 call $~lib/env/abort unreachable @@ -17653,7 +17653,7 @@ if i32.const 0 i32.const 152 - i32.const 357 + i32.const 356 i32.const 0 call $~lib/env/abort unreachable @@ -17670,7 +17670,7 @@ if i32.const 0 i32.const 152 - i32.const 358 + i32.const 357 i32.const 0 call $~lib/env/abort unreachable @@ -17696,7 +17696,7 @@ if i32.const 0 i32.const 152 - i32.const 361 + i32.const 360 i32.const 0 call $~lib/env/abort unreachable @@ -17713,7 +17713,7 @@ if i32.const 0 i32.const 152 - i32.const 362 + i32.const 361 i32.const 0 call $~lib/env/abort unreachable @@ -17739,7 +17739,7 @@ if i32.const 0 i32.const 152 - i32.const 365 + i32.const 364 i32.const 0 call $~lib/env/abort unreachable @@ -17756,7 +17756,7 @@ if i32.const 0 i32.const 152 - i32.const 366 + i32.const 365 i32.const 0 call $~lib/env/abort unreachable @@ -17782,7 +17782,7 @@ if i32.const 0 i32.const 152 - i32.const 369 + i32.const 368 i32.const 0 call $~lib/env/abort unreachable @@ -17799,7 +17799,7 @@ if i32.const 0 i32.const 152 - i32.const 370 + i32.const 369 i32.const 0 call $~lib/env/abort unreachable @@ -17825,7 +17825,7 @@ if i32.const 0 i32.const 152 - i32.const 373 + i32.const 372 i32.const 0 call $~lib/env/abort unreachable @@ -17842,7 +17842,7 @@ if i32.const 0 i32.const 152 - i32.const 374 + i32.const 373 i32.const 0 call $~lib/env/abort unreachable @@ -17868,7 +17868,7 @@ if i32.const 0 i32.const 152 - i32.const 377 + i32.const 376 i32.const 0 call $~lib/env/abort unreachable @@ -17885,7 +17885,7 @@ if i32.const 0 i32.const 152 - i32.const 378 + i32.const 377 i32.const 0 call $~lib/env/abort unreachable @@ -17911,7 +17911,7 @@ if i32.const 0 i32.const 152 - i32.const 381 + i32.const 380 i32.const 0 call $~lib/env/abort unreachable @@ -17928,7 +17928,7 @@ if i32.const 0 i32.const 152 - i32.const 382 + i32.const 381 i32.const 0 call $~lib/env/abort unreachable @@ -17954,7 +17954,7 @@ if i32.const 0 i32.const 152 - i32.const 385 + i32.const 384 i32.const 0 call $~lib/env/abort unreachable @@ -17971,7 +17971,7 @@ if i32.const 0 i32.const 152 - i32.const 386 + i32.const 385 i32.const 0 call $~lib/env/abort unreachable @@ -17997,7 +17997,7 @@ if i32.const 0 i32.const 152 - i32.const 389 + i32.const 388 i32.const 0 call $~lib/env/abort unreachable @@ -18014,7 +18014,7 @@ if i32.const 0 i32.const 152 - i32.const 390 + i32.const 389 i32.const 0 call $~lib/env/abort unreachable @@ -18046,7 +18046,7 @@ if i32.const 0 i32.const 152 - i32.const 400 + i32.const 399 i32.const 0 call $~lib/env/abort unreachable @@ -18062,7 +18062,7 @@ if i32.const 0 i32.const 152 - i32.const 403 + i32.const 402 i32.const 0 call $~lib/env/abort unreachable @@ -18078,7 +18078,7 @@ if i32.const 0 i32.const 152 - i32.const 406 + i32.const 405 i32.const 0 call $~lib/env/abort unreachable @@ -18094,7 +18094,7 @@ if i32.const 0 i32.const 152 - i32.const 414 + i32.const 413 i32.const 0 call $~lib/env/abort unreachable @@ -18107,7 +18107,7 @@ if i32.const 0 i32.const 152 - i32.const 415 + i32.const 414 i32.const 0 call $~lib/env/abort unreachable @@ -18123,7 +18123,7 @@ if i32.const 0 i32.const 152 - i32.const 417 + i32.const 416 i32.const 0 call $~lib/env/abort unreachable @@ -18151,7 +18151,7 @@ if i32.const 0 i32.const 152 - i32.const 430 + i32.const 429 i32.const 0 call $~lib/env/abort unreachable @@ -18164,7 +18164,7 @@ if i32.const 0 i32.const 152 - i32.const 431 + i32.const 430 i32.const 0 call $~lib/env/abort unreachable @@ -18188,7 +18188,7 @@ if i32.const 0 i32.const 152 - i32.const 439 + i32.const 438 i32.const 0 call $~lib/env/abort unreachable @@ -18204,7 +18204,7 @@ if i32.const 0 i32.const 152 - i32.const 442 + i32.const 441 i32.const 0 call $~lib/env/abort unreachable @@ -18220,7 +18220,7 @@ if i32.const 0 i32.const 152 - i32.const 450 + i32.const 449 i32.const 0 call $~lib/env/abort unreachable @@ -18233,7 +18233,7 @@ if i32.const 0 i32.const 152 - i32.const 451 + i32.const 450 i32.const 0 call $~lib/env/abort unreachable @@ -18249,7 +18249,7 @@ if i32.const 0 i32.const 152 - i32.const 453 + i32.const 452 i32.const 0 call $~lib/env/abort unreachable @@ -18277,7 +18277,7 @@ if i32.const 0 i32.const 152 - i32.const 466 + i32.const 465 i32.const 0 call $~lib/env/abort unreachable @@ -18290,7 +18290,7 @@ if i32.const 0 i32.const 152 - i32.const 467 + i32.const 466 i32.const 0 call $~lib/env/abort unreachable @@ -18314,7 +18314,7 @@ if i32.const 0 i32.const 152 - i32.const 475 + i32.const 474 i32.const 0 call $~lib/env/abort unreachable @@ -18330,7 +18330,7 @@ if i32.const 0 i32.const 152 - i32.const 478 + i32.const 477 i32.const 0 call $~lib/env/abort unreachable @@ -18346,7 +18346,7 @@ if i32.const 0 i32.const 152 - i32.const 486 + i32.const 485 i32.const 0 call $~lib/env/abort unreachable @@ -18359,7 +18359,7 @@ if i32.const 0 i32.const 152 - i32.const 487 + i32.const 486 i32.const 0 call $~lib/env/abort unreachable @@ -18375,7 +18375,7 @@ if i32.const 0 i32.const 152 - i32.const 489 + i32.const 488 i32.const 0 call $~lib/env/abort unreachable @@ -18403,7 +18403,7 @@ if i32.const 0 i32.const 152 - i32.const 502 + i32.const 501 i32.const 0 call $~lib/env/abort unreachable @@ -18416,7 +18416,7 @@ if i32.const 0 i32.const 152 - i32.const 503 + i32.const 502 i32.const 0 call $~lib/env/abort unreachable @@ -18441,7 +18441,7 @@ if i32.const 0 i32.const 152 - i32.const 512 + i32.const 511 i32.const 0 call $~lib/env/abort unreachable @@ -18458,7 +18458,7 @@ if i32.const 0 i32.const 152 - i32.const 521 + i32.const 520 i32.const 0 call $~lib/env/abort unreachable @@ -18471,7 +18471,7 @@ if i32.const 0 i32.const 152 - i32.const 522 + i32.const 521 i32.const 0 call $~lib/env/abort unreachable @@ -18488,7 +18488,7 @@ if i32.const 0 i32.const 152 - i32.const 525 + i32.const 524 i32.const 0 call $~lib/env/abort unreachable @@ -18517,7 +18517,7 @@ if i32.const 0 i32.const 152 - i32.const 539 + i32.const 538 i32.const 0 call $~lib/env/abort unreachable @@ -18530,7 +18530,7 @@ if i32.const 0 i32.const 152 - i32.const 540 + i32.const 539 i32.const 0 call $~lib/env/abort unreachable @@ -18554,7 +18554,7 @@ if i32.const 0 i32.const 152 - i32.const 565 + i32.const 564 i32.const 0 call $~lib/env/abort unreachable @@ -18608,7 +18608,7 @@ if i32.const 0 i32.const 152 - i32.const 576 + i32.const 575 i32.const 0 call $~lib/env/abort unreachable @@ -18625,7 +18625,7 @@ if i32.const 0 i32.const 152 - i32.const 577 + i32.const 576 i32.const 0 call $~lib/env/abort unreachable @@ -18643,7 +18643,7 @@ if i32.const 0 i32.const 152 - i32.const 586 + i32.const 585 i32.const 0 call $~lib/env/abort unreachable @@ -18656,7 +18656,7 @@ if i32.const 0 i32.const 152 - i32.const 587 + i32.const 586 i32.const 0 call $~lib/env/abort unreachable @@ -18674,7 +18674,7 @@ if i32.const 0 i32.const 152 - i32.const 594 + i32.const 593 i32.const 0 call $~lib/env/abort unreachable @@ -18704,7 +18704,7 @@ if i32.const 0 i32.const 152 - i32.const 609 + i32.const 608 i32.const 0 call $~lib/env/abort unreachable @@ -18717,7 +18717,7 @@ if i32.const 0 i32.const 152 - i32.const 610 + i32.const 609 i32.const 0 call $~lib/env/abort unreachable @@ -18742,7 +18742,7 @@ if i32.const 0 i32.const 152 - i32.const 618 + i32.const 617 i32.const 0 call $~lib/env/abort unreachable @@ -18760,7 +18760,7 @@ if i32.const 0 i32.const 152 - i32.const 627 + i32.const 626 i32.const 0 call $~lib/env/abort unreachable @@ -18773,7 +18773,7 @@ if i32.const 0 i32.const 152 - i32.const 628 + i32.const 627 i32.const 0 call $~lib/env/abort unreachable @@ -18791,7 +18791,7 @@ if i32.const 0 i32.const 152 - i32.const 635 + i32.const 634 i32.const 0 call $~lib/env/abort unreachable @@ -18821,7 +18821,7 @@ if i32.const 0 i32.const 152 - i32.const 650 + i32.const 649 i32.const 0 call $~lib/env/abort unreachable @@ -18834,7 +18834,7 @@ if i32.const 0 i32.const 152 - i32.const 651 + i32.const 650 i32.const 0 call $~lib/env/abort unreachable @@ -18859,7 +18859,7 @@ if i32.const 0 i32.const 152 - i32.const 659 + i32.const 658 i32.const 0 call $~lib/env/abort unreachable @@ -18876,7 +18876,7 @@ if i32.const 0 i32.const 152 - i32.const 663 + i32.const 662 i32.const 0 call $~lib/env/abort unreachable @@ -18895,7 +18895,7 @@ if i32.const 0 i32.const 152 - i32.const 666 + i32.const 665 i32.const 0 call $~lib/env/abort unreachable @@ -18914,7 +18914,7 @@ if i32.const 0 i32.const 152 - i32.const 669 + i32.const 668 i32.const 0 call $~lib/env/abort unreachable @@ -18931,7 +18931,7 @@ if i32.const 0 i32.const 152 - i32.const 677 + i32.const 676 i32.const 0 call $~lib/env/abort unreachable @@ -18944,7 +18944,7 @@ if i32.const 0 i32.const 152 - i32.const 678 + i32.const 677 i32.const 0 call $~lib/env/abort unreachable @@ -18961,7 +18961,7 @@ if i32.const 0 i32.const 152 - i32.const 680 + i32.const 679 i32.const 0 call $~lib/env/abort unreachable @@ -18990,7 +18990,7 @@ if i32.const 0 i32.const 152 - i32.const 693 + i32.const 692 i32.const 0 call $~lib/env/abort unreachable @@ -19003,7 +19003,7 @@ if i32.const 0 i32.const 152 - i32.const 694 + i32.const 693 i32.const 0 call $~lib/env/abort unreachable @@ -19028,7 +19028,7 @@ if i32.const 0 i32.const 152 - i32.const 702 + i32.const 701 i32.const 0 call $~lib/env/abort unreachable @@ -19045,7 +19045,7 @@ if i32.const 0 i32.const 152 - i32.const 706 + i32.const 705 i32.const 0 call $~lib/env/abort unreachable @@ -19064,7 +19064,7 @@ if i32.const 0 i32.const 152 - i32.const 709 + i32.const 708 i32.const 0 call $~lib/env/abort unreachable @@ -19083,7 +19083,7 @@ if i32.const 0 i32.const 152 - i32.const 712 + i32.const 711 i32.const 0 call $~lib/env/abort unreachable @@ -19100,7 +19100,7 @@ if i32.const 0 i32.const 152 - i32.const 720 + i32.const 719 i32.const 0 call $~lib/env/abort unreachable @@ -19113,7 +19113,7 @@ if i32.const 0 i32.const 152 - i32.const 721 + i32.const 720 i32.const 0 call $~lib/env/abort unreachable @@ -19130,7 +19130,7 @@ if i32.const 0 i32.const 152 - i32.const 723 + i32.const 722 i32.const 0 call $~lib/env/abort unreachable @@ -19159,7 +19159,7 @@ if i32.const 0 i32.const 152 - i32.const 736 + i32.const 735 i32.const 0 call $~lib/env/abort unreachable @@ -19172,7 +19172,7 @@ if i32.const 0 i32.const 152 - i32.const 737 + i32.const 736 i32.const 0 call $~lib/env/abort unreachable @@ -19216,7 +19216,7 @@ if i32.const 0 i32.const 152 - i32.const 825 + i32.const 824 i32.const 0 call $~lib/env/abort unreachable @@ -19241,7 +19241,7 @@ if i32.const 0 i32.const 152 - i32.const 829 + i32.const 828 i32.const 0 call $~lib/env/abort unreachable @@ -19266,7 +19266,7 @@ if i32.const 0 i32.const 152 - i32.const 833 + i32.const 832 i32.const 0 call $~lib/env/abort unreachable @@ -19291,7 +19291,7 @@ if i32.const 0 i32.const 152 - i32.const 837 + i32.const 836 i32.const 0 call $~lib/env/abort unreachable @@ -19327,7 +19327,7 @@ if i32.const 0 i32.const 152 - i32.const 857 + i32.const 856 i32.const 0 call $~lib/env/abort unreachable @@ -19346,7 +19346,7 @@ if i32.const 0 i32.const 152 - i32.const 860 + i32.const 859 i32.const 0 call $~lib/env/abort unreachable @@ -19361,7 +19361,7 @@ if i32.const 0 i32.const 152 - i32.const 863 + i32.const 862 i32.const 0 call $~lib/env/abort unreachable @@ -19376,7 +19376,7 @@ if i32.const 0 i32.const 152 - i32.const 866 + i32.const 865 i32.const 0 call $~lib/env/abort unreachable @@ -19391,7 +19391,7 @@ if i32.const 0 i32.const 152 - i32.const 869 + i32.const 868 i32.const 0 call $~lib/env/abort unreachable @@ -19406,7 +19406,7 @@ if i32.const 0 i32.const 152 - i32.const 872 + i32.const 871 i32.const 0 call $~lib/env/abort unreachable @@ -19421,7 +19421,7 @@ if i32.const 0 i32.const 152 - i32.const 875 + i32.const 874 i32.const 0 call $~lib/env/abort unreachable @@ -19473,7 +19473,7 @@ if i32.const 0 i32.const 152 - i32.const 905 + i32.const 904 i32.const 0 call $~lib/env/abort unreachable @@ -19501,7 +19501,7 @@ if i32.const 0 i32.const 152 - i32.const 914 + i32.const 913 i32.const 0 call $~lib/env/abort unreachable @@ -19519,7 +19519,7 @@ if i32.const 0 i32.const 152 - i32.const 915 + i32.const 914 i32.const 0 call $~lib/env/abort unreachable @@ -19537,7 +19537,7 @@ if i32.const 0 i32.const 152 - i32.const 916 + i32.const 915 i32.const 0 call $~lib/env/abort unreachable @@ -19555,7 +19555,7 @@ if i32.const 0 i32.const 152 - i32.const 917 + i32.const 916 i32.const 0 call $~lib/env/abort unreachable @@ -19573,7 +19573,7 @@ if i32.const 0 i32.const 152 - i32.const 918 + i32.const 917 i32.const 0 call $~lib/env/abort unreachable @@ -19591,7 +19591,7 @@ if i32.const 0 i32.const 152 - i32.const 919 + i32.const 918 i32.const 0 call $~lib/env/abort unreachable @@ -19659,7 +19659,7 @@ if i32.const 0 i32.const 152 - i32.const 921 + i32.const 920 i32.const 0 call $~lib/env/abort unreachable @@ -19672,7 +19672,7 @@ if i32.const 0 i32.const 152 - i32.const 925 + i32.const 924 i32.const 0 call $~lib/env/abort unreachable @@ -19685,7 +19685,7 @@ if i32.const 0 i32.const 152 - i32.const 926 + i32.const 925 i32.const 0 call $~lib/env/abort unreachable @@ -19698,7 +19698,7 @@ if i32.const 0 i32.const 152 - i32.const 927 + i32.const 926 i32.const 0 call $~lib/env/abort unreachable @@ -19711,7 +19711,7 @@ if i32.const 0 i32.const 152 - i32.const 928 + i32.const 927 i32.const 0 call $~lib/env/abort unreachable @@ -19728,7 +19728,7 @@ if i32.const 0 i32.const 152 - i32.const 930 + i32.const 929 i32.const 0 call $~lib/env/abort unreachable @@ -19745,7 +19745,7 @@ if i32.const 0 i32.const 152 - i32.const 931 + i32.const 930 i32.const 0 call $~lib/env/abort unreachable @@ -19762,7 +19762,7 @@ if i32.const 0 i32.const 152 - i32.const 932 + i32.const 931 i32.const 0 call $~lib/env/abort unreachable @@ -19779,7 +19779,7 @@ if i32.const 0 i32.const 152 - i32.const 933 + i32.const 932 i32.const 0 call $~lib/env/abort unreachable @@ -19792,7 +19792,7 @@ if i32.const 0 i32.const 152 - i32.const 934 + i32.const 933 i32.const 0 call $~lib/env/abort unreachable @@ -19809,7 +19809,7 @@ if i32.const 0 i32.const 152 - i32.const 935 + i32.const 934 i32.const 0 call $~lib/env/abort unreachable @@ -19863,7 +19863,7 @@ if i32.const 0 i32.const 152 - i32.const 938 + i32.const 937 i32.const 0 call $~lib/env/abort unreachable @@ -19917,7 +19917,7 @@ if i32.const 0 i32.const 152 - i32.const 941 + i32.const 940 i32.const 0 call $~lib/env/abort unreachable @@ -19978,7 +19978,7 @@ if i32.const 0 i32.const 152 - i32.const 944 + i32.const 943 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/arraybuffer.json b/tests/compiler/std/arraybuffer.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/std/arraybuffer.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index cedf97f5dc..675968f8da 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -326,7 +326,7 @@ if i32.const 0 i32.const 64 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -341,7 +341,7 @@ if i32.const 0 i32.const 64 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1494,7 +1494,7 @@ if i32.const 0 i32.const 64 - i32.const 232 + i32.const 236 i32.const 57 call $~lib/env/abort unreachable @@ -1629,7 +1629,7 @@ if i32.const 0 i32.const 104 - i32.const 5 + i32.const 3 i32.const 0 call $~lib/env/abort unreachable @@ -1648,7 +1648,7 @@ if i32.const 0 i32.const 104 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -1659,7 +1659,7 @@ if i32.const 0 i32.const 104 - i32.const 10 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -1678,7 +1678,7 @@ if i32.const 0 i32.const 104 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -1697,7 +1697,7 @@ if i32.const 0 i32.const 104 - i32.const 18 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -1716,7 +1716,7 @@ if i32.const 0 i32.const 104 - i32.const 22 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -1735,7 +1735,7 @@ if i32.const 0 i32.const 104 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -1754,7 +1754,7 @@ if i32.const 0 i32.const 104 - i32.const 30 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -1773,7 +1773,7 @@ if i32.const 0 i32.const 104 - i32.const 34 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -1790,7 +1790,7 @@ if i32.const 0 i32.const 104 - i32.const 38 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -1800,7 +1800,7 @@ if i32.const 0 i32.const 104 - i32.const 39 + i32.const 37 i32.const 0 call $~lib/env/abort unreachable @@ -1824,7 +1824,7 @@ if i32.const 0 i32.const 104 - i32.const 49 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -1845,7 +1845,7 @@ if i32.const 0 i32.const 104 - i32.const 50 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -1863,7 +1863,7 @@ if i32.const 0 i32.const 104 - i32.const 51 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/arraybuffer.ts b/tests/compiler/std/arraybuffer.ts index 5923211990..77b5b8b833 100644 --- a/tests/compiler/std/arraybuffer.ts +++ b/tests/compiler/std/arraybuffer.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - var buffer = new ArrayBuffer(8); assert(buffer.byteLength == 8); diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 121f179a74..8b21d815c0 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -16,10 +16,10 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/arraybuffer/buffer (mut i32) (i32.const 0)) (global $std/arraybuffer/sliced (mut i32) (i32.const 0)) @@ -407,7 +407,7 @@ if i32.const 0 i32.const 64 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -424,7 +424,7 @@ if i32.const 0 i32.const 64 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -2044,7 +2044,7 @@ if i32.const 0 i32.const 64 - i32.const 232 + i32.const 236 i32.const 57 call $~lib/env/abort unreachable @@ -2252,7 +2252,7 @@ if i32.const 0 i32.const 104 - i32.const 5 + i32.const 3 i32.const 0 call $~lib/env/abort unreachable @@ -2270,7 +2270,7 @@ if i32.const 0 i32.const 104 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -2282,7 +2282,7 @@ if i32.const 0 i32.const 104 - i32.const 10 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -2300,7 +2300,7 @@ if i32.const 0 i32.const 104 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -2318,7 +2318,7 @@ if i32.const 0 i32.const 104 - i32.const 18 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -2336,7 +2336,7 @@ if i32.const 0 i32.const 104 - i32.const 22 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -2354,7 +2354,7 @@ if i32.const 0 i32.const 104 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -2372,7 +2372,7 @@ if i32.const 0 i32.const 104 - i32.const 30 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -2390,7 +2390,7 @@ if i32.const 0 i32.const 104 - i32.const 34 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -2408,7 +2408,7 @@ if i32.const 0 i32.const 104 - i32.const 38 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -2420,7 +2420,7 @@ if i32.const 0 i32.const 104 - i32.const 39 + i32.const 37 i32.const 0 call $~lib/env/abort unreachable @@ -2432,7 +2432,7 @@ if i32.const 0 i32.const 104 - i32.const 41 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -2444,7 +2444,7 @@ if i32.const 0 i32.const 104 - i32.const 42 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable @@ -2456,7 +2456,7 @@ if i32.const 0 i32.const 104 - i32.const 43 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable @@ -2468,7 +2468,7 @@ if i32.const 0 i32.const 104 - i32.const 44 + i32.const 42 i32.const 0 call $~lib/env/abort unreachable @@ -2480,7 +2480,7 @@ if i32.const 0 i32.const 104 - i32.const 45 + i32.const 43 i32.const 0 call $~lib/env/abort unreachable @@ -2500,7 +2500,7 @@ if i32.const 0 i32.const 104 - i32.const 48 + i32.const 46 i32.const 0 call $~lib/env/abort unreachable @@ -2511,7 +2511,7 @@ if i32.const 0 i32.const 104 - i32.const 49 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -2524,7 +2524,7 @@ if i32.const 0 i32.const 104 - i32.const 50 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -2540,7 +2540,7 @@ if i32.const 0 i32.const 104 - i32.const 51 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/dataview.json b/tests/compiler/std/dataview.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/std/dataview.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 21c380cd7d..e6e004fb89 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -164,7 +164,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -179,7 +179,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1021,7 +1021,7 @@ if i32.const 0 i32.const 192 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -1035,7 +1035,7 @@ if i32.const 0 i32.const 192 - i32.const 17 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -1049,7 +1049,7 @@ if i32.const 0 i32.const 192 - i32.const 18 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -1063,7 +1063,7 @@ if i32.const 0 i32.const 192 - i32.const 19 + i32.const 17 i32.const 0 call $~lib/env/abort unreachable @@ -1077,7 +1077,7 @@ if i32.const 0 i32.const 192 - i32.const 20 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -1091,7 +1091,7 @@ if i32.const 0 i32.const 192 - i32.const 22 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -1105,7 +1105,7 @@ if i32.const 0 i32.const 192 - i32.const 23 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -1119,7 +1119,7 @@ if i32.const 0 i32.const 192 - i32.const 24 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -1133,7 +1133,7 @@ if i32.const 0 i32.const 192 - i32.const 25 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -1147,7 +1147,7 @@ if i32.const 0 i32.const 192 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -1160,7 +1160,7 @@ if i32.const 0 i32.const 192 - i32.const 28 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -1173,7 +1173,7 @@ if i32.const 0 i32.const 192 - i32.const 29 + i32.const 27 i32.const 0 call $~lib/env/abort unreachable @@ -1186,7 +1186,7 @@ if i32.const 0 i32.const 192 - i32.const 31 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable @@ -1199,7 +1199,7 @@ if i32.const 0 i32.const 192 - i32.const 32 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -1212,7 +1212,7 @@ if i32.const 0 i32.const 192 - i32.const 33 + i32.const 31 i32.const 0 call $~lib/env/abort unreachable @@ -1225,7 +1225,7 @@ if i32.const 0 i32.const 192 - i32.const 34 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -1238,7 +1238,7 @@ if i32.const 0 i32.const 192 - i32.const 35 + i32.const 33 i32.const 0 call $~lib/env/abort unreachable @@ -1251,7 +1251,7 @@ if i32.const 0 i32.const 192 - i32.const 36 + i32.const 34 i32.const 0 call $~lib/env/abort unreachable @@ -1264,7 +1264,7 @@ if i32.const 0 i32.const 192 - i32.const 37 + i32.const 35 i32.const 0 call $~lib/env/abort unreachable @@ -1277,7 +1277,7 @@ if i32.const 0 i32.const 192 - i32.const 38 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -1293,7 +1293,7 @@ if i32.const 0 i32.const 192 - i32.const 40 + i32.const 38 i32.const 0 call $~lib/env/abort unreachable @@ -1309,7 +1309,7 @@ if i32.const 0 i32.const 192 - i32.const 41 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -1325,7 +1325,7 @@ if i32.const 0 i32.const 192 - i32.const 42 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable @@ -1341,7 +1341,7 @@ if i32.const 0 i32.const 192 - i32.const 43 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable @@ -1357,7 +1357,7 @@ if i32.const 0 i32.const 192 - i32.const 44 + i32.const 42 i32.const 0 call $~lib/env/abort unreachable @@ -1373,7 +1373,7 @@ if i32.const 0 i32.const 192 - i32.const 45 + i32.const 43 i32.const 0 call $~lib/env/abort unreachable @@ -1389,7 +1389,7 @@ if i32.const 0 i32.const 192 - i32.const 46 + i32.const 44 i32.const 0 call $~lib/env/abort unreachable @@ -1405,7 +1405,7 @@ if i32.const 0 i32.const 192 - i32.const 48 + i32.const 46 i32.const 0 call $~lib/env/abort unreachable @@ -1421,7 +1421,7 @@ if i32.const 0 i32.const 192 - i32.const 49 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -1437,7 +1437,7 @@ if i32.const 0 i32.const 192 - i32.const 50 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -1453,7 +1453,7 @@ if i32.const 0 i32.const 192 - i32.const 51 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -1469,7 +1469,7 @@ if i32.const 0 i32.const 192 - i32.const 52 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -1485,7 +1485,7 @@ if i32.const 0 i32.const 192 - i32.const 53 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -1501,7 +1501,7 @@ if i32.const 0 i32.const 192 - i32.const 54 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -1515,7 +1515,7 @@ if i32.const 0 i32.const 192 - i32.const 56 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -1529,7 +1529,7 @@ if i32.const 0 i32.const 192 - i32.const 57 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable @@ -1543,7 +1543,7 @@ if i32.const 0 i32.const 192 - i32.const 58 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -1557,7 +1557,7 @@ if i32.const 0 i32.const 192 - i32.const 59 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -1571,7 +1571,7 @@ if i32.const 0 i32.const 192 - i32.const 60 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -1585,7 +1585,7 @@ if i32.const 0 i32.const 192 - i32.const 62 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable @@ -1599,7 +1599,7 @@ if i32.const 0 i32.const 192 - i32.const 63 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -1613,7 +1613,7 @@ if i32.const 0 i32.const 192 - i32.const 64 + i32.const 62 i32.const 0 call $~lib/env/abort unreachable @@ -1627,7 +1627,7 @@ if i32.const 0 i32.const 192 - i32.const 65 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -1641,7 +1641,7 @@ if i32.const 0 i32.const 192 - i32.const 66 + i32.const 64 i32.const 0 call $~lib/env/abort unreachable @@ -1654,7 +1654,7 @@ if i32.const 0 i32.const 192 - i32.const 68 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable @@ -1667,7 +1667,7 @@ if i32.const 0 i32.const 192 - i32.const 69 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -1680,7 +1680,7 @@ if i32.const 0 i32.const 192 - i32.const 71 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable @@ -1693,7 +1693,7 @@ if i32.const 0 i32.const 192 - i32.const 72 + i32.const 70 i32.const 0 call $~lib/env/abort unreachable @@ -1706,7 +1706,7 @@ if i32.const 0 i32.const 192 - i32.const 73 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable @@ -1719,7 +1719,7 @@ if i32.const 0 i32.const 192 - i32.const 74 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable @@ -1732,7 +1732,7 @@ if i32.const 0 i32.const 192 - i32.const 75 + i32.const 73 i32.const 0 call $~lib/env/abort unreachable @@ -1745,7 +1745,7 @@ if i32.const 0 i32.const 192 - i32.const 76 + i32.const 74 i32.const 0 call $~lib/env/abort unreachable @@ -1758,7 +1758,7 @@ if i32.const 0 i32.const 192 - i32.const 77 + i32.const 75 i32.const 0 call $~lib/env/abort unreachable @@ -1771,7 +1771,7 @@ if i32.const 0 i32.const 192 - i32.const 78 + i32.const 76 i32.const 0 call $~lib/env/abort unreachable @@ -1787,7 +1787,7 @@ if i32.const 0 i32.const 192 - i32.const 80 + i32.const 78 i32.const 0 call $~lib/env/abort unreachable @@ -1803,7 +1803,7 @@ if i32.const 0 i32.const 192 - i32.const 81 + i32.const 79 i32.const 0 call $~lib/env/abort unreachable @@ -1819,7 +1819,7 @@ if i32.const 0 i32.const 192 - i32.const 82 + i32.const 80 i32.const 0 call $~lib/env/abort unreachable @@ -1835,7 +1835,7 @@ if i32.const 0 i32.const 192 - i32.const 83 + i32.const 81 i32.const 0 call $~lib/env/abort unreachable @@ -1851,7 +1851,7 @@ if i32.const 0 i32.const 192 - i32.const 84 + i32.const 82 i32.const 0 call $~lib/env/abort unreachable @@ -1867,7 +1867,7 @@ if i32.const 0 i32.const 192 - i32.const 85 + i32.const 83 i32.const 0 call $~lib/env/abort unreachable @@ -1883,7 +1883,7 @@ if i32.const 0 i32.const 192 - i32.const 86 + i32.const 84 i32.const 0 call $~lib/env/abort unreachable @@ -1899,7 +1899,7 @@ if i32.const 0 i32.const 192 - i32.const 88 + i32.const 86 i32.const 0 call $~lib/env/abort unreachable @@ -1915,7 +1915,7 @@ if i32.const 0 i32.const 192 - i32.const 89 + i32.const 87 i32.const 0 call $~lib/env/abort unreachable @@ -1931,7 +1931,7 @@ if i32.const 0 i32.const 192 - i32.const 90 + i32.const 88 i32.const 0 call $~lib/env/abort unreachable @@ -1947,7 +1947,7 @@ if i32.const 0 i32.const 192 - i32.const 91 + i32.const 89 i32.const 0 call $~lib/env/abort unreachable @@ -1963,7 +1963,7 @@ if i32.const 0 i32.const 192 - i32.const 92 + i32.const 90 i32.const 0 call $~lib/env/abort unreachable @@ -1979,7 +1979,7 @@ if i32.const 0 i32.const 192 - i32.const 93 + i32.const 91 i32.const 0 call $~lib/env/abort unreachable @@ -1995,7 +1995,7 @@ if i32.const 0 i32.const 192 - i32.const 94 + i32.const 92 i32.const 0 call $~lib/env/abort unreachable @@ -2009,7 +2009,7 @@ if i32.const 0 i32.const 192 - i32.const 96 + i32.const 94 i32.const 0 call $~lib/env/abort unreachable @@ -2023,7 +2023,7 @@ if i32.const 0 i32.const 192 - i32.const 97 + i32.const 95 i32.const 0 call $~lib/env/abort unreachable @@ -2037,7 +2037,7 @@ if i32.const 0 i32.const 192 - i32.const 98 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable @@ -2051,7 +2051,7 @@ if i32.const 0 i32.const 192 - i32.const 99 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -2065,7 +2065,7 @@ if i32.const 0 i32.const 192 - i32.const 100 + i32.const 98 i32.const 0 call $~lib/env/abort unreachable @@ -2079,7 +2079,7 @@ if i32.const 0 i32.const 192 - i32.const 102 + i32.const 100 i32.const 0 call $~lib/env/abort unreachable @@ -2093,7 +2093,7 @@ if i32.const 0 i32.const 192 - i32.const 103 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable @@ -2107,7 +2107,7 @@ if i32.const 0 i32.const 192 - i32.const 104 + i32.const 102 i32.const 0 call $~lib/env/abort unreachable @@ -2121,7 +2121,7 @@ if i32.const 0 i32.const 192 - i32.const 105 + i32.const 103 i32.const 0 call $~lib/env/abort unreachable @@ -2135,7 +2135,7 @@ if i32.const 0 i32.const 192 - i32.const 106 + i32.const 104 i32.const 0 call $~lib/env/abort unreachable @@ -2148,7 +2148,7 @@ if i32.const 0 i32.const 192 - i32.const 108 + i32.const 106 i32.const 0 call $~lib/env/abort unreachable @@ -2161,7 +2161,7 @@ if i32.const 0 i32.const 192 - i32.const 109 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable @@ -2179,7 +2179,7 @@ if i32.const 0 i32.const 192 - i32.const 112 + i32.const 110 i32.const 0 call $~lib/env/abort unreachable @@ -2197,7 +2197,7 @@ if i32.const 0 i32.const 192 - i32.const 115 + i32.const 113 i32.const 0 call $~lib/env/abort unreachable @@ -2214,7 +2214,7 @@ if i32.const 0 i32.const 192 - i32.const 118 + i32.const 116 i32.const 0 call $~lib/env/abort unreachable @@ -2231,7 +2231,7 @@ if i32.const 0 i32.const 192 - i32.const 121 + i32.const 119 i32.const 0 call $~lib/env/abort unreachable @@ -2246,7 +2246,7 @@ if i32.const 0 i32.const 192 - i32.const 124 + i32.const 122 i32.const 0 call $~lib/env/abort unreachable @@ -2266,7 +2266,7 @@ if i32.const 0 i32.const 192 - i32.const 127 + i32.const 125 i32.const 0 call $~lib/env/abort unreachable @@ -2286,7 +2286,7 @@ if i32.const 0 i32.const 192 - i32.const 130 + i32.const 128 i32.const 0 call $~lib/env/abort unreachable @@ -2304,7 +2304,7 @@ if i32.const 0 i32.const 192 - i32.const 133 + i32.const 131 i32.const 0 call $~lib/env/abort unreachable @@ -2322,7 +2322,7 @@ if i32.const 0 i32.const 192 - i32.const 136 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -2339,7 +2339,7 @@ if i32.const 0 i32.const 192 - i32.const 139 + i32.const 137 i32.const 0 call $~lib/env/abort unreachable @@ -2356,7 +2356,7 @@ if i32.const 0 i32.const 192 - i32.const 142 + i32.const 140 i32.const 0 call $~lib/env/abort unreachable @@ -2371,7 +2371,7 @@ if i32.const 0 i32.const 192 - i32.const 145 + i32.const 143 i32.const 0 call $~lib/env/abort unreachable @@ -2391,7 +2391,7 @@ if i32.const 0 i32.const 192 - i32.const 148 + i32.const 146 i32.const 0 call $~lib/env/abort unreachable @@ -2411,7 +2411,7 @@ if i32.const 0 i32.const 192 - i32.const 151 + i32.const 149 i32.const 0 call $~lib/env/abort unreachable @@ -2429,7 +2429,7 @@ if i32.const 0 i32.const 192 - i32.const 154 + i32.const 152 i32.const 0 call $~lib/env/abort unreachable @@ -2447,7 +2447,7 @@ if i32.const 0 i32.const 192 - i32.const 157 + i32.const 155 i32.const 0 call $~lib/env/abort unreachable @@ -2464,7 +2464,7 @@ if i32.const 0 i32.const 192 - i32.const 160 + i32.const 158 i32.const 0 call $~lib/env/abort unreachable @@ -2481,7 +2481,7 @@ if i32.const 0 i32.const 192 - i32.const 163 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/dataview.ts b/tests/compiler/std/dataview.ts index 68e12f34a6..6ff42538b4 100644 --- a/tests/compiler/std/dataview.ts +++ b/tests/compiler/std/dataview.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - var array = new Uint8Array(8); array[0] = 246; diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index b3cb80917c..16dd9153b1 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -23,10 +23,10 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/dataview/array (mut i32) (i32.const 0)) (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) @@ -413,7 +413,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -430,7 +430,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -483,7 +483,7 @@ if i32.const 0 i32.const 16 - i32.const 232 + i32.const 236 i32.const 57 call $~lib/env/abort unreachable @@ -1504,7 +1504,7 @@ if i32.const 0 i32.const 192 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -1519,7 +1519,7 @@ if i32.const 0 i32.const 192 - i32.const 17 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -1534,7 +1534,7 @@ if i32.const 0 i32.const 192 - i32.const 18 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -1549,7 +1549,7 @@ if i32.const 0 i32.const 192 - i32.const 19 + i32.const 17 i32.const 0 call $~lib/env/abort unreachable @@ -1564,7 +1564,7 @@ if i32.const 0 i32.const 192 - i32.const 20 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -1579,7 +1579,7 @@ if i32.const 0 i32.const 192 - i32.const 22 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -1594,7 +1594,7 @@ if i32.const 0 i32.const 192 - i32.const 23 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -1609,7 +1609,7 @@ if i32.const 0 i32.const 192 - i32.const 24 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -1624,7 +1624,7 @@ if i32.const 0 i32.const 192 - i32.const 25 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -1639,7 +1639,7 @@ if i32.const 0 i32.const 192 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -1654,7 +1654,7 @@ if i32.const 0 i32.const 192 - i32.const 28 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -1669,7 +1669,7 @@ if i32.const 0 i32.const 192 - i32.const 29 + i32.const 27 i32.const 0 call $~lib/env/abort unreachable @@ -1683,7 +1683,7 @@ if i32.const 0 i32.const 192 - i32.const 31 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable @@ -1697,7 +1697,7 @@ if i32.const 0 i32.const 192 - i32.const 32 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -1711,7 +1711,7 @@ if i32.const 0 i32.const 192 - i32.const 33 + i32.const 31 i32.const 0 call $~lib/env/abort unreachable @@ -1725,7 +1725,7 @@ if i32.const 0 i32.const 192 - i32.const 34 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -1739,7 +1739,7 @@ if i32.const 0 i32.const 192 - i32.const 35 + i32.const 33 i32.const 0 call $~lib/env/abort unreachable @@ -1753,7 +1753,7 @@ if i32.const 0 i32.const 192 - i32.const 36 + i32.const 34 i32.const 0 call $~lib/env/abort unreachable @@ -1767,7 +1767,7 @@ if i32.const 0 i32.const 192 - i32.const 37 + i32.const 35 i32.const 0 call $~lib/env/abort unreachable @@ -1781,7 +1781,7 @@ if i32.const 0 i32.const 192 - i32.const 38 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -1800,7 +1800,7 @@ if i32.const 0 i32.const 192 - i32.const 40 + i32.const 38 i32.const 0 call $~lib/env/abort unreachable @@ -1819,7 +1819,7 @@ if i32.const 0 i32.const 192 - i32.const 41 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -1838,7 +1838,7 @@ if i32.const 0 i32.const 192 - i32.const 42 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable @@ -1857,7 +1857,7 @@ if i32.const 0 i32.const 192 - i32.const 43 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable @@ -1876,7 +1876,7 @@ if i32.const 0 i32.const 192 - i32.const 44 + i32.const 42 i32.const 0 call $~lib/env/abort unreachable @@ -1895,7 +1895,7 @@ if i32.const 0 i32.const 192 - i32.const 45 + i32.const 43 i32.const 0 call $~lib/env/abort unreachable @@ -1914,7 +1914,7 @@ if i32.const 0 i32.const 192 - i32.const 46 + i32.const 44 i32.const 0 call $~lib/env/abort unreachable @@ -1933,7 +1933,7 @@ if i32.const 0 i32.const 192 - i32.const 48 + i32.const 46 i32.const 0 call $~lib/env/abort unreachable @@ -1952,7 +1952,7 @@ if i32.const 0 i32.const 192 - i32.const 49 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -1971,7 +1971,7 @@ if i32.const 0 i32.const 192 - i32.const 50 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -1990,7 +1990,7 @@ if i32.const 0 i32.const 192 - i32.const 51 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -2009,7 +2009,7 @@ if i32.const 0 i32.const 192 - i32.const 52 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -2028,7 +2028,7 @@ if i32.const 0 i32.const 192 - i32.const 53 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -2047,7 +2047,7 @@ if i32.const 0 i32.const 192 - i32.const 54 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -2062,7 +2062,7 @@ if i32.const 0 i32.const 192 - i32.const 56 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -2077,7 +2077,7 @@ if i32.const 0 i32.const 192 - i32.const 57 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable @@ -2092,7 +2092,7 @@ if i32.const 0 i32.const 192 - i32.const 58 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -2107,7 +2107,7 @@ if i32.const 0 i32.const 192 - i32.const 59 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -2122,7 +2122,7 @@ if i32.const 0 i32.const 192 - i32.const 60 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -2137,7 +2137,7 @@ if i32.const 0 i32.const 192 - i32.const 62 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable @@ -2152,7 +2152,7 @@ if i32.const 0 i32.const 192 - i32.const 63 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -2167,7 +2167,7 @@ if i32.const 0 i32.const 192 - i32.const 64 + i32.const 62 i32.const 0 call $~lib/env/abort unreachable @@ -2182,7 +2182,7 @@ if i32.const 0 i32.const 192 - i32.const 65 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -2197,7 +2197,7 @@ if i32.const 0 i32.const 192 - i32.const 66 + i32.const 64 i32.const 0 call $~lib/env/abort unreachable @@ -2212,7 +2212,7 @@ if i32.const 0 i32.const 192 - i32.const 68 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable @@ -2227,7 +2227,7 @@ if i32.const 0 i32.const 192 - i32.const 69 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -2241,7 +2241,7 @@ if i32.const 0 i32.const 192 - i32.const 71 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable @@ -2255,7 +2255,7 @@ if i32.const 0 i32.const 192 - i32.const 72 + i32.const 70 i32.const 0 call $~lib/env/abort unreachable @@ -2269,7 +2269,7 @@ if i32.const 0 i32.const 192 - i32.const 73 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable @@ -2283,7 +2283,7 @@ if i32.const 0 i32.const 192 - i32.const 74 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable @@ -2297,7 +2297,7 @@ if i32.const 0 i32.const 192 - i32.const 75 + i32.const 73 i32.const 0 call $~lib/env/abort unreachable @@ -2311,7 +2311,7 @@ if i32.const 0 i32.const 192 - i32.const 76 + i32.const 74 i32.const 0 call $~lib/env/abort unreachable @@ -2325,7 +2325,7 @@ if i32.const 0 i32.const 192 - i32.const 77 + i32.const 75 i32.const 0 call $~lib/env/abort unreachable @@ -2339,7 +2339,7 @@ if i32.const 0 i32.const 192 - i32.const 78 + i32.const 76 i32.const 0 call $~lib/env/abort unreachable @@ -2356,7 +2356,7 @@ if i32.const 0 i32.const 192 - i32.const 80 + i32.const 78 i32.const 0 call $~lib/env/abort unreachable @@ -2373,7 +2373,7 @@ if i32.const 0 i32.const 192 - i32.const 81 + i32.const 79 i32.const 0 call $~lib/env/abort unreachable @@ -2390,7 +2390,7 @@ if i32.const 0 i32.const 192 - i32.const 82 + i32.const 80 i32.const 0 call $~lib/env/abort unreachable @@ -2407,7 +2407,7 @@ if i32.const 0 i32.const 192 - i32.const 83 + i32.const 81 i32.const 0 call $~lib/env/abort unreachable @@ -2424,7 +2424,7 @@ if i32.const 0 i32.const 192 - i32.const 84 + i32.const 82 i32.const 0 call $~lib/env/abort unreachable @@ -2441,7 +2441,7 @@ if i32.const 0 i32.const 192 - i32.const 85 + i32.const 83 i32.const 0 call $~lib/env/abort unreachable @@ -2458,7 +2458,7 @@ if i32.const 0 i32.const 192 - i32.const 86 + i32.const 84 i32.const 0 call $~lib/env/abort unreachable @@ -2475,7 +2475,7 @@ if i32.const 0 i32.const 192 - i32.const 88 + i32.const 86 i32.const 0 call $~lib/env/abort unreachable @@ -2492,7 +2492,7 @@ if i32.const 0 i32.const 192 - i32.const 89 + i32.const 87 i32.const 0 call $~lib/env/abort unreachable @@ -2509,7 +2509,7 @@ if i32.const 0 i32.const 192 - i32.const 90 + i32.const 88 i32.const 0 call $~lib/env/abort unreachable @@ -2526,7 +2526,7 @@ if i32.const 0 i32.const 192 - i32.const 91 + i32.const 89 i32.const 0 call $~lib/env/abort unreachable @@ -2543,7 +2543,7 @@ if i32.const 0 i32.const 192 - i32.const 92 + i32.const 90 i32.const 0 call $~lib/env/abort unreachable @@ -2560,7 +2560,7 @@ if i32.const 0 i32.const 192 - i32.const 93 + i32.const 91 i32.const 0 call $~lib/env/abort unreachable @@ -2577,7 +2577,7 @@ if i32.const 0 i32.const 192 - i32.const 94 + i32.const 92 i32.const 0 call $~lib/env/abort unreachable @@ -2592,7 +2592,7 @@ if i32.const 0 i32.const 192 - i32.const 96 + i32.const 94 i32.const 0 call $~lib/env/abort unreachable @@ -2607,7 +2607,7 @@ if i32.const 0 i32.const 192 - i32.const 97 + i32.const 95 i32.const 0 call $~lib/env/abort unreachable @@ -2622,7 +2622,7 @@ if i32.const 0 i32.const 192 - i32.const 98 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable @@ -2637,7 +2637,7 @@ if i32.const 0 i32.const 192 - i32.const 99 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -2652,7 +2652,7 @@ if i32.const 0 i32.const 192 - i32.const 100 + i32.const 98 i32.const 0 call $~lib/env/abort unreachable @@ -2667,7 +2667,7 @@ if i32.const 0 i32.const 192 - i32.const 102 + i32.const 100 i32.const 0 call $~lib/env/abort unreachable @@ -2682,7 +2682,7 @@ if i32.const 0 i32.const 192 - i32.const 103 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable @@ -2697,7 +2697,7 @@ if i32.const 0 i32.const 192 - i32.const 104 + i32.const 102 i32.const 0 call $~lib/env/abort unreachable @@ -2712,7 +2712,7 @@ if i32.const 0 i32.const 192 - i32.const 105 + i32.const 103 i32.const 0 call $~lib/env/abort unreachable @@ -2727,7 +2727,7 @@ if i32.const 0 i32.const 192 - i32.const 106 + i32.const 104 i32.const 0 call $~lib/env/abort unreachable @@ -2742,7 +2742,7 @@ if i32.const 0 i32.const 192 - i32.const 108 + i32.const 106 i32.const 0 call $~lib/env/abort unreachable @@ -2757,7 +2757,7 @@ if i32.const 0 i32.const 192 - i32.const 109 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable @@ -2777,7 +2777,7 @@ if i32.const 0 i32.const 192 - i32.const 112 + i32.const 110 i32.const 0 call $~lib/env/abort unreachable @@ -2797,7 +2797,7 @@ if i32.const 0 i32.const 192 - i32.const 115 + i32.const 113 i32.const 0 call $~lib/env/abort unreachable @@ -2817,7 +2817,7 @@ if i32.const 0 i32.const 192 - i32.const 118 + i32.const 116 i32.const 0 call $~lib/env/abort unreachable @@ -2837,7 +2837,7 @@ if i32.const 0 i32.const 192 - i32.const 121 + i32.const 119 i32.const 0 call $~lib/env/abort unreachable @@ -2855,7 +2855,7 @@ if i32.const 0 i32.const 192 - i32.const 124 + i32.const 122 i32.const 0 call $~lib/env/abort unreachable @@ -2879,7 +2879,7 @@ if i32.const 0 i32.const 192 - i32.const 127 + i32.const 125 i32.const 0 call $~lib/env/abort unreachable @@ -2903,7 +2903,7 @@ if i32.const 0 i32.const 192 - i32.const 130 + i32.const 128 i32.const 0 call $~lib/env/abort unreachable @@ -2923,7 +2923,7 @@ if i32.const 0 i32.const 192 - i32.const 133 + i32.const 131 i32.const 0 call $~lib/env/abort unreachable @@ -2943,7 +2943,7 @@ if i32.const 0 i32.const 192 - i32.const 136 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -2963,7 +2963,7 @@ if i32.const 0 i32.const 192 - i32.const 139 + i32.const 137 i32.const 0 call $~lib/env/abort unreachable @@ -2983,7 +2983,7 @@ if i32.const 0 i32.const 192 - i32.const 142 + i32.const 140 i32.const 0 call $~lib/env/abort unreachable @@ -3001,7 +3001,7 @@ if i32.const 0 i32.const 192 - i32.const 145 + i32.const 143 i32.const 0 call $~lib/env/abort unreachable @@ -3023,7 +3023,7 @@ if i32.const 0 i32.const 192 - i32.const 148 + i32.const 146 i32.const 0 call $~lib/env/abort unreachable @@ -3045,7 +3045,7 @@ if i32.const 0 i32.const 192 - i32.const 151 + i32.const 149 i32.const 0 call $~lib/env/abort unreachable @@ -3065,7 +3065,7 @@ if i32.const 0 i32.const 192 - i32.const 154 + i32.const 152 i32.const 0 call $~lib/env/abort unreachable @@ -3085,7 +3085,7 @@ if i32.const 0 i32.const 192 - i32.const 157 + i32.const 155 i32.const 0 call $~lib/env/abort unreachable @@ -3105,7 +3105,7 @@ if i32.const 0 i32.const 192 - i32.const 160 + i32.const 158 i32.const 0 call $~lib/env/abort unreachable @@ -3125,7 +3125,7 @@ if i32.const 0 i32.const 192 - i32.const 163 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.json b/tests/compiler/std/date.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/std/date.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 5f6e1524a8..44ae296b60 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -89,7 +89,7 @@ if i32.const 0 i32.const 48 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -104,7 +104,7 @@ if i32.const 0 i32.const 48 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -131,7 +131,7 @@ if i32.const 0 i32.const 16 - i32.const 3 + i32.const 1 i32.const 0 call $~lib/env/abort unreachable @@ -150,7 +150,7 @@ if i32.const 0 i32.const 16 - i32.const 4 + i32.const 2 i32.const 0 call $~lib/env/abort unreachable @@ -171,7 +171,7 @@ if i32.const 0 i32.const 16 - i32.const 7 + i32.const 5 i32.const 0 call $~lib/env/abort unreachable @@ -183,7 +183,7 @@ if i32.const 0 i32.const 16 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -221,7 +221,7 @@ if i32.const 0 i32.const 16 - i32.const 12 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -240,7 +240,7 @@ if i32.const 0 i32.const 16 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.ts b/tests/compiler/std/date.ts index c118d4d40b..87ba3a474d 100644 --- a/tests/compiler/std/date.ts +++ b/tests/compiler/std/date.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - assert(Date.UTC(1970, 0, 1) == 0); assert(Date.UTC(1970, 0, 1, 0, 0, 0, 0) == 0); diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index d2d421ff7f..25d22b7bd8 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -18,9 +18,9 @@ (elem (i32.const 0) $null) (global $std/date/creationTime (mut i64) (i64.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/date/date (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 80)) @@ -148,7 +148,7 @@ if i32.const 0 i32.const 48 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -165,7 +165,7 @@ if i32.const 0 i32.const 48 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -245,7 +245,7 @@ if i32.const 0 i32.const 16 - i32.const 3 + i32.const 1 i32.const 0 call $~lib/env/abort unreachable @@ -282,7 +282,7 @@ if i32.const 0 i32.const 16 - i32.const 4 + i32.const 2 i32.const 0 call $~lib/env/abort unreachable @@ -321,7 +321,7 @@ if i32.const 0 i32.const 16 - i32.const 7 + i32.const 5 i32.const 0 call $~lib/env/abort unreachable @@ -336,7 +336,7 @@ if i32.const 0 i32.const 16 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -363,7 +363,7 @@ if i32.const 0 i32.const 16 - i32.const 12 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -384,7 +384,7 @@ if i32.const 0 i32.const 16 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/gc-array.optimized.wat b/tests/compiler/std/gc-array.optimized.wat deleted file mode 100644 index 1bc556e60f..0000000000 --- a/tests/compiler/std/gc-array.optimized.wat +++ /dev/null @@ -1,1904 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 16) "\01") - (data (i32.const 40) "\02\00\00\00\00\00\00\00\18") - (data (i32.const 64) "\05\00\00\00\00\00\00\00\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 112) "\05\00\00\00\00\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (table $0 7 funcref) - (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~gc $~lib/array/Array~gc $~lib/collector/itcm/__gc_mark $~lib/arraybuffer/ArrayBuffer~gc $~lib/arraybuffer/ArrayBuffer~gc $~lib/allocator/arena/__memory_free) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $std/gc-array/arr (mut i32) (i32.const 48)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/started (mut i32) (i32.const 0)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (export "main" (func $std/gc-array/main)) - (func $~lib/arraybuffer/ArrayBuffer~gc (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - local.get $1 - i32.load - i32.const 3 - i32.and - local.get $0 - i32.or - i32.store - local.get $1 - local.get $2 - i32.store offset=4 - local.get $2 - local.get $2 - i32.load - i32.const 3 - i32.and - local.get $1 - i32.or - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/collector/itcm/iter - local.get $0 - i32.eq - if - local.get $0 - i32.load offset=4 - global.set $~lib/collector/itcm/iter - end - local.get $0 - i32.load - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.load offset=4 - local.tee $1 - i32.store offset=4 - local.get $1 - local.get $1 - i32.load - i32.const 3 - i32.and - local.get $2 - i32.or - i32.store - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load - i32.const -4 - i32.and - i32.const 2 - i32.or - i32.store - ) - (func $~lib/collector/itcm/__gc_mark (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - if - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end - end - ) - (func $~lib/array/Array~gc (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load - local.tee $2 - call $~lib/collector/itcm/__gc_mark - local.get $0 - i32.load offset=4 - i32.const 2 - i32.shl - local.set $0 - loop $continue|0 - local.get $1 - local.get $0 - i32.lt_u - if - local.get $1 - local.get $2 - i32.add - i32.load offset=8 - call $~lib/collector/itcm/__gc_mark - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $continue|0 - end - end - ) - (func $~lib/allocator/arena/__memory_allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.tee $1 - local.get $0 - i32.const 1 - local.get $0 - i32.const 1 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const -8 - i32.and - local.tee $0 - current_memory - local.tee $2 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $2 - local.get $0 - local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $3 - local.get $2 - local.get $3 - i32.gt_s - select - grow_memory - i32.const 0 - i32.lt_s - if - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $0 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/allocator/arena/__memory_free (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/collector/itcm/step (; 8 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - if - local.get $0 - i32.const 1 - i32.sub - br_table $case1|0 $case2|0 $case3|0 $break|0 - end - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - local.tee $0 - i32.const -1 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - local.tee $0 - i32.const -1 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - global.get $std/gc-array/arr - i32.const 3 - call_indirect (type $FUNCSIG$vi) - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - end - global.get $~lib/collector/itcm/iter - i32.load - i32.const -4 - i32.and - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - local.get $0 - i32.load - i32.const -4 - i32.and - i32.or - i32.store - i32.const 1 - global.set $~lib/argc - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load offset=8 - call_indirect (type $FUNCSIG$vi) - else - global.get $std/gc-array/arr - i32.const 3 - call_indirect (type $FUNCSIG$vi) - global.get $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/iter - i32.load - i32.const -4 - i32.and - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $0 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $0 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $0 - i32.load - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - end - global.get $~lib/collector/itcm/iter - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - i32.load - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - else - global.get $~lib/collector/itcm/toSpace - local.tee $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - i32.const 1 - global.set $~lib/collector/itcm/state - end - end - ) - (func $~lib/collector/itcm/__gc_collect (; 9 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - i32.eqz - br_if $case1|0 - local.get $0 - i32.const 1 - i32.eq - br_if $case1|0 - br $break|0 - end - call $~lib/collector/itcm/step - end - loop $continue|1 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|1 - end - end - ) - (func $~lib/collector/itcm/__gc_allocate (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - call $~lib/collector/itcm/step - local.get $0 - i32.const 16 - i32.add - call $~lib/allocator/arena/__memory_allocate - local.tee $0 - local.get $1 - i32.store offset=8 - local.get $0 - global.get $~lib/collector/itcm/white - local.get $0 - i32.load - i32.const -4 - i32.and - i32.or - i32.store - global.get $~lib/collector/itcm/fromSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - i32.const 16 - i32.add - ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 120 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - i32.const 1 - i32.const 32 - local.get $0 - i32.const 7 - i32.add - i32.clz - i32.sub - i32.shl - i32.const 6 - call $~lib/collector/itcm/__gc_allocate - local.tee $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/internal/memory/memcpy (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $continue|0 - local.get $1 - i32.const 3 - i32.and - local.get $2 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - local.get $0 - i32.const 3 - i32.and - local.tee $3 - i32.const 1 - i32.ne - if - local.get $3 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $3 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 13 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 15 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/internal/memory/memmove (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - local.set $3 - end - local.get $3 - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 - end - end - end - loop $continue|2 - local.get $2 - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|3 - end - end - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - br $continue|4 - end - end - end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - ) - (func $~lib/internal/memory/memset (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $1 - i32.eqz - if - return - end - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $2 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - local.get $0 - i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $1 - local.get $0 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 16 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 20 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $2 - local.get $0 - i32.add - local.set $0 - local.get $1 - local.get $2 - i32.sub - local.set $1 - loop $continue|0 - 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 - ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - local.get $0 - i32.load - local.tee $2 - i32.gt_s - if - local.get $1 - i32.const 1073741816 - i32.gt_s - if - i32.const 0 - i32.const 120 - i32.const 40 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 1 - i32.const 32 - local.get $2 - i32.const 7 - i32.add - i32.clz - i32.sub - i32.shl - i32.const 8 - i32.sub - i32.le_s - if - local.get $0 - local.get $1 - i32.store - else - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $3 - i32.const 8 - i32.add - local.get $0 - i32.const 8 - i32.add - local.get $2 - call $~lib/internal/memory/memmove - local.get $3 - local.set $0 - end - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.sub - call $~lib/internal/memory/memset - else - local.get $1 - local.get $2 - i32.lt_s - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 0 - i32.const 120 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - i32.store - end - end - local.get $0 - ) - (func $~lib/collector/itcm/__gc_link (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - global.get $~lib/collector/itcm/white - i32.eqz - local.get $0 - i32.const 16 - i32.sub - local.tee $2 - i32.load - i32.const 3 - i32.and - i32.eq - local.tee $0 - if (result i32) - global.get $~lib/collector/itcm/white - local.get $1 - i32.const 16 - i32.sub - i32.load - i32.const 3 - i32.and - i32.eq - else - local.get $0 - end - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/array/Array#__set (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $0 - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u - i32.ge_u - if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 72 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.tee $3 - i32.store - local.get $0 - local.get $4 - i32.store offset=4 - end - local.get $3 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=8 - local.get $0 - local.get $2 - call $~lib/collector/itcm/__gc_link - ) - (func $start:std/gc-array (; 18 ;) (type $FUNCSIG$v) - i32.const 184 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - call $~lib/collector/itcm/__gc_collect - global.get $std/gc-array/arr - i32.const 0 - i32.const 0 - i32.const 4 - call $~lib/collector/itcm/__gc_allocate - call $~lib/array/Array#__set - call $~lib/collector/itcm/__gc_collect - global.get $std/gc-array/arr - i32.const 1 - i32.const 0 - i32.const 4 - call $~lib/collector/itcm/__gc_allocate - call $~lib/array/Array#__set - call $~lib/collector/itcm/__gc_collect - global.get $std/gc-array/arr - i32.const 0 - i32.const 0 - i32.const 4 - call $~lib/collector/itcm/__gc_allocate - call $~lib/array/Array#__set - call $~lib/collector/itcm/__gc_collect - ) - (func $std/gc-array/main (; 19 ;) (type $FUNCSIG$i) (result i32) - global.get $~lib/started - i32.eqz - if - call $start:std/gc-array - i32.const 1 - global.set $~lib/started - end - i32.const 0 - ) - (func $null (; 20 ;) (type $FUNCSIG$v) - nop - ) -) diff --git a/tests/compiler/std/gc-array.untouched.wat b/tests/compiler/std/gc-array.untouched.wat deleted file mode 100644 index ecf4d806e6..0000000000 --- a/tests/compiler/std/gc-array.untouched.wat +++ /dev/null @@ -1,2540 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 8) "\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 32) "\00\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\18\00\00\00\00\00\00\00") - (data (i32.const 56) "\00\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 104) "\00\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (table $0 7 funcref) - (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~gc $~lib/array/Array~gc $~lib/collector/itcm/__gc_mark $std/gc-array/Foo~gc $~lib/string/String~gc $~lib/internal/arraybuffer/__gc) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $std/gc-array/arr (mut i32) (i32.const 48)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 180)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (export "main" (func $std/gc-array/main)) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $~lib/arraybuffer/ArrayBuffer~gc (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const 3 - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 - i32.load - i32.const 3 - i32.and - i32.or - i32.store - ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - local.set $1 - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - local.get $2 - i32.store offset=4 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - local.get $0 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $1 - local.get $2 - i32.store offset=4 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/collector/itcm/iter - i32.eq - if - local.get $0 - i32.load offset=4 - global.set $~lib/collector/itcm/iter - end - local.get $0 - call $~lib/collector/itcm/ManagedObject#unlink - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 2 - i32.or - i32.store - ) - (func $~lib/collector/itcm/__gc_mark (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - if - block $~lib/collector/itcm/refToObj|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 16 - i32.sub - end - local.set $1 - local.get $1 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - if - local.get $1 - call $~lib/collector/itcm/ManagedObject#makeGray - end - end - ) - (func $~lib/array/Array~gc (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load - local.set $1 - local.get $1 - call $~lib/collector/itcm/__gc_mark - i32.const 0 - local.set $2 - local.get $0 - i32.load offset=4 - i32.const 2 - i32.shl - local.set $3 - block $break|0 - loop $continue|0 - local.get $2 - local.get $3 - i32.lt_u - if - block - local.get $1 - local.get $2 - i32.add - i32.load offset=8 - call $~lib/collector/itcm/__gc_mark - local.get $2 - i32.const 4 - i32.add - local.set $2 - end - br $continue|0 - end - end - end - ) - (func $~lib/allocator/arena/__memory_allocate (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 - local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $2 - local.get $5 - local.tee $3 - local.get $2 - local.tee $6 - local.get $3 - local.get $6 - i32.gt_s - select - local.set $3 - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - local.get $2 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/collector/itcm/ManagedObjectList#clear (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - ) - (func $~lib/collector/itcm/ManagedObject#set:color (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $1 - i32.or - i32.store - ) - (func $~lib/allocator/arena/__memory_free (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/collector/itcm/step (; 15 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - block $case0|0 - global.get $~lib/collector/itcm/state - local.set $1 - local.get $1 - i32.const 0 - i32.eq - br_if $case0|0 - local.get $1 - i32.const 1 - i32.eq - br_if $case1|0 - local.get $1 - i32.const 2 - i32.eq - br_if $case2|0 - local.get $1 - i32.const 3 - i32.eq - br_if $case3|0 - br $break|0 - end - block - block $~lib/memory/memory.allocate|inlined.0 (result i32) - i32.const 16 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - i32.const -1 - i32.store offset=8 - global.get $~lib/collector/itcm/fromSpace - call $~lib/collector/itcm/ManagedObjectList#clear - block $~lib/memory/memory.allocate|inlined.1 (result i32) - i32.const 16 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 - end - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - i32.const -1 - i32.store offset=8 - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - end - block - i32.const 3 - call $~iterateRoots - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - call $~lib/collector/itcm/ManagedObject#set:color - i32.const 1 - global.set $~lib/argc - block $~lib/collector/itcm/objToRef|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 16 - i32.add - end - local.get $0 - i32.load offset=8 - call_indirect (type $FUNCSIG$vi) - else - i32.const 3 - call $~iterateRoots - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $1 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $1 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $1 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.ge_u - if - block $~lib/memory/memory.free|inlined.0 - local.get $0 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 - end - end - else - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - i32.const 1 - global.set $~lib/collector/itcm/state - end - br $break|0 - unreachable - end - unreachable - end - ) - (func $~lib/collector/itcm/__gc_collect (; 16 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case1|0 - block $case0|0 - global.get $~lib/collector/itcm/state - local.set $0 - local.get $0 - i32.const 0 - i32.eq - br_if $case0|0 - local.get $0 - i32.const 1 - i32.eq - br_if $case1|0 - br $break|0 - end - end - call $~lib/collector/itcm/step - end - block $break|1 - loop $continue|1 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|1 - end - end - end - ) - (func $~lib/gc/gc.collect (; 17 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/__gc_collect - return - ) - (func $~lib/collector/itcm/__gc_allocate (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741824 - i32.const 16 - i32.sub - i32.gt_u - if - unreachable - end - call $~lib/collector/itcm/step - block $~lib/memory/memory.allocate|inlined.2 (result i32) - i32.const 16 - local.get $0 - i32.add - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.2 - end - local.set $3 - local.get $3 - local.get $1 - i32.store offset=8 - local.get $3 - global.get $~lib/collector/itcm/white - call $~lib/collector/itcm/ManagedObject#set:color - global.get $~lib/collector/itcm/fromSpace - local.get $3 - call $~lib/collector/itcm/ManagedObjectList#push - block $~lib/collector/itcm/objToRef|inlined.1 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.const 16 - i32.add - end - ) - (func $std/gc-array/Foo~gc (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $~lib/string/String~gc (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $~lib/internal/arraybuffer/computeSize (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 8 - i32.add - i32.const 1 - i32.sub - i32.clz - i32.sub - i32.shl - ) - (func $~lib/internal/arraybuffer/__gc (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - call $~lib/internal/arraybuffer/computeSize - i32.const 6 - call $~lib/collector/itcm/__gc_allocate - local.set $1 - local.get $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/internal/memory/memcpy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - ) - (func $~lib/internal/memory/memmove (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - end - i32.load8_u - i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - br $continue|1 - end - end - end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|2 - end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - end - br $continue|3 - end - end - end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 - end - end - end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - end - ) - (func $~lib/internal/memory/memset (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i64) - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - end - br $continue|0 - end - end - end - ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.gt_s - if - local.get $1 - i32.const 1073741816 - i32.le_s - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 40 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - local.get $2 - call $~lib/internal/arraybuffer/computeSize - i32.const 8 - i32.sub - i32.le_s - if - local.get $0 - local.get $1 - i32.store - else - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.copy|inlined.0 - local.get $3 - i32.const 8 - i32.add - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memmove - end - local.get $3 - local.set $0 - end - block $~lib/memory/memory.fill|inlined.0 - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.add - local.set $3 - i32.const 0 - local.set $6 - local.get $1 - local.get $2 - i32.sub - local.set $5 - local.get $3 - local.get $6 - local.get $5 - call $~lib/internal/memory/memset - end - else - local.get $1 - local.get $2 - i32.lt_s - if - local.get $1 - i32.const 0 - i32.ge_s - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - i32.store - end - end - local.get $0 - ) - (func $~lib/collector/itcm/__gc_link (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - block $~lib/collector/itcm/refToObj|inlined.1 (result i32) - local.get $0 - local.set $2 - local.get $2 - i32.const 16 - i32.sub - end - local.set $3 - local.get $3 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eqz - i32.eq - local.tee $2 - if (result i32) - block $~lib/collector/itcm/refToObj|inlined.3 (result i32) - local.get $1 - local.set $2 - local.get $2 - i32.const 16 - i32.sub - end - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - else - local.get $2 - end - if - local.get $3 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/array/Array#__set (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 - i32.load - local.set $3 - local.get $3 - i32.load - i32.const 2 - i32.shr_u - local.set $4 - local.get $1 - local.get $4 - i32.ge_u - if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 72 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $3 - local.set $5 - local.get $1 - local.set $6 - local.get $2 - local.set $7 - i32.const 0 - local.set $8 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $7 - i32.store offset=8 - end - local.get $0 - local.get $2 - call $~lib/collector/itcm/__gc_link - ) - (func $start:std/gc-array (; 30 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - (local $2 i32) - call $start:~lib/allocator/arena - call $~lib/gc/gc.collect - global.get $std/gc-array/arr - i32.const 0 - block (result i32) - i32.const 0 - i32.const 4 - call $~lib/collector/itcm/__gc_allocate - local.set $0 - local.get $0 - end - call $~lib/array/Array#__set - call $~lib/gc/gc.collect - global.get $std/gc-array/arr - i32.const 1 - block (result i32) - i32.const 0 - i32.const 4 - call $~lib/collector/itcm/__gc_allocate - local.set $1 - local.get $1 - end - call $~lib/array/Array#__set - call $~lib/gc/gc.collect - global.get $std/gc-array/arr - i32.const 0 - block (result i32) - i32.const 0 - i32.const 4 - call $~lib/collector/itcm/__gc_allocate - local.set $2 - local.get $2 - end - call $~lib/array/Array#__set - call $~lib/gc/gc.collect - ) - (func $std/gc-array/main (; 31 ;) (type $FUNCSIG$i) (result i32) - global.get $~lib/started - i32.eqz - if - call $start - i32.const 1 - global.set $~lib/started - end - i32.const 0 - ) - (func $start (; 32 ;) (type $FUNCSIG$v) - call $start:std/gc-array - ) - (func $null (; 33 ;) (type $FUNCSIG$v) - ) - (func $~iterateRoots (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) - global.get $std/gc-array/arr - local.get $0 - call_indirect (type $FUNCSIG$vi) - ) -) diff --git a/tests/compiler/std/gc-basics.optimized.wat b/tests/compiler/std/gc-basics.optimized.wat deleted file mode 100644 index 15b106955e..0000000000 --- a/tests/compiler/std/gc-basics.optimized.wat +++ /dev/null @@ -1,481 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 16) "\03\00\00\00\00\00\00\00\10\00\00\00s\00t\00d\00/\00g\00c\00-\00b\00a\00s\00i\00c\00s\00.\00t\00s") - (table $0 4 funcref) - (elem (i32.const 0) $null $std/gc-basics/MyObject_visit $~lib/collector/itcm/__gc_mark $~lib/string/String~gc) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $std/gc-basics/obj (mut i32) (i32.const 0)) - (global $std/gc-basics/obj2 (mut i32) (i32.const 0)) - (global $~lib/started (mut i32) (i32.const 0)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (export "main" (func $std/gc-basics/main)) - (func $std/gc-basics/MyObject_visit (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.tee $1 - local.get $0 - i32.const 1 - local.get $0 - i32.const 1 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const -8 - i32.and - local.tee $0 - current_memory - local.tee $2 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $2 - local.get $0 - local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $3 - local.get $2 - local.get $3 - i32.gt_s - select - grow_memory - i32.const 0 - i32.lt_s - if - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $0 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - local.get $1 - i32.load - i32.const 3 - i32.and - local.get $0 - i32.or - i32.store - local.get $1 - local.get $2 - i32.store offset=4 - local.get $2 - local.get $2 - i32.load - i32.const 3 - i32.and - local.get $1 - i32.or - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/collector/itcm/iter - local.get $0 - i32.eq - if - local.get $0 - i32.load offset=4 - global.set $~lib/collector/itcm/iter - end - local.get $0 - i32.load - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.load offset=4 - local.tee $1 - i32.store offset=4 - local.get $1 - local.get $1 - i32.load - i32.const 3 - i32.and - local.get $2 - i32.or - i32.store - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load - i32.const -4 - i32.and - i32.const 2 - i32.or - i32.store - ) - (func $~lib/collector/itcm/__gc_mark (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - if - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end - end - ) - (func $~lib/collector/itcm/step (; 6 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - if - local.get $0 - i32.const 1 - i32.sub - br_table $case1|0 $case2|0 $case3|0 $break|0 - end - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - local.tee $0 - i32.const -1 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - local.tee $0 - i32.const -1 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - global.get $std/gc-basics/obj - i32.const 2 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-basics/obj2 - i32.const 2 - call_indirect (type $FUNCSIG$vi) - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - end - global.get $~lib/collector/itcm/iter - i32.load - i32.const -4 - i32.and - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - local.get $0 - i32.load - i32.const -4 - i32.and - i32.or - i32.store - i32.const 1 - global.set $~lib/argc - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load offset=8 - call_indirect (type $FUNCSIG$vi) - else - global.get $std/gc-basics/obj - i32.const 2 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-basics/obj2 - i32.const 2 - call_indirect (type $FUNCSIG$vi) - global.get $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/iter - i32.load - i32.const -4 - i32.and - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $0 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $0 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $0 - i32.load - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - end - global.get $~lib/collector/itcm/iter - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - i32.load - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - else - global.get $~lib/collector/itcm/toSpace - local.tee $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - i32.const 1 - global.set $~lib/collector/itcm/state - end - end - ) - (func $~lib/collector/itcm/__gc_allocate (; 7 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - call $~lib/collector/itcm/step - i32.const 20 - call $~lib/allocator/arena/__memory_allocate - local.tee $0 - i32.const 1 - i32.store offset=8 - local.get $0 - global.get $~lib/collector/itcm/white - local.get $0 - i32.load - i32.const -4 - i32.and - i32.or - i32.store - global.get $~lib/collector/itcm/fromSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - i32.const 16 - i32.add - ) - (func $~lib/string/String~gc (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $~lib/collector/itcm/__gc_collect (; 9 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - i32.eqz - br_if $case1|0 - local.get $0 - i32.const 1 - i32.eq - br_if $case1|0 - br $break|0 - end - call $~lib/collector/itcm/step - end - loop $continue|1 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|1 - end - end - ) - (func $start:std/gc-basics (; 10 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 64 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - call $~lib/collector/itcm/__gc_allocate - global.set $std/gc-basics/obj - global.get $std/gc-basics/obj - local.tee $0 - i32.const 123 - i32.store - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load offset=4 - local.set $2 - block (result i32) - local.get $0 - i32.load - i32.const -4 - i32.and - local.tee $3 - i32.const 0 - i32.ne - local.tee $1 - if - local.get $2 - i32.const 0 - i32.ne - local.set $1 - end - local.get $1 - end - if (result i32) - local.get $2 - local.get $3 - i32.eq - else - local.get $1 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 19 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 24 - i32.const 21 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=12 - if - i32.const 0 - i32.const 24 - i32.const 23 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=16 - i32.const 123 - i32.ne - if - i32.const 0 - i32.const 24 - i32.const 25 - i32.const 2 - call $~lib/env/abort - unreachable - end - call $~lib/collector/itcm/__gc_collect - i32.const 0 - global.set $std/gc-basics/obj - call $~lib/collector/itcm/__gc_collect - ) - (func $std/gc-basics/main (; 11 ;) (type $FUNCSIG$i) (result i32) - global.get $~lib/started - i32.eqz - if - call $start:std/gc-basics - i32.const 1 - global.set $~lib/started - end - i32.const 0 - ) - (func $null (; 12 ;) (type $FUNCSIG$v) - nop - ) -) diff --git a/tests/compiler/std/gc-object.optimized.wat b/tests/compiler/std/gc-object.optimized.wat deleted file mode 100644 index dff104f0fb..0000000000 --- a/tests/compiler/std/gc-object.optimized.wat +++ /dev/null @@ -1,437 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (memory $0 0) - (table $0 4 funcref) - (elem (i32.const 0) $null $~lib/collector/itcm/__gc_mark $std/gc-object/Base~gc $std/gc-object/Custom~gc) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $std/gc-object/obj (mut i32) (i32.const 0)) - (global $~lib/started (mut i32) (i32.const 0)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (export "main" (func $std/gc-object/main)) - (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.tee $1 - local.get $0 - i32.const 1 - local.get $0 - i32.const 1 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const -8 - i32.and - local.tee $0 - current_memory - local.tee $2 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $2 - local.get $0 - local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $3 - local.get $2 - local.get $3 - i32.gt_s - select - grow_memory - i32.const 0 - i32.lt_s - if - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $0 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - local.get $1 - i32.load - i32.const 3 - i32.and - local.get $0 - i32.or - i32.store - local.get $1 - local.get $2 - i32.store offset=4 - local.get $2 - local.get $2 - i32.load - i32.const 3 - i32.and - local.get $1 - i32.or - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/collector/itcm/iter - local.get $0 - i32.eq - if - local.get $0 - i32.load offset=4 - global.set $~lib/collector/itcm/iter - end - local.get $0 - i32.load - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.load offset=4 - local.tee $1 - i32.store offset=4 - local.get $1 - local.get $1 - i32.load - i32.const 3 - i32.and - local.get $2 - i32.or - i32.store - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load - i32.const -4 - i32.and - i32.const 2 - i32.or - i32.store - ) - (func $~lib/collector/itcm/__gc_mark (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - if - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end - end - ) - (func $~lib/collector/itcm/step (; 4 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - if - local.get $0 - i32.const 1 - i32.sub - br_table $case1|0 $case2|0 $case3|0 $break|0 - end - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - local.tee $0 - i32.const -1 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - local.tee $0 - i32.const -1 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - global.get $std/gc-object/obj - i32.const 1 - call_indirect (type $FUNCSIG$vi) - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - end - global.get $~lib/collector/itcm/iter - i32.load - i32.const -4 - i32.and - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - local.get $0 - i32.load - i32.const -4 - i32.and - i32.or - i32.store - i32.const 1 - global.set $~lib/argc - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load offset=8 - call_indirect (type $FUNCSIG$vi) - else - global.get $std/gc-object/obj - i32.const 1 - call_indirect (type $FUNCSIG$vi) - global.get $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/iter - i32.load - i32.const -4 - i32.and - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $0 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $0 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $0 - i32.load - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - end - global.get $~lib/collector/itcm/iter - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - i32.load - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - else - global.get $~lib/collector/itcm/toSpace - local.tee $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - i32.const 1 - global.set $~lib/collector/itcm/state - end - end - ) - (func $~lib/collector/itcm/__gc_allocate (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - call $~lib/collector/itcm/step - local.get $0 - i32.const 16 - i32.add - call $~lib/allocator/arena/__memory_allocate - local.tee $0 - local.get $1 - i32.store offset=8 - local.get $0 - global.get $~lib/collector/itcm/white - local.get $0 - i32.load - i32.const -4 - i32.and - i32.or - i32.store - global.get $~lib/collector/itcm/fromSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - i32.const 16 - i32.add - ) - (func $std/gc-object/Base~gc (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $std/gc-object/Custom~gc (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - i32.const 2 - call_indirect (type $FUNCSIG$vi) - local.get $0 - i32.load - call $~lib/collector/itcm/__gc_mark - local.get $0 - i32.load offset=4 - call $~lib/collector/itcm/__gc_mark - ) - (func $std/gc-object/Custom#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - i32.const 8 - i32.const 3 - call $~lib/collector/itcm/__gc_allocate - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 2 - call $~lib/collector/itcm/__gc_allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - ) - (func $~lib/collector/itcm/__gc_collect (; 9 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - i32.eqz - br_if $case1|0 - local.get $0 - i32.const 1 - i32.eq - br_if $case1|0 - br $break|0 - end - call $~lib/collector/itcm/step - end - loop $continue|1 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|1 - end - end - ) - (func $start:std/gc-object (; 10 ;) (type $FUNCSIG$v) - (local $0 i32) - i32.const 8 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - call $std/gc-object/Custom#constructor - global.set $std/gc-object/obj - call $~lib/collector/itcm/__gc_collect - global.get $std/gc-object/obj - local.tee $0 - local.get $0 - i32.store - call $~lib/collector/itcm/__gc_collect - i32.const 0 - global.set $std/gc-object/obj - call $~lib/collector/itcm/__gc_collect - ) - (func $std/gc-object/main (; 11 ;) (type $FUNCSIG$v) - global.get $~lib/started - i32.eqz - if - call $start:std/gc-object - i32.const 1 - global.set $~lib/started - end - ) - (func $null (; 12 ;) (type $FUNCSIG$v) - nop - ) -) diff --git a/tests/compiler/std/hash.json b/tests/compiler/std/hash.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/std/hash.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index 10f7f92fbb..554280c0be 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -10,7 +10,6 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) (export "memory" (memory $0)) (export "table" (table $0)) diff --git a/tests/compiler/std/libm.json b/tests/compiler/std/libm.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/std/libm.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/map.json b/tests/compiler/std/map.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/std/map.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index f026b941f4..cab77e6770 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -155,7 +155,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -170,7 +170,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -850,7 +850,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -872,7 +872,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -891,7 +891,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -912,7 +912,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -931,7 +931,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -950,7 +950,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -972,7 +972,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -991,7 +991,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -1012,7 +1012,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -1031,7 +1031,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -1050,7 +1050,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -1064,7 +1064,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -1085,7 +1085,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -1103,7 +1103,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -1125,7 +1125,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -1139,7 +1139,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -1160,7 +1160,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -1172,7 +1172,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -1527,7 +1527,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -1547,7 +1547,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -1564,7 +1564,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -1585,7 +1585,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -1604,7 +1604,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -1621,7 +1621,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -1641,7 +1641,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -1658,7 +1658,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -1679,7 +1679,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -1698,7 +1698,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -1715,7 +1715,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -1729,7 +1729,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -1750,7 +1750,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -1768,7 +1768,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -1788,7 +1788,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -1802,7 +1802,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -1823,7 +1823,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -1835,7 +1835,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -2288,7 +2288,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -2310,7 +2310,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -2329,7 +2329,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -2350,7 +2350,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -2369,7 +2369,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -2388,7 +2388,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -2410,7 +2410,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -2429,7 +2429,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -2450,7 +2450,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -2469,7 +2469,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -2488,7 +2488,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -2502,7 +2502,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -2523,7 +2523,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -2541,7 +2541,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -2563,7 +2563,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -2577,7 +2577,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -2598,7 +2598,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -2610,7 +2610,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -3010,7 +3010,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -3030,7 +3030,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -3047,7 +3047,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -3068,7 +3068,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -3087,7 +3087,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -3104,7 +3104,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -3124,7 +3124,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -3141,7 +3141,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -3162,7 +3162,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -3181,7 +3181,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -3198,7 +3198,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -3212,7 +3212,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -3233,7 +3233,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -3251,7 +3251,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -3271,7 +3271,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -3285,7 +3285,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -3306,7 +3306,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -3318,7 +3318,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -3722,7 +3722,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -3740,7 +3740,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -3755,7 +3755,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -3776,7 +3776,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -3795,7 +3795,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -3810,7 +3810,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -3828,7 +3828,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -3843,7 +3843,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -3864,7 +3864,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -3883,7 +3883,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -3898,7 +3898,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -3912,7 +3912,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -3933,7 +3933,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -3951,7 +3951,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -3969,7 +3969,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -3983,7 +3983,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -4004,7 +4004,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -4016,7 +4016,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -4066,7 +4066,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -4084,7 +4084,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -4099,7 +4099,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -4120,7 +4120,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -4139,7 +4139,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -4154,7 +4154,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -4172,7 +4172,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -4187,7 +4187,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -4208,7 +4208,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -4227,7 +4227,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -4242,7 +4242,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -4256,7 +4256,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -4277,7 +4277,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -4295,7 +4295,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -4313,7 +4313,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -4327,7 +4327,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -4348,7 +4348,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -4360,7 +4360,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -4835,7 +4835,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -4854,7 +4854,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -4870,7 +4870,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -4891,7 +4891,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -4910,7 +4910,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -4926,7 +4926,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -4945,7 +4945,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -4961,7 +4961,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -4982,7 +4982,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -5001,7 +5001,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -5017,7 +5017,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -5031,7 +5031,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -5052,7 +5052,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -5070,7 +5070,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -5089,7 +5089,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -5103,7 +5103,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -5124,7 +5124,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -5136,7 +5136,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -5186,7 +5186,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -5205,7 +5205,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -5221,7 +5221,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -5242,7 +5242,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -5261,7 +5261,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -5277,7 +5277,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -5296,7 +5296,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -5312,7 +5312,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -5333,7 +5333,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -5352,7 +5352,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -5368,7 +5368,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -5382,7 +5382,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -5403,7 +5403,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -5421,7 +5421,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -5440,7 +5440,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -5454,7 +5454,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -5475,7 +5475,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -5487,7 +5487,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -5866,7 +5866,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -5885,7 +5885,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -5901,7 +5901,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -5922,7 +5922,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -5941,7 +5941,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -5957,7 +5957,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -5976,7 +5976,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -5992,7 +5992,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -6013,7 +6013,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -6032,7 +6032,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -6048,7 +6048,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -6062,7 +6062,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -6083,7 +6083,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -6101,7 +6101,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -6120,7 +6120,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -6134,7 +6134,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -6155,7 +6155,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -6167,7 +6167,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -6546,7 +6546,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -6565,7 +6565,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -6581,7 +6581,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -6602,7 +6602,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -6621,7 +6621,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -6637,7 +6637,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -6656,7 +6656,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -6672,7 +6672,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -6693,7 +6693,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -6712,7 +6712,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -6728,7 +6728,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -6742,7 +6742,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -6763,7 +6763,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -6781,7 +6781,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -6800,7 +6800,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -6814,7 +6814,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -6835,7 +6835,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -6847,7 +6847,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/map.ts b/tests/compiler/std/map.ts index bcf018b362..fed0f6469b 100644 --- a/tests/compiler/std/map.ts +++ b/tests/compiler/std/map.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import "collector/dummy"; function testNumeric(): void { diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 2aa2923823..2172de8f4d 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -25,9 +25,9 @@ (table $0 23 funcref) (elem (i32.const 0) $null $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/string/String~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) @@ -187,7 +187,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -204,7 +204,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1112,7 +1112,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -1134,7 +1134,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -1154,7 +1154,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -1177,7 +1177,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -1199,7 +1199,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -1219,7 +1219,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -1241,7 +1241,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -1261,7 +1261,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -1284,7 +1284,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -1306,7 +1306,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -1326,7 +1326,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -1343,7 +1343,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -1366,7 +1366,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -1389,7 +1389,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -1411,7 +1411,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -1428,7 +1428,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -1451,7 +1451,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -1466,7 +1466,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -2069,7 +2069,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -2089,7 +2089,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -2107,7 +2107,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -2130,7 +2130,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -2152,7 +2152,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -2170,7 +2170,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -2190,7 +2190,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -2208,7 +2208,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -2231,7 +2231,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -2253,7 +2253,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -2271,7 +2271,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -2288,7 +2288,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -2311,7 +2311,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -2334,7 +2334,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -2354,7 +2354,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -2371,7 +2371,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -2394,7 +2394,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -2409,7 +2409,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -3044,7 +3044,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -3066,7 +3066,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -3086,7 +3086,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -3109,7 +3109,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -3131,7 +3131,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -3151,7 +3151,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -3173,7 +3173,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -3193,7 +3193,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -3216,7 +3216,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -3238,7 +3238,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -3258,7 +3258,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -3275,7 +3275,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -3298,7 +3298,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -3321,7 +3321,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -3343,7 +3343,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -3360,7 +3360,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -3383,7 +3383,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -3398,7 +3398,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -4001,7 +4001,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -4021,7 +4021,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -4039,7 +4039,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -4062,7 +4062,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -4084,7 +4084,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -4102,7 +4102,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -4122,7 +4122,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -4140,7 +4140,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -4163,7 +4163,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -4185,7 +4185,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -4203,7 +4203,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -4220,7 +4220,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -4243,7 +4243,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -4266,7 +4266,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -4286,7 +4286,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -4303,7 +4303,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -4326,7 +4326,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -4341,7 +4341,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -4976,7 +4976,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -4994,7 +4994,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -5010,7 +5010,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -5033,7 +5033,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -5055,7 +5055,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -5071,7 +5071,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -5089,7 +5089,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -5105,7 +5105,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -5128,7 +5128,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -5150,7 +5150,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -5166,7 +5166,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -5183,7 +5183,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -5206,7 +5206,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -5229,7 +5229,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -5247,7 +5247,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -5264,7 +5264,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -5287,7 +5287,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -5302,7 +5302,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -5895,7 +5895,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -5913,7 +5913,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -5929,7 +5929,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -5952,7 +5952,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -5974,7 +5974,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -5990,7 +5990,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -6008,7 +6008,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -6024,7 +6024,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -6047,7 +6047,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -6069,7 +6069,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -6085,7 +6085,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -6102,7 +6102,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -6125,7 +6125,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -6148,7 +6148,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -6166,7 +6166,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -6183,7 +6183,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -6206,7 +6206,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -6221,7 +6221,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -6905,7 +6905,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -6924,7 +6924,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -6941,7 +6941,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -6964,7 +6964,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -6986,7 +6986,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -7003,7 +7003,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -7022,7 +7022,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -7039,7 +7039,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -7062,7 +7062,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -7084,7 +7084,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -7101,7 +7101,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -7118,7 +7118,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -7141,7 +7141,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -7164,7 +7164,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -7183,7 +7183,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -7200,7 +7200,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -7223,7 +7223,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -7238,7 +7238,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -7834,7 +7834,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -7853,7 +7853,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -7870,7 +7870,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -7893,7 +7893,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -7915,7 +7915,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -7932,7 +7932,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -7951,7 +7951,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -7968,7 +7968,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -7991,7 +7991,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -8013,7 +8013,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -8030,7 +8030,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -8047,7 +8047,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -8070,7 +8070,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -8093,7 +8093,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -8112,7 +8112,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -8129,7 +8129,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -8152,7 +8152,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -8167,7 +8167,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -8768,7 +8768,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -8787,7 +8787,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -8804,7 +8804,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -8827,7 +8827,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -8849,7 +8849,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -8866,7 +8866,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -8885,7 +8885,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -8902,7 +8902,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -8925,7 +8925,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -8947,7 +8947,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -8964,7 +8964,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -8981,7 +8981,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -9004,7 +9004,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -9027,7 +9027,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -9046,7 +9046,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -9063,7 +9063,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -9086,7 +9086,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -9101,7 +9101,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -9702,7 +9702,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -9721,7 +9721,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -9738,7 +9738,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -9761,7 +9761,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -9783,7 +9783,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -9800,7 +9800,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -9819,7 +9819,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -9836,7 +9836,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -9859,7 +9859,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -9881,7 +9881,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -9898,7 +9898,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -9915,7 +9915,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -9938,7 +9938,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -9961,7 +9961,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -9980,7 +9980,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -9997,7 +9997,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -10020,7 +10020,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -10035,7 +10035,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/math.json b/tests/compiler/std/math.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/std/math.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index 7762cdf468..8c6422997f 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -91,8 +91,6 @@ (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/math/rempio2f_y (mut f64) (f64.const 0)) (global $~lib/math/PIO2_TABLE i32 (i32.const 88)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/builtins/f32.MAX_VALUE f32 (f32.const 3402823466385288598117041e14)) (global $~lib/builtins/f64.MIN_VALUE f64 (f64.const 5e-324)) (global $~lib/math/random_seeded (mut i32) (i32.const 0)) diff --git a/tests/compiler/std/mod.json b/tests/compiler/std/mod.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/std/mod.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/new.json b/tests/compiler/std/new.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/std/new.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index ac0c4944b6..45fa3ebdf2 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -84,7 +84,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -99,7 +99,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.ts b/tests/compiler/std/new.ts index 92f356eb46..2eecae5e88 100644 --- a/tests/compiler/std/new.ts +++ b/tests/compiler/std/new.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - class AClass { static aStaticField: i32 = 0; aField: i32 = 1; diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 13b327ae1a..81e5b86fb7 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -11,9 +11,9 @@ (elem (i32.const 0) $null) (global $std/new/AClass.aStaticField (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/new/aClass (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) @@ -141,7 +141,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/object-literal.json b/tests/compiler/std/object-literal.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/std/object-literal.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat similarity index 69% rename from tests/compiler/object-literal.optimized.wat rename to tests/compiler/std/object-literal.optimized.wat index 19722400ca..25b1184b61 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -1,22 +1,31 @@ (module + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 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$vi (func (param i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d") - (data (i32.const 40) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 80) "\01\00\00\00\"\00\00\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\01\00\00\00\16") + (data (i32.const 24) "h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d") + (data (i32.const 48) "\01\00\00\00\1e") + (data (i32.const 64) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 96) "\01\00\00\00*") + (data (i32.const 112) "s\00t\00d\00/\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") + (table $0 4 funcref) + (elem (i32.const 0) $null $~lib/string/String~iterate $std/object-literal/Foo~iterate $~lib/string/String~iterate) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -78,12 +87,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -96,24 +105,40 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 i32.add ) - (func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/object-literal/Foo~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.tee $0 + if + local.get $0 + local.get $1 + call_indirect (type $FUNCSIG$vi) + end + ) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 124 + i32.const 156 i32.le_u if i32.const 0 - i32.const 48 - i32.const 149 + i32.const 64 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $2 i32.load @@ -121,8 +146,8 @@ i32.ne if i32.const 0 - i32.const 48 - i32.const 151 + i32.const 64 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -132,10 +157,10 @@ i32.store local.get $0 ) - (func $~lib/util/string/compareImpl (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/compareImpl (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 16 + i32.const 24 local.set $2 loop $continue|0 local.get $1 @@ -168,10 +193,10 @@ end local.get $3 ) - (func $~lib/string/String.__eq (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.__eq (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 16 + i32.const 24 i32.eq if i32.const 1 @@ -191,7 +216,7 @@ return end local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -211,14 +236,14 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $object-literal/bar (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/object-literal/bar (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 1 i32.ne if i32.const 0 - i32.const 88 + i32.const 112 i32.const 9 i32.const 2 call $~lib/env/abort @@ -230,16 +255,16 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 112 i32.const 10 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start:object-literal (; 7 ;) (type $FUNCSIG$v) + (func $start:std/object-literal (; 9 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 128 + i32.const 160 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -251,10 +276,10 @@ i32.const 1 i32.store local.get $0 - i32.const 16 + i32.const 24 i32.store offset=4 local.get $0 - call $object-literal/bar + call $std/object-literal/bar i32.const 4 call $~lib/runtime/allocate i32.const 3 @@ -268,7 +293,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 112 i32.const 26 i32.const 2 call $~lib/env/abort @@ -287,17 +312,17 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 112 i32.const 21 i32.const 4 call $~lib/env/abort unreachable end ) - (func $start (; 8 ;) (type $FUNCSIG$v) - call $start:object-literal + (func $start (; 10 ;) (type $FUNCSIG$v) + call $start:std/object-literal ) - (func $null (; 9 ;) (type $FUNCSIG$v) + (func $null (; 11 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/object-literal.ts b/tests/compiler/std/object-literal.ts similarity index 93% rename from tests/compiler/object-literal.ts rename to tests/compiler/std/object-literal.ts index e9682c107c..3a5b8b46a5 100644 --- a/tests/compiler/object-literal.ts +++ b/tests/compiler/std/object-literal.ts @@ -1,4 +1,4 @@ -import "allocator/arena"; +import "collector/dummy"; class Foo { bar: i32; diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/std/object-literal.untouched.wat similarity index 67% rename from tests/compiler/object-literal.untouched.wat rename to tests/compiler/std/object-literal.untouched.wat index de5a7b21d9..89c4fa6f10 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/std/object-literal.untouched.wat @@ -1,27 +1,33 @@ (module + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 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$vi (func (param i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d\00") - (data (i32.const 40) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 80) "\01\00\00\00\"\00\00\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") - (table $0 1 funcref) - (elem (i32.const 0) $null) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (data (i32.const 8) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d\00") + (data (i32.const 48) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 96) "\01\00\00\00*\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") + (table $0 4 funcref) + (elem (i32.const 0) $null $~lib/string/String~iterate $std/object-literal/Foo~iterate $std/object-literal/Foo2~iterate) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 124)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 156)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -33,7 +39,7 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -112,12 +118,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -130,10 +136,33 @@ local.get $0 i32.store offset=4 local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/object-literal/Foo~iterate (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $2 + if + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $2 + local.get $1 + call $~lib/string/String~iterate + end + ) + (func $~lib/collector/dummy/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -141,8 +170,8 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 149 + i32.const 64 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -158,8 +187,8 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 151 + i32.const 64 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -168,8 +197,10 @@ local.get $1 i32.store local.get $0 + call $~lib/collector/dummy/__ref_register + local.get $0 ) - (func $~lib/string/String#get:length (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -177,7 +208,7 @@ i32.const 1 i32.shr_u ) - (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) + (func $~lib/util/string/compareImpl (; 10 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -230,7 +261,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -274,7 +305,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $object-literal/bar (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/object-literal/bar (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 1 @@ -282,7 +313,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 112 i32.const 9 i32.const 2 call $~lib/env/abort @@ -290,19 +321,22 @@ end local.get $0 i32.load offset=4 - i32.const 16 + i32.const 24 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 88 + i32.const 112 i32.const 10 i32.const 2 call $~lib/env/abort unreachable end ) - (func $object-literal/bar2 (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/object-literal/Foo2~iterate (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $std/object-literal/bar2 (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 2 @@ -310,14 +344,14 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 112 i32.const 26 i32.const 2 call $~lib/env/abort unreachable end ) - (func $object-literal/Foo2#test (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/object-literal/Foo2#test (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 3 @@ -325,14 +359,14 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 112 i32.const 21 i32.const 4 call $~lib/env/abort unreachable end ) - (func $start:object-literal (; 12 ;) (type $FUNCSIG$v) + (func $start:std/object-literal (; 16 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -356,11 +390,11 @@ i32.const 1 i32.store local.get $0 - i32.const 16 + i32.const 24 i32.store offset=4 local.get $0 end - call $object-literal/bar + call $std/object-literal/bar block (result i32) i32.const 4 call $~lib/runtime/allocate @@ -372,7 +406,7 @@ i32.store local.get $1 end - call $object-literal/bar2 + call $std/object-literal/bar2 block (result i32) i32.const 4 call $~lib/runtime/allocate @@ -384,11 +418,11 @@ i32.store local.get $2 end - call $object-literal/Foo2#test + call $std/object-literal/Foo2#test ) - (func $start (; 13 ;) (type $FUNCSIG$v) - call $start:object-literal + (func $start (; 17 ;) (type $FUNCSIG$v) + call $start:std/object-literal ) - (func $null (; 14 ;) (type $FUNCSIG$v) + (func $null (; 18 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/operator-overloading.json b/tests/compiler/std/operator-overloading.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/std/operator-overloading.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 2d42564ecb..2fa1f40528 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -167,7 +167,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -182,7 +182,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1310,7 +1310,7 @@ if i32.const 0 i32.const 56 - i32.const 147 + i32.const 145 i32.const 0 call $~lib/env/abort unreachable @@ -1353,7 +1353,7 @@ if i32.const 0 i32.const 56 - i32.const 153 + i32.const 151 i32.const 0 call $~lib/env/abort unreachable @@ -1397,7 +1397,7 @@ if i32.const 0 i32.const 56 - i32.const 159 + i32.const 157 i32.const 0 call $~lib/env/abort unreachable @@ -1441,7 +1441,7 @@ if i32.const 0 i32.const 56 - i32.const 165 + i32.const 163 i32.const 0 call $~lib/env/abort unreachable @@ -1484,7 +1484,7 @@ if i32.const 0 i32.const 56 - i32.const 171 + i32.const 169 i32.const 0 call $~lib/env/abort unreachable @@ -1518,7 +1518,7 @@ if i32.const 0 i32.const 56 - i32.const 177 + i32.const 175 i32.const 0 call $~lib/env/abort unreachable @@ -1562,7 +1562,7 @@ if i32.const 0 i32.const 56 - i32.const 183 + i32.const 181 i32.const 0 call $~lib/env/abort unreachable @@ -1606,7 +1606,7 @@ if i32.const 0 i32.const 56 - i32.const 189 + i32.const 187 i32.const 0 call $~lib/env/abort unreachable @@ -1650,7 +1650,7 @@ if i32.const 0 i32.const 56 - i32.const 195 + i32.const 193 i32.const 0 call $~lib/env/abort unreachable @@ -1687,7 +1687,7 @@ if i32.const 0 i32.const 56 - i32.const 201 + i32.const 199 i32.const 0 call $~lib/env/abort unreachable @@ -1722,7 +1722,7 @@ if i32.const 0 i32.const 56 - i32.const 207 + i32.const 205 i32.const 0 call $~lib/env/abort unreachable @@ -1749,7 +1749,7 @@ if i32.const 0 i32.const 56 - i32.const 211 + i32.const 209 i32.const 0 call $~lib/env/abort unreachable @@ -1778,7 +1778,7 @@ if i32.const 0 i32.const 56 - i32.const 215 + i32.const 213 i32.const 0 call $~lib/env/abort unreachable @@ -1815,7 +1815,7 @@ if i32.const 0 i32.const 56 - i32.const 221 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -1852,7 +1852,7 @@ if i32.const 0 i32.const 56 - i32.const 227 + i32.const 225 i32.const 0 call $~lib/env/abort unreachable @@ -1889,7 +1889,7 @@ if i32.const 0 i32.const 56 - i32.const 233 + i32.const 231 i32.const 0 call $~lib/env/abort unreachable @@ -1926,7 +1926,7 @@ if i32.const 0 i32.const 56 - i32.const 239 + i32.const 237 i32.const 0 call $~lib/env/abort unreachable @@ -1963,7 +1963,7 @@ if i32.const 0 i32.const 56 - i32.const 244 + i32.const 242 i32.const 0 call $~lib/env/abort unreachable @@ -2000,7 +2000,7 @@ if i32.const 0 i32.const 56 - i32.const 249 + i32.const 247 i32.const 0 call $~lib/env/abort unreachable @@ -2037,7 +2037,7 @@ if i32.const 0 i32.const 56 - i32.const 254 + i32.const 252 i32.const 0 call $~lib/env/abort unreachable @@ -2072,7 +2072,7 @@ if i32.const 0 i32.const 56 - i32.const 259 + i32.const 257 i32.const 0 call $~lib/env/abort unreachable @@ -2115,7 +2115,7 @@ if i32.const 0 i32.const 56 - i32.const 264 + i32.const 262 i32.const 0 call $~lib/env/abort unreachable @@ -2158,7 +2158,7 @@ if i32.const 0 i32.const 56 - i32.const 269 + i32.const 267 i32.const 0 call $~lib/env/abort unreachable @@ -2198,7 +2198,7 @@ if i32.const 0 i32.const 56 - i32.const 274 + i32.const 272 i32.const 0 call $~lib/env/abort unreachable @@ -2209,7 +2209,7 @@ if i32.const 0 i32.const 56 - i32.const 275 + i32.const 273 i32.const 0 call $~lib/env/abort unreachable @@ -2250,7 +2250,7 @@ if i32.const 0 i32.const 56 - i32.const 281 + i32.const 279 i32.const 0 call $~lib/env/abort unreachable @@ -2286,7 +2286,7 @@ if i32.const 0 i32.const 56 - i32.const 284 + i32.const 282 i32.const 0 call $~lib/env/abort unreachable @@ -2324,7 +2324,7 @@ if i32.const 0 i32.const 56 - i32.const 289 + i32.const 287 i32.const 0 call $~lib/env/abort unreachable @@ -2346,7 +2346,7 @@ if i32.const 0 i32.const 56 - i32.const 290 + i32.const 288 i32.const 0 call $~lib/env/abort unreachable @@ -2381,7 +2381,7 @@ if i32.const 0 i32.const 56 - i32.const 293 + i32.const 291 i32.const 0 call $~lib/env/abort unreachable @@ -2402,7 +2402,7 @@ if i32.const 0 i32.const 56 - i32.const 294 + i32.const 292 i32.const 0 call $~lib/env/abort unreachable @@ -2457,7 +2457,7 @@ if i32.const 0 i32.const 56 - i32.const 314 + i32.const 312 i32.const 0 call $~lib/env/abort unreachable @@ -2512,7 +2512,7 @@ if i32.const 0 i32.const 56 - i32.const 334 + i32.const 332 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.ts b/tests/compiler/std/operator-overloading.ts index d2098158d4..d8cca19adc 100644 --- a/tests/compiler/std/operator-overloading.ts +++ b/tests/compiler/std/operator-overloading.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - class Tester { constructor(public x: i32, public y: i32) { } diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 23756cc7b9..9b9d0a420a 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -13,9 +13,9 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/operator-overloading/a1 (mut i32) (i32.const 0)) (global $std/operator-overloading/a2 (mut i32) (i32.const 0)) @@ -209,7 +209,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -226,7 +226,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1889,7 +1889,7 @@ if i32.const 0 i32.const 56 - i32.const 147 + i32.const 145 i32.const 0 call $~lib/env/abort unreachable @@ -1925,7 +1925,7 @@ if i32.const 0 i32.const 56 - i32.const 153 + i32.const 151 i32.const 0 call $~lib/env/abort unreachable @@ -1961,7 +1961,7 @@ if i32.const 0 i32.const 56 - i32.const 159 + i32.const 157 i32.const 0 call $~lib/env/abort unreachable @@ -1997,7 +1997,7 @@ if i32.const 0 i32.const 56 - i32.const 165 + i32.const 163 i32.const 0 call $~lib/env/abort unreachable @@ -2033,7 +2033,7 @@ if i32.const 0 i32.const 56 - i32.const 171 + i32.const 169 i32.const 0 call $~lib/env/abort unreachable @@ -2069,7 +2069,7 @@ if i32.const 0 i32.const 56 - i32.const 177 + i32.const 175 i32.const 0 call $~lib/env/abort unreachable @@ -2105,7 +2105,7 @@ if i32.const 0 i32.const 56 - i32.const 183 + i32.const 181 i32.const 0 call $~lib/env/abort unreachable @@ -2141,7 +2141,7 @@ if i32.const 0 i32.const 56 - i32.const 189 + i32.const 187 i32.const 0 call $~lib/env/abort unreachable @@ -2177,7 +2177,7 @@ if i32.const 0 i32.const 56 - i32.const 195 + i32.const 193 i32.const 0 call $~lib/env/abort unreachable @@ -2203,7 +2203,7 @@ if i32.const 0 i32.const 56 - i32.const 201 + i32.const 199 i32.const 0 call $~lib/env/abort unreachable @@ -2229,7 +2229,7 @@ if i32.const 0 i32.const 56 - i32.const 207 + i32.const 205 i32.const 0 call $~lib/env/abort unreachable @@ -2245,7 +2245,7 @@ if i32.const 0 i32.const 56 - i32.const 211 + i32.const 209 i32.const 0 call $~lib/env/abort unreachable @@ -2261,7 +2261,7 @@ if i32.const 0 i32.const 56 - i32.const 215 + i32.const 213 i32.const 0 call $~lib/env/abort unreachable @@ -2287,7 +2287,7 @@ if i32.const 0 i32.const 56 - i32.const 221 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -2313,7 +2313,7 @@ if i32.const 0 i32.const 56 - i32.const 227 + i32.const 225 i32.const 0 call $~lib/env/abort unreachable @@ -2339,7 +2339,7 @@ if i32.const 0 i32.const 56 - i32.const 233 + i32.const 231 i32.const 0 call $~lib/env/abort unreachable @@ -2365,7 +2365,7 @@ if i32.const 0 i32.const 56 - i32.const 239 + i32.const 237 i32.const 0 call $~lib/env/abort unreachable @@ -2396,7 +2396,7 @@ if i32.const 0 i32.const 56 - i32.const 244 + i32.const 242 i32.const 0 call $~lib/env/abort unreachable @@ -2427,7 +2427,7 @@ if i32.const 0 i32.const 56 - i32.const 249 + i32.const 247 i32.const 0 call $~lib/env/abort unreachable @@ -2458,7 +2458,7 @@ if i32.const 0 i32.const 56 - i32.const 254 + i32.const 252 i32.const 0 call $~lib/env/abort unreachable @@ -2490,7 +2490,7 @@ if i32.const 0 i32.const 56 - i32.const 259 + i32.const 257 i32.const 0 call $~lib/env/abort unreachable @@ -2526,7 +2526,7 @@ if i32.const 0 i32.const 56 - i32.const 264 + i32.const 262 i32.const 0 call $~lib/env/abort unreachable @@ -2562,7 +2562,7 @@ if i32.const 0 i32.const 56 - i32.const 269 + i32.const 267 i32.const 0 call $~lib/env/abort unreachable @@ -2592,7 +2592,7 @@ if i32.const 0 i32.const 56 - i32.const 274 + i32.const 272 i32.const 0 call $~lib/env/abort unreachable @@ -2604,7 +2604,7 @@ if i32.const 0 i32.const 56 - i32.const 275 + i32.const 273 i32.const 0 call $~lib/env/abort unreachable @@ -2634,7 +2634,7 @@ if i32.const 0 i32.const 56 - i32.const 281 + i32.const 279 i32.const 0 call $~lib/env/abort unreachable @@ -2659,7 +2659,7 @@ if i32.const 0 i32.const 56 - i32.const 284 + i32.const 282 i32.const 0 call $~lib/env/abort unreachable @@ -2694,7 +2694,7 @@ if i32.const 0 i32.const 56 - i32.const 289 + i32.const 287 i32.const 0 call $~lib/env/abort unreachable @@ -2716,7 +2716,7 @@ if i32.const 0 i32.const 56 - i32.const 290 + i32.const 288 i32.const 0 call $~lib/env/abort unreachable @@ -2746,7 +2746,7 @@ if i32.const 0 i32.const 56 - i32.const 293 + i32.const 291 i32.const 0 call $~lib/env/abort unreachable @@ -2768,7 +2768,7 @@ if i32.const 0 i32.const 56 - i32.const 294 + i32.const 292 i32.const 0 call $~lib/env/abort unreachable @@ -2834,7 +2834,7 @@ if i32.const 0 i32.const 56 - i32.const 314 + i32.const 312 i32.const 0 call $~lib/env/abort unreachable @@ -2900,7 +2900,7 @@ if i32.const 0 i32.const 56 - i32.const 334 + i32.const 332 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/pointer.json b/tests/compiler/std/pointer.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/std/pointer.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/polyfills.json b/tests/compiler/std/polyfills.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/std/polyfills.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/runtime.json b/tests/compiler/std/runtime.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/std/runtime.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index edd65d22ca..49bc79faa3 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -1,35 +1,35 @@ (module - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$v (func)) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00,") - (data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 72) "\01\00\00\00\1c") - (data (i32.const 88) "s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 120) "\01\00\00\00\10") - (data (i32.const 136) "b\00a\00r\00r\00i\00e\00r\001") - (data (i32.const 152) "\01\00\00\00\10") - (data (i32.const 168) "b\00a\00r\00r\00i\00e\00r\002") - (data (i32.const 184) "\01\00\00\00\10") - (data (i32.const 200) "b\00a\00r\00r\00i\00e\00r\003") - (data (i32.const 216) "\01\00\00\00\1e") + (data (i32.const 8) "\03\00\00\00\1c") + (data (i32.const 24) "s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 56) "\03\00\00\00\10") + (data (i32.const 72) "b\00a\00r\00r\00i\00e\00r\001") + (data (i32.const 88) "\03\00\00\00\10") + (data (i32.const 104) "b\00a\00r\00r\00i\00e\00r\002") + (data (i32.const 120) "\03\00\00\00\10") + (data (i32.const 136) "b\00a\00r\00r\00i\00e\00r\003") + (data (i32.const 152) "\03\00\00\00,") + (data (i32.const 168) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 216) "\03\00\00\00\1e") (data (i32.const 232) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 4 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate) - (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (elem (i32.const 0) $null $std/runtime/A~iterate $std/runtime/A~iterate $std/runtime/A~iterate) (global $std/runtime/register_ref (mut i32) (i32.const 0)) (global $std/runtime/barrier1 (mut i32) (i32.const 0)) (global $std/runtime/barrier2 (mut i32) (i32.const 0)) (global $std/runtime/barrier3 (mut i32) (i32.const 0)) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $std/runtime/ref1 (mut i32) (i32.const 0)) (global $std/runtime/header1 (mut i32) (i32.const 0)) (global $std/runtime/ref2 (mut i32) (i32.const 0)) @@ -44,7 +44,7 @@ (export "table" (table $0)) (export "main" (func $std/runtime/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/string/String~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/runtime/A~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -53,8 +53,8 @@ i32.ge_u if i32.const 0 - i32.const 24 - i32.const 135 + i32.const 168 + i32.const 159 i32.const 4 call $~lib/env/abort unreachable @@ -73,8 +73,8 @@ i32.ge_u if i32.const 0 - i32.const 24 - i32.const 158 + i32.const 168 + i32.const 184 i32.const 4 call $~lib/env/abort unreachable @@ -84,8 +84,8 @@ i32.ge_u if i32.const 0 - i32.const 24 - i32.const 159 + i32.const 168 + i32.const 185 i32.const 4 call $~lib/env/abort unreachable @@ -110,8 +110,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 81 + i32.const 168 + i32.const 104 i32.const 4 call $~lib/env/abort unreachable @@ -128,8 +128,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 82 + i32.const 168 + i32.const 105 i32.const 11 call $~lib/env/abort unreachable @@ -141,8 +141,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 419 + i32.const 168 + i32.const 447 i32.const 2 call $~lib/env/abort unreachable @@ -158,8 +158,8 @@ i32.ge_u if i32.const 0 - i32.const 24 - i32.const 149 + i32.const 168 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable @@ -169,8 +169,8 @@ i32.ge_u if i32.const 0 - i32.const 24 - i32.const 150 + i32.const 168 + i32.const 176 i32.const 4 call $~lib/env/abort unreachable @@ -192,8 +192,8 @@ i32.ge_u if i32.const 0 - i32.const 24 - i32.const 129 + i32.const 168 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -218,8 +218,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 249 + i32.const 168 + i32.const 277 i32.const 4 call $~lib/env/abort unreachable @@ -241,8 +241,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 251 + i32.const 168 + i32.const 279 i32.const 4 call $~lib/env/abort unreachable @@ -342,8 +342,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 73 + i32.const 168 + i32.const 96 i32.const 4 call $~lib/env/abort unreachable @@ -356,8 +356,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 74 + i32.const 168 + i32.const 97 i32.const 11 call $~lib/env/abort unreachable @@ -372,8 +372,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 325 + i32.const 168 + i32.const 353 i32.const 4 call $~lib/env/abort unreachable @@ -384,8 +384,8 @@ i32.ne if i32.const 0 - i32.const 24 - i32.const 326 + i32.const 168 + i32.const 354 i32.const 4 call $~lib/env/abort unreachable @@ -397,8 +397,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 327 + i32.const 168 + i32.const 355 i32.const 4 call $~lib/env/abort unreachable @@ -418,8 +418,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 180 + i32.const 168 + i32.const 208 i32.const 4 call $~lib/env/abort unreachable @@ -432,8 +432,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 182 + i32.const 168 + i32.const 210 i32.const 4 call $~lib/env/abort unreachable @@ -456,8 +456,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 184 + i32.const 168 + i32.const 212 i32.const 4 call $~lib/env/abort unreachable @@ -468,8 +468,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 188 + i32.const 168 + i32.const 216 i32.const 23 call $~lib/env/abort unreachable @@ -509,8 +509,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 202 + i32.const 168 + i32.const 230 i32.const 24 call $~lib/env/abort unreachable @@ -523,8 +523,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 204 + i32.const 168 + i32.const 232 i32.const 6 call $~lib/env/abort unreachable @@ -568,8 +568,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 217 + i32.const 168 + i32.const 245 i32.const 4 call $~lib/env/abort unreachable @@ -647,8 +647,8 @@ i32.gt_u if i32.const 0 - i32.const 24 - i32.const 368 + i32.const 168 + i32.const 396 i32.const 4 call $~lib/env/abort unreachable @@ -658,8 +658,8 @@ i32.and if i32.const 0 - i32.const 24 - i32.const 369 + i32.const 168 + i32.const 397 i32.const 4 call $~lib/env/abort unreachable @@ -669,8 +669,8 @@ i32.and if i32.const 0 - i32.const 24 - i32.const 370 + i32.const 168 + i32.const 398 i32.const 4 call $~lib/env/abort unreachable @@ -686,8 +686,8 @@ i32.lt_u if i32.const 0 - i32.const 24 - i32.const 375 + i32.const 168 + i32.const 403 i32.const 6 call $~lib/env/abort unreachable @@ -714,8 +714,8 @@ i32.lt_u if i32.const 0 - i32.const 24 - i32.const 384 + i32.const 168 + i32.const 412 i32.const 6 call $~lib/env/abort unreachable @@ -767,8 +767,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 413 + i32.const 168 + i32.const 441 i32.const 2 call $~lib/env/abort unreachable @@ -793,8 +793,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 287 + i32.const 168 + i32.const 315 i32.const 4 call $~lib/env/abort unreachable @@ -872,8 +872,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 314 + i32.const 168 + i32.const 342 i32.const 16 call $~lib/env/abort unreachable @@ -899,8 +899,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 339 + i32.const 168 + i32.const 367 i32.const 4 call $~lib/env/abort unreachable @@ -919,8 +919,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 340 + i32.const 168 + i32.const 368 i32.const 4 call $~lib/env/abort unreachable @@ -930,8 +930,8 @@ i32.and if i32.const 0 - i32.const 24 - i32.const 341 + i32.const 168 + i32.const 369 i32.const 4 call $~lib/env/abort unreachable @@ -982,8 +982,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 359 + i32.const 168 + i32.const 387 i32.const 25 call $~lib/env/abort unreachable @@ -1143,8 +1143,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 472 + i32.const 168 + i32.const 502 i32.const 12 call $~lib/env/abort unreachable @@ -1158,8 +1158,8 @@ i32.lt_u if i32.const 0 - i32.const 24 - i32.const 475 + i32.const 168 + i32.const 505 i32.const 2 call $~lib/env/abort unreachable @@ -2467,8 +2467,8 @@ i32.and if i32.const 0 - i32.const 24 - i32.const 488 + i32.const 168 + i32.const 518 i32.const 6 call $~lib/env/abort unreachable @@ -2563,7 +2563,7 @@ if i32.const 0 i32.const 232 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable @@ -2600,7 +2600,7 @@ if i32.const 0 i32.const 232 - i32.const 173 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -2615,7 +2615,7 @@ if i32.const 0 i32.const 232 - i32.const 175 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -2631,7 +2631,7 @@ if i32.const 0 i32.const 232 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -2646,13 +2646,13 @@ if i32.const 0 i32.const 232 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable end local.get $1 - i32.const 2 + i32.const 1 i32.store local.get $0 global.set $std/runtime/register_ref @@ -2696,7 +2696,7 @@ br $repeat|0 else i32.const 0 - i32.const 88 + i32.const 24 i32.const 36 i32.const 2 call $~lib/env/abort @@ -2767,7 +2767,7 @@ br $continue|2 end end - i32.const 136 + i32.const 72 i32.const 1 global.get $std/runtime/barrier1 f64.convert_i32_u @@ -2776,7 +2776,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 168 + i32.const 104 i32.const 1 global.get $std/runtime/barrier2 f64.convert_i32_u @@ -2785,7 +2785,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 200 + i32.const 136 i32.const 1 global.get $std/runtime/barrier3 f64.convert_i32_u @@ -2807,7 +2807,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 51 i32.const 0 call $~lib/env/abort @@ -2819,7 +2819,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 52 i32.const 0 call $~lib/env/abort @@ -2833,7 +2833,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 53 i32.const 0 call $~lib/env/abort @@ -2845,7 +2845,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 54 i32.const 0 call $~lib/env/abort @@ -2860,7 +2860,7 @@ i32.eq if i32.const 0 - i32.const 88 + i32.const 24 i32.const 56 i32.const 0 call $~lib/env/abort @@ -2876,7 +2876,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 58 i32.const 0 call $~lib/env/abort @@ -2892,7 +2892,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 61 i32.const 0 call $~lib/env/abort @@ -2908,7 +2908,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 65 i32.const 0 call $~lib/env/abort @@ -2920,11 +2920,11 @@ global.set $std/runtime/header4 global.get $std/runtime/header4 i32.load - i32.const 2 + i32.const 1 i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 67 i32.const 0 call $~lib/env/abort @@ -2936,7 +2936,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 68 i32.const 0 call $~lib/env/abort @@ -2953,7 +2953,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 71 i32.const 0 call $~lib/env/abort @@ -2969,7 +2969,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 72 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 7f2f7fa64d..0bf3b556e7 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -1,49 +1,49 @@ (module - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$v (func)) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") - (data (i32.const 72) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 120) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\001\00") - (data (i32.const 152) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\002\00") - (data (i32.const 184) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\003\00") - (data (i32.const 216) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\03\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\03\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\001\00") + (data (i32.const 88) "\03\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\002\00") + (data (i32.const 120) "\03\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\003\00") + (data (i32.const 152) "\03\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 216) "\03\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 4 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $std/runtime/A~iterate $std/runtime/B~iterate) + (elem (i32.const 0) $null $std/runtime/A~iterate $std/runtime/B~iterate $~lib/string/String~iterate) + (global $std/runtime/register_ref (mut i32) (i32.const 0)) + (global $std/runtime/link_ref (mut i32) (i32.const 0)) + (global $std/runtime/link_parentRef (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $std/runtime/barrier1 (mut i32) (i32.const 0)) + (global $std/runtime/barrier2 (mut i32) (i32.const 0)) + (global $std/runtime/barrier3 (mut i32) (i32.const 0)) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) - (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) - (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) - (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) - (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) - (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) - (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) - (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) - (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) - (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) + (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) - (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) + (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) + (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) + (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) + (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) + (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) - (global $std/runtime/register_ref (mut i32) (i32.const 0)) - (global $std/runtime/link_ref (mut i32) (i32.const 0)) - (global $std/runtime/link_parentRef (mut i32) (i32.const 0)) - (global $std/runtime/barrier1 (mut i32) (i32.const 0)) - (global $std/runtime/barrier2 (mut i32) (i32.const 0)) - (global $std/runtime/barrier3 (mut i32) (i32.const 0)) (global $std/runtime/ref1 (mut i32) (i32.const 0)) (global $std/runtime/header1 (mut i32) (i32.const 0)) (global $std/runtime/ref2 (mut i32) (i32.const 0)) @@ -60,30 +60,14 @@ (export "table" (table $0)) (export "main" (func $std/runtime/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/string/String~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $std/runtime/A~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) ) - (func $start:~lib/allocator/tlsf (; 3 ;) (type $FUNCSIG$v) - i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS - i32.shl - i32.const 32 - i32.le_s - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 114 - i32.const 0 - call $~lib/env/abort - unreachable - end + (func $std/runtime/B~iterate (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) ) - (func $std/runtime/A~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - ) - (func $std/runtime/B~iterate (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/string/String~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) ) - (func $~lib/runtime/ADJUSTOBLOCK (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -95,7 +79,7 @@ i32.sub i32.shl ) - (func $std/runtime/isPowerOf2 (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/runtime/isPowerOf2 (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 0 @@ -113,20 +97,20 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 0 local.get $1 i32.store offset=2912 ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u i32.eqz if i32.const 0 - i32.const 24 - i32.const 135 + i32.const 168 + i32.const 159 i32.const 4 call $~lib/env/abort unreachable @@ -139,15 +123,15 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 10 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 9 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u i32.eqz if i32.const 0 - i32.const 24 - i32.const 158 + i32.const 168 + i32.const 184 i32.const 4 call $~lib/env/abort unreachable @@ -158,8 +142,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 159 + i32.const 168 + i32.const 185 i32.const 4 call $~lib/env/abort unreachable @@ -176,11 +160,11 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Root#get:tailRef (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.load offset=2912 ) - (func $~lib/allocator/tlsf/Block#get:right (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -191,8 +175,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 81 + i32.const 168 + i32.const 104 i32.const 4 call $~lib/env/abort unreachable @@ -211,8 +195,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 24 - i32.const 82 + i32.const 168 + i32.const 105 i32.const 11 call $~lib/env/abort unreachable @@ -220,15 +204,15 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/fls (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 24 - i32.const 419 + i32.const 168 + i32.const 447 i32.const 2 call $~lib/env/abort unreachable @@ -238,15 +222,15 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u i32.eqz if i32.const 0 - i32.const 24 - i32.const 149 + i32.const 168 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable @@ -257,8 +241,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 150 + i32.const 168 + i32.const 176 i32.const 4 call $~lib/env/abort unreachable @@ -274,15 +258,15 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u i32.eqz if i32.const 0 - i32.const 24 - i32.const 129 + i32.const 168 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -294,7 +278,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -311,8 +295,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 249 + i32.const 168 + i32.const 277 i32.const 4 call $~lib/env/abort unreachable @@ -337,8 +321,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 251 + i32.const 168 + i32.const 279 i32.const 4 call $~lib/env/abort unreachable @@ -439,7 +423,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -448,8 +432,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 73 + i32.const 168 + i32.const 96 i32.const 4 call $~lib/env/abort unreachable @@ -462,8 +446,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 24 - i32.const 74 + i32.const 168 + i32.const 97 i32.const 11 call $~lib/env/abort unreachable @@ -471,7 +455,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/Root#setJump (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.load global.get $~lib/allocator/tlsf/FREE @@ -479,8 +463,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 325 + i32.const 168 + i32.const 353 i32.const 4 call $~lib/env/abort unreachable @@ -492,8 +476,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 326 + i32.const 168 + i32.const 354 i32.const 4 call $~lib/env/abort unreachable @@ -505,8 +489,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 327 + i32.const 168 + i32.const 355 i32.const 4 call $~lib/env/abort unreachable @@ -517,7 +501,7 @@ local.get $1 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -531,8 +515,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 180 + i32.const 168 + i32.const 208 i32.const 4 call $~lib/env/abort unreachable @@ -546,8 +530,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 182 + i32.const 168 + i32.const 210 i32.const 4 call $~lib/env/abort unreachable @@ -572,8 +556,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 184 + i32.const 168 + i32.const 212 i32.const 4 call $~lib/env/abort unreachable @@ -584,8 +568,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 24 - i32.const 188 + i32.const 168 + i32.const 216 i32.const 23 call $~lib/env/abort unreachable @@ -632,8 +616,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 24 - i32.const 202 + i32.const 168 + i32.const 230 i32.const 24 call $~lib/env/abort unreachable @@ -650,8 +634,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 204 + i32.const 168 + i32.const 232 i32.const 6 call $~lib/env/abort unreachable @@ -705,8 +689,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 217 + i32.const 168 + i32.const 245 i32.const 4 call $~lib/env/abort unreachable @@ -783,7 +767,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -796,8 +780,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 368 + i32.const 168 + i32.const 396 i32.const 4 call $~lib/env/abort unreachable @@ -809,8 +793,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 369 + i32.const 168 + i32.const 397 i32.const 4 call $~lib/env/abort unreachable @@ -822,8 +806,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 370 + i32.const 168 + i32.const 398 i32.const 4 call $~lib/env/abort unreachable @@ -843,8 +827,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 375 + i32.const 168 + i32.const 403 i32.const 6 call $~lib/env/abort unreachable @@ -872,8 +856,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 384 + i32.const 168 + i32.const 412 i32.const 6 call $~lib/env/abort unreachable @@ -936,15 +920,15 @@ call $~lib/allocator/tlsf/Root#insert i32.const 1 ) - (func $~lib/allocator/tlsf/ffs (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 24 - i32.const 413 + i32.const 168 + i32.const 441 i32.const 2 call $~lib/env/abort unreachable @@ -952,15 +936,15 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/ffs (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 24 - i32.const 413 + i32.const 168 + i32.const 441 i32.const 2 call $~lib/env/abort unreachable @@ -968,7 +952,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -989,8 +973,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 287 + i32.const 168 + i32.const 315 i32.const 4 call $~lib/env/abort unreachable @@ -1085,8 +1069,8 @@ local.get $7 else i32.const 0 - i32.const 24 - i32.const 314 + i32.const 168 + i32.const 342 i32.const 16 call $~lib/env/abort unreachable @@ -1109,7 +1093,7 @@ end local.get $6 ) - (func $~lib/allocator/tlsf/Root#use (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1122,8 +1106,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 339 + i32.const 168 + i32.const 367 i32.const 4 call $~lib/env/abort unreachable @@ -1142,8 +1126,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 340 + i32.const 168 + i32.const 368 i32.const 4 call $~lib/env/abort unreachable @@ -1155,8 +1139,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 341 + i32.const 168 + i32.const 369 i32.const 4 call $~lib/env/abort unreachable @@ -1215,8 +1199,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 24 - i32.const 359 + i32.const 168 + i32.const 387 i32.const 25 call $~lib/env/abort unreachable @@ -1237,7 +1221,7 @@ global.get $~lib/allocator/tlsf/Block.INFO i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1441,8 +1425,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 24 - i32.const 472 + i32.const 168 + i32.const 502 i32.const 12 call $~lib/env/abort unreachable @@ -1462,8 +1446,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 475 + i32.const 168 + i32.const 505 i32.const 2 call $~lib/env/abort unreachable @@ -1473,12 +1457,12 @@ local.get $0 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/memory/memory.allocate (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/runtime/allocate (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -1500,7 +1484,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/util/memory/memcpy (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2701,7 +2685,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2932,7 +2916,7 @@ end end ) - (func $~lib/memory/memory.fill (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3189,7 +3173,7 @@ end end ) - (func $~lib/allocator/tlsf/__mem_free (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3213,8 +3197,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 488 + i32.const 168 + i32.const 518 i32.const 6 call $~lib/env/abort unreachable @@ -3232,15 +3216,15 @@ end end ) - (func $~lib/memory/memory.free (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/tlsf/__mem_free ) - (func $std/runtime/__ref_register (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/runtime/__ref_register (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $std/runtime/register_ref ) - (func $~lib/runtime/reallocate (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3311,7 +3295,7 @@ if i32.const 0 i32.const 232 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable @@ -3344,7 +3328,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/discard (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/discard (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3353,7 +3337,7 @@ if i32.const 0 i32.const 232 - i32.const 173 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -3370,7 +3354,7 @@ if i32.const 0 i32.const 232 - i32.const 175 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -3378,7 +3362,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/runtime/register (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3387,7 +3371,7 @@ if i32.const 0 i32.const 232 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -3404,7 +3388,7 @@ if i32.const 0 i32.const 232 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -3416,13 +3400,13 @@ call $std/runtime/__ref_register local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $~lib/string/String#get:length (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -3430,17 +3414,16 @@ i32.const 1 i32.shr_u ) - (func $start:std/runtime (; 39 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 38 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $start:~lib/allocator/tlsf + i32.const 1 i32.const 2 - i32.const 3 i32.ne i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 28 i32.const 0 call $~lib/env/abort @@ -3453,7 +3436,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 34 i32.const 0 call $~lib/env/abort @@ -3474,7 +3457,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 36 i32.const 2 call $~lib/env/abort @@ -3536,7 +3519,7 @@ end end end - i32.const 136 + i32.const 72 i32.const 1 global.get $std/runtime/barrier1 f64.convert_i32_u @@ -3545,7 +3528,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 168 + i32.const 104 i32.const 1 global.get $std/runtime/barrier2 f64.convert_i32_u @@ -3554,7 +3537,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 200 + i32.const 136 i32.const 1 global.get $std/runtime/barrier3 f64.convert_i32_u @@ -3581,7 +3564,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 51 i32.const 0 call $~lib/env/abort @@ -3594,7 +3577,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 52 i32.const 0 call $~lib/env/abort @@ -3614,7 +3597,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 53 i32.const 0 call $~lib/env/abort @@ -3627,7 +3610,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 54 i32.const 0 call $~lib/env/abort @@ -3649,7 +3632,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 56 i32.const 0 call $~lib/env/abort @@ -3666,7 +3649,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 58 i32.const 0 call $~lib/env/abort @@ -3691,7 +3674,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 61 i32.const 0 call $~lib/env/abort @@ -3708,7 +3691,7 @@ global.get $std/runtime/ref4 local.set $0 local.get $0 - i32.const 2 + i32.const 1 call $~lib/runtime/register end drop @@ -3718,7 +3701,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 65 i32.const 0 call $~lib/env/abort @@ -3730,12 +3713,12 @@ global.set $std/runtime/header4 global.get $std/runtime/header4 i32.load - i32.const 2 + i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 67 i32.const 0 call $~lib/env/abort @@ -3748,7 +3731,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 68 i32.const 0 call $~lib/env/abort @@ -3768,7 +3751,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 71 i32.const 0 call $~lib/env/abort @@ -3781,14 +3764,14 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 72 i32.const 0 call $~lib/env/abort unreachable end ) - (func $std/runtime/main (; 40 ;) (type $FUNCSIG$v) + (func $std/runtime/main (; 39 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -3797,9 +3780,9 @@ global.set $~lib/started end ) - (func $start (; 41 ;) (type $FUNCSIG$v) + (func $start (; 40 ;) (type $FUNCSIG$v) call $start:std/runtime ) - (func $null (; 42 ;) (type $FUNCSIG$v) + (func $null (; 41 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/set.json b/tests/compiler/std/set.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/std/set.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 1fca9dc689..4b37e13427 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -151,7 +151,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -166,7 +166,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -814,7 +814,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -834,7 +834,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -849,7 +849,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -868,7 +868,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -888,7 +888,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -903,7 +903,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -922,7 +922,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -936,7 +936,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -957,7 +957,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -975,7 +975,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -990,7 +990,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -1004,7 +1004,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -1025,7 +1025,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -1037,7 +1037,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -1362,7 +1362,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -1382,7 +1382,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -1397,7 +1397,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -1416,7 +1416,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -1436,7 +1436,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -1451,7 +1451,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -1470,7 +1470,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -1484,7 +1484,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -1505,7 +1505,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -1523,7 +1523,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -1538,7 +1538,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -1552,7 +1552,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -1573,7 +1573,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -1585,7 +1585,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -1997,7 +1997,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -2017,7 +2017,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -2032,7 +2032,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -2051,7 +2051,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -2071,7 +2071,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -2086,7 +2086,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -2105,7 +2105,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -2119,7 +2119,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -2140,7 +2140,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -2158,7 +2158,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -2173,7 +2173,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -2187,7 +2187,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -2208,7 +2208,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -2220,7 +2220,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -2581,7 +2581,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -2601,7 +2601,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -2616,7 +2616,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -2635,7 +2635,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -2655,7 +2655,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -2670,7 +2670,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -2689,7 +2689,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -2703,7 +2703,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -2724,7 +2724,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -2742,7 +2742,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -2757,7 +2757,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -2771,7 +2771,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -2792,7 +2792,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -2804,7 +2804,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -3183,7 +3183,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -3203,7 +3203,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -3218,7 +3218,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -3237,7 +3237,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -3257,7 +3257,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -3272,7 +3272,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -3291,7 +3291,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -3305,7 +3305,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -3326,7 +3326,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -3344,7 +3344,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -3359,7 +3359,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -3373,7 +3373,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -3394,7 +3394,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -3406,7 +3406,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -3456,7 +3456,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -3476,7 +3476,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -3491,7 +3491,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -3510,7 +3510,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -3530,7 +3530,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -3545,7 +3545,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -3564,7 +3564,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -3578,7 +3578,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -3599,7 +3599,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -3617,7 +3617,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -3632,7 +3632,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -3646,7 +3646,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -3667,7 +3667,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -3679,7 +3679,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -4129,7 +4129,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -4149,7 +4149,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -4164,7 +4164,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -4183,7 +4183,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -4203,7 +4203,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -4218,7 +4218,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -4237,7 +4237,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -4251,7 +4251,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -4272,7 +4272,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -4290,7 +4290,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -4305,7 +4305,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -4319,7 +4319,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -4340,7 +4340,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -4352,7 +4352,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -4402,7 +4402,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -4422,7 +4422,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -4437,7 +4437,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -4456,7 +4456,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -4476,7 +4476,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -4491,7 +4491,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -4510,7 +4510,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -4524,7 +4524,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -4545,7 +4545,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -4563,7 +4563,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -4578,7 +4578,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -4592,7 +4592,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -4613,7 +4613,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -4625,7 +4625,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -4978,7 +4978,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -4998,7 +4998,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -5013,7 +5013,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -5032,7 +5032,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -5052,7 +5052,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -5067,7 +5067,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -5086,7 +5086,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -5100,7 +5100,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -5121,7 +5121,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -5139,7 +5139,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -5154,7 +5154,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -5168,7 +5168,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -5189,7 +5189,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -5201,7 +5201,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -5554,7 +5554,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -5574,7 +5574,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -5589,7 +5589,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -5608,7 +5608,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -5628,7 +5628,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -5643,7 +5643,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -5662,7 +5662,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -5676,7 +5676,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -5697,7 +5697,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -5715,7 +5715,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -5730,7 +5730,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -5744,7 +5744,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -5765,7 +5765,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -5777,7 +5777,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.ts b/tests/compiler/std/set.ts index 1efb84ee32..d31b40cdc5 100644 --- a/tests/compiler/std/set.ts +++ b/tests/compiler/std/set.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import "collector/dummy"; function testNumeric(): void { diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index b2445bfdfb..8b0772f39c 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -25,9 +25,9 @@ (table $0 23 funcref) (elem (i32.const 0) $null $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/string/String~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) @@ -187,7 +187,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -204,7 +204,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1076,7 +1076,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -1091,7 +1091,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -1114,7 +1114,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -1136,7 +1136,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -1151,7 +1151,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -1174,7 +1174,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -1196,7 +1196,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -1213,7 +1213,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -1236,7 +1236,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -1259,7 +1259,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -1274,7 +1274,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -1291,7 +1291,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -1314,7 +1314,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -1329,7 +1329,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -1898,7 +1898,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -1913,7 +1913,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -1936,7 +1936,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -1958,7 +1958,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -1973,7 +1973,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -1996,7 +1996,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -2018,7 +2018,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -2035,7 +2035,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -2058,7 +2058,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -2081,7 +2081,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -2096,7 +2096,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -2113,7 +2113,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -2136,7 +2136,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -2151,7 +2151,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -2750,7 +2750,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -2765,7 +2765,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -2788,7 +2788,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -2810,7 +2810,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -2825,7 +2825,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -2848,7 +2848,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -2870,7 +2870,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -2887,7 +2887,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -2910,7 +2910,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -2933,7 +2933,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -2948,7 +2948,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -2965,7 +2965,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -2988,7 +2988,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -3003,7 +3003,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -3572,7 +3572,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -3587,7 +3587,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -3610,7 +3610,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -3632,7 +3632,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -3647,7 +3647,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -3670,7 +3670,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -3692,7 +3692,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -3709,7 +3709,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -3732,7 +3732,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -3755,7 +3755,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -3770,7 +3770,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -3787,7 +3787,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -3810,7 +3810,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -3825,7 +3825,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -4428,7 +4428,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -4443,7 +4443,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -4466,7 +4466,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -4488,7 +4488,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -4503,7 +4503,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -4526,7 +4526,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -4548,7 +4548,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -4565,7 +4565,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -4588,7 +4588,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -4611,7 +4611,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -4626,7 +4626,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -4643,7 +4643,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -4666,7 +4666,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -4681,7 +4681,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -5242,7 +5242,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -5257,7 +5257,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -5280,7 +5280,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -5302,7 +5302,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -5317,7 +5317,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -5340,7 +5340,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -5362,7 +5362,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -5379,7 +5379,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -5402,7 +5402,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -5425,7 +5425,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -5440,7 +5440,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -5457,7 +5457,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -5480,7 +5480,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -5495,7 +5495,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -6147,7 +6147,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -6162,7 +6162,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -6185,7 +6185,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -6207,7 +6207,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -6222,7 +6222,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -6245,7 +6245,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -6267,7 +6267,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -6284,7 +6284,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -6307,7 +6307,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -6330,7 +6330,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -6345,7 +6345,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -6362,7 +6362,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -6385,7 +6385,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -6400,7 +6400,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -6964,7 +6964,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -6979,7 +6979,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -7002,7 +7002,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -7024,7 +7024,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -7039,7 +7039,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -7062,7 +7062,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -7084,7 +7084,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -7101,7 +7101,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -7124,7 +7124,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -7147,7 +7147,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -7162,7 +7162,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -7179,7 +7179,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -7202,7 +7202,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -7217,7 +7217,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -7785,7 +7785,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -7800,7 +7800,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -7823,7 +7823,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -7845,7 +7845,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -7860,7 +7860,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -7883,7 +7883,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -7905,7 +7905,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -7922,7 +7922,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -7945,7 +7945,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -7968,7 +7968,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -7983,7 +7983,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -8000,7 +8000,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -8023,7 +8023,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -8038,7 +8038,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -8606,7 +8606,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -8621,7 +8621,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -8644,7 +8644,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -8666,7 +8666,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -8681,7 +8681,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -8704,7 +8704,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -8726,7 +8726,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -8743,7 +8743,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -8766,7 +8766,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -8789,7 +8789,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -8804,7 +8804,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -8821,7 +8821,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -8844,7 +8844,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -8859,7 +8859,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/simd.json b/tests/compiler/std/simd.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/std/simd.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/static-array.json b/tests/compiler/std/static-array.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/std/static-array.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index fa2ddb9eb8..165ecd17e4 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -1437,7 +1437,7 @@ if i32.const 0 i32.const 280 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable @@ -1671,7 +1671,7 @@ if i32.const 0 i32.const 192 - i32.const 8 + i32.const 6 i32.const 0 call $~lib/env/abort unreachable @@ -1683,7 +1683,7 @@ if i32.const 0 i32.const 192 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -1695,7 +1695,7 @@ if i32.const 0 i32.const 192 - i32.const 10 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -1712,7 +1712,7 @@ if i32.const 0 i32.const 192 - i32.const 12 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -1724,7 +1724,7 @@ if i32.const 0 i32.const 192 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -1736,7 +1736,7 @@ if i32.const 0 i32.const 192 - i32.const 15 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -1748,7 +1748,7 @@ if i32.const 0 i32.const 192 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -1761,7 +1761,7 @@ if i32.const 0 i32.const 192 - i32.const 18 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -1773,7 +1773,7 @@ if i32.const 0 i32.const 192 - i32.const 20 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -1785,7 +1785,7 @@ if i32.const 0 i32.const 192 - i32.const 21 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -1797,7 +1797,7 @@ if i32.const 0 i32.const 192 - i32.const 22 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -1810,7 +1810,7 @@ if i32.const 0 i32.const 192 - i32.const 24 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -1822,7 +1822,7 @@ if i32.const 0 i32.const 192 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -1834,7 +1834,7 @@ if i32.const 0 i32.const 192 - i32.const 27 + i32.const 25 i32.const 0 call $~lib/env/abort unreachable @@ -1846,7 +1846,7 @@ if i32.const 0 i32.const 192 - i32.const 28 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -1859,7 +1859,7 @@ if i32.const 0 i32.const 192 - i32.const 30 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/static-array.ts b/tests/compiler/std/static-array.ts index 851e819833..4fee0db3e0 100644 --- a/tests/compiler/std/static-array.ts +++ b/tests/compiler/std/static-array.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; // assignment checks for possible resize - const i: i32[] = [1, 2]; const I: i64[] = [3, 4]; const f: f32[] = [1.5, 2.5]; diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 35ff2ebe1b..869e4f88f1 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -31,10 +31,10 @@ (global $std/static-array/f i32 (i32.const 120)) (global $std/static-array/F i32 (i32.const 168)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/memory/HEAP_BASE i32 (i32.const 312)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -1928,7 +1928,7 @@ if i32.const 0 i32.const 280 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable @@ -2267,7 +2267,7 @@ if i32.const 0 i32.const 192 - i32.const 8 + i32.const 6 i32.const 0 call $~lib/env/abort unreachable @@ -2281,7 +2281,7 @@ if i32.const 0 i32.const 192 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -2295,7 +2295,7 @@ if i32.const 0 i32.const 192 - i32.const 10 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -2323,7 +2323,7 @@ if i32.const 0 i32.const 192 - i32.const 12 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -2336,7 +2336,7 @@ if i32.const 0 i32.const 192 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -2350,7 +2350,7 @@ if i32.const 0 i32.const 192 - i32.const 15 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -2364,7 +2364,7 @@ if i32.const 0 i32.const 192 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -2382,7 +2382,7 @@ if i32.const 0 i32.const 192 - i32.const 18 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -2395,7 +2395,7 @@ if i32.const 0 i32.const 192 - i32.const 20 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -2409,7 +2409,7 @@ if i32.const 0 i32.const 192 - i32.const 21 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -2423,7 +2423,7 @@ if i32.const 0 i32.const 192 - i32.const 22 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -2441,7 +2441,7 @@ if i32.const 0 i32.const 192 - i32.const 24 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -2454,7 +2454,7 @@ if i32.const 0 i32.const 192 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -2468,7 +2468,7 @@ if i32.const 0 i32.const 192 - i32.const 27 + i32.const 25 i32.const 0 call $~lib/env/abort unreachable @@ -2482,7 +2482,7 @@ if i32.const 0 i32.const 192 - i32.const 28 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -2500,7 +2500,7 @@ if i32.const 0 i32.const 192 - i32.const 30 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.json b/tests/compiler/std/string-utf8.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/std/string-utf8.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index abc325672d..71f47c898e 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -1464,7 +1464,7 @@ if i32.const 0 i32.const 136 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -1479,7 +1479,7 @@ if i32.const 0 i32.const 136 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1835,7 +1835,7 @@ if i32.const 0 i32.const 40 - i32.const 7 + i32.const 5 i32.const 0 call $~lib/env/abort unreachable @@ -1854,7 +1854,7 @@ if i32.const 0 i32.const 40 - i32.const 11 + i32.const 9 i32.const 0 call $~lib/env/abort unreachable @@ -1866,7 +1866,7 @@ if i32.const 0 i32.const 40 - i32.const 12 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -1878,7 +1878,7 @@ if i32.const 0 i32.const 40 - i32.const 13 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -1890,7 +1890,7 @@ if i32.const 0 i32.const 40 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -1902,7 +1902,7 @@ if i32.const 0 i32.const 40 - i32.const 15 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -1914,7 +1914,7 @@ if i32.const 0 i32.const 40 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -1926,7 +1926,7 @@ if i32.const 0 i32.const 40 - i32.const 17 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -1938,7 +1938,7 @@ if i32.const 0 i32.const 40 - i32.const 18 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -1950,7 +1950,7 @@ if i32.const 0 i32.const 40 - i32.const 19 + i32.const 17 i32.const 0 call $~lib/env/abort unreachable @@ -1962,7 +1962,7 @@ if i32.const 0 i32.const 40 - i32.const 20 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -1972,7 +1972,7 @@ if i32.const 0 i32.const 40 - i32.const 21 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -1986,7 +1986,7 @@ if i32.const 0 i32.const 40 - i32.const 23 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -2002,7 +2002,7 @@ if i32.const 0 i32.const 40 - i32.const 24 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -2016,7 +2016,7 @@ if i32.const 0 i32.const 40 - i32.const 25 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -2032,7 +2032,7 @@ if i32.const 0 i32.const 40 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -2048,7 +2048,7 @@ if i32.const 0 i32.const 40 - i32.const 27 + i32.const 25 i32.const 0 call $~lib/env/abort unreachable @@ -2064,7 +2064,7 @@ if i32.const 0 i32.const 40 - i32.const 28 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.ts b/tests/compiler/std/string-utf8.ts index f3c6adbd96..d34198136d 100644 --- a/tests/compiler/std/string-utf8.ts +++ b/tests/compiler/std/string-utf8.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - var str = "𐐷hi𤭢"; // -> f0 90 90 b7 68 69 f0 a4 ad a2 00 var len = str.lengthUTF8; diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index 7872dcdee5..36d69018c9 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -21,11 +21,11 @@ (elem (i32.const 0) $null) (global $std/string-utf8/str (mut i32) (i32.const 16)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $std/string-utf8/len (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 $std/string-utf8/ptr (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 228)) (export "memory" (memory $0)) @@ -1929,7 +1929,7 @@ if i32.const 0 i32.const 136 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -1946,7 +1946,7 @@ if i32.const 0 i32.const 136 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -2379,7 +2379,7 @@ if i32.const 0 i32.const 40 - i32.const 7 + i32.const 5 i32.const 0 call $~lib/env/abort unreachable @@ -2405,7 +2405,7 @@ if i32.const 0 i32.const 40 - i32.const 11 + i32.const 9 i32.const 0 call $~lib/env/abort unreachable @@ -2418,7 +2418,7 @@ if i32.const 0 i32.const 40 - i32.const 12 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -2431,7 +2431,7 @@ if i32.const 0 i32.const 40 - i32.const 13 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -2444,7 +2444,7 @@ if i32.const 0 i32.const 40 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -2457,7 +2457,7 @@ if i32.const 0 i32.const 40 - i32.const 15 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -2470,7 +2470,7 @@ if i32.const 0 i32.const 40 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -2483,7 +2483,7 @@ if i32.const 0 i32.const 40 - i32.const 17 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -2496,7 +2496,7 @@ if i32.const 0 i32.const 40 - i32.const 18 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -2509,7 +2509,7 @@ if i32.const 0 i32.const 40 - i32.const 19 + i32.const 17 i32.const 0 call $~lib/env/abort unreachable @@ -2522,7 +2522,7 @@ if i32.const 0 i32.const 40 - i32.const 20 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -2535,7 +2535,7 @@ if i32.const 0 i32.const 40 - i32.const 21 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -2549,7 +2549,7 @@ if i32.const 0 i32.const 40 - i32.const 23 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -2565,7 +2565,7 @@ if i32.const 0 i32.const 40 - i32.const 24 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -2579,7 +2579,7 @@ if i32.const 0 i32.const 40 - i32.const 25 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -2595,7 +2595,7 @@ if i32.const 0 i32.const 40 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -2611,7 +2611,7 @@ if i32.const 0 i32.const 40 - i32.const 27 + i32.const 25 i32.const 0 call $~lib/env/abort unreachable @@ -2627,7 +2627,7 @@ if i32.const 0 i32.const 40 - i32.const 28 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.json b/tests/compiler/std/string.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/std/string.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index bb72370adb..9f320c1dad 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1,9 +1,9 @@ (module + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$di (func (param i32) (result f64))) @@ -448,7 +448,7 @@ if i32.const 0 i32.const 120 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -463,7 +463,7 @@ if i32.const 0 i32.const 120 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -3277,7 +3277,7 @@ if i32.const 0 i32.const 120 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable @@ -5215,7 +5215,7 @@ if i32.const 0 i32.const 120 - i32.const 173 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -5229,7 +5229,7 @@ if i32.const 0 i32.const 120 - i32.const 175 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -5288,7 +5288,7 @@ if i32.const 0 i32.const 72 - i32.const 18 + i32.const 17 i32.const 0 call $~lib/env/abort unreachable @@ -5304,7 +5304,7 @@ if i32.const 0 i32.const 72 - i32.const 20 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -5330,7 +5330,7 @@ if i32.const 0 i32.const 72 - i32.const 21 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -5347,7 +5347,7 @@ if i32.const 0 i32.const 72 - i32.const 23 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -5360,7 +5360,7 @@ if i32.const 0 i32.const 72 - i32.const 24 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -5373,7 +5373,7 @@ if i32.const 0 i32.const 72 - i32.const 25 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -5386,7 +5386,7 @@ if i32.const 0 i32.const 72 - i32.const 27 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -5399,7 +5399,7 @@ if i32.const 0 i32.const 72 - i32.const 28 + i32.const 27 i32.const 0 call $~lib/env/abort unreachable @@ -5410,7 +5410,7 @@ if i32.const 264 i32.const 72 - i32.const 29 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -5421,7 +5421,7 @@ if i32.const 0 i32.const 72 - i32.const 31 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -5432,7 +5432,7 @@ if i32.const 0 i32.const 72 - i32.const 32 + i32.const 31 i32.const 0 call $~lib/env/abort unreachable @@ -5446,7 +5446,7 @@ if i32.const 0 i32.const 72 - i32.const 33 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -5461,7 +5461,7 @@ if i32.const 0 i32.const 72 - i32.const 35 + i32.const 34 i32.const 0 call $~lib/env/abort unreachable @@ -5476,7 +5476,7 @@ if i32.const 0 i32.const 72 - i32.const 36 + i32.const 35 i32.const 0 call $~lib/env/abort unreachable @@ -5491,7 +5491,7 @@ if i32.const 0 i32.const 72 - i32.const 37 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -5506,7 +5506,7 @@ if i32.const 0 i32.const 72 - i32.const 38 + i32.const 37 i32.const 0 call $~lib/env/abort unreachable @@ -5521,7 +5521,7 @@ if i32.const 0 i32.const 72 - i32.const 39 + i32.const 38 i32.const 0 call $~lib/env/abort unreachable @@ -5536,7 +5536,7 @@ if i32.const 0 i32.const 72 - i32.const 40 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -5551,7 +5551,7 @@ if i32.const 0 i32.const 72 - i32.const 41 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable @@ -5566,7 +5566,7 @@ if i32.const 0 i32.const 72 - i32.const 42 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable @@ -5581,7 +5581,7 @@ if i32.const 0 i32.const 72 - i32.const 44 + i32.const 43 i32.const 0 call $~lib/env/abort unreachable @@ -5596,7 +5596,7 @@ if i32.const 0 i32.const 72 - i32.const 45 + i32.const 44 i32.const 0 call $~lib/env/abort unreachable @@ -5611,7 +5611,7 @@ if i32.const 0 i32.const 72 - i32.const 46 + i32.const 45 i32.const 0 call $~lib/env/abort unreachable @@ -5626,7 +5626,7 @@ if i32.const 0 i32.const 72 - i32.const 47 + i32.const 46 i32.const 0 call $~lib/env/abort unreachable @@ -5641,7 +5641,7 @@ if i32.const 0 i32.const 72 - i32.const 48 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -5656,7 +5656,7 @@ if i32.const 0 i32.const 72 - i32.const 49 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -5671,7 +5671,7 @@ if i32.const 0 i32.const 72 - i32.const 50 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -5686,7 +5686,7 @@ if i32.const 0 i32.const 72 - i32.const 51 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -5698,7 +5698,7 @@ if i32.const 0 i32.const 72 - i32.const 53 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -5712,7 +5712,7 @@ if i32.const 0 i32.const 72 - i32.const 54 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable @@ -5724,7 +5724,7 @@ if i32.const 0 i32.const 72 - i32.const 55 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -5737,7 +5737,7 @@ if i32.const 0 i32.const 72 - i32.const 56 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable @@ -5749,7 +5749,7 @@ if i32.const 0 i32.const 72 - i32.const 57 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -5763,7 +5763,7 @@ if i32.const 0 i32.const 72 - i32.const 58 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -5777,7 +5777,7 @@ if i32.const 0 i32.const 72 - i32.const 59 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -5791,7 +5791,7 @@ if i32.const 0 i32.const 72 - i32.const 60 + i32.const 59 i32.const 0 call $~lib/env/abort unreachable @@ -5805,7 +5805,7 @@ if i32.const 0 i32.const 72 - i32.const 61 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable @@ -5819,7 +5819,7 @@ if i32.const 0 i32.const 72 - i32.const 62 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -5831,7 +5831,7 @@ if i32.const 0 i32.const 72 - i32.const 64 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -5845,7 +5845,7 @@ if i32.const 0 i32.const 72 - i32.const 65 + i32.const 64 i32.const 0 call $~lib/env/abort unreachable @@ -5864,7 +5864,7 @@ if i32.const 0 i32.const 72 - i32.const 66 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable @@ -5878,7 +5878,7 @@ if i32.const 0 i32.const 72 - i32.const 67 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable @@ -5892,7 +5892,7 @@ if i32.const 0 i32.const 72 - i32.const 68 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -5906,7 +5906,7 @@ if i32.const 0 i32.const 72 - i32.const 69 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable @@ -5920,7 +5920,7 @@ if i32.const 0 i32.const 72 - i32.const 70 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable @@ -5934,7 +5934,7 @@ if i32.const 0 i32.const 72 - i32.const 71 + i32.const 70 i32.const 0 call $~lib/env/abort unreachable @@ -5948,7 +5948,7 @@ if i32.const 0 i32.const 72 - i32.const 72 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable @@ -5962,7 +5962,7 @@ if i32.const 0 i32.const 72 - i32.const 73 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable @@ -5974,7 +5974,7 @@ if i32.const 0 i32.const 72 - i32.const 74 + i32.const 73 i32.const 0 call $~lib/env/abort unreachable @@ -5986,7 +5986,7 @@ if i32.const 0 i32.const 72 - i32.const 80 + i32.const 79 i32.const 0 call $~lib/env/abort unreachable @@ -5998,7 +5998,7 @@ if i32.const 0 i32.const 72 - i32.const 81 + i32.const 80 i32.const 0 call $~lib/env/abort unreachable @@ -6010,7 +6010,7 @@ if i32.const 0 i32.const 72 - i32.const 82 + i32.const 81 i32.const 0 call $~lib/env/abort unreachable @@ -6022,7 +6022,7 @@ if i32.const 0 i32.const 72 - i32.const 83 + i32.const 82 i32.const 0 call $~lib/env/abort unreachable @@ -6034,7 +6034,7 @@ if i32.const 0 i32.const 72 - i32.const 84 + i32.const 83 i32.const 0 call $~lib/env/abort unreachable @@ -6046,7 +6046,7 @@ if i32.const 0 i32.const 72 - i32.const 85 + i32.const 84 i32.const 0 call $~lib/env/abort unreachable @@ -6058,7 +6058,7 @@ if i32.const 0 i32.const 72 - i32.const 86 + i32.const 85 i32.const 0 call $~lib/env/abort unreachable @@ -6070,7 +6070,7 @@ if i32.const 0 i32.const 72 - i32.const 87 + i32.const 86 i32.const 0 call $~lib/env/abort unreachable @@ -6082,7 +6082,7 @@ if i32.const 0 i32.const 72 - i32.const 89 + i32.const 88 i32.const 0 call $~lib/env/abort unreachable @@ -6094,7 +6094,7 @@ if i32.const 0 i32.const 72 - i32.const 90 + i32.const 89 i32.const 0 call $~lib/env/abort unreachable @@ -6106,7 +6106,7 @@ if i32.const 0 i32.const 72 - i32.const 91 + i32.const 90 i32.const 0 call $~lib/env/abort unreachable @@ -6118,7 +6118,7 @@ if i32.const 0 i32.const 72 - i32.const 92 + i32.const 91 i32.const 0 call $~lib/env/abort unreachable @@ -6130,7 +6130,7 @@ if i32.const 0 i32.const 72 - i32.const 93 + i32.const 92 i32.const 0 call $~lib/env/abort unreachable @@ -6146,7 +6146,7 @@ if i32.const 0 i32.const 72 - i32.const 96 + i32.const 95 i32.const 0 call $~lib/env/abort unreachable @@ -6158,7 +6158,7 @@ if i32.const 0 i32.const 72 - i32.const 97 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable @@ -6170,7 +6170,7 @@ if i32.const 0 i32.const 72 - i32.const 98 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -6182,7 +6182,7 @@ if i32.const 0 i32.const 72 - i32.const 99 + i32.const 98 i32.const 0 call $~lib/env/abort unreachable @@ -6194,7 +6194,7 @@ if i32.const 0 i32.const 72 - i32.const 100 + i32.const 99 i32.const 0 call $~lib/env/abort unreachable @@ -6206,7 +6206,7 @@ if i32.const 0 i32.const 72 - i32.const 101 + i32.const 100 i32.const 0 call $~lib/env/abort unreachable @@ -6218,7 +6218,7 @@ if i32.const 0 i32.const 72 - i32.const 102 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable @@ -6230,7 +6230,7 @@ if i32.const 0 i32.const 72 - i32.const 103 + i32.const 102 i32.const 0 call $~lib/env/abort unreachable @@ -6242,7 +6242,7 @@ if i32.const 0 i32.const 72 - i32.const 104 + i32.const 103 i32.const 0 call $~lib/env/abort unreachable @@ -6254,7 +6254,7 @@ if i32.const 0 i32.const 72 - i32.const 105 + i32.const 104 i32.const 0 call $~lib/env/abort unreachable @@ -6266,7 +6266,7 @@ if i32.const 0 i32.const 72 - i32.const 106 + i32.const 105 i32.const 0 call $~lib/env/abort unreachable @@ -6278,7 +6278,7 @@ if i32.const 0 i32.const 72 - i32.const 107 + i32.const 106 i32.const 0 call $~lib/env/abort unreachable @@ -6290,7 +6290,7 @@ if i32.const 0 i32.const 72 - i32.const 108 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable @@ -6302,7 +6302,7 @@ if i32.const 0 i32.const 72 - i32.const 109 + i32.const 108 i32.const 0 call $~lib/env/abort unreachable @@ -6314,7 +6314,7 @@ if i32.const 0 i32.const 72 - i32.const 111 + i32.const 110 i32.const 0 call $~lib/env/abort unreachable @@ -6326,7 +6326,7 @@ if i32.const 0 i32.const 72 - i32.const 112 + i32.const 111 i32.const 0 call $~lib/env/abort unreachable @@ -6338,7 +6338,7 @@ if i32.const 0 i32.const 72 - i32.const 113 + i32.const 112 i32.const 0 call $~lib/env/abort unreachable @@ -6350,7 +6350,7 @@ if i32.const 0 i32.const 72 - i32.const 114 + i32.const 113 i32.const 0 call $~lib/env/abort unreachable @@ -6361,7 +6361,7 @@ if i32.const 0 i32.const 72 - i32.const 115 + i32.const 114 i32.const 0 call $~lib/env/abort unreachable @@ -6372,7 +6372,7 @@ if i32.const 0 i32.const 72 - i32.const 117 + i32.const 116 i32.const 0 call $~lib/env/abort unreachable @@ -6383,7 +6383,7 @@ if i32.const 0 i32.const 72 - i32.const 118 + i32.const 117 i32.const 0 call $~lib/env/abort unreachable @@ -6395,7 +6395,7 @@ if i32.const 0 i32.const 72 - i32.const 120 + i32.const 119 i32.const 0 call $~lib/env/abort unreachable @@ -6407,7 +6407,7 @@ if i32.const 0 i32.const 72 - i32.const 121 + i32.const 120 i32.const 0 call $~lib/env/abort unreachable @@ -6419,7 +6419,7 @@ if i32.const 0 i32.const 72 - i32.const 122 + i32.const 121 i32.const 0 call $~lib/env/abort unreachable @@ -6430,7 +6430,7 @@ if i32.const 0 i32.const 72 - i32.const 123 + i32.const 122 i32.const 0 call $~lib/env/abort unreachable @@ -6441,7 +6441,7 @@ if i32.const 0 i32.const 72 - i32.const 124 + i32.const 123 i32.const 0 call $~lib/env/abort unreachable @@ -6452,7 +6452,7 @@ if i32.const 0 i32.const 72 - i32.const 125 + i32.const 124 i32.const 0 call $~lib/env/abort unreachable @@ -6463,7 +6463,7 @@ if i32.const 0 i32.const 72 - i32.const 126 + i32.const 125 i32.const 0 call $~lib/env/abort unreachable @@ -6474,7 +6474,7 @@ if i32.const 0 i32.const 72 - i32.const 127 + i32.const 126 i32.const 0 call $~lib/env/abort unreachable @@ -6486,7 +6486,7 @@ if i32.const 0 i32.const 72 - i32.const 128 + i32.const 127 i32.const 0 call $~lib/env/abort unreachable @@ -6497,7 +6497,7 @@ if i32.const 0 i32.const 72 - i32.const 129 + i32.const 128 i32.const 0 call $~lib/env/abort unreachable @@ -6518,7 +6518,7 @@ if i32.const 0 i32.const 72 - i32.const 133 + i32.const 132 i32.const 0 call $~lib/env/abort unreachable @@ -6532,7 +6532,7 @@ if i32.const 0 i32.const 72 - i32.const 135 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -6546,7 +6546,7 @@ if i32.const 0 i32.const 72 - i32.const 137 + i32.const 136 i32.const 0 call $~lib/env/abort unreachable @@ -6560,7 +6560,7 @@ if i32.const 0 i32.const 72 - i32.const 138 + i32.const 137 i32.const 0 call $~lib/env/abort unreachable @@ -6574,7 +6574,7 @@ if i32.const 0 i32.const 72 - i32.const 139 + i32.const 138 i32.const 0 call $~lib/env/abort unreachable @@ -6588,7 +6588,7 @@ if i32.const 0 i32.const 72 - i32.const 140 + i32.const 139 i32.const 0 call $~lib/env/abort unreachable @@ -6602,7 +6602,7 @@ if i32.const 0 i32.const 72 - i32.const 141 + i32.const 140 i32.const 0 call $~lib/env/abort unreachable @@ -6616,7 +6616,7 @@ if i32.const 0 i32.const 72 - i32.const 142 + i32.const 141 i32.const 0 call $~lib/env/abort unreachable @@ -6630,7 +6630,7 @@ if i32.const 0 i32.const 72 - i32.const 143 + i32.const 142 i32.const 0 call $~lib/env/abort unreachable @@ -6644,7 +6644,7 @@ if i32.const 0 i32.const 72 - i32.const 144 + i32.const 143 i32.const 0 call $~lib/env/abort unreachable @@ -6658,7 +6658,7 @@ if i32.const 0 i32.const 72 - i32.const 145 + i32.const 144 i32.const 0 call $~lib/env/abort unreachable @@ -6675,7 +6675,7 @@ if i32.const 0 i32.const 72 - i32.const 149 + i32.const 148 i32.const 0 call $~lib/env/abort unreachable @@ -6690,7 +6690,7 @@ if i32.const 0 i32.const 72 - i32.const 150 + i32.const 149 i32.const 0 call $~lib/env/abort unreachable @@ -6705,7 +6705,7 @@ if i32.const 0 i32.const 72 - i32.const 151 + i32.const 150 i32.const 0 call $~lib/env/abort unreachable @@ -6720,7 +6720,7 @@ if i32.const 0 i32.const 72 - i32.const 152 + i32.const 151 i32.const 0 call $~lib/env/abort unreachable @@ -6735,7 +6735,7 @@ if i32.const 0 i32.const 72 - i32.const 153 + i32.const 152 i32.const 0 call $~lib/env/abort unreachable @@ -6750,7 +6750,7 @@ if i32.const 0 i32.const 72 - i32.const 154 + i32.const 153 i32.const 0 call $~lib/env/abort unreachable @@ -6765,7 +6765,7 @@ if i32.const 0 i32.const 72 - i32.const 155 + i32.const 154 i32.const 0 call $~lib/env/abort unreachable @@ -6793,7 +6793,7 @@ if i32.const 0 i32.const 72 - i32.const 160 + i32.const 159 i32.const 0 call $~lib/env/abort unreachable @@ -6808,7 +6808,7 @@ if i32.const 0 i32.const 72 - i32.const 162 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable @@ -6836,7 +6836,7 @@ if i32.const 0 i32.const 72 - i32.const 164 + i32.const 163 i32.const 0 call $~lib/env/abort unreachable @@ -6864,7 +6864,7 @@ if i32.const 0 i32.const 72 - i32.const 166 + i32.const 165 i32.const 0 call $~lib/env/abort unreachable @@ -6914,7 +6914,7 @@ if i32.const 0 i32.const 72 - i32.const 168 + i32.const 167 i32.const 0 call $~lib/env/abort unreachable @@ -6964,7 +6964,7 @@ if i32.const 0 i32.const 72 - i32.const 170 + i32.const 169 i32.const 0 call $~lib/env/abort unreachable @@ -7025,7 +7025,7 @@ if i32.const 0 i32.const 72 - i32.const 172 + i32.const 171 i32.const 0 call $~lib/env/abort unreachable @@ -7086,7 +7086,7 @@ if i32.const 0 i32.const 72 - i32.const 174 + i32.const 173 i32.const 0 call $~lib/env/abort unreachable @@ -7147,7 +7147,7 @@ if i32.const 0 i32.const 72 - i32.const 176 + i32.const 175 i32.const 0 call $~lib/env/abort unreachable @@ -7197,7 +7197,7 @@ if i32.const 0 i32.const 72 - i32.const 178 + i32.const 177 i32.const 0 call $~lib/env/abort unreachable @@ -7212,7 +7212,7 @@ if i32.const 0 i32.const 72 - i32.const 180 + i32.const 179 i32.const 0 call $~lib/env/abort unreachable @@ -7240,7 +7240,7 @@ if i32.const 0 i32.const 72 - i32.const 182 + i32.const 181 i32.const 0 call $~lib/env/abort unreachable @@ -7268,7 +7268,7 @@ if i32.const 0 i32.const 72 - i32.const 184 + i32.const 183 i32.const 0 call $~lib/env/abort unreachable @@ -7318,7 +7318,7 @@ if i32.const 0 i32.const 72 - i32.const 186 + i32.const 185 i32.const 0 call $~lib/env/abort unreachable @@ -7368,7 +7368,7 @@ if i32.const 0 i32.const 72 - i32.const 188 + i32.const 187 i32.const 0 call $~lib/env/abort unreachable @@ -7418,7 +7418,7 @@ if i32.const 0 i32.const 72 - i32.const 190 + i32.const 189 i32.const 0 call $~lib/env/abort unreachable @@ -7431,7 +7431,7 @@ if i32.const 0 i32.const 72 - i32.const 192 + i32.const 191 i32.const 0 call $~lib/env/abort unreachable @@ -7444,7 +7444,7 @@ if i32.const 0 i32.const 72 - i32.const 193 + i32.const 192 i32.const 0 call $~lib/env/abort unreachable @@ -7457,7 +7457,7 @@ if i32.const 0 i32.const 72 - i32.const 194 + i32.const 193 i32.const 0 call $~lib/env/abort unreachable @@ -7470,7 +7470,7 @@ if i32.const 0 i32.const 72 - i32.const 195 + i32.const 194 i32.const 0 call $~lib/env/abort unreachable @@ -7483,7 +7483,7 @@ if i32.const 0 i32.const 72 - i32.const 196 + i32.const 195 i32.const 0 call $~lib/env/abort unreachable @@ -7496,7 +7496,7 @@ if i32.const 0 i32.const 72 - i32.const 197 + i32.const 196 i32.const 0 call $~lib/env/abort unreachable @@ -7509,7 +7509,7 @@ if i32.const 0 i32.const 72 - i32.const 198 + i32.const 197 i32.const 0 call $~lib/env/abort unreachable @@ -7522,7 +7522,7 @@ if i32.const 0 i32.const 72 - i32.const 199 + i32.const 198 i32.const 0 call $~lib/env/abort unreachable @@ -7535,7 +7535,7 @@ if i32.const 0 i32.const 72 - i32.const 200 + i32.const 199 i32.const 0 call $~lib/env/abort unreachable @@ -7548,7 +7548,7 @@ if i32.const 0 i32.const 72 - i32.const 201 + i32.const 200 i32.const 0 call $~lib/env/abort unreachable @@ -7561,7 +7561,7 @@ if i32.const 0 i32.const 72 - i32.const 202 + i32.const 201 i32.const 0 call $~lib/env/abort unreachable @@ -7574,7 +7574,7 @@ if i32.const 0 i32.const 72 - i32.const 203 + i32.const 202 i32.const 0 call $~lib/env/abort unreachable @@ -7587,7 +7587,7 @@ if i32.const 0 i32.const 72 - i32.const 204 + i32.const 203 i32.const 0 call $~lib/env/abort unreachable @@ -7600,7 +7600,7 @@ if i32.const 0 i32.const 72 - i32.const 205 + i32.const 204 i32.const 0 call $~lib/env/abort unreachable @@ -7613,7 +7613,7 @@ if i32.const 0 i32.const 72 - i32.const 207 + i32.const 206 i32.const 0 call $~lib/env/abort unreachable @@ -7626,7 +7626,7 @@ if i32.const 0 i32.const 72 - i32.const 208 + i32.const 207 i32.const 0 call $~lib/env/abort unreachable @@ -7639,7 +7639,7 @@ if i32.const 0 i32.const 72 - i32.const 209 + i32.const 208 i32.const 0 call $~lib/env/abort unreachable @@ -7652,7 +7652,7 @@ if i32.const 0 i32.const 72 - i32.const 210 + i32.const 209 i32.const 0 call $~lib/env/abort unreachable @@ -7665,7 +7665,7 @@ if i32.const 0 i32.const 72 - i32.const 211 + i32.const 210 i32.const 0 call $~lib/env/abort unreachable @@ -7678,7 +7678,7 @@ if i32.const 0 i32.const 72 - i32.const 213 + i32.const 212 i32.const 0 call $~lib/env/abort unreachable @@ -7691,7 +7691,7 @@ if i32.const 0 i32.const 72 - i32.const 214 + i32.const 213 i32.const 0 call $~lib/env/abort unreachable @@ -7704,7 +7704,7 @@ if i32.const 0 i32.const 72 - i32.const 215 + i32.const 214 i32.const 0 call $~lib/env/abort unreachable @@ -7717,7 +7717,7 @@ if i32.const 0 i32.const 72 - i32.const 216 + i32.const 215 i32.const 0 call $~lib/env/abort unreachable @@ -7730,7 +7730,7 @@ if i32.const 0 i32.const 72 - i32.const 217 + i32.const 216 i32.const 0 call $~lib/env/abort unreachable @@ -7743,7 +7743,7 @@ if i32.const 0 i32.const 72 - i32.const 218 + i32.const 217 i32.const 0 call $~lib/env/abort unreachable @@ -7756,7 +7756,7 @@ if i32.const 0 i32.const 72 - i32.const 219 + i32.const 218 i32.const 0 call $~lib/env/abort unreachable @@ -7769,7 +7769,7 @@ if i32.const 0 i32.const 72 - i32.const 220 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -7782,7 +7782,7 @@ if i32.const 0 i32.const 72 - i32.const 221 + i32.const 220 i32.const 0 call $~lib/env/abort unreachable @@ -7795,7 +7795,7 @@ if i32.const 0 i32.const 72 - i32.const 222 + i32.const 221 i32.const 0 call $~lib/env/abort unreachable @@ -7808,7 +7808,7 @@ if i32.const 0 i32.const 72 - i32.const 223 + i32.const 222 i32.const 0 call $~lib/env/abort unreachable @@ -7821,7 +7821,7 @@ if i32.const 0 i32.const 72 - i32.const 225 + i32.const 224 i32.const 0 call $~lib/env/abort unreachable @@ -7834,7 +7834,7 @@ if i32.const 0 i32.const 72 - i32.const 226 + i32.const 225 i32.const 0 call $~lib/env/abort unreachable @@ -7847,7 +7847,7 @@ if i32.const 0 i32.const 72 - i32.const 227 + i32.const 226 i32.const 0 call $~lib/env/abort unreachable @@ -7860,7 +7860,7 @@ if i32.const 0 i32.const 72 - i32.const 228 + i32.const 227 i32.const 0 call $~lib/env/abort unreachable @@ -7873,7 +7873,7 @@ if i32.const 0 i32.const 72 - i32.const 229 + i32.const 228 i32.const 0 call $~lib/env/abort unreachable @@ -7886,7 +7886,7 @@ if i32.const 0 i32.const 72 - i32.const 230 + i32.const 229 i32.const 0 call $~lib/env/abort unreachable @@ -7899,7 +7899,7 @@ if i32.const 0 i32.const 72 - i32.const 231 + i32.const 230 i32.const 0 call $~lib/env/abort unreachable @@ -7912,7 +7912,7 @@ if i32.const 0 i32.const 72 - i32.const 232 + i32.const 231 i32.const 0 call $~lib/env/abort unreachable @@ -7925,7 +7925,7 @@ if i32.const 0 i32.const 72 - i32.const 233 + i32.const 232 i32.const 0 call $~lib/env/abort unreachable @@ -7938,7 +7938,7 @@ if i32.const 0 i32.const 72 - i32.const 234 + i32.const 233 i32.const 0 call $~lib/env/abort unreachable @@ -7951,7 +7951,7 @@ if i32.const 0 i32.const 72 - i32.const 235 + i32.const 234 i32.const 0 call $~lib/env/abort unreachable @@ -7964,7 +7964,7 @@ if i32.const 0 i32.const 72 - i32.const 238 + i32.const 237 i32.const 0 call $~lib/env/abort unreachable @@ -7977,7 +7977,7 @@ if i32.const 0 i32.const 72 - i32.const 239 + i32.const 238 i32.const 0 call $~lib/env/abort unreachable @@ -7990,7 +7990,7 @@ if i32.const 0 i32.const 72 - i32.const 240 + i32.const 239 i32.const 0 call $~lib/env/abort unreachable @@ -8003,7 +8003,7 @@ if i32.const 0 i32.const 72 - i32.const 241 + i32.const 240 i32.const 0 call $~lib/env/abort unreachable @@ -8016,7 +8016,7 @@ if i32.const 0 i32.const 72 - i32.const 242 + i32.const 241 i32.const 0 call $~lib/env/abort unreachable @@ -8029,7 +8029,7 @@ if i32.const 0 i32.const 72 - i32.const 243 + i32.const 242 i32.const 0 call $~lib/env/abort unreachable @@ -8042,7 +8042,7 @@ if i32.const 0 i32.const 72 - i32.const 244 + i32.const 243 i32.const 0 call $~lib/env/abort unreachable @@ -8055,7 +8055,7 @@ if i32.const 0 i32.const 72 - i32.const 245 + i32.const 244 i32.const 0 call $~lib/env/abort unreachable @@ -8068,7 +8068,7 @@ if i32.const 0 i32.const 72 - i32.const 246 + i32.const 245 i32.const 0 call $~lib/env/abort unreachable @@ -8081,7 +8081,7 @@ if i32.const 0 i32.const 72 - i32.const 247 + i32.const 246 i32.const 0 call $~lib/env/abort unreachable @@ -8094,7 +8094,7 @@ if i32.const 0 i32.const 72 - i32.const 248 + i32.const 247 i32.const 0 call $~lib/env/abort unreachable @@ -8107,7 +8107,7 @@ if i32.const 0 i32.const 72 - i32.const 251 + i32.const 250 i32.const 0 call $~lib/env/abort unreachable @@ -8120,7 +8120,7 @@ if i32.const 0 i32.const 72 - i32.const 252 + i32.const 251 i32.const 0 call $~lib/env/abort unreachable @@ -8133,7 +8133,7 @@ if i32.const 0 i32.const 72 - i32.const 253 + i32.const 252 i32.const 0 call $~lib/env/abort unreachable @@ -8146,7 +8146,7 @@ if i32.const 0 i32.const 72 - i32.const 254 + i32.const 253 i32.const 0 call $~lib/env/abort unreachable @@ -8159,7 +8159,7 @@ if i32.const 0 i32.const 72 - i32.const 255 + i32.const 254 i32.const 0 call $~lib/env/abort unreachable @@ -8172,7 +8172,7 @@ if i32.const 0 i32.const 72 - i32.const 261 + i32.const 260 i32.const 0 call $~lib/env/abort unreachable @@ -8185,7 +8185,7 @@ if i32.const 0 i32.const 72 - i32.const 262 + i32.const 261 i32.const 0 call $~lib/env/abort unreachable @@ -8198,7 +8198,7 @@ if i32.const 0 i32.const 72 - i32.const 263 + i32.const 262 i32.const 0 call $~lib/env/abort unreachable @@ -8211,7 +8211,7 @@ if i32.const 0 i32.const 72 - i32.const 264 + i32.const 263 i32.const 0 call $~lib/env/abort unreachable @@ -8224,7 +8224,7 @@ if i32.const 0 i32.const 72 - i32.const 266 + i32.const 265 i32.const 0 call $~lib/env/abort unreachable @@ -8237,7 +8237,7 @@ if i32.const 0 i32.const 72 - i32.const 267 + i32.const 266 i32.const 0 call $~lib/env/abort unreachable @@ -8250,7 +8250,7 @@ if i32.const 0 i32.const 72 - i32.const 268 + i32.const 267 i32.const 0 call $~lib/env/abort unreachable @@ -8263,7 +8263,7 @@ if i32.const 0 i32.const 72 - i32.const 269 + i32.const 268 i32.const 0 call $~lib/env/abort unreachable @@ -8276,7 +8276,7 @@ if i32.const 0 i32.const 72 - i32.const 270 + i32.const 269 i32.const 0 call $~lib/env/abort unreachable @@ -8289,7 +8289,7 @@ if i32.const 0 i32.const 72 - i32.const 271 + i32.const 270 i32.const 0 call $~lib/env/abort unreachable @@ -8302,7 +8302,7 @@ if i32.const 0 i32.const 72 - i32.const 273 + i32.const 272 i32.const 0 call $~lib/env/abort unreachable @@ -8315,7 +8315,7 @@ if i32.const 0 i32.const 72 - i32.const 274 + i32.const 273 i32.const 0 call $~lib/env/abort unreachable @@ -8328,7 +8328,7 @@ if i32.const 0 i32.const 72 - i32.const 275 + i32.const 274 i32.const 0 call $~lib/env/abort unreachable @@ -8341,7 +8341,7 @@ if i32.const 0 i32.const 72 - i32.const 276 + i32.const 275 i32.const 0 call $~lib/env/abort unreachable @@ -8354,7 +8354,7 @@ if i32.const 0 i32.const 72 - i32.const 277 + i32.const 276 i32.const 0 call $~lib/env/abort unreachable @@ -8367,7 +8367,7 @@ if i32.const 0 i32.const 72 - i32.const 278 + i32.const 277 i32.const 0 call $~lib/env/abort unreachable @@ -8380,7 +8380,7 @@ if i32.const 0 i32.const 72 - i32.const 279 + i32.const 278 i32.const 0 call $~lib/env/abort unreachable @@ -8393,7 +8393,7 @@ if i32.const 0 i32.const 72 - i32.const 280 + i32.const 279 i32.const 0 call $~lib/env/abort unreachable @@ -8406,7 +8406,7 @@ if i32.const 0 i32.const 72 - i32.const 281 + i32.const 280 i32.const 0 call $~lib/env/abort unreachable @@ -8419,7 +8419,7 @@ if i32.const 0 i32.const 72 - i32.const 283 + i32.const 282 i32.const 0 call $~lib/env/abort unreachable @@ -8432,7 +8432,7 @@ if i32.const 0 i32.const 72 - i32.const 284 + i32.const 283 i32.const 0 call $~lib/env/abort unreachable @@ -8445,7 +8445,7 @@ if i32.const 0 i32.const 72 - i32.const 286 + i32.const 285 i32.const 0 call $~lib/env/abort unreachable @@ -8458,7 +8458,7 @@ if i32.const 0 i32.const 72 - i32.const 287 + i32.const 286 i32.const 0 call $~lib/env/abort unreachable @@ -8471,7 +8471,7 @@ if i32.const 0 i32.const 72 - i32.const 288 + i32.const 287 i32.const 0 call $~lib/env/abort unreachable @@ -8484,7 +8484,7 @@ if i32.const 0 i32.const 72 - i32.const 289 + i32.const 288 i32.const 0 call $~lib/env/abort unreachable @@ -8497,7 +8497,7 @@ if i32.const 0 i32.const 72 - i32.const 291 + i32.const 290 i32.const 0 call $~lib/env/abort unreachable @@ -8510,7 +8510,7 @@ if i32.const 0 i32.const 72 - i32.const 292 + i32.const 291 i32.const 0 call $~lib/env/abort unreachable @@ -8523,7 +8523,7 @@ if i32.const 0 i32.const 72 - i32.const 293 + i32.const 292 i32.const 0 call $~lib/env/abort unreachable @@ -8536,7 +8536,7 @@ if i32.const 0 i32.const 72 - i32.const 294 + i32.const 293 i32.const 0 call $~lib/env/abort unreachable @@ -8549,7 +8549,7 @@ if i32.const 0 i32.const 72 - i32.const 295 + i32.const 294 i32.const 0 call $~lib/env/abort unreachable @@ -8562,7 +8562,7 @@ if i32.const 0 i32.const 72 - i32.const 296 + i32.const 295 i32.const 0 call $~lib/env/abort unreachable @@ -8575,7 +8575,7 @@ if i32.const 0 i32.const 72 - i32.const 297 + i32.const 296 i32.const 0 call $~lib/env/abort unreachable @@ -8588,7 +8588,7 @@ if i32.const 0 i32.const 72 - i32.const 298 + i32.const 297 i32.const 0 call $~lib/env/abort unreachable @@ -8601,7 +8601,7 @@ if i32.const 0 i32.const 72 - i32.const 299 + i32.const 298 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.ts b/tests/compiler/std/string.ts index e448e0f3d0..777dcce1d2 100644 --- a/tests/compiler/std/string.ts +++ b/tests/compiler/std/string.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import "collector/dummy"; import { diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 8785ede5ca..61eb3f6d7b 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -1,9 +1,9 @@ (module + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) @@ -177,12 +177,12 @@ (data (i32.const 6696) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\000\00.\000\000\000\000\003\005\006\008\009\00") (table $0 11 funcref) (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/array/Array<~lib/string/String>~iterate $~lib/array/Array<~lib/string/String>~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $std/string/str (mut i32) (i32.const 24)) (global $std/string/nullStr (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/string/String.MAX_LENGTH i32 (i32.const 536870904)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) @@ -369,7 +369,7 @@ if i32.const 0 i32.const 120 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -386,7 +386,7 @@ if i32.const 0 i32.const 120 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -3947,7 +3947,7 @@ if i32.const 0 i32.const 120 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable @@ -6783,7 +6783,7 @@ if i32.const 0 i32.const 120 - i32.const 173 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -6800,7 +6800,7 @@ if i32.const 0 i32.const 120 - i32.const 175 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -6875,7 +6875,7 @@ if i32.const 0 i32.const 72 - i32.const 18 + i32.const 17 i32.const 0 call $~lib/env/abort unreachable @@ -6888,7 +6888,7 @@ if i32.const 0 i32.const 72 - i32.const 20 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -6902,7 +6902,7 @@ if i32.const 0 i32.const 72 - i32.const 21 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -6925,7 +6925,7 @@ if i32.const 0 i32.const 72 - i32.const 23 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -6938,7 +6938,7 @@ if i32.const 0 i32.const 72 - i32.const 24 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -6953,7 +6953,7 @@ if i32.const 0 i32.const 72 - i32.const 25 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -6966,7 +6966,7 @@ if i32.const 0 i32.const 72 - i32.const 27 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -6979,7 +6979,7 @@ if i32.const 0 i32.const 72 - i32.const 28 + i32.const 27 i32.const 0 call $~lib/env/abort unreachable @@ -6990,7 +6990,7 @@ if i32.const 264 i32.const 72 - i32.const 29 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -7003,7 +7003,7 @@ if i32.const 0 i32.const 72 - i32.const 31 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -7016,7 +7016,7 @@ if i32.const 0 i32.const 72 - i32.const 32 + i32.const 31 i32.const 0 call $~lib/env/abort unreachable @@ -7041,7 +7041,7 @@ if i32.const 0 i32.const 72 - i32.const 33 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -7056,7 +7056,7 @@ if i32.const 0 i32.const 72 - i32.const 35 + i32.const 34 i32.const 0 call $~lib/env/abort unreachable @@ -7071,7 +7071,7 @@ if i32.const 0 i32.const 72 - i32.const 36 + i32.const 35 i32.const 0 call $~lib/env/abort unreachable @@ -7086,7 +7086,7 @@ if i32.const 0 i32.const 72 - i32.const 37 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -7101,7 +7101,7 @@ if i32.const 0 i32.const 72 - i32.const 38 + i32.const 37 i32.const 0 call $~lib/env/abort unreachable @@ -7116,7 +7116,7 @@ if i32.const 0 i32.const 72 - i32.const 39 + i32.const 38 i32.const 0 call $~lib/env/abort unreachable @@ -7131,7 +7131,7 @@ if i32.const 0 i32.const 72 - i32.const 40 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -7146,7 +7146,7 @@ if i32.const 0 i32.const 72 - i32.const 41 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable @@ -7161,7 +7161,7 @@ if i32.const 0 i32.const 72 - i32.const 42 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable @@ -7176,7 +7176,7 @@ if i32.const 0 i32.const 72 - i32.const 44 + i32.const 43 i32.const 0 call $~lib/env/abort unreachable @@ -7191,7 +7191,7 @@ if i32.const 0 i32.const 72 - i32.const 45 + i32.const 44 i32.const 0 call $~lib/env/abort unreachable @@ -7206,7 +7206,7 @@ if i32.const 0 i32.const 72 - i32.const 46 + i32.const 45 i32.const 0 call $~lib/env/abort unreachable @@ -7221,7 +7221,7 @@ if i32.const 0 i32.const 72 - i32.const 47 + i32.const 46 i32.const 0 call $~lib/env/abort unreachable @@ -7236,7 +7236,7 @@ if i32.const 0 i32.const 72 - i32.const 48 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -7251,7 +7251,7 @@ if i32.const 0 i32.const 72 - i32.const 49 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -7266,7 +7266,7 @@ if i32.const 0 i32.const 72 - i32.const 50 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -7281,7 +7281,7 @@ if i32.const 0 i32.const 72 - i32.const 51 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -7296,7 +7296,7 @@ if i32.const 0 i32.const 72 - i32.const 53 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -7311,7 +7311,7 @@ if i32.const 0 i32.const 72 - i32.const 54 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable @@ -7326,7 +7326,7 @@ if i32.const 0 i32.const 72 - i32.const 55 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -7341,7 +7341,7 @@ if i32.const 0 i32.const 72 - i32.const 56 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable @@ -7356,7 +7356,7 @@ if i32.const 0 i32.const 72 - i32.const 57 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -7371,7 +7371,7 @@ if i32.const 0 i32.const 72 - i32.const 58 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -7386,7 +7386,7 @@ if i32.const 0 i32.const 72 - i32.const 59 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -7401,7 +7401,7 @@ if i32.const 0 i32.const 72 - i32.const 60 + i32.const 59 i32.const 0 call $~lib/env/abort unreachable @@ -7416,7 +7416,7 @@ if i32.const 0 i32.const 72 - i32.const 61 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable @@ -7431,7 +7431,7 @@ if i32.const 0 i32.const 72 - i32.const 62 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -7446,7 +7446,7 @@ if i32.const 0 i32.const 72 - i32.const 64 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -7461,7 +7461,7 @@ if i32.const 0 i32.const 72 - i32.const 65 + i32.const 64 i32.const 0 call $~lib/env/abort unreachable @@ -7477,7 +7477,7 @@ if i32.const 0 i32.const 72 - i32.const 66 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable @@ -7492,7 +7492,7 @@ if i32.const 0 i32.const 72 - i32.const 67 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable @@ -7507,7 +7507,7 @@ if i32.const 0 i32.const 72 - i32.const 68 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -7522,7 +7522,7 @@ if i32.const 0 i32.const 72 - i32.const 69 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable @@ -7537,7 +7537,7 @@ if i32.const 0 i32.const 72 - i32.const 70 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable @@ -7552,7 +7552,7 @@ if i32.const 0 i32.const 72 - i32.const 71 + i32.const 70 i32.const 0 call $~lib/env/abort unreachable @@ -7567,7 +7567,7 @@ if i32.const 0 i32.const 72 - i32.const 72 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable @@ -7582,7 +7582,7 @@ if i32.const 0 i32.const 72 - i32.const 73 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable @@ -7597,7 +7597,7 @@ if i32.const 0 i32.const 72 - i32.const 74 + i32.const 73 i32.const 0 call $~lib/env/abort unreachable @@ -7611,7 +7611,7 @@ if i32.const 0 i32.const 72 - i32.const 80 + i32.const 79 i32.const 0 call $~lib/env/abort unreachable @@ -7625,7 +7625,7 @@ if i32.const 0 i32.const 72 - i32.const 81 + i32.const 80 i32.const 0 call $~lib/env/abort unreachable @@ -7639,7 +7639,7 @@ if i32.const 0 i32.const 72 - i32.const 82 + i32.const 81 i32.const 0 call $~lib/env/abort unreachable @@ -7653,7 +7653,7 @@ if i32.const 0 i32.const 72 - i32.const 83 + i32.const 82 i32.const 0 call $~lib/env/abort unreachable @@ -7667,7 +7667,7 @@ if i32.const 0 i32.const 72 - i32.const 84 + i32.const 83 i32.const 0 call $~lib/env/abort unreachable @@ -7681,7 +7681,7 @@ if i32.const 0 i32.const 72 - i32.const 85 + i32.const 84 i32.const 0 call $~lib/env/abort unreachable @@ -7695,7 +7695,7 @@ if i32.const 0 i32.const 72 - i32.const 86 + i32.const 85 i32.const 0 call $~lib/env/abort unreachable @@ -7709,7 +7709,7 @@ if i32.const 0 i32.const 72 - i32.const 87 + i32.const 86 i32.const 0 call $~lib/env/abort unreachable @@ -7722,7 +7722,7 @@ if i32.const 0 i32.const 72 - i32.const 89 + i32.const 88 i32.const 0 call $~lib/env/abort unreachable @@ -7735,7 +7735,7 @@ if i32.const 0 i32.const 72 - i32.const 90 + i32.const 89 i32.const 0 call $~lib/env/abort unreachable @@ -7748,7 +7748,7 @@ if i32.const 0 i32.const 72 - i32.const 91 + i32.const 90 i32.const 0 call $~lib/env/abort unreachable @@ -7761,7 +7761,7 @@ if i32.const 0 i32.const 72 - i32.const 92 + i32.const 91 i32.const 0 call $~lib/env/abort unreachable @@ -7774,7 +7774,7 @@ if i32.const 0 i32.const 72 - i32.const 93 + i32.const 92 i32.const 0 call $~lib/env/abort unreachable @@ -7790,7 +7790,7 @@ if i32.const 0 i32.const 72 - i32.const 96 + i32.const 95 i32.const 0 call $~lib/env/abort unreachable @@ -7802,7 +7802,7 @@ if i32.const 0 i32.const 72 - i32.const 97 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable @@ -7814,7 +7814,7 @@ if i32.const 0 i32.const 72 - i32.const 98 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -7826,7 +7826,7 @@ if i32.const 0 i32.const 72 - i32.const 99 + i32.const 98 i32.const 0 call $~lib/env/abort unreachable @@ -7838,7 +7838,7 @@ if i32.const 0 i32.const 72 - i32.const 100 + i32.const 99 i32.const 0 call $~lib/env/abort unreachable @@ -7850,7 +7850,7 @@ if i32.const 0 i32.const 72 - i32.const 101 + i32.const 100 i32.const 0 call $~lib/env/abort unreachable @@ -7862,7 +7862,7 @@ if i32.const 0 i32.const 72 - i32.const 102 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable @@ -7874,7 +7874,7 @@ if i32.const 0 i32.const 72 - i32.const 103 + i32.const 102 i32.const 0 call $~lib/env/abort unreachable @@ -7886,7 +7886,7 @@ if i32.const 0 i32.const 72 - i32.const 104 + i32.const 103 i32.const 0 call $~lib/env/abort unreachable @@ -7898,7 +7898,7 @@ if i32.const 0 i32.const 72 - i32.const 105 + i32.const 104 i32.const 0 call $~lib/env/abort unreachable @@ -7910,7 +7910,7 @@ if i32.const 0 i32.const 72 - i32.const 106 + i32.const 105 i32.const 0 call $~lib/env/abort unreachable @@ -7922,7 +7922,7 @@ if i32.const 0 i32.const 72 - i32.const 107 + i32.const 106 i32.const 0 call $~lib/env/abort unreachable @@ -7934,7 +7934,7 @@ if i32.const 0 i32.const 72 - i32.const 108 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable @@ -7946,7 +7946,7 @@ if i32.const 0 i32.const 72 - i32.const 109 + i32.const 108 i32.const 0 call $~lib/env/abort unreachable @@ -7958,7 +7958,7 @@ if i32.const 0 i32.const 72 - i32.const 111 + i32.const 110 i32.const 0 call $~lib/env/abort unreachable @@ -7970,7 +7970,7 @@ if i32.const 0 i32.const 72 - i32.const 112 + i32.const 111 i32.const 0 call $~lib/env/abort unreachable @@ -7982,7 +7982,7 @@ if i32.const 0 i32.const 72 - i32.const 113 + i32.const 112 i32.const 0 call $~lib/env/abort unreachable @@ -7994,7 +7994,7 @@ if i32.const 0 i32.const 72 - i32.const 114 + i32.const 113 i32.const 0 call $~lib/env/abort unreachable @@ -8007,7 +8007,7 @@ if i32.const 0 i32.const 72 - i32.const 115 + i32.const 114 i32.const 0 call $~lib/env/abort unreachable @@ -8020,7 +8020,7 @@ if i32.const 0 i32.const 72 - i32.const 117 + i32.const 116 i32.const 0 call $~lib/env/abort unreachable @@ -8033,7 +8033,7 @@ if i32.const 0 i32.const 72 - i32.const 118 + i32.const 117 i32.const 0 call $~lib/env/abort unreachable @@ -8045,7 +8045,7 @@ if i32.const 0 i32.const 72 - i32.const 120 + i32.const 119 i32.const 0 call $~lib/env/abort unreachable @@ -8057,7 +8057,7 @@ if i32.const 0 i32.const 72 - i32.const 121 + i32.const 120 i32.const 0 call $~lib/env/abort unreachable @@ -8069,7 +8069,7 @@ if i32.const 0 i32.const 72 - i32.const 122 + i32.const 121 i32.const 0 call $~lib/env/abort unreachable @@ -8081,7 +8081,7 @@ if i32.const 0 i32.const 72 - i32.const 123 + i32.const 122 i32.const 0 call $~lib/env/abort unreachable @@ -8094,7 +8094,7 @@ if i32.const 0 i32.const 72 - i32.const 124 + i32.const 123 i32.const 0 call $~lib/env/abort unreachable @@ -8107,7 +8107,7 @@ if i32.const 0 i32.const 72 - i32.const 125 + i32.const 124 i32.const 0 call $~lib/env/abort unreachable @@ -8120,7 +8120,7 @@ if i32.const 0 i32.const 72 - i32.const 126 + i32.const 125 i32.const 0 call $~lib/env/abort unreachable @@ -8133,7 +8133,7 @@ if i32.const 0 i32.const 72 - i32.const 127 + i32.const 126 i32.const 0 call $~lib/env/abort unreachable @@ -8145,7 +8145,7 @@ if i32.const 0 i32.const 72 - i32.const 128 + i32.const 127 i32.const 0 call $~lib/env/abort unreachable @@ -8157,7 +8157,7 @@ if i32.const 0 i32.const 72 - i32.const 129 + i32.const 128 i32.const 0 call $~lib/env/abort unreachable @@ -8178,7 +8178,7 @@ if i32.const 0 i32.const 72 - i32.const 133 + i32.const 132 i32.const 0 call $~lib/env/abort unreachable @@ -8191,7 +8191,7 @@ if i32.const 0 i32.const 72 - i32.const 135 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -8205,7 +8205,7 @@ if i32.const 0 i32.const 72 - i32.const 137 + i32.const 136 i32.const 0 call $~lib/env/abort unreachable @@ -8219,7 +8219,7 @@ if i32.const 0 i32.const 72 - i32.const 138 + i32.const 137 i32.const 0 call $~lib/env/abort unreachable @@ -8233,7 +8233,7 @@ if i32.const 0 i32.const 72 - i32.const 139 + i32.const 138 i32.const 0 call $~lib/env/abort unreachable @@ -8247,7 +8247,7 @@ if i32.const 0 i32.const 72 - i32.const 140 + i32.const 139 i32.const 0 call $~lib/env/abort unreachable @@ -8261,7 +8261,7 @@ if i32.const 0 i32.const 72 - i32.const 141 + i32.const 140 i32.const 0 call $~lib/env/abort unreachable @@ -8275,7 +8275,7 @@ if i32.const 0 i32.const 72 - i32.const 142 + i32.const 141 i32.const 0 call $~lib/env/abort unreachable @@ -8289,7 +8289,7 @@ if i32.const 0 i32.const 72 - i32.const 143 + i32.const 142 i32.const 0 call $~lib/env/abort unreachable @@ -8303,7 +8303,7 @@ if i32.const 0 i32.const 72 - i32.const 144 + i32.const 143 i32.const 0 call $~lib/env/abort unreachable @@ -8317,7 +8317,7 @@ if i32.const 0 i32.const 72 - i32.const 145 + i32.const 144 i32.const 0 call $~lib/env/abort unreachable @@ -8334,7 +8334,7 @@ if i32.const 0 i32.const 72 - i32.const 149 + i32.const 148 i32.const 0 call $~lib/env/abort unreachable @@ -8349,7 +8349,7 @@ if i32.const 0 i32.const 72 - i32.const 150 + i32.const 149 i32.const 0 call $~lib/env/abort unreachable @@ -8364,7 +8364,7 @@ if i32.const 0 i32.const 72 - i32.const 151 + i32.const 150 i32.const 0 call $~lib/env/abort unreachable @@ -8379,7 +8379,7 @@ if i32.const 0 i32.const 72 - i32.const 152 + i32.const 151 i32.const 0 call $~lib/env/abort unreachable @@ -8394,7 +8394,7 @@ if i32.const 0 i32.const 72 - i32.const 153 + i32.const 152 i32.const 0 call $~lib/env/abort unreachable @@ -8409,7 +8409,7 @@ if i32.const 0 i32.const 72 - i32.const 154 + i32.const 153 i32.const 0 call $~lib/env/abort unreachable @@ -8424,7 +8424,7 @@ if i32.const 0 i32.const 72 - i32.const 155 + i32.const 154 i32.const 0 call $~lib/env/abort unreachable @@ -8452,7 +8452,7 @@ if i32.const 0 i32.const 72 - i32.const 160 + i32.const 159 i32.const 0 call $~lib/env/abort unreachable @@ -8470,7 +8470,7 @@ if i32.const 0 i32.const 72 - i32.const 162 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable @@ -8498,7 +8498,7 @@ if i32.const 0 i32.const 72 - i32.const 164 + i32.const 163 i32.const 0 call $~lib/env/abort unreachable @@ -8526,7 +8526,7 @@ if i32.const 0 i32.const 72 - i32.const 166 + i32.const 165 i32.const 0 call $~lib/env/abort unreachable @@ -8574,7 +8574,7 @@ if i32.const 0 i32.const 72 - i32.const 168 + i32.const 167 i32.const 0 call $~lib/env/abort unreachable @@ -8622,7 +8622,7 @@ if i32.const 0 i32.const 72 - i32.const 170 + i32.const 169 i32.const 0 call $~lib/env/abort unreachable @@ -8680,7 +8680,7 @@ if i32.const 0 i32.const 72 - i32.const 172 + i32.const 171 i32.const 0 call $~lib/env/abort unreachable @@ -8738,7 +8738,7 @@ if i32.const 0 i32.const 72 - i32.const 174 + i32.const 173 i32.const 0 call $~lib/env/abort unreachable @@ -8796,7 +8796,7 @@ if i32.const 0 i32.const 72 - i32.const 176 + i32.const 175 i32.const 0 call $~lib/env/abort unreachable @@ -8844,7 +8844,7 @@ if i32.const 0 i32.const 72 - i32.const 178 + i32.const 177 i32.const 0 call $~lib/env/abort unreachable @@ -8862,7 +8862,7 @@ if i32.const 0 i32.const 72 - i32.const 180 + i32.const 179 i32.const 0 call $~lib/env/abort unreachable @@ -8890,7 +8890,7 @@ if i32.const 0 i32.const 72 - i32.const 182 + i32.const 181 i32.const 0 call $~lib/env/abort unreachable @@ -8918,7 +8918,7 @@ if i32.const 0 i32.const 72 - i32.const 184 + i32.const 183 i32.const 0 call $~lib/env/abort unreachable @@ -8966,7 +8966,7 @@ if i32.const 0 i32.const 72 - i32.const 186 + i32.const 185 i32.const 0 call $~lib/env/abort unreachable @@ -9014,7 +9014,7 @@ if i32.const 0 i32.const 72 - i32.const 188 + i32.const 187 i32.const 0 call $~lib/env/abort unreachable @@ -9062,7 +9062,7 @@ if i32.const 0 i32.const 72 - i32.const 190 + i32.const 189 i32.const 0 call $~lib/env/abort unreachable @@ -9075,7 +9075,7 @@ if i32.const 0 i32.const 72 - i32.const 192 + i32.const 191 i32.const 0 call $~lib/env/abort unreachable @@ -9088,7 +9088,7 @@ if i32.const 0 i32.const 72 - i32.const 193 + i32.const 192 i32.const 0 call $~lib/env/abort unreachable @@ -9101,7 +9101,7 @@ if i32.const 0 i32.const 72 - i32.const 194 + i32.const 193 i32.const 0 call $~lib/env/abort unreachable @@ -9114,7 +9114,7 @@ if i32.const 0 i32.const 72 - i32.const 195 + i32.const 194 i32.const 0 call $~lib/env/abort unreachable @@ -9127,7 +9127,7 @@ if i32.const 0 i32.const 72 - i32.const 196 + i32.const 195 i32.const 0 call $~lib/env/abort unreachable @@ -9140,7 +9140,7 @@ if i32.const 0 i32.const 72 - i32.const 197 + i32.const 196 i32.const 0 call $~lib/env/abort unreachable @@ -9153,7 +9153,7 @@ if i32.const 0 i32.const 72 - i32.const 198 + i32.const 197 i32.const 0 call $~lib/env/abort unreachable @@ -9166,7 +9166,7 @@ if i32.const 0 i32.const 72 - i32.const 199 + i32.const 198 i32.const 0 call $~lib/env/abort unreachable @@ -9179,7 +9179,7 @@ if i32.const 0 i32.const 72 - i32.const 200 + i32.const 199 i32.const 0 call $~lib/env/abort unreachable @@ -9192,7 +9192,7 @@ if i32.const 0 i32.const 72 - i32.const 201 + i32.const 200 i32.const 0 call $~lib/env/abort unreachable @@ -9205,7 +9205,7 @@ if i32.const 0 i32.const 72 - i32.const 202 + i32.const 201 i32.const 0 call $~lib/env/abort unreachable @@ -9218,7 +9218,7 @@ if i32.const 0 i32.const 72 - i32.const 203 + i32.const 202 i32.const 0 call $~lib/env/abort unreachable @@ -9231,7 +9231,7 @@ if i32.const 0 i32.const 72 - i32.const 204 + i32.const 203 i32.const 0 call $~lib/env/abort unreachable @@ -9244,7 +9244,7 @@ if i32.const 0 i32.const 72 - i32.const 205 + i32.const 204 i32.const 0 call $~lib/env/abort unreachable @@ -9257,7 +9257,7 @@ if i32.const 0 i32.const 72 - i32.const 207 + i32.const 206 i32.const 0 call $~lib/env/abort unreachable @@ -9270,7 +9270,7 @@ if i32.const 0 i32.const 72 - i32.const 208 + i32.const 207 i32.const 0 call $~lib/env/abort unreachable @@ -9283,7 +9283,7 @@ if i32.const 0 i32.const 72 - i32.const 209 + i32.const 208 i32.const 0 call $~lib/env/abort unreachable @@ -9296,7 +9296,7 @@ if i32.const 0 i32.const 72 - i32.const 210 + i32.const 209 i32.const 0 call $~lib/env/abort unreachable @@ -9309,7 +9309,7 @@ if i32.const 0 i32.const 72 - i32.const 211 + i32.const 210 i32.const 0 call $~lib/env/abort unreachable @@ -9322,7 +9322,7 @@ if i32.const 0 i32.const 72 - i32.const 213 + i32.const 212 i32.const 0 call $~lib/env/abort unreachable @@ -9335,7 +9335,7 @@ if i32.const 0 i32.const 72 - i32.const 214 + i32.const 213 i32.const 0 call $~lib/env/abort unreachable @@ -9348,7 +9348,7 @@ if i32.const 0 i32.const 72 - i32.const 215 + i32.const 214 i32.const 0 call $~lib/env/abort unreachable @@ -9361,7 +9361,7 @@ if i32.const 0 i32.const 72 - i32.const 216 + i32.const 215 i32.const 0 call $~lib/env/abort unreachable @@ -9374,7 +9374,7 @@ if i32.const 0 i32.const 72 - i32.const 217 + i32.const 216 i32.const 0 call $~lib/env/abort unreachable @@ -9387,7 +9387,7 @@ if i32.const 0 i32.const 72 - i32.const 218 + i32.const 217 i32.const 0 call $~lib/env/abort unreachable @@ -9400,7 +9400,7 @@ if i32.const 0 i32.const 72 - i32.const 219 + i32.const 218 i32.const 0 call $~lib/env/abort unreachable @@ -9413,7 +9413,7 @@ if i32.const 0 i32.const 72 - i32.const 220 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -9426,7 +9426,7 @@ if i32.const 0 i32.const 72 - i32.const 221 + i32.const 220 i32.const 0 call $~lib/env/abort unreachable @@ -9439,7 +9439,7 @@ if i32.const 0 i32.const 72 - i32.const 222 + i32.const 221 i32.const 0 call $~lib/env/abort unreachable @@ -9452,7 +9452,7 @@ if i32.const 0 i32.const 72 - i32.const 223 + i32.const 222 i32.const 0 call $~lib/env/abort unreachable @@ -9465,7 +9465,7 @@ if i32.const 0 i32.const 72 - i32.const 225 + i32.const 224 i32.const 0 call $~lib/env/abort unreachable @@ -9478,7 +9478,7 @@ if i32.const 0 i32.const 72 - i32.const 226 + i32.const 225 i32.const 0 call $~lib/env/abort unreachable @@ -9491,7 +9491,7 @@ if i32.const 0 i32.const 72 - i32.const 227 + i32.const 226 i32.const 0 call $~lib/env/abort unreachable @@ -9504,7 +9504,7 @@ if i32.const 0 i32.const 72 - i32.const 228 + i32.const 227 i32.const 0 call $~lib/env/abort unreachable @@ -9517,7 +9517,7 @@ if i32.const 0 i32.const 72 - i32.const 229 + i32.const 228 i32.const 0 call $~lib/env/abort unreachable @@ -9530,7 +9530,7 @@ if i32.const 0 i32.const 72 - i32.const 230 + i32.const 229 i32.const 0 call $~lib/env/abort unreachable @@ -9543,7 +9543,7 @@ if i32.const 0 i32.const 72 - i32.const 231 + i32.const 230 i32.const 0 call $~lib/env/abort unreachable @@ -9556,7 +9556,7 @@ if i32.const 0 i32.const 72 - i32.const 232 + i32.const 231 i32.const 0 call $~lib/env/abort unreachable @@ -9569,7 +9569,7 @@ if i32.const 0 i32.const 72 - i32.const 233 + i32.const 232 i32.const 0 call $~lib/env/abort unreachable @@ -9582,7 +9582,7 @@ if i32.const 0 i32.const 72 - i32.const 234 + i32.const 233 i32.const 0 call $~lib/env/abort unreachable @@ -9595,7 +9595,7 @@ if i32.const 0 i32.const 72 - i32.const 235 + i32.const 234 i32.const 0 call $~lib/env/abort unreachable @@ -9608,7 +9608,7 @@ if i32.const 0 i32.const 72 - i32.const 238 + i32.const 237 i32.const 0 call $~lib/env/abort unreachable @@ -9621,7 +9621,7 @@ if i32.const 0 i32.const 72 - i32.const 239 + i32.const 238 i32.const 0 call $~lib/env/abort unreachable @@ -9634,7 +9634,7 @@ if i32.const 0 i32.const 72 - i32.const 240 + i32.const 239 i32.const 0 call $~lib/env/abort unreachable @@ -9647,7 +9647,7 @@ if i32.const 0 i32.const 72 - i32.const 241 + i32.const 240 i32.const 0 call $~lib/env/abort unreachable @@ -9661,7 +9661,7 @@ if i32.const 0 i32.const 72 - i32.const 242 + i32.const 241 i32.const 0 call $~lib/env/abort unreachable @@ -9674,7 +9674,7 @@ if i32.const 0 i32.const 72 - i32.const 243 + i32.const 242 i32.const 0 call $~lib/env/abort unreachable @@ -9688,7 +9688,7 @@ if i32.const 0 i32.const 72 - i32.const 244 + i32.const 243 i32.const 0 call $~lib/env/abort unreachable @@ -9701,7 +9701,7 @@ if i32.const 0 i32.const 72 - i32.const 245 + i32.const 244 i32.const 0 call $~lib/env/abort unreachable @@ -9715,7 +9715,7 @@ if i32.const 0 i32.const 72 - i32.const 246 + i32.const 245 i32.const 0 call $~lib/env/abort unreachable @@ -9728,7 +9728,7 @@ if i32.const 0 i32.const 72 - i32.const 247 + i32.const 246 i32.const 0 call $~lib/env/abort unreachable @@ -9741,7 +9741,7 @@ if i32.const 0 i32.const 72 - i32.const 248 + i32.const 247 i32.const 0 call $~lib/env/abort unreachable @@ -9754,7 +9754,7 @@ if i32.const 0 i32.const 72 - i32.const 251 + i32.const 250 i32.const 0 call $~lib/env/abort unreachable @@ -9767,7 +9767,7 @@ if i32.const 0 i32.const 72 - i32.const 252 + i32.const 251 i32.const 0 call $~lib/env/abort unreachable @@ -9780,7 +9780,7 @@ if i32.const 0 i32.const 72 - i32.const 253 + i32.const 252 i32.const 0 call $~lib/env/abort unreachable @@ -9793,7 +9793,7 @@ if i32.const 0 i32.const 72 - i32.const 254 + i32.const 253 i32.const 0 call $~lib/env/abort unreachable @@ -9806,7 +9806,7 @@ if i32.const 0 i32.const 72 - i32.const 255 + i32.const 254 i32.const 0 call $~lib/env/abort unreachable @@ -9819,7 +9819,7 @@ if i32.const 0 i32.const 72 - i32.const 261 + i32.const 260 i32.const 0 call $~lib/env/abort unreachable @@ -9832,7 +9832,7 @@ if i32.const 0 i32.const 72 - i32.const 262 + i32.const 261 i32.const 0 call $~lib/env/abort unreachable @@ -9845,7 +9845,7 @@ if i32.const 0 i32.const 72 - i32.const 263 + i32.const 262 i32.const 0 call $~lib/env/abort unreachable @@ -9858,7 +9858,7 @@ if i32.const 0 i32.const 72 - i32.const 264 + i32.const 263 i32.const 0 call $~lib/env/abort unreachable @@ -9871,7 +9871,7 @@ if i32.const 0 i32.const 72 - i32.const 266 + i32.const 265 i32.const 0 call $~lib/env/abort unreachable @@ -9884,7 +9884,7 @@ if i32.const 0 i32.const 72 - i32.const 267 + i32.const 266 i32.const 0 call $~lib/env/abort unreachable @@ -9897,7 +9897,7 @@ if i32.const 0 i32.const 72 - i32.const 268 + i32.const 267 i32.const 0 call $~lib/env/abort unreachable @@ -9910,7 +9910,7 @@ if i32.const 0 i32.const 72 - i32.const 269 + i32.const 268 i32.const 0 call $~lib/env/abort unreachable @@ -9923,7 +9923,7 @@ if i32.const 0 i32.const 72 - i32.const 270 + i32.const 269 i32.const 0 call $~lib/env/abort unreachable @@ -9936,7 +9936,7 @@ if i32.const 0 i32.const 72 - i32.const 271 + i32.const 270 i32.const 0 call $~lib/env/abort unreachable @@ -9949,7 +9949,7 @@ if i32.const 0 i32.const 72 - i32.const 273 + i32.const 272 i32.const 0 call $~lib/env/abort unreachable @@ -9962,7 +9962,7 @@ if i32.const 0 i32.const 72 - i32.const 274 + i32.const 273 i32.const 0 call $~lib/env/abort unreachable @@ -9975,7 +9975,7 @@ if i32.const 0 i32.const 72 - i32.const 275 + i32.const 274 i32.const 0 call $~lib/env/abort unreachable @@ -9988,7 +9988,7 @@ if i32.const 0 i32.const 72 - i32.const 276 + i32.const 275 i32.const 0 call $~lib/env/abort unreachable @@ -10001,7 +10001,7 @@ if i32.const 0 i32.const 72 - i32.const 277 + i32.const 276 i32.const 0 call $~lib/env/abort unreachable @@ -10014,7 +10014,7 @@ if i32.const 0 i32.const 72 - i32.const 278 + i32.const 277 i32.const 0 call $~lib/env/abort unreachable @@ -10027,7 +10027,7 @@ if i32.const 0 i32.const 72 - i32.const 279 + i32.const 278 i32.const 0 call $~lib/env/abort unreachable @@ -10040,7 +10040,7 @@ if i32.const 0 i32.const 72 - i32.const 280 + i32.const 279 i32.const 0 call $~lib/env/abort unreachable @@ -10053,7 +10053,7 @@ if i32.const 0 i32.const 72 - i32.const 281 + i32.const 280 i32.const 0 call $~lib/env/abort unreachable @@ -10066,7 +10066,7 @@ if i32.const 0 i32.const 72 - i32.const 283 + i32.const 282 i32.const 0 call $~lib/env/abort unreachable @@ -10079,7 +10079,7 @@ if i32.const 0 i32.const 72 - i32.const 284 + i32.const 283 i32.const 0 call $~lib/env/abort unreachable @@ -10092,7 +10092,7 @@ if i32.const 0 i32.const 72 - i32.const 286 + i32.const 285 i32.const 0 call $~lib/env/abort unreachable @@ -10105,7 +10105,7 @@ if i32.const 0 i32.const 72 - i32.const 287 + i32.const 286 i32.const 0 call $~lib/env/abort unreachable @@ -10118,7 +10118,7 @@ if i32.const 0 i32.const 72 - i32.const 288 + i32.const 287 i32.const 0 call $~lib/env/abort unreachable @@ -10131,7 +10131,7 @@ if i32.const 0 i32.const 72 - i32.const 289 + i32.const 288 i32.const 0 call $~lib/env/abort unreachable @@ -10146,7 +10146,7 @@ if i32.const 0 i32.const 72 - i32.const 291 + i32.const 290 i32.const 0 call $~lib/env/abort unreachable @@ -10159,7 +10159,7 @@ if i32.const 0 i32.const 72 - i32.const 292 + i32.const 291 i32.const 0 call $~lib/env/abort unreachable @@ -10172,7 +10172,7 @@ if i32.const 0 i32.const 72 - i32.const 293 + i32.const 292 i32.const 0 call $~lib/env/abort unreachable @@ -10185,7 +10185,7 @@ if i32.const 0 i32.const 72 - i32.const 294 + i32.const 293 i32.const 0 call $~lib/env/abort unreachable @@ -10198,7 +10198,7 @@ if i32.const 0 i32.const 72 - i32.const 295 + i32.const 294 i32.const 0 call $~lib/env/abort unreachable @@ -10211,7 +10211,7 @@ if i32.const 0 i32.const 72 - i32.const 296 + i32.const 295 i32.const 0 call $~lib/env/abort unreachable @@ -10224,7 +10224,7 @@ if i32.const 0 i32.const 72 - i32.const 297 + i32.const 296 i32.const 0 call $~lib/env/abort unreachable @@ -10237,7 +10237,7 @@ if i32.const 0 i32.const 72 - i32.const 298 + i32.const 297 i32.const 0 call $~lib/env/abort unreachable @@ -10250,7 +10250,7 @@ if i32.const 0 i32.const 72 - i32.const 299 + i32.const 298 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.json b/tests/compiler/std/symbol.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/std/symbol.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 10f7e3cd6c..5eb2f0e9c6 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -144,7 +144,7 @@ if i32.const 0 i32.const 72 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -159,7 +159,7 @@ if i32.const 0 i32.const 72 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -2412,7 +2412,7 @@ if i32.const 0 i32.const 32 - i32.const 6 + i32.const 4 i32.const 0 call $~lib/env/abort unreachable @@ -2431,7 +2431,7 @@ if i32.const 0 i32.const 32 - i32.const 11 + i32.const 9 i32.const 0 call $~lib/env/abort unreachable @@ -2446,7 +2446,7 @@ if i32.const 0 i32.const 32 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -2455,7 +2455,7 @@ if i32.const 0 i32.const 32 - i32.const 17 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -2485,7 +2485,7 @@ if i32.const 0 i32.const 32 - i32.const 22 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -2497,7 +2497,7 @@ if i32.const 0 i32.const 32 - i32.const 23 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -2520,7 +2520,7 @@ if i32.const 0 i32.const 32 - i32.const 25 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -2533,7 +2533,7 @@ if i32.const 0 i32.const 32 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -2550,7 +2550,7 @@ if i32.const 0 i32.const 32 - i32.const 30 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -2563,7 +2563,7 @@ if i32.const 0 i32.const 32 - i32.const 31 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.ts b/tests/compiler/std/symbol.ts index 9604825bfe..9fb8c76a71 100644 --- a/tests/compiler/std/symbol.ts +++ b/tests/compiler/std/symbol.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - var sym1 = Symbol("123"); var sym2 = Symbol("123"); diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index a9ecd20af1..b702816ad8 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -35,14 +35,14 @@ (data (i32.const 640) "\01\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/symbol/nextId (mut i32) (i32.const 12)) (global $std/symbol/sym1 (mut i32) (i32.const 0)) (global $std/symbol/sym2 (mut i32) (i32.const 0)) (global $~lib/symbol/stringToId (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/symbol/idToString (mut i32) (i32.const 0)) @@ -200,7 +200,7 @@ if i32.const 0 i32.const 72 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -217,7 +217,7 @@ if i32.const 0 i32.const 72 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -3253,7 +3253,7 @@ if i32.const 0 i32.const 32 - i32.const 6 + i32.const 4 i32.const 0 call $~lib/env/abort unreachable @@ -3281,7 +3281,7 @@ if i32.const 0 i32.const 32 - i32.const 11 + i32.const 9 i32.const 0 call $~lib/env/abort unreachable @@ -3299,7 +3299,7 @@ if i32.const 0 i32.const 32 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -3311,7 +3311,7 @@ if i32.const 0 i32.const 32 - i32.const 17 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -3341,7 +3341,7 @@ if i32.const 0 i32.const 32 - i32.const 22 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -3353,7 +3353,7 @@ if i32.const 0 i32.const 32 - i32.const 23 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -3367,7 +3367,7 @@ if i32.const 0 i32.const 32 - i32.const 25 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -3380,7 +3380,7 @@ if i32.const 0 i32.const 32 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -3397,7 +3397,7 @@ if i32.const 0 i32.const 32 - i32.const 30 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -3410,7 +3410,7 @@ if i32.const 0 i32.const 32 - i32.const 31 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/trace.json b/tests/compiler/std/trace.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/std/trace.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/typedarray.json b/tests/compiler/std/typedarray.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/std/typedarray.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 170cb2a96d..36d42c4743 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1,7 +1,7 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) @@ -442,7 +442,7 @@ if i32.const 0 i32.const 80 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -457,7 +457,7 @@ if i32.const 0 i32.const 80 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -509,7 +509,7 @@ if i32.const 0 i32.const 80 - i32.const 232 + i32.const 236 i32.const 57 call $~lib/env/abort unreachable @@ -663,7 +663,7 @@ if i32.const 0 i32.const 24 - i32.const 35 + i32.const 34 i32.const 2 call $~lib/env/abort unreachable @@ -675,7 +675,7 @@ if i32.const 0 i32.const 24 - i32.const 36 + i32.const 35 i32.const 2 call $~lib/env/abort unreachable @@ -687,7 +687,7 @@ if i32.const 0 i32.const 24 - i32.const 37 + i32.const 36 i32.const 2 call $~lib/env/abort unreachable @@ -702,7 +702,7 @@ if i32.const 0 i32.const 24 - i32.const 40 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -714,7 +714,7 @@ if i32.const 0 i32.const 24 - i32.const 41 + i32.const 40 i32.const 2 call $~lib/env/abort unreachable @@ -726,7 +726,7 @@ if i32.const 0 i32.const 24 - i32.const 42 + i32.const 41 i32.const 2 call $~lib/env/abort unreachable @@ -741,7 +741,7 @@ if i32.const 0 i32.const 24 - i32.const 45 + i32.const 44 i32.const 2 call $~lib/env/abort unreachable @@ -753,7 +753,7 @@ if i32.const 0 i32.const 24 - i32.const 46 + i32.const 45 i32.const 2 call $~lib/env/abort unreachable @@ -765,7 +765,7 @@ if i32.const 0 i32.const 24 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -780,7 +780,7 @@ if i32.const 0 i32.const 24 - i32.const 50 + i32.const 49 i32.const 2 call $~lib/env/abort unreachable @@ -794,7 +794,7 @@ if i32.const 0 i32.const 24 - i32.const 51 + i32.const 50 i32.const 2 call $~lib/env/abort unreachable @@ -808,7 +808,7 @@ if i32.const 0 i32.const 24 - i32.const 52 + i32.const 51 i32.const 2 call $~lib/env/abort unreachable @@ -823,7 +823,7 @@ if i32.const 0 i32.const 24 - i32.const 55 + i32.const 54 i32.const 2 call $~lib/env/abort unreachable @@ -837,7 +837,7 @@ if i32.const 0 i32.const 24 - i32.const 56 + i32.const 55 i32.const 2 call $~lib/env/abort unreachable @@ -851,7 +851,7 @@ if i32.const 0 i32.const 24 - i32.const 57 + i32.const 56 i32.const 2 call $~lib/env/abort unreachable @@ -866,7 +866,7 @@ if i32.const 0 i32.const 24 - i32.const 60 + i32.const 59 i32.const 2 call $~lib/env/abort unreachable @@ -880,7 +880,7 @@ if i32.const 0 i32.const 24 - i32.const 61 + i32.const 60 i32.const 2 call $~lib/env/abort unreachable @@ -894,7 +894,7 @@ if i32.const 0 i32.const 24 - i32.const 62 + i32.const 61 i32.const 2 call $~lib/env/abort unreachable @@ -909,7 +909,7 @@ if i32.const 0 i32.const 24 - i32.const 65 + i32.const 64 i32.const 2 call $~lib/env/abort unreachable @@ -923,7 +923,7 @@ if i32.const 0 i32.const 24 - i32.const 66 + i32.const 65 i32.const 2 call $~lib/env/abort unreachable @@ -937,7 +937,7 @@ if i32.const 0 i32.const 24 - i32.const 67 + i32.const 66 i32.const 2 call $~lib/env/abort unreachable @@ -952,7 +952,7 @@ if i32.const 0 i32.const 24 - i32.const 70 + i32.const 69 i32.const 2 call $~lib/env/abort unreachable @@ -966,7 +966,7 @@ if i32.const 0 i32.const 24 - i32.const 71 + i32.const 70 i32.const 2 call $~lib/env/abort unreachable @@ -980,7 +980,7 @@ if i32.const 0 i32.const 24 - i32.const 72 + i32.const 71 i32.const 2 call $~lib/env/abort unreachable @@ -995,7 +995,7 @@ if i32.const 0 i32.const 24 - i32.const 75 + i32.const 74 i32.const 2 call $~lib/env/abort unreachable @@ -1009,7 +1009,7 @@ if i32.const 0 i32.const 24 - i32.const 76 + i32.const 75 i32.const 2 call $~lib/env/abort unreachable @@ -1023,7 +1023,7 @@ if i32.const 0 i32.const 24 - i32.const 77 + i32.const 76 i32.const 2 call $~lib/env/abort unreachable @@ -1038,7 +1038,7 @@ if i32.const 0 i32.const 24 - i32.const 80 + i32.const 79 i32.const 2 call $~lib/env/abort unreachable @@ -1052,7 +1052,7 @@ if i32.const 0 i32.const 24 - i32.const 81 + i32.const 80 i32.const 2 call $~lib/env/abort unreachable @@ -1066,7 +1066,7 @@ if i32.const 0 i32.const 24 - i32.const 82 + i32.const 81 i32.const 2 call $~lib/env/abort unreachable @@ -1081,7 +1081,7 @@ if i32.const 0 i32.const 24 - i32.const 85 + i32.const 84 i32.const 2 call $~lib/env/abort unreachable @@ -1095,7 +1095,7 @@ if i32.const 0 i32.const 24 - i32.const 86 + i32.const 85 i32.const 2 call $~lib/env/abort unreachable @@ -1109,7 +1109,7 @@ if i32.const 0 i32.const 24 - i32.const 87 + i32.const 86 i32.const 2 call $~lib/env/abort unreachable @@ -3425,7 +3425,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -3514,7 +3514,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -3546,7 +3546,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -3642,7 +3642,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -3738,7 +3738,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -3809,7 +3809,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -3863,7 +3863,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -3963,7 +3963,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -4017,7 +4017,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -4116,7 +4116,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -4191,7 +4191,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -4260,7 +4260,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4330,7 +4330,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4362,7 +4362,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4435,7 +4435,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4508,7 +4508,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4580,7 +4580,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4610,7 +4610,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4682,7 +4682,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4712,7 +4712,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4783,7 +4783,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4854,7 +4854,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4937,7 +4937,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -4950,7 +4950,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -4963,7 +4963,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5060,7 +5060,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -5073,7 +5073,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5086,7 +5086,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5164,7 +5164,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -5177,7 +5177,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5190,7 +5190,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5300,7 +5300,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -5313,7 +5313,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5326,7 +5326,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5436,7 +5436,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -5449,7 +5449,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5462,7 +5462,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5549,7 +5549,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -5562,7 +5562,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5575,7 +5575,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5685,7 +5685,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -5698,7 +5698,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5711,7 +5711,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5826,7 +5826,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -5839,7 +5839,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5852,7 +5852,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5962,7 +5962,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -5975,7 +5975,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5988,7 +5988,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -6103,7 +6103,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -6116,7 +6116,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -6129,7 +6129,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -6221,7 +6221,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -6234,7 +6234,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -6247,7 +6247,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -6328,7 +6328,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6339,7 +6339,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -6407,7 +6407,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6418,7 +6418,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -6447,7 +6447,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6458,7 +6458,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -6543,7 +6543,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6554,7 +6554,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -6626,7 +6626,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6637,7 +6637,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -6718,7 +6718,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6729,7 +6729,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -6758,7 +6758,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6769,7 +6769,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -6851,7 +6851,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6862,7 +6862,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -6891,7 +6891,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6902,7 +6902,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -6984,7 +6984,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6995,7 +6995,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -7077,7 +7077,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -7088,7 +7088,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -7167,7 +7167,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7180,7 +7180,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7252,7 +7252,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7265,7 +7265,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7295,7 +7295,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7308,7 +7308,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7391,7 +7391,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7404,7 +7404,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7480,7 +7480,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7493,7 +7493,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7574,7 +7574,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7587,7 +7587,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7617,7 +7617,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7630,7 +7630,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7711,7 +7711,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7724,7 +7724,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7754,7 +7754,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7767,7 +7767,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7848,7 +7848,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7861,7 +7861,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7942,7 +7942,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7955,7 +7955,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -8034,7 +8034,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8045,7 +8045,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -8120,7 +8120,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8131,7 +8131,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -8160,7 +8160,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8171,7 +8171,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -8254,7 +8254,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8265,7 +8265,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -8338,7 +8338,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8349,7 +8349,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -8428,7 +8428,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8439,7 +8439,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -8468,7 +8468,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8479,7 +8479,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -8559,7 +8559,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8570,7 +8570,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -8606,7 +8606,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8617,7 +8617,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -8847,7 +8847,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8858,7 +8858,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -9096,7 +9096,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -9107,7 +9107,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -9126,7 +9126,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -9137,7 +9137,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -9148,7 +9148,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -9237,7 +9237,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -9317,7 +9317,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -9364,7 +9364,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -9383,7 +9383,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -9394,7 +9394,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -9405,7 +9405,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -9498,7 +9498,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -9581,7 +9581,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -9596,7 +9596,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -9607,7 +9607,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -9618,7 +9618,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -9700,7 +9700,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -9741,7 +9741,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -9757,7 +9757,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -9768,7 +9768,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -9779,7 +9779,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -9864,7 +9864,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -9908,7 +9908,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -9924,7 +9924,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -9935,7 +9935,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -9946,7 +9946,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -10030,7 +10030,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -10046,7 +10046,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -10057,7 +10057,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -10068,7 +10068,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -10152,7 +10152,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -10279,7 +10279,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -10306,7 +10306,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -10319,7 +10319,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -10332,7 +10332,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -10345,7 +10345,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -10521,7 +10521,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -10546,7 +10546,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -10559,7 +10559,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -10572,7 +10572,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -10585,7 +10585,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -10713,7 +10713,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -10738,7 +10738,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -10751,7 +10751,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -10764,7 +10764,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -10777,7 +10777,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -10971,7 +10971,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -10996,7 +10996,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -11009,7 +11009,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -11022,7 +11022,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -11035,7 +11035,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -11223,7 +11223,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -11248,7 +11248,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -11261,7 +11261,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -11274,7 +11274,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -11287,7 +11287,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -11408,7 +11408,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -11435,7 +11435,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -11448,7 +11448,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -11461,7 +11461,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -11474,7 +11474,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -11602,7 +11602,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -11627,7 +11627,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -11640,7 +11640,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -11653,7 +11653,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -11666,7 +11666,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -11851,7 +11851,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -11876,7 +11876,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -11889,7 +11889,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -11902,7 +11902,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -11915,7 +11915,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -12046,7 +12046,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -12071,7 +12071,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -12084,7 +12084,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -12097,7 +12097,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -12110,7 +12110,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -12295,7 +12295,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -12320,7 +12320,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -12333,7 +12333,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -12346,7 +12346,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -12359,7 +12359,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -12483,7 +12483,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -12510,7 +12510,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -12523,7 +12523,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -12536,7 +12536,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -12549,7 +12549,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -12590,7 +12590,7 @@ if i32.const 0 i32.const 24 - i32.const 97 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable @@ -12604,7 +12604,7 @@ if i32.const 0 i32.const 24 - i32.const 98 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -12616,7 +12616,7 @@ if i32.const 0 i32.const 24 - i32.const 99 + i32.const 98 i32.const 0 call $~lib/env/abort unreachable @@ -12629,7 +12629,7 @@ if i32.const 0 i32.const 24 - i32.const 100 + i32.const 99 i32.const 0 call $~lib/env/abort unreachable @@ -12642,7 +12642,7 @@ if i32.const 0 i32.const 24 - i32.const 101 + i32.const 100 i32.const 0 call $~lib/env/abort unreachable @@ -12655,7 +12655,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable @@ -12674,7 +12674,7 @@ if i32.const 0 i32.const 24 - i32.const 105 + i32.const 104 i32.const 0 call $~lib/env/abort unreachable @@ -12690,7 +12690,7 @@ if i32.const 0 i32.const 24 - i32.const 106 + i32.const 105 i32.const 0 call $~lib/env/abort unreachable @@ -12702,7 +12702,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 106 i32.const 0 call $~lib/env/abort unreachable @@ -12715,7 +12715,7 @@ if i32.const 0 i32.const 24 - i32.const 108 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable @@ -12769,7 +12769,7 @@ if i32.const 0 i32.const 24 - i32.const 122 + i32.const 121 i32.const 0 call $~lib/env/abort unreachable @@ -12785,7 +12785,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 122 i32.const 0 call $~lib/env/abort unreachable @@ -12797,7 +12797,7 @@ if i32.const 0 i32.const 24 - i32.const 124 + i32.const 123 i32.const 0 call $~lib/env/abort unreachable @@ -12863,7 +12863,7 @@ if i32.const 0 i32.const 24 - i32.const 126 + i32.const 125 i32.const 0 call $~lib/env/abort unreachable @@ -12889,7 +12889,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 132 i32.const 0 call $~lib/env/abort unreachable @@ -12902,7 +12902,7 @@ if i32.const 0 i32.const 24 - i32.const 134 + i32.const 133 i32.const 0 call $~lib/env/abort unreachable @@ -12915,7 +12915,7 @@ if i32.const 0 i32.const 24 - i32.const 135 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -12959,7 +12959,7 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 144 i32.const 0 call $~lib/env/abort unreachable @@ -12980,7 +12980,7 @@ if i32.const 0 i32.const 24 - i32.const 148 + i32.const 147 i32.const 0 call $~lib/env/abort unreachable @@ -13001,7 +13001,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 150 i32.const 0 call $~lib/env/abort unreachable @@ -13022,7 +13022,7 @@ if i32.const 0 i32.const 24 - i32.const 154 + i32.const 153 i32.const 0 call $~lib/env/abort unreachable @@ -13043,7 +13043,7 @@ if i32.const 0 i32.const 24 - i32.const 157 + i32.const 156 i32.const 0 call $~lib/env/abort unreachable @@ -13065,7 +13065,7 @@ if i32.const 0 i32.const 24 - i32.const 161 + i32.const 160 i32.const 0 call $~lib/env/abort unreachable @@ -13081,7 +13081,7 @@ if i32.const 0 i32.const 24 - i32.const 162 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable @@ -13093,7 +13093,7 @@ if i32.const 0 i32.const 24 - i32.const 163 + i32.const 162 i32.const 0 call $~lib/env/abort unreachable @@ -13109,7 +13109,7 @@ if i32.const 0 i32.const 24 - i32.const 164 + i32.const 163 i32.const 0 call $~lib/env/abort unreachable @@ -13125,7 +13125,7 @@ if i32.const 0 i32.const 24 - i32.const 165 + i32.const 164 i32.const 0 call $~lib/env/abort unreachable @@ -13169,7 +13169,7 @@ if i32.const 0 i32.const 24 - i32.const 175 + i32.const 174 i32.const 0 call $~lib/env/abort unreachable @@ -13190,7 +13190,7 @@ if i32.const 0 i32.const 24 - i32.const 178 + i32.const 177 i32.const 0 call $~lib/env/abort unreachable @@ -13211,7 +13211,7 @@ if i32.const 0 i32.const 24 - i32.const 181 + i32.const 180 i32.const 0 call $~lib/env/abort unreachable @@ -13232,7 +13232,7 @@ if i32.const 0 i32.const 24 - i32.const 184 + i32.const 183 i32.const 0 call $~lib/env/abort unreachable @@ -13253,7 +13253,7 @@ if i32.const 0 i32.const 24 - i32.const 187 + i32.const 186 i32.const 0 call $~lib/env/abort unreachable @@ -13277,7 +13277,7 @@ if i32.const 0 i32.const 24 - i32.const 191 + i32.const 190 i32.const 0 call $~lib/env/abort unreachable @@ -13293,7 +13293,7 @@ if i32.const 0 i32.const 24 - i32.const 192 + i32.const 191 i32.const 0 call $~lib/env/abort unreachable @@ -13305,7 +13305,7 @@ if i32.const 0 i32.const 24 - i32.const 193 + i32.const 192 i32.const 0 call $~lib/env/abort unreachable @@ -13321,7 +13321,7 @@ if i32.const 0 i32.const 24 - i32.const 194 + i32.const 193 i32.const 0 call $~lib/env/abort unreachable @@ -13337,7 +13337,7 @@ if i32.const 0 i32.const 24 - i32.const 195 + i32.const 194 i32.const 0 call $~lib/env/abort unreachable @@ -13385,7 +13385,7 @@ if i32.const 0 i32.const 24 - i32.const 212 + i32.const 211 i32.const 0 call $~lib/env/abort unreachable @@ -13397,7 +13397,7 @@ if i32.const 0 i32.const 24 - i32.const 213 + i32.const 212 i32.const 0 call $~lib/env/abort unreachable @@ -13413,7 +13413,7 @@ if i32.const 0 i32.const 24 - i32.const 214 + i32.const 213 i32.const 0 call $~lib/env/abort unreachable @@ -13425,7 +13425,7 @@ if i32.const 0 i32.const 24 - i32.const 215 + i32.const 214 i32.const 0 call $~lib/env/abort unreachable @@ -13443,7 +13443,7 @@ if i32.const 0 i32.const 24 - i32.const 218 + i32.const 217 i32.const 0 call $~lib/env/abort unreachable @@ -13455,7 +13455,7 @@ if i32.const 0 i32.const 24 - i32.const 219 + i32.const 218 i32.const 0 call $~lib/env/abort unreachable @@ -13471,7 +13471,7 @@ if i32.const 0 i32.const 24 - i32.const 220 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -13483,7 +13483,7 @@ if i32.const 0 i32.const 24 - i32.const 221 + i32.const 220 i32.const 0 call $~lib/env/abort unreachable @@ -13501,7 +13501,7 @@ if i32.const 0 i32.const 24 - i32.const 224 + i32.const 223 i32.const 0 call $~lib/env/abort unreachable @@ -13513,7 +13513,7 @@ if i32.const 0 i32.const 24 - i32.const 225 + i32.const 224 i32.const 0 call $~lib/env/abort unreachable @@ -13529,7 +13529,7 @@ if i32.const 0 i32.const 24 - i32.const 226 + i32.const 225 i32.const 0 call $~lib/env/abort unreachable @@ -13541,7 +13541,7 @@ if i32.const 0 i32.const 24 - i32.const 227 + i32.const 226 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/typedarray.ts b/tests/compiler/std/typedarray.ts index 380aa16f83..914cda37df 100644 --- a/tests/compiler/std/typedarray.ts +++ b/tests/compiler/std/typedarray.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import "collector/dummy"; assert(Int8Array.BYTES_PER_ELEMENT == 1); diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index a90300f4b2..69509e5958 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -1,7 +1,7 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) @@ -81,10 +81,10 @@ (global $~lib/typedarray/Float32Array.BYTES_PER_ELEMENT i32 (i32.const 4)) (global $~lib/typedarray/Float64Array.BYTES_PER_ELEMENT i32 (i32.const 8)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/typedarray/arr (mut i32) (i32.const 0)) (global $std/typedarray/af64 (mut i32) (i32.const 0)) @@ -503,7 +503,7 @@ if i32.const 0 i32.const 80 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -520,7 +520,7 @@ if i32.const 0 i32.const 80 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -598,7 +598,7 @@ if i32.const 0 i32.const 80 - i32.const 232 + i32.const 236 i32.const 57 call $~lib/env/abort unreachable @@ -998,7 +998,7 @@ if i32.const 0 i32.const 24 - i32.const 35 + i32.const 34 i32.const 2 call $~lib/env/abort unreachable @@ -1013,7 +1013,7 @@ if i32.const 0 i32.const 24 - i32.const 36 + i32.const 35 i32.const 2 call $~lib/env/abort unreachable @@ -1026,7 +1026,7 @@ if i32.const 0 i32.const 24 - i32.const 37 + i32.const 36 i32.const 2 call $~lib/env/abort unreachable @@ -1043,7 +1043,7 @@ if i32.const 0 i32.const 24 - i32.const 40 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -1058,7 +1058,7 @@ if i32.const 0 i32.const 24 - i32.const 41 + i32.const 40 i32.const 2 call $~lib/env/abort unreachable @@ -1071,7 +1071,7 @@ if i32.const 0 i32.const 24 - i32.const 42 + i32.const 41 i32.const 2 call $~lib/env/abort unreachable @@ -1088,7 +1088,7 @@ if i32.const 0 i32.const 24 - i32.const 45 + i32.const 44 i32.const 2 call $~lib/env/abort unreachable @@ -1103,7 +1103,7 @@ if i32.const 0 i32.const 24 - i32.const 46 + i32.const 45 i32.const 2 call $~lib/env/abort unreachable @@ -1116,7 +1116,7 @@ if i32.const 0 i32.const 24 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -1133,7 +1133,7 @@ if i32.const 0 i32.const 24 - i32.const 50 + i32.const 49 i32.const 2 call $~lib/env/abort unreachable @@ -1148,7 +1148,7 @@ if i32.const 0 i32.const 24 - i32.const 51 + i32.const 50 i32.const 2 call $~lib/env/abort unreachable @@ -1161,7 +1161,7 @@ if i32.const 0 i32.const 24 - i32.const 52 + i32.const 51 i32.const 2 call $~lib/env/abort unreachable @@ -1178,7 +1178,7 @@ if i32.const 0 i32.const 24 - i32.const 55 + i32.const 54 i32.const 2 call $~lib/env/abort unreachable @@ -1193,7 +1193,7 @@ if i32.const 0 i32.const 24 - i32.const 56 + i32.const 55 i32.const 2 call $~lib/env/abort unreachable @@ -1206,7 +1206,7 @@ if i32.const 0 i32.const 24 - i32.const 57 + i32.const 56 i32.const 2 call $~lib/env/abort unreachable @@ -1223,7 +1223,7 @@ if i32.const 0 i32.const 24 - i32.const 60 + i32.const 59 i32.const 2 call $~lib/env/abort unreachable @@ -1238,7 +1238,7 @@ if i32.const 0 i32.const 24 - i32.const 61 + i32.const 60 i32.const 2 call $~lib/env/abort unreachable @@ -1251,7 +1251,7 @@ if i32.const 0 i32.const 24 - i32.const 62 + i32.const 61 i32.const 2 call $~lib/env/abort unreachable @@ -1268,7 +1268,7 @@ if i32.const 0 i32.const 24 - i32.const 65 + i32.const 64 i32.const 2 call $~lib/env/abort unreachable @@ -1283,7 +1283,7 @@ if i32.const 0 i32.const 24 - i32.const 66 + i32.const 65 i32.const 2 call $~lib/env/abort unreachable @@ -1296,7 +1296,7 @@ if i32.const 0 i32.const 24 - i32.const 67 + i32.const 66 i32.const 2 call $~lib/env/abort unreachable @@ -1313,7 +1313,7 @@ if i32.const 0 i32.const 24 - i32.const 70 + i32.const 69 i32.const 2 call $~lib/env/abort unreachable @@ -1328,7 +1328,7 @@ if i32.const 0 i32.const 24 - i32.const 71 + i32.const 70 i32.const 2 call $~lib/env/abort unreachable @@ -1341,7 +1341,7 @@ if i32.const 0 i32.const 24 - i32.const 72 + i32.const 71 i32.const 2 call $~lib/env/abort unreachable @@ -1358,7 +1358,7 @@ if i32.const 0 i32.const 24 - i32.const 75 + i32.const 74 i32.const 2 call $~lib/env/abort unreachable @@ -1373,7 +1373,7 @@ if i32.const 0 i32.const 24 - i32.const 76 + i32.const 75 i32.const 2 call $~lib/env/abort unreachable @@ -1386,7 +1386,7 @@ if i32.const 0 i32.const 24 - i32.const 77 + i32.const 76 i32.const 2 call $~lib/env/abort unreachable @@ -1403,7 +1403,7 @@ if i32.const 0 i32.const 24 - i32.const 80 + i32.const 79 i32.const 2 call $~lib/env/abort unreachable @@ -1418,7 +1418,7 @@ if i32.const 0 i32.const 24 - i32.const 81 + i32.const 80 i32.const 2 call $~lib/env/abort unreachable @@ -1431,7 +1431,7 @@ if i32.const 0 i32.const 24 - i32.const 82 + i32.const 81 i32.const 2 call $~lib/env/abort unreachable @@ -1448,7 +1448,7 @@ if i32.const 0 i32.const 24 - i32.const 85 + i32.const 84 i32.const 2 call $~lib/env/abort unreachable @@ -1463,7 +1463,7 @@ if i32.const 0 i32.const 24 - i32.const 86 + i32.const 85 i32.const 2 call $~lib/env/abort unreachable @@ -1476,7 +1476,7 @@ if i32.const 0 i32.const 24 - i32.const 87 + i32.const 86 i32.const 2 call $~lib/env/abort unreachable @@ -4571,7 +4571,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -4692,7 +4692,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -4793,7 +4793,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -4920,7 +4920,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -5045,7 +5045,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -5144,7 +5144,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -5267,7 +5267,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -5390,7 +5390,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -5513,7 +5513,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -5636,7 +5636,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -5735,7 +5735,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -5835,7 +5835,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -5933,7 +5933,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6031,7 +6031,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6131,7 +6131,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6229,7 +6229,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6325,7 +6325,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6421,7 +6421,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6517,7 +6517,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6613,7 +6613,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6709,7 +6709,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6805,7 +6805,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6913,7 +6913,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -6927,7 +6927,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -6941,7 +6941,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7068,7 +7068,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -7082,7 +7082,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -7096,7 +7096,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7204,7 +7204,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -7218,7 +7218,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -7232,7 +7232,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7363,7 +7363,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -7377,7 +7377,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -7391,7 +7391,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7522,7 +7522,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -7536,7 +7536,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -7550,7 +7550,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7658,7 +7658,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -7672,7 +7672,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -7686,7 +7686,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7817,7 +7817,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -7831,7 +7831,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -7845,7 +7845,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7976,7 +7976,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -7990,7 +7990,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -8004,7 +8004,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -8135,7 +8135,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -8149,7 +8149,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -8163,7 +8163,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -8294,7 +8294,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -8308,7 +8308,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -8322,7 +8322,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -8430,7 +8430,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -8444,7 +8444,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -8458,7 +8458,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -8573,7 +8573,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -8590,7 +8590,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -8701,7 +8701,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -8718,7 +8718,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -8829,7 +8829,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -8846,7 +8846,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -8961,7 +8961,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -8978,7 +8978,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -9089,7 +9089,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -9106,7 +9106,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -9213,7 +9213,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -9230,7 +9230,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -9337,7 +9337,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -9354,7 +9354,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -9461,7 +9461,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -9478,7 +9478,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -9585,7 +9585,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -9602,7 +9602,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -9709,7 +9709,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -9726,7 +9726,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -9833,7 +9833,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -9850,7 +9850,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -9965,7 +9965,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -9981,7 +9981,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -10092,7 +10092,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -10108,7 +10108,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -10219,7 +10219,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -10235,7 +10235,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -10350,7 +10350,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -10366,7 +10366,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -10477,7 +10477,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -10493,7 +10493,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -10600,7 +10600,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -10616,7 +10616,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -10723,7 +10723,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -10739,7 +10739,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -10846,7 +10846,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -10862,7 +10862,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -10969,7 +10969,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -10985,7 +10985,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -11092,7 +11092,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -11108,7 +11108,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -11215,7 +11215,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -11231,7 +11231,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -11355,7 +11355,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -11372,7 +11372,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -11492,7 +11492,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -11509,7 +11509,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -11629,7 +11629,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -11646,7 +11646,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -11770,7 +11770,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -11787,7 +11787,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -11907,7 +11907,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -11924,7 +11924,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -12040,7 +12040,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -12057,7 +12057,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -12173,7 +12173,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -12190,7 +12190,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -12306,7 +12306,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -12323,7 +12323,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -12439,7 +12439,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -12456,7 +12456,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -12828,7 +12828,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -12845,7 +12845,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -13219,7 +13219,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -13236,7 +13236,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -13263,7 +13263,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -13275,7 +13275,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -13287,7 +13287,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -13392,7 +13392,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -13415,7 +13415,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -13427,7 +13427,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -13439,7 +13439,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -13538,7 +13538,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -13561,7 +13561,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -13573,7 +13573,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -13585,7 +13585,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -13684,7 +13684,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -13711,7 +13711,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -13723,7 +13723,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -13735,7 +13735,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -13840,7 +13840,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -13863,7 +13863,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -13875,7 +13875,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -13887,7 +13887,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -13986,7 +13986,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -14005,7 +14005,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -14017,7 +14017,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -14029,7 +14029,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -14122,7 +14122,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -14141,7 +14141,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -14153,7 +14153,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -14165,7 +14165,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -14258,7 +14258,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -14278,7 +14278,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -14290,7 +14290,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -14302,7 +14302,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -14398,7 +14398,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -14418,7 +14418,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -14430,7 +14430,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -14442,7 +14442,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -14538,7 +14538,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -14558,7 +14558,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -14570,7 +14570,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -14582,7 +14582,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -14678,7 +14678,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -14698,7 +14698,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -14710,7 +14710,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -14722,7 +14722,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -14818,7 +14818,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -14981,7 +14981,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -15010,7 +15010,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -15024,7 +15024,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -15038,7 +15038,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -15052,7 +15052,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -15346,7 +15346,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -15375,7 +15375,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -15389,7 +15389,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -15403,7 +15403,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -15417,7 +15417,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -15711,7 +15711,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -15740,7 +15740,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -15754,7 +15754,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -15768,7 +15768,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -15782,7 +15782,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -16082,7 +16082,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -16111,7 +16111,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -16125,7 +16125,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -16139,7 +16139,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -16153,7 +16153,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -16447,7 +16447,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -16476,7 +16476,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -16490,7 +16490,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -16504,7 +16504,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -16518,7 +16518,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -16669,7 +16669,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -16698,7 +16698,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -16712,7 +16712,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -16726,7 +16726,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -16740,7 +16740,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -17028,7 +17028,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -17057,7 +17057,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -17071,7 +17071,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -17085,7 +17085,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -17099,7 +17099,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -17390,7 +17390,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -17419,7 +17419,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -17433,7 +17433,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -17447,7 +17447,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -17461,7 +17461,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -17752,7 +17752,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -17781,7 +17781,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -17795,7 +17795,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -17809,7 +17809,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -17823,7 +17823,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -18114,7 +18114,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -18143,7 +18143,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -18157,7 +18157,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -18171,7 +18171,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -18185,7 +18185,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -18339,7 +18339,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -18368,7 +18368,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -18382,7 +18382,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -18396,7 +18396,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -18410,7 +18410,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -18425,7 +18425,7 @@ if i32.const 0 i32.const 24 - i32.const 4 + i32.const 3 i32.const 0 call $~lib/env/abort unreachable @@ -18437,7 +18437,7 @@ if i32.const 0 i32.const 24 - i32.const 5 + i32.const 4 i32.const 0 call $~lib/env/abort unreachable @@ -18449,7 +18449,7 @@ if i32.const 0 i32.const 24 - i32.const 6 + i32.const 5 i32.const 0 call $~lib/env/abort unreachable @@ -18461,7 +18461,7 @@ if i32.const 0 i32.const 24 - i32.const 7 + i32.const 6 i32.const 0 call $~lib/env/abort unreachable @@ -18473,7 +18473,7 @@ if i32.const 0 i32.const 24 - i32.const 8 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -18485,7 +18485,7 @@ if i32.const 0 i32.const 24 - i32.const 9 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -18497,7 +18497,7 @@ if i32.const 0 i32.const 24 - i32.const 10 + i32.const 9 i32.const 0 call $~lib/env/abort unreachable @@ -18509,7 +18509,7 @@ if i32.const 0 i32.const 24 - i32.const 11 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -18521,7 +18521,7 @@ if i32.const 0 i32.const 24 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -18533,7 +18533,7 @@ if i32.const 0 i32.const 24 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -18545,7 +18545,7 @@ if i32.const 0 i32.const 24 - i32.const 14 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -18588,7 +18588,7 @@ if i32.const 0 i32.const 24 - i32.const 97 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable @@ -18601,7 +18601,7 @@ if i32.const 0 i32.const 24 - i32.const 98 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -18616,7 +18616,7 @@ if i32.const 0 i32.const 24 - i32.const 99 + i32.const 98 i32.const 0 call $~lib/env/abort unreachable @@ -18630,7 +18630,7 @@ if i32.const 0 i32.const 24 - i32.const 100 + i32.const 99 i32.const 0 call $~lib/env/abort unreachable @@ -18644,7 +18644,7 @@ if i32.const 0 i32.const 24 - i32.const 101 + i32.const 100 i32.const 0 call $~lib/env/abort unreachable @@ -18658,7 +18658,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable @@ -18676,7 +18676,7 @@ if i32.const 0 i32.const 24 - i32.const 105 + i32.const 104 i32.const 0 call $~lib/env/abort unreachable @@ -18691,7 +18691,7 @@ if i32.const 0 i32.const 24 - i32.const 106 + i32.const 105 i32.const 0 call $~lib/env/abort unreachable @@ -18706,7 +18706,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 106 i32.const 0 call $~lib/env/abort unreachable @@ -18720,7 +18720,7 @@ if i32.const 0 i32.const 24 - i32.const 108 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable @@ -18774,7 +18774,7 @@ if i32.const 0 i32.const 24 - i32.const 122 + i32.const 121 i32.const 0 call $~lib/env/abort unreachable @@ -18789,7 +18789,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 122 i32.const 0 call $~lib/env/abort unreachable @@ -18804,7 +18804,7 @@ if i32.const 0 i32.const 24 - i32.const 124 + i32.const 123 i32.const 0 call $~lib/env/abort unreachable @@ -18856,7 +18856,7 @@ if i32.const 0 i32.const 24 - i32.const 126 + i32.const 125 i32.const 0 call $~lib/env/abort unreachable @@ -18886,7 +18886,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 132 i32.const 0 call $~lib/env/abort unreachable @@ -18900,7 +18900,7 @@ if i32.const 0 i32.const 24 - i32.const 134 + i32.const 133 i32.const 0 call $~lib/env/abort unreachable @@ -18914,7 +18914,7 @@ if i32.const 0 i32.const 24 - i32.const 135 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -18960,7 +18960,7 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 144 i32.const 0 call $~lib/env/abort unreachable @@ -18982,7 +18982,7 @@ if i32.const 0 i32.const 24 - i32.const 148 + i32.const 147 i32.const 0 call $~lib/env/abort unreachable @@ -19004,7 +19004,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 150 i32.const 0 call $~lib/env/abort unreachable @@ -19026,7 +19026,7 @@ if i32.const 0 i32.const 24 - i32.const 154 + i32.const 153 i32.const 0 call $~lib/env/abort unreachable @@ -19048,7 +19048,7 @@ if i32.const 0 i32.const 24 - i32.const 157 + i32.const 156 i32.const 0 call $~lib/env/abort unreachable @@ -19072,7 +19072,7 @@ if i32.const 0 i32.const 24 - i32.const 161 + i32.const 160 i32.const 0 call $~lib/env/abort unreachable @@ -19085,7 +19085,7 @@ if i32.const 0 i32.const 24 - i32.const 162 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable @@ -19098,7 +19098,7 @@ if i32.const 0 i32.const 24 - i32.const 163 + i32.const 162 i32.const 0 call $~lib/env/abort unreachable @@ -19114,7 +19114,7 @@ if i32.const 0 i32.const 24 - i32.const 164 + i32.const 163 i32.const 0 call $~lib/env/abort unreachable @@ -19130,7 +19130,7 @@ if i32.const 0 i32.const 24 - i32.const 165 + i32.const 164 i32.const 0 call $~lib/env/abort unreachable @@ -19176,7 +19176,7 @@ if i32.const 0 i32.const 24 - i32.const 175 + i32.const 174 i32.const 0 call $~lib/env/abort unreachable @@ -19198,7 +19198,7 @@ if i32.const 0 i32.const 24 - i32.const 178 + i32.const 177 i32.const 0 call $~lib/env/abort unreachable @@ -19220,7 +19220,7 @@ if i32.const 0 i32.const 24 - i32.const 181 + i32.const 180 i32.const 0 call $~lib/env/abort unreachable @@ -19242,7 +19242,7 @@ if i32.const 0 i32.const 24 - i32.const 184 + i32.const 183 i32.const 0 call $~lib/env/abort unreachable @@ -19264,7 +19264,7 @@ if i32.const 0 i32.const 24 - i32.const 187 + i32.const 186 i32.const 0 call $~lib/env/abort unreachable @@ -19288,7 +19288,7 @@ if i32.const 0 i32.const 24 - i32.const 191 + i32.const 190 i32.const 0 call $~lib/env/abort unreachable @@ -19303,7 +19303,7 @@ if i32.const 0 i32.const 24 - i32.const 192 + i32.const 191 i32.const 0 call $~lib/env/abort unreachable @@ -19318,7 +19318,7 @@ if i32.const 0 i32.const 24 - i32.const 193 + i32.const 192 i32.const 0 call $~lib/env/abort unreachable @@ -19334,7 +19334,7 @@ if i32.const 0 i32.const 24 - i32.const 194 + i32.const 193 i32.const 0 call $~lib/env/abort unreachable @@ -19350,7 +19350,7 @@ if i32.const 0 i32.const 24 - i32.const 195 + i32.const 194 i32.const 0 call $~lib/env/abort unreachable @@ -19401,7 +19401,7 @@ if i32.const 0 i32.const 24 - i32.const 212 + i32.const 211 i32.const 0 call $~lib/env/abort unreachable @@ -19414,7 +19414,7 @@ if i32.const 0 i32.const 24 - i32.const 213 + i32.const 212 i32.const 0 call $~lib/env/abort unreachable @@ -19427,7 +19427,7 @@ if i32.const 0 i32.const 24 - i32.const 214 + i32.const 213 i32.const 0 call $~lib/env/abort unreachable @@ -19440,7 +19440,7 @@ if i32.const 0 i32.const 24 - i32.const 215 + i32.const 214 i32.const 0 call $~lib/env/abort unreachable @@ -19459,7 +19459,7 @@ if i32.const 0 i32.const 24 - i32.const 218 + i32.const 217 i32.const 0 call $~lib/env/abort unreachable @@ -19472,7 +19472,7 @@ if i32.const 0 i32.const 24 - i32.const 219 + i32.const 218 i32.const 0 call $~lib/env/abort unreachable @@ -19485,7 +19485,7 @@ if i32.const 0 i32.const 24 - i32.const 220 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -19498,7 +19498,7 @@ if i32.const 0 i32.const 24 - i32.const 221 + i32.const 220 i32.const 0 call $~lib/env/abort unreachable @@ -19517,7 +19517,7 @@ if i32.const 0 i32.const 24 - i32.const 224 + i32.const 223 i32.const 0 call $~lib/env/abort unreachable @@ -19530,7 +19530,7 @@ if i32.const 0 i32.const 24 - i32.const 225 + i32.const 224 i32.const 0 call $~lib/env/abort unreachable @@ -19543,7 +19543,7 @@ if i32.const 0 i32.const 24 - i32.const 226 + i32.const 225 i32.const 0 call $~lib/env/abort unreachable @@ -19556,7 +19556,7 @@ if i32.const 0 i32.const 24 - i32.const 227 + i32.const 226 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/switch.json b/tests/compiler/switch.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/switch.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/ternary.json b/tests/compiler/ternary.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/ternary.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/threads.json b/tests/compiler/threads.json index 32c45dde2b..b3cf3d479c 100644 --- a/tests/compiler/threads.json +++ b/tests/compiler/threads.json @@ -3,6 +3,7 @@ "threads" ], "asc_flags": [ + "--runtime none", "--memoryBase 8", "--sharedMemory 1" ] diff --git a/tests/compiler/typealias.json b/tests/compiler/typealias.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/typealias.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/unary.json b/tests/compiler/unary.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/unary.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/void.json b/tests/compiler/void.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/void.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/while.json b/tests/compiler/while.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/while.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/wildcard-export.json b/tests/compiler/wildcard-export.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/wildcard-export.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file From 7b99e44343d7880c4924ffbadff04bf115cbb4f4 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 31 Mar 2019 22:05:52 +0200 Subject: [PATCH 081/119] update allocator tests --- tests/allocators/arena/package.json | 4 +- tests/allocators/buddy/package.json | 4 +- tests/allocators/tlsf/optimized.wat | 2 +- tests/allocators/tlsf/package.json | 4 +- tests/allocators/tlsf/untouched.wat | 271 +++++++++++++--------------- 5 files changed, 131 insertions(+), 154 deletions(-) diff --git a/tests/allocators/arena/package.json b/tests/allocators/arena/package.json index 68fede664c..dc760bf282 100644 --- a/tests/allocators/arena/package.json +++ b/tests/allocators/arena/package.json @@ -2,7 +2,7 @@ "private": true, "scripts": { "build": "npm run build:untouched && npm run build:optimized", - "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --validate --sourceMap --measure", - "build:optimized": "node ../../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --validate --sourceMap --measure --noAssert --optimize" + "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --runtime none --validate --sourceMap --measure", + "build:optimized": "node ../../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --runtime none --validate --sourceMap --measure --noAssert --optimize" } } diff --git a/tests/allocators/buddy/package.json b/tests/allocators/buddy/package.json index 68fede664c..dc760bf282 100644 --- a/tests/allocators/buddy/package.json +++ b/tests/allocators/buddy/package.json @@ -2,7 +2,7 @@ "private": true, "scripts": { "build": "npm run build:untouched && npm run build:optimized", - "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --validate --sourceMap --measure", - "build:optimized": "node ../../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --validate --sourceMap --measure --noAssert --optimize" + "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --runtime none --validate --sourceMap --measure", + "build:optimized": "node ../../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --runtime none --validate --sourceMap --measure --noAssert --optimize" } } diff --git a/tests/allocators/tlsf/optimized.wat b/tests/allocators/tlsf/optimized.wat index f37b5d8d57..15fbd03be4 100644 --- a/tests/allocators/tlsf/optimized.wat +++ b/tests/allocators/tlsf/optimized.wat @@ -12,8 +12,8 @@ (data (i32.const 8) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/memory/memory.implemented i32 (i32.const 1)) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) (export "memory.implemented" (global $~lib/memory/memory.implemented)) diff --git a/tests/allocators/tlsf/package.json b/tests/allocators/tlsf/package.json index 68fede664c..dc760bf282 100644 --- a/tests/allocators/tlsf/package.json +++ b/tests/allocators/tlsf/package.json @@ -2,7 +2,7 @@ "private": true, "scripts": { "build": "npm run build:untouched && npm run build:optimized", - "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --validate --sourceMap --measure", - "build:optimized": "node ../../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --validate --sourceMap --measure --noAssert --optimize" + "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --runtime none --validate --sourceMap --measure", + "build:optimized": "node ../../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --runtime none --validate --sourceMap --measure --noAssert --optimize" } } diff --git a/tests/allocators/tlsf/untouched.wat b/tests/allocators/tlsf/untouched.wat index 59c8b75b1d..84737f39bb 100644 --- a/tests/allocators/tlsf/untouched.wat +++ b/tests/allocators/tlsf/untouched.wat @@ -1,36 +1,36 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$v (func)) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00,\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") - (data (i32.const 64) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") + (data (i32.const 48) "\01\00\00\00,\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/memory/memory.implemented i32 (i32.const 1)) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) - (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) - (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) - (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) - (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) - (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) - (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) - (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) - (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) - (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) + (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) - (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/memory/memory.implemented i32 (i32.const 1)) + (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) + (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) + (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) + (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) + (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) + (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) (global $~lib/memory/HEAP_BASE i32 (i32.const 100)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -43,56 +43,36 @@ (export "memory.reset" (func $~lib/memory/memory.reset)) (export "memory.repeat" (func $~lib/memory/memory.repeat)) (export "memory.compare" (func $~lib/memory/memory.compare)) - (start $start) - (func $start:~lib/allocator/tlsf (; 1 ;) (type $FUNCSIG$v) - i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS - i32.shl - i32.const 32 - i32.le_s - i32.eqz - if - i32.const 0 - i32.const 16 - i32.const 114 - i32.const 0 - call $~lib/env/abort - unreachable - end - ) - (func $start:assembly/index (; 2 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/tlsf - ) - (func $~lib/memory/memory.init (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.init (; 1 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) i32.const 0 - i32.const 72 + i32.const 16 i32.const 46 i32.const 4 call $~lib/env/abort unreachable ) - (func $~lib/memory/memory.drop (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.drop (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 0 - i32.const 72 + i32.const 16 i32.const 53 i32.const 4 call $~lib/env/abort unreachable ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 0 local.get $1 i32.store offset=2912 ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u i32.eqz if i32.const 0 - i32.const 16 - i32.const 135 + i32.const 56 + i32.const 159 i32.const 4 call $~lib/env/abort unreachable @@ -105,15 +85,15 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 7 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 5 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u i32.eqz if i32.const 0 - i32.const 16 - i32.const 158 + i32.const 56 + i32.const 184 i32.const 4 call $~lib/env/abort unreachable @@ -124,8 +104,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 159 + i32.const 56 + i32.const 185 i32.const 4 call $~lib/env/abort unreachable @@ -142,11 +122,11 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Root#get:tailRef (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.load offset=2912 ) - (func $~lib/allocator/tlsf/Block#get:right (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -157,8 +137,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 81 + i32.const 56 + i32.const 104 i32.const 4 call $~lib/env/abort unreachable @@ -177,8 +157,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 16 - i32.const 82 + i32.const 56 + i32.const 105 i32.const 11 call $~lib/env/abort unreachable @@ -186,15 +166,15 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/fls (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 16 - i32.const 419 + i32.const 56 + i32.const 447 i32.const 2 call $~lib/env/abort unreachable @@ -204,15 +184,15 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u i32.eqz if i32.const 0 - i32.const 16 - i32.const 149 + i32.const 56 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable @@ -223,8 +203,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 150 + i32.const 56 + i32.const 176 i32.const 4 call $~lib/env/abort unreachable @@ -240,15 +220,15 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u i32.eqz if i32.const 0 - i32.const 16 - i32.const 129 + i32.const 56 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -260,7 +240,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -277,8 +257,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 249 + i32.const 56 + i32.const 277 i32.const 4 call $~lib/env/abort unreachable @@ -303,8 +283,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 251 + i32.const 56 + i32.const 279 i32.const 4 call $~lib/env/abort unreachable @@ -405,7 +385,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -414,8 +394,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 73 + i32.const 56 + i32.const 96 i32.const 4 call $~lib/env/abort unreachable @@ -428,8 +408,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 16 - i32.const 74 + i32.const 56 + i32.const 97 i32.const 11 call $~lib/env/abort unreachable @@ -437,7 +417,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/Root#setJump (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.load global.get $~lib/allocator/tlsf/FREE @@ -445,8 +425,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 325 + i32.const 56 + i32.const 353 i32.const 4 call $~lib/env/abort unreachable @@ -458,8 +438,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 326 + i32.const 56 + i32.const 354 i32.const 4 call $~lib/env/abort unreachable @@ -471,8 +451,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 327 + i32.const 56 + i32.const 355 i32.const 4 call $~lib/env/abort unreachable @@ -483,7 +463,7 @@ local.get $1 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -497,8 +477,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 180 + i32.const 56 + i32.const 208 i32.const 4 call $~lib/env/abort unreachable @@ -512,8 +492,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 182 + i32.const 56 + i32.const 210 i32.const 4 call $~lib/env/abort unreachable @@ -538,8 +518,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 184 + i32.const 56 + i32.const 212 i32.const 4 call $~lib/env/abort unreachable @@ -550,8 +530,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 16 - i32.const 188 + i32.const 56 + i32.const 216 i32.const 23 call $~lib/env/abort unreachable @@ -598,8 +578,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 16 - i32.const 202 + i32.const 56 + i32.const 230 i32.const 24 call $~lib/env/abort unreachable @@ -616,8 +596,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 204 + i32.const 56 + i32.const 232 i32.const 6 call $~lib/env/abort unreachable @@ -671,8 +651,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 217 + i32.const 56 + i32.const 245 i32.const 4 call $~lib/env/abort unreachable @@ -749,7 +729,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -762,8 +742,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 368 + i32.const 56 + i32.const 396 i32.const 4 call $~lib/env/abort unreachable @@ -775,8 +755,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 369 + i32.const 56 + i32.const 397 i32.const 4 call $~lib/env/abort unreachable @@ -788,8 +768,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 370 + i32.const 56 + i32.const 398 i32.const 4 call $~lib/env/abort unreachable @@ -809,8 +789,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 375 + i32.const 56 + i32.const 403 i32.const 6 call $~lib/env/abort unreachable @@ -838,8 +818,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 384 + i32.const 56 + i32.const 412 i32.const 6 call $~lib/env/abort unreachable @@ -902,15 +882,15 @@ call $~lib/allocator/tlsf/Root#insert i32.const 1 ) - (func $~lib/allocator/tlsf/ffs (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 16 - i32.const 413 + i32.const 56 + i32.const 441 i32.const 2 call $~lib/env/abort unreachable @@ -918,15 +898,15 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/ffs (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 16 - i32.const 413 + i32.const 56 + i32.const 441 i32.const 2 call $~lib/env/abort unreachable @@ -934,7 +914,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -955,8 +935,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 287 + i32.const 56 + i32.const 315 i32.const 4 call $~lib/env/abort unreachable @@ -1051,8 +1031,8 @@ local.get $7 else i32.const 0 - i32.const 16 - i32.const 314 + i32.const 56 + i32.const 342 i32.const 16 call $~lib/env/abort unreachable @@ -1075,7 +1055,7 @@ end local.get $6 ) - (func $~lib/allocator/tlsf/Root#use (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1088,8 +1068,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 339 + i32.const 56 + i32.const 367 i32.const 4 call $~lib/env/abort unreachable @@ -1108,8 +1088,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 340 + i32.const 56 + i32.const 368 i32.const 4 call $~lib/env/abort unreachable @@ -1121,8 +1101,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 341 + i32.const 56 + i32.const 369 i32.const 4 call $~lib/env/abort unreachable @@ -1181,8 +1161,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 16 - i32.const 359 + i32.const 56 + i32.const 387 i32.const 25 call $~lib/env/abort unreachable @@ -1203,7 +1183,7 @@ global.get $~lib/allocator/tlsf/Block.INFO i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1407,8 +1387,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 16 - i32.const 472 + i32.const 56 + i32.const 502 i32.const 12 call $~lib/env/abort unreachable @@ -1428,8 +1408,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 475 + i32.const 56 + i32.const 505 i32.const 2 call $~lib/env/abort unreachable @@ -1439,12 +1419,12 @@ local.get $0 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/memory/memory.allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/allocator/tlsf/__mem_free (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1468,8 +1448,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 488 + i32.const 56 + i32.const 518 i32.const 6 call $~lib/env/abort unreachable @@ -1487,19 +1467,19 @@ end end ) - (func $~lib/memory/memory.free (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/tlsf/__mem_free ) - (func $~lib/memory/memory.reset (; 26 ;) (type $FUNCSIG$v) + (func $~lib/memory/memory.reset (; 24 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 72 + i32.const 16 i32.const 77 i32.const 9 call $~lib/env/abort unreachable ) - (func $~lib/util/memory/memcpy (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2700,7 +2680,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2931,7 +2911,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 29 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 27 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) i32.const 0 @@ -2963,7 +2943,7 @@ end end ) - (func $~lib/memory/memory.compare (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.compare (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3028,9 +3008,6 @@ end end ) - (func $start (; 31 ;) (type $FUNCSIG$v) - call $start:assembly/index - ) - (func $null (; 32 ;) (type $FUNCSIG$v) + (func $null (; 29 ;) (type $FUNCSIG$v) ) ) From 1ada8548300de94d2b39f7486dabd77d7c198c7a Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 1 Apr 2019 22:23:11 +0200 Subject: [PATCH 082/119] some cleanup --- src/builtins.ts | 10 +- src/program.ts | 10 +- std/assembly/array.ts | 50 +- std/assembly/arraybuffer.ts | 42 +- std/assembly/dataview.ts | 4 +- std/assembly/fixedarray.ts | 8 +- std/assembly/gc.ts | 15 +- std/assembly/runtime.ts | 295 +-- std/assembly/string.ts | 97 +- std/assembly/typedarray.ts | 7 +- std/assembly/util/number.ts | 29 +- tests/compiler/call-super.optimized.wat | 52 +- tests/compiler/call-super.untouched.wat | 56 +- tests/compiler/constructor.optimized.wat | 52 +- tests/compiler/constructor.untouched.wat | 56 +- tests/compiler/exports.optimized.wat | 20 +- tests/compiler/exports.untouched.wat | 24 +- tests/compiler/gc.optimized.wat | 1346 ++++++++++++- tests/compiler/gc.ts | 2 +- tests/compiler/gc.untouched.wat | 1757 ++++++++++++++++- tests/compiler/gc/global-assign.optimized.wat | 20 +- tests/compiler/gc/global-assign.untouched.wat | 20 +- tests/compiler/gc/global-init.optimized.wat | 20 +- tests/compiler/gc/global-init.untouched.wat | 20 +- tests/compiler/gc/itcm/trace.optimized.wat | 44 +- tests/compiler/gc/itcm/trace.untouched.wat | 101 +- .../gc/rc/global-assign.optimized.wat | 20 +- .../gc/rc/global-assign.untouched.wat | 20 +- .../compiler/gc/rc/global-init.optimized.wat | 16 +- .../compiler/gc/rc/global-init.untouched.wat | 20 +- tests/compiler/getter-call.optimized.wat | 12 +- tests/compiler/getter-call.untouched.wat | 20 +- tests/compiler/inlining.optimized.wat | 20 +- tests/compiler/inlining.untouched.wat | 24 +- tests/compiler/number.optimized.wat | 36 +- tests/compiler/number.untouched.wat | 113 +- .../optional-typeparameters.optimized.wat | 20 +- .../optional-typeparameters.untouched.wat | 24 +- tests/compiler/std/array-access.optimized.wat | 2 +- tests/compiler/std/array-access.untouched.wat | 2 +- .../compiler/std/array-literal.optimized.wat | 38 +- .../compiler/std/array-literal.untouched.wat | 42 +- tests/compiler/std/array.optimized.wat | 430 ++-- tests/compiler/std/array.untouched.wat | 1736 +++++++--------- tests/compiler/std/arraybuffer.optimized.wat | 64 +- tests/compiler/std/arraybuffer.untouched.wat | 117 +- tests/compiler/std/dataview.optimized.wat | 42 +- tests/compiler/std/dataview.untouched.wat | 91 +- tests/compiler/std/date.optimized.wat | 12 +- tests/compiler/std/date.untouched.wat | 20 +- tests/compiler/std/map.optimized.wat | 60 +- tests/compiler/std/map.untouched.wat | 87 +- tests/compiler/std/new.optimized.wat | 12 +- tests/compiler/std/new.untouched.wat | 20 +- .../compiler/std/object-literal.optimized.wat | 24 +- .../compiler/std/object-literal.untouched.wat | 28 +- .../std/operator-overloading.optimized.wat | 24 +- .../std/operator-overloading.untouched.wat | 28 +- tests/compiler/std/runtime.optimized.wat | 72 +- tests/compiler/std/runtime.ts | 29 +- tests/compiler/std/runtime.untouched.wat | 155 +- tests/compiler/std/set.optimized.wat | 60 +- tests/compiler/std/set.untouched.wat | 87 +- tests/compiler/std/static-array.optimized.wat | 10 +- tests/compiler/std/static-array.untouched.wat | 31 +- tests/compiler/std/string-utf8.optimized.wat | 24 +- tests/compiler/std/string-utf8.untouched.wat | 42 +- tests/compiler/std/string.optimized.wat | 503 ++--- tests/compiler/std/string.untouched.wat | 642 +++--- tests/compiler/std/symbol.optimized.wat | 32 +- tests/compiler/std/symbol.untouched.wat | 80 +- tests/compiler/std/typedarray.optimized.wat | 262 +-- tests/compiler/std/typedarray.ts | 4 +- tests/compiler/std/typedarray.untouched.wat | 521 ++--- 74 files changed, 6049 insertions(+), 3886 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index 131adfba02..3fc6030d7f 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -479,11 +479,11 @@ export namespace BuiltinSymbols { // std/runtime.ts export const classId = "~lib/runtime/classId"; export const iterateRoots = "~lib/runtime/iterateRoots"; - export const allocate = "~lib/runtime/allocate"; - export const reallocate = "~lib/runtime/reallocate"; - export const register = "~lib/runtime/register"; - export const discard = "~lib/runtime/discard"; - export const makeArray = "~lib/runtime/makeArray"; + export const runtime_allocate = "~lib/runtime/runtime.allocate"; + export const runtime_reallocate = "~lib/runtime/runtime.reallocate"; + export const runtime_register = "~lib/runtime/runtime.register"; + export const runtime_discard = "~lib/runtime/runtime.discard"; + export const runtime_makeArray = "~lib/runtime/runtime.makeArray"; // std/typedarray.ts export const Int8Array = "~lib/typedarray/Int8Array"; diff --git a/src/program.ts b/src/program.ts index 3441e1c29c..bbe534f219 100644 --- a/src/program.ts +++ b/src/program.ts @@ -820,7 +820,7 @@ export class Program extends DiagnosticEmitter { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.abortInstance = this.resolver.resolveFunction(element, null); } - if (element = this.lookupGlobal(BuiltinSymbols.allocate)) { + if (element = this.lookupGlobal(BuiltinSymbols.runtime_allocate)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.allocateInstance = this.resolver.resolveFunction(element, null); } @@ -828,19 +828,19 @@ export class Program extends DiagnosticEmitter { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.memoryAllocateInstance = this.resolver.resolveFunction(element, null); } - if (element = this.lookupGlobal(BuiltinSymbols.reallocate)) { + if (element = this.lookupGlobal(BuiltinSymbols.runtime_reallocate)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.reallocateInstance = this.resolver.resolveFunction(element, null); } - if (element = this.lookupGlobal(BuiltinSymbols.discard)) { + if (element = this.lookupGlobal(BuiltinSymbols.runtime_discard)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.discardInstance = this.resolver.resolveFunction(element, null); } - if (element = this.lookupGlobal(BuiltinSymbols.register)) { + if (element = this.lookupGlobal(BuiltinSymbols.runtime_register)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.registerInstance = this.resolver.resolveFunction(element, null); } - if (element = this.lookupGlobal(BuiltinSymbols.makeArray)) { + if (element = this.lookupGlobal(BuiltinSymbols.runtime_makeArray)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.makeArrayInstance = this.resolver.resolveFunction(element, null); } diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 7a3a26f01a..a2a2c32c0b 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -1,7 +1,7 @@ /// -import { ALLOCATE, REALLOCATE, DISCARD, REGISTER, MAX_BYTELENGTH, MAKEARRAY, ArrayBufferView, classId } from "./runtime"; -import { ArrayBuffer } from "./arraybuffer"; +import { runtime, classId } from "./runtime"; +import { ArrayBuffer, ArrayBufferView } from "./arraybuffer"; import { COMPARATOR, SORT } from "./util/sort"; import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number"; import { isArray as builtin_isArray } from "./builtins"; @@ -10,10 +10,10 @@ import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_EMPTYARRAY, E_HOLEYARRAY } from " /** Ensures that the given array has _at least_ the specified capacity. */ function ensureCapacity(array: ArrayBufferView, minCapacity: i32, alignLog2: u32): void { if (minCapacity > array.dataLength >>> alignLog2) { - if (minCapacity > (MAX_BYTELENGTH >>> alignLog2)) throw new RangeError(E_INVALIDLENGTH); + if (minCapacity > (runtime.MAX_BYTELENGTH >>> alignLog2)) throw new RangeError(E_INVALIDLENGTH); let oldData = array.data; let newByteLength = minCapacity << alignLog2; - let newData = REALLOCATE(changetype(oldData), newByteLength); // registers on move + let newData = runtime.reallocate(changetype(oldData), newByteLength); // registers on move if (newData !== changetype(oldData)) { array.data = changetype(newData); // links array.dataStart = newData; @@ -40,8 +40,8 @@ export class Array extends ArrayBufferView { } static create(capacity: i32 = 0): Array { - if (capacity > MAX_BYTELENGTH >>> alignof()) throw new RangeError(E_INVALIDLENGTH); - var array = MAKEARRAY(capacity); + if (capacity > runtime.MAX_BYTELENGTH >>> alignof()) throw new RangeError(E_INVALIDLENGTH); + var array = changetype>(runtime.makeArray(capacity, classId>(), alignof())); memory.fill(array.dataStart, 0, array.dataLength); array.length_ = 0; // ! return array; @@ -231,7 +231,7 @@ export class Array extends ArrayBufferView { concat(other: Array): Array { var thisLen = this.length_; var otherLen = select(0, other.length_, other === null); - var out = MAKEARRAY(thisLen + otherLen); + var out = changetype>(runtime.makeArray(thisLen + otherLen, classId>(), alignof())); var outStart = out.dataStart; var thisSize = thisLen << alignof(); if (isManaged()) { @@ -319,7 +319,7 @@ export class Array extends ArrayBufferView { map(callbackfn: (value: T, index: i32, array: Array) => U): Array { var length = this.length_; - var out = MAKEARRAY(length); + var out = changetype>(runtime.makeArray(length, classId>(), alignof())); var outStart = out.dataStart; for (let index = 0; index < min(length, this.length_); ++index) { let value = load(this.dataStart + (index << alignof())); @@ -345,7 +345,7 @@ export class Array extends ArrayBufferView { } filter(callbackfn: (value: T, index: i32, array: Array) => bool): Array { - var result = MAKEARRAY(0); + var result = changetype>(runtime.makeArray(0, classId>(), alignof())); for (let index = 0, length = this.length_; index < min(length, this.length_); ++index) { let value = load(this.dataStart + (index << alignof())); if (callbackfn(value, index, this)) result.push(value); @@ -433,7 +433,7 @@ export class Array extends ArrayBufferView { begin = begin < 0 ? max(begin + length, 0) : min(begin, length); end = end < 0 ? max(end + length, 0) : min(end , length); length = max(end - begin, 0); - var slice = MAKEARRAY(length); + var slice = changetype>(runtime.makeArray(length, classId>(), alignof())); var sliceBase = slice.dataStart; var thisBase = this.dataStart + (begin << alignof()); if (isManaged()) { @@ -465,7 +465,7 @@ export class Array extends ArrayBufferView { var length = this.length_; start = start < 0 ? max(length + start, 0) : min(start, length); deleteCount = max(min(deleteCount, length - start), 0); - var result = MAKEARRAY(deleteCount); + var result = changetype>(runtime.makeArray(deleteCount, classId>(), alignof())); var resultStart = result.dataStart; var thisStart = this.dataStart; var thisBase = thisStart + (start << alignof()); @@ -560,7 +560,7 @@ export class Array extends ArrayBufferView { var sepLen = separator.length; var valueLen = 5; // max possible length of element len("false") var estLen = (valueLen + sepLen) * lastIndex + valueLen; - var result = ALLOCATE(estLen << 1); + var result = runtime.allocate(estLen << 1); var offset = 0; var value: bool; for (let i = 0; i < lastIndex; ++i) { @@ -592,10 +592,10 @@ export class Array extends ArrayBufferView { if (estLen > offset) { let trimmed = changetype(result).substring(0, offset); - DISCARD(result); + runtime.discard(result); return trimmed; // registered in .substring } - return REGISTER(result); + return changetype(runtime.register(result, classId())); } private join_int(separator: string = ","): string { @@ -608,7 +608,7 @@ export class Array extends ArrayBufferView { var sepLen = separator.length; const valueLen = (sizeof() <= 4 ? 10 : 20) + i32(isSigned()); var estLen = (valueLen + sepLen) * lastIndex + valueLen; - var result = ALLOCATE(estLen << 1); + var result = runtime.allocate(estLen << 1); var offset = 0; var value: T; for (let i = 0; i < lastIndex; ++i) { @@ -629,10 +629,10 @@ export class Array extends ArrayBufferView { offset += itoa_stream(result, offset, value); if (estLen > offset) { let trimmed = changetype(result).substring(0, offset); - DISCARD(result); + runtime.discard(result); return trimmed; // registered in .substring } - return REGISTER(result); + return changetype(runtime.register(result, classId())); } private join_flt(separator: string = ","): string { @@ -649,7 +649,7 @@ export class Array extends ArrayBufferView { const valueLen = MAX_DOUBLE_LENGTH; var sepLen = separator.length; var estLen = (valueLen + sepLen) * lastIndex + valueLen; - var result = ALLOCATE(estLen << 1); + var result = runtime.allocate(estLen << 1); var offset = 0; var value: T; for (let i = 0; i < lastIndex; ++i) { @@ -674,10 +674,10 @@ export class Array extends ArrayBufferView { ); if (estLen > offset) { let trimmed = changetype(result).substring(0, offset); - DISCARD(result); + runtime.discard(result); return trimmed; // registered in .substring } - return REGISTER(result); + return changetype(runtime.register(result, classId())); } private join_str(separator: string = ","): string { @@ -694,7 +694,7 @@ export class Array extends ArrayBufferView { if (value !== null) estLen += value.length; } var offset = 0; - var result = ALLOCATE((estLen + sepLen * lastIndex) << 1); + var result = runtime.allocate((estLen + sepLen * lastIndex) << 1); for (let i = 0; i < lastIndex; ++i) { value = load(dataStart + (i << alignof())); if (value !== null) { @@ -723,7 +723,7 @@ export class Array extends ArrayBufferView { changetype(value).length << 1 ); } - return REGISTER(result); + return changetype(runtime.register(result, classId())); } private join_arr(separator: string = ","): string { @@ -760,7 +760,7 @@ export class Array extends ArrayBufferView { const valueLen = 15; // max possible length of element len("[object Object]") var sepLen = separator.length; var estLen = (valueLen + sepLen) * lastIndex + valueLen; - var result = ALLOCATE(estLen << 1); + var result = runtime.allocate(estLen << 1); var offset = 0; var value: T; for (let i = 0; i < lastIndex; ++i) { @@ -792,10 +792,10 @@ export class Array extends ArrayBufferView { } if (estLen > offset) { let out = changetype(result).substring(0, offset); - DISCARD(result); + runtime.discard(result); return out; // registered in .substring } - return REGISTER(result); + return changetype(runtime.register(result, classId())); } toString(): string { diff --git a/std/assembly/arraybuffer.ts b/std/assembly/arraybuffer.ts index 2461cdd882..558983e0ab 100644 --- a/std/assembly/arraybuffer.ts +++ b/std/assembly/arraybuffer.ts @@ -1,6 +1,34 @@ -import { ALLOCATE, REGISTER, HEADER, HEADER_SIZE, MAX_BYTELENGTH } from "./runtime"; +import { runtime, HEADER, HEADER_SIZE, classId } from "./runtime"; import { E_INVALIDLENGTH } from "./util/error"; +export abstract class ArrayBufferView { + + @unsafe data: ArrayBuffer; + @unsafe dataStart: usize; + @unsafe dataLength: u32; + + protected constructor(length: i32, alignLog2: i32) { + if (length > runtime.MAX_BYTELENGTH >>> alignLog2) throw new RangeError(E_INVALIDLENGTH); + var buffer = new ArrayBuffer(length = length << alignLog2); + this.data = buffer; + this.dataStart = changetype(buffer); + this.dataLength = length; + } + + get byteOffset(): i32 { + return (this.dataStart - changetype(this.data)); + } + + get byteLength(): i32 { + return this.dataLength; + } + + get length(): i32 { + ERROR("missing implementation: subclasses must implement ArrayBufferView#length"); + return unreachable(); + } +} + @sealed export class ArrayBuffer { static isView(value: T): bool { @@ -22,24 +50,24 @@ import { E_INVALIDLENGTH } from "./util/error"; } constructor(length: i32) { - if (length > MAX_BYTELENGTH) throw new RangeError(E_INVALIDLENGTH); - var buffer = ALLOCATE(length); + if (length > runtime.MAX_BYTELENGTH) throw new RangeError(E_INVALIDLENGTH); + var buffer = runtime.allocate(length); memory.fill(changetype(buffer), 0, length); - return REGISTER(buffer); + return changetype(runtime.register(buffer, classId())); } get byteLength(): i32 { return changetype
(changetype(this) - HEADER_SIZE).payloadSize; } - slice(begin: i32 = 0, end: i32 = MAX_BYTELENGTH): ArrayBuffer { + slice(begin: i32 = 0, end: i32 = runtime.MAX_BYTELENGTH): ArrayBuffer { var length = this.byteLength; begin = begin < 0 ? max(length + begin, 0) : min(begin, length); end = end < 0 ? max(length + end , 0) : min(end , length); var outSize = max(end - begin, 0); - var out = ALLOCATE(outSize); + var out = runtime.allocate(outSize); memory.copy(out, changetype(this) + begin, outSize); - return REGISTER(out); + return changetype(runtime.register(out, classId())); } toString(): string { diff --git a/std/assembly/dataview.ts b/std/assembly/dataview.ts index 0e285c465c..144c1cd104 100644 --- a/std/assembly/dataview.ts +++ b/std/assembly/dataview.ts @@ -1,4 +1,4 @@ -import { MAX_BYTELENGTH } from "./runtime"; +import { runtime } from "./runtime"; import { ArrayBuffer } from "./arraybuffer"; import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH } from "./util/error"; @@ -17,7 +17,7 @@ export class DataView { ) { if (byteLength === i32.MIN_VALUE) byteLength = buffer.byteLength - byteOffset; // FIXME if ( - i32(byteLength > MAX_BYTELENGTH) | + i32(byteLength > runtime.MAX_BYTELENGTH) | i32(byteOffset + byteLength > buffer.byteLength) ) throw new RangeError(E_INVALIDLENGTH); this.data = buffer; // links diff --git a/std/assembly/fixedarray.ts b/std/assembly/fixedarray.ts index cd1891ed1e..e63ecab004 100644 --- a/std/assembly/fixedarray.ts +++ b/std/assembly/fixedarray.ts @@ -1,4 +1,4 @@ -import { ALLOCATE, REGISTER, MAX_BYTELENGTH, HEADER, HEADER_SIZE, classId } from "./runtime"; +import { runtime, classId, HEADER, HEADER_SIZE } from "./runtime"; import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_HOLEYARRAY } from "./util/error"; // NOTE: DO NOT USE YET! @@ -10,16 +10,16 @@ export class FixedArray { [key: number]: T; constructor(length: i32) { - if (length > MAX_BYTELENGTH >>> alignof()) throw new RangeError(E_INVALIDLENGTH); + if (length > runtime.MAX_BYTELENGTH >>> alignof()) throw new RangeError(E_INVALIDLENGTH); if (isReference()) { if (!isNullable()) { if (length) throw new Error(E_HOLEYARRAY); } } var outSize = length << alignof(); - var out = ALLOCATE(outSize); + var out = runtime.allocate(outSize); memory.fill(out, 0, outSize); - return REGISTER>(out); + return changetype>(runtime.register(out, classId>())); } get length(): i32 { diff --git a/std/assembly/gc.ts b/std/assembly/gc.ts index ddd9a0d012..c1195c2d2b 100644 --- a/std/assembly/gc.ts +++ b/std/assembly/gc.ts @@ -20,7 +20,9 @@ export namespace gc { else throw new Error(E_NOTIMPLEMENTED); } - /** Retains a reference, making sure that it doesn't become collected. */ + /** Retains a managed object externally, making sure that it doesn't become collected. */ + // @ts-ignore: decorator + @unsafe export function retain(ref: usize): void { var root = GC_ROOT; if (!root.has(ref)) { @@ -28,21 +30,20 @@ export namespace gc { if (implemented) { if (isDefined(__ref_link)) __ref_link(ref, changetype(root)); else if (isDefined(__ref_retain)) __ref_retain(ref); - else assert(false); } } } - /** Releases a reference, allowing it to become collected. */ + /** Releases a managed object externally, allowing it to become collected. */ + // @ts-ignore: decorator + @unsafe export function release(ref: usize): void { var root = GC_ROOT; if (root.has(ref)) { root.delete(ref); if (implemented) { - if (isDefined(__ref_link)) { - if (isDefined(__ref_unlink)) __ref_unlink(ref, changetype(root)); - } else if (isDefined(__ref_retain)) __ref_release(ref); - else assert(false); + if (isDefined(__ref_unlink)) __ref_unlink(ref, changetype(root)); + else if (isDefined(__ref_release)) __ref_release(ref); } } } diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 152aab2be1..f019c8813e 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -1,12 +1,9 @@ // The runtime provides common functionality that links runtime interfaces for memory management -// and garbage collection to the standard library, making sure it all plays well together. However, -// most of the garbage collector interface must still be implemented explicitly in standard library -// components, because common abstractions for both tracing and reference counting would result in -// unnecessary overhead (e.g. tracing needs parent references while rc does not etc.). +// and garbage collection to the standard library, making sure it all plays well together. import { AL_MASK, MAX_SIZE_32 } from "./util/allocator"; import { HEAP_BASE, memory } from "./memory"; -import { Array } from "./array"; +import { ArrayBufferView } from "./arraybuffer"; /** * The common runtime object header prepended to all managed objects. Has a size of 16 bytes in @@ -48,208 +45,122 @@ export declare function classId(): u32; @unsafe @builtin export declare function iterateRoots(fn: (ref: usize) => void): void; -/** Adjusts an allocation to actual block size. Primarily targets TLSF. */ -export function ADJUSTOBLOCK(payloadSize: usize): usize { - // round up to power of 2, e.g. with HEADER_SIZE=8: - // 0 -> 2^3 = 8 - // 1..8 -> 2^4 = 16 - // 9..24 -> 2^5 = 32 - // ... - // MAX_LENGTH -> 2^30 = 0x40000000 (MAX_SIZE_32) - return 1 << (32 - clz(payloadSize + HEADER_SIZE - 1)); -} - -/** - * Allocates a runtime object that might eventually make its way into GC'ed userland as a - * managed object. Implicitly prepends the common runtime header to the allocation. - */ -// @ts-ignore: decorator -@unsafe @inline -export function ALLOCATE(payloadSize: usize): usize { - return allocate(payloadSize); -} - -function allocate(payloadSize: usize): usize { - var header = changetype
(memory.allocate(ADJUSTOBLOCK(payloadSize))); - header.classId = HEADER_MAGIC; - header.payloadSize = payloadSize; - if (isDefined(__ref_collect)) { - header.reserved1 = 0; - header.reserved2 = 0; +/** Runtime implementation. */ +export namespace runtime { + + /** Maximum byte length of any buffer-like object. */ + // @ts-ignore + @lazy + export const MAX_BYTELENGTH: i32 = MAX_SIZE_32 - HEADER_SIZE; + + /** Adjusts an allocation to actual block size. Primarily targets TLSF. */ + export function adjust(payloadSize: usize): usize { + // round up to power of 2, e.g. with HEADER_SIZE=8: + // 0 -> 2^3 = 8 + // 1..8 -> 2^4 = 16 + // 9..24 -> 2^5 = 32 + // ... + // MAX_LENGTH -> 2^30 = 0x40000000 (MAX_SIZE_32) + return 1 << (32 - clz(payloadSize + HEADER_SIZE - 1)); } - return changetype(header) + HEADER_SIZE; -} -/** - * Changes the size of a previously allocated, but not yet registered, runtime object, for - * example when a pre-allocated buffer turned out to be too small or too large. This works by - * aligning dynamic allocations to actual block size internally so in the best case REALLOCATE - * only updates payload size while in the worst case moves the object to a larger block. - */ -// @ts-ignore: decorator -@unsafe @inline -export function REALLOCATE(ref: usize, newPayloadSize: usize): usize { - return reallocate(ref, newPayloadSize); -} + // @ts-ignore: decorator + @unsafe + export function allocate(payloadSize: usize): usize { + var header = changetype
(memory.allocate(adjust(payloadSize))); + header.classId = HEADER_MAGIC; + header.payloadSize = payloadSize; + if (isDefined(__ref_collect)) { + header.reserved1 = 0; + header.reserved2 = 0; + } + return changetype(header) + HEADER_SIZE; + } -function reallocate(ref: usize, newPayloadSize: usize): usize { - // Background: When managed objects are allocated these aren't immediately registered with GC - // but can be used as scratch objects while unregistered. This is useful in situations where - // the object must be reallocated multiple times because its final size isn't known beforehand, - // e.g. in Array#filter, with only the final object making it into GC'ed userland. - var header = changetype
(ref - HEADER_SIZE); - var payloadSize = header.payloadSize; - if (payloadSize < newPayloadSize) { - let newAdjustedSize = ADJUSTOBLOCK(newPayloadSize); - if (select(ADJUSTOBLOCK(payloadSize), 0, ref > HEAP_BASE) < newAdjustedSize) { - // move if the allocation isn't large enough or not a heap object - let newHeader = changetype
(memory.allocate(newAdjustedSize)); - newHeader.classId = header.classId; - if (isDefined(__ref_collect)) { - newHeader.reserved1 = 0; - newHeader.reserved2 = 0; - } - let newRef = changetype(newHeader) + HEADER_SIZE; - memory.copy(newRef, ref, payloadSize); - memory.fill(newRef + payloadSize, 0, newPayloadSize - payloadSize); - if (header.classId == HEADER_MAGIC) { - // free right away if not registered yet - assert(ref > HEAP_BASE); // static objects aren't scratch objects - memory.free(changetype(header)); - } else if (isDefined(__ref_collect)) { - // if previously registered, register again - // @ts-ignore: stub - __ref_register(ref); + // @ts-ignore: decorator + @unsafe + export function reallocate(ref: usize, newPayloadSize: usize): usize { + // Background: When managed objects are allocated these aren't immediately registered with GC + // but can be used as scratch objects while unregistered. This is useful in situations where + // the object must be reallocated multiple times because its final size isn't known beforehand, + // e.g. in Array#filter, with only the final object making it into GC'ed userland. + var header = changetype
(ref - HEADER_SIZE); + var payloadSize = header.payloadSize; + if (payloadSize < newPayloadSize) { + let newAdjustedSize = adjust(newPayloadSize); + if (select(adjust(payloadSize), 0, ref > HEAP_BASE) < newAdjustedSize) { + // move if the allocation isn't large enough or not a heap object + let newHeader = changetype
(memory.allocate(newAdjustedSize)); + newHeader.classId = header.classId; + if (isDefined(__ref_collect)) { + newHeader.reserved1 = 0; + newHeader.reserved2 = 0; + } + let newRef = changetype(newHeader) + HEADER_SIZE; + memory.copy(newRef, ref, payloadSize); + memory.fill(newRef + payloadSize, 0, newPayloadSize - payloadSize); + if (header.classId == HEADER_MAGIC) { + // free right away if not registered yet + assert(ref > HEAP_BASE); // static objects aren't scratch objects + memory.free(changetype(header)); + } else if (isDefined(__ref_collect)) { + // if previously registered, register again + // @ts-ignore: stub + __ref_register(ref); + } + header = newHeader; + ref = newRef; + } else { + // otherwise just clear additional memory within this block + memory.fill(ref + payloadSize, 0, newPayloadSize - payloadSize); } - header = newHeader; - ref = newRef; } else { - // otherwise just clear additional memory within this block - memory.fill(ref + payloadSize, 0, newPayloadSize - payloadSize); + // if the size is the same or less, just update the header accordingly. + // unused space is cleared when grown, so no need to do this here. } - } else { - // if the size is the same or less, just update the header accordingly. - // unused space is cleared when grown, so no need to do this here. - } - header.payloadSize = newPayloadSize; - return ref; -} - -/** - * Registers a runtime object of kind T. Sets the internal class id within the runtime header - * and asserts that the object hasn't been registered yet. If a tracing garbage collector is - * present that requires initial insertion, the macro usually forwards a call to it. Once a - * runtime object has been registed (makes it into userland), it cannot be DISCARD'ed anymore. - */ -// @ts-ignore: decorator -@unsafe @inline -export function REGISTER(ref: usize): T { - if (!isReference()) ERROR("reference expected"); - return changetype(register(ref, classId())); -} - -function register(ref: usize, classId: u32): usize { - if (!ASC_NO_ASSERT) { - assert(ref > HEAP_BASE); // must be a heap object - let header = changetype
(ref - HEADER_SIZE); - assert(header.classId == HEADER_MAGIC); - header.classId = classId; - } else { - changetype
(ref - HEADER_SIZE).classId = classId; - } - // @ts-ignore: stub - if (isDefined(__ref_register)) __ref_register(ref); - return ref; -} - -/** - * Discards a runtime object that has not been registed and turned out to be unnecessary. - * Essentially undoes the forgoing ALLOCATE. Should be avoided where possible. - */ -// @ts-ignore: decorator -@unsafe @inline -export function DISCARD(ref: usize): void { - discard(ref); -} - -function discard(ref: usize): void { - if (!ASC_NO_ASSERT) { - assert(ref > HEAP_BASE); // must be a heap object - let header = changetype
(ref - HEADER_SIZE); - assert(header.classId == HEADER_MAGIC); - memory.free(changetype(header)); - } else { - memory.free(changetype(ref - HEADER_SIZE)); + header.payloadSize = newPayloadSize; + return ref; } -} - -/** - * Makes a new array and optionally initializes is with existing data from source. Used by the - * compiler to either wrap static array data in a new instance or pre-initialize the memory used - * by an array literal. Does not zero the backing buffer! - */ -// @ts-ignore: decorator -@unsafe @inline -export function MAKEARRAY(capacity: i32, source: usize = 0): Array { - return changetype>(makeArray(capacity, classId(), alignof(), source)); -} - -function makeArray(capacity: i32, cid: u32, alignLog2: usize, source: usize): usize { - var array = register(allocate(offsetof()), cid); - var bufferSize = capacity << alignLog2; - var buffer = register(allocate(capacity << alignLog2), classId()); - changetype(array).data = changetype(buffer); // links - changetype(array).dataStart = buffer; - changetype(array).dataLength = bufferSize; - store(changetype(array), capacity, offsetof("length_")); - if (source) memory.copy(buffer, source, bufferSize); - return array; -} - -import { ArrayBuffer } from "./arraybuffer"; -import { E_INVALIDLENGTH } from "./util/error"; - -/** Maximum byte length of any buffer. */ -// @ts-ignore: decorator -@lazy -export const MAX_BYTELENGTH: i32 = MAX_SIZE_32 - HEADER_SIZE; -/** Hard wired ArrayBufferView interface. */ -export abstract class ArrayBufferView { - - /** Backing buffer. */ // @ts-ignore: decorator @unsafe - data: ArrayBuffer; + export function discard(ref: usize): void { + if (!ASC_NO_ASSERT) { + assert(ref > HEAP_BASE); // must be a heap object + let header = changetype
(ref - HEADER_SIZE); + assert(header.classId == HEADER_MAGIC); + memory.free(changetype(header)); + } else { + memory.free(changetype(ref - HEADER_SIZE)); + } + } - /** Data start offset in memory. */ // @ts-ignore: decorator @unsafe - dataStart: usize; + export function register(ref: usize, classId: u32): usize { + if (!ASC_NO_ASSERT) { + assert(ref > HEAP_BASE); // must be a heap object + let header = changetype
(ref - HEADER_SIZE); + assert(header.classId == HEADER_MAGIC); + header.classId = classId; + } else { + changetype
(ref - HEADER_SIZE).classId = classId; + } + if (isDefined(__ref_register)) __ref_register(ref); + return ref; + } - /** Data length in memory, counted from `dataStart`. */ // @ts-ignore: decorator @unsafe - dataLength: u32; - - protected constructor(length: i32, alignLog2: i32) { - if (length > MAX_BYTELENGTH >>> alignLog2) throw new RangeError(E_INVALIDLENGTH); - var buffer = new ArrayBuffer(length = length << alignLog2); - this.data = buffer; - this.dataStart = changetype(buffer); - this.dataLength = length; - } - - get byteOffset(): i32 { - return (this.dataStart - changetype(this.data)); - } - - get byteLength(): i32 { - return this.dataLength; - } - - get length(): i32 { - ERROR("missing implementation: subclasses must implement ArrayBufferView#length"); - return unreachable(); + export function makeArray(capacity: i32, cid: u32, alignLog2: usize, source: usize = 0): usize { + var array = runtime.register(runtime.allocate(offsetof()), cid); + var bufferSize = capacity << alignLog2; + var buffer = runtime.register(runtime.allocate(capacity << alignLog2), classId()); + changetype(array).data = changetype(buffer); // links + changetype(array).dataStart = buffer; + changetype(array).dataLength = bufferSize; + store(changetype(array), capacity, offsetof("length_")); + if (source) memory.copy(buffer, source, bufferSize); + return array; } } diff --git a/std/assembly/string.ts b/std/assembly/string.ts index cdf4e4c9d2..e96155af27 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -1,7 +1,8 @@ /// -import { ALLOCATE, REGISTER, HEADER, HEADER_SIZE, MAKEARRAY, ArrayBufferView } from "./runtime"; import { MAX_SIZE_32 } from "./util/allocator"; +import { runtime, HEADER, HEADER_SIZE, classId } from "./runtime"; +import { ArrayBufferView } from "./arraybuffer"; import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./util/string"; import { E_INVALIDLENGTH } from "./util/error"; @@ -15,15 +16,15 @@ import { E_INVALIDLENGTH } from "./util/error"; // TODO Add and handle second argument static fromCharCode(code: i32): String { - var out = ALLOCATE(2); + var out = runtime.allocate(2); store(out, code); - return REGISTER(out); + return changetype(runtime.register(out, classId())); } static fromCodePoint(code: i32): String { assert(code <= 0x10FFFF); var sur = code > 0xFFFF; - var out = ALLOCATE((i32(sur) + 1) << 1); + var out = runtime.allocate((i32(sur) + 1) << 1); if (!sur) { store(out, code); } else { @@ -32,15 +33,15 @@ import { E_INVALIDLENGTH } from "./util/error"; let lo: u32 = (code & 0x3FF) + 0xDC00; store(out, (hi << 16) | lo); } - return REGISTER(out); + return changetype(runtime.register(out, classId())); } @operator("[]") charAt(pos: i32): String { assert(this !== null); if (pos >= this.length) return changetype(""); - var out = ALLOCATE(2); + var out = runtime.allocate(2); store(out, load(changetype(this) + (pos << 1))); - return REGISTER(out); + return changetype(runtime.register(out, classId())); } charCodeAt(pos: i32): i32 { @@ -57,8 +58,8 @@ import { E_INVALIDLENGTH } from "./util/error"; return ((first - 0xD800) << 10) + (second - 0xDC00) + 0x10000; } - @operator("+") private static __concat(left: string, right: string): string { - return select(left, "null", left !== null).concat(right); + @operator("+") private static __concat(left: String, right: String): String { + return select(left, changetype("null"), left !== null).concat(right); } concat(other: String): String { @@ -67,10 +68,10 @@ import { E_INVALIDLENGTH } from "./util/error"; var otherSize: isize = other.length << 1; var outSize: usize = thisSize + otherSize; if (outSize == 0) return changetype(""); - var out = ALLOCATE(outSize); + var out = runtime.allocate(outSize); memory.copy(out, changetype(this), thisSize); memory.copy(out + thisSize, changetype(other), otherSize); - return REGISTER(out); + return changetype(runtime.register(out, classId())); } endsWith(searchString: String, endPosition: i32 = String.MAX_LENGTH): bool { @@ -180,9 +181,9 @@ import { E_INVALIDLENGTH } from "./util/error"; if (intStart < 0) intStart = max(size + intStart, 0); var resultLength = min(max(end, 0), size - intStart); if (resultLength <= 0) return changetype(""); - var out = ALLOCATE(resultLength << 1); + var out = runtime.allocate(resultLength << 1); memory.copy(out, changetype(this) + intStart, resultLength); - return REGISTER(out); + return changetype(runtime.register(out, classId())); } substring(start: i32, end: i32 = i32.MAX_VALUE): String { @@ -195,9 +196,9 @@ import { E_INVALIDLENGTH } from "./util/error"; len = toPos - fromPos; if (!len) return changetype(""); if (!fromPos && toPos == this.length << 1) return this; - var out = ALLOCATE(len); + var out = runtime.allocate(len); memory.copy(out, changetype(this) + fromPos, len); - return REGISTER(out); + return changetype(runtime.register(out, classId())); } trim(): String { @@ -223,9 +224,9 @@ import { E_INVALIDLENGTH } from "./util/error"; } if (!size) return changetype(""); if (!start && size == length << 1) return this; - var out = ALLOCATE(size); + var out = runtime.allocate(size); memory.copy(out, changetype(this) + offset, size); - return REGISTER(out); + return changetype(runtime.register(out, classId())); } @inline @@ -253,9 +254,9 @@ import { E_INVALIDLENGTH } from "./util/error"; if (!offset) return this; size -= offset; if (!size) return changetype(""); - var out = ALLOCATE(size); + var out = runtime.allocate(size); memory.copy(out, changetype(this) + offset, size); - return REGISTER(out); + return changetype(runtime.register(out, classId())); } trimEnd(): String { @@ -272,9 +273,9 @@ import { E_INVALIDLENGTH } from "./util/error"; } if (!size) return changetype(""); if (size == originalSize) return this; - var out = ALLOCATE(size); + var out = runtime.allocate(size); memory.copy(out, changetype(this), size); - return REGISTER(out); + return changetype(runtime.register(out, classId())); } padStart(targetLength: i32, padString: string = " "): String { @@ -284,7 +285,7 @@ import { E_INVALIDLENGTH } from "./util/error"; var padSize = padString.length << 1; if (targetSize < thisSize || !padSize) return this; var prependSize = targetSize - thisSize; - var out = ALLOCATE(targetSize); + var out = runtime.allocate(targetSize); if (prependSize > padSize) { let repeatCount = (prependSize - 2) / padSize; let restBase = repeatCount * padSize; @@ -295,7 +296,7 @@ import { E_INVALIDLENGTH } from "./util/error"; memory.copy(out, changetype(padString), prependSize); } memory.copy(out + prependSize, changetype(this), thisSize); - return REGISTER(out); + return changetype(runtime.register(out, classId())); } padEnd(targetLength: i32, padString: string = " "): String { @@ -305,7 +306,7 @@ import { E_INVALIDLENGTH } from "./util/error"; var padSize = padString.length << 1; if (targetSize < thisSize || !padSize) return this; var appendSize = targetSize - thisSize; - var out = ALLOCATE(targetSize); + var out = runtime.allocate(targetSize); memory.copy(out, changetype(this), thisSize); if (appendSize > padSize) { let repeatCount = (appendSize - 2) / padSize; @@ -316,7 +317,7 @@ import { E_INVALIDLENGTH } from "./util/error"; } else { memory.copy(out + thisSize, changetype(padString), appendSize); } - return REGISTER(out); + return changetype(runtime.register(out, classId())); } repeat(count: i32 = 0): String { @@ -330,9 +331,9 @@ import { E_INVALIDLENGTH } from "./util/error"; if (count == 0 || !length) return changetype(""); if (count == 1) return this; - var out = ALLOCATE((length * count) << 1); + var out = runtime.allocate((length * count) << 1); memory.repeat(out, changetype(this), length << 1, count); - return REGISTER(out); + return changetype(runtime.register(out, classId())); } slice(beginIndex: i32, endIndex: i32 = i32.MAX_VALUE): String { @@ -341,48 +342,48 @@ import { E_INVALIDLENGTH } from "./util/error"; var end = endIndex < 0 ? max(endIndex + len, 0) : min(endIndex, len); len = end - begin; if (len <= 0) return changetype(""); - var out = ALLOCATE(len << 1); + var out = runtime.allocate(len << 1); memory.copy(out, changetype(this) + (begin << 1), len << 1); - return REGISTER(out); + return changetype(runtime.register(out, classId())); } split(separator: String | null = null, limit: i32 = i32.MAX_VALUE): String[] { assert(this !== null); - if (!limit) return MAKEARRAY(0); + if (!limit) return changetype(runtime.makeArray(0, classId(), alignof())); if (separator === null) return [this]; var length: isize = this.length; var sepLen: isize = separator.length; if (limit < 0) limit = i32.MAX_VALUE; if (!sepLen) { - if (!length) return MAKEARRAY(0); + if (!length) return changetype(runtime.makeArray(0, classId(), alignof())); // split by chars length = min(length, limit); - let result = MAKEARRAY(length); + let result = changetype(runtime.makeArray(length, classId(), alignof())); let resultStart = changetype(result).dataStart; for (let i: isize = 0; i < length; ++i) { - let charStr = REGISTER(ALLOCATE(2)); - store(changetype(charStr), load(changetype(this) + (i << 1))); - store(resultStart + (i << alignof()), charStr); // result[i] = charStr + let charStr = runtime.allocate(2); + store(charStr, load(changetype(this) + (i << 1))); + store(resultStart + (i << alignof()), charStr); // result[i] = charStr + runtime.register(charStr, classId()); if (isManaged()) { if (isDefined(__ref_link)) __ref_link(changetype(charStr), changetype(result)); - else if (isDefined(__ref_retain)) __ref_retain(changetype(charStr)); - else assert(false); + if (isDefined(__ref_retain)) __ref_retain(changetype(charStr)); } } return result; } else if (!length) { - let result = MAKEARRAY(1); + let result = changetype(runtime.makeArray(1, classId(), alignof())); store(changetype(result).dataStart, ""); // no need to register/link return result; } - var result = MAKEARRAY(0); + var result = changetype(runtime.makeArray(0, classId(), alignof())); var end = 0, start = 0, i = 0; while ((end = this.indexOf(separator!, start)) != -1) { let len = end - start; if (len > 0) { - let out = ALLOCATE(len << 1); + let out = runtime.allocate(len << 1); memory.copy(out, changetype(this) + (start << 1), len << 1); - result.push(REGISTER(out)); + result.push(changetype(runtime.register(out, classId()))); } else { result.push(changetype("")); } @@ -390,15 +391,15 @@ import { E_INVALIDLENGTH } from "./util/error"; start = end + sepLen; } if (!start) { - let result = MAKEARRAY(1); + let result = changetype(runtime.makeArray(1, classId(), alignof())); unchecked(result[0] = this); return result; } var len = length - start; if (len > 0) { - let out = ALLOCATE(len << 1); + let out = runtime.allocate(len << 1); memory.copy(out, changetype(this) + (start << 1), len << 1); - result.push(REGISTER(out)); + result.push(changetype(runtime.register(out, classId()))); } else { result.push(changetype("")); } @@ -433,8 +434,8 @@ import { E_INVALIDLENGTH } from "./util/error"; return len; } - static fromUTF8(ptr: usize, len: usize): string { - if (len < 1) return changetype(""); + static fromUTF8(ptr: usize, len: usize): String { + if (len < 1) return changetype(""); var ptrPos = 0; var buf = memory.allocate(len << 1); var bufPos = 0; @@ -470,10 +471,10 @@ import { E_INVALIDLENGTH } from "./util/error"; } } assert(ptrPos == len); - var out = ALLOCATE(bufPos); + var out = runtime.allocate(bufPos); memory.copy(changetype(out), buf, bufPos); memory.free(buf); - return REGISTER(out); + return changetype(runtime.register(out, classId())); } toUTF8(): usize { diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index 6c450fb150..44deb819c2 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -1,4 +1,5 @@ -import { ALLOCATE, REGISTER, ArrayBufferView } from "./runtime"; +import { runtime, classId } from "./runtime"; +import { ArrayBufferView } from "./arraybuffer"; import { COMPARATOR, SORT as SORT_IMPL } from "./util/sort"; import { E_INDEXOUTOFRANGE } from "./util/error"; @@ -960,13 +961,13 @@ function SUBARRAY( else begin = min(begin, length); if (end < 0) end = max(length + end, begin); else end = max(min(end, length), begin); - var out = REGISTER(ALLOCATE(offsetof())); + var out = runtime.allocate(offsetof()); var data = array.data; var dataStart = array.dataStart; changetype(out).data = data; // links changetype(out).dataStart = dataStart + (begin << alignof()); changetype(out).dataLength = (end - begin) << alignof(); - return out; + return changetype(runtime.register(out, classId())); } // @ts-ignore: decorator diff --git a/std/assembly/util/number.ts b/std/assembly/util/number.ts index 11278c70e3..4cb4608d5d 100644 --- a/std/assembly/util/number.ts +++ b/std/assembly/util/number.ts @@ -1,4 +1,5 @@ -import { ALLOCATE, REGISTER, DISCARD, ArrayBufferView } from "../runtime"; +import { runtime, classId } from "../runtime"; +import { ArrayBufferView } from "../arraybuffer"; import { CharCode } from "./string"; // @ts-ignore: decorator @@ -262,10 +263,10 @@ export function utoa32(value: u32): String { if (!value) return "0"; var decimals = decimalCount32(value); - var out = ALLOCATE(decimals << 1); + var out = runtime.allocate(decimals << 1); utoa32_core(changetype(out), value, decimals); - return REGISTER(out); + return changetype(runtime.register(out, classId())); } export function itoa32(value: i32): String { @@ -275,12 +276,12 @@ export function itoa32(value: i32): String { if (sign) value = -value; var decimals = decimalCount32(value) + u32(sign); - var out = ALLOCATE(decimals << 1); + var out = runtime.allocate(decimals << 1); utoa32_core(changetype(out), value, decimals); if (sign) store(changetype(out), CharCode.MINUS); - return REGISTER(out); + return changetype(runtime.register(out, classId())); } export function utoa64(value: u64): String { @@ -290,14 +291,14 @@ export function utoa64(value: u64): String { if (value <= u32.MAX_VALUE) { let val32 = value; let decimals = decimalCount32(val32); - out = ALLOCATE(decimals << 1); + out = runtime.allocate(decimals << 1); utoa32_core(out, val32, decimals); } else { let decimals = decimalCount64(value); - out = ALLOCATE(decimals << 1); + out = runtime.allocate(decimals << 1); utoa64_core(changetype(out), value, decimals); } - return REGISTER(out); + return changetype(runtime.register(out, classId())); } export function itoa64(value: i64): String { @@ -310,16 +311,16 @@ export function itoa64(value: i64): String { if (value <= u32.MAX_VALUE) { let val32 = value; let decimals = decimalCount32(val32) + u32(sign); - out = ALLOCATE(decimals << 1); + out = runtime.allocate(decimals << 1); utoa32_core(changetype(out), val32, decimals); } else { let decimals = decimalCount64(value) + u32(sign); - out = ALLOCATE(decimals << 1); + out = runtime.allocate(decimals << 1); utoa64_core(changetype(out), value, decimals); } if (sign) store(changetype(out), CharCode.MINUS); - return REGISTER(out); + return changetype(runtime.register(out, classId())); } export function itoa(value: T): String { @@ -624,10 +625,10 @@ export function dtoa(value: f64): String { if (isNaN(value)) return "NaN"; return select("-Infinity", "Infinity", value < 0); } - var temp = ALLOCATE(MAX_DOUBLE_LENGTH << 1); + var temp = runtime.allocate(MAX_DOUBLE_LENGTH << 1); var length = dtoa_core(temp, value); - var result = changetype(temp).substring(0, length); - DISCARD(temp); + var result = changetype(temp).substring(0, length); // registers + runtime.discard(temp); return result; } diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 43fea1ad1d..4ccab13844 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -77,7 +77,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -98,7 +98,7 @@ i32.const 8 i32.add ) - (func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 84 @@ -106,8 +106,8 @@ if i32.const 0 i32.const 16 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -121,8 +121,8 @@ if i32.const 0 i32.const 16 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -136,9 +136,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -161,9 +161,9 @@ (func $call-super/B#constructor (; 5 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register call $call-super/A#constructor local.tee $0 i32.const 2 @@ -225,16 +225,16 @@ (func $call-super/D#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 5 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.eqz if i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 4 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -302,9 +302,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 6 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -327,9 +327,9 @@ (func $call-super/test3 (; 10 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 7 - call $~lib/runtime/register + call $~lib/runtime/runtime.register call $call-super/E#constructor local.tee $0 i32.const 2 @@ -362,16 +362,16 @@ (func $call-super/H#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 9 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.eqz if i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 8 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -415,16 +415,16 @@ (func $call-super/J#constructor (; 13 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 11 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.eqz if i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 10 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index b5175c2dd5..6bc65dd181 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -18,7 +18,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -114,10 +114,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -130,7 +130,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -139,8 +139,8 @@ if i32.const 0 i32.const 16 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -156,8 +156,8 @@ if i32.const 0 i32.const 16 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -172,9 +172,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -202,9 +202,9 @@ local.get $0 else i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end call $call-super/A#constructor local.set $0 @@ -276,9 +276,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 4 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -292,9 +292,9 @@ local.get $0 else i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 5 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end call $call-super/C#constructor local.set $0 @@ -367,9 +367,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 6 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -396,9 +396,9 @@ i32.eqz if i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 7 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -446,9 +446,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 8 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -461,9 +461,9 @@ i32.eqz if i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 9 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -511,9 +511,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 10 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -526,9 +526,9 @@ i32.eqz if i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 11 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index 6990d26b17..df9f379b05 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -1167,7 +1167,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -1499,7 +1499,7 @@ local.get $0 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/register (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 156 @@ -1507,8 +1507,8 @@ if i32.const 0 i32.const 88 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -1522,8 +1522,8 @@ if i32.const 0 i32.const 88 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -1542,9 +1542,9 @@ global.get $constructor/b if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 13 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -1552,9 +1552,9 @@ end if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 13 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -1562,46 +1562,46 @@ (func $start:constructor (; 28 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register global.set $constructor/emptyCtor i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 6 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 1 i32.store local.get $0 global.set $constructor/emptyCtorWithFieldInit i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 7 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store local.get $0 global.set $constructor/emptyCtorWithFieldNoInit i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 8 - call $~lib/runtime/register + call $~lib/runtime/runtime.register global.set $constructor/none i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 9 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 1 i32.store local.get $0 global.set $constructor/justFieldInit i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 10 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -1618,15 +1618,15 @@ br $__inlined_func$constructor/CtorConditionallyReturns#constructor end i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 11 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end global.set $constructor/ctorConditionallyReturns i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 12 - call $~lib/runtime/register + call $~lib/runtime/runtime.register global.set $constructor/ctorAllocates call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index c43d2cb476..18e3224caa 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -58,7 +58,7 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -1438,10 +1438,10 @@ call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/runtime/allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -1853,7 +1853,7 @@ local.get $2 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/register (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -1862,8 +1862,8 @@ if i32.const 0 i32.const 88 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -1879,8 +1879,8 @@ if i32.const 0 i32.const 88 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -1896,9 +1896,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -1911,9 +1911,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 6 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -1929,9 +1929,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 7 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -1946,9 +1946,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 8 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -1961,9 +1961,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 9 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -1979,9 +1979,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 10 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -2007,9 +2007,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 11 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -2023,9 +2023,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 12 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -2044,9 +2044,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 13 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -2057,9 +2057,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 13 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index b2e7924f65..55ce6dbad1 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -124,7 +124,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 call $~lib/allocator/arena/__mem_allocate @@ -138,7 +138,7 @@ i32.const 8 i32.add ) - (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 48 @@ -146,8 +146,8 @@ if i32.const 0 i32.const 16 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -161,8 +161,8 @@ if i32.const 0 i32.const 16 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -229,9 +229,9 @@ local.get $0 i32.eqz if - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -257,9 +257,9 @@ local.get $0 i32.eqz if - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 96704ef447..36d5543513 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -71,7 +71,7 @@ (func $exports/Car.getNumTires (; 4 ;) (type $FUNCSIG$i) (result i32) global.get $exports/Car.TIRES ) - (func $~lib/runtime/ADJUSTOBLOCK (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -167,10 +167,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -183,7 +183,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -192,8 +192,8 @@ if i32.const 0 i32.const 16 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -209,8 +209,8 @@ if i32.const 0 i32.const 16 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -225,9 +225,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -260,9 +260,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 diff --git a/tests/compiler/gc.optimized.wat b/tests/compiler/gc.optimized.wat index 730674c6f5..c4c8cb6c79 100644 --- a/tests/compiler/gc.optimized.wat +++ b/tests/compiler/gc.optimized.wat @@ -6,7 +6,9 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) @@ -40,18 +42,37 @@ (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/gc/gc.implemented i32 (i32.const 1)) (global $~lib/argc (mut i32) (i32.const 0)) + (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/gc/GC_ROOT (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/main)) + (export "runtime.MAX_BYTELENGTH" (global $~lib/runtime/runtime.MAX_BYTELENGTH)) + (export "runtime.adjust" (func $~lib/runtime/runtime.adjust)) + (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) + (export "runtime.reallocate" (func $~lib/runtime/runtime.reallocate)) + (export "runtime.discard" (func $~lib/runtime/runtime.discard)) + (export "runtime.register" (func $~lib/runtime/runtime.register)) + (export ".setargc" (func $~lib/setargc)) + (export "runtime.makeArray" (func $~lib/runtime/runtime.makeArray|trampoline)) (export "gc.implemented" (global $~lib/gc/gc.implemented)) (export "gc.collect" (func $~lib/gc/gc.collect)) (export "gc.retain" (func $~lib/gc/gc.retain)) (export "gc.release" (func $~lib/gc/gc.release)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -113,7 +134,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -140,10 +161,10 @@ i32.const 16 i32.add ) - (func $gc/Ref~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $gc/Ref~iterate (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $gc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 i32.const 1 local.get $0 @@ -160,7 +181,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 292 @@ -168,8 +189,8 @@ if i32.const 0 i32.const 24 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -183,8 +204,8 @@ if i32.const 0 i32.const 24 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -195,7 +216,7 @@ call $gc/_dummy/__ref_register local.get $0 ) - (func $~lib/set/Set~iterate (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set~iterate (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 1 global.set $~lib/argc local.get $0 @@ -211,7 +232,7 @@ local.get $1 call_indirect (type $FUNCSIG$vi) ) - (func $~lib/memory/memory.fill (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -422,7 +443,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -430,21 +451,21 @@ if i32.const 0 i32.const 144 - i32.const 25 - i32.const 43 + i32.const 53 + i32.const 51 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $1 local.get $0 call $~lib/memory/memory.fill local.get $1 i32.const 5 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) - (func $gc/_dummy/__ref_link (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $gc/_dummy/__ref_link (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 200 i32.const 2 local.get $0 @@ -464,7 +485,7 @@ local.get $0 global.set $gc/_dummy/link_parentRef ) - (func $gc/_dummy/__ref_unlink (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $gc/_dummy/__ref_unlink (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 232 i32.const 2 local.get $0 @@ -484,7 +505,7 @@ local.get $1 global.set $gc/_dummy/unlink_parentRef ) - (func $~lib/set/Set#clear (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -547,12 +568,12 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 13 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 14 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -575,7 +596,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -606,7 +627,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -649,7 +670,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -658,7 +679,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -793,7 +814,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -876,7 +897,7 @@ i32.store end ) - (func $~lib/gc/gc.retain (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/gc/gc.retain (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) global.get $~lib/gc/GC_ROOT local.tee $1 @@ -892,7 +913,7 @@ call $gc/_dummy/__ref_link end ) - (func $~lib/set/Set#delete (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -952,7 +973,7 @@ call $~lib/set/Set#rehash end ) - (func $~lib/gc/gc.release (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/gc/gc.release (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) global.get $~lib/gc/GC_ROOT local.tee $1 @@ -967,7 +988,7 @@ call $gc/_dummy/__ref_unlink end ) - (func $~lib/gc/gc.collect (; 22 ;) (type $FUNCSIG$v) + (func $~lib/gc/gc.collect (; 23 ;) (type $FUNCSIG$v) i32.const 272 i32.const 0 f64.const 0 @@ -981,7 +1002,7 @@ i32.add global.set $gc/_dummy/collect_count ) - (func $gc/main (; 23 ;) (type $FUNCSIG$v) + (func $gc/main (; 24 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -999,9 +1020,9 @@ global.set $~lib/started end i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $2 global.get $gc/_dummy/link_count local.set $3 @@ -1132,7 +1153,1260 @@ unreachable end ) - (func $null (; 24 ;) (type $FUNCSIG$v) - nop + (func $~lib/util/memory/memcpy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + loop $continue|0 + local.get $1 + i32.const 3 + i32.and + local.get $2 + local.get $2 + select + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|0 + end + end + local.get $0 + i32.const 3 + i32.and + i32.eqz + if + loop $continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|1 + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 8 + i32.add + local.set $0 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $1 + i32.const 4 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.add + local.set $0 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $1 + i32.const 2 + i32.add + local.set $1 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + local.get $0 + i32.const 3 + i32.and + local.tee $3 + i32.const 1 + i32.ne + if + local.get $3 + i32.const 2 + i32.eq + br_if $case1|2 + local.get $3 + i32.const 3 + i32.eq + br_if $case2|2 + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + loop $continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + local.get $5 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $3 + i32.const 24 + i32.shr_u + local.get $1 + i32.const 5 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 24 + i32.shr_u + local.get $1 + i32.const 9 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 13 + i32.add + i32.load + local.tee $5 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|3 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + loop $continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 2 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $3 + i32.const 16 + i32.shr_u + local.get $1 + i32.const 6 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 16 + i32.shr_u + local.get $1 + i32.const 10 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 14 + i32.add + i32.load + local.tee $5 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|4 + end + end + br $break|2 + end + local.get $1 + i32.load + local.set $5 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + loop $continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + local.get $0 + local.get $1 + i32.const 3 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + local.get $5 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $3 + i32.const 8 + i32.shr_u + local.get $1 + i32.const 7 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 8 + i32.shr_u + local.get $1 + i32.const 11 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 15 + i32.add + i32.load + local.tee $5 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + br $continue|5 + end + end + end + end + local.get $2 + i32.const 16 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + end + ) + (func $~lib/memory/memory.copy (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + local.tee $3 + i32.eqz + if + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + local.set $3 + end + local.get $3 + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + br $continue|0 + end + end + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 + end + end + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end + end + end + loop $continue|5 + local.get $2 + if + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + ) + (func $~lib/runtime/runtime.reallocate (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.const 16 + i32.sub + local.tee $4 + i32.load offset=4 + local.tee $2 + local.get $1 + i32.lt_u + if + i32.const 1 + i32.const 32 + local.get $1 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + local.tee $3 + local.set $5 + i32.const 1 + i32.const 32 + local.get $2 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + i32.const 0 + local.get $0 + i32.const 292 + i32.gt_u + select + local.get $3 + i32.lt_u + if + local.get $5 + call $~lib/allocator/arena/__mem_allocate + local.tee $3 + local.get $4 + i32.load + i32.store + local.get $3 + i32.const 0 + i32.store offset=8 + local.get $3 + i32.const 0 + i32.store offset=12 + local.get $3 + i32.const 16 + i32.add + local.tee $5 + local.get $0 + local.get $2 + call $~lib/memory/memory.copy + local.get $2 + local.get $5 + i32.add + local.get $1 + local.get $2 + i32.sub + call $~lib/memory/memory.fill + local.get $4 + i32.load + i32.const -1520547049 + i32.eq + if + local.get $0 + i32.const 292 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 107 + i32.const 10 + call $~lib/env/abort + unreachable + end + else + local.get $0 + call $gc/_dummy/__ref_register + end + local.get $3 + local.set $4 + local.get $5 + local.set $0 + 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 $4 + local.get $1 + i32.store offset=4 + local.get $0 + ) + (func $~lib/runtime/runtime.discard (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 292 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 132 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 134 + i32.const 6 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/runtime.makeArray (; 29 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + i32.const 16 + call $~lib/runtime/runtime.allocate + local.get $1 + call $~lib/runtime/runtime.register + local.tee $4 + local.set $5 + local.get $0 + local.get $2 + i32.shl + local.tee $6 + call $~lib/runtime/runtime.allocate + i32.const 5 + call $~lib/runtime/runtime.register + local.tee $7 + local.tee $1 + local.get $4 + i32.load + local.tee $2 + i32.ne + if + local.get $2 + if + local.get $2 + local.get $5 + call $gc/_dummy/__ref_unlink + end + local.get $1 + local.get $5 + call $gc/_dummy/__ref_link + end + local.get $4 + local.get $1 + i32.store + local.get $4 + local.get $7 + i32.store offset=4 + local.get $4 + local.get $6 + i32.store offset=8 + local.get $4 + local.get $0 + i32.store offset=12 + local.get $3 + if + local.get $7 + local.get $3 + local.get $6 + call $~lib/memory/memory.copy + end + local.get $4 + ) + (func $null (; 30 ;) (type $FUNCSIG$v) + nop + ) + (func $~lib/runtime/runtime.makeArray|trampoline (; 31 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 3 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/runtime/runtime.makeArray + ) + (func $~lib/setargc (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.set $~lib/argc ) ) diff --git a/tests/compiler/gc.ts b/tests/compiler/gc.ts index 32d0667363..7be2ec7796 100644 --- a/tests/compiler/gc.ts +++ b/tests/compiler/gc.ts @@ -1,5 +1,5 @@ import { link_count, unlink_count, collect_count } from "./gc/_dummy"; -export { gc }; +export { runtime, gc }; class Ref {} diff --git a/tests/compiler/gc.untouched.wat b/tests/compiler/gc.untouched.wat index e41cb42006..354568f158 100644 --- a/tests/compiler/gc.untouched.wat +++ b/tests/compiler/gc.untouched.wat @@ -8,6 +8,7 @@ (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) @@ -36,7 +37,7 @@ (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/gc/gc.implemented i32 (i32.const 1)) (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/gc/GC_ROOT (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 292)) @@ -44,12 +45,20 @@ (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/main)) + (export "runtime.MAX_BYTELENGTH" (global $~lib/runtime/runtime.MAX_BYTELENGTH)) + (export "runtime.adjust" (func $~lib/runtime/runtime.adjust)) + (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) + (export "runtime.reallocate" (func $~lib/runtime/runtime.reallocate)) + (export "runtime.discard" (func $~lib/runtime/runtime.discard)) + (export "runtime.register" (func $~lib/runtime/runtime.register)) + (export ".setargc" (func $~lib/setargc)) + (export "runtime.makeArray" (func $~lib/runtime/runtime.makeArray|trampoline)) (export "gc.implemented" (global $~lib/gc/gc.implemented)) (export "gc.collect" (func $~lib/gc/gc.collect)) (export "gc.retain" (func $~lib/gc/gc.retain)) (export "gc.release" (func $~lib/gc/gc.release)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -145,10 +154,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -189,7 +198,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -198,8 +207,8 @@ if i32.const 0 i32.const 24 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -215,8 +224,8 @@ if i32.const 0 i32.const 24 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -232,9 +241,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -518,36 +527,27 @@ ) (func $~lib/arraybuffer/ArrayBuffer#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH i32.gt_u if i32.const 0 i32.const 144 - i32.const 25 - i32.const 43 + i32.const 53 + i32.const 51 call $~lib/env/abort unreachable end - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - local.get $1 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $3 - local.get $3 + local.get $1 + call $~lib/runtime/runtime.allocate + local.set $2 + local.get $2 i32.const 0 local.get $1 call $~lib/memory/memory.fill - block $~lib/runtime/REGISTER<~lib/arraybuffer/ArrayBuffer>|inlined.0 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.const 5 - call $~lib/runtime/register - end + local.get $2 + i32.const 5 + call $~lib/runtime/runtime.register ) (func $gc/_dummy/__ref_link (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 200 @@ -664,9 +664,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -1355,21 +1355,1686 @@ unreachable end ) - (func $start (; 30 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor + (func $~lib/util/memory/memcpy (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $break|0 + loop $continue|0 + local.get $2 + if (result i32) + local.get $1 + i32.const 3 + i32.and + else + local.get $2 + end + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|0 + end + end + end + local.get $0 + i32.const 3 i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset i32.const 0 - call $~lib/set/Set#constructor - global.set $~lib/gc/GC_ROOT - ) - (func $null (; 31 ;) (type $FUNCSIG$v) + i32.eq + if + block $break|1 + loop $continue|1 + local.get $2 + i32.const 16 + i32.ge_u + if + block + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 8 + i32.add + i32.load + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 12 + i32.add + i32.load + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|1 + end + end + end + local.get $2 + i32.const 8 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + i32.load + i32.store + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + local.get $2 + i32.const 4 + i32.and + if + local.get $0 + local.get $1 + i32.load + i32.store + local.get $0 + i32.const 4 + i32.add + local.set $0 + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $0 + local.get $1 + i32.load16_u + i32.store16 + local.get $0 + i32.const 2 + i32.add + local.set $0 + local.get $1 + i32.const 2 + i32.add + local.set $1 + end + local.get $2 + i32.const 1 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + return + end + local.get $2 + i32.const 32 + i32.ge_u + if + block $break|2 + block $case2|2 + block $case1|2 + block $case0|2 + local.get $0 + i32.const 3 + i32.and + local.set $5 + local.get $5 + i32.const 1 + i32.eq + br_if $case0|2 + local.get $5 + i32.const 2 + i32.eq + br_if $case1|2 + local.get $5 + i32.const 3 + i32.eq + br_if $case2|2 + br $break|2 + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 3 + i32.sub + local.set $2 + block $break|3 + loop $continue|3 + local.get $2 + i32.const 17 + i32.ge_u + if + block + local.get $1 + i32.const 1 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 5 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 9 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 24 + i32.shr_u + local.get $4 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 13 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 24 + i32.shr_u + local.get $3 + i32.const 8 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|3 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + block $break|4 + loop $continue|4 + local.get $2 + i32.const 18 + i32.ge_u + if + block + local.get $1 + i32.const 2 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 6 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 10 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 16 + i32.shr_u + local.get $4 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 14 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 16 + i32.shr_u + local.get $3 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|4 + end + end + end + br $break|2 + unreachable + end + unreachable + end + block + local.get $1 + i32.load + local.set $3 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block $break|5 + loop $continue|5 + local.get $2 + i32.const 19 + i32.ge_u + if + block + local.get $1 + i32.const 3 + i32.add + i32.load + local.set $4 + local.get $0 + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 7 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 11 + i32.add + i32.load + local.set $4 + local.get $0 + i32.const 8 + i32.add + local.get $3 + i32.const 8 + i32.shr_u + local.get $4 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 15 + i32.add + i32.load + local.set $3 + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.const 8 + i32.shr_u + local.get $3 + i32.const 24 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.set $1 + local.get $0 + i32.const 16 + i32.add + local.set $0 + local.get $2 + i32.const 16 + i32.sub + local.set $2 + end + br $continue|5 + end + end + end + br $break|2 + unreachable + end + unreachable + end + end + local.get $2 + i32.const 16 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 8 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 4 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 2 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + local.get $2 + i32.const 1 + i32.and + if + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + ) + (func $~lib/memory/memory.copy (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + local.tee $5 + if (result i32) + local.get $5 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|2 + end + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + end + ) + (func $~lib/allocator/arena/__mem_free (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/memory/memory.free (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/arena/__mem_free + ) + (func $~lib/runtime/runtime.reallocate (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $3 + local.get $1 + i32.lt_u + if + local.get $1 + call $~lib/runtime/runtime.adjust + local.set $4 + local.get $3 + call $~lib/runtime/runtime.adjust + i32.const 0 + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + select + local.get $4 + i32.lt_u + if + local.get $4 + call $~lib/memory/memory.allocate + local.set $5 + local.get $5 + local.get $2 + i32.load + i32.store + local.get $5 + i32.const 0 + i32.store offset=8 + local.get $5 + i32.const 0 + i32.store offset=12 + local.get $5 + global.get $~lib/runtime/HEADER_SIZE + i32.add + local.set $6 + local.get $6 + local.get $0 + local.get $3 + call $~lib/memory/memory.copy + local.get $6 + local.get $3 + i32.add + i32.const 0 + local.get $1 + local.get $3 + i32.sub + call $~lib/memory/memory.fill + local.get $2 + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + if + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 107 + i32.const 10 + call $~lib/env/abort + unreachable + end + local.get $2 + call $~lib/memory/memory.free + else + local.get $0 + call $gc/_dummy/__ref_register + end + local.get $5 + local.set $2 + local.get $6 + local.set $0 + else + local.get $0 + local.get $3 + i32.add + i32.const 0 + local.get $1 + local.get $3 + i32.sub + call $~lib/memory/memory.fill + end + else + nop + end + local.get $2 + local.get $1 + i32.store offset=4 + local.get $0 + ) + (func $~lib/runtime/runtime.discard (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 132 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.set $1 + local.get $1 + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 134 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/memory/memory.free + ) + (func $~lib/runtime/runtime.makeArray (; 36 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + i32.const 16 + call $~lib/runtime/runtime.allocate + local.get $1 + call $~lib/runtime/runtime.register + local.set $4 + local.get $0 + local.get $2 + i32.shl + local.set $5 + local.get $0 + local.get $2 + i32.shl + call $~lib/runtime/runtime.allocate + i32.const 5 + call $~lib/runtime/runtime.register + local.set $6 + local.get $4 + local.tee $7 + local.get $6 + local.tee $8 + local.get $7 + i32.load + local.tee $9 + i32.ne + if (result i32) + local.get $9 + if + local.get $9 + local.get $7 + call $gc/_dummy/__ref_unlink + end + local.get $8 + local.get $7 + call $gc/_dummy/__ref_link + local.get $8 + else + local.get $8 + end + i32.store + local.get $4 + local.get $6 + i32.store offset=4 + local.get $4 + local.get $5 + i32.store offset=8 + local.get $4 + local.get $0 + i32.store offset=12 + local.get $3 + if + local.get $6 + local.get $3 + local.get $5 + call $~lib/memory/memory.copy + end + local.get $4 + ) + (func $start (; 37 ;) (type $FUNCSIG$v) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + i32.const 0 + call $~lib/set/Set#constructor + global.set $~lib/gc/GC_ROOT + ) + (func $null (; 38 ;) (type $FUNCSIG$v) + ) + (func $~lib/runtime/runtime.makeArray|trampoline (; 39 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 3 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/runtime/runtime.makeArray + ) + (func $~lib/setargc (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.set $~lib/argc ) ) diff --git a/tests/compiler/gc/global-assign.optimized.wat b/tests/compiler/gc/global-assign.optimized.wat index ddb3eb3375..17e8b6048d 100644 --- a/tests/compiler/gc/global-assign.optimized.wat +++ b/tests/compiler/gc/global-assign.optimized.wat @@ -93,7 +93,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 call $~lib/allocator/arena/__mem_allocate @@ -133,7 +133,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 152 @@ -141,8 +141,8 @@ if i32.const 0 i32.const 24 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -156,8 +156,8 @@ if i32.const 0 i32.const 24 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -173,8 +173,8 @@ global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/runtime/allocate - call $~lib/runtime/register + call $~lib/runtime/runtime.allocate + call $~lib/runtime/runtime.register global.set $gc/global-assign/global global.get $gc/global-assign/global global.set $gc/global-assign/globalRef @@ -207,8 +207,8 @@ call $~lib/env/abort unreachable end - call $~lib/runtime/allocate - call $~lib/runtime/register + call $~lib/runtime/runtime.allocate + call $~lib/runtime/runtime.register global.set $gc/global-assign/global global.get $gc/_dummy/register_count i32.const 2 diff --git a/tests/compiler/gc/global-assign.untouched.wat b/tests/compiler/gc/global-assign.untouched.wat index 3855c7c761..ec6c128126 100644 --- a/tests/compiler/gc/global-assign.untouched.wat +++ b/tests/compiler/gc/global-assign.untouched.wat @@ -37,7 +37,7 @@ (export "table" (table $0)) (export "main" (func $gc/global-assign/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -133,10 +133,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -177,7 +177,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -186,8 +186,8 @@ if i32.const 0 i32.const 24 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -203,8 +203,8 @@ if i32.const 0 i32.const 24 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -220,9 +220,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 diff --git a/tests/compiler/gc/global-init.optimized.wat b/tests/compiler/gc/global-init.optimized.wat index 19f0472ca7..afe176a7c7 100644 --- a/tests/compiler/gc/global-init.optimized.wat +++ b/tests/compiler/gc/global-init.optimized.wat @@ -92,7 +92,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 call $~lib/allocator/arena/__mem_allocate @@ -132,7 +132,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 148 @@ -140,8 +140,8 @@ if i32.const 0 i32.const 24 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -155,8 +155,8 @@ if i32.const 0 i32.const 24 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -172,8 +172,8 @@ global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/runtime/allocate - call $~lib/runtime/register + call $~lib/runtime/runtime.allocate + call $~lib/runtime/runtime.register global.set $gc/global-init/global global.get $gc/_dummy/register_count i32.const 1 @@ -204,8 +204,8 @@ call $~lib/env/abort unreachable end - call $~lib/runtime/allocate - call $~lib/runtime/register + call $~lib/runtime/runtime.allocate + call $~lib/runtime/runtime.register global.set $gc/global-init/global global.get $gc/_dummy/register_count i32.const 2 diff --git a/tests/compiler/gc/global-init.untouched.wat b/tests/compiler/gc/global-init.untouched.wat index c25cf7ebb2..5b418b443c 100644 --- a/tests/compiler/gc/global-init.untouched.wat +++ b/tests/compiler/gc/global-init.untouched.wat @@ -36,7 +36,7 @@ (export "table" (table $0)) (export "main" (func $gc/global-init/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -132,10 +132,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -176,7 +176,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -185,8 +185,8 @@ if i32.const 0 i32.const 24 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -202,8 +202,8 @@ if i32.const 0 i32.const 24 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -219,9 +219,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 diff --git a/tests/compiler/gc/itcm/trace.optimized.wat b/tests/compiler/gc/itcm/trace.optimized.wat index 3d64b6aa57..92fe62ac93 100644 --- a/tests/compiler/gc/itcm/trace.optimized.wat +++ b/tests/compiler/gc/itcm/trace.optimized.wat @@ -65,7 +65,7 @@ (data (i32.const 1384) "\01\00\00\00\1e") (data (i32.const 1400) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l") (table $0 10 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1 $~lib/collector/itcm/step~anonymous|0 $gc/itcm/trace/Ref~iterate $~lib/string/String~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) + (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1 $~lib/collector/itcm/step~anonymous|0 $gc/itcm/trace/Ref~iterate $~lib/string/String~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -609,7 +609,7 @@ end end ) - (func $~lib/runtime/allocate (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -675,7 +675,7 @@ local.get $0 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/register (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 1432 @@ -683,8 +683,8 @@ if i32.const 0 i32.const 1056 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -698,8 +698,8 @@ if i32.const 0 i32.const 1056 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -921,7 +921,7 @@ end end ) - (func $~lib/runtime/ArrayBufferView~iterate (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/arraybuffer/ArrayBufferView~iterate (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 i32.load local.tee $0 @@ -971,24 +971,24 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/runtime/ArrayBufferView#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $1 i32.const 4 call $~lib/memory/memory.fill local.get $1 i32.const 6 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $1 local.get $0 i32.eqz if i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 7 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -2103,7 +2103,7 @@ end end ) - (func $~lib/runtime/reallocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2170,8 +2170,8 @@ if i32.const 0 i32.const 1056 - i32.const 117 - i32.const 8 + i32.const 107 + i32.const 10 call $~lib/env/abort unreachable end @@ -2211,7 +2211,7 @@ local.get $0 i32.load local.tee $2 - call $~lib/runtime/reallocate + call $~lib/runtime/runtime.reallocate local.set $1 local.get $1 local.get $2 @@ -2293,9 +2293,9 @@ f64.const 0 call $~lib/env/trace i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 5 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -2310,10 +2310,10 @@ f64.const 0 call $~lib/env/trace i32.const 16 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 8 - call $~lib/runtime/register - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/runtime/runtime.register + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.store offset=12 diff --git a/tests/compiler/gc/itcm/trace.untouched.wat b/tests/compiler/gc/itcm/trace.untouched.wat index 6a84fd72d0..d5c8e7ae64 100644 --- a/tests/compiler/gc/itcm/trace.untouched.wat +++ b/tests/compiler/gc/itcm/trace.untouched.wat @@ -39,7 +39,7 @@ (data (i32.const 1336) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 1384) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l\00") (table $0 10 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1 $~lib/collector/itcm/step~anonymous|2 $gc/itcm/trace/Ref~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) + (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1 $~lib/collector/itcm/step~anonymous|2 $gc/itcm/trace/Ref~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) (global $gc/itcm/trace/GC_TRACE i32 (i32.const 1)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/gc/gc.implemented i32 (i32.const 1)) @@ -53,7 +53,7 @@ (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $gc/itcm/trace/ref (mut i32) (i32.const 0)) - (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/argc (mut i32) (i32.const 0)) (global $gc/itcm/trace/arr (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) @@ -740,7 +740,7 @@ (func $~lib/gc/gc.collect (; 20 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/__ref_collect ) - (func $~lib/runtime/ADJUSTOBLOCK (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -752,10 +752,10 @@ i32.sub i32.shl ) - (func $~lib/runtime/allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -816,7 +816,7 @@ local.get $2 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/register (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -825,8 +825,8 @@ if i32.const 0 i32.const 1056 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -842,8 +842,8 @@ if i32.const 0 i32.const 1056 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -859,9 +859,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 5 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -1131,38 +1131,29 @@ ) (func $~lib/arraybuffer/ArrayBuffer#constructor (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH i32.gt_u if i32.const 0 i32.const 1208 - i32.const 25 - i32.const 43 + i32.const 53 + i32.const 51 call $~lib/env/abort unreachable end - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - local.get $1 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $3 - local.get $3 + local.get $1 + call $~lib/runtime/runtime.allocate + local.set $2 + local.get $2 i32.const 0 local.get $1 call $~lib/memory/memory.fill - block $~lib/runtime/REGISTER<~lib/arraybuffer/ArrayBuffer>|inlined.0 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.const 6 - call $~lib/runtime/register - end + local.get $2 + i32.const 6 + call $~lib/runtime/runtime.register ) - (func $~lib/runtime/ArrayBufferView~iterate (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/arraybuffer/ArrayBufferView~iterate (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load @@ -1222,21 +1213,21 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/runtime/ArrayBufferView#constructor (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH local.get $2 i32.shr_u i32.gt_u if i32.const 0 - i32.const 1056 - i32.const 236 - i32.const 57 + i32.const 1208 + i32.const 11 + i32.const 65 call $~lib/env/abort unreachable end @@ -1252,9 +1243,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 7 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -1348,13 +1339,13 @@ local.get $0 else i32.const 16 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 8 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end local.get $1 i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 i32.const 0 @@ -2796,7 +2787,7 @@ end end ) - (func $~lib/runtime/reallocate (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2814,10 +2805,10 @@ i32.lt_u if local.get $1 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust local.set $4 local.get $3 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust i32.const 0 local.get $0 global.get $~lib/memory/HEAP_BASE @@ -2867,8 +2858,8 @@ if i32.const 0 i32.const 1056 - i32.const 117 - i32.const 8 + i32.const 107 + i32.const 10 call $~lib/env/abort unreachable end @@ -2915,7 +2906,7 @@ i32.gt_u if local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH local.get $2 i32.shr_u i32.gt_u @@ -2923,7 +2914,7 @@ i32.const 0 i32.const 1352 i32.const 13 - i32.const 64 + i32.const 72 call $~lib/env/abort unreachable end @@ -2934,15 +2925,9 @@ local.get $2 i32.shl local.set $4 - block $~lib/runtime/REALLOCATE|inlined.0 (result i32) - local.get $3 - local.set $6 - local.get $4 - local.set $5 - local.get $6 - local.get $5 - call $~lib/runtime/reallocate - end + local.get $3 + local.get $4 + call $~lib/runtime/runtime.reallocate local.set $5 local.get $5 local.get $3 diff --git a/tests/compiler/gc/rc/global-assign.optimized.wat b/tests/compiler/gc/rc/global-assign.optimized.wat index 92f2f955cd..800c6b0234 100644 --- a/tests/compiler/gc/rc/global-assign.optimized.wat +++ b/tests/compiler/gc/rc/global-assign.optimized.wat @@ -98,7 +98,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 call $~lib/allocator/arena/__mem_allocate @@ -135,7 +135,7 @@ local.get $0 global.set $gc/rc/_dummy/register_ref ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 236 @@ -143,8 +143,8 @@ if i32.const 0 i32.const 24 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -158,8 +158,8 @@ if i32.const 0 i32.const 24 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -211,8 +211,8 @@ global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/runtime/allocate - call $~lib/runtime/register + call $~lib/runtime/runtime.allocate + call $~lib/runtime/runtime.register local.tee $0 call $gc/rc/_dummy/__ref_retain local.get $0 @@ -261,8 +261,8 @@ call $~lib/env/abort unreachable end - call $~lib/runtime/allocate - call $~lib/runtime/register + call $~lib/runtime/runtime.allocate + call $~lib/runtime/runtime.register local.set $0 local.get $0 global.get $gc/rc/global-assign/global diff --git a/tests/compiler/gc/rc/global-assign.untouched.wat b/tests/compiler/gc/rc/global-assign.untouched.wat index 70952dc5c1..96d6bc2819 100644 --- a/tests/compiler/gc/rc/global-assign.untouched.wat +++ b/tests/compiler/gc/rc/global-assign.untouched.wat @@ -36,7 +36,7 @@ (export "table" (table $0)) (export "main" (func $gc/rc/global-assign/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -132,10 +132,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -171,7 +171,7 @@ local.get $0 global.set $gc/rc/_dummy/register_ref ) - (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -180,8 +180,8 @@ if i32.const 0 i32.const 24 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -197,8 +197,8 @@ if i32.const 0 i32.const 24 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -214,9 +214,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 diff --git a/tests/compiler/gc/rc/global-init.optimized.wat b/tests/compiler/gc/rc/global-init.optimized.wat index 9d4e47c400..533bec6319 100644 --- a/tests/compiler/gc/rc/global-init.optimized.wat +++ b/tests/compiler/gc/rc/global-init.optimized.wat @@ -94,7 +94,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 call $~lib/allocator/arena/__mem_allocate @@ -131,7 +131,7 @@ local.get $0 global.set $gc/rc/_dummy/register_ref ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 192 @@ -139,8 +139,8 @@ if i32.const 0 i32.const 24 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -154,8 +154,8 @@ if i32.const 0 i32.const 24 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -189,8 +189,8 @@ global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/runtime/allocate - call $~lib/runtime/register + call $~lib/runtime/runtime.allocate + call $~lib/runtime/runtime.register local.tee $0 call $gc/rc/_dummy/__ref_retain local.get $0 diff --git a/tests/compiler/gc/rc/global-init.untouched.wat b/tests/compiler/gc/rc/global-init.untouched.wat index e36d384ba8..85af655fc4 100644 --- a/tests/compiler/gc/rc/global-init.untouched.wat +++ b/tests/compiler/gc/rc/global-init.untouched.wat @@ -34,7 +34,7 @@ (export "table" (table $0)) (export "main" (func $gc/rc/global-init/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -130,10 +130,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -169,7 +169,7 @@ local.get $0 global.set $gc/rc/_dummy/register_ref ) - (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -178,8 +178,8 @@ if i32.const 0 i32.const 24 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -195,8 +195,8 @@ if i32.const 0 i32.const 24 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -212,9 +212,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 63396690c1..cf2a517119 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -77,7 +77,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/register (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.register (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 48 @@ -85,8 +85,8 @@ if i32.const 0 i32.const 16 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -100,8 +100,8 @@ if i32.const 0 i32.const 16 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -126,7 +126,7 @@ local.get $0 i32.const 8 i32.add - call $~lib/runtime/register + call $~lib/runtime/runtime.register drop i32.const 0 global.set $~lib/argc diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index 3bc9afc1a5..ae1eeea1e3 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -20,7 +20,7 @@ (export "table" (table $0)) (export "test" (func $getter-call/test)) (start $start) - (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -116,10 +116,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -132,7 +132,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -141,8 +141,8 @@ if i32.const 0 i32.const 16 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -158,8 +158,8 @@ if i32.const 0 i32.const 16 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -173,9 +173,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index 59d17ecf28..5291219cc8 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -102,7 +102,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -123,7 +123,7 @@ i32.const 8 i32.add ) - (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 80 @@ -131,8 +131,8 @@ if i32.const 0 i32.const 48 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -146,8 +146,8 @@ if i32.const 0 i32.const 48 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -159,16 +159,16 @@ (func $inlining/test_ctor (; 7 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 16 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.eqz if i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index dd25148d18..c59c4bb2f2 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -284,7 +284,7 @@ unreachable end ) - (func $~lib/runtime/ADJUSTOBLOCK (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -380,10 +380,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -396,7 +396,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -405,8 +405,8 @@ if i32.const 0 i32.const 48 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -422,8 +422,8 @@ if i32.const 0 i32.const 48 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -449,9 +449,9 @@ local.get $1 else i32.const 16 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end local.set $3 i32.const 2 @@ -461,9 +461,9 @@ i32.eqz if i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $3 end local.get $3 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 2b849b70f8..c340505a3a 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -164,7 +164,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -295,7 +295,7 @@ i32.store16 end ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1804 @@ -303,8 +303,8 @@ if i32.const 0 i32.const 464 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -318,8 +318,8 @@ if i32.const 0 i32.const 464 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -355,7 +355,7 @@ local.tee $3 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $2 local.get $0 local.get $3 @@ -367,7 +367,7 @@ i32.store16 end local.get $2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/util/string/compareImpl (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -2358,7 +2358,7 @@ if i32.const 0 i32.const 1648 - i32.const 189 + i32.const 190 i32.const 4 call $~lib/env/abort unreachable @@ -2434,7 +2434,7 @@ return end local.get $3 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $1 local.get $0 local.get $2 @@ -2442,17 +2442,17 @@ local.get $3 call $~lib/memory/memory.copy local.get $1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) - (func $~lib/runtime/discard (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 1804 i32.le_u if i32.const 0 i32.const 464 - i32.const 177 - i32.const 4 + i32.const 132 + i32.const 6 call $~lib/env/abort unreachable end @@ -2465,8 +2465,8 @@ if i32.const 0 i32.const 464 - i32.const 179 - i32.const 4 + i32.const 134 + i32.const 6 call $~lib/env/abort unreachable end @@ -2492,7 +2492,7 @@ unreachable end i32.const 56 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $0 call $~lib/util/number/dtoa_core local.set $1 @@ -2501,7 +2501,7 @@ call $~lib/string/String#substring local.set $1 local.get $0 - call $~lib/runtime/discard + call $~lib/runtime/runtime.discard local.get $1 i32.const 1696 call $~lib/string/String.__eq diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 5b44b8a643..ccdb173131 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -135,7 +135,7 @@ unreachable unreachable ) - (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -231,10 +231,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -390,7 +390,7 @@ i32.store16 end ) - (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -399,8 +399,8 @@ if i32.const 0 i32.const 464 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -416,8 +416,8 @@ if i32.const 0 i32.const 464 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -455,40 +455,32 @@ local.get $1 i32.add local.set $2 - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - local.get $2 - i32.const 1 - i32.shl - local.set $3 - local.get $3 - call $~lib/runtime/allocate - end - local.set $4 + local.get $2 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + local.set $3 block $~lib/util/number/utoa32_core|inlined.0 - local.get $4 + local.get $3 local.set $6 local.get $0 local.set $5 local.get $2 - local.set $3 + local.set $4 local.get $6 local.get $5 - local.get $3 + local.get $4 call $~lib/util/number/utoa32_lut end local.get $1 if - local.get $4 + local.get $3 i32.const 45 i32.store16 end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.0 (result i32) - local.get $4 - local.set $3 - local.get $3 - i32.const 1 - call $~lib/runtime/register - end + local.get $3 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/util/number/itoa (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -3424,7 +3416,7 @@ if i32.const 0 i32.const 1648 - i32.const 189 + i32.const 190 i32.const 4 call $~lib/env/abort unreachable @@ -3513,12 +3505,8 @@ local.get $0 return end - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) - local.get $3 - local.set $4 - local.get $4 - call $~lib/runtime/allocate - end + local.get $3 + call $~lib/runtime/runtime.allocate local.set $10 local.get $10 local.get $0 @@ -3526,13 +3514,9 @@ i32.add local.get $3 call $~lib/memory/memory.copy - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.1 (result i32) - local.get $10 - local.set $4 - local.get $4 - i32.const 1 - call $~lib/runtime/register - end + local.get $10 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/allocator/arena/__mem_free (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) nop @@ -3541,7 +3525,7 @@ local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/discard (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3550,8 +3534,8 @@ if i32.const 0 i32.const 464 - i32.const 177 - i32.const 4 + i32.const 132 + i32.const 6 call $~lib/env/abort unreachable end @@ -3567,8 +3551,8 @@ if i32.const 0 i32.const 464 - i32.const 179 - i32.const 4 + i32.const 134 + i32.const 6 call $~lib/env/abort unreachable end @@ -3579,7 +3563,6 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 f64.const 0 f64.eq @@ -3605,31 +3588,23 @@ select return end - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - i32.const 28 - i32.const 1 - i32.shl - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 28 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + local.set $1 + local.get $1 local.get $0 call $~lib/util/number/dtoa_core - local.set $3 - local.get $2 + local.set $2 + local.get $1 i32.const 0 - local.get $3 + local.get $2 call $~lib/string/String#substring - local.set $4 - block $~lib/runtime/DISCARD|inlined.0 - local.get $2 - local.set $1 - local.get $1 - call $~lib/runtime/discard - end - local.get $4 + local.set $3 + local.get $1 + call $~lib/runtime/runtime.discard + local.get $3 ) (func $~lib/number/F64#toString (; 28 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 841a73e242..a3b86ad096 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -78,7 +78,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 call $~lib/allocator/arena/__mem_allocate @@ -92,7 +92,7 @@ i32.const 8 i32.add ) - (func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 48 @@ -100,8 +100,8 @@ if i32.const 0 i32.const 16 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -115,8 +115,8 @@ if i32.const 0 i32.const 16 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -130,13 +130,13 @@ global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register global.set $optional-typeparameters/tConcrete - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register global.set $optional-typeparameters/tDerived ) (func $null (; 5 ;) (type $FUNCSIG$v) diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index ebc66d120e..f818dffe13 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -27,7 +27,7 @@ (func $optional-typeparameters/testDerived (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 ) - (func $~lib/runtime/ADJUSTOBLOCK (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -123,10 +123,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -139,7 +139,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -148,8 +148,8 @@ if i32.const 0 i32.const 16 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -165,8 +165,8 @@ if i32.const 0 i32.const 16 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -180,9 +180,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -197,9 +197,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index c1ffc30d5a..7e9cbe252f 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -142,7 +142,7 @@ if i32.const 0 i32.const 64 - i32.const 164 + i32.const 165 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 84d5818ae4..931b163f46 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -218,7 +218,7 @@ if i32.const 0 i32.const 64 - i32.const 164 + i32.const 165 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 4a9ecb2bbf..4f65a23d88 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -156,7 +156,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -183,7 +183,7 @@ i32.const 16 i32.add ) - (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 328 @@ -191,8 +191,8 @@ if i32.const 0 i32.const 296 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -206,8 +206,8 @@ if i32.const 0 i32.const 296 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -216,21 +216,21 @@ i32.store local.get $0 ) - (func $~lib/runtime/makeArray (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 16 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.get $0 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 i32.const 3 local.get $1 i32.shl local.tee $1 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $2 local.tee $3 local.get $0 @@ -253,9 +253,9 @@ ) (func $std/array-literal/Ref#constructor (; 9 ;) (type $FUNCSIG$i) (result i32) i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 7 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/array/Array~iterate (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) @@ -296,9 +296,9 @@ ) (func $std/array-literal/RefWithCtor#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 10 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $start:std/array-literal (; 12 ;) (type $FUNCSIG$v) (local $0 i32) @@ -418,7 +418,7 @@ global.set $~lib/allocator/arena/offset i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.tee $2 i32.load offset=4 local.tee $0 @@ -496,7 +496,7 @@ global.set $std/array-literal/i i32.const 5 i32.const 2 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.tee $2 i32.load offset=4 local.tee $0 @@ -572,7 +572,7 @@ end i32.const 8 i32.const 2 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.tee $2 i32.load offset=4 local.tee $0 @@ -600,7 +600,7 @@ end i32.const 11 i32.const 2 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.tee $2 i32.load offset=4 local.tee $0 diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index c9df2d90f8..6c90a78f4b 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -126,7 +126,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/runtime/ADJUSTOBLOCK (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -222,10 +222,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -247,7 +247,7 @@ (func $~lib/collector/dummy/__ref_register (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/register (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -256,8 +256,8 @@ if i32.const 0 i32.const 296 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -273,8 +273,8 @@ if i32.const 0 i32.const 296 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -1723,7 +1723,7 @@ end end ) - (func $~lib/runtime/makeArray (; 21 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 21 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1731,9 +1731,9 @@ (local $8 i32) (local $9 i32) i32.const 16 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.get $1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $4 local.get $0 local.get $2 @@ -1742,9 +1742,9 @@ local.get $0 local.get $2 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $6 local.get $4 local.tee $7 @@ -1794,9 +1794,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 7 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -1859,9 +1859,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 10 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -2058,7 +2058,7 @@ i32.const 2 i32.const 0 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.set $0 local.get $0 i32.load offset=4 @@ -2151,7 +2151,7 @@ i32.const 5 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.set $1 local.get $1 i32.load offset=4 @@ -2242,7 +2242,7 @@ i32.const 8 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.set $0 local.get $0 i32.load offset=4 @@ -2301,7 +2301,7 @@ i32.const 11 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.set $1 local.get $1 i32.load offset=4 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 4b393a5e8f..870cc64663 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -26,10 +26,10 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1e") - (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 56) "\01\00\00\00&") - (data (i32.const 72) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00&") + (data (i32.const 24) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 64) "\01\00\00\00\1e") + (data (i32.const 80) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (data (i32.const 112) "\01\00\00\00\06") (data (i32.const 128) "a\00b\00c") (data (i32.const 136) "\01\00\00\00\18") @@ -403,7 +403,7 @@ (data (i32.const 8040) "\02\00\00\00\04") (data (i32.const 8056) "\01") (table $0 102 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/string/String~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/string/String~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|2 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|16 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $start:std/array~anonymous|47 $~lib/array/Array>~iterate $~lib/string/String~iterate $~lib/array/Array>~iterate $start:std/array~anonymous|48 $~lib/array/Array<~lib/string/String | null>~iterate $~lib/array/Array<~lib/string/String | null>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/array/Array>~iterate $~lib/array/Array>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/string/String~iterate $~lib/array/Array<~lib/string/String | null>~iterate $~lib/array/Array<~lib/string/String | null>~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate) + (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/string/String~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/string/String~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|2 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|16 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $start:std/array~anonymous|47 $~lib/array/Array>~iterate $~lib/string/String~iterate $~lib/array/Array>~iterate $start:std/array~anonymous|48 $~lib/array/Array<~lib/string/String | null>~iterate $~lib/array/Array<~lib/string/String | null>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/array/Array>~iterate $~lib/array/Array>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/string/String~iterate $~lib/array/Array<~lib/string/String | null>~iterate $~lib/array/Array<~lib/string/String | null>~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) @@ -530,7 +530,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -782,16 +782,16 @@ end end ) - (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 8060 i32.le_u if i32.const 0 - i32.const 24 - i32.const 153 - i32.const 4 + i32.const 80 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -804,9 +804,9 @@ i32.ne if i32.const 0 - i32.const 24 - i32.const 155 - i32.const 4 + i32.const 80 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -822,23 +822,23 @@ i32.gt_u if i32.const 0 - i32.const 72 - i32.const 25 - i32.const 43 + i32.const 24 + i32.const 53 + i32.const 51 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $1 i32.const 0 local.get $0 call $~lib/memory/memory.fill local.get $1 i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) - (func $~lib/runtime/ArrayBufferView~iterate (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/arraybuffer/ArrayBufferView~iterate (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 i32.load local.tee $0 @@ -848,7 +848,7 @@ call_indirect (type $FUNCSIG$vi) end ) - (func $~lib/runtime/ArrayBufferView#constructor (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1073741808 local.get $2 @@ -857,8 +857,8 @@ if i32.const 0 i32.const 24 - i32.const 236 - i32.const 57 + i32.const 11 + i32.const 65 call $~lib/env/abort unreachable end @@ -872,9 +872,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -911,12 +911,12 @@ (func $~lib/array/Array#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 4 - call $~lib/runtime/register + call $~lib/runtime/runtime.register i32.const 0 i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.store offset=12 @@ -2031,21 +2031,21 @@ end end ) - (func $~lib/runtime/makeArray (; 15 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 15 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) i32.const 16 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.get $1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $1 local.get $0 local.get $2 i32.shl local.tee $4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $2 local.set $5 local.get $1 @@ -2283,7 +2283,7 @@ end i32.const 1 ) - (func $~lib/runtime/reallocate (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2360,9 +2360,9 @@ i32.le_u if i32.const 0 - i32.const 24 - i32.const 117 - i32.const 8 + i32.const 80 + i32.const 107 + i32.const 10 call $~lib/env/abort unreachable end @@ -2404,7 +2404,7 @@ i32.const 0 i32.const 272 i32.const 13 - i32.const 64 + i32.const 72 call $~lib/env/abort unreachable end @@ -2415,7 +2415,7 @@ i32.const 2 i32.shl local.tee $3 - call $~lib/runtime/reallocate + call $~lib/runtime/runtime.reallocate local.set $1 local.get $1 local.get $2 @@ -2509,7 +2509,7 @@ i32.const 4 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.tee $4 i32.load offset=4 local.tee $5 @@ -2936,7 +2936,7 @@ i32.const 4 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.tee $4 i32.load offset=4 drop @@ -3427,7 +3427,7 @@ i32.const 34 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.tee $4 i32.load offset=4 local.set $5 @@ -3517,7 +3517,7 @@ i32.const 4 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.load offset=4 local.set $5 loop $repeat|0 @@ -3591,7 +3591,7 @@ i32.const 4 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.set $4 local.get $0 i32.load offset=12 @@ -5338,7 +5338,7 @@ i32.const 0 i32.const 272 i32.const 43 - i32.const 62 + i32.const 70 call $~lib/env/abort unreachable end @@ -5346,7 +5346,7 @@ i32.const 4 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.tee $0 i32.load offset=4 i32.const 0 @@ -5580,7 +5580,7 @@ i32.const 68 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.tee $0 i32.load offset=4 i32.const 0 @@ -5877,7 +5877,7 @@ i32.const 71 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.tee $0 i32.load offset=4 i32.const 0 @@ -5901,9 +5901,9 @@ i32.lt_s if i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 72 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $2 i32.const 511 local.get $0 @@ -6206,7 +6206,7 @@ i32.const 78 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.tee $0 i32.load offset=4 i32.const 0 @@ -6231,7 +6231,7 @@ return end i32.const 2 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $1 local.get $0 i32.const 1 @@ -6242,7 +6242,7 @@ i32.store16 local.get $1 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/string/String#concat (; 123 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -6278,7 +6278,7 @@ return end local.get $2 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $2 local.get $0 local.get $1 @@ -6291,7 +6291,7 @@ call $~lib/memory/memory.copy local.get $2 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/string/String.__concat (; 124 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -6369,7 +6369,7 @@ if i32.const 0 i32.const 4376 - i32.const 189 + i32.const 190 i32.const 4 call $~lib/env/abort unreachable @@ -6445,7 +6445,7 @@ return end local.get $3 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $1 local.get $0 local.get $2 @@ -6454,17 +6454,17 @@ call $~lib/memory/memory.copy local.get $1 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) - (func $~lib/runtime/discard (; 128 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 128 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 8060 i32.le_u if i32.const 0 - i32.const 24 - i32.const 177 - i32.const 4 + i32.const 80 + i32.const 132 + i32.const 6 call $~lib/env/abort unreachable end @@ -6476,9 +6476,9 @@ i32.ne if i32.const 0 - i32.const 24 - i32.const 179 - i32.const 4 + i32.const 80 + i32.const 134 + i32.const 6 call $~lib/env/abort unreachable end @@ -6530,7 +6530,7 @@ local.tee $7 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.set $2 i32.const 0 local.set $0 @@ -6627,13 +6627,13 @@ call $~lib/string/String#substring local.set $0 local.get $2 - call $~lib/runtime/discard + call $~lib/runtime/runtime.discard local.get $0 return end local.get $2 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/util/number/decimalCount32 (; 130 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -6826,7 +6826,7 @@ local.tee $3 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $2 local.get $0 local.get $3 @@ -6839,7 +6839,7 @@ end local.get $2 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/util/number/itoa_stream (; 133 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 @@ -6930,7 +6930,7 @@ local.tee $7 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.set $2 i32.const 0 local.set $0 @@ -6995,13 +6995,13 @@ call $~lib/string/String#substring local.set $0 local.get $2 - call $~lib/runtime/discard + call $~lib/runtime/runtime.discard local.get $0 return end local.get $2 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/array/Array#join (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -7022,14 +7022,14 @@ local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $2 local.get $0 local.get $1 call $~lib/util/number/utoa32_lut local.get $2 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/util/number/itoa_stream (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 @@ -7100,7 +7100,7 @@ local.tee $7 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.set $2 i32.const 0 local.set $0 @@ -7165,13 +7165,13 @@ call $~lib/string/String#substring local.set $0 local.get $2 - call $~lib/runtime/discard + call $~lib/runtime/runtime.discard local.get $0 return end local.get $2 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/array/Array#join (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -8172,7 +8172,7 @@ return end i32.const 56 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $2 local.get $0 call $~lib/util/number/dtoa_core @@ -8182,7 +8182,7 @@ call $~lib/string/String#substring local.set $1 local.get $2 - call $~lib/runtime/discard + call $~lib/runtime/runtime.discard local.get $1 ) (func $~lib/util/number/dtoa_stream (; 144 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) @@ -8299,7 +8299,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.set $1 i32.const 0 local.set $0 @@ -8364,13 +8364,13 @@ call $~lib/string/String#substring local.set $0 local.get $1 - call $~lib/runtime/discard + call $~lib/runtime/runtime.discard local.get $0 return end local.get $1 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/array/Array<~lib/string/String>#join_str (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -8452,7 +8452,7 @@ i32.add i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.set $2 i32.const 0 local.set $3 @@ -8540,7 +8540,7 @@ end local.get $2 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/array/Array<~lib/string/String>#join (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -8549,9 +8549,9 @@ ) (func $std/array/Ref#constructor (; 148 ;) (type $FUNCSIG$i) (result i32) i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 87 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/array/Array#join_ref (; 149 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -8594,7 +8594,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.set $1 i32.const 0 local.set $0 @@ -8678,13 +8678,13 @@ call $~lib/string/String#substring local.set $0 local.get $1 - call $~lib/runtime/discard + call $~lib/runtime/runtime.discard local.get $0 return end local.get $1 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/array/Array#toString (; 150 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -8789,7 +8789,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.set $1 i32.const 0 local.set $0 @@ -8850,13 +8850,13 @@ call $~lib/string/String#substring local.set $0 local.get $1 - call $~lib/runtime/discard + call $~lib/runtime/runtime.discard local.get $0 return end local.get $1 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/util/number/itoa_stream (; 153 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 @@ -8931,7 +8931,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.set $1 i32.const 0 local.set $0 @@ -8996,13 +8996,13 @@ call $~lib/string/String#substring local.set $0 local.get $1 - call $~lib/runtime/discard + call $~lib/runtime/runtime.discard local.get $0 return end local.get $1 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/util/number/decimalCount64 (; 155 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 @@ -9176,7 +9176,7 @@ local.tee $3 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $2 local.get $1 local.get $3 @@ -9187,7 +9187,7 @@ local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $2 local.get $0 local.get $1 @@ -9195,7 +9195,7 @@ end local.get $2 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/util/number/itoa_stream (; 158 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -9280,7 +9280,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.set $1 i32.const 0 local.set $0 @@ -9345,13 +9345,13 @@ call $~lib/string/String#substring local.set $0 local.get $1 - call $~lib/runtime/discard + call $~lib/runtime/runtime.discard local.get $0 return end local.get $1 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/util/number/itoa64 (; 160 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) @@ -9389,7 +9389,7 @@ local.tee $4 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $3 local.get $2 local.get $4 @@ -9402,7 +9402,7 @@ local.tee $2 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $3 local.get $0 local.get $2 @@ -9416,7 +9416,7 @@ end local.get $3 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/util/number/itoa_stream (; 161 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -9524,7 +9524,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.set $1 i32.const 0 local.set $0 @@ -9589,13 +9589,13 @@ call $~lib/string/String#substring local.set $0 local.get $1 - call $~lib/runtime/discard + call $~lib/runtime/runtime.discard local.get $0 return end local.get $1 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/array/Array<~lib/string/String | null>#toString (; 163 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -9770,7 +9770,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.set $1 i32.const 0 local.set $0 @@ -9831,13 +9831,13 @@ call $~lib/string/String#substring local.set $0 local.get $1 - call $~lib/runtime/discard + call $~lib/runtime/runtime.discard local.get $0 return end local.get $1 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/array/Array<~lib/array/Array>#join_arr (; 167 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -10191,17 +10191,17 @@ unreachable end i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 6 - call $~lib/runtime/register + call $~lib/runtime/runtime.register drop i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 7 - call $~lib/runtime/register + call $~lib/runtime/runtime.register i32.const 1 i32.const 0 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor drop global.get $std/array/arr8 i32.const 1 @@ -10213,7 +10213,7 @@ i32.const 8 i32.const 0 i32.const 248 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/array/isArraysEqual i32.eqz if @@ -10234,7 +10234,7 @@ i32.const 8 i32.const 0 i32.const 320 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/array/isArraysEqual i32.eqz if @@ -10255,7 +10255,7 @@ i32.const 8 i32.const 0 i32.const 344 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/array/isArraysEqual i32.eqz if @@ -10276,7 +10276,7 @@ i32.const 8 i32.const 0 i32.const 368 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/array/isArraysEqual i32.eqz if @@ -10297,7 +10297,7 @@ i32.const 8 i32.const 0 i32.const 392 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/array/isArraysEqual i32.eqz if @@ -10318,7 +10318,7 @@ i32.const 10 i32.const 2 i32.const 488 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10340,7 +10340,7 @@ i32.const 10 i32.const 2 i32.const 528 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10362,7 +10362,7 @@ i32.const 10 i32.const 2 i32.const 568 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10384,7 +10384,7 @@ i32.const 10 i32.const 2 i32.const 608 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10406,7 +10406,7 @@ i32.const 10 i32.const 2 i32.const 648 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10755,7 +10755,7 @@ i32.const 4 i32.const 2 i32.const 688 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $~lib/array/Array#concat drop global.get $std/array/arr @@ -11014,7 +11014,7 @@ i32.const 4 i32.const 2 i32.const 752 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -11025,7 +11025,7 @@ i32.const 4 i32.const 2 i32.const 792 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11041,7 +11041,7 @@ i32.const 4 i32.const 2 i32.const 832 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -11052,7 +11052,7 @@ i32.const 4 i32.const 2 i32.const 872 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11068,7 +11068,7 @@ i32.const 4 i32.const 2 i32.const 912 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -11079,7 +11079,7 @@ i32.const 4 i32.const 2 i32.const 952 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11095,7 +11095,7 @@ i32.const 4 i32.const 2 i32.const 992 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 2 @@ -11106,7 +11106,7 @@ i32.const 4 i32.const 2 i32.const 1032 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11122,7 +11122,7 @@ i32.const 4 i32.const 2 i32.const 1072 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -11133,7 +11133,7 @@ i32.const 4 i32.const 2 i32.const 1112 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11149,7 +11149,7 @@ i32.const 4 i32.const 2 i32.const 1152 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -11160,7 +11160,7 @@ i32.const 4 i32.const 2 i32.const 1192 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11176,7 +11176,7 @@ i32.const 4 i32.const 2 i32.const 1232 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -11187,7 +11187,7 @@ i32.const 4 i32.const 2 i32.const 1272 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11203,7 +11203,7 @@ i32.const 4 i32.const 2 i32.const 1312 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -11214,7 +11214,7 @@ i32.const 4 i32.const 2 i32.const 1352 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11230,7 +11230,7 @@ i32.const 4 i32.const 2 i32.const 1392 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -11241,7 +11241,7 @@ i32.const 4 i32.const 2 i32.const 1432 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11257,7 +11257,7 @@ i32.const 4 i32.const 2 i32.const 1472 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -11268,7 +11268,7 @@ i32.const 4 i32.const 2 i32.const 1512 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11284,7 +11284,7 @@ i32.const 4 i32.const 2 i32.const 1552 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -11295,7 +11295,7 @@ i32.const 4 i32.const 2 i32.const 1592 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11311,7 +11311,7 @@ i32.const 4 i32.const 2 i32.const 1632 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -11322,7 +11322,7 @@ i32.const 4 i32.const 2 i32.const 1672 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12150,7 +12150,7 @@ i32.const 4 i32.const 2 i32.const 1784 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12167,7 +12167,7 @@ i32.const 4 i32.const 2 i32.const 1824 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12183,7 +12183,7 @@ i32.const 4 i32.const 2 i32.const 1840 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 @@ -12193,7 +12193,7 @@ i32.const 4 i32.const 2 i32.const 1880 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12210,7 +12210,7 @@ i32.const 4 i32.const 2 i32.const 1912 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12226,7 +12226,7 @@ i32.const 4 i32.const 2 i32.const 1936 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 @@ -12236,7 +12236,7 @@ i32.const 4 i32.const 2 i32.const 1976 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12253,7 +12253,7 @@ i32.const 4 i32.const 2 i32.const 2000 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12269,7 +12269,7 @@ i32.const 4 i32.const 2 i32.const 2032 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 0 @@ -12279,7 +12279,7 @@ i32.const 4 i32.const 2 i32.const 2072 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12296,7 +12296,7 @@ i32.const 4 i32.const 2 i32.const 2096 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12312,7 +12312,7 @@ i32.const 4 i32.const 2 i32.const 2128 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -1 @@ -12322,7 +12322,7 @@ i32.const 4 i32.const 2 i32.const 2168 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12339,7 +12339,7 @@ i32.const 4 i32.const 2 i32.const 2192 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12355,7 +12355,7 @@ i32.const 4 i32.const 2 i32.const 2224 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 @@ -12365,7 +12365,7 @@ i32.const 4 i32.const 2 i32.const 2264 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12382,7 +12382,7 @@ i32.const 4 i32.const 2 i32.const 2288 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12398,7 +12398,7 @@ i32.const 4 i32.const 2 i32.const 2320 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 @@ -12408,7 +12408,7 @@ i32.const 4 i32.const 2 i32.const 2360 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12425,7 +12425,7 @@ i32.const 4 i32.const 2 i32.const 2384 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12441,7 +12441,7 @@ i32.const 4 i32.const 2 i32.const 2416 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -7 @@ -12451,7 +12451,7 @@ i32.const 4 i32.const 2 i32.const 2456 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12468,7 +12468,7 @@ i32.const 4 i32.const 2 i32.const 2480 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12484,7 +12484,7 @@ i32.const 4 i32.const 2 i32.const 2512 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 @@ -12494,7 +12494,7 @@ i32.const 4 i32.const 2 i32.const 2552 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12511,7 +12511,7 @@ i32.const 4 i32.const 2 i32.const 2568 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12527,7 +12527,7 @@ i32.const 4 i32.const 2 i32.const 2608 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 1 @@ -12537,7 +12537,7 @@ i32.const 4 i32.const 2 i32.const 2648 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12554,7 +12554,7 @@ i32.const 4 i32.const 2 i32.const 2664 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12570,7 +12570,7 @@ i32.const 4 i32.const 2 i32.const 2704 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 4 @@ -12580,7 +12580,7 @@ i32.const 4 i32.const 2 i32.const 2744 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12597,7 +12597,7 @@ i32.const 4 i32.const 2 i32.const 2760 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12613,7 +12613,7 @@ i32.const 4 i32.const 2 i32.const 2800 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 @@ -12623,7 +12623,7 @@ i32.const 4 i32.const 2 i32.const 2840 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12640,7 +12640,7 @@ i32.const 4 i32.const 2 i32.const 2856 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12656,7 +12656,7 @@ i32.const 4 i32.const 2 i32.const 2896 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 @@ -12666,7 +12666,7 @@ i32.const 4 i32.const 2 i32.const 2936 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12683,7 +12683,7 @@ i32.const 4 i32.const 2 i32.const 2952 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13787,7 +13787,7 @@ i32.const 34 i32.const 2 i32.const 3304 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/array/isArraysEqual i32.eqz if @@ -13823,7 +13823,7 @@ i32.const 58 i32.const 3 i32.const 3464 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/array/isArraysEqual i32.eqz if @@ -13860,7 +13860,7 @@ i32.const 4 i32.const 2 i32.const 3616 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13898,7 +13898,7 @@ i32.const 10 i32.const 2 i32.const 3728 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13934,7 +13934,7 @@ i32.const 4 i32.const 2 i32.const 4056 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13953,7 +13953,7 @@ i32.const 4 i32.const 2 i32.const 4080 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14114,7 +14114,7 @@ i32.const 81 i32.const 0 i32.const 4552 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $~lib/array/Array#join_bool i32.const 4576 call $~lib/string/String.__eq @@ -14131,7 +14131,7 @@ i32.const 4 i32.const 2 i32.const 5120 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 4200 call $~lib/array/Array#join i32.const 5152 @@ -14149,7 +14149,7 @@ i32.const 10 i32.const 2 i32.const 5240 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 5216 call $~lib/array/Array#join i32.const 5152 @@ -14167,7 +14167,7 @@ i32.const 4 i32.const 2 i32.const 5320 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 5296 call $~lib/array/Array#join i32.const 5344 @@ -14185,7 +14185,7 @@ i32.const 58 i32.const 3 i32.const 6672 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $~lib/array/Array#join_flt i32.const 6736 call $~lib/string/String.__eq @@ -14202,7 +14202,7 @@ i32.const 78 i32.const 2 i32.const 6888 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 4200 call $~lib/array/Array<~lib/string/String>#join i32.const 6832 @@ -14220,7 +14220,7 @@ i32.const 88 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.tee $1 i32.load offset=4 local.tee $0 @@ -14303,7 +14303,7 @@ i32.const 90 i32.const 0 i32.const 7128 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $~lib/array/Array#join_int i32.const 7152 call $~lib/string/String.__eq @@ -14320,7 +14320,7 @@ i32.const 92 i32.const 1 i32.const 7208 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $~lib/array/Array#join_int i32.const 7232 call $~lib/string/String.__eq @@ -14337,7 +14337,7 @@ i32.const 83 i32.const 3 i32.const 7312 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $~lib/array/Array#join_int i32.const 7352 call $~lib/string/String.__eq @@ -14354,7 +14354,7 @@ i32.const 94 i32.const 3 i32.const 7464 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $~lib/array/Array#join_int i32.const 7512 call $~lib/string/String.__eq @@ -14384,7 +14384,7 @@ i32.const 78 i32.const 2 i32.const 7744 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $~lib/array/Array<~lib/string/String | null>#toString i32.const 7776 call $~lib/string/String.__eq @@ -14401,7 +14401,7 @@ i32.const 68 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.tee $0 i32.load offset=4 local.tee $1 @@ -14409,14 +14409,14 @@ i32.const 4 i32.const 2 i32.const 7832 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.store local.get $1 i32.const 2 i32.const 4 i32.const 2 i32.const 7856 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.store offset=4 local.get $0 global.set $std/array/subarr32 @@ -14437,7 +14437,7 @@ i32.const 96 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.tee $0 i32.load offset=4 local.tee $1 @@ -14445,14 +14445,14 @@ i32.const 8 i32.const 0 i32.const 7936 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.store local.get $1 i32.const 2 i32.const 8 i32.const 0 i32.const 7960 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.store offset=4 local.get $0 global.set $std/array/subarr8 @@ -14473,7 +14473,7 @@ i32.const 100 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.tee $0 i32.load offset=4 local.set $1 @@ -14481,14 +14481,14 @@ i32.const 98 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.tee $2 i32.load offset=4 i32.const 1 i32.const 10 i32.const 2 i32.const 8056 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.store local.get $1 local.get $2 diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 09f4066510..6fdba93e8c 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -29,8 +29,8 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 56) "\01\00\00\00&\00\00\00\00\00\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 8) "\01\00\00\00&\00\00\00\00\00\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 64) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 112) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00") (data (i32.const 136) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 176) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\02\03\04\05") @@ -222,9 +222,9 @@ (data (i32.const 8016) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") (data (i32.const 8040) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") (table $0 102 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array/P~iterate $~lib/typedarray/Uint8Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|4 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|18 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|30 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|34 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|38 $start:std/array~anonymous|39 $start:std/array~anonymous|40 $start:std/array~anonymous|41 $start:std/array~anonymous|42 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $start:std/array~anonymous|47 $~lib/array/Array>~iterate $std/array/Proxy~iterate $~lib/array/Array>~iterate $start:std/array~anonymous|48 $~lib/array/Array<~lib/string/String | null>~iterate $~lib/array/Array<~lib/string/String | null>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/array/Array<~lib/string/String>~iterate $~lib/array/Array<~lib/string/String>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array/Ref~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate) + (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array/P~iterate $~lib/typedarray/Uint8Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|4 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|18 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|30 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|34 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|38 $start:std/array~anonymous|39 $start:std/array~anonymous|40 $start:std/array~anonymous|41 $start:std/array~anonymous|42 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $start:std/array~anonymous|47 $~lib/array/Array>~iterate $std/array/Proxy~iterate $~lib/array/Array>~iterate $start:std/array~anonymous|48 $~lib/array/Array<~lib/string/String | null>~iterate $~lib/array/Array<~lib/string/String | null>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/array/Array<~lib/string/String>~iterate $~lib/array/Array<~lib/string/String>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array/Ref~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) @@ -300,7 +300,7 @@ (func $~lib/string/String~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) ) - (func $~lib/runtime/ADJUSTOBLOCK (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -396,10 +396,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -681,7 +681,7 @@ (func $~lib/collector/dummy/__ref_register (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/register (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -689,9 +689,9 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 153 - i32.const 4 + i32.const 80 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -706,9 +706,9 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 155 - i32.const 4 + i32.const 80 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -721,38 +721,29 @@ ) (func $~lib/arraybuffer/ArrayBuffer#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH i32.gt_u if i32.const 0 - i32.const 72 - i32.const 25 - i32.const 43 + i32.const 24 + i32.const 53 + i32.const 51 call $~lib/env/abort unreachable end - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - local.get $1 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $3 - local.get $3 + local.get $1 + call $~lib/runtime/runtime.allocate + local.set $2 + local.get $2 i32.const 0 local.get $1 call $~lib/memory/memory.fill - block $~lib/runtime/REGISTER<~lib/arraybuffer/ArrayBuffer>|inlined.0 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.const 2 - call $~lib/runtime/register - end + local.get $2 + i32.const 2 + call $~lib/runtime/runtime.register ) - (func $~lib/runtime/ArrayBufferView~iterate (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/arraybuffer/ArrayBufferView~iterate (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load @@ -772,21 +763,21 @@ (func $~lib/collector/dummy/__ref_unlink (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/runtime/ArrayBufferView#constructor (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH local.get $2 i32.shr_u i32.gt_u if i32.const 0 i32.const 24 - i32.const 236 - i32.const 57 + i32.const 11 + i32.const 65 call $~lib/env/abort unreachable end @@ -802,9 +793,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -862,13 +853,13 @@ local.get $0 else i32.const 16 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 4 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end local.get $1 i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 i32.const 0 @@ -905,9 +896,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 6 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -926,7 +917,7 @@ (local $2 i32) local.get $0 local.get $1 - call $~lib/runtime/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~iterate ) (func $~lib/typedarray/Uint8Array#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -934,13 +925,13 @@ local.get $0 else i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 7 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end local.get $1 i32.const 0 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) @@ -2490,7 +2481,7 @@ end end ) - (func $~lib/runtime/makeArray (; 32 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 32 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2498,9 +2489,9 @@ (local $8 i32) (local $9 i32) i32.const 16 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.get $1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $4 local.get $0 local.get $2 @@ -2509,9 +2500,9 @@ local.get $0 local.get $2 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $6 local.get $4 local.tee $7 @@ -2849,7 +2840,7 @@ local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/reallocate (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2867,10 +2858,10 @@ i32.lt_u if local.get $1 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust local.set $4 local.get $3 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust i32.const 0 local.get $0 global.get $~lib/memory/HEAP_BASE @@ -2919,9 +2910,9 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 117 - i32.const 8 + i32.const 80 + i32.const 107 + i32.const 10 call $~lib/env/abort unreachable end @@ -2968,7 +2959,7 @@ i32.gt_u if local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH local.get $2 i32.shr_u i32.gt_u @@ -2976,7 +2967,7 @@ i32.const 0 i32.const 272 i32.const 13 - i32.const 64 + i32.const 72 call $~lib/env/abort unreachable end @@ -2987,15 +2978,9 @@ local.get $2 i32.shl local.set $4 - block $~lib/runtime/REALLOCATE|inlined.0 (result i32) - local.get $3 - local.set $6 - local.get $4 - local.set $5 - local.get $6 - local.get $5 - call $~lib/runtime/reallocate - end + local.get $3 + local.get $4 + call $~lib/runtime/runtime.reallocate local.set $5 local.get $5 local.get $3 @@ -3127,8 +3112,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 i32.load offset=12 local.set $2 @@ -3140,34 +3123,28 @@ i32.eq select local.set $3 - block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) - local.get $2 - local.get $3 - i32.add - local.set $5 - i32.const 0 - local.set $4 - local.get $5 - i32.const 4 - i32.const 2 - local.get $4 - call $~lib/runtime/makeArray - end - local.set $6 - local.get $6 + local.get $2 + local.get $3 + i32.add + i32.const 4 + i32.const 2 + i32.const 0 + call $~lib/runtime/runtime.makeArray + local.set $4 + local.get $4 i32.load offset=4 - local.set $7 + local.set $5 local.get $2 i32.const 2 i32.shl - local.set $8 - local.get $7 + local.set $6 + local.get $5 local.get $0 i32.load offset=4 - local.get $8 + local.get $6 call $~lib/memory/memory.copy - local.get $7 - local.get $8 + local.get $5 + local.get $6 i32.add local.get $1 i32.load offset=4 @@ -3175,7 +3152,7 @@ i32.const 2 i32.shl call $~lib/memory/memory.copy - local.get $6 + local.get $4 ) (func $~lib/array/Array#copyWithin (; 55 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) @@ -3694,17 +3671,11 @@ i32.gt_s select local.set $2 - block $~lib/runtime/MAKEARRAY|inlined.1 (result i32) - local.get $2 - local.set $5 - i32.const 0 - local.set $4 - local.get $5 - i32.const 4 - i32.const 2 - local.get $4 - call $~lib/runtime/makeArray - end + local.get $2 + i32.const 4 + i32.const 2 + i32.const 0 + call $~lib/runtime/runtime.makeArray local.set $6 local.get $6 i32.load offset=4 @@ -4288,32 +4259,26 @@ local.get $0 i32.load offset=12 local.set $2 - block $~lib/runtime/MAKEARRAY|inlined.0 (result i32) - local.get $2 - local.set $4 - i32.const 0 - local.set $3 - local.get $4 - i32.const 34 - i32.const 2 - local.get $3 - call $~lib/runtime/makeArray - end - local.set $5 - local.get $5 + local.get $2 + i32.const 34 + i32.const 2 + i32.const 0 + call $~lib/runtime/runtime.makeArray + local.set $3 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 i32.const 0 - local.set $3 + local.set $5 loop $repeat|0 - local.get $3 + local.get $5 local.get $2 - local.tee $4 + local.tee $6 local.get $0 i32.load offset=12 local.tee $7 - local.get $4 + local.get $6 local.get $7 i32.lt_s select @@ -4323,38 +4288,38 @@ block local.get $0 i32.load offset=4 - local.get $3 + local.get $5 i32.const 2 i32.shl i32.add i32.load - local.set $4 - local.get $6 - local.get $3 + local.set $6 + local.get $4 + local.get $5 i32.const 2 i32.shl i32.add block (result f32) i32.const 3 global.set $~lib/argc - local.get $4 - local.get $3 + local.get $6 + local.get $5 local.get $0 local.get $1 call_indirect (type $FUNCSIG$fiii) end f32.store end - local.get $3 + local.get $5 i32.const 1 i32.add - local.set $3 + local.set $5 br $repeat|0 unreachable end unreachable end - local.get $5 + local.get $3 ) (func $~lib/array/Array#get:length (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -4409,32 +4374,26 @@ local.get $0 i32.load offset=12 local.set $2 - block $~lib/runtime/MAKEARRAY|inlined.2 (result i32) - local.get $2 - local.set $4 - i32.const 0 - local.set $3 - local.get $4 - i32.const 4 - i32.const 2 - local.get $3 - call $~lib/runtime/makeArray - end - local.set $5 - local.get $5 + local.get $2 + i32.const 4 + i32.const 2 + i32.const 0 + call $~lib/runtime/runtime.makeArray + local.set $3 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 i32.const 0 - local.set $3 + local.set $5 loop $repeat|0 - local.get $3 + local.get $5 local.get $2 - local.tee $4 + local.tee $6 local.get $0 i32.load offset=12 local.tee $7 - local.get $4 + local.get $6 local.get $7 i32.lt_s select @@ -4444,38 +4403,38 @@ block local.get $0 i32.load offset=4 - local.get $3 + local.get $5 i32.const 2 i32.shl i32.add i32.load - local.set $4 - local.get $6 - local.get $3 + local.set $6 + local.get $4 + local.get $5 i32.const 2 i32.shl i32.add block (result i32) i32.const 3 global.set $~lib/argc - local.get $4 - local.get $3 + local.get $6 + local.get $5 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) end i32.store end - local.get $3 + local.get $5 i32.const 1 i32.add - local.set $3 + local.set $5 br $repeat|0 unreachable end unreachable end - local.get $5 + local.get $3 ) (func $start:std/array~anonymous|23 (; 98 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i @@ -4505,29 +4464,23 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/runtime/MAKEARRAY|inlined.3 (result i32) - i32.const 0 - local.set $3 - i32.const 0 - local.set $2 - local.get $3 - i32.const 4 - i32.const 2 - local.get $2 - call $~lib/runtime/makeArray - end - local.set $4 + i32.const 0 + i32.const 4 + i32.const 2 + i32.const 0 + call $~lib/runtime/runtime.makeArray + local.set $2 block $break|0 block i32.const 0 - local.set $2 + local.set $3 local.get $0 i32.load offset=12 - local.set $3 + local.set $4 end loop $repeat|0 - local.get $2 local.get $3 + local.get $4 local.tee $5 local.get $0 i32.load offset=12 @@ -4542,7 +4495,7 @@ block local.get $0 i32.load offset=4 - local.get $2 + local.get $3 i32.const 2 i32.shl i32.add @@ -4552,7 +4505,7 @@ i32.const 3 global.set $~lib/argc local.get $5 - local.get $2 + local.get $3 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) @@ -4560,22 +4513,22 @@ i32.const 0 i32.ne if - local.get $4 + local.get $2 local.get $5 call $~lib/array/Array#push drop end end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $repeat|0 unreachable end unreachable end - local.get $4 + local.get $2 ) (func $start:std/array~anonymous|26 (; 102 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 @@ -7296,10 +7249,8 @@ ) (func $~lib/array/Array.create (; 154 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) - (local $3 i32) local.get $0 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH i32.const 2 i32.shr_u i32.gt_u @@ -7307,32 +7258,26 @@ i32.const 0 i32.const 272 i32.const 43 - i32.const 62 + i32.const 70 call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY|inlined.4 (result i32) - local.get $0 - local.set $2 - i32.const 0 - local.set $1 - local.get $2 - i32.const 4 - i32.const 2 - local.get $1 - call $~lib/runtime/makeArray - end - local.set $3 - local.get $3 + local.get $0 + i32.const 4 + i32.const 2 + i32.const 0 + call $~lib/runtime/runtime.makeArray + local.set $1 + local.get $1 i32.load offset=4 i32.const 0 - local.get $3 + local.get $1 i32.load offset=8 call $~lib/memory/memory.fill - local.get $3 + local.get $1 i32.const 0 i32.store offset=12 - local.get $3 + local.get $1 ) (func $std/array/createReverseOrderedArray (; 155 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -7604,10 +7549,8 @@ ) (func $~lib/array/Array.create<~lib/array/Array> (; 167 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) - (local $3 i32) local.get $0 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH i32.const 2 i32.shr_u i32.gt_u @@ -7615,32 +7558,26 @@ i32.const 0 i32.const 272 i32.const 43 - i32.const 62 + i32.const 70 call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY<~lib/array/Array>|inlined.0 (result i32) - local.get $0 - local.set $2 - i32.const 0 - local.set $1 - local.get $2 - i32.const 68 - i32.const 2 - local.get $1 - call $~lib/runtime/makeArray - end - local.set $3 - local.get $3 - i32.load offset=4 - i32.const 0 - local.get $3 + local.get $0 + i32.const 68 + i32.const 2 + i32.const 0 + call $~lib/runtime/runtime.makeArray + local.set $1 + local.get $1 + i32.load offset=4 + i32.const 0 + local.get $1 i32.load offset=8 call $~lib/memory/memory.fill - local.get $3 + local.get $1 i32.const 0 i32.store offset=12 - local.get $3 + local.get $1 ) (func $~lib/array/Array<~lib/array/Array>#__unchecked_set (; 168 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -8094,10 +8031,8 @@ ) (func $~lib/array/Array.create> (; 181 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) - (local $3 i32) local.get $0 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH i32.const 2 i32.shr_u i32.gt_u @@ -8105,41 +8040,35 @@ i32.const 0 i32.const 272 i32.const 43 - i32.const 62 + i32.const 70 call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY>|inlined.0 (result i32) - local.get $0 - local.set $2 - i32.const 0 - local.set $1 - local.get $2 - i32.const 71 - i32.const 2 - local.get $1 - call $~lib/runtime/makeArray - end - local.set $3 - local.get $3 + local.get $0 + i32.const 71 + i32.const 2 + i32.const 0 + call $~lib/runtime/runtime.makeArray + local.set $1 + local.get $1 i32.load offset=4 i32.const 0 - local.get $3 + local.get $1 i32.load offset=8 call $~lib/memory/memory.fill - local.get $3 + local.get $1 i32.const 0 i32.store offset=12 - local.get $3 + local.get $1 ) (func $std/array/Proxy#constructor (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 72 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -9161,10 +9090,8 @@ ) (func $~lib/array/Array.create<~lib/string/String> (; 210 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) - (local $3 i32) local.get $0 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH i32.const 2 i32.shr_u i32.gt_u @@ -9172,36 +9099,29 @@ i32.const 0 i32.const 272 i32.const 43 - i32.const 62 + i32.const 70 call $~lib/env/abort unreachable end - block $~lib/runtime/MAKEARRAY<~lib/string/String>|inlined.0 (result i32) - local.get $0 - local.set $2 - i32.const 0 - local.set $1 - local.get $2 - i32.const 78 - i32.const 2 - local.get $1 - call $~lib/runtime/makeArray - end - local.set $3 - local.get $3 + local.get $0 + i32.const 78 + i32.const 2 + i32.const 0 + call $~lib/runtime/runtime.makeArray + local.set $1 + local.get $1 i32.load offset=4 i32.const 0 - local.get $3 + local.get $1 i32.load offset=8 call $~lib/memory/memory.fill - local.get $3 + local.get $1 i32.const 0 i32.store offset=12 - local.get $3 + local.get $1 ) (func $~lib/string/String#charAt (; 211 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 i32.const 0 i32.ne @@ -9209,7 +9129,7 @@ if i32.const 0 i32.const 4376 - i32.const 39 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -9222,14 +9142,10 @@ i32.const 4200 return end - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - i32.const 2 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $3 - local.get $3 + i32.const 2 + call $~lib/runtime/runtime.allocate + local.set $2 + local.get $2 local.get $0 local.get $1 i32.const 1 @@ -9237,20 +9153,15 @@ i32.add i32.load16_u i32.store16 - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.0 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.const 1 - call $~lib/runtime/register - end + local.get $2 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/string/String#concat (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $1 i32.const 0 i32.eq @@ -9279,30 +9190,22 @@ i32.const 4200 return end - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) - local.get $4 - local.set $5 - local.get $5 - call $~lib/runtime/allocate - end - local.set $6 - local.get $6 + local.get $4 + call $~lib/runtime/runtime.allocate + local.set $5 + local.get $5 local.get $0 local.get $2 call $~lib/memory/memory.copy - local.get $6 + local.get $5 local.get $2 i32.add local.get $1 local.get $3 call $~lib/memory/memory.copy - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.1 (result i32) - local.get $6 - local.set $5 - local.get $5 - i32.const 1 - call $~lib/runtime/register - end + local.get $5 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/string/String.__concat (; 213 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -9856,7 +9759,7 @@ if i32.const 0 i32.const 4376 - i32.const 189 + i32.const 190 i32.const 4 call $~lib/env/abort unreachable @@ -9945,12 +9848,8 @@ local.get $0 return end - block $~lib/runtime/ALLOCATE|inlined.4 (result i32) - local.get $3 - local.set $4 - local.get $4 - call $~lib/runtime/allocate - end + local.get $3 + call $~lib/runtime/runtime.allocate local.set $10 local.get $10 local.get $0 @@ -9958,15 +9857,11 @@ i32.add local.get $3 call $~lib/memory/memory.copy - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.2 (result i32) - local.get $10 - local.set $4 - local.get $4 - i32.const 1 - call $~lib/runtime/register - end + local.get $10 + i32.const 1 + call $~lib/runtime/runtime.register ) - (func $~lib/runtime/discard (; 229 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 229 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -9974,9 +9869,9 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 177 - i32.const 4 + i32.const 80 + i32.const 132 + i32.const 6 call $~lib/env/abort unreachable end @@ -9991,9 +9886,9 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 179 - i32.const 4 + i32.const 80 + i32.const 134 + i32.const 6 call $~lib/env/abort unreachable end @@ -10010,7 +9905,6 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) local.get $0 i32.load offset=12 i32.const 1 @@ -10051,47 +9945,43 @@ local.get $5 i32.add local.set $6 - block $~lib/runtime/ALLOCATE|inlined.3 (result i32) - local.get $6 - i32.const 1 - i32.shl - local.set $7 - local.get $7 - call $~lib/runtime/allocate - end - local.set $8 + local.get $6 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + local.set $7 i32.const 0 - local.set $9 + local.set $8 block $break|0 i32.const 0 - local.set $7 + local.set $10 loop $repeat|0 - local.get $7 + local.get $10 local.get $2 i32.lt_s i32.eqz br_if $break|0 block local.get $3 - local.get $7 + local.get $10 i32.add i32.load8_u - local.set $10 + local.set $9 i32.const 4 - local.get $10 + local.get $9 i32.const 0 i32.ne i32.eqz i32.add local.set $5 + local.get $7 local.get $8 - local.get $9 i32.const 1 i32.shl i32.add i32.const 4472 i32.const 4496 - local.get $10 + local.get $9 i32.const 0 i32.ne select @@ -10099,14 +9989,14 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $9 + local.get $8 local.get $5 i32.add - local.set $9 + local.set $8 local.get $4 if + local.get $7 local.get $8 - local.get $9 i32.const 1 i32.shl i32.add @@ -10115,16 +10005,16 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $9 + local.get $8 local.get $4 i32.add - local.set $9 + local.set $8 end end - local.get $7 + local.get $10 i32.const 1 i32.add - local.set $7 + local.set $10 br $repeat|0 unreachable end @@ -10134,22 +10024,22 @@ local.get $2 i32.add i32.load8_u - local.set $10 + local.set $9 i32.const 4 - local.get $10 + local.get $9 i32.const 0 i32.ne i32.eqz i32.add local.set $5 + local.get $7 local.get $8 - local.get $9 i32.const 1 i32.shl i32.add i32.const 4472 i32.const 4496 - local.get $10 + local.get $9 i32.const 0 i32.ne select @@ -10157,35 +10047,27 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $9 + local.get $8 local.get $5 i32.add - local.set $9 + local.set $8 local.get $6 - local.get $9 + local.get $8 i32.gt_s if - local.get $8 + local.get $7 i32.const 0 - local.get $9 + local.get $8 call $~lib/string/String#substring - local.set $7 - block $~lib/runtime/DISCARD|inlined.0 - local.get $8 - local.set $11 - local.get $11 - call $~lib/runtime/discard - end + local.set $10 local.get $7 + call $~lib/runtime/runtime.discard + local.get $10 return end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.3 (result i32) - local.get $8 - local.set $7 - local.get $7 - i32.const 1 - call $~lib/runtime/register - end + local.get $7 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/array/Array#join (; 231 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -10434,40 +10316,32 @@ local.get $1 i32.add local.set $2 - block $~lib/runtime/ALLOCATE|inlined.5 (result i32) - local.get $2 - i32.const 1 - i32.shl - local.set $3 - local.get $3 - call $~lib/runtime/allocate - end - local.set $4 + local.get $2 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + local.set $3 block $~lib/util/number/utoa32_core|inlined.0 - local.get $4 + local.get $3 local.set $6 local.get $0 local.set $5 local.get $2 - local.set $3 + local.set $4 local.get $6 local.get $5 - local.get $3 + local.get $4 call $~lib/util/number/utoa32_lut end local.get $1 if - local.get $4 + local.get $3 i32.const 45 i32.store16 end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.4 (result i32) - local.get $4 - local.set $3 - local.get $3 - i32.const 1 - call $~lib/runtime/register - end + local.get $3 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/util/number/itoa (; 235 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -10542,7 +10416,6 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) local.get $0 i32.load offset=12 i32.const 1 @@ -10577,45 +10450,41 @@ i32.const 11 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.6 (result i32) - local.get $5 - i32.const 1 - i32.shl - local.set $6 - local.get $6 - call $~lib/runtime/allocate - end - local.set $7 + local.get $5 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + local.set $6 i32.const 0 - local.set $8 + local.set $7 block $break|0 i32.const 0 - local.set $6 + local.set $9 loop $repeat|0 - local.get $6 + local.get $9 local.get $2 i32.lt_s i32.eqz br_if $break|0 block local.get $3 - local.get $6 + local.get $9 i32.const 2 i32.shl i32.add i32.load - local.set $9 - local.get $8 + local.set $8 + local.get $7 + local.get $6 local.get $7 local.get $8 - local.get $9 call $~lib/util/number/itoa_stream i32.add - local.set $8 + local.set $7 local.get $4 if + local.get $6 local.get $7 - local.get $8 i32.const 1 i32.shl i32.add @@ -10624,16 +10493,16 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $8 + local.get $7 local.get $4 i32.add - local.set $8 + local.set $7 end end - local.get $6 + local.get $9 i32.const 1 i32.add - local.set $6 + local.set $9 br $repeat|0 unreachable end @@ -10645,39 +10514,31 @@ i32.shl i32.add i32.load - local.set $9 - local.get $8 + local.set $8 + local.get $7 + local.get $6 local.get $7 local.get $8 - local.get $9 call $~lib/util/number/itoa_stream i32.add - local.set $8 + local.set $7 local.get $5 - local.get $8 + local.get $7 i32.gt_s if - local.get $7 + local.get $6 i32.const 0 - local.get $8 + local.get $7 call $~lib/string/String#substring - local.set $6 - block $~lib/runtime/DISCARD|inlined.1 - local.get $7 - local.set $10 - local.get $10 - call $~lib/runtime/discard - end + local.set $9 local.get $6 + call $~lib/runtime/runtime.discard + local.get $9 return end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.5 (result i32) - local.get $7 - local.set $6 - local.get $6 - i32.const 1 - call $~lib/runtime/register - end + local.get $6 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/array/Array#join (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -10700,34 +10561,26 @@ local.get $0 call $~lib/util/number/decimalCount32 local.set $1 - block $~lib/runtime/ALLOCATE|inlined.7 (result i32) - local.get $1 - i32.const 1 - i32.shl - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $3 + local.get $1 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + local.set $2 block $~lib/util/number/utoa32_core|inlined.2 - local.get $3 + local.get $2 local.set $5 local.get $0 local.set $4 local.get $1 - local.set $2 + local.set $3 local.get $5 local.get $4 - local.get $2 - call $~lib/util/number/utoa32_lut - end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.6 (result i32) local.get $3 - local.set $2 - local.get $2 - i32.const 1 - call $~lib/runtime/register + call $~lib/util/number/utoa32_lut end + local.get $2 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/util/number/itoa (; 240 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -10782,7 +10635,6 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) local.get $0 i32.load offset=12 i32.const 1 @@ -10817,45 +10669,41 @@ i32.const 10 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.8 (result i32) - local.get $5 - i32.const 1 - i32.shl - local.set $6 - local.get $6 - call $~lib/runtime/allocate - end - local.set $7 + local.get $5 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + local.set $6 i32.const 0 - local.set $8 + local.set $7 block $break|0 i32.const 0 - local.set $6 + local.set $9 loop $repeat|0 - local.get $6 + local.get $9 local.get $2 i32.lt_s i32.eqz br_if $break|0 block local.get $3 - local.get $6 + local.get $9 i32.const 2 i32.shl i32.add i32.load - local.set $9 - local.get $8 + local.set $8 + local.get $7 + local.get $6 local.get $7 local.get $8 - local.get $9 call $~lib/util/number/itoa_stream i32.add - local.set $8 + local.set $7 local.get $4 if + local.get $6 local.get $7 - local.get $8 i32.const 1 i32.shl i32.add @@ -10864,16 +10712,16 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $8 + local.get $7 local.get $4 i32.add - local.set $8 + local.set $7 end end - local.get $6 + local.get $9 i32.const 1 i32.add - local.set $6 + local.set $9 br $repeat|0 unreachable end @@ -10885,39 +10733,31 @@ i32.shl i32.add i32.load - local.set $9 - local.get $8 + local.set $8 + local.get $7 + local.get $6 local.get $7 local.get $8 - local.get $9 call $~lib/util/number/itoa_stream i32.add - local.set $8 + local.set $7 local.get $5 - local.get $8 + local.get $7 i32.gt_s if - local.get $7 + local.get $6 i32.const 0 - local.get $8 + local.get $7 call $~lib/string/String#substring - local.set $6 - block $~lib/runtime/DISCARD|inlined.2 - local.get $7 - local.set $10 - local.get $10 - call $~lib/runtime/discard - end + local.set $9 local.get $6 + call $~lib/runtime/runtime.discard + local.get $9 return end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.7 (result i32) - local.get $7 - local.set $6 - local.get $6 - i32.const 1 - call $~lib/runtime/register - end + local.get $6 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/array/Array#join (; 243 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -12312,7 +12152,6 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 f64.const 0 f64.eq @@ -12338,31 +12177,23 @@ select return end - block $~lib/runtime/ALLOCATE|inlined.9 (result i32) - i32.const 28 - i32.const 1 - i32.shl - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 28 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + local.set $1 + local.get $1 local.get $0 call $~lib/util/number/dtoa_core - local.set $3 - local.get $2 + local.set $2 + local.get $1 i32.const 0 - local.get $3 + local.get $2 call $~lib/string/String#substring - local.set $4 - block $~lib/runtime/DISCARD|inlined.3 - local.get $2 - local.set $1 - local.get $1 - call $~lib/runtime/discard - end - local.get $4 + local.set $3 + local.get $1 + call $~lib/runtime/runtime.discard + local.get $3 ) (func $~lib/util/number/dtoa_stream (; 253 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) @@ -12445,9 +12276,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 f64) - (local $10 i32) + (local $8 f64) + (local $9 i32) local.get $0 i32.load offset=12 i32.const 1 @@ -12482,45 +12312,41 @@ i32.const 28 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.10 (result i32) - local.get $5 - i32.const 1 - i32.shl - local.set $6 - local.get $6 - call $~lib/runtime/allocate - end - local.set $7 + local.get $5 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + local.set $6 i32.const 0 - local.set $8 + local.set $7 block $break|0 i32.const 0 - local.set $6 + local.set $9 loop $repeat|0 - local.get $6 + local.get $9 local.get $2 i32.lt_s i32.eqz br_if $break|0 block local.get $3 - local.get $6 + local.get $9 i32.const 3 i32.shl i32.add f64.load - local.set $9 - local.get $8 + local.set $8 + local.get $7 + local.get $6 local.get $7 local.get $8 - local.get $9 call $~lib/util/number/dtoa_stream i32.add - local.set $8 + local.set $7 local.get $4 if + local.get $6 local.get $7 - local.get $8 i32.const 1 i32.shl i32.add @@ -12529,16 +12355,16 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $8 + local.get $7 local.get $4 i32.add - local.set $8 + local.set $7 end end - local.get $6 + local.get $9 i32.const 1 i32.add - local.set $6 + local.set $9 br $repeat|0 unreachable end @@ -12550,39 +12376,31 @@ i32.shl i32.add f64.load - local.set $9 - local.get $8 + local.set $8 + local.get $7 + local.get $6 local.get $7 local.get $8 - local.get $9 call $~lib/util/number/dtoa_stream i32.add - local.set $8 + local.set $7 local.get $5 - local.get $8 + local.get $7 i32.gt_s if - local.get $7 + local.get $6 i32.const 0 - local.get $8 + local.get $7 call $~lib/string/String#substring - local.set $6 - block $~lib/runtime/DISCARD|inlined.4 - local.get $7 - local.set $10 - local.get $10 - call $~lib/runtime/discard - end + local.set $9 local.get $6 + call $~lib/runtime/runtime.discard + local.get $9 return end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.8 (result i32) - local.get $7 - local.set $6 - local.get $6 - i32.const 1 - call $~lib/runtime/register - end + local.get $6 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/array/Array#join (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -12672,18 +12490,14 @@ end i32.const 0 local.set $9 - block $~lib/runtime/ALLOCATE|inlined.11 (result i32) - local.get $5 - local.get $4 - local.get $2 - i32.mul - i32.add - i32.const 1 - i32.shl - local.set $8 - local.get $8 - call $~lib/runtime/allocate - end + local.get $5 + local.get $4 + local.get $2 + i32.mul + i32.add + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate local.set $10 block $break|1 i32.const 0 @@ -12774,13 +12588,9 @@ i32.shl call $~lib/memory/memory.copy end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.9 (result i32) - local.get $10 - local.set $8 - local.get $8 - i32.const 1 - call $~lib/runtime/register - end + local.get $10 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/array/Array<~lib/string/String>#join (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -12796,9 +12606,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 87 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -12861,7 +12671,6 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) local.get $0 i32.load offset=12 i32.const 1 @@ -12894,38 +12703,34 @@ i32.const 15 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.12 (result i32) - local.get $5 - i32.const 1 - i32.shl - local.set $6 - local.get $6 - call $~lib/runtime/allocate - end - local.set $7 + local.get $5 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + local.set $6 i32.const 0 - local.set $8 + local.set $7 block $break|0 i32.const 0 - local.set $6 + local.set $9 loop $repeat|0 - local.get $6 + local.get $9 local.get $2 i32.lt_s i32.eqz br_if $break|0 block local.get $3 - local.get $6 + local.get $9 i32.const 2 i32.shl i32.add i32.load - local.set $9 - local.get $9 + local.set $8 + local.get $8 if + local.get $6 local.get $7 - local.get $8 i32.const 1 i32.shl i32.add @@ -12934,15 +12739,15 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $8 + local.get $7 i32.const 15 i32.add - local.set $8 + local.set $7 end local.get $4 if + local.get $6 local.get $7 - local.get $8 i32.const 1 i32.shl i32.add @@ -12951,16 +12756,16 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $8 + local.get $7 local.get $4 i32.add - local.set $8 + local.set $7 end end - local.get $6 + local.get $9 i32.const 1 i32.add - local.set $6 + local.set $9 br $repeat|0 unreachable end @@ -12973,8 +12778,8 @@ i32.add i32.load if + local.get $6 local.get $7 - local.get $8 i32.const 1 i32.shl i32.add @@ -12983,36 +12788,28 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $8 + local.get $7 i32.const 15 i32.add - local.set $8 + local.set $7 end local.get $5 - local.get $8 + local.get $7 i32.gt_s if - local.get $7 + local.get $6 i32.const 0 - local.get $8 + local.get $7 call $~lib/string/String#substring - local.set $6 - block $~lib/runtime/DISCARD|inlined.5 - local.get $7 - local.set $10 - local.get $10 - call $~lib/runtime/discard - end + local.set $9 local.get $6 + call $~lib/runtime/runtime.discard + local.get $9 return end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.10 (result i32) - local.get $7 - local.set $6 - local.get $6 - i32.const 1 - call $~lib/runtime/register - end + local.get $6 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/array/Array#join (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -13126,7 +12923,6 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) local.get $0 i32.load offset=12 i32.const 1 @@ -13161,45 +12957,41 @@ i32.const 11 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.13 (result i32) - local.get $5 - i32.const 1 - i32.shl - local.set $6 - local.get $6 - call $~lib/runtime/allocate - end - local.set $7 + local.get $5 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + local.set $6 i32.const 0 - local.set $8 + local.set $7 block $break|0 i32.const 0 - local.set $6 + local.set $9 loop $repeat|0 - local.get $6 + local.get $9 local.get $2 i32.lt_s i32.eqz br_if $break|0 block local.get $3 - local.get $6 + local.get $9 i32.const 0 i32.shl i32.add i32.load8_s - local.set $9 - local.get $8 + local.set $8 + local.get $7 + local.get $6 local.get $7 local.get $8 - local.get $9 call $~lib/util/number/itoa_stream i32.add - local.set $8 + local.set $7 local.get $4 if + local.get $6 local.get $7 - local.get $8 i32.const 1 i32.shl i32.add @@ -13208,16 +13000,16 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $8 + local.get $7 local.get $4 i32.add - local.set $8 + local.set $7 end end - local.get $6 + local.get $9 i32.const 1 i32.add - local.set $6 + local.set $9 br $repeat|0 unreachable end @@ -13229,39 +13021,31 @@ i32.shl i32.add i32.load8_s - local.set $9 - local.get $8 + local.set $8 + local.get $7 + local.get $6 local.get $7 local.get $8 - local.get $9 call $~lib/util/number/itoa_stream i32.add - local.set $8 + local.set $7 local.get $5 - local.get $8 + local.get $7 i32.gt_s if - local.get $7 + local.get $6 i32.const 0 - local.get $8 + local.get $7 call $~lib/string/String#substring - local.set $6 - block $~lib/runtime/DISCARD|inlined.6 - local.get $7 - local.set $10 - local.get $10 - call $~lib/runtime/discard - end + local.set $9 local.get $6 + call $~lib/runtime/runtime.discard + local.get $9 return end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.11 (result i32) - local.get $7 - local.set $6 - local.get $6 - i32.const 1 - call $~lib/runtime/register - end + local.get $6 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/array/Array#join (; 268 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -13343,7 +13127,6 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) local.get $0 i32.load offset=12 i32.const 1 @@ -13378,45 +13161,41 @@ i32.const 10 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.14 (result i32) - local.get $5 - i32.const 1 - i32.shl - local.set $6 - local.get $6 - call $~lib/runtime/allocate - end - local.set $7 + local.get $5 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + local.set $6 i32.const 0 - local.set $8 + local.set $7 block $break|0 i32.const 0 - local.set $6 + local.set $9 loop $repeat|0 - local.get $6 + local.get $9 local.get $2 i32.lt_s i32.eqz br_if $break|0 block local.get $3 - local.get $6 + local.get $9 i32.const 1 i32.shl i32.add i32.load16_u - local.set $9 - local.get $8 + local.set $8 + local.get $7 + local.get $6 local.get $7 local.get $8 - local.get $9 call $~lib/util/number/itoa_stream i32.add - local.set $8 + local.set $7 local.get $4 if + local.get $6 local.get $7 - local.get $8 i32.const 1 i32.shl i32.add @@ -13425,16 +13204,16 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $8 + local.get $7 local.get $4 i32.add - local.set $8 + local.set $7 end end - local.get $6 + local.get $9 i32.const 1 i32.add - local.set $6 + local.set $9 br $repeat|0 unreachable end @@ -13446,39 +13225,31 @@ i32.shl i32.add i32.load16_u - local.set $9 - local.get $8 + local.set $8 + local.get $7 + local.get $6 local.get $7 local.get $8 - local.get $9 call $~lib/util/number/itoa_stream i32.add - local.set $8 + local.set $7 local.get $5 - local.get $8 + local.get $7 i32.gt_s if - local.get $7 + local.get $6 i32.const 0 - local.get $8 + local.get $7 call $~lib/string/String#substring - local.set $6 - block $~lib/runtime/DISCARD|inlined.7 - local.get $7 - local.set $10 - local.get $10 - call $~lib/runtime/discard - end + local.set $9 local.get $6 + call $~lib/runtime/runtime.discard + local.get $9 return end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.12 (result i32) - local.get $7 - local.set $6 - local.get $6 - i32.const 1 - call $~lib/runtime/register - end + local.get $6 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/array/Array#join (; 274 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -13713,14 +13484,10 @@ local.get $2 call $~lib/util/number/decimalCount32 local.set $3 - block $~lib/runtime/ALLOCATE|inlined.15 (result i32) - local.get $3 - i32.const 1 - i32.shl - local.set $4 - local.get $4 - call $~lib/runtime/allocate - end + local.get $3 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate local.set $1 block $~lib/util/number/utoa32_core|inlined.8 local.get $1 @@ -13738,14 +13505,10 @@ local.get $0 call $~lib/util/number/decimalCount64 local.set $3 - block $~lib/runtime/ALLOCATE|inlined.16 (result i32) - local.get $3 - i32.const 1 - i32.shl - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end + local.get $3 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate local.set $1 block $~lib/util/number/utoa64_core|inlined.0 local.get $1 @@ -13760,13 +13523,9 @@ call $~lib/util/number/utoa64_lut end end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.13 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.const 1 - call $~lib/runtime/register - end + local.get $1 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/util/number/itoa (; 279 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 @@ -13846,9 +13605,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) + (local $8 i64) + (local $9 i32) local.get $0 i32.load offset=12 i32.const 1 @@ -13883,45 +13641,41 @@ i32.const 20 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.17 (result i32) - local.get $5 - i32.const 1 - i32.shl - local.set $6 - local.get $6 - call $~lib/runtime/allocate - end - local.set $7 + local.get $5 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + local.set $6 i32.const 0 - local.set $8 + local.set $7 block $break|0 i32.const 0 - local.set $6 + local.set $9 loop $repeat|0 - local.get $6 + local.get $9 local.get $2 i32.lt_s i32.eqz br_if $break|0 block local.get $3 - local.get $6 + local.get $9 i32.const 3 i32.shl i32.add i64.load - local.set $9 - local.get $8 + local.set $8 + local.get $7 + local.get $6 local.get $7 local.get $8 - local.get $9 call $~lib/util/number/itoa_stream i32.add - local.set $8 + local.set $7 local.get $4 if + local.get $6 local.get $7 - local.get $8 i32.const 1 i32.shl i32.add @@ -13930,16 +13684,16 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $8 + local.get $7 local.get $4 i32.add - local.set $8 + local.set $7 end end - local.get $6 + local.get $9 i32.const 1 i32.add - local.set $6 + local.set $9 br $repeat|0 unreachable end @@ -13951,39 +13705,31 @@ i32.shl i32.add i64.load - local.set $9 - local.get $8 + local.set $8 + local.get $7 + local.get $6 local.get $7 local.get $8 - local.get $9 call $~lib/util/number/itoa_stream i32.add - local.set $8 + local.set $7 local.get $5 - local.get $8 + local.get $7 i32.gt_s if - local.get $7 + local.get $6 i32.const 0 - local.get $8 + local.get $7 call $~lib/string/String#substring - local.set $6 - block $~lib/runtime/DISCARD|inlined.8 - local.get $7 - local.set $10 - local.get $10 - call $~lib/runtime/discard - end + local.set $9 local.get $6 + call $~lib/runtime/runtime.discard + local.get $9 return end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.14 (result i32) - local.get $7 - local.set $6 - local.get $6 - i32.const 1 - call $~lib/runtime/register - end + local.get $6 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/array/Array#join (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -14043,14 +13789,10 @@ local.get $1 i32.add local.set $4 - block $~lib/runtime/ALLOCATE|inlined.18 (result i32) - local.get $4 - i32.const 1 - i32.shl - local.set $5 - local.get $5 - call $~lib/runtime/allocate - end + local.get $4 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate local.set $2 block $~lib/util/number/utoa32_core|inlined.10 local.get $2 @@ -14070,14 +13812,10 @@ local.get $1 i32.add local.set $4 - block $~lib/runtime/ALLOCATE|inlined.19 (result i32) - local.get $4 - i32.const 1 - i32.shl - local.set $3 - local.get $3 - call $~lib/runtime/allocate - end + local.get $4 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate local.set $2 block $~lib/util/number/utoa64_core|inlined.2 local.get $2 @@ -14098,13 +13836,9 @@ i32.const 45 i32.store16 end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.15 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.const 1 - call $~lib/runtime/register - end + local.get $2 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/util/number/itoa (; 286 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 @@ -14206,9 +13940,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) + (local $8 i64) + (local $9 i32) local.get $0 i32.load offset=12 i32.const 1 @@ -14243,45 +13976,41 @@ i32.const 21 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.20 (result i32) - local.get $5 - i32.const 1 - i32.shl - local.set $6 - local.get $6 - call $~lib/runtime/allocate - end - local.set $7 + local.get $5 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + local.set $6 i32.const 0 - local.set $8 + local.set $7 block $break|0 i32.const 0 - local.set $6 + local.set $9 loop $repeat|0 - local.get $6 + local.get $9 local.get $2 i32.lt_s i32.eqz br_if $break|0 block local.get $3 - local.get $6 + local.get $9 i32.const 3 i32.shl i32.add i64.load - local.set $9 - local.get $8 + local.set $8 + local.get $7 + local.get $6 local.get $7 local.get $8 - local.get $9 call $~lib/util/number/itoa_stream i32.add - local.set $8 + local.set $7 local.get $4 if + local.get $6 local.get $7 - local.get $8 i32.const 1 i32.shl i32.add @@ -14290,16 +14019,16 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $8 + local.get $7 local.get $4 i32.add - local.set $8 + local.set $7 end end - local.get $6 + local.get $9 i32.const 1 i32.add - local.set $6 + local.set $9 br $repeat|0 unreachable end @@ -14311,39 +14040,31 @@ i32.shl i32.add i64.load - local.set $9 - local.get $8 + local.set $8 + local.get $7 + local.get $6 local.get $7 local.get $8 - local.get $9 call $~lib/util/number/itoa_stream i32.add - local.set $8 + local.set $7 local.get $5 - local.get $8 + local.get $7 i32.gt_s if - local.get $7 + local.get $6 i32.const 0 - local.get $8 + local.get $7 call $~lib/string/String#substring - local.set $6 - block $~lib/runtime/DISCARD|inlined.9 - local.get $7 - local.set $10 - local.get $10 - call $~lib/runtime/discard - end + local.set $9 local.get $6 + call $~lib/runtime/runtime.discard + local.get $9 return end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.16 (result i32) - local.get $7 - local.set $6 - local.get $6 - i32.const 1 - call $~lib/runtime/register - end + local.get $6 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/array/Array#join (; 289 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -14438,18 +14159,14 @@ end i32.const 0 local.set $9 - block $~lib/runtime/ALLOCATE|inlined.21 (result i32) - local.get $5 - local.get $4 - local.get $2 - i32.mul - i32.add - i32.const 1 - i32.shl - local.set $8 - local.get $8 - call $~lib/runtime/allocate - end + local.get $5 + local.get $4 + local.get $2 + i32.mul + i32.add + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate local.set $10 block $break|1 i32.const 0 @@ -14540,13 +14257,9 @@ i32.shl call $~lib/memory/memory.copy end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.17 (result i32) - local.get $10 - local.set $8 - local.get $8 - i32.const 1 - call $~lib/runtime/register - end + local.get $10 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/array/Array<~lib/string/String | null>#join (; 292 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -14786,7 +14499,6 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) local.get $0 i32.load offset=12 i32.const 1 @@ -14821,45 +14533,41 @@ i32.const 10 i32.add local.set $5 - block $~lib/runtime/ALLOCATE|inlined.22 (result i32) - local.get $5 - i32.const 1 - i32.shl - local.set $6 - local.get $6 - call $~lib/runtime/allocate - end - local.set $7 + local.get $5 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + local.set $6 i32.const 0 - local.set $8 + local.set $7 block $break|0 i32.const 0 - local.set $6 + local.set $9 loop $repeat|0 - local.get $6 + local.get $9 local.get $2 i32.lt_s i32.eqz br_if $break|0 block local.get $3 - local.get $6 + local.get $9 i32.const 0 i32.shl i32.add i32.load8_u - local.set $9 - local.get $8 + local.set $8 + local.get $7 + local.get $6 local.get $7 local.get $8 - local.get $9 call $~lib/util/number/itoa_stream i32.add - local.set $8 + local.set $7 local.get $4 if + local.get $6 local.get $7 - local.get $8 i32.const 1 i32.shl i32.add @@ -14868,16 +14576,16 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $8 + local.get $7 local.get $4 i32.add - local.set $8 + local.set $7 end end - local.get $6 + local.get $9 i32.const 1 i32.add - local.set $6 + local.set $9 br $repeat|0 unreachable end @@ -14889,39 +14597,31 @@ i32.shl i32.add i32.load8_u - local.set $9 - local.get $8 + local.set $8 + local.get $7 + local.get $6 local.get $7 local.get $8 - local.get $9 call $~lib/util/number/itoa_stream i32.add - local.set $8 + local.set $7 local.get $5 - local.get $8 + local.get $7 i32.gt_s if - local.get $7 + local.get $6 i32.const 0 - local.get $8 + local.get $7 call $~lib/string/String#substring - local.set $6 - block $~lib/runtime/DISCARD|inlined.10 - local.get $7 - local.set $10 - local.get $10 - call $~lib/runtime/discard - end + local.set $9 local.get $6 + call $~lib/runtime/runtime.discard + local.get $9 return end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.18 (result i32) - local.get $7 - local.set $6 - local.get $6 - i32.const 1 - call $~lib/runtime/register - end + local.get $6 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/array/Array#join (; 302 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -15473,7 +15173,7 @@ i32.const 8 i32.const 0 i32.const 248 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15496,7 +15196,7 @@ i32.const 8 i32.const 0 i32.const 320 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15519,7 +15219,7 @@ i32.const 8 i32.const 0 i32.const 344 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15542,7 +15242,7 @@ i32.const 8 i32.const 0 i32.const 368 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15565,7 +15265,7 @@ i32.const 8 i32.const 0 i32.const 392 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15588,7 +15288,7 @@ i32.const 10 i32.const 2 i32.const 488 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15611,7 +15311,7 @@ i32.const 10 i32.const 2 i32.const 528 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15634,7 +15334,7 @@ i32.const 10 i32.const 2 i32.const 568 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15657,7 +15357,7 @@ i32.const 10 i32.const 2 i32.const 608 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15680,7 +15380,7 @@ i32.const 10 i32.const 2 i32.const 648 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16029,7 +15729,7 @@ i32.const 4 i32.const 2 i32.const 688 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $~lib/array/Array#concat drop global.get $std/array/arr @@ -16302,7 +16002,7 @@ i32.const 4 i32.const 2 i32.const 752 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -16313,7 +16013,7 @@ i32.const 4 i32.const 2 i32.const 792 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16329,7 +16029,7 @@ i32.const 4 i32.const 2 i32.const 832 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -16340,7 +16040,7 @@ i32.const 4 i32.const 2 i32.const 872 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16356,7 +16056,7 @@ i32.const 4 i32.const 2 i32.const 912 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -16367,7 +16067,7 @@ i32.const 4 i32.const 2 i32.const 952 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16383,7 +16083,7 @@ i32.const 4 i32.const 2 i32.const 992 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 2 @@ -16394,7 +16094,7 @@ i32.const 4 i32.const 2 i32.const 1032 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16410,7 +16110,7 @@ i32.const 4 i32.const 2 i32.const 1072 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -16421,7 +16121,7 @@ i32.const 4 i32.const 2 i32.const 1112 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16437,7 +16137,7 @@ i32.const 4 i32.const 2 i32.const 1152 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -16448,7 +16148,7 @@ i32.const 4 i32.const 2 i32.const 1192 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16464,7 +16164,7 @@ i32.const 4 i32.const 2 i32.const 1232 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -16475,7 +16175,7 @@ i32.const 4 i32.const 2 i32.const 1272 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16491,7 +16191,7 @@ i32.const 4 i32.const 2 i32.const 1312 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -16502,7 +16202,7 @@ i32.const 4 i32.const 2 i32.const 1352 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16518,7 +16218,7 @@ i32.const 4 i32.const 2 i32.const 1392 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -16529,7 +16229,7 @@ i32.const 4 i32.const 2 i32.const 1432 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16545,7 +16245,7 @@ i32.const 4 i32.const 2 i32.const 1472 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -16556,7 +16256,7 @@ i32.const 4 i32.const 2 i32.const 1512 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16572,7 +16272,7 @@ i32.const 4 i32.const 2 i32.const 1552 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -16583,7 +16283,7 @@ i32.const 4 i32.const 2 i32.const 1592 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16599,7 +16299,7 @@ i32.const 4 i32.const 2 i32.const 1632 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -16610,7 +16310,7 @@ i32.const 4 i32.const 2 i32.const 1672 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17474,7 +17174,7 @@ i32.const 4 i32.const 2 i32.const 1784 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17491,7 +17191,7 @@ i32.const 4 i32.const 2 i32.const 1824 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17507,7 +17207,7 @@ i32.const 4 i32.const 2 i32.const 1840 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 @@ -17517,7 +17217,7 @@ i32.const 4 i32.const 2 i32.const 1880 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17534,7 +17234,7 @@ i32.const 4 i32.const 2 i32.const 1912 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17550,7 +17250,7 @@ i32.const 4 i32.const 2 i32.const 1936 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 @@ -17560,7 +17260,7 @@ i32.const 4 i32.const 2 i32.const 1976 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17577,7 +17277,7 @@ i32.const 4 i32.const 2 i32.const 2000 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17593,7 +17293,7 @@ i32.const 4 i32.const 2 i32.const 2032 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 0 @@ -17603,7 +17303,7 @@ i32.const 4 i32.const 2 i32.const 2072 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17620,7 +17320,7 @@ i32.const 4 i32.const 2 i32.const 2096 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17636,7 +17336,7 @@ i32.const 4 i32.const 2 i32.const 2128 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -1 @@ -17646,7 +17346,7 @@ i32.const 4 i32.const 2 i32.const 2168 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17663,7 +17363,7 @@ i32.const 4 i32.const 2 i32.const 2192 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17679,7 +17379,7 @@ i32.const 4 i32.const 2 i32.const 2224 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 @@ -17689,7 +17389,7 @@ i32.const 4 i32.const 2 i32.const 2264 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17706,7 +17406,7 @@ i32.const 4 i32.const 2 i32.const 2288 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17722,7 +17422,7 @@ i32.const 4 i32.const 2 i32.const 2320 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 @@ -17732,7 +17432,7 @@ i32.const 4 i32.const 2 i32.const 2360 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17749,7 +17449,7 @@ i32.const 4 i32.const 2 i32.const 2384 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17765,7 +17465,7 @@ i32.const 4 i32.const 2 i32.const 2416 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -7 @@ -17775,7 +17475,7 @@ i32.const 4 i32.const 2 i32.const 2456 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17792,7 +17492,7 @@ i32.const 4 i32.const 2 i32.const 2480 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17808,7 +17508,7 @@ i32.const 4 i32.const 2 i32.const 2512 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 @@ -17818,7 +17518,7 @@ i32.const 4 i32.const 2 i32.const 2552 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17835,7 +17535,7 @@ i32.const 4 i32.const 2 i32.const 2568 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17851,7 +17551,7 @@ i32.const 4 i32.const 2 i32.const 2608 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 1 @@ -17861,7 +17561,7 @@ i32.const 4 i32.const 2 i32.const 2648 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17878,7 +17578,7 @@ i32.const 4 i32.const 2 i32.const 2664 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17894,7 +17594,7 @@ i32.const 4 i32.const 2 i32.const 2704 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 4 @@ -17904,7 +17604,7 @@ i32.const 4 i32.const 2 i32.const 2744 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17921,7 +17621,7 @@ i32.const 4 i32.const 2 i32.const 2760 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17937,7 +17637,7 @@ i32.const 4 i32.const 2 i32.const 2800 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 @@ -17947,7 +17647,7 @@ i32.const 4 i32.const 2 i32.const 2840 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17964,7 +17664,7 @@ i32.const 4 i32.const 2 i32.const 2856 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17980,7 +17680,7 @@ i32.const 4 i32.const 2 i32.const 2896 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 @@ -17990,7 +17690,7 @@ i32.const 4 i32.const 2 i32.const 2936 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18007,7 +17707,7 @@ i32.const 4 i32.const 2 i32.const 2952 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19209,7 +18909,7 @@ i32.const 34 i32.const 2 i32.const 3304 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19234,7 +18934,7 @@ i32.const 58 i32.const 3 i32.const 3464 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19259,7 +18959,7 @@ i32.const 4 i32.const 2 i32.const 3616 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19284,7 +18984,7 @@ i32.const 10 i32.const 2 i32.const 3728 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19320,7 +19020,7 @@ i32.const 4 i32.const 2 i32.const 4056 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19339,7 +19039,7 @@ i32.const 4 i32.const 2 i32.const 4080 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19492,7 +19192,7 @@ i32.const 81 i32.const 0 i32.const 4552 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 4528 call $~lib/array/Array#join i32.const 4576 @@ -19510,7 +19210,7 @@ i32.const 4 i32.const 2 i32.const 5120 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 4200 call $~lib/array/Array#join i32.const 5152 @@ -19528,7 +19228,7 @@ i32.const 10 i32.const 2 i32.const 5240 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 5216 call $~lib/array/Array#join i32.const 5152 @@ -19546,7 +19246,7 @@ i32.const 4 i32.const 2 i32.const 5320 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 5296 call $~lib/array/Array#join i32.const 5344 @@ -19564,7 +19264,7 @@ i32.const 58 i32.const 3 i32.const 6672 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 5472 call $~lib/array/Array#join i32.const 6736 @@ -19582,7 +19282,7 @@ i32.const 78 i32.const 2 i32.const 6888 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray i32.const 4200 call $~lib/array/Array<~lib/string/String>#join i32.const 6832 @@ -19601,7 +19301,7 @@ i32.const 88 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.set $0 local.get $0 i32.load offset=4 @@ -19720,7 +19420,7 @@ i32.const 90 i32.const 0 i32.const 7128 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $~lib/array/Array#toString i32.const 7152 call $~lib/string/String.__eq @@ -19737,7 +19437,7 @@ i32.const 92 i32.const 1 i32.const 7208 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $~lib/array/Array#toString i32.const 7232 call $~lib/string/String.__eq @@ -19754,7 +19454,7 @@ i32.const 83 i32.const 3 i32.const 7312 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $~lib/array/Array#toString i32.const 7352 call $~lib/string/String.__eq @@ -19771,7 +19471,7 @@ i32.const 94 i32.const 3 i32.const 7464 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $~lib/array/Array#toString i32.const 7512 call $~lib/string/String.__eq @@ -19801,7 +19501,7 @@ i32.const 78 i32.const 2 i32.const 7744 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $~lib/array/Array<~lib/string/String>#toString i32.const 7776 call $~lib/string/String.__eq @@ -19819,7 +19519,7 @@ i32.const 68 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.set $1 local.get $1 i32.load offset=4 @@ -19830,7 +19530,7 @@ i32.const 4 i32.const 2 i32.const 7832 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.set $2 local.get $2 local.get $1 @@ -19844,7 +19544,7 @@ i32.const 4 i32.const 2 i32.const 7856 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.set $2 local.get $2 local.get $1 @@ -19873,7 +19573,7 @@ i32.const 96 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.set $0 local.get $0 i32.load offset=4 @@ -19884,7 +19584,7 @@ i32.const 8 i32.const 0 i32.const 7936 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.set $2 local.get $2 local.get $0 @@ -19898,7 +19598,7 @@ i32.const 8 i32.const 0 i32.const 7960 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.set $2 local.get $2 local.get $0 @@ -19927,7 +19627,7 @@ i32.const 100 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.set $0 local.get $0 i32.load offset=4 @@ -19939,7 +19639,7 @@ i32.const 98 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.set $2 local.get $2 i32.load offset=4 @@ -19950,7 +19650,7 @@ i32.const 10 i32.const 2 i32.const 8056 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.set $4 local.get $4 local.get $2 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 675968f8da..8f73250260 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -86,7 +86,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -318,7 +318,7 @@ end end ) - (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 200 @@ -326,8 +326,8 @@ if i32.const 0 i32.const 64 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -341,8 +341,8 @@ if i32.const 0 i32.const 64 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -359,19 +359,19 @@ if i32.const 0 i32.const 16 - i32.const 25 - i32.const 43 + i32.const 53 + i32.const 51 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $1 local.get $0 call $~lib/memory/memory.fill local.get $1 i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/util/memory/memcpy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -1473,7 +1473,7 @@ i32.gt_s select local.tee $2 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $3 local.get $0 local.get $1 @@ -1482,9 +1482,9 @@ call $~lib/memory/memory.copy local.get $3 i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) - (func $~lib/runtime/ArrayBufferView#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) i32.const 1 i32.const 1073741816 @@ -1493,9 +1493,9 @@ i32.gt_u if i32.const 0 - i32.const 64 - i32.const 236 - i32.const 57 + i32.const 16 + i32.const 11 + i32.const 65 call $~lib/env/abort unreachable end @@ -1509,9 +1509,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -1534,18 +1534,18 @@ i32.store offset=8 local.get $0 ) - (func $~lib/runtime/makeArray (; 10 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/runtime/runtime.makeArray (; 10 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) i32.const 16 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 5 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $1 i32.store local.get $0 @@ -1589,9 +1589,9 @@ unreachable end i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 7 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $1 i32.const 0 i32.store @@ -1806,13 +1806,13 @@ unreachable end i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 4 - call $~lib/runtime/register + call $~lib/runtime/runtime.register i32.const 0 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor global.set $std/arraybuffer/arr8 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray drop global.get $std/arraybuffer/arr8 if (result i32) @@ -1832,11 +1832,11 @@ block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>13 (result i32) i32.const 1 i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 6 - call $~lib/runtime/register + call $~lib/runtime/runtime.register i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>13 drop i32.const 0 diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 8b21d815c0..ce20ab8fe0 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -16,7 +16,7 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) @@ -29,7 +29,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -125,10 +125,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -398,7 +398,7 @@ end end ) - (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -407,8 +407,8 @@ if i32.const 0 i32.const 64 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -424,8 +424,8 @@ if i32.const 0 i32.const 64 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -436,36 +436,27 @@ ) (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH i32.gt_u if i32.const 0 i32.const 16 - i32.const 25 - i32.const 43 + i32.const 53 + i32.const 51 call $~lib/env/abort unreachable end - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - local.get $1 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $3 - local.get $3 + local.get $1 + call $~lib/runtime/runtime.allocate + local.set $2 + local.get $2 i32.const 0 local.get $1 call $~lib/memory/memory.fill - block $~lib/runtime/REGISTER<~lib/arraybuffer/ArrayBuffer>|inlined.0 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.const 2 - call $~lib/runtime/register - end + local.get $2 + i32.const 2 + call $~lib/runtime/runtime.register ) (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -1975,12 +1966,8 @@ i32.gt_s select local.set $6 - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - local.get $6 - local.set $4 - local.get $4 - call $~lib/runtime/allocate - end + local.get $6 + call $~lib/runtime/runtime.allocate local.set $7 local.get $7 local.get $0 @@ -1988,13 +1975,9 @@ i32.add local.get $6 call $~lib/memory/memory.copy - block $~lib/runtime/REGISTER<~lib/arraybuffer/ArrayBuffer>|inlined.1 (result i32) - local.get $7 - local.set $4 - local.get $4 - i32.const 2 - call $~lib/runtime/register - end + local.get $7 + i32.const 2 + call $~lib/runtime/runtime.register ) (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array> (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -2034,18 +2017,18 @@ end i32.const 0 ) - (func $~lib/runtime/ArrayBufferView#constructor (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH local.get $2 i32.shr_u i32.gt_u if i32.const 0 - i32.const 64 - i32.const 236 - i32.const 57 + i32.const 16 + i32.const 11 + i32.const 65 call $~lib/env/abort unreachable end @@ -2061,9 +2044,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -2093,24 +2076,24 @@ local.get $0 else i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 4 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end local.get $1 i32.const 0 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/runtime/makeArray (; 19 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 19 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) i32.const 16 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.get $1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $4 local.get $0 local.get $2 @@ -2119,9 +2102,9 @@ local.get $0 local.get $2 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $6 local.get $4 local.get $6 @@ -2150,13 +2133,13 @@ local.get $0 else i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 6 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end local.get $1 i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) @@ -2173,7 +2156,7 @@ local.set $3 end local.get $3 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH i32.gt_u local.get $2 local.get $3 @@ -2195,9 +2178,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 7 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -2259,7 +2242,7 @@ end global.get $std/arraybuffer/buffer i32.const 0 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced @@ -2289,7 +2272,7 @@ end global.get $std/arraybuffer/buffer i32.const 1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced @@ -2307,7 +2290,7 @@ end global.get $std/arraybuffer/buffer i32.const -1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced @@ -2397,7 +2380,7 @@ end global.get $std/arraybuffer/buffer i32.const 42 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced @@ -2493,7 +2476,7 @@ i32.const 5 i32.const 2 i32.const 152 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array> i32.eqz i32.eqz diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index e6e004fb89..38524913af 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -15,8 +15,8 @@ (type $FUNCSIG$viji (func (param i32 i64 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 48) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 56) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (data (i32.const 96) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 144) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") (data (i32.const 184) "\01\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") @@ -91,7 +91,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -156,16 +156,16 @@ i32.const 0 i32.store8 ) - (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 224 i32.le_u if i32.const 0 - i32.const 16 - i32.const 153 - i32.const 4 + i32.const 64 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -178,9 +178,9 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 155 - i32.const 4 + i32.const 64 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -189,23 +189,23 @@ i32.store local.get $0 ) - (func $~lib/runtime/ArrayBufferView#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $1 call $~lib/memory/memory.fill local.get $1 i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $1 local.get $0 i32.eqz if i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -236,7 +236,7 @@ if i32.const 0 i32.const 104 - i32.const 114 + i32.const 115 i32.const 44 call $~lib/env/abort unreachable @@ -285,9 +285,9 @@ unreachable end i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 5 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $3 i32.const 0 i32.store @@ -963,10 +963,10 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 4 - call $~lib/runtime/register - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/runtime/runtime.register + call $~lib/arraybuffer/ArrayBufferView#constructor global.set $std/dataview/array global.get $std/dataview/array i32.const 0 diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 16dd9153b1..713c9b2eef 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -15,15 +15,15 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 48) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 56) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 96) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 144) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") (data (i32.const 184) "\01\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) @@ -35,7 +35,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -131,10 +131,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -404,7 +404,7 @@ end end ) - (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -412,9 +412,9 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 153 - i32.const 4 + i32.const 64 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -429,9 +429,9 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 155 - i32.const 4 + i32.const 64 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -442,49 +442,40 @@ ) (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH i32.gt_u if i32.const 0 - i32.const 56 - i32.const 25 - i32.const 43 + i32.const 16 + i32.const 53 + i32.const 51 call $~lib/env/abort unreachable end - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - local.get $1 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $3 - local.get $3 + local.get $1 + call $~lib/runtime/runtime.allocate + local.set $2 + local.get $2 i32.const 0 local.get $1 call $~lib/memory/memory.fill - block $~lib/runtime/REGISTER<~lib/arraybuffer/ArrayBuffer>|inlined.0 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.const 2 - call $~lib/runtime/register - end + local.get $2 + i32.const 2 + call $~lib/runtime/runtime.register ) - (func $~lib/runtime/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH local.get $2 i32.shr_u i32.gt_u if i32.const 0 i32.const 16 - i32.const 236 - i32.const 57 + i32.const 11 + i32.const 65 call $~lib/env/abort unreachable end @@ -500,9 +491,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -532,13 +523,13 @@ local.get $0 else i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 4 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end local.get $1 i32.const 0 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) @@ -550,7 +541,7 @@ if i32.const 0 i32.const 104 - i32.const 114 + i32.const 115 i32.const 44 call $~lib/env/abort unreachable @@ -581,7 +572,7 @@ local.set $3 end local.get $3 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH i32.gt_u local.get $2 local.get $3 @@ -603,9 +594,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 5 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -637,14 +628,14 @@ local.get $0 i32.load ) - (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load i32.sub ) - (func $~lib/runtime/ArrayBufferView#get:byteLength (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#get:byteLength (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 ) @@ -1489,9 +1480,9 @@ global.get $std/dataview/array call $~lib/typedarray/Uint8Array#get:buffer global.get $std/dataview/array - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset global.get $std/dataview/array - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength call $~lib/dataview/DataView#constructor global.set $std/dataview/view global.get $std/dataview/view diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 44ae296b60..fea96f3c78 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -81,7 +81,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.register (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 80 @@ -89,8 +89,8 @@ if i32.const 0 i32.const 48 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -104,8 +104,8 @@ if i32.const 0 i32.const 48 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -205,7 +205,7 @@ local.get $0 i32.const 8 i32.add - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i64.const 0 i64.store diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 25d22b7bd8..790f2afa59 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -27,7 +27,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/ADJUSTOBLOCK (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -123,10 +123,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -139,7 +139,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -148,8 +148,8 @@ if i32.const 0 i32.const 48 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -165,8 +165,8 @@ if i32.const 0 i32.const 48 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -181,9 +181,9 @@ i32.eqz if i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index cab77e6770..7b4ed5a5e4 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -101,7 +101,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -147,7 +147,7 @@ (func $~lib/string/String~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 148 @@ -155,8 +155,8 @@ if i32.const 0 i32.const 24 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -170,8 +170,8 @@ if i32.const 0 i32.const 24 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -399,19 +399,19 @@ if i32.const 0 i32.const 72 - i32.const 25 - i32.const 43 + i32.const 53 + i32.const 51 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $1 local.get $0 call $~lib/memory/memory.fill local.get $1 i32.const 4 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/map/Map#clear (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) @@ -451,9 +451,9 @@ (func $~lib/map/Map#constructor (; 9 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -1181,9 +1181,9 @@ (func $~lib/map/Map#constructor (; 17 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 5 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -1844,9 +1844,9 @@ (func $~lib/map/Map#constructor (; 24 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 7 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -2619,9 +2619,9 @@ (func $~lib/map/Map#constructor (; 32 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 9 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -3327,9 +3327,9 @@ (func $~lib/map/Map#constructor (; 39 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 11 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -4025,9 +4025,9 @@ (func $~lib/map/Map#constructor (; 48 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 13 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -4404,9 +4404,9 @@ (func $~lib/map/Map#constructor (; 51 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 15 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -5145,9 +5145,9 @@ (func $~lib/map/Map#constructor (; 60 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 17 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -5496,9 +5496,9 @@ (func $~lib/map/Map#constructor (; 62 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 19 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -6176,9 +6176,9 @@ (func $~lib/map/Map#constructor (; 70 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 21 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 2172de8f4d..13a554ca14 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -30,14 +30,14 @@ (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/memory/HEAP_BASE i32 (i32.const 148)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -133,10 +133,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -178,7 +178,7 @@ (func $~lib/collector/dummy/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -187,8 +187,8 @@ if i32.const 0 i32.const 24 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -204,8 +204,8 @@ if i32.const 0 i32.const 24 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -478,36 +478,27 @@ ) (func $~lib/arraybuffer/ArrayBuffer#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH i32.gt_u if i32.const 0 i32.const 72 - i32.const 25 - i32.const 43 + i32.const 53 + i32.const 51 call $~lib/env/abort unreachable end - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - local.get $1 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $3 - local.get $3 + local.get $1 + call $~lib/runtime/runtime.allocate + local.set $2 + local.get $2 i32.const 0 local.get $1 call $~lib/memory/memory.fill - block $~lib/runtime/REGISTER<~lib/arraybuffer/ArrayBuffer>|inlined.0 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.const 4 - call $~lib/runtime/register - end + local.get $2 + i32.const 4 + call $~lib/runtime/runtime.register ) (func $~lib/collector/dummy/__ref_link (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop @@ -590,9 +581,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -1564,9 +1555,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 5 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -2507,9 +2498,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 7 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -3496,9 +3487,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 9 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -4439,9 +4430,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 11 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -5400,9 +5391,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 13 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -6319,9 +6310,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 15 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -7336,9 +7327,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 17 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -8265,9 +8256,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 19 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -9199,9 +9190,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 21 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 45fa3ebdf2..1b0be8f177 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -76,7 +76,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/register (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.register (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 48 @@ -84,8 +84,8 @@ if i32.const 0 i32.const 16 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -99,8 +99,8 @@ if i32.const 0 i32.const 16 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -122,7 +122,7 @@ local.get $0 i32.const 8 i32.add - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 1 i32.store diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 81e5b86fb7..7ed905669c 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -20,7 +20,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -116,10 +116,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -132,7 +132,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -141,8 +141,8 @@ if i32.const 0 i32.const 16 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -158,8 +158,8 @@ if i32.const 0 i32.const 16 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -175,9 +175,9 @@ i32.eqz if i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index 25b1184b61..e4e009dada 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -87,7 +87,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -124,7 +124,7 @@ call_indirect (type $FUNCSIG$vi) end ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 156 @@ -132,8 +132,8 @@ if i32.const 0 i32.const 64 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -147,8 +147,8 @@ if i32.const 0 i32.const 64 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -269,9 +269,9 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 1 i32.store @@ -281,9 +281,9 @@ local.get $0 call $std/object-literal/bar i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 2 i32.store @@ -300,9 +300,9 @@ unreachable end i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 3 i32.store diff --git a/tests/compiler/std/object-literal.untouched.wat b/tests/compiler/std/object-literal.untouched.wat index 89c4fa6f10..ee2ec8a229 100644 --- a/tests/compiler/std/object-literal.untouched.wat +++ b/tests/compiler/std/object-literal.untouched.wat @@ -27,7 +27,7 @@ (func $~lib/string/String~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) ) - (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -123,10 +123,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -162,7 +162,7 @@ (func $~lib/collector/dummy/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -171,8 +171,8 @@ if i32.const 0 i32.const 64 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -188,8 +188,8 @@ if i32.const 0 i32.const 64 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -382,9 +382,9 @@ global.set $~lib/allocator/arena/offset block (result i32) i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 local.get $0 i32.const 1 @@ -397,9 +397,9 @@ call $std/object-literal/bar block (result i32) i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $1 local.get $1 i32.const 2 @@ -409,9 +409,9 @@ call $std/object-literal/bar2 block (result i32) i32.const 4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $2 local.get $2 i32.const 3 diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 2fa1f40528..d4406de5e5 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -145,7 +145,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 call $~lib/allocator/arena/__mem_allocate @@ -159,7 +159,7 @@ i32.const 8 i32.add ) - (func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 112 @@ -167,8 +167,8 @@ if i32.const 0 i32.const 16 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -182,8 +182,8 @@ if i32.const 0 i32.const 16 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -194,9 +194,9 @@ ) (func $std/operator-overloading/Tester#constructor (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $2 local.get $0 i32.store @@ -1239,9 +1239,9 @@ ) (func $std/operator-overloading/TesterInlineStatic#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $2 local.get $0 i32.store @@ -1252,9 +1252,9 @@ ) (func $std/operator-overloading/TesterInlineInstance#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 4 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $2 local.get $0 i32.store diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 9b9d0a420a..3ef068ef59 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -88,7 +88,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -184,10 +184,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -200,7 +200,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -209,8 +209,8 @@ if i32.const 0 i32.const 16 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -226,8 +226,8 @@ if i32.const 0 i32.const 16 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -241,9 +241,9 @@ i32.eqz if i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -1814,9 +1814,9 @@ i32.eqz if i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -1832,9 +1832,9 @@ i32.eqz if i32.const 8 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 4 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 49bc79faa3..0fcb6ca00d 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -1169,7 +1169,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -2486,7 +2486,7 @@ end end ) - (func $~lib/runtime/reallocate (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2563,8 +2563,8 @@ if i32.const 0 i32.const 232 - i32.const 117 - i32.const 8 + i32.const 107 + i32.const 10 call $~lib/env/abort unreachable end @@ -2593,15 +2593,15 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/discard (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 264 i32.le_u if i32.const 0 i32.const 232 - i32.const 177 - i32.const 4 + i32.const 132 + i32.const 6 call $~lib/env/abort unreachable end @@ -2615,15 +2615,15 @@ if i32.const 0 i32.const 232 - i32.const 179 - i32.const 4 + i32.const 134 + i32.const 6 call $~lib/env/abort unreachable end local.get $0 call $~lib/allocator/tlsf/__mem_free ) - (func $~lib/runtime/register (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.register (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.const 264 @@ -2631,8 +2631,8 @@ if i32.const 0 i32.const 232 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -2646,8 +2646,8 @@ if i32.const 0 i32.const 232 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -2697,7 +2697,7 @@ else i32.const 0 i32.const 24 - i32.const 36 + i32.const 37 i32.const 2 call $~lib/env/abort unreachable @@ -2795,7 +2795,7 @@ f64.const 0 call $~lib/env/trace i32.const 1 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate global.set $std/runtime/ref1 global.get $std/runtime/ref1 i32.const 16 @@ -2808,7 +2808,7 @@ if i32.const 0 i32.const 24 - i32.const 51 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -2820,21 +2820,21 @@ if i32.const 0 i32.const 24 - i32.const 52 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref1 local.tee $0 - global.get $std/runtime/barrier1 - call $~lib/runtime/reallocate local.get $0 + global.get $std/runtime/barrier1 + call $~lib/runtime/runtime.reallocate i32.ne if i32.const 0 i32.const 24 - i32.const 53 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -2846,14 +2846,14 @@ if i32.const 0 i32.const 24 - i32.const 54 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref1 global.get $std/runtime/barrier2 - call $~lib/runtime/reallocate + call $~lib/runtime/runtime.reallocate global.set $std/runtime/ref2 global.get $std/runtime/ref1 global.get $std/runtime/ref2 @@ -2861,7 +2861,7 @@ if i32.const 0 i32.const 24 - i32.const 56 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -2877,15 +2877,15 @@ if i32.const 0 i32.const 24 - i32.const 58 + i32.const 59 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref2 - call $~lib/runtime/discard + call $~lib/runtime/runtime.discard global.get $std/runtime/barrier2 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate global.set $std/runtime/ref3 global.get $std/runtime/ref1 global.get $std/runtime/ref3 @@ -2893,23 +2893,23 @@ if i32.const 0 i32.const 24 - i32.const 61 + i32.const 62 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/barrier1 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate global.set $std/runtime/ref4 global.get $std/runtime/ref4 - call $~lib/runtime/register + call $~lib/runtime/runtime.register global.get $std/runtime/register_ref global.get $std/runtime/ref4 i32.ne if i32.const 0 i32.const 24 - i32.const 65 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable @@ -2925,7 +2925,7 @@ if i32.const 0 i32.const 24 - i32.const 67 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable @@ -2937,13 +2937,13 @@ if i32.const 0 i32.const 24 - i32.const 68 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable end i32.const 10 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate global.set $std/runtime/ref5 global.get $std/runtime/ref5 i32.const 16 @@ -2954,7 +2954,7 @@ if i32.const 0 i32.const 24 - i32.const 71 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable @@ -2970,7 +2970,7 @@ if i32.const 0 i32.const 24 - i32.const 72 + i32.const 73 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.ts b/tests/compiler/std/runtime.ts index b83875c7cd..48bfdffc06 100644 --- a/tests/compiler/std/runtime.ts +++ b/tests/compiler/std/runtime.ts @@ -1,5 +1,6 @@ import "allocator/tlsf"; -import { classId, ADJUSTOBLOCK, ALLOCATE, REALLOCATE, REGISTER, DISCARD, HEADER, HEADER_SIZE, HEADER_MAGIC } from "runtime"; +// import { classId, ADJUSTOBLOCK, ALLOCATE, REALLOCATE, REGISTER, DISCARD, HEADER, HEADER_SIZE, HEADER_MAGIC } from "runtime"; +import { runtime, HEADER, HEADER_SIZE, HEADER_MAGIC, classId } from "runtime"; @start export function main(): void {} @@ -31,42 +32,42 @@ function isPowerOf2(x: i32): bool { return x != 0 && (x & (x - 1)) == 0; } -assert(ADJUSTOBLOCK(0) > 0); +assert(runtime.adjust(0) > 0); for (let i = 0; i < 9000; ++i) { - assert(isPowerOf2(ADJUSTOBLOCK(i))); + assert(isPowerOf2(runtime.adjust(i))); } -var barrier1 = ADJUSTOBLOCK(0); +var barrier1 = runtime.adjust(0); var barrier2 = barrier1 + 1; -while (ADJUSTOBLOCK(barrier2 + 1) == ADJUSTOBLOCK(barrier2)) ++barrier2; +while (runtime.adjust(barrier2 + 1) == runtime.adjust(barrier2)) ++barrier2; var barrier3 = barrier2 + 1; -while (ADJUSTOBLOCK(barrier3 + 1) == ADJUSTOBLOCK(barrier3)) ++barrier3; +while (runtime.adjust(barrier3 + 1) == runtime.adjust(barrier3)) ++barrier3; trace("barrier1", 1, barrier1); trace("barrier2", 1, barrier2); trace("barrier3", 1, barrier3); -var ref1 = ALLOCATE(1); +var ref1 = runtime.allocate(1); var header1 = changetype
(ref1 - HEADER_SIZE); assert(header1.classId == HEADER_MAGIC); assert(header1.payloadSize == 1); -assert(ref1 == REALLOCATE(ref1, barrier1)); // same segment +assert(ref1 == runtime.reallocate(ref1, barrier1)); // same segment assert(header1.payloadSize == barrier1); -var ref2 = REALLOCATE(ref1, barrier2); +var ref2 = runtime.reallocate(ref1, barrier2); assert(ref1 != ref2); // moves var header2 = changetype
(ref2 - HEADER_SIZE); assert(header2.payloadSize == barrier2); -DISCARD(ref2); -var ref3 = ALLOCATE(barrier2); +runtime.discard(ref2); +var ref3 = runtime.allocate(barrier2); assert(ref1 == ref3); // reuses space of ref1 (free'd in realloc), ref2 (explicitly free'd) -var ref4 = ALLOCATE(barrier1); -REGISTER(ref4); // should call __gc_register +var ref4 = runtime.allocate(barrier1); +runtime.register(ref4, classId()); // should call __gc_register assert(register_ref == ref4); var header4 = changetype
(register_ref - HEADER_SIZE); assert(header4.classId == classId()); assert(header4.payloadSize == barrier1); -var ref5 = ALLOCATE(10); +var ref5 = runtime.allocate(10); assert(changetype(ref5).byteLength == 10); assert(changetype(ref5).length == 5); diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 0bf3b556e7..abc4c22b2e 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -67,7 +67,7 @@ (func $~lib/string/String~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) ) - (func $~lib/runtime/ADJUSTOBLOCK (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -1462,10 +1462,10 @@ call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/runtime/allocate (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -3224,7 +3224,7 @@ local.get $0 global.set $std/runtime/register_ref ) - (func $~lib/runtime/reallocate (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3242,10 +3242,10 @@ i32.lt_u if local.get $1 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust local.set $4 local.get $3 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust i32.const 0 local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3295,8 +3295,8 @@ if i32.const 0 i32.const 232 - i32.const 117 - i32.const 8 + i32.const 107 + i32.const 10 call $~lib/env/abort unreachable end @@ -3328,7 +3328,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/discard (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3337,8 +3337,8 @@ if i32.const 0 i32.const 232 - i32.const 177 - i32.const 4 + i32.const 132 + i32.const 6 call $~lib/env/abort unreachable end @@ -3354,15 +3354,15 @@ if i32.const 0 i32.const 232 - i32.const 179 - i32.const 4 + i32.const 134 + i32.const 6 call $~lib/env/abort unreachable end local.get $1 call $~lib/memory/memory.free ) - (func $~lib/runtime/register (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3371,8 +3371,8 @@ if i32.const 0 i32.const 232 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -3388,8 +3388,8 @@ if i32.const 0 i32.const 232 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -3416,7 +3416,6 @@ ) (func $start:std/runtime (; 38 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) i32.const 1 i32.const 2 i32.ne @@ -3424,20 +3423,20 @@ if i32.const 0 i32.const 24 - i32.const 28 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable end i32.const 0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust i32.const 0 i32.gt_u i32.eqz if i32.const 0 i32.const 24 - i32.const 34 + i32.const 35 i32.const 0 call $~lib/env/abort unreachable @@ -3452,13 +3451,13 @@ i32.eqz br_if $break|0 local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $std/runtime/isPowerOf2 i32.eqz if i32.const 0 i32.const 24 - i32.const 36 + i32.const 37 i32.const 2 call $~lib/env/abort unreachable @@ -3473,7 +3472,7 @@ unreachable end i32.const 0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust global.set $std/runtime/barrier1 global.get $std/runtime/barrier1 i32.const 1 @@ -3484,9 +3483,9 @@ global.get $std/runtime/barrier2 i32.const 1 i32.add - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust global.get $std/runtime/barrier2 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust i32.eq if global.get $std/runtime/barrier2 @@ -3506,9 +3505,9 @@ global.get $std/runtime/barrier3 i32.const 1 i32.add - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust global.get $std/runtime/barrier3 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust i32.eq if global.get $std/runtime/barrier3 @@ -3546,12 +3545,8 @@ f64.const 0 f64.const 0 call $~lib/env/trace - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - i32.const 1 - local.set $0 - local.get $0 - call $~lib/runtime/allocate - end + i32.const 1 + call $~lib/runtime/runtime.allocate global.set $std/runtime/ref1 global.get $std/runtime/ref1 global.get $~lib/runtime/HEADER_SIZE @@ -3565,7 +3560,7 @@ if i32.const 0 i32.const 24 - i32.const 51 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -3578,27 +3573,21 @@ if i32.const 0 i32.const 24 - i32.const 52 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref1 - block $~lib/runtime/REALLOCATE|inlined.0 (result i32) - global.get $std/runtime/ref1 - local.set $1 - global.get $std/runtime/barrier1 - local.set $0 - local.get $1 - local.get $0 - call $~lib/runtime/reallocate - end + global.get $std/runtime/ref1 + global.get $std/runtime/barrier1 + call $~lib/runtime/runtime.reallocate i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 53 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -3611,20 +3600,14 @@ if i32.const 0 i32.const 24 - i32.const 54 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/runtime/REALLOCATE|inlined.1 (result i32) - global.get $std/runtime/ref1 - local.set $1 - global.get $std/runtime/barrier2 - local.set $0 - local.get $1 - local.get $0 - call $~lib/runtime/reallocate - end + global.get $std/runtime/ref1 + global.get $std/runtime/barrier2 + call $~lib/runtime/runtime.reallocate global.set $std/runtime/ref2 global.get $std/runtime/ref1 global.get $std/runtime/ref2 @@ -3633,7 +3616,7 @@ if i32.const 0 i32.const 24 - i32.const 56 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -3650,23 +3633,15 @@ if i32.const 0 i32.const 24 - i32.const 58 + i32.const 59 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/runtime/DISCARD|inlined.0 - global.get $std/runtime/ref2 - local.set $0 - local.get $0 - call $~lib/runtime/discard - end - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - global.get $std/runtime/barrier2 - local.set $0 - local.get $0 - call $~lib/runtime/allocate - end + global.get $std/runtime/ref2 + call $~lib/runtime/runtime.discard + global.get $std/runtime/barrier2 + call $~lib/runtime/runtime.allocate global.set $std/runtime/ref3 global.get $std/runtime/ref1 global.get $std/runtime/ref3 @@ -3675,25 +3650,17 @@ if i32.const 0 i32.const 24 - i32.const 61 + i32.const 62 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) - global.get $std/runtime/barrier1 - local.set $0 - local.get $0 - call $~lib/runtime/allocate - end + global.get $std/runtime/barrier1 + call $~lib/runtime/runtime.allocate global.set $std/runtime/ref4 - block $~lib/runtime/REGISTER|inlined.0 (result i32) - global.get $std/runtime/ref4 - local.set $0 - local.get $0 - i32.const 1 - call $~lib/runtime/register - end + global.get $std/runtime/ref4 + i32.const 1 + call $~lib/runtime/runtime.register drop global.get $std/runtime/register_ref global.get $std/runtime/ref4 @@ -3702,7 +3669,7 @@ if i32.const 0 i32.const 24 - i32.const 65 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable @@ -3719,7 +3686,7 @@ if i32.const 0 i32.const 24 - i32.const 67 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable @@ -3732,17 +3699,13 @@ if i32.const 0 i32.const 24 - i32.const 68 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/runtime/ALLOCATE|inlined.3 (result i32) - i32.const 10 - local.set $0 - local.get $0 - call $~lib/runtime/allocate - end + i32.const 10 + call $~lib/runtime/runtime.allocate global.set $std/runtime/ref5 global.get $std/runtime/ref5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength @@ -3752,7 +3715,7 @@ if i32.const 0 i32.const 24 - i32.const 71 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable @@ -3765,7 +3728,7 @@ if i32.const 0 i32.const 24 - i32.const 72 + i32.const 73 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 4b37e13427..2932bcfbc5 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -97,7 +97,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -143,7 +143,7 @@ (func $~lib/string/String~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 148 @@ -151,8 +151,8 @@ if i32.const 0 i32.const 24 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -166,8 +166,8 @@ if i32.const 0 i32.const 24 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -395,19 +395,19 @@ if i32.const 0 i32.const 72 - i32.const 25 - i32.const 43 + i32.const 53 + i32.const 51 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $1 local.get $0 call $~lib/memory/memory.fill local.get $1 i32.const 4 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/set/Set#clear (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) @@ -447,9 +447,9 @@ (func $~lib/set/Set#constructor (; 9 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -1046,9 +1046,9 @@ (func $~lib/set/Set#constructor (; 16 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 5 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -1594,9 +1594,9 @@ (func $~lib/set/Set#constructor (; 22 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 7 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -2229,9 +2229,9 @@ (func $~lib/set/Set#constructor (; 29 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 9 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -2813,9 +2813,9 @@ (func $~lib/set/Set#constructor (; 35 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 11 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -3415,9 +3415,9 @@ (func $~lib/set/Set#constructor (; 43 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 13 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -3723,9 +3723,9 @@ (func $~lib/set/Set#constructor (; 46 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 15 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -4361,9 +4361,9 @@ (func $~lib/set/Set#constructor (; 54 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 17 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -4634,9 +4634,9 @@ (func $~lib/set/Set#constructor (; 56 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 19 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -5210,9 +5210,9 @@ (func $~lib/set/Set#constructor (; 63 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 21 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 8b0772f39c..ff6f1e6b79 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -30,14 +30,14 @@ (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/memory/HEAP_BASE i32 (i32.const 148)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -133,10 +133,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -178,7 +178,7 @@ (func $~lib/collector/dummy/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -187,8 +187,8 @@ if i32.const 0 i32.const 24 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -204,8 +204,8 @@ if i32.const 0 i32.const 24 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -478,36 +478,27 @@ ) (func $~lib/arraybuffer/ArrayBuffer#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH i32.gt_u if i32.const 0 i32.const 72 - i32.const 25 - i32.const 43 + i32.const 53 + i32.const 51 call $~lib/env/abort unreachable end - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - local.get $1 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $3 - local.get $3 + local.get $1 + call $~lib/runtime/runtime.allocate + local.set $2 + local.get $2 i32.const 0 local.get $1 call $~lib/memory/memory.fill - block $~lib/runtime/REGISTER<~lib/arraybuffer/ArrayBuffer>|inlined.0 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.const 4 - call $~lib/runtime/register - end + local.get $2 + i32.const 4 + call $~lib/runtime/runtime.register ) (func $~lib/collector/dummy/__ref_link (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop @@ -590,9 +581,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -1427,9 +1418,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 5 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -2249,9 +2240,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 7 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -3101,9 +3092,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 9 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -3923,9 +3914,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 11 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -4779,9 +4770,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 13 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -5593,9 +5584,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 15 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -6498,9 +6489,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 17 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -7315,9 +7306,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 19 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -8136,9 +8127,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 21 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 165ecd17e4..11bd2e0f3c 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -1366,7 +1366,7 @@ end end ) - (func $~lib/runtime/reallocate (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1437,8 +1437,8 @@ if i32.const 0 i32.const 280 - i32.const 117 - i32.const 8 + i32.const 107 + i32.const 10 call $~lib/env/abort unreachable end @@ -1481,7 +1481,7 @@ i32.const 0 i32.const 240 i32.const 13 - i32.const 64 + i32.const 72 call $~lib/env/abort unreachable end @@ -1492,7 +1492,7 @@ local.get $1 i32.shl local.tee $3 - call $~lib/runtime/reallocate + call $~lib/runtime/runtime.reallocate local.set $1 local.get $1 local.get $2 diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 869e4f88f1..5752f5a7f2 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -31,7 +31,7 @@ (global $std/static-array/f i32 (i32.const 120)) (global $std/static-array/F i32 (i32.const 168)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) @@ -71,7 +71,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/runtime/ADJUSTOBLOCK (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -1863,7 +1863,7 @@ local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/reallocate (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1881,10 +1881,10 @@ i32.lt_u if local.get $1 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust local.set $4 local.get $3 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust i32.const 0 local.get $0 global.get $~lib/memory/HEAP_BASE @@ -1928,8 +1928,8 @@ if i32.const 0 i32.const 280 - i32.const 117 - i32.const 8 + i32.const 107 + i32.const 10 call $~lib/env/abort unreachable end @@ -1964,7 +1964,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1973,7 +1972,7 @@ i32.gt_u if local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH local.get $2 i32.shr_u i32.gt_u @@ -1981,7 +1980,7 @@ i32.const 0 i32.const 240 i32.const 13 - i32.const 64 + i32.const 72 call $~lib/env/abort unreachable end @@ -1992,15 +1991,9 @@ local.get $2 i32.shl local.set $4 - block $~lib/runtime/REALLOCATE|inlined.0 (result i32) - local.get $3 - local.set $6 - local.get $4 - local.set $5 - local.get $6 - local.get $5 - call $~lib/runtime/reallocate - end + local.get $3 + local.get $4 + call $~lib/runtime/runtime.reallocate local.set $5 local.get $5 local.get $3 diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index 71f47c898e..b34cfd00e9 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -394,7 +394,7 @@ i32.store8 local.get $5 ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -1456,7 +1456,7 @@ end end ) - (func $~lib/runtime/register (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 228 @@ -1464,8 +1464,8 @@ if i32.const 0 i32.const 136 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -1479,8 +1479,8 @@ if i32.const 0 i32.const 136 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -1551,7 +1551,7 @@ if i32.const 0 i32.const 96 - i32.const 447 + i32.const 448 i32.const 8 call $~lib/env/abort unreachable @@ -1598,7 +1598,7 @@ if i32.const 0 i32.const 96 - i32.const 451 + i32.const 452 i32.const 8 call $~lib/env/abort unreachable @@ -1677,7 +1677,7 @@ if i32.const 0 i32.const 96 - i32.const 463 + i32.const 464 i32.const 8 call $~lib/env/abort unreachable @@ -1732,19 +1732,19 @@ if i32.const 0 i32.const 96 - i32.const 472 + i32.const 473 i32.const 4 call $~lib/env/abort unreachable end local.get $5 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $0 local.get $6 local.get $5 call $~lib/memory/memory.copy local.get $0 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/util/string/compareImpl (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index 36d69018c9..8131ede658 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -453,7 +453,7 @@ i32.store8 local.get $1 ) - (func $~lib/runtime/ADJUSTOBLOCK (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -465,10 +465,10 @@ i32.sub i32.shl ) - (func $~lib/runtime/allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -1920,7 +1920,7 @@ local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/register (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -1929,8 +1929,8 @@ if i32.const 0 i32.const 136 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -1946,8 +1946,8 @@ if i32.const 0 i32.const 136 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -2033,7 +2033,7 @@ if i32.const 0 i32.const 96 - i32.const 447 + i32.const 448 i32.const 8 call $~lib/env/abort unreachable @@ -2087,7 +2087,7 @@ if i32.const 0 i32.const 96 - i32.const 451 + i32.const 452 i32.const 8 call $~lib/env/abort unreachable @@ -2182,7 +2182,7 @@ if i32.const 0 i32.const 96 - i32.const 463 + i32.const 464 i32.const 8 call $~lib/env/abort unreachable @@ -2245,17 +2245,13 @@ if i32.const 0 i32.const 96 - i32.const 472 + i32.const 473 i32.const 4 call $~lib/env/abort unreachable end - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - local.get $4 - local.set $5 - local.get $5 - call $~lib/runtime/allocate - end + local.get $4 + call $~lib/runtime/runtime.allocate local.set $7 local.get $7 local.get $3 @@ -2263,13 +2259,9 @@ call $~lib/memory/memory.copy local.get $3 call $~lib/memory/memory.free - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.0 (result i32) - local.get $7 - local.set $5 - local.get $5 - i32.const 1 - call $~lib/runtime/register - end + local.get $7 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/util/string/compareImpl (; 14 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 9f320c1dad..3d95e96a62 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -413,7 +413,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -440,7 +440,7 @@ i32.const 16 i32.add ) - (func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 6736 @@ -448,8 +448,8 @@ if i32.const 0 i32.const 120 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -463,8 +463,8 @@ if i32.const 0 i32.const 120 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -476,13 +476,13 @@ (func $~lib/string/String.fromCharCode (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 2 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $1 local.get $0 i32.store16 local.get $1 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/util/string/compareImpl (; 6 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) @@ -579,7 +579,7 @@ if i32.const 0 i32.const 216 - i32.const 24 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -592,7 +592,7 @@ i32.add i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.set $2 local.get $1 if @@ -623,7 +623,7 @@ end local.get $2 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/string/String#startsWith (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -634,7 +634,7 @@ if i32.const 0 i32.const 216 - i32.const 164 + i32.const 165 i32.const 4 call $~lib/env/abort unreachable @@ -682,7 +682,7 @@ if i32.const 0 i32.const 216 - i32.const 77 + i32.const 78 i32.const 4 call $~lib/env/abort unreachable @@ -730,7 +730,7 @@ if i32.const 0 i32.const 216 - i32.const 133 + i32.const 134 i32.const 4 call $~lib/env/abort unreachable @@ -1881,7 +1881,7 @@ if i32.const 0 i32.const 216 - i32.const 281 + i32.const 282 i32.const 4 call $~lib/env/abort unreachable @@ -1921,7 +1921,7 @@ return end local.get $4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.set $1 local.get $4 local.get $5 @@ -1965,7 +1965,7 @@ call $~lib/memory/memory.copy local.get $1 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/string/String#padEnd (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -1976,7 +1976,7 @@ if i32.const 0 i32.const 216 - i32.const 302 + i32.const 303 i32.const 4 call $~lib/env/abort unreachable @@ -2016,7 +2016,7 @@ return end local.get $5 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $1 local.get $0 local.get $4 @@ -2062,7 +2062,7 @@ end local.get $1 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/string/String#lastIndexOf (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -2072,7 +2072,7 @@ if i32.const 0 i32.const 216 - i32.const 149 + i32.const 150 i32.const 4 call $~lib/env/abort unreachable @@ -2494,7 +2494,7 @@ if i32.const 0 i32.const 216 - i32.const 569 + i32.const 570 i32.const 10 call $~lib/env/abort unreachable @@ -2587,7 +2587,7 @@ return end local.get $2 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $2 local.get $0 local.get $1 @@ -2600,7 +2600,7 @@ call $~lib/memory/memory.copy local.get $2 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/string/String.__concat (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -2766,7 +2766,7 @@ if i32.const 0 i32.const 216 - i32.const 323 + i32.const 324 i32.const 4 call $~lib/env/abort unreachable @@ -2796,7 +2796,7 @@ if i32.const 0 i32.const 216 - i32.const 328 + i32.const 329 i32.const 6 call $~lib/env/abort unreachable @@ -2826,7 +2826,7 @@ i32.mul i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $2 local.get $0 local.get $3 @@ -2836,7 +2836,7 @@ call $~lib/memory/memory.repeat local.get $2 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/string/String#slice (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -2903,7 +2903,7 @@ i32.const 1 i32.shl local.tee $2 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $3 local.get $1 i32.const 1 @@ -2914,7 +2914,7 @@ call $~lib/memory/memory.copy local.get $3 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/array/Array<~lib/string/String>~iterate (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) @@ -2953,23 +2953,22 @@ end end ) - (func $~lib/runtime/makeArray (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/runtime/runtime.makeArray (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) i32.const 16 - call $~lib/runtime/allocate - i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.allocate + local.get $1 + call $~lib/runtime/runtime.register local.set $1 local.get $0 i32.const 2 i32.shl local.tee $2 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 4 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $3 local.set $4 local.get $1 @@ -3200,7 +3199,7 @@ end end ) - (func $~lib/runtime/reallocate (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3277,8 +3276,8 @@ if i32.const 0 i32.const 120 - i32.const 117 - i32.const 8 + i32.const 107 + i32.const 10 call $~lib/env/abort unreachable end @@ -3319,7 +3318,7 @@ i32.const 0 i32.const 1912 i32.const 13 - i32.const 64 + i32.const 72 call $~lib/env/abort unreachable end @@ -3330,7 +3329,7 @@ i32.const 2 i32.shl local.tee $3 - call $~lib/runtime/reallocate + call $~lib/runtime/runtime.reallocate local.set $1 local.get $1 local.get $2 @@ -3395,230 +3394,242 @@ if i32.const 0 i32.const 216 - i32.const 350 + i32.const 351 i32.const 4 call $~lib/env/abort unreachable end - block $folding-inner0 - local.get $2 - i32.eqz - br_if $folding-inner0 + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 2 + call $~lib/runtime/runtime.makeArray + return + end + local.get $1 + i32.eqz + if + i32.const 1 + i32.const 2 + call $~lib/runtime/runtime.makeArray + local.tee $1 + i32.load offset=4 + local.get $0 + i32.store local.get $1 + return + end + local.get $0 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.set $3 + i32.const 2147483647 + local.get $2 + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $5 + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.tee $8 + if + local.get $3 i32.eqz if i32.const 1 - call $~lib/runtime/makeArray - local.tee $1 + i32.const 2 + call $~lib/runtime/runtime.makeArray + local.tee $0 i32.load offset=4 - local.get $0 + i32.const 416 i32.store - local.get $1 + local.get $0 return end - local.get $0 - i32.const 16 - i32.sub - i32.load offset=4 - i32.const 1 - i32.shr_u - local.set $3 - i32.const 2147483647 - local.get $2 - local.get $2 - i32.const 0 + else + local.get $3 + i32.eqz + if + i32.const 0 + i32.const 1 + call $~lib/runtime/runtime.makeArray + return + end + local.get $3 + local.get $5 + local.get $3 + local.get $5 i32.lt_s select - local.set $5 - local.get $1 - i32.const 16 - i32.sub + local.tee $4 + i32.const 2 + call $~lib/runtime/runtime.makeArray + local.tee $3 i32.load offset=4 - i32.const 1 - i32.shr_u - local.tee $8 - if - local.get $3 - i32.eqz + local.set $5 + i32.const 0 + local.set $1 + loop $repeat|0 + local.get $1 + local.get $4 + i32.lt_s if + i32.const 2 + call $~lib/runtime/runtime.allocate + local.tee $2 + local.get $1 i32.const 1 - call $~lib/runtime/makeArray - local.tee $0 - i32.load offset=4 - i32.const 416 - i32.store + i32.shl local.get $0 - return - end - else - local.get $3 - i32.eqz - br_if $folding-inner0 - local.get $3 - local.get $5 - local.get $3 - local.get $5 - i32.lt_s - select - local.tee $2 - call $~lib/runtime/makeArray - local.tee $4 - i32.load offset=4 - local.set $3 - i32.const 0 - local.set $1 - loop $repeat|0 + i32.add + i32.load16_u + i32.store16 local.get $1 + i32.const 2 + i32.shl + local.get $5 + i32.add local.get $2 - i32.lt_s - if - i32.const 2 - call $~lib/runtime/allocate - i32.const 1 - call $~lib/runtime/register - local.tee $5 - local.get $1 - i32.const 1 - i32.shl - local.get $0 - i32.add - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.shl - local.get $3 - i32.add - local.get $5 - i32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $repeat|0 - end + i32.store + local.get $2 + i32.const 1 + call $~lib/runtime/runtime.register + drop + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 end - local.get $4 - return end - i32.const 0 - call $~lib/runtime/makeArray - local.set $2 - loop $continue|1 - local.get $1 - i32.eqz - if - unreachable - end - local.get $0 - local.get $1 + local.get $3 + return + end + i32.const 0 + i32.const 2 + call $~lib/runtime/runtime.makeArray + local.set $2 + loop $continue|1 + local.get $1 + i32.eqz + if + unreachable + end + local.get $0 + local.get $1 + local.get $4 + call $~lib/string/String#indexOf + local.tee $7 + i32.const -1 + i32.ne + if + local.get $7 local.get $4 - call $~lib/string/String#indexOf - local.tee $7 - i32.const -1 - i32.ne + i32.sub + local.tee $6 + i32.const 0 + i32.gt_s if - local.get $7 - local.get $4 - i32.sub + local.get $6 + i32.const 1 + i32.shl local.tee $6 - i32.const 0 - i32.gt_s - if - local.get $6 - i32.const 1 - i32.shl - local.tee $6 - call $~lib/runtime/allocate - local.tee $9 - local.get $4 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $6 - call $~lib/memory/memory.copy - local.get $2 - local.get $9 - i32.const 1 - call $~lib/runtime/register - call $~lib/array/Array<~lib/string/String>#push - else - local.get $2 - i32.const 416 - call $~lib/array/Array<~lib/string/String>#push - end - local.get $5 - local.get $10 + call $~lib/runtime/runtime.allocate + local.tee $9 + local.get $4 i32.const 1 + i32.shl + local.get $0 i32.add - local.tee $10 - i32.eq - if - local.get $2 - return - end - local.get $7 - local.get $8 - i32.add - local.set $4 - br $continue|1 + local.get $6 + call $~lib/memory/memory.copy + local.get $2 + local.get $9 + i32.const 1 + call $~lib/runtime/runtime.register + call $~lib/array/Array<~lib/string/String>#push + else + local.get $2 + i32.const 416 + call $~lib/array/Array<~lib/string/String>#push end - end - local.get $4 - i32.eqz - if + local.get $5 + local.get $10 i32.const 1 - call $~lib/runtime/makeArray - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.load - local.get $0 - i32.ne + i32.add + local.tee $10 + i32.eq if local.get $2 - local.get $0 - i32.store + return end - local.get $1 - return + local.get $7 + local.get $8 + i32.add + local.set $4 + br $continue|1 end - local.get $3 - local.get $4 - i32.sub + end + local.get $4 + i32.eqz + if + i32.const 1 + i32.const 2 + call $~lib/runtime/runtime.makeArray local.tee $1 - i32.const 0 - i32.gt_s + i32.load offset=4 + local.tee $2 + i32.load + local.get $0 + i32.ne if - local.get $1 - i32.const 1 - i32.shl - local.tee $1 - call $~lib/runtime/allocate - local.tee $3 - local.get $4 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $1 - call $~lib/memory/memory.copy local.get $2 - local.get $3 - i32.const 1 - call $~lib/runtime/register - call $~lib/array/Array<~lib/string/String>#push - else - local.get $2 - i32.const 416 - call $~lib/array/Array<~lib/string/String>#push + local.get $0 + i32.store end - local.get $2 + local.get $1 return end + local.get $3 + local.get $4 + i32.sub + local.tee $1 i32.const 0 - call $~lib/runtime/makeArray + i32.gt_s + if + local.get $1 + i32.const 1 + i32.shl + local.tee $1 + call $~lib/runtime/runtime.allocate + local.tee $3 + local.get $4 + i32.const 1 + i32.shl + local.get $0 + i32.add + local.get $1 + call $~lib/memory/memory.copy + local.get $2 + local.get $3 + i32.const 1 + call $~lib/runtime/runtime.register + call $~lib/array/Array<~lib/string/String>#push + else + local.get $2 + i32.const 416 + call $~lib/array/Array<~lib/string/String>#push + end + local.get $2 ) (func $~lib/array/Array<~lib/string/String>#__get (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -3854,7 +3865,7 @@ local.tee $3 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $2 local.get $0 local.get $3 @@ -3867,7 +3878,7 @@ end local.get $2 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/util/number/utoa32 (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -3883,14 +3894,14 @@ local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $2 local.get $0 local.get $1 call $~lib/util/number/utoa32_lut local.get $2 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/util/number/decimalCount64 (; 42 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 @@ -4064,7 +4075,7 @@ local.tee $3 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $2 local.get $1 local.get $3 @@ -4075,7 +4086,7 @@ local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $2 local.get $0 local.get $1 @@ -4083,7 +4094,7 @@ end local.get $2 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/util/number/itoa64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) @@ -4121,7 +4132,7 @@ local.tee $4 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $3 local.get $2 local.get $4 @@ -4134,7 +4145,7 @@ local.tee $2 i32.const 1 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $3 local.get $0 local.get $2 @@ -4148,7 +4159,7 @@ end local.get $3 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/util/number/genDigits (; 46 ;) (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) @@ -5121,7 +5132,7 @@ if i32.const 0 i32.const 216 - i32.const 189 + i32.const 190 i32.const 4 call $~lib/env/abort unreachable @@ -5197,7 +5208,7 @@ return end local.get $3 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $1 local.get $0 local.get $2 @@ -5206,17 +5217,17 @@ call $~lib/memory/memory.copy local.get $1 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) - (func $~lib/runtime/discard (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 6736 i32.le_u if i32.const 0 i32.const 120 - i32.const 177 - i32.const 4 + i32.const 132 + i32.const 6 call $~lib/env/abort unreachable end @@ -5229,8 +5240,8 @@ if i32.const 0 i32.const 120 - i32.const 179 - i32.const 4 + i32.const 134 + i32.const 6 call $~lib/env/abort unreachable end @@ -5267,7 +5278,7 @@ return end i32.const 56 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $2 local.get $0 call $~lib/util/number/dtoa_core @@ -5277,7 +5288,7 @@ call $~lib/string/String#substring local.set $1 local.get $2 - call $~lib/runtime/discard + call $~lib/runtime/runtime.discard local.get $1 ) (func $start:std/string (; 52 ;) (type $FUNCSIG$v) diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 61eb3f6d7b..1ad6323a73 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -191,7 +191,7 @@ (global $std/string/b (mut i32) (i32.const 0)) (global $std/string/sa (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) (global $~lib/builtins/u64.MAX_VALUE i64 (i64.const -1)) @@ -239,7 +239,7 @@ i32.add i32.load16_u ) - (func $~lib/runtime/ADJUSTOBLOCK (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -335,10 +335,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -360,7 +360,7 @@ (func $~lib/collector/dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -369,8 +369,8 @@ if i32.const 0 i32.const 120 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -386,8 +386,8 @@ if i32.const 0 i32.const 120 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -400,24 +400,15 @@ ) (func $~lib/string/String.fromCharCode (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - i32.const 2 - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 2 + call $~lib/runtime/runtime.allocate + local.set $1 + local.get $1 local.get $0 i32.store16 - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.0 (result i32) - local.get $2 - local.set $1 - local.get $1 - i32.const 1 - call $~lib/runtime/register - end + local.get $1 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/util/string/compareImpl (; 11 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -528,7 +519,7 @@ if i32.const 0 i32.const 216 - i32.const 24 + i32.const 25 i32.const 4 call $~lib/env/abort unreachable @@ -537,21 +528,17 @@ i32.const 65535 i32.gt_s local.set $1 - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - local.get $1 - i32.const 1 - i32.add - i32.const 1 - i32.shl - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $3 + local.get $1 + i32.const 1 + i32.add + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + local.set $2 local.get $1 i32.eqz if - local.get $3 + local.get $2 local.get $0 i32.store16 else @@ -564,28 +551,24 @@ i32.shr_u i32.const 55296 i32.add - local.set $2 + local.set $3 local.get $0 i32.const 1023 i32.and i32.const 56320 i32.add local.set $4 - local.get $3 local.get $2 + local.get $3 i32.const 16 i32.shl local.get $4 i32.or i32.store end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.1 (result i32) - local.get $3 - local.set $4 - local.get $4 - i32.const 1 - call $~lib/runtime/register - end + local.get $2 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/string/String#startsWith (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -601,7 +584,7 @@ if i32.const 0 i32.const 216 - i32.const 164 + i32.const 165 i32.const 4 call $~lib/env/abort unreachable @@ -667,7 +650,7 @@ if i32.const 0 i32.const 216 - i32.const 77 + i32.const 78 i32.const 4 call $~lib/env/abort unreachable @@ -731,7 +714,7 @@ if i32.const 0 i32.const 216 - i32.const 133 + i32.const 134 i32.const 4 call $~lib/env/abort unreachable @@ -2292,7 +2275,7 @@ if i32.const 0 i32.const 216 - i32.const 281 + i32.const 282 i32.const 4 call $~lib/env/abort unreachable @@ -2329,12 +2312,8 @@ local.get $3 i32.sub local.set $7 - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) - local.get $4 - local.set $6 - local.get $6 - call $~lib/runtime/allocate - end + local.get $4 + call $~lib/runtime/runtime.allocate local.set $8 local.get $7 local.get $5 @@ -2377,13 +2356,9 @@ local.get $0 local.get $3 call $~lib/memory/memory.copy - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.2 (result i32) - local.get $8 - local.set $10 - local.get $10 - i32.const 1 - call $~lib/runtime/register - end + local.get $8 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/string/String#padEnd (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -2401,7 +2376,7 @@ if i32.const 0 i32.const 216 - i32.const 302 + i32.const 303 i32.const 4 call $~lib/env/abort unreachable @@ -2438,12 +2413,8 @@ local.get $3 i32.sub local.set $7 - block $~lib/runtime/ALLOCATE|inlined.3 (result i32) - local.get $4 - local.set $6 - local.get $6 - call $~lib/runtime/allocate - end + local.get $4 + call $~lib/runtime/runtime.allocate local.set $8 local.get $8 local.get $0 @@ -2490,13 +2461,9 @@ local.get $7 call $~lib/memory/memory.copy end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.3 (result i32) - local.get $8 - local.set $10 - local.get $10 - i32.const 1 - call $~lib/runtime/register - end + local.get $8 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/string/String#lastIndexOf (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -2511,7 +2478,7 @@ if i32.const 0 i32.const 216 - i32.const 149 + i32.const 150 i32.const 4 call $~lib/env/abort unreachable @@ -3025,7 +2992,7 @@ if i32.const 0 i32.const 216 - i32.const 569 + i32.const 570 i32.const 10 call $~lib/env/abort unreachable @@ -3098,7 +3065,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $1 i32.const 0 i32.eq @@ -3127,30 +3093,22 @@ i32.const 416 return end - block $~lib/runtime/ALLOCATE|inlined.4 (result i32) - local.get $4 - local.set $5 - local.get $5 - call $~lib/runtime/allocate - end - local.set $6 - local.get $6 + local.get $4 + call $~lib/runtime/runtime.allocate + local.set $5 + local.get $5 local.get $0 local.get $2 call $~lib/memory/memory.copy - local.get $6 + local.get $5 local.get $2 i32.add local.get $1 local.get $3 call $~lib/memory/memory.copy - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.4 (result i32) - local.get $6 - local.set $5 - local.get $5 - i32.const 1 - call $~lib/runtime/register - end + local.get $5 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/string/String.__concat (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -3315,7 +3273,7 @@ if i32.const 0 i32.const 216 - i32.const 323 + i32.const 324 i32.const 4 call $~lib/env/abort unreachable @@ -3343,7 +3301,7 @@ if i32.const 0 i32.const 216 - i32.const 328 + i32.const 329 i32.const 6 call $~lib/env/abort unreachable @@ -3369,16 +3327,12 @@ local.get $0 return end - block $~lib/runtime/ALLOCATE|inlined.5 (result i32) - local.get $2 - local.get $1 - i32.mul - i32.const 1 - i32.shl - local.set $3 - local.get $3 - call $~lib/runtime/allocate - end + local.get $2 + local.get $1 + i32.mul + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate local.set $4 local.get $4 local.get $0 @@ -3387,13 +3341,9 @@ i32.shl local.get $1 call $~lib/memory/memory.repeat - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.5 (result i32) - local.get $4 - local.set $3 - local.get $3 - i32.const 1 - call $~lib/runtime/register - end + local.get $4 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/string/String#slice (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -3466,14 +3416,10 @@ i32.const 416 return end - block $~lib/runtime/ALLOCATE|inlined.6 (result i32) - local.get $3 - i32.const 1 - i32.shl - local.set $4 - local.get $4 - call $~lib/runtime/allocate - end + local.get $3 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate local.set $8 local.get $8 local.get $0 @@ -3485,13 +3431,9 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.6 (result i32) - local.get $8 - local.set $4 - local.get $4 - i32.const 1 - call $~lib/runtime/register - end + local.get $8 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/array/Array<~lib/string/String>~iterate (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) @@ -3548,7 +3490,7 @@ (func $~lib/collector/dummy/__ref_unlink (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/runtime/makeArray (; 39 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 39 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3556,9 +3498,9 @@ (local $8 i32) (local $9 i32) i32.const 16 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.get $1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $4 local.get $0 local.get $2 @@ -3567,9 +3509,9 @@ local.get $0 local.get $2 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 4 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $6 local.get $4 local.tee $7 @@ -3876,7 +3818,7 @@ local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/reallocate (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3894,10 +3836,10 @@ i32.lt_u if local.get $1 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust local.set $4 local.get $3 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust i32.const 0 local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3947,8 +3889,8 @@ if i32.const 0 i32.const 120 - i32.const 117 - i32.const 8 + i32.const 107 + i32.const 10 call $~lib/env/abort unreachable end @@ -3995,7 +3937,7 @@ i32.gt_u if local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH local.get $2 i32.shr_u i32.gt_u @@ -4003,7 +3945,7 @@ i32.const 0 i32.const 1912 i32.const 13 - i32.const 64 + i32.const 72 call $~lib/env/abort unreachable end @@ -4014,15 +3956,9 @@ local.get $2 i32.shl local.set $4 - block $~lib/runtime/REALLOCATE|inlined.0 (result i32) - local.get $3 - local.set $6 - local.get $4 - local.set $5 - local.get $6 - local.get $5 - call $~lib/runtime/reallocate - end + local.get $3 + local.get $4 + call $~lib/runtime/runtime.reallocate local.set $5 local.get $5 local.get $3 @@ -4155,7 +4091,6 @@ (local $11 i32) (local $12 i32) (local $13 i32) - (local $14 i32) local.get $0 i32.const 0 i32.ne @@ -4163,7 +4098,7 @@ if i32.const 0 i32.const 216 - i32.const 350 + i32.const 351 i32.const 4 call $~lib/env/abort unreachable @@ -4171,17 +4106,11 @@ local.get $2 i32.eqz if - block $~lib/runtime/MAKEARRAY<~lib/string/String>|inlined.0 (result i32) - i32.const 0 - local.set $4 - i32.const 0 - local.set $3 - local.get $4 - i32.const 2 - i32.const 2 - local.get $3 - call $~lib/runtime/makeArray - end + i32.const 0 + i32.const 2 + i32.const 2 + i32.const 0 + call $~lib/runtime/runtime.makeArray return end local.get $1 @@ -4193,7 +4122,7 @@ i32.const 2 i32.const 2 i32.const 0 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray local.set $3 local.get $3 i32.load offset=4 @@ -4231,17 +4160,11 @@ local.get $6 i32.eqz if - block $~lib/runtime/MAKEARRAY<~lib/string/String>|inlined.1 (result i32) - i32.const 0 - local.set $3 - i32.const 0 - local.set $4 - local.get $3 - i32.const 2 - i32.const 2 - local.get $4 - call $~lib/runtime/makeArray - end + i32.const 0 + i32.const 1 + i32.const 2 + i32.const 0 + call $~lib/runtime/runtime.makeArray return end local.get $6 @@ -4253,17 +4176,11 @@ i32.lt_s select local.set $6 - block $~lib/runtime/MAKEARRAY<~lib/string/String>|inlined.2 (result i32) - local.get $6 - local.set $3 - i32.const 0 - local.set $4 - local.get $3 - i32.const 2 - i32.const 2 - local.get $4 - call $~lib/runtime/makeArray - end + local.get $6 + i32.const 2 + i32.const 2 + i32.const 0 + call $~lib/runtime/runtime.makeArray local.set $4 local.get $4 i32.load offset=4 @@ -4278,18 +4195,8 @@ i32.eqz br_if $break|0 block - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.7 (result i32) - block $~lib/runtime/ALLOCATE|inlined.7 (result i32) - i32.const 2 - local.set $9 - local.get $9 - call $~lib/runtime/allocate - end - local.set $8 - local.get $8 - i32.const 1 - call $~lib/runtime/register - end + i32.const 2 + call $~lib/runtime/runtime.allocate local.set $8 local.get $8 local.get $0 @@ -4307,6 +4214,10 @@ local.get $8 i32.store local.get $8 + i32.const 1 + call $~lib/runtime/runtime.register + drop + local.get $8 local.get $4 call $~lib/collector/dummy/__ref_link end @@ -4325,17 +4236,11 @@ local.get $6 i32.eqz if - block $~lib/runtime/MAKEARRAY<~lib/string/String>|inlined.3 (result i32) - i32.const 1 - local.set $4 - i32.const 0 - local.set $3 - local.get $4 - i32.const 2 - i32.const 2 - local.get $3 - call $~lib/runtime/makeArray - end + i32.const 1 + i32.const 2 + i32.const 2 + i32.const 0 + call $~lib/runtime/runtime.makeArray local.set $3 local.get $3 i32.load offset=4 @@ -4345,24 +4250,18 @@ return end end - block $~lib/runtime/MAKEARRAY<~lib/string/String>|inlined.4 (result i32) - i32.const 0 - local.set $4 - i32.const 0 - local.set $3 - local.get $4 - i32.const 2 - i32.const 2 - local.get $3 - call $~lib/runtime/makeArray - end + i32.const 0 + i32.const 2 + i32.const 2 + i32.const 0 + call $~lib/runtime/runtime.makeArray + local.set $9 + i32.const 0 local.set $10 i32.const 0 local.set $11 i32.const 0 local.set $12 - i32.const 0 - local.set $13 block $break|1 loop $continue|1 local.get $0 @@ -4373,33 +4272,29 @@ else unreachable end - local.get $12 + local.get $11 call $~lib/string/String#indexOf - local.tee $11 + local.tee $10 i32.const -1 i32.ne if block + local.get $10 local.get $11 - local.get $12 i32.sub local.set $3 local.get $3 i32.const 0 i32.gt_s if - block $~lib/runtime/ALLOCATE|inlined.8 (result i32) - local.get $3 - i32.const 1 - i32.shl - local.set $4 - local.get $4 - call $~lib/runtime/allocate - end + local.get $3 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate local.set $4 local.get $4 local.get $0 - local.get $12 + local.get $11 i32.const 1 i32.shl i32.add @@ -4407,55 +4302,45 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $10 - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.8 (result i32) - local.get $4 - local.set $5 - local.get $5 - i32.const 1 - call $~lib/runtime/register - end + local.get $9 + local.get $4 + i32.const 1 + call $~lib/runtime/runtime.register call $~lib/array/Array<~lib/string/String>#push drop else - local.get $10 + local.get $9 i32.const 416 call $~lib/array/Array<~lib/string/String>#push drop end - local.get $13 + local.get $12 i32.const 1 i32.add - local.tee $13 + local.tee $12 local.get $2 i32.eq if - local.get $10 + local.get $9 return end - local.get $11 + local.get $10 local.get $7 i32.add - local.set $12 + local.set $11 end br $continue|1 end end end - local.get $12 + local.get $11 i32.eqz if - block $~lib/runtime/MAKEARRAY<~lib/string/String>|inlined.5 (result i32) - i32.const 1 - local.set $4 - i32.const 0 - local.set $3 - local.get $4 - i32.const 2 - i32.const 2 - local.get $3 - call $~lib/runtime/makeArray - end + i32.const 1 + i32.const 2 + i32.const 2 + i32.const 0 + call $~lib/runtime/runtime.makeArray local.set $3 local.get $3 i32.const 0 @@ -4465,49 +4350,41 @@ return end local.get $6 - local.get $12 + local.get $11 i32.sub - local.set $14 - local.get $14 + local.set $13 + local.get $13 i32.const 0 i32.gt_s if - block $~lib/runtime/ALLOCATE|inlined.9 (result i32) - local.get $14 - i32.const 1 - i32.shl - local.set $3 - local.get $3 - call $~lib/runtime/allocate - end + local.get $13 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate local.set $3 local.get $3 local.get $0 - local.get $12 + local.get $11 i32.const 1 i32.shl i32.add - local.get $14 + local.get $13 i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $10 - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.9 (result i32) - local.get $3 - local.set $4 - local.get $4 - i32.const 1 - call $~lib/runtime/register - end + local.get $9 + local.get $3 + i32.const 1 + call $~lib/runtime/runtime.register call $~lib/array/Array<~lib/string/String>#push drop else - local.get $10 + local.get $9 i32.const 416 call $~lib/array/Array<~lib/string/String>#push drop end - local.get $10 + local.get $9 ) (func $~lib/array/Array<~lib/string/String>#get:length (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -4802,40 +4679,32 @@ local.get $1 i32.add local.set $2 - block $~lib/runtime/ALLOCATE|inlined.10 (result i32) - local.get $2 - i32.const 1 - i32.shl - local.set $3 - local.get $3 - call $~lib/runtime/allocate - end - local.set $4 + local.get $2 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + local.set $3 block $~lib/util/number/utoa32_core|inlined.0 - local.get $4 + local.get $3 local.set $6 local.get $0 local.set $5 local.get $2 - local.set $3 + local.set $4 local.get $6 local.get $5 - local.get $3 + local.get $4 call $~lib/util/number/utoa32_lut end local.get $1 if - local.get $4 + local.get $3 i32.const 45 i32.store16 end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.10 (result i32) - local.get $4 - local.set $3 - local.get $3 - i32.const 1 - call $~lib/runtime/register - end + local.get $3 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/util/number/utoa32 (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -4852,34 +4721,26 @@ local.get $0 call $~lib/util/number/decimalCount32 local.set $1 - block $~lib/runtime/ALLOCATE|inlined.11 (result i32) - local.get $1 - i32.const 1 - i32.shl - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $3 + local.get $1 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + local.set $2 block $~lib/util/number/utoa32_core|inlined.1 - local.get $3 + local.get $2 local.set $5 local.get $0 local.set $4 local.get $1 - local.set $2 + local.set $3 local.get $5 local.get $4 - local.get $2 - call $~lib/util/number/utoa32_lut - end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.11 (result i32) local.get $3 - local.set $2 - local.get $2 - i32.const 1 - call $~lib/runtime/register + call $~lib/util/number/utoa32_lut end + local.get $2 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/util/number/decimalCount64 (; 56 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) @@ -5103,14 +4964,10 @@ local.get $2 call $~lib/util/number/decimalCount32 local.set $3 - block $~lib/runtime/ALLOCATE|inlined.12 (result i32) - local.get $3 - i32.const 1 - i32.shl - local.set $4 - local.get $4 - call $~lib/runtime/allocate - end + local.get $3 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate local.set $1 block $~lib/util/number/utoa32_core|inlined.2 local.get $1 @@ -5128,14 +4985,10 @@ local.get $0 call $~lib/util/number/decimalCount64 local.set $3 - block $~lib/runtime/ALLOCATE|inlined.13 (result i32) - local.get $3 - i32.const 1 - i32.shl - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end + local.get $3 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate local.set $1 block $~lib/util/number/utoa64_core|inlined.0 local.get $1 @@ -5150,13 +5003,9 @@ call $~lib/util/number/utoa64_lut end end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.12 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.const 1 - call $~lib/runtime/register - end + local.get $1 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/util/number/itoa64 (; 59 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) @@ -5197,14 +5046,10 @@ local.get $1 i32.add local.set $4 - block $~lib/runtime/ALLOCATE|inlined.14 (result i32) - local.get $4 - i32.const 1 - i32.shl - local.set $5 - local.get $5 - call $~lib/runtime/allocate - end + local.get $4 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate local.set $2 block $~lib/util/number/utoa32_core|inlined.3 local.get $2 @@ -5224,14 +5069,10 @@ local.get $1 i32.add local.set $4 - block $~lib/runtime/ALLOCATE|inlined.15 (result i32) - local.get $4 - i32.const 1 - i32.shl - local.set $3 - local.get $3 - call $~lib/runtime/allocate - end + local.get $4 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate local.set $2 block $~lib/util/number/utoa64_core|inlined.1 local.get $2 @@ -5252,13 +5093,9 @@ i32.const 45 i32.store16 end - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.13 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.const 1 - call $~lib/runtime/register - end + local.get $2 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/builtins/isFinite (; 60 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 @@ -6664,7 +6501,7 @@ if i32.const 0 i32.const 216 - i32.const 189 + i32.const 190 i32.const 4 call $~lib/env/abort unreachable @@ -6753,12 +6590,8 @@ local.get $0 return end - block $~lib/runtime/ALLOCATE|inlined.17 (result i32) - local.get $3 - local.set $4 - local.get $4 - call $~lib/runtime/allocate - end + local.get $3 + call $~lib/runtime/runtime.allocate local.set $10 local.get $10 local.get $0 @@ -6766,15 +6599,11 @@ i32.add local.get $3 call $~lib/memory/memory.copy - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.14 (result i32) - local.get $10 - local.set $4 - local.get $4 - i32.const 1 - call $~lib/runtime/register - end + local.get $10 + i32.const 1 + call $~lib/runtime/runtime.register ) - (func $~lib/runtime/discard (; 70 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 70 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -6783,8 +6612,8 @@ if i32.const 0 i32.const 120 - i32.const 177 - i32.const 4 + i32.const 132 + i32.const 6 call $~lib/env/abort unreachable end @@ -6800,8 +6629,8 @@ if i32.const 0 i32.const 120 - i32.const 179 - i32.const 4 + i32.const 134 + i32.const 6 call $~lib/env/abort unreachable end @@ -6812,7 +6641,6 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 f64.const 0 f64.eq @@ -6838,31 +6666,23 @@ select return end - block $~lib/runtime/ALLOCATE|inlined.16 (result i32) - i32.const 28 - i32.const 1 - i32.shl - local.set $1 - local.get $1 - call $~lib/runtime/allocate - end - local.set $2 - local.get $2 + i32.const 28 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + local.set $1 + local.get $1 local.get $0 call $~lib/util/number/dtoa_core - local.set $3 - local.get $2 + local.set $2 + local.get $1 i32.const 0 - local.get $3 + local.get $2 call $~lib/string/String#substring - local.set $4 - block $~lib/runtime/DISCARD|inlined.0 - local.get $2 - local.set $1 - local.get $1 - call $~lib/runtime/discard - end - local.get $4 + local.set $3 + local.get $1 + call $~lib/runtime/runtime.discard + local.get $3 ) (func $start:std/string (; 72 ;) (type $FUNCSIG$v) (local $0 i32) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 5eb2f0e9c6..154118043d 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -115,7 +115,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -136,7 +136,7 @@ i32.const 8 i32.add ) - (func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 700 @@ -144,8 +144,8 @@ if i32.const 0 i32.const 72 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -159,8 +159,8 @@ if i32.const 0 i32.const 72 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -388,19 +388,19 @@ if i32.const 0 i32.const 112 - i32.const 25 - i32.const 43 + i32.const 53 + i32.const 51 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $1 local.get $0 call $~lib/memory/memory.fill local.get $1 i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/map/Map<~lib/string/String,usize>#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 @@ -427,9 +427,9 @@ (func $~lib/map/Map<~lib/string/String,usize>#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -455,9 +455,9 @@ (func $~lib/map/Map#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 4 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store @@ -2266,7 +2266,7 @@ return end local.get $2 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $2 local.get $0 local.get $1 @@ -2279,7 +2279,7 @@ call $~lib/memory/memory.copy local.get $2 i32.const 1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) (func $~lib/string/String.__concat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index b702816ad8..d481dfbdad 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -44,7 +44,7 @@ (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/symbol/idToString (mut i32) (i32.const 0)) (global $std/symbol/sym3 (mut i32) (i32.const 0)) (global $std/symbol/sym4 (mut i32) (i32.const 0)) @@ -79,7 +79,7 @@ end local.get $2 ) - (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -175,10 +175,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -191,7 +191,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -200,8 +200,8 @@ if i32.const 0 i32.const 72 - i32.const 153 - i32.const 4 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -217,8 +217,8 @@ if i32.const 0 i32.const 72 - i32.const 155 - i32.const 4 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -486,36 +486,27 @@ ) (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH i32.gt_u if i32.const 0 i32.const 112 - i32.const 25 - i32.const 43 + i32.const 53 + i32.const 51 call $~lib/env/abort unreachable end - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - local.get $1 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $3 - local.get $3 + local.get $1 + call $~lib/runtime/runtime.allocate + local.set $2 + local.get $2 i32.const 0 local.get $1 call $~lib/memory/memory.fill - block $~lib/runtime/REGISTER<~lib/arraybuffer/ArrayBuffer>|inlined.0 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.const 3 - call $~lib/runtime/register - end + local.get $2 + i32.const 3 + call $~lib/runtime/runtime.register ) (func $~lib/map/Map<~lib/string/String,usize>#clear (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 @@ -549,9 +540,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -609,9 +600,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 4 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -2988,7 +2979,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $1 i32.const 0 i32.eq @@ -3017,30 +3007,22 @@ i32.const 160 return end - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - local.get $4 - local.set $5 - local.get $5 - call $~lib/runtime/allocate - end - local.set $6 - local.get $6 + local.get $4 + call $~lib/runtime/runtime.allocate + local.set $5 + local.get $5 local.get $0 local.get $2 call $~lib/memory/memory.copy - local.get $6 + local.get $5 local.get $2 i32.add local.get $1 local.get $3 call $~lib/memory/memory.copy - block $~lib/runtime/REGISTER<~lib/string/String>|inlined.0 (result i32) - local.get $6 - local.set $5 - local.get $5 - i32.const 1 - call $~lib/runtime/register - end + local.get $5 + i32.const 1 + call $~lib/runtime/runtime.register ) (func $~lib/string/String.__concat (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 36d42c4743..268c5b726b 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -35,10 +35,10 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00\"") (data (i32.const 24) "s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 64) "\01\00\00\00\1e") - (data (i32.const 80) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 112) "\01\00\00\00&") - (data (i32.const 128) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 64) "\01\00\00\00&") + (data (i32.const 80) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 120) "\01\00\00\00\1e") + (data (i32.const 136) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (data (i32.const 168) "\01\00\00\00$") (data (i32.const 184) "~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 224) "\02\00\00\00\05") @@ -93,7 +93,7 @@ (data (i32.const 1336) "\01\00\00\00V") (data (i32.const 1352) "T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") (table $0 130 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/string/String~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) + (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/string/String~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/typedarray/arr (mut i32) (i32.const 0)) @@ -182,7 +182,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -434,16 +434,16 @@ end end ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 1440 i32.le_u if i32.const 0 - i32.const 80 - i32.const 153 - i32.const 4 + i32.const 136 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -456,9 +456,9 @@ i32.ne if i32.const 0 - i32.const 80 - i32.const 155 - i32.const 4 + i32.const 136 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -474,23 +474,23 @@ i32.gt_u if i32.const 0 - i32.const 128 - i32.const 25 - i32.const 43 + i32.const 80 + i32.const 53 + i32.const 51 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.tee $1 i32.const 0 local.get $0 call $~lib/memory/memory.fill local.get $1 i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register ) - (func $~lib/runtime/ArrayBufferView~iterate (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/arraybuffer/ArrayBufferView~iterate (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 i32.load local.tee $0 @@ -500,7 +500,7 @@ call_indirect (type $FUNCSIG$vi) end ) - (func $~lib/runtime/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1073741808 local.get $2 @@ -509,8 +509,8 @@ if i32.const 0 i32.const 80 - i32.const 236 - i32.const 57 + i32.const 11 + i32.const 65 call $~lib/env/abort unreachable end @@ -524,9 +524,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -554,102 +554,102 @@ ) (func $~lib/typedarray/Int8Array#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 4 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.get $0 i32.const 0 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Uint8Array#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 5 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.get $0 i32.const 0 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Uint8ClampedArray#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 6 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.get $0 i32.const 0 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Int16Array#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 7 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.get $0 i32.const 1 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Uint16Array#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 8 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.get $0 i32.const 1 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Int32Array#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 9 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.get $0 i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Uint32Array#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 10 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.get $0 i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Int64Array#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 11 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.get $0 i32.const 3 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Uint64Array#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 12 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.get $0 i32.const 3 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Float32Array#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 13 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.get $0 i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Float64Array#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 14 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.get $0 i32.const 3 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $std/typedarray/testInstantiate (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) @@ -1125,7 +1125,7 @@ if i32.const 0 i32.const 184 - i32.const 442 + i32.const 443 i32.const 63 call $~lib/env/abort unreachable @@ -1149,7 +1149,7 @@ if i32.const 0 i32.const 184 - i32.const 436 + i32.const 437 i32.const 63 call $~lib/env/abort unreachable @@ -1221,9 +1221,7 @@ end local.set $3 i32.const 12 - call $~lib/runtime/allocate - i32.const 9 - call $~lib/runtime/register + call $~lib/runtime/runtime.allocate local.set $2 local.get $0 i32.load offset=4 @@ -1253,6 +1251,8 @@ i32.shl i32.store offset=8 local.get $2 + i32.const 9 + call $~lib/runtime/runtime.register ) (func $~lib/typedarray/Float64Array#__set (; 24 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 @@ -1264,7 +1264,7 @@ if i32.const 0 i32.const 184 - i32.const 852 + i32.const 853 i32.const 63 call $~lib/env/abort unreachable @@ -1337,9 +1337,7 @@ end local.set $3 i32.const 12 - call $~lib/runtime/allocate - i32.const 14 - call $~lib/runtime/register + call $~lib/runtime/runtime.allocate local.set $2 local.get $0 i32.load offset=4 @@ -1369,6 +1367,8 @@ i32.shl i32.store offset=8 local.get $2 + i32.const 14 + call $~lib/runtime/runtime.register ) (func $~lib/util/sort/insertionSort (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -1807,7 +1807,7 @@ if i32.const 0 i32.const 184 - i32.const 846 + i32.const 847 i32.const 63 call $~lib/env/abort unreachable @@ -1828,7 +1828,7 @@ if i32.const 0 i32.const 184 - i32.const 196 + i32.const 197 i32.const 44 call $~lib/env/abort unreachable @@ -1860,7 +1860,7 @@ if i32.const 0 i32.const 184 - i32.const 190 + i32.const 191 i32.const 44 call $~lib/env/abort unreachable @@ -1879,7 +1879,7 @@ if i32.const 0 i32.const 184 - i32.const 32 + i32.const 33 i32.const 44 call $~lib/env/abort unreachable @@ -3005,21 +3005,21 @@ end end ) - (func $~lib/runtime/makeArray (; 38 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 38 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) i32.const 16 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.get $1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $1 local.get $0 local.get $2 i32.shl local.tee $4 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.tee $2 local.set $5 local.get $1 @@ -3054,7 +3054,7 @@ if i32.const 0 i32.const 184 - i32.const 26 + i32.const 27 i32.const 44 call $~lib/env/abort unreachable @@ -3183,9 +3183,7 @@ end local.set $3 i32.const 12 - call $~lib/runtime/allocate - i32.const 4 - call $~lib/runtime/register + call $~lib/runtime/runtime.allocate local.set $2 local.get $0 i32.load offset=4 @@ -3211,6 +3209,8 @@ i32.sub i32.store offset=8 local.get $2 + i32.const 4 + call $~lib/runtime/runtime.register ) (func $~lib/typedarray/Int32Array#fill (; 43 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) @@ -3439,7 +3439,7 @@ if i32.const 0 i32.const 184 - i32.const 114 + i32.const 115 i32.const 44 call $~lib/env/abort unreachable @@ -3562,7 +3562,7 @@ if i32.const 0 i32.const 184 - i32.const 278 + i32.const 279 i32.const 63 call $~lib/env/abort unreachable @@ -3658,7 +3658,7 @@ if i32.const 0 i32.const 184 - i32.const 360 + i32.const 361 i32.const 63 call $~lib/env/abort unreachable @@ -3825,7 +3825,7 @@ if i32.const 0 i32.const 184 - i32.const 524 + i32.const 525 i32.const 63 call $~lib/env/abort unreachable @@ -3879,7 +3879,7 @@ if i32.const 0 i32.const 184 - i32.const 606 + i32.const 607 i32.const 63 call $~lib/env/abort unreachable @@ -3979,7 +3979,7 @@ if i32.const 0 i32.const 184 - i32.const 688 + i32.const 689 i32.const 63 call $~lib/env/abort unreachable @@ -4033,7 +4033,7 @@ if i32.const 0 i32.const 184 - i32.const 770 + i32.const 771 i32.const 63 call $~lib/env/abort unreachable @@ -5023,7 +5023,7 @@ if i32.const 0 i32.const 184 - i32.const 108 + i32.const 109 i32.const 44 call $~lib/env/abort unreachable @@ -5261,7 +5261,7 @@ if i32.const 0 i32.const 184 - i32.const 272 + i32.const 273 i32.const 63 call $~lib/env/abort unreachable @@ -5397,7 +5397,7 @@ if i32.const 0 i32.const 184 - i32.const 354 + i32.const 355 i32.const 63 call $~lib/env/abort unreachable @@ -5646,7 +5646,7 @@ if i32.const 0 i32.const 184 - i32.const 518 + i32.const 519 i32.const 63 call $~lib/env/abort unreachable @@ -5787,7 +5787,7 @@ if i32.const 0 i32.const 184 - i32.const 600 + i32.const 601 i32.const 63 call $~lib/env/abort unreachable @@ -5923,7 +5923,7 @@ if i32.const 0 i32.const 184 - i32.const 682 + i32.const 683 i32.const 63 call $~lib/env/abort unreachable @@ -6064,7 +6064,7 @@ if i32.const 0 i32.const 184 - i32.const 764 + i32.const 765 i32.const 63 call $~lib/env/abort unreachable @@ -10414,9 +10414,7 @@ select local.set $3 i32.const 12 - call $~lib/runtime/allocate - i32.const 5 - call $~lib/runtime/register + call $~lib/runtime/runtime.allocate local.set $1 local.get $0 i32.load offset=4 @@ -10453,6 +10451,8 @@ i32.sub i32.store offset=8 local.get $1 + i32.const 5 + call $~lib/runtime/runtime.register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 242 ;) (type $FUNCSIG$v) (local $0 i32) @@ -10606,9 +10606,7 @@ select local.set $3 i32.const 12 - call $~lib/runtime/allocate - i32.const 6 - call $~lib/runtime/register + call $~lib/runtime/runtime.allocate local.set $1 local.get $0 i32.load offset=4 @@ -10645,6 +10643,8 @@ i32.sub i32.store offset=8 local.get $1 + i32.const 6 + call $~lib/runtime/runtime.register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 244 ;) (type $FUNCSIG$v) (local $0 i32) @@ -10854,9 +10854,7 @@ select local.set $3 i32.const 12 - call $~lib/runtime/allocate - i32.const 7 - call $~lib/runtime/register + call $~lib/runtime/runtime.allocate local.set $1 local.get $0 i32.load offset=4 @@ -10897,6 +10895,8 @@ i32.shl i32.store offset=8 local.get $1 + i32.const 7 + call $~lib/runtime/runtime.register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 247 ;) (type $FUNCSIG$v) (local $0 i32) @@ -11112,9 +11112,7 @@ select local.set $3 i32.const 12 - call $~lib/runtime/allocate - i32.const 8 - call $~lib/runtime/register + call $~lib/runtime/runtime.allocate local.set $1 local.get $0 i32.load offset=4 @@ -11155,6 +11153,8 @@ i32.shl i32.store offset=8 local.get $1 + i32.const 8 + call $~lib/runtime/runtime.register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 250 ;) (type $FUNCSIG$v) (local $0 i32) @@ -11497,9 +11497,7 @@ select local.set $3 i32.const 12 - call $~lib/runtime/allocate - i32.const 10 - call $~lib/runtime/register + call $~lib/runtime/runtime.allocate local.set $1 local.get $0 i32.load offset=4 @@ -11540,6 +11538,8 @@ i32.shl i32.store offset=8 local.get $1 + i32.const 10 + call $~lib/runtime/runtime.register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 254 ;) (type $FUNCSIG$v) (local $0 i32) @@ -11743,9 +11743,7 @@ select local.set $3 i32.const 12 - call $~lib/runtime/allocate - i32.const 11 - call $~lib/runtime/register + call $~lib/runtime/runtime.allocate local.set $1 local.get $0 i32.load offset=4 @@ -11786,6 +11784,8 @@ i32.shl i32.store offset=8 local.get $1 + i32.const 11 + call $~lib/runtime/runtime.register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 257 ;) (type $FUNCSIG$v) (local $0 i32) @@ -11938,9 +11938,7 @@ select local.set $3 i32.const 12 - call $~lib/runtime/allocate - i32.const 12 - call $~lib/runtime/register + call $~lib/runtime/runtime.allocate local.set $1 local.get $0 i32.load offset=4 @@ -11981,6 +11979,8 @@ i32.shl i32.store offset=8 local.get $1 + i32.const 12 + call $~lib/runtime/runtime.register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 259 ;) (type $FUNCSIG$v) (local $0 i32) @@ -12187,9 +12187,7 @@ select local.set $3 i32.const 12 - call $~lib/runtime/allocate - i32.const 13 - call $~lib/runtime/register + call $~lib/runtime/runtime.allocate local.set $1 local.get $0 i32.load offset=4 @@ -12230,6 +12228,8 @@ i32.shl i32.store offset=8 local.get $1 + i32.const 13 + call $~lib/runtime/runtime.register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 262 ;) (type $FUNCSIG$v) (local $0 i32) @@ -12953,7 +12953,7 @@ i32.const 16 i32.const 0 i32.const 240 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -12974,7 +12974,7 @@ i32.const 16 i32.const 0 i32.const 312 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -12995,7 +12995,7 @@ i32.const 16 i32.const 0 i32.const 336 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -13016,7 +13016,7 @@ i32.const 16 i32.const 0 i32.const 360 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -13037,7 +13037,7 @@ i32.const 16 i32.const 0 i32.const 384 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -13103,7 +13103,7 @@ i32.const 16 i32.const 0 i32.const 408 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -13119,7 +13119,7 @@ i32.const 16 i32.const 0 i32.const 432 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -13163,7 +13163,7 @@ i32.const 18 i32.const 2 i32.const 456 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -13184,7 +13184,7 @@ i32.const 18 i32.const 2 i32.const 496 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -13205,7 +13205,7 @@ i32.const 18 i32.const 2 i32.const 536 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -13226,7 +13226,7 @@ i32.const 18 i32.const 2 i32.const 576 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -13247,7 +13247,7 @@ i32.const 18 i32.const 2 i32.const 616 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -13315,7 +13315,7 @@ i32.const 18 i32.const 2 i32.const 656 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -13331,7 +13331,7 @@ i32.const 18 i32.const 2 i32.const 688 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if diff --git a/tests/compiler/std/typedarray.ts b/tests/compiler/std/typedarray.ts index 914cda37df..7283275e24 100644 --- a/tests/compiler/std/typedarray.ts +++ b/tests/compiler/std/typedarray.ts @@ -193,9 +193,9 @@ assert(sub32.byteLength == 3 * sizeof()); assert(isInt32ArrayEqual(sub32, [0, 0, 0])); assert(isInt32ArrayEqual(arr32, [1, 0, 0, 0, 2])); -import { MAX_BYTELENGTH } from "runtime"; +import { runtime } from "runtime"; -const MAX_F64LENGTH = MAX_BYTELENGTH >> alignof(); +const MAX_F64LENGTH = runtime.MAX_BYTELENGTH >> alignof(); new Float64Array(MAX_F64LENGTH); // 1GB // new Float64Array(MAX_F64 + 1); // throws diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 69509e5958..e81c8f39bb 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -37,8 +37,8 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 64) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 112) "\01\00\00\00&\00\00\00\00\00\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 64) "\01\00\00\00&\00\00\00\00\00\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 120) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 168) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 224) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\01\04\05") (data (i32.const 248) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") @@ -68,7 +68,7 @@ (data (i32.const 1248) "\01\00\00\00B\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 1336) "\01\00\00\00V\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (table $0 130 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/typedarray/Int8Array~iterate $~lib/typedarray/Uint8Array~iterate $~lib/typedarray/Uint8ClampedArray~iterate $~lib/typedarray/Int16Array~iterate $~lib/typedarray/Uint16Array~iterate $~lib/typedarray/Int32Array~iterate $~lib/typedarray/Uint32Array~iterate $~lib/typedarray/Int64Array~iterate $~lib/typedarray/Uint64Array~iterate $~lib/typedarray/Float32Array~iterate $~lib/typedarray/Float64Array~iterate $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) + (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/typedarray/Int8Array~iterate $~lib/typedarray/Uint8Array~iterate $~lib/typedarray/Uint8ClampedArray~iterate $~lib/typedarray/Int16Array~iterate $~lib/typedarray/Uint16Array~iterate $~lib/typedarray/Int32Array~iterate $~lib/typedarray/Uint32Array~iterate $~lib/typedarray/Int64Array~iterate $~lib/typedarray/Uint64Array~iterate $~lib/typedarray/Float32Array~iterate $~lib/typedarray/Float64Array~iterate $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32 (i32.const 1)) (global $~lib/typedarray/Uint8Array.BYTES_PER_ELEMENT i32 (i32.const 1)) (global $~lib/typedarray/Uint8ClampedArray.BYTES_PER_ELEMENT i32 (i32.const 1)) @@ -81,7 +81,7 @@ (global $~lib/typedarray/Float32Array.BYTES_PER_ELEMENT i32 (i32.const 4)) (global $~lib/typedarray/Float64Array.BYTES_PER_ELEMENT i32 (i32.const 8)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) @@ -113,7 +113,7 @@ (func $~lib/string/String~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) ) - (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -209,10 +209,10 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -494,7 +494,7 @@ (func $~lib/collector/dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -502,9 +502,9 @@ i32.eqz if i32.const 0 - i32.const 80 - i32.const 153 - i32.const 4 + i32.const 136 + i32.const 145 + i32.const 6 call $~lib/env/abort unreachable end @@ -519,9 +519,9 @@ i32.eqz if i32.const 0 - i32.const 80 - i32.const 155 - i32.const 4 + i32.const 136 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end @@ -534,38 +534,29 @@ ) (func $~lib/arraybuffer/ArrayBuffer#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH i32.gt_u if i32.const 0 - i32.const 128 - i32.const 25 - i32.const 43 + i32.const 80 + i32.const 53 + i32.const 51 call $~lib/env/abort unreachable end - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - local.get $1 - local.set $2 - local.get $2 - call $~lib/runtime/allocate - end - local.set $3 - local.get $3 + local.get $1 + call $~lib/runtime/runtime.allocate + local.set $2 + local.get $2 i32.const 0 local.get $1 call $~lib/memory/memory.fill - block $~lib/runtime/REGISTER<~lib/arraybuffer/ArrayBuffer>|inlined.0 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.const 2 - call $~lib/runtime/register - end + local.get $2 + i32.const 2 + call $~lib/runtime/runtime.register ) - (func $~lib/runtime/ArrayBufferView~iterate (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/arraybuffer/ArrayBufferView~iterate (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load @@ -585,21 +576,21 @@ (func $~lib/collector/dummy/__ref_unlink (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/runtime/ArrayBufferView#constructor (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH + global.get $~lib/runtime/runtime.MAX_BYTELENGTH local.get $2 i32.shr_u i32.gt_u if i32.const 0 i32.const 80 - i32.const 236 - i32.const 57 + i32.const 11 + i32.const 65 call $~lib/env/abort unreachable end @@ -615,9 +606,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $0 end local.get $0 @@ -665,7 +656,7 @@ (local $2 i32) local.get $0 local.get $1 - call $~lib/runtime/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~iterate ) (func $~lib/typedarray/Int8Array#constructor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -673,36 +664,36 @@ local.get $0 else i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 4 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end local.get $1 i32.const 0 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load i32.sub ) - (func $~lib/runtime/ArrayBufferView#get:byteLength (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#get:byteLength (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 ) (func $~lib/typedarray/Int8Array#get:length (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength ) (func $~lib/typedarray/Uint8Array~iterate (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 - call $~lib/runtime/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~iterate ) (func $~lib/typedarray/Uint8Array#constructor (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -710,25 +701,25 @@ local.get $0 else i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 5 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end local.get $1 i32.const 0 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) (func $~lib/typedarray/Uint8Array#get:length (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength ) (func $~lib/typedarray/Uint8ClampedArray~iterate (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 - call $~lib/runtime/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~iterate ) (func $~lib/typedarray/Uint8ClampedArray#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -736,25 +727,25 @@ local.get $0 else i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 6 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end local.get $1 i32.const 0 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) (func $~lib/typedarray/Uint8ClampedArray#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength ) (func $~lib/typedarray/Int16Array~iterate (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 - call $~lib/runtime/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~iterate ) (func $~lib/typedarray/Int16Array#constructor (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -762,19 +753,19 @@ local.get $0 else i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 7 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end local.get $1 i32.const 1 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) (func $~lib/typedarray/Int16Array#get:length (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 1 i32.shr_u ) @@ -782,7 +773,7 @@ (local $2 i32) local.get $0 local.get $1 - call $~lib/runtime/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~iterate ) (func $~lib/typedarray/Uint16Array#constructor (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -790,19 +781,19 @@ local.get $0 else i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 8 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end local.get $1 i32.const 1 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) (func $~lib/typedarray/Uint16Array#get:length (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 1 i32.shr_u ) @@ -810,7 +801,7 @@ (local $2 i32) local.get $0 local.get $1 - call $~lib/runtime/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~iterate ) (func $~lib/typedarray/Int32Array#constructor (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -818,19 +809,19 @@ local.get $0 else i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 9 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end local.get $1 i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) (func $~lib/typedarray/Int32Array#get:length (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) @@ -838,7 +829,7 @@ (local $2 i32) local.get $0 local.get $1 - call $~lib/runtime/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~iterate ) (func $~lib/typedarray/Uint32Array#constructor (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -846,19 +837,19 @@ local.get $0 else i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 10 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end local.get $1 i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) (func $~lib/typedarray/Uint32Array#get:length (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) @@ -866,7 +857,7 @@ (local $2 i32) local.get $0 local.get $1 - call $~lib/runtime/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~iterate ) (func $~lib/typedarray/Int64Array#constructor (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -874,19 +865,19 @@ local.get $0 else i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 11 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end local.get $1 i32.const 3 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) (func $~lib/typedarray/Int64Array#get:length (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) @@ -894,7 +885,7 @@ (local $2 i32) local.get $0 local.get $1 - call $~lib/runtime/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~iterate ) (func $~lib/typedarray/Uint64Array#constructor (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -902,19 +893,19 @@ local.get $0 else i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 12 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end local.get $1 i32.const 3 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) (func $~lib/typedarray/Uint64Array#get:length (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) @@ -922,7 +913,7 @@ (local $2 i32) local.get $0 local.get $1 - call $~lib/runtime/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~iterate ) (func $~lib/typedarray/Float32Array#constructor (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -930,19 +921,19 @@ local.get $0 else i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 13 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end local.get $1 i32.const 2 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) (func $~lib/typedarray/Float32Array#get:length (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) @@ -950,7 +941,7 @@ (local $2 i32) local.get $0 local.get $1 - call $~lib/runtime/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~iterate ) (func $~lib/typedarray/Float64Array#constructor (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -958,19 +949,19 @@ local.get $0 else i32.const 12 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 14 - call $~lib/runtime/register + call $~lib/runtime/runtime.register end local.get $1 i32.const 3 - call $~lib/runtime/ArrayBufferView#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) (func $~lib/typedarray/Float64Array#get:length (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) @@ -991,7 +982,7 @@ call $~lib/typedarray/Int8Array#constructor local.set $1 local.get $1 - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz @@ -1004,7 +995,7 @@ unreachable end local.get $1 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32.mul @@ -1036,7 +1027,7 @@ call $~lib/typedarray/Uint8Array#constructor local.set $2 local.get $2 - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz @@ -1049,7 +1040,7 @@ unreachable end local.get $2 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Uint8Array.BYTES_PER_ELEMENT i32.mul @@ -1081,7 +1072,7 @@ call $~lib/typedarray/Uint8ClampedArray#constructor local.set $3 local.get $3 - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz @@ -1094,7 +1085,7 @@ unreachable end local.get $3 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Uint8Array.BYTES_PER_ELEMENT i32.mul @@ -1126,7 +1117,7 @@ call $~lib/typedarray/Int16Array#constructor local.set $4 local.get $4 - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz @@ -1139,7 +1130,7 @@ unreachable end local.get $4 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Int16Array.BYTES_PER_ELEMENT i32.mul @@ -1171,7 +1162,7 @@ call $~lib/typedarray/Uint16Array#constructor local.set $5 local.get $5 - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz @@ -1184,7 +1175,7 @@ unreachable end local.get $5 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Uint16Array.BYTES_PER_ELEMENT i32.mul @@ -1216,7 +1207,7 @@ call $~lib/typedarray/Int32Array#constructor local.set $6 local.get $6 - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz @@ -1229,7 +1220,7 @@ unreachable end local.get $6 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Int32Array.BYTES_PER_ELEMENT i32.mul @@ -1261,7 +1252,7 @@ call $~lib/typedarray/Uint32Array#constructor local.set $7 local.get $7 - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz @@ -1274,7 +1265,7 @@ unreachable end local.get $7 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Uint32Array.BYTES_PER_ELEMENT i32.mul @@ -1306,7 +1297,7 @@ call $~lib/typedarray/Int64Array#constructor local.set $8 local.get $8 - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz @@ -1319,7 +1310,7 @@ unreachable end local.get $8 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Int64Array.BYTES_PER_ELEMENT i32.mul @@ -1351,7 +1342,7 @@ call $~lib/typedarray/Uint64Array#constructor local.set $9 local.get $9 - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz @@ -1364,7 +1355,7 @@ unreachable end local.get $9 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Uint64Array.BYTES_PER_ELEMENT i32.mul @@ -1396,7 +1387,7 @@ call $~lib/typedarray/Float32Array#constructor local.set $10 local.get $10 - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz @@ -1409,7 +1400,7 @@ unreachable end local.get $10 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Float32Array.BYTES_PER_ELEMENT i32.mul @@ -1441,7 +1432,7 @@ call $~lib/typedarray/Float64Array#constructor local.set $11 local.get $11 - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz @@ -1454,7 +1445,7 @@ unreachable end local.get $11 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Float64Array.BYTES_PER_ELEMENT i32.mul @@ -1492,7 +1483,7 @@ if i32.const 0 i32.const 184 - i32.const 442 + i32.const 443 i32.const 63 call $~lib/env/abort unreachable @@ -1516,7 +1507,7 @@ if i32.const 0 i32.const 184 - i32.const 436 + i32.const 437 i32.const 63 call $~lib/env/abort unreachable @@ -1608,18 +1599,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER<~lib/typedarray/Int32Array>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - i32.const 12 - local.set $8 - local.get $8 - call $~lib/runtime/allocate - end - local.set $7 - local.get $7 - i32.const 9 - call $~lib/runtime/register - end + i32.const 12 + call $~lib/runtime/runtime.allocate local.set $7 local.get $5 i32.load @@ -1665,6 +1646,8 @@ i32.shl i32.store offset=8 local.get $7 + i32.const 9 + call $~lib/runtime/runtime.register ) (func $~lib/typedarray/Float64Array#__set (; 54 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 @@ -1676,7 +1659,7 @@ if i32.const 0 i32.const 184 - i32.const 852 + i32.const 853 i32.const 63 call $~lib/env/abort unreachable @@ -1769,18 +1752,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER<~lib/typedarray/Float64Array>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) - i32.const 12 - local.set $8 - local.get $8 - call $~lib/runtime/allocate - end - local.set $7 - local.get $7 - i32.const 14 - call $~lib/runtime/register - end + i32.const 12 + call $~lib/runtime/runtime.allocate local.set $7 local.get $5 i32.load @@ -1826,6 +1799,8 @@ i32.shl i32.store offset=8 local.get $7 + i32.const 14 + call $~lib/runtime/runtime.register ) (func $~lib/util/sort/insertionSort (; 56 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -2376,7 +2351,7 @@ if i32.const 0 i32.const 184 - i32.const 846 + i32.const 847 i32.const 63 call $~lib/env/abort unreachable @@ -2397,7 +2372,7 @@ if i32.const 0 i32.const 184 - i32.const 196 + i32.const 197 i32.const 44 call $~lib/env/abort unreachable @@ -2429,7 +2404,7 @@ if i32.const 0 i32.const 184 - i32.const 190 + i32.const 191 i32.const 44 call $~lib/env/abort unreachable @@ -2448,7 +2423,7 @@ if i32.const 0 i32.const 184 - i32.const 32 + i32.const 33 i32.const 44 call $~lib/env/abort unreachable @@ -3988,7 +3963,7 @@ end end ) - (func $~lib/runtime/makeArray (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3996,9 +3971,9 @@ (local $8 i32) (local $9 i32) i32.const 16 - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate local.get $1 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $4 local.get $0 local.get $2 @@ -4007,9 +3982,9 @@ local.get $0 local.get $2 i32.shl - call $~lib/runtime/allocate + call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/register + call $~lib/runtime/runtime.register local.set $6 local.get $4 local.tee $7 @@ -4064,7 +4039,7 @@ if i32.const 0 i32.const 184 - i32.const 26 + i32.const 27 i32.const 44 call $~lib/env/abort unreachable @@ -4230,18 +4205,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER<~lib/typedarray/Int8Array>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.3 (result i32) - i32.const 12 - local.set $8 - local.get $8 - call $~lib/runtime/allocate - end - local.set $7 - local.get $7 - i32.const 4 - call $~lib/runtime/register - end + i32.const 12 + call $~lib/runtime/runtime.allocate local.set $7 local.get $5 i32.load @@ -4287,6 +4252,8 @@ i32.shl i32.store offset=8 local.get $7 + i32.const 4 + call $~lib/runtime/runtime.register ) (func $~lib/typedarray/Int32Array#fill (; 78 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) @@ -4585,7 +4552,7 @@ if i32.const 0 i32.const 184 - i32.const 114 + i32.const 115 i32.const 44 call $~lib/env/abort unreachable @@ -4809,7 +4776,7 @@ if i32.const 0 i32.const 184 - i32.const 278 + i32.const 279 i32.const 63 call $~lib/env/abort unreachable @@ -4936,7 +4903,7 @@ if i32.const 0 i32.const 184 - i32.const 360 + i32.const 361 i32.const 63 call $~lib/env/abort unreachable @@ -5160,7 +5127,7 @@ if i32.const 0 i32.const 184 - i32.const 524 + i32.const 525 i32.const 63 call $~lib/env/abort unreachable @@ -5283,7 +5250,7 @@ if i32.const 0 i32.const 184 - i32.const 606 + i32.const 607 i32.const 63 call $~lib/env/abort unreachable @@ -5406,7 +5373,7 @@ if i32.const 0 i32.const 184 - i32.const 688 + i32.const 689 i32.const 63 call $~lib/env/abort unreachable @@ -5529,7 +5496,7 @@ if i32.const 0 i32.const 184 - i32.const 770 + i32.const 771 i32.const 63 call $~lib/env/abort unreachable @@ -7025,7 +6992,7 @@ if i32.const 0 i32.const 184 - i32.const 108 + i32.const 109 i32.const 44 call $~lib/env/abort unreachable @@ -7318,7 +7285,7 @@ if i32.const 0 i32.const 184 - i32.const 272 + i32.const 273 i32.const 63 call $~lib/env/abort unreachable @@ -7477,7 +7444,7 @@ if i32.const 0 i32.const 184 - i32.const 354 + i32.const 355 i32.const 63 call $~lib/env/abort unreachable @@ -7772,7 +7739,7 @@ if i32.const 0 i32.const 184 - i32.const 518 + i32.const 519 i32.const 63 call $~lib/env/abort unreachable @@ -7931,7 +7898,7 @@ if i32.const 0 i32.const 184 - i32.const 600 + i32.const 601 i32.const 63 call $~lib/env/abort unreachable @@ -8090,7 +8057,7 @@ if i32.const 0 i32.const 184 - i32.const 682 + i32.const 683 i32.const 63 call $~lib/env/abort unreachable @@ -8249,7 +8216,7 @@ if i32.const 0 i32.const 184 - i32.const 764 + i32.const 765 i32.const 63 call $~lib/env/abort unreachable @@ -15207,18 +15174,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER<~lib/typedarray/Uint8Array>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.4 (result i32) - i32.const 12 - local.set $8 - local.get $8 - call $~lib/runtime/allocate - end - local.set $7 - local.get $7 - i32.const 5 - call $~lib/runtime/register - end + i32.const 12 + call $~lib/runtime/runtime.allocate local.set $7 local.get $5 i32.load @@ -15264,6 +15221,8 @@ i32.shl i32.store offset=8 local.get $7 + i32.const 5 + call $~lib/runtime/runtime.register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 370 ;) (type $FUNCSIG$v) (local $0 i32) @@ -15572,18 +15531,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER<~lib/typedarray/Uint8ClampedArray>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.5 (result i32) - i32.const 12 - local.set $8 - local.get $8 - call $~lib/runtime/allocate - end - local.set $7 - local.get $7 - i32.const 6 - call $~lib/runtime/register - end + i32.const 12 + call $~lib/runtime/runtime.allocate local.set $7 local.get $5 i32.load @@ -15629,6 +15578,8 @@ i32.shl i32.store offset=8 local.get $7 + i32.const 6 + call $~lib/runtime/runtime.register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 373 ;) (type $FUNCSIG$v) (local $0 i32) @@ -15937,18 +15888,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER<~lib/typedarray/Int16Array>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.6 (result i32) - i32.const 12 - local.set $8 - local.get $8 - call $~lib/runtime/allocate - end - local.set $7 - local.get $7 - i32.const 7 - call $~lib/runtime/register - end + i32.const 12 + call $~lib/runtime/runtime.allocate local.set $7 local.get $5 i32.load @@ -15994,6 +15935,8 @@ i32.shl i32.store offset=8 local.get $7 + i32.const 7 + call $~lib/runtime/runtime.register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 376 ;) (type $FUNCSIG$v) (local $0 i32) @@ -16308,18 +16251,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER<~lib/typedarray/Uint16Array>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.7 (result i32) - i32.const 12 - local.set $8 - local.get $8 - call $~lib/runtime/allocate - end - local.set $7 - local.get $7 - i32.const 8 - call $~lib/runtime/register - end + i32.const 12 + call $~lib/runtime/runtime.allocate local.set $7 local.get $5 i32.load @@ -16365,6 +16298,8 @@ i32.shl i32.store offset=8 local.get $7 + i32.const 8 + call $~lib/runtime/runtime.register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 379 ;) (type $FUNCSIG$v) (local $0 i32) @@ -16895,18 +16830,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER<~lib/typedarray/Uint32Array>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.8 (result i32) - i32.const 12 - local.set $8 - local.get $8 - call $~lib/runtime/allocate - end - local.set $7 - local.get $7 - i32.const 10 - call $~lib/runtime/register - end + i32.const 12 + call $~lib/runtime/runtime.allocate local.set $7 local.get $5 i32.load @@ -16952,6 +16877,8 @@ i32.shl i32.store offset=8 local.get $7 + i32.const 10 + call $~lib/runtime/runtime.register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 384 ;) (type $FUNCSIG$v) (local $0 i32) @@ -17254,18 +17181,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER<~lib/typedarray/Int64Array>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.9 (result i32) - i32.const 12 - local.set $8 - local.get $8 - call $~lib/runtime/allocate - end - local.set $7 - local.get $7 - i32.const 11 - call $~lib/runtime/register - end + i32.const 12 + call $~lib/runtime/runtime.allocate local.set $7 local.get $5 i32.load @@ -17311,6 +17228,8 @@ i32.shl i32.store offset=8 local.get $7 + i32.const 11 + call $~lib/runtime/runtime.register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 387 ;) (type $FUNCSIG$v) (local $0 i32) @@ -17616,18 +17535,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER<~lib/typedarray/Uint64Array>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.10 (result i32) - i32.const 12 - local.set $8 - local.get $8 - call $~lib/runtime/allocate - end - local.set $7 - local.get $7 - i32.const 12 - call $~lib/runtime/register - end + i32.const 12 + call $~lib/runtime/runtime.allocate local.set $7 local.get $5 i32.load @@ -17673,6 +17582,8 @@ i32.shl i32.store offset=8 local.get $7 + i32.const 12 + call $~lib/runtime/runtime.register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 390 ;) (type $FUNCSIG$v) (local $0 i32) @@ -17978,18 +17889,8 @@ select local.set $3 end - block $~lib/runtime/REGISTER<~lib/typedarray/Float32Array>|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.11 (result i32) - i32.const 12 - local.set $8 - local.get $8 - call $~lib/runtime/allocate - end - local.set $7 - local.get $7 - i32.const 13 - call $~lib/runtime/register - end + i32.const 12 + call $~lib/runtime/runtime.allocate local.set $7 local.get $5 i32.load @@ -18035,6 +17936,8 @@ i32.shl i32.store offset=8 local.get $7 + i32.const 13 + call $~lib/runtime/runtime.register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 393 ;) (type $FUNCSIG$v) (local $0 i32) @@ -18594,7 +18497,7 @@ unreachable end global.get $std/typedarray/arr - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz @@ -18607,7 +18510,7 @@ unreachable end global.get $std/typedarray/arr - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 3 i32.const 4 i32.mul @@ -18682,7 +18585,7 @@ unreachable end global.get $std/typedarray/arr - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 1 i32.const 4 i32.mul @@ -18697,7 +18600,7 @@ unreachable end global.get $std/typedarray/arr - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 1 i32.const 4 i32.mul @@ -18780,7 +18683,7 @@ unreachable end global.get $std/typedarray/af64 - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 2 i32.const 8 i32.mul @@ -18795,7 +18698,7 @@ unreachable end global.get $std/typedarray/af64 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 4 i32.const 8 i32.mul @@ -18954,7 +18857,7 @@ i32.const 16 i32.const 0 i32.const 240 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -18976,7 +18879,7 @@ i32.const 16 i32.const 0 i32.const 312 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -18998,7 +18901,7 @@ i32.const 16 i32.const 0 i32.const 336 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -19020,7 +18923,7 @@ i32.const 16 i32.const 0 i32.const 360 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -19042,7 +18945,7 @@ i32.const 16 i32.const 0 i32.const 384 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -19078,7 +18981,7 @@ unreachable end global.get $std/typedarray/sub8 - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 1 i32.eq i32.eqz @@ -19091,7 +18994,7 @@ unreachable end global.get $std/typedarray/sub8 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 3 i32.eq i32.eqz @@ -19108,7 +19011,7 @@ i32.const 16 i32.const 0 i32.const 408 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -19124,7 +19027,7 @@ i32.const 16 i32.const 0 i32.const 432 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -19170,7 +19073,7 @@ i32.const 18 i32.const 2 i32.const 456 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -19192,7 +19095,7 @@ i32.const 18 i32.const 2 i32.const 496 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -19214,7 +19117,7 @@ i32.const 18 i32.const 2 i32.const 536 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -19236,7 +19139,7 @@ i32.const 18 i32.const 2 i32.const 576 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -19258,7 +19161,7 @@ i32.const 18 i32.const 2 i32.const 616 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -19294,7 +19197,7 @@ unreachable end global.get $std/typedarray/sub32 - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 1 i32.const 4 i32.mul @@ -19309,7 +19212,7 @@ unreachable end global.get $std/typedarray/sub32 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 3 i32.const 4 i32.mul @@ -19328,7 +19231,7 @@ i32.const 18 i32.const 2 i32.const 656 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -19344,7 +19247,7 @@ i32.const 18 i32.const 2 i32.const 688 - call $~lib/runtime/makeArray + call $~lib/runtime/runtime.makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -19420,7 +19323,7 @@ unreachable end global.get $std/typedarray/multisubarr1 - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 1 i32.eq i32.eqz @@ -19433,7 +19336,7 @@ unreachable end global.get $std/typedarray/multisubarr1 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 5 i32.eq i32.eqz @@ -19478,7 +19381,7 @@ unreachable end global.get $std/typedarray/multisubarr2 - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 2 i32.eq i32.eqz @@ -19491,7 +19394,7 @@ unreachable end global.get $std/typedarray/multisubarr2 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 4 i32.eq i32.eqz @@ -19536,7 +19439,7 @@ unreachable end global.get $std/typedarray/multisubarr3 - call $~lib/runtime/ArrayBufferView#get:byteOffset + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 3 i32.eq i32.eqz @@ -19549,7 +19452,7 @@ unreachable end global.get $std/typedarray/multisubarr3 - call $~lib/runtime/ArrayBufferView#get:byteLength + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 3 i32.eq i32.eqz From 3bcd32f3bad2c48694a33b239067d483c73437c2 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 2 Apr 2019 10:12:57 +0200 Subject: [PATCH 083/119] directize --- src/builtins.ts | 117 +- src/compiler.ts | 88 +- src/program.ts | 16 +- std/assembly/array.ts | 43 +- std/assembly/arraybuffer.ts | 13 +- std/assembly/builtins.ts | 4 + std/assembly/collector/README.md | 3 + std/assembly/collector/dummy.ts | 6 + std/assembly/collector/index.d.ts | 1 + std/assembly/collector/itcm.ts | 33 +- std/assembly/dataview.ts | 7 +- std/assembly/fixedarray.ts | 17 +- std/assembly/gc.ts | 16 +- std/assembly/index.d.ts | 2 + std/assembly/map.ts | 24 +- std/assembly/runtime.ts | 52 +- std/assembly/set.ts | 16 +- std/assembly/string.ts | 51 +- std/assembly/typedarray.ts | 4 +- std/assembly/util/number.ts | 10 +- std/assembly/util/runtime.ts | 36 + tests/compiler/assert-nonnull.optimized.wat | 6 +- tests/compiler/assert-nonnull.untouched.wat | 6 +- tests/compiler/call-super.optimized.wat | 4 +- tests/compiler/call-super.untouched.wat | 18 +- tests/compiler/class.optimized.wat | 6 +- tests/compiler/class.untouched.wat | 7 +- tests/compiler/constructor.optimized.wat | 349 +++--- tests/compiler/constructor.untouched.wat | 477 +++---- tests/compiler/exports.optimized.wat | 4 +- tests/compiler/exports.untouched.wat | 18 +- tests/compiler/gc.optimized.wat | 147 ++- tests/compiler/gc.untouched.wat | 175 +-- tests/compiler/gc/_dummy.ts | 11 + tests/compiler/gc/global-assign.optimized.wat | 9 +- tests/compiler/gc/global-assign.untouched.wat | 29 +- tests/compiler/gc/global-init.optimized.wat | 9 +- tests/compiler/gc/global-init.untouched.wat | 29 +- tests/compiler/gc/itcm/trace.optimized.wat | 554 ++++---- tests/compiler/gc/itcm/trace.ts | 2 +- tests/compiler/gc/itcm/trace.untouched.wat | 719 +++++------ .../gc/rc/global-assign.optimized.wat | 4 +- .../gc/rc/global-assign.untouched.wat | 18 +- .../compiler/gc/rc/global-init.optimized.wat | 4 +- .../compiler/gc/rc/global-init.untouched.wat | 18 +- tests/compiler/getter-call.optimized.wat | 4 +- tests/compiler/getter-call.untouched.wat | 18 +- tests/compiler/inlining.optimized.wat | 4 +- tests/compiler/inlining.untouched.wat | 18 +- tests/compiler/number.optimized.wat | 10 +- tests/compiler/number.untouched.wat | 30 +- .../optional-typeparameters.optimized.wat | 4 +- .../optional-typeparameters.untouched.wat | 18 +- tests/compiler/std/array-access.optimized.wat | 8 +- tests/compiler/std/array-access.untouched.wat | 20 +- .../compiler/std/array-literal.optimized.wat | 46 +- .../compiler/std/array-literal.untouched.wat | 176 ++- tests/compiler/std/array.optimized.wat | 527 ++++---- tests/compiler/std/array.untouched.wat | 1109 ++++++++--------- tests/compiler/std/arraybuffer.optimized.wat | 70 +- tests/compiler/std/arraybuffer.untouched.wat | 105 +- tests/compiler/std/dataview.optimized.wat | 146 ++- tests/compiler/std/dataview.ts | 4 + tests/compiler/std/dataview.untouched.wat | 169 ++- tests/compiler/std/date.optimized.wat | 4 +- tests/compiler/std/date.untouched.wat | 18 +- tests/compiler/std/hash.untouched.wat | 4 +- tests/compiler/std/map.optimized.wat | 29 +- tests/compiler/std/map.untouched.wat | 428 +++---- tests/compiler/std/new.optimized.wat | 4 +- tests/compiler/std/new.untouched.wat | 18 +- .../compiler/std/object-literal.optimized.wat | 18 +- .../compiler/std/object-literal.untouched.wat | 68 +- .../std/operator-overloading.optimized.wat | 4 +- .../std/operator-overloading.untouched.wat | 18 +- tests/compiler/std/runtime.optimized.wat | 42 +- tests/compiler/std/runtime.ts | 12 +- tests/compiler/std/runtime.untouched.wat | 88 +- tests/compiler/std/set.optimized.wat | 29 +- tests/compiler/std/set.untouched.wat | 408 +++--- tests/compiler/std/static-array.optimized.wat | 14 +- tests/compiler/std/static-array.untouched.wat | 30 +- tests/compiler/std/string-utf8.optimized.wat | 12 +- tests/compiler/std/string-utf8.untouched.wat | 28 +- tests/compiler/std/string.optimized.wat | 81 +- tests/compiler/std/string.untouched.wat | 216 ++-- tests/compiler/std/symbol.optimized.wat | 8 +- tests/compiler/std/symbol.untouched.wat | 28 +- tests/compiler/std/typedarray.optimized.wat | 503 ++++---- tests/compiler/std/typedarray.ts | 4 +- tests/compiler/std/typedarray.untouched.wat | 902 +++++++------- 91 files changed, 4148 insertions(+), 4538 deletions(-) create mode 100644 std/assembly/util/runtime.ts diff --git a/src/builtins.ts b/src/builtins.ts index 3fc6030d7f..d89be118a9 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -135,6 +135,7 @@ export namespace BuiltinSymbols { export const changetype = "~lib/builtins/changetype"; export const assert = "~lib/builtins/assert"; export const unchecked = "~lib/builtins/unchecked"; + export const call_direct = "~lib/builtins/call_direct"; export const call_indirect = "~lib/builtins/call_indirect"; export const instantiate = "~lib/builtins/instantiate"; @@ -477,14 +478,17 @@ export namespace BuiltinSymbols { export const memory_reset = "~lib/memory/memory.reset"; // std/runtime.ts - export const classId = "~lib/runtime/classId"; - export const iterateRoots = "~lib/runtime/iterateRoots"; + export const runtime_id = "~lib/runtime/__runtime_id"; export const runtime_allocate = "~lib/runtime/runtime.allocate"; export const runtime_reallocate = "~lib/runtime/runtime.reallocate"; export const runtime_register = "~lib/runtime/runtime.register"; export const runtime_discard = "~lib/runtime/runtime.discard"; export const runtime_makeArray = "~lib/runtime/runtime.makeArray"; + // std/gc.ts + export const gc_mark_roots = "~lib/gc/__gc_mark_roots"; + export const gc_mark_members = "~lib/gc/__gc_mark_members"; + // std/typedarray.ts export const Int8Array = "~lib/typedarray/Int8Array"; export const Uint8Array = "~lib/typedarray/Uint8Array"; @@ -532,6 +536,8 @@ export function compileCall( // below, but rather done to make this file easier to work with. If there was a general rule it'd // most likely be "three or more instructions that only differ in their actual opcode". + var directize = false; + switch (prototype.internalName) { // === Static type evaluation ================================================================= @@ -2337,6 +2343,7 @@ export function compileCall( if (!alreadyUnchecked) flow.unset(FlowFlags.UNCHECKED_CONTEXT); return expr; } + case BuiltinSymbols.call_direct: directize = true; case BuiltinSymbols.call_indirect: { // call_indirect(target: Function | u32, ...args: *[]) -> T if ( checkTypeOptional(typeArguments, reportNode, compiler, true) | @@ -2370,14 +2377,21 @@ export function compileCall( let typeRef = module.getFunctionTypeBySignature(nativeReturnType, nativeParamTypes); if (!typeRef) typeRef = module.addFunctionType(typeName, nativeReturnType, nativeParamTypes); compiler.currentType = returnType; - // if the index expression is precomputable to a constant value, emit a direct call - if (getExpressionId(arg0 = module.precomputeExpression(arg0)) == ExpressionId.Const) { - assert(getExpressionType(arg0) == NativeType.I32); - let index = getConstValueI32(arg0); - let functionTable = compiler.functionTable; - if (index >= 0 && index < functionTable.length) { - return module.createCall(functionTable[index], operandExprs, nativeReturnType); + if (directize) { + // if the index expression is precomputable to a constant value, emit a direct call + if (getExpressionId(arg0 = module.precomputeExpression(arg0)) == ExpressionId.Const) { + assert(getExpressionType(arg0) == NativeType.I32); + let index = getConstValueI32(arg0); + let functionTable = compiler.functionTable; + if (index >= 0 && index < functionTable.length) { + return module.createCall(functionTable[index], operandExprs, nativeReturnType); + } } + compiler.error( + DiagnosticCode.Operation_not_supported, + operands[0].range + ); + return module.createUnreachable(); } // of course this can easily result in a 'RuntimeError: function signature mismatch' trap and // thus must be used with care. it exists because it *might* be useful in specific scenarios. @@ -3624,7 +3638,7 @@ export function compileCall( // === Internal runtime ======================================================================= - case BuiltinSymbols.classId: { + case BuiltinSymbols.runtime_id: { let type = evaluateConstantType(compiler, typeArguments, operands, reportNode); compiler.currentType = Type.u32; if (!type) return module.createUnreachable(); @@ -3636,38 +3650,21 @@ export function compileCall( ); return module.createUnreachable(); } - let classId = classReference.ensureClassId(compiler); // involves compile steps + let id = classReference.ensureId(compiler); // involves compile steps compiler.currentType = Type.u32; - return module.createI32(classId); + return module.createI32(id); } - case BuiltinSymbols.iterateRoots: { + case BuiltinSymbols.gc_mark_roots: { if ( checkTypeAbsent(typeArguments, reportNode, prototype) | - checkArgsRequired(operands, 1, reportNode, compiler) + checkArgsRequired(operands, 0, reportNode, compiler) ) { compiler.currentType = Type.void; return module.createUnreachable(); } - let expr = compiler.compileExpressionRetainType(operands[0], Type.u32, WrapMode.NONE); - let type = compiler.currentType; - let signatureReference = type.signatureReference; - if ( - !type.is(TypeFlags.REFERENCE) || - !signatureReference || - signatureReference.parameterTypes.length != 1 || - signatureReference.parameterTypes[0] != compiler.options.usizeType - ) { - compiler.error( - DiagnosticCode.Type_0_is_not_assignable_to_type_1, - reportNode.range, type.toString(), "(ref: usize) => void" - ); - compiler.currentType = Type.void; - return module.createUnreachable(); - } - // just emit a call even if the function doesn't yet exist - compiler.needsIterateRoots = true; + compiler.needsTraverse = true; compiler.currentType = Type.void; - return module.createCall("~iterateRoots", [ expr ], NativeType.None); + return module.createCall(BuiltinSymbols.gc_mark_roots, null, NativeType.None); } } @@ -4052,13 +4049,15 @@ export function compileAbort( ]); } -/** Compiles the iterateRoots function if required. */ -export function compileIterateRoots(compiler: Compiler): void { +/** Compiles the mark_roots function if required. */ +export function compileMarkRoots(compiler: Compiler): void { var module = compiler.module; var exprs = new Array(); - var typeName = Signature.makeSignatureString([ Type.i32 ], Type.void); - var typeRef = compiler.ensureFunctionType([ Type.i32 ], Type.void); + var typeRef = compiler.ensureFunctionType(null, Type.void); var nativeSizeType = compiler.options.nativeSizeType; + var markRef = assert(compiler.program.markRef); + + compiler.compileFunction(markRef); for (let element of compiler.program.elementsByName.values()) { if (element.kind != ElementKind.GLOBAL) continue; @@ -4073,43 +4072,51 @@ export function compileIterateRoots(compiler: Compiler): void { let value = global.constantIntegerValue; if (i64_low(value) || i64_high(value)) { exprs.push( - module.createCallIndirect( - module.createGetLocal(0, NativeType.I32), - [ - compiler.options.isWasm64 - ? module.createI64(i64_low(value), i64_high(value)) - : module.createI32(i64_low(value)) - ], - typeName - ) + module.createCall(markRef.internalName, [ + compiler.options.isWasm64 + ? module.createI64(i64_low(value), i64_high(value)) + : module.createI32(i64_low(value)) + ], NativeType.None) ); } } else { exprs.push( module.createIf( module.createTeeLocal( - 1, + 0, module.createGetGlobal(global.internalName, nativeSizeType) ), - module.createCallIndirect( - module.createGetLocal(0, NativeType.I32), - [ - module.createGetLocal(1, nativeSizeType) - ], - typeName - ) + module.createCall(markRef.internalName, [ + module.createGetLocal(0, nativeSizeType) + ], NativeType.None) ) ); } } } - module.addFunction("~iterateRoots", typeRef, [ nativeSizeType ], + module.addFunction(BuiltinSymbols.gc_mark_roots, typeRef, [ nativeSizeType ], exprs.length ? module.createBlock(null, exprs) : module.createNop() ); } +// TODO +export function compileMarkMembers(compiler: Compiler): void { + var module = compiler.module; + var ftype = compiler.ensureFunctionType(null, Type.void); + + var names = new Array(); + var current = module.createSwitch(names, "invalid", module.createGetLocal(0, NativeType.I32)); + + module.addFunction(BuiltinSymbols.gc_mark_members, ftype, [], module.createBlock(null, [ + module.createBlock("invalid", [ + current + ]), + module.createUnreachable() + ])); +} + // Helpers /** Evaluates the constant type of a type argument *or* expression. */ diff --git a/src/compiler.ts b/src/compiler.ts index 41d643a319..32bc079968 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -6,7 +6,7 @@ import { compileCall as compileBuiltinCall, compileAbort, - compileIterateRoots, + compileMarkRoots, BuiltinSymbols } from "./builtins"; @@ -309,8 +309,8 @@ export class Compiler extends DiagnosticEmitter { argcVar: GlobalRef = 0; /** Argument count helper setter. */ argcSet: FunctionRef = 0; - /** Indicates whether the iterateRoots function must be generated. */ - needsIterateRoots: bool = false; + /** Indicates whether the traverseRoots function must be generated. */ + needsTraverse: bool = false; /** Compiles a {@link Program} to a {@link Module} using the specified options. */ static compile(program: Program, options: Options | null = null): Module { @@ -444,7 +444,10 @@ export class Compiler extends DiagnosticEmitter { } // set up gc - if (this.needsIterateRoots) compileIterateRoots(this); + if (this.needsTraverse) { + compileMarkRoots(this); + // compileMarkMembers(this); + } // expose module capabilities var capabilities = Capability.NONE; @@ -1409,7 +1412,7 @@ export class Compiler extends DiagnosticEmitter { } else { let length = stringValue.length; let buffer = new Uint8Array(rtHeaderSize + (length << 1)); - program.writeRuntimeHeader(buffer, 0, stringInstance.ensureClassId(this), length << 1); + program.writeRuntimeHeader(buffer, 0, stringInstance.ensureId(this), length << 1); for (let i = 0; i < length; ++i) { writeI16(stringValue.charCodeAt(i), buffer, rtHeaderSize + (i << 1)); } @@ -1435,7 +1438,7 @@ export class Compiler extends DiagnosticEmitter { var runtimeHeaderSize = program.runtimeHeaderSize; var buf = new Uint8Array(runtimeHeaderSize + byteLength); - program.writeRuntimeHeader(buf, 0, bufferInstance.ensureClassId(this), byteLength); + program.writeRuntimeHeader(buf, 0, bufferInstance.ensureId(this), byteLength); var pos = runtimeHeaderSize; var nativeType = elementType.toNativeType(); switch (nativeType) { @@ -1522,7 +1525,7 @@ export class Compiler extends DiagnosticEmitter { var arrayLength = i32(bufferLength / elementType.byteSize); var buf = new Uint8Array(runtimeHeaderSize + arrayInstanceSize); - program.writeRuntimeHeader(buf, 0, arrayInstance.ensureClassId(this), arrayInstanceSize); + program.writeRuntimeHeader(buf, 0, arrayInstance.ensureId(this), arrayInstanceSize); var bufferAddress32 = i64_low(bufferSegment.offset) + runtimeHeaderSize; assert(!program.options.isWasm64); // TODO @@ -5950,6 +5953,7 @@ export class Compiler extends DiagnosticEmitter { // create the trampoline element var trampolineSignature = new Signature(originalParameterTypes, commonReturnType, commonThisType); trampolineSignature.requiredParameters = maxArguments; + trampolineSignature.parameterNames = originalSignature.parameterNames; trampoline = new Function( original.name + "|trampoline", original.prototype, @@ -6122,12 +6126,15 @@ export class Compiler extends DiagnosticEmitter { ) ) ) { // inline into the call + let previousFlow = this.currentFlow; + this.currentFlow = instance.flow; operands.push(this.compileExpression( parameterNodes[i].initializer, parameterTypes[i], ConversionKind.IMPLICIT, WrapMode.NONE )); + this.currentFlow = previousFlow; continue; } } @@ -6821,7 +6828,7 @@ export class Compiler extends DiagnosticEmitter { // makeArray(length, classId, alignLog2, staticBuffer) let expr = this.makeCallDirect(assert(program.makeArrayInstance), [ module.createI32(length), - module.createI32(arrayInstance.ensureClassId(this)), + module.createI32(arrayInstance.ensureId(this)), program.options.isWasm64 ? module.createI64(elementType.alignLog2) : module.createI32(elementType.alignLog2), @@ -6855,7 +6862,7 @@ export class Compiler extends DiagnosticEmitter { module.createSetLocal(tempThis.index, this.makeCallDirect(makeArrayInstance, [ module.createI32(length), - module.createI32(arrayInstance.ensureClassId(this)), + module.createI32(arrayInstance.ensureId(this)), program.options.isWasm64 ? module.createI64(elementType.alignLog2) : module.createI32(elementType.alignLog2), @@ -8116,7 +8123,7 @@ export class Compiler extends DiagnosticEmitter { ? module.createI64(classInstance.currentMemoryOffset) : module.createI32(classInstance.currentMemoryOffset) ], reportNode), - module.createI32(classInstance.ensureClassId(this)) + module.createI32(classInstance.ensureId(this)) ], reportNode); } } @@ -8321,7 +8328,7 @@ export class Compiler extends DiagnosticEmitter { module.createBreak(label, module.createBinary(BinaryOp.EqI32, // classId == class.id module.createTeeLocal(idTemp.index, idExpr), - module.createI32(classInstance.ensureClassId(this)) + module.createI32(classInstance.ensureId(this)) ), module.createI32(1) // ? true ) @@ -8337,24 +8344,24 @@ export class Compiler extends DiagnosticEmitter { return module.createBlock(label, conditions, NativeType.I32); } - /** Reserves the function index / class id for the following `makeIterate` operation. */ - makeIterateReserve(classInstance: Class): u32 { + /** Reserves the function index / class id for the following `makeTraverse` operation. */ + makeTraverseReserve(classInstance: Class): u32 { var functionTable = this.functionTable; var functionIndex = functionTable.length; - functionTable.push(classInstance.iterateName); + functionTable.push(classInstance.internalName + "~traverse"); return functionIndex; } - /** Makes the managed iteration function of the specified class. */ - makeIterate(classInstance: Class, functionIndex: i32): void { + /** Makes the managed traversal function of the specified class. */ + makeTraverse(classInstance: Class, functionIndex: i32): void { var program = this.program; assert(classInstance.type.isManaged(program)); // check if the class implements a custom iteration function (only valid for library elements) var members = classInstance.members; if (classInstance.isDeclaredInLibrary) { - if (members !== null && members.has("__iterate")) { - let iterPrototype = members.get("__iterate")!; + if (members !== null && members.has("__traverse")) { + let iterPrototype = members.get("__traverse")!; assert(iterPrototype.kind == ElementKind.FUNCTION_PROTOTYPE); let iterInstance = assert(program.resolver.resolveFunction(iterPrototype, null)); assert(iterInstance.is(CommonFlags.PRIVATE | CommonFlags.INSTANCE)); @@ -8362,10 +8369,9 @@ export class Compiler extends DiagnosticEmitter { assert(!iterInstance.isAny(CommonFlags.AMBIENT | CommonFlags.VIRTUAL)); let signature = iterInstance.signature; let parameterTypes = signature.parameterTypes; - assert(parameterTypes.length == 1); - assert(parameterTypes[0].signatureReference); + assert(parameterTypes.length == 0); assert(signature.returnType == Type.void); - iterInstance.internalName = classInstance.iterateName; + iterInstance.internalName = classInstance.internalName + "~traverse"; assert(this.compileFunction(iterInstance)); this.ensureFunctionTableEntry(iterInstance); return; @@ -8394,29 +8400,28 @@ export class Compiler extends DiagnosticEmitter { // remember the function index so we don't recurse infinitely var functionTable = this.functionTable; - var functionName = classInstance.iterateName; + var functionName = classInstance.internalName + "~traverse"; assert(functionIndex < functionTable.length); assert(functionTable[functionIndex] == functionName); - var fnSig = Signature.makeSignatureString([ usizeType ], Type.void); - this.ensureFunctionType([ usizeType ], Type.void); - // if the class extends a base class, call its hook first var baseInstance = classInstance.base; if (baseInstance) { let baseType = baseInstance.type; - let baseClassId = baseInstance.ensureClassId(this); + let baseClassId = baseInstance.ensureId(this); assert(baseType.isManaged(program)); body.push( - // BASECLASS~iterate.call(this, fn) + // BASECLASS~traverse.call(this) module.createCall(functionTable[baseClassId], [ - module.createGetLocal(0, nativeSizeType), - module.createGetLocal(1, NativeType.I32) + module.createGetLocal(0, nativeSizeType) ], NativeType.None) ); } - // iterate references assigned to own fields + var markRef = assert(program.markRef); + var hasRefFields = false; + + // traverse references assigned to own fields if (members) { for (let member of members.values()) { if (member.kind == ElementKind.FIELD) { @@ -8424,13 +8429,14 @@ export class Compiler extends DiagnosticEmitter { let fieldType = (member).type; if (fieldType.isManaged(program)) { let fieldClass = fieldType.classReference!; - let fieldClassId = fieldClass.ensureClassId(this); + let fieldClassId = fieldClass.ensureId(this); let fieldOffset = (member).memoryOffset; assert(fieldOffset >= 0); + hasRefFields = true; body.push( - // if ($2 = value) { fn($2); FIELDCLASS~iterate($2, fn); } + // if ($1 = value) FIELDCLASS~traverse($1) module.createIf( - module.createTeeLocal(2, + module.createTeeLocal(1, module.createLoad( nativeSizeSize, false, @@ -8440,15 +8446,11 @@ export class Compiler extends DiagnosticEmitter { ) ), module.createBlock(null, [ - module.createCallIndirect( - module.createGetLocal(1, NativeType.I32), - [ - module.createGetLocal(2, nativeSizeType) - ], fnSig - ), + module.createCall(markRef.internalName, [ + module.createGetLocal(1, nativeSizeType) + ], NativeType.None), module.createCall(functionTable[fieldClassId], [ - module.createGetLocal(2, nativeSizeType), - module.createGetLocal(1, NativeType.I32) + module.createGetLocal(1, nativeSizeType) ], NativeType.None) ]) ) @@ -8459,10 +8461,12 @@ export class Compiler extends DiagnosticEmitter { } } + if (hasRefFields) this.compileFunction(markRef); + // add the function to the module and return its table index module.addFunction( functionName, - this.ensureFunctionType([ Type.u32 ], Type.void, options.usizeType), + this.ensureFunctionType(null, Type.void, options.usizeType), members ? [ nativeSizeType ] : null, module.createBlock(null, body) ); diff --git a/src/program.ts b/src/program.ts index bbe534f219..ba34c07190 100644 --- a/src/program.ts +++ b/src/program.ts @@ -389,6 +389,8 @@ export class Program extends DiagnosticEmitter { retainRef: Function | null = null; /** Reference release implementation, if present: `__ref_release(ref: usize): void` */ releaseRef: Function | null = null; + /** Reference mark implementation, if present: `__ref_mark(ref: usize): void` */ + markRef: Function | null = null; /** Next class id. */ nextClassId: u32 = 1; @@ -861,6 +863,9 @@ export class Program extends DiagnosticEmitter { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.unlinkRef = this.resolver.resolveFunction(element, null); } + element = assert(this.lookupGlobal("__ref_mark")); + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.markRef = this.resolver.resolveFunction(element, null); this.collectorKind = CollectorKind.TRACING; } else if (element = this.lookupGlobal("__ref_retain")) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); @@ -3012,7 +3017,7 @@ export class Class extends TypedElement { private _id: u32 = 0; /** Ensures that this class has an id. */ - ensureClassId(compiler: Compiler): i32 { + ensureId(compiler: Compiler): i32 { var id = this._id; if (!id) { assert(!this.hasDecorator(DecoratorFlags.UNMANAGED)); @@ -3022,8 +3027,8 @@ export class Class extends TypedElement { // class's id so it can call the id directly, which avoids to generate // a helper function with a big switch mapping ids to function indexes. // here: might be called recursively in makeIterate, so reserve the id. - this._id = id = compiler.makeIterateReserve(this); - compiler.makeIterate(this, id); + this._id = id = compiler.makeTraverseReserve(this); + compiler.makeTraverse(this, id); } else { // counting GC or none just increments without any iterate functions this._id = id = program.nextClassId++; @@ -3053,11 +3058,6 @@ export class Class extends TypedElement { ); } - /** Gets the name of this class's GC iteration function. */ - get iterateName(): string { - return this.internalName + "~iterate"; - } - /** Constructs a new class. */ constructor( /** Name incl. type parameters, i.e. `Foo`. */ diff --git a/std/assembly/array.ts b/std/assembly/array.ts index a2a2c32c0b..1f0ad1504f 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -1,8 +1,9 @@ /// -import { runtime, classId } from "./runtime"; -import { ArrayBuffer, ArrayBufferView } from "./arraybuffer"; +import { MAX_BYTELENGTH } from "./util/runtime"; import { COMPARATOR, SORT } from "./util/sort"; +import { runtime, __runtime_id } from "./runtime"; +import { ArrayBuffer, ArrayBufferView } from "./arraybuffer"; import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number"; import { isArray as builtin_isArray } from "./builtins"; import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_EMPTYARRAY, E_HOLEYARRAY } from "./util/error"; @@ -10,7 +11,7 @@ import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_EMPTYARRAY, E_HOLEYARRAY } from " /** Ensures that the given array has _at least_ the specified capacity. */ function ensureCapacity(array: ArrayBufferView, minCapacity: i32, alignLog2: u32): void { if (minCapacity > array.dataLength >>> alignLog2) { - if (minCapacity > (runtime.MAX_BYTELENGTH >>> alignLog2)) throw new RangeError(E_INVALIDLENGTH); + if (minCapacity > (MAX_BYTELENGTH >>> alignLog2)) throw new RangeError(E_INVALIDLENGTH); let oldData = array.data; let newByteLength = minCapacity << alignLog2; let newData = runtime.reallocate(changetype(oldData), newByteLength); // registers on move @@ -40,8 +41,8 @@ export class Array extends ArrayBufferView { } static create(capacity: i32 = 0): Array { - if (capacity > runtime.MAX_BYTELENGTH >>> alignof()) throw new RangeError(E_INVALIDLENGTH); - var array = changetype>(runtime.makeArray(capacity, classId>(), alignof())); + if (capacity > MAX_BYTELENGTH >>> alignof()) throw new RangeError(E_INVALIDLENGTH); + var array = changetype>(runtime.makeArray(capacity, __runtime_id>(), alignof())); memory.fill(array.dataStart, 0, array.dataLength); array.length_ = 0; // ! return array; @@ -231,7 +232,7 @@ export class Array extends ArrayBufferView { concat(other: Array): Array { var thisLen = this.length_; var otherLen = select(0, other.length_, other === null); - var out = changetype>(runtime.makeArray(thisLen + otherLen, classId>(), alignof())); + var out = changetype>(runtime.makeArray(thisLen + otherLen, __runtime_id>(), alignof())); var outStart = out.dataStart; var thisSize = thisLen << alignof(); if (isManaged()) { @@ -319,7 +320,7 @@ export class Array extends ArrayBufferView { map(callbackfn: (value: T, index: i32, array: Array) => U): Array { var length = this.length_; - var out = changetype>(runtime.makeArray(length, classId>(), alignof())); + var out = changetype>(runtime.makeArray(length, __runtime_id>(), alignof())); var outStart = out.dataStart; for (let index = 0; index < min(length, this.length_); ++index) { let value = load(this.dataStart + (index << alignof())); @@ -345,7 +346,7 @@ export class Array extends ArrayBufferView { } filter(callbackfn: (value: T, index: i32, array: Array) => bool): Array { - var result = changetype>(runtime.makeArray(0, classId>(), alignof())); + var result = changetype>(runtime.makeArray(0, __runtime_id>(), alignof())); for (let index = 0, length = this.length_; index < min(length, this.length_); ++index) { let value = load(this.dataStart + (index << alignof())); if (callbackfn(value, index, this)) result.push(value); @@ -433,7 +434,7 @@ export class Array extends ArrayBufferView { begin = begin < 0 ? max(begin + length, 0) : min(begin, length); end = end < 0 ? max(end + length, 0) : min(end , length); length = max(end - begin, 0); - var slice = changetype>(runtime.makeArray(length, classId>(), alignof())); + var slice = changetype>(runtime.makeArray(length, __runtime_id>(), alignof())); var sliceBase = slice.dataStart; var thisBase = this.dataStart + (begin << alignof()); if (isManaged()) { @@ -465,7 +466,7 @@ export class Array extends ArrayBufferView { var length = this.length_; start = start < 0 ? max(length + start, 0) : min(start, length); deleteCount = max(min(deleteCount, length - start), 0); - var result = changetype>(runtime.makeArray(deleteCount, classId>(), alignof())); + var result = changetype>(runtime.makeArray(deleteCount, __runtime_id>(), alignof())); var resultStart = result.dataStart; var thisStart = this.dataStart; var thisBase = thisStart + (start << alignof()); @@ -595,7 +596,7 @@ export class Array extends ArrayBufferView { runtime.discard(result); return trimmed; // registered in .substring } - return changetype(runtime.register(result, classId())); + return changetype(runtime.register(result, __runtime_id())); } private join_int(separator: string = ","): string { @@ -632,7 +633,7 @@ export class Array extends ArrayBufferView { runtime.discard(result); return trimmed; // registered in .substring } - return changetype(runtime.register(result, classId())); + return changetype(runtime.register(result, __runtime_id())); } private join_flt(separator: string = ","): string { @@ -677,7 +678,7 @@ export class Array extends ArrayBufferView { runtime.discard(result); return trimmed; // registered in .substring } - return changetype(runtime.register(result, classId())); + return changetype(runtime.register(result, __runtime_id())); } private join_str(separator: string = ","): string { @@ -723,7 +724,7 @@ export class Array extends ArrayBufferView { changetype(value).length << 1 ); } - return changetype(runtime.register(result, classId())); + return changetype(runtime.register(result, __runtime_id())); } private join_arr(separator: string = ","): string { @@ -795,7 +796,7 @@ export class Array extends ArrayBufferView { runtime.discard(result); return out; // registered in .substring } - return changetype(runtime.register(result, classId())); + return changetype(runtime.register(result, __runtime_id())); } toString(): string { @@ -804,8 +805,8 @@ export class Array extends ArrayBufferView { // GC integration - @unsafe private __iterate(fn: (ref: usize) => void): void { - fn(changetype(this.data)); + @unsafe private __traverse(): void { + __ref_mark(changetype(this.data)); if (isManaged()) { let cur = this.dataStart; let end = cur + this.dataLength; @@ -813,12 +814,12 @@ export class Array extends ArrayBufferView { let val = load(cur); if (isNullable()) { if (val) { - fn(val); - call_indirect(classId(), val, fn); + __ref_mark(val); + call_direct(__runtime_id(), val); } } else { - fn(val); - call_indirect(classId(), val, fn); + __ref_mark(val); + call_direct(__runtime_id(), val); } cur += sizeof(); } diff --git a/std/assembly/arraybuffer.ts b/std/assembly/arraybuffer.ts index 558983e0ab..c186a5a49b 100644 --- a/std/assembly/arraybuffer.ts +++ b/std/assembly/arraybuffer.ts @@ -1,4 +1,5 @@ -import { runtime, HEADER, HEADER_SIZE, classId } from "./runtime"; +import { HEADER, HEADER_SIZE, MAX_BYTELENGTH } from "./util/runtime"; +import { runtime, __runtime_id } from "./runtime"; import { E_INVALIDLENGTH } from "./util/error"; export abstract class ArrayBufferView { @@ -8,7 +9,7 @@ export abstract class ArrayBufferView { @unsafe dataLength: u32; protected constructor(length: i32, alignLog2: i32) { - if (length > runtime.MAX_BYTELENGTH >>> alignLog2) throw new RangeError(E_INVALIDLENGTH); + if (length > MAX_BYTELENGTH >>> alignLog2) throw new RangeError(E_INVALIDLENGTH); var buffer = new ArrayBuffer(length = length << alignLog2); this.data = buffer; this.dataStart = changetype(buffer); @@ -50,24 +51,24 @@ export abstract class ArrayBufferView { } constructor(length: i32) { - if (length > runtime.MAX_BYTELENGTH) throw new RangeError(E_INVALIDLENGTH); + if (length > MAX_BYTELENGTH) throw new RangeError(E_INVALIDLENGTH); var buffer = runtime.allocate(length); memory.fill(changetype(buffer), 0, length); - return changetype(runtime.register(buffer, classId())); + return changetype(runtime.register(buffer, __runtime_id())); } get byteLength(): i32 { return changetype
(changetype(this) - HEADER_SIZE).payloadSize; } - slice(begin: i32 = 0, end: i32 = runtime.MAX_BYTELENGTH): ArrayBuffer { + slice(begin: i32 = 0, end: i32 = MAX_BYTELENGTH): ArrayBuffer { var length = this.byteLength; begin = begin < 0 ? max(length + begin, 0) : min(begin, length); end = end < 0 ? max(length + end , 0) : min(end , length); var outSize = max(end - begin, 0); var out = runtime.allocate(outSize); memory.copy(out, changetype(this) + begin, outSize); - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } toString(): string { diff --git a/std/assembly/builtins.ts b/std/assembly/builtins.ts index be4f79055e..5d192c7226 100644 --- a/std/assembly/builtins.ts +++ b/std/assembly/builtins.ts @@ -176,6 +176,10 @@ export declare function unchecked(expr: T): T; @builtin export declare function call_indirect(target: void, ...args: void[]): T; +// @ts-ignore: decorator +@builtin +export declare function call_direct(target: void, ...args: void[]): T; + // @ts-ignore: decorator @builtin export declare function instantiate(...args: void[]): T; diff --git a/std/assembly/collector/README.md b/std/assembly/collector/README.md index 10fab0278c..d6071fca79 100644 --- a/std/assembly/collector/README.md +++ b/std/assembly/collector/README.md @@ -21,6 +21,9 @@ Tracing * **__ref_unlink**(ref: `usize`, parentRef: `usize`): `void`
Unlinks a reference from a parent that was referencing it. Implementation is optional. +* **__ref_mark**(ref: `usize`): `void`
+ Marks a reference as being reachable so it doesn't become sweeped. + Reference counting ------------------ diff --git a/std/assembly/collector/dummy.ts b/std/assembly/collector/dummy.ts index 98690829ff..231e8e90c0 100644 --- a/std/assembly/collector/dummy.ts +++ b/std/assembly/collector/dummy.ts @@ -29,3 +29,9 @@ function __ref_link(ref: usize, parentRef: usize): void { function __ref_unlink(ref: usize, parentRef: usize): void { if (TRACE) trace("dummy.unlink", 2, ref, parentRef); } + +// @ts-ignore: decorator +@global @unsafe +function __ref_mark(ref: usize): void { + if (TRACE) trace("dummy.mark", 1, ref); +} diff --git a/std/assembly/collector/index.d.ts b/std/assembly/collector/index.d.ts index 9b41caf758..74a44d041e 100644 --- a/std/assembly/collector/index.d.ts +++ b/std/assembly/collector/index.d.ts @@ -5,6 +5,7 @@ declare function __ref_register(ref: usize): void; // tracing declare function __ref_link(ref: usize, parentRef: usize): void; declare function __ref_unlink(ref: usize, parentRef: usize): void; +declare function __ref_mark(ref: usize): void; // reference counting declare function __ref_retain(ref: usize): void; diff --git a/std/assembly/collector/itcm.ts b/std/assembly/collector/itcm.ts index 5669e32a14..da3db06c02 100644 --- a/std/assembly/collector/itcm.ts +++ b/std/assembly/collector/itcm.ts @@ -4,7 +4,8 @@ @inline const TRACE = isDefined(GC_TRACE); -import { iterateRoots, HEADER_SIZE } from "../runtime"; +import { HEADER_SIZE } from "../util/runtime"; +import { __gc_mark_roots, __gc_mark_members } from "../gc"; /** Collector states. */ const enum State { @@ -155,10 +156,7 @@ function step(): void { } case State.IDLE: { if (TRACE) trace("itcm~step/IDLE"); - iterateRoots((ref: usize): void => { - var obj = refToObj(ref); - if (obj.color == white) obj.makeGray(); - }); + __gc_mark_roots(); state = State.MARK; if (TRACE) trace("itcm~state = MARK"); break; @@ -166,21 +164,14 @@ function step(): void { case State.MARK: { obj = iter.next; if (obj !== toSpace) { - if (TRACE) trace("itcm~step/MARK iterate", 1, objToRef(obj)); + if (TRACE) trace("itcm~step/MARK", 1, objToRef(obj)); iter = obj; obj.color = i32(!white); - // CLASS~iterate(ref, fn) - call_indirect(obj.classId, objToRef(obj), (ref: usize): void => { - trace(" iter", 1, ref); - var obj = refToObj(ref); - if (obj.color == white) obj.makeGray(); - }); + // TODO: directize through __gc_mark_members + call_indirect(obj.classId, objToRef(obj)); // CLASS~traverse(ref) } else { + __gc_mark_roots(); if (TRACE) trace("itcm~step/MARK finish"); - iterateRoots((ref: usize): void => { - var obj = refToObj(ref); - if (obj.color == white) obj.makeGray(); - }); obj = iter.next; if (obj === toSpace) { let from = fromSpace; @@ -257,7 +248,9 @@ export function __ref_link(ref: usize, parentRef: usize): void { } // @ts-ignore: decorator -// @global @unsafe -// export function __ref_unlink(ref: usize, parentRef: usize): void { -// if (TRACE) trace("itcm.unlink", 2, ref, parentRef); -// } +@global @unsafe +export function __ref_mark(ref: usize): void { + if (TRACE) trace("itcm.mark", 1, ref); + var obj = refToObj(ref); + if (obj.color == white) obj.makeGray(); +} diff --git a/std/assembly/dataview.ts b/std/assembly/dataview.ts index 144c1cd104..875f830749 100644 --- a/std/assembly/dataview.ts +++ b/std/assembly/dataview.ts @@ -1,4 +1,4 @@ -import { runtime } from "./runtime"; +import { MAX_BYTELENGTH } from "./util/runtime"; import { ArrayBuffer } from "./arraybuffer"; import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH } from "./util/error"; @@ -13,11 +13,10 @@ export class DataView { constructor( buffer: ArrayBuffer, byteOffset: i32 = 0, - byteLength: i32 = i32.MIN_VALUE // FIXME: TS2304: Cannot find name 'buffer'. + byteLength: i32 = buffer.byteLength ) { - if (byteLength === i32.MIN_VALUE) byteLength = buffer.byteLength - byteOffset; // FIXME if ( - i32(byteLength > runtime.MAX_BYTELENGTH) | + i32(byteLength > MAX_BYTELENGTH) | i32(byteOffset + byteLength > buffer.byteLength) ) throw new RangeError(E_INVALIDLENGTH); this.data = buffer; // links diff --git a/std/assembly/fixedarray.ts b/std/assembly/fixedarray.ts index e63ecab004..0553bb493f 100644 --- a/std/assembly/fixedarray.ts +++ b/std/assembly/fixedarray.ts @@ -1,4 +1,5 @@ -import { runtime, classId, HEADER, HEADER_SIZE } from "./runtime"; +import { HEADER, HEADER_SIZE, MAX_BYTELENGTH } from "./util/runtime"; +import { runtime, __runtime_id } from "./runtime"; import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_HOLEYARRAY } from "./util/error"; // NOTE: DO NOT USE YET! @@ -10,7 +11,7 @@ export class FixedArray { [key: number]: T; constructor(length: i32) { - if (length > runtime.MAX_BYTELENGTH >>> alignof()) throw new RangeError(E_INVALIDLENGTH); + if (length > MAX_BYTELENGTH >>> alignof()) throw new RangeError(E_INVALIDLENGTH); if (isReference()) { if (!isNullable()) { if (length) throw new Error(E_HOLEYARRAY); @@ -19,7 +20,7 @@ export class FixedArray { var outSize = length << alignof(); var out = runtime.allocate(outSize); memory.fill(out, 0, outSize); - return changetype>(runtime.register(out, classId>())); + return changetype>(runtime.register(out, __runtime_id>())); } get length(): i32 { @@ -71,7 +72,7 @@ export class FixedArray { // GC integration - @unsafe private __iterate(fn: (ref: usize) => void): void { + @unsafe private __traverse(): void { if (isManaged()) { let cur = changetype(this); let end = cur + changetype
(changetype(this) - HEADER_SIZE).payloadSize; @@ -79,12 +80,12 @@ export class FixedArray { let val = load(cur); if (isNullable()) { if (val) { - fn(val); - call_indirect(classId(), val, fn); + __ref_mark(val); + call_direct(__runtime_id(), val); } } else { - fn(val); - call_indirect(classId(), val, fn); + __ref_mark(val); + call_direct(__runtime_id(), val); } cur += sizeof(); } diff --git a/std/assembly/gc.ts b/std/assembly/gc.ts index c1195c2d2b..f19fc4a187 100644 --- a/std/assembly/gc.ts +++ b/std/assembly/gc.ts @@ -2,9 +2,19 @@ import { E_NOTIMPLEMENTED } from "./util/error"; +/** Marks root objects. */ +// @ts-ignore: decorator +@unsafe @builtin +export declare function __gc_mark_roots(): void; + +/** Marks class members. */ +// @ts-ignore: decorator +@unsafe @builtin +export declare function __gc_mark_members(classId: u32, ref: usize): void; + // @ts-ignore @lazy -var GC_ROOT = new Set(); +var ROOT = new Set(); /** Garbage collector interface. */ export namespace gc { @@ -24,7 +34,7 @@ export namespace gc { // @ts-ignore: decorator @unsafe export function retain(ref: usize): void { - var root = GC_ROOT; + var root = ROOT; if (!root.has(ref)) { root.add(ref); if (implemented) { @@ -38,7 +48,7 @@ export namespace gc { // @ts-ignore: decorator @unsafe export function release(ref: usize): void { - var root = GC_ROOT; + var root = ROOT; if (root.has(ref)) { root.delete(ref); if (implemented) { diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index 67f655cb44..36f846cbae 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -118,6 +118,8 @@ declare function changetype(value: any): T; declare function unchecked(value: T): T; /** Emits a `call_indirect` instruction, calling the specified function in the function table by index with the specified arguments. Does result in a runtime error if the arguments do not match the called function. */ declare function call_indirect(target: Function | u32, ...args: any[]): T; +/** Emits a `call` instruction, calling the specified function in the function table directly with the specified arguments. Function index must be a compile-time constant. */ +declare function call_direct(target: Function | u32, ...args: any[]): T; /** Instantiates a new instance of `T` using the specified constructor arguments. */ declare function instantiate(...args: any[]): T; /** Tests if a 32-bit or 64-bit float is `NaN`. */ diff --git a/std/assembly/map.ts b/std/assembly/map.ts index 73ab45140d..01f1a1e6c5 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -1,7 +1,7 @@ /// import { HASH } from "./util/hash"; -import { classId } from "./runtime"; +import { __runtime_id } from "./runtime"; // A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht @@ -268,10 +268,10 @@ export class Map { // GC integration - @unsafe private __iterate(fn: (ref: usize) => void): void { - fn(changetype(this.buckets)); + @unsafe private __traverse(): void { + __ref_mark(changetype(this.buckets)); var entries = this.entries; - fn(changetype(entries)); + __ref_mark(changetype(entries)); if (isManaged() || isManaged()) { let cur = changetype(entries); let end = cur + this.entriesOffset * ENTRY_SIZE(); @@ -282,24 +282,24 @@ export class Map { let val = changetype(entry.key); if (isNullable()) { if (val) { - fn(val); - call_indirect(classId(), val, fn); + __ref_mark(val); + call_direct(__runtime_id(), val); } } else { - fn(val); - call_indirect(classId(), val, fn); + __ref_mark(val); + call_direct(__runtime_id(), val); } } if (isManaged()) { let val = changetype(entry.value); if (isNullable()) { if (val) { - fn(val); - call_indirect(classId(), val, fn); + __ref_mark(val); + call_direct(__runtime_id(), val); } } else { - fn(val); - call_indirect(classId(), val, fn); + __ref_mark(val); + call_direct(__runtime_id(), val); } } } diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index f019c8813e..1e0fcd0400 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -1,58 +1,18 @@ // The runtime provides common functionality that links runtime interfaces for memory management // and garbage collection to the standard library, making sure it all plays well together. -import { AL_MASK, MAX_SIZE_32 } from "./util/allocator"; +import { HEADER, HEADER_SIZE, HEADER_MAGIC } from "./util/runtime"; import { HEAP_BASE, memory } from "./memory"; import { ArrayBufferView } from "./arraybuffer"; -/** - * The common runtime object header prepended to all managed objects. Has a size of 16 bytes in - * WASM32 and contains a classId (e.g. for instanceof checks), the allocation size (e.g. for - * .byteLength and .length computation) and additional reserved fields to be used by GC. If no - * GC is present, the HEADER is cut into half excluding the reserved fields, as indicated by - * HEADER_SIZE. -*/ -@unmanaged export class HEADER { - /** Unique id of the respective class or a magic value if not yet registered.*/ - classId: u32; - /** Size of the allocated payload. */ - payloadSize: u32; - /** Reserved field for use by GC. Only present if GC is. */ - reserved1: usize; // itcm: tagged next - /** Reserved field for use by GC. Only present if GC is. */ - reserved2: usize; // itcm: prev -} - -/** Common runtime header size. */ -// @ts-ignore: decorator -@lazy -export const HEADER_SIZE: usize = isDefined(__ref_collect) - ? (offsetof
( ) + AL_MASK) & ~AL_MASK // full header if GC is present - : (offsetof
("reserved1") + AL_MASK) & ~AL_MASK; // half header if GC is absent - -/** Common runtime header magic. Used to assert registered/unregistered status. */ -// @ts-ignore: decorator -@lazy -export const HEADER_MAGIC: u32 = 0xA55E4B17; - -/** Gets the computed unique class id of a class type. */ +/** Gets the computed unique id of a class type. */ // @ts-ignore: decorator @unsafe @builtin -export declare function classId(): u32; - -/** Iterates over all root objects of a reference type. */ -// @ts-ignore: decorator -@unsafe @builtin -export declare function iterateRoots(fn: (ref: usize) => void): void; +export declare function __runtime_id(): u32; /** Runtime implementation. */ export namespace runtime { - /** Maximum byte length of any buffer-like object. */ - // @ts-ignore - @lazy - export const MAX_BYTELENGTH: i32 = MAX_SIZE_32 - HEADER_SIZE; - /** Adjusts an allocation to actual block size. Primarily targets TLSF. */ export function adjust(payloadSize: usize): usize { // round up to power of 2, e.g. with HEADER_SIZE=8: @@ -152,10 +112,10 @@ export namespace runtime { // @ts-ignore: decorator @unsafe - export function makeArray(capacity: i32, cid: u32, alignLog2: usize, source: usize = 0): usize { - var array = runtime.register(runtime.allocate(offsetof()), cid); + export function makeArray(capacity: i32, id: u32, alignLog2: usize, source: usize = 0): usize { + var array = runtime.register(runtime.allocate(offsetof()), id); var bufferSize = capacity << alignLog2; - var buffer = runtime.register(runtime.allocate(capacity << alignLog2), classId()); + var buffer = runtime.register(runtime.allocate(capacity << alignLog2), __runtime_id()); changetype(array).data = changetype(buffer); // links changetype(array).dataStart = buffer; changetype(array).dataLength = bufferSize; diff --git a/std/assembly/set.ts b/std/assembly/set.ts index d48d7d1d89..8cba7dc4b3 100644 --- a/std/assembly/set.ts +++ b/std/assembly/set.ts @@ -1,7 +1,7 @@ /// import { HASH } from "./util/hash"; -import { classId } from "./runtime"; +import { __runtime_id } from "./runtime"; // A deterministic hash set based on CloseTable from https://github.com/jorendorff/dht @@ -198,10 +198,10 @@ export class Set { // GC integration - @unsafe private __iterate(fn: (ref: usize) => void): void { - fn(changetype(this.buckets)); + @unsafe private __traverse(): void { + __ref_mark(changetype(this.buckets)); var entries = this.entries; - fn(changetype(entries)); + __ref_mark(changetype(entries)); if (isManaged()) { let cur = changetype(entries); let end = cur + this.entriesOffset * ENTRY_SIZE(); @@ -211,12 +211,12 @@ export class Set { let val = changetype(entry.key); if (isNullable()) { if (val) { - fn(val); - call_indirect(classId(), val, fn); + __ref_mark(val); + call_direct(__runtime_id(), val); } } else { - fn(val); - call_indirect(classId(), val, fn); + __ref_mark(val); + call_direct(__runtime_id(), val); } } cur += ENTRY_SIZE(); diff --git a/std/assembly/string.ts b/std/assembly/string.ts index e96155af27..8218cae405 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -1,10 +1,11 @@ /// import { MAX_SIZE_32 } from "./util/allocator"; -import { runtime, HEADER, HEADER_SIZE, classId } from "./runtime"; -import { ArrayBufferView } from "./arraybuffer"; +import { HEADER, HEADER_SIZE } from "./util/runtime"; import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./util/string"; import { E_INVALIDLENGTH } from "./util/error"; +import { runtime, __runtime_id } from "./runtime"; +import { ArrayBufferView } from "./arraybuffer"; @sealed export abstract class String { @@ -18,7 +19,7 @@ import { E_INVALIDLENGTH } from "./util/error"; static fromCharCode(code: i32): String { var out = runtime.allocate(2); store(out, code); - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } static fromCodePoint(code: i32): String { @@ -33,7 +34,7 @@ import { E_INVALIDLENGTH } from "./util/error"; let lo: u32 = (code & 0x3FF) + 0xDC00; store(out, (hi << 16) | lo); } - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } @operator("[]") charAt(pos: i32): String { @@ -41,7 +42,7 @@ import { E_INVALIDLENGTH } from "./util/error"; if (pos >= this.length) return changetype(""); var out = runtime.allocate(2); store(out, load(changetype(this) + (pos << 1))); - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } charCodeAt(pos: i32): i32 { @@ -71,7 +72,7 @@ import { E_INVALIDLENGTH } from "./util/error"; var out = runtime.allocate(outSize); memory.copy(out, changetype(this), thisSize); memory.copy(out + thisSize, changetype(other), otherSize); - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } endsWith(searchString: String, endPosition: i32 = String.MAX_LENGTH): bool { @@ -183,7 +184,7 @@ import { E_INVALIDLENGTH } from "./util/error"; if (resultLength <= 0) return changetype(""); var out = runtime.allocate(resultLength << 1); memory.copy(out, changetype(this) + intStart, resultLength); - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } substring(start: i32, end: i32 = i32.MAX_VALUE): String { @@ -198,7 +199,7 @@ import { E_INVALIDLENGTH } from "./util/error"; if (!fromPos && toPos == this.length << 1) return this; var out = runtime.allocate(len); memory.copy(out, changetype(this) + fromPos, len); - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } trim(): String { @@ -226,7 +227,7 @@ import { E_INVALIDLENGTH } from "./util/error"; if (!start && size == length << 1) return this; var out = runtime.allocate(size); memory.copy(out, changetype(this) + offset, size); - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } @inline @@ -256,7 +257,7 @@ import { E_INVALIDLENGTH } from "./util/error"; if (!size) return changetype(""); var out = runtime.allocate(size); memory.copy(out, changetype(this) + offset, size); - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } trimEnd(): String { @@ -275,7 +276,7 @@ import { E_INVALIDLENGTH } from "./util/error"; if (size == originalSize) return this; var out = runtime.allocate(size); memory.copy(out, changetype(this), size); - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } padStart(targetLength: i32, padString: string = " "): String { @@ -296,7 +297,7 @@ import { E_INVALIDLENGTH } from "./util/error"; memory.copy(out, changetype(padString), prependSize); } memory.copy(out + prependSize, changetype(this), thisSize); - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } padEnd(targetLength: i32, padString: string = " "): String { @@ -317,7 +318,7 @@ import { E_INVALIDLENGTH } from "./util/error"; } else { memory.copy(out + thisSize, changetype(padString), appendSize); } - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } repeat(count: i32 = 0): String { @@ -333,7 +334,7 @@ import { E_INVALIDLENGTH } from "./util/error"; if (count == 1) return this; var out = runtime.allocate((length * count) << 1); memory.repeat(out, changetype(this), length << 1, count); - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } slice(beginIndex: i32, endIndex: i32 = i32.MAX_VALUE): String { @@ -344,27 +345,27 @@ import { E_INVALIDLENGTH } from "./util/error"; if (len <= 0) return changetype(""); var out = runtime.allocate(len << 1); memory.copy(out, changetype(this) + (begin << 1), len << 1); - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } split(separator: String | null = null, limit: i32 = i32.MAX_VALUE): String[] { assert(this !== null); - if (!limit) return changetype(runtime.makeArray(0, classId(), alignof())); + if (!limit) return changetype(runtime.makeArray(0, __runtime_id(), alignof())); if (separator === null) return [this]; var length: isize = this.length; var sepLen: isize = separator.length; if (limit < 0) limit = i32.MAX_VALUE; if (!sepLen) { - if (!length) return changetype(runtime.makeArray(0, classId(), alignof())); + if (!length) return changetype(runtime.makeArray(0, __runtime_id(), alignof())); // split by chars length = min(length, limit); - let result = changetype(runtime.makeArray(length, classId(), alignof())); + let result = changetype(runtime.makeArray(length, __runtime_id(), alignof())); let resultStart = changetype(result).dataStart; for (let i: isize = 0; i < length; ++i) { let charStr = runtime.allocate(2); store(charStr, load(changetype(this) + (i << 1))); store(resultStart + (i << alignof()), charStr); // result[i] = charStr - runtime.register(charStr, classId()); + runtime.register(charStr, __runtime_id()); if (isManaged()) { if (isDefined(__ref_link)) __ref_link(changetype(charStr), changetype(result)); if (isDefined(__ref_retain)) __ref_retain(changetype(charStr)); @@ -372,18 +373,18 @@ import { E_INVALIDLENGTH } from "./util/error"; } return result; } else if (!length) { - let result = changetype(runtime.makeArray(1, classId(), alignof())); + let result = changetype(runtime.makeArray(1, __runtime_id(), alignof())); store(changetype(result).dataStart, ""); // no need to register/link return result; } - var result = changetype(runtime.makeArray(0, classId(), alignof())); + var result = changetype(runtime.makeArray(0, __runtime_id(), alignof())); var end = 0, start = 0, i = 0; while ((end = this.indexOf(separator!, start)) != -1) { let len = end - start; if (len > 0) { let out = runtime.allocate(len << 1); memory.copy(out, changetype(this) + (start << 1), len << 1); - result.push(changetype(runtime.register(out, classId()))); + result.push(changetype(runtime.register(out, __runtime_id()))); } else { result.push(changetype("")); } @@ -391,7 +392,7 @@ import { E_INVALIDLENGTH } from "./util/error"; start = end + sepLen; } if (!start) { - let result = changetype(runtime.makeArray(1, classId(), alignof())); + let result = changetype(runtime.makeArray(1, __runtime_id(), alignof())); unchecked(result[0] = this); return result; } @@ -399,7 +400,7 @@ import { E_INVALIDLENGTH } from "./util/error"; if (len > 0) { let out = runtime.allocate(len << 1); memory.copy(out, changetype(this) + (start << 1), len << 1); - result.push(changetype(runtime.register(out, classId()))); + result.push(changetype(runtime.register(out, __runtime_id()))); } else { result.push(changetype("")); } @@ -474,7 +475,7 @@ import { E_INVALIDLENGTH } from "./util/error"; var out = runtime.allocate(bufPos); memory.copy(changetype(out), buf, bufPos); memory.free(buf); - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } toUTF8(): usize { diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index 44deb819c2..f465825145 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -1,4 +1,4 @@ -import { runtime, classId } from "./runtime"; +import { runtime, __runtime_id } from "./runtime"; import { ArrayBufferView } from "./arraybuffer"; import { COMPARATOR, SORT as SORT_IMPL } from "./util/sort"; import { E_INDEXOUTOFRANGE } from "./util/error"; @@ -967,7 +967,7 @@ function SUBARRAY( changetype(out).data = data; // links changetype(out).dataStart = dataStart + (begin << alignof()); changetype(out).dataLength = (end - begin) << alignof(); - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } // @ts-ignore: decorator diff --git a/std/assembly/util/number.ts b/std/assembly/util/number.ts index 4cb4608d5d..d8d5b841ea 100644 --- a/std/assembly/util/number.ts +++ b/std/assembly/util/number.ts @@ -1,4 +1,4 @@ -import { runtime, classId } from "../runtime"; +import { runtime, __runtime_id } from "../runtime"; import { ArrayBufferView } from "../arraybuffer"; import { CharCode } from "./string"; @@ -266,7 +266,7 @@ export function utoa32(value: u32): String { var out = runtime.allocate(decimals << 1); utoa32_core(changetype(out), value, decimals); - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } export function itoa32(value: i32): String { @@ -281,7 +281,7 @@ export function itoa32(value: i32): String { utoa32_core(changetype(out), value, decimals); if (sign) store(changetype(out), CharCode.MINUS); - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } export function utoa64(value: u64): String { @@ -298,7 +298,7 @@ export function utoa64(value: u64): String { out = runtime.allocate(decimals << 1); utoa64_core(changetype(out), value, decimals); } - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } export function itoa64(value: i64): String { @@ -320,7 +320,7 @@ export function itoa64(value: i64): String { } if (sign) store(changetype(out), CharCode.MINUS); - return changetype(runtime.register(out, classId())); + return changetype(runtime.register(out, __runtime_id())); } export function itoa(value: T): String { diff --git a/std/assembly/util/runtime.ts b/std/assembly/util/runtime.ts new file mode 100644 index 0000000000..c1307da415 --- /dev/null +++ b/std/assembly/util/runtime.ts @@ -0,0 +1,36 @@ +import { AL_MASK, MAX_SIZE_32 } from "./allocator"; + +/** + * The common runtime object header prepended to all managed objects. Has a size of 16 bytes in + * WASM32 and contains a classId (e.g. for instanceof checks), the allocation size (e.g. for + * .byteLength and .length computation) and additional reserved fields to be used by GC. If no + * GC is present, the HEADER is cut into half excluding the reserved fields, as indicated by + * HEADER_SIZE. +*/ +@unmanaged export class HEADER { + /** Unique id of the respective class or a magic value if not yet registered.*/ + classId: u32; + /** Size of the allocated payload. */ + payloadSize: u32; + /** Reserved field for use by GC. Only present if GC is. */ + reserved1: usize; // itcm: tagged next + /** Reserved field for use by GC. Only present if GC is. */ + reserved2: usize; // itcm: prev +} + +/** Common runtime header size. */ +// @ts-ignore: decorator +@lazy +export const HEADER_SIZE: usize = isDefined(__ref_collect) + ? (offsetof
( ) + AL_MASK) & ~AL_MASK // full header if GC is present + : (offsetof
("reserved1") + AL_MASK) & ~AL_MASK; // half header if GC is absent + +/** Common runtime header magic. Used to assert registered/unregistered status. */ +// @ts-ignore: decorator +@lazy +export const HEADER_MAGIC: u32 = 0xA55E4B17; + +/** Maximum byte length of any buffer-like object. */ +// @ts-ignore +@lazy +export const MAX_BYTELENGTH: i32 = MAX_SIZE_32 - HEADER_SIZE; diff --git a/tests/compiler/assert-nonnull.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat index 8f3e285164..91afd2e4b4 100644 --- a/tests/compiler/assert-nonnull.optimized.wat +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -58,7 +58,7 @@ if i32.const 0 i32.const 16 - i32.const 95 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -72,7 +72,7 @@ if i32.const 0 i32.const 16 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/assert-nonnull.untouched.wat b/tests/compiler/assert-nonnull.untouched.wat index e855d4fcce..21c264d2ac 100644 --- a/tests/compiler/assert-nonnull.untouched.wat +++ b/tests/compiler/assert-nonnull.untouched.wat @@ -74,7 +74,7 @@ if i32.const 0 i32.const 16 - i32.const 95 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -88,7 +88,7 @@ if i32.const 0 i32.const 16 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -128,7 +128,7 @@ if i32.const 0 i32.const 16 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 4ccab13844..b6d70658e7 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -106,7 +106,7 @@ if i32.const 0 i32.const 16 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -121,7 +121,7 @@ if i32.const 0 i32.const 16 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index 6bc65dd181..b047896f5c 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -9,10 +9,10 @@ (data (i32.const 48) "\02\00\00\00\1a\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 84)) (export "memory" (memory $0)) @@ -22,7 +22,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -121,13 +121,13 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 i32.store offset=4 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -139,24 +139,24 @@ if i32.const 0 i32.const 16 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 16 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index ffdd0ac9c3..5481e7b5ef 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -1,18 +1,18 @@ (module - (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\10") (data (i32.const 24) "c\00l\00a\00s\00s\00.\00t\00s") (table $0 2 funcref) - (elem (i32.const 0) $start $~lib/string/String~iterate) + (elem (i32.const 0) $start $~lib/string/String~traverse) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $class/test)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/string/String~iterate (; 0 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/string/String~traverse (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) (func $class/test (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) diff --git a/tests/compiler/class.untouched.wat b/tests/compiler/class.untouched.wat index cbfea5a127..24c686ea0e 100644 --- a/tests/compiler/class.untouched.wat +++ b/tests/compiler/class.untouched.wat @@ -1,7 +1,6 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$fff (func (param f32 f32) (result f32))) (type $FUNCSIG$v (func)) @@ -12,7 +11,7 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00c\00l\00a\00s\00s\00.\00t\00s\00") (table $0 2 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate) + (elem (i32.const 0) $null $~lib/string/String~traverse) (global $class/Animal.ONE (mut i32) (i32.const 1)) (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) (global $~lib/capabilities i32 (i32.const 2)) @@ -21,8 +20,8 @@ (export "test" (func $class/test)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/string/String~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/string/String~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) (func $class/Animal.add (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index df9f379b05..73a58d4b46 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -7,19 +7,15 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) - (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) (data (i32.const 8) "\01\00\00\00,") (data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") (data (i32.const 72) "\01\00\00\00\1e") (data (i32.const 88) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 120) "\01\00\00\00\12") - (data (i32.const 136) " \00 \00 \00 \00 \00i\00t\00e\00r") - (table $0 14 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/string/String~iterate $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1 $~lib/collector/itcm/step~anonymous|0 $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate) + (table $0 11 funcref) + (elem (i32.const 0) $null $~lib/string/String~traverse $~lib/string/String~traverse $~lib/string/String~traverse $~lib/string/String~traverse $~lib/string/String~traverse $~lib/string/String~traverse $~lib/string/String~traverse $~lib/string/String~traverse $~lib/string/String~traverse $~lib/string/String~traverse) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) @@ -42,10 +38,10 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/string/String~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/string/String~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.const 22 i32.ge_u @@ -65,7 +61,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 4 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 22 i32.ge_u @@ -100,7 +96,7 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Block#get:right (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const -4 @@ -134,7 +130,7 @@ end local.get $0 ) - (func $~lib/allocator/tlsf/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -150,7 +146,7 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -184,7 +180,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -203,7 +199,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -332,7 +328,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const 2 @@ -362,7 +358,7 @@ end local.get $0 ) - (func $~lib/allocator/tlsf/Root#setJump (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 i32.load i32.const 1 @@ -407,7 +403,7 @@ local.get $0 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -637,7 +633,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -760,7 +756,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#insert ) - (func $~lib/allocator/tlsf/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -774,7 +770,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -886,7 +882,7 @@ end end ) - (func $~lib/allocator/tlsf/Root#use (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -997,7 +993,7 @@ i32.const 8 i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1023,14 +1019,14 @@ if unreachable end - i32.const 160 + i32.const 120 local.set $2 - i32.const 160 + i32.const 120 global.set $~lib/allocator/tlsf/ROOT i32.const 2912 i32.const 0 i32.store - i32.const 160 + i32.const 120 i32.const 0 i32.store i32.const 0 @@ -1040,7 +1036,7 @@ i32.const 22 i32.lt_u if - i32.const 160 + i32.const 120 local.get $1 i32.const 0 call $~lib/allocator/tlsf/Root#setSLMap @@ -1051,7 +1047,7 @@ i32.const 32 i32.lt_u if - i32.const 160 + i32.const 120 local.get $1 local.get $3 i32.const 0 @@ -1070,8 +1066,8 @@ br $repeat|0 end end - i32.const 160 - i32.const 3080 + i32.const 120 + i32.const 3040 current_memory i32.const 16 i32.shl @@ -1167,7 +1163,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/runtime.allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -1194,114 +1190,7 @@ i32.const 16 i32.add ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=12 - local.set $2 - local.get $1 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.and - local.get $0 - i32.or - i32.store offset=8 - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.and - local.get $1 - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/collector/itcm/iter - local.get $0 - i32.eq - if - local.get $0 - i32.load offset=12 - global.set $~lib/collector/itcm/iter - end - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.load offset=12 - local.tee $1 - i32.store offset=12 - local.get $1 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.and - local.get $2 - i32.or - i32.store offset=8 - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - i32.const 2 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/step~anonymous|0 (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/collector/itcm/step~anonymous|1 (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 136 - i32.const 1 - local.get $0 - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/allocator/tlsf/__mem_free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1339,7 +1228,7 @@ end end ) - (func $~lib/collector/itcm/step (; 24 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/step (; 19 ;) (type $FUNCSIG$v) (local $0 i32) block $break|0 block $case3|0 @@ -1390,8 +1279,7 @@ i32.const 1 global.set $~lib/collector/itcm/state end - i32.const 3 - call $~iterateRoots + call $~lib/gc/__gc_mark_roots i32.const 2 global.set $~lib/collector/itcm/state br $break|0 @@ -1418,13 +1306,11 @@ local.get $0 i32.const 16 i32.add - i32.const 4 local.get $0 i32.load - call_indirect (type $FUNCSIG$vii) + call_indirect (type $FUNCSIG$vi) else - i32.const 5 - call $~iterateRoots + call $~lib/gc/__gc_mark_roots global.get $~lib/collector/itcm/toSpace global.get $~lib/collector/itcm/iter i32.load offset=8 @@ -1463,7 +1349,7 @@ i32.and global.set $~lib/collector/itcm/iter local.get $0 - i32.const 156 + i32.const 120 i32.ge_u if local.get $0 @@ -1482,7 +1368,35 @@ end end ) - (func $~lib/collector/itcm/__ref_register (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $0 + i32.or + i32.store offset=8 + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.and + local.get $1 + i32.or + i32.store offset=8 + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/collector/itcm/__ref_register (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) call $~lib/collector/itcm/step local.get $0 i32.const 16 @@ -1499,15 +1413,15 @@ local.get $0 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/runtime.register (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 156 + i32.const 120 i32.le_u if i32.const 0 i32.const 88 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -1522,7 +1436,7 @@ if i32.const 0 i32.const 88 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -1536,14 +1450,14 @@ end local.get $0 ) - (func $constructor/CtorConditionallyAllocates#constructor (; 27 ;) (type $FUNCSIG$i) (result i32) + (func $constructor/CtorConditionallyAllocates#constructor (; 23 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) block (result i32) global.get $constructor/b if i32.const 0 call $~lib/runtime/runtime.allocate - i32.const 13 + i32.const 10 call $~lib/runtime/runtime.register local.set $0 end @@ -1553,13 +1467,13 @@ if i32.const 0 call $~lib/runtime/runtime.allocate - i32.const 13 + i32.const 10 call $~lib/runtime/runtime.register local.set $0 end local.get $0 ) - (func $start:constructor (; 28 ;) (type $FUNCSIG$v) + (func $start:constructor (; 24 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $~lib/runtime/runtime.allocate @@ -1568,7 +1482,7 @@ global.set $constructor/emptyCtor i32.const 4 call $~lib/runtime/runtime.allocate - i32.const 6 + i32.const 3 call $~lib/runtime/runtime.register local.tee $0 i32.const 1 @@ -1577,7 +1491,7 @@ global.set $constructor/emptyCtorWithFieldInit i32.const 4 call $~lib/runtime/runtime.allocate - i32.const 7 + i32.const 4 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -1586,12 +1500,12 @@ global.set $constructor/emptyCtorWithFieldNoInit i32.const 0 call $~lib/runtime/runtime.allocate - i32.const 8 + i32.const 5 call $~lib/runtime/runtime.register global.set $constructor/none i32.const 4 call $~lib/runtime/runtime.allocate - i32.const 9 + i32.const 6 call $~lib/runtime/runtime.register local.tee $0 i32.const 1 @@ -1600,7 +1514,7 @@ global.set $constructor/justFieldInit i32.const 4 call $~lib/runtime/runtime.allocate - i32.const 10 + i32.const 7 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -1619,95 +1533,140 @@ end i32.const 0 call $~lib/runtime/runtime.allocate - i32.const 11 + i32.const 8 call $~lib/runtime/runtime.register end global.set $constructor/ctorConditionallyReturns i32.const 0 call $~lib/runtime/runtime.allocate - i32.const 12 + i32.const 9 call $~lib/runtime/runtime.register global.set $constructor/ctorAllocates call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates ) - (func $start (; 29 ;) (type $FUNCSIG$v) + (func $start (; 25 ;) (type $FUNCSIG$v) call $start:constructor ) - (func $null (; 30 ;) (type $FUNCSIG$v) + (func $null (; 26 ;) (type $FUNCSIG$v) nop ) - (func $~iterateRoots (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) - global.get $constructor/emptyCtor + (local $2 i32) + global.get $~lib/collector/itcm/iter + local.get $0 + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + local.tee $2 + local.get $0 + i32.load offset=12 local.tee $1 + i32.store offset=12 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $2 + i32.or + i32.store offset=8 + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/__ref_mark (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/gc/__gc_mark_roots (; 29 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $constructor/emptyCtor + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end global.get $constructor/emptyCtorWithFieldInit - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end global.get $constructor/emptyCtorWithFieldNoInit - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end global.get $constructor/none - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end global.get $constructor/justFieldInit - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end global.get $constructor/justFieldNoInit - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end global.get $constructor/ctorReturns - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end global.get $constructor/ctorConditionallyReturns - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end global.get $constructor/ctorAllocates - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end global.get $constructor/ctorConditionallyAllocates - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end ) ) diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index 18e3224caa..cfec0087ef 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -7,16 +7,13 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) - (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) (data (i32.const 8) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") (data (i32.const 72) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 120) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00i\00t\00e\00r\00") - (table $0 14 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $constructor/EmptyCtor~iterate $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1 $~lib/collector/itcm/step~anonymous|2 $constructor/EmptyCtorWithFieldInit~iterate $constructor/EmptyCtorWithFieldNoInit~iterate $constructor/None~iterate $constructor/JustFieldInit~iterate $constructor/JustFieldNoInit~iterate $constructor/CtorConditionallyReturns~iterate $constructor/CtorAllocates~iterate $constructor/CtorConditionallyAllocates~iterate) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (table $0 11 funcref) + (elem (i32.const 0) $null $~lib/string/String~traverse $constructor/EmptyCtor~traverse $constructor/EmptyCtorWithFieldInit~traverse $constructor/EmptyCtorWithFieldNoInit~traverse $constructor/None~traverse $constructor/JustFieldInit~traverse $constructor/JustFieldNoInit~traverse $constructor/CtorConditionallyReturns~traverse $constructor/CtorAllocates~traverse $constructor/CtorConditionallyAllocates~traverse) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) @@ -34,7 +31,7 @@ (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) @@ -52,17 +49,17 @@ (global $constructor/ctorConditionallyReturns (mut i32) (i32.const 0)) (global $constructor/ctorAllocates (mut i32) (i32.const 0)) (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 156)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 120)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -70,15 +67,15 @@ i32.sub i32.shl ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 0 local.get $1 i32.store offset=2912 ) - (func $~lib/string/String~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/string/String~traverse (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -99,7 +96,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 6 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 5 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -136,11 +133,11 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Root#get:tailRef (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.load offset=2912 ) - (func $~lib/allocator/tlsf/Block#get:right (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -180,7 +177,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/fls (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -198,7 +195,7 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -234,7 +231,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -254,7 +251,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -399,7 +396,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -431,7 +428,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/Root#setJump (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.load global.get $~lib/allocator/tlsf/FREE @@ -477,7 +474,7 @@ local.get $1 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -743,7 +740,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -896,7 +893,7 @@ call $~lib/allocator/tlsf/Root#insert i32.const 1 ) - (func $~lib/allocator/tlsf/ffs (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -912,7 +909,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/ffs (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -928,7 +925,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1069,7 +1066,7 @@ end local.get $6 ) - (func $~lib/allocator/tlsf/Root#use (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1197,7 +1194,7 @@ global.get $~lib/allocator/tlsf/Block.INFO i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1433,19 +1430,19 @@ local.get $0 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/memory/memory.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 @@ -1457,124 +1454,29 @@ i32.const 0 i32.store offset=12 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $constructor/EmptyCtor~iterate (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - ) - (func $~lib/collector/itcm/ManagedObjectList#clear (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 - i32.const 3 - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 - i32.const 3 - i32.const -1 - i32.xor - i32.and + (func $constructor/EmptyCtor~traverse (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - local.get $1 local.get $0 - i32.load offset=8 - i32.const 3 - i32.and - i32.or i32.store offset=8 - ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - local.set $1 local.get $0 - i32.load offset=12 - local.set $2 - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=12 - local.set $2 - local.get $1 local.get $0 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $0 - local.get $1 i32.store offset=12 ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/collector/itcm/iter - i32.eq - if - local.get $0 - i32.load offset=12 - global.set $~lib/collector/itcm/iter - end - local.get $0 - call $~lib/collector/itcm/ManagedObject#unlink - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 + (func $~lib/collector/itcm/ManagedObject#get:next (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 i32.const -1 i32.xor i32.and - i32.const 2 - i32.or - i32.store offset=8 ) - (func $~lib/collector/itcm/step~anonymous|0 (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - block $~lib/collector/itcm/refToObj|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - end - local.set $2 - local.get $2 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/collector/itcm/ManagedObject#set:color (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#set:color (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $0 i32.load offset=8 @@ -1586,56 +1488,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/step~anonymous|1 (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 136 - i32.const 1 - local.get $0 - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - block $~lib/collector/itcm/refToObj|inlined.1 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - end - local.set $2 - local.get $2 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/collector/itcm/step~anonymous|2 (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - block $~lib/collector/itcm/refToObj|inlined.2 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - end - local.set $2 - local.get $2 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/allocator/tlsf/__mem_free (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1678,11 +1531,11 @@ end end ) - (func $~lib/memory/memory.free (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/tlsf/__mem_free ) - (func $~lib/collector/itcm/step (; 38 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/step (; 29 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) block $break|0 @@ -1711,7 +1564,7 @@ br $break|0 end block - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE call $~lib/memory/memory.allocate global.set $~lib/collector/itcm/fromSpace global.get $~lib/collector/itcm/fromSpace @@ -1722,7 +1575,7 @@ i32.store offset=4 global.get $~lib/collector/itcm/fromSpace call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE call $~lib/memory/memory.allocate global.set $~lib/collector/itcm/toSpace global.get $~lib/collector/itcm/toSpace @@ -1740,8 +1593,7 @@ end end block - i32.const 3 - call $~iterateRoots + call $~lib/gc/__gc_mark_roots i32.const 2 global.set $~lib/collector/itcm/state br $break|0 @@ -1767,16 +1619,14 @@ local.get $0 local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add end - i32.const 4 local.get $0 i32.load - call_indirect (type $FUNCSIG$vii) + call_indirect (type $FUNCSIG$vi) else - i32.const 5 - call $~iterateRoots + call $~lib/gc/__gc_mark_roots global.get $~lib/collector/itcm/iter call $~lib/collector/itcm/ManagedObject#get:next local.set $0 @@ -1834,15 +1684,43 @@ unreachable end ) - (func $~lib/collector/itcm/__ref_register (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#set:next (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $0 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/collector/itcm/__ref_register (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) call $~lib/collector/itcm/step - block $~lib/collector/itcm/refToObj|inlined.3 (result i32) + block $~lib/collector/itcm/refToObj|inlined.0 (result i32) local.get $0 local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub end local.set $2 @@ -1853,7 +1731,7 @@ local.get $2 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/runtime.register (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -1862,24 +1740,24 @@ if i32.const 0 i32.const 88 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 88 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -1891,7 +1769,7 @@ call $~lib/collector/itcm/__ref_register local.get $0 ) - (func $constructor/EmptyCtor#constructor (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtor#constructor (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -1903,16 +1781,16 @@ end local.get $0 ) - (func $constructor/EmptyCtorWithFieldInit~iterate (; 42 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $constructor/EmptyCtorWithFieldInit~traverse (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $constructor/EmptyCtorWithFieldInit#constructor (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtorWithFieldInit#constructor (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 call $~lib/runtime/runtime.allocate - i32.const 6 + i32.const 3 call $~lib/runtime/runtime.register local.set $0 end @@ -1921,16 +1799,16 @@ i32.store local.get $0 ) - (func $constructor/EmptyCtorWithFieldNoInit~iterate (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $constructor/EmptyCtorWithFieldNoInit~traverse (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 call $~lib/runtime/runtime.allocate - i32.const 7 + i32.const 4 call $~lib/runtime/runtime.register local.set $0 end @@ -1939,30 +1817,30 @@ i32.store local.get $0 ) - (func $constructor/None~iterate (; 46 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $constructor/None~traverse (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) ) - (func $constructor/None#constructor (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/None#constructor (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 call $~lib/runtime/runtime.allocate - i32.const 8 + i32.const 5 call $~lib/runtime/runtime.register local.set $0 end local.get $0 ) - (func $constructor/JustFieldInit~iterate (; 48 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $constructor/JustFieldInit~traverse (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $constructor/JustFieldInit#constructor (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/JustFieldInit#constructor (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 call $~lib/runtime/runtime.allocate - i32.const 9 + i32.const 6 call $~lib/runtime/runtime.register local.set $0 end @@ -1971,16 +1849,16 @@ i32.store local.get $0 ) - (func $constructor/JustFieldNoInit~iterate (; 50 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $constructor/JustFieldNoInit~traverse (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $constructor/JustFieldNoInit#constructor (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/JustFieldNoInit#constructor (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 call $~lib/runtime/runtime.allocate - i32.const 10 + i32.const 7 call $~lib/runtime/runtime.register local.set $0 end @@ -1989,14 +1867,14 @@ i32.store local.get $0 ) - (func $constructor/CtorReturns#constructor (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorReturns#constructor (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 call $~lib/memory/memory.allocate ) - (func $constructor/CtorConditionallyReturns~iterate (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $constructor/CtorConditionallyReturns~traverse (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $constructor/CtorConditionallyReturns#constructor (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorConditionallyReturns#constructor (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) global.get $constructor/b if i32.const 0 @@ -2008,23 +1886,23 @@ if i32.const 0 call $~lib/runtime/runtime.allocate - i32.const 11 + i32.const 8 call $~lib/runtime/runtime.register local.set $0 end local.get $0 ) - (func $constructor/CtorAllocates~iterate (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $constructor/CtorAllocates~traverse (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $constructor/CtorAllocates#constructor (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorAllocates#constructor (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 0 call $~lib/runtime/runtime.allocate - i32.const 12 + i32.const 9 call $~lib/runtime/runtime.register local.set $0 end @@ -2033,10 +1911,10 @@ drop local.get $0 ) - (func $constructor/CtorConditionallyAllocates~iterate (; 57 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $constructor/CtorConditionallyAllocates~traverse (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $constructor/CtorConditionallyAllocates#constructor (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorConditionallyAllocates#constructor (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) global.get $constructor/b if block (result i32) @@ -2045,7 +1923,7 @@ if i32.const 0 call $~lib/runtime/runtime.allocate - i32.const 13 + i32.const 10 call $~lib/runtime/runtime.register local.set $0 end @@ -2058,13 +1936,13 @@ if i32.const 0 call $~lib/runtime/runtime.allocate - i32.const 13 + i32.const 10 call $~lib/runtime/runtime.register local.set $0 end local.get $0 ) - (func $start:constructor (; 59 ;) (type $FUNCSIG$v) + (func $start:constructor (; 52 ;) (type $FUNCSIG$v) i32.const 0 call $constructor/EmptyCtor#constructor global.set $constructor/emptyCtor @@ -2096,82 +1974,139 @@ call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates ) - (func $start (; 60 ;) (type $FUNCSIG$v) + (func $start (; 53 ;) (type $FUNCSIG$v) call $start:constructor ) - (func $null (; 61 ;) (type $FUNCSIG$v) + (func $null (; 54 ;) (type $FUNCSIG$v) ) - (func $~iterateRoots (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#get:color (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#unlink (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) - global.get $constructor/emptyCtor - local.tee $1 + (local $2 i32) + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + local.set $1 + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 57 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/collector/itcm/iter + i32.eq if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + call $~lib/collector/itcm/ManagedObject#unlink + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/__ref_mark (; 58 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + block $~lib/collector/itcm/refToObj|inlined.1 (result i32) + local.get $0 + local.set $1 local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/gc/__gc_mark_roots (; 59 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $constructor/emptyCtor + local.tee $0 + if local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end global.get $constructor/emptyCtorWithFieldInit - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end global.get $constructor/emptyCtorWithFieldNoInit - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end global.get $constructor/none - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end global.get $constructor/justFieldInit - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end global.get $constructor/justFieldNoInit - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end global.get $constructor/ctorReturns - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end global.get $constructor/ctorConditionallyReturns - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end global.get $constructor/ctorAllocates - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end global.get $constructor/ctorConditionallyAllocates - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end ) ) diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index 55ce6dbad1..05a4469231 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -146,7 +146,7 @@ if i32.const 0 i32.const 16 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -161,7 +161,7 @@ if i32.const 0 i32.const 16 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 36d5543513..0796ee9634 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -18,10 +18,10 @@ (global $exports/Car.TIRES i32 (i32.const 4)) (global $exports/vehicles.Car.TIRES i32 (i32.const 4)) (global $exports/outer.inner.a i32 (i32.const 42)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (global $~lib/argc (mut i32) (i32.const 0)) @@ -75,7 +75,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -174,13 +174,13 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 i32.store offset=4 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) (func $~lib/runtime/runtime.register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -192,24 +192,24 @@ if i32.const 0 i32.const 16 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 16 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc.optimized.wat b/tests/compiler/gc.optimized.wat index c4c8cb6c79..276fd14ac9 100644 --- a/tests/compiler/gc.optimized.wat +++ b/tests/compiler/gc.optimized.wat @@ -2,11 +2,11 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$i (func (result i32))) @@ -19,16 +19,18 @@ (data (i32.const 72) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") (data (i32.const 96) "\02\00\00\00\n") (data (i32.const 112) "g\00c\00.\00t\00s") - (data (i32.const 128) "\02\00\00\00&") - (data (i32.const 144) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 184) "\02\00\00\00\0e") - (data (i32.const 200) "g\00c\00.\00l\00i\00n\00k") - (data (i32.const 216) "\02\00\00\00\12") - (data (i32.const 232) "g\00c\00.\00u\00n\00l\00i\00n\00k") - (data (i32.const 256) "\02\00\00\00\14") - (data (i32.const 272) "g\00c\00.\00c\00o\00l\00l\00e\00c\00t") + (data (i32.const 128) "\02\00\00\00\0e") + (data (i32.const 144) "g\00c\00.\00m\00a\00r\00k") + (data (i32.const 160) "\02\00\00\00&") + (data (i32.const 176) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 216) "\02\00\00\00\0e") + (data (i32.const 232) "g\00c\00.\00l\00i\00n\00k") + (data (i32.const 248) "\02\00\00\00\12") + (data (i32.const 264) "g\00c\00.\00u\00n\00l\00i\00n\00k") + (data (i32.const 288) "\02\00\00\00\14") + (data (i32.const 304) "g\00c\00.\00c\00o\00l\00l\00e\00c\00t") (table $0 6 funcref) - (elem (i32.const 0) $null $gc/Ref~iterate $gc/Ref~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $gc/Ref~iterate) + (elem (i32.const 0) $null $gc/Ref~traverse $gc/Ref~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $gc/Ref~traverse) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) @@ -38,18 +40,18 @@ (global $gc/_dummy/unlink_count (mut i32) (i32.const 0)) (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) (global $gc/_dummy/unlink_parentRef (mut i32) (i32.const 0)) + (global $gc/_dummy/mark_count (mut i32) (i32.const 0)) + (global $gc/_dummy/mark_ref (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/gc/gc.implemented i32 (i32.const 1)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741808)) - (global $~lib/gc/GC_ROOT (mut i32) (i32.const 0)) + (global $~lib/gc/ROOT (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/main)) - (export "runtime.MAX_BYTELENGTH" (global $~lib/runtime/runtime.MAX_BYTELENGTH)) (export "runtime.adjust" (func $~lib/runtime/runtime.adjust)) (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) (export "runtime.reallocate" (func $~lib/runtime/runtime.reallocate)) @@ -161,7 +163,7 @@ i32.const 16 i32.add ) - (func $gc/Ref~iterate (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $gc/Ref~traverse (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) @@ -184,12 +186,12 @@ (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 292 + i32.const 324 i32.le_u if i32.const 0 i32.const 24 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -204,7 +206,7 @@ if i32.const 0 i32.const 24 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -216,23 +218,32 @@ call $gc/_dummy/__ref_register local.get $0 ) - (func $~lib/set/Set~iterate (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $gc/_dummy/__ref_mark (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 144 i32.const 1 - global.set $~lib/argc + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/_dummy/mark_count + i32.const 1 + i32.add + global.set $gc/_dummy/mark_count + local.get $0 + global.set $gc/_dummy/mark_ref + ) + (func $~lib/set/Set~traverse (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $gc/_dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $0 - i32.const 1 - global.set $~lib/argc - local.get $0 - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $gc/_dummy/__ref_mark ) - (func $~lib/memory/memory.fill (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -443,16 +454,16 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 i32.gt_u if i32.const 0 - i32.const 144 - i32.const 53 - i32.const 51 + i32.const 176 + i32.const 54 + i32.const 43 call $~lib/env/abort unreachable end @@ -465,8 +476,8 @@ i32.const 5 call $~lib/runtime/runtime.register ) - (func $gc/_dummy/__ref_link (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 200 + (func $gc/_dummy/__ref_link (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 232 i32.const 2 local.get $0 f64.convert_i32_u @@ -485,8 +496,8 @@ local.get $0 global.set $gc/_dummy/link_parentRef ) - (func $gc/_dummy/__ref_unlink (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 232 + (func $gc/_dummy/__ref_unlink (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 264 i32.const 2 local.get $0 f64.convert_i32_u @@ -505,7 +516,7 @@ local.get $1 global.set $gc/_dummy/unlink_parentRef ) - (func $~lib/set/Set#clear (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -568,7 +579,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 14 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 15 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate @@ -596,7 +607,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -627,7 +638,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -670,7 +681,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -679,7 +690,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -814,7 +825,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -897,9 +908,9 @@ i32.store end ) - (func $~lib/gc/gc.retain (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/gc/gc.retain (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) - global.get $~lib/gc/GC_ROOT + global.get $~lib/gc/ROOT local.tee $1 local.get $0 call $~lib/set/Set#has @@ -913,7 +924,7 @@ call $gc/_dummy/__ref_link end ) - (func $~lib/set/Set#delete (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -973,9 +984,9 @@ call $~lib/set/Set#rehash end ) - (func $~lib/gc/gc.release (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/gc/gc.release (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) - global.get $~lib/gc/GC_ROOT + global.get $~lib/gc/ROOT local.tee $1 local.get $0 call $~lib/set/Set#has @@ -988,8 +999,8 @@ call $gc/_dummy/__ref_unlink end ) - (func $~lib/gc/gc.collect (; 23 ;) (type $FUNCSIG$v) - i32.const 272 + (func $~lib/gc/gc.collect (; 24 ;) (type $FUNCSIG$v) + i32.const 304 i32.const 0 f64.const 0 f64.const 0 @@ -1002,7 +1013,7 @@ i32.add global.set $gc/_dummy/collect_count ) - (func $gc/main (; 24 ;) (type $FUNCSIG$v) + (func $gc/main (; 25 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1010,12 +1021,12 @@ global.get $~lib/started i32.eqz if - i32.const 296 + i32.const 328 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset call $~lib/set/Set#constructor - global.set $~lib/gc/GC_ROOT + global.set $~lib/gc/ROOT i32.const 1 global.set $~lib/started end @@ -1153,7 +1164,7 @@ unreachable end ) - (func $~lib/util/memory/memcpy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2000,7 +2011,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2194,7 +2205,7 @@ end end ) - (func $~lib/runtime/runtime.reallocate (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2228,7 +2239,7 @@ i32.shl i32.const 0 local.get $0 - i32.const 292 + i32.const 324 i32.gt_u select local.get $3 @@ -2266,12 +2277,12 @@ i32.eq if local.get $0 - i32.const 292 + i32.const 324 i32.le_u if i32.const 0 i32.const 24 - i32.const 107 + i32.const 64 i32.const 10 call $~lib/env/abort unreachable @@ -2299,14 +2310,14 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/runtime.discard (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 292 + i32.const 324 i32.le_u if i32.const 0 i32.const 24 - i32.const 132 + i32.const 89 i32.const 6 call $~lib/env/abort unreachable @@ -2320,13 +2331,13 @@ if i32.const 0 i32.const 24 - i32.const 134 + i32.const 91 i32.const 6 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/runtime.makeArray (; 29 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 30 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2382,10 +2393,10 @@ end local.get $4 ) - (func $null (; 30 ;) (type $FUNCSIG$v) + (func $null (; 31 ;) (type $FUNCSIG$v) nop ) - (func $~lib/runtime/runtime.makeArray|trampoline (; 31 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray|trampoline (; 32 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2405,7 +2416,7 @@ local.get $3 call $~lib/runtime/runtime.makeArray ) - (func $~lib/setargc (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) diff --git a/tests/compiler/gc.untouched.wat b/tests/compiler/gc.untouched.wat index 354568f158..2010adb510 100644 --- a/tests/compiler/gc.untouched.wat +++ b/tests/compiler/gc.untouched.wat @@ -2,11 +2,11 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -15,12 +15,13 @@ (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 56) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") (data (i32.const 96) "\02\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00t\00s\00") - (data (i32.const 128) "\02\00\00\00&\00\00\00\00\00\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 184) "\02\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00l\00i\00n\00k\00") - (data (i32.const 216) "\02\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00u\00n\00l\00i\00n\00k\00") - (data (i32.const 256) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00c\00o\00l\00l\00e\00c\00t\00") + (data (i32.const 128) "\02\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00m\00a\00r\00k\00") + (data (i32.const 160) "\02\00\00\00&\00\00\00\00\00\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) "\02\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00l\00i\00n\00k\00") + (data (i32.const 248) "\02\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00u\00n\00l\00i\00n\00k\00") + (data (i32.const 288) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00c\00o\00l\00l\00e\00c\00t\00") (table $0 6 funcref) - (elem (i32.const 0) $null $gc/Ref~iterate $~lib/string/String~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/arraybuffer/ArrayBuffer~iterate) + (elem (i32.const 0) $null $gc/Ref~traverse $~lib/string/String~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/arraybuffer/ArrayBuffer~traverse) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) @@ -30,22 +31,23 @@ (global $gc/_dummy/unlink_count (mut i32) (i32.const 0)) (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) (global $gc/_dummy/unlink_parentRef (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $gc/_dummy/mark_count (mut i32) (i32.const 0)) + (global $gc/_dummy/mark_ref (mut i32) (i32.const 0)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/gc/gc.implemented i32 (i32.const 1)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741808)) - (global $~lib/gc/GC_ROOT (mut i32) (i32.const 0)) + (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $~lib/gc/ROOT (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 292)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 324)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/main)) - (export "runtime.MAX_BYTELENGTH" (global $~lib/runtime/runtime.MAX_BYTELENGTH)) (export "runtime.adjust" (func $~lib/runtime/runtime.adjust)) (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) (export "runtime.reallocate" (func $~lib/runtime/runtime.reallocate)) @@ -62,7 +64,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -161,7 +163,7 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 @@ -173,13 +175,13 @@ i32.const 0 i32.store offset=12 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $gc/Ref~iterate (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $gc/Ref~traverse (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) ) - (func $~lib/string/String~iterate (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/string/String~traverse (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) (func $gc/_dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 @@ -207,24 +209,24 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -248,24 +250,35 @@ end local.get $0 ) - (func $~lib/set/Set~iterate (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $gc/_dummy/__ref_mark (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 144 i32.const 1 - global.set $~lib/argc + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/_dummy/mark_count + i32.const 1 + i32.add + global.set $gc/_dummy/mark_count + local.get $0 + global.set $gc/_dummy/mark_ref + ) + (func $~lib/set/Set~traverse (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $gc/_dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $gc/_dummy/__ref_mark ) - (func $~lib/memory/memory.fill (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -522,19 +535,19 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer~iterate (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/arraybuffer/ArrayBuffer~traverse (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 - i32.const 144 - i32.const 53 - i32.const 51 + i32.const 176 + i32.const 54 + i32.const 43 call $~lib/env/abort unreachable end @@ -549,8 +562,8 @@ i32.const 5 call $~lib/runtime/runtime.register ) - (func $gc/_dummy/__ref_link (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 200 + (func $gc/_dummy/__ref_link (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 232 i32.const 2 local.get $0 f64.convert_i32_u @@ -569,8 +582,8 @@ local.get $0 global.set $gc/_dummy/link_parentRef ) - (func $gc/_dummy/__ref_unlink (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 232 + (func $gc/_dummy/__ref_unlink (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 264 i32.const 2 local.get $0 f64.convert_i32_u @@ -589,7 +602,7 @@ local.get $1 global.set $gc/_dummy/unlink_parentRef ) - (func $~lib/set/Set#clear (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -658,7 +671,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -692,7 +705,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -734,7 +747,7 @@ local.set $1 local.get $1 ) - (func $~lib/set/Set#find (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -785,7 +798,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -800,7 +813,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -970,7 +983,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1068,9 +1081,9 @@ i32.store end ) - (func $~lib/gc/gc.retain (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/gc/gc.retain (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) - global.get $~lib/gc/GC_ROOT + global.get $~lib/gc/ROOT local.set $1 local.get $1 local.get $0 @@ -1085,7 +1098,7 @@ call $gc/_dummy/__ref_link end ) - (func $~lib/set/Set#delete (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1158,9 +1171,9 @@ end i32.const 1 ) - (func $~lib/gc/gc.release (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/gc/gc.release (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) - global.get $~lib/gc/GC_ROOT + global.get $~lib/gc/ROOT local.set $1 local.get $1 local.get $0 @@ -1175,8 +1188,8 @@ call $gc/_dummy/__ref_unlink end ) - (func $gc/_dummy/__ref_collect (; 27 ;) (type $FUNCSIG$v) - i32.const 272 + (func $gc/_dummy/__ref_collect (; 28 ;) (type $FUNCSIG$v) + i32.const 304 i32.const 0 f64.const 0 f64.const 0 @@ -1189,10 +1202,10 @@ i32.add global.set $gc/_dummy/collect_count ) - (func $~lib/gc/gc.collect (; 28 ;) (type $FUNCSIG$v) + (func $~lib/gc/gc.collect (; 29 ;) (type $FUNCSIG$v) call $gc/_dummy/__ref_collect ) - (func $gc/main (; 29 ;) (type $FUNCSIG$v) + (func $gc/main (; 30 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1355,7 +1368,7 @@ unreachable end ) - (func $~lib/util/memory/memcpy (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2556,7 +2569,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 32 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2787,21 +2800,21 @@ end end ) - (func $~lib/allocator/arena/__mem_free (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/runtime.reallocate (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 @@ -2838,7 +2851,7 @@ i32.const 0 i32.store offset=12 local.get $5 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add local.set $6 local.get $6 @@ -2855,7 +2868,7 @@ call $~lib/memory/memory.fill local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq if local.get $0 @@ -2865,7 +2878,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 64 i32.const 10 call $~lib/env/abort unreachable @@ -2898,7 +2911,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/runtime.discard (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -2907,24 +2920,24 @@ if i32.const 0 i32.const 24 - i32.const 132 + i32.const 89 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $1 local.get $1 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 134 + i32.const 91 i32.const 6 call $~lib/env/abort unreachable @@ -2932,7 +2945,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/runtime/runtime.makeArray (; 36 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 37 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2996,7 +3009,7 @@ end local.get $4 ) - (func $start (; 37 ;) (type $FUNCSIG$v) + (func $start (; 38 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -3009,11 +3022,11 @@ global.set $~lib/allocator/arena/offset i32.const 0 call $~lib/set/Set#constructor - global.set $~lib/gc/GC_ROOT + global.set $~lib/gc/ROOT ) - (func $null (; 38 ;) (type $FUNCSIG$v) + (func $null (; 39 ;) (type $FUNCSIG$v) ) - (func $~lib/runtime/runtime.makeArray|trampoline (; 39 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray|trampoline (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -3033,7 +3046,7 @@ local.get $3 call $~lib/runtime/runtime.makeArray ) - (func $~lib/setargc (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) diff --git a/tests/compiler/gc/_dummy.ts b/tests/compiler/gc/_dummy.ts index 6dde53b948..679d606a34 100644 --- a/tests/compiler/gc/_dummy.ts +++ b/tests/compiler/gc/_dummy.ts @@ -45,3 +45,14 @@ function __ref_unlink(ref: usize, parentRef: usize): void { unlink_ref = ref; unlink_parentRef = parentRef; } + +export var mark_count = 0; +export var mark_ref: usize = 0; + +// @ts-ignore: decorator +@global @unsafe +function __ref_mark(ref: usize): void { + trace("gc.mark", 1, ref); + mark_count++; + mark_ref = ref; +} diff --git a/tests/compiler/gc/global-assign.optimized.wat b/tests/compiler/gc/global-assign.optimized.wat index 17e8b6048d..ea586ca7af 100644 --- a/tests/compiler/gc/global-assign.optimized.wat +++ b/tests/compiler/gc/global-assign.optimized.wat @@ -1,7 +1,6 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) @@ -16,7 +15,7 @@ (data (i32.const 96) "\02\00\00\00&") (data (i32.const 112) "g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s") (table $0 3 funcref) - (elem (i32.const 0) $null $gc/global-assign/Ref~iterate $gc/global-assign/Ref~iterate) + (elem (i32.const 0) $null $gc/global-assign/Ref~traverse $gc/global-assign/Ref~traverse) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) (global $gc/_dummy/link_count (mut i32) (i32.const 0)) @@ -113,7 +112,7 @@ i32.const 16 i32.add ) - (func $gc/global-assign/Ref~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $gc/global-assign/Ref~traverse (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) (func $gc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) @@ -141,7 +140,7 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -156,7 +155,7 @@ if i32.const 0 i32.const 24 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-assign.untouched.wat b/tests/compiler/gc/global-assign.untouched.wat index ec6c128126..35f7310e7a 100644 --- a/tests/compiler/gc/global-assign.untouched.wat +++ b/tests/compiler/gc/global-assign.untouched.wat @@ -1,7 +1,6 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) @@ -13,7 +12,7 @@ (data (i32.const 56) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") (data (i32.const 96) "\02\00\00\00&\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s\00") (table $0 3 funcref) - (elem (i32.const 0) $null $gc/global-assign/Ref~iterate $~lib/string/String~iterate) + (elem (i32.const 0) $null $gc/global-assign/Ref~traverse $~lib/string/String~traverse) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) @@ -23,10 +22,12 @@ (global $gc/_dummy/unlink_count (mut i32) (i32.const 0)) (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) (global $gc/_dummy/unlink_parentRef (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $gc/_dummy/mark_count (mut i32) (i32.const 0)) + (global $gc/_dummy/mark_ref (mut i32) (i32.const 0)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $gc/global-assign/global (mut i32) (i32.const 0)) (global $gc/global-assign/globalRef (mut i32) (i32.const 0)) @@ -41,7 +42,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -140,7 +141,7 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 @@ -152,13 +153,13 @@ i32.const 0 i32.store offset=12 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $gc/global-assign/Ref~iterate (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $gc/global-assign/Ref~traverse (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) ) - (func $~lib/string/String~iterate (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/string/String~traverse (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) (func $gc/_dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 @@ -186,24 +187,24 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-init.optimized.wat b/tests/compiler/gc/global-init.optimized.wat index afe176a7c7..bc3385792a 100644 --- a/tests/compiler/gc/global-init.optimized.wat +++ b/tests/compiler/gc/global-init.optimized.wat @@ -1,7 +1,6 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) @@ -16,7 +15,7 @@ (data (i32.const 96) "\02\00\00\00\"") (data (i32.const 112) "g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s") (table $0 3 funcref) - (elem (i32.const 0) $null $gc/global-init/Ref~iterate $gc/global-init/Ref~iterate) + (elem (i32.const 0) $null $gc/global-init/Ref~traverse $gc/global-init/Ref~traverse) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) (global $gc/_dummy/link_count (mut i32) (i32.const 0)) @@ -112,7 +111,7 @@ i32.const 16 i32.add ) - (func $gc/global-init/Ref~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $gc/global-init/Ref~traverse (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) (func $gc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) @@ -140,7 +139,7 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -155,7 +154,7 @@ if i32.const 0 i32.const 24 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-init.untouched.wat b/tests/compiler/gc/global-init.untouched.wat index 5b418b443c..567860a468 100644 --- a/tests/compiler/gc/global-init.untouched.wat +++ b/tests/compiler/gc/global-init.untouched.wat @@ -1,7 +1,6 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) @@ -13,7 +12,7 @@ (data (i32.const 56) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") (data (i32.const 96) "\02\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s\00") (table $0 3 funcref) - (elem (i32.const 0) $null $gc/global-init/Ref~iterate $~lib/string/String~iterate) + (elem (i32.const 0) $null $gc/global-init/Ref~traverse $~lib/string/String~traverse) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) @@ -23,10 +22,12 @@ (global $gc/_dummy/unlink_count (mut i32) (i32.const 0)) (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) (global $gc/_dummy/unlink_parentRef (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $gc/_dummy/mark_count (mut i32) (i32.const 0)) + (global $gc/_dummy/mark_ref (mut i32) (i32.const 0)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $gc/global-init/global (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) @@ -40,7 +41,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -139,7 +140,7 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 @@ -151,13 +152,13 @@ i32.const 0 i32.store offset=12 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $gc/global-init/Ref~iterate (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $gc/global-init/Ref~traverse (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) ) - (func $~lib/string/String~iterate (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/string/String~traverse (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) (func $gc/_dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 @@ -185,24 +186,24 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/itcm/trace.optimized.wat b/tests/compiler/gc/itcm/trace.optimized.wat index 92fe62ac93..c41a97e4f0 100644 --- a/tests/compiler/gc/itcm/trace.optimized.wat +++ b/tests/compiler/gc/itcm/trace.optimized.wat @@ -1,10 +1,10 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -26,46 +26,46 @@ (data (i32.const 296) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00I\00D\00L\00E") (data (i32.const 336) "\01\00\00\00\1c") (data (i32.const 352) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E") - (data (i32.const 384) "\01\00\00\00\1a") - (data (i32.const 400) " \00 \00 \00 \00 \00m\00a\00k\00e\00G\00r\00a\00y") - (data (i32.const 432) "\01\00\00\00:") - (data (i32.const 448) " \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]") - (data (i32.const 512) "\01\00\00\006") - (data (i32.const 528) " \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]") - (data (i32.const 584) "\01\00\00\00\"") - (data (i32.const 600) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K") - (data (i32.const 640) "\01\00\00\00,") - (data (i32.const 656) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00i\00t\00e\00r\00a\00t\00e") - (data (i32.const 704) "\01\00\00\00\12") - (data (i32.const 720) " \00 \00 \00 \00 \00i\00t\00e\00r") - (data (i32.const 744) "\01\00\00\00*") - (data (i32.const 760) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h") - (data (i32.const 808) "\01\00\00\00$") - (data (i32.const 824) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P") - (data (i32.const 864) "\01\00\00\00(") - (data (i32.const 880) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e") - (data (i32.const 920) "\01\00\00\00,") - (data (i32.const 936) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h") - (data (i32.const 984) "\01\00\00\00\"") - (data (i32.const 1000) "#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)") - (data (i32.const 1040) "\01\00\00\00\1e") - (data (i32.const 1056) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 1088) "\01\00\00\00\1a") - (data (i32.const 1104) "i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r") - (data (i32.const 1136) "\01\00\00\00(") - (data (i32.const 1152) "#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)") - (data (i32.const 1192) "\01\00\00\00&") - (data (i32.const 1208) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 1248) "\01\00\00\00\12") - (data (i32.const 1264) "i\00t\00c\00m\00.\00l\00i\00n\00k") - (data (i32.const 1288) "\01\00\00\00\1c") - (data (i32.const 1304) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f") - (data (i32.const 1336) "\01\00\00\00\1a") - (data (i32.const 1352) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1384) "\01\00\00\00\1e") - (data (i32.const 1400) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l") - (table $0 10 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1 $~lib/collector/itcm/step~anonymous|0 $gc/itcm/trace/Ref~iterate $~lib/string/String~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) + (data (i32.const 384) "\01\00\00\00\"") + (data (i32.const 400) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K") + (data (i32.const 440) "\01\00\00\00\1c") + (data (i32.const 456) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K") + (data (i32.const 488) "\01\00\00\00*") + (data (i32.const 504) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h") + (data (i32.const 552) "\01\00\00\00$") + (data (i32.const 568) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P") + (data (i32.const 608) "\01\00\00\00(") + (data (i32.const 624) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e") + (data (i32.const 664) "\01\00\00\00,") + (data (i32.const 680) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h") + (data (i32.const 728) "\01\00\00\00\"") + (data (i32.const 744) "#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)") + (data (i32.const 784) "\01\00\00\00\12") + (data (i32.const 800) "i\00t\00c\00m\00.\00m\00a\00r\00k") + (data (i32.const 824) "\01\00\00\00\1a") + (data (i32.const 840) " \00 \00 \00 \00 \00m\00a\00k\00e\00G\00r\00a\00y") + (data (i32.const 872) "\01\00\00\00:") + (data (i32.const 888) " \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]") + (data (i32.const 952) "\01\00\00\006") + (data (i32.const 968) " \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]") + (data (i32.const 1024) "\01\00\00\00\1e") + (data (i32.const 1040) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 1072) "\01\00\00\00\1a") + (data (i32.const 1088) "i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 1120) "\01\00\00\00(") + (data (i32.const 1136) "#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)") + (data (i32.const 1176) "\01\00\00\00&") + (data (i32.const 1192) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 1232) "\01\00\00\00\12") + (data (i32.const 1248) "i\00t\00c\00m\00.\00l\00i\00n\00k") + (data (i32.const 1272) "\01\00\00\00\1c") + (data (i32.const 1288) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f") + (data (i32.const 1320) "\01\00\00\00\1a") + (data (i32.const 1336) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 1368) "\01\00\00\00\1e") + (data (i32.const 1384) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l") + (table $0 7 funcref) + (elem (i32.const 0) $null $~lib/string/String~traverse $gc/itcm/trace/Ref~traverse $~lib/string/String~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse) (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -74,7 +74,6 @@ (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $gc/itcm/trace/ref (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) (global $gc/itcm/trace/arr (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) @@ -82,7 +81,7 @@ (export "table" (table $0)) (export "main" (func $gc/itcm/trace/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/string/String~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/string/String~traverse (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -166,161 +165,7 @@ local.get $0 i32.store offset=12 ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - i32.const 448 - i32.const 3 - local.get $0 - i32.load offset=12 - local.tee $1 - i32.const 16 - i32.add - f64.convert_i32_u - local.get $0 - i32.const 16 - i32.add - f64.convert_i32_u - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - local.tee $0 - i32.const 16 - i32.add - f64.convert_i32_u - f64.const 0 - f64.const 0 - call $~lib/env/trace - local.get $0 - local.get $1 - i32.store offset=12 - local.get $1 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.and - local.get $0 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 528 - i32.const 3 - local.get $0 - i32.load offset=12 - local.tee $2 - i32.const 16 - i32.add - f64.convert_i32_u - local.get $1 - i32.const 16 - i32.add - f64.convert_i32_u - local.get $0 - i32.const 16 - i32.add - f64.convert_i32_u - f64.const 0 - f64.const 0 - call $~lib/env/trace - local.get $1 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.and - local.get $0 - i32.or - i32.store offset=8 - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.and - local.get $1 - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 400 - i32.const 1 - local.get $0 - i32.const 16 - i32.add - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - global.get $~lib/collector/itcm/iter - local.get $0 - i32.eq - if - local.get $0 - i32.load offset=12 - global.set $~lib/collector/itcm/iter - end - local.get $0 - call $~lib/collector/itcm/ManagedObject#unlink - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - i32.const 2 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/step~anonymous|0 (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/collector/itcm/step~anonymous|1 (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 720 - i32.const 1 - local.get $0 - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/collector/itcm/step (; 10 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/step (; 5 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) block $break|0 @@ -410,23 +255,10 @@ f64.const 0 f64.const 0 call $~lib/env/trace - global.get $gc/itcm/trace/ref - local.tee $0 - if - local.get $0 - i32.const 2 - call_indirect (type $FUNCSIG$vi) - end - global.get $gc/itcm/trace/arr - local.tee $0 - if - local.get $0 - i32.const 2 - call_indirect (type $FUNCSIG$vi) - end + call $~lib/gc/__gc_mark_roots i32.const 2 global.set $~lib/collector/itcm/state - i32.const 600 + i32.const 400 i32.const 0 f64.const 0 f64.const 0 @@ -444,7 +276,7 @@ global.get $~lib/collector/itcm/toSpace i32.ne if - i32.const 656 + i32.const 456 i32.const 1 local.get $0 i32.const 16 @@ -468,12 +300,12 @@ i32.or i32.store offset=8 local.get $1 - i32.const 3 local.get $0 i32.load - call_indirect (type $FUNCSIG$vii) + call_indirect (type $FUNCSIG$vi) else - i32.const 760 + call $~lib/gc/__gc_mark_roots + i32.const 504 i32.const 0 f64.const 0 f64.const 0 @@ -481,20 +313,6 @@ f64.const 0 f64.const 0 call $~lib/env/trace - global.get $gc/itcm/trace/ref - local.tee $0 - if - local.get $0 - i32.const 4 - call_indirect (type $FUNCSIG$vi) - end - global.get $gc/itcm/trace/arr - local.tee $0 - if - local.get $0 - i32.const 4 - call_indirect (type $FUNCSIG$vi) - end global.get $~lib/collector/itcm/toSpace global.get $~lib/collector/itcm/iter i32.load offset=8 @@ -518,7 +336,7 @@ global.set $~lib/collector/itcm/iter i32.const 3 global.set $~lib/collector/itcm/state - i32.const 824 + i32.const 568 i32.const 0 f64.const 0 f64.const 0 @@ -535,7 +353,7 @@ global.get $~lib/collector/itcm/toSpace i32.ne if - i32.const 880 + i32.const 624 i32.const 1 local.get $0 i32.const 16 @@ -552,7 +370,7 @@ i32.and global.set $~lib/collector/itcm/iter else - i32.const 936 + i32.const 680 i32.const 0 f64.const 0 f64.const 0 @@ -575,7 +393,7 @@ end end ) - (func $~lib/collector/itcm/__ref_collect (; 11 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/__ref_collect (; 6 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 72 i32.const 0 @@ -609,7 +427,7 @@ end end ) - (func $~lib/runtime/runtime.allocate (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -636,21 +454,158 @@ i32.const 16 i32.add ) - (func $gc/itcm/trace/Ref~iterate (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#unlink (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + i32.const 888 + i32.const 3 + local.get $0 + i32.load offset=12 + local.tee $1 + i32.const 16 + i32.add + f64.convert_i32_u + local.get $0 + i32.const 16 + i32.add + f64.convert_i32_u + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + local.tee $0 + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $0 + local.get $1 + i32.store offset=12 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $0 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 968 + i32.const 3 + local.get $0 + i32.load offset=12 + local.tee $2 + i32.const 16 + i32.add + f64.convert_i32_u + local.get $1 + i32.const 16 + i32.add + f64.convert_i32_u + local.get $0 + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $0 + i32.or + i32.store offset=8 + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.and + local.get $1 + i32.or + i32.store offset=8 + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 840 + i32.const 1 + local.get $0 + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/iter + local.get $0 + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + call $~lib/collector/itcm/ManagedObject#unlink + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/__ref_mark (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 800 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $gc/itcm/trace/Ref~traverse (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load local.tee $0 if local.get $0 - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark local.get $0 - local.get $1 - call $gc/itcm/trace/Ref~iterate + call $gc/itcm/trace/Ref~traverse end ) - (func $~lib/collector/itcm/__ref_register (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 1104 + (func $~lib/collector/itcm/__ref_register (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 1088 i32.const 1 local.get $0 f64.convert_i32_u @@ -675,15 +630,15 @@ local.get $0 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/runtime.register (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 1432 + i32.const 1416 i32.le_u if i32.const 0 - i32.const 1056 - i32.const 145 + i32.const 1040 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -697,8 +652,8 @@ i32.ne if i32.const 0 - i32.const 1056 - i32.const 147 + i32.const 1040 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -710,7 +665,7 @@ call $~lib/collector/itcm/__ref_register local.get $0 ) - (func $~lib/memory/memory.fill (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -921,19 +876,18 @@ end end ) - (func $~lib/arraybuffer/ArrayBufferView~iterate (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/arraybuffer/ArrayBufferView~traverse (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load local.tee $0 if local.get $0 - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end ) - (func $~lib/collector/itcm/__ref_link (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/__ref_link (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) - i32.const 1264 + i32.const 1248 i32.const 2 local.get $0 f64.convert_i32_u @@ -971,7 +925,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 4 call $~lib/runtime/runtime.allocate @@ -979,7 +933,7 @@ i32.const 4 call $~lib/memory/memory.fill local.get $1 - i32.const 6 + i32.const 3 call $~lib/runtime/runtime.register local.set $1 local.get $0 @@ -987,7 +941,7 @@ if i32.const 12 call $~lib/runtime/runtime.allocate - i32.const 7 + i32.const 4 call $~lib/runtime/runtime.register local.set $0 end @@ -1020,49 +974,42 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array~iterate (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array~traverse (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - i32.const 1 - global.set $~lib/argc local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark local.get $0 i32.load offset=4 - local.tee $2 + local.tee $1 local.get $0 i32.load offset=8 i32.add - local.set $3 + local.set $2 loop $continue|0 + local.get $1 local.get $2 - local.get $3 i32.lt_u if - local.get $2 + local.get $1 i32.load local.tee $0 if - i32.const 1 - global.set $~lib/argc local.get $0 - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark local.get $0 - local.get $1 - call $gc/itcm/trace/Ref~iterate + call $gc/itcm/trace/Ref~traverse end - local.get $2 + local.get $1 i32.const 4 i32.add - local.set $2 + local.set $1 br $continue|0 end end ) - (func $~lib/util/memory/memcpy (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1909,7 +1856,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2103,7 +2050,7 @@ end end ) - (func $~lib/runtime/runtime.reallocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2127,7 +2074,7 @@ i32.shl i32.const 0 local.get $0 - i32.const 1432 + i32.const 1416 i32.gt_u select i32.const 32 @@ -2165,12 +2112,12 @@ i32.eq if local.get $0 - i32.const 1432 + i32.const 1416 i32.le_u if i32.const 0 - i32.const 1056 - i32.const 107 + i32.const 1040 + i32.const 64 i32.const 10 call $~lib/env/abort unreachable @@ -2198,7 +2145,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/ensureCapacity (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) i32.const 1 @@ -2238,7 +2185,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__unchecked_set (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__unchecked_set (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=4 @@ -2258,7 +2205,7 @@ end end ) - (func $~lib/array/Array#__set (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__set (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -2277,14 +2224,14 @@ i32.store offset=12 end ) - (func $start:gc/itcm/trace (; 27 ;) (type $FUNCSIG$v) + (func $start:gc/itcm/trace (; 26 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 1432 + i32.const 1416 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset call $~lib/collector/itcm/__ref_collect - i32.const 1000 + i32.const 744 i32.const 0 f64.const 0 f64.const 0 @@ -2294,14 +2241,14 @@ call $~lib/env/trace i32.const 4 call $~lib/runtime/runtime.allocate - i32.const 5 + i32.const 2 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 i32.store local.get $0 global.set $gc/itcm/trace/ref - i32.const 1152 + i32.const 1136 i32.const 0 f64.const 0 f64.const 0 @@ -2311,7 +2258,7 @@ call $~lib/env/trace i32.const 16 call $~lib/runtime/runtime.allocate - i32.const 8 + i32.const 5 call $~lib/runtime/runtime.register call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 @@ -2322,7 +2269,7 @@ i32.store offset=12 local.get $0 global.set $gc/itcm/trace/arr - i32.const 1304 + i32.const 1288 i32.const 0 f64.const 0 f64.const 0 @@ -2333,7 +2280,7 @@ global.get $gc/itcm/trace/arr global.get $gc/itcm/trace/ref call $~lib/array/Array#__set - i32.const 1400 + i32.const 1384 i32.const 0 f64.const 0 f64.const 0 @@ -2346,7 +2293,7 @@ call $~lib/array/Array#__set call $~lib/collector/itcm/__ref_collect ) - (func $gc/itcm/trace/main (; 28 ;) (type $FUNCSIG$v) + (func $gc/itcm/trace/main (; 27 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -2355,7 +2302,22 @@ global.set $~lib/started end ) - (func $null (; 29 ;) (type $FUNCSIG$v) + (func $null (; 28 ;) (type $FUNCSIG$v) nop ) + (func $~lib/gc/__gc_mark_roots (; 29 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $gc/itcm/trace/ref + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $gc/itcm/trace/arr + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + ) ) diff --git a/tests/compiler/gc/itcm/trace.ts b/tests/compiler/gc/itcm/trace.ts index 88e87f75e7..51dfdcf770 100644 --- a/tests/compiler/gc/itcm/trace.ts +++ b/tests/compiler/gc/itcm/trace.ts @@ -1,7 +1,7 @@ @global const GC_TRACE = true; import "collector/itcm"; -import { HEADER_SIZE } from "runtime"; +import { HEADER_SIZE } from "util/runtime"; assert(HEADER_SIZE == 16); assert(gc.implemented); diff --git a/tests/compiler/gc/itcm/trace.untouched.wat b/tests/compiler/gc/itcm/trace.untouched.wat index d5c8e7ae64..e5ad51f562 100644 --- a/tests/compiler/gc/itcm/trace.untouched.wat +++ b/tests/compiler/gc/itcm/trace.untouched.wat @@ -1,10 +1,10 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) @@ -19,29 +19,29 @@ (data (i32.const 232) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00t\00o\00S\00p\00a\00c\00e\00 \00=\00") (data (i32.const 280) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00I\00D\00L\00E\00") (data (i32.const 336) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E\00") - (data (i32.const 384) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00m\00a\00k\00e\00G\00r\00a\00y\00") - (data (i32.const 432) "\01\00\00\00:\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") - (data (i32.const 512) "\01\00\00\006\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") - (data (i32.const 584) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K\00") - (data (i32.const 640) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00i\00t\00e\00r\00a\00t\00e\00") - (data (i32.const 704) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00i\00t\00e\00r\00") - (data (i32.const 744) "\01\00\00\00*\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h\00") - (data (i32.const 808) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P\00") - (data (i32.const 864) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e\00") - (data (i32.const 920) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h\00") - (data (i32.const 984) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)\00") - (data (i32.const 1040) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 1088) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") - (data (i32.const 1136) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)\00") - (data (i32.const 1192) "\01\00\00\00&\00\00\00\00\00\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 1248) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00l\00i\00n\00k\00") - (data (i32.const 1288) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f\00") - (data (i32.const 1336) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 1384) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l\00") - (table $0 10 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1 $~lib/collector/itcm/step~anonymous|2 $gc/itcm/trace/Ref~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) + (data (i32.const 384) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K\00") + (data (i32.const 440) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00") + (data (i32.const 488) "\01\00\00\00*\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h\00") + (data (i32.const 552) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P\00") + (data (i32.const 608) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e\00") + (data (i32.const 664) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h\00") + (data (i32.const 728) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)\00") + (data (i32.const 784) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00m\00a\00r\00k\00") + (data (i32.const 824) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00m\00a\00k\00e\00G\00r\00a\00y\00") + (data (i32.const 872) "\01\00\00\00:\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") + (data (i32.const 952) "\01\00\00\006\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") + (data (i32.const 1024) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 1072) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 1120) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)\00") + (data (i32.const 1176) "\01\00\00\00&\00\00\00\00\00\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 1232) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00l\00i\00n\00k\00") + (data (i32.const 1272) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f\00") + (data (i32.const 1320) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 1368) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l\00") + (table $0 7 funcref) + (elem (i32.const 0) $null $~lib/string/String~traverse $gc/itcm/trace/Ref~traverse $~lib/arraybuffer/ArrayBuffer~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse) (global $gc/itcm/trace/GC_TRACE i32 (i32.const 1)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/gc/gc.implemented i32 (i32.const 1)) (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) @@ -50,21 +50,20 @@ (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $gc/itcm/trace/ref (mut i32) (i32.const 0)) - (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741808)) - (global $~lib/argc (mut i32) (i32.const 0)) + (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $gc/itcm/trace/arr (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 1432)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 1416)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/itcm/trace/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/string/String~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/string/String~traverse (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -158,7 +157,7 @@ local.get $0 local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add end f64.convert_i32_u @@ -174,13 +173,7 @@ local.get $0 i32.store offset=12 ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 - i32.const 3 - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/ManagedObject#get:next (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 @@ -188,172 +181,7 @@ i32.xor i32.and ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.and - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - local.set $1 - local.get $0 - i32.load offset=12 - local.set $2 - i32.const 448 - i32.const 3 - block $~lib/collector/itcm/objToRef|inlined.4 (result i32) - local.get $2 - local.set $3 - local.get $3 - global.get $~lib/runtime/HEADER_SIZE - i32.add - end - f64.convert_i32_u - block $~lib/collector/itcm/objToRef|inlined.5 (result i32) - local.get $0 - local.set $3 - local.get $3 - global.get $~lib/runtime/HEADER_SIZE - i32.add - end - f64.convert_i32_u - block $~lib/collector/itcm/objToRef|inlined.6 (result i32) - local.get $1 - local.set $3 - local.get $3 - global.get $~lib/runtime/HEADER_SIZE - i32.add - end - f64.convert_i32_u - f64.const 0 - f64.const 0 - call $~lib/env/trace - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load offset=12 - local.set $2 - i32.const 528 - i32.const 3 - block $~lib/collector/itcm/objToRef|inlined.7 (result i32) - local.get $2 - local.set $3 - local.get $3 - global.get $~lib/runtime/HEADER_SIZE - i32.add - end - f64.convert_i32_u - block $~lib/collector/itcm/objToRef|inlined.8 (result i32) - local.get $1 - local.set $3 - local.get $3 - global.get $~lib/runtime/HEADER_SIZE - i32.add - end - f64.convert_i32_u - block $~lib/collector/itcm/objToRef|inlined.9 (result i32) - local.get $0 - local.set $3 - local.get $3 - global.get $~lib/runtime/HEADER_SIZE - i32.add - end - f64.convert_i32_u - f64.const 0 - f64.const 0 - call $~lib/env/trace - local.get $1 - local.get $0 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - i32.const 400 - i32.const 1 - block $~lib/collector/itcm/objToRef|inlined.3 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.add - end - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - local.get $0 - global.get $~lib/collector/itcm/iter - i32.eq - if - local.get $0 - i32.load offset=12 - global.set $~lib/collector/itcm/iter - end - local.get $0 - call $~lib/collector/itcm/ManagedObject#unlink - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 2 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/step~anonymous|0 (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - block $~lib/collector/itcm/refToObj|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - end - local.set $2 - local.get $2 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/collector/itcm/ManagedObject#set:color (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#set:color (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $0 i32.load offset=8 @@ -365,63 +193,14 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/step~anonymous|1 (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 720 - i32.const 1 - local.get $0 - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - block $~lib/collector/itcm/refToObj|inlined.1 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - end - local.set $2 - local.get $2 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/collector/itcm/step~anonymous|2 (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - block $~lib/collector/itcm/refToObj|inlined.2 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - end - local.set $2 - local.get $2 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/allocator/arena/__mem_free (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/collector/itcm/step (; 18 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/step (; 10 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) block $break|0 @@ -458,7 +237,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE call $~lib/memory/memory.allocate global.set $~lib/collector/itcm/fromSpace i32.const 160 @@ -467,7 +246,7 @@ global.get $~lib/collector/itcm/fromSpace local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add end f64.convert_i32_u @@ -484,7 +263,7 @@ i32.store offset=4 global.get $~lib/collector/itcm/fromSpace call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE call $~lib/memory/memory.allocate global.set $~lib/collector/itcm/toSpace i32.const 248 @@ -493,7 +272,7 @@ global.get $~lib/collector/itcm/toSpace local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add end f64.convert_i32_u @@ -533,11 +312,10 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 2 - call $~iterateRoots + call $~lib/gc/__gc_mark_roots i32.const 2 global.set $~lib/collector/itcm/state - i32.const 600 + i32.const 400 i32.const 0 f64.const 0 f64.const 0 @@ -558,13 +336,13 @@ global.get $~lib/collector/itcm/toSpace i32.ne if - i32.const 656 + i32.const 456 i32.const 1 - block $~lib/collector/itcm/objToRef|inlined.10 (result i32) + block $~lib/collector/itcm/objToRef|inlined.3 (result i32) local.get $0 local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add end f64.convert_i32_u @@ -579,19 +357,19 @@ global.get $~lib/collector/itcm/white i32.eqz call $~lib/collector/itcm/ManagedObject#set:color - block $~lib/collector/itcm/objToRef|inlined.11 (result i32) + block $~lib/collector/itcm/objToRef|inlined.4 (result i32) local.get $0 local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add end - i32.const 3 local.get $0 i32.load - call_indirect (type $FUNCSIG$vii) + call_indirect (type $FUNCSIG$vi) else - i32.const 760 + call $~lib/gc/__gc_mark_roots + i32.const 504 i32.const 0 f64.const 0 f64.const 0 @@ -599,8 +377,6 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 4 - call $~iterateRoots global.get $~lib/collector/itcm/iter call $~lib/collector/itcm/ManagedObject#get:next local.set $0 @@ -622,7 +398,7 @@ global.set $~lib/collector/itcm/iter i32.const 3 global.set $~lib/collector/itcm/state - i32.const 824 + i32.const 568 i32.const 0 f64.const 0 f64.const 0 @@ -644,13 +420,13 @@ global.get $~lib/collector/itcm/toSpace i32.ne if - i32.const 880 + i32.const 624 i32.const 1 - block $~lib/collector/itcm/objToRef|inlined.12 (result i32) + block $~lib/collector/itcm/objToRef|inlined.5 (result i32) local.get $0 local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add end f64.convert_i32_u @@ -670,7 +446,7 @@ call $~lib/memory/memory.free end else - i32.const 936 + i32.const 680 i32.const 0 f64.const 0 f64.const 0 @@ -697,7 +473,7 @@ unreachable end ) - (func $~lib/collector/itcm/__ref_collect (; 19 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/__ref_collect (; 11 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 72 i32.const 0 @@ -737,14 +513,14 @@ end end ) - (func $~lib/gc/gc.collect (; 20 ;) (type $FUNCSIG$v) + (func $~lib/gc/gc.collect (; 12 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/__ref_collect ) - (func $~lib/runtime/runtime.adjust (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -752,14 +528,14 @@ i32.sub i32.shl ) - (func $~lib/runtime/runtime.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 @@ -771,27 +547,205 @@ i32.const 0 i32.store offset=12 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $gc/itcm/trace/Ref~iterate (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#get:color (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#set:next (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/ManagedObject#unlink (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 - i32.load - local.tee $2 - if + call $~lib/collector/itcm/ManagedObject#get:next + local.set $1 + local.get $0 + i32.load offset=12 + local.set $2 + i32.const 888 + i32.const 3 + block $~lib/collector/itcm/objToRef|inlined.7 (result i32) local.get $2 + local.set $3 + local.get $3 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + block $~lib/collector/itcm/objToRef|inlined.8 (result i32) + local.get $0 + local.set $3 + local.get $3 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + block $~lib/collector/itcm/objToRef|inlined.9 (result i32) local.get $1 - call_indirect (type $FUNCSIG$vi) + local.set $3 + local.get $3 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.set $2 + i32.const 968 + i32.const 3 + block $~lib/collector/itcm/objToRef|inlined.10 (result i32) local.get $2 + local.set $3 + local.get $3 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + block $~lib/collector/itcm/objToRef|inlined.11 (result i32) local.get $1 - call $gc/itcm/trace/Ref~iterate + local.set $3 + local.get $3 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + block $~lib/collector/itcm/objToRef|inlined.12 (result i32) + local.get $0 + local.set $3 + local.get $3 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add end + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $1 + local.get $0 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $0 + local.get $1 + i32.store offset=12 ) - (func $~lib/collector/itcm/__ref_register (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + i32.const 840 + i32.const 1 + block $~lib/collector/itcm/objToRef|inlined.6 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $0 + global.get $~lib/collector/itcm/iter + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + call $~lib/collector/itcm/ManagedObject#unlink + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/__ref_mark (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 800 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + block $~lib/collector/itcm/refToObj|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $gc/itcm/trace/Ref~traverse (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + local.tee $1 + if + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + call $gc/itcm/trace/Ref~traverse + end + ) + (func $~lib/collector/itcm/__ref_register (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) - i32.const 1104 + i32.const 1088 i32.const 1 local.get $0 f64.convert_i32_u @@ -801,11 +755,11 @@ f64.const 0 call $~lib/env/trace call $~lib/collector/itcm/step - block $~lib/collector/itcm/refToObj|inlined.3 (result i32) + block $~lib/collector/itcm/refToObj|inlined.1 (result i32) local.get $0 local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub end local.set $2 @@ -816,7 +770,7 @@ local.get $2 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/runtime.register (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -824,25 +778,25 @@ i32.eqz if i32.const 0 - i32.const 1056 - i32.const 145 + i32.const 1040 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 - i32.const 1056 - i32.const 147 + i32.const 1040 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -854,13 +808,13 @@ call $~lib/collector/itcm/__ref_register local.get $0 ) - (func $gc/itcm/trace/Ref#constructor (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $gc/itcm/trace/Ref#constructor (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 call $~lib/runtime/runtime.allocate - i32.const 5 + i32.const 2 call $~lib/runtime/runtime.register local.set $0 end @@ -869,7 +823,7 @@ i32.store local.get $0 ) - (func $~lib/memory/memory.fill (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1126,19 +1080,19 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer~iterate (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/arraybuffer/ArrayBuffer~traverse (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 - i32.const 1208 - i32.const 53 - i32.const 51 + i32.const 1192 + i32.const 54 + i32.const 43 call $~lib/env/abort unreachable end @@ -1150,27 +1104,25 @@ local.get $1 call $~lib/memory/memory.fill local.get $2 - i32.const 6 + i32.const 3 call $~lib/runtime/runtime.register ) - (func $~lib/arraybuffer/ArrayBufferView~iterate (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/arraybuffer/ArrayBufferView~traverse (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.tee $2 + local.tee $1 if - local.get $2 local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $2 + call $~lib/collector/itcm/__ref_mark local.get $1 - call $~lib/arraybuffer/ArrayBuffer~iterate + call $~lib/arraybuffer/ArrayBuffer~traverse end ) - (func $~lib/collector/itcm/__ref_link (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/__ref_link (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - i32.const 1264 + i32.const 1248 i32.const 2 local.get $0 f64.convert_i32_u @@ -1180,11 +1132,11 @@ f64.const 0 f64.const 0 call $~lib/env/trace - block $~lib/collector/itcm/refToObj|inlined.4 (result i32) + block $~lib/collector/itcm/refToObj|inlined.2 (result i32) local.get $1 local.set $2 local.get $2 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub end local.set $3 @@ -1195,11 +1147,11 @@ i32.eq local.tee $2 if (result i32) - block $~lib/collector/itcm/refToObj|inlined.6 (result i32) + block $~lib/collector/itcm/refToObj|inlined.4 (result i32) local.get $0 local.set $2 local.get $2 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub end call $~lib/collector/itcm/ManagedObject#get:color @@ -1213,21 +1165,21 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH local.get $2 i32.shr_u i32.gt_u if i32.const 0 - i32.const 1208 - i32.const 11 - i32.const 65 + i32.const 1192 + i32.const 12 + i32.const 57 call $~lib/env/abort unreachable end @@ -1244,7 +1196,7 @@ if i32.const 12 call $~lib/runtime/runtime.allocate - i32.const 7 + i32.const 4 call $~lib/runtime/runtime.register local.set $0 end @@ -1284,63 +1236,56 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array~iterate (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array~traverse (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - i32.const 1 - global.set $~lib/argc local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark local.get $0 i32.load offset=4 - local.set $2 - local.get $2 + local.set $1 + local.get $1 local.get $0 i32.load offset=8 i32.add - local.set $3 + local.set $2 block $break|0 loop $continue|0 + local.get $1 local.get $2 - local.get $3 i32.lt_u if block - local.get $2 + local.get $1 i32.load - local.set $4 - local.get $4 + local.set $3 + local.get $3 if - i32.const 1 - global.set $~lib/argc - local.get $4 - local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $4 - local.get $1 - call $gc/itcm/trace/Ref~iterate + local.get $3 + call $~lib/collector/itcm/__ref_mark + local.get $3 + call $gc/itcm/trace/Ref~traverse end - local.get $2 + local.get $1 i32.const 4 i32.add - local.set $2 + local.set $1 end br $continue|0 end end end ) - (func $~lib/array/Array#constructor (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 else i32.const 16 call $~lib/runtime/runtime.allocate - i32.const 8 + i32.const 5 call $~lib/runtime/runtime.register end local.get $1 @@ -1355,7 +1300,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/util/memory/memcpy (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2556,7 +2501,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2787,14 +2732,14 @@ end end ) - (func $~lib/runtime/runtime.reallocate (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 @@ -2831,7 +2776,7 @@ i32.const 0 i32.store offset=12 local.get $5 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add local.set $6 local.get $6 @@ -2848,7 +2793,7 @@ call $~lib/memory/memory.fill local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq if local.get $0 @@ -2857,8 +2802,8 @@ i32.eqz if i32.const 0 - i32.const 1056 - i32.const 107 + i32.const 1040 + i32.const 64 i32.const 10 call $~lib/env/abort unreachable @@ -2891,7 +2836,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2906,15 +2851,15 @@ i32.gt_u if local.get $1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH local.get $2 i32.shr_u i32.gt_u if i32.const 0 - i32.const 1352 - i32.const 13 - i32.const 72 + i32.const 1336 + i32.const 14 + i32.const 64 call $~lib/env/abort unreachable end @@ -2960,7 +2905,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__unchecked_set (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2990,7 +2935,7 @@ end end ) - (func $~lib/array/Array#__set (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3016,8 +2961,8 @@ i32.store offset=12 end ) - (func $start:gc/itcm/trace (; 41 ;) (type $FUNCSIG$v) - global.get $~lib/runtime/HEADER_SIZE + (func $start:gc/itcm/trace (; 39 ;) (type $FUNCSIG$v) + global.get $~lib/util/runtime/HEADER_SIZE i32.const 16 i32.eq i32.eqz @@ -3050,7 +2995,7 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset call $~lib/gc/gc.collect - i32.const 1000 + i32.const 744 i32.const 0 f64.const 0 f64.const 0 @@ -3061,7 +3006,7 @@ i32.const 0 call $gc/itcm/trace/Ref#constructor global.set $gc/itcm/trace/ref - i32.const 1152 + i32.const 1136 i32.const 0 f64.const 0 f64.const 0 @@ -3073,7 +3018,7 @@ i32.const 1 call $~lib/array/Array#constructor global.set $gc/itcm/trace/arr - i32.const 1304 + i32.const 1288 i32.const 0 f64.const 0 f64.const 0 @@ -3085,7 +3030,7 @@ i32.const 0 global.get $gc/itcm/trace/ref call $~lib/array/Array#__set - i32.const 1400 + i32.const 1384 i32.const 0 f64.const 0 f64.const 0 @@ -3099,7 +3044,7 @@ call $~lib/array/Array#__set call $~lib/gc/gc.collect ) - (func $gc/itcm/trace/main (; 42 ;) (type $FUNCSIG$v) + (func $gc/itcm/trace/main (; 40 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -3108,26 +3053,24 @@ global.set $~lib/started end ) - (func $start (; 43 ;) (type $FUNCSIG$v) + (func $start (; 41 ;) (type $FUNCSIG$v) call $start:gc/itcm/trace ) - (func $null (; 44 ;) (type $FUNCSIG$v) + (func $null (; 42 ;) (type $FUNCSIG$v) ) - (func $~iterateRoots (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) + (func $~lib/gc/__gc_mark_roots (; 43 ;) (type $FUNCSIG$v) + (local $0 i32) global.get $gc/itcm/trace/ref - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end global.get $gc/itcm/trace/arr - local.tee $1 + local.tee $0 if - local.get $1 local.get $0 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/itcm/__ref_mark end ) ) diff --git a/tests/compiler/gc/rc/global-assign.optimized.wat b/tests/compiler/gc/rc/global-assign.optimized.wat index 800c6b0234..83f4992643 100644 --- a/tests/compiler/gc/rc/global-assign.optimized.wat +++ b/tests/compiler/gc/rc/global-assign.optimized.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 24 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-assign.untouched.wat b/tests/compiler/gc/rc/global-assign.untouched.wat index 96d6bc2819..7648165ad8 100644 --- a/tests/compiler/gc/rc/global-assign.untouched.wat +++ b/tests/compiler/gc/rc/global-assign.untouched.wat @@ -22,10 +22,10 @@ (global $gc/rc/_dummy/retain_ref (mut i32) (i32.const 0)) (global $gc/rc/_dummy/release_count (mut i32) (i32.const 0)) (global $gc/rc/_dummy/release_ref (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $gc/rc/global-assign/global (mut i32) (i32.const 0)) (global $gc/rc/global-assign/globalRef (mut i32) (i32.const 0)) @@ -40,7 +40,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -139,7 +139,7 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 @@ -151,7 +151,7 @@ i32.const 0 i32.store offset=12 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) (func $gc/rc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) @@ -180,24 +180,24 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-init.optimized.wat b/tests/compiler/gc/rc/global-init.optimized.wat index 533bec6319..c73a497d58 100644 --- a/tests/compiler/gc/rc/global-init.optimized.wat +++ b/tests/compiler/gc/rc/global-init.optimized.wat @@ -139,7 +139,7 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -154,7 +154,7 @@ if i32.const 0 i32.const 24 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-init.untouched.wat b/tests/compiler/gc/rc/global-init.untouched.wat index 85af655fc4..a94853ad1c 100644 --- a/tests/compiler/gc/rc/global-init.untouched.wat +++ b/tests/compiler/gc/rc/global-init.untouched.wat @@ -21,10 +21,10 @@ (global $gc/rc/_dummy/retain_ref (mut i32) (i32.const 0)) (global $gc/rc/_dummy/release_count (mut i32) (i32.const 0)) (global $gc/rc/_dummy/release_ref (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $gc/rc/global-init/global (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) @@ -38,7 +38,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -137,7 +137,7 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 @@ -149,7 +149,7 @@ i32.const 0 i32.store offset=12 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) (func $gc/rc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) @@ -178,24 +178,24 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index cf2a517119..20c0d5b4f6 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -85,7 +85,7 @@ if i32.const 0 i32.const 16 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index ae1eeea1e3..06c388560a 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -9,10 +9,10 @@ (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 2 funcref) (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|0) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) @@ -24,7 +24,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -123,13 +123,13 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 i32.store offset=4 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -141,24 +141,24 @@ if i32.const 0 i32.const 16 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 16 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index 5291219cc8..8c080e3f65 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 48 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -146,7 +146,7 @@ if i32.const 0 i32.const 48 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index c59c4bb2f2..b057ac92dc 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -12,10 +12,10 @@ (elem (i32.const 0) $null $inlining/func_fe~anonymous|0) (global $inlining/constantGlobal i32 (i32.const 1)) (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 80)) (export "memory" (memory $0)) @@ -288,7 +288,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -387,13 +387,13 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 i32.store offset=4 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) (func $~lib/runtime/runtime.register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -405,24 +405,24 @@ if i32.const 0 i32.const 48 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 48 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index c340505a3a..bef00ff3d2 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -303,7 +303,7 @@ if i32.const 0 i32.const 464 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -318,7 +318,7 @@ if i32.const 0 i32.const 464 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -2358,7 +2358,7 @@ if i32.const 0 i32.const 1648 - i32.const 190 + i32.const 191 i32.const 4 call $~lib/env/abort unreachable @@ -2451,7 +2451,7 @@ if i32.const 0 i32.const 464 - i32.const 132 + i32.const 89 i32.const 6 call $~lib/env/abort unreachable @@ -2465,7 +2465,7 @@ if i32.const 0 i32.const 464 - i32.const 134 + i32.const 91 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index ccdb173131..7db944f45b 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -43,10 +43,10 @@ (elem (i32.const 0) $null) (global $number/a (mut i32) (i32.const 1)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) @@ -139,7 +139,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -238,13 +238,13 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 i32.store offset=4 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) (func $~lib/util/number/utoa32_lut (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -399,24 +399,24 @@ if i32.const 0 i32.const 464 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 464 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -493,7 +493,7 @@ ) (func $~lib/string/String#get:length (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub i32.load offset=4 i32.const 1 @@ -3416,7 +3416,7 @@ if i32.const 0 i32.const 1648 - i32.const 190 + i32.const 191 i32.const 4 call $~lib/env/abort unreachable @@ -3534,24 +3534,24 @@ if i32.const 0 i32.const 464 - i32.const 132 + i32.const 89 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $1 local.get $1 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 464 - i32.const 134 + i32.const 91 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index a3b86ad096..64c6484a53 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -115,7 +115,7 @@ if i32.const 0 i32.const 16 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index f818dffe13..95ba0e84af 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -10,10 +10,10 @@ (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $optional-typeparameters/tConcrete (mut i32) (i32.const 0)) (global $optional-typeparameters/tDerived (mut i32) (i32.const 0)) @@ -31,7 +31,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -130,13 +130,13 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 i32.store offset=4 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -148,24 +148,24 @@ if i32.const 0 i32.const 16 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 16 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 7e9cbe252f..c2d8d100ca 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -27,7 +27,7 @@ if i32.const 0 i32.const 16 - i32.const 95 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -41,7 +41,7 @@ if i32.const 0 i32.const 16 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -64,7 +64,7 @@ if i32.const 0 i32.const 16 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -142,7 +142,7 @@ if i32.const 0 i32.const 64 - i32.const 165 + i32.const 166 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 931b163f46..91f9859aa4 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -13,7 +13,7 @@ (data (i32.const 96) "\01\00\00\00\08\00\00\00n\00u\00l\00l\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/memory/HEAP_BASE i32 (i32.const 112)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -39,7 +39,7 @@ if i32.const 0 i32.const 16 - i32.const 95 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -53,7 +53,7 @@ if i32.const 0 i32.const 16 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -81,7 +81,7 @@ if i32.const 0 i32.const 16 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -114,7 +114,7 @@ if i32.const 0 i32.const 16 - i32.const 95 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -128,7 +128,7 @@ if i32.const 0 i32.const 16 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -139,7 +139,7 @@ ) (func $~lib/string/String#get:length (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub i32.load offset=4 i32.const 1 @@ -218,7 +218,7 @@ if i32.const 0 i32.const 64 - i32.const 165 + i32.const 166 i32.const 4 call $~lib/env/abort unreachable @@ -296,7 +296,7 @@ if i32.const 0 i32.const 16 - i32.const 95 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -310,7 +310,7 @@ if i32.const 0 i32.const 16 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 4f65a23d88..f214152617 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1,6 +1,5 @@ (module (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -26,8 +25,7 @@ (data (i32.const 280) "\04\00\00\00\1e") (data (i32.const 296) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 13 funcref) - (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) - (global $~lib/argc (mut i32) (i32.const 0)) + (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/arraybuffer/ArrayBuffer~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/arraybuffer/ArrayBuffer~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/arraybuffer/ArrayBuffer~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse) (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 264)) (global $std/array-literal/i (mut i32) (i32.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -41,16 +39,13 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/arraybuffer/ArrayBuffer~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/arraybuffer/ArrayBuffer~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/array/Array~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + drop ) (func $~lib/array/Array#__get (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -60,7 +55,7 @@ if i32.const 0 i32.const 136 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -81,7 +76,7 @@ if i32.const 0 i32.const 136 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -191,7 +186,7 @@ if i32.const 0 i32.const 296 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -206,7 +201,7 @@ if i32.const 0 i32.const 296 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -257,39 +252,30 @@ i32.const 7 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array~iterate (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + drop local.get $0 i32.load offset=4 - local.tee $2 + local.tee $1 local.get $0 i32.load offset=8 i32.add local.set $0 loop $continue|0 - local.get $2 + local.get $1 local.get $0 i32.lt_u if - local.get $2 + local.get $1 i32.load - local.set $3 - i32.const 1 - global.set $~lib/argc - local.get $3 + drop local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $2 i32.const 4 i32.add - local.set $2 + local.set $1 br $continue|0 end end diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 6c90a78f4b..5414e87519 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -1,10 +1,10 @@ (module (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -19,16 +19,15 @@ (data (i32.const 248) "\05\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\f8\00\00\00\f8\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 280) "\04\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 13 funcref) - (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/string/String~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array-literal/Ref~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array-literal/RefWithCtor~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) - (global $~lib/argc (mut i32) (i32.const 0)) + (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/string/String~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $std/array-literal/Ref~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $std/array-literal/RefWithCtor~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse) (global $std/array-literal/staticArrayI8 i32 (i32.const 48)) (global $std/array-literal/staticArrayI32 i32 (i32.const 216)) (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 264)) (global $std/array-literal/i (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/array-literal/dynamicArrayI8 (mut i32) (i32.const 0)) (global $std/array-literal/dynamicArrayI32 (mut i32) (i32.const 0)) @@ -40,25 +39,25 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/arraybuffer/ArrayBuffer~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/arraybuffer/ArrayBuffer~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $~lib/array/Array~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/collector/dummy/__ref_mark (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/array/Array~traverse (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/array/Array#get:length (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/string/String~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/string/String~traverse (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $~lib/array/Array#__unchecked_get (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -67,7 +66,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__get (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -77,7 +76,7 @@ if i32.const 0 i32.const 136 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -86,19 +85,16 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array~iterate (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/array/Array#get:length (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -107,7 +103,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -117,7 +113,7 @@ if i32.const 0 i32.const 136 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -126,11 +122,11 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/runtime/runtime.adjust (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -138,7 +134,7 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__mem_allocate (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -217,19 +213,19 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/memory/memory.allocate (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/runtime.adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 @@ -241,13 +237,13 @@ i32.const 0 i32.store offset=12 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/collector/dummy/__ref_register (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/runtime.register (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -256,24 +252,24 @@ if i32.const 0 i32.const 296 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 296 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -285,13 +281,13 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/collector/dummy/__ref_link (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/util/memory/memcpy (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1492,7 +1488,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1723,7 +1719,7 @@ end end ) - (func $~lib/runtime/runtime.makeArray (; 21 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1787,9 +1783,9 @@ end local.get $4 ) - (func $std/array-literal/Ref~iterate (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array-literal/Ref~traverse (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) ) - (func $std/array-literal/Ref#constructor (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/Ref#constructor (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -1801,60 +1797,53 @@ end local.get $0 ) - (func $~lib/array/Array~iterate (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array~traverse (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - i32.const 1 - global.set $~lib/argc local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=4 - local.set $2 - local.get $2 + local.set $1 + local.get $1 local.get $0 i32.load offset=8 i32.add - local.set $3 + local.set $2 block $break|0 loop $continue|0 + local.get $1 local.get $2 - local.get $3 i32.lt_u if block - local.get $2 - i32.load - local.set $4 - i32.const 1 - global.set $~lib/argc - local.get $4 local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $4 + i32.load + local.set $3 + local.get $3 + call $~lib/collector/dummy/__ref_mark + local.get $3 + call $std/array-literal/Ref~traverse local.get $1 - call $std/array-literal/Ref~iterate - local.get $2 i32.const 4 i32.add - local.set $2 + local.set $1 end br $continue|0 end end end ) - (func $~lib/array/Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/array-literal/RefWithCtor~iterate (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $std/array-literal/RefWithCtor~traverse (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $std/array-literal/RefWithCtor#constructor (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/RefWithCtor#constructor (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -1866,57 +1855,50 @@ end local.get $0 ) - (func $~lib/array/Array~iterate (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array~traverse (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - i32.const 1 - global.set $~lib/argc local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=4 - local.set $2 - local.get $2 + local.set $1 + local.get $1 local.get $0 i32.load offset=8 i32.add - local.set $3 + local.set $2 block $break|0 loop $continue|0 + local.get $1 local.get $2 - local.get $3 i32.lt_u if block - local.get $2 - i32.load - local.set $4 - i32.const 1 - global.set $~lib/argc - local.get $4 local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $4 + i32.load + local.set $3 + local.get $3 + call $~lib/collector/dummy/__ref_mark + local.get $3 + call $std/array-literal/RefWithCtor~traverse local.get $1 - call $std/array-literal/RefWithCtor~iterate - local.get $2 i32.const 4 i32.add - local.set $2 + local.set $1 end br $continue|0 end end end ) - (func $~lib/array/Array#get:length (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 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 $1 i32) (local $2 i32) @@ -2356,9 +2338,9 @@ unreachable end ) - (func $start (; 31 ;) (type $FUNCSIG$v) + (func $start (; 32 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 32 ;) (type $FUNCSIG$v) + (func $null (; 33 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 870cc64663..a091377653 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -3,9 +3,9 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$fii (func (param i32 i32) (result f32))) @@ -403,10 +403,9 @@ (data (i32.const 8040) "\02\00\00\00\04") (data (i32.const 8056) "\01") (table $0 102 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/string/String~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/string/String~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|2 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|16 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $start:std/array~anonymous|47 $~lib/array/Array>~iterate $~lib/string/String~iterate $~lib/array/Array>~iterate $start:std/array~anonymous|48 $~lib/array/Array<~lib/string/String | null>~iterate $~lib/array/Array<~lib/string/String | null>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/array/Array>~iterate $~lib/array/Array>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/string/String~iterate $~lib/array/Array<~lib/string/String | null>~iterate $~lib/array/Array<~lib/string/String | null>~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate) + (elem (i32.const 0) $null $~lib/string/String~traverse $~lib/string/String~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/string/String~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|2 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|16 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array>~traverse $start:std/array~anonymous|47 $~lib/array/Array>~traverse $~lib/string/String~traverse $~lib/array/Array>~traverse $start:std/array~anonymous|48 $~lib/array/Array>~traverse $~lib/array/Array>~traverse $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/array/Array>~traverse $~lib/array/Array>~traverse $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/string/String~traverse $~lib/array/Array>~traverse $~lib/array/Array>~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~traverse $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~traverse) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/Null (mut i32) (i32.const 0)) (global $std/array/arr8 (mut i32) (i32.const 216)) @@ -418,6 +417,7 @@ (global $std/array/cwArr (mut i32) (i32.const 0)) (global $std/array/includes (mut i32) (i32.const 0)) (global $std/array/sarr (mut i32) (i32.const 1752)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/every (mut i32) (i32.const 0)) (global $std/array/some (mut i32) (i32.const 0)) (global $std/array/newArr (mut i32) (i32.const 0)) @@ -465,7 +465,7 @@ (export "table" (table $0)) (export "main" (func $std/array/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/string/String~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/string/String~traverse (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -790,7 +790,7 @@ if i32.const 0 i32.const 80 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -805,7 +805,7 @@ if i32.const 0 i32.const 80 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -823,8 +823,8 @@ if i32.const 0 i32.const 24 - i32.const 53 - i32.const 51 + i32.const 54 + i32.const 43 call $~lib/env/abort unreachable end @@ -838,15 +838,10 @@ i32.const 2 call $~lib/runtime/runtime.register ) - (func $~lib/arraybuffer/ArrayBufferView~iterate (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/arraybuffer/ArrayBufferView~traverse (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.tee $0 - if - local.get $0 - local.get $1 - call_indirect (type $FUNCSIG$vi) - end + drop ) (func $~lib/arraybuffer/ArrayBufferView#constructor (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 @@ -857,8 +852,8 @@ if i32.const 0 i32.const 24 - i32.const 11 - i32.const 65 + i32.const 12 + i32.const 57 call $~lib/env/abort unreachable end @@ -900,15 +895,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array~iterate (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc - local.get $0 - i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) - ) - (func $~lib/array/Array#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array#constructor (; 10 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 call $~lib/runtime/runtime.allocate @@ -925,7 +912,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#fill (; 12 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/array/Array#fill (; 11 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) local.get $0 @@ -990,7 +977,7 @@ call $~lib/memory/memory.fill end ) - (func $~lib/util/memory/memcpy (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1837,7 +1824,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2031,7 +2018,7 @@ end end ) - (func $~lib/runtime/runtime.makeArray (; 15 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 14 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) i32.const 16 @@ -2072,7 +2059,7 @@ end local.get $1 ) - (func $~lib/array/Array#__get (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2080,7 +2067,7 @@ if i32.const 0 i32.const 272 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -2091,7 +2078,7 @@ i32.add i32.load8_u ) - (func $std/array/isArraysEqual (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2138,7 +2125,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 18 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/array/Array#fill (; 17 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $0 i32.load offset=4 @@ -2210,7 +2197,7 @@ end end ) - (func $~lib/array/Array#__get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2220,7 +2207,7 @@ if i32.const 0 i32.const 272 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -2233,7 +2220,7 @@ i32.add i32.load ) - (func $std/array/isArraysEqual (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2283,7 +2270,7 @@ end i32.const 1 ) - (func $~lib/runtime/runtime.reallocate (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2361,7 +2348,7 @@ if i32.const 0 i32.const 80 - i32.const 107 + i32.const 64 i32.const 10 call $~lib/env/abort unreachable @@ -2387,7 +2374,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureCapacity (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -2403,8 +2390,8 @@ if i32.const 0 i32.const 272 - i32.const 13 - i32.const 72 + i32.const 14 + i32.const 64 call $~lib/env/abort unreachable end @@ -2436,7 +2423,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2459,7 +2446,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/array/Array#pop (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2470,7 +2457,7 @@ if i32.const 0 i32.const 272 - i32.const 308 + i32.const 309 i32.const 20 call $~lib/env/abort unreachable @@ -2491,7 +2478,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2531,7 +2518,7 @@ call $~lib/memory/memory.copy local.get $4 ) - (func $~lib/array/Array#copyWithin (; 26 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 25 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 @@ -2696,7 +2683,7 @@ end local.get $0 ) - (func $~lib/array/Array#unshift (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#unshift (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2725,7 +2712,7 @@ local.get $2 i32.store offset=12 ) - (func $~lib/array/Array#shift (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2738,7 +2725,7 @@ if i32.const 0 i32.const 272 - i32.const 380 + i32.const 381 i32.const 20 call $~lib/env/abort unreachable @@ -2770,7 +2757,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#reverse (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#reverse (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2817,7 +2804,7 @@ end end ) - (func $~lib/array/Array#indexOf (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2881,7 +2868,7 @@ end i32.const -1 ) - (func $~lib/array/Array#includes (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 local.get $2 @@ -2889,7 +2876,7 @@ i32.const 0 i32.ge_s ) - (func $~lib/array/Array#splice (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2981,7 +2968,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#__set (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 32 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3010,11 +2997,11 @@ i32.store offset=12 end ) - (func $start:std/array~anonymous|0 (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $~lib/array/Array#findIndex (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3062,17 +3049,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3080,7 +3067,7 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3088,12 +3075,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3141,12 +3128,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3154,12 +3141,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3167,12 +3154,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3220,12 +3207,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3233,12 +3220,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3246,13 +3233,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 52 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3295,7 +3282,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3304,7 +3291,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -3313,7 +3300,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 56 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.eqz @@ -3410,11 +3397,11 @@ end end ) - (func $start:std/array~anonymous|21 (; 57 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 56 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#map (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#map (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3472,7 +3459,7 @@ end local.get $4 ) - (func $~lib/array/Array#__get (; 59 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 58 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -3482,7 +3469,7 @@ if i32.const 0 i32.const 272 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -3495,7 +3482,7 @@ i32.add f32.load ) - (func $start:std/array~anonymous|22 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3505,7 +3492,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 61 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#map (; 60 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3560,14 +3547,14 @@ end end ) - (func $start:std/array~anonymous|23 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3577,12 +3564,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3638,7 +3625,7 @@ end local.get $4 ) - (func $start:std/array~anonymous|26 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3650,7 +3637,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -3659,7 +3646,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3671,12 +3658,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 69 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3720,7 +3707,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|31 (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 70 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.eqz if @@ -3731,7 +3718,7 @@ end local.get $0 ) - (func $start:std/array~anonymous|32 (; 72 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.eqz if @@ -3742,7 +3729,7 @@ end local.get $0 ) - (func $start:std/array~anonymous|33 (; 73 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 72 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -3750,7 +3737,7 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 74 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 73 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -3758,7 +3745,7 @@ local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3795,7 +3782,7 @@ end local.get $2 ) - (func $~lib/math/splitMix32 (; 76 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 75 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -3827,7 +3814,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 77 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 76 ;) (type $FUNCSIG$vj) (param $0 i64) (local $1 i64) local.get $0 i64.eqz @@ -3892,7 +3879,7 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/util/sort/insertionSort (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -3974,7 +3961,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 79 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -4230,7 +4217,7 @@ local.get $5 f32.store ) - (func $~lib/array/Array#sort (; 80 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 79 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f32) (local $4 f32) @@ -4239,7 +4226,7 @@ if i32.const 0 i32.const 272 - i32.const 525 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -4298,7 +4285,7 @@ call $~lib/util/sort/weakHeapSort end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 81 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 80 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4327,7 +4314,7 @@ i32.lt_s i32.sub ) - (func $std/array/isArraysEqual (; 82 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 81 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 f32) (local $4 i32) @@ -4388,7 +4375,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 83 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 82 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) @@ -4470,7 +4457,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 84 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 83 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) @@ -4726,7 +4713,7 @@ local.get $5 f64.store ) - (func $~lib/array/Array#sort (; 85 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 84 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 f64) @@ -4735,7 +4722,7 @@ if i32.const 0 i32.const 272 - i32.const 525 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -4794,7 +4781,7 @@ call $~lib/util/sort/weakHeapSort end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 86 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 85 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -4823,7 +4810,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#__get (; 87 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 86 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -4833,7 +4820,7 @@ if i32.const 0 i32.const 272 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -4846,7 +4833,7 @@ i32.add f64.load ) - (func $std/array/isArraysEqual (; 88 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 87 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -4907,7 +4894,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 89 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 88 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4989,7 +4976,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 90 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 89 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5245,7 +5232,7 @@ local.get $1 i32.store ) - (func $~lib/array/Array#sort (; 91 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 90 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5254,7 +5241,7 @@ if i32.const 0 i32.const 272 - i32.const 525 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -5316,12 +5303,12 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 92 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 91 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 93 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 92 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -5330,15 +5317,15 @@ i32.lt_u i32.sub ) - (func $~lib/array/Array.create (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 268435452 i32.gt_u if i32.const 0 i32.const 272 - i32.const 43 - i32.const 70 + i32.const 44 + i32.const 62 call $~lib/env/abort unreachable end @@ -5358,7 +5345,7 @@ i32.store offset=12 local.get $0 ) - (func $std/array/createReverseOrderedArray (; 95 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5387,7 +5374,7 @@ end local.get $2 ) - (func $~lib/math/NativeMath.random (; 96 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 95 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) global.get $~lib/math/random_seeded @@ -5434,7 +5421,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 97 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 96 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5463,7 +5450,7 @@ end local.get $2 ) - (func $std/array/isSorted (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 97 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -5505,7 +5492,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 99 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 98 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -5521,60 +5508,46 @@ unreachable end ) - (func $std/array/assertSortedDefault (; 100 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 99 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 63 call $std/array/assertSorted ) - (func $start:std/array~anonymous|44 (; 101 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 100 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array<~lib/array/Array>~iterate (; 102 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array<~lib/array/Array>~traverse (; 101 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + drop local.get $0 i32.load offset=4 - local.tee $2 + local.tee $1 local.get $0 i32.load offset=8 i32.add - local.set $3 + local.set $0 loop $continue|0 - local.get $2 - local.get $3 + local.get $1 + local.get $0 i32.lt_u if - local.get $2 - i32.load - local.set $0 - i32.const 1 - global.set $~lib/argc - local.get $0 local.get $1 - call_indirect (type $FUNCSIG$vi) - i32.const 1 - global.set $~lib/argc - local.get $0 i32.load + i32.load + drop local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $2 i32.const 4 i32.add - local.set $2 + local.set $1 br $continue|0 end end ) - (func $~lib/array/Array.create<~lib/array/Array> (; 103 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array.create<~lib/array/Array> (; 102 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 512 i32.const 68 @@ -5592,7 +5565,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array<~lib/array/Array>#__set (; 104 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__set (; 103 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -5603,7 +5576,7 @@ if i32.const 0 i32.const 272 - i32.const 110 + i32.const 111 i32.const 38 call $~lib/env/abort unreachable @@ -5639,7 +5612,7 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedNestedArray (; 105 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 104 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5671,7 +5644,7 @@ end local.get $1 ) - (func $start:std/array~anonymous|47 (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 105 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -5680,7 +5653,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#sort (; 107 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#sort (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5689,7 +5662,7 @@ if i32.const 0 i32.const 272 - i32.const 525 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -5741,7 +5714,7 @@ call $~lib/util/sort/insertionSort local.get $0 ) - (func $~lib/array/Array<~lib/array/Array>#__get (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#__get (; 107 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -5749,7 +5722,7 @@ if i32.const 0 i32.const 272 - i32.const 95 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -5763,7 +5736,7 @@ if i32.const 0 i32.const 272 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -5776,7 +5749,7 @@ i32.add i32.load ) - (func $std/array/isSorted<~lib/array/Array> (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/array/Array> (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -5818,7 +5791,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/array/Array> (; 110 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/array/Array> (; 109 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#sort @@ -5834,44 +5807,35 @@ unreachable end ) - (func $~lib/array/Array>~iterate (; 111 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array>~traverse (; 110 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + drop local.get $0 i32.load offset=4 - local.tee $2 + local.tee $1 local.get $0 i32.load offset=8 i32.add local.set $0 loop $continue|0 - local.get $2 + local.get $1 local.get $0 i32.lt_u if - local.get $2 + local.get $1 i32.load - local.set $3 - i32.const 1 - global.set $~lib/argc - local.get $3 + drop local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $2 i32.const 4 i32.add - local.set $2 + local.set $1 br $continue|0 end end ) - (func $~lib/array/Array.create> (; 112 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array.create> (; 111 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 512 i32.const 71 @@ -5889,7 +5853,7 @@ i32.store offset=12 local.get $0 ) - (func $std/array/createReverseOrderedElementsArray (; 113 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 112 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5922,53 +5886,14 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 114 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/array/Array<~lib/string/String | null>~iterate (; 115 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 1 - global.set $~lib/argc - local.get $0 - i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $0 - i32.load offset=4 - local.tee $2 - local.get $0 - i32.load offset=8 - i32.add - local.set $0 - loop $continue|0 - local.get $2 - local.get $0 - i32.lt_u - if - local.get $2 - i32.load - local.tee $3 - if - i32.const 1 - global.set $~lib/argc - local.get $3 - local.get $1 - call_indirect (type $FUNCSIG$vi) - end - local.get $2 - i32.const 4 - i32.add - local.set $2 - br $continue|0 - end - end - ) - (func $~lib/util/string/compareImpl (; 116 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 114 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 @@ -6001,7 +5926,7 @@ end local.get $3 ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 115 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6077,7 +6002,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 118 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 116 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) block $1of1 block $0of1 @@ -6107,7 +6032,7 @@ unreachable end ) - (func $~lib/string/String.__eq (; 119 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -6153,7 +6078,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array/isArraysEqual<~lib/string/String | null> (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual<~lib/string/String | null> (; 118 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -6200,7 +6125,7 @@ end i32.const 1 ) - (func $~lib/array/Array.create<~lib/string/String> (; 121 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array.create<~lib/string/String> (; 119 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 400 i32.const 78 @@ -6218,7 +6143,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/string/String#charAt (; 122 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#charAt (; 120 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 3020 @@ -6244,7 +6169,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String#concat (; 123 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6293,7 +6218,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String.__concat (; 124 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 122 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 4424 local.get $0 @@ -6301,7 +6226,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 125 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 4200 @@ -6333,7 +6258,7 @@ end local.get $1 ) - (func $std/array/createRandomStringArray (; 126 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createRandomStringArray (; 124 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) call $~lib/array/Array.create<~lib/string/String> @@ -6360,7 +6285,7 @@ end local.get $1 ) - (func $~lib/string/String#substring (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 125 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6369,7 +6294,7 @@ if i32.const 0 i32.const 4376 - i32.const 190 + i32.const 191 i32.const 4 call $~lib/env/abort unreachable @@ -6456,14 +6381,14 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/runtime/runtime.discard (; 128 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 126 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 8060 i32.le_u if i32.const 0 i32.const 80 - i32.const 132 + i32.const 89 i32.const 6 call $~lib/env/abort unreachable @@ -6477,13 +6402,13 @@ if i32.const 0 i32.const 80 - i32.const 134 + i32.const 91 i32.const 6 call $~lib/env/abort unreachable end ) - (func $~lib/array/Array#join_bool (; 129 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_bool (; 127 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6635,7 +6560,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/decimalCount32 (; 130 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 128 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -6689,7 +6614,7 @@ end end ) - (func $~lib/util/number/utoa32_lut (; 131 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 129 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) i32.const 5092 @@ -6799,7 +6724,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 132 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 130 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6841,7 +6766,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa_stream (; 133 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6885,7 +6810,7 @@ end local.get $2 ) - (func $~lib/array/Array#join_int (; 134 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7003,12 +6928,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int ) - (func $~lib/util/number/utoa32 (; 136 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 134 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -7031,7 +6956,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa_stream (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 135 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -7055,7 +6980,7 @@ call $~lib/util/number/utoa32_lut local.get $0 ) - (func $~lib/array/Array#join_int (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7173,12 +7098,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int ) - (func $~lib/util/number/genDigits (; 140 ;) (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 (; 138 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -7593,7 +7518,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 141 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 139 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -7852,7 +7777,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 142 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 140 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -8140,7 +8065,7 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 143 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 141 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -8185,7 +8110,7 @@ call $~lib/runtime/runtime.discard local.get $1 ) - (func $~lib/util/number/dtoa_stream (; 144 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 142 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -8256,7 +8181,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join_flt (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_flt (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8372,7 +8297,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/string/String>#join_str (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join_str (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8542,18 +8467,18 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/string/String>#join (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join (; 145 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String>#join_str ) - (func $std/array/Ref#constructor (; 148 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/Ref#constructor (; 146 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/runtime.allocate i32.const 87 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join_ref (; 149 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_ref (; 147 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8686,12 +8611,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#toString (; 150 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 148 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa_stream (; 151 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 149 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -8746,7 +8671,7 @@ end local.get $2 ) - (func $~lib/array/Array#join_int (; 152 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 150 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8858,7 +8783,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa_stream (; 153 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 151 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -8888,7 +8813,7 @@ call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join_int (; 154 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 152 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9004,7 +8929,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/decimalCount64 (; 155 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 153 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -9058,7 +8983,7 @@ end end ) - (func $~lib/util/number/utoa64_lut (; 156 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 154 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9155,7 +9080,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 157 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 155 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9197,7 +9122,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa_stream (; 158 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 156 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -9237,7 +9162,7 @@ end local.get $1 ) - (func $~lib/array/Array#join_int (; 159 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9353,7 +9278,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa64 (; 160 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 158 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9418,7 +9343,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa_stream (; 161 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 159 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -9481,7 +9406,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 160 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9597,12 +9522,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/string/String | null>#toString (; 163 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#toString (; 161 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/string/String>#join ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 164 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9697,7 +9622,7 @@ local.get $1 end ) - (func $~lib/util/number/itoa_stream (; 165 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 163 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -9727,7 +9652,7 @@ call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join_int (; 166 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 164 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9839,7 +9764,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 167 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 165 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9931,47 +9856,35 @@ local.get $1 end ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate (; 168 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~traverse (; 166 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + drop local.get $0 i32.load offset=4 - local.tee $2 + local.tee $1 local.get $0 i32.load offset=8 i32.add - local.set $3 + local.set $0 loop $continue|0 - local.get $2 - local.get $3 + local.get $1 + local.get $0 i32.lt_u if - local.get $2 - i32.load - local.set $0 - i32.const 1 - global.set $~lib/argc - local.get $0 local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $0 + i32.load + call $~lib/array/Array<~lib/array/Array>~traverse local.get $1 - call $~lib/array/Array<~lib/array/Array>~iterate - local.get $2 i32.const 4 i32.add - local.set $2 + local.set $1 br $continue|0 end end ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 169 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 167 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10066,7 +9979,7 @@ local.get $1 end ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 170 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 168 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10158,7 +10071,7 @@ local.get $1 end ) - (func $start:std/array (; 171 ;) (type $FUNCSIG$v) + (func $start:std/array (; 169 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14509,7 +14422,7 @@ unreachable end ) - (func $std/array/main (; 172 ;) (type $FUNCSIG$v) + (func $std/array/main (; 170 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -14518,7 +14431,7 @@ global.set $~lib/started end ) - (func $null (; 173 ;) (type $FUNCSIG$v) + (func $null (; 171 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 6fdba93e8c..7eb738c1c7 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -3,9 +3,9 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$fii (func (param i32 i32) (result f32))) @@ -222,14 +222,13 @@ (data (i32.const 8016) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") (data (i32.const 8040) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") (table $0 102 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array/P~iterate $~lib/typedarray/Uint8Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|4 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|18 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|30 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|34 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|38 $start:std/array~anonymous|39 $start:std/array~anonymous|40 $start:std/array~anonymous|41 $start:std/array~anonymous|42 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $start:std/array~anonymous|47 $~lib/array/Array>~iterate $std/array/Proxy~iterate $~lib/array/Array>~iterate $start:std/array~anonymous|48 $~lib/array/Array<~lib/string/String | null>~iterate $~lib/array/Array<~lib/string/String | null>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/array/Array<~lib/string/String>~iterate $~lib/array/Array<~lib/string/String>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array/Ref~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741808)) + (elem (i32.const 0) $null $~lib/string/String~traverse $~lib/arraybuffer/ArrayBuffer~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $std/array/P~traverse $~lib/typedarray/Uint8Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|4 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|18 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $~lib/array/Array~traverse $~lib/array/Array~traverse $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|30 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|34 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|38 $start:std/array~anonymous|39 $start:std/array~anonymous|40 $start:std/array~anonymous|41 $start:std/array~anonymous|42 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array>~traverse $start:std/array~anonymous|47 $~lib/array/Array>~traverse $std/array/Proxy~traverse $~lib/array/Array>~traverse $start:std/array~anonymous|48 $~lib/array/Array<~lib/string/String | null>~traverse $~lib/array/Array<~lib/string/String | null>~traverse $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/array/Array<~lib/string/String>~traverse $~lib/array/Array<~lib/string/String>~traverse $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $std/array/Ref~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~traverse $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~traverse) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/num (mut i32) (i32.const 1)) (global $std/array/Null (mut i32) (i32.const 0)) @@ -244,6 +243,7 @@ (global $std/array/cwArr (mut i32) (i32.const 0)) (global $std/array/includes (mut i32) (i32.const 0)) (global $std/array/sarr (mut i32) (i32.const 1752)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/every (mut i32) (i32.const 0)) (global $std/array/some (mut i32) (i32.const 0)) (global $std/array/newArr (mut i32) (i32.const 0)) @@ -297,14 +297,14 @@ (export "table" (table $0)) (export "main" (func $std/array/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/string/String~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/string/String~traverse (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) (func $~lib/runtime/runtime.adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -403,7 +403,7 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 @@ -415,7 +415,7 @@ i32.const 0 i32.store offset=12 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -675,8 +675,8 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer~iterate (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/arraybuffer/ArrayBuffer~traverse (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) (func $~lib/collector/dummy/__ref_register (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) nop @@ -690,24 +690,24 @@ if i32.const 0 i32.const 80 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 80 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -722,13 +722,13 @@ (func $~lib/arraybuffer/ArrayBuffer#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 i32.const 24 - i32.const 53 - i32.const 51 + i32.const 54 + i32.const 43 call $~lib/env/abort unreachable end @@ -743,41 +743,42 @@ i32.const 2 call $~lib/runtime/runtime.register ) - (func $~lib/arraybuffer/ArrayBufferView~iterate (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/collector/dummy/__ref_mark (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/arraybuffer/ArrayBufferView~traverse (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.tee $2 + local.tee $1 if - local.get $2 local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $2 + call $~lib/collector/dummy/__ref_mark local.get $1 - call $~lib/arraybuffer/ArrayBuffer~iterate + call $~lib/arraybuffer/ArrayBuffer~traverse end ) - (func $~lib/collector/dummy/__ref_link (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH local.get $2 i32.shr_u i32.gt_u if i32.const 0 i32.const 24 - i32.const 11 - i32.const 65 + i32.const 12 + i32.const 57 call $~lib/env/abort unreachable end @@ -839,15 +840,12 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array~iterate (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/array/Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -869,7 +867,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array.isArray<~lib/array/Array | null> (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray<~lib/array/Array | null> (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 if (result i32) local.get $0 @@ -879,7 +877,7 @@ i32.const 1 end ) - (func $~lib/array/Array.isArray<~lib/array/Array> (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray<~lib/array/Array> (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 if (result i32) local.get $0 @@ -889,9 +887,9 @@ i32.const 1 end ) - (func $std/array/P~iterate (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/P~traverse (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) ) - (func $std/array/P#constructor (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/P#constructor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -903,7 +901,7 @@ end local.get $0 ) - (func $~lib/array/Array.isArray (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -913,13 +911,12 @@ i32.const 0 end ) - (func $~lib/typedarray/Uint8Array~iterate (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/typedarray/Uint8Array~traverse (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~traverse ) - (func $~lib/typedarray/Uint8Array#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -935,7 +932,7 @@ local.set $0 local.get $0 ) - (func $~lib/array/Array.isArray<~lib/typedarray/Uint8Array> (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray<~lib/typedarray/Uint8Array> (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -945,7 +942,7 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -955,7 +952,7 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray<~lib/string/String> (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray<~lib/string/String> (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -965,15 +962,12 @@ i32.const 0 end ) - (func $~lib/array/Array~iterate (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/array/Array#fill (; 29 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 30 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1049,7 +1043,7 @@ end local.get $0 ) - (func $~lib/util/memory/memcpy (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2250,7 +2244,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 32 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2481,7 +2475,7 @@ end end ) - (func $~lib/runtime/runtime.makeArray (; 32 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 33 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2545,11 +2539,11 @@ end local.get $4 ) - (func $~lib/array/Array#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -2558,7 +2552,7 @@ i32.add i32.load8_u ) - (func $~lib/array/Array#__get (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2568,7 +2562,7 @@ if i32.const 0 i32.const 272 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -2577,7 +2571,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/array/isArraysEqual (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2632,15 +2626,12 @@ end i32.const 1 ) - (func $~lib/array/Array~iterate (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/array/Array#fill (; 38 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 39 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2726,11 +2717,11 @@ end local.get $0 ) - (func $~lib/array/Array#get:length (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -2739,7 +2730,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2749,7 +2740,7 @@ if i32.const 0 i32.const 272 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -2758,7 +2749,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/array/isArraysEqual (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2813,17 +2804,17 @@ end i32.const 1 ) - (func $~lib/array/Array#get:length (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $std/array/internalCapacity (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/internalCapacity (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -2833,21 +2824,21 @@ i32.const 2 i32.shr_s ) - (func $~lib/allocator/arena/__mem_free (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 47 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 47 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/runtime.reallocate (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 @@ -2884,7 +2875,7 @@ i32.const 0 i32.store offset=12 local.get $5 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add local.set $6 local.get $6 @@ -2901,7 +2892,7 @@ call $~lib/memory/memory.fill local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq if local.get $0 @@ -2911,7 +2902,7 @@ if i32.const 0 i32.const 80 - i32.const 107 + i32.const 64 i32.const 10 call $~lib/env/abort unreachable @@ -2944,7 +2935,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2959,15 +2950,15 @@ i32.gt_u if local.get $1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH local.get $2 i32.shr_u i32.gt_u if i32.const 0 i32.const 272 - i32.const 13 - i32.const 72 + i32.const 14 + i32.const 64 call $~lib/env/abort unreachable end @@ -3018,7 +3009,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3045,7 +3036,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#__unchecked_get (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -3054,7 +3045,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3064,7 +3055,7 @@ if i32.const 0 i32.const 272 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -3073,7 +3064,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#pop (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3085,7 +3076,7 @@ if i32.const 0 i32.const 272 - i32.const 308 + i32.const 309 i32.const 20 call $~lib/env/abort unreachable @@ -3106,7 +3097,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#concat (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3154,7 +3145,7 @@ call $~lib/memory/memory.copy local.get $4 ) - (func $~lib/array/Array#copyWithin (; 55 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 56 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3344,7 +3335,7 @@ end local.get $0 ) - (func $std/array/isArraysEqual (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -3399,7 +3390,7 @@ end i32.const 1 ) - (func $~lib/array/Array#unshift (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#unshift (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3432,7 +3423,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#shift (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3446,7 +3437,7 @@ if i32.const 0 i32.const 272 - i32.const 380 + i32.const 381 i32.const 20 call $~lib/env/abort unreachable @@ -3481,7 +3472,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#reverse (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#reverse (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3536,7 +3527,7 @@ end local.get $0 ) - (func $~lib/array/Array#indexOf (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3608,7 +3599,7 @@ end i32.const -1 ) - (func $~lib/array/Array#includes (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 local.get $2 @@ -3616,7 +3607,7 @@ i32.const 0 i32.ge_s ) - (func $~lib/array/Array#splice (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3724,7 +3715,7 @@ i32.store offset=12 local.get $6 ) - (func $~lib/array/Array#__unchecked_set (; 63 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 64 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.load offset=4 local.get $1 @@ -3734,7 +3725,7 @@ local.get $2 i32.store ) - (func $~lib/array/Array#__set (; 64 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 65 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3760,12 +3751,12 @@ i32.store offset=12 end ) - (func $start:std/array~anonymous|0 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $~lib/array/Array#findIndex (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3824,17 +3815,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3843,12 +3834,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|4 (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|4 (; 71 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 71 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3856,12 +3847,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 73 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 73 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 74 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3921,12 +3912,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 76 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3935,12 +3926,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 76 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 77 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 77 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3948,12 +3939,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 79 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 79 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 80 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4012,12 +4003,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 80 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 81 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 81 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4026,12 +4017,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 83 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 83 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 84 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4039,13 +4030,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 84 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 85 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 85 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 86 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4097,7 +4088,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 86 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 87 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4107,13 +4098,13 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|18 (; 87 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|18 (; 88 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 88 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 89 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -4122,7 +4113,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 89 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 90 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.const 0 @@ -4237,19 +4228,16 @@ end end ) - (func $start:std/array~anonymous|21 (; 90 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 91 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array~iterate (; 91 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 92 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/array/Array#map (; 92 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 93 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4321,11 +4309,11 @@ end local.get $3 ) - (func $~lib/array/Array#get:length (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 94 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__unchecked_get (; 95 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $0 i32.load offset=4 local.get $1 @@ -4334,7 +4322,7 @@ i32.add f32.load ) - (func $~lib/array/Array#__get (; 95 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 96 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -4344,7 +4332,7 @@ if i32.const 0 i32.const 272 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -4353,7 +4341,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $start:std/array~anonymous|22 (; 96 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 97 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4364,7 +4352,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 97 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4436,14 +4424,14 @@ end local.get $3 ) - (func $start:std/array~anonymous|23 (; 98 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 99 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 99 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 100 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4453,12 +4441,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 100 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 101 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 101 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 102 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4530,7 +4518,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|26 (; 102 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 103 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4543,7 +4531,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 103 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 104 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -4552,7 +4540,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 104 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 105 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4564,12 +4552,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 105 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 106 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 107 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4627,12 +4615,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|30 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|30 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|31 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 109 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4644,7 +4632,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduce (; 109 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 110 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4702,7 +4690,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|32 (; 110 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 111 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4714,7 +4702,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|33 (; 111 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 112 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4723,12 +4711,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|34 (; 112 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|34 (; 113 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 113 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 114 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4736,12 +4724,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|36 (; 114 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|36 (; 115 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 115 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 116 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4786,12 +4774,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|37 (; 116 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|37 (; 117 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|38 (; 117 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|38 (; 118 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4803,7 +4791,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduceRight (; 118 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 119 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4848,7 +4836,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|39 (; 119 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|39 (; 120 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4860,7 +4848,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|40 (; 120 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|40 (; 121 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4869,12 +4857,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|41 (; 121 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|41 (; 122 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|42 (; 122 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|42 (; 123 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4882,7 +4870,7 @@ local.get $1 i32.add ) - (func $~lib/math/murmurHash3 (; 123 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 124 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -4911,7 +4899,7 @@ local.set $0 local.get $0 ) - (func $~lib/math/splitMix32 (; 124 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 125 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -4946,7 +4934,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 125 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 126 ;) (type $FUNCSIG$vj) (param $0 i64) local.get $0 i64.eqz if @@ -4975,7 +4963,7 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/util/sort/insertionSort (; 126 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 127 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f32) (local $5 i32) @@ -5071,7 +5059,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 127 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 128 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5371,7 +5359,7 @@ local.get $10 f32.store ) - (func $~lib/array/Array#sort (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -5384,7 +5372,7 @@ if i32.const 0 i32.const 272 - i32.const 525 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -5457,7 +5445,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 129 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 130 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5490,7 +5478,7 @@ i32.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 130 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 131 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -5509,12 +5497,12 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/builtins/isNaN (; 131 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 132 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $std/array/isArraysEqual (; 132 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 133 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -5585,15 +5573,12 @@ end i32.const 1 ) - (func $~lib/array/Array~iterate (; 133 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 134 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/util/sort/insertionSort (; 134 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 135 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) @@ -5689,7 +5674,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 135 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 136 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5989,7 +5974,7 @@ local.get $10 f64.store ) - (func $~lib/array/Array#sort (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -6002,7 +5987,7 @@ if i32.const 0 i32.const 272 - i32.const 525 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -6075,7 +6060,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 137 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 138 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -6108,7 +6093,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6127,11 +6112,11 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/array/Array#get:length (; 139 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 140 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 140 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__unchecked_get (; 141 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $0 i32.load offset=4 local.get $1 @@ -6140,7 +6125,7 @@ i32.add f64.load ) - (func $~lib/array/Array#__get (; 141 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 142 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -6150,7 +6135,7 @@ if i32.const 0 i32.const 272 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -6159,12 +6144,12 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/builtins/isNaN (; 142 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 143 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $std/array/isArraysEqual (; 143 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 144 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -6235,7 +6220,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 144 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 145 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6331,7 +6316,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 145 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 146 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6631,7 +6616,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6642,7 +6627,7 @@ if i32.const 0 i32.const 272 - i32.const 525 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -6715,12 +6700,12 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6739,7 +6724,7 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/util/sort/insertionSort (; 149 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 150 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6835,7 +6820,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 150 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 151 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7135,7 +7120,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7146,7 +7131,7 @@ if i32.const 0 i32.const 272 - i32.const 525 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -7219,7 +7204,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -7228,7 +7213,7 @@ i32.lt_u i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -7247,18 +7232,18 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/array/Array.create (; 154 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create (; 155 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH i32.const 2 i32.shr_u i32.gt_u if i32.const 0 i32.const 272 - i32.const 43 - i32.const 70 + i32.const 44 + i32.const 62 call $~lib/env/abort unreachable end @@ -7279,7 +7264,7 @@ i32.store offset=12 local.get $1 ) - (func $std/array/createReverseOrderedArray (; 155 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -7313,7 +7298,7 @@ end local.get $1 ) - (func $~lib/math/NativeMath.random (; 156 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 157 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) (local $2 i64) @@ -7370,7 +7355,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 158 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -7404,12 +7389,12 @@ end local.get $1 ) - (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $std/array/isSorted (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -7457,7 +7442,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 160 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 161 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -7473,7 +7458,7 @@ unreachable end ) - (func $std/array/assertSortedDefault (; 161 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 162 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 block $~lib/util/sort/COMPARATOR|inlined.1 (result i32) i32.const 63 @@ -7481,84 +7466,77 @@ end call $std/array/assertSorted ) - (func $start:std/array~anonymous|43 (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|43 (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|44 (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $start:std/array~anonymous|45 (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|45 (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|46 (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|46 (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array<~lib/array/Array>~iterate (; 166 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/array/Array>~traverse (; 167 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - i32.const 1 - global.set $~lib/argc local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=4 - local.set $2 - local.get $2 + local.set $1 + local.get $1 local.get $0 i32.load offset=8 i32.add - local.set $3 + local.set $2 block $break|0 loop $continue|0 + local.get $1 local.get $2 - local.get $3 i32.lt_u if block - local.get $2 - i32.load - local.set $4 - i32.const 1 - global.set $~lib/argc - local.get $4 local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $4 + i32.load + local.set $3 + local.get $3 + call $~lib/collector/dummy/__ref_mark + local.get $3 + call $~lib/array/Array~traverse local.get $1 - call $~lib/array/Array~iterate - local.get $2 i32.const 4 i32.add - local.set $2 + local.set $1 end br $continue|0 end end end ) - (func $~lib/array/Array.create<~lib/array/Array> (; 167 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create<~lib/array/Array> (; 168 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH i32.const 2 i32.shr_u i32.gt_u if i32.const 0 i32.const 272 - i32.const 43 - i32.const 70 + i32.const 44 + i32.const 62 call $~lib/env/abort unreachable end @@ -7579,7 +7557,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/array/Array<~lib/array/Array>#__unchecked_set (; 168 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__unchecked_set (; 169 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7612,7 +7590,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/array/Array<~lib/array/Array>#__set (; 169 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__set (; 170 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -7623,7 +7601,7 @@ if i32.const 0 i32.const 272 - i32.const 110 + i32.const 111 i32.const 38 call $~lib/env/abort unreachable @@ -7649,7 +7627,7 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedNestedArray (; 170 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 171 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7693,7 +7671,7 @@ end local.get $1 ) - (func $start:std/array~anonymous|47 (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -7702,7 +7680,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/util/sort/insertionSort<~lib/array/Array> (; 172 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort<~lib/array/Array> (; 173 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7798,7 +7776,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/array/Array>#sort (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#sort (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7809,7 +7787,7 @@ if i32.const 0 i32.const 272 - i32.const 525 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -7872,11 +7850,11 @@ end local.get $0 ) - (func $~lib/array/Array<~lib/array/Array>#get:length (; 174 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#get:length (; 175 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/array/Array>#__unchecked_get (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#__unchecked_get (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -7885,7 +7863,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/array/Array>#__get (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#__get (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -7893,7 +7871,7 @@ if i32.const 0 i32.const 272 - i32.const 95 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -7907,7 +7885,7 @@ if i32.const 0 i32.const 272 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -7916,7 +7894,7 @@ local.get $1 call $~lib/array/Array<~lib/array/Array>#__unchecked_get ) - (func $std/array/isSorted<~lib/array/Array> (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/array/Array> (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -7964,7 +7942,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/array/Array> (; 178 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/array/Array> (; 179 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#sort @@ -7980,67 +7958,60 @@ unreachable end ) - (func $std/array/Proxy~iterate (; 179 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $std/array/Proxy~traverse (; 180 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $~lib/array/Array>~iterate (; 180 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array>~traverse (; 181 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - i32.const 1 - global.set $~lib/argc local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=4 - local.set $2 - local.get $2 + local.set $1 + local.get $1 local.get $0 i32.load offset=8 i32.add - local.set $3 + local.set $2 block $break|0 loop $continue|0 + local.get $1 local.get $2 - local.get $3 i32.lt_u if block - local.get $2 - i32.load - local.set $4 - i32.const 1 - global.set $~lib/argc - local.get $4 local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $4 + i32.load + local.set $3 + local.get $3 + call $~lib/collector/dummy/__ref_mark + local.get $3 + call $std/array/Proxy~traverse local.get $1 - call $std/array/Proxy~iterate - local.get $2 i32.const 4 i32.add - local.set $2 + local.set $1 end br $continue|0 end end end ) - (func $~lib/array/Array.create> (; 181 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create> (; 182 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH i32.const 2 i32.shr_u i32.gt_u if i32.const 0 i32.const 272 - i32.const 43 - i32.const 70 + i32.const 44 + i32.const 62 call $~lib/env/abort unreachable end @@ -8061,7 +8032,7 @@ i32.store offset=12 local.get $1 ) - (func $std/array/Proxy#constructor (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/Proxy#constructor (; 183 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if @@ -8076,7 +8047,7 @@ i32.store local.get $0 ) - (func $~lib/array/Array>#__unchecked_set (; 183 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__unchecked_set (; 184 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -8109,7 +8080,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/array/Array>#__set (; 184 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__set (; 185 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -8120,7 +8091,7 @@ if i32.const 0 i32.const 272 - i32.const 110 + i32.const 111 i32.const 38 call $~lib/env/abort unreachable @@ -8146,7 +8117,7 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedElementsArray (; 185 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 186 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -8182,14 +8153,14 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 187 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/util/sort/insertionSort> (; 187 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort> (; 188 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8285,7 +8256,7 @@ unreachable end ) - (func $~lib/array/Array>#sort (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 189 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8296,7 +8267,7 @@ if i32.const 0 i32.const 272 - i32.const 525 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -8359,11 +8330,11 @@ end local.get $0 ) - (func $~lib/array/Array>#get:length (; 189 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#get:length (; 190 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array>#__unchecked_get (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__unchecked_get (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -8372,7 +8343,7 @@ i32.add i32.load ) - (func $~lib/array/Array>#__get (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__get (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -8380,7 +8351,7 @@ if i32.const 0 i32.const 272 - i32.const 95 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -8394,7 +8365,7 @@ if i32.const 0 i32.const 272 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -8403,7 +8374,7 @@ local.get $1 call $~lib/array/Array>#__unchecked_get ) - (func $std/array/isSorted> (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 193 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -8451,7 +8422,7 @@ end i32.const 1 ) - (func $std/array/assertSorted> (; 193 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 194 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -8467,56 +8438,49 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String | null>~iterate (; 194 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String | null>~traverse (; 195 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - i32.const 1 - global.set $~lib/argc local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=4 - local.set $2 - local.get $2 + local.set $1 + local.get $1 local.get $0 i32.load offset=8 i32.add - local.set $3 + local.set $2 block $break|0 loop $continue|0 + local.get $1 local.get $2 - local.get $3 i32.lt_u if block - local.get $2 + local.get $1 i32.load - local.set $4 - local.get $4 + local.set $3 + local.get $3 if - i32.const 1 - global.set $~lib/argc - local.get $4 - local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $4 - local.get $1 - call $~lib/string/String~iterate + local.get $3 + call $~lib/collector/dummy/__ref_mark + local.get $3 + call $~lib/string/String~traverse end - local.get $2 + local.get $1 i32.const 4 i32.add - local.set $2 + local.set $1 end br $continue|0 end end end ) - (func $~lib/util/sort/insertionSort<~lib/string/String | null> (; 195 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort<~lib/string/String | null> (; 196 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8612,7 +8576,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String | null>#sort (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#sort (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8623,7 +8587,7 @@ if i32.const 0 i32.const 272 - i32.const 525 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -8686,11 +8650,11 @@ end local.get $0 ) - (func $~lib/array/Array<~lib/string/String | null>#get:length (; 197 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#get:length (; 198 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/string/String | null>#__unchecked_get (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#__unchecked_get (; 199 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -8699,7 +8663,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/string/String | null>#__get (; 199 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#__get (; 200 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -8709,7 +8673,7 @@ if i32.const 0 i32.const 272 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -8718,7 +8682,7 @@ local.get $1 call $~lib/array/Array<~lib/string/String | null>#__unchecked_get ) - (func $std/array/isSorted<~lib/string/String | null> (; 200 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/string/String | null> (; 201 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -8766,7 +8730,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/string/String | null> (; 201 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String | null> (; 202 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String | null>#sort @@ -8782,15 +8746,15 @@ unreachable end ) - (func $~lib/string/String#get:length (; 202 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 203 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub i32.load offset=4 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 203 ;) (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 (; 204 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -8843,7 +8807,7 @@ end local.get $5 ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 204 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 205 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8916,7 +8880,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 205 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 206 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $1of1 block $0of1 block $outOfRange @@ -8937,7 +8901,7 @@ local.get $1 call $std/array/assertSorted<~lib/string/String | null> ) - (func $~lib/string/String.__eq (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -8981,13 +8945,13 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.__ne (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__eq i32.eqz ) - (func $std/array/isArraysEqual<~lib/string/String | null> (; 208 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual<~lib/string/String | null> (; 209 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -9042,64 +9006,57 @@ end i32.const 1 ) - (func $~lib/array/Array<~lib/string/String>~iterate (; 209 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>~traverse (; 210 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - i32.const 1 - global.set $~lib/argc local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=4 - local.set $2 - local.get $2 + local.set $1 + local.get $1 local.get $0 i32.load offset=8 i32.add - local.set $3 + local.set $2 block $break|0 loop $continue|0 + local.get $1 local.get $2 - local.get $3 i32.lt_u if block - local.get $2 - i32.load - local.set $4 - i32.const 1 - global.set $~lib/argc - local.get $4 local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $4 + i32.load + local.set $3 + local.get $3 + call $~lib/collector/dummy/__ref_mark + local.get $3 + call $~lib/string/String~traverse local.get $1 - call $~lib/string/String~iterate - local.get $2 i32.const 4 i32.add - local.set $2 + local.set $1 end br $continue|0 end end end ) - (func $~lib/array/Array.create<~lib/string/String> (; 210 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create<~lib/string/String> (; 211 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH i32.const 2 i32.shr_u i32.gt_u if i32.const 0 i32.const 272 - i32.const 43 - i32.const 70 + i32.const 44 + i32.const 62 call $~lib/env/abort unreachable end @@ -9120,7 +9077,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/string/String#charAt (; 211 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#charAt (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 0 @@ -9129,7 +9086,7 @@ if i32.const 0 i32.const 4376 - i32.const 40 + i32.const 41 i32.const 4 call $~lib/env/abort unreachable @@ -9157,7 +9114,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String#concat (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 213 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9207,7 +9164,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String.__concat (; 213 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 4424 local.get $0 @@ -9217,7 +9174,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 214 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 215 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -9259,7 +9216,7 @@ end local.get $1 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 215 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 216 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -9292,7 +9249,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/array/Array<~lib/string/String>#__set (; 216 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/string/String>#__set (; 217 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -9303,7 +9260,7 @@ if i32.const 0 i32.const 272 - i32.const 110 + i32.const 111 i32.const 38 call $~lib/env/abort unreachable @@ -9329,7 +9286,7 @@ i32.store offset=12 end ) - (func $std/array/createRandomStringArray (; 217 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomStringArray (; 218 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -9363,7 +9320,7 @@ end local.get $1 ) - (func $~lib/util/sort/insertionSort<~lib/string/String> (; 218 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort<~lib/string/String> (; 219 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9459,7 +9416,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String>#sort (; 219 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#sort (; 220 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9470,7 +9427,7 @@ if i32.const 0 i32.const 272 - i32.const 525 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -9533,11 +9490,11 @@ end local.get $0 ) - (func $~lib/array/Array<~lib/string/String>#get:length (; 220 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#get:length (; 221 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -9546,7 +9503,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/string/String>#__get (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 223 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -9554,7 +9511,7 @@ if i32.const 0 i32.const 272 - i32.const 95 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -9568,7 +9525,7 @@ if i32.const 0 i32.const 272 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -9577,7 +9534,7 @@ local.get $1 call $~lib/array/Array<~lib/string/String>#__unchecked_get ) - (func $std/array/isSorted<~lib/string/String> (; 223 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/string/String> (; 224 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -9625,7 +9582,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/string/String> (; 224 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String> (; 225 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String>#sort @@ -9641,7 +9598,7 @@ unreachable end ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9714,7 +9671,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted<~lib/string/String>|trampoline (; 226 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String>|trampoline (; 227 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $1of1 block $0of1 block $outOfRange @@ -9735,15 +9692,12 @@ local.get $1 call $std/array/assertSorted<~lib/string/String> ) - (func $~lib/array/Array~iterate (; 227 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 228 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/string/String#substring (; 228 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 229 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9759,7 +9713,7 @@ if i32.const 0 i32.const 4376 - i32.const 190 + i32.const 191 i32.const 4 call $~lib/env/abort unreachable @@ -9861,7 +9815,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/runtime/runtime.discard (; 229 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 230 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -9870,24 +9824,24 @@ if i32.const 0 i32.const 80 - i32.const 132 + i32.const 89 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $1 local.get $1 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 80 - i32.const 134 + i32.const 91 i32.const 6 call $~lib/env/abort unreachable @@ -9895,7 +9849,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/array/Array#join_bool (; 230 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_bool (; 231 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10069,13 +10023,13 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 231 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 232 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_bool return ) - (func $~lib/util/number/decimalCount32 (; 232 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 233 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -10144,7 +10098,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa32_lut (; 233 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 234 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10287,7 +10241,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 234 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 235 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10343,12 +10297,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa (; 235 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 236 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 236 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 237 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10407,7 +10361,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 237 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10540,13 +10494,13 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 239 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/util/number/utoa32 (; 239 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 240 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10582,12 +10536,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa (; 240 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 241 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 241 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 242 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10626,7 +10580,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 242 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 243 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10759,28 +10713,25 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 243 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 244 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/builtins/isFinite (; 244 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 245 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/array/Array~iterate (; 245 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 246 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/array/Array#__unchecked_get (; 246 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__unchecked_get (; 247 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $0 i32.load offset=4 local.get $1 @@ -10789,15 +10740,12 @@ i32.add i64.load ) - (func $~lib/array/Array~iterate (; 247 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 248 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/array/Array#__unchecked_get (; 248 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 249 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -10806,7 +10754,7 @@ i32.add i32.load16_s ) - (func $~lib/util/number/genDigits (; 249 ;) (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 (; 250 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -11377,7 +11325,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 250 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 251 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11710,7 +11658,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 251 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 252 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -12148,7 +12096,7 @@ local.get $2 i32.add ) - (func $~lib/util/number/dtoa (; 252 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 253 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12195,7 +12143,7 @@ call $~lib/runtime/runtime.discard local.get $3 ) - (func $~lib/util/number/dtoa_stream (; 253 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 254 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12269,7 +12217,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join_flt (; 254 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_flt (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12402,13 +12350,13 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_flt return ) - (func $~lib/array/Array<~lib/string/String>#join_str (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join_str (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12592,16 +12540,16 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/string/String>#join (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String>#join_str return ) - (func $std/array/Ref~iterate (; 258 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $std/array/Ref~traverse (; 259 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $std/array/Ref#constructor (; 259 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/Ref#constructor (; 260 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -12613,56 +12561,49 @@ end local.get $0 ) - (func $~lib/array/Array~iterate (; 260 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array~traverse (; 261 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - i32.const 1 - global.set $~lib/argc local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=4 - local.set $2 - local.get $2 + local.set $1 + local.get $1 local.get $0 i32.load offset=8 i32.add - local.set $3 + local.set $2 block $break|0 loop $continue|0 + local.get $1 local.get $2 - local.get $3 i32.lt_u if block - local.get $2 + local.get $1 i32.load - local.set $4 - local.get $4 + local.set $3 + local.get $3 if - i32.const 1 - global.set $~lib/argc - local.get $4 - local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $4 - local.get $1 - call $std/array/Ref~iterate + local.get $3 + call $~lib/collector/dummy/__ref_mark + local.get $3 + call $std/array/Ref~traverse end - local.get $2 + local.get $1 i32.const 4 i32.add - local.set $2 + local.set $1 end br $continue|0 end end end ) - (func $~lib/array/Array#join_ref (; 261 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_ref (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12811,26 +12752,23 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 263 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_ref return ) - (func $~lib/array/Array#toString (; 263 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 264 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array~iterate (; 264 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 265 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/util/number/itoa (; 265 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 266 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -12839,7 +12777,7 @@ call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 266 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 267 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12914,7 +12852,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 267 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 268 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13047,33 +12985,30 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 268 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 269 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 269 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 270 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array~iterate (; 270 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 271 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/util/number/itoa (; 271 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 272 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 65535 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 272 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 273 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13118,7 +13053,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 273 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 274 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13251,18 +13186,18 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 274 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 275 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 275 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 276 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/decimalCount64 (; 276 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 277 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -13331,7 +13266,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 277 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 278 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -13459,7 +13394,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 278 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 279 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13527,12 +13462,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa (; 279 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 280 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/utoa64 return ) - (func $~lib/util/number/itoa_stream (; 280 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 281 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13598,7 +13533,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 281 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13731,26 +13666,23 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 283 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 283 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 284 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array~iterate (; 284 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 285 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/util/number/itoa64 (; 285 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 286 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13840,12 +13772,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa (; 286 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 287 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/itoa64 return ) - (func $~lib/util/number/itoa_stream (; 287 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 288 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13933,7 +13865,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 288 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 289 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14066,18 +13998,18 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 289 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 290 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 290 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 291 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array<~lib/string/String | null>#join_str (; 291 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#join_str (; 292 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14261,23 +14193,23 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/string/String | null>#join (; 292 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#join (; 293 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String | null>#join_str return ) - (func $~lib/array/Array<~lib/string/String | null>#toString (; 293 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#toString (; 294 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/string/String | null>#join ) - (func $~lib/array/Array<~lib/string/String>#toString (; 294 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#toString (; 295 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/string/String>#join ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 295 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 296 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14381,71 +14313,64 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array>#join (; 296 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join (; 297 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array>#toString (; 297 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#toString (; 298 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/array/Array>#join ) - (func $~lib/array/Array<~lib/array/Array>~iterate (; 298 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/array/Array>~traverse (; 299 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - i32.const 1 - global.set $~lib/argc local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=4 - local.set $2 - local.get $2 + local.set $1 + local.get $1 local.get $0 i32.load offset=8 i32.add - local.set $3 + local.set $2 block $break|0 loop $continue|0 + local.get $1 local.get $2 - local.get $3 i32.lt_u if block - local.get $2 - i32.load - local.set $4 - i32.const 1 - global.set $~lib/argc - local.get $4 local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $4 + i32.load + local.set $3 + local.get $3 + call $~lib/collector/dummy/__ref_mark + local.get $3 + call $~lib/array/Array~traverse local.get $1 - call $~lib/array/Array~iterate - local.get $2 i32.const 4 i32.add - local.set $2 + local.set $1 end br $continue|0 end end end ) - (func $~lib/util/number/itoa (; 299 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 300 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 300 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 301 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -14490,7 +14415,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 301 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 302 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14623,13 +14548,13 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 302 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 303 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 303 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 304 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14733,110 +14658,96 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array>#join (; 304 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join (; 305 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array>#toString (; 305 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#toString (; 306 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/array/Array>#join ) - (func $~lib/array/Array<~lib/array/Array>~iterate (; 306 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/array/Array>~traverse (; 307 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - i32.const 1 - global.set $~lib/argc local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=4 - local.set $2 - local.get $2 + local.set $1 + local.get $1 local.get $0 i32.load offset=8 i32.add - local.set $3 + local.set $2 block $break|0 loop $continue|0 + local.get $1 local.get $2 - local.get $3 i32.lt_u if block - local.get $2 - i32.load - local.set $4 - i32.const 1 - global.set $~lib/argc - local.get $4 local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $4 + i32.load + local.set $3 + local.get $3 + call $~lib/collector/dummy/__ref_mark + local.get $3 + call $~lib/array/Array~traverse local.get $1 - call $~lib/array/Array~iterate - local.get $2 i32.const 4 i32.add - local.set $2 + local.set $1 end br $continue|0 end end end ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate (; 307 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~traverse (; 308 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - i32.const 1 - global.set $~lib/argc local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=4 - local.set $2 - local.get $2 + local.set $1 + local.get $1 local.get $0 i32.load offset=8 i32.add - local.set $3 + local.set $2 block $break|0 loop $continue|0 + local.get $1 local.get $2 - local.get $3 i32.lt_u if block - local.get $2 - i32.load - local.set $4 - i32.const 1 - global.set $~lib/argc - local.get $4 local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $4 + i32.load + local.set $3 + local.get $3 + call $~lib/collector/dummy/__ref_mark + local.get $3 + call $~lib/array/Array<~lib/array/Array>~traverse local.get $1 - call $~lib/array/Array<~lib/array/Array>~iterate - local.get $2 i32.const 4 i32.add - local.set $2 + local.set $1 end br $continue|0 end end end ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 308 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 309 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14940,13 +14851,13 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array>#join (; 309 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join (; 310 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 310 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 311 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -15050,18 +14961,18 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join (; 311 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join (; 312 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#toString (; 312 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#toString (; 313 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join ) - (func $start:std/array (; 313 ;) (type $FUNCSIG$v) + (func $start:std/array (; 314 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -19684,7 +19595,7 @@ unreachable end ) - (func $std/array/main (; 314 ;) (type $FUNCSIG$v) + (func $std/array/main (; 315 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -19693,9 +19604,9 @@ global.set $~lib/started end ) - (func $start (; 315 ;) (type $FUNCSIG$v) + (func $start (; 316 ;) (type $FUNCSIG$v) call $start:std/array ) - (func $null (; 316 ;) (type $FUNCSIG$v) + (func $null (; 317 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 8f73250260..68b2419e06 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -21,6 +21,7 @@ (global $std/arraybuffer/buffer (mut i32) (i32.const 0)) (global $std/arraybuffer/sliced (mut i32) (i32.const 0)) (global $std/arraybuffer/arr8 (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -326,7 +327,7 @@ if i32.const 0 i32.const 64 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -341,7 +342,7 @@ if i32.const 0 i32.const 64 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -359,8 +360,8 @@ if i32.const 0 i32.const 16 - i32.const 53 - i32.const 51 + i32.const 54 + i32.const 43 call $~lib/env/abort unreachable end @@ -1494,8 +1495,8 @@ if i32.const 0 i32.const 16 - i32.const 11 - i32.const 65 + i32.const 12 + i32.const 57 call $~lib/env/abort unreachable end @@ -1563,17 +1564,12 @@ call $~lib/memory/memory.copy local.get $0 ) - (func $~lib/dataview/DataView#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/dataview/DataView#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - local.get $0 - i32.const 8 - i32.sub - i32.load offset=4 - local.tee $2 + local.get $1 i32.const 1073741816 i32.gt_u - local.get $2 + local.get $1 local.get $0 i32.const 8 i32.sub @@ -1583,7 +1579,7 @@ if i32.const 0 i32.const 168 - i32.const 22 + i32.const 21 i32.const 6 call $~lib/env/abort unreachable @@ -1592,27 +1588,49 @@ call $~lib/runtime/runtime.allocate i32.const 7 call $~lib/runtime/runtime.register - local.tee $1 + local.tee $2 i32.const 0 i32.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=4 - local.get $1 + local.get $2 i32.const 0 i32.store offset=8 - local.get $1 + local.get $2 local.get $0 i32.store - local.get $1 + local.get $2 local.get $0 i32.store offset=4 - local.get $1 local.get $2 + local.get $1 i32.store offset=8 + local.get $2 + ) + (func $~lib/dataview/DataView#constructor|trampoline (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + block $2of2 + block $1of2 + block $outOfRange + global.get $~lib/argc + i32.const 1 + i32.sub + br_table $1of2 $1of2 $2of2 $outOfRange + end + unreachable + end + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 + local.set $1 + end + local.get $0 local.get $1 + call $~lib/dataview/DataView#constructor ) - (func $start:std/arraybuffer (; 12 ;) (type $FUNCSIG$v) + (func $start:std/arraybuffer (; 13 ;) (type $FUNCSIG$v) i32.const 200 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset @@ -1850,11 +1868,13 @@ call $~lib/env/abort unreachable end + i32.const 1 + global.set $~lib/argc block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>14 (result i32) i32.const 1 global.get $std/arraybuffer/arr8 i32.load - call $~lib/dataview/DataView#constructor + call $~lib/dataview/DataView#constructor|trampoline br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>14 drop i32.const 0 @@ -1869,10 +1889,10 @@ unreachable end ) - (func $start (; 13 ;) (type $FUNCSIG$v) + (func $start (; 14 ;) (type $FUNCSIG$v) call $start:std/arraybuffer ) - (func $null (; 14 ;) (type $FUNCSIG$v) + (func $null (; 15 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index ce20ab8fe0..3b3718db9d 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -15,16 +15,16 @@ (data (i32.const 160) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/arraybuffer/buffer (mut i32) (i32.const 0)) (global $std/arraybuffer/sliced (mut i32) (i32.const 0)) (global $std/arraybuffer/arr8 (mut i32) (i32.const 0)) - (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 200)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -33,7 +33,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -132,13 +132,13 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 i32.store offset=4 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -407,24 +407,24 @@ if i32.const 0 i32.const 64 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 64 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -437,13 +437,13 @@ (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 i32.const 16 - i32.const 53 - i32.const 51 + i32.const 54 + i32.const 43 call $~lib/env/abort unreachable end @@ -460,7 +460,7 @@ ) (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) @@ -2020,15 +2020,15 @@ (func $~lib/arraybuffer/ArrayBufferView#constructor (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH local.get $2 i32.shr_u i32.gt_u if i32.const 0 i32.const 16 - i32.const 11 - i32.const 65 + i32.const 12 + i32.const 57 call $~lib/env/abort unreachable end @@ -2146,17 +2146,7 @@ (func $~lib/dataview/DataView#constructor (; 21 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) local.get $3 - global.get $~lib/builtins/i32.MIN_VALUE - i32.eq - if - local.get $1 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.get $2 - i32.sub - local.set $3 - end - local.get $3 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH i32.gt_u local.get $2 local.get $3 @@ -2168,7 +2158,7 @@ if i32.const 0 i32.const 168 - i32.const 22 + i32.const 21 i32.const 6 call $~lib/env/abort unreachable @@ -2212,7 +2202,32 @@ local.get $0 i32.load ) - (func $start:std/arraybuffer (; 23 ;) (type $FUNCSIG$v) + (func $~lib/dataview/DataView#constructor|trampoline (; 23 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~lib/argc + i32.const 1 + i32.sub + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $2 + end + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/dataview/DataView#constructor + ) + (func $start:std/arraybuffer (; 24 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -2242,7 +2257,7 @@ end global.get $std/arraybuffer/buffer i32.const 0 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced @@ -2272,7 +2287,7 @@ end global.get $std/arraybuffer/buffer i32.const 1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced @@ -2290,7 +2305,7 @@ end global.get $std/arraybuffer/buffer i32.const -1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced @@ -2380,7 +2395,7 @@ end global.get $std/arraybuffer/buffer i32.const 42 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced @@ -2512,12 +2527,16 @@ call $~lib/env/abort unreachable end - i32.const 0 - global.get $std/arraybuffer/arr8 - call $~lib/typedarray/Uint8Array#get:buffer - i32.const 0 - global.get $~lib/builtins/i32.MIN_VALUE - call $~lib/dataview/DataView#constructor + block (result i32) + i32.const 1 + global.set $~lib/argc + i32.const 0 + global.get $std/arraybuffer/arr8 + call $~lib/typedarray/Uint8Array#get:buffer + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#constructor|trampoline + end call $~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView> i32.eqz if @@ -2529,9 +2548,9 @@ unreachable end ) - (func $start (; 24 ;) (type $FUNCSIG$v) + (func $start (; 25 ;) (type $FUNCSIG$v) call $start:std/arraybuffer ) - (func $null (; 25 ;) (type $FUNCSIG$v) + (func $null (; 26 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 38524913af..861704432c 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -26,6 +26,7 @@ (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/dataview/array (mut i32) (i32.const 0)) (global $std/dataview/view (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -164,7 +165,7 @@ if i32.const 0 i32.const 64 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -179,7 +180,7 @@ if i32.const 0 i32.const 64 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -250,36 +251,22 @@ ) (func $~lib/dataview/DataView#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - block (result i32) - local.get $2 - i32.const -2147483648 - i32.eq - if - local.get $0 - i32.const 8 - i32.sub - i32.load offset=4 - local.get $1 - i32.sub - local.set $2 - end - local.get $2 - i32.const 1073741816 - i32.gt_u - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.const 8 - i32.sub - i32.load offset=4 - i32.gt_u - i32.or - end + local.get $2 + i32.const 1073741816 + i32.gt_u + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 + i32.gt_u + i32.or if i32.const 0 i32.const 152 - i32.const 22 + i32.const 21 i32.const 6 call $~lib/env/abort unreachable @@ -324,7 +311,7 @@ if i32.const 0 i32.const 152 - i32.const 45 + i32.const 44 i32.const 6 call $~lib/env/abort unreachable @@ -390,7 +377,7 @@ if i32.const 0 i32.const 152 - i32.const 59 + i32.const 58 i32.const 7 call $~lib/env/abort unreachable @@ -416,7 +403,7 @@ if i32.const 0 i32.const 152 - i32.const 70 + i32.const 69 i32.const 49 call $~lib/env/abort unreachable @@ -441,7 +428,7 @@ if i32.const 0 i32.const 152 - i32.const 78 + i32.const 77 i32.const 7 call $~lib/env/abort unreachable @@ -483,7 +470,7 @@ if i32.const 0 i32.const 152 - i32.const 87 + i32.const 86 i32.const 7 call $~lib/env/abort unreachable @@ -520,7 +507,7 @@ if i32.const 0 i32.const 152 - i32.const 181 + i32.const 180 i32.const 6 call $~lib/env/abort unreachable @@ -545,7 +532,7 @@ if i32.const 0 i32.const 152 - i32.const 93 + i32.const 92 i32.const 49 call $~lib/env/abort unreachable @@ -570,7 +557,7 @@ if i32.const 0 i32.const 152 - i32.const 101 + i32.const 100 i32.const 6 call $~lib/env/abort unreachable @@ -610,7 +597,7 @@ if i32.const 0 i32.const 152 - i32.const 110 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable @@ -647,7 +634,7 @@ if i32.const 0 i32.const 152 - i32.const 190 + i32.const 189 i32.const 6 call $~lib/env/abort unreachable @@ -672,7 +659,7 @@ if i32.const 0 i32.const 152 - i32.const 119 + i32.const 118 i32.const 6 call $~lib/env/abort unreachable @@ -710,7 +697,7 @@ if i32.const 0 i32.const 152 - i32.const 128 + i32.const 127 i32.const 6 call $~lib/env/abort unreachable @@ -738,7 +725,7 @@ if i32.const 0 i32.const 152 - i32.const 134 + i32.const 133 i32.const 49 call $~lib/env/abort unreachable @@ -756,7 +743,7 @@ if i32.const 0 i32.const 152 - i32.const 142 + i32.const 141 i32.const 6 call $~lib/env/abort unreachable @@ -792,7 +779,7 @@ if i32.const 0 i32.const 152 - i32.const 150 + i32.const 149 i32.const 6 call $~lib/env/abort unreachable @@ -828,7 +815,7 @@ if i32.const 0 i32.const 152 - i32.const 199 + i32.const 198 i32.const 6 call $~lib/env/abort unreachable @@ -852,7 +839,7 @@ if i32.const 0 i32.const 152 - i32.const 155 + i32.const 154 i32.const 49 call $~lib/env/abort unreachable @@ -870,7 +857,7 @@ if i32.const 0 i32.const 152 - i32.const 163 + i32.const 162 i32.const 6 call $~lib/env/abort unreachable @@ -904,7 +891,7 @@ if i32.const 0 i32.const 152 - i32.const 171 + i32.const 170 i32.const 6 call $~lib/env/abort unreachable @@ -940,7 +927,7 @@ if i32.const 0 i32.const 152 - i32.const 207 + i32.const 206 i32.const 6 call $~lib/env/abort unreachable @@ -956,7 +943,30 @@ end i64.store ) - (func $start:std/dataview (; 29 ;) (type $FUNCSIG$v) + (func $~lib/dataview/DataView#constructor|trampoline (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + block $2of2 + block $1of2 + block $outOfRange + global.get $~lib/argc + i32.const 1 + i32.sub + br_table $1of2 $1of2 $2of2 $outOfRange + end + unreachable + end + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 + local.set $1 + end + local.get $0 + i32.const 0 + local.get $1 + call $~lib/dataview/DataView#constructor + ) + (func $start:std/dataview (; 30 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 224 global.set $~lib/allocator/arena/startOffset @@ -2486,11 +2496,43 @@ call $~lib/env/abort unreachable end + i32.const 1 + global.set $~lib/argc + global.get $std/dataview/array + i32.load + call $~lib/dataview/DataView#constructor|trampoline + global.set $std/dataview/view + global.get $std/dataview/view + local.tee $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + if + i32.const 0 + i32.const 192 + i32.const 164 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/dataview/view + i32.load offset=8 + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 192 + i32.const 165 + i32.const 0 + call $~lib/env/abort + unreachable + end ) - (func $start (; 30 ;) (type $FUNCSIG$v) + (func $start (; 31 ;) (type $FUNCSIG$v) call $start:std/dataview ) - (func $null (; 31 ;) (type $FUNCSIG$v) + (func $null (; 32 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/dataview.ts b/tests/compiler/std/dataview.ts index 6ff42538b4..95eb576739 100644 --- a/tests/compiler/std/dataview.ts +++ b/tests/compiler/std/dataview.ts @@ -159,3 +159,7 @@ assert(view.getUint64(0, true) === 2334704782995986958); view.setUint64(0, 11323557176419695287, false); assert(view.getUint64(0, false) === 11323557176419695287); + +view = new DataView(array.buffer); +assert(view.byteOffset == 0); +assert(view.byteLength == 8); diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 713c9b2eef..6fc5c83070 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -22,15 +22,15 @@ (data (i32.const 184) "\01\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/dataview/array (mut i32) (i32.const 0)) - (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) (global $std/dataview/view (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 224)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -39,7 +39,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -138,13 +138,13 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 i32.store offset=4 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -413,24 +413,24 @@ if i32.const 0 i32.const 64 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 64 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -443,13 +443,13 @@ (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 i32.const 16 - i32.const 53 - i32.const 51 + i32.const 54 + i32.const 43 call $~lib/env/abort unreachable end @@ -467,15 +467,15 @@ (func $~lib/arraybuffer/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH local.get $2 i32.shr_u i32.gt_u if i32.const 0 i32.const 16 - i32.const 11 - i32.const 65 + i32.const 12 + i32.const 57 call $~lib/env/abort unreachable end @@ -555,24 +555,14 @@ ) (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) (func $~lib/dataview/DataView#constructor (; 12 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) local.get $3 - global.get $~lib/builtins/i32.MIN_VALUE - i32.eq - if - local.get $1 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.get $2 - i32.sub - local.set $3 - end - local.get $3 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH i32.gt_u local.get $2 local.get $3 @@ -584,7 +574,7 @@ if i32.const 0 i32.const 152 - i32.const 22 + i32.const 21 i32.const 6 call $~lib/env/abort unreachable @@ -667,7 +657,7 @@ if i32.const 0 i32.const 152 - i32.const 45 + i32.const 44 i32.const 6 call $~lib/env/abort unreachable @@ -744,7 +734,7 @@ if i32.const 0 i32.const 152 - i32.const 59 + i32.const 58 i32.const 7 call $~lib/env/abort unreachable @@ -776,7 +766,7 @@ if i32.const 0 i32.const 152 - i32.const 70 + i32.const 69 i32.const 49 call $~lib/env/abort unreachable @@ -818,7 +808,7 @@ if i32.const 0 i32.const 152 - i32.const 78 + i32.const 77 i32.const 7 call $~lib/env/abort unreachable @@ -868,7 +858,7 @@ if i32.const 0 i32.const 152 - i32.const 87 + i32.const 86 i32.const 7 call $~lib/env/abort unreachable @@ -943,7 +933,7 @@ if i32.const 0 i32.const 152 - i32.const 181 + i32.const 180 i32.const 6 call $~lib/env/abort unreachable @@ -972,7 +962,7 @@ if i32.const 0 i32.const 152 - i32.const 93 + i32.const 92 i32.const 49 call $~lib/env/abort unreachable @@ -1012,7 +1002,7 @@ if i32.const 0 i32.const 152 - i32.const 101 + i32.const 100 i32.const 6 call $~lib/env/abort unreachable @@ -1048,7 +1038,7 @@ if i32.const 0 i32.const 152 - i32.const 110 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable @@ -1084,7 +1074,7 @@ if i32.const 0 i32.const 152 - i32.const 190 + i32.const 189 i32.const 6 call $~lib/env/abort unreachable @@ -1119,7 +1109,7 @@ if i32.const 0 i32.const 152 - i32.const 119 + i32.const 118 i32.const 6 call $~lib/env/abort unreachable @@ -1159,7 +1149,7 @@ if i32.const 0 i32.const 152 - i32.const 128 + i32.const 127 i32.const 6 call $~lib/env/abort unreachable @@ -1193,7 +1183,7 @@ if i32.const 0 i32.const 152 - i32.const 134 + i32.const 133 i32.const 49 call $~lib/env/abort unreachable @@ -1219,7 +1209,7 @@ if i32.const 0 i32.const 152 - i32.const 142 + i32.const 141 i32.const 6 call $~lib/env/abort unreachable @@ -1253,7 +1243,7 @@ if i32.const 0 i32.const 152 - i32.const 150 + i32.const 149 i32.const 6 call $~lib/env/abort unreachable @@ -1287,7 +1277,7 @@ if i32.const 0 i32.const 152 - i32.const 199 + i32.const 198 i32.const 6 call $~lib/env/abort unreachable @@ -1315,7 +1305,7 @@ if i32.const 0 i32.const 152 - i32.const 155 + i32.const 154 i32.const 49 call $~lib/env/abort unreachable @@ -1341,7 +1331,7 @@ if i32.const 0 i32.const 152 - i32.const 163 + i32.const 162 i32.const 6 call $~lib/env/abort unreachable @@ -1375,7 +1365,7 @@ if i32.const 0 i32.const 152 - i32.const 171 + i32.const 170 i32.const 6 call $~lib/env/abort unreachable @@ -1409,7 +1399,7 @@ if i32.const 0 i32.const 152 - i32.const 207 + i32.const 206 i32.const 6 call $~lib/env/abort unreachable @@ -1429,7 +1419,43 @@ end i64.store ) - (func $start:std/dataview (; 42 ;) (type $FUNCSIG$v) + (func $~lib/dataview/DataView#constructor|trampoline (; 42 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~lib/argc + i32.const 1 + i32.sub + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $2 + end + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/dataview/DataView#constructor + ) + (func $~lib/dataview/DataView#get:byteOffset (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + ) + (func $~lib/dataview/DataView#get:byteLength (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + ) + (func $start:std/dataview (; 45 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -3121,10 +3147,47 @@ call $~lib/env/abort unreachable end + block (result i32) + i32.const 1 + global.set $~lib/argc + i32.const 0 + global.get $std/dataview/array + call $~lib/typedarray/Uint8Array#get:buffer + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#constructor|trampoline + end + global.set $std/dataview/view + global.get $std/dataview/view + call $~lib/dataview/DataView#get:byteOffset + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 192 + i32.const 164 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/dataview/view + call $~lib/dataview/DataView#get:byteLength + i32.const 8 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 192 + i32.const 165 + i32.const 0 + call $~lib/env/abort + unreachable + end ) - (func $start (; 43 ;) (type $FUNCSIG$v) + (func $start (; 46 ;) (type $FUNCSIG$v) call $start:std/dataview ) - (func $null (; 44 ;) (type $FUNCSIG$v) + (func $null (; 47 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index fea96f3c78..120ffe2ddc 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -89,7 +89,7 @@ if i32.const 0 i32.const 48 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -104,7 +104,7 @@ if i32.const 0 i32.const 48 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 790f2afa59..48cd0512b7 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -17,10 +17,10 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/date/creationTime (mut i64) (i64.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/date/date (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 80)) @@ -31,7 +31,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -130,13 +130,13 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 i32.store offset=4 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -148,24 +148,24 @@ if i32.const 0 i32.const 48 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 48 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index 554280c0be..33697e2ff4 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -9,14 +9,14 @@ (data (i32.const 48) "\01\00\00\00\06\00\00\00a\00b\00c\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) (func $~lib/string/String#get:length (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub i32.load offset=4 i32.const 1 diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 7b4ed5a5e4..88dff2ae8a 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1,11 +1,11 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) @@ -30,10 +30,9 @@ (data (i32.const 112) "\03\00\00\00\14") (data (i32.const 128) "s\00t\00d\00/\00m\00a\00p\00.\00t\00s") (table $0 23 funcref) - (elem (i32.const 0) $null $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/string/String~iterate $~lib/string/String~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate) + (elem (i32.const 0) $null $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/string/String~traverse $~lib/string/String~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -128,23 +127,15 @@ i32.const 16 i32.add ) - (func $~lib/map/Map~iterate (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/map/Map~traverse (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + drop local.get $0 i32.load offset=8 - local.set $0 - i32.const 1 - global.set $~lib/argc - local.get $0 - local.get $1 - call_indirect (type $FUNCSIG$vi) + drop ) - (func $~lib/string/String~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/string/String~traverse (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -155,7 +146,7 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -170,7 +161,7 @@ if i32.const 0 i32.const 24 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -399,8 +390,8 @@ if i32.const 0 i32.const 72 - i32.const 53 - i32.const 51 + i32.const 54 + i32.const 43 call $~lib/env/abort unreachable end diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 13a554ca14..5576d309f8 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -1,11 +1,11 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) @@ -23,14 +23,13 @@ (data (i32.const 56) "\03\00\00\00&\00\00\00\00\00\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 112) "\03\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") (table $0 23 funcref) - (elem (i32.const 0) $null $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/string/String~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (elem (i32.const 0) $null $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/string/String~traverse $~lib/arraybuffer/ArrayBuffer~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) - (global $~lib/argc (mut i32) (i32.const 0)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/memory/HEAP_BASE i32 (i32.const 148)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) @@ -41,7 +40,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -140,7 +139,7 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 @@ -152,33 +151,30 @@ i32.const 0 i32.store offset=12 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/map/Map~iterate (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/collector/dummy/__ref_mark (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/map/Map~traverse (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/string/String~iterate (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/string/String~traverse (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $~lib/collector/dummy/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/runtime.register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -187,24 +183,24 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -216,7 +212,7 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/memory/memory.fill (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -473,19 +469,19 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer~iterate (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/arraybuffer/ArrayBuffer~traverse (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 i32.const 72 - i32.const 53 - i32.const 51 + i32.const 54 + i32.const 43 call $~lib/env/abort unreachable end @@ -500,13 +496,13 @@ i32.const 4 call $~lib/runtime/runtime.register ) - (func $~lib/collector/dummy/__ref_link (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/map/Map#clear (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -575,7 +571,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -609,14 +605,14 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash8 (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const -2128831035 local.get $0 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -671,7 +667,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -690,7 +686,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -864,7 +860,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -972,7 +968,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -998,11 +994,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1079,7 +1075,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 24 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 25 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1463,24 +1459,18 @@ unreachable end ) - (func $~lib/map/Map~iterate (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/map/Map~traverse (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/map/Map#clear (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1549,7 +1539,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -1583,7 +1573,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1636,7 +1626,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1653,7 +1643,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1827,7 +1817,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 32 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1933,7 +1923,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -1957,11 +1947,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2036,7 +2026,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 35 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 36 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2406,24 +2396,18 @@ unreachable end ) - (func $~lib/map/Map~iterate (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/map/Map~traverse (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/map/Map#clear (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2492,7 +2476,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -2526,7 +2510,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -2548,7 +2532,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2603,7 +2587,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2622,7 +2606,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 42 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 43 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2796,7 +2780,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 43 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 44 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2904,7 +2888,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2930,11 +2914,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3011,7 +2995,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 47 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 48 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3395,24 +3379,18 @@ unreachable end ) - (func $~lib/map/Map~iterate (; 48 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/map/Map~traverse (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/map/Map#clear (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3481,7 +3459,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -3515,7 +3493,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3568,7 +3546,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -3585,7 +3563,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3759,7 +3737,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3865,7 +3843,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3889,11 +3867,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3968,7 +3946,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 58 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 59 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4338,24 +4316,18 @@ unreachable end ) - (func $~lib/map/Map~iterate (; 59 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/map/Map~traverse (; 60 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/map/Map#clear (; 60 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 61 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4424,7 +4396,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -4458,7 +4430,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 63 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -4500,7 +4472,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4551,7 +4523,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -4566,7 +4538,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 65 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 66 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4740,7 +4712,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 66 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 67 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4844,7 +4816,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 68 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4866,11 +4838,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 68 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 69 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4943,7 +4915,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 70 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 71 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5299,24 +5271,18 @@ unreachable end ) - (func $~lib/map/Map~iterate (; 71 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/map/Map~traverse (; 72 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/map/Map#clear (; 72 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 73 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5385,7 +5351,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 74 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -5419,7 +5385,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5470,7 +5436,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 75 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -5485,7 +5451,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 76 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 77 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5659,7 +5625,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5763,7 +5729,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 78 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 79 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5785,11 +5751,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 80 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 81 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5862,7 +5828,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 81 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 82 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6218,24 +6184,18 @@ unreachable end ) - (func $~lib/map/Map~iterate (; 82 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/map/Map~traverse (; 83 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/map/Map#clear (; 83 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 84 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6304,7 +6264,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 84 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 85 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -6338,7 +6298,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 85 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 86 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6426,7 +6386,7 @@ local.set $3 local.get $3 ) - (func $~lib/map/Map#find (; 86 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 87 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6477,7 +6437,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 87 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 88 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -6492,7 +6452,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 88 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 89 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6667,7 +6627,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 89 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 90 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) @@ -6772,7 +6732,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 90 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 91 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) local.get $0 @@ -6794,11 +6754,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 91 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 92 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 93 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6872,7 +6832,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 93 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 94 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -7235,24 +7195,18 @@ unreachable end ) - (func $~lib/map/Map~iterate (; 94 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/map/Map~traverse (; 95 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/map/Map#clear (; 95 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 96 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7321,7 +7275,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 96 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 97 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -7355,7 +7309,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 97 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 98 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7406,7 +7360,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 98 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 99 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -7421,7 +7375,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 99 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 100 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7596,7 +7550,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 100 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 101 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) @@ -7701,7 +7655,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 101 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 102 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) local.get $0 @@ -7723,11 +7677,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 103 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 103 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 104 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -7801,7 +7755,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 104 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 105 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -8164,24 +8118,18 @@ unreachable end ) - (func $~lib/map/Map~iterate (; 105 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/map/Map~traverse (; 106 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/map/Map#clear (; 106 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 107 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8250,7 +8198,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 107 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 108 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -8284,7 +8232,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 108 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 109 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -8335,7 +8283,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 109 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 110 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) local.get $0 local.get $1 @@ -8351,7 +8299,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 110 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 111 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8527,7 +8475,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 111 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/map/Map#set (; 112 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) (local $3 f32) (local $4 i32) (local $5 i32) @@ -8633,7 +8581,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 112 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 113 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) local.get $0 @@ -8656,11 +8604,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 113 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 114 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 114 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#delete (; 115 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -8735,7 +8683,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 115 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 116 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -9098,24 +9046,18 @@ unreachable end ) - (func $~lib/map/Map~iterate (; 116 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/map/Map~traverse (; 117 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/map/Map#clear (; 117 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 118 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9184,7 +9126,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 118 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 119 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -9218,7 +9160,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 119 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 120 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -9269,7 +9211,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 120 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 121 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) local.get $0 local.get $1 @@ -9285,7 +9227,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 121 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 122 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9461,7 +9403,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 122 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/map/Map#set (; 123 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) (local $3 f64) (local $4 i32) (local $5 i32) @@ -9567,7 +9509,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 123 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 124 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) local.get $0 @@ -9590,11 +9532,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 124 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 125 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 125 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#delete (; 126 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -9669,7 +9611,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 126 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 127 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -10032,7 +9974,7 @@ unreachable end ) - (func $start:std/map (; 127 ;) (type $FUNCSIG$v) + (func $start:std/map (; 128 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -10054,9 +9996,9 @@ call $std/map/testNumeric call $std/map/testNumeric ) - (func $start (; 128 ;) (type $FUNCSIG$v) + (func $start (; 129 ;) (type $FUNCSIG$v) call $start:std/map ) - (func $null (; 129 ;) (type $FUNCSIG$v) + (func $null (; 130 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 1b0be8f177..e04f158dcc 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -84,7 +84,7 @@ if i32.const 0 i32.const 16 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -99,7 +99,7 @@ if i32.const 0 i32.const 16 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 7ed905669c..9b9714d589 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -10,10 +10,10 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/new/AClass.aStaticField (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/new/aClass (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) @@ -24,7 +24,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -123,13 +123,13 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 i32.store offset=4 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -141,24 +141,24 @@ if i32.const 0 i32.const 16 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 16 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index e4e009dada..59e251fce4 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -1,6 +1,5 @@ (module (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 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))) @@ -14,7 +13,7 @@ (data (i32.const 96) "\01\00\00\00*") (data (i32.const 112) "s\00t\00d\00/\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") (table $0 4 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $std/object-literal/Foo~iterate $~lib/string/String~iterate) + (elem (i32.const 0) $null $~lib/string/String~traverse $std/object-literal/Foo~traverse $~lib/string/String~traverse) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) @@ -22,7 +21,7 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/string/String~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/string/String~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -114,15 +113,10 @@ i32.const 16 i32.add ) - (func $std/object-literal/Foo~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/object-literal/Foo~traverse (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load offset=4 - local.tee $0 - if - local.get $0 - local.get $1 - call_indirect (type $FUNCSIG$vi) - end + drop ) (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -132,7 +126,7 @@ if i32.const 0 i32.const 64 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -147,7 +141,7 @@ if i32.const 0 i32.const 64 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/object-literal.untouched.wat b/tests/compiler/std/object-literal.untouched.wat index ee2ec8a229..33aa46c66e 100644 --- a/tests/compiler/std/object-literal.untouched.wat +++ b/tests/compiler/std/object-literal.untouched.wat @@ -1,6 +1,5 @@ (module (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 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))) @@ -12,11 +11,11 @@ (data (i32.const 48) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 96) "\01\00\00\00*\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") (table $0 4 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $std/object-literal/Foo~iterate $std/object-literal/Foo2~iterate) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (elem (i32.const 0) $null $~lib/string/String~traverse $std/object-literal/Foo~traverse $std/object-literal/Foo2~traverse) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 156)) (global $~lib/capabilities i32 (i32.const 2)) @@ -24,14 +23,14 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/string/String~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/string/String~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -130,7 +129,7 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 @@ -142,27 +141,28 @@ i32.const 0 i32.store offset=12 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $std/object-literal/Foo~iterate (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/collector/dummy/__ref_mark (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $std/object-literal/Foo~traverse (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load offset=4 - local.tee $2 + local.tee $1 if - local.get $2 local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $2 + call $~lib/collector/dummy/__ref_mark local.get $1 - call $~lib/string/String~iterate + call $~lib/string/String~traverse end ) - (func $~lib/collector/dummy/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/runtime.register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -171,24 +171,24 @@ if i32.const 0 i32.const 64 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 64 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -200,15 +200,15 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/string/String#get:length (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub i32.load offset=4 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 10 ;) (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 (; 11 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -261,7 +261,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -305,7 +305,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/object-literal/bar (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/object-literal/bar (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 1 @@ -333,10 +333,10 @@ unreachable end ) - (func $std/object-literal/Foo2~iterate (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $std/object-literal/Foo2~traverse (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $std/object-literal/bar2 (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/object-literal/bar2 (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 2 @@ -351,7 +351,7 @@ unreachable end ) - (func $std/object-literal/Foo2#test (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/object-literal/Foo2#test (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 3 @@ -366,7 +366,7 @@ unreachable end ) - (func $start:std/object-literal (; 16 ;) (type $FUNCSIG$v) + (func $start:std/object-literal (; 17 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -420,9 +420,9 @@ end call $std/object-literal/Foo2#test ) - (func $start (; 17 ;) (type $FUNCSIG$v) + (func $start (; 18 ;) (type $FUNCSIG$v) call $start:std/object-literal ) - (func $null (; 18 ;) (type $FUNCSIG$v) + (func $null (; 19 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index d4406de5e5..f8110834ec 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -167,7 +167,7 @@ if i32.const 0 i32.const 16 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -182,7 +182,7 @@ if i32.const 0 i32.const 16 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 3ef068ef59..4bd6db475e 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -12,10 +12,10 @@ (data (i32.const 48) "\02\00\00\006\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/operator-overloading/a1 (mut i32) (i32.const 0)) (global $std/operator-overloading/a2 (mut i32) (i32.const 0)) @@ -92,7 +92,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -191,13 +191,13 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 i32.store offset=4 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -209,24 +209,24 @@ if i32.const 0 i32.const 16 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 16 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 0fcb6ca00d..5ee1173bed 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -24,7 +24,7 @@ (data (i32.const 216) "\03\00\00\00\1e") (data (i32.const 232) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 4 funcref) - (elem (i32.const 0) $null $std/runtime/A~iterate $std/runtime/A~iterate $std/runtime/A~iterate) + (elem (i32.const 0) $null $std/runtime/A~traverse $std/runtime/A~traverse $std/runtime/A~traverse) (global $std/runtime/register_ref (mut i32) (i32.const 0)) (global $std/runtime/barrier1 (mut i32) (i32.const 0)) (global $std/runtime/barrier2 (mut i32) (i32.const 0)) @@ -44,7 +44,7 @@ (export "table" (table $0)) (export "main" (func $std/runtime/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $std/runtime/A~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/runtime/A~traverse (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -2563,7 +2563,7 @@ if i32.const 0 i32.const 232 - i32.const 107 + i32.const 64 i32.const 10 call $~lib/env/abort unreachable @@ -2600,7 +2600,7 @@ if i32.const 0 i32.const 232 - i32.const 132 + i32.const 89 i32.const 6 call $~lib/env/abort unreachable @@ -2615,7 +2615,7 @@ if i32.const 0 i32.const 232 - i32.const 134 + i32.const 91 i32.const 6 call $~lib/env/abort unreachable @@ -2631,7 +2631,7 @@ if i32.const 0 i32.const 232 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -2646,7 +2646,7 @@ if i32.const 0 i32.const 232 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -2697,7 +2697,7 @@ else i32.const 0 i32.const 24 - i32.const 37 + i32.const 41 i32.const 2 call $~lib/env/abort unreachable @@ -2808,7 +2808,7 @@ if i32.const 0 i32.const 24 - i32.const 52 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -2820,7 +2820,7 @@ if i32.const 0 i32.const 24 - i32.const 53 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -2834,7 +2834,7 @@ if i32.const 0 i32.const 24 - i32.const 54 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -2846,7 +2846,7 @@ if i32.const 0 i32.const 24 - i32.const 55 + i32.const 59 i32.const 0 call $~lib/env/abort unreachable @@ -2861,7 +2861,7 @@ if i32.const 0 i32.const 24 - i32.const 57 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -2877,7 +2877,7 @@ if i32.const 0 i32.const 24 - i32.const 59 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -2893,7 +2893,7 @@ if i32.const 0 i32.const 24 - i32.const 62 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable @@ -2909,7 +2909,7 @@ if i32.const 0 i32.const 24 - i32.const 66 + i32.const 70 i32.const 0 call $~lib/env/abort unreachable @@ -2925,7 +2925,7 @@ if i32.const 0 i32.const 24 - i32.const 68 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable @@ -2937,7 +2937,7 @@ if i32.const 0 i32.const 24 - i32.const 69 + i32.const 73 i32.const 0 call $~lib/env/abort unreachable @@ -2954,7 +2954,7 @@ if i32.const 0 i32.const 24 - i32.const 72 + i32.const 76 i32.const 0 call $~lib/env/abort unreachable @@ -2970,7 +2970,7 @@ if i32.const 0 i32.const 24 - i32.const 73 + i32.const 77 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.ts b/tests/compiler/std/runtime.ts index 48bfdffc06..5db24ad306 100644 --- a/tests/compiler/std/runtime.ts +++ b/tests/compiler/std/runtime.ts @@ -1,6 +1,7 @@ import "allocator/tlsf"; // import { classId, ADJUSTOBLOCK, ALLOCATE, REALLOCATE, REGISTER, DISCARD, HEADER, HEADER_SIZE, HEADER_MAGIC } from "runtime"; -import { runtime, HEADER, HEADER_SIZE, HEADER_MAGIC, classId } from "runtime"; +import { HEADER, HEADER_SIZE, HEADER_MAGIC } from "util/runtime"; +import { runtime, __runtime_id } from "runtime"; @start export function main(): void {} @@ -24,9 +25,12 @@ var link_parentRef: usize = 0; @global function __ref_collect(): void { } +@global function __ref_mark(ref: usize): void { +} + class A {} class B {} -assert(classId() != classId()); +assert(__runtime_id() != __runtime_id()); function isPowerOf2(x: i32): bool { return x != 0 && (x & (x - 1)) == 0; @@ -62,10 +66,10 @@ var ref3 = runtime.allocate(barrier2); assert(ref1 == ref3); // reuses space of ref1 (free'd in realloc), ref2 (explicitly free'd) var ref4 = runtime.allocate(barrier1); -runtime.register(ref4, classId()); // should call __gc_register +runtime.register(ref4, __runtime_id()); // should call __gc_register assert(register_ref == ref4); var header4 = changetype
(register_ref - HEADER_SIZE); -assert(header4.classId == classId()); +assert(header4.classId == __runtime_id()); assert(header4.payloadSize == barrier1); var ref5 = runtime.allocate(10); diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index abc4c22b2e..e44b701d26 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -18,11 +18,11 @@ (data (i32.const 152) "\03\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") (data (i32.const 216) "\03\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 4 funcref) - (elem (i32.const 0) $null $std/runtime/A~iterate $std/runtime/B~iterate $~lib/string/String~iterate) + (elem (i32.const 0) $null $std/runtime/A~traverse $std/runtime/B~traverse $~lib/string/String~traverse) (global $std/runtime/register_ref (mut i32) (i32.const 0)) (global $std/runtime/link_ref (mut i32) (i32.const 0)) (global $std/runtime/link_parentRef (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $std/runtime/barrier1 (mut i32) (i32.const 0)) (global $std/runtime/barrier2 (mut i32) (i32.const 0)) (global $std/runtime/barrier3 (mut i32) (i32.const 0)) @@ -43,7 +43,7 @@ (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $std/runtime/ref1 (mut i32) (i32.const 0)) (global $std/runtime/header1 (mut i32) (i32.const 0)) (global $std/runtime/ref2 (mut i32) (i32.const 0)) @@ -60,18 +60,18 @@ (export "table" (table $0)) (export "main" (func $std/runtime/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $std/runtime/A~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/runtime/A~traverse (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) ) - (func $std/runtime/B~iterate (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/runtime/B~traverse (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) ) - (func $~lib/string/String~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/string/String~traverse (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) (func $~lib/runtime/runtime.adjust (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -1469,7 +1469,7 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 @@ -1481,7 +1481,7 @@ i32.const 0 i32.store offset=12 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) (func $~lib/util/memory/memcpy (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -3231,7 +3231,7 @@ (local $5 i32) (local $6 i32) local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 @@ -3268,7 +3268,7 @@ i32.const 0 i32.store offset=12 local.get $5 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add local.set $6 local.get $6 @@ -3285,7 +3285,7 @@ call $~lib/memory/memory.fill local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq if local.get $0 @@ -3295,7 +3295,7 @@ if i32.const 0 i32.const 232 - i32.const 107 + i32.const 64 i32.const 10 call $~lib/env/abort unreachable @@ -3337,24 +3337,24 @@ if i32.const 0 i32.const 232 - i32.const 132 + i32.const 89 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $1 local.get $1 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 232 - i32.const 134 + i32.const 91 i32.const 6 call $~lib/env/abort unreachable @@ -3371,24 +3371,24 @@ if i32.const 0 i32.const 232 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 232 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -3402,13 +3402,13 @@ ) (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) (func $~lib/string/String#get:length (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub i32.load offset=4 i32.const 1 @@ -3423,7 +3423,7 @@ if i32.const 0 i32.const 24 - i32.const 29 + i32.const 33 i32.const 0 call $~lib/env/abort unreachable @@ -3436,7 +3436,7 @@ if i32.const 0 i32.const 24 - i32.const 35 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -3457,7 +3457,7 @@ if i32.const 0 i32.const 24 - i32.const 37 + i32.const 41 i32.const 2 call $~lib/env/abort unreachable @@ -3549,18 +3549,18 @@ call $~lib/runtime/runtime.allocate global.set $std/runtime/ref1 global.get $std/runtime/ref1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub global.set $std/runtime/header1 global.get $std/runtime/header1 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 52 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -3573,7 +3573,7 @@ if i32.const 0 i32.const 24 - i32.const 53 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -3587,7 +3587,7 @@ if i32.const 0 i32.const 24 - i32.const 54 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -3600,7 +3600,7 @@ if i32.const 0 i32.const 24 - i32.const 55 + i32.const 59 i32.const 0 call $~lib/env/abort unreachable @@ -3616,13 +3616,13 @@ if i32.const 0 i32.const 24 - i32.const 57 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref2 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub global.set $std/runtime/header2 global.get $std/runtime/header2 @@ -3633,7 +3633,7 @@ if i32.const 0 i32.const 24 - i32.const 59 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -3650,7 +3650,7 @@ if i32.const 0 i32.const 24 - i32.const 62 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable @@ -3669,13 +3669,13 @@ if i32.const 0 i32.const 24 - i32.const 66 + i32.const 70 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/register_ref - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub global.set $std/runtime/header4 global.get $std/runtime/header4 @@ -3686,7 +3686,7 @@ if i32.const 0 i32.const 24 - i32.const 68 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable @@ -3699,7 +3699,7 @@ if i32.const 0 i32.const 24 - i32.const 69 + i32.const 73 i32.const 0 call $~lib/env/abort unreachable @@ -3715,7 +3715,7 @@ if i32.const 0 i32.const 24 - i32.const 72 + i32.const 76 i32.const 0 call $~lib/env/abort unreachable @@ -3728,7 +3728,7 @@ if i32.const 0 i32.const 24 - i32.const 73 + i32.const 77 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 2932bcfbc5..10d5f124d2 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1,10 +1,10 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) @@ -26,10 +26,9 @@ (data (i32.const 112) "\03\00\00\00\14") (data (i32.const 128) "s\00t\00d\00/\00s\00e\00t\00.\00t\00s") (table $0 23 funcref) - (elem (i32.const 0) $null $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/string/String~iterate $~lib/string/String~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate) + (elem (i32.const 0) $null $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/string/String~traverse $~lib/string/String~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -124,23 +123,15 @@ i32.const 16 i32.add ) - (func $~lib/set/Set~iterate (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/set/Set~traverse (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + drop local.get $0 i32.load offset=8 - local.set $0 - i32.const 1 - global.set $~lib/argc - local.get $0 - local.get $1 - call_indirect (type $FUNCSIG$vi) + drop ) - (func $~lib/string/String~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/string/String~traverse (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -151,7 +142,7 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -166,7 +157,7 @@ if i32.const 0 i32.const 24 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -395,8 +386,8 @@ if i32.const 0 i32.const 72 - i32.const 53 - i32.const 51 + i32.const 54 + i32.const 43 call $~lib/env/abort unreachable end diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index ff6f1e6b79..8c4448be01 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -1,11 +1,11 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) @@ -23,14 +23,13 @@ (data (i32.const 56) "\03\00\00\00&\00\00\00\00\00\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 112) "\03\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") (table $0 23 funcref) - (elem (i32.const 0) $null $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/string/String~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (elem (i32.const 0) $null $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/string/String~traverse $~lib/arraybuffer/ArrayBuffer~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) - (global $~lib/argc (mut i32) (i32.const 0)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/memory/HEAP_BASE i32 (i32.const 148)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) @@ -41,7 +40,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -140,7 +139,7 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 @@ -152,33 +151,30 @@ i32.const 0 i32.store offset=12 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/set/Set~iterate (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/collector/dummy/__ref_mark (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/set/Set~traverse (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/string/String~iterate (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/string/String~traverse (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $~lib/collector/dummy/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/runtime.register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -187,24 +183,24 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -216,7 +212,7 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/memory/memory.fill (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -473,19 +469,19 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer~iterate (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/arraybuffer/ArrayBuffer~traverse (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 i32.const 72 - i32.const 53 - i32.const 51 + i32.const 54 + i32.const 43 call $~lib/env/abort unreachable end @@ -500,13 +496,13 @@ i32.const 4 call $~lib/runtime/runtime.register ) - (func $~lib/collector/dummy/__ref_link (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/set/Set#clear (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -575,7 +571,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -609,14 +605,14 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash8 (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const -2128831035 local.get $0 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -671,7 +667,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -690,7 +686,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -860,7 +856,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -962,11 +958,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1043,7 +1039,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 23 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 24 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1326,24 +1322,18 @@ unreachable end ) - (func $~lib/set/Set~iterate (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/set/Set~traverse (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/set/Set#clear (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1412,7 +1402,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -1446,7 +1436,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1499,7 +1489,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1516,7 +1506,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1686,7 +1676,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1786,11 +1776,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1865,7 +1855,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 33 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 34 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2148,24 +2138,18 @@ unreachable end ) - (func $~lib/set/Set~iterate (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/set/Set~traverse (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/set/Set#clear (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2234,7 +2218,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -2268,7 +2252,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -2290,7 +2274,7 @@ local.set $1 local.get $1 ) - (func $~lib/set/Set#find (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2345,7 +2329,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2364,7 +2348,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 40 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2534,7 +2518,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 42 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2636,11 +2620,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2717,7 +2701,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 44 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 45 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3000,24 +2984,18 @@ unreachable end ) - (func $~lib/set/Set~iterate (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/set/Set~traverse (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/set/Set#clear (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 47 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3086,7 +3064,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -3120,7 +3098,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3173,7 +3151,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -3190,7 +3168,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 50 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 51 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3360,7 +3338,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 51 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 52 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3460,11 +3438,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3539,7 +3517,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 54 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 55 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3822,24 +3800,18 @@ unreachable end ) - (func $~lib/set/Set~iterate (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/set/Set~traverse (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/set/Set#clear (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 57 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3908,7 +3880,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -3942,7 +3914,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -3984,7 +3956,7 @@ local.set $1 local.get $1 ) - (func $~lib/set/Set#find (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4035,7 +4007,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -4050,7 +4022,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 61 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 62 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4220,7 +4192,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 62 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4318,11 +4290,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 63 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 64 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4395,7 +4367,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 65 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 66 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4678,24 +4650,18 @@ unreachable end ) - (func $~lib/set/Set~iterate (; 66 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/set/Set~traverse (; 67 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/set/Set#clear (; 67 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 68 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4764,7 +4730,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 68 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -4798,7 +4764,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4849,7 +4815,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 71 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -4864,7 +4830,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 71 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 72 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5034,7 +5000,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 72 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 73 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5132,11 +5098,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 74 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 74 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 75 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5209,7 +5175,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 75 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 76 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5492,24 +5458,18 @@ unreachable end ) - (func $~lib/set/Set~iterate (; 76 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/set/Set~traverse (; 77 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/set/Set#clear (; 77 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 78 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5578,7 +5538,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 78 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -5612,7 +5572,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 79 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 80 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5700,7 +5660,7 @@ local.set $3 local.get $3 ) - (func $~lib/set/Set#find (; 80 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 81 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5751,7 +5711,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 81 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 82 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -5766,7 +5726,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 82 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 83 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5937,7 +5897,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 83 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 84 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6036,11 +5996,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 84 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 85 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 85 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 86 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6114,7 +6074,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 86 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 87 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6397,24 +6357,18 @@ unreachable end ) - (func $~lib/set/Set~iterate (; 87 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/set/Set~traverse (; 88 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/set/Set#clear (; 88 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 89 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6483,7 +6437,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 89 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 90 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -6517,7 +6471,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 90 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 91 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6568,7 +6522,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 91 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 92 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -6583,7 +6537,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 92 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 93 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6754,7 +6708,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 93 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 94 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6853,11 +6807,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 95 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 95 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 96 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6931,7 +6885,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 96 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 97 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -7214,24 +7168,18 @@ unreachable end ) - (func $~lib/set/Set~iterate (; 97 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/set/Set~traverse (; 98 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/set/Set#clear (; 98 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 99 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7300,7 +7248,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 99 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 100 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -7334,7 +7282,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 100 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 101 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7385,7 +7333,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 101 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 102 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) local.get $0 local.get $1 @@ -7401,7 +7349,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 102 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 103 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7573,7 +7521,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 103 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#add (; 104 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -7673,11 +7621,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 104 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 105 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 105 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#delete (; 106 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -7752,7 +7700,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 106 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 107 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -8035,24 +7983,18 @@ unreachable end ) - (func $~lib/set/Set~iterate (; 107 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/set/Set~traverse (; 108 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=8 - local.set $2 - i32.const 1 - global.set $~lib/argc - local.get $2 + local.set $1 local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/set/Set#clear (; 108 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 109 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8121,7 +8063,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 109 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 110 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -8155,7 +8097,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 110 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 111 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -8206,7 +8148,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 111 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 112 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) local.get $0 local.get $1 @@ -8222,7 +8164,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 112 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 113 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8394,7 +8336,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 113 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#add (; 114 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 f64) (local $3 i32) (local $4 i32) @@ -8494,11 +8436,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 114 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 115 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#delete (; 116 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -8573,7 +8515,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 116 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 117 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -8856,7 +8798,7 @@ unreachable end ) - (func $start:std/set (; 117 ;) (type $FUNCSIG$v) + (func $start:std/set (; 118 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -8878,9 +8820,9 @@ call $std/set/testNumeric call $std/set/testNumeric ) - (func $start (; 118 ;) (type $FUNCSIG$v) + (func $start (; 119 ;) (type $FUNCSIG$v) call $start:std/set ) - (func $null (; 119 ;) (type $FUNCSIG$v) + (func $null (; 120 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 11bd2e0f3c..58a5952a8a 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -39,7 +39,7 @@ if i32.const 0 i32.const 240 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -1437,7 +1437,7 @@ if i32.const 0 i32.const 280 - i32.const 107 + i32.const 64 i32.const 10 call $~lib/env/abort unreachable @@ -1480,8 +1480,8 @@ if i32.const 0 i32.const 240 - i32.const 13 - i32.const 72 + i32.const 14 + i32.const 64 call $~lib/env/abort unreachable end @@ -1541,7 +1541,7 @@ if i32.const 0 i32.const 240 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -1585,7 +1585,7 @@ if i32.const 0 i32.const 240 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -1629,7 +1629,7 @@ if i32.const 0 i32.const 240 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 5752f5a7f2..40583f8629 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -30,11 +30,11 @@ (global $std/static-array/I i32 (i32.const 80)) (global $std/static-array/f i32 (i32.const 120)) (global $std/static-array/F i32 (i32.const 168)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/memory/HEAP_BASE i32 (i32.const 312)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -62,7 +62,7 @@ if i32.const 0 i32.const 240 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -75,7 +75,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -1870,7 +1870,7 @@ (local $5 i32) (local $6 i32) local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 @@ -1901,7 +1901,7 @@ i32.load i32.store local.get $5 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add local.set $6 local.get $6 @@ -1918,7 +1918,7 @@ call $~lib/memory/memory.fill local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq if local.get $0 @@ -1928,7 +1928,7 @@ if i32.const 0 i32.const 280 - i32.const 107 + i32.const 64 i32.const 10 call $~lib/env/abort unreachable @@ -1972,15 +1972,15 @@ i32.gt_u if local.get $1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH local.get $2 i32.shr_u i32.gt_u if i32.const 0 i32.const 240 - i32.const 13 - i32.const 72 + i32.const 14 + i32.const 64 call $~lib/env/abort unreachable end @@ -2070,7 +2070,7 @@ if i32.const 0 i32.const 240 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -2138,7 +2138,7 @@ if i32.const 0 i32.const 240 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -2206,7 +2206,7 @@ if i32.const 0 i32.const 240 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index b34cfd00e9..b9a764dea4 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -1464,7 +1464,7 @@ if i32.const 0 i32.const 136 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -1479,7 +1479,7 @@ if i32.const 0 i32.const 136 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -1551,7 +1551,7 @@ if i32.const 0 i32.const 96 - i32.const 448 + i32.const 449 i32.const 8 call $~lib/env/abort unreachable @@ -1598,7 +1598,7 @@ if i32.const 0 i32.const 96 - i32.const 452 + i32.const 453 i32.const 8 call $~lib/env/abort unreachable @@ -1677,7 +1677,7 @@ if i32.const 0 i32.const 96 - i32.const 464 + i32.const 465 i32.const 8 call $~lib/env/abort unreachable @@ -1732,7 +1732,7 @@ if i32.const 0 i32.const 96 - i32.const 473 + i32.const 474 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index 8131ede658..de0b032799 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -20,12 +20,12 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/string-utf8/str (mut i32) (i32.const 16)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) (global $std/string-utf8/len (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 $std/string-utf8/ptr (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 228)) (export "memory" (memory $0)) @@ -33,7 +33,7 @@ (start $start) (func $~lib/string/String#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub i32.load offset=4 i32.const 1 @@ -457,7 +457,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -472,13 +472,13 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 i32.store offset=4 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) (func $~lib/util/memory/memcpy (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -1929,24 +1929,24 @@ if i32.const 0 i32.const 136 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 136 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -2033,7 +2033,7 @@ if i32.const 0 i32.const 96 - i32.const 448 + i32.const 449 i32.const 8 call $~lib/env/abort unreachable @@ -2087,7 +2087,7 @@ if i32.const 0 i32.const 96 - i32.const 452 + i32.const 453 i32.const 8 call $~lib/env/abort unreachable @@ -2182,7 +2182,7 @@ if i32.const 0 i32.const 96 - i32.const 464 + i32.const 465 i32.const 8 call $~lib/env/abort unreachable @@ -2245,7 +2245,7 @@ if i32.const 0 i32.const 96 - i32.const 473 + i32.const 474 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 3d95e96a62..9421999642 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1,6 +1,5 @@ (module (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -15,6 +14,7 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00 ") @@ -326,7 +326,7 @@ (data (i32.const 6696) "\01\00\00\00\16") (data (i32.const 6712) "0\00.\000\000\000\000\003\005\006\008\009") (table $0 11 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/array/Array<~lib/string/String>~iterate $~lib/array/Array<~lib/string/String>~iterate $~lib/string/String~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) + (elem (i32.const 0) $null $~lib/string/String~traverse $~lib/array/Array<~lib/string/String>~traverse $~lib/array/Array<~lib/string/String>~traverse $~lib/string/String~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse) (global $std/string/str (mut i32) (i32.const 24)) (global $std/string/nullStr (mut i32) (i32.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -335,7 +335,6 @@ (global $std/string/a (mut i32) (i32.const 0)) (global $std/string/b (mut i32) (i32.const 0)) (global $std/string/sa (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) (global $~lib/util/number/_exp (mut i32) (i32.const 0)) @@ -348,7 +347,7 @@ (export "getString" (func $std/string/getString)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/string/String~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/string/String~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -448,7 +447,7 @@ if i32.const 0 i32.const 120 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -463,7 +462,7 @@ if i32.const 0 i32.const 120 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -579,7 +578,7 @@ if i32.const 0 i32.const 216 - i32.const 25 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -634,7 +633,7 @@ if i32.const 0 i32.const 216 - i32.const 165 + i32.const 166 i32.const 4 call $~lib/env/abort unreachable @@ -682,7 +681,7 @@ if i32.const 0 i32.const 216 - i32.const 78 + i32.const 79 i32.const 4 call $~lib/env/abort unreachable @@ -730,7 +729,7 @@ if i32.const 0 i32.const 216 - i32.const 134 + i32.const 135 i32.const 4 call $~lib/env/abort unreachable @@ -1881,7 +1880,7 @@ if i32.const 0 i32.const 216 - i32.const 282 + i32.const 283 i32.const 4 call $~lib/env/abort unreachable @@ -1976,7 +1975,7 @@ if i32.const 0 i32.const 216 - i32.const 303 + i32.const 304 i32.const 4 call $~lib/env/abort unreachable @@ -2072,7 +2071,7 @@ if i32.const 0 i32.const 216 - i32.const 150 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -2494,7 +2493,7 @@ if i32.const 0 i32.const 216 - i32.const 570 + i32.const 571 i32.const 10 call $~lib/env/abort unreachable @@ -2766,7 +2765,7 @@ if i32.const 0 i32.const 216 - i32.const 324 + i32.const 325 i32.const 4 call $~lib/env/abort unreachable @@ -2796,7 +2795,7 @@ if i32.const 0 i32.const 216 - i32.const 329 + i32.const 330 i32.const 6 call $~lib/env/abort unreachable @@ -2916,39 +2915,30 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/string/String>~iterate (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array<~lib/string/String>~traverse (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + drop local.get $0 i32.load offset=4 - local.tee $2 + local.tee $1 local.get $0 i32.load offset=8 i32.add local.set $0 loop $continue|0 - local.get $2 + local.get $1 local.get $0 i32.lt_u if - local.get $2 + local.get $1 i32.load - local.set $3 - i32.const 1 - global.set $~lib/argc - local.get $3 + drop local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $2 i32.const 4 i32.add - local.set $2 + local.set $1 br $continue|0 end end @@ -3276,7 +3266,7 @@ if i32.const 0 i32.const 120 - i32.const 107 + i32.const 64 i32.const 10 call $~lib/env/abort unreachable @@ -3317,8 +3307,8 @@ if i32.const 0 i32.const 1912 - i32.const 13 - i32.const 72 + i32.const 14 + i32.const 64 call $~lib/env/abort unreachable end @@ -3394,7 +3384,7 @@ if i32.const 0 i32.const 216 - i32.const 351 + i32.const 352 i32.const 4 call $~lib/env/abort unreachable @@ -3639,7 +3629,7 @@ if i32.const 0 i32.const 1912 - i32.const 95 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -3653,7 +3643,7 @@ if i32.const 0 i32.const 1912 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -3720,13 +3710,10 @@ end end ) - (func $~lib/array/Array~iterate (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + drop ) (func $~lib/util/number/utoa32_lut (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -5132,7 +5119,7 @@ if i32.const 0 i32.const 216 - i32.const 190 + i32.const 191 i32.const 4 call $~lib/env/abort unreachable @@ -5226,7 +5213,7 @@ if i32.const 0 i32.const 120 - i32.const 132 + i32.const 89 i32.const 6 call $~lib/env/abort unreachable @@ -5240,7 +5227,7 @@ if i32.const 0 i32.const 120 - i32.const 134 + i32.const 91 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 1ad6323a73..34a1007a62 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -1,6 +1,5 @@ (module (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -10,6 +9,7 @@ (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$di (func (param i32) (result f64))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (type $FUNCSIG$id (func (param f64) (result i32))) @@ -176,13 +176,13 @@ (data (i32.const 6664) "\01\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\001\00.\001\00e\00-\006\004\00") (data (i32.const 6696) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\000\00.\000\000\000\000\003\005\006\008\009\00") (table $0 11 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/array/Array<~lib/string/String>~iterate $~lib/array/Array<~lib/string/String>~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) + (elem (i32.const 0) $null $~lib/string/String~traverse $~lib/array/Array<~lib/string/String>~traverse $~lib/array/Array<~lib/string/String>~traverse $~lib/arraybuffer/ArrayBuffer~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse) (global $std/string/str (mut i32) (i32.const 24)) (global $std/string/nullStr (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/string/String.MAX_LENGTH i32 (i32.const 536870904)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) @@ -190,8 +190,7 @@ (global $std/string/a (mut i32) (i32.const 0)) (global $std/string/b (mut i32) (i32.const 0)) (global $std/string/sa (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) (global $~lib/builtins/u64.MAX_VALUE i64 (i64.const -1)) @@ -212,12 +211,12 @@ (export "getString" (func $std/string/getString)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/string/String~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/string/String~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) (func $~lib/string/String#get:length (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub i32.load offset=4 i32.const 1 @@ -243,7 +242,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -342,7 +341,7 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 @@ -354,7 +353,7 @@ i32.const 0 i32.store offset=12 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) (func $~lib/collector/dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) @@ -369,24 +368,24 @@ if i32.const 0 i32.const 120 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 120 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -519,7 +518,7 @@ if i32.const 0 i32.const 216 - i32.const 25 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -584,7 +583,7 @@ if i32.const 0 i32.const 216 - i32.const 165 + i32.const 166 i32.const 4 call $~lib/env/abort unreachable @@ -650,7 +649,7 @@ if i32.const 0 i32.const 216 - i32.const 78 + i32.const 79 i32.const 4 call $~lib/env/abort unreachable @@ -714,7 +713,7 @@ if i32.const 0 i32.const 216 - i32.const 134 + i32.const 135 i32.const 4 call $~lib/env/abort unreachable @@ -2275,7 +2274,7 @@ if i32.const 0 i32.const 216 - i32.const 282 + i32.const 283 i32.const 4 call $~lib/env/abort unreachable @@ -2376,7 +2375,7 @@ if i32.const 0 i32.const 216 - i32.const 303 + i32.const 304 i32.const 4 call $~lib/env/abort unreachable @@ -2478,7 +2477,7 @@ if i32.const 0 i32.const 216 - i32.const 150 + i32.const 151 i32.const 4 call $~lib/env/abort unreachable @@ -2992,7 +2991,7 @@ if i32.const 0 i32.const 216 - i32.const 570 + i32.const 571 i32.const 10 call $~lib/env/abort unreachable @@ -3273,7 +3272,7 @@ if i32.const 0 i32.const 216 - i32.const 324 + i32.const 325 i32.const 4 call $~lib/env/abort unreachable @@ -3301,7 +3300,7 @@ if i32.const 0 i32.const 216 - i32.const 329 + i32.const 330 i32.const 6 call $~lib/env/abort unreachable @@ -3435,62 +3434,58 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/string/String>~iterate (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_mark (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/array/Array<~lib/string/String>~traverse (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - i32.const 1 - global.set $~lib/argc local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark local.get $0 i32.load offset=4 - local.set $2 - local.get $2 + local.set $1 + local.get $1 local.get $0 i32.load offset=8 i32.add - local.set $3 + local.set $2 block $break|0 loop $continue|0 + local.get $1 local.get $2 - local.get $3 i32.lt_u if block - local.get $2 - i32.load - local.set $4 - i32.const 1 - global.set $~lib/argc - local.get $4 local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $4 + i32.load + local.set $3 + local.get $3 + call $~lib/collector/dummy/__ref_mark + local.get $3 + call $~lib/string/String~traverse local.get $1 - call $~lib/string/String~iterate - local.get $2 i32.const 4 i32.add - local.set $2 + local.set $1 end br $continue|0 end end end ) - (func $~lib/arraybuffer/ArrayBuffer~iterate (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/arraybuffer/ArrayBuffer~traverse (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) - (func $~lib/collector/dummy/__ref_link (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/runtime/runtime.makeArray (; 39 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3554,7 +3549,7 @@ end local.get $4 ) - (func $~lib/memory/memory.fill (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3811,21 +3806,21 @@ end end ) - (func $~lib/allocator/arena/__mem_free (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/runtime.reallocate (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 @@ -3862,7 +3857,7 @@ i32.const 0 i32.store offset=12 local.get $5 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add local.set $6 local.get $6 @@ -3879,7 +3874,7 @@ call $~lib/memory/memory.fill local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq if local.get $0 @@ -3889,7 +3884,7 @@ if i32.const 0 i32.const 120 - i32.const 107 + i32.const 64 i32.const 10 call $~lib/env/abort unreachable @@ -3922,7 +3917,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 44 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3937,15 +3932,15 @@ i32.gt_u if local.get $1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH local.get $2 i32.shr_u i32.gt_u if i32.const 0 i32.const 1912 - i32.const 13 - i32.const 72 + i32.const 14 + i32.const 64 call $~lib/env/abort unreachable end @@ -3996,7 +3991,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array<~lib/string/String>#push (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#push (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4046,7 +4041,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 46 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 47 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4079,7 +4074,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/string/String#split (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4098,7 +4093,7 @@ if i32.const 0 i32.const 216 - i32.const 351 + i32.const 352 i32.const 4 call $~lib/env/abort unreachable @@ -4386,11 +4381,11 @@ end local.get $9 ) - (func $~lib/array/Array<~lib/string/String>#get:length (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#get:length (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -4399,7 +4394,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/string/String>#__get (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -4407,7 +4402,7 @@ if i32.const 0 i32.const 1912 - i32.const 95 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -4421,7 +4416,7 @@ if i32.const 0 i32.const 1912 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -4430,7 +4425,7 @@ local.get $1 call $~lib/array/Array<~lib/string/String>#__unchecked_get ) - (func $~lib/util/number/decimalCount32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -4499,15 +4494,12 @@ unreachable unreachable ) - (func $~lib/array/Array~iterate (; 52 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 53 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/util/number/utoa32_lut (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4650,7 +4642,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4706,7 +4698,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/utoa32 (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4742,7 +4734,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/decimalCount64 (; 56 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 57 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -4811,7 +4803,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 57 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 58 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -4939,7 +4931,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 58 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 59 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5007,7 +4999,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa64 (; 59 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 60 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5097,27 +5089,24 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/builtins/isFinite (; 60 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 61 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 61 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 62 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/array/Array~iterate (; 62 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 63 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/array/Array#__unchecked_get (; 63 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__unchecked_get (; 64 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $0 i32.load offset=4 local.get $1 @@ -5126,15 +5115,12 @@ i32.add i64.load ) - (func $~lib/array/Array~iterate (; 64 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 65 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/array/Array#__unchecked_get (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -5143,7 +5129,7 @@ i32.add i32.load16_s ) - (func $~lib/util/number/genDigits (; 66 ;) (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 (; 67 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -5714,7 +5700,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6047,7 +6033,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 68 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 69 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -6485,7 +6471,7 @@ local.get $2 i32.add ) - (func $~lib/string/String#substring (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6501,7 +6487,7 @@ if i32.const 0 i32.const 216 - i32.const 190 + i32.const 191 i32.const 4 call $~lib/env/abort unreachable @@ -6603,7 +6589,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/runtime/runtime.discard (; 70 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 71 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -6612,24 +6598,24 @@ if i32.const 0 i32.const 120 - i32.const 132 + i32.const 89 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $1 local.get $1 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 120 - i32.const 134 + i32.const 91 i32.const 6 call $~lib/env/abort unreachable @@ -6637,7 +6623,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/util/number/dtoa (; 71 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 72 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6684,7 +6670,7 @@ call $~lib/runtime/runtime.discard local.get $3 ) - (func $start:std/string (; 72 ;) (type $FUNCSIG$v) + (func $start:std/string (; 73 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10076,12 +10062,12 @@ unreachable end ) - (func $std/string/getString (; 73 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 74 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 74 ;) (type $FUNCSIG$v) + (func $start (; 75 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 75 ;) (type $FUNCSIG$v) + (func $null (; 76 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 154118043d..980cd5dfa7 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -144,7 +144,7 @@ if i32.const 0 i32.const 72 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -159,7 +159,7 @@ if i32.const 0 i32.const 72 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -388,8 +388,8 @@ if i32.const 0 i32.const 112 - i32.const 53 - i32.const 51 + i32.const 54 + i32.const 43 call $~lib/env/abort unreachable end diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index d481dfbdad..68a2928e77 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -39,12 +39,12 @@ (global $std/symbol/sym1 (mut i32) (i32.const 0)) (global $std/symbol/sym2 (mut i32) (i32.const 0)) (global $~lib/symbol/stringToId (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/symbol/idToString (mut i32) (i32.const 0)) (global $std/symbol/sym3 (mut i32) (i32.const 0)) (global $std/symbol/sym4 (mut i32) (i32.const 0)) @@ -83,7 +83,7 @@ i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -182,13 +182,13 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 i32.store offset=4 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -200,24 +200,24 @@ if i32.const 0 i32.const 72 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 72 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -487,13 +487,13 @@ (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 i32.const 112 - i32.const 53 - i32.const 51 + i32.const 54 + i32.const 43 call $~lib/env/abort unreachable end @@ -630,7 +630,7 @@ ) (func $~lib/string/String#get:length (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub i32.load offset=4 i32.const 1 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 268c5b726b..acb6a69303 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1,11 +1,11 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viid (func (param i32 i32 f64))) (type $FUNCSIG$idd (func (param f64 f64) (result i32))) (type $FUNCSIG$dii (func (param i32 i32) (result f64))) @@ -93,7 +93,7 @@ (data (i32.const 1336) "\01\00\00\00V") (data (i32.const 1352) "T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") (table $0 130 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/string/String~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) + (elem (i32.const 0) $null $~lib/string/String~traverse $~lib/string/String~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/typedarray/arr (mut i32) (i32.const 0)) @@ -117,7 +117,7 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/string/String~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/string/String~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -442,7 +442,7 @@ if i32.const 0 i32.const 136 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable @@ -457,7 +457,7 @@ if i32.const 0 i32.const 136 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -475,8 +475,8 @@ if i32.const 0 i32.const 80 - i32.const 53 - i32.const 51 + i32.const 54 + i32.const 43 call $~lib/env/abort unreachable end @@ -490,15 +490,10 @@ i32.const 2 call $~lib/runtime/runtime.register ) - (func $~lib/arraybuffer/ArrayBufferView~iterate (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/arraybuffer/ArrayBufferView~traverse (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.tee $0 - if - local.get $0 - local.get $1 - call_indirect (type $FUNCSIG$vi) - end + drop ) (func $~lib/arraybuffer/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 @@ -509,8 +504,8 @@ if i32.const 0 i32.const 80 - i32.const 11 - i32.const 65 + i32.const 12 + i32.const 57 call $~lib/env/abort unreachable end @@ -1956,15 +1951,7 @@ call $~lib/memory/memory.fill end ) - (func $~lib/array/Array~iterate (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc - local.get $0 - i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) - ) - (func $~lib/util/memory/memcpy (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2811,7 +2798,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -3005,7 +2992,7 @@ end end ) - (func $~lib/runtime/runtime.makeArray (; 38 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 37 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) i32.const 16 @@ -3046,7 +3033,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int8Array#__get (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3065,7 +3052,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__get (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3073,7 +3060,7 @@ if i32.const 0 i32.const 264 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -3084,7 +3071,7 @@ i32.add i32.load8_s ) - (func $std/typedarray/isInt8ArrayEqual (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3126,7 +3113,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3212,7 +3199,7 @@ i32.const 4 call $~lib/runtime/runtime.register ) - (func $~lib/typedarray/Int32Array#fill (; 43 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/typedarray/Int32Array#fill (; 42 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) local.get $1 @@ -3289,7 +3276,7 @@ end end ) - (func $~lib/array/Array#__get (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3299,7 +3286,7 @@ if i32.const 0 i32.const 264 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -3312,7 +3299,7 @@ i32.add i32.load ) - (func $std/typedarray/isInt32ArrayEqual (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3358,12 +3345,12 @@ end i32.const 1 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 46 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 45 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduce (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3400,7 +3387,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 48 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 47 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -3431,7 +3418,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#__set (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 48 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3451,7 +3438,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Uint8Array#reduce (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3488,7 +3475,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 51 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 50 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -3520,7 +3507,7 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 52 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 51 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -3552,7 +3539,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#__set (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3576,7 +3563,7 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Int16Array#reduce (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduce (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3617,7 +3604,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 55 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 54 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -3648,7 +3635,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#__set (; 56 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3672,7 +3659,7 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Uint16Array#reduce (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduce (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3713,7 +3700,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 58 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 57 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -3744,7 +3731,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reduce (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3785,7 +3772,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 60 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 59 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -3815,7 +3802,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#__set (; 61 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint32Array#__set (; 60 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3839,7 +3826,7 @@ local.get $2 i32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 62 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 61 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -3869,7 +3856,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#__set (; 63 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 62 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -3893,12 +3880,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 64 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 63 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 65 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 64 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -3939,7 +3926,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 66 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 65 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -3969,7 +3956,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#__set (; 67 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Uint64Array#__set (; 66 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -3993,7 +3980,7 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 68 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 67 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -4023,7 +4010,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#__set (; 69 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 68 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -4047,12 +4034,12 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 70 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 69 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 71 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $~lib/typedarray/Float32Array#reduce (; 70 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) (local $1 i32) (local $2 f32) (local $3 i32) @@ -4093,7 +4080,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 72 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 71 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -4122,12 +4109,12 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 73 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 72 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 74 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/typedarray/Float64Array#reduce (; 73 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -4168,7 +4155,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 75 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 74 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -4197,7 +4184,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#reduceRight (; 76 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduceRight (; 75 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4235,7 +4222,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 77 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 76 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -4266,7 +4253,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 78 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 77 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4304,7 +4291,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 79 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 78 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -4336,7 +4323,7 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 80 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 79 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -4368,7 +4355,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reduceRight (; 81 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduceRight (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4410,7 +4397,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 82 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 81 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -4441,7 +4428,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 83 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 82 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4483,7 +4470,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 84 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 83 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -4514,7 +4501,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reduceRight (; 85 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 84 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4556,7 +4543,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 86 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 85 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -4586,7 +4573,7 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 87 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 86 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -4616,7 +4603,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#reduceRight (; 88 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 87 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -4658,7 +4645,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 89 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 88 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -4688,7 +4675,7 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 90 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 89 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -4718,7 +4705,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#reduceRight (; 91 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $~lib/typedarray/Float32Array#reduceRight (; 90 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) (local $1 i32) (local $2 f32) (local $3 i32) @@ -4760,7 +4747,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 92 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 91 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -4789,7 +4776,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#reduceRight (; 93 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/typedarray/Float64Array#reduceRight (; 92 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -4831,7 +4818,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 94 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 93 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -4860,12 +4847,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 95 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 94 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 96 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 95 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4911,7 +4898,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 97 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 96 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -4969,7 +4956,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#map (; 98 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 97 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5015,7 +5002,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint8Array#__get (; 99 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__get (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5034,7 +5021,7 @@ i32.add i32.load8_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 100 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 99 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -5092,7 +5079,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 101 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 100 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5138,7 +5125,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 102 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 101 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -5196,7 +5183,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#map (; 103 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5251,7 +5238,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#__get (; 104 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 103 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5274,7 +5261,7 @@ i32.add i32.load16_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 105 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 104 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -5332,7 +5319,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#map (; 106 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 105 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5387,7 +5374,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint16Array#__get (; 107 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5410,7 +5397,7 @@ i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 108 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 107 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -5468,7 +5455,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#map (; 109 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 108 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5523,7 +5510,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 110 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 109 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -5581,7 +5568,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#map (; 111 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 110 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5636,7 +5623,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint32Array#__get (; 112 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 111 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5659,7 +5646,7 @@ i32.add i32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 113 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 112 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -5717,12 +5704,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 114 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 113 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 114 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5777,7 +5764,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#__get (; 116 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 115 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -5800,7 +5787,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 117 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 116 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -5858,7 +5845,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#map (; 118 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 117 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5913,7 +5900,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint64Array#__get (; 119 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__get (; 118 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -5936,7 +5923,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 120 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 119 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -5994,12 +5981,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 121 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 120 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 122 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 121 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6054,7 +6041,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#__get (; 123 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 122 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -6077,7 +6064,7 @@ i32.add f32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 124 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 123 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -6135,12 +6122,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 125 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 124 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 126 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 125 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6195,7 +6182,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 127 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 126 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -6253,14 +6240,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 128 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 127 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6299,13 +6286,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 130 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 129 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 131 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 130 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -6345,7 +6332,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#some (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 131 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6384,7 +6371,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 133 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 132 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -6424,7 +6411,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 134 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 133 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -6464,14 +6451,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 135 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 134 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6514,13 +6501,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 136 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 138 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 137 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -6560,7 +6547,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#some (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6603,7 +6590,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 140 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 139 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -6643,12 +6630,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 141 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 140 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6691,11 +6678,11 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 143 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 142 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 144 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 143 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -6735,7 +6722,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 145 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 144 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -6775,12 +6762,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 146 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 145 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6823,12 +6810,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 148 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 147 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 149 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 148 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -6868,7 +6855,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 150 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 149 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -6908,12 +6895,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 151 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 150 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6956,12 +6943,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 153 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 152 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 154 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 153 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -7001,12 +6988,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 155 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 154 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 156 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7049,12 +7036,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 157 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 156 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 158 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 157 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -7094,7 +7081,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#findIndex (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7136,14 +7123,14 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 160 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 159 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 161 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 160 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -7186,7 +7173,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#findIndex (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7228,7 +7215,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 163 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 162 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -7271,7 +7258,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 164 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 163 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -7314,7 +7301,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#findIndex (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7360,14 +7347,14 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 166 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 165 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 167 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 166 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -7410,7 +7397,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#findIndex (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7456,7 +7443,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 169 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 168 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -7499,7 +7486,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#findIndex (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7545,12 +7532,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 171 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 170 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 172 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 171 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -7593,7 +7580,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 173 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 172 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -7636,7 +7623,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#findIndex (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7682,12 +7669,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 175 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 174 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 176 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 175 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -7730,7 +7717,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 177 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 176 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -7773,7 +7760,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#findIndex (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7819,12 +7806,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 179 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 178 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 180 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 179 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -7867,7 +7854,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#findIndex (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7913,12 +7900,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 182 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 181 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 183 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 182 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -7961,7 +7948,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 184 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 183 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -7971,7 +7958,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int8Array#every (; 185 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8011,7 +7998,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 186 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 185 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -8051,13 +8038,13 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 187 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 186 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#every (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 187 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8097,7 +8084,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 189 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 188 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -8137,7 +8124,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 190 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 189 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -8177,7 +8164,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 191 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 190 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8187,7 +8174,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int16Array#every (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8231,7 +8218,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 193 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 192 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -8271,7 +8258,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#every (; 194 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 193 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8315,7 +8302,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 195 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 194 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -8355,13 +8342,13 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 196 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 195 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int32Array#every (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8405,7 +8392,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 198 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 197 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -8445,7 +8432,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 199 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 198 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -8485,14 +8472,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 200 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 199 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (; 201 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 200 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8536,7 +8523,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 202 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 201 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -8576,14 +8563,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 203 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 202 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 204 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 203 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -8623,7 +8610,7 @@ unreachable end ) - (func $~lib/math/NativeMathf.mod (; 205 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 204 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8774,13 +8761,13 @@ local.get $0 f32.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 206 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 205 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8824,7 +8811,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 208 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 207 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -8864,7 +8851,7 @@ unreachable end ) - (func $~lib/math/NativeMath.mod (; 209 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 208 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -9023,13 +9010,13 @@ local.get $0 f64.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 210 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 209 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 211 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 210 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9073,7 +9060,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 212 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 211 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -9113,7 +9100,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 213 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 212 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 255 i32.and @@ -9158,7 +9145,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 214 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Int8Array#forEach (; 213 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9191,7 +9178,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 215 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 214 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9243,7 +9230,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#forEach (; 216 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 215 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9276,7 +9263,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 217 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 216 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9323,7 +9310,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 218 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 217 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9370,7 +9357,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 219 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 218 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 65535 i32.and @@ -9415,7 +9402,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 220 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Int16Array#forEach (; 219 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9452,7 +9439,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 221 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 220 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9504,7 +9491,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#forEach (; 222 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 221 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9541,7 +9528,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 223 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 222 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9587,7 +9574,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 224 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 223 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/typedarray/forEachValues local.get $1 call $~lib/array/Array#__get @@ -9628,7 +9615,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 225 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 224 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9665,7 +9652,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 226 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 225 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9706,7 +9693,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 227 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 226 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9747,7 +9734,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 228 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 227 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) local.get $0 global.get $std/typedarray/forEachValues local.get $1 @@ -9789,7 +9776,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 229 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 228 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9826,7 +9813,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 230 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 229 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9870,7 +9857,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 231 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 230 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9914,7 +9901,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 232 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 231 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) local.get $0 global.get $std/typedarray/forEachValues local.get $1 @@ -9956,7 +9943,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 233 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Float32Array#forEach (; 232 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9993,7 +9980,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 234 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 233 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -10036,7 +10023,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 235 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 234 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) local.get $0 global.get $std/typedarray/forEachValues local.get $1 @@ -10078,7 +10065,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 236 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Float64Array#forEach (; 235 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10115,7 +10102,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 237 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 236 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -10158,7 +10145,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#reverse (; 238 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 237 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10206,7 +10193,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 239 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 238 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10351,7 +10338,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 240 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 239 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10399,7 +10386,7 @@ end local.get $0 ) - (func $~lib/typedarray/Uint8Array#subarray (; 241 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 240 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10454,7 +10441,7 @@ i32.const 5 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 242 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 241 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10591,7 +10578,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 243 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 242 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10646,7 +10633,7 @@ i32.const 6 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 244 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 243 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10783,7 +10770,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 245 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 244 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10837,7 +10824,7 @@ end local.get $0 ) - (func $~lib/typedarray/Int16Array#subarray (; 246 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 245 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10898,7 +10885,7 @@ i32.const 7 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 247 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 246 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11041,7 +11028,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 248 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11095,7 +11082,7 @@ end local.get $0 ) - (func $~lib/typedarray/Uint16Array#subarray (; 249 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 248 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11156,7 +11143,7 @@ i32.const 8 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 250 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 249 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11293,7 +11280,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 251 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 250 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11347,7 +11334,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 252 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 251 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11480,7 +11467,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#subarray (; 253 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 252 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11541,7 +11528,7 @@ i32.const 10 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 254 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 253 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11672,7 +11659,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#reverse (; 255 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 254 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11726,7 +11713,7 @@ end local.get $0 ) - (func $~lib/typedarray/Int64Array#subarray (; 256 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 255 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11787,7 +11774,7 @@ i32.const 11 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 257 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 256 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11921,7 +11908,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#subarray (; 258 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 257 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11982,7 +11969,7 @@ i32.const 12 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 259 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 258 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12116,7 +12103,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 260 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 259 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12170,7 +12157,7 @@ end local.get $0 ) - (func $~lib/typedarray/Float32Array#subarray (; 261 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 260 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12231,7 +12218,7 @@ i32.const 13 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 262 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 261 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12365,7 +12352,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 263 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 262 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12419,7 +12406,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 264 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 263 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12555,7 +12542,7 @@ unreachable end ) - (func $start:std/typedarray (; 265 ;) (type $FUNCSIG$v) + (func $start:std/typedarray (; 264 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 1440 @@ -13635,10 +13622,10 @@ call $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> call $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> ) - (func $start (; 266 ;) (type $FUNCSIG$v) + (func $start (; 265 ;) (type $FUNCSIG$v) call $start:std/typedarray ) - (func $null (; 267 ;) (type $FUNCSIG$v) + (func $null (; 266 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/typedarray.ts b/tests/compiler/std/typedarray.ts index 7283275e24..7e37eb4d19 100644 --- a/tests/compiler/std/typedarray.ts +++ b/tests/compiler/std/typedarray.ts @@ -193,9 +193,9 @@ assert(sub32.byteLength == 3 * sizeof()); assert(isInt32ArrayEqual(sub32, [0, 0, 0])); assert(isInt32ArrayEqual(arr32, [1, 0, 0, 0, 2])); -import { runtime } from "runtime"; +import { MAX_BYTELENGTH } from "util/runtime"; -const MAX_F64LENGTH = runtime.MAX_BYTELENGTH >> alignof(); +const MAX_F64LENGTH = MAX_BYTELENGTH >> alignof(); new Float64Array(MAX_F64LENGTH); // 1GB // new Float64Array(MAX_F64 + 1); // throws diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index e81c8f39bb..f6831f33f3 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -1,11 +1,11 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viid (func (param i32 i32 f64))) (type $FUNCSIG$idd (func (param f64 f64) (result i32))) (type $FUNCSIG$dii (func (param i32 i32) (result f64))) @@ -68,7 +68,7 @@ (data (i32.const 1248) "\01\00\00\00B\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 1336) "\01\00\00\00V\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (table $0 130 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/arraybuffer/ArrayBufferView~iterate $~lib/typedarray/Int8Array~iterate $~lib/typedarray/Uint8Array~iterate $~lib/typedarray/Uint8ClampedArray~iterate $~lib/typedarray/Int16Array~iterate $~lib/typedarray/Uint16Array~iterate $~lib/typedarray/Int32Array~iterate $~lib/typedarray/Uint32Array~iterate $~lib/typedarray/Int64Array~iterate $~lib/typedarray/Uint64Array~iterate $~lib/typedarray/Float32Array~iterate $~lib/typedarray/Float64Array~iterate $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) + (elem (i32.const 0) $null $~lib/string/String~traverse $~lib/arraybuffer/ArrayBuffer~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/typedarray/Int8Array~traverse $~lib/typedarray/Uint8Array~traverse $~lib/typedarray/Uint8ClampedArray~traverse $~lib/typedarray/Int16Array~traverse $~lib/typedarray/Uint16Array~traverse $~lib/typedarray/Int32Array~traverse $~lib/typedarray/Uint32Array~traverse $~lib/typedarray/Int64Array~traverse $~lib/typedarray/Uint64Array~traverse $~lib/typedarray/Float32Array~traverse $~lib/typedarray/Float64Array~traverse $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32 (i32.const 1)) (global $~lib/typedarray/Uint8Array.BYTES_PER_ELEMENT i32 (i32.const 1)) (global $~lib/typedarray/Uint8ClampedArray.BYTES_PER_ELEMENT i32 (i32.const 1)) @@ -80,11 +80,11 @@ (global $~lib/typedarray/Uint64Array.BYTES_PER_ELEMENT i32 (i32.const 8)) (global $~lib/typedarray/Float32Array.BYTES_PER_ELEMENT i32 (i32.const 4)) (global $~lib/typedarray/Float64Array.BYTES_PER_ELEMENT i32 (i32.const 8)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/typedarray/arr (mut i32) (i32.const 0)) (global $std/typedarray/af64 (mut i32) (i32.const 0)) @@ -110,14 +110,14 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/string/String~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/string/String~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -216,7 +216,7 @@ call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 @@ -228,7 +228,7 @@ i32.const 0 i32.store offset=12 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -488,8 +488,8 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer~iterate (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/arraybuffer/ArrayBuffer~traverse (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) ) (func $~lib/collector/dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) nop @@ -503,24 +503,24 @@ if i32.const 0 i32.const 136 - i32.const 145 + i32.const 102 i32.const 6 call $~lib/env/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub local.set $2 local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 i32.const 136 - i32.const 147 + i32.const 104 i32.const 6 call $~lib/env/abort unreachable @@ -535,13 +535,13 @@ (func $~lib/arraybuffer/ArrayBuffer#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 i32.const 80 - i32.const 53 - i32.const 51 + i32.const 54 + i32.const 43 call $~lib/env/abort unreachable end @@ -556,41 +556,42 @@ i32.const 2 call $~lib/runtime/runtime.register ) - (func $~lib/arraybuffer/ArrayBufferView~iterate (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/collector/dummy/__ref_mark (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/arraybuffer/ArrayBufferView~traverse (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 i32.load - local.tee $2 + local.tee $1 if - local.get $2 local.get $1 - call_indirect (type $FUNCSIG$vi) - local.get $2 + call $~lib/collector/dummy/__ref_mark local.get $1 - call $~lib/arraybuffer/ArrayBuffer~iterate + call $~lib/arraybuffer/ArrayBuffer~traverse end ) - (func $~lib/collector/dummy/__ref_link (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $1 - global.get $~lib/runtime/runtime.MAX_BYTELENGTH + global.get $~lib/util/runtime/MAX_BYTELENGTH local.get $2 i32.shr_u i32.gt_u if i32.const 0 i32.const 80 - i32.const 11 - i32.const 65 + i32.const 12 + i32.const 57 call $~lib/env/abort unreachable end @@ -652,13 +653,12 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Int8Array~iterate (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/typedarray/Int8Array~traverse (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~traverse ) - (func $~lib/typedarray/Int8Array#constructor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -674,28 +674,27 @@ local.set $0 local.get $0 ) - (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load i32.sub ) - (func $~lib/arraybuffer/ArrayBufferView#get:byteLength (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#get:byteLength (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 ) - (func $~lib/typedarray/Int8Array#get:length (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#get:length (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Uint8Array~iterate (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/typedarray/Uint8Array~traverse (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~traverse ) - (func $~lib/typedarray/Uint8Array#constructor (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -711,17 +710,16 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint8Array#get:length (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#get:length (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Uint8ClampedArray~iterate (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/typedarray/Uint8ClampedArray~traverse (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~traverse ) - (func $~lib/typedarray/Uint8ClampedArray#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#constructor (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -737,17 +735,16 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint8ClampedArray#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#get:length (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Int16Array~iterate (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/typedarray/Int16Array~traverse (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~traverse ) - (func $~lib/typedarray/Int16Array#constructor (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#constructor (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -763,19 +760,18 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int16Array#get:length (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#get:length (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 1 i32.shr_u ) - (func $~lib/typedarray/Uint16Array~iterate (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/typedarray/Uint16Array~traverse (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~traverse ) - (func $~lib/typedarray/Uint16Array#constructor (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#constructor (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -791,19 +787,18 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint16Array#get:length (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#get:length (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 1 i32.shr_u ) - (func $~lib/typedarray/Int32Array~iterate (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/typedarray/Int32Array~traverse (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~traverse ) - (func $~lib/typedarray/Int32Array#constructor (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#constructor (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -819,19 +814,18 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int32Array#get:length (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#get:length (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Uint32Array~iterate (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/typedarray/Uint32Array~traverse (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~traverse ) - (func $~lib/typedarray/Uint32Array#constructor (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#constructor (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -847,19 +841,18 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint32Array#get:length (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#get:length (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Int64Array~iterate (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/typedarray/Int64Array~traverse (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~traverse ) - (func $~lib/typedarray/Int64Array#constructor (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#constructor (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -875,19 +868,18 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int64Array#get:length (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#get:length (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $~lib/typedarray/Uint64Array~iterate (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/typedarray/Uint64Array~traverse (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~traverse ) - (func $~lib/typedarray/Uint64Array#constructor (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#constructor (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -903,19 +895,18 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint64Array#get:length (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#get:length (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $~lib/typedarray/Float32Array~iterate (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/typedarray/Float32Array~traverse (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~traverse ) - (func $~lib/typedarray/Float32Array#constructor (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#constructor (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -931,19 +922,18 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Float32Array#get:length (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#get:length (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Float64Array~iterate (; 47 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/typedarray/Float64Array~traverse (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) local.get $0 - local.get $1 - call $~lib/arraybuffer/ArrayBufferView~iterate + call $~lib/arraybuffer/ArrayBufferView~traverse ) - (func $~lib/typedarray/Float64Array#constructor (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#constructor (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -959,13 +949,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Float64Array#get:length (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#get:length (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $std/typedarray/testInstantiate (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/typedarray/testInstantiate (; 51 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1473,7 +1463,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#__set (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#__set (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1497,7 +1487,7 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int32Array#__get (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#__get (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1520,7 +1510,7 @@ i32.add i32.load ) - (func $~lib/typedarray/Int32Array#subarray (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1649,7 +1639,7 @@ i32.const 9 call $~lib/runtime/runtime.register ) - (func $~lib/typedarray/Float64Array#__set (; 54 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/typedarray/Float64Array#__set (; 55 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 local.get $0 i32.load offset=8 @@ -1673,7 +1663,7 @@ local.get $2 f64.store ) - (func $~lib/typedarray/Float64Array#subarray (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#subarray (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1802,7 +1792,7 @@ i32.const 14 call $~lib/runtime/runtime.register ) - (func $~lib/util/sort/insertionSort (; 56 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 57 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) @@ -1898,14 +1888,14 @@ unreachable end ) - (func $~lib/allocator/arena/__mem_free (; 57 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 58 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 58 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 59 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/util/sort/weakHeapSort (; 59 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 60 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2205,7 +2195,7 @@ local.get $10 f64.store ) - (func $~lib/typedarray/Float64Array#sort (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2289,7 +2279,7 @@ local.get $3 end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 61 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 62 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -2322,7 +2312,7 @@ i64.lt_s i32.sub ) - (func $~lib/typedarray/Float64Array#sort|trampoline (; 62 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort|trampoline (; 63 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2341,7 +2331,7 @@ local.get $1 call $~lib/typedarray/Float64Array#sort ) - (func $~lib/typedarray/Float64Array#__get (; 63 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/typedarray/Float64Array#__get (; 64 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -2364,7 +2354,7 @@ i32.add f64.load ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 64 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 65 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2396,7 +2386,7 @@ i32.and i32.store8 ) - (func $~lib/typedarray/Uint8ClampedArray#__get (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#__get (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2415,7 +2405,7 @@ i32.add i32.load8_u ) - (func $~lib/typedarray/Int8Array#__set (; 66 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int8Array#__set (; 67 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2435,7 +2425,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Int8Array#fill (; 67 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int8Array#fill (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2523,15 +2513,12 @@ end local.get $7 ) - (func $~lib/array/Array~iterate (; 68 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 69 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/util/memory/memcpy (; 69 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 70 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3732,7 +3719,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 70 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 71 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3963,7 +3950,7 @@ end end ) - (func $~lib/runtime/runtime.makeArray (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 72 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -4027,11 +4014,11 @@ end local.get $4 ) - (func $~lib/array/Array#get:length (; 72 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/typedarray/Int8Array#__get (; 73 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 74 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4050,7 +4037,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__unchecked_get (; 74 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 75 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -4059,7 +4046,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__get (; 75 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4069,7 +4056,7 @@ if i32.const 0 i32.const 264 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -4078,7 +4065,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/typedarray/isInt8ArrayEqual (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 77 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4126,7 +4113,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 77 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4255,7 +4242,7 @@ i32.const 4 call $~lib/runtime/runtime.register ) - (func $~lib/typedarray/Int32Array#fill (; 78 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#fill (; 79 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -4353,19 +4340,16 @@ end local.get $7 ) - (func $~lib/array/Array~iterate (; 79 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 - global.set $~lib/argc + (func $~lib/array/Array~traverse (; 80 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load - local.get $1 - call_indirect (type $FUNCSIG$vi) + call $~lib/collector/dummy/__ref_mark ) - (func $~lib/array/Array#get:length (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 81 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 81 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 82 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -4374,7 +4358,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 82 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 83 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4384,7 +4368,7 @@ if i32.const 0 i32.const 264 - i32.const 98 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -4393,7 +4377,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/typedarray/isInt32ArrayEqual (; 83 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 84 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4441,12 +4425,12 @@ end i32.const 1 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 84 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 85 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 85 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduce (; 86 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4503,7 +4487,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 86 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 87 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4544,7 +4528,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#__set (; 87 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 88 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4564,12 +4548,12 @@ local.get $2 i32.store8 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 88 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 89 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduce (; 89 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 90 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4626,7 +4610,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 90 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 91 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4665,12 +4649,12 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 91 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 92 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduce (; 92 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduce (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4727,7 +4711,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 93 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 94 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4766,7 +4750,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#__set (; 94 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 95 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4790,12 +4774,12 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 96 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduce (; 96 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduce (; 97 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4852,7 +4836,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 97 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 98 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4893,7 +4877,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#__set (; 98 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 99 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4917,12 +4901,12 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduce (; 100 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduce (; 101 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4979,7 +4963,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 101 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 102 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5018,12 +5002,12 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 102 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduce (; 103 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 104 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5080,7 +5064,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 104 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 105 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5117,7 +5101,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#__set (; 105 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint32Array#__set (; 106 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -5141,12 +5125,12 @@ local.get $2 i32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduce (; 107 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduce (; 108 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5203,7 +5187,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 108 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 109 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5240,7 +5224,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#__set (; 109 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 110 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -5264,12 +5248,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 110 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 111 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 111 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 112 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -5326,7 +5310,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 112 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 113 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5363,7 +5347,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#__set (; 113 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Uint64Array#__set (; 114 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -5387,12 +5371,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 114 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 115 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduce (; 115 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduce (; 116 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -5449,7 +5433,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 116 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 117 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5486,7 +5470,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#__set (; 117 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 118 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -5510,12 +5494,12 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 118 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 119 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 119 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduce (; 120 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -5572,7 +5556,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 120 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 121 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -5609,12 +5593,12 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 121 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 122 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 122 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduce (; 123 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) @@ -5671,7 +5655,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 123 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 124 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -5708,12 +5692,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 124 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 125 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduceRight (; 125 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduceRight (; 126 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5767,7 +5751,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 126 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 127 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5808,12 +5792,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 127 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 128 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 128 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 129 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5867,7 +5851,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 129 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 130 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5906,12 +5890,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 130 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 131 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 132 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5965,7 +5949,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 132 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 133 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6004,12 +5988,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 133 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 134 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduceRight (; 134 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduceRight (; 135 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6063,7 +6047,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 135 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 136 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6104,12 +6088,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 136 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 137 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 138 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6163,7 +6147,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 138 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 139 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6202,12 +6186,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 139 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 140 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduceRight (; 140 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 141 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6261,7 +6245,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 141 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 142 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6298,12 +6282,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 142 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 143 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduceRight (; 143 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduceRight (; 144 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6357,7 +6341,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 144 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 145 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6394,12 +6378,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 145 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 146 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduceRight (; 146 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 147 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -6453,7 +6437,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 147 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 148 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6490,12 +6474,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 148 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 149 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduceRight (; 149 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduceRight (; 150 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -6549,7 +6533,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 150 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 151 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6586,12 +6570,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 151 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 152 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduceRight (; 152 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduceRight (; 153 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -6645,7 +6629,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 153 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 154 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -6682,12 +6666,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 154 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 155 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduceRight (; 155 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduceRight (; 156 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) @@ -6741,7 +6725,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 156 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 157 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -6778,12 +6762,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 157 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 158 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6848,7 +6832,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 159 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 160 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6914,12 +6898,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 160 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 161 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8Array#map (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6984,7 +6968,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint8Array#__get (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__get (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7003,7 +6987,7 @@ i32.add i32.load8_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 163 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 164 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7069,12 +7053,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 164 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 165 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7139,7 +7123,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 166 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 167 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7205,12 +7189,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 167 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 168 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int16Array#map (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7275,7 +7259,7 @@ end local.get $6 ) - (func $~lib/typedarray/Int16Array#__get (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7298,7 +7282,7 @@ i32.add i32.load16_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 170 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 171 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7364,12 +7348,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 171 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 172 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint16Array#map (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7434,7 +7418,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint16Array#__get (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7457,7 +7441,7 @@ i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 174 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 175 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7523,12 +7507,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 175 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 176 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int32Array#map (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7593,7 +7577,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 177 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 178 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7659,12 +7643,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 178 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 179 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint32Array#map (; 179 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7729,7 +7713,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint32Array#__get (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7752,7 +7736,7 @@ i32.add i32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 181 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 182 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7818,12 +7802,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 182 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 183 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 183 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7888,7 +7872,7 @@ end local.get $6 ) - (func $~lib/typedarray/Int64Array#__get (; 184 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 185 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -7911,7 +7895,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 185 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 186 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7977,12 +7961,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 186 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 187 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Uint64Array#map (; 187 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8047,7 +8031,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint64Array#__get (; 188 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__get (; 189 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -8070,7 +8054,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 189 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 190 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8136,12 +8120,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 190 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 191 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8206,7 +8190,7 @@ end local.get $6 ) - (func $~lib/typedarray/Float32Array#__get (; 192 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 193 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -8229,7 +8213,7 @@ i32.add f32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 193 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 194 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8295,12 +8279,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 194 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 195 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 195 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8365,7 +8349,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 196 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 197 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8431,7 +8415,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 197 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 198 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -8440,7 +8424,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 199 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8500,7 +8484,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 199 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 200 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -8509,7 +8493,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 200 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 201 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8563,14 +8547,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 201 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 202 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#some (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 203 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8630,14 +8614,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 203 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 204 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 204 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 205 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8691,14 +8675,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 205 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 206 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#some (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#some (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8758,14 +8742,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 207 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 208 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 208 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 209 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8819,7 +8803,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 209 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 210 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8828,7 +8812,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 210 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 211 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8888,7 +8872,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 211 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 212 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8897,7 +8881,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 212 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 213 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8951,14 +8935,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 213 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 214 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#some (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 215 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9018,14 +9002,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 215 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 216 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 216 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 217 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9079,12 +9063,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 217 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 218 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 218 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 219 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9144,12 +9128,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 219 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 220 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 220 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 221 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9203,12 +9187,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 221 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 222 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#some (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#some (; 223 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9268,12 +9252,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 223 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 224 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 224 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 225 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9327,12 +9311,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 225 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 226 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 227 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9392,12 +9376,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 227 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 228 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 228 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 229 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9451,12 +9435,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 229 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 230 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#some (; 230 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#some (; 231 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9516,12 +9500,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 231 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 232 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 232 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 233 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9575,12 +9559,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 233 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 234 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 234 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 235 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9640,12 +9624,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 235 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 236 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 236 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 237 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9699,12 +9683,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 237 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 238 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 239 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9764,12 +9748,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 239 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 240 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 240 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 241 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9823,7 +9807,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 241 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 242 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9832,7 +9816,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#findIndex (; 242 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 243 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9892,7 +9876,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 243 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 244 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9901,7 +9885,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 244 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 245 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9954,14 +9938,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 245 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 246 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#findIndex (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 247 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10021,14 +10005,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 247 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 248 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 248 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 249 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10081,14 +10065,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 249 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 250 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 251 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10148,14 +10132,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 251 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 252 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 252 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 253 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10208,7 +10192,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 253 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 254 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10217,7 +10201,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#findIndex (; 254 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10277,7 +10261,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 255 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 256 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10286,7 +10270,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 256 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 257 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10339,14 +10323,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 257 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 258 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#findIndex (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10406,14 +10390,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 259 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 260 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 260 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 261 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10466,12 +10450,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 261 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 262 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#findIndex (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 263 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10531,12 +10515,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 263 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 264 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 264 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 265 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10589,12 +10573,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 265 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 266 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#findIndex (; 266 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#findIndex (; 267 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10654,12 +10638,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 267 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 268 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 268 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 269 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10712,12 +10696,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 269 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 270 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#findIndex (; 270 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 271 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10777,12 +10761,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 271 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 272 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 272 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 273 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10835,12 +10819,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 273 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 274 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#findIndex (; 274 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#findIndex (; 275 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10900,12 +10884,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 275 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 276 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 276 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 277 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10958,12 +10942,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 277 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 278 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#findIndex (; 278 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 279 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11023,12 +11007,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 279 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 280 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 280 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 281 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11081,12 +11065,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 281 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 282 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#findIndex (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 283 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11146,12 +11130,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 283 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 284 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 284 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 285 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11204,7 +11188,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 285 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 286 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11215,7 +11199,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int8Array#every (; 286 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 287 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11282,7 +11266,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 287 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 288 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11291,7 +11275,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 288 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 289 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11345,7 +11329,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 289 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 290 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -11354,7 +11338,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8Array#every (; 290 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 291 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11421,14 +11405,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 291 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 292 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 292 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 293 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11482,7 +11466,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 293 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 294 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -11491,7 +11475,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#every (; 294 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#every (; 295 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11558,14 +11542,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 295 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 296 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 296 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 297 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11619,7 +11603,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 297 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 298 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11630,7 +11614,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int16Array#every (; 298 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 299 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11697,7 +11681,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 299 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 300 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11706,7 +11690,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 300 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 301 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11760,7 +11744,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 301 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 302 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and @@ -11769,7 +11753,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint16Array#every (; 302 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 303 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11836,14 +11820,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 303 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 304 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 304 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 305 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11897,14 +11881,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 305 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 306 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.const 0 i32.eq ) - (func $~lib/typedarray/Int32Array#every (; 306 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 307 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11971,12 +11955,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 307 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 308 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 308 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 309 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12030,14 +12014,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 309 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 310 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_u i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint32Array#every (; 310 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#every (; 311 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12104,12 +12088,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 311 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 312 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 312 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 313 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12163,14 +12147,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 313 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 314 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (; 314 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 315 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12237,12 +12221,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 315 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 316 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 316 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 317 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12296,14 +12280,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 317 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 318 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $~lib/typedarray/Uint64Array#every (; 318 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#every (; 319 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12370,12 +12354,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 319 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 320 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 320 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 321 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12429,12 +12413,12 @@ unreachable end ) - (func $~lib/builtins/isNaN (; 321 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 322 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $~lib/math/NativeMathf.mod (; 322 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 323 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12685,14 +12669,14 @@ local.get $2 f32.reinterpret_i32 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 323 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 324 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 324 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 325 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12759,12 +12743,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 325 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 326 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 326 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 327 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12818,12 +12802,12 @@ unreachable end ) - (func $~lib/builtins/isNaN (; 327 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 328 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/math/NativeMath.mod (; 328 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 329 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -13076,14 +13060,14 @@ local.get $2 f64.reinterpret_i64 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 329 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 330 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 330 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 331 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13150,12 +13134,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 331 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 332 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 332 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 333 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13209,7 +13193,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 333 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 334 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13264,7 +13248,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 334 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#forEach (; 335 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13309,7 +13293,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 335 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 336 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13365,7 +13349,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 336 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 337 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13416,7 +13400,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8Array#forEach (; 337 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 338 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13461,7 +13445,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 338 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 339 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13511,7 +13495,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 339 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 340 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13562,7 +13546,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8ClampedArray#forEach (; 340 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#forEach (; 341 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13607,7 +13591,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 341 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 342 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13657,7 +13641,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 342 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 343 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13712,7 +13696,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 343 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#forEach (; 344 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13757,7 +13741,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 344 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 345 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13813,7 +13797,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 345 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 346 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13864,7 +13848,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint16Array#forEach (; 346 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 347 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13909,7 +13893,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 347 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 348 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13959,7 +13943,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 348 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 349 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14006,7 +13990,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 349 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 350 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14051,7 +14035,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 350 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 351 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14095,7 +14079,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 351 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 352 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14142,7 +14126,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint32Array#forEach (; 352 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint32Array#forEach (; 353 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14187,7 +14171,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 353 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 354 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14231,7 +14215,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 354 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 355 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14279,7 +14263,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 355 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 356 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14324,7 +14308,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 356 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 357 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14371,7 +14355,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 357 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 358 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14419,7 +14403,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint64Array#forEach (; 358 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint64Array#forEach (; 359 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14464,7 +14448,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 359 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 360 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14511,7 +14495,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 360 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 361 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14559,7 +14543,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 361 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#forEach (; 362 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14604,7 +14588,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 362 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 363 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14651,7 +14635,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 363 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 364 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14699,7 +14683,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 364 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#forEach (; 365 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14744,7 +14728,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 365 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 366 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14791,7 +14775,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#reverse (; 366 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 367 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14861,7 +14845,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 367 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 368 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15025,7 +15009,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 368 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 369 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15095,7 +15079,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8Array#subarray (; 369 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 370 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15224,7 +15208,7 @@ i32.const 5 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 370 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 371 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15382,7 +15366,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#reverse (; 371 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reverse (; 372 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15452,7 +15436,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 372 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 373 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15581,7 +15565,7 @@ i32.const 6 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 373 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 374 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15739,7 +15723,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 374 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 375 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15809,7 +15793,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int16Array#subarray (; 375 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 376 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15938,7 +15922,7 @@ i32.const 7 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 376 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 377 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16102,7 +16086,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 377 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 378 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16172,7 +16156,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint16Array#subarray (; 378 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 379 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16301,7 +16285,7 @@ i32.const 8 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 379 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 380 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16459,7 +16443,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 380 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 381 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16529,7 +16513,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 381 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 382 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16681,7 +16665,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#reverse (; 382 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reverse (; 383 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16751,7 +16735,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint32Array#subarray (; 383 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 384 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16880,7 +16864,7 @@ i32.const 10 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 384 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 385 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17032,7 +17016,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#reverse (; 385 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 386 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17102,7 +17086,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int64Array#subarray (; 386 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 387 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17231,7 +17215,7 @@ i32.const 11 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 387 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 388 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17386,7 +17370,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#reverse (; 388 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#reverse (; 389 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17456,7 +17440,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint64Array#subarray (; 389 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 390 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17585,7 +17569,7 @@ i32.const 12 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 390 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 391 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17740,7 +17724,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 391 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 392 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17810,7 +17794,7 @@ end local.get $1 ) - (func $~lib/typedarray/Float32Array#subarray (; 392 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 393 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17939,7 +17923,7 @@ i32.const 13 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 393 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 394 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18094,7 +18078,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 394 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 395 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -18164,7 +18148,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 395 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 396 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18319,7 +18303,7 @@ unreachable end ) - (func $start:std/typedarray (; 396 ;) (type $FUNCSIG$v) + (func $start:std/typedarray (; 397 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32.const 1 @@ -19553,9 +19537,9 @@ call $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> call $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> ) - (func $start (; 397 ;) (type $FUNCSIG$v) + (func $start (; 398 ;) (type $FUNCSIG$v) call $start:std/typedarray ) - (func $null (; 398 ;) (type $FUNCSIG$v) + (func $null (; 399 ;) (type $FUNCSIG$v) ) ) From e1bd0050e251d68b7e3534c8793c347c8f6f7517 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 2 Apr 2019 16:18:44 +0200 Subject: [PATCH 084/119] directize more (eliminate table use) --- src/builtins.ts | 130 +- src/compiler.ts | 31 +- src/program.ts | 17 +- std/assembly/array.ts | 5 +- std/assembly/collector/itcm.ts | 54 +- std/assembly/fixedarray.ts | 5 +- std/assembly/map.ts | 9 +- std/assembly/set.ts | 5 +- tests/compiler/assert-nonnull.optimized.wat | 6 +- tests/compiler/assert-nonnull.untouched.wat | 6 +- tests/compiler/class.optimized.wat | 12 +- tests/compiler/class.untouched.wat | 24 +- tests/compiler/constructor.optimized.wat | 386 +--- tests/compiler/constructor.untouched.wat | 478 +---- tests/compiler/gc.optimized.wat | 128 +- tests/compiler/gc.untouched.wat | 127 +- tests/compiler/gc/global-assign.optimized.wat | 19 +- tests/compiler/gc/global-assign.untouched.wat | 25 +- tests/compiler/gc/global-init.optimized.wat | 19 +- tests/compiler/gc/global-init.untouched.wat | 25 +- tests/compiler/gc/itcm/trace.optimized.wat | 1125 +++++----- tests/compiler/gc/itcm/trace.ts | 27 +- tests/compiler/gc/itcm/trace.untouched.wat | 1819 +++++++++-------- tests/compiler/std/array-access.optimized.wat | 6 +- tests/compiler/std/array-access.untouched.wat | 14 +- .../compiler/std/array-literal.optimized.wat | 87 +- .../compiler/std/array-literal.untouched.wat | 180 +- tests/compiler/std/array.optimized.wat | 669 +++--- tests/compiler/std/array.untouched.wat | 1261 ++++-------- tests/compiler/std/map.optimized.wat | 193 +- tests/compiler/std/map.untouched.wat | 377 ++-- .../compiler/std/object-literal.optimized.wat | 32 +- .../compiler/std/object-literal.untouched.wat | 57 +- tests/compiler/std/runtime.optimized.wat | 61 +- tests/compiler/std/runtime.untouched.wat | 87 +- tests/compiler/std/set.optimized.wat | 177 +- tests/compiler/std/set.untouched.wat | 357 ++-- tests/compiler/std/static-array.optimized.wat | 10 +- tests/compiler/std/static-array.untouched.wat | 10 +- tests/compiler/std/string.optimized.wat | 170 +- tests/compiler/std/string.untouched.wat | 233 +-- tests/compiler/std/typedarray.optimized.wat | 798 ++++---- tests/compiler/std/typedarray.untouched.wat | 1112 +++++----- tests/compiler/wasi.optimized.wat | 12 +- tests/compiler/wasi.untouched.wat | 14 +- 45 files changed, 4366 insertions(+), 6033 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index d89be118a9..67c2083a4f 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -3650,9 +3650,7 @@ export function compileCall( ); return module.createUnreachable(); } - let id = classReference.ensureId(compiler); // involves compile steps - compiler.currentType = Type.u32; - return module.createI32(id); + return module.createI32(classReference.ensureId()); } case BuiltinSymbols.gc_mark_roots: { if ( @@ -3666,6 +3664,20 @@ export function compileCall( compiler.currentType = Type.void; return module.createCall(BuiltinSymbols.gc_mark_roots, null, NativeType.None); } + case BuiltinSymbols.gc_mark_members: { + if ( + checkTypeAbsent(typeArguments, reportNode, prototype) | + checkArgsRequired(operands, 2, reportNode, compiler) + ) { + compiler.currentType = Type.void; + return module.createUnreachable(); + } + let arg0 = compiler.compileExpression(operands[0], Type.u32, ConversionKind.IMPLICIT, WrapMode.NONE); + let arg1 = compiler.compileExpression(operands[1], compiler.options.usizeType, ConversionKind.IMPLICIT, WrapMode.NONE); + compiler.needsTraverse = true; + compiler.currentType = Type.void; + return module.createCall(BuiltinSymbols.gc_mark_members, [ arg0, arg1 ], NativeType.None); + } } // try to defer inline asm to a concrete built-in @@ -4101,20 +4113,112 @@ export function compileMarkRoots(compiler: Compiler): void { ); } -// TODO export function compileMarkMembers(compiler: Compiler): void { + var program = compiler.program; var module = compiler.module; - var ftype = compiler.ensureFunctionType(null, Type.void); + var usizeType = program.options.usizeType; + var nativeSizeType = usizeType.toNativeType(); + var nativeSizeSize = usizeType.byteSize; + var ftype = compiler.ensureFunctionType([ Type.i32, usizeType ], Type.void); + var managedClasses = program.managedClasses; + var markRef = assert(program.markRef); + var names: string[] = [ "invalid" ]; // classId=0 is invalid + var blocks = new Array(); + var lastId = 0; - var names = new Array(); - var current = module.createSwitch(names, "invalid", module.createGetLocal(0, NativeType.I32)); + for (let [id, instance] of managedClasses) { + assert(instance.type.isManaged(program)); + assert(id == ++lastId); + names.push(instance.internalName); - module.addFunction(BuiltinSymbols.gc_mark_members, ftype, [], module.createBlock(null, [ - module.createBlock("invalid", [ - current - ]), - module.createUnreachable() - ])); + let traverseImpl = instance.lookupInSelf("__traverse"); + + // if a library element, check if it implements a custom traversal function + if (instance.isDeclaredInLibrary && traverseImpl) { + assert(traverseImpl.kind == ElementKind.FUNCTION_PROTOTYPE); + let traverseFunc = program.resolver.resolveFunction(traverseImpl, null); + if (!traverseFunc || !compiler.compileFunction(traverseFunc)) { + blocks.push([ + module.createUnreachable() + ]); + continue; + } + blocks.push([ + module.createCall(traverseFunc.internalName, [ + module.createGetLocal(1, nativeSizeType) + ], NativeType.None), + module.createReturn() + ]); + + // otherwise generate one + } else { + // traverse references assigned to own fields + let block = new Array(); + let members = instance.members; + if (members) { + for (let member of members.values()) { + if (member.kind == ElementKind.FIELD) { + if ((member).parent === instance) { + let fieldType = (member).type; + if (fieldType.isManaged(program)) { + let fieldClass = fieldType.classReference!; + let fieldClassId = fieldClass.ensureId(); + let fieldOffset = (member).memoryOffset; + assert(fieldOffset >= 0); + block.push( + // if ($2 = value) FIELDCLASS~traverse($2) + module.createIf( + module.createTeeLocal(2, + module.createLoad( + nativeSizeSize, + false, + module.createGetLocal(1, nativeSizeType), + nativeSizeType, + fieldOffset + ) + ), + module.createBlock(null, [ + module.createCall(markRef.internalName, [ + module.createGetLocal(2, nativeSizeType) + ], NativeType.None), + module.createCall(BuiltinSymbols.gc_mark_members, [ + module.createI32(fieldClassId), + module.createGetLocal(2, nativeSizeType) + ], NativeType.None) + ]) + ) + ); + } + } + } + } + } + block.push(module.createReturn()); + blocks.push(block); + } + } + + var current: ExpressionRef; + if (blocks.length) { + // create a big switch mapping class ids to traversal logic + current = module.createBlock(names[1], [ + module.createSwitch(names, "invalid", module.createGetLocal(0, NativeType.I32)) + ]); + for (let i = 0, k = blocks.length; i < k; ++i) { + blocks[i].unshift(current); + current = module.createBlock(i == k - 1 ? "invalid" : names[i + 2], blocks[i]); + } + compiler.compileFunction(markRef); + // wrap the function with a terminating unreachable + current = module.createBlock(null, [ + current, + module.createUnreachable() + ]); + } else { + // simplify + current = module.createUnreachable(); + } + module.addFunction(BuiltinSymbols.gc_mark_members, ftype, [ nativeSizeType ], current); } // Helpers diff --git a/src/compiler.ts b/src/compiler.ts index 32bc079968..6d850d24ed 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -7,6 +7,7 @@ import { compileCall as compileBuiltinCall, compileAbort, compileMarkRoots, + compileMarkMembers, BuiltinSymbols } from "./builtins"; @@ -392,6 +393,12 @@ export class Compiler extends DiagnosticEmitter { if (!explicitStartFunction) module.setStart(funcRef); } + // compile gc integration if necessary + if (this.needsTraverse) { + compileMarkRoots(this); + compileMarkMembers(this); + } + // update the heap base pointer var memoryOffset = this.memoryOffset; memoryOffset = i64_align(memoryOffset, options.usizeType.byteSize); @@ -443,12 +450,6 @@ export class Compiler extends DiagnosticEmitter { if (file.source.isEntry) this.ensureModuleExports(file); } - // set up gc - if (this.needsTraverse) { - compileMarkRoots(this); - // compileMarkMembers(this); - } - // expose module capabilities var capabilities = Capability.NONE; if (program.options.isWasm64) capabilities |= Capability.WASM64; @@ -1412,7 +1413,7 @@ export class Compiler extends DiagnosticEmitter { } else { let length = stringValue.length; let buffer = new Uint8Array(rtHeaderSize + (length << 1)); - program.writeRuntimeHeader(buffer, 0, stringInstance.ensureId(this), length << 1); + program.writeRuntimeHeader(buffer, 0, stringInstance.ensureId(), length << 1); for (let i = 0; i < length; ++i) { writeI16(stringValue.charCodeAt(i), buffer, rtHeaderSize + (i << 1)); } @@ -1438,7 +1439,7 @@ export class Compiler extends DiagnosticEmitter { var runtimeHeaderSize = program.runtimeHeaderSize; var buf = new Uint8Array(runtimeHeaderSize + byteLength); - program.writeRuntimeHeader(buf, 0, bufferInstance.ensureId(this), byteLength); + program.writeRuntimeHeader(buf, 0, bufferInstance.ensureId(), byteLength); var pos = runtimeHeaderSize; var nativeType = elementType.toNativeType(); switch (nativeType) { @@ -1525,7 +1526,7 @@ export class Compiler extends DiagnosticEmitter { var arrayLength = i32(bufferLength / elementType.byteSize); var buf = new Uint8Array(runtimeHeaderSize + arrayInstanceSize); - program.writeRuntimeHeader(buf, 0, arrayInstance.ensureId(this), arrayInstanceSize); + program.writeRuntimeHeader(buf, 0, arrayInstance.ensureId(), arrayInstanceSize); var bufferAddress32 = i64_low(bufferSegment.offset) + runtimeHeaderSize; assert(!program.options.isWasm64); // TODO @@ -6828,7 +6829,7 @@ export class Compiler extends DiagnosticEmitter { // makeArray(length, classId, alignLog2, staticBuffer) let expr = this.makeCallDirect(assert(program.makeArrayInstance), [ module.createI32(length), - module.createI32(arrayInstance.ensureId(this)), + module.createI32(arrayInstance.ensureId()), program.options.isWasm64 ? module.createI64(elementType.alignLog2) : module.createI32(elementType.alignLog2), @@ -6862,7 +6863,7 @@ export class Compiler extends DiagnosticEmitter { module.createSetLocal(tempThis.index, this.makeCallDirect(makeArrayInstance, [ module.createI32(length), - module.createI32(arrayInstance.ensureId(this)), + module.createI32(arrayInstance.ensureId()), program.options.isWasm64 ? module.createI64(elementType.alignLog2) : module.createI32(elementType.alignLog2), @@ -8123,7 +8124,7 @@ export class Compiler extends DiagnosticEmitter { ? module.createI64(classInstance.currentMemoryOffset) : module.createI32(classInstance.currentMemoryOffset) ], reportNode), - module.createI32(classInstance.ensureId(this)) + module.createI32(classInstance.ensureId()) ], reportNode); } } @@ -8328,7 +8329,7 @@ export class Compiler extends DiagnosticEmitter { module.createBreak(label, module.createBinary(BinaryOp.EqI32, // classId == class.id module.createTeeLocal(idTemp.index, idExpr), - module.createI32(classInstance.ensureId(this)) + module.createI32(classInstance.ensureId()) ), module.createI32(1) // ? true ) @@ -8408,7 +8409,7 @@ export class Compiler extends DiagnosticEmitter { var baseInstance = classInstance.base; if (baseInstance) { let baseType = baseInstance.type; - let baseClassId = baseInstance.ensureId(this); + let baseClassId = baseInstance.ensureId(); assert(baseType.isManaged(program)); body.push( // BASECLASS~traverse.call(this) @@ -8429,7 +8430,7 @@ export class Compiler extends DiagnosticEmitter { let fieldType = (member).type; if (fieldType.isManaged(program)) { let fieldClass = fieldType.classReference!; - let fieldClassId = fieldClass.ensureId(this); + let fieldClassId = fieldClass.ensureId(); let fieldOffset = (member).memoryOffset; assert(fieldOffset >= 0); hasRefFields = true; diff --git a/src/program.ts b/src/program.ts index ba34c07190..ab8da777d4 100644 --- a/src/program.ts +++ b/src/program.ts @@ -346,6 +346,8 @@ export class Program extends DiagnosticEmitter { instancesByName: Map = new Map(); /** Classes backing basic types like `i32`. */ typeClasses: Map = new Map(); + /** Managed classes contained in the program, by id. */ + managedClasses: Map = new Map(); // runtime references @@ -3017,22 +3019,13 @@ export class Class extends TypedElement { private _id: u32 = 0; /** Ensures that this class has an id. */ - ensureId(compiler: Compiler): i32 { + ensureId(): i32 { var id = this._id; if (!id) { assert(!this.hasDecorator(DecoratorFlags.UNMANAGED)); let program = this.program; - if (program.collectorKind == CollectorKind.TRACING) { - // tracing GC uses the function index of the iteration function as the - // class's id so it can call the id directly, which avoids to generate - // a helper function with a big switch mapping ids to function indexes. - // here: might be called recursively in makeIterate, so reserve the id. - this._id = id = compiler.makeTraverseReserve(this); - compiler.makeTraverse(this, id); - } else { - // counting GC or none just increments without any iterate functions - this._id = id = program.nextClassId++; - } + this._id = id = program.nextClassId++; + program.managedClasses.set(id, this); } return id; } diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 1f0ad1504f..71cf6bf724 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -7,6 +7,7 @@ import { ArrayBuffer, ArrayBufferView } from "./arraybuffer"; import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number"; import { isArray as builtin_isArray } from "./builtins"; import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_EMPTYARRAY, E_HOLEYARRAY } from "./util/error"; +import { __gc_mark_members } from "./gc"; /** Ensures that the given array has _at least_ the specified capacity. */ function ensureCapacity(array: ArrayBufferView, minCapacity: i32, alignLog2: u32): void { @@ -815,11 +816,11 @@ export class Array extends ArrayBufferView { if (isNullable()) { if (val) { __ref_mark(val); - call_direct(__runtime_id(), val); + __gc_mark_members(__runtime_id(), val); } } else { __ref_mark(val); - call_direct(__runtime_id(), val); + __gc_mark_members(__runtime_id(), val); } cur += sizeof(); } diff --git a/std/assembly/collector/itcm.ts b/std/assembly/collector/itcm.ts index da3db06c02..a7704ef97c 100644 --- a/std/assembly/collector/itcm.ts +++ b/std/assembly/collector/itcm.ts @@ -133,27 +133,30 @@ var iter: ManagedObject; } } +function maybeInit(): void { + if (state == State.INIT) { + if (TRACE) trace("itcm~init"); + fromSpace = changetype(memory.allocate(HEADER_SIZE)); + if (TRACE) trace(" fromSpace =", 1, objToRef(fromSpace)); + fromSpace.classId = -1; // would error + fromSpace.payloadSize = 0; + fromSpace.clear(); + toSpace = changetype(memory.allocate(HEADER_SIZE)); + if (TRACE) trace(" toSpace =", 1, objToRef(toSpace)); + toSpace.classId = -1; // would error + toSpace.payloadSize = 0; + toSpace.clear(); + iter = toSpace; + state = State.IDLE; + if (TRACE) trace("itcm~state = IDLE"); + } +} + /** Performs a single step according to the current state. */ function step(): void { var obj: ManagedObject; switch (state) { - case State.INIT: { - if (TRACE) trace("itcm~step/INIT"); - fromSpace = changetype(memory.allocate(HEADER_SIZE)); - if (TRACE) trace(" fromSpace =", 1, objToRef(fromSpace)); - fromSpace.classId = -1; // would error - fromSpace.payloadSize = 0; - fromSpace.clear(); - toSpace = changetype(memory.allocate(HEADER_SIZE)); - if (TRACE) trace(" toSpace =", 1, objToRef(toSpace)); - toSpace.classId = -1; // would error - toSpace.payloadSize = 0; - toSpace.clear(); - iter = toSpace; - state = State.IDLE; - if (TRACE) trace("itcm~state = IDLE"); - // fall-through - } + case State.INIT: unreachable(); case State.IDLE: { if (TRACE) trace("itcm~step/IDLE"); __gc_mark_roots(); @@ -167,8 +170,7 @@ function step(): void { if (TRACE) trace("itcm~step/MARK", 1, objToRef(obj)); iter = obj; obj.color = i32(!white); - // TODO: directize through __gc_mark_members - call_indirect(obj.classId, objToRef(obj)); // CLASS~traverse(ref) + __gc_mark_members(obj.classId, objToRef(obj)); } else { __gc_mark_roots(); if (TRACE) trace("itcm~step/MARK finish"); @@ -220,20 +222,18 @@ function objToRef(obj: ManagedObject): usize { @global @unsafe export function __ref_collect(): void { if (TRACE) trace("itcm.collect"); - // begin collecting if not yet collecting - switch (state) { - case State.INIT: - case State.IDLE: step(); - } - // finish the cycle + maybeInit(); + // finish the current state while (state != State.IDLE) step(); + // perform a full cycle + do step(); while (state != State.IDLE); } // @ts-ignore: decorator @global @unsafe export function __ref_register(ref: usize): void { if (TRACE) trace("itcm.register", 1, ref); - step(); // also makes sure it's initialized + maybeInit(); var obj = refToObj(ref); obj.color = white; fromSpace.push(obj); // sets gc-reserved header fields @@ -243,6 +243,7 @@ export function __ref_register(ref: usize): void { @global @unsafe export function __ref_link(ref: usize, parentRef: usize): void { if (TRACE) trace("itcm.link", 2, ref, parentRef); + maybeInit(); var parent = refToObj(parentRef); if (parent.color == i32(!white) && refToObj(ref).color == white) parent.makeGray(); } @@ -251,6 +252,7 @@ export function __ref_link(ref: usize, parentRef: usize): void { @global @unsafe export function __ref_mark(ref: usize): void { if (TRACE) trace("itcm.mark", 1, ref); + maybeInit(); var obj = refToObj(ref); if (obj.color == white) obj.makeGray(); } diff --git a/std/assembly/fixedarray.ts b/std/assembly/fixedarray.ts index 0553bb493f..0602b2eb69 100644 --- a/std/assembly/fixedarray.ts +++ b/std/assembly/fixedarray.ts @@ -1,6 +1,7 @@ import { HEADER, HEADER_SIZE, MAX_BYTELENGTH } from "./util/runtime"; import { runtime, __runtime_id } from "./runtime"; import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_HOLEYARRAY } from "./util/error"; +import { __gc_mark_members } from "./gc"; // NOTE: DO NOT USE YET! @@ -81,11 +82,11 @@ export class FixedArray { if (isNullable()) { if (val) { __ref_mark(val); - call_direct(__runtime_id(), val); + __gc_mark_members(__runtime_id(), val); } } else { __ref_mark(val); - call_direct(__runtime_id(), val); + __gc_mark_members(__runtime_id(), val); } cur += sizeof(); } diff --git a/std/assembly/map.ts b/std/assembly/map.ts index 01f1a1e6c5..732ded47aa 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -2,6 +2,7 @@ import { HASH } from "./util/hash"; import { __runtime_id } from "./runtime"; +import { __gc_mark_members } from "./gc"; // A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht @@ -283,11 +284,11 @@ export class Map { if (isNullable()) { if (val) { __ref_mark(val); - call_direct(__runtime_id(), val); + __gc_mark_members(__runtime_id(), val); } } else { __ref_mark(val); - call_direct(__runtime_id(), val); + __gc_mark_members(__runtime_id(), val); } } if (isManaged()) { @@ -295,11 +296,11 @@ export class Map { if (isNullable()) { if (val) { __ref_mark(val); - call_direct(__runtime_id(), val); + __gc_mark_members(__runtime_id(), val); } } else { __ref_mark(val); - call_direct(__runtime_id(), val); + __gc_mark_members(__runtime_id(), val); } } } diff --git a/std/assembly/set.ts b/std/assembly/set.ts index 8cba7dc4b3..5ac8546353 100644 --- a/std/assembly/set.ts +++ b/std/assembly/set.ts @@ -2,6 +2,7 @@ import { HASH } from "./util/hash"; import { __runtime_id } from "./runtime"; +import { __gc_mark_members } from "./gc"; // A deterministic hash set based on CloseTable from https://github.com/jorendorff/dht @@ -212,11 +213,11 @@ export class Set { if (isNullable()) { if (val) { __ref_mark(val); - call_direct(__runtime_id(), val); + __gc_mark_members(__runtime_id(), val); } } else { __ref_mark(val); - call_direct(__runtime_id(), val); + __gc_mark_members(__runtime_id(), val); } } cur += ENTRY_SIZE(); diff --git a/tests/compiler/assert-nonnull.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat index 91afd2e4b4..fb3865de3f 100644 --- a/tests/compiler/assert-nonnull.optimized.wat +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -58,7 +58,7 @@ if i32.const 0 i32.const 16 - i32.const 96 + i32.const 97 i32.const 45 call $~lib/env/abort unreachable @@ -72,7 +72,7 @@ if i32.const 0 i32.const 16 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/assert-nonnull.untouched.wat b/tests/compiler/assert-nonnull.untouched.wat index 21c264d2ac..812bb4a931 100644 --- a/tests/compiler/assert-nonnull.untouched.wat +++ b/tests/compiler/assert-nonnull.untouched.wat @@ -74,7 +74,7 @@ if i32.const 0 i32.const 16 - i32.const 96 + i32.const 97 i32.const 45 call $~lib/env/abort unreachable @@ -88,7 +88,7 @@ if i32.const 0 i32.const 16 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -128,7 +128,7 @@ if i32.const 0 i32.const 16 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index 5481e7b5ef..62d6025243 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -1,21 +1,17 @@ (module - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\10") (data (i32.const 24) "c\00l\00a\00s\00s\00.\00t\00s") - (table $0 2 funcref) - (elem (i32.const 0) $start $~lib/string/String~traverse) + (table $0 1 funcref) + (elem (i32.const 0) $start) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $class/test)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/string/String~traverse (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $class/test (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $class/test (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load drop @@ -36,7 +32,7 @@ i32.store8 offset=6 local.get $0 ) - (func $start (; 2 ;) (type $FUNCSIG$v) + (func $start (; 1 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/class.untouched.wat b/tests/compiler/class.untouched.wat index 24c686ea0e..183f889b62 100644 --- a/tests/compiler/class.untouched.wat +++ b/tests/compiler/class.untouched.wat @@ -1,6 +1,5 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$fff (func (param f32 f32) (result f32))) (type $FUNCSIG$v (func)) @@ -10,8 +9,8 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00c\00l\00a\00s\00s\00.\00t\00s\00") - (table $0 2 funcref) - (elem (i32.const 0) $null $~lib/string/String~traverse) + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $class/Animal.ONE (mut i32) (i32.const 1)) (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) (global $~lib/capabilities i32 (i32.const 2)) @@ -20,17 +19,14 @@ (export "test" (func $class/test)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/string/String~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $class/Animal.add (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $class/Animal.add (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.add global.get $class/Animal.ONE i32.add ) - (func $class/Animal.sub (; 3 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $class/Animal.sub (; 2 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 f32.sub @@ -38,7 +34,7 @@ f32.convert_i32_s f32.add ) - (func $start:class (; 4 ;) (type $FUNCSIG$v) + (func $start:class (; 3 ;) (type $FUNCSIG$v) i32.const 4 i32.const 4 i32.eq @@ -62,14 +58,14 @@ call $class/Animal.sub drop ) - (func $class/Animal#instanceAdd (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $class/Animal#instanceAdd (; 4 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 local.get $2 i32.add global.get $class/Animal.ONE i32.add ) - (func $class/Animal#instanceSub (; 6 ;) (type $FUNCSIG$fiff) (param $0 i32) (param $1 f32) (param $2 f32) (result f32) + (func $class/Animal#instanceSub (; 5 ;) (type $FUNCSIG$fiff) (param $0 i32) (param $1 f32) (param $2 f32) (result f32) local.get $1 local.get $2 f32.sub @@ -77,7 +73,7 @@ f32.convert_i32_s f32.add ) - (func $class/test (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $class/test (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -122,9 +118,9 @@ local.set $2 local.get $2 ) - (func $start (; 8 ;) (type $FUNCSIG$v) + (func $start (; 7 ;) (type $FUNCSIG$v) call $start:class ) - (func $null (; 9 ;) (type $FUNCSIG$v) + (func $null (; 8 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index 73a58d4b46..a7e4828156 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -3,9 +3,9 @@ (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -14,8 +14,8 @@ (data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") (data (i32.const 72) "\01\00\00\00\1e") (data (i32.const 88) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (table $0 11 funcref) - (elem (i32.const 0) $null $~lib/string/String~traverse $~lib/string/String~traverse $~lib/string/String~traverse $~lib/string/String~traverse $~lib/string/String~traverse $~lib/string/String~traverse $~lib/string/String~traverse $~lib/string/String~traverse $~lib/string/String~traverse $~lib/string/String~traverse) + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) @@ -38,10 +38,7 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/string/String~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 1 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.const 22 i32.ge_u @@ -61,7 +58,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 2 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 22 i32.ge_u @@ -96,7 +93,7 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Block#get:right (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const -4 @@ -130,7 +127,7 @@ end local.get $0 ) - (func $~lib/allocator/tlsf/fls (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -146,7 +143,7 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -180,7 +177,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -199,7 +196,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -328,7 +325,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const 2 @@ -358,7 +355,7 @@ end local.get $0 ) - (func $~lib/allocator/tlsf/Root#setJump (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 i32.load i32.const 1 @@ -403,7 +400,7 @@ local.get $0 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -633,7 +630,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -756,7 +753,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#insert ) - (func $~lib/allocator/tlsf/ffs (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -770,7 +767,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -882,7 +879,7 @@ end end ) - (func $~lib/allocator/tlsf/Root#use (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -993,7 +990,7 @@ i32.const 8 i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1163,7 +1160,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/runtime.allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -1190,185 +1187,50 @@ i32.const 16 i32.add ) - (func $~lib/allocator/tlsf/__mem_free (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.tee $1 - if - local.get $0 - i32.const 8 - i32.sub - local.tee $2 - i32.load - local.tee $3 - i32.const 1 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - i32.const 1 - i32.or - i32.store - local.get $1 - local.get $0 - i32.const 8 - i32.sub - call $~lib/allocator/tlsf/Root#insert - end - end - ) - (func $~lib/collector/itcm/step (; 19 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/maybeInit (; 17 ;) (type $FUNCSIG$v) (local $0 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - if - local.get $0 - i32.const 1 - i32.sub - br_table $case1|0 $case2|0 $case3|0 $break|0 - end - i32.const 16 - call $~lib/allocator/tlsf/__mem_allocate - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - local.tee $0 - i32.const -1 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - i32.const 16 - call $~lib/allocator/tlsf/__mem_allocate - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - local.tee $0 - i32.const -1 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - call $~lib/gc/__gc_mark_roots - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - end - global.get $~lib/collector/itcm/iter - i32.load offset=8 - i32.const -4 - i32.and - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - i32.or - i32.store offset=8 - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - call_indirect (type $FUNCSIG$vi) - else - call $~lib/gc/__gc_mark_roots - global.get $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/iter - i32.load offset=8 - i32.const -4 - i32.and - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $0 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $0 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - end - global.get $~lib/collector/itcm/iter + global.get $~lib/collector/itcm/state + i32.eqz + if + i32.const 16 + call $~lib/allocator/tlsf/__mem_allocate + global.set $~lib/collector/itcm/fromSpace + global.get $~lib/collector/itcm/fromSpace local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + i32.const 16 + call $~lib/allocator/tlsf/__mem_allocate + global.set $~lib/collector/itcm/toSpace global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - local.get $0 - i32.const 120 - i32.ge_u - if - local.get $0 - call $~lib/allocator/tlsf/__mem_free - end - else - global.get $~lib/collector/itcm/toSpace - local.tee $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - i32.const 1 - global.set $~lib/collector/itcm/state - end + local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter + i32.const 1 + global.set $~lib/collector/itcm/state end ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -1396,8 +1258,8 @@ local.get $1 i32.store offset=12 ) - (func $~lib/collector/itcm/__ref_register (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) - call $~lib/collector/itcm/step + (func $~lib/collector/itcm/__ref_register (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + call $~lib/collector/itcm/maybeInit local.get $0 i32.const 16 i32.sub @@ -1413,7 +1275,7 @@ local.get $0 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/runtime.register (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 120 @@ -1450,7 +1312,7 @@ end local.get $0 ) - (func $constructor/CtorConditionallyAllocates#constructor (; 23 ;) (type $FUNCSIG$i) (result i32) + (func $constructor/CtorConditionallyAllocates#constructor (; 21 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) block (result i32) global.get $constructor/b @@ -1473,7 +1335,7 @@ end local.get $0 ) - (func $start:constructor (; 24 ;) (type $FUNCSIG$v) + (func $start:constructor (; 22 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $~lib/runtime/runtime.allocate @@ -1545,128 +1407,10 @@ call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates ) - (func $start (; 25 ;) (type $FUNCSIG$v) + (func $start (; 23 ;) (type $FUNCSIG$v) call $start:constructor ) - (func $null (; 26 ;) (type $FUNCSIG$v) + (func $null (; 24 ;) (type $FUNCSIG$v) nop ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/collector/itcm/iter - local.get $0 - i32.eq - if - local.get $0 - i32.load offset=12 - global.set $~lib/collector/itcm/iter - end - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.load offset=12 - local.tee $1 - i32.store offset=12 - local.get $1 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.and - local.get $2 - i32.or - i32.store offset=8 - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - i32.const 2 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/__ref_mark (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/gc/__gc_mark_roots (; 29 ;) (type $FUNCSIG$v) - (local $0 i32) - global.get $constructor/emptyCtor - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/emptyCtorWithFieldInit - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/emptyCtorWithFieldNoInit - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/none - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/justFieldInit - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/justFieldNoInit - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/ctorReturns - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/ctorConditionallyReturns - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/ctorAllocates - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/ctorConditionallyAllocates - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - ) ) diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index cfec0087ef..e3ffc96318 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -3,16 +3,16 @@ (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") (data (i32.const 72) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (table $0 11 funcref) - (elem (i32.const 0) $null $~lib/string/String~traverse $constructor/EmptyCtor~traverse $constructor/EmptyCtorWithFieldInit~traverse $constructor/EmptyCtorWithFieldNoInit~traverse $constructor/None~traverse $constructor/JustFieldInit~traverse $constructor/JustFieldNoInit~traverse $constructor/CtorConditionallyReturns~traverse $constructor/CtorAllocates~traverse $constructor/CtorConditionallyAllocates~traverse) + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) @@ -72,10 +72,7 @@ local.get $1 i32.store offset=2912 ) - (func $~lib/string/String~traverse (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -96,7 +93,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 5 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 4 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -133,11 +130,11 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Root#get:tailRef (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.load offset=2912 ) - (func $~lib/allocator/tlsf/Block#get:right (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -177,7 +174,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/fls (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -195,7 +192,7 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -231,7 +228,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -251,7 +248,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -396,7 +393,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -428,7 +425,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/Root#setJump (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.load global.get $~lib/allocator/tlsf/FREE @@ -474,7 +471,7 @@ local.get $1 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -740,7 +737,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -893,7 +890,7 @@ call $~lib/allocator/tlsf/Root#insert i32.const 1 ) - (func $~lib/allocator/tlsf/ffs (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -909,7 +906,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/ffs (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -925,7 +922,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1066,7 +1063,7 @@ end local.get $6 ) - (func $~lib/allocator/tlsf/Root#use (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1194,7 +1191,7 @@ global.get $~lib/allocator/tlsf/Block.INFO i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1430,12 +1427,12 @@ local.get $0 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/memory/memory.allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/runtime.adjust @@ -1457,10 +1454,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $constructor/EmptyCtor~traverse (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $~lib/collector/itcm/ManagedObjectList#clear (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.store offset=8 @@ -1468,15 +1462,40 @@ local.get $0 i32.store offset=12 ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 - i32.const 3 - i32.const -1 - i32.xor - i32.and + (func $~lib/collector/itcm/maybeInit (; 23 ;) (type $FUNCSIG$v) + global.get $~lib/collector/itcm/state + i32.const 0 + i32.eq + if + global.get $~lib/util/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/fromSpace + global.get $~lib/collector/itcm/fromSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/fromSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/fromSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/util/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/toSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/toSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter + i32.const 1 + global.set $~lib/collector/itcm/state + end ) - (func $~lib/collector/itcm/ManagedObject#set:color (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#set:color (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $0 i32.load offset=8 @@ -1488,203 +1507,7 @@ i32.or i32.store offset=8 ) - (func $~lib/allocator/tlsf/__mem_free (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.set $1 - local.get $1 - if - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.set $2 - local.get $2 - i32.load - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.or - i32.store - local.get $1 - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - call $~lib/allocator/tlsf/Root#insert - end - end - ) - (func $~lib/memory/memory.free (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - call $~lib/allocator/tlsf/__mem_free - ) - (func $~lib/collector/itcm/step (; 29 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - block $case0|0 - global.get $~lib/collector/itcm/state - local.set $1 - local.get $1 - i32.const 0 - i32.eq - br_if $case0|0 - local.get $1 - i32.const 1 - i32.eq - br_if $case1|0 - local.get $1 - i32.const 2 - i32.eq - br_if $case2|0 - local.get $1 - i32.const 3 - i32.eq - br_if $case3|0 - br $break|0 - end - block - global.get $~lib/util/runtime/HEADER_SIZE - call $~lib/memory/memory.allocate - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - i32.const -1 - i32.store - global.get $~lib/collector/itcm/fromSpace - i32.const 0 - i32.store offset=4 - global.get $~lib/collector/itcm/fromSpace - call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/util/runtime/HEADER_SIZE - call $~lib/memory/memory.allocate - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - i32.const -1 - i32.store - global.get $~lib/collector/itcm/toSpace - i32.const 0 - i32.store offset=4 - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - end - block - call $~lib/gc/__gc_mark_roots - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - call $~lib/collector/itcm/ManagedObject#set:color - block $~lib/collector/itcm/objToRef|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - end - local.get $0 - i32.load - call_indirect (type $FUNCSIG$vi) - else - call $~lib/gc/__gc_mark_roots - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $1 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $1 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $1 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.ge_u - if - local.get $0 - call $~lib/memory/memory.free - end - else - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - i32.const 1 - global.set $~lib/collector/itcm/state - end - br $break|0 - unreachable - end - unreachable - end - ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#set:next (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 local.get $0 @@ -1694,7 +1517,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -1712,10 +1535,10 @@ local.get $1 i32.store offset=12 ) - (func $~lib/collector/itcm/__ref_register (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_register (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) - call $~lib/collector/itcm/step + call $~lib/collector/itcm/maybeInit block $~lib/collector/itcm/refToObj|inlined.0 (result i32) local.get $0 local.set $1 @@ -1731,7 +1554,7 @@ local.get $2 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/runtime.register (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -1769,7 +1592,7 @@ call $~lib/collector/itcm/__ref_register local.get $0 ) - (func $constructor/EmptyCtor#constructor (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtor#constructor (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -1781,10 +1604,7 @@ end local.get $0 ) - (func $constructor/EmptyCtorWithFieldInit~traverse (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $constructor/EmptyCtorWithFieldInit#constructor (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtorWithFieldInit#constructor (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -1799,10 +1619,7 @@ i32.store local.get $0 ) - (func $constructor/EmptyCtorWithFieldNoInit~traverse (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -1817,9 +1634,7 @@ i32.store local.get $0 ) - (func $constructor/None~traverse (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) - ) - (func $constructor/None#constructor (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/None#constructor (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -1831,10 +1646,7 @@ end local.get $0 ) - (func $constructor/JustFieldInit~traverse (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $constructor/JustFieldInit#constructor (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/JustFieldInit#constructor (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -1849,10 +1661,7 @@ i32.store local.get $0 ) - (func $constructor/JustFieldNoInit~traverse (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $constructor/JustFieldNoInit#constructor (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/JustFieldNoInit#constructor (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -1867,14 +1676,11 @@ i32.store local.get $0 ) - (func $constructor/CtorReturns#constructor (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorReturns#constructor (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 call $~lib/memory/memory.allocate ) - (func $constructor/CtorConditionallyReturns~traverse (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $constructor/CtorConditionallyReturns#constructor (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorConditionallyReturns#constructor (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) global.get $constructor/b if i32.const 0 @@ -1892,10 +1698,7 @@ end local.get $0 ) - (func $constructor/CtorAllocates~traverse (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $constructor/CtorAllocates#constructor (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorAllocates#constructor (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -1911,10 +1714,7 @@ drop local.get $0 ) - (func $constructor/CtorConditionallyAllocates~traverse (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $constructor/CtorConditionallyAllocates#constructor (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorConditionallyAllocates#constructor (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) global.get $constructor/b if block (result i32) @@ -1942,7 +1742,7 @@ end local.get $0 ) - (func $start:constructor (; 52 ;) (type $FUNCSIG$v) + (func $start:constructor (; 39 ;) (type $FUNCSIG$v) i32.const 0 call $constructor/EmptyCtor#constructor global.set $constructor/emptyCtor @@ -1974,139 +1774,9 @@ call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates ) - (func $start (; 53 ;) (type $FUNCSIG$v) + (func $start (; 40 ;) (type $FUNCSIG$v) call $start:constructor ) - (func $null (; 54 ;) (type $FUNCSIG$v) - ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 - i32.const 3 - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - local.set $1 - local.get $0 - i32.load offset=12 - local.set $2 - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 57 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/collector/itcm/iter - i32.eq - if - local.get $0 - i32.load offset=12 - global.set $~lib/collector/itcm/iter - end - local.get $0 - call $~lib/collector/itcm/ManagedObject#unlink - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 2 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/__ref_mark (; 58 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - block $~lib/collector/itcm/refToObj|inlined.1 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - end - local.set $2 - local.get $2 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/gc/__gc_mark_roots (; 59 ;) (type $FUNCSIG$v) - (local $0 i32) - global.get $constructor/emptyCtor - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/emptyCtorWithFieldInit - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/emptyCtorWithFieldNoInit - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/none - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/justFieldInit - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/justFieldNoInit - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/ctorReturns - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/ctorConditionallyReturns - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/ctorAllocates - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/ctorConditionallyAllocates - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end + (func $null (; 41 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/gc.optimized.wat b/tests/compiler/gc.optimized.wat index 276fd14ac9..97439e5fc3 100644 --- a/tests/compiler/gc.optimized.wat +++ b/tests/compiler/gc.optimized.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) @@ -19,18 +19,16 @@ (data (i32.const 72) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") (data (i32.const 96) "\02\00\00\00\n") (data (i32.const 112) "g\00c\00.\00t\00s") - (data (i32.const 128) "\02\00\00\00\0e") - (data (i32.const 144) "g\00c\00.\00m\00a\00r\00k") - (data (i32.const 160) "\02\00\00\00&") - (data (i32.const 176) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 216) "\02\00\00\00\0e") - (data (i32.const 232) "g\00c\00.\00l\00i\00n\00k") - (data (i32.const 248) "\02\00\00\00\12") - (data (i32.const 264) "g\00c\00.\00u\00n\00l\00i\00n\00k") - (data (i32.const 288) "\02\00\00\00\14") - (data (i32.const 304) "g\00c\00.\00c\00o\00l\00l\00e\00c\00t") - (table $0 6 funcref) - (elem (i32.const 0) $null $gc/Ref~traverse $gc/Ref~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $gc/Ref~traverse) + (data (i32.const 128) "\02\00\00\00&") + (data (i32.const 144) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 184) "\02\00\00\00\0e") + (data (i32.const 200) "g\00c\00.\00l\00i\00n\00k") + (data (i32.const 216) "\02\00\00\00\12") + (data (i32.const 232) "g\00c\00.\00u\00n\00l\00i\00n\00k") + (data (i32.const 256) "\02\00\00\00\14") + (data (i32.const 272) "g\00c\00.\00c\00o\00l\00l\00e\00c\00t") + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) @@ -40,8 +38,6 @@ (global $gc/_dummy/unlink_count (mut i32) (i32.const 0)) (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) (global $gc/_dummy/unlink_parentRef (mut i32) (i32.const 0)) - (global $gc/_dummy/mark_count (mut i32) (i32.const 0)) - (global $gc/_dummy/mark_ref (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/gc/gc.implemented i32 (i32.const 1)) @@ -163,10 +159,7 @@ i32.const 16 i32.add ) - (func $gc/Ref~traverse (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 i32.const 1 local.get $0 @@ -183,10 +176,10 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 324 + i32.const 292 i32.le_u if i32.const 0 @@ -218,32 +211,7 @@ call $gc/_dummy/__ref_register local.get $0 ) - (func $gc/_dummy/__ref_mark (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 144 - i32.const 1 - local.get $0 - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - global.get $gc/_dummy/mark_count - i32.const 1 - i32.add - global.set $gc/_dummy/mark_count - local.get $0 - global.set $gc/_dummy/mark_ref - ) - (func $~lib/set/Set~traverse (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - call $gc/_dummy/__ref_mark - local.get $0 - i32.load offset=8 - call $gc/_dummy/__ref_mark - ) - (func $~lib/memory/memory.fill (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -454,14 +422,14 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 11 ;) (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.get $0 i32.const 1073741808 i32.gt_u if i32.const 0 - i32.const 176 + i32.const 144 i32.const 54 i32.const 43 call $~lib/env/abort @@ -473,11 +441,11 @@ local.get $0 call $~lib/memory/memory.fill local.get $1 - i32.const 5 + i32.const 4 call $~lib/runtime/runtime.register ) - (func $gc/_dummy/__ref_link (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 232 + (func $gc/_dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 200 i32.const 2 local.get $0 f64.convert_i32_u @@ -496,8 +464,8 @@ local.get $0 global.set $gc/_dummy/link_parentRef ) - (func $gc/_dummy/__ref_unlink (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 264 + (func $gc/_dummy/__ref_unlink (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 232 i32.const 2 local.get $0 f64.convert_i32_u @@ -516,7 +484,7 @@ local.get $1 global.set $gc/_dummy/unlink_parentRef ) - (func $~lib/set/Set#clear (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -579,7 +547,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 15 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 12 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate @@ -607,7 +575,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -638,7 +606,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -681,7 +649,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -690,7 +658,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -825,7 +793,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -908,7 +876,7 @@ i32.store end ) - (func $~lib/gc/gc.retain (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/gc/gc.retain (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) global.get $~lib/gc/ROOT local.tee $1 @@ -924,7 +892,7 @@ call $gc/_dummy/__ref_link end ) - (func $~lib/set/Set#delete (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -984,7 +952,7 @@ call $~lib/set/Set#rehash end ) - (func $~lib/gc/gc.release (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/gc/gc.release (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) global.get $~lib/gc/ROOT local.tee $1 @@ -999,8 +967,8 @@ call $gc/_dummy/__ref_unlink end ) - (func $~lib/gc/gc.collect (; 24 ;) (type $FUNCSIG$v) - i32.const 304 + (func $~lib/gc/gc.collect (; 21 ;) (type $FUNCSIG$v) + i32.const 272 i32.const 0 f64.const 0 f64.const 0 @@ -1013,7 +981,7 @@ i32.add global.set $gc/_dummy/collect_count ) - (func $gc/main (; 25 ;) (type $FUNCSIG$v) + (func $gc/main (; 22 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1021,7 +989,7 @@ global.get $~lib/started i32.eqz if - i32.const 328 + i32.const 296 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -1164,7 +1132,7 @@ unreachable end ) - (func $~lib/util/memory/memcpy (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2011,7 +1979,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2205,7 +2173,7 @@ end end ) - (func $~lib/runtime/runtime.reallocate (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2239,7 +2207,7 @@ i32.shl i32.const 0 local.get $0 - i32.const 324 + i32.const 292 i32.gt_u select local.get $3 @@ -2277,7 +2245,7 @@ i32.eq if local.get $0 - i32.const 324 + i32.const 292 i32.le_u if i32.const 0 @@ -2310,9 +2278,9 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/runtime.discard (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 324 + i32.const 292 i32.le_u if i32.const 0 @@ -2337,7 +2305,7 @@ unreachable end ) - (func $~lib/runtime/runtime.makeArray (; 30 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 27 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2353,7 +2321,7 @@ i32.shl local.tee $6 call $~lib/runtime/runtime.allocate - i32.const 5 + i32.const 4 call $~lib/runtime/runtime.register local.tee $7 local.tee $1 @@ -2393,10 +2361,10 @@ end local.get $4 ) - (func $null (; 31 ;) (type $FUNCSIG$v) + (func $null (; 28 ;) (type $FUNCSIG$v) nop ) - (func $~lib/runtime/runtime.makeArray|trampoline (; 32 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray|trampoline (; 29 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2416,7 +2384,7 @@ local.get $3 call $~lib/runtime/runtime.makeArray ) - (func $~lib/setargc (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) diff --git a/tests/compiler/gc.untouched.wat b/tests/compiler/gc.untouched.wat index 2010adb510..2a592269b7 100644 --- a/tests/compiler/gc.untouched.wat +++ b/tests/compiler/gc.untouched.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) @@ -15,13 +15,12 @@ (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 56) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") (data (i32.const 96) "\02\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00t\00s\00") - (data (i32.const 128) "\02\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00m\00a\00r\00k\00") - (data (i32.const 160) "\02\00\00\00&\00\00\00\00\00\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) "\02\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00l\00i\00n\00k\00") - (data (i32.const 248) "\02\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00u\00n\00l\00i\00n\00k\00") - (data (i32.const 288) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00c\00o\00l\00l\00e\00c\00t\00") - (table $0 6 funcref) - (elem (i32.const 0) $null $gc/Ref~traverse $~lib/string/String~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/arraybuffer/ArrayBuffer~traverse) + (data (i32.const 128) "\02\00\00\00&\00\00\00\00\00\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 184) "\02\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00l\00i\00n\00k\00") + (data (i32.const 216) "\02\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00u\00n\00l\00i\00n\00k\00") + (data (i32.const 256) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00c\00o\00l\00l\00e\00c\00t\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) @@ -42,7 +41,7 @@ (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/gc/ROOT (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 324)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 292)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) @@ -178,12 +177,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $gc/Ref~traverse (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - ) - (func $~lib/string/String~traverse (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $gc/_dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 i32.const 1 local.get $0 @@ -200,7 +194,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/runtime.register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -238,7 +232,7 @@ call $gc/_dummy/__ref_register local.get $0 ) - (func $gc/Ref#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $gc/Ref#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -250,35 +244,7 @@ end local.get $0 ) - (func $gc/_dummy/__ref_mark (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 144 - i32.const 1 - local.get $0 - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - global.get $gc/_dummy/mark_count - i32.const 1 - i32.add - global.set $gc/_dummy/mark_count - local.get $0 - global.set $gc/_dummy/mark_ref - ) - (func $~lib/set/Set~traverse (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $gc/_dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $gc/_dummy/__ref_mark - ) - (func $~lib/memory/memory.fill (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -535,17 +501,14 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer~traverse (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 global.get $~lib/util/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 - i32.const 176 + i32.const 144 i32.const 54 i32.const 43 call $~lib/env/abort @@ -559,11 +522,11 @@ local.get $1 call $~lib/memory/memory.fill local.get $2 - i32.const 5 + i32.const 4 call $~lib/runtime/runtime.register ) - (func $gc/_dummy/__ref_link (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 232 + (func $gc/_dummy/__ref_link (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 200 i32.const 2 local.get $0 f64.convert_i32_u @@ -582,8 +545,8 @@ local.get $0 global.set $gc/_dummy/link_parentRef ) - (func $gc/_dummy/__ref_unlink (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 264 + (func $gc/_dummy/__ref_unlink (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 232 i32.const 2 local.get $0 f64.convert_i32_u @@ -602,7 +565,7 @@ local.get $1 global.set $gc/_dummy/unlink_parentRef ) - (func $~lib/set/Set#clear (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -671,7 +634,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -705,7 +668,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -747,7 +710,7 @@ local.set $1 local.get $1 ) - (func $~lib/set/Set#find (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -798,7 +761,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -813,7 +776,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -983,7 +946,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1081,7 +1044,7 @@ i32.store end ) - (func $~lib/gc/gc.retain (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/gc/gc.retain (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) global.get $~lib/gc/ROOT local.set $1 @@ -1098,7 +1061,7 @@ call $gc/_dummy/__ref_link end ) - (func $~lib/set/Set#delete (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1171,7 +1134,7 @@ end i32.const 1 ) - (func $~lib/gc/gc.release (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/gc/gc.release (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) global.get $~lib/gc/ROOT local.set $1 @@ -1188,8 +1151,8 @@ call $gc/_dummy/__ref_unlink end ) - (func $gc/_dummy/__ref_collect (; 28 ;) (type $FUNCSIG$v) - i32.const 304 + (func $gc/_dummy/__ref_collect (; 23 ;) (type $FUNCSIG$v) + i32.const 272 i32.const 0 f64.const 0 f64.const 0 @@ -1202,10 +1165,10 @@ i32.add global.set $gc/_dummy/collect_count ) - (func $~lib/gc/gc.collect (; 29 ;) (type $FUNCSIG$v) + (func $~lib/gc/gc.collect (; 24 ;) (type $FUNCSIG$v) call $gc/_dummy/__ref_collect ) - (func $gc/main (; 30 ;) (type $FUNCSIG$v) + (func $gc/main (; 25 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1368,7 +1331,7 @@ unreachable end ) - (func $~lib/util/memory/memcpy (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2569,7 +2532,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 32 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2800,14 +2763,14 @@ end end ) - (func $~lib/allocator/arena/__mem_free (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/runtime.reallocate (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2911,7 +2874,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/runtime.discard (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -2945,7 +2908,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/runtime/runtime.makeArray (; 37 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 32 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2965,7 +2928,7 @@ local.get $2 i32.shl call $~lib/runtime/runtime.allocate - i32.const 5 + i32.const 4 call $~lib/runtime/runtime.register local.set $6 local.get $4 @@ -3009,7 +2972,7 @@ end local.get $4 ) - (func $start (; 38 ;) (type $FUNCSIG$v) + (func $start (; 33 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -3024,9 +2987,9 @@ call $~lib/set/Set#constructor global.set $~lib/gc/ROOT ) - (func $null (; 39 ;) (type $FUNCSIG$v) + (func $null (; 34 ;) (type $FUNCSIG$v) ) - (func $~lib/runtime/runtime.makeArray|trampoline (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray|trampoline (; 35 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -3046,7 +3009,7 @@ local.get $3 call $~lib/runtime/runtime.makeArray ) - (func $~lib/setargc (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) diff --git a/tests/compiler/gc/global-assign.optimized.wat b/tests/compiler/gc/global-assign.optimized.wat index ea586ca7af..c0e9fb76a1 100644 --- a/tests/compiler/gc/global-assign.optimized.wat +++ b/tests/compiler/gc/global-assign.optimized.wat @@ -1,7 +1,7 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) @@ -14,8 +14,8 @@ (data (i32.const 72) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") (data (i32.const 96) "\02\00\00\00&") (data (i32.const 112) "g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s") - (table $0 3 funcref) - (elem (i32.const 0) $null $gc/global-assign/Ref~traverse $gc/global-assign/Ref~traverse) + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) (global $gc/_dummy/link_count (mut i32) (i32.const 0)) @@ -112,10 +112,7 @@ i32.const 16 i32.add ) - (func $gc/global-assign/Ref~traverse (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $gc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 i32.const 1 local.get $0 @@ -132,7 +129,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 152 @@ -167,7 +164,7 @@ call $gc/_dummy/__ref_register local.get $0 ) - (func $start:gc/global-assign (; 7 ;) (type $FUNCSIG$v) + (func $start:gc/global-assign (; 6 ;) (type $FUNCSIG$v) i32.const 152 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset @@ -239,7 +236,7 @@ unreachable end ) - (func $gc/global-assign/main (; 8 ;) (type $FUNCSIG$v) + (func $gc/global-assign/main (; 7 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -248,7 +245,7 @@ global.set $~lib/started end ) - (func $null (; 9 ;) (type $FUNCSIG$v) + (func $null (; 8 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/gc/global-assign.untouched.wat b/tests/compiler/gc/global-assign.untouched.wat index 35f7310e7a..aaf0be00dc 100644 --- a/tests/compiler/gc/global-assign.untouched.wat +++ b/tests/compiler/gc/global-assign.untouched.wat @@ -1,8 +1,8 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -11,8 +11,8 @@ (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 56) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") (data (i32.const 96) "\02\00\00\00&\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s\00") - (table $0 3 funcref) - (elem (i32.const 0) $null $gc/global-assign/Ref~traverse $~lib/string/String~traverse) + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) @@ -156,12 +156,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $gc/global-assign/Ref~traverse (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - ) - (func $~lib/string/String~traverse (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $gc/_dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 i32.const 1 local.get $0 @@ -178,7 +173,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/runtime.register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -216,7 +211,7 @@ call $gc/_dummy/__ref_register local.get $0 ) - (func $gc/global-assign/Ref#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $gc/global-assign/Ref#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -228,7 +223,7 @@ end local.get $0 ) - (func $start:gc/global-assign (; 11 ;) (type $FUNCSIG$v) + (func $start:gc/global-assign (; 9 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -320,7 +315,7 @@ unreachable end ) - (func $gc/global-assign/main (; 12 ;) (type $FUNCSIG$v) + (func $gc/global-assign/main (; 10 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -329,9 +324,9 @@ global.set $~lib/started end ) - (func $start (; 13 ;) (type $FUNCSIG$v) + (func $start (; 11 ;) (type $FUNCSIG$v) call $start:gc/global-assign ) - (func $null (; 14 ;) (type $FUNCSIG$v) + (func $null (; 12 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/gc/global-init.optimized.wat b/tests/compiler/gc/global-init.optimized.wat index bc3385792a..2f8eccff17 100644 --- a/tests/compiler/gc/global-init.optimized.wat +++ b/tests/compiler/gc/global-init.optimized.wat @@ -1,7 +1,7 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) @@ -14,8 +14,8 @@ (data (i32.const 72) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") (data (i32.const 96) "\02\00\00\00\"") (data (i32.const 112) "g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s") - (table $0 3 funcref) - (elem (i32.const 0) $null $gc/global-init/Ref~traverse $gc/global-init/Ref~traverse) + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) (global $gc/_dummy/link_count (mut i32) (i32.const 0)) @@ -111,10 +111,7 @@ i32.const 16 i32.add ) - (func $gc/global-init/Ref~traverse (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $gc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 i32.const 1 local.get $0 @@ -131,7 +128,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 148 @@ -166,7 +163,7 @@ call $gc/_dummy/__ref_register local.get $0 ) - (func $start:gc/global-init (; 7 ;) (type $FUNCSIG$v) + (func $start:gc/global-init (; 6 ;) (type $FUNCSIG$v) i32.const 152 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset @@ -236,7 +233,7 @@ unreachable end ) - (func $gc/global-init/main (; 8 ;) (type $FUNCSIG$v) + (func $gc/global-init/main (; 7 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -245,7 +242,7 @@ global.set $~lib/started end ) - (func $null (; 9 ;) (type $FUNCSIG$v) + (func $null (; 8 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/gc/global-init.untouched.wat b/tests/compiler/gc/global-init.untouched.wat index 567860a468..6530db3ed4 100644 --- a/tests/compiler/gc/global-init.untouched.wat +++ b/tests/compiler/gc/global-init.untouched.wat @@ -1,8 +1,8 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -11,8 +11,8 @@ (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 56) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") (data (i32.const 96) "\02\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s\00") - (table $0 3 funcref) - (elem (i32.const 0) $null $gc/global-init/Ref~traverse $~lib/string/String~traverse) + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) @@ -155,12 +155,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $gc/global-init/Ref~traverse (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - ) - (func $~lib/string/String~traverse (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $gc/_dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 i32.const 1 local.get $0 @@ -177,7 +172,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/runtime.register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -215,7 +210,7 @@ call $gc/_dummy/__ref_register local.get $0 ) - (func $gc/global-init/Ref#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $gc/global-init/Ref#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -227,7 +222,7 @@ end local.get $0 ) - (func $start:gc/global-init (; 11 ;) (type $FUNCSIG$v) + (func $start:gc/global-init (; 9 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -317,7 +312,7 @@ unreachable end ) - (func $gc/global-init/main (; 12 ;) (type $FUNCSIG$v) + (func $gc/global-init/main (; 10 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -326,9 +321,9 @@ global.set $~lib/started end ) - (func $start (; 13 ;) (type $FUNCSIG$v) + (func $start (; 11 ;) (type $FUNCSIG$v) call $start:gc/global-init ) - (func $null (; 14 ;) (type $FUNCSIG$v) + (func $null (; 12 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/gc/itcm/trace.optimized.wat b/tests/compiler/gc/itcm/trace.optimized.wat index c41a97e4f0..3e6056ac3d 100644 --- a/tests/compiler/gc/itcm/trace.optimized.wat +++ b/tests/compiler/gc/itcm/trace.optimized.wat @@ -1,90 +1,88 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) (data (i32.const 8) "\01\00\00\00 ") (data (i32.const 24) "g\00c\00/\00i\00t\00c\00m\00/\00t\00r\00a\00c\00e\00.\00t\00s") - (data (i32.const 56) "\01\00\00\00\18") - (data (i32.const 72) "i\00t\00c\00m\00.\00c\00o\00l\00l\00e\00c\00t") - (data (i32.const 96) "\01\00\00\00\1c") - (data (i32.const 112) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00N\00I\00T") - (data (i32.const 144) "\01\00\00\00 ") - (data (i32.const 160) " \00 \00 \00 \00 \00f\00r\00o\00m\00S\00p\00a\00c\00e\00 \00=") - (data (i32.const 192) "\01\00\00\00\14") - (data (i32.const 208) " \00 \00 \00 \00 \00c\00l\00e\00a\00r") - (data (i32.const 232) "\01\00\00\00\1c") - (data (i32.const 248) " \00 \00 \00 \00 \00t\00o\00S\00p\00a\00c\00e\00 \00=") - (data (i32.const 280) "\01\00\00\00\"") - (data (i32.const 296) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00I\00D\00L\00E") + (data (i32.const 56) "\01\00\00\00\"") + (data (i32.const 72) "#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)") + (data (i32.const 112) "\01\00\00\00\1e") + (data (i32.const 128) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 160) "\01\00\00\00\1a") + (data (i32.const 176) "i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 208) "\01\00\00\00\12") + (data (i32.const 224) "i\00t\00c\00m\00~\00i\00n\00i\00t") + (data (i32.const 248) "\01\00\00\00 ") + (data (i32.const 264) " \00 \00 \00 \00 \00f\00r\00o\00m\00S\00p\00a\00c\00e\00 \00=") + (data (i32.const 296) "\01\00\00\00\14") + (data (i32.const 312) " \00 \00 \00 \00 \00c\00l\00e\00a\00r") (data (i32.const 336) "\01\00\00\00\1c") - (data (i32.const 352) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E") + (data (i32.const 352) " \00 \00 \00 \00 \00t\00o\00S\00p\00a\00c\00e\00 \00=") (data (i32.const 384) "\01\00\00\00\"") - (data (i32.const 400) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K") - (data (i32.const 440) "\01\00\00\00\1c") - (data (i32.const 456) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K") - (data (i32.const 488) "\01\00\00\00*") - (data (i32.const 504) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h") - (data (i32.const 552) "\01\00\00\00$") - (data (i32.const 568) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P") - (data (i32.const 608) "\01\00\00\00(") - (data (i32.const 624) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e") - (data (i32.const 664) "\01\00\00\00,") - (data (i32.const 680) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h") - (data (i32.const 728) "\01\00\00\00\"") - (data (i32.const 744) "#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)") - (data (i32.const 784) "\01\00\00\00\12") - (data (i32.const 800) "i\00t\00c\00m\00.\00m\00a\00r\00k") - (data (i32.const 824) "\01\00\00\00\1a") - (data (i32.const 840) " \00 \00 \00 \00 \00m\00a\00k\00e\00G\00r\00a\00y") - (data (i32.const 872) "\01\00\00\00:") - (data (i32.const 888) " \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]") - (data (i32.const 952) "\01\00\00\006") - (data (i32.const 968) " \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]") - (data (i32.const 1024) "\01\00\00\00\1e") - (data (i32.const 1040) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 1072) "\01\00\00\00\1a") - (data (i32.const 1088) "i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r") - (data (i32.const 1120) "\01\00\00\00(") - (data (i32.const 1136) "#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)") - (data (i32.const 1176) "\01\00\00\00&") - (data (i32.const 1192) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 1232) "\01\00\00\00\12") - (data (i32.const 1248) "i\00t\00c\00m\00.\00l\00i\00n\00k") - (data (i32.const 1272) "\01\00\00\00\1c") - (data (i32.const 1288) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f") - (data (i32.const 1320) "\01\00\00\00\1a") - (data (i32.const 1336) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1368) "\01\00\00\00\1e") - (data (i32.const 1384) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l") - (table $0 7 funcref) - (elem (i32.const 0) $null $~lib/string/String~traverse $gc/itcm/trace/Ref~traverse $~lib/string/String~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) + (data (i32.const 400) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00I\00D\00L\00E") + (data (i32.const 440) "\01\00\00\006") + (data (i32.const 456) " \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]") + (data (i32.const 512) "\01\00\00\00(") + (data (i32.const 528) "#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)") + (data (i32.const 568) "\01\00\00\00&") + (data (i32.const 584) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 624) "\01\00\00\00\12") + (data (i32.const 640) "i\00t\00c\00m\00.\00l\00i\00n\00k") + (data (i32.const 664) "\01\00\00\00\1a") + (data (i32.const 680) " \00 \00 \00 \00 \00m\00a\00k\00e\00G\00r\00a\00y") + (data (i32.const 712) "\01\00\00\00:") + (data (i32.const 728) " \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]") + (data (i32.const 792) "\01\00\00\00\1c") + (data (i32.const 808) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f") + (data (i32.const 840) "\01\00\00\00\1a") + (data (i32.const 856) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 888) "\01\00\00\00\1e") + (data (i32.const 904) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l") + (data (i32.const 936) "\01\00\00\00\16") + (data (i32.const 952) "#\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)") + (data (i32.const 976) "\01\00\00\00\18") + (data (i32.const 992) "i\00t\00c\00m\00.\00c\00o\00l\00l\00e\00c\00t") + (data (i32.const 1016) "\01\00\00\00\1c") + (data (i32.const 1032) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E") + (data (i32.const 1064) "\01\00\00\00\"") + (data (i32.const 1080) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K") + (data (i32.const 1120) "\01\00\00\00\1c") + (data (i32.const 1136) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K") + (data (i32.const 1168) "\01\00\00\00*") + (data (i32.const 1184) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h") + (data (i32.const 1232) "\01\00\00\00$") + (data (i32.const 1248) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P") + (data (i32.const 1288) "\01\00\00\00(") + (data (i32.const 1304) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e") + (data (i32.const 1344) "\01\00\00\00,") + (data (i32.const 1360) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h") + (data (i32.const 1408) "\01\00\00\00\12") + (data (i32.const 1424) "i\00t\00c\00m\00.\00m\00a\00r\00k") + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $gc/itcm/trace/ref (mut i32) (i32.const 0)) - (global $gc/itcm/trace/arr (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/itcm/trace/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/string/String~traverse (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -146,8 +144,35 @@ global.set $~lib/allocator/arena/offset local.get $1 ) + (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 + i32.add + ) (func $~lib/collector/itcm/ManagedObjectList#clear (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 208 + i32.const 312 i32.const 1 local.get $0 i32.const 16 @@ -165,335 +190,82 @@ local.get $0 i32.store offset=12 ) - (func $~lib/collector/itcm/step (; 5 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/maybeInit (; 5 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - if - local.get $0 - i32.const 1 - i32.sub - br_table $case1|0 $case2|0 $case3|0 $break|0 - end - i32.const 112 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - i32.const 16 - call $~lib/allocator/arena/__mem_allocate - global.set $~lib/collector/itcm/fromSpace - i32.const 160 - i32.const 1 - global.get $~lib/collector/itcm/fromSpace - i32.const 16 - i32.add - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - global.get $~lib/collector/itcm/fromSpace - local.tee $0 - i32.const -1 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#clear - i32.const 16 - call $~lib/allocator/arena/__mem_allocate - global.set $~lib/collector/itcm/toSpace - i32.const 248 - i32.const 1 - global.get $~lib/collector/itcm/toSpace - i32.const 16 - i32.add - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - global.get $~lib/collector/itcm/toSpace - local.tee $0 - i32.const -1 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - i32.const 296 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - end - i32.const 352 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - call $~lib/gc/__gc_mark_roots - i32.const 2 - global.set $~lib/collector/itcm/state - i32.const 400 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - br $break|0 - end - global.get $~lib/collector/itcm/iter - i32.load offset=8 - i32.const -4 - i32.and - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - i32.const 456 - i32.const 1 - local.get $0 - i32.const 16 - i32.add - local.tee $1 - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - i32.or - i32.store offset=8 - local.get $1 - local.get $0 - i32.load - call_indirect (type $FUNCSIG$vi) - else - call $~lib/gc/__gc_mark_roots - i32.const 504 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - global.get $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/iter - i32.load offset=8 - i32.const -4 - i32.and - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $0 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $0 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - i32.const 568 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - end - end - br $break|0 - end - global.get $~lib/collector/itcm/iter + global.get $~lib/collector/itcm/state + i32.eqz + if + i32.const 224 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + i32.const 16 + call $~lib/allocator/arena/__mem_allocate + global.set $~lib/collector/itcm/fromSpace + i32.const 264 + i32.const 1 + global.get $~lib/collector/itcm/fromSpace + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/fromSpace local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#clear + i32.const 16 + call $~lib/allocator/arena/__mem_allocate + global.set $~lib/collector/itcm/toSpace + i32.const 352 + i32.const 1 global.get $~lib/collector/itcm/toSpace - i32.ne - if - i32.const 624 - i32.const 1 - local.get $0 - i32.const 16 - i32.add - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - else - i32.const 680 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - i32.const 1 - global.set $~lib/collector/itcm/state - i32.const 296 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - end - end - ) - (func $~lib/collector/itcm/__ref_collect (; 6 ;) (type $FUNCSIG$v) - (local $0 i32) - i32.const 72 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - block $break|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - i32.eqz - br_if $case1|0 - local.get $0 - i32.const 1 - i32.eq - br_if $case1|0 - br $break|0 - end - call $~lib/collector/itcm/step - end - loop $continue|1 - global.get $~lib/collector/itcm/state + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/toSpace + local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|1 - end + global.set $~lib/collector/itcm/state + i32.const 400 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace end ) - (func $~lib/runtime/runtime.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 15 - i32.add - i32.clz - i32.sub - i32.shl - call $~lib/allocator/arena/__mem_allocate - local.tee $1 - i32.const -1520547049 - i32.store - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - i32.const 888 - i32.const 3 - local.get $0 - i32.load offset=12 - local.tee $1 - i32.const 16 - i32.add - f64.convert_i32_u - local.get $0 - i32.const 16 - i32.add - f64.convert_i32_u - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - local.tee $0 - i32.const 16 - i32.add - f64.convert_i32_u - f64.const 0 - f64.const 0 - call $~lib/env/trace - local.get $0 - local.get $1 - i32.store offset=12 - local.get $1 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.and - local.get $0 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) - i32.const 968 + i32.const 456 i32.const 3 local.get $0 i32.load offset=12 @@ -535,77 +307,8 @@ local.get $1 i32.store offset=12 ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 840 - i32.const 1 - local.get $0 - i32.const 16 - i32.add - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - global.get $~lib/collector/itcm/iter - local.get $0 - i32.eq - if - local.get $0 - i32.load offset=12 - global.set $~lib/collector/itcm/iter - end - local.get $0 - call $~lib/collector/itcm/ManagedObject#unlink - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - i32.const 2 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/__ref_mark (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 800 - i32.const 1 - local.get $0 - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $gc/itcm/trace/Ref~traverse (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - local.get $0 - call $gc/itcm/trace/Ref~traverse - end - ) - (func $~lib/collector/itcm/__ref_register (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 1088 + (func $~lib/collector/itcm/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 176 i32.const 1 local.get $0 f64.convert_i32_u @@ -614,7 +317,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - call $~lib/collector/itcm/step + call $~lib/collector/itcm/maybeInit local.get $0 i32.const 16 i32.sub @@ -630,14 +333,14 @@ local.get $0 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/runtime.register (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 1416 + i32.const 1444 i32.le_u if i32.const 0 - i32.const 1040 + i32.const 128 i32.const 102 i32.const 6 call $~lib/env/abort @@ -652,7 +355,7 @@ i32.ne if i32.const 0 - i32.const 1040 + i32.const 128 i32.const 104 i32.const 6 call $~lib/env/abort @@ -665,7 +368,18 @@ call $~lib/collector/itcm/__ref_register local.get $0 ) - (func $~lib/memory/memory.fill (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $gc/itcm/trace/Ref#constructor (; 9 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 4 + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + ) + (func $~lib/memory/memory.fill (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -876,18 +590,80 @@ end end ) - (func $~lib/arraybuffer/ArrayBufferView~traverse (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#unlink (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + i32.const 728 + i32.const 3 local.get $0 - i32.load + i32.load offset=12 + local.tee $1 + i32.const 16 + i32.add + f64.convert_i32_u + local.get $0 + i32.const 16 + i32.add + f64.convert_i32_u + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and local.tee $0 + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $0 + local.get $1 + i32.store offset=12 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $0 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 680 + i32.const 1 + local.get $0 + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/iter + local.get $0 + i32.eq if local.get $0 - call $~lib/collector/itcm/__ref_mark + i32.load offset=12 + global.set $~lib/collector/itcm/iter end + local.get $0 + call $~lib/collector/itcm/ManagedObject#unlink + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.const 2 + i32.or + i32.store offset=8 ) - (func $~lib/collector/itcm/__ref_link (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/__ref_link (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) - i32.const 1248 + i32.const 640 i32.const 2 local.get $0 f64.convert_i32_u @@ -897,6 +673,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace + call $~lib/collector/itcm/maybeInit global.get $~lib/collector/itcm/white i32.eqz local.get $1 @@ -925,7 +702,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 4 call $~lib/runtime/runtime.allocate @@ -974,42 +751,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array~traverse (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load - call $~lib/collector/itcm/__ref_mark - local.get $0 - i32.load offset=4 - local.tee $1 - local.get $0 - i32.load offset=8 - i32.add - local.set $2 - loop $continue|0 - local.get $1 - local.get $2 - i32.lt_u - if - local.get $1 - i32.load - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - local.get $0 - call $gc/itcm/trace/Ref~traverse - end - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $continue|0 - end - end - ) - (func $~lib/util/memory/memcpy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1856,7 +1598,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 21 ;) (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 $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2050,7 +1792,7 @@ end end ) - (func $~lib/runtime/runtime.reallocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2074,7 +1816,7 @@ i32.shl i32.const 0 local.get $0 - i32.const 1416 + i32.const 1444 i32.gt_u select i32.const 32 @@ -2112,11 +1854,11 @@ i32.eq if local.get $0 - i32.const 1416 + i32.const 1444 i32.le_u if i32.const 0 - i32.const 1040 + i32.const 128 i32.const 64 i32.const 10 call $~lib/env/abort @@ -2145,7 +1887,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/ensureCapacity (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) i32.const 1 @@ -2185,7 +1927,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__unchecked_set (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__unchecked_set (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=4 @@ -2205,7 +1947,7 @@ end end ) - (func $~lib/array/Array#__set (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__set (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -2224,14 +1966,10 @@ i32.store offset=12 end ) - (func $start:gc/itcm/trace (; 26 ;) (type $FUNCSIG$v) + (func $gc/itcm/trace/makeGarbage (; 21 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 1416 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - call $~lib/collector/itcm/__ref_collect - i32.const 744 + (local $1 i32) + i32.const 72 i32.const 0 f64.const 0 f64.const 0 @@ -2239,16 +1977,9 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 4 - call $~lib/runtime/runtime.allocate - i32.const 2 - call $~lib/runtime/runtime.register - local.tee $0 - i32.const 0 - i32.store - local.get $0 - global.set $gc/itcm/trace/ref - i32.const 1136 + call $gc/itcm/trace/Ref#constructor + local.set $1 + i32.const 528 i32.const 0 f64.const 0 f64.const 0 @@ -2267,9 +1998,7 @@ local.get $0 i32.const 1 i32.store offset=12 - local.get $0 - global.set $gc/itcm/trace/arr - i32.const 1288 + i32.const 808 i32.const 0 f64.const 0 f64.const 0 @@ -2277,10 +2006,10 @@ f64.const 0 f64.const 0 call $~lib/env/trace - global.get $gc/itcm/trace/arr - global.get $gc/itcm/trace/ref + local.get $0 + local.get $1 call $~lib/array/Array#__set - i32.const 1384 + i32.const 904 i32.const 0 f64.const 0 f64.const 0 @@ -2288,36 +2017,330 @@ f64.const 0 f64.const 0 call $~lib/env/trace - global.get $gc/itcm/trace/arr + local.get $0 i32.const 0 call $~lib/array/Array#__set - call $~lib/collector/itcm/__ref_collect + i32.const 952 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + call $gc/itcm/trace/Ref#constructor + drop + ) + (func $~lib/collector/itcm/step (; 22 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + global.get $~lib/collector/itcm/state + local.tee $0 + if + local.get $0 + i32.const 1 + i32.sub + br_table $case1|0 $case2|0 $case3|0 $break|0 + end + unreachable + end + i32.const 1032 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + i32.const 2 + global.set $~lib/collector/itcm/state + i32.const 1080 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + br $break|0 + end + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + i32.const 1136 + i32.const 1 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.or + i32.store offset=8 + local.get $0 + i32.load + local.get $1 + call $~lib/gc/__gc_mark_members + else + i32.const 1184 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $0 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $0 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + i32.const 1248 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + end + end + br $break|0 + end + global.get $~lib/collector/itcm/iter + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + i32.const 1304 + i32.const 1 + local.get $0 + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + else + i32.const 1360 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + i32.const 1 + global.set $~lib/collector/itcm/state + i32.const 400 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + end + end ) - (func $gc/itcm/trace/main (; 27 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/__ref_collect (; 23 ;) (type $FUNCSIG$v) + i32.const 992 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + call $~lib/collector/itcm/maybeInit + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|0 + end + end + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 + end + ) + (func $gc/itcm/trace/main (; 24 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if - call $start:gc/itcm/trace + i32.const 1448 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + call $gc/itcm/trace/makeGarbage + call $~lib/collector/itcm/__ref_collect i32.const 1 global.set $~lib/started end ) - (func $null (; 28 ;) (type $FUNCSIG$v) - nop - ) - (func $~lib/gc/__gc_mark_roots (; 29 ;) (type $FUNCSIG$v) - (local $0 i32) - global.get $gc/itcm/trace/ref + (func $~lib/collector/itcm/__ref_mark (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 1424 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + call $~lib/collector/itcm/maybeInit + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub local.tee $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq if local.get $0 - call $~lib/collector/itcm/__ref_mark + call $~lib/collector/itcm/ManagedObject#makeGray end - global.get $gc/itcm/trace/arr - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/array/Array#__traverse (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=4 + local.tee $1 + local.get $0 + i32.load offset=8 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 2 + local.get $0 + call $~lib/gc/__gc_mark_members + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end end ) + (func $~lib/gc/__gc_mark_members (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + block $invalid + block $~lib/array/Array + block $~lib/arraybuffer/ArrayBufferView + block $~lib/arraybuffer/ArrayBuffer + block $gc/itcm/trace/Ref + block $~lib/string/String + local.get $0 + i32.const 1 + i32.sub + br_table $~lib/string/String $gc/itcm/trace/Ref $~lib/arraybuffer/ArrayBuffer $~lib/arraybuffer/ArrayBufferView $~lib/array/Array $invalid + end + return + end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 2 + local.get $0 + call $~lib/gc/__gc_mark_members + end + return + end + return + end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 3 + local.get $0 + call $~lib/gc/__gc_mark_members + end + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + unreachable + ) + (func $null (; 28 ;) (type $FUNCSIG$v) + nop + ) ) diff --git a/tests/compiler/gc/itcm/trace.ts b/tests/compiler/gc/itcm/trace.ts index 51dfdcf770..d3c151202e 100644 --- a/tests/compiler/gc/itcm/trace.ts +++ b/tests/compiler/gc/itcm/trace.ts @@ -6,21 +6,26 @@ import { HEADER_SIZE } from "util/runtime"; assert(HEADER_SIZE == 16); assert(gc.implemented); -gc.collect(); // trigger init - class Ref { inner: Ref; } -trace("# ref = new Ref()"); -var ref = new Ref(); -trace("# arr = new Array(1)"); -var arr = new Array(1); -trace("# arr[0] = ref"); -arr[0] = ref; -trace("# arr[0] = null"); -arr[0] = null; +function makeGarbage(): void { + trace("# ref = new Ref()"); + var ref = new Ref(); + trace("# arr = new Array(1)"); + var arr = new Array(1); + trace("# arr[0] = ref"); + arr[0] = ref; + trace("# arr[0] = null"); + arr[0] = null; + trace("# new Ref()"); + new Ref(); +} + +makeGarbage(); +gc.collect(); -gc.collect(); // FIXME: should do nothing yet, but collects arr.data ? +// should have sweeped four objects (incl. arr.buffer) @start export function main(): void {} diff --git a/tests/compiler/gc/itcm/trace.untouched.wat b/tests/compiler/gc/itcm/trace.untouched.wat index e5ad51f562..abd37127bc 100644 --- a/tests/compiler/gc/itcm/trace.untouched.wat +++ b/tests/compiler/gc/itcm/trace.untouched.wat @@ -1,69 +1,77 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) (data (i32.const 8) "\01\00\00\00 \00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00i\00t\00c\00m\00/\00t\00r\00a\00c\00e\00.\00t\00s\00") - (data (i32.const 56) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00c\00o\00l\00l\00e\00c\00t\00") - (data (i32.const 96) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00N\00I\00T\00") - (data (i32.const 144) "\01\00\00\00 \00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00f\00r\00o\00m\00S\00p\00a\00c\00e\00 \00=\00") - (data (i32.const 192) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00c\00l\00e\00a\00r\00") - (data (i32.const 232) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00t\00o\00S\00p\00a\00c\00e\00 \00=\00") - (data (i32.const 280) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00I\00D\00L\00E\00") - (data (i32.const 336) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E\00") - (data (i32.const 384) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K\00") - (data (i32.const 440) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00") - (data (i32.const 488) "\01\00\00\00*\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h\00") - (data (i32.const 552) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P\00") - (data (i32.const 608) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e\00") - (data (i32.const 664) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h\00") - (data (i32.const 728) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)\00") - (data (i32.const 784) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00m\00a\00r\00k\00") - (data (i32.const 824) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00m\00a\00k\00e\00G\00r\00a\00y\00") - (data (i32.const 872) "\01\00\00\00:\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") - (data (i32.const 952) "\01\00\00\006\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") - (data (i32.const 1024) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 1072) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") - (data (i32.const 1120) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)\00") - (data (i32.const 1176) "\01\00\00\00&\00\00\00\00\00\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 1232) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00l\00i\00n\00k\00") - (data (i32.const 1272) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f\00") - (data (i32.const 1320) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 1368) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l\00") - (table $0 7 funcref) - (elem (i32.const 0) $null $~lib/string/String~traverse $gc/itcm/trace/Ref~traverse $~lib/arraybuffer/ArrayBuffer~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse) + (data (i32.const 56) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)\00") + (data (i32.const 112) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 160) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 208) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00i\00n\00i\00t\00") + (data (i32.const 248) "\01\00\00\00 \00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00f\00r\00o\00m\00S\00p\00a\00c\00e\00 \00=\00") + (data (i32.const 296) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00c\00l\00e\00a\00r\00") + (data (i32.const 336) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00t\00o\00S\00p\00a\00c\00e\00 \00=\00") + (data (i32.const 384) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00I\00D\00L\00E\00") + (data (i32.const 440) "\01\00\00\006\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") + (data (i32.const 512) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)\00") + (data (i32.const 568) "\01\00\00\00&\00\00\00\00\00\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 624) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00l\00i\00n\00k\00") + (data (i32.const 664) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00m\00a\00k\00e\00G\00r\00a\00y\00") + (data (i32.const 712) "\01\00\00\00:\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") + (data (i32.const 792) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f\00") + (data (i32.const 840) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 888) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l\00") + (data (i32.const 936) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00#\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)\00") + (data (i32.const 976) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00c\00o\00l\00l\00e\00c\00t\00") + (data (i32.const 1016) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E\00") + (data (i32.const 1064) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K\00") + (data (i32.const 1120) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00") + (data (i32.const 1168) "\01\00\00\00*\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h\00") + (data (i32.const 1232) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P\00") + (data (i32.const 1288) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e\00") + (data (i32.const 1344) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h\00") + (data (i32.const 1408) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00m\00a\00r\00k\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $gc/itcm/trace/GC_TRACE i32 (i32.const 1)) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/gc/gc.implemented i32 (i32.const 1)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (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/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) - (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $gc/itcm/trace/ref (mut i32) (i32.const 0)) (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) - (global $gc/itcm/trace/arr (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 1416)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 1444)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/itcm/trace/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/string/String~traverse (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) + (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -149,9 +157,31 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/collector/itcm/ManagedObjectList#clear (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/runtime.adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) - i32.const 208 + i32.const 312 i32.const 1 block $~lib/collector/itcm/objToRef|inlined.1 (result i32) local.get $0 @@ -173,667 +203,248 @@ local.get $0 i32.store offset=12 ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/maybeInit (; 7 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/collector/itcm/state + i32.const 0 + i32.eq + if + i32.const 224 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/util/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/fromSpace + i32.const 264 + i32.const 1 + block $~lib/collector/itcm/objToRef|inlined.0 (result i32) + global.get $~lib/collector/itcm/fromSpace + local.set $0 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/fromSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/fromSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/fromSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/util/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/toSpace + i32.const 352 + i32.const 1 + block $~lib/collector/itcm/objToRef|inlined.2 (result i32) + global.get $~lib/collector/itcm/toSpace + local.set $0 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/toSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/toSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter + i32.const 1 + global.set $~lib/collector/itcm/state + i32.const 400 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + end + ) + (func $~lib/collector/itcm/ManagedObject#set:color (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 local.get $0 i32.load offset=8 i32.const 3 i32.const -1 i32.xor i32.and + local.get $1 + i32.or + i32.store offset=8 ) - (func $~lib/collector/itcm/ManagedObject#set:color (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#set:next (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 + local.get $1 local.get $0 i32.load offset=8 i32.const 3 - i32.const -1 - i32.xor i32.and - local.get $1 i32.or i32.store offset=8 ) - (func $~lib/allocator/arena/__mem_free (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/memory/memory.free (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 - call $~lib/allocator/arena/__mem_free + i32.load offset=12 + local.set $2 + i32.const 456 + i32.const 3 + block $~lib/collector/itcm/objToRef|inlined.3 (result i32) + local.get $2 + local.set $3 + local.get $3 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + block $~lib/collector/itcm/objToRef|inlined.4 (result i32) + local.get $1 + local.set $3 + local.get $3 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + block $~lib/collector/itcm/objToRef|inlined.5 (result i32) + local.get $0 + local.set $3 + local.get $3 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $1 + local.get $0 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $0 + local.get $1 + i32.store offset=12 ) - (func $~lib/collector/itcm/step (; 10 ;) (type $FUNCSIG$v) - (local $0 i32) + (func $~lib/collector/itcm/__ref_register (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - block $case0|0 - global.get $~lib/collector/itcm/state - local.set $1 - local.get $1 - i32.const 0 - i32.eq - br_if $case0|0 - local.get $1 - i32.const 1 - i32.eq - br_if $case1|0 - local.get $1 - i32.const 2 - i32.eq - br_if $case2|0 - local.get $1 - i32.const 3 - i32.eq - br_if $case3|0 - br $break|0 - end - block - i32.const 112 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - global.get $~lib/util/runtime/HEADER_SIZE - call $~lib/memory/memory.allocate - global.set $~lib/collector/itcm/fromSpace - i32.const 160 - i32.const 1 - block $~lib/collector/itcm/objToRef|inlined.0 (result i32) - global.get $~lib/collector/itcm/fromSpace - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - end - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - global.get $~lib/collector/itcm/fromSpace - i32.const -1 - i32.store - global.get $~lib/collector/itcm/fromSpace - i32.const 0 - i32.store offset=4 - global.get $~lib/collector/itcm/fromSpace - call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/util/runtime/HEADER_SIZE - call $~lib/memory/memory.allocate - global.set $~lib/collector/itcm/toSpace - i32.const 248 - i32.const 1 - block $~lib/collector/itcm/objToRef|inlined.2 (result i32) - global.get $~lib/collector/itcm/toSpace - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - end - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - global.get $~lib/collector/itcm/toSpace - i32.const -1 - i32.store - global.get $~lib/collector/itcm/toSpace - i32.const 0 - i32.store offset=4 - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - i32.const 296 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - end - end - block - i32.const 352 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - call $~lib/gc/__gc_mark_roots - i32.const 2 - global.set $~lib/collector/itcm/state - i32.const 400 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - i32.const 456 - i32.const 1 - block $~lib/collector/itcm/objToRef|inlined.3 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - end - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - call $~lib/collector/itcm/ManagedObject#set:color - block $~lib/collector/itcm/objToRef|inlined.4 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - end - local.get $0 - i32.load - call_indirect (type $FUNCSIG$vi) - else - call $~lib/gc/__gc_mark_roots - i32.const 504 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $1 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $1 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $1 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - i32.const 568 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - end - end - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - i32.const 624 - i32.const 1 - block $~lib/collector/itcm/objToRef|inlined.5 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - end - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.ge_u - if - local.get $0 - call $~lib/memory/memory.free - end - else - i32.const 680 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - i32.const 1 - global.set $~lib/collector/itcm/state - i32.const 296 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - end - br $break|0 - unreachable - end - unreachable - end - ) - (func $~lib/collector/itcm/__ref_collect (; 11 ;) (type $FUNCSIG$v) - (local $0 i32) - i32.const 72 - i32.const 0 - f64.const 0 + (local $2 i32) + i32.const 176 + i32.const 1 + local.get $0 + f64.convert_i32_u f64.const 0 f64.const 0 f64.const 0 f64.const 0 call $~lib/env/trace - block $break|0 - block $case1|0 - block $case0|0 - global.get $~lib/collector/itcm/state - local.set $0 - local.get $0 - i32.const 0 - i32.eq - br_if $case0|0 - local.get $0 - i32.const 1 - i32.eq - br_if $case1|0 - br $break|0 - end - end - call $~lib/collector/itcm/step - end - block $break|1 - loop $continue|1 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|1 - end - end + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub end + local.set $2 + local.get $2 + global.get $~lib/collector/itcm/white + call $~lib/collector/itcm/ManagedObject#set:color + global.get $~lib/collector/itcm/fromSpace + local.get $2 + call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/gc/gc.collect (; 12 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/__ref_collect - ) - (func $~lib/runtime/runtime.adjust (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 32 + (func $~lib/runtime/runtime.register (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 128 + i32.const 102 + i32.const 6 + call $~lib/env/abort + unreachable + end local.get $0 global.get $~lib/util/runtime/HEADER_SIZE - i32.add - i32.const 1 - i32.sub - i32.clz i32.sub - i32.shl - ) - (func $~lib/runtime/runtime.allocate (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - call $~lib/runtime/runtime.adjust - call $~lib/memory/memory.allocate - local.set $1 - local.get $1 + local.set $2 + local.get $2 + i32.load global.get $~lib/util/runtime/HEADER_MAGIC - i32.store + i32.eq + i32.eqz + if + i32.const 0 + i32.const 128 + i32.const 104 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 local.get $1 + i32.store local.get $0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + call $~lib/collector/itcm/__ref_register local.get $0 - i32.load offset=8 - i32.const 3 - i32.and ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $gc/itcm/trace/Ref#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - local.get $1 + i32.eqz + if + i32.const 4 + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + local.set $0 + end + local.get $0 + i32.const 0 + i32.store local.get $0 - i32.load offset=8 - i32.const 3 - i32.and - i32.or - i32.store offset=8 ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/memory/memory.fill (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - local.set $1 - local.get $0 - i32.load offset=12 - local.set $2 - i32.const 888 - i32.const 3 - block $~lib/collector/itcm/objToRef|inlined.7 (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i64) + block $~lib/util/memory/memset|inlined.0 local.get $2 - local.set $3 - local.get $3 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - end - f64.convert_i32_u - block $~lib/collector/itcm/objToRef|inlined.8 (result i32) - local.get $0 - local.set $3 - local.get $3 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - end - f64.convert_i32_u - block $~lib/collector/itcm/objToRef|inlined.9 (result i32) - local.get $1 - local.set $3 - local.get $3 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - end - f64.convert_i32_u - f64.const 0 - f64.const 0 - call $~lib/env/trace - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load offset=12 - local.set $2 - i32.const 968 - i32.const 3 - block $~lib/collector/itcm/objToRef|inlined.10 (result i32) - local.get $2 - local.set $3 - local.get $3 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - end - f64.convert_i32_u - block $~lib/collector/itcm/objToRef|inlined.11 (result i32) - local.get $1 - local.set $3 - local.get $3 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - end - f64.convert_i32_u - block $~lib/collector/itcm/objToRef|inlined.12 (result i32) - local.get $0 - local.set $3 - local.get $3 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - end - f64.convert_i32_u - f64.const 0 - f64.const 0 - call $~lib/env/trace - local.get $1 - local.get $0 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - i32.const 840 - i32.const 1 - block $~lib/collector/itcm/objToRef|inlined.6 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - end - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - local.get $0 - global.get $~lib/collector/itcm/iter - i32.eq - if - local.get $0 - i32.load offset=12 - global.set $~lib/collector/itcm/iter - end - local.get $0 - call $~lib/collector/itcm/ManagedObject#unlink - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 2 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/__ref_mark (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 800 - i32.const 1 - local.get $0 - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - block $~lib/collector/itcm/refToObj|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - end - local.set $2 - local.get $2 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $gc/itcm/trace/Ref~traverse (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - local.tee $1 - if - local.get $1 - call $~lib/collector/itcm/__ref_mark - local.get $1 - call $gc/itcm/trace/Ref~traverse - end - ) - (func $~lib/collector/itcm/__ref_register (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 1088 - i32.const 1 - local.get $0 - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - call $~lib/collector/itcm/step - block $~lib/collector/itcm/refToObj|inlined.1 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - end - local.set $2 - local.get $2 - global.get $~lib/collector/itcm/white - call $~lib/collector/itcm/ManagedObject#set:color - global.get $~lib/collector/itcm/fromSpace - local.get $2 - call $~lib/collector/itcm/ManagedObjectList#push - ) - (func $~lib/runtime/runtime.register (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 1040 - i32.const 102 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - local.set $2 - local.get $2 - i32.load - global.get $~lib/util/runtime/HEADER_MAGIC - i32.eq - i32.eqz - if - i32.const 0 - i32.const 1040 - i32.const 104 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $1 - i32.store - local.get $0 - call $~lib/collector/itcm/__ref_register - local.get $0 - ) - (func $gc/itcm/trace/Ref#constructor (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 4 - call $~lib/runtime/runtime.allocate - i32.const 2 - call $~lib/runtime/runtime.register - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - ) - (func $~lib/memory/memory.fill (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i64) - block $~lib/util/memory/memset|inlined.0 - local.get $2 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end local.get $0 local.get $1 i32.store8 @@ -1080,17 +691,14 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer~traverse (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 global.get $~lib/util/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 - i32.const 1192 + i32.const 584 i32.const 54 i32.const 43 call $~lib/env/abort @@ -1107,36 +715,126 @@ i32.const 3 call $~lib/runtime/runtime.register ) - (func $~lib/arraybuffer/ArrayBufferView~traverse (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) + (func $~lib/collector/itcm/ManagedObject#get:color (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.tee $1 - if - local.get $1 - call $~lib/collector/itcm/__ref_mark - local.get $1 - call $~lib/arraybuffer/ArrayBuffer~traverse - end + i32.load offset=8 + i32.const 3 + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#get:next (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and ) - (func $~lib/collector/itcm/__ref_link (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#unlink (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 1248 - i32.const 2 local.get $0 - f64.convert_i32_u - local.get $1 - f64.convert_i32_u - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - block $~lib/collector/itcm/refToObj|inlined.2 (result i32) - local.get $1 - local.set $2 - local.get $2 - global.get $~lib/util/runtime/HEADER_SIZE + call $~lib/collector/itcm/ManagedObject#get:next + local.set $1 + local.get $0 + i32.load offset=12 + local.set $2 + i32.const 728 + i32.const 3 + block $~lib/collector/itcm/objToRef|inlined.7 (result i32) + local.get $2 + local.set $3 + local.get $3 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + block $~lib/collector/itcm/objToRef|inlined.8 (result i32) + local.get $0 + local.set $3 + local.get $3 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + block $~lib/collector/itcm/objToRef|inlined.9 (result i32) + local.get $1 + local.set $3 + local.get $3 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + i32.const 680 + i32.const 1 + block $~lib/collector/itcm/objToRef|inlined.6 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $0 + global.get $~lib/collector/itcm/iter + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + call $~lib/collector/itcm/ManagedObject#unlink + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/__ref_link (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 640 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE i32.sub end local.set $3 @@ -1147,7 +845,7 @@ i32.eq local.tee $2 if (result i32) - block $~lib/collector/itcm/refToObj|inlined.4 (result i32) + block $~lib/collector/itcm/refToObj|inlined.3 (result i32) local.get $0 local.set $2 local.get $2 @@ -1165,7 +863,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1177,7 +875,7 @@ i32.gt_u if i32.const 0 - i32.const 1192 + i32.const 584 i32.const 12 i32.const 57 call $~lib/env/abort @@ -1236,49 +934,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array~traverse (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load - call $~lib/collector/itcm/__ref_mark - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.add - local.set $2 - block $break|0 - loop $continue|0 - local.get $1 - local.get $2 - i32.lt_u - if - block - local.get $1 - i32.load - local.set $3 - local.get $3 - if - local.get $3 - call $~lib/collector/itcm/__ref_mark - local.get $3 - call $gc/itcm/trace/Ref~traverse - end - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - br $continue|0 - end - end - end - ) - (func $~lib/array/Array#constructor (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -1300,7 +956,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/util/memory/memcpy (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2501,7 +2157,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2732,7 +2388,14 @@ end end ) - (func $~lib/runtime/runtime.reallocate (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/arena/__mem_free (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/memory/memory.free (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/arena/__mem_free + ) + (func $~lib/runtime/runtime.reallocate (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2802,7 +2465,7 @@ i32.eqz if i32.const 0 - i32.const 1040 + i32.const 128 i32.const 64 i32.const 10 call $~lib/env/abort @@ -2836,7 +2499,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2857,111 +2520,407 @@ i32.gt_u if i32.const 0 - i32.const 1336 - i32.const 14 + i32.const 856 + i32.const 15 i32.const 64 call $~lib/env/abort unreachable end - local.get $0 - i32.load - local.set $3 - local.get $1 - local.get $2 - i32.shl - local.set $4 - local.get $3 - local.get $4 - call $~lib/runtime/runtime.reallocate - local.set $5 - local.get $5 - local.get $3 - i32.ne - if - local.get $0 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - i32.load - local.tee $8 + local.get $0 + i32.load + local.set $3 + local.get $1 + local.get $2 + i32.shl + local.set $4 + local.get $3 + local.get $4 + call $~lib/runtime/runtime.reallocate + local.set $5 + local.get $5 + local.get $3 + i32.ne + if + local.get $0 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + nop + local.get $7 + local.get $6 + call $~lib/collector/itcm/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $0 + local.get $5 + i32.store offset=4 + end + local.get $0 + local.get $4 + i32.store offset=8 + end + ) + (func $~lib/array/Array#__unchecked_set (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $3 + local.get $3 + i32.load + local.set $4 + local.get $2 + local.get $4 + i32.ne + if + local.get $3 + local.get $2 + i32.store + local.get $2 + i32.const 0 + i32.ne + if + local.get $2 + local.get $0 + call $~lib/collector/itcm/__ref_link + end + end + ) + (func $~lib/array/Array#__set (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.set $3 + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureCapacity + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#__unchecked_set + local.get $1 + local.get $3 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $gc/itcm/trace/makeGarbage (; 31 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + i32.const 72 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + i32.const 0 + call $gc/itcm/trace/Ref#constructor + local.set $0 + i32.const 528 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + i32.const 0 + i32.const 1 + call $~lib/array/Array#constructor + local.set $1 + i32.const 808 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $1 + i32.const 0 + local.get $0 + call $~lib/array/Array#__set + i32.const 904 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $1 + i32.const 0 + i32.const 0 + call $~lib/array/Array#__set + i32.const 952 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + i32.const 0 + call $gc/itcm/trace/Ref#constructor + drop + ) + (func $~lib/collector/itcm/step (; 32 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + global.get $~lib/collector/itcm/state + local.set $1 + local.get $1 + i32.const 0 + i32.eq + br_if $case0|0 + local.get $1 + i32.const 1 + i32.eq + br_if $case1|0 + local.get $1 + i32.const 2 + i32.eq + br_if $case2|0 + local.get $1 + i32.const 3 + i32.eq + br_if $case3|0 + br $break|0 + end + unreachable + end + block + i32.const 1032 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + call $~lib/gc/__gc_mark_roots + i32.const 2 + global.set $~lib/collector/itcm/state + i32.const 1080 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + i32.const 1136 + i32.const 1 + block $~lib/collector/itcm/objToRef|inlined.10 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + call $~lib/collector/itcm/ManagedObject#set:color + local.get $0 + i32.load + block $~lib/collector/itcm/objToRef|inlined.11 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + call $~lib/gc/__gc_mark_members + else + call $~lib/gc/__gc_mark_roots + i32.const 1184 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $1 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $1 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $1 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + i32.const 1248 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + end + end + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + i32.const 1304 + i32.const 1 + block $~lib/collector/itcm/objToRef|inlined.12 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.ge_u + if + local.get $0 + call $~lib/memory/memory.free + end + else + i32.const 1360 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + i32.const 1 + global.set $~lib/collector/itcm/state + i32.const 400 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + end + br $break|0 + unreachable + end + unreachable + end + ) + (func $~lib/collector/itcm/__ref_collect (; 33 ;) (type $FUNCSIG$v) + i32.const 992 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + call $~lib/collector/itcm/maybeInit + block $break|0 + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 i32.ne - if (result i32) - nop - local.get $7 - local.get $6 - call $~lib/collector/itcm/__ref_link - local.get $7 - else - local.get $7 + if + call $~lib/collector/itcm/step + br $continue|0 end - i32.store - local.get $0 - local.get $5 - i32.store offset=4 end - local.get $0 - local.get $4 - i32.store offset=8 end - ) - (func $~lib/array/Array#__unchecked_set (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.set $3 - local.get $3 - i32.load - local.set $4 - local.get $2 - local.get $4 - i32.ne - if - local.get $3 - local.get $2 - i32.store - local.get $2 - i32.const 0 - i32.ne - if - local.get $2 - local.get $0 - call $~lib/collector/itcm/__ref_link + block $break|1 + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 end end ) - (func $~lib/array/Array#__set (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $0 - i32.load offset=12 - local.set $3 - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - call $~lib/array/ensureCapacity - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#__unchecked_set - local.get $1 - local.get $3 - i32.ge_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=12 - end + (func $~lib/gc/gc.collect (; 34 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/__ref_collect ) - (func $start:gc/itcm/trace (; 39 ;) (type $FUNCSIG$v) + (func $start:gc/itcm/trace (; 35 ;) (type $FUNCSIG$v) global.get $~lib/util/runtime/HEADER_SIZE i32.const 16 i32.eq @@ -2994,57 +2953,10 @@ global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/gc/gc.collect - i32.const 744 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - i32.const 0 - call $gc/itcm/trace/Ref#constructor - global.set $gc/itcm/trace/ref - i32.const 1136 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - i32.const 0 - i32.const 1 - call $~lib/array/Array#constructor - global.set $gc/itcm/trace/arr - i32.const 1288 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - global.get $gc/itcm/trace/arr - i32.const 0 - global.get $gc/itcm/trace/ref - call $~lib/array/Array#__set - i32.const 1384 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - global.get $gc/itcm/trace/arr - i32.const 0 - i32.const 0 - call $~lib/array/Array#__set + call $gc/itcm/trace/makeGarbage call $~lib/gc/gc.collect ) - (func $gc/itcm/trace/main (; 40 ;) (type $FUNCSIG$v) + (func $gc/itcm/trace/main (; 36 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -3053,24 +2965,131 @@ global.set $~lib/started end ) - (func $start (; 41 ;) (type $FUNCSIG$v) + (func $start (; 37 ;) (type $FUNCSIG$v) call $start:gc/itcm/trace ) - (func $null (; 42 ;) (type $FUNCSIG$v) - ) - (func $~lib/gc/__gc_mark_roots (; 43 ;) (type $FUNCSIG$v) - (local $0 i32) - global.get $gc/itcm/trace/ref - local.tee $0 - if + (func $~lib/collector/itcm/__ref_mark (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 1424 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.4 (result i32) local.get $0 - call $~lib/collector/itcm/__ref_mark + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub end - global.get $gc/itcm/trace/arr - local.tee $0 + local.set $2 + local.get $2 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq if - local.get $0 - call $~lib/collector/itcm/__ref_mark + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/gc/__gc_mark_roots (; 39 ;) (type $FUNCSIG$v) + (local $0 i32) + nop + ) + (func $~lib/array/Array#__traverse (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.add + local.set $2 + block $break|0 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + block + local.get $1 + i32.load + local.set $3 + local.get $3 + if + local.get $3 + call $~lib/collector/itcm/__ref_mark + i32.const 2 + local.get $3 + call $~lib/gc/__gc_mark_members + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + br $continue|0 + end + end + end + ) + (func $~lib/gc/__gc_mark_members (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + block $invalid + block $~lib/array/Array + block $~lib/arraybuffer/ArrayBufferView + block $~lib/arraybuffer/ArrayBuffer + block $gc/itcm/trace/Ref + block $~lib/string/String + local.get $0 + br_table $invalid $~lib/string/String $gc/itcm/trace/Ref $~lib/arraybuffer/ArrayBuffer $~lib/arraybuffer/ArrayBufferView $~lib/array/Array $invalid + end + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 2 + local.get $2 + call $~lib/gc/__gc_mark_members + end + return + end + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 3 + local.get $2 + call $~lib/gc/__gc_mark_members + end + return + end + local.get $1 + call $~lib/array/Array#__traverse + return end + unreachable + ) + (func $null (; 42 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 191b024f29..4a7de97bf3 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -27,7 +27,7 @@ if i32.const 0 i32.const 16 - i32.const 96 + i32.const 97 i32.const 45 call $~lib/env/abort unreachable @@ -41,7 +41,7 @@ if i32.const 0 i32.const 16 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -64,7 +64,7 @@ if i32.const 0 i32.const 16 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 90a4ecc6eb..39ecd801af 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -39,7 +39,7 @@ if i32.const 0 i32.const 16 - i32.const 96 + i32.const 97 i32.const 45 call $~lib/env/abort unreachable @@ -53,7 +53,7 @@ if i32.const 0 i32.const 16 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -81,7 +81,7 @@ if i32.const 0 i32.const 16 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -114,7 +114,7 @@ if i32.const 0 i32.const 16 - i32.const 96 + i32.const 97 i32.const 45 call $~lib/env/abort unreachable @@ -128,7 +128,7 @@ if i32.const 0 i32.const 16 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -296,7 +296,7 @@ if i32.const 0 i32.const 16 - i32.const 96 + i32.const 97 i32.const 45 call $~lib/env/abort unreachable @@ -310,7 +310,7 @@ if i32.const 0 i32.const 16 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index f214152617..2bf5784f03 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1,5 +1,4 @@ (module - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -11,21 +10,21 @@ (data (i32.const 25) "\01\02") (data (i32.const 32) "\02\00\00\00\10") (data (i32.const 48) "\18\00\00\00\18\00\00\00\03\00\00\00\03") - (data (i32.const 64) "\04\00\00\00(") + (data (i32.const 64) "\03\00\00\00(") (data (i32.const 80) "s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") - (data (i32.const 120) "\04\00\00\00\1a") + (data (i32.const 120) "\03\00\00\00\1a") (data (i32.const 136) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 168) "\01\00\00\00\0c") (data (i32.const 188) "\01\00\00\00\02") - (data (i32.const 200) "\05\00\00\00\10") + (data (i32.const 200) "\04\00\00\00\10") (data (i32.const 216) "\b8\00\00\00\b8\00\00\00\0c\00\00\00\03") (data (i32.const 232) "\01") - (data (i32.const 248) "\05\00\00\00\10") + (data (i32.const 248) "\04\00\00\00\10") (data (i32.const 264) "\f8\00\00\00\f8") - (data (i32.const 280) "\04\00\00\00\1e") + (data (i32.const 280) "\03\00\00\00\1e") (data (i32.const 296) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (table $0 13 funcref) - (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/arraybuffer/ArrayBuffer~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/arraybuffer/ArrayBuffer~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/arraybuffer/ArrayBuffer~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse) + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 264)) (global $std/array-literal/i (mut i32) (i32.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -39,15 +38,7 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/arraybuffer/ArrayBuffer~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/array/Array~traverse (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - drop - ) - (func $~lib/array/Array#__get (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -55,7 +46,7 @@ if i32.const 0 i32.const 136 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -66,7 +57,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -76,7 +67,7 @@ if i32.const 0 i32.const 136 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -89,7 +80,7 @@ i32.add i32.load ) - (func $~lib/allocator/arena/__mem_allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -151,7 +142,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -178,7 +169,7 @@ i32.const 16 i32.add ) - (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 328 @@ -211,7 +202,7 @@ i32.store local.get $0 ) - (func $~lib/runtime/runtime.makeArray (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 16 @@ -246,47 +237,19 @@ i32.store offset=12 local.get $0 ) - (func $std/array-literal/Ref#constructor (; 9 ;) (type $FUNCSIG$i) (result i32) + (func $std/array-literal/Ref#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/runtime.allocate - i32.const 7 + i32.const 5 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array~traverse (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - drop - local.get $0 - i32.load offset=4 - local.tee $1 - local.get $0 - i32.load offset=8 - i32.add - local.set $0 - loop $continue|0 - local.get $1 - local.get $0 - i32.lt_u - if - local.get $1 - i32.load - drop - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $continue|0 - end - end - ) - (func $std/array-literal/RefWithCtor#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) + (func $std/array-literal/RefWithCtor#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/runtime.allocate - i32.const 10 + i32.const 7 call $~lib/runtime/runtime.register ) - (func $start:std/array-literal (; 12 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 9 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -480,7 +443,7 @@ end i32.const 0 global.set $std/array-literal/i - i32.const 5 + i32.const 4 i32.const 2 call $~lib/runtime/runtime.makeArray local.tee $2 @@ -556,7 +519,7 @@ call $~lib/env/abort unreachable end - i32.const 8 + i32.const 6 i32.const 2 call $~lib/runtime/runtime.makeArray local.tee $2 @@ -584,7 +547,7 @@ call $~lib/env/abort unreachable end - i32.const 11 + i32.const 8 i32.const 2 call $~lib/runtime/runtime.makeArray local.tee $2 @@ -613,10 +576,10 @@ unreachable end ) - (func $start (; 13 ;) (type $FUNCSIG$v) + (func $start (; 10 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 14 ;) (type $FUNCSIG$v) + (func $null (; 11 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 5414e87519..16899f6712 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -1,9 +1,9 @@ (module - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$v (func)) @@ -11,15 +11,15 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\01\02") (data (i32.const 32) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\18\00\00\00\03\00\00\00\03\00\00\00") - (data (i32.const 64) "\04\00\00\00(\00\00\00\00\00\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 120) "\04\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 64) "\03\00\00\00(\00\00\00\00\00\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 120) "\03\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 168) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 200) "\05\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\b8\00\00\00\b8\00\00\00\0c\00\00\00\03\00\00\00") + (data (i32.const 200) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\b8\00\00\00\b8\00\00\00\0c\00\00\00\03\00\00\00") (data (i32.const 232) "\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 248) "\05\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\f8\00\00\00\f8\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 280) "\04\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (table $0 13 funcref) - (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/string/String~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $std/array-literal/Ref~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $std/array-literal/RefWithCtor~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse) + (data (i32.const 248) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\f8\00\00\00\f8\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 280) "\03\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $std/array-literal/staticArrayI8 i32 (i32.const 48)) (global $std/array-literal/staticArrayI32 i32 (i32.const 216)) (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 264)) @@ -39,25 +39,11 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/arraybuffer/ArrayBuffer~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $~lib/collector/dummy/__ref_mark (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/array/Array~traverse (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/array/Array#get:length (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/string/String~traverse (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $~lib/array/Array#__unchecked_get (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -66,7 +52,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__get (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -76,7 +62,7 @@ if i32.const 0 i32.const 136 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -85,16 +71,11 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array~traverse (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/array/Array#get:length (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -103,7 +84,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -113,7 +94,7 @@ if i32.const 0 i32.const 136 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -122,7 +103,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/runtime/runtime.adjust (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -134,7 +115,7 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__mem_allocate (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -213,12 +194,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/memory/memory.allocate (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/runtime.adjust @@ -240,10 +221,10 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/collector/dummy/__ref_register (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/runtime.register (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -281,13 +262,13 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/collector/dummy/__ref_link (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/util/memory/memcpy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1488,7 +1469,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 21 ;) (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 $4 i32) (local $5 i32) @@ -1719,7 +1700,7 @@ end end ) - (func $~lib/runtime/runtime.makeArray (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 17 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1783,122 +1764,39 @@ end local.get $4 ) - (func $std/array-literal/Ref~traverse (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) - ) - (func $std/array-literal/Ref#constructor (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/Ref#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 call $~lib/runtime/runtime.allocate - i32.const 7 + i32.const 5 call $~lib/runtime/runtime.register local.set $0 end local.get $0 ) - (func $~lib/array/Array~traverse (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.add - local.set $2 - block $break|0 - loop $continue|0 - local.get $1 - local.get $2 - i32.lt_u - if - block - local.get $1 - i32.load - local.set $3 - local.get $3 - call $~lib/collector/dummy/__ref_mark - local.get $3 - call $std/array-literal/Ref~traverse - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - br $continue|0 - end - end - end - ) - (func $~lib/array/Array#get:length (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/array-literal/RefWithCtor~traverse (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $std/array-literal/RefWithCtor#constructor (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/RefWithCtor#constructor (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 call $~lib/runtime/runtime.allocate - i32.const 10 + i32.const 7 call $~lib/runtime/runtime.register local.set $0 end local.get $0 ) - (func $~lib/array/Array~traverse (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.add - local.set $2 - block $break|0 - loop $continue|0 - local.get $1 - local.get $2 - i32.lt_u - if - block - local.get $1 - i32.load - local.set $3 - local.get $3 - call $~lib/collector/dummy/__ref_mark - local.get $3 - call $std/array-literal/RefWithCtor~traverse - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - br $continue|0 - end - end - end - ) - (func $~lib/array/Array#get:length (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $start:std/array-literal (; 31 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 22 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2130,7 +2028,7 @@ global.set $std/array-literal/i block (result i32) i32.const 3 - i32.const 5 + i32.const 4 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -2221,7 +2119,7 @@ end block (result i32) i32.const 3 - i32.const 8 + i32.const 6 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -2280,7 +2178,7 @@ end block (result i32) i32.const 3 - i32.const 11 + i32.const 8 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -2338,9 +2236,9 @@ unreachable end ) - (func $start (; 32 ;) (type $FUNCSIG$v) + (func $start (; 23 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 33 ;) (type $FUNCSIG$v) + (func $null (; 24 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 6a118b84a1..46fc3e655d 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2,9 +2,9 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) @@ -36,7 +36,7 @@ (data (i32.const 152) "s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 176) "\02\00\00\00\05") (data (i32.const 192) "\01\02\03\04\05") - (data (i32.const 200) "\08\00\00\00\10") + (data (i32.const 200) "\07\00\00\00\10") (data (i32.const 216) "\c0\00\00\00\c0\00\00\00\05\00\00\00\05") (data (i32.const 232) "\02\00\00\00\05") (data (i32.const 248) "\01\01\01\04\05") @@ -51,7 +51,7 @@ (data (i32.const 392) "\01\01\00\02\02") (data (i32.const 400) "\02\00\00\00\14") (data (i32.const 416) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 440) "\n\00\00\00\10") + (data (i32.const 440) "\08\00\00\00\10") (data (i32.const 456) "\a0\01\00\00\a0\01\00\00\14\00\00\00\05") (data (i32.const 472) "\02\00\00\00\14") (data (i32.const 488) "\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") @@ -194,14 +194,14 @@ (data (i32.const 3032) "A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?") (data (i32.const 3208) "\02\00\00\00 ") (data (i32.const 3226) "\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") - (data (i32.const 3256) "\"\00\00\00\10") + (data (i32.const 3256) "\t\00\00\00\10") (data (i32.const 3272) "\98\0c\00\00\98\0c\00\00 \00\00\00\08") (data (i32.const 3288) "\02\00\00\00 ") (data (i32.const 3306) "\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") (data (i32.const 3336) "\02\00\00\00@") (data (i32.const 3358) "\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?") (data (i32.const 3398) "\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") - (data (i32.const 3416) ":\00\00\00\10") + (data (i32.const 3416) "\n\00\00\00\10") (data (i32.const 3432) "\18\0d\00\00\18\0d\00\00@\00\00\00\08") (data (i32.const 3448) "\02\00\00\00@") (data (i32.const 3470) "\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf") @@ -214,7 +214,7 @@ (data (i32.const 3616) "\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02") (data (i32.const 3640) "\02\00\00\00\14") (data (i32.const 3656) "\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02") - (data (i32.const 3680) "\n\00\00\00\10") + (data (i32.const 3680) "\08\00\00\00\10") (data (i32.const 3696) "H\0e\00\00H\0e\00\00\14\00\00\00\05") (data (i32.const 3712) "\02\00\00\00\14") (data (i32.const 3732) "\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") @@ -252,11 +252,11 @@ (data (i32.const 4184) "\01") (data (i32.const 4200) "\02\00\00\00\1c") (data (i32.const 4216) "\08\10\00\00 \10\00\00\08\10\00\008\10\00\00P\10\00\00h\10") - (data (i32.const 4248) "K\00\00\00\10") + (data (i32.const 4248) "\0e\00\00\00\10") (data (i32.const 4264) "x\10\00\00x\10\00\00\1c\00\00\00\07") (data (i32.const 4280) "\02\00\00\00\1c") (data (i32.const 4296) "h\10\00\00\08\10\00\00\08\10\00\008\10\00\00 \10\00\00P\10") - (data (i32.const 4328) "K\00\00\00\10") + (data (i32.const 4328) "\0e\00\00\00\10") (data (i32.const 4344) "\c8\10\00\00\c8\10\00\00\1c\00\00\00\07") (data (i32.const 4360) "\01\00\00\00\1c") (data (i32.const 4376) "~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") @@ -280,7 +280,7 @@ (data (i32.const 4648) "0") (data (i32.const 4656) "\02\00\00\00\90\01") (data (i32.const 4672) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 5072) "\n\00\00\00\10") + (data (i32.const 5072) "\08\00\00\00\10") (data (i32.const 5088) "@\12\00\00@\12\00\00\90\01\00\00d") (data (i32.const 5104) "\02\00\00\00\0c") (data (i32.const 5120) "\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") @@ -314,15 +314,15 @@ (data (i32.const 5584) "I\00n\00f\00i\00n\00i\00t\00y") (data (i32.const 5600) "\02\00\00\00\b8\02") (data (i32.const 5616) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array>~traverse $start:std/array~anonymous|47 $~lib/array/Array>~traverse $~lib/string/String~traverse $~lib/array/Array>~traverse $start:std/array~anonymous|48 $~lib/array/Array>~traverse $~lib/array/Array>~traverse $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/array/Array>~traverse $~lib/array/Array>~traverse $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/string/String~traverse $~lib/array/Array>~traverse $~lib/array/Array>~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~traverse $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~traverse) + (table $0 57 funcref) + (elem (i32.const 0) $null $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|2 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|16 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) @@ -465,10 +465,7 @@ (export "table" (table $0)) (export "main" (func $std/array/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/string/String~traverse (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -530,7 +527,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -557,7 +554,7 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) block $~lib/util/memory/memset|inlined.0 @@ -782,7 +779,7 @@ end end ) - (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 8060 @@ -815,7 +812,7 @@ i32.store local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -838,12 +835,7 @@ i32.const 2 call $~lib/runtime/runtime.register ) - (func $~lib/arraybuffer/ArrayBufferView~traverse (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - drop - ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1073741808 local.get $2 @@ -895,7 +887,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 10 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 call $~lib/runtime/runtime.allocate @@ -912,7 +904,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#fill (; 11 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/array/Array#fill (; 9 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) local.get $0 @@ -977,7 +969,7 @@ call $~lib/memory/memory.fill end ) - (func $~lib/util/memory/memcpy (; 12 ;) (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 $4 i32) (local $5 i32) @@ -1824,7 +1816,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 13 ;) (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 $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2018,7 +2010,7 @@ end end ) - (func $~lib/runtime/runtime.makeArray (; 14 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 12 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) i32.const 16 @@ -2059,7 +2051,7 @@ end local.get $1 ) - (func $~lib/array/Array#__get (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2067,7 +2059,7 @@ if i32.const 0 i32.const 272 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -2078,7 +2070,7 @@ i32.add i32.load8_u ) - (func $std/array/isArraysEqual (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2125,7 +2117,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 17 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/array/Array#fill (; 15 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $0 i32.load offset=4 @@ -2197,7 +2189,7 @@ end end ) - (func $~lib/array/Array#__get (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2207,7 +2199,7 @@ if i32.const 0 i32.const 272 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -2220,7 +2212,7 @@ i32.add i32.load ) - (func $std/array/isArraysEqual (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2270,7 +2262,7 @@ end i32.const 1 ) - (func $~lib/runtime/runtime.reallocate (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2374,7 +2366,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureCapacity (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -2390,7 +2382,7 @@ if i32.const 0 i32.const 272 - i32.const 14 + i32.const 15 i32.const 64 call $~lib/env/abort unreachable @@ -2423,7 +2415,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2446,7 +2438,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/array/Array#pop (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2457,7 +2449,7 @@ if i32.const 0 i32.const 272 - i32.const 309 + i32.const 310 i32.const 20 call $~lib/env/abort unreachable @@ -2478,7 +2470,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#concat (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2518,7 +2510,7 @@ call $~lib/memory/memory.copy local.get $4 ) - (func $~lib/array/Array#copyWithin (; 25 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 23 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 @@ -2683,7 +2675,7 @@ end local.get $0 ) - (func $~lib/array/Array#unshift (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#unshift (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2712,7 +2704,7 @@ local.get $2 i32.store offset=12 ) - (func $~lib/array/Array#shift (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2725,7 +2717,7 @@ if i32.const 0 i32.const 272 - i32.const 381 + i32.const 382 i32.const 20 call $~lib/env/abort unreachable @@ -2757,7 +2749,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#reverse (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#reverse (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2804,7 +2796,7 @@ end end ) - (func $~lib/array/Array#indexOf (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2868,7 +2860,7 @@ end i32.const -1 ) - (func $~lib/array/Array#includes (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 local.get $2 @@ -2876,7 +2868,7 @@ i32.const 0 i32.ge_s ) - (func $~lib/array/Array#splice (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2968,7 +2960,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#__set (; 32 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -2997,11 +2989,11 @@ i32.store offset=12 end ) - (func $start:std/array~anonymous|0 (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $~lib/array/Array#findIndex (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3049,17 +3041,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3067,7 +3059,7 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3075,12 +3067,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3128,12 +3120,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3141,12 +3133,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3154,12 +3146,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3207,12 +3199,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3220,12 +3212,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3233,13 +3225,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 52 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 50 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3282,7 +3274,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3291,7 +3283,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -3300,7 +3292,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.eqz @@ -3397,11 +3389,11 @@ end end ) - (func $start:std/array~anonymous|21 (; 56 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 54 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#map (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#map (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3411,7 +3403,7 @@ local.get $0 i32.load offset=12 local.tee $3 - i32.const 34 + i32.const 9 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -3447,7 +3439,7 @@ local.get $6 local.get $1 local.get $0 - i32.const 33 + i32.const 22 call_indirect (type $FUNCSIG$fiii) f32.store local.get $1 @@ -3459,7 +3451,7 @@ end local.get $4 ) - (func $~lib/array/Array#__get (; 58 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 56 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -3469,7 +3461,7 @@ if i32.const 0 i32.const 272 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -3482,7 +3474,7 @@ i32.add f32.load ) - (func $start:std/array~anonymous|22 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3492,7 +3484,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 60 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#map (; 58 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3547,14 +3539,14 @@ end end ) - (func $start:std/array~anonymous|23 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3564,12 +3556,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 62 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3625,7 +3617,7 @@ end local.get $4 ) - (func $start:std/array~anonymous|26 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3637,7 +3629,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -3646,7 +3638,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3658,12 +3650,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 66 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3707,7 +3699,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|31 (; 70 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.eqz if @@ -3718,7 +3710,7 @@ end local.get $0 ) - (func $start:std/array~anonymous|32 (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 69 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.eqz if @@ -3729,7 +3721,7 @@ end local.get $0 ) - (func $start:std/array~anonymous|33 (; 72 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 70 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -3737,7 +3729,7 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 73 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -3745,7 +3737,7 @@ local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3782,7 +3774,7 @@ end local.get $2 ) - (func $~lib/math/splitMix32 (; 75 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -3814,7 +3806,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 76 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 74 ;) (type $FUNCSIG$vj) (param $0 i64) (local $1 i64) local.get $0 i64.eqz @@ -3879,7 +3871,7 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/util/sort/insertionSort (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 75 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -3961,7 +3953,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -4217,7 +4209,7 @@ local.get $5 f32.store ) - (func $~lib/array/Array#sort (; 79 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 77 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f32) (local $4 f32) @@ -4226,7 +4218,7 @@ if i32.const 0 i32.const 272 - i32.const 526 + i32.const 527 i32.const 4 call $~lib/env/abort unreachable @@ -4285,7 +4277,7 @@ call $~lib/util/sort/weakHeapSort end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 80 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 78 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4314,7 +4306,7 @@ i32.lt_s i32.sub ) - (func $std/array/isArraysEqual (; 81 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 79 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 f32) (local $4 i32) @@ -4375,7 +4367,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 82 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 80 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) @@ -4457,7 +4449,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 83 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 81 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) @@ -4713,7 +4705,7 @@ local.get $5 f64.store ) - (func $~lib/array/Array#sort (; 84 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 82 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 f64) @@ -4722,7 +4714,7 @@ if i32.const 0 i32.const 272 - i32.const 526 + i32.const 527 i32.const 4 call $~lib/env/abort unreachable @@ -4781,7 +4773,7 @@ call $~lib/util/sort/weakHeapSort end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 85 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 83 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -4810,7 +4802,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#__get (; 86 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 84 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -4820,7 +4812,7 @@ if i32.const 0 i32.const 272 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -4833,7 +4825,7 @@ i32.add f64.load ) - (func $std/array/isArraysEqual (; 87 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 85 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -4894,7 +4886,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 88 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 86 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4976,7 +4968,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 89 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 87 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5232,7 +5224,7 @@ local.get $1 i32.store ) - (func $~lib/array/Array#sort (; 90 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 88 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5241,7 +5233,7 @@ if i32.const 0 i32.const 272 - i32.const 526 + i32.const 527 i32.const 4 call $~lib/env/abort unreachable @@ -5303,12 +5295,12 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 91 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 89 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 92 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 90 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -5317,14 +5309,14 @@ i32.lt_u i32.sub ) - (func $~lib/array/Array.create (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create (; 91 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 268435452 i32.gt_u if i32.const 0 i32.const 272 - i32.const 44 + i32.const 45 i32.const 62 call $~lib/env/abort unreachable @@ -5345,7 +5337,7 @@ i32.store offset=12 local.get $0 ) - (func $std/array/createReverseOrderedArray (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5374,7 +5366,7 @@ end local.get $2 ) - (func $~lib/math/NativeMath.random (; 95 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 93 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) global.get $~lib/math/random_seeded @@ -5421,7 +5413,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 96 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5450,7 +5442,7 @@ end local.get $2 ) - (func $std/array/isSorted (; 97 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 95 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -5492,7 +5484,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 98 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 96 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -5508,49 +5500,20 @@ unreachable end ) - (func $std/array/assertSortedDefault (; 99 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 97 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 63 + i32.const 48 call $std/array/assertSorted ) - (func $start:std/array~anonymous|44 (; 100 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array<~lib/array/Array>~traverse (; 101 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - drop - local.get $0 - i32.load offset=4 - local.tee $1 - local.get $0 - i32.load offset=8 - i32.add - local.set $0 - loop $continue|0 - local.get $1 - local.get $0 - i32.lt_u - if - local.get $1 - i32.load - i32.load - drop - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $continue|0 - end - end - ) - (func $~lib/array/Array.create<~lib/array/Array> (; 102 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array.create<~lib/array/Array> (; 99 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 512 - i32.const 68 + i32.const 11 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -5565,7 +5528,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array<~lib/array/Array>#__set (; 103 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__set (; 100 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -5576,7 +5539,7 @@ if i32.const 0 i32.const 272 - i32.const 111 + i32.const 112 i32.const 38 call $~lib/env/abort unreachable @@ -5612,7 +5575,7 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedNestedArray (; 104 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 101 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5644,7 +5607,7 @@ end local.get $1 ) - (func $start:std/array~anonymous|47 (; 105 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 102 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -5653,7 +5616,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#sort (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#sort (; 103 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5662,7 +5625,7 @@ if i32.const 0 i32.const 272 - i32.const 526 + i32.const 527 i32.const 4 call $~lib/env/abort unreachable @@ -5714,7 +5677,7 @@ call $~lib/util/sort/insertionSort local.get $0 ) - (func $~lib/array/Array<~lib/array/Array>#__get (; 107 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#__get (; 104 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -5722,7 +5685,7 @@ if i32.const 0 i32.const 272 - i32.const 96 + i32.const 97 i32.const 45 call $~lib/env/abort unreachable @@ -5736,7 +5699,7 @@ if i32.const 0 i32.const 272 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -5749,7 +5712,7 @@ i32.add i32.load ) - (func $std/array/isSorted<~lib/array/Array> (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/array/Array> (; 105 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -5791,7 +5754,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/array/Array> (; 109 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/array/Array> (; 106 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#sort @@ -5807,38 +5770,10 @@ unreachable end ) - (func $~lib/array/Array>~traverse (; 110 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - drop - local.get $0 - i32.load offset=4 - local.tee $1 - local.get $0 - i32.load offset=8 - i32.add - local.set $0 - loop $continue|0 - local.get $1 - local.get $0 - i32.lt_u - if - local.get $1 - i32.load - drop - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $continue|0 - end - end - ) - (func $~lib/array/Array.create> (; 111 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array.create> (; 107 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 512 - i32.const 71 + i32.const 12 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -5853,7 +5788,7 @@ i32.store offset=12 local.get $0 ) - (func $std/array/createReverseOrderedElementsArray (; 112 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 108 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5866,7 +5801,7 @@ if i32.const 4 call $~lib/runtime/runtime.allocate - i32.const 72 + i32.const 13 call $~lib/runtime/runtime.register local.tee $2 i32.const 511 @@ -5886,14 +5821,14 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/util/string/compareImpl (; 114 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 110 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 @@ -5926,7 +5861,7 @@ end local.get $3 ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 115 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 111 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6002,7 +5937,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 116 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 112 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) block $1of1 block $0of1 @@ -6014,7 +5949,7 @@ end unreachable end - i32.const 77 + i32.const 55 local.set $1 end local.get $0 @@ -6032,7 +5967,7 @@ unreachable end ) - (func $~lib/string/String.__eq (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -6078,7 +6013,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array/isArraysEqual<~lib/string/String | null> (; 118 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual<~lib/string/String | null> (; 114 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -6125,10 +6060,10 @@ end i32.const 1 ) - (func $~lib/array/Array.create<~lib/string/String> (; 119 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array.create<~lib/string/String> (; 115 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 400 - i32.const 78 + i32.const 15 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -6143,7 +6078,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/string/String#charAt (; 120 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#charAt (; 116 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 3020 @@ -6169,7 +6104,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String#concat (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6218,7 +6153,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String.__concat (; 122 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 118 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 4424 local.get $0 @@ -6226,7 +6161,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 119 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 4200 @@ -6258,7 +6193,7 @@ end local.get $1 ) - (func $std/array/createRandomStringArray (; 124 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createRandomStringArray (; 120 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) call $~lib/array/Array.create<~lib/string/String> @@ -6285,7 +6220,7 @@ end local.get $1 ) - (func $~lib/string/String#substring (; 125 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6381,7 +6316,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/runtime/runtime.discard (; 126 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 122 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 8060 i32.le_u @@ -6408,7 +6343,7 @@ unreachable end ) - (func $~lib/array/Array#join_bool (; 127 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_bool (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6560,7 +6495,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/decimalCount32 (; 128 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 124 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -6614,7 +6549,7 @@ end end ) - (func $~lib/util/number/utoa32_lut (; 129 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 125 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) i32.const 5092 @@ -6724,7 +6659,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 130 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 126 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6766,7 +6701,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa_stream (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 127 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6810,7 +6745,7 @@ end local.get $2 ) - (func $~lib/array/Array#join_int (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6928,12 +6863,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int ) - (func $~lib/util/number/utoa32 (; 134 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 130 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -6956,7 +6891,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa_stream (; 135 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6980,7 +6915,7 @@ call $~lib/util/number/utoa32_lut local.get $0 ) - (func $~lib/array/Array#join_int (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7098,12 +7033,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int ) - (func $~lib/util/number/genDigits (; 138 ;) (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 (; 134 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -7518,7 +7453,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 139 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 135 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -7777,7 +7712,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 140 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 136 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -8065,7 +8000,7 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 141 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 137 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -8110,7 +8045,7 @@ call $~lib/runtime/runtime.discard local.get $1 ) - (func $~lib/util/number/dtoa_stream (; 142 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 138 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -8181,7 +8116,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join_flt (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_flt (; 139 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8297,7 +8232,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/string/String>#join_str (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join_str (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8467,18 +8402,18 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/string/String>#join (; 145 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String>#join_str ) - (func $std/array/Ref#constructor (; 146 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/Ref#constructor (; 142 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/runtime.allocate - i32.const 87 + i32.const 19 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join_ref (; 147 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_ref (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8611,12 +8546,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#toString (; 148 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 144 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa_stream (; 149 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 145 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -8671,7 +8606,7 @@ end local.get $2 ) - (func $~lib/array/Array#join_int (; 150 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 146 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8783,7 +8718,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa_stream (; 151 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 147 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -8813,7 +8748,7 @@ call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join_int (; 152 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 148 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8929,7 +8864,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/decimalCount64 (; 153 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 149 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -8983,7 +8918,7 @@ end end ) - (func $~lib/util/number/utoa64_lut (; 154 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 150 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9080,7 +9015,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 155 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 151 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9122,7 +9057,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa_stream (; 156 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 152 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -9162,7 +9097,7 @@ end local.get $1 ) - (func $~lib/array/Array#join_int (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 153 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9278,7 +9213,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa64 (; 158 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 154 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9343,7 +9278,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa_stream (; 159 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 155 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -9406,7 +9341,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 160 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9522,12 +9457,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/string/String | null>#toString (; 161 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#toString (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/string/String>#join ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 158 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9622,7 +9557,7 @@ local.get $1 end ) - (func $~lib/util/number/itoa_stream (; 163 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 159 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -9652,7 +9587,7 @@ call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join_int (; 164 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 160 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9764,7 +9699,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 165 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 161 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9856,35 +9791,7 @@ local.get $1 end ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~traverse (; 166 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - drop - local.get $0 - i32.load offset=4 - local.tee $1 - local.get $0 - i32.load offset=8 - i32.add - local.set $0 - loop $continue|0 - local.get $1 - local.get $0 - i32.lt_u - if - local.get $1 - i32.load - call $~lib/array/Array<~lib/array/Array>~traverse - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $continue|0 - end - end - ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 167 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9979,7 +9886,7 @@ local.get $1 end ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 168 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 163 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10071,7 +9978,7 @@ local.get $1 end ) - (func $start:std/array (; 169 ;) (type $FUNCSIG$v) + (func $start:std/array (; 164 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10105,12 +10012,12 @@ end i32.const 0 call $~lib/runtime/runtime.allocate - i32.const 6 + i32.const 5 call $~lib/runtime/runtime.register drop i32.const 12 call $~lib/runtime/runtime.allocate - i32.const 7 + i32.const 6 call $~lib/runtime/runtime.register i32.const 1 i32.const 0 @@ -10123,7 +10030,7 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 8 + i32.const 7 i32.const 0 i32.const 248 call $~lib/runtime/runtime.makeArray @@ -10144,7 +10051,7 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 8 + i32.const 7 i32.const 0 i32.const 320 call $~lib/runtime/runtime.makeArray @@ -10165,7 +10072,7 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 8 + i32.const 7 i32.const 0 i32.const 344 call $~lib/runtime/runtime.makeArray @@ -10186,7 +10093,7 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 8 + i32.const 7 i32.const 0 i32.const 368 call $~lib/runtime/runtime.makeArray @@ -10207,7 +10114,7 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 8 + i32.const 7 i32.const 0 i32.const 392 call $~lib/runtime/runtime.makeArray @@ -10228,7 +10135,7 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 10 + i32.const 8 i32.const 2 i32.const 488 call $~lib/runtime/runtime.makeArray @@ -10250,7 +10157,7 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 10 + i32.const 8 i32.const 2 i32.const 528 call $~lib/runtime/runtime.makeArray @@ -10272,7 +10179,7 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 10 + i32.const 8 i32.const 2 i32.const 568 call $~lib/runtime/runtime.makeArray @@ -10294,7 +10201,7 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 10 + i32.const 8 i32.const 2 i32.const 608 call $~lib/runtime/runtime.makeArray @@ -10316,7 +10223,7 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 10 + i32.const 8 i32.const 2 i32.const 648 call $~lib/runtime/runtime.makeArray @@ -12625,7 +12532,7 @@ i32.const 3 call $~lib/array/Array#__set global.get $std/array/arr - i32.const 12 + i32.const 1 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -12638,7 +12545,7 @@ unreachable end global.get $std/array/arr - i32.const 13 + i32.const 2 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -12653,7 +12560,7 @@ unreachable end global.get $std/array/arr - i32.const 14 + i32.const 3 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -12668,7 +12575,7 @@ unreachable end global.get $std/array/arr - i32.const 15 + i32.const 4 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -12695,7 +12602,7 @@ unreachable end global.get $std/array/arr - i32.const 16 + i32.const 5 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -12722,7 +12629,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 17 + i32.const 6 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -12755,7 +12662,7 @@ i32.const 3 call $~lib/array/Array#push global.get $std/array/arr - i32.const 18 + i32.const 7 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -12770,7 +12677,7 @@ unreachable end global.get $std/array/arr - i32.const 19 + i32.const 8 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -12783,7 +12690,7 @@ unreachable end global.get $std/array/arr - i32.const 20 + i32.const 9 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -12810,7 +12717,7 @@ unreachable end global.get $std/array/arr - i32.const 21 + i32.const 10 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -12835,7 +12742,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 22 + i32.const 11 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -12868,7 +12775,7 @@ i32.const 3 call $~lib/array/Array#push global.get $std/array/arr - i32.const 23 + i32.const 12 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -12883,7 +12790,7 @@ unreachable end global.get $std/array/arr - i32.const 24 + i32.const 13 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -12896,7 +12803,7 @@ unreachable end global.get $std/array/arr - i32.const 25 + i32.const 14 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -12921,7 +12828,7 @@ unreachable end global.get $std/array/arr - i32.const 26 + i32.const 15 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -12948,7 +12855,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 27 + i32.const 16 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -12981,7 +12888,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 28 + i32.const 17 call $~lib/array/Array#forEach global.get $std/array/i i32.const 6 @@ -12997,7 +12904,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 29 + i32.const 18 call $~lib/array/Array#forEach global.get $std/array/i i32.const 6 @@ -13025,7 +12932,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 30 + i32.const 19 call $~lib/array/Array#forEach global.get $std/array/i i32.const 406 @@ -13053,7 +12960,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 31 + i32.const 20 call $~lib/array/Array#forEach global.get $std/array/i i32.const 1 @@ -13085,7 +12992,7 @@ i32.const 3 call $~lib/array/Array#push global.get $std/array/arr - i32.const 32 + i32.const 21 call $~lib/array/Array#forEach global.get $std/array/arr i32.load offset=12 @@ -13160,7 +13067,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 36 + i32.const 23 call $~lib/array/Array#map global.get $std/array/i i32.const 6 @@ -13188,7 +13095,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 37 + i32.const 24 call $~lib/array/Array#map global.get $std/array/i i32.const 406 @@ -13216,7 +13123,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 38 + i32.const 25 call $~lib/array/Array#map global.get $std/array/i i32.const 1 @@ -13248,7 +13155,7 @@ i32.const 3 call $~lib/array/Array#push global.get $std/array/arr - i32.const 39 + i32.const 26 call $~lib/array/Array#filter global.set $std/array/filteredArr global.get $std/array/filteredArr @@ -13266,7 +13173,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 40 + i32.const 27 call $~lib/array/Array#filter drop global.get $std/array/i @@ -13295,7 +13202,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 41 + i32.const 28 call $~lib/array/Array#filter drop global.get $std/array/i @@ -13324,7 +13231,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 42 + i32.const 29 call $~lib/array/Array#filter drop global.get $std/array/i @@ -13357,7 +13264,7 @@ i32.const 3 call $~lib/array/Array#push global.get $std/array/arr - i32.const 43 + i32.const 30 i32.const 0 call $~lib/array/Array#reduce global.set $std/array/i @@ -13373,7 +13280,7 @@ unreachable end global.get $std/array/arr - i32.const 44 + i32.const 31 i32.const 4 call $~lib/array/Array#reduce global.set $std/array/i @@ -13389,7 +13296,7 @@ unreachable end global.get $std/array/arr - i32.const 45 + i32.const 32 i32.const 0 call $~lib/array/Array#reduce i32.const 0 @@ -13407,7 +13314,7 @@ unreachable end global.get $std/array/arr - i32.const 46 + i32.const 33 i32.const 0 call $~lib/array/Array#reduce i32.const 0 @@ -13423,7 +13330,7 @@ unreachable end global.get $std/array/arr - i32.const 47 + i32.const 34 i32.const 0 call $~lib/array/Array#reduce global.set $std/array/i @@ -13451,7 +13358,7 @@ unreachable end global.get $std/array/arr - i32.const 48 + i32.const 35 i32.const 0 call $~lib/array/Array#reduce global.set $std/array/i @@ -13479,7 +13386,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 49 + i32.const 36 i32.const 0 call $~lib/array/Array#reduce global.set $std/array/i @@ -13513,7 +13420,7 @@ i32.const 3 call $~lib/array/Array#push global.get $std/array/arr - i32.const 50 + i32.const 37 i32.const 0 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -13529,7 +13436,7 @@ unreachable end global.get $std/array/arr - i32.const 51 + i32.const 38 i32.const 4 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -13545,7 +13452,7 @@ unreachable end global.get $std/array/arr - i32.const 52 + i32.const 39 i32.const 0 call $~lib/array/Array#reduceRight i32.const 0 @@ -13563,7 +13470,7 @@ unreachable end global.get $std/array/arr - i32.const 53 + i32.const 40 i32.const 0 call $~lib/array/Array#reduceRight i32.const 0 @@ -13579,7 +13486,7 @@ unreachable end global.get $std/array/arr - i32.const 54 + i32.const 41 i32.const 0 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -13607,7 +13514,7 @@ unreachable end global.get $std/array/arr - i32.const 55 + i32.const 42 i32.const 0 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -13635,7 +13542,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 56 + i32.const 43 i32.const 0 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -13689,7 +13596,7 @@ end unreachable end - i32.const 57 + i32.const 44 local.set $0 end local.get $1 @@ -13697,7 +13604,7 @@ call $~lib/array/Array#sort global.get $std/array/f32ArrayTyped i32.const 8 - i32.const 34 + i32.const 9 i32.const 2 i32.const 3304 call $~lib/runtime/runtime.makeArray @@ -13725,7 +13632,7 @@ end unreachable end - i32.const 60 + i32.const 45 local.set $0 end local.get $1 @@ -13733,7 +13640,7 @@ call $~lib/array/Array#sort global.get $std/array/f64ArrayTyped i32.const 8 - i32.const 58 + i32.const 10 i32.const 3 i32.const 3464 call $~lib/runtime/runtime.makeArray @@ -13761,7 +13668,7 @@ end unreachable end - i32.const 61 + i32.const 46 local.set $0 end local.get $1 @@ -13799,7 +13706,7 @@ end unreachable end - i32.const 62 + i32.const 47 local.set $0 end local.get $1 @@ -13808,7 +13715,7 @@ drop global.get $std/array/u32ArrayTyped i32.const 5 - i32.const 10 + i32.const 8 i32.const 2 i32.const 3728 call $~lib/runtime/runtime.makeArray @@ -13962,26 +13869,26 @@ call $std/array/createRandomOrderedArray global.set $std/array/randomized257 global.get $std/array/randomized64 - i32.const 64 + i32.const 49 call $std/array/assertSorted global.get $std/array/randomized64 - i32.const 65 + i32.const 50 call $std/array/assertSorted global.get $std/array/randomized257 - i32.const 66 + i32.const 51 call $std/array/assertSorted global.get $std/array/randomized257 - i32.const 67 + i32.const 52 call $std/array/assertSorted call $std/array/createReverseOrderedNestedArray global.set $std/array/reversedNested512 global.get $std/array/reversedNested512 - i32.const 70 + i32.const 53 call $std/array/assertSorted<~lib/array/Array> call $std/array/createReverseOrderedElementsArray global.set $std/array/reversedElements512 global.get $std/array/reversedElements512 - i32.const 74 + i32.const 54 call $std/array/assertSorted<~lib/array/Array> i32.const 1 global.set $~lib/argc @@ -14017,14 +13924,14 @@ end unreachable end - i32.const 80 + i32.const 56 local.set $0 end local.get $1 local.get $0 call $std/array/assertSorted<~lib/array/Array> i32.const 2 - i32.const 81 + i32.const 16 i32.const 0 i32.const 4552 call $~lib/runtime/runtime.makeArray @@ -14059,7 +13966,7 @@ unreachable end i32.const 3 - i32.const 10 + i32.const 8 i32.const 2 i32.const 5240 call $~lib/runtime/runtime.makeArray @@ -14095,7 +14002,7 @@ unreachable end i32.const 6 - i32.const 58 + i32.const 10 i32.const 3 i32.const 6672 call $~lib/runtime/runtime.makeArray @@ -14112,7 +14019,7 @@ unreachable end i32.const 3 - i32.const 78 + i32.const 15 i32.const 2 i32.const 6888 call $~lib/runtime/runtime.makeArray @@ -14130,7 +14037,7 @@ unreachable end i32.const 3 - i32.const 88 + i32.const 20 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -14213,7 +14120,7 @@ unreachable end i32.const 3 - i32.const 90 + i32.const 21 i32.const 0 i32.const 7128 call $~lib/runtime/runtime.makeArray @@ -14230,7 +14137,7 @@ unreachable end i32.const 3 - i32.const 92 + i32.const 22 i32.const 1 i32.const 7208 call $~lib/runtime/runtime.makeArray @@ -14247,7 +14154,7 @@ unreachable end i32.const 3 - i32.const 83 + i32.const 17 i32.const 3 i32.const 7312 call $~lib/runtime/runtime.makeArray @@ -14264,7 +14171,7 @@ unreachable end i32.const 4 - i32.const 94 + i32.const 23 i32.const 3 i32.const 7464 call $~lib/runtime/runtime.makeArray @@ -14294,7 +14201,7 @@ unreachable end i32.const 4 - i32.const 78 + i32.const 15 i32.const 2 i32.const 7744 call $~lib/runtime/runtime.makeArray @@ -14311,7 +14218,7 @@ unreachable end i32.const 2 - i32.const 68 + i32.const 11 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -14347,7 +14254,7 @@ unreachable end i32.const 2 - i32.const 96 + i32.const 24 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -14355,14 +14262,14 @@ i32.load offset=4 local.tee $1 i32.const 2 - i32.const 8 + i32.const 7 i32.const 0 i32.const 7936 call $~lib/runtime/runtime.makeArray i32.store local.get $1 i32.const 2 - i32.const 8 + i32.const 7 i32.const 0 i32.const 7960 call $~lib/runtime/runtime.makeArray @@ -14383,7 +14290,7 @@ unreachable end i32.const 1 - i32.const 100 + i32.const 26 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -14391,14 +14298,14 @@ i32.load offset=4 local.set $1 i32.const 1 - i32.const 98 + i32.const 25 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray local.tee $2 i32.load offset=4 i32.const 1 - i32.const 10 + i32.const 8 i32.const 2 i32.const 8056 call $~lib/runtime/runtime.makeArray @@ -14422,7 +14329,7 @@ unreachable end ) - (func $std/array/main (; 170 ;) (type $FUNCSIG$v) + (func $std/array/main (; 165 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -14431,7 +14338,7 @@ global.set $~lib/started end ) - (func $null (; 171 ;) (type $FUNCSIG$v) + (func $null (; 166 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 47efea7577..0648266e31 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -2,9 +2,9 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) @@ -34,7 +34,7 @@ (data (i32.const 112) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00") (data (i32.const 136) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 176) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\02\03\04\05") - (data (i32.const 200) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c0\00\00\00\c0\00\00\00\05\00\00\00\05\00\00\00") + (data (i32.const 200) "\07\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c0\00\00\00\c0\00\00\00\05\00\00\00\05\00\00\00") (data (i32.const 232) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\01\04\05") (data (i32.const 256) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 304) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") @@ -42,7 +42,7 @@ (data (i32.const 352) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") (data (i32.const 376) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") (data (i32.const 400) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 440) "\n\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a0\01\00\00\a0\01\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 440) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a0\01\00\00\a0\01\00\00\14\00\00\00\05\00\00\00") (data (i32.const 472) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00") (data (i32.const 512) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 552) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") @@ -118,16 +118,16 @@ (data (i32.const 2976) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") (data (i32.const 3016) "\01\00\00\00\ac\00\00\00\00\00\00\00\00\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?\00") (data (i32.const 3208) "\02\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") - (data (i32.const 3256) "\"\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\98\0c\00\00\98\0c\00\00 \00\00\00\08\00\00\00") + (data (i32.const 3256) "\t\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\98\0c\00\00\98\0c\00\00 \00\00\00\08\00\00\00") (data (i32.const 3288) "\02\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") (data (i32.const 3336) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") - (data (i32.const 3416) ":\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\18\0d\00\00\18\0d\00\00@\00\00\00\08\00\00\00") + (data (i32.const 3416) "\n\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\18\0d\00\00\18\0d\00\00@\00\00\00\08\00\00\00") (data (i32.const 3448) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") (data (i32.const 3528) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02\00\00\00") (data (i32.const 3568) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\d8\0d\00\00\d8\0d\00\00\14\00\00\00\05\00\00\00") (data (i32.const 3600) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02\00\00\00") (data (i32.const 3640) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02\00\00\00") - (data (i32.const 3680) "\n\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00H\0e\00\00H\0e\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 3680) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00H\0e\00\00H\0e\00\00\14\00\00\00\05\00\00\00") (data (i32.const 3712) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") (data (i32.const 3752) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 3768) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\b8\0e\00\00\b8\0e\00\00\00\00\00\00\00\00\00\00") @@ -147,9 +147,9 @@ (data (i32.const 4160) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00b\00a\00") (data (i32.const 4184) "\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 4200) "\02\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00\08\10\00\00 \10\00\00\08\10\00\008\10\00\00P\10\00\00h\10\00\00\00\00\00\00") - (data (i32.const 4248) "K\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00x\10\00\00x\10\00\00\1c\00\00\00\07\00\00\00") + (data (i32.const 4248) "\0e\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00x\10\00\00x\10\00\00\1c\00\00\00\07\00\00\00") (data (i32.const 4280) "\02\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00h\10\00\00\08\10\00\00\08\10\00\008\10\00\00 \10\00\00P\10\00\00\00\00\00\00") - (data (i32.const 4328) "K\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c8\10\00\00\c8\10\00\00\1c\00\00\00\07\00\00\00") + (data (i32.const 4328) "\0e\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c8\10\00\00\c8\10\00\00\1c\00\00\00\07\00\00\00") (data (i32.const 4360) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") (data (i32.const 4408) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00n\00u\00l\00l\00") (data (i32.const 4432) "\02\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\01\00") @@ -161,7 +161,7 @@ (data (i32.const 4600) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") (data (i32.const 4632) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\000\00") (data (i32.const 4656) "\02\00\00\00\90\01\00\00\00\00\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") - (data (i32.const 5072) "\n\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00@\12\00\00@\12\00\00\90\01\00\00d\00\00\00") + (data (i32.const 5072) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00@\12\00\00@\12\00\00\90\01\00\00d\00\00\00") (data (i32.const 5104) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") (data (i32.const 5136) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\001\00-\002\00-\003\00") (data (i32.const 5168) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") @@ -178,11 +178,11 @@ (data (i32.const 5528) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") (data (i32.const 5568) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") (data (i32.const 5600) "\02\00\00\00\b8\02\00\00\00\00\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~traverse $~lib/array/Array~traverse $std/array/P~traverse $~lib/typedarray/Uint8Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|4 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|18 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $~lib/array/Array~traverse $~lib/array/Array~traverse $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|30 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|34 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|38 $start:std/array~anonymous|39 $start:std/array~anonymous|40 $start:std/array~anonymous|41 $start:std/array~anonymous|42 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array>~traverse $start:std/array~anonymous|47 $~lib/array/Array>~traverse $std/array/Proxy~traverse $~lib/array/Array>~traverse $start:std/array~anonymous|48 $~lib/array/Array<~lib/string/String | null>~traverse $~lib/array/Array<~lib/string/String | null>~traverse $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/array/Array<~lib/string/String>~traverse $~lib/array/Array<~lib/string/String>~traverse $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $std/array/Ref~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array>~traverse $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~traverse $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~traverse) + (table $0 57 funcref) + (elem (i32.const 0) $null $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|4 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|18 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|30 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|34 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|38 $start:std/array~anonymous|39 $start:std/array~anonymous|40 $start:std/array~anonymous|41 $start:std/array~anonymous|42 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -297,10 +297,7 @@ (export "table" (table $0)) (export "main" (func $std/array/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/string/String~traverse (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $~lib/runtime/runtime.adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -312,7 +309,7 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__mem_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -391,12 +388,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/memory/memory.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/runtime.adjust @@ -418,7 +415,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -675,13 +672,10 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer~traverse (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $~lib/collector/dummy/__ref_register (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/runtime.register (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -719,7 +713,7 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 global.get $~lib/util/runtime/MAX_BYTELENGTH @@ -743,28 +737,13 @@ i32.const 2 call $~lib/runtime/runtime.register ) - (func $~lib/collector/dummy/__ref_mark (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/arraybuffer/ArrayBufferView~traverse (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - local.tee $1 - if - local.get $1 - call $~lib/collector/dummy/__ref_mark - local.get $1 - call $~lib/arraybuffer/ArrayBuffer~traverse - end - ) - (func $~lib/collector/dummy/__ref_link (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -840,12 +819,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array~traverse (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/array/Array#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -867,7 +841,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array.isArray<~lib/array/Array | null> (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray<~lib/array/Array | null> (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 if (result i32) local.get $0 @@ -877,7 +851,7 @@ i32.const 1 end ) - (func $~lib/array/Array.isArray<~lib/array/Array> (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray<~lib/array/Array> (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 if (result i32) local.get $0 @@ -887,21 +861,19 @@ i32.const 1 end ) - (func $std/array/P~traverse (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) - ) - (func $std/array/P#constructor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/P#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 call $~lib/runtime/runtime.allocate - i32.const 6 + i32.const 5 call $~lib/runtime/runtime.register local.set $0 end local.get $0 ) - (func $~lib/array/Array.isArray (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -911,19 +883,14 @@ i32.const 0 end ) - (func $~lib/typedarray/Uint8Array~traverse (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - call $~lib/arraybuffer/ArrayBufferView~traverse - ) - (func $~lib/typedarray/Uint8Array#constructor (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 else i32.const 12 call $~lib/runtime/runtime.allocate - i32.const 7 + i32.const 6 call $~lib/runtime/runtime.register end local.get $1 @@ -932,7 +899,7 @@ local.set $0 local.get $0 ) - (func $~lib/array/Array.isArray<~lib/typedarray/Uint8Array> (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray<~lib/typedarray/Uint8Array> (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -942,7 +909,7 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -952,7 +919,7 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray<~lib/string/String> (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray<~lib/string/String> (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -962,12 +929,7 @@ i32.const 0 end ) - (func $~lib/array/Array~traverse (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/array/Array#fill (; 30 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1043,7 +1005,7 @@ end local.get $0 ) - (func $~lib/util/memory/memcpy (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2244,7 +2206,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 32 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2475,7 +2437,7 @@ end end ) - (func $~lib/runtime/runtime.makeArray (; 33 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 25 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2539,11 +2501,11 @@ end local.get $4 ) - (func $~lib/array/Array#get:length (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -2552,7 +2514,7 @@ i32.add i32.load8_u ) - (func $~lib/array/Array#__get (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2562,7 +2524,7 @@ if i32.const 0 i32.const 272 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -2571,7 +2533,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/array/isArraysEqual (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2626,12 +2588,7 @@ end i32.const 1 ) - (func $~lib/array/Array~traverse (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/array/Array#fill (; 39 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 30 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2717,11 +2674,11 @@ end local.get $0 ) - (func $~lib/array/Array#get:length (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -2730,7 +2687,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2740,7 +2697,7 @@ if i32.const 0 i32.const 272 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -2749,7 +2706,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/array/isArraysEqual (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2804,17 +2761,17 @@ end i32.const 1 ) - (func $~lib/array/Array#get:length (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/util/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $std/array/internalCapacity (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/internalCapacity (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -2824,14 +2781,14 @@ i32.const 2 i32.shr_s ) - (func $~lib/allocator/arena/__mem_free (; 47 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/runtime.reallocate (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2935,7 +2892,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2957,7 +2914,7 @@ if i32.const 0 i32.const 272 - i32.const 14 + i32.const 15 i32.const 64 call $~lib/env/abort unreachable @@ -3009,7 +2966,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3036,7 +2993,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#__unchecked_get (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -3045,7 +3002,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3055,7 +3012,7 @@ if i32.const 0 i32.const 272 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -3064,7 +3021,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#pop (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3076,7 +3033,7 @@ if i32.const 0 i32.const 272 - i32.const 309 + i32.const 310 i32.const 20 call $~lib/env/abort unreachable @@ -3097,7 +3054,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#concat (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3145,7 +3102,7 @@ call $~lib/memory/memory.copy local.get $4 ) - (func $~lib/array/Array#copyWithin (; 56 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 47 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3335,7 +3292,7 @@ end local.get $0 ) - (func $std/array/isArraysEqual (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -3390,7 +3347,7 @@ end i32.const 1 ) - (func $~lib/array/Array#unshift (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#unshift (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3423,7 +3380,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#shift (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3437,7 +3394,7 @@ if i32.const 0 i32.const 272 - i32.const 381 + i32.const 382 i32.const 20 call $~lib/env/abort unreachable @@ -3472,7 +3429,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#reverse (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#reverse (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3527,7 +3484,7 @@ end local.get $0 ) - (func $~lib/array/Array#indexOf (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3599,7 +3556,7 @@ end i32.const -1 ) - (func $~lib/array/Array#includes (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 local.get $2 @@ -3607,7 +3564,7 @@ i32.const 0 i32.ge_s ) - (func $~lib/array/Array#splice (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3715,7 +3672,7 @@ i32.store offset=12 local.get $6 ) - (func $~lib/array/Array#__unchecked_set (; 64 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.load offset=4 local.get $1 @@ -3725,7 +3682,7 @@ local.get $2 i32.store ) - (func $~lib/array/Array#__set (; 65 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 56 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3751,12 +3708,12 @@ i32.store offset=12 end ) - (func $start:std/array~anonymous|0 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $~lib/array/Array#findIndex (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3815,17 +3772,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3834,12 +3791,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|4 (; 71 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|4 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3847,12 +3804,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 73 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 74 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3912,12 +3869,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 76 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3926,12 +3883,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 77 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3939,12 +3896,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 79 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 80 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 71 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4003,12 +3960,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 81 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 73 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4017,12 +3974,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 83 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 84 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4030,13 +3987,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 85 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 86 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 77 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4088,7 +4045,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 87 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4098,13 +4055,13 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|18 (; 88 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|18 (; 79 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 89 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 80 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -4113,7 +4070,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 90 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 81 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.const 0 @@ -4228,16 +4185,11 @@ end end ) - (func $start:std/array~anonymous|21 (; 91 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 82 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array~traverse (; 92 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/array/Array#map (; 93 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 83 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4248,7 +4200,7 @@ i32.load offset=12 local.set $2 local.get $2 - i32.const 34 + i32.const 9 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -4309,11 +4261,11 @@ end local.get $3 ) - (func $~lib/array/Array#get:length (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 84 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 95 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__unchecked_get (; 85 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $0 i32.load offset=4 local.get $1 @@ -4322,7 +4274,7 @@ i32.add f32.load ) - (func $~lib/array/Array#__get (; 96 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 86 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -4332,7 +4284,7 @@ if i32.const 0 i32.const 272 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -4341,7 +4293,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $start:std/array~anonymous|22 (; 97 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4352,7 +4304,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 88 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4424,14 +4376,14 @@ end local.get $3 ) - (func $start:std/array~anonymous|23 (; 99 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 89 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 100 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 90 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4441,12 +4393,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 101 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 91 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 102 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 92 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4518,7 +4470,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|26 (; 103 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4531,7 +4483,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 104 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 94 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -4540,7 +4492,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 105 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 95 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4552,12 +4504,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 96 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 107 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 97 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4615,12 +4567,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|30 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|30 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|31 (; 109 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4632,7 +4584,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduce (; 110 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 100 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4690,7 +4642,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|32 (; 111 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 101 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4702,7 +4654,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|33 (; 112 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 102 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4711,12 +4663,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|34 (; 113 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|34 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 114 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 104 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4724,12 +4676,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|36 (; 115 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|36 (; 105 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 116 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 106 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4774,12 +4726,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|37 (; 117 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|37 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|38 (; 118 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|38 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4791,7 +4743,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduceRight (; 119 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 109 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4836,7 +4788,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|39 (; 120 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|39 (; 110 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4848,7 +4800,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|40 (; 121 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|40 (; 111 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4857,12 +4809,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|41 (; 122 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|41 (; 112 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|42 (; 123 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|42 (; 113 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4870,7 +4822,7 @@ local.get $1 i32.add ) - (func $~lib/math/murmurHash3 (; 124 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 114 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -4899,7 +4851,7 @@ local.set $0 local.get $0 ) - (func $~lib/math/splitMix32 (; 125 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -4934,7 +4886,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 126 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 116 ;) (type $FUNCSIG$vj) (param $0 i64) local.get $0 i64.eqz if @@ -4963,7 +4915,7 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/util/sort/insertionSort (; 127 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 117 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f32) (local $5 i32) @@ -5059,7 +5011,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 128 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 118 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5359,7 +5311,7 @@ local.get $10 f32.store ) - (func $~lib/array/Array#sort (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 119 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -5372,7 +5324,7 @@ if i32.const 0 i32.const 272 - i32.const 526 + i32.const 527 i32.const 4 call $~lib/env/abort unreachable @@ -5445,7 +5397,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 130 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 120 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5478,7 +5430,7 @@ i32.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 131 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -5488,7 +5440,7 @@ unreachable end block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) - i32.const 57 + i32.const 44 br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 @@ -5497,12 +5449,12 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/builtins/isNaN (; 132 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 122 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $std/array/isArraysEqual (; 133 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 123 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -5573,12 +5525,7 @@ end i32.const 1 ) - (func $~lib/array/Array~traverse (; 134 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/util/sort/insertionSort (; 135 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 124 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) @@ -5674,7 +5621,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 136 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 125 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5974,7 +5921,7 @@ local.get $10 f64.store ) - (func $~lib/array/Array#sort (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -5987,7 +5934,7 @@ if i32.const 0 i32.const 272 - i32.const 526 + i32.const 527 i32.const 4 call $~lib/env/abort unreachable @@ -6060,7 +6007,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 138 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 127 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -6093,7 +6040,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6103,7 +6050,7 @@ unreachable end block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) - i32.const 60 + i32.const 45 br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 @@ -6112,11 +6059,11 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/array/Array#get:length (; 140 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 129 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 141 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__unchecked_get (; 130 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $0 i32.load offset=4 local.get $1 @@ -6125,7 +6072,7 @@ i32.add f64.load ) - (func $~lib/array/Array#__get (; 142 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 131 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -6135,7 +6082,7 @@ if i32.const 0 i32.const 272 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -6144,12 +6091,12 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/builtins/isNaN (; 143 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 132 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $std/array/isArraysEqual (; 144 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 133 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -6220,7 +6167,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 145 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 134 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6316,7 +6263,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 146 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 135 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6616,7 +6563,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6627,7 +6574,7 @@ if i32.const 0 i32.const 272 - i32.const 526 + i32.const 527 i32.const 4 call $~lib/env/abort unreachable @@ -6700,12 +6647,12 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6715,7 +6662,7 @@ unreachable end block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) - i32.const 61 + i32.const 46 br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 @@ -6724,7 +6671,7 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/util/sort/insertionSort (; 150 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 139 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6820,7 +6767,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 151 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 140 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7120,7 +7067,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7131,7 +7078,7 @@ if i32.const 0 i32.const 272 - i32.const 526 + i32.const 527 i32.const 4 call $~lib/env/abort unreachable @@ -7204,7 +7151,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -7213,7 +7160,7 @@ i32.lt_u i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -7223,7 +7170,7 @@ unreachable end block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) - i32.const 62 + i32.const 47 br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 @@ -7232,7 +7179,7 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/array/Array.create (; 155 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create (; 144 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 global.get $~lib/util/runtime/MAX_BYTELENGTH @@ -7242,7 +7189,7 @@ if i32.const 0 i32.const 272 - i32.const 44 + i32.const 45 i32.const 62 call $~lib/env/abort unreachable @@ -7264,7 +7211,7 @@ i32.store offset=12 local.get $1 ) - (func $std/array/createReverseOrderedArray (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -7298,7 +7245,7 @@ end local.get $1 ) - (func $~lib/math/NativeMath.random (; 157 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 146 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) (local $2 i64) @@ -7355,7 +7302,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 158 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 147 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -7389,12 +7336,12 @@ end local.get $1 ) - (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $std/array/isSorted (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -7442,7 +7389,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 161 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 150 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -7458,74 +7405,35 @@ unreachable end ) - (func $std/array/assertSortedDefault (; 162 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 151 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 block $~lib/util/sort/COMPARATOR|inlined.1 (result i32) - i32.const 63 + i32.const 48 br $~lib/util/sort/COMPARATOR|inlined.1 end call $std/array/assertSorted ) - (func $start:std/array~anonymous|43 (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|43 (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|44 (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $start:std/array~anonymous|45 (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|45 (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|46 (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|46 (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array<~lib/array/Array>~traverse (; 167 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.add - local.set $2 - block $break|0 - loop $continue|0 - local.get $1 - local.get $2 - i32.lt_u - if - block - local.get $1 - i32.load - local.set $3 - local.get $3 - call $~lib/collector/dummy/__ref_mark - local.get $3 - call $~lib/array/Array~traverse - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - br $continue|0 - end - end - end - ) - (func $~lib/array/Array.create<~lib/array/Array> (; 168 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create<~lib/array/Array> (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 global.get $~lib/util/runtime/MAX_BYTELENGTH @@ -7535,13 +7443,13 @@ if i32.const 0 i32.const 272 - i32.const 44 + i32.const 45 i32.const 62 call $~lib/env/abort unreachable end local.get $0 - i32.const 68 + i32.const 11 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -7557,7 +7465,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/array/Array<~lib/array/Array>#__unchecked_set (; 169 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__unchecked_set (; 157 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7590,7 +7498,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/array/Array<~lib/array/Array>#__set (; 170 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__set (; 158 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -7601,7 +7509,7 @@ if i32.const 0 i32.const 272 - i32.const 111 + i32.const 112 i32.const 38 call $~lib/env/abort unreachable @@ -7627,7 +7535,7 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedNestedArray (; 171 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 159 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7671,7 +7579,7 @@ end local.get $1 ) - (func $start:std/array~anonymous|47 (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -7680,7 +7588,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/util/sort/insertionSort<~lib/array/Array> (; 173 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort<~lib/array/Array> (; 161 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7776,7 +7684,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/array/Array>#sort (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#sort (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7787,7 +7695,7 @@ if i32.const 0 i32.const 272 - i32.const 526 + i32.const 527 i32.const 4 call $~lib/env/abort unreachable @@ -7850,11 +7758,11 @@ end local.get $0 ) - (func $~lib/array/Array<~lib/array/Array>#get:length (; 175 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#get:length (; 163 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/array/Array>#__unchecked_get (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#__unchecked_get (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -7863,7 +7771,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/array/Array>#__get (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#__get (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -7871,7 +7779,7 @@ if i32.const 0 i32.const 272 - i32.const 96 + i32.const 97 i32.const 45 call $~lib/env/abort unreachable @@ -7885,7 +7793,7 @@ if i32.const 0 i32.const 272 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -7894,7 +7802,7 @@ local.get $1 call $~lib/array/Array<~lib/array/Array>#__unchecked_get ) - (func $std/array/isSorted<~lib/array/Array> (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/array/Array> (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -7942,7 +7850,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/array/Array> (; 179 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/array/Array> (; 167 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#sort @@ -7958,49 +7866,7 @@ unreachable end ) - (func $std/array/Proxy~traverse (; 180 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $~lib/array/Array>~traverse (; 181 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.add - local.set $2 - block $break|0 - loop $continue|0 - local.get $1 - local.get $2 - i32.lt_u - if - block - local.get $1 - i32.load - local.set $3 - local.get $3 - call $~lib/collector/dummy/__ref_mark - local.get $3 - call $std/array/Proxy~traverse - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - br $continue|0 - end - end - end - ) - (func $~lib/array/Array.create> (; 182 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create> (; 168 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 global.get $~lib/util/runtime/MAX_BYTELENGTH @@ -8010,13 +7876,13 @@ if i32.const 0 i32.const 272 - i32.const 44 + i32.const 45 i32.const 62 call $~lib/env/abort unreachable end local.get $0 - i32.const 71 + i32.const 12 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -8032,13 +7898,13 @@ i32.store offset=12 local.get $1 ) - (func $std/array/Proxy#constructor (; 183 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/Proxy#constructor (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if i32.const 4 call $~lib/runtime/runtime.allocate - i32.const 72 + i32.const 13 call $~lib/runtime/runtime.register local.set $0 end @@ -8047,7 +7913,7 @@ i32.store local.get $0 ) - (func $~lib/array/Array>#__unchecked_set (; 184 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__unchecked_set (; 170 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -8080,7 +7946,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/array/Array>#__set (; 185 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__set (; 171 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -8091,7 +7957,7 @@ if i32.const 0 i32.const 272 - i32.const 111 + i32.const 112 i32.const 38 call $~lib/env/abort unreachable @@ -8117,7 +7983,7 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedElementsArray (; 186 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 172 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -8153,14 +8019,14 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 187 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/util/sort/insertionSort> (; 188 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort> (; 174 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8256,7 +8122,7 @@ unreachable end ) - (func $~lib/array/Array>#sort (; 189 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8267,7 +8133,7 @@ if i32.const 0 i32.const 272 - i32.const 526 + i32.const 527 i32.const 4 call $~lib/env/abort unreachable @@ -8330,11 +8196,11 @@ end local.get $0 ) - (func $~lib/array/Array>#get:length (; 190 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#get:length (; 176 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array>#__unchecked_get (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__unchecked_get (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -8343,7 +8209,7 @@ i32.add i32.load ) - (func $~lib/array/Array>#__get (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__get (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -8351,7 +8217,7 @@ if i32.const 0 i32.const 272 - i32.const 96 + i32.const 97 i32.const 45 call $~lib/env/abort unreachable @@ -8365,7 +8231,7 @@ if i32.const 0 i32.const 272 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -8374,7 +8240,7 @@ local.get $1 call $~lib/array/Array>#__unchecked_get ) - (func $std/array/isSorted> (; 193 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 179 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -8422,7 +8288,7 @@ end i32.const 1 ) - (func $std/array/assertSorted> (; 194 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 180 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -8438,49 +8304,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String | null>~traverse (; 195 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.add - local.set $2 - block $break|0 - loop $continue|0 - local.get $1 - local.get $2 - i32.lt_u - if - block - local.get $1 - i32.load - local.set $3 - local.get $3 - if - local.get $3 - call $~lib/collector/dummy/__ref_mark - local.get $3 - call $~lib/string/String~traverse - end - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - br $continue|0 - end - end - end - ) - (func $~lib/util/sort/insertionSort<~lib/string/String | null> (; 196 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort<~lib/string/String | null> (; 181 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8576,7 +8400,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String | null>#sort (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#sort (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8587,7 +8411,7 @@ if i32.const 0 i32.const 272 - i32.const 526 + i32.const 527 i32.const 4 call $~lib/env/abort unreachable @@ -8650,11 +8474,11 @@ end local.get $0 ) - (func $~lib/array/Array<~lib/string/String | null>#get:length (; 198 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#get:length (; 183 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/string/String | null>#__unchecked_get (; 199 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#__unchecked_get (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -8663,7 +8487,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/string/String | null>#__get (; 200 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#__get (; 185 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -8673,7 +8497,7 @@ if i32.const 0 i32.const 272 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -8682,7 +8506,7 @@ local.get $1 call $~lib/array/Array<~lib/string/String | null>#__unchecked_get ) - (func $std/array/isSorted<~lib/string/String | null> (; 201 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/string/String | null> (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -8730,7 +8554,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/string/String | null> (; 202 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String | null> (; 187 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String | null>#sort @@ -8746,7 +8570,7 @@ unreachable end ) - (func $~lib/string/String#get:length (; 203 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 188 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/util/runtime/HEADER_SIZE i32.sub @@ -8754,7 +8578,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 204 ;) (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 (; 189 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -8807,7 +8631,7 @@ end local.get $5 ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 205 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8880,7 +8704,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 206 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 191 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $1of1 block $0of1 block $outOfRange @@ -8892,7 +8716,7 @@ unreachable end block $~lib/util/sort/COMPARATOR<~lib/string/String | null>|inlined.0 (result i32) - i32.const 77 + i32.const 55 br $~lib/util/sort/COMPARATOR<~lib/string/String | null>|inlined.0 end local.set $1 @@ -8901,7 +8725,7 @@ local.get $1 call $std/array/assertSorted<~lib/string/String | null> ) - (func $~lib/string/String.__eq (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -8945,13 +8769,13 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.__ne (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 193 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__eq i32.eqz ) - (func $std/array/isArraysEqual<~lib/string/String | null> (; 209 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual<~lib/string/String | null> (; 194 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -9006,46 +8830,7 @@ end i32.const 1 ) - (func $~lib/array/Array<~lib/string/String>~traverse (; 210 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.add - local.set $2 - block $break|0 - loop $continue|0 - local.get $1 - local.get $2 - i32.lt_u - if - block - local.get $1 - i32.load - local.set $3 - local.get $3 - call $~lib/collector/dummy/__ref_mark - local.get $3 - call $~lib/string/String~traverse - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - br $continue|0 - end - end - end - ) - (func $~lib/array/Array.create<~lib/string/String> (; 211 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create<~lib/string/String> (; 195 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 global.get $~lib/util/runtime/MAX_BYTELENGTH @@ -9055,13 +8840,13 @@ if i32.const 0 i32.const 272 - i32.const 44 + i32.const 45 i32.const 62 call $~lib/env/abort unreachable end local.get $0 - i32.const 78 + i32.const 15 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -9077,7 +8862,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/string/String#charAt (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#charAt (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 0 @@ -9114,7 +8899,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String#concat (; 213 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9164,7 +8949,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String.__concat (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 4424 local.get $0 @@ -9174,7 +8959,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 215 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 199 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -9216,7 +9001,7 @@ end local.get $1 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 216 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 200 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -9249,7 +9034,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/array/Array<~lib/string/String>#__set (; 217 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/string/String>#__set (; 201 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -9260,7 +9045,7 @@ if i32.const 0 i32.const 272 - i32.const 111 + i32.const 112 i32.const 38 call $~lib/env/abort unreachable @@ -9286,7 +9071,7 @@ i32.store offset=12 end ) - (func $std/array/createRandomStringArray (; 218 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomStringArray (; 202 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -9320,7 +9105,7 @@ end local.get $1 ) - (func $~lib/util/sort/insertionSort<~lib/string/String> (; 219 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort<~lib/string/String> (; 203 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9416,7 +9201,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String>#sort (; 220 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#sort (; 204 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9427,7 +9212,7 @@ if i32.const 0 i32.const 272 - i32.const 526 + i32.const 527 i32.const 4 call $~lib/env/abort unreachable @@ -9490,11 +9275,11 @@ end local.get $0 ) - (func $~lib/array/Array<~lib/string/String>#get:length (; 221 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#get:length (; 205 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -9503,7 +9288,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/string/String>#__get (; 223 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -9511,7 +9296,7 @@ if i32.const 0 i32.const 272 - i32.const 96 + i32.const 97 i32.const 45 call $~lib/env/abort unreachable @@ -9525,7 +9310,7 @@ if i32.const 0 i32.const 272 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -9534,7 +9319,7 @@ local.get $1 call $~lib/array/Array<~lib/string/String>#__unchecked_get ) - (func $std/array/isSorted<~lib/string/String> (; 224 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/string/String> (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -9582,7 +9367,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/string/String> (; 225 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String> (; 209 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String>#sort @@ -9598,7 +9383,7 @@ unreachable end ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 (; 210 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9671,7 +9456,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted<~lib/string/String>|trampoline (; 227 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String>|trampoline (; 211 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $1of1 block $0of1 block $outOfRange @@ -9683,7 +9468,7 @@ unreachable end block $~lib/util/sort/COMPARATOR<~lib/string/String>|inlined.0 (result i32) - i32.const 80 + i32.const 56 br $~lib/util/sort/COMPARATOR<~lib/string/String>|inlined.0 end local.set $1 @@ -9692,12 +9477,7 @@ local.get $1 call $std/array/assertSorted<~lib/string/String> ) - (func $~lib/array/Array~traverse (; 228 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/string/String#substring (; 229 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 212 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9815,7 +9595,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/runtime/runtime.discard (; 230 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 213 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -9849,7 +9629,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/array/Array#join_bool (; 231 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_bool (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10023,13 +9803,13 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 232 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 215 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_bool return ) - (func $~lib/util/number/decimalCount32 (; 233 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 216 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -10098,7 +9878,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa32_lut (; 234 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 217 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10241,7 +10021,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 235 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 218 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10297,12 +10077,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa (; 236 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 219 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 237 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 220 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10361,7 +10141,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10494,13 +10274,13 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 239 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/util/number/utoa32 (; 240 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10536,12 +10316,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa (; 241 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 224 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 242 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10580,7 +10360,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 243 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10713,25 +10493,20 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 244 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 227 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/builtins/isFinite (; 245 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 228 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/array/Array~traverse (; 246 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/array/Array#__unchecked_get (; 247 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__unchecked_get (; 229 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $0 i32.load offset=4 local.get $1 @@ -10740,12 +10515,7 @@ i32.add i64.load ) - (func $~lib/array/Array~traverse (; 248 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/array/Array#__unchecked_get (; 249 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 230 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -10754,7 +10524,7 @@ i32.add i32.load16_s ) - (func $~lib/util/number/genDigits (; 250 ;) (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 (; 231 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -11325,7 +11095,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 251 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 232 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11658,7 +11428,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 252 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 233 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -12096,7 +11866,7 @@ local.get $2 i32.add ) - (func $~lib/util/number/dtoa (; 253 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 234 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12143,7 +11913,7 @@ call $~lib/runtime/runtime.discard local.get $3 ) - (func $~lib/util/number/dtoa_stream (; 254 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 235 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12217,7 +11987,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join_flt (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_flt (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12350,13 +12120,13 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 237 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_flt return ) - (func $~lib/array/Array<~lib/string/String>#join_str (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join_str (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12540,70 +12310,25 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/string/String>#join (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join (; 239 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String>#join_str return ) - (func $std/array/Ref~traverse (; 259 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $std/array/Ref#constructor (; 260 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/Ref#constructor (; 240 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 call $~lib/runtime/runtime.allocate - i32.const 87 + i32.const 19 call $~lib/runtime/runtime.register local.set $0 end local.get $0 ) - (func $~lib/array/Array~traverse (; 261 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.add - local.set $2 - block $break|0 - loop $continue|0 - local.get $1 - local.get $2 - i32.lt_u - if - block - local.get $1 - i32.load - local.set $3 - local.get $3 - if - local.get $3 - call $~lib/collector/dummy/__ref_mark - local.get $3 - call $std/array/Ref~traverse - end - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - br $continue|0 - end - end - end - ) - (func $~lib/array/Array#join_ref (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_ref (; 241 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12752,23 +12477,18 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 263 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 242 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_ref return ) - (func $~lib/array/Array#toString (; 264 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 243 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array~traverse (; 265 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/util/number/itoa (; 266 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 244 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -12777,7 +12497,7 @@ call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 267 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 245 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12852,7 +12572,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 268 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12985,30 +12705,25 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 269 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 247 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 270 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 248 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array~traverse (; 271 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/util/number/itoa (; 272 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 249 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 65535 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 273 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 250 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13053,7 +12768,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 274 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 251 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13186,18 +12901,18 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 275 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 276 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 253 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/util/number/decimalCount64 (; 277 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 254 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -13266,7 +12981,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 278 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 255 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -13394,7 +13109,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 279 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 256 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13462,12 +13177,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa (; 280 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 257 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/utoa64 return ) - (func $~lib/util/number/itoa_stream (; 281 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 258 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13533,7 +13248,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13666,23 +13381,18 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 283 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 260 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 284 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 261 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array~traverse (; 285 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/util/number/itoa64 (; 286 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 262 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13772,12 +13482,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa (; 287 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 263 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/itoa64 return ) - (func $~lib/util/number/itoa_stream (; 288 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 264 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13865,7 +13575,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 289 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 265 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13998,18 +13708,18 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 290 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 266 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 291 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 267 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array#join ) - (func $~lib/array/Array<~lib/string/String | null>#join_str (; 292 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#join_str (; 268 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14193,23 +13903,23 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/string/String | null>#join (; 293 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#join (; 269 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String | null>#join_str return ) - (func $~lib/array/Array<~lib/string/String | null>#toString (; 294 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#toString (; 270 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/string/String | null>#join ) - (func $~lib/array/Array<~lib/string/String>#toString (; 295 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#toString (; 271 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/string/String>#join ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 296 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 272 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14313,64 +14023,25 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array>#join (; 297 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join (; 273 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array>#toString (; 298 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#toString (; 274 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/array/Array>#join ) - (func $~lib/array/Array<~lib/array/Array>~traverse (; 299 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.add - local.set $2 - block $break|0 - loop $continue|0 - local.get $1 - local.get $2 - i32.lt_u - if - block - local.get $1 - i32.load - local.set $3 - local.get $3 - call $~lib/collector/dummy/__ref_mark - local.get $3 - call $~lib/array/Array~traverse - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - br $continue|0 - end - end - end - ) - (func $~lib/util/number/itoa (; 300 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 275 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 301 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 276 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -14415,7 +14086,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 302 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 277 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14548,13 +14219,13 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 303 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 278 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 304 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 279 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14658,96 +14329,18 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array>#join (; 305 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join (; 280 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array>#toString (; 306 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#toString (; 281 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/array/Array>#join ) - (func $~lib/array/Array<~lib/array/Array>~traverse (; 307 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.add - local.set $2 - block $break|0 - loop $continue|0 - local.get $1 - local.get $2 - i32.lt_u - if - block - local.get $1 - i32.load - local.set $3 - local.get $3 - call $~lib/collector/dummy/__ref_mark - local.get $3 - call $~lib/array/Array~traverse - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - br $continue|0 - end - end - end - ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~traverse (; 308 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.add - local.set $2 - block $break|0 - loop $continue|0 - local.get $1 - local.get $2 - i32.lt_u - if - block - local.get $1 - i32.load - local.set $3 - local.get $3 - call $~lib/collector/dummy/__ref_mark - local.get $3 - call $~lib/array/Array<~lib/array/Array>~traverse - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - br $continue|0 - end - end - end - ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 309 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14851,13 +14444,13 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array>#join (; 310 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join (; 283 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 311 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 284 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14961,18 +14554,18 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join (; 312 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join (; 285 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#toString (; 313 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#toString (; 286 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 4528 call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join ) - (func $start:std/array (; 314 ;) (type $FUNCSIG$v) + (func $start:std/array (; 287 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15081,7 +14674,7 @@ drop global.get $std/array/arr8 i32.const 5 - i32.const 8 + i32.const 7 i32.const 0 i32.const 248 call $~lib/runtime/runtime.makeArray @@ -15104,7 +14697,7 @@ drop global.get $std/array/arr8 i32.const 5 - i32.const 8 + i32.const 7 i32.const 0 i32.const 320 call $~lib/runtime/runtime.makeArray @@ -15127,7 +14720,7 @@ drop global.get $std/array/arr8 i32.const 5 - i32.const 8 + i32.const 7 i32.const 0 i32.const 344 call $~lib/runtime/runtime.makeArray @@ -15150,7 +14743,7 @@ drop global.get $std/array/arr8 i32.const 5 - i32.const 8 + i32.const 7 i32.const 0 i32.const 368 call $~lib/runtime/runtime.makeArray @@ -15173,7 +14766,7 @@ drop global.get $std/array/arr8 i32.const 5 - i32.const 8 + i32.const 7 i32.const 0 i32.const 392 call $~lib/runtime/runtime.makeArray @@ -15196,7 +14789,7 @@ drop global.get $std/array/arr32 i32.const 5 - i32.const 10 + i32.const 8 i32.const 2 i32.const 488 call $~lib/runtime/runtime.makeArray @@ -15219,7 +14812,7 @@ drop global.get $std/array/arr32 i32.const 5 - i32.const 10 + i32.const 8 i32.const 2 i32.const 528 call $~lib/runtime/runtime.makeArray @@ -15242,7 +14835,7 @@ drop global.get $std/array/arr32 i32.const 5 - i32.const 10 + i32.const 8 i32.const 2 i32.const 568 call $~lib/runtime/runtime.makeArray @@ -15265,7 +14858,7 @@ drop global.get $std/array/arr32 i32.const 5 - i32.const 10 + i32.const 8 i32.const 2 i32.const 608 call $~lib/runtime/runtime.makeArray @@ -15288,7 +14881,7 @@ drop global.get $std/array/arr32 i32.const 5 - i32.const 10 + i32.const 8 i32.const 2 i32.const 648 call $~lib/runtime/runtime.makeArray @@ -17647,7 +17240,7 @@ i32.const 3 call $~lib/array/Array#__set global.get $std/array/arr - i32.const 12 + i32.const 1 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -17663,7 +17256,7 @@ unreachable end global.get $std/array/arr - i32.const 13 + i32.const 2 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -17679,7 +17272,7 @@ unreachable end global.get $std/array/arr - i32.const 14 + i32.const 3 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -17695,7 +17288,7 @@ unreachable end global.get $std/array/arr - i32.const 15 + i32.const 4 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -17724,7 +17317,7 @@ unreachable end global.get $std/array/arr - i32.const 16 + i32.const 5 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -17752,7 +17345,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 17 + i32.const 6 call $~lib/array/Array#findIndex global.set $std/array/i global.get $std/array/i @@ -17789,7 +17382,7 @@ call $~lib/array/Array#push drop global.get $std/array/arr - i32.const 18 + i32.const 7 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -17805,7 +17398,7 @@ unreachable end global.get $std/array/arr - i32.const 19 + i32.const 8 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -17821,7 +17414,7 @@ unreachable end global.get $std/array/arr - i32.const 20 + i32.const 9 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -17850,7 +17443,7 @@ unreachable end global.get $std/array/arr - i32.const 21 + i32.const 10 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -17878,7 +17471,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 22 + i32.const 11 call $~lib/array/Array#every global.set $std/array/every global.get $std/array/every @@ -17915,7 +17508,7 @@ call $~lib/array/Array#push drop global.get $std/array/arr - i32.const 23 + i32.const 12 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -17931,7 +17524,7 @@ unreachable end global.get $std/array/arr - i32.const 24 + i32.const 13 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -17947,7 +17540,7 @@ unreachable end global.get $std/array/arr - i32.const 25 + i32.const 14 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -17976,7 +17569,7 @@ unreachable end global.get $std/array/arr - i32.const 26 + i32.const 15 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -18004,7 +17597,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 27 + i32.const 16 call $~lib/array/Array#some global.set $std/array/some global.get $std/array/some @@ -18043,7 +17636,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 28 + i32.const 17 call $~lib/array/Array#forEach global.get $std/array/i i32.const 6 @@ -18060,7 +17653,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 29 + i32.const 18 call $~lib/array/Array#forEach global.get $std/array/i i32.const 6 @@ -18090,7 +17683,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 30 + i32.const 19 call $~lib/array/Array#forEach global.get $std/array/i i32.const 406 @@ -18119,7 +17712,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 31 + i32.const 20 call $~lib/array/Array#forEach global.get $std/array/i i32.const 1 @@ -18155,7 +17748,7 @@ call $~lib/array/Array#push drop global.get $std/array/arr - i32.const 32 + i32.const 21 call $~lib/array/Array#forEach global.get $std/array/arr call $~lib/array/Array#get:length @@ -18208,7 +17801,7 @@ call $~lib/array/Array#push drop global.get $std/array/arr - i32.const 33 + i32.const 22 call $~lib/array/Array#map global.set $std/array/newArr global.get $std/array/newArr @@ -18244,7 +17837,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 36 + i32.const 23 call $~lib/array/Array#map drop global.get $std/array/i @@ -18275,7 +17868,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 37 + i32.const 24 call $~lib/array/Array#map drop global.get $std/array/i @@ -18305,7 +17898,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 38 + i32.const 25 call $~lib/array/Array#map drop global.get $std/array/i @@ -18342,7 +17935,7 @@ call $~lib/array/Array#push drop global.get $std/array/arr - i32.const 39 + i32.const 26 call $~lib/array/Array#filter global.set $std/array/filteredArr global.get $std/array/filteredArr @@ -18361,7 +17954,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 40 + i32.const 27 call $~lib/array/Array#filter drop global.get $std/array/i @@ -18392,7 +17985,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 41 + i32.const 28 call $~lib/array/Array#filter drop global.get $std/array/i @@ -18422,7 +18015,7 @@ i32.const 0 global.set $std/array/i global.get $std/array/arr - i32.const 42 + i32.const 29 call $~lib/array/Array#filter drop global.get $std/array/i @@ -18459,7 +18052,7 @@ call $~lib/array/Array#push drop global.get $std/array/arr - i32.const 43 + i32.const 30 i32.const 0 call $~lib/array/Array#reduce global.set $std/array/i @@ -18476,7 +18069,7 @@ unreachable end global.get $std/array/arr - i32.const 44 + i32.const 31 i32.const 4 call $~lib/array/Array#reduce global.set $std/array/i @@ -18493,7 +18086,7 @@ unreachable end global.get $std/array/arr - i32.const 45 + i32.const 32 i32.const 0 call $~lib/array/Array#reduce i32.const 0 @@ -18512,7 +18105,7 @@ unreachable end global.get $std/array/arr - i32.const 46 + i32.const 33 i32.const 0 call $~lib/array/Array#reduce i32.const 0 @@ -18531,7 +18124,7 @@ unreachable end global.get $std/array/arr - i32.const 47 + i32.const 34 i32.const 0 call $~lib/array/Array#reduce global.set $std/array/i @@ -18561,7 +18154,7 @@ unreachable end global.get $std/array/arr - i32.const 48 + i32.const 35 i32.const 0 call $~lib/array/Array#reduce global.set $std/array/i @@ -18590,7 +18183,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 49 + i32.const 36 i32.const 0 call $~lib/array/Array#reduce global.set $std/array/i @@ -18628,7 +18221,7 @@ call $~lib/array/Array#push drop global.get $std/array/arr - i32.const 50 + i32.const 37 i32.const 0 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -18645,7 +18238,7 @@ unreachable end global.get $std/array/arr - i32.const 51 + i32.const 38 i32.const 4 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -18662,7 +18255,7 @@ unreachable end global.get $std/array/arr - i32.const 52 + i32.const 39 i32.const 0 call $~lib/array/Array#reduceRight i32.const 0 @@ -18681,7 +18274,7 @@ unreachable end global.get $std/array/arr - i32.const 53 + i32.const 40 i32.const 0 call $~lib/array/Array#reduceRight i32.const 0 @@ -18700,7 +18293,7 @@ unreachable end global.get $std/array/arr - i32.const 54 + i32.const 41 i32.const 0 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -18730,7 +18323,7 @@ unreachable end global.get $std/array/arr - i32.const 55 + i32.const 42 i32.const 0 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -18759,7 +18352,7 @@ call $~lib/array/Array#pop drop global.get $std/array/arr - i32.const 56 + i32.const 43 i32.const 0 call $~lib/array/Array#reduceRight global.set $std/array/i @@ -18817,7 +18410,7 @@ drop global.get $std/array/f32ArrayTyped i32.const 8 - i32.const 34 + i32.const 9 i32.const 2 i32.const 3304 call $~lib/runtime/runtime.makeArray @@ -18842,7 +18435,7 @@ drop global.get $std/array/f64ArrayTyped i32.const 8 - i32.const 58 + i32.const 10 i32.const 3 i32.const 3464 call $~lib/runtime/runtime.makeArray @@ -18892,7 +18485,7 @@ drop global.get $std/array/u32ArrayTyped i32.const 5 - i32.const 10 + i32.const 8 i32.const 2 i32.const 3728 call $~lib/runtime/runtime.makeArray @@ -19046,28 +18639,28 @@ call $std/array/createRandomOrderedArray global.set $std/array/randomized257 global.get $std/array/randomized64 - i32.const 64 + i32.const 49 call $std/array/assertSorted global.get $std/array/randomized64 - i32.const 65 + i32.const 50 call $std/array/assertSorted global.get $std/array/randomized257 - i32.const 66 + i32.const 51 call $std/array/assertSorted global.get $std/array/randomized257 - i32.const 67 + i32.const 52 call $std/array/assertSorted i32.const 512 call $std/array/createReverseOrderedNestedArray global.set $std/array/reversedNested512 global.get $std/array/reversedNested512 - i32.const 70 + i32.const 53 call $std/array/assertSorted<~lib/array/Array> i32.const 512 call $std/array/createReverseOrderedElementsArray global.set $std/array/reversedElements512 global.get $std/array/reversedElements512 - i32.const 74 + i32.const 54 call $std/array/assertSorted> block i32.const 1 @@ -19100,7 +18693,7 @@ call $std/array/assertSorted<~lib/string/String>|trampoline end i32.const 2 - i32.const 81 + i32.const 16 i32.const 0 i32.const 4552 call $~lib/runtime/runtime.makeArray @@ -19136,7 +18729,7 @@ unreachable end i32.const 3 - i32.const 10 + i32.const 8 i32.const 2 i32.const 5240 call $~lib/runtime/runtime.makeArray @@ -19172,7 +18765,7 @@ unreachable end i32.const 6 - i32.const 58 + i32.const 10 i32.const 3 i32.const 6672 call $~lib/runtime/runtime.makeArray @@ -19190,7 +18783,7 @@ unreachable end i32.const 3 - i32.const 78 + i32.const 15 i32.const 2 i32.const 6888 call $~lib/runtime/runtime.makeArray @@ -19209,7 +18802,7 @@ end block (result i32) i32.const 3 - i32.const 88 + i32.const 20 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -19328,7 +18921,7 @@ unreachable end i32.const 3 - i32.const 90 + i32.const 21 i32.const 0 i32.const 7128 call $~lib/runtime/runtime.makeArray @@ -19345,7 +18938,7 @@ unreachable end i32.const 3 - i32.const 92 + i32.const 22 i32.const 1 i32.const 7208 call $~lib/runtime/runtime.makeArray @@ -19362,7 +18955,7 @@ unreachable end i32.const 3 - i32.const 83 + i32.const 17 i32.const 3 i32.const 7312 call $~lib/runtime/runtime.makeArray @@ -19379,7 +18972,7 @@ unreachable end i32.const 4 - i32.const 94 + i32.const 23 i32.const 3 i32.const 7464 call $~lib/runtime/runtime.makeArray @@ -19409,7 +19002,7 @@ unreachable end i32.const 4 - i32.const 78 + i32.const 15 i32.const 2 i32.const 7744 call $~lib/runtime/runtime.makeArray @@ -19427,7 +19020,7 @@ end block (result i32) i32.const 2 - i32.const 68 + i32.const 11 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -19481,7 +19074,7 @@ end block (result i32) i32.const 2 - i32.const 96 + i32.const 24 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -19492,7 +19085,7 @@ local.get $1 block (result i32) i32.const 2 - i32.const 8 + i32.const 7 i32.const 0 i32.const 7936 call $~lib/runtime/runtime.makeArray @@ -19506,7 +19099,7 @@ local.get $1 block (result i32) i32.const 2 - i32.const 8 + i32.const 7 i32.const 0 i32.const 7960 call $~lib/runtime/runtime.makeArray @@ -19535,7 +19128,7 @@ end block (result i32) i32.const 1 - i32.const 100 + i32.const 26 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -19547,7 +19140,7 @@ block (result i32) block (result i32) i32.const 1 - i32.const 98 + i32.const 25 i32.const 2 i32.const 0 call $~lib/runtime/runtime.makeArray @@ -19558,7 +19151,7 @@ local.get $3 block (result i32) i32.const 1 - i32.const 10 + i32.const 8 i32.const 2 i32.const 8056 call $~lib/runtime/runtime.makeArray @@ -19595,7 +19188,7 @@ unreachable end ) - (func $std/array/main (; 315 ;) (type $FUNCSIG$v) + (func $std/array/main (; 288 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -19604,9 +19197,9 @@ global.set $~lib/started end ) - (func $start (; 316 ;) (type $FUNCSIG$v) + (func $start (; 289 ;) (type $FUNCSIG$v) call $start:std/array ) - (func $null (; 317 ;) (type $FUNCSIG$v) + (func $null (; 290 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 88dff2ae8a..c3e7a6fb1a 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) @@ -23,14 +23,14 @@ (type $FUNCSIG$vid (func (param i32 f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\03\00\00\00\1e") + (data (i32.const 8) "\02\00\00\00\1e") (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 56) "\03\00\00\00&") + (data (i32.const 56) "\02\00\00\00&") (data (i32.const 72) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 112) "\03\00\00\00\14") + (data (i32.const 112) "\02\00\00\00\14") (data (i32.const 128) "s\00t\00d\00/\00m\00a\00p\00.\00t\00s") - (table $0 23 funcref) - (elem (i32.const 0) $null $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/string/String~traverse $~lib/string/String~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse) + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) @@ -127,18 +127,7 @@ i32.const 16 i32.add ) - (func $~lib/map/Map~traverse (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - drop - local.get $0 - i32.load offset=8 - drop - ) - (func $~lib/string/String~traverse (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 148 @@ -171,7 +160,7 @@ i32.store local.get $0 ) - (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -382,7 +371,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -401,10 +390,10 @@ local.get $0 call $~lib/memory/memory.fill local.get $1 - i32.const 4 + i32.const 3 call $~lib/runtime/runtime.register ) - (func $~lib/map/Map#clear (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -439,7 +428,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 9 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate @@ -467,7 +456,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -512,7 +501,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -528,7 +517,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -638,7 +627,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -737,7 +726,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -758,7 +747,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -825,7 +814,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 16 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 14 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -1169,11 +1158,11 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 17 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 15 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 5 + i32.const 4 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -1197,7 +1186,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#has (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1211,7 +1200,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1321,7 +1310,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1418,7 +1407,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1437,7 +1426,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -1502,7 +1491,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 23 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 21 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -1832,11 +1821,11 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 24 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 22 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 7 + i32.const 5 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -1860,7 +1849,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -1905,7 +1894,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1930,7 +1919,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2049,7 +2038,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2157,7 +2146,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2187,7 +2176,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2263,7 +2252,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 31 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 29 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -2607,11 +2596,11 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 32 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 30 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 9 + i32.const 6 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -2635,7 +2624,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#has (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2658,7 +2647,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2777,7 +2766,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2883,7 +2872,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2911,7 +2900,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2985,7 +2974,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 38 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 36 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -3315,11 +3304,11 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 39 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 37 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 11 + i32.const 7 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -3343,7 +3332,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -3374,7 +3363,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -3417,7 +3406,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -3426,7 +3415,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 43 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3533,7 +3522,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 44 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3623,7 +3612,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -3637,7 +3626,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 46 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3697,7 +3686,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 47 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 45 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -4013,11 +4002,11 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 48 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 46 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 13 + i32.const 8 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -4041,7 +4030,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $std/map/testNumeric (; 49 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 47 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -4357,7 +4346,7 @@ unreachable end ) - (func $~lib/map/Map#clear (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -4392,11 +4381,11 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 51 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 49 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 15 + i32.const 9 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -4420,7 +4409,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 52 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 50 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -4486,7 +4475,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 53 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 51 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -4529,7 +4518,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 54 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 52 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -4538,7 +4527,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4645,7 +4634,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 56 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 54 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4735,7 +4724,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 57 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 55 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -4749,7 +4738,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 58 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/map/Map#delete (; 56 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -4810,7 +4799,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 59 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 57 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/map/Map#constructor @@ -5133,11 +5122,11 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 60 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 58 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 17 + i32.const 10 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -5161,7 +5150,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $std/map/testNumeric (; 61 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 59 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/map/Map#constructor @@ -5484,11 +5473,11 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 62 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 60 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 19 + i32.const 11 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -5512,7 +5501,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 63 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 61 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -5555,7 +5544,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 64 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 62 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -5565,7 +5554,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 65 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5673,7 +5662,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 66 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/map/Map#set (; 64 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5764,7 +5753,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 67 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 65 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -5779,7 +5768,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 68 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/map/Map#delete (; 66 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -5841,7 +5830,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 69 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 67 ;) (type $FUNCSIG$v) (local $0 f32) (local $1 i32) call $~lib/map/Map#constructor @@ -6164,11 +6153,11 @@ unreachable end ) - (func $~lib/map/Map#constructor (; 70 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 68 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 21 + i32.const 12 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -6192,7 +6181,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 71 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 69 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -6235,7 +6224,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 72 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 70 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -6245,7 +6234,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 73 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 71 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6353,7 +6342,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 74 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/map/Map#set (; 72 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6444,7 +6433,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 75 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 73 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -6459,7 +6448,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 76 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/map/Map#delete (; 74 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -6521,7 +6510,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 77 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 75 ;) (type $FUNCSIG$v) (local $0 f64) (local $1 i32) call $~lib/map/Map#constructor @@ -6844,7 +6833,7 @@ unreachable end ) - (func $start (; 78 ;) (type $FUNCSIG$v) + (func $start (; 76 ;) (type $FUNCSIG$v) i32.const 152 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset @@ -6860,7 +6849,7 @@ call $std/map/testNumeric call $std/map/testNumeric ) - (func $null (; 79 ;) (type $FUNCSIG$v) + (func $null (; 77 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 5576d309f8..c6641440bc 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) @@ -19,11 +19,11 @@ (type $FUNCSIG$vidi (func (param i32 f64 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\03\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 56) "\03\00\00\00&\00\00\00\00\00\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 112) "\03\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") - (table $0 23 funcref) - (elem (i32.const 0) $null $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/string/String~traverse $~lib/arraybuffer/ArrayBuffer~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse $~lib/map/Map~traverse) + (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\02\00\00\00&\00\00\00\00\00\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 112) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) @@ -154,27 +154,10 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/collector/dummy/__ref_mark (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/map/Map~traverse (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/string/String~traverse (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $~lib/collector/dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/runtime/runtime.register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -212,7 +195,7 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/memory/memory.fill (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -469,10 +452,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer~traverse (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 global.get $~lib/util/runtime/MAX_BYTELENGTH @@ -493,16 +473,16 @@ local.get $1 call $~lib/memory/memory.fill local.get $2 - i32.const 4 + i32.const 3 call $~lib/runtime/runtime.register ) - (func $~lib/collector/dummy/__ref_link (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/map/Map#clear (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -571,7 +551,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -605,14 +585,14 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash8 (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const -2128831035 local.get $0 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -667,7 +647,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -686,7 +666,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -860,7 +840,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -968,7 +948,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -994,11 +974,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1075,7 +1055,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 25 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 21 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1459,18 +1439,7 @@ unreachable end ) - (func $~lib/map/Map~traverse (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/map/Map#clear (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1539,14 +1508,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 5 + i32.const 4 call $~lib/runtime/runtime.register local.set $0 end @@ -1573,7 +1542,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1626,7 +1595,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1643,7 +1612,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1817,7 +1786,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 32 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1923,7 +1892,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -1947,11 +1916,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2026,7 +1995,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 36 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 31 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2396,18 +2365,7 @@ unreachable end ) - (func $~lib/map/Map~traverse (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/map/Map#clear (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2476,14 +2434,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 7 + i32.const 5 call $~lib/runtime/runtime.register local.set $0 end @@ -2510,7 +2468,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -2532,7 +2490,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2587,7 +2545,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2606,7 +2564,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 43 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2780,7 +2738,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 44 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2888,7 +2846,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2914,11 +2872,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2995,7 +2953,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 48 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 42 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3379,18 +3337,7 @@ unreachable end ) - (func $~lib/map/Map~traverse (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/map/Map#clear (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3459,14 +3406,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 9 + i32.const 6 call $~lib/runtime/runtime.register local.set $0 end @@ -3493,7 +3440,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3546,7 +3493,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -3563,7 +3510,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 47 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3737,7 +3684,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 48 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3843,7 +3790,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3867,11 +3814,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3946,7 +3893,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 59 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 52 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4316,18 +4263,7 @@ unreachable end ) - (func $~lib/map/Map~traverse (; 60 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/map/Map#clear (; 61 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 53 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4396,14 +4332,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 11 + i32.const 7 call $~lib/runtime/runtime.register local.set $0 end @@ -4430,7 +4366,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 63 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -4472,7 +4408,7 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4523,7 +4459,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -4538,7 +4474,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 66 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 58 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4712,7 +4648,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 67 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 59 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4816,7 +4752,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 68 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4838,11 +4774,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 62 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4915,7 +4851,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 71 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 63 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5271,18 +5207,7 @@ unreachable end ) - (func $~lib/map/Map~traverse (; 72 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/map/Map#clear (; 73 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 64 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5351,14 +5276,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 74 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 65 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 13 + i32.const 8 call $~lib/runtime/runtime.register local.set $0 end @@ -5385,7 +5310,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5436,7 +5361,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -5451,7 +5376,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 77 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 68 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5625,7 +5550,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 69 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5729,7 +5654,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 79 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5751,11 +5676,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 71 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 81 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 72 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5828,7 +5753,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 82 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 73 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6184,18 +6109,7 @@ unreachable end ) - (func $~lib/map/Map~traverse (; 83 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/map/Map#clear (; 84 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 74 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6264,14 +6178,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 85 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 75 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 15 + i32.const 9 call $~lib/runtime/runtime.register local.set $0 end @@ -6298,7 +6212,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 86 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 76 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6386,7 +6300,7 @@ local.set $3 local.get $3 ) - (func $~lib/map/Map#find (; 87 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 77 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6437,7 +6351,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 88 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 78 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -6452,7 +6366,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 89 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 79 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6627,7 +6541,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 90 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 80 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) @@ -6732,7 +6646,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 91 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 81 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) local.get $0 @@ -6754,11 +6668,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 82 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 93 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 83 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6832,7 +6746,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 94 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 84 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -7195,18 +7109,7 @@ unreachable end ) - (func $~lib/map/Map~traverse (; 95 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/map/Map#clear (; 96 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 85 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7275,14 +7178,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 97 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 86 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 17 + i32.const 10 call $~lib/runtime/runtime.register local.set $0 end @@ -7309,7 +7212,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 98 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 87 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7360,7 +7263,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 99 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 88 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -7375,7 +7278,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 100 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 89 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7550,7 +7453,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 101 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 90 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) @@ -7655,7 +7558,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 102 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 91 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) local.get $0 @@ -7677,11 +7580,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 103 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 104 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 93 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -7755,7 +7658,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 105 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 94 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -8118,18 +8021,7 @@ unreachable end ) - (func $~lib/map/Map~traverse (; 106 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/map/Map#clear (; 107 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 95 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8198,14 +8090,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 108 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 96 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 19 + i32.const 11 call $~lib/runtime/runtime.register local.set $0 end @@ -8232,7 +8124,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 109 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 97 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -8283,7 +8175,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 110 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 98 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) local.get $0 local.get $1 @@ -8299,7 +8191,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 111 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 99 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8475,7 +8367,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 112 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/map/Map#set (; 100 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) (local $3 f32) (local $4 i32) (local $5 i32) @@ -8581,7 +8473,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 113 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 101 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) local.get $0 @@ -8604,11 +8496,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 114 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 115 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#delete (; 103 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -8683,7 +8575,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 116 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 104 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -9046,18 +8938,7 @@ unreachable end ) - (func $~lib/map/Map~traverse (; 117 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/map/Map#clear (; 118 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 105 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9126,14 +9007,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 119 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 106 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 21 + i32.const 12 call $~lib/runtime/runtime.register local.set $0 end @@ -9160,7 +9041,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 120 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 107 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -9211,7 +9092,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 121 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 108 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) local.get $0 local.get $1 @@ -9227,7 +9108,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 122 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 109 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9403,7 +9284,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 123 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/map/Map#set (; 110 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) (local $3 f64) (local $4 i32) (local $5 i32) @@ -9509,7 +9390,7 @@ i32.store end ) - (func $~lib/map/Map#get (; 124 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 111 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) local.get $0 @@ -9532,11 +9413,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 125 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 112 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 126 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#delete (; 113 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -9611,7 +9492,7 @@ end i32.const 1 ) - (func $std/map/testNumeric (; 127 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 114 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -9974,7 +9855,7 @@ unreachable end ) - (func $start:std/map (; 128 ;) (type $FUNCSIG$v) + (func $start:std/map (; 115 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -9996,9 +9877,9 @@ call $std/map/testNumeric call $std/map/testNumeric ) - (func $start (; 129 ;) (type $FUNCSIG$v) + (func $start (; 116 ;) (type $FUNCSIG$v) call $start:std/map ) - (func $null (; 130 ;) (type $FUNCSIG$v) + (func $null (; 117 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index 59e251fce4..7fdc3211bf 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -1,8 +1,8 @@ (module - (type $FUNCSIG$vi (func (param 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$vi (func (param i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -12,8 +12,8 @@ (data (i32.const 64) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (data (i32.const 96) "\01\00\00\00*") (data (i32.const 112) "s\00t\00d\00/\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") - (table $0 4 funcref) - (elem (i32.const 0) $null $~lib/string/String~traverse $std/object-literal/Foo~traverse $~lib/string/String~traverse) + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) @@ -21,10 +21,7 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/string/String~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -86,7 +83,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -113,12 +110,7 @@ i32.const 16 i32.add ) - (func $std/object-literal/Foo~traverse (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load offset=4 - drop - ) - (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 156 @@ -151,7 +143,7 @@ i32.store local.get $0 ) - (func $~lib/util/string/compareImpl (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/compareImpl (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 24 @@ -187,7 +179,7 @@ end local.get $3 ) - (func $~lib/string/String.__eq (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.__eq (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 24 @@ -230,7 +222,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/object-literal/bar (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/object-literal/bar (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 1 @@ -256,7 +248,7 @@ unreachable end ) - (func $start:std/object-literal (; 9 ;) (type $FUNCSIG$v) + (func $start:std/object-literal (; 7 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 160 global.set $~lib/allocator/arena/startOffset @@ -313,10 +305,10 @@ unreachable end ) - (func $start (; 10 ;) (type $FUNCSIG$v) + (func $start (; 8 ;) (type $FUNCSIG$v) call $start:std/object-literal ) - (func $null (; 11 ;) (type $FUNCSIG$v) + (func $null (; 9 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/object-literal.untouched.wat b/tests/compiler/std/object-literal.untouched.wat index 33aa46c66e..e0609359e5 100644 --- a/tests/compiler/std/object-literal.untouched.wat +++ b/tests/compiler/std/object-literal.untouched.wat @@ -1,8 +1,8 @@ (module - (type $FUNCSIG$vi (func (param 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$vi (func (param i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -10,8 +10,8 @@ (data (i32.const 8) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d\00") (data (i32.const 48) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 96) "\01\00\00\00*\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") - (table $0 4 funcref) - (elem (i32.const 0) $null $~lib/string/String~traverse $std/object-literal/Foo~traverse $std/object-literal/Foo2~traverse) + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) @@ -23,10 +23,7 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/string/String~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -38,7 +35,7 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -117,12 +114,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/runtime.adjust @@ -144,25 +141,10 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/collector/dummy/__ref_mark (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $std/object-literal/Foo~traverse (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - if - local.get $1 - call $~lib/collector/dummy/__ref_mark - local.get $1 - call $~lib/string/String~traverse - end - ) - (func $~lib/collector/dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/runtime.register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -200,7 +182,7 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/string/String#get:length (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/util/runtime/HEADER_SIZE i32.sub @@ -208,7 +190,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 11 ;) (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 (; 8 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -261,7 +243,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -305,7 +287,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/object-literal/bar (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/object-literal/bar (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 1 @@ -333,10 +315,7 @@ unreachable end ) - (func $std/object-literal/Foo2~traverse (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $std/object-literal/bar2 (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/object-literal/bar2 (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 2 @@ -351,7 +330,7 @@ unreachable end ) - (func $std/object-literal/Foo2#test (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/object-literal/Foo2#test (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 3 @@ -366,7 +345,7 @@ unreachable end ) - (func $start:std/object-literal (; 17 ;) (type $FUNCSIG$v) + (func $start:std/object-literal (; 13 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -420,9 +399,9 @@ end call $std/object-literal/Foo2#test ) - (func $start (; 18 ;) (type $FUNCSIG$v) + (func $start (; 14 ;) (type $FUNCSIG$v) call $start:std/object-literal ) - (func $null (; 19 ;) (type $FUNCSIG$v) + (func $null (; 15 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 5ee1173bed..7b3867b2e2 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -1,5 +1,4 @@ (module - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) @@ -7,6 +6,7 @@ (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) @@ -23,8 +23,8 @@ (data (i32.const 168) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") (data (i32.const 216) "\03\00\00\00\1e") (data (i32.const 232) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (table $0 4 funcref) - (elem (i32.const 0) $null $std/runtime/A~traverse $std/runtime/A~traverse $std/runtime/A~traverse) + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $std/runtime/register_ref (mut i32) (i32.const 0)) (global $std/runtime/barrier1 (mut i32) (i32.const 0)) (global $std/runtime/barrier2 (mut i32) (i32.const 0)) @@ -44,10 +44,7 @@ (export "table" (table $0)) (export "main" (func $std/runtime/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $std/runtime/A~traverse (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.const 22 i32.ge_u @@ -67,7 +64,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 4 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 22 i32.ge_u @@ -102,7 +99,7 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Block#get:right (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const -4 @@ -136,7 +133,7 @@ end local.get $0 ) - (func $~lib/allocator/tlsf/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -152,7 +149,7 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -186,7 +183,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -205,7 +202,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -334,7 +331,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const 2 @@ -364,7 +361,7 @@ end local.get $0 ) - (func $~lib/allocator/tlsf/Root#setJump (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 i32.load i32.const 1 @@ -409,7 +406,7 @@ local.get $0 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -639,7 +636,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -762,7 +759,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#insert ) - (func $~lib/allocator/tlsf/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -776,7 +773,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -888,7 +885,7 @@ end end ) - (func $~lib/allocator/tlsf/Root#use (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -999,7 +996,7 @@ i32.const 8 i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1169,7 +1166,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/runtime.allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -1196,7 +1193,7 @@ i32.const 16 i32.add ) - (func $~lib/util/memory/memcpy (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2043,7 +2040,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2237,7 +2234,7 @@ end end ) - (func $~lib/memory/memory.fill (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -2448,7 +2445,7 @@ end end ) - (func $~lib/allocator/tlsf/__mem_free (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2486,7 +2483,7 @@ end end ) - (func $~lib/runtime/runtime.reallocate (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2593,7 +2590,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/runtime.discard (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 264 i32.le_u @@ -2623,7 +2620,7 @@ local.get $0 call $~lib/allocator/tlsf/__mem_free ) - (func $~lib/runtime/runtime.register (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.register (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.const 264 @@ -2657,7 +2654,7 @@ local.get $0 global.set $std/runtime/register_ref ) - (func $start:std/runtime (; 26 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 25 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2976,7 +2973,7 @@ unreachable end ) - (func $std/runtime/main (; 27 ;) (type $FUNCSIG$v) + (func $std/runtime/main (; 26 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -2985,7 +2982,7 @@ global.set $~lib/started end ) - (func $null (; 28 ;) (type $FUNCSIG$v) + (func $null (; 27 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index e44b701d26..d90c40d098 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -1,5 +1,4 @@ (module - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) @@ -7,6 +6,7 @@ (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) @@ -17,8 +17,8 @@ (data (i32.const 120) "\03\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\003\00") (data (i32.const 152) "\03\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") (data (i32.const 216) "\03\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (table $0 4 funcref) - (elem (i32.const 0) $null $std/runtime/A~traverse $std/runtime/B~traverse $~lib/string/String~traverse) + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $std/runtime/register_ref (mut i32) (i32.const 0)) (global $std/runtime/link_ref (mut i32) (i32.const 0)) (global $std/runtime/link_parentRef (mut i32) (i32.const 0)) @@ -60,14 +60,7 @@ (export "table" (table $0)) (export "main" (func $std/runtime/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $std/runtime/A~traverse (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - ) - (func $std/runtime/B~traverse (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) - ) - (func $~lib/string/String~traverse (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $~lib/runtime/runtime.adjust (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -79,7 +72,7 @@ i32.sub i32.shl ) - (func $std/runtime/isPowerOf2 (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/runtime/isPowerOf2 (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 0 @@ -97,12 +90,12 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 0 local.get $1 i32.store offset=2912 ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -123,7 +116,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 9 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 6 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -160,11 +153,11 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Root#get:tailRef (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.load offset=2912 ) - (func $~lib/allocator/tlsf/Block#get:right (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -204,7 +197,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/fls (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -222,7 +215,7 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -258,7 +251,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -278,7 +271,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -423,7 +416,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -455,7 +448,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/Root#setJump (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.load global.get $~lib/allocator/tlsf/FREE @@ -501,7 +494,7 @@ local.get $1 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -767,7 +760,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -920,7 +913,7 @@ call $~lib/allocator/tlsf/Root#insert i32.const 1 ) - (func $~lib/allocator/tlsf/ffs (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -936,7 +929,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/ffs (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -952,7 +945,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1093,7 +1086,7 @@ end local.get $6 ) - (func $~lib/allocator/tlsf/Root#use (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1221,7 +1214,7 @@ global.get $~lib/allocator/tlsf/Block.INFO i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1457,12 +1450,12 @@ local.get $0 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/memory/memory.allocate (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/runtime.adjust @@ -1484,7 +1477,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/util/memory/memcpy (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2685,7 +2678,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2916,7 +2909,7 @@ end end ) - (func $~lib/memory/memory.fill (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3173,7 +3166,7 @@ end end ) - (func $~lib/allocator/tlsf/__mem_free (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3216,15 +3209,15 @@ end end ) - (func $~lib/memory/memory.free (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/tlsf/__mem_free ) - (func $std/runtime/__ref_register (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/runtime/__ref_register (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $std/runtime/register_ref ) - (func $~lib/runtime/runtime.reallocate (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3328,7 +3321,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/runtime.discard (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3362,7 +3355,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/runtime/runtime.register (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3400,13 +3393,13 @@ call $std/runtime/__ref_register local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/util/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $~lib/string/String#get:length (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/util/runtime/HEADER_SIZE i32.sub @@ -3414,7 +3407,7 @@ i32.const 1 i32.shr_u ) - (func $start:std/runtime (; 38 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 35 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 1 i32.const 2 @@ -3734,7 +3727,7 @@ unreachable end ) - (func $std/runtime/main (; 39 ;) (type $FUNCSIG$v) + (func $std/runtime/main (; 36 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -3743,9 +3736,9 @@ global.set $~lib/started end ) - (func $start (; 40 ;) (type $FUNCSIG$v) + (func $start (; 37 ;) (type $FUNCSIG$v) call $start:std/runtime ) - (func $null (; 41 ;) (type $FUNCSIG$v) + (func $null (; 38 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 10d5f124d2..6dde9b446a 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) @@ -19,14 +19,14 @@ (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\03\00\00\00\1e") + (data (i32.const 8) "\02\00\00\00\1e") (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 56) "\03\00\00\00&") + (data (i32.const 56) "\02\00\00\00&") (data (i32.const 72) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 112) "\03\00\00\00\14") + (data (i32.const 112) "\02\00\00\00\14") (data (i32.const 128) "s\00t\00d\00/\00s\00e\00t\00.\00t\00s") - (table $0 23 funcref) - (elem (i32.const 0) $null $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/string/String~traverse $~lib/string/String~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse) + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) @@ -123,18 +123,7 @@ i32.const 16 i32.add ) - (func $~lib/set/Set~traverse (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - drop - local.get $0 - i32.load offset=8 - drop - ) - (func $~lib/string/String~traverse (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 148 @@ -167,7 +156,7 @@ i32.store local.get $0 ) - (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -378,7 +367,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -397,10 +386,10 @@ local.get $0 call $~lib/memory/memory.fill local.get $1 - i32.const 4 + i32.const 3 call $~lib/runtime/runtime.register ) - (func $~lib/set/Set#clear (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -435,7 +424,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 9 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate @@ -463,7 +452,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -508,7 +497,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -524,7 +513,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -630,7 +619,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -722,7 +711,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -789,7 +778,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 15 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 13 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -1034,11 +1023,11 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 16 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 14 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 5 + i32.const 4 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -1062,7 +1051,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#has (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1076,7 +1065,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1182,7 +1171,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1272,7 +1261,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -1337,7 +1326,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 21 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 19 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -1582,11 +1571,11 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 22 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 20 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 7 + i32.const 5 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -1610,7 +1599,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -1655,7 +1644,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1680,7 +1669,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1795,7 +1784,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1896,7 +1885,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -1972,7 +1961,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 28 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 26 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -2217,11 +2206,11 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 29 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 27 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 9 + i32.const 6 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -2245,7 +2234,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#has (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2268,7 +2257,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2383,7 +2372,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2482,7 +2471,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2556,7 +2545,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 34 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 32 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -2801,11 +2790,11 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 35 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 33 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 11 + i32.const 7 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -2829,7 +2818,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -2860,7 +2849,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -2903,7 +2892,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2912,7 +2901,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3015,7 +3004,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 40 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3098,7 +3087,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3158,7 +3147,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 42 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 40 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -3403,11 +3392,11 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 43 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 41 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 13 + i32.const 8 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -3431,7 +3420,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $std/set/testNumeric (; 44 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 42 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -3676,7 +3665,7 @@ unreachable end ) - (func $~lib/set/Set#clear (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -3711,11 +3700,11 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 46 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 44 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 15 + i32.const 9 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -3739,7 +3728,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 47 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -3805,7 +3794,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 48 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 46 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -3848,7 +3837,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 49 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 47 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -3857,7 +3846,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 50 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 48 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3960,7 +3949,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 51 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 49 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4043,7 +4032,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 52 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#delete (; 50 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -4104,7 +4093,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 53 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 51 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/set/Set#constructor @@ -4349,11 +4338,11 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 54 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 52 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 17 + i32.const 10 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -4377,7 +4366,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $std/set/testNumeric (; 55 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 53 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/set/Set#constructor @@ -4622,11 +4611,11 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 56 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 54 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 19 + i32.const 11 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -4650,7 +4639,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 57 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 55 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -4693,7 +4682,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 58 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 56 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -4703,7 +4692,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 59 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 57 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4807,7 +4796,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 60 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#add (; 58 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4891,7 +4880,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 61 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#delete (; 59 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -4953,7 +4942,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 62 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 60 ;) (type $FUNCSIG$v) (local $0 f32) (local $1 i32) call $~lib/set/Set#constructor @@ -5198,11 +5187,11 @@ unreachable end ) - (func $~lib/set/Set#constructor (; 63 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 61 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 21 + i32.const 12 call $~lib/runtime/runtime.register local.tee $0 i32.const 0 @@ -5226,7 +5215,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 64 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 62 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -5269,7 +5258,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 65 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 63 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -5279,7 +5268,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 66 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 64 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5383,7 +5372,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 67 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#add (; 65 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5467,7 +5456,7 @@ i32.store end ) - (func $~lib/set/Set#delete (; 68 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#delete (; 66 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -5529,7 +5518,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 69 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 67 ;) (type $FUNCSIG$v) (local $0 f64) (local $1 i32) call $~lib/set/Set#constructor @@ -5774,7 +5763,7 @@ unreachable end ) - (func $start (; 70 ;) (type $FUNCSIG$v) + (func $start (; 68 ;) (type $FUNCSIG$v) i32.const 152 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset @@ -5790,7 +5779,7 @@ call $std/set/testNumeric call $std/set/testNumeric ) - (func $null (; 71 ;) (type $FUNCSIG$v) + (func $null (; 69 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 8c4448be01..fc2d645857 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) @@ -19,11 +19,11 @@ (type $FUNCSIG$vid (func (param i32 f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\03\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 56) "\03\00\00\00&\00\00\00\00\00\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 112) "\03\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") - (table $0 23 funcref) - (elem (i32.const 0) $null $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/string/String~traverse $~lib/arraybuffer/ArrayBuffer~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse $~lib/set/Set~traverse) + (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\02\00\00\00&\00\00\00\00\00\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 112) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) @@ -154,27 +154,10 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/collector/dummy/__ref_mark (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/set/Set~traverse (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/string/String~traverse (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $~lib/collector/dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/runtime/runtime.register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -212,7 +195,7 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/memory/memory.fill (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -469,10 +452,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer~traverse (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 global.get $~lib/util/runtime/MAX_BYTELENGTH @@ -493,16 +473,16 @@ local.get $1 call $~lib/memory/memory.fill local.get $2 - i32.const 4 + i32.const 3 call $~lib/runtime/runtime.register ) - (func $~lib/collector/dummy/__ref_link (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/set/Set#clear (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -571,7 +551,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz @@ -605,14 +585,14 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash8 (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const -2128831035 local.get $0 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -667,7 +647,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -686,7 +666,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -856,7 +836,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -958,11 +938,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1039,7 +1019,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 24 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 20 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1322,18 +1302,7 @@ unreachable end ) - (func $~lib/set/Set~traverse (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/set/Set#clear (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1402,14 +1371,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 5 + i32.const 4 call $~lib/runtime/runtime.register local.set $0 end @@ -1436,7 +1405,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1489,7 +1458,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1506,7 +1475,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1676,7 +1645,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1776,11 +1745,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1855,7 +1824,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 34 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 29 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2138,18 +2107,7 @@ unreachable end ) - (func $~lib/set/Set~traverse (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/set/Set#clear (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2218,14 +2176,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 7 + i32.const 5 call $~lib/runtime/runtime.register local.set $0 end @@ -2252,7 +2210,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -2274,7 +2232,7 @@ local.set $1 local.get $1 ) - (func $~lib/set/Set#find (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2329,7 +2287,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2348,7 +2306,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2518,7 +2476,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 42 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2620,11 +2578,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2701,7 +2659,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 45 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 39 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2984,18 +2942,7 @@ unreachable end ) - (func $~lib/set/Set~traverse (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/set/Set#clear (; 47 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3064,14 +3011,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 9 + i32.const 6 call $~lib/runtime/runtime.register local.set $0 end @@ -3098,7 +3045,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3151,7 +3098,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -3168,7 +3115,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 51 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3338,7 +3285,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 52 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3438,11 +3385,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3517,7 +3464,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 55 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 48 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3800,18 +3747,7 @@ unreachable end ) - (func $~lib/set/Set~traverse (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/set/Set#clear (; 57 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3880,14 +3816,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 11 + i32.const 7 call $~lib/runtime/runtime.register local.set $0 end @@ -3914,7 +3850,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -3956,7 +3892,7 @@ local.set $1 local.get $1 ) - (func $~lib/set/Set#find (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4007,7 +3943,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -4022,7 +3958,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 62 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4192,7 +4128,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4290,11 +4226,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 64 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4367,7 +4303,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 66 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 58 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4650,18 +4586,7 @@ unreachable end ) - (func $~lib/set/Set~traverse (; 67 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/set/Set#clear (; 68 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 59 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4730,14 +4655,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 13 + i32.const 8 call $~lib/runtime/runtime.register local.set $0 end @@ -4764,7 +4689,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4815,7 +4740,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 71 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 62 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -4830,7 +4755,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 72 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5000,7 +4925,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 73 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 64 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5098,11 +5023,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 74 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 65 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 75 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5175,7 +5100,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 76 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 67 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5458,18 +5383,7 @@ unreachable end ) - (func $~lib/set/Set~traverse (; 77 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/set/Set#clear (; 78 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 68 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5538,14 +5452,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 15 + i32.const 9 call $~lib/runtime/runtime.register local.set $0 end @@ -5572,7 +5486,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 80 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 70 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5660,7 +5574,7 @@ local.set $3 local.get $3 ) - (func $~lib/set/Set#find (; 81 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 71 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5711,7 +5625,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 82 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 72 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -5726,7 +5640,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 83 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 73 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5897,7 +5811,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 84 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 74 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -5996,11 +5910,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 85 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 75 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 86 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 76 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6074,7 +5988,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 87 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 77 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6357,18 +6271,7 @@ unreachable end ) - (func $~lib/set/Set~traverse (; 88 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/set/Set#clear (; 89 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 78 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6437,14 +6340,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 90 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 17 + i32.const 10 call $~lib/runtime/runtime.register local.set $0 end @@ -6471,7 +6374,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 91 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 80 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6522,7 +6425,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 92 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 81 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 @@ -6537,7 +6440,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 93 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 82 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6708,7 +6611,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 94 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 83 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6807,11 +6710,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 95 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 84 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 96 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 85 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6885,7 +6788,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 97 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 86 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -7168,18 +7071,7 @@ unreachable end ) - (func $~lib/set/Set~traverse (; 98 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/set/Set#clear (; 99 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 87 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7248,14 +7140,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 100 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 88 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 19 + i32.const 11 call $~lib/runtime/runtime.register local.set $0 end @@ -7282,7 +7174,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 101 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 89 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7333,7 +7225,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 102 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 90 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) local.get $0 local.get $1 @@ -7349,7 +7241,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 103 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 91 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7521,7 +7413,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 104 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#add (; 92 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -7621,11 +7513,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 105 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 106 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#delete (; 94 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -7700,7 +7592,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 107 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 95 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -7983,18 +7875,7 @@ unreachable end ) - (func $~lib/set/Set~traverse (; 108 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=8 - local.set $1 - local.get $1 - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/set/Set#clear (; 109 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 96 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8063,14 +7944,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 110 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 97 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 call $~lib/runtime/runtime.allocate - i32.const 21 + i32.const 12 call $~lib/runtime/runtime.register local.set $0 end @@ -8097,7 +7978,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 111 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 98 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -8148,7 +8029,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 112 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 99 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) local.get $0 local.get $1 @@ -8164,7 +8045,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 113 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 100 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8336,7 +8217,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 114 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#add (; 101 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 f64) (local $3 i32) (local $4 i32) @@ -8436,11 +8317,11 @@ i32.store end ) - (func $~lib/set/Set#get:size (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 116 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#delete (; 103 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -8515,7 +8396,7 @@ end i32.const 1 ) - (func $std/set/testNumeric (; 117 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 104 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -8798,7 +8679,7 @@ unreachable end ) - (func $start:std/set (; 118 ;) (type $FUNCSIG$v) + (func $start:std/set (; 105 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -8820,9 +8701,9 @@ call $std/set/testNumeric call $std/set/testNumeric ) - (func $start (; 119 ;) (type $FUNCSIG$v) + (func $start (; 106 ;) (type $FUNCSIG$v) call $start:std/set ) - (func $null (; 120 ;) (type $FUNCSIG$v) + (func $null (; 107 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 58a5952a8a..d9c5b8ac00 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -39,7 +39,7 @@ if i32.const 0 i32.const 240 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -1480,7 +1480,7 @@ if i32.const 0 i32.const 240 - i32.const 14 + i32.const 15 i32.const 64 call $~lib/env/abort unreachable @@ -1541,7 +1541,7 @@ if i32.const 0 i32.const 240 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -1585,7 +1585,7 @@ if i32.const 0 i32.const 240 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -1629,7 +1629,7 @@ if i32.const 0 i32.const 240 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 40583f8629..caa7baaaca 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -62,7 +62,7 @@ if i32.const 0 i32.const 240 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -1979,7 +1979,7 @@ if i32.const 0 i32.const 240 - i32.const 14 + i32.const 15 i32.const 64 call $~lib/env/abort unreachable @@ -2070,7 +2070,7 @@ if i32.const 0 i32.const 240 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -2138,7 +2138,7 @@ if i32.const 0 i32.const 240 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -2206,7 +2206,7 @@ if i32.const 0 i32.const 240 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 7a484a3785..ba3a97a1ab 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1,8 +1,8 @@ (module - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$di (func (param i32) (result f64))) @@ -161,9 +161,9 @@ (data (i32.const 2128) ",\00a\00,\00b\00,\00c") (data (i32.const 2144) "\01\00\00\00\0c") (data (i32.const 2160) "a\00,\00b\00,\00c\00,") - (data (i32.const 2176) "\04\00\00\00\90\01") + (data (i32.const 2176) "\03\00\00\00\90\01") (data (i32.const 2192) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 2592) "\05\00\00\00\10") + (data (i32.const 2592) "\04\00\00\00\10") (data (i32.const 2608) "\90\08\00\00\90\08\00\00\90\01\00\00d") (data (i32.const 2624) "\01\00\00\00\02") (data (i32.const 2640) "8") @@ -233,17 +233,17 @@ (data (i32.const 3880) "-\00I\00n\00f\00i\00n\00i\00t\00y") (data (i32.const 3904) "\01\00\00\00\10") (data (i32.const 3920) "I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3936) "\04\00\00\00\b8\02") + (data (i32.const 3936) "\03\00\00\00\b8\02") (data (i32.const 3952) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~traverse $~lib/array/Array<~lib/string/String>~traverse $~lib/string/String~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse) + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $std/string/str (mut i32) (i32.const 24)) (global $std/string/nullStr (mut i32) (i32.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -347,10 +347,7 @@ (export "getString" (func $std/string/getString)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/string/String~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -412,7 +409,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -439,7 +436,7 @@ i32.const 16 i32.add ) - (func $~lib/runtime/runtime.register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 6736 @@ -472,7 +469,7 @@ i32.store local.get $0 ) - (func $~lib/string/String.fromCharCode (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.fromCharCode (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 2 call $~lib/runtime/runtime.allocate @@ -483,7 +480,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/string/compareImpl (; 6 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/string/compareImpl (; 5 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) local.get $1 i32.const 1 @@ -522,7 +519,7 @@ end local.get $4 ) - (func $~lib/string/String.__eq (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -569,7 +566,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.fromCodePoint (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -624,7 +621,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String#startsWith (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#startsWith (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -672,7 +669,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String#endsWith (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#endsWith (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -720,7 +717,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String#indexOf (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#indexOf (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -804,7 +801,7 @@ end i32.const -1 ) - (func $~lib/util/memory/memcpy (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1651,7 +1648,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1845,7 +1842,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 14 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 13 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $2 local.get $3 @@ -1870,7 +1867,7 @@ end end ) - (func $~lib/string/String#padStart (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padStart (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1966,7 +1963,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String#padEnd (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2063,7 +2060,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String#lastIndexOf (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2146,7 +2143,7 @@ end i32.const -1 ) - (func $~lib/util/string/parse (; 18 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/util/string/parse (; 17 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2382,7 +2379,7 @@ local.get $5 f64.mul ) - (func $~lib/string/parseFloat (; 19 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 18 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 f64) @@ -2552,7 +2549,7 @@ local.get $3 f64.mul ) - (func $~lib/string/String#concat (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2601,7 +2598,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String.__concat (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 352 local.get $0 @@ -2609,13 +2606,13 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.__ne (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__eq i32.eqz ) - (func $~lib/string/String.__gt (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block (result i32) @@ -2680,7 +2677,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.__lt (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block (result i32) @@ -2745,19 +2742,19 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String.__gte (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gte (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__lt i32.eqz ) - (func $~lib/string/String.__lte (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.__lte (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 120 local.get $0 call $~lib/string/String.__gt i32.eqz ) - (func $~lib/string/String#repeat (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2837,7 +2834,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String#slice (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.const 16 @@ -2915,35 +2912,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/string/String>~traverse (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - drop - local.get $0 - i32.load offset=4 - local.tee $1 - local.get $0 - i32.load offset=8 - i32.add - local.set $0 - loop $continue|0 - local.get $1 - local.get $0 - i32.lt_u - if - local.get $1 - i32.load - drop - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $continue|0 - end - end - ) - (func $~lib/runtime/runtime.makeArray (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2957,7 +2926,7 @@ i32.shl local.tee $2 call $~lib/runtime/runtime.allocate - i32.const 4 + i32.const 3 call $~lib/runtime/runtime.register local.tee $3 local.set $4 @@ -2978,7 +2947,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/memory/memory.fill (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -3189,7 +3158,7 @@ end end ) - (func $~lib/runtime/runtime.reallocate (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3291,7 +3260,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureCapacity (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3307,7 +3276,7 @@ if i32.const 0 i32.const 1912 - i32.const 14 + i32.const 15 i32.const 64 call $~lib/env/abort unreachable @@ -3340,7 +3309,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array<~lib/string/String>#push (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#push (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3370,7 +3339,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/string/String#split (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3621,7 +3590,7 @@ end local.get $2 ) - (func $~lib/array/Array<~lib/string/String>#__get (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3629,7 +3598,7 @@ if i32.const 0 i32.const 1912 - i32.const 96 + i32.const 97 i32.const 45 call $~lib/env/abort unreachable @@ -3643,7 +3612,7 @@ if i32.const 0 i32.const 1912 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -3656,7 +3625,7 @@ i32.add i32.load ) - (func $~lib/util/number/decimalCount32 (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -3710,12 +3679,7 @@ end end ) - (func $~lib/array/Array~traverse (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - drop - ) - (func $~lib/util/number/utoa32_lut (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) i32.const 2612 @@ -3825,7 +3789,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3867,7 +3831,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/utoa32 (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3890,7 +3854,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/decimalCount64 (; 42 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 39 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -3944,7 +3908,7 @@ end end ) - (func $~lib/util/number/utoa64_lut (; 43 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 40 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4041,7 +4005,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 44 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 41 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4083,7 +4047,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 42 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4148,7 +4112,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/genDigits (; 46 ;) (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 (; 43 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -4563,7 +4527,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4822,7 +4786,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 48 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 45 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -5110,7 +5074,7 @@ local.get $10 i32.add ) - (func $~lib/string/String#substring (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5206,7 +5170,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/runtime/runtime.discard (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 47 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 6736 i32.le_u @@ -5233,7 +5197,7 @@ unreachable end ) - (func $~lib/util/number/dtoa (; 51 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 48 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5278,7 +5242,7 @@ call $~lib/runtime/runtime.discard local.get $1 ) - (func $start:std/string (; 52 ;) (type $FUNCSIG$v) + (func $start:std/string (; 49 ;) (type $FUNCSIG$v) (local $0 i32) global.get $std/string/str i32.const 24 @@ -8649,13 +8613,13 @@ unreachable end ) - (func $std/string/getString (; 53 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 50 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 54 ;) (type $FUNCSIG$v) + (func $start (; 51 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 55 ;) (type $FUNCSIG$v) + (func $null (; 52 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 1767dd724f..32cca640af 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -1,8 +1,8 @@ (module - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) @@ -93,8 +93,8 @@ (data (i32.const 2080) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00a\00,\00b\00,\00,\00c\00") (data (i32.const 2112) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00,\00a\00,\00b\00,\00c\00") (data (i32.const 2144) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00a\00,\00b\00,\00c\00,\00") - (data (i32.const 2176) "\04\00\00\00\90\01\00\00\00\00\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") - (data (i32.const 2592) "\05\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\90\08\00\00\90\08\00\00\90\01\00\00d\00\00\00") + (data (i32.const 2176) "\03\00\00\00\90\01\00\00\00\00\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") + (data (i32.const 2592) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\90\08\00\00\90\08\00\00\90\01\00\00d\00\00\00") (data (i32.const 2624) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\008\00") (data (i32.const 2648) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00-\001\000\000\000\00") (data (i32.const 2680) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\001\002\003\004\00") @@ -129,12 +129,12 @@ (data (i32.const 3840) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00N\00a\00N\00") (data (i32.const 3864) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") (data (i32.const 3904) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 3936) "\04\00\00\00\b8\02\00\00\00\00\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~traverse $~lib/array/Array<~lib/string/String>~traverse $~lib/arraybuffer/ArrayBuffer~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse) + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $std/string/str (mut i32) (i32.const 24)) (global $std/string/nullStr (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -211,10 +211,7 @@ (export "getString" (func $std/string/getString)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/string/String~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $~lib/string/String#get:length (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/util/runtime/HEADER_SIZE i32.sub @@ -222,7 +219,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/string/String#charCodeAt (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#charCodeAt (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 call $~lib/string/String#get:length @@ -238,7 +235,7 @@ i32.add i32.load16_u ) - (func $~lib/string/String.__not (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.__not (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 0 @@ -252,7 +249,7 @@ i32.eqz end ) - (func $~lib/runtime/runtime.adjust (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -264,7 +261,7 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__mem_allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -343,12 +340,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/memory/memory.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/runtime.adjust @@ -370,10 +367,10 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/collector/dummy/__ref_register (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/runtime.register (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -411,7 +408,7 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/string/String.fromCharCode (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.fromCharCode (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 2 call $~lib/runtime/runtime.allocate @@ -423,7 +420,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/string/compareImpl (; 12 ;) (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 (; 11 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -476,7 +473,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -520,7 +517,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.fromCodePoint (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -583,7 +580,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String#startsWith (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#startsWith (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -650,7 +647,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String#endsWith (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#endsWith (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -714,7 +711,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String#indexOf (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#indexOf (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -808,7 +805,7 @@ end i32.const -1 ) - (func $~lib/util/memory/memcpy (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2009,7 +2006,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2240,7 +2237,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 20 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 19 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) i32.const 0 @@ -2272,7 +2269,7 @@ end end ) - (func $~lib/string/String#padStart (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padStart (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2373,7 +2370,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String#padEnd (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2478,7 +2475,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String#lastIndexOf (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2570,7 +2567,7 @@ end i32.const -1 ) - (func $~lib/util/string/parse (; 24 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/util/string/parse (; 23 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2871,12 +2868,12 @@ local.get $7 f64.mul ) - (func $~lib/string/parseInt (; 25 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/string/parseInt (; 24 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $0 local.get $1 call $~lib/util/string/parse ) - (func $~lib/string/parseFloat (; 26 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 25 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3073,7 +3070,7 @@ local.get $5 f64.mul ) - (func $~lib/string/String#concat (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3123,7 +3120,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String.__concat (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 352 local.get $0 @@ -3133,13 +3130,13 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.__ne (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__eq i32.eqz ) - (func $~lib/string/String.__gt (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3201,7 +3198,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.__lt (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3263,19 +3260,19 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String.__gte (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gte (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__lt i32.eqz ) - (func $~lib/string/String.__lte (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lte (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__gt i32.eqz ) - (func $~lib/string/String#repeat (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3358,7 +3355,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String#slice (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3448,58 +3445,13 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/collector/dummy/__ref_mark (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_link (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/array/Array<~lib/string/String>~traverse (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - local.get $0 - i32.load offset=8 - i32.add - local.set $2 - block $break|0 - loop $continue|0 - local.get $1 - local.get $2 - i32.lt_u - if - block - local.get $1 - i32.load - local.set $3 - local.get $3 - call $~lib/collector/dummy/__ref_mark - local.get $3 - call $~lib/string/String~traverse - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - br $continue|0 - end - end - end - ) - (func $~lib/arraybuffer/ArrayBuffer~traverse (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $~lib/collector/dummy/__ref_link (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 40 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - nop - ) - (func $~lib/runtime/runtime.makeArray (; 41 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 37 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3519,7 +3471,7 @@ local.get $2 i32.shl call $~lib/runtime/runtime.allocate - i32.const 4 + i32.const 3 call $~lib/runtime/runtime.register local.set $6 local.get $4 @@ -3563,7 +3515,7 @@ end local.get $4 ) - (func $~lib/memory/memory.fill (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3820,14 +3772,14 @@ end end ) - (func $~lib/allocator/arena/__mem_free (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/runtime.reallocate (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3931,7 +3883,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 46 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3953,7 +3905,7 @@ if i32.const 0 i32.const 1912 - i32.const 14 + i32.const 15 i32.const 64 call $~lib/env/abort unreachable @@ -4005,7 +3957,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array<~lib/string/String>#push (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#push (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4055,7 +4007,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 48 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 44 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4088,7 +4040,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/string/String#split (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4395,11 +4347,11 @@ end local.get $9 ) - (func $~lib/array/Array<~lib/string/String>#get:length (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#get:length (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -4408,7 +4360,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/string/String>#__get (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -4416,7 +4368,7 @@ if i32.const 0 i32.const 1912 - i32.const 96 + i32.const 97 i32.const 45 call $~lib/env/abort unreachable @@ -4430,7 +4382,7 @@ if i32.const 0 i32.const 1912 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -4439,7 +4391,7 @@ local.get $1 call $~lib/array/Array<~lib/string/String>#__unchecked_get ) - (func $~lib/util/number/decimalCount32 (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -4508,12 +4460,7 @@ unreachable unreachable ) - (func $~lib/array/Array~traverse (; 54 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/util/number/utoa32_lut (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4656,7 +4603,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4712,7 +4659,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/utoa32 (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4748,7 +4695,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/decimalCount64 (; 58 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 53 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -4817,7 +4764,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 59 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 54 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -4945,7 +4892,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 60 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 55 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5013,7 +4960,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa64 (; 61 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 56 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5103,24 +5050,19 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/builtins/isFinite (; 62 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 57 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 63 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 58 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/array/Array~traverse (; 64 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/array/Array#__unchecked_get (; 65 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__unchecked_get (; 59 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $0 i32.load offset=4 local.get $1 @@ -5129,12 +5071,7 @@ i32.add i64.load ) - (func $~lib/array/Array~traverse (; 66 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/array/Array#__unchecked_get (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -5143,7 +5080,7 @@ i32.add i32.load16_s ) - (func $~lib/util/number/genDigits (; 68 ;) (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 (; 61 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -5714,7 +5651,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6047,7 +5984,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 70 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 63 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -6485,7 +6422,7 @@ local.get $2 i32.add ) - (func $~lib/string/String#substring (; 71 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6603,7 +6540,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/runtime/runtime.discard (; 72 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 65 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -6637,7 +6574,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/util/number/dtoa (; 73 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 66 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6684,7 +6621,7 @@ call $~lib/runtime/runtime.discard local.get $3 ) - (func $start:std/string (; 74 ;) (type $FUNCSIG$v) + (func $start:std/string (; 67 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10118,12 +10055,12 @@ unreachable end ) - (func $std/string/getString (; 75 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 68 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 76 ;) (type $FUNCSIG$v) + (func $start (; 69 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 77 ;) (type $FUNCSIG$v) + (func $null (; 70 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index acb6a69303..d296ffda33 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -74,7 +74,7 @@ (data (i32.const 776) "f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") (data (i32.const 816) "\02\00\00\00\0c") (data (i32.const 832) "\n\00\00\00\0c\00\00\00\0e") - (data (i32.const 848) "\12\00\00\00\10") + (data (i32.const 848) "\10\00\00\00\10") (data (i32.const 864) "@\03\00\00@\03\00\00\0c\00\00\00\03") (data (i32.const 880) "\01\00\00\00,") (data (i32.const 896) "f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") @@ -86,14 +86,14 @@ (data (i32.const 1104) "f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") (data (i32.const 1160) "\02\00\00\00$") (data (i32.const 1176) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") - (data (i32.const 1216) "\12\00\00\00\10") + (data (i32.const 1216) "\10\00\00\00\10") (data (i32.const 1232) "\98\04\00\00\98\04\00\00$\00\00\00\t") (data (i32.const 1248) "\01\00\00\00B") (data (i32.const 1264) "T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") (data (i32.const 1336) "\01\00\00\00V") (data (i32.const 1352) "T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (table $0 130 funcref) - (elem (i32.const 0) $null $~lib/string/String~traverse $~lib/string/String~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/arraybuffer/ArrayBufferView~traverse $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) + (table $0 112 funcref) + (elem (i32.const 0) $null $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/typedarray/arr (mut i32) (i32.const 0)) @@ -117,10 +117,7 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/string/String~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -182,7 +179,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -209,7 +206,7 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) block $~lib/util/memory/memset|inlined.0 @@ -434,7 +431,7 @@ end end ) - (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 1440 @@ -467,7 +464,7 @@ i32.store local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -490,12 +487,7 @@ i32.const 2 call $~lib/runtime/runtime.register ) - (func $~lib/arraybuffer/ArrayBufferView~traverse (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - drop - ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1073741808 local.get $2 @@ -547,7 +539,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Int8Array#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/runtime.allocate i32.const 4 @@ -556,7 +548,7 @@ i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint8Array#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/runtime.allocate i32.const 5 @@ -565,7 +557,7 @@ i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint8ClampedArray#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/runtime.allocate i32.const 6 @@ -574,7 +566,7 @@ i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int16Array#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/runtime.allocate i32.const 7 @@ -583,7 +575,7 @@ i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint16Array#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/runtime.allocate i32.const 8 @@ -592,7 +584,7 @@ i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int32Array#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/runtime.allocate i32.const 9 @@ -601,7 +593,7 @@ i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint32Array#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/runtime.allocate i32.const 10 @@ -610,7 +602,7 @@ i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int64Array#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/runtime.allocate i32.const 11 @@ -619,7 +611,7 @@ i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint64Array#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/runtime.allocate i32.const 12 @@ -628,7 +620,7 @@ i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Float32Array#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/runtime.allocate i32.const 13 @@ -637,7 +629,7 @@ i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Float64Array#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/runtime/runtime.allocate i32.const 14 @@ -646,7 +638,7 @@ i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $std/typedarray/testInstantiate (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/typedarray/testInstantiate (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 call $~lib/typedarray/Int8Array#constructor @@ -1110,7 +1102,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#__set (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#__set (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1134,7 +1126,7 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int32Array#__get (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#__get (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1157,7 +1149,7 @@ i32.add i32.load ) - (func $~lib/typedarray/Int32Array#subarray (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1249,7 +1241,7 @@ i32.const 9 call $~lib/runtime/runtime.register ) - (func $~lib/typedarray/Float64Array#__set (; 24 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/typedarray/Float64Array#__set (; 22 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 local.get $0 i32.load offset=8 @@ -1273,7 +1265,7 @@ local.get $2 f64.store ) - (func $~lib/typedarray/Float64Array#subarray (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#subarray (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1365,7 +1357,7 @@ i32.const 14 call $~lib/runtime/runtime.register ) - (func $~lib/util/sort/insertionSort (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) @@ -1447,7 +1439,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) @@ -1703,7 +1695,7 @@ local.get $5 f64.store ) - (func $~lib/typedarray/Float64Array#sort (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#sort (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 f64) @@ -1763,7 +1755,7 @@ end end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 29 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 27 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -1792,7 +1784,7 @@ i64.lt_s i32.sub ) - (func $~lib/typedarray/Float64Array#__get (; 30 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/typedarray/Float64Array#__get (; 28 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -1815,7 +1807,7 @@ i32.add f64.load ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1847,7 +1839,7 @@ i32.and i32.store8 ) - (func $~lib/typedarray/Uint8ClampedArray#__get (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#__get (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1866,7 +1858,7 @@ i32.add i32.load8_u ) - (func $~lib/typedarray/Int8Array#__set (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int8Array#__set (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1886,7 +1878,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Int8Array#fill (; 34 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/typedarray/Int8Array#fill (; 32 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) local.get $0 @@ -1951,7 +1943,7 @@ call $~lib/memory/memory.fill end ) - (func $~lib/util/memory/memcpy (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2798,7 +2790,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2992,7 +2984,7 @@ end end ) - (func $~lib/runtime/runtime.makeArray (; 37 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 35 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) i32.const 16 @@ -3033,7 +3025,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int8Array#__get (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3052,7 +3044,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__get (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3060,7 +3052,7 @@ if i32.const 0 i32.const 264 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -3071,7 +3063,7 @@ i32.add i32.load8_s ) - (func $std/typedarray/isInt8ArrayEqual (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3113,7 +3105,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3199,7 +3191,7 @@ i32.const 4 call $~lib/runtime/runtime.register ) - (func $~lib/typedarray/Int32Array#fill (; 42 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/typedarray/Int32Array#fill (; 40 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) local.get $1 @@ -3276,7 +3268,7 @@ end end ) - (func $~lib/array/Array#__get (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3286,7 +3278,7 @@ if i32.const 0 i32.const 264 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -3299,7 +3291,7 @@ i32.add i32.load ) - (func $std/typedarray/isInt32ArrayEqual (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3345,12 +3337,12 @@ end i32.const 1 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 45 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 43 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduce (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3375,7 +3367,7 @@ i32.load8_s local.get $1 local.get $0 - i32.const 20 + i32.const 2 call_indirect (type $FUNCSIG$iiiii) local.set $2 local.get $1 @@ -3387,7 +3379,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 47 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 45 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -3418,7 +3410,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#__set (; 48 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 46 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3438,7 +3430,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Uint8Array#reduce (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3475,7 +3467,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 50 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 48 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -3492,7 +3484,7 @@ i32.const 3 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 21 + i32.const 3 call $~lib/typedarray/Uint8Array#reduce i32.const 255 i32.and @@ -3507,7 +3499,7 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 51 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 49 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -3524,7 +3516,7 @@ i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 22 + i32.const 4 call $~lib/typedarray/Uint8Array#reduce i32.const 255 i32.and @@ -3539,7 +3531,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#__set (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3563,7 +3555,7 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Int16Array#reduce (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduce (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3592,7 +3584,7 @@ i32.load16_s local.get $1 local.get $0 - i32.const 23 + i32.const 5 call_indirect (type $FUNCSIG$iiiii) local.set $2 local.get $1 @@ -3604,7 +3596,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 54 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 52 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -3635,7 +3627,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#__set (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3659,7 +3651,7 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Uint16Array#reduce (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduce (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3688,7 +3680,7 @@ i32.load16_u local.get $1 local.get $0 - i32.const 24 + i32.const 6 call_indirect (type $FUNCSIG$iiiii) local.set $2 local.get $1 @@ -3700,7 +3692,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 57 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 55 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -3731,7 +3723,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reduce (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3772,7 +3764,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 59 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 57 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -3789,7 +3781,7 @@ i32.const 3 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 25 + i32.const 7 call $~lib/typedarray/Int32Array#reduce i32.const 6 i32.ne @@ -3802,7 +3794,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#__set (; 60 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint32Array#__set (; 58 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3826,7 +3818,7 @@ local.get $2 i32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 61 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 59 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -3843,7 +3835,7 @@ i32.const 3 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 26 + i32.const 8 call $~lib/typedarray/Int32Array#reduce i32.const 6 i32.ne @@ -3856,7 +3848,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#__set (; 62 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 60 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -3880,12 +3872,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 63 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 61 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 64 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 62 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -3926,7 +3918,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 65 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 63 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -3943,7 +3935,7 @@ i64.const 3 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 27 + i32.const 9 call $~lib/typedarray/Int64Array#reduce i64.const 6 i64.ne @@ -3956,7 +3948,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#__set (; 66 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Uint64Array#__set (; 64 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -3980,7 +3972,7 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 67 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 65 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -3997,7 +3989,7 @@ i64.const 3 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 28 + i32.const 10 call $~lib/typedarray/Int64Array#reduce i64.const 6 i64.ne @@ -4010,7 +4002,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#__set (; 68 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 66 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -4034,12 +4026,12 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 69 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 67 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 70 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $~lib/typedarray/Float32Array#reduce (; 68 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) (local $1 i32) (local $2 f32) (local $3 i32) @@ -4068,7 +4060,7 @@ f32.load local.get $1 local.get $0 - i32.const 29 + i32.const 11 call_indirect (type $FUNCSIG$fffii) local.set $2 local.get $1 @@ -4080,7 +4072,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 71 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 69 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -4109,12 +4101,12 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 72 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 70 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 73 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/typedarray/Float64Array#reduce (; 71 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -4143,7 +4135,7 @@ f64.load local.get $1 local.get $0 - i32.const 30 + i32.const 12 call_indirect (type $FUNCSIG$dddii) local.set $2 local.get $1 @@ -4155,7 +4147,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 74 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 72 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -4184,7 +4176,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#reduceRight (; 75 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduceRight (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4210,7 +4202,7 @@ i32.load8_s local.get $1 local.get $0 - i32.const 31 + i32.const 13 call_indirect (type $FUNCSIG$iiiii) local.set $2 local.get $1 @@ -4222,7 +4214,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 76 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 74 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -4253,7 +4245,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 77 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 75 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4291,7 +4283,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 78 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 76 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -4308,7 +4300,7 @@ i32.const 3 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 32 + i32.const 14 call $~lib/typedarray/Uint8Array#reduceRight i32.const 255 i32.and @@ -4323,7 +4315,7 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 79 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 77 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -4340,7 +4332,7 @@ i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 33 + i32.const 15 call $~lib/typedarray/Uint8Array#reduceRight i32.const 255 i32.and @@ -4355,7 +4347,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reduceRight (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduceRight (; 78 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4385,7 +4377,7 @@ i32.load16_s local.get $1 local.get $0 - i32.const 34 + i32.const 16 call_indirect (type $FUNCSIG$iiiii) local.set $2 local.get $1 @@ -4397,7 +4389,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 81 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 79 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -4428,7 +4420,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 82 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4458,7 +4450,7 @@ i32.load16_u local.get $1 local.get $0 - i32.const 35 + i32.const 17 call_indirect (type $FUNCSIG$iiiii) local.set $2 local.get $1 @@ -4470,7 +4462,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 83 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 81 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -4501,7 +4493,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reduceRight (; 84 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 82 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4543,7 +4535,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 85 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 83 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -4560,7 +4552,7 @@ i32.const 3 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 36 + i32.const 18 call $~lib/typedarray/Int32Array#reduceRight i32.const 6 i32.ne @@ -4573,7 +4565,7 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 86 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 84 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -4590,7 +4582,7 @@ i32.const 3 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 37 + i32.const 19 call $~lib/typedarray/Int32Array#reduceRight i32.const 6 i32.ne @@ -4603,7 +4595,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#reduceRight (; 87 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 85 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -4645,7 +4637,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 88 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 86 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -4662,7 +4654,7 @@ i64.const 3 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 38 + i32.const 20 call $~lib/typedarray/Int64Array#reduceRight i64.const 6 i64.ne @@ -4675,7 +4667,7 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 89 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 87 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -4692,7 +4684,7 @@ i64.const 3 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 39 + i32.const 21 call $~lib/typedarray/Int64Array#reduceRight i64.const 6 i64.ne @@ -4705,7 +4697,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#reduceRight (; 90 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $~lib/typedarray/Float32Array#reduceRight (; 88 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) (local $1 i32) (local $2 f32) (local $3 i32) @@ -4735,7 +4727,7 @@ f32.load local.get $1 local.get $0 - i32.const 40 + i32.const 22 call_indirect (type $FUNCSIG$fffii) local.set $2 local.get $1 @@ -4747,7 +4739,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 91 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 89 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -4776,7 +4768,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#reduceRight (; 92 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/typedarray/Float64Array#reduceRight (; 90 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -4806,7 +4798,7 @@ f64.load local.get $1 local.get $0 - i32.const 41 + i32.const 23 call_indirect (type $FUNCSIG$dddii) local.set $2 local.get $1 @@ -4818,7 +4810,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 93 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 91 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -4847,12 +4839,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 94 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 92 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 95 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4886,7 +4878,7 @@ i32.load8_s local.get $1 local.get $0 - i32.const 42 + i32.const 24 call_indirect (type $FUNCSIG$iiii) i32.store8 local.get $1 @@ -4898,7 +4890,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 96 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 94 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -4956,7 +4948,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#map (; 97 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 95 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4990,7 +4982,7 @@ i32.load8_u local.get $1 local.get $0 - i32.const 43 + i32.const 25 call_indirect (type $FUNCSIG$iiii) i32.store8 local.get $1 @@ -5002,7 +4994,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint8Array#__get (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__get (; 96 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5021,7 +5013,7 @@ i32.add i32.load8_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 99 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 97 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -5079,7 +5071,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 100 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 98 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5113,7 +5105,7 @@ i32.load8_u local.get $1 local.get $0 - i32.const 44 + i32.const 26 call_indirect (type $FUNCSIG$iiii) i32.store8 local.get $1 @@ -5125,7 +5117,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 101 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 99 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -5183,7 +5175,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#map (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 100 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5221,7 +5213,7 @@ i32.load16_s local.get $1 local.get $0 - i32.const 45 + i32.const 27 call_indirect (type $FUNCSIG$iiii) local.set $7 local.get $5 @@ -5238,7 +5230,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#__get (; 103 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 101 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5261,7 +5253,7 @@ i32.add i32.load16_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 104 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 102 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -5319,7 +5311,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#map (; 105 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 103 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5357,7 +5349,7 @@ i32.load16_u local.get $1 local.get $0 - i32.const 46 + i32.const 28 call_indirect (type $FUNCSIG$iiii) local.set $7 local.get $5 @@ -5374,7 +5366,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint16Array#__get (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 104 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5397,7 +5389,7 @@ i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 107 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 105 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -5455,7 +5447,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#map (; 108 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 106 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5493,7 +5485,7 @@ i32.load local.get $1 local.get $0 - i32.const 47 + i32.const 29 call_indirect (type $FUNCSIG$iiii) local.set $7 local.get $5 @@ -5510,7 +5502,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 109 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 107 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -5568,7 +5560,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#map (; 110 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 108 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5606,7 +5598,7 @@ i32.load local.get $1 local.get $0 - i32.const 48 + i32.const 30 call_indirect (type $FUNCSIG$iiii) local.set $7 local.get $5 @@ -5623,7 +5615,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint32Array#__get (; 111 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5646,7 +5638,7 @@ i32.add i32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 112 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 110 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -5704,12 +5696,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 113 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 111 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 114 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 112 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5747,7 +5739,7 @@ i64.load local.get $1 local.get $0 - i32.const 49 + i32.const 31 call_indirect (type $FUNCSIG$jjii) local.set $7 local.get $5 @@ -5764,7 +5756,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#__get (; 115 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 113 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -5787,7 +5779,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 116 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 114 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -5845,7 +5837,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#map (; 117 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5883,7 +5875,7 @@ i64.load local.get $1 local.get $0 - i32.const 50 + i32.const 32 call_indirect (type $FUNCSIG$jjii) local.set $7 local.get $5 @@ -5900,7 +5892,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint64Array#__get (; 118 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__get (; 116 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -5923,7 +5915,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 119 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 117 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -5981,12 +5973,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 120 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 118 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 121 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 119 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6024,7 +6016,7 @@ f32.load local.get $1 local.get $0 - i32.const 51 + i32.const 33 call_indirect (type $FUNCSIG$ffii) local.set $7 local.get $5 @@ -6041,7 +6033,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#__get (; 122 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 120 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -6064,7 +6056,7 @@ i32.add f32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 123 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 121 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -6122,12 +6114,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 124 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 122 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 125 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6165,7 +6157,7 @@ f64.load local.get $1 local.get $0 - i32.const 52 + i32.const 34 call_indirect (type $FUNCSIG$ddii) local.set $7 local.get $5 @@ -6182,7 +6174,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 126 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 124 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -6240,14 +6232,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 127 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 125 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6286,13 +6278,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 129 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 127 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 130 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 128 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -6309,7 +6301,7 @@ i32.const 6 call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 53 + i32.const 35 call $~lib/typedarray/Int8Array#some i32.eqz if @@ -6321,7 +6313,7 @@ unreachable end local.get $0 - i32.const 54 + i32.const 36 call $~lib/typedarray/Int8Array#some if i32.const 0 @@ -6332,7 +6324,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#some (; 131 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6371,7 +6363,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 132 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 130 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -6388,7 +6380,7 @@ i32.const 6 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 55 + i32.const 37 call $~lib/typedarray/Uint8Array#some i32.eqz if @@ -6400,7 +6392,7 @@ unreachable end local.get $0 - i32.const 56 + i32.const 38 call $~lib/typedarray/Uint8Array#some if i32.const 0 @@ -6411,7 +6403,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 133 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 131 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -6428,7 +6420,7 @@ i32.const 6 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 57 + i32.const 39 call $~lib/typedarray/Uint8Array#some i32.eqz if @@ -6440,7 +6432,7 @@ unreachable end local.get $0 - i32.const 58 + i32.const 40 call $~lib/typedarray/Uint8Array#some if i32.const 0 @@ -6451,14 +6443,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 134 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 132 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6501,13 +6493,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 136 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 134 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 137 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 135 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -6524,7 +6516,7 @@ i32.const 6 call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 59 + i32.const 41 call $~lib/typedarray/Int16Array#some i32.eqz if @@ -6536,7 +6528,7 @@ unreachable end local.get $0 - i32.const 60 + i32.const 42 call $~lib/typedarray/Int16Array#some if i32.const 0 @@ -6547,7 +6539,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#some (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6590,7 +6582,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 139 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 137 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -6607,7 +6599,7 @@ i32.const 6 call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 61 + i32.const 43 call $~lib/typedarray/Uint16Array#some i32.eqz if @@ -6619,7 +6611,7 @@ unreachable end local.get $0 - i32.const 62 + i32.const 44 call $~lib/typedarray/Uint16Array#some if i32.const 0 @@ -6630,12 +6622,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 140 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 138 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6678,11 +6670,11 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 142 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 140 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 143 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 141 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -6699,7 +6691,7 @@ i32.const 6 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 63 + i32.const 45 call $~lib/typedarray/Int32Array#some i32.eqz if @@ -6711,7 +6703,7 @@ unreachable end local.get $0 - i32.const 64 + i32.const 46 call $~lib/typedarray/Int32Array#some if i32.const 0 @@ -6722,7 +6714,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 144 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 142 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -6739,7 +6731,7 @@ i32.const 6 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 65 + i32.const 47 call $~lib/typedarray/Int32Array#some i32.eqz if @@ -6751,7 +6743,7 @@ unreachable end local.get $0 - i32.const 66 + i32.const 48 call $~lib/typedarray/Int32Array#some if i32.const 0 @@ -6762,12 +6754,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 145 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 143 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6810,12 +6802,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 147 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 145 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 148 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 146 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -6832,7 +6824,7 @@ i64.const 6 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 67 + i32.const 49 call $~lib/typedarray/Int64Array#some i32.eqz if @@ -6844,7 +6836,7 @@ unreachable end local.get $0 - i32.const 68 + i32.const 50 call $~lib/typedarray/Int64Array#some if i32.const 0 @@ -6855,7 +6847,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 149 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 147 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -6872,7 +6864,7 @@ i64.const 6 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 69 + i32.const 51 call $~lib/typedarray/Int64Array#some i32.eqz if @@ -6884,7 +6876,7 @@ unreachable end local.get $0 - i32.const 70 + i32.const 52 call $~lib/typedarray/Int64Array#some if i32.const 0 @@ -6895,12 +6887,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 150 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 148 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6943,12 +6935,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 152 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 150 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 153 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 151 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -6965,7 +6957,7 @@ f32.const 6 call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 71 + i32.const 53 call $~lib/typedarray/Float32Array#some i32.eqz if @@ -6977,7 +6969,7 @@ unreachable end local.get $0 - i32.const 72 + i32.const 54 call $~lib/typedarray/Float32Array#some if i32.const 0 @@ -6988,12 +6980,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 154 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 152 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7036,12 +7028,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 156 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 154 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 157 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 155 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -7058,7 +7050,7 @@ f64.const 6 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 73 + i32.const 55 call $~lib/typedarray/Float64Array#some i32.eqz if @@ -7070,7 +7062,7 @@ unreachable end local.get $0 - i32.const 74 + i32.const 56 call $~lib/typedarray/Float64Array#some if i32.const 0 @@ -7081,7 +7073,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#findIndex (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 156 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7123,14 +7115,14 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 159 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 157 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 160 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 158 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -7147,7 +7139,7 @@ i32.const 3 call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 75 + i32.const 57 call $~lib/typedarray/Int8Array#findIndex i32.const 1 i32.ne @@ -7160,7 +7152,7 @@ unreachable end local.get $0 - i32.const 76 + i32.const 58 call $~lib/typedarray/Int8Array#findIndex i32.const -1 i32.ne @@ -7173,7 +7165,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#findIndex (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7215,7 +7207,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 162 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 160 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -7232,7 +7224,7 @@ i32.const 3 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 77 + i32.const 59 call $~lib/typedarray/Uint8Array#findIndex i32.const 1 i32.ne @@ -7245,7 +7237,7 @@ unreachable end local.get $0 - i32.const 78 + i32.const 60 call $~lib/typedarray/Uint8Array#findIndex i32.const -1 i32.ne @@ -7258,7 +7250,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 163 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 161 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -7275,7 +7267,7 @@ i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 79 + i32.const 61 call $~lib/typedarray/Uint8Array#findIndex i32.const 1 i32.ne @@ -7288,7 +7280,7 @@ unreachable end local.get $0 - i32.const 80 + i32.const 62 call $~lib/typedarray/Uint8Array#findIndex i32.const -1 i32.ne @@ -7301,7 +7293,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#findIndex (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7347,14 +7339,14 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 165 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 163 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 166 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 164 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -7371,7 +7363,7 @@ i32.const 3 call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 81 + i32.const 63 call $~lib/typedarray/Int16Array#findIndex i32.const 1 i32.ne @@ -7384,7 +7376,7 @@ unreachable end local.get $0 - i32.const 82 + i32.const 64 call $~lib/typedarray/Int16Array#findIndex i32.const -1 i32.ne @@ -7397,7 +7389,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#findIndex (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7443,7 +7435,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 168 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 166 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -7460,7 +7452,7 @@ i32.const 3 call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 83 + i32.const 65 call $~lib/typedarray/Uint16Array#findIndex i32.const 1 i32.ne @@ -7473,7 +7465,7 @@ unreachable end local.get $0 - i32.const 84 + i32.const 66 call $~lib/typedarray/Uint16Array#findIndex i32.const -1 i32.ne @@ -7486,7 +7478,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#findIndex (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7532,12 +7524,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 170 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 168 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 171 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 169 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -7554,7 +7546,7 @@ i32.const 3 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 85 + i32.const 67 call $~lib/typedarray/Int32Array#findIndex i32.const 1 i32.ne @@ -7567,7 +7559,7 @@ unreachable end local.get $0 - i32.const 86 + i32.const 68 call $~lib/typedarray/Int32Array#findIndex i32.const -1 i32.ne @@ -7580,7 +7572,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 172 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 170 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -7597,7 +7589,7 @@ i32.const 3 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 87 + i32.const 69 call $~lib/typedarray/Int32Array#findIndex i32.const 1 i32.ne @@ -7610,7 +7602,7 @@ unreachable end local.get $0 - i32.const 88 + i32.const 70 call $~lib/typedarray/Int32Array#findIndex i32.const -1 i32.ne @@ -7623,7 +7615,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#findIndex (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7669,12 +7661,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 174 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 172 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 175 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 173 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -7691,7 +7683,7 @@ i64.const 3 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 89 + i32.const 71 call $~lib/typedarray/Int64Array#findIndex i32.const 1 i32.ne @@ -7704,7 +7696,7 @@ unreachable end local.get $0 - i32.const 90 + i32.const 72 call $~lib/typedarray/Int64Array#findIndex i32.const -1 i32.ne @@ -7717,7 +7709,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 176 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 174 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -7734,7 +7726,7 @@ i64.const 3 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 91 + i32.const 73 call $~lib/typedarray/Int64Array#findIndex i32.const 1 i32.ne @@ -7747,7 +7739,7 @@ unreachable end local.get $0 - i32.const 92 + i32.const 74 call $~lib/typedarray/Int64Array#findIndex i32.const -1 i32.ne @@ -7760,7 +7752,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#findIndex (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7806,12 +7798,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 178 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 176 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 179 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 177 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -7828,7 +7820,7 @@ f32.const 3 call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 93 + i32.const 75 call $~lib/typedarray/Float32Array#findIndex i32.const 1 i32.ne @@ -7841,7 +7833,7 @@ unreachable end local.get $0 - i32.const 94 + i32.const 76 call $~lib/typedarray/Float32Array#findIndex i32.const -1 i32.ne @@ -7854,7 +7846,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#findIndex (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7900,12 +7892,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 181 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 179 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 182 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 180 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -7922,7 +7914,7 @@ f64.const 3 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 95 + i32.const 77 call $~lib/typedarray/Float64Array#findIndex i32.const 1 i32.ne @@ -7935,7 +7927,7 @@ unreachable end local.get $0 - i32.const 96 + i32.const 78 call $~lib/typedarray/Float64Array#findIndex i32.const -1 i32.ne @@ -7948,7 +7940,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 183 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 181 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -7958,7 +7950,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int8Array#every (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7998,7 +7990,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 185 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 183 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -8015,7 +8007,7 @@ i32.const 6 call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 97 + i32.const 79 call $~lib/typedarray/Int8Array#every i32.eqz if @@ -8027,7 +8019,7 @@ unreachable end local.get $0 - i32.const 98 + i32.const 80 call $~lib/typedarray/Int8Array#every if i32.const 0 @@ -8038,13 +8030,13 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 186 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 184 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#every (; 187 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 185 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8084,7 +8076,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 188 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 186 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -8101,7 +8093,7 @@ i32.const 6 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 99 + i32.const 81 call $~lib/typedarray/Uint8Array#every i32.eqz if @@ -8113,7 +8105,7 @@ unreachable end local.get $0 - i32.const 100 + i32.const 82 call $~lib/typedarray/Uint8Array#every if i32.const 0 @@ -8124,7 +8116,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 189 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 187 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -8141,7 +8133,7 @@ i32.const 6 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 101 + i32.const 83 call $~lib/typedarray/Uint8Array#every i32.eqz if @@ -8153,7 +8145,7 @@ unreachable end local.get $0 - i32.const 102 + i32.const 84 call $~lib/typedarray/Uint8Array#every if i32.const 0 @@ -8164,7 +8156,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 190 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 188 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8174,7 +8166,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int16Array#every (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 189 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8218,7 +8210,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 192 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 190 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -8235,7 +8227,7 @@ i32.const 6 call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 103 + i32.const 85 call $~lib/typedarray/Int16Array#every i32.eqz if @@ -8247,7 +8239,7 @@ unreachable end local.get $0 - i32.const 104 + i32.const 86 call $~lib/typedarray/Int16Array#every if i32.const 0 @@ -8258,7 +8250,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#every (; 193 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8302,7 +8294,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 194 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 192 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -8319,7 +8311,7 @@ i32.const 6 call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 105 + i32.const 87 call $~lib/typedarray/Uint16Array#every i32.eqz if @@ -8331,7 +8323,7 @@ unreachable end local.get $0 - i32.const 106 + i32.const 88 call $~lib/typedarray/Uint16Array#every if i32.const 0 @@ -8342,13 +8334,13 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 195 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int32Array#every (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 194 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8392,7 +8384,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 197 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 195 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -8409,7 +8401,7 @@ i32.const 6 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 107 + i32.const 89 call $~lib/typedarray/Int32Array#every i32.eqz if @@ -8421,7 +8413,7 @@ unreachable end local.get $0 - i32.const 108 + i32.const 90 call $~lib/typedarray/Int32Array#every if i32.const 0 @@ -8432,7 +8424,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 198 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 196 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -8449,7 +8441,7 @@ i32.const 6 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 109 + i32.const 91 call $~lib/typedarray/Int32Array#every i32.eqz if @@ -8461,7 +8453,7 @@ unreachable end local.get $0 - i32.const 110 + i32.const 92 call $~lib/typedarray/Int32Array#every if i32.const 0 @@ -8472,14 +8464,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 199 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 197 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (; 200 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8523,7 +8515,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 201 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 199 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -8540,7 +8532,7 @@ i64.const 6 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 111 + i32.const 93 call $~lib/typedarray/Int64Array#every i32.eqz if @@ -8552,7 +8544,7 @@ unreachable end local.get $0 - i32.const 112 + i32.const 94 call $~lib/typedarray/Int64Array#every if i32.const 0 @@ -8563,14 +8555,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 202 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 200 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 203 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 201 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -8587,7 +8579,7 @@ i64.const 6 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 113 + i32.const 95 call $~lib/typedarray/Int64Array#every i32.eqz if @@ -8599,7 +8591,7 @@ unreachable end local.get $0 - i32.const 114 + i32.const 96 call $~lib/typedarray/Int64Array#every if i32.const 0 @@ -8610,7 +8602,7 @@ unreachable end ) - (func $~lib/math/NativeMathf.mod (; 204 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 202 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8761,13 +8753,13 @@ local.get $0 f32.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 205 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 203 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 204 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8811,7 +8803,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 207 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 205 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -8828,7 +8820,7 @@ f32.const 6 call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 115 + i32.const 97 call $~lib/typedarray/Float32Array#every i32.eqz if @@ -8840,7 +8832,7 @@ unreachable end local.get $0 - i32.const 116 + i32.const 98 call $~lib/typedarray/Float32Array#every if i32.const 0 @@ -8851,7 +8843,7 @@ unreachable end ) - (func $~lib/math/NativeMath.mod (; 208 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 206 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -9010,13 +9002,13 @@ local.get $0 f64.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 209 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 207 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 210 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9060,7 +9052,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 211 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 209 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -9077,7 +9069,7 @@ f64.const 6 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 117 + i32.const 99 call $~lib/typedarray/Float64Array#every i32.eqz if @@ -9089,7 +9081,7 @@ unreachable end local.get $0 - i32.const 118 + i32.const 100 call $~lib/typedarray/Float64Array#every if i32.const 0 @@ -9100,7 +9092,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 212 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 210 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 255 i32.and @@ -9145,7 +9137,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 213 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Int8Array#forEach (; 211 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9168,7 +9160,7 @@ i32.load8_s local.get $1 local.get $0 - i32.const 119 + i32.const 101 call_indirect (type $FUNCSIG$viii) local.get $1 i32.const 1 @@ -9178,7 +9170,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 214 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 212 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9230,7 +9222,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#forEach (; 215 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 213 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9263,7 +9255,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 216 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 214 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9296,7 +9288,7 @@ i32.and call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 120 + i32.const 102 call $~lib/typedarray/Uint8Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -9310,7 +9302,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 217 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 215 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9343,7 +9335,7 @@ i32.and call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 121 + i32.const 103 call $~lib/typedarray/Uint8Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -9357,7 +9349,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 218 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 216 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 65535 i32.and @@ -9402,7 +9394,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 219 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Int16Array#forEach (; 217 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9429,7 +9421,7 @@ i32.load16_s local.get $1 local.get $0 - i32.const 122 + i32.const 104 call_indirect (type $FUNCSIG$viii) local.get $1 i32.const 1 @@ -9439,7 +9431,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 220 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 218 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9491,7 +9483,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#forEach (; 221 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 219 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9518,7 +9510,7 @@ i32.load16_u local.get $1 local.get $0 - i32.const 123 + i32.const 105 call_indirect (type $FUNCSIG$viii) local.get $1 i32.const 1 @@ -9528,7 +9520,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 222 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 220 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9574,7 +9566,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 223 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 221 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/typedarray/forEachValues local.get $1 call $~lib/array/Array#__get @@ -9615,7 +9607,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 224 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 222 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9652,7 +9644,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 225 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 223 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9679,7 +9671,7 @@ call $~lib/array/Array#__get call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 124 + i32.const 106 call $~lib/typedarray/Int32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -9693,7 +9685,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 226 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 224 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9720,7 +9712,7 @@ call $~lib/array/Array#__get call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 125 + i32.const 107 call $~lib/typedarray/Int32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -9734,7 +9726,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 227 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 225 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) local.get $0 global.get $std/typedarray/forEachValues local.get $1 @@ -9776,7 +9768,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 228 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 226 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9813,7 +9805,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 229 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 227 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9843,7 +9835,7 @@ i64.extend_i32_s call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 126 + i32.const 108 call $~lib/typedarray/Int64Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -9857,7 +9849,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 230 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 228 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9887,7 +9879,7 @@ i64.extend_i32_s call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 127 + i32.const 109 call $~lib/typedarray/Int64Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -9901,7 +9893,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 231 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 229 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) local.get $0 global.get $std/typedarray/forEachValues local.get $1 @@ -9943,7 +9935,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 232 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Float32Array#forEach (; 230 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9970,7 +9962,7 @@ f32.load local.get $1 local.get $0 - i32.const 128 + i32.const 110 call_indirect (type $FUNCSIG$vfii) local.get $1 i32.const 1 @@ -9980,7 +9972,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 233 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 231 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -10023,7 +10015,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 234 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 232 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) local.get $0 global.get $std/typedarray/forEachValues local.get $1 @@ -10065,7 +10057,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 235 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Float64Array#forEach (; 233 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10092,7 +10084,7 @@ f64.load local.get $1 local.get $0 - i32.const 129 + i32.const 111 call_indirect (type $FUNCSIG$vdii) local.get $1 i32.const 1 @@ -10102,7 +10094,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 236 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 234 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -10145,7 +10137,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#reverse (; 237 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 235 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10193,7 +10185,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 238 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 236 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10338,7 +10330,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 239 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 237 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10386,7 +10378,7 @@ end local.get $0 ) - (func $~lib/typedarray/Uint8Array#subarray (; 240 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 238 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10441,7 +10433,7 @@ i32.const 5 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 241 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 239 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10578,7 +10570,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 242 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 240 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10633,7 +10625,7 @@ i32.const 6 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 243 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 241 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10770,7 +10762,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 244 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 242 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10824,7 +10816,7 @@ end local.get $0 ) - (func $~lib/typedarray/Int16Array#subarray (; 245 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 243 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10885,7 +10877,7 @@ i32.const 7 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 246 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 244 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11028,7 +11020,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 245 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11082,7 +11074,7 @@ end local.get $0 ) - (func $~lib/typedarray/Uint16Array#subarray (; 248 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 246 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11143,7 +11135,7 @@ i32.const 8 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 249 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 247 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11280,7 +11272,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 250 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 248 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11334,7 +11326,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 251 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 249 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11467,7 +11459,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#subarray (; 252 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 250 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11528,7 +11520,7 @@ i32.const 10 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 253 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 251 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11659,7 +11651,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#reverse (; 254 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 252 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11713,7 +11705,7 @@ end local.get $0 ) - (func $~lib/typedarray/Int64Array#subarray (; 255 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 253 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11774,7 +11766,7 @@ i32.const 11 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 256 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 254 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11908,7 +11900,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#subarray (; 257 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 255 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11969,7 +11961,7 @@ i32.const 12 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 258 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 256 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12103,7 +12095,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 259 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 257 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12157,7 +12149,7 @@ end local.get $0 ) - (func $~lib/typedarray/Float32Array#subarray (; 260 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 258 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12218,7 +12210,7 @@ i32.const 13 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 261 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 259 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12352,7 +12344,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 262 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 260 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12406,7 +12398,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 263 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 261 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12542,7 +12534,7 @@ unreachable end ) - (func $start:std/typedarray (; 264 ;) (type $FUNCSIG$v) + (func $start:std/typedarray (; 262 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 1440 @@ -12803,7 +12795,7 @@ end unreachable end - i32.const 15 + i32.const 1 local.set $0 end local.get $1 @@ -12937,7 +12929,7 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 16 + i32.const 15 i32.const 0 i32.const 240 call $~lib/runtime/runtime.makeArray @@ -12958,7 +12950,7 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 16 + i32.const 15 i32.const 0 i32.const 312 call $~lib/runtime/runtime.makeArray @@ -12979,7 +12971,7 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 16 + i32.const 15 i32.const 0 i32.const 336 call $~lib/runtime/runtime.makeArray @@ -13000,7 +12992,7 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 16 + i32.const 15 i32.const 0 i32.const 360 call $~lib/runtime/runtime.makeArray @@ -13021,7 +13013,7 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 16 + i32.const 15 i32.const 0 i32.const 384 call $~lib/runtime/runtime.makeArray @@ -13087,7 +13079,7 @@ end global.get $std/typedarray/sub8 i32.const 3 - i32.const 16 + i32.const 15 i32.const 0 i32.const 408 call $~lib/runtime/runtime.makeArray @@ -13103,7 +13095,7 @@ end global.get $std/typedarray/arr8 i32.const 5 - i32.const 16 + i32.const 15 i32.const 0 i32.const 432 call $~lib/runtime/runtime.makeArray @@ -13147,7 +13139,7 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 18 + i32.const 16 i32.const 2 i32.const 456 call $~lib/runtime/runtime.makeArray @@ -13168,7 +13160,7 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 18 + i32.const 16 i32.const 2 i32.const 496 call $~lib/runtime/runtime.makeArray @@ -13189,7 +13181,7 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 18 + i32.const 16 i32.const 2 i32.const 536 call $~lib/runtime/runtime.makeArray @@ -13210,7 +13202,7 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 18 + i32.const 16 i32.const 2 i32.const 576 call $~lib/runtime/runtime.makeArray @@ -13231,7 +13223,7 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 18 + i32.const 16 i32.const 2 i32.const 616 call $~lib/runtime/runtime.makeArray @@ -13299,7 +13291,7 @@ end global.get $std/typedarray/sub32 i32.const 3 - i32.const 18 + i32.const 16 i32.const 2 i32.const 656 call $~lib/runtime/runtime.makeArray @@ -13315,7 +13307,7 @@ end global.get $std/typedarray/arr32 i32.const 5 - i32.const 18 + i32.const 16 i32.const 2 i32.const 688 call $~lib/runtime/runtime.makeArray @@ -13622,10 +13614,10 @@ call $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> call $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> ) - (func $start (; 265 ;) (type $FUNCSIG$v) + (func $start (; 263 ;) (type $FUNCSIG$v) call $start:std/typedarray ) - (func $null (; 266 ;) (type $FUNCSIG$v) + (func $null (; 264 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index f6831f33f3..da69b7b8d6 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -58,17 +58,17 @@ (data (i32.const 712) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 760) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 816) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\0c\00\00\00\0e\00\00\00") - (data (i32.const 848) "\12\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00@\03\00\00@\03\00\00\0c\00\00\00\03\00\00\00") + (data (i32.const 848) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00@\03\00\00@\03\00\00\0c\00\00\00\03\00\00\00") (data (i32.const 880) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 944) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 1008) "\01\00\00\00>\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 1088) "\01\00\00\006\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 1160) "\02\00\00\00$\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00") - (data (i32.const 1216) "\12\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\98\04\00\00\98\04\00\00$\00\00\00\t\00\00\00") + (data (i32.const 1216) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\98\04\00\00\98\04\00\00$\00\00\00\t\00\00\00") (data (i32.const 1248) "\01\00\00\00B\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 1336) "\01\00\00\00V\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (table $0 130 funcref) - (elem (i32.const 0) $null $~lib/string/String~traverse $~lib/arraybuffer/ArrayBuffer~traverse $~lib/arraybuffer/ArrayBufferView~traverse $~lib/typedarray/Int8Array~traverse $~lib/typedarray/Uint8Array~traverse $~lib/typedarray/Uint8ClampedArray~traverse $~lib/typedarray/Int16Array~traverse $~lib/typedarray/Uint16Array~traverse $~lib/typedarray/Int32Array~traverse $~lib/typedarray/Uint32Array~traverse $~lib/typedarray/Int64Array~traverse $~lib/typedarray/Uint64Array~traverse $~lib/typedarray/Float32Array~traverse $~lib/typedarray/Float64Array~traverse $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $~lib/array/Array~traverse $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) + (table $0 112 funcref) + (elem (i32.const 0) $null $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32 (i32.const 1)) (global $~lib/typedarray/Uint8Array.BYTES_PER_ELEMENT i32 (i32.const 1)) (global $~lib/typedarray/Uint8ClampedArray.BYTES_PER_ELEMENT i32 (i32.const 1)) @@ -110,10 +110,7 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/string/String~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -125,7 +122,7 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -204,12 +201,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/runtime.adjust @@ -231,7 +228,7 @@ global.get $~lib/util/runtime/HEADER_SIZE 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 (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -488,13 +485,10 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer~traverse (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $~lib/collector/dummy/__ref_register (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/runtime.register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -532,7 +526,7 @@ call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 global.get $~lib/util/runtime/MAX_BYTELENGTH @@ -556,28 +550,13 @@ i32.const 2 call $~lib/runtime/runtime.register ) - (func $~lib/collector/dummy/__ref_mark (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/arraybuffer/ArrayBufferView~traverse (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load - local.tee $1 - if - local.get $1 - call $~lib/collector/dummy/__ref_mark - local.get $1 - call $~lib/arraybuffer/ArrayBuffer~traverse - end - ) - (func $~lib/collector/dummy/__ref_link (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -653,12 +632,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Int8Array~traverse (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - call $~lib/arraybuffer/ArrayBufferView~traverse - ) - (func $~lib/typedarray/Int8Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#constructor (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -674,27 +648,22 @@ local.set $0 local.get $0 ) - (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load i32.sub ) - (func $~lib/arraybuffer/ArrayBufferView#get:byteLength (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#get:byteLength (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 ) - (func $~lib/typedarray/Int8Array#get:length (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#get:length (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Uint8Array~traverse (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - call $~lib/arraybuffer/ArrayBufferView~traverse - ) - (func $~lib/typedarray/Uint8Array#constructor (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -710,16 +679,11 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint8Array#get:length (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#get:length (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Uint8ClampedArray~traverse (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - call $~lib/arraybuffer/ArrayBufferView~traverse - ) - (func $~lib/typedarray/Uint8ClampedArray#constructor (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -735,16 +699,11 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint8ClampedArray#get:length (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#get:length (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Int16Array~traverse (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - call $~lib/arraybuffer/ArrayBufferView~traverse - ) - (func $~lib/typedarray/Int16Array#constructor (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -760,18 +719,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int16Array#get:length (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#get:length (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 1 i32.shr_u ) - (func $~lib/typedarray/Uint16Array~traverse (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - call $~lib/arraybuffer/ArrayBufferView~traverse - ) - (func $~lib/typedarray/Uint16Array#constructor (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#constructor (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -787,18 +741,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint16Array#get:length (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#get:length (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 1 i32.shr_u ) - (func $~lib/typedarray/Int32Array~traverse (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - call $~lib/arraybuffer/ArrayBufferView~traverse - ) - (func $~lib/typedarray/Int32Array#constructor (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -814,18 +763,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int32Array#get:length (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Uint32Array~traverse (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - call $~lib/arraybuffer/ArrayBufferView~traverse - ) - (func $~lib/typedarray/Uint32Array#constructor (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#constructor (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -841,18 +785,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint32Array#get:length (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#get:length (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Int64Array~traverse (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - call $~lib/arraybuffer/ArrayBufferView~traverse - ) - (func $~lib/typedarray/Int64Array#constructor (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#constructor (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -868,18 +807,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Int64Array#get:length (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#get:length (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $~lib/typedarray/Uint64Array~traverse (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - call $~lib/arraybuffer/ArrayBufferView~traverse - ) - (func $~lib/typedarray/Uint64Array#constructor (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#constructor (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -895,18 +829,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Uint64Array#get:length (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#get:length (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $~lib/typedarray/Float32Array~traverse (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - call $~lib/arraybuffer/ArrayBufferView~traverse - ) - (func $~lib/typedarray/Float32Array#constructor (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#constructor (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -922,18 +851,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Float32Array#get:length (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Float64Array~traverse (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - call $~lib/arraybuffer/ArrayBufferView~traverse - ) - (func $~lib/typedarray/Float64Array#constructor (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#constructor (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -949,13 +873,13 @@ local.set $0 local.get $0 ) - (func $~lib/typedarray/Float64Array#get:length (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#get:length (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 3 i32.shr_u ) - (func $std/typedarray/testInstantiate (; 51 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/typedarray/testInstantiate (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1463,7 +1387,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#__set (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#__set (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1487,7 +1411,7 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int32Array#__get (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#__get (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1510,7 +1434,7 @@ i32.add i32.load ) - (func $~lib/typedarray/Int32Array#subarray (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1639,7 +1563,7 @@ i32.const 9 call $~lib/runtime/runtime.register ) - (func $~lib/typedarray/Float64Array#__set (; 55 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/typedarray/Float64Array#__set (; 40 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 local.get $0 i32.load offset=8 @@ -1663,7 +1587,7 @@ local.get $2 f64.store ) - (func $~lib/typedarray/Float64Array#subarray (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#subarray (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1792,7 +1716,7 @@ i32.const 14 call $~lib/runtime/runtime.register ) - (func $~lib/util/sort/insertionSort (; 57 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) @@ -1888,14 +1812,14 @@ unreachable end ) - (func $~lib/allocator/arena/__mem_free (; 58 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 59 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/util/sort/weakHeapSort (; 60 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2195,7 +2119,7 @@ local.get $10 f64.store ) - (func $~lib/typedarray/Float64Array#sort (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2279,7 +2203,7 @@ local.get $3 end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 62 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 47 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -2312,7 +2236,7 @@ i64.lt_s i32.sub ) - (func $~lib/typedarray/Float64Array#sort|trampoline (; 63 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort|trampoline (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2322,7 +2246,7 @@ unreachable end block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) - i32.const 15 + i32.const 1 br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 @@ -2331,7 +2255,7 @@ local.get $1 call $~lib/typedarray/Float64Array#sort ) - (func $~lib/typedarray/Float64Array#__get (; 64 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/typedarray/Float64Array#__get (; 49 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -2354,7 +2278,7 @@ i32.add f64.load ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 65 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2386,7 +2310,7 @@ i32.and i32.store8 ) - (func $~lib/typedarray/Uint8ClampedArray#__get (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#__get (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2405,7 +2329,7 @@ i32.add i32.load8_u ) - (func $~lib/typedarray/Int8Array#__set (; 67 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int8Array#__set (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2425,7 +2349,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Int8Array#fill (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int8Array#fill (; 53 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2513,12 +2437,7 @@ end local.get $7 ) - (func $~lib/array/Array~traverse (; 69 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/util/memory/memcpy (; 70 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3719,7 +3638,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 71 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3950,7 +3869,7 @@ end end ) - (func $~lib/runtime/runtime.makeArray (; 72 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 56 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -4014,11 +3933,11 @@ end local.get $4 ) - (func $~lib/array/Array#get:length (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/typedarray/Int8Array#__get (; 74 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4037,7 +3956,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__unchecked_get (; 75 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -4046,7 +3965,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__get (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4056,7 +3975,7 @@ if i32.const 0 i32.const 264 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -4065,7 +3984,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/typedarray/isInt8ArrayEqual (; 77 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4113,7 +4032,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4242,7 +4161,7 @@ i32.const 4 call $~lib/runtime/runtime.register ) - (func $~lib/typedarray/Int32Array#fill (; 79 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#fill (; 63 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -4340,16 +4259,11 @@ end local.get $7 ) - (func $~lib/array/Array~traverse (; 80 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - call $~lib/collector/dummy/__ref_mark - ) - (func $~lib/array/Array#get:length (; 81 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 64 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 82 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -4358,7 +4272,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 83 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4368,7 +4282,7 @@ if i32.const 0 i32.const 264 - i32.const 99 + i32.const 100 i32.const 61 call $~lib/env/abort unreachable @@ -4377,7 +4291,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/typedarray/isInt32ArrayEqual (; 84 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4425,12 +4339,12 @@ end i32.const 1 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 85 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 86 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduce (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4487,7 +4401,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 87 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 70 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4507,7 +4421,7 @@ i32.const 3 call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 20 + i32.const 2 i32.const 0 call $~lib/typedarray/Int8Array#reduce local.set $1 @@ -4528,7 +4442,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#__set (; 88 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 71 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4548,12 +4462,12 @@ local.get $2 i32.store8 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 89 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 72 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduce (; 90 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 73 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4610,7 +4524,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 91 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 74 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4630,7 +4544,7 @@ i32.const 3 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 21 + i32.const 3 i32.const 0 call $~lib/typedarray/Uint8Array#reduce local.set $1 @@ -4649,12 +4563,12 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 92 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 75 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduce (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduce (; 76 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4711,7 +4625,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 94 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 77 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4731,7 +4645,7 @@ i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 22 + i32.const 4 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#reduce local.set $1 @@ -4750,7 +4664,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#__set (; 95 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4774,12 +4688,12 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 96 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 79 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduce (; 97 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduce (; 80 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4836,7 +4750,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 98 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 81 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4856,7 +4770,7 @@ i32.const 3 call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 23 + i32.const 5 i32.const 0 call $~lib/typedarray/Int16Array#reduce local.set $1 @@ -4877,7 +4791,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#__set (; 99 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 82 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4901,12 +4815,12 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 83 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduce (; 101 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduce (; 84 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4963,7 +4877,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 102 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 85 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4983,7 +4897,7 @@ i32.const 3 call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 24 + i32.const 6 i32.const 0 call $~lib/typedarray/Uint16Array#reduce local.set $1 @@ -5002,12 +4916,12 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 86 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduce (; 104 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5064,7 +4978,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 105 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 88 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5084,7 +4998,7 @@ i32.const 3 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 25 + i32.const 7 i32.const 0 call $~lib/typedarray/Int32Array#reduce local.set $1 @@ -5101,7 +5015,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#__set (; 106 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint32Array#__set (; 89 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -5125,12 +5039,12 @@ local.get $2 i32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 90 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduce (; 108 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduce (; 91 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5187,7 +5101,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 109 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 92 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5207,7 +5121,7 @@ i32.const 3 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 26 + i32.const 8 i32.const 0 call $~lib/typedarray/Uint32Array#reduce local.set $1 @@ -5224,7 +5138,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#__set (; 110 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 93 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -5248,12 +5162,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 111 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 94 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 112 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 95 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -5310,7 +5224,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 113 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 96 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5330,7 +5244,7 @@ i64.const 3 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 27 + i32.const 9 i64.const 0 call $~lib/typedarray/Int64Array#reduce local.set $1 @@ -5347,7 +5261,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#__set (; 114 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Uint64Array#__set (; 97 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -5371,12 +5285,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 115 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 98 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduce (; 116 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduce (; 99 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -5433,7 +5347,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 117 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 100 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5453,7 +5367,7 @@ i64.const 3 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 28 + i32.const 10 i64.const 0 call $~lib/typedarray/Uint64Array#reduce local.set $1 @@ -5470,7 +5384,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#__set (; 118 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 101 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -5494,12 +5408,12 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 119 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 102 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 120 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduce (; 103 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -5556,7 +5470,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 121 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 104 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -5576,7 +5490,7 @@ f32.const 3 call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 29 + i32.const 11 f32.const 0 call $~lib/typedarray/Float32Array#reduce local.set $1 @@ -5593,12 +5507,12 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 122 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 105 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 123 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduce (; 106 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) @@ -5655,7 +5569,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 124 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 107 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -5675,7 +5589,7 @@ f64.const 3 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 30 + i32.const 12 f64.const 0 call $~lib/typedarray/Float64Array#reduce local.set $1 @@ -5692,12 +5606,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 125 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduceRight (; 126 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduceRight (; 109 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5751,7 +5665,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 127 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 110 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5771,7 +5685,7 @@ i32.const 3 call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 31 + i32.const 13 i32.const 0 call $~lib/typedarray/Int8Array#reduceRight local.set $1 @@ -5792,12 +5706,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 128 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 111 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 129 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 112 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5851,7 +5765,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 130 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 113 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5871,7 +5785,7 @@ i32.const 3 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 32 + i32.const 14 i32.const 0 call $~lib/typedarray/Uint8Array#reduceRight local.set $1 @@ -5890,12 +5804,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 131 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 114 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 132 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 115 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5949,7 +5863,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 133 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 116 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5969,7 +5883,7 @@ i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 33 + i32.const 15 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#reduceRight local.set $1 @@ -5988,12 +5902,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 134 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 117 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduceRight (; 135 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduceRight (; 118 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6047,7 +5961,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 136 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 119 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6067,7 +5981,7 @@ i32.const 3 call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 34 + i32.const 16 i32.const 0 call $~lib/typedarray/Int16Array#reduceRight local.set $1 @@ -6088,12 +6002,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 137 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 120 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 138 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 121 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6147,7 +6061,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 139 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 122 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6167,7 +6081,7 @@ i32.const 3 call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 35 + i32.const 17 i32.const 0 call $~lib/typedarray/Uint16Array#reduceRight local.set $1 @@ -6186,12 +6100,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 140 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 123 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduceRight (; 141 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 124 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6245,7 +6159,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 142 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 125 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6265,7 +6179,7 @@ i32.const 3 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 36 + i32.const 18 i32.const 0 call $~lib/typedarray/Int32Array#reduceRight local.set $1 @@ -6282,12 +6196,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 143 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 126 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduceRight (; 144 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduceRight (; 127 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6341,7 +6255,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 145 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 128 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6361,7 +6275,7 @@ i32.const 3 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 37 + i32.const 19 i32.const 0 call $~lib/typedarray/Uint32Array#reduceRight local.set $1 @@ -6378,12 +6292,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 146 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 129 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduceRight (; 147 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 130 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -6437,7 +6351,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 148 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 131 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6457,7 +6371,7 @@ i64.const 3 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 38 + i32.const 20 i64.const 0 call $~lib/typedarray/Int64Array#reduceRight local.set $1 @@ -6474,12 +6388,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 149 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 132 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduceRight (; 150 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduceRight (; 133 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -6533,7 +6447,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 151 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 134 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6553,7 +6467,7 @@ i64.const 3 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 39 + i32.const 21 i64.const 0 call $~lib/typedarray/Uint64Array#reduceRight local.set $1 @@ -6570,12 +6484,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 152 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 135 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduceRight (; 153 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduceRight (; 136 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -6629,7 +6543,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 154 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 137 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -6649,7 +6563,7 @@ f32.const 3 call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 40 + i32.const 22 f32.const 0 call $~lib/typedarray/Float32Array#reduceRight local.set $1 @@ -6666,12 +6580,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 155 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 138 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduceRight (; 156 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduceRight (; 139 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) @@ -6725,7 +6639,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 157 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 140 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -6745,7 +6659,7 @@ f64.const 3 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 41 + i32.const 23 f64.const 0 call $~lib/typedarray/Float64Array#reduceRight local.set $1 @@ -6762,12 +6676,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 158 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 141 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6832,7 +6746,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 160 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 143 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6852,7 +6766,7 @@ i32.const 3 call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 42 + i32.const 24 call $~lib/typedarray/Int8Array#map local.set $1 local.get $1 @@ -6898,12 +6812,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 161 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 144 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8Array#map (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 145 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6968,7 +6882,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint8Array#__get (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__get (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -6987,7 +6901,7 @@ i32.add i32.load8_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 164 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 147 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7007,7 +6921,7 @@ i32.const 3 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 43 + i32.const 25 call $~lib/typedarray/Uint8Array#map local.set $1 local.get $1 @@ -7053,12 +6967,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 165 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 148 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7123,7 +7037,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 167 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 150 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7143,7 +7057,7 @@ i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 44 + i32.const 26 call $~lib/typedarray/Uint8ClampedArray#map local.set $1 local.get $1 @@ -7189,12 +7103,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 168 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 151 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int16Array#map (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7259,7 +7173,7 @@ end local.get $6 ) - (func $~lib/typedarray/Int16Array#__get (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7282,7 +7196,7 @@ i32.add i32.load16_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 171 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 154 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7302,7 +7216,7 @@ i32.const 3 call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 45 + i32.const 27 call $~lib/typedarray/Int16Array#map local.set $1 local.get $1 @@ -7348,12 +7262,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 172 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 155 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint16Array#map (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 156 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7418,7 +7332,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint16Array#__get (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7441,7 +7355,7 @@ i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 175 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 158 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7461,7 +7375,7 @@ i32.const 3 call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 46 + i32.const 28 call $~lib/typedarray/Uint16Array#map local.set $1 local.get $1 @@ -7507,12 +7421,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 176 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 159 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int32Array#map (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7577,7 +7491,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 178 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 161 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7597,7 +7511,7 @@ i32.const 3 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 47 + i32.const 29 call $~lib/typedarray/Int32Array#map local.set $1 local.get $1 @@ -7643,12 +7557,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 179 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 162 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint32Array#map (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7713,7 +7627,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint32Array#__get (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7736,7 +7650,7 @@ i32.add i32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 182 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 165 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7756,7 +7670,7 @@ i32.const 3 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 48 + i32.const 30 call $~lib/typedarray/Uint32Array#map local.set $1 local.get $1 @@ -7802,12 +7716,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 183 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 166 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7872,7 +7786,7 @@ end local.get $6 ) - (func $~lib/typedarray/Int64Array#__get (; 185 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 168 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -7895,7 +7809,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 186 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 169 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7915,7 +7829,7 @@ i64.const 3 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 49 + i32.const 31 call $~lib/typedarray/Int64Array#map local.set $1 local.get $1 @@ -7961,12 +7875,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 187 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 170 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Uint64Array#map (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8031,7 +7945,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint64Array#__get (; 189 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__get (; 172 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -8054,7 +7968,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 190 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 173 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8074,7 +7988,7 @@ i64.const 3 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 50 + i32.const 32 call $~lib/typedarray/Uint64Array#map local.set $1 local.get $1 @@ -8120,12 +8034,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 191 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 174 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8190,7 +8104,7 @@ end local.get $6 ) - (func $~lib/typedarray/Float32Array#__get (; 193 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 176 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -8213,7 +8127,7 @@ i32.add f32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 194 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 177 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8233,7 +8147,7 @@ f32.const 3 call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 51 + i32.const 33 call $~lib/typedarray/Float32Array#map local.set $1 local.get $1 @@ -8279,12 +8193,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 195 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 178 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 179 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8349,7 +8263,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 197 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 180 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8369,7 +8283,7 @@ f64.const 3 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 52 + i32.const 34 call $~lib/typedarray/Float64Array#map local.set $1 local.get $1 @@ -8415,7 +8329,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 198 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 181 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -8424,7 +8338,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 199 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8484,7 +8398,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 200 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 183 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -8493,7 +8407,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 201 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 184 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8514,7 +8428,7 @@ i32.const 6 call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 53 + i32.const 35 call $~lib/typedarray/Int8Array#some local.set $1 local.get $1 @@ -8530,7 +8444,7 @@ unreachable end local.get $0 - i32.const 54 + i32.const 36 call $~lib/typedarray/Int8Array#some local.set $2 local.get $2 @@ -8547,14 +8461,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 202 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 185 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#some (; 203 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8614,14 +8528,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 204 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 187 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 205 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 188 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8642,7 +8556,7 @@ i32.const 6 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 55 + i32.const 37 call $~lib/typedarray/Uint8Array#some local.set $1 local.get $1 @@ -8658,7 +8572,7 @@ unreachable end local.get $0 - i32.const 56 + i32.const 38 call $~lib/typedarray/Uint8Array#some local.set $2 local.get $2 @@ -8675,14 +8589,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 206 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 189 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#some (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#some (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8742,14 +8656,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 208 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 191 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 209 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 192 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8770,7 +8684,7 @@ i32.const 6 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 57 + i32.const 39 call $~lib/typedarray/Uint8ClampedArray#some local.set $1 local.get $1 @@ -8786,7 +8700,7 @@ unreachable end local.get $0 - i32.const 58 + i32.const 40 call $~lib/typedarray/Uint8ClampedArray#some local.set $2 local.get $2 @@ -8803,7 +8717,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 210 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8812,7 +8726,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 211 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 194 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8872,7 +8786,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 212 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 195 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8881,7 +8795,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 213 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 196 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8902,7 +8816,7 @@ i32.const 6 call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 59 + i32.const 41 call $~lib/typedarray/Int16Array#some local.set $1 local.get $1 @@ -8918,7 +8832,7 @@ unreachable end local.get $0 - i32.const 60 + i32.const 42 call $~lib/typedarray/Int16Array#some local.set $2 local.get $2 @@ -8935,14 +8849,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 214 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 197 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#some (; 215 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9002,14 +8916,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 216 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 199 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 217 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 200 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9030,7 +8944,7 @@ i32.const 6 call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 61 + i32.const 43 call $~lib/typedarray/Uint16Array#some local.set $1 local.get $1 @@ -9046,7 +8960,7 @@ unreachable end local.get $0 - i32.const 62 + i32.const 44 call $~lib/typedarray/Uint16Array#some local.set $2 local.get $2 @@ -9063,12 +8977,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 218 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 201 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 219 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9128,12 +9042,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 220 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 203 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 221 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 204 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9154,7 +9068,7 @@ i32.const 6 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 63 + i32.const 45 call $~lib/typedarray/Int32Array#some local.set $1 local.get $1 @@ -9170,7 +9084,7 @@ unreachable end local.get $0 - i32.const 64 + i32.const 46 call $~lib/typedarray/Int32Array#some local.set $2 local.get $2 @@ -9187,12 +9101,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 222 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 205 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#some (; 223 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#some (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9252,12 +9166,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 224 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 207 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 225 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 208 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9278,7 +9192,7 @@ i32.const 6 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 65 + i32.const 47 call $~lib/typedarray/Uint32Array#some local.set $1 local.get $1 @@ -9294,7 +9208,7 @@ unreachable end local.get $0 - i32.const 66 + i32.const 48 call $~lib/typedarray/Uint32Array#some local.set $2 local.get $2 @@ -9311,12 +9225,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 226 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 209 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 227 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 210 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9376,12 +9290,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 228 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 211 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 229 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 212 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9402,7 +9316,7 @@ i64.const 6 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 67 + i32.const 49 call $~lib/typedarray/Int64Array#some local.set $1 local.get $1 @@ -9418,7 +9332,7 @@ unreachable end local.get $0 - i32.const 68 + i32.const 50 call $~lib/typedarray/Int64Array#some local.set $2 local.get $2 @@ -9435,12 +9349,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 230 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 213 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#some (; 231 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#some (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9500,12 +9414,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 232 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 215 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 233 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 216 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9526,7 +9440,7 @@ i64.const 6 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 69 + i32.const 51 call $~lib/typedarray/Uint64Array#some local.set $1 local.get $1 @@ -9542,7 +9456,7 @@ unreachable end local.get $0 - i32.const 70 + i32.const 52 call $~lib/typedarray/Uint64Array#some local.set $2 local.get $2 @@ -9559,12 +9473,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 234 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 217 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 235 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 218 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9624,12 +9538,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 236 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 219 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 237 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 220 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9650,7 +9564,7 @@ f32.const 6 call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 71 + i32.const 53 call $~lib/typedarray/Float32Array#some local.set $1 local.get $1 @@ -9666,7 +9580,7 @@ unreachable end local.get $0 - i32.const 72 + i32.const 54 call $~lib/typedarray/Float32Array#some local.set $2 local.get $2 @@ -9683,12 +9597,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 238 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 221 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 239 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9748,12 +9662,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 240 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 223 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 241 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 224 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9774,7 +9688,7 @@ f64.const 6 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 73 + i32.const 55 call $~lib/typedarray/Float64Array#some local.set $1 local.get $1 @@ -9790,7 +9704,7 @@ unreachable end local.get $0 - i32.const 74 + i32.const 56 call $~lib/typedarray/Float64Array#some local.set $2 local.get $2 @@ -9807,7 +9721,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 242 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9816,7 +9730,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#findIndex (; 243 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9876,7 +9790,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 244 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 227 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9885,7 +9799,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 245 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 228 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9906,7 +9820,7 @@ i32.const 3 call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 75 + i32.const 57 call $~lib/typedarray/Int8Array#findIndex local.set $1 local.get $1 @@ -9922,7 +9836,7 @@ unreachable end local.get $0 - i32.const 76 + i32.const 58 call $~lib/typedarray/Int8Array#findIndex local.set $2 local.get $2 @@ -9938,14 +9852,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 246 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 229 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#findIndex (; 247 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 230 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10005,14 +9919,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 248 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 231 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 249 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 232 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10033,7 +9947,7 @@ i32.const 3 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 77 + i32.const 59 call $~lib/typedarray/Uint8Array#findIndex local.set $1 local.get $1 @@ -10049,7 +9963,7 @@ unreachable end local.get $0 - i32.const 78 + i32.const 60 call $~lib/typedarray/Uint8Array#findIndex local.set $2 local.get $2 @@ -10065,14 +9979,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 250 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 233 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 251 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 234 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10132,14 +10046,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 252 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 235 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 253 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 236 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10160,7 +10074,7 @@ i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 79 + i32.const 61 call $~lib/typedarray/Uint8ClampedArray#findIndex local.set $1 local.get $1 @@ -10176,7 +10090,7 @@ unreachable end local.get $0 - i32.const 80 + i32.const 62 call $~lib/typedarray/Uint8ClampedArray#findIndex local.set $2 local.get $2 @@ -10192,7 +10106,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 254 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 237 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10201,7 +10115,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#findIndex (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10261,7 +10175,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 256 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 239 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10270,7 +10184,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 257 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 240 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10291,7 +10205,7 @@ i32.const 3 call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 81 + i32.const 63 call $~lib/typedarray/Int16Array#findIndex local.set $1 local.get $1 @@ -10307,7 +10221,7 @@ unreachable end local.get $0 - i32.const 82 + i32.const 64 call $~lib/typedarray/Int16Array#findIndex local.set $2 local.get $2 @@ -10323,14 +10237,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 258 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 241 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#findIndex (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 242 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10390,14 +10304,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 260 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 243 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 261 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 244 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10418,7 +10332,7 @@ i32.const 3 call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 83 + i32.const 65 call $~lib/typedarray/Uint16Array#findIndex local.set $1 local.get $1 @@ -10434,7 +10348,7 @@ unreachable end local.get $0 - i32.const 84 + i32.const 66 call $~lib/typedarray/Uint16Array#findIndex local.set $2 local.get $2 @@ -10450,12 +10364,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 262 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 245 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#findIndex (; 263 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10515,12 +10429,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 264 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 247 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 265 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 248 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10541,7 +10455,7 @@ i32.const 3 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 85 + i32.const 67 call $~lib/typedarray/Int32Array#findIndex local.set $1 local.get $1 @@ -10557,7 +10471,7 @@ unreachable end local.get $0 - i32.const 86 + i32.const 68 call $~lib/typedarray/Int32Array#findIndex local.set $2 local.get $2 @@ -10573,12 +10487,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 266 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 249 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#findIndex (; 267 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#findIndex (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10638,12 +10552,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 268 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 251 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 269 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 252 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10664,7 +10578,7 @@ i32.const 3 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 87 + i32.const 69 call $~lib/typedarray/Uint32Array#findIndex local.set $1 local.get $1 @@ -10680,7 +10594,7 @@ unreachable end local.get $0 - i32.const 88 + i32.const 70 call $~lib/typedarray/Uint32Array#findIndex local.set $2 local.get $2 @@ -10696,12 +10610,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 270 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 253 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#findIndex (; 271 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 254 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10761,12 +10675,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 272 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 255 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 273 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 256 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10787,7 +10701,7 @@ i64.const 3 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 89 + i32.const 71 call $~lib/typedarray/Int64Array#findIndex local.set $1 local.get $1 @@ -10803,7 +10717,7 @@ unreachable end local.get $0 - i32.const 90 + i32.const 72 call $~lib/typedarray/Int64Array#findIndex local.set $2 local.get $2 @@ -10819,12 +10733,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 274 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 257 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#findIndex (; 275 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#findIndex (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10884,12 +10798,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 276 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 259 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 277 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 260 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10910,7 +10824,7 @@ i64.const 3 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 91 + i32.const 73 call $~lib/typedarray/Uint64Array#findIndex local.set $1 local.get $1 @@ -10926,7 +10840,7 @@ unreachable end local.get $0 - i32.const 92 + i32.const 74 call $~lib/typedarray/Uint64Array#findIndex local.set $2 local.get $2 @@ -10942,12 +10856,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 278 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 261 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#findIndex (; 279 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11007,12 +10921,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 280 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 263 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 281 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 264 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11033,7 +10947,7 @@ f32.const 3 call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 93 + i32.const 75 call $~lib/typedarray/Float32Array#findIndex local.set $1 local.get $1 @@ -11049,7 +10963,7 @@ unreachable end local.get $0 - i32.const 94 + i32.const 76 call $~lib/typedarray/Float32Array#findIndex local.set $2 local.get $2 @@ -11065,12 +10979,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 282 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 265 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#findIndex (; 283 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 266 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11130,12 +11044,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 284 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 267 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 285 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 268 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11156,7 +11070,7 @@ f64.const 3 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 95 + i32.const 77 call $~lib/typedarray/Float64Array#findIndex local.set $1 local.get $1 @@ -11172,7 +11086,7 @@ unreachable end local.get $0 - i32.const 96 + i32.const 78 call $~lib/typedarray/Float64Array#findIndex local.set $2 local.get $2 @@ -11188,7 +11102,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 286 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 269 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11199,7 +11113,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int8Array#every (; 287 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 270 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11266,7 +11180,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 288 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 271 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11275,7 +11189,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 289 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 272 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11296,7 +11210,7 @@ i32.const 6 call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 97 + i32.const 79 call $~lib/typedarray/Int8Array#every local.set $1 local.get $1 @@ -11312,7 +11226,7 @@ unreachable end local.get $0 - i32.const 98 + i32.const 80 call $~lib/typedarray/Int8Array#every local.set $2 local.get $2 @@ -11329,7 +11243,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 290 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 273 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -11338,7 +11252,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8Array#every (; 291 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 274 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11405,14 +11319,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 292 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 275 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 293 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 276 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11433,7 +11347,7 @@ i32.const 6 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 99 + i32.const 81 call $~lib/typedarray/Uint8Array#every local.set $1 local.get $1 @@ -11449,7 +11363,7 @@ unreachable end local.get $0 - i32.const 100 + i32.const 82 call $~lib/typedarray/Uint8Array#every local.set $2 local.get $2 @@ -11466,7 +11380,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 294 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 277 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -11475,7 +11389,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#every (; 295 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#every (; 278 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11542,14 +11456,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 296 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 279 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 297 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 280 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11570,7 +11484,7 @@ i32.const 6 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 101 + i32.const 83 call $~lib/typedarray/Uint8ClampedArray#every local.set $1 local.get $1 @@ -11586,7 +11500,7 @@ unreachable end local.get $0 - i32.const 102 + i32.const 84 call $~lib/typedarray/Uint8ClampedArray#every local.set $2 local.get $2 @@ -11603,7 +11517,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 298 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 281 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11614,7 +11528,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int16Array#every (; 299 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11681,7 +11595,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 300 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 283 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11690,7 +11604,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 301 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 284 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11711,7 +11625,7 @@ i32.const 6 call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 103 + i32.const 85 call $~lib/typedarray/Int16Array#every local.set $1 local.get $1 @@ -11727,7 +11641,7 @@ unreachable end local.get $0 - i32.const 104 + i32.const 86 call $~lib/typedarray/Int16Array#every local.set $2 local.get $2 @@ -11744,7 +11658,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 302 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 285 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and @@ -11753,7 +11667,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint16Array#every (; 303 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 286 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11820,14 +11734,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 304 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 287 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 305 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 288 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11848,7 +11762,7 @@ i32.const 6 call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 105 + i32.const 87 call $~lib/typedarray/Uint16Array#every local.set $1 local.get $1 @@ -11864,7 +11778,7 @@ unreachable end local.get $0 - i32.const 106 + i32.const 88 call $~lib/typedarray/Uint16Array#every local.set $2 local.get $2 @@ -11881,14 +11795,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 306 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 289 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.const 0 i32.eq ) - (func $~lib/typedarray/Int32Array#every (; 307 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 290 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11955,12 +11869,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 308 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 291 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 309 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 292 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11981,7 +11895,7 @@ i32.const 6 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 107 + i32.const 89 call $~lib/typedarray/Int32Array#every local.set $1 local.get $1 @@ -11997,7 +11911,7 @@ unreachable end local.get $0 - i32.const 108 + i32.const 90 call $~lib/typedarray/Int32Array#every local.set $2 local.get $2 @@ -12014,14 +11928,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 310 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 293 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_u i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint32Array#every (; 311 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#every (; 294 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12088,12 +12002,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 312 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 295 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 313 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 296 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12114,7 +12028,7 @@ i32.const 6 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 109 + i32.const 91 call $~lib/typedarray/Uint32Array#every local.set $1 local.get $1 @@ -12130,7 +12044,7 @@ unreachable end local.get $0 - i32.const 110 + i32.const 92 call $~lib/typedarray/Uint32Array#every local.set $2 local.get $2 @@ -12147,14 +12061,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 314 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 297 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (; 315 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 298 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12221,12 +12135,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 316 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 299 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 317 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 300 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12247,7 +12161,7 @@ i64.const 6 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 111 + i32.const 93 call $~lib/typedarray/Int64Array#every local.set $1 local.get $1 @@ -12263,7 +12177,7 @@ unreachable end local.get $0 - i32.const 112 + i32.const 94 call $~lib/typedarray/Int64Array#every local.set $2 local.get $2 @@ -12280,14 +12194,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 318 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 301 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $~lib/typedarray/Uint64Array#every (; 319 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#every (; 302 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12354,12 +12268,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 320 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 303 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 321 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 304 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12380,7 +12294,7 @@ i64.const 6 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 113 + i32.const 95 call $~lib/typedarray/Uint64Array#every local.set $1 local.get $1 @@ -12396,7 +12310,7 @@ unreachable end local.get $0 - i32.const 114 + i32.const 96 call $~lib/typedarray/Uint64Array#every local.set $2 local.get $2 @@ -12413,12 +12327,12 @@ unreachable end ) - (func $~lib/builtins/isNaN (; 322 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 305 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $~lib/math/NativeMathf.mod (; 323 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 306 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12669,14 +12583,14 @@ local.get $2 f32.reinterpret_i32 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 324 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 307 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 325 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 308 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12743,12 +12657,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 326 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 309 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 327 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 310 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12769,7 +12683,7 @@ f32.const 6 call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 115 + i32.const 97 call $~lib/typedarray/Float32Array#every local.set $1 local.get $1 @@ -12785,7 +12699,7 @@ unreachable end local.get $0 - i32.const 116 + i32.const 98 call $~lib/typedarray/Float32Array#every local.set $2 local.get $2 @@ -12802,12 +12716,12 @@ unreachable end ) - (func $~lib/builtins/isNaN (; 328 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 311 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/math/NativeMath.mod (; 329 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 312 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -13060,14 +12974,14 @@ local.get $2 f64.reinterpret_i64 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 330 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 313 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 331 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 314 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13134,12 +13048,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 332 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 315 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 333 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 316 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13160,7 +13074,7 @@ f64.const 6 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 117 + i32.const 99 call $~lib/typedarray/Float64Array#every local.set $1 local.get $1 @@ -13176,7 +13090,7 @@ unreachable end local.get $0 - i32.const 118 + i32.const 100 call $~lib/typedarray/Float64Array#every local.set $2 local.get $2 @@ -13193,7 +13107,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 334 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 317 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13248,7 +13162,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 335 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#forEach (; 318 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13293,7 +13207,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 336 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 319 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13334,7 +13248,7 @@ i32.shr_s call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 119 + i32.const 101 call $~lib/typedarray/Int8Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -13349,7 +13263,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 337 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 320 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13400,7 +13314,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8Array#forEach (; 338 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 321 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13445,7 +13359,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 339 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 322 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13480,7 +13394,7 @@ i32.and call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 120 + i32.const 102 call $~lib/typedarray/Uint8Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -13495,7 +13409,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 340 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 323 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13546,7 +13460,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8ClampedArray#forEach (; 341 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#forEach (; 324 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13591,7 +13505,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 342 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 325 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13626,7 +13540,7 @@ i32.and call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 121 + i32.const 103 call $~lib/typedarray/Uint8ClampedArray#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -13641,7 +13555,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 343 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 326 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13696,7 +13610,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 344 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#forEach (; 327 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13741,7 +13655,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 345 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 328 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13782,7 +13696,7 @@ i32.shr_s call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 122 + i32.const 104 call $~lib/typedarray/Int16Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -13797,7 +13711,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 346 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 329 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13848,7 +13762,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint16Array#forEach (; 347 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 330 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13893,7 +13807,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 348 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 331 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13928,7 +13842,7 @@ i32.and call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.const 123 + i32.const 105 call $~lib/typedarray/Uint16Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -13943,7 +13857,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 349 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 332 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13990,7 +13904,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 350 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 333 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14035,7 +13949,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 351 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 334 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14064,7 +13978,7 @@ call $~lib/array/Array#__get call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 124 + i32.const 106 call $~lib/typedarray/Int32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -14079,7 +13993,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 352 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 335 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14126,7 +14040,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint32Array#forEach (; 353 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint32Array#forEach (; 336 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14171,7 +14085,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 354 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 337 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14200,7 +14114,7 @@ call $~lib/array/Array#__get call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 125 + i32.const 107 call $~lib/typedarray/Uint32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -14215,7 +14129,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 355 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 338 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14263,7 +14177,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 356 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 339 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14308,7 +14222,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 357 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 340 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14340,7 +14254,7 @@ i64.extend_i32_s call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 126 + i32.const 108 call $~lib/typedarray/Int64Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -14355,7 +14269,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 358 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 341 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14403,7 +14317,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint64Array#forEach (; 359 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint64Array#forEach (; 342 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14448,7 +14362,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 360 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 343 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14480,7 +14394,7 @@ i64.extend_i32_s call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 127 + i32.const 109 call $~lib/typedarray/Uint64Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -14495,7 +14409,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 361 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 344 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14543,7 +14457,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 362 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#forEach (; 345 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14588,7 +14502,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 363 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 346 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14620,7 +14534,7 @@ f32.convert_i32_s call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 128 + i32.const 110 call $~lib/typedarray/Float32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -14635,7 +14549,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 364 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 347 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14683,7 +14597,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 365 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#forEach (; 348 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14728,7 +14642,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 366 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 349 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14760,7 +14674,7 @@ f64.convert_i32_s call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 129 + i32.const 111 call $~lib/typedarray/Float64Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 @@ -14775,7 +14689,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#reverse (; 367 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 350 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14845,7 +14759,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 368 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 351 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15009,7 +14923,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 369 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 352 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15079,7 +14993,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8Array#subarray (; 370 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 353 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15208,7 +15122,7 @@ i32.const 5 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 371 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 354 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15366,7 +15280,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#reverse (; 372 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reverse (; 355 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15436,7 +15350,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 373 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 356 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15565,7 +15479,7 @@ i32.const 6 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 374 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 357 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15723,7 +15637,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 375 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 358 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15793,7 +15707,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int16Array#subarray (; 376 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 359 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15922,7 +15836,7 @@ i32.const 7 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 377 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 360 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16086,7 +16000,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 378 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 361 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16156,7 +16070,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint16Array#subarray (; 379 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 362 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16285,7 +16199,7 @@ i32.const 8 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 380 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 363 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16443,7 +16357,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 381 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 364 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16513,7 +16427,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 382 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 365 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16665,7 +16579,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#reverse (; 383 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reverse (; 366 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16735,7 +16649,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint32Array#subarray (; 384 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 367 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16864,7 +16778,7 @@ i32.const 10 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 385 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 368 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17016,7 +16930,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#reverse (; 386 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 369 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17086,7 +17000,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int64Array#subarray (; 387 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 370 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17215,7 +17129,7 @@ i32.const 11 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 388 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 371 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17370,7 +17284,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#reverse (; 389 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#reverse (; 372 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17440,7 +17354,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint64Array#subarray (; 390 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 373 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17569,7 +17483,7 @@ i32.const 12 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 391 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 374 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17724,7 +17638,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 392 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 375 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17794,7 +17708,7 @@ end local.get $1 ) - (func $~lib/typedarray/Float32Array#subarray (; 393 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 376 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17923,7 +17837,7 @@ i32.const 13 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 394 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 377 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18078,7 +17992,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 395 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 378 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -18148,7 +18062,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 396 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 379 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18303,7 +18217,7 @@ unreachable end ) - (func $start:std/typedarray (; 397 ;) (type $FUNCSIG$v) + (func $start:std/typedarray (; 380 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32.const 1 @@ -18838,7 +18752,7 @@ drop global.get $std/typedarray/arr8 i32.const 5 - i32.const 16 + i32.const 15 i32.const 0 i32.const 240 call $~lib/runtime/runtime.makeArray @@ -18860,7 +18774,7 @@ drop global.get $std/typedarray/arr8 i32.const 5 - i32.const 16 + i32.const 15 i32.const 0 i32.const 312 call $~lib/runtime/runtime.makeArray @@ -18882,7 +18796,7 @@ drop global.get $std/typedarray/arr8 i32.const 5 - i32.const 16 + i32.const 15 i32.const 0 i32.const 336 call $~lib/runtime/runtime.makeArray @@ -18904,7 +18818,7 @@ drop global.get $std/typedarray/arr8 i32.const 5 - i32.const 16 + i32.const 15 i32.const 0 i32.const 360 call $~lib/runtime/runtime.makeArray @@ -18926,7 +18840,7 @@ drop global.get $std/typedarray/arr8 i32.const 5 - i32.const 16 + i32.const 15 i32.const 0 i32.const 384 call $~lib/runtime/runtime.makeArray @@ -18992,7 +18906,7 @@ end global.get $std/typedarray/sub8 i32.const 3 - i32.const 16 + i32.const 15 i32.const 0 i32.const 408 call $~lib/runtime/runtime.makeArray @@ -19008,7 +18922,7 @@ end global.get $std/typedarray/arr8 i32.const 5 - i32.const 16 + i32.const 15 i32.const 0 i32.const 432 call $~lib/runtime/runtime.makeArray @@ -19054,7 +18968,7 @@ drop global.get $std/typedarray/arr32 i32.const 5 - i32.const 18 + i32.const 16 i32.const 2 i32.const 456 call $~lib/runtime/runtime.makeArray @@ -19076,7 +18990,7 @@ drop global.get $std/typedarray/arr32 i32.const 5 - i32.const 18 + i32.const 16 i32.const 2 i32.const 496 call $~lib/runtime/runtime.makeArray @@ -19098,7 +19012,7 @@ drop global.get $std/typedarray/arr32 i32.const 5 - i32.const 18 + i32.const 16 i32.const 2 i32.const 536 call $~lib/runtime/runtime.makeArray @@ -19120,7 +19034,7 @@ drop global.get $std/typedarray/arr32 i32.const 5 - i32.const 18 + i32.const 16 i32.const 2 i32.const 576 call $~lib/runtime/runtime.makeArray @@ -19142,7 +19056,7 @@ drop global.get $std/typedarray/arr32 i32.const 5 - i32.const 18 + i32.const 16 i32.const 2 i32.const 616 call $~lib/runtime/runtime.makeArray @@ -19212,7 +19126,7 @@ end global.get $std/typedarray/sub32 i32.const 3 - i32.const 18 + i32.const 16 i32.const 2 i32.const 656 call $~lib/runtime/runtime.makeArray @@ -19228,7 +19142,7 @@ end global.get $std/typedarray/arr32 i32.const 5 - i32.const 18 + i32.const 16 i32.const 2 i32.const 688 call $~lib/runtime/runtime.makeArray @@ -19537,9 +19451,9 @@ call $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> call $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> ) - (func $start (; 398 ;) (type $FUNCSIG$v) + (func $start (; 381 ;) (type $FUNCSIG$v) call $start:std/typedarray ) - (func $null (; 399 ;) (type $FUNCSIG$v) + (func $null (; 382 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/wasi.optimized.wat b/tests/compiler/wasi.optimized.wat index 78bc92ce90..72ac147a60 100644 --- a/tests/compiler/wasi.optimized.wat +++ b/tests/compiler/wasi.optimized.wat @@ -1,25 +1,21 @@ (module - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (memory $0 1) (data (i32.const 8) "\01\00\00\00\0e") (data (i32.const 24) "w\00a\00s\00i\00.\00t\00s") - (table $0 2 funcref) - (elem (i32.const 0) $null $~lib/string/String~traverse) + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $wasi/sig (mut i32) (i32.const 1)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/string/String~traverse (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $start (; 1 ;) (type $FUNCSIG$v) + (func $start (; 0 ;) (type $FUNCSIG$v) i32.const 9 global.set $wasi/sig ) - (func $null (; 2 ;) (type $FUNCSIG$v) + (func $null (; 1 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/wasi.untouched.wat b/tests/compiler/wasi.untouched.wat index 9abbcdeaa4..31eff4418d 100644 --- a/tests/compiler/wasi.untouched.wat +++ b/tests/compiler/wasi.untouched.wat @@ -1,12 +1,11 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00w\00a\00s\00i\00.\00t\00s\00") - (table $0 2 funcref) - (elem (i32.const 0) $null $~lib/string/String~traverse) + (table $0 1 funcref) + (elem (i32.const 0) $null) (global $wasi/WASM32 i32 (i32.const 1)) (global $wasi/WASM64 i32 (i32.const 2)) (global $~lib/ASC_TARGET i32 (i32.const 0)) @@ -17,10 +16,7 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/string/String~traverse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - ) - (func $start:wasi (; 2 ;) (type $FUNCSIG$v) + (func $start:wasi (; 1 ;) (type $FUNCSIG$v) i32.const 0 i32.const 0 i32.eq @@ -544,9 +540,9 @@ i32.const 9 global.set $wasi/sig ) - (func $start (; 3 ;) (type $FUNCSIG$v) + (func $start (; 2 ;) (type $FUNCSIG$v) call $start:wasi ) - (func $null (; 4 ;) (type $FUNCSIG$v) + (func $null (; 3 ;) (type $FUNCSIG$v) ) ) From d85a43892f6515f6563e9aaabaef7dce40c95cf2 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 2 Apr 2019 16:46:28 +0200 Subject: [PATCH 085/119] remove old traversal code --- src/compiler.ts | 128 ------------------------------------------------ 1 file changed, 128 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index 6d850d24ed..0355aa6769 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -8344,134 +8344,6 @@ export class Compiler extends DiagnosticEmitter { flow.popBreakLabel(); return module.createBlock(label, conditions, NativeType.I32); } - - /** Reserves the function index / class id for the following `makeTraverse` operation. */ - makeTraverseReserve(classInstance: Class): u32 { - var functionTable = this.functionTable; - var functionIndex = functionTable.length; - functionTable.push(classInstance.internalName + "~traverse"); - return functionIndex; - } - - /** Makes the managed traversal function of the specified class. */ - makeTraverse(classInstance: Class, functionIndex: i32): void { - var program = this.program; - assert(classInstance.type.isManaged(program)); - - // check if the class implements a custom iteration function (only valid for library elements) - var members = classInstance.members; - if (classInstance.isDeclaredInLibrary) { - if (members !== null && members.has("__traverse")) { - let iterPrototype = members.get("__traverse")!; - assert(iterPrototype.kind == ElementKind.FUNCTION_PROTOTYPE); - let iterInstance = assert(program.resolver.resolveFunction(iterPrototype, null)); - assert(iterInstance.is(CommonFlags.PRIVATE | CommonFlags.INSTANCE)); - assert(iterInstance.hasDecorator(DecoratorFlags.UNSAFE)); - assert(!iterInstance.isAny(CommonFlags.AMBIENT | CommonFlags.VIRTUAL)); - let signature = iterInstance.signature; - let parameterTypes = signature.parameterTypes; - assert(parameterTypes.length == 0); - assert(signature.returnType == Type.void); - iterInstance.internalName = classInstance.internalName + "~traverse"; - assert(this.compileFunction(iterInstance)); - this.ensureFunctionTableEntry(iterInstance); - return; - } - } - - var module = this.module; - var options = this.options; - var usizeType = options.usizeType; - var nativeSizeType = options.nativeSizeType; - var nativeSizeSize = options.usizeType.byteSize; - var body = new Array(); - - // nothing to mark if 'this' is null (should not happen) - // body.push( - // module.createIf( - // module.createUnary( - // options.isWasm64 - // ? UnaryOp.EqzI64 - // : UnaryOp.EqzI32, - // module.createGetLocal(0, nativeSizeType) - // ), - // module.createReturn() - // ) - // ); - - // remember the function index so we don't recurse infinitely - var functionTable = this.functionTable; - var functionName = classInstance.internalName + "~traverse"; - assert(functionIndex < functionTable.length); - assert(functionTable[functionIndex] == functionName); - - // if the class extends a base class, call its hook first - var baseInstance = classInstance.base; - if (baseInstance) { - let baseType = baseInstance.type; - let baseClassId = baseInstance.ensureId(); - assert(baseType.isManaged(program)); - body.push( - // BASECLASS~traverse.call(this) - module.createCall(functionTable[baseClassId], [ - module.createGetLocal(0, nativeSizeType) - ], NativeType.None) - ); - } - - var markRef = assert(program.markRef); - var hasRefFields = false; - - // traverse references assigned to own fields - if (members) { - for (let member of members.values()) { - if (member.kind == ElementKind.FIELD) { - if ((member).parent === classInstance) { - let fieldType = (member).type; - if (fieldType.isManaged(program)) { - let fieldClass = fieldType.classReference!; - let fieldClassId = fieldClass.ensureId(); - let fieldOffset = (member).memoryOffset; - assert(fieldOffset >= 0); - hasRefFields = true; - body.push( - // if ($1 = value) FIELDCLASS~traverse($1) - module.createIf( - module.createTeeLocal(1, - module.createLoad( - nativeSizeSize, - false, - module.createGetLocal(0, nativeSizeType), - nativeSizeType, - fieldOffset - ) - ), - module.createBlock(null, [ - module.createCall(markRef.internalName, [ - module.createGetLocal(1, nativeSizeType) - ], NativeType.None), - module.createCall(functionTable[fieldClassId], [ - module.createGetLocal(1, nativeSizeType) - ], NativeType.None) - ]) - ) - ); - } - } - } - } - } - - if (hasRefFields) this.compileFunction(markRef); - - // add the function to the module and return its table index - module.addFunction( - functionName, - this.ensureFunctionType(null, Type.void, options.usizeType), - members ? [ nativeSizeType ] : null, - module.createBlock(null, body) - ); - } } // helpers From a639a42f0d56415d0f0df440f10696e72cba6b74 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 2 Apr 2019 21:30:47 +0200 Subject: [PATCH 086/119] initial __runtime_instanceof --- src/builtins.ts | 98 ++++++++++- src/compiler.ts | 16 +- src/flow.ts | 15 +- std/assembly/runtime.ts | 5 + tests/compiler/call-super.optimized.wat | 4 +- tests/compiler/call-super.untouched.wat | 4 +- tests/compiler/constructor.optimized.wat | 4 +- tests/compiler/constructor.untouched.wat | 4 +- tests/compiler/exports.optimized.wat | 4 +- tests/compiler/exports.untouched.wat | 4 +- tests/compiler/gc.optimized.wat | 10 +- tests/compiler/gc.untouched.wat | 10 +- tests/compiler/gc/global-assign.optimized.wat | 4 +- tests/compiler/gc/global-assign.untouched.wat | 4 +- tests/compiler/gc/global-init.optimized.wat | 4 +- tests/compiler/gc/global-init.untouched.wat | 4 +- tests/compiler/gc/itcm/trace.optimized.wat | 6 +- tests/compiler/gc/itcm/trace.untouched.wat | 6 +- .../gc/rc/global-assign.optimized.wat | 4 +- .../gc/rc/global-assign.untouched.wat | 4 +- .../compiler/gc/rc/global-init.optimized.wat | 4 +- .../compiler/gc/rc/global-init.untouched.wat | 4 +- tests/compiler/getter-call.optimized.wat | 4 +- tests/compiler/getter-call.untouched.wat | 4 +- tests/compiler/inlining.optimized.wat | 4 +- tests/compiler/inlining.untouched.wat | 4 +- tests/compiler/number.optimized.wat | 8 +- tests/compiler/number.untouched.wat | 8 +- .../optional-typeparameters.optimized.wat | 4 +- .../optional-typeparameters.untouched.wat | 4 +- tests/compiler/runtime/instanceof.json | 5 + .../compiler/runtime/instanceof.optimized.wat | 159 +++++++++++++++++ tests/compiler/runtime/instanceof.ts | 61 +++++++ .../compiler/runtime/instanceof.untouched.wat | 164 ++++++++++++++++++ .../compiler/std/array-literal.optimized.wat | 4 +- .../compiler/std/array-literal.untouched.wat | 4 +- tests/compiler/std/array.optimized.wat | 10 +- tests/compiler/std/array.untouched.wat | 10 +- tests/compiler/std/arraybuffer.optimized.wat | 4 +- tests/compiler/std/arraybuffer.untouched.wat | 4 +- tests/compiler/std/dataview.optimized.wat | 4 +- tests/compiler/std/dataview.untouched.wat | 4 +- tests/compiler/std/date.optimized.wat | 4 +- tests/compiler/std/date.untouched.wat | 4 +- tests/compiler/std/map.optimized.wat | 4 +- tests/compiler/std/map.untouched.wat | 4 +- tests/compiler/std/new.optimized.wat | 4 +- tests/compiler/std/new.untouched.wat | 4 +- .../compiler/std/object-literal.optimized.wat | 4 +- .../compiler/std/object-literal.untouched.wat | 4 +- .../std/operator-overloading.optimized.wat | 4 +- .../std/operator-overloading.untouched.wat | 4 +- tests/compiler/std/runtime.optimized.wat | 10 +- tests/compiler/std/runtime.untouched.wat | 10 +- tests/compiler/std/set.optimized.wat | 4 +- tests/compiler/std/set.untouched.wat | 4 +- tests/compiler/std/static-array.optimized.wat | 2 +- tests/compiler/std/static-array.untouched.wat | 2 +- tests/compiler/std/string-utf8.optimized.wat | 4 +- tests/compiler/std/string-utf8.untouched.wat | 4 +- tests/compiler/std/string.optimized.wat | 10 +- tests/compiler/std/string.untouched.wat | 10 +- tests/compiler/std/symbol.optimized.wat | 4 +- tests/compiler/std/symbol.untouched.wat | 4 +- tests/compiler/std/typedarray.optimized.wat | 4 +- tests/compiler/std/typedarray.untouched.wat | 4 +- 66 files changed, 654 insertions(+), 157 deletions(-) create mode 100644 tests/compiler/runtime/instanceof.json create mode 100644 tests/compiler/runtime/instanceof.optimized.wat create mode 100644 tests/compiler/runtime/instanceof.ts create mode 100644 tests/compiler/runtime/instanceof.untouched.wat diff --git a/src/builtins.ts b/src/builtins.ts index 67c2083a4f..227179bdda 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -54,7 +54,6 @@ import { import { ElementKind, FunctionPrototype, - Class, Field, Global, DecoratorFlags @@ -479,6 +478,7 @@ export namespace BuiltinSymbols { // std/runtime.ts export const runtime_id = "~lib/runtime/__runtime_id"; + export const runtime_instanceof = "~lib/runtime/__runtime_instanceof"; export const runtime_allocate = "~lib/runtime/runtime.allocate"; export const runtime_reallocate = "~lib/runtime/runtime.reallocate"; export const runtime_register = "~lib/runtime/runtime.register"; @@ -3652,6 +3652,20 @@ export function compileCall( } return module.createI32(classReference.ensureId()); } + case BuiltinSymbols.runtime_instanceof: { + if ( + checkTypeAbsent(typeArguments, reportNode, prototype) | + checkArgsRequired(operands, 2, reportNode, compiler) + ) { + compiler.currentType = Type.void; + return module.createUnreachable(); + } + let arg0 = compiler.compileExpression(operands[0], Type.u32, ConversionKind.IMPLICIT, WrapMode.NONE); + let arg1 = compiler.compileExpression(operands[1], Type.u32, ConversionKind.IMPLICIT, WrapMode.NONE); + compiler.needsInstanceOf = true; + compiler.currentType = Type.bool; + return module.createCall(BuiltinSymbols.runtime_instanceof, [ arg0, arg1 ], NativeType.I32); + } case BuiltinSymbols.gc_mark_roots: { if ( checkTypeAbsent(typeArguments, reportNode, prototype) | @@ -3660,7 +3674,7 @@ export function compileCall( compiler.currentType = Type.void; return module.createUnreachable(); } - compiler.needsTraverse = true; + compiler.needsMark = true; compiler.currentType = Type.void; return module.createCall(BuiltinSymbols.gc_mark_roots, null, NativeType.None); } @@ -3674,7 +3688,7 @@ export function compileCall( } let arg0 = compiler.compileExpression(operands[0], Type.u32, ConversionKind.IMPLICIT, WrapMode.NONE); let arg1 = compiler.compileExpression(operands[1], compiler.options.usizeType, ConversionKind.IMPLICIT, WrapMode.NONE); - compiler.needsTraverse = true; + compiler.needsMark = true; compiler.currentType = Type.void; return module.createCall(BuiltinSymbols.gc_mark_members, [ arg0, arg1 ], NativeType.None); } @@ -4061,7 +4075,7 @@ export function compileAbort( ]); } -/** Compiles the mark_roots function if required. */ +/** Compiles the `__gc_mark_roots` function. */ export function compileMarkRoots(compiler: Compiler): void { var module = compiler.module; var exprs = new Array(); @@ -4113,6 +4127,7 @@ export function compileMarkRoots(compiler: Compiler): void { ); } +/** Compiles the `__gc_mark_members` function. */ export function compileMarkMembers(compiler: Compiler): void { var program = compiler.program; var module = compiler.module; @@ -4221,6 +4236,81 @@ export function compileMarkMembers(compiler: Compiler): void { module.addFunction(BuiltinSymbols.gc_mark_members, ftype, [ nativeSizeType ], current); } +/** Compiles the `__runtime_instanceof` function. */ +export function compileInstanceOf(compiler: Compiler): void { + var program = compiler.program; + var module = compiler.module; + var managedClasses = program.managedClasses; + var ftype = compiler.ensureFunctionType([ Type.i32, Type.i32 ], Type.i32); // $0 instanceof $1 -> bool + + // NOTE: There are multiple ways to model this. The one chosen here is to compute + // all possibilities in a branchless expression, growing linearly with the number + // of chained base classes. + // + // switch ($0) { + // case ANIMAL_ID: { + // return ($1 == ANIMAL_ID); + // } + // case CAT_ID: { + // return ($1 == CAT_ID) | ($1 == ANIMAL_ID); + // } + // case BLACKCAT_ID: { + // return ($1 == BLACKCAT_ID) | ($1 == CAT_ID) | ($1 == ANIMAL_ID); + // } + // } + // return false; + // + // Another one would be an inner br_table, but class id distribution in larger + // programs in unclear, possibly leading to lots of holes in that table that + // could either degenerate into multiple ifs when compiling for size or to + // huge tables when compiling for speed. + // + // Maybe a combination of both could be utilized, like statically analyzing the + // ids and make a decision based on profiling experience? + + var names: string[] = [ "nope" ]; + var blocks = new Array(); + for (let [id, instance] of managedClasses) { + names.push(instance.internalName); + let condition = module.createBinary(BinaryOp.EqI32, + module.createGetLocal(1, NativeType.I32), + module.createI32(id) + ); + let base = instance.base; + while (base) { + condition = module.createBinary(BinaryOp.OrI32, + condition, + module.createBinary(BinaryOp.EqI32, + module.createGetLocal(1, NativeType.I32), + module.createI32(base.ensureId()) + ) + ); + base = base.base; + } + blocks.push([ + module.createReturn(condition) + ]); + } + + var current: ExpressionRef; + if (blocks.length) { + current = module.createBlock(names[1], [ + module.createSwitch(names, "nope", module.createGetLocal(0, NativeType.I32)) + ]); + for (let i = 0, k = blocks.length; i < k; ++i) { + blocks[i].unshift(current); + current = module.createBlock(i == k - 1 ? "nope" : names[i + 2], blocks[i]); + } + current = module.createBlock(null, [ + current, + module.createReturn(module.createI32(0)) + ]); + } else { + current = module.createReturn(module.createI32(0)); + } + module.addFunction(BuiltinSymbols.runtime_instanceof, ftype, null, current); +} + // Helpers /** Evaluates the constant type of a type argument *or* expression. */ diff --git a/src/compiler.ts b/src/compiler.ts index 0355aa6769..154b70063c 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -8,6 +8,7 @@ import { compileAbort, compileMarkRoots, compileMarkMembers, + compileInstanceOf, BuiltinSymbols } from "./builtins"; @@ -310,8 +311,10 @@ export class Compiler extends DiagnosticEmitter { argcVar: GlobalRef = 0; /** Argument count helper setter. */ argcSet: FunctionRef = 0; - /** Indicates whether the traverseRoots function must be generated. */ - needsTraverse: bool = false; + /** Indicates whether the __gc_mark_* functions must be generated. */ + needsMark: bool = false; + /** Indicates whether the __runtime_instanceof function must be generated. */ + needsInstanceOf: bool = false; /** Compiles a {@link Program} to a {@link Module} using the specified options. */ static compile(program: Program, options: Options | null = null): Module { @@ -393,12 +396,17 @@ export class Compiler extends DiagnosticEmitter { if (!explicitStartFunction) module.setStart(funcRef); } - // compile gc integration if necessary - if (this.needsTraverse) { + // compile gc features if utilized + if (this.needsMark) { compileMarkRoots(this); compileMarkMembers(this); } + // compile runtime features if utilized + if (this.needsInstanceOf) { + compileInstanceOf(this); + } + // update the heap base pointer var memoryOffset = this.memoryOffset; memoryOffset = i64_align(memoryOffset, options.usizeType.byteSize); diff --git a/src/flow.ts b/src/flow.ts index 56839b0843..7bbe99a11d 100644 --- a/src/flow.ts +++ b/src/flow.ts @@ -812,11 +812,16 @@ export class Flow { // overflows if the call does not return a wrapped value or the conversion does case ExpressionId.Call: { let program = this.parentFunction.program; - let instance = assert(program.instancesByName.get(assert(getCallTarget(expr)))); - assert(instance.kind == ElementKind.FUNCTION); - let returnType = (instance).signature.returnType; - return !(instance).flow.is(FlowFlags.RETURNS_WRAPPED) - || canConversionOverflow(returnType, type); + let instancesByName = program.instancesByName; + let instanceName = assert(getCallTarget(expr)); + if (instancesByName.has(instanceName)) { + let instance = instancesByName.get(instanceName)!; + assert(instance.kind == ElementKind.FUNCTION); + let returnType = (instance).signature.returnType; + return !(instance).flow.is(FlowFlags.RETURNS_WRAPPED) + || canConversionOverflow(returnType, type); + } + return false; // assume no overflow for builtins } // doesn't technically overflow diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 1e0fcd0400..bbdbf54f29 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -10,6 +10,11 @@ import { ArrayBufferView } from "./arraybuffer"; @unsafe @builtin export declare function __runtime_id(): u32; +/** Tests if a managed class is the same as or a superclass of another. */ +// @ts-ignore: decorator +@unsafe @builtin +export declare function __runtime_instanceof(id: u32, superId: u32): bool; + /** Runtime implementation. */ export namespace runtime { diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index b6d70658e7..0b64d237a4 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -106,7 +106,7 @@ if i32.const 0 i32.const 16 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -121,7 +121,7 @@ if i32.const 0 i32.const 16 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index b047896f5c..3c731b052a 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -139,7 +139,7 @@ if i32.const 0 i32.const 16 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -156,7 +156,7 @@ if i32.const 0 i32.const 16 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index a7e4828156..c2fc78b3b9 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -1283,7 +1283,7 @@ if i32.const 0 i32.const 88 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -1298,7 +1298,7 @@ if i32.const 0 i32.const 88 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index e3ffc96318..625eee920b 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -1563,7 +1563,7 @@ if i32.const 0 i32.const 88 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -1580,7 +1580,7 @@ if i32.const 0 i32.const 88 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index 05a4469231..a1374ad99d 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -146,7 +146,7 @@ if i32.const 0 i32.const 16 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -161,7 +161,7 @@ if i32.const 0 i32.const 16 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 0796ee9634..46ea1b4917 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -192,7 +192,7 @@ if i32.const 0 i32.const 16 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -209,7 +209,7 @@ if i32.const 0 i32.const 16 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc.optimized.wat b/tests/compiler/gc.optimized.wat index 97439e5fc3..14d0a10905 100644 --- a/tests/compiler/gc.optimized.wat +++ b/tests/compiler/gc.optimized.wat @@ -184,7 +184,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -199,7 +199,7 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable @@ -2250,7 +2250,7 @@ if i32.const 0 i32.const 24 - i32.const 64 + i32.const 69 i32.const 10 call $~lib/env/abort unreachable @@ -2285,7 +2285,7 @@ if i32.const 0 i32.const 24 - i32.const 89 + i32.const 94 i32.const 6 call $~lib/env/abort unreachable @@ -2299,7 +2299,7 @@ if i32.const 0 i32.const 24 - i32.const 91 + i32.const 96 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc.untouched.wat b/tests/compiler/gc.untouched.wat index 2a592269b7..80ab5637fa 100644 --- a/tests/compiler/gc.untouched.wat +++ b/tests/compiler/gc.untouched.wat @@ -203,7 +203,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -220,7 +220,7 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable @@ -2841,7 +2841,7 @@ if i32.const 0 i32.const 24 - i32.const 64 + i32.const 69 i32.const 10 call $~lib/env/abort unreachable @@ -2883,7 +2883,7 @@ if i32.const 0 i32.const 24 - i32.const 89 + i32.const 94 i32.const 6 call $~lib/env/abort unreachable @@ -2900,7 +2900,7 @@ if i32.const 0 i32.const 24 - i32.const 91 + i32.const 96 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-assign.optimized.wat b/tests/compiler/gc/global-assign.optimized.wat index c0e9fb76a1..27618b5a4a 100644 --- a/tests/compiler/gc/global-assign.optimized.wat +++ b/tests/compiler/gc/global-assign.optimized.wat @@ -137,7 +137,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -152,7 +152,7 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-assign.untouched.wat b/tests/compiler/gc/global-assign.untouched.wat index aaf0be00dc..6c22ff95d0 100644 --- a/tests/compiler/gc/global-assign.untouched.wat +++ b/tests/compiler/gc/global-assign.untouched.wat @@ -182,7 +182,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -199,7 +199,7 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-init.optimized.wat b/tests/compiler/gc/global-init.optimized.wat index 2f8eccff17..e030d7d85b 100644 --- a/tests/compiler/gc/global-init.optimized.wat +++ b/tests/compiler/gc/global-init.optimized.wat @@ -136,7 +136,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -151,7 +151,7 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-init.untouched.wat b/tests/compiler/gc/global-init.untouched.wat index 6530db3ed4..d48ee91ed7 100644 --- a/tests/compiler/gc/global-init.untouched.wat +++ b/tests/compiler/gc/global-init.untouched.wat @@ -181,7 +181,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -198,7 +198,7 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/itcm/trace.optimized.wat b/tests/compiler/gc/itcm/trace.optimized.wat index 3e6056ac3d..872384f248 100644 --- a/tests/compiler/gc/itcm/trace.optimized.wat +++ b/tests/compiler/gc/itcm/trace.optimized.wat @@ -341,7 +341,7 @@ if i32.const 0 i32.const 128 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -356,7 +356,7 @@ if i32.const 0 i32.const 128 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable @@ -1859,7 +1859,7 @@ if i32.const 0 i32.const 128 - i32.const 64 + i32.const 69 i32.const 10 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/itcm/trace.untouched.wat b/tests/compiler/gc/itcm/trace.untouched.wat index abd37127bc..5bf72e9b33 100644 --- a/tests/compiler/gc/itcm/trace.untouched.wat +++ b/tests/compiler/gc/itcm/trace.untouched.wat @@ -390,7 +390,7 @@ if i32.const 0 i32.const 128 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -407,7 +407,7 @@ if i32.const 0 i32.const 128 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable @@ -2466,7 +2466,7 @@ if i32.const 0 i32.const 128 - i32.const 64 + i32.const 69 i32.const 10 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-assign.optimized.wat b/tests/compiler/gc/rc/global-assign.optimized.wat index 83f4992643..2a87c612a6 100644 --- a/tests/compiler/gc/rc/global-assign.optimized.wat +++ b/tests/compiler/gc/rc/global-assign.optimized.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-assign.untouched.wat b/tests/compiler/gc/rc/global-assign.untouched.wat index 7648165ad8..f704186e87 100644 --- a/tests/compiler/gc/rc/global-assign.untouched.wat +++ b/tests/compiler/gc/rc/global-assign.untouched.wat @@ -180,7 +180,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -197,7 +197,7 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-init.optimized.wat b/tests/compiler/gc/rc/global-init.optimized.wat index c73a497d58..4841559692 100644 --- a/tests/compiler/gc/rc/global-init.optimized.wat +++ b/tests/compiler/gc/rc/global-init.optimized.wat @@ -139,7 +139,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -154,7 +154,7 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-init.untouched.wat b/tests/compiler/gc/rc/global-init.untouched.wat index a94853ad1c..9bf256024e 100644 --- a/tests/compiler/gc/rc/global-init.untouched.wat +++ b/tests/compiler/gc/rc/global-init.untouched.wat @@ -178,7 +178,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -195,7 +195,7 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 20c0d5b4f6..891e19ed15 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -85,7 +85,7 @@ if i32.const 0 i32.const 16 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index 06c388560a..f0b0fc029b 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -141,7 +141,7 @@ if i32.const 0 i32.const 16 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index 8c080e3f65..b67dcff344 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 48 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -146,7 +146,7 @@ if i32.const 0 i32.const 48 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index b057ac92dc..40a2ec4ed5 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -405,7 +405,7 @@ if i32.const 0 i32.const 48 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -422,7 +422,7 @@ if i32.const 0 i32.const 48 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 2bae3b101c..23bf9184f3 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -303,7 +303,7 @@ if i32.const 0 i32.const 464 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -318,7 +318,7 @@ if i32.const 0 i32.const 464 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable @@ -2451,7 +2451,7 @@ if i32.const 0 i32.const 464 - i32.const 89 + i32.const 94 i32.const 6 call $~lib/env/abort unreachable @@ -2465,7 +2465,7 @@ if i32.const 0 i32.const 464 - i32.const 91 + i32.const 96 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 0750506407..792bee7b91 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -399,7 +399,7 @@ if i32.const 0 i32.const 464 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -416,7 +416,7 @@ if i32.const 0 i32.const 464 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable @@ -3534,7 +3534,7 @@ if i32.const 0 i32.const 464 - i32.const 89 + i32.const 94 i32.const 6 call $~lib/env/abort unreachable @@ -3551,7 +3551,7 @@ if i32.const 0 i32.const 464 - i32.const 91 + i32.const 96 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 64c6484a53..80fb2f3cf4 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -115,7 +115,7 @@ if i32.const 0 i32.const 16 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index 95ba0e84af..ea2f4ea86f 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -148,7 +148,7 @@ if i32.const 0 i32.const 16 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -165,7 +165,7 @@ if i32.const 0 i32.const 16 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/runtime/instanceof.json b/tests/compiler/runtime/instanceof.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/runtime/instanceof.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/runtime/instanceof.optimized.wat b/tests/compiler/runtime/instanceof.optimized.wat new file mode 100644 index 0000000000..c3ece10846 --- /dev/null +++ b/tests/compiler/runtime/instanceof.optimized.wat @@ -0,0 +1,159 @@ +(module + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\02\00\00\00*\00\00\00r\00u\00n\00t\00i\00m\00e\00/\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (export "memory" (memory $0)) + (export "table" (table $0)) + (start $start) + (func $start:runtime/instanceof (; 1 ;) (type $FUNCSIG$v) + i32.const 1 + i32.const 1 + call $~lib/runtime/__runtime_instanceof + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 7 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 3 + i32.const 1 + call $~lib/runtime/__runtime_instanceof + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 14 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 4 + i32.const 1 + call $~lib/runtime/__runtime_instanceof + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 21 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 3 + i32.const 3 + call $~lib/runtime/__runtime_instanceof + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 28 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 4 + i32.const 3 + call $~lib/runtime/__runtime_instanceof + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 35 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 1 + i32.const 3 + call $~lib/runtime/__runtime_instanceof + if + i32.const 0 + i32.const 16 + i32.const 42 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 1 + i32.const 4 + call $~lib/runtime/__runtime_instanceof + if + i32.const 0 + i32.const 16 + i32.const 49 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 3 + i32.const 4 + call $~lib/runtime/__runtime_instanceof + if + i32.const 0 + i32.const 16 + i32.const 56 + i32.const 0 + call $~lib/env/abort + unreachable + end + ) + (func $start (; 2 ;) (type $FUNCSIG$v) + call $start:runtime/instanceof + ) + (func $~lib/runtime/__runtime_instanceof (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block $nope + block $runtime/instanceof/BlackCat + block $runtime/instanceof/Cat + block $~lib/string/String + block $runtime/instanceof/Animal + local.get $0 + i32.const 1 + i32.sub + br_table $runtime/instanceof/Animal $~lib/string/String $runtime/instanceof/Cat $runtime/instanceof/BlackCat $nope + end + local.get $1 + i32.const 1 + i32.eq + return + end + local.get $1 + i32.const 2 + i32.eq + return + end + local.get $1 + i32.const 3 + i32.eq + local.get $1 + i32.const 1 + i32.eq + i32.or + return + end + local.get $1 + i32.const 4 + i32.eq + local.get $1 + i32.const 3 + i32.eq + i32.or + local.get $1 + i32.const 1 + i32.eq + i32.or + return + end + i32.const 0 + ) + (func $null (; 4 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/runtime/instanceof.ts b/tests/compiler/runtime/instanceof.ts new file mode 100644 index 0000000000..542d60a204 --- /dev/null +++ b/tests/compiler/runtime/instanceof.ts @@ -0,0 +1,61 @@ +import { __runtime_id, __runtime_instanceof } from "runtime"; + +class Animal {} +class Cat extends Animal {} +class BlackCat extends Cat {} + +assert( // Animal is an Animal + __runtime_instanceof( + __runtime_id(), + __runtime_id() + ) +); + +assert( // Cat is an Animal + __runtime_instanceof( + __runtime_id(), + __runtime_id() + ) +); + +assert( // BlackCat is an Animal + __runtime_instanceof( + __runtime_id(), + __runtime_id() + ) +); + +assert( // Cat is a Cat + __runtime_instanceof( + __runtime_id(), + __runtime_id() + ) +); + +assert( // BlackCat is a Cat + __runtime_instanceof( + __runtime_id(), + __runtime_id() + ) +); + +assert(! // Animal isn't necessarily a Cat + __runtime_instanceof( + __runtime_id(), + __runtime_id() + ) +); + +assert(! // Animal isn't necessarily a BlackCat + __runtime_instanceof( + __runtime_id(), + __runtime_id() + ) +); + +assert(! // Cat isn't necessarily a BlackCat + __runtime_instanceof( + __runtime_id(), + __runtime_id() + ) +); diff --git a/tests/compiler/runtime/instanceof.untouched.wat b/tests/compiler/runtime/instanceof.untouched.wat new file mode 100644 index 0000000000..38cf370160 --- /dev/null +++ b/tests/compiler/runtime/instanceof.untouched.wat @@ -0,0 +1,164 @@ +(module + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\02\00\00\00*\00\00\00r\00u\00n\00t\00i\00m\00e\00/\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $~lib/memory/HEAP_BASE i32 (i32.const 60)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (start $start) + (func $start:runtime/instanceof (; 1 ;) (type $FUNCSIG$v) + i32.const 1 + i32.const 1 + call $~lib/runtime/__runtime_instanceof + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 7 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 3 + i32.const 1 + call $~lib/runtime/__runtime_instanceof + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 14 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 4 + i32.const 1 + call $~lib/runtime/__runtime_instanceof + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 21 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 3 + i32.const 3 + call $~lib/runtime/__runtime_instanceof + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 28 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 4 + i32.const 3 + call $~lib/runtime/__runtime_instanceof + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 35 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 1 + i32.const 3 + call $~lib/runtime/__runtime_instanceof + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 42 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 1 + i32.const 4 + call $~lib/runtime/__runtime_instanceof + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 49 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 3 + i32.const 4 + call $~lib/runtime/__runtime_instanceof + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 56 + i32.const 0 + call $~lib/env/abort + unreachable + end + ) + (func $start (; 2 ;) (type $FUNCSIG$v) + call $start:runtime/instanceof + ) + (func $~lib/runtime/__runtime_instanceof (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block $nope + block $runtime/instanceof/BlackCat + block $runtime/instanceof/Cat + block $~lib/string/String + block $runtime/instanceof/Animal + local.get $0 + br_table $nope $runtime/instanceof/Animal $~lib/string/String $runtime/instanceof/Cat $runtime/instanceof/BlackCat $nope + end + local.get $1 + i32.const 1 + i32.eq + return + end + local.get $1 + i32.const 2 + i32.eq + return + end + local.get $1 + i32.const 3 + i32.eq + local.get $1 + i32.const 1 + i32.eq + i32.or + return + end + local.get $1 + i32.const 4 + i32.eq + local.get $1 + i32.const 3 + i32.eq + i32.or + local.get $1 + i32.const 1 + i32.eq + i32.or + return + end + i32.const 0 + return + ) + (func $null (; 4 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 2bf5784f03..a646be8b78 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -177,7 +177,7 @@ if i32.const 0 i32.const 296 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -192,7 +192,7 @@ if i32.const 0 i32.const 296 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 16899f6712..414c8d2a86 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -233,7 +233,7 @@ if i32.const 0 i32.const 296 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -250,7 +250,7 @@ if i32.const 0 i32.const 296 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 46fc3e655d..f8cc1348d4 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -787,7 +787,7 @@ if i32.const 0 i32.const 80 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -802,7 +802,7 @@ if i32.const 0 i32.const 80 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable @@ -2340,7 +2340,7 @@ if i32.const 0 i32.const 80 - i32.const 64 + i32.const 69 i32.const 10 call $~lib/env/abort unreachable @@ -6323,7 +6323,7 @@ if i32.const 0 i32.const 80 - i32.const 89 + i32.const 94 i32.const 6 call $~lib/env/abort unreachable @@ -6337,7 +6337,7 @@ if i32.const 0 i32.const 80 - i32.const 91 + i32.const 96 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 0648266e31..c2a9e471a9 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -684,7 +684,7 @@ if i32.const 0 i32.const 80 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -701,7 +701,7 @@ if i32.const 0 i32.const 80 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable @@ -2859,7 +2859,7 @@ if i32.const 0 i32.const 80 - i32.const 64 + i32.const 69 i32.const 10 call $~lib/env/abort unreachable @@ -9604,7 +9604,7 @@ if i32.const 0 i32.const 80 - i32.const 89 + i32.const 94 i32.const 6 call $~lib/env/abort unreachable @@ -9621,7 +9621,7 @@ if i32.const 0 i32.const 80 - i32.const 91 + i32.const 96 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 68b2419e06..8d392aaaa5 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -327,7 +327,7 @@ if i32.const 0 i32.const 64 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -342,7 +342,7 @@ if i32.const 0 i32.const 64 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 3b3718db9d..63a50c3357 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -407,7 +407,7 @@ if i32.const 0 i32.const 64 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -424,7 +424,7 @@ if i32.const 0 i32.const 64 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 861704432c..a194761b7a 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -165,7 +165,7 @@ if i32.const 0 i32.const 64 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -180,7 +180,7 @@ if i32.const 0 i32.const 64 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 6fc5c83070..ad420ca898 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -413,7 +413,7 @@ if i32.const 0 i32.const 64 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -430,7 +430,7 @@ if i32.const 0 i32.const 64 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 120ffe2ddc..6c655d3091 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -89,7 +89,7 @@ if i32.const 0 i32.const 48 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -104,7 +104,7 @@ if i32.const 0 i32.const 48 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 48cd0512b7..67b2f1f7de 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -148,7 +148,7 @@ if i32.const 0 i32.const 48 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -165,7 +165,7 @@ if i32.const 0 i32.const 48 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index c3e7a6fb1a..04d1628d4e 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -135,7 +135,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -150,7 +150,7 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index c6641440bc..bfb2320811 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -166,7 +166,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -183,7 +183,7 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index e04f158dcc..65a4c2f1ed 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -84,7 +84,7 @@ if i32.const 0 i32.const 16 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -99,7 +99,7 @@ if i32.const 0 i32.const 16 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 9b9714d589..3f79738931 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -141,7 +141,7 @@ if i32.const 0 i32.const 16 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index 7fdc3211bf..0a163f0d20 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -118,7 +118,7 @@ if i32.const 0 i32.const 64 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -133,7 +133,7 @@ if i32.const 0 i32.const 64 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/object-literal.untouched.wat b/tests/compiler/std/object-literal.untouched.wat index e0609359e5..c12247089f 100644 --- a/tests/compiler/std/object-literal.untouched.wat +++ b/tests/compiler/std/object-literal.untouched.wat @@ -153,7 +153,7 @@ if i32.const 0 i32.const 64 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -170,7 +170,7 @@ if i32.const 0 i32.const 64 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index f8110834ec..a23ab05424 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -167,7 +167,7 @@ if i32.const 0 i32.const 16 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -182,7 +182,7 @@ if i32.const 0 i32.const 16 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 4bd6db475e..58f6db40f6 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -209,7 +209,7 @@ if i32.const 0 i32.const 16 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -226,7 +226,7 @@ if i32.const 0 i32.const 16 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 7b3867b2e2..7f225581ce 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -2560,7 +2560,7 @@ if i32.const 0 i32.const 232 - i32.const 64 + i32.const 69 i32.const 10 call $~lib/env/abort unreachable @@ -2597,7 +2597,7 @@ if i32.const 0 i32.const 232 - i32.const 89 + i32.const 94 i32.const 6 call $~lib/env/abort unreachable @@ -2612,7 +2612,7 @@ if i32.const 0 i32.const 232 - i32.const 91 + i32.const 96 i32.const 6 call $~lib/env/abort unreachable @@ -2628,7 +2628,7 @@ if i32.const 0 i32.const 232 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -2643,7 +2643,7 @@ if i32.const 0 i32.const 232 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index d90c40d098..0bbaf53476 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -3288,7 +3288,7 @@ if i32.const 0 i32.const 232 - i32.const 64 + i32.const 69 i32.const 10 call $~lib/env/abort unreachable @@ -3330,7 +3330,7 @@ if i32.const 0 i32.const 232 - i32.const 89 + i32.const 94 i32.const 6 call $~lib/env/abort unreachable @@ -3347,7 +3347,7 @@ if i32.const 0 i32.const 232 - i32.const 91 + i32.const 96 i32.const 6 call $~lib/env/abort unreachable @@ -3364,7 +3364,7 @@ if i32.const 0 i32.const 232 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -3381,7 +3381,7 @@ if i32.const 0 i32.const 232 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 6dde9b446a..64fbf7439b 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -146,7 +146,7 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index fc2d645857..7eba4061ae 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -166,7 +166,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -183,7 +183,7 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index d9c5b8ac00..39a7e4250e 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -1437,7 +1437,7 @@ if i32.const 0 i32.const 280 - i32.const 64 + i32.const 69 i32.const 10 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index caa7baaaca..6714c00cf3 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -1928,7 +1928,7 @@ if i32.const 0 i32.const 280 - i32.const 64 + i32.const 69 i32.const 10 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index a09df18d98..bddf32e4bf 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -1464,7 +1464,7 @@ if i32.const 0 i32.const 136 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -1479,7 +1479,7 @@ if i32.const 0 i32.const 136 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index 0797cdd403..6e4071ebe0 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -1929,7 +1929,7 @@ if i32.const 0 i32.const 136 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -1946,7 +1946,7 @@ if i32.const 0 i32.const 136 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index ba3a97a1ab..6700b06bce 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -444,7 +444,7 @@ if i32.const 0 i32.const 184 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -459,7 +459,7 @@ if i32.const 0 i32.const 184 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable @@ -3235,7 +3235,7 @@ if i32.const 0 i32.const 184 - i32.const 64 + i32.const 69 i32.const 10 call $~lib/env/abort unreachable @@ -5177,7 +5177,7 @@ if i32.const 0 i32.const 184 - i32.const 89 + i32.const 94 i32.const 6 call $~lib/env/abort unreachable @@ -5191,7 +5191,7 @@ if i32.const 0 i32.const 184 - i32.const 91 + i32.const 96 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 32cca640af..3a1416c1fd 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -379,7 +379,7 @@ if i32.const 0 i32.const 184 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -396,7 +396,7 @@ if i32.const 0 i32.const 184 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable @@ -3850,7 +3850,7 @@ if i32.const 0 i32.const 184 - i32.const 64 + i32.const 69 i32.const 10 call $~lib/env/abort unreachable @@ -6549,7 +6549,7 @@ if i32.const 0 i32.const 184 - i32.const 89 + i32.const 94 i32.const 6 call $~lib/env/abort unreachable @@ -6566,7 +6566,7 @@ if i32.const 0 i32.const 184 - i32.const 91 + i32.const 96 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 980cd5dfa7..b9654c31c9 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -144,7 +144,7 @@ if i32.const 0 i32.const 72 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -159,7 +159,7 @@ if i32.const 0 i32.const 72 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 68a2928e77..410fbd1c80 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -200,7 +200,7 @@ if i32.const 0 i32.const 72 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -217,7 +217,7 @@ if i32.const 0 i32.const 72 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index d296ffda33..00e7464108 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -439,7 +439,7 @@ if i32.const 0 i32.const 136 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -454,7 +454,7 @@ if i32.const 0 i32.const 136 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index da69b7b8d6..a20d42bd6b 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -497,7 +497,7 @@ if i32.const 0 i32.const 136 - i32.const 102 + i32.const 107 i32.const 6 call $~lib/env/abort unreachable @@ -514,7 +514,7 @@ if i32.const 0 i32.const 136 - i32.const 104 + i32.const 109 i32.const 6 call $~lib/env/abort unreachable From b62927f5e531a690c4e3f66f96f72018e1150cec Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 2 Apr 2019 22:32:43 +0200 Subject: [PATCH 087/119] move runtime templates into stdlib for bundling with lib files --- cli/asc.js | 11 +---------- std/{ => assembly}/runtime/README.md | 6 +++--- std/{ => assembly}/runtime/arena.ts | 2 ++ std/{ => assembly}/runtime/default.ts | 2 ++ std/{ => assembly}/runtime/none.ts | 0 std/runtime/tsconfig.json | 6 ------ 6 files changed, 8 insertions(+), 19 deletions(-) rename std/{ => assembly}/runtime/README.md (82%) rename std/{ => assembly}/runtime/arena.ts (53%) rename std/{ => assembly}/runtime/default.ts (64%) rename std/{ => assembly}/runtime/none.ts (100%) delete mode 100644 std/runtime/tsconfig.json diff --git a/cli/asc.js b/cli/asc.js index eda2e339a9..b0ee8332b4 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -82,15 +82,6 @@ exports.libraryFiles = exports.isBundle ? BUNDLE_LIBRARY : (() => { // set up if return bundled; })(); -/** Bundled runtime templates. */ -exports.runtimeTemplates = exports.isBundle ? BUNDLE_RUNTIME : (() => { - const rtDir = path.join(__dirname, "..", "std", "runtime"); - const rtFiles = require("glob").sync("**/!(*.d).ts", { cwd: rtDir }); - const bundled = {}; - rtFiles.forEach(file => bundled[file.replace(/\.ts$/, "")] = fs.readFileSync(path.join(rtDir, file), "utf8" )); - return bundled; -})(); - /** Bundled definition files. */ exports.definitionFiles = exports.isBundle ? BUNDLE_DEFINITIONS : (() => { // set up if not a bundle const stdDir = path.join(__dirname, "..", "std"); @@ -401,7 +392,7 @@ exports.main = function main(argv, options, callback) { // Include runtime template { let templateName = String(args.runtime); - let templateText = exports.runtimeTemplates[templateName]; + let templateText = exports.libraryFiles["runtime/" + templateName]; if (templateText == null) { templateText = readFile(templateName + ".ts", baseDir); if (templateText == null) { diff --git a/std/runtime/README.md b/std/assembly/runtime/README.md similarity index 82% rename from std/runtime/README.md rename to std/assembly/runtime/README.md index 97a02d1e2c..a25e30ef70 100644 --- a/std/runtime/README.md +++ b/std/assembly/runtime/README.md @@ -10,8 +10,8 @@ $> asc ... The [default runtime](./default.ts) adds proper support for dynamic memory management and garbage collection to your program. -* [TLSF memory allocator](../assembly/allocator/tlsf.ts) -* [ITCM garbage collector](../assembly/collector/itcm.ts) +* [TLSF memory allocator](../allocator/tlsf.ts) +* [ITCM garbage collector](../collector/itcm.ts) Arena ----- @@ -22,7 +22,7 @@ $> asc ... --runtime arena The [arena runtime](./arena.ts) is just enough to make most language features work, but doesn't have sophisticated support for freeing memory. Useful when prototyping or for simple one-shot modules in that it produces very small modules with minimal overhead. -* [Arena memory allocator](../assembly/allocator/arena.ts) with `memory.reset()` +* [Arena memory allocator](../allocator/arena.ts) with `memory.reset()` * No garbage collector None diff --git a/std/runtime/arena.ts b/std/assembly/runtime/arena.ts similarity index 53% rename from std/runtime/arena.ts rename to std/assembly/runtime/arena.ts index 9a31c7a41c..8b75953b94 100644 --- a/std/runtime/arena.ts +++ b/std/assembly/runtime/arena.ts @@ -1 +1,3 @@ import "allocator/arena"; + +// export { memory }; diff --git a/std/runtime/default.ts b/std/assembly/runtime/default.ts similarity index 64% rename from std/runtime/default.ts rename to std/assembly/runtime/default.ts index 22cbcdaf0c..6131b14bad 100644 --- a/std/runtime/default.ts +++ b/std/assembly/runtime/default.ts @@ -1,2 +1,4 @@ import "allocator/tlsf"; import "collector/itcm"; + +// export { memory, gc }; diff --git a/std/runtime/none.ts b/std/assembly/runtime/none.ts similarity index 100% rename from std/runtime/none.ts rename to std/assembly/runtime/none.ts diff --git a/std/runtime/tsconfig.json b/std/runtime/tsconfig.json deleted file mode 100644 index e48ae5867b..0000000000 --- a/std/runtime/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "../assembly.json", - "include": [ - "./**/*.ts" - ] -} From b58683aff4e69930bcc97ad432d7c18431e69c50 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 2 Apr 2019 23:58:58 +0200 Subject: [PATCH 088/119] wire __runtime_instanceof to 'instanceof' on upcasts also adds runtime.instanceOf that can be exported for use by the host --- src/compiler.ts | 141 ++- src/types.ts | 6 + std/assembly/runtime.ts | 11 + tests/compiler/gc.optimized.wat | 53 +- tests/compiler/gc.untouched.wat | 54 +- tests/compiler/instanceof.ts | 2 +- tests/compiler/instanceof.untouched.wat | 295 ++++-- .../compiler/runtime/instanceof.optimized.wat | 683 +++++++++++++- tests/compiler/runtime/instanceof.ts | 51 ++ .../compiler/runtime/instanceof.untouched.wat | 858 +++++++++++++++++- tests/compiler/std/arraybuffer.optimized.wat | 8 +- tests/compiler/std/arraybuffer.untouched.wat | 548 ++++++++++- 12 files changed, 2569 insertions(+), 141 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index 154b70063c..304c5f383c 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -6665,34 +6665,135 @@ export class Compiler extends DiagnosticEmitter { var module = this.module; // NOTE that this differs from TypeScript in that the rhs is a type, not an expression. at the // time of implementation, this seemed more useful because dynamic rhs expressions are not - // possible in AS anyway. + // possible in AS anyway. also note that the code generated below must preserve side-effects of + // the LHS expression even when the result is a constant, i.e. return a block dropping `expr`. var expr = this.compileExpressionRetainType(expression.expression, this.options.usizeType, WrapMode.NONE); var actualType = this.currentType; - var expectedType = this.resolver.resolveType( - expression.isType, - this.currentFlow.actualFunction - ); + var expectedType = this.resolver.resolveType(expression.isType, this.currentFlow.actualFunction); this.currentType = Type.bool; if (!expectedType) return module.createUnreachable(); - // instanceof must be exact + // instanceof - must be exact if (!expectedType.is(TypeFlags.REFERENCE)) { - return module.createI32(actualType == expectedType ? 1 : 0); + return module.createBlock(null, [ + this.convertExpression(expr, actualType, Type.void, ConversionKind.EXPLICIT, WrapMode.NONE, expression.expression), + module.createI32(actualType == expectedType ? 1 : 0) + ], NativeType.I32); } - // instanceof must be != 0 - if ( - actualType.is(TypeFlags.NULLABLE) && !expectedType.is(TypeFlags.NULLABLE) && - actualType.nonNullableType.isAssignableTo(expectedType) - ) { - return module.createBinary( - actualType.is(TypeFlags.LONG) - ? BinaryOp.NeI64 - : BinaryOp.NeI32, - expr, - actualType.toNativeZero(module) - ); + + // instanceof - always false + if (!actualType.is(TypeFlags.REFERENCE)) { + return module.createBlock(null, [ + this.convertExpression(expr, actualType, Type.void, ConversionKind.EXPLICIT, WrapMode.NONE, expression.expression), + module.createI32(0) + ], NativeType.I32); + } + + // both LHS and RHS are references now + var nativeSizeType = actualType.toNativeType(); + + // instanceof - LHS must be != 0 + if (actualType.is(TypeFlags.NULLABLE) && !expectedType.is(TypeFlags.NULLABLE)) { + + // downcast - check statically + if (actualType.nonNullableType.isAssignableTo(expectedType)) { + return module.createBinary( + nativeSizeType == NativeType.I64 + ? BinaryOp.NeI64 + : BinaryOp.NeI32, + expr, + actualType.toNativeZero(module) + ); + } + + // upcast - check dynamically + if (expectedType.isAssignableTo(actualType)) { + let program = this.program; + this.needsInstanceOf = true; + if (!(actualType.isUnmanaged || expectedType.isUnmanaged)) { + let flow = this.currentFlow; + let tempLocal = flow.getAndFreeTempLocal(actualType, false); + this.needsInstanceOf = true; + return module.createIf( + module.createUnary( + nativeSizeType == NativeType.I64 + ? UnaryOp.EqzI64 + : UnaryOp.EqzI32, + module.createTeeLocal(tempLocal.index, expr), + ), + module.createI32(0), + module.createCall(BuiltinSymbols.runtime_instanceof, [ + module.createLoad(4, false, + module.createBinary(BinaryOp.SubI32, + module.createGetLocal(tempLocal.index, nativeSizeType), + module.createI32(program.runtimeHeaderSize) + ), + NativeType.I32 + ), + module.createI32(expectedType.classReference!.ensureId()) + ], NativeType.I32) + ); + } else { + this.error( + DiagnosticCode.Operation_not_supported, + expression.range + ); + } + } + + // either none or both nullable + } else { + + // downcast - check statically + if (actualType.isAssignableTo(expectedType)) { + return module.createBlock(null, [ + this.convertExpression(expr, actualType, Type.void, ConversionKind.EXPLICIT, WrapMode.NONE, expression.expression), + module.createI32(1) + ], NativeType.I32); + + // upcast - check dynamically + } else if (expectedType.isAssignableTo(actualType)) { + let program = this.program; + if (!(actualType.isUnmanaged || expectedType.isUnmanaged)) { + // FIXME: the temp local and the if can be removed here once flows + // perform null checking, which would error earlier when checking + // uninitialized (thus zero) `var a: A` to be an instance of something. + let flow = this.currentFlow; + let tempLocal = flow.getAndFreeTempLocal(actualType, false); + this.needsInstanceOf = true; + return module.createIf( + module.createUnary( + nativeSizeType == NativeType.I64 + ? UnaryOp.EqzI64 + : UnaryOp.EqzI32, + module.createTeeLocal(tempLocal.index, expr), + ), + module.createI32(0), + module.createCall(BuiltinSymbols.runtime_instanceof, [ + module.createLoad(4, false, + module.createBinary(BinaryOp.SubI32, + module.createGetLocal(tempLocal.index, nativeSizeType), + module.createI32(program.runtimeHeaderSize) + ), + NativeType.I32 + ), + module.createI32(expectedType.classReference!.ensureId()) + ], NativeType.I32) + ); + } else { + this.error( + DiagnosticCode.Operation_not_supported, + expression.range + ); + } + } } - return module.createI32(actualType.isAssignableTo(expectedType) ? 1 : 0); + + // false + return module.createBlock(null, [ + this.convertExpression(expr, actualType, Type.void, ConversionKind.EXPLICIT, WrapMode.NONE, expression.expression), + module.createI32(0) + ], NativeType.I32); } compileLiteralExpression( diff --git a/src/types.ts b/src/types.ts index 09b9e1643c..35551e1d0b 100644 --- a/src/types.ts +++ b/src/types.ts @@ -160,6 +160,12 @@ export class Type { return false; } + /** Tests if this is a class type explicitly annotated as unmanaged. */ + get isUnmanaged(): bool { + var classReference = this.classReference; + return classReference !== null && classReference.hasDecorator(DecoratorFlags.UNMANAGED); + } + /** Computes the sign-extending shift in the target type. */ computeSmallIntegerShift(targetType: Type): u32 { return targetType.size - this.size; diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index bbdbf54f29..0d167a7876 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -128,4 +128,15 @@ export namespace runtime { if (source) memory.copy(buffer, source, bufferSize); return array; } + + // @ts-ignore: decorator + @unsafe + export function instanceOf(ref: usize, id: u32): bool { + return ref + ? __runtime_instanceof( + changetype
(ref - HEADER_SIZE).classId, + id + ) + : false; + } } diff --git a/tests/compiler/gc.optimized.wat b/tests/compiler/gc.optimized.wat index 14d0a10905..959e4bd09e 100644 --- a/tests/compiler/gc.optimized.wat +++ b/tests/compiler/gc.optimized.wat @@ -55,6 +55,7 @@ (export "runtime.register" (func $~lib/runtime/runtime.register)) (export ".setargc" (func $~lib/setargc)) (export "runtime.makeArray" (func $~lib/runtime/runtime.makeArray|trampoline)) + (export "runtime.instanceOf" (func $~lib/runtime/runtime.instanceOf)) (export "gc.implemented" (global $~lib/gc/gc.implemented)) (export "gc.collect" (func $~lib/gc/gc.collect)) (export "gc.retain" (func $~lib/gc/gc.retain)) @@ -2361,10 +2362,56 @@ end local.get $4 ) - (func $null (; 28 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceOf (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.get $1 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + ) + (func $~lib/runtime/__runtime_instanceof (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block $nope + block $~lib/arraybuffer/ArrayBuffer + block $~lib/set/Set + block $~lib/string/String + block $gc/Ref + local.get $0 + i32.const 1 + i32.sub + br_table $gc/Ref $~lib/string/String $~lib/set/Set $~lib/arraybuffer/ArrayBuffer $nope + end + local.get $1 + i32.const 1 + i32.eq + return + end + local.get $1 + i32.const 2 + i32.eq + return + end + local.get $1 + i32.const 3 + i32.eq + return + end + local.get $1 + i32.const 4 + i32.eq + return + end + i32.const 0 + ) + (func $null (; 30 ;) (type $FUNCSIG$v) nop ) - (func $~lib/runtime/runtime.makeArray|trampoline (; 29 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray|trampoline (; 31 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2384,7 +2431,7 @@ local.get $3 call $~lib/runtime/runtime.makeArray ) - (func $~lib/setargc (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) diff --git a/tests/compiler/gc.untouched.wat b/tests/compiler/gc.untouched.wat index 80ab5637fa..77b3114aa3 100644 --- a/tests/compiler/gc.untouched.wat +++ b/tests/compiler/gc.untouched.wat @@ -54,6 +54,7 @@ (export "runtime.register" (func $~lib/runtime/runtime.register)) (export ".setargc" (func $~lib/setargc)) (export "runtime.makeArray" (func $~lib/runtime/runtime.makeArray|trampoline)) + (export "runtime.instanceOf" (func $~lib/runtime/runtime.instanceOf)) (export "gc.implemented" (global $~lib/gc/gc.implemented)) (export "gc.collect" (func $~lib/gc/gc.collect)) (export "gc.retain" (func $~lib/gc/gc.retain)) @@ -2972,7 +2973,20 @@ end local.get $4 ) - (func $start (; 33 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceOf (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.get $1 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + ) + (func $start (; 34 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -2987,9 +3001,41 @@ call $~lib/set/Set#constructor global.set $~lib/gc/ROOT ) - (func $null (; 34 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__runtime_instanceof (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block $nope + block $~lib/arraybuffer/ArrayBuffer + block $~lib/set/Set + block $~lib/string/String + block $gc/Ref + local.get $0 + br_table $nope $gc/Ref $~lib/string/String $~lib/set/Set $~lib/arraybuffer/ArrayBuffer $nope + end + local.get $1 + i32.const 1 + i32.eq + return + end + local.get $1 + i32.const 2 + i32.eq + return + end + local.get $1 + i32.const 3 + i32.eq + return + end + local.get $1 + i32.const 4 + i32.eq + return + end + i32.const 0 + return + ) + (func $null (; 36 ;) (type $FUNCSIG$v) ) - (func $~lib/runtime/runtime.makeArray|trampoline (; 35 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray|trampoline (; 37 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -3009,7 +3055,7 @@ local.get $3 call $~lib/runtime/runtime.makeArray ) - (func $~lib/setargc (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) diff --git a/tests/compiler/instanceof.ts b/tests/compiler/instanceof.ts index 64d96b039c..b5b103294e 100644 --- a/tests/compiler/instanceof.ts +++ b/tests/compiler/instanceof.ts @@ -15,7 +15,7 @@ assert(!(I instanceof A)); assert(!(f instanceof A)); assert(!(F instanceof A)); -assert(!(a instanceof B)); +// assert(!(a instanceof B)); // dynamic upcast, checked in runtime/instanceof assert( b instanceof B ); assert(!(i instanceof B)); assert(!(I instanceof B)); diff --git a/tests/compiler/instanceof.untouched.wat b/tests/compiler/instanceof.untouched.wat index ed9a4ef73b..65e10c40ef 100644 --- a/tests/compiler/instanceof.untouched.wat +++ b/tests/compiler/instanceof.untouched.wat @@ -20,23 +20,75 @@ (export "table" (table $0)) (start $start) (func $instanceof/isI32 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - return + block (result i32) + local.get $0 + drop + i32.const 1 + end + if + i32.const 1 + return + else + i32.const 0 + return + end + unreachable + unreachable ) (func $instanceof/isI32 (; 2 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) - i32.const 0 - return + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + else + i32.const 0 + return + end + unreachable + unreachable ) (func $instanceof/isI32 (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 - return + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + else + i32.const 0 + return + end + unreachable + unreachable ) (func $instanceof/isI32 (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 - return + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + else + i32.const 0 + return + end + unreachable + unreachable ) (func $start:instanceof (; 5 ;) (type $FUNCSIG$v) - i32.const 1 + block (result i32) + global.get $instanceof/a + drop + i32.const 1 + end i32.eqz if i32.const 0 @@ -46,7 +98,11 @@ call $~lib/env/abort unreachable end - i32.const 1 + block (result i32) + global.get $instanceof/b + drop + i32.const 1 + end i32.eqz if i32.const 0 @@ -56,7 +112,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/i + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -67,7 +127,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/I + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -78,7 +142,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/f + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -89,29 +157,26 @@ call $~lib/env/abort unreachable end - i32.const 0 - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 16 - i32.const 16 + block (result i32) + global.get $instanceof/F + drop i32.const 0 - call $~lib/env/abort - unreachable end - i32.const 0 i32.eqz i32.eqz if i32.const 0 i32.const 16 - i32.const 18 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1 + block (result i32) + global.get $instanceof/b + drop + i32.const 1 + end i32.eqz if i32.const 0 @@ -121,7 +186,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/i + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -132,7 +201,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/I + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -143,7 +216,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/f + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -154,7 +231,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/F + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -165,7 +246,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/a + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -176,7 +261,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/b + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -187,7 +276,11 @@ call $~lib/env/abort unreachable end - i32.const 1 + block (result i32) + global.get $instanceof/i + drop + i32.const 1 + end i32.eqz if i32.const 0 @@ -197,7 +290,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/I + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -208,7 +305,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/f + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -219,7 +320,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/F + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -230,7 +335,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/a + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -241,7 +350,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/b + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -252,7 +365,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/i + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -263,7 +380,11 @@ call $~lib/env/abort unreachable end - i32.const 1 + block (result i32) + global.get $instanceof/I + drop + i32.const 1 + end i32.eqz if i32.const 0 @@ -273,7 +394,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/f + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -284,7 +409,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/F + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -295,7 +424,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/a + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -306,7 +439,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/b + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -317,7 +454,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/i + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -328,7 +469,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/I + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -339,7 +484,11 @@ call $~lib/env/abort unreachable end - i32.const 1 + block (result i32) + global.get $instanceof/f + drop + i32.const 1 + end i32.eqz if i32.const 0 @@ -349,7 +498,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/F + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -360,7 +513,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/a + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -371,7 +528,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/b + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -382,7 +543,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/i + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -393,7 +558,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/I + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -404,7 +573,11 @@ call $~lib/env/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/f + drop + i32.const 0 + end i32.eqz i32.eqz if @@ -415,7 +588,11 @@ call $~lib/env/abort unreachable end - i32.const 1 + block (result i32) + global.get $instanceof/F + drop + i32.const 1 + end i32.eqz if i32.const 0 @@ -485,7 +662,11 @@ call $~lib/env/abort unreachable end - i32.const 1 + block (result i32) + global.get $instanceof/an + drop + i32.const 1 + end i32.eqz if i32.const 0 @@ -509,7 +690,11 @@ call $~lib/env/abort unreachable end - i32.const 1 + block (result i32) + global.get $instanceof/an + drop + i32.const 1 + end i32.eqz if i32.const 0 diff --git a/tests/compiler/runtime/instanceof.optimized.wat b/tests/compiler/runtime/instanceof.optimized.wat index c3ece10846..fe71599a61 100644 --- a/tests/compiler/runtime/instanceof.optimized.wat +++ b/tests/compiler/runtime/instanceof.optimized.wat @@ -1,24 +1,212 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$v (func)) + (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00*\00\00\00r\00u\00n\00t\00i\00m\00e\00/\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s") + (data (i32.const 8) "\02\00\00\00*") + (data (i32.const 24) "r\00u\00n\00t\00i\00m\00e\00/\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s") + (data (i32.const 72) "\02\00\00\00\1e") + (data (i32.const 88) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 120) "\02\00\00\00\16") + (data (i32.const 136) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $gc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_ref (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 $runtime/instanceof/animal (mut i32) (i32.const 0)) + (global $runtime/instanceof/cat (mut i32) (i32.const 0)) + (global $runtime/instanceof/blackcat (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullableAnimal (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullableCat (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullableBlackcat (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullAnimal (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullCat (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullBlackcat (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (start $start) - (func $start:runtime/instanceof (; 1 ;) (type $FUNCSIG$v) + (export "main" (func $runtime/instanceof/main)) + (export ".capabilities" (global $~lib/capabilities)) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.tee $1 + local.get $0 + i32.const 1 + local.get $0 + i32.const 1 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + current_memory + local.tee $2 + i32.const 16 + i32.shl + i32.gt_u + if + local.get $2 + local.get $0 + local.get $1 + i32.sub + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $2 + local.get $3 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $0 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 16 + call $~lib/allocator/arena/__mem_allocate + local.tee $0 + i32.const -1520547049 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 16 + i32.add + ) + (func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 136 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/_dummy/register_count + local.get $0 + global.set $gc/_dummy/register_ref + ) + (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 160 + i32.le_u + if + i32.const 0 + i32.const 88 + i32.const 107 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 88 + i32.const 109 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $gc/_dummy/__ref_register + local.get $0 + ) + (func $runtime/instanceof/Animal#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + else + call $~lib/runtime/runtime.allocate + i32.const 1 + call $~lib/runtime/runtime.register + end + ) + (func $runtime/instanceof/Cat#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + else + call $~lib/runtime/runtime.allocate + i32.const 3 + call $~lib/runtime/runtime.register + end + call $runtime/instanceof/Animal#constructor + ) + (func $runtime/instanceof/BlackCat#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) + call $~lib/runtime/runtime.allocate + i32.const 4 + call $~lib/runtime/runtime.register + call $runtime/instanceof/Cat#constructor + ) + (func $start:runtime/instanceof (; 9 ;) (type $FUNCSIG$v) + (local $0 i32) i32.const 1 i32.const 1 call $~lib/runtime/__runtime_instanceof i32.eqz if i32.const 0 - i32.const 16 - i32.const 7 + i32.const 24 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -29,8 +217,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 14 + i32.const 24 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -41,8 +229,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 21 + i32.const 24 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -53,8 +241,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 28 + i32.const 24 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable @@ -65,8 +253,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 35 + i32.const 24 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -76,8 +264,8 @@ call $~lib/runtime/__runtime_instanceof if i32.const 0 - i32.const 16 - i32.const 42 + i32.const 24 + i32.const 43 i32.const 0 call $~lib/env/abort unreachable @@ -87,8 +275,8 @@ call $~lib/runtime/__runtime_instanceof if i32.const 0 - i32.const 16 - i32.const 49 + i32.const 24 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -98,17 +286,466 @@ call $~lib/runtime/__runtime_instanceof if i32.const 0 + i32.const 24 + i32.const 57 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 160 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + i32.const 0 + call $runtime/instanceof/Animal#constructor + global.set $runtime/instanceof/animal + i32.const 0 + call $runtime/instanceof/Cat#constructor + global.set $runtime/instanceof/cat + call $runtime/instanceof/BlackCat#constructor + global.set $runtime/instanceof/blackcat + global.get $runtime/instanceof/animal + local.tee $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 3 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 24 + i32.const 69 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/animal + local.tee $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 4 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 24 + i32.const 70 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/cat + local.tee $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 3 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 73 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/cat + local.tee $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 4 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 24 + i32.const 74 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/blackcat + local.tee $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 3 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 77 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/blackcat + local.tee $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 4 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 78 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 0 + call $runtime/instanceof/Animal#constructor + global.set $runtime/instanceof/nullableAnimal + i32.const 0 + call $runtime/instanceof/Cat#constructor + global.set $runtime/instanceof/nullableCat + call $runtime/instanceof/BlackCat#constructor + global.set $runtime/instanceof/nullableBlackcat + global.get $runtime/instanceof/nullableAnimal + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 84 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullableAnimal + local.tee $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 3 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 24 + i32.const 85 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullableAnimal + local.tee $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 4 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 24 + i32.const 86 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullableCat + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 88 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullableCat + local.tee $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 3 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 89 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullableCat + local.tee $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 4 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 24 + i32.const 90 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullableBlackcat + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 92 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullableBlackcat + local.tee $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 3 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 93 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullableBlackcat + local.tee $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 4 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 94 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullAnimal + if + i32.const 0 + i32.const 24 + i32.const 100 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullAnimal + local.tee $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 3 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 24 + i32.const 101 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullAnimal + local.tee $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 4 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 24 + i32.const 102 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullCat + if + i32.const 0 + i32.const 24 + i32.const 104 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullCat + local.tee $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 3 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 24 + i32.const 105 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullCat + local.tee $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 4 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 24 + i32.const 106 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullBlackcat + if + i32.const 0 + i32.const 24 + i32.const 108 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullBlackcat + local.tee $0 + if (result i32) + local.get $0 i32.const 16 - i32.const 56 + i32.sub + i32.load + i32.const 3 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 24 + i32.const 109 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullBlackcat + local.tee $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 4 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 24 + i32.const 110 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 2 ;) (type $FUNCSIG$v) - call $start:runtime/instanceof + (func $runtime/instanceof/main (; 10 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start:runtime/instanceof + i32.const 1 + global.set $~lib/started + end ) - (func $~lib/runtime/__runtime_instanceof (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/__runtime_instanceof (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $nope block $runtime/instanceof/BlackCat block $runtime/instanceof/Cat @@ -153,7 +790,7 @@ end i32.const 0 ) - (func $null (; 4 ;) (type $FUNCSIG$v) + (func $null (; 12 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/runtime/instanceof.ts b/tests/compiler/runtime/instanceof.ts index 542d60a204..bb367bc494 100644 --- a/tests/compiler/runtime/instanceof.ts +++ b/tests/compiler/runtime/instanceof.ts @@ -1,4 +1,5 @@ import { __runtime_id, __runtime_instanceof } from "runtime"; +import "../gc/_dummy"; class Animal {} class Cat extends Animal {} @@ -59,3 +60,53 @@ assert(! // Cat isn't necessarily a BlackCat __runtime_id() ) ); + +var animal: Animal = new Animal(); +var cat: Animal = new Cat(); +var blackcat: Animal = new BlackCat(); + +assert(animal instanceof Animal); // static true +assert(!(animal instanceof Cat)); // dynamic false +assert(!(animal instanceof BlackCat)); // dynamic false + +assert(cat instanceof Animal); // static true +assert(cat instanceof Cat); // dynamic true +assert(!(cat instanceof BlackCat)); // dynamic false + +assert(blackcat instanceof Animal); // static true +assert(blackcat instanceof Cat); // dynamic true +assert(blackcat instanceof BlackCat); // dynamic true + +var nullableAnimal: Animal | null = new Animal(); +var nullableCat: Animal | null = new Cat(); +var nullableBlackcat: Animal | null = new BlackCat(); + +assert(nullableAnimal instanceof Animal); // static true +assert(!(nullableAnimal instanceof Cat)); // dynamic false +assert(!(nullableAnimal instanceof BlackCat)); // dynamic false + +assert(nullableCat instanceof Animal); // static true +assert(nullableCat instanceof Cat); // dynamic true +assert(!(nullableCat instanceof BlackCat)); // dynamic false + +assert(nullableBlackcat instanceof Animal); // static true +assert(nullableBlackcat instanceof Cat); // dynamic true +assert(nullableBlackcat instanceof BlackCat); // dynamic true + +var nullAnimal: Animal | null = null; +var nullCat: Animal | null = null; +var nullBlackcat: Animal | null = null; + +assert(!(nullAnimal instanceof Animal)); // static false +assert(!(nullAnimal instanceof Cat)); // dynamic false +assert(!(nullAnimal instanceof BlackCat)); // dynamic false + +assert(!(nullCat instanceof Animal)); // static false +assert(!(nullCat instanceof Cat)); // dynamic false +assert(!(nullCat instanceof BlackCat)); // dynamic false + +assert(!(nullBlackcat instanceof Animal)); // static false +assert(!(nullBlackcat instanceof Cat)); // dynamic false +assert(!(nullBlackcat instanceof BlackCat)); // dynamic false + +@start export function main(): void {} diff --git a/tests/compiler/runtime/instanceof.untouched.wat b/tests/compiler/runtime/instanceof.untouched.wat index 38cf370160..f8e4faad19 100644 --- a/tests/compiler/runtime/instanceof.untouched.wat +++ b/tests/compiler/runtime/instanceof.untouched.wat @@ -1,25 +1,275 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$v (func)) + (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00*\00\00\00r\00u\00n\00t\00i\00m\00e\00/\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s\00") + (data (i32.const 8) "\02\00\00\00*\00\00\00\00\00\00\00\00\00\00\00r\00u\00n\00t\00i\00m\00e\00/\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s\00") + (data (i32.const 72) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 120) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 60)) + (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_count (mut i32) (i32.const 0)) + (global $gc/_dummy/link_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_parentRef (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_count (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_parentRef (mut i32) (i32.const 0)) + (global $gc/_dummy/mark_count (mut i32) (i32.const 0)) + (global $gc/_dummy/mark_ref (mut i32) (i32.const 0)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $runtime/instanceof/animal (mut i32) (i32.const 0)) + (global $runtime/instanceof/cat (mut i32) (i32.const 0)) + (global $runtime/instanceof/blackcat (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullableAnimal (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullableCat (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullableBlackcat (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullAnimal (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullCat (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullBlackcat (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 160)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (start $start) - (func $start:runtime/instanceof (; 1 ;) (type $FUNCSIG$v) + (export "main" (func $runtime/instanceof/main)) + (export ".capabilities" (global $~lib/capabilities)) + (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if + local.get $4 + local.get $1 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select + local.set $3 + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $2 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate + return + ) + (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/runtime.adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 136 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/_dummy/register_count + local.get $0 + global.set $gc/_dummy/register_ref + ) + (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 88 + i32.const 107 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 88 + i32.const 109 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $gc/_dummy/__ref_register + local.get $0 + ) + (func $runtime/instanceof/Animal#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/runtime/runtime.allocate + i32.const 1 + call $~lib/runtime/runtime.register + local.set $0 + end + local.get $0 + ) + (func $runtime/instanceof/Cat#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/runtime/runtime.allocate + i32.const 3 + call $~lib/runtime/runtime.register + local.set $0 + end + local.get $0 + call $runtime/instanceof/Animal#constructor + local.set $0 + local.get $0 + ) + (func $runtime/instanceof/BlackCat#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/runtime/runtime.allocate + i32.const 4 + call $~lib/runtime/runtime.register + local.set $0 + end + local.get $0 + call $runtime/instanceof/Cat#constructor + local.set $0 + local.get $0 + ) + (func $start:runtime/instanceof (; 11 ;) (type $FUNCSIG$v) + (local $0 i32) i32.const 1 i32.const 1 call $~lib/runtime/__runtime_instanceof i32.eqz if i32.const 0 - i32.const 16 - i32.const 7 + i32.const 24 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -30,8 +280,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 14 + i32.const 24 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -42,8 +292,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 21 + i32.const 24 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -54,8 +304,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 28 + i32.const 24 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable @@ -66,8 +316,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 35 + i32.const 24 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -79,8 +329,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 42 + i32.const 24 + i32.const 43 i32.const 0 call $~lib/env/abort unreachable @@ -92,8 +342,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 49 + i32.const 24 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -105,17 +355,579 @@ i32.eqz if i32.const 0 + i32.const 24 + i32.const 57 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + i32.const 0 + call $runtime/instanceof/Animal#constructor + global.set $runtime/instanceof/animal + i32.const 0 + call $runtime/instanceof/Cat#constructor + global.set $runtime/instanceof/cat + i32.const 0 + call $runtime/instanceof/BlackCat#constructor + global.set $runtime/instanceof/blackcat + block (result i32) + global.get $runtime/instanceof/animal + drop + i32.const 1 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 68 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/animal + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 3 + call $~lib/runtime/__runtime_instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 69 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/animal + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 4 + call $~lib/runtime/__runtime_instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 70 + i32.const 0 + call $~lib/env/abort + unreachable + end + block (result i32) + global.get $runtime/instanceof/cat + drop + i32.const 1 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 72 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/cat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 3 + call $~lib/runtime/__runtime_instanceof + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 73 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/cat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 i32.const 16 - i32.const 56 + i32.sub + i32.load + i32.const 4 + call $~lib/runtime/__runtime_instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 74 + i32.const 0 + call $~lib/env/abort + unreachable + end + block (result i32) + global.get $runtime/instanceof/blackcat + drop + i32.const 1 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 76 i32.const 0 call $~lib/env/abort unreachable end + global.get $runtime/instanceof/blackcat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 3 + call $~lib/runtime/__runtime_instanceof + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 77 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/blackcat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 4 + call $~lib/runtime/__runtime_instanceof + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 78 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 0 + call $runtime/instanceof/Animal#constructor + global.set $runtime/instanceof/nullableAnimal + i32.const 0 + call $runtime/instanceof/Cat#constructor + global.set $runtime/instanceof/nullableCat + i32.const 0 + call $runtime/instanceof/BlackCat#constructor + global.set $runtime/instanceof/nullableBlackcat + global.get $runtime/instanceof/nullableAnimal + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 84 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullableAnimal + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 3 + call $~lib/runtime/__runtime_instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 85 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullableAnimal + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 4 + call $~lib/runtime/__runtime_instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 86 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullableCat + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 88 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullableCat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 3 + call $~lib/runtime/__runtime_instanceof + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 89 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullableCat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 4 + call $~lib/runtime/__runtime_instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 90 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullableBlackcat + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 92 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullableBlackcat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 3 + call $~lib/runtime/__runtime_instanceof + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 93 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullableBlackcat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 4 + call $~lib/runtime/__runtime_instanceof + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 94 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullAnimal + i32.const 0 + i32.ne + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 100 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullAnimal + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 3 + call $~lib/runtime/__runtime_instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 101 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullAnimal + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 4 + call $~lib/runtime/__runtime_instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 102 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullCat + i32.const 0 + i32.ne + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 104 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullCat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 3 + call $~lib/runtime/__runtime_instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 105 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullCat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 4 + call $~lib/runtime/__runtime_instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 106 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullBlackcat + i32.const 0 + i32.ne + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 108 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullBlackcat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 3 + call $~lib/runtime/__runtime_instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 109 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $runtime/instanceof/nullBlackcat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const 4 + call $~lib/runtime/__runtime_instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 110 + i32.const 0 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/instanceof/main (; 12 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started + end ) - (func $start (; 2 ;) (type $FUNCSIG$v) + (func $start (; 13 ;) (type $FUNCSIG$v) call $start:runtime/instanceof ) - (func $~lib/runtime/__runtime_instanceof (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/__runtime_instanceof (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $nope block $runtime/instanceof/BlackCat block $runtime/instanceof/Cat @@ -159,6 +971,6 @@ i32.const 0 return ) - (func $null (; 4 ;) (type $FUNCSIG$v) + (func $null (; 15 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 8d392aaaa5..0ca4ccf878 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1847,7 +1847,7 @@ call $~lib/env/abort unreachable end - block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>13 (result i32) + block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array>11 (result i32) i32.const 1 i32.const 12 call $~lib/runtime/runtime.allocate @@ -1855,7 +1855,7 @@ call $~lib/runtime/runtime.register i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>13 + br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array>11 drop i32.const 0 end @@ -1870,12 +1870,12 @@ end i32.const 1 global.set $~lib/argc - block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>14 (result i32) + block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView>12 (result i32) i32.const 1 global.get $std/arraybuffer/arr8 i32.load call $~lib/dataview/DataView#constructor|trampoline - br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>14 + br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView>12 drop i32.const 0 end diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 63a50c3357..2951878a05 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -1982,38 +1982,570 @@ (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array> (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if - nop + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end end i32.const 0 ) (func $~lib/arraybuffer/ArrayBuffer.isView (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if - nop + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end end i32.const 0 ) (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array> (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if - i32.const 1 - return + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 1 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end end i32.const 0 ) (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array> (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if - i32.const 1 - return + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 1 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end end i32.const 0 ) (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView> (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if - i32.const 1 - return + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 1 + end + if + i32.const 1 + return + end end i32.const 0 ) From 50c49e427532b914af9a2ed0af97bb1e7928c543 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 3 Apr 2019 00:26:41 +0200 Subject: [PATCH 089/119] make it 'runtime.instanceof' --- src/tokenizer.ts | 1 + std/assembly/runtime.ts | 27 ++++---- tests/compiler/call-super.optimized.wat | 4 +- tests/compiler/call-super.untouched.wat | 4 +- tests/compiler/constructor.optimized.wat | 4 +- tests/compiler/constructor.untouched.wat | 4 +- tests/compiler/exports.optimized.wat | 4 +- tests/compiler/exports.untouched.wat | 4 +- tests/compiler/gc.optimized.wat | 48 +++++++------- tests/compiler/gc.untouched.wat | 63 ++++++++++--------- tests/compiler/gc/global-assign.optimized.wat | 4 +- tests/compiler/gc/global-assign.untouched.wat | 4 +- tests/compiler/gc/global-init.optimized.wat | 4 +- tests/compiler/gc/global-init.untouched.wat | 4 +- tests/compiler/gc/itcm/trace.optimized.wat | 6 +- tests/compiler/gc/itcm/trace.untouched.wat | 6 +- .../gc/rc/global-assign.optimized.wat | 4 +- .../gc/rc/global-assign.untouched.wat | 4 +- .../compiler/gc/rc/global-init.optimized.wat | 4 +- .../compiler/gc/rc/global-init.untouched.wat | 4 +- tests/compiler/getter-call.optimized.wat | 4 +- tests/compiler/getter-call.untouched.wat | 4 +- tests/compiler/inlining.optimized.wat | 4 +- tests/compiler/inlining.untouched.wat | 4 +- tests/compiler/number.optimized.wat | 8 +-- tests/compiler/number.untouched.wat | 8 +-- .../optional-typeparameters.optimized.wat | 4 +- .../optional-typeparameters.untouched.wat | 4 +- .../compiler/runtime/instanceof.optimized.wat | 4 +- .../compiler/runtime/instanceof.untouched.wat | 4 +- .../compiler/std/array-literal.optimized.wat | 4 +- .../compiler/std/array-literal.untouched.wat | 4 +- tests/compiler/std/array.optimized.wat | 10 +-- tests/compiler/std/array.untouched.wat | 10 +-- tests/compiler/std/arraybuffer.optimized.wat | 4 +- tests/compiler/std/arraybuffer.untouched.wat | 4 +- tests/compiler/std/dataview.optimized.wat | 4 +- tests/compiler/std/dataview.untouched.wat | 4 +- tests/compiler/std/date.optimized.wat | 4 +- tests/compiler/std/date.untouched.wat | 4 +- tests/compiler/std/map.optimized.wat | 4 +- tests/compiler/std/map.untouched.wat | 4 +- tests/compiler/std/new.optimized.wat | 4 +- tests/compiler/std/new.untouched.wat | 4 +- .../compiler/std/object-literal.optimized.wat | 4 +- .../compiler/std/object-literal.untouched.wat | 4 +- .../std/operator-overloading.optimized.wat | 4 +- .../std/operator-overloading.untouched.wat | 4 +- tests/compiler/std/runtime.optimized.wat | 10 +-- tests/compiler/std/runtime.untouched.wat | 10 +-- tests/compiler/std/set.optimized.wat | 4 +- tests/compiler/std/set.untouched.wat | 4 +- tests/compiler/std/static-array.optimized.wat | 2 +- tests/compiler/std/static-array.untouched.wat | 2 +- tests/compiler/std/string-utf8.optimized.wat | 4 +- tests/compiler/std/string-utf8.untouched.wat | 4 +- tests/compiler/std/string.optimized.wat | 10 +-- tests/compiler/std/string.untouched.wat | 10 +-- tests/compiler/std/symbol.optimized.wat | 4 +- tests/compiler/std/symbol.untouched.wat | 4 +- tests/compiler/std/typedarray.optimized.wat | 4 +- tests/compiler/std/typedarray.untouched.wat | 4 +- 62 files changed, 212 insertions(+), 203 deletions(-) diff --git a/src/tokenizer.ts b/src/tokenizer.ts index 75088508ca..8076d5adc0 100644 --- a/src/tokenizer.ts +++ b/src/tokenizer.ts @@ -350,6 +350,7 @@ export function tokenIsAlsoIdentifier(token: Token): bool { case Token.FROM: case Token.FOR: case Token.GET: + case Token.INSTANCEOF: case Token.IS: case Token.KEYOF: case Token.MODULE: diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 0d167a7876..09b3e8cf48 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -15,6 +15,22 @@ export declare function __runtime_id(): u32; @unsafe @builtin export declare function __runtime_instanceof(id: u32, superId: u32): bool; +/** Runtime implementation. */ +@unmanaged +export class runtime { + private constructor() { return unreachable(); } + + @unsafe + static instanceof(ref: usize, id: u32): bool { // keyword + return ref + ? __runtime_instanceof( + changetype
(ref - HEADER_SIZE).classId, + id + ) + : false; + } +} + /** Runtime implementation. */ export namespace runtime { @@ -128,15 +144,4 @@ export namespace runtime { if (source) memory.copy(buffer, source, bufferSize); return array; } - - // @ts-ignore: decorator - @unsafe - export function instanceOf(ref: usize, id: u32): bool { - return ref - ? __runtime_instanceof( - changetype
(ref - HEADER_SIZE).classId, - id - ) - : false; - } } diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 0b64d237a4..d681e6e2c2 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -106,7 +106,7 @@ if i32.const 0 i32.const 16 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -121,7 +121,7 @@ if i32.const 0 i32.const 16 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index 3c731b052a..b7f7c1cff6 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -139,7 +139,7 @@ if i32.const 0 i32.const 16 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -156,7 +156,7 @@ if i32.const 0 i32.const 16 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index c2fc78b3b9..1aa1c7c2fa 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -1283,7 +1283,7 @@ if i32.const 0 i32.const 88 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -1298,7 +1298,7 @@ if i32.const 0 i32.const 88 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index 625eee920b..3a430f2554 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -1563,7 +1563,7 @@ if i32.const 0 i32.const 88 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -1580,7 +1580,7 @@ if i32.const 0 i32.const 88 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index a1374ad99d..f7376270d5 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -146,7 +146,7 @@ if i32.const 0 i32.const 16 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -161,7 +161,7 @@ if i32.const 0 i32.const 16 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 46ea1b4917..31dc552fbe 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -192,7 +192,7 @@ if i32.const 0 i32.const 16 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -209,7 +209,7 @@ if i32.const 0 i32.const 16 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc.optimized.wat b/tests/compiler/gc.optimized.wat index 959e4bd09e..2f24750881 100644 --- a/tests/compiler/gc.optimized.wat +++ b/tests/compiler/gc.optimized.wat @@ -48,6 +48,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/main)) + (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "runtime.adjust" (func $~lib/runtime/runtime.adjust)) (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) (export "runtime.reallocate" (func $~lib/runtime/runtime.reallocate)) @@ -55,7 +56,6 @@ (export "runtime.register" (func $~lib/runtime/runtime.register)) (export ".setargc" (func $~lib/setargc)) (export "runtime.makeArray" (func $~lib/runtime/runtime.makeArray|trampoline)) - (export "runtime.instanceOf" (func $~lib/runtime/runtime.instanceOf)) (export "gc.implemented" (global $~lib/gc/gc.implemented)) (export "gc.collect" (func $~lib/gc/gc.collect)) (export "gc.retain" (func $~lib/gc/gc.retain)) @@ -185,7 +185,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -200,7 +200,7 @@ if i32.const 0 i32.const 24 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable @@ -1133,7 +1133,20 @@ unreachable end ) - (func $~lib/util/memory/memcpy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/runtime/runtime.instanceof (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.get $1 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + ) + (func $~lib/util/memory/memcpy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1980,7 +1993,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2174,7 +2187,7 @@ end end ) - (func $~lib/runtime/runtime.reallocate (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2251,7 +2264,7 @@ if i32.const 0 i32.const 24 - i32.const 69 + i32.const 85 i32.const 10 call $~lib/env/abort unreachable @@ -2279,14 +2292,14 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/runtime.discard (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 292 i32.le_u if i32.const 0 i32.const 24 - i32.const 94 + i32.const 110 i32.const 6 call $~lib/env/abort unreachable @@ -2300,13 +2313,13 @@ if i32.const 0 i32.const 24 - i32.const 96 + i32.const 112 i32.const 6 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/runtime.makeArray (; 27 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 28 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2362,19 +2375,6 @@ end local.get $4 ) - (func $~lib/runtime/runtime.instanceOf (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - if (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load - local.get $1 - call $~lib/runtime/__runtime_instanceof - else - i32.const 0 - end - ) (func $~lib/runtime/__runtime_instanceof (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $nope block $~lib/arraybuffer/ArrayBuffer diff --git a/tests/compiler/gc.untouched.wat b/tests/compiler/gc.untouched.wat index 77b3114aa3..e3cff7fc59 100644 --- a/tests/compiler/gc.untouched.wat +++ b/tests/compiler/gc.untouched.wat @@ -47,6 +47,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/main)) + (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "runtime.adjust" (func $~lib/runtime/runtime.adjust)) (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) (export "runtime.reallocate" (func $~lib/runtime/runtime.reallocate)) @@ -54,7 +55,6 @@ (export "runtime.register" (func $~lib/runtime/runtime.register)) (export ".setargc" (func $~lib/setargc)) (export "runtime.makeArray" (func $~lib/runtime/runtime.makeArray|trampoline)) - (export "runtime.instanceOf" (func $~lib/runtime/runtime.instanceOf)) (export "gc.implemented" (global $~lib/gc/gc.implemented)) (export "gc.collect" (func $~lib/gc/gc.collect)) (export "gc.retain" (func $~lib/gc/gc.retain)) @@ -204,7 +204,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -221,7 +221,7 @@ if i32.const 0 i32.const 24 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable @@ -1332,7 +1332,20 @@ unreachable end ) - (func $~lib/util/memory/memcpy (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/runtime/runtime.instanceof (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.get $1 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + ) + (func $~lib/util/memory/memcpy (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2533,7 +2546,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2764,14 +2777,14 @@ end end ) - (func $~lib/allocator/arena/__mem_free (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/runtime.reallocate (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2842,7 +2855,7 @@ if i32.const 0 i32.const 24 - i32.const 69 + i32.const 85 i32.const 10 call $~lib/env/abort unreachable @@ -2875,7 +2888,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/runtime.discard (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -2884,7 +2897,7 @@ if i32.const 0 i32.const 24 - i32.const 94 + i32.const 110 i32.const 6 call $~lib/env/abort unreachable @@ -2901,7 +2914,7 @@ if i32.const 0 i32.const 24 - i32.const 96 + i32.const 112 i32.const 6 call $~lib/env/abort unreachable @@ -2909,7 +2922,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/runtime/runtime.makeArray (; 32 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray (; 33 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2973,20 +2986,10 @@ end local.get $4 ) - (func $~lib/runtime/runtime.instanceOf (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - if (result i32) - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - i32.load - local.get $1 - call $~lib/runtime/__runtime_instanceof - else - i32.const 0 - end + (func $~lib/runtime/runtime#constructor (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable ) - (func $start (; 34 ;) (type $FUNCSIG$v) + (func $start (; 35 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -3001,7 +3004,7 @@ call $~lib/set/Set#constructor global.set $~lib/gc/ROOT ) - (func $~lib/runtime/__runtime_instanceof (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/__runtime_instanceof (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $nope block $~lib/arraybuffer/ArrayBuffer block $~lib/set/Set @@ -3033,9 +3036,9 @@ i32.const 0 return ) - (func $null (; 36 ;) (type $FUNCSIG$v) + (func $null (; 37 ;) (type $FUNCSIG$v) ) - (func $~lib/runtime/runtime.makeArray|trampoline (; 37 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.makeArray|trampoline (; 38 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -3055,7 +3058,7 @@ local.get $3 call $~lib/runtime/runtime.makeArray ) - (func $~lib/setargc (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) diff --git a/tests/compiler/gc/global-assign.optimized.wat b/tests/compiler/gc/global-assign.optimized.wat index 27618b5a4a..a94da9a941 100644 --- a/tests/compiler/gc/global-assign.optimized.wat +++ b/tests/compiler/gc/global-assign.optimized.wat @@ -137,7 +137,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -152,7 +152,7 @@ if i32.const 0 i32.const 24 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-assign.untouched.wat b/tests/compiler/gc/global-assign.untouched.wat index 6c22ff95d0..8440abb0df 100644 --- a/tests/compiler/gc/global-assign.untouched.wat +++ b/tests/compiler/gc/global-assign.untouched.wat @@ -182,7 +182,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -199,7 +199,7 @@ if i32.const 0 i32.const 24 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-init.optimized.wat b/tests/compiler/gc/global-init.optimized.wat index e030d7d85b..ffe8da48e0 100644 --- a/tests/compiler/gc/global-init.optimized.wat +++ b/tests/compiler/gc/global-init.optimized.wat @@ -136,7 +136,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -151,7 +151,7 @@ if i32.const 0 i32.const 24 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-init.untouched.wat b/tests/compiler/gc/global-init.untouched.wat index d48ee91ed7..bf5fa6c057 100644 --- a/tests/compiler/gc/global-init.untouched.wat +++ b/tests/compiler/gc/global-init.untouched.wat @@ -181,7 +181,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -198,7 +198,7 @@ if i32.const 0 i32.const 24 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/itcm/trace.optimized.wat b/tests/compiler/gc/itcm/trace.optimized.wat index 872384f248..c8208fe60d 100644 --- a/tests/compiler/gc/itcm/trace.optimized.wat +++ b/tests/compiler/gc/itcm/trace.optimized.wat @@ -341,7 +341,7 @@ if i32.const 0 i32.const 128 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -356,7 +356,7 @@ if i32.const 0 i32.const 128 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable @@ -1859,7 +1859,7 @@ if i32.const 0 i32.const 128 - i32.const 69 + i32.const 85 i32.const 10 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/itcm/trace.untouched.wat b/tests/compiler/gc/itcm/trace.untouched.wat index 5bf72e9b33..8cdb20ef36 100644 --- a/tests/compiler/gc/itcm/trace.untouched.wat +++ b/tests/compiler/gc/itcm/trace.untouched.wat @@ -390,7 +390,7 @@ if i32.const 0 i32.const 128 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -407,7 +407,7 @@ if i32.const 0 i32.const 128 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable @@ -2466,7 +2466,7 @@ if i32.const 0 i32.const 128 - i32.const 69 + i32.const 85 i32.const 10 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-assign.optimized.wat b/tests/compiler/gc/rc/global-assign.optimized.wat index 2a87c612a6..22353b4743 100644 --- a/tests/compiler/gc/rc/global-assign.optimized.wat +++ b/tests/compiler/gc/rc/global-assign.optimized.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 24 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-assign.untouched.wat b/tests/compiler/gc/rc/global-assign.untouched.wat index f704186e87..960f9e088e 100644 --- a/tests/compiler/gc/rc/global-assign.untouched.wat +++ b/tests/compiler/gc/rc/global-assign.untouched.wat @@ -180,7 +180,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -197,7 +197,7 @@ if i32.const 0 i32.const 24 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-init.optimized.wat b/tests/compiler/gc/rc/global-init.optimized.wat index 4841559692..f522db6f11 100644 --- a/tests/compiler/gc/rc/global-init.optimized.wat +++ b/tests/compiler/gc/rc/global-init.optimized.wat @@ -139,7 +139,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -154,7 +154,7 @@ if i32.const 0 i32.const 24 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-init.untouched.wat b/tests/compiler/gc/rc/global-init.untouched.wat index 9bf256024e..2215cd0f9a 100644 --- a/tests/compiler/gc/rc/global-init.untouched.wat +++ b/tests/compiler/gc/rc/global-init.untouched.wat @@ -178,7 +178,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -195,7 +195,7 @@ if i32.const 0 i32.const 24 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 891e19ed15..56b9ede9dc 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -85,7 +85,7 @@ if i32.const 0 i32.const 16 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index f0b0fc029b..d56f743a35 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -141,7 +141,7 @@ if i32.const 0 i32.const 16 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index b67dcff344..b3a3e14cd1 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 48 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -146,7 +146,7 @@ if i32.const 0 i32.const 48 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 40a2ec4ed5..1803bad4e1 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -405,7 +405,7 @@ if i32.const 0 i32.const 48 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -422,7 +422,7 @@ if i32.const 0 i32.const 48 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 23bf9184f3..6da86e17c1 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -303,7 +303,7 @@ if i32.const 0 i32.const 464 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -318,7 +318,7 @@ if i32.const 0 i32.const 464 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable @@ -2451,7 +2451,7 @@ if i32.const 0 i32.const 464 - i32.const 94 + i32.const 110 i32.const 6 call $~lib/env/abort unreachable @@ -2465,7 +2465,7 @@ if i32.const 0 i32.const 464 - i32.const 96 + i32.const 112 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 792bee7b91..058ac0ff27 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -399,7 +399,7 @@ if i32.const 0 i32.const 464 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -416,7 +416,7 @@ if i32.const 0 i32.const 464 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable @@ -3534,7 +3534,7 @@ if i32.const 0 i32.const 464 - i32.const 94 + i32.const 110 i32.const 6 call $~lib/env/abort unreachable @@ -3551,7 +3551,7 @@ if i32.const 0 i32.const 464 - i32.const 96 + i32.const 112 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 80fb2f3cf4..3a7909e29e 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -115,7 +115,7 @@ if i32.const 0 i32.const 16 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index ea2f4ea86f..1ca1bb2b54 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -148,7 +148,7 @@ if i32.const 0 i32.const 16 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -165,7 +165,7 @@ if i32.const 0 i32.const 16 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/runtime/instanceof.optimized.wat b/tests/compiler/runtime/instanceof.optimized.wat index fe71599a61..138d08b858 100644 --- a/tests/compiler/runtime/instanceof.optimized.wat +++ b/tests/compiler/runtime/instanceof.optimized.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 88 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 88 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/runtime/instanceof.untouched.wat b/tests/compiler/runtime/instanceof.untouched.wat index f8e4faad19..d0f4fbdb7a 100644 --- a/tests/compiler/runtime/instanceof.untouched.wat +++ b/tests/compiler/runtime/instanceof.untouched.wat @@ -189,7 +189,7 @@ if i32.const 0 i32.const 88 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -206,7 +206,7 @@ if i32.const 0 i32.const 88 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index a646be8b78..c2acc830a0 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -177,7 +177,7 @@ if i32.const 0 i32.const 296 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -192,7 +192,7 @@ if i32.const 0 i32.const 296 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 414c8d2a86..37e040cf0f 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -233,7 +233,7 @@ if i32.const 0 i32.const 296 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -250,7 +250,7 @@ if i32.const 0 i32.const 296 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index f8cc1348d4..6ce4211e1d 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -787,7 +787,7 @@ if i32.const 0 i32.const 80 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -802,7 +802,7 @@ if i32.const 0 i32.const 80 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable @@ -2340,7 +2340,7 @@ if i32.const 0 i32.const 80 - i32.const 69 + i32.const 85 i32.const 10 call $~lib/env/abort unreachable @@ -6323,7 +6323,7 @@ if i32.const 0 i32.const 80 - i32.const 94 + i32.const 110 i32.const 6 call $~lib/env/abort unreachable @@ -6337,7 +6337,7 @@ if i32.const 0 i32.const 80 - i32.const 96 + i32.const 112 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index c2a9e471a9..06e870969c 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -684,7 +684,7 @@ if i32.const 0 i32.const 80 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -701,7 +701,7 @@ if i32.const 0 i32.const 80 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable @@ -2859,7 +2859,7 @@ if i32.const 0 i32.const 80 - i32.const 69 + i32.const 85 i32.const 10 call $~lib/env/abort unreachable @@ -9604,7 +9604,7 @@ if i32.const 0 i32.const 80 - i32.const 94 + i32.const 110 i32.const 6 call $~lib/env/abort unreachable @@ -9621,7 +9621,7 @@ if i32.const 0 i32.const 80 - i32.const 96 + i32.const 112 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 0ca4ccf878..003898b761 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -327,7 +327,7 @@ if i32.const 0 i32.const 64 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -342,7 +342,7 @@ if i32.const 0 i32.const 64 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 2951878a05..263760de58 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -407,7 +407,7 @@ if i32.const 0 i32.const 64 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -424,7 +424,7 @@ if i32.const 0 i32.const 64 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index a194761b7a..25724f1895 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -165,7 +165,7 @@ if i32.const 0 i32.const 64 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -180,7 +180,7 @@ if i32.const 0 i32.const 64 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index ad420ca898..cd1db6b292 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -413,7 +413,7 @@ if i32.const 0 i32.const 64 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -430,7 +430,7 @@ if i32.const 0 i32.const 64 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 6c655d3091..116af7fe29 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -89,7 +89,7 @@ if i32.const 0 i32.const 48 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -104,7 +104,7 @@ if i32.const 0 i32.const 48 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 67b2f1f7de..44257c3824 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -148,7 +148,7 @@ if i32.const 0 i32.const 48 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -165,7 +165,7 @@ if i32.const 0 i32.const 48 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 04d1628d4e..40217a4d31 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -135,7 +135,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -150,7 +150,7 @@ if i32.const 0 i32.const 24 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index bfb2320811..b103b77ccc 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -166,7 +166,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -183,7 +183,7 @@ if i32.const 0 i32.const 24 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 65a4c2f1ed..9d1e780819 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -84,7 +84,7 @@ if i32.const 0 i32.const 16 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -99,7 +99,7 @@ if i32.const 0 i32.const 16 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 3f79738931..37689c9572 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -141,7 +141,7 @@ if i32.const 0 i32.const 16 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index 0a163f0d20..bdb62aad19 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -118,7 +118,7 @@ if i32.const 0 i32.const 64 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -133,7 +133,7 @@ if i32.const 0 i32.const 64 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/object-literal.untouched.wat b/tests/compiler/std/object-literal.untouched.wat index c12247089f..11eb9ba485 100644 --- a/tests/compiler/std/object-literal.untouched.wat +++ b/tests/compiler/std/object-literal.untouched.wat @@ -153,7 +153,7 @@ if i32.const 0 i32.const 64 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -170,7 +170,7 @@ if i32.const 0 i32.const 64 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index a23ab05424..06e9f5d7f5 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -167,7 +167,7 @@ if i32.const 0 i32.const 16 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -182,7 +182,7 @@ if i32.const 0 i32.const 16 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 58f6db40f6..287acdddb6 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -209,7 +209,7 @@ if i32.const 0 i32.const 16 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -226,7 +226,7 @@ if i32.const 0 i32.const 16 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 7f225581ce..29b95e4e92 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -2560,7 +2560,7 @@ if i32.const 0 i32.const 232 - i32.const 69 + i32.const 85 i32.const 10 call $~lib/env/abort unreachable @@ -2597,7 +2597,7 @@ if i32.const 0 i32.const 232 - i32.const 94 + i32.const 110 i32.const 6 call $~lib/env/abort unreachable @@ -2612,7 +2612,7 @@ if i32.const 0 i32.const 232 - i32.const 96 + i32.const 112 i32.const 6 call $~lib/env/abort unreachable @@ -2628,7 +2628,7 @@ if i32.const 0 i32.const 232 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -2643,7 +2643,7 @@ if i32.const 0 i32.const 232 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 0bbaf53476..15a904e77f 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -3288,7 +3288,7 @@ if i32.const 0 i32.const 232 - i32.const 69 + i32.const 85 i32.const 10 call $~lib/env/abort unreachable @@ -3330,7 +3330,7 @@ if i32.const 0 i32.const 232 - i32.const 94 + i32.const 110 i32.const 6 call $~lib/env/abort unreachable @@ -3347,7 +3347,7 @@ if i32.const 0 i32.const 232 - i32.const 96 + i32.const 112 i32.const 6 call $~lib/env/abort unreachable @@ -3364,7 +3364,7 @@ if i32.const 0 i32.const 232 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -3381,7 +3381,7 @@ if i32.const 0 i32.const 232 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 64fbf7439b..1e8d43f044 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -146,7 +146,7 @@ if i32.const 0 i32.const 24 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 7eba4061ae..ac8c670836 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -166,7 +166,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -183,7 +183,7 @@ if i32.const 0 i32.const 24 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 39a7e4250e..37b088ccc4 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -1437,7 +1437,7 @@ if i32.const 0 i32.const 280 - i32.const 69 + i32.const 85 i32.const 10 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 6714c00cf3..c57c7254f4 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -1928,7 +1928,7 @@ if i32.const 0 i32.const 280 - i32.const 69 + i32.const 85 i32.const 10 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index bddf32e4bf..f1dd5e16c2 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -1464,7 +1464,7 @@ if i32.const 0 i32.const 136 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -1479,7 +1479,7 @@ if i32.const 0 i32.const 136 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index 6e4071ebe0..a9fca170c4 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -1929,7 +1929,7 @@ if i32.const 0 i32.const 136 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -1946,7 +1946,7 @@ if i32.const 0 i32.const 136 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 6700b06bce..350e4bce05 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -444,7 +444,7 @@ if i32.const 0 i32.const 184 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -459,7 +459,7 @@ if i32.const 0 i32.const 184 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable @@ -3235,7 +3235,7 @@ if i32.const 0 i32.const 184 - i32.const 69 + i32.const 85 i32.const 10 call $~lib/env/abort unreachable @@ -5177,7 +5177,7 @@ if i32.const 0 i32.const 184 - i32.const 94 + i32.const 110 i32.const 6 call $~lib/env/abort unreachable @@ -5191,7 +5191,7 @@ if i32.const 0 i32.const 184 - i32.const 96 + i32.const 112 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 3a1416c1fd..e9c94dc247 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -379,7 +379,7 @@ if i32.const 0 i32.const 184 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -396,7 +396,7 @@ if i32.const 0 i32.const 184 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable @@ -3850,7 +3850,7 @@ if i32.const 0 i32.const 184 - i32.const 69 + i32.const 85 i32.const 10 call $~lib/env/abort unreachable @@ -6549,7 +6549,7 @@ if i32.const 0 i32.const 184 - i32.const 94 + i32.const 110 i32.const 6 call $~lib/env/abort unreachable @@ -6566,7 +6566,7 @@ if i32.const 0 i32.const 184 - i32.const 96 + i32.const 112 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index b9654c31c9..0b2c17e8dd 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -144,7 +144,7 @@ if i32.const 0 i32.const 72 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -159,7 +159,7 @@ if i32.const 0 i32.const 72 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 410fbd1c80..a00be986d0 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -200,7 +200,7 @@ if i32.const 0 i32.const 72 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -217,7 +217,7 @@ if i32.const 0 i32.const 72 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 00e7464108..0991f7ee81 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -439,7 +439,7 @@ if i32.const 0 i32.const 136 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -454,7 +454,7 @@ if i32.const 0 i32.const 136 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index a20d42bd6b..31eca951f9 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -497,7 +497,7 @@ if i32.const 0 i32.const 136 - i32.const 107 + i32.const 123 i32.const 6 call $~lib/env/abort unreachable @@ -514,7 +514,7 @@ if i32.const 0 i32.const 136 - i32.const 109 + i32.const 125 i32.const 6 call $~lib/env/abort unreachable From cc1e4cd0040faf71035386829ddc333ba1eb6a2a Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 3 Apr 2019 14:53:47 +0200 Subject: [PATCH 090/119] expose runtime id of exported class --- src/compiler.ts | 11 ++++++++++- tests/compiler/exports.optimized.wat | 4 ++++ tests/compiler/exports.untouched.wat | 4 ++++ tests/compiler/resolve-nested.optimized.wat | 4 ++++ tests/compiler/resolve-nested.untouched.wat | 4 ++++ 5 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/compiler.ts b/src/compiler.ts index 304c5f383c..90313d90d8 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -605,10 +605,19 @@ export class Compiler extends DiagnosticEmitter { } break; } + case ElementKind.CLASS: { + // make the class name itself represent its runtime id + if (!(element).type.isUnmanaged) { + let module = this.module; + let internalName = (element).internalName; + module.addGlobal(internalName, NativeType.I32, false, module.createI32((element).ensureId())); + module.addGlobalExport(internalName, prefix + name); + } + break; + } // just traverse members below case ElementKind.ENUM: - case ElementKind.CLASS: case ElementKind.NAMESPACE: case ElementKind.FILE: case ElementKind.TYPEDEFINITION: break; diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index f7376270d5..4bb693c91f 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -21,6 +21,8 @@ (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) + (global $exports/Car i32 (i32.const 1)) + (global $exports/vehicles.Car i32 (i32.const 3)) (export "memory" (memory $0)) (export "table" (table $0)) (export "add" (func $exports/add)) @@ -31,6 +33,7 @@ (export "Animal.DOG" (global $exports/Animal.DOG)) (export "animals.Animal.CAT" (global $exports/animals.Animal.CAT)) (export "animals.Animal.DOG" (global $exports/animals.Animal.DOG)) + (export "Car" (global $exports/Car)) (export "Car#get:doors" (func $exports/Car#get:numDoors)) (export "Car#set:doors" (func $exports/Car#set:numDoors)) (export "Car#constructor" (func $exports/Car#constructor|trampoline)) @@ -39,6 +42,7 @@ (export "Car#openDoors" (func $exports/Car#openDoors)) (export "Car.TIRES" (global $exports/Car.TIRES)) (export "Car.getNumTires" (func $exports/Car.getNumTires)) + (export "vehicles.Car" (global $exports/vehicles.Car)) (export "vehicles.Car#get:doors" (func $exports/Car#get:numDoors)) (export "vehicles.Car#set:doors" (func $exports/Car#set:numDoors)) (export "vehicles.Car#constructor" (func $exports/vehicles.Car#constructor|trampoline)) diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 31dc552fbe..e975a0c771 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -25,6 +25,8 @@ (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (global $~lib/argc (mut i32) (i32.const 0)) + (global $exports/Car i32 (i32.const 1)) + (global $exports/vehicles.Car i32 (i32.const 3)) (export "memory" (memory $0)) (export "table" (table $0)) (export "add" (func $exports/add)) @@ -35,6 +37,7 @@ (export "Animal.DOG" (global $exports/Animal.DOG)) (export "animals.Animal.CAT" (global $exports/animals.Animal.CAT)) (export "animals.Animal.DOG" (global $exports/animals.Animal.DOG)) + (export "Car" (global $exports/Car)) (export "Car#get:doors" (func $Car#get:doors)) (export "Car#set:doors" (func $Car#set:doors)) (export "Car#constructor" (func $exports/Car#constructor|trampoline)) @@ -43,6 +46,7 @@ (export "Car#openDoors" (func $exports/Car#openDoors)) (export "Car.TIRES" (global $exports/Car.TIRES)) (export "Car.getNumTires" (func $exports/Car.getNumTires)) + (export "vehicles.Car" (global $exports/vehicles.Car)) (export "vehicles.Car#get:doors" (func $vehicles.Car#get:doors)) (export "vehicles.Car#set:doors" (func $vehicles.Car#set:doors)) (export "vehicles.Car#constructor" (func $exports/vehicles.Car#constructor|trampoline)) diff --git a/tests/compiler/resolve-nested.optimized.wat b/tests/compiler/resolve-nested.optimized.wat index ba434f7178..9bf204a7de 100644 --- a/tests/compiler/resolve-nested.optimized.wat +++ b/tests/compiler/resolve-nested.optimized.wat @@ -6,8 +6,12 @@ (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) + (global $resolve-nested/Outer.InnerClass i32 (i32.const 1)) + (global $resolve-nested/Outer.Inner.EvenInnerClass i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export "Outer.InnerClass" (global $resolve-nested/Outer.InnerClass)) + (export "Outer.Inner.EvenInnerClass" (global $resolve-nested/Outer.Inner.EvenInnerClass)) (export "Outer.Inner.evenInner" (func $resolve-nested/Outer.Inner.evenInner)) (export "Outer.inner" (func $resolve-nested/Outer.inner)) (export "outer" (func $resolve-nested/outer)) diff --git a/tests/compiler/resolve-nested.untouched.wat b/tests/compiler/resolve-nested.untouched.wat index 9b79543a8e..00b7ed8302 100644 --- a/tests/compiler/resolve-nested.untouched.wat +++ b/tests/compiler/resolve-nested.untouched.wat @@ -21,8 +21,12 @@ (global $resolve-nested/b (mut i32) (i32.const 0)) (global $resolve-nested/c (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $resolve-nested/Outer.InnerClass i32 (i32.const 1)) + (global $resolve-nested/Outer.Inner.EvenInnerClass i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export "Outer.InnerClass" (global $resolve-nested/Outer.InnerClass)) + (export "Outer.Inner.EvenInnerClass" (global $resolve-nested/Outer.Inner.EvenInnerClass)) (export "Outer.Inner.evenInner" (func $resolve-nested/Outer.Inner.evenInner)) (export "Outer.inner" (func $resolve-nested/Outer.inner)) (export "outer" (func $resolve-nested/outer)) From 85f3fc54a7c6a5e69c6572866e1bbad8749f77d8 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 3 Apr 2019 21:47:38 +0200 Subject: [PATCH 091/119] runtime api --- src/builtins.ts | 2 +- src/common.ts | 4 +- src/compiler.ts | 14 +- src/program.ts | 8 +- std/assembly/array.ts | 12 +- std/assembly/runtime.ts | 54 +- std/assembly/string.ts | 12 +- std/assembly/util/runtime.ts | 11 + tests/compiler/call-super.optimized.wat | 4 +- tests/compiler/call-super.untouched.wat | 8 +- tests/compiler/constructor.optimized.wat | 4 +- tests/compiler/constructor.untouched.wat | 8 +- tests/compiler/exports.optimized.wat | 4 +- tests/compiler/exports.untouched.wat | 8 +- tests/compiler/gc.optimized.wat | 143 +++--- tests/compiler/gc.untouched.wat | 61 ++- tests/compiler/gc/global-assign.optimized.wat | 4 +- tests/compiler/gc/global-assign.untouched.wat | 8 +- tests/compiler/gc/global-init.optimized.wat | 4 +- tests/compiler/gc/global-init.untouched.wat | 8 +- tests/compiler/gc/itcm/trace.optimized.wat | 6 +- tests/compiler/gc/itcm/trace.untouched.wat | 14 +- .../gc/rc/global-assign.optimized.wat | 4 +- .../gc/rc/global-assign.untouched.wat | 8 +- .../compiler/gc/rc/global-init.optimized.wat | 4 +- .../compiler/gc/rc/global-init.untouched.wat | 8 +- tests/compiler/getter-call.optimized.wat | 4 +- tests/compiler/getter-call.untouched.wat | 8 +- tests/compiler/inlining.optimized.wat | 4 +- tests/compiler/inlining.untouched.wat | 8 +- tests/compiler/number.optimized.wat | 8 +- tests/compiler/number.untouched.wat | 12 +- .../optional-typeparameters.optimized.wat | 4 +- .../optional-typeparameters.untouched.wat | 8 +- .../compiler/runtime/instanceof.optimized.wat | 4 +- .../compiler/runtime/instanceof.untouched.wat | 8 +- .../compiler/std/array-literal.optimized.wat | 42 +- .../compiler/std/array-literal.untouched.wat | 34 +- tests/compiler/std/array.optimized.wat | 470 +++++++++--------- tests/compiler/std/array.untouched.wat | 464 +++++++++-------- tests/compiler/std/arraybuffer.optimized.wat | 8 +- tests/compiler/std/arraybuffer.untouched.wat | 22 +- tests/compiler/std/dataview.optimized.wat | 4 +- tests/compiler/std/dataview.untouched.wat | 8 +- tests/compiler/std/date.optimized.wat | 4 +- tests/compiler/std/date.untouched.wat | 8 +- tests/compiler/std/map.optimized.wat | 4 +- tests/compiler/std/map.untouched.wat | 8 +- tests/compiler/std/new.optimized.wat | 4 +- tests/compiler/std/new.untouched.wat | 8 +- .../compiler/std/object-literal.optimized.wat | 4 +- .../compiler/std/object-literal.untouched.wat | 8 +- .../std/operator-overloading.optimized.wat | 4 +- .../std/operator-overloading.untouched.wat | 8 +- tests/compiler/std/runtime.optimized.wat | 36 +- tests/compiler/std/runtime.ts | 13 +- tests/compiler/std/runtime.untouched.wat | 62 +-- tests/compiler/std/set.optimized.wat | 4 +- tests/compiler/std/set.untouched.wat | 8 +- tests/compiler/std/static-array.optimized.wat | 2 +- tests/compiler/std/static-array.untouched.wat | 8 +- tests/compiler/std/string-utf8.optimized.wat | 4 +- tests/compiler/std/string-utf8.untouched.wat | 8 +- tests/compiler/std/string.optimized.wat | 26 +- tests/compiler/std/string.untouched.wat | 44 +- tests/compiler/std/symbol.optimized.wat | 4 +- tests/compiler/std/symbol.untouched.wat | 8 +- tests/compiler/std/typedarray.optimized.wat | 84 ++-- tests/compiler/std/typedarray.untouched.wat | 74 ++- 69 files changed, 1012 insertions(+), 978 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index 227179bdda..b1b68204ce 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -483,7 +483,7 @@ export namespace BuiltinSymbols { export const runtime_reallocate = "~lib/runtime/runtime.reallocate"; export const runtime_register = "~lib/runtime/runtime.register"; export const runtime_discard = "~lib/runtime/runtime.discard"; - export const runtime_makeArray = "~lib/runtime/runtime.makeArray"; + export const runtime_newArray = "~lib/runtime/runtime.newArray"; // std/gc.ts export const gc_mark_roots = "~lib/gc/__gc_mark_roots"; diff --git a/src/common.ts b/src/common.ts index 8068571db8..80846fadd5 100644 --- a/src/common.ts +++ b/src/common.ts @@ -184,5 +184,7 @@ export namespace CommonSymbols { export const reallocate = "reallocate"; export const register = "register"; export const discard = "discard"; - export const makeArray = "makeArray"; + export const newString = "newString"; + export const newArrayBuffer = "newArrayBuffer"; + export const newArray = "newArray"; } diff --git a/src/compiler.ts b/src/compiler.ts index 90313d90d8..9ef2de2c8c 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -6944,13 +6944,13 @@ export class Compiler extends DiagnosticEmitter { // otherwise allocate a new array header and make it wrap a copy of the static buffer } else { - // makeArray(length, classId, alignLog2, staticBuffer) - let expr = this.makeCallDirect(assert(program.makeArrayInstance), [ + // newArray(length, alignLog2, classId, staticBuffer) + let expr = this.makeCallDirect(assert(program.newArrayInstance), [ module.createI32(length), - module.createI32(arrayInstance.ensureId()), program.options.isWasm64 ? module.createI64(elementType.alignLog2) : module.createI32(elementType.alignLog2), + module.createI32(arrayInstance.ensureId()), program.options.isWasm64 ? module.createI64(i64_low(bufferAddress), i64_high(bufferAddress)) : module.createI32(i64_low(bufferAddress)) @@ -6974,17 +6974,17 @@ export class Compiler extends DiagnosticEmitter { var flow = this.currentFlow; var tempThis = flow.getTempLocal(arrayType, false); var tempDataStart = flow.getTempLocal(arrayBufferInstance.type); - var makeArrayInstance = assert(program.makeArrayInstance); + var newArrayInstance = assert(program.newArrayInstance); var stmts = new Array(); - // tempThis = makeArray(length, classId, alignLog2, source = 0) + // tempThis = newArray(length, alignLog2, classId, source = 0) stmts.push( module.createSetLocal(tempThis.index, - this.makeCallDirect(makeArrayInstance, [ + this.makeCallDirect(newArrayInstance, [ module.createI32(length), - module.createI32(arrayInstance.ensureId()), program.options.isWasm64 ? module.createI64(elementType.alignLog2) : module.createI32(elementType.alignLog2), + module.createI32(arrayInstance.ensureId()), program.options.isWasm64 ? module.createI64(0) : module.createI32(0) diff --git a/src/program.ts b/src/program.ts index ab8da777d4..a3ba8f39ae 100644 --- a/src/program.ts +++ b/src/program.ts @@ -374,8 +374,8 @@ export class Program extends DiagnosticEmitter { discardInstance: Function | null = null; /** Runtime register function. `register(ref: usize, cid: u32): usize` */ registerInstance: Function | null = null; - /** Runtime make array function. `makeArray(capacity: i32, source: usize = 0, cid: u32): usize` */ - makeArrayInstance: Function | null = null; + /** Runtime make array function. `newArray(length: i32, alignLog2: usize, id: u32, source: usize = 0): usize` */ + newArrayInstance: Function | null = null; /** The kind of garbage collector being present. */ collectorKind: CollectorKind = CollectorKind.NONE; @@ -844,9 +844,9 @@ export class Program extends DiagnosticEmitter { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.registerInstance = this.resolver.resolveFunction(element, null); } - if (element = this.lookupGlobal(BuiltinSymbols.runtime_makeArray)) { + if (element = this.lookupGlobal(BuiltinSymbols.runtime_newArray)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); - this.makeArrayInstance = this.resolver.resolveFunction(element, null); + this.newArrayInstance = this.resolver.resolveFunction(element, null); } // memory allocator interface if (element = this.lookupGlobal("__mem_allocate")) { diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 71cf6bf724..47047e3afd 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -43,7 +43,7 @@ export class Array extends ArrayBufferView { static create(capacity: i32 = 0): Array { if (capacity > MAX_BYTELENGTH >>> alignof()) throw new RangeError(E_INVALIDLENGTH); - var array = changetype>(runtime.makeArray(capacity, __runtime_id>(), alignof())); + var array = changetype>(runtime.newArray(capacity, alignof(), __runtime_id>())); memory.fill(array.dataStart, 0, array.dataLength); array.length_ = 0; // ! return array; @@ -233,7 +233,7 @@ export class Array extends ArrayBufferView { concat(other: Array): Array { var thisLen = this.length_; var otherLen = select(0, other.length_, other === null); - var out = changetype>(runtime.makeArray(thisLen + otherLen, __runtime_id>(), alignof())); + var out = changetype>(runtime.newArray(thisLen + otherLen, alignof(), __runtime_id>())); var outStart = out.dataStart; var thisSize = thisLen << alignof(); if (isManaged()) { @@ -321,7 +321,7 @@ export class Array extends ArrayBufferView { map(callbackfn: (value: T, index: i32, array: Array) => U): Array { var length = this.length_; - var out = changetype>(runtime.makeArray(length, __runtime_id>(), alignof())); + var out = changetype>(runtime.newArray(length, alignof(), __runtime_id>())); var outStart = out.dataStart; for (let index = 0; index < min(length, this.length_); ++index) { let value = load(this.dataStart + (index << alignof())); @@ -347,7 +347,7 @@ export class Array extends ArrayBufferView { } filter(callbackfn: (value: T, index: i32, array: Array) => bool): Array { - var result = changetype>(runtime.makeArray(0, __runtime_id>(), alignof())); + var result = changetype>(runtime.newArray(0, alignof(), __runtime_id>())); for (let index = 0, length = this.length_; index < min(length, this.length_); ++index) { let value = load(this.dataStart + (index << alignof())); if (callbackfn(value, index, this)) result.push(value); @@ -435,7 +435,7 @@ export class Array extends ArrayBufferView { begin = begin < 0 ? max(begin + length, 0) : min(begin, length); end = end < 0 ? max(end + length, 0) : min(end , length); length = max(end - begin, 0); - var slice = changetype>(runtime.makeArray(length, __runtime_id>(), alignof())); + var slice = changetype>(runtime.newArray(length, alignof(), __runtime_id>())); var sliceBase = slice.dataStart; var thisBase = this.dataStart + (begin << alignof()); if (isManaged()) { @@ -467,7 +467,7 @@ export class Array extends ArrayBufferView { var length = this.length_; start = start < 0 ? max(length + start, 0) : min(start, length); deleteCount = max(min(deleteCount, length - start), 0); - var result = changetype>(runtime.makeArray(deleteCount, __runtime_id>(), alignof())); + var result = changetype>(runtime.newArray(deleteCount, alignof(), __runtime_id>())); var resultStart = result.dataStart; var thisStart = this.dataStart; var thisBase = thisStart + (start << alignof()); diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 09b3e8cf48..996ced3b2f 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -1,7 +1,7 @@ // The runtime provides common functionality that links runtime interfaces for memory management // and garbage collection to the standard library, making sure it all plays well together. -import { HEADER, HEADER_SIZE, HEADER_MAGIC } from "./util/runtime"; +import { HEADER, HEADER_SIZE, HEADER_MAGIC, adjust } from "./util/runtime"; import { HEAP_BASE, memory } from "./memory"; import { ArrayBufferView } from "./arraybuffer"; @@ -20,6 +20,7 @@ export declare function __runtime_instanceof(id: u32, superId: u32): bool; export class runtime { private constructor() { return unreachable(); } + /** Determines whether a managed object is considered to be an instance of the class represented by the specified runtime id. */ @unsafe static instanceof(ref: usize, id: u32): bool { // keyword return ref @@ -34,17 +35,7 @@ export class runtime { /** Runtime implementation. */ export namespace runtime { - /** Adjusts an allocation to actual block size. Primarily targets TLSF. */ - export function adjust(payloadSize: usize): usize { - // round up to power of 2, e.g. with HEADER_SIZE=8: - // 0 -> 2^3 = 8 - // 1..8 -> 2^4 = 16 - // 9..24 -> 2^5 = 32 - // ... - // MAX_LENGTH -> 2^30 = 0x40000000 (MAX_SIZE_32) - return 1 << (32 - clz(payloadSize + HEADER_SIZE - 1)); - } - + /** Allocates the memory necessary to represent a managed object of the specified size. */ // @ts-ignore: decorator @unsafe export function allocate(payloadSize: usize): usize { @@ -58,6 +49,7 @@ export namespace runtime { return changetype(header) + HEADER_SIZE; } + /** Reallocates the memory of a managed object that turned out to be too small or too large. */ // @ts-ignore: decorator @unsafe export function reallocate(ref: usize, newPayloadSize: usize): usize { @@ -103,6 +95,7 @@ export namespace runtime { return ref; } + /** Discards the memory of a managed object that hasn't been registered yet. */ // @ts-ignore: decorator @unsafe export function discard(ref: usize): void { @@ -116,32 +109,53 @@ export namespace runtime { } } + /** Registers a managed object of the kind represented by the specified runtime id. */ // @ts-ignore: decorator @unsafe - export function register(ref: usize, classId: u32): usize { + export function register(ref: usize, id: u32): usize { if (!ASC_NO_ASSERT) { assert(ref > HEAP_BASE); // must be a heap object let header = changetype
(ref - HEADER_SIZE); assert(header.classId == HEADER_MAGIC); - header.classId = classId; + header.classId = id; } else { - changetype
(ref - HEADER_SIZE).classId = classId; + changetype
(ref - HEADER_SIZE).classId = id; } if (isDefined(__ref_register)) __ref_register(ref); return ref; } + /** Allocates and registers, but doesn't initialize the data of, a new `String` of the specified length. */ + // @ts-ignore: decorator + @unsafe + export function newString(length: i32): usize { + return runtime.register(runtime.allocate(length << 1), __runtime_id()); + } + + /** Allocates and registers, but doesn't initialize the data of, a new `ArrayBuffer` of the specified byteLength. */ + // @ts-ignore: decorator + @unsafe + export function newArrayBuffer(byteLength: i32): usize { + return runtime.register(runtime.allocate(byteLength), __runtime_id()); + } + + /** Allocates and registers, but doesn't initialize the data of, a new `Array` of the specified length and element alignment.*/ // @ts-ignore: decorator @unsafe - export function makeArray(capacity: i32, id: u32, alignLog2: usize, source: usize = 0): usize { + export function newArray(length: i32, alignLog2: usize, id: u32, data: usize = 0): usize { + // TODO: This API isn't great, but the compiler requires it for array literals anyway, + // that is when an array literal is encountered and its data is static, this function is + // called and the static buffer provided as `data`. This function can also be used to + // create typed arrays in that `Array` also implements `ArrayBufferView` but has an + // additional `.length_` property that remains unused overhead for typed arrays. var array = runtime.register(runtime.allocate(offsetof()), id); - var bufferSize = capacity << alignLog2; - var buffer = runtime.register(runtime.allocate(capacity << alignLog2), __runtime_id()); + var bufferSize = length << alignLog2; + var buffer = runtime.register(runtime.allocate(bufferSize), __runtime_id()); changetype(array).data = changetype(buffer); // links changetype(array).dataStart = buffer; changetype(array).dataLength = bufferSize; - store(changetype(array), capacity, offsetof("length_")); - if (source) memory.copy(buffer, source, bufferSize); + store(changetype(array), length, offsetof("length_")); + if (data) memory.copy(buffer, data, bufferSize); return array; } } diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 6d02e9cb16..0e836f775b 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -356,16 +356,16 @@ import { ArrayBufferView } from "./arraybuffer"; split(separator: String | null = null, limit: i32 = i32.MAX_VALUE): String[] { assert(this !== null); - if (!limit) return changetype(runtime.makeArray(0, __runtime_id(), alignof())); + if (!limit) return changetype(runtime.newArray(0, alignof(), __runtime_id())); if (separator === null) return [this]; var length: isize = this.length; var sepLen: isize = separator.length; if (limit < 0) limit = i32.MAX_VALUE; if (!sepLen) { - if (!length) return changetype(runtime.makeArray(0, __runtime_id(), alignof())); + if (!length) return changetype(runtime.newArray(0, alignof(), __runtime_id())); // split by chars length = min(length, limit); - let result = changetype(runtime.makeArray(length, __runtime_id(), alignof())); + let result = changetype(runtime.newArray(length, alignof(), __runtime_id())); let resultStart = changetype(result).dataStart; for (let i: isize = 0; i < length; ++i) { let charStr = runtime.allocate(2); @@ -379,11 +379,11 @@ import { ArrayBufferView } from "./arraybuffer"; } return result; } else if (!length) { - let result = changetype(runtime.makeArray(1, __runtime_id(), alignof())); + let result = changetype(runtime.newArray(1, alignof(), __runtime_id())); store(changetype(result).dataStart, ""); // no need to register/link return result; } - var result = changetype(runtime.makeArray(0, __runtime_id(), alignof())); + var result = changetype(runtime.newArray(0, alignof(), __runtime_id())); var end = 0, start = 0, i = 0; while ((end = this.indexOf(separator!, start)) != -1) { let len = end - start; @@ -398,7 +398,7 @@ import { ArrayBufferView } from "./arraybuffer"; start = end + sepLen; } if (!start) { - let result = changetype(runtime.makeArray(1, __runtime_id(), alignof())); + let result = changetype(runtime.newArray(1, alignof(), __runtime_id())); unchecked(result[0] = this); return result; } diff --git a/std/assembly/util/runtime.ts b/std/assembly/util/runtime.ts index c1307da415..8b98895d1c 100644 --- a/std/assembly/util/runtime.ts +++ b/std/assembly/util/runtime.ts @@ -34,3 +34,14 @@ export const HEADER_MAGIC: u32 = 0xA55E4B17; // @ts-ignore @lazy export const MAX_BYTELENGTH: i32 = MAX_SIZE_32 - HEADER_SIZE; + +/** Adjusts an allocation to actual block size. Primarily targets TLSF. */ +export function adjust(payloadSize: usize): usize { + // round up to power of 2, e.g. with HEADER_SIZE=8: + // 0 -> 2^3 = 8 + // 1..8 -> 2^4 = 16 + // 9..24 -> 2^5 = 32 + // ... + // MAX_LENGTH -> 2^30 = 0x40000000 (MAX_SIZE_32) + return 1 << (32 - clz(payloadSize + HEADER_SIZE - 1)); +} diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index d681e6e2c2..c23bee8665 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -106,7 +106,7 @@ if i32.const 0 i32.const 16 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -121,7 +121,7 @@ if i32.const 0 i32.const 16 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index b7f7c1cff6..158fa3bb08 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -18,7 +18,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -117,7 +117,7 @@ (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -139,7 +139,7 @@ if i32.const 0 i32.const 16 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -156,7 +156,7 @@ if i32.const 0 i32.const 16 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index 1aa1c7c2fa..cd28ee7b6b 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -1283,7 +1283,7 @@ if i32.const 0 i32.const 88 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -1298,7 +1298,7 @@ if i32.const 0 i32.const 88 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index 3a430f2554..2fc23bfa82 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -55,7 +55,7 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -1435,7 +1435,7 @@ (func $~lib/runtime/runtime.allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -1563,7 +1563,7 @@ if i32.const 0 i32.const 88 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -1580,7 +1580,7 @@ if i32.const 0 i32.const 88 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index 4bb693c91f..97d6ada495 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -150,7 +150,7 @@ if i32.const 0 i32.const 16 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -165,7 +165,7 @@ if i32.const 0 i32.const 16 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index e975a0c771..4e9fdb95ea 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -75,7 +75,7 @@ (func $exports/Car.getNumTires (; 4 ;) (type $FUNCSIG$i) (result i32) global.get $exports/Car.TIRES ) - (func $~lib/runtime/runtime.adjust (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -174,7 +174,7 @@ (func $~lib/runtime/runtime.allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -196,7 +196,7 @@ if i32.const 0 i32.const 16 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -213,7 +213,7 @@ if i32.const 0 i32.const 16 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc.optimized.wat b/tests/compiler/gc.optimized.wat index 2f24750881..e3ab7c4f10 100644 --- a/tests/compiler/gc.optimized.wat +++ b/tests/compiler/gc.optimized.wat @@ -49,29 +49,20 @@ (export "table" (table $0)) (export "main" (func $gc/main)) (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "runtime.adjust" (func $~lib/runtime/runtime.adjust)) (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) (export "runtime.reallocate" (func $~lib/runtime/runtime.reallocate)) (export "runtime.discard" (func $~lib/runtime/runtime.discard)) (export "runtime.register" (func $~lib/runtime/runtime.register)) + (export "runtime.newString" (func $~lib/runtime/runtime.newString)) + (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) (export ".setargc" (func $~lib/setargc)) - (export "runtime.makeArray" (func $~lib/runtime/runtime.makeArray|trampoline)) + (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) (export "gc.implemented" (global $~lib/gc/gc.implemented)) (export "gc.collect" (func $~lib/gc/gc.collect)) (export "gc.retain" (func $~lib/gc/gc.retain)) (export "gc.release" (func $~lib/gc/gc.release)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 15 - i32.add - i32.clz - i32.sub - i32.shl - ) - (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -133,7 +124,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -160,7 +151,7 @@ i32.const 16 i32.add ) - (func $gc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 72 i32.const 1 local.get $0 @@ -177,7 +168,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 292 @@ -185,7 +176,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -200,7 +191,7 @@ if i32.const 0 i32.const 24 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -212,7 +203,7 @@ call $gc/_dummy/__ref_register local.get $0 ) - (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -423,7 +414,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -445,7 +436,7 @@ i32.const 4 call $~lib/runtime/runtime.register ) - (func $gc/_dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $gc/_dummy/__ref_link (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 200 i32.const 2 local.get $0 @@ -465,7 +456,7 @@ local.get $0 global.set $gc/_dummy/link_parentRef ) - (func $gc/_dummy/__ref_unlink (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $gc/_dummy/__ref_unlink (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 232 i32.const 2 local.get $0 @@ -485,7 +476,7 @@ local.get $1 global.set $gc/_dummy/unlink_parentRef ) - (func $~lib/set/Set#clear (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -548,7 +539,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 12 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 call $~lib/runtime/runtime.allocate @@ -576,7 +567,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -607,7 +598,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -650,7 +641,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -659,7 +650,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -794,7 +785,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -877,7 +868,7 @@ i32.store end ) - (func $~lib/gc/gc.retain (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/gc/gc.retain (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) global.get $~lib/gc/ROOT local.tee $1 @@ -893,7 +884,7 @@ call $gc/_dummy/__ref_link end ) - (func $~lib/set/Set#delete (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -953,7 +944,7 @@ call $~lib/set/Set#rehash end ) - (func $~lib/gc/gc.release (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/gc/gc.release (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) global.get $~lib/gc/ROOT local.tee $1 @@ -968,7 +959,7 @@ call $gc/_dummy/__ref_unlink end ) - (func $~lib/gc/gc.collect (; 21 ;) (type $FUNCSIG$v) + (func $~lib/gc/gc.collect (; 20 ;) (type $FUNCSIG$v) i32.const 272 i32.const 0 f64.const 0 @@ -982,7 +973,7 @@ i32.add global.set $gc/_dummy/collect_count ) - (func $gc/main (; 22 ;) (type $FUNCSIG$v) + (func $gc/main (; 21 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1133,7 +1124,7 @@ unreachable end ) - (func $~lib/runtime/runtime.instanceof (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.instanceof (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -1146,7 +1137,7 @@ i32.const 0 end ) - (func $~lib/util/memory/memcpy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1993,7 +1984,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2187,7 +2178,7 @@ end end ) - (func $~lib/runtime/runtime.reallocate (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.reallocate (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2264,7 +2255,7 @@ if i32.const 0 i32.const 24 - i32.const 85 + i32.const 77 i32.const 10 call $~lib/env/abort unreachable @@ -2292,14 +2283,14 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/runtime.discard (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 292 i32.le_u if i32.const 0 i32.const 24 - i32.const 110 + i32.const 103 i32.const 6 call $~lib/env/abort unreachable @@ -2313,69 +2304,83 @@ if i32.const 0 i32.const 24 - i32.const 112 + i32.const 105 i32.const 6 call $~lib/env/abort unreachable end ) - (func $~lib/runtime/runtime.makeArray (; 28 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newString (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/runtime.allocate + i32.const 4 + call $~lib/runtime/runtime.register + ) + (func $~lib/runtime/runtime.newArray (; 29 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) i32.const 16 call $~lib/runtime/runtime.allocate - local.get $1 + local.get $2 call $~lib/runtime/runtime.register - local.tee $4 - local.set $5 + local.tee $2 + local.set $4 local.get $0 - local.get $2 + local.get $1 i32.shl - local.tee $6 + local.tee $5 call $~lib/runtime/runtime.allocate i32.const 4 call $~lib/runtime/runtime.register - local.tee $7 + local.tee $6 local.tee $1 - local.get $4 + local.get $2 i32.load - local.tee $2 + local.tee $7 i32.ne if - local.get $2 + local.get $7 if - local.get $2 - local.get $5 + local.get $7 + local.get $4 call $gc/_dummy/__ref_unlink end local.get $1 - local.get $5 + local.get $4 call $gc/_dummy/__ref_link end - local.get $4 + local.get $2 local.get $1 i32.store - local.get $4 - local.get $7 - i32.store offset=4 - local.get $4 + local.get $2 local.get $6 + i32.store offset=4 + local.get $2 + local.get $5 i32.store offset=8 - local.get $4 + local.get $2 local.get $0 i32.store offset=12 local.get $3 if - local.get $7 - local.get $3 local.get $6 + local.get $3 + local.get $5 call $~lib/memory/memory.copy end - local.get $4 + local.get $2 ) - (func $~lib/runtime/__runtime_instanceof (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/__runtime_instanceof (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $nope block $~lib/arraybuffer/ArrayBuffer block $~lib/set/Set @@ -2408,10 +2413,10 @@ end i32.const 0 ) - (func $null (; 30 ;) (type $FUNCSIG$v) + (func $null (; 31 ;) (type $FUNCSIG$v) nop ) - (func $~lib/runtime/runtime.makeArray|trampoline (; 31 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray|trampoline (; 32 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2429,9 +2434,9 @@ local.get $1 local.get $2 local.get $3 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray ) - (func $~lib/setargc (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) diff --git a/tests/compiler/gc.untouched.wat b/tests/compiler/gc.untouched.wat index e3cff7fc59..8ce0dac722 100644 --- a/tests/compiler/gc.untouched.wat +++ b/tests/compiler/gc.untouched.wat @@ -48,19 +48,20 @@ (export "table" (table $0)) (export "main" (func $gc/main)) (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "runtime.adjust" (func $~lib/runtime/runtime.adjust)) (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) (export "runtime.reallocate" (func $~lib/runtime/runtime.reallocate)) (export "runtime.discard" (func $~lib/runtime/runtime.discard)) (export "runtime.register" (func $~lib/runtime/runtime.register)) + (export "runtime.newString" (func $~lib/runtime/runtime.newString)) + (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) (export ".setargc" (func $~lib/setargc)) - (export "runtime.makeArray" (func $~lib/runtime/runtime.makeArray|trampoline)) + (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) (export "gc.implemented" (global $~lib/gc/gc.implemented)) (export "gc.collect" (func $~lib/gc/gc.collect)) (export "gc.retain" (func $~lib/gc/gc.retain)) (export "gc.release" (func $~lib/gc/gc.release)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -159,7 +160,7 @@ (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -204,7 +205,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -221,7 +222,7 @@ if i32.const 0 i32.const 24 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -2802,10 +2803,10 @@ i32.lt_u if local.get $1 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust local.set $4 local.get $3 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust i32.const 0 local.get $0 global.get $~lib/memory/HEAP_BASE @@ -2855,7 +2856,7 @@ if i32.const 0 i32.const 24 - i32.const 85 + i32.const 77 i32.const 10 call $~lib/env/abort unreachable @@ -2897,7 +2898,7 @@ if i32.const 0 i32.const 24 - i32.const 110 + i32.const 103 i32.const 6 call $~lib/env/abort unreachable @@ -2914,7 +2915,7 @@ if i32.const 0 i32.const 24 - i32.const 112 + i32.const 105 i32.const 6 call $~lib/env/abort unreachable @@ -2922,7 +2923,21 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/runtime/runtime.makeArray (; 33 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newString (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/runtime.allocate + i32.const 4 + call $~lib/runtime/runtime.register + ) + (func $~lib/runtime/runtime.newArray (; 35 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2931,16 +2946,14 @@ (local $9 i32) i32.const 16 call $~lib/runtime/runtime.allocate - local.get $1 + local.get $2 call $~lib/runtime/runtime.register local.set $4 local.get $0 - local.get $2 + local.get $1 i32.shl local.set $5 - local.get $0 - local.get $2 - i32.shl + local.get $5 call $~lib/runtime/runtime.allocate i32.const 4 call $~lib/runtime/runtime.register @@ -2986,10 +2999,10 @@ end local.get $4 ) - (func $~lib/runtime/runtime#constructor (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime#constructor (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) unreachable ) - (func $start (; 35 ;) (type $FUNCSIG$v) + (func $start (; 37 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -3004,7 +3017,7 @@ call $~lib/set/Set#constructor global.set $~lib/gc/ROOT ) - (func $~lib/runtime/__runtime_instanceof (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/__runtime_instanceof (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $nope block $~lib/arraybuffer/ArrayBuffer block $~lib/set/Set @@ -3036,9 +3049,9 @@ i32.const 0 return ) - (func $null (; 37 ;) (type $FUNCSIG$v) + (func $null (; 39 ;) (type $FUNCSIG$v) ) - (func $~lib/runtime/runtime.makeArray|trampoline (; 38 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray|trampoline (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -3056,9 +3069,9 @@ local.get $1 local.get $2 local.get $3 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray ) - (func $~lib/setargc (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) diff --git a/tests/compiler/gc/global-assign.optimized.wat b/tests/compiler/gc/global-assign.optimized.wat index a94da9a941..1a400cab15 100644 --- a/tests/compiler/gc/global-assign.optimized.wat +++ b/tests/compiler/gc/global-assign.optimized.wat @@ -137,7 +137,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -152,7 +152,7 @@ if i32.const 0 i32.const 24 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-assign.untouched.wat b/tests/compiler/gc/global-assign.untouched.wat index 8440abb0df..4500c3b9eb 100644 --- a/tests/compiler/gc/global-assign.untouched.wat +++ b/tests/compiler/gc/global-assign.untouched.wat @@ -38,7 +38,7 @@ (export "table" (table $0)) (export "main" (func $gc/global-assign/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -137,7 +137,7 @@ (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -182,7 +182,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -199,7 +199,7 @@ if i32.const 0 i32.const 24 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-init.optimized.wat b/tests/compiler/gc/global-init.optimized.wat index ffe8da48e0..c4844bf693 100644 --- a/tests/compiler/gc/global-init.optimized.wat +++ b/tests/compiler/gc/global-init.optimized.wat @@ -136,7 +136,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -151,7 +151,7 @@ if i32.const 0 i32.const 24 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-init.untouched.wat b/tests/compiler/gc/global-init.untouched.wat index bf5fa6c057..d23c9b565f 100644 --- a/tests/compiler/gc/global-init.untouched.wat +++ b/tests/compiler/gc/global-init.untouched.wat @@ -37,7 +37,7 @@ (export "table" (table $0)) (export "main" (func $gc/global-init/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -136,7 +136,7 @@ (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -181,7 +181,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -198,7 +198,7 @@ if i32.const 0 i32.const 24 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/itcm/trace.optimized.wat b/tests/compiler/gc/itcm/trace.optimized.wat index c8208fe60d..b758331a66 100644 --- a/tests/compiler/gc/itcm/trace.optimized.wat +++ b/tests/compiler/gc/itcm/trace.optimized.wat @@ -341,7 +341,7 @@ if i32.const 0 i32.const 128 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -356,7 +356,7 @@ if i32.const 0 i32.const 128 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -1859,7 +1859,7 @@ if i32.const 0 i32.const 128 - i32.const 85 + i32.const 77 i32.const 10 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/itcm/trace.untouched.wat b/tests/compiler/gc/itcm/trace.untouched.wat index 8cdb20ef36..2db214ef2f 100644 --- a/tests/compiler/gc/itcm/trace.untouched.wat +++ b/tests/compiler/gc/itcm/trace.untouched.wat @@ -61,7 +61,7 @@ (export "table" (table $0)) (export "main" (func $gc/itcm/trace/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -160,7 +160,7 @@ (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -390,7 +390,7 @@ if i32.const 0 i32.const 128 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -407,7 +407,7 @@ if i32.const 0 i32.const 128 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -2413,10 +2413,10 @@ i32.lt_u if local.get $1 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust local.set $4 local.get $3 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust i32.const 0 local.get $0 global.get $~lib/memory/HEAP_BASE @@ -2466,7 +2466,7 @@ if i32.const 0 i32.const 128 - i32.const 85 + i32.const 77 i32.const 10 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-assign.optimized.wat b/tests/compiler/gc/rc/global-assign.optimized.wat index 22353b4743..08203d35df 100644 --- a/tests/compiler/gc/rc/global-assign.optimized.wat +++ b/tests/compiler/gc/rc/global-assign.optimized.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 24 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-assign.untouched.wat b/tests/compiler/gc/rc/global-assign.untouched.wat index 960f9e088e..68508f9d9c 100644 --- a/tests/compiler/gc/rc/global-assign.untouched.wat +++ b/tests/compiler/gc/rc/global-assign.untouched.wat @@ -36,7 +36,7 @@ (export "table" (table $0)) (export "main" (func $gc/rc/global-assign/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -135,7 +135,7 @@ (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -180,7 +180,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -197,7 +197,7 @@ if i32.const 0 i32.const 24 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-init.optimized.wat b/tests/compiler/gc/rc/global-init.optimized.wat index f522db6f11..e22837006d 100644 --- a/tests/compiler/gc/rc/global-init.optimized.wat +++ b/tests/compiler/gc/rc/global-init.optimized.wat @@ -139,7 +139,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -154,7 +154,7 @@ if i32.const 0 i32.const 24 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-init.untouched.wat b/tests/compiler/gc/rc/global-init.untouched.wat index 2215cd0f9a..d960f976bf 100644 --- a/tests/compiler/gc/rc/global-init.untouched.wat +++ b/tests/compiler/gc/rc/global-init.untouched.wat @@ -34,7 +34,7 @@ (export "table" (table $0)) (export "main" (func $gc/rc/global-init/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -133,7 +133,7 @@ (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -178,7 +178,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -195,7 +195,7 @@ if i32.const 0 i32.const 24 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 56b9ede9dc..da6cab353f 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -85,7 +85,7 @@ if i32.const 0 i32.const 16 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index d56f743a35..cccd911f77 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -20,7 +20,7 @@ (export "table" (table $0)) (export "test" (func $getter-call/test)) (start $start) - (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -119,7 +119,7 @@ (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -141,7 +141,7 @@ if i32.const 0 i32.const 16 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index b3a3e14cd1..ca0bc71679 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 48 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -146,7 +146,7 @@ if i32.const 0 i32.const 48 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 1803bad4e1..22a9c23649 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -284,7 +284,7 @@ unreachable end ) - (func $~lib/runtime/runtime.adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -383,7 +383,7 @@ (func $~lib/runtime/runtime.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -405,7 +405,7 @@ if i32.const 0 i32.const 48 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -422,7 +422,7 @@ if i32.const 0 i32.const 48 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 6da86e17c1..fc6baa0747 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -303,7 +303,7 @@ if i32.const 0 i32.const 464 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -318,7 +318,7 @@ if i32.const 0 i32.const 464 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -2451,7 +2451,7 @@ if i32.const 0 i32.const 464 - i32.const 110 + i32.const 103 i32.const 6 call $~lib/env/abort unreachable @@ -2465,7 +2465,7 @@ if i32.const 0 i32.const 464 - i32.const 112 + i32.const 105 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 058ac0ff27..258c73fa96 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -135,7 +135,7 @@ unreachable unreachable ) - (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -234,7 +234,7 @@ (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -399,7 +399,7 @@ if i32.const 0 i32.const 464 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -416,7 +416,7 @@ if i32.const 0 i32.const 464 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -3534,7 +3534,7 @@ if i32.const 0 i32.const 464 - i32.const 110 + i32.const 103 i32.const 6 call $~lib/env/abort unreachable @@ -3551,7 +3551,7 @@ if i32.const 0 i32.const 464 - i32.const 112 + i32.const 105 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 3a7909e29e..428e2993a0 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -115,7 +115,7 @@ if i32.const 0 i32.const 16 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index 1ca1bb2b54..f795649458 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -27,7 +27,7 @@ (func $optional-typeparameters/testDerived (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 ) - (func $~lib/runtime/runtime.adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -126,7 +126,7 @@ (func $~lib/runtime/runtime.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -148,7 +148,7 @@ if i32.const 0 i32.const 16 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -165,7 +165,7 @@ if i32.const 0 i32.const 16 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/runtime/instanceof.optimized.wat b/tests/compiler/runtime/instanceof.optimized.wat index 138d08b858..4a8c606628 100644 --- a/tests/compiler/runtime/instanceof.optimized.wat +++ b/tests/compiler/runtime/instanceof.optimized.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 88 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 88 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/runtime/instanceof.untouched.wat b/tests/compiler/runtime/instanceof.untouched.wat index d0f4fbdb7a..f88df69709 100644 --- a/tests/compiler/runtime/instanceof.untouched.wat +++ b/tests/compiler/runtime/instanceof.untouched.wat @@ -45,7 +45,7 @@ (export "table" (table $0)) (export "main" (func $runtime/instanceof/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -144,7 +144,7 @@ (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -189,7 +189,7 @@ if i32.const 0 i32.const 88 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -206,7 +206,7 @@ if i32.const 0 i32.const 88 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index c2acc830a0..d63addae62 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -177,7 +177,7 @@ if i32.const 0 i32.const 296 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -192,7 +192,7 @@ if i32.const 0 i32.const 296 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -202,40 +202,40 @@ i32.store local.get $0 ) - (func $~lib/runtime/runtime.makeArray (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 16 call $~lib/runtime/runtime.allocate - local.get $0 + local.get $1 call $~lib/runtime/runtime.register - local.set $0 + local.set $1 i32.const 3 - local.get $1 + local.get $0 i32.shl - local.tee $1 + local.tee $0 call $~lib/runtime/runtime.allocate i32.const 1 call $~lib/runtime/runtime.register local.tee $2 local.tee $3 - local.get $0 + local.get $1 i32.load i32.ne drop - local.get $0 + local.get $1 local.get $3 i32.store - local.get $0 + local.get $1 local.get $2 i32.store offset=4 - local.get $0 local.get $1 - i32.store offset=8 local.get $0 + i32.store offset=8 + local.get $1 i32.const 3 i32.store offset=12 - local.get $0 + local.get $1 ) (func $std/array-literal/Ref#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) i32.const 0 @@ -365,9 +365,9 @@ global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - i32.const 2 i32.const 0 - call $~lib/runtime/runtime.makeArray + i32.const 2 + call $~lib/runtime/runtime.newArray local.tee $2 i32.load offset=4 local.tee $0 @@ -443,9 +443,9 @@ end i32.const 0 global.set $std/array-literal/i - i32.const 4 i32.const 2 - call $~lib/runtime/runtime.makeArray + i32.const 4 + call $~lib/runtime/runtime.newArray local.tee $2 i32.load offset=4 local.tee $0 @@ -519,9 +519,9 @@ call $~lib/env/abort unreachable end - i32.const 6 i32.const 2 - call $~lib/runtime/runtime.makeArray + i32.const 6 + call $~lib/runtime/runtime.newArray local.tee $2 i32.load offset=4 local.tee $0 @@ -547,9 +547,9 @@ call $~lib/env/abort unreachable end - i32.const 8 i32.const 2 - call $~lib/runtime/runtime.makeArray + i32.const 8 + call $~lib/runtime/runtime.newArray local.tee $2 i32.load offset=4 local.tee $0 diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 37e040cf0f..192f819e3e 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -103,7 +103,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/runtime/runtime.adjust (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -202,7 +202,7 @@ (func $~lib/runtime/runtime.allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -233,7 +233,7 @@ if i32.const 0 i32.const 296 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -250,7 +250,7 @@ if i32.const 0 i32.const 296 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -1700,7 +1700,7 @@ end end ) - (func $~lib/runtime/runtime.makeArray (; 17 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 17 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1709,16 +1709,14 @@ (local $9 i32) i32.const 16 call $~lib/runtime/runtime.allocate - local.get $1 + local.get $2 call $~lib/runtime/runtime.register local.set $4 local.get $0 - local.get $2 + local.get $1 i32.shl local.set $5 - local.get $0 - local.get $2 - i32.shl + local.get $5 call $~lib/runtime/runtime.allocate i32.const 1 call $~lib/runtime/runtime.register @@ -1935,10 +1933,10 @@ global.set $~lib/allocator/arena/offset block (result i32) i32.const 3 - i32.const 2 i32.const 0 + i32.const 2 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $0 local.get $0 i32.load offset=4 @@ -2028,10 +2026,10 @@ global.set $std/array-literal/i block (result i32) i32.const 3 - i32.const 4 i32.const 2 + i32.const 4 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $1 local.get $1 i32.load offset=4 @@ -2119,10 +2117,10 @@ end block (result i32) i32.const 3 - i32.const 6 i32.const 2 + i32.const 6 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $0 local.get $0 i32.load offset=4 @@ -2178,10 +2176,10 @@ end block (result i32) i32.const 3 - i32.const 8 i32.const 2 + i32.const 8 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $1 local.get $1 i32.load offset=4 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 6ce4211e1d..aca7f14ffe 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -787,7 +787,7 @@ if i32.const 0 i32.const 80 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -802,7 +802,7 @@ if i32.const 0 i32.const 80 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -2010,46 +2010,46 @@ end end ) - (func $~lib/runtime/runtime.makeArray (; 12 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 12 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) i32.const 16 call $~lib/runtime/runtime.allocate - local.get $1 + local.get $2 call $~lib/runtime/runtime.register - local.set $1 + local.set $2 local.get $0 - local.get $2 + local.get $1 i32.shl local.tee $4 call $~lib/runtime/runtime.allocate i32.const 2 call $~lib/runtime/runtime.register - local.tee $2 + local.tee $1 local.set $5 - local.get $1 + local.get $2 i32.load drop - local.get $1 + local.get $2 local.get $5 i32.store - local.get $1 local.get $2 - i32.store offset=4 local.get $1 + i32.store offset=4 + local.get $2 local.get $4 i32.store offset=8 - local.get $1 + local.get $2 local.get $0 i32.store offset=12 local.get $3 if - local.get $2 + local.get $1 local.get $3 local.get $4 call $~lib/memory/memory.copy end - local.get $1 + local.get $2 ) (func $~lib/array/Array#__get (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -2340,7 +2340,7 @@ if i32.const 0 i32.const 80 - i32.const 85 + i32.const 77 i32.const 10 call $~lib/env/abort unreachable @@ -2485,10 +2485,10 @@ select local.tee $3 i32.add - i32.const 4 i32.const 2 + i32.const 4 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.tee $4 i32.load offset=4 local.tee $5 @@ -2912,10 +2912,10 @@ i32.gt_s select local.tee $2 - i32.const 4 i32.const 2 + i32.const 4 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.tee $4 i32.load offset=4 drop @@ -3403,10 +3403,10 @@ local.get $0 i32.load offset=12 local.tee $3 - i32.const 9 i32.const 2 + i32.const 9 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.tee $4 i32.load offset=4 local.set $5 @@ -3493,10 +3493,10 @@ local.get $0 i32.load offset=12 local.tee $4 - i32.const 4 i32.const 2 + i32.const 4 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.load offset=4 local.set $5 loop $repeat|0 @@ -3567,10 +3567,10 @@ (local $4 i32) (local $5 i32) i32.const 0 - i32.const 4 i32.const 2 + i32.const 4 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $4 local.get $0 i32.load offset=12 @@ -5322,10 +5322,10 @@ unreachable end local.get $0 - i32.const 4 i32.const 2 + i32.const 4 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.tee $0 i32.load offset=4 i32.const 0 @@ -5513,10 +5513,10 @@ (func $~lib/array/Array.create<~lib/array/Array> (; 99 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 512 - i32.const 11 i32.const 2 + i32.const 11 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.tee $0 i32.load offset=4 i32.const 0 @@ -5773,10 +5773,10 @@ (func $~lib/array/Array.create> (; 107 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 512 - i32.const 12 i32.const 2 + i32.const 12 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.tee $0 i32.load offset=4 i32.const 0 @@ -6063,10 +6063,10 @@ (func $~lib/array/Array.create<~lib/string/String> (; 115 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 400 - i32.const 15 i32.const 2 + i32.const 15 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.tee $0 i32.load offset=4 i32.const 0 @@ -6323,7 +6323,7 @@ if i32.const 0 i32.const 80 - i32.const 110 + i32.const 103 i32.const 6 call $~lib/env/abort unreachable @@ -6337,7 +6337,7 @@ if i32.const 0 i32.const 80 - i32.const 112 + i32.const 105 i32.const 6 call $~lib/env/abort unreachable @@ -10030,10 +10030,10 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 7 i32.const 0 + i32.const 7 i32.const 248 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/array/isArraysEqual i32.eqz if @@ -10051,10 +10051,10 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 7 i32.const 0 + i32.const 7 i32.const 320 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/array/isArraysEqual i32.eqz if @@ -10072,10 +10072,10 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 7 i32.const 0 + i32.const 7 i32.const 344 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/array/isArraysEqual i32.eqz if @@ -10093,10 +10093,10 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 7 i32.const 0 + i32.const 7 i32.const 368 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/array/isArraysEqual i32.eqz if @@ -10114,10 +10114,10 @@ call $~lib/array/Array#fill global.get $std/array/arr8 i32.const 5 - i32.const 7 i32.const 0 + i32.const 7 i32.const 392 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/array/isArraysEqual i32.eqz if @@ -10135,10 +10135,10 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 8 i32.const 2 + i32.const 8 i32.const 488 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10157,10 +10157,10 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 8 i32.const 2 + i32.const 8 i32.const 528 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10179,10 +10179,10 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 8 i32.const 2 + i32.const 8 i32.const 568 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10201,10 +10201,10 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 8 i32.const 2 + i32.const 8 i32.const 608 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10223,10 +10223,10 @@ call $~lib/array/Array#fill global.get $std/array/arr32 i32.const 5 - i32.const 8 i32.const 2 + i32.const 8 i32.const 648 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10572,10 +10572,10 @@ end global.get $std/array/out i32.const 0 - i32.const 4 i32.const 2 + i32.const 4 i32.const 688 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $~lib/array/Array#concat drop global.get $std/array/arr @@ -10831,10 +10831,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 752 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -10842,10 +10842,10 @@ i32.const 2147483647 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 792 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10858,10 +10858,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 832 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -10869,10 +10869,10 @@ i32.const 2147483647 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 872 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10885,10 +10885,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 912 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -10896,10 +10896,10 @@ i32.const 2147483647 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 952 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10912,10 +10912,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 992 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 2 @@ -10923,10 +10923,10 @@ i32.const 2147483647 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1032 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10939,10 +10939,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1072 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -10950,10 +10950,10 @@ i32.const 4 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1112 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10966,10 +10966,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1152 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -10977,10 +10977,10 @@ i32.const 4 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1192 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10993,10 +10993,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1232 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -11004,10 +11004,10 @@ i32.const 4 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1272 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11020,10 +11020,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1312 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -11031,10 +11031,10 @@ i32.const 2147483647 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1352 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11047,10 +11047,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1392 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -11058,10 +11058,10 @@ i32.const -1 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1432 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11074,10 +11074,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1472 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -11085,10 +11085,10 @@ i32.const -2 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1512 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11101,10 +11101,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1552 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -11112,10 +11112,10 @@ i32.const -1 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1592 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11128,10 +11128,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1632 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -11139,10 +11139,10 @@ i32.const 2147483647 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1672 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11967,10 +11967,10 @@ i32.const 2147483647 call $~lib/array/Array#splice i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1784 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11984,10 +11984,10 @@ end global.get $std/array/sarr i32.const 0 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1824 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12000,20 +12000,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1840 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 i32.const 2147483647 call $~lib/array/Array#splice i32.const 3 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1880 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12027,10 +12027,10 @@ end global.get $std/array/sarr i32.const 2 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1912 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12043,20 +12043,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1936 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 i32.const 2 call $~lib/array/Array#splice i32.const 2 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1976 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12070,10 +12070,10 @@ end global.get $std/array/sarr i32.const 3 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2000 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12086,20 +12086,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2032 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const 0 i32.const 1 call $~lib/array/Array#splice i32.const 1 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2072 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12113,10 +12113,10 @@ end global.get $std/array/sarr i32.const 4 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2096 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12129,20 +12129,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2128 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const -1 i32.const 2147483647 call $~lib/array/Array#splice i32.const 1 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2168 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12156,10 +12156,10 @@ end global.get $std/array/sarr i32.const 4 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2192 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12172,20 +12172,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2224 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const 2147483647 call $~lib/array/Array#splice i32.const 2 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2264 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12199,10 +12199,10 @@ end global.get $std/array/sarr i32.const 3 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2288 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12215,20 +12215,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2320 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const 1 call $~lib/array/Array#splice i32.const 1 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2360 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12242,10 +12242,10 @@ end global.get $std/array/sarr i32.const 4 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2384 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12258,20 +12258,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2416 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const -7 i32.const 1 call $~lib/array/Array#splice i32.const 1 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2456 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12285,10 +12285,10 @@ end global.get $std/array/sarr i32.const 4 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2480 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12301,20 +12301,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2512 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const -1 call $~lib/array/Array#splice i32.const 0 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2552 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12328,10 +12328,10 @@ end global.get $std/array/sarr i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2568 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12344,20 +12344,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2608 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const 1 i32.const -2 call $~lib/array/Array#splice i32.const 0 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2648 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12371,10 +12371,10 @@ end global.get $std/array/sarr i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2664 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12387,20 +12387,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2704 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const 4 i32.const 0 call $~lib/array/Array#splice i32.const 0 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2744 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12414,10 +12414,10 @@ end global.get $std/array/sarr i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2760 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12430,20 +12430,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2800 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 0 call $~lib/array/Array#splice i32.const 0 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2840 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12457,10 +12457,10 @@ end global.get $std/array/sarr i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2856 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12473,20 +12473,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2896 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 5 call $~lib/array/Array#splice i32.const 0 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2936 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12500,10 +12500,10 @@ end global.get $std/array/sarr i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2952 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13604,10 +13604,10 @@ call $~lib/array/Array#sort global.get $std/array/f32ArrayTyped i32.const 8 - i32.const 9 i32.const 2 + i32.const 9 i32.const 3304 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/array/isArraysEqual i32.eqz if @@ -13640,10 +13640,10 @@ call $~lib/array/Array#sort global.get $std/array/f64ArrayTyped i32.const 8 - i32.const 10 i32.const 3 + i32.const 10 i32.const 3464 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/array/isArraysEqual i32.eqz if @@ -13677,10 +13677,10 @@ drop global.get $std/array/i32ArrayTyped i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 3616 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13715,10 +13715,10 @@ drop global.get $std/array/u32ArrayTyped i32.const 5 - i32.const 8 i32.const 2 + i32.const 8 i32.const 3728 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13751,10 +13751,10 @@ call $std/array/assertSortedDefault global.get $std/array/reversed1 i32.const 1 - i32.const 4 i32.const 2 + i32.const 4 i32.const 4056 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13770,10 +13770,10 @@ call $std/array/assertSortedDefault global.get $std/array/reversed2 i32.const 2 - i32.const 4 i32.const 2 + i32.const 4 i32.const 4080 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13931,10 +13931,10 @@ local.get $0 call $std/array/assertSorted<~lib/array/Array> i32.const 2 - i32.const 16 i32.const 0 + i32.const 16 i32.const 4552 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $~lib/array/Array#join_bool i32.const 4576 call $~lib/string/String.__eq @@ -13948,10 +13948,10 @@ unreachable end i32.const 3 - i32.const 4 i32.const 2 + i32.const 4 i32.const 5120 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 4200 call $~lib/array/Array#join i32.const 5152 @@ -13966,10 +13966,10 @@ unreachable end i32.const 3 - i32.const 8 i32.const 2 + i32.const 8 i32.const 5240 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 5216 call $~lib/array/Array#join i32.const 5152 @@ -13984,10 +13984,10 @@ unreachable end i32.const 2 - i32.const 4 i32.const 2 + i32.const 4 i32.const 5320 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 5296 call $~lib/array/Array#join i32.const 5344 @@ -14002,10 +14002,10 @@ unreachable end i32.const 6 - i32.const 10 i32.const 3 + i32.const 10 i32.const 6672 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $~lib/array/Array#join_flt i32.const 6736 call $~lib/string/String.__eq @@ -14019,10 +14019,10 @@ unreachable end i32.const 3 - i32.const 15 i32.const 2 + i32.const 15 i32.const 6888 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 4200 call $~lib/array/Array<~lib/string/String>#join i32.const 6832 @@ -14037,10 +14037,10 @@ unreachable end i32.const 3 - i32.const 20 i32.const 2 + i32.const 20 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.tee $1 i32.load offset=4 local.tee $0 @@ -14120,10 +14120,10 @@ unreachable end i32.const 3 - i32.const 21 i32.const 0 + i32.const 21 i32.const 7128 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $~lib/array/Array#join_int i32.const 7152 call $~lib/string/String.__eq @@ -14137,10 +14137,10 @@ unreachable end i32.const 3 - i32.const 22 i32.const 1 + i32.const 22 i32.const 7208 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $~lib/array/Array#join_int i32.const 7232 call $~lib/string/String.__eq @@ -14154,10 +14154,10 @@ unreachable end i32.const 3 - i32.const 17 i32.const 3 + i32.const 17 i32.const 7312 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $~lib/array/Array#join_int i32.const 7352 call $~lib/string/String.__eq @@ -14171,10 +14171,10 @@ unreachable end i32.const 4 - i32.const 23 i32.const 3 + i32.const 23 i32.const 7464 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $~lib/array/Array#join_int i32.const 7512 call $~lib/string/String.__eq @@ -14201,10 +14201,10 @@ unreachable end i32.const 4 - i32.const 15 i32.const 2 + i32.const 15 i32.const 7744 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $~lib/array/Array<~lib/string/String | null>#toString i32.const 7776 call $~lib/string/String.__eq @@ -14218,25 +14218,25 @@ unreachable end i32.const 2 - i32.const 11 i32.const 2 + i32.const 11 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.tee $0 i32.load offset=4 local.tee $1 i32.const 2 - i32.const 4 i32.const 2 + i32.const 4 i32.const 7832 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.store local.get $1 i32.const 2 - i32.const 4 i32.const 2 + i32.const 4 i32.const 7856 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.store offset=4 local.get $0 global.set $std/array/subarr32 @@ -14254,25 +14254,25 @@ unreachable end i32.const 2 - i32.const 24 i32.const 2 + i32.const 24 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.tee $0 i32.load offset=4 local.tee $1 i32.const 2 - i32.const 7 i32.const 0 + i32.const 7 i32.const 7936 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.store local.get $1 i32.const 2 - i32.const 7 i32.const 0 + i32.const 7 i32.const 7960 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.store offset=4 local.get $0 global.set $std/array/subarr8 @@ -14290,25 +14290,25 @@ unreachable end i32.const 1 - i32.const 26 i32.const 2 + i32.const 26 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.tee $0 i32.load offset=4 local.set $1 i32.const 1 - i32.const 25 i32.const 2 + i32.const 25 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.tee $2 i32.load offset=4 i32.const 1 - i32.const 8 i32.const 2 + i32.const 8 i32.const 8056 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.store local.get $1 local.get $2 diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 06e870969c..c975237cd1 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -297,7 +297,7 @@ (export "table" (table $0)) (export "main" (func $std/array/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -396,7 +396,7 @@ (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -684,7 +684,7 @@ if i32.const 0 i32.const 80 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -701,7 +701,7 @@ if i32.const 0 i32.const 80 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -2437,7 +2437,7 @@ end end ) - (func $~lib/runtime/runtime.makeArray (; 25 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 25 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2446,16 +2446,14 @@ (local $9 i32) i32.const 16 call $~lib/runtime/runtime.allocate - local.get $1 + local.get $2 call $~lib/runtime/runtime.register local.set $4 local.get $0 - local.get $2 + local.get $1 i32.shl local.set $5 - local.get $0 - local.get $2 - i32.shl + local.get $5 call $~lib/runtime/runtime.allocate i32.const 2 call $~lib/runtime/runtime.register @@ -2806,10 +2804,10 @@ i32.lt_u if local.get $1 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust local.set $4 local.get $3 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust i32.const 0 local.get $0 global.get $~lib/memory/HEAP_BASE @@ -2859,7 +2857,7 @@ if i32.const 0 i32.const 80 - i32.const 85 + i32.const 77 i32.const 10 call $~lib/env/abort unreachable @@ -3074,10 +3072,10 @@ local.get $2 local.get $3 i32.add - i32.const 4 i32.const 2 + i32.const 4 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $4 local.get $4 i32.load offset=4 @@ -3620,10 +3618,10 @@ select local.set $2 local.get $2 - i32.const 4 i32.const 2 + i32.const 4 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $6 local.get $6 i32.load offset=4 @@ -4200,10 +4198,10 @@ i32.load offset=12 local.set $2 local.get $2 - i32.const 9 i32.const 2 + i32.const 9 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $3 local.get $3 i32.load offset=4 @@ -4315,10 +4313,10 @@ i32.load offset=12 local.set $2 local.get $2 - i32.const 4 i32.const 2 + i32.const 4 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $3 local.get $3 i32.load offset=4 @@ -4405,10 +4403,10 @@ (local $5 i32) (local $6 i32) i32.const 0 - i32.const 4 i32.const 2 + i32.const 4 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $2 block $break|0 block @@ -7195,10 +7193,10 @@ unreachable end local.get $0 - i32.const 4 i32.const 2 + i32.const 4 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $1 local.get $1 i32.load offset=4 @@ -7449,10 +7447,10 @@ unreachable end local.get $0 - i32.const 11 i32.const 2 + i32.const 11 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $1 local.get $1 i32.load offset=4 @@ -7882,10 +7880,10 @@ unreachable end local.get $0 - i32.const 12 i32.const 2 + i32.const 12 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $1 local.get $1 i32.load offset=4 @@ -8846,10 +8844,10 @@ unreachable end local.get $0 - i32.const 15 i32.const 2 + i32.const 15 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $1 local.get $1 i32.load offset=4 @@ -9604,7 +9602,7 @@ if i32.const 0 i32.const 80 - i32.const 110 + i32.const 103 i32.const 6 call $~lib/env/abort unreachable @@ -9621,7 +9619,7 @@ if i32.const 0 i32.const 80 - i32.const 112 + i32.const 105 i32.const 6 call $~lib/env/abort unreachable @@ -14674,10 +14672,10 @@ drop global.get $std/array/arr8 i32.const 5 - i32.const 7 i32.const 0 + i32.const 7 i32.const 248 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14697,10 +14695,10 @@ drop global.get $std/array/arr8 i32.const 5 - i32.const 7 i32.const 0 + i32.const 7 i32.const 320 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14720,10 +14718,10 @@ drop global.get $std/array/arr8 i32.const 5 - i32.const 7 i32.const 0 + i32.const 7 i32.const 344 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14743,10 +14741,10 @@ drop global.get $std/array/arr8 i32.const 5 - i32.const 7 i32.const 0 + i32.const 7 i32.const 368 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14766,10 +14764,10 @@ drop global.get $std/array/arr8 i32.const 5 - i32.const 7 i32.const 0 + i32.const 7 i32.const 392 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14789,10 +14787,10 @@ drop global.get $std/array/arr32 i32.const 5 - i32.const 8 i32.const 2 + i32.const 8 i32.const 488 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14812,10 +14810,10 @@ drop global.get $std/array/arr32 i32.const 5 - i32.const 8 i32.const 2 + i32.const 8 i32.const 528 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14835,10 +14833,10 @@ drop global.get $std/array/arr32 i32.const 5 - i32.const 8 i32.const 2 + i32.const 8 i32.const 568 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14858,10 +14856,10 @@ drop global.get $std/array/arr32 i32.const 5 - i32.const 8 i32.const 2 + i32.const 8 i32.const 608 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14881,10 +14879,10 @@ drop global.get $std/array/arr32 i32.const 5 - i32.const 8 i32.const 2 + i32.const 8 i32.const 648 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15230,10 +15228,10 @@ end global.get $std/array/out i32.const 0 - i32.const 4 i32.const 2 + i32.const 4 i32.const 688 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $~lib/array/Array#concat drop global.get $std/array/arr @@ -15503,10 +15501,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 752 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -15514,10 +15512,10 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 792 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15530,10 +15528,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 832 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -15541,10 +15539,10 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 872 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15557,10 +15555,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 912 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -15568,10 +15566,10 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 952 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15584,10 +15582,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 992 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 2 @@ -15595,10 +15593,10 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1032 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15611,10 +15609,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1072 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -15622,10 +15620,10 @@ i32.const 4 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1112 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15638,10 +15636,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1152 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -15649,10 +15647,10 @@ i32.const 4 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1192 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15665,10 +15663,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1232 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -15676,10 +15674,10 @@ i32.const 4 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1272 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15692,10 +15690,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1312 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -15703,10 +15701,10 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1352 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15719,10 +15717,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1392 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -15730,10 +15728,10 @@ i32.const -1 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1432 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15746,10 +15744,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1472 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -15757,10 +15755,10 @@ i32.const -2 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1512 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15773,10 +15771,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1552 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -15784,10 +15782,10 @@ i32.const -1 call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1592 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15800,10 +15798,10 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1632 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -15811,10 +15809,10 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#copyWithin i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1672 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16675,10 +16673,10 @@ global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#splice i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1784 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16692,10 +16690,10 @@ end global.get $std/array/sarr i32.const 0 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1824 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16708,20 +16706,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1840 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#splice i32.const 3 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1880 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16735,10 +16733,10 @@ end global.get $std/array/sarr i32.const 2 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1912 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16751,20 +16749,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1936 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 i32.const 2 call $~lib/array/Array#splice i32.const 2 - i32.const 4 i32.const 2 + i32.const 4 i32.const 1976 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16778,10 +16776,10 @@ end global.get $std/array/sarr i32.const 3 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2000 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16794,20 +16792,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2032 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const 0 i32.const 1 call $~lib/array/Array#splice i32.const 1 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2072 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16821,10 +16819,10 @@ end global.get $std/array/sarr i32.const 4 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2096 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16837,20 +16835,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2128 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const -1 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#splice i32.const 1 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2168 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16864,10 +16862,10 @@ end global.get $std/array/sarr i32.const 4 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2192 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16880,20 +16878,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2224 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/array/Array#splice i32.const 2 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2264 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16907,10 +16905,10 @@ end global.get $std/array/sarr i32.const 3 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2288 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16923,20 +16921,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2320 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const 1 call $~lib/array/Array#splice i32.const 1 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2360 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16950,10 +16948,10 @@ end global.get $std/array/sarr i32.const 4 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2384 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16966,20 +16964,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2416 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const -7 i32.const 1 call $~lib/array/Array#splice i32.const 1 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2456 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16993,10 +16991,10 @@ end global.get $std/array/sarr i32.const 4 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2480 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17009,20 +17007,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2512 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const -1 call $~lib/array/Array#splice i32.const 0 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2552 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17036,10 +17034,10 @@ end global.get $std/array/sarr i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2568 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17052,20 +17050,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2608 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const 1 i32.const -2 call $~lib/array/Array#splice i32.const 0 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2648 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17079,10 +17077,10 @@ end global.get $std/array/sarr i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2664 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17095,20 +17093,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2704 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const 4 i32.const 0 call $~lib/array/Array#splice i32.const 0 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2744 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17122,10 +17120,10 @@ end global.get $std/array/sarr i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2760 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17138,20 +17136,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2800 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 0 call $~lib/array/Array#splice i32.const 0 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2840 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17165,10 +17163,10 @@ end global.get $std/array/sarr i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2856 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17181,20 +17179,20 @@ unreachable end i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2896 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 5 call $~lib/array/Array#splice i32.const 0 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2936 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17208,10 +17206,10 @@ end global.get $std/array/sarr i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 2952 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18410,10 +18408,10 @@ drop global.get $std/array/f32ArrayTyped i32.const 8 - i32.const 9 i32.const 2 + i32.const 9 i32.const 3304 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18435,10 +18433,10 @@ drop global.get $std/array/f64ArrayTyped i32.const 8 - i32.const 10 i32.const 3 + i32.const 10 i32.const 3464 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18460,10 +18458,10 @@ drop global.get $std/array/i32ArrayTyped i32.const 5 - i32.const 4 i32.const 2 + i32.const 4 i32.const 3616 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18485,10 +18483,10 @@ drop global.get $std/array/u32ArrayTyped i32.const 5 - i32.const 8 i32.const 2 + i32.const 8 i32.const 3728 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18521,10 +18519,10 @@ call $std/array/assertSortedDefault global.get $std/array/reversed1 i32.const 1 - i32.const 4 i32.const 2 + i32.const 4 i32.const 4056 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18540,10 +18538,10 @@ call $std/array/assertSortedDefault global.get $std/array/reversed2 i32.const 2 - i32.const 4 i32.const 2 + i32.const 4 i32.const 4080 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18693,10 +18691,10 @@ call $std/array/assertSorted<~lib/string/String>|trampoline end i32.const 2 - i32.const 16 i32.const 0 + i32.const 16 i32.const 4552 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 4528 call $~lib/array/Array#join i32.const 4576 @@ -18711,10 +18709,10 @@ unreachable end i32.const 3 - i32.const 4 i32.const 2 + i32.const 4 i32.const 5120 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 4200 call $~lib/array/Array#join i32.const 5152 @@ -18729,10 +18727,10 @@ unreachable end i32.const 3 - i32.const 8 i32.const 2 + i32.const 8 i32.const 5240 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 5216 call $~lib/array/Array#join i32.const 5152 @@ -18747,10 +18745,10 @@ unreachable end i32.const 2 - i32.const 4 i32.const 2 + i32.const 4 i32.const 5320 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 5296 call $~lib/array/Array#join i32.const 5344 @@ -18765,10 +18763,10 @@ unreachable end i32.const 6 - i32.const 10 i32.const 3 + i32.const 10 i32.const 6672 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 5472 call $~lib/array/Array#join i32.const 6736 @@ -18783,10 +18781,10 @@ unreachable end i32.const 3 - i32.const 15 i32.const 2 + i32.const 15 i32.const 6888 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray i32.const 4200 call $~lib/array/Array<~lib/string/String>#join i32.const 6832 @@ -18802,10 +18800,10 @@ end block (result i32) i32.const 3 - i32.const 20 i32.const 2 + i32.const 20 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $0 local.get $0 i32.load offset=4 @@ -18921,10 +18919,10 @@ unreachable end i32.const 3 - i32.const 21 i32.const 0 + i32.const 21 i32.const 7128 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $~lib/array/Array#toString i32.const 7152 call $~lib/string/String.__eq @@ -18938,10 +18936,10 @@ unreachable end i32.const 3 - i32.const 22 i32.const 1 + i32.const 22 i32.const 7208 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $~lib/array/Array#toString i32.const 7232 call $~lib/string/String.__eq @@ -18955,10 +18953,10 @@ unreachable end i32.const 3 - i32.const 17 i32.const 3 + i32.const 17 i32.const 7312 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $~lib/array/Array#toString i32.const 7352 call $~lib/string/String.__eq @@ -18972,10 +18970,10 @@ unreachable end i32.const 4 - i32.const 23 i32.const 3 + i32.const 23 i32.const 7464 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $~lib/array/Array#toString i32.const 7512 call $~lib/string/String.__eq @@ -19002,10 +19000,10 @@ unreachable end i32.const 4 - i32.const 15 i32.const 2 + i32.const 15 i32.const 7744 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $~lib/array/Array<~lib/string/String>#toString i32.const 7776 call $~lib/string/String.__eq @@ -19020,10 +19018,10 @@ end block (result i32) i32.const 2 - i32.const 11 i32.const 2 + i32.const 11 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $1 local.get $1 i32.load offset=4 @@ -19031,10 +19029,10 @@ local.get $0 block (result i32) i32.const 2 - i32.const 4 i32.const 2 + i32.const 4 i32.const 7832 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $2 local.get $2 local.get $1 @@ -19045,10 +19043,10 @@ local.get $0 block (result i32) i32.const 2 - i32.const 4 i32.const 2 + i32.const 4 i32.const 7856 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $2 local.get $2 local.get $1 @@ -19074,10 +19072,10 @@ end block (result i32) i32.const 2 - i32.const 24 i32.const 2 + i32.const 24 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $0 local.get $0 i32.load offset=4 @@ -19085,10 +19083,10 @@ local.get $1 block (result i32) i32.const 2 - i32.const 7 i32.const 0 + i32.const 7 i32.const 7936 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $2 local.get $2 local.get $0 @@ -19099,10 +19097,10 @@ local.get $1 block (result i32) i32.const 2 - i32.const 7 i32.const 0 + i32.const 7 i32.const 7960 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $2 local.get $2 local.get $0 @@ -19128,10 +19126,10 @@ end block (result i32) i32.const 1 - i32.const 26 i32.const 2 + i32.const 26 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $0 local.get $0 i32.load offset=4 @@ -19140,10 +19138,10 @@ block (result i32) block (result i32) i32.const 1 - i32.const 25 i32.const 2 + i32.const 25 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $2 local.get $2 i32.load offset=4 @@ -19151,10 +19149,10 @@ local.get $3 block (result i32) i32.const 1 - i32.const 8 i32.const 2 + i32.const 8 i32.const 8056 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $4 local.get $4 local.get $2 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 003898b761..bf53788a8a 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -327,7 +327,7 @@ if i32.const 0 i32.const 64 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -342,7 +342,7 @@ if i32.const 0 i32.const 64 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -1535,7 +1535,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/runtime/runtime.makeArray (; 10 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/runtime/runtime.newArray (; 10 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) i32.const 16 @@ -1830,7 +1830,7 @@ i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor global.set $std/arraybuffer/arr8 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray drop global.get $std/arraybuffer/arr8 if (result i32) diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 263760de58..fbb25abcb1 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -29,7 +29,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -128,7 +128,7 @@ (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -407,7 +407,7 @@ if i32.const 0 i32.const 64 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -424,7 +424,7 @@ if i32.const 0 i32.const 64 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -2618,22 +2618,20 @@ local.set $0 local.get $0 ) - (func $~lib/runtime/runtime.makeArray (; 19 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 19 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) i32.const 16 call $~lib/runtime/runtime.allocate - local.get $1 + local.get $2 call $~lib/runtime/runtime.register local.set $4 local.get $0 - local.get $2 + local.get $1 i32.shl local.set $5 - local.get $0 - local.get $2 - i32.shl + local.get $5 call $~lib/runtime/runtime.allocate i32.const 2 call $~lib/runtime/runtime.register @@ -3020,10 +3018,10 @@ call $~lib/typedarray/Uint8Array#constructor global.set $std/arraybuffer/arr8 i32.const 2 - i32.const 5 i32.const 2 + i32.const 5 i32.const 152 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array> i32.eqz i32.eqz diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 25724f1895..c3794503a5 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -165,7 +165,7 @@ if i32.const 0 i32.const 64 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -180,7 +180,7 @@ if i32.const 0 i32.const 64 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index cd1db6b292..7b25410028 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -35,7 +35,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -134,7 +134,7 @@ (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -413,7 +413,7 @@ if i32.const 0 i32.const 64 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -430,7 +430,7 @@ if i32.const 0 i32.const 64 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 116af7fe29..ada313ece6 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -89,7 +89,7 @@ if i32.const 0 i32.const 48 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -104,7 +104,7 @@ if i32.const 0 i32.const 48 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 44257c3824..b304c8c1b0 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -27,7 +27,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/runtime.adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -126,7 +126,7 @@ (func $~lib/runtime/runtime.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -148,7 +148,7 @@ if i32.const 0 i32.const 48 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -165,7 +165,7 @@ if i32.const 0 i32.const 48 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 40217a4d31..311e469730 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -135,7 +135,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -150,7 +150,7 @@ if i32.const 0 i32.const 24 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index b103b77ccc..fe4484c0a0 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -36,7 +36,7 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -135,7 +135,7 @@ (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -166,7 +166,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -183,7 +183,7 @@ if i32.const 0 i32.const 24 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 9d1e780819..2ca7f049de 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -84,7 +84,7 @@ if i32.const 0 i32.const 16 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -99,7 +99,7 @@ if i32.const 0 i32.const 16 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 37689c9572..93369e9d57 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -20,7 +20,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -119,7 +119,7 @@ (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -141,7 +141,7 @@ if i32.const 0 i32.const 16 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index bdb62aad19..8632d9c567 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -118,7 +118,7 @@ if i32.const 0 i32.const 64 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -133,7 +133,7 @@ if i32.const 0 i32.const 64 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/object-literal.untouched.wat b/tests/compiler/std/object-literal.untouched.wat index 11eb9ba485..903da28aa0 100644 --- a/tests/compiler/std/object-literal.untouched.wat +++ b/tests/compiler/std/object-literal.untouched.wat @@ -23,7 +23,7 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -122,7 +122,7 @@ (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -153,7 +153,7 @@ if i32.const 0 i32.const 64 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -170,7 +170,7 @@ if i32.const 0 i32.const 64 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 06e9f5d7f5..d4a70cfc76 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -167,7 +167,7 @@ if i32.const 0 i32.const 16 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -182,7 +182,7 @@ if i32.const 0 i32.const 16 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 287acdddb6..39f3e96302 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -88,7 +88,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -187,7 +187,7 @@ (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -209,7 +209,7 @@ if i32.const 0 i32.const 16 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -226,7 +226,7 @@ if i32.const 0 i32.const 16 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 29b95e4e92..cc017260fb 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -2560,7 +2560,7 @@ if i32.const 0 i32.const 232 - i32.const 85 + i32.const 77 i32.const 10 call $~lib/env/abort unreachable @@ -2597,7 +2597,7 @@ if i32.const 0 i32.const 232 - i32.const 110 + i32.const 103 i32.const 6 call $~lib/env/abort unreachable @@ -2612,7 +2612,7 @@ if i32.const 0 i32.const 232 - i32.const 112 + i32.const 105 i32.const 6 call $~lib/env/abort unreachable @@ -2628,7 +2628,7 @@ if i32.const 0 i32.const 232 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -2643,7 +2643,7 @@ if i32.const 0 i32.const 232 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -2694,7 +2694,7 @@ else i32.const 0 i32.const 24 - i32.const 41 + i32.const 40 i32.const 2 call $~lib/env/abort unreachable @@ -2805,7 +2805,7 @@ if i32.const 0 i32.const 24 - i32.const 56 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable @@ -2817,7 +2817,7 @@ if i32.const 0 i32.const 24 - i32.const 57 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -2831,7 +2831,7 @@ if i32.const 0 i32.const 24 - i32.const 58 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -2843,7 +2843,7 @@ if i32.const 0 i32.const 24 - i32.const 59 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -2858,7 +2858,7 @@ if i32.const 0 i32.const 24 - i32.const 61 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable @@ -2874,7 +2874,7 @@ if i32.const 0 i32.const 24 - i32.const 63 + i32.const 62 i32.const 0 call $~lib/env/abort unreachable @@ -2890,7 +2890,7 @@ if i32.const 0 i32.const 24 - i32.const 66 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable @@ -2906,7 +2906,7 @@ if i32.const 0 i32.const 24 - i32.const 70 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable @@ -2922,7 +2922,7 @@ if i32.const 0 i32.const 24 - i32.const 72 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable @@ -2934,7 +2934,7 @@ if i32.const 0 i32.const 24 - i32.const 73 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable @@ -2951,7 +2951,7 @@ if i32.const 0 i32.const 24 - i32.const 76 + i32.const 75 i32.const 0 call $~lib/env/abort unreachable @@ -2967,7 +2967,7 @@ if i32.const 0 i32.const 24 - i32.const 77 + i32.const 76 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.ts b/tests/compiler/std/runtime.ts index 5db24ad306..596da40126 100644 --- a/tests/compiler/std/runtime.ts +++ b/tests/compiler/std/runtime.ts @@ -1,6 +1,5 @@ import "allocator/tlsf"; -// import { classId, ADJUSTOBLOCK, ALLOCATE, REALLOCATE, REGISTER, DISCARD, HEADER, HEADER_SIZE, HEADER_MAGIC } from "runtime"; -import { HEADER, HEADER_SIZE, HEADER_MAGIC } from "util/runtime"; +import { HEADER, HEADER_SIZE, HEADER_MAGIC, adjust } from "util/runtime"; import { runtime, __runtime_id } from "runtime"; @start export function main(): void {} @@ -36,16 +35,16 @@ function isPowerOf2(x: i32): bool { return x != 0 && (x & (x - 1)) == 0; } -assert(runtime.adjust(0) > 0); +assert(adjust(0) > 0); for (let i = 0; i < 9000; ++i) { - assert(isPowerOf2(runtime.adjust(i))); + assert(isPowerOf2(adjust(i))); } -var barrier1 = runtime.adjust(0); +var barrier1 = adjust(0); var barrier2 = barrier1 + 1; -while (runtime.adjust(barrier2 + 1) == runtime.adjust(barrier2)) ++barrier2; +while (adjust(barrier2 + 1) == adjust(barrier2)) ++barrier2; var barrier3 = barrier2 + 1; -while (runtime.adjust(barrier3 + 1) == runtime.adjust(barrier3)) ++barrier3; +while (adjust(barrier3 + 1) == adjust(barrier3)) ++barrier3; trace("barrier1", 1, barrier1); trace("barrier2", 1, barrier2); diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 15a904e77f..9f8966c42b 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -60,7 +60,7 @@ (export "table" (table $0)) (export "main" (func $std/runtime/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -1458,7 +1458,7 @@ (func $~lib/runtime/runtime.allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -3235,10 +3235,10 @@ i32.lt_u if local.get $1 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust local.set $4 local.get $3 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust i32.const 0 local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3288,7 +3288,7 @@ if i32.const 0 i32.const 232 - i32.const 85 + i32.const 77 i32.const 10 call $~lib/env/abort unreachable @@ -3330,7 +3330,7 @@ if i32.const 0 i32.const 232 - i32.const 110 + i32.const 103 i32.const 6 call $~lib/env/abort unreachable @@ -3347,7 +3347,7 @@ if i32.const 0 i32.const 232 - i32.const 112 + i32.const 105 i32.const 6 call $~lib/env/abort unreachable @@ -3364,7 +3364,7 @@ if i32.const 0 i32.const 232 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -3381,7 +3381,7 @@ if i32.const 0 i32.const 232 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -3416,20 +3416,20 @@ if i32.const 0 i32.const 24 - i32.const 33 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable end i32.const 0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust i32.const 0 i32.gt_u i32.eqz if i32.const 0 i32.const 24 - i32.const 39 + i32.const 38 i32.const 0 call $~lib/env/abort unreachable @@ -3444,13 +3444,13 @@ i32.eqz br_if $break|0 local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $std/runtime/isPowerOf2 i32.eqz if i32.const 0 i32.const 24 - i32.const 41 + i32.const 40 i32.const 2 call $~lib/env/abort unreachable @@ -3465,7 +3465,7 @@ unreachable end i32.const 0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust global.set $std/runtime/barrier1 global.get $std/runtime/barrier1 i32.const 1 @@ -3476,9 +3476,9 @@ global.get $std/runtime/barrier2 i32.const 1 i32.add - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust global.get $std/runtime/barrier2 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust i32.eq if global.get $std/runtime/barrier2 @@ -3498,9 +3498,9 @@ global.get $std/runtime/barrier3 i32.const 1 i32.add - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust global.get $std/runtime/barrier3 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust i32.eq if global.get $std/runtime/barrier3 @@ -3553,7 +3553,7 @@ if i32.const 0 i32.const 24 - i32.const 56 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable @@ -3566,7 +3566,7 @@ if i32.const 0 i32.const 24 - i32.const 57 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -3580,7 +3580,7 @@ if i32.const 0 i32.const 24 - i32.const 58 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -3593,7 +3593,7 @@ if i32.const 0 i32.const 24 - i32.const 59 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -3609,7 +3609,7 @@ if i32.const 0 i32.const 24 - i32.const 61 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable @@ -3626,7 +3626,7 @@ if i32.const 0 i32.const 24 - i32.const 63 + i32.const 62 i32.const 0 call $~lib/env/abort unreachable @@ -3643,7 +3643,7 @@ if i32.const 0 i32.const 24 - i32.const 66 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable @@ -3662,7 +3662,7 @@ if i32.const 0 i32.const 24 - i32.const 70 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable @@ -3679,7 +3679,7 @@ if i32.const 0 i32.const 24 - i32.const 72 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable @@ -3692,7 +3692,7 @@ if i32.const 0 i32.const 24 - i32.const 73 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable @@ -3708,7 +3708,7 @@ if i32.const 0 i32.const 24 - i32.const 76 + i32.const 75 i32.const 0 call $~lib/env/abort unreachable @@ -3721,7 +3721,7 @@ if i32.const 0 i32.const 24 - i32.const 77 + i32.const 76 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 1e8d43f044..8360089ec4 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -146,7 +146,7 @@ if i32.const 0 i32.const 24 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index ac8c670836..08ad6ba66d 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -36,7 +36,7 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -135,7 +135,7 @@ (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -166,7 +166,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -183,7 +183,7 @@ if i32.const 0 i32.const 24 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 37b088ccc4..1beb7f4e67 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -1437,7 +1437,7 @@ if i32.const 0 i32.const 280 - i32.const 85 + i32.const 77 i32.const 10 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index c57c7254f4..9b09b240b9 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -71,7 +71,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/runtime/runtime.adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -1881,10 +1881,10 @@ i32.lt_u if local.get $1 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust local.set $4 local.get $3 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust i32.const 0 local.get $0 global.get $~lib/memory/HEAP_BASE @@ -1928,7 +1928,7 @@ if i32.const 0 i32.const 280 - i32.const 85 + i32.const 77 i32.const 10 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index f1dd5e16c2..5fc947369f 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -1464,7 +1464,7 @@ if i32.const 0 i32.const 136 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -1479,7 +1479,7 @@ if i32.const 0 i32.const 136 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index a9fca170c4..6c13880288 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -453,7 +453,7 @@ i32.store8 local.get $1 ) - (func $~lib/runtime/runtime.adjust (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -468,7 +468,7 @@ (func $~lib/runtime/runtime.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -1929,7 +1929,7 @@ if i32.const 0 i32.const 136 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -1946,7 +1946,7 @@ if i32.const 0 i32.const 136 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 350e4bce05..2895b8fc40 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -444,7 +444,7 @@ if i32.const 0 i32.const 184 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -459,7 +459,7 @@ if i32.const 0 i32.const 184 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -2912,7 +2912,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/runtime/runtime.makeArray (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3235,7 +3235,7 @@ if i32.const 0 i32.const 184 - i32.const 85 + i32.const 77 i32.const 10 call $~lib/env/abort unreachable @@ -3363,7 +3363,7 @@ if i32.const 0 i32.const 2 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray return end local.get $1 @@ -3371,7 +3371,7 @@ if i32.const 1 i32.const 2 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.tee $1 i32.load offset=4 local.get $0 @@ -3406,7 +3406,7 @@ if i32.const 1 i32.const 2 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.tee $0 i32.load offset=4 i32.const 120 @@ -3420,7 +3420,7 @@ if i32.const 0 i32.const 1 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray return end local.get $3 @@ -3431,7 +3431,7 @@ select local.tee $4 i32.const 2 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.tee $3 i32.load offset=4 local.set $5 @@ -3475,7 +3475,7 @@ end i32.const 0 i32.const 2 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $2 loop $continue|1 local.get $1 @@ -3543,7 +3543,7 @@ if i32.const 1 i32.const 2 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.tee $1 i32.load offset=4 local.tee $2 @@ -5177,7 +5177,7 @@ if i32.const 0 i32.const 184 - i32.const 110 + i32.const 103 i32.const 6 call $~lib/env/abort unreachable @@ -5191,7 +5191,7 @@ if i32.const 0 i32.const 184 - i32.const 112 + i32.const 105 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index e9c94dc247..db3264246c 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -249,7 +249,7 @@ i32.eqz end ) - (func $~lib/runtime/runtime.adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -348,7 +348,7 @@ (func $~lib/runtime/runtime.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -379,7 +379,7 @@ if i32.const 0 i32.const 184 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -396,7 +396,7 @@ if i32.const 0 i32.const 184 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -3451,7 +3451,7 @@ (func $~lib/collector/dummy/__ref_unlink (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/runtime/runtime.makeArray (; 37 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 37 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3460,16 +3460,14 @@ (local $9 i32) i32.const 16 call $~lib/runtime/runtime.allocate - local.get $1 + local.get $2 call $~lib/runtime/runtime.register local.set $4 local.get $0 - local.get $2 + local.get $1 i32.shl local.set $5 - local.get $0 - local.get $2 - i32.shl + local.get $5 call $~lib/runtime/runtime.allocate i32.const 3 call $~lib/runtime/runtime.register @@ -3797,10 +3795,10 @@ i32.lt_u if local.get $1 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust local.set $4 local.get $3 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust i32.const 0 local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3850,7 +3848,7 @@ if i32.const 0 i32.const 184 - i32.const 85 + i32.const 77 i32.const 10 call $~lib/env/abort unreachable @@ -4071,7 +4069,7 @@ i32.const 2 i32.const 2 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray return end local.get $1 @@ -4083,7 +4081,7 @@ i32.const 2 i32.const 2 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $3 local.get $3 i32.load offset=4 @@ -4122,10 +4120,10 @@ i32.eqz if i32.const 0 - i32.const 1 i32.const 2 + i32.const 1 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray return end local.get $6 @@ -4141,7 +4139,7 @@ i32.const 2 i32.const 2 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $4 local.get $4 i32.load offset=4 @@ -4201,7 +4199,7 @@ i32.const 2 i32.const 2 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $3 local.get $3 i32.load offset=4 @@ -4215,7 +4213,7 @@ i32.const 2 i32.const 2 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $9 i32.const 0 local.set $10 @@ -4301,7 +4299,7 @@ i32.const 2 i32.const 2 i32.const 0 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray local.set $3 local.get $3 i32.const 0 @@ -6549,7 +6547,7 @@ if i32.const 0 i32.const 184 - i32.const 110 + i32.const 103 i32.const 6 call $~lib/env/abort unreachable @@ -6566,7 +6564,7 @@ if i32.const 0 i32.const 184 - i32.const 112 + i32.const 105 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 0b2c17e8dd..056e44ad81 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -144,7 +144,7 @@ if i32.const 0 i32.const 72 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -159,7 +159,7 @@ if i32.const 0 i32.const 72 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index a00be986d0..4111d4bcf6 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -79,7 +79,7 @@ end local.get $2 ) - (func $~lib/runtime/runtime.adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -178,7 +178,7 @@ (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -200,7 +200,7 @@ if i32.const 0 i32.const 72 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -217,7 +217,7 @@ if i32.const 0 i32.const 72 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 0991f7ee81..3c9c57bc62 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -439,7 +439,7 @@ if i32.const 0 i32.const 136 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -454,7 +454,7 @@ if i32.const 0 i32.const 136 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -2984,46 +2984,46 @@ end end ) - (func $~lib/runtime/runtime.makeArray (; 35 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 35 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) i32.const 16 call $~lib/runtime/runtime.allocate - local.get $1 + local.get $2 call $~lib/runtime/runtime.register - local.set $1 + local.set $2 local.get $0 - local.get $2 + local.get $1 i32.shl local.tee $4 call $~lib/runtime/runtime.allocate i32.const 2 call $~lib/runtime/runtime.register - local.tee $2 + local.tee $1 local.set $5 - local.get $1 + local.get $2 i32.load drop - local.get $1 + local.get $2 local.get $5 i32.store - local.get $1 local.get $2 - i32.store offset=4 local.get $1 + i32.store offset=4 + local.get $2 local.get $4 i32.store offset=8 - local.get $1 + local.get $2 local.get $0 i32.store offset=12 local.get $3 if - local.get $2 + local.get $1 local.get $3 local.get $4 call $~lib/memory/memory.copy end - local.get $1 + local.get $2 ) (func $~lib/typedarray/Int8Array#__get (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -12929,10 +12929,10 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 i32.const 0 + i32.const 15 i32.const 240 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -12950,10 +12950,10 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 i32.const 0 + i32.const 15 i32.const 312 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -12971,10 +12971,10 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 i32.const 0 + i32.const 15 i32.const 336 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -12992,10 +12992,10 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 i32.const 0 + i32.const 15 i32.const 360 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -13013,10 +13013,10 @@ call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 i32.const 0 + i32.const 15 i32.const 384 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -13079,10 +13079,10 @@ end global.get $std/typedarray/sub8 i32.const 3 - i32.const 15 i32.const 0 + i32.const 15 i32.const 408 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -13095,10 +13095,10 @@ end global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 i32.const 0 + i32.const 15 i32.const 432 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -13139,10 +13139,10 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 i32.const 2 + i32.const 16 i32.const 456 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -13160,10 +13160,10 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 i32.const 2 + i32.const 16 i32.const 496 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -13181,10 +13181,10 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 i32.const 2 + i32.const 16 i32.const 536 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -13202,10 +13202,10 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 i32.const 2 + i32.const 16 i32.const 576 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -13223,10 +13223,10 @@ call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 i32.const 2 + i32.const 16 i32.const 616 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -13291,10 +13291,10 @@ end global.get $std/typedarray/sub32 i32.const 3 - i32.const 16 i32.const 2 + i32.const 16 i32.const 656 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -13307,10 +13307,10 @@ end global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 i32.const 2 + i32.const 16 i32.const 688 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz if diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 31eca951f9..8007f40dd1 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -110,7 +110,7 @@ (export "table" (table $0)) (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -209,7 +209,7 @@ (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/runtime.adjust + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 @@ -497,7 +497,7 @@ if i32.const 0 i32.const 136 - i32.const 123 + i32.const 117 i32.const 6 call $~lib/env/abort unreachable @@ -514,7 +514,7 @@ if i32.const 0 i32.const 136 - i32.const 125 + i32.const 119 i32.const 6 call $~lib/env/abort unreachable @@ -3869,7 +3869,7 @@ end end ) - (func $~lib/runtime/runtime.makeArray (; 56 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 56 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3878,16 +3878,14 @@ (local $9 i32) i32.const 16 call $~lib/runtime/runtime.allocate - local.get $1 + local.get $2 call $~lib/runtime/runtime.register local.set $4 local.get $0 - local.get $2 + local.get $1 i32.shl local.set $5 - local.get $0 - local.get $2 - i32.shl + local.get $5 call $~lib/runtime/runtime.allocate i32.const 2 call $~lib/runtime/runtime.register @@ -18752,10 +18750,10 @@ drop global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 i32.const 0 + i32.const 15 i32.const 240 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -18774,10 +18772,10 @@ drop global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 i32.const 0 + i32.const 15 i32.const 312 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -18796,10 +18794,10 @@ drop global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 i32.const 0 + i32.const 15 i32.const 336 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -18818,10 +18816,10 @@ drop global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 i32.const 0 + i32.const 15 i32.const 360 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -18840,10 +18838,10 @@ drop global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 i32.const 0 + i32.const 15 i32.const 384 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -18906,10 +18904,10 @@ end global.get $std/typedarray/sub8 i32.const 3 - i32.const 15 i32.const 0 + i32.const 15 i32.const 408 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -18922,10 +18920,10 @@ end global.get $std/typedarray/arr8 i32.const 5 - i32.const 15 i32.const 0 + i32.const 15 i32.const 432 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -18968,10 +18966,10 @@ drop global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 i32.const 2 + i32.const 16 i32.const 456 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -18990,10 +18988,10 @@ drop global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 i32.const 2 + i32.const 16 i32.const 496 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -19012,10 +19010,10 @@ drop global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 i32.const 2 + i32.const 16 i32.const 536 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -19034,10 +19032,10 @@ drop global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 i32.const 2 + i32.const 16 i32.const 576 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -19056,10 +19054,10 @@ drop global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 i32.const 2 + i32.const 16 i32.const 616 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -19126,10 +19124,10 @@ end global.get $std/typedarray/sub32 i32.const 3 - i32.const 16 i32.const 2 + i32.const 16 i32.const 656 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -19142,10 +19140,10 @@ end global.get $std/typedarray/arr32 i32.const 5 - i32.const 16 i32.const 2 + i32.const 16 i32.const 688 - call $~lib/runtime/runtime.makeArray + call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz if From 25c5dfddad4816c59b8131a70ed579844bf4ae59 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 4 Apr 2019 02:25:22 +0200 Subject: [PATCH 092/119] slim down runtime --- src/builtins.ts | 6 +- std/assembly/array.ts | 7 +- std/assembly/collector/itcm.ts | 2 +- std/assembly/fixedarray.ts | 3 +- std/assembly/gc.ts | 60 - std/assembly/map.ts | 3 +- std/assembly/runtime.ts | 97 +- std/assembly/runtime/arena.ts | 2 - std/assembly/runtime/default.ts | 2 +- std/assembly/set.ts | 3 +- std/assembly/util/memory.ts | 284 +- std/assembly/util/runtime.ts | 46 + tests/compiler/assert-nonnull.optimized.wat | 6 +- tests/compiler/assert-nonnull.untouched.wat | 6 +- tests/compiler/call-super.optimized.wat | 4 +- tests/compiler/call-super.untouched.wat | 4 +- tests/compiler/class-extends.optimized.wat | 1915 +++++++++++- tests/compiler/class-extends.untouched.wat | 2333 +++++++++++++- tests/compiler/class.optimized.wat | 1915 +++++++++++- tests/compiler/class.untouched.wat | 2324 +++++++++++++- tests/compiler/closure.optimized.wat | 1914 +++++++++++- tests/compiler/closure.untouched.wat | 2332 +++++++++++++- tests/compiler/constructor.optimized.wat | 779 ++++- tests/compiler/constructor.untouched.wat | 900 +++++- tests/compiler/exports.optimized.wat | 4 +- tests/compiler/exports.untouched.wat | 4 +- tests/compiler/gc.optimized.wat | 2314 +------------- tests/compiler/gc.ts | 9 +- tests/compiler/gc.untouched.wat | 2748 +---------------- tests/compiler/gc/global-assign.optimized.wat | 4 +- tests/compiler/gc/global-assign.untouched.wat | 4 +- tests/compiler/gc/global-init.optimized.wat | 4 +- tests/compiler/gc/global-init.untouched.wat | 4 +- tests/compiler/gc/itcm/trace.optimized.wat | 992 +----- tests/compiler/gc/itcm/trace.ts | 3 +- tests/compiler/gc/itcm/trace.untouched.wat | 1347 +------- .../gc/rc/global-assign.optimized.wat | 4 +- .../gc/rc/global-assign.untouched.wat | 4 +- .../compiler/gc/rc/global-init.optimized.wat | 4 +- .../compiler/gc/rc/global-init.untouched.wat | 4 +- tests/compiler/getter-call.optimized.wat | 4 +- tests/compiler/getter-call.untouched.wat | 4 +- tests/compiler/inlining.optimized.wat | 4 +- tests/compiler/inlining.untouched.wat | 4 +- tests/compiler/number.optimized.wat | 894 +----- tests/compiler/number.untouched.wat | 1269 +------- .../optional-typeparameters.optimized.wat | 4 +- .../optional-typeparameters.untouched.wat | 4 +- tests/compiler/runtime-default.optimized.wat | 1914 +++++++++++- tests/compiler/runtime-default.untouched.wat | 2332 +++++++++++++- .../compiler/runtime/instanceof.optimized.wat | 4 +- .../compiler/runtime/instanceof.untouched.wat | 4 +- .../std/allocator_arena.optimized.wat | 879 +----- .../std/allocator_arena.untouched.wat | 1239 +------- tests/compiler/std/array-access.optimized.wat | 6 +- tests/compiler/std/array-access.untouched.wat | 14 +- .../compiler/std/array-literal.optimized.wat | 8 +- .../compiler/std/array-literal.untouched.wat | 1249 +------- tests/compiler/std/array.optimized.wat | 2496 +++++---------- tests/compiler/std/array.untouched.wat | 2730 +++++----------- tests/compiler/std/arraybuffer.optimized.wat | 892 +----- tests/compiler/std/arraybuffer.untouched.wat | 1261 +------- tests/compiler/std/dataview.optimized.wat | 4 +- tests/compiler/std/dataview.untouched.wat | 4 +- tests/compiler/std/date.optimized.wat | 4 +- tests/compiler/std/date.untouched.wat | 4 +- tests/compiler/std/map.optimized.wat | 4 +- tests/compiler/std/map.untouched.wat | 4 +- tests/compiler/std/new.optimized.wat | 4 +- tests/compiler/std/new.untouched.wat | 4 +- .../compiler/std/object-literal.optimized.wat | 4 +- .../compiler/std/object-literal.untouched.wat | 4 +- .../std/operator-overloading.optimized.wat | 4 +- .../std/operator-overloading.untouched.wat | 4 +- tests/compiler/std/pointer.optimized.wat | 879 +----- tests/compiler/std/pointer.untouched.wat | 1237 +------- tests/compiler/std/runtime.optimized.wat | 940 +----- tests/compiler/std/runtime.ts | 6 +- tests/compiler/std/runtime.untouched.wat | 1280 +------- tests/compiler/std/set.optimized.wat | 4 +- tests/compiler/std/set.untouched.wat | 4 +- tests/compiler/std/static-array.optimized.wat | 922 +----- tests/compiler/std/static-array.untouched.wat | 1295 +------- tests/compiler/std/string-utf8.optimized.wat | 890 +----- tests/compiler/std/string-utf8.untouched.wat | 1247 +------- tests/compiler/std/string.optimized.wat | 1790 +++-------- tests/compiler/std/string.untouched.wat | 1898 ++---------- tests/compiler/std/symbol.optimized.wat | 888 +----- tests/compiler/std/symbol.untouched.wat | 1241 +------- tests/compiler/std/typedarray.optimized.wat | 1474 ++------- tests/compiler/std/typedarray.untouched.wat | 2257 ++++---------- tests/compiler/wasi.json | 5 + tests/compiler/wasi.optimized.wat | 5 +- tests/compiler/wasi.untouched.wat | 92 +- 94 files changed, 22794 insertions(+), 35223 deletions(-) delete mode 100644 std/assembly/gc.ts create mode 100644 tests/compiler/wasi.json diff --git a/src/builtins.ts b/src/builtins.ts index b1b68204ce..50a79d2b6c 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -484,10 +484,8 @@ export namespace BuiltinSymbols { export const runtime_register = "~lib/runtime/runtime.register"; export const runtime_discard = "~lib/runtime/runtime.discard"; export const runtime_newArray = "~lib/runtime/runtime.newArray"; - - // std/gc.ts - export const gc_mark_roots = "~lib/gc/__gc_mark_roots"; - export const gc_mark_members = "~lib/gc/__gc_mark_members"; + export const gc_mark_roots = "~lib/runtime/__gc_mark_roots"; + export const gc_mark_members = "~lib/runtime/__gc_mark_members"; // std/typedarray.ts export const Int8Array = "~lib/typedarray/Int8Array"; diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 47047e3afd..2af424d496 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -1,13 +1,12 @@ /// -import { MAX_BYTELENGTH } from "./util/runtime"; +import { MAX_BYTELENGTH, reallocate } from "./util/runtime"; import { COMPARATOR, SORT } from "./util/sort"; -import { runtime, __runtime_id } from "./runtime"; +import { runtime, __runtime_id, __gc_mark_members } from "./runtime"; import { ArrayBuffer, ArrayBufferView } from "./arraybuffer"; import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number"; import { isArray as builtin_isArray } from "./builtins"; import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_EMPTYARRAY, E_HOLEYARRAY } from "./util/error"; -import { __gc_mark_members } from "./gc"; /** Ensures that the given array has _at least_ the specified capacity. */ function ensureCapacity(array: ArrayBufferView, minCapacity: i32, alignLog2: u32): void { @@ -15,7 +14,7 @@ function ensureCapacity(array: ArrayBufferView, minCapacity: i32, alignLog2: u32 if (minCapacity > (MAX_BYTELENGTH >>> alignLog2)) throw new RangeError(E_INVALIDLENGTH); let oldData = array.data; let newByteLength = minCapacity << alignLog2; - let newData = runtime.reallocate(changetype(oldData), newByteLength); // registers on move + let newData = reallocate(changetype(oldData), newByteLength); // registers on move if (newData !== changetype(oldData)) { array.data = changetype(newData); // links array.dataStart = newData; diff --git a/std/assembly/collector/itcm.ts b/std/assembly/collector/itcm.ts index a7704ef97c..83fa90e873 100644 --- a/std/assembly/collector/itcm.ts +++ b/std/assembly/collector/itcm.ts @@ -5,7 +5,7 @@ const TRACE = isDefined(GC_TRACE); import { HEADER_SIZE } from "../util/runtime"; -import { __gc_mark_roots, __gc_mark_members } from "../gc"; +import { __gc_mark_roots, __gc_mark_members } from "../runtime"; /** Collector states. */ const enum State { diff --git a/std/assembly/fixedarray.ts b/std/assembly/fixedarray.ts index 0602b2eb69..40463ad55f 100644 --- a/std/assembly/fixedarray.ts +++ b/std/assembly/fixedarray.ts @@ -1,7 +1,6 @@ import { HEADER, HEADER_SIZE, MAX_BYTELENGTH } from "./util/runtime"; -import { runtime, __runtime_id } from "./runtime"; +import { runtime, __runtime_id, __gc_mark_members } from "./runtime"; import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_HOLEYARRAY } from "./util/error"; -import { __gc_mark_members } from "./gc"; // NOTE: DO NOT USE YET! diff --git a/std/assembly/gc.ts b/std/assembly/gc.ts deleted file mode 100644 index f19fc4a187..0000000000 --- a/std/assembly/gc.ts +++ /dev/null @@ -1,60 +0,0 @@ -/// - -import { E_NOTIMPLEMENTED } from "./util/error"; - -/** Marks root objects. */ -// @ts-ignore: decorator -@unsafe @builtin -export declare function __gc_mark_roots(): void; - -/** Marks class members. */ -// @ts-ignore: decorator -@unsafe @builtin -export declare function __gc_mark_members(classId: u32, ref: usize): void; - -// @ts-ignore -@lazy -var ROOT = new Set(); - -/** Garbage collector interface. */ -export namespace gc { - - /** Whether the garbage collector interface is implemented. */ - // @ts-ignore: decorator - @lazy - export const implemented: bool = isDefined(__ref_collect); - - /** Performs a full garbage collection cycle. */ - export function collect(): void { - if (isDefined(__ref_collect)) __ref_collect(); - else throw new Error(E_NOTIMPLEMENTED); - } - - /** Retains a managed object externally, making sure that it doesn't become collected. */ - // @ts-ignore: decorator - @unsafe - export function retain(ref: usize): void { - var root = ROOT; - if (!root.has(ref)) { - root.add(ref); - if (implemented) { - if (isDefined(__ref_link)) __ref_link(ref, changetype(root)); - else if (isDefined(__ref_retain)) __ref_retain(ref); - } - } - } - - /** Releases a managed object externally, allowing it to become collected. */ - // @ts-ignore: decorator - @unsafe - export function release(ref: usize): void { - var root = ROOT; - if (root.has(ref)) { - root.delete(ref); - if (implemented) { - if (isDefined(__ref_unlink)) __ref_unlink(ref, changetype(root)); - else if (isDefined(__ref_release)) __ref_release(ref); - } - } - } -} diff --git a/std/assembly/map.ts b/std/assembly/map.ts index 732ded47aa..3dadd6687c 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -1,8 +1,7 @@ /// import { HASH } from "./util/hash"; -import { __runtime_id } from "./runtime"; -import { __gc_mark_members } from "./gc"; +import { __runtime_id, __gc_mark_members } from "./runtime"; // A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 996ced3b2f..18a38f1b9b 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -4,6 +4,7 @@ import { HEADER, HEADER_SIZE, HEADER_MAGIC, adjust } from "./util/runtime"; import { HEAP_BASE, memory } from "./memory"; import { ArrayBufferView } from "./arraybuffer"; +import { E_NOTIMPLEMENTED } from "./util/error"; /** Gets the computed unique id of a class type. */ // @ts-ignore: decorator @@ -15,6 +16,16 @@ export declare function __runtime_id(): u32; @unsafe @builtin export declare function __runtime_instanceof(id: u32, superId: u32): bool; +/** Marks root objects when a tracing GC is present. */ +// @ts-ignore: decorator +@unsafe @builtin +export declare function __gc_mark_roots(): void; + +/** Marks class members when a tracing GC is present. */ +// @ts-ignore: decorator +@unsafe @builtin +export declare function __gc_mark_members(classId: u32, ref: usize): void; + /** Runtime implementation. */ @unmanaged export class runtime { @@ -49,52 +60,6 @@ export namespace runtime { return changetype(header) + HEADER_SIZE; } - /** Reallocates the memory of a managed object that turned out to be too small or too large. */ - // @ts-ignore: decorator - @unsafe - export function reallocate(ref: usize, newPayloadSize: usize): usize { - // Background: When managed objects are allocated these aren't immediately registered with GC - // but can be used as scratch objects while unregistered. This is useful in situations where - // the object must be reallocated multiple times because its final size isn't known beforehand, - // e.g. in Array#filter, with only the final object making it into GC'ed userland. - var header = changetype
(ref - HEADER_SIZE); - var payloadSize = header.payloadSize; - if (payloadSize < newPayloadSize) { - let newAdjustedSize = adjust(newPayloadSize); - if (select(adjust(payloadSize), 0, ref > HEAP_BASE) < newAdjustedSize) { - // move if the allocation isn't large enough or not a heap object - let newHeader = changetype
(memory.allocate(newAdjustedSize)); - newHeader.classId = header.classId; - if (isDefined(__ref_collect)) { - newHeader.reserved1 = 0; - newHeader.reserved2 = 0; - } - let newRef = changetype(newHeader) + HEADER_SIZE; - memory.copy(newRef, ref, payloadSize); - memory.fill(newRef + payloadSize, 0, newPayloadSize - payloadSize); - if (header.classId == HEADER_MAGIC) { - // free right away if not registered yet - assert(ref > HEAP_BASE); // static objects aren't scratch objects - memory.free(changetype(header)); - } else if (isDefined(__ref_collect)) { - // if previously registered, register again - // @ts-ignore: stub - __ref_register(ref); - } - header = newHeader; - ref = newRef; - } else { - // otherwise just clear additional memory within this block - memory.fill(ref + payloadSize, 0, newPayloadSize - payloadSize); - } - } else { - // if the size is the same or less, just update the header accordingly. - // unused space is cleared when grown, so no need to do this here. - } - header.payloadSize = newPayloadSize; - return ref; - } - /** Discards the memory of a managed object that hasn't been registered yet. */ // @ts-ignore: decorator @unsafe @@ -129,14 +94,14 @@ export namespace runtime { // @ts-ignore: decorator @unsafe export function newString(length: i32): usize { - return runtime.register(runtime.allocate(length << 1), __runtime_id()); + return register(allocate(length << 1), __runtime_id()); } /** Allocates and registers, but doesn't initialize the data of, a new `ArrayBuffer` of the specified byteLength. */ // @ts-ignore: decorator @unsafe export function newArrayBuffer(byteLength: i32): usize { - return runtime.register(runtime.allocate(byteLength), __runtime_id()); + return register(allocate(byteLength), __runtime_id()); } /** Allocates and registers, but doesn't initialize the data of, a new `Array` of the specified length and element alignment.*/ @@ -148,9 +113,9 @@ export namespace runtime { // called and the static buffer provided as `data`. This function can also be used to // create typed arrays in that `Array` also implements `ArrayBufferView` but has an // additional `.length_` property that remains unused overhead for typed arrays. - var array = runtime.register(runtime.allocate(offsetof()), id); + var array = register(allocate(offsetof()), id); var bufferSize = length << alignLog2; - var buffer = runtime.register(runtime.allocate(bufferSize), __runtime_id()); + var buffer = register(allocate(bufferSize), __runtime_id()); changetype(array).data = changetype(buffer); // links changetype(array).dataStart = buffer; changetype(array).dataLength = bufferSize; @@ -158,4 +123,36 @@ export namespace runtime { if (data) memory.copy(buffer, data, bufferSize); return array; } + + /** Retains a managed object externally, making sure that it doesn't become collected. */ + // @ts-ignore: decorator + @unsafe + export function retain(ref: usize): void { + if (isDefined(__ref_collect)) { + if (isDefined(__ref_link)) __ref_link(ref, changetype(ROOT)); + else if (isDefined(__ref_retain)) __ref_retain(ref); + } + } + + /** Releases a managed object externally, allowing it to become collected. */ + // @ts-ignore: decorator + @unsafe + export function release(ref: usize): void { + if (isDefined(__ref_collect)) { + if (isDefined(__ref_unlink)) __ref_unlink(ref, changetype(ROOT)); + else if (isDefined(__ref_release)) __ref_release(ref); + } + } + + /** Performs a full garbage collection cycle. */ + export function collect(): void { + if (isDefined(__ref_collect)) __ref_collect(); + else throw new Error(E_NOTIMPLEMENTED); + } } + +class Root {} + +// @ts-ignore +@lazy +var ROOT = new Root(); diff --git a/std/assembly/runtime/arena.ts b/std/assembly/runtime/arena.ts index 8b75953b94..9a31c7a41c 100644 --- a/std/assembly/runtime/arena.ts +++ b/std/assembly/runtime/arena.ts @@ -1,3 +1 @@ import "allocator/arena"; - -// export { memory }; diff --git a/std/assembly/runtime/default.ts b/std/assembly/runtime/default.ts index 6131b14bad..7178fe2a83 100644 --- a/std/assembly/runtime/default.ts +++ b/std/assembly/runtime/default.ts @@ -1,4 +1,4 @@ import "allocator/tlsf"; import "collector/itcm"; -// export { memory, gc }; +export { runtime }; diff --git a/std/assembly/set.ts b/std/assembly/set.ts index 5ac8546353..367e3b3d10 100644 --- a/std/assembly/set.ts +++ b/std/assembly/set.ts @@ -1,8 +1,7 @@ /// import { HASH } from "./util/hash"; -import { __runtime_id } from "./runtime"; -import { __gc_mark_members } from "./gc"; +import { __runtime_id, __gc_mark_members } from "./runtime"; // A deterministic hash set based on CloseTable from https://github.com/jorendorff/dht diff --git a/std/assembly/util/memory.ts b/std/assembly/util/memory.ts index 3b4af9d186..c9e4a82c02 100644 --- a/std/assembly/util/memory.ts +++ b/std/assembly/util/memory.ts @@ -1,154 +1,154 @@ -export function memcpy(dest: usize, src: usize, n: usize): void { // see: musl/src/string/memcpy.c - var w: u32, x: u32; +// export function memcpy(dest: usize, src: usize, n: usize): void { // see: musl/src/string/memcpy.c +// var w: u32, x: u32; - // copy 1 byte each until src is aligned to 4 bytes - while (n && (src & 3)) { - store(dest++, load(src++)); - n--; - } +// // copy 1 byte each until src is aligned to 4 bytes +// while (n && (src & 3)) { +// store(dest++, load(src++)); +// n--; +// } - // if dst is aligned to 4 bytes as well, copy 4 bytes each - if ((dest & 3) == 0) { - while (n >= 16) { - store(dest , load(src )); - store(dest + 4, load(src + 4)); - store(dest + 8, load(src + 8)); - store(dest + 12, load(src + 12)); - src += 16; dest += 16; n -= 16; - } - if (n & 8) { - store(dest , load(src )); - store(dest + 4, load(src + 4)); - dest += 8; src += 8; - } - if (n & 4) { - store(dest, load(src)); - dest += 4; src += 4; - } - if (n & 2) { // drop to 2 bytes each - store(dest, load(src)); - dest += 2; src += 2; - } - if (n & 1) { // drop to 1 byte - store(dest++, load(src++)); - } - return; - } +// // if dst is aligned to 4 bytes as well, copy 4 bytes each +// if ((dest & 3) == 0) { +// while (n >= 16) { +// store(dest , load(src )); +// store(dest + 4, load(src + 4)); +// store(dest + 8, load(src + 8)); +// store(dest + 12, load(src + 12)); +// src += 16; dest += 16; n -= 16; +// } +// if (n & 8) { +// store(dest , load(src )); +// store(dest + 4, load(src + 4)); +// dest += 8; src += 8; +// } +// if (n & 4) { +// store(dest, load(src)); +// dest += 4; src += 4; +// } +// if (n & 2) { // drop to 2 bytes each +// store(dest, load(src)); +// dest += 2; src += 2; +// } +// if (n & 1) { // drop to 1 byte +// store(dest++, load(src++)); +// } +// return; +// } - // if dst is not aligned to 4 bytes, use alternating shifts to copy 4 bytes each - // doing shifts if faster when copying enough bytes (here: 32 or more) - if (n >= 32) { - switch (dest & 3) { - // known to be != 0 - case 1: { - w = load(src); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - n -= 3; - while (n >= 17) { - x = load(src + 1); - store(dest, w >> 24 | x << 8); - w = load(src + 5); - store(dest + 4, x >> 24 | w << 8); - x = load(src + 9); - store(dest + 8, w >> 24 | x << 8); - w = load(src + 13); - store(dest + 12, x >> 24 | w << 8); - src += 16; dest += 16; n -= 16; - } - break; - } - case 2: { - w = load(src); - store(dest++, load(src++)); - store(dest++, load(src++)); - n -= 2; - while (n >= 18) { - x = load(src + 2); - store(dest, w >> 16 | x << 16); - w = load(src + 6); - store(dest + 4, x >> 16 | w << 16); - x = load(src + 10); - store(dest + 8, w >> 16 | x << 16); - w = load(src + 14); - store(dest + 12, x >> 16 | w << 16); - src += 16; dest += 16; n -= 16; - } - break; - } - case 3: { - w = load(src); - store(dest++, load(src++)); - n -= 1; - while (n >= 19) { - x = load(src + 3); - store(dest, w >> 8 | x << 24); - w = load(src + 7); - store(dest + 4, x >> 8 | w << 24); - x = load(src + 11); - store(dest + 8, w >> 8 | x << 24); - w = load(src + 15); - store(dest + 12, x >> 8 | w << 24); - src += 16; dest += 16; n -= 16; - } - break; - } - } - } +// // if dst is not aligned to 4 bytes, use alternating shifts to copy 4 bytes each +// // doing shifts if faster when copying enough bytes (here: 32 or more) +// if (n >= 32) { +// switch (dest & 3) { +// // known to be != 0 +// case 1: { +// w = load(src); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// n -= 3; +// while (n >= 17) { +// x = load(src + 1); +// store(dest, w >> 24 | x << 8); +// w = load(src + 5); +// store(dest + 4, x >> 24 | w << 8); +// x = load(src + 9); +// store(dest + 8, w >> 24 | x << 8); +// w = load(src + 13); +// store(dest + 12, x >> 24 | w << 8); +// src += 16; dest += 16; n -= 16; +// } +// break; +// } +// case 2: { +// w = load(src); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// n -= 2; +// while (n >= 18) { +// x = load(src + 2); +// store(dest, w >> 16 | x << 16); +// w = load(src + 6); +// store(dest + 4, x >> 16 | w << 16); +// x = load(src + 10); +// store(dest + 8, w >> 16 | x << 16); +// w = load(src + 14); +// store(dest + 12, x >> 16 | w << 16); +// src += 16; dest += 16; n -= 16; +// } +// break; +// } +// case 3: { +// w = load(src); +// store(dest++, load(src++)); +// n -= 1; +// while (n >= 19) { +// x = load(src + 3); +// store(dest, w >> 8 | x << 24); +// w = load(src + 7); +// store(dest + 4, x >> 8 | w << 24); +// x = load(src + 11); +// store(dest + 8, w >> 8 | x << 24); +// w = load(src + 15); +// store(dest + 12, x >> 8 | w << 24); +// src += 16; dest += 16; n -= 16; +// } +// break; +// } +// } +// } - // copy remaining bytes one by one - if (n & 16) { - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - } - if (n & 8) { - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - } - if (n & 4) { - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - } - if (n & 2) { - store(dest++, load(src++)); - store(dest++, load(src++)); - } - if (n & 1) { - store(dest++, load(src++)); - } -} +// // copy remaining bytes one by one +// if (n & 16) { +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// } +// if (n & 8) { +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// } +// if (n & 4) { +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// } +// if (n & 2) { +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// } +// if (n & 1) { +// store(dest++, load(src++)); +// } +// } // @ts-ignore: decorator @inline export function memmove(dest: usize, src: usize, n: usize): void { // see: musl/src/string/memmove.c if (dest === src) return; - if (src + n <= dest || dest + n <= src) { - memcpy(dest, src, n); - return; - } + // if (src + n <= dest || dest + n <= src) { + // memcpy(dest, src, n); + // return; + // } if (dest < src) { if ((src & 7) == (dest & 7)) { while (dest & 7) { diff --git a/std/assembly/util/runtime.ts b/std/assembly/util/runtime.ts index 8b98895d1c..838a554123 100644 --- a/std/assembly/util/runtime.ts +++ b/std/assembly/util/runtime.ts @@ -45,3 +45,49 @@ export function adjust(payloadSize: usize): usize { // MAX_LENGTH -> 2^30 = 0x40000000 (MAX_SIZE_32) return 1 << (32 - clz(payloadSize + HEADER_SIZE - 1)); } + +/** Reallocates the memory of a managed object that turned out to be too small or too large. */ +// @ts-ignore: decorator +@unsafe +export function reallocate(ref: usize, newPayloadSize: usize): usize { + // Background: When managed objects are allocated these aren't immediately registered with GC + // but can be used as scratch objects while unregistered. This is useful in situations where + // the object must be reallocated multiple times because its final size isn't known beforehand, + // e.g. in Array#filter, with only the final object making it into GC'ed userland. + var header = changetype
(ref - HEADER_SIZE); + var payloadSize = header.payloadSize; + if (payloadSize < newPayloadSize) { + let newAdjustedSize = adjust(newPayloadSize); + if (select(adjust(payloadSize), 0, ref > HEAP_BASE) < newAdjustedSize) { + // move if the allocation isn't large enough or not a heap object + let newHeader = changetype
(memory.allocate(newAdjustedSize)); + newHeader.classId = header.classId; + if (isDefined(__ref_collect)) { + newHeader.reserved1 = 0; + newHeader.reserved2 = 0; + } + let newRef = changetype(newHeader) + HEADER_SIZE; + memory.copy(newRef, ref, payloadSize); + memory.fill(newRef + payloadSize, 0, newPayloadSize - payloadSize); + if (header.classId == HEADER_MAGIC) { + // free right away if not registered yet + assert(ref > HEAP_BASE); // static objects aren't scratch objects + memory.free(changetype(header)); + } else if (isDefined(__ref_collect)) { + // if previously registered, register again + // @ts-ignore: stub + __ref_register(ref); + } + header = newHeader; + ref = newRef; + } else { + // otherwise just clear additional memory within this block + memory.fill(ref + payloadSize, 0, newPayloadSize - payloadSize); + } + } else { + // if the size is the same or less, just update the header accordingly. + // unused space is cleared when grown, so no need to do this here. + } + header.payloadSize = newPayloadSize; + return ref; +} diff --git a/tests/compiler/assert-nonnull.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat index fb3865de3f..91afd2e4b4 100644 --- a/tests/compiler/assert-nonnull.optimized.wat +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -58,7 +58,7 @@ if i32.const 0 i32.const 16 - i32.const 97 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -72,7 +72,7 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/assert-nonnull.untouched.wat b/tests/compiler/assert-nonnull.untouched.wat index 812bb4a931..21c264d2ac 100644 --- a/tests/compiler/assert-nonnull.untouched.wat +++ b/tests/compiler/assert-nonnull.untouched.wat @@ -74,7 +74,7 @@ if i32.const 0 i32.const 16 - i32.const 97 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -88,7 +88,7 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -128,7 +128,7 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index c23bee8665..b44b2318d3 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -106,7 +106,7 @@ if i32.const 0 i32.const 16 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -121,7 +121,7 @@ if i32.const 0 i32.const 16 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index 158fa3bb08..72e72191f9 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -139,7 +139,7 @@ if i32.const 0 i32.const 16 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -156,7 +156,7 @@ if i32.const 0 i32.const 16 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/class-extends.optimized.wat b/tests/compiler/class-extends.optimized.wat index d75befae0d..6ecc375513 100644 --- a/tests/compiler/class-extends.optimized.wat +++ b/tests/compiler/class-extends.optimized.wat @@ -1,15 +1,47 @@ (module (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) - (memory $0 0) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\01\00\00\00,") + (data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 72) "\01\00\00\00\1e") + (data (i32.const 88) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $class-extends/test)) + (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) + (export "runtime.discard" (func $~lib/runtime/runtime.discard)) + (export "runtime.register" (func $~lib/runtime/runtime.register)) + (export "runtime.newString" (func $~lib/runtime/runtime.newString)) + (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export ".setargc" (func $~lib/setargc)) + (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "runtime.retain" (func $~lib/runtime/runtime.retain)) + (export "runtime.release" (func $~lib/runtime/runtime.release)) + (export "runtime.collect" (func $~lib/runtime/runtime.collect)) (export ".capabilities" (global $~lib/capabilities)) - (func $class-extends/test (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) + (start $start) + (func $class-extends/test (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load drop @@ -23,7 +55,1884 @@ i32.const 3 i32.store16 offset=4 ) - (func $null (; 1 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.get $1 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 159 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/allocator/tlsf/Root#setHead (; 4 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 184 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 32 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/allocator/tlsf/Block#get:right (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + i32.const -4 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 104 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 8 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 105 + i32.const 11 + call $~lib/env/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 447 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $~lib/allocator/tlsf/Root#getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 175 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 32 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 176 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load offset=96 + ) + (func $~lib/allocator/tlsf/Root#getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load offset=4 + ) + (func $~lib/allocator/tlsf/Root#remove (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.tee $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 277 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $3 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 279 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + i32.const 256 + i32.lt_u + if (result i32) + local.get $3 + i32.const 8 + i32.div_u + local.set $4 + i32.const 0 + else + local.get $3 + local.get $3 + call $~lib/allocator/tlsf/fls + local.tee $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $4 + local.get $2 + i32.const 7 + i32.sub + end + local.set $2 + local.get $1 + i32.load offset=8 + local.set $3 + local.get $1 + i32.load offset=4 + local.tee $5 + if + local.get $5 + local.get $3 + i32.store offset=8 + end + local.get $3 + if + local.get $3 + local.get $5 + i32.store offset=4 + end + local.get $0 + local.get $2 + local.get $4 + call $~lib/allocator/tlsf/Root#getHead + local.get $1 + i32.eq + if + local.get $0 + local.get $2 + local.get $4 + local.get $3 + call $~lib/allocator/tlsf/Root#setHead + local.get $3 + i32.eqz + if + local.get $0 + local.get $2 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $4 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $1 + call $~lib/allocator/tlsf/Root#setSLMap + local.get $1 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $2 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/allocator/tlsf/Block#get:left (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 96 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 97 + i32.const 11 + call $~lib/env/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/Root#setJump (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + i32.load + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 353 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/Block#get:right + local.get $1 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 354 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 355 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 4 + i32.sub + local.get $0 + i32.store + ) + (func $~lib/allocator/tlsf/Root#insert (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 208 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.tee $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 210 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + i32.const -4 + i32.and + local.tee $4 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $4 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 212 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 216 + i32.const 23 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.load + local.tee $4 + i32.const 1 + i32.and + if + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $4 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $3 + i32.add + local.tee $3 + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $2 + i32.load + local.set $4 + end + local.get $3 + i32.const 2 + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 230 + i32.const 24 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.tee $5 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 232 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $3 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $5 + i32.add + local.tee $3 + i32.store + end + local.get $2 + local.get $4 + i32.const 2 + i32.or + i32.store + local.get $1 + local.get $2 + call $~lib/allocator/tlsf/Root#setJump + local.get $3 + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $3 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 245 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $3 + i32.const 256 + i32.lt_u + if (result i32) + local.get $3 + i32.const 8 + i32.div_u + local.set $3 + i32.const 0 + else + local.get $3 + local.get $3 + call $~lib/allocator/tlsf/fls + local.tee $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $3 + local.get $2 + i32.const 7 + i32.sub + end + local.tee $2 + local.get $3 + call $~lib/allocator/tlsf/Root#getHead + local.set $4 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $4 + i32.store offset=8 + local.get $4 + if + local.get $4 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $2 + local.get $3 + local.get $1 + call $~lib/allocator/tlsf/Root#setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $2 + i32.shl + i32.or + i32.store + local.get $0 + local.get $2 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $3 + i32.shl + i32.or + call $~lib/allocator/tlsf/Root#setSLMap + ) + (func $~lib/allocator/tlsf/Root#addMemory (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + local.get $2 + i32.gt_u + if + i32.const 0 + i32.const 24 + i32.const 396 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 397 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 398 + i32.const 4 + call $~lib/env/abort + unreachable + end + i32.const 2912 + i32.load + local.tee $3 + if + local.get $1 + local.get $3 + i32.const 4 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 403 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 8 + i32.sub + local.get $3 + i32.eq + if + local.get $3 + i32.load + local.set $4 + local.get $1 + i32.const 8 + i32.sub + local.set $1 + end + else + local.get $1 + local.get $0 + i32.const 2916 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 412 + i32.const 6 + call $~lib/env/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.tee $2 + i32.const 32 + i32.lt_u + if + return + end + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $2 + i32.const 16 + i32.sub + i32.const 1 + i32.or + i32.or + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.tee $2 + i32.const 2 + i32.store + i32.const 2912 + local.get $2 + i32.store + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#insert + ) + (func $~lib/allocator/tlsf/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/Root#search (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $1 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 315 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 256 + i32.lt_u + if (result i32) + i32.const 0 + local.set $2 + local.get $1 + i32.const 8 + i32.div_u + else + local.get $1 + call $~lib/allocator/tlsf/fls + local.tee $3 + i32.const 7 + i32.sub + local.set $2 + local.get $1 + local.get $3 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.tee $1 + i32.const 31 + i32.lt_u + if (result i32) + local.get $1 + i32.const 1 + i32.add + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + i32.const 0 + end + end + local.set $1 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const -1 + local.get $1 + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + else + local.get $0 + i32.load + i32.const -1 + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/ffs + local.tee $2 + call $~lib/allocator/tlsf/Root#getSLMap + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 342 + i32.const 16 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + else + i32.const 0 + end + end + ) + (func $~lib/allocator/tlsf/Root#use (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $1 + i32.load + local.tee $4 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 367 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 16 + i32.ge_u + local.tee $3 + if + local.get $2 + i32.const 1073741824 + i32.lt_u + local.set $3 + end + local.get $3 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 368 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 369 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $4 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $3 + i32.const 24 + i32.ge_u + if + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $2 + i32.or + i32.store + local.get $1 + i32.const 8 + i32.add + local.get $2 + i32.add + local.tee $2 + local.get $3 + i32.const 8 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#insert + else + local.get $1 + local.get $4 + i32.const -2 + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 387 + i32.const 25 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $0 + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 + i32.const 8 + i32.add + ) + (func $~lib/allocator/tlsf/__mem_allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/allocator/tlsf/ROOT + local.tee $2 + i32.eqz + if + i32.const 1 + current_memory + local.tee $1 + i32.gt_s + local.tee $2 + if (result i32) + i32.const 1 + local.get $1 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + local.get $2 + end + if + unreachable + end + i32.const 120 + local.set $2 + i32.const 120 + global.set $~lib/allocator/tlsf/ROOT + i32.const 2912 + i32.const 0 + i32.store + i32.const 120 + i32.const 0 + i32.store + i32.const 0 + local.set $1 + loop $repeat|0 + local.get $1 + i32.const 22 + i32.lt_u + if + i32.const 120 + local.get $1 + i32.const 0 + call $~lib/allocator/tlsf/Root#setSLMap + i32.const 0 + local.set $3 + loop $repeat|1 + local.get $3 + i32.const 32 + i32.lt_u + if + i32.const 120 + local.get $1 + local.get $3 + i32.const 0 + call $~lib/allocator/tlsf/Root#setHead + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $repeat|1 + end + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end + end + i32.const 120 + i32.const 3040 + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + end + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + local.get $2 + local.get $0 + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + i32.const 16 + local.get $0 + i32.const 16 + i32.gt_u + select + local.tee $1 + call $~lib/allocator/tlsf/Root#search + local.tee $0 + i32.eqz + if + current_memory + local.tee $0 + local.get $1 + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $0 + local.get $3 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $2 + local.get $0 + i32.const 16 + i32.shl + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/Root#search + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 502 + i32.const 12 + call $~lib/env/abort + unreachable + end + end + local.get $0 + i32.load + i32.const -4 + i32.and + local.get $1 + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 505 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/runtime/runtime.allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/tlsf/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 + i32.add + ) + (func $~lib/allocator/tlsf/__mem_free (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.tee $1 + if + local.get $0 + i32.const 8 + i32.sub + local.tee $2 + i32.load + local.tee $3 + i32.const 1 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + i32.const 1 + i32.or + i32.store + local.get $1 + local.get $0 + i32.const 8 + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/runtime/runtime.discard (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 120 + i32.le_u + if + i32.const 0 + i32.const 88 + i32.const 68 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 88 + i32.const 70 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/collector/itcm/maybeInit (; 21 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/collector/itcm/state + i32.eqz + if + i32.const 16 + call $~lib/allocator/tlsf/__mem_allocate + global.set $~lib/collector/itcm/fromSpace + global.get $~lib/collector/itcm/fromSpace + local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + i32.const 16 + call $~lib/allocator/tlsf/__mem_allocate + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/toSpace + local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter + i32.const 1 + global.set $~lib/collector/itcm/state + end + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $0 + i32.or + i32.store offset=8 + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.and + local.get $1 + i32.or + i32.store offset=8 + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/collector/itcm/__ref_register (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + call $~lib/collector/itcm/maybeInit + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + global.get $~lib/collector/itcm/white + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.or + i32.store offset=8 + global.get $~lib/collector/itcm/fromSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + ) + (func $~lib/runtime/runtime.register (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 120 + i32.le_u + if + i32.const 0 + i32.const 88 + i32.const 82 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 88 + i32.const 84 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + block + local.get $0 + call $~lib/collector/itcm/__ref_register + end + local.get $0 + ) + (func $~lib/runtime/runtime.newString (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + i32.const 1 + call $~lib/runtime/runtime.register + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/collector/itcm/iter + local.get $0 + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + local.tee $2 + local.get $0 + i32.load offset=12 + local.tee $1 + i32.store offset=12 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $2 + i32.or + i32.store offset=8 + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/__ref_link (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + global.get $~lib/collector/itcm/white + i32.eqz + local.get $1 + i32.const 16 + i32.sub + local.tee $2 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + local.tee $1 + if (result i32) + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + else + local.get $1 + end + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/memory/memory.copy (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + br $continue|0 + end + end + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 + end + end + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end + end + end + loop $continue|5 + local.get $2 + if + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + ) + (func $~lib/runtime/runtime.newArray (; 30 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 16 + call $~lib/runtime/runtime.allocate + local.get $2 + call $~lib/runtime/runtime.register + local.tee $2 + local.set $6 + local.get $0 + local.get $1 + i32.shl + local.tee $4 + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + local.tee $5 + local.tee $1 + local.get $2 + i32.load + i32.ne + if + local.get $1 + local.get $6 + call $~lib/collector/itcm/__ref_link + end + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $5 + i32.store offset=4 + local.get $2 + local.get $4 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=12 + local.get $3 + if + local.get $5 + local.get $3 + local.get $4 + call $~lib/memory/memory.copy + end + local.get $2 + ) + (func $~lib/runtime/runtime.retain (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/itcm/__ref_link + ) + (func $~lib/runtime/runtime.release (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/collector/itcm/step (; 33 ;) (type $FUNCSIG$v) + (local $0 i32) + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + global.get $~lib/collector/itcm/state + local.tee $0 + if + local.get $0 + i32.const 1 + i32.sub + br_table $case1|0 $case2|0 $case3|0 $break|0 + end + unreachable + end + call $~lib/runtime/__gc_mark_roots + i32.const 2 + global.set $~lib/collector/itcm/state + br $break|0 + end + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.or + i32.store offset=8 + block $__inlined_func$~lib/runtime/__gc_mark_members + block $invalid + local.get $0 + i32.load + i32.const 1 + i32.sub + br_table $__inlined_func$~lib/runtime/__gc_mark_members $__inlined_func$~lib/runtime/__gc_mark_members $__inlined_func$~lib/runtime/__gc_mark_members $invalid + end + unreachable + end + else + call $~lib/runtime/__gc_mark_roots + global.get $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $0 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $0 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + end + end + br $break|0 + end + global.get $~lib/collector/itcm/iter + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + local.get $0 + i32.const 120 + i32.ge_u + if + local.get $0 + call $~lib/allocator/tlsf/__mem_free + end + else + global.get $~lib/collector/itcm/toSpace + local.tee $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + i32.const 1 + global.set $~lib/collector/itcm/state + end + end + ) + (func $~lib/collector/itcm/__ref_collect (; 34 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/maybeInit + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|0 + end + end + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 + end + ) + (func $~lib/runtime/runtime.collect (; 35 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/__ref_collect + ) + (func $start (; 36 ;) (type $FUNCSIG$v) + i32.const 0 + call $~lib/runtime/runtime.allocate + i32.const 3 + call $~lib/runtime/runtime.register + global.set $~lib/runtime/ROOT + ) + (func $~lib/runtime/__gc_mark_roots (; 37 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/runtime/ROOT + local.tee $0 + if + call $~lib/collector/itcm/maybeInit + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#makeGray + end + end + ) + (func $~lib/runtime/__runtime_instanceof (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block $nope + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/string/String + local.get $0 + i32.const 1 + i32.sub + br_table $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope + end + local.get $1 + i32.const 1 + i32.eq + return + end + local.get $1 + i32.const 2 + i32.eq + return + end + local.get $1 + i32.const 3 + i32.eq + return + end + i32.const 0 + ) + (func $null (; 39 ;) (type $FUNCSIG$v) nop ) + (func $~lib/runtime/runtime.newArray|trampoline (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 3 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/runtime/runtime.newArray + ) + (func $~lib/setargc (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.set $~lib/argc + ) ) diff --git a/tests/compiler/class-extends.untouched.wat b/tests/compiler/class-extends.untouched.wat index 98594ca223..0d1aacb45f 100644 --- a/tests/compiler/class-extends.untouched.wat +++ b/tests/compiler/class-extends.untouched.wat @@ -1,16 +1,65 @@ (module (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) - (memory $0 0) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 72) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) + (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) + (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) + (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) + (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) + (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) + (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) + (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) + (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) + (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) + (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) + (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) + (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) + (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) + (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 120)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $class-extends/test)) + (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) + (export "runtime.discard" (func $~lib/runtime/runtime.discard)) + (export "runtime.register" (func $~lib/runtime/runtime.register)) + (export "runtime.newString" (func $~lib/runtime/runtime.newString)) + (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export ".setargc" (func $~lib/setargc)) + (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "runtime.retain" (func $~lib/runtime/runtime.retain)) + (export "runtime.release" (func $~lib/runtime/runtime.release)) + (export "runtime.collect" (func $~lib/runtime/runtime.collect)) (export ".capabilities" (global $~lib/capabilities)) - (func $class-extends/test (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) + (start $start) + (func $class-extends/test (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load drop @@ -24,6 +73,2282 @@ i32.const 3 i32.store16 offset=4 ) - (func $null (; 1 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.get $1 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + ) + (func $~lib/util/runtime/adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 0 + local.get $1 + i32.store offset=2912 + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 159 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 4 + i32.mul + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/allocator/tlsf/Root#setHead (; 6 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 184 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + i32.load offset=2912 + ) + (func $~lib/allocator/tlsf/Block#get:right (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 104 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 105 + i32.const 11 + call $~lib/env/abort + unreachable + else + local.get $1 + end + ) + (func $~lib/allocator/tlsf/fls (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 447 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $~lib/allocator/tlsf/Root#getHead (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 175 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 176 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + i32.load offset=96 + ) + (func $~lib/allocator/tlsf/Root#getSLMap (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 4 + i32.mul + i32.add + i32.load offset=4 + ) + (func $~lib/allocator/tlsf/Root#remove (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + i32.load + local.set $2 + local.get $2 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 277 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 279 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $5 + local.get $3 + i32.const 8 + i32.div_u + local.set $6 + else + local.get $3 + call $~lib/allocator/tlsf/fls + local.set $5 + local.get $3 + local.get $5 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $6 + local.get $5 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $5 + end + local.get $1 + i32.load offset=4 + local.set $7 + local.get $1 + i32.load offset=8 + local.set $8 + local.get $7 + if + local.get $7 + local.get $8 + i32.store offset=8 + end + local.get $8 + if + local.get $8 + local.get $7 + i32.store offset=4 + end + local.get $1 + local.get $0 + local.get $5 + local.get $6 + call $~lib/allocator/tlsf/Root#getHead + i32.eq + if + local.get $0 + local.get $5 + local.get $6 + local.get $8 + call $~lib/allocator/tlsf/Root#setHead + local.get $8 + i32.eqz + if + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#getSLMap + local.set $4 + local.get $0 + local.get $5 + local.get $4 + i32.const 1 + local.get $6 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $4 + call $~lib/allocator/tlsf/Root#setSLMap + local.get $4 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $5 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/allocator/tlsf/Block#get:left (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 96 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 97 + i32.const 11 + call $~lib/env/abort + unreachable + else + local.get $1 + end + ) + (func $~lib/allocator/tlsf/Root#setJump (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.load + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 353 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.get $2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 354 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 355 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 4 + i32.sub + local.get $1 + i32.store + ) + (func $~lib/allocator/tlsf/Root#insert (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 208 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.set $2 + local.get $2 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 210 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.tee $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 212 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 216 + i32.const 23 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $5 + local.get $5 + i32.load + local.set $6 + local.get $6 + global.get $~lib/allocator/tlsf/FREE + i32.and + if + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $2 + global.get $~lib/allocator/tlsf/Block.INFO + local.get $6 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $2 + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.set $5 + local.get $5 + i32.load + local.set $6 + end + local.get $2 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 230 + i32.const 24 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $4 + local.get $4 + i32.load + local.set $7 + local.get $7 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 232 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#remove + local.get $4 + local.get $7 + global.get $~lib/allocator/tlsf/Block.INFO + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $7 + i32.store + local.get $4 + local.set $1 + local.get $7 + local.set $2 + end + local.get $5 + local.get $6 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.or + i32.store + local.get $0 + local.get $1 + local.get $5 + call $~lib/allocator/tlsf/Root#setJump + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $7 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $7 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 245 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $8 + local.get $3 + i32.const 8 + i32.div_u + local.set $9 + else + local.get $3 + call $~lib/allocator/tlsf/fls + local.set $8 + local.get $3 + local.get $8 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $9 + local.get $8 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $8 + end + local.get $0 + local.get $8 + local.get $9 + call $~lib/allocator/tlsf/Root#getHead + local.set $10 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $10 + i32.store offset=8 + local.get $10 + if + local.get $10 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $8 + local.get $9 + local.get $1 + call $~lib/allocator/tlsf/Root#setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $8 + i32.shl + i32.or + i32.store + local.get $0 + local.get $8 + local.get $0 + local.get $8 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $9 + i32.shl + i32.or + call $~lib/allocator/tlsf/Root#setSLMap + ) + (func $~lib/allocator/tlsf/Root#addMemory (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + local.get $2 + i32.le_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 396 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 397 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 398 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/Root#get:tailRef + local.set $3 + i32.const 0 + local.set $4 + local.get $3 + if + local.get $1 + local.get $3 + i32.const 4 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 403 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.get $3 + i32.eq + if + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $1 + local.get $3 + i32.load + local.set $4 + end + else + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 412 + i32.const 6 + call $~lib/env/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.set $5 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.add + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + i32.lt_u + if + i32.const 0 + return + end + local.get $5 + i32.const 2 + global.get $~lib/allocator/tlsf/Block.INFO + i32.mul + i32.sub + local.set $6 + local.get $1 + local.set $7 + local.get $7 + local.get $6 + global.get $~lib/allocator/tlsf/FREE + i32.or + local.get $4 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.or + i32.store + local.get $7 + i32.const 0 + i32.store offset=4 + local.get $7 + i32.const 0 + i32.store offset=8 + local.get $1 + local.get $5 + i32.add + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $8 + local.get $8 + i32.const 0 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.or + i32.store + local.get $0 + local.get $8 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $0 + local.get $7 + call $~lib/allocator/tlsf/Root#insert + i32.const 1 + ) + (func $~lib/allocator/tlsf/ffs (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/ffs (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/Root#search (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $1 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $2 + if (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $2 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 315 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $3 + local.get $1 + i32.const 8 + i32.div_u + local.set $4 + else + local.get $1 + call $~lib/allocator/tlsf/fls + local.set $3 + local.get $1 + local.get $3 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $4 + local.get $3 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $3 + local.get $4 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 1 + i32.sub + i32.lt_u + if + local.get $4 + i32.const 1 + i32.add + local.set $4 + else + local.get $3 + i32.const 1 + i32.add + local.set $3 + i32.const 0 + local.set $4 + end + end + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 0 + i32.const -1 + i32.xor + local.get $4 + i32.shl + i32.and + local.set $5 + local.get $5 + i32.eqz + if + local.get $0 + i32.load + i32.const 0 + i32.const -1 + i32.xor + local.get $3 + i32.const 1 + i32.add + i32.shl + i32.and + local.set $2 + local.get $2 + i32.eqz + if + i32.const 0 + local.set $6 + else + local.get $2 + call $~lib/allocator/tlsf/ffs + local.set $3 + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#getSLMap + local.tee $7 + if (result i32) + local.get $7 + else + i32.const 0 + i32.const 24 + i32.const 342 + i32.const 16 + call $~lib/env/abort + unreachable + end + local.set $5 + local.get $0 + local.get $3 + local.get $5 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $6 + end + else + local.get $0 + local.get $3 + local.get $5 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $6 + end + local.get $6 + ) + (func $~lib/allocator/tlsf/Root#use (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 367 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $2 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 368 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 369 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $3 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.sub + local.set $5 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.add + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.or + i32.store + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + local.get $2 + i32.add + local.set $4 + local.get $4 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#insert + else + local.get $1 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.const -1 + i32.xor + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 387 + i32.const 25 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $4 + local.get $4 + local.get $4 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const -1 + i32.xor + i32.and + i32.store + end + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + ) + (func $~lib/allocator/tlsf/__mem_allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + i32.eqz + if + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $2 + current_memory + local.set $3 + local.get $2 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $4 + local.get $4 + local.get $3 + i32.gt_s + local.tee $5 + if (result i32) + local.get $4 + local.get $3 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + local.get $5 + end + if + unreachable + end + local.get $2 + local.tee $1 + global.set $~lib/allocator/tlsf/ROOT + local.get $1 + i32.const 0 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $1 + i32.const 0 + i32.store + block $break|0 + i32.const 0 + local.set $5 + loop $repeat|0 + local.get $5 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + br_if $break|0 + block + local.get $1 + local.get $5 + i32.const 0 + call $~lib/allocator/tlsf/Root#setSLMap + block $break|1 + i32.const 0 + local.set $6 + loop $repeat|1 + local.get $6 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + br_if $break|1 + local.get $1 + local.get $5 + local.get $6 + i32.const 0 + call $~lib/allocator/tlsf/Root#setHead + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $repeat|1 + unreachable + end + unreachable + end + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $repeat|0 + unreachable + end + unreachable + end + local.get $1 + local.get $2 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + end + local.get $0 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.gt_u + if + unreachable + end + local.get $0 + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.tee $4 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + local.tee $3 + local.get $4 + local.get $3 + i32.gt_u + select + local.set $0 + local.get $1 + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.set $7 + local.get $7 + i32.eqz + if + current_memory + local.set $4 + local.get $0 + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $3 + local.get $4 + local.tee $2 + local.get $3 + local.tee $5 + local.get $2 + local.get $5 + i32.gt_s + select + local.set $2 + local.get $2 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + current_memory + local.set $5 + local.get $1 + local.get $4 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + local.get $1 + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.tee $6 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 502 + i32.const 12 + call $~lib/env/abort + unreachable + else + local.get $6 + end + local.set $7 + end + local.get $7 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.get $0 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 505 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $1 + local.get $7 + local.get $0 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/memory/memory.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_allocate + return + ) + (func $~lib/runtime/runtime.allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/allocator/tlsf/__mem_free (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + if + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $2 + local.get $2 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/memory/memory.free (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/runtime/runtime.discard (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 88 + i32.const 68 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $1 + local.get $1 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 88 + i32.const 70 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/memory/memory.free + ) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + ) + (func $~lib/collector/itcm/maybeInit (; 28 ;) (type $FUNCSIG$v) + global.get $~lib/collector/itcm/state + i32.const 0 + i32.eq + if + global.get $~lib/util/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/fromSpace + global.get $~lib/collector/itcm/fromSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/fromSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/fromSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/util/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/toSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/toSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter + i32.const 1 + global.set $~lib/collector/itcm/state + end + ) + (func $~lib/collector/itcm/ManagedObject#set:color (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $1 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/ManagedObject#set:next (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $0 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/collector/itcm/__ref_register (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + global.get $~lib/collector/itcm/white + call $~lib/collector/itcm/ManagedObject#set:color + global.get $~lib/collector/itcm/fromSpace + local.get $2 + call $~lib/collector/itcm/ManagedObjectList#push + ) + (func $~lib/runtime/runtime.register (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 88 + i32.const 82 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 88 + i32.const 84 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $~lib/collector/itcm/__ref_register + local.get $0 + ) + (func $~lib/runtime/runtime.newString (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + i32.const 1 + call $~lib/runtime/runtime.register + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + ) + (func $~lib/collector/itcm/ManagedObject#get:color (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#get:next (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#unlink (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + local.set $1 + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/collector/itcm/iter + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + call $~lib/collector/itcm/ManagedObject#unlink + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/__ref_link (; 40 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + local.set $3 + local.get $3 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eqz + i32.eq + local.tee $2 + if (result i32) + block $~lib/collector/itcm/refToObj|inlined.3 (result i32) + local.get $0 + local.set $2 + local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + else + local.get $2 + end + if + local.get $3 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/memory/memory.copy (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|2 + end + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + end + ) + (func $~lib/runtime/runtime.newArray (; 42 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + i32.const 16 + call $~lib/runtime/runtime.allocate + local.get $2 + call $~lib/runtime/runtime.register + local.set $4 + local.get $0 + local.get $1 + i32.shl + local.set $5 + local.get $5 + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + local.set $6 + local.get $4 + local.tee $7 + local.get $6 + local.tee $8 + local.get $7 + i32.load + local.tee $9 + i32.ne + if (result i32) + nop + local.get $8 + local.get $7 + call $~lib/collector/itcm/__ref_link + local.get $8 + else + local.get $8 + end + i32.store + local.get $4 + local.get $6 + i32.store offset=4 + local.get $4 + local.get $5 + i32.store offset=8 + local.get $4 + local.get $0 + i32.store offset=12 + local.get $3 + if + local.get $6 + local.get $3 + local.get $5 + call $~lib/memory/memory.copy + end + local.get $4 + ) + (func $~lib/runtime/Root#constructor (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/runtime/runtime.allocate + i32.const 3 + call $~lib/runtime/runtime.register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/itcm/__ref_link + ) + (func $~lib/runtime/runtime.release (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/collector/itcm/step (; 46 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + global.get $~lib/collector/itcm/state + local.set $1 + local.get $1 + i32.const 0 + i32.eq + br_if $case0|0 + local.get $1 + i32.const 1 + i32.eq + br_if $case1|0 + local.get $1 + i32.const 2 + i32.eq + br_if $case2|0 + local.get $1 + i32.const 3 + i32.eq + br_if $case3|0 + br $break|0 + end + unreachable + end + block + call $~lib/runtime/__gc_mark_roots + i32.const 2 + global.set $~lib/collector/itcm/state + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + call $~lib/collector/itcm/ManagedObject#set:color + local.get $0 + i32.load + block $~lib/collector/itcm/objToRef|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + call $~lib/runtime/__gc_mark_members + else + call $~lib/runtime/__gc_mark_roots + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $1 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $1 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $1 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + end + end + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.ge_u + if + local.get $0 + call $~lib/memory/memory.free + end + else + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + i32.const 1 + global.set $~lib/collector/itcm/state + end + br $break|0 + unreachable + end + unreachable + end + ) + (func $~lib/collector/itcm/__ref_collect (; 47 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/maybeInit + block $break|0 + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 + end + end + ) + (func $~lib/runtime/runtime.collect (; 48 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 50 ;) (type $FUNCSIG$v) + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT + ) + (func $~lib/collector/itcm/__ref_mark (; 51 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.4 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/runtime/__gc_mark_roots (; 52 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/runtime/ROOT + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + ) + (func $~lib/runtime/__gc_mark_members (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + block $invalid + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/string/String + local.get $0 + br_table $invalid $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid + end + return + end + return + end + return + end + unreachable + ) + (func $~lib/runtime/__runtime_instanceof (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block $nope + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/string/String + local.get $0 + br_table $nope $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope + end + local.get $1 + i32.const 1 + i32.eq + return + end + local.get $1 + i32.const 2 + i32.eq + return + end + local.get $1 + i32.const 3 + i32.eq + return + end + i32.const 0 + return + ) + (func $null (; 55 ;) (type $FUNCSIG$v) + ) + (func $~lib/runtime/runtime.newArray|trampoline (; 56 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 3 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/runtime/runtime.newArray + ) + (func $~lib/setargc (; 57 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.set $~lib/argc ) ) diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index 62d6025243..5e1638c44b 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -1,17 +1,49 @@ (module + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\10") (data (i32.const 24) "c\00l\00a\00s\00s\00.\00t\00s") + (data (i32.const 40) "\01\00\00\00,") + (data (i32.const 56) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 104) "\01\00\00\00\1e") + (data (i32.const 120) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 1 funcref) - (elem (i32.const 0) $start) + (elem (i32.const 0) $null) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $class/test)) + (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) + (export "runtime.discard" (func $~lib/runtime/runtime.discard)) + (export "runtime.register" (func $~lib/runtime/runtime.register)) + (export "runtime.newString" (func $~lib/runtime/runtime.newString)) + (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export ".setargc" (func $~lib/setargc)) + (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "runtime.retain" (func $~lib/runtime/runtime.retain)) + (export "runtime.release" (func $~lib/runtime/runtime.release)) + (export "runtime.collect" (func $~lib/runtime/runtime.collect)) (export ".capabilities" (global $~lib/capabilities)) - (func $class/test (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (start $start) + (func $class/test (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load drop @@ -32,7 +64,1884 @@ i32.store8 offset=6 local.get $0 ) - (func $start (; 1 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.get $1 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 56 + i32.const 159 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/allocator/tlsf/Root#setHead (; 4 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 56 + i32.const 184 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 32 + i32.ge_u + if + i32.const 0 + i32.const 56 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/allocator/tlsf/Block#get:right (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + i32.const -4 + i32.and + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 104 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 8 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 105 + i32.const 11 + call $~lib/env/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 447 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $~lib/allocator/tlsf/Root#getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 56 + i32.const 175 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 32 + i32.ge_u + if + i32.const 0 + i32.const 56 + i32.const 176 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load offset=96 + ) + (func $~lib/allocator/tlsf/Root#getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 56 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load offset=4 + ) + (func $~lib/allocator/tlsf/Root#remove (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.tee $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 277 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $3 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 279 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + i32.const 256 + i32.lt_u + if (result i32) + local.get $3 + i32.const 8 + i32.div_u + local.set $4 + i32.const 0 + else + local.get $3 + local.get $3 + call $~lib/allocator/tlsf/fls + local.tee $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $4 + local.get $2 + i32.const 7 + i32.sub + end + local.set $2 + local.get $1 + i32.load offset=8 + local.set $3 + local.get $1 + i32.load offset=4 + local.tee $5 + if + local.get $5 + local.get $3 + i32.store offset=8 + end + local.get $3 + if + local.get $3 + local.get $5 + i32.store offset=4 + end + local.get $0 + local.get $2 + local.get $4 + call $~lib/allocator/tlsf/Root#getHead + local.get $1 + i32.eq + if + local.get $0 + local.get $2 + local.get $4 + local.get $3 + call $~lib/allocator/tlsf/Root#setHead + local.get $3 + i32.eqz + if + local.get $0 + local.get $2 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $4 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $1 + call $~lib/allocator/tlsf/Root#setSLMap + local.get $1 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $2 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/allocator/tlsf/Block#get:left (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 96 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 97 + i32.const 11 + call $~lib/env/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/Root#setJump (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + i32.load + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 353 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/Block#get:right + local.get $1 + i32.ne + if + i32.const 0 + i32.const 56 + i32.const 354 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 355 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 4 + i32.sub + local.get $0 + i32.store + ) + (func $~lib/allocator/tlsf/Root#insert (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 208 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.tee $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 210 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + i32.const -4 + i32.and + local.tee $4 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $4 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 212 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $2 + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 216 + i32.const 23 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.load + local.tee $4 + i32.const 1 + i32.and + if + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $4 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $3 + i32.add + local.tee $3 + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $2 + i32.load + local.set $4 + end + local.get $3 + i32.const 2 + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 230 + i32.const 24 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.tee $5 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 232 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $3 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $5 + i32.add + local.tee $3 + i32.store + end + local.get $2 + local.get $4 + i32.const 2 + i32.or + i32.store + local.get $1 + local.get $2 + call $~lib/allocator/tlsf/Root#setJump + local.get $3 + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $3 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 245 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $3 + i32.const 256 + i32.lt_u + if (result i32) + local.get $3 + i32.const 8 + i32.div_u + local.set $3 + i32.const 0 + else + local.get $3 + local.get $3 + call $~lib/allocator/tlsf/fls + local.tee $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $3 + local.get $2 + i32.const 7 + i32.sub + end + local.tee $2 + local.get $3 + call $~lib/allocator/tlsf/Root#getHead + local.set $4 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $4 + i32.store offset=8 + local.get $4 + if + local.get $4 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $2 + local.get $3 + local.get $1 + call $~lib/allocator/tlsf/Root#setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $2 + i32.shl + i32.or + i32.store + local.get $0 + local.get $2 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $3 + i32.shl + i32.or + call $~lib/allocator/tlsf/Root#setSLMap + ) + (func $~lib/allocator/tlsf/Root#addMemory (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + local.get $2 + i32.gt_u + if + i32.const 0 + i32.const 56 + i32.const 396 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 56 + i32.const 397 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 56 + i32.const 398 + i32.const 4 + call $~lib/env/abort + unreachable + end + i32.const 2912 + i32.load + local.tee $3 + if + local.get $1 + local.get $3 + i32.const 4 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 56 + i32.const 403 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 8 + i32.sub + local.get $3 + i32.eq + if + local.get $3 + i32.load + local.set $4 + local.get $1 + i32.const 8 + i32.sub + local.set $1 + end + else + local.get $1 + local.get $0 + i32.const 2916 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 56 + i32.const 412 + i32.const 6 + call $~lib/env/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.tee $2 + i32.const 32 + i32.lt_u + if + return + end + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $2 + i32.const 16 + i32.sub + i32.const 1 + i32.or + i32.or + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.tee $2 + i32.const 2 + i32.store + i32.const 2912 + local.get $2 + i32.store + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#insert + ) + (func $~lib/allocator/tlsf/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/Root#search (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $1 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 315 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 256 + i32.lt_u + if (result i32) + i32.const 0 + local.set $2 + local.get $1 + i32.const 8 + i32.div_u + else + local.get $1 + call $~lib/allocator/tlsf/fls + local.tee $3 + i32.const 7 + i32.sub + local.set $2 + local.get $1 + local.get $3 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.tee $1 + i32.const 31 + i32.lt_u + if (result i32) + local.get $1 + i32.const 1 + i32.add + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + i32.const 0 + end + end + local.set $1 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const -1 + local.get $1 + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + else + local.get $0 + i32.load + i32.const -1 + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/ffs + local.tee $2 + call $~lib/allocator/tlsf/Root#getSLMap + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 342 + i32.const 16 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + else + i32.const 0 + end + end + ) + (func $~lib/allocator/tlsf/Root#use (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $1 + i32.load + local.tee $4 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 367 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 16 + i32.ge_u + local.tee $3 + if + local.get $2 + i32.const 1073741824 + i32.lt_u + local.set $3 + end + local.get $3 + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 368 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 56 + i32.const 369 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $4 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $3 + i32.const 24 + i32.ge_u + if + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $2 + i32.or + i32.store + local.get $1 + i32.const 8 + i32.add + local.get $2 + i32.add + local.tee $2 + local.get $3 + i32.const 8 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#insert + else + local.get $1 + local.get $4 + i32.const -2 + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 387 + i32.const 25 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $0 + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 + i32.const 8 + i32.add + ) + (func $~lib/allocator/tlsf/__mem_allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/allocator/tlsf/ROOT + local.tee $2 + i32.eqz + if + i32.const 1 + current_memory + local.tee $1 + i32.gt_s + local.tee $2 + if (result i32) + i32.const 1 + local.get $1 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + local.get $2 + end + if + unreachable + end + i32.const 152 + local.set $2 + i32.const 152 + global.set $~lib/allocator/tlsf/ROOT + i32.const 2912 + i32.const 0 + i32.store + i32.const 152 + i32.const 0 + i32.store + i32.const 0 + local.set $1 + loop $repeat|0 + local.get $1 + i32.const 22 + i32.lt_u + if + i32.const 152 + local.get $1 + i32.const 0 + call $~lib/allocator/tlsf/Root#setSLMap + i32.const 0 + local.set $3 + loop $repeat|1 + local.get $3 + i32.const 32 + i32.lt_u + if + i32.const 152 + local.get $1 + local.get $3 + i32.const 0 + call $~lib/allocator/tlsf/Root#setHead + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $repeat|1 + end + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end + end + i32.const 152 + i32.const 3072 + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + end + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + local.get $2 + local.get $0 + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + i32.const 16 + local.get $0 + i32.const 16 + i32.gt_u + select + local.tee $1 + call $~lib/allocator/tlsf/Root#search + local.tee $0 + i32.eqz + if + current_memory + local.tee $0 + local.get $1 + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $0 + local.get $3 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $2 + local.get $0 + i32.const 16 + i32.shl + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/Root#search + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 502 + i32.const 12 + call $~lib/env/abort + unreachable + end + end + local.get $0 + i32.load + i32.const -4 + i32.and + local.get $1 + i32.lt_u + if + i32.const 0 + i32.const 56 + i32.const 505 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/runtime/runtime.allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/tlsf/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 + i32.add + ) + (func $~lib/allocator/tlsf/__mem_free (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.tee $1 + if + local.get $0 + i32.const 8 + i32.sub + local.tee $2 + i32.load + local.tee $3 + i32.const 1 + i32.and + if + i32.const 0 + i32.const 56 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + i32.const 1 + i32.or + i32.store + local.get $1 + local.get $0 + i32.const 8 + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/runtime/runtime.discard (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 152 + i32.le_u + if + i32.const 0 + i32.const 120 + i32.const 68 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 120 + i32.const 70 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/collector/itcm/maybeInit (; 21 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/collector/itcm/state + i32.eqz + if + i32.const 16 + call $~lib/allocator/tlsf/__mem_allocate + global.set $~lib/collector/itcm/fromSpace + global.get $~lib/collector/itcm/fromSpace + local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + i32.const 16 + call $~lib/allocator/tlsf/__mem_allocate + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/toSpace + local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter + i32.const 1 + global.set $~lib/collector/itcm/state + end + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $0 + i32.or + i32.store offset=8 + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.and + local.get $1 + i32.or + i32.store offset=8 + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/collector/itcm/__ref_register (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + call $~lib/collector/itcm/maybeInit + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + global.get $~lib/collector/itcm/white + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.or + i32.store offset=8 + global.get $~lib/collector/itcm/fromSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + ) + (func $~lib/runtime/runtime.register (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 152 + i32.le_u + if + i32.const 0 + i32.const 120 + i32.const 82 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 120 + i32.const 84 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + block + local.get $0 + call $~lib/collector/itcm/__ref_register + end + local.get $0 + ) + (func $~lib/runtime/runtime.newString (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + i32.const 1 + call $~lib/runtime/runtime.register + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/collector/itcm/iter + local.get $0 + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + local.tee $2 + local.get $0 + i32.load offset=12 + local.tee $1 + i32.store offset=12 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $2 + i32.or + i32.store offset=8 + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/__ref_link (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + global.get $~lib/collector/itcm/white + i32.eqz + local.get $1 + i32.const 16 + i32.sub + local.tee $2 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + local.tee $1 + if (result i32) + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + else + local.get $1 + end + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/memory/memory.copy (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + br $continue|0 + end + end + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 + end + end + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end + end + end + loop $continue|5 + local.get $2 + if + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + ) + (func $~lib/runtime/runtime.newArray (; 30 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 16 + call $~lib/runtime/runtime.allocate + local.get $2 + call $~lib/runtime/runtime.register + local.tee $2 + local.set $6 + local.get $0 + local.get $1 + i32.shl + local.tee $4 + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + local.tee $5 + local.tee $1 + local.get $2 + i32.load + i32.ne + if + local.get $1 + local.get $6 + call $~lib/collector/itcm/__ref_link + end + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $5 + i32.store offset=4 + local.get $2 + local.get $4 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=12 + local.get $3 + if + local.get $5 + local.get $3 + local.get $4 + call $~lib/memory/memory.copy + end + local.get $2 + ) + (func $~lib/runtime/runtime.retain (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/itcm/__ref_link + ) + (func $~lib/runtime/runtime.release (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) + (func $~lib/collector/itcm/step (; 33 ;) (type $FUNCSIG$v) + (local $0 i32) + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + global.get $~lib/collector/itcm/state + local.tee $0 + if + local.get $0 + i32.const 1 + i32.sub + br_table $case1|0 $case2|0 $case3|0 $break|0 + end + unreachable + end + call $~lib/runtime/__gc_mark_roots + i32.const 2 + global.set $~lib/collector/itcm/state + br $break|0 + end + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.or + i32.store offset=8 + block $__inlined_func$~lib/runtime/__gc_mark_members + block $invalid + local.get $0 + i32.load + i32.const 1 + i32.sub + br_table $__inlined_func$~lib/runtime/__gc_mark_members $__inlined_func$~lib/runtime/__gc_mark_members $__inlined_func$~lib/runtime/__gc_mark_members $invalid + end + unreachable + end + else + call $~lib/runtime/__gc_mark_roots + global.get $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $0 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $0 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + end + end + br $break|0 + end + global.get $~lib/collector/itcm/iter + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + local.get $0 + i32.const 152 + i32.ge_u + if + local.get $0 + call $~lib/allocator/tlsf/__mem_free + end + else + global.get $~lib/collector/itcm/toSpace + local.tee $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + i32.const 1 + global.set $~lib/collector/itcm/state + end + end + ) + (func $~lib/collector/itcm/__ref_collect (; 34 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/maybeInit + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|0 + end + end + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 + end + ) + (func $~lib/runtime/runtime.collect (; 35 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/__ref_collect + ) + (func $start (; 36 ;) (type $FUNCSIG$v) + i32.const 0 + call $~lib/runtime/runtime.allocate + i32.const 3 + call $~lib/runtime/runtime.register + global.set $~lib/runtime/ROOT + ) + (func $~lib/runtime/__gc_mark_roots (; 37 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/runtime/ROOT + local.tee $0 + if + call $~lib/collector/itcm/maybeInit + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#makeGray + end + end + ) + (func $~lib/runtime/__runtime_instanceof (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block $nope + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/string/String + local.get $0 + i32.const 1 + i32.sub + br_table $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope + end + local.get $1 + i32.const 1 + i32.eq + return + end + local.get $1 + i32.const 2 + i32.eq + return + end + local.get $1 + i32.const 3 + i32.eq + return + end + i32.const 0 + ) + (func $null (; 39 ;) (type $FUNCSIG$v) + nop + ) + (func $~lib/runtime/runtime.newArray|trampoline (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 3 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/runtime/runtime.newArray + ) + (func $~lib/setargc (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.set $~lib/argc + ) ) diff --git a/tests/compiler/class.untouched.wat b/tests/compiler/class.untouched.wat index 183f889b62..bf4c176f7e 100644 --- a/tests/compiler/class.untouched.wat +++ b/tests/compiler/class.untouched.wat @@ -6,17 +6,61 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$fiff (func (param i32 f32 f32) (result f32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00c\00l\00a\00s\00s\00.\00t\00s\00") + (data (i32.const 40) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 104) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $class/Animal.ONE (mut i32) (i32.const 1)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) + (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) + (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) + (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) + (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) + (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) + (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) + (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) + (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) + (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) + (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) + (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) + (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) + (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) + (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 152)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $class/test)) + (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) + (export "runtime.discard" (func $~lib/runtime/runtime.discard)) + (export "runtime.register" (func $~lib/runtime/runtime.register)) + (export "runtime.newString" (func $~lib/runtime/runtime.newString)) + (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export ".setargc" (func $~lib/setargc)) + (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "runtime.retain" (func $~lib/runtime/runtime.retain)) + (export "runtime.release" (func $~lib/runtime/runtime.release)) + (export "runtime.collect" (func $~lib/runtime/runtime.collect)) (export ".capabilities" (global $~lib/capabilities)) (start $start) (func $class/Animal.add (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -118,9 +162,2283 @@ local.set $2 local.get $2 ) - (func $start (; 7 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.get $1 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + ) + (func $~lib/util/runtime/adjust (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 0 + local.get $1 + i32.store offset=2912 + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 159 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 4 + i32.mul + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/allocator/tlsf/Root#setHead (; 11 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 184 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + i32.load offset=2912 + ) + (func $~lib/allocator/tlsf/Block#get:right (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 104 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 56 + i32.const 105 + i32.const 11 + call $~lib/env/abort + unreachable + else + local.get $1 + end + ) + (func $~lib/allocator/tlsf/fls (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 447 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $~lib/allocator/tlsf/Root#getHead (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 175 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 176 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + i32.load offset=96 + ) + (func $~lib/allocator/tlsf/Root#getSLMap (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 4 + i32.mul + i32.add + i32.load offset=4 + ) + (func $~lib/allocator/tlsf/Root#remove (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + i32.load + local.set $2 + local.get $2 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 277 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 279 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $5 + local.get $3 + i32.const 8 + i32.div_u + local.set $6 + else + local.get $3 + call $~lib/allocator/tlsf/fls + local.set $5 + local.get $3 + local.get $5 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $6 + local.get $5 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $5 + end + local.get $1 + i32.load offset=4 + local.set $7 + local.get $1 + i32.load offset=8 + local.set $8 + local.get $7 + if + local.get $7 + local.get $8 + i32.store offset=8 + end + local.get $8 + if + local.get $8 + local.get $7 + i32.store offset=4 + end + local.get $1 + local.get $0 + local.get $5 + local.get $6 + call $~lib/allocator/tlsf/Root#getHead + i32.eq + if + local.get $0 + local.get $5 + local.get $6 + local.get $8 + call $~lib/allocator/tlsf/Root#setHead + local.get $8 + i32.eqz + if + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#getSLMap + local.set $4 + local.get $0 + local.get $5 + local.get $4 + i32.const 1 + local.get $6 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $4 + call $~lib/allocator/tlsf/Root#setSLMap + local.get $4 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $5 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/allocator/tlsf/Block#get:left (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 96 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 56 + i32.const 97 + i32.const 11 + call $~lib/env/abort + unreachable + else + local.get $1 + end + ) + (func $~lib/allocator/tlsf/Root#setJump (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.load + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 353 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.get $2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 354 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 355 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 4 + i32.sub + local.get $1 + i32.store + ) + (func $~lib/allocator/tlsf/Root#insert (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 208 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.set $2 + local.get $2 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 210 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.tee $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 212 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 56 + i32.const 216 + i32.const 23 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $5 + local.get $5 + i32.load + local.set $6 + local.get $6 + global.get $~lib/allocator/tlsf/FREE + i32.and + if + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $2 + global.get $~lib/allocator/tlsf/Block.INFO + local.get $6 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $2 + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.set $5 + local.get $5 + i32.load + local.set $6 + end + local.get $2 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 56 + i32.const 230 + i32.const 24 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $4 + local.get $4 + i32.load + local.set $7 + local.get $7 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 232 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#remove + local.get $4 + local.get $7 + global.get $~lib/allocator/tlsf/Block.INFO + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $7 + i32.store + local.get $4 + local.set $1 + local.get $7 + local.set $2 + end + local.get $5 + local.get $6 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.or + i32.store + local.get $0 + local.get $1 + local.get $5 + call $~lib/allocator/tlsf/Root#setJump + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $7 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $7 + end + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 245 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $8 + local.get $3 + i32.const 8 + i32.div_u + local.set $9 + else + local.get $3 + call $~lib/allocator/tlsf/fls + local.set $8 + local.get $3 + local.get $8 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $9 + local.get $8 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $8 + end + local.get $0 + local.get $8 + local.get $9 + call $~lib/allocator/tlsf/Root#getHead + local.set $10 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $10 + i32.store offset=8 + local.get $10 + if + local.get $10 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $8 + local.get $9 + local.get $1 + call $~lib/allocator/tlsf/Root#setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $8 + i32.shl + i32.or + i32.store + local.get $0 + local.get $8 + local.get $0 + local.get $8 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $9 + i32.shl + i32.or + call $~lib/allocator/tlsf/Root#setSLMap + ) + (func $~lib/allocator/tlsf/Root#addMemory (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + local.get $2 + i32.le_u + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 396 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 397 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 398 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/Root#get:tailRef + local.set $3 + i32.const 0 + local.set $4 + local.get $3 + if + local.get $1 + local.get $3 + i32.const 4 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 403 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.get $3 + i32.eq + if + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $1 + local.get $3 + i32.load + local.set $4 + end + else + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 412 + i32.const 6 + call $~lib/env/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.set $5 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.add + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + i32.lt_u + if + i32.const 0 + return + end + local.get $5 + i32.const 2 + global.get $~lib/allocator/tlsf/Block.INFO + i32.mul + i32.sub + local.set $6 + local.get $1 + local.set $7 + local.get $7 + local.get $6 + global.get $~lib/allocator/tlsf/FREE + i32.or + local.get $4 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.or + i32.store + local.get $7 + i32.const 0 + i32.store offset=4 + local.get $7 + i32.const 0 + i32.store offset=8 + local.get $1 + local.get $5 + i32.add + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $8 + local.get $8 + i32.const 0 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.or + i32.store + local.get $0 + local.get $8 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $0 + local.get $7 + call $~lib/allocator/tlsf/Root#insert + i32.const 1 + ) + (func $~lib/allocator/tlsf/ffs (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/ffs (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/Root#search (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $1 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $2 + if (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $2 + end + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 315 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $3 + local.get $1 + i32.const 8 + i32.div_u + local.set $4 + else + local.get $1 + call $~lib/allocator/tlsf/fls + local.set $3 + local.get $1 + local.get $3 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $4 + local.get $3 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $3 + local.get $4 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 1 + i32.sub + i32.lt_u + if + local.get $4 + i32.const 1 + i32.add + local.set $4 + else + local.get $3 + i32.const 1 + i32.add + local.set $3 + i32.const 0 + local.set $4 + end + end + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 0 + i32.const -1 + i32.xor + local.get $4 + i32.shl + i32.and + local.set $5 + local.get $5 + i32.eqz + if + local.get $0 + i32.load + i32.const 0 + i32.const -1 + i32.xor + local.get $3 + i32.const 1 + i32.add + i32.shl + i32.and + local.set $2 + local.get $2 + i32.eqz + if + i32.const 0 + local.set $6 + else + local.get $2 + call $~lib/allocator/tlsf/ffs + local.set $3 + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#getSLMap + local.tee $7 + if (result i32) + local.get $7 + else + i32.const 0 + i32.const 56 + i32.const 342 + i32.const 16 + call $~lib/env/abort + unreachable + end + local.set $5 + local.get $0 + local.get $3 + local.get $5 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $6 + end + else + local.get $0 + local.get $3 + local.get $5 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $6 + end + local.get $6 + ) + (func $~lib/allocator/tlsf/Root#use (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 367 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $2 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 368 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 369 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $3 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.sub + local.set $5 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.add + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.or + i32.store + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + local.get $2 + i32.add + local.set $4 + local.get $4 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#insert + else + local.get $1 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.const -1 + i32.xor + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 56 + i32.const 387 + i32.const 25 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $4 + local.get $4 + local.get $4 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const -1 + i32.xor + i32.and + i32.store + end + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + ) + (func $~lib/allocator/tlsf/__mem_allocate (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + i32.eqz + if + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $2 + current_memory + local.set $3 + local.get $2 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $4 + local.get $4 + local.get $3 + i32.gt_s + local.tee $5 + if (result i32) + local.get $4 + local.get $3 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + local.get $5 + end + if + unreachable + end + local.get $2 + local.tee $1 + global.set $~lib/allocator/tlsf/ROOT + local.get $1 + i32.const 0 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $1 + i32.const 0 + i32.store + block $break|0 + i32.const 0 + local.set $5 + loop $repeat|0 + local.get $5 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + br_if $break|0 + block + local.get $1 + local.get $5 + i32.const 0 + call $~lib/allocator/tlsf/Root#setSLMap + block $break|1 + i32.const 0 + local.set $6 + loop $repeat|1 + local.get $6 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + br_if $break|1 + local.get $1 + local.get $5 + local.get $6 + i32.const 0 + call $~lib/allocator/tlsf/Root#setHead + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $repeat|1 + unreachable + end + unreachable + end + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $repeat|0 + unreachable + end + unreachable + end + local.get $1 + local.get $2 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + end + local.get $0 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.gt_u + if + unreachable + end + local.get $0 + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.tee $4 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + local.tee $3 + local.get $4 + local.get $3 + i32.gt_u + select + local.set $0 + local.get $1 + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.set $7 + local.get $7 + i32.eqz + if + current_memory + local.set $4 + local.get $0 + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $3 + local.get $4 + local.tee $2 + local.get $3 + local.tee $5 + local.get $2 + local.get $5 + i32.gt_s + select + local.set $2 + local.get $2 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + current_memory + local.set $5 + local.get $1 + local.get $4 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + local.get $1 + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.tee $6 + i32.eqz + if (result i32) + i32.const 0 + i32.const 56 + i32.const 502 + i32.const 12 + call $~lib/env/abort + unreachable + else + local.get $6 + end + local.set $7 + end + local.get $7 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.get $0 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 505 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $1 + local.get $7 + local.get $0 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/memory/memory.allocate (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_allocate + return + ) + (func $~lib/runtime/runtime.allocate (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/allocator/tlsf/__mem_free (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + if + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $2 + local.get $2 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/memory/memory.free (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/runtime/runtime.discard (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 68 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $1 + local.get $1 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 70 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/memory/memory.free + ) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + ) + (func $~lib/collector/itcm/maybeInit (; 33 ;) (type $FUNCSIG$v) + global.get $~lib/collector/itcm/state + i32.const 0 + i32.eq + if + global.get $~lib/util/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/fromSpace + global.get $~lib/collector/itcm/fromSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/fromSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/fromSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/util/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/toSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/toSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter + i32.const 1 + global.set $~lib/collector/itcm/state + end + ) + (func $~lib/collector/itcm/ManagedObject#set:color (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $1 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/ManagedObject#set:next (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $0 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/collector/itcm/__ref_register (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + global.get $~lib/collector/itcm/white + call $~lib/collector/itcm/ManagedObject#set:color + global.get $~lib/collector/itcm/fromSpace + local.get $2 + call $~lib/collector/itcm/ManagedObjectList#push + ) + (func $~lib/runtime/runtime.register (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 82 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 84 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $~lib/collector/itcm/__ref_register + local.get $0 + ) + (func $~lib/runtime/runtime.newString (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + i32.const 1 + call $~lib/runtime/runtime.register + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + ) + (func $~lib/collector/itcm/ManagedObject#get:color (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#get:next (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#unlink (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + local.set $1 + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/collector/itcm/iter + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + call $~lib/collector/itcm/ManagedObject#unlink + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/__ref_link (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + local.set $3 + local.get $3 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eqz + i32.eq + local.tee $2 + if (result i32) + block $~lib/collector/itcm/refToObj|inlined.3 (result i32) + local.get $0 + local.set $2 + local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + else + local.get $2 + end + if + local.get $3 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/memory/memory.copy (; 46 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|2 + end + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + end + ) + (func $~lib/runtime/runtime.newArray (; 47 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + i32.const 16 + call $~lib/runtime/runtime.allocate + local.get $2 + call $~lib/runtime/runtime.register + local.set $4 + local.get $0 + local.get $1 + i32.shl + local.set $5 + local.get $5 + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + local.set $6 + local.get $4 + local.tee $7 + local.get $6 + local.tee $8 + local.get $7 + i32.load + local.tee $9 + i32.ne + if (result i32) + nop + local.get $8 + local.get $7 + call $~lib/collector/itcm/__ref_link + local.get $8 + else + local.get $8 + end + i32.store + local.get $4 + local.get $6 + i32.store offset=4 + local.get $4 + local.get $5 + i32.store offset=8 + local.get $4 + local.get $0 + i32.store offset=12 + local.get $3 + if + local.get $6 + local.get $3 + local.get $5 + call $~lib/memory/memory.copy + end + local.get $4 + ) + (func $~lib/runtime/Root#constructor (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/runtime/runtime.allocate + i32.const 3 + call $~lib/runtime/runtime.register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/itcm/__ref_link + ) + (func $~lib/runtime/runtime.release (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/collector/itcm/step (; 51 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + global.get $~lib/collector/itcm/state + local.set $1 + local.get $1 + i32.const 0 + i32.eq + br_if $case0|0 + local.get $1 + i32.const 1 + i32.eq + br_if $case1|0 + local.get $1 + i32.const 2 + i32.eq + br_if $case2|0 + local.get $1 + i32.const 3 + i32.eq + br_if $case3|0 + br $break|0 + end + unreachable + end + block + call $~lib/runtime/__gc_mark_roots + i32.const 2 + global.set $~lib/collector/itcm/state + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + call $~lib/collector/itcm/ManagedObject#set:color + local.get $0 + i32.load + block $~lib/collector/itcm/objToRef|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + call $~lib/runtime/__gc_mark_members + else + call $~lib/runtime/__gc_mark_roots + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $1 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $1 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $1 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + end + end + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.ge_u + if + local.get $0 + call $~lib/memory/memory.free + end + else + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + i32.const 1 + global.set $~lib/collector/itcm/state + end + br $break|0 + unreachable + end + unreachable + end + ) + (func $~lib/collector/itcm/__ref_collect (; 52 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/maybeInit + block $break|0 + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 + end + end + ) + (func $~lib/runtime/runtime.collect (; 53 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 55 ;) (type $FUNCSIG$v) call $start:class + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT + ) + (func $~lib/collector/itcm/__ref_mark (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.4 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/runtime/__gc_mark_roots (; 57 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/runtime/ROOT + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + ) + (func $~lib/runtime/__gc_mark_members (; 58 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + block $invalid + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/string/String + local.get $0 + br_table $invalid $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid + end + return + end + return + end + return + end + unreachable + ) + (func $~lib/runtime/__runtime_instanceof (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block $nope + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/string/String + local.get $0 + br_table $nope $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope + end + local.get $1 + i32.const 1 + i32.eq + return + end + local.get $1 + i32.const 2 + i32.eq + return + end + local.get $1 + i32.const 3 + i32.eq + return + end + i32.const 0 + return ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 60 ;) (type $FUNCSIG$v) + ) + (func $~lib/runtime/runtime.newArray|trampoline (; 61 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 3 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/runtime/runtime.newArray + ) + (func $~lib/setargc (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.set $~lib/argc ) ) diff --git a/tests/compiler/closure.optimized.wat b/tests/compiler/closure.optimized.wat index 13be3a5fae..845cbc1e74 100644 --- a/tests/compiler/closure.optimized.wat +++ b/tests/compiler/closure.optimized.wat @@ -1,13 +1,1923 @@ (module + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (memory $0 0) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\01\00\00\00,") + (data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 72) "\01\00\00\00\1e") + (data (i32.const 88) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) + (export "runtime.discard" (func $~lib/runtime/runtime.discard)) + (export "runtime.register" (func $~lib/runtime/runtime.register)) + (export "runtime.newString" (func $~lib/runtime/runtime.newString)) + (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export ".setargc" (func $~lib/setargc)) + (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "runtime.retain" (func $~lib/runtime/runtime.retain)) + (export "runtime.release" (func $~lib/runtime/runtime.release)) + (export "runtime.collect" (func $~lib/runtime/runtime.collect)) (export ".capabilities" (global $~lib/capabilities)) - (func $null (; 0 ;) (type $FUNCSIG$v) + (start $start) + (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.get $1 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 159 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/allocator/tlsf/Root#setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 184 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 32 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/allocator/tlsf/Block#get:right (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + i32.const -4 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 104 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 8 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 105 + i32.const 11 + call $~lib/env/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/fls (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 447 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $~lib/allocator/tlsf/Root#getHead (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 175 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 32 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 176 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load offset=96 + ) + (func $~lib/allocator/tlsf/Root#getSLMap (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load offset=4 + ) + (func $~lib/allocator/tlsf/Root#remove (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.tee $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 277 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $3 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 279 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + i32.const 256 + i32.lt_u + if (result i32) + local.get $3 + i32.const 8 + i32.div_u + local.set $4 + i32.const 0 + else + local.get $3 + local.get $3 + call $~lib/allocator/tlsf/fls + local.tee $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $4 + local.get $2 + i32.const 7 + i32.sub + end + local.set $2 + local.get $1 + i32.load offset=8 + local.set $3 + local.get $1 + i32.load offset=4 + local.tee $5 + if + local.get $5 + local.get $3 + i32.store offset=8 + end + local.get $3 + if + local.get $3 + local.get $5 + i32.store offset=4 + end + local.get $0 + local.get $2 + local.get $4 + call $~lib/allocator/tlsf/Root#getHead + local.get $1 + i32.eq + if + local.get $0 + local.get $2 + local.get $4 + local.get $3 + call $~lib/allocator/tlsf/Root#setHead + local.get $3 + i32.eqz + if + local.get $0 + local.get $2 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $4 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $1 + call $~lib/allocator/tlsf/Root#setSLMap + local.get $1 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $2 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/allocator/tlsf/Block#get:left (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 96 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 97 + i32.const 11 + call $~lib/env/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/Root#setJump (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + i32.load + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 353 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/Block#get:right + local.get $1 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 354 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 355 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 4 + i32.sub + local.get $0 + i32.store + ) + (func $~lib/allocator/tlsf/Root#insert (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 208 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.tee $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 210 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + i32.const -4 + i32.and + local.tee $4 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $4 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 212 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 216 + i32.const 23 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.load + local.tee $4 + i32.const 1 + i32.and + if + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $4 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $3 + i32.add + local.tee $3 + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $2 + i32.load + local.set $4 + end + local.get $3 + i32.const 2 + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 230 + i32.const 24 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.tee $5 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 232 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $3 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $5 + i32.add + local.tee $3 + i32.store + end + local.get $2 + local.get $4 + i32.const 2 + i32.or + i32.store + local.get $1 + local.get $2 + call $~lib/allocator/tlsf/Root#setJump + local.get $3 + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $3 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 245 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $3 + i32.const 256 + i32.lt_u + if (result i32) + local.get $3 + i32.const 8 + i32.div_u + local.set $3 + i32.const 0 + else + local.get $3 + local.get $3 + call $~lib/allocator/tlsf/fls + local.tee $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $3 + local.get $2 + i32.const 7 + i32.sub + end + local.tee $2 + local.get $3 + call $~lib/allocator/tlsf/Root#getHead + local.set $4 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $4 + i32.store offset=8 + local.get $4 + if + local.get $4 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $2 + local.get $3 + local.get $1 + call $~lib/allocator/tlsf/Root#setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $2 + i32.shl + i32.or + i32.store + local.get $0 + local.get $2 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $3 + i32.shl + i32.or + call $~lib/allocator/tlsf/Root#setSLMap + ) + (func $~lib/allocator/tlsf/Root#addMemory (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + local.get $2 + i32.gt_u + if + i32.const 0 + i32.const 24 + i32.const 396 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 397 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 398 + i32.const 4 + call $~lib/env/abort + unreachable + end + i32.const 2912 + i32.load + local.tee $3 + if + local.get $1 + local.get $3 + i32.const 4 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 403 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 8 + i32.sub + local.get $3 + i32.eq + if + local.get $3 + i32.load + local.set $4 + local.get $1 + i32.const 8 + i32.sub + local.set $1 + end + else + local.get $1 + local.get $0 + i32.const 2916 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 412 + i32.const 6 + call $~lib/env/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.tee $2 + i32.const 32 + i32.lt_u + if + return + end + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $2 + i32.const 16 + i32.sub + i32.const 1 + i32.or + i32.or + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.tee $2 + i32.const 2 + i32.store + i32.const 2912 + local.get $2 + i32.store + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#insert + ) + (func $~lib/allocator/tlsf/ffs (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/Root#search (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $1 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 315 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 256 + i32.lt_u + if (result i32) + i32.const 0 + local.set $2 + local.get $1 + i32.const 8 + i32.div_u + else + local.get $1 + call $~lib/allocator/tlsf/fls + local.tee $3 + i32.const 7 + i32.sub + local.set $2 + local.get $1 + local.get $3 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.tee $1 + i32.const 31 + i32.lt_u + if (result i32) + local.get $1 + i32.const 1 + i32.add + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + i32.const 0 + end + end + local.set $1 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const -1 + local.get $1 + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + else + local.get $0 + i32.load + i32.const -1 + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/ffs + local.tee $2 + call $~lib/allocator/tlsf/Root#getSLMap + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 342 + i32.const 16 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + else + i32.const 0 + end + end + ) + (func $~lib/allocator/tlsf/Root#use (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $1 + i32.load + local.tee $4 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 367 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 16 + i32.ge_u + local.tee $3 + if + local.get $2 + i32.const 1073741824 + i32.lt_u + local.set $3 + end + local.get $3 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 368 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 369 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $4 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $3 + i32.const 24 + i32.ge_u + if + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $2 + i32.or + i32.store + local.get $1 + i32.const 8 + i32.add + local.get $2 + i32.add + local.tee $2 + local.get $3 + i32.const 8 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#insert + else + local.get $1 + local.get $4 + i32.const -2 + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 387 + i32.const 25 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $0 + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 + i32.const 8 + i32.add + ) + (func $~lib/allocator/tlsf/__mem_allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/allocator/tlsf/ROOT + local.tee $2 + i32.eqz + if + i32.const 1 + current_memory + local.tee $1 + i32.gt_s + local.tee $2 + if (result i32) + i32.const 1 + local.get $1 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + local.get $2 + end + if + unreachable + end + i32.const 120 + local.set $2 + i32.const 120 + global.set $~lib/allocator/tlsf/ROOT + i32.const 2912 + i32.const 0 + i32.store + i32.const 120 + i32.const 0 + i32.store + i32.const 0 + local.set $1 + loop $repeat|0 + local.get $1 + i32.const 22 + i32.lt_u + if + i32.const 120 + local.get $1 + i32.const 0 + call $~lib/allocator/tlsf/Root#setSLMap + i32.const 0 + local.set $3 + loop $repeat|1 + local.get $3 + i32.const 32 + i32.lt_u + if + i32.const 120 + local.get $1 + local.get $3 + i32.const 0 + call $~lib/allocator/tlsf/Root#setHead + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $repeat|1 + end + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end + end + i32.const 120 + i32.const 3040 + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + end + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + local.get $2 + local.get $0 + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + i32.const 16 + local.get $0 + i32.const 16 + i32.gt_u + select + local.tee $1 + call $~lib/allocator/tlsf/Root#search + local.tee $0 + i32.eqz + if + current_memory + local.tee $0 + local.get $1 + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $0 + local.get $3 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $2 + local.get $0 + i32.const 16 + i32.shl + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/Root#search + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 502 + i32.const 12 + call $~lib/env/abort + unreachable + end + end + local.get $0 + i32.load + i32.const -4 + i32.and + local.get $1 + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 505 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/runtime/runtime.allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/tlsf/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 + i32.add + ) + (func $~lib/allocator/tlsf/__mem_free (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.tee $1 + if + local.get $0 + i32.const 8 + i32.sub + local.tee $2 + i32.load + local.tee $3 + i32.const 1 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + i32.const 1 + i32.or + i32.store + local.get $1 + local.get $0 + i32.const 8 + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/runtime/runtime.discard (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 120 + i32.le_u + if + i32.const 0 + i32.const 88 + i32.const 68 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 88 + i32.const 70 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/collector/itcm/maybeInit (; 20 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/collector/itcm/state + i32.eqz + if + i32.const 16 + call $~lib/allocator/tlsf/__mem_allocate + global.set $~lib/collector/itcm/fromSpace + global.get $~lib/collector/itcm/fromSpace + local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + i32.const 16 + call $~lib/allocator/tlsf/__mem_allocate + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/toSpace + local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter + i32.const 1 + global.set $~lib/collector/itcm/state + end + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $0 + i32.or + i32.store offset=8 + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.and + local.get $1 + i32.or + i32.store offset=8 + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/collector/itcm/__ref_register (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + call $~lib/collector/itcm/maybeInit + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + global.get $~lib/collector/itcm/white + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.or + i32.store offset=8 + global.get $~lib/collector/itcm/fromSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + ) + (func $~lib/runtime/runtime.register (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 120 + i32.le_u + if + i32.const 0 + i32.const 88 + i32.const 82 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 88 + i32.const 84 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + block + local.get $0 + call $~lib/collector/itcm/__ref_register + end + local.get $0 + ) + (func $~lib/runtime/runtime.newString (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + i32.const 1 + call $~lib/runtime/runtime.register + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/collector/itcm/iter + local.get $0 + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + local.tee $2 + local.get $0 + i32.load offset=12 + local.tee $1 + i32.store offset=12 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $2 + i32.or + i32.store offset=8 + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/__ref_link (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + global.get $~lib/collector/itcm/white + i32.eqz + local.get $1 + i32.const 16 + i32.sub + local.tee $2 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + local.tee $1 + if (result i32) + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + else + local.get $1 + end + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/memory/memory.copy (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + br $continue|0 + end + end + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 + end + end + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end + end + end + loop $continue|5 + local.get $2 + if + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + ) + (func $~lib/runtime/runtime.newArray (; 29 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 16 + call $~lib/runtime/runtime.allocate + local.get $2 + call $~lib/runtime/runtime.register + local.tee $2 + local.set $6 + local.get $0 + local.get $1 + i32.shl + local.tee $4 + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + local.tee $5 + local.tee $1 + local.get $2 + i32.load + i32.ne + if + local.get $1 + local.get $6 + call $~lib/collector/itcm/__ref_link + end + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $5 + i32.store offset=4 + local.get $2 + local.get $4 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=12 + local.get $3 + if + local.get $5 + local.get $3 + local.get $4 + call $~lib/memory/memory.copy + end + local.get $2 + ) + (func $~lib/runtime/runtime.retain (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/itcm/__ref_link + ) + (func $~lib/runtime/runtime.release (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) + (func $~lib/collector/itcm/step (; 32 ;) (type $FUNCSIG$v) + (local $0 i32) + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + global.get $~lib/collector/itcm/state + local.tee $0 + if + local.get $0 + i32.const 1 + i32.sub + br_table $case1|0 $case2|0 $case3|0 $break|0 + end + unreachable + end + call $~lib/runtime/__gc_mark_roots + i32.const 2 + global.set $~lib/collector/itcm/state + br $break|0 + end + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.or + i32.store offset=8 + block $__inlined_func$~lib/runtime/__gc_mark_members + block $invalid + local.get $0 + i32.load + i32.const 1 + i32.sub + br_table $__inlined_func$~lib/runtime/__gc_mark_members $__inlined_func$~lib/runtime/__gc_mark_members $__inlined_func$~lib/runtime/__gc_mark_members $invalid + end + unreachable + end + else + call $~lib/runtime/__gc_mark_roots + global.get $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $0 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $0 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + end + end + br $break|0 + end + global.get $~lib/collector/itcm/iter + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + local.get $0 + i32.const 120 + i32.ge_u + if + local.get $0 + call $~lib/allocator/tlsf/__mem_free + end + else + global.get $~lib/collector/itcm/toSpace + local.tee $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + i32.const 1 + global.set $~lib/collector/itcm/state + end + end + ) + (func $~lib/collector/itcm/__ref_collect (; 33 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/maybeInit + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|0 + end + end + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 + end + ) + (func $~lib/runtime/runtime.collect (; 34 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/__ref_collect + ) + (func $start (; 35 ;) (type $FUNCSIG$v) + i32.const 0 + call $~lib/runtime/runtime.allocate + i32.const 3 + call $~lib/runtime/runtime.register + global.set $~lib/runtime/ROOT + ) + (func $~lib/runtime/__gc_mark_roots (; 36 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/runtime/ROOT + local.tee $0 + if + call $~lib/collector/itcm/maybeInit + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#makeGray + end + end + ) + (func $~lib/runtime/__runtime_instanceof (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block $nope + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/string/String + local.get $0 + i32.const 1 + i32.sub + br_table $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope + end + local.get $1 + i32.const 1 + i32.eq + return + end + local.get $1 + i32.const 2 + i32.eq + return + end + local.get $1 + i32.const 3 + i32.eq + return + end + i32.const 0 + ) + (func $null (; 38 ;) (type $FUNCSIG$v) + nop + ) + (func $~lib/runtime/runtime.newArray|trampoline (; 39 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 3 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/runtime/runtime.newArray + ) + (func $~lib/setargc (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.set $~lib/argc + ) ) diff --git a/tests/compiler/closure.untouched.wat b/tests/compiler/closure.untouched.wat index 413ff0e872..ae057c9ded 100644 --- a/tests/compiler/closure.untouched.wat +++ b/tests/compiler/closure.untouched.wat @@ -1,13 +1,2339 @@ (module + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (memory $0 0) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 72) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) + (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) + (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) + (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) + (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) + (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) + (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) + (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) + (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) + (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) + (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) + (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) + (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) + (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) + (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 120)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) + (export "runtime.discard" (func $~lib/runtime/runtime.discard)) + (export "runtime.register" (func $~lib/runtime/runtime.register)) + (export "runtime.newString" (func $~lib/runtime/runtime.newString)) + (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export ".setargc" (func $~lib/setargc)) + (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "runtime.retain" (func $~lib/runtime/runtime.retain)) + (export "runtime.release" (func $~lib/runtime/runtime.release)) + (export "runtime.collect" (func $~lib/runtime/runtime.collect)) (export ".capabilities" (global $~lib/capabilities)) - (func $null (; 0 ;) (type $FUNCSIG$v) + (start $start) + (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.get $1 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + ) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 0 + local.get $1 + i32.store offset=2912 + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 159 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 4 + i32.mul + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/allocator/tlsf/Root#setHead (; 5 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 184 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + i32.load offset=2912 + ) + (func $~lib/allocator/tlsf/Block#get:right (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 104 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 105 + i32.const 11 + call $~lib/env/abort + unreachable + else + local.get $1 + end + ) + (func $~lib/allocator/tlsf/fls (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 447 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $~lib/allocator/tlsf/Root#getHead (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 175 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 176 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + i32.load offset=96 + ) + (func $~lib/allocator/tlsf/Root#getSLMap (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 4 + i32.mul + i32.add + i32.load offset=4 + ) + (func $~lib/allocator/tlsf/Root#remove (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + i32.load + local.set $2 + local.get $2 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 277 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 279 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $5 + local.get $3 + i32.const 8 + i32.div_u + local.set $6 + else + local.get $3 + call $~lib/allocator/tlsf/fls + local.set $5 + local.get $3 + local.get $5 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $6 + local.get $5 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $5 + end + local.get $1 + i32.load offset=4 + local.set $7 + local.get $1 + i32.load offset=8 + local.set $8 + local.get $7 + if + local.get $7 + local.get $8 + i32.store offset=8 + end + local.get $8 + if + local.get $8 + local.get $7 + i32.store offset=4 + end + local.get $1 + local.get $0 + local.get $5 + local.get $6 + call $~lib/allocator/tlsf/Root#getHead + i32.eq + if + local.get $0 + local.get $5 + local.get $6 + local.get $8 + call $~lib/allocator/tlsf/Root#setHead + local.get $8 + i32.eqz + if + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#getSLMap + local.set $4 + local.get $0 + local.get $5 + local.get $4 + i32.const 1 + local.get $6 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $4 + call $~lib/allocator/tlsf/Root#setSLMap + local.get $4 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $5 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/allocator/tlsf/Block#get:left (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 96 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 97 + i32.const 11 + call $~lib/env/abort + unreachable + else + local.get $1 + end + ) + (func $~lib/allocator/tlsf/Root#setJump (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.load + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 353 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.get $2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 354 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 355 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 4 + i32.sub + local.get $1 + i32.store + ) + (func $~lib/allocator/tlsf/Root#insert (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 208 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.set $2 + local.get $2 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 210 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.tee $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 212 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 216 + i32.const 23 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $5 + local.get $5 + i32.load + local.set $6 + local.get $6 + global.get $~lib/allocator/tlsf/FREE + i32.and + if + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $2 + global.get $~lib/allocator/tlsf/Block.INFO + local.get $6 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $2 + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.set $5 + local.get $5 + i32.load + local.set $6 + end + local.get $2 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 230 + i32.const 24 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $4 + local.get $4 + i32.load + local.set $7 + local.get $7 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 232 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#remove + local.get $4 + local.get $7 + global.get $~lib/allocator/tlsf/Block.INFO + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $7 + i32.store + local.get $4 + local.set $1 + local.get $7 + local.set $2 + end + local.get $5 + local.get $6 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.or + i32.store + local.get $0 + local.get $1 + local.get $5 + call $~lib/allocator/tlsf/Root#setJump + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $7 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $7 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 245 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $8 + local.get $3 + i32.const 8 + i32.div_u + local.set $9 + else + local.get $3 + call $~lib/allocator/tlsf/fls + local.set $8 + local.get $3 + local.get $8 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $9 + local.get $8 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $8 + end + local.get $0 + local.get $8 + local.get $9 + call $~lib/allocator/tlsf/Root#getHead + local.set $10 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $10 + i32.store offset=8 + local.get $10 + if + local.get $10 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $8 + local.get $9 + local.get $1 + call $~lib/allocator/tlsf/Root#setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $8 + i32.shl + i32.or + i32.store + local.get $0 + local.get $8 + local.get $0 + local.get $8 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $9 + i32.shl + i32.or + call $~lib/allocator/tlsf/Root#setSLMap + ) + (func $~lib/allocator/tlsf/Root#addMemory (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + local.get $2 + i32.le_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 396 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 397 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 398 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/Root#get:tailRef + local.set $3 + i32.const 0 + local.set $4 + local.get $3 + if + local.get $1 + local.get $3 + i32.const 4 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 403 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.get $3 + i32.eq + if + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $1 + local.get $3 + i32.load + local.set $4 + end + else + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 412 + i32.const 6 + call $~lib/env/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.set $5 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.add + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + i32.lt_u + if + i32.const 0 + return + end + local.get $5 + i32.const 2 + global.get $~lib/allocator/tlsf/Block.INFO + i32.mul + i32.sub + local.set $6 + local.get $1 + local.set $7 + local.get $7 + local.get $6 + global.get $~lib/allocator/tlsf/FREE + i32.or + local.get $4 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.or + i32.store + local.get $7 + i32.const 0 + i32.store offset=4 + local.get $7 + i32.const 0 + i32.store offset=8 + local.get $1 + local.get $5 + i32.add + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $8 + local.get $8 + i32.const 0 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.or + i32.store + local.get $0 + local.get $8 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $0 + local.get $7 + call $~lib/allocator/tlsf/Root#insert + i32.const 1 + ) + (func $~lib/allocator/tlsf/ffs (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/ffs (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/Root#search (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $1 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $2 + if (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $2 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 315 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $3 + local.get $1 + i32.const 8 + i32.div_u + local.set $4 + else + local.get $1 + call $~lib/allocator/tlsf/fls + local.set $3 + local.get $1 + local.get $3 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $4 + local.get $3 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $3 + local.get $4 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 1 + i32.sub + i32.lt_u + if + local.get $4 + i32.const 1 + i32.add + local.set $4 + else + local.get $3 + i32.const 1 + i32.add + local.set $3 + i32.const 0 + local.set $4 + end + end + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 0 + i32.const -1 + i32.xor + local.get $4 + i32.shl + i32.and + local.set $5 + local.get $5 + i32.eqz + if + local.get $0 + i32.load + i32.const 0 + i32.const -1 + i32.xor + local.get $3 + i32.const 1 + i32.add + i32.shl + i32.and + local.set $2 + local.get $2 + i32.eqz + if + i32.const 0 + local.set $6 + else + local.get $2 + call $~lib/allocator/tlsf/ffs + local.set $3 + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#getSLMap + local.tee $7 + if (result i32) + local.get $7 + else + i32.const 0 + i32.const 24 + i32.const 342 + i32.const 16 + call $~lib/env/abort + unreachable + end + local.set $5 + local.get $0 + local.get $3 + local.get $5 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $6 + end + else + local.get $0 + local.get $3 + local.get $5 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $6 + end + local.get $6 + ) + (func $~lib/allocator/tlsf/Root#use (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 367 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $2 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 368 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 369 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $3 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.sub + local.set $5 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.add + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.or + i32.store + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + local.get $2 + i32.add + local.set $4 + local.get $4 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#insert + else + local.get $1 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.const -1 + i32.xor + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 387 + i32.const 25 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $4 + local.get $4 + local.get $4 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const -1 + i32.xor + i32.and + i32.store + end + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + ) + (func $~lib/allocator/tlsf/__mem_allocate (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + i32.eqz + if + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $2 + current_memory + local.set $3 + local.get $2 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $4 + local.get $4 + local.get $3 + i32.gt_s + local.tee $5 + if (result i32) + local.get $4 + local.get $3 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + local.get $5 + end + if + unreachable + end + local.get $2 + local.tee $1 + global.set $~lib/allocator/tlsf/ROOT + local.get $1 + i32.const 0 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $1 + i32.const 0 + i32.store + block $break|0 + i32.const 0 + local.set $5 + loop $repeat|0 + local.get $5 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + br_if $break|0 + block + local.get $1 + local.get $5 + i32.const 0 + call $~lib/allocator/tlsf/Root#setSLMap + block $break|1 + i32.const 0 + local.set $6 + loop $repeat|1 + local.get $6 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + br_if $break|1 + local.get $1 + local.get $5 + local.get $6 + i32.const 0 + call $~lib/allocator/tlsf/Root#setHead + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $repeat|1 + unreachable + end + unreachable + end + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $repeat|0 + unreachable + end + unreachable + end + local.get $1 + local.get $2 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + end + local.get $0 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.gt_u + if + unreachable + end + local.get $0 + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.tee $4 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + local.tee $3 + local.get $4 + local.get $3 + i32.gt_u + select + local.set $0 + local.get $1 + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.set $7 + local.get $7 + i32.eqz + if + current_memory + local.set $4 + local.get $0 + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $3 + local.get $4 + local.tee $2 + local.get $3 + local.tee $5 + local.get $2 + local.get $5 + i32.gt_s + select + local.set $2 + local.get $2 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + current_memory + local.set $5 + local.get $1 + local.get $4 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + local.get $1 + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.tee $6 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 502 + i32.const 12 + call $~lib/env/abort + unreachable + else + local.get $6 + end + local.set $7 + end + local.get $7 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.get $0 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 505 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $1 + local.get $7 + local.get $0 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/memory/memory.allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_allocate + return + ) + (func $~lib/runtime/runtime.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/allocator/tlsf/__mem_free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + if + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $2 + local.get $2 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/memory/memory.free (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/runtime/runtime.discard (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 88 + i32.const 68 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $1 + local.get $1 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 88 + i32.const 70 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/memory/memory.free + ) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + ) + (func $~lib/collector/itcm/maybeInit (; 27 ;) (type $FUNCSIG$v) + global.get $~lib/collector/itcm/state + i32.const 0 + i32.eq + if + global.get $~lib/util/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/fromSpace + global.get $~lib/collector/itcm/fromSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/fromSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/fromSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/util/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/toSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/toSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter + i32.const 1 + global.set $~lib/collector/itcm/state + end + ) + (func $~lib/collector/itcm/ManagedObject#set:color (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $1 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/ManagedObject#set:next (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $0 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/collector/itcm/__ref_register (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + global.get $~lib/collector/itcm/white + call $~lib/collector/itcm/ManagedObject#set:color + global.get $~lib/collector/itcm/fromSpace + local.get $2 + call $~lib/collector/itcm/ManagedObjectList#push + ) + (func $~lib/runtime/runtime.register (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 88 + i32.const 82 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 88 + i32.const 84 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $~lib/collector/itcm/__ref_register + local.get $0 + ) + (func $~lib/runtime/runtime.newString (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + i32.const 1 + call $~lib/runtime/runtime.register + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + ) + (func $~lib/collector/itcm/ManagedObject#get:color (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#get:next (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#unlink (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + local.set $1 + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/collector/itcm/iter + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + call $~lib/collector/itcm/ManagedObject#unlink + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/__ref_link (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + local.set $3 + local.get $3 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eqz + i32.eq + local.tee $2 + if (result i32) + block $~lib/collector/itcm/refToObj|inlined.3 (result i32) + local.get $0 + local.set $2 + local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + else + local.get $2 + end + if + local.get $3 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/memory/memory.copy (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|2 + end + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + end + ) + (func $~lib/runtime/runtime.newArray (; 41 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + i32.const 16 + call $~lib/runtime/runtime.allocate + local.get $2 + call $~lib/runtime/runtime.register + local.set $4 + local.get $0 + local.get $1 + i32.shl + local.set $5 + local.get $5 + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + local.set $6 + local.get $4 + local.tee $7 + local.get $6 + local.tee $8 + local.get $7 + i32.load + local.tee $9 + i32.ne + if (result i32) + nop + local.get $8 + local.get $7 + call $~lib/collector/itcm/__ref_link + local.get $8 + else + local.get $8 + end + i32.store + local.get $4 + local.get $6 + i32.store offset=4 + local.get $4 + local.get $5 + i32.store offset=8 + local.get $4 + local.get $0 + i32.store offset=12 + local.get $3 + if + local.get $6 + local.get $3 + local.get $5 + call $~lib/memory/memory.copy + end + local.get $4 + ) + (func $~lib/runtime/Root#constructor (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/runtime/runtime.allocate + i32.const 3 + call $~lib/runtime/runtime.register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/itcm/__ref_link + ) + (func $~lib/runtime/runtime.release (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/collector/itcm/step (; 45 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + global.get $~lib/collector/itcm/state + local.set $1 + local.get $1 + i32.const 0 + i32.eq + br_if $case0|0 + local.get $1 + i32.const 1 + i32.eq + br_if $case1|0 + local.get $1 + i32.const 2 + i32.eq + br_if $case2|0 + local.get $1 + i32.const 3 + i32.eq + br_if $case3|0 + br $break|0 + end + unreachable + end + block + call $~lib/runtime/__gc_mark_roots + i32.const 2 + global.set $~lib/collector/itcm/state + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + call $~lib/collector/itcm/ManagedObject#set:color + local.get $0 + i32.load + block $~lib/collector/itcm/objToRef|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + call $~lib/runtime/__gc_mark_members + else + call $~lib/runtime/__gc_mark_roots + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $1 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $1 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $1 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + end + end + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.ge_u + if + local.get $0 + call $~lib/memory/memory.free + end + else + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + i32.const 1 + global.set $~lib/collector/itcm/state + end + br $break|0 + unreachable + end + unreachable + end + ) + (func $~lib/collector/itcm/__ref_collect (; 46 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/maybeInit + block $break|0 + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 + end + end + ) + (func $~lib/runtime/runtime.collect (; 47 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 49 ;) (type $FUNCSIG$v) + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT + ) + (func $~lib/collector/itcm/__ref_mark (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.4 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/runtime/__gc_mark_roots (; 51 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/runtime/ROOT + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + ) + (func $~lib/runtime/__gc_mark_members (; 52 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + block $invalid + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/string/String + local.get $0 + br_table $invalid $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid + end + return + end + return + end + return + end + unreachable + ) + (func $~lib/runtime/__runtime_instanceof (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block $nope + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/string/String + local.get $0 + br_table $nope $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope + end + local.get $1 + i32.const 1 + i32.eq + return + end + local.get $1 + i32.const 2 + i32.eq + return + end + local.get $1 + i32.const 3 + i32.eq + return + end + i32.const 0 + return + ) + (func $null (; 54 ;) (type $FUNCSIG$v) + ) + (func $~lib/runtime/runtime.newArray|trampoline (; 55 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 3 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/runtime/runtime.newArray + ) + (func $~lib/setargc (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.set $~lib/argc ) ) diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index cd28ee7b6b..4ccf88b0c7 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -7,6 +7,7 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -33,9 +34,22 @@ (global $constructor/ctorConditionallyReturns (mut i32) (i32.const 0)) (global $constructor/ctorAllocates (mut i32) (i32.const 0)) (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) + (export "runtime.discard" (func $~lib/runtime/runtime.discard)) + (export "runtime.register" (func $~lib/runtime/runtime.register)) + (export "runtime.newString" (func $~lib/runtime/runtime.newString)) + (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export ".setargc" (func $~lib/setargc)) + (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "runtime.retain" (func $~lib/runtime/runtime.retain)) + (export "runtime.release" (func $~lib/runtime/runtime.release)) + (export "runtime.collect" (func $~lib/runtime/runtime.collect)) (export ".capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/allocator/tlsf/Root#setSLMap (; 1 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -1283,7 +1297,7 @@ if i32.const 0 i32.const 88 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -1298,7 +1312,7 @@ if i32.const 0 i32.const 88 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -1407,10 +1421,767 @@ call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates ) - (func $start (; 23 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.get $1 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + ) + (func $~lib/allocator/tlsf/__mem_free (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.tee $1 + if + local.get $0 + i32.const 8 + i32.sub + local.tee $2 + i32.load + local.tee $3 + i32.const 1 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + i32.const 1 + i32.or + i32.store + local.get $1 + local.get $0 + i32.const 8 + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/runtime/runtime.discard (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 120 + i32.le_u + if + i32.const 0 + i32.const 88 + i32.const 68 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 88 + i32.const 70 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/runtime/runtime.newString (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + i32.const 1 + call $~lib/runtime/runtime.register + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/runtime.allocate + i32.const 11 + call $~lib/runtime/runtime.register + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/collector/itcm/iter + local.get $0 + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + local.tee $2 + local.get $0 + i32.load offset=12 + local.tee $1 + i32.store offset=12 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $2 + i32.or + i32.store offset=8 + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/__ref_link (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + global.get $~lib/collector/itcm/white + i32.eqz + local.get $1 + i32.const 16 + i32.sub + local.tee $2 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + local.tee $1 + if (result i32) + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + else + local.get $1 + end + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/memory/memory.copy (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + br $continue|0 + end + end + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 + end + end + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end + end + end + loop $continue|5 + local.get $2 + if + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + ) + (func $~lib/runtime/runtime.newArray (; 31 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 16 + call $~lib/runtime/runtime.allocate + local.get $2 + call $~lib/runtime/runtime.register + local.tee $2 + local.set $6 + local.get $0 + local.get $1 + i32.shl + local.tee $4 + call $~lib/runtime/runtime.allocate + i32.const 11 + call $~lib/runtime/runtime.register + local.tee $5 + local.tee $1 + local.get $2 + i32.load + i32.ne + if + local.get $1 + local.get $6 + call $~lib/collector/itcm/__ref_link + end + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $5 + i32.store offset=4 + local.get $2 + local.get $4 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=12 + local.get $3 + if + local.get $5 + local.get $3 + local.get $4 + call $~lib/memory/memory.copy + end + local.get $2 + ) + (func $~lib/runtime/runtime.retain (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/itcm/__ref_link + ) + (func $~lib/runtime/runtime.release (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/collector/itcm/step (; 34 ;) (type $FUNCSIG$v) + (local $0 i32) + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + global.get $~lib/collector/itcm/state + local.tee $0 + if + local.get $0 + i32.const 1 + i32.sub + br_table $case1|0 $case2|0 $case3|0 $break|0 + end + unreachable + end + call $~lib/runtime/__gc_mark_roots + i32.const 2 + global.set $~lib/collector/itcm/state + br $break|0 + end + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.or + i32.store offset=8 + local.get $0 + i32.load + call $~lib/runtime/__gc_mark_members + else + call $~lib/runtime/__gc_mark_roots + global.get $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $0 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $0 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + end + end + br $break|0 + end + global.get $~lib/collector/itcm/iter + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + local.get $0 + i32.const 120 + i32.ge_u + if + local.get $0 + call $~lib/allocator/tlsf/__mem_free + end + else + global.get $~lib/collector/itcm/toSpace + local.tee $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + i32.const 1 + global.set $~lib/collector/itcm/state + end + end + ) + (func $~lib/collector/itcm/__ref_collect (; 35 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/maybeInit + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|0 + end + end + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 + end + ) + (func $~lib/runtime/runtime.collect (; 36 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/__ref_collect + ) + (func $start (; 37 ;) (type $FUNCSIG$v) call $start:constructor + i32.const 0 + call $~lib/runtime/runtime.allocate + i32.const 12 + call $~lib/runtime/runtime.register + global.set $~lib/runtime/ROOT + ) + (func $~lib/collector/itcm/__ref_mark (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + call $~lib/collector/itcm/maybeInit + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/runtime/__gc_mark_roots (; 39 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/runtime/ROOT + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/emptyCtor + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/emptyCtorWithFieldInit + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/emptyCtorWithFieldNoInit + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/none + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/justFieldInit + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/justFieldNoInit + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/ctorReturns + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/ctorConditionallyReturns + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/ctorAllocates + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/ctorConditionallyAllocates + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + ) + (func $~lib/runtime/__gc_mark_members (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + block $invalid + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $constructor/CtorConditionallyAllocates + block $constructor/CtorAllocates + block $constructor/CtorConditionallyReturns + block $constructor/JustFieldNoInit + block $constructor/JustFieldInit + block $constructor/None + block $constructor/EmptyCtorWithFieldNoInit + block $constructor/EmptyCtorWithFieldInit + block $constructor/EmptyCtor + block $~lib/string/String + local.get $0 + i32.const 1 + i32.sub + br_table $~lib/string/String $constructor/EmptyCtor $constructor/EmptyCtorWithFieldInit $constructor/EmptyCtorWithFieldNoInit $constructor/None $constructor/JustFieldInit $constructor/JustFieldNoInit $constructor/CtorConditionallyReturns $constructor/CtorAllocates $constructor/CtorConditionallyAllocates $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + unreachable + ) + (func $~lib/runtime/__runtime_instanceof (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block $nope + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $constructor/CtorConditionallyAllocates + block $constructor/CtorAllocates + block $constructor/CtorConditionallyReturns + block $constructor/JustFieldNoInit + block $constructor/JustFieldInit + block $constructor/None + block $constructor/EmptyCtorWithFieldNoInit + block $constructor/EmptyCtorWithFieldInit + block $constructor/EmptyCtor + block $~lib/string/String + local.get $0 + i32.const 1 + i32.sub + br_table $~lib/string/String $constructor/EmptyCtor $constructor/EmptyCtorWithFieldInit $constructor/EmptyCtorWithFieldNoInit $constructor/None $constructor/JustFieldInit $constructor/JustFieldNoInit $constructor/CtorConditionallyReturns $constructor/CtorAllocates $constructor/CtorConditionallyAllocates $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope + end + local.get $1 + i32.const 1 + i32.eq + return + end + local.get $1 + i32.const 2 + i32.eq + return + end + local.get $1 + i32.const 3 + i32.eq + return + end + local.get $1 + i32.const 4 + i32.eq + return + end + local.get $1 + i32.const 5 + i32.eq + return + end + local.get $1 + i32.const 6 + i32.eq + return + end + local.get $1 + i32.const 7 + i32.eq + return + end + local.get $1 + i32.const 8 + i32.eq + return + end + local.get $1 + i32.const 9 + i32.eq + return + end + local.get $1 + i32.const 10 + i32.eq + return + end + local.get $1 + i32.const 11 + i32.eq + return + end + local.get $1 + i32.const 12 + i32.eq + return + end + i32.const 0 ) - (func $null (; 24 ;) (type $FUNCSIG$v) + (func $null (; 42 ;) (type $FUNCSIG$v) nop ) + (func $~lib/runtime/runtime.newArray|trampoline (; 43 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 3 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/runtime/runtime.newArray + ) + (func $~lib/setargc (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.set $~lib/argc + ) ) diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index 2fc23bfa82..4ee2de6eb2 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -7,6 +7,7 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") @@ -49,10 +50,23 @@ (global $constructor/ctorConditionallyReturns (mut i32) (i32.const 0)) (global $constructor/ctorAllocates (mut i32) (i32.const 0)) (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 120)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) + (export "runtime.discard" (func $~lib/runtime/runtime.discard)) + (export "runtime.register" (func $~lib/runtime/runtime.register)) + (export "runtime.newString" (func $~lib/runtime/runtime.newString)) + (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export ".setargc" (func $~lib/setargc)) + (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "runtime.retain" (func $~lib/runtime/runtime.retain)) + (export "runtime.release" (func $~lib/runtime/runtime.release)) + (export "runtime.collect" (func $~lib/runtime/runtime.collect)) (export ".capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -1563,7 +1577,7 @@ if i32.const 0 i32.const 88 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -1580,7 +1594,7 @@ if i32.const 0 i32.const 88 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -1774,9 +1788,887 @@ call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates ) - (func $start (; 40 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.get $1 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + ) + (func $~lib/allocator/tlsf/__mem_free (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + if + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $2 + local.get $2 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/memory/memory.free (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/runtime/runtime.discard (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 88 + i32.const 68 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $1 + local.get $1 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 88 + i32.const 70 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/memory/memory.free + ) + (func $~lib/runtime/runtime.newString (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + i32.const 1 + call $~lib/runtime/runtime.register + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/runtime.allocate + i32.const 11 + call $~lib/runtime/runtime.register + ) + (func $~lib/collector/itcm/ManagedObject#get:color (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#get:next (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#unlink (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + local.set $1 + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/collector/itcm/iter + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + call $~lib/collector/itcm/ManagedObject#unlink + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/__ref_link (; 50 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + local.set $3 + local.get $3 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eqz + i32.eq + local.tee $2 + if (result i32) + block $~lib/collector/itcm/refToObj|inlined.3 (result i32) + local.get $0 + local.set $2 + local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + else + local.get $2 + end + if + local.get $3 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/memory/memory.copy (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|2 + end + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + end + ) + (func $~lib/runtime/runtime.newArray (; 52 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + i32.const 16 + call $~lib/runtime/runtime.allocate + local.get $2 + call $~lib/runtime/runtime.register + local.set $4 + local.get $0 + local.get $1 + i32.shl + local.set $5 + local.get $5 + call $~lib/runtime/runtime.allocate + i32.const 11 + call $~lib/runtime/runtime.register + local.set $6 + local.get $4 + local.tee $7 + local.get $6 + local.tee $8 + local.get $7 + i32.load + local.tee $9 + i32.ne + if (result i32) + nop + local.get $8 + local.get $7 + call $~lib/collector/itcm/__ref_link + local.get $8 + else + local.get $8 + end + i32.store + local.get $4 + local.get $6 + i32.store offset=4 + local.get $4 + local.get $5 + i32.store offset=8 + local.get $4 + local.get $0 + i32.store offset=12 + local.get $3 + if + local.get $6 + local.get $3 + local.get $5 + call $~lib/memory/memory.copy + end + local.get $4 + ) + (func $~lib/runtime/Root#constructor (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/runtime/runtime.allocate + i32.const 12 + call $~lib/runtime/runtime.register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 54 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/itcm/__ref_link + ) + (func $~lib/runtime/runtime.release (; 55 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/collector/itcm/step (; 56 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + global.get $~lib/collector/itcm/state + local.set $1 + local.get $1 + i32.const 0 + i32.eq + br_if $case0|0 + local.get $1 + i32.const 1 + i32.eq + br_if $case1|0 + local.get $1 + i32.const 2 + i32.eq + br_if $case2|0 + local.get $1 + i32.const 3 + i32.eq + br_if $case3|0 + br $break|0 + end + unreachable + end + block + call $~lib/runtime/__gc_mark_roots + i32.const 2 + global.set $~lib/collector/itcm/state + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + call $~lib/collector/itcm/ManagedObject#set:color + local.get $0 + i32.load + block $~lib/collector/itcm/objToRef|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + call $~lib/runtime/__gc_mark_members + else + call $~lib/runtime/__gc_mark_roots + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $1 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $1 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $1 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + end + end + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.ge_u + if + local.get $0 + call $~lib/memory/memory.free + end + else + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + i32.const 1 + global.set $~lib/collector/itcm/state + end + br $break|0 + unreachable + end + unreachable + end + ) + (func $~lib/collector/itcm/__ref_collect (; 57 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/maybeInit + block $break|0 + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 + end + end + ) + (func $~lib/runtime/runtime.collect (; 58 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 60 ;) (type $FUNCSIG$v) call $start:constructor + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT + ) + (func $~lib/collector/itcm/__ref_mark (; 61 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.4 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end ) - (func $null (; 41 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__gc_mark_roots (; 62 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/runtime/ROOT + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/emptyCtor + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/emptyCtorWithFieldInit + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/emptyCtorWithFieldNoInit + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/none + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/justFieldInit + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/justFieldNoInit + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/ctorReturns + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/ctorConditionallyReturns + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/ctorAllocates + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + global.get $constructor/ctorConditionallyAllocates + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + ) + (func $~lib/runtime/__gc_mark_members (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + block $invalid + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $constructor/CtorConditionallyAllocates + block $constructor/CtorAllocates + block $constructor/CtorConditionallyReturns + block $constructor/JustFieldNoInit + block $constructor/JustFieldInit + block $constructor/None + block $constructor/EmptyCtorWithFieldNoInit + block $constructor/EmptyCtorWithFieldInit + block $constructor/EmptyCtor + block $~lib/string/String + local.get $0 + br_table $invalid $~lib/string/String $constructor/EmptyCtor $constructor/EmptyCtorWithFieldInit $constructor/EmptyCtorWithFieldNoInit $constructor/None $constructor/JustFieldInit $constructor/JustFieldNoInit $constructor/CtorConditionallyReturns $constructor/CtorAllocates $constructor/CtorConditionallyAllocates $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + unreachable + ) + (func $~lib/runtime/__runtime_instanceof (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block $nope + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $constructor/CtorConditionallyAllocates + block $constructor/CtorAllocates + block $constructor/CtorConditionallyReturns + block $constructor/JustFieldNoInit + block $constructor/JustFieldInit + block $constructor/None + block $constructor/EmptyCtorWithFieldNoInit + block $constructor/EmptyCtorWithFieldInit + block $constructor/EmptyCtor + block $~lib/string/String + local.get $0 + br_table $nope $~lib/string/String $constructor/EmptyCtor $constructor/EmptyCtorWithFieldInit $constructor/EmptyCtorWithFieldNoInit $constructor/None $constructor/JustFieldInit $constructor/JustFieldNoInit $constructor/CtorConditionallyReturns $constructor/CtorAllocates $constructor/CtorConditionallyAllocates $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope + end + local.get $1 + i32.const 1 + i32.eq + return + end + local.get $1 + i32.const 2 + i32.eq + return + end + local.get $1 + i32.const 3 + i32.eq + return + end + local.get $1 + i32.const 4 + i32.eq + return + end + local.get $1 + i32.const 5 + i32.eq + return + end + local.get $1 + i32.const 6 + i32.eq + return + end + local.get $1 + i32.const 7 + i32.eq + return + end + local.get $1 + i32.const 8 + i32.eq + return + end + local.get $1 + i32.const 9 + i32.eq + return + end + local.get $1 + i32.const 10 + i32.eq + return + end + local.get $1 + i32.const 11 + i32.eq + return + end + local.get $1 + i32.const 12 + i32.eq + return + end + i32.const 0 + return + ) + (func $null (; 65 ;) (type $FUNCSIG$v) + ) + (func $~lib/runtime/runtime.newArray|trampoline (; 66 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 3 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/runtime/runtime.newArray + ) + (func $~lib/setargc (; 67 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.set $~lib/argc ) ) diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index 97d6ada495..c69f10e119 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -150,7 +150,7 @@ if i32.const 0 i32.const 16 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -165,7 +165,7 @@ if i32.const 0 i32.const 16 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 4e9fdb95ea..6d21861e83 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -196,7 +196,7 @@ if i32.const 0 i32.const 16 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -213,7 +213,7 @@ if i32.const 0 i32.const 16 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc.optimized.wat b/tests/compiler/gc.optimized.wat index e3ab7c4f10..8fc022e45e 100644 --- a/tests/compiler/gc.optimized.wat +++ b/tests/compiler/gc.optimized.wat @@ -5,10 +5,7 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) @@ -17,16 +14,14 @@ (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (data (i32.const 56) "\02\00\00\00\16") (data (i32.const 72) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") - (data (i32.const 96) "\02\00\00\00\n") - (data (i32.const 112) "g\00c\00.\00t\00s") - (data (i32.const 128) "\02\00\00\00&") - (data (i32.const 144) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 184) "\02\00\00\00\0e") - (data (i32.const 200) "g\00c\00.\00l\00i\00n\00k") - (data (i32.const 216) "\02\00\00\00\12") - (data (i32.const 232) "g\00c\00.\00u\00n\00l\00i\00n\00k") - (data (i32.const 256) "\02\00\00\00\14") - (data (i32.const 272) "g\00c\00.\00c\00o\00l\00l\00e\00c\00t") + (data (i32.const 96) "\02\00\00\00\0e") + (data (i32.const 112) "g\00c\00.\00l\00i\00n\00k") + (data (i32.const 128) "\02\00\00\00\n") + (data (i32.const 144) "g\00c\00.\00t\00s") + (data (i32.const 160) "\02\00\00\00\12") + (data (i32.const 176) "g\00c\00.\00u\00n\00l\00i\00n\00k") + (data (i32.const 200) "\02\00\00\00\14") + (data (i32.const 216) "g\00c\00.\00c\00o\00l\00l\00e\00c\00t") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) @@ -40,27 +35,12 @@ (global $gc/_dummy/unlink_parentRef (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/gc/gc.implemented i32 (i32.const 1)) - (global $~lib/gc/ROOT (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/main)) - (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) - (export "runtime.reallocate" (func $~lib/runtime/runtime.reallocate)) - (export "runtime.discard" (func $~lib/runtime/runtime.discard)) - (export "runtime.register" (func $~lib/runtime/runtime.register)) - (export "runtime.newString" (func $~lib/runtime/runtime.newString)) - (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export ".setargc" (func $~lib/setargc)) - (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "gc.implemented" (global $~lib/gc/gc.implemented)) - (export "gc.collect" (func $~lib/gc/gc.collect)) - (export "gc.retain" (func $~lib/gc/gc.retain)) - (export "gc.release" (func $~lib/gc/gc.release)) (export ".capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -124,30 +104,23 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 15 - i32.add - i32.clz - i32.sub - i32.shl + (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 16 call $~lib/allocator/arena/__mem_allocate - local.tee $1 + local.tee $0 i32.const -1520547049 i32.store - local.get $1 local.get $0 + i32.const 0 i32.store offset=4 - local.get $1 + local.get $0 i32.const 0 i32.store offset=8 - local.get $1 + local.get $0 i32.const 0 i32.store offset=12 - local.get $1 + local.get $0 i32.const 16 i32.add ) @@ -171,12 +144,12 @@ (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 292 + i32.const 236 i32.le_u if i32.const 0 i32.const 24 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -191,7 +164,7 @@ if i32.const 0 i32.const 24 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -203,241 +176,8 @@ call $gc/_dummy/__ref_register local.get $0 ) - (func $~lib/memory/memory.fill (; 6 ;) (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 $1 - i32.sub - local.set $2 - local.get $0 - local.get $1 - i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $2 - 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/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - i32.const 0 - i32.const 144 - i32.const 54 - i32.const 43 - call $~lib/env/abort - unreachable - end - local.get $0 - call $~lib/runtime/runtime.allocate - local.tee $1 - local.get $0 - call $~lib/memory/memory.fill - local.get $1 - i32.const 4 - call $~lib/runtime/runtime.register - ) - (func $gc/_dummy/__ref_link (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 200 + (func $gc/_dummy/__ref_link (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 112 i32.const 2 local.get $0 f64.convert_i32_u @@ -456,8 +196,8 @@ local.get $0 global.set $gc/_dummy/link_parentRef ) - (func $gc/_dummy/__ref_unlink (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 232 + (func $gc/_dummy/__ref_unlink (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 176 i32.const 2 local.get $0 f64.convert_i32_u @@ -476,491 +216,124 @@ local.get $1 global.set $gc/_dummy/unlink_parentRef ) - (func $~lib/set/Set#clear (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $gc/main (; 8 ;) (type $FUNCSIG$v) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - local.get $0 - local.tee $2 + global.get $~lib/started + i32.eqz + if + i32.const 240 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + call $~lib/runtime/runtime.allocate + i32.const 3 + call $~lib/runtime/runtime.register + global.set $~lib/runtime/ROOT + i32.const 1 + global.set $~lib/started + end + call $~lib/runtime/runtime.allocate + i32.const 1 + call $~lib/runtime/runtime.register + local.set $2 + global.get $gc/_dummy/link_count + local.set $0 + global.get $gc/_dummy/unlink_count local.set $1 - i32.const 16 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $0 - local.get $1 - i32.load - local.tee $3 + global.get $gc/_dummy/collect_count + local.set $3 + local.get $2 + global.get $~lib/runtime/ROOT + call $gc/_dummy/__ref_link + global.get $gc/_dummy/link_count + local.get $0 + i32.const 1 + i32.add i32.ne if - local.get $3 - if - local.get $3 - local.get $2 - call $gc/_dummy/__ref_unlink - end - local.get $0 - local.get $2 - call $gc/_dummy/__ref_link + i32.const 0 + i32.const 144 + i32.const 14 + i32.const 2 + call $~lib/env/abort + unreachable end + global.get $gc/_dummy/unlink_count local.get $1 - local.get $0 - i32.store - local.get $1 - i32.const 3 - i32.store offset=4 - i32.const 32 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $0 - local.get $1 - local.tee $2 - i32.load offset=8 - local.tee $3 i32.ne if - local.get $3 - if - local.get $3 - local.get $2 - call $gc/_dummy/__ref_unlink - end - local.get $0 - local.get $2 - call $gc/_dummy/__ref_link + i32.const 0 + i32.const 144 + i32.const 15 + i32.const 2 + call $~lib/env/abort + unreachable end - local.get $1 + global.get $gc/_dummy/collect_count + local.get $3 + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 16 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/link_count + local.set $0 + global.get $gc/_dummy/unlink_count + local.set $1 + global.get $gc/_dummy/collect_count + local.set $3 + local.get $2 + global.get $~lib/runtime/ROOT + call $gc/_dummy/__ref_unlink + global.get $gc/_dummy/link_count local.get $0 - i32.store offset=8 - local.get $1 - i32.const 4 - i32.store offset=12 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - ) - (func $~lib/set/Set#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - i32.const 24 - call $~lib/runtime/runtime.allocate - i32.const 3 - call $~lib/runtime/runtime.register - local.tee $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - call $~lib/set/Set#clear - local.get $0 - ) - (func $~lib/util/hash/hash32 (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.get $0 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $0 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.get $0 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - ) - (func $~lib/set/Set#find (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.load - local.get $0 - i32.load offset=4 - local.get $2 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $2 - loop $continue|0 - local.get $2 - if - local.get $2 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - local.tee $0 - if - local.get $2 - i32.load - local.get $1 - i32.eq - local.set $0 - end - local.get $0 - if - local.get $2 - return - end - local.get $2 - i32.load offset=4 - i32.const -2 - i32.and - local.set $2 - br $continue|0 - end - end - i32.const 0 - ) - (func $~lib/set/Set#has (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) - (func $~lib/set/Set#rehash (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 23 + i32.const 2 + call $~lib/env/abort + unreachable + end + global.get $gc/_dummy/unlink_count local.get $1 i32.const 1 i32.add - local.tee $2 - i32.const 2 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 - f64.convert_i32_s - f64.const 2.6666666666666665 - f64.mul - i32.trunc_f64_s - local.tee $6 - i32.const 3 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $0 - i32.load offset=8 - local.tee $2 - local.get $0 - i32.load offset=16 - i32.const 3 - i32.shl - i32.add - local.set $7 - local.get $5 - local.set $3 - loop $continue|0 - local.get $2 - local.get $7 - i32.ne - if - local.get $2 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $3 - local.get $2 - i32.load - i32.store - local.get $3 - local.get $2 - i32.load - call $~lib/util/hash/hash32 - local.get $1 - i32.and - i32.const 2 - i32.shl - local.get $4 - i32.add - local.tee $8 - i32.load - i32.store offset=4 - local.get $8 - local.get $3 - i32.store - local.get $3 - i32.const 8 - i32.add - local.set $3 - end - local.get $2 - i32.const 8 - i32.add - local.set $2 - br $continue|0 - end - end - local.get $0 - local.tee $3 - local.set $2 - local.get $4 - local.tee $0 - local.get $2 - i32.load - local.tee $4 i32.ne if - local.get $4 - if - local.get $4 - local.get $3 - call $gc/_dummy/__ref_unlink - end - local.get $0 - local.get $3 - call $gc/_dummy/__ref_link + i32.const 0 + i32.const 144 + i32.const 24 + i32.const 2 + call $~lib/env/abort + unreachable end - local.get $2 - local.get $0 - i32.store - local.get $2 - local.get $1 - i32.store offset=4 - local.get $5 - local.tee $0 - local.get $2 - local.tee $1 - i32.load offset=8 - local.tee $3 + global.get $gc/_dummy/collect_count + local.get $3 i32.ne if - local.get $3 - if - local.get $3 - local.get $2 - call $gc/_dummy/__ref_unlink - end - local.get $0 - local.get $2 - call $gc/_dummy/__ref_link - end - local.get $1 - local.get $0 - i32.store offset=8 - local.get $1 - local.get $6 - i32.store offset=12 - local.get $1 - local.get $1 - i32.load offset=20 - i32.store offset=16 - ) - (func $~lib/set/Set#add (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/hash32 - local.tee $3 - call $~lib/set/Set#find - i32.eqz - if - local.get $0 - i32.load offset=16 - local.get $0 - i32.load offset=12 - i32.eq - if - local.get $0 - local.get $0 - i32.load offset=20 - local.get $0 - i32.load offset=12 - f64.convert_i32_s - f64.const 0.75 - f64.mul - i32.trunc_f64_s - i32.lt_s - if (result i32) - local.get $0 - i32.load offset=4 - else - local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or - end - call $~lib/set/Set#rehash - end - local.get $0 - i32.load offset=8 - local.set $2 - local.get $0 - local.get $0 - i32.load offset=16 - local.tee $4 - i32.const 1 - i32.add - i32.store offset=16 - local.get $4 - i32.const 3 - i32.shl - local.get $2 - i32.add - local.tee $2 - local.get $1 - i32.store - local.get $0 - local.get $0 - i32.load offset=20 - i32.const 1 - i32.add - i32.store offset=20 - local.get $2 - local.get $0 - i32.load - local.get $0 - i32.load offset=4 - local.get $3 - i32.and + i32.const 0 + i32.const 144 + i32.const 25 i32.const 2 - i32.shl - i32.add - local.tee $0 - i32.load - i32.store offset=4 - local.get $0 - local.get $2 - i32.store - end - ) - (func $~lib/gc/gc.retain (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - global.get $~lib/gc/ROOT - local.tee $1 - local.get $0 - call $~lib/set/Set#has - i32.eqz - if - local.get $1 - local.get $0 - call $~lib/set/Set#add - local.get $0 - local.get $1 - call $gc/_dummy/__ref_link - end - ) - (func $~lib/set/Set#delete (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find - local.tee $1 - i32.eqz - if - return - end - local.get $1 - local.get $1 - i32.load offset=4 - i32.const 1 - i32.or - i32.store offset=4 - local.get $0 - local.get $0 - i32.load offset=20 - i32.const 1 - i32.sub - i32.store offset=20 - local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u - local.tee $2 - i32.const 1 - i32.add - i32.const 4 - local.get $0 - i32.load offset=20 - local.tee $1 - i32.const 4 - local.get $1 - i32.gt_u - select - i32.ge_u - local.tee $1 - if (result i32) - local.get $0 - i32.load offset=20 - local.get $0 - i32.load offset=12 - f64.convert_i32_s - f64.const 0.75 - f64.mul - i32.trunc_f64_s - i32.lt_s - else - local.get $1 - end - if - local.get $0 - local.get $2 - call $~lib/set/Set#rehash - end - ) - (func $~lib/gc/gc.release (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - global.get $~lib/gc/ROOT - local.tee $1 - local.get $0 - call $~lib/set/Set#has - if - local.get $1 - local.get $0 - call $~lib/set/Set#delete - local.get $0 - local.get $1 - call $gc/_dummy/__ref_unlink + call $~lib/env/abort + unreachable end - ) - (func $~lib/gc/gc.collect (; 20 ;) (type $FUNCSIG$v) - i32.const 272 + global.get $gc/_dummy/link_count + local.set $2 + global.get $gc/_dummy/unlink_count + local.set $0 + global.get $gc/_dummy/collect_count + local.set $1 + i32.const 216 i32.const 0 f64.const 0 f64.const 0 @@ -972,46 +345,13 @@ i32.const 1 i32.add global.set $gc/_dummy/collect_count - ) - (func $gc/main (; 21 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/started - i32.eqz - if - i32.const 296 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - call $~lib/set/Set#constructor - global.set $~lib/gc/ROOT - i32.const 1 - global.set $~lib/started - end - i32.const 0 - call $~lib/runtime/runtime.allocate - i32.const 1 - call $~lib/runtime/runtime.register - local.set $2 global.get $gc/_dummy/link_count - local.set $3 - global.get $gc/_dummy/unlink_count - local.set $0 - global.get $gc/_dummy/collect_count - local.set $1 local.get $2 - call $~lib/gc/gc.retain - global.get $gc/_dummy/link_count - local.get $3 - i32.const 1 - i32.add i32.ne if i32.const 0 - i32.const 112 - i32.const 17 + i32.const 144 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -1021,1423 +361,27 @@ i32.ne if i32.const 0 - i32.const 112 - i32.const 18 + i32.const 144 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable end global.get $gc/_dummy/collect_count local.get $1 + i32.const 1 + i32.add i32.ne if i32.const 0 - i32.const 112 - i32.const 19 + i32.const 144 + i32.const 34 i32.const 2 call $~lib/env/abort unreachable end - global.get $gc/_dummy/link_count - local.set $3 - global.get $gc/_dummy/unlink_count - local.set $0 - global.get $gc/_dummy/collect_count - local.set $1 - local.get $2 - call $~lib/gc/gc.release - global.get $gc/_dummy/link_count - local.get $3 - i32.ne - if - i32.const 0 - i32.const 112 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - global.get $gc/_dummy/unlink_count - local.get $0 - i32.const 1 - i32.add - i32.ne - if - i32.const 0 - i32.const 112 - i32.const 27 - i32.const 2 - call $~lib/env/abort - unreachable - end - global.get $gc/_dummy/collect_count - local.get $1 - i32.ne - if - i32.const 0 - i32.const 112 - i32.const 28 - i32.const 2 - call $~lib/env/abort - unreachable - end - global.get $gc/_dummy/link_count - local.set $0 - global.get $gc/_dummy/unlink_count - local.set $1 - global.get $gc/_dummy/collect_count - local.set $2 - call $~lib/gc/gc.collect - global.get $gc/_dummy/link_count - local.get $0 - i32.ne - if - i32.const 0 - i32.const 112 - i32.const 35 - i32.const 2 - call $~lib/env/abort - unreachable - end - global.get $gc/_dummy/unlink_count - local.get $1 - i32.ne - if - i32.const 0 - i32.const 112 - i32.const 36 - i32.const 2 - call $~lib/env/abort - unreachable - end - global.get $gc/_dummy/collect_count - local.get $2 - i32.const 1 - i32.add - i32.ne - if - i32.const 0 - i32.const 112 - i32.const 37 - i32.const 2 - call $~lib/env/abort - unreachable - end - ) - (func $~lib/runtime/runtime.instanceof (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - if (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load - local.get $1 - call $~lib/runtime/__runtime_instanceof - else - i32.const 0 - end - ) - (func $~lib/util/memory/memcpy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $continue|0 - local.get $1 - i32.const 3 - i32.and - local.get $2 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - local.get $0 - i32.const 3 - i32.and - local.tee $3 - i32.const 1 - i32.ne - if - local.get $3 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $3 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 13 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 15 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - local.set $3 - end - local.get $3 - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 - end - end - end - loop $continue|2 - local.get $2 - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|3 - end - end - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - br $continue|4 - end - end - end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - end - ) - (func $~lib/runtime/runtime.reallocate (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.const 16 - i32.sub - local.tee $4 - i32.load offset=4 - local.tee $2 - local.get $1 - i32.lt_u - if - i32.const 1 - i32.const 32 - local.get $1 - i32.const 15 - i32.add - i32.clz - i32.sub - i32.shl - local.tee $3 - local.set $5 - i32.const 1 - i32.const 32 - local.get $2 - i32.const 15 - i32.add - i32.clz - i32.sub - i32.shl - i32.const 0 - local.get $0 - i32.const 292 - i32.gt_u - select - local.get $3 - i32.lt_u - if - local.get $5 - call $~lib/allocator/arena/__mem_allocate - local.tee $3 - local.get $4 - i32.load - i32.store - local.get $3 - i32.const 0 - i32.store offset=8 - local.get $3 - i32.const 0 - i32.store offset=12 - local.get $3 - i32.const 16 - i32.add - local.tee $5 - local.get $0 - local.get $2 - call $~lib/memory/memory.copy - local.get $2 - local.get $5 - i32.add - local.get $1 - local.get $2 - i32.sub - call $~lib/memory/memory.fill - local.get $4 - i32.load - i32.const -1520547049 - i32.eq - if - local.get $0 - i32.const 292 - i32.le_u - if - i32.const 0 - i32.const 24 - i32.const 77 - i32.const 10 - call $~lib/env/abort - unreachable - end - else - local.get $0 - call $gc/_dummy/__ref_register - end - local.get $3 - local.set $4 - local.get $5 - local.set $0 - 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 $4 - local.get $1 - i32.store offset=4 - local.get $0 - ) - (func $~lib/runtime/runtime.discard (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.const 292 - i32.le_u - if - i32.const 0 - i32.const 24 - i32.const 103 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const -1520547049 - i32.ne - if - i32.const 0 - i32.const 24 - i32.const 105 - i32.const 6 - call $~lib/env/abort - unreachable - end ) - (func $~lib/runtime/runtime.newString (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 1 - i32.shl - call $~lib/runtime/runtime.allocate - i32.const 2 - call $~lib/runtime/runtime.register - ) - (func $~lib/runtime/runtime.newArrayBuffer (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/runtime.allocate - i32.const 4 - call $~lib/runtime/runtime.register - ) - (func $~lib/runtime/runtime.newArray (; 29 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - i32.const 16 - call $~lib/runtime/runtime.allocate - local.get $2 - call $~lib/runtime/runtime.register - local.tee $2 - local.set $4 - local.get $0 - local.get $1 - i32.shl - local.tee $5 - call $~lib/runtime/runtime.allocate - i32.const 4 - call $~lib/runtime/runtime.register - local.tee $6 - local.tee $1 - local.get $2 - i32.load - local.tee $7 - i32.ne - if - local.get $7 - if - local.get $7 - local.get $4 - call $gc/_dummy/__ref_unlink - end - local.get $1 - local.get $4 - call $gc/_dummy/__ref_link - end - local.get $2 - local.get $1 - i32.store - local.get $2 - local.get $6 - i32.store offset=4 - local.get $2 - local.get $5 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=12 - local.get $3 - if - local.get $6 - local.get $3 - local.get $5 - call $~lib/memory/memory.copy - end - local.get $2 - ) - (func $~lib/runtime/__runtime_instanceof (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - block $nope - block $~lib/arraybuffer/ArrayBuffer - block $~lib/set/Set - block $~lib/string/String - block $gc/Ref - local.get $0 - i32.const 1 - i32.sub - br_table $gc/Ref $~lib/string/String $~lib/set/Set $~lib/arraybuffer/ArrayBuffer $nope - end - local.get $1 - i32.const 1 - i32.eq - return - end - local.get $1 - i32.const 2 - i32.eq - return - end - local.get $1 - i32.const 3 - i32.eq - return - end - local.get $1 - i32.const 4 - i32.eq - return - end - i32.const 0 - ) - (func $null (; 31 ;) (type $FUNCSIG$v) + (func $null (; 9 ;) (type $FUNCSIG$v) nop ) - (func $~lib/runtime/runtime.newArray|trampoline (; 32 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 3 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 0 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/runtime/runtime.newArray - ) - (func $~lib/setargc (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.set $~lib/argc - ) ) diff --git a/tests/compiler/gc.ts b/tests/compiler/gc.ts index 7be2ec7796..3242df9ce1 100644 --- a/tests/compiler/gc.ts +++ b/tests/compiler/gc.ts @@ -1,18 +1,15 @@ import { link_count, unlink_count, collect_count } from "./gc/_dummy"; -export { runtime, gc }; class Ref {} @start export function main(): void { var ref = new Ref(); - assert(gc.implemented); - var previous_link_count = link_count; var previous_unlink_count = unlink_count; var previous_collect_count = collect_count; - gc.retain(changetype(ref)); + runtime.retain(changetype(ref)); assert(link_count == previous_link_count + 1); assert(unlink_count == previous_unlink_count); @@ -21,7 +18,7 @@ class Ref {} previous_unlink_count = unlink_count; previous_collect_count = collect_count; - gc.release(changetype(ref)); + runtime.release(changetype(ref)); assert(link_count == previous_link_count); assert(unlink_count == previous_unlink_count + 1); @@ -30,7 +27,7 @@ class Ref {} previous_unlink_count = unlink_count; previous_collect_count = collect_count; - gc.collect(); + runtime.collect(); assert(link_count == previous_link_count); assert(unlink_count == previous_unlink_count); diff --git a/tests/compiler/gc.untouched.wat b/tests/compiler/gc.untouched.wat index 8ce0dac722..852a8628c8 100644 --- a/tests/compiler/gc.untouched.wat +++ b/tests/compiler/gc.untouched.wat @@ -5,20 +5,16 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 56) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") - (data (i32.const 96) "\02\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00t\00s\00") - (data (i32.const 128) "\02\00\00\00&\00\00\00\00\00\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 184) "\02\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00l\00i\00n\00k\00") - (data (i32.const 216) "\02\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00u\00n\00l\00i\00n\00k\00") - (data (i32.const 256) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00c\00o\00l\00l\00e\00c\00t\00") + (data (i32.const 96) "\02\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00l\00i\00n\00k\00") + (data (i32.const 128) "\02\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00t\00s\00") + (data (i32.const 160) "\02\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00u\00n\00l\00i\00n\00k\00") + (data (i32.const 200) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00c\00o\00l\00l\00e\00c\00t\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) @@ -37,29 +33,13 @@ (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/gc/gc.implemented i32 (i32.const 1)) - (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) - (global $~lib/gc/ROOT (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 292)) - (global $~lib/argc (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 236)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/main)) - (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) - (export "runtime.reallocate" (func $~lib/runtime/runtime.reallocate)) - (export "runtime.discard" (func $~lib/runtime/runtime.discard)) - (export "runtime.register" (func $~lib/runtime/runtime.register)) - (export "runtime.newString" (func $~lib/runtime/runtime.newString)) - (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export ".setargc" (func $~lib/setargc)) - (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "gc.implemented" (global $~lib/gc/gc.implemented)) - (export "gc.collect" (func $~lib/gc/gc.collect)) - (export "gc.retain" (func $~lib/gc/gc.retain)) - (export "gc.release" (func $~lib/gc/gc.release)) (export ".capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -205,7 +185,7 @@ if i32.const 0 i32.const 24 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -222,7 +202,7 @@ if i32.const 0 i32.const 24 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -246,289 +226,20 @@ end local.get $0 ) - (func $~lib/memory/memory.fill (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i64) - block $~lib/util/memory/memset|inlined.0 - local.get $2 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end + (func $~lib/runtime/Root#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if i32.const 0 - local.get $0 - i32.sub + call $~lib/runtime/runtime.allocate i32.const 3 - i32.and - local.set $5 - local.get $0 - local.get $5 - i32.add - local.set $0 - local.get $2 - local.get $5 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $5 - local.get $0 - local.get $5 - i32.add + call $~lib/runtime/runtime.register local.set $0 - local.get $2 - local.get $5 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $6 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $6 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $6 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $6 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $6 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - end - br $continue|0 - end - end - end - end - ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - global.get $~lib/util/runtime/MAX_BYTELENGTH - i32.gt_u - if - i32.const 0 - i32.const 144 - i32.const 54 - i32.const 43 - call $~lib/env/abort - unreachable end - local.get $1 - call $~lib/runtime/runtime.allocate - local.set $2 - local.get $2 - i32.const 0 - local.get $1 - call $~lib/memory/memory.fill - local.get $2 - i32.const 4 - call $~lib/runtime/runtime.register + local.get $0 ) - (func $gc/_dummy/__ref_link (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 200 + (func $gc/_dummy/__ref_link (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 112 i32.const 2 local.get $0 f64.convert_i32_u @@ -547,8 +258,13 @@ local.get $0 global.set $gc/_dummy/link_parentRef ) + (func $~lib/runtime/runtime.retain (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $gc/_dummy/__ref_link + ) (func $gc/_dummy/__ref_unlink (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 232 + i32.const 176 i32.const 2 local.get $0 f64.convert_i32_u @@ -567,634 +283,43 @@ local.get $1 global.set $gc/_dummy/unlink_parentRef ) - (func $~lib/set/Set#clear (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/runtime/runtime.release (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - local.tee $1 + global.get $~lib/runtime/ROOT + call $gc/_dummy/__ref_unlink + ) + (func $gc/_dummy/__ref_collect (; 14 ;) (type $FUNCSIG$v) + i32.const 216 i32.const 0 - i32.const 16 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $2 - local.get $1 - i32.load - local.tee $3 - i32.ne - if (result i32) - local.get $3 - if - local.get $3 - local.get $1 - call $gc/_dummy/__ref_unlink - end - local.get $2 - local.get $1 - call $gc/_dummy/__ref_link - local.get $2 - else - local.get $2 - end - i32.store - local.get $0 - i32.const 4 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $gc/_dummy/collect_count i32.const 1 - i32.sub - i32.store offset=4 - local.get $0 - local.tee $1 - i32.const 0 - i32.const 32 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 - local.get $1 - i32.load offset=8 - local.tee $2 - i32.ne - if (result i32) - local.get $2 - if - local.get $2 - local.get $1 - call $gc/_dummy/__ref_unlink - end - local.get $3 - local.get $1 - call $gc/_dummy/__ref_link - local.get $3 - else - local.get $3 - end - i32.store offset=8 - local.get $0 - i32.const 4 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 + i32.add + global.set $gc/_dummy/collect_count ) - (func $~lib/set/Set#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - block (result i32) - local.get $0 - i32.eqz - if - i32.const 24 - call $~lib/runtime/runtime.allocate - i32.const 3 - call $~lib/runtime/runtime.register - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - end - call $~lib/set/Set#clear - local.get $0 + (func $~lib/runtime/runtime.collect (; 15 ;) (type $FUNCSIG$v) + call $gc/_dummy/__ref_collect ) - (func $~lib/util/hash/hash32 (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $gc/main (; 16 ;) (type $FUNCSIG$v) + (local $0 i32) (local $1 i32) - i32.const -2128831035 - local.set $1 - local.get $1 - local.get $0 - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 16 - i32.shr_u - i32.const 255 - i32.and - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - local.get $0 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 - ) - (func $~lib/set/Set#find (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $2 i32) (local $3 i32) - (local $4 i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 4 - i32.mul - i32.add - i32.load - local.set $3 - block $break|0 - loop $continue|0 - local.get $3 - if - block - local.get $3 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - local.tee $4 - if (result i32) - local.get $3 - i32.load - local.get $1 - i32.eq - else - local.get $4 - end - if - local.get $3 - return - end - local.get $3 - i32.load offset=4 - i32.const 1 - i32.const -1 - i32.xor - i32.and - local.set $3 - end - br $continue|0 - end - end - end - i32.const 0 - ) - (func $~lib/set/Set#has (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) - (func $~lib/set/Set#rehash (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - local.get $1 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.get $2 - i32.const 4 - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 - local.get $2 - f64.convert_i32_s - f64.const 2.6666666666666665 - f64.mul - i32.trunc_f64_s - local.set $4 - i32.const 0 - local.get $4 - block $~lib/set/ENTRY_SIZE|inlined.1 (result i32) - i32.const 8 - end - i32.mul - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 - i32.load offset=16 - block $~lib/set/ENTRY_SIZE|inlined.2 (result i32) - i32.const 8 - end - i32.mul - i32.add - local.set $7 - local.get $5 - local.set $8 - block $break|0 - loop $continue|0 - local.get $6 - local.get $7 - i32.ne - if - block - local.get $6 - local.set $9 - local.get $9 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $8 - local.set $10 - local.get $10 - local.get $9 - i32.load - i32.store - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $9 - i32.load - local.set $11 - local.get $11 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end - local.get $1 - i32.and - local.set $11 - local.get $3 - local.get $11 - i32.const 4 - i32.mul - i32.add - local.set $12 - local.get $10 - local.get $12 - i32.load - i32.store offset=4 - local.get $12 - local.get $8 - i32.store - local.get $8 - block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) - i32.const 8 - end - i32.add - local.set $8 - end - local.get $6 - block $~lib/set/ENTRY_SIZE|inlined.4 (result i32) - i32.const 8 - end - i32.add - local.set $6 - end - br $continue|0 - end - end - end - local.get $0 - local.tee $9 - local.get $3 - local.tee $12 - local.get $9 - i32.load - local.tee $11 - i32.ne - if (result i32) - local.get $11 - if - local.get $11 - local.get $9 - call $gc/_dummy/__ref_unlink - end - local.get $12 - local.get $9 - call $gc/_dummy/__ref_link - local.get $12 - else - local.get $12 - end - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 - local.tee $9 - local.get $5 - local.tee $11 - local.get $9 - i32.load offset=8 - local.tee $12 - i32.ne - if (result i32) - local.get $12 - if - local.get $12 - local.get $9 - call $gc/_dummy/__ref_unlink - end - local.get $11 - local.get $9 - call $gc/_dummy/__ref_link - local.get $11 - else - local.get $11 - end - i32.store offset=8 - local.get $0 - local.get $4 - i32.store offset=12 - local.get $0 - local.get $0 - i32.load offset=20 - i32.store offset=16 - ) - (func $~lib/set/Set#add (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 - local.get $0 - local.get $1 - local.get $3 - call $~lib/set/Set#find - local.set $4 - local.get $4 - i32.eqz - if - local.get $0 - i32.load offset=16 - local.get $0 - i32.load offset=12 - i32.eq - if - local.get $0 - local.get $0 - i32.load offset=20 - local.get $0 - i32.load offset=12 - f64.convert_i32_s - f64.const 0.75 - f64.mul - i32.trunc_f64_s - i32.lt_s - if (result i32) - local.get $0 - i32.load offset=4 - else - local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or - end - call $~lib/set/Set#rehash - end - local.get $0 - i32.load offset=8 - local.set $2 - local.get $2 - block (result i32) - local.get $0 - local.get $0 - i32.load offset=16 - local.tee $5 - i32.const 1 - i32.add - i32.store offset=16 - local.get $5 - end - block $~lib/set/ENTRY_SIZE|inlined.5 (result i32) - i32.const 8 - end - i32.mul - i32.add - local.set $4 - local.get $4 - local.get $1 - i32.store - local.get $0 - local.get $0 - i32.load offset=20 - i32.const 1 - i32.add - i32.store offset=20 - local.get $0 - i32.load - local.get $3 - local.get $0 - i32.load offset=4 - i32.and - i32.const 4 - i32.mul - i32.add - local.set $5 - local.get $4 - local.get $5 - i32.load - i32.store offset=4 - local.get $5 - local.get $4 - i32.store - end - ) - (func $~lib/gc/gc.retain (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - global.get $~lib/gc/ROOT - local.set $1 - local.get $1 - local.get $0 - call $~lib/set/Set#has - i32.eqz - if - local.get $1 - local.get $0 - call $~lib/set/Set#add - local.get $0 - local.get $1 - call $gc/_dummy/__ref_link - end - ) - (func $~lib/set/Set#delete (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end - call $~lib/set/Set#find - local.set $3 - local.get $3 - i32.eqz - if - i32.const 0 - return - end - local.get $3 - local.get $3 - i32.load offset=4 - i32.const 1 - i32.or - i32.store offset=4 - local.get $0 - local.get $0 - i32.load offset=20 - i32.const 1 - i32.sub - i32.store offset=20 - local.get $0 - i32.load offset=4 - i32.const 1 - i32.shr_u - local.set $4 - local.get $4 - i32.const 1 - i32.add - i32.const 4 - local.tee $2 - local.get $0 - i32.load offset=20 - local.tee $5 - local.get $2 - local.get $5 - i32.gt_u - select - i32.ge_u - local.tee $2 - if (result i32) - local.get $0 - i32.load offset=20 - local.get $0 - i32.load offset=12 - f64.convert_i32_s - f64.const 0.75 - f64.mul - i32.trunc_f64_s - i32.lt_s - else - local.get $2 - end - if - local.get $0 - local.get $4 - call $~lib/set/Set#rehash - end - i32.const 1 - ) - (func $~lib/gc/gc.release (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - global.get $~lib/gc/ROOT - local.set $1 - local.get $1 - local.get $0 - call $~lib/set/Set#has - if - local.get $1 - local.get $0 - call $~lib/set/Set#delete - drop - local.get $0 - local.get $1 - call $gc/_dummy/__ref_unlink - end - ) - (func $gc/_dummy/__ref_collect (; 23 ;) (type $FUNCSIG$v) - i32.const 272 - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - call $~lib/env/trace - global.get $gc/_dummy/collect_count - i32.const 1 - i32.add - global.set $gc/_dummy/collect_count - ) - (func $~lib/gc/gc.collect (; 24 ;) (type $FUNCSIG$v) - call $gc/_dummy/__ref_collect - ) - (func $gc/main (; 25 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/started - i32.eqz - if - call $start - i32.const 1 - global.set $~lib/started + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started end i32.const 0 call $gc/Ref#constructor local.set $0 - global.get $~lib/gc/gc.implemented - i32.eqz - if - i32.const 0 - i32.const 112 - i32.const 9 - i32.const 2 - call $~lib/env/abort - unreachable - end global.get $gc/_dummy/link_count local.set $1 global.get $gc/_dummy/unlink_count @@ -1202,7 +327,7 @@ global.get $gc/_dummy/collect_count local.set $3 local.get $0 - call $~lib/gc/gc.retain + call $~lib/runtime/runtime.retain global.get $gc/_dummy/link_count local.get $1 i32.const 1 @@ -1211,8 +336,8 @@ i32.eqz if i32.const 0 - i32.const 112 - i32.const 17 + i32.const 144 + i32.const 14 i32.const 2 call $~lib/env/abort unreachable @@ -1223,8 +348,8 @@ i32.eqz if i32.const 0 - i32.const 112 - i32.const 18 + i32.const 144 + i32.const 15 i32.const 2 call $~lib/env/abort unreachable @@ -1235,8 +360,8 @@ i32.eqz if i32.const 0 - i32.const 112 - i32.const 19 + i32.const 144 + i32.const 16 i32.const 2 call $~lib/env/abort unreachable @@ -1248,15 +373,15 @@ global.get $gc/_dummy/collect_count local.set $3 local.get $0 - call $~lib/gc/gc.release + call $~lib/runtime/runtime.release global.get $gc/_dummy/link_count local.get $1 i32.eq i32.eqz if i32.const 0 - i32.const 112 - i32.const 26 + i32.const 144 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -1269,8 +394,8 @@ i32.eqz if i32.const 0 - i32.const 112 - i32.const 27 + i32.const 144 + i32.const 24 i32.const 2 call $~lib/env/abort unreachable @@ -1281,8 +406,8 @@ i32.eqz if i32.const 0 - i32.const 112 - i32.const 28 + i32.const 144 + i32.const 25 i32.const 2 call $~lib/env/abort unreachable @@ -1293,15 +418,15 @@ local.set $2 global.get $gc/_dummy/collect_count local.set $3 - call $~lib/gc/gc.collect + call $~lib/runtime/runtime.collect global.get $gc/_dummy/link_count local.get $1 i32.eq i32.eqz if i32.const 0 - i32.const 112 - i32.const 35 + i32.const 144 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -1312,8 +437,8 @@ i32.eqz if i32.const 0 - i32.const 112 - i32.const 36 + i32.const 144 + i32.const 33 i32.const 2 call $~lib/env/abort unreachable @@ -1326,1683 +451,14 @@ i32.eqz if i32.const 0 - i32.const 112 - i32.const 37 - i32.const 2 - call $~lib/env/abort - unreachable - end - ) - (func $~lib/runtime/runtime.instanceof (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - if (result i32) - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - i32.load - local.get $1 - call $~lib/runtime/__runtime_instanceof - else - i32.const 0 - end - ) - (func $~lib/util/memory/memcpy (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 + i32.const 144 + i32.const 34 i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - br $continue|1 - end - end - end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|2 - end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - end - br $continue|3 - end - end - end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 - end - end - end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - end - end - ) - (func $~lib/allocator/arena/__mem_free (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/memory/memory.free (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - call $~lib/allocator/arena/__mem_free - ) - (func $~lib/runtime/runtime.reallocate (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - local.set $2 - local.get $2 - i32.load offset=4 - local.set $3 - local.get $3 - local.get $1 - i32.lt_u - if - local.get $1 - call $~lib/util/runtime/adjust - local.set $4 - local.get $3 - call $~lib/util/runtime/adjust - i32.const 0 - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.gt_u - select - local.get $4 - i32.lt_u - if - local.get $4 - call $~lib/memory/memory.allocate - local.set $5 - local.get $5 - local.get $2 - i32.load - i32.store - local.get $5 - i32.const 0 - i32.store offset=8 - local.get $5 - i32.const 0 - i32.store offset=12 - local.get $5 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - local.set $6 - local.get $6 - local.get $0 - local.get $3 - call $~lib/memory/memory.copy - local.get $6 - local.get $3 - i32.add - i32.const 0 - local.get $1 - local.get $3 - i32.sub - call $~lib/memory/memory.fill - local.get $2 - i32.load - global.get $~lib/util/runtime/HEADER_MAGIC - i32.eq - if - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 77 - i32.const 10 - call $~lib/env/abort - unreachable - end - local.get $2 - call $~lib/memory/memory.free - else - local.get $0 - call $gc/_dummy/__ref_register - end - local.get $5 - local.set $2 - local.get $6 - local.set $0 - else - local.get $0 - local.get $3 - i32.add - i32.const 0 - local.get $1 - local.get $3 - i32.sub - call $~lib/memory/memory.fill - end - else - nop - end - local.get $2 - local.get $1 - i32.store offset=4 - local.get $0 - ) - (func $~lib/runtime/runtime.discard (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 103 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - local.set $1 - local.get $1 - i32.load - global.get $~lib/util/runtime/HEADER_MAGIC - i32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 105 - i32.const 6 call $~lib/env/abort unreachable end - local.get $1 - call $~lib/memory/memory.free - ) - (func $~lib/runtime/runtime.newString (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 1 - i32.shl - call $~lib/runtime/runtime.allocate - i32.const 2 - call $~lib/runtime/runtime.register - ) - (func $~lib/runtime/runtime.newArrayBuffer (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/runtime.allocate - i32.const 4 - call $~lib/runtime/runtime.register - ) - (func $~lib/runtime/runtime.newArray (; 35 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - i32.const 16 - call $~lib/runtime/runtime.allocate - local.get $2 - call $~lib/runtime/runtime.register - local.set $4 - local.get $0 - local.get $1 - i32.shl - local.set $5 - local.get $5 - call $~lib/runtime/runtime.allocate - i32.const 4 - call $~lib/runtime/runtime.register - local.set $6 - local.get $4 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - i32.load - local.tee $9 - i32.ne - if (result i32) - local.get $9 - if - local.get $9 - local.get $7 - call $gc/_dummy/__ref_unlink - end - local.get $8 - local.get $7 - call $gc/_dummy/__ref_link - local.get $8 - else - local.get $8 - end - i32.store - local.get $4 - local.get $6 - i32.store offset=4 - local.get $4 - local.get $5 - i32.store offset=8 - local.get $4 - local.get $0 - i32.store offset=12 - local.get $3 - if - local.get $6 - local.get $3 - local.get $5 - call $~lib/memory/memory.copy - end - local.get $4 - ) - (func $~lib/runtime/runtime#constructor (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - unreachable ) - (func $start (; 37 ;) (type $FUNCSIG$v) + (func $start (; 17 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -3014,65 +470,9 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 0 - call $~lib/set/Set#constructor - global.set $~lib/gc/ROOT + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT ) - (func $~lib/runtime/__runtime_instanceof (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - block $nope - block $~lib/arraybuffer/ArrayBuffer - block $~lib/set/Set - block $~lib/string/String - block $gc/Ref - local.get $0 - br_table $nope $gc/Ref $~lib/string/String $~lib/set/Set $~lib/arraybuffer/ArrayBuffer $nope - end - local.get $1 - i32.const 1 - i32.eq - return - end - local.get $1 - i32.const 2 - i32.eq - return - end - local.get $1 - i32.const 3 - i32.eq - return - end - local.get $1 - i32.const 4 - i32.eq - return - end - i32.const 0 - return - ) - (func $null (; 39 ;) (type $FUNCSIG$v) - ) - (func $~lib/runtime/runtime.newArray|trampoline (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 3 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 0 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/runtime/runtime.newArray - ) - (func $~lib/setargc (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.set $~lib/argc + (func $null (; 18 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/gc/global-assign.optimized.wat b/tests/compiler/gc/global-assign.optimized.wat index 1a400cab15..d3cbfae505 100644 --- a/tests/compiler/gc/global-assign.optimized.wat +++ b/tests/compiler/gc/global-assign.optimized.wat @@ -137,7 +137,7 @@ if i32.const 0 i32.const 24 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -152,7 +152,7 @@ if i32.const 0 i32.const 24 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-assign.untouched.wat b/tests/compiler/gc/global-assign.untouched.wat index 4500c3b9eb..c85ab40235 100644 --- a/tests/compiler/gc/global-assign.untouched.wat +++ b/tests/compiler/gc/global-assign.untouched.wat @@ -182,7 +182,7 @@ if i32.const 0 i32.const 24 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -199,7 +199,7 @@ if i32.const 0 i32.const 24 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-init.optimized.wat b/tests/compiler/gc/global-init.optimized.wat index c4844bf693..544170fbf7 100644 --- a/tests/compiler/gc/global-init.optimized.wat +++ b/tests/compiler/gc/global-init.optimized.wat @@ -136,7 +136,7 @@ if i32.const 0 i32.const 24 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -151,7 +151,7 @@ if i32.const 0 i32.const 24 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-init.untouched.wat b/tests/compiler/gc/global-init.untouched.wat index d23c9b565f..7f3ce6d220 100644 --- a/tests/compiler/gc/global-init.untouched.wat +++ b/tests/compiler/gc/global-init.untouched.wat @@ -181,7 +181,7 @@ if i32.const 0 i32.const 24 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -198,7 +198,7 @@ if i32.const 0 i32.const 24 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/itcm/trace.optimized.wat b/tests/compiler/gc/itcm/trace.optimized.wat index b758331a66..9284bdd4a8 100644 --- a/tests/compiler/gc/itcm/trace.optimized.wat +++ b/tests/compiler/gc/itcm/trace.optimized.wat @@ -45,28 +45,30 @@ (data (i32.const 808) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f") (data (i32.const 840) "\01\00\00\00\1a") (data (i32.const 856) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 888) "\01\00\00\00\1e") - (data (i32.const 904) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l") - (data (i32.const 936) "\01\00\00\00\16") - (data (i32.const 952) "#\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)") - (data (i32.const 976) "\01\00\00\00\18") - (data (i32.const 992) "i\00t\00c\00m\00.\00c\00o\00l\00l\00e\00c\00t") - (data (i32.const 1016) "\01\00\00\00\1c") - (data (i32.const 1032) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E") - (data (i32.const 1064) "\01\00\00\00\"") - (data (i32.const 1080) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K") - (data (i32.const 1120) "\01\00\00\00\1c") - (data (i32.const 1136) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K") - (data (i32.const 1168) "\01\00\00\00*") - (data (i32.const 1184) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h") - (data (i32.const 1232) "\01\00\00\00$") - (data (i32.const 1248) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P") - (data (i32.const 1288) "\01\00\00\00(") - (data (i32.const 1304) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e") - (data (i32.const 1344) "\01\00\00\00,") - (data (i32.const 1360) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h") - (data (i32.const 1408) "\01\00\00\00\12") - (data (i32.const 1424) "i\00t\00c\00m\00.\00m\00a\00r\00k") + (data (i32.const 888) "\01\00\00\00(") + (data (i32.const 904) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 944) "\01\00\00\00\1e") + (data (i32.const 960) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l") + (data (i32.const 992) "\01\00\00\00\16") + (data (i32.const 1008) "#\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)") + (data (i32.const 1032) "\01\00\00\00\18") + (data (i32.const 1048) "i\00t\00c\00m\00.\00c\00o\00l\00l\00e\00c\00t") + (data (i32.const 1072) "\01\00\00\00\1c") + (data (i32.const 1088) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E") + (data (i32.const 1120) "\01\00\00\00\"") + (data (i32.const 1136) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K") + (data (i32.const 1176) "\01\00\00\00\1c") + (data (i32.const 1192) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K") + (data (i32.const 1224) "\01\00\00\00*") + (data (i32.const 1240) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h") + (data (i32.const 1288) "\01\00\00\00$") + (data (i32.const 1304) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P") + (data (i32.const 1344) "\01\00\00\00(") + (data (i32.const 1360) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e") + (data (i32.const 1400) "\01\00\00\00,") + (data (i32.const 1416) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h") + (data (i32.const 1464) "\01\00\00\00\12") + (data (i32.const 1480) "i\00t\00c\00m\00.\00m\00a\00r\00k") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -336,12 +338,12 @@ (func $~lib/runtime/runtime.register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 1444 + i32.const 1500 i32.le_u if i32.const 0 i32.const 128 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -356,7 +358,7 @@ if i32.const 0 i32.const 128 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -751,854 +753,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/util/memory/memcpy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $continue|0 - local.get $1 - i32.const 3 - i32.and - local.get $2 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - local.get $0 - i32.const 3 - i32.and - local.tee $3 - i32.const 1 - i32.ne - if - local.get $3 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $3 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 13 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 15 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1606,29 +761,6 @@ local.get $1 i32.eq br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - local.set $3 - end - local.get $3 - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -1792,7 +924,7 @@ end end ) - (func $~lib/runtime/runtime.reallocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/reallocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1816,7 +948,7 @@ i32.shl i32.const 0 local.get $0 - i32.const 1444 + i32.const 1500 i32.gt_u select i32.const 32 @@ -1854,13 +986,13 @@ i32.eq if local.get $0 - i32.const 1444 + i32.const 1500 i32.le_u if i32.const 0 - i32.const 128 - i32.const 77 - i32.const 10 + i32.const 904 + i32.const 74 + i32.const 8 call $~lib/env/abort unreachable end @@ -1887,7 +1019,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/ensureCapacity (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) i32.const 1 @@ -1900,7 +1032,7 @@ local.get $0 i32.load local.tee $2 - call $~lib/runtime/runtime.reallocate + call $~lib/util/runtime/reallocate local.set $1 local.get $1 local.get $2 @@ -1927,7 +1059,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__unchecked_set (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__unchecked_set (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=4 @@ -1947,7 +1079,7 @@ end end ) - (func $~lib/array/Array#__set (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__set (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -1966,7 +1098,7 @@ i32.store offset=12 end ) - (func $gc/itcm/trace/makeGarbage (; 21 ;) (type $FUNCSIG$v) + (func $gc/itcm/trace/makeGarbage (; 20 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 72 @@ -2009,7 +1141,7 @@ local.get $0 local.get $1 call $~lib/array/Array#__set - i32.const 904 + i32.const 960 i32.const 0 f64.const 0 f64.const 0 @@ -2020,7 +1152,7 @@ local.get $0 i32.const 0 call $~lib/array/Array#__set - i32.const 952 + i32.const 1008 i32.const 0 f64.const 0 f64.const 0 @@ -2031,7 +1163,7 @@ call $gc/itcm/trace/Ref#constructor drop ) - (func $~lib/collector/itcm/step (; 22 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/step (; 21 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) block $break|0 @@ -2048,7 +1180,7 @@ end unreachable end - i32.const 1032 + i32.const 1088 i32.const 0 f64.const 0 f64.const 0 @@ -2058,7 +1190,7 @@ call $~lib/env/trace i32.const 2 global.set $~lib/collector/itcm/state - i32.const 1080 + i32.const 1136 i32.const 0 f64.const 0 f64.const 0 @@ -2076,7 +1208,7 @@ global.get $~lib/collector/itcm/toSpace i32.ne if - i32.const 1136 + i32.const 1192 i32.const 1 local.get $0 i32.const 16 @@ -2102,9 +1234,9 @@ local.get $0 i32.load local.get $1 - call $~lib/gc/__gc_mark_members + call $~lib/runtime/__gc_mark_members else - i32.const 1184 + i32.const 1240 i32.const 0 f64.const 0 f64.const 0 @@ -2135,7 +1267,7 @@ global.set $~lib/collector/itcm/iter i32.const 3 global.set $~lib/collector/itcm/state - i32.const 1248 + i32.const 1304 i32.const 0 f64.const 0 f64.const 0 @@ -2152,7 +1284,7 @@ global.get $~lib/collector/itcm/toSpace i32.ne if - i32.const 1304 + i32.const 1360 i32.const 1 local.get $0 i32.const 16 @@ -2169,7 +1301,7 @@ i32.and global.set $~lib/collector/itcm/iter else - i32.const 1360 + i32.const 1416 i32.const 0 f64.const 0 f64.const 0 @@ -2192,8 +1324,8 @@ end end ) - (func $~lib/collector/itcm/__ref_collect (; 23 ;) (type $FUNCSIG$v) - i32.const 992 + (func $~lib/collector/itcm/__ref_collect (; 22 ;) (type $FUNCSIG$v) + i32.const 1048 i32.const 0 f64.const 0 f64.const 0 @@ -2219,11 +1351,11 @@ br_if $continue|1 end ) - (func $gc/itcm/trace/main (; 24 ;) (type $FUNCSIG$v) + (func $gc/itcm/trace/main (; 23 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if - i32.const 1448 + i32.const 1504 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -2233,8 +1365,8 @@ global.set $~lib/started end ) - (func $~lib/collector/itcm/__ref_mark (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 1424 + (func $~lib/collector/itcm/__ref_mark (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 1480 i32.const 1 local.get $0 f64.convert_i32_u @@ -2258,7 +1390,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/array/Array#__traverse (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#__traverse (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2284,7 +1416,7 @@ call $~lib/collector/itcm/__ref_mark i32.const 2 local.get $0 - call $~lib/gc/__gc_mark_members + call $~lib/runtime/__gc_mark_members end local.get $1 i32.const 4 @@ -2294,7 +1426,7 @@ end end ) - (func $~lib/gc/__gc_mark_members (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/runtime/__gc_mark_members (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $invalid block $~lib/array/Array block $~lib/arraybuffer/ArrayBufferView @@ -2316,7 +1448,7 @@ call $~lib/collector/itcm/__ref_mark i32.const 2 local.get $0 - call $~lib/gc/__gc_mark_members + call $~lib/runtime/__gc_mark_members end return end @@ -2330,7 +1462,7 @@ call $~lib/collector/itcm/__ref_mark i32.const 3 local.get $0 - call $~lib/gc/__gc_mark_members + call $~lib/runtime/__gc_mark_members end return end @@ -2340,7 +1472,7 @@ end unreachable ) - (func $null (; 28 ;) (type $FUNCSIG$v) + (func $null (; 27 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/gc/itcm/trace.ts b/tests/compiler/gc/itcm/trace.ts index d3c151202e..959695637c 100644 --- a/tests/compiler/gc/itcm/trace.ts +++ b/tests/compiler/gc/itcm/trace.ts @@ -4,7 +4,6 @@ import "collector/itcm"; import { HEADER_SIZE } from "util/runtime"; assert(HEADER_SIZE == 16); -assert(gc.implemented); class Ref { inner: Ref; @@ -24,7 +23,7 @@ function makeGarbage(): void { } makeGarbage(); -gc.collect(); +runtime.collect(); // should have sweeped four objects (incl. arr.buffer) diff --git a/tests/compiler/gc/itcm/trace.untouched.wat b/tests/compiler/gc/itcm/trace.untouched.wat index 2db214ef2f..9dd9bb5747 100644 --- a/tests/compiler/gc/itcm/trace.untouched.wat +++ b/tests/compiler/gc/itcm/trace.untouched.wat @@ -28,22 +28,22 @@ (data (i32.const 712) "\01\00\00\00:\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") (data (i32.const 792) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f\00") (data (i32.const 840) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 888) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l\00") - (data (i32.const 936) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00#\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)\00") - (data (i32.const 976) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00c\00o\00l\00l\00e\00c\00t\00") - (data (i32.const 1016) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E\00") - (data (i32.const 1064) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K\00") - (data (i32.const 1120) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00") - (data (i32.const 1168) "\01\00\00\00*\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h\00") - (data (i32.const 1232) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P\00") - (data (i32.const 1288) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e\00") - (data (i32.const 1344) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h\00") - (data (i32.const 1408) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00m\00a\00r\00k\00") + (data (i32.const 888) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 944) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l\00") + (data (i32.const 992) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00#\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)\00") + (data (i32.const 1032) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00c\00o\00l\00l\00e\00c\00t\00") + (data (i32.const 1072) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E\00") + (data (i32.const 1120) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K\00") + (data (i32.const 1176) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00") + (data (i32.const 1224) "\01\00\00\00*\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h\00") + (data (i32.const 1288) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P\00") + (data (i32.const 1344) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e\00") + (data (i32.const 1400) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h\00") + (data (i32.const 1464) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00m\00a\00r\00k\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/itcm/trace/GC_TRACE i32 (i32.const 1)) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/gc/gc.implemented i32 (i32.const 1)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) @@ -55,7 +55,7 @@ (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 1444)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 1500)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -390,7 +390,7 @@ if i32.const 0 i32.const 128 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -407,7 +407,7 @@ if i32.const 0 i32.const 128 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -956,1208 +956,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/util/memory/memcpy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2168,28 +967,6 @@ if br $~lib/util/memory/memmove|inlined.0 end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -2388,14 +1165,14 @@ end end ) - (func $~lib/allocator/arena/__mem_free (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/runtime.reallocate (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/reallocate (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2465,9 +1242,9 @@ i32.eqz if i32.const 0 - i32.const 128 - i32.const 77 - i32.const 10 + i32.const 904 + i32.const 74 + i32.const 8 call $~lib/env/abort unreachable end @@ -2499,7 +1276,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2521,7 +1298,7 @@ if i32.const 0 i32.const 856 - i32.const 15 + i32.const 14 i32.const 64 call $~lib/env/abort unreachable @@ -2535,7 +1312,7 @@ local.set $4 local.get $3 local.get $4 - call $~lib/runtime/runtime.reallocate + call $~lib/util/runtime/reallocate local.set $5 local.get $5 local.get $3 @@ -2568,7 +1345,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__unchecked_set (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2598,7 +1375,7 @@ end end ) - (func $~lib/array/Array#__set (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -2624,7 +1401,7 @@ i32.store offset=12 end ) - (func $gc/itcm/trace/makeGarbage (; 31 ;) (type $FUNCSIG$v) + (func $gc/itcm/trace/makeGarbage (; 30 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 72 @@ -2662,7 +1439,7 @@ i32.const 0 local.get $0 call $~lib/array/Array#__set - i32.const 904 + i32.const 960 i32.const 0 f64.const 0 f64.const 0 @@ -2674,7 +1451,7 @@ i32.const 0 i32.const 0 call $~lib/array/Array#__set - i32.const 952 + i32.const 1008 i32.const 0 f64.const 0 f64.const 0 @@ -2686,7 +1463,7 @@ call $gc/itcm/trace/Ref#constructor drop ) - (func $~lib/collector/itcm/step (; 32 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/step (; 31 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) block $break|0 @@ -2717,7 +1494,7 @@ unreachable end block - i32.const 1032 + i32.const 1088 i32.const 0 f64.const 0 f64.const 0 @@ -2725,10 +1502,10 @@ f64.const 0 f64.const 0 call $~lib/env/trace - call $~lib/gc/__gc_mark_roots + call $~lib/runtime/__gc_mark_roots i32.const 2 global.set $~lib/collector/itcm/state - i32.const 1080 + i32.const 1136 i32.const 0 f64.const 0 f64.const 0 @@ -2749,7 +1526,7 @@ global.get $~lib/collector/itcm/toSpace i32.ne if - i32.const 1136 + i32.const 1192 i32.const 1 block $~lib/collector/itcm/objToRef|inlined.10 (result i32) local.get $0 @@ -2779,10 +1556,10 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add end - call $~lib/gc/__gc_mark_members + call $~lib/runtime/__gc_mark_members else - call $~lib/gc/__gc_mark_roots - i32.const 1184 + call $~lib/runtime/__gc_mark_roots + i32.const 1240 i32.const 0 f64.const 0 f64.const 0 @@ -2811,7 +1588,7 @@ global.set $~lib/collector/itcm/iter i32.const 3 global.set $~lib/collector/itcm/state - i32.const 1248 + i32.const 1304 i32.const 0 f64.const 0 f64.const 0 @@ -2833,7 +1610,7 @@ global.get $~lib/collector/itcm/toSpace i32.ne if - i32.const 1304 + i32.const 1360 i32.const 1 block $~lib/collector/itcm/objToRef|inlined.12 (result i32) local.get $0 @@ -2859,7 +1636,7 @@ call $~lib/memory/memory.free end else - i32.const 1360 + i32.const 1416 i32.const 0 f64.const 0 f64.const 0 @@ -2886,8 +1663,8 @@ unreachable end ) - (func $~lib/collector/itcm/__ref_collect (; 33 ;) (type $FUNCSIG$v) - i32.const 992 + (func $~lib/collector/itcm/__ref_collect (; 32 ;) (type $FUNCSIG$v) + i32.const 1048 i32.const 0 f64.const 0 f64.const 0 @@ -2917,10 +1694,10 @@ end end ) - (func $~lib/gc/gc.collect (; 34 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.collect (; 33 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/__ref_collect ) - (func $start:gc/itcm/trace (; 35 ;) (type $FUNCSIG$v) + (func $start:gc/itcm/trace (; 34 ;) (type $FUNCSIG$v) global.get $~lib/util/runtime/HEADER_SIZE i32.const 16 i32.eq @@ -2933,16 +1710,6 @@ call $~lib/env/abort unreachable end - global.get $~lib/gc/gc.implemented - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 7 - i32.const 0 - call $~lib/env/abort - unreachable - end global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -2954,9 +1721,9 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset call $gc/itcm/trace/makeGarbage - call $~lib/gc/gc.collect + call $~lib/runtime/runtime.collect ) - (func $gc/itcm/trace/main (; 36 ;) (type $FUNCSIG$v) + (func $gc/itcm/trace/main (; 35 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -2965,13 +1732,13 @@ global.set $~lib/started end ) - (func $start (; 37 ;) (type $FUNCSIG$v) + (func $start (; 36 ;) (type $FUNCSIG$v) call $start:gc/itcm/trace ) - (func $~lib/collector/itcm/__ref_mark (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_mark (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) - i32.const 1424 + i32.const 1480 i32.const 1 local.get $0 f64.convert_i32_u @@ -2998,11 +1765,11 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/gc/__gc_mark_roots (; 39 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__gc_mark_roots (; 38 ;) (type $FUNCSIG$v) (local $0 i32) nop ) - (func $~lib/array/Array#__traverse (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#__traverse (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3033,7 +1800,7 @@ call $~lib/collector/itcm/__ref_mark i32.const 2 local.get $3 - call $~lib/gc/__gc_mark_members + call $~lib/runtime/__gc_mark_members end local.get $1 i32.const 4 @@ -3045,7 +1812,7 @@ end end ) - (func $~lib/gc/__gc_mark_members (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/runtime/__gc_mark_members (; 40 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $invalid block $~lib/array/Array @@ -3066,7 +1833,7 @@ call $~lib/collector/itcm/__ref_mark i32.const 2 local.get $2 - call $~lib/gc/__gc_mark_members + call $~lib/runtime/__gc_mark_members end return end @@ -3080,7 +1847,7 @@ call $~lib/collector/itcm/__ref_mark i32.const 3 local.get $2 - call $~lib/gc/__gc_mark_members + call $~lib/runtime/__gc_mark_members end return end @@ -3090,6 +1857,6 @@ end unreachable ) - (func $null (; 42 ;) (type $FUNCSIG$v) + (func $null (; 41 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/gc/rc/global-assign.optimized.wat b/tests/compiler/gc/rc/global-assign.optimized.wat index 08203d35df..5540b9bbf6 100644 --- a/tests/compiler/gc/rc/global-assign.optimized.wat +++ b/tests/compiler/gc/rc/global-assign.optimized.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 24 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 24 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-assign.untouched.wat b/tests/compiler/gc/rc/global-assign.untouched.wat index 68508f9d9c..77583c5ef8 100644 --- a/tests/compiler/gc/rc/global-assign.untouched.wat +++ b/tests/compiler/gc/rc/global-assign.untouched.wat @@ -180,7 +180,7 @@ if i32.const 0 i32.const 24 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -197,7 +197,7 @@ if i32.const 0 i32.const 24 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-init.optimized.wat b/tests/compiler/gc/rc/global-init.optimized.wat index e22837006d..e1d5cc9b67 100644 --- a/tests/compiler/gc/rc/global-init.optimized.wat +++ b/tests/compiler/gc/rc/global-init.optimized.wat @@ -139,7 +139,7 @@ if i32.const 0 i32.const 24 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -154,7 +154,7 @@ if i32.const 0 i32.const 24 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-init.untouched.wat b/tests/compiler/gc/rc/global-init.untouched.wat index d960f976bf..f81bb65e46 100644 --- a/tests/compiler/gc/rc/global-init.untouched.wat +++ b/tests/compiler/gc/rc/global-init.untouched.wat @@ -178,7 +178,7 @@ if i32.const 0 i32.const 24 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -195,7 +195,7 @@ if i32.const 0 i32.const 24 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index da6cab353f..addde4ded0 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -85,7 +85,7 @@ if i32.const 0 i32.const 16 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index cccd911f77..016b0dda36 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -141,7 +141,7 @@ if i32.const 0 i32.const 16 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index ca0bc71679..428f93cf95 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 48 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -146,7 +146,7 @@ if i32.const 0 i32.const 48 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 22a9c23649..cd470d1c37 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -405,7 +405,7 @@ if i32.const 0 i32.const 48 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -422,7 +422,7 @@ if i32.const 0 i32.const 48 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index fc6baa0747..6b8a9e9223 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -303,7 +303,7 @@ if i32.const 0 i32.const 464 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -318,7 +318,7 @@ if i32.const 0 i32.const 464 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -872,854 +872,7 @@ i32.store16 local.get $2 ) - (func $~lib/util/memory/memcpy (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $continue|0 - local.get $1 - i32.const 3 - i32.and - local.get $2 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - local.get $0 - i32.const 3 - i32.and - local.tee $3 - i32.const 1 - i32.ne - if - local.get $3 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $3 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 13 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 15 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1727,29 +880,6 @@ local.get $1 i32.eq br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - local.set $3 - end - local.get $3 - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -1913,7 +1043,7 @@ end end ) - (func $~lib/util/number/prettify (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -2172,7 +1302,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa_core (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -2349,7 +1479,7 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2444,14 +1574,14 @@ local.get $1 call $~lib/runtime/runtime.register ) - (func $~lib/runtime/runtime.discard (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 1804 i32.le_u if i32.const 0 i32.const 464 - i32.const 103 + i32.const 68 i32.const 6 call $~lib/env/abort unreachable @@ -2465,13 +1595,13 @@ if i32.const 0 i32.const 464 - i32.const 105 + i32.const 70 i32.const 6 call $~lib/env/abort unreachable end ) - (func $start:number (; 16 ;) (type $FUNCSIG$v) + (func $start:number (; 15 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 1808 @@ -2650,10 +1780,10 @@ unreachable end ) - (func $start (; 17 ;) (type $FUNCSIG$v) + (func $start (; 16 ;) (type $FUNCSIG$v) call $start:number ) - (func $null (; 18 ;) (type $FUNCSIG$v) + (func $null (; 17 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 258c73fa96..06b0c9fadf 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -399,7 +399,7 @@ if i32.const 0 i32.const 464 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -416,7 +416,7 @@ if i32.const 0 i32.const 464 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -1197,1208 +1197,7 @@ end local.get $15 ) - (func $~lib/util/memory/memcpy (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2409,28 +1208,6 @@ if br $~lib/util/memory/memmove|inlined.0 end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -2629,7 +1406,7 @@ end end ) - (func $~lib/util/number/prettify (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2962,7 +1739,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 22 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 21 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -3400,7 +2177,7 @@ local.get $2 i32.add ) - (func $~lib/string/String#substring (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3518,14 +2295,14 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/allocator/arena/__mem_free (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/runtime.discard (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3534,7 +2311,7 @@ if i32.const 0 i32.const 464 - i32.const 103 + i32.const 68 i32.const 6 call $~lib/env/abort unreachable @@ -3551,7 +2328,7 @@ if i32.const 0 i32.const 464 - i32.const 105 + i32.const 70 i32.const 6 call $~lib/env/abort unreachable @@ -3559,7 +2336,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/util/number/dtoa (; 27 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 26 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3606,11 +2383,11 @@ call $~lib/runtime/runtime.discard local.get $3 ) - (func $~lib/number/F64#toString (; 28 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/number/F64#toString (; 27 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 call $~lib/util/number/dtoa ) - (func $~lib/number/Bool#toString (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/number/Bool#toString (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -3620,12 +2397,12 @@ i32.const 1792 end ) - (func $~lib/builtins/isNaN (; 30 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 29 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $~lib/number/F32.isSafeInteger (; 31 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/number/F32.isSafeInteger (; 30 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) (local $1 i32) local.get $0 f32.abs @@ -3641,14 +2418,14 @@ local.get $1 end ) - (func $~lib/builtins/isFinite (; 32 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isFinite (; 31 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.sub f32.const 0 f32.eq ) - (func $~lib/number/F32.isInteger (; 33 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/number/F32.isInteger (; 32 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) (local $1 i32) local.get $0 call $~lib/builtins/isFinite @@ -3662,7 +2439,7 @@ local.get $1 end ) - (func $~lib/number/F64.isSafeInteger (; 34 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/number/F64.isSafeInteger (; 33 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) local.get $0 f64.abs @@ -3678,7 +2455,7 @@ local.get $1 end ) - (func $~lib/number/F64.isInteger (; 35 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/number/F64.isInteger (; 34 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) local.get $0 call $~lib/builtins/isFinite @@ -3692,7 +2469,7 @@ local.get $1 end ) - (func $start:number (; 36 ;) (type $FUNCSIG$v) + (func $start:number (; 35 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/memory/HEAP_BASE i32.const 7 @@ -4428,9 +3205,9 @@ unreachable end ) - (func $start (; 37 ;) (type $FUNCSIG$v) + (func $start (; 36 ;) (type $FUNCSIG$v) call $start:number ) - (func $null (; 38 ;) (type $FUNCSIG$v) + (func $null (; 37 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 428e2993a0..a7d5741864 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -115,7 +115,7 @@ if i32.const 0 i32.const 16 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index f795649458..3fcf3614f2 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -148,7 +148,7 @@ if i32.const 0 i32.const 16 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -165,7 +165,7 @@ if i32.const 0 i32.const 16 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/runtime-default.optimized.wat b/tests/compiler/runtime-default.optimized.wat index 13be3a5fae..845cbc1e74 100644 --- a/tests/compiler/runtime-default.optimized.wat +++ b/tests/compiler/runtime-default.optimized.wat @@ -1,13 +1,1923 @@ (module + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (memory $0 0) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\01\00\00\00,") + (data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 72) "\01\00\00\00\1e") + (data (i32.const 88) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) + (export "runtime.discard" (func $~lib/runtime/runtime.discard)) + (export "runtime.register" (func $~lib/runtime/runtime.register)) + (export "runtime.newString" (func $~lib/runtime/runtime.newString)) + (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export ".setargc" (func $~lib/setargc)) + (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "runtime.retain" (func $~lib/runtime/runtime.retain)) + (export "runtime.release" (func $~lib/runtime/runtime.release)) + (export "runtime.collect" (func $~lib/runtime/runtime.collect)) (export ".capabilities" (global $~lib/capabilities)) - (func $null (; 0 ;) (type $FUNCSIG$v) + (start $start) + (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.get $1 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 159 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/allocator/tlsf/Root#setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 184 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 32 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/allocator/tlsf/Block#get:right (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + i32.const -4 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 104 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 8 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 105 + i32.const 11 + call $~lib/env/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/fls (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 447 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $~lib/allocator/tlsf/Root#getHead (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 175 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 32 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 176 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load offset=96 + ) + (func $~lib/allocator/tlsf/Root#getSLMap (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load offset=4 + ) + (func $~lib/allocator/tlsf/Root#remove (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.tee $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 277 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $3 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 279 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + i32.const 256 + i32.lt_u + if (result i32) + local.get $3 + i32.const 8 + i32.div_u + local.set $4 + i32.const 0 + else + local.get $3 + local.get $3 + call $~lib/allocator/tlsf/fls + local.tee $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $4 + local.get $2 + i32.const 7 + i32.sub + end + local.set $2 + local.get $1 + i32.load offset=8 + local.set $3 + local.get $1 + i32.load offset=4 + local.tee $5 + if + local.get $5 + local.get $3 + i32.store offset=8 + end + local.get $3 + if + local.get $3 + local.get $5 + i32.store offset=4 + end + local.get $0 + local.get $2 + local.get $4 + call $~lib/allocator/tlsf/Root#getHead + local.get $1 + i32.eq + if + local.get $0 + local.get $2 + local.get $4 + local.get $3 + call $~lib/allocator/tlsf/Root#setHead + local.get $3 + i32.eqz + if + local.get $0 + local.get $2 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $4 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $1 + call $~lib/allocator/tlsf/Root#setSLMap + local.get $1 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $2 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/allocator/tlsf/Block#get:left (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 96 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 97 + i32.const 11 + call $~lib/env/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/Root#setJump (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + i32.load + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 353 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/Block#get:right + local.get $1 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 354 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 355 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 4 + i32.sub + local.get $0 + i32.store + ) + (func $~lib/allocator/tlsf/Root#insert (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 208 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.tee $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 210 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + i32.const -4 + i32.and + local.tee $4 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $4 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 212 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 216 + i32.const 23 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.load + local.tee $4 + i32.const 1 + i32.and + if + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $4 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $3 + i32.add + local.tee $3 + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $2 + i32.load + local.set $4 + end + local.get $3 + i32.const 2 + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 230 + i32.const 24 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.tee $5 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 232 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $3 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $5 + i32.add + local.tee $3 + i32.store + end + local.get $2 + local.get $4 + i32.const 2 + i32.or + i32.store + local.get $1 + local.get $2 + call $~lib/allocator/tlsf/Root#setJump + local.get $3 + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $3 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 245 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $3 + i32.const 256 + i32.lt_u + if (result i32) + local.get $3 + i32.const 8 + i32.div_u + local.set $3 + i32.const 0 + else + local.get $3 + local.get $3 + call $~lib/allocator/tlsf/fls + local.tee $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $3 + local.get $2 + i32.const 7 + i32.sub + end + local.tee $2 + local.get $3 + call $~lib/allocator/tlsf/Root#getHead + local.set $4 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $4 + i32.store offset=8 + local.get $4 + if + local.get $4 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $2 + local.get $3 + local.get $1 + call $~lib/allocator/tlsf/Root#setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $2 + i32.shl + i32.or + i32.store + local.get $0 + local.get $2 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $3 + i32.shl + i32.or + call $~lib/allocator/tlsf/Root#setSLMap + ) + (func $~lib/allocator/tlsf/Root#addMemory (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + local.get $2 + i32.gt_u + if + i32.const 0 + i32.const 24 + i32.const 396 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 397 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 398 + i32.const 4 + call $~lib/env/abort + unreachable + end + i32.const 2912 + i32.load + local.tee $3 + if + local.get $1 + local.get $3 + i32.const 4 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 403 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 8 + i32.sub + local.get $3 + i32.eq + if + local.get $3 + i32.load + local.set $4 + local.get $1 + i32.const 8 + i32.sub + local.set $1 + end + else + local.get $1 + local.get $0 + i32.const 2916 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 412 + i32.const 6 + call $~lib/env/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.tee $2 + i32.const 32 + i32.lt_u + if + return + end + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $2 + i32.const 16 + i32.sub + i32.const 1 + i32.or + i32.or + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.tee $2 + i32.const 2 + i32.store + i32.const 2912 + local.get $2 + i32.store + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#insert + ) + (func $~lib/allocator/tlsf/ffs (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/Root#search (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $1 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 315 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 256 + i32.lt_u + if (result i32) + i32.const 0 + local.set $2 + local.get $1 + i32.const 8 + i32.div_u + else + local.get $1 + call $~lib/allocator/tlsf/fls + local.tee $3 + i32.const 7 + i32.sub + local.set $2 + local.get $1 + local.get $3 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.tee $1 + i32.const 31 + i32.lt_u + if (result i32) + local.get $1 + i32.const 1 + i32.add + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + i32.const 0 + end + end + local.set $1 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const -1 + local.get $1 + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + else + local.get $0 + i32.load + i32.const -1 + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/ffs + local.tee $2 + call $~lib/allocator/tlsf/Root#getSLMap + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 342 + i32.const 16 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + else + i32.const 0 + end + end + ) + (func $~lib/allocator/tlsf/Root#use (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $1 + i32.load + local.tee $4 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 367 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 16 + i32.ge_u + local.tee $3 + if + local.get $2 + i32.const 1073741824 + i32.lt_u + local.set $3 + end + local.get $3 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 368 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 369 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $4 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $3 + i32.const 24 + i32.ge_u + if + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $2 + i32.or + i32.store + local.get $1 + i32.const 8 + i32.add + local.get $2 + i32.add + local.tee $2 + local.get $3 + i32.const 8 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#insert + else + local.get $1 + local.get $4 + i32.const -2 + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 387 + i32.const 25 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $0 + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 + i32.const 8 + i32.add + ) + (func $~lib/allocator/tlsf/__mem_allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/allocator/tlsf/ROOT + local.tee $2 + i32.eqz + if + i32.const 1 + current_memory + local.tee $1 + i32.gt_s + local.tee $2 + if (result i32) + i32.const 1 + local.get $1 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + local.get $2 + end + if + unreachable + end + i32.const 120 + local.set $2 + i32.const 120 + global.set $~lib/allocator/tlsf/ROOT + i32.const 2912 + i32.const 0 + i32.store + i32.const 120 + i32.const 0 + i32.store + i32.const 0 + local.set $1 + loop $repeat|0 + local.get $1 + i32.const 22 + i32.lt_u + if + i32.const 120 + local.get $1 + i32.const 0 + call $~lib/allocator/tlsf/Root#setSLMap + i32.const 0 + local.set $3 + loop $repeat|1 + local.get $3 + i32.const 32 + i32.lt_u + if + i32.const 120 + local.get $1 + local.get $3 + i32.const 0 + call $~lib/allocator/tlsf/Root#setHead + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $repeat|1 + end + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end + end + i32.const 120 + i32.const 3040 + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + end + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + local.get $2 + local.get $0 + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + i32.const 16 + local.get $0 + i32.const 16 + i32.gt_u + select + local.tee $1 + call $~lib/allocator/tlsf/Root#search + local.tee $0 + i32.eqz + if + current_memory + local.tee $0 + local.get $1 + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $0 + local.get $3 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $2 + local.get $0 + i32.const 16 + i32.shl + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/Root#search + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 502 + i32.const 12 + call $~lib/env/abort + unreachable + end + end + local.get $0 + i32.load + i32.const -4 + i32.and + local.get $1 + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 505 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/runtime/runtime.allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/tlsf/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 + i32.add + ) + (func $~lib/allocator/tlsf/__mem_free (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.tee $1 + if + local.get $0 + i32.const 8 + i32.sub + local.tee $2 + i32.load + local.tee $3 + i32.const 1 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + i32.const 1 + i32.or + i32.store + local.get $1 + local.get $0 + i32.const 8 + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/runtime/runtime.discard (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 120 + i32.le_u + if + i32.const 0 + i32.const 88 + i32.const 68 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 88 + i32.const 70 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/collector/itcm/maybeInit (; 20 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/collector/itcm/state + i32.eqz + if + i32.const 16 + call $~lib/allocator/tlsf/__mem_allocate + global.set $~lib/collector/itcm/fromSpace + global.get $~lib/collector/itcm/fromSpace + local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + i32.const 16 + call $~lib/allocator/tlsf/__mem_allocate + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/toSpace + local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter + i32.const 1 + global.set $~lib/collector/itcm/state + end + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $0 + i32.or + i32.store offset=8 + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.and + local.get $1 + i32.or + i32.store offset=8 + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/collector/itcm/__ref_register (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + call $~lib/collector/itcm/maybeInit + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + global.get $~lib/collector/itcm/white + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.or + i32.store offset=8 + global.get $~lib/collector/itcm/fromSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + ) + (func $~lib/runtime/runtime.register (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 120 + i32.le_u + if + i32.const 0 + i32.const 88 + i32.const 82 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 88 + i32.const 84 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + block + local.get $0 + call $~lib/collector/itcm/__ref_register + end + local.get $0 + ) + (func $~lib/runtime/runtime.newString (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + i32.const 1 + call $~lib/runtime/runtime.register + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/collector/itcm/iter + local.get $0 + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + local.tee $2 + local.get $0 + i32.load offset=12 + local.tee $1 + i32.store offset=12 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $2 + i32.or + i32.store offset=8 + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/__ref_link (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + global.get $~lib/collector/itcm/white + i32.eqz + local.get $1 + i32.const 16 + i32.sub + local.tee $2 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + local.tee $1 + if (result i32) + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + else + local.get $1 + end + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/memory/memory.copy (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + br $continue|0 + end + end + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 + end + end + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end + end + end + loop $continue|5 + local.get $2 + if + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + ) + (func $~lib/runtime/runtime.newArray (; 29 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 16 + call $~lib/runtime/runtime.allocate + local.get $2 + call $~lib/runtime/runtime.register + local.tee $2 + local.set $6 + local.get $0 + local.get $1 + i32.shl + local.tee $4 + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + local.tee $5 + local.tee $1 + local.get $2 + i32.load + i32.ne + if + local.get $1 + local.get $6 + call $~lib/collector/itcm/__ref_link + end + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $5 + i32.store offset=4 + local.get $2 + local.get $4 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=12 + local.get $3 + if + local.get $5 + local.get $3 + local.get $4 + call $~lib/memory/memory.copy + end + local.get $2 + ) + (func $~lib/runtime/runtime.retain (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/itcm/__ref_link + ) + (func $~lib/runtime/runtime.release (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) + (func $~lib/collector/itcm/step (; 32 ;) (type $FUNCSIG$v) + (local $0 i32) + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + global.get $~lib/collector/itcm/state + local.tee $0 + if + local.get $0 + i32.const 1 + i32.sub + br_table $case1|0 $case2|0 $case3|0 $break|0 + end + unreachable + end + call $~lib/runtime/__gc_mark_roots + i32.const 2 + global.set $~lib/collector/itcm/state + br $break|0 + end + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.or + i32.store offset=8 + block $__inlined_func$~lib/runtime/__gc_mark_members + block $invalid + local.get $0 + i32.load + i32.const 1 + i32.sub + br_table $__inlined_func$~lib/runtime/__gc_mark_members $__inlined_func$~lib/runtime/__gc_mark_members $__inlined_func$~lib/runtime/__gc_mark_members $invalid + end + unreachable + end + else + call $~lib/runtime/__gc_mark_roots + global.get $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $0 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $0 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + end + end + br $break|0 + end + global.get $~lib/collector/itcm/iter + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + local.get $0 + i32.const 120 + i32.ge_u + if + local.get $0 + call $~lib/allocator/tlsf/__mem_free + end + else + global.get $~lib/collector/itcm/toSpace + local.tee $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + i32.const 1 + global.set $~lib/collector/itcm/state + end + end + ) + (func $~lib/collector/itcm/__ref_collect (; 33 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/maybeInit + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|0 + end + end + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 + end + ) + (func $~lib/runtime/runtime.collect (; 34 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/__ref_collect + ) + (func $start (; 35 ;) (type $FUNCSIG$v) + i32.const 0 + call $~lib/runtime/runtime.allocate + i32.const 3 + call $~lib/runtime/runtime.register + global.set $~lib/runtime/ROOT + ) + (func $~lib/runtime/__gc_mark_roots (; 36 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/runtime/ROOT + local.tee $0 + if + call $~lib/collector/itcm/maybeInit + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#makeGray + end + end + ) + (func $~lib/runtime/__runtime_instanceof (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block $nope + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/string/String + local.get $0 + i32.const 1 + i32.sub + br_table $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope + end + local.get $1 + i32.const 1 + i32.eq + return + end + local.get $1 + i32.const 2 + i32.eq + return + end + local.get $1 + i32.const 3 + i32.eq + return + end + i32.const 0 + ) + (func $null (; 38 ;) (type $FUNCSIG$v) + nop + ) + (func $~lib/runtime/runtime.newArray|trampoline (; 39 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 3 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/runtime/runtime.newArray + ) + (func $~lib/setargc (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.set $~lib/argc + ) ) diff --git a/tests/compiler/runtime-default.untouched.wat b/tests/compiler/runtime-default.untouched.wat index 413ff0e872..ae057c9ded 100644 --- a/tests/compiler/runtime-default.untouched.wat +++ b/tests/compiler/runtime-default.untouched.wat @@ -1,13 +1,2339 @@ (module + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (memory $0 0) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 72) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) + (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) + (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) + (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) + (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) + (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) + (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) + (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) + (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) + (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) + (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) + (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) + (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) + (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) + (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 120)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) + (export "runtime.discard" (func $~lib/runtime/runtime.discard)) + (export "runtime.register" (func $~lib/runtime/runtime.register)) + (export "runtime.newString" (func $~lib/runtime/runtime.newString)) + (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export ".setargc" (func $~lib/setargc)) + (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "runtime.retain" (func $~lib/runtime/runtime.retain)) + (export "runtime.release" (func $~lib/runtime/runtime.release)) + (export "runtime.collect" (func $~lib/runtime/runtime.collect)) (export ".capabilities" (global $~lib/capabilities)) - (func $null (; 0 ;) (type $FUNCSIG$v) + (start $start) + (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.get $1 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + ) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 0 + local.get $1 + i32.store offset=2912 + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 159 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 4 + i32.mul + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/allocator/tlsf/Root#setHead (; 5 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 184 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + i32.load offset=2912 + ) + (func $~lib/allocator/tlsf/Block#get:right (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 104 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 105 + i32.const 11 + call $~lib/env/abort + unreachable + else + local.get $1 + end + ) + (func $~lib/allocator/tlsf/fls (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 447 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $~lib/allocator/tlsf/Root#getHead (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 175 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 176 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + i32.load offset=96 + ) + (func $~lib/allocator/tlsf/Root#getSLMap (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 4 + i32.mul + i32.add + i32.load offset=4 + ) + (func $~lib/allocator/tlsf/Root#remove (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + i32.load + local.set $2 + local.get $2 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 277 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 279 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $5 + local.get $3 + i32.const 8 + i32.div_u + local.set $6 + else + local.get $3 + call $~lib/allocator/tlsf/fls + local.set $5 + local.get $3 + local.get $5 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $6 + local.get $5 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $5 + end + local.get $1 + i32.load offset=4 + local.set $7 + local.get $1 + i32.load offset=8 + local.set $8 + local.get $7 + if + local.get $7 + local.get $8 + i32.store offset=8 + end + local.get $8 + if + local.get $8 + local.get $7 + i32.store offset=4 + end + local.get $1 + local.get $0 + local.get $5 + local.get $6 + call $~lib/allocator/tlsf/Root#getHead + i32.eq + if + local.get $0 + local.get $5 + local.get $6 + local.get $8 + call $~lib/allocator/tlsf/Root#setHead + local.get $8 + i32.eqz + if + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#getSLMap + local.set $4 + local.get $0 + local.get $5 + local.get $4 + i32.const 1 + local.get $6 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $4 + call $~lib/allocator/tlsf/Root#setSLMap + local.get $4 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $5 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/allocator/tlsf/Block#get:left (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 96 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 97 + i32.const 11 + call $~lib/env/abort + unreachable + else + local.get $1 + end + ) + (func $~lib/allocator/tlsf/Root#setJump (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.load + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 353 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.get $2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 354 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 355 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 4 + i32.sub + local.get $1 + i32.store + ) + (func $~lib/allocator/tlsf/Root#insert (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 208 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.set $2 + local.get $2 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 210 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.tee $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 212 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 216 + i32.const 23 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $5 + local.get $5 + i32.load + local.set $6 + local.get $6 + global.get $~lib/allocator/tlsf/FREE + i32.and + if + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $2 + global.get $~lib/allocator/tlsf/Block.INFO + local.get $6 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $2 + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.set $5 + local.get $5 + i32.load + local.set $6 + end + local.get $2 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 230 + i32.const 24 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $4 + local.get $4 + i32.load + local.set $7 + local.get $7 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 232 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#remove + local.get $4 + local.get $7 + global.get $~lib/allocator/tlsf/Block.INFO + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $7 + i32.store + local.get $4 + local.set $1 + local.get $7 + local.set $2 + end + local.get $5 + local.get $6 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.or + i32.store + local.get $0 + local.get $1 + local.get $5 + call $~lib/allocator/tlsf/Root#setJump + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $7 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $7 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 245 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $8 + local.get $3 + i32.const 8 + i32.div_u + local.set $9 + else + local.get $3 + call $~lib/allocator/tlsf/fls + local.set $8 + local.get $3 + local.get $8 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $9 + local.get $8 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $8 + end + local.get $0 + local.get $8 + local.get $9 + call $~lib/allocator/tlsf/Root#getHead + local.set $10 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $10 + i32.store offset=8 + local.get $10 + if + local.get $10 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $8 + local.get $9 + local.get $1 + call $~lib/allocator/tlsf/Root#setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $8 + i32.shl + i32.or + i32.store + local.get $0 + local.get $8 + local.get $0 + local.get $8 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $9 + i32.shl + i32.or + call $~lib/allocator/tlsf/Root#setSLMap + ) + (func $~lib/allocator/tlsf/Root#addMemory (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + local.get $2 + i32.le_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 396 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 397 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 398 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/Root#get:tailRef + local.set $3 + i32.const 0 + local.set $4 + local.get $3 + if + local.get $1 + local.get $3 + i32.const 4 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 403 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.get $3 + i32.eq + if + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $1 + local.get $3 + i32.load + local.set $4 + end + else + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 412 + i32.const 6 + call $~lib/env/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.set $5 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.add + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + i32.lt_u + if + i32.const 0 + return + end + local.get $5 + i32.const 2 + global.get $~lib/allocator/tlsf/Block.INFO + i32.mul + i32.sub + local.set $6 + local.get $1 + local.set $7 + local.get $7 + local.get $6 + global.get $~lib/allocator/tlsf/FREE + i32.or + local.get $4 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.or + i32.store + local.get $7 + i32.const 0 + i32.store offset=4 + local.get $7 + i32.const 0 + i32.store offset=8 + local.get $1 + local.get $5 + i32.add + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $8 + local.get $8 + i32.const 0 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.or + i32.store + local.get $0 + local.get $8 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $0 + local.get $7 + call $~lib/allocator/tlsf/Root#insert + i32.const 1 + ) + (func $~lib/allocator/tlsf/ffs (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/ffs (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/Root#search (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $1 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $2 + if (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $2 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 315 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $3 + local.get $1 + i32.const 8 + i32.div_u + local.set $4 + else + local.get $1 + call $~lib/allocator/tlsf/fls + local.set $3 + local.get $1 + local.get $3 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $4 + local.get $3 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $3 + local.get $4 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 1 + i32.sub + i32.lt_u + if + local.get $4 + i32.const 1 + i32.add + local.set $4 + else + local.get $3 + i32.const 1 + i32.add + local.set $3 + i32.const 0 + local.set $4 + end + end + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 0 + i32.const -1 + i32.xor + local.get $4 + i32.shl + i32.and + local.set $5 + local.get $5 + i32.eqz + if + local.get $0 + i32.load + i32.const 0 + i32.const -1 + i32.xor + local.get $3 + i32.const 1 + i32.add + i32.shl + i32.and + local.set $2 + local.get $2 + i32.eqz + if + i32.const 0 + local.set $6 + else + local.get $2 + call $~lib/allocator/tlsf/ffs + local.set $3 + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#getSLMap + local.tee $7 + if (result i32) + local.get $7 + else + i32.const 0 + i32.const 24 + i32.const 342 + i32.const 16 + call $~lib/env/abort + unreachable + end + local.set $5 + local.get $0 + local.get $3 + local.get $5 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $6 + end + else + local.get $0 + local.get $3 + local.get $5 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $6 + end + local.get $6 + ) + (func $~lib/allocator/tlsf/Root#use (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 367 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $2 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 368 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 369 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $3 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.sub + local.set $5 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.add + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.or + i32.store + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + local.get $2 + i32.add + local.set $4 + local.get $4 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#insert + else + local.get $1 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.const -1 + i32.xor + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 387 + i32.const 25 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $4 + local.get $4 + local.get $4 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const -1 + i32.xor + i32.and + i32.store + end + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + ) + (func $~lib/allocator/tlsf/__mem_allocate (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + i32.eqz + if + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $2 + current_memory + local.set $3 + local.get $2 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $4 + local.get $4 + local.get $3 + i32.gt_s + local.tee $5 + if (result i32) + local.get $4 + local.get $3 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + local.get $5 + end + if + unreachable + end + local.get $2 + local.tee $1 + global.set $~lib/allocator/tlsf/ROOT + local.get $1 + i32.const 0 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $1 + i32.const 0 + i32.store + block $break|0 + i32.const 0 + local.set $5 + loop $repeat|0 + local.get $5 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + br_if $break|0 + block + local.get $1 + local.get $5 + i32.const 0 + call $~lib/allocator/tlsf/Root#setSLMap + block $break|1 + i32.const 0 + local.set $6 + loop $repeat|1 + local.get $6 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + br_if $break|1 + local.get $1 + local.get $5 + local.get $6 + i32.const 0 + call $~lib/allocator/tlsf/Root#setHead + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $repeat|1 + unreachable + end + unreachable + end + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $repeat|0 + unreachable + end + unreachable + end + local.get $1 + local.get $2 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + end + local.get $0 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.gt_u + if + unreachable + end + local.get $0 + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.tee $4 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + local.tee $3 + local.get $4 + local.get $3 + i32.gt_u + select + local.set $0 + local.get $1 + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.set $7 + local.get $7 + i32.eqz + if + current_memory + local.set $4 + local.get $0 + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $3 + local.get $4 + local.tee $2 + local.get $3 + local.tee $5 + local.get $2 + local.get $5 + i32.gt_s + select + local.set $2 + local.get $2 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + current_memory + local.set $5 + local.get $1 + local.get $4 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + local.get $1 + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.tee $6 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 502 + i32.const 12 + call $~lib/env/abort + unreachable + else + local.get $6 + end + local.set $7 + end + local.get $7 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.get $0 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 505 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $1 + local.get $7 + local.get $0 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/memory/memory.allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_allocate + return + ) + (func $~lib/runtime/runtime.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/allocator/tlsf/__mem_free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + if + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $2 + local.get $2 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/memory/memory.free (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/runtime/runtime.discard (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 88 + i32.const 68 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $1 + local.get $1 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 88 + i32.const 70 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/memory/memory.free + ) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + ) + (func $~lib/collector/itcm/maybeInit (; 27 ;) (type $FUNCSIG$v) + global.get $~lib/collector/itcm/state + i32.const 0 + i32.eq + if + global.get $~lib/util/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/fromSpace + global.get $~lib/collector/itcm/fromSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/fromSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/fromSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/util/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/toSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/toSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter + i32.const 1 + global.set $~lib/collector/itcm/state + end + ) + (func $~lib/collector/itcm/ManagedObject#set:color (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $1 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/ManagedObject#set:next (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $0 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/collector/itcm/__ref_register (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + global.get $~lib/collector/itcm/white + call $~lib/collector/itcm/ManagedObject#set:color + global.get $~lib/collector/itcm/fromSpace + local.get $2 + call $~lib/collector/itcm/ManagedObjectList#push + ) + (func $~lib/runtime/runtime.register (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 88 + i32.const 82 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 88 + i32.const 84 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $~lib/collector/itcm/__ref_register + local.get $0 + ) + (func $~lib/runtime/runtime.newString (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + call $~lib/runtime/runtime.allocate + i32.const 1 + call $~lib/runtime/runtime.register + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + ) + (func $~lib/collector/itcm/ManagedObject#get:color (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#get:next (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#unlink (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + local.set $1 + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/collector/itcm/iter + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + call $~lib/collector/itcm/ManagedObject#unlink + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/__ref_link (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + local.set $3 + local.get $3 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eqz + i32.eq + local.tee $2 + if (result i32) + block $~lib/collector/itcm/refToObj|inlined.3 (result i32) + local.get $0 + local.set $2 + local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + else + local.get $2 + end + if + local.get $3 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/memory/memory.copy (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|2 + end + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + end + ) + (func $~lib/runtime/runtime.newArray (; 41 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + i32.const 16 + call $~lib/runtime/runtime.allocate + local.get $2 + call $~lib/runtime/runtime.register + local.set $4 + local.get $0 + local.get $1 + i32.shl + local.set $5 + local.get $5 + call $~lib/runtime/runtime.allocate + i32.const 2 + call $~lib/runtime/runtime.register + local.set $6 + local.get $4 + local.tee $7 + local.get $6 + local.tee $8 + local.get $7 + i32.load + local.tee $9 + i32.ne + if (result i32) + nop + local.get $8 + local.get $7 + call $~lib/collector/itcm/__ref_link + local.get $8 + else + local.get $8 + end + i32.store + local.get $4 + local.get $6 + i32.store offset=4 + local.get $4 + local.get $5 + i32.store offset=8 + local.get $4 + local.get $0 + i32.store offset=12 + local.get $3 + if + local.get $6 + local.get $3 + local.get $5 + call $~lib/memory/memory.copy + end + local.get $4 + ) + (func $~lib/runtime/Root#constructor (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/runtime/runtime.allocate + i32.const 3 + call $~lib/runtime/runtime.register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/itcm/__ref_link + ) + (func $~lib/runtime/runtime.release (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/collector/itcm/step (; 45 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + global.get $~lib/collector/itcm/state + local.set $1 + local.get $1 + i32.const 0 + i32.eq + br_if $case0|0 + local.get $1 + i32.const 1 + i32.eq + br_if $case1|0 + local.get $1 + i32.const 2 + i32.eq + br_if $case2|0 + local.get $1 + i32.const 3 + i32.eq + br_if $case3|0 + br $break|0 + end + unreachable + end + block + call $~lib/runtime/__gc_mark_roots + i32.const 2 + global.set $~lib/collector/itcm/state + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + call $~lib/collector/itcm/ManagedObject#set:color + local.get $0 + i32.load + block $~lib/collector/itcm/objToRef|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + call $~lib/runtime/__gc_mark_members + else + call $~lib/runtime/__gc_mark_roots + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $1 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $1 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $1 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + end + end + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.ge_u + if + local.get $0 + call $~lib/memory/memory.free + end + else + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + i32.const 1 + global.set $~lib/collector/itcm/state + end + br $break|0 + unreachable + end + unreachable + end + ) + (func $~lib/collector/itcm/__ref_collect (; 46 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/maybeInit + block $break|0 + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 + end + end + ) + (func $~lib/runtime/runtime.collect (; 47 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 49 ;) (type $FUNCSIG$v) + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT + ) + (func $~lib/collector/itcm/__ref_mark (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.4 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/runtime/__gc_mark_roots (; 51 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/runtime/ROOT + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + ) + (func $~lib/runtime/__gc_mark_members (; 52 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + block $invalid + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/string/String + local.get $0 + br_table $invalid $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid + end + return + end + return + end + return + end + unreachable + ) + (func $~lib/runtime/__runtime_instanceof (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block $nope + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/string/String + local.get $0 + br_table $nope $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope + end + local.get $1 + i32.const 1 + i32.eq + return + end + local.get $1 + i32.const 2 + i32.eq + return + end + local.get $1 + i32.const 3 + i32.eq + return + end + i32.const 0 + return + ) + (func $null (; 54 ;) (type $FUNCSIG$v) + ) + (func $~lib/runtime/runtime.newArray|trampoline (; 55 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 3 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/runtime/runtime.newArray + ) + (func $~lib/setargc (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.set $~lib/argc ) ) diff --git a/tests/compiler/runtime/instanceof.optimized.wat b/tests/compiler/runtime/instanceof.optimized.wat index 4a8c606628..ab75a98236 100644 --- a/tests/compiler/runtime/instanceof.optimized.wat +++ b/tests/compiler/runtime/instanceof.optimized.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 88 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 88 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/runtime/instanceof.untouched.wat b/tests/compiler/runtime/instanceof.untouched.wat index f88df69709..844c5735a6 100644 --- a/tests/compiler/runtime/instanceof.untouched.wat +++ b/tests/compiler/runtime/instanceof.untouched.wat @@ -189,7 +189,7 @@ if i32.const 0 i32.const 88 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -206,7 +206,7 @@ if i32.const 0 i32.const 88 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/allocator_arena.optimized.wat b/tests/compiler/std/allocator_arena.optimized.wat index f14cd0cd27..027358323e 100644 --- a/tests/compiler/std/allocator_arena.optimized.wat +++ b/tests/compiler/std/allocator_arena.optimized.wat @@ -260,857 +260,7 @@ end end ) - (func $~lib/util/memory/memcpy (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 42 - local.set $3 - loop $continue|0 - local.get $1 - i32.const 3 - i32.and - local.get $3 - local.get $3 - select - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $3 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $3 - i32.const 16 - i32.sub - local.set $3 - br $continue|1 - end - end - local.get $3 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $3 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $3 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $3 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $3 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - local.get $0 - i32.const 3 - i32.and - local.tee $2 - i32.const 1 - i32.ne - if - local.get $2 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $2 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - local.get $3 - i32.const 3 - i32.sub - local.set $3 - loop $continue|3 - local.get $3 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $2 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $2 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $2 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $2 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 13 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $2 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $3 - i32.const 16 - i32.sub - local.set $3 - br $continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.sub - local.set $3 - loop $continue|4 - local.get $3 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $2 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $2 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $2 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $2 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $2 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $3 - i32.const 16 - i32.sub - local.set $3 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - loop $continue|5 - local.get $3 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $2 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $2 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $2 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $2 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 15 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $2 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $3 - i32.const 16 - i32.sub - local.set $3 - br $continue|5 - end - end - end - end - local.get $3 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $3 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $3 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $3 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $3 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.copy (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1121,27 +271,6 @@ local.get $1 i32.eq br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - i32.const 42 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $0 - i32.const 42 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -1305,7 +434,7 @@ end end ) - (func $start:std/allocator_arena (; 5 ;) (type $FUNCSIG$v) + (func $start:std/allocator_arena (; 4 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1470,10 +599,10 @@ unreachable end ) - (func $start (; 6 ;) (type $FUNCSIG$v) + (func $start (; 5 ;) (type $FUNCSIG$v) call $start:std/allocator_arena ) - (func $null (; 7 ;) (type $FUNCSIG$v) + (func $null (; 6 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/allocator_arena.untouched.wat b/tests/compiler/std/allocator_arena.untouched.wat index 2ad5b25654..f8b3ac262e 100644 --- a/tests/compiler/std/allocator_arena.untouched.wat +++ b/tests/compiler/std/allocator_arena.untouched.wat @@ -360,1208 +360,7 @@ end end ) - (func $~lib/util/memory/memcpy (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1572,28 +371,6 @@ if br $~lib/util/memory/memmove|inlined.0 end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -1792,21 +569,21 @@ end end ) - (func $~lib/allocator/arena/__mem_free (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/allocator/arena/__mem_reset (; 8 ;) (type $FUNCSIG$v) + (func $~lib/allocator/arena/__mem_reset (; 7 ;) (type $FUNCSIG$v) global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $~lib/memory/memory.reset (; 9 ;) (type $FUNCSIG$v) + (func $~lib/memory/memory.reset (; 8 ;) (type $FUNCSIG$v) call $~lib/allocator/arena/__mem_reset ) - (func $start:std/allocator_arena (; 10 ;) (type $FUNCSIG$v) + (func $start:std/allocator_arena (; 9 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2021,9 +798,9 @@ unreachable end ) - (func $start (; 11 ;) (type $FUNCSIG$v) + (func $start (; 10 ;) (type $FUNCSIG$v) call $start:std/allocator_arena ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 11 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 4a7de97bf3..191b024f29 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -27,7 +27,7 @@ if i32.const 0 i32.const 16 - i32.const 97 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -41,7 +41,7 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -64,7 +64,7 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 39ecd801af..90a4ecc6eb 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -39,7 +39,7 @@ if i32.const 0 i32.const 16 - i32.const 97 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -53,7 +53,7 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -81,7 +81,7 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -114,7 +114,7 @@ if i32.const 0 i32.const 16 - i32.const 97 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -128,7 +128,7 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -296,7 +296,7 @@ if i32.const 0 i32.const 16 - i32.const 97 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -310,7 +310,7 @@ if i32.const 0 i32.const 16 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index d63addae62..a59a5bd0b0 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -46,7 +46,7 @@ if i32.const 0 i32.const 136 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -67,7 +67,7 @@ if i32.const 0 i32.const 136 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -177,7 +177,7 @@ if i32.const 0 i32.const 296 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -192,7 +192,7 @@ if i32.const 0 i32.const 296 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 192f819e3e..49292edaf9 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -62,7 +62,7 @@ if i32.const 0 i32.const 136 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -94,7 +94,7 @@ if i32.const 0 i32.const 136 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -233,7 +233,7 @@ if i32.const 0 i32.const 296 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -250,7 +250,7 @@ if i32.const 0 i32.const 296 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -268,1208 +268,7 @@ (func $~lib/collector/dummy/__ref_unlink (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/util/memory/memcpy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1480,28 +279,6 @@ if br $~lib/util/memory/memmove|inlined.0 end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -1700,7 +477,7 @@ end end ) - (func $~lib/runtime/runtime.newArray (; 17 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 16 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1762,7 +539,7 @@ end local.get $4 ) - (func $std/array-literal/Ref#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/Ref#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -1774,11 +551,11 @@ end local.get $0 ) - (func $~lib/array/Array#get:length (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/array-literal/RefWithCtor#constructor (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/RefWithCtor#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -1790,11 +567,11 @@ end local.get $0 ) - (func $~lib/array/Array#get:length (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $start:std/array-literal (; 22 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 21 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2234,9 +1011,9 @@ unreachable end ) - (func $start (; 23 ;) (type $FUNCSIG$v) + (func $start (; 22 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 24 ;) (type $FUNCSIG$v) + (func $null (; 23 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index aca7f14ffe..ec41dcb54e 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -62,346 +62,348 @@ (data (i32.const 608) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") (data (i32.const 632) "\02\00\00\00\14") (data (i32.const 648) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 672) "\02") - (data (i32.const 688) "\02") - (data (i32.const 704) "\04\00\00\00\10") - (data (i32.const 720) "\c0\02\00\00\c0\02") - (data (i32.const 736) "\02\00\00\00\14") - (data (i32.const 752) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 776) "\02\00\00\00\14") - (data (i32.const 792) "\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 816) "\02\00\00\00\14") - (data (i32.const 832) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 856) "\02\00\00\00\14") - (data (i32.const 872) "\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05") - (data (i32.const 896) "\02\00\00\00\14") - (data (i32.const 912) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 936) "\02\00\00\00\14") - (data (i32.const 952) "\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") - (data (i32.const 976) "\02\00\00\00\14") - (data (i32.const 992) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1016) "\02\00\00\00\14") - (data (i32.const 1032) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1056) "\02\00\00\00\14") - (data (i32.const 1072) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1096) "\02\00\00\00\14") - (data (i32.const 1112) "\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1136) "\02\00\00\00\14") - (data (i32.const 1152) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1176) "\02\00\00\00\14") - (data (i32.const 1192) "\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1216) "\02\00\00\00\14") - (data (i32.const 1232) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1256) "\02\00\00\00\14") - (data (i32.const 1272) "\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") - (data (i32.const 1296) "\02\00\00\00\14") - (data (i32.const 1312) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1336) "\02\00\00\00\14") - (data (i32.const 1352) "\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1376) "\02\00\00\00\14") - (data (i32.const 1392) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1416) "\02\00\00\00\14") - (data (i32.const 1432) "\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1456) "\02\00\00\00\14") - (data (i32.const 1472) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1496) "\02\00\00\00\14") - (data (i32.const 1512) "\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1536) "\02\00\00\00\14") - (data (i32.const 1552) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1576) "\02\00\00\00\14") - (data (i32.const 1592) "\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") - (data (i32.const 1616) "\02\00\00\00\14") - (data (i32.const 1632) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1656) "\02\00\00\00\14") - (data (i32.const 1672) "\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") - (data (i32.const 1696) "\02\00\00\00\14") - (data (i32.const 1712) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1736) "\04\00\00\00\10") - (data (i32.const 1752) "\b0\06\00\00\b0\06\00\00\14\00\00\00\05") - (data (i32.const 1768) "\02\00\00\00\14") - (data (i32.const 1784) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1808) "\02") + (data (i32.const 672) "\01\00\00\00(") + (data (i32.const 688) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 728) "\02") + (data (i32.const 744) "\02") + (data (i32.const 760) "\04\00\00\00\10") + (data (i32.const 776) "\f8\02\00\00\f8\02") + (data (i32.const 792) "\02\00\00\00\14") + (data (i32.const 808) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 832) "\02\00\00\00\14") + (data (i32.const 848) "\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 872) "\02\00\00\00\14") + (data (i32.const 888) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 912) "\02\00\00\00\14") + (data (i32.const 928) "\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05") + (data (i32.const 952) "\02\00\00\00\14") + (data (i32.const 968) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 992) "\02\00\00\00\14") + (data (i32.const 1008) "\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") + (data (i32.const 1032) "\02\00\00\00\14") + (data (i32.const 1048) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1072) "\02\00\00\00\14") + (data (i32.const 1088) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1112) "\02\00\00\00\14") + (data (i32.const 1128) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1152) "\02\00\00\00\14") + (data (i32.const 1168) "\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1192) "\02\00\00\00\14") + (data (i32.const 1208) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1232) "\02\00\00\00\14") + (data (i32.const 1248) "\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1272) "\02\00\00\00\14") + (data (i32.const 1288) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1312) "\02\00\00\00\14") + (data (i32.const 1328) "\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") + (data (i32.const 1352) "\02\00\00\00\14") + (data (i32.const 1368) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1392) "\02\00\00\00\14") + (data (i32.const 1408) "\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1432) "\02\00\00\00\14") + (data (i32.const 1448) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1472) "\02\00\00\00\14") + (data (i32.const 1488) "\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1512) "\02\00\00\00\14") + (data (i32.const 1528) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1552) "\02\00\00\00\14") + (data (i32.const 1568) "\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1592) "\02\00\00\00\14") + (data (i32.const 1608) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1632) "\02\00\00\00\14") + (data (i32.const 1648) "\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") + (data (i32.const 1672) "\02\00\00\00\14") + (data (i32.const 1688) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1712) "\02\00\00\00\14") + (data (i32.const 1728) "\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") + (data (i32.const 1752) "\02\00\00\00\14") + (data (i32.const 1768) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1792) "\04\00\00\00\10") + (data (i32.const 1808) "\e8\06\00\00\e8\06\00\00\14\00\00\00\05") (data (i32.const 1824) "\02\00\00\00\14") (data (i32.const 1840) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1864) "\02\00\00\00\0c") - (data (i32.const 1880) "\03\00\00\00\04\00\00\00\05") - (data (i32.const 1896) "\02\00\00\00\08") - (data (i32.const 1912) "\01\00\00\00\02") - (data (i32.const 1920) "\02\00\00\00\14") - (data (i32.const 1936) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1960) "\02\00\00\00\08") - (data (i32.const 1976) "\03\00\00\00\04") - (data (i32.const 1984) "\02\00\00\00\0c") - (data (i32.const 2000) "\01\00\00\00\02\00\00\00\05") - (data (i32.const 2016) "\02\00\00\00\14") - (data (i32.const 2032) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2056) "\02\00\00\00\04") - (data (i32.const 2072) "\01") - (data (i32.const 2080) "\02\00\00\00\10") - (data (i32.const 2096) "\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2112) "\02\00\00\00\14") - (data (i32.const 2128) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2152) "\02\00\00\00\04") - (data (i32.const 2168) "\05") - (data (i32.const 2176) "\02\00\00\00\10") - (data (i32.const 2192) "\01\00\00\00\02\00\00\00\03\00\00\00\04") - (data (i32.const 2208) "\02\00\00\00\14") - (data (i32.const 2224) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2248) "\02\00\00\00\08") - (data (i32.const 2264) "\04\00\00\00\05") - (data (i32.const 2272) "\02\00\00\00\0c") - (data (i32.const 2288) "\01\00\00\00\02\00\00\00\03") - (data (i32.const 2304) "\02\00\00\00\14") - (data (i32.const 2320) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2344) "\02\00\00\00\04") - (data (i32.const 2360) "\04") - (data (i32.const 2368) "\02\00\00\00\10") - (data (i32.const 2384) "\01\00\00\00\02\00\00\00\03\00\00\00\05") - (data (i32.const 2400) "\02\00\00\00\14") - (data (i32.const 2416) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2440) "\02\00\00\00\04") - (data (i32.const 2456) "\01") - (data (i32.const 2464) "\02\00\00\00\10") - (data (i32.const 2480) "\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2496) "\02\00\00\00\14") - (data (i32.const 2512) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2536) "\02") + (data (i32.const 1864) "\02") + (data (i32.const 1880) "\02\00\00\00\14") + (data (i32.const 1896) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1920) "\02\00\00\00\0c") + (data (i32.const 1936) "\03\00\00\00\04\00\00\00\05") + (data (i32.const 1952) "\02\00\00\00\08") + (data (i32.const 1968) "\01\00\00\00\02") + (data (i32.const 1976) "\02\00\00\00\14") + (data (i32.const 1992) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2016) "\02\00\00\00\08") + (data (i32.const 2032) "\03\00\00\00\04") + (data (i32.const 2040) "\02\00\00\00\0c") + (data (i32.const 2056) "\01\00\00\00\02\00\00\00\05") + (data (i32.const 2072) "\02\00\00\00\14") + (data (i32.const 2088) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2112) "\02\00\00\00\04") + (data (i32.const 2128) "\01") + (data (i32.const 2136) "\02\00\00\00\10") + (data (i32.const 2152) "\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2168) "\02\00\00\00\14") + (data (i32.const 2184) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2208) "\02\00\00\00\04") + (data (i32.const 2224) "\05") + (data (i32.const 2232) "\02\00\00\00\10") + (data (i32.const 2248) "\01\00\00\00\02\00\00\00\03\00\00\00\04") + (data (i32.const 2264) "\02\00\00\00\14") + (data (i32.const 2280) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2304) "\02\00\00\00\08") + (data (i32.const 2320) "\04\00\00\00\05") + (data (i32.const 2328) "\02\00\00\00\0c") + (data (i32.const 2344) "\01\00\00\00\02\00\00\00\03") + (data (i32.const 2360) "\02\00\00\00\14") + (data (i32.const 2376) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2400) "\02\00\00\00\04") + (data (i32.const 2416) "\04") + (data (i32.const 2424) "\02\00\00\00\10") + (data (i32.const 2440) "\01\00\00\00\02\00\00\00\03\00\00\00\05") + (data (i32.const 2456) "\02\00\00\00\14") + (data (i32.const 2472) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2496) "\02\00\00\00\04") + (data (i32.const 2512) "\01") + (data (i32.const 2520) "\02\00\00\00\10") + (data (i32.const 2536) "\02\00\00\00\03\00\00\00\04\00\00\00\05") (data (i32.const 2552) "\02\00\00\00\14") (data (i32.const 2568) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2592) "\02\00\00\00\14") - (data (i32.const 2608) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2632) "\02") + (data (i32.const 2592) "\02") + (data (i32.const 2608) "\02\00\00\00\14") + (data (i32.const 2624) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") (data (i32.const 2648) "\02\00\00\00\14") (data (i32.const 2664) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2688) "\02\00\00\00\14") - (data (i32.const 2704) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2728) "\02") + (data (i32.const 2688) "\02") + (data (i32.const 2704) "\02\00\00\00\14") + (data (i32.const 2720) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") (data (i32.const 2744) "\02\00\00\00\14") (data (i32.const 2760) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2784) "\02\00\00\00\14") - (data (i32.const 2800) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2824) "\02") + (data (i32.const 2784) "\02") + (data (i32.const 2800) "\02\00\00\00\14") + (data (i32.const 2816) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") (data (i32.const 2840) "\02\00\00\00\14") (data (i32.const 2856) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2880) "\02\00\00\00\14") - (data (i32.const 2896) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2920) "\02") + (data (i32.const 2880) "\02") + (data (i32.const 2896) "\02\00\00\00\14") + (data (i32.const 2912) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") (data (i32.const 2936) "\02\00\00\00\14") (data (i32.const 2952) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2976) "\01\00\00\00\18") - (data (i32.const 2992) "~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") - (data (i32.const 3016) "\01\00\00\00\ac") - (data (i32.const 3032) "A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?") - (data (i32.const 3208) "\02\00\00\00 ") - (data (i32.const 3226) "\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") - (data (i32.const 3256) "\t\00\00\00\10") - (data (i32.const 3272) "\98\0c\00\00\98\0c\00\00 \00\00\00\08") - (data (i32.const 3288) "\02\00\00\00 ") - (data (i32.const 3306) "\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") - (data (i32.const 3336) "\02\00\00\00@") - (data (i32.const 3358) "\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?") - (data (i32.const 3398) "\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") - (data (i32.const 3416) "\n\00\00\00\10") - (data (i32.const 3432) "\18\0d\00\00\18\0d\00\00@\00\00\00\08") - (data (i32.const 3448) "\02\00\00\00@") - (data (i32.const 3470) "\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf") - (data (i32.const 3502) "\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") - (data (i32.const 3528) "\02\00\00\00\14") - (data (i32.const 3544) "\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02") - (data (i32.const 3568) "\04\00\00\00\10") - (data (i32.const 3584) "\d8\0d\00\00\d8\0d\00\00\14\00\00\00\05") - (data (i32.const 3600) "\02\00\00\00\14") - (data (i32.const 3616) "\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02") - (data (i32.const 3640) "\02\00\00\00\14") - (data (i32.const 3656) "\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02") - (data (i32.const 3680) "\08\00\00\00\10") - (data (i32.const 3696) "H\0e\00\00H\0e\00\00\14\00\00\00\05") - (data (i32.const 3712) "\02\00\00\00\14") - (data (i32.const 3732) "\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") - (data (i32.const 3752) "\02") - (data (i32.const 3768) "\04\00\00\00\10") - (data (i32.const 3784) "\b8\0e\00\00\b8\0e") - (data (i32.const 3800) "\02\00\00\00\04") - (data (i32.const 3816) "\01") + (data (i32.const 2976) "\02") + (data (i32.const 2992) "\02\00\00\00\14") + (data (i32.const 3008) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 3032) "\01\00\00\00\18") + (data (i32.const 3048) "~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") + (data (i32.const 3072) "\01\00\00\00\ac") + (data (i32.const 3088) "A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?") + (data (i32.const 3264) "\02\00\00\00 ") + (data (i32.const 3282) "\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") + (data (i32.const 3312) "\t\00\00\00\10") + (data (i32.const 3328) "\d0\0c\00\00\d0\0c\00\00 \00\00\00\08") + (data (i32.const 3344) "\02\00\00\00 ") + (data (i32.const 3362) "\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") + (data (i32.const 3392) "\02\00\00\00@") + (data (i32.const 3414) "\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?") + (data (i32.const 3454) "\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") + (data (i32.const 3472) "\n\00\00\00\10") + (data (i32.const 3488) "P\0d\00\00P\0d\00\00@\00\00\00\08") + (data (i32.const 3504) "\02\00\00\00@") + (data (i32.const 3526) "\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf") + (data (i32.const 3558) "\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") + (data (i32.const 3584) "\02\00\00\00\14") + (data (i32.const 3600) "\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02") + (data (i32.const 3624) "\04\00\00\00\10") + (data (i32.const 3640) "\10\0e\00\00\10\0e\00\00\14\00\00\00\05") + (data (i32.const 3656) "\02\00\00\00\14") + (data (i32.const 3672) "\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02") + (data (i32.const 3696) "\02\00\00\00\14") + (data (i32.const 3712) "\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02") + (data (i32.const 3736) "\08\00\00\00\10") + (data (i32.const 3752) "\80\0e\00\00\80\0e\00\00\14\00\00\00\05") + (data (i32.const 3768) "\02\00\00\00\14") + (data (i32.const 3788) "\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") + (data (i32.const 3808) "\02") (data (i32.const 3824) "\04\00\00\00\10") - (data (i32.const 3840) "\e8\0e\00\00\e8\0e\00\00\04\00\00\00\01") - (data (i32.const 3856) "\02\00\00\00\08") - (data (i32.const 3872) "\02\00\00\00\01") + (data (i32.const 3840) "\f0\0e\00\00\f0\0e") + (data (i32.const 3856) "\02\00\00\00\04") + (data (i32.const 3872) "\01") (data (i32.const 3880) "\04\00\00\00\10") - (data (i32.const 3896) " \0f\00\00 \0f\00\00\08\00\00\00\02") - (data (i32.const 3912) "\02\00\00\00\10") - (data (i32.const 3928) "\03\00\00\00\02\00\00\00\01") - (data (i32.const 3944) "\04\00\00\00\10") - (data (i32.const 3960) "X\0f\00\00X\0f\00\00\10\00\00\00\04") - (data (i32.const 3976) "\02\00\00\00\10") - (data (i32.const 3996) "\01\00\00\00\02\00\00\00\03") - (data (i32.const 4008) "\04\00\00\00\10") - (data (i32.const 4024) "\98\0f\00\00\98\0f\00\00\10\00\00\00\04") - (data (i32.const 4040) "\02\00\00\00\04") - (data (i32.const 4056) "\01") - (data (i32.const 4064) "\02\00\00\00\08") - (data (i32.const 4080) "\01\00\00\00\02") - (data (i32.const 4088) "\01\00\00\00\02") - (data (i32.const 4104) "a") - (data (i32.const 4112) "\01\00\00\00\02") - (data (i32.const 4128) "b") - (data (i32.const 4136) "\01\00\00\00\04") - (data (i32.const 4152) "a\00b") - (data (i32.const 4160) "\01\00\00\00\04") - (data (i32.const 4176) "b\00a") - (data (i32.const 4184) "\01") - (data (i32.const 4200) "\02\00\00\00\1c") - (data (i32.const 4216) "\08\10\00\00 \10\00\00\08\10\00\008\10\00\00P\10\00\00h\10") - (data (i32.const 4248) "\0e\00\00\00\10") - (data (i32.const 4264) "x\10\00\00x\10\00\00\1c\00\00\00\07") - (data (i32.const 4280) "\02\00\00\00\1c") - (data (i32.const 4296) "h\10\00\00\08\10\00\00\08\10\00\008\10\00\00 \10\00\00P\10") - (data (i32.const 4328) "\0e\00\00\00\10") - (data (i32.const 4344) "\c8\10\00\00\c8\10\00\00\1c\00\00\00\07") - (data (i32.const 4360) "\01\00\00\00\1c") - (data (i32.const 4376) "~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 4408) "\01\00\00\00\08") - (data (i32.const 4424) "n\00u\00l\00l") - (data (i32.const 4432) "\02\00\00\00\02") - (data (i32.const 4448) "\01") - (data (i32.const 4456) "\01\00\00\00\08") - (data (i32.const 4472) "t\00r\00u\00e") - (data (i32.const 4480) "\01\00\00\00\n") - (data (i32.const 4496) "f\00a\00l\00s\00e") - (data (i32.const 4512) "\01\00\00\00\02") - (data (i32.const 4528) ",") - (data (i32.const 4536) "\02\00\00\00\02") - (data (i32.const 4552) "\01") - (data (i32.const 4560) "\01\00\00\00\14") - (data (i32.const 4576) "t\00r\00u\00e\00,\00f\00a\00l\00s\00e") - (data (i32.const 4600) "\02\00\00\00\0c") - (data (i32.const 4616) "\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 4632) "\01\00\00\00\02") - (data (i32.const 4648) "0") - (data (i32.const 4656) "\02\00\00\00\90\01") - (data (i32.const 4672) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 5072) "\08\00\00\00\10") - (data (i32.const 5088) "@\12\00\00@\12\00\00\90\01\00\00d") - (data (i32.const 5104) "\02\00\00\00\0c") - (data (i32.const 5120) "\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 5136) "\01\00\00\00\n") - (data (i32.const 5152) "1\00-\002\00-\003") - (data (i32.const 5168) "\02\00\00\00\0c") - (data (i32.const 5184) "\01\00\00\00\02\00\00\00\03") - (data (i32.const 5200) "\01\00\00\00\02") - (data (i32.const 5216) "-") + (data (i32.const 3896) " \0f\00\00 \0f\00\00\04\00\00\00\01") + (data (i32.const 3912) "\02\00\00\00\08") + (data (i32.const 3928) "\02\00\00\00\01") + (data (i32.const 3936) "\04\00\00\00\10") + (data (i32.const 3952) "X\0f\00\00X\0f\00\00\08\00\00\00\02") + (data (i32.const 3968) "\02\00\00\00\10") + (data (i32.const 3984) "\03\00\00\00\02\00\00\00\01") + (data (i32.const 4000) "\04\00\00\00\10") + (data (i32.const 4016) "\90\0f\00\00\90\0f\00\00\10\00\00\00\04") + (data (i32.const 4032) "\02\00\00\00\10") + (data (i32.const 4052) "\01\00\00\00\02\00\00\00\03") + (data (i32.const 4064) "\04\00\00\00\10") + (data (i32.const 4080) "\d0\0f\00\00\d0\0f\00\00\10\00\00\00\04") + (data (i32.const 4096) "\02\00\00\00\04") + (data (i32.const 4112) "\01") + (data (i32.const 4120) "\02\00\00\00\08") + (data (i32.const 4136) "\01\00\00\00\02") + (data (i32.const 4144) "\01\00\00\00\02") + (data (i32.const 4160) "a") + (data (i32.const 4168) "\01\00\00\00\02") + (data (i32.const 4184) "b") + (data (i32.const 4192) "\01\00\00\00\04") + (data (i32.const 4208) "a\00b") + (data (i32.const 4216) "\01\00\00\00\04") + (data (i32.const 4232) "b\00a") + (data (i32.const 4240) "\01") + (data (i32.const 4256) "\02\00\00\00\1c") + (data (i32.const 4272) "@\10\00\00X\10\00\00@\10\00\00p\10\00\00\88\10\00\00\a0\10") + (data (i32.const 4304) "\0e\00\00\00\10") + (data (i32.const 4320) "\b0\10\00\00\b0\10\00\00\1c\00\00\00\07") + (data (i32.const 4336) "\02\00\00\00\1c") + (data (i32.const 4352) "\a0\10\00\00@\10\00\00@\10\00\00p\10\00\00X\10\00\00\88\10") + (data (i32.const 4384) "\0e\00\00\00\10") + (data (i32.const 4401) "\11\00\00\00\11\00\00\1c\00\00\00\07") + (data (i32.const 4416) "\01\00\00\00\1c") + (data (i32.const 4432) "~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 4464) "\01\00\00\00\08") + (data (i32.const 4480) "n\00u\00l\00l") + (data (i32.const 4488) "\02\00\00\00\02") + (data (i32.const 4504) "\01") + (data (i32.const 4512) "\01\00\00\00\08") + (data (i32.const 4528) "t\00r\00u\00e") + (data (i32.const 4536) "\01\00\00\00\n") + (data (i32.const 4552) "f\00a\00l\00s\00e") + (data (i32.const 4568) "\01\00\00\00\02") + (data (i32.const 4584) ",") + (data (i32.const 4592) "\02\00\00\00\02") + (data (i32.const 4608) "\01") + (data (i32.const 4616) "\01\00\00\00\14") + (data (i32.const 4632) "t\00r\00u\00e\00,\00f\00a\00l\00s\00e") + (data (i32.const 4656) "\02\00\00\00\0c") + (data (i32.const 4672) "\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 4688) "\01\00\00\00\02") + (data (i32.const 4704) "0") + (data (i32.const 4712) "\02\00\00\00\90\01") + (data (i32.const 4728) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") + (data (i32.const 5128) "\08\00\00\00\10") + (data (i32.const 5144) "x\12\00\00x\12\00\00\90\01\00\00d") + (data (i32.const 5160) "\02\00\00\00\0c") + (data (i32.const 5176) "\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 5192) "\01\00\00\00\n") + (data (i32.const 5208) "1\00-\002\00-\003") (data (i32.const 5224) "\02\00\00\00\0c") (data (i32.const 5240) "\01\00\00\00\02\00\00\00\03") - (data (i32.const 5256) "\02\00\00\00\08") - (data (i32.const 5275) "\80\00\00\00\80") - (data (i32.const 5280) "\01\00\00\00\04") - (data (i32.const 5296) "_\00_") - (data (i32.const 5304) "\02\00\00\00\08") - (data (i32.const 5323) "\80\00\00\00\80") - (data (i32.const 5328) "\01\00\00\000") - (data (i32.const 5344) "-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 5392) "\02\00\00\000") - (data (i32.const 5422) "\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") - (data (i32.const 5456) "\01\00\00\00\04") - (data (i32.const 5472) ",\00 ") - (data (i32.const 5480) "\01\00\00\00\06") - (data (i32.const 5496) "0\00.\000") - (data (i32.const 5504) "\01\00\00\00\06") - (data (i32.const 5520) "N\00a\00N") - (data (i32.const 5528) "\01\00\00\00\12") - (data (i32.const 5544) "-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 5568) "\01\00\00\00\10") - (data (i32.const 5584) "I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 5600) "\02\00\00\00\b8\02") - (data (i32.const 5616) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -413,10 +415,10 @@ (global $std/array/i (mut i32) (i32.const 0)) (global $std/array/other (mut i32) (i32.const 0)) (global $std/array/out (mut i32) (i32.const 0)) - (global $std/array/source (mut i32) (i32.const 720)) + (global $std/array/source (mut i32) (i32.const 776)) (global $std/array/cwArr (mut i32) (i32.const 0)) (global $std/array/includes (mut i32) (i32.const 0)) - (global $std/array/sarr (mut i32) (i32.const 1752)) + (global $std/array/sarr (mut i32) (i32.const 1808)) (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/every (mut i32) (i32.const 0)) (global $std/array/some (mut i32) (i32.const 0)) @@ -428,15 +430,15 @@ (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) (global $~lib/math/random_state0_32 (mut i32) (i32.const 0)) (global $~lib/math/random_state1_32 (mut i32) (i32.const 0)) - (global $std/array/f32ArrayTyped (mut i32) (i32.const 3272)) - (global $std/array/f64ArrayTyped (mut i32) (i32.const 3432)) - (global $std/array/i32ArrayTyped (mut i32) (i32.const 3584)) - (global $std/array/u32ArrayTyped (mut i32) (i32.const 3696)) - (global $std/array/reversed0 (mut i32) (i32.const 3784)) - (global $std/array/reversed1 (mut i32) (i32.const 3840)) - (global $std/array/reversed2 (mut i32) (i32.const 3896)) - (global $std/array/reversed4 (mut i32) (i32.const 3960)) - (global $std/array/expected4 (mut i32) (i32.const 4024)) + (global $std/array/f32ArrayTyped (mut i32) (i32.const 3328)) + (global $std/array/f64ArrayTyped (mut i32) (i32.const 3488)) + (global $std/array/i32ArrayTyped (mut i32) (i32.const 3640)) + (global $std/array/u32ArrayTyped (mut i32) (i32.const 3752)) + (global $std/array/reversed0 (mut i32) (i32.const 3840)) + (global $std/array/reversed1 (mut i32) (i32.const 3896)) + (global $std/array/reversed2 (mut i32) (i32.const 3952)) + (global $std/array/reversed4 (mut i32) (i32.const 4016)) + (global $std/array/expected4 (mut i32) (i32.const 4080)) (global $std/array/reversed64 (mut i32) (i32.const 0)) (global $std/array/reversed128 (mut i32) (i32.const 0)) (global $std/array/reversed1024 (mut i32) (i32.const 0)) @@ -446,8 +448,8 @@ (global $std/array/randomized257 (mut i32) (i32.const 0)) (global $std/array/reversedNested512 (mut i32) (i32.const 0)) (global $std/array/reversedElements512 (mut i32) (i32.const 0)) - (global $std/array/randomStringsActual (mut i32) (i32.const 4264)) - (global $std/array/randomStringsExpected (mut i32) (i32.const 4344)) + (global $std/array/randomStringsActual (mut i32) (i32.const 4320)) + (global $std/array/randomStringsExpected (mut i32) (i32.const 4400)) (global $std/array/randomStrings400 (mut i32) (i32.const 0)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) @@ -782,12 +784,12 @@ (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 8060 + i32.const 8116 i32.le_u if i32.const 0 i32.const 80 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -802,7 +804,7 @@ if i32.const 0 i32.const 80 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -861,962 +863,115 @@ i32.const 12 call $~lib/runtime/runtime.allocate i32.const 3 - call $~lib/runtime/runtime.register - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.load - drop - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 - local.get $2 - i32.store offset=8 - local.get $0 - ) - (func $~lib/array/Array#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - i32.const 16 - call $~lib/runtime/runtime.allocate - i32.const 4 - call $~lib/runtime/runtime.register - i32.const 0 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - ) - (func $~lib/array/Array#fill (; 9 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load offset=4 - local.set $5 - local.get $0 - i32.load offset=12 - local.set $4 - local.get $2 - i32.const 0 - i32.lt_s - if (result i32) - local.get $2 - local.get $4 - i32.add - local.tee $0 - i32.const 0 - local.get $0 - i32.const 0 - i32.gt_s - select - else - local.get $2 - local.get $4 - local.get $2 - local.get $4 - i32.lt_s - select - end - local.tee $0 - local.get $3 - i32.const 0 - i32.lt_s - if (result i32) - local.get $3 - local.get $4 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - else - local.get $3 - local.get $4 - local.get $3 - local.get $4 - i32.lt_s - select - end - local.tee $2 - i32.lt_s - if - local.get $0 - local.get $5 - i32.add - local.get $1 - local.get $2 - local.get $0 - i32.sub - call $~lib/memory/memory.fill - end - ) - (func $~lib/util/memory/memcpy (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $continue|0 - local.get $1 - i32.const 3 - i32.and - local.get $2 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - local.get $0 - i32.const 3 - i32.and - local.tee $3 - i32.const 1 - i32.ne - if - local.get $3 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $3 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 13 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 15 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 + call $~lib/runtime/runtime.register + local.set $0 end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.load + drop + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 local.get $2 + i32.store offset=8 + local.get $0 + ) + (func $~lib/array/Array#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 16 + call $~lib/runtime/runtime.allocate i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 + call $~lib/runtime/runtime.register + i32.const 0 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + ) + (func $~lib/array/Array#fill (; 9 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $5 + local.get $0 + i32.load offset=12 + local.set $4 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $4 i32.add local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 + i32.const 0 local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 + i32.const 0 + i32.gt_s + select + else + local.get $2 local.get $4 - i32.load8_u - i32.store8 + local.get $2 + local.get $4 + i32.lt_s + select end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 + local.tee $0 + local.get $3 + i32.const 0 + i32.lt_s + if (result i32) + local.get $3 + local.get $4 i32.add - local.set $1 + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + else local.get $3 local.get $4 - i32.load8_u - i32.store8 + local.get $3 + local.get $4 + i32.lt_s + select end - local.get $2 - i32.const 1 - i32.and + local.tee $2 + i32.lt_s if local.get $0 + local.get $5 + i32.add local.get $1 - i32.load8_u - i32.store8 + local.get $2 + local.get $0 + i32.sub + call $~lib/memory/memory.fill end ) - (func $~lib/memory/memory.copy (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1824,29 +979,6 @@ local.get $1 i32.eq br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - local.set $3 - end - local.get $3 - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -2010,7 +1142,7 @@ end end ) - (func $~lib/runtime/runtime.newArray (; 12 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 11 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) i32.const 16 @@ -2051,7 +1183,7 @@ end local.get $2 ) - (func $~lib/array/Array#__get (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2059,7 +1191,7 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -2070,7 +1202,7 @@ i32.add i32.load8_u ) - (func $std/array/isArraysEqual (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2117,7 +1249,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 15 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/array/Array#fill (; 14 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $0 i32.load offset=4 @@ -2189,7 +1321,7 @@ end end ) - (func $~lib/array/Array#__get (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2199,7 +1331,7 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -2212,7 +1344,7 @@ i32.add i32.load ) - (func $std/array/isArraysEqual (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2262,7 +1394,7 @@ end i32.const 1 ) - (func $~lib/runtime/runtime.reallocate (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/reallocate (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2296,7 +1428,7 @@ i32.shl i32.const 0 local.get $0 - i32.const 8060 + i32.const 8116 i32.gt_u select local.get $3 @@ -2335,13 +1467,13 @@ i32.eq if local.get $0 - i32.const 8060 + i32.const 8116 i32.le_u if i32.const 0 - i32.const 80 - i32.const 77 - i32.const 10 + i32.const 688 + i32.const 74 + i32.const 8 call $~lib/env/abort unreachable end @@ -2366,7 +1498,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureCapacity (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -2382,7 +1514,7 @@ if i32.const 0 i32.const 272 - i32.const 15 + i32.const 14 i32.const 64 call $~lib/env/abort unreachable @@ -2394,7 +1526,7 @@ i32.const 2 i32.shl local.tee $3 - call $~lib/runtime/runtime.reallocate + call $~lib/util/runtime/reallocate local.set $1 local.get $1 local.get $2 @@ -2415,7 +1547,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2438,7 +1570,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/array/Array#pop (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2449,7 +1581,7 @@ if i32.const 0 i32.const 272 - i32.const 310 + i32.const 309 i32.const 20 call $~lib/env/abort unreachable @@ -2470,7 +1602,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#concat (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2510,7 +1642,7 @@ call $~lib/memory/memory.copy local.get $4 ) - (func $~lib/array/Array#copyWithin (; 23 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 @@ -2675,7 +1807,7 @@ end local.get $0 ) - (func $~lib/array/Array#unshift (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#unshift (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2704,7 +1836,7 @@ local.get $2 i32.store offset=12 ) - (func $~lib/array/Array#shift (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2717,7 +1849,7 @@ if i32.const 0 i32.const 272 - i32.const 382 + i32.const 381 i32.const 20 call $~lib/env/abort unreachable @@ -2749,7 +1881,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#reverse (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#reverse (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2796,7 +1928,7 @@ end end ) - (func $~lib/array/Array#indexOf (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 26 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2860,7 +1992,7 @@ end i32.const -1 ) - (func $~lib/array/Array#includes (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 local.get $2 @@ -2868,7 +2000,7 @@ i32.const 0 i32.ge_s ) - (func $~lib/array/Array#splice (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2960,7 +2092,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#__set (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -2989,11 +2121,11 @@ i32.store offset=12 end ) - (func $start:std/array~anonymous|0 (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $~lib/array/Array#findIndex (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3041,17 +2173,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3059,7 +2191,7 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3067,12 +2199,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3120,12 +2252,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3133,12 +2265,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3146,12 +2278,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3199,12 +2331,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3212,12 +2344,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3225,13 +2357,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 48 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 50 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 49 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3274,7 +2406,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3283,7 +2415,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -3292,7 +2424,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.eqz @@ -3389,11 +2521,11 @@ end end ) - (func $start:std/array~anonymous|21 (; 54 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 53 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#map (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#map (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3451,7 +2583,7 @@ end local.get $4 ) - (func $~lib/array/Array#__get (; 56 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 55 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -3461,7 +2593,7 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -3474,7 +2606,7 @@ i32.add f32.load ) - (func $start:std/array~anonymous|22 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3484,7 +2616,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 58 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#map (; 57 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3539,14 +2671,14 @@ end end ) - (func $start:std/array~anonymous|23 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3556,12 +2688,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 62 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3617,7 +2749,7 @@ end local.get $4 ) - (func $start:std/array~anonymous|26 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3629,7 +2761,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -3638,7 +2770,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3650,12 +2782,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 66 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 65 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3699,7 +2831,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|31 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 67 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.eqz if @@ -3710,7 +2842,7 @@ end local.get $0 ) - (func $start:std/array~anonymous|32 (; 69 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.eqz if @@ -3721,7 +2853,7 @@ end local.get $0 ) - (func $start:std/array~anonymous|33 (; 70 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 69 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -3729,7 +2861,7 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 70 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -3737,7 +2869,7 @@ local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 71 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3774,7 +2906,7 @@ end local.get $2 ) - (func $~lib/math/splitMix32 (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 72 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -3806,13 +2938,13 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 74 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 73 ;) (type $FUNCSIG$vj) (param $0 i64) (local $1 i64) local.get $0 i64.eqz if i32.const 0 - i32.const 2992 + i32.const 3048 i32.const 1021 i32.const 4 call $~lib/env/abort @@ -3871,7 +3003,7 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/util/sort/insertionSort (; 75 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 74 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -3953,7 +3085,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 75 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -4209,7 +3341,7 @@ local.get $5 f32.store ) - (func $~lib/array/Array#sort (; 77 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 76 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f32) (local $4 f32) @@ -4218,7 +3350,7 @@ if i32.const 0 i32.const 272 - i32.const 527 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -4277,7 +3409,7 @@ call $~lib/util/sort/weakHeapSort end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 78 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 77 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4306,7 +3438,7 @@ i32.lt_s i32.sub ) - (func $std/array/isArraysEqual (; 79 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 78 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 f32) (local $4 i32) @@ -4367,7 +3499,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 80 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 79 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) @@ -4449,7 +3581,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 81 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 80 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) @@ -4705,7 +3837,7 @@ local.get $5 f64.store ) - (func $~lib/array/Array#sort (; 82 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 81 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 f64) @@ -4714,7 +3846,7 @@ if i32.const 0 i32.const 272 - i32.const 527 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -4773,7 +3905,7 @@ call $~lib/util/sort/weakHeapSort end ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 83 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 82 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -4802,7 +3934,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#__get (; 84 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 83 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -4812,7 +3944,7 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -4825,7 +3957,7 @@ i32.add f64.load ) - (func $std/array/isArraysEqual (; 85 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 84 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -4886,7 +4018,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 86 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 85 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4968,7 +4100,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 87 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 86 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5224,7 +4356,7 @@ local.get $1 i32.store ) - (func $~lib/array/Array#sort (; 88 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 87 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5233,7 +4365,7 @@ if i32.const 0 i32.const 272 - i32.const 527 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -5295,12 +4427,12 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 89 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 88 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 90 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 89 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -5309,14 +4441,14 @@ i32.lt_u i32.sub ) - (func $~lib/array/Array.create (; 91 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create (; 90 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 268435452 i32.gt_u if i32.const 0 i32.const 272 - i32.const 45 + i32.const 44 i32.const 62 call $~lib/env/abort unreachable @@ -5337,7 +4469,7 @@ i32.store offset=12 local.get $0 ) - (func $std/array/createReverseOrderedArray (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 91 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5366,14 +4498,14 @@ end local.get $2 ) - (func $~lib/math/NativeMath.random (; 93 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 92 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) global.get $~lib/math/random_seeded i32.eqz if i32.const 0 - i32.const 2992 + i32.const 3048 i32.const 1030 i32.const 24 call $~lib/env/abort @@ -5413,7 +4545,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5442,7 +4574,7 @@ end local.get $2 ) - (func $std/array/isSorted (; 95 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 94 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -5484,7 +4616,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 96 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 95 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -5500,17 +4632,17 @@ unreachable end ) - (func $std/array/assertSortedDefault (; 97 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 96 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 48 call $std/array/assertSorted ) - (func $start:std/array~anonymous|44 (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 97 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array.create<~lib/array/Array> (; 99 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array.create<~lib/array/Array> (; 98 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 512 i32.const 2 @@ -5528,7 +4660,7 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array<~lib/array/Array>#__set (; 100 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__set (; 99 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -5539,7 +4671,7 @@ if i32.const 0 i32.const 272 - i32.const 112 + i32.const 111 i32.const 38 call $~lib/env/abort unreachable @@ -5575,7 +4707,7 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedNestedArray (; 101 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 100 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5607,7 +4739,7 @@ end local.get $1 ) - (func $start:std/array~anonymous|47 (; 102 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 101 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -5616,7 +4748,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#sort (; 103 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#sort (; 102 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5625,7 +4757,7 @@ if i32.const 0 i32.const 272 - i32.const 527 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -5677,7 +4809,7 @@ call $~lib/util/sort/insertionSort local.get $0 ) - (func $~lib/array/Array<~lib/array/Array>#__get (; 104 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#__get (; 103 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -5685,7 +4817,7 @@ if i32.const 0 i32.const 272 - i32.const 97 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -5699,7 +4831,7 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -5712,7 +4844,7 @@ i32.add i32.load ) - (func $std/array/isSorted<~lib/array/Array> (; 105 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/array/Array> (; 104 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -5754,7 +4886,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/array/Array> (; 106 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/array/Array> (; 105 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#sort @@ -5770,7 +4902,7 @@ unreachable end ) - (func $~lib/array/Array.create> (; 107 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array.create> (; 106 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 512 i32.const 2 @@ -5788,7 +4920,7 @@ i32.store offset=12 local.get $0 ) - (func $std/array/createReverseOrderedElementsArray (; 108 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 107 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5821,14 +4953,14 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/util/string/compareImpl (; 110 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 109 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 @@ -5861,7 +4993,7 @@ end local.get $3 ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 111 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 110 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5937,7 +5069,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 112 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 111 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) block $1of1 block $0of1 @@ -5967,7 +5099,7 @@ unreachable end ) - (func $~lib/string/String.__eq (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 112 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -6013,7 +5145,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array/isArraysEqual<~lib/string/String | null> (; 114 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual<~lib/string/String | null> (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -6060,7 +5192,7 @@ end i32.const 1 ) - (func $~lib/array/Array.create<~lib/string/String> (; 115 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array.create<~lib/string/String> (; 114 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 400 i32.const 2 @@ -6078,16 +5210,16 @@ i32.store offset=12 local.get $0 ) - (func $~lib/string/String#charAt (; 116 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#charAt (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 3020 + i32.const 3076 i32.load i32.const 1 i32.shr_u i32.ge_u if - i32.const 4200 + i32.const 4256 return end i32.const 2 @@ -6096,7 +5228,7 @@ local.get $0 i32.const 1 i32.shl - i32.const 3032 + i32.const 3088 i32.add i32.load16_u i32.store16 @@ -6104,12 +5236,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String#concat (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $1 - i32.const 4424 + i32.const 4480 local.get $1 select local.tee $3 @@ -6134,7 +5266,7 @@ local.tee $2 i32.eqz if - i32.const 4200 + i32.const 4256 return end local.get $2 @@ -6153,18 +5285,18 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String.__concat (; 118 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 4424 + i32.const 4480 local.get $0 select local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 119 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 118 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - i32.const 4200 + i32.const 4256 local.set $1 loop $repeat|0 local.get $2 @@ -6173,7 +5305,7 @@ if local.get $1 call $~lib/math/NativeMath.random - i32.const 3020 + i32.const 3076 i32.load i32.const 1 i32.shr_u @@ -6193,7 +5325,7 @@ end local.get $1 ) - (func $std/array/createRandomStringArray (; 120 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createRandomStringArray (; 119 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) call $~lib/array/Array.create<~lib/string/String> @@ -6220,7 +5352,7 @@ end local.get $1 ) - (func $~lib/string/String#substring (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6228,7 +5360,7 @@ i32.eqz if i32.const 0 - i32.const 4376 + i32.const 4432 i32.const 197 i32.const 4 call $~lib/env/abort @@ -6280,7 +5412,7 @@ local.tee $3 i32.eqz if - i32.const 4200 + i32.const 4256 return end local.get $2 @@ -6316,14 +5448,14 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/runtime/runtime.discard (; 122 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 121 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 8060 + i32.const 8116 i32.le_u if i32.const 0 i32.const 80 - i32.const 103 + i32.const 68 i32.const 6 call $~lib/env/abort unreachable @@ -6337,13 +5469,13 @@ if i32.const 0 i32.const 80 - i32.const 105 + i32.const 70 i32.const 6 call $~lib/env/abort unreachable end ) - (func $~lib/array/Array#join_bool (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_bool (; 122 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6360,7 +5492,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -6369,14 +5501,14 @@ local.get $1 i32.eqz if - i32.const 4472 - i32.const 4496 + i32.const 4528 + i32.const 4552 local.get $3 i32.load8_u select return end - i32.const 4516 + i32.const 4572 i32.load i32.const 1 i32.shr_u @@ -6415,8 +5547,8 @@ i32.shl local.get $2 i32.add - i32.const 4472 - i32.const 4496 + i32.const 4528 + i32.const 4552 local.get $8 select local.get $6 @@ -6434,7 +5566,7 @@ i32.shl local.get $2 i32.add - i32.const 4528 + i32.const 4584 local.get $4 i32.const 1 i32.shl @@ -6467,8 +5599,8 @@ i32.shl local.get $2 i32.add - i32.const 4472 - i32.const 4496 + i32.const 4528 + i32.const 4552 local.get $3 select local.get $1 @@ -6495,7 +5627,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/decimalCount32 (; 124 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -6549,10 +5681,10 @@ end end ) - (func $~lib/util/number/utoa32_lut (; 125 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 124 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - i32.const 5092 + i32.const 5148 i32.load local.set $3 loop $continue|0 @@ -6659,14 +5791,14 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 126 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 125 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 i32.eqz if - i32.const 4648 + i32.const 4704 return end local.get $0 @@ -6701,7 +5833,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa_stream (; 127 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 126 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6745,7 +5877,7 @@ end local.get $2 ) - (func $~lib/array/Array#join_int (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6760,7 +5892,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -6863,18 +5995,18 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int ) - (func $~lib/util/number/utoa32 (; 130 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 129 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 i32.eqz if - i32.const 4648 + i32.const 4704 return end local.get $0 @@ -6891,7 +6023,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa_stream (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 130 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6915,7 +6047,7 @@ call $~lib/util/number/utoa32_lut local.get $0 ) - (func $~lib/array/Array#join_int (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 131 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6930,7 +6062,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -7033,12 +6165,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int ) - (func $~lib/util/number/genDigits (; 134 ;) (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 (; 133 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -7073,7 +6205,7 @@ local.tee $7 call $~lib/util/number/decimalCount32 local.set $4 - i32.const 6644 + i32.const 6700 i32.load local.set $13 loop $continue|0 @@ -7453,7 +6585,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 135 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 134 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -7712,7 +6844,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 136 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 135 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -7828,7 +6960,7 @@ i32.shl i32.sub global.set $~lib/util/number/_K - i32.const 6332 + i32.const 6388 i32.load local.get $3 i32.const 3 @@ -7836,7 +6968,7 @@ i32.add i64.load global.set $~lib/util/number/_frc_pow - i32.const 6556 + i32.const 6612 i32.load local.get $3 i32.const 1 @@ -8000,14 +7132,14 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 137 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 136 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 f64.const 0 f64.eq if - i32.const 5496 + i32.const 5552 return end local.get $0 @@ -8020,11 +7152,11 @@ local.get $0 f64.ne if - i32.const 5520 + i32.const 5576 return end - i32.const 5544 - i32.const 5584 + i32.const 5600 + i32.const 5640 local.get $0 f64.const 0 f64.lt @@ -8045,7 +7177,7 @@ call $~lib/runtime/runtime.discard local.get $1 ) - (func $~lib/util/number/dtoa_stream (; 138 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 137 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -8099,8 +7231,8 @@ i32.add local.set $1 local.get $0 - i32.const 5544 - i32.const 5584 + i32.const 5600 + i32.const 5640 local.get $3 select local.get $1 @@ -8116,7 +7248,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join_flt (; 139 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_flt (; 138 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8131,7 +7263,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -8145,7 +7277,7 @@ call $~lib/util/number/dtoa return end - i32.const 5460 + i32.const 5516 i32.load i32.const 1 i32.shr_u @@ -8187,7 +7319,7 @@ i32.shl local.get $1 i32.add - i32.const 5472 + i32.const 5528 local.get $4 i32.const 1 i32.shl @@ -8232,7 +7364,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/string/String>#join_str (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join_str (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8247,7 +7379,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -8402,18 +7534,18 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/string/String>#join (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String>#join_str ) - (func $std/array/Ref#constructor (; 142 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/Ref#constructor (; 141 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/runtime.allocate i32.const 19 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join_ref (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_ref (; 142 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8428,7 +7560,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -8437,10 +7569,10 @@ local.get $2 i32.eqz if - i32.const 6920 + i32.const 6976 return end - i32.const 4516 + i32.const 4572 i32.load i32.const 1 i32.shr_u @@ -8475,7 +7607,7 @@ i32.shl local.get $1 i32.add - i32.const 6920 + i32.const 6976 i32.const 30 call $~lib/memory/memory.copy local.get $0 @@ -8490,7 +7622,7 @@ i32.shl local.get $1 i32.add - i32.const 4528 + i32.const 4584 local.get $3 i32.const 1 i32.shl @@ -8520,7 +7652,7 @@ i32.shl local.get $1 i32.add - i32.const 6920 + i32.const 6976 i32.const 30 call $~lib/memory/memory.copy local.get $0 @@ -8546,12 +7678,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#toString (; 144 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4528 + i32.const 4584 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa_stream (; 145 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 144 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -8606,7 +7738,7 @@ end local.get $2 ) - (func $~lib/array/Array#join_int (; 146 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8621,7 +7753,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -8635,7 +7767,7 @@ call $~lib/util/number/itoa32 return end - i32.const 4516 + i32.const 4572 i32.load i32.const 1 i32.shr_u @@ -8675,7 +7807,7 @@ i32.shl local.get $1 i32.add - i32.const 4528 + i32.const 4584 local.get $4 i32.const 1 i32.shl @@ -8718,7 +7850,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa_stream (; 147 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 146 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -8748,7 +7880,7 @@ call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join_int (; 148 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 147 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8763,7 +7895,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -8777,7 +7909,7 @@ call $~lib/util/number/utoa32 return end - i32.const 4516 + i32.const 4572 i32.load i32.const 1 i32.shr_u @@ -8819,7 +7951,7 @@ i32.shl local.get $1 i32.add - i32.const 4528 + i32.const 4584 local.get $4 i32.const 1 i32.shl @@ -8864,7 +7996,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/decimalCount64 (; 149 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 148 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -8918,12 +8050,12 @@ end end ) - (func $~lib/util/number/utoa64_lut (; 150 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 149 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 5092 + i32.const 5148 i32.load local.set $3 loop $continue|0 @@ -9015,14 +8147,14 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 151 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 150 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 i64.eqz if - i32.const 4648 + i32.const 4704 return end local.get $0 @@ -9057,7 +8189,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa_stream (; 152 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 151 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -9097,7 +8229,7 @@ end local.get $1 ) - (func $~lib/array/Array#join_int (; 153 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 152 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9112,7 +8244,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -9126,7 +8258,7 @@ call $~lib/util/number/utoa64 return end - i32.const 4516 + i32.const 4572 i32.load i32.const 1 i32.shr_u @@ -9168,7 +8300,7 @@ i32.shl local.get $1 i32.add - i32.const 4528 + i32.const 4584 local.get $4 i32.const 1 i32.shl @@ -9213,7 +8345,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa64 (; 154 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 153 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9221,7 +8353,7 @@ local.get $0 i64.eqz if - i32.const 4648 + i32.const 4704 return end block (result i32) @@ -9278,7 +8410,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa_stream (; 155 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 154 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -9341,7 +8473,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 155 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9356,7 +8488,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -9370,7 +8502,7 @@ call $~lib/util/number/itoa64 return end - i32.const 4516 + i32.const 4572 i32.load i32.const 1 i32.shr_u @@ -9412,7 +8544,7 @@ i32.shl local.get $1 i32.add - i32.const 4528 + i32.const 4584 local.get $4 i32.const 1 i32.shl @@ -9457,12 +8589,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/string/String | null>#toString (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#toString (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4528 + i32.const 4584 call $~lib/array/Array<~lib/string/String>#join ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 158 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9476,12 +8608,12 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end - i32.const 4200 + i32.const 4256 local.set $1 - i32.const 4516 + i32.const 4572 i32.load i32.const 1 i32.shr_u @@ -9497,10 +8629,10 @@ local.tee $0 if (result i32) local.get $0 - i32.const 4528 + i32.const 4584 call $~lib/array/Array#join else - i32.const 4200 + i32.const 4256 end return end @@ -9521,7 +8653,7 @@ if local.get $1 local.get $5 - i32.const 4528 + i32.const 4584 call $~lib/array/Array#join call $~lib/string/String.__concat local.set $1 @@ -9529,7 +8661,7 @@ local.get $4 if local.get $1 - i32.const 4528 + i32.const 4584 call $~lib/string/String.__concat local.set $1 end @@ -9550,14 +8682,14 @@ if (result i32) local.get $1 local.get $0 - i32.const 4528 + i32.const 4584 call $~lib/array/Array#join call $~lib/string/String.__concat else local.get $1 end ) - (func $~lib/util/number/itoa_stream (; 159 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 158 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -9587,7 +8719,7 @@ call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join_int (; 160 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 159 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9602,7 +8734,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -9616,7 +8748,7 @@ call $~lib/util/number/utoa32 return end - i32.const 4516 + i32.const 4572 i32.load i32.const 1 i32.shr_u @@ -9656,7 +8788,7 @@ i32.shl local.get $1 i32.add - i32.const 4528 + i32.const 4584 local.get $4 i32.const 1 i32.shl @@ -9699,7 +8831,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 161 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 160 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9713,12 +8845,12 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end - i32.const 4200 + i32.const 4256 local.set $1 - i32.const 4516 + i32.const 4572 i32.load i32.const 1 i32.shr_u @@ -9736,7 +8868,7 @@ local.get $0 call $~lib/array/Array#join_int else - i32.const 4200 + i32.const 4256 end return end @@ -9764,7 +8896,7 @@ local.get $4 if local.get $1 - i32.const 4528 + i32.const 4584 call $~lib/string/String.__concat local.set $1 end @@ -9791,7 +8923,7 @@ local.get $1 end ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 161 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9805,12 +8937,12 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end - i32.const 4200 + i32.const 4256 local.set $1 - i32.const 4516 + i32.const 4572 i32.load i32.const 1 i32.shr_u @@ -9826,10 +8958,10 @@ local.tee $0 if (result i32) local.get $0 - i32.const 4528 + i32.const 4584 call $~lib/array/Array#join else - i32.const 4200 + i32.const 4256 end return end @@ -9850,7 +8982,7 @@ if local.get $1 local.get $5 - i32.const 4528 + i32.const 4584 call $~lib/array/Array#join call $~lib/string/String.__concat local.set $1 @@ -9858,7 +8990,7 @@ local.get $4 if local.get $1 - i32.const 4528 + i32.const 4584 call $~lib/string/String.__concat local.set $1 end @@ -9879,14 +9011,14 @@ if (result i32) local.get $1 local.get $0 - i32.const 4528 + i32.const 4584 call $~lib/array/Array#join call $~lib/string/String.__concat else local.get $1 end ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 163 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9900,12 +9032,12 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end - i32.const 4200 + i32.const 4256 local.set $1 - i32.const 4516 + i32.const 4572 i32.load i32.const 1 i32.shr_u @@ -9923,7 +9055,7 @@ local.get $0 call $~lib/array/Array<~lib/array/Array>#join_arr else - i32.const 4200 + i32.const 4256 end return end @@ -9951,7 +9083,7 @@ local.get $4 if local.get $1 - i32.const 4528 + i32.const 4584 call $~lib/string/String.__concat local.set $1 end @@ -9978,11 +9110,11 @@ local.get $1 end ) - (func $start:std/array (; 164 ;) (type $FUNCSIG$v) + (func $start:std/array (; 163 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) - i32.const 8064 + i32.const 8120 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -10574,7 +9706,7 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 688 + i32.const 744 call $~lib/runtime/runtime.newArray call $~lib/array/Array#concat drop @@ -10833,7 +9965,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 752 + i32.const 808 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10844,7 +9976,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 792 + i32.const 848 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -10860,7 +9992,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 832 + i32.const 888 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10871,7 +10003,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 872 + i32.const 928 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -10887,7 +10019,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 912 + i32.const 968 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10898,7 +10030,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 952 + i32.const 1008 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -10914,7 +10046,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 992 + i32.const 1048 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10925,7 +10057,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1032 + i32.const 1088 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -10941,7 +10073,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1072 + i32.const 1128 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10952,7 +10084,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1112 + i32.const 1168 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -10968,7 +10100,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1152 + i32.const 1208 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10979,7 +10111,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1192 + i32.const 1248 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -10995,7 +10127,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1232 + i32.const 1288 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -11006,7 +10138,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1272 + i32.const 1328 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -11022,7 +10154,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1312 + i32.const 1368 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -11033,7 +10165,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1352 + i32.const 1408 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -11049,7 +10181,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1392 + i32.const 1448 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -11060,7 +10192,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1432 + i32.const 1488 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -11076,7 +10208,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1472 + i32.const 1528 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -11087,7 +10219,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1512 + i32.const 1568 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -11103,7 +10235,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1552 + i32.const 1608 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -11114,7 +10246,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1592 + i32.const 1648 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -11130,7 +10262,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1632 + i32.const 1688 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -11141,7 +10273,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1672 + i32.const 1728 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -11969,7 +11101,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1784 + i32.const 1840 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -11986,7 +11118,7 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 1824 + i32.const 1880 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12002,7 +11134,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1840 + i32.const 1896 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -12012,7 +11144,7 @@ i32.const 3 i32.const 2 i32.const 4 - i32.const 1880 + i32.const 1936 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12029,7 +11161,7 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 1912 + i32.const 1968 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12045,7 +11177,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1936 + i32.const 1992 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -12055,7 +11187,7 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 1976 + i32.const 2032 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12072,7 +11204,7 @@ i32.const 3 i32.const 2 i32.const 4 - i32.const 2000 + i32.const 2056 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12088,7 +11220,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2032 + i32.const 2088 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -12098,7 +11230,7 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 2072 + i32.const 2128 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12115,7 +11247,7 @@ i32.const 4 i32.const 2 i32.const 4 - i32.const 2096 + i32.const 2152 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12131,7 +11263,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2128 + i32.const 2184 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -12141,7 +11273,7 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 2168 + i32.const 2224 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12158,7 +11290,7 @@ i32.const 4 i32.const 2 i32.const 4 - i32.const 2192 + i32.const 2248 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12174,7 +11306,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2224 + i32.const 2280 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -12184,7 +11316,7 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 2264 + i32.const 2320 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12201,7 +11333,7 @@ i32.const 3 i32.const 2 i32.const 4 - i32.const 2288 + i32.const 2344 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12217,7 +11349,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2320 + i32.const 2376 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -12227,7 +11359,7 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 2360 + i32.const 2416 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12244,7 +11376,7 @@ i32.const 4 i32.const 2 i32.const 4 - i32.const 2384 + i32.const 2440 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12260,7 +11392,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2416 + i32.const 2472 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -12270,7 +11402,7 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 2456 + i32.const 2512 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12287,7 +11419,7 @@ i32.const 4 i32.const 2 i32.const 4 - i32.const 2480 + i32.const 2536 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12303,7 +11435,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2512 + i32.const 2568 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -12313,7 +11445,7 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2552 + i32.const 2608 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12330,7 +11462,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2568 + i32.const 2624 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12346,7 +11478,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2608 + i32.const 2664 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -12356,7 +11488,7 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2648 + i32.const 2704 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12373,7 +11505,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2664 + i32.const 2720 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12389,7 +11521,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2704 + i32.const 2760 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -12399,7 +11531,7 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2744 + i32.const 2800 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12416,7 +11548,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2760 + i32.const 2816 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12432,7 +11564,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2800 + i32.const 2856 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -12442,7 +11574,7 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2840 + i32.const 2896 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12459,7 +11591,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2856 + i32.const 2912 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12475,7 +11607,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2896 + i32.const 2952 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -12485,7 +11617,7 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2936 + i32.const 2992 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -12502,7 +11634,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2952 + i32.const 3008 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -13606,7 +12738,7 @@ i32.const 8 i32.const 2 i32.const 9 - i32.const 3304 + i32.const 3360 call $~lib/runtime/runtime.newArray call $std/array/isArraysEqual i32.eqz @@ -13642,7 +12774,7 @@ i32.const 8 i32.const 3 i32.const 10 - i32.const 3464 + i32.const 3520 call $~lib/runtime/runtime.newArray call $std/array/isArraysEqual i32.eqz @@ -13679,7 +12811,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 3616 + i32.const 3672 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -13717,7 +12849,7 @@ i32.const 5 i32.const 2 i32.const 8 - i32.const 3728 + i32.const 3784 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -13753,7 +12885,7 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 4056 + i32.const 4112 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -13772,7 +12904,7 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 4080 + i32.const 4136 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -13933,10 +13065,10 @@ i32.const 2 i32.const 0 i32.const 16 - i32.const 4552 + i32.const 4608 call $~lib/runtime/runtime.newArray call $~lib/array/Array#join_bool - i32.const 4576 + i32.const 4632 call $~lib/string/String.__eq i32.eqz if @@ -13950,11 +13082,11 @@ i32.const 3 i32.const 2 i32.const 4 - i32.const 5120 + i32.const 5176 call $~lib/runtime/runtime.newArray - i32.const 4200 + i32.const 4256 call $~lib/array/Array#join - i32.const 5152 + i32.const 5208 call $~lib/string/String.__eq i32.eqz if @@ -13968,11 +13100,11 @@ i32.const 3 i32.const 2 i32.const 8 - i32.const 5240 + i32.const 5296 call $~lib/runtime/runtime.newArray - i32.const 5216 + i32.const 5272 call $~lib/array/Array#join - i32.const 5152 + i32.const 5208 call $~lib/string/String.__eq i32.eqz if @@ -13986,11 +13118,11 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 5320 + i32.const 5376 call $~lib/runtime/runtime.newArray - i32.const 5296 + i32.const 5352 call $~lib/array/Array#join - i32.const 5344 + i32.const 5400 call $~lib/string/String.__eq i32.eqz if @@ -14004,10 +13136,10 @@ i32.const 6 i32.const 3 i32.const 10 - i32.const 6672 + i32.const 6728 call $~lib/runtime/runtime.newArray call $~lib/array/Array#join_flt - i32.const 6736 + i32.const 6792 call $~lib/string/String.__eq i32.eqz if @@ -14021,11 +13153,11 @@ i32.const 3 i32.const 2 i32.const 15 - i32.const 6888 + i32.const 6944 call $~lib/runtime/runtime.newArray - i32.const 4200 + i32.const 4256 call $~lib/array/Array<~lib/string/String>#join - i32.const 6832 + i32.const 6888 call $~lib/string/String.__eq i32.eqz if @@ -14056,7 +13188,7 @@ global.set $std/array/refArr global.get $std/array/refArr call $~lib/array/Array#join_ref - i32.const 6968 + i32.const 7024 call $~lib/string/String.__eq i32.eqz if @@ -14069,7 +13201,7 @@ end global.get $std/array/reversed0 call $~lib/array/Array#toString - i32.const 4200 + i32.const 4256 call $~lib/string/String.__eq i32.eqz if @@ -14082,7 +13214,7 @@ end global.get $std/array/reversed1 call $~lib/array/Array#toString - i32.const 6832 + i32.const 6888 call $~lib/string/String.__eq i32.eqz if @@ -14095,7 +13227,7 @@ end global.get $std/array/reversed2 call $~lib/array/Array#toString - i32.const 7048 + i32.const 7104 call $~lib/string/String.__eq i32.eqz if @@ -14108,7 +13240,7 @@ end global.get $std/array/reversed4 call $~lib/array/Array#toString - i32.const 7072 + i32.const 7128 call $~lib/string/String.__eq i32.eqz if @@ -14122,10 +13254,10 @@ i32.const 3 i32.const 0 i32.const 21 - i32.const 7128 + i32.const 7184 call $~lib/runtime/runtime.newArray call $~lib/array/Array#join_int - i32.const 7152 + i32.const 7208 call $~lib/string/String.__eq i32.eqz if @@ -14139,10 +13271,10 @@ i32.const 3 i32.const 1 i32.const 22 - i32.const 7208 + i32.const 7264 call $~lib/runtime/runtime.newArray call $~lib/array/Array#join_int - i32.const 7232 + i32.const 7288 call $~lib/string/String.__eq i32.eqz if @@ -14156,10 +13288,10 @@ i32.const 3 i32.const 3 i32.const 17 - i32.const 7312 + i32.const 7368 call $~lib/runtime/runtime.newArray call $~lib/array/Array#join_int - i32.const 7352 + i32.const 7408 call $~lib/string/String.__eq i32.eqz if @@ -14173,10 +13305,10 @@ i32.const 4 i32.const 3 i32.const 23 - i32.const 7464 + i32.const 7520 call $~lib/runtime/runtime.newArray call $~lib/array/Array#join_int - i32.const 7512 + i32.const 7568 call $~lib/string/String.__eq i32.eqz if @@ -14189,7 +13321,7 @@ end global.get $std/array/randomStringsExpected call $~lib/array/Array<~lib/string/String | null>#toString - i32.const 7616 + i32.const 7672 call $~lib/string/String.__eq i32.eqz if @@ -14203,10 +13335,10 @@ i32.const 4 i32.const 2 i32.const 15 - i32.const 7744 + i32.const 7800 call $~lib/runtime/runtime.newArray call $~lib/array/Array<~lib/string/String | null>#toString - i32.const 7776 + i32.const 7832 call $~lib/string/String.__eq i32.eqz if @@ -14228,21 +13360,21 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 7832 + i32.const 7888 call $~lib/runtime/runtime.newArray i32.store local.get $1 i32.const 2 i32.const 2 i32.const 4 - i32.const 7856 + i32.const 7912 call $~lib/runtime/runtime.newArray i32.store offset=4 local.get $0 global.set $std/array/subarr32 global.get $std/array/subarr32 call $~lib/array/Array<~lib/array/Array>#join_arr - i32.const 7880 + i32.const 7936 call $~lib/string/String.__eq i32.eqz if @@ -14264,21 +13396,21 @@ i32.const 2 i32.const 0 i32.const 7 - i32.const 7936 + i32.const 7992 call $~lib/runtime/runtime.newArray i32.store local.get $1 i32.const 2 i32.const 0 i32.const 7 - i32.const 7960 + i32.const 8016 call $~lib/runtime/runtime.newArray i32.store offset=4 local.get $0 global.set $std/array/subarr8 global.get $std/array/subarr8 call $~lib/array/Array<~lib/array/Array>#join_arr - i32.const 7880 + i32.const 7936 call $~lib/string/String.__eq i32.eqz if @@ -14307,7 +13439,7 @@ i32.const 1 i32.const 2 i32.const 8 - i32.const 8056 + i32.const 8112 call $~lib/runtime/runtime.newArray i32.store local.get $1 @@ -14317,7 +13449,7 @@ global.set $std/array/subarrU32 global.get $std/array/subarrU32 call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr - i32.const 6832 + i32.const 6888 call $~lib/string/String.__eq i32.eqz if @@ -14329,7 +13461,7 @@ unreachable end ) - (func $std/array/main (; 165 ;) (type $FUNCSIG$v) + (func $std/array/main (; 164 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -14338,7 +13470,7 @@ global.set $~lib/started end ) - (func $null (; 166 ;) (type $FUNCSIG$v) + (func $null (; 165 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index c975237cd1..2f923bf805 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -48,179 +48,180 @@ (data (i32.const 552) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 592) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") (data (i32.const 632) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") - (data (i32.const 672) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 688) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 704) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c0\02\00\00\c0\02\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 736) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 776) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 816) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 856) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 896) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 936) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00") - (data (i32.const 976) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1016) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1056) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1096) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1136) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1176) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1216) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1256) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1296) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1336) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1376) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1416) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1456) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1496) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1536) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1576) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1616) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1656) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00") - (data (i32.const 1696) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1736) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\b0\06\00\00\b0\06\00\00\14\00\00\00\05\00\00\00") - (data (i32.const 1768) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1808) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 672) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 728) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 744) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 760) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\f8\02\00\00\f8\02\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 792) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 832) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 872) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 912) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 952) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 992) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00") + (data (i32.const 1032) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1072) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1112) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1152) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1192) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1232) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1272) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1312) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1352) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1392) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1432) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1472) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1512) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1552) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1592) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1632) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1672) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1712) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00") + (data (i32.const 1752) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1792) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\e8\06\00\00\e8\06\00\00\14\00\00\00\05\00\00\00") (data (i32.const 1824) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1864) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1896) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 1920) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1960) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00") - (data (i32.const 1984) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\05\00\00\00") - (data (i32.const 2016) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2056) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") - (data (i32.const 2080) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2112) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2152) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00") - (data (i32.const 2176) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00") - (data (i32.const 2208) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2248) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2272) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") - (data (i32.const 2304) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2344) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00") - (data (i32.const 2368) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05\00\00\00") - (data (i32.const 2400) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2440) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") - (data (i32.const 2464) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2496) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2536) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1864) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1880) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1920) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1952) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 1976) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2016) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00") + (data (i32.const 2040) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\05\00\00\00") + (data (i32.const 2072) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2112) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") + (data (i32.const 2136) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2168) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2208) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00") + (data (i32.const 2232) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00") + (data (i32.const 2264) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2304) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2328) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 2360) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2400) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00") + (data (i32.const 2424) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05\00\00\00") + (data (i32.const 2456) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2496) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") + (data (i32.const 2520) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") (data (i32.const 2552) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2592) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2632) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2592) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2608) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") (data (i32.const 2648) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2688) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2728) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2688) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2704) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") (data (i32.const 2744) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2784) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2824) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2784) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2800) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") (data (i32.const 2840) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2880) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2920) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2880) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2896) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") (data (i32.const 2936) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2976) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") - (data (i32.const 3016) "\01\00\00\00\ac\00\00\00\00\00\00\00\00\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?\00") - (data (i32.const 3208) "\02\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") - (data (i32.const 3256) "\t\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\98\0c\00\00\98\0c\00\00 \00\00\00\08\00\00\00") - (data (i32.const 3288) "\02\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") - (data (i32.const 3336) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") - (data (i32.const 3416) "\n\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\18\0d\00\00\18\0d\00\00@\00\00\00\08\00\00\00") - (data (i32.const 3448) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") - (data (i32.const 3528) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02\00\00\00") - (data (i32.const 3568) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\d8\0d\00\00\d8\0d\00\00\14\00\00\00\05\00\00\00") - (data (i32.const 3600) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 3640) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02\00\00\00") - (data (i32.const 3680) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00H\0e\00\00H\0e\00\00\14\00\00\00\05\00\00\00") - (data (i32.const 3712) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") - (data (i32.const 3752) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3768) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\b8\0e\00\00\b8\0e\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3800) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") - (data (i32.const 3824) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\e8\0e\00\00\e8\0e\00\00\04\00\00\00\01\00\00\00") - (data (i32.const 3856) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\01\00\00\00") - (data (i32.const 3880) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00 \0f\00\00 \0f\00\00\08\00\00\00\02\00\00\00") - (data (i32.const 3912) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 3944) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00X\0f\00\00X\0f\00\00\10\00\00\00\04\00\00\00") - (data (i32.const 3976) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") - (data (i32.const 4008) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\98\0f\00\00\98\0f\00\00\10\00\00\00\04\00\00\00") - (data (i32.const 4040) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") - (data (i32.const 4064) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 4088) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00a\00") - (data (i32.const 4112) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00b\00") - (data (i32.const 4136) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00a\00b\00") - (data (i32.const 4160) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00b\00a\00") - (data (i32.const 4184) "\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4200) "\02\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00\08\10\00\00 \10\00\00\08\10\00\008\10\00\00P\10\00\00h\10\00\00\00\00\00\00") - (data (i32.const 4248) "\0e\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00x\10\00\00x\10\00\00\1c\00\00\00\07\00\00\00") - (data (i32.const 4280) "\02\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00h\10\00\00\08\10\00\00\08\10\00\008\10\00\00 \10\00\00P\10\00\00\00\00\00\00") - (data (i32.const 4328) "\0e\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c8\10\00\00\c8\10\00\00\1c\00\00\00\07\00\00\00") - (data (i32.const 4360) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 4408) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00n\00u\00l\00l\00") - (data (i32.const 4432) "\02\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\01\00") - (data (i32.const 4456) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00t\00r\00u\00e\00") - (data (i32.const 4480) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00f\00a\00l\00s\00e\00") - (data (i32.const 4512) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00,\00") - (data (i32.const 4536) "\02\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\01\00") - (data (i32.const 4560) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e\00") - (data (i32.const 4600) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 4632) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\000\00") - (data (i32.const 4656) "\02\00\00\00\90\01\00\00\00\00\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") - (data (i32.const 5072) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00@\12\00\00@\12\00\00\90\01\00\00d\00\00\00") - (data (i32.const 5104) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 5136) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\001\00-\002\00-\003\00") - (data (i32.const 5168) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") - (data (i32.const 5200) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00-\00") + (data (i32.const 2976) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2992) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 3032) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") + (data (i32.const 3072) "\01\00\00\00\ac\00\00\00\00\00\00\00\00\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?\00") + (data (i32.const 3264) "\02\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") + (data (i32.const 3312) "\t\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\d0\0c\00\00\d0\0c\00\00 \00\00\00\08\00\00\00") + (data (i32.const 3344) "\02\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") + (data (i32.const 3392) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") + (data (i32.const 3472) "\n\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00P\0d\00\00P\0d\00\00@\00\00\00\08\00\00\00") + (data (i32.const 3504) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") + (data (i32.const 3584) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02\00\00\00") + (data (i32.const 3624) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\10\0e\00\00\10\0e\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 3656) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 3696) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02\00\00\00") + (data (i32.const 3736) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\80\0e\00\00\80\0e\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 3768) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") + (data (i32.const 3808) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 3824) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\f0\0e\00\00\f0\0e\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 3856) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") + (data (i32.const 3880) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00 \0f\00\00 \0f\00\00\04\00\00\00\01\00\00\00") + (data (i32.const 3912) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\01\00\00\00") + (data (i32.const 3936) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00X\0f\00\00X\0f\00\00\08\00\00\00\02\00\00\00") + (data (i32.const 3968) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01\00\00\00\00\00\00\00") + (data (i32.const 4000) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\90\0f\00\00\90\0f\00\00\10\00\00\00\04\00\00\00") + (data (i32.const 4032) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 4064) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\d0\0f\00\00\d0\0f\00\00\10\00\00\00\04\00\00\00") + (data (i32.const 4096) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") + (data (i32.const 4120) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 4144) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00a\00") + (data (i32.const 4168) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00b\00") + (data (i32.const 4192) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00a\00b\00") + (data (i32.const 4216) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00b\00a\00") + (data (i32.const 4240) "\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 4256) "\02\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00@\10\00\00X\10\00\00@\10\00\00p\10\00\00\88\10\00\00\a0\10\00\00\00\00\00\00") + (data (i32.const 4304) "\0e\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\b0\10\00\00\b0\10\00\00\1c\00\00\00\07\00\00\00") + (data (i32.const 4336) "\02\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00\a0\10\00\00@\10\00\00@\10\00\00p\10\00\00X\10\00\00\88\10\00\00\00\00\00\00") + (data (i32.const 4384) "\0e\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\11\00\00\1c\00\00\00\07\00\00\00") + (data (i32.const 4416) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 4464) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00n\00u\00l\00l\00") + (data (i32.const 4488) "\02\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\01\00") + (data (i32.const 4512) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00t\00r\00u\00e\00") + (data (i32.const 4536) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00f\00a\00l\00s\00e\00") + (data (i32.const 4568) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00,\00") + (data (i32.const 4592) "\02\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\01\00") + (data (i32.const 4616) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e\00") + (data (i32.const 4656) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 4688) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\000\00") + (data (i32.const 4712) "\02\00\00\00\90\01\00\00\00\00\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") + (data (i32.const 5128) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00x\12\00\00x\12\00\00\90\01\00\00d\00\00\00") + (data (i32.const 5160) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 5192) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\001\00-\002\00-\003\00") (data (i32.const 5224) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") - (data (i32.const 5256) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\00\00\00\80") - (data (i32.const 5280) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00_\00_\00") - (data (i32.const 5304) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\00\00\00\80") - (data (i32.const 5328) "\01\00\00\000\00\00\00\00\00\00\00\00\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 5392) "\02\00\00\000\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") - (data (i32.const 5456) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00,\00 \00") - (data (i32.const 5480) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\000\00.\000\00") - (data (i32.const 5504) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00N\00a\00N\00") - (data (i32.const 5528) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 5568) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 5600) "\02\00\00\00\b8\02\00\00\00\00\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -239,10 +240,10 @@ (global $std/array/i (mut i32) (i32.const 0)) (global $std/array/other (mut i32) (i32.const 0)) (global $std/array/out (mut i32) (i32.const 0)) - (global $std/array/source (mut i32) (i32.const 720)) + (global $std/array/source (mut i32) (i32.const 776)) (global $std/array/cwArr (mut i32) (i32.const 0)) (global $std/array/includes (mut i32) (i32.const 0)) - (global $std/array/sarr (mut i32) (i32.const 1752)) + (global $std/array/sarr (mut i32) (i32.const 1808)) (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/every (mut i32) (i32.const 0)) (global $std/array/some (mut i32) (i32.const 0)) @@ -254,16 +255,16 @@ (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) (global $~lib/math/random_state0_32 (mut i32) (i32.const 0)) (global $~lib/math/random_state1_32 (mut i32) (i32.const 0)) - (global $std/array/charset i32 (i32.const 3032)) - (global $std/array/f32ArrayTyped (mut i32) (i32.const 3272)) - (global $std/array/f64ArrayTyped (mut i32) (i32.const 3432)) - (global $std/array/i32ArrayTyped (mut i32) (i32.const 3584)) - (global $std/array/u32ArrayTyped (mut i32) (i32.const 3696)) - (global $std/array/reversed0 (mut i32) (i32.const 3784)) - (global $std/array/reversed1 (mut i32) (i32.const 3840)) - (global $std/array/reversed2 (mut i32) (i32.const 3896)) - (global $std/array/reversed4 (mut i32) (i32.const 3960)) - (global $std/array/expected4 (mut i32) (i32.const 4024)) + (global $std/array/charset i32 (i32.const 3088)) + (global $std/array/f32ArrayTyped (mut i32) (i32.const 3328)) + (global $std/array/f64ArrayTyped (mut i32) (i32.const 3488)) + (global $std/array/i32ArrayTyped (mut i32) (i32.const 3640)) + (global $std/array/u32ArrayTyped (mut i32) (i32.const 3752)) + (global $std/array/reversed0 (mut i32) (i32.const 3840)) + (global $std/array/reversed1 (mut i32) (i32.const 3896)) + (global $std/array/reversed2 (mut i32) (i32.const 3952)) + (global $std/array/reversed4 (mut i32) (i32.const 4016)) + (global $std/array/expected4 (mut i32) (i32.const 4080)) (global $std/array/reversed64 (mut i32) (i32.const 0)) (global $std/array/reversed128 (mut i32) (i32.const 0)) (global $std/array/reversed1024 (mut i32) (i32.const 0)) @@ -273,8 +274,8 @@ (global $std/array/randomized257 (mut i32) (i32.const 0)) (global $std/array/reversedNested512 (mut i32) (i32.const 0)) (global $std/array/reversedElements512 (mut i32) (i32.const 0)) - (global $std/array/randomStringsActual (mut i32) (i32.const 4264)) - (global $std/array/randomStringsExpected (mut i32) (i32.const 4344)) + (global $std/array/randomStringsActual (mut i32) (i32.const 4320)) + (global $std/array/randomStringsExpected (mut i32) (i32.const 4400)) (global $std/array/randomStrings400 (mut i32) (i32.const 0)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) @@ -291,7 +292,7 @@ (global $std/array/subarr8 (mut i32) (i32.const 0)) (global $std/array/subarrU32 (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8060)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 8116)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -684,7 +685,7 @@ if i32.const 0 i32.const 80 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -701,7 +702,7 @@ if i32.const 0 i32.const 80 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -911,1302 +912,101 @@ ) (func $~lib/array/Array.isArray (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 - if (result i32) - local.get $0 - i32.const 0 - i32.ne - else - i32.const 0 - end - ) - (func $~lib/array/Array.isArray<~lib/string/String> (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 - if (result i32) - local.get $0 - i32.const 0 - i32.ne - else - i32.const 0 - end - ) - (func $~lib/array/Array#fill (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - i32.load offset=4 - local.set $4 - local.get $0 - i32.load offset=12 - local.set $5 - local.get $2 - i32.const 0 - i32.lt_s - if (result i32) - local.get $5 - local.get $2 - i32.add - local.tee $6 - i32.const 0 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - else - local.get $2 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.lt_s - select - end - local.set $2 - local.get $3 - i32.const 0 - i32.lt_s - if (result i32) - local.get $5 - local.get $3 - i32.add - local.tee $6 - i32.const 0 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - else - local.get $3 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.lt_s - select - end - local.set $3 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $4 - local.get $2 - i32.add - local.get $1 - local.get $3 - local.get $2 - i32.sub - call $~lib/memory/memory.fill - end - local.get $0 - ) - (func $~lib/util/memory/memcpy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 + if (result i32) + local.get $0 + i32.const 0 + i32.ne + else + i32.const 0 + end + ) + (func $~lib/array/Array.isArray<~lib/string/String> (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + if (result i32) + local.get $0 + i32.const 0 + i32.ne + else + i32.const 0 end + ) + (func $~lib/array/Array#fill (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=12 + local.set $5 local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 + i32.const 0 + i32.lt_s + if (result i32) + local.get $5 + local.get $2 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + else + local.get $2 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + end + local.set $2 + local.get $3 + i32.const 0 + i32.lt_s + if (result i32) + local.get $5 + local.get $3 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + else + local.get $3 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select end + local.set $3 local.get $2 - i32.const 1 - i32.and + local.get $3 + i32.lt_s if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 + local.get $4 + local.get $2 + i32.add + local.get $1 + local.get $3 + local.get $2 + i32.sub + call $~lib/memory/memory.fill end + local.get $0 ) - (func $~lib/memory/memory.copy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2217,28 +1017,6 @@ if br $~lib/util/memory/memmove|inlined.0 end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -2437,7 +1215,7 @@ end end ) - (func $~lib/runtime/runtime.newArray (; 25 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 24 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2499,11 +1277,11 @@ end local.get $4 ) - (func $~lib/array/Array#get:length (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -2512,7 +1290,7 @@ i32.add i32.load8_u ) - (func $~lib/array/Array#__get (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2522,7 +1300,7 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -2531,7 +1309,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/array/isArraysEqual (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2586,7 +1364,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 30 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 29 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2672,11 +1450,11 @@ end local.get $0 ) - (func $~lib/array/Array#get:length (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -2685,7 +1463,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2695,7 +1473,7 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -2704,7 +1482,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/array/isArraysEqual (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2759,17 +1537,17 @@ end i32.const 1 ) - (func $~lib/array/Array#get:length (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/util/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $std/array/internalCapacity (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/internalCapacity (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -2779,14 +1557,14 @@ i32.const 2 i32.shr_s ) - (func $~lib/allocator/arena/__mem_free (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/runtime.reallocate (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/reallocate (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2856,9 +1634,9 @@ i32.eqz if i32.const 0 - i32.const 80 - i32.const 77 - i32.const 10 + i32.const 688 + i32.const 74 + i32.const 8 call $~lib/env/abort unreachable end @@ -2890,7 +1668,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2912,7 +1690,7 @@ if i32.const 0 i32.const 272 - i32.const 15 + i32.const 14 i32.const 64 call $~lib/env/abort unreachable @@ -2926,7 +1704,7 @@ local.set $4 local.get $3 local.get $4 - call $~lib/runtime/runtime.reallocate + call $~lib/util/runtime/reallocate local.set $5 local.get $5 local.get $3 @@ -2964,7 +1742,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2991,7 +1769,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#__unchecked_get (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -3000,7 +1778,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3010,7 +1788,7 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -3019,7 +1797,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#pop (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3031,7 +1809,7 @@ if i32.const 0 i32.const 272 - i32.const 310 + i32.const 309 i32.const 20 call $~lib/env/abort unreachable @@ -3052,7 +1830,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#concat (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3100,7 +1878,7 @@ call $~lib/memory/memory.copy local.get $4 ) - (func $~lib/array/Array#copyWithin (; 47 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 46 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3290,7 +2068,7 @@ end local.get $0 ) - (func $std/array/isArraysEqual (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -3345,7 +2123,7 @@ end i32.const 1 ) - (func $~lib/array/Array#unshift (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#unshift (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3378,7 +2156,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#shift (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3392,7 +2170,7 @@ if i32.const 0 i32.const 272 - i32.const 382 + i32.const 381 i32.const 20 call $~lib/env/abort unreachable @@ -3427,7 +2205,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#reverse (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#reverse (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3482,7 +2260,7 @@ end local.get $0 ) - (func $~lib/array/Array#indexOf (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3554,7 +2332,7 @@ end i32.const -1 ) - (func $~lib/array/Array#includes (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 local.get $2 @@ -3562,7 +2340,7 @@ i32.const 0 i32.ge_s ) - (func $~lib/array/Array#splice (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3670,7 +2448,7 @@ i32.store offset=12 local.get $6 ) - (func $~lib/array/Array#__unchecked_set (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.load offset=4 local.get $1 @@ -3680,7 +2458,7 @@ local.get $2 i32.store ) - (func $~lib/array/Array#__set (; 56 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3706,12 +2484,12 @@ i32.store offset=12 end ) - (func $start:std/array~anonymous|0 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $~lib/array/Array#findIndex (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3770,17 +2548,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3789,12 +2567,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|4 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|4 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3802,12 +2580,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3867,12 +2645,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3881,12 +2659,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3894,12 +2672,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 70 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 71 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3958,12 +2736,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 71 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 73 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3972,12 +2750,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 73 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3985,13 +2763,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 75 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 77 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 76 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4043,7 +2821,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4053,13 +2831,13 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|18 (; 79 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|18 (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 80 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 79 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -4068,7 +2846,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 81 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 80 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.const 0 @@ -4183,11 +2961,11 @@ end end ) - (func $start:std/array~anonymous|21 (; 82 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 81 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#map (; 83 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 82 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4259,11 +3037,11 @@ end local.get $3 ) - (func $~lib/array/Array#get:length (; 84 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 83 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 85 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__unchecked_get (; 84 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $0 i32.load offset=4 local.get $1 @@ -4272,7 +3050,7 @@ i32.add f32.load ) - (func $~lib/array/Array#__get (; 86 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 85 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -4282,7 +3060,7 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -4291,7 +3069,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $start:std/array~anonymous|22 (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 86 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4302,7 +3080,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 88 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 87 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4374,14 +3152,14 @@ end local.get $3 ) - (func $start:std/array~anonymous|23 (; 89 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 88 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 90 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 89 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4391,12 +3169,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 91 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 90 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 92 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 91 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4468,7 +3246,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|26 (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 92 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4481,7 +3259,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 94 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -4490,7 +3268,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 95 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 94 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4502,12 +3280,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 96 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 97 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 96 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4565,12 +3343,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|30 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|30 (; 97 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|31 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4582,7 +3360,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduce (; 100 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 99 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4640,7 +3418,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|32 (; 101 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4652,7 +3430,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|33 (; 102 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 101 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4661,12 +3439,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|34 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|34 (; 102 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 104 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4674,12 +3452,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|36 (; 105 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|36 (; 104 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 106 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 105 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4724,12 +3502,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|37 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|37 (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|38 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|38 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4741,7 +3519,7 @@ i32.gt_s end ) - (func $~lib/array/Array#reduceRight (; 109 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 108 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4786,7 +3564,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|39 (; 110 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|39 (; 109 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -4798,7 +3576,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|40 (; 111 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|40 (; 110 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4807,12 +3585,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|41 (; 112 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|41 (; 111 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|42 (; 113 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|42 (; 112 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4820,7 +3598,7 @@ local.get $1 i32.add ) - (func $~lib/math/murmurHash3 (; 114 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 113 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -4849,7 +3627,7 @@ local.set $0 local.get $0 ) - (func $~lib/math/splitMix32 (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 114 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -4884,12 +3662,12 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 116 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 115 ;) (type $FUNCSIG$vj) (param $0 i64) local.get $0 i64.eqz if i32.const 0 - i32.const 2992 + i32.const 3048 i32.const 1021 i32.const 4 call $~lib/env/abort @@ -4913,7 +3691,7 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/util/sort/insertionSort (; 117 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 116 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f32) (local $5 i32) @@ -5009,7 +3787,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 118 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 117 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5309,7 +4087,7 @@ local.get $10 f32.store ) - (func $~lib/array/Array#sort (; 119 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 118 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -5322,7 +4100,7 @@ if i32.const 0 i32.const 272 - i32.const 527 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -5395,7 +4173,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 120 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 119 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5428,7 +4206,7 @@ i32.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -5447,12 +4225,12 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/builtins/isNaN (; 122 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 121 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $std/array/isArraysEqual (; 123 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 122 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -5523,7 +4301,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 124 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 123 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) @@ -5619,7 +4397,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 125 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 124 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5919,7 +4697,7 @@ local.get $10 f64.store ) - (func $~lib/array/Array#sort (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 125 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -5932,7 +4710,7 @@ if i32.const 0 i32.const 272 - i32.const 527 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -6005,7 +4783,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 127 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 126 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -6038,7 +4816,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6057,11 +4835,11 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/array/Array#get:length (; 129 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 128 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 130 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__unchecked_get (; 129 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $0 i32.load offset=4 local.get $1 @@ -6070,7 +4848,7 @@ i32.add f64.load ) - (func $~lib/array/Array#__get (; 131 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 130 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -6080,7 +4858,7 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -6089,12 +4867,12 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/builtins/isNaN (; 132 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 131 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $std/array/isArraysEqual (; 133 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 132 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -6165,7 +4943,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 134 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 133 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6261,7 +5039,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 135 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 134 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6561,7 +5339,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6572,7 +5350,7 @@ if i32.const 0 i32.const 272 - i32.const 527 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -6645,12 +5423,12 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6669,7 +5447,7 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/util/sort/insertionSort (; 139 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 138 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6765,7 +5543,7 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (; 140 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 139 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7065,7 +5843,7 @@ local.get $10 i32.store ) - (func $~lib/array/Array#sort (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7076,7 +5854,7 @@ if i32.const 0 i32.const 272 - i32.const 527 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -7149,7 +5927,7 @@ end local.get $0 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -7158,7 +5936,7 @@ i32.lt_u i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -7177,7 +5955,7 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/array/Array.create (; 144 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 global.get $~lib/util/runtime/MAX_BYTELENGTH @@ -7187,7 +5965,7 @@ if i32.const 0 i32.const 272 - i32.const 45 + i32.const 44 i32.const 62 call $~lib/env/abort unreachable @@ -7209,7 +5987,7 @@ i32.store offset=12 local.get $1 ) - (func $std/array/createReverseOrderedArray (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 144 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -7243,7 +6021,7 @@ end local.get $1 ) - (func $~lib/math/NativeMath.random (; 146 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 145 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) (local $2 i64) @@ -7251,7 +6029,7 @@ i32.eqz if i32.const 0 - i32.const 2992 + i32.const 3048 i32.const 1030 i32.const 24 call $~lib/env/abort @@ -7300,7 +6078,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 147 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 146 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -7334,12 +6112,12 @@ end local.get $1 ) - (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $std/array/isSorted (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -7387,7 +6165,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 150 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 149 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -7403,7 +6181,7 @@ unreachable end ) - (func $std/array/assertSortedDefault (; 151 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 150 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 block $~lib/util/sort/COMPARATOR|inlined.1 (result i32) i32.const 48 @@ -7411,27 +6189,27 @@ end call $std/array/assertSorted ) - (func $start:std/array~anonymous|43 (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|43 (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|44 (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $start:std/array~anonymous|45 (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|45 (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|46 (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|46 (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array.create<~lib/array/Array> (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create<~lib/array/Array> (; 155 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 global.get $~lib/util/runtime/MAX_BYTELENGTH @@ -7441,7 +6219,7 @@ if i32.const 0 i32.const 272 - i32.const 45 + i32.const 44 i32.const 62 call $~lib/env/abort unreachable @@ -7463,7 +6241,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/array/Array<~lib/array/Array>#__unchecked_set (; 157 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__unchecked_set (; 156 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7496,7 +6274,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/array/Array<~lib/array/Array>#__set (; 158 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__set (; 157 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -7507,7 +6285,7 @@ if i32.const 0 i32.const 272 - i32.const 112 + i32.const 111 i32.const 38 call $~lib/env/abort unreachable @@ -7533,7 +6311,7 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedNestedArray (; 159 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 158 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7577,7 +6355,7 @@ end local.get $1 ) - (func $start:std/array~anonymous|47 (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -7586,7 +6364,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/util/sort/insertionSort<~lib/array/Array> (; 161 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort<~lib/array/Array> (; 160 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7682,7 +6460,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/array/Array>#sort (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#sort (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7693,7 +6471,7 @@ if i32.const 0 i32.const 272 - i32.const 527 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -7756,11 +6534,11 @@ end local.get $0 ) - (func $~lib/array/Array<~lib/array/Array>#get:length (; 163 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#get:length (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/array/Array>#__unchecked_get (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#__unchecked_get (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -7769,7 +6547,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/array/Array>#__get (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#__get (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -7777,7 +6555,7 @@ if i32.const 0 i32.const 272 - i32.const 97 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -7791,7 +6569,7 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -7800,7 +6578,7 @@ local.get $1 call $~lib/array/Array<~lib/array/Array>#__unchecked_get ) - (func $std/array/isSorted<~lib/array/Array> (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/array/Array> (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -7848,7 +6626,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/array/Array> (; 167 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/array/Array> (; 166 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#sort @@ -7864,7 +6642,7 @@ unreachable end ) - (func $~lib/array/Array.create> (; 168 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create> (; 167 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 global.get $~lib/util/runtime/MAX_BYTELENGTH @@ -7874,7 +6652,7 @@ if i32.const 0 i32.const 272 - i32.const 45 + i32.const 44 i32.const 62 call $~lib/env/abort unreachable @@ -7896,7 +6674,7 @@ i32.store offset=12 local.get $1 ) - (func $std/array/Proxy#constructor (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/Proxy#constructor (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if @@ -7911,7 +6689,7 @@ i32.store local.get $0 ) - (func $~lib/array/Array>#__unchecked_set (; 170 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__unchecked_set (; 169 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -7944,7 +6722,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/array/Array>#__set (; 171 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__set (; 170 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -7955,7 +6733,7 @@ if i32.const 0 i32.const 272 - i32.const 112 + i32.const 111 i32.const 38 call $~lib/env/abort unreachable @@ -7981,7 +6759,7 @@ i32.store offset=12 end ) - (func $std/array/createReverseOrderedElementsArray (; 172 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 171 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -8017,14 +6795,14 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/util/sort/insertionSort> (; 174 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort> (; 173 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8120,7 +6898,7 @@ unreachable end ) - (func $~lib/array/Array>#sort (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8131,7 +6909,7 @@ if i32.const 0 i32.const 272 - i32.const 527 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -8194,11 +6972,11 @@ end local.get $0 ) - (func $~lib/array/Array>#get:length (; 176 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#get:length (; 175 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array>#__unchecked_get (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__unchecked_get (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -8207,7 +6985,7 @@ i32.add i32.load ) - (func $~lib/array/Array>#__get (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__get (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -8215,7 +6993,7 @@ if i32.const 0 i32.const 272 - i32.const 97 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -8229,7 +7007,7 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -8238,7 +7016,7 @@ local.get $1 call $~lib/array/Array>#__unchecked_get ) - (func $std/array/isSorted> (; 179 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -8286,7 +7064,7 @@ end i32.const 1 ) - (func $std/array/assertSorted> (; 180 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 179 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -8302,7 +7080,7 @@ unreachable end ) - (func $~lib/util/sort/insertionSort<~lib/string/String | null> (; 181 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort<~lib/string/String | null> (; 180 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8398,7 +7176,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String | null>#sort (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#sort (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8409,7 +7187,7 @@ if i32.const 0 i32.const 272 - i32.const 527 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -8472,11 +7250,11 @@ end local.get $0 ) - (func $~lib/array/Array<~lib/string/String | null>#get:length (; 183 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#get:length (; 182 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/string/String | null>#__unchecked_get (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#__unchecked_get (; 183 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -8485,7 +7263,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/string/String | null>#__get (; 185 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#__get (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -8495,7 +7273,7 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -8504,7 +7282,7 @@ local.get $1 call $~lib/array/Array<~lib/string/String | null>#__unchecked_get ) - (func $std/array/isSorted<~lib/string/String | null> (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/string/String | null> (; 185 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -8552,7 +7330,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/string/String | null> (; 187 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String | null> (; 186 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String | null>#sort @@ -8568,7 +7346,7 @@ unreachable end ) - (func $~lib/string/String#get:length (; 188 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 187 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/util/runtime/HEADER_SIZE i32.sub @@ -8576,7 +7354,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 189 ;) (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 (; 188 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -8629,7 +7407,7 @@ end local.get $5 ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 189 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8702,7 +7480,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 191 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 190 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $1of1 block $0of1 block $outOfRange @@ -8723,7 +7501,7 @@ local.get $1 call $std/array/assertSorted<~lib/string/String | null> ) - (func $~lib/string/String.__eq (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -8767,13 +7545,13 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.__ne (; 193 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__eq i32.eqz ) - (func $std/array/isArraysEqual<~lib/string/String | null> (; 194 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual<~lib/string/String | null> (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -8828,7 +7606,7 @@ end i32.const 1 ) - (func $~lib/array/Array.create<~lib/string/String> (; 195 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create<~lib/string/String> (; 194 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 global.get $~lib/util/runtime/MAX_BYTELENGTH @@ -8838,7 +7616,7 @@ if i32.const 0 i32.const 272 - i32.const 45 + i32.const 44 i32.const 62 call $~lib/env/abort unreachable @@ -8860,7 +7638,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/string/String#charAt (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#charAt (; 195 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 i32.const 0 @@ -8868,7 +7646,7 @@ i32.eqz if i32.const 0 - i32.const 4376 + i32.const 4432 i32.const 41 i32.const 4 call $~lib/env/abort @@ -8879,7 +7657,7 @@ call $~lib/string/String#get:length i32.ge_u if - i32.const 4200 + i32.const 4256 return end i32.const 2 @@ -8897,7 +7675,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String#concat (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8906,7 +7684,7 @@ i32.const 0 i32.eq if - i32.const 4424 + i32.const 4480 local.set $1 end local.get $0 @@ -8927,7 +7705,7 @@ i32.const 0 i32.eq if - i32.const 4200 + i32.const 4256 return end local.get $4 @@ -8947,9 +7725,9 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String.__concat (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 4424 + i32.const 4480 local.get $0 i32.const 0 i32.ne @@ -8957,11 +7735,11 @@ local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 199 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 198 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) - i32.const 4200 + i32.const 4256 local.set $1 block $break|0 i32.const 0 @@ -8999,7 +7777,7 @@ end local.get $1 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 200 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 199 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -9032,7 +7810,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/array/Array<~lib/string/String>#__set (; 201 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/string/String>#__set (; 200 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -9043,7 +7821,7 @@ if i32.const 0 i32.const 272 - i32.const 112 + i32.const 111 i32.const 38 call $~lib/env/abort unreachable @@ -9069,7 +7847,7 @@ i32.store offset=12 end ) - (func $std/array/createRandomStringArray (; 202 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomStringArray (; 201 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -9103,7 +7881,7 @@ end local.get $1 ) - (func $~lib/util/sort/insertionSort<~lib/string/String> (; 203 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort<~lib/string/String> (; 202 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9199,7 +7977,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String>#sort (; 204 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#sort (; 203 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9210,7 +7988,7 @@ if i32.const 0 i32.const 272 - i32.const 527 + i32.const 526 i32.const 4 call $~lib/env/abort unreachable @@ -9273,11 +8051,11 @@ end local.get $0 ) - (func $~lib/array/Array<~lib/string/String>#get:length (; 205 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#get:length (; 204 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 205 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -9286,7 +8064,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/string/String>#__get (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -9294,7 +8072,7 @@ if i32.const 0 i32.const 272 - i32.const 97 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -9308,7 +8086,7 @@ if i32.const 0 i32.const 272 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -9317,7 +8095,7 @@ local.get $1 call $~lib/array/Array<~lib/string/String>#__unchecked_get ) - (func $std/array/isSorted<~lib/string/String> (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/string/String> (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 @@ -9365,7 +8143,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/string/String> (; 209 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String> (; 208 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String>#sort @@ -9381,7 +8159,7 @@ unreachable end ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 (; 210 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 (; 209 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9454,7 +8232,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted<~lib/string/String>|trampoline (; 211 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String>|trampoline (; 210 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $1of1 block $0of1 block $outOfRange @@ -9475,7 +8253,7 @@ local.get $1 call $std/array/assertSorted<~lib/string/String> ) - (func $~lib/string/String#substring (; 212 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 211 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9490,7 +8268,7 @@ i32.eqz if i32.const 0 - i32.const 4376 + i32.const 4432 i32.const 197 i32.const 4 call $~lib/env/abort @@ -9560,7 +8338,7 @@ local.get $3 i32.eqz if - i32.const 4200 + i32.const 4256 return end local.get $8 @@ -9593,7 +8371,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/runtime/runtime.discard (; 213 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 212 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -9602,7 +8380,7 @@ if i32.const 0 i32.const 80 - i32.const 103 + i32.const 68 i32.const 6 call $~lib/env/abort unreachable @@ -9619,7 +8397,7 @@ if i32.const 0 i32.const 80 - i32.const 105 + i32.const 70 i32.const 6 call $~lib/env/abort unreachable @@ -9627,7 +8405,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/array/Array#join_bool (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_bool (; 213 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9646,7 +8424,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -9655,8 +8433,8 @@ local.get $2 i32.eqz if - i32.const 4472 - i32.const 4496 + i32.const 4528 + i32.const 4552 local.get $3 i32.load8_u i32.const 0 @@ -9711,8 +8489,8 @@ i32.const 1 i32.shl i32.add - i32.const 4472 - i32.const 4496 + i32.const 4528 + i32.const 4552 local.get $9 i32.const 0 i32.ne @@ -9769,8 +8547,8 @@ i32.const 1 i32.shl i32.add - i32.const 4472 - i32.const 4496 + i32.const 4528 + i32.const 4552 local.get $9 i32.const 0 i32.ne @@ -9801,13 +8579,13 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 215 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_bool return ) - (func $~lib/util/number/decimalCount32 (; 216 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 215 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -9876,7 +8654,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa32_lut (; 217 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 216 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9884,7 +8662,7 @@ (local $7 i32) (local $8 i64) (local $9 i64) - i32.const 5088 + i32.const 5144 i32.load offset=4 local.set $3 block $break|0 @@ -10019,7 +8797,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 218 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 217 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10029,7 +8807,7 @@ local.get $0 i32.eqz if - i32.const 4648 + i32.const 4704 return end local.get $0 @@ -10075,12 +8853,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa (; 219 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 218 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 220 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 219 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10139,7 +8917,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 220 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10157,7 +8935,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -10272,13 +9050,13 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/util/number/utoa32 (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 222 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10287,7 +9065,7 @@ local.get $0 i32.eqz if - i32.const 4648 + i32.const 4704 return end local.get $0 @@ -10314,12 +9092,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa (; 224 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 224 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10358,7 +9136,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10376,7 +9154,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -10491,20 +9269,20 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 227 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/builtins/isFinite (; 228 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 227 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/array/Array#__unchecked_get (; 229 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__unchecked_get (; 228 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $0 i32.load offset=4 local.get $1 @@ -10513,7 +9291,7 @@ i32.add i64.load ) - (func $~lib/array/Array#__unchecked_get (; 230 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 229 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -10522,7 +9300,7 @@ i32.add i32.load16_s ) - (func $~lib/util/number/genDigits (; 231 ;) (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 (; 230 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -10578,7 +9356,7 @@ local.set $14 local.get $6 local.set $15 - i32.const 6640 + i32.const 6696 i32.load offset=4 local.set $16 block $break|0 @@ -11093,7 +9871,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 232 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 231 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11426,7 +10204,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 233 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 232 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -11595,11 +10373,11 @@ i32.shl i32.sub global.set $~lib/util/number/_K - i32.const 6328 + i32.const 6384 local.get $13 call $~lib/array/Array#__unchecked_get global.set $~lib/util/number/_frc_pow - i32.const 6552 + i32.const 6608 local.get $13 call $~lib/array/Array#__unchecked_get global.set $~lib/util/number/_exp_pow @@ -11864,7 +10642,7 @@ local.get $2 i32.add ) - (func $~lib/util/number/dtoa (; 234 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 233 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11872,7 +10650,7 @@ f64.const 0 f64.eq if - i32.const 5496 + i32.const 5552 return end local.get $0 @@ -11882,11 +10660,11 @@ local.get $0 call $~lib/builtins/isNaN if - i32.const 5520 + i32.const 5576 return end - i32.const 5544 - i32.const 5584 + i32.const 5600 + i32.const 5640 local.get $0 f64.const 0 f64.lt @@ -11911,7 +10689,7 @@ call $~lib/runtime/runtime.discard local.get $3 ) - (func $~lib/util/number/dtoa_stream (; 235 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 234 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11964,8 +10742,8 @@ local.get $3 i32.add local.set $4 - i32.const 5544 - i32.const 5584 + i32.const 5600 + i32.const 5640 local.get $3 select local.set $5 @@ -11985,7 +10763,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join_flt (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_flt (; 235 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12003,7 +10781,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -12118,13 +10896,13 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 237 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_flt return ) - (func $~lib/array/Array<~lib/string/String>#join_str (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join_str (; 237 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12143,7 +10921,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -12308,13 +11086,13 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/string/String>#join (; 239 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String>#join_str return ) - (func $std/array/Ref#constructor (; 240 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/Ref#constructor (; 239 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -12326,7 +11104,7 @@ end local.get $0 ) - (func $~lib/array/Array#join_ref (; 241 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_ref (; 240 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12344,7 +11122,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -12353,7 +11131,7 @@ local.get $2 i32.eqz if - i32.const 6920 + i32.const 6976 return end local.get $1 @@ -12398,7 +11176,7 @@ i32.const 1 i32.shl i32.add - i32.const 6920 + i32.const 6976 i32.const 15 i32.const 1 i32.shl @@ -12447,7 +11225,7 @@ i32.const 1 i32.shl i32.add - i32.const 6920 + i32.const 6976 i32.const 15 i32.const 1 i32.shl @@ -12475,18 +11253,18 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 242 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 241 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_ref return ) - (func $~lib/array/Array#toString (; 243 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 242 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4528 + i32.const 4584 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa (; 244 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 243 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -12495,7 +11273,7 @@ call $~lib/util/number/itoa32 return ) - (func $~lib/util/number/itoa_stream (; 245 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 244 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12570,7 +11348,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 245 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12588,7 +11366,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -12703,25 +11481,25 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 247 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 248 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4528 + i32.const 4584 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa (; 249 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 248 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 65535 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 250 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 249 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12766,7 +11544,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 251 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12784,7 +11562,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -12899,18 +11677,18 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 251 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 253 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 252 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4528 + i32.const 4584 call $~lib/array/Array#join ) - (func $~lib/util/number/decimalCount64 (; 254 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 253 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -12979,7 +11757,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 255 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 254 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -12991,7 +11769,7 @@ (local $11 i32) (local $12 i64) (local $13 i64) - i32.const 5088 + i32.const 5144 i32.load offset=4 local.set $3 block $break|0 @@ -13107,7 +11885,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 256 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 255 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13118,7 +11896,7 @@ local.get $0 i64.eqz if - i32.const 4648 + i32.const 4704 return end local.get $0 @@ -13175,12 +11953,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa (; 257 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 256 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/utoa64 return ) - (func $~lib/util/number/itoa_stream (; 258 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 257 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13246,7 +12024,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13264,7 +12042,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -13379,18 +12157,18 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 260 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 261 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 260 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4528 + i32.const 4584 call $~lib/array/Array#join ) - (func $~lib/util/number/itoa64 (; 262 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 261 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13402,7 +12180,7 @@ local.get $0 i64.eqz if - i32.const 4648 + i32.const 4704 return end local.get $0 @@ -13480,12 +12258,12 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa (; 263 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 262 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 call $~lib/util/number/itoa64 return ) - (func $~lib/util/number/itoa_stream (; 264 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 263 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13573,7 +12351,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 265 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 264 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13591,7 +12369,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -13706,18 +12484,18 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 266 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 265 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array#toString (; 267 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 266 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4528 + i32.const 4584 call $~lib/array/Array#join ) - (func $~lib/array/Array<~lib/string/String | null>#join_str (; 268 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#join_str (; 267 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13736,7 +12514,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -13901,23 +12679,23 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array<~lib/string/String | null>#join (; 269 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#join (; 268 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/string/String | null>#join_str return ) - (func $~lib/array/Array<~lib/string/String | null>#toString (; 270 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#toString (; 269 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4528 + i32.const 4584 call $~lib/array/Array<~lib/string/String | null>#join ) - (func $~lib/array/Array<~lib/string/String>#toString (; 271 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#toString (; 270 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4528 + i32.const 4584 call $~lib/array/Array<~lib/string/String>#join ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 272 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 271 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13933,10 +12711,10 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end - i32.const 4200 + i32.const 4256 local.set $3 local.get $1 call $~lib/string/String#get:length @@ -13956,7 +12734,7 @@ local.get $1 call $~lib/array/Array#join else - i32.const 4200 + i32.const 4256 end return end @@ -14021,25 +12799,25 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array>#join (; 273 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join (; 272 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array>#toString (; 274 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#toString (; 273 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4528 + i32.const 4584 call $~lib/array/Array<~lib/array/Array>#join ) - (func $~lib/util/number/itoa (; 275 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 274 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and call $~lib/util/number/utoa32 return ) - (func $~lib/util/number/itoa_stream (; 276 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 275 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -14084,7 +12862,7 @@ end local.get $3 ) - (func $~lib/array/Array#join_int (; 277 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 276 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14102,7 +12880,7 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end local.get $0 @@ -14217,13 +12995,13 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/array/Array#join (; 278 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 277 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array#join_int return ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 279 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 278 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14239,10 +13017,10 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end - i32.const 4200 + i32.const 4256 local.set $3 local.get $1 call $~lib/string/String#get:length @@ -14262,7 +13040,7 @@ local.get $1 call $~lib/array/Array#join else - i32.const 4200 + i32.const 4256 end return end @@ -14327,18 +13105,18 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array>#join (; 280 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join (; 279 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array>#toString (; 281 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#toString (; 280 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4528 + i32.const 4584 call $~lib/array/Array<~lib/array/Array>#join ) - (func $~lib/array/Array<~lib/array/Array>#join_arr (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 281 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14354,10 +13132,10 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end - i32.const 4200 + i32.const 4256 local.set $3 local.get $1 call $~lib/string/String#get:length @@ -14377,7 +13155,7 @@ local.get $1 call $~lib/array/Array#join else - i32.const 4200 + i32.const 4256 end return end @@ -14442,13 +13220,13 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array>#join (; 283 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 284 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 283 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14464,10 +13242,10 @@ i32.const 0 i32.lt_s if - i32.const 4200 + i32.const 4256 return end - i32.const 4200 + i32.const 4256 local.set $3 local.get $1 call $~lib/string/String#get:length @@ -14487,7 +13265,7 @@ local.get $1 call $~lib/array/Array<~lib/array/Array>#join else - i32.const 4200 + i32.const 4256 end return end @@ -14552,18 +13330,18 @@ end local.get $3 ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join (; 285 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join (; 284 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#toString (; 286 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#toString (; 285 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4528 + i32.const 4584 call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join ) - (func $start:std/array (; 287 ;) (type $FUNCSIG$v) + (func $start:std/array (; 286 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15230,7 +14008,7 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 688 + i32.const 744 call $~lib/runtime/runtime.newArray call $~lib/array/Array#concat drop @@ -15503,7 +14281,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 752 + i32.const 808 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -15514,7 +14292,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 792 + i32.const 848 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -15530,7 +14308,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 832 + i32.const 888 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -15541,7 +14319,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 872 + i32.const 928 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -15557,7 +14335,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 912 + i32.const 968 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -15568,7 +14346,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 952 + i32.const 1008 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -15584,7 +14362,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 992 + i32.const 1048 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -15595,7 +14373,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1032 + i32.const 1088 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -15611,7 +14389,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1072 + i32.const 1128 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -15622,7 +14400,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1112 + i32.const 1168 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -15638,7 +14416,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1152 + i32.const 1208 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -15649,7 +14427,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1192 + i32.const 1248 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -15665,7 +14443,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1232 + i32.const 1288 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -15676,7 +14454,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1272 + i32.const 1328 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -15692,7 +14470,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1312 + i32.const 1368 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -15703,7 +14481,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1352 + i32.const 1408 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -15719,7 +14497,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1392 + i32.const 1448 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -15730,7 +14508,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1432 + i32.const 1488 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -15746,7 +14524,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1472 + i32.const 1528 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -15757,7 +14535,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1512 + i32.const 1568 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -15773,7 +14551,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1552 + i32.const 1608 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -15784,7 +14562,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1592 + i32.const 1648 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -15800,7 +14578,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1632 + i32.const 1688 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -15811,7 +14589,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1672 + i32.const 1728 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -16675,7 +15453,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1784 + i32.const 1840 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -16692,7 +15470,7 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 1824 + i32.const 1880 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -16708,7 +15486,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1840 + i32.const 1896 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -16718,7 +15496,7 @@ i32.const 3 i32.const 2 i32.const 4 - i32.const 1880 + i32.const 1936 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -16735,7 +15513,7 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 1912 + i32.const 1968 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -16751,7 +15529,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1936 + i32.const 1992 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -16761,7 +15539,7 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 1976 + i32.const 2032 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -16778,7 +15556,7 @@ i32.const 3 i32.const 2 i32.const 4 - i32.const 2000 + i32.const 2056 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -16794,7 +15572,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2032 + i32.const 2088 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -16804,7 +15582,7 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 2072 + i32.const 2128 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -16821,7 +15599,7 @@ i32.const 4 i32.const 2 i32.const 4 - i32.const 2096 + i32.const 2152 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -16837,7 +15615,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2128 + i32.const 2184 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -16847,7 +15625,7 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 2168 + i32.const 2224 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -16864,7 +15642,7 @@ i32.const 4 i32.const 2 i32.const 4 - i32.const 2192 + i32.const 2248 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -16880,7 +15658,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2224 + i32.const 2280 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -16890,7 +15668,7 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 2264 + i32.const 2320 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -16907,7 +15685,7 @@ i32.const 3 i32.const 2 i32.const 4 - i32.const 2288 + i32.const 2344 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -16923,7 +15701,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2320 + i32.const 2376 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -16933,7 +15711,7 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 2360 + i32.const 2416 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -16950,7 +15728,7 @@ i32.const 4 i32.const 2 i32.const 4 - i32.const 2384 + i32.const 2440 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -16966,7 +15744,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2416 + i32.const 2472 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -16976,7 +15754,7 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 2456 + i32.const 2512 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -16993,7 +15771,7 @@ i32.const 4 i32.const 2 i32.const 4 - i32.const 2480 + i32.const 2536 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -17009,7 +15787,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2512 + i32.const 2568 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -17019,7 +15797,7 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2552 + i32.const 2608 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -17036,7 +15814,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2568 + i32.const 2624 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -17052,7 +15830,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2608 + i32.const 2664 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -17062,7 +15840,7 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2648 + i32.const 2704 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -17079,7 +15857,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2664 + i32.const 2720 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -17095,7 +15873,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2704 + i32.const 2760 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -17105,7 +15883,7 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2744 + i32.const 2800 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -17122,7 +15900,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2760 + i32.const 2816 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -17138,7 +15916,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2800 + i32.const 2856 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -17148,7 +15926,7 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2840 + i32.const 2896 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -17165,7 +15943,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2856 + i32.const 2912 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -17181,7 +15959,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2896 + i32.const 2952 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -17191,7 +15969,7 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2936 + i32.const 2992 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -17208,7 +15986,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2952 + i32.const 3008 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -18410,7 +17188,7 @@ i32.const 8 i32.const 2 i32.const 9 - i32.const 3304 + i32.const 3360 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -18435,7 +17213,7 @@ i32.const 8 i32.const 3 i32.const 10 - i32.const 3464 + i32.const 3520 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -18460,7 +17238,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 3616 + i32.const 3672 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -18485,7 +17263,7 @@ i32.const 5 i32.const 2 i32.const 8 - i32.const 3728 + i32.const 3784 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -18521,7 +17299,7 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 4056 + i32.const 4112 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -18540,7 +17318,7 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 4080 + i32.const 4136 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual @@ -18693,11 +17471,11 @@ i32.const 2 i32.const 0 i32.const 16 - i32.const 4552 + i32.const 4608 call $~lib/runtime/runtime.newArray - i32.const 4528 + i32.const 4584 call $~lib/array/Array#join - i32.const 4576 + i32.const 4632 call $~lib/string/String.__eq i32.eqz if @@ -18711,11 +17489,11 @@ i32.const 3 i32.const 2 i32.const 4 - i32.const 5120 + i32.const 5176 call $~lib/runtime/runtime.newArray - i32.const 4200 + i32.const 4256 call $~lib/array/Array#join - i32.const 5152 + i32.const 5208 call $~lib/string/String.__eq i32.eqz if @@ -18729,11 +17507,11 @@ i32.const 3 i32.const 2 i32.const 8 - i32.const 5240 + i32.const 5296 call $~lib/runtime/runtime.newArray - i32.const 5216 + i32.const 5272 call $~lib/array/Array#join - i32.const 5152 + i32.const 5208 call $~lib/string/String.__eq i32.eqz if @@ -18747,11 +17525,11 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 5320 + i32.const 5376 call $~lib/runtime/runtime.newArray - i32.const 5296 + i32.const 5352 call $~lib/array/Array#join - i32.const 5344 + i32.const 5400 call $~lib/string/String.__eq i32.eqz if @@ -18765,11 +17543,11 @@ i32.const 6 i32.const 3 i32.const 10 - i32.const 6672 + i32.const 6728 call $~lib/runtime/runtime.newArray - i32.const 5472 + i32.const 5528 call $~lib/array/Array#join - i32.const 6736 + i32.const 6792 call $~lib/string/String.__eq i32.eqz if @@ -18783,11 +17561,11 @@ i32.const 3 i32.const 2 i32.const 15 - i32.const 6888 + i32.const 6944 call $~lib/runtime/runtime.newArray - i32.const 4200 + i32.const 4256 call $~lib/array/Array<~lib/string/String>#join - i32.const 6832 + i32.const 6888 call $~lib/string/String.__eq i32.eqz if @@ -18853,9 +17631,9 @@ end global.set $std/array/refArr global.get $std/array/refArr - i32.const 4528 + i32.const 4584 call $~lib/array/Array#join - i32.const 6968 + i32.const 7024 call $~lib/string/String.__eq i32.eqz if @@ -18868,7 +17646,7 @@ end global.get $std/array/reversed0 call $~lib/array/Array#toString - i32.const 4200 + i32.const 4256 call $~lib/string/String.__eq i32.eqz if @@ -18881,7 +17659,7 @@ end global.get $std/array/reversed1 call $~lib/array/Array#toString - i32.const 6832 + i32.const 6888 call $~lib/string/String.__eq i32.eqz if @@ -18894,7 +17672,7 @@ end global.get $std/array/reversed2 call $~lib/array/Array#toString - i32.const 7048 + i32.const 7104 call $~lib/string/String.__eq i32.eqz if @@ -18907,7 +17685,7 @@ end global.get $std/array/reversed4 call $~lib/array/Array#toString - i32.const 7072 + i32.const 7128 call $~lib/string/String.__eq i32.eqz if @@ -18921,10 +17699,10 @@ i32.const 3 i32.const 0 i32.const 21 - i32.const 7128 + i32.const 7184 call $~lib/runtime/runtime.newArray call $~lib/array/Array#toString - i32.const 7152 + i32.const 7208 call $~lib/string/String.__eq i32.eqz if @@ -18938,10 +17716,10 @@ i32.const 3 i32.const 1 i32.const 22 - i32.const 7208 + i32.const 7264 call $~lib/runtime/runtime.newArray call $~lib/array/Array#toString - i32.const 7232 + i32.const 7288 call $~lib/string/String.__eq i32.eqz if @@ -18955,10 +17733,10 @@ i32.const 3 i32.const 3 i32.const 17 - i32.const 7312 + i32.const 7368 call $~lib/runtime/runtime.newArray call $~lib/array/Array#toString - i32.const 7352 + i32.const 7408 call $~lib/string/String.__eq i32.eqz if @@ -18972,10 +17750,10 @@ i32.const 4 i32.const 3 i32.const 23 - i32.const 7464 + i32.const 7520 call $~lib/runtime/runtime.newArray call $~lib/array/Array#toString - i32.const 7512 + i32.const 7568 call $~lib/string/String.__eq i32.eqz if @@ -18988,7 +17766,7 @@ end global.get $std/array/randomStringsExpected call $~lib/array/Array<~lib/string/String | null>#toString - i32.const 7616 + i32.const 7672 call $~lib/string/String.__eq i32.eqz if @@ -19002,10 +17780,10 @@ i32.const 4 i32.const 2 i32.const 15 - i32.const 7744 + i32.const 7800 call $~lib/runtime/runtime.newArray call $~lib/array/Array<~lib/string/String>#toString - i32.const 7776 + i32.const 7832 call $~lib/string/String.__eq i32.eqz if @@ -19031,7 +17809,7 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 7832 + i32.const 7888 call $~lib/runtime/runtime.newArray local.set $2 local.get $2 @@ -19045,7 +17823,7 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 7856 + i32.const 7912 call $~lib/runtime/runtime.newArray local.set $2 local.get $2 @@ -19059,7 +17837,7 @@ global.set $std/array/subarr32 global.get $std/array/subarr32 call $~lib/array/Array<~lib/array/Array>#toString - i32.const 7880 + i32.const 7936 call $~lib/string/String.__eq i32.eqz if @@ -19085,7 +17863,7 @@ i32.const 2 i32.const 0 i32.const 7 - i32.const 7936 + i32.const 7992 call $~lib/runtime/runtime.newArray local.set $2 local.get $2 @@ -19099,7 +17877,7 @@ i32.const 2 i32.const 0 i32.const 7 - i32.const 7960 + i32.const 8016 call $~lib/runtime/runtime.newArray local.set $2 local.get $2 @@ -19113,7 +17891,7 @@ global.set $std/array/subarr8 global.get $std/array/subarr8 call $~lib/array/Array<~lib/array/Array>#toString - i32.const 7880 + i32.const 7936 call $~lib/string/String.__eq i32.eqz if @@ -19151,7 +17929,7 @@ i32.const 1 i32.const 2 i32.const 8 - i32.const 8056 + i32.const 8112 call $~lib/runtime/runtime.newArray local.set $4 local.get $4 @@ -19174,7 +17952,7 @@ global.set $std/array/subarrU32 global.get $std/array/subarrU32 call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#toString - i32.const 6832 + i32.const 6888 call $~lib/string/String.__eq i32.eqz if @@ -19186,7 +17964,7 @@ unreachable end ) - (func $std/array/main (; 288 ;) (type $FUNCSIG$v) + (func $std/array/main (; 287 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -19195,9 +17973,9 @@ global.set $~lib/started end ) - (func $start (; 289 ;) (type $FUNCSIG$v) + (func $start (; 288 ;) (type $FUNCSIG$v) call $start:std/array ) - (func $null (; 290 ;) (type $FUNCSIG$v) + (func $null (; 289 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index bf53788a8a..108bd0182d 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -327,7 +327,7 @@ if i32.const 0 i32.const 64 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -342,7 +342,7 @@ if i32.const 0 i32.const 64 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -374,854 +374,7 @@ i32.const 2 call $~lib/runtime/runtime.register ) - (func $~lib/util/memory/memcpy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $continue|0 - local.get $1 - i32.const 3 - i32.and - local.get $2 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - local.get $0 - i32.const 3 - i32.and - local.tee $3 - i32.const 1 - i32.ne - if - local.get $3 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $3 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 13 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 15 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1229,29 +382,6 @@ local.get $1 i32.eq br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - local.set $3 - end - local.get $3 - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -1415,7 +545,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.const 8 @@ -1485,7 +615,7 @@ i32.const 2 call $~lib/runtime/runtime.register ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) i32.const 1 i32.const 1073741816 @@ -1535,7 +665,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/runtime/runtime.newArray (; 10 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/runtime/runtime.newArray (; 9 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) i32.const 16 @@ -1564,7 +694,7 @@ call $~lib/memory/memory.copy local.get $0 ) - (func $~lib/dataview/DataView#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 1073741816 @@ -1608,7 +738,7 @@ i32.store offset=8 local.get $2 ) - (func $~lib/dataview/DataView#constructor|trampoline (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/dataview/DataView#constructor|trampoline (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block $2of2 block $1of2 @@ -1630,7 +760,7 @@ local.get $1 call $~lib/dataview/DataView#constructor ) - (func $start:std/arraybuffer (; 13 ;) (type $FUNCSIG$v) + (func $start:std/arraybuffer (; 12 ;) (type $FUNCSIG$v) i32.const 200 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset @@ -1889,10 +1019,10 @@ unreachable end ) - (func $start (; 14 ;) (type $FUNCSIG$v) + (func $start (; 13 ;) (type $FUNCSIG$v) call $start:std/arraybuffer ) - (func $null (; 15 ;) (type $FUNCSIG$v) + (func $null (; 14 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index fbb25abcb1..e1550142fa 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -407,7 +407,7 @@ if i32.const 0 i32.const 64 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -424,7 +424,7 @@ if i32.const 0 i32.const 64 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -464,1208 +464,7 @@ i32.sub i32.load offset=4 ) - (func $~lib/util/memory/memcpy (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1676,28 +475,6 @@ if br $~lib/util/memory/memmove|inlined.0 end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -1896,7 +673,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1979,7 +756,7 @@ i32.const 2 call $~lib/runtime/runtime.register ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array> (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array> (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if block (result i32) @@ -2093,7 +870,7 @@ end i32.const 0 ) - (func $~lib/arraybuffer/ArrayBuffer.isView (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if block (result i32) @@ -2207,7 +984,7 @@ end i32.const 0 ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array> (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array> (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if block (result i32) @@ -2321,7 +1098,7 @@ end i32.const 0 ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array> (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array> (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if block (result i32) @@ -2435,7 +1212,7 @@ end i32.const 0 ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView> (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView> (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if block (result i32) @@ -2549,7 +1326,7 @@ end i32.const 0 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 global.get $~lib/util/runtime/MAX_BYTELENGTH @@ -2602,7 +1379,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -2618,7 +1395,7 @@ local.set $0 local.get $0 ) - (func $~lib/runtime/runtime.newArray (; 19 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 18 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2657,7 +1434,7 @@ end local.get $4 ) - (func $~lib/typedarray/Int32Array#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -2673,7 +1450,7 @@ local.set $0 local.get $0 ) - (func $~lib/dataview/DataView#constructor (; 21 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 20 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) local.get $3 global.get $~lib/util/runtime/MAX_BYTELENGTH @@ -2728,11 +1505,11 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#get:buffer (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#get:buffer (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $~lib/dataview/DataView#constructor|trampoline (; 23 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/dataview/DataView#constructor|trampoline (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -2757,7 +1534,7 @@ local.get $3 call $~lib/dataview/DataView#constructor ) - (func $start:std/arraybuffer (; 24 ;) (type $FUNCSIG$v) + (func $start:std/arraybuffer (; 23 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -3078,9 +1855,9 @@ unreachable end ) - (func $start (; 25 ;) (type $FUNCSIG$v) + (func $start (; 24 ;) (type $FUNCSIG$v) call $start:std/arraybuffer ) - (func $null (; 26 ;) (type $FUNCSIG$v) + (func $null (; 25 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index c3794503a5..8bd5caa8c6 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -165,7 +165,7 @@ if i32.const 0 i32.const 64 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -180,7 +180,7 @@ if i32.const 0 i32.const 64 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 7b25410028..e75653c0e4 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -413,7 +413,7 @@ if i32.const 0 i32.const 64 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -430,7 +430,7 @@ if i32.const 0 i32.const 64 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index ada313ece6..b642e87ed5 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -89,7 +89,7 @@ if i32.const 0 i32.const 48 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -104,7 +104,7 @@ if i32.const 0 i32.const 48 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index b304c8c1b0..541650475b 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -148,7 +148,7 @@ if i32.const 0 i32.const 48 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -165,7 +165,7 @@ if i32.const 0 i32.const 48 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 311e469730..cc008a452d 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -135,7 +135,7 @@ if i32.const 0 i32.const 24 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -150,7 +150,7 @@ if i32.const 0 i32.const 24 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index fe4484c0a0..3cb23689fc 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -166,7 +166,7 @@ if i32.const 0 i32.const 24 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -183,7 +183,7 @@ if i32.const 0 i32.const 24 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 2ca7f049de..475ff6174d 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -84,7 +84,7 @@ if i32.const 0 i32.const 16 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -99,7 +99,7 @@ if i32.const 0 i32.const 16 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 93369e9d57..5f31de7959 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -141,7 +141,7 @@ if i32.const 0 i32.const 16 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index 8632d9c567..d6c9ef31bf 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -118,7 +118,7 @@ if i32.const 0 i32.const 64 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -133,7 +133,7 @@ if i32.const 0 i32.const 64 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/object-literal.untouched.wat b/tests/compiler/std/object-literal.untouched.wat index 903da28aa0..8d7a9821b6 100644 --- a/tests/compiler/std/object-literal.untouched.wat +++ b/tests/compiler/std/object-literal.untouched.wat @@ -153,7 +153,7 @@ if i32.const 0 i32.const 64 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -170,7 +170,7 @@ if i32.const 0 i32.const 64 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index d4a70cfc76..b8a573137c 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -167,7 +167,7 @@ if i32.const 0 i32.const 16 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -182,7 +182,7 @@ if i32.const 0 i32.const 16 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 39f3e96302..a92d444bfe 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -209,7 +209,7 @@ if i32.const 0 i32.const 16 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -226,7 +226,7 @@ if i32.const 0 i32.const 16 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index 306acaf93f..b9ff9164df 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -61,857 +61,7 @@ i32.const 0 i32.store8 ) - (func $~lib/util/memory/memcpy (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 8 - local.set $3 - loop $continue|0 - local.get $1 - i32.const 3 - i32.and - local.get $3 - local.get $3 - select - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $3 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $3 - i32.const 16 - i32.sub - local.set $3 - br $continue|1 - end - end - local.get $3 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $3 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $3 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $3 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $3 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - local.get $0 - i32.const 3 - i32.and - local.tee $2 - i32.const 1 - i32.ne - if - local.get $2 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $2 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - local.get $3 - i32.const 3 - i32.sub - local.set $3 - loop $continue|3 - local.get $3 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $2 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $2 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $2 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $2 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 13 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $2 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $3 - i32.const 16 - i32.sub - local.set $3 - br $continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.sub - local.set $3 - loop $continue|4 - local.get $3 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $2 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $2 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $2 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $2 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $2 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $3 - i32.const 16 - i32.sub - local.set $3 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - loop $continue|5 - local.get $3 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $2 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $2 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $2 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $2 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 15 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $2 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $3 - i32.const 16 - i32.sub - local.set $3 - br $continue|5 - end - end - end - end - local.get $3 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $3 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $3 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $3 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $3 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.copy (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -922,27 +72,6 @@ local.get $1 i32.eq br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - i32.const 8 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -1106,7 +235,7 @@ end end ) - (func $start:std/pointer (; 4 ;) (type $FUNCSIG$v) + (func $start:std/pointer (; 3 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 8 @@ -1495,10 +624,10 @@ unreachable end ) - (func $start (; 5 ;) (type $FUNCSIG$v) + (func $start (; 4 ;) (type $FUNCSIG$v) call $start:std/pointer ) - (func $null (; 6 ;) (type $FUNCSIG$v) + (func $null (; 5 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/pointer.untouched.wat b/tests/compiler/std/pointer.untouched.wat index 351feb4cf2..866407afd4 100644 --- a/tests/compiler/std/pointer.untouched.wat +++ b/tests/compiler/std/pointer.untouched.wat @@ -277,1208 +277,7 @@ end end ) - (func $~lib/util/memory/memcpy (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1489,28 +288,6 @@ if br $~lib/util/memory/memmove|inlined.0 end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -1709,7 +486,7 @@ end end ) - (func $std/pointer/Pointer#set:value (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/pointer/Pointer#set:value (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $1 i32.const 0 i32.eq @@ -1725,7 +502,7 @@ call $~lib/memory/memory.copy end ) - (func $std/pointer/Pointer#set (; 5 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $std/pointer/Pointer#set (; 4 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $0 local.get $1 i32.const 4 @@ -1734,12 +511,12 @@ local.get $2 f32.store ) - (func $std/pointer/Pointer#set:value (; 6 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $std/pointer/Pointer#set:value (; 5 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) local.get $0 local.get $1 f32.store ) - (func $start:std/pointer (; 7 ;) (type $FUNCSIG$v) + (func $start:std/pointer (; 6 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 f32) @@ -2343,9 +1120,9 @@ unreachable end ) - (func $start (; 8 ;) (type $FUNCSIG$v) + (func $start (; 7 ;) (type $FUNCSIG$v) call $start:std/pointer ) - (func $null (; 9 ;) (type $FUNCSIG$v) + (func $null (; 8 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index cc017260fb..e9bcb4085b 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -21,8 +21,10 @@ (data (i32.const 136) "b\00a\00r\00r\00i\00e\00r\003") (data (i32.const 152) "\03\00\00\00,") (data (i32.const 168) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 216) "\03\00\00\00\1e") - (data (i32.const 232) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 216) "\03\00\00\00(") + (data (i32.const 232) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 272) "\03\00\00\00\1e") + (data (i32.const 288) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/runtime/register_ref (mut i32) (i32.const 0)) @@ -1022,14 +1024,14 @@ if unreachable end - i32.const 264 + i32.const 320 local.set $2 - i32.const 264 + i32.const 320 global.set $~lib/allocator/tlsf/ROOT i32.const 2912 i32.const 0 i32.store - i32.const 264 + i32.const 320 i32.const 0 i32.store i32.const 0 @@ -1039,7 +1041,7 @@ i32.const 22 i32.lt_u if - i32.const 264 + i32.const 320 local.get $1 i32.const 0 call $~lib/allocator/tlsf/Root#setSLMap @@ -1050,7 +1052,7 @@ i32.const 32 i32.lt_u if - i32.const 264 + i32.const 320 local.get $1 local.get $3 i32.const 0 @@ -1069,8 +1071,8 @@ br $repeat|0 end end - i32.const 264 - i32.const 3184 + i32.const 320 + i32.const 3240 current_memory i32.const 16 i32.shl @@ -1193,854 +1195,7 @@ i32.const 16 i32.add ) - (func $~lib/util/memory/memcpy (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $continue|0 - local.get $1 - i32.const 3 - i32.and - local.get $2 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - local.get $0 - i32.const 3 - i32.and - local.tee $3 - i32.const 1 - i32.ne - if - local.get $3 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $3 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 13 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 15 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2048,29 +1203,6 @@ local.get $1 i32.eq br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - local.set $3 - end - local.get $3 - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -2234,7 +1366,7 @@ end end ) - (func $~lib/memory/memory.fill (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -2445,7 +1577,7 @@ end end ) - (func $~lib/allocator/tlsf/__mem_free (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2483,7 +1615,7 @@ end end ) - (func $~lib/runtime/runtime.reallocate (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/reallocate (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2517,7 +1649,7 @@ i32.shl i32.const 0 local.get $0 - i32.const 264 + i32.const 320 i32.gt_u select local.get $3 @@ -2555,13 +1687,13 @@ i32.eq if local.get $0 - i32.const 264 + i32.const 320 i32.le_u if i32.const 0 i32.const 232 - i32.const 77 - i32.const 10 + i32.const 74 + i32.const 8 call $~lib/env/abort unreachable end @@ -2590,14 +1722,14 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/runtime.discard (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 264 + i32.const 320 i32.le_u if i32.const 0 - i32.const 232 - i32.const 103 + i32.const 288 + i32.const 68 i32.const 6 call $~lib/env/abort unreachable @@ -2611,8 +1743,8 @@ i32.ne if i32.const 0 - i32.const 232 - i32.const 105 + i32.const 288 + i32.const 70 i32.const 6 call $~lib/env/abort unreachable @@ -2620,15 +1752,15 @@ local.get $0 call $~lib/allocator/tlsf/__mem_free ) - (func $~lib/runtime/runtime.register (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.register (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 - i32.const 264 + i32.const 320 i32.le_u if i32.const 0 - i32.const 232 - i32.const 117 + i32.const 288 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -2642,8 +1774,8 @@ i32.ne if i32.const 0 - i32.const 232 - i32.const 119 + i32.const 288 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -2654,7 +1786,7 @@ local.get $0 global.set $std/runtime/register_ref ) - (func $start:std/runtime (; 25 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 24 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2826,7 +1958,7 @@ local.tee $0 local.get $0 global.get $std/runtime/barrier1 - call $~lib/runtime/runtime.reallocate + call $~lib/util/runtime/reallocate i32.ne if i32.const 0 @@ -2850,7 +1982,7 @@ end global.get $std/runtime/ref1 global.get $std/runtime/barrier2 - call $~lib/runtime/runtime.reallocate + call $~lib/util/runtime/reallocate global.set $std/runtime/ref2 global.get $std/runtime/ref1 global.get $std/runtime/ref2 @@ -2973,7 +2105,7 @@ unreachable end ) - (func $std/runtime/main (; 26 ;) (type $FUNCSIG$v) + (func $std/runtime/main (; 25 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -2982,7 +2114,7 @@ global.set $~lib/started end ) - (func $null (; 27 ;) (type $FUNCSIG$v) + (func $null (; 26 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/runtime.ts b/tests/compiler/std/runtime.ts index 596da40126..d495d4aaae 100644 --- a/tests/compiler/std/runtime.ts +++ b/tests/compiler/std/runtime.ts @@ -1,5 +1,5 @@ import "allocator/tlsf"; -import { HEADER, HEADER_SIZE, HEADER_MAGIC, adjust } from "util/runtime"; +import { HEADER, HEADER_SIZE, HEADER_MAGIC, adjust, reallocate } from "util/runtime"; import { runtime, __runtime_id } from "runtime"; @start export function main(): void {} @@ -54,9 +54,9 @@ var ref1 = runtime.allocate(1); var header1 = changetype
(ref1 - HEADER_SIZE); assert(header1.classId == HEADER_MAGIC); assert(header1.payloadSize == 1); -assert(ref1 == runtime.reallocate(ref1, barrier1)); // same segment +assert(ref1 == reallocate(ref1, barrier1)); // same segment assert(header1.payloadSize == barrier1); -var ref2 = runtime.reallocate(ref1, barrier2); +var ref2 = reallocate(ref1, barrier2); assert(ref1 != ref2); // moves var header2 = changetype
(ref2 - HEADER_SIZE); assert(header2.payloadSize == barrier2); diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 9f8966c42b..1c8ecfdead 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -16,7 +16,8 @@ (data (i32.const 88) "\03\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\002\00") (data (i32.const 120) "\03\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\003\00") (data (i32.const 152) "\03\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") - (data (i32.const 216) "\03\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 216) "\03\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 272) "\03\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/runtime/register_ref (mut i32) (i32.const 0)) @@ -54,7 +55,7 @@ (global $std/runtime/header4 (mut i32) (i32.const 0)) (global $std/runtime/ref5 (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 264)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 320)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -1477,1208 +1478,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/util/memory/memcpy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2689,28 +1489,6 @@ if br $~lib/util/memory/memmove|inlined.0 end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -2909,7 +1687,7 @@ end end ) - (func $~lib/memory/memory.fill (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3166,7 +1944,7 @@ end end ) - (func $~lib/allocator/tlsf/__mem_free (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3209,15 +1987,15 @@ end end ) - (func $~lib/memory/memory.free (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/tlsf/__mem_free ) - (func $std/runtime/__ref_register (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/runtime/__ref_register (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $std/runtime/register_ref ) - (func $~lib/runtime/runtime.reallocate (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/reallocate (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3288,8 +2066,8 @@ if i32.const 0 i32.const 232 - i32.const 77 - i32.const 10 + i32.const 74 + i32.const 8 call $~lib/env/abort unreachable end @@ -3321,7 +2099,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/runtime.discard (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3329,8 +2107,8 @@ i32.eqz if i32.const 0 - i32.const 232 - i32.const 103 + i32.const 288 + i32.const 68 i32.const 6 call $~lib/env/abort unreachable @@ -3346,8 +2124,8 @@ i32.eqz if i32.const 0 - i32.const 232 - i32.const 105 + i32.const 288 + i32.const 70 i32.const 6 call $~lib/env/abort unreachable @@ -3355,7 +2133,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/runtime/runtime.register (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3363,8 +2141,8 @@ i32.eqz if i32.const 0 - i32.const 232 - i32.const 117 + i32.const 288 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -3380,8 +2158,8 @@ i32.eqz if i32.const 0 - i32.const 232 - i32.const 119 + i32.const 288 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -3393,13 +2171,13 @@ call $std/runtime/__ref_register local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/util/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $~lib/string/String#get:length (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/util/runtime/HEADER_SIZE i32.sub @@ -3407,7 +2185,7 @@ i32.const 1 i32.shr_u ) - (func $start:std/runtime (; 35 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 34 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 1 i32.const 2 @@ -3574,7 +2352,7 @@ global.get $std/runtime/ref1 global.get $std/runtime/ref1 global.get $std/runtime/barrier1 - call $~lib/runtime/runtime.reallocate + call $~lib/util/runtime/reallocate i32.eq i32.eqz if @@ -3600,7 +2378,7 @@ end global.get $std/runtime/ref1 global.get $std/runtime/barrier2 - call $~lib/runtime/runtime.reallocate + call $~lib/util/runtime/reallocate global.set $std/runtime/ref2 global.get $std/runtime/ref1 global.get $std/runtime/ref2 @@ -3727,7 +2505,7 @@ unreachable end ) - (func $std/runtime/main (; 36 ;) (type $FUNCSIG$v) + (func $std/runtime/main (; 35 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -3736,9 +2514,9 @@ global.set $~lib/started end ) - (func $start (; 37 ;) (type $FUNCSIG$v) + (func $start (; 36 ;) (type $FUNCSIG$v) call $start:std/runtime ) - (func $null (; 38 ;) (type $FUNCSIG$v) + (func $null (; 37 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 8360089ec4..1a50750bfa 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 24 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -146,7 +146,7 @@ if i32.const 0 i32.const 24 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 08ad6ba66d..44675ba27c 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -166,7 +166,7 @@ if i32.const 0 i32.const 24 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -183,7 +183,7 @@ if i32.const 0 i32.const 24 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 1beb7f4e67..415f30702e 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -21,7 +21,7 @@ (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 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") + (data (i32.const 272) "\06\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -39,7 +39,7 @@ if i32.const 0 i32.const 240 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -114,854 +114,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/util/memory/memcpy (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $continue|0 - local.get $1 - i32.const 3 - i32.and - local.get $2 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - local.get $0 - i32.const 3 - i32.and - local.tee $3 - i32.const 1 - i32.ne - if - local.get $3 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $3 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 13 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 15 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -969,29 +122,6 @@ local.get $1 i32.eq br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - local.set $3 - end - local.get $3 - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -1155,7 +285,7 @@ end end ) - (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1366,7 +496,7 @@ end end ) - (func $~lib/runtime/runtime.reallocate (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/reallocate (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1400,7 +530,7 @@ i32.shl i32.const 0 local.get $0 - i32.const 312 + i32.const 320 i32.gt_u select local.get $4 @@ -1432,13 +562,13 @@ i32.eq if local.get $0 - i32.const 312 + i32.const 320 i32.le_u if i32.const 0 i32.const 280 - i32.const 77 - i32.const 10 + i32.const 74 + i32.const 8 call $~lib/env/abort unreachable end @@ -1462,7 +592,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureCapacity (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -1480,7 +610,7 @@ if i32.const 0 i32.const 240 - i32.const 15 + i32.const 14 i32.const 64 call $~lib/env/abort unreachable @@ -1492,7 +622,7 @@ local.get $1 i32.shl local.tee $3 - call $~lib/runtime/runtime.reallocate + call $~lib/util/runtime/reallocate local.set $1 local.get $1 local.get $2 @@ -1510,7 +640,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 8 ;) (type $FUNCSIG$v) + (func $~lib/array/Array#__set (; 7 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 44 i32.load @@ -1531,7 +661,7 @@ i32.store end ) - (func $~lib/array/Array#__get (; 9 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) + (func $~lib/array/Array#__get (; 8 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) local.get $0 i32.const 88 i32.load @@ -1541,7 +671,7 @@ if i32.const 0 i32.const 240 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -1554,7 +684,7 @@ i32.add i64.load ) - (func $~lib/array/Array#__set (; 10 ;) (type $FUNCSIG$v) + (func $~lib/array/Array#__set (; 9 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 92 i32.load @@ -1575,7 +705,7 @@ i32.store end ) - (func $~lib/array/Array#__get (; 11 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $~lib/array/Array#__get (; 10 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) local.get $0 i32.const 128 i32.load @@ -1585,7 +715,7 @@ if i32.const 0 i32.const 240 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -1598,7 +728,7 @@ i32.add f32.load ) - (func $~lib/array/Array#__set (; 12 ;) (type $FUNCSIG$v) + (func $~lib/array/Array#__set (; 11 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 132 i32.load @@ -1619,7 +749,7 @@ i32.store end ) - (func $~lib/array/Array#__get (; 13 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/array/Array#__get (; 12 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) local.get $0 i32.const 176 i32.load @@ -1629,7 +759,7 @@ if i32.const 0 i32.const 240 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -1642,7 +772,7 @@ i32.add f64.load ) - (func $~lib/array/Array#__set (; 14 ;) (type $FUNCSIG$v) + (func $~lib/array/Array#__set (; 13 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 180 i32.load @@ -1663,7 +793,7 @@ i32.store end ) - (func $start:std/static-array (; 15 ;) (type $FUNCSIG$v) + (func $start:std/static-array (; 14 ;) (type $FUNCSIG$v) i32.const 44 i32.load i32.const 2 @@ -1700,7 +830,7 @@ call $~lib/env/abort unreachable end - i32.const 312 + i32.const 320 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -1865,10 +995,10 @@ unreachable end ) - (func $start (; 16 ;) (type $FUNCSIG$v) + (func $start (; 15 ;) (type $FUNCSIG$v) call $start:std/static-array ) - (func $null (; 17 ;) (type $FUNCSIG$v) + (func $null (; 16 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 9b09b240b9..83fe311461 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -23,7 +23,7 @@ (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\00\00\00") (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\00") (data (i32.const 232) "\06\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (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\00") + (data (i32.const 272) "\06\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/static-array/i i32 (i32.const 32)) @@ -35,7 +35,7 @@ (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 312)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 320)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -62,7 +62,7 @@ if i32.const 0 i32.const 240 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -167,1208 +167,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/util/memory/memcpy (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1379,28 +178,6 @@ if br $~lib/util/memory/memmove|inlined.0 end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -1599,7 +376,7 @@ end end ) - (func $~lib/memory/memory.fill (; 9 ;) (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 $4 i32) (local $5 i32) @@ -1856,14 +633,14 @@ end end ) - (func $~lib/allocator/arena/__mem_free (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/runtime.reallocate (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/reallocate (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1928,8 +705,8 @@ if i32.const 0 i32.const 280 - i32.const 77 - i32.const 10 + i32.const 74 + i32.const 8 call $~lib/env/abort unreachable end @@ -1960,7 +737,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1979,7 +756,7 @@ if i32.const 0 i32.const 240 - i32.const 15 + i32.const 14 i32.const 64 call $~lib/env/abort unreachable @@ -1993,7 +770,7 @@ local.set $4 local.get $3 local.get $4 - call $~lib/runtime/runtime.reallocate + call $~lib/util/runtime/reallocate local.set $5 local.get $5 local.get $3 @@ -2011,7 +788,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__unchecked_set (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.load offset=4 local.get $1 @@ -2021,7 +798,7 @@ local.get $2 i32.store ) - (func $~lib/array/Array#__set (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -2047,11 +824,11 @@ i32.store offset=12 end ) - (func $~lib/array/Array#get:length (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 17 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__unchecked_get (; 16 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $0 i32.load offset=4 local.get $1 @@ -2060,7 +837,7 @@ i32.add i64.load ) - (func $~lib/array/Array#__get (; 18 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__get (; 17 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -2070,7 +847,7 @@ if i32.const 0 i32.const 240 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -2079,7 +856,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#__unchecked_set (; 19 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__unchecked_set (; 18 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $0 i32.load offset=4 local.get $1 @@ -2089,7 +866,7 @@ local.get $2 i64.store ) - (func $~lib/array/Array#__set (; 20 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (; 19 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) local.get $0 i32.load offset=12 @@ -2115,11 +892,11 @@ i32.store offset=12 end ) - (func $~lib/array/Array#get:length (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 22 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__unchecked_get (; 21 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $0 i32.load offset=4 local.get $1 @@ -2128,7 +905,7 @@ i32.add f32.load ) - (func $~lib/array/Array#__get (; 23 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 22 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -2138,7 +915,7 @@ if i32.const 0 i32.const 240 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -2147,7 +924,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#__unchecked_set (; 24 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/array/Array#__unchecked_set (; 23 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $0 i32.load offset=4 local.get $1 @@ -2157,7 +934,7 @@ local.get $2 f32.store ) - (func $~lib/array/Array#__set (; 25 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/array/Array#__set (; 24 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) (local $3 i32) local.get $0 i32.load offset=12 @@ -2183,11 +960,11 @@ i32.store offset=12 end ) - (func $~lib/array/Array#get:length (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 27 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__unchecked_get (; 26 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $0 i32.load offset=4 local.get $1 @@ -2196,7 +973,7 @@ i32.add f64.load ) - (func $~lib/array/Array#__get (; 28 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 27 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -2206,7 +983,7 @@ if i32.const 0 i32.const 240 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -2215,7 +992,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#__unchecked_set (; 29 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/array/Array#__unchecked_set (; 28 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) local.get $0 i32.load offset=4 local.get $1 @@ -2225,7 +1002,7 @@ local.get $2 f64.store ) - (func $~lib/array/Array#__set (; 30 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/array/Array#__set (; 29 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) (local $3 i32) local.get $0 i32.load offset=12 @@ -2251,7 +1028,7 @@ i32.store offset=12 end ) - (func $start:std/static-array (; 31 ;) (type $FUNCSIG$v) + (func $start:std/static-array (; 30 ;) (type $FUNCSIG$v) global.get $std/static-array/i call $~lib/array/Array#get:length i32.const 2 @@ -2499,9 +1276,9 @@ unreachable end ) - (func $start (; 32 ;) (type $FUNCSIG$v) + (func $start (; 31 ;) (type $FUNCSIG$v) call $start:std/static-array ) - (func $null (; 33 ;) (type $FUNCSIG$v) + (func $null (; 32 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index 5fc947369f..90532e1a2d 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -415,854 +415,7 @@ i32.const 8 i32.add ) - (func $~lib/util/memory/memcpy (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $continue|0 - local.get $1 - i32.const 3 - i32.and - local.get $2 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - local.get $0 - i32.const 3 - i32.and - local.tee $3 - i32.const 1 - i32.ne - if - local.get $3 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $3 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 13 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 15 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1270,29 +423,6 @@ local.get $1 i32.eq br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - local.set $3 - end - local.get $3 - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -1456,7 +586,7 @@ end end ) - (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 228 @@ -1464,7 +594,7 @@ if i32.const 0 i32.const 136 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -1479,7 +609,7 @@ if i32.const 0 i32.const 136 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -1489,7 +619,7 @@ i32.store local.get $0 ) - (func $~lib/string/String.fromUTF8 (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.fromUTF8 (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1746,7 +876,7 @@ local.get $0 call $~lib/runtime/runtime.register ) - (func $~lib/util/string/compareImpl (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 @@ -1779,7 +909,7 @@ end local.get $3 ) - (func $~lib/string/String.__eq (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1825,7 +955,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $start:std/string-utf8 (; 11 ;) (type $FUNCSIG$v) + (func $start:std/string-utf8 (; 10 ;) (type $FUNCSIG$v) global.get $std/string-utf8/str call $~lib/string/String#get:lengthUTF8 global.set $std/string-utf8/len @@ -2070,10 +1200,10 @@ unreachable end ) - (func $start (; 12 ;) (type $FUNCSIG$v) + (func $start (; 11 ;) (type $FUNCSIG$v) call $start:std/string-utf8 ) - (func $null (; 13 ;) (type $FUNCSIG$v) + (func $null (; 12 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index 6c13880288..4d61e9f9c6 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -481,1208 +481,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/util/memory/memcpy (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1693,28 +492,6 @@ if br $~lib/util/memory/memmove|inlined.0 end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -1913,14 +690,14 @@ end end ) - (func $~lib/allocator/arena/__mem_free (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/runtime.register (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.register (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -1929,7 +706,7 @@ if i32.const 0 i32.const 136 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -1946,7 +723,7 @@ if i32.const 0 i32.const 136 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -1956,7 +733,7 @@ i32.store local.get $0 ) - (func $~lib/string/String.fromUTF8 (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.fromUTF8 (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2263,7 +1040,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/string/compareImpl (; 14 ;) (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 (; 13 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -2316,7 +1093,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2360,7 +1137,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $start:std/string-utf8 (; 16 ;) (type $FUNCSIG$v) + (func $start:std/string-utf8 (; 15 ;) (type $FUNCSIG$v) global.get $std/string-utf8/str call $~lib/string/String#get:lengthUTF8 global.set $std/string-utf8/len @@ -2627,9 +1404,9 @@ global.get $std/string-utf8/ptr call $~lib/memory/memory.free ) - (func $start (; 17 ;) (type $FUNCSIG$v) + (func $start (; 16 ;) (type $FUNCSIG$v) call $start:std/string-utf8 ) - (func $null (; 18 ;) (type $FUNCSIG$v) + (func $null (; 17 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 2895b8fc40..08a56244c4 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -145,186 +145,188 @@ (data (i32.const 1864) "a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m") (data (i32.const 1896) "\01\00\00\00\1a") (data (i32.const 1912) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1944) "\01\00\00\00\n") - (data (i32.const 1960) "a\00,\00b\00,\00c") - (data (i32.const 1976) "\01\00\00\00\02") - (data (i32.const 1992) ".") - (data (i32.const 2000) "\01\00\00\00\02") - (data (i32.const 2016) "c") - (data (i32.const 2024) "\01\00\00\00\0e") - (data (i32.const 2040) "a\00,\00 \00b\00,\00 \00c") - (data (i32.const 2056) "\01\00\00\00\04") - (data (i32.const 2072) ",\00 ") - (data (i32.const 2080) "\01\00\00\00\0c") - (data (i32.const 2096) "a\00,\00b\00,\00,\00c") - (data (i32.const 2112) "\01\00\00\00\0c") - (data (i32.const 2128) ",\00a\00,\00b\00,\00c") - (data (i32.const 2144) "\01\00\00\00\0c") - (data (i32.const 2160) "a\00,\00b\00,\00c\00,") - (data (i32.const 2176) "\03\00\00\00\90\01") - (data (i32.const 2192) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 2592) "\04\00\00\00\10") - (data (i32.const 2608) "\90\08\00\00\90\08\00\00\90\01\00\00d") - (data (i32.const 2624) "\01\00\00\00\02") - (data (i32.const 2640) "8") - (data (i32.const 2648) "\01\00\00\00\n") - (data (i32.const 2664) "-\001\000\000\000") - (data (i32.const 2680) "\01\00\00\00\08") - (data (i32.const 2696) "1\002\003\004") + (data (i32.const 1944) "\01\00\00\00(") + (data (i32.const 1960) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 2000) "\01\00\00\00\n") + (data (i32.const 2016) "a\00,\00b\00,\00c") + (data (i32.const 2032) "\01\00\00\00\02") + (data (i32.const 2048) ".") + (data (i32.const 2056) "\01\00\00\00\02") + (data (i32.const 2072) "c") + (data (i32.const 2080) "\01\00\00\00\0e") + (data (i32.const 2096) "a\00,\00 \00b\00,\00 \00c") + (data (i32.const 2112) "\01\00\00\00\04") + (data (i32.const 2128) ",\00 ") + (data (i32.const 2136) "\01\00\00\00\0c") + (data (i32.const 2152) "a\00,\00b\00,\00,\00c") + (data (i32.const 2168) "\01\00\00\00\0c") + (data (i32.const 2184) ",\00a\00,\00b\00,\00c") + (data (i32.const 2200) "\01\00\00\00\0c") + (data (i32.const 2216) "a\00,\00b\00,\00c\00,") + (data (i32.const 2232) "\03\00\00\00\90\01") + (data (i32.const 2248) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") + (data (i32.const 2648) "\04\00\00\00\10") + (data (i32.const 2664) "\c8\08\00\00\c8\08\00\00\90\01\00\00d") + (data (i32.const 2680) "\01\00\00\00\02") + (data (i32.const 2696) "8") (data (i32.const 2704) "\01\00\00\00\n") - (data (i32.const 2720) "1\002\003\004\005") - (data (i32.const 2736) "\01\00\00\00\0c") - (data (i32.const 2752) "1\002\003\004\005\006") - (data (i32.const 2768) "\01\00\00\00\0e") - (data (i32.const 2784) "1\001\001\001\001\001\001") - (data (i32.const 2800) "\01\00\00\00\0e") - (data (i32.const 2816) "1\002\003\004\005\006\007") - (data (i32.const 2832) "\01\00\00\00\14") - (data (i32.const 2848) "2\001\004\007\004\008\003\006\004\006") - (data (i32.const 2872) "\01\00\00\00\14") - (data (i32.const 2888) "2\001\004\007\004\008\003\006\004\007") - (data (i32.const 2912) "\01\00\00\00\16") - (data (i32.const 2928) "-\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 2952) "\01\00\00\00\04") - (data (i32.const 2968) "-\001") - (data (i32.const 2976) "\01\00\00\00\08") - (data (i32.const 2992) "1\000\000\000") - (data (i32.const 3000) "\01\00\00\00\14") - (data (i32.const 3016) "2\001\004\007\004\008\003\006\004\008") - (data (i32.const 3040) "\01\00\00\00\14") - (data (i32.const 3056) "4\002\009\004\009\006\007\002\009\005") - (data (i32.const 3080) "\01\00\00\00\10") - (data (i32.const 3096) "9\009\009\009\009\009\009\009") - (data (i32.const 3112) "\01\00\00\00\12") - (data (i32.const 3128) "1\000\000\000\000\000\000\000\000") - (data (i32.const 3152) "\01\00\00\00\16") - (data (i32.const 3168) "6\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3192) "\01\00\00\00\18") - (data (i32.const 3208) "8\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3232) "\01\00\00\00\1e") - (data (i32.const 3248) "9\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3280) "\01\00\00\00 ") - (data (i32.const 3296) "9\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3328) "\01\00\00\00\"") - (data (i32.const 3344) "1\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3384) "\01\00\00\00(") - (data (i32.const 3400) "1\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005") - (data (i32.const 3440) "\01\00\00\00\n") - (data (i32.const 3456) "-\001\002\003\004") - (data (i32.const 3472) "\01\00\00\00\16") - (data (i32.const 3488) "-\004\002\009\004\009\006\007\002\009\005") - (data (i32.const 3512) "\01\00\00\00\18") - (data (i32.const 3528) "-\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3552) "\01\00\00\00\1a") - (data (i32.const 3568) "-\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3600) "\01\00\00\00 ") - (data (i32.const 3616) "-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3648) "\01\00\00\00$") - (data (i32.const 3664) "-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3704) "\01\00\00\00&") - (data (i32.const 3720) "9\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007") - (data (i32.const 3760) "\01\00\00\00(") - (data (i32.const 3776) "-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008") - (data (i32.const 3816) "\01\00\00\00\06") - (data (i32.const 3832) "0\00.\000") - (data (i32.const 3840) "\01\00\00\00\06") - (data (i32.const 3856) "N\00a\00N") - (data (i32.const 3864) "\01\00\00\00\12") - (data (i32.const 3880) "-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3904) "\01\00\00\00\10") - (data (i32.const 3920) "I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3936) "\03\00\00\00\b8\02") - (data (i32.const 3952) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8 (; 17 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/util/string/parse (; 16 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2379,7 +1511,7 @@ local.get $5 f64.mul ) - (func $~lib/string/parseFloat (; 18 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 17 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 f64) @@ -2549,7 +1681,7 @@ local.get $3 f64.mul ) - (func $~lib/string/String#concat (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2598,7 +1730,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String.__concat (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 352 local.get $0 @@ -2606,13 +1738,13 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.__ne (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__eq i32.eqz ) - (func $~lib/string/String.__gt (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block (result i32) @@ -2677,7 +1809,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.__lt (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block (result i32) @@ -2742,19 +1874,19 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String.__gte (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gte (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__lt i32.eqz ) - (func $~lib/string/String.__lte (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.__lte (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 120 local.get $0 call $~lib/string/String.__gt i32.eqz ) - (func $~lib/string/String#repeat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2834,7 +1966,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String#slice (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 26 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.const 16 @@ -2912,7 +2044,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/runtime/runtime.newArray (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2947,7 +2079,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/memory/memory.fill (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -3158,7 +2290,7 @@ end end ) - (func $~lib/runtime/runtime.reallocate (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/reallocate (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3192,7 +2324,7 @@ i32.shl i32.const 0 local.get $0 - i32.const 6736 + i32.const 6792 i32.gt_u select local.get $3 @@ -3230,13 +2362,13 @@ i32.eq if local.get $0 - i32.const 6736 + i32.const 6792 i32.le_u if i32.const 0 - i32.const 184 - i32.const 77 - i32.const 10 + i32.const 1960 + i32.const 74 + i32.const 8 call $~lib/env/abort unreachable end @@ -3260,7 +2392,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureCapacity (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3276,7 +2408,7 @@ if i32.const 0 i32.const 1912 - i32.const 15 + i32.const 14 i32.const 64 call $~lib/env/abort unreachable @@ -3288,7 +2420,7 @@ i32.const 2 i32.shl local.tee $3 - call $~lib/runtime/runtime.reallocate + call $~lib/util/runtime/reallocate local.set $1 local.get $1 local.get $2 @@ -3309,7 +2441,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array<~lib/string/String>#push (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#push (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3339,7 +2471,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/string/String#split (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3590,7 +2722,7 @@ end local.get $2 ) - (func $~lib/array/Array<~lib/string/String>#__get (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3598,7 +2730,7 @@ if i32.const 0 i32.const 1912 - i32.const 97 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -3612,7 +2744,7 @@ if i32.const 0 i32.const 1912 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -3625,7 +2757,7 @@ i32.add i32.load ) - (func $~lib/util/number/decimalCount32 (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -3679,10 +2811,10 @@ end end ) - (func $~lib/util/number/utoa32_lut (; 36 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - i32.const 2612 + i32.const 2668 i32.load local.set $3 loop $continue|0 @@ -3789,7 +2921,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3831,7 +2963,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/utoa32 (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3854,7 +2986,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/decimalCount64 (; 39 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 38 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -3908,12 +3040,12 @@ end end ) - (func $~lib/util/number/utoa64_lut (; 40 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 39 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 2612 + i32.const 2668 i32.load local.set $3 loop $continue|0 @@ -4005,7 +3137,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 41 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 40 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4047,7 +3179,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa64 (; 42 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 41 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4112,7 +3244,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/genDigits (; 43 ;) (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 (; 42 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -4147,7 +3279,7 @@ local.tee $7 call $~lib/util/number/decimalCount32 local.set $4 - i32.const 4980 + i32.const 5036 i32.load local.set $13 loop $continue|0 @@ -4527,7 +3659,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -4786,7 +3918,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 45 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 44 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -4902,7 +4034,7 @@ i32.shl i32.sub global.set $~lib/util/number/_K - i32.const 4668 + i32.const 4724 i32.load local.get $3 i32.const 3 @@ -4910,7 +4042,7 @@ i32.add i64.load global.set $~lib/util/number/_frc_pow - i32.const 4892 + i32.const 4948 i32.load local.get $3 i32.const 1 @@ -5074,7 +4206,7 @@ local.get $10 i32.add ) - (func $~lib/string/String#substring (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5170,14 +4302,14 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/runtime/runtime.discard (; 47 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 6736 + i32.const 6792 i32.le_u if i32.const 0 i32.const 184 - i32.const 103 + i32.const 68 i32.const 6 call $~lib/env/abort unreachable @@ -5191,20 +4323,20 @@ if i32.const 0 i32.const 184 - i32.const 105 + i32.const 70 i32.const 6 call $~lib/env/abort unreachable end ) - (func $~lib/util/number/dtoa (; 48 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 47 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 f64.const 0 f64.eq if - i32.const 3832 + i32.const 3888 return end local.get $0 @@ -5217,11 +4349,11 @@ local.get $0 f64.ne if - i32.const 3856 + i32.const 3912 return end - i32.const 3880 - i32.const 3920 + i32.const 3936 + i32.const 3976 local.get $0 f64.const 0 f64.lt @@ -5242,7 +4374,7 @@ call $~lib/runtime/runtime.discard local.get $1 ) - (func $start:std/string (; 49 ;) (type $FUNCSIG$v) + (func $start:std/string (; 48 ;) (type $FUNCSIG$v) (local $0 i32) global.get $std/string/str i32.const 24 @@ -5341,7 +4473,7 @@ call $~lib/env/abort unreachable end - i32.const 6736 + i32.const 6792 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -6847,8 +5979,8 @@ call $~lib/env/abort unreachable end - i32.const 1960 - i32.const 1992 + i32.const 2016 + i32.const 2048 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -6861,7 +5993,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1960 + i32.const 2016 call $~lib/string/String.__eq local.set $0 end @@ -6875,7 +6007,7 @@ call $~lib/env/abort unreachable end - i32.const 1960 + i32.const 2016 i32.const 720 i32.const 2147483647 call $~lib/string/String#split @@ -6911,7 +6043,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 2072 call $~lib/string/String.__eq local.set $0 end @@ -6925,8 +6057,8 @@ call $~lib/env/abort unreachable end - i32.const 2040 - i32.const 2072 + i32.const 2096 + i32.const 2128 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -6961,7 +6093,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 2072 call $~lib/string/String.__eq local.set $0 end @@ -6975,7 +6107,7 @@ call $~lib/env/abort unreachable end - i32.const 2096 + i32.const 2152 i32.const 720 i32.const 2147483647 call $~lib/string/String#split @@ -7022,7 +6154,7 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 2072 call $~lib/string/String.__eq local.set $0 end @@ -7036,7 +6168,7 @@ call $~lib/env/abort unreachable end - i32.const 2128 + i32.const 2184 i32.const 720 i32.const 2147483647 call $~lib/string/String#split @@ -7083,7 +6215,7 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 2072 call $~lib/string/String.__eq local.set $0 end @@ -7097,7 +6229,7 @@ call $~lib/env/abort unreachable end - i32.const 2160 + i32.const 2216 i32.const 720 i32.const 2147483647 call $~lib/string/String#split @@ -7134,7 +6266,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 2072 call $~lib/string/String.__eq local.set $0 end @@ -7194,7 +6326,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 2072 call $~lib/string/String.__eq local.set $0 end @@ -7251,7 +6383,7 @@ call $~lib/env/abort unreachable end - i32.const 1960 + i32.const 2016 i32.const 720 i32.const 1 call $~lib/string/String#split @@ -7315,7 +6447,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 2072 call $~lib/string/String.__eq local.set $0 end @@ -7365,7 +6497,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 2072 call $~lib/string/String.__eq local.set $0 end @@ -7379,7 +6511,7 @@ call $~lib/env/abort unreachable end - i32.const 1960 + i32.const 2016 i32.const 720 i32.const -1 call $~lib/string/String#split @@ -7415,7 +6547,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 2072 call $~lib/string/String.__eq local.set $0 end @@ -7457,7 +6589,7 @@ end i32.const 8 call $~lib/util/number/itoa32 - i32.const 2640 + i32.const 2696 call $~lib/string/String.__eq i32.eqz if @@ -7483,7 +6615,7 @@ end i32.const -1000 call $~lib/util/number/itoa32 - i32.const 2664 + i32.const 2720 call $~lib/string/String.__eq i32.eqz if @@ -7496,7 +6628,7 @@ end i32.const 1234 call $~lib/util/number/itoa32 - i32.const 2696 + i32.const 2752 call $~lib/string/String.__eq i32.eqz if @@ -7509,7 +6641,7 @@ end i32.const 12345 call $~lib/util/number/itoa32 - i32.const 2720 + i32.const 2776 call $~lib/string/String.__eq i32.eqz if @@ -7522,7 +6654,7 @@ end i32.const 123456 call $~lib/util/number/itoa32 - i32.const 2752 + i32.const 2808 call $~lib/string/String.__eq i32.eqz if @@ -7535,7 +6667,7 @@ end i32.const 1111111 call $~lib/util/number/itoa32 - i32.const 2784 + i32.const 2840 call $~lib/string/String.__eq i32.eqz if @@ -7548,7 +6680,7 @@ end i32.const 1234567 call $~lib/util/number/itoa32 - i32.const 2816 + i32.const 2872 call $~lib/string/String.__eq i32.eqz if @@ -7561,7 +6693,7 @@ end i32.const 2147483646 call $~lib/util/number/itoa32 - i32.const 2848 + i32.const 2904 call $~lib/string/String.__eq i32.eqz if @@ -7574,7 +6706,7 @@ end i32.const 2147483647 call $~lib/util/number/itoa32 - i32.const 2888 + i32.const 2944 call $~lib/string/String.__eq i32.eqz if @@ -7587,7 +6719,7 @@ end i32.const -2147483648 call $~lib/util/number/itoa32 - i32.const 2928 + i32.const 2984 call $~lib/string/String.__eq i32.eqz if @@ -7600,7 +6732,7 @@ end i32.const -1 call $~lib/util/number/itoa32 - i32.const 2968 + i32.const 3024 call $~lib/string/String.__eq i32.eqz if @@ -7626,7 +6758,7 @@ end i32.const 1000 call $~lib/util/number/utoa32 - i32.const 2992 + i32.const 3048 call $~lib/string/String.__eq i32.eqz if @@ -7639,7 +6771,7 @@ end i32.const 2147483647 call $~lib/util/number/utoa32 - i32.const 2888 + i32.const 2944 call $~lib/string/String.__eq i32.eqz if @@ -7652,7 +6784,7 @@ end i32.const -2147483648 call $~lib/util/number/utoa32 - i32.const 3016 + i32.const 3072 call $~lib/string/String.__eq i32.eqz if @@ -7665,7 +6797,7 @@ end i32.const -1 call $~lib/util/number/utoa32 - i32.const 3056 + i32.const 3112 call $~lib/string/String.__eq i32.eqz if @@ -7691,7 +6823,7 @@ end i64.const 1234 call $~lib/util/number/utoa64 - i32.const 2696 + i32.const 2752 call $~lib/string/String.__eq i32.eqz if @@ -7704,7 +6836,7 @@ end i64.const 99999999 call $~lib/util/number/utoa64 - i32.const 3096 + i32.const 3152 call $~lib/string/String.__eq i32.eqz if @@ -7717,7 +6849,7 @@ end i64.const 100000000 call $~lib/util/number/utoa64 - i32.const 3128 + i32.const 3184 call $~lib/string/String.__eq i32.eqz if @@ -7730,7 +6862,7 @@ end i64.const 4294967295 call $~lib/util/number/utoa64 - i32.const 3056 + i32.const 3112 call $~lib/string/String.__eq i32.eqz if @@ -7743,7 +6875,7 @@ end i64.const 68719476735 call $~lib/util/number/utoa64 - i32.const 3168 + i32.const 3224 call $~lib/string/String.__eq i32.eqz if @@ -7756,7 +6888,7 @@ end i64.const 868719476735 call $~lib/util/number/utoa64 - i32.const 3208 + i32.const 3264 call $~lib/string/String.__eq i32.eqz if @@ -7769,7 +6901,7 @@ end i64.const 999868719476735 call $~lib/util/number/utoa64 - i32.const 3248 + i32.const 3304 call $~lib/string/String.__eq i32.eqz if @@ -7782,7 +6914,7 @@ end i64.const 9999868719476735 call $~lib/util/number/utoa64 - i32.const 3296 + i32.const 3352 call $~lib/string/String.__eq i32.eqz if @@ -7795,7 +6927,7 @@ end i64.const 19999868719476735 call $~lib/util/number/utoa64 - i32.const 3344 + i32.const 3400 call $~lib/string/String.__eq i32.eqz if @@ -7808,7 +6940,7 @@ end i64.const -1 call $~lib/util/number/utoa64 - i32.const 3400 + i32.const 3456 call $~lib/string/String.__eq i32.eqz if @@ -7834,7 +6966,7 @@ end i64.const -1234 call $~lib/util/number/itoa64 - i32.const 3456 + i32.const 3512 call $~lib/string/String.__eq i32.eqz if @@ -7847,7 +6979,7 @@ end i64.const 4294967295 call $~lib/util/number/itoa64 - i32.const 3056 + i32.const 3112 call $~lib/string/String.__eq i32.eqz if @@ -7860,7 +6992,7 @@ end i64.const -4294967295 call $~lib/util/number/itoa64 - i32.const 3488 + i32.const 3544 call $~lib/string/String.__eq i32.eqz if @@ -7873,7 +7005,7 @@ end i64.const 68719476735 call $~lib/util/number/itoa64 - i32.const 3168 + i32.const 3224 call $~lib/string/String.__eq i32.eqz if @@ -7886,7 +7018,7 @@ end i64.const -68719476735 call $~lib/util/number/itoa64 - i32.const 3528 + i32.const 3584 call $~lib/string/String.__eq i32.eqz if @@ -7899,7 +7031,7 @@ end i64.const -868719476735 call $~lib/util/number/itoa64 - i32.const 3568 + i32.const 3624 call $~lib/string/String.__eq i32.eqz if @@ -7912,7 +7044,7 @@ end i64.const -999868719476735 call $~lib/util/number/itoa64 - i32.const 3616 + i32.const 3672 call $~lib/string/String.__eq i32.eqz if @@ -7925,7 +7057,7 @@ end i64.const -19999868719476735 call $~lib/util/number/itoa64 - i32.const 3664 + i32.const 3720 call $~lib/string/String.__eq i32.eqz if @@ -7938,7 +7070,7 @@ end i64.const 9223372036854775807 call $~lib/util/number/itoa64 - i32.const 3720 + i32.const 3776 call $~lib/string/String.__eq i32.eqz if @@ -7951,7 +7083,7 @@ end i64.const -9223372036854775808 call $~lib/util/number/itoa64 - i32.const 3776 + i32.const 3832 call $~lib/string/String.__eq i32.eqz if @@ -7964,7 +7096,7 @@ end f64.const 0 call $~lib/util/number/dtoa - i32.const 3832 + i32.const 3888 call $~lib/string/String.__eq i32.eqz if @@ -7977,7 +7109,7 @@ end f64.const -0 call $~lib/util/number/dtoa - i32.const 3832 + i32.const 3888 call $~lib/string/String.__eq i32.eqz if @@ -7990,7 +7122,7 @@ end f64.const nan:0x8000000000000 call $~lib/util/number/dtoa - i32.const 3856 + i32.const 3912 call $~lib/string/String.__eq i32.eqz if @@ -8003,7 +7135,7 @@ end f64.const inf call $~lib/util/number/dtoa - i32.const 3920 + i32.const 3976 call $~lib/string/String.__eq i32.eqz if @@ -8016,7 +7148,7 @@ end f64.const -inf call $~lib/util/number/dtoa - i32.const 3880 + i32.const 3936 call $~lib/string/String.__eq i32.eqz if @@ -8029,7 +7161,7 @@ end f64.const 2.220446049250313e-16 call $~lib/util/number/dtoa - i32.const 5008 + i32.const 5064 call $~lib/string/String.__eq i32.eqz if @@ -8042,7 +7174,7 @@ end f64.const -2.220446049250313e-16 call $~lib/util/number/dtoa - i32.const 5072 + i32.const 5128 call $~lib/string/String.__eq i32.eqz if @@ -8055,7 +7187,7 @@ end f64.const 1797693134862315708145274e284 call $~lib/util/number/dtoa - i32.const 5136 + i32.const 5192 call $~lib/string/String.__eq i32.eqz if @@ -8068,7 +7200,7 @@ end f64.const -1797693134862315708145274e284 call $~lib/util/number/dtoa - i32.const 5200 + i32.const 5256 call $~lib/string/String.__eq i32.eqz if @@ -8081,7 +7213,7 @@ end f64.const 4185580496821356722454785e274 call $~lib/util/number/dtoa - i32.const 5264 + i32.const 5320 call $~lib/string/String.__eq i32.eqz if @@ -8094,7 +7226,7 @@ end f64.const 2.2250738585072014e-308 call $~lib/util/number/dtoa - i32.const 5328 + i32.const 5384 call $~lib/string/String.__eq i32.eqz if @@ -8107,7 +7239,7 @@ end f64.const 4.940656e-318 call $~lib/util/number/dtoa - i32.const 5392 + i32.const 5448 call $~lib/string/String.__eq i32.eqz if @@ -8120,7 +7252,7 @@ end f64.const 9060801153433600 call $~lib/util/number/dtoa - i32.const 5440 + i32.const 5496 call $~lib/string/String.__eq i32.eqz if @@ -8133,7 +7265,7 @@ end f64.const 4708356024711512064 call $~lib/util/number/dtoa - i32.const 5496 + i32.const 5552 call $~lib/string/String.__eq i32.eqz if @@ -8146,7 +7278,7 @@ end f64.const 9409340012568248320 call $~lib/util/number/dtoa - i32.const 5560 + i32.const 5616 call $~lib/string/String.__eq i32.eqz if @@ -8159,7 +7291,7 @@ end f64.const 5e-324 call $~lib/util/number/dtoa - i32.const 5624 + i32.const 5680 call $~lib/string/String.__eq i32.eqz if @@ -8172,7 +7304,7 @@ end f64.const 1 call $~lib/util/number/dtoa - i32.const 5656 + i32.const 5712 call $~lib/string/String.__eq i32.eqz if @@ -8198,7 +7330,7 @@ end f64.const -1 call $~lib/util/number/dtoa - i32.const 5680 + i32.const 5736 call $~lib/string/String.__eq i32.eqz if @@ -8211,7 +7343,7 @@ end f64.const -0.1 call $~lib/util/number/dtoa - i32.const 5704 + i32.const 5760 call $~lib/string/String.__eq i32.eqz if @@ -8224,7 +7356,7 @@ end f64.const 1e6 call $~lib/util/number/dtoa - i32.const 5728 + i32.const 5784 call $~lib/string/String.__eq i32.eqz if @@ -8237,7 +7369,7 @@ end f64.const 1e-06 call $~lib/util/number/dtoa - i32.const 5768 + i32.const 5824 call $~lib/string/String.__eq i32.eqz if @@ -8250,7 +7382,7 @@ end f64.const -1e6 call $~lib/util/number/dtoa - i32.const 5800 + i32.const 5856 call $~lib/string/String.__eq i32.eqz if @@ -8263,7 +7395,7 @@ end f64.const -1e-06 call $~lib/util/number/dtoa - i32.const 5840 + i32.const 5896 call $~lib/string/String.__eq i32.eqz if @@ -8276,7 +7408,7 @@ end f64.const 1e7 call $~lib/util/number/dtoa - i32.const 5880 + i32.const 5936 call $~lib/string/String.__eq i32.eqz if @@ -8289,7 +7421,7 @@ end f64.const 1e-07 call $~lib/util/number/dtoa - i32.const 5920 + i32.const 5976 call $~lib/string/String.__eq i32.eqz if @@ -8302,7 +7434,7 @@ end f64.const 1.e+308 call $~lib/util/number/dtoa - i32.const 5944 + i32.const 6000 call $~lib/string/String.__eq i32.eqz if @@ -8315,7 +7447,7 @@ end f64.const -1.e+308 call $~lib/util/number/dtoa - i32.const 5976 + i32.const 6032 call $~lib/string/String.__eq i32.eqz if @@ -8328,7 +7460,7 @@ end f64.const inf call $~lib/util/number/dtoa - i32.const 3920 + i32.const 3976 call $~lib/string/String.__eq i32.eqz if @@ -8341,7 +7473,7 @@ end f64.const -inf call $~lib/util/number/dtoa - i32.const 3880 + i32.const 3936 call $~lib/string/String.__eq i32.eqz if @@ -8354,7 +7486,7 @@ end f64.const 1e-308 call $~lib/util/number/dtoa - i32.const 6008 + i32.const 6064 call $~lib/string/String.__eq i32.eqz if @@ -8367,7 +7499,7 @@ end f64.const -1e-308 call $~lib/util/number/dtoa - i32.const 6040 + i32.const 6096 call $~lib/string/String.__eq i32.eqz if @@ -8380,7 +7512,7 @@ end f64.const 1e-323 call $~lib/util/number/dtoa - i32.const 6072 + i32.const 6128 call $~lib/string/String.__eq i32.eqz if @@ -8393,7 +7525,7 @@ end f64.const -1e-323 call $~lib/util/number/dtoa - i32.const 6104 + i32.const 6160 call $~lib/string/String.__eq i32.eqz if @@ -8406,7 +7538,7 @@ end f64.const 0 call $~lib/util/number/dtoa - i32.const 3832 + i32.const 3888 call $~lib/string/String.__eq i32.eqz if @@ -8419,7 +7551,7 @@ end f64.const 4294967272 call $~lib/util/number/dtoa - i32.const 6136 + i32.const 6192 call $~lib/string/String.__eq i32.eqz if @@ -8432,7 +7564,7 @@ end f64.const 1.2312145673456234e-08 call $~lib/util/number/dtoa - i32.const 6176 + i32.const 6232 call $~lib/string/String.__eq i32.eqz if @@ -8445,7 +7577,7 @@ end f64.const 555555555.5555556 call $~lib/util/number/dtoa - i32.const 6240 + i32.const 6296 call $~lib/string/String.__eq i32.eqz if @@ -8458,7 +7590,7 @@ end f64.const 0.9999999999999999 call $~lib/util/number/dtoa - i32.const 6296 + i32.const 6352 call $~lib/string/String.__eq i32.eqz if @@ -8471,7 +7603,7 @@ end f64.const 1 call $~lib/util/number/dtoa - i32.const 5656 + i32.const 5712 call $~lib/string/String.__eq i32.eqz if @@ -8484,7 +7616,7 @@ end f64.const 12.34 call $~lib/util/number/dtoa - i32.const 6352 + i32.const 6408 call $~lib/string/String.__eq i32.eqz if @@ -8497,7 +7629,7 @@ end f64.const 0.3333333333333333 call $~lib/util/number/dtoa - i32.const 6384 + i32.const 6440 call $~lib/string/String.__eq i32.eqz if @@ -8510,7 +7642,7 @@ end f64.const 1234e17 call $~lib/util/number/dtoa - i32.const 6440 + i32.const 6496 call $~lib/string/String.__eq i32.eqz if @@ -8523,7 +7655,7 @@ end f64.const 1234e18 call $~lib/util/number/dtoa - i32.const 6504 + i32.const 6560 call $~lib/string/String.__eq i32.eqz if @@ -8536,7 +7668,7 @@ end f64.const 2.71828 call $~lib/util/number/dtoa - i32.const 6544 + i32.const 6600 call $~lib/string/String.__eq i32.eqz if @@ -8549,7 +7681,7 @@ end f64.const 0.0271828 call $~lib/util/number/dtoa - i32.const 6576 + i32.const 6632 call $~lib/string/String.__eq i32.eqz if @@ -8562,7 +7694,7 @@ end f64.const 271.828 call $~lib/util/number/dtoa - i32.const 6616 + i32.const 6672 call $~lib/string/String.__eq i32.eqz if @@ -8575,7 +7707,7 @@ end f64.const 1.1e+128 call $~lib/util/number/dtoa - i32.const 6648 + i32.const 6704 call $~lib/string/String.__eq i32.eqz if @@ -8588,7 +7720,7 @@ end f64.const 1.1e-64 call $~lib/util/number/dtoa - i32.const 6680 + i32.const 6736 call $~lib/string/String.__eq i32.eqz if @@ -8601,7 +7733,7 @@ end f64.const 0.000035689 call $~lib/util/number/dtoa - i32.const 6712 + i32.const 6768 call $~lib/string/String.__eq i32.eqz if @@ -8613,13 +7745,13 @@ unreachable end ) - (func $std/string/getString (; 50 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 49 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 51 ;) (type $FUNCSIG$v) + (func $start (; 50 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 52 ;) (type $FUNCSIG$v) + (func $null (; 51 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index db3264246c..7c1e32a2ba 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -85,96 +85,97 @@ (data (i32.const 1816) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00d\00e\00f\00g\00h\00") (data (i32.const 1848) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00") (data (i32.const 1896) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 1944) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00a\00,\00b\00,\00c\00") - (data (i32.const 1976) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00.\00") - (data (i32.const 2000) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00c\00") - (data (i32.const 2024) "\01\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00a\00,\00 \00b\00,\00 \00c\00") - (data (i32.const 2056) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00,\00 \00") - (data (i32.const 2080) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00a\00,\00b\00,\00,\00c\00") - (data (i32.const 2112) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00,\00a\00,\00b\00,\00c\00") - (data (i32.const 2144) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00a\00,\00b\00,\00c\00,\00") - (data (i32.const 2176) "\03\00\00\00\90\01\00\00\00\00\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") - (data (i32.const 2592) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\90\08\00\00\90\08\00\00\90\01\00\00d\00\00\00") - (data (i32.const 2624) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\008\00") - (data (i32.const 2648) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00-\001\000\000\000\00") - (data (i32.const 2680) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\001\002\003\004\00") - (data (i32.const 2704) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\001\002\003\004\005\00") - (data (i32.const 2736) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\001\002\003\004\005\006\00") - (data (i32.const 2768) "\01\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\001\001\001\001\001\001\001\00") - (data (i32.const 2800) "\01\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\001\002\003\004\005\006\007\00") - (data (i32.const 2832) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\002\001\004\007\004\008\003\006\004\006\00") - (data (i32.const 2872) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\002\001\004\007\004\008\003\006\004\007\00") - (data (i32.const 2912) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00-\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 2952) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00-\001\00") - (data (i32.const 2976) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\001\000\000\000\00") - (data (i32.const 3000) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 3040) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\004\002\009\004\009\006\007\002\009\005\00") - (data (i32.const 3080) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\009\009\009\009\009\009\009\009\00") - (data (i32.const 3112) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\001\000\000\000\000\000\000\000\000\00") - (data (i32.const 3152) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3192) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3232) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3280) "\01\00\00\00 \00\00\00\00\00\00\00\00\00\00\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3328) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3384) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\001\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005\00") - (data (i32.const 3440) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00-\001\002\003\004\00") - (data (i32.const 3472) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00-\004\002\009\004\009\006\007\002\009\005\00") - (data (i32.const 3512) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00-\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3552) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00-\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3600) "\01\00\00\00 \00\00\00\00\00\00\00\00\00\00\00-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3648) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3704) "\01\00\00\00&\00\00\00\00\00\00\00\00\00\00\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007\00") - (data (i32.const 3760) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008\00") - (data (i32.const 3816) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\000\00.\000\00") - (data (i32.const 3840) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00N\00a\00N\00") - (data (i32.const 3864) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 3904) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 3936) "\03\00\00\00\b8\02\00\00\00\00\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8 (; 23 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/util/string/parse (; 22 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2868,12 +1646,12 @@ local.get $7 f64.mul ) - (func $~lib/string/parseInt (; 24 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/string/parseInt (; 23 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $0 local.get $1 call $~lib/util/string/parse ) - (func $~lib/string/parseFloat (; 25 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 24 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3070,7 +1848,7 @@ local.get $5 f64.mul ) - (func $~lib/string/String#concat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3120,7 +1898,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String.__concat (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 352 local.get $0 @@ -3130,13 +1908,13 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.__ne (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__eq i32.eqz ) - (func $~lib/string/String.__gt (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3198,7 +1976,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.__lt (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3260,19 +2038,19 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String.__gte (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gte (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__lt i32.eqz ) - (func $~lib/string/String.__lte (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lte (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__gt i32.eqz ) - (func $~lib/string/String#repeat (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3355,7 +2133,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String#slice (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3445,13 +2223,13 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/collector/dummy/__ref_link (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_link (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/collector/dummy/__ref_unlink (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/dummy/__ref_unlink (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $~lib/runtime/runtime.newArray (; 37 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 36 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3513,7 +2291,7 @@ end local.get $4 ) - (func $~lib/memory/memory.fill (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3770,14 +2548,14 @@ end end ) - (func $~lib/allocator/arena/__mem_free (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/runtime.reallocate (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/reallocate (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3847,9 +2625,9 @@ i32.eqz if i32.const 0 - i32.const 184 - i32.const 77 - i32.const 10 + i32.const 1960 + i32.const 74 + i32.const 8 call $~lib/env/abort unreachable end @@ -3881,7 +2659,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3903,7 +2681,7 @@ if i32.const 0 i32.const 1912 - i32.const 15 + i32.const 14 i32.const 64 call $~lib/env/abort unreachable @@ -3917,7 +2695,7 @@ local.set $4 local.get $3 local.get $4 - call $~lib/runtime/runtime.reallocate + call $~lib/util/runtime/reallocate local.set $5 local.get $5 local.get $3 @@ -3955,7 +2733,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array<~lib/string/String>#push (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#push (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4005,7 +2783,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 44 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 43 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $0 @@ -4038,7 +2816,7 @@ call $~lib/collector/dummy/__ref_link end ) - (func $~lib/string/String#split (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4345,11 +3123,11 @@ end local.get $9 ) - (func $~lib/array/Array<~lib/string/String>#get:length (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#get:length (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -4358,7 +3136,7 @@ i32.add i32.load ) - (func $~lib/array/Array<~lib/string/String>#__get (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -4366,7 +3144,7 @@ if i32.const 0 i32.const 1912 - i32.const 97 + i32.const 96 i32.const 45 call $~lib/env/abort unreachable @@ -4380,7 +3158,7 @@ if i32.const 0 i32.const 1912 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -4389,7 +3167,7 @@ local.get $1 call $~lib/array/Array<~lib/string/String>#__unchecked_get ) - (func $~lib/util/number/decimalCount32 (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -4458,7 +3236,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa32_lut (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4466,7 +3244,7 @@ (local $7 i32) (local $8 i64) (local $9 i64) - i32.const 2608 + i32.const 2664 i32.load offset=4 local.set $3 block $break|0 @@ -4601,7 +3379,7 @@ i32.store16 end ) - (func $~lib/util/number/itoa32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4657,7 +3435,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/utoa32 (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4693,7 +3471,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/decimalCount64 (; 53 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 52 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -4762,7 +3540,7 @@ unreachable unreachable ) - (func $~lib/util/number/utoa64_lut (; 54 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 53 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -4774,7 +3552,7 @@ (local $11 i32) (local $12 i64) (local $13 i64) - i32.const 2608 + i32.const 2664 i32.load offset=4 local.set $3 block $break|0 @@ -4890,7 +3668,7 @@ local.get $2 call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (; 55 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 54 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4958,7 +3736,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/util/number/itoa64 (; 56 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 55 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5048,19 +3826,19 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/builtins/isFinite (; 57 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 56 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 58 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 57 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/array/Array#__unchecked_get (; 59 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__unchecked_get (; 58 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $0 i32.load offset=4 local.get $1 @@ -5069,7 +3847,7 @@ i32.add i64.load ) - (func $~lib/array/Array#__unchecked_get (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -5078,7 +3856,7 @@ i32.add i32.load16_s ) - (func $~lib/util/number/genDigits (; 61 ;) (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 (; 60 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -5134,7 +3912,7 @@ local.set $14 local.get $6 local.set $15 - i32.const 4976 + i32.const 5032 i32.load offset=4 local.set $16 block $break|0 @@ -5649,7 +4427,7 @@ end local.get $15 ) - (func $~lib/util/number/prettify (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5982,7 +4760,7 @@ unreachable unreachable ) - (func $~lib/util/number/dtoa_core (; 63 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 62 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -6151,11 +4929,11 @@ i32.shl i32.sub global.set $~lib/util/number/_K - i32.const 4664 + i32.const 4720 local.get $13 call $~lib/array/Array#__unchecked_get global.set $~lib/util/number/_frc_pow - i32.const 4888 + i32.const 4944 local.get $13 call $~lib/array/Array#__unchecked_get global.set $~lib/util/number/_exp_pow @@ -6420,7 +5198,7 @@ local.get $2 i32.add ) - (func $~lib/string/String#substring (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6538,7 +5316,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/runtime/runtime.discard (; 65 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.discard (; 64 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -6547,7 +5325,7 @@ if i32.const 0 i32.const 184 - i32.const 103 + i32.const 68 i32.const 6 call $~lib/env/abort unreachable @@ -6564,7 +5342,7 @@ if i32.const 0 i32.const 184 - i32.const 105 + i32.const 70 i32.const 6 call $~lib/env/abort unreachable @@ -6572,7 +5350,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/util/number/dtoa (; 66 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 65 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6580,7 +5358,7 @@ f64.const 0 f64.eq if - i32.const 3832 + i32.const 3888 return end local.get $0 @@ -6590,11 +5368,11 @@ local.get $0 call $~lib/builtins/isNaN if - i32.const 3856 + i32.const 3912 return end - i32.const 3880 - i32.const 3920 + i32.const 3936 + i32.const 3976 local.get $0 f64.const 0 f64.lt @@ -6619,7 +5397,7 @@ call $~lib/runtime/runtime.discard local.get $3 ) - (func $start:std/string (; 67 ;) (type $FUNCSIG$v) + (func $start:std/string (; 66 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8300,8 +7078,8 @@ call $~lib/env/abort unreachable end - i32.const 1960 - i32.const 1992 + i32.const 2016 + i32.const 2048 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -8314,7 +7092,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1960 + i32.const 2016 call $~lib/string/String.__eq else local.get $0 @@ -8328,7 +7106,7 @@ call $~lib/env/abort unreachable end - i32.const 1960 + i32.const 2016 i32.const 720 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split @@ -8362,7 +7140,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 2072 call $~lib/string/String.__eq else local.get $0 @@ -8376,8 +7154,8 @@ call $~lib/env/abort unreachable end - i32.const 2040 - i32.const 2072 + i32.const 2096 + i32.const 2128 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -8410,7 +7188,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 2072 call $~lib/string/String.__eq else local.get $0 @@ -8424,7 +7202,7 @@ call $~lib/env/abort unreachable end - i32.const 2096 + i32.const 2152 i32.const 720 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split @@ -8468,7 +7246,7 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 2072 call $~lib/string/String.__eq else local.get $0 @@ -8482,7 +7260,7 @@ call $~lib/env/abort unreachable end - i32.const 2128 + i32.const 2184 i32.const 720 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split @@ -8526,7 +7304,7 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 2072 call $~lib/string/String.__eq else local.get $0 @@ -8540,7 +7318,7 @@ call $~lib/env/abort unreachable end - i32.const 2160 + i32.const 2216 i32.const 720 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split @@ -8574,7 +7352,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 2072 call $~lib/string/String.__eq else local.get $0 @@ -8632,7 +7410,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 2072 call $~lib/string/String.__eq else local.get $0 @@ -8692,7 +7470,7 @@ call $~lib/env/abort unreachable end - i32.const 1960 + i32.const 2016 i32.const 720 i32.const 1 call $~lib/string/String#split @@ -8754,7 +7532,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 2072 call $~lib/string/String.__eq else local.get $0 @@ -8802,7 +7580,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 2072 call $~lib/string/String.__eq else local.get $0 @@ -8816,7 +7594,7 @@ call $~lib/env/abort unreachable end - i32.const 1960 + i32.const 2016 i32.const 720 i32.const -1 call $~lib/string/String#split @@ -8850,7 +7628,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 2072 call $~lib/string/String.__eq else local.get $0 @@ -8892,7 +7670,7 @@ end i32.const 8 call $~lib/util/number/itoa32 - i32.const 2640 + i32.const 2696 call $~lib/string/String.__eq i32.eqz if @@ -8918,7 +7696,7 @@ end i32.const -1000 call $~lib/util/number/itoa32 - i32.const 2664 + i32.const 2720 call $~lib/string/String.__eq i32.eqz if @@ -8931,7 +7709,7 @@ end i32.const 1234 call $~lib/util/number/itoa32 - i32.const 2696 + i32.const 2752 call $~lib/string/String.__eq i32.eqz if @@ -8944,7 +7722,7 @@ end i32.const 12345 call $~lib/util/number/itoa32 - i32.const 2720 + i32.const 2776 call $~lib/string/String.__eq i32.eqz if @@ -8957,7 +7735,7 @@ end i32.const 123456 call $~lib/util/number/itoa32 - i32.const 2752 + i32.const 2808 call $~lib/string/String.__eq i32.eqz if @@ -8970,7 +7748,7 @@ end i32.const 1111111 call $~lib/util/number/itoa32 - i32.const 2784 + i32.const 2840 call $~lib/string/String.__eq i32.eqz if @@ -8983,7 +7761,7 @@ end i32.const 1234567 call $~lib/util/number/itoa32 - i32.const 2816 + i32.const 2872 call $~lib/string/String.__eq i32.eqz if @@ -8996,7 +7774,7 @@ end i32.const 2147483646 call $~lib/util/number/itoa32 - i32.const 2848 + i32.const 2904 call $~lib/string/String.__eq i32.eqz if @@ -9009,7 +7787,7 @@ end i32.const 2147483647 call $~lib/util/number/itoa32 - i32.const 2888 + i32.const 2944 call $~lib/string/String.__eq i32.eqz if @@ -9022,7 +7800,7 @@ end i32.const -2147483648 call $~lib/util/number/itoa32 - i32.const 2928 + i32.const 2984 call $~lib/string/String.__eq i32.eqz if @@ -9035,7 +7813,7 @@ end i32.const -1 call $~lib/util/number/itoa32 - i32.const 2968 + i32.const 3024 call $~lib/string/String.__eq i32.eqz if @@ -9061,7 +7839,7 @@ end i32.const 1000 call $~lib/util/number/utoa32 - i32.const 2992 + i32.const 3048 call $~lib/string/String.__eq i32.eqz if @@ -9074,7 +7852,7 @@ end i32.const 2147483647 call $~lib/util/number/utoa32 - i32.const 2888 + i32.const 2944 call $~lib/string/String.__eq i32.eqz if @@ -9087,7 +7865,7 @@ end i32.const -2147483648 call $~lib/util/number/utoa32 - i32.const 3016 + i32.const 3072 call $~lib/string/String.__eq i32.eqz if @@ -9100,7 +7878,7 @@ end global.get $~lib/builtins/u32.MAX_VALUE call $~lib/util/number/utoa32 - i32.const 3056 + i32.const 3112 call $~lib/string/String.__eq i32.eqz if @@ -9126,7 +7904,7 @@ end i64.const 1234 call $~lib/util/number/utoa64 - i32.const 2696 + i32.const 2752 call $~lib/string/String.__eq i32.eqz if @@ -9139,7 +7917,7 @@ end i64.const 99999999 call $~lib/util/number/utoa64 - i32.const 3096 + i32.const 3152 call $~lib/string/String.__eq i32.eqz if @@ -9152,7 +7930,7 @@ end i64.const 100000000 call $~lib/util/number/utoa64 - i32.const 3128 + i32.const 3184 call $~lib/string/String.__eq i32.eqz if @@ -9165,7 +7943,7 @@ end i64.const 4294967295 call $~lib/util/number/utoa64 - i32.const 3056 + i32.const 3112 call $~lib/string/String.__eq i32.eqz if @@ -9178,7 +7956,7 @@ end i64.const 68719476735 call $~lib/util/number/utoa64 - i32.const 3168 + i32.const 3224 call $~lib/string/String.__eq i32.eqz if @@ -9191,7 +7969,7 @@ end i64.const 868719476735 call $~lib/util/number/utoa64 - i32.const 3208 + i32.const 3264 call $~lib/string/String.__eq i32.eqz if @@ -9204,7 +7982,7 @@ end i64.const 999868719476735 call $~lib/util/number/utoa64 - i32.const 3248 + i32.const 3304 call $~lib/string/String.__eq i32.eqz if @@ -9217,7 +7995,7 @@ end i64.const 9999868719476735 call $~lib/util/number/utoa64 - i32.const 3296 + i32.const 3352 call $~lib/string/String.__eq i32.eqz if @@ -9230,7 +8008,7 @@ end i64.const 19999868719476735 call $~lib/util/number/utoa64 - i32.const 3344 + i32.const 3400 call $~lib/string/String.__eq i32.eqz if @@ -9243,7 +8021,7 @@ end global.get $~lib/builtins/u64.MAX_VALUE call $~lib/util/number/utoa64 - i32.const 3400 + i32.const 3456 call $~lib/string/String.__eq i32.eqz if @@ -9269,7 +8047,7 @@ end i64.const -1234 call $~lib/util/number/itoa64 - i32.const 3456 + i32.const 3512 call $~lib/string/String.__eq i32.eqz if @@ -9282,7 +8060,7 @@ end i64.const 4294967295 call $~lib/util/number/itoa64 - i32.const 3056 + i32.const 3112 call $~lib/string/String.__eq i32.eqz if @@ -9295,7 +8073,7 @@ end i64.const -4294967295 call $~lib/util/number/itoa64 - i32.const 3488 + i32.const 3544 call $~lib/string/String.__eq i32.eqz if @@ -9308,7 +8086,7 @@ end i64.const 68719476735 call $~lib/util/number/itoa64 - i32.const 3168 + i32.const 3224 call $~lib/string/String.__eq i32.eqz if @@ -9321,7 +8099,7 @@ end i64.const -68719476735 call $~lib/util/number/itoa64 - i32.const 3528 + i32.const 3584 call $~lib/string/String.__eq i32.eqz if @@ -9334,7 +8112,7 @@ end i64.const -868719476735 call $~lib/util/number/itoa64 - i32.const 3568 + i32.const 3624 call $~lib/string/String.__eq i32.eqz if @@ -9347,7 +8125,7 @@ end i64.const -999868719476735 call $~lib/util/number/itoa64 - i32.const 3616 + i32.const 3672 call $~lib/string/String.__eq i32.eqz if @@ -9360,7 +8138,7 @@ end i64.const -19999868719476735 call $~lib/util/number/itoa64 - i32.const 3664 + i32.const 3720 call $~lib/string/String.__eq i32.eqz if @@ -9373,7 +8151,7 @@ end global.get $~lib/builtins/i64.MAX_VALUE call $~lib/util/number/itoa64 - i32.const 3720 + i32.const 3776 call $~lib/string/String.__eq i32.eqz if @@ -9386,7 +8164,7 @@ end global.get $~lib/builtins/i64.MIN_VALUE call $~lib/util/number/itoa64 - i32.const 3776 + i32.const 3832 call $~lib/string/String.__eq i32.eqz if @@ -9399,7 +8177,7 @@ end f64.const 0 call $~lib/util/number/dtoa - i32.const 3832 + i32.const 3888 call $~lib/string/String.__eq i32.eqz if @@ -9412,7 +8190,7 @@ end f64.const -0 call $~lib/util/number/dtoa - i32.const 3832 + i32.const 3888 call $~lib/string/String.__eq i32.eqz if @@ -9425,7 +8203,7 @@ end f64.const nan:0x8000000000000 call $~lib/util/number/dtoa - i32.const 3856 + i32.const 3912 call $~lib/string/String.__eq i32.eqz if @@ -9438,7 +8216,7 @@ end f64.const inf call $~lib/util/number/dtoa - i32.const 3920 + i32.const 3976 call $~lib/string/String.__eq i32.eqz if @@ -9452,7 +8230,7 @@ f64.const inf f64.neg call $~lib/util/number/dtoa - i32.const 3880 + i32.const 3936 call $~lib/string/String.__eq i32.eqz if @@ -9465,7 +8243,7 @@ end global.get $~lib/builtins/f64.EPSILON call $~lib/util/number/dtoa - i32.const 5008 + i32.const 5064 call $~lib/string/String.__eq i32.eqz if @@ -9479,7 +8257,7 @@ global.get $~lib/builtins/f64.EPSILON f64.neg call $~lib/util/number/dtoa - i32.const 5072 + i32.const 5128 call $~lib/string/String.__eq i32.eqz if @@ -9492,7 +8270,7 @@ end global.get $~lib/builtins/f64.MAX_VALUE call $~lib/util/number/dtoa - i32.const 5136 + i32.const 5192 call $~lib/string/String.__eq i32.eqz if @@ -9506,7 +8284,7 @@ global.get $~lib/builtins/f64.MAX_VALUE f64.neg call $~lib/util/number/dtoa - i32.const 5200 + i32.const 5256 call $~lib/string/String.__eq i32.eqz if @@ -9519,7 +8297,7 @@ end f64.const 4185580496821356722454785e274 call $~lib/util/number/dtoa - i32.const 5264 + i32.const 5320 call $~lib/string/String.__eq i32.eqz if @@ -9532,7 +8310,7 @@ end f64.const 2.2250738585072014e-308 call $~lib/util/number/dtoa - i32.const 5328 + i32.const 5384 call $~lib/string/String.__eq i32.eqz if @@ -9545,7 +8323,7 @@ end f64.const 4.940656e-318 call $~lib/util/number/dtoa - i32.const 5392 + i32.const 5448 call $~lib/string/String.__eq i32.eqz if @@ -9558,7 +8336,7 @@ end f64.const 9060801153433600 call $~lib/util/number/dtoa - i32.const 5440 + i32.const 5496 call $~lib/string/String.__eq i32.eqz if @@ -9571,7 +8349,7 @@ end f64.const 4708356024711512064 call $~lib/util/number/dtoa - i32.const 5496 + i32.const 5552 call $~lib/string/String.__eq i32.eqz if @@ -9584,7 +8362,7 @@ end f64.const 9409340012568248320 call $~lib/util/number/dtoa - i32.const 5560 + i32.const 5616 call $~lib/string/String.__eq i32.eqz if @@ -9597,7 +8375,7 @@ end f64.const 5e-324 call $~lib/util/number/dtoa - i32.const 5624 + i32.const 5680 call $~lib/string/String.__eq i32.eqz if @@ -9610,7 +8388,7 @@ end f64.const 1 call $~lib/util/number/dtoa - i32.const 5656 + i32.const 5712 call $~lib/string/String.__eq i32.eqz if @@ -9636,7 +8414,7 @@ end f64.const -1 call $~lib/util/number/dtoa - i32.const 5680 + i32.const 5736 call $~lib/string/String.__eq i32.eqz if @@ -9649,7 +8427,7 @@ end f64.const -0.1 call $~lib/util/number/dtoa - i32.const 5704 + i32.const 5760 call $~lib/string/String.__eq i32.eqz if @@ -9662,7 +8440,7 @@ end f64.const 1e6 call $~lib/util/number/dtoa - i32.const 5728 + i32.const 5784 call $~lib/string/String.__eq i32.eqz if @@ -9675,7 +8453,7 @@ end f64.const 1e-06 call $~lib/util/number/dtoa - i32.const 5768 + i32.const 5824 call $~lib/string/String.__eq i32.eqz if @@ -9688,7 +8466,7 @@ end f64.const -1e6 call $~lib/util/number/dtoa - i32.const 5800 + i32.const 5856 call $~lib/string/String.__eq i32.eqz if @@ -9701,7 +8479,7 @@ end f64.const -1e-06 call $~lib/util/number/dtoa - i32.const 5840 + i32.const 5896 call $~lib/string/String.__eq i32.eqz if @@ -9714,7 +8492,7 @@ end f64.const 1e7 call $~lib/util/number/dtoa - i32.const 5880 + i32.const 5936 call $~lib/string/String.__eq i32.eqz if @@ -9727,7 +8505,7 @@ end f64.const 1e-07 call $~lib/util/number/dtoa - i32.const 5920 + i32.const 5976 call $~lib/string/String.__eq i32.eqz if @@ -9740,7 +8518,7 @@ end f64.const 1.e+308 call $~lib/util/number/dtoa - i32.const 5944 + i32.const 6000 call $~lib/string/String.__eq i32.eqz if @@ -9753,7 +8531,7 @@ end f64.const -1.e+308 call $~lib/util/number/dtoa - i32.const 5976 + i32.const 6032 call $~lib/string/String.__eq i32.eqz if @@ -9766,7 +8544,7 @@ end f64.const inf call $~lib/util/number/dtoa - i32.const 3920 + i32.const 3976 call $~lib/string/String.__eq i32.eqz if @@ -9779,7 +8557,7 @@ end f64.const -inf call $~lib/util/number/dtoa - i32.const 3880 + i32.const 3936 call $~lib/string/String.__eq i32.eqz if @@ -9792,7 +8570,7 @@ end f64.const 1e-308 call $~lib/util/number/dtoa - i32.const 6008 + i32.const 6064 call $~lib/string/String.__eq i32.eqz if @@ -9805,7 +8583,7 @@ end f64.const -1e-308 call $~lib/util/number/dtoa - i32.const 6040 + i32.const 6096 call $~lib/string/String.__eq i32.eqz if @@ -9818,7 +8596,7 @@ end f64.const 1e-323 call $~lib/util/number/dtoa - i32.const 6072 + i32.const 6128 call $~lib/string/String.__eq i32.eqz if @@ -9831,7 +8609,7 @@ end f64.const -1e-323 call $~lib/util/number/dtoa - i32.const 6104 + i32.const 6160 call $~lib/string/String.__eq i32.eqz if @@ -9844,7 +8622,7 @@ end f64.const 0 call $~lib/util/number/dtoa - i32.const 3832 + i32.const 3888 call $~lib/string/String.__eq i32.eqz if @@ -9857,7 +8635,7 @@ end f64.const 4294967272 call $~lib/util/number/dtoa - i32.const 6136 + i32.const 6192 call $~lib/string/String.__eq i32.eqz if @@ -9870,7 +8648,7 @@ end f64.const 1.2312145673456234e-08 call $~lib/util/number/dtoa - i32.const 6176 + i32.const 6232 call $~lib/string/String.__eq i32.eqz if @@ -9883,7 +8661,7 @@ end f64.const 555555555.5555556 call $~lib/util/number/dtoa - i32.const 6240 + i32.const 6296 call $~lib/string/String.__eq i32.eqz if @@ -9896,7 +8674,7 @@ end f64.const 0.9999999999999999 call $~lib/util/number/dtoa - i32.const 6296 + i32.const 6352 call $~lib/string/String.__eq i32.eqz if @@ -9909,7 +8687,7 @@ end f64.const 1 call $~lib/util/number/dtoa - i32.const 5656 + i32.const 5712 call $~lib/string/String.__eq i32.eqz if @@ -9922,7 +8700,7 @@ end f64.const 12.34 call $~lib/util/number/dtoa - i32.const 6352 + i32.const 6408 call $~lib/string/String.__eq i32.eqz if @@ -9937,7 +8715,7 @@ f64.const 3 f64.div call $~lib/util/number/dtoa - i32.const 6384 + i32.const 6440 call $~lib/string/String.__eq i32.eqz if @@ -9950,7 +8728,7 @@ end f64.const 1234e17 call $~lib/util/number/dtoa - i32.const 6440 + i32.const 6496 call $~lib/string/String.__eq i32.eqz if @@ -9963,7 +8741,7 @@ end f64.const 1234e18 call $~lib/util/number/dtoa - i32.const 6504 + i32.const 6560 call $~lib/string/String.__eq i32.eqz if @@ -9976,7 +8754,7 @@ end f64.const 2.71828 call $~lib/util/number/dtoa - i32.const 6544 + i32.const 6600 call $~lib/string/String.__eq i32.eqz if @@ -9989,7 +8767,7 @@ end f64.const 0.0271828 call $~lib/util/number/dtoa - i32.const 6576 + i32.const 6632 call $~lib/string/String.__eq i32.eqz if @@ -10002,7 +8780,7 @@ end f64.const 271.828 call $~lib/util/number/dtoa - i32.const 6616 + i32.const 6672 call $~lib/string/String.__eq i32.eqz if @@ -10015,7 +8793,7 @@ end f64.const 1.1e+128 call $~lib/util/number/dtoa - i32.const 6648 + i32.const 6704 call $~lib/string/String.__eq i32.eqz if @@ -10028,7 +8806,7 @@ end f64.const 1.1e-64 call $~lib/util/number/dtoa - i32.const 6680 + i32.const 6736 call $~lib/string/String.__eq i32.eqz if @@ -10041,7 +8819,7 @@ end f64.const 0.000035689 call $~lib/util/number/dtoa - i32.const 6712 + i32.const 6768 call $~lib/string/String.__eq i32.eqz if @@ -10053,12 +8831,12 @@ unreachable end ) - (func $std/string/getString (; 68 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 67 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 69 ;) (type $FUNCSIG$v) + (func $start (; 68 ;) (type $FUNCSIG$v) call $start:std/string ) - (func $null (; 70 ;) (type $FUNCSIG$v) + (func $null (; 69 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 056e44ad81..1af1b09f4a 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -144,7 +144,7 @@ if i32.const 0 i32.const 72 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -159,7 +159,7 @@ if i32.const 0 i32.const 72 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -1191,854 +1191,7 @@ i32.const 0 end ) - (func $~lib/util/memory/memcpy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $continue|0 - local.get $1 - i32.const 3 - i32.and - local.get $2 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - local.get $0 - i32.const 3 - i32.and - local.tee $3 - i32.const 1 - i32.ne - if - local.get $3 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $3 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 13 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 15 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2046,29 +1199,6 @@ local.get $1 i32.eq br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - local.set $3 - end - local.get $3 - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -2232,7 +1362,7 @@ end end ) - (func $~lib/string/String#concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2281,7 +1411,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String.__concat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 512 local.get $0 @@ -2289,7 +1419,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/symbol/_Symbol#toString (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol#toString (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 160 @@ -2380,7 +1510,7 @@ i32.const 528 call $~lib/string/String.__concat ) - (func $start:std/symbol (; 28 ;) (type $FUNCSIG$v) + (func $start:std/symbol (; 27 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/symbol/nextId local.tee $0 @@ -2569,10 +1699,10 @@ unreachable end ) - (func $start (; 29 ;) (type $FUNCSIG$v) + (func $start (; 28 ;) (type $FUNCSIG$v) call $start:std/symbol ) - (func $null (; 30 ;) (type $FUNCSIG$v) + (func $null (; 29 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 4111d4bcf6..ab341a3ff0 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -200,7 +200,7 @@ if i32.const 0 i32.const 72 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -217,7 +217,7 @@ if i32.const 0 i32.const 72 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -1542,1208 +1542,7 @@ i32.const 0 end ) - (func $~lib/util/memory/memcpy (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2754,28 +1553,6 @@ if br $~lib/util/memory/memmove|inlined.0 end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -2974,7 +1751,7 @@ end end ) - (func $~lib/string/String#concat (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3024,7 +1801,7 @@ i32.const 1 call $~lib/runtime/runtime.register ) - (func $~lib/string/String.__concat (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 512 local.get $0 @@ -3034,7 +1811,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/symbol/_Symbol#toString (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol#toString (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3220,7 +1997,7 @@ i32.const 528 call $~lib/string/String.__concat ) - (func $start:std/symbol (; 35 ;) (type $FUNCSIG$v) + (func $start:std/symbol (; 34 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 16 call $~lib/symbol/Symbol @@ -3402,9 +2179,9 @@ global.get $~lib/symbol/_Symbol.isConcatSpreadable drop ) - (func $start (; 36 ;) (type $FUNCSIG$v) + (func $start (; 35 ;) (type $FUNCSIG$v) call $start:std/symbol ) - (func $null (; 37 ;) (type $FUNCSIG$v) + (func $null (; 36 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 3c9c57bc62..cc535c9dd6 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -439,7 +439,7 @@ if i32.const 0 i32.const 136 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -454,7 +454,7 @@ if i32.const 0 i32.const 136 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -1943,213 +1943,89 @@ call $~lib/memory/memory.fill end ) - (func $~lib/util/memory/memcpy (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - loop $continue|0 + block $~lib/util/memory/memmove|inlined.0 + local.get $0 local.get $1 - i32.const 3 - i32.and - local.get $2 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 local.get $0 - i32.const 3 + i32.const 7 i32.and - local.tee $3 - i32.const 1 - i32.ne if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 local.get $3 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $3 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 + local.get $4 + i32.load8_u + i32.store8 + br $continue|0 end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 + end + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if local.get $0 - i32.const 1 - i32.add local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - i32.const 1 - i32.add local.tee $4 i32.const 1 i32.add @@ -2159,756 +2035,10 @@ i32.load8_u i32.store8 local.get $2 - i32.const 3 + i32.const 1 i32.sub local.set $2 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 13 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 15 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - local.set $3 - end - local.get $3 - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 - end - end - end - loop $continue|2 - local.get $2 - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 + br $continue|2 end end else @@ -2984,7 +2114,7 @@ end end ) - (func $~lib/runtime/runtime.newArray (; 35 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 34 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) i32.const 16 @@ -3025,7 +2155,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int8Array#__get (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3044,7 +2174,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__get (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3052,7 +2182,7 @@ if i32.const 0 i32.const 264 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -3063,7 +2193,7 @@ i32.add i32.load8_s ) - (func $std/typedarray/isInt8ArrayEqual (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -3105,7 +2235,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3191,7 +2321,7 @@ i32.const 4 call $~lib/runtime/runtime.register ) - (func $~lib/typedarray/Int32Array#fill (; 40 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/typedarray/Int32Array#fill (; 39 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) local.get $1 @@ -3268,7 +2398,7 @@ end end ) - (func $~lib/array/Array#__get (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3278,7 +2408,7 @@ if i32.const 0 i32.const 264 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -3291,7 +2421,7 @@ i32.add i32.load ) - (func $std/typedarray/isInt32ArrayEqual (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3337,12 +2467,12 @@ end i32.const 1 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 43 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 42 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduce (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3379,7 +2509,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 45 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 44 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -3410,7 +2540,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#__set (; 46 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3430,7 +2560,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Uint8Array#reduce (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3467,7 +2597,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 48 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 47 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -3499,7 +2629,7 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 49 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 48 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -3531,7 +2661,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#__set (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3555,7 +2685,7 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Int16Array#reduce (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduce (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3596,7 +2726,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 52 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 51 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -3627,7 +2757,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#__set (; 53 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3651,7 +2781,7 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Uint16Array#reduce (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduce (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3692,7 +2822,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 55 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 54 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -3723,7 +2853,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reduce (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3764,7 +2894,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 57 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 56 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -3794,7 +2924,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#__set (; 58 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint32Array#__set (; 57 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3818,7 +2948,7 @@ local.get $2 i32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 59 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 58 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -3848,7 +2978,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#__set (; 60 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 59 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -3872,12 +3002,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 61 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 60 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 62 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 61 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -3918,7 +3048,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 63 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 62 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -3948,7 +3078,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#__set (; 64 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Uint64Array#__set (; 63 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -3972,7 +3102,7 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 65 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 64 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -4002,7 +3132,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#__set (; 66 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 65 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -4026,12 +3156,12 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 67 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 66 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 68 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $~lib/typedarray/Float32Array#reduce (; 67 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) (local $1 i32) (local $2 f32) (local $3 i32) @@ -4072,7 +3202,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 69 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 68 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -4101,12 +3231,12 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 70 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 69 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 71 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/typedarray/Float64Array#reduce (; 70 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -4147,7 +3277,7 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 72 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 71 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -4176,7 +3306,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#reduceRight (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduceRight (; 72 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4214,7 +3344,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 74 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 73 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -4245,7 +3375,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 75 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 74 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4283,7 +3413,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 76 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 75 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -4315,7 +3445,7 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 77 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 76 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -4347,7 +3477,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reduceRight (; 78 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduceRight (; 77 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4389,7 +3519,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 79 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 78 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -4420,7 +3550,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4462,7 +3592,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 81 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 80 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -4493,7 +3623,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reduceRight (; 82 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 81 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4535,7 +3665,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 83 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 82 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -4565,7 +3695,7 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 84 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 83 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -4595,7 +3725,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#reduceRight (; 85 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 84 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -4637,7 +3767,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 86 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 85 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -4667,7 +3797,7 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 87 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 86 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -4697,7 +3827,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#reduceRight (; 88 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $~lib/typedarray/Float32Array#reduceRight (; 87 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) (local $1 i32) (local $2 f32) (local $3 i32) @@ -4739,7 +3869,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 89 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 88 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -4768,7 +3898,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#reduceRight (; 90 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/typedarray/Float64Array#reduceRight (; 89 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -4810,7 +3940,7 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 91 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 90 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -4839,12 +3969,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 92 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 91 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4890,7 +4020,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 94 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 93 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -4948,7 +4078,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#map (; 95 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4994,7 +4124,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint8Array#__get (; 96 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__get (; 95 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5013,7 +4143,7 @@ i32.add i32.load8_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 97 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 96 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -5071,7 +4201,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 98 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 97 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5117,7 +4247,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 99 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 98 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -5175,7 +4305,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#map (; 100 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 99 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5230,7 +4360,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#__get (; 101 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 100 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5253,7 +4383,7 @@ i32.add i32.load16_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 102 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 101 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -5311,7 +4441,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#map (; 103 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5366,7 +4496,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint16Array#__get (; 104 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 103 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5389,7 +4519,7 @@ i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 105 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 104 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -5447,7 +4577,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#map (; 106 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 105 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5502,7 +4632,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 107 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 106 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -5560,7 +4690,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#map (; 108 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 107 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5615,7 +4745,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint32Array#__get (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5638,7 +4768,7 @@ i32.add i32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 110 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 109 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -5696,12 +4826,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 111 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 110 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 112 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 111 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5756,7 +4886,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#__get (; 113 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 112 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -5779,7 +4909,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 114 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 113 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -5837,7 +4967,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#map (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 114 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5892,7 +5022,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint64Array#__get (; 116 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__get (; 115 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -5915,7 +5045,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 117 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 116 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -5973,12 +5103,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 118 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 117 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 119 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 118 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6033,7 +5163,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#__get (; 120 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 119 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -6056,7 +5186,7 @@ i32.add f32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 121 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 120 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -6114,12 +5244,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 122 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 121 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 122 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6174,7 +5304,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 124 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 123 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -6232,14 +5362,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 125 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 124 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 125 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6278,13 +5408,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 127 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 126 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 128 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 127 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -6324,7 +5454,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#some (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6363,7 +5493,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 130 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 129 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -6403,7 +5533,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 131 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 130 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -6443,14 +5573,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 132 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6493,13 +5623,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 134 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 133 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 135 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 134 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -6539,7 +5669,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#some (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6582,7 +5712,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 137 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 136 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -6622,12 +5752,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 138 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6670,11 +5800,11 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 140 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 139 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 141 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 140 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -6714,7 +5844,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 142 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 141 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -6754,12 +5884,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 143 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 142 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6802,12 +5932,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 145 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 144 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 146 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 145 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -6847,7 +5977,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 147 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 146 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -6887,12 +6017,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 148 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 147 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6935,12 +6065,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 150 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 149 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 151 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 150 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -6980,12 +6110,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 152 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 151 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7028,12 +6158,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 154 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 153 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 155 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 154 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -7073,7 +6203,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#findIndex (; 156 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7115,14 +6245,14 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 157 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 156 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 158 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 157 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -7165,7 +6295,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#findIndex (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7207,7 +6337,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 160 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 159 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -7250,7 +6380,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 161 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 160 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -7293,7 +6423,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#findIndex (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7339,14 +6469,14 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 163 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 162 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 164 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 163 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -7389,7 +6519,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#findIndex (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7435,7 +6565,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 166 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 165 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -7478,7 +6608,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#findIndex (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7524,12 +6654,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 168 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 167 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 169 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 168 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -7572,7 +6702,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 170 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 169 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -7615,7 +6745,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#findIndex (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7661,12 +6791,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 172 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 171 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 173 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 172 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -7709,7 +6839,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 174 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 173 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -7752,7 +6882,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#findIndex (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7798,12 +6928,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 176 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 175 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 177 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 176 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -7846,7 +6976,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#findIndex (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7892,12 +7022,12 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 179 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 178 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 180 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 179 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -7940,7 +7070,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 181 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 180 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -7950,7 +7080,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int8Array#every (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7990,7 +7120,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 183 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 182 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor @@ -8030,13 +7160,13 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 184 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 183 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#every (; 185 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8076,7 +7206,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 186 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 185 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor @@ -8116,7 +7246,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 187 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 186 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -8156,7 +7286,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 188 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 187 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8166,7 +7296,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int16Array#every (; 189 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8210,7 +7340,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 190 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 189 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor @@ -8250,7 +7380,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#every (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8294,7 +7424,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 192 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 191 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint16Array#constructor @@ -8334,13 +7464,13 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 192 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int32Array#every (; 194 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 193 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8384,7 +7514,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 195 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 194 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -8424,7 +7554,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 196 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 195 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint32Array#constructor @@ -8464,14 +7594,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 197 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 196 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8515,7 +7645,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 199 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 198 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -8555,14 +7685,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 200 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 199 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 201 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 200 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint64Array#constructor @@ -8602,7 +7732,7 @@ unreachable end ) - (func $~lib/math/NativeMathf.mod (; 202 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 201 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8753,13 +7883,13 @@ local.get $0 f32.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 203 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 202 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 204 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 203 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8803,7 +7933,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 205 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 204 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float32Array#constructor @@ -8843,7 +7973,7 @@ unreachable end ) - (func $~lib/math/NativeMath.mod (; 206 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 205 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -9002,13 +8132,13 @@ local.get $0 f64.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 207 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 206 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9052,7 +8182,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 209 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 208 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Float64Array#constructor @@ -9092,7 +8222,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 210 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 209 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 255 i32.and @@ -9137,7 +8267,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 211 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Int8Array#forEach (; 210 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9170,7 +8300,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 212 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 211 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9222,7 +8352,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#forEach (; 213 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 212 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9255,7 +8385,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 214 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 213 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9302,7 +8432,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 215 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 214 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9349,7 +8479,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 216 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 215 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 65535 i32.and @@ -9394,7 +8524,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 217 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Int16Array#forEach (; 216 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9431,7 +8561,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 218 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 217 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9483,7 +8613,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#forEach (; 219 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 218 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9520,7 +8650,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 220 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 219 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9566,7 +8696,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 221 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 220 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/typedarray/forEachValues local.get $1 call $~lib/array/Array#__get @@ -9607,7 +8737,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 222 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 221 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9644,7 +8774,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 223 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 222 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9685,7 +8815,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 224 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 223 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9726,7 +8856,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 225 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 224 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) local.get $0 global.get $std/typedarray/forEachValues local.get $1 @@ -9768,7 +8898,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 226 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 225 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9805,7 +8935,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 227 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 226 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9849,7 +8979,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 228 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 227 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -9893,7 +9023,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 229 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 228 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) local.get $0 global.get $std/typedarray/forEachValues local.get $1 @@ -9935,7 +9065,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 230 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Float32Array#forEach (; 229 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9972,7 +9102,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 231 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 230 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -10015,7 +9145,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 232 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 231 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) local.get $0 global.get $std/typedarray/forEachValues local.get $1 @@ -10057,7 +9187,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 233 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Float64Array#forEach (; 232 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10094,7 +9224,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 234 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 233 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -10137,7 +9267,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#reverse (; 235 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 234 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10185,7 +9315,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 236 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 235 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10330,7 +9460,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 237 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 236 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10378,7 +9508,7 @@ end local.get $0 ) - (func $~lib/typedarray/Uint8Array#subarray (; 238 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 237 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10433,7 +9563,7 @@ i32.const 5 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 239 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 238 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10570,7 +9700,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 240 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 239 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10625,7 +9755,7 @@ i32.const 6 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 241 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 240 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10762,7 +9892,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 242 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 241 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10816,7 +9946,7 @@ end local.get $0 ) - (func $~lib/typedarray/Int16Array#subarray (; 243 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 242 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10877,7 +10007,7 @@ i32.const 7 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 244 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 243 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11020,7 +10150,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 245 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 244 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11074,7 +10204,7 @@ end local.get $0 ) - (func $~lib/typedarray/Uint16Array#subarray (; 246 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 245 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11135,7 +10265,7 @@ i32.const 8 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 247 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 246 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11272,7 +10402,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 248 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11326,7 +10456,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 249 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 248 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11459,7 +10589,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#subarray (; 250 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 249 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11520,7 +10650,7 @@ i32.const 10 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 251 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 250 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11651,7 +10781,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#reverse (; 252 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 251 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11705,7 +10835,7 @@ end local.get $0 ) - (func $~lib/typedarray/Int64Array#subarray (; 253 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 252 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11766,7 +10896,7 @@ i32.const 11 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 254 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 253 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11900,7 +11030,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#subarray (; 255 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 254 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11961,7 +11091,7 @@ i32.const 12 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 256 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 255 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12095,7 +11225,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 257 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 256 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12149,7 +11279,7 @@ end local.get $0 ) - (func $~lib/typedarray/Float32Array#subarray (; 258 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 257 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12210,7 +11340,7 @@ i32.const 13 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 259 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 258 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12344,7 +11474,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 260 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 259 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12398,7 +11528,7 @@ end local.get $0 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 261 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 260 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12534,7 +11664,7 @@ unreachable end ) - (func $start:std/typedarray (; 262 ;) (type $FUNCSIG$v) + (func $start:std/typedarray (; 261 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 1440 @@ -13614,10 +12744,10 @@ call $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> call $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> ) - (func $start (; 263 ;) (type $FUNCSIG$v) + (func $start (; 262 ;) (type $FUNCSIG$v) call $start:std/typedarray ) - (func $null (; 264 ;) (type $FUNCSIG$v) + (func $null (; 263 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 8007f40dd1..865a4b02dd 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -497,7 +497,7 @@ if i32.const 0 i32.const 136 - i32.const 117 + i32.const 82 i32.const 6 call $~lib/env/abort unreachable @@ -514,7 +514,7 @@ if i32.const 0 i32.const 136 - i32.const 119 + i32.const 84 i32.const 6 call $~lib/env/abort unreachable @@ -2437,1439 +2437,216 @@ end local.get $7 ) - (func $~lib/util/memory/memcpy (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - block - block (result i32) + block $break|0 + loop $continue|0 local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end end - i32.load8_u - i32.store8 + end + end + block $break|2 + loop $continue|2 local.get $2 - i32.const 1 - i32.sub - local.set $2 + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|2 + end end - br $continue|0 end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 local.get $0 - i32.const 8 + local.get $2 i32.add - local.get $1 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 i32.const 8 - i32.add - i32.load - i32.store + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 i32.add - i32.load - i32.store local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 55 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - br $continue|1 - end - end - end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|2 - end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - end - br $continue|3 - end - end - end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 - end - end - end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 + i32.add + i32.load8_u + i32.store8 + br $continue|5 end end end end end ) - (func $~lib/runtime/runtime.newArray (; 56 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 55 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3931,11 +2708,11 @@ end local.get $4 ) - (func $~lib/array/Array#get:length (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/typedarray/Int8Array#__get (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3954,7 +2731,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__unchecked_get (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -3963,7 +2740,7 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__get (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3973,7 +2750,7 @@ if i32.const 0 i32.const 264 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -3982,7 +2759,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/typedarray/isInt8ArrayEqual (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4030,7 +2807,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4159,7 +2936,7 @@ i32.const 4 call $~lib/runtime/runtime.register ) - (func $~lib/typedarray/Int32Array#fill (; 63 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#fill (; 62 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -4257,11 +3034,11 @@ end local.get $7 ) - (func $~lib/array/Array#get:length (; 64 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 63 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -4270,7 +3047,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4280,7 +3057,7 @@ if i32.const 0 i32.const 264 - i32.const 100 + i32.const 99 i32.const 61 call $~lib/env/abort unreachable @@ -4289,7 +3066,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/typedarray/isInt32ArrayEqual (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4337,12 +3114,12 @@ end i32.const 1 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 67 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduce (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4399,7 +3176,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 70 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 69 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4440,7 +3217,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#__set (; 71 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 70 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4460,12 +3237,12 @@ local.get $2 i32.store8 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 72 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduce (; 73 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4522,7 +3299,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 74 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 73 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4561,12 +3338,12 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 75 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 74 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduce (; 76 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduce (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4623,7 +3400,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 77 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 76 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4662,7 +3439,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#__set (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4686,12 +3463,12 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 79 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 78 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduce (; 80 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduce (; 79 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4748,7 +3525,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 81 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 80 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4789,7 +3566,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#__set (; 82 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 81 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4813,12 +3590,12 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 83 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 82 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduce (; 84 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduce (; 83 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4875,7 +3652,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 85 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 84 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4914,12 +3691,12 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 86 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 85 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduce (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 86 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4976,7 +3753,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 88 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 87 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5013,7 +3790,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#__set (; 89 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint32Array#__set (; 88 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -5037,12 +3814,12 @@ local.get $2 i32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 90 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 89 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduce (; 91 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduce (; 90 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5099,7 +3876,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 92 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 91 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5136,7 +3913,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#__set (; 93 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 92 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -5160,12 +3937,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 94 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 93 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 95 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 94 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -5222,7 +3999,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 96 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 95 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5259,7 +4036,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#__set (; 97 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Uint64Array#__set (; 96 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -5283,12 +4060,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 98 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 97 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduce (; 99 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduce (; 98 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -5345,7 +4122,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 100 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 99 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5382,7 +4159,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#__set (; 101 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 100 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -5406,12 +4183,12 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 102 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 101 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 103 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduce (; 102 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -5468,7 +4245,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 104 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 103 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -5505,12 +4282,12 @@ unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 105 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 104 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 106 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduce (; 105 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) @@ -5567,7 +4344,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 107 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 106 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -5604,12 +4381,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 108 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduceRight (; 109 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduceRight (; 108 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5663,7 +4440,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 110 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 109 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5704,12 +4481,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 111 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 110 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 112 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 111 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5763,7 +4540,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 113 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 112 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5802,12 +4579,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 114 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 113 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 115 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 114 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5861,7 +4638,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 116 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 115 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5900,12 +4677,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 117 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 116 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduceRight (; 118 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduceRight (; 117 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5959,7 +4736,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 119 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 118 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6000,12 +4777,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 120 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 119 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 121 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 120 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6059,7 +4836,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 122 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 121 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6098,12 +4875,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 123 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 122 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduceRight (; 124 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 123 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6157,7 +4934,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 125 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 124 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6194,12 +4971,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 126 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 125 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduceRight (; 127 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduceRight (; 126 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6253,7 +5030,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 128 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 127 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6290,12 +5067,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 129 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 128 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduceRight (; 130 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 129 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -6349,7 +5126,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 131 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 130 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6386,12 +5163,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 132 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 131 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduceRight (; 133 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduceRight (; 132 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) @@ -6445,7 +5222,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 134 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 133 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6482,12 +5259,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 135 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 134 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduceRight (; 136 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduceRight (; 135 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -6541,7 +5318,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 137 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 136 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -6578,12 +5355,12 @@ unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 138 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 137 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduceRight (; 139 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduceRight (; 138 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) @@ -6637,7 +5414,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 140 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 139 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -6674,12 +5451,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 141 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 140 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6744,7 +5521,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 143 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 142 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6810,12 +5587,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 144 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 143 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8Array#map (; 145 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6880,7 +5657,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint8Array#__get (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__get (; 145 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -6899,7 +5676,7 @@ i32.add i32.load8_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 147 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 146 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6965,12 +5742,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 148 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 147 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7035,7 +5812,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 150 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 149 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7101,12 +5878,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 151 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 150 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int16Array#map (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7171,7 +5948,7 @@ end local.get $6 ) - (func $~lib/typedarray/Int16Array#__get (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7194,7 +5971,7 @@ i32.add i32.load16_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 154 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 153 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7260,12 +6037,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 155 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 154 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint16Array#map (; 156 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7330,7 +6107,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint16Array#__get (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 156 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7353,7 +6130,7 @@ i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 158 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 157 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7419,12 +6196,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 159 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 158 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int32Array#map (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7489,7 +6266,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 161 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 160 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7555,12 +6332,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 162 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 161 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint32Array#map (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7625,7 +6402,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint32Array#__get (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7648,7 +6425,7 @@ i32.add i32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 165 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 164 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7714,12 +6491,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 166 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 165 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7784,7 +6561,7 @@ end local.get $6 ) - (func $~lib/typedarray/Int64Array#__get (; 168 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 167 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -7807,7 +6584,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 169 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 168 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7873,12 +6650,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 170 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 169 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Uint64Array#map (; 171 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7943,7 +6720,7 @@ end local.get $6 ) - (func $~lib/typedarray/Uint64Array#__get (; 172 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__get (; 171 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -7966,7 +6743,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 173 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 172 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8032,12 +6809,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 174 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 173 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8102,7 +6879,7 @@ end local.get $6 ) - (func $~lib/typedarray/Float32Array#__get (; 176 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 175 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -8125,7 +6902,7 @@ i32.add f32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 177 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 176 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8191,12 +6968,12 @@ unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 178 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 177 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 179 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8261,7 +7038,7 @@ end local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 180 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 179 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8327,7 +7104,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 181 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 180 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -8336,7 +7113,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 182 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8396,7 +7173,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 183 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 182 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -8405,7 +7182,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 184 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 183 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8459,14 +7236,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 185 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 184 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#some (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 185 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8526,14 +7303,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 187 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 186 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 188 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 187 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8587,14 +7364,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 189 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 188 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#some (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#some (; 189 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8654,14 +7431,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 191 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 190 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 192 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 191 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8715,7 +7492,7 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 192 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8724,7 +7501,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 194 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 193 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8784,7 +7561,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 195 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 194 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -8793,7 +7570,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 196 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 195 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8847,14 +7624,14 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 197 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 196 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#some (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8914,14 +7691,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 199 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 198 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 200 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 199 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8975,12 +7752,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 201 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 200 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 201 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9040,12 +7817,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 203 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 202 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 204 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 203 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9099,12 +7876,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 205 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 204 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#some (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#some (; 205 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9164,12 +7941,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 207 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 206 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 208 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 207 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9223,12 +8000,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 209 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 208 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 210 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 209 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9288,12 +8065,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 211 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 210 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 212 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 211 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9347,12 +8124,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 213 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 212 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#some (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#some (; 213 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9412,12 +8189,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 215 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 214 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 216 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 215 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9471,12 +8248,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 217 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 216 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 218 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 217 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9536,12 +8313,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 219 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 218 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 220 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 219 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9595,12 +8372,12 @@ unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 221 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 220 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9660,12 +8437,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 223 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 222 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 224 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 223 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9719,7 +8496,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 224 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9728,7 +8505,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#findIndex (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9788,7 +8565,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 227 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 226 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9797,7 +8574,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 228 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 227 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9850,14 +8627,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 229 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 228 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#findIndex (; 230 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 229 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9917,14 +8694,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 231 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 230 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 232 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 231 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9977,14 +8754,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 233 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 232 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 234 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 233 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10044,14 +8821,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 235 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 234 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 236 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 235 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10104,7 +8881,7 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 237 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 236 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10113,7 +8890,7 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#findIndex (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 237 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10173,7 +8950,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 239 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 238 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10182,7 +8959,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 240 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 239 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10235,14 +9012,14 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 241 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 240 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#findIndex (; 242 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 241 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10302,14 +9079,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 243 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 242 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 244 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 243 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10362,12 +9139,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 245 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 244 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#findIndex (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 245 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10427,12 +9204,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 247 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 246 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 248 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 247 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10485,12 +9262,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 249 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 248 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#findIndex (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#findIndex (; 249 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10550,12 +9327,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 251 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 250 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 252 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 251 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10608,12 +9385,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 253 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 252 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#findIndex (; 254 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 253 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10673,12 +9450,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 255 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 254 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 256 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 255 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10731,12 +9508,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 257 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 256 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#findIndex (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#findIndex (; 257 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10796,12 +9573,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 259 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 258 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 260 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 259 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10854,12 +9631,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 261 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 260 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#findIndex (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 261 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10919,12 +9696,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 263 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 262 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 264 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 263 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10977,12 +9754,12 @@ unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 265 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 264 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#findIndex (; 266 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 265 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11042,12 +9819,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 267 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 266 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 268 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 267 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11100,7 +9877,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 269 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 268 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11111,7 +9888,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int8Array#every (; 270 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 269 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11178,7 +9955,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 271 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 270 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11187,7 +9964,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 272 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 271 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11241,7 +10018,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 273 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 272 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -11250,7 +10027,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8Array#every (; 274 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 273 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11317,14 +10094,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 275 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 274 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 276 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 275 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11378,7 +10155,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 277 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 276 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -11387,7 +10164,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#every (; 278 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#every (; 277 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11454,14 +10231,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 279 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 278 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 280 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 279 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11515,7 +10292,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 281 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 280 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11526,7 +10303,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int16Array#every (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 281 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11593,7 +10370,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 283 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 282 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11602,7 +10379,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 284 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 283 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11656,7 +10433,7 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 285 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 284 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and @@ -11665,7 +10442,7 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint16Array#every (; 286 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 285 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11732,14 +10509,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 287 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 286 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 288 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 287 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11793,14 +10570,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 289 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 288 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.const 0 i32.eq ) - (func $~lib/typedarray/Int32Array#every (; 290 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 289 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11867,12 +10644,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 291 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 290 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 292 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 291 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11926,14 +10703,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 293 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 292 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_u i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint32Array#every (; 294 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#every (; 293 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12000,12 +10777,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 295 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 294 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 296 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 295 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12059,14 +10836,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 297 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 296 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (; 298 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 297 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12133,12 +10910,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 299 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 298 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 300 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 299 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12192,14 +10969,14 @@ unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 301 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 300 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $~lib/typedarray/Uint64Array#every (; 302 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#every (; 301 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12266,12 +11043,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 303 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 302 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 304 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 303 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12325,12 +11102,12 @@ unreachable end ) - (func $~lib/builtins/isNaN (; 305 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 304 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $~lib/math/NativeMathf.mod (; 306 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 305 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12581,14 +11358,14 @@ local.get $2 f32.reinterpret_i32 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 307 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 306 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 308 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 307 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12655,12 +11432,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 309 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 308 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 310 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 309 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12714,12 +11491,12 @@ unreachable end ) - (func $~lib/builtins/isNaN (; 311 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 310 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/math/NativeMath.mod (; 312 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 311 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -12972,14 +11749,14 @@ local.get $2 f64.reinterpret_i64 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 313 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 312 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 314 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 313 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13046,12 +11823,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 315 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 314 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 316 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 315 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13105,7 +11882,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 317 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 316 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13160,7 +11937,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 318 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#forEach (; 317 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13205,7 +11982,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 319 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 318 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13261,7 +12038,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 320 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 319 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13312,7 +12089,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8Array#forEach (; 321 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 320 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13357,7 +12134,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 322 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 321 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13407,7 +12184,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 323 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 322 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13458,7 +12235,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8ClampedArray#forEach (; 324 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#forEach (; 323 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13503,7 +12280,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 325 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 324 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13553,7 +12330,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 326 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 325 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13608,7 +12385,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 327 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#forEach (; 326 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13653,7 +12430,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 328 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 327 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13709,7 +12486,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 329 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 328 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13760,7 +12537,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint16Array#forEach (; 330 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 329 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13805,7 +12582,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 331 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 330 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13855,7 +12632,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 332 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 331 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -13902,7 +12679,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 333 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 332 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13947,7 +12724,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 334 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 333 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -13991,7 +12768,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 335 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 334 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14038,7 +12815,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint32Array#forEach (; 336 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint32Array#forEach (; 335 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14083,7 +12860,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 337 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 336 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14127,7 +12904,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 338 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 337 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14175,7 +12952,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 339 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 338 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14220,7 +12997,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 340 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 339 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14267,7 +13044,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 341 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 340 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14315,7 +13092,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint64Array#forEach (; 342 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint64Array#forEach (; 341 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14360,7 +13137,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 343 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 342 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14407,7 +13184,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 344 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 343 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14455,7 +13232,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 345 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#forEach (; 344 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14500,7 +13277,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 346 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 345 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14547,7 +13324,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 347 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 346 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14595,7 +13372,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 348 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#forEach (; 347 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14640,7 +13417,7 @@ unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 349 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 348 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14687,7 +13464,7 @@ unreachable end ) - (func $~lib/typedarray/Int8Array#reverse (; 350 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 349 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14757,7 +13534,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 351 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 350 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14921,7 +13698,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 352 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 351 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14991,7 +13768,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8Array#subarray (; 353 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 352 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15120,7 +13897,7 @@ i32.const 5 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 354 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 353 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15278,7 +14055,7 @@ unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#reverse (; 355 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reverse (; 354 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15348,7 +14125,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 356 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 355 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15477,7 +14254,7 @@ i32.const 6 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 357 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 356 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15635,7 +14412,7 @@ unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 358 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 357 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15705,7 +14482,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int16Array#subarray (; 359 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 358 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15834,7 +14611,7 @@ i32.const 7 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 360 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 359 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15998,7 +14775,7 @@ unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 361 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 360 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16068,7 +14845,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint16Array#subarray (; 362 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 361 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16197,7 +14974,7 @@ i32.const 8 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 363 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 362 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16355,7 +15132,7 @@ unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 364 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 363 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16425,7 +15202,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 365 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 364 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16577,7 +15354,7 @@ unreachable end ) - (func $~lib/typedarray/Uint32Array#reverse (; 366 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reverse (; 365 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16647,7 +15424,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint32Array#subarray (; 367 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 366 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16776,7 +15553,7 @@ i32.const 10 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 368 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 367 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16928,7 +15705,7 @@ unreachable end ) - (func $~lib/typedarray/Int64Array#reverse (; 369 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 368 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16998,7 +15775,7 @@ end local.get $1 ) - (func $~lib/typedarray/Int64Array#subarray (; 370 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 369 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17127,7 +15904,7 @@ i32.const 11 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 371 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 370 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17282,7 +16059,7 @@ unreachable end ) - (func $~lib/typedarray/Uint64Array#reverse (; 372 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#reverse (; 371 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17352,7 +16129,7 @@ end local.get $1 ) - (func $~lib/typedarray/Uint64Array#subarray (; 373 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 372 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17481,7 +16258,7 @@ i32.const 12 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 374 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 373 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17636,7 +16413,7 @@ unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 375 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 374 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17706,7 +16483,7 @@ end local.get $1 ) - (func $~lib/typedarray/Float32Array#subarray (; 376 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 375 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -17835,7 +16612,7 @@ i32.const 13 call $~lib/runtime/runtime.register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 377 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 376 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17990,7 +16767,7 @@ unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 378 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 377 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -18060,7 +16837,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 379 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 378 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18215,7 +16992,7 @@ unreachable end ) - (func $start:std/typedarray (; 380 ;) (type $FUNCSIG$v) + (func $start:std/typedarray (; 379 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32.const 1 @@ -19449,9 +18226,9 @@ call $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> call $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> ) - (func $start (; 381 ;) (type $FUNCSIG$v) + (func $start (; 380 ;) (type $FUNCSIG$v) call $start:std/typedarray ) - (func $null (; 382 ;) (type $FUNCSIG$v) + (func $null (; 381 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/wasi.json b/tests/compiler/wasi.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/wasi.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/wasi.optimized.wat b/tests/compiler/wasi.optimized.wat index 72ac147a60..dd129858a1 100644 --- a/tests/compiler/wasi.optimized.wat +++ b/tests/compiler/wasi.optimized.wat @@ -1,15 +1,12 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\0e") - (data (i32.const 24) "w\00a\00s\00i\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\0e\00\00\00w\00a\00s\00i\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $wasi/sig (mut i32) (i32.const 1)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (export ".capabilities" (global $~lib/capabilities)) (start $start) (func $start (; 0 ;) (type $FUNCSIG$v) i32.const 9 diff --git a/tests/compiler/wasi.untouched.wat b/tests/compiler/wasi.untouched.wat index 31eff4418d..b2cb630c18 100644 --- a/tests/compiler/wasi.untouched.wat +++ b/tests/compiler/wasi.untouched.wat @@ -3,18 +3,16 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00w\00a\00s\00i\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\0e\00\00\00w\00a\00s\00i\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $wasi/WASM32 i32 (i32.const 1)) (global $wasi/WASM64 i32 (i32.const 2)) (global $~lib/ASC_TARGET i32 (i32.const 0)) (global $wasi/sig (mut i32) (i32.const 1)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) - (global $~lib/capabilities i32 (i32.const 2)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) (export "memory" (memory $0)) (export "table" (table $0)) - (export ".capabilities" (global $~lib/capabilities)) (start $start) (func $start:wasi (; 1 ;) (type $FUNCSIG$v) i32.const 0 @@ -23,7 +21,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 6 i32.const 0 call $~lib/env/abort @@ -35,7 +33,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 7 i32.const 0 call $~lib/env/abort @@ -47,7 +45,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 8 i32.const 0 call $~lib/env/abort @@ -59,7 +57,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 9 i32.const 0 call $~lib/env/abort @@ -71,7 +69,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 10 i32.const 0 call $~lib/env/abort @@ -83,7 +81,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 12 i32.const 0 call $~lib/env/abort @@ -95,7 +93,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 13 i32.const 0 call $~lib/env/abort @@ -107,7 +105,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 14 i32.const 0 call $~lib/env/abort @@ -119,7 +117,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 15 i32.const 0 call $~lib/env/abort @@ -131,7 +129,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 16 i32.const 0 call $~lib/env/abort @@ -143,7 +141,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 17 i32.const 0 call $~lib/env/abort @@ -155,7 +153,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 19 i32.const 0 call $~lib/env/abort @@ -167,7 +165,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 20 i32.const 0 call $~lib/env/abort @@ -179,7 +177,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 21 i32.const 0 call $~lib/env/abort @@ -191,7 +189,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 22 i32.const 0 call $~lib/env/abort @@ -203,7 +201,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 23 i32.const 0 call $~lib/env/abort @@ -215,7 +213,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 25 i32.const 0 call $~lib/env/abort @@ -227,7 +225,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 26 i32.const 0 call $~lib/env/abort @@ -239,7 +237,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 27 i32.const 0 call $~lib/env/abort @@ -251,7 +249,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 28 i32.const 0 call $~lib/env/abort @@ -263,7 +261,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 29 i32.const 0 call $~lib/env/abort @@ -275,7 +273,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 30 i32.const 0 call $~lib/env/abort @@ -287,7 +285,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 31 i32.const 0 call $~lib/env/abort @@ -299,7 +297,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 32 i32.const 0 call $~lib/env/abort @@ -311,7 +309,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 33 i32.const 0 call $~lib/env/abort @@ -323,7 +321,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 35 i32.const 0 call $~lib/env/abort @@ -336,7 +334,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 37 i32.const 2 call $~lib/env/abort @@ -348,7 +346,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 38 i32.const 2 call $~lib/env/abort @@ -361,7 +359,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 46 i32.const 0 call $~lib/env/abort @@ -373,7 +371,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 47 i32.const 0 call $~lib/env/abort @@ -385,7 +383,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 48 i32.const 0 call $~lib/env/abort @@ -397,7 +395,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 49 i32.const 0 call $~lib/env/abort @@ -409,7 +407,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 50 i32.const 0 call $~lib/env/abort @@ -421,7 +419,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 51 i32.const 0 call $~lib/env/abort @@ -433,7 +431,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 52 i32.const 0 call $~lib/env/abort @@ -445,7 +443,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 53 i32.const 0 call $~lib/env/abort @@ -457,7 +455,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 55 i32.const 0 call $~lib/env/abort @@ -469,7 +467,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 56 i32.const 0 call $~lib/env/abort @@ -481,7 +479,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 57 i32.const 0 call $~lib/env/abort @@ -493,7 +491,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 58 i32.const 0 call $~lib/env/abort @@ -505,7 +503,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 60 i32.const 0 call $~lib/env/abort @@ -518,7 +516,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 62 i32.const 2 call $~lib/env/abort @@ -530,7 +528,7 @@ i32.eqz if i32.const 0 - i32.const 24 + i32.const 16 i32.const 63 i32.const 2 call $~lib/env/abort From ed32a4c8baa97101cfde16ad6d7b78317f40db2b Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 4 Apr 2019 12:53:42 +0200 Subject: [PATCH 093/119] notes on gc.collect that I don't yet know how to work around --- std/assembly/runtime.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 18a38f1b9b..b2f5e73f0b 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -144,8 +144,19 @@ export namespace runtime { } } - /** Performs a full garbage collection cycle. */ + /** Performs a full garbage collection cycle.*/ + // @ts-ignore: decorator + @unsafe export function collect(): void { + // FIXME: annotated unsafe because calling it in the middle of a function collects inner + // references prematurely with a tracing GC, which is pretty bad actually. + + // function explode(): Ref { + // var ref = new Ref(); + // gc.collect(); // collects ref + // return ref; + // } + if (isDefined(__ref_collect)) __ref_collect(); else throw new Error(E_NOTIMPLEMENTED); } From a9e4813798568ad132ddd34b894ae9f41bbe9527 Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 5 Apr 2019 01:59:01 +0200 Subject: [PATCH 094/119] implement __runtime_flags --- src/builtins.ts | 101 +- src/common.ts | 2 + src/compiler.ts | 28 +- src/program.ts | 51 + std/assembly/array.ts | 32 +- std/assembly/arraybuffer.ts | 12 +- std/assembly/collector/pure.ts | 2 +- std/assembly/fixedarray.ts | 8 +- std/assembly/map.ts | 2 +- std/assembly/runtime.ts | 137 +- std/assembly/runtime/default.ts | 2 +- std/assembly/string.ts | 84 +- std/assembly/typedarray.ts | 9 +- std/assembly/util/number.ts | 29 +- std/assembly/util/runtime.ts | 64 + tests/compiler/call-super.optimized.wat | 92 +- tests/compiler/call-super.untouched.wat | 90 +- tests/compiler/class-extends.optimized.wat | 253 +- tests/compiler/class-extends.untouched.wat | 314 +- tests/compiler/class.optimized.wat | 253 +- tests/compiler/class.untouched.wat | 314 +- tests/compiler/closure.optimized.wat | 253 +- tests/compiler/closure.untouched.wat | 314 +- tests/compiler/constructor.optimized.wat | 245 +- tests/compiler/constructor.untouched.wat | 328 +- tests/compiler/exports.optimized.wat | 28 +- tests/compiler/exports.untouched.wat | 26 +- tests/compiler/gc.optimized.wat | 76 +- tests/compiler/gc.untouched.wat | 62 +- tests/compiler/gc/global-assign.optimized.wat | 52 +- tests/compiler/gc/global-assign.untouched.wat | 40 +- tests/compiler/gc/global-init.optimized.wat | 52 +- tests/compiler/gc/global-init.untouched.wat | 40 +- tests/compiler/gc/itcm/trace.optimized.wat | 196 +- tests/compiler/gc/itcm/trace.untouched.wat | 143 +- .../gc/rc/global-assign.optimized.wat | 70 +- .../gc/rc/global-assign.untouched.wat | 54 +- .../compiler/gc/rc/global-init.optimized.wat | 50 +- .../compiler/gc/rc/global-init.untouched.wat | 40 +- tests/compiler/getter-call.optimized.wat | 18 +- tests/compiler/getter-call.untouched.wat | 20 +- tests/compiler/inlining.optimized.wat | 26 +- tests/compiler/inlining.untouched.wat | 24 +- tests/compiler/number.optimized.wat | 144 +- tests/compiler/number.untouched.wat | 232 +- .../optional-typeparameters.optimized.wat | 26 +- .../optional-typeparameters.untouched.wat | 24 +- tests/compiler/runtime-default.optimized.wat | 253 +- tests/compiler/runtime-default.untouched.wat | 314 +- tests/compiler/runtime/flags.json | 5 + tests/compiler/runtime/flags.optimized.wat | 2870 ++++++++++++ tests/compiler/runtime/flags.ts | 81 + tests/compiler/runtime/flags.untouched.wat | 3924 +++++++++++++++++ .../compiler/runtime/instanceof.optimized.wat | 40 +- .../compiler/runtime/instanceof.untouched.wat | 34 +- tests/compiler/std/array-access.optimized.wat | 2 +- tests/compiler/std/array-access.untouched.wat | 2 +- .../compiler/std/array-literal.optimized.wat | 38 +- .../compiler/std/array-literal.untouched.wat | 34 +- tests/compiler/std/array.optimized.wat | 1866 ++++---- tests/compiler/std/array.untouched.wat | 1519 ++++--- tests/compiler/std/arraybuffer.optimized.wat | 88 +- tests/compiler/std/arraybuffer.untouched.wat | 98 +- tests/compiler/std/dataview.optimized.wat | 286 +- tests/compiler/std/dataview.untouched.wat | 284 +- tests/compiler/std/date.optimized.wat | 18 +- tests/compiler/std/date.untouched.wat | 20 +- tests/compiler/std/map.optimized.wat | 436 +- tests/compiler/std/map.untouched.wat | 428 +- tests/compiler/std/new.optimized.wat | 18 +- tests/compiler/std/new.untouched.wat | 20 +- .../compiler/std/object-literal.optimized.wat | 46 +- .../compiler/std/object-literal.untouched.wat | 40 +- .../std/operator-overloading.optimized.wat | 98 +- .../std/operator-overloading.untouched.wat | 96 +- tests/compiler/std/runtime.optimized.wat | 96 +- tests/compiler/std/runtime.ts | 38 +- tests/compiler/std/runtime.untouched.wat | 79 +- tests/compiler/std/set.optimized.wat | 356 +- tests/compiler/std/set.untouched.wat | 348 +- tests/compiler/std/static-array.optimized.wat | 2 +- tests/compiler/std/static-array.untouched.wat | 2 +- tests/compiler/std/string-utf8.optimized.wat | 46 +- tests/compiler/std/string-utf8.untouched.wat | 44 +- tests/compiler/std/string.optimized.wat | 1290 +++--- tests/compiler/std/string.untouched.wat | 979 ++-- tests/compiler/std/symbol.optimized.wat | 120 +- tests/compiler/std/symbol.untouched.wat | 116 +- tests/compiler/std/typedarray.optimized.wat | 568 +-- tests/compiler/std/typedarray.untouched.wat | 544 +-- 90 files changed, 14549 insertions(+), 7499 deletions(-) create mode 100644 tests/compiler/runtime/flags.json create mode 100644 tests/compiler/runtime/flags.optimized.wat create mode 100644 tests/compiler/runtime/flags.ts create mode 100644 tests/compiler/runtime/flags.untouched.wat diff --git a/src/builtins.ts b/src/builtins.ts index 50a79d2b6c..1211a56a7e 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -56,7 +56,9 @@ import { FunctionPrototype, Field, Global, - DecoratorFlags + DecoratorFlags, + RuntimeFlags, + Program } from "./program"; import { @@ -479,10 +481,11 @@ export namespace BuiltinSymbols { // std/runtime.ts export const runtime_id = "~lib/runtime/__runtime_id"; export const runtime_instanceof = "~lib/runtime/__runtime_instanceof"; - export const runtime_allocate = "~lib/runtime/runtime.allocate"; - export const runtime_reallocate = "~lib/runtime/runtime.reallocate"; - export const runtime_register = "~lib/runtime/runtime.register"; - export const runtime_discard = "~lib/runtime/runtime.discard"; + export const runtime_flags = "~lib/runtime/__runtime_flags"; + export const runtime_allocate = "~lib/util/runtime/allocate"; + export const runtime_reallocate = "~lib/util/runtime/reallocate"; + export const runtime_register = "~lib/util/runtime/register"; + export const runtime_discard = "~lib/util/runtime/discard"; export const runtime_newArray = "~lib/runtime/runtime.newArray"; export const gc_mark_roots = "~lib/runtime/__gc_mark_roots"; export const gc_mark_members = "~lib/runtime/__gc_mark_members"; @@ -3655,15 +3658,28 @@ export function compileCall( checkTypeAbsent(typeArguments, reportNode, prototype) | checkArgsRequired(operands, 2, reportNode, compiler) ) { - compiler.currentType = Type.void; + compiler.currentType = Type.bool; return module.createUnreachable(); } let arg0 = compiler.compileExpression(operands[0], Type.u32, ConversionKind.IMPLICIT, WrapMode.NONE); let arg1 = compiler.compileExpression(operands[1], Type.u32, ConversionKind.IMPLICIT, WrapMode.NONE); - compiler.needsInstanceOf = true; + compiler.needsRuntimeInstanceOf = true; compiler.currentType = Type.bool; return module.createCall(BuiltinSymbols.runtime_instanceof, [ arg0, arg1 ], NativeType.I32); } + case BuiltinSymbols.runtime_flags: { + if ( + checkTypeAbsent(typeArguments, reportNode, prototype) | + checkArgsRequired(operands, 1, reportNode, compiler) + ) { + compiler.currentType = Type.i32; + return module.createUnreachable(); + } + let arg0 = compiler.compileExpression(operands[0], Type.u32, ConversionKind.IMPLICIT, WrapMode.NONE); + compiler.needsRuntimeFlags = true; + compiler.currentType = Type.i32; + return module.createCall(BuiltinSymbols.runtime_flags, [ arg0 ], NativeType.I32); + } case BuiltinSymbols.gc_mark_roots: { if ( checkTypeAbsent(typeArguments, reportNode, prototype) | @@ -3672,7 +3688,7 @@ export function compileCall( compiler.currentType = Type.void; return module.createUnreachable(); } - compiler.needsMark = true; + compiler.needsGcMark = true; compiler.currentType = Type.void; return module.createCall(BuiltinSymbols.gc_mark_roots, null, NativeType.None); } @@ -3686,7 +3702,7 @@ export function compileCall( } let arg0 = compiler.compileExpression(operands[0], Type.u32, ConversionKind.IMPLICIT, WrapMode.NONE); let arg1 = compiler.compileExpression(operands[1], compiler.options.usizeType, ConversionKind.IMPLICIT, WrapMode.NONE); - compiler.needsMark = true; + compiler.needsGcMark = true; compiler.currentType = Type.void; return module.createCall(BuiltinSymbols.gc_mark_members, [ arg0, arg1 ], NativeType.None); } @@ -4235,7 +4251,7 @@ export function compileMarkMembers(compiler: Compiler): void { } /** Compiles the `__runtime_instanceof` function. */ -export function compileInstanceOf(compiler: Compiler): void { +export function compileRuntimeInstanceOf(compiler: Compiler): void { var program = compiler.program; var module = compiler.module; var managedClasses = program.managedClasses; @@ -4268,7 +4284,10 @@ export function compileInstanceOf(compiler: Compiler): void { var names: string[] = [ "nope" ]; var blocks = new Array(); + var lastId = 0; + for (let [id, instance] of managedClasses) { + assert(id == ++lastId); names.push(instance.internalName); let condition = module.createBinary(BinaryOp.EqI32, module.createGetLocal(1, NativeType.I32), @@ -4309,6 +4328,68 @@ export function compileInstanceOf(compiler: Compiler): void { module.addFunction(BuiltinSymbols.runtime_instanceof, ftype, null, current); } +function typeToRuntimeFlags(type: Type, program: Program): RuntimeFlags { + var flags = RuntimeFlags.VALUE_ALIGN_0 * (1 << type.alignLog2); + if (type.is(TypeFlags.NULLABLE)) flags |= RuntimeFlags.VALUE_NULLABLE; + if (type.isManaged(program)) flags |= RuntimeFlags.VALUE_MANAGED; + return flags / RuntimeFlags.VALUE_ALIGN_0; +} + +/** Compiles the `__runtime_flags` function. */ +export function compileRuntimeFlags(compiler: Compiler): void { + var program = compiler.program; + var module = compiler.module; + var managedClasses = program.managedClasses; + var ftype = compiler.ensureFunctionType([ Type.i32 ], Type.i32); // $0 -> i32 + var names: string[] = [ "invalid" ]; + var blocks = new Array(); + var lastId = 0; + + for (let [id, instance] of managedClasses) { + assert(id == ++lastId); + names.push(instance.internalName); + let flags: RuntimeFlags = 0; + if (instance.prototype.extends(program.arrayPrototype)) { + let typeArguments = assert(instance.typeArguments); + assert(typeArguments.length == 1); + flags |= RuntimeFlags.ARRAY; + flags |= RuntimeFlags.VALUE_ALIGN_0 * typeToRuntimeFlags(typeArguments[0], program); + } else if (instance.prototype.extends(program.setPrototype)) { + let typeArguments = assert(instance.typeArguments); + assert(typeArguments.length == 1); + flags |= RuntimeFlags.SET; + flags |= RuntimeFlags.VALUE_ALIGN_0 * typeToRuntimeFlags(typeArguments[0], program); + } else if (instance.prototype.extends(program.mapPrototype)) { + let typeArguments = assert(instance.typeArguments); + assert(typeArguments.length == 2); + flags |= RuntimeFlags.MAP; + flags |= RuntimeFlags.KEY_ALIGN_0 * typeToRuntimeFlags(typeArguments[0], program); + flags |= RuntimeFlags.VALUE_ALIGN_0 * typeToRuntimeFlags(typeArguments[1], program); + } + blocks.push([ + module.createReturn(module.createI32(flags)) + ]); + } + + var current: ExpressionRef; + if (blocks.length) { + current = module.createBlock(names[1], [ + module.createSwitch(names, "invalid", module.createGetLocal(0, NativeType.I32)) + ]); + for (let i = 0, k = blocks.length; i < k; ++i) { + blocks[i].unshift(current); + current = module.createBlock(i == k - 1 ? "invalid" : names[i + 2], blocks[i]); + } + current = module.createBlock(null, [ + current, + module.createUnreachable() + ]); + } else { + current = module.createUnreachable(); + } + module.addFunction(BuiltinSymbols.runtime_flags, ftype, null, current); +} + // Helpers /** Evaluates the constant type of a type argument *or* expression. */ diff --git a/src/common.ts b/src/common.ts index 80846fadd5..7c4e049b6e 100644 --- a/src/common.ts +++ b/src/common.ts @@ -172,6 +172,8 @@ export namespace CommonSymbols { export const String = "String"; export const Array = "Array"; export const FixedArray = "FixedArray"; + export const Set = "Set"; + export const Map = "Map"; export const ArrayBufferView = "ArrayBufferView"; export const ArrayBuffer = "ArrayBuffer"; export const Math = "Math"; diff --git a/src/compiler.ts b/src/compiler.ts index 9ef2de2c8c..27d1e5acec 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -8,8 +8,9 @@ import { compileAbort, compileMarkRoots, compileMarkMembers, - compileInstanceOf, - BuiltinSymbols + compileRuntimeInstanceOf, + compileRuntimeFlags, + BuiltinSymbols, } from "./builtins"; import { @@ -312,9 +313,11 @@ export class Compiler extends DiagnosticEmitter { /** Argument count helper setter. */ argcSet: FunctionRef = 0; /** Indicates whether the __gc_mark_* functions must be generated. */ - needsMark: bool = false; + needsGcMark: bool = false; /** Indicates whether the __runtime_instanceof function must be generated. */ - needsInstanceOf: bool = false; + needsRuntimeInstanceOf: bool = false; + /** Indicates whether the __runtime_flags function must be generated. */ + needsRuntimeFlags: bool = false; /** Compiles a {@link Program} to a {@link Module} using the specified options. */ static compile(program: Program, options: Options | null = null): Module { @@ -397,15 +400,14 @@ export class Compiler extends DiagnosticEmitter { } // compile gc features if utilized - if (this.needsMark) { + if (this.needsGcMark) { compileMarkRoots(this); compileMarkMembers(this); } // compile runtime features if utilized - if (this.needsInstanceOf) { - compileInstanceOf(this); - } + if (this.needsRuntimeInstanceOf) compileRuntimeInstanceOf(this); + if (this.needsRuntimeFlags) compileRuntimeFlags(this); // update the heap base pointer var memoryOffset = this.memoryOffset; @@ -464,7 +466,7 @@ export class Compiler extends DiagnosticEmitter { if (program.collectorKind != CollectorKind.NONE) capabilities |= Capability.GC; if (capabilities != 0) { module.addGlobal(BuiltinSymbols.capabilities, NativeType.I32, false, module.createI32(capabilities)); - module.addGlobalExport(BuiltinSymbols.capabilities, ".capabilities"); + module.addGlobalExport(BuiltinSymbols.capabilities, "$.capabilities"); } return module; } @@ -6085,7 +6087,7 @@ export class Compiler extends DiagnosticEmitter { module.createGetLocal(0, NativeType.I32) ) ); - module.addFunctionExport(BuiltinSymbols.setargc, ".setargc"); + module.addFunctionExport(BuiltinSymbols.setargc, "$.setArgc"); } return BuiltinSymbols.setargc; } @@ -6718,11 +6720,11 @@ export class Compiler extends DiagnosticEmitter { // upcast - check dynamically if (expectedType.isAssignableTo(actualType)) { let program = this.program; - this.needsInstanceOf = true; + this.needsRuntimeInstanceOf = true; if (!(actualType.isUnmanaged || expectedType.isUnmanaged)) { let flow = this.currentFlow; let tempLocal = flow.getAndFreeTempLocal(actualType, false); - this.needsInstanceOf = true; + this.needsRuntimeInstanceOf = true; return module.createIf( module.createUnary( nativeSizeType == NativeType.I64 @@ -6769,7 +6771,7 @@ export class Compiler extends DiagnosticEmitter { // uninitialized (thus zero) `var a: A` to be an instance of something. let flow = this.currentFlow; let tempLocal = flow.getAndFreeTempLocal(actualType, false); - this.needsInstanceOf = true; + this.needsRuntimeInstanceOf = true; return module.createIf( module.createUnary( nativeSizeType == NativeType.I64 diff --git a/src/program.ts b/src/program.ts index a3ba8f39ae..062ec9be90 100644 --- a/src/program.ts +++ b/src/program.ts @@ -316,6 +316,45 @@ export enum CollectorKind { COUNTING } +/** Runtime flags. */ +export const enum RuntimeFlags { // keep in sync with std/runtime.ts + NONE = 0, + /** Type is an `Array`. */ + ARRAY = 1 << 0, + /** Type is a `Set`. */ + SET = 1 << 1, + /** Type is a `Map`. */ + MAP = 1 << 2, + /** Value alignment of 1 byte. */ + VALUE_ALIGN_0 = 1 << 3, + /** Value alignment of 2 bytes. */ + VALUE_ALIGN_1 = 1 << 4, + /** Value alignment of 4 bytes. */ + VALUE_ALIGN_2 = 1 << 5, + /** Value alignment of 8 bytes. */ + VALUE_ALIGN_3 = 1 << 6, + /** Value alignment of 16 bytes. */ + VALUE_ALIGN_4 = 1 << 7, + /** Value type is nullable. */ + VALUE_NULLABLE = 1 << 8, + /** Value type is managed. */ + VALUE_MANAGED = 1 << 9, + /** Key alignment of 1 byte. */ + KEY_ALIGN_0 = 1 << 10, + /** Key alignment of 2 bytes. */ + KEY_ALIGN_1 = 1 << 11, + /** Key alignment of 4 bytes. */ + KEY_ALIGN_2 = 1 << 12, + /** Key alignment of 8 bytes. */ + KEY_ALIGN_3 = 1 << 13, + /** Key alignment of 16 bytes. */ + KEY_ALIGN_4 = 1 << 14, + /** Key type is nullable. */ + KEY_NULLABLE = 1 << 15, + /** Key type is managed. */ + KEY_MANAGED = 1 << 16 +} + /** Represents an AssemblyScript program. */ export class Program extends DiagnosticEmitter { @@ -357,6 +396,10 @@ export class Program extends DiagnosticEmitter { arrayBufferInstance: Class | null = null; /** Array prototype reference. */ arrayPrototype: ClassPrototype | null = null; + /** Set prototype reference. */ + setPrototype: ClassPrototype | null = null; + /** Map prototype reference. */ + mapPrototype: ClassPrototype | null = null; /** Fixed array prototype reference. */ fixedArrayPrototype: ClassPrototype | null = null; /** String instance reference. */ @@ -820,6 +863,14 @@ export class Program extends DiagnosticEmitter { assert(element.kind == ElementKind.CLASS_PROTOTYPE); this.fixedArrayPrototype = element; } + if (element = this.lookupGlobal(CommonSymbols.Set)) { + assert(element.kind == ElementKind.CLASS_PROTOTYPE); + this.setPrototype = element; + } + if (element = this.lookupGlobal(CommonSymbols.Map)) { + assert(element.kind == ElementKind.CLASS_PROTOTYPE); + this.mapPrototype = element; + } if (element = this.lookupGlobal(CommonSymbols.abort)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.abortInstance = this.resolver.resolveFunction(element, null); diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 2af424d496..651dc472e1 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -1,6 +1,6 @@ /// -import { MAX_BYTELENGTH, reallocate } from "./util/runtime"; +import { MAX_BYTELENGTH, allocate, reallocate, discard, register } from "./util/runtime"; import { COMPARATOR, SORT } from "./util/sort"; import { runtime, __runtime_id, __gc_mark_members } from "./runtime"; import { ArrayBuffer, ArrayBufferView } from "./arraybuffer"; @@ -126,7 +126,7 @@ export class Array extends ArrayBufferView { if (isDefined(__ref_link)) { if (isDefined(__ref_unlink)) if (oldValue !== null) __ref_unlink(changetype(oldValue), changetype(this)); if (value !== null) __ref_link(changetype(value), changetype(this)); - } else if (__ref_retain) { + } else if (isDefined(__ref_retain)) { if (oldValue !== null) __ref_release(changetype(oldValue)); if (value !== null) __ref_retain(changetype(value)); } else assert(false); @@ -561,7 +561,7 @@ export class Array extends ArrayBufferView { var sepLen = separator.length; var valueLen = 5; // max possible length of element len("false") var estLen = (valueLen + sepLen) * lastIndex + valueLen; - var result = runtime.allocate(estLen << 1); + var result = allocate(estLen << 1); var offset = 0; var value: bool; for (let i = 0; i < lastIndex; ++i) { @@ -593,10 +593,10 @@ export class Array extends ArrayBufferView { if (estLen > offset) { let trimmed = changetype(result).substring(0, offset); - runtime.discard(result); + discard(result); return trimmed; // registered in .substring } - return changetype(runtime.register(result, __runtime_id())); + return changetype(register(result, __runtime_id())); } private join_int(separator: string = ","): string { @@ -609,7 +609,7 @@ export class Array extends ArrayBufferView { var sepLen = separator.length; const valueLen = (sizeof() <= 4 ? 10 : 20) + i32(isSigned()); var estLen = (valueLen + sepLen) * lastIndex + valueLen; - var result = runtime.allocate(estLen << 1); + var result = allocate(estLen << 1); var offset = 0; var value: T; for (let i = 0; i < lastIndex; ++i) { @@ -630,10 +630,10 @@ export class Array extends ArrayBufferView { offset += itoa_stream(result, offset, value); if (estLen > offset) { let trimmed = changetype(result).substring(0, offset); - runtime.discard(result); + discard(result); return trimmed; // registered in .substring } - return changetype(runtime.register(result, __runtime_id())); + return changetype(register(result, __runtime_id())); } private join_flt(separator: string = ","): string { @@ -650,7 +650,7 @@ export class Array extends ArrayBufferView { const valueLen = MAX_DOUBLE_LENGTH; var sepLen = separator.length; var estLen = (valueLen + sepLen) * lastIndex + valueLen; - var result = runtime.allocate(estLen << 1); + var result = allocate(estLen << 1); var offset = 0; var value: T; for (let i = 0; i < lastIndex; ++i) { @@ -675,10 +675,10 @@ export class Array extends ArrayBufferView { ); if (estLen > offset) { let trimmed = changetype(result).substring(0, offset); - runtime.discard(result); + discard(result); return trimmed; // registered in .substring } - return changetype(runtime.register(result, __runtime_id())); + return changetype(register(result, __runtime_id())); } private join_str(separator: string = ","): string { @@ -695,7 +695,7 @@ export class Array extends ArrayBufferView { if (value !== null) estLen += value.length; } var offset = 0; - var result = runtime.allocate((estLen + sepLen * lastIndex) << 1); + var result = allocate((estLen + sepLen * lastIndex) << 1); for (let i = 0; i < lastIndex; ++i) { value = load(dataStart + (i << alignof())); if (value !== null) { @@ -724,7 +724,7 @@ export class Array extends ArrayBufferView { changetype(value).length << 1 ); } - return changetype(runtime.register(result, __runtime_id())); + return changetype(register(result, __runtime_id())); } private join_arr(separator: string = ","): string { @@ -761,7 +761,7 @@ export class Array extends ArrayBufferView { const valueLen = 15; // max possible length of element len("[object Object]") var sepLen = separator.length; var estLen = (valueLen + sepLen) * lastIndex + valueLen; - var result = runtime.allocate(estLen << 1); + var result = allocate(estLen << 1); var offset = 0; var value: T; for (let i = 0; i < lastIndex; ++i) { @@ -793,10 +793,10 @@ export class Array extends ArrayBufferView { } if (estLen > offset) { let out = changetype(result).substring(0, offset); - runtime.discard(result); + discard(result); return out; // registered in .substring } - return changetype(runtime.register(result, __runtime_id())); + return changetype(register(result, __runtime_id())); } toString(): string { diff --git a/std/assembly/arraybuffer.ts b/std/assembly/arraybuffer.ts index c186a5a49b..fa44cc08e1 100644 --- a/std/assembly/arraybuffer.ts +++ b/std/assembly/arraybuffer.ts @@ -1,5 +1,5 @@ -import { HEADER, HEADER_SIZE, MAX_BYTELENGTH } from "./util/runtime"; -import { runtime, __runtime_id } from "./runtime"; +import { HEADER, HEADER_SIZE, MAX_BYTELENGTH, allocate, register } from "./util/runtime"; +import { __runtime_id } from "./runtime"; import { E_INVALIDLENGTH } from "./util/error"; export abstract class ArrayBufferView { @@ -52,9 +52,9 @@ export abstract class ArrayBufferView { constructor(length: i32) { if (length > MAX_BYTELENGTH) throw new RangeError(E_INVALIDLENGTH); - var buffer = runtime.allocate(length); + var buffer = allocate(length); memory.fill(changetype(buffer), 0, length); - return changetype(runtime.register(buffer, __runtime_id())); + return changetype(register(buffer, __runtime_id())); } get byteLength(): i32 { @@ -66,9 +66,9 @@ export abstract class ArrayBufferView { begin = begin < 0 ? max(length + begin, 0) : min(begin, length); end = end < 0 ? max(length + end , 0) : min(end , length); var outSize = max(end - begin, 0); - var out = runtime.allocate(outSize); + var out = allocate(outSize); memory.copy(out, changetype(this) + begin, outSize); - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); } toString(): string { diff --git a/std/assembly/collector/pure.ts b/std/assembly/collector/pure.ts index 32c80d11f5..8b977fcdfd 100644 --- a/std/assembly/collector/pure.ts +++ b/std/assembly/collector/pure.ts @@ -3,7 +3,7 @@ // After the paper by D. Bacon et al., 2001, IBM T.J. Watson Research Center // https://researcher.watson.ibm.com/researcher/files/us-bacon/Bacon03Pure.pdf -import { HEADER, HEADER_SIZE } from "../runtime"; +import { HEADER_SIZE } from "../util/runtime"; ERROR("not implemented"); diff --git a/std/assembly/fixedarray.ts b/std/assembly/fixedarray.ts index 40463ad55f..1c166ce84e 100644 --- a/std/assembly/fixedarray.ts +++ b/std/assembly/fixedarray.ts @@ -1,5 +1,5 @@ -import { HEADER, HEADER_SIZE, MAX_BYTELENGTH } from "./util/runtime"; -import { runtime, __runtime_id, __gc_mark_members } from "./runtime"; +import { HEADER, HEADER_SIZE, MAX_BYTELENGTH, allocate, register } from "./util/runtime"; +import { __runtime_id, __gc_mark_members } from "./runtime"; import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_HOLEYARRAY } from "./util/error"; // NOTE: DO NOT USE YET! @@ -18,9 +18,9 @@ export class FixedArray { } } var outSize = length << alignof(); - var out = runtime.allocate(outSize); + var out = allocate(outSize); memory.fill(out, 0, outSize); - return changetype>(runtime.register(out, __runtime_id>())); + return changetype>(register(out, __runtime_id>())); } get length(): i32 { diff --git a/std/assembly/map.ts b/std/assembly/map.ts index 3dadd6687c..4d52a3d82b 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -295,7 +295,7 @@ export class Map { if (isNullable()) { if (val) { __ref_mark(val); - __gc_mark_members(__runtime_id(), val); + __gc_mark_members(__runtime_id(), val); } } else { __ref_mark(val); diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index b2f5e73f0b..3144ee714f 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -1,21 +1,65 @@ // The runtime provides common functionality that links runtime interfaces for memory management // and garbage collection to the standard library, making sure it all plays well together. -import { HEADER, HEADER_SIZE, HEADER_MAGIC, adjust } from "./util/runtime"; -import { HEAP_BASE, memory } from "./memory"; -import { ArrayBufferView } from "./arraybuffer"; +import { HEADER, HEADER_SIZE, allocate, register } from "./util/runtime"; import { E_NOTIMPLEMENTED } from "./util/error"; +import { memory } from "./memory"; +import { ArrayBufferView } from "./arraybuffer"; /** Gets the computed unique id of a class type. */ // @ts-ignore: decorator -@unsafe @builtin +@builtin export declare function __runtime_id(): u32; /** Tests if a managed class is the same as or a superclass of another. */ // @ts-ignore: decorator -@unsafe @builtin +@builtin export declare function __runtime_instanceof(id: u32, superId: u32): bool; +/** Runtime flags. */ +const enum RuntimeFlags { // keep in sync with src/program.ts + NONE = 0, + /** Type is an `Array`. */ + ARRAY = 1 << 0, + /** Type is a `Set`. */ + SET = 1 << 1, + /** Type is a `Map`. */ + MAP = 1 << 2, + /** Value alignment of 1 byte. */ + VALUE_ALIGN_0 = 1 << 3, + /** Value alignment of 2 bytes. */ + VALUE_ALIGN_1 = 1 << 4, + /** Value alignment of 4 bytes. */ + VALUE_ALIGN_2 = 1 << 5, + /** Value alignment of 8 bytes. */ + VALUE_ALIGN_3 = 1 << 6, + /** Value alignment of 16 bytes. */ + VALUE_ALIGN_4 = 1 << 7, + /** Value type is nullable. */ + VALUE_NULLABLE = 1 << 8, + /** Value type is managed. */ + VALUE_MANAGED = 1 << 9, + /** Key alignment of 1 byte. */ + KEY_ALIGN_0 = 1 << 10, + /** Key alignment of 2 bytes. */ + KEY_ALIGN_1 = 1 << 11, + /** Key alignment of 4 bytes. */ + KEY_ALIGN_2 = 1 << 12, + /** Key alignment of 8 bytes. */ + KEY_ALIGN_3 = 1 << 13, + /** Key alignment of 16 bytes. */ + KEY_ALIGN_4 = 1 << 14, + /** Key type is nullable. */ + KEY_NULLABLE = 1 << 15, + /** Key type is managed. */ + KEY_MANAGED = 1 << 16 +} + +/** Gets the runtime flags of the managed type represented by the specified runtime id. */ +// @ts-ignore: decorator +@builtin +export declare function __runtime_flags(id: u32): RuntimeFlags; + /** Marks root objects when a tracing GC is present. */ // @ts-ignore: decorator @unsafe @builtin @@ -42,66 +86,31 @@ export class runtime { : false; } } - -/** Runtime implementation. */ export namespace runtime { - /** Allocates the memory necessary to represent a managed object of the specified size. */ - // @ts-ignore: decorator - @unsafe - export function allocate(payloadSize: usize): usize { - var header = changetype
(memory.allocate(adjust(payloadSize))); - header.classId = HEADER_MAGIC; - header.payloadSize = payloadSize; - if (isDefined(__ref_collect)) { - header.reserved1 = 0; - header.reserved2 = 0; - } - return changetype(header) + HEADER_SIZE; - } - - /** Discards the memory of a managed object that hasn't been registered yet. */ - // @ts-ignore: decorator - @unsafe - export function discard(ref: usize): void { - if (!ASC_NO_ASSERT) { - assert(ref > HEAP_BASE); // must be a heap object - let header = changetype
(ref - HEADER_SIZE); - assert(header.classId == HEADER_MAGIC); - memory.free(changetype(header)); - } else { - memory.free(changetype(ref - HEADER_SIZE)); - } + export function flags(id: u32): RuntimeFlags { + return __runtime_flags(id); } - /** Registers a managed object of the kind represented by the specified runtime id. */ + /** Allocates and registers, but doesn't initialize the data of, a new managed object of the specified kind. */ // @ts-ignore: decorator @unsafe - export function register(ref: usize, id: u32): usize { - if (!ASC_NO_ASSERT) { - assert(ref > HEAP_BASE); // must be a heap object - let header = changetype
(ref - HEADER_SIZE); - assert(header.classId == HEADER_MAGIC); - header.classId = id; - } else { - changetype
(ref - HEADER_SIZE).classId = id; - } - if (isDefined(__ref_register)) __ref_register(ref); - return ref; + export function newObject(payloadSize: u32, id: u32): usize { + return register(allocate(payloadSize), id); } /** Allocates and registers, but doesn't initialize the data of, a new `String` of the specified length. */ // @ts-ignore: decorator @unsafe export function newString(length: i32): usize { - return register(allocate(length << 1), __runtime_id()); + return newObject(length << 1, __runtime_id()); } /** Allocates and registers, but doesn't initialize the data of, a new `ArrayBuffer` of the specified byteLength. */ // @ts-ignore: decorator @unsafe export function newArrayBuffer(byteLength: i32): usize { - return register(allocate(byteLength), __runtime_id()); + return newObject(byteLength, __runtime_id()); } /** Allocates and registers, but doesn't initialize the data of, a new `Array` of the specified length and element alignment.*/ @@ -121,9 +130,40 @@ export namespace runtime { changetype(array).dataLength = bufferSize; store(changetype(array), length, offsetof("length_")); if (data) memory.copy(buffer, data, bufferSize); + // TODO: a way to determine whether the array has managed elements that must be linked? return array; } + // export function newArray2(id: u32, buffer: usize): usize { + // var flags = __runtime_flags(id); // traps if invalid + // var alignLog2 = (flags / RuntimeFlags.VALUE_ALIGN_0) & 31; + // var byteLength: i32; + // if (!buffer) { + // buffer = newArrayBuffer(byteLength = 0); + // } else { + // byteLength = changetype(buffer).byteLength; + // } + // var array = register(allocate(offsetof()), id); + // changetype(array).data = changetype(buffer); // links + // changetype(array).dataStart = buffer; + // changetype(array).dataLength = byteLength; + // store(changetype(array), byteLength >>> alignLog2, offsetof("length_")); + // if (flags & RuntimeFlags.VALUE_MANAGED) { + // let cur = buffer; + // let end = cur + byteLength; + // while (cur < end) { + // let ref = load(cur); + // if (ref) { + // if (isDefined(__ref_link)) __ref_link(ref, array); + // else if (isDefined(__ref_retain)) __ref_retain(ref); + // else assert(false); + // } + // cur += sizeof(); + // } + // } + // return array; + // } + /** Retains a managed object externally, making sure that it doesn't become collected. */ // @ts-ignore: decorator @unsafe @@ -144,7 +184,7 @@ export namespace runtime { } } - /** Performs a full garbage collection cycle.*/ + /** Performs a full garbage collection cycle. */ // @ts-ignore: decorator @unsafe export function collect(): void { @@ -164,6 +204,7 @@ export namespace runtime { class Root {} +/** A root object to retain managed objects on externally. */ // @ts-ignore @lazy var ROOT = new Root(); diff --git a/std/assembly/runtime/default.ts b/std/assembly/runtime/default.ts index 7178fe2a83..29be1ab678 100644 --- a/std/assembly/runtime/default.ts +++ b/std/assembly/runtime/default.ts @@ -1,4 +1,4 @@ import "allocator/tlsf"; import "collector/itcm"; -export { runtime }; +export { runtime as $ }; diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 0e836f775b..e77c5f26df 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -1,7 +1,7 @@ /// import { MAX_SIZE_32 } from "./util/allocator"; -import { HEADER, HEADER_SIZE } from "./util/runtime"; +import { HEADER, HEADER_SIZE, allocate, register } from "./util/runtime"; import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./util/string"; import { E_INVALIDLENGTH } from "./util/error"; import { runtime, __runtime_id } from "./runtime"; @@ -11,21 +11,17 @@ import { ArrayBufferView } from "./arraybuffer"; @lazy static readonly MAX_LENGTH: i32 = (MAX_SIZE_32 - HEADER_SIZE) >> alignof(); - get length(): i32 { - return changetype
(changetype(this) - HEADER_SIZE).payloadSize >> 1; - } - // TODO Add and handle second argument static fromCharCode(code: i32): String { - var out = runtime.allocate(2); + var out = allocate(2); store(out, code); - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); } static fromCodePoint(code: i32): String { assert(code <= 0x10FFFF); var sur = code > 0xFFFF; - var out = runtime.allocate((i32(sur) + 1) << 1); + var out = allocate((i32(sur) + 1) << 1); if (!sur) { store(out, code); } else { @@ -34,15 +30,25 @@ import { ArrayBufferView } from "./arraybuffer"; let lo: u32 = (code & 0x3FF) + 0xDC00; store(out, (hi << 16) | lo); } - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); + } + + // @ts-ignore: decorator + // @unsafe + // constructor(length: i32) { + // return changetype(register(allocate(length << 1), __runtime_id())); + // } + + get length(): i32 { + return changetype
(changetype(this) - HEADER_SIZE).payloadSize >> 1; } @operator("[]") charAt(pos: i32): String { assert(this !== null); if (pos >= this.length) return changetype(""); - var out = runtime.allocate(2); + var out = allocate(2); store(out, load(changetype(this) + (pos << 1))); - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); } charCodeAt(pos: i32): i32 { @@ -69,10 +75,10 @@ import { ArrayBufferView } from "./arraybuffer"; var otherSize: isize = other.length << 1; var outSize: usize = thisSize + otherSize; if (outSize == 0) return changetype(""); - var out = runtime.allocate(outSize); + var out = allocate(outSize); memory.copy(out, changetype(this), thisSize); memory.copy(out + thisSize, changetype(other), otherSize); - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); } endsWith(searchString: String, endPosition: i32 = String.MAX_LENGTH): bool { @@ -188,9 +194,9 @@ import { ArrayBufferView } from "./arraybuffer"; if (intStart < 0) intStart = max(size + intStart, 0); var resultLength = min(max(end, 0), size - intStart); if (resultLength <= 0) return changetype(""); - var out = runtime.allocate(resultLength << 1); + var out = allocate(resultLength << 1); memory.copy(out, changetype(this) + intStart, resultLength); - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); } substring(start: i32, end: i32 = i32.MAX_VALUE): String { @@ -203,9 +209,9 @@ import { ArrayBufferView } from "./arraybuffer"; len = toPos - fromPos; if (!len) return changetype(""); if (!fromPos && toPos == this.length << 1) return this; - var out = runtime.allocate(len); + var out = allocate(len); memory.copy(out, changetype(this) + fromPos, len); - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); } trim(): String { @@ -231,9 +237,9 @@ import { ArrayBufferView } from "./arraybuffer"; } if (!size) return changetype(""); if (!start && size == length << 1) return this; - var out = runtime.allocate(size); + var out = allocate(size); memory.copy(out, changetype(this) + offset, size); - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); } @inline @@ -261,9 +267,9 @@ import { ArrayBufferView } from "./arraybuffer"; if (!offset) return this; size -= offset; if (!size) return changetype(""); - var out = runtime.allocate(size); + var out = allocate(size); memory.copy(out, changetype(this) + offset, size); - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); } trimEnd(): String { @@ -280,9 +286,9 @@ import { ArrayBufferView } from "./arraybuffer"; } if (!size) return changetype(""); if (size == originalSize) return this; - var out = runtime.allocate(size); + var out = allocate(size); memory.copy(out, changetype(this), size); - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); } padStart(targetLength: i32, padString: string = " "): String { @@ -292,7 +298,7 @@ import { ArrayBufferView } from "./arraybuffer"; var padSize = padString.length << 1; if (targetSize < thisSize || !padSize) return this; var prependSize = targetSize - thisSize; - var out = runtime.allocate(targetSize); + var out = allocate(targetSize); if (prependSize > padSize) { let repeatCount = (prependSize - 2) / padSize; let restBase = repeatCount * padSize; @@ -303,7 +309,7 @@ import { ArrayBufferView } from "./arraybuffer"; memory.copy(out, changetype(padString), prependSize); } memory.copy(out + prependSize, changetype(this), thisSize); - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); } padEnd(targetLength: i32, padString: string = " "): String { @@ -313,7 +319,7 @@ import { ArrayBufferView } from "./arraybuffer"; var padSize = padString.length << 1; if (targetSize < thisSize || !padSize) return this; var appendSize = targetSize - thisSize; - var out = runtime.allocate(targetSize); + var out = allocate(targetSize); memory.copy(out, changetype(this), thisSize); if (appendSize > padSize) { let repeatCount = (appendSize - 2) / padSize; @@ -324,7 +330,7 @@ import { ArrayBufferView } from "./arraybuffer"; } else { memory.copy(out + thisSize, changetype(padString), appendSize); } - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); } repeat(count: i32 = 0): String { @@ -338,9 +344,9 @@ import { ArrayBufferView } from "./arraybuffer"; if (count == 0 || !length) return changetype(""); if (count == 1) return this; - var out = runtime.allocate((length * count) << 1); + var out = allocate((length * count) << 1); memory.repeat(out, changetype(this), length << 1, count); - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); } slice(beginIndex: i32, endIndex: i32 = i32.MAX_VALUE): String { @@ -349,9 +355,9 @@ import { ArrayBufferView } from "./arraybuffer"; var end = endIndex < 0 ? max(endIndex + len, 0) : min(endIndex, len); len = end - begin; if (len <= 0) return changetype(""); - var out = runtime.allocate(len << 1); + var out = allocate(len << 1); memory.copy(out, changetype(this) + (begin << 1), len << 1); - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); } split(separator: String | null = null, limit: i32 = i32.MAX_VALUE): String[] { @@ -368,10 +374,10 @@ import { ArrayBufferView } from "./arraybuffer"; let result = changetype(runtime.newArray(length, alignof(), __runtime_id())); let resultStart = changetype(result).dataStart; for (let i: isize = 0; i < length; ++i) { - let charStr = runtime.allocate(2); + let charStr = allocate(2); store(charStr, load(changetype(this) + (i << 1))); store(resultStart + (i << alignof()), charStr); // result[i] = charStr - runtime.register(charStr, __runtime_id()); + register(charStr, __runtime_id()); if (isManaged()) { if (isDefined(__ref_link)) __ref_link(changetype(charStr), changetype(result)); if (isDefined(__ref_retain)) __ref_retain(changetype(charStr)); @@ -388,9 +394,9 @@ import { ArrayBufferView } from "./arraybuffer"; while ((end = this.indexOf(separator!, start)) != -1) { let len = end - start; if (len > 0) { - let out = runtime.allocate(len << 1); + let out = allocate(len << 1); memory.copy(out, changetype(this) + (start << 1), len << 1); - result.push(changetype(runtime.register(out, __runtime_id()))); + result.push(changetype(register(out, __runtime_id()))); } else { result.push(changetype("")); } @@ -404,9 +410,9 @@ import { ArrayBufferView } from "./arraybuffer"; } var len = length - start; if (len > 0) { - let out = runtime.allocate(len << 1); + let out = allocate(len << 1); memory.copy(out, changetype(this) + (start << 1), len << 1); - result.push(changetype(runtime.register(out, __runtime_id()))); + result.push(changetype(register(out, __runtime_id()))); } else { result.push(changetype("")); } @@ -478,10 +484,10 @@ import { ArrayBufferView } from "./arraybuffer"; } } assert(ptrPos == len); - var out = runtime.allocate(bufPos); + var out = allocate(bufPos); memory.copy(changetype(out), buf, bufPos); memory.free(buf); - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); } toUTF8(): usize { diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index f465825145..eed65f0e1c 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -1,7 +1,8 @@ -import { runtime, __runtime_id } from "./runtime"; -import { ArrayBufferView } from "./arraybuffer"; +import { allocate, register } from "./util/runtime"; import { COMPARATOR, SORT as SORT_IMPL } from "./util/sort"; import { E_INDEXOUTOFRANGE } from "./util/error"; +import { __runtime_id } from "./runtime"; +import { ArrayBufferView } from "./arraybuffer"; export class Int8Array extends ArrayBufferView { [key: number]: i8; @@ -961,13 +962,13 @@ function SUBARRAY( else begin = min(begin, length); if (end < 0) end = max(length + end, begin); else end = max(min(end, length), begin); - var out = runtime.allocate(offsetof()); + var out = allocate(offsetof()); var data = array.data; var dataStart = array.dataStart; changetype(out).data = data; // links changetype(out).dataStart = dataStart + (begin << alignof()); changetype(out).dataLength = (end - begin) << alignof(); - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); } // @ts-ignore: decorator diff --git a/std/assembly/util/number.ts b/std/assembly/util/number.ts index d8d5b841ea..61d9143e2c 100644 --- a/std/assembly/util/number.ts +++ b/std/assembly/util/number.ts @@ -1,6 +1,7 @@ -import { runtime, __runtime_id } from "../runtime"; -import { ArrayBufferView } from "../arraybuffer"; +import { allocate, register, discard } from "./runtime"; import { CharCode } from "./string"; +import { __runtime_id } from "../runtime"; +import { ArrayBufferView } from "../arraybuffer"; // @ts-ignore: decorator @inline @@ -263,10 +264,10 @@ export function utoa32(value: u32): String { if (!value) return "0"; var decimals = decimalCount32(value); - var out = runtime.allocate(decimals << 1); + var out = allocate(decimals << 1); utoa32_core(changetype(out), value, decimals); - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); } export function itoa32(value: i32): String { @@ -276,12 +277,12 @@ export function itoa32(value: i32): String { if (sign) value = -value; var decimals = decimalCount32(value) + u32(sign); - var out = runtime.allocate(decimals << 1); + var out = allocate(decimals << 1); utoa32_core(changetype(out), value, decimals); if (sign) store(changetype(out), CharCode.MINUS); - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); } export function utoa64(value: u64): String { @@ -291,14 +292,14 @@ export function utoa64(value: u64): String { if (value <= u32.MAX_VALUE) { let val32 = value; let decimals = decimalCount32(val32); - out = runtime.allocate(decimals << 1); + out = allocate(decimals << 1); utoa32_core(out, val32, decimals); } else { let decimals = decimalCount64(value); - out = runtime.allocate(decimals << 1); + out = allocate(decimals << 1); utoa64_core(changetype(out), value, decimals); } - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); } export function itoa64(value: i64): String { @@ -311,16 +312,16 @@ export function itoa64(value: i64): String { if (value <= u32.MAX_VALUE) { let val32 = value; let decimals = decimalCount32(val32) + u32(sign); - out = runtime.allocate(decimals << 1); + out = allocate(decimals << 1); utoa32_core(changetype(out), val32, decimals); } else { let decimals = decimalCount64(value) + u32(sign); - out = runtime.allocate(decimals << 1); + out = allocate(decimals << 1); utoa64_core(changetype(out), value, decimals); } if (sign) store(changetype(out), CharCode.MINUS); - return changetype(runtime.register(out, __runtime_id())); + return changetype(register(out, __runtime_id())); } export function itoa(value: T): String { @@ -625,10 +626,10 @@ export function dtoa(value: f64): String { if (isNaN(value)) return "NaN"; return select("-Infinity", "Infinity", value < 0); } - var temp = runtime.allocate(MAX_DOUBLE_LENGTH << 1); + var temp = allocate(MAX_DOUBLE_LENGTH << 1); var length = dtoa_core(temp, value); var result = changetype(temp).substring(0, length); // registers - runtime.discard(temp); + discard(temp); return result; } diff --git a/std/assembly/util/runtime.ts b/std/assembly/util/runtime.ts index 838a554123..09b4ab5df1 100644 --- a/std/assembly/util/runtime.ts +++ b/std/assembly/util/runtime.ts @@ -46,6 +46,20 @@ export function adjust(payloadSize: usize): usize { return 1 << (32 - clz(payloadSize + HEADER_SIZE - 1)); } +/** Allocates the memory necessary to represent a managed object of the specified size. */ +// @ts-ignore: decorator +@unsafe +export function allocate(payloadSize: usize): usize { + var header = changetype
(memory.allocate(adjust(payloadSize))); + header.classId = HEADER_MAGIC; + header.payloadSize = payloadSize; + if (isDefined(__ref_collect)) { + header.reserved1 = 0; + header.reserved2 = 0; + } + return changetype(header) + HEADER_SIZE; +} + /** Reallocates the memory of a managed object that turned out to be too small or too large. */ // @ts-ignore: decorator @unsafe @@ -91,3 +105,53 @@ export function reallocate(ref: usize, newPayloadSize: usize): usize { header.payloadSize = newPayloadSize; return ref; } + +/** Discards the memory of a managed object that hasn't been registered yet. */ +// @ts-ignore: decorator +@unsafe +export function discard(ref: usize): void { + if (!ASC_NO_ASSERT) { + assert(ref > HEAP_BASE); // must be a heap object + let header = changetype
(ref - HEADER_SIZE); + assert(header.classId == HEADER_MAGIC); + memory.free(changetype(header)); + } else { + memory.free(changetype(ref - HEADER_SIZE)); + } +} + +/** Registers a managed object of the kind represented by the specified runtime id. */ +// @ts-ignore: decorator +@unsafe +export function register(ref: usize, id: u32): usize { + if (!ASC_NO_ASSERT) { + assert(ref > HEAP_BASE); // must be a heap object + let header = changetype
(ref - HEADER_SIZE); + assert(header.classId == HEADER_MAGIC); + header.classId = id; + } else { + changetype
(ref - HEADER_SIZE).classId = id; + } + if (isDefined(__ref_register)) __ref_register(ref); + return ref; +} + +/** Allocates and registers, but doesn't initialize the data of, a new `Array` of the specified length and element alignment. */ +// @ts-ignore: decorator +@unsafe +export function newArray(length: i32, alignLog2: usize, id: u32, data: usize = 0): usize { + // TODO: This API isn't great, but the compiler requires it for array literals anyway, + // that is when an array literal is encountered and its data is static, this function is + // called and the static buffer provided as `data`. This function can also be used to + // create typed arrays in that `Array` also implements `ArrayBufferView` but has an + // additional `.length_` property that remains unused overhead for typed arrays. + var array = newObject(offsetof(), id); + var bufferSize = length << alignLog2; + var buffer = newArrayBuffer(bufferSize); + changetype(array).data = changetype(buffer); // links + changetype(array).dataStart = buffer; + changetype(array).dataLength = bufferSize; + store(changetype(array), length, offsetof("length_")); + if (data) memory.copy(buffer, data, bufferSize); + return array; +} diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index b44b2318d3..1ff8ff909c 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -6,8 +6,8 @@ (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 48) "\02\00\00\00\1a\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s") + (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 56) "\02\00\00\00\1a\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -77,7 +77,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -98,16 +98,16 @@ i32.const 8 i32.add ) - (func $~lib/runtime/runtime.register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 84 + i32.const 92 i32.le_u if i32.const 0 i32.const 16 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -121,8 +121,8 @@ if i32.const 0 i32.const 16 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -136,9 +136,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -150,7 +150,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 6 i32.const 4 call $~lib/env/abort @@ -161,9 +161,9 @@ (func $call-super/B#constructor (; 5 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register call $call-super/A#constructor local.tee $0 i32.const 2 @@ -174,7 +174,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 15 i32.const 4 call $~lib/env/abort @@ -186,7 +186,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 16 i32.const 4 call $~lib/env/abort @@ -203,7 +203,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 22 i32.const 2 call $~lib/env/abort @@ -215,7 +215,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 23 i32.const 2 call $~lib/env/abort @@ -225,16 +225,16 @@ (func $call-super/D#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.eqz if i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -249,7 +249,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 38 i32.const 4 call $~lib/env/abort @@ -261,7 +261,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 39 i32.const 4 call $~lib/env/abort @@ -278,7 +278,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 45 i32.const 2 call $~lib/env/abort @@ -290,7 +290,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 46 i32.const 2 call $~lib/env/abort @@ -302,9 +302,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 6 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -316,7 +316,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 56 i32.const 4 call $~lib/env/abort @@ -327,9 +327,9 @@ (func $call-super/test3 (; 10 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 7 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register call $call-super/E#constructor local.tee $0 i32.const 2 @@ -340,7 +340,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 66 i32.const 2 call $~lib/env/abort @@ -352,7 +352,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 67 i32.const 2 call $~lib/env/abort @@ -362,16 +362,16 @@ (func $call-super/H#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 9 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.eqz if i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 8 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -393,7 +393,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 84 i32.const 2 call $~lib/env/abort @@ -405,7 +405,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 85 i32.const 2 call $~lib/env/abort @@ -415,16 +415,16 @@ (func $call-super/J#constructor (; 13 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 11 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.eqz if i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 10 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -446,7 +446,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 104 i32.const 2 call $~lib/env/abort @@ -458,7 +458,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 105 i32.const 2 call $~lib/env/abort @@ -466,7 +466,7 @@ end ) (func $start (; 15 ;) (type $FUNCSIG$v) - i32.const 88 + i32.const 96 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index 72e72191f9..6bb38cec4e 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -5,8 +5,8 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 48) "\02\00\00\00\1a\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s\00") + (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\02\00\00\00\1a\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) @@ -14,7 +14,7 @@ (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 84)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 92)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -114,7 +114,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -130,7 +130,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -139,8 +139,8 @@ if i32.const 0 i32.const 16 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -156,8 +156,8 @@ if i32.const 0 i32.const 16 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -172,9 +172,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -188,7 +188,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 6 i32.const 4 call $~lib/env/abort @@ -202,9 +202,9 @@ local.get $0 else i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end call $call-super/A#constructor local.set $0 @@ -218,7 +218,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 15 i32.const 4 call $~lib/env/abort @@ -231,7 +231,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 16 i32.const 4 call $~lib/env/abort @@ -251,7 +251,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 22 i32.const 2 call $~lib/env/abort @@ -264,7 +264,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 23 i32.const 2 call $~lib/env/abort @@ -276,9 +276,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -292,9 +292,9 @@ local.get $0 else i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end call $call-super/C#constructor local.set $0 @@ -308,7 +308,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 38 i32.const 4 call $~lib/env/abort @@ -321,7 +321,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 39 i32.const 4 call $~lib/env/abort @@ -341,7 +341,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 45 i32.const 2 call $~lib/env/abort @@ -354,7 +354,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 46 i32.const 2 call $~lib/env/abort @@ -367,9 +367,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 6 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -383,7 +383,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 56 i32.const 4 call $~lib/env/abort @@ -396,9 +396,9 @@ i32.eqz if i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 7 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -421,7 +421,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 66 i32.const 2 call $~lib/env/abort @@ -434,7 +434,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 67 i32.const 2 call $~lib/env/abort @@ -446,9 +446,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 8 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -461,9 +461,9 @@ i32.eqz if i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 9 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -486,7 +486,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 84 i32.const 2 call $~lib/env/abort @@ -499,7 +499,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 85 i32.const 2 call $~lib/env/abort @@ -511,9 +511,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 10 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -526,9 +526,9 @@ i32.eqz if i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 11 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -551,7 +551,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 104 i32.const 2 call $~lib/env/abort @@ -564,7 +564,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 105 i32.const 2 call $~lib/env/abort diff --git a/tests/compiler/class-extends.optimized.wat b/tests/compiler/class-extends.optimized.wat index 6ecc375513..1f03bac999 100644 --- a/tests/compiler/class-extends.optimized.wat +++ b/tests/compiler/class-extends.optimized.wat @@ -12,8 +12,8 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00,") (data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 72) "\01\00\00\00\1e") - (data (i32.const 88) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 72) "\01\00\00\00(") + (data (i32.const 88) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) @@ -28,18 +28,17 @@ (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $class-extends/test)) - (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) - (export "runtime.discard" (func $~lib/runtime/runtime.discard)) - (export "runtime.register" (func $~lib/runtime/runtime.register)) - (export "runtime.newString" (func $~lib/runtime/runtime.newString)) - (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export ".setargc" (func $~lib/setargc)) - (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "runtime.retain" (func $~lib/runtime/runtime.retain)) - (export "runtime.release" (func $~lib/runtime/runtime.release)) - (export "runtime.collect" (func $~lib/runtime/runtime.collect)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.setArgc" (func $~lib/setargc)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $class-extends/test (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 @@ -68,7 +67,19 @@ i32.const 0 end ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/runtime/runtime.flags (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + block $__inlined_func$~lib/runtime/__runtime_flags + block $invalid + local.get $0 + i32.const 1 + i32.sub + br_table $__inlined_func$~lib/runtime/__runtime_flags $__inlined_func$~lib/runtime/__runtime_flags $__inlined_func$~lib/runtime/__runtime_flags $invalid + end + unreachable + end + i32.const 0 + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.const 22 i32.ge_u @@ -88,7 +99,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 4 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 5 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 22 i32.ge_u @@ -123,7 +134,7 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Block#get:right (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const -4 @@ -157,7 +168,7 @@ end local.get $0 ) - (func $~lib/allocator/tlsf/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -173,7 +184,7 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -207,7 +218,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -226,7 +237,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -355,7 +366,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const 2 @@ -385,7 +396,7 @@ end local.get $0 ) - (func $~lib/allocator/tlsf/Root#setJump (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 i32.load i32.const 1 @@ -430,7 +441,7 @@ local.get $0 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -660,7 +671,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -783,7 +794,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#insert ) - (func $~lib/allocator/tlsf/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -797,7 +808,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -909,7 +920,7 @@ end end ) - (func $~lib/allocator/tlsf/Root#use (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1020,7 +1031,7 @@ i32.const 8 i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1046,14 +1057,14 @@ if unreachable end - i32.const 120 + i32.const 128 local.set $2 - i32.const 120 + i32.const 128 global.set $~lib/allocator/tlsf/ROOT i32.const 2912 i32.const 0 i32.store - i32.const 120 + i32.const 128 i32.const 0 i32.store i32.const 0 @@ -1063,7 +1074,7 @@ i32.const 22 i32.lt_u if - i32.const 120 + i32.const 128 local.get $1 i32.const 0 call $~lib/allocator/tlsf/Root#setSLMap @@ -1074,7 +1085,7 @@ i32.const 32 i32.lt_u if - i32.const 120 + i32.const 128 local.get $1 local.get $3 i32.const 0 @@ -1093,8 +1104,8 @@ br $repeat|0 end end - i32.const 120 - i32.const 3040 + i32.const 128 + i32.const 3048 current_memory i32.const 16 i32.shl @@ -1190,7 +1201,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/runtime.allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -1217,75 +1228,7 @@ i32.const 16 i32.add ) - (func $~lib/allocator/tlsf/__mem_free (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.tee $1 - if - local.get $0 - i32.const 8 - i32.sub - local.tee $2 - i32.load - local.tee $3 - i32.const 1 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - i32.const 1 - i32.or - i32.store - local.get $1 - local.get $0 - i32.const 8 - i32.sub - call $~lib/allocator/tlsf/Root#insert - end - end - ) - (func $~lib/runtime/runtime.discard (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.const 120 - i32.le_u - if - i32.const 0 - i32.const 88 - i32.const 68 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load - i32.const -1520547049 - i32.ne - if - i32.const 0 - i32.const 88 - i32.const 70 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - call $~lib/allocator/tlsf/__mem_free - ) - (func $~lib/collector/itcm/maybeInit (; 21 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/maybeInit (; 20 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/collector/itcm/state i32.eqz @@ -1328,7 +1271,7 @@ global.set $~lib/collector/itcm/state end ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -1356,7 +1299,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/collector/itcm/__ref_register (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_register (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) call $~lib/collector/itcm/maybeInit local.get $0 i32.const 16 @@ -1373,16 +1316,16 @@ local.get $0 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/runtime.register (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 120 + i32.const 128 i32.le_u if i32.const 0 i32.const 88 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -1396,8 +1339,8 @@ if i32.const 0 i32.const 88 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -1410,19 +1353,23 @@ end local.get $0 ) + (func $~lib/runtime/runtime.newObject (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) (func $~lib/runtime/runtime.newString (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) (func $~lib/runtime/runtime.newArrayBuffer (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) (func $~lib/collector/itcm/ManagedObject#makeGray (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) @@ -1671,18 +1618,18 @@ (local $5 i32) (local $6 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.get $2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $2 local.set $6 local.get $0 local.get $1 i32.shl local.tee $4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $5 local.tee $1 local.get $2 @@ -1722,7 +1669,45 @@ (func $~lib/runtime/runtime.release (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/collector/itcm/step (; 33 ;) (type $FUNCSIG$v) + (func $~lib/allocator/tlsf/__mem_free (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.tee $1 + if + local.get $0 + i32.const 8 + i32.sub + local.tee $2 + i32.load + local.tee $3 + i32.const 1 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + i32.const 1 + i32.or + i32.store + local.get $1 + local.get $0 + i32.const 8 + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/collector/itcm/step (; 34 ;) (type $FUNCSIG$v) (local $0 i32) block $break|0 block $case3|0 @@ -1812,7 +1797,7 @@ i32.and global.set $~lib/collector/itcm/iter local.get $0 - i32.const 120 + i32.const 128 i32.ge_u if local.get $0 @@ -1831,7 +1816,7 @@ end end ) - (func $~lib/collector/itcm/__ref_collect (; 34 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/__ref_collect (; 35 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/maybeInit loop $continue|0 global.get $~lib/collector/itcm/state @@ -1850,17 +1835,17 @@ br_if $continue|1 end ) - (func $~lib/runtime/runtime.collect (; 35 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.collect (; 36 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/__ref_collect ) - (func $start (; 36 ;) (type $FUNCSIG$v) + (func $start (; 37 ;) (type $FUNCSIG$v) i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register global.set $~lib/runtime/ROOT ) - (func $~lib/runtime/__gc_mark_roots (; 37 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__gc_mark_roots (; 38 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/runtime/ROOT local.tee $0 @@ -1881,7 +1866,7 @@ end end ) - (func $~lib/runtime/__runtime_instanceof (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/__runtime_instanceof (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $nope block $~lib/runtime/Root block $~lib/arraybuffer/ArrayBuffer @@ -1908,10 +1893,10 @@ end i32.const 0 ) - (func $null (; 39 ;) (type $FUNCSIG$v) + (func $null (; 40 ;) (type $FUNCSIG$v) nop ) - (func $~lib/runtime/runtime.newArray|trampoline (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray|trampoline (; 41 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -1931,7 +1916,7 @@ local.get $3 call $~lib/runtime/runtime.newArray ) - (func $~lib/setargc (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) diff --git a/tests/compiler/class-extends.untouched.wat b/tests/compiler/class-extends.untouched.wat index 0d1aacb45f..a234fbba5a 100644 --- a/tests/compiler/class-extends.untouched.wat +++ b/tests/compiler/class-extends.untouched.wat @@ -11,7 +11,7 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") - (data (i32.const 72) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 72) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -40,24 +40,23 @@ (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 120)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 128)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $class-extends/test)) - (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) - (export "runtime.discard" (func $~lib/runtime/runtime.discard)) - (export "runtime.register" (func $~lib/runtime/runtime.register)) - (export "runtime.newString" (func $~lib/runtime/runtime.newString)) - (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export ".setargc" (func $~lib/setargc)) - (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "runtime.retain" (func $~lib/runtime/runtime.retain)) - (export "runtime.release" (func $~lib/runtime/runtime.release)) - (export "runtime.collect" (func $~lib/runtime/runtime.collect)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.setArgc" (func $~lib/setargc)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $class-extends/test (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 @@ -86,7 +85,11 @@ i32.const 0 end ) - (func $~lib/util/runtime/adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.flags (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/__runtime_flags + ) + (func $~lib/util/runtime/adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -98,12 +101,12 @@ i32.sub i32.shl ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 0 local.get $1 i32.store offset=2912 ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -124,7 +127,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 6 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 7 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -161,11 +164,11 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Root#get:tailRef (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.load offset=2912 ) - (func $~lib/allocator/tlsf/Block#get:right (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -205,7 +208,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/fls (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -223,7 +226,7 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -259,7 +262,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -279,7 +282,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -424,7 +427,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -456,7 +459,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/Root#setJump (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.load global.get $~lib/allocator/tlsf/FREE @@ -502,7 +505,7 @@ local.get $1 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -768,7 +771,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -921,7 +924,7 @@ call $~lib/allocator/tlsf/Root#insert i32.const 1 ) - (func $~lib/allocator/tlsf/ffs (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -937,7 +940,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/ffs (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -953,7 +956,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1094,7 +1097,7 @@ end local.get $6 ) - (func $~lib/allocator/tlsf/Root#use (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1222,7 +1225,7 @@ global.get $~lib/allocator/tlsf/Block.INFO i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1458,12 +1461,12 @@ local.get $0 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/memory/memory.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -1485,88 +1488,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/allocator/tlsf/__mem_free (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.set $1 - local.get $1 - if - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.set $2 - local.get $2 - i32.load - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.or - i32.store - local.get $1 - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - call $~lib/allocator/tlsf/Root#insert - end - end - ) - (func $~lib/memory/memory.free (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - call $~lib/allocator/tlsf/__mem_free - ) - (func $~lib/runtime/runtime.discard (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 88 - i32.const 68 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - local.set $1 - local.get $1 - i32.load - global.get $~lib/util/runtime/HEADER_MAGIC - i32.eq - i32.eqz - if - i32.const 0 - i32.const 88 - i32.const 70 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $1 - call $~lib/memory/memory.free - ) - (func $~lib/collector/itcm/ManagedObjectList#clear (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.store offset=8 @@ -1574,7 +1496,7 @@ local.get $0 i32.store offset=12 ) - (func $~lib/collector/itcm/maybeInit (; 28 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/maybeInit (; 26 ;) (type $FUNCSIG$v) global.get $~lib/collector/itcm/state i32.const 0 i32.eq @@ -1607,7 +1529,7 @@ global.set $~lib/collector/itcm/state end ) - (func $~lib/collector/itcm/ManagedObject#set:color (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#set:color (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $0 i32.load offset=8 @@ -1619,7 +1541,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#set:next (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 local.get $0 @@ -1629,7 +1551,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -1647,7 +1569,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/collector/itcm/__ref_register (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_register (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) call $~lib/collector/itcm/maybeInit @@ -1666,7 +1588,7 @@ local.get $2 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/runtime.register (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -1675,8 +1597,8 @@ if i32.const 0 i32.const 88 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -1692,8 +1614,8 @@ if i32.const 0 i32.const 88 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -1704,27 +1626,31 @@ call $~lib/collector/itcm/__ref_register local.get $0 ) - (func $~lib/runtime/runtime.newString (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.newObject (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) - (func $~lib/runtime/runtime.newArrayBuffer (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.newArrayBuffer (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/ManagedObject#get:color (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 i32.and ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/ManagedObject#get:next (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 @@ -1732,7 +1658,7 @@ i32.xor i32.and ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#unlink (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1748,7 +1674,7 @@ local.get $1 call $~lib/collector/itcm/ManagedObject#set:next ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/collector/itcm/iter i32.eq @@ -1773,7 +1699,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/__ref_link (; 40 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/__ref_link (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) call $~lib/collector/itcm/maybeInit @@ -1810,7 +1736,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/memory/memory.copy (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2019,7 +1945,7 @@ end end ) - (func $~lib/runtime/runtime.newArray (; 42 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 41 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2027,18 +1953,18 @@ (local $8 i32) (local $9 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.get $2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $4 local.get $0 local.get $1 i32.shl local.set $5 local.get $5 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $6 local.get $4 local.tee $7 @@ -2076,27 +2002,74 @@ end local.get $4 ) - (func $~lib/runtime/Root#constructor (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/Root#constructor (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 ) - (func $~lib/runtime/runtime.retain (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.retain (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/runtime/ROOT call $~lib/collector/itcm/__ref_link ) - (func $~lib/runtime/runtime.release (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.release (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/collector/itcm/step (; 46 ;) (type $FUNCSIG$v) + (func $~lib/allocator/tlsf/__mem_free (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + if + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $2 + local.get $2 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/memory/memory.free (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/collector/itcm/step (; 47 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) block $break|0 @@ -2218,7 +2191,7 @@ unreachable end ) - (func $~lib/collector/itcm/__ref_collect (; 47 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/__ref_collect (; 48 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/maybeInit block $break|0 loop $continue|0 @@ -2241,18 +2214,18 @@ end end ) - (func $~lib/runtime/runtime.collect (; 48 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.collect (; 49 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/__ref_collect ) - (func $~lib/runtime/runtime#constructor (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime#constructor (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) unreachable ) - (func $start (; 50 ;) (type $FUNCSIG$v) + (func $start (; 51 ;) (type $FUNCSIG$v) i32.const 0 call $~lib/runtime/Root#constructor global.set $~lib/runtime/ROOT ) - (func $~lib/collector/itcm/__ref_mark (; 51 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_mark (; 52 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) call $~lib/collector/itcm/maybeInit @@ -2273,7 +2246,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/runtime/__gc_mark_roots (; 52 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__gc_mark_roots (; 53 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/runtime/ROOT local.tee $0 @@ -2282,7 +2255,7 @@ call $~lib/collector/itcm/__ref_mark end ) - (func $~lib/runtime/__gc_mark_members (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/runtime/__gc_mark_members (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $invalid block $~lib/runtime/Root @@ -2299,7 +2272,7 @@ end unreachable ) - (func $~lib/runtime/__runtime_instanceof (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/__runtime_instanceof (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $nope block $~lib/runtime/Root block $~lib/arraybuffer/ArrayBuffer @@ -2325,9 +2298,28 @@ i32.const 0 return ) - (func $null (; 55 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__runtime_flags (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + block $invalid + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/string/String + local.get $0 + br_table $invalid $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid + end + i32.const 0 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + unreachable + ) + (func $null (; 57 ;) (type $FUNCSIG$v) ) - (func $~lib/runtime/runtime.newArray|trampoline (; 56 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray|trampoline (; 58 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2347,7 +2339,7 @@ local.get $3 call $~lib/runtime/runtime.newArray ) - (func $~lib/setargc (; 57 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 59 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index 5e1638c44b..bb717647a2 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -14,8 +14,8 @@ (data (i32.const 24) "c\00l\00a\00s\00s\00.\00t\00s") (data (i32.const 40) "\01\00\00\00,") (data (i32.const 56) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 104) "\01\00\00\00\1e") - (data (i32.const 120) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 104) "\01\00\00\00(") + (data (i32.const 120) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) @@ -30,18 +30,17 @@ (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $class/test)) - (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) - (export "runtime.discard" (func $~lib/runtime/runtime.discard)) - (export "runtime.register" (func $~lib/runtime/runtime.register)) - (export "runtime.newString" (func $~lib/runtime/runtime.newString)) - (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export ".setargc" (func $~lib/setargc)) - (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "runtime.retain" (func $~lib/runtime/runtime.retain)) - (export "runtime.release" (func $~lib/runtime/runtime.release)) - (export "runtime.collect" (func $~lib/runtime/runtime.collect)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.setArgc" (func $~lib/setargc)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $class/test (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -77,7 +76,19 @@ i32.const 0 end ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/runtime/runtime.flags (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + block $__inlined_func$~lib/runtime/__runtime_flags + block $invalid + local.get $0 + i32.const 1 + i32.sub + br_table $__inlined_func$~lib/runtime/__runtime_flags $__inlined_func$~lib/runtime/__runtime_flags $__inlined_func$~lib/runtime/__runtime_flags $invalid + end + unreachable + end + i32.const 0 + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.const 22 i32.ge_u @@ -97,7 +108,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 4 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 5 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 22 i32.ge_u @@ -132,7 +143,7 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Block#get:right (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const -4 @@ -166,7 +177,7 @@ end local.get $0 ) - (func $~lib/allocator/tlsf/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -182,7 +193,7 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -216,7 +227,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -235,7 +246,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -364,7 +375,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const 2 @@ -394,7 +405,7 @@ end local.get $0 ) - (func $~lib/allocator/tlsf/Root#setJump (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 i32.load i32.const 1 @@ -439,7 +450,7 @@ local.get $0 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -669,7 +680,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -792,7 +803,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#insert ) - (func $~lib/allocator/tlsf/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -806,7 +817,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -918,7 +929,7 @@ end end ) - (func $~lib/allocator/tlsf/Root#use (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1029,7 +1040,7 @@ i32.const 8 i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1055,14 +1066,14 @@ if unreachable end - i32.const 152 + i32.const 160 local.set $2 - i32.const 152 + i32.const 160 global.set $~lib/allocator/tlsf/ROOT i32.const 2912 i32.const 0 i32.store - i32.const 152 + i32.const 160 i32.const 0 i32.store i32.const 0 @@ -1072,7 +1083,7 @@ i32.const 22 i32.lt_u if - i32.const 152 + i32.const 160 local.get $1 i32.const 0 call $~lib/allocator/tlsf/Root#setSLMap @@ -1083,7 +1094,7 @@ i32.const 32 i32.lt_u if - i32.const 152 + i32.const 160 local.get $1 local.get $3 i32.const 0 @@ -1102,8 +1113,8 @@ br $repeat|0 end end - i32.const 152 - i32.const 3072 + i32.const 160 + i32.const 3080 current_memory i32.const 16 i32.shl @@ -1199,7 +1210,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/runtime.allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -1226,75 +1237,7 @@ i32.const 16 i32.add ) - (func $~lib/allocator/tlsf/__mem_free (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.tee $1 - if - local.get $0 - i32.const 8 - i32.sub - local.tee $2 - i32.load - local.tee $3 - i32.const 1 - i32.and - if - i32.const 0 - i32.const 56 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - i32.const 1 - i32.or - i32.store - local.get $1 - local.get $0 - i32.const 8 - i32.sub - call $~lib/allocator/tlsf/Root#insert - end - end - ) - (func $~lib/runtime/runtime.discard (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.const 152 - i32.le_u - if - i32.const 0 - i32.const 120 - i32.const 68 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load - i32.const -1520547049 - i32.ne - if - i32.const 0 - i32.const 120 - i32.const 70 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - call $~lib/allocator/tlsf/__mem_free - ) - (func $~lib/collector/itcm/maybeInit (; 21 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/maybeInit (; 20 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/collector/itcm/state i32.eqz @@ -1337,7 +1280,7 @@ global.set $~lib/collector/itcm/state end ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -1365,7 +1308,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/collector/itcm/__ref_register (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_register (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) call $~lib/collector/itcm/maybeInit local.get $0 i32.const 16 @@ -1382,16 +1325,16 @@ local.get $0 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/runtime.register (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 152 + i32.const 160 i32.le_u if i32.const 0 i32.const 120 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -1405,8 +1348,8 @@ if i32.const 0 i32.const 120 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -1419,19 +1362,23 @@ end local.get $0 ) + (func $~lib/runtime/runtime.newObject (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) (func $~lib/runtime/runtime.newString (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) (func $~lib/runtime/runtime.newArrayBuffer (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) (func $~lib/collector/itcm/ManagedObject#makeGray (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) @@ -1680,18 +1627,18 @@ (local $5 i32) (local $6 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.get $2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $2 local.set $6 local.get $0 local.get $1 i32.shl local.tee $4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $5 local.tee $1 local.get $2 @@ -1731,7 +1678,45 @@ (func $~lib/runtime/runtime.release (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/collector/itcm/step (; 33 ;) (type $FUNCSIG$v) + (func $~lib/allocator/tlsf/__mem_free (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.tee $1 + if + local.get $0 + i32.const 8 + i32.sub + local.tee $2 + i32.load + local.tee $3 + i32.const 1 + i32.and + if + i32.const 0 + i32.const 56 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + i32.const 1 + i32.or + i32.store + local.get $1 + local.get $0 + i32.const 8 + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/collector/itcm/step (; 34 ;) (type $FUNCSIG$v) (local $0 i32) block $break|0 block $case3|0 @@ -1821,7 +1806,7 @@ i32.and global.set $~lib/collector/itcm/iter local.get $0 - i32.const 152 + i32.const 160 i32.ge_u if local.get $0 @@ -1840,7 +1825,7 @@ end end ) - (func $~lib/collector/itcm/__ref_collect (; 34 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/__ref_collect (; 35 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/maybeInit loop $continue|0 global.get $~lib/collector/itcm/state @@ -1859,17 +1844,17 @@ br_if $continue|1 end ) - (func $~lib/runtime/runtime.collect (; 35 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.collect (; 36 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/__ref_collect ) - (func $start (; 36 ;) (type $FUNCSIG$v) + (func $start (; 37 ;) (type $FUNCSIG$v) i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register global.set $~lib/runtime/ROOT ) - (func $~lib/runtime/__gc_mark_roots (; 37 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__gc_mark_roots (; 38 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/runtime/ROOT local.tee $0 @@ -1890,7 +1875,7 @@ end end ) - (func $~lib/runtime/__runtime_instanceof (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/__runtime_instanceof (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $nope block $~lib/runtime/Root block $~lib/arraybuffer/ArrayBuffer @@ -1917,10 +1902,10 @@ end i32.const 0 ) - (func $null (; 39 ;) (type $FUNCSIG$v) + (func $null (; 40 ;) (type $FUNCSIG$v) nop ) - (func $~lib/runtime/runtime.newArray|trampoline (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray|trampoline (; 41 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -1940,7 +1925,7 @@ local.get $3 call $~lib/runtime/runtime.newArray ) - (func $~lib/setargc (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) diff --git a/tests/compiler/class.untouched.wat b/tests/compiler/class.untouched.wat index bf4c176f7e..c48c2f310a 100644 --- a/tests/compiler/class.untouched.wat +++ b/tests/compiler/class.untouched.wat @@ -14,7 +14,7 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00c\00l\00a\00s\00s\00.\00t\00s\00") (data (i32.const 40) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") - (data (i32.const 104) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 104) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $class/Animal.ONE (mut i32) (i32.const 1)) @@ -44,24 +44,23 @@ (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 152)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 160)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $class/test)) - (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) - (export "runtime.discard" (func $~lib/runtime/runtime.discard)) - (export "runtime.register" (func $~lib/runtime/runtime.register)) - (export "runtime.newString" (func $~lib/runtime/runtime.newString)) - (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export ".setargc" (func $~lib/setargc)) - (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "runtime.retain" (func $~lib/runtime/runtime.retain)) - (export "runtime.release" (func $~lib/runtime/runtime.release)) - (export "runtime.collect" (func $~lib/runtime/runtime.collect)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.setArgc" (func $~lib/setargc)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $class/Animal.add (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -175,7 +174,11 @@ i32.const 0 end ) - (func $~lib/util/runtime/adjust (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.flags (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/__runtime_flags + ) + (func $~lib/util/runtime/adjust (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -187,12 +190,12 @@ i32.sub i32.shl ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 0 local.get $1 i32.store offset=2912 ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -213,7 +216,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 11 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 12 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -250,11 +253,11 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Root#get:tailRef (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.load offset=2912 ) - (func $~lib/allocator/tlsf/Block#get:right (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -294,7 +297,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/fls (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -312,7 +315,7 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -348,7 +351,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -368,7 +371,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -513,7 +516,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -545,7 +548,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/Root#setJump (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.load global.get $~lib/allocator/tlsf/FREE @@ -591,7 +594,7 @@ local.get $1 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -857,7 +860,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1010,7 +1013,7 @@ call $~lib/allocator/tlsf/Root#insert i32.const 1 ) - (func $~lib/allocator/tlsf/ffs (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -1026,7 +1029,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/ffs (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -1042,7 +1045,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1183,7 +1186,7 @@ end local.get $6 ) - (func $~lib/allocator/tlsf/Root#use (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 26 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1311,7 +1314,7 @@ global.get $~lib/allocator/tlsf/Block.INFO i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1547,12 +1550,12 @@ local.get $0 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/memory/memory.allocate (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -1574,88 +1577,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/allocator/tlsf/__mem_free (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.set $1 - local.get $1 - if - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.set $2 - local.get $2 - i32.load - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.or - i32.store - local.get $1 - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - call $~lib/allocator/tlsf/Root#insert - end - end - ) - (func $~lib/memory/memory.free (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - call $~lib/allocator/tlsf/__mem_free - ) - (func $~lib/runtime/runtime.discard (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 68 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - local.set $1 - local.get $1 - i32.load - global.get $~lib/util/runtime/HEADER_MAGIC - i32.eq - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 70 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $1 - call $~lib/memory/memory.free - ) - (func $~lib/collector/itcm/ManagedObjectList#clear (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.store offset=8 @@ -1663,7 +1585,7 @@ local.get $0 i32.store offset=12 ) - (func $~lib/collector/itcm/maybeInit (; 33 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/maybeInit (; 31 ;) (type $FUNCSIG$v) global.get $~lib/collector/itcm/state i32.const 0 i32.eq @@ -1696,7 +1618,7 @@ global.set $~lib/collector/itcm/state end ) - (func $~lib/collector/itcm/ManagedObject#set:color (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#set:color (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $0 i32.load offset=8 @@ -1708,7 +1630,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#set:next (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 local.get $0 @@ -1718,7 +1640,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -1736,7 +1658,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/collector/itcm/__ref_register (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_register (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) call $~lib/collector/itcm/maybeInit @@ -1755,7 +1677,7 @@ local.get $2 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/runtime.register (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -1764,8 +1686,8 @@ if i32.const 0 i32.const 120 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -1781,8 +1703,8 @@ if i32.const 0 i32.const 120 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -1793,27 +1715,31 @@ call $~lib/collector/itcm/__ref_register local.get $0 ) - (func $~lib/runtime/runtime.newString (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.newObject (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) - (func $~lib/runtime/runtime.newArrayBuffer (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.newArrayBuffer (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/ManagedObject#get:color (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 i32.and ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/ManagedObject#get:next (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 @@ -1821,7 +1747,7 @@ i32.xor i32.and ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#unlink (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1837,7 +1763,7 @@ local.get $1 call $~lib/collector/itcm/ManagedObject#set:next ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/collector/itcm/iter i32.eq @@ -1862,7 +1788,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/__ref_link (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/__ref_link (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) call $~lib/collector/itcm/maybeInit @@ -1899,7 +1825,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/memory/memory.copy (; 46 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2108,7 +2034,7 @@ end end ) - (func $~lib/runtime/runtime.newArray (; 47 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 46 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2116,18 +2042,18 @@ (local $8 i32) (local $9 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.get $2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $4 local.get $0 local.get $1 i32.shl local.set $5 local.get $5 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $6 local.get $4 local.tee $7 @@ -2165,27 +2091,74 @@ end local.get $4 ) - (func $~lib/runtime/Root#constructor (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/Root#constructor (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 ) - (func $~lib/runtime/runtime.retain (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.retain (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/runtime/ROOT call $~lib/collector/itcm/__ref_link ) - (func $~lib/runtime/runtime.release (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.release (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/collector/itcm/step (; 51 ;) (type $FUNCSIG$v) + (func $~lib/allocator/tlsf/__mem_free (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + if + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $2 + local.get $2 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 56 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/memory/memory.free (; 51 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/collector/itcm/step (; 52 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) block $break|0 @@ -2307,7 +2280,7 @@ unreachable end ) - (func $~lib/collector/itcm/__ref_collect (; 52 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/__ref_collect (; 53 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/maybeInit block $break|0 loop $continue|0 @@ -2330,19 +2303,19 @@ end end ) - (func $~lib/runtime/runtime.collect (; 53 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.collect (; 54 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/__ref_collect ) - (func $~lib/runtime/runtime#constructor (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime#constructor (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) unreachable ) - (func $start (; 55 ;) (type $FUNCSIG$v) + (func $start (; 56 ;) (type $FUNCSIG$v) call $start:class i32.const 0 call $~lib/runtime/Root#constructor global.set $~lib/runtime/ROOT ) - (func $~lib/collector/itcm/__ref_mark (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_mark (; 57 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) call $~lib/collector/itcm/maybeInit @@ -2363,7 +2336,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/runtime/__gc_mark_roots (; 57 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__gc_mark_roots (; 58 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/runtime/ROOT local.tee $0 @@ -2372,7 +2345,7 @@ call $~lib/collector/itcm/__ref_mark end ) - (func $~lib/runtime/__gc_mark_members (; 58 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/runtime/__gc_mark_members (; 59 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $invalid block $~lib/runtime/Root @@ -2389,7 +2362,7 @@ end unreachable ) - (func $~lib/runtime/__runtime_instanceof (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/__runtime_instanceof (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $nope block $~lib/runtime/Root block $~lib/arraybuffer/ArrayBuffer @@ -2415,9 +2388,28 @@ i32.const 0 return ) - (func $null (; 60 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__runtime_flags (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + block $invalid + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/string/String + local.get $0 + br_table $invalid $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid + end + i32.const 0 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + unreachable + ) + (func $null (; 62 ;) (type $FUNCSIG$v) ) - (func $~lib/runtime/runtime.newArray|trampoline (; 61 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray|trampoline (; 63 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2437,7 +2429,7 @@ local.get $3 call $~lib/runtime/runtime.newArray ) - (func $~lib/setargc (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 64 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) diff --git a/tests/compiler/closure.optimized.wat b/tests/compiler/closure.optimized.wat index 845cbc1e74..5c19014713 100644 --- a/tests/compiler/closure.optimized.wat +++ b/tests/compiler/closure.optimized.wat @@ -12,8 +12,8 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00,") (data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 72) "\01\00\00\00\1e") - (data (i32.const 88) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 72) "\01\00\00\00(") + (data (i32.const 88) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) @@ -27,18 +27,17 @@ (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) - (export "runtime.discard" (func $~lib/runtime/runtime.discard)) - (export "runtime.register" (func $~lib/runtime/runtime.register)) - (export "runtime.newString" (func $~lib/runtime/runtime.newString)) - (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export ".setargc" (func $~lib/setargc)) - (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "runtime.retain" (func $~lib/runtime/runtime.retain)) - (export "runtime.release" (func $~lib/runtime/runtime.release)) - (export "runtime.collect" (func $~lib/runtime/runtime.collect)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.setArgc" (func $~lib/setargc)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -53,7 +52,19 @@ i32.const 0 end ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/runtime/runtime.flags (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + block $__inlined_func$~lib/runtime/__runtime_flags + block $invalid + local.get $0 + i32.const 1 + i32.sub + br_table $__inlined_func$~lib/runtime/__runtime_flags $__inlined_func$~lib/runtime/__runtime_flags $__inlined_func$~lib/runtime/__runtime_flags $invalid + end + unreachable + end + i32.const 0 + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.const 22 i32.ge_u @@ -73,7 +84,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 4 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 22 i32.ge_u @@ -108,7 +119,7 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Block#get:right (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const -4 @@ -142,7 +153,7 @@ end local.get $0 ) - (func $~lib/allocator/tlsf/fls (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -158,7 +169,7 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -192,7 +203,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -211,7 +222,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -340,7 +351,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const 2 @@ -370,7 +381,7 @@ end local.get $0 ) - (func $~lib/allocator/tlsf/Root#setJump (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 i32.load i32.const 1 @@ -415,7 +426,7 @@ local.get $0 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -645,7 +656,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -768,7 +779,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#insert ) - (func $~lib/allocator/tlsf/ffs (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -782,7 +793,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -894,7 +905,7 @@ end end ) - (func $~lib/allocator/tlsf/Root#use (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1005,7 +1016,7 @@ i32.const 8 i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1031,14 +1042,14 @@ if unreachable end - i32.const 120 + i32.const 128 local.set $2 - i32.const 120 + i32.const 128 global.set $~lib/allocator/tlsf/ROOT i32.const 2912 i32.const 0 i32.store - i32.const 120 + i32.const 128 i32.const 0 i32.store i32.const 0 @@ -1048,7 +1059,7 @@ i32.const 22 i32.lt_u if - i32.const 120 + i32.const 128 local.get $1 i32.const 0 call $~lib/allocator/tlsf/Root#setSLMap @@ -1059,7 +1070,7 @@ i32.const 32 i32.lt_u if - i32.const 120 + i32.const 128 local.get $1 local.get $3 i32.const 0 @@ -1078,8 +1089,8 @@ br $repeat|0 end end - i32.const 120 - i32.const 3040 + i32.const 128 + i32.const 3048 current_memory i32.const 16 i32.shl @@ -1175,7 +1186,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/runtime.allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -1202,75 +1213,7 @@ i32.const 16 i32.add ) - (func $~lib/allocator/tlsf/__mem_free (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.tee $1 - if - local.get $0 - i32.const 8 - i32.sub - local.tee $2 - i32.load - local.tee $3 - i32.const 1 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - i32.const 1 - i32.or - i32.store - local.get $1 - local.get $0 - i32.const 8 - i32.sub - call $~lib/allocator/tlsf/Root#insert - end - end - ) - (func $~lib/runtime/runtime.discard (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.const 120 - i32.le_u - if - i32.const 0 - i32.const 88 - i32.const 68 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load - i32.const -1520547049 - i32.ne - if - i32.const 0 - i32.const 88 - i32.const 70 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - call $~lib/allocator/tlsf/__mem_free - ) - (func $~lib/collector/itcm/maybeInit (; 20 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/maybeInit (; 19 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/collector/itcm/state i32.eqz @@ -1313,7 +1256,7 @@ global.set $~lib/collector/itcm/state end ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -1341,7 +1284,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/collector/itcm/__ref_register (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_register (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) call $~lib/collector/itcm/maybeInit local.get $0 i32.const 16 @@ -1358,16 +1301,16 @@ local.get $0 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/runtime.register (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 120 + i32.const 128 i32.le_u if i32.const 0 i32.const 88 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -1381,8 +1324,8 @@ if i32.const 0 i32.const 88 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -1395,19 +1338,23 @@ end local.get $0 ) + (func $~lib/runtime/runtime.newObject (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) (func $~lib/runtime/runtime.newString (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) (func $~lib/runtime/runtime.newArrayBuffer (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) (func $~lib/collector/itcm/ManagedObject#makeGray (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) @@ -1656,18 +1603,18 @@ (local $5 i32) (local $6 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.get $2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $2 local.set $6 local.get $0 local.get $1 i32.shl local.tee $4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $5 local.tee $1 local.get $2 @@ -1707,7 +1654,45 @@ (func $~lib/runtime/runtime.release (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/collector/itcm/step (; 32 ;) (type $FUNCSIG$v) + (func $~lib/allocator/tlsf/__mem_free (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.tee $1 + if + local.get $0 + i32.const 8 + i32.sub + local.tee $2 + i32.load + local.tee $3 + i32.const 1 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + i32.const 1 + i32.or + i32.store + local.get $1 + local.get $0 + i32.const 8 + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/collector/itcm/step (; 33 ;) (type $FUNCSIG$v) (local $0 i32) block $break|0 block $case3|0 @@ -1797,7 +1782,7 @@ i32.and global.set $~lib/collector/itcm/iter local.get $0 - i32.const 120 + i32.const 128 i32.ge_u if local.get $0 @@ -1816,7 +1801,7 @@ end end ) - (func $~lib/collector/itcm/__ref_collect (; 33 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/__ref_collect (; 34 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/maybeInit loop $continue|0 global.get $~lib/collector/itcm/state @@ -1835,17 +1820,17 @@ br_if $continue|1 end ) - (func $~lib/runtime/runtime.collect (; 34 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.collect (; 35 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/__ref_collect ) - (func $start (; 35 ;) (type $FUNCSIG$v) + (func $start (; 36 ;) (type $FUNCSIG$v) i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register global.set $~lib/runtime/ROOT ) - (func $~lib/runtime/__gc_mark_roots (; 36 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__gc_mark_roots (; 37 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/runtime/ROOT local.tee $0 @@ -1866,7 +1851,7 @@ end end ) - (func $~lib/runtime/__runtime_instanceof (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/__runtime_instanceof (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $nope block $~lib/runtime/Root block $~lib/arraybuffer/ArrayBuffer @@ -1893,10 +1878,10 @@ end i32.const 0 ) - (func $null (; 38 ;) (type $FUNCSIG$v) + (func $null (; 39 ;) (type $FUNCSIG$v) nop ) - (func $~lib/runtime/runtime.newArray|trampoline (; 39 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray|trampoline (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -1916,7 +1901,7 @@ local.get $3 call $~lib/runtime/runtime.newArray ) - (func $~lib/setargc (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) diff --git a/tests/compiler/closure.untouched.wat b/tests/compiler/closure.untouched.wat index ae057c9ded..c54dc003b4 100644 --- a/tests/compiler/closure.untouched.wat +++ b/tests/compiler/closure.untouched.wat @@ -11,7 +11,7 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") - (data (i32.const 72) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 72) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -40,23 +40,22 @@ (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 120)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 128)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) - (export "runtime.discard" (func $~lib/runtime/runtime.discard)) - (export "runtime.register" (func $~lib/runtime/runtime.register)) - (export "runtime.newString" (func $~lib/runtime/runtime.newString)) - (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export ".setargc" (func $~lib/setargc)) - (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "runtime.retain" (func $~lib/runtime/runtime.retain)) - (export "runtime.release" (func $~lib/runtime/runtime.release)) - (export "runtime.collect" (func $~lib/runtime/runtime.collect)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.setArgc" (func $~lib/setargc)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -71,7 +70,11 @@ i32.const 0 end ) - (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.flags (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/__runtime_flags + ) + (func $~lib/util/runtime/adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -83,12 +86,12 @@ i32.sub i32.shl ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 0 local.get $1 i32.store offset=2912 ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -109,7 +112,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 5 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 6 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -146,11 +149,11 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Root#get:tailRef (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.load offset=2912 ) - (func $~lib/allocator/tlsf/Block#get:right (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -190,7 +193,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/fls (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -208,7 +211,7 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -244,7 +247,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -264,7 +267,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -409,7 +412,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -441,7 +444,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/Root#setJump (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.load global.get $~lib/allocator/tlsf/FREE @@ -487,7 +490,7 @@ local.get $1 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -753,7 +756,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -906,7 +909,7 @@ call $~lib/allocator/tlsf/Root#insert i32.const 1 ) - (func $~lib/allocator/tlsf/ffs (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -922,7 +925,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/ffs (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -938,7 +941,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1079,7 +1082,7 @@ end local.get $6 ) - (func $~lib/allocator/tlsf/Root#use (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1207,7 +1210,7 @@ global.get $~lib/allocator/tlsf/Block.INFO i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1443,12 +1446,12 @@ local.get $0 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/memory/memory.allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -1470,88 +1473,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/allocator/tlsf/__mem_free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.set $1 - local.get $1 - if - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.set $2 - local.get $2 - i32.load - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.or - i32.store - local.get $1 - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - call $~lib/allocator/tlsf/Root#insert - end - end - ) - (func $~lib/memory/memory.free (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - call $~lib/allocator/tlsf/__mem_free - ) - (func $~lib/runtime/runtime.discard (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 88 - i32.const 68 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - local.set $1 - local.get $1 - i32.load - global.get $~lib/util/runtime/HEADER_MAGIC - i32.eq - i32.eqz - if - i32.const 0 - i32.const 88 - i32.const 70 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $1 - call $~lib/memory/memory.free - ) - (func $~lib/collector/itcm/ManagedObjectList#clear (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.store offset=8 @@ -1559,7 +1481,7 @@ local.get $0 i32.store offset=12 ) - (func $~lib/collector/itcm/maybeInit (; 27 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/maybeInit (; 25 ;) (type $FUNCSIG$v) global.get $~lib/collector/itcm/state i32.const 0 i32.eq @@ -1592,7 +1514,7 @@ global.set $~lib/collector/itcm/state end ) - (func $~lib/collector/itcm/ManagedObject#set:color (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#set:color (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $0 i32.load offset=8 @@ -1604,7 +1526,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#set:next (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 local.get $0 @@ -1614,7 +1536,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -1632,7 +1554,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/collector/itcm/__ref_register (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_register (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) call $~lib/collector/itcm/maybeInit @@ -1651,7 +1573,7 @@ local.get $2 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/runtime.register (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -1660,8 +1582,8 @@ if i32.const 0 i32.const 88 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -1677,8 +1599,8 @@ if i32.const 0 i32.const 88 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -1689,27 +1611,31 @@ call $~lib/collector/itcm/__ref_register local.get $0 ) - (func $~lib/runtime/runtime.newString (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.newObject (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) - (func $~lib/runtime/runtime.newArrayBuffer (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.newArrayBuffer (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/ManagedObject#get:color (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 i32.and ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/ManagedObject#get:next (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 @@ -1717,7 +1643,7 @@ i32.xor i32.and ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#unlink (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1733,7 +1659,7 @@ local.get $1 call $~lib/collector/itcm/ManagedObject#set:next ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/collector/itcm/iter i32.eq @@ -1758,7 +1684,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/__ref_link (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/__ref_link (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) call $~lib/collector/itcm/maybeInit @@ -1795,7 +1721,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/memory/memory.copy (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2004,7 +1930,7 @@ end end ) - (func $~lib/runtime/runtime.newArray (; 41 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2012,18 +1938,18 @@ (local $8 i32) (local $9 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.get $2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $4 local.get $0 local.get $1 i32.shl local.set $5 local.get $5 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $6 local.get $4 local.tee $7 @@ -2061,27 +1987,74 @@ end local.get $4 ) - (func $~lib/runtime/Root#constructor (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/Root#constructor (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 ) - (func $~lib/runtime/runtime.retain (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.retain (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/runtime/ROOT call $~lib/collector/itcm/__ref_link ) - (func $~lib/runtime/runtime.release (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.release (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/collector/itcm/step (; 45 ;) (type $FUNCSIG$v) + (func $~lib/allocator/tlsf/__mem_free (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + if + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $2 + local.get $2 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/memory/memory.free (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/collector/itcm/step (; 46 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) block $break|0 @@ -2203,7 +2176,7 @@ unreachable end ) - (func $~lib/collector/itcm/__ref_collect (; 46 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/__ref_collect (; 47 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/maybeInit block $break|0 loop $continue|0 @@ -2226,18 +2199,18 @@ end end ) - (func $~lib/runtime/runtime.collect (; 47 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.collect (; 48 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/__ref_collect ) - (func $~lib/runtime/runtime#constructor (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime#constructor (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) unreachable ) - (func $start (; 49 ;) (type $FUNCSIG$v) + (func $start (; 50 ;) (type $FUNCSIG$v) i32.const 0 call $~lib/runtime/Root#constructor global.set $~lib/runtime/ROOT ) - (func $~lib/collector/itcm/__ref_mark (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_mark (; 51 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) call $~lib/collector/itcm/maybeInit @@ -2258,7 +2231,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/runtime/__gc_mark_roots (; 51 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__gc_mark_roots (; 52 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/runtime/ROOT local.tee $0 @@ -2267,7 +2240,7 @@ call $~lib/collector/itcm/__ref_mark end ) - (func $~lib/runtime/__gc_mark_members (; 52 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/runtime/__gc_mark_members (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $invalid block $~lib/runtime/Root @@ -2284,7 +2257,7 @@ end unreachable ) - (func $~lib/runtime/__runtime_instanceof (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/__runtime_instanceof (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $nope block $~lib/runtime/Root block $~lib/arraybuffer/ArrayBuffer @@ -2310,9 +2283,28 @@ i32.const 0 return ) - (func $null (; 54 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__runtime_flags (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + block $invalid + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/string/String + local.get $0 + br_table $invalid $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid + end + i32.const 0 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + unreachable + ) + (func $null (; 56 ;) (type $FUNCSIG$v) ) - (func $~lib/runtime/runtime.newArray|trampoline (; 55 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray|trampoline (; 57 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2332,7 +2324,7 @@ local.get $3 call $~lib/runtime/runtime.newArray ) - (func $~lib/setargc (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 58 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index 4ccf88b0c7..acb305dfbd 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -13,8 +13,8 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00,") (data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 72) "\01\00\00\00\1e") - (data (i32.const 88) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 72) "\01\00\00\00(") + (data (i32.const 88) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) @@ -39,18 +39,17 @@ (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) - (export "runtime.discard" (func $~lib/runtime/runtime.discard)) - (export "runtime.register" (func $~lib/runtime/runtime.register)) - (export "runtime.newString" (func $~lib/runtime/runtime.newString)) - (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export ".setargc" (func $~lib/setargc)) - (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "runtime.retain" (func $~lib/runtime/runtime.retain)) - (export "runtime.release" (func $~lib/runtime/runtime.release)) - (export "runtime.collect" (func $~lib/runtime/runtime.collect)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.setArgc" (func $~lib/setargc)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/allocator/tlsf/Root#setSLMap (; 1 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 @@ -1030,14 +1029,14 @@ if unreachable end - i32.const 120 + i32.const 128 local.set $2 - i32.const 120 + i32.const 128 global.set $~lib/allocator/tlsf/ROOT i32.const 2912 i32.const 0 i32.store - i32.const 120 + i32.const 128 i32.const 0 i32.store i32.const 0 @@ -1047,7 +1046,7 @@ i32.const 22 i32.lt_u if - i32.const 120 + i32.const 128 local.get $1 i32.const 0 call $~lib/allocator/tlsf/Root#setSLMap @@ -1058,7 +1057,7 @@ i32.const 32 i32.lt_u if - i32.const 120 + i32.const 128 local.get $1 local.get $3 i32.const 0 @@ -1077,8 +1076,8 @@ br $repeat|0 end end - i32.const 120 - i32.const 3040 + i32.const 128 + i32.const 3048 current_memory i32.const 16 i32.shl @@ -1174,7 +1173,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/runtime.allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -1289,16 +1288,16 @@ local.get $0 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/runtime.register (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 120 + i32.const 128 i32.le_u if i32.const 0 i32.const 88 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -1312,8 +1311,8 @@ if i32.const 0 i32.const 88 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -1332,9 +1331,9 @@ global.get $constructor/b if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 10 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1342,9 +1341,9 @@ end if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 10 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1352,46 +1351,46 @@ (func $start:constructor (; 22 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register global.set $constructor/emptyCtor i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 1 i32.store local.get $0 global.set $constructor/emptyCtorWithFieldInit i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store local.get $0 global.set $constructor/emptyCtorWithFieldNoInit i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register global.set $constructor/none i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 6 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 1 i32.store local.get $0 global.set $constructor/justFieldInit i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 7 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -1408,15 +1407,15 @@ br $__inlined_func$constructor/CtorConditionallyReturns#constructor end i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 8 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end global.set $constructor/ctorConditionallyReturns i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 9 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register global.set $constructor/ctorAllocates call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates @@ -1434,87 +1433,35 @@ i32.const 0 end ) - (func $~lib/allocator/tlsf/__mem_free (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.tee $1 - if + (func $~lib/runtime/runtime.flags (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + block $folding-inner0 + block $invalid local.get $0 - i32.const 8 - i32.sub - local.tee $2 - i32.load - local.tee $3 i32.const 1 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - i32.const 1 - i32.or - i32.store - local.get $1 - local.get $0 - i32.const 8 i32.sub - call $~lib/allocator/tlsf/Root#insert + br_table $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $invalid end - end - ) - (func $~lib/runtime/runtime.discard (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.const 120 - i32.le_u - if - i32.const 0 - i32.const 88 - i32.const 68 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load - i32.const -1520547049 - i32.ne - if - i32.const 0 - i32.const 88 - i32.const 70 - i32.const 6 - call $~lib/env/abort unreachable end + i32.const 0 + ) + (func $~lib/runtime/runtime.newObject (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - call $~lib/allocator/tlsf/__mem_free + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register ) (func $~lib/runtime/runtime.newString (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) (func $~lib/runtime/runtime.newArrayBuffer (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/runtime.allocate i32.const 11 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) (func $~lib/collector/itcm/ManagedObject#makeGray (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) @@ -1763,18 +1710,18 @@ (local $5 i32) (local $6 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.get $2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $2 local.set $6 local.get $0 local.get $1 i32.shl local.tee $4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 11 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $5 local.tee $1 local.get $2 @@ -1814,7 +1761,45 @@ (func $~lib/runtime/runtime.release (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/collector/itcm/step (; 34 ;) (type $FUNCSIG$v) + (func $~lib/allocator/tlsf/__mem_free (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.tee $1 + if + local.get $0 + i32.const 8 + i32.sub + local.tee $2 + i32.load + local.tee $3 + i32.const 1 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + i32.const 1 + i32.or + i32.store + local.get $1 + local.get $0 + i32.const 8 + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/collector/itcm/step (; 35 ;) (type $FUNCSIG$v) (local $0 i32) block $break|0 block $case3|0 @@ -1897,7 +1882,7 @@ i32.and global.set $~lib/collector/itcm/iter local.get $0 - i32.const 120 + i32.const 128 i32.ge_u if local.get $0 @@ -1916,7 +1901,7 @@ end end ) - (func $~lib/collector/itcm/__ref_collect (; 35 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/__ref_collect (; 36 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/maybeInit loop $continue|0 global.get $~lib/collector/itcm/state @@ -1935,18 +1920,18 @@ br_if $continue|1 end ) - (func $~lib/runtime/runtime.collect (; 36 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.collect (; 37 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/__ref_collect ) - (func $start (; 37 ;) (type $FUNCSIG$v) + (func $start (; 38 ;) (type $FUNCSIG$v) call $start:constructor i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 12 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register global.set $~lib/runtime/ROOT ) - (func $~lib/collector/itcm/__ref_mark (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_mark (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) call $~lib/collector/itcm/maybeInit global.get $~lib/collector/itcm/white local.get $0 @@ -1962,7 +1947,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/runtime/__gc_mark_roots (; 39 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__gc_mark_roots (; 40 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/runtime/ROOT local.tee $0 @@ -2031,7 +2016,7 @@ call $~lib/collector/itcm/__ref_mark end ) - (func $~lib/runtime/__gc_mark_members (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/__gc_mark_members (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) block $invalid block $~lib/runtime/Root block $~lib/arraybuffer/ArrayBuffer @@ -2076,7 +2061,7 @@ end unreachable ) - (func $~lib/runtime/__runtime_instanceof (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/__runtime_instanceof (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $nope block $~lib/runtime/Root block $~lib/arraybuffer/ArrayBuffer @@ -2157,10 +2142,10 @@ end i32.const 0 ) - (func $null (; 42 ;) (type $FUNCSIG$v) + (func $null (; 43 ;) (type $FUNCSIG$v) nop ) - (func $~lib/runtime/runtime.newArray|trampoline (; 43 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray|trampoline (; 44 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2180,7 +2165,7 @@ local.get $3 call $~lib/runtime/runtime.newArray ) - (func $~lib/setargc (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index 4ee2de6eb2..80582d771f 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -11,7 +11,7 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") - (data (i32.const 72) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 72) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -51,23 +51,22 @@ (global $constructor/ctorAllocates (mut i32) (i32.const 0)) (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 120)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 128)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) - (export "runtime.discard" (func $~lib/runtime/runtime.discard)) - (export "runtime.register" (func $~lib/runtime/runtime.register)) - (export "runtime.newString" (func $~lib/runtime/runtime.newString)) - (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export ".setargc" (func $~lib/setargc)) - (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "runtime.retain" (func $~lib/runtime/runtime.retain)) - (export "runtime.release" (func $~lib/runtime/runtime.release)) - (export "runtime.collect" (func $~lib/runtime/runtime.collect)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.setArgc" (func $~lib/setargc)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -1446,7 +1445,7 @@ call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -1568,7 +1567,7 @@ local.get $2 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/runtime.register (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -1577,8 +1576,8 @@ if i32.const 0 i32.const 88 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -1594,8 +1593,8 @@ if i32.const 0 i32.const 88 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -1611,9 +1610,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1623,9 +1622,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1638,9 +1637,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1653,9 +1652,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1665,9 +1664,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 6 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1680,9 +1679,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 7 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1705,9 +1704,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 8 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1718,9 +1717,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 9 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1736,9 +1735,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 10 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1749,9 +1748,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 10 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1801,108 +1800,35 @@ i32.const 0 end ) - (func $~lib/allocator/tlsf/__mem_free (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.set $1 - local.get $1 - if - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.set $2 - local.get $2 - i32.load - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.or - i32.store - local.get $1 - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - call $~lib/allocator/tlsf/Root#insert - end - end - ) - (func $~lib/memory/memory.free (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.flags (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/tlsf/__mem_free + call $~lib/runtime/__runtime_flags ) - (func $~lib/runtime/runtime.discard (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) + (func $~lib/runtime/runtime.newObject (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 88 - i32.const 68 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - local.set $1 - local.get $1 - i32.load - global.get $~lib/util/runtime/HEADER_MAGIC - i32.eq - i32.eqz - if - i32.const 0 - i32.const 88 - i32.const 70 - i32.const 6 - call $~lib/env/abort - unreachable - end + call $~lib/util/runtime/allocate local.get $1 - call $~lib/memory/memory.free + call $~lib/util/runtime/register ) - (func $~lib/runtime/runtime.newString (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.newString (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) - (func $~lib/runtime/runtime.newArrayBuffer (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.newArrayBuffer (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/runtime.allocate i32.const 11 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/ManagedObject#get:color (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 i32.and ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/ManagedObject#get:next (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 @@ -1910,7 +1836,7 @@ i32.xor i32.and ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#unlink (; 47 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1926,7 +1852,7 @@ local.get $1 call $~lib/collector/itcm/ManagedObject#set:next ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/collector/itcm/iter i32.eq @@ -1951,7 +1877,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/__ref_link (; 50 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/__ref_link (; 49 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) call $~lib/collector/itcm/maybeInit @@ -1988,7 +1914,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/memory/memory.copy (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2197,7 +2123,7 @@ end end ) - (func $~lib/runtime/runtime.newArray (; 52 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 51 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2205,18 +2131,18 @@ (local $8 i32) (local $9 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.get $2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $4 local.get $0 local.get $1 i32.shl local.set $5 local.get $5 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 11 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $6 local.get $4 local.tee $7 @@ -2254,27 +2180,74 @@ end local.get $4 ) - (func $~lib/runtime/Root#constructor (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/Root#constructor (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 12 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 ) - (func $~lib/runtime/runtime.retain (; 54 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.retain (; 53 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/runtime/ROOT call $~lib/collector/itcm/__ref_link ) - (func $~lib/runtime/runtime.release (; 55 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.release (; 54 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/collector/itcm/step (; 56 ;) (type $FUNCSIG$v) + (func $~lib/allocator/tlsf/__mem_free (; 55 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + if + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $2 + local.get $2 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/memory/memory.free (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/collector/itcm/step (; 57 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) block $break|0 @@ -2396,7 +2369,7 @@ unreachable end ) - (func $~lib/collector/itcm/__ref_collect (; 57 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/__ref_collect (; 58 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/maybeInit block $break|0 loop $continue|0 @@ -2419,19 +2392,19 @@ end end ) - (func $~lib/runtime/runtime.collect (; 58 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.collect (; 59 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/__ref_collect ) - (func $~lib/runtime/runtime#constructor (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime#constructor (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) unreachable ) - (func $start (; 60 ;) (type $FUNCSIG$v) + (func $start (; 61 ;) (type $FUNCSIG$v) call $start:constructor i32.const 0 call $~lib/runtime/Root#constructor global.set $~lib/runtime/ROOT ) - (func $~lib/collector/itcm/__ref_mark (; 61 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_mark (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) call $~lib/collector/itcm/maybeInit @@ -2452,7 +2425,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/runtime/__gc_mark_roots (; 62 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__gc_mark_roots (; 63 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/runtime/ROOT local.tee $0 @@ -2521,7 +2494,7 @@ call $~lib/collector/itcm/__ref_mark end ) - (func $~lib/runtime/__gc_mark_members (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/runtime/__gc_mark_members (; 64 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $invalid block $~lib/runtime/Root @@ -2565,7 +2538,7 @@ end unreachable ) - (func $~lib/runtime/__runtime_instanceof (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/__runtime_instanceof (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $nope block $~lib/runtime/Root block $~lib/arraybuffer/ArrayBuffer @@ -2645,9 +2618,64 @@ i32.const 0 return ) - (func $null (; 65 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__runtime_flags (; 66 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + block $invalid + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $constructor/CtorConditionallyAllocates + block $constructor/CtorAllocates + block $constructor/CtorConditionallyReturns + block $constructor/JustFieldNoInit + block $constructor/JustFieldInit + block $constructor/None + block $constructor/EmptyCtorWithFieldNoInit + block $constructor/EmptyCtorWithFieldInit + block $constructor/EmptyCtor + block $~lib/string/String + local.get $0 + br_table $invalid $~lib/string/String $constructor/EmptyCtor $constructor/EmptyCtorWithFieldInit $constructor/EmptyCtorWithFieldNoInit $constructor/None $constructor/JustFieldInit $constructor/JustFieldNoInit $constructor/CtorConditionallyReturns $constructor/CtorAllocates $constructor/CtorConditionallyAllocates $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid + end + i32.const 0 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + unreachable + ) + (func $null (; 67 ;) (type $FUNCSIG$v) ) - (func $~lib/runtime/runtime.newArray|trampoline (; 66 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray|trampoline (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2667,7 +2695,7 @@ local.get $3 call $~lib/runtime/runtime.newArray ) - (func $~lib/setargc (; 67 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 69 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index c69f10e119..bacc9845da 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -8,7 +8,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $exports/Animal.CAT i32 (i32.const 0)) @@ -26,7 +26,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (export "add" (func $exports/add)) - (export ".setargc" (func $~lib/setargc)) + (export "$.setArgc" (func $~lib/setargc)) (export "subOpt" (func $exports/subOpt|trampoline)) (export "math.sub" (func $exports/subOpt)) (export "Animal.CAT" (global $exports/Animal.CAT)) @@ -128,7 +128,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 call $~lib/allocator/arena/__mem_allocate @@ -142,16 +142,16 @@ i32.const 8 i32.add ) - (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 48 + i32.const 56 i32.le_u if i32.const 0 i32.const 16 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -165,8 +165,8 @@ if i32.const 0 i32.const 16 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -188,7 +188,7 @@ nop ) (func $start (; 10 ;) (type $FUNCSIG$v) - i32.const 48 + i32.const 56 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -233,9 +233,9 @@ local.get $0 i32.eqz if - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -261,9 +261,9 @@ local.get $0 i32.eqz if - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 6d21861e83..4518780c56 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -8,7 +8,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\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 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $exports/Animal.CAT i32 (i32.const 0)) @@ -23,14 +23,14 @@ (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) (global $~lib/argc (mut i32) (i32.const 0)) (global $exports/Car i32 (i32.const 1)) (global $exports/vehicles.Car i32 (i32.const 3)) (export "memory" (memory $0)) (export "table" (table $0)) (export "add" (func $exports/add)) - (export ".setargc" (func $~lib/setargc)) + (export "$.setArgc" (func $~lib/setargc)) (export "subOpt" (func $exports/subOpt|trampoline)) (export "math.sub" (func $exports/math.sub)) (export "Animal.CAT" (global $exports/Animal.CAT)) @@ -171,7 +171,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -187,7 +187,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/runtime.register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -196,8 +196,8 @@ if i32.const 0 i32.const 16 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -213,8 +213,8 @@ if i32.const 0 i32.const 16 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -229,9 +229,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -264,9 +264,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/gc.optimized.wat b/tests/compiler/gc.optimized.wat index 8fc022e45e..656ae34d3a 100644 --- a/tests/compiler/gc.optimized.wat +++ b/tests/compiler/gc.optimized.wat @@ -10,18 +10,18 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e") - (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 56) "\02\00\00\00\16") - (data (i32.const 72) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") - (data (i32.const 96) "\02\00\00\00\0e") - (data (i32.const 112) "g\00c\00.\00l\00i\00n\00k") - (data (i32.const 128) "\02\00\00\00\n") - (data (i32.const 144) "g\00c\00.\00t\00s") - (data (i32.const 160) "\02\00\00\00\12") - (data (i32.const 176) "g\00c\00.\00u\00n\00l\00i\00n\00k") - (data (i32.const 200) "\02\00\00\00\14") - (data (i32.const 216) "g\00c\00.\00c\00o\00l\00l\00e\00c\00t") + (data (i32.const 8) "\02\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\02\00\00\00\16") + (data (i32.const 80) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 104) "\02\00\00\00\0e") + (data (i32.const 120) "g\00c\00.\00l\00i\00n\00k") + (data (i32.const 136) "\02\00\00\00\n") + (data (i32.const 152) "g\00c\00.\00t\00s") + (data (i32.const 168) "\02\00\00\00\12") + (data (i32.const 184) "g\00c\00.\00u\00n\00l\00i\00n\00k") + (data (i32.const 208) "\02\00\00\00\14") + (data (i32.const 224) "g\00c\00.\00c\00o\00l\00l\00e\00c\00t") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) @@ -41,7 +41,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/main)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -104,7 +104,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/util/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 call $~lib/allocator/arena/__mem_allocate @@ -125,7 +125,7 @@ i32.add ) (func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 72 + i32.const 80 i32.const 1 local.get $0 f64.convert_i32_u @@ -141,16 +141,16 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 236 + i32.const 244 i32.le_u if i32.const 0 i32.const 24 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -164,8 +164,8 @@ if i32.const 0 i32.const 24 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -177,7 +177,7 @@ local.get $0 ) (func $gc/_dummy/__ref_link (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 112 + i32.const 120 i32.const 2 local.get $0 f64.convert_i32_u @@ -197,7 +197,7 @@ global.set $gc/_dummy/link_parentRef ) (func $gc/_dummy/__ref_unlink (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 176 + i32.const 184 i32.const 2 local.get $0 f64.convert_i32_u @@ -224,20 +224,20 @@ global.get $~lib/started i32.eqz if - i32.const 240 + i32.const 248 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register global.set $~lib/runtime/ROOT i32.const 1 global.set $~lib/started end - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $2 global.get $gc/_dummy/link_count local.set $0 @@ -255,7 +255,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 152 i32.const 14 i32.const 2 call $~lib/env/abort @@ -266,7 +266,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 152 i32.const 15 i32.const 2 call $~lib/env/abort @@ -277,7 +277,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 152 i32.const 16 i32.const 2 call $~lib/env/abort @@ -297,7 +297,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 152 i32.const 23 i32.const 2 call $~lib/env/abort @@ -310,7 +310,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 152 i32.const 24 i32.const 2 call $~lib/env/abort @@ -321,7 +321,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 152 i32.const 25 i32.const 2 call $~lib/env/abort @@ -333,7 +333,7 @@ local.set $0 global.get $gc/_dummy/collect_count local.set $1 - i32.const 216 + i32.const 224 i32.const 0 f64.const 0 f64.const 0 @@ -350,7 +350,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 152 i32.const 32 i32.const 2 call $~lib/env/abort @@ -361,7 +361,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 152 i32.const 33 i32.const 2 call $~lib/env/abort @@ -374,7 +374,7 @@ i32.ne if i32.const 0 - i32.const 144 + i32.const 152 i32.const 34 i32.const 2 call $~lib/env/abort diff --git a/tests/compiler/gc.untouched.wat b/tests/compiler/gc.untouched.wat index 852a8628c8..eb4ba1c905 100644 --- a/tests/compiler/gc.untouched.wat +++ b/tests/compiler/gc.untouched.wat @@ -9,12 +9,12 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 56) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") - (data (i32.const 96) "\02\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00l\00i\00n\00k\00") - (data (i32.const 128) "\02\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00t\00s\00") - (data (i32.const 160) "\02\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00u\00n\00l\00i\00n\00k\00") - (data (i32.const 200) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00c\00o\00l\00l\00e\00c\00t\00") + (data (i32.const 8) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 104) "\02\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00l\00i\00n\00k\00") + (data (i32.const 136) "\02\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00t\00s\00") + (data (i32.const 168) "\02\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00u\00n\00l\00i\00n\00k\00") + (data (i32.const 208) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00c\00o\00l\00l\00e\00c\00t\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) @@ -35,12 +35,12 @@ (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 236)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 244)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/main)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 @@ -137,7 +137,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -160,7 +160,7 @@ i32.add ) (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 72 + i32.const 80 i32.const 1 local.get $0 f64.convert_i32_u @@ -176,7 +176,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -185,8 +185,8 @@ if i32.const 0 i32.const 24 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -202,8 +202,8 @@ if i32.const 0 i32.const 24 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -219,9 +219,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -231,15 +231,15 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 ) (func $gc/_dummy/__ref_link (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 112 + i32.const 120 i32.const 2 local.get $0 f64.convert_i32_u @@ -264,7 +264,7 @@ call $gc/_dummy/__ref_link ) (func $gc/_dummy/__ref_unlink (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 176 + i32.const 184 i32.const 2 local.get $0 f64.convert_i32_u @@ -289,7 +289,7 @@ call $gc/_dummy/__ref_unlink ) (func $gc/_dummy/__ref_collect (; 14 ;) (type $FUNCSIG$v) - i32.const 216 + i32.const 224 i32.const 0 f64.const 0 f64.const 0 @@ -336,7 +336,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 152 i32.const 14 i32.const 2 call $~lib/env/abort @@ -348,7 +348,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 152 i32.const 15 i32.const 2 call $~lib/env/abort @@ -360,7 +360,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 152 i32.const 16 i32.const 2 call $~lib/env/abort @@ -380,7 +380,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 152 i32.const 23 i32.const 2 call $~lib/env/abort @@ -394,7 +394,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 152 i32.const 24 i32.const 2 call $~lib/env/abort @@ -406,7 +406,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 152 i32.const 25 i32.const 2 call $~lib/env/abort @@ -425,7 +425,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 152 i32.const 32 i32.const 2 call $~lib/env/abort @@ -437,7 +437,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 152 i32.const 33 i32.const 2 call $~lib/env/abort @@ -451,7 +451,7 @@ i32.eqz if i32.const 0 - i32.const 144 + i32.const 152 i32.const 34 i32.const 2 call $~lib/env/abort diff --git a/tests/compiler/gc/global-assign.optimized.wat b/tests/compiler/gc/global-assign.optimized.wat index d3cbfae505..a4feb0e8bd 100644 --- a/tests/compiler/gc/global-assign.optimized.wat +++ b/tests/compiler/gc/global-assign.optimized.wat @@ -8,12 +8,12 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e") - (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 56) "\02\00\00\00\16") - (data (i32.const 72) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") - (data (i32.const 96) "\02\00\00\00&") - (data (i32.const 112) "g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s") + (data (i32.const 8) "\02\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\02\00\00\00\16") + (data (i32.const 80) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 104) "\02\00\00\00&") + (data (i32.const 120) "g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) @@ -29,7 +29,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/global-assign/main)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -92,7 +92,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/util/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 call $~lib/allocator/arena/__mem_allocate @@ -113,7 +113,7 @@ i32.add ) (func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 72 + i32.const 80 i32.const 1 local.get $0 f64.convert_i32_u @@ -129,16 +129,16 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 152 + i32.const 160 i32.le_u if i32.const 0 i32.const 24 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -152,8 +152,8 @@ if i32.const 0 i32.const 24 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -165,12 +165,12 @@ local.get $0 ) (func $start:gc/global-assign (; 6 ;) (type $FUNCSIG$v) - i32.const 152 + i32.const 160 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/runtime/runtime.allocate - call $~lib/runtime/runtime.register + call $~lib/util/runtime/allocate + call $~lib/util/runtime/register global.set $gc/global-assign/global global.get $gc/global-assign/global global.set $gc/global-assign/globalRef @@ -179,7 +179,7 @@ i32.ne if i32.const 0 - i32.const 112 + i32.const 120 i32.const 11 i32.const 0 call $~lib/env/abort @@ -188,7 +188,7 @@ global.get $gc/_dummy/link_count if i32.const 0 - i32.const 112 + i32.const 120 i32.const 12 i32.const 0 call $~lib/env/abort @@ -197,21 +197,21 @@ global.get $gc/_dummy/unlink_count if i32.const 0 - i32.const 112 + i32.const 120 i32.const 13 i32.const 0 call $~lib/env/abort unreachable end - call $~lib/runtime/runtime.allocate - call $~lib/runtime/runtime.register + call $~lib/util/runtime/allocate + call $~lib/util/runtime/register global.set $gc/global-assign/global global.get $gc/_dummy/register_count i32.const 2 i32.ne if i32.const 0 - i32.const 112 + i32.const 120 i32.const 18 i32.const 0 call $~lib/env/abort @@ -220,7 +220,7 @@ global.get $gc/_dummy/link_count if i32.const 0 - i32.const 112 + i32.const 120 i32.const 19 i32.const 0 call $~lib/env/abort @@ -229,7 +229,7 @@ global.get $gc/_dummy/unlink_count if i32.const 0 - i32.const 112 + i32.const 120 i32.const 20 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/gc/global-assign.untouched.wat b/tests/compiler/gc/global-assign.untouched.wat index c85ab40235..7abc9c7abf 100644 --- a/tests/compiler/gc/global-assign.untouched.wat +++ b/tests/compiler/gc/global-assign.untouched.wat @@ -8,9 +8,9 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 56) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") - (data (i32.const 96) "\02\00\00\00&\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s\00") + (data (i32.const 8) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 104) "\02\00\00\00&\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) @@ -32,12 +32,12 @@ (global $gc/global-assign/global (mut i32) (i32.const 0)) (global $gc/global-assign/globalRef (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 152)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 160)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/global-assign/main)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 @@ -134,7 +134,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -157,7 +157,7 @@ i32.add ) (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 72 + i32.const 80 i32.const 1 local.get $0 f64.convert_i32_u @@ -173,7 +173,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -182,8 +182,8 @@ if i32.const 0 i32.const 24 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -199,8 +199,8 @@ if i32.const 0 i32.const 24 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -216,9 +216,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -245,7 +245,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 120 i32.const 11 i32.const 0 call $~lib/env/abort @@ -257,7 +257,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 120 i32.const 12 i32.const 0 call $~lib/env/abort @@ -269,7 +269,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 120 i32.const 13 i32.const 0 call $~lib/env/abort @@ -284,7 +284,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 120 i32.const 18 i32.const 0 call $~lib/env/abort @@ -296,7 +296,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 120 i32.const 19 i32.const 0 call $~lib/env/abort @@ -308,7 +308,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 120 i32.const 20 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/gc/global-init.optimized.wat b/tests/compiler/gc/global-init.optimized.wat index 544170fbf7..1356e33075 100644 --- a/tests/compiler/gc/global-init.optimized.wat +++ b/tests/compiler/gc/global-init.optimized.wat @@ -8,12 +8,12 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e") - (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 56) "\02\00\00\00\16") - (data (i32.const 72) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") - (data (i32.const 96) "\02\00\00\00\"") - (data (i32.const 112) "g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s") + (data (i32.const 8) "\02\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\02\00\00\00\16") + (data (i32.const 80) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 104) "\02\00\00\00\"") + (data (i32.const 120) "g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) @@ -28,7 +28,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/global-init/main)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -91,7 +91,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/util/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 call $~lib/allocator/arena/__mem_allocate @@ -112,7 +112,7 @@ i32.add ) (func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 72 + i32.const 80 i32.const 1 local.get $0 f64.convert_i32_u @@ -128,16 +128,16 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 148 + i32.const 156 i32.le_u if i32.const 0 i32.const 24 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -151,8 +151,8 @@ if i32.const 0 i32.const 24 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -164,19 +164,19 @@ local.get $0 ) (func $start:gc/global-init (; 6 ;) (type $FUNCSIG$v) - i32.const 152 + i32.const 160 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/runtime/runtime.allocate - call $~lib/runtime/runtime.register + call $~lib/util/runtime/allocate + call $~lib/util/runtime/register global.set $gc/global-init/global global.get $gc/_dummy/register_count i32.const 1 i32.ne if i32.const 0 - i32.const 112 + i32.const 120 i32.const 10 i32.const 0 call $~lib/env/abort @@ -185,7 +185,7 @@ global.get $gc/_dummy/link_count if i32.const 0 - i32.const 112 + i32.const 120 i32.const 11 i32.const 0 call $~lib/env/abort @@ -194,21 +194,21 @@ global.get $gc/_dummy/unlink_count if i32.const 0 - i32.const 112 + i32.const 120 i32.const 12 i32.const 0 call $~lib/env/abort unreachable end - call $~lib/runtime/runtime.allocate - call $~lib/runtime/runtime.register + call $~lib/util/runtime/allocate + call $~lib/util/runtime/register global.set $gc/global-init/global global.get $gc/_dummy/register_count i32.const 2 i32.ne if i32.const 0 - i32.const 112 + i32.const 120 i32.const 15 i32.const 0 call $~lib/env/abort @@ -217,7 +217,7 @@ global.get $gc/_dummy/link_count if i32.const 0 - i32.const 112 + i32.const 120 i32.const 16 i32.const 0 call $~lib/env/abort @@ -226,7 +226,7 @@ global.get $gc/_dummy/unlink_count if i32.const 0 - i32.const 112 + i32.const 120 i32.const 17 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/gc/global-init.untouched.wat b/tests/compiler/gc/global-init.untouched.wat index 7f3ce6d220..12382a1ebb 100644 --- a/tests/compiler/gc/global-init.untouched.wat +++ b/tests/compiler/gc/global-init.untouched.wat @@ -8,9 +8,9 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 56) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") - (data (i32.const 96) "\02\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s\00") + (data (i32.const 8) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 104) "\02\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) @@ -31,12 +31,12 @@ (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $gc/global-init/global (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 148)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 156)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/global-init/main)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 @@ -133,7 +133,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -156,7 +156,7 @@ i32.add ) (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 72 + i32.const 80 i32.const 1 local.get $0 f64.convert_i32_u @@ -172,7 +172,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -181,8 +181,8 @@ if i32.const 0 i32.const 24 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -198,8 +198,8 @@ if i32.const 0 i32.const 24 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -215,9 +215,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -242,7 +242,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 120 i32.const 10 i32.const 0 call $~lib/env/abort @@ -254,7 +254,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 120 i32.const 11 i32.const 0 call $~lib/env/abort @@ -266,7 +266,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 120 i32.const 12 i32.const 0 call $~lib/env/abort @@ -281,7 +281,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 120 i32.const 15 i32.const 0 call $~lib/env/abort @@ -293,7 +293,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 120 i32.const 16 i32.const 0 call $~lib/env/abort @@ -305,7 +305,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 120 i32.const 17 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/gc/itcm/trace.optimized.wat b/tests/compiler/gc/itcm/trace.optimized.wat index 9284bdd4a8..f1f6a1f51b 100644 --- a/tests/compiler/gc/itcm/trace.optimized.wat +++ b/tests/compiler/gc/itcm/trace.optimized.wat @@ -15,60 +15,58 @@ (data (i32.const 24) "g\00c\00/\00i\00t\00c\00m\00/\00t\00r\00a\00c\00e\00.\00t\00s") (data (i32.const 56) "\01\00\00\00\"") (data (i32.const 72) "#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)") - (data (i32.const 112) "\01\00\00\00\1e") - (data (i32.const 128) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 160) "\01\00\00\00\1a") - (data (i32.const 176) "i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r") - (data (i32.const 208) "\01\00\00\00\12") - (data (i32.const 224) "i\00t\00c\00m\00~\00i\00n\00i\00t") - (data (i32.const 248) "\01\00\00\00 ") - (data (i32.const 264) " \00 \00 \00 \00 \00f\00r\00o\00m\00S\00p\00a\00c\00e\00 \00=") - (data (i32.const 296) "\01\00\00\00\14") - (data (i32.const 312) " \00 \00 \00 \00 \00c\00l\00e\00a\00r") - (data (i32.const 336) "\01\00\00\00\1c") - (data (i32.const 352) " \00 \00 \00 \00 \00t\00o\00S\00p\00a\00c\00e\00 \00=") - (data (i32.const 384) "\01\00\00\00\"") - (data (i32.const 400) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00I\00D\00L\00E") - (data (i32.const 440) "\01\00\00\006") - (data (i32.const 456) " \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]") - (data (i32.const 512) "\01\00\00\00(") - (data (i32.const 528) "#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)") - (data (i32.const 568) "\01\00\00\00&") - (data (i32.const 584) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 624) "\01\00\00\00\12") - (data (i32.const 640) "i\00t\00c\00m\00.\00l\00i\00n\00k") - (data (i32.const 664) "\01\00\00\00\1a") - (data (i32.const 680) " \00 \00 \00 \00 \00m\00a\00k\00e\00G\00r\00a\00y") - (data (i32.const 712) "\01\00\00\00:") - (data (i32.const 728) " \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]") - (data (i32.const 792) "\01\00\00\00\1c") - (data (i32.const 808) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f") - (data (i32.const 840) "\01\00\00\00\1a") - (data (i32.const 856) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 888) "\01\00\00\00(") - (data (i32.const 904) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 944) "\01\00\00\00\1e") - (data (i32.const 960) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l") - (data (i32.const 992) "\01\00\00\00\16") - (data (i32.const 1008) "#\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)") - (data (i32.const 1032) "\01\00\00\00\18") - (data (i32.const 1048) "i\00t\00c\00m\00.\00c\00o\00l\00l\00e\00c\00t") - (data (i32.const 1072) "\01\00\00\00\1c") - (data (i32.const 1088) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E") - (data (i32.const 1120) "\01\00\00\00\"") - (data (i32.const 1136) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K") - (data (i32.const 1176) "\01\00\00\00\1c") - (data (i32.const 1192) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K") - (data (i32.const 1224) "\01\00\00\00*") - (data (i32.const 1240) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h") - (data (i32.const 1288) "\01\00\00\00$") - (data (i32.const 1304) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P") - (data (i32.const 1344) "\01\00\00\00(") - (data (i32.const 1360) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e") - (data (i32.const 1400) "\01\00\00\00,") - (data (i32.const 1416) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h") - (data (i32.const 1464) "\01\00\00\00\12") - (data (i32.const 1480) "i\00t\00c\00m\00.\00m\00a\00r\00k") + (data (i32.const 112) "\01\00\00\00(") + (data (i32.const 128) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 168) "\01\00\00\00\1a") + (data (i32.const 184) "i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 216) "\01\00\00\00\12") + (data (i32.const 232) "i\00t\00c\00m\00~\00i\00n\00i\00t") + (data (i32.const 256) "\01\00\00\00 ") + (data (i32.const 272) " \00 \00 \00 \00 \00f\00r\00o\00m\00S\00p\00a\00c\00e\00 \00=") + (data (i32.const 304) "\01\00\00\00\14") + (data (i32.const 320) " \00 \00 \00 \00 \00c\00l\00e\00a\00r") + (data (i32.const 344) "\01\00\00\00\1c") + (data (i32.const 360) " \00 \00 \00 \00 \00t\00o\00S\00p\00a\00c\00e\00 \00=") + (data (i32.const 392) "\01\00\00\00\"") + (data (i32.const 408) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00I\00D\00L\00E") + (data (i32.const 448) "\01\00\00\006") + (data (i32.const 464) " \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]") + (data (i32.const 520) "\01\00\00\00(") + (data (i32.const 536) "#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)") + (data (i32.const 576) "\01\00\00\00&") + (data (i32.const 592) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 632) "\01\00\00\00\12") + (data (i32.const 648) "i\00t\00c\00m\00.\00l\00i\00n\00k") + (data (i32.const 672) "\01\00\00\00\1a") + (data (i32.const 688) " \00 \00 \00 \00 \00m\00a\00k\00e\00G\00r\00a\00y") + (data (i32.const 720) "\01\00\00\00:") + (data (i32.const 736) " \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]") + (data (i32.const 800) "\01\00\00\00\1c") + (data (i32.const 816) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f") + (data (i32.const 848) "\01\00\00\00\1a") + (data (i32.const 864) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 896) "\01\00\00\00\1e") + (data (i32.const 912) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l") + (data (i32.const 944) "\01\00\00\00\16") + (data (i32.const 960) "#\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)") + (data (i32.const 984) "\01\00\00\00\18") + (data (i32.const 1000) "i\00t\00c\00m\00.\00c\00o\00l\00l\00e\00c\00t") + (data (i32.const 1024) "\01\00\00\00\1c") + (data (i32.const 1040) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E") + (data (i32.const 1072) "\01\00\00\00\"") + (data (i32.const 1088) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K") + (data (i32.const 1128) "\01\00\00\00\1c") + (data (i32.const 1144) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K") + (data (i32.const 1176) "\01\00\00\00*") + (data (i32.const 1192) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h") + (data (i32.const 1240) "\01\00\00\00$") + (data (i32.const 1256) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P") + (data (i32.const 1296) "\01\00\00\00(") + (data (i32.const 1312) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e") + (data (i32.const 1352) "\01\00\00\00,") + (data (i32.const 1368) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h") + (data (i32.const 1416) "\01\00\00\00\12") + (data (i32.const 1432) "i\00t\00c\00m\00.\00m\00a\00r\00k") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -83,7 +81,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/itcm/trace/main)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -146,7 +144,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -174,7 +172,7 @@ i32.add ) (func $~lib/collector/itcm/ManagedObjectList#clear (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 312 + i32.const 320 i32.const 1 local.get $0 i32.const 16 @@ -197,7 +195,7 @@ global.get $~lib/collector/itcm/state i32.eqz if - i32.const 224 + i32.const 232 i32.const 0 f64.const 0 f64.const 0 @@ -208,7 +206,7 @@ i32.const 16 call $~lib/allocator/arena/__mem_allocate global.set $~lib/collector/itcm/fromSpace - i32.const 264 + i32.const 272 i32.const 1 global.get $~lib/collector/itcm/fromSpace i32.const 16 @@ -231,7 +229,7 @@ i32.const 16 call $~lib/allocator/arena/__mem_allocate global.set $~lib/collector/itcm/toSpace - i32.const 352 + i32.const 360 i32.const 1 global.get $~lib/collector/itcm/toSpace i32.const 16 @@ -255,7 +253,7 @@ global.set $~lib/collector/itcm/iter i32.const 1 global.set $~lib/collector/itcm/state - i32.const 400 + i32.const 408 i32.const 0 f64.const 0 f64.const 0 @@ -267,7 +265,7 @@ ) (func $~lib/collector/itcm/ManagedObjectList#push (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) - i32.const 456 + i32.const 464 i32.const 3 local.get $0 i32.load offset=12 @@ -310,7 +308,7 @@ i32.store offset=12 ) (func $~lib/collector/itcm/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 176 + i32.const 184 i32.const 1 local.get $0 f64.convert_i32_u @@ -335,16 +333,16 @@ local.get $0 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/runtime.register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 1500 + i32.const 1452 i32.le_u if i32.const 0 i32.const 128 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -358,8 +356,8 @@ if i32.const 0 i32.const 128 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -373,9 +371,9 @@ (func $gc/itcm/trace/Ref#constructor (; 9 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -594,7 +592,7 @@ ) (func $~lib/collector/itcm/ManagedObject#unlink (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) - i32.const 728 + i32.const 736 i32.const 3 local.get $0 i32.load offset=12 @@ -630,7 +628,7 @@ i32.store offset=8 ) (func $~lib/collector/itcm/ManagedObject#makeGray (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 680 + i32.const 688 i32.const 1 local.get $0 i32.const 16 @@ -665,7 +663,7 @@ ) (func $~lib/collector/itcm/__ref_link (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) - i32.const 640 + i32.const 648 i32.const 2 local.get $0 f64.convert_i32_u @@ -707,21 +705,21 @@ (func $~lib/arraybuffer/ArrayBufferView#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $1 i32.const 4 call $~lib/memory/memory.fill local.get $1 i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $1 local.get $0 i32.eqz if i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -948,7 +946,7 @@ i32.shl i32.const 0 local.get $0 - i32.const 1500 + i32.const 1452 i32.gt_u select i32.const 32 @@ -986,12 +984,12 @@ i32.eq if local.get $0 - i32.const 1500 + i32.const 1452 i32.le_u if i32.const 0 - i32.const 904 - i32.const 74 + i32.const 128 + i32.const 88 i32.const 8 call $~lib/env/abort unreachable @@ -1111,7 +1109,7 @@ call $~lib/env/trace call $gc/itcm/trace/Ref#constructor local.set $1 - i32.const 528 + i32.const 536 i32.const 0 f64.const 0 f64.const 0 @@ -1120,9 +1118,9 @@ f64.const 0 call $~lib/env/trace i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 @@ -1130,7 +1128,7 @@ local.get $0 i32.const 1 i32.store offset=12 - i32.const 808 + i32.const 816 i32.const 0 f64.const 0 f64.const 0 @@ -1141,7 +1139,7 @@ local.get $0 local.get $1 call $~lib/array/Array#__set - i32.const 960 + i32.const 912 i32.const 0 f64.const 0 f64.const 0 @@ -1152,7 +1150,7 @@ local.get $0 i32.const 0 call $~lib/array/Array#__set - i32.const 1008 + i32.const 960 i32.const 0 f64.const 0 f64.const 0 @@ -1180,7 +1178,7 @@ end unreachable end - i32.const 1088 + i32.const 1040 i32.const 0 f64.const 0 f64.const 0 @@ -1190,7 +1188,7 @@ call $~lib/env/trace i32.const 2 global.set $~lib/collector/itcm/state - i32.const 1136 + i32.const 1088 i32.const 0 f64.const 0 f64.const 0 @@ -1208,7 +1206,7 @@ global.get $~lib/collector/itcm/toSpace i32.ne if - i32.const 1192 + i32.const 1144 i32.const 1 local.get $0 i32.const 16 @@ -1236,7 +1234,7 @@ local.get $1 call $~lib/runtime/__gc_mark_members else - i32.const 1240 + i32.const 1192 i32.const 0 f64.const 0 f64.const 0 @@ -1267,7 +1265,7 @@ global.set $~lib/collector/itcm/iter i32.const 3 global.set $~lib/collector/itcm/state - i32.const 1304 + i32.const 1256 i32.const 0 f64.const 0 f64.const 0 @@ -1284,7 +1282,7 @@ global.get $~lib/collector/itcm/toSpace i32.ne if - i32.const 1360 + i32.const 1312 i32.const 1 local.get $0 i32.const 16 @@ -1301,7 +1299,7 @@ i32.and global.set $~lib/collector/itcm/iter else - i32.const 1416 + i32.const 1368 i32.const 0 f64.const 0 f64.const 0 @@ -1313,7 +1311,7 @@ call $~lib/collector/itcm/ManagedObjectList#clear i32.const 1 global.set $~lib/collector/itcm/state - i32.const 400 + i32.const 408 i32.const 0 f64.const 0 f64.const 0 @@ -1325,7 +1323,7 @@ end ) (func $~lib/collector/itcm/__ref_collect (; 22 ;) (type $FUNCSIG$v) - i32.const 1048 + i32.const 1000 i32.const 0 f64.const 0 f64.const 0 @@ -1355,7 +1353,7 @@ global.get $~lib/started i32.eqz if - i32.const 1504 + i32.const 1456 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -1366,7 +1364,7 @@ end ) (func $~lib/collector/itcm/__ref_mark (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 1480 + i32.const 1432 i32.const 1 local.get $0 f64.convert_i32_u diff --git a/tests/compiler/gc/itcm/trace.untouched.wat b/tests/compiler/gc/itcm/trace.untouched.wat index 9dd9bb5747..a9e42ed97f 100644 --- a/tests/compiler/gc/itcm/trace.untouched.wat +++ b/tests/compiler/gc/itcm/trace.untouched.wat @@ -13,33 +13,32 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00 \00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00i\00t\00c\00m\00/\00t\00r\00a\00c\00e\00.\00t\00s\00") (data (i32.const 56) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)\00") - (data (i32.const 112) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 160) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") - (data (i32.const 208) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00i\00n\00i\00t\00") - (data (i32.const 248) "\01\00\00\00 \00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00f\00r\00o\00m\00S\00p\00a\00c\00e\00 \00=\00") - (data (i32.const 296) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00c\00l\00e\00a\00r\00") - (data (i32.const 336) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00t\00o\00S\00p\00a\00c\00e\00 \00=\00") - (data (i32.const 384) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00I\00D\00L\00E\00") - (data (i32.const 440) "\01\00\00\006\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") - (data (i32.const 512) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)\00") - (data (i32.const 568) "\01\00\00\00&\00\00\00\00\00\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 624) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00l\00i\00n\00k\00") - (data (i32.const 664) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00m\00a\00k\00e\00G\00r\00a\00y\00") - (data (i32.const 712) "\01\00\00\00:\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") - (data (i32.const 792) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f\00") - (data (i32.const 840) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 888) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 944) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l\00") - (data (i32.const 992) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00#\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)\00") - (data (i32.const 1032) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00c\00o\00l\00l\00e\00c\00t\00") - (data (i32.const 1072) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E\00") - (data (i32.const 1120) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K\00") - (data (i32.const 1176) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00") - (data (i32.const 1224) "\01\00\00\00*\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h\00") - (data (i32.const 1288) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P\00") - (data (i32.const 1344) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e\00") - (data (i32.const 1400) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h\00") - (data (i32.const 1464) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00m\00a\00r\00k\00") + (data (i32.const 112) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 168) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 216) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00i\00n\00i\00t\00") + (data (i32.const 256) "\01\00\00\00 \00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00f\00r\00o\00m\00S\00p\00a\00c\00e\00 \00=\00") + (data (i32.const 304) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00c\00l\00e\00a\00r\00") + (data (i32.const 344) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00t\00o\00S\00p\00a\00c\00e\00 \00=\00") + (data (i32.const 392) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00I\00D\00L\00E\00") + (data (i32.const 448) "\01\00\00\006\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") + (data (i32.const 520) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)\00") + (data (i32.const 576) "\01\00\00\00&\00\00\00\00\00\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 632) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00l\00i\00n\00k\00") + (data (i32.const 672) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00m\00a\00k\00e\00G\00r\00a\00y\00") + (data (i32.const 720) "\01\00\00\00:\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") + (data (i32.const 800) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f\00") + (data (i32.const 848) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 896) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l\00") + (data (i32.const 944) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00#\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)\00") + (data (i32.const 984) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00c\00o\00l\00l\00e\00c\00t\00") + (data (i32.const 1024) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E\00") + (data (i32.const 1072) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K\00") + (data (i32.const 1128) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00") + (data (i32.const 1176) "\01\00\00\00*\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h\00") + (data (i32.const 1240) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P\00") + (data (i32.const 1296) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e\00") + (data (i32.const 1352) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h\00") + (data (i32.const 1416) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00m\00a\00r\00k\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/itcm/trace/GC_TRACE i32 (i32.const 1)) @@ -55,12 +54,12 @@ (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 1500)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 1452)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/itcm/trace/main)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 @@ -157,7 +156,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -181,7 +180,7 @@ ) (func $~lib/collector/itcm/ManagedObjectList#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) - i32.const 312 + i32.const 320 i32.const 1 block $~lib/collector/itcm/objToRef|inlined.1 (result i32) local.get $0 @@ -209,7 +208,7 @@ i32.const 0 i32.eq if - i32.const 224 + i32.const 232 i32.const 0 f64.const 0 f64.const 0 @@ -220,7 +219,7 @@ global.get $~lib/util/runtime/HEADER_SIZE call $~lib/memory/memory.allocate global.set $~lib/collector/itcm/fromSpace - i32.const 264 + i32.const 272 i32.const 1 block $~lib/collector/itcm/objToRef|inlined.0 (result i32) global.get $~lib/collector/itcm/fromSpace @@ -246,7 +245,7 @@ global.get $~lib/util/runtime/HEADER_SIZE call $~lib/memory/memory.allocate global.set $~lib/collector/itcm/toSpace - i32.const 352 + i32.const 360 i32.const 1 block $~lib/collector/itcm/objToRef|inlined.2 (result i32) global.get $~lib/collector/itcm/toSpace @@ -273,7 +272,7 @@ global.set $~lib/collector/itcm/iter i32.const 1 global.set $~lib/collector/itcm/state - i32.const 400 + i32.const 408 i32.const 0 f64.const 0 f64.const 0 @@ -311,7 +310,7 @@ local.get $0 i32.load offset=12 local.set $2 - i32.const 456 + i32.const 464 i32.const 3 block $~lib/collector/itcm/objToRef|inlined.3 (result i32) local.get $2 @@ -356,7 +355,7 @@ (func $~lib/collector/itcm/__ref_register (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) - i32.const 176 + i32.const 184 i32.const 1 local.get $0 f64.convert_i32_u @@ -381,7 +380,7 @@ local.get $2 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/runtime.register (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -390,8 +389,8 @@ if i32.const 0 i32.const 128 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -407,8 +406,8 @@ if i32.const 0 i32.const 128 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -424,9 +423,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -698,14 +697,14 @@ i32.gt_u if i32.const 0 - i32.const 584 + i32.const 592 i32.const 54 i32.const 43 call $~lib/env/abort unreachable end local.get $1 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 local.get $2 i32.const 0 @@ -713,7 +712,7 @@ call $~lib/memory/memory.fill local.get $2 i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/collector/itcm/ManagedObject#get:color (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -739,7 +738,7 @@ local.get $0 i32.load offset=12 local.set $2 - i32.const 728 + i32.const 736 i32.const 3 block $~lib/collector/itcm/objToRef|inlined.7 (result i32) local.get $2 @@ -777,7 +776,7 @@ ) (func $~lib/collector/itcm/ManagedObject#makeGray (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) - i32.const 680 + i32.const 688 i32.const 1 block $~lib/collector/itcm/objToRef|inlined.6 (result i32) local.get $0 @@ -819,7 +818,7 @@ (func $~lib/collector/itcm/__ref_link (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - i32.const 640 + i32.const 648 i32.const 2 local.get $0 f64.convert_i32_u @@ -875,7 +874,7 @@ i32.gt_u if i32.const 0 - i32.const 584 + i32.const 592 i32.const 12 i32.const 57 call $~lib/env/abort @@ -893,9 +892,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -940,9 +939,9 @@ local.get $0 else i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end local.get $1 i32.const 2 @@ -1242,8 +1241,8 @@ i32.eqz if i32.const 0 - i32.const 904 - i32.const 74 + i32.const 128 + i32.const 88 i32.const 8 call $~lib/env/abort unreachable @@ -1297,7 +1296,7 @@ i32.gt_u if i32.const 0 - i32.const 856 + i32.const 864 i32.const 14 i32.const 64 call $~lib/env/abort @@ -1415,7 +1414,7 @@ i32.const 0 call $gc/itcm/trace/Ref#constructor local.set $0 - i32.const 528 + i32.const 536 i32.const 0 f64.const 0 f64.const 0 @@ -1427,7 +1426,7 @@ i32.const 1 call $~lib/array/Array#constructor local.set $1 - i32.const 808 + i32.const 816 i32.const 0 f64.const 0 f64.const 0 @@ -1439,7 +1438,7 @@ i32.const 0 local.get $0 call $~lib/array/Array#__set - i32.const 960 + i32.const 912 i32.const 0 f64.const 0 f64.const 0 @@ -1451,7 +1450,7 @@ i32.const 0 i32.const 0 call $~lib/array/Array#__set - i32.const 1008 + i32.const 960 i32.const 0 f64.const 0 f64.const 0 @@ -1494,7 +1493,7 @@ unreachable end block - i32.const 1088 + i32.const 1040 i32.const 0 f64.const 0 f64.const 0 @@ -1505,7 +1504,7 @@ call $~lib/runtime/__gc_mark_roots i32.const 2 global.set $~lib/collector/itcm/state - i32.const 1136 + i32.const 1088 i32.const 0 f64.const 0 f64.const 0 @@ -1526,7 +1525,7 @@ global.get $~lib/collector/itcm/toSpace i32.ne if - i32.const 1192 + i32.const 1144 i32.const 1 block $~lib/collector/itcm/objToRef|inlined.10 (result i32) local.get $0 @@ -1559,7 +1558,7 @@ call $~lib/runtime/__gc_mark_members else call $~lib/runtime/__gc_mark_roots - i32.const 1240 + i32.const 1192 i32.const 0 f64.const 0 f64.const 0 @@ -1588,7 +1587,7 @@ global.set $~lib/collector/itcm/iter i32.const 3 global.set $~lib/collector/itcm/state - i32.const 1304 + i32.const 1256 i32.const 0 f64.const 0 f64.const 0 @@ -1610,7 +1609,7 @@ global.get $~lib/collector/itcm/toSpace i32.ne if - i32.const 1360 + i32.const 1312 i32.const 1 block $~lib/collector/itcm/objToRef|inlined.12 (result i32) local.get $0 @@ -1636,7 +1635,7 @@ call $~lib/memory/memory.free end else - i32.const 1416 + i32.const 1368 i32.const 0 f64.const 0 f64.const 0 @@ -1648,7 +1647,7 @@ call $~lib/collector/itcm/ManagedObjectList#clear i32.const 1 global.set $~lib/collector/itcm/state - i32.const 400 + i32.const 408 i32.const 0 f64.const 0 f64.const 0 @@ -1664,7 +1663,7 @@ end ) (func $~lib/collector/itcm/__ref_collect (; 32 ;) (type $FUNCSIG$v) - i32.const 1048 + i32.const 1000 i32.const 0 f64.const 0 f64.const 0 @@ -1738,7 +1737,7 @@ (func $~lib/collector/itcm/__ref_mark (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) - i32.const 1480 + i32.const 1432 i32.const 1 local.get $0 f64.convert_i32_u diff --git a/tests/compiler/gc/rc/global-assign.optimized.wat b/tests/compiler/gc/rc/global-assign.optimized.wat index 5540b9bbf6..3b0256a755 100644 --- a/tests/compiler/gc/rc/global-assign.optimized.wat +++ b/tests/compiler/gc/rc/global-assign.optimized.wat @@ -8,16 +8,16 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e") - (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 56) "\02\00\00\00\16") - (data (i32.const 72) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") - (data (i32.const 96) "\02\00\00\00\12") - (data (i32.const 112) "g\00c\00.\00r\00e\00t\00a\00i\00n") - (data (i32.const 136) "\02\00\00\00,") - (data (i32.const 152) "g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s") - (data (i32.const 200) "\02\00\00\00\14") - (data (i32.const 216) "g\00c\00.\00r\00e\00l\00e\00a\00s\00e") + (data (i32.const 8) "\02\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\02\00\00\00\16") + (data (i32.const 80) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 104) "\02\00\00\00\12") + (data (i32.const 120) "g\00c\00.\00r\00e\00t\00a\00i\00n") + (data (i32.const 144) "\02\00\00\00,") + (data (i32.const 160) "g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s") + (data (i32.const 208) "\02\00\00\00\14") + (data (i32.const 224) "g\00c\00.\00r\00e\00l\00e\00a\00s\00e") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/rc/_dummy/register_count (mut i32) (i32.const 0)) @@ -35,7 +35,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/rc/global-assign/main)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -98,7 +98,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/util/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 call $~lib/allocator/arena/__mem_allocate @@ -119,7 +119,7 @@ i32.add ) (func $gc/rc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 72 + i32.const 80 i32.const 1 local.get $0 f64.convert_i32_u @@ -135,16 +135,16 @@ local.get $0 global.set $gc/rc/_dummy/register_ref ) - (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 236 + i32.const 244 i32.le_u if i32.const 0 i32.const 24 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -158,8 +158,8 @@ if i32.const 0 i32.const 24 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -171,7 +171,7 @@ local.get $0 ) (func $gc/rc/_dummy/__ref_retain (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 112 + i32.const 120 i32.const 1 local.get $0 f64.convert_i32_u @@ -188,7 +188,7 @@ global.set $gc/rc/_dummy/retain_ref ) (func $gc/rc/_dummy/__ref_release (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 216 + i32.const 224 i32.const 1 local.get $0 f64.convert_i32_u @@ -207,12 +207,12 @@ (func $start:gc/rc/global-assign (; 8 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - i32.const 240 + i32.const 248 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/runtime/runtime.allocate - call $~lib/runtime/runtime.register + call $~lib/util/runtime/allocate + call $~lib/util/runtime/register local.tee $0 call $gc/rc/_dummy/__ref_retain local.get $0 @@ -224,7 +224,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 11 i32.const 0 call $~lib/env/abort @@ -235,7 +235,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 12 i32.const 0 call $~lib/env/abort @@ -246,7 +246,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 13 i32.const 0 call $~lib/env/abort @@ -255,14 +255,14 @@ global.get $gc/rc/_dummy/release_count if i32.const 0 - i32.const 152 + i32.const 160 i32.const 14 i32.const 0 call $~lib/env/abort unreachable end - call $~lib/runtime/runtime.allocate - call $~lib/runtime/runtime.register + call $~lib/util/runtime/allocate + call $~lib/util/runtime/register local.set $0 local.get $0 global.get $gc/rc/global-assign/global @@ -284,7 +284,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 19 i32.const 0 call $~lib/env/abort @@ -295,7 +295,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 20 i32.const 0 call $~lib/env/abort @@ -306,7 +306,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 21 i32.const 0 call $~lib/env/abort @@ -317,7 +317,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 22 i32.const 0 call $~lib/env/abort @@ -328,7 +328,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 23 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/gc/rc/global-assign.untouched.wat b/tests/compiler/gc/rc/global-assign.untouched.wat index 77583c5ef8..c6256f40a8 100644 --- a/tests/compiler/gc/rc/global-assign.untouched.wat +++ b/tests/compiler/gc/rc/global-assign.untouched.wat @@ -8,11 +8,11 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 56) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") - (data (i32.const 96) "\02\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00t\00a\00i\00n\00") - (data (i32.const 136) "\02\00\00\00,\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s\00") - (data (i32.const 200) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00l\00e\00a\00s\00e\00") + (data (i32.const 8) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 104) "\02\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00t\00a\00i\00n\00") + (data (i32.const 144) "\02\00\00\00,\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s\00") + (data (i32.const 208) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00l\00e\00a\00s\00e\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/rc/_dummy/collect_count (mut i32) (i32.const 0)) @@ -30,12 +30,12 @@ (global $gc/rc/global-assign/global (mut i32) (i32.const 0)) (global $gc/rc/global-assign/globalRef (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 236)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 244)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/rc/global-assign/main)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 @@ -132,7 +132,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -155,7 +155,7 @@ i32.add ) (func $gc/rc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 72 + i32.const 80 i32.const 1 local.get $0 f64.convert_i32_u @@ -171,7 +171,7 @@ local.get $0 global.set $gc/rc/_dummy/register_ref ) - (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -180,8 +180,8 @@ if i32.const 0 i32.const 24 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -197,8 +197,8 @@ if i32.const 0 i32.const 24 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -214,15 +214,15 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 ) (func $gc/rc/_dummy/__ref_retain (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 112 + i32.const 120 i32.const 1 local.get $0 f64.convert_i32_u @@ -239,7 +239,7 @@ global.set $gc/rc/_dummy/retain_ref ) (func $gc/rc/_dummy/__ref_release (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 216 + i32.const 224 i32.const 1 local.get $0 f64.convert_i32_u @@ -285,7 +285,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 11 i32.const 0 call $~lib/env/abort @@ -297,7 +297,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 12 i32.const 0 call $~lib/env/abort @@ -309,7 +309,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 13 i32.const 0 call $~lib/env/abort @@ -321,7 +321,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 14 i32.const 0 call $~lib/env/abort @@ -352,7 +352,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 19 i32.const 0 call $~lib/env/abort @@ -364,7 +364,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 20 i32.const 0 call $~lib/env/abort @@ -376,7 +376,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 21 i32.const 0 call $~lib/env/abort @@ -388,7 +388,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 22 i32.const 0 call $~lib/env/abort @@ -400,7 +400,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 23 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/gc/rc/global-init.optimized.wat b/tests/compiler/gc/rc/global-init.optimized.wat index e1d5cc9b67..0eb4ffcc95 100644 --- a/tests/compiler/gc/rc/global-init.optimized.wat +++ b/tests/compiler/gc/rc/global-init.optimized.wat @@ -8,14 +8,14 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e") - (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 56) "\02\00\00\00\16") - (data (i32.const 72) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") - (data (i32.const 96) "\02\00\00\00\12") - (data (i32.const 112) "g\00c\00.\00r\00e\00t\00a\00i\00n") - (data (i32.const 136) "\02\00\00\00(") - (data (i32.const 152) "g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s") + (data (i32.const 8) "\02\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\02\00\00\00\16") + (data (i32.const 80) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 104) "\02\00\00\00\12") + (data (i32.const 120) "g\00c\00.\00r\00e\00t\00a\00i\00n") + (data (i32.const 144) "\02\00\00\00(") + (data (i32.const 160) "g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/rc/_dummy/register_count (mut i32) (i32.const 0)) @@ -31,7 +31,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/rc/global-init/main)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -94,7 +94,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/util/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 call $~lib/allocator/arena/__mem_allocate @@ -115,7 +115,7 @@ i32.add ) (func $gc/rc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 72 + i32.const 80 i32.const 1 local.get $0 f64.convert_i32_u @@ -131,16 +131,16 @@ local.get $0 global.set $gc/rc/_dummy/register_ref ) - (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 192 + i32.const 200 i32.le_u if i32.const 0 i32.const 24 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -154,8 +154,8 @@ if i32.const 0 i32.const 24 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -167,7 +167,7 @@ local.get $0 ) (func $gc/rc/_dummy/__ref_retain (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 112 + i32.const 120 i32.const 1 local.get $0 f64.convert_i32_u @@ -185,12 +185,12 @@ ) (func $start:gc/rc/global-init (; 7 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 192 + i32.const 200 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/runtime/runtime.allocate - call $~lib/runtime/runtime.register + call $~lib/util/runtime/allocate + call $~lib/util/runtime/register local.tee $0 call $gc/rc/_dummy/__ref_retain local.get $0 @@ -200,7 +200,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 10 i32.const 0 call $~lib/env/abort @@ -211,7 +211,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 11 i32.const 0 call $~lib/env/abort @@ -222,7 +222,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 12 i32.const 0 call $~lib/env/abort @@ -231,7 +231,7 @@ global.get $gc/rc/_dummy/release_count if i32.const 0 - i32.const 152 + i32.const 160 i32.const 13 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/gc/rc/global-init.untouched.wat b/tests/compiler/gc/rc/global-init.untouched.wat index f81bb65e46..e39ae50e84 100644 --- a/tests/compiler/gc/rc/global-init.untouched.wat +++ b/tests/compiler/gc/rc/global-init.untouched.wat @@ -8,10 +8,10 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 56) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") - (data (i32.const 96) "\02\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00t\00a\00i\00n\00") - (data (i32.const 136) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s\00") + (data (i32.const 8) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 104) "\02\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00t\00a\00i\00n\00") + (data (i32.const 144) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/rc/_dummy/collect_count (mut i32) (i32.const 0)) @@ -28,12 +28,12 @@ (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $gc/rc/global-init/global (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 192)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 200)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $gc/rc/global-init/main)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 @@ -130,7 +130,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -153,7 +153,7 @@ i32.add ) (func $gc/rc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 72 + i32.const 80 i32.const 1 local.get $0 f64.convert_i32_u @@ -169,7 +169,7 @@ local.get $0 global.set $gc/rc/_dummy/register_ref ) - (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -178,8 +178,8 @@ if i32.const 0 i32.const 24 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -195,8 +195,8 @@ if i32.const 0 i32.const 24 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -212,15 +212,15 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 ) (func $gc/rc/_dummy/__ref_retain (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 112 + i32.const 120 i32.const 1 local.get $0 f64.convert_i32_u @@ -263,7 +263,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 10 i32.const 0 call $~lib/env/abort @@ -275,7 +275,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 11 i32.const 0 call $~lib/env/abort @@ -287,7 +287,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 12 i32.const 0 call $~lib/env/abort @@ -299,7 +299,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 13 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index addde4ded0..480d871d50 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -5,7 +5,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 2 funcref) (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -77,16 +77,16 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.register (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/register (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 48 + i32.const 56 i32.le_u if i32.const 0 i32.const 16 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -100,8 +100,8 @@ if i32.const 0 i32.const 16 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -126,7 +126,7 @@ local.get $0 i32.const 8 i32.add - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register drop i32.const 0 global.set $~lib/argc @@ -134,7 +134,7 @@ call_indirect (type $FUNCSIG$i) ) (func $start (; 5 ;) (type $FUNCSIG$v) - i32.const 48 + i32.const 56 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index 016b0dda36..08c98f90a5 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -6,7 +6,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\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 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 2 funcref) (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|0) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) @@ -15,7 +15,7 @@ (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $getter-call/test)) @@ -116,7 +116,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -132,7 +132,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -141,8 +141,8 @@ if i32.const 0 i32.const 16 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -158,8 +158,8 @@ if i32.const 0 i32.const 16 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -173,9 +173,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index 428f93cf95..a3381170bf 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -7,7 +7,7 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\16\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s") - (data (i32.const 40) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 40) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 2 funcref) (elem (i32.const 0) $null $inlining/func_fe~anonymous|0) (global $~lib/argc (mut i32) (i32.const 0)) @@ -102,7 +102,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -123,16 +123,16 @@ i32.const 8 i32.add ) - (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 80 + i32.const 88 i32.le_u if i32.const 0 i32.const 48 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -146,8 +146,8 @@ if i32.const 0 i32.const 48 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -159,16 +159,16 @@ (func $inlining/test_ctor (; 7 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.eqz if i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -240,7 +240,7 @@ ) (func $start (; 8 ;) (type $FUNCSIG$v) call $inlining/test_funcs - i32.const 80 + i32.const 88 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index cd470d1c37..eefe1e82f9 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -7,7 +7,7 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\16\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 40) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 40) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 2 funcref) (elem (i32.const 0) $null $inlining/func_fe~anonymous|0) (global $inlining/constantGlobal i32 (i32.const 1)) @@ -17,7 +17,7 @@ (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 80)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 88)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $inlining/test)) @@ -380,7 +380,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -396,7 +396,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/runtime.register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -405,8 +405,8 @@ if i32.const 0 i32.const 48 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -422,8 +422,8 @@ if i32.const 0 i32.const 48 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -449,9 +449,9 @@ local.get $1 else i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end local.set $3 i32.const 2 @@ -461,9 +461,9 @@ i32.eqz if i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $3 end local.get $3 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 6b8a9e9223..de76f515b4 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -12,28 +12,28 @@ (data (i32.const 8) "\01\00\00\00\02\00\00\000") (data (i32.const 24) "\02\00\00\00\90\01\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") (data (i32.const 432) "\03\00\00\00\10\00\00\00 \00\00\00 \00\00\00\90\01\00\00d") - (data (i32.const 456) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 496) "\01\00\00\00\02\00\00\001") - (data (i32.const 512) "\01\00\00\00\12\00\00\00n\00u\00m\00b\00e\00r\00.\00t\00s") - (data (i32.const 544) "\01\00\00\00\06\00\00\000\00.\000") - (data (i32.const 560) "\01\00\00\00\06\00\00\00N\00a\00N") - (data (i32.const 576) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 608) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 632) "\02\00\00\00\b8\02\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8 (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -682,7 +682,7 @@ local.set $14 local.get $6 local.set $15 - i32.const 1624 + i32.const 1632 i32.load offset=4 local.set $16 block $break|0 @@ -1908,11 +1908,11 @@ i32.shl i32.sub global.set $~lib/util/number/_K - i32.const 1344 + i32.const 1352 local.get $13 call $~lib/array/Array#__unchecked_get global.set $~lib/util/number/_frc_pow - i32.const 1552 + i32.const 1560 local.get $13 call $~lib/array/Array#__unchecked_get global.set $~lib/util/number/_exp_pow @@ -2192,8 +2192,8 @@ i32.eqz if i32.const 0 - i32.const 1648 - i32.const 197 + i32.const 1656 + i32.const 203 i32.const 4 call $~lib/env/abort unreachable @@ -2262,7 +2262,7 @@ local.get $3 i32.eqz if - i32.const 1688 + i32.const 1696 return end local.get $8 @@ -2283,7 +2283,7 @@ return end local.get $3 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $10 local.get $10 local.get $0 @@ -2293,7 +2293,7 @@ call $~lib/memory/memory.copy local.get $10 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/allocator/arena/__mem_free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) nop @@ -2302,7 +2302,7 @@ local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/runtime.discard (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/util/runtime/discard (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -2311,8 +2311,8 @@ if i32.const 0 i32.const 464 - i32.const 68 - i32.const 6 + i32.const 114 + i32.const 4 call $~lib/env/abort unreachable end @@ -2328,8 +2328,8 @@ if i32.const 0 i32.const 464 - i32.const 70 - i32.const 6 + i32.const 116 + i32.const 4 call $~lib/env/abort unreachable end @@ -2344,7 +2344,7 @@ f64.const 0 f64.eq if - i32.const 552 + i32.const 560 return end local.get $0 @@ -2354,11 +2354,11 @@ local.get $0 call $~lib/builtins/isNaN if - i32.const 568 + i32.const 576 return end - i32.const 584 - i32.const 616 + i32.const 592 + i32.const 624 local.get $0 f64.const 0 f64.lt @@ -2368,7 +2368,7 @@ i32.const 28 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 local.get $1 local.get $0 @@ -2380,7 +2380,7 @@ call $~lib/string/String#substring local.set $3 local.get $1 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $3 ) (func $~lib/number/F64#toString (; 27 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) @@ -2392,9 +2392,9 @@ i32.const 0 i32.ne if (result i32) - i32.const 1776 + i32.const 1784 else - i32.const 1792 + i32.const 1800 end ) (func $~lib/builtins/isNaN (; 29 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) @@ -2483,12 +2483,12 @@ global.set $~lib/allocator/arena/offset global.get $number/a call $~lib/number/I32#toString - i32.const 504 + i32.const 512 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 5 i32.const 0 call $~lib/env/abort @@ -2496,12 +2496,12 @@ end f64.const 2 call $~lib/number/F64#toString - i32.const 1696 + i32.const 1704 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 7 i32.const 0 call $~lib/env/abort @@ -2509,12 +2509,12 @@ end i32.const 3 call $~lib/number/I32#toString - i32.const 1712 + i32.const 1720 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 8 i32.const 0 call $~lib/env/abort @@ -2522,12 +2522,12 @@ end i32.const -5 call $~lib/number/I32#toString - i32.const 1728 + i32.const 1736 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 10 i32.const 0 call $~lib/env/abort @@ -2535,12 +2535,12 @@ end i32.const 4 call $~lib/number/I32#toString - i32.const 1744 + i32.const 1752 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 11 i32.const 0 call $~lib/env/abort @@ -2555,12 +2555,12 @@ local.get $0 end call $~lib/number/I32#toString - i32.const 1760 + i32.const 1768 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 12 i32.const 0 call $~lib/env/abort @@ -2575,12 +2575,12 @@ local.get $0 end call $~lib/number/I32#toString - i32.const 504 + i32.const 512 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 13 i32.const 0 call $~lib/env/abort @@ -2589,12 +2589,12 @@ i32.const 0 i32.eqz call $~lib/number/Bool#toString - i32.const 1776 + i32.const 1784 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 14 i32.const 0 call $~lib/env/abort @@ -2603,12 +2603,12 @@ i32.const 1 i32.eqz call $~lib/number/Bool#toString - i32.const 1792 + i32.const 1800 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 15 i32.const 0 call $~lib/env/abort @@ -2623,12 +2623,12 @@ local.get $0 end call $~lib/number/I32#toString - i32.const 504 + i32.const 512 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 18 i32.const 0 call $~lib/env/abort @@ -2643,12 +2643,12 @@ local.get $0 end call $~lib/number/I32#toString - i32.const 1760 + i32.const 1768 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 19 i32.const 0 call $~lib/env/abort @@ -2659,7 +2659,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 23 i32.const 0 call $~lib/env/abort @@ -2674,7 +2674,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 25 i32.const 0 call $~lib/env/abort @@ -2687,7 +2687,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 26 i32.const 0 call $~lib/env/abort @@ -2700,7 +2700,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 27 i32.const 0 call $~lib/env/abort @@ -2713,7 +2713,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 28 i32.const 0 call $~lib/env/abort @@ -2726,7 +2726,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 29 i32.const 0 call $~lib/env/abort @@ -2739,7 +2739,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 30 i32.const 0 call $~lib/env/abort @@ -2752,7 +2752,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 31 i32.const 0 call $~lib/env/abort @@ -2767,7 +2767,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 32 i32.const 0 call $~lib/env/abort @@ -2780,7 +2780,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 33 i32.const 0 call $~lib/env/abort @@ -2793,7 +2793,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 34 i32.const 0 call $~lib/env/abort @@ -2806,7 +2806,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 35 i32.const 0 call $~lib/env/abort @@ -2819,7 +2819,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 36 i32.const 0 call $~lib/env/abort @@ -2832,7 +2832,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 37 i32.const 0 call $~lib/env/abort @@ -2845,7 +2845,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 38 i32.const 0 call $~lib/env/abort @@ -2858,7 +2858,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 39 i32.const 0 call $~lib/env/abort @@ -2871,7 +2871,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 40 i32.const 0 call $~lib/env/abort @@ -2884,7 +2884,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 41 i32.const 0 call $~lib/env/abort @@ -2897,7 +2897,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 42 i32.const 0 call $~lib/env/abort @@ -2910,7 +2910,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 43 i32.const 0 call $~lib/env/abort @@ -2923,7 +2923,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 44 i32.const 0 call $~lib/env/abort @@ -2934,7 +2934,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 46 i32.const 0 call $~lib/env/abort @@ -2949,7 +2949,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 48 i32.const 0 call $~lib/env/abort @@ -2962,7 +2962,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 49 i32.const 0 call $~lib/env/abort @@ -2975,7 +2975,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 50 i32.const 0 call $~lib/env/abort @@ -2988,7 +2988,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 51 i32.const 0 call $~lib/env/abort @@ -3001,7 +3001,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 52 i32.const 0 call $~lib/env/abort @@ -3014,7 +3014,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 53 i32.const 0 call $~lib/env/abort @@ -3027,7 +3027,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 54 i32.const 0 call $~lib/env/abort @@ -3042,7 +3042,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 55 i32.const 0 call $~lib/env/abort @@ -3055,7 +3055,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 56 i32.const 0 call $~lib/env/abort @@ -3068,7 +3068,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 57 i32.const 0 call $~lib/env/abort @@ -3081,7 +3081,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 58 i32.const 0 call $~lib/env/abort @@ -3094,7 +3094,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 59 i32.const 0 call $~lib/env/abort @@ -3107,7 +3107,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 60 i32.const 0 call $~lib/env/abort @@ -3120,7 +3120,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 61 i32.const 0 call $~lib/env/abort @@ -3133,7 +3133,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 62 i32.const 0 call $~lib/env/abort @@ -3146,7 +3146,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 63 i32.const 0 call $~lib/env/abort @@ -3159,7 +3159,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 64 i32.const 0 call $~lib/env/abort @@ -3172,7 +3172,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 65 i32.const 0 call $~lib/env/abort @@ -3185,7 +3185,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 66 i32.const 0 call $~lib/env/abort @@ -3198,7 +3198,7 @@ i32.eqz if i32.const 0 - i32.const 520 + i32.const 528 i32.const 67 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index a7d5741864..472176422b 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -6,7 +6,7 @@ (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -78,7 +78,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 call $~lib/allocator/arena/__mem_allocate @@ -92,16 +92,16 @@ i32.const 8 i32.add ) - (func $~lib/runtime/runtime.register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 48 + i32.const 56 i32.le_u if i32.const 0 i32.const 16 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -115,8 +115,8 @@ if i32.const 0 i32.const 16 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -126,17 +126,17 @@ local.get $0 ) (func $start (; 4 ;) (type $FUNCSIG$v) - i32.const 48 + i32.const 56 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register global.set $optional-typeparameters/tConcrete - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register global.set $optional-typeparameters/tDerived ) (func $null (; 5 ;) (type $FUNCSIG$v) diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index 3fcf3614f2..c2029bf244 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -7,7 +7,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\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 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) @@ -17,7 +17,7 @@ (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $optional-typeparameters/tConcrete (mut i32) (i32.const 0)) (global $optional-typeparameters/tDerived (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -123,7 +123,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -139,7 +139,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -148,8 +148,8 @@ if i32.const 0 i32.const 16 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -165,8 +165,8 @@ if i32.const 0 i32.const 16 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -180,9 +180,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -197,9 +197,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/runtime-default.optimized.wat b/tests/compiler/runtime-default.optimized.wat index 845cbc1e74..5c19014713 100644 --- a/tests/compiler/runtime-default.optimized.wat +++ b/tests/compiler/runtime-default.optimized.wat @@ -12,8 +12,8 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00,") (data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 72) "\01\00\00\00\1e") - (data (i32.const 88) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 72) "\01\00\00\00(") + (data (i32.const 88) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) @@ -27,18 +27,17 @@ (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) - (export "runtime.discard" (func $~lib/runtime/runtime.discard)) - (export "runtime.register" (func $~lib/runtime/runtime.register)) - (export "runtime.newString" (func $~lib/runtime/runtime.newString)) - (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export ".setargc" (func $~lib/setargc)) - (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "runtime.retain" (func $~lib/runtime/runtime.retain)) - (export "runtime.release" (func $~lib/runtime/runtime.release)) - (export "runtime.collect" (func $~lib/runtime/runtime.collect)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.setArgc" (func $~lib/setargc)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -53,7 +52,19 @@ i32.const 0 end ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/runtime/runtime.flags (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + block $__inlined_func$~lib/runtime/__runtime_flags + block $invalid + local.get $0 + i32.const 1 + i32.sub + br_table $__inlined_func$~lib/runtime/__runtime_flags $__inlined_func$~lib/runtime/__runtime_flags $__inlined_func$~lib/runtime/__runtime_flags $invalid + end + unreachable + end + i32.const 0 + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.const 22 i32.ge_u @@ -73,7 +84,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 4 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 22 i32.ge_u @@ -108,7 +119,7 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Block#get:right (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const -4 @@ -142,7 +153,7 @@ end local.get $0 ) - (func $~lib/allocator/tlsf/fls (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -158,7 +169,7 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -192,7 +203,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -211,7 +222,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -340,7 +351,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const 2 @@ -370,7 +381,7 @@ end local.get $0 ) - (func $~lib/allocator/tlsf/Root#setJump (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 i32.load i32.const 1 @@ -415,7 +426,7 @@ local.get $0 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -645,7 +656,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -768,7 +779,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#insert ) - (func $~lib/allocator/tlsf/ffs (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -782,7 +793,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -894,7 +905,7 @@ end end ) - (func $~lib/allocator/tlsf/Root#use (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1005,7 +1016,7 @@ i32.const 8 i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1031,14 +1042,14 @@ if unreachable end - i32.const 120 + i32.const 128 local.set $2 - i32.const 120 + i32.const 128 global.set $~lib/allocator/tlsf/ROOT i32.const 2912 i32.const 0 i32.store - i32.const 120 + i32.const 128 i32.const 0 i32.store i32.const 0 @@ -1048,7 +1059,7 @@ i32.const 22 i32.lt_u if - i32.const 120 + i32.const 128 local.get $1 i32.const 0 call $~lib/allocator/tlsf/Root#setSLMap @@ -1059,7 +1070,7 @@ i32.const 32 i32.lt_u if - i32.const 120 + i32.const 128 local.get $1 local.get $3 i32.const 0 @@ -1078,8 +1089,8 @@ br $repeat|0 end end - i32.const 120 - i32.const 3040 + i32.const 128 + i32.const 3048 current_memory i32.const 16 i32.shl @@ -1175,7 +1186,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/runtime.allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -1202,75 +1213,7 @@ i32.const 16 i32.add ) - (func $~lib/allocator/tlsf/__mem_free (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.tee $1 - if - local.get $0 - i32.const 8 - i32.sub - local.tee $2 - i32.load - local.tee $3 - i32.const 1 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - i32.const 1 - i32.or - i32.store - local.get $1 - local.get $0 - i32.const 8 - i32.sub - call $~lib/allocator/tlsf/Root#insert - end - end - ) - (func $~lib/runtime/runtime.discard (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.const 120 - i32.le_u - if - i32.const 0 - i32.const 88 - i32.const 68 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load - i32.const -1520547049 - i32.ne - if - i32.const 0 - i32.const 88 - i32.const 70 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - call $~lib/allocator/tlsf/__mem_free - ) - (func $~lib/collector/itcm/maybeInit (; 20 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/maybeInit (; 19 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/collector/itcm/state i32.eqz @@ -1313,7 +1256,7 @@ global.set $~lib/collector/itcm/state end ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -1341,7 +1284,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/collector/itcm/__ref_register (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_register (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) call $~lib/collector/itcm/maybeInit local.get $0 i32.const 16 @@ -1358,16 +1301,16 @@ local.get $0 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/runtime.register (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 120 + i32.const 128 i32.le_u if i32.const 0 i32.const 88 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -1381,8 +1324,8 @@ if i32.const 0 i32.const 88 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -1395,19 +1338,23 @@ end local.get $0 ) + (func $~lib/runtime/runtime.newObject (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) (func $~lib/runtime/runtime.newString (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) (func $~lib/runtime/runtime.newArrayBuffer (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) (func $~lib/collector/itcm/ManagedObject#makeGray (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) @@ -1656,18 +1603,18 @@ (local $5 i32) (local $6 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.get $2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $2 local.set $6 local.get $0 local.get $1 i32.shl local.tee $4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $5 local.tee $1 local.get $2 @@ -1707,7 +1654,45 @@ (func $~lib/runtime/runtime.release (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/collector/itcm/step (; 32 ;) (type $FUNCSIG$v) + (func $~lib/allocator/tlsf/__mem_free (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.tee $1 + if + local.get $0 + i32.const 8 + i32.sub + local.tee $2 + i32.load + local.tee $3 + i32.const 1 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + i32.const 1 + i32.or + i32.store + local.get $1 + local.get $0 + i32.const 8 + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/collector/itcm/step (; 33 ;) (type $FUNCSIG$v) (local $0 i32) block $break|0 block $case3|0 @@ -1797,7 +1782,7 @@ i32.and global.set $~lib/collector/itcm/iter local.get $0 - i32.const 120 + i32.const 128 i32.ge_u if local.get $0 @@ -1816,7 +1801,7 @@ end end ) - (func $~lib/collector/itcm/__ref_collect (; 33 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/__ref_collect (; 34 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/maybeInit loop $continue|0 global.get $~lib/collector/itcm/state @@ -1835,17 +1820,17 @@ br_if $continue|1 end ) - (func $~lib/runtime/runtime.collect (; 34 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.collect (; 35 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/__ref_collect ) - (func $start (; 35 ;) (type $FUNCSIG$v) + (func $start (; 36 ;) (type $FUNCSIG$v) i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register global.set $~lib/runtime/ROOT ) - (func $~lib/runtime/__gc_mark_roots (; 36 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__gc_mark_roots (; 37 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/runtime/ROOT local.tee $0 @@ -1866,7 +1851,7 @@ end end ) - (func $~lib/runtime/__runtime_instanceof (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/__runtime_instanceof (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $nope block $~lib/runtime/Root block $~lib/arraybuffer/ArrayBuffer @@ -1893,10 +1878,10 @@ end i32.const 0 ) - (func $null (; 38 ;) (type $FUNCSIG$v) + (func $null (; 39 ;) (type $FUNCSIG$v) nop ) - (func $~lib/runtime/runtime.newArray|trampoline (; 39 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray|trampoline (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -1916,7 +1901,7 @@ local.get $3 call $~lib/runtime/runtime.newArray ) - (func $~lib/setargc (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) diff --git a/tests/compiler/runtime-default.untouched.wat b/tests/compiler/runtime-default.untouched.wat index ae057c9ded..c54dc003b4 100644 --- a/tests/compiler/runtime-default.untouched.wat +++ b/tests/compiler/runtime-default.untouched.wat @@ -11,7 +11,7 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") - (data (i32.const 72) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 72) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -40,23 +40,22 @@ (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 120)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 128)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "runtime.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "runtime.allocate" (func $~lib/runtime/runtime.allocate)) - (export "runtime.discard" (func $~lib/runtime/runtime.discard)) - (export "runtime.register" (func $~lib/runtime/runtime.register)) - (export "runtime.newString" (func $~lib/runtime/runtime.newString)) - (export "runtime.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export ".setargc" (func $~lib/setargc)) - (export "runtime.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "runtime.retain" (func $~lib/runtime/runtime.retain)) - (export "runtime.release" (func $~lib/runtime/runtime.release)) - (export "runtime.collect" (func $~lib/runtime/runtime.collect)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.setArgc" (func $~lib/setargc)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -71,7 +70,11 @@ i32.const 0 end ) - (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.flags (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/__runtime_flags + ) + (func $~lib/util/runtime/adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -83,12 +86,12 @@ i32.sub i32.shl ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 0 local.get $1 i32.store offset=2912 ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -109,7 +112,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 5 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 6 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -146,11 +149,11 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Root#get:tailRef (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.load offset=2912 ) - (func $~lib/allocator/tlsf/Block#get:right (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -190,7 +193,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/fls (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -208,7 +211,7 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -244,7 +247,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -264,7 +267,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -409,7 +412,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -441,7 +444,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/Root#setJump (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.load global.get $~lib/allocator/tlsf/FREE @@ -487,7 +490,7 @@ local.get $1 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -753,7 +756,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -906,7 +909,7 @@ call $~lib/allocator/tlsf/Root#insert i32.const 1 ) - (func $~lib/allocator/tlsf/ffs (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -922,7 +925,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/ffs (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -938,7 +941,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1079,7 +1082,7 @@ end local.get $6 ) - (func $~lib/allocator/tlsf/Root#use (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1207,7 +1210,7 @@ global.get $~lib/allocator/tlsf/Block.INFO i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1443,12 +1446,12 @@ local.get $0 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/memory/memory.allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -1470,88 +1473,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/allocator/tlsf/__mem_free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.set $1 - local.get $1 - if - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.set $2 - local.get $2 - i32.load - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.or - i32.store - local.get $1 - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - call $~lib/allocator/tlsf/Root#insert - end - end - ) - (func $~lib/memory/memory.free (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - call $~lib/allocator/tlsf/__mem_free - ) - (func $~lib/runtime/runtime.discard (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 88 - i32.const 68 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - local.set $1 - local.get $1 - i32.load - global.get $~lib/util/runtime/HEADER_MAGIC - i32.eq - i32.eqz - if - i32.const 0 - i32.const 88 - i32.const 70 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $1 - call $~lib/memory/memory.free - ) - (func $~lib/collector/itcm/ManagedObjectList#clear (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.store offset=8 @@ -1559,7 +1481,7 @@ local.get $0 i32.store offset=12 ) - (func $~lib/collector/itcm/maybeInit (; 27 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/maybeInit (; 25 ;) (type $FUNCSIG$v) global.get $~lib/collector/itcm/state i32.const 0 i32.eq @@ -1592,7 +1514,7 @@ global.set $~lib/collector/itcm/state end ) - (func $~lib/collector/itcm/ManagedObject#set:color (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#set:color (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $0 i32.load offset=8 @@ -1604,7 +1526,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#set:next (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 local.get $0 @@ -1614,7 +1536,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -1632,7 +1554,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/collector/itcm/__ref_register (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_register (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) call $~lib/collector/itcm/maybeInit @@ -1651,7 +1573,7 @@ local.get $2 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/runtime/runtime.register (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -1660,8 +1582,8 @@ if i32.const 0 i32.const 88 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -1677,8 +1599,8 @@ if i32.const 0 i32.const 88 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -1689,27 +1611,31 @@ call $~lib/collector/itcm/__ref_register local.get $0 ) - (func $~lib/runtime/runtime.newString (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.newObject (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) - (func $~lib/runtime/runtime.newArrayBuffer (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.newArrayBuffer (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/runtime/runtime.allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/runtime/runtime.newObject ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/ManagedObject#get:color (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 i32.and ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/ManagedObject#get:next (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 @@ -1717,7 +1643,7 @@ i32.xor i32.and ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#unlink (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1733,7 +1659,7 @@ local.get $1 call $~lib/collector/itcm/ManagedObject#set:next ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/collector/itcm/iter i32.eq @@ -1758,7 +1684,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/__ref_link (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/__ref_link (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) call $~lib/collector/itcm/maybeInit @@ -1795,7 +1721,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/memory/memory.copy (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2004,7 +1930,7 @@ end end ) - (func $~lib/runtime/runtime.newArray (; 41 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2012,18 +1938,18 @@ (local $8 i32) (local $9 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.get $2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $4 local.get $0 local.get $1 i32.shl local.set $5 local.get $5 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $6 local.get $4 local.tee $7 @@ -2061,27 +1987,74 @@ end local.get $4 ) - (func $~lib/runtime/Root#constructor (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/Root#constructor (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 ) - (func $~lib/runtime/runtime.retain (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.retain (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/runtime/ROOT call $~lib/collector/itcm/__ref_link ) - (func $~lib/runtime/runtime.release (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.release (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/collector/itcm/step (; 45 ;) (type $FUNCSIG$v) + (func $~lib/allocator/tlsf/__mem_free (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + if + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $2 + local.get $2 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/memory/memory.free (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/collector/itcm/step (; 46 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) block $break|0 @@ -2203,7 +2176,7 @@ unreachable end ) - (func $~lib/collector/itcm/__ref_collect (; 46 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/__ref_collect (; 47 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/maybeInit block $break|0 loop $continue|0 @@ -2226,18 +2199,18 @@ end end ) - (func $~lib/runtime/runtime.collect (; 47 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.collect (; 48 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/__ref_collect ) - (func $~lib/runtime/runtime#constructor (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime#constructor (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) unreachable ) - (func $start (; 49 ;) (type $FUNCSIG$v) + (func $start (; 50 ;) (type $FUNCSIG$v) i32.const 0 call $~lib/runtime/Root#constructor global.set $~lib/runtime/ROOT ) - (func $~lib/collector/itcm/__ref_mark (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_mark (; 51 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) call $~lib/collector/itcm/maybeInit @@ -2258,7 +2231,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/runtime/__gc_mark_roots (; 51 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__gc_mark_roots (; 52 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/runtime/ROOT local.tee $0 @@ -2267,7 +2240,7 @@ call $~lib/collector/itcm/__ref_mark end ) - (func $~lib/runtime/__gc_mark_members (; 52 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/runtime/__gc_mark_members (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $invalid block $~lib/runtime/Root @@ -2284,7 +2257,7 @@ end unreachable ) - (func $~lib/runtime/__runtime_instanceof (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/__runtime_instanceof (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $nope block $~lib/runtime/Root block $~lib/arraybuffer/ArrayBuffer @@ -2310,9 +2283,28 @@ i32.const 0 return ) - (func $null (; 54 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__runtime_flags (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + block $invalid + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/string/String + local.get $0 + br_table $invalid $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid + end + i32.const 0 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + unreachable + ) + (func $null (; 56 ;) (type $FUNCSIG$v) ) - (func $~lib/runtime/runtime.newArray|trampoline (; 55 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray|trampoline (; 57 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2332,7 +2324,7 @@ local.get $3 call $~lib/runtime/runtime.newArray ) - (func $~lib/setargc (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 58 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) diff --git a/tests/compiler/runtime/flags.json b/tests/compiler/runtime/flags.json new file mode 100644 index 0000000000..8152a147f7 --- /dev/null +++ b/tests/compiler/runtime/flags.json @@ -0,0 +1,5 @@ +{ + "features": [ + "simd" + ] +} \ No newline at end of file diff --git a/tests/compiler/runtime/flags.optimized.wat b/tests/compiler/runtime/flags.optimized.wat new file mode 100644 index 0000000000..f8f0697517 --- /dev/null +++ b/tests/compiler/runtime/flags.optimized.wat @@ -0,0 +1,2870 @@ +(module + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\02\00\00\00 ") + (data (i32.const 24) "r\00u\00n\00t\00i\00m\00e\00/\00f\00l\00a\00g\00s\00.\00t\00s") + (data (i32.const 56) "\02\00\00\00,") + (data (i32.const 72) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 120) "\02\00\00\00(") + (data (i32.const 136) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) + (global $~lib/capabilities i32 (i32.const 2)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.setArgc" (func $~lib/setargc)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (export "$.capabilities" (global $~lib/capabilities)) + (start $start) + (func $start:runtime/flags (; 1 ;) (type $FUNCSIG$v) + block $folding-inner0 + i32.const 1 + call $~lib/runtime/__runtime_flags + i32.const 9 + i32.ne + if + br $folding-inner0 + end + i32.const 3 + call $~lib/runtime/__runtime_flags + i32.const 17 + i32.ne + if + br $folding-inner0 + end + i32.const 4 + call $~lib/runtime/__runtime_flags + i32.const 33 + i32.ne + if + br $folding-inner0 + end + i32.const 5 + call $~lib/runtime/__runtime_flags + i32.const 65 + i32.ne + if + br $folding-inner0 + end + i32.const 6 + call $~lib/runtime/__runtime_flags + i32.const 129 + i32.ne + if + br $folding-inner0 + end + i32.const 7 + call $~lib/runtime/__runtime_flags + i32.const 545 + i32.ne + if + br $folding-inner0 + end + i32.const 8 + call $~lib/runtime/__runtime_flags + i32.const 801 + i32.ne + if + br $folding-inner0 + end + i32.const 9 + call $~lib/runtime/__runtime_flags + i32.const 10 + i32.ne + if + br $folding-inner0 + end + i32.const 10 + call $~lib/runtime/__runtime_flags + i32.const 18 + i32.ne + if + br $folding-inner0 + end + i32.const 11 + call $~lib/runtime/__runtime_flags + i32.const 34 + i32.ne + if + br $folding-inner0 + end + i32.const 12 + call $~lib/runtime/__runtime_flags + i32.const 66 + i32.ne + if + br $folding-inner0 + end + i32.const 13 + call $~lib/runtime/__runtime_flags + i32.const 130 + i32.ne + if + br $folding-inner0 + end + i32.const 14 + call $~lib/runtime/__runtime_flags + i32.const 546 + i32.ne + if + br $folding-inner0 + end + i32.const 15 + call $~lib/runtime/__runtime_flags + i32.const 802 + i32.ne + if + br $folding-inner0 + end + i32.const 16 + call $~lib/runtime/__runtime_flags + i32.const 16396 + i32.ne + if + br $folding-inner0 + end + i32.const 17 + call $~lib/runtime/__runtime_flags + i32.const 8212 + i32.ne + if + br $folding-inner0 + end + i32.const 18 + call $~lib/runtime/__runtime_flags + i32.const 4132 + i32.ne + if + br $folding-inner0 + end + i32.const 19 + call $~lib/runtime/__runtime_flags + i32.const 2116 + i32.ne + if + br $folding-inner0 + end + i32.const 20 + call $~lib/runtime/__runtime_flags + i32.const 1156 + i32.ne + if + br $folding-inner0 + end + i32.const 21 + call $~lib/runtime/__runtime_flags + i32.const 69644 + i32.ne + if + br $folding-inner0 + end + i32.const 22 + call $~lib/runtime/__runtime_flags + i32.const 102412 + i32.ne + if + br $folding-inner0 + end + i32.const 23 + call $~lib/runtime/__runtime_flags + i32.const 1572 + i32.ne + if + br $folding-inner0 + end + i32.const 24 + call $~lib/runtime/__runtime_flags + i32.const 1828 + i32.ne + if + br $folding-inner0 + end + i32.const 25 + call $~lib/runtime/__runtime_flags + i32.const 103204 + i32.ne + if + br $folding-inner0 + end + return + end + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + ) + (func $~lib/runtime/runtime.instanceof (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.get $1 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + ) + (func $~lib/runtime/runtime.flags (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/__runtime_flags + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 72 + i32.const 159 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/allocator/tlsf/Root#setHead (; 5 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 72 + i32.const 184 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 32 + i32.ge_u + if + i32.const 0 + i32.const 72 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/allocator/tlsf/Block#get:right (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + i32.const -4 + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 104 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 8 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 105 + i32.const 11 + call $~lib/env/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/fls (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 447 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $~lib/allocator/tlsf/Root#getHead (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 72 + i32.const 175 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 32 + i32.ge_u + if + i32.const 0 + i32.const 72 + i32.const 176 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load offset=96 + ) + (func $~lib/allocator/tlsf/Root#getSLMap (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 72 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load offset=4 + ) + (func $~lib/allocator/tlsf/Root#remove (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.tee $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 277 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $3 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 279 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + i32.const 256 + i32.lt_u + if (result i32) + local.get $3 + i32.const 8 + i32.div_u + local.set $4 + i32.const 0 + else + local.get $3 + local.get $3 + call $~lib/allocator/tlsf/fls + local.tee $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $4 + local.get $2 + i32.const 7 + i32.sub + end + local.set $2 + local.get $1 + i32.load offset=8 + local.set $3 + local.get $1 + i32.load offset=4 + local.tee $5 + if + local.get $5 + local.get $3 + i32.store offset=8 + end + local.get $3 + if + local.get $3 + local.get $5 + i32.store offset=4 + end + local.get $0 + local.get $2 + local.get $4 + call $~lib/allocator/tlsf/Root#getHead + local.get $1 + i32.eq + if + local.get $0 + local.get $2 + local.get $4 + local.get $3 + call $~lib/allocator/tlsf/Root#setHead + local.get $3 + i32.eqz + if + local.get $0 + local.get $2 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $4 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $1 + call $~lib/allocator/tlsf/Root#setSLMap + local.get $1 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $2 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/allocator/tlsf/Block#get:left (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 96 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 97 + i32.const 11 + call $~lib/env/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/Root#setJump (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + i32.load + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 353 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/Block#get:right + local.get $1 + i32.ne + if + i32.const 0 + i32.const 72 + i32.const 354 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 355 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 4 + i32.sub + local.get $0 + i32.store + ) + (func $~lib/allocator/tlsf/Root#insert (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 208 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.tee $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 210 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + i32.const -4 + i32.and + local.tee $4 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $4 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 212 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $2 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 216 + i32.const 23 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.load + local.tee $4 + i32.const 1 + i32.and + if + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $4 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $3 + i32.add + local.tee $3 + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $2 + i32.load + local.set $4 + end + local.get $3 + i32.const 2 + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 230 + i32.const 24 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.tee $5 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 232 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $3 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $5 + i32.add + local.tee $3 + i32.store + end + local.get $2 + local.get $4 + i32.const 2 + i32.or + i32.store + local.get $1 + local.get $2 + call $~lib/allocator/tlsf/Root#setJump + local.get $3 + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $3 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 245 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $3 + i32.const 256 + i32.lt_u + if (result i32) + local.get $3 + i32.const 8 + i32.div_u + local.set $3 + i32.const 0 + else + local.get $3 + local.get $3 + call $~lib/allocator/tlsf/fls + local.tee $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $3 + local.get $2 + i32.const 7 + i32.sub + end + local.tee $2 + local.get $3 + call $~lib/allocator/tlsf/Root#getHead + local.set $4 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $4 + i32.store offset=8 + local.get $4 + if + local.get $4 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $2 + local.get $3 + local.get $1 + call $~lib/allocator/tlsf/Root#setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $2 + i32.shl + i32.or + i32.store + local.get $0 + local.get $2 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $3 + i32.shl + i32.or + call $~lib/allocator/tlsf/Root#setSLMap + ) + (func $~lib/allocator/tlsf/Root#addMemory (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + local.get $2 + i32.gt_u + if + i32.const 0 + i32.const 72 + i32.const 396 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 72 + i32.const 397 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 72 + i32.const 398 + i32.const 4 + call $~lib/env/abort + unreachable + end + i32.const 2912 + i32.load + local.tee $3 + if + local.get $1 + local.get $3 + i32.const 4 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 72 + i32.const 403 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 8 + i32.sub + local.get $3 + i32.eq + if + local.get $3 + i32.load + local.set $4 + local.get $1 + i32.const 8 + i32.sub + local.set $1 + end + else + local.get $1 + local.get $0 + i32.const 2916 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 72 + i32.const 412 + i32.const 6 + call $~lib/env/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.tee $2 + i32.const 32 + i32.lt_u + if + return + end + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $2 + i32.const 16 + i32.sub + i32.const 1 + i32.or + i32.or + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.tee $2 + i32.const 2 + i32.store + i32.const 2912 + local.get $2 + i32.store + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#insert + ) + (func $~lib/allocator/tlsf/ffs (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/Root#search (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $1 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 315 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 256 + i32.lt_u + if (result i32) + i32.const 0 + local.set $2 + local.get $1 + i32.const 8 + i32.div_u + else + local.get $1 + call $~lib/allocator/tlsf/fls + local.tee $3 + i32.const 7 + i32.sub + local.set $2 + local.get $1 + local.get $3 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.tee $1 + i32.const 31 + i32.lt_u + if (result i32) + local.get $1 + i32.const 1 + i32.add + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + i32.const 0 + end + end + local.set $1 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const -1 + local.get $1 + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + else + local.get $0 + i32.load + i32.const -1 + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/ffs + local.tee $2 + call $~lib/allocator/tlsf/Root#getSLMap + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 342 + i32.const 16 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + else + i32.const 0 + end + end + ) + (func $~lib/allocator/tlsf/Root#use (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $1 + i32.load + local.tee $4 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 367 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 16 + i32.ge_u + local.tee $3 + if + local.get $2 + i32.const 1073741824 + i32.lt_u + local.set $3 + end + local.get $3 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 368 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 72 + i32.const 369 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $4 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $3 + i32.const 24 + i32.ge_u + if + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $2 + i32.or + i32.store + local.get $1 + i32.const 8 + i32.add + local.get $2 + i32.add + local.tee $2 + local.get $3 + i32.const 8 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#insert + else + local.get $1 + local.get $4 + i32.const -2 + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 387 + i32.const 25 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $0 + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 + i32.const 8 + i32.add + ) + (func $~lib/allocator/tlsf/__mem_allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/allocator/tlsf/ROOT + local.tee $2 + i32.eqz + if + i32.const 1 + current_memory + local.tee $1 + i32.gt_s + local.tee $2 + if (result i32) + i32.const 1 + local.get $1 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + local.get $2 + end + if + unreachable + end + i32.const 176 + local.set $2 + i32.const 176 + global.set $~lib/allocator/tlsf/ROOT + i32.const 2912 + i32.const 0 + i32.store + i32.const 176 + i32.const 0 + i32.store + i32.const 0 + local.set $1 + loop $repeat|0 + local.get $1 + i32.const 22 + i32.lt_u + if + i32.const 176 + local.get $1 + i32.const 0 + call $~lib/allocator/tlsf/Root#setSLMap + i32.const 0 + local.set $3 + loop $repeat|1 + local.get $3 + i32.const 32 + i32.lt_u + if + i32.const 176 + local.get $1 + local.get $3 + i32.const 0 + call $~lib/allocator/tlsf/Root#setHead + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $repeat|1 + end + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end + end + i32.const 176 + i32.const 3096 + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + end + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + local.get $2 + local.get $0 + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + i32.const 16 + local.get $0 + i32.const 16 + i32.gt_u + select + local.tee $1 + call $~lib/allocator/tlsf/Root#search + local.tee $0 + i32.eqz + if + current_memory + local.tee $0 + local.get $1 + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $0 + local.get $3 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $2 + local.get $0 + i32.const 16 + i32.shl + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/Root#search + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 502 + i32.const 12 + call $~lib/env/abort + unreachable + end + end + local.get $0 + i32.load + i32.const -4 + i32.and + local.get $1 + i32.lt_u + if + i32.const 0 + i32.const 72 + i32.const 505 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/util/runtime/allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/tlsf/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 + i32.add + ) + (func $~lib/collector/itcm/maybeInit (; 20 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/collector/itcm/state + i32.eqz + if + i32.const 16 + call $~lib/allocator/tlsf/__mem_allocate + global.set $~lib/collector/itcm/fromSpace + global.get $~lib/collector/itcm/fromSpace + local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + i32.const 16 + call $~lib/allocator/tlsf/__mem_allocate + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/toSpace + local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter + i32.const 1 + global.set $~lib/collector/itcm/state + end + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $0 + i32.or + i32.store offset=8 + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.and + local.get $1 + i32.or + i32.store offset=8 + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/collector/itcm/__ref_register (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + call $~lib/collector/itcm/maybeInit + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + global.get $~lib/collector/itcm/white + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.or + i32.store offset=8 + global.get $~lib/collector/itcm/fromSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + ) + (func $~lib/util/runtime/register (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 176 + i32.le_u + if + i32.const 0 + i32.const 136 + i32.const 128 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 136 + i32.const 130 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + block + local.get $0 + call $~lib/collector/itcm/__ref_register + end + local.get $0 + ) + (func $~lib/runtime/runtime.newObject (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 2 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 26 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/collector/itcm/iter + local.get $0 + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + local.tee $2 + local.get $0 + i32.load offset=12 + local.tee $1 + i32.store offset=12 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $2 + i32.or + i32.store offset=8 + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/__ref_link (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + global.get $~lib/collector/itcm/white + i32.eqz + local.get $1 + i32.const 16 + i32.sub + local.tee $2 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + local.tee $1 + if (result i32) + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + else + local.get $1 + end + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/memory/memory.copy (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + br $continue|0 + end + end + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 + end + end + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end + end + end + loop $continue|5 + local.get $2 + if + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + ) + (func $~lib/runtime/runtime.newArray (; 30 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 16 + call $~lib/util/runtime/allocate + local.get $2 + call $~lib/util/runtime/register + local.tee $2 + local.set $6 + local.get $0 + local.get $1 + i32.shl + local.tee $4 + call $~lib/util/runtime/allocate + i32.const 26 + call $~lib/util/runtime/register + local.tee $5 + local.tee $1 + local.get $2 + i32.load + i32.ne + if + local.get $1 + local.get $6 + call $~lib/collector/itcm/__ref_link + end + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $5 + i32.store offset=4 + local.get $2 + local.get $4 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=12 + local.get $3 + if + local.get $5 + local.get $3 + local.get $4 + call $~lib/memory/memory.copy + end + local.get $2 + ) + (func $~lib/runtime/runtime.retain (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/itcm/__ref_link + ) + (func $~lib/runtime/runtime.release (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/allocator/tlsf/__mem_free (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.tee $1 + if + local.get $0 + i32.const 8 + i32.sub + local.tee $2 + i32.load + local.tee $3 + i32.const 1 + i32.and + if + i32.const 0 + i32.const 72 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + i32.const 1 + i32.or + i32.store + local.get $1 + local.get $0 + i32.const 8 + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/collector/itcm/step (; 34 ;) (type $FUNCSIG$v) + (local $0 i32) + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + global.get $~lib/collector/itcm/state + local.tee $0 + if + local.get $0 + i32.const 1 + i32.sub + br_table $case1|0 $case2|0 $case3|0 $break|0 + end + unreachable + end + call $~lib/runtime/__gc_mark_roots + i32.const 2 + global.set $~lib/collector/itcm/state + br $break|0 + end + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.or + i32.store offset=8 + local.get $0 + i32.load + local.get $0 + i32.const 16 + i32.add + call $~lib/runtime/__gc_mark_members + else + call $~lib/runtime/__gc_mark_roots + global.get $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $0 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $0 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + end + end + br $break|0 + end + global.get $~lib/collector/itcm/iter + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + local.get $0 + i32.const 176 + i32.ge_u + if + local.get $0 + call $~lib/allocator/tlsf/__mem_free + end + else + global.get $~lib/collector/itcm/toSpace + local.tee $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + i32.const 1 + global.set $~lib/collector/itcm/state + end + end + ) + (func $~lib/collector/itcm/__ref_collect (; 35 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/maybeInit + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|0 + end + end + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 + end + ) + (func $~lib/runtime/runtime.collect (; 36 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/__ref_collect + ) + (func $start (; 37 ;) (type $FUNCSIG$v) + call $start:runtime/flags + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 27 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT + ) + (func $~lib/collector/itcm/__ref_mark (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + call $~lib/collector/itcm/maybeInit + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/runtime/__gc_mark_roots (; 39 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/runtime/ROOT + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + ) + (func $~lib/array/Array#__traverse (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=4 + local.tee $1 + local.get $0 + i32.load offset=8 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load + local.tee $2 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $2 + call $~lib/runtime/__gc_mark_members + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/array/Array#__traverse (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=4 + local.tee $1 + local.get $0 + i32.load offset=8 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/set/Set#__traverse (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 3 + i32.shl + local.get $1 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load + local.tee $2 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/set/Set#__traverse (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 3 + i32.shl + local.get $1 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + end + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/map/Map#__traverse (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 12 + i32.mul + local.get $1 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load + local.tee $2 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.const 12 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/map/Map#__traverse (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 12 + i32.mul + local.get $1 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + end + local.get $1 + i32.const 12 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/map/Map#__traverse (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 12 + i32.mul + local.get $1 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load offset=4 + local.tee $2 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.const 12 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/map/Map#__traverse (; 47 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 12 + i32.mul + local.get $1 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load offset=4 + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + end + local.get $1 + i32.const 12 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/map/Map#__traverse (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 12 + i32.mul + local.get $1 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.load offset=4 + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + end + local.get $1 + i32.const 12 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/runtime/__gc_mark_members (; 49 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + block $folding-inner1 + block $folding-inner0 + block $invalid + block $runtime/flags/Ref + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/set/Set + block $~lib/set/Set + block $~lib/array/Array + block $~lib/array/Array + block $~lib/string/String + local.get $0 + i32.const 1 + i32.sub + br_table $folding-inner0 $~lib/string/String $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $~lib/array/Array $~lib/array/Array $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $~lib/set/Set $~lib/set/Set $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $runtime/flags/Ref $invalid + end + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + return + end + return + end + return + end + unreachable + end + local.get $1 + i32.load + call $~lib/collector/itcm/__ref_mark + return + end + local.get $1 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $1 + i32.load offset=8 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/runtime/__runtime_instanceof (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block $nope + block $~lib/arraybuffer/ArrayBufferView + block $runtime/flags/Ref + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/string/String + block $~lib/array/Array + local.get $0 + i32.const 1 + i32.sub + br_table $~lib/array/Array $~lib/string/String $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $runtime/flags/Ref $~lib/arraybuffer/ArrayBufferView $nope + end + local.get $1 + i32.const 1 + i32.eq + local.get $1 + i32.const 29 + i32.eq + i32.or + return + end + local.get $1 + i32.const 2 + i32.eq + return + end + local.get $1 + i32.const 3 + i32.eq + local.get $1 + i32.const 29 + i32.eq + i32.or + return + end + local.get $1 + i32.const 4 + i32.eq + local.get $1 + i32.const 29 + i32.eq + i32.or + return + end + local.get $1 + i32.const 5 + i32.eq + local.get $1 + i32.const 29 + i32.eq + i32.or + return + end + local.get $1 + i32.const 6 + i32.eq + local.get $1 + i32.const 29 + i32.eq + i32.or + return + end + local.get $1 + i32.const 7 + i32.eq + local.get $1 + i32.const 29 + i32.eq + i32.or + return + end + local.get $1 + i32.const 8 + i32.eq + local.get $1 + i32.const 29 + i32.eq + i32.or + return + end + local.get $1 + i32.const 9 + i32.eq + return + end + local.get $1 + i32.const 10 + i32.eq + return + end + local.get $1 + i32.const 11 + i32.eq + return + end + local.get $1 + i32.const 12 + i32.eq + return + end + local.get $1 + i32.const 13 + i32.eq + return + end + local.get $1 + i32.const 14 + i32.eq + return + end + local.get $1 + i32.const 15 + i32.eq + return + end + local.get $1 + i32.const 16 + i32.eq + return + end + local.get $1 + i32.const 17 + i32.eq + return + end + local.get $1 + i32.const 18 + i32.eq + return + end + local.get $1 + i32.const 19 + i32.eq + return + end + local.get $1 + i32.const 20 + i32.eq + return + end + local.get $1 + i32.const 21 + i32.eq + return + end + local.get $1 + i32.const 22 + i32.eq + return + end + local.get $1 + i32.const 23 + i32.eq + return + end + local.get $1 + i32.const 24 + i32.eq + return + end + local.get $1 + i32.const 25 + i32.eq + return + end + local.get $1 + i32.const 26 + i32.eq + return + end + local.get $1 + i32.const 27 + i32.eq + return + end + local.get $1 + i32.const 28 + i32.eq + return + end + local.get $1 + i32.const 29 + i32.eq + return + end + i32.const 0 + ) + (func $~lib/runtime/__runtime_flags (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + block $invalid + block $~lib/arraybuffer/ArrayBufferView + block $runtime/flags/Ref + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/string/String + block $~lib/array/Array + local.get $0 + i32.const 1 + i32.sub + br_table $~lib/array/Array $~lib/string/String $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $runtime/flags/Ref $~lib/arraybuffer/ArrayBufferView $invalid + end + i32.const 9 + return + end + i32.const 0 + return + end + i32.const 17 + return + end + i32.const 33 + return + end + i32.const 65 + return + end + i32.const 129 + return + end + i32.const 545 + return + end + i32.const 801 + return + end + i32.const 10 + return + end + i32.const 18 + return + end + i32.const 34 + return + end + i32.const 66 + return + end + i32.const 130 + return + end + i32.const 546 + return + end + i32.const 802 + return + end + i32.const 16396 + return + end + i32.const 8212 + return + end + i32.const 4132 + return + end + i32.const 2116 + return + end + i32.const 1156 + return + end + i32.const 69644 + return + end + i32.const 102412 + return + end + i32.const 1572 + return + end + i32.const 1828 + return + end + i32.const 103204 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + unreachable + ) + (func $null (; 52 ;) (type $FUNCSIG$v) + nop + ) + (func $~lib/runtime/runtime.newArray|trampoline (; 53 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 3 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/runtime/runtime.newArray + ) + (func $~lib/setargc (; 54 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.set $~lib/argc + ) +) diff --git a/tests/compiler/runtime/flags.ts b/tests/compiler/runtime/flags.ts new file mode 100644 index 0000000000..091996dc0a --- /dev/null +++ b/tests/compiler/runtime/flags.ts @@ -0,0 +1,81 @@ +import { __runtime_id, __runtime_flags } from "runtime"; + +const enum RuntimeFlags { // keep in sync with src/program.ts + NONE = 0, + /** Type is an `Array`. */ + ARRAY = 1 << 0, + /** Type is a `Set`. */ + SET = 1 << 1, + /** Type is a `Map`. */ + MAP = 1 << 2, + /** Value alignment of 1 byte. */ + VALUE_ALIGN_0 = 1 << 3, + /** Value alignment of 2 bytes. */ + VALUE_ALIGN_1 = 1 << 4, + /** Value alignment of 4 bytes. */ + VALUE_ALIGN_2 = 1 << 5, + /** Value alignment of 8 bytes. */ + VALUE_ALIGN_3 = 1 << 6, + /** Value alignment of 16 bytes. */ + VALUE_ALIGN_4 = 1 << 7, + /** Value type is nullable. */ + VALUE_NULLABLE = 1 << 8, + /** Value type is managed. */ + VALUE_MANAGED = 1 << 9, + /** Key alignment of 1 byte. */ + KEY_ALIGN_0 = 1 << 10, + /** Key alignment of 2 bytes. */ + KEY_ALIGN_1 = 1 << 11, + /** Key alignment of 4 bytes. */ + KEY_ALIGN_2 = 1 << 12, + /** Key alignment of 8 bytes. */ + KEY_ALIGN_3 = 1 << 13, + /** Key alignment of 16 bytes. */ + KEY_ALIGN_4 = 1 << 14, + /** Key type is nullable. */ + KEY_NULLABLE = 1 << 15, + /** Key type is managed. */ + KEY_MANAGED = 1 << 16 +} + +function test(flags: RuntimeFlags): void { + assert( + __runtime_flags(__runtime_id()) + == + flags + ); +} + +class Ref {} + +const VALUE_ALIGN_REF = sizeof() == 4 ? RuntimeFlags.VALUE_ALIGN_2 : RuntimeFlags.VALUE_ALIGN_3; +const KEY_ALIGN_REF = sizeof() == 4 ? RuntimeFlags.KEY_ALIGN_2 : RuntimeFlags.KEY_ALIGN_3; + +test>(RuntimeFlags.ARRAY | RuntimeFlags.VALUE_ALIGN_0); +test>(RuntimeFlags.ARRAY | RuntimeFlags.VALUE_ALIGN_1); +test>(RuntimeFlags.ARRAY | RuntimeFlags.VALUE_ALIGN_2); +test>(RuntimeFlags.ARRAY | RuntimeFlags.VALUE_ALIGN_3); +test>(RuntimeFlags.ARRAY | RuntimeFlags.VALUE_ALIGN_4); +test>(RuntimeFlags.ARRAY | VALUE_ALIGN_REF | RuntimeFlags.VALUE_MANAGED); +test>(RuntimeFlags.ARRAY | VALUE_ALIGN_REF | RuntimeFlags.VALUE_NULLABLE | RuntimeFlags.VALUE_MANAGED); + +test>(RuntimeFlags.SET | RuntimeFlags.VALUE_ALIGN_0); +test>(RuntimeFlags.SET | RuntimeFlags.VALUE_ALIGN_1); +test>(RuntimeFlags.SET | RuntimeFlags.VALUE_ALIGN_2); +test>(RuntimeFlags.SET | RuntimeFlags.VALUE_ALIGN_3); +test>(RuntimeFlags.SET | RuntimeFlags.VALUE_ALIGN_4); +test>(RuntimeFlags.SET | VALUE_ALIGN_REF | RuntimeFlags.VALUE_MANAGED); +test>(RuntimeFlags.SET | VALUE_ALIGN_REF | RuntimeFlags.VALUE_NULLABLE | RuntimeFlags.VALUE_MANAGED); + +test>(RuntimeFlags.MAP | RuntimeFlags.KEY_ALIGN_4 | RuntimeFlags.VALUE_ALIGN_0); +test>(RuntimeFlags.MAP | RuntimeFlags.KEY_ALIGN_3 | RuntimeFlags.VALUE_ALIGN_1); +test>(RuntimeFlags.MAP | RuntimeFlags.KEY_ALIGN_2 | RuntimeFlags.VALUE_ALIGN_2); +test>(RuntimeFlags.MAP | RuntimeFlags.KEY_ALIGN_1 | RuntimeFlags.VALUE_ALIGN_3); +test>(RuntimeFlags.MAP | RuntimeFlags.KEY_ALIGN_0 | RuntimeFlags.VALUE_ALIGN_4); +test>(RuntimeFlags.MAP | KEY_ALIGN_REF | RuntimeFlags.KEY_MANAGED | RuntimeFlags.VALUE_ALIGN_0); +test>(RuntimeFlags.MAP |KEY_ALIGN_REF | RuntimeFlags.KEY_NULLABLE | RuntimeFlags.KEY_MANAGED | RuntimeFlags.VALUE_ALIGN_0); +test>(RuntimeFlags.MAP | RuntimeFlags.KEY_ALIGN_0 | RuntimeFlags.VALUE_MANAGED | VALUE_ALIGN_REF); +test>(RuntimeFlags.MAP | RuntimeFlags.KEY_ALIGN_0 | RuntimeFlags.VALUE_NULLABLE | RuntimeFlags.VALUE_MANAGED | VALUE_ALIGN_REF); +test>(RuntimeFlags.MAP | RuntimeFlags.KEY_NULLABLE | RuntimeFlags.KEY_MANAGED | KEY_ALIGN_REF | RuntimeFlags.VALUE_NULLABLE | RuntimeFlags.VALUE_MANAGED | VALUE_ALIGN_REF); + +// TODO: WASM64 diff --git a/tests/compiler/runtime/flags.untouched.wat b/tests/compiler/runtime/flags.untouched.wat new file mode 100644 index 0000000000..348e0c016b --- /dev/null +++ b/tests/compiler/runtime/flags.untouched.wat @@ -0,0 +1,3924 @@ +(module + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\02\00\00\00 \00\00\00\00\00\00\00\00\00\00\00r\00u\00n\00t\00i\00m\00e\00/\00f\00l\00a\00g\00s\00.\00t\00s\00") + (data (i32.const 56) "\02\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 120) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $runtime/flags/VALUE_ALIGN_REF i32 (i32.const 32)) + (global $runtime/flags/KEY_ALIGN_REF i32 (i32.const 4096)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) + (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) + (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) + (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) + (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) + (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) + (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) + (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) + (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) + (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) + (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) + (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) + (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) + (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) + (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 176)) + (global $~lib/argc (mut i32) (i32.const 0)) + (global $~lib/capabilities i32 (i32.const 2)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.setArgc" (func $~lib/setargc)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (export "$.capabilities" (global $~lib/capabilities)) + (start $start) + (func $runtime/flags/test<~lib/array/Array> (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 1 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 3 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 4 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 5 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 6 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 7 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 8 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 9 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 10 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 11 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 12 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 13 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 14 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 15 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 16 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 17 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 18 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 19 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 20 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 21 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 22 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 23 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 24 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 25 + call $~lib/runtime/__runtime_flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 42 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $start:runtime/flags (; 25 ;) (type $FUNCSIG$v) + i32.const 1 + i32.const 8 + i32.or + call $runtime/flags/test<~lib/array/Array> + i32.const 1 + i32.const 16 + i32.or + call $runtime/flags/test<~lib/array/Array> + i32.const 1 + i32.const 32 + i32.or + call $runtime/flags/test<~lib/array/Array> + i32.const 1 + i32.const 64 + i32.or + call $runtime/flags/test<~lib/array/Array> + i32.const 1 + i32.const 128 + i32.or + call $runtime/flags/test<~lib/array/Array> + i32.const 1 + global.get $runtime/flags/VALUE_ALIGN_REF + i32.or + i32.const 512 + i32.or + call $runtime/flags/test<~lib/array/Array> + i32.const 1 + global.get $runtime/flags/VALUE_ALIGN_REF + i32.or + i32.const 256 + i32.or + i32.const 512 + i32.or + call $runtime/flags/test<~lib/array/Array> + i32.const 2 + i32.const 8 + i32.or + call $runtime/flags/test<~lib/set/Set> + i32.const 2 + i32.const 16 + i32.or + call $runtime/flags/test<~lib/set/Set> + i32.const 2 + i32.const 32 + i32.or + call $runtime/flags/test<~lib/set/Set> + i32.const 2 + i32.const 64 + i32.or + call $runtime/flags/test<~lib/set/Set> + i32.const 2 + i32.const 128 + i32.or + call $runtime/flags/test<~lib/set/Set> + i32.const 2 + global.get $runtime/flags/VALUE_ALIGN_REF + i32.or + i32.const 512 + i32.or + call $runtime/flags/test<~lib/set/Set> + i32.const 2 + global.get $runtime/flags/VALUE_ALIGN_REF + i32.or + i32.const 256 + i32.or + i32.const 512 + i32.or + call $runtime/flags/test<~lib/set/Set> + i32.const 4 + i32.const 16384 + i32.or + i32.const 8 + i32.or + call $runtime/flags/test<~lib/map/Map> + i32.const 4 + i32.const 8192 + i32.or + i32.const 16 + i32.or + call $runtime/flags/test<~lib/map/Map> + i32.const 4 + i32.const 4096 + i32.or + i32.const 32 + i32.or + call $runtime/flags/test<~lib/map/Map> + i32.const 4 + i32.const 2048 + i32.or + i32.const 64 + i32.or + call $runtime/flags/test<~lib/map/Map> + i32.const 4 + i32.const 1024 + i32.or + i32.const 128 + i32.or + call $runtime/flags/test<~lib/map/Map> + i32.const 4 + global.get $runtime/flags/KEY_ALIGN_REF + i32.or + i32.const 65536 + i32.or + i32.const 8 + i32.or + call $runtime/flags/test<~lib/map/Map> + i32.const 4 + global.get $runtime/flags/KEY_ALIGN_REF + i32.or + i32.const 32768 + i32.or + i32.const 65536 + i32.or + i32.const 8 + i32.or + call $runtime/flags/test<~lib/map/Map> + i32.const 4 + i32.const 1024 + i32.or + i32.const 512 + i32.or + global.get $runtime/flags/VALUE_ALIGN_REF + i32.or + call $runtime/flags/test<~lib/map/Map> + i32.const 4 + i32.const 1024 + i32.or + i32.const 256 + i32.or + i32.const 512 + i32.or + global.get $runtime/flags/VALUE_ALIGN_REF + i32.or + call $runtime/flags/test<~lib/map/Map> + i32.const 4 + i32.const 32768 + i32.or + i32.const 65536 + i32.or + global.get $runtime/flags/KEY_ALIGN_REF + i32.or + i32.const 256 + i32.or + i32.const 512 + i32.or + global.get $runtime/flags/VALUE_ALIGN_REF + i32.or + call $runtime/flags/test<~lib/map/Map> + ) + (func $~lib/runtime/runtime.instanceof (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.get $1 + call $~lib/runtime/__runtime_instanceof + else + i32.const 0 + end + ) + (func $~lib/runtime/runtime.flags (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/__runtime_flags + ) + (func $~lib/util/runtime/adjust (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 0 + local.get $1 + i32.store offset=2912 + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 159 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 4 + i32.mul + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/allocator/tlsf/Root#setHead (; 31 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 184 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + i32.load offset=2912 + ) + (func $~lib/allocator/tlsf/Block#get:right (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 104 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 72 + i32.const 105 + i32.const 11 + call $~lib/env/abort + unreachable + else + local.get $1 + end + ) + (func $~lib/allocator/tlsf/fls (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 447 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $~lib/allocator/tlsf/Root#getHead (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 175 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 176 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + i32.load offset=96 + ) + (func $~lib/allocator/tlsf/Root#getSLMap (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 4 + i32.mul + i32.add + i32.load offset=4 + ) + (func $~lib/allocator/tlsf/Root#remove (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + i32.load + local.set $2 + local.get $2 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 277 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 279 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $5 + local.get $3 + i32.const 8 + i32.div_u + local.set $6 + else + local.get $3 + call $~lib/allocator/tlsf/fls + local.set $5 + local.get $3 + local.get $5 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $6 + local.get $5 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $5 + end + local.get $1 + i32.load offset=4 + local.set $7 + local.get $1 + i32.load offset=8 + local.set $8 + local.get $7 + if + local.get $7 + local.get $8 + i32.store offset=8 + end + local.get $8 + if + local.get $8 + local.get $7 + i32.store offset=4 + end + local.get $1 + local.get $0 + local.get $5 + local.get $6 + call $~lib/allocator/tlsf/Root#getHead + i32.eq + if + local.get $0 + local.get $5 + local.get $6 + local.get $8 + call $~lib/allocator/tlsf/Root#setHead + local.get $8 + i32.eqz + if + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#getSLMap + local.set $4 + local.get $0 + local.get $5 + local.get $4 + i32.const 1 + local.get $6 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $4 + call $~lib/allocator/tlsf/Root#setSLMap + local.get $4 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $5 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/allocator/tlsf/Block#get:left (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 96 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 72 + i32.const 97 + i32.const 11 + call $~lib/env/abort + unreachable + else + local.get $1 + end + ) + (func $~lib/allocator/tlsf/Root#setJump (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.load + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 353 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.get $2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 354 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 355 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 4 + i32.sub + local.get $1 + i32.store + ) + (func $~lib/allocator/tlsf/Root#insert (; 40 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 208 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.set $2 + local.get $2 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 210 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.tee $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 212 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 72 + i32.const 216 + i32.const 23 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $5 + local.get $5 + i32.load + local.set $6 + local.get $6 + global.get $~lib/allocator/tlsf/FREE + i32.and + if + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $2 + global.get $~lib/allocator/tlsf/Block.INFO + local.get $6 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $2 + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.set $5 + local.get $5 + i32.load + local.set $6 + end + local.get $2 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 72 + i32.const 230 + i32.const 24 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $4 + local.get $4 + i32.load + local.set $7 + local.get $7 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 232 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#remove + local.get $4 + local.get $7 + global.get $~lib/allocator/tlsf/Block.INFO + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $7 + i32.store + local.get $4 + local.set $1 + local.get $7 + local.set $2 + end + local.get $5 + local.get $6 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.or + i32.store + local.get $0 + local.get $1 + local.get $5 + call $~lib/allocator/tlsf/Root#setJump + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $7 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $7 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 245 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $8 + local.get $3 + i32.const 8 + i32.div_u + local.set $9 + else + local.get $3 + call $~lib/allocator/tlsf/fls + local.set $8 + local.get $3 + local.get $8 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $9 + local.get $8 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $8 + end + local.get $0 + local.get $8 + local.get $9 + call $~lib/allocator/tlsf/Root#getHead + local.set $10 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $10 + i32.store offset=8 + local.get $10 + if + local.get $10 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $8 + local.get $9 + local.get $1 + call $~lib/allocator/tlsf/Root#setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $8 + i32.shl + i32.or + i32.store + local.get $0 + local.get $8 + local.get $0 + local.get $8 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $9 + i32.shl + i32.or + call $~lib/allocator/tlsf/Root#setSLMap + ) + (func $~lib/allocator/tlsf/Root#addMemory (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + local.get $2 + i32.le_u + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 396 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 397 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 398 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/Root#get:tailRef + local.set $3 + i32.const 0 + local.set $4 + local.get $3 + if + local.get $1 + local.get $3 + i32.const 4 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 403 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.get $3 + i32.eq + if + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $1 + local.get $3 + i32.load + local.set $4 + end + else + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 412 + i32.const 6 + call $~lib/env/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.set $5 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.add + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + i32.lt_u + if + i32.const 0 + return + end + local.get $5 + i32.const 2 + global.get $~lib/allocator/tlsf/Block.INFO + i32.mul + i32.sub + local.set $6 + local.get $1 + local.set $7 + local.get $7 + local.get $6 + global.get $~lib/allocator/tlsf/FREE + i32.or + local.get $4 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.or + i32.store + local.get $7 + i32.const 0 + i32.store offset=4 + local.get $7 + i32.const 0 + i32.store offset=8 + local.get $1 + local.get $5 + i32.add + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $8 + local.get $8 + i32.const 0 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.or + i32.store + local.get $0 + local.get $8 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $0 + local.get $7 + call $~lib/allocator/tlsf/Root#insert + i32.const 1 + ) + (func $~lib/allocator/tlsf/ffs (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/ffs (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/Root#search (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $1 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $2 + if (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $2 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 315 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $3 + local.get $1 + i32.const 8 + i32.div_u + local.set $4 + else + local.get $1 + call $~lib/allocator/tlsf/fls + local.set $3 + local.get $1 + local.get $3 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $4 + local.get $3 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $3 + local.get $4 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 1 + i32.sub + i32.lt_u + if + local.get $4 + i32.const 1 + i32.add + local.set $4 + else + local.get $3 + i32.const 1 + i32.add + local.set $3 + i32.const 0 + local.set $4 + end + end + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 0 + i32.const -1 + i32.xor + local.get $4 + i32.shl + i32.and + local.set $5 + local.get $5 + i32.eqz + if + local.get $0 + i32.load + i32.const 0 + i32.const -1 + i32.xor + local.get $3 + i32.const 1 + i32.add + i32.shl + i32.and + local.set $2 + local.get $2 + i32.eqz + if + i32.const 0 + local.set $6 + else + local.get $2 + call $~lib/allocator/tlsf/ffs + local.set $3 + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#getSLMap + local.tee $7 + if (result i32) + local.get $7 + else + i32.const 0 + i32.const 72 + i32.const 342 + i32.const 16 + call $~lib/env/abort + unreachable + end + local.set $5 + local.get $0 + local.get $3 + local.get $5 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $6 + end + else + local.get $0 + local.get $3 + local.get $5 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $6 + end + local.get $6 + ) + (func $~lib/allocator/tlsf/Root#use (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 367 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $2 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 368 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 369 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $3 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.sub + local.set $5 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.add + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.or + i32.store + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + local.get $2 + i32.add + local.set $4 + local.get $4 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#insert + else + local.get $1 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.const -1 + i32.xor + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 72 + i32.const 387 + i32.const 25 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $4 + local.get $4 + local.get $4 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const -1 + i32.xor + i32.and + i32.store + end + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + ) + (func $~lib/allocator/tlsf/__mem_allocate (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + i32.eqz + if + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $2 + current_memory + local.set $3 + local.get $2 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $4 + local.get $4 + local.get $3 + i32.gt_s + local.tee $5 + if (result i32) + local.get $4 + local.get $3 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + local.get $5 + end + if + unreachable + end + local.get $2 + local.tee $1 + global.set $~lib/allocator/tlsf/ROOT + local.get $1 + i32.const 0 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $1 + i32.const 0 + i32.store + block $break|0 + i32.const 0 + local.set $5 + loop $repeat|0 + local.get $5 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + br_if $break|0 + block + local.get $1 + local.get $5 + i32.const 0 + call $~lib/allocator/tlsf/Root#setSLMap + block $break|1 + i32.const 0 + local.set $6 + loop $repeat|1 + local.get $6 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + br_if $break|1 + local.get $1 + local.get $5 + local.get $6 + i32.const 0 + call $~lib/allocator/tlsf/Root#setHead + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $repeat|1 + unreachable + end + unreachable + end + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $repeat|0 + unreachable + end + unreachable + end + local.get $1 + local.get $2 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + end + local.get $0 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.gt_u + if + unreachable + end + local.get $0 + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.tee $4 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + local.tee $3 + local.get $4 + local.get $3 + i32.gt_u + select + local.set $0 + local.get $1 + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.set $7 + local.get $7 + i32.eqz + if + current_memory + local.set $4 + local.get $0 + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $3 + local.get $4 + local.tee $2 + local.get $3 + local.tee $5 + local.get $2 + local.get $5 + i32.gt_s + select + local.set $2 + local.get $2 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + current_memory + local.set $5 + local.get $1 + local.get $4 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + local.get $1 + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.tee $6 + i32.eqz + if (result i32) + i32.const 0 + i32.const 72 + i32.const 502 + i32.const 12 + call $~lib/env/abort + unreachable + else + local.get $6 + end + local.set $7 + end + local.get $7 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.get $0 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 505 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $1 + local.get $7 + local.get $0 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/memory/memory.allocate (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_allocate + return + ) + (func $~lib/util/runtime/allocate (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + ) + (func $~lib/collector/itcm/maybeInit (; 50 ;) (type $FUNCSIG$v) + global.get $~lib/collector/itcm/state + i32.const 0 + i32.eq + if + global.get $~lib/util/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/fromSpace + global.get $~lib/collector/itcm/fromSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/fromSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/fromSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/util/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/toSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/toSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter + i32.const 1 + global.set $~lib/collector/itcm/state + end + ) + (func $~lib/collector/itcm/ManagedObject#set:color (; 51 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $1 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/ManagedObject#set:next (; 52 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $0 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/collector/itcm/__ref_register (; 54 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + global.get $~lib/collector/itcm/white + call $~lib/collector/itcm/ManagedObject#set:color + global.get $~lib/collector/itcm/fromSpace + local.get $2 + call $~lib/collector/itcm/ManagedObjectList#push + ) + (func $~lib/util/runtime/register (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 136 + i32.const 128 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 136 + i32.const 130 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $~lib/collector/itcm/__ref_register + local.get $0 + ) + (func $~lib/runtime/runtime.newObject (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 2 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 26 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/collector/itcm/ManagedObject#get:color (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#get:next (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#unlink (; 61 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + local.set $1 + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/collector/itcm/iter + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + call $~lib/collector/itcm/ManagedObject#unlink + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/__ref_link (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + local.set $3 + local.get $3 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eqz + i32.eq + local.tee $2 + if (result i32) + block $~lib/collector/itcm/refToObj|inlined.3 (result i32) + local.get $0 + local.set $2 + local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + else + local.get $2 + end + if + local.get $3 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/memory/memory.copy (; 64 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|2 + end + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + end + ) + (func $~lib/runtime/runtime.newArray (; 65 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + i32.const 16 + call $~lib/util/runtime/allocate + local.get $2 + call $~lib/util/runtime/register + local.set $4 + local.get $0 + local.get $1 + i32.shl + local.set $5 + local.get $5 + call $~lib/util/runtime/allocate + i32.const 26 + call $~lib/util/runtime/register + local.set $6 + local.get $4 + local.tee $7 + local.get $6 + local.tee $8 + local.get $7 + i32.load + local.tee $9 + i32.ne + if (result i32) + nop + local.get $8 + local.get $7 + call $~lib/collector/itcm/__ref_link + local.get $8 + else + local.get $8 + end + i32.store + local.get $4 + local.get $6 + i32.store offset=4 + local.get $4 + local.get $5 + i32.store offset=8 + local.get $4 + local.get $0 + i32.store offset=12 + local.get $3 + if + local.get $6 + local.get $3 + local.get $5 + call $~lib/memory/memory.copy + end + local.get $4 + ) + (func $~lib/runtime/Root#constructor (; 66 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 27 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 67 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/itcm/__ref_link + ) + (func $~lib/runtime/runtime.release (; 68 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/allocator/tlsf/__mem_free (; 69 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + if + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $2 + local.get $2 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/memory/memory.free (; 70 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/collector/itcm/step (; 71 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + global.get $~lib/collector/itcm/state + local.set $1 + local.get $1 + i32.const 0 + i32.eq + br_if $case0|0 + local.get $1 + i32.const 1 + i32.eq + br_if $case1|0 + local.get $1 + i32.const 2 + i32.eq + br_if $case2|0 + local.get $1 + i32.const 3 + i32.eq + br_if $case3|0 + br $break|0 + end + unreachable + end + block + call $~lib/runtime/__gc_mark_roots + i32.const 2 + global.set $~lib/collector/itcm/state + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + call $~lib/collector/itcm/ManagedObject#set:color + local.get $0 + i32.load + block $~lib/collector/itcm/objToRef|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + call $~lib/runtime/__gc_mark_members + else + call $~lib/runtime/__gc_mark_roots + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $1 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $1 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $1 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + end + end + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.ge_u + if + local.get $0 + call $~lib/memory/memory.free + end + else + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + i32.const 1 + global.set $~lib/collector/itcm/state + end + br $break|0 + unreachable + end + unreachable + end + ) + (func $~lib/collector/itcm/__ref_collect (; 72 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/maybeInit + block $break|0 + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 + end + end + ) + (func $~lib/runtime/runtime.collect (; 73 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 74 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 75 ;) (type $FUNCSIG$v) + call $start:runtime/flags + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT + ) + (func $~lib/collector/itcm/__ref_mark (; 76 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.4 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/runtime/__gc_mark_roots (; 77 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/runtime/ROOT + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + ) + (func $~lib/array/Array#__traverse (; 78 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/array/Array#__traverse (; 79 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/array/Array#__traverse (; 80 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/array/Array#__traverse (; 81 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/array/Array#__traverse (; 82 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/array/Array#__traverse (; 83 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.add + local.set $2 + block $break|0 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + block + local.get $1 + i32.load + local.set $3 + local.get $3 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $3 + call $~lib/runtime/__gc_mark_members + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + br $continue|0 + end + end + end + ) + (func $~lib/array/Array#__traverse (; 84 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.add + local.set $2 + block $break|0 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + block + local.get $1 + i32.load + local.set $3 + local.get $3 + if + local.get $3 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $3 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + br $continue|0 + end + end + end + ) + (func $~lib/set/Set#__traverse (; 85 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/set/Set#__traverse (; 86 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/set/Set#__traverse (; 87 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/set/Set#__traverse (; 88 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/set/Set#__traverse (; 89 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/set/Set#__traverse (; 90 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/set/ENTRY_SIZE|inlined.0 (result i32) + i32.const 8 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load + local.set $5 + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + local.get $2 + block $~lib/set/ENTRY_SIZE|inlined.1 (result i32) + i32.const 8 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/set/Set#__traverse (; 91 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/set/ENTRY_SIZE|inlined.0 (result i32) + i32.const 8 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + end + local.get $2 + block $~lib/set/ENTRY_SIZE|inlined.1 (result i32) + i32.const 8 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/map/Map#__traverse (; 92 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/map/Map#__traverse (; 93 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/map/Map#__traverse (; 94 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/map/Map#__traverse (; 95 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/map/Map#__traverse (; 96 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/map/Map#__traverse (; 97 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/map/ENTRY_SIZE|inlined.0 (result i32) + i32.const 12 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load + local.set $5 + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + local.get $2 + block $~lib/map/ENTRY_SIZE|inlined.1 (result i32) + i32.const 12 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/map/Map#__traverse (; 98 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/map/ENTRY_SIZE|inlined.0 (result i32) + i32.const 12 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + end + local.get $2 + block $~lib/map/ENTRY_SIZE|inlined.1 (result i32) + i32.const 12 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/map/Map#__traverse (; 99 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/map/ENTRY_SIZE|inlined.0 (result i32) + i32.const 12 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load offset=4 + local.set $5 + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + local.get $2 + block $~lib/map/ENTRY_SIZE|inlined.1 (result i32) + i32.const 12 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/map/Map#__traverse (; 100 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/map/ENTRY_SIZE|inlined.0 (result i32) + i32.const 12 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load offset=4 + local.set $5 + local.get $5 + if + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + end + local.get $2 + block $~lib/map/ENTRY_SIZE|inlined.1 (result i32) + i32.const 12 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/map/Map#__traverse (; 101 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/map/ENTRY_SIZE|inlined.0 (result i32) + i32.const 12 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + local.get $4 + i32.load offset=4 + local.set $5 + local.get $5 + if + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 28 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + end + local.get $2 + block $~lib/map/ENTRY_SIZE|inlined.1 (result i32) + i32.const 12 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/runtime/__gc_mark_members (; 102 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + block $invalid + block $runtime/flags/Ref + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/string/String + block $~lib/array/Array + local.get $0 + br_table $invalid $~lib/array/Array $~lib/string/String $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $runtime/flags/Ref $invalid + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + return + end + return + end + return + end + unreachable + ) + (func $~lib/runtime/__runtime_instanceof (; 103 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block $nope + block $~lib/arraybuffer/ArrayBufferView + block $runtime/flags/Ref + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/string/String + block $~lib/array/Array + local.get $0 + br_table $nope $~lib/array/Array $~lib/string/String $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $runtime/flags/Ref $~lib/arraybuffer/ArrayBufferView $nope + end + local.get $1 + i32.const 1 + i32.eq + local.get $1 + i32.const 29 + i32.eq + i32.or + return + end + local.get $1 + i32.const 2 + i32.eq + return + end + local.get $1 + i32.const 3 + i32.eq + local.get $1 + i32.const 29 + i32.eq + i32.or + return + end + local.get $1 + i32.const 4 + i32.eq + local.get $1 + i32.const 29 + i32.eq + i32.or + return + end + local.get $1 + i32.const 5 + i32.eq + local.get $1 + i32.const 29 + i32.eq + i32.or + return + end + local.get $1 + i32.const 6 + i32.eq + local.get $1 + i32.const 29 + i32.eq + i32.or + return + end + local.get $1 + i32.const 7 + i32.eq + local.get $1 + i32.const 29 + i32.eq + i32.or + return + end + local.get $1 + i32.const 8 + i32.eq + local.get $1 + i32.const 29 + i32.eq + i32.or + return + end + local.get $1 + i32.const 9 + i32.eq + return + end + local.get $1 + i32.const 10 + i32.eq + return + end + local.get $1 + i32.const 11 + i32.eq + return + end + local.get $1 + i32.const 12 + i32.eq + return + end + local.get $1 + i32.const 13 + i32.eq + return + end + local.get $1 + i32.const 14 + i32.eq + return + end + local.get $1 + i32.const 15 + i32.eq + return + end + local.get $1 + i32.const 16 + i32.eq + return + end + local.get $1 + i32.const 17 + i32.eq + return + end + local.get $1 + i32.const 18 + i32.eq + return + end + local.get $1 + i32.const 19 + i32.eq + return + end + local.get $1 + i32.const 20 + i32.eq + return + end + local.get $1 + i32.const 21 + i32.eq + return + end + local.get $1 + i32.const 22 + i32.eq + return + end + local.get $1 + i32.const 23 + i32.eq + return + end + local.get $1 + i32.const 24 + i32.eq + return + end + local.get $1 + i32.const 25 + i32.eq + return + end + local.get $1 + i32.const 26 + i32.eq + return + end + local.get $1 + i32.const 27 + i32.eq + return + end + local.get $1 + i32.const 28 + i32.eq + return + end + local.get $1 + i32.const 29 + i32.eq + return + end + i32.const 0 + return + ) + (func $~lib/runtime/__runtime_flags (; 104 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + block $invalid + block $~lib/arraybuffer/ArrayBufferView + block $runtime/flags/Ref + block $~lib/runtime/Root + block $~lib/arraybuffer/ArrayBuffer + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/string/String + block $~lib/array/Array + local.get $0 + br_table $invalid $~lib/array/Array $~lib/string/String $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $runtime/flags/Ref $~lib/arraybuffer/ArrayBufferView $invalid + end + i32.const 9 + return + end + i32.const 0 + return + end + i32.const 17 + return + end + i32.const 33 + return + end + i32.const 65 + return + end + i32.const 129 + return + end + i32.const 545 + return + end + i32.const 801 + return + end + i32.const 10 + return + end + i32.const 18 + return + end + i32.const 34 + return + end + i32.const 66 + return + end + i32.const 130 + return + end + i32.const 546 + return + end + i32.const 802 + return + end + i32.const 16396 + return + end + i32.const 8212 + return + end + i32.const 4132 + return + end + i32.const 2116 + return + end + i32.const 1156 + return + end + i32.const 69644 + return + end + i32.const 102412 + return + end + i32.const 1572 + return + end + i32.const 1828 + return + end + i32.const 103204 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + i32.const 0 + return + end + unreachable + ) + (func $null (; 105 ;) (type $FUNCSIG$v) + ) + (func $~lib/runtime/runtime.newArray|trampoline (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 3 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/runtime/runtime.newArray + ) + (func $~lib/setargc (; 107 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.set $~lib/argc + ) +) diff --git a/tests/compiler/runtime/instanceof.optimized.wat b/tests/compiler/runtime/instanceof.optimized.wat index ab75a98236..acaa34bd5a 100644 --- a/tests/compiler/runtime/instanceof.optimized.wat +++ b/tests/compiler/runtime/instanceof.optimized.wat @@ -11,10 +11,10 @@ (memory $0 1) (data (i32.const 8) "\02\00\00\00*") (data (i32.const 24) "r\00u\00n\00t\00i\00m\00e\00/\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s") - (data (i32.const 72) "\02\00\00\00\1e") - (data (i32.const 88) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 120) "\02\00\00\00\16") - (data (i32.const 136) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 72) "\02\00\00\00(") + (data (i32.const 88) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 128) "\02\00\00\00\16") + (data (i32.const 144) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) @@ -35,7 +35,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $runtime/instanceof/main)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -98,7 +98,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/util/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 call $~lib/allocator/arena/__mem_allocate @@ -119,7 +119,7 @@ i32.add ) (func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 136 + i32.const 144 i32.const 1 local.get $0 f64.convert_i32_u @@ -135,16 +135,16 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 160 + i32.const 168 i32.le_u if i32.const 0 i32.const 88 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -158,8 +158,8 @@ if i32.const 0 i32.const 88 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -175,9 +175,9 @@ if (result i32) local.get $0 else - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end ) (func $runtime/instanceof/Cat#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -185,16 +185,16 @@ if (result i32) local.get $0 else - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end call $runtime/instanceof/Animal#constructor ) (func $runtime/instanceof/BlackCat#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register call $runtime/instanceof/Cat#constructor ) (func $start:runtime/instanceof (; 9 ;) (type $FUNCSIG$v) @@ -292,7 +292,7 @@ call $~lib/env/abort unreachable end - i32.const 160 + i32.const 168 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset diff --git a/tests/compiler/runtime/instanceof.untouched.wat b/tests/compiler/runtime/instanceof.untouched.wat index 844c5735a6..66eb33f473 100644 --- a/tests/compiler/runtime/instanceof.untouched.wat +++ b/tests/compiler/runtime/instanceof.untouched.wat @@ -9,8 +9,8 @@ (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) (data (i32.const 8) "\02\00\00\00*\00\00\00\00\00\00\00\00\00\00\00r\00u\00n\00t\00i\00m\00e\00/\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s\00") - (data (i32.const 72) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 120) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 72) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 128) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) @@ -39,12 +39,12 @@ (global $runtime/instanceof/nullCat (mut i32) (i32.const 0)) (global $runtime/instanceof/nullBlackcat (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 160)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 168)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $runtime/instanceof/main)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 @@ -141,7 +141,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -164,7 +164,7 @@ i32.add ) (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 136 + i32.const 144 i32.const 1 local.get $0 f64.convert_i32_u @@ -180,7 +180,7 @@ local.get $0 global.set $gc/_dummy/register_ref ) - (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -189,8 +189,8 @@ if i32.const 0 i32.const 88 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -206,8 +206,8 @@ if i32.const 0 i32.const 88 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -223,9 +223,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -235,9 +235,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -250,9 +250,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 191b024f29..cbeb13b2e2 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -142,7 +142,7 @@ if i32.const 0 i32.const 64 - i32.const 172 + i32.const 178 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 90a4ecc6eb..73edcecb4a 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -218,7 +218,7 @@ if i32.const 0 i32.const 64 - i32.const 172 + i32.const 178 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index a59a5bd0b0..2d41c866a4 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -21,8 +21,8 @@ (data (i32.const 232) "\01") (data (i32.const 248) "\04\00\00\00\10") (data (i32.const 264) "\f8\00\00\00\f8") - (data (i32.const 280) "\03\00\00\00\1e") - (data (i32.const 296) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 280) "\03\00\00\00(") + (data (i32.const 296) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 264)) @@ -36,7 +36,7 @@ (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/array/Array#__get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -142,7 +142,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -169,16 +169,16 @@ i32.const 16 i32.add ) - (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 328 + i32.const 336 i32.le_u if i32.const 0 i32.const 296 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -192,8 +192,8 @@ if i32.const 0 i32.const 296 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -206,17 +206,17 @@ (local $2 i32) (local $3 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.get $1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $1 i32.const 3 local.get $0 i32.shl local.tee $0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $2 local.tee $3 local.get $1 @@ -239,15 +239,15 @@ ) (func $std/array-literal/Ref#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $std/array-literal/RefWithCtor#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 7 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $start:std/array-literal (; 9 ;) (type $FUNCSIG$v) (local $0 i32) @@ -361,7 +361,7 @@ call $~lib/env/abort unreachable end - i32.const 328 + i32.const 336 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 49292edaf9..bb62bc711e 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -17,7 +17,7 @@ (data (i32.const 200) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\b8\00\00\00\b8\00\00\00\0c\00\00\00\03\00\00\00") (data (i32.const 232) "\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 248) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\f8\00\00\00\f8\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 280) "\03\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 280) "\03\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/array-literal/staticArrayI8 i32 (i32.const 48)) @@ -33,11 +33,11 @@ (global $std/array-literal/dynamicArrayI32 (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 $~lib/memory/HEAP_BASE i32 (i32.const 328)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 336)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/array/Array#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -199,7 +199,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -224,7 +224,7 @@ (func $~lib/collector/dummy/__ref_register (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/runtime.register (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -233,8 +233,8 @@ if i32.const 0 i32.const 296 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -250,8 +250,8 @@ if i32.const 0 i32.const 296 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -485,18 +485,18 @@ (local $8 i32) (local $9 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.get $2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $4 local.get $0 local.get $1 i32.shl local.set $5 local.get $5 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $6 local.get $4 local.tee $7 @@ -544,9 +544,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -560,9 +560,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 7 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index ec41dcb54e..ca8e1841ec 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -28,397 +28,395 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00&") (data (i32.const 24) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 64) "\01\00\00\00\1e") - (data (i32.const 80) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 112) "\01\00\00\00\06") - (data (i32.const 128) "a\00b\00c") - (data (i32.const 136) "\01\00\00\00\18") - (data (i32.const 152) "s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 176) "\02\00\00\00\05") - (data (i32.const 192) "\01\02\03\04\05") - (data (i32.const 200) "\07\00\00\00\10") - (data (i32.const 216) "\c0\00\00\00\c0\00\00\00\05\00\00\00\05") - (data (i32.const 232) "\02\00\00\00\05") - (data (i32.const 248) "\01\01\01\04\05") - (data (i32.const 256) "\01\00\00\00\1a") - (data (i32.const 272) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 304) "\02\00\00\00\05") - (data (i32.const 328) "\02\00\00\00\05") - (data (i32.const 344) "\01\01") - (data (i32.const 352) "\02\00\00\00\05") - (data (i32.const 368) "\01\01\00\02\02") - (data (i32.const 376) "\02\00\00\00\05") - (data (i32.const 392) "\01\01\00\02\02") - (data (i32.const 400) "\02\00\00\00\14") - (data (i32.const 416) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 440) "\08\00\00\00\10") - (data (i32.const 456) "\a0\01\00\00\a0\01\00\00\14\00\00\00\05") - (data (i32.const 472) "\02\00\00\00\14") - (data (i32.const 488) "\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") - (data (i32.const 512) "\02\00\00\00\14") - (data (i32.const 552) "\02\00\00\00\14") - (data (i32.const 568) "\01\00\00\00\01") - (data (i32.const 592) "\02\00\00\00\14") - (data (i32.const 608) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 632) "\02\00\00\00\14") - (data (i32.const 648) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 672) "\01\00\00\00(") - (data (i32.const 688) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 728) "\02") - (data (i32.const 744) "\02") - (data (i32.const 760) "\04\00\00\00\10") - (data (i32.const 776) "\f8\02\00\00\f8\02") - (data (i32.const 792) "\02\00\00\00\14") - (data (i32.const 808) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 832) "\02\00\00\00\14") - (data (i32.const 848) "\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 872) "\02\00\00\00\14") - (data (i32.const 888) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 912) "\02\00\00\00\14") - (data (i32.const 928) "\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05") - (data (i32.const 952) "\02\00\00\00\14") - (data (i32.const 968) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 992) "\02\00\00\00\14") - (data (i32.const 1008) "\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") - (data (i32.const 1032) "\02\00\00\00\14") - (data (i32.const 1048) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1072) "\02\00\00\00\14") - (data (i32.const 1088) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1112) "\02\00\00\00\14") - (data (i32.const 1128) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1152) "\02\00\00\00\14") - (data (i32.const 1168) "\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1192) "\02\00\00\00\14") - (data (i32.const 1208) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1232) "\02\00\00\00\14") - (data (i32.const 1248) "\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1272) "\02\00\00\00\14") - (data (i32.const 1288) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1312) "\02\00\00\00\14") - (data (i32.const 1328) "\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") - (data (i32.const 1352) "\02\00\00\00\14") - (data (i32.const 1368) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1392) "\02\00\00\00\14") - (data (i32.const 1408) "\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1432) "\02\00\00\00\14") - (data (i32.const 1448) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1472) "\02\00\00\00\14") - (data (i32.const 1488) "\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1512) "\02\00\00\00\14") - (data (i32.const 1528) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1552) "\02\00\00\00\14") - (data (i32.const 1568) "\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1592) "\02\00\00\00\14") - (data (i32.const 1608) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1632) "\02\00\00\00\14") - (data (i32.const 1648) "\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") - (data (i32.const 1672) "\02\00\00\00\14") - (data (i32.const 1688) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1712) "\02\00\00\00\14") - (data (i32.const 1728) "\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") - (data (i32.const 1752) "\02\00\00\00\14") - (data (i32.const 1768) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1792) "\04\00\00\00\10") - (data (i32.const 1808) "\e8\06\00\00\e8\06\00\00\14\00\00\00\05") - (data (i32.const 1824) "\02\00\00\00\14") - (data (i32.const 1840) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1864) "\02") - (data (i32.const 1880) "\02\00\00\00\14") - (data (i32.const 1896) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1920) "\02\00\00\00\0c") - (data (i32.const 1936) "\03\00\00\00\04\00\00\00\05") - (data (i32.const 1952) "\02\00\00\00\08") - (data (i32.const 1968) "\01\00\00\00\02") - (data (i32.const 1976) "\02\00\00\00\14") - (data (i32.const 1992) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2016) "\02\00\00\00\08") - (data (i32.const 2032) "\03\00\00\00\04") - (data (i32.const 2040) "\02\00\00\00\0c") - (data (i32.const 2056) "\01\00\00\00\02\00\00\00\05") - (data (i32.const 2072) "\02\00\00\00\14") - (data (i32.const 2088) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2112) "\02\00\00\00\04") - (data (i32.const 2128) "\01") - (data (i32.const 2136) "\02\00\00\00\10") - (data (i32.const 2152) "\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2168) "\02\00\00\00\14") - (data (i32.const 2184) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2208) "\02\00\00\00\04") - (data (i32.const 2224) "\05") - (data (i32.const 2232) "\02\00\00\00\10") - (data (i32.const 2248) "\01\00\00\00\02\00\00\00\03\00\00\00\04") - (data (i32.const 2264) "\02\00\00\00\14") - (data (i32.const 2280) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2304) "\02\00\00\00\08") - (data (i32.const 2320) "\04\00\00\00\05") - (data (i32.const 2328) "\02\00\00\00\0c") - (data (i32.const 2344) "\01\00\00\00\02\00\00\00\03") - (data (i32.const 2360) "\02\00\00\00\14") - (data (i32.const 2376) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2400) "\02\00\00\00\04") - (data (i32.const 2416) "\04") - (data (i32.const 2424) "\02\00\00\00\10") - (data (i32.const 2440) "\01\00\00\00\02\00\00\00\03\00\00\00\05") - (data (i32.const 2456) "\02\00\00\00\14") - (data (i32.const 2472) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2496) "\02\00\00\00\04") - (data (i32.const 2512) "\01") - (data (i32.const 2520) "\02\00\00\00\10") - (data (i32.const 2536) "\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2552) "\02\00\00\00\14") - (data (i32.const 2568) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2592) "\02") - (data (i32.const 2608) "\02\00\00\00\14") - (data (i32.const 2624) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2648) "\02\00\00\00\14") - (data (i32.const 2664) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2688) "\02") - (data (i32.const 2704) "\02\00\00\00\14") - (data (i32.const 2720) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2744) "\02\00\00\00\14") - (data (i32.const 2760) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2784) "\02") - (data (i32.const 2800) "\02\00\00\00\14") - (data (i32.const 2816) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2840) "\02\00\00\00\14") - (data (i32.const 2856) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2880) "\02") - (data (i32.const 2896) "\02\00\00\00\14") - (data (i32.const 2912) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2936) "\02\00\00\00\14") - (data (i32.const 2952) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2976) "\02") - (data (i32.const 2992) "\02\00\00\00\14") - (data (i32.const 3008) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 3032) "\01\00\00\00\18") - (data (i32.const 3048) "~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") - (data (i32.const 3072) "\01\00\00\00\ac") - (data (i32.const 3088) "A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?") - (data (i32.const 3264) "\02\00\00\00 ") - (data (i32.const 3282) "\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") - (data (i32.const 3312) "\t\00\00\00\10") - (data (i32.const 3328) "\d0\0c\00\00\d0\0c\00\00 \00\00\00\08") - (data (i32.const 3344) "\02\00\00\00 ") - (data (i32.const 3362) "\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") - (data (i32.const 3392) "\02\00\00\00@") - (data (i32.const 3414) "\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?") - (data (i32.const 3454) "\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") - (data (i32.const 3472) "\n\00\00\00\10") - (data (i32.const 3488) "P\0d\00\00P\0d\00\00@\00\00\00\08") - (data (i32.const 3504) "\02\00\00\00@") - (data (i32.const 3526) "\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf") - (data (i32.const 3558) "\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") - (data (i32.const 3584) "\02\00\00\00\14") - (data (i32.const 3600) "\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02") - (data (i32.const 3624) "\04\00\00\00\10") - (data (i32.const 3640) "\10\0e\00\00\10\0e\00\00\14\00\00\00\05") - (data (i32.const 3656) "\02\00\00\00\14") - (data (i32.const 3672) "\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02") - (data (i32.const 3696) "\02\00\00\00\14") - (data (i32.const 3712) "\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02") - (data (i32.const 3736) "\08\00\00\00\10") - (data (i32.const 3752) "\80\0e\00\00\80\0e\00\00\14\00\00\00\05") - (data (i32.const 3768) "\02\00\00\00\14") - (data (i32.const 3788) "\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") - (data (i32.const 3808) "\02") - (data (i32.const 3824) "\04\00\00\00\10") - (data (i32.const 3840) "\f0\0e\00\00\f0\0e") - (data (i32.const 3856) "\02\00\00\00\04") - (data (i32.const 3872) "\01") - (data (i32.const 3880) "\04\00\00\00\10") - (data (i32.const 3896) " \0f\00\00 \0f\00\00\04\00\00\00\01") - (data (i32.const 3912) "\02\00\00\00\08") - (data (i32.const 3928) "\02\00\00\00\01") - (data (i32.const 3936) "\04\00\00\00\10") - (data (i32.const 3952) "X\0f\00\00X\0f\00\00\08\00\00\00\02") - (data (i32.const 3968) "\02\00\00\00\10") - (data (i32.const 3984) "\03\00\00\00\02\00\00\00\01") - (data (i32.const 4000) "\04\00\00\00\10") - (data (i32.const 4016) "\90\0f\00\00\90\0f\00\00\10\00\00\00\04") - (data (i32.const 4032) "\02\00\00\00\10") - (data (i32.const 4052) "\01\00\00\00\02\00\00\00\03") - (data (i32.const 4064) "\04\00\00\00\10") - (data (i32.const 4080) "\d0\0f\00\00\d0\0f\00\00\10\00\00\00\04") - (data (i32.const 4096) "\02\00\00\00\04") - (data (i32.const 4112) "\01") - (data (i32.const 4120) "\02\00\00\00\08") - (data (i32.const 4136) "\01\00\00\00\02") - (data (i32.const 4144) "\01\00\00\00\02") - (data (i32.const 4160) "a") - (data (i32.const 4168) "\01\00\00\00\02") - (data (i32.const 4184) "b") - (data (i32.const 4192) "\01\00\00\00\04") - (data (i32.const 4208) "a\00b") - (data (i32.const 4216) "\01\00\00\00\04") - (data (i32.const 4232) "b\00a") - (data (i32.const 4240) "\01") - (data (i32.const 4256) "\02\00\00\00\1c") - (data (i32.const 4272) "@\10\00\00X\10\00\00@\10\00\00p\10\00\00\88\10\00\00\a0\10") - (data (i32.const 4304) "\0e\00\00\00\10") - (data (i32.const 4320) "\b0\10\00\00\b0\10\00\00\1c\00\00\00\07") - (data (i32.const 4336) "\02\00\00\00\1c") - (data (i32.const 4352) "\a0\10\00\00@\10\00\00@\10\00\00p\10\00\00X\10\00\00\88\10") - (data (i32.const 4384) "\0e\00\00\00\10") - (data (i32.const 4401) "\11\00\00\00\11\00\00\1c\00\00\00\07") - (data (i32.const 4416) "\01\00\00\00\1c") - (data (i32.const 4432) "~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 64) "\01\00\00\00(") + (data (i32.const 80) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 120) "\01\00\00\00\06") + (data (i32.const 136) "a\00b\00c") + (data (i32.const 144) "\01\00\00\00\18") + (data (i32.const 160) "s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 184) "\02\00\00\00\05") + (data (i32.const 200) "\01\02\03\04\05") + (data (i32.const 208) "\07\00\00\00\10") + (data (i32.const 224) "\c8\00\00\00\c8\00\00\00\05\00\00\00\05") + (data (i32.const 240) "\02\00\00\00\05") + (data (i32.const 256) "\01\01\01\04\05") + (data (i32.const 264) "\01\00\00\00\1a") + (data (i32.const 280) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 312) "\02\00\00\00\05") + (data (i32.const 336) "\02\00\00\00\05") + (data (i32.const 352) "\01\01") + (data (i32.const 360) "\02\00\00\00\05") + (data (i32.const 376) "\01\01\00\02\02") + (data (i32.const 384) "\02\00\00\00\05") + (data (i32.const 400) "\01\01\00\02\02") + (data (i32.const 408) "\02\00\00\00\14") + (data (i32.const 424) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 448) "\08\00\00\00\10") + (data (i32.const 464) "\a8\01\00\00\a8\01\00\00\14\00\00\00\05") + (data (i32.const 480) "\02\00\00\00\14") + (data (i32.const 496) "\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") + (data (i32.const 520) "\02\00\00\00\14") + (data (i32.const 560) "\02\00\00\00\14") + (data (i32.const 576) "\01\00\00\00\01") + (data (i32.const 600) "\02\00\00\00\14") + (data (i32.const 616) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") + (data (i32.const 640) "\02\00\00\00\14") + (data (i32.const 656) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") + (data (i32.const 680) "\02") + (data (i32.const 696) "\02") + (data (i32.const 712) "\04\00\00\00\10") + (data (i32.const 728) "\c8\02\00\00\c8\02") + (data (i32.const 744) "\02\00\00\00\14") + (data (i32.const 760) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 784) "\02\00\00\00\14") + (data (i32.const 800) "\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 824) "\02\00\00\00\14") + (data (i32.const 840) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 864) "\02\00\00\00\14") + (data (i32.const 880) "\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05") + (data (i32.const 904) "\02\00\00\00\14") + (data (i32.const 920) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 944) "\02\00\00\00\14") + (data (i32.const 960) "\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") + (data (i32.const 984) "\02\00\00\00\14") + (data (i32.const 1000) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1024) "\02\00\00\00\14") + (data (i32.const 1040) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1064) "\02\00\00\00\14") + (data (i32.const 1080) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1104) "\02\00\00\00\14") + (data (i32.const 1120) "\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1144) "\02\00\00\00\14") + (data (i32.const 1160) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1184) "\02\00\00\00\14") + (data (i32.const 1200) "\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1224) "\02\00\00\00\14") + (data (i32.const 1240) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1264) "\02\00\00\00\14") + (data (i32.const 1280) "\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") + (data (i32.const 1304) "\02\00\00\00\14") + (data (i32.const 1320) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1344) "\02\00\00\00\14") + (data (i32.const 1360) "\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1384) "\02\00\00\00\14") + (data (i32.const 1400) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1424) "\02\00\00\00\14") + (data (i32.const 1440) "\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1464) "\02\00\00\00\14") + (data (i32.const 1480) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1504) "\02\00\00\00\14") + (data (i32.const 1520) "\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1544) "\02\00\00\00\14") + (data (i32.const 1560) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1584) "\02\00\00\00\14") + (data (i32.const 1600) "\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") + (data (i32.const 1624) "\02\00\00\00\14") + (data (i32.const 1640) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1664) "\02\00\00\00\14") + (data (i32.const 1680) "\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") + (data (i32.const 1704) "\02\00\00\00\14") + (data (i32.const 1720) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1744) "\04\00\00\00\10") + (data (i32.const 1760) "\b8\06\00\00\b8\06\00\00\14\00\00\00\05") + (data (i32.const 1776) "\02\00\00\00\14") + (data (i32.const 1792) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1816) "\02") + (data (i32.const 1832) "\02\00\00\00\14") + (data (i32.const 1848) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1872) "\02\00\00\00\0c") + (data (i32.const 1888) "\03\00\00\00\04\00\00\00\05") + (data (i32.const 1904) "\02\00\00\00\08") + (data (i32.const 1920) "\01\00\00\00\02") + (data (i32.const 1928) "\02\00\00\00\14") + (data (i32.const 1944) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1968) "\02\00\00\00\08") + (data (i32.const 1984) "\03\00\00\00\04") + (data (i32.const 1992) "\02\00\00\00\0c") + (data (i32.const 2008) "\01\00\00\00\02\00\00\00\05") + (data (i32.const 2024) "\02\00\00\00\14") + (data (i32.const 2040) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2064) "\02\00\00\00\04") + (data (i32.const 2080) "\01") + (data (i32.const 2088) "\02\00\00\00\10") + (data (i32.const 2104) "\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2120) "\02\00\00\00\14") + (data (i32.const 2136) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2160) "\02\00\00\00\04") + (data (i32.const 2176) "\05") + (data (i32.const 2184) "\02\00\00\00\10") + (data (i32.const 2200) "\01\00\00\00\02\00\00\00\03\00\00\00\04") + (data (i32.const 2216) "\02\00\00\00\14") + (data (i32.const 2232) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2256) "\02\00\00\00\08") + (data (i32.const 2272) "\04\00\00\00\05") + (data (i32.const 2280) "\02\00\00\00\0c") + (data (i32.const 2296) "\01\00\00\00\02\00\00\00\03") + (data (i32.const 2312) "\02\00\00\00\14") + (data (i32.const 2328) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2352) "\02\00\00\00\04") + (data (i32.const 2368) "\04") + (data (i32.const 2376) "\02\00\00\00\10") + (data (i32.const 2392) "\01\00\00\00\02\00\00\00\03\00\00\00\05") + (data (i32.const 2408) "\02\00\00\00\14") + (data (i32.const 2424) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2448) "\02\00\00\00\04") + (data (i32.const 2464) "\01") + (data (i32.const 2472) "\02\00\00\00\10") + (data (i32.const 2488) "\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2504) "\02\00\00\00\14") + (data (i32.const 2520) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2544) "\02") + (data (i32.const 2560) "\02\00\00\00\14") + (data (i32.const 2576) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2600) "\02\00\00\00\14") + (data (i32.const 2616) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2640) "\02") + (data (i32.const 2656) "\02\00\00\00\14") + (data (i32.const 2672) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2696) "\02\00\00\00\14") + (data (i32.const 2712) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2736) "\02") + (data (i32.const 2752) "\02\00\00\00\14") + (data (i32.const 2768) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2792) "\02\00\00\00\14") + (data (i32.const 2808) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2832) "\02") + (data (i32.const 2848) "\02\00\00\00\14") + (data (i32.const 2864) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2888) "\02\00\00\00\14") + (data (i32.const 2904) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2928) "\02") + (data (i32.const 2944) "\02\00\00\00\14") + (data (i32.const 2960) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2984) "\01\00\00\00\18") + (data (i32.const 3000) "~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") + (data (i32.const 3024) "\01\00\00\00\ac") + (data (i32.const 3040) "A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?") + (data (i32.const 3216) "\02\00\00\00 ") + (data (i32.const 3234) "\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") + (data (i32.const 3264) "\t\00\00\00\10") + (data (i32.const 3280) "\a0\0c\00\00\a0\0c\00\00 \00\00\00\08") + (data (i32.const 3296) "\02\00\00\00 ") + (data (i32.const 3314) "\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") + (data (i32.const 3344) "\02\00\00\00@") + (data (i32.const 3366) "\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?") + (data (i32.const 3406) "\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") + (data (i32.const 3424) "\n\00\00\00\10") + (data (i32.const 3440) " \0d\00\00 \0d\00\00@\00\00\00\08") + (data (i32.const 3456) "\02\00\00\00@") + (data (i32.const 3478) "\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf") + (data (i32.const 3510) "\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") + (data (i32.const 3536) "\02\00\00\00\14") + (data (i32.const 3552) "\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02") + (data (i32.const 3576) "\04\00\00\00\10") + (data (i32.const 3592) "\e0\0d\00\00\e0\0d\00\00\14\00\00\00\05") + (data (i32.const 3608) "\02\00\00\00\14") + (data (i32.const 3624) "\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02") + (data (i32.const 3648) "\02\00\00\00\14") + (data (i32.const 3664) "\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02") + (data (i32.const 3688) "\08\00\00\00\10") + (data (i32.const 3704) "P\0e\00\00P\0e\00\00\14\00\00\00\05") + (data (i32.const 3720) "\02\00\00\00\14") + (data (i32.const 3740) "\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") + (data (i32.const 3760) "\02") + (data (i32.const 3776) "\04\00\00\00\10") + (data (i32.const 3792) "\c0\0e\00\00\c0\0e") + (data (i32.const 3808) "\02\00\00\00\04") + (data (i32.const 3824) "\01") + (data (i32.const 3832) "\04\00\00\00\10") + (data (i32.const 3848) "\f0\0e\00\00\f0\0e\00\00\04\00\00\00\01") + (data (i32.const 3864) "\02\00\00\00\08") + (data (i32.const 3880) "\02\00\00\00\01") + (data (i32.const 3888) "\04\00\00\00\10") + (data (i32.const 3904) "(\0f\00\00(\0f\00\00\08\00\00\00\02") + (data (i32.const 3920) "\02\00\00\00\10") + (data (i32.const 3936) "\03\00\00\00\02\00\00\00\01") + (data (i32.const 3952) "\04\00\00\00\10") + (data (i32.const 3968) "`\0f\00\00`\0f\00\00\10\00\00\00\04") + (data (i32.const 3984) "\02\00\00\00\10") + (data (i32.const 4004) "\01\00\00\00\02\00\00\00\03") + (data (i32.const 4016) "\04\00\00\00\10") + (data (i32.const 4032) "\a0\0f\00\00\a0\0f\00\00\10\00\00\00\04") + (data (i32.const 4048) "\02\00\00\00\04") + (data (i32.const 4064) "\01") + (data (i32.const 4072) "\02\00\00\00\08") + (data (i32.const 4088) "\01\00\00\00\02") + (data (i32.const 4096) "\01\00\00\00\02") + (data (i32.const 4112) "a") + (data (i32.const 4120) "\01\00\00\00\02") + (data (i32.const 4136) "b") + (data (i32.const 4144) "\01\00\00\00\04") + (data (i32.const 4160) "a\00b") + (data (i32.const 4168) "\01\00\00\00\04") + (data (i32.const 4184) "b\00a") + (data (i32.const 4192) "\01") + (data (i32.const 4208) "\02\00\00\00\1c") + (data (i32.const 4224) "\10\10\00\00(\10\00\00\10\10\00\00@\10\00\00X\10\00\00p\10") + (data (i32.const 4256) "\0e\00\00\00\10") + (data (i32.const 4272) "\80\10\00\00\80\10\00\00\1c\00\00\00\07") + (data (i32.const 4288) "\02\00\00\00\1c") + (data (i32.const 4304) "p\10\00\00\10\10\00\00\10\10\00\00@\10\00\00(\10\00\00X\10") + (data (i32.const 4336) "\0e\00\00\00\10") + (data (i32.const 4352) "\d0\10\00\00\d0\10\00\00\1c\00\00\00\07") + (data (i32.const 4368) "\01\00\00\00\1c") + (data (i32.const 4384) "~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 4416) "\01\00\00\00\08") + (data (i32.const 4432) "n\00u\00l\00l") + (data (i32.const 4440) "\02\00\00\00\02") + (data (i32.const 4456) "\01") (data (i32.const 4464) "\01\00\00\00\08") - (data (i32.const 4480) "n\00u\00l\00l") - (data (i32.const 4488) "\02\00\00\00\02") - (data (i32.const 4504) "\01") - (data (i32.const 4512) "\01\00\00\00\08") - (data (i32.const 4528) "t\00r\00u\00e") - (data (i32.const 4536) "\01\00\00\00\n") - (data (i32.const 4552) "f\00a\00l\00s\00e") - (data (i32.const 4568) "\01\00\00\00\02") - (data (i32.const 4584) ",") - (data (i32.const 4592) "\02\00\00\00\02") - (data (i32.const 4608) "\01") - (data (i32.const 4616) "\01\00\00\00\14") - (data (i32.const 4632) "t\00r\00u\00e\00,\00f\00a\00l\00s\00e") - (data (i32.const 4656) "\02\00\00\00\0c") - (data (i32.const 4672) "\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 4688) "\01\00\00\00\02") - (data (i32.const 4704) "0") - (data (i32.const 4712) "\02\00\00\00\90\01") - (data (i32.const 4728) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 5128) "\08\00\00\00\10") - (data (i32.const 5144) "x\12\00\00x\12\00\00\90\01\00\00d") - (data (i32.const 5160) "\02\00\00\00\0c") - (data (i32.const 5176) "\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 5192) "\01\00\00\00\n") - (data (i32.const 5208) "1\00-\002\00-\003") - (data (i32.const 5224) "\02\00\00\00\0c") - (data (i32.const 5240) "\01\00\00\00\02\00\00\00\03") - (data (i32.const 5256) "\01\00\00\00\02") - (data (i32.const 5272) "-") - (data (i32.const 5280) "\02\00\00\00\0c") - (data (i32.const 5296) "\01\00\00\00\02\00\00\00\03") + (data (i32.const 4480) "t\00r\00u\00e") + (data (i32.const 4488) "\01\00\00\00\n") + (data (i32.const 4504) "f\00a\00l\00s\00e") + (data (i32.const 4520) "\01\00\00\00\02") + (data (i32.const 4536) ",") + (data (i32.const 4544) "\02\00\00\00\02") + (data (i32.const 4560) "\01") + (data (i32.const 4568) "\01\00\00\00\14") + (data (i32.const 4584) "t\00r\00u\00e\00,\00f\00a\00l\00s\00e") + (data (i32.const 4608) "\02\00\00\00\0c") + (data (i32.const 4624) "\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 4640) "\01\00\00\00\02") + (data (i32.const 4656) "0") + (data (i32.const 4664) "\02\00\00\00\90\01") + (data (i32.const 4680) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") + (data (i32.const 5080) "\08\00\00\00\10") + (data (i32.const 5096) "H\12\00\00H\12\00\00\90\01\00\00d") + (data (i32.const 5112) "\02\00\00\00\0c") + (data (i32.const 5128) "\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 5144) "\01\00\00\00\n") + (data (i32.const 5160) "1\00-\002\00-\003") + (data (i32.const 5176) "\02\00\00\00\0c") + (data (i32.const 5192) "\01\00\00\00\02\00\00\00\03") + (data (i32.const 5208) "\01\00\00\00\02") + (data (i32.const 5224) "-") + (data (i32.const 5232) "\02\00\00\00\0c") + (data (i32.const 5248) "\01\00\00\00\02\00\00\00\03") + (data (i32.const 5264) "\02\00\00\00\08") + (data (i32.const 5283) "\80\00\00\00\80") + (data (i32.const 5288) "\01\00\00\00\04") + (data (i32.const 5304) "_\00_") (data (i32.const 5312) "\02\00\00\00\08") (data (i32.const 5331) "\80\00\00\00\80") - (data (i32.const 5336) "\01\00\00\00\04") - (data (i32.const 5352) "_\00_") - (data (i32.const 5360) "\02\00\00\00\08") - (data (i32.const 5379) "\80\00\00\00\80") - (data (i32.const 5384) "\01\00\00\000") - (data (i32.const 5400) "-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 5448) "\02\00\00\000") - (data (i32.const 5478) "\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") - (data (i32.const 5512) "\01\00\00\00\04") - (data (i32.const 5528) ",\00 ") - (data (i32.const 5536) "\01\00\00\00\06") - (data (i32.const 5552) "0\00.\000") - (data (i32.const 5560) "\01\00\00\00\06") - (data (i32.const 5576) "N\00a\00N") - (data (i32.const 5584) "\01\00\00\00\12") - (data (i32.const 5600) "-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 5624) "\01\00\00\00\10") - (data (i32.const 5640) "I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 5656) "\02\00\00\00\b8\02") - (data (i32.const 5672) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/Null (mut i32) (i32.const 0)) - (global $std/array/arr8 (mut i32) (i32.const 216)) - (global $std/array/arr32 (mut i32) (i32.const 456)) + (global $std/array/arr8 (mut i32) (i32.const 224)) + (global $std/array/arr32 (mut i32) (i32.const 464)) (global $std/array/i (mut i32) (i32.const 0)) (global $std/array/other (mut i32) (i32.const 0)) (global $std/array/out (mut i32) (i32.const 0)) - (global $std/array/source (mut i32) (i32.const 776)) + (global $std/array/source (mut i32) (i32.const 728)) (global $std/array/cwArr (mut i32) (i32.const 0)) (global $std/array/includes (mut i32) (i32.const 0)) - (global $std/array/sarr (mut i32) (i32.const 1808)) + (global $std/array/sarr (mut i32) (i32.const 1760)) (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/every (mut i32) (i32.const 0)) (global $std/array/some (mut i32) (i32.const 0)) @@ -430,15 +428,15 @@ (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) (global $~lib/math/random_state0_32 (mut i32) (i32.const 0)) (global $~lib/math/random_state1_32 (mut i32) (i32.const 0)) - (global $std/array/f32ArrayTyped (mut i32) (i32.const 3328)) - (global $std/array/f64ArrayTyped (mut i32) (i32.const 3488)) - (global $std/array/i32ArrayTyped (mut i32) (i32.const 3640)) - (global $std/array/u32ArrayTyped (mut i32) (i32.const 3752)) - (global $std/array/reversed0 (mut i32) (i32.const 3840)) - (global $std/array/reversed1 (mut i32) (i32.const 3896)) - (global $std/array/reversed2 (mut i32) (i32.const 3952)) - (global $std/array/reversed4 (mut i32) (i32.const 4016)) - (global $std/array/expected4 (mut i32) (i32.const 4080)) + (global $std/array/f32ArrayTyped (mut i32) (i32.const 3280)) + (global $std/array/f64ArrayTyped (mut i32) (i32.const 3440)) + (global $std/array/i32ArrayTyped (mut i32) (i32.const 3592)) + (global $std/array/u32ArrayTyped (mut i32) (i32.const 3704)) + (global $std/array/reversed0 (mut i32) (i32.const 3792)) + (global $std/array/reversed1 (mut i32) (i32.const 3848)) + (global $std/array/reversed2 (mut i32) (i32.const 3904)) + (global $std/array/reversed4 (mut i32) (i32.const 3968)) + (global $std/array/expected4 (mut i32) (i32.const 4032)) (global $std/array/reversed64 (mut i32) (i32.const 0)) (global $std/array/reversed128 (mut i32) (i32.const 0)) (global $std/array/reversed1024 (mut i32) (i32.const 0)) @@ -448,8 +446,8 @@ (global $std/array/randomized257 (mut i32) (i32.const 0)) (global $std/array/reversedNested512 (mut i32) (i32.const 0)) (global $std/array/reversedElements512 (mut i32) (i32.const 0)) - (global $std/array/randomStringsActual (mut i32) (i32.const 4320)) - (global $std/array/randomStringsExpected (mut i32) (i32.const 4400)) + (global $std/array/randomStringsActual (mut i32) (i32.const 4272)) + (global $std/array/randomStringsExpected (mut i32) (i32.const 4352)) (global $std/array/randomStrings400 (mut i32) (i32.const 0)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) @@ -466,7 +464,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $std/array/main)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -529,7 +527,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -781,16 +779,16 @@ end end ) - (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 8116 + i32.const 8068 i32.le_u if i32.const 0 i32.const 80 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -804,8 +802,8 @@ if i32.const 0 i32.const 80 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -828,14 +826,14 @@ unreachable end local.get $0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $1 i32.const 0 local.get $0 call $~lib/memory/memory.fill local.get $1 i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/arraybuffer/ArrayBufferView#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 @@ -861,9 +859,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -892,9 +890,9 @@ (func $~lib/array/Array#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register i32.const 0 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor @@ -1146,17 +1144,17 @@ (local $4 i32) (local $5 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.get $2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $2 local.get $0 local.get $1 i32.shl local.tee $4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $1 local.set $5 local.get $2 @@ -1190,7 +1188,7 @@ i32.ge_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 99 i32.const 61 call $~lib/env/abort @@ -1330,7 +1328,7 @@ i32.ge_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 99 i32.const 61 call $~lib/env/abort @@ -1428,7 +1426,7 @@ i32.shl i32.const 0 local.get $0 - i32.const 8116 + i32.const 8068 i32.gt_u select local.get $3 @@ -1467,12 +1465,12 @@ i32.eq if local.get $0 - i32.const 8116 + i32.const 8068 i32.le_u if i32.const 0 - i32.const 688 - i32.const 74 + i32.const 80 + i32.const 88 i32.const 8 call $~lib/env/abort unreachable @@ -1513,7 +1511,7 @@ i32.gt_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 14 i32.const 64 call $~lib/env/abort @@ -1580,7 +1578,7 @@ i32.lt_s if i32.const 0 - i32.const 272 + i32.const 280 i32.const 309 i32.const 20 call $~lib/env/abort @@ -1848,7 +1846,7 @@ i32.lt_s if i32.const 0 - i32.const 272 + i32.const 280 i32.const 381 i32.const 20 call $~lib/env/abort @@ -2513,7 +2511,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 561 i32.const 4 call $~lib/env/abort @@ -2592,7 +2590,7 @@ i32.ge_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 99 i32.const 61 call $~lib/env/abort @@ -2944,7 +2942,7 @@ i64.eqz if i32.const 0 - i32.const 3048 + i32.const 3000 i32.const 1021 i32.const 4 call $~lib/env/abort @@ -3349,7 +3347,7 @@ i32.eqz if i32.const 0 - i32.const 272 + i32.const 280 i32.const 526 i32.const 4 call $~lib/env/abort @@ -3845,7 +3843,7 @@ i32.eqz if i32.const 0 - i32.const 272 + i32.const 280 i32.const 526 i32.const 4 call $~lib/env/abort @@ -3943,7 +3941,7 @@ i32.ge_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 99 i32.const 61 call $~lib/env/abort @@ -4364,7 +4362,7 @@ i32.eqz if i32.const 0 - i32.const 272 + i32.const 280 i32.const 526 i32.const 4 call $~lib/env/abort @@ -4447,7 +4445,7 @@ i32.gt_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 44 i32.const 62 call $~lib/env/abort @@ -4505,7 +4503,7 @@ i32.eqz if i32.const 0 - i32.const 3048 + i32.const 3000 i32.const 1030 i32.const 24 call $~lib/env/abort @@ -4625,7 +4623,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 813 i32.const 2 call $~lib/env/abort @@ -4670,7 +4668,7 @@ i32.gt_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 111 i32.const 38 call $~lib/env/abort @@ -4756,7 +4754,7 @@ i32.eqz if i32.const 0 - i32.const 272 + i32.const 280 i32.const 526 i32.const 4 call $~lib/env/abort @@ -4816,7 +4814,7 @@ i32.ge_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 96 i32.const 45 call $~lib/env/abort @@ -4830,7 +4828,7 @@ i32.ge_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 99 i32.const 61 call $~lib/env/abort @@ -4895,7 +4893,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 813 i32.const 2 call $~lib/env/abort @@ -4932,9 +4930,9 @@ i32.lt_s if i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 13 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $2 i32.const 511 local.get $0 @@ -5092,7 +5090,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 813 i32.const 2 call $~lib/env/abort @@ -5213,35 +5211,35 @@ (func $~lib/string/String#charAt (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 3076 + i32.const 3028 i32.load i32.const 1 i32.shr_u i32.ge_u if - i32.const 4256 + i32.const 4208 return end i32.const 2 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $1 local.get $0 i32.const 1 i32.shl - i32.const 3088 + i32.const 3040 i32.add i32.load16_u i32.store16 local.get $1 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/string/String#concat (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $1 - i32.const 4480 + i32.const 4432 local.get $1 select local.tee $3 @@ -5266,11 +5264,11 @@ local.tee $2 i32.eqz if - i32.const 4256 + i32.const 4208 return end local.get $2 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $2 local.get $0 local.get $1 @@ -5283,11 +5281,11 @@ call $~lib/memory/memory.copy local.get $2 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/string/String.__concat (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 4480 + i32.const 4432 local.get $0 select local.get $1 @@ -5296,7 +5294,7 @@ (func $std/array/createRandomString (; 118 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - i32.const 4256 + i32.const 4208 local.set $1 loop $repeat|0 local.get $2 @@ -5305,7 +5303,7 @@ if local.get $1 call $~lib/math/NativeMath.random - i32.const 3076 + i32.const 3028 i32.load i32.const 1 i32.shr_u @@ -5360,8 +5358,8 @@ i32.eqz if i32.const 0 - i32.const 4432 - i32.const 197 + i32.const 4384 + i32.const 203 i32.const 4 call $~lib/env/abort unreachable @@ -5412,7 +5410,7 @@ local.tee $3 i32.eqz if - i32.const 4256 + i32.const 4208 return end local.get $2 @@ -5437,7 +5435,7 @@ return end local.get $3 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $1 local.get $0 local.get $2 @@ -5446,17 +5444,17 @@ call $~lib/memory/memory.copy local.get $1 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) - (func $~lib/runtime/runtime.discard (; 121 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/util/runtime/discard (; 121 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 8116 + i32.const 8068 i32.le_u if i32.const 0 i32.const 80 - i32.const 68 - i32.const 6 + i32.const 114 + i32.const 4 call $~lib/env/abort unreachable end @@ -5469,8 +5467,8 @@ if i32.const 0 i32.const 80 - i32.const 70 - i32.const 6 + i32.const 116 + i32.const 4 call $~lib/env/abort unreachable end @@ -5492,7 +5490,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -5501,14 +5499,14 @@ local.get $1 i32.eqz if - i32.const 4528 - i32.const 4552 + i32.const 4480 + i32.const 4504 local.get $3 i32.load8_u select return end - i32.const 4572 + i32.const 4524 i32.load i32.const 1 i32.shr_u @@ -5522,7 +5520,7 @@ local.tee $7 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 i32.const 0 local.set $0 @@ -5547,8 +5545,8 @@ i32.shl local.get $2 i32.add - i32.const 4528 - i32.const 4552 + i32.const 4480 + i32.const 4504 local.get $8 select local.get $6 @@ -5566,7 +5564,7 @@ i32.shl local.get $2 i32.add - i32.const 4584 + i32.const 4536 local.get $4 i32.const 1 i32.shl @@ -5599,8 +5597,8 @@ i32.shl local.get $2 i32.add - i32.const 4528 - i32.const 4552 + i32.const 4480 + i32.const 4504 local.get $3 select local.get $1 @@ -5619,13 +5617,13 @@ call $~lib/string/String#substring local.set $0 local.get $2 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $0 return end local.get $2 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/number/decimalCount32 (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -5684,7 +5682,7 @@ (func $~lib/util/number/utoa32_lut (; 124 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - i32.const 5148 + i32.const 5100 i32.load local.set $3 loop $continue|0 @@ -5798,7 +5796,7 @@ local.get $0 i32.eqz if - i32.const 4704 + i32.const 4656 return end local.get $0 @@ -5818,7 +5816,7 @@ local.tee $3 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $2 local.get $0 local.get $3 @@ -5831,7 +5829,7 @@ end local.get $2 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/number/itoa_stream (; 126 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 @@ -5892,7 +5890,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -5922,7 +5920,7 @@ local.tee $7 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 i32.const 0 local.set $0 @@ -5987,13 +5985,13 @@ call $~lib/string/String#substring local.set $0 local.get $2 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $0 return end local.get $2 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -6006,7 +6004,7 @@ local.get $0 i32.eqz if - i32.const 4704 + i32.const 4656 return end local.get $0 @@ -6014,14 +6012,14 @@ local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $2 local.get $0 local.get $1 call $~lib/util/number/utoa32_lut local.get $2 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/number/itoa_stream (; 130 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 @@ -6062,7 +6060,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -6092,7 +6090,7 @@ local.tee $7 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 i32.const 0 local.set $0 @@ -6157,13 +6155,13 @@ call $~lib/string/String#substring local.set $0 local.get $2 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $0 return end local.get $2 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -6205,7 +6203,7 @@ local.tee $7 call $~lib/util/number/decimalCount32 local.set $4 - i32.const 6700 + i32.const 6652 i32.load local.set $13 loop $continue|0 @@ -6960,7 +6958,7 @@ i32.shl i32.sub global.set $~lib/util/number/_K - i32.const 6388 + i32.const 6340 i32.load local.get $3 i32.const 3 @@ -6968,7 +6966,7 @@ i32.add i64.load global.set $~lib/util/number/_frc_pow - i32.const 6612 + i32.const 6564 i32.load local.get $3 i32.const 1 @@ -7139,7 +7137,7 @@ f64.const 0 f64.eq if - i32.const 5552 + i32.const 5504 return end local.get $0 @@ -7152,11 +7150,11 @@ local.get $0 f64.ne if - i32.const 5576 + i32.const 5528 return end - i32.const 5600 - i32.const 5640 + i32.const 5552 + i32.const 5592 local.get $0 f64.const 0 f64.lt @@ -7164,7 +7162,7 @@ return end i32.const 56 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $2 local.get $0 call $~lib/util/number/dtoa_core @@ -7174,7 +7172,7 @@ call $~lib/string/String#substring local.set $1 local.get $2 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $1 ) (func $~lib/util/number/dtoa_stream (; 137 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) @@ -7231,8 +7229,8 @@ i32.add local.set $1 local.get $0 - i32.const 5600 - i32.const 5640 + i32.const 5552 + i32.const 5592 local.get $3 select local.get $1 @@ -7263,7 +7261,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -7277,7 +7275,7 @@ call $~lib/util/number/dtoa return end - i32.const 5516 + i32.const 5468 i32.load i32.const 1 i32.shr_u @@ -7291,7 +7289,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 i32.const 0 local.set $0 @@ -7319,7 +7317,7 @@ i32.shl local.get $1 i32.add - i32.const 5528 + i32.const 5480 local.get $4 i32.const 1 i32.shl @@ -7356,13 +7354,13 @@ call $~lib/string/String#substring local.set $0 local.get $1 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $0 return end local.get $1 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array<~lib/string/String>#join_str (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -7379,7 +7377,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -7444,7 +7442,7 @@ i32.add i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 i32.const 0 local.set $3 @@ -7532,7 +7530,7 @@ end local.get $2 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array<~lib/string/String>#join (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -7541,9 +7539,9 @@ ) (func $std/array/Ref#constructor (; 141 ;) (type $FUNCSIG$i) (result i32) i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 19 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array#join_ref (; 142 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -7560,7 +7558,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -7569,10 +7567,10 @@ local.get $2 i32.eqz if - i32.const 6976 + i32.const 6928 return end - i32.const 4572 + i32.const 4524 i32.load i32.const 1 i32.shr_u @@ -7586,7 +7584,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 i32.const 0 local.set $0 @@ -7607,7 +7605,7 @@ i32.shl local.get $1 i32.add - i32.const 6976 + i32.const 6928 i32.const 30 call $~lib/memory/memory.copy local.get $0 @@ -7622,7 +7620,7 @@ i32.shl local.get $1 i32.add - i32.const 4584 + i32.const 4536 local.get $3 i32.const 1 i32.shl @@ -7652,7 +7650,7 @@ i32.shl local.get $1 i32.add - i32.const 6976 + i32.const 6928 i32.const 30 call $~lib/memory/memory.copy local.get $0 @@ -7670,17 +7668,17 @@ call $~lib/string/String#substring local.set $0 local.get $1 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $0 return end local.get $1 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array#toString (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4584 + i32.const 4536 call $~lib/array/Array#join ) (func $~lib/util/number/itoa_stream (; 144 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -7753,7 +7751,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -7767,7 +7765,7 @@ call $~lib/util/number/itoa32 return end - i32.const 4572 + i32.const 4524 i32.load i32.const 1 i32.shr_u @@ -7781,7 +7779,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 i32.const 0 local.set $0 @@ -7807,7 +7805,7 @@ i32.shl local.get $1 i32.add - i32.const 4584 + i32.const 4536 local.get $4 i32.const 1 i32.shl @@ -7842,13 +7840,13 @@ call $~lib/string/String#substring local.set $0 local.get $1 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $0 return end local.get $1 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/number/itoa_stream (; 146 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 @@ -7895,7 +7893,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -7909,7 +7907,7 @@ call $~lib/util/number/utoa32 return end - i32.const 4572 + i32.const 4524 i32.load i32.const 1 i32.shr_u @@ -7923,7 +7921,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 i32.const 0 local.set $0 @@ -7951,7 +7949,7 @@ i32.shl local.get $1 i32.add - i32.const 4584 + i32.const 4536 local.get $4 i32.const 1 i32.shl @@ -7988,13 +7986,13 @@ call $~lib/string/String#substring local.set $0 local.get $1 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $0 return end local.get $1 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/number/decimalCount64 (; 148 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 @@ -8055,7 +8053,7 @@ (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 5148 + i32.const 5100 i32.load local.set $3 loop $continue|0 @@ -8154,7 +8152,7 @@ local.get $0 i64.eqz if - i32.const 4704 + i32.const 4656 return end local.get $0 @@ -8168,7 +8166,7 @@ local.tee $3 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $2 local.get $1 local.get $3 @@ -8179,7 +8177,7 @@ local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $2 local.get $0 local.get $1 @@ -8187,7 +8185,7 @@ end local.get $2 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/number/itoa_stream (; 151 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -8244,7 +8242,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -8258,7 +8256,7 @@ call $~lib/util/number/utoa64 return end - i32.const 4572 + i32.const 4524 i32.load i32.const 1 i32.shr_u @@ -8272,7 +8270,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 i32.const 0 local.set $0 @@ -8300,7 +8298,7 @@ i32.shl local.get $1 i32.add - i32.const 4584 + i32.const 4536 local.get $4 i32.const 1 i32.shl @@ -8337,13 +8335,13 @@ call $~lib/string/String#substring local.set $0 local.get $1 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $0 return end local.get $1 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/number/itoa64 (; 153 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) @@ -8353,7 +8351,7 @@ local.get $0 i64.eqz if - i32.const 4704 + i32.const 4656 return end block (result i32) @@ -8381,7 +8379,7 @@ local.tee $4 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $3 local.get $2 local.get $4 @@ -8394,7 +8392,7 @@ local.tee $2 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $3 local.get $0 local.get $2 @@ -8408,7 +8406,7 @@ end local.get $3 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/number/itoa_stream (; 154 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -8488,7 +8486,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -8502,7 +8500,7 @@ call $~lib/util/number/itoa64 return end - i32.const 4572 + i32.const 4524 i32.load i32.const 1 i32.shr_u @@ -8516,7 +8514,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 i32.const 0 local.set $0 @@ -8544,7 +8542,7 @@ i32.shl local.get $1 i32.add - i32.const 4584 + i32.const 4536 local.get $4 i32.const 1 i32.shl @@ -8581,17 +8579,17 @@ call $~lib/string/String#substring local.set $0 local.get $1 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $0 return end local.get $1 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array<~lib/string/String | null>#toString (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4584 + i32.const 4536 call $~lib/array/Array<~lib/string/String>#join ) (func $~lib/array/Array<~lib/array/Array>#join_arr (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -8608,12 +8606,12 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end - i32.const 4256 + i32.const 4208 local.set $1 - i32.const 4572 + i32.const 4524 i32.load i32.const 1 i32.shr_u @@ -8629,10 +8627,10 @@ local.tee $0 if (result i32) local.get $0 - i32.const 4584 + i32.const 4536 call $~lib/array/Array#join else - i32.const 4256 + i32.const 4208 end return end @@ -8653,7 +8651,7 @@ if local.get $1 local.get $5 - i32.const 4584 + i32.const 4536 call $~lib/array/Array#join call $~lib/string/String.__concat local.set $1 @@ -8661,7 +8659,7 @@ local.get $4 if local.get $1 - i32.const 4584 + i32.const 4536 call $~lib/string/String.__concat local.set $1 end @@ -8682,7 +8680,7 @@ if (result i32) local.get $1 local.get $0 - i32.const 4584 + i32.const 4536 call $~lib/array/Array#join call $~lib/string/String.__concat else @@ -8734,7 +8732,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -8748,7 +8746,7 @@ call $~lib/util/number/utoa32 return end - i32.const 4572 + i32.const 4524 i32.load i32.const 1 i32.shr_u @@ -8762,7 +8760,7 @@ local.tee $6 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 i32.const 0 local.set $0 @@ -8788,7 +8786,7 @@ i32.shl local.get $1 i32.add - i32.const 4584 + i32.const 4536 local.get $4 i32.const 1 i32.shl @@ -8823,13 +8821,13 @@ call $~lib/string/String#substring local.set $0 local.get $1 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $0 return end local.get $1 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array<~lib/array/Array>#join_arr (; 160 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -8845,12 +8843,12 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end - i32.const 4256 + i32.const 4208 local.set $1 - i32.const 4572 + i32.const 4524 i32.load i32.const 1 i32.shr_u @@ -8868,7 +8866,7 @@ local.get $0 call $~lib/array/Array#join_int else - i32.const 4256 + i32.const 4208 end return end @@ -8896,7 +8894,7 @@ local.get $4 if local.get $1 - i32.const 4584 + i32.const 4536 call $~lib/string/String.__concat local.set $1 end @@ -8937,12 +8935,12 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end - i32.const 4256 + i32.const 4208 local.set $1 - i32.const 4572 + i32.const 4524 i32.load i32.const 1 i32.shr_u @@ -8958,10 +8956,10 @@ local.tee $0 if (result i32) local.get $0 - i32.const 4584 + i32.const 4536 call $~lib/array/Array#join else - i32.const 4256 + i32.const 4208 end return end @@ -8982,7 +8980,7 @@ if local.get $1 local.get $5 - i32.const 4584 + i32.const 4536 call $~lib/array/Array#join call $~lib/string/String.__concat local.set $1 @@ -8990,7 +8988,7 @@ local.get $4 if local.get $1 - i32.const 4584 + i32.const 4536 call $~lib/string/String.__concat local.set $1 end @@ -9011,7 +9009,7 @@ if (result i32) local.get $1 local.get $0 - i32.const 4584 + i32.const 4536 call $~lib/array/Array#join call $~lib/string/String.__concat else @@ -9032,12 +9030,12 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end - i32.const 4256 + i32.const 4208 local.set $1 - i32.const 4572 + i32.const 4524 i32.load i32.const 1 i32.shr_u @@ -9055,7 +9053,7 @@ local.get $0 call $~lib/array/Array<~lib/array/Array>#join_arr else - i32.const 4256 + i32.const 4208 end return end @@ -9083,7 +9081,7 @@ local.get $4 if local.get $1 - i32.const 4584 + i32.const 4536 call $~lib/string/String.__concat local.set $1 end @@ -9114,7 +9112,7 @@ (local $0 i32) (local $1 i32) (local $2 i32) - i32.const 8120 + i32.const 8072 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -9123,7 +9121,7 @@ global.get $std/array/Null if i32.const 0 - i32.const 152 + i32.const 160 i32.const 39 i32.const 0 call $~lib/env/abort @@ -9136,21 +9134,21 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 40 i32.const 0 call $~lib/env/abort unreachable end i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register drop i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 6 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register i32.const 1 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor @@ -9164,13 +9162,13 @@ i32.const 5 i32.const 0 i32.const 7 - i32.const 248 + i32.const 256 call $~lib/runtime/runtime.newArray call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 51 i32.const 0 call $~lib/env/abort @@ -9185,13 +9183,13 @@ i32.const 5 i32.const 0 i32.const 7 - i32.const 320 + i32.const 328 call $~lib/runtime/runtime.newArray call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 54 i32.const 0 call $~lib/env/abort @@ -9206,13 +9204,13 @@ i32.const 5 i32.const 0 i32.const 7 - i32.const 344 + i32.const 352 call $~lib/runtime/runtime.newArray call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 57 i32.const 0 call $~lib/env/abort @@ -9227,13 +9225,13 @@ i32.const 5 i32.const 0 i32.const 7 - i32.const 368 + i32.const 376 call $~lib/runtime/runtime.newArray call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 60 i32.const 0 call $~lib/env/abort @@ -9248,13 +9246,13 @@ i32.const 5 i32.const 0 i32.const 7 - i32.const 392 + i32.const 400 call $~lib/runtime/runtime.newArray call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 63 i32.const 0 call $~lib/env/abort @@ -9269,14 +9267,14 @@ i32.const 5 i32.const 2 i32.const 8 - i32.const 488 + i32.const 496 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 68 i32.const 0 call $~lib/env/abort @@ -9291,14 +9289,14 @@ i32.const 5 i32.const 2 i32.const 8 - i32.const 528 + i32.const 536 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 71 i32.const 0 call $~lib/env/abort @@ -9313,14 +9311,14 @@ i32.const 5 i32.const 2 i32.const 8 - i32.const 568 + i32.const 576 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 74 i32.const 0 call $~lib/env/abort @@ -9335,14 +9333,14 @@ i32.const 5 i32.const 2 i32.const 8 - i32.const 608 + i32.const 616 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 77 i32.const 0 call $~lib/env/abort @@ -9357,14 +9355,14 @@ i32.const 5 i32.const 2 i32.const 8 - i32.const 648 + i32.const 656 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 80 i32.const 0 call $~lib/env/abort @@ -9374,7 +9372,7 @@ i32.load offset=12 if i32.const 0 - i32.const 152 + i32.const 160 i32.const 84 i32.const 0 call $~lib/env/abort @@ -9389,7 +9387,7 @@ i32.shr_s if i32.const 0 - i32.const 152 + i32.const 160 i32.const 85 i32.const 0 call $~lib/env/abort @@ -9405,7 +9403,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 89 i32.const 0 call $~lib/env/abort @@ -9417,7 +9415,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 90 i32.const 0 call $~lib/env/abort @@ -9434,7 +9432,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 91 i32.const 0 call $~lib/env/abort @@ -9448,7 +9446,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 95 i32.const 0 call $~lib/env/abort @@ -9458,7 +9456,7 @@ i32.load offset=12 if i32.const 0 - i32.const 152 + i32.const 160 i32.const 96 i32.const 0 call $~lib/env/abort @@ -9475,7 +9473,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 97 i32.const 0 call $~lib/env/abort @@ -9490,7 +9488,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 101 i32.const 0 call $~lib/env/abort @@ -9507,7 +9505,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 102 i32.const 0 call $~lib/env/abort @@ -9520,7 +9518,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 103 i32.const 0 call $~lib/env/abort @@ -9535,7 +9533,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 107 i32.const 0 call $~lib/env/abort @@ -9552,7 +9550,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 108 i32.const 0 call $~lib/env/abort @@ -9565,7 +9563,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 109 i32.const 0 call $~lib/env/abort @@ -9578,7 +9576,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 110 i32.const 0 call $~lib/env/abort @@ -9593,7 +9591,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 114 i32.const 0 call $~lib/env/abort @@ -9610,7 +9608,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 115 i32.const 0 call $~lib/env/abort @@ -9623,7 +9621,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 116 i32.const 0 call $~lib/env/abort @@ -9636,7 +9634,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 117 i32.const 0 call $~lib/env/abort @@ -9649,7 +9647,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 118 i32.const 0 call $~lib/env/abort @@ -9672,7 +9670,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 125 i32.const 0 call $~lib/env/abort @@ -9684,7 +9682,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 126 i32.const 0 call $~lib/env/abort @@ -9696,7 +9694,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 127 i32.const 0 call $~lib/env/abort @@ -9706,7 +9704,7 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 744 + i32.const 696 call $~lib/runtime/runtime.newArray call $~lib/array/Array#concat drop @@ -9721,7 +9719,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 130 i32.const 0 call $~lib/env/abort @@ -9734,7 +9732,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 132 i32.const 0 call $~lib/env/abort @@ -9747,7 +9745,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 133 i32.const 0 call $~lib/env/abort @@ -9760,7 +9758,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 134 i32.const 0 call $~lib/env/abort @@ -9787,7 +9785,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 141 i32.const 0 call $~lib/env/abort @@ -9799,7 +9797,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 142 i32.const 0 call $~lib/env/abort @@ -9811,7 +9809,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 143 i32.const 0 call $~lib/env/abort @@ -9824,7 +9822,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 144 i32.const 0 call $~lib/env/abort @@ -9837,7 +9835,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 145 i32.const 0 call $~lib/env/abort @@ -9850,7 +9848,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 146 i32.const 0 call $~lib/env/abort @@ -9863,7 +9861,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 147 i32.const 0 call $~lib/env/abort @@ -9876,7 +9874,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 148 i32.const 0 call $~lib/env/abort @@ -9891,7 +9889,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 151 i32.const 0 call $~lib/env/abort @@ -9907,7 +9905,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 154 i32.const 0 call $~lib/env/abort @@ -9920,7 +9918,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 155 i32.const 0 call $~lib/env/abort @@ -9930,7 +9928,7 @@ i32.load offset=12 if i32.const 0 - i32.const 152 + i32.const 160 i32.const 158 i32.const 0 call $~lib/env/abort @@ -9946,7 +9944,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 160 i32.const 0 call $~lib/env/abort @@ -9956,7 +9954,7 @@ i32.load offset=12 if i32.const 0 - i32.const 152 + i32.const 160 i32.const 161 i32.const 0 call $~lib/env/abort @@ -9965,7 +9963,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 808 + i32.const 760 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -9976,14 +9974,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 848 + i32.const 800 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 167 i32.const 0 call $~lib/env/abort @@ -9992,7 +9990,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 888 + i32.const 840 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10003,14 +10001,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 928 + i32.const 880 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 169 i32.const 0 call $~lib/env/abort @@ -10019,7 +10017,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 968 + i32.const 920 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10030,14 +10028,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1008 + i32.const 960 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 171 i32.const 0 call $~lib/env/abort @@ -10046,7 +10044,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1048 + i32.const 1000 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10057,14 +10055,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1088 + i32.const 1040 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 173 i32.const 0 call $~lib/env/abort @@ -10073,7 +10071,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1128 + i32.const 1080 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10084,14 +10082,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1168 + i32.const 1120 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 175 i32.const 0 call $~lib/env/abort @@ -10100,7 +10098,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1208 + i32.const 1160 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10111,14 +10109,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1248 + i32.const 1200 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 177 i32.const 0 call $~lib/env/abort @@ -10127,7 +10125,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1288 + i32.const 1240 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10138,14 +10136,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1328 + i32.const 1280 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 179 i32.const 0 call $~lib/env/abort @@ -10154,7 +10152,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1368 + i32.const 1320 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10165,14 +10163,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1408 + i32.const 1360 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 181 i32.const 0 call $~lib/env/abort @@ -10181,7 +10179,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1448 + i32.const 1400 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10192,14 +10190,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1488 + i32.const 1440 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 183 i32.const 0 call $~lib/env/abort @@ -10208,7 +10206,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1528 + i32.const 1480 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10219,14 +10217,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1568 + i32.const 1520 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 185 i32.const 0 call $~lib/env/abort @@ -10235,7 +10233,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1608 + i32.const 1560 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10246,14 +10244,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1648 + i32.const 1600 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 187 i32.const 0 call $~lib/env/abort @@ -10262,7 +10260,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1688 + i32.const 1640 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -10273,14 +10271,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1728 + i32.const 1680 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 189 i32.const 0 call $~lib/env/abort @@ -10295,7 +10293,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 195 i32.const 0 call $~lib/env/abort @@ -10312,7 +10310,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 196 i32.const 0 call $~lib/env/abort @@ -10325,7 +10323,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 197 i32.const 0 call $~lib/env/abort @@ -10338,7 +10336,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 198 i32.const 0 call $~lib/env/abort @@ -10351,7 +10349,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 199 i32.const 0 call $~lib/env/abort @@ -10364,7 +10362,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 200 i32.const 0 call $~lib/env/abort @@ -10379,7 +10377,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 204 i32.const 0 call $~lib/env/abort @@ -10396,7 +10394,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 205 i32.const 0 call $~lib/env/abort @@ -10409,7 +10407,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 206 i32.const 0 call $~lib/env/abort @@ -10422,7 +10420,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 207 i32.const 0 call $~lib/env/abort @@ -10435,7 +10433,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 208 i32.const 0 call $~lib/env/abort @@ -10448,7 +10446,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 209 i32.const 0 call $~lib/env/abort @@ -10461,7 +10459,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 210 i32.const 0 call $~lib/env/abort @@ -10475,7 +10473,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 216 i32.const 0 call $~lib/env/abort @@ -10487,7 +10485,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 217 i32.const 0 call $~lib/env/abort @@ -10504,7 +10502,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 218 i32.const 0 call $~lib/env/abort @@ -10517,7 +10515,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 219 i32.const 0 call $~lib/env/abort @@ -10530,7 +10528,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 220 i32.const 0 call $~lib/env/abort @@ -10543,7 +10541,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 221 i32.const 0 call $~lib/env/abort @@ -10556,7 +10554,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 222 i32.const 0 call $~lib/env/abort @@ -10570,7 +10568,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 226 i32.const 0 call $~lib/env/abort @@ -10582,7 +10580,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 227 i32.const 0 call $~lib/env/abort @@ -10599,7 +10597,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 228 i32.const 0 call $~lib/env/abort @@ -10612,7 +10610,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 229 i32.const 0 call $~lib/env/abort @@ -10625,7 +10623,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 230 i32.const 0 call $~lib/env/abort @@ -10638,7 +10636,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 231 i32.const 0 call $~lib/env/abort @@ -10652,7 +10650,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 237 i32.const 0 call $~lib/env/abort @@ -10669,7 +10667,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 238 i32.const 0 call $~lib/env/abort @@ -10682,7 +10680,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 239 i32.const 0 call $~lib/env/abort @@ -10695,7 +10693,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 240 i32.const 0 call $~lib/env/abort @@ -10708,7 +10706,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 241 i32.const 0 call $~lib/env/abort @@ -10728,7 +10726,7 @@ global.get $std/array/i if i32.const 0 - i32.const 152 + i32.const 160 i32.const 250 i32.const 0 call $~lib/env/abort @@ -10744,7 +10742,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 254 i32.const 0 call $~lib/env/abort @@ -10760,7 +10758,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 258 i32.const 0 call $~lib/env/abort @@ -10776,7 +10774,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 262 i32.const 0 call $~lib/env/abort @@ -10792,7 +10790,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 266 i32.const 0 call $~lib/env/abort @@ -10808,7 +10806,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 270 i32.const 0 call $~lib/env/abort @@ -10824,7 +10822,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 274 i32.const 0 call $~lib/env/abort @@ -10840,7 +10838,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 278 i32.const 0 call $~lib/env/abort @@ -10856,7 +10854,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 282 i32.const 0 call $~lib/env/abort @@ -10872,7 +10870,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 286 i32.const 0 call $~lib/env/abort @@ -10888,7 +10886,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 292 i32.const 0 call $~lib/env/abort @@ -10904,7 +10902,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 296 i32.const 0 call $~lib/env/abort @@ -10918,7 +10916,7 @@ global.get $std/array/includes if i32.const 0 - i32.const 152 + i32.const 160 i32.const 300 i32.const 0 call $~lib/env/abort @@ -10932,7 +10930,7 @@ global.get $std/array/includes if i32.const 0 - i32.const 152 + i32.const 160 i32.const 304 i32.const 0 call $~lib/env/abort @@ -10948,7 +10946,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 308 i32.const 0 call $~lib/env/abort @@ -10964,7 +10962,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 312 i32.const 0 call $~lib/env/abort @@ -10980,7 +10978,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 316 i32.const 0 call $~lib/env/abort @@ -10996,7 +10994,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 320 i32.const 0 call $~lib/env/abort @@ -11012,7 +11010,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 324 i32.const 0 call $~lib/env/abort @@ -11028,7 +11026,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 328 i32.const 0 call $~lib/env/abort @@ -11045,7 +11043,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 332 i32.const 0 call $~lib/env/abort @@ -11062,7 +11060,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 333 i32.const 0 call $~lib/env/abort @@ -11075,7 +11073,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 334 i32.const 0 call $~lib/env/abort @@ -11088,7 +11086,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 335 i32.const 0 call $~lib/env/abort @@ -11101,14 +11099,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1840 + i32.const 1792 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 340 i32.const 0 call $~lib/env/abort @@ -11118,14 +11116,14 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 1880 + i32.const 1832 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 341 i32.const 0 call $~lib/env/abort @@ -11134,7 +11132,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1896 + i32.const 1848 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -11144,14 +11142,14 @@ i32.const 3 i32.const 2 i32.const 4 - i32.const 1936 + i32.const 1888 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 344 i32.const 0 call $~lib/env/abort @@ -11161,14 +11159,14 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 1968 + i32.const 1920 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 345 i32.const 0 call $~lib/env/abort @@ -11177,7 +11175,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1992 + i32.const 1944 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -11187,14 +11185,14 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 2032 + i32.const 1984 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 348 i32.const 0 call $~lib/env/abort @@ -11204,14 +11202,14 @@ i32.const 3 i32.const 2 i32.const 4 - i32.const 2056 + i32.const 2008 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 349 i32.const 0 call $~lib/env/abort @@ -11220,7 +11218,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2088 + i32.const 2040 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -11230,14 +11228,14 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 2128 + i32.const 2080 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 352 i32.const 0 call $~lib/env/abort @@ -11247,14 +11245,14 @@ i32.const 4 i32.const 2 i32.const 4 - i32.const 2152 + i32.const 2104 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 353 i32.const 0 call $~lib/env/abort @@ -11263,7 +11261,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2184 + i32.const 2136 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -11273,14 +11271,14 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 2224 + i32.const 2176 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 356 i32.const 0 call $~lib/env/abort @@ -11290,14 +11288,14 @@ i32.const 4 i32.const 2 i32.const 4 - i32.const 2248 + i32.const 2200 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 357 i32.const 0 call $~lib/env/abort @@ -11306,7 +11304,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2280 + i32.const 2232 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -11316,14 +11314,14 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 2320 + i32.const 2272 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 360 i32.const 0 call $~lib/env/abort @@ -11333,14 +11331,14 @@ i32.const 3 i32.const 2 i32.const 4 - i32.const 2344 + i32.const 2296 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 361 i32.const 0 call $~lib/env/abort @@ -11349,7 +11347,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2376 + i32.const 2328 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -11359,14 +11357,14 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 2416 + i32.const 2368 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 364 i32.const 0 call $~lib/env/abort @@ -11376,14 +11374,14 @@ i32.const 4 i32.const 2 i32.const 4 - i32.const 2440 + i32.const 2392 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 365 i32.const 0 call $~lib/env/abort @@ -11392,7 +11390,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2472 + i32.const 2424 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -11402,14 +11400,14 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 2512 + i32.const 2464 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 368 i32.const 0 call $~lib/env/abort @@ -11419,14 +11417,14 @@ i32.const 4 i32.const 2 i32.const 4 - i32.const 2536 + i32.const 2488 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 369 i32.const 0 call $~lib/env/abort @@ -11435,7 +11433,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2568 + i32.const 2520 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -11445,14 +11443,14 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2608 + i32.const 2560 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 372 i32.const 0 call $~lib/env/abort @@ -11462,14 +11460,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2624 + i32.const 2576 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 373 i32.const 0 call $~lib/env/abort @@ -11478,7 +11476,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2664 + i32.const 2616 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -11488,14 +11486,14 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2704 + i32.const 2656 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 376 i32.const 0 call $~lib/env/abort @@ -11505,14 +11503,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2720 + i32.const 2672 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 377 i32.const 0 call $~lib/env/abort @@ -11521,7 +11519,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2760 + i32.const 2712 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -11531,14 +11529,14 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2800 + i32.const 2752 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 380 i32.const 0 call $~lib/env/abort @@ -11548,14 +11546,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2816 + i32.const 2768 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 381 i32.const 0 call $~lib/env/abort @@ -11564,7 +11562,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2856 + i32.const 2808 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -11574,14 +11572,14 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2896 + i32.const 2848 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 384 i32.const 0 call $~lib/env/abort @@ -11591,14 +11589,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2912 + i32.const 2864 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 385 i32.const 0 call $~lib/env/abort @@ -11607,7 +11605,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2952 + i32.const 2904 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -11617,14 +11615,14 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2992 + i32.const 2944 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 388 i32.const 0 call $~lib/env/abort @@ -11634,14 +11632,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 3008 + i32.const 2960 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 389 i32.const 0 call $~lib/env/abort @@ -11670,7 +11668,7 @@ global.get $std/array/i if i32.const 0 - i32.const 152 + i32.const 160 i32.const 399 i32.const 0 call $~lib/env/abort @@ -11685,7 +11683,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 402 i32.const 0 call $~lib/env/abort @@ -11700,7 +11698,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 405 i32.const 0 call $~lib/env/abort @@ -11715,7 +11713,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 413 i32.const 0 call $~lib/env/abort @@ -11727,7 +11725,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 414 i32.const 0 call $~lib/env/abort @@ -11742,7 +11740,7 @@ i32.eq if i32.const 0 - i32.const 152 + i32.const 160 i32.const 416 i32.const 0 call $~lib/env/abort @@ -11769,7 +11767,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 429 i32.const 0 call $~lib/env/abort @@ -11781,7 +11779,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 430 i32.const 0 call $~lib/env/abort @@ -11802,7 +11800,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 438 i32.const 0 call $~lib/env/abort @@ -11815,7 +11813,7 @@ global.get $std/array/every if i32.const 0 - i32.const 152 + i32.const 160 i32.const 441 i32.const 0 call $~lib/env/abort @@ -11830,7 +11828,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 449 i32.const 0 call $~lib/env/abort @@ -11842,7 +11840,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 450 i32.const 0 call $~lib/env/abort @@ -11855,7 +11853,7 @@ global.get $std/array/every if i32.const 0 - i32.const 152 + i32.const 160 i32.const 452 i32.const 0 call $~lib/env/abort @@ -11882,7 +11880,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 465 i32.const 0 call $~lib/env/abort @@ -11894,7 +11892,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 466 i32.const 0 call $~lib/env/abort @@ -11915,7 +11913,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 474 i32.const 0 call $~lib/env/abort @@ -11928,7 +11926,7 @@ global.get $std/array/some if i32.const 0 - i32.const 152 + i32.const 160 i32.const 477 i32.const 0 call $~lib/env/abort @@ -11941,7 +11939,7 @@ global.get $std/array/some if i32.const 0 - i32.const 152 + i32.const 160 i32.const 485 i32.const 0 call $~lib/env/abort @@ -11953,7 +11951,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 486 i32.const 0 call $~lib/env/abort @@ -11968,7 +11966,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 488 i32.const 0 call $~lib/env/abort @@ -11993,7 +11991,7 @@ global.get $std/array/some if i32.const 0 - i32.const 152 + i32.const 160 i32.const 501 i32.const 0 call $~lib/env/abort @@ -12005,7 +12003,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 502 i32.const 0 call $~lib/env/abort @@ -12027,7 +12025,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 511 i32.const 0 call $~lib/env/abort @@ -12043,7 +12041,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 520 i32.const 0 call $~lib/env/abort @@ -12055,7 +12053,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 521 i32.const 0 call $~lib/env/abort @@ -12071,7 +12069,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 524 i32.const 0 call $~lib/env/abort @@ -12099,7 +12097,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 538 i32.const 0 call $~lib/env/abort @@ -12111,7 +12109,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 539 i32.const 0 call $~lib/env/abort @@ -12132,7 +12130,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 564 i32.const 0 call $~lib/env/abort @@ -12174,7 +12172,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 575 i32.const 0 call $~lib/env/abort @@ -12190,7 +12188,7 @@ f32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 576 i32.const 0 call $~lib/env/abort @@ -12206,7 +12204,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 585 i32.const 0 call $~lib/env/abort @@ -12218,7 +12216,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 586 i32.const 0 call $~lib/env/abort @@ -12234,7 +12232,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 593 i32.const 0 call $~lib/env/abort @@ -12262,7 +12260,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 608 i32.const 0 call $~lib/env/abort @@ -12274,7 +12272,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 609 i32.const 0 call $~lib/env/abort @@ -12296,7 +12294,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 617 i32.const 0 call $~lib/env/abort @@ -12313,7 +12311,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 626 i32.const 0 call $~lib/env/abort @@ -12325,7 +12323,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 627 i32.const 0 call $~lib/env/abort @@ -12342,7 +12340,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 634 i32.const 0 call $~lib/env/abort @@ -12371,7 +12369,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 649 i32.const 0 call $~lib/env/abort @@ -12383,7 +12381,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 650 i32.const 0 call $~lib/env/abort @@ -12405,7 +12403,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 658 i32.const 0 call $~lib/env/abort @@ -12421,7 +12419,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 662 i32.const 0 call $~lib/env/abort @@ -12439,7 +12437,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 665 i32.const 0 call $~lib/env/abort @@ -12455,7 +12453,7 @@ global.get $std/array/boolVal if i32.const 0 - i32.const 152 + i32.const 160 i32.const 668 i32.const 0 call $~lib/env/abort @@ -12471,7 +12469,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 676 i32.const 0 call $~lib/env/abort @@ -12483,7 +12481,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 677 i32.const 0 call $~lib/env/abort @@ -12499,7 +12497,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 679 i32.const 0 call $~lib/env/abort @@ -12527,7 +12525,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 692 i32.const 0 call $~lib/env/abort @@ -12539,7 +12537,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 693 i32.const 0 call $~lib/env/abort @@ -12561,7 +12559,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 701 i32.const 0 call $~lib/env/abort @@ -12577,7 +12575,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 705 i32.const 0 call $~lib/env/abort @@ -12595,7 +12593,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 708 i32.const 0 call $~lib/env/abort @@ -12611,7 +12609,7 @@ global.get $std/array/boolVal if i32.const 0 - i32.const 152 + i32.const 160 i32.const 711 i32.const 0 call $~lib/env/abort @@ -12627,7 +12625,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 719 i32.const 0 call $~lib/env/abort @@ -12639,7 +12637,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 720 i32.const 0 call $~lib/env/abort @@ -12655,7 +12653,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 722 i32.const 0 call $~lib/env/abort @@ -12683,7 +12681,7 @@ i32.ne if i32.const 0 - i32.const 152 + i32.const 160 i32.const 735 i32.const 0 call $~lib/env/abort @@ -12693,7 +12691,7 @@ i32.load offset=12 if i32.const 0 - i32.const 152 + i32.const 160 i32.const 736 i32.const 0 call $~lib/env/abort @@ -12738,13 +12736,13 @@ i32.const 8 i32.const 2 i32.const 9 - i32.const 3360 + i32.const 3312 call $~lib/runtime/runtime.newArray call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 824 i32.const 0 call $~lib/env/abort @@ -12774,13 +12772,13 @@ i32.const 8 i32.const 3 i32.const 10 - i32.const 3520 + i32.const 3472 call $~lib/runtime/runtime.newArray call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 828 i32.const 0 call $~lib/env/abort @@ -12811,14 +12809,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 3672 + i32.const 3624 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 832 i32.const 0 call $~lib/env/abort @@ -12849,14 +12847,14 @@ i32.const 5 i32.const 2 i32.const 8 - i32.const 3784 + i32.const 3736 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 836 i32.const 0 call $~lib/env/abort @@ -12885,14 +12883,14 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 4112 + i32.const 4064 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 856 i32.const 0 call $~lib/env/abort @@ -12904,14 +12902,14 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 4136 + i32.const 4088 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 859 i32.const 0 call $~lib/env/abort @@ -12926,7 +12924,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 862 i32.const 0 call $~lib/env/abort @@ -12941,7 +12939,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 865 i32.const 0 call $~lib/env/abort @@ -12956,7 +12954,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 868 i32.const 0 call $~lib/env/abort @@ -12971,7 +12969,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 871 i32.const 0 call $~lib/env/abort @@ -12986,7 +12984,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 874 i32.const 0 call $~lib/env/abort @@ -13032,7 +13030,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 904 i32.const 0 call $~lib/env/abort @@ -13065,15 +13063,15 @@ i32.const 2 i32.const 0 i32.const 16 - i32.const 4608 + i32.const 4560 call $~lib/runtime/runtime.newArray call $~lib/array/Array#join_bool - i32.const 4632 + i32.const 4584 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 913 i32.const 0 call $~lib/env/abort @@ -13082,16 +13080,16 @@ i32.const 3 i32.const 2 i32.const 4 - i32.const 5176 + i32.const 5128 call $~lib/runtime/runtime.newArray - i32.const 4256 + i32.const 4208 call $~lib/array/Array#join - i32.const 5208 + i32.const 5160 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 914 i32.const 0 call $~lib/env/abort @@ -13100,16 +13098,16 @@ i32.const 3 i32.const 2 i32.const 8 - i32.const 5296 + i32.const 5248 call $~lib/runtime/runtime.newArray - i32.const 5272 + i32.const 5224 call $~lib/array/Array#join - i32.const 5208 + i32.const 5160 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 915 i32.const 0 call $~lib/env/abort @@ -13118,16 +13116,16 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 5376 + i32.const 5328 call $~lib/runtime/runtime.newArray - i32.const 5352 + i32.const 5304 call $~lib/array/Array#join - i32.const 5400 + i32.const 5352 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 916 i32.const 0 call $~lib/env/abort @@ -13136,15 +13134,15 @@ i32.const 6 i32.const 3 i32.const 10 - i32.const 6728 + i32.const 6680 call $~lib/runtime/runtime.newArray call $~lib/array/Array#join_flt - i32.const 6792 + i32.const 6744 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 917 i32.const 0 call $~lib/env/abort @@ -13153,16 +13151,16 @@ i32.const 3 i32.const 2 i32.const 15 - i32.const 6944 + i32.const 6896 call $~lib/runtime/runtime.newArray - i32.const 4256 + i32.const 4208 call $~lib/array/Array<~lib/string/String>#join - i32.const 6888 + i32.const 6840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 918 i32.const 0 call $~lib/env/abort @@ -13188,12 +13186,12 @@ global.set $std/array/refArr global.get $std/array/refArr call $~lib/array/Array#join_ref - i32.const 7024 + i32.const 6976 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 920 i32.const 0 call $~lib/env/abort @@ -13201,12 +13199,12 @@ end global.get $std/array/reversed0 call $~lib/array/Array#toString - i32.const 4256 + i32.const 4208 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 924 i32.const 0 call $~lib/env/abort @@ -13214,12 +13212,12 @@ end global.get $std/array/reversed1 call $~lib/array/Array#toString - i32.const 6888 + i32.const 6840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 925 i32.const 0 call $~lib/env/abort @@ -13227,12 +13225,12 @@ end global.get $std/array/reversed2 call $~lib/array/Array#toString - i32.const 7104 + i32.const 7056 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 926 i32.const 0 call $~lib/env/abort @@ -13240,12 +13238,12 @@ end global.get $std/array/reversed4 call $~lib/array/Array#toString - i32.const 7128 + i32.const 7080 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 927 i32.const 0 call $~lib/env/abort @@ -13254,15 +13252,15 @@ i32.const 3 i32.const 0 i32.const 21 - i32.const 7184 + i32.const 7136 call $~lib/runtime/runtime.newArray call $~lib/array/Array#join_int - i32.const 7208 + i32.const 7160 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 929 i32.const 0 call $~lib/env/abort @@ -13271,15 +13269,15 @@ i32.const 3 i32.const 1 i32.const 22 - i32.const 7264 + i32.const 7216 call $~lib/runtime/runtime.newArray call $~lib/array/Array#join_int - i32.const 7288 + i32.const 7240 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 930 i32.const 0 call $~lib/env/abort @@ -13288,15 +13286,15 @@ i32.const 3 i32.const 3 i32.const 17 - i32.const 7368 + i32.const 7320 call $~lib/runtime/runtime.newArray call $~lib/array/Array#join_int - i32.const 7408 + i32.const 7360 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 931 i32.const 0 call $~lib/env/abort @@ -13305,15 +13303,15 @@ i32.const 4 i32.const 3 i32.const 23 - i32.const 7520 + i32.const 7472 call $~lib/runtime/runtime.newArray call $~lib/array/Array#join_int - i32.const 7568 + i32.const 7520 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 932 i32.const 0 call $~lib/env/abort @@ -13321,12 +13319,12 @@ end global.get $std/array/randomStringsExpected call $~lib/array/Array<~lib/string/String | null>#toString - i32.const 7672 + i32.const 7624 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 933 i32.const 0 call $~lib/env/abort @@ -13335,15 +13333,15 @@ i32.const 4 i32.const 2 i32.const 15 - i32.const 7800 + i32.const 7752 call $~lib/runtime/runtime.newArray call $~lib/array/Array<~lib/string/String | null>#toString - i32.const 7832 + i32.const 7784 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 934 i32.const 0 call $~lib/env/abort @@ -13360,26 +13358,26 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 7888 + i32.const 7840 call $~lib/runtime/runtime.newArray i32.store local.get $1 i32.const 2 i32.const 2 i32.const 4 - i32.const 7912 + i32.const 7864 call $~lib/runtime/runtime.newArray i32.store offset=4 local.get $0 global.set $std/array/subarr32 global.get $std/array/subarr32 call $~lib/array/Array<~lib/array/Array>#join_arr - i32.const 7936 + i32.const 7888 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 937 i32.const 0 call $~lib/env/abort @@ -13396,26 +13394,26 @@ i32.const 2 i32.const 0 i32.const 7 - i32.const 7992 + i32.const 7944 call $~lib/runtime/runtime.newArray i32.store local.get $1 i32.const 2 i32.const 0 i32.const 7 - i32.const 8016 + i32.const 7968 call $~lib/runtime/runtime.newArray i32.store offset=4 local.get $0 global.set $std/array/subarr8 global.get $std/array/subarr8 call $~lib/array/Array<~lib/array/Array>#join_arr - i32.const 7936 + i32.const 7888 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 940 i32.const 0 call $~lib/env/abort @@ -13439,7 +13437,7 @@ i32.const 1 i32.const 2 i32.const 8 - i32.const 8112 + i32.const 8064 call $~lib/runtime/runtime.newArray i32.store local.get $1 @@ -13449,12 +13447,12 @@ global.set $std/array/subarrU32 global.get $std/array/subarrU32 call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr - i32.const 6888 + i32.const 6840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 943 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 2f923bf805..b277b396ff 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -30,198 +30,197 @@ (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) (memory $0 1) (data (i32.const 8) "\01\00\00\00&\00\00\00\00\00\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 64) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 112) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00") - (data (i32.const 136) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 176) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\02\03\04\05") - (data (i32.const 200) "\07\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c0\00\00\00\c0\00\00\00\05\00\00\00\05\00\00\00") - (data (i32.const 232) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\01\04\05") - (data (i32.const 256) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 304) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 328) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\00\00") - (data (i32.const 352) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") - (data (i32.const 376) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") - (data (i32.const 400) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 440) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a0\01\00\00\a0\01\00\00\14\00\00\00\05\00\00\00") - (data (i32.const 472) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 512) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 552) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 592) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") - (data (i32.const 632) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") - (data (i32.const 672) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 728) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 744) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 760) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\f8\02\00\00\f8\02\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 792) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 832) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 872) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 912) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 952) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 992) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00") - (data (i32.const 1032) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1072) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1112) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1152) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1192) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1232) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1272) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1312) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1352) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1392) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1432) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1472) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1512) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1552) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1592) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1632) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1672) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1712) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00") - (data (i32.const 1752) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1792) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\e8\06\00\00\e8\06\00\00\14\00\00\00\05\00\00\00") - (data (i32.const 1824) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1864) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1880) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1920) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1952) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 1976) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2016) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00") - (data (i32.const 2040) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\05\00\00\00") - (data (i32.const 2072) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2112) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") - (data (i32.const 2136) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2168) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2208) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00") - (data (i32.const 2232) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00") - (data (i32.const 2264) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2304) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2328) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") - (data (i32.const 2360) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2400) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00") - (data (i32.const 2424) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05\00\00\00") - (data (i32.const 2456) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2496) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") - (data (i32.const 2520) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2552) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2592) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2608) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2648) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2688) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2704) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2744) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2784) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2800) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2840) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2880) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2896) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2936) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2976) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2992) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 3032) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") - (data (i32.const 3072) "\01\00\00\00\ac\00\00\00\00\00\00\00\00\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?\00") - (data (i32.const 3264) "\02\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") - (data (i32.const 3312) "\t\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\d0\0c\00\00\d0\0c\00\00 \00\00\00\08\00\00\00") - (data (i32.const 3344) "\02\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") - (data (i32.const 3392) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") - (data (i32.const 3472) "\n\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00P\0d\00\00P\0d\00\00@\00\00\00\08\00\00\00") - (data (i32.const 3504) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") - (data (i32.const 3584) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02\00\00\00") - (data (i32.const 3624) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\10\0e\00\00\10\0e\00\00\14\00\00\00\05\00\00\00") - (data (i32.const 3656) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 3696) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02\00\00\00") - (data (i32.const 3736) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\80\0e\00\00\80\0e\00\00\14\00\00\00\05\00\00\00") - (data (i32.const 3768) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") - (data (i32.const 3808) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3824) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\f0\0e\00\00\f0\0e\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3856) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") - (data (i32.const 3880) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00 \0f\00\00 \0f\00\00\04\00\00\00\01\00\00\00") - (data (i32.const 3912) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\01\00\00\00") - (data (i32.const 3936) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00X\0f\00\00X\0f\00\00\08\00\00\00\02\00\00\00") - (data (i32.const 3968) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 4000) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\90\0f\00\00\90\0f\00\00\10\00\00\00\04\00\00\00") - (data (i32.const 4032) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") - (data (i32.const 4064) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\d0\0f\00\00\d0\0f\00\00\10\00\00\00\04\00\00\00") - (data (i32.const 4096) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") - (data (i32.const 4120) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 4144) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00a\00") - (data (i32.const 4168) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00b\00") - (data (i32.const 4192) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00a\00b\00") - (data (i32.const 4216) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00b\00a\00") - (data (i32.const 4240) "\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4256) "\02\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00@\10\00\00X\10\00\00@\10\00\00p\10\00\00\88\10\00\00\a0\10\00\00\00\00\00\00") - (data (i32.const 4304) "\0e\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\b0\10\00\00\b0\10\00\00\1c\00\00\00\07\00\00\00") - (data (i32.const 4336) "\02\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00\a0\10\00\00@\10\00\00@\10\00\00p\10\00\00X\10\00\00\88\10\00\00\00\00\00\00") - (data (i32.const 4384) "\0e\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\11\00\00\1c\00\00\00\07\00\00\00") - (data (i32.const 4416) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 4464) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00n\00u\00l\00l\00") - (data (i32.const 4488) "\02\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\01\00") - (data (i32.const 4512) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00t\00r\00u\00e\00") - (data (i32.const 4536) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00f\00a\00l\00s\00e\00") - (data (i32.const 4568) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00,\00") - (data (i32.const 4592) "\02\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\01\00") - (data (i32.const 4616) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e\00") - (data (i32.const 4656) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 4688) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\000\00") - (data (i32.const 4712) "\02\00\00\00\90\01\00\00\00\00\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") - (data (i32.const 5128) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00x\12\00\00x\12\00\00\90\01\00\00d\00\00\00") - (data (i32.const 5160) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 5192) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\001\00-\002\00-\003\00") - (data (i32.const 5224) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") - (data (i32.const 5256) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00-\00") - (data (i32.const 5280) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 64) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 120) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00") + (data (i32.const 144) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 184) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\02\03\04\05") + (data (i32.const 208) "\07\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c8\00\00\00\c8\00\00\00\05\00\00\00\05\00\00\00") + (data (i32.const 240) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\01\04\05") + (data (i32.const 264) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 312) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 336) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\00\00") + (data (i32.const 360) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") + (data (i32.const 384) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") + (data (i32.const 408) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 448) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a8\01\00\00\a8\01\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 480) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 520) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 560) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 600) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") + (data (i32.const 640) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") + (data (i32.const 680) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 696) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 712) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c8\02\00\00\c8\02\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 744) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 784) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 824) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 864) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 904) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 944) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00") + (data (i32.const 984) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1024) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1064) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1104) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1144) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1184) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1224) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1264) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1304) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1344) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1384) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1424) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1464) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1504) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1544) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1584) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1624) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1664) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00") + (data (i32.const 1704) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1744) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\b8\06\00\00\b8\06\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 1776) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1816) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1832) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1872) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1904) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 1928) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1968) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00") + (data (i32.const 1992) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\05\00\00\00") + (data (i32.const 2024) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2064) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") + (data (i32.const 2088) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2120) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2160) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00") + (data (i32.const 2184) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00") + (data (i32.const 2216) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2256) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2280) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 2312) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2352) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00") + (data (i32.const 2376) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05\00\00\00") + (data (i32.const 2408) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2448) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") + (data (i32.const 2472) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2504) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2544) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2560) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2600) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2640) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2656) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2696) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2736) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2752) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2792) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2832) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2848) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2888) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2928) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2944) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2984) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") + (data (i32.const 3024) "\01\00\00\00\ac\00\00\00\00\00\00\00\00\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?\00") + (data (i32.const 3216) "\02\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") + (data (i32.const 3264) "\t\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a0\0c\00\00\a0\0c\00\00 \00\00\00\08\00\00\00") + (data (i32.const 3296) "\02\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") + (data (i32.const 3344) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") + (data (i32.const 3424) "\n\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00 \0d\00\00 \0d\00\00@\00\00\00\08\00\00\00") + (data (i32.const 3456) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") + (data (i32.const 3536) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02\00\00\00") + (data (i32.const 3576) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\e0\0d\00\00\e0\0d\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 3608) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 3648) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02\00\00\00") + (data (i32.const 3688) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00P\0e\00\00P\0e\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 3720) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") + (data (i32.const 3760) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 3776) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c0\0e\00\00\c0\0e\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 3808) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") + (data (i32.const 3832) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\f0\0e\00\00\f0\0e\00\00\04\00\00\00\01\00\00\00") + (data (i32.const 3864) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\01\00\00\00") + (data (i32.const 3888) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00(\0f\00\00(\0f\00\00\08\00\00\00\02\00\00\00") + (data (i32.const 3920) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01\00\00\00\00\00\00\00") + (data (i32.const 3952) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00`\0f\00\00`\0f\00\00\10\00\00\00\04\00\00\00") + (data (i32.const 3984) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 4016) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a0\0f\00\00\a0\0f\00\00\10\00\00\00\04\00\00\00") + (data (i32.const 4048) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") + (data (i32.const 4072) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 4096) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00a\00") + (data (i32.const 4120) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00b\00") + (data (i32.const 4144) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00a\00b\00") + (data (i32.const 4168) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00b\00a\00") + (data (i32.const 4192) "\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 4208) "\02\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00\10\10\00\00(\10\00\00\10\10\00\00@\10\00\00X\10\00\00p\10\00\00\00\00\00\00") + (data (i32.const 4256) "\0e\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\80\10\00\00\80\10\00\00\1c\00\00\00\07\00\00\00") + (data (i32.const 4288) "\02\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00p\10\00\00\10\10\00\00\10\10\00\00@\10\00\00(\10\00\00X\10\00\00\00\00\00\00") + (data (i32.const 4336) "\0e\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\d0\10\00\00\d0\10\00\00\1c\00\00\00\07\00\00\00") + (data (i32.const 4368) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 4416) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00n\00u\00l\00l\00") + (data (i32.const 4440) "\02\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\01\00") + (data (i32.const 4464) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00t\00r\00u\00e\00") + (data (i32.const 4488) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00f\00a\00l\00s\00e\00") + (data (i32.const 4520) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00,\00") + (data (i32.const 4544) "\02\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\01\00") + (data (i32.const 4568) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e\00") + (data (i32.const 4608) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 4640) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\000\00") + (data (i32.const 4664) "\02\00\00\00\90\01\00\00\00\00\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") + (data (i32.const 5080) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00H\12\00\00H\12\00\00\90\01\00\00d\00\00\00") + (data (i32.const 5112) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 5144) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\001\00-\002\00-\003\00") + (data (i32.const 5176) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 5208) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00-\00") + (data (i32.const 5232) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 5264) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\00\00\00\80") + (data (i32.const 5288) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00_\00_\00") (data (i32.const 5312) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\00\00\00\80") - (data (i32.const 5336) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00_\00_\00") - (data (i32.const 5360) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\00\00\00\80") - (data (i32.const 5384) "\01\00\00\000\00\00\00\00\00\00\00\00\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 5448) "\02\00\00\000\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") - (data (i32.const 5512) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00,\00 \00") - (data (i32.const 5536) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\000\00.\000\00") - (data (i32.const 5560) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00N\00a\00N\00") - (data (i32.const 5584) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 5624) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 5656) "\02\00\00\00\b8\02\00\00\00\00\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -233,17 +232,17 @@ (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/num (mut i32) (i32.const 1)) (global $std/array/Null (mut i32) (i32.const 0)) - (global $std/array/str (mut i32) (i32.const 128)) - (global $std/array/arr8 (mut i32) (i32.const 216)) + (global $std/array/str (mut i32) (i32.const 136)) + (global $std/array/arr8 (mut i32) (i32.const 224)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) - (global $std/array/arr32 (mut i32) (i32.const 456)) + (global $std/array/arr32 (mut i32) (i32.const 464)) (global $std/array/i (mut i32) (i32.const 0)) (global $std/array/other (mut i32) (i32.const 0)) (global $std/array/out (mut i32) (i32.const 0)) - (global $std/array/source (mut i32) (i32.const 776)) + (global $std/array/source (mut i32) (i32.const 728)) (global $std/array/cwArr (mut i32) (i32.const 0)) (global $std/array/includes (mut i32) (i32.const 0)) - (global $std/array/sarr (mut i32) (i32.const 1808)) + (global $std/array/sarr (mut i32) (i32.const 1760)) (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/every (mut i32) (i32.const 0)) (global $std/array/some (mut i32) (i32.const 0)) @@ -255,16 +254,16 @@ (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) (global $~lib/math/random_state0_32 (mut i32) (i32.const 0)) (global $~lib/math/random_state1_32 (mut i32) (i32.const 0)) - (global $std/array/charset i32 (i32.const 3088)) - (global $std/array/f32ArrayTyped (mut i32) (i32.const 3328)) - (global $std/array/f64ArrayTyped (mut i32) (i32.const 3488)) - (global $std/array/i32ArrayTyped (mut i32) (i32.const 3640)) - (global $std/array/u32ArrayTyped (mut i32) (i32.const 3752)) - (global $std/array/reversed0 (mut i32) (i32.const 3840)) - (global $std/array/reversed1 (mut i32) (i32.const 3896)) - (global $std/array/reversed2 (mut i32) (i32.const 3952)) - (global $std/array/reversed4 (mut i32) (i32.const 4016)) - (global $std/array/expected4 (mut i32) (i32.const 4080)) + (global $std/array/charset i32 (i32.const 3040)) + (global $std/array/f32ArrayTyped (mut i32) (i32.const 3280)) + (global $std/array/f64ArrayTyped (mut i32) (i32.const 3440)) + (global $std/array/i32ArrayTyped (mut i32) (i32.const 3592)) + (global $std/array/u32ArrayTyped (mut i32) (i32.const 3704)) + (global $std/array/reversed0 (mut i32) (i32.const 3792)) + (global $std/array/reversed1 (mut i32) (i32.const 3848)) + (global $std/array/reversed2 (mut i32) (i32.const 3904)) + (global $std/array/reversed4 (mut i32) (i32.const 3968)) + (global $std/array/expected4 (mut i32) (i32.const 4032)) (global $std/array/reversed64 (mut i32) (i32.const 0)) (global $std/array/reversed128 (mut i32) (i32.const 0)) (global $std/array/reversed1024 (mut i32) (i32.const 0)) @@ -274,8 +273,8 @@ (global $std/array/randomized257 (mut i32) (i32.const 0)) (global $std/array/reversedNested512 (mut i32) (i32.const 0)) (global $std/array/reversedElements512 (mut i32) (i32.const 0)) - (global $std/array/randomStringsActual (mut i32) (i32.const 4320)) - (global $std/array/randomStringsExpected (mut i32) (i32.const 4400)) + (global $std/array/randomStringsActual (mut i32) (i32.const 4272)) + (global $std/array/randomStringsExpected (mut i32) (i32.const 4352)) (global $std/array/randomStrings400 (mut i32) (i32.const 0)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) @@ -292,12 +291,12 @@ (global $std/array/subarr8 (mut i32) (i32.const 0)) (global $std/array/subarrU32 (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8116)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 8068)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $std/array/main)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 @@ -394,7 +393,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -676,7 +675,7 @@ (func $~lib/collector/dummy/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/runtime.register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -685,8 +684,8 @@ if i32.const 0 i32.const 80 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -702,8 +701,8 @@ if i32.const 0 i32.const 80 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -728,7 +727,7 @@ unreachable end local.get $1 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 local.get $2 i32.const 0 @@ -736,7 +735,7 @@ call $~lib/memory/memory.fill local.get $2 i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/collector/dummy/__ref_link (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop @@ -774,9 +773,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -826,9 +825,9 @@ local.get $0 else i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end local.get $1 i32.const 2 @@ -867,9 +866,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -890,9 +889,9 @@ local.get $0 else i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 6 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end local.get $1 i32.const 0 @@ -1223,18 +1222,18 @@ (local $8 i32) (local $9 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.get $2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $4 local.get $0 local.get $1 i32.shl local.set $5 local.get $5 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $6 local.get $4 local.tee $7 @@ -1299,7 +1298,7 @@ i32.ge_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 99 i32.const 61 call $~lib/env/abort @@ -1472,7 +1471,7 @@ i32.ge_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 99 i32.const 61 call $~lib/env/abort @@ -1634,8 +1633,8 @@ i32.eqz if i32.const 0 - i32.const 688 - i32.const 74 + i32.const 80 + i32.const 88 i32.const 8 call $~lib/env/abort unreachable @@ -1689,7 +1688,7 @@ i32.gt_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 14 i32.const 64 call $~lib/env/abort @@ -1787,7 +1786,7 @@ i32.ge_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 99 i32.const 61 call $~lib/env/abort @@ -1808,7 +1807,7 @@ i32.lt_s if i32.const 0 - i32.const 272 + i32.const 280 i32.const 309 i32.const 20 call $~lib/env/abort @@ -2169,7 +2168,7 @@ i32.lt_s if i32.const 0 - i32.const 272 + i32.const 280 i32.const 381 i32.const 20 call $~lib/env/abort @@ -2953,7 +2952,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 561 i32.const 4 call $~lib/env/abort @@ -3059,7 +3058,7 @@ i32.ge_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 99 i32.const 61 call $~lib/env/abort @@ -3667,7 +3666,7 @@ i64.eqz if i32.const 0 - i32.const 3048 + i32.const 3000 i32.const 1021 i32.const 4 call $~lib/env/abort @@ -4099,7 +4098,7 @@ i32.eqz if i32.const 0 - i32.const 272 + i32.const 280 i32.const 526 i32.const 4 call $~lib/env/abort @@ -4709,7 +4708,7 @@ i32.eqz if i32.const 0 - i32.const 272 + i32.const 280 i32.const 526 i32.const 4 call $~lib/env/abort @@ -4857,7 +4856,7 @@ i32.ge_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 99 i32.const 61 call $~lib/env/abort @@ -5349,7 +5348,7 @@ i32.eqz if i32.const 0 - i32.const 272 + i32.const 280 i32.const 526 i32.const 4 call $~lib/env/abort @@ -5853,7 +5852,7 @@ i32.eqz if i32.const 0 - i32.const 272 + i32.const 280 i32.const 526 i32.const 4 call $~lib/env/abort @@ -5964,7 +5963,7 @@ i32.gt_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 44 i32.const 62 call $~lib/env/abort @@ -6029,7 +6028,7 @@ i32.eqz if i32.const 0 - i32.const 3048 + i32.const 3000 i32.const 1030 i32.const 24 call $~lib/env/abort @@ -6174,7 +6173,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 813 i32.const 2 call $~lib/env/abort @@ -6218,7 +6217,7 @@ i32.gt_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 44 i32.const 62 call $~lib/env/abort @@ -6284,7 +6283,7 @@ i32.gt_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 111 i32.const 38 call $~lib/env/abort @@ -6470,7 +6469,7 @@ i32.eqz if i32.const 0 - i32.const 272 + i32.const 280 i32.const 526 i32.const 4 call $~lib/env/abort @@ -6554,7 +6553,7 @@ i32.ge_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 96 i32.const 45 call $~lib/env/abort @@ -6568,7 +6567,7 @@ i32.ge_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 99 i32.const 61 call $~lib/env/abort @@ -6635,7 +6634,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 813 i32.const 2 call $~lib/env/abort @@ -6651,7 +6650,7 @@ i32.gt_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 44 i32.const 62 call $~lib/env/abort @@ -6679,9 +6678,9 @@ i32.eqz if i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 13 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -6732,7 +6731,7 @@ i32.gt_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 111 i32.const 38 call $~lib/env/abort @@ -6908,7 +6907,7 @@ i32.eqz if i32.const 0 - i32.const 272 + i32.const 280 i32.const 526 i32.const 4 call $~lib/env/abort @@ -6992,7 +6991,7 @@ i32.ge_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 96 i32.const 45 call $~lib/env/abort @@ -7006,7 +7005,7 @@ i32.ge_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 99 i32.const 61 call $~lib/env/abort @@ -7073,7 +7072,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 813 i32.const 2 call $~lib/env/abort @@ -7186,7 +7185,7 @@ i32.eqz if i32.const 0 - i32.const 272 + i32.const 280 i32.const 526 i32.const 4 call $~lib/env/abort @@ -7272,7 +7271,7 @@ i32.ge_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 99 i32.const 61 call $~lib/env/abort @@ -7339,7 +7338,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 813 i32.const 2 call $~lib/env/abort @@ -7615,7 +7614,7 @@ i32.gt_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 44 i32.const 62 call $~lib/env/abort @@ -7646,8 +7645,8 @@ i32.eqz if i32.const 0 - i32.const 4432 - i32.const 41 + i32.const 4384 + i32.const 47 i32.const 4 call $~lib/env/abort unreachable @@ -7657,11 +7656,11 @@ call $~lib/string/String#get:length i32.ge_u if - i32.const 4256 + i32.const 4208 return end i32.const 2 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 local.get $2 local.get $0 @@ -7673,7 +7672,7 @@ i32.store16 local.get $2 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/string/String#concat (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -7684,7 +7683,7 @@ i32.const 0 i32.eq if - i32.const 4480 + i32.const 4432 local.set $1 end local.get $0 @@ -7705,11 +7704,11 @@ i32.const 0 i32.eq if - i32.const 4256 + i32.const 4208 return end local.get $4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $5 local.get $5 local.get $0 @@ -7723,11 +7722,11 @@ call $~lib/memory/memory.copy local.get $5 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/string/String.__concat (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 4480 + i32.const 4432 local.get $0 i32.const 0 i32.ne @@ -7739,7 +7738,7 @@ (local $1 i32) (local $2 i32) (local $3 f64) - i32.const 4256 + i32.const 4208 local.set $1 block $break|0 i32.const 0 @@ -7820,7 +7819,7 @@ i32.gt_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 111 i32.const 38 call $~lib/env/abort @@ -7987,7 +7986,7 @@ i32.eqz if i32.const 0 - i32.const 272 + i32.const 280 i32.const 526 i32.const 4 call $~lib/env/abort @@ -8071,7 +8070,7 @@ i32.ge_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 96 i32.const 45 call $~lib/env/abort @@ -8085,7 +8084,7 @@ i32.ge_u if i32.const 0 - i32.const 272 + i32.const 280 i32.const 99 i32.const 61 call $~lib/env/abort @@ -8152,7 +8151,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 813 i32.const 2 call $~lib/env/abort @@ -8268,8 +8267,8 @@ i32.eqz if i32.const 0 - i32.const 4432 - i32.const 197 + i32.const 4384 + i32.const 203 i32.const 4 call $~lib/env/abort unreachable @@ -8338,7 +8337,7 @@ local.get $3 i32.eqz if - i32.const 4256 + i32.const 4208 return end local.get $8 @@ -8359,7 +8358,7 @@ return end local.get $3 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $10 local.get $10 local.get $0 @@ -8369,9 +8368,9 @@ call $~lib/memory/memory.copy local.get $10 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) - (func $~lib/runtime/runtime.discard (; 212 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/util/runtime/discard (; 212 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -8380,8 +8379,8 @@ if i32.const 0 i32.const 80 - i32.const 68 - i32.const 6 + i32.const 114 + i32.const 4 call $~lib/env/abort unreachable end @@ -8397,8 +8396,8 @@ if i32.const 0 i32.const 80 - i32.const 70 - i32.const 6 + i32.const 116 + i32.const 4 call $~lib/env/abort unreachable end @@ -8424,7 +8423,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -8433,8 +8432,8 @@ local.get $2 i32.eqz if - i32.const 4528 - i32.const 4552 + i32.const 4480 + i32.const 4504 local.get $3 i32.load8_u i32.const 0 @@ -8458,7 +8457,7 @@ local.get $6 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $7 i32.const 0 local.set $8 @@ -8489,8 +8488,8 @@ i32.const 1 i32.shl i32.add - i32.const 4528 - i32.const 4552 + i32.const 4480 + i32.const 4504 local.get $9 i32.const 0 i32.ne @@ -8547,8 +8546,8 @@ i32.const 1 i32.shl i32.add - i32.const 4528 - i32.const 4552 + i32.const 4480 + i32.const 4504 local.get $9 i32.const 0 i32.ne @@ -8571,13 +8570,13 @@ call $~lib/string/String#substring local.set $10 local.get $7 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $10 return end local.get $7 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -8662,7 +8661,7 @@ (local $7 i32) (local $8 i64) (local $9 i64) - i32.const 5144 + i32.const 5096 i32.load offset=4 local.set $3 block $break|0 @@ -8807,7 +8806,7 @@ local.get $0 i32.eqz if - i32.const 4704 + i32.const 4656 return end local.get $0 @@ -8829,7 +8828,7 @@ local.get $2 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $3 block $~lib/util/number/utoa32_core|inlined.0 local.get $3 @@ -8851,7 +8850,7 @@ end local.get $3 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/number/itoa (; 218 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -8935,7 +8934,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -8963,7 +8962,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $6 i32.const 0 local.set $7 @@ -9042,13 +9041,13 @@ call $~lib/string/String#substring local.set $9 local.get $6 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $9 return end local.get $6 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -9065,7 +9064,7 @@ local.get $0 i32.eqz if - i32.const 4704 + i32.const 4656 return end local.get $0 @@ -9074,7 +9073,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 block $~lib/util/number/utoa32_core|inlined.2 local.get $2 @@ -9090,7 +9089,7 @@ end local.get $2 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/number/itoa (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -9154,7 +9153,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -9182,7 +9181,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $6 i32.const 0 local.set $7 @@ -9261,13 +9260,13 @@ call $~lib/string/String#substring local.set $9 local.get $6 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $9 return end local.get $6 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -9356,7 +9355,7 @@ local.set $14 local.get $6 local.set $15 - i32.const 6696 + i32.const 6648 i32.load offset=4 local.set $16 block $break|0 @@ -10373,11 +10372,11 @@ i32.shl i32.sub global.set $~lib/util/number/_K - i32.const 6384 + i32.const 6336 local.get $13 call $~lib/array/Array#__unchecked_get global.set $~lib/util/number/_frc_pow - i32.const 6608 + i32.const 6560 local.get $13 call $~lib/array/Array#__unchecked_get global.set $~lib/util/number/_exp_pow @@ -10650,7 +10649,7 @@ f64.const 0 f64.eq if - i32.const 5552 + i32.const 5504 return end local.get $0 @@ -10660,11 +10659,11 @@ local.get $0 call $~lib/builtins/isNaN if - i32.const 5576 + i32.const 5528 return end - i32.const 5600 - i32.const 5640 + i32.const 5552 + i32.const 5592 local.get $0 f64.const 0 f64.lt @@ -10674,7 +10673,7 @@ i32.const 28 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 local.get $1 local.get $0 @@ -10686,7 +10685,7 @@ call $~lib/string/String#substring local.set $3 local.get $1 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $3 ) (func $~lib/util/number/dtoa_stream (; 234 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) @@ -10742,8 +10741,8 @@ local.get $3 i32.add local.set $4 - i32.const 5600 - i32.const 5640 + i32.const 5552 + i32.const 5592 local.get $3 select local.set $5 @@ -10781,7 +10780,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -10809,7 +10808,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $6 i32.const 0 local.set $7 @@ -10888,13 +10887,13 @@ call $~lib/string/String#substring local.set $9 local.get $6 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $9 return end local.get $6 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -10921,7 +10920,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -10991,7 +10990,7 @@ i32.add i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $10 block $break|1 i32.const 0 @@ -11084,7 +11083,7 @@ end local.get $10 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array<~lib/string/String>#join (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -11097,9 +11096,9 @@ i32.eqz if i32.const 0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 19 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -11122,7 +11121,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -11131,7 +11130,7 @@ local.get $2 i32.eqz if - i32.const 6976 + i32.const 6928 return end local.get $1 @@ -11148,7 +11147,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $6 i32.const 0 local.set $7 @@ -11176,7 +11175,7 @@ i32.const 1 i32.shl i32.add - i32.const 6976 + i32.const 6928 i32.const 15 i32.const 1 i32.shl @@ -11225,7 +11224,7 @@ i32.const 1 i32.shl i32.add - i32.const 6976 + i32.const 6928 i32.const 15 i32.const 1 i32.shl @@ -11245,13 +11244,13 @@ call $~lib/string/String#substring local.set $9 local.get $6 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $9 return end local.get $6 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 241 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -11261,7 +11260,7 @@ ) (func $~lib/array/Array#toString (; 242 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4584 + i32.const 4536 call $~lib/array/Array#join ) (func $~lib/util/number/itoa (; 243 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -11366,7 +11365,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -11394,7 +11393,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $6 i32.const 0 local.set $7 @@ -11473,13 +11472,13 @@ call $~lib/string/String#substring local.set $9 local.get $6 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $9 return end local.get $6 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -11489,7 +11488,7 @@ ) (func $~lib/array/Array#toString (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4584 + i32.const 4536 call $~lib/array/Array#join ) (func $~lib/util/number/itoa (; 248 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -11562,7 +11561,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -11590,7 +11589,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $6 i32.const 0 local.set $7 @@ -11669,13 +11668,13 @@ call $~lib/string/String#substring local.set $9 local.get $6 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $9 return end local.get $6 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 251 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -11685,7 +11684,7 @@ ) (func $~lib/array/Array#toString (; 252 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4584 + i32.const 4536 call $~lib/array/Array#join ) (func $~lib/util/number/decimalCount64 (; 253 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) @@ -11769,7 +11768,7 @@ (local $11 i32) (local $12 i64) (local $13 i64) - i32.const 5144 + i32.const 5096 i32.load offset=4 local.set $3 block $break|0 @@ -11896,7 +11895,7 @@ local.get $0 i64.eqz if - i32.const 4704 + i32.const 4656 return end local.get $0 @@ -11913,7 +11912,7 @@ local.get $3 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 block $~lib/util/number/utoa32_core|inlined.8 local.get $1 @@ -11934,7 +11933,7 @@ local.get $3 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 block $~lib/util/number/utoa64_core|inlined.0 local.get $1 @@ -11951,7 +11950,7 @@ end local.get $1 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/number/itoa (; 256 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 @@ -12042,7 +12041,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -12070,7 +12069,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $6 i32.const 0 local.set $7 @@ -12149,13 +12148,13 @@ call $~lib/string/String#substring local.set $9 local.get $6 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $9 return end local.get $6 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -12165,7 +12164,7 @@ ) (func $~lib/array/Array#toString (; 260 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4584 + i32.const 4536 call $~lib/array/Array#join ) (func $~lib/util/number/itoa64 (; 261 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) @@ -12180,7 +12179,7 @@ local.get $0 i64.eqz if - i32.const 4704 + i32.const 4656 return end local.get $0 @@ -12210,7 +12209,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 block $~lib/util/number/utoa32_core|inlined.10 local.get $2 @@ -12233,7 +12232,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 block $~lib/util/number/utoa64_core|inlined.2 local.get $2 @@ -12256,7 +12255,7 @@ end local.get $2 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/number/itoa (; 262 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 @@ -12369,7 +12368,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -12397,7 +12396,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $6 i32.const 0 local.set $7 @@ -12476,13 +12475,13 @@ call $~lib/string/String#substring local.set $9 local.get $6 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $9 return end local.get $6 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 265 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -12492,7 +12491,7 @@ ) (func $~lib/array/Array#toString (; 266 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4584 + i32.const 4536 call $~lib/array/Array#join ) (func $~lib/array/Array<~lib/string/String | null>#join_str (; 267 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -12514,7 +12513,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -12584,7 +12583,7 @@ i32.add i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $10 block $break|1 i32.const 0 @@ -12677,7 +12676,7 @@ end local.get $10 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array<~lib/string/String | null>#join (; 268 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -12687,12 +12686,12 @@ ) (func $~lib/array/Array<~lib/string/String | null>#toString (; 269 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4584 + i32.const 4536 call $~lib/array/Array<~lib/string/String | null>#join ) (func $~lib/array/Array<~lib/string/String>#toString (; 270 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4584 + i32.const 4536 call $~lib/array/Array<~lib/string/String>#join ) (func $~lib/array/Array<~lib/array/Array>#join_arr (; 271 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -12711,10 +12710,10 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end - i32.const 4256 + i32.const 4208 local.set $3 local.get $1 call $~lib/string/String#get:length @@ -12734,7 +12733,7 @@ local.get $1 call $~lib/array/Array#join else - i32.const 4256 + i32.const 4208 end return end @@ -12807,7 +12806,7 @@ ) (func $~lib/array/Array<~lib/array/Array>#toString (; 273 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4584 + i32.const 4536 call $~lib/array/Array<~lib/array/Array>#join ) (func $~lib/util/number/itoa (; 274 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -12880,7 +12879,7 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end local.get $0 @@ -12908,7 +12907,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $6 i32.const 0 local.set $7 @@ -12987,13 +12986,13 @@ call $~lib/string/String#substring local.set $9 local.get $6 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $9 return end local.get $6 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 277 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -13017,10 +13016,10 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end - i32.const 4256 + i32.const 4208 local.set $3 local.get $1 call $~lib/string/String#get:length @@ -13040,7 +13039,7 @@ local.get $1 call $~lib/array/Array#join else - i32.const 4256 + i32.const 4208 end return end @@ -13113,7 +13112,7 @@ ) (func $~lib/array/Array<~lib/array/Array>#toString (; 280 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4584 + i32.const 4536 call $~lib/array/Array<~lib/array/Array>#join ) (func $~lib/array/Array<~lib/array/Array>#join_arr (; 281 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -13132,10 +13131,10 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end - i32.const 4256 + i32.const 4208 local.set $3 local.get $1 call $~lib/string/String#get:length @@ -13155,7 +13154,7 @@ local.get $1 call $~lib/array/Array#join else - i32.const 4256 + i32.const 4208 end return end @@ -13242,10 +13241,10 @@ i32.const 0 i32.lt_s if - i32.const 4256 + i32.const 4208 return end - i32.const 4256 + i32.const 4208 local.set $3 local.get $1 call $~lib/string/String#get:length @@ -13265,7 +13264,7 @@ local.get $1 call $~lib/array/Array<~lib/array/Array>#join else - i32.const 4256 + i32.const 4208 end return end @@ -13338,7 +13337,7 @@ ) (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#toString (; 285 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 4584 + i32.const 4536 call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join ) (func $start:std/array (; 286 ;) (type $FUNCSIG$v) @@ -13368,7 +13367,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 39 i32.const 0 call $~lib/env/abort @@ -13381,7 +13380,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 40 i32.const 0 call $~lib/env/abort @@ -13395,7 +13394,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 41 i32.const 0 call $~lib/env/abort @@ -13410,7 +13409,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 42 i32.const 0 call $~lib/env/abort @@ -13423,7 +13422,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 43 i32.const 0 call $~lib/env/abort @@ -13436,7 +13435,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 44 i32.const 0 call $~lib/env/abort @@ -13452,14 +13451,14 @@ i32.const 5 i32.const 0 i32.const 7 - i32.const 248 + i32.const 256 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 51 i32.const 0 call $~lib/env/abort @@ -13475,14 +13474,14 @@ i32.const 5 i32.const 0 i32.const 7 - i32.const 320 + i32.const 328 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 54 i32.const 0 call $~lib/env/abort @@ -13498,14 +13497,14 @@ i32.const 5 i32.const 0 i32.const 7 - i32.const 344 + i32.const 352 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 57 i32.const 0 call $~lib/env/abort @@ -13521,14 +13520,14 @@ i32.const 5 i32.const 0 i32.const 7 - i32.const 368 + i32.const 376 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 60 i32.const 0 call $~lib/env/abort @@ -13544,14 +13543,14 @@ i32.const 5 i32.const 0 i32.const 7 - i32.const 392 + i32.const 400 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 63 i32.const 0 call $~lib/env/abort @@ -13567,14 +13566,14 @@ i32.const 5 i32.const 2 i32.const 8 - i32.const 488 + i32.const 496 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 68 i32.const 0 call $~lib/env/abort @@ -13590,14 +13589,14 @@ i32.const 5 i32.const 2 i32.const 8 - i32.const 528 + i32.const 536 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 71 i32.const 0 call $~lib/env/abort @@ -13613,14 +13612,14 @@ i32.const 5 i32.const 2 i32.const 8 - i32.const 568 + i32.const 576 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 74 i32.const 0 call $~lib/env/abort @@ -13636,14 +13635,14 @@ i32.const 5 i32.const 2 i32.const 8 - i32.const 608 + i32.const 616 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 77 i32.const 0 call $~lib/env/abort @@ -13659,14 +13658,14 @@ i32.const 5 i32.const 2 i32.const 8 - i32.const 648 + i32.const 656 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 80 i32.const 0 call $~lib/env/abort @@ -13679,7 +13678,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 84 i32.const 0 call $~lib/env/abort @@ -13692,7 +13691,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 85 i32.const 0 call $~lib/env/abort @@ -13710,7 +13709,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 89 i32.const 0 call $~lib/env/abort @@ -13723,7 +13722,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 90 i32.const 0 call $~lib/env/abort @@ -13736,7 +13735,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 91 i32.const 0 call $~lib/env/abort @@ -13751,7 +13750,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 95 i32.const 0 call $~lib/env/abort @@ -13764,7 +13763,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 96 i32.const 0 call $~lib/env/abort @@ -13777,7 +13776,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 97 i32.const 0 call $~lib/env/abort @@ -13794,7 +13793,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 101 i32.const 0 call $~lib/env/abort @@ -13807,7 +13806,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 102 i32.const 0 call $~lib/env/abort @@ -13821,7 +13820,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 103 i32.const 0 call $~lib/env/abort @@ -13838,7 +13837,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 107 i32.const 0 call $~lib/env/abort @@ -13851,7 +13850,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 108 i32.const 0 call $~lib/env/abort @@ -13865,7 +13864,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 109 i32.const 0 call $~lib/env/abort @@ -13879,7 +13878,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 110 i32.const 0 call $~lib/env/abort @@ -13896,7 +13895,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 114 i32.const 0 call $~lib/env/abort @@ -13909,7 +13908,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 115 i32.const 0 call $~lib/env/abort @@ -13923,7 +13922,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 116 i32.const 0 call $~lib/env/abort @@ -13937,7 +13936,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 117 i32.const 0 call $~lib/env/abort @@ -13951,7 +13950,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 118 i32.const 0 call $~lib/env/abort @@ -13972,7 +13971,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 125 i32.const 0 call $~lib/env/abort @@ -13985,7 +13984,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 126 i32.const 0 call $~lib/env/abort @@ -13998,7 +13997,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 127 i32.const 0 call $~lib/env/abort @@ -14008,7 +14007,7 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 744 + i32.const 696 call $~lib/runtime/runtime.newArray call $~lib/array/Array#concat drop @@ -14019,7 +14018,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 130 i32.const 0 call $~lib/env/abort @@ -14033,7 +14032,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 132 i32.const 0 call $~lib/env/abort @@ -14047,7 +14046,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 133 i32.const 0 call $~lib/env/abort @@ -14061,7 +14060,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 134 i32.const 0 call $~lib/env/abort @@ -14086,7 +14085,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 141 i32.const 0 call $~lib/env/abort @@ -14099,7 +14098,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 142 i32.const 0 call $~lib/env/abort @@ -14112,7 +14111,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 143 i32.const 0 call $~lib/env/abort @@ -14126,7 +14125,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 144 i32.const 0 call $~lib/env/abort @@ -14140,7 +14139,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 145 i32.const 0 call $~lib/env/abort @@ -14154,7 +14153,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 146 i32.const 0 call $~lib/env/abort @@ -14168,7 +14167,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 147 i32.const 0 call $~lib/env/abort @@ -14182,7 +14181,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 148 i32.const 0 call $~lib/env/abort @@ -14198,7 +14197,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 151 i32.const 0 call $~lib/env/abort @@ -14215,7 +14214,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 154 i32.const 0 call $~lib/env/abort @@ -14229,7 +14228,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 155 i32.const 0 call $~lib/env/abort @@ -14242,7 +14241,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 158 i32.const 0 call $~lib/env/abort @@ -14259,7 +14258,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 160 i32.const 0 call $~lib/env/abort @@ -14272,7 +14271,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 161 i32.const 0 call $~lib/env/abort @@ -14281,7 +14280,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 808 + i32.const 760 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -14292,14 +14291,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 848 + i32.const 800 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 167 i32.const 0 call $~lib/env/abort @@ -14308,7 +14307,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 888 + i32.const 840 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -14319,14 +14318,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 928 + i32.const 880 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 169 i32.const 0 call $~lib/env/abort @@ -14335,7 +14334,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 968 + i32.const 920 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -14346,14 +14345,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1008 + i32.const 960 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 171 i32.const 0 call $~lib/env/abort @@ -14362,7 +14361,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1048 + i32.const 1000 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -14373,14 +14372,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1088 + i32.const 1040 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 173 i32.const 0 call $~lib/env/abort @@ -14389,7 +14388,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1128 + i32.const 1080 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -14400,14 +14399,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1168 + i32.const 1120 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 175 i32.const 0 call $~lib/env/abort @@ -14416,7 +14415,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1208 + i32.const 1160 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -14427,14 +14426,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1248 + i32.const 1200 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 177 i32.const 0 call $~lib/env/abort @@ -14443,7 +14442,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1288 + i32.const 1240 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -14454,14 +14453,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1328 + i32.const 1280 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 179 i32.const 0 call $~lib/env/abort @@ -14470,7 +14469,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1368 + i32.const 1320 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -14481,14 +14480,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1408 + i32.const 1360 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 181 i32.const 0 call $~lib/env/abort @@ -14497,7 +14496,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1448 + i32.const 1400 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -14508,14 +14507,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1488 + i32.const 1440 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 183 i32.const 0 call $~lib/env/abort @@ -14524,7 +14523,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1528 + i32.const 1480 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -14535,14 +14534,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1568 + i32.const 1520 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 185 i32.const 0 call $~lib/env/abort @@ -14551,7 +14550,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1608 + i32.const 1560 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -14562,14 +14561,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1648 + i32.const 1600 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 187 i32.const 0 call $~lib/env/abort @@ -14578,7 +14577,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1688 + i32.const 1640 call $~lib/runtime/runtime.newArray global.set $std/array/cwArr global.get $std/array/cwArr @@ -14589,14 +14588,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1728 + i32.const 1680 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 189 i32.const 0 call $~lib/env/abort @@ -14613,7 +14612,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 195 i32.const 0 call $~lib/env/abort @@ -14626,7 +14625,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 196 i32.const 0 call $~lib/env/abort @@ -14640,7 +14639,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 197 i32.const 0 call $~lib/env/abort @@ -14654,7 +14653,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 198 i32.const 0 call $~lib/env/abort @@ -14668,7 +14667,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 199 i32.const 0 call $~lib/env/abort @@ -14682,7 +14681,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 200 i32.const 0 call $~lib/env/abort @@ -14699,7 +14698,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 204 i32.const 0 call $~lib/env/abort @@ -14712,7 +14711,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 205 i32.const 0 call $~lib/env/abort @@ -14726,7 +14725,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 206 i32.const 0 call $~lib/env/abort @@ -14740,7 +14739,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 207 i32.const 0 call $~lib/env/abort @@ -14754,7 +14753,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 208 i32.const 0 call $~lib/env/abort @@ -14768,7 +14767,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 209 i32.const 0 call $~lib/env/abort @@ -14782,7 +14781,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 210 i32.const 0 call $~lib/env/abort @@ -14797,7 +14796,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 216 i32.const 0 call $~lib/env/abort @@ -14810,7 +14809,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 217 i32.const 0 call $~lib/env/abort @@ -14823,7 +14822,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 218 i32.const 0 call $~lib/env/abort @@ -14837,7 +14836,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 219 i32.const 0 call $~lib/env/abort @@ -14851,7 +14850,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 220 i32.const 0 call $~lib/env/abort @@ -14865,7 +14864,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 221 i32.const 0 call $~lib/env/abort @@ -14879,7 +14878,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 222 i32.const 0 call $~lib/env/abort @@ -14894,7 +14893,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 226 i32.const 0 call $~lib/env/abort @@ -14907,7 +14906,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 227 i32.const 0 call $~lib/env/abort @@ -14920,7 +14919,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 228 i32.const 0 call $~lib/env/abort @@ -14934,7 +14933,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 229 i32.const 0 call $~lib/env/abort @@ -14948,7 +14947,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 230 i32.const 0 call $~lib/env/abort @@ -14962,7 +14961,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 231 i32.const 0 call $~lib/env/abort @@ -14978,7 +14977,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 237 i32.const 0 call $~lib/env/abort @@ -14991,7 +14990,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 238 i32.const 0 call $~lib/env/abort @@ -15005,7 +15004,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 239 i32.const 0 call $~lib/env/abort @@ -15019,7 +15018,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 240 i32.const 0 call $~lib/env/abort @@ -15033,7 +15032,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 241 i32.const 0 call $~lib/env/abort @@ -15058,7 +15057,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 250 i32.const 0 call $~lib/env/abort @@ -15075,7 +15074,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 254 i32.const 0 call $~lib/env/abort @@ -15092,7 +15091,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 258 i32.const 0 call $~lib/env/abort @@ -15109,7 +15108,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 262 i32.const 0 call $~lib/env/abort @@ -15126,7 +15125,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 266 i32.const 0 call $~lib/env/abort @@ -15143,7 +15142,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 270 i32.const 0 call $~lib/env/abort @@ -15160,7 +15159,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 274 i32.const 0 call $~lib/env/abort @@ -15177,7 +15176,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 278 i32.const 0 call $~lib/env/abort @@ -15194,7 +15193,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 282 i32.const 0 call $~lib/env/abort @@ -15211,7 +15210,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 286 i32.const 0 call $~lib/env/abort @@ -15228,7 +15227,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 292 i32.const 0 call $~lib/env/abort @@ -15245,7 +15244,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 296 i32.const 0 call $~lib/env/abort @@ -15262,7 +15261,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 300 i32.const 0 call $~lib/env/abort @@ -15279,7 +15278,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 304 i32.const 0 call $~lib/env/abort @@ -15296,7 +15295,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 308 i32.const 0 call $~lib/env/abort @@ -15313,7 +15312,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 312 i32.const 0 call $~lib/env/abort @@ -15330,7 +15329,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 316 i32.const 0 call $~lib/env/abort @@ -15347,7 +15346,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 320 i32.const 0 call $~lib/env/abort @@ -15364,7 +15363,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 324 i32.const 0 call $~lib/env/abort @@ -15381,7 +15380,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 328 i32.const 0 call $~lib/env/abort @@ -15399,7 +15398,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 332 i32.const 0 call $~lib/env/abort @@ -15412,7 +15411,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 333 i32.const 0 call $~lib/env/abort @@ -15426,7 +15425,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 334 i32.const 0 call $~lib/env/abort @@ -15440,7 +15439,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 335 i32.const 0 call $~lib/env/abort @@ -15453,14 +15452,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1840 + i32.const 1792 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 340 i32.const 0 call $~lib/env/abort @@ -15470,14 +15469,14 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 1880 + i32.const 1832 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 341 i32.const 0 call $~lib/env/abort @@ -15486,7 +15485,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1896 + i32.const 1848 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -15496,14 +15495,14 @@ i32.const 3 i32.const 2 i32.const 4 - i32.const 1936 + i32.const 1888 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 344 i32.const 0 call $~lib/env/abort @@ -15513,14 +15512,14 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 1968 + i32.const 1920 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 345 i32.const 0 call $~lib/env/abort @@ -15529,7 +15528,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 1992 + i32.const 1944 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -15539,14 +15538,14 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 2032 + i32.const 1984 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 348 i32.const 0 call $~lib/env/abort @@ -15556,14 +15555,14 @@ i32.const 3 i32.const 2 i32.const 4 - i32.const 2056 + i32.const 2008 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 349 i32.const 0 call $~lib/env/abort @@ -15572,7 +15571,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2088 + i32.const 2040 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -15582,14 +15581,14 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 2128 + i32.const 2080 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 352 i32.const 0 call $~lib/env/abort @@ -15599,14 +15598,14 @@ i32.const 4 i32.const 2 i32.const 4 - i32.const 2152 + i32.const 2104 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 353 i32.const 0 call $~lib/env/abort @@ -15615,7 +15614,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2184 + i32.const 2136 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -15625,14 +15624,14 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 2224 + i32.const 2176 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 356 i32.const 0 call $~lib/env/abort @@ -15642,14 +15641,14 @@ i32.const 4 i32.const 2 i32.const 4 - i32.const 2248 + i32.const 2200 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 357 i32.const 0 call $~lib/env/abort @@ -15658,7 +15657,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2280 + i32.const 2232 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -15668,14 +15667,14 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 2320 + i32.const 2272 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 360 i32.const 0 call $~lib/env/abort @@ -15685,14 +15684,14 @@ i32.const 3 i32.const 2 i32.const 4 - i32.const 2344 + i32.const 2296 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 361 i32.const 0 call $~lib/env/abort @@ -15701,7 +15700,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2376 + i32.const 2328 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -15711,14 +15710,14 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 2416 + i32.const 2368 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 364 i32.const 0 call $~lib/env/abort @@ -15728,14 +15727,14 @@ i32.const 4 i32.const 2 i32.const 4 - i32.const 2440 + i32.const 2392 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 365 i32.const 0 call $~lib/env/abort @@ -15744,7 +15743,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2472 + i32.const 2424 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -15754,14 +15753,14 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 2512 + i32.const 2464 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 368 i32.const 0 call $~lib/env/abort @@ -15771,14 +15770,14 @@ i32.const 4 i32.const 2 i32.const 4 - i32.const 2536 + i32.const 2488 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 369 i32.const 0 call $~lib/env/abort @@ -15787,7 +15786,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2568 + i32.const 2520 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -15797,14 +15796,14 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2608 + i32.const 2560 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 372 i32.const 0 call $~lib/env/abort @@ -15814,14 +15813,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2624 + i32.const 2576 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 373 i32.const 0 call $~lib/env/abort @@ -15830,7 +15829,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2664 + i32.const 2616 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -15840,14 +15839,14 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2704 + i32.const 2656 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 376 i32.const 0 call $~lib/env/abort @@ -15857,14 +15856,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2720 + i32.const 2672 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 377 i32.const 0 call $~lib/env/abort @@ -15873,7 +15872,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2760 + i32.const 2712 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -15883,14 +15882,14 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2800 + i32.const 2752 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 380 i32.const 0 call $~lib/env/abort @@ -15900,14 +15899,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2816 + i32.const 2768 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 381 i32.const 0 call $~lib/env/abort @@ -15916,7 +15915,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2856 + i32.const 2808 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -15926,14 +15925,14 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2896 + i32.const 2848 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 384 i32.const 0 call $~lib/env/abort @@ -15943,14 +15942,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2912 + i32.const 2864 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 385 i32.const 0 call $~lib/env/abort @@ -15959,7 +15958,7 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 2952 + i32.const 2904 call $~lib/runtime/runtime.newArray global.set $std/array/sarr global.get $std/array/sarr @@ -15969,14 +15968,14 @@ i32.const 0 i32.const 2 i32.const 4 - i32.const 2992 + i32.const 2944 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 388 i32.const 0 call $~lib/env/abort @@ -15986,14 +15985,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 3008 + i32.const 2960 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 389 i32.const 0 call $~lib/env/abort @@ -16025,7 +16024,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 399 i32.const 0 call $~lib/env/abort @@ -16041,7 +16040,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 402 i32.const 0 call $~lib/env/abort @@ -16057,7 +16056,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 405 i32.const 0 call $~lib/env/abort @@ -16073,7 +16072,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 413 i32.const 0 call $~lib/env/abort @@ -16086,7 +16085,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 414 i32.const 0 call $~lib/env/abort @@ -16102,7 +16101,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 416 i32.const 0 call $~lib/env/abort @@ -16130,7 +16129,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 429 i32.const 0 call $~lib/env/abort @@ -16143,7 +16142,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 430 i32.const 0 call $~lib/env/abort @@ -16167,7 +16166,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 438 i32.const 0 call $~lib/env/abort @@ -16183,7 +16182,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 441 i32.const 0 call $~lib/env/abort @@ -16199,7 +16198,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 449 i32.const 0 call $~lib/env/abort @@ -16212,7 +16211,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 450 i32.const 0 call $~lib/env/abort @@ -16228,7 +16227,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 452 i32.const 0 call $~lib/env/abort @@ -16256,7 +16255,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 465 i32.const 0 call $~lib/env/abort @@ -16269,7 +16268,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 466 i32.const 0 call $~lib/env/abort @@ -16293,7 +16292,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 474 i32.const 0 call $~lib/env/abort @@ -16309,7 +16308,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 477 i32.const 0 call $~lib/env/abort @@ -16325,7 +16324,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 485 i32.const 0 call $~lib/env/abort @@ -16338,7 +16337,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 486 i32.const 0 call $~lib/env/abort @@ -16354,7 +16353,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 488 i32.const 0 call $~lib/env/abort @@ -16382,7 +16381,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 501 i32.const 0 call $~lib/env/abort @@ -16395,7 +16394,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 502 i32.const 0 call $~lib/env/abort @@ -16420,7 +16419,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 511 i32.const 0 call $~lib/env/abort @@ -16437,7 +16436,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 520 i32.const 0 call $~lib/env/abort @@ -16450,7 +16449,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 521 i32.const 0 call $~lib/env/abort @@ -16467,7 +16466,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 524 i32.const 0 call $~lib/env/abort @@ -16496,7 +16495,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 538 i32.const 0 call $~lib/env/abort @@ -16509,7 +16508,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 539 i32.const 0 call $~lib/env/abort @@ -16533,7 +16532,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 564 i32.const 0 call $~lib/env/abort @@ -16587,7 +16586,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 575 i32.const 0 call $~lib/env/abort @@ -16604,7 +16603,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 576 i32.const 0 call $~lib/env/abort @@ -16622,7 +16621,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 585 i32.const 0 call $~lib/env/abort @@ -16635,7 +16634,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 586 i32.const 0 call $~lib/env/abort @@ -16653,7 +16652,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 593 i32.const 0 call $~lib/env/abort @@ -16683,7 +16682,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 608 i32.const 0 call $~lib/env/abort @@ -16696,7 +16695,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 609 i32.const 0 call $~lib/env/abort @@ -16721,7 +16720,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 617 i32.const 0 call $~lib/env/abort @@ -16739,7 +16738,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 626 i32.const 0 call $~lib/env/abort @@ -16752,7 +16751,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 627 i32.const 0 call $~lib/env/abort @@ -16770,7 +16769,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 634 i32.const 0 call $~lib/env/abort @@ -16800,7 +16799,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 649 i32.const 0 call $~lib/env/abort @@ -16813,7 +16812,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 650 i32.const 0 call $~lib/env/abort @@ -16838,7 +16837,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 658 i32.const 0 call $~lib/env/abort @@ -16855,7 +16854,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 662 i32.const 0 call $~lib/env/abort @@ -16874,7 +16873,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 665 i32.const 0 call $~lib/env/abort @@ -16893,7 +16892,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 668 i32.const 0 call $~lib/env/abort @@ -16910,7 +16909,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 676 i32.const 0 call $~lib/env/abort @@ -16923,7 +16922,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 677 i32.const 0 call $~lib/env/abort @@ -16940,7 +16939,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 679 i32.const 0 call $~lib/env/abort @@ -16969,7 +16968,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 692 i32.const 0 call $~lib/env/abort @@ -16982,7 +16981,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 693 i32.const 0 call $~lib/env/abort @@ -17007,7 +17006,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 701 i32.const 0 call $~lib/env/abort @@ -17024,7 +17023,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 705 i32.const 0 call $~lib/env/abort @@ -17043,7 +17042,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 708 i32.const 0 call $~lib/env/abort @@ -17062,7 +17061,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 711 i32.const 0 call $~lib/env/abort @@ -17079,7 +17078,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 719 i32.const 0 call $~lib/env/abort @@ -17092,7 +17091,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 720 i32.const 0 call $~lib/env/abort @@ -17109,7 +17108,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 722 i32.const 0 call $~lib/env/abort @@ -17138,7 +17137,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 735 i32.const 0 call $~lib/env/abort @@ -17151,7 +17150,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 736 i32.const 0 call $~lib/env/abort @@ -17188,14 +17187,14 @@ i32.const 8 i32.const 2 i32.const 9 - i32.const 3360 + i32.const 3312 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 824 i32.const 0 call $~lib/env/abort @@ -17213,14 +17212,14 @@ i32.const 8 i32.const 3 i32.const 10 - i32.const 3520 + i32.const 3472 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 828 i32.const 0 call $~lib/env/abort @@ -17238,14 +17237,14 @@ i32.const 5 i32.const 2 i32.const 4 - i32.const 3672 + i32.const 3624 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 832 i32.const 0 call $~lib/env/abort @@ -17263,14 +17262,14 @@ i32.const 5 i32.const 2 i32.const 8 - i32.const 3784 + i32.const 3736 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 836 i32.const 0 call $~lib/env/abort @@ -17299,14 +17298,14 @@ i32.const 1 i32.const 2 i32.const 4 - i32.const 4112 + i32.const 4064 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 856 i32.const 0 call $~lib/env/abort @@ -17318,14 +17317,14 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 4136 + i32.const 4088 call $~lib/runtime/runtime.newArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 859 i32.const 0 call $~lib/env/abort @@ -17340,7 +17339,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 862 i32.const 0 call $~lib/env/abort @@ -17355,7 +17354,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 865 i32.const 0 call $~lib/env/abort @@ -17370,7 +17369,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 868 i32.const 0 call $~lib/env/abort @@ -17385,7 +17384,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 871 i32.const 0 call $~lib/env/abort @@ -17400,7 +17399,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 874 i32.const 0 call $~lib/env/abort @@ -17452,7 +17451,7 @@ i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 904 i32.const 0 call $~lib/env/abort @@ -17471,16 +17470,16 @@ i32.const 2 i32.const 0 i32.const 16 - i32.const 4608 + i32.const 4560 call $~lib/runtime/runtime.newArray - i32.const 4584 + i32.const 4536 call $~lib/array/Array#join - i32.const 4632 + i32.const 4584 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 913 i32.const 0 call $~lib/env/abort @@ -17489,16 +17488,16 @@ i32.const 3 i32.const 2 i32.const 4 - i32.const 5176 + i32.const 5128 call $~lib/runtime/runtime.newArray - i32.const 4256 + i32.const 4208 call $~lib/array/Array#join - i32.const 5208 + i32.const 5160 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 914 i32.const 0 call $~lib/env/abort @@ -17507,16 +17506,16 @@ i32.const 3 i32.const 2 i32.const 8 - i32.const 5296 + i32.const 5248 call $~lib/runtime/runtime.newArray - i32.const 5272 + i32.const 5224 call $~lib/array/Array#join - i32.const 5208 + i32.const 5160 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 915 i32.const 0 call $~lib/env/abort @@ -17525,16 +17524,16 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 5376 + i32.const 5328 call $~lib/runtime/runtime.newArray - i32.const 5352 + i32.const 5304 call $~lib/array/Array#join - i32.const 5400 + i32.const 5352 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 916 i32.const 0 call $~lib/env/abort @@ -17543,16 +17542,16 @@ i32.const 6 i32.const 3 i32.const 10 - i32.const 6728 + i32.const 6680 call $~lib/runtime/runtime.newArray - i32.const 5528 + i32.const 5480 call $~lib/array/Array#join - i32.const 6792 + i32.const 6744 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 917 i32.const 0 call $~lib/env/abort @@ -17561,16 +17560,16 @@ i32.const 3 i32.const 2 i32.const 15 - i32.const 6944 + i32.const 6896 call $~lib/runtime/runtime.newArray - i32.const 4256 + i32.const 4208 call $~lib/array/Array<~lib/string/String>#join - i32.const 6888 + i32.const 6840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 918 i32.const 0 call $~lib/env/abort @@ -17631,14 +17630,14 @@ end global.set $std/array/refArr global.get $std/array/refArr - i32.const 4584 + i32.const 4536 call $~lib/array/Array#join - i32.const 7024 + i32.const 6976 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 920 i32.const 0 call $~lib/env/abort @@ -17646,12 +17645,12 @@ end global.get $std/array/reversed0 call $~lib/array/Array#toString - i32.const 4256 + i32.const 4208 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 924 i32.const 0 call $~lib/env/abort @@ -17659,12 +17658,12 @@ end global.get $std/array/reversed1 call $~lib/array/Array#toString - i32.const 6888 + i32.const 6840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 925 i32.const 0 call $~lib/env/abort @@ -17672,12 +17671,12 @@ end global.get $std/array/reversed2 call $~lib/array/Array#toString - i32.const 7104 + i32.const 7056 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 926 i32.const 0 call $~lib/env/abort @@ -17685,12 +17684,12 @@ end global.get $std/array/reversed4 call $~lib/array/Array#toString - i32.const 7128 + i32.const 7080 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 927 i32.const 0 call $~lib/env/abort @@ -17699,15 +17698,15 @@ i32.const 3 i32.const 0 i32.const 21 - i32.const 7184 + i32.const 7136 call $~lib/runtime/runtime.newArray call $~lib/array/Array#toString - i32.const 7208 + i32.const 7160 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 929 i32.const 0 call $~lib/env/abort @@ -17716,15 +17715,15 @@ i32.const 3 i32.const 1 i32.const 22 - i32.const 7264 + i32.const 7216 call $~lib/runtime/runtime.newArray call $~lib/array/Array#toString - i32.const 7288 + i32.const 7240 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 930 i32.const 0 call $~lib/env/abort @@ -17733,15 +17732,15 @@ i32.const 3 i32.const 3 i32.const 17 - i32.const 7368 + i32.const 7320 call $~lib/runtime/runtime.newArray call $~lib/array/Array#toString - i32.const 7408 + i32.const 7360 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 931 i32.const 0 call $~lib/env/abort @@ -17750,15 +17749,15 @@ i32.const 4 i32.const 3 i32.const 23 - i32.const 7520 + i32.const 7472 call $~lib/runtime/runtime.newArray call $~lib/array/Array#toString - i32.const 7568 + i32.const 7520 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 932 i32.const 0 call $~lib/env/abort @@ -17766,12 +17765,12 @@ end global.get $std/array/randomStringsExpected call $~lib/array/Array<~lib/string/String | null>#toString - i32.const 7672 + i32.const 7624 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 933 i32.const 0 call $~lib/env/abort @@ -17780,15 +17779,15 @@ i32.const 4 i32.const 2 i32.const 15 - i32.const 7800 + i32.const 7752 call $~lib/runtime/runtime.newArray call $~lib/array/Array<~lib/string/String>#toString - i32.const 7832 + i32.const 7784 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 934 i32.const 0 call $~lib/env/abort @@ -17809,7 +17808,7 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 7888 + i32.const 7840 call $~lib/runtime/runtime.newArray local.set $2 local.get $2 @@ -17823,7 +17822,7 @@ i32.const 2 i32.const 2 i32.const 4 - i32.const 7912 + i32.const 7864 call $~lib/runtime/runtime.newArray local.set $2 local.get $2 @@ -17837,12 +17836,12 @@ global.set $std/array/subarr32 global.get $std/array/subarr32 call $~lib/array/Array<~lib/array/Array>#toString - i32.const 7936 + i32.const 7888 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 937 i32.const 0 call $~lib/env/abort @@ -17863,7 +17862,7 @@ i32.const 2 i32.const 0 i32.const 7 - i32.const 7992 + i32.const 7944 call $~lib/runtime/runtime.newArray local.set $2 local.get $2 @@ -17877,7 +17876,7 @@ i32.const 2 i32.const 0 i32.const 7 - i32.const 8016 + i32.const 7968 call $~lib/runtime/runtime.newArray local.set $2 local.get $2 @@ -17891,12 +17890,12 @@ global.set $std/array/subarr8 global.get $std/array/subarr8 call $~lib/array/Array<~lib/array/Array>#toString - i32.const 7936 + i32.const 7888 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 940 i32.const 0 call $~lib/env/abort @@ -17929,7 +17928,7 @@ i32.const 1 i32.const 2 i32.const 8 - i32.const 8112 + i32.const 8064 call $~lib/runtime/runtime.newArray local.set $4 local.get $4 @@ -17952,12 +17951,12 @@ global.set $std/array/subarrU32 global.get $std/array/subarrU32 call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#toString - i32.const 6888 + i32.const 6840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 152 + i32.const 160 i32.const 943 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 108bd0182d..ceb90c524d 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -10,10 +10,10 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 56) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 96) "\01\00\00\00$\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 144) "\02\00\00\00\08\00\00\00\01\00\00\00\02") - (data (i32.const 160) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 56) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 104) "\01\00\00\00$\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 152) "\02\00\00\00\08\00\00\00\01\00\00\00\02") + (data (i32.const 168) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -87,7 +87,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -319,16 +319,16 @@ end end ) - (func $~lib/runtime/runtime.register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 200 + i32.const 208 i32.le_u if i32.const 0 i32.const 64 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -342,8 +342,8 @@ if i32.const 0 i32.const 64 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -366,13 +366,13 @@ unreachable end local.get $0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $1 local.get $0 call $~lib/memory/memory.fill local.get $1 i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/memory/memory.copy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -604,7 +604,7 @@ i32.gt_s select local.tee $2 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $3 local.get $0 local.get $1 @@ -613,7 +613,7 @@ call $~lib/memory/memory.copy local.get $3 i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/arraybuffer/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -640,9 +640,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -669,14 +669,14 @@ (local $0 i32) (local $1 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $1 i32.store local.get $0 @@ -689,7 +689,7 @@ i32.const 2 i32.store offset=12 local.get $1 - i32.const 152 + i32.const 160 i32.const 8 call $~lib/memory/memory.copy local.get $0 @@ -708,16 +708,16 @@ i32.or if i32.const 0 - i32.const 168 + i32.const 176 i32.const 21 i32.const 6 call $~lib/env/abort unreachable end i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 7 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $2 i32.const 0 i32.store @@ -761,7 +761,7 @@ call $~lib/dataview/DataView#constructor ) (func $start:std/arraybuffer (; 12 ;) (type $FUNCSIG$v) - i32.const 200 + i32.const 208 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -776,7 +776,7 @@ i32.ne if i32.const 0 - i32.const 104 + i32.const 112 i32.const 3 i32.const 0 call $~lib/env/abort @@ -795,7 +795,7 @@ i32.ne if i32.const 0 - i32.const 104 + i32.const 112 i32.const 7 i32.const 0 call $~lib/env/abort @@ -806,7 +806,7 @@ i32.eq if i32.const 0 - i32.const 104 + i32.const 112 i32.const 8 i32.const 0 call $~lib/env/abort @@ -825,7 +825,7 @@ i32.ne if i32.const 0 - i32.const 104 + i32.const 112 i32.const 12 i32.const 0 call $~lib/env/abort @@ -844,7 +844,7 @@ i32.ne if i32.const 0 - i32.const 104 + i32.const 112 i32.const 16 i32.const 0 call $~lib/env/abort @@ -863,7 +863,7 @@ i32.ne if i32.const 0 - i32.const 104 + i32.const 112 i32.const 20 i32.const 0 call $~lib/env/abort @@ -882,7 +882,7 @@ i32.ne if i32.const 0 - i32.const 104 + i32.const 112 i32.const 24 i32.const 0 call $~lib/env/abort @@ -901,7 +901,7 @@ i32.ne if i32.const 0 - i32.const 104 + i32.const 112 i32.const 28 i32.const 0 call $~lib/env/abort @@ -920,7 +920,7 @@ i32.ne if i32.const 0 - i32.const 104 + i32.const 112 i32.const 32 i32.const 0 call $~lib/env/abort @@ -937,7 +937,7 @@ i32.load offset=4 if i32.const 0 - i32.const 104 + i32.const 112 i32.const 36 i32.const 0 call $~lib/env/abort @@ -947,16 +947,16 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 37 i32.const 0 call $~lib/env/abort unreachable end i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor global.set $std/arraybuffer/arr8 @@ -971,7 +971,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 47 i32.const 0 call $~lib/env/abort @@ -980,9 +980,9 @@ block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array>11 (result i32) i32.const 1 i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 6 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array>11 @@ -992,7 +992,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 48 i32.const 0 call $~lib/env/abort @@ -1012,7 +1012,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 49 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index e1550142fa..00dee2f80f 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -9,10 +9,10 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 56) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 96) "\01\00\00\00$\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 144) "\02\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 160) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 56) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 104) "\01\00\00\00$\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 152) "\02\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 168) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) @@ -25,7 +25,7 @@ (global $std/arraybuffer/sliced (mut i32) (i32.const 0)) (global $std/arraybuffer/arr8 (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 200)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 208)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -125,7 +125,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -398,7 +398,7 @@ end end ) - (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -407,8 +407,8 @@ if i32.const 0 i32.const 64 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -424,8 +424,8 @@ if i32.const 0 i32.const 64 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -448,7 +448,7 @@ unreachable end local.get $1 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 local.get $2 i32.const 0 @@ -456,7 +456,7 @@ call $~lib/memory/memory.fill local.get $2 i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -744,7 +744,7 @@ select local.set $6 local.get $6 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $7 local.get $7 local.get $0 @@ -754,7 +754,7 @@ call $~lib/memory/memory.copy local.get $7 i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array> (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -1353,9 +1353,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1385,9 +1385,9 @@ local.get $0 else i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end local.get $1 i32.const 0 @@ -1400,18 +1400,18 @@ (local $5 i32) (local $6 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.get $2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $4 local.get $0 local.get $1 i32.shl local.set $5 local.get $5 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $6 local.get $4 local.get $6 @@ -1440,9 +1440,9 @@ local.get $0 else i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 6 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end local.get $1 i32.const 2 @@ -1464,7 +1464,7 @@ i32.or if i32.const 0 - i32.const 168 + i32.const 176 i32.const 21 i32.const 6 call $~lib/env/abort @@ -1475,9 +1475,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 7 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1556,7 +1556,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 3 i32.const 0 call $~lib/env/abort @@ -1574,7 +1574,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 7 i32.const 0 call $~lib/env/abort @@ -1586,7 +1586,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 8 i32.const 0 call $~lib/env/abort @@ -1604,7 +1604,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 12 i32.const 0 call $~lib/env/abort @@ -1622,7 +1622,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 16 i32.const 0 call $~lib/env/abort @@ -1640,7 +1640,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 20 i32.const 0 call $~lib/env/abort @@ -1658,7 +1658,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 24 i32.const 0 call $~lib/env/abort @@ -1676,7 +1676,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 28 i32.const 0 call $~lib/env/abort @@ -1694,7 +1694,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 32 i32.const 0 call $~lib/env/abort @@ -1712,7 +1712,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 36 i32.const 0 call $~lib/env/abort @@ -1724,7 +1724,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 37 i32.const 0 call $~lib/env/abort @@ -1736,7 +1736,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 39 i32.const 0 call $~lib/env/abort @@ -1748,7 +1748,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 40 i32.const 0 call $~lib/env/abort @@ -1760,7 +1760,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 41 i32.const 0 call $~lib/env/abort @@ -1772,7 +1772,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 42 i32.const 0 call $~lib/env/abort @@ -1784,7 +1784,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 43 i32.const 0 call $~lib/env/abort @@ -1797,14 +1797,14 @@ i32.const 2 i32.const 2 i32.const 5 - i32.const 152 + i32.const 160 call $~lib/runtime/runtime.newArray call $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array> i32.eqz i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 46 i32.const 0 call $~lib/env/abort @@ -1815,7 +1815,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 47 i32.const 0 call $~lib/env/abort @@ -1828,7 +1828,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 48 i32.const 0 call $~lib/env/abort @@ -1848,7 +1848,7 @@ i32.eqz if i32.const 0 - i32.const 104 + i32.const 112 i32.const 49 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 8bd5caa8c6..cec7a2f001 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -16,10 +16,10 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 56) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 96) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 144) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") - (data (i32.const 184) "\01\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 56) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 104) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 152) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 192) "\01\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -92,7 +92,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -157,16 +157,16 @@ i32.const 0 i32.store8 ) - (func $~lib/runtime/runtime.register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 224 + i32.const 232 i32.le_u if i32.const 0 i32.const 64 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -180,8 +180,8 @@ if i32.const 0 i32.const 64 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -193,20 +193,20 @@ (func $~lib/arraybuffer/ArrayBufferView#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $1 call $~lib/memory/memory.fill local.get $1 i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $1 local.get $0 i32.eqz if i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -236,8 +236,8 @@ i32.ge_u if i32.const 0 - i32.const 104 - i32.const 115 + i32.const 112 + i32.const 116 i32.const 44 call $~lib/env/abort unreachable @@ -265,16 +265,16 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 21 i32.const 6 call $~lib/env/abort unreachable end i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $3 i32.const 0 i32.store @@ -310,7 +310,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 44 i32.const 6 call $~lib/env/abort @@ -376,7 +376,7 @@ i32.gt_s if i32.const 0 - i32.const 152 + i32.const 160 i32.const 58 i32.const 7 call $~lib/env/abort @@ -402,7 +402,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 160 i32.const 69 i32.const 49 call $~lib/env/abort @@ -427,7 +427,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 77 i32.const 7 call $~lib/env/abort @@ -469,7 +469,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 86 i32.const 7 call $~lib/env/abort @@ -506,7 +506,7 @@ i32.gt_s if i32.const 0 - i32.const 152 + i32.const 160 i32.const 180 i32.const 6 call $~lib/env/abort @@ -531,7 +531,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 160 i32.const 92 i32.const 49 call $~lib/env/abort @@ -556,7 +556,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 100 i32.const 6 call $~lib/env/abort @@ -596,7 +596,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 109 i32.const 6 call $~lib/env/abort @@ -633,7 +633,7 @@ i32.gt_s if i32.const 0 - i32.const 152 + i32.const 160 i32.const 189 i32.const 6 call $~lib/env/abort @@ -658,7 +658,7 @@ i32.gt_s if i32.const 0 - i32.const 152 + i32.const 160 i32.const 118 i32.const 6 call $~lib/env/abort @@ -696,7 +696,7 @@ i32.gt_s if i32.const 0 - i32.const 152 + i32.const 160 i32.const 127 i32.const 6 call $~lib/env/abort @@ -724,7 +724,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 160 i32.const 133 i32.const 49 call $~lib/env/abort @@ -742,7 +742,7 @@ i32.gt_s if i32.const 0 - i32.const 152 + i32.const 160 i32.const 141 i32.const 6 call $~lib/env/abort @@ -778,7 +778,7 @@ i32.gt_s if i32.const 0 - i32.const 152 + i32.const 160 i32.const 149 i32.const 6 call $~lib/env/abort @@ -814,7 +814,7 @@ i32.gt_s if i32.const 0 - i32.const 152 + i32.const 160 i32.const 198 i32.const 6 call $~lib/env/abort @@ -838,7 +838,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 160 i32.const 154 i32.const 49 call $~lib/env/abort @@ -856,7 +856,7 @@ i32.gt_s if i32.const 0 - i32.const 152 + i32.const 160 i32.const 162 i32.const 6 call $~lib/env/abort @@ -890,7 +890,7 @@ i32.gt_s if i32.const 0 - i32.const 152 + i32.const 160 i32.const 170 i32.const 6 call $~lib/env/abort @@ -926,7 +926,7 @@ i32.gt_s if i32.const 0 - i32.const 152 + i32.const 160 i32.const 206 i32.const 6 call $~lib/env/abort @@ -968,14 +968,14 @@ ) (func $start:std/dataview (; 30 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 224 + i32.const 232 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register call $~lib/arraybuffer/ArrayBufferView#constructor global.set $std/dataview/array global.get $std/dataview/array @@ -1030,7 +1030,7 @@ f32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 14 i32.const 0 call $~lib/env/abort @@ -1044,7 +1044,7 @@ f32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 15 i32.const 0 call $~lib/env/abort @@ -1058,7 +1058,7 @@ f32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 16 i32.const 0 call $~lib/env/abort @@ -1072,7 +1072,7 @@ f32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 17 i32.const 0 call $~lib/env/abort @@ -1086,7 +1086,7 @@ f32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 18 i32.const 0 call $~lib/env/abort @@ -1100,7 +1100,7 @@ f32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 20 i32.const 0 call $~lib/env/abort @@ -1114,7 +1114,7 @@ f32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 21 i32.const 0 call $~lib/env/abort @@ -1128,7 +1128,7 @@ f32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 22 i32.const 0 call $~lib/env/abort @@ -1142,7 +1142,7 @@ f32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 23 i32.const 0 call $~lib/env/abort @@ -1156,7 +1156,7 @@ f32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 24 i32.const 0 call $~lib/env/abort @@ -1169,7 +1169,7 @@ f64.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 26 i32.const 0 call $~lib/env/abort @@ -1182,7 +1182,7 @@ f64.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 27 i32.const 0 call $~lib/env/abort @@ -1195,7 +1195,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 29 i32.const 0 call $~lib/env/abort @@ -1208,7 +1208,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 30 i32.const 0 call $~lib/env/abort @@ -1221,7 +1221,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 31 i32.const 0 call $~lib/env/abort @@ -1234,7 +1234,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 32 i32.const 0 call $~lib/env/abort @@ -1247,7 +1247,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 33 i32.const 0 call $~lib/env/abort @@ -1260,7 +1260,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 34 i32.const 0 call $~lib/env/abort @@ -1273,7 +1273,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 35 i32.const 0 call $~lib/env/abort @@ -1286,7 +1286,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 36 i32.const 0 call $~lib/env/abort @@ -1302,7 +1302,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 38 i32.const 0 call $~lib/env/abort @@ -1318,7 +1318,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 39 i32.const 0 call $~lib/env/abort @@ -1334,7 +1334,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 40 i32.const 0 call $~lib/env/abort @@ -1350,7 +1350,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 41 i32.const 0 call $~lib/env/abort @@ -1366,7 +1366,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 42 i32.const 0 call $~lib/env/abort @@ -1382,7 +1382,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 43 i32.const 0 call $~lib/env/abort @@ -1398,7 +1398,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 44 i32.const 0 call $~lib/env/abort @@ -1414,7 +1414,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 46 i32.const 0 call $~lib/env/abort @@ -1430,7 +1430,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 47 i32.const 0 call $~lib/env/abort @@ -1446,7 +1446,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 48 i32.const 0 call $~lib/env/abort @@ -1462,7 +1462,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 49 i32.const 0 call $~lib/env/abort @@ -1478,7 +1478,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 50 i32.const 0 call $~lib/env/abort @@ -1494,7 +1494,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 51 i32.const 0 call $~lib/env/abort @@ -1510,7 +1510,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 52 i32.const 0 call $~lib/env/abort @@ -1524,7 +1524,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 54 i32.const 0 call $~lib/env/abort @@ -1538,7 +1538,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 55 i32.const 0 call $~lib/env/abort @@ -1552,7 +1552,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 56 i32.const 0 call $~lib/env/abort @@ -1566,7 +1566,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 57 i32.const 0 call $~lib/env/abort @@ -1580,7 +1580,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 58 i32.const 0 call $~lib/env/abort @@ -1594,7 +1594,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 60 i32.const 0 call $~lib/env/abort @@ -1608,7 +1608,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 61 i32.const 0 call $~lib/env/abort @@ -1622,7 +1622,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 62 i32.const 0 call $~lib/env/abort @@ -1636,7 +1636,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 63 i32.const 0 call $~lib/env/abort @@ -1650,7 +1650,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 64 i32.const 0 call $~lib/env/abort @@ -1663,7 +1663,7 @@ i64.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 66 i32.const 0 call $~lib/env/abort @@ -1676,7 +1676,7 @@ i64.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 67 i32.const 0 call $~lib/env/abort @@ -1689,7 +1689,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 69 i32.const 0 call $~lib/env/abort @@ -1702,7 +1702,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 70 i32.const 0 call $~lib/env/abort @@ -1715,7 +1715,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 71 i32.const 0 call $~lib/env/abort @@ -1728,7 +1728,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 72 i32.const 0 call $~lib/env/abort @@ -1741,7 +1741,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 73 i32.const 0 call $~lib/env/abort @@ -1754,7 +1754,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 74 i32.const 0 call $~lib/env/abort @@ -1767,7 +1767,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 75 i32.const 0 call $~lib/env/abort @@ -1780,7 +1780,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 76 i32.const 0 call $~lib/env/abort @@ -1796,7 +1796,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 78 i32.const 0 call $~lib/env/abort @@ -1812,7 +1812,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 79 i32.const 0 call $~lib/env/abort @@ -1828,7 +1828,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 80 i32.const 0 call $~lib/env/abort @@ -1844,7 +1844,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 81 i32.const 0 call $~lib/env/abort @@ -1860,7 +1860,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 82 i32.const 0 call $~lib/env/abort @@ -1876,7 +1876,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 83 i32.const 0 call $~lib/env/abort @@ -1892,7 +1892,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 84 i32.const 0 call $~lib/env/abort @@ -1908,7 +1908,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 86 i32.const 0 call $~lib/env/abort @@ -1924,7 +1924,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 87 i32.const 0 call $~lib/env/abort @@ -1940,7 +1940,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 88 i32.const 0 call $~lib/env/abort @@ -1956,7 +1956,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 89 i32.const 0 call $~lib/env/abort @@ -1972,7 +1972,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 90 i32.const 0 call $~lib/env/abort @@ -1988,7 +1988,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 91 i32.const 0 call $~lib/env/abort @@ -2004,7 +2004,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 92 i32.const 0 call $~lib/env/abort @@ -2018,7 +2018,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 94 i32.const 0 call $~lib/env/abort @@ -2032,7 +2032,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 95 i32.const 0 call $~lib/env/abort @@ -2046,7 +2046,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 96 i32.const 0 call $~lib/env/abort @@ -2060,7 +2060,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 97 i32.const 0 call $~lib/env/abort @@ -2074,7 +2074,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 98 i32.const 0 call $~lib/env/abort @@ -2088,7 +2088,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 100 i32.const 0 call $~lib/env/abort @@ -2102,7 +2102,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 101 i32.const 0 call $~lib/env/abort @@ -2116,7 +2116,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 102 i32.const 0 call $~lib/env/abort @@ -2130,7 +2130,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 103 i32.const 0 call $~lib/env/abort @@ -2144,7 +2144,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 104 i32.const 0 call $~lib/env/abort @@ -2157,7 +2157,7 @@ i64.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 106 i32.const 0 call $~lib/env/abort @@ -2170,7 +2170,7 @@ i64.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 107 i32.const 0 call $~lib/env/abort @@ -2188,7 +2188,7 @@ f32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 110 i32.const 0 call $~lib/env/abort @@ -2206,7 +2206,7 @@ f32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 113 i32.const 0 call $~lib/env/abort @@ -2223,7 +2223,7 @@ f64.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 116 i32.const 0 call $~lib/env/abort @@ -2240,7 +2240,7 @@ f64.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 119 i32.const 0 call $~lib/env/abort @@ -2255,7 +2255,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 122 i32.const 0 call $~lib/env/abort @@ -2275,7 +2275,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 125 i32.const 0 call $~lib/env/abort @@ -2295,7 +2295,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 128 i32.const 0 call $~lib/env/abort @@ -2313,7 +2313,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 131 i32.const 0 call $~lib/env/abort @@ -2331,7 +2331,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 134 i32.const 0 call $~lib/env/abort @@ -2348,7 +2348,7 @@ i64.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 137 i32.const 0 call $~lib/env/abort @@ -2365,7 +2365,7 @@ i64.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 140 i32.const 0 call $~lib/env/abort @@ -2380,7 +2380,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 143 i32.const 0 call $~lib/env/abort @@ -2400,7 +2400,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 146 i32.const 0 call $~lib/env/abort @@ -2420,7 +2420,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 149 i32.const 0 call $~lib/env/abort @@ -2438,7 +2438,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 152 i32.const 0 call $~lib/env/abort @@ -2456,7 +2456,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 155 i32.const 0 call $~lib/env/abort @@ -2473,7 +2473,7 @@ i64.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 158 i32.const 0 call $~lib/env/abort @@ -2490,7 +2490,7 @@ i64.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 161 i32.const 0 call $~lib/env/abort @@ -2510,7 +2510,7 @@ i32.sub if i32.const 0 - i32.const 192 + i32.const 200 i32.const 164 i32.const 0 call $~lib/env/abort @@ -2522,7 +2522,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 200 i32.const 165 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index e75653c0e4..caabcb0149 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -16,10 +16,10 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 56) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 96) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 144) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") - (data (i32.const 184) "\01\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 56) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 104) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 152) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 192) "\01\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) @@ -31,7 +31,7 @@ (global $std/dataview/array (mut i32) (i32.const 0)) (global $std/dataview/view (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 224)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 232)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -131,7 +131,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -404,7 +404,7 @@ end end ) - (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -413,8 +413,8 @@ if i32.const 0 i32.const 64 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -430,8 +430,8 @@ if i32.const 0 i32.const 64 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -454,7 +454,7 @@ unreachable end local.get $1 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 local.get $2 i32.const 0 @@ -462,7 +462,7 @@ call $~lib/memory/memory.fill local.get $2 i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/arraybuffer/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -491,9 +491,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -523,9 +523,9 @@ local.get $0 else i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end local.get $1 i32.const 0 @@ -540,8 +540,8 @@ i32.ge_u if i32.const 0 - i32.const 104 - i32.const 115 + i32.const 112 + i32.const 116 i32.const 44 call $~lib/env/abort unreachable @@ -573,7 +573,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 21 i32.const 6 call $~lib/env/abort @@ -584,9 +584,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -656,7 +656,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 44 i32.const 6 call $~lib/env/abort @@ -733,7 +733,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 58 i32.const 7 call $~lib/env/abort @@ -765,7 +765,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 160 i32.const 69 i32.const 49 call $~lib/env/abort @@ -807,7 +807,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 77 i32.const 7 call $~lib/env/abort @@ -857,7 +857,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 86 i32.const 7 call $~lib/env/abort @@ -932,7 +932,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 180 i32.const 6 call $~lib/env/abort @@ -961,7 +961,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 160 i32.const 92 i32.const 49 call $~lib/env/abort @@ -1001,7 +1001,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 100 i32.const 6 call $~lib/env/abort @@ -1037,7 +1037,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 109 i32.const 6 call $~lib/env/abort @@ -1073,7 +1073,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 189 i32.const 6 call $~lib/env/abort @@ -1108,7 +1108,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 118 i32.const 6 call $~lib/env/abort @@ -1148,7 +1148,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 127 i32.const 6 call $~lib/env/abort @@ -1182,7 +1182,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 160 i32.const 133 i32.const 49 call $~lib/env/abort @@ -1208,7 +1208,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 141 i32.const 6 call $~lib/env/abort @@ -1242,7 +1242,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 149 i32.const 6 call $~lib/env/abort @@ -1276,7 +1276,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 198 i32.const 6 call $~lib/env/abort @@ -1304,7 +1304,7 @@ i32.ge_u if i32.const 0 - i32.const 152 + i32.const 160 i32.const 154 i32.const 49 call $~lib/env/abort @@ -1330,7 +1330,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 162 i32.const 6 call $~lib/env/abort @@ -1364,7 +1364,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 170 i32.const 6 call $~lib/env/abort @@ -1398,7 +1398,7 @@ i32.or if i32.const 0 - i32.const 152 + i32.const 160 i32.const 206 i32.const 6 call $~lib/env/abort @@ -1520,7 +1520,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 14 i32.const 0 call $~lib/env/abort @@ -1535,7 +1535,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 15 i32.const 0 call $~lib/env/abort @@ -1550,7 +1550,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 16 i32.const 0 call $~lib/env/abort @@ -1565,7 +1565,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 17 i32.const 0 call $~lib/env/abort @@ -1580,7 +1580,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 18 i32.const 0 call $~lib/env/abort @@ -1595,7 +1595,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 20 i32.const 0 call $~lib/env/abort @@ -1610,7 +1610,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 21 i32.const 0 call $~lib/env/abort @@ -1625,7 +1625,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 22 i32.const 0 call $~lib/env/abort @@ -1640,7 +1640,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 23 i32.const 0 call $~lib/env/abort @@ -1655,7 +1655,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 24 i32.const 0 call $~lib/env/abort @@ -1670,7 +1670,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 26 i32.const 0 call $~lib/env/abort @@ -1685,7 +1685,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 27 i32.const 0 call $~lib/env/abort @@ -1699,7 +1699,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 29 i32.const 0 call $~lib/env/abort @@ -1713,7 +1713,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 30 i32.const 0 call $~lib/env/abort @@ -1727,7 +1727,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 31 i32.const 0 call $~lib/env/abort @@ -1741,7 +1741,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 32 i32.const 0 call $~lib/env/abort @@ -1755,7 +1755,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 33 i32.const 0 call $~lib/env/abort @@ -1769,7 +1769,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 34 i32.const 0 call $~lib/env/abort @@ -1783,7 +1783,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 35 i32.const 0 call $~lib/env/abort @@ -1797,7 +1797,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 36 i32.const 0 call $~lib/env/abort @@ -1816,7 +1816,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 38 i32.const 0 call $~lib/env/abort @@ -1835,7 +1835,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 39 i32.const 0 call $~lib/env/abort @@ -1854,7 +1854,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 40 i32.const 0 call $~lib/env/abort @@ -1873,7 +1873,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 41 i32.const 0 call $~lib/env/abort @@ -1892,7 +1892,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 42 i32.const 0 call $~lib/env/abort @@ -1911,7 +1911,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 43 i32.const 0 call $~lib/env/abort @@ -1930,7 +1930,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 44 i32.const 0 call $~lib/env/abort @@ -1949,7 +1949,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 46 i32.const 0 call $~lib/env/abort @@ -1968,7 +1968,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 47 i32.const 0 call $~lib/env/abort @@ -1987,7 +1987,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 48 i32.const 0 call $~lib/env/abort @@ -2006,7 +2006,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 49 i32.const 0 call $~lib/env/abort @@ -2025,7 +2025,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 50 i32.const 0 call $~lib/env/abort @@ -2044,7 +2044,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 51 i32.const 0 call $~lib/env/abort @@ -2063,7 +2063,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 52 i32.const 0 call $~lib/env/abort @@ -2078,7 +2078,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 54 i32.const 0 call $~lib/env/abort @@ -2093,7 +2093,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 55 i32.const 0 call $~lib/env/abort @@ -2108,7 +2108,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 56 i32.const 0 call $~lib/env/abort @@ -2123,7 +2123,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 57 i32.const 0 call $~lib/env/abort @@ -2138,7 +2138,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 58 i32.const 0 call $~lib/env/abort @@ -2153,7 +2153,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 60 i32.const 0 call $~lib/env/abort @@ -2168,7 +2168,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 61 i32.const 0 call $~lib/env/abort @@ -2183,7 +2183,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 62 i32.const 0 call $~lib/env/abort @@ -2198,7 +2198,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 63 i32.const 0 call $~lib/env/abort @@ -2213,7 +2213,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 64 i32.const 0 call $~lib/env/abort @@ -2228,7 +2228,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 66 i32.const 0 call $~lib/env/abort @@ -2243,7 +2243,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 67 i32.const 0 call $~lib/env/abort @@ -2257,7 +2257,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 69 i32.const 0 call $~lib/env/abort @@ -2271,7 +2271,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 70 i32.const 0 call $~lib/env/abort @@ -2285,7 +2285,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 71 i32.const 0 call $~lib/env/abort @@ -2299,7 +2299,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 72 i32.const 0 call $~lib/env/abort @@ -2313,7 +2313,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 73 i32.const 0 call $~lib/env/abort @@ -2327,7 +2327,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 74 i32.const 0 call $~lib/env/abort @@ -2341,7 +2341,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 75 i32.const 0 call $~lib/env/abort @@ -2355,7 +2355,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 76 i32.const 0 call $~lib/env/abort @@ -2372,7 +2372,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 78 i32.const 0 call $~lib/env/abort @@ -2389,7 +2389,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 79 i32.const 0 call $~lib/env/abort @@ -2406,7 +2406,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 80 i32.const 0 call $~lib/env/abort @@ -2423,7 +2423,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 81 i32.const 0 call $~lib/env/abort @@ -2440,7 +2440,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 82 i32.const 0 call $~lib/env/abort @@ -2457,7 +2457,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 83 i32.const 0 call $~lib/env/abort @@ -2474,7 +2474,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 84 i32.const 0 call $~lib/env/abort @@ -2491,7 +2491,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 86 i32.const 0 call $~lib/env/abort @@ -2508,7 +2508,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 87 i32.const 0 call $~lib/env/abort @@ -2525,7 +2525,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 88 i32.const 0 call $~lib/env/abort @@ -2542,7 +2542,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 89 i32.const 0 call $~lib/env/abort @@ -2559,7 +2559,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 90 i32.const 0 call $~lib/env/abort @@ -2576,7 +2576,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 91 i32.const 0 call $~lib/env/abort @@ -2593,7 +2593,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 92 i32.const 0 call $~lib/env/abort @@ -2608,7 +2608,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 94 i32.const 0 call $~lib/env/abort @@ -2623,7 +2623,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 95 i32.const 0 call $~lib/env/abort @@ -2638,7 +2638,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 96 i32.const 0 call $~lib/env/abort @@ -2653,7 +2653,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 97 i32.const 0 call $~lib/env/abort @@ -2668,7 +2668,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 98 i32.const 0 call $~lib/env/abort @@ -2683,7 +2683,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 100 i32.const 0 call $~lib/env/abort @@ -2698,7 +2698,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 101 i32.const 0 call $~lib/env/abort @@ -2713,7 +2713,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 102 i32.const 0 call $~lib/env/abort @@ -2728,7 +2728,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 103 i32.const 0 call $~lib/env/abort @@ -2743,7 +2743,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 104 i32.const 0 call $~lib/env/abort @@ -2758,7 +2758,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 106 i32.const 0 call $~lib/env/abort @@ -2773,7 +2773,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 107 i32.const 0 call $~lib/env/abort @@ -2793,7 +2793,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 110 i32.const 0 call $~lib/env/abort @@ -2813,7 +2813,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 113 i32.const 0 call $~lib/env/abort @@ -2833,7 +2833,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 116 i32.const 0 call $~lib/env/abort @@ -2853,7 +2853,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 119 i32.const 0 call $~lib/env/abort @@ -2871,7 +2871,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 122 i32.const 0 call $~lib/env/abort @@ -2895,7 +2895,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 125 i32.const 0 call $~lib/env/abort @@ -2919,7 +2919,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 128 i32.const 0 call $~lib/env/abort @@ -2939,7 +2939,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 131 i32.const 0 call $~lib/env/abort @@ -2959,7 +2959,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 134 i32.const 0 call $~lib/env/abort @@ -2979,7 +2979,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 137 i32.const 0 call $~lib/env/abort @@ -2999,7 +2999,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 140 i32.const 0 call $~lib/env/abort @@ -3017,7 +3017,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 143 i32.const 0 call $~lib/env/abort @@ -3039,7 +3039,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 146 i32.const 0 call $~lib/env/abort @@ -3061,7 +3061,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 149 i32.const 0 call $~lib/env/abort @@ -3081,7 +3081,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 152 i32.const 0 call $~lib/env/abort @@ -3101,7 +3101,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 155 i32.const 0 call $~lib/env/abort @@ -3121,7 +3121,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 158 i32.const 0 call $~lib/env/abort @@ -3141,7 +3141,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 161 i32.const 0 call $~lib/env/abort @@ -3165,7 +3165,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 164 i32.const 0 call $~lib/env/abort @@ -3178,7 +3178,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 200 i32.const 165 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index b642e87ed5..8cea4628ab 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -9,7 +9,7 @@ (import "Date" "now" (func $~lib/bindings/Date/now (result f64))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\16\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s") - (data (i32.const 40) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 40) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/date/creationTime (mut i64) (i64.const 0)) @@ -81,16 +81,16 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.register (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/register (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 80 + i32.const 88 i32.le_u if i32.const 0 i32.const 48 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -104,8 +104,8 @@ if i32.const 0 i32.const 48 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -188,7 +188,7 @@ call $~lib/env/abort unreachable end - i32.const 80 + i32.const 88 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -205,7 +205,7 @@ local.get $0 i32.const 8 i32.add - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i64.const 0 i64.store diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 541650475b..c226b9a8d9 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -13,7 +13,7 @@ (import "Date" "now" (func $~lib/bindings/Date/now (result f64))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\16\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s\00") - (data (i32.const 40) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 40) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/date/creationTime (mut i64) (i64.const 0)) @@ -23,7 +23,7 @@ (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/date/date (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 80)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 88)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -123,7 +123,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -139,7 +139,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -148,8 +148,8 @@ if i32.const 0 i32.const 48 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -165,8 +165,8 @@ if i32.const 0 i32.const 48 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -181,9 +181,9 @@ i32.eqz if i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index cc008a452d..cd823e7241 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -23,12 +23,12 @@ (type $FUNCSIG$vid (func (param i32 f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e") - (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 56) "\02\00\00\00&") - (data (i32.const 72) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 112) "\02\00\00\00\14") - (data (i32.const 128) "s\00t\00d\00/\00m\00a\00p\00.\00t\00s") + (data (i32.const 8) "\02\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\02\00\00\00&") + (data (i32.const 80) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 120) "\02\00\00\00\14") + (data (i32.const 136) "s\00t\00d\00/\00m\00a\00p\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -36,7 +36,7 @@ (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -100,7 +100,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -127,16 +127,16 @@ i32.const 16 i32.add ) - (func $~lib/runtime/runtime.register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 148 + i32.const 156 i32.le_u if i32.const 0 i32.const 24 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -150,8 +150,8 @@ if i32.const 0 i32.const 24 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -378,20 +378,20 @@ i32.gt_u if i32.const 0 - i32.const 72 + i32.const 80 i32.const 54 i32.const 43 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $1 local.get $0 call $~lib/memory/memory.fill local.get $1 i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/map/Map#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) @@ -431,9 +431,9 @@ (func $~lib/map/Map#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -829,7 +829,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -851,7 +851,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -870,7 +870,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -891,7 +891,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -910,7 +910,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -929,7 +929,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -951,7 +951,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -970,7 +970,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -991,7 +991,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -1010,7 +1010,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -1029,7 +1029,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -1043,7 +1043,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -1064,7 +1064,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -1082,7 +1082,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -1104,7 +1104,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -1118,7 +1118,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -1139,7 +1139,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -1151,7 +1151,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort @@ -1161,9 +1161,9 @@ (func $~lib/map/Map#constructor (; 15 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -1506,7 +1506,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -1526,7 +1526,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -1543,7 +1543,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -1564,7 +1564,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -1583,7 +1583,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -1600,7 +1600,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -1620,7 +1620,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -1637,7 +1637,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -1658,7 +1658,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -1677,7 +1677,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -1694,7 +1694,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -1708,7 +1708,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -1729,7 +1729,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -1747,7 +1747,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -1767,7 +1767,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -1781,7 +1781,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -1802,7 +1802,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -1814,7 +1814,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort @@ -1824,9 +1824,9 @@ (func $~lib/map/Map#constructor (; 22 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -2267,7 +2267,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -2289,7 +2289,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -2308,7 +2308,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -2329,7 +2329,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -2348,7 +2348,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -2367,7 +2367,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -2389,7 +2389,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -2408,7 +2408,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -2429,7 +2429,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -2448,7 +2448,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -2467,7 +2467,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -2481,7 +2481,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -2502,7 +2502,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -2520,7 +2520,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -2542,7 +2542,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -2556,7 +2556,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -2577,7 +2577,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -2589,7 +2589,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort @@ -2599,9 +2599,9 @@ (func $~lib/map/Map#constructor (; 30 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 6 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -2989,7 +2989,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -3009,7 +3009,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -3026,7 +3026,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -3047,7 +3047,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -3066,7 +3066,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -3083,7 +3083,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -3103,7 +3103,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -3120,7 +3120,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -3141,7 +3141,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -3160,7 +3160,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -3177,7 +3177,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -3191,7 +3191,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -3212,7 +3212,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -3230,7 +3230,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -3250,7 +3250,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -3264,7 +3264,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -3285,7 +3285,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -3297,7 +3297,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort @@ -3307,9 +3307,9 @@ (func $~lib/map/Map#constructor (; 37 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 7 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -3701,7 +3701,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -3719,7 +3719,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -3734,7 +3734,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -3755,7 +3755,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -3774,7 +3774,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -3789,7 +3789,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -3807,7 +3807,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -3822,7 +3822,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -3843,7 +3843,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -3862,7 +3862,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -3877,7 +3877,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -3891,7 +3891,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -3912,7 +3912,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -3930,7 +3930,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -3948,7 +3948,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -3962,7 +3962,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -3983,7 +3983,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -3995,7 +3995,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort @@ -4005,9 +4005,9 @@ (func $~lib/map/Map#constructor (; 46 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 8 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -4045,7 +4045,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -4063,7 +4063,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -4078,7 +4078,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -4099,7 +4099,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -4118,7 +4118,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -4133,7 +4133,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -4151,7 +4151,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -4166,7 +4166,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -4187,7 +4187,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -4206,7 +4206,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -4221,7 +4221,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -4235,7 +4235,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -4256,7 +4256,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -4274,7 +4274,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -4292,7 +4292,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -4306,7 +4306,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -4327,7 +4327,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -4339,7 +4339,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort @@ -4384,9 +4384,9 @@ (func $~lib/map/Map#constructor (; 49 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 9 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -4814,7 +4814,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -4833,7 +4833,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -4849,7 +4849,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -4870,7 +4870,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -4889,7 +4889,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -4905,7 +4905,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -4924,7 +4924,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -4940,7 +4940,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -4961,7 +4961,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -4980,7 +4980,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -4996,7 +4996,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -5010,7 +5010,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -5031,7 +5031,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -5049,7 +5049,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -5068,7 +5068,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -5082,7 +5082,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -5103,7 +5103,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -5115,7 +5115,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort @@ -5125,9 +5125,9 @@ (func $~lib/map/Map#constructor (; 58 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 10 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -5165,7 +5165,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -5184,7 +5184,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -5200,7 +5200,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -5221,7 +5221,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -5240,7 +5240,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -5256,7 +5256,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -5275,7 +5275,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -5291,7 +5291,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -5312,7 +5312,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -5331,7 +5331,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -5347,7 +5347,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -5361,7 +5361,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -5382,7 +5382,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -5400,7 +5400,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -5419,7 +5419,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -5433,7 +5433,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -5454,7 +5454,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -5466,7 +5466,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort @@ -5476,9 +5476,9 @@ (func $~lib/map/Map#constructor (; 60 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 11 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -5845,7 +5845,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -5864,7 +5864,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -5880,7 +5880,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -5901,7 +5901,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -5920,7 +5920,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -5936,7 +5936,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -5955,7 +5955,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -5971,7 +5971,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -5992,7 +5992,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -6011,7 +6011,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -6027,7 +6027,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -6041,7 +6041,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -6062,7 +6062,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -6080,7 +6080,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -6099,7 +6099,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -6113,7 +6113,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -6134,7 +6134,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -6146,7 +6146,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort @@ -6156,9 +6156,9 @@ (func $~lib/map/Map#constructor (; 68 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 12 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -6525,7 +6525,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -6544,7 +6544,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -6560,7 +6560,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -6581,7 +6581,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -6600,7 +6600,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -6616,7 +6616,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -6635,7 +6635,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -6651,7 +6651,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -6672,7 +6672,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -6691,7 +6691,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -6707,7 +6707,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -6721,7 +6721,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -6742,7 +6742,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -6760,7 +6760,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -6779,7 +6779,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -6793,7 +6793,7 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -6814,7 +6814,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -6826,7 +6826,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort @@ -6834,7 +6834,7 @@ end ) (func $start (; 76 ;) (type $FUNCSIG$v) - i32.const 152 + i32.const 160 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 3cb23689fc..e10187c57e 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -19,9 +19,9 @@ (type $FUNCSIG$vidi (func (param i32 f64 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 56) "\02\00\00\00&\00\00\00\00\00\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 112) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") + (data (i32.const 8) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\02\00\00\00&\00\00\00\00\00\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 120) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -30,11 +30,11 @@ (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 148)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 156)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -132,7 +132,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -157,7 +157,7 @@ (func $~lib/collector/dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -166,8 +166,8 @@ if i32.const 0 i32.const 24 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -183,8 +183,8 @@ if i32.const 0 i32.const 24 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -459,14 +459,14 @@ i32.gt_u if i32.const 0 - i32.const 72 + i32.const 80 i32.const 54 i32.const 43 call $~lib/env/abort unreachable end local.get $1 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 local.get $2 i32.const 0 @@ -474,7 +474,7 @@ call $~lib/memory/memory.fill local.get $2 i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop @@ -557,9 +557,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1078,7 +1078,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -1100,7 +1100,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -1120,7 +1120,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -1143,7 +1143,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -1165,7 +1165,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -1185,7 +1185,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -1207,7 +1207,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -1227,7 +1227,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -1250,7 +1250,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -1272,7 +1272,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -1292,7 +1292,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -1309,7 +1309,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -1332,7 +1332,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -1355,7 +1355,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -1377,7 +1377,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -1394,7 +1394,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -1417,7 +1417,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -1432,7 +1432,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort @@ -1514,9 +1514,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -2018,7 +2018,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -2038,7 +2038,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -2056,7 +2056,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -2079,7 +2079,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -2101,7 +2101,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -2119,7 +2119,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -2139,7 +2139,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -2157,7 +2157,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -2180,7 +2180,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -2202,7 +2202,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -2220,7 +2220,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -2237,7 +2237,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -2260,7 +2260,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -2283,7 +2283,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -2303,7 +2303,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -2320,7 +2320,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -2343,7 +2343,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -2358,7 +2358,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort @@ -2440,9 +2440,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -2976,7 +2976,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -2998,7 +2998,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -3018,7 +3018,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -3041,7 +3041,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -3063,7 +3063,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -3083,7 +3083,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -3105,7 +3105,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -3125,7 +3125,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -3148,7 +3148,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -3170,7 +3170,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -3190,7 +3190,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -3207,7 +3207,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -3230,7 +3230,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -3253,7 +3253,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -3275,7 +3275,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -3292,7 +3292,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -3315,7 +3315,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -3330,7 +3330,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort @@ -3412,9 +3412,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 6 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -3916,7 +3916,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -3936,7 +3936,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -3954,7 +3954,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -3977,7 +3977,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -3999,7 +3999,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -4017,7 +4017,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -4037,7 +4037,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -4055,7 +4055,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -4078,7 +4078,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -4100,7 +4100,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -4118,7 +4118,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -4135,7 +4135,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -4158,7 +4158,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -4181,7 +4181,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -4201,7 +4201,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -4218,7 +4218,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -4241,7 +4241,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -4256,7 +4256,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort @@ -4338,9 +4338,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 7 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -4874,7 +4874,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -4892,7 +4892,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -4908,7 +4908,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -4931,7 +4931,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -4953,7 +4953,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -4969,7 +4969,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -4987,7 +4987,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -5003,7 +5003,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -5026,7 +5026,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -5048,7 +5048,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -5064,7 +5064,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -5081,7 +5081,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -5104,7 +5104,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -5127,7 +5127,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -5145,7 +5145,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -5162,7 +5162,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -5185,7 +5185,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -5200,7 +5200,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort @@ -5282,9 +5282,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 8 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -5776,7 +5776,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -5794,7 +5794,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -5810,7 +5810,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -5833,7 +5833,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -5855,7 +5855,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -5871,7 +5871,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -5889,7 +5889,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -5905,7 +5905,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -5928,7 +5928,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -5950,7 +5950,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -5966,7 +5966,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -5983,7 +5983,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -6006,7 +6006,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -6029,7 +6029,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -6047,7 +6047,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -6064,7 +6064,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -6087,7 +6087,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -6102,7 +6102,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort @@ -6184,9 +6184,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 9 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -6769,7 +6769,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -6788,7 +6788,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -6805,7 +6805,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -6828,7 +6828,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -6850,7 +6850,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -6867,7 +6867,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -6886,7 +6886,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -6903,7 +6903,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -6926,7 +6926,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -6948,7 +6948,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -6965,7 +6965,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -6982,7 +6982,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -7005,7 +7005,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -7028,7 +7028,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -7047,7 +7047,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -7064,7 +7064,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -7087,7 +7087,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -7102,7 +7102,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort @@ -7184,9 +7184,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 10 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -7681,7 +7681,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -7700,7 +7700,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -7717,7 +7717,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -7740,7 +7740,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -7762,7 +7762,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -7779,7 +7779,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -7798,7 +7798,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -7815,7 +7815,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -7838,7 +7838,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -7860,7 +7860,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -7877,7 +7877,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -7894,7 +7894,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -7917,7 +7917,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -7940,7 +7940,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -7959,7 +7959,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -7976,7 +7976,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -7999,7 +7999,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -8014,7 +8014,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort @@ -8096,9 +8096,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 11 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -8598,7 +8598,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -8617,7 +8617,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -8634,7 +8634,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -8657,7 +8657,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -8679,7 +8679,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -8696,7 +8696,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -8715,7 +8715,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -8732,7 +8732,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -8755,7 +8755,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -8777,7 +8777,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -8794,7 +8794,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -8811,7 +8811,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -8834,7 +8834,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -8857,7 +8857,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -8876,7 +8876,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -8893,7 +8893,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -8916,7 +8916,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -8931,7 +8931,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort @@ -9013,9 +9013,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 12 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -9515,7 +9515,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -9534,7 +9534,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -9551,7 +9551,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 11 i32.const 4 call $~lib/env/abort @@ -9574,7 +9574,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 13 i32.const 2 call $~lib/env/abort @@ -9596,7 +9596,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 17 i32.const 4 call $~lib/env/abort @@ -9613,7 +9613,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -9632,7 +9632,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 4 call $~lib/env/abort @@ -9649,7 +9649,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 21 i32.const 4 call $~lib/env/abort @@ -9672,7 +9672,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 23 i32.const 2 call $~lib/env/abort @@ -9694,7 +9694,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 27 i32.const 4 call $~lib/env/abort @@ -9711,7 +9711,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 4 call $~lib/env/abort @@ -9728,7 +9728,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 30 i32.const 4 call $~lib/env/abort @@ -9751,7 +9751,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 2 call $~lib/env/abort @@ -9774,7 +9774,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -9793,7 +9793,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 4 call $~lib/env/abort @@ -9810,7 +9810,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 40 i32.const 4 call $~lib/env/abort @@ -9833,7 +9833,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -9848,7 +9848,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 46 i32.const 2 call $~lib/env/abort diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 475ff6174d..b2449798b1 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -5,7 +5,7 @@ (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -76,16 +76,16 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.register (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/register (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 48 + i32.const 56 i32.le_u if i32.const 0 i32.const 16 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -99,8 +99,8 @@ if i32.const 0 i32.const 16 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -122,7 +122,7 @@ local.get $0 i32.const 8 i32.add - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 1 i32.store @@ -141,7 +141,7 @@ local.get $0 ) (func $start (; 4 ;) (type $FUNCSIG$v) - i32.const 48 + i32.const 56 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 5f31de7959..026b4b6fce 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -6,7 +6,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\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 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/new/AClass.aStaticField (mut i32) (i32.const 0)) @@ -16,7 +16,7 @@ (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/new/aClass (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -116,7 +116,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -132,7 +132,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -141,8 +141,8 @@ if i32.const 0 i32.const 16 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -158,8 +158,8 @@ if i32.const 0 i32.const 16 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -175,9 +175,9 @@ i32.eqz if i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index d6c9ef31bf..a300b711a1 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -8,10 +8,10 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00\16") (data (i32.const 24) "h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d") - (data (i32.const 48) "\01\00\00\00\1e") - (data (i32.const 64) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 96) "\01\00\00\00*") - (data (i32.const 112) "s\00t\00d\00/\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") + (data (i32.const 48) "\01\00\00\00(") + (data (i32.const 64) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 104) "\01\00\00\00*") + (data (i32.const 120) "s\00t\00d\00/\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -19,7 +19,7 @@ (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -83,7 +83,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -110,16 +110,16 @@ i32.const 16 i32.add ) - (func $~lib/runtime/runtime.register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 156 + i32.const 164 i32.le_u if i32.const 0 i32.const 64 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -133,8 +133,8 @@ if i32.const 0 i32.const 64 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -229,7 +229,7 @@ i32.ne if i32.const 0 - i32.const 112 + i32.const 120 i32.const 9 i32.const 2 call $~lib/env/abort @@ -241,7 +241,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 120 i32.const 10 i32.const 2 call $~lib/env/abort @@ -250,14 +250,14 @@ ) (func $start:std/object-literal (; 7 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 160 + i32.const 168 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 1 i32.store @@ -267,9 +267,9 @@ local.get $0 call $std/object-literal/bar i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 2 i32.store @@ -279,16 +279,16 @@ i32.ne if i32.const 0 - i32.const 112 + i32.const 120 i32.const 26 i32.const 2 call $~lib/env/abort unreachable end i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 3 i32.store @@ -298,7 +298,7 @@ i32.ne if i32.const 0 - i32.const 112 + i32.const 120 i32.const 21 i32.const 4 call $~lib/env/abort diff --git a/tests/compiler/std/object-literal.untouched.wat b/tests/compiler/std/object-literal.untouched.wat index 8d7a9821b6..dec6807015 100644 --- a/tests/compiler/std/object-literal.untouched.wat +++ b/tests/compiler/std/object-literal.untouched.wat @@ -8,8 +8,8 @@ (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d\00") - (data (i32.const 48) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 96) "\01\00\00\00*\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") + (data (i32.const 48) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 104) "\01\00\00\00*\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -17,11 +17,11 @@ (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 156)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 164)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -119,7 +119,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -144,7 +144,7 @@ (func $~lib/collector/dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -153,8 +153,8 @@ if i32.const 0 i32.const 64 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -170,8 +170,8 @@ if i32.const 0 i32.const 64 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -295,7 +295,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 120 i32.const 9 i32.const 2 call $~lib/env/abort @@ -308,7 +308,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 120 i32.const 10 i32.const 2 call $~lib/env/abort @@ -323,7 +323,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 120 i32.const 26 i32.const 2 call $~lib/env/abort @@ -338,7 +338,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 120 i32.const 21 i32.const 4 call $~lib/env/abort @@ -361,9 +361,9 @@ global.set $~lib/allocator/arena/offset block (result i32) i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 local.get $0 i32.const 1 @@ -376,9 +376,9 @@ call $std/object-literal/bar block (result i32) i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $1 local.get $1 i32.const 2 @@ -388,9 +388,9 @@ call $std/object-literal/bar2 block (result i32) i32.const 4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $2 local.get $2 i32.const 3 diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index b8a573137c..4a189e5c9b 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -8,8 +8,8 @@ (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 48) "\02\00\00\006\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s") + (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 56) "\02\00\00\006\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -145,7 +145,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 16 call $~lib/allocator/arena/__mem_allocate @@ -159,16 +159,16 @@ i32.const 8 i32.add ) - (func $~lib/runtime/runtime.register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 112 + i32.const 120 i32.le_u if i32.const 0 i32.const 16 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -182,8 +182,8 @@ if i32.const 0 i32.const 16 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -194,9 +194,9 @@ ) (func $std/operator-overloading/Tester#constructor (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $2 local.get $0 i32.store @@ -1239,9 +1239,9 @@ ) (func $std/operator-overloading/TesterInlineStatic#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $2 local.get $0 i32.store @@ -1252,9 +1252,9 @@ ) (func $std/operator-overloading/TesterInlineInstance#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $2 local.get $0 i32.store @@ -1267,7 +1267,7 @@ (local $0 i32) (local $1 i32) (local $2 i32) - i32.const 112 + i32.const 120 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -1309,7 +1309,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 145 i32.const 0 call $~lib/env/abort @@ -1352,7 +1352,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 151 i32.const 0 call $~lib/env/abort @@ -1396,7 +1396,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 157 i32.const 0 call $~lib/env/abort @@ -1440,7 +1440,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 163 i32.const 0 call $~lib/env/abort @@ -1483,7 +1483,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 169 i32.const 0 call $~lib/env/abort @@ -1517,7 +1517,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 175 i32.const 0 call $~lib/env/abort @@ -1561,7 +1561,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 181 i32.const 0 call $~lib/env/abort @@ -1605,7 +1605,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 187 i32.const 0 call $~lib/env/abort @@ -1649,7 +1649,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 193 i32.const 0 call $~lib/env/abort @@ -1686,7 +1686,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 199 i32.const 0 call $~lib/env/abort @@ -1721,7 +1721,7 @@ global.get $std/operator-overloading/eqf if i32.const 0 - i32.const 56 + i32.const 64 i32.const 205 i32.const 0 call $~lib/env/abort @@ -1748,7 +1748,7 @@ global.get $std/operator-overloading/eq if i32.const 0 - i32.const 56 + i32.const 64 i32.const 209 i32.const 0 call $~lib/env/abort @@ -1777,7 +1777,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 213 i32.const 0 call $~lib/env/abort @@ -1814,7 +1814,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 219 i32.const 0 call $~lib/env/abort @@ -1851,7 +1851,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 225 i32.const 0 call $~lib/env/abort @@ -1888,7 +1888,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 231 i32.const 0 call $~lib/env/abort @@ -1925,7 +1925,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 237 i32.const 0 call $~lib/env/abort @@ -1962,7 +1962,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 242 i32.const 0 call $~lib/env/abort @@ -1999,7 +1999,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 247 i32.const 0 call $~lib/env/abort @@ -2036,7 +2036,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 252 i32.const 0 call $~lib/env/abort @@ -2071,7 +2071,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 257 i32.const 0 call $~lib/env/abort @@ -2114,7 +2114,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 262 i32.const 0 call $~lib/env/abort @@ -2157,7 +2157,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 267 i32.const 0 call $~lib/env/abort @@ -2197,7 +2197,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 272 i32.const 0 call $~lib/env/abort @@ -2208,7 +2208,7 @@ i32.ne if i32.const 0 - i32.const 56 + i32.const 64 i32.const 273 i32.const 0 call $~lib/env/abort @@ -2249,7 +2249,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 279 i32.const 0 call $~lib/env/abort @@ -2285,7 +2285,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 282 i32.const 0 call $~lib/env/abort @@ -2323,7 +2323,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 287 i32.const 0 call $~lib/env/abort @@ -2345,7 +2345,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 288 i32.const 0 call $~lib/env/abort @@ -2380,7 +2380,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 291 i32.const 0 call $~lib/env/abort @@ -2401,7 +2401,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 292 i32.const 0 call $~lib/env/abort @@ -2456,7 +2456,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 312 i32.const 0 call $~lib/env/abort @@ -2511,7 +2511,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 332 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index a92d444bfe..62a8dbbedd 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -8,8 +8,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 48) "\02\00\00\006\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\02\00\00\006\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) @@ -84,7 +84,7 @@ (global $std/operator-overloading/aii1 (mut i32) (i32.const 0)) (global $std/operator-overloading/aii2 (mut i32) (i32.const 0)) (global $std/operator-overloading/aii (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 112)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 120)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -184,7 +184,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -200,7 +200,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -209,8 +209,8 @@ if i32.const 0 i32.const 16 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -226,8 +226,8 @@ if i32.const 0 i32.const 16 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -241,9 +241,9 @@ i32.eqz if i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1814,9 +1814,9 @@ i32.eqz if i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1832,9 +1832,9 @@ i32.eqz if i32.const 8 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1888,7 +1888,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 145 i32.const 0 call $~lib/env/abort @@ -1924,7 +1924,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 151 i32.const 0 call $~lib/env/abort @@ -1960,7 +1960,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 157 i32.const 0 call $~lib/env/abort @@ -1996,7 +1996,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 163 i32.const 0 call $~lib/env/abort @@ -2032,7 +2032,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 169 i32.const 0 call $~lib/env/abort @@ -2068,7 +2068,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 175 i32.const 0 call $~lib/env/abort @@ -2104,7 +2104,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 181 i32.const 0 call $~lib/env/abort @@ -2140,7 +2140,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 187 i32.const 0 call $~lib/env/abort @@ -2176,7 +2176,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 193 i32.const 0 call $~lib/env/abort @@ -2202,7 +2202,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 199 i32.const 0 call $~lib/env/abort @@ -2228,7 +2228,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 205 i32.const 0 call $~lib/env/abort @@ -2244,7 +2244,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 209 i32.const 0 call $~lib/env/abort @@ -2260,7 +2260,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 213 i32.const 0 call $~lib/env/abort @@ -2286,7 +2286,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 219 i32.const 0 call $~lib/env/abort @@ -2312,7 +2312,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 225 i32.const 0 call $~lib/env/abort @@ -2338,7 +2338,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 231 i32.const 0 call $~lib/env/abort @@ -2364,7 +2364,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 237 i32.const 0 call $~lib/env/abort @@ -2395,7 +2395,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 242 i32.const 0 call $~lib/env/abort @@ -2426,7 +2426,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 247 i32.const 0 call $~lib/env/abort @@ -2457,7 +2457,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 252 i32.const 0 call $~lib/env/abort @@ -2489,7 +2489,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 257 i32.const 0 call $~lib/env/abort @@ -2525,7 +2525,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 262 i32.const 0 call $~lib/env/abort @@ -2561,7 +2561,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 267 i32.const 0 call $~lib/env/abort @@ -2591,7 +2591,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 272 i32.const 0 call $~lib/env/abort @@ -2603,7 +2603,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 273 i32.const 0 call $~lib/env/abort @@ -2633,7 +2633,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 279 i32.const 0 call $~lib/env/abort @@ -2658,7 +2658,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 282 i32.const 0 call $~lib/env/abort @@ -2693,7 +2693,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 287 i32.const 0 call $~lib/env/abort @@ -2715,7 +2715,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 288 i32.const 0 call $~lib/env/abort @@ -2745,7 +2745,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 291 i32.const 0 call $~lib/env/abort @@ -2767,7 +2767,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 292 i32.const 0 call $~lib/env/abort @@ -2833,7 +2833,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 312 i32.const 0 call $~lib/env/abort @@ -2899,7 +2899,7 @@ i32.eqz if i32.const 0 - i32.const 56 + i32.const 64 i32.const 332 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index e9bcb4085b..ca3aad5779 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -23,8 +23,6 @@ (data (i32.const 168) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") (data (i32.const 216) "\03\00\00\00(") (data (i32.const 232) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 272) "\03\00\00\00\1e") - (data (i32.const 288) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/runtime/register_ref (mut i32) (i32.const 0)) @@ -45,7 +43,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $std/runtime/main)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/tlsf/Root#setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.const 22 @@ -1024,14 +1022,14 @@ if unreachable end - i32.const 320 + i32.const 272 local.set $2 - i32.const 320 + i32.const 272 global.set $~lib/allocator/tlsf/ROOT i32.const 2912 i32.const 0 i32.store - i32.const 320 + i32.const 272 i32.const 0 i32.store i32.const 0 @@ -1041,7 +1039,7 @@ i32.const 22 i32.lt_u if - i32.const 320 + i32.const 272 local.get $1 i32.const 0 call $~lib/allocator/tlsf/Root#setSLMap @@ -1052,7 +1050,7 @@ i32.const 32 i32.lt_u if - i32.const 320 + i32.const 272 local.get $1 local.get $3 i32.const 0 @@ -1071,8 +1069,8 @@ br $repeat|0 end end - i32.const 320 - i32.const 3240 + i32.const 272 + i32.const 3192 current_memory i32.const 16 i32.shl @@ -1168,7 +1166,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/runtime.allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -1649,7 +1647,7 @@ i32.shl i32.const 0 local.get $0 - i32.const 320 + i32.const 272 i32.gt_u select local.get $3 @@ -1687,12 +1685,12 @@ i32.eq if local.get $0 - i32.const 320 + i32.const 272 i32.le_u if i32.const 0 i32.const 232 - i32.const 74 + i32.const 88 i32.const 8 call $~lib/env/abort unreachable @@ -1722,15 +1720,15 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/runtime.discard (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/util/runtime/discard (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 320 + i32.const 272 i32.le_u if i32.const 0 - i32.const 288 - i32.const 68 - i32.const 6 + i32.const 232 + i32.const 114 + i32.const 4 call $~lib/env/abort unreachable end @@ -1743,25 +1741,25 @@ i32.ne if i32.const 0 - i32.const 288 - i32.const 70 - i32.const 6 + i32.const 232 + i32.const 116 + i32.const 4 call $~lib/env/abort unreachable end local.get $0 call $~lib/allocator/tlsf/__mem_free ) - (func $~lib/runtime/runtime.register (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/util/runtime/register (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 - i32.const 320 + i32.const 272 i32.le_u if i32.const 0 - i32.const 288 - i32.const 82 - i32.const 6 + i32.const 232 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -1774,9 +1772,9 @@ i32.ne if i32.const 0 - i32.const 288 - i32.const 84 - i32.const 6 + i32.const 232 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -1826,7 +1824,7 @@ else i32.const 0 i32.const 24 - i32.const 40 + i32.const 52 i32.const 2 call $~lib/env/abort unreachable @@ -1924,7 +1922,7 @@ f64.const 0 call $~lib/env/trace i32.const 1 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate global.set $std/runtime/ref1 global.get $std/runtime/ref1 i32.const 16 @@ -1937,7 +1935,7 @@ if i32.const 0 i32.const 24 - i32.const 55 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -1949,7 +1947,7 @@ if i32.const 0 i32.const 24 - i32.const 56 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable @@ -1963,7 +1961,7 @@ if i32.const 0 i32.const 24 - i32.const 57 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable @@ -1975,7 +1973,7 @@ if i32.const 0 i32.const 24 - i32.const 58 + i32.const 70 i32.const 0 call $~lib/env/abort unreachable @@ -1990,7 +1988,7 @@ if i32.const 0 i32.const 24 - i32.const 60 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable @@ -2006,15 +2004,15 @@ if i32.const 0 i32.const 24 - i32.const 62 + i32.const 74 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref2 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard global.get $std/runtime/barrier2 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate global.set $std/runtime/ref3 global.get $std/runtime/ref1 global.get $std/runtime/ref3 @@ -2022,23 +2020,23 @@ if i32.const 0 i32.const 24 - i32.const 65 + i32.const 77 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/barrier1 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate global.set $std/runtime/ref4 global.get $std/runtime/ref4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register global.get $std/runtime/register_ref global.get $std/runtime/ref4 i32.ne if i32.const 0 i32.const 24 - i32.const 69 + i32.const 81 i32.const 0 call $~lib/env/abort unreachable @@ -2054,7 +2052,7 @@ if i32.const 0 i32.const 24 - i32.const 71 + i32.const 83 i32.const 0 call $~lib/env/abort unreachable @@ -2066,13 +2064,13 @@ if i32.const 0 i32.const 24 - i32.const 72 + i32.const 84 i32.const 0 call $~lib/env/abort unreachable end i32.const 10 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate global.set $std/runtime/ref5 global.get $std/runtime/ref5 i32.const 16 @@ -2083,7 +2081,7 @@ if i32.const 0 i32.const 24 - i32.const 75 + i32.const 87 i32.const 0 call $~lib/env/abort unreachable @@ -2099,7 +2097,7 @@ if i32.const 0 i32.const 24 - i32.const 76 + i32.const 88 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.ts b/tests/compiler/std/runtime.ts index d495d4aaae..77d330f0ba 100644 --- a/tests/compiler/std/runtime.ts +++ b/tests/compiler/std/runtime.ts @@ -1,30 +1,42 @@ import "allocator/tlsf"; -import { HEADER, HEADER_SIZE, HEADER_MAGIC, adjust, reallocate } from "util/runtime"; +import { HEADER, HEADER_SIZE, HEADER_MAGIC, adjust, allocate, reallocate, discard, register } from "util/runtime"; import { runtime, __runtime_id } from "runtime"; -@start export function main(): void {} +// @ts-ignore: decorator +@start +export function main(): void {} var register_ref: usize = 0; -@global function __ref_register(ref: usize): void { +// @ts-ignore: decorator +@global +function __ref_register(ref: usize): void { register_ref = ref; } var link_ref: usize = 0; var link_parentRef: usize = 0; -@global function __ref_link(ref: usize, parentRef: usize): void { +// @ts-ignore: decorator +@global +function __ref_link(ref: usize, parentRef: usize): void { link_ref = ref; link_parentRef = parentRef; } -@global function __ref_unlink(ref: usize, parentRef: usize): void { +// @ts-ignore: decorator +@global +function __ref_unlink(ref: usize, parentRef: usize): void { } -@global function __ref_collect(): void { +// @ts-ignore: decorator +@global +function __ref_collect(): void { } -@global function __ref_mark(ref: usize): void { +// @ts-ignore: decorator +@global +function __ref_mark(ref: usize): void { } class A {} @@ -50,7 +62,7 @@ trace("barrier1", 1, barrier1); trace("barrier2", 1, barrier2); trace("barrier3", 1, barrier3); -var ref1 = runtime.allocate(1); +var ref1 = allocate(1); var header1 = changetype
(ref1 - HEADER_SIZE); assert(header1.classId == HEADER_MAGIC); assert(header1.payloadSize == 1); @@ -60,17 +72,17 @@ var ref2 = reallocate(ref1, barrier2); assert(ref1 != ref2); // moves var header2 = changetype
(ref2 - HEADER_SIZE); assert(header2.payloadSize == barrier2); -runtime.discard(ref2); -var ref3 = runtime.allocate(barrier2); +discard(ref2); +var ref3 = allocate(barrier2); assert(ref1 == ref3); // reuses space of ref1 (free'd in realloc), ref2 (explicitly free'd) -var ref4 = runtime.allocate(barrier1); -runtime.register(ref4, __runtime_id()); // should call __gc_register +var ref4 = allocate(barrier1); +register(ref4, __runtime_id()); // should call __gc_register assert(register_ref == ref4); var header4 = changetype
(register_ref - HEADER_SIZE); assert(header4.classId == __runtime_id()); assert(header4.payloadSize == barrier1); -var ref5 = runtime.allocate(10); +var ref5 = allocate(10); assert(changetype(ref5).byteLength == 10); assert(changetype(ref5).length == 5); diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 1c8ecfdead..70f30eee16 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -17,7 +17,6 @@ (data (i32.const 120) "\03\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\003\00") (data (i32.const 152) "\03\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") (data (i32.const 216) "\03\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 272) "\03\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/runtime/register_ref (mut i32) (i32.const 0)) @@ -55,12 +54,12 @@ (global $std/runtime/header4 (mut i32) (i32.const 0)) (global $std/runtime/ref5 (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 320)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 272)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $std/runtime/main)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 @@ -1456,7 +1455,7 @@ call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -2066,7 +2065,7 @@ if i32.const 0 i32.const 232 - i32.const 74 + i32.const 88 i32.const 8 call $~lib/env/abort unreachable @@ -2099,7 +2098,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/runtime.discard (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/util/runtime/discard (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -2107,9 +2106,9 @@ i32.eqz if i32.const 0 - i32.const 288 - i32.const 68 - i32.const 6 + i32.const 232 + i32.const 114 + i32.const 4 call $~lib/env/abort unreachable end @@ -2124,16 +2123,16 @@ i32.eqz if i32.const 0 - i32.const 288 - i32.const 70 - i32.const 6 + i32.const 232 + i32.const 116 + i32.const 4 call $~lib/env/abort unreachable end local.get $1 call $~lib/memory/memory.free ) - (func $~lib/runtime/runtime.register (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -2141,9 +2140,9 @@ i32.eqz if i32.const 0 - i32.const 288 - i32.const 82 - i32.const 6 + i32.const 232 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -2158,9 +2157,9 @@ i32.eqz if i32.const 0 - i32.const 288 - i32.const 84 - i32.const 6 + i32.const 232 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -2194,7 +2193,7 @@ if i32.const 0 i32.const 24 - i32.const 32 + i32.const 44 i32.const 0 call $~lib/env/abort unreachable @@ -2207,7 +2206,7 @@ if i32.const 0 i32.const 24 - i32.const 38 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -2228,7 +2227,7 @@ if i32.const 0 i32.const 24 - i32.const 40 + i32.const 52 i32.const 2 call $~lib/env/abort unreachable @@ -2317,7 +2316,7 @@ f64.const 0 call $~lib/env/trace i32.const 1 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate global.set $std/runtime/ref1 global.get $std/runtime/ref1 global.get $~lib/util/runtime/HEADER_SIZE @@ -2331,7 +2330,7 @@ if i32.const 0 i32.const 24 - i32.const 55 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -2344,7 +2343,7 @@ if i32.const 0 i32.const 24 - i32.const 56 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable @@ -2358,7 +2357,7 @@ if i32.const 0 i32.const 24 - i32.const 57 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable @@ -2371,7 +2370,7 @@ if i32.const 0 i32.const 24 - i32.const 58 + i32.const 70 i32.const 0 call $~lib/env/abort unreachable @@ -2387,7 +2386,7 @@ if i32.const 0 i32.const 24 - i32.const 60 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable @@ -2404,15 +2403,15 @@ if i32.const 0 i32.const 24 - i32.const 62 + i32.const 74 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/ref2 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard global.get $std/runtime/barrier2 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate global.set $std/runtime/ref3 global.get $std/runtime/ref1 global.get $std/runtime/ref3 @@ -2421,17 +2420,17 @@ if i32.const 0 i32.const 24 - i32.const 65 + i32.const 77 i32.const 0 call $~lib/env/abort unreachable end global.get $std/runtime/barrier1 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate global.set $std/runtime/ref4 global.get $std/runtime/ref4 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register drop global.get $std/runtime/register_ref global.get $std/runtime/ref4 @@ -2440,7 +2439,7 @@ if i32.const 0 i32.const 24 - i32.const 69 + i32.const 81 i32.const 0 call $~lib/env/abort unreachable @@ -2457,7 +2456,7 @@ if i32.const 0 i32.const 24 - i32.const 71 + i32.const 83 i32.const 0 call $~lib/env/abort unreachable @@ -2470,13 +2469,13 @@ if i32.const 0 i32.const 24 - i32.const 72 + i32.const 84 i32.const 0 call $~lib/env/abort unreachable end i32.const 10 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate global.set $std/runtime/ref5 global.get $std/runtime/ref5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength @@ -2486,7 +2485,7 @@ if i32.const 0 i32.const 24 - i32.const 75 + i32.const 87 i32.const 0 call $~lib/env/abort unreachable @@ -2499,7 +2498,7 @@ if i32.const 0 i32.const 24 - i32.const 76 + i32.const 88 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 1a50750bfa..1342b31d63 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -19,12 +19,12 @@ (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e") - (data (i32.const 24) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 56) "\02\00\00\00&") - (data (i32.const 72) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 112) "\02\00\00\00\14") - (data (i32.const 128) "s\00t\00d\00/\00s\00e\00t\00.\00t\00s") + (data (i32.const 8) "\02\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\02\00\00\00&") + (data (i32.const 80) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 120) "\02\00\00\00\14") + (data (i32.const 136) "s\00t\00d\00/\00s\00e\00t\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -32,7 +32,7 @@ (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -96,7 +96,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -123,16 +123,16 @@ i32.const 16 i32.add ) - (func $~lib/runtime/runtime.register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 148 + i32.const 156 i32.le_u if i32.const 0 i32.const 24 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -146,8 +146,8 @@ if i32.const 0 i32.const 24 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -374,20 +374,20 @@ i32.gt_u if i32.const 0 - i32.const 72 + i32.const 80 i32.const 54 i32.const 43 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $1 local.get $0 call $~lib/memory/memory.fill local.get $1 i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/set/Set#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) @@ -427,9 +427,9 @@ (func $~lib/set/Set#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -793,7 +793,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -813,7 +813,7 @@ br $repeat|0 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -828,7 +828,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -847,7 +847,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -867,7 +867,7 @@ br $repeat|1 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -882,7 +882,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -901,7 +901,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -915,7 +915,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -936,7 +936,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -954,7 +954,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -969,7 +969,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -983,7 +983,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -1004,7 +1004,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -1016,7 +1016,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -1026,9 +1026,9 @@ (func $~lib/set/Set#constructor (; 14 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -1341,7 +1341,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -1361,7 +1361,7 @@ br $repeat|0 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -1376,7 +1376,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -1395,7 +1395,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -1415,7 +1415,7 @@ br $repeat|1 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -1430,7 +1430,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -1449,7 +1449,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -1463,7 +1463,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -1484,7 +1484,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -1502,7 +1502,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -1517,7 +1517,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -1531,7 +1531,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -1552,7 +1552,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -1564,7 +1564,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -1574,9 +1574,9 @@ (func $~lib/set/Set#constructor (; 20 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -1976,7 +1976,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -1996,7 +1996,7 @@ br $repeat|0 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -2011,7 +2011,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -2030,7 +2030,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -2050,7 +2050,7 @@ br $repeat|1 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -2065,7 +2065,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -2084,7 +2084,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -2098,7 +2098,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -2119,7 +2119,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -2137,7 +2137,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -2152,7 +2152,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -2166,7 +2166,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -2187,7 +2187,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -2199,7 +2199,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -2209,9 +2209,9 @@ (func $~lib/set/Set#constructor (; 27 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 6 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -2560,7 +2560,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -2580,7 +2580,7 @@ br $repeat|0 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -2595,7 +2595,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -2614,7 +2614,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -2634,7 +2634,7 @@ br $repeat|1 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -2649,7 +2649,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -2668,7 +2668,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -2682,7 +2682,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -2703,7 +2703,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -2721,7 +2721,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -2736,7 +2736,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -2750,7 +2750,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -2771,7 +2771,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -2783,7 +2783,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -2793,9 +2793,9 @@ (func $~lib/set/Set#constructor (; 33 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 7 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -3162,7 +3162,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -3182,7 +3182,7 @@ br $repeat|0 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -3197,7 +3197,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -3216,7 +3216,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -3236,7 +3236,7 @@ br $repeat|1 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -3251,7 +3251,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -3270,7 +3270,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -3284,7 +3284,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -3305,7 +3305,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -3323,7 +3323,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -3338,7 +3338,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -3352,7 +3352,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -3373,7 +3373,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -3385,7 +3385,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -3395,9 +3395,9 @@ (func $~lib/set/Set#constructor (; 41 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 8 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -3435,7 +3435,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -3455,7 +3455,7 @@ br $repeat|0 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -3470,7 +3470,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -3489,7 +3489,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -3509,7 +3509,7 @@ br $repeat|1 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -3524,7 +3524,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -3543,7 +3543,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -3557,7 +3557,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -3578,7 +3578,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -3596,7 +3596,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -3611,7 +3611,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -3625,7 +3625,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -3646,7 +3646,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -3658,7 +3658,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -3703,9 +3703,9 @@ (func $~lib/set/Set#constructor (; 44 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 9 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -4108,7 +4108,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -4128,7 +4128,7 @@ br $repeat|0 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -4143,7 +4143,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -4162,7 +4162,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -4182,7 +4182,7 @@ br $repeat|1 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -4197,7 +4197,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -4216,7 +4216,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -4230,7 +4230,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -4251,7 +4251,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -4269,7 +4269,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -4284,7 +4284,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -4298,7 +4298,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -4319,7 +4319,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -4331,7 +4331,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -4341,9 +4341,9 @@ (func $~lib/set/Set#constructor (; 52 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 10 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -4381,7 +4381,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -4401,7 +4401,7 @@ br $repeat|0 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -4416,7 +4416,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -4435,7 +4435,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -4455,7 +4455,7 @@ br $repeat|1 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -4470,7 +4470,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -4489,7 +4489,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -4503,7 +4503,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -4524,7 +4524,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -4542,7 +4542,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -4557,7 +4557,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -4571,7 +4571,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -4592,7 +4592,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -4604,7 +4604,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -4614,9 +4614,9 @@ (func $~lib/set/Set#constructor (; 54 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 11 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -4957,7 +4957,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -4977,7 +4977,7 @@ br $repeat|0 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -4992,7 +4992,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -5011,7 +5011,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -5031,7 +5031,7 @@ br $repeat|1 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -5046,7 +5046,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -5065,7 +5065,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -5079,7 +5079,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -5100,7 +5100,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -5118,7 +5118,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -5133,7 +5133,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -5147,7 +5147,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -5168,7 +5168,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -5180,7 +5180,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -5190,9 +5190,9 @@ (func $~lib/set/Set#constructor (; 61 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 12 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -5533,7 +5533,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -5553,7 +5553,7 @@ br $repeat|0 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -5568,7 +5568,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -5587,7 +5587,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -5607,7 +5607,7 @@ br $repeat|1 else i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -5622,7 +5622,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -5641,7 +5641,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -5655,7 +5655,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -5676,7 +5676,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -5694,7 +5694,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -5709,7 +5709,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -5723,7 +5723,7 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -5744,7 +5744,7 @@ i32.ne if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -5756,7 +5756,7 @@ i32.load offset=20 if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -5764,7 +5764,7 @@ end ) (func $start (; 68 ;) (type $FUNCSIG$v) - i32.const 152 + i32.const 160 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 44675ba27c..3031b85793 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -19,9 +19,9 @@ (type $FUNCSIG$vid (func (param i32 f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 56) "\02\00\00\00&\00\00\00\00\00\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 112) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") + (data (i32.const 8) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\02\00\00\00&\00\00\00\00\00\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 120) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -30,11 +30,11 @@ (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 148)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 156)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -132,7 +132,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -157,7 +157,7 @@ (func $~lib/collector/dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -166,8 +166,8 @@ if i32.const 0 i32.const 24 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -183,8 +183,8 @@ if i32.const 0 i32.const 24 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -459,14 +459,14 @@ i32.gt_u if i32.const 0 - i32.const 72 + i32.const 80 i32.const 54 i32.const 43 call $~lib/env/abort unreachable end local.get $1 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 local.get $2 i32.const 0 @@ -474,7 +474,7 @@ call $~lib/memory/memory.fill local.get $2 i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop @@ -557,9 +557,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1042,7 +1042,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -1057,7 +1057,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -1080,7 +1080,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -1102,7 +1102,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -1117,7 +1117,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -1140,7 +1140,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -1162,7 +1162,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -1179,7 +1179,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -1202,7 +1202,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -1225,7 +1225,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -1240,7 +1240,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -1257,7 +1257,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -1280,7 +1280,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -1295,7 +1295,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -1377,9 +1377,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1847,7 +1847,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -1862,7 +1862,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -1885,7 +1885,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -1907,7 +1907,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -1922,7 +1922,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -1945,7 +1945,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -1967,7 +1967,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -1984,7 +1984,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -2007,7 +2007,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -2030,7 +2030,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -2045,7 +2045,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -2062,7 +2062,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -2085,7 +2085,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -2100,7 +2100,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -2182,9 +2182,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -2682,7 +2682,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -2697,7 +2697,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -2720,7 +2720,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -2742,7 +2742,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -2757,7 +2757,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -2780,7 +2780,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -2802,7 +2802,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -2819,7 +2819,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -2842,7 +2842,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -2865,7 +2865,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -2880,7 +2880,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -2897,7 +2897,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -2920,7 +2920,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -2935,7 +2935,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -3017,9 +3017,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 6 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -3487,7 +3487,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -3502,7 +3502,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -3525,7 +3525,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -3547,7 +3547,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -3562,7 +3562,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -3585,7 +3585,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -3607,7 +3607,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -3624,7 +3624,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -3647,7 +3647,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -3670,7 +3670,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -3685,7 +3685,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -3702,7 +3702,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -3725,7 +3725,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -3740,7 +3740,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -3822,9 +3822,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 7 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -4326,7 +4326,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -4341,7 +4341,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -4364,7 +4364,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -4386,7 +4386,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -4401,7 +4401,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -4424,7 +4424,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -4446,7 +4446,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -4463,7 +4463,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -4486,7 +4486,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -4509,7 +4509,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -4524,7 +4524,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -4541,7 +4541,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -4564,7 +4564,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -4579,7 +4579,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -4661,9 +4661,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 8 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -5123,7 +5123,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -5138,7 +5138,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -5161,7 +5161,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -5183,7 +5183,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -5198,7 +5198,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -5221,7 +5221,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -5243,7 +5243,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -5260,7 +5260,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -5283,7 +5283,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -5306,7 +5306,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -5321,7 +5321,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -5338,7 +5338,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -5361,7 +5361,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -5376,7 +5376,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -5458,9 +5458,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 9 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -6011,7 +6011,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -6026,7 +6026,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -6049,7 +6049,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -6071,7 +6071,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -6086,7 +6086,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -6109,7 +6109,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -6131,7 +6131,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -6148,7 +6148,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -6171,7 +6171,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -6194,7 +6194,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -6209,7 +6209,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -6226,7 +6226,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -6249,7 +6249,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -6264,7 +6264,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -6346,9 +6346,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 10 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -6811,7 +6811,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -6826,7 +6826,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -6849,7 +6849,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -6871,7 +6871,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -6886,7 +6886,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -6909,7 +6909,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -6931,7 +6931,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -6948,7 +6948,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -6971,7 +6971,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -6994,7 +6994,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -7009,7 +7009,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -7026,7 +7026,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -7049,7 +7049,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -7064,7 +7064,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -7146,9 +7146,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 11 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -7615,7 +7615,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -7630,7 +7630,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -7653,7 +7653,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -7675,7 +7675,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -7690,7 +7690,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -7713,7 +7713,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -7735,7 +7735,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -7752,7 +7752,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -7775,7 +7775,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -7798,7 +7798,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -7813,7 +7813,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -7830,7 +7830,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -7853,7 +7853,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -7868,7 +7868,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort @@ -7950,9 +7950,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 12 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -8419,7 +8419,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 8 i32.const 4 call $~lib/env/abort @@ -8434,7 +8434,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 10 i32.const 4 call $~lib/env/abort @@ -8457,7 +8457,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 12 i32.const 2 call $~lib/env/abort @@ -8479,7 +8479,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 16 i32.const 4 call $~lib/env/abort @@ -8494,7 +8494,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 18 i32.const 4 call $~lib/env/abort @@ -8517,7 +8517,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 20 i32.const 2 call $~lib/env/abort @@ -8539,7 +8539,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 24 i32.const 4 call $~lib/env/abort @@ -8556,7 +8556,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 26 i32.const 4 call $~lib/env/abort @@ -8579,7 +8579,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 28 i32.const 2 call $~lib/env/abort @@ -8602,7 +8602,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 32 i32.const 4 call $~lib/env/abort @@ -8617,7 +8617,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 34 i32.const 4 call $~lib/env/abort @@ -8634,7 +8634,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 36 i32.const 4 call $~lib/env/abort @@ -8657,7 +8657,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 38 i32.const 2 call $~lib/env/abort @@ -8672,7 +8672,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 136 i32.const 42 i32.const 2 call $~lib/env/abort diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 415f30702e..63c3e41042 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -567,7 +567,7 @@ if i32.const 0 i32.const 280 - i32.const 74 + i32.const 88 i32.const 8 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 83fe311461..e8745b3056 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -705,7 +705,7 @@ if i32.const 0 i32.const 280 - i32.const 74 + i32.const 88 i32.const 8 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index 90532e1a2d..531e1b6915 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -11,11 +11,11 @@ (data (i32.const 32) "\01\00\00\00$\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s") (data (i32.const 80) "\01") (data (i32.const 88) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 128) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 168) "\01\00\00\00\04\00\00\00\01\d87\dc") - (data (i32.const 184) "\01\00\00\00\04\00\00\00h\00i") - (data (i32.const 200) "\01\00\00\00\04\00\00\00R\d8b\df") - (data (i32.const 216) "\01\00\00\00\02") + (data (i32.const 128) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 176) "\01\00\00\00\04\00\00\00\01\d87\dc") + (data (i32.const 192) "\01\00\00\00\04\00\00\00h\00i") + (data (i32.const 208) "\01\00\00\00\04\00\00\00R\d8b\df") + (data (i32.const 224) "\01\00\00\00\02") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/string-utf8/str (mut i32) (i32.const 16)) @@ -394,7 +394,7 @@ i32.store8 local.get $5 ) - (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -586,16 +586,16 @@ end end ) - (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 228 + i32.const 236 i32.le_u if i32.const 0 i32.const 136 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -609,8 +609,8 @@ if i32.const 0 i32.const 136 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -681,7 +681,7 @@ if i32.const 0 i32.const 96 - i32.const 455 + i32.const 461 i32.const 8 call $~lib/env/abort unreachable @@ -728,7 +728,7 @@ if i32.const 0 i32.const 96 - i32.const 459 + i32.const 465 i32.const 8 call $~lib/env/abort unreachable @@ -807,7 +807,7 @@ if i32.const 0 i32.const 96 - i32.const 471 + i32.const 477 i32.const 8 call $~lib/env/abort unreachable @@ -862,19 +862,19 @@ if i32.const 0 i32.const 96 - i32.const 480 + i32.const 486 i32.const 4 call $~lib/env/abort unreachable end local.get $5 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $0 local.get $6 local.get $5 call $~lib/memory/memory.copy local.get $0 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/string/compareImpl (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -970,7 +970,7 @@ call $~lib/env/abort unreachable end - i32.const 232 + i32.const 240 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -1140,7 +1140,7 @@ global.get $std/string-utf8/ptr i32.const 4 call $~lib/string/String.fromUTF8 - i32.const 176 + i32.const 184 call $~lib/string/String.__eq i32.eqz if @@ -1156,7 +1156,7 @@ i32.add i32.const 2 call $~lib/string/String.fromUTF8 - i32.const 192 + i32.const 200 call $~lib/string/String.__eq i32.eqz if @@ -1172,7 +1172,7 @@ i32.add i32.const 4 call $~lib/string/String.fromUTF8 - i32.const 208 + i32.const 216 call $~lib/string/String.__eq i32.eqz if @@ -1188,7 +1188,7 @@ i32.add i32.const 1 call $~lib/string/String.fromUTF8 - i32.const 224 + i32.const 232 call $~lib/string/String.__eq i32.eqz if diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index 4d61e9f9c6..3766bf107b 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -12,11 +12,11 @@ (data (i32.const 32) "\01\00\00\00$\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s\00") (data (i32.const 80) "\01\00\00\00\00\00\00\00") (data (i32.const 88) "\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 128) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 168) "\01\00\00\00\04\00\00\00\01\d87\dc") - (data (i32.const 184) "\01\00\00\00\04\00\00\00h\00i\00") - (data (i32.const 200) "\01\00\00\00\04\00\00\00R\d8b\df") - (data (i32.const 216) "\01\00\00\00\02\00\00\00\00\00") + (data (i32.const 128) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 176) "\01\00\00\00\04\00\00\00\01\d87\dc") + (data (i32.const 192) "\01\00\00\00\04\00\00\00h\00i\00") + (data (i32.const 208) "\01\00\00\00\04\00\00\00R\d8b\df") + (data (i32.const 224) "\01\00\00\00\02\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/string-utf8/str (mut i32) (i32.const 16)) @@ -27,7 +27,7 @@ (global $std/string-utf8/ptr (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 228)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 236)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -465,7 +465,7 @@ i32.sub i32.shl ) - (func $~lib/runtime/runtime.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -697,7 +697,7 @@ local.get $0 call $~lib/allocator/arena/__mem_free ) - (func $~lib/runtime/runtime.register (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -706,8 +706,8 @@ if i32.const 0 i32.const 136 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -723,8 +723,8 @@ if i32.const 0 i32.const 136 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -810,7 +810,7 @@ if i32.const 0 i32.const 96 - i32.const 455 + i32.const 461 i32.const 8 call $~lib/env/abort unreachable @@ -864,7 +864,7 @@ if i32.const 0 i32.const 96 - i32.const 459 + i32.const 465 i32.const 8 call $~lib/env/abort unreachable @@ -959,7 +959,7 @@ if i32.const 0 i32.const 96 - i32.const 471 + i32.const 477 i32.const 8 call $~lib/env/abort unreachable @@ -1022,13 +1022,13 @@ if i32.const 0 i32.const 96 - i32.const 480 + i32.const 486 i32.const 4 call $~lib/env/abort unreachable end local.get $4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $7 local.get $7 local.get $3 @@ -1038,7 +1038,7 @@ call $~lib/memory/memory.free local.get $7 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/string/compareImpl (; 13 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -1342,7 +1342,7 @@ global.get $std/string-utf8/ptr i32.const 4 call $~lib/string/String.fromUTF8 - i32.const 176 + i32.const 184 call $~lib/string/String.__eq i32.eqz if @@ -1358,7 +1358,7 @@ i32.add i32.const 2 call $~lib/string/String.fromUTF8 - i32.const 192 + i32.const 200 call $~lib/string/String.__eq i32.eqz if @@ -1374,7 +1374,7 @@ i32.add i32.const 4 call $~lib/string/String.fromUTF8 - i32.const 208 + i32.const 216 call $~lib/string/String.__eq i32.eqz if @@ -1390,7 +1390,7 @@ i32.add i32.const 1 call $~lib/string/String.fromUTF8 - i32.const 224 + i32.const 232 call $~lib/string/String.__eq i32.eqz if diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 08a56244c4..5bcf94de6f 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -25,308 +25,306 @@ (data (i32.const 120) "\01\00\00\00\02") (data (i32.const 144) "\01\00\00\00\02") (data (i32.const 160) "a") - (data (i32.const 168) "\01\00\00\00\1e") - (data (i32.const 184) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 216) "\01\00\00\00\02") - (data (i32.const 232) "6") - (data (i32.const 240) "\01\00\00\00\1c") - (data (i32.const 256) "~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 288) "\01\00\00\00\04") - (data (i32.const 304) "4\d8\06\df") - (data (i32.const 312) "\01\00\00\00\04") - (data (i32.const 328) "h\00i") - (data (i32.const 336) "\01\00\00\00\08") - (data (i32.const 352) "n\00u\00l\00l") - (data (i32.const 360) "\01\00\00\00\0c") - (data (i32.const 376) "s\00t\00r\00i\00n\00g") - (data (i32.const 392) "\01\00\00\00\06") - (data (i32.const 408) "I\00\'\00m") - (data (i32.const 416) "\01\00\00\00\02") - (data (i32.const 432) " ") - (data (i32.const 440) "\01\00\00\00\06") - (data (i32.const 456) " \00 \00 ") - (data (i32.const 464) "\01\00\00\00\06") - (data (i32.const 480) "a\00b\00c") - (data (i32.const 488) "\01\00\00\00\n") - (data (i32.const 504) " \00 \00a\00b\00c") - (data (i32.const 520) "\01\00\00\00\06") - (data (i32.const 536) "1\002\003") - (data (i32.const 544) "\01\00\00\00\0c") - (data (i32.const 560) "1\002\003\00a\00b\00c") - (data (i32.const 576) "\01\00\00\00\10") - (data (i32.const 592) "1\002\003\001\002\00a\00b\00c") - (data (i32.const 608) "\01\00\00\00\n") - (data (i32.const 624) "a\00b\00c\00 \00 ") - (data (i32.const 640) "\01\00\00\00\0c") - (data (i32.const 656) "a\00b\00c\00a\00b\00c") - (data (i32.const 672) "\01\00\00\00\10") - (data (i32.const 688) "a\00b\00c\00a\00b\00c\00a\00b") - (data (i32.const 704) "\01\00\00\00\02") - (data (i32.const 720) ",") - (data (i32.const 728) "\01\00\00\00\02") - (data (i32.const 744) "x") - (data (i32.const 752) "\01\00\00\00\06") - (data (i32.const 768) ",\00 \00I") - (data (i32.const 776) "\01\00\00\00\02") - (data (i32.const 792) "g") - (data (i32.const 800) "\01\00\00\00\02") - (data (i32.const 816) "i") - (data (i32.const 824) "\01\00\00\00\02") - (data (i32.const 840) "0") - (data (i32.const 848) "\01\00\00\00\02") - (data (i32.const 864) "1") - (data (i32.const 872) "\01\00\00\00\n") - (data (i32.const 888) "0\00b\001\000\001") - (data (i32.const 904) "\01\00\00\00\n") - (data (i32.const 920) "0\00o\007\000\007") - (data (i32.const 936) "\01\00\00\00\n") - (data (i32.const 952) "0\00x\00f\000\00f") - (data (i32.const 968) "\01\00\00\00\n") - (data (i32.const 984) "0\00x\00F\000\00F") - (data (i32.const 1000) "\01\00\00\00\06") - (data (i32.const 1016) "0\001\001") - (data (i32.const 1024) "\01\00\00\00\08") - (data (i32.const 1040) "0\00x\001\00g") - (data (i32.const 1048) "\01\00\00\00\06") - (data (i32.const 1064) "0\00.\001") - (data (i32.const 1072) "\01\00\00\00\06") - (data (i32.const 1088) ".\002\005") - (data (i32.const 1096) "\01\00\00\00\10") - (data (i32.const 1112) ".\001\00f\00o\00o\00b\00a\00r") - (data (i32.const 1128) "\01\00\00\00\02") - (data (i32.const 1144) "b") - (data (i32.const 1152) "\01\00\00\00\04") - (data (i32.const 1168) "a\00b") - (data (i32.const 1176) "\01\00\00\00\08") - (data (i32.const 1192) "k\00e\00y\001") - (data (i32.const 1200) "\01\00\00\00\08") - (data (i32.const 1216) "k\00e\00y\002") - (data (i32.const 1224) "\01\00\00\00\06") - (data (i32.const 1240) "k\00e\001") - (data (i32.const 1248) "\01\00\00\00\06") - (data (i32.const 1264) "k\00e\002") - (data (i32.const 1272) "\01\00\00\00\n") - (data (i32.const 1288) "k\00e\00y\001\002") - (data (i32.const 1304) "\01\00\00\00\n") - (data (i32.const 1320) "k\00e\00y\001\001") - (data (i32.const 1336) "\01\00\00\00\0e") - (data (i32.const 1352) "\a40\ed0\cf0\cb0\db0\d80\c80") - (data (i32.const 1368) "\01\00\00\00\0e") - (data (i32.const 1384) "\a60\f00\ce0\aa0\af0\e40\de0") - (data (i32.const 1400) "\01\00\00\00\16") - (data (i32.const 1416) "D\00\19 f\00h\00u\00a\00s\00c\00a\00i\00l") - (data (i32.const 1440) "\01\00\00\00\14") - (data (i32.const 1456) "D\00\19 \1f\1eu\00a\00s\00c\00a\00i\00l") - (data (i32.const 1480) "\01\00\00\00\04") - (data (i32.const 1496) "b\00a") - (data (i32.const 1504) "\01\00\00\00\04") - (data (i32.const 1520) "a\00a") - (data (i32.const 1528) "\01\00\00\00\06") - (data (i32.const 1544) "a\00a\00a") - (data (i32.const 1552) "\01\00\00\00\10") - (data (i32.const 1568) "a\00b\00a\00b\00a\00b\00a\00b") - (data (i32.const 1584) "\01\00\00\00\n") - (data (i32.const 1600) "a\00a\00a\00a\00a") - (data (i32.const 1616) "\01\00\00\00\0c") - (data (i32.const 1632) "a\00a\00a\00a\00a\00a") - (data (i32.const 1648) "\01\00\00\00\0e") - (data (i32.const 1664) "a\00a\00a\00a\00a\00a\00a") - (data (i32.const 1680) "\01\00\00\00\1c") - (data (i32.const 1696) "a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n") - (data (i32.const 1728) "\01\00\00\00\02") - (data (i32.const 1744) "n") - (data (i32.const 1752) "\01\00\00\00\n") - (data (i32.const 1768) "j\00k\00l\00m\00n") - (data (i32.const 1784) "\01\00\00\00\n") - (data (i32.const 1800) "c\00d\00e\00f\00g") - (data (i32.const 1816) "\01\00\00\00\n") - (data (i32.const 1832) "d\00e\00f\00g\00h") - (data (i32.const 1848) "\01\00\00\00\1a") - (data (i32.const 1864) "a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m") - (data (i32.const 1896) "\01\00\00\00\1a") - (data (i32.const 1912) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1944) "\01\00\00\00(") - (data (i32.const 1960) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 2000) "\01\00\00\00\n") - (data (i32.const 2016) "a\00,\00b\00,\00c") - (data (i32.const 2032) "\01\00\00\00\02") - (data (i32.const 2048) ".") - (data (i32.const 2056) "\01\00\00\00\02") - (data (i32.const 2072) "c") - (data (i32.const 2080) "\01\00\00\00\0e") - (data (i32.const 2096) "a\00,\00 \00b\00,\00 \00c") - (data (i32.const 2112) "\01\00\00\00\04") - (data (i32.const 2128) ",\00 ") - (data (i32.const 2136) "\01\00\00\00\0c") - (data (i32.const 2152) "a\00,\00b\00,\00,\00c") - (data (i32.const 2168) "\01\00\00\00\0c") - (data (i32.const 2184) ",\00a\00,\00b\00,\00c") - (data (i32.const 2200) "\01\00\00\00\0c") - (data (i32.const 2216) "a\00,\00b\00,\00c\00,") - (data (i32.const 2232) "\03\00\00\00\90\01") - (data (i32.const 2248) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 2648) "\04\00\00\00\10") - (data (i32.const 2664) "\c8\08\00\00\c8\08\00\00\90\01\00\00d") - (data (i32.const 2680) "\01\00\00\00\02") - (data (i32.const 2696) "8") - (data (i32.const 2704) "\01\00\00\00\n") - (data (i32.const 2720) "-\001\000\000\000") - (data (i32.const 2736) "\01\00\00\00\08") - (data (i32.const 2752) "1\002\003\004") - (data (i32.const 2760) "\01\00\00\00\n") - (data (i32.const 2776) "1\002\003\004\005") - (data (i32.const 2792) "\01\00\00\00\0c") - (data (i32.const 2808) "1\002\003\004\005\006") - (data (i32.const 2824) "\01\00\00\00\0e") - (data (i32.const 2840) "1\001\001\001\001\001\001") - (data (i32.const 2856) "\01\00\00\00\0e") - (data (i32.const 2872) "1\002\003\004\005\006\007") - (data (i32.const 2888) "\01\00\00\00\14") - (data (i32.const 2904) "2\001\004\007\004\008\003\006\004\006") - (data (i32.const 2928) "\01\00\00\00\14") - (data (i32.const 2944) "2\001\004\007\004\008\003\006\004\007") - (data (i32.const 2968) "\01\00\00\00\16") - (data (i32.const 2984) "-\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 3008) "\01\00\00\00\04") - (data (i32.const 3024) "-\001") - (data (i32.const 3032) "\01\00\00\00\08") - (data (i32.const 3048) "1\000\000\000") - (data (i32.const 3056) "\01\00\00\00\14") - (data (i32.const 3072) "2\001\004\007\004\008\003\006\004\008") - (data (i32.const 3096) "\01\00\00\00\14") - (data (i32.const 3112) "4\002\009\004\009\006\007\002\009\005") - (data (i32.const 3136) "\01\00\00\00\10") - (data (i32.const 3152) "9\009\009\009\009\009\009\009") - (data (i32.const 3168) "\01\00\00\00\12") - (data (i32.const 3184) "1\000\000\000\000\000\000\000\000") - (data (i32.const 3208) "\01\00\00\00\16") - (data (i32.const 3224) "6\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3248) "\01\00\00\00\18") - (data (i32.const 3264) "8\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3288) "\01\00\00\00\1e") - (data (i32.const 3304) "9\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3336) "\01\00\00\00 ") - (data (i32.const 3352) "9\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3384) "\01\00\00\00\"") - (data (i32.const 3400) "1\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3440) "\01\00\00\00(") - (data (i32.const 3456) "1\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005") - (data (i32.const 3496) "\01\00\00\00\n") - (data (i32.const 3512) "-\001\002\003\004") - (data (i32.const 3528) "\01\00\00\00\16") - (data (i32.const 3544) "-\004\002\009\004\009\006\007\002\009\005") - (data (i32.const 3568) "\01\00\00\00\18") - (data (i32.const 3584) "-\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3608) "\01\00\00\00\1a") - (data (i32.const 3624) "-\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3656) "\01\00\00\00 ") - (data (i32.const 3672) "-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3704) "\01\00\00\00$") - (data (i32.const 3720) "-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3760) "\01\00\00\00&") - (data (i32.const 3776) "9\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007") - (data (i32.const 3816) "\01\00\00\00(") - (data (i32.const 3832) "-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008") - (data (i32.const 3872) "\01\00\00\00\06") - (data (i32.const 3888) "0\00.\000") - (data (i32.const 3896) "\01\00\00\00\06") - (data (i32.const 3912) "N\00a\00N") - (data (i32.const 3920) "\01\00\00\00\12") - (data (i32.const 3936) "-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3960) "\01\00\00\00\10") - (data (i32.const 3976) "I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3992) "\03\00\00\00\b8\02") - (data (i32.const 4008) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8#push else local.get $2 @@ -2701,7 +2699,7 @@ i32.const 1 i32.shl local.tee $1 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $3 local.get $4 i32.const 1 @@ -2713,7 +2711,7 @@ local.get $2 local.get $3 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register call $~lib/array/Array<~lib/string/String>#push else local.get $2 @@ -2729,7 +2727,7 @@ i32.ge_u if i32.const 0 - i32.const 1912 + i32.const 1920 i32.const 96 i32.const 45 call $~lib/env/abort @@ -2743,7 +2741,7 @@ i32.ge_u if i32.const 0 - i32.const 1912 + i32.const 1920 i32.const 99 i32.const 61 call $~lib/env/abort @@ -2814,7 +2812,7 @@ (func $~lib/util/number/utoa32_lut (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - i32.const 2668 + i32.const 2620 i32.load local.set $3 loop $continue|0 @@ -2928,7 +2926,7 @@ local.get $0 i32.eqz if - i32.const 840 + i32.const 848 return end local.get $0 @@ -2948,7 +2946,7 @@ local.tee $3 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $2 local.get $0 local.get $3 @@ -2961,7 +2959,7 @@ end local.get $2 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/number/utoa32 (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -2969,7 +2967,7 @@ local.get $0 i32.eqz if - i32.const 840 + i32.const 848 return end local.get $0 @@ -2977,14 +2975,14 @@ local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $2 local.get $0 local.get $1 call $~lib/util/number/utoa32_lut local.get $2 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/number/decimalCount64 (; 38 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 @@ -3045,7 +3043,7 @@ (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 2668 + i32.const 2620 i32.load local.set $3 loop $continue|0 @@ -3144,7 +3142,7 @@ local.get $0 i64.eqz if - i32.const 840 + i32.const 848 return end local.get $0 @@ -3158,7 +3156,7 @@ local.tee $3 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $2 local.get $1 local.get $3 @@ -3169,7 +3167,7 @@ local.tee $1 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $2 local.get $0 local.get $1 @@ -3177,7 +3175,7 @@ end local.get $2 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/number/itoa64 (; 41 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) @@ -3187,7 +3185,7 @@ local.get $0 i64.eqz if - i32.const 840 + i32.const 848 return end block (result i32) @@ -3215,7 +3213,7 @@ local.tee $4 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $3 local.get $2 local.get $4 @@ -3228,7 +3226,7 @@ local.tee $2 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $3 local.get $0 local.get $2 @@ -3242,7 +3240,7 @@ end local.get $3 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/number/genDigits (; 42 ;) (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) @@ -3279,7 +3277,7 @@ local.tee $7 call $~lib/util/number/decimalCount32 local.set $4 - i32.const 5036 + i32.const 4988 i32.load local.set $13 loop $continue|0 @@ -4034,7 +4032,7 @@ i32.shl i32.sub global.set $~lib/util/number/_K - i32.const 4724 + i32.const 4676 i32.load local.get $3 i32.const 3 @@ -4042,7 +4040,7 @@ i32.add i64.load global.set $~lib/util/number/_frc_pow - i32.const 4948 + i32.const 4900 i32.load local.get $3 i32.const 1 @@ -4214,8 +4212,8 @@ i32.eqz if i32.const 0 - i32.const 256 - i32.const 197 + i32.const 264 + i32.const 203 i32.const 4 call $~lib/env/abort unreachable @@ -4291,7 +4289,7 @@ return end local.get $3 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $1 local.get $0 local.get $2 @@ -4300,17 +4298,17 @@ call $~lib/memory/memory.copy local.get $1 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) - (func $~lib/runtime/runtime.discard (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/util/runtime/discard (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 6792 + i32.const 6744 i32.le_u if i32.const 0 i32.const 184 - i32.const 68 - i32.const 6 + i32.const 114 + i32.const 4 call $~lib/env/abort unreachable end @@ -4323,8 +4321,8 @@ if i32.const 0 i32.const 184 - i32.const 70 - i32.const 6 + i32.const 116 + i32.const 4 call $~lib/env/abort unreachable end @@ -4336,7 +4334,7 @@ f64.const 0 f64.eq if - i32.const 3888 + i32.const 3840 return end local.get $0 @@ -4349,11 +4347,11 @@ local.get $0 f64.ne if - i32.const 3912 + i32.const 3864 return end - i32.const 3936 - i32.const 3976 + i32.const 3888 + i32.const 3928 local.get $0 f64.const 0 f64.lt @@ -4361,7 +4359,7 @@ return end i32.const 56 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $2 local.get $0 call $~lib/util/number/dtoa_core @@ -4371,7 +4369,7 @@ call $~lib/string/String#substring local.set $1 local.get $2 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $1 ) (func $start:std/string (; 48 ;) (type $FUNCSIG$v) @@ -4473,7 +4471,7 @@ call $~lib/env/abort unreachable end - i32.const 6792 + i32.const 6744 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -4492,7 +4490,7 @@ end i32.const 54 call $~lib/string/String.fromCharCode - i32.const 232 + i32.const 240 call $~lib/string/String.__eq i32.eqz if @@ -4505,7 +4503,7 @@ end i32.const 65590 call $~lib/string/String.fromCharCode - i32.const 232 + i32.const 240 call $~lib/string/String.__eq i32.eqz if @@ -4531,7 +4529,7 @@ end i32.const 54 call $~lib/string/String.fromCodePoint - i32.const 232 + i32.const 240 call $~lib/string/String.__eq i32.eqz if @@ -4546,7 +4544,7 @@ call $~lib/string/String.fromCodePoint i32.eqz if - i32.const 304 + i32.const 312 i32.const 72 i32.const 32 i32.const 0 @@ -4576,7 +4574,7 @@ unreachable end global.get $std/string/str - i32.const 408 + i32.const 416 i32.const 0 call $~lib/string/String#indexOf i32.const -1 @@ -4591,7 +4589,7 @@ end global.get $std/string/str i32.const 0 - i32.const 432 + i32.const 440 call $~lib/string/String#padStart global.get $std/string/str call $~lib/string/String.__eq @@ -4606,7 +4604,7 @@ end global.get $std/string/str i32.const 15 - i32.const 432 + i32.const 440 call $~lib/string/String#padStart global.get $std/string/str call $~lib/string/String.__eq @@ -4621,9 +4619,9 @@ end i32.const 120 i32.const 3 - i32.const 432 + i32.const 440 call $~lib/string/String#padStart - i32.const 456 + i32.const 464 call $~lib/string/String.__eq i32.eqz if @@ -4664,11 +4662,11 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 5 - i32.const 432 + i32.const 440 call $~lib/string/String#padStart - i32.const 504 + i32.const 512 call $~lib/string/String.__eq i32.eqz if @@ -4679,11 +4677,11 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 6 - i32.const 536 + i32.const 544 call $~lib/string/String#padStart - i32.const 560 + i32.const 568 call $~lib/string/String.__eq i32.eqz if @@ -4694,11 +4692,11 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 8 - i32.const 536 + i32.const 544 call $~lib/string/String#padStart - i32.const 592 + i32.const 600 call $~lib/string/String.__eq i32.eqz if @@ -4711,7 +4709,7 @@ end global.get $std/string/str i32.const 0 - i32.const 432 + i32.const 440 call $~lib/string/String#padEnd global.get $std/string/str call $~lib/string/String.__eq @@ -4726,7 +4724,7 @@ end global.get $std/string/str i32.const 15 - i32.const 432 + i32.const 440 call $~lib/string/String#padEnd global.get $std/string/str call $~lib/string/String.__eq @@ -4741,9 +4739,9 @@ end i32.const 120 i32.const 3 - i32.const 432 + i32.const 440 call $~lib/string/String#padEnd - i32.const 456 + i32.const 464 call $~lib/string/String.__eq i32.eqz if @@ -4784,11 +4782,11 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 5 - i32.const 432 + i32.const 440 call $~lib/string/String#padEnd - i32.const 624 + i32.const 632 call $~lib/string/String.__eq i32.eqz if @@ -4799,11 +4797,11 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 6 - i32.const 480 + i32.const 488 call $~lib/string/String#padEnd - i32.const 656 + i32.const 664 call $~lib/string/String.__eq i32.eqz if @@ -4814,11 +4812,11 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 8 - i32.const 480 + i32.const 488 call $~lib/string/String#padEnd - i32.const 688 + i32.const 696 call $~lib/string/String.__eq i32.eqz if @@ -4842,7 +4840,7 @@ unreachable end i32.const 120 - i32.const 328 + i32.const 336 i32.const 0 call $~lib/string/String#indexOf i32.const -1 @@ -4893,7 +4891,7 @@ unreachable end global.get $std/string/str - i32.const 720 + i32.const 728 i32.const 0 call $~lib/string/String#indexOf i32.const 2 @@ -4907,7 +4905,7 @@ unreachable end global.get $std/string/str - i32.const 744 + i32.const 752 i32.const 0 call $~lib/string/String#indexOf i32.const -1 @@ -4921,7 +4919,7 @@ unreachable end global.get $std/string/str - i32.const 720 + i32.const 728 i32.const 2 call $~lib/string/String#indexOf i32.const 2 @@ -4935,7 +4933,7 @@ unreachable end global.get $std/string/str - i32.const 720 + i32.const 728 i32.const 3 call $~lib/string/String#indexOf i32.const -1 @@ -4949,7 +4947,7 @@ unreachable end global.get $std/string/str - i32.const 768 + i32.const 776 i32.const -1 call $~lib/string/String#indexOf i32.const 2 @@ -4975,7 +4973,7 @@ unreachable end i32.const 120 - i32.const 328 + i32.const 336 i32.const 2147483647 call $~lib/string/String#lastIndexOf i32.const -1 @@ -5008,7 +5006,7 @@ unreachable end global.get $std/string/str - i32.const 720 + i32.const 728 i32.const 2147483647 call $~lib/string/String#lastIndexOf i32.const 2 @@ -5022,7 +5020,7 @@ unreachable end global.get $std/string/str - i32.const 744 + i32.const 752 i32.const 2147483647 call $~lib/string/String#lastIndexOf i32.const -1 @@ -5036,7 +5034,7 @@ unreachable end global.get $std/string/str - i32.const 792 + i32.const 800 i32.const 2147483647 call $~lib/string/String#lastIndexOf i32.const 15 @@ -5050,7 +5048,7 @@ unreachable end global.get $std/string/str - i32.const 720 + i32.const 728 i32.const 2 call $~lib/string/String#lastIndexOf i32.const 2 @@ -5064,7 +5062,7 @@ unreachable end global.get $std/string/str - i32.const 720 + i32.const 728 i32.const 3 call $~lib/string/String#lastIndexOf i32.const 2 @@ -5078,7 +5076,7 @@ unreachable end global.get $std/string/str - i32.const 768 + i32.const 776 i32.const -1 call $~lib/string/String#lastIndexOf i32.const -1 @@ -5092,7 +5090,7 @@ unreachable end global.get $std/string/str - i32.const 816 + i32.const 824 i32.const 0 call $~lib/string/String#lastIndexOf i32.const -1 @@ -5106,7 +5104,7 @@ unreachable end global.get $std/string/str - i32.const 328 + i32.const 336 i32.const 0 call $~lib/string/String#lastIndexOf if @@ -5117,7 +5115,7 @@ call $~lib/env/abort unreachable end - i32.const 840 + i32.const 848 call $~lib/util/string/parse f64.const 0 f64.ne @@ -5129,7 +5127,7 @@ call $~lib/env/abort unreachable end - i32.const 864 + i32.const 872 call $~lib/util/string/parse f64.const 1 f64.ne @@ -5141,7 +5139,7 @@ call $~lib/env/abort unreachable end - i32.const 888 + i32.const 896 call $~lib/util/string/parse f64.const 5 f64.ne @@ -5153,7 +5151,7 @@ call $~lib/env/abort unreachable end - i32.const 920 + i32.const 928 call $~lib/util/string/parse f64.const 455 f64.ne @@ -5165,7 +5163,7 @@ call $~lib/env/abort unreachable end - i32.const 952 + i32.const 960 call $~lib/util/string/parse f64.const 3855 f64.ne @@ -5177,7 +5175,7 @@ call $~lib/env/abort unreachable end - i32.const 984 + i32.const 992 call $~lib/util/string/parse f64.const 3855 f64.ne @@ -5189,7 +5187,7 @@ call $~lib/env/abort unreachable end - i32.const 1016 + i32.const 1024 call $~lib/util/string/parse f64.const 11 f64.ne @@ -5201,7 +5199,7 @@ call $~lib/env/abort unreachable end - i32.const 1040 + i32.const 1048 call $~lib/util/string/parse f64.const 1 f64.ne @@ -5213,7 +5211,7 @@ call $~lib/env/abort unreachable end - i32.const 840 + i32.const 848 call $~lib/string/parseFloat f64.const 0 f64.ne @@ -5225,7 +5223,7 @@ call $~lib/env/abort unreachable end - i32.const 864 + i32.const 872 call $~lib/string/parseFloat f64.const 1 f64.ne @@ -5237,7 +5235,7 @@ call $~lib/env/abort unreachable end - i32.const 1064 + i32.const 1072 call $~lib/string/parseFloat f64.const 0.1 f64.ne @@ -5249,7 +5247,7 @@ call $~lib/env/abort unreachable end - i32.const 1088 + i32.const 1096 call $~lib/string/parseFloat f64.const 0.25 f64.ne @@ -5261,7 +5259,7 @@ call $~lib/env/abort unreachable end - i32.const 1112 + i32.const 1120 call $~lib/string/parseFloat f64.const 0.1 f64.ne @@ -5274,11 +5272,11 @@ unreachable end i32.const 160 - i32.const 1144 + i32.const 1152 call $~lib/string/String.__concat global.set $std/string/c global.get $std/string/c - i32.const 1168 + i32.const 1176 call $~lib/string/String.__eq i32.eqz if @@ -5338,7 +5336,7 @@ unreachable end i32.const 160 - i32.const 1144 + i32.const 1152 call $~lib/string/String.__ne i32.eqz if @@ -5361,8 +5359,8 @@ call $~lib/env/abort unreachable end - i32.const 1192 - i32.const 1216 + i32.const 1200 + i32.const 1224 call $~lib/string/String.__ne i32.eqz if @@ -5373,8 +5371,8 @@ call $~lib/env/abort unreachable end - i32.const 1192 - i32.const 1192 + i32.const 1200 + i32.const 1200 call $~lib/string/String.__eq i32.eqz if @@ -5385,8 +5383,8 @@ call $~lib/env/abort unreachable end - i32.const 1240 - i32.const 1264 + i32.const 1248 + i32.const 1272 call $~lib/string/String.__ne i32.eqz if @@ -5397,8 +5395,8 @@ call $~lib/env/abort unreachable end - i32.const 1288 - i32.const 1320 + i32.const 1296 + i32.const 1328 call $~lib/string/String.__ne i32.eqz if @@ -5409,8 +5407,8 @@ call $~lib/env/abort unreachable end - i32.const 1352 - i32.const 1352 + i32.const 1360 + i32.const 1360 call $~lib/string/String.__eq i32.eqz if @@ -5421,8 +5419,8 @@ call $~lib/env/abort unreachable end - i32.const 1352 - i32.const 1384 + i32.const 1360 + i32.const 1392 call $~lib/string/String.__ne i32.eqz if @@ -5433,8 +5431,8 @@ call $~lib/env/abort unreachable end - i32.const 1416 - i32.const 1456 + i32.const 1424 + i32.const 1464 call $~lib/string/String.__ne i32.eqz if @@ -5445,7 +5443,7 @@ call $~lib/env/abort unreachable end - i32.const 1144 + i32.const 1152 i32.const 160 call $~lib/string/String.__gt i32.eqz @@ -5457,7 +5455,7 @@ call $~lib/env/abort unreachable end - i32.const 1496 + i32.const 1504 i32.const 160 call $~lib/string/String.__gt i32.eqz @@ -5469,8 +5467,8 @@ call $~lib/env/abort unreachable end - i32.const 1496 - i32.const 1520 + i32.const 1504 + i32.const 1528 call $~lib/string/String.__gte i32.eqz if @@ -5481,8 +5479,8 @@ call $~lib/env/abort unreachable end - i32.const 1496 - i32.const 1168 + i32.const 1504 + i32.const 1176 call $~lib/string/String.__gt i32.eqz if @@ -5493,8 +5491,8 @@ call $~lib/env/abort unreachable end - i32.const 1496 - i32.const 1168 + i32.const 1504 + i32.const 1176 call $~lib/string/String.__lt if i32.const 0 @@ -5504,7 +5502,7 @@ call $~lib/env/abort unreachable end - i32.const 1144 + i32.const 1152 global.get $std/string/nullStr call $~lib/string/String.__lt if @@ -5516,7 +5514,7 @@ unreachable end global.get $std/string/nullStr - i32.const 1144 + i32.const 1152 call $~lib/string/String.__lt if i32.const 0 @@ -5526,7 +5524,7 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 120 call $~lib/string/String.__gt i32.eqz @@ -5539,7 +5537,7 @@ unreachable end i32.const 120 - i32.const 480 + i32.const 488 call $~lib/string/String.__lt i32.eqz if @@ -5550,7 +5548,7 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 120 call $~lib/string/String.__gte i32.eqz @@ -5562,7 +5560,7 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 call $~lib/string/String.__lte i32.eqz if @@ -5573,7 +5571,7 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 120 call $~lib/string/String.__lt if @@ -5585,7 +5583,7 @@ unreachable end i32.const 120 - i32.const 480 + i32.const 488 call $~lib/string/String.__gt if i32.const 0 @@ -5661,7 +5659,7 @@ call $~lib/env/abort unreachable end - i32.const 524 + i32.const 532 i32.load i32.const 1 i32.shr_u @@ -5720,7 +5718,7 @@ i32.const 160 i32.const 2 call $~lib/string/String#repeat - i32.const 1520 + i32.const 1528 call $~lib/string/String.__eq i32.eqz if @@ -5734,7 +5732,7 @@ i32.const 160 i32.const 3 call $~lib/string/String#repeat - i32.const 1544 + i32.const 1552 call $~lib/string/String.__eq i32.eqz if @@ -5745,10 +5743,10 @@ call $~lib/env/abort unreachable end - i32.const 1168 + i32.const 1176 i32.const 4 call $~lib/string/String#repeat - i32.const 1568 + i32.const 1576 call $~lib/string/String.__eq i32.eqz if @@ -5762,7 +5760,7 @@ i32.const 160 i32.const 5 call $~lib/string/String#repeat - i32.const 1600 + i32.const 1608 call $~lib/string/String.__eq i32.eqz if @@ -5776,7 +5774,7 @@ i32.const 160 i32.const 6 call $~lib/string/String#repeat - i32.const 1632 + i32.const 1640 call $~lib/string/String.__eq i32.eqz if @@ -5790,7 +5788,7 @@ i32.const 160 i32.const 7 call $~lib/string/String#repeat - i32.const 1664 + i32.const 1672 call $~lib/string/String.__eq i32.eqz if @@ -5801,13 +5799,13 @@ call $~lib/env/abort unreachable end - i32.const 1696 + i32.const 1704 global.set $std/string/str global.get $std/string/str i32.const 0 i32.const 2147483647 call $~lib/string/String#slice - i32.const 1696 + i32.const 1704 call $~lib/string/String.__eq i32.eqz if @@ -5822,7 +5820,7 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#slice - i32.const 1744 + i32.const 1752 call $~lib/string/String.__eq i32.eqz if @@ -5837,7 +5835,7 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#slice - i32.const 1768 + i32.const 1776 call $~lib/string/String.__eq i32.eqz if @@ -5852,7 +5850,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#slice - i32.const 1800 + i32.const 1808 call $~lib/string/String.__eq i32.eqz if @@ -5867,7 +5865,7 @@ i32.const -11 i32.const -6 call $~lib/string/String#slice - i32.const 1832 + i32.const 1840 call $~lib/string/String.__eq i32.eqz if @@ -5897,7 +5895,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#slice - i32.const 1864 + i32.const 1872 call $~lib/string/String.__eq i32.eqz if @@ -5952,7 +5950,7 @@ unreachable end i32.const 120 - i32.const 720 + i32.const 728 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -5979,8 +5977,8 @@ call $~lib/env/abort unreachable end - i32.const 2016 - i32.const 2048 + i32.const 1968 + i32.const 2000 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -5993,7 +5991,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 1968 call $~lib/string/String.__eq local.set $0 end @@ -6007,8 +6005,8 @@ call $~lib/env/abort unreachable end - i32.const 2016 - i32.const 720 + i32.const 1968 + i32.const 728 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -6033,7 +6031,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1144 + i32.const 1152 call $~lib/string/String.__eq local.set $0 end @@ -6043,7 +6041,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2072 + i32.const 2024 call $~lib/string/String.__eq local.set $0 end @@ -6057,8 +6055,8 @@ call $~lib/env/abort unreachable end - i32.const 2096 - i32.const 2128 + i32.const 2048 + i32.const 2080 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -6083,7 +6081,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1144 + i32.const 1152 call $~lib/string/String.__eq local.set $0 end @@ -6093,7 +6091,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2072 + i32.const 2024 call $~lib/string/String.__eq local.set $0 end @@ -6107,8 +6105,8 @@ call $~lib/env/abort unreachable end - i32.const 2152 - i32.const 720 + i32.const 2104 + i32.const 728 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -6134,7 +6132,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1144 + i32.const 1152 call $~lib/string/String.__eq local.set $0 end @@ -6154,7 +6152,7 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2072 + i32.const 2024 call $~lib/string/String.__eq local.set $0 end @@ -6168,8 +6166,8 @@ call $~lib/env/abort unreachable end - i32.const 2184 - i32.const 720 + i32.const 2136 + i32.const 728 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -6205,7 +6203,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1144 + i32.const 1152 call $~lib/string/String.__eq local.set $0 end @@ -6215,7 +6213,7 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2072 + i32.const 2024 call $~lib/string/String.__eq local.set $0 end @@ -6229,8 +6227,8 @@ call $~lib/env/abort unreachable end - i32.const 2216 - i32.const 720 + i32.const 2168 + i32.const 728 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa @@ -6256,7 +6254,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1144 + i32.const 1152 call $~lib/string/String.__eq local.set $0 end @@ -6266,7 +6264,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2072 + i32.const 2024 call $~lib/string/String.__eq local.set $0 end @@ -6290,7 +6288,7 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 120 i32.const 2147483647 call $~lib/string/String#split @@ -6316,7 +6314,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1144 + i32.const 1152 call $~lib/string/String.__eq local.set $0 end @@ -6326,7 +6324,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2072 + i32.const 2024 call $~lib/string/String.__eq local.set $0 end @@ -6340,7 +6338,7 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 120 i32.const 0 call $~lib/string/String#split @@ -6355,7 +6353,7 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 120 i32.const 1 call $~lib/string/String#split @@ -6383,8 +6381,8 @@ call $~lib/env/abort unreachable end - i32.const 2016 - i32.const 720 + i32.const 1968 + i32.const 728 i32.const 1 call $~lib/string/String#split global.set $std/string/sa @@ -6411,7 +6409,7 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 120 i32.const 4 call $~lib/string/String#split @@ -6437,7 +6435,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1144 + i32.const 1152 call $~lib/string/String.__eq local.set $0 end @@ -6447,7 +6445,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2072 + i32.const 2024 call $~lib/string/String.__eq local.set $0 end @@ -6461,7 +6459,7 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 120 i32.const -1 call $~lib/string/String#split @@ -6487,7 +6485,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1144 + i32.const 1152 call $~lib/string/String.__eq local.set $0 end @@ -6497,7 +6495,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2072 + i32.const 2024 call $~lib/string/String.__eq local.set $0 end @@ -6511,8 +6509,8 @@ call $~lib/env/abort unreachable end - i32.const 2016 - i32.const 720 + i32.const 1968 + i32.const 728 i32.const -1 call $~lib/string/String#split global.set $std/string/sa @@ -6537,7 +6535,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1144 + i32.const 1152 call $~lib/string/String.__eq local.set $0 end @@ -6547,7 +6545,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2072 + i32.const 2024 call $~lib/string/String.__eq local.set $0 end @@ -6563,7 +6561,7 @@ end i32.const 0 call $~lib/util/number/itoa32 - i32.const 840 + i32.const 848 call $~lib/string/String.__eq i32.eqz if @@ -6576,7 +6574,7 @@ end i32.const 1 call $~lib/util/number/itoa32 - i32.const 864 + i32.const 872 call $~lib/string/String.__eq i32.eqz if @@ -6589,7 +6587,7 @@ end i32.const 8 call $~lib/util/number/itoa32 - i32.const 2696 + i32.const 2648 call $~lib/string/String.__eq i32.eqz if @@ -6602,7 +6600,7 @@ end i32.const 123 call $~lib/util/number/itoa32 - i32.const 536 + i32.const 544 call $~lib/string/String.__eq i32.eqz if @@ -6615,7 +6613,7 @@ end i32.const -1000 call $~lib/util/number/itoa32 - i32.const 2720 + i32.const 2672 call $~lib/string/String.__eq i32.eqz if @@ -6628,7 +6626,7 @@ end i32.const 1234 call $~lib/util/number/itoa32 - i32.const 2752 + i32.const 2704 call $~lib/string/String.__eq i32.eqz if @@ -6641,7 +6639,7 @@ end i32.const 12345 call $~lib/util/number/itoa32 - i32.const 2776 + i32.const 2728 call $~lib/string/String.__eq i32.eqz if @@ -6654,7 +6652,7 @@ end i32.const 123456 call $~lib/util/number/itoa32 - i32.const 2808 + i32.const 2760 call $~lib/string/String.__eq i32.eqz if @@ -6667,7 +6665,7 @@ end i32.const 1111111 call $~lib/util/number/itoa32 - i32.const 2840 + i32.const 2792 call $~lib/string/String.__eq i32.eqz if @@ -6680,7 +6678,7 @@ end i32.const 1234567 call $~lib/util/number/itoa32 - i32.const 2872 + i32.const 2824 call $~lib/string/String.__eq i32.eqz if @@ -6693,7 +6691,7 @@ end i32.const 2147483646 call $~lib/util/number/itoa32 - i32.const 2904 + i32.const 2856 call $~lib/string/String.__eq i32.eqz if @@ -6706,7 +6704,7 @@ end i32.const 2147483647 call $~lib/util/number/itoa32 - i32.const 2944 + i32.const 2896 call $~lib/string/String.__eq i32.eqz if @@ -6719,7 +6717,7 @@ end i32.const -2147483648 call $~lib/util/number/itoa32 - i32.const 2984 + i32.const 2936 call $~lib/string/String.__eq i32.eqz if @@ -6732,7 +6730,7 @@ end i32.const -1 call $~lib/util/number/itoa32 - i32.const 3024 + i32.const 2976 call $~lib/string/String.__eq i32.eqz if @@ -6745,7 +6743,7 @@ end i32.const 0 call $~lib/util/number/utoa32 - i32.const 840 + i32.const 848 call $~lib/string/String.__eq i32.eqz if @@ -6758,7 +6756,7 @@ end i32.const 1000 call $~lib/util/number/utoa32 - i32.const 3048 + i32.const 3000 call $~lib/string/String.__eq i32.eqz if @@ -6771,7 +6769,7 @@ end i32.const 2147483647 call $~lib/util/number/utoa32 - i32.const 2944 + i32.const 2896 call $~lib/string/String.__eq i32.eqz if @@ -6784,7 +6782,7 @@ end i32.const -2147483648 call $~lib/util/number/utoa32 - i32.const 3072 + i32.const 3024 call $~lib/string/String.__eq i32.eqz if @@ -6797,7 +6795,7 @@ end i32.const -1 call $~lib/util/number/utoa32 - i32.const 3112 + i32.const 3064 call $~lib/string/String.__eq i32.eqz if @@ -6810,7 +6808,7 @@ end i64.const 0 call $~lib/util/number/utoa64 - i32.const 840 + i32.const 848 call $~lib/string/String.__eq i32.eqz if @@ -6823,7 +6821,7 @@ end i64.const 1234 call $~lib/util/number/utoa64 - i32.const 2752 + i32.const 2704 call $~lib/string/String.__eq i32.eqz if @@ -6836,7 +6834,7 @@ end i64.const 99999999 call $~lib/util/number/utoa64 - i32.const 3152 + i32.const 3104 call $~lib/string/String.__eq i32.eqz if @@ -6849,7 +6847,7 @@ end i64.const 100000000 call $~lib/util/number/utoa64 - i32.const 3184 + i32.const 3136 call $~lib/string/String.__eq i32.eqz if @@ -6862,7 +6860,7 @@ end i64.const 4294967295 call $~lib/util/number/utoa64 - i32.const 3112 + i32.const 3064 call $~lib/string/String.__eq i32.eqz if @@ -6875,7 +6873,7 @@ end i64.const 68719476735 call $~lib/util/number/utoa64 - i32.const 3224 + i32.const 3176 call $~lib/string/String.__eq i32.eqz if @@ -6888,7 +6886,7 @@ end i64.const 868719476735 call $~lib/util/number/utoa64 - i32.const 3264 + i32.const 3216 call $~lib/string/String.__eq i32.eqz if @@ -6901,7 +6899,7 @@ end i64.const 999868719476735 call $~lib/util/number/utoa64 - i32.const 3304 + i32.const 3256 call $~lib/string/String.__eq i32.eqz if @@ -6914,7 +6912,7 @@ end i64.const 9999868719476735 call $~lib/util/number/utoa64 - i32.const 3352 + i32.const 3304 call $~lib/string/String.__eq i32.eqz if @@ -6927,7 +6925,7 @@ end i64.const 19999868719476735 call $~lib/util/number/utoa64 - i32.const 3400 + i32.const 3352 call $~lib/string/String.__eq i32.eqz if @@ -6940,7 +6938,7 @@ end i64.const -1 call $~lib/util/number/utoa64 - i32.const 3456 + i32.const 3408 call $~lib/string/String.__eq i32.eqz if @@ -6953,7 +6951,7 @@ end i64.const 0 call $~lib/util/number/itoa64 - i32.const 840 + i32.const 848 call $~lib/string/String.__eq i32.eqz if @@ -6966,7 +6964,7 @@ end i64.const -1234 call $~lib/util/number/itoa64 - i32.const 3512 + i32.const 3464 call $~lib/string/String.__eq i32.eqz if @@ -6979,7 +6977,7 @@ end i64.const 4294967295 call $~lib/util/number/itoa64 - i32.const 3112 + i32.const 3064 call $~lib/string/String.__eq i32.eqz if @@ -6992,7 +6990,7 @@ end i64.const -4294967295 call $~lib/util/number/itoa64 - i32.const 3544 + i32.const 3496 call $~lib/string/String.__eq i32.eqz if @@ -7005,7 +7003,7 @@ end i64.const 68719476735 call $~lib/util/number/itoa64 - i32.const 3224 + i32.const 3176 call $~lib/string/String.__eq i32.eqz if @@ -7018,7 +7016,7 @@ end i64.const -68719476735 call $~lib/util/number/itoa64 - i32.const 3584 + i32.const 3536 call $~lib/string/String.__eq i32.eqz if @@ -7031,7 +7029,7 @@ end i64.const -868719476735 call $~lib/util/number/itoa64 - i32.const 3624 + i32.const 3576 call $~lib/string/String.__eq i32.eqz if @@ -7044,7 +7042,7 @@ end i64.const -999868719476735 call $~lib/util/number/itoa64 - i32.const 3672 + i32.const 3624 call $~lib/string/String.__eq i32.eqz if @@ -7057,7 +7055,7 @@ end i64.const -19999868719476735 call $~lib/util/number/itoa64 - i32.const 3720 + i32.const 3672 call $~lib/string/String.__eq i32.eqz if @@ -7070,7 +7068,7 @@ end i64.const 9223372036854775807 call $~lib/util/number/itoa64 - i32.const 3776 + i32.const 3728 call $~lib/string/String.__eq i32.eqz if @@ -7083,7 +7081,7 @@ end i64.const -9223372036854775808 call $~lib/util/number/itoa64 - i32.const 3832 + i32.const 3784 call $~lib/string/String.__eq i32.eqz if @@ -7096,7 +7094,7 @@ end f64.const 0 call $~lib/util/number/dtoa - i32.const 3888 + i32.const 3840 call $~lib/string/String.__eq i32.eqz if @@ -7109,7 +7107,7 @@ end f64.const -0 call $~lib/util/number/dtoa - i32.const 3888 + i32.const 3840 call $~lib/string/String.__eq i32.eqz if @@ -7122,7 +7120,7 @@ end f64.const nan:0x8000000000000 call $~lib/util/number/dtoa - i32.const 3912 + i32.const 3864 call $~lib/string/String.__eq i32.eqz if @@ -7135,7 +7133,7 @@ end f64.const inf call $~lib/util/number/dtoa - i32.const 3976 + i32.const 3928 call $~lib/string/String.__eq i32.eqz if @@ -7148,7 +7146,7 @@ end f64.const -inf call $~lib/util/number/dtoa - i32.const 3936 + i32.const 3888 call $~lib/string/String.__eq i32.eqz if @@ -7161,7 +7159,7 @@ end f64.const 2.220446049250313e-16 call $~lib/util/number/dtoa - i32.const 5064 + i32.const 5016 call $~lib/string/String.__eq i32.eqz if @@ -7174,7 +7172,7 @@ end f64.const -2.220446049250313e-16 call $~lib/util/number/dtoa - i32.const 5128 + i32.const 5080 call $~lib/string/String.__eq i32.eqz if @@ -7187,7 +7185,7 @@ end f64.const 1797693134862315708145274e284 call $~lib/util/number/dtoa - i32.const 5192 + i32.const 5144 call $~lib/string/String.__eq i32.eqz if @@ -7200,7 +7198,7 @@ end f64.const -1797693134862315708145274e284 call $~lib/util/number/dtoa - i32.const 5256 + i32.const 5208 call $~lib/string/String.__eq i32.eqz if @@ -7213,7 +7211,7 @@ end f64.const 4185580496821356722454785e274 call $~lib/util/number/dtoa - i32.const 5320 + i32.const 5272 call $~lib/string/String.__eq i32.eqz if @@ -7226,7 +7224,7 @@ end f64.const 2.2250738585072014e-308 call $~lib/util/number/dtoa - i32.const 5384 + i32.const 5336 call $~lib/string/String.__eq i32.eqz if @@ -7239,7 +7237,7 @@ end f64.const 4.940656e-318 call $~lib/util/number/dtoa - i32.const 5448 + i32.const 5400 call $~lib/string/String.__eq i32.eqz if @@ -7252,7 +7250,7 @@ end f64.const 9060801153433600 call $~lib/util/number/dtoa - i32.const 5496 + i32.const 5448 call $~lib/string/String.__eq i32.eqz if @@ -7265,7 +7263,7 @@ end f64.const 4708356024711512064 call $~lib/util/number/dtoa - i32.const 5552 + i32.const 5504 call $~lib/string/String.__eq i32.eqz if @@ -7278,7 +7276,7 @@ end f64.const 9409340012568248320 call $~lib/util/number/dtoa - i32.const 5616 + i32.const 5568 call $~lib/string/String.__eq i32.eqz if @@ -7291,7 +7289,7 @@ end f64.const 5e-324 call $~lib/util/number/dtoa - i32.const 5680 + i32.const 5632 call $~lib/string/String.__eq i32.eqz if @@ -7304,7 +7302,7 @@ end f64.const 1 call $~lib/util/number/dtoa - i32.const 5712 + i32.const 5664 call $~lib/string/String.__eq i32.eqz if @@ -7317,7 +7315,7 @@ end f64.const 0.1 call $~lib/util/number/dtoa - i32.const 1064 + i32.const 1072 call $~lib/string/String.__eq i32.eqz if @@ -7330,7 +7328,7 @@ end f64.const -1 call $~lib/util/number/dtoa - i32.const 5736 + i32.const 5688 call $~lib/string/String.__eq i32.eqz if @@ -7343,7 +7341,7 @@ end f64.const -0.1 call $~lib/util/number/dtoa - i32.const 5760 + i32.const 5712 call $~lib/string/String.__eq i32.eqz if @@ -7356,7 +7354,7 @@ end f64.const 1e6 call $~lib/util/number/dtoa - i32.const 5784 + i32.const 5736 call $~lib/string/String.__eq i32.eqz if @@ -7369,7 +7367,7 @@ end f64.const 1e-06 call $~lib/util/number/dtoa - i32.const 5824 + i32.const 5776 call $~lib/string/String.__eq i32.eqz if @@ -7382,7 +7380,7 @@ end f64.const -1e6 call $~lib/util/number/dtoa - i32.const 5856 + i32.const 5808 call $~lib/string/String.__eq i32.eqz if @@ -7395,7 +7393,7 @@ end f64.const -1e-06 call $~lib/util/number/dtoa - i32.const 5896 + i32.const 5848 call $~lib/string/String.__eq i32.eqz if @@ -7408,7 +7406,7 @@ end f64.const 1e7 call $~lib/util/number/dtoa - i32.const 5936 + i32.const 5888 call $~lib/string/String.__eq i32.eqz if @@ -7421,7 +7419,7 @@ end f64.const 1e-07 call $~lib/util/number/dtoa - i32.const 5976 + i32.const 5928 call $~lib/string/String.__eq i32.eqz if @@ -7434,7 +7432,7 @@ end f64.const 1.e+308 call $~lib/util/number/dtoa - i32.const 6000 + i32.const 5952 call $~lib/string/String.__eq i32.eqz if @@ -7447,7 +7445,7 @@ end f64.const -1.e+308 call $~lib/util/number/dtoa - i32.const 6032 + i32.const 5984 call $~lib/string/String.__eq i32.eqz if @@ -7460,7 +7458,7 @@ end f64.const inf call $~lib/util/number/dtoa - i32.const 3976 + i32.const 3928 call $~lib/string/String.__eq i32.eqz if @@ -7473,7 +7471,7 @@ end f64.const -inf call $~lib/util/number/dtoa - i32.const 3936 + i32.const 3888 call $~lib/string/String.__eq i32.eqz if @@ -7486,7 +7484,7 @@ end f64.const 1e-308 call $~lib/util/number/dtoa - i32.const 6064 + i32.const 6016 call $~lib/string/String.__eq i32.eqz if @@ -7499,7 +7497,7 @@ end f64.const -1e-308 call $~lib/util/number/dtoa - i32.const 6096 + i32.const 6048 call $~lib/string/String.__eq i32.eqz if @@ -7512,7 +7510,7 @@ end f64.const 1e-323 call $~lib/util/number/dtoa - i32.const 6128 + i32.const 6080 call $~lib/string/String.__eq i32.eqz if @@ -7525,7 +7523,7 @@ end f64.const -1e-323 call $~lib/util/number/dtoa - i32.const 6160 + i32.const 6112 call $~lib/string/String.__eq i32.eqz if @@ -7538,7 +7536,7 @@ end f64.const 0 call $~lib/util/number/dtoa - i32.const 3888 + i32.const 3840 call $~lib/string/String.__eq i32.eqz if @@ -7551,7 +7549,7 @@ end f64.const 4294967272 call $~lib/util/number/dtoa - i32.const 6192 + i32.const 6144 call $~lib/string/String.__eq i32.eqz if @@ -7564,7 +7562,7 @@ end f64.const 1.2312145673456234e-08 call $~lib/util/number/dtoa - i32.const 6232 + i32.const 6184 call $~lib/string/String.__eq i32.eqz if @@ -7577,7 +7575,7 @@ end f64.const 555555555.5555556 call $~lib/util/number/dtoa - i32.const 6296 + i32.const 6248 call $~lib/string/String.__eq i32.eqz if @@ -7590,7 +7588,7 @@ end f64.const 0.9999999999999999 call $~lib/util/number/dtoa - i32.const 6352 + i32.const 6304 call $~lib/string/String.__eq i32.eqz if @@ -7603,7 +7601,7 @@ end f64.const 1 call $~lib/util/number/dtoa - i32.const 5712 + i32.const 5664 call $~lib/string/String.__eq i32.eqz if @@ -7616,7 +7614,7 @@ end f64.const 12.34 call $~lib/util/number/dtoa - i32.const 6408 + i32.const 6360 call $~lib/string/String.__eq i32.eqz if @@ -7629,7 +7627,7 @@ end f64.const 0.3333333333333333 call $~lib/util/number/dtoa - i32.const 6440 + i32.const 6392 call $~lib/string/String.__eq i32.eqz if @@ -7642,7 +7640,7 @@ end f64.const 1234e17 call $~lib/util/number/dtoa - i32.const 6496 + i32.const 6448 call $~lib/string/String.__eq i32.eqz if @@ -7655,7 +7653,7 @@ end f64.const 1234e18 call $~lib/util/number/dtoa - i32.const 6560 + i32.const 6512 call $~lib/string/String.__eq i32.eqz if @@ -7668,7 +7666,7 @@ end f64.const 2.71828 call $~lib/util/number/dtoa - i32.const 6600 + i32.const 6552 call $~lib/string/String.__eq i32.eqz if @@ -7681,7 +7679,7 @@ end f64.const 0.0271828 call $~lib/util/number/dtoa - i32.const 6632 + i32.const 6584 call $~lib/string/String.__eq i32.eqz if @@ -7694,7 +7692,7 @@ end f64.const 271.828 call $~lib/util/number/dtoa - i32.const 6672 + i32.const 6624 call $~lib/string/String.__eq i32.eqz if @@ -7707,7 +7705,7 @@ end f64.const 1.1e+128 call $~lib/util/number/dtoa - i32.const 6704 + i32.const 6656 call $~lib/string/String.__eq i32.eqz if @@ -7720,7 +7718,7 @@ end f64.const 1.1e-64 call $~lib/util/number/dtoa - i32.const 6736 + i32.const 6688 call $~lib/string/String.__eq i32.eqz if @@ -7733,7 +7731,7 @@ end f64.const 0.000035689 call $~lib/util/number/dtoa - i32.const 6768 + i32.const 6720 call $~lib/string/String.__eq i32.eqz if diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 7c1e32a2ba..f4758114ae 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -25,157 +25,156 @@ (data (i32.const 104) "\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 120) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 144) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00a\00") - (data (i32.const 168) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 216) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\006\00") - (data (i32.const 240) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 288) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\004\d8\06\df") - (data (i32.const 312) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00h\00i\00") - (data (i32.const 336) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00n\00u\00l\00l\00") - (data (i32.const 360) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00s\00t\00r\00i\00n\00g\00") - (data (i32.const 392) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00I\00\'\00m\00") - (data (i32.const 416) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00 \00") - (data (i32.const 440) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00") - (data (i32.const 464) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00") - (data (i32.const 488) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00 \00 \00a\00b\00c\00") - (data (i32.const 520) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\001\002\003\00") - (data (i32.const 544) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\001\002\003\00a\00b\00c\00") - (data (i32.const 576) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\001\002\003\001\002\00a\00b\00c\00") - (data (i32.const 608) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00 \00 \00") - (data (i32.const 640) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00a\00b\00c\00") - (data (i32.const 672) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00a\00b\00c\00a\00b\00") - (data (i32.const 704) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00,\00") - (data (i32.const 728) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00x\00") - (data (i32.const 752) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00,\00 \00I\00") - (data (i32.const 776) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00g\00") - (data (i32.const 800) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00i\00") - (data (i32.const 824) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\000\00") - (data (i32.const 848) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\001\00") - (data (i32.const 872) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\000\00b\001\000\001\00") - (data (i32.const 904) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\000\00o\007\000\007\00") - (data (i32.const 936) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\000\00x\00f\000\00f\00") - (data (i32.const 968) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\000\00x\00F\000\00F\00") - (data (i32.const 1000) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\000\001\001\00") - (data (i32.const 1024) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\000\00x\001\00g\00") - (data (i32.const 1048) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\000\00.\001\00") - (data (i32.const 1072) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00.\002\005\00") - (data (i32.const 1096) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00.\001\00f\00o\00o\00b\00a\00r\00") - (data (i32.const 1128) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00b\00") - (data (i32.const 1152) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00a\00b\00") - (data (i32.const 1176) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00k\00e\00y\001\00") - (data (i32.const 1200) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00k\00e\00y\002\00") - (data (i32.const 1224) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00k\00e\001\00") - (data (i32.const 1248) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00k\00e\002\00") - (data (i32.const 1272) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00k\00e\00y\001\002\00") - (data (i32.const 1304) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00k\00e\00y\001\001\00") - (data (i32.const 1336) "\01\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00\a40\ed0\cf0\cb0\db0\d80\c80") - (data (i32.const 1368) "\01\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00\a60\f00\ce0\aa0\af0\e40\de0") - (data (i32.const 1400) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00D\00\19 f\00h\00u\00a\00s\00c\00a\00i\00l\00") - (data (i32.const 1440) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00D\00\19 \1f\1eu\00a\00s\00c\00a\00i\00l\00") - (data (i32.const 1480) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00b\00a\00") - (data (i32.const 1504) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00a\00a\00") - (data (i32.const 1528) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00a\00a\00a\00") - (data (i32.const 1552) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00a\00b\00a\00b\00a\00b\00a\00b\00") - (data (i32.const 1584) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00a\00a\00a\00a\00a\00") - (data (i32.const 1616) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00a\00a\00a\00a\00a\00a\00") - (data (i32.const 1648) "\01\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00a\00a\00a\00a\00a\00a\00a\00") - (data (i32.const 1680) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00") - (data (i32.const 1728) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00n\00") - (data (i32.const 1752) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00j\00k\00l\00m\00n\00") - (data (i32.const 1784) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00c\00d\00e\00f\00g\00") - (data (i32.const 1816) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00d\00e\00f\00g\00h\00") - (data (i32.const 1848) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00") - (data (i32.const 1896) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 1944) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 2000) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00a\00,\00b\00,\00c\00") - (data (i32.const 2032) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00.\00") - (data (i32.const 2056) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00c\00") - (data (i32.const 2080) "\01\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00a\00,\00 \00b\00,\00 \00c\00") - (data (i32.const 2112) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00,\00 \00") - (data (i32.const 2136) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00a\00,\00b\00,\00,\00c\00") - (data (i32.const 2168) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00,\00a\00,\00b\00,\00c\00") - (data (i32.const 2200) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00a\00,\00b\00,\00c\00,\00") - (data (i32.const 2232) "\03\00\00\00\90\01\00\00\00\00\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") - (data (i32.const 2648) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c8\08\00\00\c8\08\00\00\90\01\00\00d\00\00\00") - (data (i32.const 2680) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\008\00") - (data (i32.const 2704) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00-\001\000\000\000\00") - (data (i32.const 2736) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\001\002\003\004\00") - (data (i32.const 2760) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\001\002\003\004\005\00") - (data (i32.const 2792) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\001\002\003\004\005\006\00") - (data (i32.const 2824) "\01\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\001\001\001\001\001\001\001\00") - (data (i32.const 2856) "\01\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\001\002\003\004\005\006\007\00") - (data (i32.const 2888) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\002\001\004\007\004\008\003\006\004\006\00") - (data (i32.const 2928) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\002\001\004\007\004\008\003\006\004\007\00") - (data (i32.const 2968) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00-\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 3008) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00-\001\00") - (data (i32.const 3032) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\001\000\000\000\00") - (data (i32.const 3056) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 3096) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\004\002\009\004\009\006\007\002\009\005\00") - (data (i32.const 3136) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\009\009\009\009\009\009\009\009\00") - (data (i32.const 3168) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\001\000\000\000\000\000\000\000\000\00") - (data (i32.const 3208) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3248) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3288) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3336) "\01\00\00\00 \00\00\00\00\00\00\00\00\00\00\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3384) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3440) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\001\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005\00") - (data (i32.const 3496) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00-\001\002\003\004\00") - (data (i32.const 3528) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00-\004\002\009\004\009\006\007\002\009\005\00") - (data (i32.const 3568) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00-\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3608) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00-\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3656) "\01\00\00\00 \00\00\00\00\00\00\00\00\00\00\00-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3704) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3760) "\01\00\00\00&\00\00\00\00\00\00\00\00\00\00\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007\00") - (data (i32.const 3816) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008\00") - (data (i32.const 3872) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\000\00.\000\00") - (data (i32.const 3896) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00N\00a\00N\00") - (data (i32.const 3920) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 3960) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 3992) "\03\00\00\00\b8\02\00\00\00\00\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8#push drop else @@ -3097,7 +3096,7 @@ local.get $13 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $3 local.get $3 local.get $0 @@ -3112,7 +3111,7 @@ local.get $9 local.get $3 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register call $~lib/array/Array<~lib/string/String>#push drop else @@ -3143,7 +3142,7 @@ i32.ge_u if i32.const 0 - i32.const 1912 + i32.const 1920 i32.const 96 i32.const 45 call $~lib/env/abort @@ -3157,7 +3156,7 @@ i32.ge_u if i32.const 0 - i32.const 1912 + i32.const 1920 i32.const 99 i32.const 61 call $~lib/env/abort @@ -3244,7 +3243,7 @@ (local $7 i32) (local $8 i64) (local $9 i64) - i32.const 2664 + i32.const 2616 i32.load offset=4 local.set $3 block $break|0 @@ -3389,7 +3388,7 @@ local.get $0 i32.eqz if - i32.const 840 + i32.const 848 return end local.get $0 @@ -3411,7 +3410,7 @@ local.get $2 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $3 block $~lib/util/number/utoa32_core|inlined.0 local.get $3 @@ -3433,7 +3432,7 @@ end local.get $3 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/number/utoa32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -3444,7 +3443,7 @@ local.get $0 i32.eqz if - i32.const 840 + i32.const 848 return end local.get $0 @@ -3453,7 +3452,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 block $~lib/util/number/utoa32_core|inlined.1 local.get $2 @@ -3469,7 +3468,7 @@ end local.get $2 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/number/decimalCount64 (; 52 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) @@ -3552,7 +3551,7 @@ (local $11 i32) (local $12 i64) (local $13 i64) - i32.const 2664 + i32.const 2616 i32.load offset=4 local.set $3 block $break|0 @@ -3679,7 +3678,7 @@ local.get $0 i64.eqz if - i32.const 840 + i32.const 848 return end local.get $0 @@ -3696,7 +3695,7 @@ local.get $3 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 block $~lib/util/number/utoa32_core|inlined.2 local.get $1 @@ -3717,7 +3716,7 @@ local.get $3 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 block $~lib/util/number/utoa64_core|inlined.0 local.get $1 @@ -3734,7 +3733,7 @@ end local.get $1 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/number/itoa64 (; 55 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) @@ -3748,7 +3747,7 @@ local.get $0 i64.eqz if - i32.const 840 + i32.const 848 return end local.get $0 @@ -3778,7 +3777,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 block $~lib/util/number/utoa32_core|inlined.3 local.get $2 @@ -3801,7 +3800,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 block $~lib/util/number/utoa64_core|inlined.1 local.get $2 @@ -3824,7 +3823,7 @@ end local.get $2 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/builtins/isFinite (; 56 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 @@ -3912,7 +3911,7 @@ local.set $14 local.get $6 local.set $15 - i32.const 5032 + i32.const 4984 i32.load offset=4 local.set $16 block $break|0 @@ -4929,11 +4928,11 @@ i32.shl i32.sub global.set $~lib/util/number/_K - i32.const 4720 + i32.const 4672 local.get $13 call $~lib/array/Array#__unchecked_get global.set $~lib/util/number/_frc_pow - i32.const 4944 + i32.const 4896 local.get $13 call $~lib/array/Array#__unchecked_get global.set $~lib/util/number/_exp_pow @@ -5213,8 +5212,8 @@ i32.eqz if i32.const 0 - i32.const 256 - i32.const 197 + i32.const 264 + i32.const 203 i32.const 4 call $~lib/env/abort unreachable @@ -5304,7 +5303,7 @@ return end local.get $3 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $10 local.get $10 local.get $0 @@ -5314,9 +5313,9 @@ call $~lib/memory/memory.copy local.get $10 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) - (func $~lib/runtime/runtime.discard (; 64 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/util/runtime/discard (; 64 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -5325,8 +5324,8 @@ if i32.const 0 i32.const 184 - i32.const 68 - i32.const 6 + i32.const 114 + i32.const 4 call $~lib/env/abort unreachable end @@ -5342,8 +5341,8 @@ if i32.const 0 i32.const 184 - i32.const 70 - i32.const 6 + i32.const 116 + i32.const 4 call $~lib/env/abort unreachable end @@ -5358,7 +5357,7 @@ f64.const 0 f64.eq if - i32.const 3888 + i32.const 3840 return end local.get $0 @@ -5368,11 +5367,11 @@ local.get $0 call $~lib/builtins/isNaN if - i32.const 3912 + i32.const 3864 return end - i32.const 3936 - i32.const 3976 + i32.const 3888 + i32.const 3928 local.get $0 f64.const 0 f64.lt @@ -5382,7 +5381,7 @@ i32.const 28 i32.const 1 i32.shl - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 local.get $1 local.get $0 @@ -5394,7 +5393,7 @@ call $~lib/string/String#substring local.set $3 local.get $1 - call $~lib/runtime/runtime.discard + call $~lib/util/runtime/discard local.get $3 ) (func $start:std/string (; 66 ;) (type $FUNCSIG$v) @@ -5507,7 +5506,7 @@ end i32.const 54 call $~lib/string/String.fromCharCode - i32.const 232 + i32.const 240 call $~lib/string/String.__eq i32.eqz if @@ -5522,7 +5521,7 @@ i32.const 54 i32.add call $~lib/string/String.fromCharCode - i32.const 232 + i32.const 240 call $~lib/string/String.__eq i32.eqz if @@ -5548,7 +5547,7 @@ end i32.const 54 call $~lib/string/String.fromCodePoint - i32.const 232 + i32.const 240 call $~lib/string/String.__eq i32.eqz if @@ -5563,7 +5562,7 @@ call $~lib/string/String.fromCodePoint i32.eqz if - i32.const 304 + i32.const 312 i32.const 72 i32.const 32 i32.const 0 @@ -5571,7 +5570,7 @@ unreachable end global.get $std/string/str - i32.const 328 + i32.const 336 i32.const 0 call $~lib/string/String#startsWith i32.eqz @@ -5584,7 +5583,7 @@ unreachable end global.get $std/string/str - i32.const 376 + i32.const 384 global.get $~lib/string/String.MAX_LENGTH call $~lib/string/String#endsWith i32.eqz @@ -5599,7 +5598,7 @@ block $~lib/string/String#includes|inlined.0 (result i32) global.get $std/string/str local.set $2 - i32.const 408 + i32.const 416 local.set $1 i32.const 0 local.set $0 @@ -5623,7 +5622,7 @@ end global.get $std/string/str i32.const 0 - i32.const 432 + i32.const 440 call $~lib/string/String#padStart global.get $std/string/str call $~lib/string/String.__eq @@ -5638,7 +5637,7 @@ end global.get $std/string/str i32.const 15 - i32.const 432 + i32.const 440 call $~lib/string/String#padStart global.get $std/string/str call $~lib/string/String.__eq @@ -5653,9 +5652,9 @@ end i32.const 120 i32.const 3 - i32.const 432 + i32.const 440 call $~lib/string/String#padStart - i32.const 456 + i32.const 464 call $~lib/string/String.__eq i32.eqz if @@ -5696,11 +5695,11 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 5 - i32.const 432 + i32.const 440 call $~lib/string/String#padStart - i32.const 504 + i32.const 512 call $~lib/string/String.__eq i32.eqz if @@ -5711,11 +5710,11 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 6 - i32.const 536 + i32.const 544 call $~lib/string/String#padStart - i32.const 560 + i32.const 568 call $~lib/string/String.__eq i32.eqz if @@ -5726,11 +5725,11 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 8 - i32.const 536 + i32.const 544 call $~lib/string/String#padStart - i32.const 592 + i32.const 600 call $~lib/string/String.__eq i32.eqz if @@ -5743,7 +5742,7 @@ end global.get $std/string/str i32.const 0 - i32.const 432 + i32.const 440 call $~lib/string/String#padEnd global.get $std/string/str call $~lib/string/String.__eq @@ -5758,7 +5757,7 @@ end global.get $std/string/str i32.const 15 - i32.const 432 + i32.const 440 call $~lib/string/String#padEnd global.get $std/string/str call $~lib/string/String.__eq @@ -5773,9 +5772,9 @@ end i32.const 120 i32.const 3 - i32.const 432 + i32.const 440 call $~lib/string/String#padEnd - i32.const 456 + i32.const 464 call $~lib/string/String.__eq i32.eqz if @@ -5816,11 +5815,11 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 5 - i32.const 432 + i32.const 440 call $~lib/string/String#padEnd - i32.const 624 + i32.const 632 call $~lib/string/String.__eq i32.eqz if @@ -5831,11 +5830,11 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 6 - i32.const 480 + i32.const 488 call $~lib/string/String#padEnd - i32.const 656 + i32.const 664 call $~lib/string/String.__eq i32.eqz if @@ -5846,11 +5845,11 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 8 - i32.const 480 + i32.const 488 call $~lib/string/String#padEnd - i32.const 688 + i32.const 696 call $~lib/string/String.__eq i32.eqz if @@ -5877,7 +5876,7 @@ unreachable end i32.const 120 - i32.const 328 + i32.const 336 i32.const 0 call $~lib/string/String#indexOf i32.const -1 @@ -5937,7 +5936,7 @@ unreachable end global.get $std/string/str - i32.const 720 + i32.const 728 i32.const 0 call $~lib/string/String#indexOf i32.const 2 @@ -5952,7 +5951,7 @@ unreachable end global.get $std/string/str - i32.const 744 + i32.const 752 i32.const 0 call $~lib/string/String#indexOf i32.const -1 @@ -5967,7 +5966,7 @@ unreachable end global.get $std/string/str - i32.const 720 + i32.const 728 i32.const 2 call $~lib/string/String#indexOf i32.const 2 @@ -5982,7 +5981,7 @@ unreachable end global.get $std/string/str - i32.const 720 + i32.const 728 i32.const 3 call $~lib/string/String#indexOf i32.const -1 @@ -5997,7 +5996,7 @@ unreachable end global.get $std/string/str - i32.const 768 + i32.const 776 i32.const -1 call $~lib/string/String#indexOf i32.const 2 @@ -6027,7 +6026,7 @@ unreachable end i32.const 120 - i32.const 328 + i32.const 336 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#lastIndexOf i32.const -1 @@ -6058,7 +6057,7 @@ unreachable end global.get $std/string/str - i32.const 720 + i32.const 728 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#lastIndexOf i32.const 2 @@ -6073,7 +6072,7 @@ unreachable end global.get $std/string/str - i32.const 744 + i32.const 752 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#lastIndexOf i32.const -1 @@ -6088,7 +6087,7 @@ unreachable end global.get $std/string/str - i32.const 792 + i32.const 800 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#lastIndexOf i32.const 15 @@ -6103,7 +6102,7 @@ unreachable end global.get $std/string/str - i32.const 720 + i32.const 728 i32.const 2 call $~lib/string/String#lastIndexOf i32.const 2 @@ -6118,7 +6117,7 @@ unreachable end global.get $std/string/str - i32.const 720 + i32.const 728 i32.const 3 call $~lib/string/String#lastIndexOf i32.const 2 @@ -6133,7 +6132,7 @@ unreachable end global.get $std/string/str - i32.const 768 + i32.const 776 i32.const -1 call $~lib/string/String#lastIndexOf i32.const -1 @@ -6148,7 +6147,7 @@ unreachable end global.get $std/string/str - i32.const 816 + i32.const 824 i32.const 0 call $~lib/string/String#lastIndexOf i32.const -1 @@ -6163,7 +6162,7 @@ unreachable end global.get $std/string/str - i32.const 328 + i32.const 336 i32.const 0 call $~lib/string/String#lastIndexOf i32.const 0 @@ -6177,7 +6176,7 @@ call $~lib/env/abort unreachable end - i32.const 840 + i32.const 848 i32.const 0 call $~lib/string/parseInt f64.const 0 @@ -6191,7 +6190,7 @@ call $~lib/env/abort unreachable end - i32.const 864 + i32.const 872 i32.const 0 call $~lib/string/parseInt f64.const 1 @@ -6205,7 +6204,7 @@ call $~lib/env/abort unreachable end - i32.const 888 + i32.const 896 i32.const 0 call $~lib/string/parseInt f64.const 5 @@ -6219,7 +6218,7 @@ call $~lib/env/abort unreachable end - i32.const 920 + i32.const 928 i32.const 0 call $~lib/string/parseInt f64.const 455 @@ -6233,7 +6232,7 @@ call $~lib/env/abort unreachable end - i32.const 952 + i32.const 960 i32.const 0 call $~lib/string/parseInt f64.const 3855 @@ -6247,7 +6246,7 @@ call $~lib/env/abort unreachable end - i32.const 984 + i32.const 992 i32.const 0 call $~lib/string/parseInt f64.const 3855 @@ -6261,7 +6260,7 @@ call $~lib/env/abort unreachable end - i32.const 1016 + i32.const 1024 i32.const 0 call $~lib/string/parseInt f64.const 11 @@ -6275,7 +6274,7 @@ call $~lib/env/abort unreachable end - i32.const 1040 + i32.const 1048 i32.const 0 call $~lib/string/parseInt f64.const 1 @@ -6289,7 +6288,7 @@ call $~lib/env/abort unreachable end - i32.const 840 + i32.const 848 call $~lib/string/parseFloat f64.const 0 f64.eq @@ -6302,7 +6301,7 @@ call $~lib/env/abort unreachable end - i32.const 864 + i32.const 872 call $~lib/string/parseFloat f64.const 1 f64.eq @@ -6315,7 +6314,7 @@ call $~lib/env/abort unreachable end - i32.const 1064 + i32.const 1072 call $~lib/string/parseFloat f64.const 0.1 f64.eq @@ -6328,7 +6327,7 @@ call $~lib/env/abort unreachable end - i32.const 1088 + i32.const 1096 call $~lib/string/parseFloat f64.const 0.25 f64.eq @@ -6341,7 +6340,7 @@ call $~lib/env/abort unreachable end - i32.const 1112 + i32.const 1120 call $~lib/string/parseFloat f64.const 0.1 f64.eq @@ -6355,11 +6354,11 @@ unreachable end i32.const 160 - i32.const 1144 + i32.const 1152 call $~lib/string/String.__concat global.set $std/string/c global.get $std/string/c - i32.const 1168 + i32.const 1176 call $~lib/string/String.__eq i32.eqz if @@ -6419,7 +6418,7 @@ unreachable end i32.const 160 - i32.const 1144 + i32.const 1152 call $~lib/string/String.__ne i32.eqz if @@ -6442,8 +6441,8 @@ call $~lib/env/abort unreachable end - i32.const 1192 - i32.const 1216 + i32.const 1200 + i32.const 1224 call $~lib/string/String.__ne i32.eqz if @@ -6454,8 +6453,8 @@ call $~lib/env/abort unreachable end - i32.const 1192 - i32.const 1192 + i32.const 1200 + i32.const 1200 call $~lib/string/String.__eq i32.eqz if @@ -6466,8 +6465,8 @@ call $~lib/env/abort unreachable end - i32.const 1240 - i32.const 1264 + i32.const 1248 + i32.const 1272 call $~lib/string/String.__ne i32.eqz if @@ -6478,8 +6477,8 @@ call $~lib/env/abort unreachable end - i32.const 1288 - i32.const 1320 + i32.const 1296 + i32.const 1328 call $~lib/string/String.__ne i32.eqz if @@ -6490,8 +6489,8 @@ call $~lib/env/abort unreachable end - i32.const 1352 - i32.const 1352 + i32.const 1360 + i32.const 1360 call $~lib/string/String.__eq i32.eqz if @@ -6502,8 +6501,8 @@ call $~lib/env/abort unreachable end - i32.const 1352 - i32.const 1384 + i32.const 1360 + i32.const 1392 call $~lib/string/String.__ne i32.eqz if @@ -6514,8 +6513,8 @@ call $~lib/env/abort unreachable end - i32.const 1416 - i32.const 1456 + i32.const 1424 + i32.const 1464 call $~lib/string/String.__ne i32.eqz if @@ -6526,7 +6525,7 @@ call $~lib/env/abort unreachable end - i32.const 1144 + i32.const 1152 i32.const 160 call $~lib/string/String.__gt i32.eqz @@ -6538,7 +6537,7 @@ call $~lib/env/abort unreachable end - i32.const 1496 + i32.const 1504 i32.const 160 call $~lib/string/String.__gt i32.eqz @@ -6550,8 +6549,8 @@ call $~lib/env/abort unreachable end - i32.const 1496 - i32.const 1520 + i32.const 1504 + i32.const 1528 call $~lib/string/String.__gte i32.eqz if @@ -6562,8 +6561,8 @@ call $~lib/env/abort unreachable end - i32.const 1496 - i32.const 1168 + i32.const 1504 + i32.const 1176 call $~lib/string/String.__gt i32.eqz if @@ -6574,8 +6573,8 @@ call $~lib/env/abort unreachable end - i32.const 1496 - i32.const 1168 + i32.const 1504 + i32.const 1176 call $~lib/string/String.__lt i32.eqz i32.eqz @@ -6587,7 +6586,7 @@ call $~lib/env/abort unreachable end - i32.const 1144 + i32.const 1152 global.get $std/string/nullStr call $~lib/string/String.__lt i32.eqz @@ -6601,7 +6600,7 @@ unreachable end global.get $std/string/nullStr - i32.const 1144 + i32.const 1152 call $~lib/string/String.__lt i32.eqz i32.eqz @@ -6613,7 +6612,7 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 120 call $~lib/string/String.__gt i32.eqz @@ -6626,7 +6625,7 @@ unreachable end i32.const 120 - i32.const 480 + i32.const 488 call $~lib/string/String.__lt i32.eqz if @@ -6637,7 +6636,7 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 120 call $~lib/string/String.__gte i32.eqz @@ -6650,7 +6649,7 @@ unreachable end i32.const 120 - i32.const 480 + i32.const 488 call $~lib/string/String.__lte i32.eqz if @@ -6661,7 +6660,7 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 120 call $~lib/string/String.__lt i32.eqz @@ -6675,7 +6674,7 @@ unreachable end i32.const 120 - i32.const 480 + i32.const 488 call $~lib/string/String.__gt i32.eqz i32.eqz @@ -6758,7 +6757,7 @@ call $~lib/env/abort unreachable end - i32.const 536 + i32.const 544 call $~lib/string/String#get:length i32.const 3 i32.eq @@ -6816,7 +6815,7 @@ i32.const 160 i32.const 2 call $~lib/string/String#repeat - i32.const 1520 + i32.const 1528 call $~lib/string/String.__eq i32.eqz if @@ -6830,7 +6829,7 @@ i32.const 160 i32.const 3 call $~lib/string/String#repeat - i32.const 1544 + i32.const 1552 call $~lib/string/String.__eq i32.eqz if @@ -6841,10 +6840,10 @@ call $~lib/env/abort unreachable end - i32.const 1168 + i32.const 1176 i32.const 4 call $~lib/string/String#repeat - i32.const 1568 + i32.const 1576 call $~lib/string/String.__eq i32.eqz if @@ -6858,7 +6857,7 @@ i32.const 160 i32.const 5 call $~lib/string/String#repeat - i32.const 1600 + i32.const 1608 call $~lib/string/String.__eq i32.eqz if @@ -6872,7 +6871,7 @@ i32.const 160 i32.const 6 call $~lib/string/String#repeat - i32.const 1632 + i32.const 1640 call $~lib/string/String.__eq i32.eqz if @@ -6886,7 +6885,7 @@ i32.const 160 i32.const 7 call $~lib/string/String#repeat - i32.const 1664 + i32.const 1672 call $~lib/string/String.__eq i32.eqz if @@ -6897,13 +6896,13 @@ call $~lib/env/abort unreachable end - i32.const 1696 + i32.const 1704 global.set $std/string/str global.get $std/string/str i32.const 0 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#slice - i32.const 1696 + i32.const 1704 call $~lib/string/String.__eq i32.eqz if @@ -6918,7 +6917,7 @@ i32.const -1 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#slice - i32.const 1744 + i32.const 1752 call $~lib/string/String.__eq i32.eqz if @@ -6933,7 +6932,7 @@ i32.const -5 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#slice - i32.const 1768 + i32.const 1776 call $~lib/string/String.__eq i32.eqz if @@ -6948,7 +6947,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#slice - i32.const 1800 + i32.const 1808 call $~lib/string/String.__eq i32.eqz if @@ -6963,7 +6962,7 @@ i32.const -11 i32.const -6 call $~lib/string/String#slice - i32.const 1832 + i32.const 1840 call $~lib/string/String.__eq i32.eqz if @@ -6993,7 +6992,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#slice - i32.const 1864 + i32.const 1872 call $~lib/string/String.__eq i32.eqz if @@ -7051,7 +7050,7 @@ unreachable end i32.const 120 - i32.const 720 + i32.const 728 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -7078,8 +7077,8 @@ call $~lib/env/abort unreachable end - i32.const 2016 - i32.const 2048 + i32.const 1968 + i32.const 2000 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -7092,7 +7091,7 @@ global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2016 + i32.const 1968 call $~lib/string/String.__eq else local.get $0 @@ -7106,8 +7105,8 @@ call $~lib/env/abort unreachable end - i32.const 2016 - i32.const 720 + i32.const 1968 + i32.const 728 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -7130,7 +7129,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1144 + i32.const 1152 call $~lib/string/String.__eq else local.get $0 @@ -7140,7 +7139,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2072 + i32.const 2024 call $~lib/string/String.__eq else local.get $0 @@ -7154,8 +7153,8 @@ call $~lib/env/abort unreachable end - i32.const 2096 - i32.const 2128 + i32.const 2048 + i32.const 2080 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -7178,7 +7177,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1144 + i32.const 1152 call $~lib/string/String.__eq else local.get $0 @@ -7188,7 +7187,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2072 + i32.const 2024 call $~lib/string/String.__eq else local.get $0 @@ -7202,8 +7201,8 @@ call $~lib/env/abort unreachable end - i32.const 2152 - i32.const 720 + i32.const 2104 + i32.const 728 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -7226,7 +7225,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1144 + i32.const 1152 call $~lib/string/String.__eq else local.get $0 @@ -7246,7 +7245,7 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2072 + i32.const 2024 call $~lib/string/String.__eq else local.get $0 @@ -7260,8 +7259,8 @@ call $~lib/env/abort unreachable end - i32.const 2184 - i32.const 720 + i32.const 2136 + i32.const 728 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -7294,7 +7293,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1144 + i32.const 1152 call $~lib/string/String.__eq else local.get $0 @@ -7304,7 +7303,7 @@ global.get $std/string/sa i32.const 3 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2072 + i32.const 2024 call $~lib/string/String.__eq else local.get $0 @@ -7318,8 +7317,8 @@ call $~lib/env/abort unreachable end - i32.const 2216 - i32.const 720 + i32.const 2168 + i32.const 728 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split global.set $std/string/sa @@ -7342,7 +7341,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1144 + i32.const 1152 call $~lib/string/String.__eq else local.get $0 @@ -7352,7 +7351,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2072 + i32.const 2024 call $~lib/string/String.__eq else local.get $0 @@ -7376,7 +7375,7 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 120 global.get $~lib/builtins/i32.MAX_VALUE call $~lib/string/String#split @@ -7400,7 +7399,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1144 + i32.const 1152 call $~lib/string/String.__eq else local.get $0 @@ -7410,7 +7409,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2072 + i32.const 2024 call $~lib/string/String.__eq else local.get $0 @@ -7424,7 +7423,7 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 120 i32.const 0 call $~lib/string/String#split @@ -7442,7 +7441,7 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 120 i32.const 1 call $~lib/string/String#split @@ -7470,8 +7469,8 @@ call $~lib/env/abort unreachable end - i32.const 2016 - i32.const 720 + i32.const 1968 + i32.const 728 i32.const 1 call $~lib/string/String#split global.set $std/string/sa @@ -7498,7 +7497,7 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 120 i32.const 4 call $~lib/string/String#split @@ -7522,7 +7521,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1144 + i32.const 1152 call $~lib/string/String.__eq else local.get $0 @@ -7532,7 +7531,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2072 + i32.const 2024 call $~lib/string/String.__eq else local.get $0 @@ -7546,7 +7545,7 @@ call $~lib/env/abort unreachable end - i32.const 480 + i32.const 488 i32.const 120 i32.const -1 call $~lib/string/String#split @@ -7570,7 +7569,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1144 + i32.const 1152 call $~lib/string/String.__eq else local.get $0 @@ -7580,7 +7579,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2072 + i32.const 2024 call $~lib/string/String.__eq else local.get $0 @@ -7594,8 +7593,8 @@ call $~lib/env/abort unreachable end - i32.const 2016 - i32.const 720 + i32.const 1968 + i32.const 728 i32.const -1 call $~lib/string/String#split global.set $std/string/sa @@ -7618,7 +7617,7 @@ global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1144 + i32.const 1152 call $~lib/string/String.__eq else local.get $0 @@ -7628,7 +7627,7 @@ global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2072 + i32.const 2024 call $~lib/string/String.__eq else local.get $0 @@ -7644,7 +7643,7 @@ end i32.const 0 call $~lib/util/number/itoa32 - i32.const 840 + i32.const 848 call $~lib/string/String.__eq i32.eqz if @@ -7657,7 +7656,7 @@ end i32.const 1 call $~lib/util/number/itoa32 - i32.const 864 + i32.const 872 call $~lib/string/String.__eq i32.eqz if @@ -7670,7 +7669,7 @@ end i32.const 8 call $~lib/util/number/itoa32 - i32.const 2696 + i32.const 2648 call $~lib/string/String.__eq i32.eqz if @@ -7683,7 +7682,7 @@ end i32.const 123 call $~lib/util/number/itoa32 - i32.const 536 + i32.const 544 call $~lib/string/String.__eq i32.eqz if @@ -7696,7 +7695,7 @@ end i32.const -1000 call $~lib/util/number/itoa32 - i32.const 2720 + i32.const 2672 call $~lib/string/String.__eq i32.eqz if @@ -7709,7 +7708,7 @@ end i32.const 1234 call $~lib/util/number/itoa32 - i32.const 2752 + i32.const 2704 call $~lib/string/String.__eq i32.eqz if @@ -7722,7 +7721,7 @@ end i32.const 12345 call $~lib/util/number/itoa32 - i32.const 2776 + i32.const 2728 call $~lib/string/String.__eq i32.eqz if @@ -7735,7 +7734,7 @@ end i32.const 123456 call $~lib/util/number/itoa32 - i32.const 2808 + i32.const 2760 call $~lib/string/String.__eq i32.eqz if @@ -7748,7 +7747,7 @@ end i32.const 1111111 call $~lib/util/number/itoa32 - i32.const 2840 + i32.const 2792 call $~lib/string/String.__eq i32.eqz if @@ -7761,7 +7760,7 @@ end i32.const 1234567 call $~lib/util/number/itoa32 - i32.const 2872 + i32.const 2824 call $~lib/string/String.__eq i32.eqz if @@ -7774,7 +7773,7 @@ end i32.const 2147483646 call $~lib/util/number/itoa32 - i32.const 2904 + i32.const 2856 call $~lib/string/String.__eq i32.eqz if @@ -7787,7 +7786,7 @@ end i32.const 2147483647 call $~lib/util/number/itoa32 - i32.const 2944 + i32.const 2896 call $~lib/string/String.__eq i32.eqz if @@ -7800,7 +7799,7 @@ end i32.const -2147483648 call $~lib/util/number/itoa32 - i32.const 2984 + i32.const 2936 call $~lib/string/String.__eq i32.eqz if @@ -7813,7 +7812,7 @@ end i32.const -1 call $~lib/util/number/itoa32 - i32.const 3024 + i32.const 2976 call $~lib/string/String.__eq i32.eqz if @@ -7826,7 +7825,7 @@ end i32.const 0 call $~lib/util/number/utoa32 - i32.const 840 + i32.const 848 call $~lib/string/String.__eq i32.eqz if @@ -7839,7 +7838,7 @@ end i32.const 1000 call $~lib/util/number/utoa32 - i32.const 3048 + i32.const 3000 call $~lib/string/String.__eq i32.eqz if @@ -7852,7 +7851,7 @@ end i32.const 2147483647 call $~lib/util/number/utoa32 - i32.const 2944 + i32.const 2896 call $~lib/string/String.__eq i32.eqz if @@ -7865,7 +7864,7 @@ end i32.const -2147483648 call $~lib/util/number/utoa32 - i32.const 3072 + i32.const 3024 call $~lib/string/String.__eq i32.eqz if @@ -7878,7 +7877,7 @@ end global.get $~lib/builtins/u32.MAX_VALUE call $~lib/util/number/utoa32 - i32.const 3112 + i32.const 3064 call $~lib/string/String.__eq i32.eqz if @@ -7891,7 +7890,7 @@ end i64.const 0 call $~lib/util/number/utoa64 - i32.const 840 + i32.const 848 call $~lib/string/String.__eq i32.eqz if @@ -7904,7 +7903,7 @@ end i64.const 1234 call $~lib/util/number/utoa64 - i32.const 2752 + i32.const 2704 call $~lib/string/String.__eq i32.eqz if @@ -7917,7 +7916,7 @@ end i64.const 99999999 call $~lib/util/number/utoa64 - i32.const 3152 + i32.const 3104 call $~lib/string/String.__eq i32.eqz if @@ -7930,7 +7929,7 @@ end i64.const 100000000 call $~lib/util/number/utoa64 - i32.const 3184 + i32.const 3136 call $~lib/string/String.__eq i32.eqz if @@ -7943,7 +7942,7 @@ end i64.const 4294967295 call $~lib/util/number/utoa64 - i32.const 3112 + i32.const 3064 call $~lib/string/String.__eq i32.eqz if @@ -7956,7 +7955,7 @@ end i64.const 68719476735 call $~lib/util/number/utoa64 - i32.const 3224 + i32.const 3176 call $~lib/string/String.__eq i32.eqz if @@ -7969,7 +7968,7 @@ end i64.const 868719476735 call $~lib/util/number/utoa64 - i32.const 3264 + i32.const 3216 call $~lib/string/String.__eq i32.eqz if @@ -7982,7 +7981,7 @@ end i64.const 999868719476735 call $~lib/util/number/utoa64 - i32.const 3304 + i32.const 3256 call $~lib/string/String.__eq i32.eqz if @@ -7995,7 +7994,7 @@ end i64.const 9999868719476735 call $~lib/util/number/utoa64 - i32.const 3352 + i32.const 3304 call $~lib/string/String.__eq i32.eqz if @@ -8008,7 +8007,7 @@ end i64.const 19999868719476735 call $~lib/util/number/utoa64 - i32.const 3400 + i32.const 3352 call $~lib/string/String.__eq i32.eqz if @@ -8021,7 +8020,7 @@ end global.get $~lib/builtins/u64.MAX_VALUE call $~lib/util/number/utoa64 - i32.const 3456 + i32.const 3408 call $~lib/string/String.__eq i32.eqz if @@ -8034,7 +8033,7 @@ end i64.const 0 call $~lib/util/number/itoa64 - i32.const 840 + i32.const 848 call $~lib/string/String.__eq i32.eqz if @@ -8047,7 +8046,7 @@ end i64.const -1234 call $~lib/util/number/itoa64 - i32.const 3512 + i32.const 3464 call $~lib/string/String.__eq i32.eqz if @@ -8060,7 +8059,7 @@ end i64.const 4294967295 call $~lib/util/number/itoa64 - i32.const 3112 + i32.const 3064 call $~lib/string/String.__eq i32.eqz if @@ -8073,7 +8072,7 @@ end i64.const -4294967295 call $~lib/util/number/itoa64 - i32.const 3544 + i32.const 3496 call $~lib/string/String.__eq i32.eqz if @@ -8086,7 +8085,7 @@ end i64.const 68719476735 call $~lib/util/number/itoa64 - i32.const 3224 + i32.const 3176 call $~lib/string/String.__eq i32.eqz if @@ -8099,7 +8098,7 @@ end i64.const -68719476735 call $~lib/util/number/itoa64 - i32.const 3584 + i32.const 3536 call $~lib/string/String.__eq i32.eqz if @@ -8112,7 +8111,7 @@ end i64.const -868719476735 call $~lib/util/number/itoa64 - i32.const 3624 + i32.const 3576 call $~lib/string/String.__eq i32.eqz if @@ -8125,7 +8124,7 @@ end i64.const -999868719476735 call $~lib/util/number/itoa64 - i32.const 3672 + i32.const 3624 call $~lib/string/String.__eq i32.eqz if @@ -8138,7 +8137,7 @@ end i64.const -19999868719476735 call $~lib/util/number/itoa64 - i32.const 3720 + i32.const 3672 call $~lib/string/String.__eq i32.eqz if @@ -8151,7 +8150,7 @@ end global.get $~lib/builtins/i64.MAX_VALUE call $~lib/util/number/itoa64 - i32.const 3776 + i32.const 3728 call $~lib/string/String.__eq i32.eqz if @@ -8164,7 +8163,7 @@ end global.get $~lib/builtins/i64.MIN_VALUE call $~lib/util/number/itoa64 - i32.const 3832 + i32.const 3784 call $~lib/string/String.__eq i32.eqz if @@ -8177,7 +8176,7 @@ end f64.const 0 call $~lib/util/number/dtoa - i32.const 3888 + i32.const 3840 call $~lib/string/String.__eq i32.eqz if @@ -8190,7 +8189,7 @@ end f64.const -0 call $~lib/util/number/dtoa - i32.const 3888 + i32.const 3840 call $~lib/string/String.__eq i32.eqz if @@ -8203,7 +8202,7 @@ end f64.const nan:0x8000000000000 call $~lib/util/number/dtoa - i32.const 3912 + i32.const 3864 call $~lib/string/String.__eq i32.eqz if @@ -8216,7 +8215,7 @@ end f64.const inf call $~lib/util/number/dtoa - i32.const 3976 + i32.const 3928 call $~lib/string/String.__eq i32.eqz if @@ -8230,7 +8229,7 @@ f64.const inf f64.neg call $~lib/util/number/dtoa - i32.const 3936 + i32.const 3888 call $~lib/string/String.__eq i32.eqz if @@ -8243,7 +8242,7 @@ end global.get $~lib/builtins/f64.EPSILON call $~lib/util/number/dtoa - i32.const 5064 + i32.const 5016 call $~lib/string/String.__eq i32.eqz if @@ -8257,7 +8256,7 @@ global.get $~lib/builtins/f64.EPSILON f64.neg call $~lib/util/number/dtoa - i32.const 5128 + i32.const 5080 call $~lib/string/String.__eq i32.eqz if @@ -8270,7 +8269,7 @@ end global.get $~lib/builtins/f64.MAX_VALUE call $~lib/util/number/dtoa - i32.const 5192 + i32.const 5144 call $~lib/string/String.__eq i32.eqz if @@ -8284,7 +8283,7 @@ global.get $~lib/builtins/f64.MAX_VALUE f64.neg call $~lib/util/number/dtoa - i32.const 5256 + i32.const 5208 call $~lib/string/String.__eq i32.eqz if @@ -8297,7 +8296,7 @@ end f64.const 4185580496821356722454785e274 call $~lib/util/number/dtoa - i32.const 5320 + i32.const 5272 call $~lib/string/String.__eq i32.eqz if @@ -8310,7 +8309,7 @@ end f64.const 2.2250738585072014e-308 call $~lib/util/number/dtoa - i32.const 5384 + i32.const 5336 call $~lib/string/String.__eq i32.eqz if @@ -8323,7 +8322,7 @@ end f64.const 4.940656e-318 call $~lib/util/number/dtoa - i32.const 5448 + i32.const 5400 call $~lib/string/String.__eq i32.eqz if @@ -8336,7 +8335,7 @@ end f64.const 9060801153433600 call $~lib/util/number/dtoa - i32.const 5496 + i32.const 5448 call $~lib/string/String.__eq i32.eqz if @@ -8349,7 +8348,7 @@ end f64.const 4708356024711512064 call $~lib/util/number/dtoa - i32.const 5552 + i32.const 5504 call $~lib/string/String.__eq i32.eqz if @@ -8362,7 +8361,7 @@ end f64.const 9409340012568248320 call $~lib/util/number/dtoa - i32.const 5616 + i32.const 5568 call $~lib/string/String.__eq i32.eqz if @@ -8375,7 +8374,7 @@ end f64.const 5e-324 call $~lib/util/number/dtoa - i32.const 5680 + i32.const 5632 call $~lib/string/String.__eq i32.eqz if @@ -8388,7 +8387,7 @@ end f64.const 1 call $~lib/util/number/dtoa - i32.const 5712 + i32.const 5664 call $~lib/string/String.__eq i32.eqz if @@ -8401,7 +8400,7 @@ end f64.const 0.1 call $~lib/util/number/dtoa - i32.const 1064 + i32.const 1072 call $~lib/string/String.__eq i32.eqz if @@ -8414,7 +8413,7 @@ end f64.const -1 call $~lib/util/number/dtoa - i32.const 5736 + i32.const 5688 call $~lib/string/String.__eq i32.eqz if @@ -8427,7 +8426,7 @@ end f64.const -0.1 call $~lib/util/number/dtoa - i32.const 5760 + i32.const 5712 call $~lib/string/String.__eq i32.eqz if @@ -8440,7 +8439,7 @@ end f64.const 1e6 call $~lib/util/number/dtoa - i32.const 5784 + i32.const 5736 call $~lib/string/String.__eq i32.eqz if @@ -8453,7 +8452,7 @@ end f64.const 1e-06 call $~lib/util/number/dtoa - i32.const 5824 + i32.const 5776 call $~lib/string/String.__eq i32.eqz if @@ -8466,7 +8465,7 @@ end f64.const -1e6 call $~lib/util/number/dtoa - i32.const 5856 + i32.const 5808 call $~lib/string/String.__eq i32.eqz if @@ -8479,7 +8478,7 @@ end f64.const -1e-06 call $~lib/util/number/dtoa - i32.const 5896 + i32.const 5848 call $~lib/string/String.__eq i32.eqz if @@ -8492,7 +8491,7 @@ end f64.const 1e7 call $~lib/util/number/dtoa - i32.const 5936 + i32.const 5888 call $~lib/string/String.__eq i32.eqz if @@ -8505,7 +8504,7 @@ end f64.const 1e-07 call $~lib/util/number/dtoa - i32.const 5976 + i32.const 5928 call $~lib/string/String.__eq i32.eqz if @@ -8518,7 +8517,7 @@ end f64.const 1.e+308 call $~lib/util/number/dtoa - i32.const 6000 + i32.const 5952 call $~lib/string/String.__eq i32.eqz if @@ -8531,7 +8530,7 @@ end f64.const -1.e+308 call $~lib/util/number/dtoa - i32.const 6032 + i32.const 5984 call $~lib/string/String.__eq i32.eqz if @@ -8544,7 +8543,7 @@ end f64.const inf call $~lib/util/number/dtoa - i32.const 3976 + i32.const 3928 call $~lib/string/String.__eq i32.eqz if @@ -8557,7 +8556,7 @@ end f64.const -inf call $~lib/util/number/dtoa - i32.const 3936 + i32.const 3888 call $~lib/string/String.__eq i32.eqz if @@ -8570,7 +8569,7 @@ end f64.const 1e-308 call $~lib/util/number/dtoa - i32.const 6064 + i32.const 6016 call $~lib/string/String.__eq i32.eqz if @@ -8583,7 +8582,7 @@ end f64.const -1e-308 call $~lib/util/number/dtoa - i32.const 6096 + i32.const 6048 call $~lib/string/String.__eq i32.eqz if @@ -8596,7 +8595,7 @@ end f64.const 1e-323 call $~lib/util/number/dtoa - i32.const 6128 + i32.const 6080 call $~lib/string/String.__eq i32.eqz if @@ -8609,7 +8608,7 @@ end f64.const -1e-323 call $~lib/util/number/dtoa - i32.const 6160 + i32.const 6112 call $~lib/string/String.__eq i32.eqz if @@ -8622,7 +8621,7 @@ end f64.const 0 call $~lib/util/number/dtoa - i32.const 3888 + i32.const 3840 call $~lib/string/String.__eq i32.eqz if @@ -8635,7 +8634,7 @@ end f64.const 4294967272 call $~lib/util/number/dtoa - i32.const 6192 + i32.const 6144 call $~lib/string/String.__eq i32.eqz if @@ -8648,7 +8647,7 @@ end f64.const 1.2312145673456234e-08 call $~lib/util/number/dtoa - i32.const 6232 + i32.const 6184 call $~lib/string/String.__eq i32.eqz if @@ -8661,7 +8660,7 @@ end f64.const 555555555.5555556 call $~lib/util/number/dtoa - i32.const 6296 + i32.const 6248 call $~lib/string/String.__eq i32.eqz if @@ -8674,7 +8673,7 @@ end f64.const 0.9999999999999999 call $~lib/util/number/dtoa - i32.const 6352 + i32.const 6304 call $~lib/string/String.__eq i32.eqz if @@ -8687,7 +8686,7 @@ end f64.const 1 call $~lib/util/number/dtoa - i32.const 5712 + i32.const 5664 call $~lib/string/String.__eq i32.eqz if @@ -8700,7 +8699,7 @@ end f64.const 12.34 call $~lib/util/number/dtoa - i32.const 6408 + i32.const 6360 call $~lib/string/String.__eq i32.eqz if @@ -8715,7 +8714,7 @@ f64.const 3 f64.div call $~lib/util/number/dtoa - i32.const 6440 + i32.const 6392 call $~lib/string/String.__eq i32.eqz if @@ -8728,7 +8727,7 @@ end f64.const 1234e17 call $~lib/util/number/dtoa - i32.const 6496 + i32.const 6448 call $~lib/string/String.__eq i32.eqz if @@ -8741,7 +8740,7 @@ end f64.const 1234e18 call $~lib/util/number/dtoa - i32.const 6560 + i32.const 6512 call $~lib/string/String.__eq i32.eqz if @@ -8754,7 +8753,7 @@ end f64.const 2.71828 call $~lib/util/number/dtoa - i32.const 6600 + i32.const 6552 call $~lib/string/String.__eq i32.eqz if @@ -8767,7 +8766,7 @@ end f64.const 0.0271828 call $~lib/util/number/dtoa - i32.const 6632 + i32.const 6584 call $~lib/string/String.__eq i32.eqz if @@ -8780,7 +8779,7 @@ end f64.const 271.828 call $~lib/util/number/dtoa - i32.const 6672 + i32.const 6624 call $~lib/string/String.__eq i32.eqz if @@ -8793,7 +8792,7 @@ end f64.const 1.1e+128 call $~lib/util/number/dtoa - i32.const 6704 + i32.const 6656 call $~lib/string/String.__eq i32.eqz if @@ -8806,7 +8805,7 @@ end f64.const 1.1e-64 call $~lib/util/number/dtoa - i32.const 6736 + i32.const 6688 call $~lib/string/String.__eq i32.eqz if @@ -8819,7 +8818,7 @@ end f64.const 0.000035689 call $~lib/util/number/dtoa - i32.const 6768 + i32.const 6720 call $~lib/string/String.__eq i32.eqz if diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 1af1b09f4a..d00fd4e83d 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -12,27 +12,27 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00\06\00\00\001\002\003") (data (i32.const 24) "\01\00\00\00\1a\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s") - (data (i32.const 64) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 104) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 152) "\01") - (data (i32.const 160) "\01\00\00\00\16\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e") - (data (i32.const 192) "\01\00\00\00$\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e") - (data (i32.const 240) "\01\00\00\00\10\00\00\00i\00s\00R\00e\00g\00E\00x\00p") - (data (i32.const 264) "\01\00\00\00\n\00\00\00m\00a\00t\00c\00h") - (data (i32.const 288) "\01\00\00\00\0e\00\00\00r\00e\00p\00l\00a\00c\00e") - (data (i32.const 312) "\01\00\00\00\0c\00\00\00s\00e\00a\00r\00c\00h") - (data (i32.const 336) "\01\00\00\00\0e\00\00\00s\00p\00e\00c\00i\00e\00s") - (data (i32.const 360) "\01\00\00\00\n\00\00\00s\00p\00l\00i\00t") - (data (i32.const 384) "\01\00\00\00\16\00\00\00t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e") - (data (i32.const 416) "\01\00\00\00\16\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g") - (data (i32.const 448) "\01\00\00\00\16\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s") - (data (i32.const 480) "\01\00\00\00\0e\00\00\00S\00y\00m\00b\00o\00l\00(") - (data (i32.const 504) "\01\00\00\00\08\00\00\00n\00u\00l\00l") - (data (i32.const 520) "\01\00\00\00\02\00\00\00)") - (data (i32.const 536) "\01\00\00\00\10\00\00\00S\00y\00m\00b\00o\00l\00(\00)") - (data (i32.const 560) "\01\00\00\00\16\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)") - (data (i32.const 592) "\01\00\00\00&\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)") - (data (i32.const 640) "\01\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)") + (data (i32.const 64) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 112) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 160) "\01") + (data (i32.const 168) "\01\00\00\00\16\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e") + (data (i32.const 200) "\01\00\00\00$\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e") + (data (i32.const 248) "\01\00\00\00\10\00\00\00i\00s\00R\00e\00g\00E\00x\00p") + (data (i32.const 272) "\01\00\00\00\n\00\00\00m\00a\00t\00c\00h") + (data (i32.const 296) "\01\00\00\00\0e\00\00\00r\00e\00p\00l\00a\00c\00e") + (data (i32.const 320) "\01\00\00\00\0c\00\00\00s\00e\00a\00r\00c\00h") + (data (i32.const 344) "\01\00\00\00\0e\00\00\00s\00p\00e\00c\00i\00e\00s") + (data (i32.const 368) "\01\00\00\00\n\00\00\00s\00p\00l\00i\00t") + (data (i32.const 392) "\01\00\00\00\16\00\00\00t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e") + (data (i32.const 424) "\01\00\00\00\16\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g") + (data (i32.const 456) "\01\00\00\00\16\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s") + (data (i32.const 488) "\01\00\00\00\0e\00\00\00S\00y\00m\00b\00o\00l\00(") + (data (i32.const 512) "\01\00\00\00\08\00\00\00n\00u\00l\00l") + (data (i32.const 528) "\01\00\00\00\02\00\00\00)") + (data (i32.const 544) "\01\00\00\00\10\00\00\00S\00y\00m\00b\00o\00l\00(\00)") + (data (i32.const 568) "\01\00\00\00\16\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)") + (data (i32.const 600) "\01\00\00\00&\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)") + (data (i32.const 648) "\01\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/symbol/nextId (mut i32) (i32.const 12)) @@ -115,7 +115,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -136,16 +136,16 @@ i32.const 8 i32.add ) - (func $~lib/runtime/runtime.register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 700 + i32.const 708 i32.le_u if i32.const 0 i32.const 72 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -159,8 +159,8 @@ if i32.const 0 i32.const 72 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -387,20 +387,20 @@ i32.gt_u if i32.const 0 - i32.const 112 + i32.const 120 i32.const 54 i32.const 43 call $~lib/env/abort unreachable end local.get $0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $1 local.get $0 call $~lib/memory/memory.fill local.get $1 i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/map/Map<~lib/string/String,usize>#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 @@ -427,9 +427,9 @@ (func $~lib/map/Map<~lib/string/String,usize>#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -455,9 +455,9 @@ (func $~lib/map/Map#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -1367,7 +1367,7 @@ (local $3 i32) (local $4 i32) local.get $1 - i32.const 512 + i32.const 520 local.get $1 select local.tee $3 @@ -1392,11 +1392,11 @@ local.tee $2 i32.eqz if - i32.const 160 + i32.const 168 return end local.get $2 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $2 local.get $0 local.get $1 @@ -1409,11 +1409,11 @@ call $~lib/memory/memory.copy local.get $2 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/string/String.__concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 512 + i32.const 520 local.get $0 select local.get $1 @@ -1422,9 +1422,9 @@ (func $~lib/symbol/_Symbol#toString (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - i32.const 160 + i32.const 168 local.set $2 - i32.const 488 + i32.const 496 block $break|0 (result i32) block $case11|0 block $case10|0 @@ -1454,37 +1454,37 @@ end br $case11|0 end - i32.const 168 + i32.const 176 br $break|0 end - i32.const 200 + i32.const 208 br $break|0 end - i32.const 248 + i32.const 256 br $break|0 end - i32.const 272 + i32.const 280 br $break|0 end - i32.const 296 + i32.const 304 br $break|0 end - i32.const 320 + i32.const 328 br $break|0 end - i32.const 344 + i32.const 352 br $break|0 end - i32.const 368 + i32.const 376 br $break|0 end - i32.const 392 + i32.const 400 br $break|0 end - i32.const 424 + i32.const 432 br $break|0 end - i32.const 456 + i32.const 464 br $break|0 end global.get $~lib/symbol/idToString @@ -1503,11 +1503,11 @@ local.get $0 call $~lib/map/Map#get else - i32.const 160 + i32.const 168 end end call $~lib/string/String.__concat - i32.const 528 + i32.const 536 call $~lib/string/String.__concat ) (func $start:std/symbol (; 27 ;) (type $FUNCSIG$v) @@ -1547,7 +1547,7 @@ call $~lib/env/abort unreachable end - i32.const 704 + i32.const 712 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -1644,7 +1644,7 @@ end local.get $0 call $~lib/symbol/_Symbol#toString - i32.const 544 + i32.const 552 call $~lib/string/String.__eq i32.eqz if @@ -1657,7 +1657,7 @@ end global.get $std/symbol/sym3 call $~lib/symbol/_Symbol#toString - i32.const 568 + i32.const 576 call $~lib/string/String.__eq i32.eqz if @@ -1674,7 +1674,7 @@ global.set $std/symbol/isConcatSpreadable global.get $std/symbol/hasInstance call $~lib/symbol/_Symbol#toString - i32.const 600 + i32.const 608 call $~lib/string/String.__eq i32.eqz if @@ -1687,7 +1687,7 @@ end global.get $std/symbol/isConcatSpreadable call $~lib/symbol/_Symbol#toString - i32.const 648 + i32.const 656 call $~lib/string/String.__eq i32.eqz if diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index ab341a3ff0..4815c9181a 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -12,27 +12,27 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00\06\00\00\001\002\003\00") (data (i32.const 24) "\01\00\00\00\1a\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s\00") - (data (i32.const 64) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 104) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 152) "\01\00\00\00\00\00\00\00") - (data (i32.const 160) "\01\00\00\00\16\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00") - (data (i32.const 192) "\01\00\00\00$\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00") - (data (i32.const 240) "\01\00\00\00\10\00\00\00i\00s\00R\00e\00g\00E\00x\00p\00") - (data (i32.const 264) "\01\00\00\00\n\00\00\00m\00a\00t\00c\00h\00") - (data (i32.const 288) "\01\00\00\00\0e\00\00\00r\00e\00p\00l\00a\00c\00e\00") - (data (i32.const 312) "\01\00\00\00\0c\00\00\00s\00e\00a\00r\00c\00h\00") - (data (i32.const 336) "\01\00\00\00\0e\00\00\00s\00p\00e\00c\00i\00e\00s\00") - (data (i32.const 360) "\01\00\00\00\n\00\00\00s\00p\00l\00i\00t\00") - (data (i32.const 384) "\01\00\00\00\16\00\00\00t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e\00") - (data (i32.const 416) "\01\00\00\00\16\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g\00") - (data (i32.const 448) "\01\00\00\00\16\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s\00") - (data (i32.const 480) "\01\00\00\00\0e\00\00\00S\00y\00m\00b\00o\00l\00(\00") - (data (i32.const 504) "\01\00\00\00\08\00\00\00n\00u\00l\00l\00") - (data (i32.const 520) "\01\00\00\00\02\00\00\00)\00") - (data (i32.const 536) "\01\00\00\00\10\00\00\00S\00y\00m\00b\00o\00l\00(\00)\00") - (data (i32.const 560) "\01\00\00\00\16\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)\00") - (data (i32.const 592) "\01\00\00\00&\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)\00") - (data (i32.const 640) "\01\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)\00") + (data (i32.const 64) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 112) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 160) "\01\00\00\00\00\00\00\00") + (data (i32.const 168) "\01\00\00\00\16\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00") + (data (i32.const 200) "\01\00\00\00$\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00") + (data (i32.const 248) "\01\00\00\00\10\00\00\00i\00s\00R\00e\00g\00E\00x\00p\00") + (data (i32.const 272) "\01\00\00\00\n\00\00\00m\00a\00t\00c\00h\00") + (data (i32.const 296) "\01\00\00\00\0e\00\00\00r\00e\00p\00l\00a\00c\00e\00") + (data (i32.const 320) "\01\00\00\00\0c\00\00\00s\00e\00a\00r\00c\00h\00") + (data (i32.const 344) "\01\00\00\00\0e\00\00\00s\00p\00e\00c\00i\00e\00s\00") + (data (i32.const 368) "\01\00\00\00\n\00\00\00s\00p\00l\00i\00t\00") + (data (i32.const 392) "\01\00\00\00\16\00\00\00t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e\00") + (data (i32.const 424) "\01\00\00\00\16\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g\00") + (data (i32.const 456) "\01\00\00\00\16\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s\00") + (data (i32.const 488) "\01\00\00\00\0e\00\00\00S\00y\00m\00b\00o\00l\00(\00") + (data (i32.const 512) "\01\00\00\00\08\00\00\00n\00u\00l\00l\00") + (data (i32.const 528) "\01\00\00\00\02\00\00\00)\00") + (data (i32.const 544) "\01\00\00\00\10\00\00\00S\00y\00m\00b\00o\00l\00(\00)\00") + (data (i32.const 568) "\01\00\00\00\16\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)\00") + (data (i32.const 600) "\01\00\00\00&\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)\00") + (data (i32.const 648) "\01\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/symbol/nextId (mut i32) (i32.const 12)) @@ -56,7 +56,7 @@ (global $std/symbol/hasInstance (mut i32) (i32.const 0)) (global $~lib/symbol/_Symbol.isConcatSpreadable i32 (i32.const 2)) (global $std/symbol/isConcatSpreadable (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 700)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 708)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -175,7 +175,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -191,7 +191,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -200,8 +200,8 @@ if i32.const 0 i32.const 72 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -217,8 +217,8 @@ if i32.const 0 i32.const 72 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -491,14 +491,14 @@ i32.gt_u if i32.const 0 - i32.const 112 + i32.const 120 i32.const 54 i32.const 43 call $~lib/env/abort unreachable end local.get $1 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 local.get $2 i32.const 0 @@ -506,7 +506,7 @@ call $~lib/memory/memory.fill local.get $2 i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/map/Map<~lib/string/String,usize>#clear (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 @@ -540,9 +540,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -600,9 +600,9 @@ i32.eqz if i32.const 24 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1760,7 +1760,7 @@ i32.const 0 i32.eq if - i32.const 512 + i32.const 520 local.set $1 end local.get $0 @@ -1781,11 +1781,11 @@ i32.const 0 i32.eq if - i32.const 160 + i32.const 168 return end local.get $4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $5 local.get $5 local.get $0 @@ -1799,11 +1799,11 @@ call $~lib/memory/memory.copy local.get $5 i32.const 1 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/string/String.__concat (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 512 + i32.const 520 local.get $0 i32.const 0 i32.ne @@ -1817,7 +1817,7 @@ (local $3 i32) local.get $0 local.set $1 - i32.const 160 + i32.const 168 local.set $2 block $break|0 block $case11|0 @@ -1881,7 +1881,7 @@ br $case11|0 end block - i32.const 168 + i32.const 176 local.set $2 br $break|0 unreachable @@ -1889,7 +1889,7 @@ unreachable end block - i32.const 200 + i32.const 208 local.set $2 br $break|0 unreachable @@ -1897,7 +1897,7 @@ unreachable end block - i32.const 248 + i32.const 256 local.set $2 br $break|0 unreachable @@ -1905,7 +1905,7 @@ unreachable end block - i32.const 272 + i32.const 280 local.set $2 br $break|0 unreachable @@ -1913,7 +1913,7 @@ unreachable end block - i32.const 296 + i32.const 304 local.set $2 br $break|0 unreachable @@ -1921,7 +1921,7 @@ unreachable end block - i32.const 320 + i32.const 328 local.set $2 br $break|0 unreachable @@ -1929,7 +1929,7 @@ unreachable end block - i32.const 344 + i32.const 352 local.set $2 br $break|0 unreachable @@ -1937,7 +1937,7 @@ unreachable end block - i32.const 368 + i32.const 376 local.set $2 br $break|0 unreachable @@ -1945,7 +1945,7 @@ unreachable end block - i32.const 392 + i32.const 400 local.set $2 br $break|0 unreachable @@ -1953,7 +1953,7 @@ unreachable end block - i32.const 424 + i32.const 432 local.set $2 br $break|0 unreachable @@ -1961,7 +1961,7 @@ unreachable end block - i32.const 456 + i32.const 464 local.set $2 br $break|0 unreachable @@ -1991,10 +1991,10 @@ end unreachable end - i32.const 488 + i32.const 496 local.get $2 call $~lib/string/String.__concat - i32.const 528 + i32.const 536 call $~lib/string/String.__concat ) (func $start:std/symbol (; 34 ;) (type $FUNCSIG$v) @@ -2120,7 +2120,7 @@ i32.const 0 call $~lib/symbol/Symbol call $~lib/symbol/_Symbol#toString - i32.const 544 + i32.const 552 call $~lib/string/String.__eq i32.eqz if @@ -2133,7 +2133,7 @@ end global.get $std/symbol/sym3 call $~lib/symbol/_Symbol#toString - i32.const 568 + i32.const 576 call $~lib/string/String.__eq i32.eqz if @@ -2150,7 +2150,7 @@ global.set $std/symbol/isConcatSpreadable global.get $std/symbol/hasInstance call $~lib/symbol/_Symbol#toString - i32.const 600 + i32.const 608 call $~lib/string/String.__eq i32.eqz if @@ -2163,7 +2163,7 @@ end global.get $std/symbol/isConcatSpreadable call $~lib/symbol/_Symbol#toString - i32.const 648 + i32.const 656 call $~lib/string/String.__eq i32.eqz if diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index cc535c9dd6..4dfc46e120 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -37,61 +37,61 @@ (data (i32.const 24) "s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 64) "\01\00\00\00&") (data (i32.const 80) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 120) "\01\00\00\00\1e") - (data (i32.const 136) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 168) "\01\00\00\00$") - (data (i32.const 184) "~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 224) "\02\00\00\00\05") - (data (i32.const 240) "\01\01\01\04\05") - (data (i32.const 248) "\01\00\00\00\1a") - (data (i32.const 264) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 296) "\02\00\00\00\05") - (data (i32.const 320) "\02\00\00\00\05") - (data (i32.const 336) "\01\01") - (data (i32.const 344) "\02\00\00\00\05") - (data (i32.const 360) "\01\01\00\02\02") - (data (i32.const 368) "\02\00\00\00\05") - (data (i32.const 384) "\01\01\00\02\02") - (data (i32.const 392) "\02\00\00\00\03") - (data (i32.const 416) "\02\00\00\00\05") - (data (i32.const 432) "\01\00\00\00\02") - (data (i32.const 440) "\02\00\00\00\14") - (data (i32.const 456) "\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") - (data (i32.const 480) "\02\00\00\00\14") - (data (i32.const 520) "\02\00\00\00\14") - (data (i32.const 536) "\01\00\00\00\01") - (data (i32.const 560) "\02\00\00\00\14") - (data (i32.const 576) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 600) "\02\00\00\00\14") - (data (i32.const 616) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 640) "\02\00\00\00\0c") - (data (i32.const 672) "\02\00\00\00\14") - (data (i32.const 688) "\01") - (data (i32.const 704) "\02") - (data (i32.const 712) "\01\00\00\00\1e") - (data (i32.const 728) "r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 760) "\01\00\00\00(") - (data (i32.const 776) "f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 816) "\02\00\00\00\0c") - (data (i32.const 832) "\n\00\00\00\0c\00\00\00\0e") - (data (i32.const 848) "\10\00\00\00\10") - (data (i32.const 864) "@\03\00\00@\03\00\00\0c\00\00\00\03") - (data (i32.const 880) "\01\00\00\00,") - (data (i32.const 896) "f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 944) "\01\00\00\00,") - (data (i32.const 960) "f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 1008) "\01\00\00\00>") - (data (i32.const 1024) "f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 1088) "\01\00\00\006") - (data (i32.const 1104) "f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 1160) "\02\00\00\00$") - (data (i32.const 1176) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") - (data (i32.const 1216) "\10\00\00\00\10") - (data (i32.const 1232) "\98\04\00\00\98\04\00\00$\00\00\00\t") - (data (i32.const 1248) "\01\00\00\00B") - (data (i32.const 1264) "T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 1336) "\01\00\00\00V") - (data (i32.const 1352) "T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 120) "\01\00\00\00(") + (data (i32.const 136) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 176) "\01\00\00\00$") + (data (i32.const 192) "~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 232) "\02\00\00\00\05") + (data (i32.const 248) "\01\01\01\04\05") + (data (i32.const 256) "\01\00\00\00\1a") + (data (i32.const 272) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 304) "\02\00\00\00\05") + (data (i32.const 328) "\02\00\00\00\05") + (data (i32.const 344) "\01\01") + (data (i32.const 352) "\02\00\00\00\05") + (data (i32.const 368) "\01\01\00\02\02") + (data (i32.const 376) "\02\00\00\00\05") + (data (i32.const 392) "\01\01\00\02\02") + (data (i32.const 400) "\02\00\00\00\03") + (data (i32.const 424) "\02\00\00\00\05") + (data (i32.const 440) "\01\00\00\00\02") + (data (i32.const 448) "\02\00\00\00\14") + (data (i32.const 464) "\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") + (data (i32.const 488) "\02\00\00\00\14") + (data (i32.const 528) "\02\00\00\00\14") + (data (i32.const 544) "\01\00\00\00\01") + (data (i32.const 568) "\02\00\00\00\14") + (data (i32.const 584) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") + (data (i32.const 608) "\02\00\00\00\14") + (data (i32.const 624) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") + (data (i32.const 648) "\02\00\00\00\0c") + (data (i32.const 680) "\02\00\00\00\14") + (data (i32.const 696) "\01") + (data (i32.const 712) "\02") + (data (i32.const 720) "\01\00\00\00\1e") + (data (i32.const 736) "r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 768) "\01\00\00\00(") + (data (i32.const 784) "f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 824) "\02\00\00\00\0c") + (data (i32.const 840) "\n\00\00\00\0c\00\00\00\0e") + (data (i32.const 856) "\10\00\00\00\10") + (data (i32.const 872) "H\03\00\00H\03\00\00\0c\00\00\00\03") + (data (i32.const 888) "\01\00\00\00,") + (data (i32.const 904) "f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 952) "\01\00\00\00,") + (data (i32.const 968) "f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 1016) "\01\00\00\00>") + (data (i32.const 1032) "f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 1096) "\01\00\00\006") + (data (i32.const 1112) "f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 1168) "\02\00\00\00$") + (data (i32.const 1184) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") + (data (i32.const 1224) "\10\00\00\00\10") + (data (i32.const 1240) "\a0\04\00\00\a0\04\00\00$\00\00\00\t") + (data (i32.const 1256) "\01\00\00\00B") + (data (i32.const 1272) "T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 1344) "\01\00\00\00V") + (data (i32.const 1360) "T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") (table $0 112 funcref) (elem (i32.const 0) $null $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -110,12 +110,12 @@ (global $std/typedarray/multisubarr3 (mut i32) (i32.const 0)) (global $std/typedarray/forEachCallCount (mut i32) (i32.const 0)) (global $std/typedarray/forEachSelf (mut i32) (i32.const 0)) - (global $std/typedarray/forEachValues (mut i32) (i32.const 864)) - (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 1232)) + (global $std/typedarray/forEachValues (mut i32) (i32.const 872)) + (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 1240)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -179,7 +179,7 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/runtime.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -431,16 +431,16 @@ end end ) - (func $~lib/runtime/runtime.register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 1440 + i32.const 1448 i32.le_u if i32.const 0 i32.const 136 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -454,8 +454,8 @@ if i32.const 0 i32.const 136 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -478,14 +478,14 @@ unreachable end local.get $0 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.tee $1 i32.const 0 local.get $0 call $~lib/memory/memory.fill local.get $1 i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/arraybuffer/ArrayBufferView#constructor (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 @@ -511,9 +511,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -541,99 +541,99 @@ ) (func $~lib/typedarray/Int8Array#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.get $0 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Uint8Array#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.get $0 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Uint8ClampedArray#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 6 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.get $0 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Int16Array#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 7 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.get $0 i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Uint16Array#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 8 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.get $0 i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Int32Array#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 9 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.get $0 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Uint32Array#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 10 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.get $0 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Int64Array#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 11 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.get $0 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Uint64Array#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 12 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.get $0 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Float32Array#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 13 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.get $0 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Float64Array#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 14 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.get $0 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor @@ -1111,8 +1111,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 443 + i32.const 192 + i32.const 444 i32.const 63 call $~lib/env/abort unreachable @@ -1135,8 +1135,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 437 + i32.const 192 + i32.const 438 i32.const 63 call $~lib/env/abort unreachable @@ -1208,7 +1208,7 @@ end local.set $3 i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 local.get $0 i32.load offset=4 @@ -1239,7 +1239,7 @@ i32.store offset=8 local.get $2 i32.const 9 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/typedarray/Float64Array#__set (; 22 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 @@ -1250,8 +1250,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 853 + i32.const 192 + i32.const 854 i32.const 63 call $~lib/env/abort unreachable @@ -1324,7 +1324,7 @@ end local.set $3 i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 local.get $0 i32.load offset=4 @@ -1355,7 +1355,7 @@ i32.store offset=8 local.get $2 i32.const 14 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/sort/insertionSort (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -1793,8 +1793,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 847 + i32.const 192 + i32.const 848 i32.const 63 call $~lib/env/abort unreachable @@ -1814,8 +1814,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 197 + i32.const 192 + i32.const 198 i32.const 44 call $~lib/env/abort unreachable @@ -1846,8 +1846,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 191 + i32.const 192 + i32.const 192 i32.const 44 call $~lib/env/abort unreachable @@ -1865,8 +1865,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 33 + i32.const 192 + i32.const 34 i32.const 44 call $~lib/env/abort unreachable @@ -2118,17 +2118,17 @@ (local $4 i32) (local $5 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.get $2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $2 local.get $0 local.get $1 i32.shl local.tee $4 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.tee $1 local.set $5 local.get $2 @@ -2162,8 +2162,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 27 + i32.const 192 + i32.const 28 i32.const 44 call $~lib/env/abort unreachable @@ -2181,7 +2181,7 @@ i32.ge_u if i32.const 0 - i32.const 264 + i32.const 272 i32.const 99 i32.const 61 call $~lib/env/abort @@ -2292,7 +2292,7 @@ end local.set $3 i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 local.get $0 i32.load offset=4 @@ -2319,7 +2319,7 @@ i32.store offset=8 local.get $2 i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/typedarray/Int32Array#fill (; 39 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) @@ -2407,7 +2407,7 @@ i32.ge_u if i32.const 0 - i32.const 264 + i32.const 272 i32.const 99 i32.const 61 call $~lib/env/abort @@ -2547,8 +2547,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 115 + i32.const 192 + i32.const 116 i32.const 44 call $~lib/env/abort unreachable @@ -2670,8 +2670,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 279 + i32.const 192 + i32.const 280 i32.const 63 call $~lib/env/abort unreachable @@ -2766,8 +2766,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 361 + i32.const 192 + i32.const 362 i32.const 63 call $~lib/env/abort unreachable @@ -2933,8 +2933,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 525 + i32.const 192 + i32.const 526 i32.const 63 call $~lib/env/abort unreachable @@ -2987,8 +2987,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 607 + i32.const 192 + i32.const 608 i32.const 63 call $~lib/env/abort unreachable @@ -3087,8 +3087,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 689 + i32.const 192 + i32.const 690 i32.const 63 call $~lib/env/abort unreachable @@ -3141,8 +3141,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 771 + i32.const 192 + i32.const 772 i32.const 63 call $~lib/env/abort unreachable @@ -4131,8 +4131,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 109 + i32.const 192 + i32.const 110 i32.const 44 call $~lib/env/abort unreachable @@ -4369,8 +4369,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 273 + i32.const 192 + i32.const 274 i32.const 63 call $~lib/env/abort unreachable @@ -4505,8 +4505,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 355 + i32.const 192 + i32.const 356 i32.const 63 call $~lib/env/abort unreachable @@ -4754,8 +4754,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 519 + i32.const 192 + i32.const 520 i32.const 63 call $~lib/env/abort unreachable @@ -4895,8 +4895,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 601 + i32.const 192 + i32.const 602 i32.const 63 call $~lib/env/abort unreachable @@ -5031,8 +5031,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 683 + i32.const 192 + i32.const 684 i32.const 63 call $~lib/env/abort unreachable @@ -5172,8 +5172,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 765 + i32.const 192 + i32.const 766 i32.const 63 call $~lib/env/abort unreachable @@ -6274,7 +6274,7 @@ i32.const 1 i32.ne if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -6287,7 +6287,7 @@ i32.const -1 i32.ne if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -6359,7 +6359,7 @@ i32.const 1 i32.ne if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -6372,7 +6372,7 @@ i32.const -1 i32.ne if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -6402,7 +6402,7 @@ i32.const 1 i32.ne if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -6415,7 +6415,7 @@ i32.const -1 i32.ne if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -6498,7 +6498,7 @@ i32.const 1 i32.ne if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -6511,7 +6511,7 @@ i32.const -1 i32.ne if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -6587,7 +6587,7 @@ i32.const 1 i32.ne if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -6600,7 +6600,7 @@ i32.const -1 i32.ne if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -6681,7 +6681,7 @@ i32.const 1 i32.ne if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -6694,7 +6694,7 @@ i32.const -1 i32.ne if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -6724,7 +6724,7 @@ i32.const 1 i32.ne if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -6737,7 +6737,7 @@ i32.const -1 i32.ne if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -6818,7 +6818,7 @@ i32.const 1 i32.ne if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -6831,7 +6831,7 @@ i32.const -1 i32.ne if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -6861,7 +6861,7 @@ i32.const 1 i32.ne if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -6874,7 +6874,7 @@ i32.const -1 i32.ne if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -6955,7 +6955,7 @@ i32.const 1 i32.ne if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -6968,7 +6968,7 @@ i32.const -1 i32.ne if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -7049,7 +7049,7 @@ i32.const 1 i32.ne if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -7062,7 +7062,7 @@ i32.const -1 i32.ne if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -8233,7 +8233,7 @@ i32.and i32.ne if - i32.const 896 + i32.const 904 i32.const 24 i32.const 425 i32.const 4 @@ -8244,7 +8244,7 @@ global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 960 + i32.const 968 i32.const 24 i32.const 426 i32.const 4 @@ -8255,7 +8255,7 @@ global.get $std/typedarray/forEachSelf i32.ne if - i32.const 1024 + i32.const 1032 i32.const 24 i32.const 427 i32.const 4 @@ -8344,7 +8344,7 @@ i32.const 3 i32.ne if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -8424,7 +8424,7 @@ i32.const 3 i32.ne if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -8471,7 +8471,7 @@ i32.const 3 i32.ne if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -8490,7 +8490,7 @@ i32.and i32.ne if - i32.const 896 + i32.const 904 i32.const 24 i32.const 425 i32.const 4 @@ -8501,7 +8501,7 @@ global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 960 + i32.const 968 i32.const 24 i32.const 426 i32.const 4 @@ -8512,7 +8512,7 @@ global.get $std/typedarray/forEachSelf i32.ne if - i32.const 1024 + i32.const 1032 i32.const 24 i32.const 427 i32.const 4 @@ -8605,7 +8605,7 @@ i32.const 3 i32.ne if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -8688,7 +8688,7 @@ i32.const 3 i32.ne if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -8703,7 +8703,7 @@ local.get $0 i32.ne if - i32.const 896 + i32.const 904 i32.const 24 i32.const 425 i32.const 4 @@ -8714,7 +8714,7 @@ global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 960 + i32.const 968 i32.const 24 i32.const 426 i32.const 4 @@ -8725,7 +8725,7 @@ global.get $std/typedarray/forEachSelf i32.ne if - i32.const 1024 + i32.const 1032 i32.const 24 i32.const 427 i32.const 4 @@ -8807,7 +8807,7 @@ i32.const 3 i32.ne if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -8848,7 +8848,7 @@ i32.const 3 i32.ne if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -8864,7 +8864,7 @@ i64.extend_i32_s i64.ne if - i32.const 896 + i32.const 904 i32.const 24 i32.const 425 i32.const 4 @@ -8875,7 +8875,7 @@ global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 960 + i32.const 968 i32.const 24 i32.const 426 i32.const 4 @@ -8886,7 +8886,7 @@ global.get $std/typedarray/forEachSelf i32.ne if - i32.const 1024 + i32.const 1032 i32.const 24 i32.const 427 i32.const 4 @@ -8971,7 +8971,7 @@ i32.const 3 i32.ne if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -9015,7 +9015,7 @@ i32.const 3 i32.ne if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -9031,7 +9031,7 @@ f32.convert_i32_s f32.ne if - i32.const 896 + i32.const 904 i32.const 24 i32.const 425 i32.const 4 @@ -9042,7 +9042,7 @@ global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 960 + i32.const 968 i32.const 24 i32.const 426 i32.const 4 @@ -9053,7 +9053,7 @@ global.get $std/typedarray/forEachSelf i32.ne if - i32.const 1024 + i32.const 1032 i32.const 24 i32.const 427 i32.const 4 @@ -9137,7 +9137,7 @@ i32.const 3 i32.ne if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -9153,7 +9153,7 @@ f64.convert_i32_s f64.ne if - i32.const 896 + i32.const 904 i32.const 24 i32.const 425 i32.const 4 @@ -9164,7 +9164,7 @@ global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 960 + i32.const 968 i32.const 24 i32.const 426 i32.const 4 @@ -9175,7 +9175,7 @@ global.get $std/typedarray/forEachSelf i32.ne if - i32.const 1024 + i32.const 1032 i32.const 24 i32.const 427 i32.const 4 @@ -9259,7 +9259,7 @@ i32.const 3 i32.ne if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -9386,7 +9386,7 @@ i32.shr_s i32.ne if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -9413,7 +9413,7 @@ i32.const 8 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -9426,7 +9426,7 @@ i32.const 7 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -9439,7 +9439,7 @@ i32.const 6 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -9452,7 +9452,7 @@ i32.const 5 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -9523,7 +9523,7 @@ select local.set $3 i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 local.get $0 i32.load offset=4 @@ -9561,7 +9561,7 @@ i32.store offset=8 local.get $1 i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 238 ;) (type $FUNCSIG$v) (local $0 i32) @@ -9628,7 +9628,7 @@ i32.and i32.ne if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -9653,7 +9653,7 @@ i32.const 8 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -9666,7 +9666,7 @@ i32.const 7 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -9679,7 +9679,7 @@ i32.const 6 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -9692,7 +9692,7 @@ i32.const 5 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -9715,7 +9715,7 @@ select local.set $3 i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 local.get $0 i32.load offset=4 @@ -9753,7 +9753,7 @@ i32.store offset=8 local.get $1 i32.const 6 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 240 ;) (type $FUNCSIG$v) (local $0 i32) @@ -9820,7 +9820,7 @@ i32.and i32.ne if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -9845,7 +9845,7 @@ i32.const 8 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -9858,7 +9858,7 @@ i32.const 7 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -9871,7 +9871,7 @@ i32.const 6 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -9884,7 +9884,7 @@ i32.const 5 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -9963,7 +9963,7 @@ select local.set $3 i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 local.get $0 i32.load offset=4 @@ -10005,7 +10005,7 @@ i32.store offset=8 local.get $1 i32.const 7 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 243 ;) (type $FUNCSIG$v) (local $0 i32) @@ -10078,7 +10078,7 @@ i32.shr_s i32.ne if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -10103,7 +10103,7 @@ i32.const 8 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -10116,7 +10116,7 @@ i32.const 7 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -10129,7 +10129,7 @@ i32.const 6 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -10142,7 +10142,7 @@ i32.const 5 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -10221,7 +10221,7 @@ select local.set $3 i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 local.get $0 i32.load offset=4 @@ -10263,7 +10263,7 @@ i32.store offset=8 local.get $1 i32.const 8 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 246 ;) (type $FUNCSIG$v) (local $0 i32) @@ -10330,7 +10330,7 @@ i32.and i32.ne if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -10355,7 +10355,7 @@ i32.const 8 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -10368,7 +10368,7 @@ i32.const 7 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -10381,7 +10381,7 @@ i32.const 6 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -10394,7 +10394,7 @@ i32.const 5 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -10515,7 +10515,7 @@ call $~lib/array/Array#__get i32.ne if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -10542,7 +10542,7 @@ i32.const 8 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -10555,7 +10555,7 @@ i32.const 7 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -10568,7 +10568,7 @@ i32.const 6 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -10581,7 +10581,7 @@ i32.const 5 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -10606,7 +10606,7 @@ select local.set $3 i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 local.get $0 i32.load offset=4 @@ -10648,7 +10648,7 @@ i32.store offset=8 local.get $1 i32.const 10 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 250 ;) (type $FUNCSIG$v) (local $0 i32) @@ -10709,7 +10709,7 @@ call $~lib/array/Array#__get i32.ne if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -10734,7 +10734,7 @@ i32.const 8 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -10747,7 +10747,7 @@ i32.const 7 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -10760,7 +10760,7 @@ i32.const 6 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -10773,7 +10773,7 @@ i32.const 5 i32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -10852,7 +10852,7 @@ select local.set $3 i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 local.get $0 i32.load offset=4 @@ -10894,7 +10894,7 @@ i32.store offset=8 local.get $1 i32.const 11 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 253 ;) (type $FUNCSIG$v) (local $0 i32) @@ -10958,7 +10958,7 @@ i64.extend_i32_s i64.ne if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -10983,7 +10983,7 @@ i64.const 8 i64.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -10996,7 +10996,7 @@ i64.const 7 i64.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -11009,7 +11009,7 @@ i64.const 6 i64.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -11022,7 +11022,7 @@ i64.const 5 i64.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -11047,7 +11047,7 @@ select local.set $3 i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 local.get $0 i32.load offset=4 @@ -11089,7 +11089,7 @@ i32.store offset=8 local.get $1 i32.const 12 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 255 ;) (type $FUNCSIG$v) (local $0 i32) @@ -11153,7 +11153,7 @@ i64.extend_i32_s i64.ne if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -11178,7 +11178,7 @@ i64.const 8 i64.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -11191,7 +11191,7 @@ i64.const 7 i64.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -11204,7 +11204,7 @@ i64.const 6 i64.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -11217,7 +11217,7 @@ i64.const 5 i64.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -11296,7 +11296,7 @@ select local.set $3 i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $1 local.get $0 i32.load offset=4 @@ -11338,7 +11338,7 @@ i32.store offset=8 local.get $1 i32.const 13 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 258 ;) (type $FUNCSIG$v) (local $0 i32) @@ -11402,7 +11402,7 @@ f32.convert_i32_s f32.ne if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -11427,7 +11427,7 @@ f32.const 8 f32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -11440,7 +11440,7 @@ f32.const 7 f32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -11453,7 +11453,7 @@ f32.const 6 f32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -11466,7 +11466,7 @@ f32.const 5 f32.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -11590,7 +11590,7 @@ f64.convert_i32_s f64.ne if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -11617,7 +11617,7 @@ f64.const 8 f64.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -11630,7 +11630,7 @@ f64.const 7 f64.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -11643,7 +11643,7 @@ f64.const 6 f64.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -11656,7 +11656,7 @@ f64.const 5 f64.ne if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -11667,7 +11667,7 @@ (func $start:std/typedarray (; 261 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - i32.const 1440 + i32.const 1448 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -12061,7 +12061,7 @@ i32.const 5 i32.const 0 i32.const 15 - i32.const 240 + i32.const 248 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -12082,7 +12082,7 @@ i32.const 5 i32.const 0 i32.const 15 - i32.const 312 + i32.const 320 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -12103,7 +12103,7 @@ i32.const 5 i32.const 0 i32.const 15 - i32.const 336 + i32.const 344 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -12124,7 +12124,7 @@ i32.const 5 i32.const 0 i32.const 15 - i32.const 360 + i32.const 368 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -12145,7 +12145,7 @@ i32.const 5 i32.const 0 i32.const 15 - i32.const 384 + i32.const 392 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -12211,7 +12211,7 @@ i32.const 3 i32.const 0 i32.const 15 - i32.const 408 + i32.const 416 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -12227,7 +12227,7 @@ i32.const 5 i32.const 0 i32.const 15 - i32.const 432 + i32.const 440 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -12271,7 +12271,7 @@ i32.const 5 i32.const 2 i32.const 16 - i32.const 456 + i32.const 464 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -12292,7 +12292,7 @@ i32.const 5 i32.const 2 i32.const 16 - i32.const 496 + i32.const 504 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -12313,7 +12313,7 @@ i32.const 5 i32.const 2 i32.const 16 - i32.const 536 + i32.const 544 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -12334,7 +12334,7 @@ i32.const 5 i32.const 2 i32.const 16 - i32.const 576 + i32.const 584 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -12355,7 +12355,7 @@ i32.const 5 i32.const 2 i32.const 16 - i32.const 616 + i32.const 624 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -12423,7 +12423,7 @@ i32.const 3 i32.const 2 i32.const 16 - i32.const 656 + i32.const 664 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -12439,7 +12439,7 @@ i32.const 5 i32.const 2 i32.const 16 - i32.const 688 + i32.const 696 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 865a4b02dd..7123557cc6 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -38,35 +38,35 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 64) "\01\00\00\00&\00\00\00\00\00\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 120) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 168) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 224) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\01\04\05") - (data (i32.const 248) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 296) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 320) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\00\00") - (data (i32.const 344) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") - (data (i32.const 368) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") - (data (i32.const 392) "\02\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 416) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02") - (data (i32.const 440) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 480) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 520) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 560) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") - (data (i32.const 600) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") - (data (i32.const 640) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 672) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00") - (data (i32.const 712) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 760) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 816) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\0c\00\00\00\0e\00\00\00") - (data (i32.const 848) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00@\03\00\00@\03\00\00\0c\00\00\00\03\00\00\00") - (data (i32.const 880) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 944) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 1008) "\01\00\00\00>\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 1088) "\01\00\00\006\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 1160) "\02\00\00\00$\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00") - (data (i32.const 1216) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\98\04\00\00\98\04\00\00$\00\00\00\t\00\00\00") - (data (i32.const 1248) "\01\00\00\00B\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 1336) "\01\00\00\00V\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 120) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 176) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 232) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\01\04\05") + (data (i32.const 256) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 304) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 328) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\00\00") + (data (i32.const 352) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") + (data (i32.const 376) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") + (data (i32.const 400) "\02\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 424) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02") + (data (i32.const 448) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 488) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 528) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 568) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") + (data (i32.const 608) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") + (data (i32.const 648) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 680) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00") + (data (i32.const 720) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 768) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 824) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\0c\00\00\00\0e\00\00\00") + (data (i32.const 856) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00H\03\00\00H\03\00\00\0c\00\00\00\03\00\00\00") + (data (i32.const 888) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 952) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1016) "\01\00\00\00>\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1096) "\01\00\00\006\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1168) "\02\00\00\00$\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00") + (data (i32.const 1224) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a0\04\00\00\a0\04\00\00$\00\00\00\t\00\00\00") + (data (i32.const 1256) "\01\00\00\00B\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1344) "\01\00\00\00V\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (table $0 112 funcref) (elem (i32.const 0) $null $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32 (i32.const 1)) @@ -102,13 +102,13 @@ (global $std/typedarray/multisubarr3 (mut i32) (i32.const 0)) (global $std/typedarray/forEachCallCount (mut i32) (i32.const 0)) (global $std/typedarray/forEachSelf (mut i32) (i32.const 0)) - (global $std/typedarray/forEachValues (mut i32) (i32.const 864)) - (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 1232)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 1440)) + (global $std/typedarray/forEachValues (mut i32) (i32.const 872)) + (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 1240)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 1448)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) - (export ".capabilities" (global $~lib/capabilities)) + (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -206,7 +206,7 @@ call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -488,7 +488,7 @@ (func $~lib/collector/dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/runtime/runtime.register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -497,8 +497,8 @@ if i32.const 0 i32.const 136 - i32.const 82 - i32.const 6 + i32.const 128 + i32.const 4 call $~lib/env/abort unreachable end @@ -514,8 +514,8 @@ if i32.const 0 i32.const 136 - i32.const 84 - i32.const 6 + i32.const 130 + i32.const 4 call $~lib/env/abort unreachable end @@ -540,7 +540,7 @@ unreachable end local.get $1 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $2 local.get $2 i32.const 0 @@ -548,7 +548,7 @@ call $~lib/memory/memory.fill local.get $2 i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop @@ -586,9 +586,9 @@ i32.eqz if i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 3 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -638,9 +638,9 @@ local.get $0 else i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end local.get $1 i32.const 0 @@ -669,9 +669,9 @@ local.get $0 else i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end local.get $1 i32.const 0 @@ -689,9 +689,9 @@ local.get $0 else i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 6 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end local.get $1 i32.const 0 @@ -709,9 +709,9 @@ local.get $0 else i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 7 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end local.get $1 i32.const 1 @@ -731,9 +731,9 @@ local.get $0 else i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 8 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end local.get $1 i32.const 1 @@ -753,9 +753,9 @@ local.get $0 else i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 9 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end local.get $1 i32.const 2 @@ -775,9 +775,9 @@ local.get $0 else i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 10 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end local.get $1 i32.const 2 @@ -797,9 +797,9 @@ local.get $0 else i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 11 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end local.get $1 i32.const 3 @@ -819,9 +819,9 @@ local.get $0 else i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 12 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end local.get $1 i32.const 3 @@ -841,9 +841,9 @@ local.get $0 else i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 13 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end local.get $1 i32.const 2 @@ -863,9 +863,9 @@ local.get $0 else i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 14 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register end local.get $1 i32.const 3 @@ -1396,8 +1396,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 443 + i32.const 192 + i32.const 444 i32.const 63 call $~lib/env/abort unreachable @@ -1420,8 +1420,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 437 + i32.const 192 + i32.const 438 i32.const 63 call $~lib/env/abort unreachable @@ -1514,7 +1514,7 @@ local.set $3 end i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $7 local.get $5 i32.load @@ -1561,7 +1561,7 @@ i32.store offset=8 local.get $7 i32.const 9 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/typedarray/Float64Array#__set (; 40 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 @@ -1572,8 +1572,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 853 + i32.const 192 + i32.const 854 i32.const 63 call $~lib/env/abort unreachable @@ -1667,7 +1667,7 @@ local.set $3 end i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $7 local.get $5 i32.load @@ -1714,7 +1714,7 @@ i32.store offset=8 local.get $7 i32.const 14 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/util/sort/insertionSort (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -2264,8 +2264,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 847 + i32.const 192 + i32.const 848 i32.const 63 call $~lib/env/abort unreachable @@ -2285,8 +2285,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 197 + i32.const 192 + i32.const 198 i32.const 44 call $~lib/env/abort unreachable @@ -2317,8 +2317,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 191 + i32.const 192 + i32.const 192 i32.const 44 call $~lib/env/abort unreachable @@ -2336,8 +2336,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 33 + i32.const 192 + i32.const 34 i32.const 44 call $~lib/env/abort unreachable @@ -2654,18 +2654,18 @@ (local $8 i32) (local $9 i32) i32.const 16 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.get $2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $4 local.get $0 local.get $1 i32.shl local.set $5 local.get $5 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate i32.const 2 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register local.set $6 local.get $4 local.tee $7 @@ -2719,8 +2719,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 27 + i32.const 192 + i32.const 28 i32.const 44 call $~lib/env/abort unreachable @@ -2749,7 +2749,7 @@ i32.ge_u if i32.const 0 - i32.const 264 + i32.const 272 i32.const 99 i32.const 61 call $~lib/env/abort @@ -2887,7 +2887,7 @@ local.set $3 end i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $7 local.get $5 i32.load @@ -2934,7 +2934,7 @@ i32.store offset=8 local.get $7 i32.const 4 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $~lib/typedarray/Int32Array#fill (; 62 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) @@ -3056,7 +3056,7 @@ i32.ge_u if i32.const 0 - i32.const 264 + i32.const 272 i32.const 99 i32.const 61 call $~lib/env/abort @@ -3224,8 +3224,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 115 + i32.const 192 + i32.const 116 i32.const 44 call $~lib/env/abort unreachable @@ -3448,8 +3448,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 279 + i32.const 192 + i32.const 280 i32.const 63 call $~lib/env/abort unreachable @@ -3575,8 +3575,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 361 + i32.const 192 + i32.const 362 i32.const 63 call $~lib/env/abort unreachable @@ -3799,8 +3799,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 525 + i32.const 192 + i32.const 526 i32.const 63 call $~lib/env/abort unreachable @@ -3922,8 +3922,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 607 + i32.const 192 + i32.const 608 i32.const 63 call $~lib/env/abort unreachable @@ -4045,8 +4045,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 689 + i32.const 192 + i32.const 690 i32.const 63 call $~lib/env/abort unreachable @@ -4168,8 +4168,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 771 + i32.const 192 + i32.const 772 i32.const 63 call $~lib/env/abort unreachable @@ -5664,8 +5664,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 109 + i32.const 192 + i32.const 110 i32.const 44 call $~lib/env/abort unreachable @@ -5957,8 +5957,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 273 + i32.const 192 + i32.const 274 i32.const 63 call $~lib/env/abort unreachable @@ -6116,8 +6116,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 355 + i32.const 192 + i32.const 356 i32.const 63 call $~lib/env/abort unreachable @@ -6411,8 +6411,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 519 + i32.const 192 + i32.const 520 i32.const 63 call $~lib/env/abort unreachable @@ -6570,8 +6570,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 601 + i32.const 192 + i32.const 602 i32.const 63 call $~lib/env/abort unreachable @@ -6729,8 +6729,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 683 + i32.const 192 + i32.const 684 i32.const 63 call $~lib/env/abort unreachable @@ -6888,8 +6888,8 @@ i32.ge_u if i32.const 0 - i32.const 184 - i32.const 765 + i32.const 192 + i32.const 766 i32.const 63 call $~lib/env/abort unreachable @@ -8603,7 +8603,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -8619,7 +8619,7 @@ i32.eq i32.eqz if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -8730,7 +8730,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -8746,7 +8746,7 @@ i32.eq i32.eqz if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -8857,7 +8857,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -8873,7 +8873,7 @@ i32.eq i32.eqz if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -8988,7 +8988,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -9004,7 +9004,7 @@ i32.eq i32.eqz if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -9115,7 +9115,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -9131,7 +9131,7 @@ i32.eq i32.eqz if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -9238,7 +9238,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -9254,7 +9254,7 @@ i32.eq i32.eqz if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -9361,7 +9361,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -9377,7 +9377,7 @@ i32.eq i32.eqz if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -9484,7 +9484,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -9500,7 +9500,7 @@ i32.eq i32.eqz if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -9607,7 +9607,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -9623,7 +9623,7 @@ i32.eq i32.eqz if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -9730,7 +9730,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -9746,7 +9746,7 @@ i32.eq i32.eqz if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -9853,7 +9853,7 @@ i32.eq i32.eqz if - i32.const 728 + i32.const 736 i32.const 24 i32.const 365 i32.const 2 @@ -9869,7 +9869,7 @@ i32.eq i32.eqz if - i32.const 776 + i32.const 784 i32.const 24 i32.const 368 i32.const 2 @@ -11901,7 +11901,7 @@ i32.eq i32.eqz if - i32.const 896 + i32.const 904 i32.const 24 i32.const 425 i32.const 4 @@ -11913,7 +11913,7 @@ i32.eq i32.eqz if - i32.const 960 + i32.const 968 i32.const 24 i32.const 426 i32.const 4 @@ -11925,7 +11925,7 @@ i32.eq i32.eqz if - i32.const 1024 + i32.const 1032 i32.const 24 i32.const 427 i32.const 4 @@ -12030,7 +12030,7 @@ i32.eq i32.eqz if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -12053,7 +12053,7 @@ i32.eq i32.eqz if - i32.const 896 + i32.const 904 i32.const 24 i32.const 425 i32.const 4 @@ -12065,7 +12065,7 @@ i32.eq i32.eqz if - i32.const 960 + i32.const 968 i32.const 24 i32.const 426 i32.const 4 @@ -12077,7 +12077,7 @@ i32.eq i32.eqz if - i32.const 1024 + i32.const 1032 i32.const 24 i32.const 427 i32.const 4 @@ -12176,7 +12176,7 @@ i32.eq i32.eqz if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -12199,7 +12199,7 @@ i32.eq i32.eqz if - i32.const 896 + i32.const 904 i32.const 24 i32.const 425 i32.const 4 @@ -12211,7 +12211,7 @@ i32.eq i32.eqz if - i32.const 960 + i32.const 968 i32.const 24 i32.const 426 i32.const 4 @@ -12223,7 +12223,7 @@ i32.eq i32.eqz if - i32.const 1024 + i32.const 1032 i32.const 24 i32.const 427 i32.const 4 @@ -12322,7 +12322,7 @@ i32.eq i32.eqz if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -12349,7 +12349,7 @@ i32.eq i32.eqz if - i32.const 896 + i32.const 904 i32.const 24 i32.const 425 i32.const 4 @@ -12361,7 +12361,7 @@ i32.eq i32.eqz if - i32.const 960 + i32.const 968 i32.const 24 i32.const 426 i32.const 4 @@ -12373,7 +12373,7 @@ i32.eq i32.eqz if - i32.const 1024 + i32.const 1032 i32.const 24 i32.const 427 i32.const 4 @@ -12478,7 +12478,7 @@ i32.eq i32.eqz if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -12501,7 +12501,7 @@ i32.eq i32.eqz if - i32.const 896 + i32.const 904 i32.const 24 i32.const 425 i32.const 4 @@ -12513,7 +12513,7 @@ i32.eq i32.eqz if - i32.const 960 + i32.const 968 i32.const 24 i32.const 426 i32.const 4 @@ -12525,7 +12525,7 @@ i32.eq i32.eqz if - i32.const 1024 + i32.const 1032 i32.const 24 i32.const 427 i32.const 4 @@ -12624,7 +12624,7 @@ i32.eq i32.eqz if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -12643,7 +12643,7 @@ i32.eq i32.eqz if - i32.const 896 + i32.const 904 i32.const 24 i32.const 425 i32.const 4 @@ -12655,7 +12655,7 @@ i32.eq i32.eqz if - i32.const 960 + i32.const 968 i32.const 24 i32.const 426 i32.const 4 @@ -12667,7 +12667,7 @@ i32.eq i32.eqz if - i32.const 1024 + i32.const 1032 i32.const 24 i32.const 427 i32.const 4 @@ -12760,7 +12760,7 @@ i32.eq i32.eqz if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -12779,7 +12779,7 @@ i32.eq i32.eqz if - i32.const 896 + i32.const 904 i32.const 24 i32.const 425 i32.const 4 @@ -12791,7 +12791,7 @@ i32.eq i32.eqz if - i32.const 960 + i32.const 968 i32.const 24 i32.const 426 i32.const 4 @@ -12803,7 +12803,7 @@ i32.eq i32.eqz if - i32.const 1024 + i32.const 1032 i32.const 24 i32.const 427 i32.const 4 @@ -12896,7 +12896,7 @@ i32.eq i32.eqz if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -12916,7 +12916,7 @@ i64.eq i32.eqz if - i32.const 896 + i32.const 904 i32.const 24 i32.const 425 i32.const 4 @@ -12928,7 +12928,7 @@ i32.eq i32.eqz if - i32.const 960 + i32.const 968 i32.const 24 i32.const 426 i32.const 4 @@ -12940,7 +12940,7 @@ i32.eq i32.eqz if - i32.const 1024 + i32.const 1032 i32.const 24 i32.const 427 i32.const 4 @@ -13036,7 +13036,7 @@ i32.eq i32.eqz if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -13056,7 +13056,7 @@ i64.eq i32.eqz if - i32.const 896 + i32.const 904 i32.const 24 i32.const 425 i32.const 4 @@ -13068,7 +13068,7 @@ i32.eq i32.eqz if - i32.const 960 + i32.const 968 i32.const 24 i32.const 426 i32.const 4 @@ -13080,7 +13080,7 @@ i32.eq i32.eqz if - i32.const 1024 + i32.const 1032 i32.const 24 i32.const 427 i32.const 4 @@ -13176,7 +13176,7 @@ i32.eq i32.eqz if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -13196,7 +13196,7 @@ f32.eq i32.eqz if - i32.const 896 + i32.const 904 i32.const 24 i32.const 425 i32.const 4 @@ -13208,7 +13208,7 @@ i32.eq i32.eqz if - i32.const 960 + i32.const 968 i32.const 24 i32.const 426 i32.const 4 @@ -13220,7 +13220,7 @@ i32.eq i32.eqz if - i32.const 1024 + i32.const 1032 i32.const 24 i32.const 427 i32.const 4 @@ -13316,7 +13316,7 @@ i32.eq i32.eqz if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -13336,7 +13336,7 @@ f64.eq i32.eqz if - i32.const 896 + i32.const 904 i32.const 24 i32.const 425 i32.const 4 @@ -13348,7 +13348,7 @@ i32.eq i32.eqz if - i32.const 960 + i32.const 968 i32.const 24 i32.const 426 i32.const 4 @@ -13360,7 +13360,7 @@ i32.eq i32.eqz if - i32.const 1024 + i32.const 1032 i32.const 24 i32.const 427 i32.const 4 @@ -13456,7 +13456,7 @@ i32.eq i32.eqz if - i32.const 1104 + i32.const 1112 i32.const 24 i32.const 430 i32.const 2 @@ -13619,7 +13619,7 @@ i32.eq i32.eqz if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -13648,7 +13648,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -13662,7 +13662,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -13676,7 +13676,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -13690,7 +13690,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -13848,7 +13848,7 @@ local.set $3 end i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $7 local.get $5 i32.load @@ -13895,7 +13895,7 @@ i32.store offset=8 local.get $7 i32.const 5 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 353 ;) (type $FUNCSIG$v) (local $0 i32) @@ -13976,7 +13976,7 @@ i32.eq i32.eqz if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -14005,7 +14005,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -14019,7 +14019,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -14033,7 +14033,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -14047,7 +14047,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -14205,7 +14205,7 @@ local.set $3 end i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $7 local.get $5 i32.load @@ -14252,7 +14252,7 @@ i32.store offset=8 local.get $7 i32.const 6 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 356 ;) (type $FUNCSIG$v) (local $0 i32) @@ -14333,7 +14333,7 @@ i32.eq i32.eqz if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -14362,7 +14362,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -14376,7 +14376,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -14390,7 +14390,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -14404,7 +14404,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -14562,7 +14562,7 @@ local.set $3 end i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $7 local.get $5 i32.load @@ -14609,7 +14609,7 @@ i32.store offset=8 local.get $7 i32.const 7 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 359 ;) (type $FUNCSIG$v) (local $0 i32) @@ -14696,7 +14696,7 @@ i32.eq i32.eqz if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -14725,7 +14725,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -14739,7 +14739,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -14753,7 +14753,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -14767,7 +14767,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -14925,7 +14925,7 @@ local.set $3 end i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $7 local.get $5 i32.load @@ -14972,7 +14972,7 @@ i32.store offset=8 local.get $7 i32.const 8 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 362 ;) (type $FUNCSIG$v) (local $0 i32) @@ -15053,7 +15053,7 @@ i32.eq i32.eqz if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -15082,7 +15082,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -15096,7 +15096,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -15110,7 +15110,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -15124,7 +15124,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -15275,7 +15275,7 @@ i32.eq i32.eqz if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -15304,7 +15304,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -15318,7 +15318,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -15332,7 +15332,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -15346,7 +15346,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -15504,7 +15504,7 @@ local.set $3 end i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $7 local.get $5 i32.load @@ -15551,7 +15551,7 @@ i32.store offset=8 local.get $7 i32.const 10 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 367 ;) (type $FUNCSIG$v) (local $0 i32) @@ -15626,7 +15626,7 @@ i32.eq i32.eqz if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -15655,7 +15655,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -15669,7 +15669,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -15683,7 +15683,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -15697,7 +15697,7 @@ i32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -15855,7 +15855,7 @@ local.set $3 end i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $7 local.get $5 i32.load @@ -15902,7 +15902,7 @@ i32.store offset=8 local.get $7 i32.const 11 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 370 ;) (type $FUNCSIG$v) (local $0 i32) @@ -15980,7 +15980,7 @@ i64.eq i32.eqz if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -16009,7 +16009,7 @@ i64.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -16023,7 +16023,7 @@ i64.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -16037,7 +16037,7 @@ i64.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -16051,7 +16051,7 @@ i64.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -16209,7 +16209,7 @@ local.set $3 end i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $7 local.get $5 i32.load @@ -16256,7 +16256,7 @@ i32.store offset=8 local.get $7 i32.const 12 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 373 ;) (type $FUNCSIG$v) (local $0 i32) @@ -16334,7 +16334,7 @@ i64.eq i32.eqz if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -16363,7 +16363,7 @@ i64.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -16377,7 +16377,7 @@ i64.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -16391,7 +16391,7 @@ i64.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -16405,7 +16405,7 @@ i64.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -16563,7 +16563,7 @@ local.set $3 end i32.const 12 - call $~lib/runtime/runtime.allocate + call $~lib/util/runtime/allocate local.set $7 local.get $5 i32.load @@ -16610,7 +16610,7 @@ i32.store offset=8 local.get $7 i32.const 13 - call $~lib/runtime/runtime.register + call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 376 ;) (type $FUNCSIG$v) (local $0 i32) @@ -16688,7 +16688,7 @@ f32.eq i32.eqz if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -16717,7 +16717,7 @@ f32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -16731,7 +16731,7 @@ f32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -16745,7 +16745,7 @@ f32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -16759,7 +16759,7 @@ f32.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -16913,7 +16913,7 @@ f64.eq i32.eqz if - i32.const 1264 + i32.const 1272 i32.const 24 i32.const 461 i32.const 4 @@ -16942,7 +16942,7 @@ f64.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 466 i32.const 2 @@ -16956,7 +16956,7 @@ f64.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 467 i32.const 2 @@ -16970,7 +16970,7 @@ f64.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 468 i32.const 2 @@ -16984,7 +16984,7 @@ f64.eq i32.eqz if - i32.const 1352 + i32.const 1360 i32.const 24 i32.const 469 i32.const 2 @@ -17529,7 +17529,7 @@ i32.const 5 i32.const 0 i32.const 15 - i32.const 240 + i32.const 248 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -17551,7 +17551,7 @@ i32.const 5 i32.const 0 i32.const 15 - i32.const 312 + i32.const 320 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -17573,7 +17573,7 @@ i32.const 5 i32.const 0 i32.const 15 - i32.const 336 + i32.const 344 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -17595,7 +17595,7 @@ i32.const 5 i32.const 0 i32.const 15 - i32.const 360 + i32.const 368 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -17617,7 +17617,7 @@ i32.const 5 i32.const 0 i32.const 15 - i32.const 384 + i32.const 392 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -17683,7 +17683,7 @@ i32.const 3 i32.const 0 i32.const 15 - i32.const 408 + i32.const 416 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -17699,7 +17699,7 @@ i32.const 5 i32.const 0 i32.const 15 - i32.const 432 + i32.const 440 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt8ArrayEqual i32.eqz @@ -17745,7 +17745,7 @@ i32.const 5 i32.const 2 i32.const 16 - i32.const 456 + i32.const 464 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -17767,7 +17767,7 @@ i32.const 5 i32.const 2 i32.const 16 - i32.const 496 + i32.const 504 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -17789,7 +17789,7 @@ i32.const 5 i32.const 2 i32.const 16 - i32.const 536 + i32.const 544 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -17811,7 +17811,7 @@ i32.const 5 i32.const 2 i32.const 16 - i32.const 576 + i32.const 584 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -17833,7 +17833,7 @@ i32.const 5 i32.const 2 i32.const 16 - i32.const 616 + i32.const 624 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -17903,7 +17903,7 @@ i32.const 3 i32.const 2 i32.const 16 - i32.const 656 + i32.const 664 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz @@ -17919,7 +17919,7 @@ i32.const 5 i32.const 2 i32.const 16 - i32.const 688 + i32.const 696 call $~lib/runtime/runtime.newArray call $std/typedarray/isInt32ArrayEqual i32.eqz From e1070cee8676d0abfa89963462e290de605fc46d Mon Sep 17 00:00:00 2001 From: dcode Date: Sat, 6 Apr 2019 20:17:48 +0200 Subject: [PATCH 095/119] rtti & refactoring --- cli/asc.js | 4 +- src/builtins.ts | 194 +- src/common.ts | 7 + src/compiler.ts | 172 +- src/index.ts | 41 +- src/module.ts | 4 +- src/program.ts | 89 +- std/assembly/array.ts | 22 +- std/assembly/builtins.ts | 33 + std/assembly/common/README.md | 1 + std/assembly/common/capability.ts | 9 + std/assembly/common/feature.ts | 15 + std/assembly/common/rtti.ts | 60 + std/assembly/common/target.ts | 9 + std/assembly/diagnostics.ts | 11 - std/assembly/env.ts | 16 - std/assembly/index.d.ts | 10 +- std/assembly/runtime.ts | 144 +- std/assembly/runtime/arena.ts | 2 + std/assembly/string.ts | 16 +- std/assembly/util/runtime.ts | 25 +- std/portable/index.d.ts | 3 + std/portable/index.js | 4 +- tests/compiler/abi.optimized.wat | 9 +- tests/compiler/abi.untouched.wat | 22 +- tests/compiler/asc-constants.optimized.wat | 3 - tests/compiler/asc-constants.untouched.wat | 4 +- tests/compiler/assert-nonnull.json | 2 +- tests/compiler/assert-nonnull.optimized.wat | 11 +- tests/compiler/assert-nonnull.ts | 2 + tests/compiler/assert-nonnull.untouched.wat | 12 +- tests/compiler/assert.optimized.wat | 7 +- tests/compiler/assert.untouched.wat | 24 +- tests/compiler/binary.optimized.wat | 3 - tests/compiler/binary.untouched.wat | 2 - tests/compiler/bool.optimized.wat | 21 +- tests/compiler/bool.untouched.wat | 20 +- tests/compiler/builtins.optimized.wat | 21 +- tests/compiler/builtins.untouched.wat | 248 +- tests/compiler/call-inferred.optimized.wat | 5 +- tests/compiler/call-inferred.untouched.wat | 14 +- tests/compiler/call-optional.optimized.wat | 15 +- tests/compiler/call-optional.untouched.wat | 18 +- tests/compiler/call-super.json | 2 +- tests/compiler/call-super.optimized.wat | 101 +- tests/compiler/call-super.ts | 2 + tests/compiler/call-super.untouched.wat | 99 +- tests/compiler/class-extends.json | 6 +- tests/compiler/class-extends.optimized.wat | 1905 +------ tests/compiler/class-extends.untouched.wat | 2327 +------- .../compiler/class-overloading.optimized.wat | 3 - .../compiler/class-overloading.untouched.wat | 2 - tests/compiler/class.json | 6 +- tests/compiler/class.optimized.wat | 1906 +------ tests/compiler/class.ts | 2 + tests/compiler/class.untouched.wat | 2330 +------- tests/compiler/closure.json | 6 +- tests/compiler/closure.optimized.wat | 1904 +------ tests/compiler/closure.untouched.wat | 2326 +------- tests/compiler/comma.optimized.wat | 25 +- tests/compiler/comma.untouched.wat | 24 +- tests/compiler/constructor.json | 6 +- tests/compiler/constructor.optimized.wat | 2112 +------- tests/compiler/constructor.ts | 2 + tests/compiler/constructor.untouched.wat | 2837 +--------- tests/compiler/declare.optimized.wat | 11 +- tests/compiler/declare.untouched.wat | 10 +- tests/compiler/do.optimized.wat | 23 +- tests/compiler/do.untouched.wat | 22 +- tests/compiler/empty.optimized.wat | 3 - tests/compiler/empty.untouched.wat | 2 - tests/compiler/enum.optimized.wat | 3 - tests/compiler/enum.untouched.wat | 2 - tests/compiler/export.optimized.wat | 3 - tests/compiler/export.untouched.wat | 2 - tests/compiler/exports.optimized.wat | 23 +- tests/compiler/exports.untouched.wat | 21 +- tests/compiler/external.optimized.wat | 3 - tests/compiler/external.untouched.wat | 2 - tests/compiler/for.optimized.wat | 13 +- tests/compiler/for.untouched.wat | 12 +- .../function-expression.optimized.wat | 23 +- .../function-expression.untouched.wat | 24 +- tests/compiler/function-types.optimized.wat | 21 +- tests/compiler/function-types.untouched.wat | 22 +- tests/compiler/function.optimized.wat | 3 - tests/compiler/function.untouched.wat | 2 - tests/compiler/gc.json | 2 +- tests/compiler/gc.optimized.wat | 75 +- tests/compiler/gc.ts | 1 + tests/compiler/gc.untouched.wat | 73 +- tests/compiler/gc/global-assign.json | 2 +- tests/compiler/gc/global-assign.optimized.wat | 49 +- tests/compiler/gc/global-assign.ts | 1 + tests/compiler/gc/global-assign.untouched.wat | 47 +- tests/compiler/gc/global-init.json | 2 +- tests/compiler/gc/global-init.optimized.wat | 49 +- tests/compiler/gc/global-init.ts | 1 + tests/compiler/gc/global-init.untouched.wat | 47 +- tests/compiler/gc/itcm/trace.json | 2 +- tests/compiler/gc/itcm/trace.optimized.wat | 210 +- tests/compiler/gc/itcm/trace.ts | 1 + tests/compiler/gc/itcm/trace.untouched.wat | 216 +- tests/compiler/gc/rc/global-assign.json | 2 +- .../gc/rc/global-assign.optimized.wat | 69 +- tests/compiler/gc/rc/global-assign.ts | 1 + .../gc/rc/global-assign.untouched.wat | 67 +- tests/compiler/gc/rc/global-init.json | 2 +- .../compiler/gc/rc/global-init.optimized.wat | 45 +- tests/compiler/gc/rc/global-init.ts | 1 + .../compiler/gc/rc/global-init.untouched.wat | 43 +- tests/compiler/getter-call.optimized.wat | 15 +- tests/compiler/getter-call.untouched.wat | 15 +- tests/compiler/getter-setter.optimized.wat | 13 +- tests/compiler/getter-setter.untouched.wat | 12 +- tests/compiler/i64-polyfill.optimized.wat | 3 - tests/compiler/i64-polyfill.untouched.wat | 2 - tests/compiler/if.optimized.wat | 9 +- tests/compiler/if.untouched.wat | 20 +- tests/compiler/import.optimized.wat | 3 - tests/compiler/import.untouched.wat | 2 - tests/compiler/infer-type.optimized.wat | 5 +- tests/compiler/infer-type.untouched.wat | 10 +- .../inlining-blocklocals.optimized.wat | 11 +- .../inlining-blocklocals.untouched.wat | 10 +- .../compiler/inlining-recursive.optimized.wat | 3 - .../compiler/inlining-recursive.untouched.wat | 2 - tests/compiler/inlining.optimized.wat | 29 +- tests/compiler/inlining.untouched.wat | 49 +- tests/compiler/instanceof.optimized.wat | 11 +- tests/compiler/instanceof.untouched.wat | 92 +- tests/compiler/limits.optimized.wat | 3 - tests/compiler/limits.untouched.wat | 2 - tests/compiler/literals.optimized.wat | 3 - tests/compiler/literals.untouched.wat | 2 - tests/compiler/logical.optimized.wat | 23 +- tests/compiler/logical.untouched.wat | 22 +- tests/compiler/main.optimized.wat | 3 - tests/compiler/main.untouched.wat | 2 - tests/compiler/mandelbrot.optimized.wat | 3 - tests/compiler/mandelbrot.untouched.wat | 2 - tests/compiler/many-locals.optimized.wat | 5 +- tests/compiler/many-locals.untouched.wat | 10 +- tests/compiler/memcpy.optimized.wat | 31 +- tests/compiler/memcpy.untouched.wat | 30 +- tests/compiler/memmove.optimized.wat | 31 +- tests/compiler/memmove.untouched.wat | 30 +- tests/compiler/memset.optimized.wat | 19 +- tests/compiler/memset.untouched.wat | 17 +- tests/compiler/merge.optimized.wat | 3 - tests/compiler/merge.untouched.wat | 2 - .../named-export-default.optimized.wat | 3 - .../named-export-default.untouched.wat | 2 - .../named-import-default.optimized.wat | 3 - .../named-import-default.untouched.wat | 2 - tests/compiler/namespace.optimized.wat | 3 - tests/compiler/namespace.untouched.wat | 2 - tests/compiler/number.json | 2 +- tests/compiler/number.optimized.wat | 119 +- tests/compiler/number.ts | 2 + tests/compiler/number.untouched.wat | 287 +- .../optional-typeparameters.optimized.wat | 19 +- .../optional-typeparameters.untouched.wat | 17 +- tests/compiler/overflow.optimized.wat | 5 +- tests/compiler/overflow.untouched.wat | 78 +- .../portable-conversions.optimized.wat | 111 +- .../portable-conversions.untouched.wat | 110 +- tests/compiler/recursive.optimized.wat | 3 - tests/compiler/recursive.untouched.wat | 2 - tests/compiler/reexport.optimized.wat | 3 - tests/compiler/reexport.untouched.wat | 2 - tests/compiler/rereexport.optimized.wat | 3 - tests/compiler/rereexport.untouched.wat | 2 - tests/compiler/resolve-nested.optimized.wat | 7 +- tests/compiler/resolve-nested.untouched.wat | 6 +- tests/compiler/retain-i32.optimized.wat | 43 +- tests/compiler/retain-i32.untouched.wat | 70 +- tests/compiler/runtime-arena.optimized.wat | 335 +- tests/compiler/runtime-arena.untouched.wat | 391 +- tests/compiler/runtime-default.optimized.wat | 616 +-- tests/compiler/runtime-default.untouched.wat | 633 +-- tests/compiler/runtime-none.optimized.wat | 3 - tests/compiler/runtime-none.untouched.wat | 2 - tests/compiler/runtime/flags.optimized.wat | 1828 +++---- tests/compiler/runtime/flags.ts | 105 +- tests/compiler/runtime/flags.untouched.wat | 1282 ++--- .../compiler/runtime/instanceof.optimized.wat | 755 +-- tests/compiler/runtime/instanceof.ts | 58 +- .../compiler/runtime/instanceof.untouched.wat | 757 +-- tests/compiler/scoped.optimized.wat | 3 - tests/compiler/scoped.untouched.wat | 2 - tests/compiler/simd.optimized.wat | 5 +- tests/compiler/simd.untouched.wat | 324 +- tests/compiler/static-this.optimized.wat | 9 +- tests/compiler/static-this.untouched.wat | 8 +- .../std/allocator_arena.optimized.wat | 17 +- .../std/allocator_arena.untouched.wat | 15 +- tests/compiler/std/array-access.optimized.wat | 21 +- tests/compiler/std/array-access.untouched.wat | 28 +- .../compiler/std/array-literal.optimized.wat | 299 +- .../compiler/std/array-literal.untouched.wat | 343 +- tests/compiler/std/array.optimized.wat | 1687 +++--- tests/compiler/std/array.untouched.wat | 1962 ++++--- tests/compiler/std/arraybuffer.optimized.wat | 281 +- tests/compiler/std/arraybuffer.untouched.wat | 300 +- tests/compiler/std/dataview.optimized.wat | 479 +- tests/compiler/std/dataview.untouched.wat | 490 +- tests/compiler/std/date.optimized.wat | 283 +- tests/compiler/std/date.untouched.wat | 248 +- tests/compiler/std/hash.optimized.wat | 11 +- tests/compiler/std/hash.untouched.wat | 10 +- tests/compiler/std/libm.optimized.wat | 3 - tests/compiler/std/libm.untouched.wat | 2 - tests/compiler/std/map.optimized.wat | 604 ++- tests/compiler/std/map.untouched.wat | 649 ++- tests/compiler/std/math.optimized.wat | 4629 ++++++++-------- tests/compiler/std/math.untouched.wat | 4664 ++++++++--------- tests/compiler/std/mod.optimized.wat | 277 +- tests/compiler/std/mod.untouched.wat | 276 +- tests/compiler/std/new.optimized.wat | 261 +- tests/compiler/std/new.untouched.wat | 234 +- .../compiler/std/object-literal.optimized.wat | 232 +- .../compiler/std/object-literal.untouched.wat | 286 +- .../std/operator-overloading.optimized.wat | 316 +- .../std/operator-overloading.untouched.wat | 306 +- tests/compiler/std/pointer.optimized.wat | 61 +- tests/compiler/std/pointer.untouched.wat | 60 +- tests/compiler/std/polyfills.optimized.wat | 5 +- tests/compiler/std/polyfills.untouched.wat | 38 +- tests/compiler/std/runtime.optimized.wat | 151 +- tests/compiler/std/runtime.untouched.wat | 159 +- tests/compiler/std/set.optimized.wat | 524 +- tests/compiler/std/set.untouched.wat | 569 +- tests/compiler/std/simd.optimized.wat | 3 - tests/compiler/std/simd.untouched.wat | 2 - tests/compiler/std/static-array.optimized.wat | 355 +- tests/compiler/std/static-array.untouched.wat | 342 +- tests/compiler/std/string-utf8.optimized.wat | 296 +- tests/compiler/std/string-utf8.untouched.wat | 293 +- tests/compiler/std/string.optimized.wat | 1425 ++--- tests/compiler/std/string.untouched.wat | 1175 +++-- tests/compiler/std/symbol.optimized.wat | 292 +- tests/compiler/std/symbol.untouched.wat | 305 +- tests/compiler/std/trace.optimized.wat | 37 +- tests/compiler/std/trace.untouched.wat | 36 +- tests/compiler/std/typedarray.optimized.wat | 1008 ++-- tests/compiler/std/typedarray.untouched.wat | 1107 ++-- tests/compiler/switch.optimized.wat | 37 +- tests/compiler/switch.untouched.wat | 66 +- tests/compiler/ternary.optimized.wat | 3 - tests/compiler/ternary.untouched.wat | 2 - tests/compiler/threads.optimized.wat | 3 - tests/compiler/threads.untouched.wat | 2 - tests/compiler/typealias.optimized.wat | 3 - tests/compiler/typealias.untouched.wat | 2 - tests/compiler/unary.optimized.wat | 3 - tests/compiler/unary.untouched.wat | 2 - tests/compiler/void.optimized.wat | 3 - tests/compiler/void.untouched.wat | 2 - tests/compiler/wasi.optimized.wat | 5 +- tests/compiler/wasi.ts | 12 +- tests/compiler/wasi.untouched.wat | 183 +- tests/compiler/while.optimized.wat | 25 +- tests/compiler/while.untouched.wat | 24 +- tests/compiler/wildcard-export.optimized.wat | 3 - tests/compiler/wildcard-export.untouched.wat | 2 - 266 files changed, 23167 insertions(+), 33797 deletions(-) create mode 100644 std/assembly/common/README.md create mode 100644 std/assembly/common/capability.ts create mode 100644 std/assembly/common/feature.ts create mode 100644 std/assembly/common/rtti.ts create mode 100644 std/assembly/common/target.ts delete mode 100644 std/assembly/diagnostics.ts delete mode 100644 std/assembly/env.ts diff --git a/cli/asc.js b/cli/asc.js index b0ee8332b4..61f6601ae5 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -454,8 +454,8 @@ exports.main = function main(argv, options, callback) { // Initialize default aliases assemblyscript.setGlobalAlias(compilerOptions, "Math", "NativeMath"); assemblyscript.setGlobalAlias(compilerOptions, "Mathf", "NativeMathf"); - assemblyscript.setGlobalAlias(compilerOptions, "abort", "~lib/env/abort"); - assemblyscript.setGlobalAlias(compilerOptions, "trace", "~lib/env/trace"); + assemblyscript.setGlobalAlias(compilerOptions, "abort", "~lib/builtins/abort"); + assemblyscript.setGlobalAlias(compilerOptions, "trace", "~lib/builtins/trace"); } // Add or override aliases if specified diff --git a/src/builtins.ts b/src/builtins.ts index 1211a56a7e..4dfc803081 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -6,8 +6,7 @@ import { Compiler, ConversionKind, - WrapMode, - Feature + WrapMode } from "./compiler"; import { @@ -57,7 +56,6 @@ import { Field, Global, DecoratorFlags, - RuntimeFlags, Program } from "./program"; @@ -70,7 +68,9 @@ import { } from "./resolver"; import { - CommonFlags + CommonFlags, + Feature, + RTTIFlags } from "./common"; import { @@ -479,14 +479,15 @@ export namespace BuiltinSymbols { export const memory_reset = "~lib/memory/memory.reset"; // std/runtime.ts + export const RTTI_BASE = "~lib/runtime/RTTI_BASE"; export const runtime_id = "~lib/runtime/__runtime_id"; - export const runtime_instanceof = "~lib/runtime/__runtime_instanceof"; - export const runtime_flags = "~lib/runtime/__runtime_flags"; + export const runtime_instanceof = "~lib/runtime/runtime.instanceof"; + export const runtime_flags = "~lib/runtime/runtime.flags"; export const runtime_allocate = "~lib/util/runtime/allocate"; export const runtime_reallocate = "~lib/util/runtime/reallocate"; export const runtime_register = "~lib/util/runtime/register"; export const runtime_discard = "~lib/util/runtime/discard"; - export const runtime_newArray = "~lib/runtime/runtime.newArray"; + export const runtime_makeArray = "~lib/util/runtime/makeArray"; export const gc_mark_roots = "~lib/runtime/__gc_mark_roots"; export const gc_mark_members = "~lib/runtime/__gc_mark_members"; @@ -3651,34 +3652,7 @@ export function compileCall( ); return module.createUnreachable(); } - return module.createI32(classReference.ensureId()); - } - case BuiltinSymbols.runtime_instanceof: { - if ( - checkTypeAbsent(typeArguments, reportNode, prototype) | - checkArgsRequired(operands, 2, reportNode, compiler) - ) { - compiler.currentType = Type.bool; - return module.createUnreachable(); - } - let arg0 = compiler.compileExpression(operands[0], Type.u32, ConversionKind.IMPLICIT, WrapMode.NONE); - let arg1 = compiler.compileExpression(operands[1], Type.u32, ConversionKind.IMPLICIT, WrapMode.NONE); - compiler.needsRuntimeInstanceOf = true; - compiler.currentType = Type.bool; - return module.createCall(BuiltinSymbols.runtime_instanceof, [ arg0, arg1 ], NativeType.I32); - } - case BuiltinSymbols.runtime_flags: { - if ( - checkTypeAbsent(typeArguments, reportNode, prototype) | - checkArgsRequired(operands, 1, reportNode, compiler) - ) { - compiler.currentType = Type.i32; - return module.createUnreachable(); - } - let arg0 = compiler.compileExpression(operands[0], Type.u32, ConversionKind.IMPLICIT, WrapMode.NONE); - compiler.needsRuntimeFlags = true; - compiler.currentType = Type.i32; - return module.createCall(BuiltinSymbols.runtime_flags, [ arg0 ], NativeType.I32); + return module.createI32(classReference.id); } case BuiltinSymbols.gc_mark_roots: { if ( @@ -4191,7 +4165,7 @@ export function compileMarkMembers(compiler: Compiler): void { let fieldType = (member).type; if (fieldType.isManaged(program)) { let fieldClass = fieldType.classReference!; - let fieldClassId = fieldClass.ensureId(); + let fieldClassId = fieldClass.id; let fieldOffset = (member).memoryOffset; assert(fieldOffset >= 0); block.push( @@ -4250,144 +4224,58 @@ export function compileMarkMembers(compiler: Compiler): void { module.addFunction(BuiltinSymbols.gc_mark_members, ftype, [ nativeSizeType ], current); } -/** Compiles the `__runtime_instanceof` function. */ -export function compileRuntimeInstanceOf(compiler: Compiler): void { - var program = compiler.program; - var module = compiler.module; - var managedClasses = program.managedClasses; - var ftype = compiler.ensureFunctionType([ Type.i32, Type.i32 ], Type.i32); // $0 instanceof $1 -> bool - - // NOTE: There are multiple ways to model this. The one chosen here is to compute - // all possibilities in a branchless expression, growing linearly with the number - // of chained base classes. - // - // switch ($0) { - // case ANIMAL_ID: { - // return ($1 == ANIMAL_ID); - // } - // case CAT_ID: { - // return ($1 == CAT_ID) | ($1 == ANIMAL_ID); - // } - // case BLACKCAT_ID: { - // return ($1 == BLACKCAT_ID) | ($1 == CAT_ID) | ($1 == ANIMAL_ID); - // } - // } - // return false; - // - // Another one would be an inner br_table, but class id distribution in larger - // programs in unclear, possibly leading to lots of holes in that table that - // could either degenerate into multiple ifs when compiling for size or to - // huge tables when compiling for speed. - // - // Maybe a combination of both could be utilized, like statically analyzing the - // ids and make a decision based on profiling experience? - - var names: string[] = [ "nope" ]; - var blocks = new Array(); - var lastId = 0; - - for (let [id, instance] of managedClasses) { - assert(id == ++lastId); - names.push(instance.internalName); - let condition = module.createBinary(BinaryOp.EqI32, - module.createGetLocal(1, NativeType.I32), - module.createI32(id) - ); - let base = instance.base; - while (base) { - condition = module.createBinary(BinaryOp.OrI32, - condition, - module.createBinary(BinaryOp.EqI32, - module.createGetLocal(1, NativeType.I32), - module.createI32(base.ensureId()) - ) - ); - base = base.base; - } - blocks.push([ - module.createReturn(condition) - ]); - } - - var current: ExpressionRef; - if (blocks.length) { - current = module.createBlock(names[1], [ - module.createSwitch(names, "nope", module.createGetLocal(0, NativeType.I32)) - ]); - for (let i = 0, k = blocks.length; i < k; ++i) { - blocks[i].unshift(current); - current = module.createBlock(i == k - 1 ? "nope" : names[i + 2], blocks[i]); - } - current = module.createBlock(null, [ - current, - module.createReturn(module.createI32(0)) - ]); - } else { - current = module.createReturn(module.createI32(0)); - } - module.addFunction(BuiltinSymbols.runtime_instanceof, ftype, null, current); -} - -function typeToRuntimeFlags(type: Type, program: Program): RuntimeFlags { - var flags = RuntimeFlags.VALUE_ALIGN_0 * (1 << type.alignLog2); - if (type.is(TypeFlags.NULLABLE)) flags |= RuntimeFlags.VALUE_NULLABLE; - if (type.isManaged(program)) flags |= RuntimeFlags.VALUE_MANAGED; - return flags / RuntimeFlags.VALUE_ALIGN_0; +function typeToRuntimeFlags(type: Type, program: Program): RTTIFlags { + var flags = RTTIFlags.VALUE_ALIGN_0 * (1 << type.alignLog2); + if (type.is(TypeFlags.NULLABLE)) flags |= RTTIFlags.VALUE_NULLABLE; + if (type.isManaged(program)) flags |= RTTIFlags.VALUE_MANAGED; + return flags / RTTIFlags.VALUE_ALIGN_0; } -/** Compiles the `__runtime_flags` function. */ -export function compileRuntimeFlags(compiler: Compiler): void { +/** Compiles runtime type information for use by stdlib. */ +export function compileRTTI(compiler: Compiler): void { + // TODO: only add this if actually accessed? var program = compiler.program; var module = compiler.module; var managedClasses = program.managedClasses; - var ftype = compiler.ensureFunctionType([ Type.i32 ], Type.i32); // $0 -> i32 - var names: string[] = [ "invalid" ]; - var blocks = new Array(); + var count = managedClasses.size; + var size = 8 + 8 * count; + var data = new Uint8Array(size); + writeI32(count, data, 0); + var off = 8; var lastId = 0; - for (let [id, instance] of managedClasses) { assert(id == ++lastId); - names.push(instance.internalName); - let flags: RuntimeFlags = 0; + let flags: RTTIFlags = 0; if (instance.prototype.extends(program.arrayPrototype)) { let typeArguments = assert(instance.typeArguments); assert(typeArguments.length == 1); - flags |= RuntimeFlags.ARRAY; - flags |= RuntimeFlags.VALUE_ALIGN_0 * typeToRuntimeFlags(typeArguments[0], program); + flags |= RTTIFlags.ARRAY; + flags |= RTTIFlags.VALUE_ALIGN_0 * typeToRuntimeFlags(typeArguments[0], program); } else if (instance.prototype.extends(program.setPrototype)) { let typeArguments = assert(instance.typeArguments); assert(typeArguments.length == 1); - flags |= RuntimeFlags.SET; - flags |= RuntimeFlags.VALUE_ALIGN_0 * typeToRuntimeFlags(typeArguments[0], program); + flags |= RTTIFlags.SET; + flags |= RTTIFlags.VALUE_ALIGN_0 * typeToRuntimeFlags(typeArguments[0], program); } else if (instance.prototype.extends(program.mapPrototype)) { let typeArguments = assert(instance.typeArguments); assert(typeArguments.length == 2); - flags |= RuntimeFlags.MAP; - flags |= RuntimeFlags.KEY_ALIGN_0 * typeToRuntimeFlags(typeArguments[0], program); - flags |= RuntimeFlags.VALUE_ALIGN_0 * typeToRuntimeFlags(typeArguments[1], program); + flags |= RTTIFlags.MAP; + flags |= RTTIFlags.KEY_ALIGN_0 * typeToRuntimeFlags(typeArguments[0], program); + flags |= RTTIFlags.VALUE_ALIGN_0 * typeToRuntimeFlags(typeArguments[1], program); } - blocks.push([ - module.createReturn(module.createI32(flags)) - ]); + writeI32(flags, data, off); off += 4; + let base = instance.base; + writeI32(base ? base.id : 0, data, off); off += 4; } - - var current: ExpressionRef; - if (blocks.length) { - current = module.createBlock(names[1], [ - module.createSwitch(names, "invalid", module.createGetLocal(0, NativeType.I32)) - ]); - for (let i = 0, k = blocks.length; i < k; ++i) { - blocks[i].unshift(current); - current = module.createBlock(i == k - 1 ? "invalid" : names[i + 2], blocks[i]); - } - current = module.createBlock(null, [ - current, - module.createUnreachable() - ]); + assert(off == size); + var usizeType = program.options.usizeType; + var segment = compiler.addMemorySegment(data); + if (usizeType.size == 8) { + let offset = segment.offset; + module.addGlobal(BuiltinSymbols.RTTI_BASE, NativeType.I64, false, module.createI64(i64_low(offset), i64_high(offset))); } else { - current = module.createUnreachable(); + module.addGlobal(BuiltinSymbols.RTTI_BASE, NativeType.I32, false, module.createI32(i64_low(segment.offset))); } - module.addFunction(BuiltinSymbols.runtime_flags, ftype, null, current); } // Helpers diff --git a/src/common.ts b/src/common.ts index 7c4e049b6e..733893675a 100644 --- a/src/common.ts +++ b/src/common.ts @@ -190,3 +190,10 @@ export namespace CommonSymbols { export const newArrayBuffer = "newArrayBuffer"; export const newArray = "newArray"; } + +// shared +import { Capability } from "../std/assembly/common/capability"; +import { Feature } from "../std/assembly/common/feature"; +import { RTTIData, RTTIFlags } from "../std/assembly/common/rtti"; +import { Target } from "../std/assembly/common/target"; +export { Capability, Feature, RTTIData, RTTIFlags, Target }; diff --git a/src/compiler.ts b/src/compiler.ts index 27d1e5acec..c7613404ca 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -4,13 +4,12 @@ *//***/ import { + BuiltinSymbols, compileCall as compileBuiltinCall, compileAbort, compileMarkRoots, compileMarkMembers, - compileRuntimeInstanceOf, - compileRuntimeFlags, - BuiltinSymbols, + compileRTTI, } from "./builtins"; import { @@ -50,7 +49,10 @@ import { GETTER_PREFIX, SETTER_PREFIX, CommonSymbols, - INDEX_SUFFIX + INDEX_SUFFIX, + Capability, + Feature, + Target } from "./common"; import { @@ -174,14 +176,6 @@ import { makeMap } from "./util"; -/** Compilation target. */ -export enum Target { - /** WebAssembly with 32-bit pointers. */ - WASM32, - /** WebAssembly with 64-bit pointers. Experimental and not supported by any runtime yet. */ - WASM64 -} - /** Compiler options. */ export class Options { @@ -235,32 +229,6 @@ export class Options { } } -/** Indicates specific features to activate. */ -export const enum Feature { - /** No additional features. */ - NONE = 0, - /** Sign extension operations. */ - SIGN_EXTENSION = 1 << 0, // see: https://github.com/WebAssembly/sign-extension-ops - /** Mutable global imports and exports. */ - MUTABLE_GLOBAL = 1 << 1, // see: https://github.com/WebAssembly/mutable-global - /** Bulk memory operations. */ - BULK_MEMORY = 1 << 2, // see: https://github.com/WebAssembly/bulk-memory-operations - /** SIMD types and operations. */ - SIMD = 1 << 3, // see: https://github.com/WebAssembly/simd - /** Threading and atomic operations. */ - THREADS = 1 << 4 // see: https://github.com/WebAssembly/threads -} - -/** Indicates module capabilities. */ -export const enum Capability { - /** No specific capabilities. */ - NONE = 0, - /** Uses WebAssembly with 64-bit pointers. */ - WASM64 = 1 << 0, - /** Garbage collector is present (full runtime header). */ - GC = 1 << 1 -} - /** Indicates the desired kind of a conversion. */ export const enum ConversionKind { /** No conversion. */ @@ -312,12 +280,12 @@ export class Compiler extends DiagnosticEmitter { argcVar: GlobalRef = 0; /** Argument count helper setter. */ argcSet: FunctionRef = 0; + /** Whether HEAP_BASE is required. */ + needsHeap: bool = false; /** Indicates whether the __gc_mark_* functions must be generated. */ needsGcMark: bool = false; - /** Indicates whether the __runtime_instanceof function must be generated. */ - needsRuntimeInstanceOf: bool = false; - /** Indicates whether the __runtime_flags function must be generated. */ - needsRuntimeFlags: bool = false; + /** Whether RTTI is required. */ + needsRTTI: bool = false; /** Compiles a {@link Program} to a {@link Module} using the specified options. */ static compile(program: Program, options: Options | null = null): Module { @@ -357,19 +325,11 @@ export class Compiler extends DiagnosticEmitter { // add a mutable heap base dummy if (options.isWasm64) { - module.addGlobal( - BuiltinSymbols.HEAP_BASE, - NativeType.I64, - true, - module.createI64(0, 0) - ); + module.addGlobal(BuiltinSymbols.HEAP_BASE, NativeType.I64, true, module.createI64(0)); + module.addGlobal(BuiltinSymbols.RTTI_BASE, NativeType.I64, true, module.createI64(0)); } else { - module.addGlobal( - BuiltinSymbols.HEAP_BASE, - NativeType.I32, - false, - module.createI32(0) - ); + module.addGlobal(BuiltinSymbols.HEAP_BASE, NativeType.I32, true, module.createI32(0)); + module.addGlobal(BuiltinSymbols.RTTI_BASE, NativeType.I32, true, module.createI32(0)); } // compile entry file(s) while traversing reachable elements @@ -405,29 +365,33 @@ export class Compiler extends DiagnosticEmitter { compileMarkMembers(this); } - // compile runtime features if utilized - if (this.needsRuntimeInstanceOf) compileRuntimeInstanceOf(this); - if (this.needsRuntimeFlags) compileRuntimeFlags(this); + // compile runtime type information + module.removeGlobal(BuiltinSymbols.RTTI_BASE); + if (this.needsRTTI) { + compileRTTI(this); + } // update the heap base pointer var memoryOffset = this.memoryOffset; memoryOffset = i64_align(memoryOffset, options.usizeType.byteSize); this.memoryOffset = memoryOffset; module.removeGlobal(BuiltinSymbols.HEAP_BASE); - if (options.isWasm64) { - module.addGlobal( - BuiltinSymbols.HEAP_BASE, - NativeType.I64, - false, - module.createI64(i64_low(memoryOffset), i64_high(memoryOffset)) - ); - } else { - module.addGlobal( - BuiltinSymbols.HEAP_BASE, - NativeType.I32, - false, - module.createI32(i64_low(memoryOffset)) - ); + if (this.needsHeap) { + if (options.isWasm64) { + module.addGlobal( + BuiltinSymbols.HEAP_BASE, + NativeType.I64, + false, + module.createI64(i64_low(memoryOffset), i64_high(memoryOffset)) + ); + } else { + module.addGlobal( + BuiltinSymbols.HEAP_BASE, + NativeType.I32, + false, + module.createI32(i64_low(memoryOffset)) + ); + } } // set up memory @@ -449,7 +413,6 @@ export class Compiler extends DiagnosticEmitter { // set up function table var functionTable = this.functionTable; module.setFunctionTable(functionTable.length, 0xffffffff, functionTable); - module.addTableExport("0", "table"); module.addFunction("null", this.ensureFunctionType(null, Type.void), null, module.createBlock(null, [])); // import table if requested (default table is named '0' by Binaryen) @@ -612,7 +575,7 @@ export class Compiler extends DiagnosticEmitter { if (!(element).type.isUnmanaged) { let module = this.module; let internalName = (element).internalName; - module.addGlobal(internalName, NativeType.I32, false, module.createI32((element).ensureId())); + module.addGlobal(internalName, NativeType.I32, false, module.createI32((element).id)); module.addGlobalExport(internalName, prefix + name); } break; @@ -829,7 +792,11 @@ export class Compiler extends DiagnosticEmitter { } // ambient builtins like 'HEAP_BASE' need to be resolved but are added explicitly - if (global.is(CommonFlags.AMBIENT) && global.hasDecorator(DecoratorFlags.BUILTIN)) return true; + if (global.is(CommonFlags.AMBIENT) && global.hasDecorator(DecoratorFlags.BUILTIN)) { + if (global.internalName == BuiltinSymbols.HEAP_BASE) this.needsHeap = true; + else if (global.internalName == BuiltinSymbols.RTTI_BASE) this.needsRTTI = true; + return true; + } var type = global.type; var nativeType = type.toNativeType(); @@ -1432,7 +1399,7 @@ export class Compiler extends DiagnosticEmitter { } else { let length = stringValue.length; let buffer = new Uint8Array(rtHeaderSize + (length << 1)); - program.writeRuntimeHeader(buffer, 0, stringInstance.ensureId(), length << 1); + program.writeRuntimeHeader(buffer, 0, stringInstance.id, length << 1); for (let i = 0; i < length; ++i) { writeI16(stringValue.charCodeAt(i), buffer, rtHeaderSize + (i << 1)); } @@ -1458,7 +1425,7 @@ export class Compiler extends DiagnosticEmitter { var runtimeHeaderSize = program.runtimeHeaderSize; var buf = new Uint8Array(runtimeHeaderSize + byteLength); - program.writeRuntimeHeader(buf, 0, bufferInstance.ensureId(), byteLength); + program.writeRuntimeHeader(buf, 0, bufferInstance.id, byteLength); var pos = runtimeHeaderSize; var nativeType = elementType.toNativeType(); switch (nativeType) { @@ -1545,7 +1512,7 @@ export class Compiler extends DiagnosticEmitter { var arrayLength = i32(bufferLength / elementType.byteSize); var buf = new Uint8Array(runtimeHeaderSize + arrayInstanceSize); - program.writeRuntimeHeader(buf, 0, arrayInstance.ensureId(), arrayInstanceSize); + program.writeRuntimeHeader(buf, 0, arrayInstance.id, arrayInstanceSize); var bufferAddress32 = i64_low(bufferSegment.offset) + runtimeHeaderSize; assert(!program.options.isWasm64); // TODO @@ -6720,11 +6687,11 @@ export class Compiler extends DiagnosticEmitter { // upcast - check dynamically if (expectedType.isAssignableTo(actualType)) { let program = this.program; - this.needsRuntimeInstanceOf = true; if (!(actualType.isUnmanaged || expectedType.isUnmanaged)) { let flow = this.currentFlow; let tempLocal = flow.getAndFreeTempLocal(actualType, false); - this.needsRuntimeInstanceOf = true; + let instanceofInstance = assert(program.instanceofInstance); + this.compileFunction(instanceofInstance); return module.createIf( module.createUnary( nativeSizeType == NativeType.I64 @@ -6733,16 +6700,10 @@ export class Compiler extends DiagnosticEmitter { module.createTeeLocal(tempLocal.index, expr), ), module.createI32(0), - module.createCall(BuiltinSymbols.runtime_instanceof, [ - module.createLoad(4, false, - module.createBinary(BinaryOp.SubI32, - module.createGetLocal(tempLocal.index, nativeSizeType), - module.createI32(program.runtimeHeaderSize) - ), - NativeType.I32 - ), - module.createI32(expectedType.classReference!.ensureId()) - ], NativeType.I32) + this.makeCallDirect(instanceofInstance, [ + module.createGetLocal(tempLocal.index, nativeSizeType), + module.createI32(expectedType.classReference!.id) + ], expression) ); } else { this.error( @@ -6771,7 +6732,8 @@ export class Compiler extends DiagnosticEmitter { // uninitialized (thus zero) `var a: A` to be an instance of something. let flow = this.currentFlow; let tempLocal = flow.getAndFreeTempLocal(actualType, false); - this.needsRuntimeInstanceOf = true; + let instanceofInstance = assert(program.instanceofInstance); + this.compileFunction(instanceofInstance); return module.createIf( module.createUnary( nativeSizeType == NativeType.I64 @@ -6780,16 +6742,10 @@ export class Compiler extends DiagnosticEmitter { module.createTeeLocal(tempLocal.index, expr), ), module.createI32(0), - module.createCall(BuiltinSymbols.runtime_instanceof, [ - module.createLoad(4, false, - module.createBinary(BinaryOp.SubI32, - module.createGetLocal(tempLocal.index, nativeSizeType), - module.createI32(program.runtimeHeaderSize) - ), - NativeType.I32 - ), - module.createI32(expectedType.classReference!.ensureId()) - ], NativeType.I32) + this.makeCallDirect(instanceofInstance, [ + module.createGetLocal(tempLocal.index, nativeSizeType), + module.createI32(expectedType.classReference!.id) + ], expression) ); } else { this.error( @@ -6946,13 +6902,13 @@ export class Compiler extends DiagnosticEmitter { // otherwise allocate a new array header and make it wrap a copy of the static buffer } else { - // newArray(length, alignLog2, classId, staticBuffer) - let expr = this.makeCallDirect(assert(program.newArrayInstance), [ + // makeArray(length, alignLog2, classId, staticBuffer) + let expr = this.makeCallDirect(assert(program.makeArrayInstance), [ module.createI32(length), program.options.isWasm64 ? module.createI64(elementType.alignLog2) : module.createI32(elementType.alignLog2), - module.createI32(arrayInstance.ensureId()), + module.createI32(arrayInstance.id), program.options.isWasm64 ? module.createI64(i64_low(bufferAddress), i64_high(bufferAddress)) : module.createI32(i64_low(bufferAddress)) @@ -6976,9 +6932,9 @@ export class Compiler extends DiagnosticEmitter { var flow = this.currentFlow; var tempThis = flow.getTempLocal(arrayType, false); var tempDataStart = flow.getTempLocal(arrayBufferInstance.type); - var newArrayInstance = assert(program.newArrayInstance); + var newArrayInstance = assert(program.makeArrayInstance); var stmts = new Array(); - // tempThis = newArray(length, alignLog2, classId, source = 0) + // tempThis = makeArray(length, alignLog2, classId, source = 0) stmts.push( module.createSetLocal(tempThis.index, this.makeCallDirect(newArrayInstance, [ @@ -6986,7 +6942,7 @@ export class Compiler extends DiagnosticEmitter { program.options.isWasm64 ? module.createI64(elementType.alignLog2) : module.createI32(elementType.alignLog2), - module.createI32(arrayInstance.ensureId()), + module.createI32(arrayInstance.id), program.options.isWasm64 ? module.createI64(0) : module.createI32(0) @@ -8244,7 +8200,7 @@ export class Compiler extends DiagnosticEmitter { ? module.createI64(classInstance.currentMemoryOffset) : module.createI32(classInstance.currentMemoryOffset) ], reportNode), - module.createI32(classInstance.ensureId()) + module.createI32(classInstance.id) ], reportNode); } } @@ -8449,7 +8405,7 @@ export class Compiler extends DiagnosticEmitter { module.createBreak(label, module.createBinary(BinaryOp.EqI32, // classId == class.id module.createTeeLocal(idTemp.index, idExpr), - module.createI32(classInstance.ensureId()) + module.createI32(classInstance.id) ), module.createI32(1) // ? true ) diff --git a/src/index.ts b/src/index.ts index 9de7375109..4aa1559b16 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,39 +3,14 @@ * @module index *//***/ -import { - Compiler, - Options, - Target, - Feature -} from "./compiler"; - -import { - Decompiler -} from "./decompiler"; - -import { - IDLBuilder, - TSDBuilder -} from "./definitions"; - -import { - DiagnosticMessage, - DiagnosticCategory, - formatDiagnosticMessage -} from "./diagnostics"; - -import { - Module -} from "./module"; - -import { - Parser -} from "./parser"; - -import { - Program -} from "./program"; +import { Target, Feature } from "./common"; +import { Compiler, Options } from "./compiler"; +import { Decompiler } from "./decompiler"; +import { IDLBuilder, TSDBuilder } from "./definitions"; +import { DiagnosticMessage, DiagnosticCategory, formatDiagnosticMessage } from "./diagnostics"; +import { Module } from "./module"; +import { Parser } from "./parser"; +import { Program } from "./program"; /** Parses a source file. If `parser` has been omitted a new one is created. */ export function parseFile(text: string, path: string, isEntry: bool = false, diff --git a/src/module.ts b/src/module.ts index 3cd4975183..b1e89b1b72 100644 --- a/src/module.ts +++ b/src/module.ts @@ -3,9 +3,7 @@ * @module module *//***/ -import { - Target -} from "./compiler"; +import { Target } from "./common"; export type ModuleRef = usize; export type FunctionTypeRef = usize; diff --git a/src/program.ts b/src/program.ts index 062ec9be90..9fee86cffd 100644 --- a/src/program.ts +++ b/src/program.ts @@ -13,13 +13,13 @@ import { INNER_DELIMITER, LIBRARY_SUBST, INDEX_SUFFIX, - CommonSymbols + CommonSymbols, + Feature, + Target } from "./common"; import { - Options, - Feature, - Compiler + Options } from "./compiler"; import { @@ -316,45 +316,6 @@ export enum CollectorKind { COUNTING } -/** Runtime flags. */ -export const enum RuntimeFlags { // keep in sync with std/runtime.ts - NONE = 0, - /** Type is an `Array`. */ - ARRAY = 1 << 0, - /** Type is a `Set`. */ - SET = 1 << 1, - /** Type is a `Map`. */ - MAP = 1 << 2, - /** Value alignment of 1 byte. */ - VALUE_ALIGN_0 = 1 << 3, - /** Value alignment of 2 bytes. */ - VALUE_ALIGN_1 = 1 << 4, - /** Value alignment of 4 bytes. */ - VALUE_ALIGN_2 = 1 << 5, - /** Value alignment of 8 bytes. */ - VALUE_ALIGN_3 = 1 << 6, - /** Value alignment of 16 bytes. */ - VALUE_ALIGN_4 = 1 << 7, - /** Value type is nullable. */ - VALUE_NULLABLE = 1 << 8, - /** Value type is managed. */ - VALUE_MANAGED = 1 << 9, - /** Key alignment of 1 byte. */ - KEY_ALIGN_0 = 1 << 10, - /** Key alignment of 2 bytes. */ - KEY_ALIGN_1 = 1 << 11, - /** Key alignment of 4 bytes. */ - KEY_ALIGN_2 = 1 << 12, - /** Key alignment of 8 bytes. */ - KEY_ALIGN_3 = 1 << 13, - /** Key alignment of 16 bytes. */ - KEY_ALIGN_4 = 1 << 14, - /** Key type is nullable. */ - KEY_NULLABLE = 1 << 15, - /** Key type is managed. */ - KEY_MANAGED = 1 << 16 -} - /** Represents an AssemblyScript program. */ export class Program extends DiagnosticEmitter { @@ -418,7 +379,11 @@ export class Program extends DiagnosticEmitter { /** Runtime register function. `register(ref: usize, cid: u32): usize` */ registerInstance: Function | null = null; /** Runtime make array function. `newArray(length: i32, alignLog2: usize, id: u32, source: usize = 0): usize` */ - newArrayInstance: Function | null = null; + makeArrayInstance: Function | null = null; + /** Runtime instanceof function. */ + instanceofInstance: Function | null = null; + /** Runtime flags function. */ + flagsInstance: Function | null = null; /** The kind of garbage collector being present. */ collectorKind: CollectorKind = CollectorKind.NONE; @@ -598,7 +563,7 @@ export class Program extends DiagnosticEmitter { // register compiler hints this.registerConstantInteger(CommonSymbols.ASC_TARGET, Type.i32, - i64_new(options.isWasm64 ? 2 : 1)); + i64_new(options.isWasm64 ? Target.WASM64 : Target.WASM32)); this.registerConstantInteger(CommonSymbols.ASC_NO_ASSERT, Type.bool, i64_new(options.noAssert ? 1 : 0, 0)); this.registerConstantInteger(CommonSymbols.ASC_MEMORY_BASE, Type.i32, @@ -895,9 +860,17 @@ export class Program extends DiagnosticEmitter { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.registerInstance = this.resolver.resolveFunction(element, null); } - if (element = this.lookupGlobal(BuiltinSymbols.runtime_newArray)) { + if (element = this.lookupGlobal(BuiltinSymbols.runtime_makeArray)) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.makeArrayInstance = this.resolver.resolveFunction(element, null); + } + if (element = this.lookupGlobal(BuiltinSymbols.runtime_instanceof)) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.instanceofInstance = this.resolver.resolveFunction(element, null); + } + if (element = this.lookupGlobal(BuiltinSymbols.runtime_flags)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); - this.newArrayInstance = this.resolver.resolveFunction(element, null); + this.flagsInstance = this.resolver.resolveFunction(element, null); } // memory allocator interface if (element = this.lookupGlobal("__mem_allocate")) { @@ -3069,15 +3042,10 @@ export class Class extends TypedElement { /** Unique class id. */ private _id: u32 = 0; - /** Ensures that this class has an id. */ - ensureId(): i32 { + /** Gets the unique runtime id of this class. Must be a managed class. */ + get id(): u32 { var id = this._id; - if (!id) { - assert(!this.hasDecorator(DecoratorFlags.UNMANAGED)); - let program = this.program; - this._id = id = program.nextClassId++; - program.managedClasses.set(id, this); - } + assert(id); // must be managed to have an id return id; } @@ -3122,13 +3090,20 @@ export class Class extends TypedElement { prototype.parent, prototype.declaration ); + var program = this.program; this.prototype = prototype; this.flags = prototype.flags; this.decoratorFlags = prototype.decoratorFlags; this.typeArguments = typeArguments; - this.setType(this.program.options.usizeType.asClass(this)); + this.setType(program.options.usizeType.asClass(this)); this.base = base; + if (!this.hasDecorator(DecoratorFlags.UNMANAGED)) { + let id = program.nextClassId++; + this._id = id; + program.managedClasses.set(id, this); + } + // inherit static members and contextual type arguments from base class if (base) { let inheritedTypeArguments = base.contextualTypeArguments; @@ -3157,7 +3132,7 @@ export class Class extends TypedElement { } else if (typeParameters && typeParameters.length) { throw new Error("type argument count mismatch"); } - registerConcreteElement(this.program, this); + registerConcreteElement(program, this); } /** Tests if a value of this class type is assignable to a target of the specified class type. */ diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 651dc472e1..a8b86bf112 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -1,8 +1,8 @@ /// -import { MAX_BYTELENGTH, allocate, reallocate, discard, register } from "./util/runtime"; +import { MAX_BYTELENGTH, allocate, reallocate, discard, register, NEWARRAY } from "./util/runtime"; import { COMPARATOR, SORT } from "./util/sort"; -import { runtime, __runtime_id, __gc_mark_members } from "./runtime"; +import { __runtime_id, __gc_mark_members } from "./runtime"; import { ArrayBuffer, ArrayBufferView } from "./arraybuffer"; import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number"; import { isArray as builtin_isArray } from "./builtins"; @@ -42,9 +42,9 @@ export class Array extends ArrayBufferView { static create(capacity: i32 = 0): Array { if (capacity > MAX_BYTELENGTH >>> alignof()) throw new RangeError(E_INVALIDLENGTH); - var array = changetype>(runtime.newArray(capacity, alignof(), __runtime_id>())); - memory.fill(array.dataStart, 0, array.dataLength); - array.length_ = 0; // ! + var array = NEWARRAY(capacity); + array.length_ = 0; // safe even if T is a non-nullable reference + memory.fill(array.dataStart, 0, array.dataLength); return array; } @@ -232,7 +232,9 @@ export class Array extends ArrayBufferView { concat(other: Array): Array { var thisLen = this.length_; var otherLen = select(0, other.length_, other === null); - var out = changetype>(runtime.newArray(thisLen + otherLen, alignof(), __runtime_id>())); + var outLen = thisLen + otherLen; + if (outLen > MAX_BYTELENGTH >>> alignof()) throw new Error(E_INVALIDLENGTH); + var out = NEWARRAY(outLen); var outStart = out.dataStart; var thisSize = thisLen << alignof(); if (isManaged()) { @@ -320,7 +322,7 @@ export class Array extends ArrayBufferView { map(callbackfn: (value: T, index: i32, array: Array) => U): Array { var length = this.length_; - var out = changetype>(runtime.newArray(length, alignof(), __runtime_id>())); + var out = NEWARRAY(length); var outStart = out.dataStart; for (let index = 0; index < min(length, this.length_); ++index) { let value = load(this.dataStart + (index << alignof())); @@ -346,7 +348,7 @@ export class Array extends ArrayBufferView { } filter(callbackfn: (value: T, index: i32, array: Array) => bool): Array { - var result = changetype>(runtime.newArray(0, alignof(), __runtime_id>())); + var result = NEWARRAY(0); for (let index = 0, length = this.length_; index < min(length, this.length_); ++index) { let value = load(this.dataStart + (index << alignof())); if (callbackfn(value, index, this)) result.push(value); @@ -434,7 +436,7 @@ export class Array extends ArrayBufferView { begin = begin < 0 ? max(begin + length, 0) : min(begin, length); end = end < 0 ? max(end + length, 0) : min(end , length); length = max(end - begin, 0); - var slice = changetype>(runtime.newArray(length, alignof(), __runtime_id>())); + var slice = NEWARRAY(length); var sliceBase = slice.dataStart; var thisBase = this.dataStart + (begin << alignof()); if (isManaged()) { @@ -466,7 +468,7 @@ export class Array extends ArrayBufferView { var length = this.length_; start = start < 0 ? max(length + start, 0) : min(start, length); deleteCount = max(min(deleteCount, length - start), 0); - var result = changetype>(runtime.newArray(deleteCount, alignof(), __runtime_id>())); + var result = NEWARRAY(deleteCount); var resultStart = result.dataStart; var thisStart = this.dataStart; var thisBase = thisStart + (start << alignof()); diff --git a/std/assembly/builtins.ts b/std/assembly/builtins.ts index 5d192c7226..fdb8482e8a 100644 --- a/std/assembly/builtins.ts +++ b/std/assembly/builtins.ts @@ -1715,3 +1715,36 @@ export namespace v8x16 { l8: u8, l9: u8, l10: u8, l11: u8, l12: u8, l13: u8, l14: u8, l15: u8 ): v128; } + +// @ts-ignore: decorator +@builtin +export declare function ERROR(message?: string): void; + +// @ts-ignore: decorator +@builtin +export declare function WARNING(message?: string): void; + +// @ts-ignore: decorator +@builtin +export declare function INFO(message?: string): void; + +// @ts-ignore: decorator +@external("env", "abort") +declare function abort( + message?: string | null, + fileName?: string | null, + lineNumber?: u32, + columnNumber?: u32 +): void; + +// @ts-ignore: decorator +@external("env", "trace") +declare function trace( + message: string, + n?: i32, + a0?: f64, + a1?: f64, + a2?: f64, + a3?: f64, + a4?: f64 +): void; diff --git a/std/assembly/common/README.md b/std/assembly/common/README.md new file mode 100644 index 0000000000..10f2f98c57 --- /dev/null +++ b/std/assembly/common/README.md @@ -0,0 +1 @@ +These source files are used by both the standard library *and* compiler. Must remain portable. diff --git a/std/assembly/common/capability.ts b/std/assembly/common/capability.ts new file mode 100644 index 0000000000..9b903515ee --- /dev/null +++ b/std/assembly/common/capability.ts @@ -0,0 +1,9 @@ +/** Indicates module capabilities. */ +export const enum Capability { + /** No specific capabilities. */ + NONE = 0, + /** Uses WebAssembly with 64-bit pointers. */ + WASM64 = 1 << 0, + /** Garbage collector is present (full runtime header). */ + GC = 1 << 1 +} diff --git a/std/assembly/common/feature.ts b/std/assembly/common/feature.ts new file mode 100644 index 0000000000..60b1563dde --- /dev/null +++ b/std/assembly/common/feature.ts @@ -0,0 +1,15 @@ +/** Indicates specific features to activate. */ +export const enum Feature { + /** No additional features. */ + NONE = 0, + /** Sign extension operations. */ + SIGN_EXTENSION = 1 << 0, // see: https://github.com/WebAssembly/sign-extension-ops + /** Mutable global imports and exports. */ + MUTABLE_GLOBAL = 1 << 1, // see: https://github.com/WebAssembly/mutable-global + /** Bulk memory operations. */ + BULK_MEMORY = 1 << 2, // see: https://github.com/WebAssembly/bulk-memory-operations + /** SIMD types and operations. */ + SIMD = 1 << 3, // see: https://github.com/WebAssembly/simd + /** Threading and atomic operations. */ + THREADS = 1 << 4 // see: https://github.com/WebAssembly/threads +} diff --git a/std/assembly/common/rtti.ts b/std/assembly/common/rtti.ts new file mode 100644 index 0000000000..fd75483227 --- /dev/null +++ b/std/assembly/common/rtti.ts @@ -0,0 +1,60 @@ +// ╒═════════════════════ RTTI interpretation ═════════════════════╕ +// 3 2 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits +// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ ◄─ RTTI_BASE +// │ count │ +// ├ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┤ +// │ reserved │ +// ╞═══════════════════════════════════════════════════════════════╡ ┐ +// │ RTTIData#flags [id=1] │ id=1..count +// ├ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┤ +// │ RTTIData#base [id=1] │ +// ├───────────────────────────────────────────────────────────────┤ +// │ ... │ + +/** Runtime type information data structure. */ +@unmanaged +export class RTTIData { + flags: RTTIFlags; + base: u32; +} + +/** Runtime type information flags. */ +export const enum RTTIFlags { + /** No specific flags. */ + NONE = 0, + /** Type is an `Array`. */ + ARRAY = 1 << 0, + /** Type is a `Set`. */ + SET = 1 << 1, + /** Type is a `Map`. */ + MAP = 1 << 2, + /** Value alignment of 1 byte. */ + VALUE_ALIGN_0 = 1 << 3, + /** Value alignment of 2 bytes. */ + VALUE_ALIGN_1 = 1 << 4, + /** Value alignment of 4 bytes. */ + VALUE_ALIGN_2 = 1 << 5, + /** Value alignment of 8 bytes. */ + VALUE_ALIGN_3 = 1 << 6, + /** Value alignment of 16 bytes. */ + VALUE_ALIGN_4 = 1 << 7, + /** Value type is nullable. */ + VALUE_NULLABLE = 1 << 8, + /** Value type is managed. */ + VALUE_MANAGED = 1 << 9, + /** Key alignment of 1 byte. */ + KEY_ALIGN_0 = 1 << 10, + /** Key alignment of 2 bytes. */ + KEY_ALIGN_1 = 1 << 11, + /** Key alignment of 4 bytes. */ + KEY_ALIGN_2 = 1 << 12, + /** Key alignment of 8 bytes. */ + KEY_ALIGN_3 = 1 << 13, + /** Key alignment of 16 bytes. */ + KEY_ALIGN_4 = 1 << 14, + /** Key type is nullable. */ + KEY_NULLABLE = 1 << 15, + /** Key type is managed. */ + KEY_MANAGED = 1 << 16 +} diff --git a/std/assembly/common/target.ts b/std/assembly/common/target.ts new file mode 100644 index 0000000000..9e8cf27614 --- /dev/null +++ b/std/assembly/common/target.ts @@ -0,0 +1,9 @@ +/** Compilation target. */ +export enum Target { + /** WebAssembly with 32-bit pointers. */ + WASM32, + /** WebAssembly with 64-bit pointers. Experimental and not supported by any runtime yet. */ + WASM64, + /** Portable. */ + JS +} diff --git a/std/assembly/diagnostics.ts b/std/assembly/diagnostics.ts deleted file mode 100644 index 065364db95..0000000000 --- a/std/assembly/diagnostics.ts +++ /dev/null @@ -1,11 +0,0 @@ -// @ts-ignore: decorator -@builtin -export declare function ERROR(message?: string): void; - -// @ts-ignore: decorator -@builtin -export declare function WARNING(message?: string): void; - -// @ts-ignore: decorator -@builtin -export declare function INFO(message?: string): void; diff --git a/std/assembly/env.ts b/std/assembly/env.ts deleted file mode 100644 index 381e482c11..0000000000 --- a/std/assembly/env.ts +++ /dev/null @@ -1,16 +0,0 @@ -declare function abort( - message?: string | null, - fileName?: string | null, - lineNumber?: u32, - columnNumber?: u32 -): void; - -declare function trace( - message: string, - n?: i32, - a0?: f64, - a1?: f64, - a2?: f64, - a3?: f64, - a4?: f64 -): void; diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index 36f846cbae..e276d0b83b 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -1485,13 +1485,6 @@ interface TypedPropertyDescriptor { set?(value: T): void; } -/** Annotates an element as a program global. */ -declare function global( - target: any, - propertyKey: string, - descriptor: TypedPropertyDescriptor -): TypedPropertyDescriptor | void; - /** Annotates a method as a binary operator overload for the specified `token`. */ declare function operator(token: "[]" | "[]=" | "{}" | "{}=" | "==" | "!=" | ">" | "<" | "<=" | ">=" | @@ -1526,6 +1519,9 @@ declare namespace operator { ) => TypedPropertyDescriptor | void; } +/** Annotates an element as a program global. */ +declare function global(...args: any[]): any; + /** Annotates a class as being unmanaged with limited capabilities. */ declare function unmanaged(constructor: Function): void; diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 3144ee714f..0723159b09 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -3,62 +3,17 @@ import { HEADER, HEADER_SIZE, allocate, register } from "./util/runtime"; import { E_NOTIMPLEMENTED } from "./util/error"; -import { memory } from "./memory"; import { ArrayBufferView } from "./arraybuffer"; +import { RTTIFlags, RTTIData } from "./common/rtti"; -/** Gets the computed unique id of a class type. */ -// @ts-ignore: decorator -@builtin -export declare function __runtime_id(): u32; - -/** Tests if a managed class is the same as or a superclass of another. */ // @ts-ignore: decorator @builtin -export declare function __runtime_instanceof(id: u32, superId: u32): bool; - -/** Runtime flags. */ -const enum RuntimeFlags { // keep in sync with src/program.ts - NONE = 0, - /** Type is an `Array`. */ - ARRAY = 1 << 0, - /** Type is a `Set`. */ - SET = 1 << 1, - /** Type is a `Map`. */ - MAP = 1 << 2, - /** Value alignment of 1 byte. */ - VALUE_ALIGN_0 = 1 << 3, - /** Value alignment of 2 bytes. */ - VALUE_ALIGN_1 = 1 << 4, - /** Value alignment of 4 bytes. */ - VALUE_ALIGN_2 = 1 << 5, - /** Value alignment of 8 bytes. */ - VALUE_ALIGN_3 = 1 << 6, - /** Value alignment of 16 bytes. */ - VALUE_ALIGN_4 = 1 << 7, - /** Value type is nullable. */ - VALUE_NULLABLE = 1 << 8, - /** Value type is managed. */ - VALUE_MANAGED = 1 << 9, - /** Key alignment of 1 byte. */ - KEY_ALIGN_0 = 1 << 10, - /** Key alignment of 2 bytes. */ - KEY_ALIGN_1 = 1 << 11, - /** Key alignment of 4 bytes. */ - KEY_ALIGN_2 = 1 << 12, - /** Key alignment of 8 bytes. */ - KEY_ALIGN_3 = 1 << 13, - /** Key alignment of 16 bytes. */ - KEY_ALIGN_4 = 1 << 14, - /** Key type is nullable. */ - KEY_NULLABLE = 1 << 15, - /** Key type is managed. */ - KEY_MANAGED = 1 << 16 -} +export declare const RTTI_BASE: usize; -/** Gets the runtime flags of the managed type represented by the specified runtime id. */ +/** Gets the computed unique id of a class type. */ // @ts-ignore: decorator @builtin -export declare function __runtime_flags(id: u32): RuntimeFlags; +export declare function __runtime_id(): u32; /** Marks root objects when a tracing GC is present. */ // @ts-ignore: decorator @@ -76,20 +31,24 @@ export class runtime { private constructor() { return unreachable(); } /** Determines whether a managed object is considered to be an instance of the class represented by the specified runtime id. */ - @unsafe - static instanceof(ref: usize, id: u32): bool { // keyword - return ref - ? __runtime_instanceof( - changetype
(ref - HEADER_SIZE).classId, - id - ) - : false; + static instanceof(ref: usize, superId: u32): bool { // keyword + var id = changetype
(ref - HEADER_SIZE).classId; + var ptr = RTTI_BASE; + if (id && id <= load(ptr)) { + do if (id == superId) return true; + while (id = changetype(ptr + id * offsetof()).base); + } + return false; } } export namespace runtime { - export function flags(id: u32): RuntimeFlags { - return __runtime_flags(id); + /** Gets the runtime flags of the managed type represented by the specified runtime id. */ + export function flags(id: u32): RTTIFlags { + var ptr = RTTI_BASE; + return !id || id > load(ptr) + ? unreachable() + : changetype(ptr + id * offsetof()).flags; } /** Allocates and registers, but doesn't initialize the data of, a new managed object of the specified kind. */ @@ -113,57 +72,36 @@ export namespace runtime { return newObject(byteLength, __runtime_id()); } - /** Allocates and registers, but doesn't initialize the data of, a new `Array` of the specified length and element alignment.*/ + /** Allocates and registers a new `Array` of the specified kind using the given backing buffer.*/ // @ts-ignore: decorator @unsafe - export function newArray(length: i32, alignLog2: usize, id: u32, data: usize = 0): usize { - // TODO: This API isn't great, but the compiler requires it for array literals anyway, - // that is when an array literal is encountered and its data is static, this function is - // called and the static buffer provided as `data`. This function can also be used to - // create typed arrays in that `Array` also implements `ArrayBufferView` but has an - // additional `.length_` property that remains unused overhead for typed arrays. - var array = register(allocate(offsetof()), id); - var bufferSize = length << alignLog2; - var buffer = register(allocate(bufferSize), __runtime_id()); + export function newArray(id: u32, buffer: usize): usize { + var flags = runtime.flags(id); // traps if invalid + var alignLog2 = (flags / RTTIFlags.VALUE_ALIGN_0) & 31; + var byteLength: i32; + if (!buffer) buffer = newArrayBuffer(byteLength = 0); + else byteLength = changetype(buffer).byteLength; + var array = newObject(id, offsetof()); changetype(array).data = changetype(buffer); // links changetype(array).dataStart = buffer; - changetype(array).dataLength = bufferSize; - store(changetype(array), length, offsetof("length_")); - if (data) memory.copy(buffer, data, bufferSize); - // TODO: a way to determine whether the array has managed elements that must be linked? + changetype(array).dataLength = byteLength; + store(changetype(array), byteLength >>> alignLog2, offsetof("length_")); + if (flags & RTTIFlags.VALUE_MANAGED) { + let cur = buffer; + let end = cur + byteLength; + while (cur < end) { + let ref = load(cur); + if (ref) { + if (isDefined(__ref_link)) __ref_link(ref, array); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } + cur += sizeof(); + } + } return array; } - // export function newArray2(id: u32, buffer: usize): usize { - // var flags = __runtime_flags(id); // traps if invalid - // var alignLog2 = (flags / RuntimeFlags.VALUE_ALIGN_0) & 31; - // var byteLength: i32; - // if (!buffer) { - // buffer = newArrayBuffer(byteLength = 0); - // } else { - // byteLength = changetype(buffer).byteLength; - // } - // var array = register(allocate(offsetof()), id); - // changetype(array).data = changetype(buffer); // links - // changetype(array).dataStart = buffer; - // changetype(array).dataLength = byteLength; - // store(changetype(array), byteLength >>> alignLog2, offsetof("length_")); - // if (flags & RuntimeFlags.VALUE_MANAGED) { - // let cur = buffer; - // let end = cur + byteLength; - // while (cur < end) { - // let ref = load(cur); - // if (ref) { - // if (isDefined(__ref_link)) __ref_link(ref, array); - // else if (isDefined(__ref_retain)) __ref_retain(ref); - // else assert(false); - // } - // cur += sizeof(); - // } - // } - // return array; - // } - /** Retains a managed object externally, making sure that it doesn't become collected. */ // @ts-ignore: decorator @unsafe diff --git a/std/assembly/runtime/arena.ts b/std/assembly/runtime/arena.ts index 9a31c7a41c..4d869414e0 100644 --- a/std/assembly/runtime/arena.ts +++ b/std/assembly/runtime/arena.ts @@ -1 +1,3 @@ import "allocator/arena"; + +export { runtime as $ }; diff --git a/std/assembly/string.ts b/std/assembly/string.ts index e77c5f26df..653e34713b 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -1,10 +1,10 @@ /// import { MAX_SIZE_32 } from "./util/allocator"; -import { HEADER, HEADER_SIZE, allocate, register } from "./util/runtime"; +import { HEADER, HEADER_SIZE, allocate, register, NEWARRAY } from "./util/runtime"; import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./util/string"; import { E_INVALIDLENGTH } from "./util/error"; -import { runtime, __runtime_id } from "./runtime"; +import { __runtime_id } from "./runtime"; import { ArrayBufferView } from "./arraybuffer"; @sealed export abstract class String { @@ -362,16 +362,16 @@ import { ArrayBufferView } from "./arraybuffer"; split(separator: String | null = null, limit: i32 = i32.MAX_VALUE): String[] { assert(this !== null); - if (!limit) return changetype(runtime.newArray(0, alignof(), __runtime_id())); + if (!limit) return NEWARRAY(0); if (separator === null) return [this]; var length: isize = this.length; var sepLen: isize = separator.length; if (limit < 0) limit = i32.MAX_VALUE; if (!sepLen) { - if (!length) return changetype(runtime.newArray(0, alignof(), __runtime_id())); + if (!length) return NEWARRAY(0); // split by chars length = min(length, limit); - let result = changetype(runtime.newArray(length, alignof(), __runtime_id())); + let result = NEWARRAY(length); let resultStart = changetype(result).dataStart; for (let i: isize = 0; i < length; ++i) { let charStr = allocate(2); @@ -385,11 +385,11 @@ import { ArrayBufferView } from "./arraybuffer"; } return result; } else if (!length) { - let result = changetype(runtime.newArray(1, alignof(), __runtime_id())); + let result = NEWARRAY(1); store(changetype(result).dataStart, ""); // no need to register/link return result; } - var result = changetype(runtime.newArray(0, alignof(), __runtime_id())); + var result = NEWARRAY(0); var end = 0, start = 0, i = 0; while ((end = this.indexOf(separator!, start)) != -1) { let len = end - start; @@ -404,7 +404,7 @@ import { ArrayBufferView } from "./arraybuffer"; start = end + sepLen; } if (!start) { - let result = changetype(runtime.newArray(1, alignof(), __runtime_id())); + let result = NEWARRAY(1); unchecked(result[0] = this); return result; } diff --git a/std/assembly/util/runtime.ts b/std/assembly/util/runtime.ts index 09b4ab5df1..d2f23b48eb 100644 --- a/std/assembly/util/runtime.ts +++ b/std/assembly/util/runtime.ts @@ -1,4 +1,7 @@ import { AL_MASK, MAX_SIZE_32 } from "./allocator"; +import { __runtime_id } from "../runtime"; +import { Array } from "../array"; +import { ArrayBufferView } from "../arraybuffer"; /** * The common runtime object header prepended to all managed objects. Has a size of 16 bytes in @@ -136,22 +139,22 @@ export function register(ref: usize, id: u32): usize { return ref; } -/** Allocates and registers, but doesn't initialize the data of, a new `Array` of the specified length and element alignment. */ // @ts-ignore: decorator @unsafe -export function newArray(length: i32, alignLog2: usize, id: u32, data: usize = 0): usize { - // TODO: This API isn't great, but the compiler requires it for array literals anyway, - // that is when an array literal is encountered and its data is static, this function is - // called and the static buffer provided as `data`. This function can also be used to - // create typed arrays in that `Array` also implements `ArrayBufferView` but has an - // additional `.length_` property that remains unused overhead for typed arrays. - var array = newObject(offsetof(), id); - var bufferSize = length << alignLog2; - var buffer = newArrayBuffer(bufferSize); +export function makeArray(length: i32, alignLog2: usize, id: u32, data: usize = 0): usize { + var array = register(allocate(offsetof()), id); + var bufferSize = length << alignLog2; + var buffer = register(allocate(bufferSize), __runtime_id()); changetype(array).data = changetype(buffer); // links changetype(array).dataStart = buffer; changetype(array).dataLength = bufferSize; store(changetype(array), length, offsetof("length_")); - if (data) memory.copy(buffer, data, bufferSize); + if (data) memory.copy(buffer, data, bufferSize); return array; } + +// @ts-ignore: decorator +@inline +export function NEWARRAY(length: i32): Array { + return changetype>(makeArray(length, alignof(), __runtime_id>(), 0)); +} diff --git a/std/portable/index.d.ts b/std/portable/index.d.ts index ebb098ab1a..b42237c2bc 100644 --- a/std/portable/index.d.ts +++ b/std/portable/index.d.ts @@ -644,3 +644,6 @@ declare namespace console { /** @deprecated */ function log(message: string): void; } + +/** Annotates a class as being unmanaged with limited capabilities. */ +declare function unmanaged(constructor: Function): void; diff --git a/std/portable/index.js b/std/portable/index.js index 06c0a4adf8..1c8173ce13 100644 --- a/std/portable/index.js +++ b/std/portable/index.js @@ -2,7 +2,7 @@ var globalScope = typeof window !== "undefined" && window || typeof global !== "undefined" && global || self; -globalScope.ASC_TARGET = 0; // JS +globalScope.ASC_TARGET = 2; // Target.JS globalScope.ASC_NO_ASSERT = false; globalScope.ASC_MEMORY_BASE = 0; globalScope.ASC_OPTIMIZE_LEVEL = 3; @@ -311,3 +311,5 @@ globalScope["store"] = globalScope["__store"] || function store(ptr, value, offs globalScope["load"] = globalScope["__load"] || function load(ptr, offset) { return HEAP[(ptr | 0) + (offset | 0)]; }; + +globalScope["unmanaged"] = function() {}; diff --git a/tests/compiler/abi.optimized.wat b/tests/compiler/abi.optimized.wat index 2bfee2faeb..4614520e88 100644 --- a/tests/compiler/abi.optimized.wat +++ b/tests/compiler/abi.optimized.wat @@ -2,15 +2,12 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\0c\00\00\00a\00b\00i\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\0c\00\00\00a\00b\00i\00.\00t\00s") (global $abi/condition (mut i32) (i32.const 0)) (global $abi/y (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "exported" (func $abi/exported)) (export "exportedExported" (func $abi/exported)) (export "exportedInternal" (func $abi/exported)) @@ -29,7 +26,7 @@ i32.const 16 i32.const 65 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/abi.untouched.wat b/tests/compiler/abi.untouched.wat index 7271f11b7f..42710bfed1 100644 --- a/tests/compiler/abi.untouched.wat +++ b/tests/compiler/abi.untouched.wat @@ -2,16 +2,14 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\0c\00\00\00a\00b\00i\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\0c\00\00\00a\00b\00i\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $abi/condition (mut i32) (i32.const 0)) (global $abi/y (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 28)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "exported" (func $abi/exported)) (export "exportedExported" (func $abi/exportedExported)) (export "exportedInternal" (func $abi/exportedInternal)) @@ -42,7 +40,7 @@ i32.const 16 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -81,7 +79,7 @@ i32.const 16 i32.const 45 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -112,7 +110,7 @@ i32.const 16 i32.const 58 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -131,7 +129,7 @@ i32.const 16 i32.const 65 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -148,7 +146,7 @@ i32.const 16 i32.const 72 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -163,7 +161,7 @@ i32.const 16 i32.const 74 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -176,7 +174,7 @@ i32.const 16 i32.const 77 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -189,7 +187,7 @@ i32.const 16 i32.const 79 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end diff --git a/tests/compiler/asc-constants.optimized.wat b/tests/compiler/asc-constants.optimized.wat index 86b388ad0a..e2acb0a3b8 100644 --- a/tests/compiler/asc-constants.optimized.wat +++ b/tests/compiler/asc-constants.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/asc-constants.untouched.wat b/tests/compiler/asc-constants.untouched.wat index 1ccafb9b5e..3edd831f17 100644 --- a/tests/compiler/asc-constants.untouched.wat +++ b/tests/compiler/asc-constants.untouched.wat @@ -13,12 +13,10 @@ (global $~lib/ASC_FEATURE_BULK_MEMORY i32 (i32.const 0)) (global $~lib/ASC_FEATURE_SIMD i32 (i32.const 0)) (global $~lib/ASC_FEATURE_THREADS i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:asc-constants (; 0 ;) (type $FUNCSIG$v) - i32.const 1 + i32.const 0 drop i32.const 0 drop diff --git a/tests/compiler/assert-nonnull.json b/tests/compiler/assert-nonnull.json index 85b9ce0f6e..b1da366ff4 100644 --- a/tests/compiler/assert-nonnull.json +++ b/tests/compiler/assert-nonnull.json @@ -1,5 +1,5 @@ { "asc_flags": [ - "--runtime arena" + "--runtime none" ] } \ No newline at end of file diff --git a/tests/compiler/assert-nonnull.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat index 91afd2e4b4..b3697678d5 100644 --- a/tests/compiler/assert-nonnull.optimized.wat +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -3,14 +3,13 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/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") + (data (i32.const 8) "\10\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/argc (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "testVar" (func $assert-nonnull/testVar)) (export "testObj" (func $assert-nonnull/testObj)) (export "testProp" (func $assert-nonnull/testProp)) @@ -60,7 +59,7 @@ i32.const 16 i32.const 96 i32.const 45 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -74,7 +73,7 @@ i32.const 16 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -102,7 +101,7 @@ i32.const 16 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 diff --git a/tests/compiler/assert-nonnull.ts b/tests/compiler/assert-nonnull.ts index b50dcb9a9b..6e4eed6dfb 100644 --- a/tests/compiler/assert-nonnull.ts +++ b/tests/compiler/assert-nonnull.ts @@ -1,3 +1,5 @@ +import "allocator/arena"; + export function testVar(n: Error | null): Error { return n!; } diff --git a/tests/compiler/assert-nonnull.untouched.wat b/tests/compiler/assert-nonnull.untouched.wat index 21c264d2ac..4dce2382f0 100644 --- a/tests/compiler/assert-nonnull.untouched.wat +++ b/tests/compiler/assert-nonnull.untouched.wat @@ -4,15 +4,13 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/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") + (data (i32.const 8) "\10\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "testVar" (func $assert-nonnull/testVar)) (export "testObj" (func $assert-nonnull/testObj)) (export "testProp" (func $assert-nonnull/testProp)) @@ -76,7 +74,7 @@ i32.const 16 i32.const 96 i32.const 45 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -90,7 +88,7 @@ i32.const 16 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -130,7 +128,7 @@ i32.const 16 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 diff --git a/tests/compiler/assert.optimized.wat b/tests/compiler/assert.optimized.wat index f2e82a1c43..0ed844f16a 100644 --- a/tests/compiler/assert.optimized.wat +++ b/tests/compiler/assert.optimized.wat @@ -1,12 +1,9 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\12\00\00\00a\00s\00s\00e\00r\00t\00.\00t\00s") - (data (i32.const 40) "\01\00\00\00\18\00\00\00m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e") - (table $0 1 funcref) - (elem (i32.const 0) $start) + (data (i32.const 8) "\10\00\00\00\12\00\00\00a\00s\00s\00e\00r\00t\00.\00t\00s") + (data (i32.const 40) "\10\00\00\00\18\00\00\00m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e") (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/assert.untouched.wat b/tests/compiler/assert.untouched.wat index 8ab4993774..8054fc6806 100644 --- a/tests/compiler/assert.untouched.wat +++ b/tests/compiler/assert.untouched.wat @@ -1,15 +1,13 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\12\00\00\00a\00s\00s\00e\00r\00t\00.\00t\00s\00") - (data (i32.const 40) "\01\00\00\00\18\00\00\00m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e\00") + (data (i32.const 8) "\10\00\00\00\12\00\00\00a\00s\00s\00e\00r\00t\00.\00t\00s\00") + (data (i32.const 40) "\10\00\00\00\18\00\00\00m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 72)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:assert (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -20,7 +18,7 @@ i32.const 16 i32.const 1 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -30,7 +28,7 @@ i32.const 16 i32.const 2 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -42,7 +40,7 @@ i32.const 16 i32.const 3 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -53,7 +51,7 @@ i32.const 16 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -65,7 +63,7 @@ i32.const 16 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4294967296 @@ -75,7 +73,7 @@ i32.const 16 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4294967296 @@ -87,7 +85,7 @@ i32.const 16 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -99,7 +97,7 @@ i32.const 16 i32.const 10 i32.const 5 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.eqz diff --git a/tests/compiler/binary.optimized.wat b/tests/compiler/binary.optimized.wat index a1e8db6acb..cc70e25a7e 100644 --- a/tests/compiler/binary.optimized.wat +++ b/tests/compiler/binary.optimized.wat @@ -3,15 +3,12 @@ (type $FUNCSIG$dd (func (param f64) (result f64))) (type $FUNCSIG$ff (func (param f32) (result f32))) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $binary/b (mut i32) (i32.const 0)) (global $binary/i (mut i32) (i32.const 0)) (global $binary/I (mut i64) (i64.const 0)) (global $binary/f (mut f32) (f32.const 0)) (global $binary/F (mut f64) (f64.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $~lib/math/NativeMath.pow (; 0 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i32) diff --git a/tests/compiler/binary.untouched.wat b/tests/compiler/binary.untouched.wat index 1952084715..effa386c0f 100644 --- a/tests/compiler/binary.untouched.wat +++ b/tests/compiler/binary.untouched.wat @@ -14,9 +14,7 @@ (global $binary/I (mut i64) (i64.const 0)) (global $binary/f (mut f32) (f32.const 0)) (global $binary/F (mut f64) (f64.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $~lib/math/NativeMath.scalbn (; 0 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) (local $2 f64) diff --git a/tests/compiler/bool.optimized.wat b/tests/compiler/bool.optimized.wat index cc711a8527..581beabc3c 100644 --- a/tests/compiler/bool.optimized.wat +++ b/tests/compiler/bool.optimized.wat @@ -1,11 +1,9 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\0e\00\00\00b\00o\00o\00l\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\0e\00\00\00b\00o\00o\00l\00.\00t\00s") (global $bool/i (mut i32) (i32.const 2)) (global $bool/I (mut i64) (i64.const 2)) (global $bool/u (mut i32) (i32.const 2)) @@ -14,7 +12,6 @@ (global $bool/F (mut f64) (f64.const 2)) (global $bool/uu (mut i32) (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:bool (; 1 ;) (type $FUNCSIG$v) global.get $bool/i @@ -27,7 +24,7 @@ i32.const 16 i32.const 2 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/I @@ -40,7 +37,7 @@ i32.const 16 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/u @@ -53,7 +50,7 @@ i32.const 16 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/U @@ -66,7 +63,7 @@ i32.const 16 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/f @@ -79,7 +76,7 @@ i32.const 16 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/F @@ -92,7 +89,7 @@ i32.const 16 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/uu @@ -105,7 +102,7 @@ i32.const 16 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/bool.untouched.wat b/tests/compiler/bool.untouched.wat index 4ef282c1ab..c2b6014dda 100644 --- a/tests/compiler/bool.untouched.wat +++ b/tests/compiler/bool.untouched.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\0e\00\00\00b\00o\00o\00l\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\0e\00\00\00b\00o\00o\00l\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $bool/i (mut i32) (i32.const 2)) @@ -13,9 +13,7 @@ (global $bool/f (mut f32) (f32.const 2)) (global $bool/F (mut f64) (f64.const 2)) (global $bool/uu (mut i32) (i32.const 2)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:bool (; 1 ;) (type $FUNCSIG$v) global.get $bool/i @@ -29,7 +27,7 @@ i32.const 16 i32.const 2 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/I @@ -43,7 +41,7 @@ i32.const 16 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/u @@ -57,7 +55,7 @@ i32.const 16 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/U @@ -71,7 +69,7 @@ i32.const 16 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/f @@ -85,7 +83,7 @@ i32.const 16 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/F @@ -99,7 +97,7 @@ i32.const 16 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/uu @@ -113,7 +111,7 @@ i32.const 16 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index c4c3082843..ada687b403 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -2,11 +2,11 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\16\00\00\00b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s") - (data (i32.const 40) "\01") - (data (i32.const 48) "\01\00\00\00\06\00\00\00a\00b\00c") + (data (i32.const 8) "\10\00\00\00\16\00\00\00b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s") + (data (i32.const 40) "\10") + (data (i32.const 48) "\10\00\00\00\06\00\00\00a\00b\00c") (table $0 2 funcref) (elem (i32.const 0) $builtins/test $start:builtins~anonymous|0) (global $builtins/b (mut i32) (i32.const 0)) @@ -19,7 +19,6 @@ (global $builtins/s (mut i32) (i32.const 0)) (global $builtins/fn (mut i32) (i32.const 1)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $builtins/test)) (start $start) (func $start:builtins~anonymous|0 (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) @@ -46,7 +45,7 @@ i32.const 16 i32.const 67 i32.const 19 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -59,7 +58,7 @@ i32.const 16 i32.const 68 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -72,7 +71,7 @@ i32.const 16 i32.const 69 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 63 @@ -95,7 +94,7 @@ i32.const 16 i32.const 85 i32.const 19 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -108,7 +107,7 @@ i32.const 16 i32.const 86 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -121,7 +120,7 @@ i32.const 16 i32.const 87 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 diff --git a/tests/compiler/builtins.untouched.wat b/tests/compiler/builtins.untouched.wat index 05cdea32a9..bc65837630 100644 --- a/tests/compiler/builtins.untouched.wat +++ b/tests/compiler/builtins.untouched.wat @@ -4,11 +4,11 @@ (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\16\00\00\00b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s\00") - (data (i32.const 40) "\01\00\00\00\00\00\00\00") - (data (i32.const 48) "\01\00\00\00\06\00\00\00a\00b\00c\00") + (data (i32.const 8) "\10\00\00\00\16\00\00\00b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s\00") + (data (i32.const 40) "\10\00\00\00\00\00\00\00") + (data (i32.const 48) "\10\00\00\00\06\00\00\00a\00b\00c\00") (table $0 2 funcref) (elem (i32.const 0) $null $start:builtins~anonymous|0) (global $builtins/b (mut i32) (i32.const 0)) @@ -51,9 +51,7 @@ (global $~lib/builtins/f64.MIN_SAFE_INTEGER f64 (f64.const -9007199254740991)) (global $~lib/builtins/f64.MAX_SAFE_INTEGER f64 (f64.const 9007199254740991)) (global $~lib/builtins/f64.EPSILON f64 (f64.const 2.220446049250313e-16)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $builtins/test)) (start $start) (func $~lib/builtins/isNaN (; 1 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) @@ -95,7 +93,7 @@ i32.const 16 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -106,7 +104,7 @@ i32.const 16 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -116,7 +114,7 @@ i32.const 16 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -127,7 +125,7 @@ i32.const 16 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -137,7 +135,7 @@ i32.const 16 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -148,7 +146,7 @@ i32.const 16 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -158,7 +156,7 @@ i32.const 16 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -169,7 +167,7 @@ i32.const 16 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -179,7 +177,7 @@ i32.const 16 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -189,7 +187,7 @@ i32.const 16 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -199,7 +197,7 @@ i32.const 16 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -210,7 +208,7 @@ i32.const 16 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -220,7 +218,7 @@ i32.const 16 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -231,7 +229,7 @@ i32.const 16 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -241,7 +239,7 @@ i32.const 16 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -252,7 +250,7 @@ i32.const 16 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -262,7 +260,7 @@ i32.const 16 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -273,7 +271,7 @@ i32.const 16 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -283,7 +281,7 @@ i32.const 16 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -294,7 +292,7 @@ i32.const 16 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -304,7 +302,7 @@ i32.const 16 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -315,7 +313,7 @@ i32.const 16 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -325,7 +323,7 @@ i32.const 16 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -335,7 +333,7 @@ i32.const 16 i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -346,7 +344,7 @@ i32.const 16 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -356,7 +354,7 @@ i32.const 16 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -366,7 +364,7 @@ i32.const 16 i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -376,7 +374,7 @@ i32.const 16 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -386,7 +384,7 @@ i32.const 16 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -397,7 +395,7 @@ i32.const 16 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -407,7 +405,7 @@ i32.const 16 i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -418,7 +416,7 @@ i32.const 16 i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -428,7 +426,7 @@ i32.const 16 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -439,7 +437,7 @@ i32.const 16 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -449,7 +447,7 @@ i32.const 16 i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -460,7 +458,7 @@ i32.const 16 i32.const 45 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -470,7 +468,7 @@ i32.const 16 i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -481,7 +479,7 @@ i32.const 16 i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -565,7 +563,7 @@ i32.const 16 i32.const 67 i32.const 19 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -586,7 +584,7 @@ i32.const 16 i32.const 68 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -607,7 +605,7 @@ i32.const 16 i32.const 69 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -673,7 +671,7 @@ i32.const 16 i32.const 85 i32.const 19 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -694,7 +692,7 @@ i32.const 16 i32.const 86 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -715,7 +713,7 @@ i32.const 16 i32.const 87 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -762,7 +760,7 @@ i32.const 16 i32.const 104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -775,7 +773,7 @@ i32.const 16 i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.25 @@ -788,7 +786,7 @@ i32.const 16 i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -801,7 +799,7 @@ i32.const 16 i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -815,7 +813,7 @@ i32.const 16 i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -828,7 +826,7 @@ i32.const 16 i32.const 109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -919,7 +917,7 @@ i32.const 16 i32.const 140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -932,7 +930,7 @@ i32.const 16 i32.const 141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.25 @@ -945,7 +943,7 @@ i32.const 16 i32.const 142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -958,7 +956,7 @@ i32.const 16 i32.const 143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -972,7 +970,7 @@ i32.const 16 i32.const 144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -985,7 +983,7 @@ i32.const 16 i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1285,7 +1283,7 @@ i32.const 16 i32.const 264 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -1297,7 +1295,7 @@ i32.const 16 i32.const 265 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -1309,7 +1307,7 @@ i32.const 16 i32.const 266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -1321,7 +1319,7 @@ i32.const 16 i32.const 267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -1335,7 +1333,7 @@ i32.const 16 i32.const 269 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1347,7 +1345,7 @@ i32.const 16 i32.const 270 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -1359,7 +1357,7 @@ i32.const 16 i32.const 271 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -1371,7 +1369,7 @@ i32.const 16 i32.const 272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -1383,7 +1381,7 @@ i32.const 16 i32.const 273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -1397,7 +1395,7 @@ i32.const 16 i32.const 275 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -1409,7 +1407,7 @@ i32.const 16 i32.const 276 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1421,7 +1419,7 @@ i32.const 16 i32.const 278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1433,7 +1431,7 @@ i32.const 16 i32.const 279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -1445,7 +1443,7 @@ i32.const 16 i32.const 280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -1457,7 +1455,7 @@ i32.const 16 i32.const 281 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1469,7 +1467,7 @@ i32.const 16 i32.const 282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1481,7 +1479,7 @@ i32.const 16 i32.const 285 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -1493,7 +1491,7 @@ i32.const 16 i32.const 286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1505,7 +1503,7 @@ i32.const 16 i32.const 287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -1517,7 +1515,7 @@ i32.const 16 i32.const 288 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1529,7 +1527,7 @@ i32.const 16 i32.const 290 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -1541,7 +1539,7 @@ i32.const 16 i32.const 291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1553,7 +1551,7 @@ i32.const 16 i32.const 293 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1564,7 +1562,7 @@ i32.const 16 i32.const 294 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1575,7 +1573,7 @@ i32.const 16 i32.const 295 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1587,7 +1585,7 @@ i32.const 16 i32.const 296 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -1599,7 +1597,7 @@ i32.const 16 i32.const 297 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1611,7 +1609,7 @@ i32.const 16 i32.const 298 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1623,7 +1621,7 @@ i32.const 16 i32.const 299 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -1634,7 +1632,7 @@ i32.const 16 i32.const 300 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -1645,7 +1643,7 @@ i32.const 16 i32.const 301 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i8.MIN_VALUE @@ -1661,7 +1659,7 @@ i32.const 16 i32.const 314 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i8.MAX_VALUE @@ -1673,7 +1671,7 @@ i32.const 16 i32.const 315 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i16.MIN_VALUE @@ -1689,7 +1687,7 @@ i32.const 16 i32.const 316 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i16.MAX_VALUE @@ -1701,7 +1699,7 @@ i32.const 16 i32.const 317 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i32.MIN_VALUE @@ -1713,7 +1711,7 @@ i32.const 16 i32.const 318 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i32.MAX_VALUE @@ -1725,7 +1723,7 @@ i32.const 16 i32.const 319 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i64.MIN_VALUE @@ -1737,7 +1735,7 @@ i32.const 16 i32.const 320 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i64.MAX_VALUE @@ -1749,7 +1747,7 @@ i32.const 16 i32.const 321 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u8.MIN_VALUE @@ -1761,7 +1759,7 @@ i32.const 16 i32.const 323 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u8.MAX_VALUE @@ -1773,7 +1771,7 @@ i32.const 16 i32.const 324 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u16.MIN_VALUE @@ -1785,7 +1783,7 @@ i32.const 16 i32.const 325 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u16.MAX_VALUE @@ -1797,7 +1795,7 @@ i32.const 16 i32.const 326 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u32.MIN_VALUE @@ -1809,7 +1807,7 @@ i32.const 16 i32.const 327 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u32.MAX_VALUE @@ -1821,7 +1819,7 @@ i32.const 16 i32.const 328 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u64.MIN_VALUE @@ -1833,7 +1831,7 @@ i32.const 16 i32.const 329 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u64.MAX_VALUE @@ -1845,7 +1843,7 @@ i32.const 16 i32.const 330 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/bool.MIN_VALUE @@ -1857,7 +1855,7 @@ i32.const 16 i32.const 331 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/bool.MIN_VALUE @@ -1869,7 +1867,7 @@ i32.const 16 i32.const 331 i32.const 29 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/bool.MAX_VALUE @@ -1881,7 +1879,7 @@ i32.const 16 i32.const 332 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/bool.MAX_VALUE @@ -1893,7 +1891,7 @@ i32.const 16 i32.const 332 i32.const 29 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MIN_NORMAL_VALUE @@ -1905,7 +1903,7 @@ i32.const 16 i32.const 334 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MIN_VALUE @@ -1917,7 +1915,7 @@ i32.const 16 i32.const 335 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_VALUE @@ -1929,7 +1927,7 @@ i32.const 16 i32.const 336 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MIN_SAFE_INTEGER @@ -1941,7 +1939,7 @@ i32.const 16 i32.const 337 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_SAFE_INTEGER @@ -1953,7 +1951,7 @@ i32.const 16 i32.const 338 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.EPSILON @@ -1965,7 +1963,7 @@ i32.const 16 i32.const 339 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_NORMAL_VALUE @@ -1977,7 +1975,7 @@ i32.const 16 i32.const 341 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_VALUE @@ -1989,7 +1987,7 @@ i32.const 16 i32.const 342 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_VALUE @@ -2001,7 +1999,7 @@ i32.const 16 i32.const 343 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_SAFE_INTEGER @@ -2013,7 +2011,7 @@ i32.const 16 i32.const 344 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_SAFE_INTEGER @@ -2025,7 +2023,7 @@ i32.const 16 i32.const 345 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.EPSILON @@ -2037,7 +2035,7 @@ i32.const 16 i32.const 346 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 diff --git a/tests/compiler/call-inferred.optimized.wat b/tests/compiler/call-inferred.optimized.wat index 7bc28d5370..4592fd12e4 100644 --- a/tests/compiler/call-inferred.optimized.wat +++ b/tests/compiler/call-inferred.optimized.wat @@ -1,11 +1,8 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\01\00\00\00 \00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $start) + (data (i32.const 8) "\10\00\00\00 \00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s") (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/call-inferred.untouched.wat b/tests/compiler/call-inferred.untouched.wat index cf45f81999..e2053fdabc 100644 --- a/tests/compiler/call-inferred.untouched.wat +++ b/tests/compiler/call-inferred.untouched.wat @@ -4,14 +4,12 @@ (type $FUNCSIG$dd (func (param f64) (result f64))) (type $FUNCSIG$ff (func (param f32) (result f32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00 \00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00 \00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $call-inferred/foo (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -36,7 +34,7 @@ i32.const 16 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 42 @@ -49,7 +47,7 @@ i32.const 16 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 42 @@ -62,7 +60,7 @@ i32.const 16 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 42 @@ -75,7 +73,7 @@ i32.const 16 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/call-optional.optimized.wat b/tests/compiler/call-optional.optimized.wat index e8313e4046..58f70b73c6 100644 --- a/tests/compiler/call-optional.optimized.wat +++ b/tests/compiler/call-optional.optimized.wat @@ -2,15 +2,14 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00 \00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00 \00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s") (table $0 2 funcref) (elem (i32.const 0) $null $call-optional/opt|trampoline) (global $~lib/argc (mut i32) (i32.const 0)) (global $call-optional/optIndirect (mut i32) (i32.const 1)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $call-optional/opt|trampoline (; 1 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $2of2 @@ -68,7 +67,7 @@ i32.const 16 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -106,7 +105,7 @@ i32.const 16 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -121,7 +120,7 @@ i32.const 16 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -138,7 +137,7 @@ i32.const 16 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -155,7 +154,7 @@ i32.const 16 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/call-optional.untouched.wat b/tests/compiler/call-optional.untouched.wat index 63db1a24b6..9b15b88d8c 100644 --- a/tests/compiler/call-optional.untouched.wat +++ b/tests/compiler/call-optional.untouched.wat @@ -2,16 +2,14 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00 \00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00 \00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s\00") (table $0 2 funcref) (elem (i32.const 0) $null $call-optional/opt|trampoline) (global $~lib/argc (mut i32) (i32.const 0)) (global $call-optional/optIndirect (mut i32) (i32.const 1)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $call-optional/opt (; 1 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -60,7 +58,7 @@ i32.const 16 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -79,7 +77,7 @@ i32.const 16 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -94,7 +92,7 @@ i32.const 16 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -114,7 +112,7 @@ i32.const 16 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -134,7 +132,7 @@ i32.const 16 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -154,7 +152,7 @@ i32.const 16 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/call-super.json b/tests/compiler/call-super.json index 85b9ce0f6e..b1da366ff4 100644 --- a/tests/compiler/call-super.json +++ b/tests/compiler/call-super.json @@ -1,5 +1,5 @@ { "asc_flags": [ - "--runtime arena" + "--runtime none" ] } \ No newline at end of file diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 1ff8ff909c..7c78e198ff 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -4,16 +4,13 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 56) "\02\00\00\00\1a\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 56) "\10\00\00\00\1a\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -106,9 +103,9 @@ if i32.const 0 i32.const 16 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -121,9 +118,9 @@ if i32.const 0 i32.const 16 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -137,7 +134,7 @@ if i32.const 4 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.set $0 end @@ -151,9 +148,9 @@ if i32.const 0 i32.const 64 - i32.const 6 + i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -162,7 +159,7 @@ (local $0 i32) i32.const 8 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register call $call-super/A#constructor local.tee $0 @@ -175,9 +172,9 @@ if i32.const 0 i32.const 64 - i32.const 15 + i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -187,9 +184,9 @@ if i32.const 0 i32.const 64 - i32.const 16 + i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -204,9 +201,9 @@ if i32.const 0 i32.const 64 - i32.const 22 + i32.const 24 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -216,9 +213,9 @@ if i32.const 0 i32.const 64 - i32.const 23 + i32.const 25 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -226,14 +223,14 @@ (local $0 i32) i32.const 8 call $~lib/util/runtime/allocate - i32.const 5 + i32.const 20 call $~lib/util/runtime/register local.tee $0 i32.eqz if i32.const 4 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 19 call $~lib/util/runtime/register local.set $0 end @@ -250,9 +247,9 @@ if i32.const 0 i32.const 64 - i32.const 38 + i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -262,9 +259,9 @@ if i32.const 0 i32.const 64 - i32.const 39 + i32.const 41 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -279,9 +276,9 @@ if i32.const 0 i32.const 64 - i32.const 45 + i32.const 47 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -291,9 +288,9 @@ if i32.const 0 i32.const 64 - i32.const 46 + i32.const 48 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -303,7 +300,7 @@ if i32.const 4 call $~lib/util/runtime/allocate - i32.const 6 + i32.const 21 call $~lib/util/runtime/register local.set $0 end @@ -317,9 +314,9 @@ if i32.const 0 i32.const 64 - i32.const 56 + i32.const 58 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -328,7 +325,7 @@ (local $0 i32) i32.const 8 call $~lib/util/runtime/allocate - i32.const 7 + i32.const 22 call $~lib/util/runtime/register call $call-super/E#constructor local.tee $0 @@ -341,9 +338,9 @@ if i32.const 0 i32.const 64 - i32.const 66 + i32.const 68 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -353,9 +350,9 @@ if i32.const 0 i32.const 64 - i32.const 67 + i32.const 69 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -363,14 +360,14 @@ (local $0 i32) i32.const 8 call $~lib/util/runtime/allocate - i32.const 9 + i32.const 24 call $~lib/util/runtime/register local.tee $0 i32.eqz if i32.const 4 call $~lib/util/runtime/allocate - i32.const 8 + i32.const 23 call $~lib/util/runtime/register local.set $0 end @@ -394,9 +391,9 @@ if i32.const 0 i32.const 64 - i32.const 84 + i32.const 86 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -406,9 +403,9 @@ if i32.const 0 i32.const 64 - i32.const 85 + i32.const 87 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -416,14 +413,14 @@ (local $0 i32) i32.const 8 call $~lib/util/runtime/allocate - i32.const 11 + i32.const 26 call $~lib/util/runtime/register local.tee $0 i32.eqz if i32.const 4 call $~lib/util/runtime/allocate - i32.const 10 + i32.const 25 call $~lib/util/runtime/register local.set $0 end @@ -447,9 +444,9 @@ if i32.const 0 i32.const 64 - i32.const 104 + i32.const 106 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -459,9 +456,9 @@ if i32.const 0 i32.const 64 - i32.const 105 + i32.const 107 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/call-super.ts b/tests/compiler/call-super.ts index aaa5a107dc..4145cbceab 100644 --- a/tests/compiler/call-super.ts +++ b/tests/compiler/call-super.ts @@ -1,3 +1,5 @@ +import "allocator/arena"; + // both constructors present class A { diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index 6bb38cec4e..8d93e72756 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -3,10 +3,10 @@ (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))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 56) "\02\00\00\00\1a\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\10\00\00\00\1a\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) @@ -16,7 +16,6 @@ (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 92)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -139,9 +138,9 @@ if i32.const 0 i32.const 16 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -156,9 +155,9 @@ if i32.const 0 i32.const 16 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -173,7 +172,7 @@ if i32.const 4 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.set $0 end @@ -189,9 +188,9 @@ if i32.const 0 i32.const 64 - i32.const 6 + i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -203,7 +202,7 @@ else i32.const 8 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register end call $call-super/A#constructor @@ -219,9 +218,9 @@ if i32.const 0 i32.const 64 - i32.const 15 + i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -232,9 +231,9 @@ if i32.const 0 i32.const 64 - i32.const 16 + i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -252,9 +251,9 @@ if i32.const 0 i32.const 64 - i32.const 22 + i32.const 24 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -265,9 +264,9 @@ if i32.const 0 i32.const 64 - i32.const 23 + i32.const 25 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -277,7 +276,7 @@ if i32.const 4 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 19 call $~lib/util/runtime/register local.set $0 end @@ -293,7 +292,7 @@ else i32.const 8 call $~lib/util/runtime/allocate - i32.const 5 + i32.const 20 call $~lib/util/runtime/register end call $call-super/C#constructor @@ -309,9 +308,9 @@ if i32.const 0 i32.const 64 - i32.const 38 + i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -322,9 +321,9 @@ if i32.const 0 i32.const 64 - i32.const 39 + i32.const 41 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -342,9 +341,9 @@ if i32.const 0 i32.const 64 - i32.const 45 + i32.const 47 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -355,9 +354,9 @@ if i32.const 0 i32.const 64 - i32.const 46 + i32.const 48 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -368,7 +367,7 @@ if i32.const 4 call $~lib/util/runtime/allocate - i32.const 6 + i32.const 21 call $~lib/util/runtime/register local.set $0 end @@ -384,9 +383,9 @@ if i32.const 0 i32.const 64 - i32.const 56 + i32.const 58 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -397,7 +396,7 @@ if i32.const 8 call $~lib/util/runtime/allocate - i32.const 7 + i32.const 22 call $~lib/util/runtime/register local.set $0 end @@ -422,9 +421,9 @@ if i32.const 0 i32.const 64 - i32.const 66 + i32.const 68 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -435,9 +434,9 @@ if i32.const 0 i32.const 64 - i32.const 67 + i32.const 69 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -447,7 +446,7 @@ if i32.const 4 call $~lib/util/runtime/allocate - i32.const 8 + i32.const 23 call $~lib/util/runtime/register local.set $0 end @@ -462,7 +461,7 @@ if i32.const 8 call $~lib/util/runtime/allocate - i32.const 9 + i32.const 24 call $~lib/util/runtime/register local.set $0 end @@ -487,9 +486,9 @@ if i32.const 0 i32.const 64 - i32.const 84 + i32.const 86 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -500,9 +499,9 @@ if i32.const 0 i32.const 64 - i32.const 85 + i32.const 87 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -512,7 +511,7 @@ if i32.const 4 call $~lib/util/runtime/allocate - i32.const 10 + i32.const 25 call $~lib/util/runtime/register local.set $0 end @@ -527,7 +526,7 @@ if i32.const 8 call $~lib/util/runtime/allocate - i32.const 11 + i32.const 26 call $~lib/util/runtime/register local.set $0 end @@ -552,9 +551,9 @@ if i32.const 0 i32.const 64 - i32.const 104 + i32.const 106 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -565,9 +564,9 @@ if i32.const 0 i32.const 64 - i32.const 105 + i32.const 107 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/class-extends.json b/tests/compiler/class-extends.json index 9e26dfeeb6..b1da366ff4 100644 --- a/tests/compiler/class-extends.json +++ b/tests/compiler/class-extends.json @@ -1 +1,5 @@ -{} \ No newline at end of file +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/class-extends.optimized.wat b/tests/compiler/class-extends.optimized.wat index 1f03bac999..38988d5695 100644 --- a/tests/compiler/class-extends.optimized.wat +++ b/tests/compiler/class-extends.optimized.wat @@ -1,46 +1,10 @@ (module (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 8) "\01\00\00\00,") - (data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 72) "\01\00\00\00(") - (data (i32.const 88) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) - (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) + (memory $0 0) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $class-extends/test)) - (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "$.flags" (func $~lib/runtime/runtime.flags)) - (export "$.newObject" (func $~lib/runtime/runtime.newObject)) - (export "$.newString" (func $~lib/runtime/runtime.newString)) - (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export "$.setArgc" (func $~lib/setargc)) - (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "$.retain" (func $~lib/runtime/runtime.retain)) - (export "$.release" (func $~lib/runtime/runtime.release)) - (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) - (start $start) - (func $class-extends/test (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $class-extends/test (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load drop @@ -54,1870 +18,7 @@ i32.const 3 i32.store16 offset=4 ) - (func $~lib/runtime/runtime.instanceof (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - if (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load - local.get $1 - call $~lib/runtime/__runtime_instanceof - else - i32.const 0 - end - ) - (func $~lib/runtime/runtime.flags (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - block $__inlined_func$~lib/runtime/__runtime_flags - block $invalid - local.get $0 - i32.const 1 - i32.sub - br_table $__inlined_func$~lib/runtime/__runtime_flags $__inlined_func$~lib/runtime/__runtime_flags $__inlined_func$~lib/runtime/__runtime_flags $invalid - end - unreachable - end - i32.const 0 - ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 159 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.get $0 - i32.add - local.get $2 - i32.store offset=4 - ) - (func $~lib/allocator/tlsf/Root#setHead (; 5 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 184 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 32 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 185 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 5 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl - local.get $0 - i32.add - local.get $3 - i32.store offset=96 - ) - (func $~lib/allocator/tlsf/Block#get:right (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const -4 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 104 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 8 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 105 - i32.const 11 - call $~lib/env/abort - unreachable - end - local.get $0 - ) - (func $~lib/allocator/tlsf/fls (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 447 - i32.const 2 - call $~lib/env/abort - unreachable - end - i32.const 31 - local.get $0 - i32.clz - i32.sub - ) - (func $~lib/allocator/tlsf/Root#getHead (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 175 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 32 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 176 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 5 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl - local.get $0 - i32.add - i32.load offset=96 - ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 153 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.get $0 - i32.add - i32.load offset=4 - ) - (func $~lib/allocator/tlsf/Root#remove (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.tee $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 277 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and - local.tee $3 - i32.const 16 - i32.ge_u - local.tee $2 - if - local.get $3 - i32.const 1073741824 - i32.lt_u - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 279 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $3 - i32.const 256 - i32.lt_u - if (result i32) - local.get $3 - i32.const 8 - i32.div_u - local.set $4 - i32.const 0 - else - local.get $3 - local.get $3 - call $~lib/allocator/tlsf/fls - local.tee $2 - i32.const 5 - i32.sub - i32.shr_u - i32.const 32 - i32.xor - local.set $4 - local.get $2 - i32.const 7 - i32.sub - end - local.set $2 - local.get $1 - i32.load offset=8 - local.set $3 - local.get $1 - i32.load offset=4 - local.tee $5 - if - local.get $5 - local.get $3 - i32.store offset=8 - end - local.get $3 - if - local.get $3 - local.get $5 - i32.store offset=4 - end - local.get $0 - local.get $2 - local.get $4 - call $~lib/allocator/tlsf/Root#getHead - local.get $1 - i32.eq - if - local.get $0 - local.get $2 - local.get $4 - local.get $3 - call $~lib/allocator/tlsf/Root#setHead - local.get $3 - i32.eqz - if - local.get $0 - local.get $2 - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const 1 - local.get $4 - i32.shl - i32.const -1 - i32.xor - i32.and - local.tee $1 - call $~lib/allocator/tlsf/Root#setSLMap - local.get $1 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $2 - i32.shl - i32.const -1 - i32.xor - i32.and - i32.store - end - end - end - ) - (func $~lib/allocator/tlsf/Block#get:left (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const 2 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 96 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 4 - i32.sub - i32.load - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 97 - i32.const 11 - call $~lib/env/abort - unreachable - end - local.get $0 - ) - (func $~lib/allocator/tlsf/Root#setJump (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 353 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - call $~lib/allocator/tlsf/Block#get:right - local.get $1 - i32.ne - if - i32.const 0 - i32.const 24 - i32.const 354 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - i32.const 2 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 355 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 4 - i32.sub - local.get $0 - i32.store - ) - (func $~lib/allocator/tlsf/Root#insert (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 208 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - local.tee $3 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 210 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - i32.const -4 - i32.and - local.tee $4 - i32.const 16 - i32.ge_u - local.tee $2 - if - local.get $4 - i32.const 1073741824 - i32.lt_u - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 212 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $2 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 216 - i32.const 23 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.load - local.tee $4 - i32.const 1 - i32.and - if - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#remove - local.get $1 - local.get $4 - i32.const -4 - i32.and - i32.const 8 - i32.add - local.get $3 - i32.add - local.tee $3 - i32.store - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $2 - i32.load - local.set $4 - end - local.get $3 - i32.const 2 - i32.and - if - local.get $1 - call $~lib/allocator/tlsf/Block#get:left - local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 230 - i32.const 24 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - local.tee $5 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 232 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#remove - local.get $1 - local.get $3 - i32.const -4 - i32.and - i32.const 8 - i32.add - local.get $5 - i32.add - local.tee $3 - i32.store - end - local.get $2 - local.get $4 - i32.const 2 - i32.or - i32.store - local.get $1 - local.get $2 - call $~lib/allocator/tlsf/Root#setJump - local.get $3 - i32.const -4 - i32.and - local.tee $3 - i32.const 16 - i32.ge_u - local.tee $2 - if - local.get $3 - i32.const 1073741824 - i32.lt_u - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 245 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $3 - i32.const 256 - i32.lt_u - if (result i32) - local.get $3 - i32.const 8 - i32.div_u - local.set $3 - i32.const 0 - else - local.get $3 - local.get $3 - call $~lib/allocator/tlsf/fls - local.tee $2 - i32.const 5 - i32.sub - i32.shr_u - i32.const 32 - i32.xor - local.set $3 - local.get $2 - i32.const 7 - i32.sub - end - local.tee $2 - local.get $3 - call $~lib/allocator/tlsf/Root#getHead - local.set $4 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $4 - i32.store offset=8 - local.get $4 - if - local.get $4 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.get $2 - local.get $3 - local.get $1 - call $~lib/allocator/tlsf/Root#setHead - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $2 - i32.shl - i32.or - i32.store - local.get $0 - local.get $2 - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const 1 - local.get $3 - i32.shl - i32.or - call $~lib/allocator/tlsf/Root#setSLMap - ) - (func $~lib/allocator/tlsf/Root#addMemory (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $2 - i32.gt_u - if - i32.const 0 - i32.const 24 - i32.const 396 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 7 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 397 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 398 - i32.const 4 - call $~lib/env/abort - unreachable - end - i32.const 2912 - i32.load - local.tee $3 - if - local.get $1 - local.get $3 - i32.const 4 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 24 - i32.const 403 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 8 - i32.sub - local.get $3 - i32.eq - if - local.get $3 - i32.load - local.set $4 - local.get $1 - i32.const 8 - i32.sub - local.set $1 - end - else - local.get $1 - local.get $0 - i32.const 2916 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 24 - i32.const 412 - i32.const 6 - call $~lib/env/abort - unreachable - end - end - local.get $2 - local.get $1 - i32.sub - local.tee $2 - i32.const 32 - i32.lt_u - if - return - end - local.get $1 - local.get $4 - i32.const 2 - i32.and - local.get $2 - i32.const 16 - i32.sub - i32.const 1 - i32.or - i32.or - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.tee $2 - i32.const 2 - i32.store - i32.const 2912 - local.get $2 - i32.store - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#insert - ) - (func $~lib/allocator/tlsf/ffs (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 441 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.ctz - ) - (func $~lib/allocator/tlsf/Root#search (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.const 16 - i32.ge_u - local.tee $2 - if - local.get $1 - i32.const 1073741824 - i32.lt_u - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 315 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 256 - i32.lt_u - if (result i32) - i32.const 0 - local.set $2 - local.get $1 - i32.const 8 - i32.div_u - else - local.get $1 - call $~lib/allocator/tlsf/fls - local.tee $3 - i32.const 7 - i32.sub - local.set $2 - local.get $1 - local.get $3 - i32.const 5 - i32.sub - i32.shr_u - i32.const 32 - i32.xor - local.tee $1 - i32.const 31 - i32.lt_u - if (result i32) - local.get $1 - i32.const 1 - i32.add - else - local.get $2 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - end - end - local.set $1 - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const -1 - local.get $1 - i32.shl - i32.and - local.tee $1 - if (result i32) - local.get $0 - local.get $2 - local.get $1 - call $~lib/allocator/tlsf/ffs - call $~lib/allocator/tlsf/Root#getHead - else - local.get $0 - i32.load - i32.const -1 - local.get $2 - i32.const 1 - i32.add - i32.shl - i32.and - local.tee $1 - if (result i32) - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/ffs - local.tee $2 - call $~lib/allocator/tlsf/Root#getSLMap - local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 342 - i32.const 16 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $2 - local.get $1 - call $~lib/allocator/tlsf/ffs - call $~lib/allocator/tlsf/Root#getHead - else - i32.const 0 - end - end - ) - (func $~lib/allocator/tlsf/Root#use (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.tee $4 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 367 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 16 - i32.ge_u - local.tee $3 - if - local.get $2 - i32.const 1073741824 - i32.lt_u - local.set $3 - end - local.get $3 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 368 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 369 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#remove - local.get $4 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $3 - i32.const 24 - i32.ge_u - if - local.get $1 - local.get $4 - i32.const 2 - i32.and - local.get $2 - i32.or - i32.store - local.get $1 - i32.const 8 - i32.add - local.get $2 - i32.add - local.tee $2 - local.get $3 - i32.const 8 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#insert - else - local.get $1 - local.get $4 - i32.const -2 - i32.and - i32.store - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 387 - i32.const 25 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $0 - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 - i32.const 8 - i32.add - ) - (func $~lib/allocator/tlsf/__mem_allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/allocator/tlsf/ROOT - local.tee $2 - i32.eqz - if - i32.const 1 - current_memory - local.tee $1 - i32.gt_s - local.tee $2 - if (result i32) - i32.const 1 - local.get $1 - i32.sub - grow_memory - i32.const 0 - i32.lt_s - else - local.get $2 - end - if - unreachable - end - i32.const 128 - local.set $2 - i32.const 128 - global.set $~lib/allocator/tlsf/ROOT - i32.const 2912 - i32.const 0 - i32.store - i32.const 128 - i32.const 0 - i32.store - i32.const 0 - local.set $1 - loop $repeat|0 - local.get $1 - i32.const 22 - i32.lt_u - if - i32.const 128 - local.get $1 - i32.const 0 - call $~lib/allocator/tlsf/Root#setSLMap - i32.const 0 - local.set $3 - loop $repeat|1 - local.get $3 - i32.const 32 - i32.lt_u - if - i32.const 128 - local.get $1 - local.get $3 - i32.const 0 - call $~lib/allocator/tlsf/Root#setHead - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $repeat|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $repeat|0 - end - end - i32.const 128 - i32.const 3048 - current_memory - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - end - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - local.get $2 - local.get $0 - i32.const 7 - i32.add - i32.const -8 - i32.and - local.tee $0 - i32.const 16 - local.get $0 - i32.const 16 - i32.gt_u - select - local.tee $1 - call $~lib/allocator/tlsf/Root#search - local.tee $0 - i32.eqz - if - current_memory - local.tee $0 - local.get $1 - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $3 - local.get $0 - local.get $3 - i32.gt_s - select - grow_memory - i32.const 0 - i32.lt_s - if - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $2 - local.get $0 - i32.const 16 - i32.shl - current_memory - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - local.get $2 - local.get $1 - call $~lib/allocator/tlsf/Root#search - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 502 - i32.const 12 - call $~lib/env/abort - unreachable - end - end - local.get $0 - i32.load - i32.const -4 - i32.and - local.get $1 - i32.lt_u - if - i32.const 0 - i32.const 24 - i32.const 505 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#use - ) - (func $~lib/util/runtime/allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 15 - i32.add - i32.clz - i32.sub - i32.shl - call $~lib/allocator/tlsf/__mem_allocate - local.tee $1 - i32.const -1520547049 - i32.store - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - ) - (func $~lib/collector/itcm/maybeInit (; 20 ;) (type $FUNCSIG$v) - (local $0 i32) - global.get $~lib/collector/itcm/state - i32.eqz - if - i32.const 16 - call $~lib/allocator/tlsf/__mem_allocate - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - local.tee $0 - i32.const -1 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - i32.const 16 - call $~lib/allocator/tlsf/__mem_allocate - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - local.tee $0 - i32.const -1 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=12 - local.set $2 - local.get $1 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.and - local.get $0 - i32.or - i32.store offset=8 - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.and - local.get $1 - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/collector/itcm/__ref_register (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) - call $~lib/collector/itcm/maybeInit - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - global.get $~lib/collector/itcm/white - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - i32.or - i32.store offset=8 - global.get $~lib/collector/itcm/fromSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - ) - (func $~lib/util/runtime/register (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - i32.const 128 - i32.le_u - if - i32.const 0 - i32.const 88 - i32.const 128 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.tee $2 - i32.load - i32.const -1520547049 - i32.ne - if - i32.const 0 - i32.const 88 - i32.const 130 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $1 - i32.store - block - local.get $0 - call $~lib/collector/itcm/__ref_register - end - local.get $0 - ) - (func $~lib/runtime/runtime.newObject (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/util/runtime/allocate - local.get $1 - call $~lib/util/runtime/register - ) - (func $~lib/runtime/runtime.newString (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/runtime/runtime.newObject - ) - (func $~lib/runtime/runtime.newArrayBuffer (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 2 - call $~lib/runtime/runtime.newObject - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/collector/itcm/iter - local.get $0 - i32.eq - if - local.get $0 - i32.load offset=12 - global.set $~lib/collector/itcm/iter - end - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.load offset=12 - local.tee $1 - i32.store offset=12 - local.get $1 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.and - local.get $2 - i32.or - i32.store offset=8 - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - i32.const 2 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/__ref_link (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - call $~lib/collector/itcm/maybeInit - global.get $~lib/collector/itcm/white - i32.eqz - local.get $1 - i32.const 16 - i32.sub - local.tee $2 - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - local.tee $1 - if (result i32) - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - else - local.get $1 - end - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/memory/memory.copy (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 - end - end - end - loop $continue|2 - local.get $2 - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|3 - end - end - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - br $continue|4 - end - end - end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - end - ) - (func $~lib/runtime/runtime.newArray (; 30 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 16 - call $~lib/util/runtime/allocate - local.get $2 - call $~lib/util/runtime/register - local.tee $2 - local.set $6 - local.get $0 - local.get $1 - i32.shl - local.tee $4 - call $~lib/util/runtime/allocate - i32.const 2 - call $~lib/util/runtime/register - local.tee $5 - local.tee $1 - local.get $2 - i32.load - i32.ne - if - local.get $1 - local.get $6 - call $~lib/collector/itcm/__ref_link - end - local.get $2 - local.get $1 - i32.store - local.get $2 - local.get $5 - i32.store offset=4 - local.get $2 - local.get $4 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=12 - local.get $3 - if - local.get $5 - local.get $3 - local.get $4 - call $~lib/memory/memory.copy - end - local.get $2 - ) - (func $~lib/runtime/runtime.retain (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/runtime/ROOT - call $~lib/collector/itcm/__ref_link - ) - (func $~lib/runtime/runtime.release (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/allocator/tlsf/__mem_free (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.tee $1 - if - local.get $0 - i32.const 8 - i32.sub - local.tee $2 - i32.load - local.tee $3 - i32.const 1 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - i32.const 1 - i32.or - i32.store - local.get $1 - local.get $0 - i32.const 8 - i32.sub - call $~lib/allocator/tlsf/Root#insert - end - end - ) - (func $~lib/collector/itcm/step (; 34 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - if - local.get $0 - i32.const 1 - i32.sub - br_table $case1|0 $case2|0 $case3|0 $break|0 - end - unreachable - end - call $~lib/runtime/__gc_mark_roots - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - end - global.get $~lib/collector/itcm/iter - i32.load offset=8 - i32.const -4 - i32.and - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - i32.or - i32.store offset=8 - block $__inlined_func$~lib/runtime/__gc_mark_members - block $invalid - local.get $0 - i32.load - i32.const 1 - i32.sub - br_table $__inlined_func$~lib/runtime/__gc_mark_members $__inlined_func$~lib/runtime/__gc_mark_members $__inlined_func$~lib/runtime/__gc_mark_members $invalid - end - unreachable - end - else - call $~lib/runtime/__gc_mark_roots - global.get $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/iter - i32.load offset=8 - i32.const -4 - i32.and - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $0 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $0 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - end - global.get $~lib/collector/itcm/iter - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - local.get $0 - i32.const 128 - i32.ge_u - if - local.get $0 - call $~lib/allocator/tlsf/__mem_free - end - else - global.get $~lib/collector/itcm/toSpace - local.tee $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - i32.const 1 - global.set $~lib/collector/itcm/state - end - end - ) - (func $~lib/collector/itcm/__ref_collect (; 35 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/maybeInit - loop $continue|0 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|0 - end - end - loop $continue|1 - call $~lib/collector/itcm/step - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - br_if $continue|1 - end - ) - (func $~lib/runtime/runtime.collect (; 36 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/__ref_collect - ) - (func $start (; 37 ;) (type $FUNCSIG$v) - i32.const 0 - call $~lib/util/runtime/allocate - i32.const 3 - call $~lib/util/runtime/register - global.set $~lib/runtime/ROOT - ) - (func $~lib/runtime/__gc_mark_roots (; 38 ;) (type $FUNCSIG$v) - (local $0 i32) - global.get $~lib/runtime/ROOT - local.tee $0 - if - call $~lib/collector/itcm/maybeInit - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end - end - ) - (func $~lib/runtime/__runtime_instanceof (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - block $nope - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/string/String - local.get $0 - i32.const 1 - i32.sub - br_table $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope - end - local.get $1 - i32.const 1 - i32.eq - return - end - local.get $1 - i32.const 2 - i32.eq - return - end - local.get $1 - i32.const 3 - i32.eq - return - end - i32.const 0 - ) - (func $null (; 40 ;) (type $FUNCSIG$v) + (func $null (; 1 ;) (type $FUNCSIG$v) nop ) - (func $~lib/runtime/runtime.newArray|trampoline (; 41 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 3 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 0 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/runtime/runtime.newArray - ) - (func $~lib/setargc (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.set $~lib/argc - ) ) diff --git a/tests/compiler/class-extends.untouched.wat b/tests/compiler/class-extends.untouched.wat index a234fbba5a..9951a96468 100644 --- a/tests/compiler/class-extends.untouched.wat +++ b/tests/compiler/class-extends.untouched.wat @@ -1,64 +1,12 @@ (module (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 8) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") - (data (i32.const 72) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) - (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) - (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) - (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) - (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) - (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) - (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) - (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) - (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) - (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) - (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) - (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) - (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) - (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) - (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) - (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) - (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) - (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 128)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $class-extends/test)) - (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "$.flags" (func $~lib/runtime/runtime.flags)) - (export "$.newObject" (func $~lib/runtime/runtime.newObject)) - (export "$.newString" (func $~lib/runtime/runtime.newString)) - (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export "$.setArgc" (func $~lib/setargc)) - (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "$.retain" (func $~lib/runtime/runtime.retain)) - (export "$.release" (func $~lib/runtime/runtime.release)) - (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) - (start $start) - (func $class-extends/test (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $class-extends/test (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load drop @@ -72,2275 +20,6 @@ i32.const 3 i32.store16 offset=4 ) - (func $~lib/runtime/runtime.instanceof (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - if (result i32) - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - i32.load - local.get $1 - call $~lib/runtime/__runtime_instanceof - else - i32.const 0 - end - ) - (func $~lib/runtime/runtime.flags (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/__runtime_flags - ) - (func $~lib/util/runtime/adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 32 - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - i32.const 1 - i32.sub - i32.clz - i32.sub - i32.shl - ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 0 - local.get $1 - i32.store offset=2912 - ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 159 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 4 - i32.mul - i32.add - local.get $2 - i32.store offset=4 - ) - (func $~lib/allocator/tlsf/Root#setHead (; 7 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 184 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 185 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.mul - local.get $2 - i32.add - i32.const 4 - i32.mul - i32.add - local.get $3 - i32.store offset=96 - ) - (func $~lib/allocator/tlsf/Root#get:tailRef (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 - i32.load offset=2912 - ) - (func $~lib/allocator/tlsf/Block#get:right (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 104 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.add - local.get $0 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - i32.add - local.tee $1 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 105 - i32.const 11 - call $~lib/env/abort - unreachable - else - local.get $1 - end - ) - (func $~lib/allocator/tlsf/fls (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 447 - i32.const 2 - call $~lib/env/abort - unreachable - end - i32.const 31 - local.get $0 - i32.clz - i32.sub - ) - (func $~lib/allocator/tlsf/Root#getHead (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 175 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 176 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.mul - local.get $2 - i32.add - i32.const 4 - i32.mul - i32.add - i32.load offset=96 - ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 153 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 4 - i32.mul - i32.add - i32.load offset=4 - ) - (func $~lib/allocator/tlsf/Root#remove (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 - i32.load - local.set $2 - local.get $2 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 277 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $4 - if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $4 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 279 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $3 - global.get $~lib/allocator/tlsf/SB_SIZE - i32.lt_u - if - i32.const 0 - local.set $5 - local.get $3 - i32.const 8 - i32.div_u - local.set $6 - else - local.get $3 - call $~lib/allocator/tlsf/fls - local.set $5 - local.get $3 - local.get $5 - global.get $~lib/allocator/tlsf/SL_BITS - i32.sub - i32.shr_u - i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS - i32.shl - i32.xor - local.set $6 - local.get $5 - global.get $~lib/allocator/tlsf/SB_BITS - i32.const 1 - i32.sub - i32.sub - local.set $5 - end - local.get $1 - i32.load offset=4 - local.set $7 - local.get $1 - i32.load offset=8 - local.set $8 - local.get $7 - if - local.get $7 - local.get $8 - i32.store offset=8 - end - local.get $8 - if - local.get $8 - local.get $7 - i32.store offset=4 - end - local.get $1 - local.get $0 - local.get $5 - local.get $6 - call $~lib/allocator/tlsf/Root#getHead - i32.eq - if - local.get $0 - local.get $5 - local.get $6 - local.get $8 - call $~lib/allocator/tlsf/Root#setHead - local.get $8 - i32.eqz - if - local.get $0 - local.get $5 - call $~lib/allocator/tlsf/Root#getSLMap - local.set $4 - local.get $0 - local.get $5 - local.get $4 - i32.const 1 - local.get $6 - i32.shl - i32.const -1 - i32.xor - i32.and - local.tee $4 - call $~lib/allocator/tlsf/Root#setSLMap - local.get $4 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $5 - i32.shl - i32.const -1 - i32.xor - i32.and - i32.store - end - end - end - ) - (func $~lib/allocator/tlsf/Block#get:left (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 96 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 4 - i32.sub - i32.load - local.tee $1 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 97 - i32.const 11 - call $~lib/env/abort - unreachable - else - local.get $1 - end - ) - (func $~lib/allocator/tlsf/Root#setJump (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - i32.load - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 353 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.get $2 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 354 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 355 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 4 - i32.sub - local.get $1 - i32.store - ) - (func $~lib/allocator/tlsf/Root#insert (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 208 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - local.set $2 - local.get $2 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 210 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.tee $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $4 - if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $4 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 212 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 216 - i32.const 23 - call $~lib/env/abort - unreachable - else - local.get $4 - end - local.set $5 - local.get $5 - i32.load - local.set $6 - local.get $6 - global.get $~lib/allocator/tlsf/FREE - i32.and - if - local.get $0 - local.get $5 - call $~lib/allocator/tlsf/Root#remove - local.get $1 - local.get $2 - global.get $~lib/allocator/tlsf/Block.INFO - local.get $6 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - i32.add - i32.add - local.tee $2 - i32.store - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.set $5 - local.get $5 - i32.load - local.set $6 - end - local.get $2 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - if - local.get $1 - call $~lib/allocator/tlsf/Block#get:left - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 230 - i32.const 24 - call $~lib/env/abort - unreachable - else - local.get $4 - end - local.set $4 - local.get $4 - i32.load - local.set $7 - local.get $7 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 232 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $4 - call $~lib/allocator/tlsf/Root#remove - local.get $4 - local.get $7 - global.get $~lib/allocator/tlsf/Block.INFO - local.get $2 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - i32.add - i32.add - local.tee $7 - i32.store - local.get $4 - local.set $1 - local.get $7 - local.set $2 - end - local.get $5 - local.get $6 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.or - i32.store - local.get $0 - local.get $1 - local.get $5 - call $~lib/allocator/tlsf/Root#setJump - local.get $2 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $7 - if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $7 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 245 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $3 - global.get $~lib/allocator/tlsf/SB_SIZE - i32.lt_u - if - i32.const 0 - local.set $8 - local.get $3 - i32.const 8 - i32.div_u - local.set $9 - else - local.get $3 - call $~lib/allocator/tlsf/fls - local.set $8 - local.get $3 - local.get $8 - global.get $~lib/allocator/tlsf/SL_BITS - i32.sub - i32.shr_u - i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS - i32.shl - i32.xor - local.set $9 - local.get $8 - global.get $~lib/allocator/tlsf/SB_BITS - i32.const 1 - i32.sub - i32.sub - local.set $8 - end - local.get $0 - local.get $8 - local.get $9 - call $~lib/allocator/tlsf/Root#getHead - local.set $10 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $10 - i32.store offset=8 - local.get $10 - if - local.get $10 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.get $8 - local.get $9 - local.get $1 - call $~lib/allocator/tlsf/Root#setHead - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $8 - i32.shl - i32.or - i32.store - local.get $0 - local.get $8 - local.get $0 - local.get $8 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const 1 - local.get $9 - i32.shl - i32.or - call $~lib/allocator/tlsf/Root#setSLMap - ) - (func $~lib/allocator/tlsf/Root#addMemory (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 - local.get $2 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 396 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 397 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 398 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - call $~lib/allocator/tlsf/Root#get:tailRef - local.set $3 - i32.const 0 - local.set $4 - local.get $3 - if - local.get $1 - local.get $3 - i32.const 4 - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 403 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.get $3 - i32.eq - if - local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.set $1 - local.get $3 - i32.load - local.set $4 - end - else - local.get $1 - local.get $0 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 412 - i32.const 6 - call $~lib/env/abort - unreachable - end - end - local.get $2 - local.get $1 - i32.sub - local.set $5 - local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.add - global.get $~lib/allocator/tlsf/Block.INFO - i32.add - i32.lt_u - if - i32.const 0 - return - end - local.get $5 - i32.const 2 - global.get $~lib/allocator/tlsf/Block.INFO - i32.mul - i32.sub - local.set $6 - local.get $1 - local.set $7 - local.get $7 - local.get $6 - global.get $~lib/allocator/tlsf/FREE - i32.or - local.get $4 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - i32.or - i32.store - local.get $7 - i32.const 0 - i32.store offset=4 - local.get $7 - i32.const 0 - i32.store offset=8 - local.get $1 - local.get $5 - i32.add - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.set $8 - local.get $8 - i32.const 0 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.or - i32.store - local.get $0 - local.get $8 - call $~lib/allocator/tlsf/Root#set:tailRef - local.get $0 - local.get $7 - call $~lib/allocator/tlsf/Root#insert - i32.const 1 - ) - (func $~lib/allocator/tlsf/ffs (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 441 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.ctz - ) - (func $~lib/allocator/tlsf/ffs (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 441 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.ctz - ) - (func $~lib/allocator/tlsf/Root#search (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $1 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $2 - if (result i32) - local.get $1 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $2 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 315 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - global.get $~lib/allocator/tlsf/SB_SIZE - i32.lt_u - if - i32.const 0 - local.set $3 - local.get $1 - i32.const 8 - i32.div_u - local.set $4 - else - local.get $1 - call $~lib/allocator/tlsf/fls - local.set $3 - local.get $1 - local.get $3 - global.get $~lib/allocator/tlsf/SL_BITS - i32.sub - i32.shr_u - i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS - i32.shl - i32.xor - local.set $4 - local.get $3 - global.get $~lib/allocator/tlsf/SB_BITS - i32.const 1 - i32.sub - i32.sub - local.set $3 - local.get $4 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.const 1 - i32.sub - i32.lt_u - if - local.get $4 - i32.const 1 - i32.add - local.set $4 - else - local.get $3 - i32.const 1 - i32.add - local.set $3 - i32.const 0 - local.set $4 - end - end - local.get $0 - local.get $3 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const 0 - i32.const -1 - i32.xor - local.get $4 - i32.shl - i32.and - local.set $5 - local.get $5 - i32.eqz - if - local.get $0 - i32.load - i32.const 0 - i32.const -1 - i32.xor - local.get $3 - i32.const 1 - i32.add - i32.shl - i32.and - local.set $2 - local.get $2 - i32.eqz - if - i32.const 0 - local.set $6 - else - local.get $2 - call $~lib/allocator/tlsf/ffs - local.set $3 - local.get $0 - local.get $3 - call $~lib/allocator/tlsf/Root#getSLMap - local.tee $7 - if (result i32) - local.get $7 - else - i32.const 0 - i32.const 24 - i32.const 342 - i32.const 16 - call $~lib/env/abort - unreachable - end - local.set $5 - local.get $0 - local.get $3 - local.get $5 - call $~lib/allocator/tlsf/ffs - call $~lib/allocator/tlsf/Root#getHead - local.set $6 - end - else - local.get $0 - local.get $3 - local.get $5 - call $~lib/allocator/tlsf/ffs - call $~lib/allocator/tlsf/Root#getHead - local.set $6 - end - local.get $6 - ) - (func $~lib/allocator/tlsf/Root#use (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 367 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $4 - if (result i32) - local.get $2 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $4 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 368 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 369 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#remove - local.get $3 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.sub - local.set $5 - local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.add - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - i32.or - i32.store - local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO - i32.add - local.get $2 - i32.add - local.set $4 - local.get $4 - local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - global.get $~lib/allocator/tlsf/FREE - i32.or - i32.store - local.get $0 - local.get $4 - call $~lib/allocator/tlsf/Root#insert - else - local.get $1 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.const -1 - i32.xor - i32.and - i32.store - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 387 - i32.const 25 - call $~lib/env/abort - unreachable - else - local.get $4 - end - local.set $4 - local.get $4 - local.get $4 - i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.const -1 - i32.xor - i32.and - i32.store - end - local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO - i32.add - ) - (func $~lib/allocator/tlsf/__mem_allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - global.get $~lib/allocator/tlsf/ROOT - local.set $1 - local.get $1 - i32.eqz - if - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $2 - current_memory - local.set $3 - local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $4 - local.get $4 - local.get $3 - i32.gt_s - local.tee $5 - if (result i32) - local.get $4 - local.get $3 - i32.sub - grow_memory - i32.const 0 - i32.lt_s - else - local.get $5 - end - if - unreachable - end - local.get $2 - local.tee $1 - global.set $~lib/allocator/tlsf/ROOT - local.get $1 - i32.const 0 - call $~lib/allocator/tlsf/Root#set:tailRef - local.get $1 - i32.const 0 - i32.store - block $break|0 - i32.const 0 - local.set $5 - loop $repeat|0 - local.get $5 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - br_if $break|0 - block - local.get $1 - local.get $5 - i32.const 0 - call $~lib/allocator/tlsf/Root#setSLMap - block $break|1 - i32.const 0 - local.set $6 - loop $repeat|1 - local.get $6 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u - i32.eqz - br_if $break|1 - local.get $1 - local.get $5 - local.get $6 - i32.const 0 - call $~lib/allocator/tlsf/Root#setHead - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $repeat|1 - unreachable - end - unreachable - end - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $repeat|0 - unreachable - end - unreachable - end - local.get $1 - local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - current_memory - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - drop - end - local.get $0 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.gt_u - if - unreachable - end - local.get $0 - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.tee $4 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - local.tee $3 - local.get $4 - local.get $3 - i32.gt_u - select - local.set $0 - local.get $1 - local.get $0 - call $~lib/allocator/tlsf/Root#search - local.set $7 - local.get $7 - i32.eqz - if - current_memory - local.set $4 - local.get $0 - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $3 - local.get $4 - local.tee $2 - local.get $3 - local.tee $5 - local.get $2 - local.get $5 - i32.gt_s - select - local.set $2 - local.get $2 - grow_memory - i32.const 0 - i32.lt_s - if - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - current_memory - local.set $5 - local.get $1 - local.get $4 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - drop - local.get $1 - local.get $0 - call $~lib/allocator/tlsf/Root#search - local.tee $6 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 502 - i32.const 12 - call $~lib/env/abort - unreachable - else - local.get $6 - end - local.set $7 - end - local.get $7 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.get $0 - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 505 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $1 - local.get $7 - local.get $0 - call $~lib/allocator/tlsf/Root#use - ) - (func $~lib/memory/memory.allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/tlsf/__mem_allocate - return - ) - (func $~lib/util/runtime/allocate (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - call $~lib/util/runtime/adjust - call $~lib/memory/memory.allocate - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_MAGIC - i32.store - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - ) - (func $~lib/collector/itcm/ManagedObjectList#clear (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - ) - (func $~lib/collector/itcm/maybeInit (; 26 ;) (type $FUNCSIG$v) - global.get $~lib/collector/itcm/state - i32.const 0 - i32.eq - if - global.get $~lib/util/runtime/HEADER_SIZE - call $~lib/memory/memory.allocate - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - i32.const -1 - i32.store - global.get $~lib/collector/itcm/fromSpace - i32.const 0 - i32.store offset=4 - global.get $~lib/collector/itcm/fromSpace - call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/util/runtime/HEADER_SIZE - call $~lib/memory/memory.allocate - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - i32.const -1 - i32.store - global.get $~lib/collector/itcm/toSpace - i32.const 0 - i32.store offset=4 - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - ) - (func $~lib/collector/itcm/ManagedObject#set:color (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $1 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.and - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=12 - local.set $2 - local.get $1 - local.get $0 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/collector/itcm/__ref_register (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - call $~lib/collector/itcm/maybeInit - block $~lib/collector/itcm/refToObj|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - end - local.set $2 - local.get $2 - global.get $~lib/collector/itcm/white - call $~lib/collector/itcm/ManagedObject#set:color - global.get $~lib/collector/itcm/fromSpace - local.get $2 - call $~lib/collector/itcm/ManagedObjectList#push - ) - (func $~lib/util/runtime/register (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 88 - i32.const 128 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - local.set $2 - local.get $2 - i32.load - global.get $~lib/util/runtime/HEADER_MAGIC - i32.eq - i32.eqz - if - i32.const 0 - i32.const 88 - i32.const 130 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $1 - i32.store - local.get $0 - call $~lib/collector/itcm/__ref_register - local.get $0 - ) - (func $~lib/runtime/runtime.newObject (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/util/runtime/allocate - local.get $1 - call $~lib/util/runtime/register - ) - (func $~lib/runtime/runtime.newString (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/runtime/runtime.newObject - ) - (func $~lib/runtime/runtime.newArrayBuffer (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 2 - call $~lib/runtime/runtime.newObject - ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 - i32.const 3 - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 - i32.const 3 - i32.const -1 - i32.xor - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - local.set $1 - local.get $0 - i32.load offset=12 - local.set $2 - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/collector/itcm/iter - i32.eq - if - local.get $0 - i32.load offset=12 - global.set $~lib/collector/itcm/iter - end - local.get $0 - call $~lib/collector/itcm/ManagedObject#unlink - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 2 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/__ref_link (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - call $~lib/collector/itcm/maybeInit - block $~lib/collector/itcm/refToObj|inlined.1 (result i32) - local.get $1 - local.set $2 - local.get $2 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - end - local.set $3 - local.get $3 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eqz - i32.eq - local.tee $2 - if (result i32) - block $~lib/collector/itcm/refToObj|inlined.3 (result i32) - local.get $0 - local.set $2 - local.get $2 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - end - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - else - local.get $2 - end - if - local.get $3 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/memory/memory.copy (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - br $continue|1 - end - end - end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|2 - end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - end - br $continue|3 - end - end - end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 - end - end - end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - end - end - ) - (func $~lib/runtime/runtime.newArray (; 41 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - i32.const 16 - call $~lib/util/runtime/allocate - local.get $2 - call $~lib/util/runtime/register - local.set $4 - local.get $0 - local.get $1 - i32.shl - local.set $5 - local.get $5 - call $~lib/util/runtime/allocate - i32.const 2 - call $~lib/util/runtime/register - local.set $6 - local.get $4 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - i32.load - local.tee $9 - i32.ne - if (result i32) - nop - local.get $8 - local.get $7 - call $~lib/collector/itcm/__ref_link - local.get $8 - else - local.get $8 - end - i32.store - local.get $4 - local.get $6 - i32.store offset=4 - local.get $4 - local.get $5 - i32.store offset=8 - local.get $4 - local.get $0 - i32.store offset=12 - local.get $3 - if - local.get $6 - local.get $3 - local.get $5 - call $~lib/memory/memory.copy - end - local.get $4 - ) - (func $~lib/runtime/Root#constructor (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - call $~lib/util/runtime/allocate - i32.const 3 - call $~lib/util/runtime/register - local.set $0 - end - local.get $0 - ) - (func $~lib/runtime/runtime.retain (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/runtime/ROOT - call $~lib/collector/itcm/__ref_link - ) - (func $~lib/runtime/runtime.release (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/allocator/tlsf/__mem_free (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.set $1 - local.get $1 - if - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.set $2 - local.get $2 - i32.load - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.or - i32.store - local.get $1 - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - call $~lib/allocator/tlsf/Root#insert - end - end - ) - (func $~lib/memory/memory.free (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - call $~lib/allocator/tlsf/__mem_free - ) - (func $~lib/collector/itcm/step (; 47 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - block $case0|0 - global.get $~lib/collector/itcm/state - local.set $1 - local.get $1 - i32.const 0 - i32.eq - br_if $case0|0 - local.get $1 - i32.const 1 - i32.eq - br_if $case1|0 - local.get $1 - i32.const 2 - i32.eq - br_if $case2|0 - local.get $1 - i32.const 3 - i32.eq - br_if $case3|0 - br $break|0 - end - unreachable - end - block - call $~lib/runtime/__gc_mark_roots - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - call $~lib/collector/itcm/ManagedObject#set:color - local.get $0 - i32.load - block $~lib/collector/itcm/objToRef|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - end - call $~lib/runtime/__gc_mark_members - else - call $~lib/runtime/__gc_mark_roots - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $1 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $1 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $1 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.ge_u - if - local.get $0 - call $~lib/memory/memory.free - end - else - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - i32.const 1 - global.set $~lib/collector/itcm/state - end - br $break|0 - unreachable - end - unreachable - end - ) - (func $~lib/collector/itcm/__ref_collect (; 48 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/maybeInit - block $break|0 - loop $continue|0 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - call $~lib/collector/itcm/step - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - br_if $continue|1 - end - end - ) - (func $~lib/runtime/runtime.collect (; 49 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/__ref_collect - ) - (func $~lib/runtime/runtime#constructor (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - unreachable - ) - (func $start (; 51 ;) (type $FUNCSIG$v) - i32.const 0 - call $~lib/runtime/Root#constructor - global.set $~lib/runtime/ROOT - ) - (func $~lib/collector/itcm/__ref_mark (; 52 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - call $~lib/collector/itcm/maybeInit - block $~lib/collector/itcm/refToObj|inlined.4 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - end - local.set $2 - local.get $2 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/runtime/__gc_mark_roots (; 53 ;) (type $FUNCSIG$v) - (local $0 i32) - global.get $~lib/runtime/ROOT - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - ) - (func $~lib/runtime/__gc_mark_members (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - block $invalid - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/string/String - local.get $0 - br_table $invalid $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid - end - return - end - return - end - return - end - unreachable - ) - (func $~lib/runtime/__runtime_instanceof (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - block $nope - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/string/String - local.get $0 - br_table $nope $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope - end - local.get $1 - i32.const 1 - i32.eq - return - end - local.get $1 - i32.const 2 - i32.eq - return - end - local.get $1 - i32.const 3 - i32.eq - return - end - i32.const 0 - return - ) - (func $~lib/runtime/__runtime_flags (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - block $invalid - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/string/String - local.get $0 - br_table $invalid $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid - end - i32.const 0 - return - end - i32.const 0 - return - end - i32.const 0 - return - end - unreachable - ) - (func $null (; 57 ;) (type $FUNCSIG$v) - ) - (func $~lib/runtime/runtime.newArray|trampoline (; 58 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 3 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 0 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/runtime/runtime.newArray - ) - (func $~lib/setargc (; 59 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.set $~lib/argc + (func $null (; 1 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/class-overloading.optimized.wat b/tests/compiler/class-overloading.optimized.wat index cf31b250ca..763941477c 100644 --- a/tests/compiler/class-overloading.optimized.wat +++ b/tests/compiler/class-overloading.optimized.wat @@ -2,10 +2,7 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $class-overloading/test)) (func $class-overloading/test (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) nop diff --git a/tests/compiler/class-overloading.untouched.wat b/tests/compiler/class-overloading.untouched.wat index e81b67a4cc..c529e9a5a5 100644 --- a/tests/compiler/class-overloading.untouched.wat +++ b/tests/compiler/class-overloading.untouched.wat @@ -4,9 +4,7 @@ (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $class-overloading/test)) (start $start) (func $class-overloading/Foo#baz (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) diff --git a/tests/compiler/class.json b/tests/compiler/class.json index 9e26dfeeb6..b1da366ff4 100644 --- a/tests/compiler/class.json +++ b/tests/compiler/class.json @@ -1 +1,5 @@ -{} \ No newline at end of file +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index bb717647a2..67d5e53425 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -1,48 +1,11 @@ (module - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\10") - (data (i32.const 24) "c\00l\00a\00s\00s\00.\00t\00s") - (data (i32.const 40) "\01\00\00\00,") - (data (i32.const 56) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 104) "\01\00\00\00(") - (data (i32.const 120) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) - (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) + (data (i32.const 8) "\10\00\00\00\10\00\00\00c\00l\00a\00s\00s\00.\00t\00s") (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $class/test)) - (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "$.flags" (func $~lib/runtime/runtime.flags)) - (export "$.newObject" (func $~lib/runtime/runtime.newObject)) - (export "$.newString" (func $~lib/runtime/runtime.newString)) - (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export "$.setArgc" (func $~lib/setargc)) - (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "$.retain" (func $~lib/runtime/runtime.retain)) - (export "$.release" (func $~lib/runtime/runtime.release)) - (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) - (start $start) - (func $class/test (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $class/test (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load drop @@ -63,1870 +26,7 @@ i32.store8 offset=6 local.get $0 ) - (func $~lib/runtime/runtime.instanceof (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - if (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load - local.get $1 - call $~lib/runtime/__runtime_instanceof - else - i32.const 0 - end - ) - (func $~lib/runtime/runtime.flags (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - block $__inlined_func$~lib/runtime/__runtime_flags - block $invalid - local.get $0 - i32.const 1 - i32.sub - br_table $__inlined_func$~lib/runtime/__runtime_flags $__inlined_func$~lib/runtime/__runtime_flags $__inlined_func$~lib/runtime/__runtime_flags $invalid - end - unreachable - end - i32.const 0 - ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 56 - i32.const 159 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.get $0 - i32.add - local.get $2 - i32.store offset=4 - ) - (func $~lib/allocator/tlsf/Root#setHead (; 5 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 56 - i32.const 184 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 32 - i32.ge_u - if - i32.const 0 - i32.const 56 - i32.const 185 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 5 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl - local.get $0 - i32.add - local.get $3 - i32.store offset=96 - ) - (func $~lib/allocator/tlsf/Block#get:right (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const -4 - i32.and - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 104 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 8 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 105 - i32.const 11 - call $~lib/env/abort - unreachable - end - local.get $0 - ) - (func $~lib/allocator/tlsf/fls (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 447 - i32.const 2 - call $~lib/env/abort - unreachable - end - i32.const 31 - local.get $0 - i32.clz - i32.sub - ) - (func $~lib/allocator/tlsf/Root#getHead (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 56 - i32.const 175 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 32 - i32.ge_u - if - i32.const 0 - i32.const 56 - i32.const 176 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 5 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl - local.get $0 - i32.add - i32.load offset=96 - ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 56 - i32.const 153 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.get $0 - i32.add - i32.load offset=4 - ) - (func $~lib/allocator/tlsf/Root#remove (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.tee $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 277 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and - local.tee $3 - i32.const 16 - i32.ge_u - local.tee $2 - if - local.get $3 - i32.const 1073741824 - i32.lt_u - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 279 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $3 - i32.const 256 - i32.lt_u - if (result i32) - local.get $3 - i32.const 8 - i32.div_u - local.set $4 - i32.const 0 - else - local.get $3 - local.get $3 - call $~lib/allocator/tlsf/fls - local.tee $2 - i32.const 5 - i32.sub - i32.shr_u - i32.const 32 - i32.xor - local.set $4 - local.get $2 - i32.const 7 - i32.sub - end - local.set $2 - local.get $1 - i32.load offset=8 - local.set $3 - local.get $1 - i32.load offset=4 - local.tee $5 - if - local.get $5 - local.get $3 - i32.store offset=8 - end - local.get $3 - if - local.get $3 - local.get $5 - i32.store offset=4 - end - local.get $0 - local.get $2 - local.get $4 - call $~lib/allocator/tlsf/Root#getHead - local.get $1 - i32.eq - if - local.get $0 - local.get $2 - local.get $4 - local.get $3 - call $~lib/allocator/tlsf/Root#setHead - local.get $3 - i32.eqz - if - local.get $0 - local.get $2 - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const 1 - local.get $4 - i32.shl - i32.const -1 - i32.xor - i32.and - local.tee $1 - call $~lib/allocator/tlsf/Root#setSLMap - local.get $1 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $2 - i32.shl - i32.const -1 - i32.xor - i32.and - i32.store - end - end - end - ) - (func $~lib/allocator/tlsf/Block#get:left (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const 2 - i32.and - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 96 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 4 - i32.sub - i32.load - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 97 - i32.const 11 - call $~lib/env/abort - unreachable - end - local.get $0 - ) - (func $~lib/allocator/tlsf/Root#setJump (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 353 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - call $~lib/allocator/tlsf/Block#get:right - local.get $1 - i32.ne - if - i32.const 0 - i32.const 56 - i32.const 354 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - i32.const 2 - i32.and - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 355 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 4 - i32.sub - local.get $0 - i32.store - ) - (func $~lib/allocator/tlsf/Root#insert (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 208 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - local.tee $3 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 210 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - i32.const -4 - i32.and - local.tee $4 - i32.const 16 - i32.ge_u - local.tee $2 - if - local.get $4 - i32.const 1073741824 - i32.lt_u - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 212 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $2 - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 216 - i32.const 23 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.load - local.tee $4 - i32.const 1 - i32.and - if - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#remove - local.get $1 - local.get $4 - i32.const -4 - i32.and - i32.const 8 - i32.add - local.get $3 - i32.add - local.tee $3 - i32.store - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $2 - i32.load - local.set $4 - end - local.get $3 - i32.const 2 - i32.and - if - local.get $1 - call $~lib/allocator/tlsf/Block#get:left - local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 230 - i32.const 24 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - local.tee $5 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 232 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#remove - local.get $1 - local.get $3 - i32.const -4 - i32.and - i32.const 8 - i32.add - local.get $5 - i32.add - local.tee $3 - i32.store - end - local.get $2 - local.get $4 - i32.const 2 - i32.or - i32.store - local.get $1 - local.get $2 - call $~lib/allocator/tlsf/Root#setJump - local.get $3 - i32.const -4 - i32.and - local.tee $3 - i32.const 16 - i32.ge_u - local.tee $2 - if - local.get $3 - i32.const 1073741824 - i32.lt_u - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 245 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $3 - i32.const 256 - i32.lt_u - if (result i32) - local.get $3 - i32.const 8 - i32.div_u - local.set $3 - i32.const 0 - else - local.get $3 - local.get $3 - call $~lib/allocator/tlsf/fls - local.tee $2 - i32.const 5 - i32.sub - i32.shr_u - i32.const 32 - i32.xor - local.set $3 - local.get $2 - i32.const 7 - i32.sub - end - local.tee $2 - local.get $3 - call $~lib/allocator/tlsf/Root#getHead - local.set $4 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $4 - i32.store offset=8 - local.get $4 - if - local.get $4 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.get $2 - local.get $3 - local.get $1 - call $~lib/allocator/tlsf/Root#setHead - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $2 - i32.shl - i32.or - i32.store - local.get $0 - local.get $2 - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const 1 - local.get $3 - i32.shl - i32.or - call $~lib/allocator/tlsf/Root#setSLMap - ) - (func $~lib/allocator/tlsf/Root#addMemory (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $2 - i32.gt_u - if - i32.const 0 - i32.const 56 - i32.const 396 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 7 - i32.and - if - i32.const 0 - i32.const 56 - i32.const 397 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - if - i32.const 0 - i32.const 56 - i32.const 398 - i32.const 4 - call $~lib/env/abort - unreachable - end - i32.const 2912 - i32.load - local.tee $3 - if - local.get $1 - local.get $3 - i32.const 4 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 56 - i32.const 403 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 8 - i32.sub - local.get $3 - i32.eq - if - local.get $3 - i32.load - local.set $4 - local.get $1 - i32.const 8 - i32.sub - local.set $1 - end - else - local.get $1 - local.get $0 - i32.const 2916 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 56 - i32.const 412 - i32.const 6 - call $~lib/env/abort - unreachable - end - end - local.get $2 - local.get $1 - i32.sub - local.tee $2 - i32.const 32 - i32.lt_u - if - return - end - local.get $1 - local.get $4 - i32.const 2 - i32.and - local.get $2 - i32.const 16 - i32.sub - i32.const 1 - i32.or - i32.or - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.tee $2 - i32.const 2 - i32.store - i32.const 2912 - local.get $2 - i32.store - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#insert - ) - (func $~lib/allocator/tlsf/ffs (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 441 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.ctz - ) - (func $~lib/allocator/tlsf/Root#search (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.const 16 - i32.ge_u - local.tee $2 - if - local.get $1 - i32.const 1073741824 - i32.lt_u - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 315 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 256 - i32.lt_u - if (result i32) - i32.const 0 - local.set $2 - local.get $1 - i32.const 8 - i32.div_u - else - local.get $1 - call $~lib/allocator/tlsf/fls - local.tee $3 - i32.const 7 - i32.sub - local.set $2 - local.get $1 - local.get $3 - i32.const 5 - i32.sub - i32.shr_u - i32.const 32 - i32.xor - local.tee $1 - i32.const 31 - i32.lt_u - if (result i32) - local.get $1 - i32.const 1 - i32.add - else - local.get $2 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - end - end - local.set $1 - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const -1 - local.get $1 - i32.shl - i32.and - local.tee $1 - if (result i32) - local.get $0 - local.get $2 - local.get $1 - call $~lib/allocator/tlsf/ffs - call $~lib/allocator/tlsf/Root#getHead - else - local.get $0 - i32.load - i32.const -1 - local.get $2 - i32.const 1 - i32.add - i32.shl - i32.and - local.tee $1 - if (result i32) - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/ffs - local.tee $2 - call $~lib/allocator/tlsf/Root#getSLMap - local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 342 - i32.const 16 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $2 - local.get $1 - call $~lib/allocator/tlsf/ffs - call $~lib/allocator/tlsf/Root#getHead - else - i32.const 0 - end - end - ) - (func $~lib/allocator/tlsf/Root#use (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.tee $4 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 367 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 16 - i32.ge_u - local.tee $3 - if - local.get $2 - i32.const 1073741824 - i32.lt_u - local.set $3 - end - local.get $3 - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 368 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - if - i32.const 0 - i32.const 56 - i32.const 369 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#remove - local.get $4 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $3 - i32.const 24 - i32.ge_u - if - local.get $1 - local.get $4 - i32.const 2 - i32.and - local.get $2 - i32.or - i32.store - local.get $1 - i32.const 8 - i32.add - local.get $2 - i32.add - local.tee $2 - local.get $3 - i32.const 8 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#insert - else - local.get $1 - local.get $4 - i32.const -2 - i32.and - i32.store - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 387 - i32.const 25 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $0 - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 - i32.const 8 - i32.add - ) - (func $~lib/allocator/tlsf/__mem_allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/allocator/tlsf/ROOT - local.tee $2 - i32.eqz - if - i32.const 1 - current_memory - local.tee $1 - i32.gt_s - local.tee $2 - if (result i32) - i32.const 1 - local.get $1 - i32.sub - grow_memory - i32.const 0 - i32.lt_s - else - local.get $2 - end - if - unreachable - end - i32.const 160 - local.set $2 - i32.const 160 - global.set $~lib/allocator/tlsf/ROOT - i32.const 2912 - i32.const 0 - i32.store - i32.const 160 - i32.const 0 - i32.store - i32.const 0 - local.set $1 - loop $repeat|0 - local.get $1 - i32.const 22 - i32.lt_u - if - i32.const 160 - local.get $1 - i32.const 0 - call $~lib/allocator/tlsf/Root#setSLMap - i32.const 0 - local.set $3 - loop $repeat|1 - local.get $3 - i32.const 32 - i32.lt_u - if - i32.const 160 - local.get $1 - local.get $3 - i32.const 0 - call $~lib/allocator/tlsf/Root#setHead - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $repeat|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $repeat|0 - end - end - i32.const 160 - i32.const 3080 - current_memory - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - end - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - local.get $2 - local.get $0 - i32.const 7 - i32.add - i32.const -8 - i32.and - local.tee $0 - i32.const 16 - local.get $0 - i32.const 16 - i32.gt_u - select - local.tee $1 - call $~lib/allocator/tlsf/Root#search - local.tee $0 - i32.eqz - if - current_memory - local.tee $0 - local.get $1 - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $3 - local.get $0 - local.get $3 - i32.gt_s - select - grow_memory - i32.const 0 - i32.lt_s - if - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $2 - local.get $0 - i32.const 16 - i32.shl - current_memory - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - local.get $2 - local.get $1 - call $~lib/allocator/tlsf/Root#search - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 502 - i32.const 12 - call $~lib/env/abort - unreachable - end - end - local.get $0 - i32.load - i32.const -4 - i32.and - local.get $1 - i32.lt_u - if - i32.const 0 - i32.const 56 - i32.const 505 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#use - ) - (func $~lib/util/runtime/allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 15 - i32.add - i32.clz - i32.sub - i32.shl - call $~lib/allocator/tlsf/__mem_allocate - local.tee $1 - i32.const -1520547049 - i32.store - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - ) - (func $~lib/collector/itcm/maybeInit (; 20 ;) (type $FUNCSIG$v) - (local $0 i32) - global.get $~lib/collector/itcm/state - i32.eqz - if - i32.const 16 - call $~lib/allocator/tlsf/__mem_allocate - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - local.tee $0 - i32.const -1 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - i32.const 16 - call $~lib/allocator/tlsf/__mem_allocate - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - local.tee $0 - i32.const -1 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=12 - local.set $2 - local.get $1 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.and - local.get $0 - i32.or - i32.store offset=8 - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.and - local.get $1 - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/collector/itcm/__ref_register (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) - call $~lib/collector/itcm/maybeInit - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - global.get $~lib/collector/itcm/white - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - i32.or - i32.store offset=8 - global.get $~lib/collector/itcm/fromSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - ) - (func $~lib/util/runtime/register (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - i32.const 160 - i32.le_u - if - i32.const 0 - i32.const 120 - i32.const 128 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.tee $2 - i32.load - i32.const -1520547049 - i32.ne - if - i32.const 0 - i32.const 120 - i32.const 130 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $1 - i32.store - block - local.get $0 - call $~lib/collector/itcm/__ref_register - end - local.get $0 - ) - (func $~lib/runtime/runtime.newObject (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/util/runtime/allocate - local.get $1 - call $~lib/util/runtime/register - ) - (func $~lib/runtime/runtime.newString (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/runtime/runtime.newObject - ) - (func $~lib/runtime/runtime.newArrayBuffer (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 2 - call $~lib/runtime/runtime.newObject - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/collector/itcm/iter - local.get $0 - i32.eq - if - local.get $0 - i32.load offset=12 - global.set $~lib/collector/itcm/iter - end - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.load offset=12 - local.tee $1 - i32.store offset=12 - local.get $1 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.and - local.get $2 - i32.or - i32.store offset=8 - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - i32.const 2 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/__ref_link (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - call $~lib/collector/itcm/maybeInit - global.get $~lib/collector/itcm/white - i32.eqz - local.get $1 - i32.const 16 - i32.sub - local.tee $2 - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - local.tee $1 - if (result i32) - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - else - local.get $1 - end - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/memory/memory.copy (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 - end - end - end - loop $continue|2 - local.get $2 - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|3 - end - end - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - br $continue|4 - end - end - end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - end - ) - (func $~lib/runtime/runtime.newArray (; 30 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 16 - call $~lib/util/runtime/allocate - local.get $2 - call $~lib/util/runtime/register - local.tee $2 - local.set $6 - local.get $0 - local.get $1 - i32.shl - local.tee $4 - call $~lib/util/runtime/allocate - i32.const 2 - call $~lib/util/runtime/register - local.tee $5 - local.tee $1 - local.get $2 - i32.load - i32.ne - if - local.get $1 - local.get $6 - call $~lib/collector/itcm/__ref_link - end - local.get $2 - local.get $1 - i32.store - local.get $2 - local.get $5 - i32.store offset=4 - local.get $2 - local.get $4 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=12 - local.get $3 - if - local.get $5 - local.get $3 - local.get $4 - call $~lib/memory/memory.copy - end - local.get $2 - ) - (func $~lib/runtime/runtime.retain (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/runtime/ROOT - call $~lib/collector/itcm/__ref_link - ) - (func $~lib/runtime/runtime.release (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $start (; 1 ;) (type $FUNCSIG$v) nop ) - (func $~lib/allocator/tlsf/__mem_free (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.tee $1 - if - local.get $0 - i32.const 8 - i32.sub - local.tee $2 - i32.load - local.tee $3 - i32.const 1 - i32.and - if - i32.const 0 - i32.const 56 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - i32.const 1 - i32.or - i32.store - local.get $1 - local.get $0 - i32.const 8 - i32.sub - call $~lib/allocator/tlsf/Root#insert - end - end - ) - (func $~lib/collector/itcm/step (; 34 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - if - local.get $0 - i32.const 1 - i32.sub - br_table $case1|0 $case2|0 $case3|0 $break|0 - end - unreachable - end - call $~lib/runtime/__gc_mark_roots - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - end - global.get $~lib/collector/itcm/iter - i32.load offset=8 - i32.const -4 - i32.and - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - i32.or - i32.store offset=8 - block $__inlined_func$~lib/runtime/__gc_mark_members - block $invalid - local.get $0 - i32.load - i32.const 1 - i32.sub - br_table $__inlined_func$~lib/runtime/__gc_mark_members $__inlined_func$~lib/runtime/__gc_mark_members $__inlined_func$~lib/runtime/__gc_mark_members $invalid - end - unreachable - end - else - call $~lib/runtime/__gc_mark_roots - global.get $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/iter - i32.load offset=8 - i32.const -4 - i32.and - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $0 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $0 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - end - global.get $~lib/collector/itcm/iter - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - local.get $0 - i32.const 160 - i32.ge_u - if - local.get $0 - call $~lib/allocator/tlsf/__mem_free - end - else - global.get $~lib/collector/itcm/toSpace - local.tee $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - i32.const 1 - global.set $~lib/collector/itcm/state - end - end - ) - (func $~lib/collector/itcm/__ref_collect (; 35 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/maybeInit - loop $continue|0 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|0 - end - end - loop $continue|1 - call $~lib/collector/itcm/step - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - br_if $continue|1 - end - ) - (func $~lib/runtime/runtime.collect (; 36 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/__ref_collect - ) - (func $start (; 37 ;) (type $FUNCSIG$v) - i32.const 0 - call $~lib/util/runtime/allocate - i32.const 3 - call $~lib/util/runtime/register - global.set $~lib/runtime/ROOT - ) - (func $~lib/runtime/__gc_mark_roots (; 38 ;) (type $FUNCSIG$v) - (local $0 i32) - global.get $~lib/runtime/ROOT - local.tee $0 - if - call $~lib/collector/itcm/maybeInit - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end - end - ) - (func $~lib/runtime/__runtime_instanceof (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - block $nope - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/string/String - local.get $0 - i32.const 1 - i32.sub - br_table $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope - end - local.get $1 - i32.const 1 - i32.eq - return - end - local.get $1 - i32.const 2 - i32.eq - return - end - local.get $1 - i32.const 3 - i32.eq - return - end - i32.const 0 - ) - (func $null (; 40 ;) (type $FUNCSIG$v) - nop - ) - (func $~lib/runtime/runtime.newArray|trampoline (; 41 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 3 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 0 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/runtime/runtime.newArray - ) - (func $~lib/setargc (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.set $~lib/argc - ) ) diff --git a/tests/compiler/class.ts b/tests/compiler/class.ts index 80355753d6..0a00636ed7 100644 --- a/tests/compiler/class.ts +++ b/tests/compiler/class.ts @@ -1,3 +1,5 @@ +import "allocator/arena"; + class Animal { static ONE: i32 = 1; static add(a: i32, b: i32): i32 { return a + b + Animal.ONE; } diff --git a/tests/compiler/class.untouched.wat b/tests/compiler/class.untouched.wat index c48c2f310a..35b3696e30 100644 --- a/tests/compiler/class.untouched.wat +++ b/tests/compiler/class.untouched.wat @@ -6,61 +6,14 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$fiff (func (param i32 f32 f32) (result f32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00c\00l\00a\00s\00s\00.\00t\00s\00") - (data (i32.const 40) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") - (data (i32.const 104) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\10\00\00\00c\00l\00a\00s\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $class/Animal.ONE (mut i32) (i32.const 1)) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) - (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) - (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) - (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) - (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) - (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) - (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) - (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) - (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) - (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) - (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) - (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) - (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) - (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) - (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) - (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) - (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) - (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 160)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $class/test)) - (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "$.flags" (func $~lib/runtime/runtime.flags)) - (export "$.newObject" (func $~lib/runtime/runtime.newObject)) - (export "$.newString" (func $~lib/runtime/runtime.newString)) - (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export "$.setArgc" (func $~lib/setargc)) - (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "$.retain" (func $~lib/runtime/runtime.retain)) - (export "$.release" (func $~lib/runtime/runtime.release)) - (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $class/Animal.add (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -84,10 +37,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 13 + i32.const 16 + i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $class/Animal.ONE @@ -161,2276 +114,9 @@ local.set $2 local.get $2 ) - (func $~lib/runtime/runtime.instanceof (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - if (result i32) - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - i32.load - local.get $1 - call $~lib/runtime/__runtime_instanceof - else - i32.const 0 - end - ) - (func $~lib/runtime/runtime.flags (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/__runtime_flags - ) - (func $~lib/util/runtime/adjust (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 32 - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - i32.const 1 - i32.sub - i32.clz - i32.sub - i32.shl - ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 0 - local.get $1 - i32.store offset=2912 - ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 159 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 4 - i32.mul - i32.add - local.get $2 - i32.store offset=4 - ) - (func $~lib/allocator/tlsf/Root#setHead (; 12 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 184 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 185 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.mul - local.get $2 - i32.add - i32.const 4 - i32.mul - i32.add - local.get $3 - i32.store offset=96 - ) - (func $~lib/allocator/tlsf/Root#get:tailRef (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 - i32.load offset=2912 - ) - (func $~lib/allocator/tlsf/Block#get:right (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 104 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.add - local.get $0 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - i32.add - local.tee $1 - i32.eqz - if (result i32) - i32.const 0 - i32.const 56 - i32.const 105 - i32.const 11 - call $~lib/env/abort - unreachable - else - local.get $1 - end - ) - (func $~lib/allocator/tlsf/fls (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 447 - i32.const 2 - call $~lib/env/abort - unreachable - end - i32.const 31 - local.get $0 - i32.clz - i32.sub - ) - (func $~lib/allocator/tlsf/Root#getHead (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 175 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 176 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.mul - local.get $2 - i32.add - i32.const 4 - i32.mul - i32.add - i32.load offset=96 - ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 153 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 4 - i32.mul - i32.add - i32.load offset=4 - ) - (func $~lib/allocator/tlsf/Root#remove (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 - i32.load - local.set $2 - local.get $2 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 277 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $4 - if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $4 - end - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 279 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $3 - global.get $~lib/allocator/tlsf/SB_SIZE - i32.lt_u - if - i32.const 0 - local.set $5 - local.get $3 - i32.const 8 - i32.div_u - local.set $6 - else - local.get $3 - call $~lib/allocator/tlsf/fls - local.set $5 - local.get $3 - local.get $5 - global.get $~lib/allocator/tlsf/SL_BITS - i32.sub - i32.shr_u - i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS - i32.shl - i32.xor - local.set $6 - local.get $5 - global.get $~lib/allocator/tlsf/SB_BITS - i32.const 1 - i32.sub - i32.sub - local.set $5 - end - local.get $1 - i32.load offset=4 - local.set $7 - local.get $1 - i32.load offset=8 - local.set $8 - local.get $7 - if - local.get $7 - local.get $8 - i32.store offset=8 - end - local.get $8 - if - local.get $8 - local.get $7 - i32.store offset=4 - end - local.get $1 - local.get $0 - local.get $5 - local.get $6 - call $~lib/allocator/tlsf/Root#getHead - i32.eq - if - local.get $0 - local.get $5 - local.get $6 - local.get $8 - call $~lib/allocator/tlsf/Root#setHead - local.get $8 - i32.eqz - if - local.get $0 - local.get $5 - call $~lib/allocator/tlsf/Root#getSLMap - local.set $4 - local.get $0 - local.get $5 - local.get $4 - i32.const 1 - local.get $6 - i32.shl - i32.const -1 - i32.xor - i32.and - local.tee $4 - call $~lib/allocator/tlsf/Root#setSLMap - local.get $4 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $5 - i32.shl - i32.const -1 - i32.xor - i32.and - i32.store - end - end - end - ) - (func $~lib/allocator/tlsf/Block#get:left (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 96 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 4 - i32.sub - i32.load - local.tee $1 - i32.eqz - if (result i32) - i32.const 0 - i32.const 56 - i32.const 97 - i32.const 11 - call $~lib/env/abort - unreachable - else - local.get $1 - end - ) - (func $~lib/allocator/tlsf/Root#setJump (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - i32.load - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 353 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.get $2 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 354 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 355 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 4 - i32.sub - local.get $1 - i32.store - ) - (func $~lib/allocator/tlsf/Root#insert (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 208 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - local.set $2 - local.get $2 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 210 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.tee $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $4 - if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $4 - end - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 212 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 56 - i32.const 216 - i32.const 23 - call $~lib/env/abort - unreachable - else - local.get $4 - end - local.set $5 - local.get $5 - i32.load - local.set $6 - local.get $6 - global.get $~lib/allocator/tlsf/FREE - i32.and - if - local.get $0 - local.get $5 - call $~lib/allocator/tlsf/Root#remove - local.get $1 - local.get $2 - global.get $~lib/allocator/tlsf/Block.INFO - local.get $6 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - i32.add - i32.add - local.tee $2 - i32.store - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.set $5 - local.get $5 - i32.load - local.set $6 - end - local.get $2 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - if - local.get $1 - call $~lib/allocator/tlsf/Block#get:left - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 56 - i32.const 230 - i32.const 24 - call $~lib/env/abort - unreachable - else - local.get $4 - end - local.set $4 - local.get $4 - i32.load - local.set $7 - local.get $7 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 232 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $4 - call $~lib/allocator/tlsf/Root#remove - local.get $4 - local.get $7 - global.get $~lib/allocator/tlsf/Block.INFO - local.get $2 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - i32.add - i32.add - local.tee $7 - i32.store - local.get $4 - local.set $1 - local.get $7 - local.set $2 - end - local.get $5 - local.get $6 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.or - i32.store - local.get $0 - local.get $1 - local.get $5 - call $~lib/allocator/tlsf/Root#setJump - local.get $2 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $7 - if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $7 - end - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 245 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $3 - global.get $~lib/allocator/tlsf/SB_SIZE - i32.lt_u - if - i32.const 0 - local.set $8 - local.get $3 - i32.const 8 - i32.div_u - local.set $9 - else - local.get $3 - call $~lib/allocator/tlsf/fls - local.set $8 - local.get $3 - local.get $8 - global.get $~lib/allocator/tlsf/SL_BITS - i32.sub - i32.shr_u - i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS - i32.shl - i32.xor - local.set $9 - local.get $8 - global.get $~lib/allocator/tlsf/SB_BITS - i32.const 1 - i32.sub - i32.sub - local.set $8 - end - local.get $0 - local.get $8 - local.get $9 - call $~lib/allocator/tlsf/Root#getHead - local.set $10 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $10 - i32.store offset=8 - local.get $10 - if - local.get $10 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.get $8 - local.get $9 - local.get $1 - call $~lib/allocator/tlsf/Root#setHead - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $8 - i32.shl - i32.or - i32.store - local.get $0 - local.get $8 - local.get $0 - local.get $8 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const 1 - local.get $9 - i32.shl - i32.or - call $~lib/allocator/tlsf/Root#setSLMap + (func $start (; 7 ;) (type $FUNCSIG$v) + call $start:class ) - (func $~lib/allocator/tlsf/Root#addMemory (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 - local.get $2 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 396 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 397 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 398 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - call $~lib/allocator/tlsf/Root#get:tailRef - local.set $3 - i32.const 0 - local.set $4 - local.get $3 - if - local.get $1 - local.get $3 - i32.const 4 - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 403 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.get $3 - i32.eq - if - local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.set $1 - local.get $3 - i32.load - local.set $4 - end - else - local.get $1 - local.get $0 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 412 - i32.const 6 - call $~lib/env/abort - unreachable - end - end - local.get $2 - local.get $1 - i32.sub - local.set $5 - local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.add - global.get $~lib/allocator/tlsf/Block.INFO - i32.add - i32.lt_u - if - i32.const 0 - return - end - local.get $5 - i32.const 2 - global.get $~lib/allocator/tlsf/Block.INFO - i32.mul - i32.sub - local.set $6 - local.get $1 - local.set $7 - local.get $7 - local.get $6 - global.get $~lib/allocator/tlsf/FREE - i32.or - local.get $4 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - i32.or - i32.store - local.get $7 - i32.const 0 - i32.store offset=4 - local.get $7 - i32.const 0 - i32.store offset=8 - local.get $1 - local.get $5 - i32.add - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.set $8 - local.get $8 - i32.const 0 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.or - i32.store - local.get $0 - local.get $8 - call $~lib/allocator/tlsf/Root#set:tailRef - local.get $0 - local.get $7 - call $~lib/allocator/tlsf/Root#insert - i32.const 1 - ) - (func $~lib/allocator/tlsf/ffs (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 441 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.ctz - ) - (func $~lib/allocator/tlsf/ffs (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 441 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.ctz - ) - (func $~lib/allocator/tlsf/Root#search (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $1 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $2 - if (result i32) - local.get $1 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $2 - end - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 315 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - global.get $~lib/allocator/tlsf/SB_SIZE - i32.lt_u - if - i32.const 0 - local.set $3 - local.get $1 - i32.const 8 - i32.div_u - local.set $4 - else - local.get $1 - call $~lib/allocator/tlsf/fls - local.set $3 - local.get $1 - local.get $3 - global.get $~lib/allocator/tlsf/SL_BITS - i32.sub - i32.shr_u - i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS - i32.shl - i32.xor - local.set $4 - local.get $3 - global.get $~lib/allocator/tlsf/SB_BITS - i32.const 1 - i32.sub - i32.sub - local.set $3 - local.get $4 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.const 1 - i32.sub - i32.lt_u - if - local.get $4 - i32.const 1 - i32.add - local.set $4 - else - local.get $3 - i32.const 1 - i32.add - local.set $3 - i32.const 0 - local.set $4 - end - end - local.get $0 - local.get $3 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const 0 - i32.const -1 - i32.xor - local.get $4 - i32.shl - i32.and - local.set $5 - local.get $5 - i32.eqz - if - local.get $0 - i32.load - i32.const 0 - i32.const -1 - i32.xor - local.get $3 - i32.const 1 - i32.add - i32.shl - i32.and - local.set $2 - local.get $2 - i32.eqz - if - i32.const 0 - local.set $6 - else - local.get $2 - call $~lib/allocator/tlsf/ffs - local.set $3 - local.get $0 - local.get $3 - call $~lib/allocator/tlsf/Root#getSLMap - local.tee $7 - if (result i32) - local.get $7 - else - i32.const 0 - i32.const 56 - i32.const 342 - i32.const 16 - call $~lib/env/abort - unreachable - end - local.set $5 - local.get $0 - local.get $3 - local.get $5 - call $~lib/allocator/tlsf/ffs - call $~lib/allocator/tlsf/Root#getHead - local.set $6 - end - else - local.get $0 - local.get $3 - local.get $5 - call $~lib/allocator/tlsf/ffs - call $~lib/allocator/tlsf/Root#getHead - local.set $6 - end - local.get $6 - ) - (func $~lib/allocator/tlsf/Root#use (; 26 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 367 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $4 - if (result i32) - local.get $2 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $4 - end - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 368 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 369 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#remove - local.get $3 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.sub - local.set $5 - local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.add - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - i32.or - i32.store - local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO - i32.add - local.get $2 - i32.add - local.set $4 - local.get $4 - local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - global.get $~lib/allocator/tlsf/FREE - i32.or - i32.store - local.get $0 - local.get $4 - call $~lib/allocator/tlsf/Root#insert - else - local.get $1 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.const -1 - i32.xor - i32.and - i32.store - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 56 - i32.const 387 - i32.const 25 - call $~lib/env/abort - unreachable - else - local.get $4 - end - local.set $4 - local.get $4 - local.get $4 - i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.const -1 - i32.xor - i32.and - i32.store - end - local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO - i32.add - ) - (func $~lib/allocator/tlsf/__mem_allocate (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - global.get $~lib/allocator/tlsf/ROOT - local.set $1 - local.get $1 - i32.eqz - if - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $2 - current_memory - local.set $3 - local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $4 - local.get $4 - local.get $3 - i32.gt_s - local.tee $5 - if (result i32) - local.get $4 - local.get $3 - i32.sub - grow_memory - i32.const 0 - i32.lt_s - else - local.get $5 - end - if - unreachable - end - local.get $2 - local.tee $1 - global.set $~lib/allocator/tlsf/ROOT - local.get $1 - i32.const 0 - call $~lib/allocator/tlsf/Root#set:tailRef - local.get $1 - i32.const 0 - i32.store - block $break|0 - i32.const 0 - local.set $5 - loop $repeat|0 - local.get $5 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - br_if $break|0 - block - local.get $1 - local.get $5 - i32.const 0 - call $~lib/allocator/tlsf/Root#setSLMap - block $break|1 - i32.const 0 - local.set $6 - loop $repeat|1 - local.get $6 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u - i32.eqz - br_if $break|1 - local.get $1 - local.get $5 - local.get $6 - i32.const 0 - call $~lib/allocator/tlsf/Root#setHead - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $repeat|1 - unreachable - end - unreachable - end - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $repeat|0 - unreachable - end - unreachable - end - local.get $1 - local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - current_memory - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - drop - end - local.get $0 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.gt_u - if - unreachable - end - local.get $0 - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.tee $4 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - local.tee $3 - local.get $4 - local.get $3 - i32.gt_u - select - local.set $0 - local.get $1 - local.get $0 - call $~lib/allocator/tlsf/Root#search - local.set $7 - local.get $7 - i32.eqz - if - current_memory - local.set $4 - local.get $0 - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $3 - local.get $4 - local.tee $2 - local.get $3 - local.tee $5 - local.get $2 - local.get $5 - i32.gt_s - select - local.set $2 - local.get $2 - grow_memory - i32.const 0 - i32.lt_s - if - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - current_memory - local.set $5 - local.get $1 - local.get $4 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - drop - local.get $1 - local.get $0 - call $~lib/allocator/tlsf/Root#search - local.tee $6 - i32.eqz - if (result i32) - i32.const 0 - i32.const 56 - i32.const 502 - i32.const 12 - call $~lib/env/abort - unreachable - else - local.get $6 - end - local.set $7 - end - local.get $7 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.get $0 - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 505 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $1 - local.get $7 - local.get $0 - call $~lib/allocator/tlsf/Root#use - ) - (func $~lib/memory/memory.allocate (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/tlsf/__mem_allocate - return - ) - (func $~lib/util/runtime/allocate (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - call $~lib/util/runtime/adjust - call $~lib/memory/memory.allocate - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_MAGIC - i32.store - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - ) - (func $~lib/collector/itcm/ManagedObjectList#clear (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - ) - (func $~lib/collector/itcm/maybeInit (; 31 ;) (type $FUNCSIG$v) - global.get $~lib/collector/itcm/state - i32.const 0 - i32.eq - if - global.get $~lib/util/runtime/HEADER_SIZE - call $~lib/memory/memory.allocate - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - i32.const -1 - i32.store - global.get $~lib/collector/itcm/fromSpace - i32.const 0 - i32.store offset=4 - global.get $~lib/collector/itcm/fromSpace - call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/util/runtime/HEADER_SIZE - call $~lib/memory/memory.allocate - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - i32.const -1 - i32.store - global.get $~lib/collector/itcm/toSpace - i32.const 0 - i32.store offset=4 - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - ) - (func $~lib/collector/itcm/ManagedObject#set:color (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $1 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.and - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=12 - local.set $2 - local.get $1 - local.get $0 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/collector/itcm/__ref_register (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - call $~lib/collector/itcm/maybeInit - block $~lib/collector/itcm/refToObj|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - end - local.set $2 - local.get $2 - global.get $~lib/collector/itcm/white - call $~lib/collector/itcm/ManagedObject#set:color - global.get $~lib/collector/itcm/fromSpace - local.get $2 - call $~lib/collector/itcm/ManagedObjectList#push - ) - (func $~lib/util/runtime/register (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 128 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - local.set $2 - local.get $2 - i32.load - global.get $~lib/util/runtime/HEADER_MAGIC - i32.eq - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 130 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $1 - i32.store - local.get $0 - call $~lib/collector/itcm/__ref_register - local.get $0 - ) - (func $~lib/runtime/runtime.newObject (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/util/runtime/allocate - local.get $1 - call $~lib/util/runtime/register - ) - (func $~lib/runtime/runtime.newString (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/runtime/runtime.newObject - ) - (func $~lib/runtime/runtime.newArrayBuffer (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 2 - call $~lib/runtime/runtime.newObject - ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 - i32.const 3 - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 - i32.const 3 - i32.const -1 - i32.xor - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - local.set $1 - local.get $0 - i32.load offset=12 - local.set $2 - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/collector/itcm/iter - i32.eq - if - local.get $0 - i32.load offset=12 - global.set $~lib/collector/itcm/iter - end - local.get $0 - call $~lib/collector/itcm/ManagedObject#unlink - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 2 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/__ref_link (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - call $~lib/collector/itcm/maybeInit - block $~lib/collector/itcm/refToObj|inlined.1 (result i32) - local.get $1 - local.set $2 - local.get $2 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - end - local.set $3 - local.get $3 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eqz - i32.eq - local.tee $2 - if (result i32) - block $~lib/collector/itcm/refToObj|inlined.3 (result i32) - local.get $0 - local.set $2 - local.get $2 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - end - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - else - local.get $2 - end - if - local.get $3 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/memory/memory.copy (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - br $continue|1 - end - end - end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|2 - end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - end - br $continue|3 - end - end - end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 - end - end - end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - end - end - ) - (func $~lib/runtime/runtime.newArray (; 46 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - i32.const 16 - call $~lib/util/runtime/allocate - local.get $2 - call $~lib/util/runtime/register - local.set $4 - local.get $0 - local.get $1 - i32.shl - local.set $5 - local.get $5 - call $~lib/util/runtime/allocate - i32.const 2 - call $~lib/util/runtime/register - local.set $6 - local.get $4 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - i32.load - local.tee $9 - i32.ne - if (result i32) - nop - local.get $8 - local.get $7 - call $~lib/collector/itcm/__ref_link - local.get $8 - else - local.get $8 - end - i32.store - local.get $4 - local.get $6 - i32.store offset=4 - local.get $4 - local.get $5 - i32.store offset=8 - local.get $4 - local.get $0 - i32.store offset=12 - local.get $3 - if - local.get $6 - local.get $3 - local.get $5 - call $~lib/memory/memory.copy - end - local.get $4 - ) - (func $~lib/runtime/Root#constructor (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - call $~lib/util/runtime/allocate - i32.const 3 - call $~lib/util/runtime/register - local.set $0 - end - local.get $0 - ) - (func $~lib/runtime/runtime.retain (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/runtime/ROOT - call $~lib/collector/itcm/__ref_link - ) - (func $~lib/runtime/runtime.release (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/allocator/tlsf/__mem_free (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.set $1 - local.get $1 - if - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.set $2 - local.get $2 - i32.load - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.or - i32.store - local.get $1 - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - call $~lib/allocator/tlsf/Root#insert - end - end - ) - (func $~lib/memory/memory.free (; 51 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - call $~lib/allocator/tlsf/__mem_free - ) - (func $~lib/collector/itcm/step (; 52 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - block $case0|0 - global.get $~lib/collector/itcm/state - local.set $1 - local.get $1 - i32.const 0 - i32.eq - br_if $case0|0 - local.get $1 - i32.const 1 - i32.eq - br_if $case1|0 - local.get $1 - i32.const 2 - i32.eq - br_if $case2|0 - local.get $1 - i32.const 3 - i32.eq - br_if $case3|0 - br $break|0 - end - unreachable - end - block - call $~lib/runtime/__gc_mark_roots - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - call $~lib/collector/itcm/ManagedObject#set:color - local.get $0 - i32.load - block $~lib/collector/itcm/objToRef|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - end - call $~lib/runtime/__gc_mark_members - else - call $~lib/runtime/__gc_mark_roots - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $1 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $1 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $1 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.ge_u - if - local.get $0 - call $~lib/memory/memory.free - end - else - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - i32.const 1 - global.set $~lib/collector/itcm/state - end - br $break|0 - unreachable - end - unreachable - end - ) - (func $~lib/collector/itcm/__ref_collect (; 53 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/maybeInit - block $break|0 - loop $continue|0 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - call $~lib/collector/itcm/step - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - br_if $continue|1 - end - end - ) - (func $~lib/runtime/runtime.collect (; 54 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/__ref_collect - ) - (func $~lib/runtime/runtime#constructor (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - unreachable - ) - (func $start (; 56 ;) (type $FUNCSIG$v) - call $start:class - i32.const 0 - call $~lib/runtime/Root#constructor - global.set $~lib/runtime/ROOT - ) - (func $~lib/collector/itcm/__ref_mark (; 57 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - call $~lib/collector/itcm/maybeInit - block $~lib/collector/itcm/refToObj|inlined.4 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - end - local.set $2 - local.get $2 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/runtime/__gc_mark_roots (; 58 ;) (type $FUNCSIG$v) - (local $0 i32) - global.get $~lib/runtime/ROOT - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - ) - (func $~lib/runtime/__gc_mark_members (; 59 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - block $invalid - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/string/String - local.get $0 - br_table $invalid $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid - end - return - end - return - end - return - end - unreachable - ) - (func $~lib/runtime/__runtime_instanceof (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - block $nope - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/string/String - local.get $0 - br_table $nope $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope - end - local.get $1 - i32.const 1 - i32.eq - return - end - local.get $1 - i32.const 2 - i32.eq - return - end - local.get $1 - i32.const 3 - i32.eq - return - end - i32.const 0 - return - ) - (func $~lib/runtime/__runtime_flags (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - block $invalid - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/string/String - local.get $0 - br_table $invalid $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid - end - i32.const 0 - return - end - i32.const 0 - return - end - i32.const 0 - return - end - unreachable - ) - (func $null (; 62 ;) (type $FUNCSIG$v) - ) - (func $~lib/runtime/runtime.newArray|trampoline (; 63 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 3 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 0 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/runtime/runtime.newArray - ) - (func $~lib/setargc (; 64 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.set $~lib/argc + (func $null (; 8 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/closure.json b/tests/compiler/closure.json index 9e26dfeeb6..b1da366ff4 100644 --- a/tests/compiler/closure.json +++ b/tests/compiler/closure.json @@ -1 +1,5 @@ -{} \ No newline at end of file +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/closure.optimized.wat b/tests/compiler/closure.optimized.wat index 5c19014713..bb456a1172 100644 --- a/tests/compiler/closure.optimized.wat +++ b/tests/compiler/closure.optimized.wat @@ -1,1908 +1,8 @@ (module - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 8) "\01\00\00\00,") - (data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 72) "\01\00\00\00(") - (data (i32.const 88) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) - (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) + (memory $0 0) (export "memory" (memory $0)) - (export "table" (table $0)) - (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "$.flags" (func $~lib/runtime/runtime.flags)) - (export "$.newObject" (func $~lib/runtime/runtime.newObject)) - (export "$.newString" (func $~lib/runtime/runtime.newString)) - (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export "$.setArgc" (func $~lib/setargc)) - (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "$.retain" (func $~lib/runtime/runtime.retain)) - (export "$.release" (func $~lib/runtime/runtime.release)) - (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) - (start $start) - (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - if (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load - local.get $1 - call $~lib/runtime/__runtime_instanceof - else - i32.const 0 - end - ) - (func $~lib/runtime/runtime.flags (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - block $__inlined_func$~lib/runtime/__runtime_flags - block $invalid - local.get $0 - i32.const 1 - i32.sub - br_table $__inlined_func$~lib/runtime/__runtime_flags $__inlined_func$~lib/runtime/__runtime_flags $__inlined_func$~lib/runtime/__runtime_flags $invalid - end - unreachable - end - i32.const 0 - ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 159 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.get $0 - i32.add - local.get $2 - i32.store offset=4 - ) - (func $~lib/allocator/tlsf/Root#setHead (; 4 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 184 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 32 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 185 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 5 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl - local.get $0 - i32.add - local.get $3 - i32.store offset=96 - ) - (func $~lib/allocator/tlsf/Block#get:right (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const -4 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 104 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 8 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 105 - i32.const 11 - call $~lib/env/abort - unreachable - end - local.get $0 - ) - (func $~lib/allocator/tlsf/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 447 - i32.const 2 - call $~lib/env/abort - unreachable - end - i32.const 31 - local.get $0 - i32.clz - i32.sub - ) - (func $~lib/allocator/tlsf/Root#getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 175 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 32 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 176 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 5 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl - local.get $0 - i32.add - i32.load offset=96 - ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 153 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.get $0 - i32.add - i32.load offset=4 - ) - (func $~lib/allocator/tlsf/Root#remove (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.tee $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 277 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and - local.tee $3 - i32.const 16 - i32.ge_u - local.tee $2 - if - local.get $3 - i32.const 1073741824 - i32.lt_u - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 279 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $3 - i32.const 256 - i32.lt_u - if (result i32) - local.get $3 - i32.const 8 - i32.div_u - local.set $4 - i32.const 0 - else - local.get $3 - local.get $3 - call $~lib/allocator/tlsf/fls - local.tee $2 - i32.const 5 - i32.sub - i32.shr_u - i32.const 32 - i32.xor - local.set $4 - local.get $2 - i32.const 7 - i32.sub - end - local.set $2 - local.get $1 - i32.load offset=8 - local.set $3 - local.get $1 - i32.load offset=4 - local.tee $5 - if - local.get $5 - local.get $3 - i32.store offset=8 - end - local.get $3 - if - local.get $3 - local.get $5 - i32.store offset=4 - end - local.get $0 - local.get $2 - local.get $4 - call $~lib/allocator/tlsf/Root#getHead - local.get $1 - i32.eq - if - local.get $0 - local.get $2 - local.get $4 - local.get $3 - call $~lib/allocator/tlsf/Root#setHead - local.get $3 - i32.eqz - if - local.get $0 - local.get $2 - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const 1 - local.get $4 - i32.shl - i32.const -1 - i32.xor - i32.and - local.tee $1 - call $~lib/allocator/tlsf/Root#setSLMap - local.get $1 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $2 - i32.shl - i32.const -1 - i32.xor - i32.and - i32.store - end - end - end - ) - (func $~lib/allocator/tlsf/Block#get:left (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const 2 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 96 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 4 - i32.sub - i32.load - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 97 - i32.const 11 - call $~lib/env/abort - unreachable - end - local.get $0 - ) - (func $~lib/allocator/tlsf/Root#setJump (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 353 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - call $~lib/allocator/tlsf/Block#get:right - local.get $1 - i32.ne - if - i32.const 0 - i32.const 24 - i32.const 354 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - i32.const 2 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 355 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 4 - i32.sub - local.get $0 - i32.store - ) - (func $~lib/allocator/tlsf/Root#insert (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 208 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - local.tee $3 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 210 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - i32.const -4 - i32.and - local.tee $4 - i32.const 16 - i32.ge_u - local.tee $2 - if - local.get $4 - i32.const 1073741824 - i32.lt_u - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 212 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $2 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 216 - i32.const 23 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.load - local.tee $4 - i32.const 1 - i32.and - if - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#remove - local.get $1 - local.get $4 - i32.const -4 - i32.and - i32.const 8 - i32.add - local.get $3 - i32.add - local.tee $3 - i32.store - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $2 - i32.load - local.set $4 - end - local.get $3 - i32.const 2 - i32.and - if - local.get $1 - call $~lib/allocator/tlsf/Block#get:left - local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 230 - i32.const 24 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - local.tee $5 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 232 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#remove - local.get $1 - local.get $3 - i32.const -4 - i32.and - i32.const 8 - i32.add - local.get $5 - i32.add - local.tee $3 - i32.store - end - local.get $2 - local.get $4 - i32.const 2 - i32.or - i32.store - local.get $1 - local.get $2 - call $~lib/allocator/tlsf/Root#setJump - local.get $3 - i32.const -4 - i32.and - local.tee $3 - i32.const 16 - i32.ge_u - local.tee $2 - if - local.get $3 - i32.const 1073741824 - i32.lt_u - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 245 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $3 - i32.const 256 - i32.lt_u - if (result i32) - local.get $3 - i32.const 8 - i32.div_u - local.set $3 - i32.const 0 - else - local.get $3 - local.get $3 - call $~lib/allocator/tlsf/fls - local.tee $2 - i32.const 5 - i32.sub - i32.shr_u - i32.const 32 - i32.xor - local.set $3 - local.get $2 - i32.const 7 - i32.sub - end - local.tee $2 - local.get $3 - call $~lib/allocator/tlsf/Root#getHead - local.set $4 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $4 - i32.store offset=8 - local.get $4 - if - local.get $4 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.get $2 - local.get $3 - local.get $1 - call $~lib/allocator/tlsf/Root#setHead - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $2 - i32.shl - i32.or - i32.store - local.get $0 - local.get $2 - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const 1 - local.get $3 - i32.shl - i32.or - call $~lib/allocator/tlsf/Root#setSLMap - ) - (func $~lib/allocator/tlsf/Root#addMemory (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $2 - i32.gt_u - if - i32.const 0 - i32.const 24 - i32.const 396 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 7 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 397 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 398 - i32.const 4 - call $~lib/env/abort - unreachable - end - i32.const 2912 - i32.load - local.tee $3 - if - local.get $1 - local.get $3 - i32.const 4 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 24 - i32.const 403 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 8 - i32.sub - local.get $3 - i32.eq - if - local.get $3 - i32.load - local.set $4 - local.get $1 - i32.const 8 - i32.sub - local.set $1 - end - else - local.get $1 - local.get $0 - i32.const 2916 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 24 - i32.const 412 - i32.const 6 - call $~lib/env/abort - unreachable - end - end - local.get $2 - local.get $1 - i32.sub - local.tee $2 - i32.const 32 - i32.lt_u - if - return - end - local.get $1 - local.get $4 - i32.const 2 - i32.and - local.get $2 - i32.const 16 - i32.sub - i32.const 1 - i32.or - i32.or - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.tee $2 - i32.const 2 - i32.store - i32.const 2912 - local.get $2 - i32.store - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#insert - ) - (func $~lib/allocator/tlsf/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 441 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.ctz - ) - (func $~lib/allocator/tlsf/Root#search (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.const 16 - i32.ge_u - local.tee $2 - if - local.get $1 - i32.const 1073741824 - i32.lt_u - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 315 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 256 - i32.lt_u - if (result i32) - i32.const 0 - local.set $2 - local.get $1 - i32.const 8 - i32.div_u - else - local.get $1 - call $~lib/allocator/tlsf/fls - local.tee $3 - i32.const 7 - i32.sub - local.set $2 - local.get $1 - local.get $3 - i32.const 5 - i32.sub - i32.shr_u - i32.const 32 - i32.xor - local.tee $1 - i32.const 31 - i32.lt_u - if (result i32) - local.get $1 - i32.const 1 - i32.add - else - local.get $2 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - end - end - local.set $1 - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const -1 - local.get $1 - i32.shl - i32.and - local.tee $1 - if (result i32) - local.get $0 - local.get $2 - local.get $1 - call $~lib/allocator/tlsf/ffs - call $~lib/allocator/tlsf/Root#getHead - else - local.get $0 - i32.load - i32.const -1 - local.get $2 - i32.const 1 - i32.add - i32.shl - i32.and - local.tee $1 - if (result i32) - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/ffs - local.tee $2 - call $~lib/allocator/tlsf/Root#getSLMap - local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 342 - i32.const 16 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $2 - local.get $1 - call $~lib/allocator/tlsf/ffs - call $~lib/allocator/tlsf/Root#getHead - else - i32.const 0 - end - end - ) - (func $~lib/allocator/tlsf/Root#use (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.tee $4 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 367 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 16 - i32.ge_u - local.tee $3 - if - local.get $2 - i32.const 1073741824 - i32.lt_u - local.set $3 - end - local.get $3 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 368 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 369 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#remove - local.get $4 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $3 - i32.const 24 - i32.ge_u - if - local.get $1 - local.get $4 - i32.const 2 - i32.and - local.get $2 - i32.or - i32.store - local.get $1 - i32.const 8 - i32.add - local.get $2 - i32.add - local.tee $2 - local.get $3 - i32.const 8 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#insert - else - local.get $1 - local.get $4 - i32.const -2 - i32.and - i32.store - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 387 - i32.const 25 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $0 - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 - i32.const 8 - i32.add - ) - (func $~lib/allocator/tlsf/__mem_allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/allocator/tlsf/ROOT - local.tee $2 - i32.eqz - if - i32.const 1 - current_memory - local.tee $1 - i32.gt_s - local.tee $2 - if (result i32) - i32.const 1 - local.get $1 - i32.sub - grow_memory - i32.const 0 - i32.lt_s - else - local.get $2 - end - if - unreachable - end - i32.const 128 - local.set $2 - i32.const 128 - global.set $~lib/allocator/tlsf/ROOT - i32.const 2912 - i32.const 0 - i32.store - i32.const 128 - i32.const 0 - i32.store - i32.const 0 - local.set $1 - loop $repeat|0 - local.get $1 - i32.const 22 - i32.lt_u - if - i32.const 128 - local.get $1 - i32.const 0 - call $~lib/allocator/tlsf/Root#setSLMap - i32.const 0 - local.set $3 - loop $repeat|1 - local.get $3 - i32.const 32 - i32.lt_u - if - i32.const 128 - local.get $1 - local.get $3 - i32.const 0 - call $~lib/allocator/tlsf/Root#setHead - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $repeat|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $repeat|0 - end - end - i32.const 128 - i32.const 3048 - current_memory - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - end - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - local.get $2 - local.get $0 - i32.const 7 - i32.add - i32.const -8 - i32.and - local.tee $0 - i32.const 16 - local.get $0 - i32.const 16 - i32.gt_u - select - local.tee $1 - call $~lib/allocator/tlsf/Root#search - local.tee $0 - i32.eqz - if - current_memory - local.tee $0 - local.get $1 - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $3 - local.get $0 - local.get $3 - i32.gt_s - select - grow_memory - i32.const 0 - i32.lt_s - if - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $2 - local.get $0 - i32.const 16 - i32.shl - current_memory - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - local.get $2 - local.get $1 - call $~lib/allocator/tlsf/Root#search - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 502 - i32.const 12 - call $~lib/env/abort - unreachable - end - end - local.get $0 - i32.load - i32.const -4 - i32.and - local.get $1 - i32.lt_u - if - i32.const 0 - i32.const 24 - i32.const 505 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#use - ) - (func $~lib/util/runtime/allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 15 - i32.add - i32.clz - i32.sub - i32.shl - call $~lib/allocator/tlsf/__mem_allocate - local.tee $1 - i32.const -1520547049 - i32.store - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - ) - (func $~lib/collector/itcm/maybeInit (; 19 ;) (type $FUNCSIG$v) - (local $0 i32) - global.get $~lib/collector/itcm/state - i32.eqz - if - i32.const 16 - call $~lib/allocator/tlsf/__mem_allocate - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - local.tee $0 - i32.const -1 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - i32.const 16 - call $~lib/allocator/tlsf/__mem_allocate - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - local.tee $0 - i32.const -1 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=12 - local.set $2 - local.get $1 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.and - local.get $0 - i32.or - i32.store offset=8 - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.and - local.get $1 - i32.or - i32.store offset=8 - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/collector/itcm/__ref_register (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) - call $~lib/collector/itcm/maybeInit - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - global.get $~lib/collector/itcm/white - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - i32.or - i32.store offset=8 - global.get $~lib/collector/itcm/fromSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - ) - (func $~lib/util/runtime/register (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - i32.const 128 - i32.le_u - if - i32.const 0 - i32.const 88 - i32.const 128 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.tee $2 - i32.load - i32.const -1520547049 - i32.ne - if - i32.const 0 - i32.const 88 - i32.const 130 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $1 - i32.store - block - local.get $0 - call $~lib/collector/itcm/__ref_register - end - local.get $0 - ) - (func $~lib/runtime/runtime.newObject (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/util/runtime/allocate - local.get $1 - call $~lib/util/runtime/register - ) - (func $~lib/runtime/runtime.newString (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/runtime/runtime.newObject - ) - (func $~lib/runtime/runtime.newArrayBuffer (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 2 - call $~lib/runtime/runtime.newObject - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/collector/itcm/iter - local.get $0 - i32.eq - if - local.get $0 - i32.load offset=12 - global.set $~lib/collector/itcm/iter - end - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.load offset=12 - local.tee $1 - i32.store offset=12 - local.get $1 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.and - local.get $2 - i32.or - i32.store offset=8 - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - i32.const 2 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/__ref_link (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - call $~lib/collector/itcm/maybeInit - global.get $~lib/collector/itcm/white - i32.eqz - local.get $1 - i32.const 16 - i32.sub - local.tee $2 - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - local.tee $1 - if (result i32) - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - else - local.get $1 - end - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/memory/memory.copy (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 - end - end - end - loop $continue|2 - local.get $2 - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|3 - end - end - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - br $continue|4 - end - end - end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - end - ) - (func $~lib/runtime/runtime.newArray (; 29 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 16 - call $~lib/util/runtime/allocate - local.get $2 - call $~lib/util/runtime/register - local.tee $2 - local.set $6 - local.get $0 - local.get $1 - i32.shl - local.tee $4 - call $~lib/util/runtime/allocate - i32.const 2 - call $~lib/util/runtime/register - local.tee $5 - local.tee $1 - local.get $2 - i32.load - i32.ne - if - local.get $1 - local.get $6 - call $~lib/collector/itcm/__ref_link - end - local.get $2 - local.get $1 - i32.store - local.get $2 - local.get $5 - i32.store offset=4 - local.get $2 - local.get $4 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=12 - local.get $3 - if - local.get $5 - local.get $3 - local.get $4 - call $~lib/memory/memory.copy - end - local.get $2 - ) - (func $~lib/runtime/runtime.retain (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/runtime/ROOT - call $~lib/collector/itcm/__ref_link - ) - (func $~lib/runtime/runtime.release (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/allocator/tlsf/__mem_free (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.tee $1 - if - local.get $0 - i32.const 8 - i32.sub - local.tee $2 - i32.load - local.tee $3 - i32.const 1 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - i32.const 1 - i32.or - i32.store - local.get $1 - local.get $0 - i32.const 8 - i32.sub - call $~lib/allocator/tlsf/Root#insert - end - end - ) - (func $~lib/collector/itcm/step (; 33 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - if - local.get $0 - i32.const 1 - i32.sub - br_table $case1|0 $case2|0 $case3|0 $break|0 - end - unreachable - end - call $~lib/runtime/__gc_mark_roots - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - end - global.get $~lib/collector/itcm/iter - i32.load offset=8 - i32.const -4 - i32.and - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - i32.or - i32.store offset=8 - block $__inlined_func$~lib/runtime/__gc_mark_members - block $invalid - local.get $0 - i32.load - i32.const 1 - i32.sub - br_table $__inlined_func$~lib/runtime/__gc_mark_members $__inlined_func$~lib/runtime/__gc_mark_members $__inlined_func$~lib/runtime/__gc_mark_members $invalid - end - unreachable - end - else - call $~lib/runtime/__gc_mark_roots - global.get $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/iter - i32.load offset=8 - i32.const -4 - i32.and - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $0 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $0 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - end - global.get $~lib/collector/itcm/iter - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - local.get $0 - i32.const 128 - i32.ge_u - if - local.get $0 - call $~lib/allocator/tlsf/__mem_free - end - else - global.get $~lib/collector/itcm/toSpace - local.tee $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - i32.const 1 - global.set $~lib/collector/itcm/state - end - end - ) - (func $~lib/collector/itcm/__ref_collect (; 34 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/maybeInit - loop $continue|0 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|0 - end - end - loop $continue|1 - call $~lib/collector/itcm/step - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - br_if $continue|1 - end - ) - (func $~lib/runtime/runtime.collect (; 35 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/__ref_collect - ) - (func $start (; 36 ;) (type $FUNCSIG$v) - i32.const 0 - call $~lib/util/runtime/allocate - i32.const 3 - call $~lib/util/runtime/register - global.set $~lib/runtime/ROOT - ) - (func $~lib/runtime/__gc_mark_roots (; 37 ;) (type $FUNCSIG$v) - (local $0 i32) - global.get $~lib/runtime/ROOT - local.tee $0 - if - call $~lib/collector/itcm/maybeInit - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end - end - ) - (func $~lib/runtime/__runtime_instanceof (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - block $nope - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/string/String - local.get $0 - i32.const 1 - i32.sub - br_table $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope - end - local.get $1 - i32.const 1 - i32.eq - return - end - local.get $1 - i32.const 2 - i32.eq - return - end - local.get $1 - i32.const 3 - i32.eq - return - end - i32.const 0 - ) - (func $null (; 39 ;) (type $FUNCSIG$v) + (func $null (; 0 ;) (type $FUNCSIG$v) nop ) - (func $~lib/runtime/runtime.newArray|trampoline (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 3 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 0 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/runtime/runtime.newArray - ) - (func $~lib/setargc (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.set $~lib/argc - ) ) diff --git a/tests/compiler/closure.untouched.wat b/tests/compiler/closure.untouched.wat index c54dc003b4..29ee81b836 100644 --- a/tests/compiler/closure.untouched.wat +++ b/tests/compiler/closure.untouched.wat @@ -1,2331 +1,9 @@ (module - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 8) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") - (data (i32.const 72) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) - (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) - (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) - (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) - (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) - (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) - (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) - (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) - (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) - (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) - (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) - (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) - (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) - (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) - (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) - (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) - (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) - (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 128)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) - (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "$.flags" (func $~lib/runtime/runtime.flags)) - (export "$.newObject" (func $~lib/runtime/runtime.newObject)) - (export "$.newString" (func $~lib/runtime/runtime.newString)) - (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export "$.setArgc" (func $~lib/setargc)) - (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "$.retain" (func $~lib/runtime/runtime.retain)) - (export "$.release" (func $~lib/runtime/runtime.release)) - (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) - (start $start) - (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - if (result i32) - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - i32.load - local.get $1 - call $~lib/runtime/__runtime_instanceof - else - i32.const 0 - end - ) - (func $~lib/runtime/runtime.flags (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/__runtime_flags - ) - (func $~lib/util/runtime/adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 32 - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - i32.const 1 - i32.sub - i32.clz - i32.sub - i32.shl - ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 0 - local.get $1 - i32.store offset=2912 - ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 159 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 4 - i32.mul - i32.add - local.get $2 - i32.store offset=4 - ) - (func $~lib/allocator/tlsf/Root#setHead (; 6 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 184 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 185 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.mul - local.get $2 - i32.add - i32.const 4 - i32.mul - i32.add - local.get $3 - i32.store offset=96 - ) - (func $~lib/allocator/tlsf/Root#get:tailRef (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 - i32.load offset=2912 - ) - (func $~lib/allocator/tlsf/Block#get:right (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 104 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.add - local.get $0 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - i32.add - local.tee $1 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 105 - i32.const 11 - call $~lib/env/abort - unreachable - else - local.get $1 - end - ) - (func $~lib/allocator/tlsf/fls (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 447 - i32.const 2 - call $~lib/env/abort - unreachable - end - i32.const 31 - local.get $0 - i32.clz - i32.sub - ) - (func $~lib/allocator/tlsf/Root#getHead (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 175 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 176 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.mul - local.get $2 - i32.add - i32.const 4 - i32.mul - i32.add - i32.load offset=96 - ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 153 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 4 - i32.mul - i32.add - i32.load offset=4 - ) - (func $~lib/allocator/tlsf/Root#remove (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 - i32.load - local.set $2 - local.get $2 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 277 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $4 - if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $4 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 279 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $3 - global.get $~lib/allocator/tlsf/SB_SIZE - i32.lt_u - if - i32.const 0 - local.set $5 - local.get $3 - i32.const 8 - i32.div_u - local.set $6 - else - local.get $3 - call $~lib/allocator/tlsf/fls - local.set $5 - local.get $3 - local.get $5 - global.get $~lib/allocator/tlsf/SL_BITS - i32.sub - i32.shr_u - i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS - i32.shl - i32.xor - local.set $6 - local.get $5 - global.get $~lib/allocator/tlsf/SB_BITS - i32.const 1 - i32.sub - i32.sub - local.set $5 - end - local.get $1 - i32.load offset=4 - local.set $7 - local.get $1 - i32.load offset=8 - local.set $8 - local.get $7 - if - local.get $7 - local.get $8 - i32.store offset=8 - end - local.get $8 - if - local.get $8 - local.get $7 - i32.store offset=4 - end - local.get $1 - local.get $0 - local.get $5 - local.get $6 - call $~lib/allocator/tlsf/Root#getHead - i32.eq - if - local.get $0 - local.get $5 - local.get $6 - local.get $8 - call $~lib/allocator/tlsf/Root#setHead - local.get $8 - i32.eqz - if - local.get $0 - local.get $5 - call $~lib/allocator/tlsf/Root#getSLMap - local.set $4 - local.get $0 - local.get $5 - local.get $4 - i32.const 1 - local.get $6 - i32.shl - i32.const -1 - i32.xor - i32.and - local.tee $4 - call $~lib/allocator/tlsf/Root#setSLMap - local.get $4 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $5 - i32.shl - i32.const -1 - i32.xor - i32.and - i32.store - end - end - end - ) - (func $~lib/allocator/tlsf/Block#get:left (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 96 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 4 - i32.sub - i32.load - local.tee $1 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 97 - i32.const 11 - call $~lib/env/abort - unreachable - else - local.get $1 - end - ) - (func $~lib/allocator/tlsf/Root#setJump (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - i32.load - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 353 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.get $2 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 354 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 355 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 4 - i32.sub - local.get $1 - i32.store - ) - (func $~lib/allocator/tlsf/Root#insert (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 208 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - local.set $2 - local.get $2 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 210 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.tee $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $4 - if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $4 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 212 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 216 - i32.const 23 - call $~lib/env/abort - unreachable - else - local.get $4 - end - local.set $5 - local.get $5 - i32.load - local.set $6 - local.get $6 - global.get $~lib/allocator/tlsf/FREE - i32.and - if - local.get $0 - local.get $5 - call $~lib/allocator/tlsf/Root#remove - local.get $1 - local.get $2 - global.get $~lib/allocator/tlsf/Block.INFO - local.get $6 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - i32.add - i32.add - local.tee $2 - i32.store - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.set $5 - local.get $5 - i32.load - local.set $6 - end - local.get $2 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - if - local.get $1 - call $~lib/allocator/tlsf/Block#get:left - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 230 - i32.const 24 - call $~lib/env/abort - unreachable - else - local.get $4 - end - local.set $4 - local.get $4 - i32.load - local.set $7 - local.get $7 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 232 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $4 - call $~lib/allocator/tlsf/Root#remove - local.get $4 - local.get $7 - global.get $~lib/allocator/tlsf/Block.INFO - local.get $2 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - i32.add - i32.add - local.tee $7 - i32.store - local.get $4 - local.set $1 - local.get $7 - local.set $2 - end - local.get $5 - local.get $6 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.or - i32.store - local.get $0 - local.get $1 - local.get $5 - call $~lib/allocator/tlsf/Root#setJump - local.get $2 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $7 - if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $7 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 245 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $3 - global.get $~lib/allocator/tlsf/SB_SIZE - i32.lt_u - if - i32.const 0 - local.set $8 - local.get $3 - i32.const 8 - i32.div_u - local.set $9 - else - local.get $3 - call $~lib/allocator/tlsf/fls - local.set $8 - local.get $3 - local.get $8 - global.get $~lib/allocator/tlsf/SL_BITS - i32.sub - i32.shr_u - i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS - i32.shl - i32.xor - local.set $9 - local.get $8 - global.get $~lib/allocator/tlsf/SB_BITS - i32.const 1 - i32.sub - i32.sub - local.set $8 - end - local.get $0 - local.get $8 - local.get $9 - call $~lib/allocator/tlsf/Root#getHead - local.set $10 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $10 - i32.store offset=8 - local.get $10 - if - local.get $10 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.get $8 - local.get $9 - local.get $1 - call $~lib/allocator/tlsf/Root#setHead - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $8 - i32.shl - i32.or - i32.store - local.get $0 - local.get $8 - local.get $0 - local.get $8 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const 1 - local.get $9 - i32.shl - i32.or - call $~lib/allocator/tlsf/Root#setSLMap - ) - (func $~lib/allocator/tlsf/Root#addMemory (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 - local.get $2 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 396 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 397 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 398 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - call $~lib/allocator/tlsf/Root#get:tailRef - local.set $3 - i32.const 0 - local.set $4 - local.get $3 - if - local.get $1 - local.get $3 - i32.const 4 - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 403 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.get $3 - i32.eq - if - local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.set $1 - local.get $3 - i32.load - local.set $4 - end - else - local.get $1 - local.get $0 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 412 - i32.const 6 - call $~lib/env/abort - unreachable - end - end - local.get $2 - local.get $1 - i32.sub - local.set $5 - local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.add - global.get $~lib/allocator/tlsf/Block.INFO - i32.add - i32.lt_u - if - i32.const 0 - return - end - local.get $5 - i32.const 2 - global.get $~lib/allocator/tlsf/Block.INFO - i32.mul - i32.sub - local.set $6 - local.get $1 - local.set $7 - local.get $7 - local.get $6 - global.get $~lib/allocator/tlsf/FREE - i32.or - local.get $4 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - i32.or - i32.store - local.get $7 - i32.const 0 - i32.store offset=4 - local.get $7 - i32.const 0 - i32.store offset=8 - local.get $1 - local.get $5 - i32.add - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.set $8 - local.get $8 - i32.const 0 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.or - i32.store - local.get $0 - local.get $8 - call $~lib/allocator/tlsf/Root#set:tailRef - local.get $0 - local.get $7 - call $~lib/allocator/tlsf/Root#insert - i32.const 1 - ) - (func $~lib/allocator/tlsf/ffs (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 441 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.ctz - ) - (func $~lib/allocator/tlsf/ffs (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 441 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.ctz - ) - (func $~lib/allocator/tlsf/Root#search (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $1 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $2 - if (result i32) - local.get $1 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $2 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 315 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - global.get $~lib/allocator/tlsf/SB_SIZE - i32.lt_u - if - i32.const 0 - local.set $3 - local.get $1 - i32.const 8 - i32.div_u - local.set $4 - else - local.get $1 - call $~lib/allocator/tlsf/fls - local.set $3 - local.get $1 - local.get $3 - global.get $~lib/allocator/tlsf/SL_BITS - i32.sub - i32.shr_u - i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS - i32.shl - i32.xor - local.set $4 - local.get $3 - global.get $~lib/allocator/tlsf/SB_BITS - i32.const 1 - i32.sub - i32.sub - local.set $3 - local.get $4 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.const 1 - i32.sub - i32.lt_u - if - local.get $4 - i32.const 1 - i32.add - local.set $4 - else - local.get $3 - i32.const 1 - i32.add - local.set $3 - i32.const 0 - local.set $4 - end - end - local.get $0 - local.get $3 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const 0 - i32.const -1 - i32.xor - local.get $4 - i32.shl - i32.and - local.set $5 - local.get $5 - i32.eqz - if - local.get $0 - i32.load - i32.const 0 - i32.const -1 - i32.xor - local.get $3 - i32.const 1 - i32.add - i32.shl - i32.and - local.set $2 - local.get $2 - i32.eqz - if - i32.const 0 - local.set $6 - else - local.get $2 - call $~lib/allocator/tlsf/ffs - local.set $3 - local.get $0 - local.get $3 - call $~lib/allocator/tlsf/Root#getSLMap - local.tee $7 - if (result i32) - local.get $7 - else - i32.const 0 - i32.const 24 - i32.const 342 - i32.const 16 - call $~lib/env/abort - unreachable - end - local.set $5 - local.get $0 - local.get $3 - local.get $5 - call $~lib/allocator/tlsf/ffs - call $~lib/allocator/tlsf/Root#getHead - local.set $6 - end - else - local.get $0 - local.get $3 - local.get $5 - call $~lib/allocator/tlsf/ffs - call $~lib/allocator/tlsf/Root#getHead - local.set $6 - end - local.get $6 - ) - (func $~lib/allocator/tlsf/Root#use (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 367 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $4 - if (result i32) - local.get $2 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $4 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 368 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 369 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#remove - local.get $3 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.sub - local.set $5 - local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.add - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - i32.or - i32.store - local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO - i32.add - local.get $2 - i32.add - local.set $4 - local.get $4 - local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - global.get $~lib/allocator/tlsf/FREE - i32.or - i32.store - local.get $0 - local.get $4 - call $~lib/allocator/tlsf/Root#insert - else - local.get $1 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.const -1 - i32.xor - i32.and - i32.store - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 387 - i32.const 25 - call $~lib/env/abort - unreachable - else - local.get $4 - end - local.set $4 - local.get $4 - local.get $4 - i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.const -1 - i32.xor - i32.and - i32.store - end - local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO - i32.add - ) - (func $~lib/allocator/tlsf/__mem_allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - global.get $~lib/allocator/tlsf/ROOT - local.set $1 - local.get $1 - i32.eqz - if - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $2 - current_memory - local.set $3 - local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $4 - local.get $4 - local.get $3 - i32.gt_s - local.tee $5 - if (result i32) - local.get $4 - local.get $3 - i32.sub - grow_memory - i32.const 0 - i32.lt_s - else - local.get $5 - end - if - unreachable - end - local.get $2 - local.tee $1 - global.set $~lib/allocator/tlsf/ROOT - local.get $1 - i32.const 0 - call $~lib/allocator/tlsf/Root#set:tailRef - local.get $1 - i32.const 0 - i32.store - block $break|0 - i32.const 0 - local.set $5 - loop $repeat|0 - local.get $5 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - br_if $break|0 - block - local.get $1 - local.get $5 - i32.const 0 - call $~lib/allocator/tlsf/Root#setSLMap - block $break|1 - i32.const 0 - local.set $6 - loop $repeat|1 - local.get $6 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u - i32.eqz - br_if $break|1 - local.get $1 - local.get $5 - local.get $6 - i32.const 0 - call $~lib/allocator/tlsf/Root#setHead - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $repeat|1 - unreachable - end - unreachable - end - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $repeat|0 - unreachable - end - unreachable - end - local.get $1 - local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - current_memory - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - drop - end - local.get $0 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.gt_u - if - unreachable - end - local.get $0 - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.tee $4 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - local.tee $3 - local.get $4 - local.get $3 - i32.gt_u - select - local.set $0 - local.get $1 - local.get $0 - call $~lib/allocator/tlsf/Root#search - local.set $7 - local.get $7 - i32.eqz - if - current_memory - local.set $4 - local.get $0 - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $3 - local.get $4 - local.tee $2 - local.get $3 - local.tee $5 - local.get $2 - local.get $5 - i32.gt_s - select - local.set $2 - local.get $2 - grow_memory - i32.const 0 - i32.lt_s - if - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - current_memory - local.set $5 - local.get $1 - local.get $4 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - drop - local.get $1 - local.get $0 - call $~lib/allocator/tlsf/Root#search - local.tee $6 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 502 - i32.const 12 - call $~lib/env/abort - unreachable - else - local.get $6 - end - local.set $7 - end - local.get $7 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.get $0 - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 505 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $1 - local.get $7 - local.get $0 - call $~lib/allocator/tlsf/Root#use - ) - (func $~lib/memory/memory.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/tlsf/__mem_allocate - return - ) - (func $~lib/util/runtime/allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - call $~lib/util/runtime/adjust - call $~lib/memory/memory.allocate - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_MAGIC - i32.store - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - ) - (func $~lib/collector/itcm/ManagedObjectList#clear (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - ) - (func $~lib/collector/itcm/maybeInit (; 25 ;) (type $FUNCSIG$v) - global.get $~lib/collector/itcm/state - i32.const 0 - i32.eq - if - global.get $~lib/util/runtime/HEADER_SIZE - call $~lib/memory/memory.allocate - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - i32.const -1 - i32.store - global.get $~lib/collector/itcm/fromSpace - i32.const 0 - i32.store offset=4 - global.get $~lib/collector/itcm/fromSpace - call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/util/runtime/HEADER_SIZE - call $~lib/memory/memory.allocate - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - i32.const -1 - i32.store - global.get $~lib/collector/itcm/toSpace - i32.const 0 - i32.store offset=4 - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - ) - (func $~lib/collector/itcm/ManagedObject#set:color (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $1 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.and - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=12 - local.set $2 - local.get $1 - local.get $0 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/collector/itcm/__ref_register (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - call $~lib/collector/itcm/maybeInit - block $~lib/collector/itcm/refToObj|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - end - local.set $2 - local.get $2 - global.get $~lib/collector/itcm/white - call $~lib/collector/itcm/ManagedObject#set:color - global.get $~lib/collector/itcm/fromSpace - local.get $2 - call $~lib/collector/itcm/ManagedObjectList#push - ) - (func $~lib/util/runtime/register (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 88 - i32.const 128 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - local.set $2 - local.get $2 - i32.load - global.get $~lib/util/runtime/HEADER_MAGIC - i32.eq - i32.eqz - if - i32.const 0 - i32.const 88 - i32.const 130 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $1 - i32.store - local.get $0 - call $~lib/collector/itcm/__ref_register - local.get $0 - ) - (func $~lib/runtime/runtime.newObject (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/util/runtime/allocate - local.get $1 - call $~lib/util/runtime/register - ) - (func $~lib/runtime/runtime.newString (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/runtime/runtime.newObject - ) - (func $~lib/runtime/runtime.newArrayBuffer (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 2 - call $~lib/runtime/runtime.newObject - ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 - i32.const 3 - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 - i32.const 3 - i32.const -1 - i32.xor - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - local.set $1 - local.get $0 - i32.load offset=12 - local.set $2 - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/collector/itcm/iter - i32.eq - if - local.get $0 - i32.load offset=12 - global.set $~lib/collector/itcm/iter - end - local.get $0 - call $~lib/collector/itcm/ManagedObject#unlink - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 2 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/__ref_link (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - call $~lib/collector/itcm/maybeInit - block $~lib/collector/itcm/refToObj|inlined.1 (result i32) - local.get $1 - local.set $2 - local.get $2 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - end - local.set $3 - local.get $3 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eqz - i32.eq - local.tee $2 - if (result i32) - block $~lib/collector/itcm/refToObj|inlined.3 (result i32) - local.get $0 - local.set $2 - local.get $2 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - end - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - else - local.get $2 - end - if - local.get $3 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/memory/memory.copy (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - br $continue|1 - end - end - end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|2 - end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - end - br $continue|3 - end - end - end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 - end - end - end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - end - end - ) - (func $~lib/runtime/runtime.newArray (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - i32.const 16 - call $~lib/util/runtime/allocate - local.get $2 - call $~lib/util/runtime/register - local.set $4 - local.get $0 - local.get $1 - i32.shl - local.set $5 - local.get $5 - call $~lib/util/runtime/allocate - i32.const 2 - call $~lib/util/runtime/register - local.set $6 - local.get $4 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - i32.load - local.tee $9 - i32.ne - if (result i32) - nop - local.get $8 - local.get $7 - call $~lib/collector/itcm/__ref_link - local.get $8 - else - local.get $8 - end - i32.store - local.get $4 - local.get $6 - i32.store offset=4 - local.get $4 - local.get $5 - i32.store offset=8 - local.get $4 - local.get $0 - i32.store offset=12 - local.get $3 - if - local.get $6 - local.get $3 - local.get $5 - call $~lib/memory/memory.copy - end - local.get $4 - ) - (func $~lib/runtime/Root#constructor (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - call $~lib/util/runtime/allocate - i32.const 3 - call $~lib/util/runtime/register - local.set $0 - end - local.get $0 - ) - (func $~lib/runtime/runtime.retain (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/runtime/ROOT - call $~lib/collector/itcm/__ref_link - ) - (func $~lib/runtime/runtime.release (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/allocator/tlsf/__mem_free (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.set $1 - local.get $1 - if - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.set $2 - local.get $2 - i32.load - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.or - i32.store - local.get $1 - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - call $~lib/allocator/tlsf/Root#insert - end - end - ) - (func $~lib/memory/memory.free (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - call $~lib/allocator/tlsf/__mem_free - ) - (func $~lib/collector/itcm/step (; 46 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - block $case0|0 - global.get $~lib/collector/itcm/state - local.set $1 - local.get $1 - i32.const 0 - i32.eq - br_if $case0|0 - local.get $1 - i32.const 1 - i32.eq - br_if $case1|0 - local.get $1 - i32.const 2 - i32.eq - br_if $case2|0 - local.get $1 - i32.const 3 - i32.eq - br_if $case3|0 - br $break|0 - end - unreachable - end - block - call $~lib/runtime/__gc_mark_roots - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - call $~lib/collector/itcm/ManagedObject#set:color - local.get $0 - i32.load - block $~lib/collector/itcm/objToRef|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - end - call $~lib/runtime/__gc_mark_members - else - call $~lib/runtime/__gc_mark_roots - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $1 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $1 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $1 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.ge_u - if - local.get $0 - call $~lib/memory/memory.free - end - else - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - i32.const 1 - global.set $~lib/collector/itcm/state - end - br $break|0 - unreachable - end - unreachable - end - ) - (func $~lib/collector/itcm/__ref_collect (; 47 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/maybeInit - block $break|0 - loop $continue|0 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - call $~lib/collector/itcm/step - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - br_if $continue|1 - end - end - ) - (func $~lib/runtime/runtime.collect (; 48 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/__ref_collect - ) - (func $~lib/runtime/runtime#constructor (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - unreachable - ) - (func $start (; 50 ;) (type $FUNCSIG$v) - i32.const 0 - call $~lib/runtime/Root#constructor - global.set $~lib/runtime/ROOT - ) - (func $~lib/collector/itcm/__ref_mark (; 51 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - call $~lib/collector/itcm/maybeInit - block $~lib/collector/itcm/refToObj|inlined.4 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - end - local.set $2 - local.get $2 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/runtime/__gc_mark_roots (; 52 ;) (type $FUNCSIG$v) - (local $0 i32) - global.get $~lib/runtime/ROOT - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - ) - (func $~lib/runtime/__gc_mark_members (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - block $invalid - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/string/String - local.get $0 - br_table $invalid $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid - end - return - end - return - end - return - end - unreachable - ) - (func $~lib/runtime/__runtime_instanceof (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - block $nope - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/string/String - local.get $0 - br_table $nope $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope - end - local.get $1 - i32.const 1 - i32.eq - return - end - local.get $1 - i32.const 2 - i32.eq - return - end - local.get $1 - i32.const 3 - i32.eq - return - end - i32.const 0 - return - ) - (func $~lib/runtime/__runtime_flags (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - block $invalid - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/string/String - local.get $0 - br_table $invalid $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid - end - i32.const 0 - return - end - i32.const 0 - return - end - i32.const 0 - return - end - unreachable - ) - (func $null (; 56 ;) (type $FUNCSIG$v) - ) - (func $~lib/runtime/runtime.newArray|trampoline (; 57 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 3 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 0 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/runtime/runtime.newArray - ) - (func $~lib/setargc (; 58 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.set $~lib/argc + (func $null (; 0 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/comma.optimized.wat b/tests/compiler/comma.optimized.wat index a0cd1da7b4..aeef5d6d58 100644 --- a/tests/compiler/comma.optimized.wat +++ b/tests/compiler/comma.optimized.wat @@ -1,15 +1,12 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\10\00\00\00c\00o\00m\00m\00a\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\10\00\00\00c\00o\00m\00m\00a\00.\00t\00s") (global $comma/a (mut i32) (i32.const 0)) (global $comma/b (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:comma (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -28,7 +25,7 @@ i32.const 16 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/b @@ -37,7 +34,7 @@ i32.const 16 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/a @@ -55,7 +52,7 @@ i32.const 16 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/b @@ -66,7 +63,7 @@ i32.const 16 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -88,7 +85,7 @@ i32.const 16 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/b @@ -99,7 +96,7 @@ i32.const 16 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/a @@ -119,7 +116,7 @@ i32.const 16 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/b @@ -130,7 +127,7 @@ i32.const 16 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -160,7 +157,7 @@ i32.const 16 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/comma.untouched.wat b/tests/compiler/comma.untouched.wat index b454fae08d..51b4d314c0 100644 --- a/tests/compiler/comma.untouched.wat +++ b/tests/compiler/comma.untouched.wat @@ -1,16 +1,14 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\10\00\00\00c\00o\00m\00m\00a\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\10\00\00\00c\00o\00m\00m\00a\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $comma/a (mut i32) (i32.const 0)) (global $comma/b (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:comma (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -37,7 +35,7 @@ i32.const 16 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/b @@ -49,7 +47,7 @@ i32.const 16 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block @@ -69,7 +67,7 @@ i32.const 16 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/b @@ -81,7 +79,7 @@ i32.const 16 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -108,7 +106,7 @@ i32.const 16 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/b @@ -120,7 +118,7 @@ i32.const 16 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -145,7 +143,7 @@ i32.const 16 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/b @@ -157,7 +155,7 @@ i32.const 16 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|0 @@ -194,7 +192,7 @@ i32.const 16 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block diff --git a/tests/compiler/constructor.json b/tests/compiler/constructor.json index 9e26dfeeb6..b1da366ff4 100644 --- a/tests/compiler/constructor.json +++ b/tests/compiler/constructor.json @@ -1 +1,5 @@ -{} \ No newline at end of file +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index acb305dfbd..6956bc0d45 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -1,1114 +1,61 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 8) "\01\00\00\00,") - (data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 72) "\01\00\00\00(") - (data (i32.const 88) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) - (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $constructor/emptyCtor (mut i32) (i32.const 0)) - (global $constructor/emptyCtorWithFieldInit (mut i32) (i32.const 0)) - (global $constructor/emptyCtorWithFieldNoInit (mut i32) (i32.const 0)) - (global $constructor/none (mut i32) (i32.const 0)) - (global $constructor/justFieldInit (mut i32) (i32.const 0)) - (global $constructor/justFieldNoInit (mut i32) (i32.const 0)) - (global $constructor/ctorReturns (mut i32) (i32.const 0)) - (global $constructor/b (mut i32) (i32.const 1)) - (global $constructor/ctorConditionallyReturns (mut i32) (i32.const 0)) - (global $constructor/ctorAllocates (mut i32) (i32.const 0)) - (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) - (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "$.flags" (func $~lib/runtime/runtime.flags)) - (export "$.newObject" (func $~lib/runtime/runtime.newObject)) - (export "$.newString" (func $~lib/runtime/runtime.newString)) - (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export "$.setArgc" (func $~lib/setargc)) - (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "$.retain" (func $~lib/runtime/runtime.retain)) - (export "$.release" (func $~lib/runtime/runtime.release)) - (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) - (start $start) - (func $~lib/allocator/tlsf/Root#setSLMap (; 1 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 159 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.get $0 - i32.add - local.get $2 - i32.store offset=4 - ) - (func $~lib/allocator/tlsf/Root#setHead (; 2 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 184 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 32 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 185 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 5 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl - local.get $0 - i32.add - local.get $3 - i32.store offset=96 - ) - (func $~lib/allocator/tlsf/Block#get:right (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const -4 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 104 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 8 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 105 - i32.const 11 - call $~lib/env/abort - unreachable - end - local.get $0 - ) - (func $~lib/allocator/tlsf/fls (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 447 - i32.const 2 - call $~lib/env/abort - unreachable - end - i32.const 31 - local.get $0 - i32.clz - i32.sub - ) - (func $~lib/allocator/tlsf/Root#getHead (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 175 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 32 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 176 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 5 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl - local.get $0 - i32.add - i32.load offset=96 - ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 153 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.get $0 - i32.add - i32.load offset=4 - ) - (func $~lib/allocator/tlsf/Root#remove (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.tee $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 277 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and - local.tee $3 - i32.const 16 - i32.ge_u - local.tee $2 - if - local.get $3 - i32.const 1073741824 - i32.lt_u - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 279 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $3 - i32.const 256 - i32.lt_u - if (result i32) - local.get $3 - i32.const 8 - i32.div_u - local.set $4 - i32.const 0 - else - local.get $3 - local.get $3 - call $~lib/allocator/tlsf/fls - local.tee $2 - i32.const 5 - i32.sub - i32.shr_u - i32.const 32 - i32.xor - local.set $4 - local.get $2 - i32.const 7 - i32.sub - end - local.set $2 - local.get $1 - i32.load offset=8 - local.set $3 - local.get $1 - i32.load offset=4 - local.tee $5 - if - local.get $5 - local.get $3 - i32.store offset=8 - end - local.get $3 - if - local.get $3 - local.get $5 - i32.store offset=4 - end - local.get $0 - local.get $2 - local.get $4 - call $~lib/allocator/tlsf/Root#getHead - local.get $1 - i32.eq - if - local.get $0 - local.get $2 - local.get $4 - local.get $3 - call $~lib/allocator/tlsf/Root#setHead - local.get $3 - i32.eqz - if - local.get $0 - local.get $2 - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const 1 - local.get $4 - i32.shl - i32.const -1 - i32.xor - i32.and - local.tee $1 - call $~lib/allocator/tlsf/Root#setSLMap - local.get $1 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $2 - i32.shl - i32.const -1 - i32.xor - i32.and - i32.store - end - end - end - ) - (func $~lib/allocator/tlsf/Block#get:left (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const 2 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 96 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 4 - i32.sub - i32.load - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 97 - i32.const 11 - call $~lib/env/abort - unreachable - end - local.get $0 - ) - (func $~lib/allocator/tlsf/Root#setJump (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 353 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - call $~lib/allocator/tlsf/Block#get:right - local.get $1 - i32.ne - if - i32.const 0 - i32.const 24 - i32.const 354 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - i32.const 2 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 355 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 4 - i32.sub - local.get $0 - i32.store - ) - (func $~lib/allocator/tlsf/Root#insert (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 208 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - local.tee $3 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 210 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - i32.const -4 - i32.and - local.tee $4 - i32.const 16 - i32.ge_u - local.tee $2 - if - local.get $4 - i32.const 1073741824 - i32.lt_u - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 212 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $2 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 216 - i32.const 23 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.load - local.tee $4 - i32.const 1 - i32.and - if - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#remove - local.get $1 - local.get $4 - i32.const -4 - i32.and - i32.const 8 - i32.add - local.get $3 - i32.add - local.tee $3 - i32.store - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $2 - i32.load - local.set $4 - end - local.get $3 - i32.const 2 - i32.and - if - local.get $1 - call $~lib/allocator/tlsf/Block#get:left - local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 230 - i32.const 24 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - local.tee $5 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 232 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#remove - local.get $1 - local.get $3 - i32.const -4 - i32.and - i32.const 8 - i32.add - local.get $5 - i32.add - local.tee $3 - i32.store - end - local.get $2 - local.get $4 - i32.const 2 - i32.or - i32.store - local.get $1 - local.get $2 - call $~lib/allocator/tlsf/Root#setJump - local.get $3 - i32.const -4 - i32.and - local.tee $3 - i32.const 16 - i32.ge_u - local.tee $2 - if - local.get $3 - i32.const 1073741824 - i32.lt_u - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 245 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $3 - i32.const 256 - i32.lt_u - if (result i32) - local.get $3 - i32.const 8 - i32.div_u - local.set $3 - i32.const 0 - else - local.get $3 - local.get $3 - call $~lib/allocator/tlsf/fls - local.tee $2 - i32.const 5 - i32.sub - i32.shr_u - i32.const 32 - i32.xor - local.set $3 - local.get $2 - i32.const 7 - i32.sub - end - local.tee $2 - local.get $3 - call $~lib/allocator/tlsf/Root#getHead - local.set $4 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $4 - i32.store offset=8 - local.get $4 - if - local.get $4 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.get $2 - local.get $3 - local.get $1 - call $~lib/allocator/tlsf/Root#setHead - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $2 - i32.shl - i32.or - i32.store - local.get $0 - local.get $2 - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const 1 - local.get $3 - i32.shl - i32.or - call $~lib/allocator/tlsf/Root#setSLMap - ) - (func $~lib/allocator/tlsf/Root#addMemory (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $2 - i32.gt_u - if - i32.const 0 - i32.const 24 - i32.const 396 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 7 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 397 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 398 - i32.const 4 - call $~lib/env/abort - unreachable - end - i32.const 2912 - i32.load - local.tee $3 - if - local.get $1 - local.get $3 - i32.const 4 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 24 - i32.const 403 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 8 - i32.sub - local.get $3 - i32.eq - if - local.get $3 - i32.load - local.set $4 - local.get $1 - i32.const 8 - i32.sub - local.set $1 - end - else - local.get $1 - local.get $0 - i32.const 2916 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 24 - i32.const 412 - i32.const 6 - call $~lib/env/abort - unreachable - end - end - local.get $2 - local.get $1 - i32.sub - local.tee $2 - i32.const 32 - i32.lt_u - if - return - end - local.get $1 - local.get $4 - i32.const 2 - i32.and - local.get $2 - i32.const 16 - i32.sub - i32.const 1 - i32.or - i32.or - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.tee $2 - i32.const 2 - i32.store - i32.const 2912 - local.get $2 - i32.store - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#insert - ) - (func $~lib/allocator/tlsf/ffs (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 441 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.ctz - ) - (func $~lib/allocator/tlsf/Root#search (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.const 16 - i32.ge_u - local.tee $2 - if - local.get $1 - i32.const 1073741824 - i32.lt_u - local.set $2 - end - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 315 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 256 - i32.lt_u - if (result i32) - i32.const 0 - local.set $2 - local.get $1 - i32.const 8 - i32.div_u - else - local.get $1 - call $~lib/allocator/tlsf/fls - local.tee $3 - i32.const 7 - i32.sub - local.set $2 - local.get $1 - local.get $3 - i32.const 5 - i32.sub - i32.shr_u - i32.const 32 - i32.xor - local.tee $1 - i32.const 31 - i32.lt_u - if (result i32) - local.get $1 - i32.const 1 - i32.add - else - local.get $2 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - end - end - local.set $1 - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const -1 - local.get $1 - i32.shl - i32.and - local.tee $1 - if (result i32) - local.get $0 - local.get $2 - local.get $1 - call $~lib/allocator/tlsf/ffs - call $~lib/allocator/tlsf/Root#getHead - else - local.get $0 - i32.load - i32.const -1 - local.get $2 - i32.const 1 - i32.add - i32.shl - i32.and - local.tee $1 - if (result i32) - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/ffs - local.tee $2 - call $~lib/allocator/tlsf/Root#getSLMap - local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 342 - i32.const 16 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $2 - local.get $1 - call $~lib/allocator/tlsf/ffs - call $~lib/allocator/tlsf/Root#getHead - else - i32.const 0 - end - end - ) - (func $~lib/allocator/tlsf/Root#use (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.tee $4 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 367 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 16 - i32.ge_u - local.tee $3 - if - local.get $2 - i32.const 1073741824 - i32.lt_u - local.set $3 - end - local.get $3 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 368 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 369 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#remove - local.get $4 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $3 - i32.const 24 - i32.ge_u - if - local.get $1 - local.get $4 - i32.const 2 - i32.and - local.get $2 - i32.or - i32.store - local.get $1 - i32.const 8 - i32.add - local.get $2 - i32.add - local.tee $2 - local.get $3 - i32.const 8 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $2 - call $~lib/allocator/tlsf/Root#insert - else - local.get $1 - local.get $4 - i32.const -2 - i32.and - i32.store - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 387 - i32.const 25 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $0 - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 - i32.const 8 - i32.add - ) - (func $~lib/allocator/tlsf/__mem_allocate (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$i (func (result i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $constructor/emptyCtor (mut i32) (i32.const 0)) + (global $constructor/emptyCtorWithFieldInit (mut i32) (i32.const 0)) + (global $constructor/emptyCtorWithFieldNoInit (mut i32) (i32.const 0)) + (global $constructor/none (mut i32) (i32.const 0)) + (global $constructor/justFieldInit (mut i32) (i32.const 0)) + (global $constructor/justFieldNoInit (mut i32) (i32.const 0)) + (global $constructor/ctorReturns (mut i32) (i32.const 0)) + (global $constructor/b (mut i32) (i32.const 1)) + (global $constructor/ctorConditionallyReturns (mut i32) (i32.const 0)) + (global $constructor/ctorAllocates (mut i32) (i32.const 0)) + (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (start $start) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - global.get $~lib/allocator/tlsf/ROOT - local.tee $2 - i32.eqz - if - i32.const 1 - current_memory - local.tee $1 - i32.gt_s - local.tee $2 - if (result i32) - i32.const 1 - local.get $1 - i32.sub - grow_memory - i32.const 0 - i32.lt_s - else - local.get $2 - end - if - unreachable - end - i32.const 128 - local.set $2 - i32.const 128 - global.set $~lib/allocator/tlsf/ROOT - i32.const 2912 - i32.const 0 - i32.store - i32.const 128 - i32.const 0 - i32.store - i32.const 0 - local.set $1 - loop $repeat|0 - local.get $1 - i32.const 22 - i32.lt_u - if - i32.const 128 - local.get $1 - i32.const 0 - call $~lib/allocator/tlsf/Root#setSLMap - i32.const 0 - local.set $3 - loop $repeat|1 - local.get $3 - i32.const 32 - i32.lt_u - if - i32.const 128 - local.get $1 - local.get $3 - i32.const 0 - call $~lib/allocator/tlsf/Root#setHead - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $repeat|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $repeat|0 - end - end - i32.const 128 - i32.const 3048 - current_memory - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - end local.get $0 i32.const 1073741824 i32.gt_u if unreachable end - local.get $2 + global.get $~lib/allocator/arena/offset + local.tee $1 + local.get $0 + i32.const 1 local.get $0 + i32.const 1 + i32.gt_u + select + i32.add i32.const 7 i32.add i32.const -8 i32.and local.tee $0 + current_memory + local.tee $2 i32.const 16 - local.get $0 - i32.const 16 + i32.shl i32.gt_u - select - local.tee $1 - call $~lib/allocator/tlsf/Root#search - local.tee $0 - i32.eqz if - current_memory - local.tee $0 + local.get $2 + local.get $0 local.get $1 + i32.sub i32.const 65535 i32.add i32.const -65536 @@ -1116,7 +63,7 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $0 + local.get $2 local.get $3 i32.gt_s select @@ -1125,184 +72,54 @@ i32.lt_s if local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $2 - local.get $0 - i32.const 16 - i32.shl - current_memory - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - local.get $2 - local.get $1 - call $~lib/allocator/tlsf/Root#search - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 502 - i32.const 12 - call $~lib/env/abort - unreachable - end - end - local.get $0 - i32.load - i32.const -4 - i32.and - local.get $1 - i32.lt_u - if - i32.const 0 - i32.const 24 - i32.const 505 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#use - ) - (func $~lib/util/runtime/allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 15 - i32.add - i32.clz - i32.sub - i32.shl - call $~lib/allocator/tlsf/__mem_allocate - local.tee $1 - i32.const -1520547049 - i32.store - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 16 - i32.add - ) - (func $~lib/collector/itcm/maybeInit (; 17 ;) (type $FUNCSIG$v) - (local $0 i32) - global.get $~lib/collector/itcm/state - i32.eqz - if - i32.const 16 - call $~lib/allocator/tlsf/__mem_allocate - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - local.tee $0 - i32.const -1 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - i32.const 16 - call $~lib/allocator/tlsf/__mem_allocate - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - local.tee $0 - i32.const -1 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=12 - local.set $2 - local.get $1 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.and - local.get $0 - i32.or - i32.store offset=8 - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.and - local.get $1 - i32.or - i32.store offset=8 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end local.get $0 + global.set $~lib/allocator/arena/offset local.get $1 - i32.store offset=12 ) - (func $~lib/collector/itcm/__ref_register (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) - call $~lib/collector/itcm/maybeInit + (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 local.get $0 - i32.const 16 + i32.const 7 + i32.add + i32.clz i32.sub - local.tee $0 - global.get $~lib/collector/itcm/white - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - i32.or - i32.store offset=8 - global.get $~lib/collector/itcm/fromSpace + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add ) - (func $~lib/util/runtime/register (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 128 + i32.const 56 i32.le_u if i32.const 0 - i32.const 88 - i32.const 128 + i32.const 16 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - i32.const 16 + i32.const 8 i32.sub local.tee $2 i32.load @@ -1310,29 +127,25 @@ i32.ne if i32.const 0 - i32.const 88 - i32.const 130 + i32.const 16 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 local.get $1 i32.store - block - local.get $0 - call $~lib/collector/itcm/__ref_register - end local.get $0 ) - (func $constructor/CtorConditionallyAllocates#constructor (; 21 ;) (type $FUNCSIG$i) (result i32) + (func $constructor/CtorConditionallyAllocates#constructor (; 4 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) block (result i32) global.get $constructor/b if i32.const 0 call $~lib/util/runtime/allocate - i32.const 10 + i32.const 26 call $~lib/util/runtime/register local.set $0 end @@ -1342,22 +155,26 @@ if i32.const 0 call $~lib/util/runtime/allocate - i32.const 10 + i32.const 26 call $~lib/util/runtime/register local.set $0 end local.get $0 ) - (func $start:constructor (; 22 ;) (type $FUNCSIG$v) + (func $start:constructor (; 5 ;) (type $FUNCSIG$v) (local $0 i32) + i32.const 56 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset i32.const 0 call $~lib/util/runtime/allocate - i32.const 2 + i32.const 17 call $~lib/util/runtime/register global.set $constructor/emptyCtor i32.const 4 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register local.tee $0 i32.const 1 @@ -1366,7 +183,7 @@ global.set $constructor/emptyCtorWithFieldInit i32.const 4 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 19 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -1375,12 +192,12 @@ global.set $constructor/emptyCtorWithFieldNoInit i32.const 0 call $~lib/util/runtime/allocate - i32.const 5 + i32.const 20 call $~lib/util/runtime/register global.set $constructor/none i32.const 4 call $~lib/util/runtime/allocate - i32.const 6 + i32.const 21 call $~lib/util/runtime/register local.tee $0 i32.const 1 @@ -1389,7 +206,7 @@ global.set $constructor/justFieldInit i32.const 4 call $~lib/util/runtime/allocate - i32.const 7 + i32.const 22 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -1397,776 +214,33 @@ local.get $0 global.set $constructor/justFieldNoInit i32.const 0 - call $~lib/allocator/tlsf/__mem_allocate + call $~lib/allocator/arena/__mem_allocate global.set $constructor/ctorReturns block $__inlined_func$constructor/CtorConditionallyReturns#constructor (result i32) global.get $constructor/b if i32.const 0 - call $~lib/allocator/tlsf/__mem_allocate + call $~lib/allocator/arena/__mem_allocate br $__inlined_func$constructor/CtorConditionallyReturns#constructor end i32.const 0 call $~lib/util/runtime/allocate - i32.const 8 + i32.const 24 call $~lib/util/runtime/register end global.set $constructor/ctorConditionallyReturns i32.const 0 call $~lib/util/runtime/allocate - i32.const 9 + i32.const 25 call $~lib/util/runtime/register global.set $constructor/ctorAllocates call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates ) - (func $~lib/runtime/runtime.instanceof (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - if (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load - local.get $1 - call $~lib/runtime/__runtime_instanceof - else - i32.const 0 - end - ) - (func $~lib/runtime/runtime.flags (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - block $folding-inner0 - block $invalid - local.get $0 - i32.const 1 - i32.sub - br_table $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $invalid - end - unreachable - end - i32.const 0 - ) - (func $~lib/runtime/runtime.newObject (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/util/runtime/allocate - local.get $1 - call $~lib/util/runtime/register - ) - (func $~lib/runtime/runtime.newString (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/runtime/runtime.newObject - ) - (func $~lib/runtime/runtime.newArrayBuffer (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 11 - call $~lib/runtime/runtime.newObject - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/collector/itcm/iter - local.get $0 - i32.eq - if - local.get $0 - i32.load offset=12 - global.set $~lib/collector/itcm/iter - end - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.load offset=12 - local.tee $1 - i32.store offset=12 - local.get $1 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.and - local.get $2 - i32.or - i32.store offset=8 - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - i32.const 2 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/__ref_link (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - call $~lib/collector/itcm/maybeInit - global.get $~lib/collector/itcm/white - i32.eqz - local.get $1 - i32.const 16 - i32.sub - local.tee $2 - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - local.tee $1 - if (result i32) - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - else - local.get $1 - end - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/memory/memory.copy (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 - end - end - end - loop $continue|2 - local.get $2 - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|3 - end - end - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - br $continue|4 - end - end - end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - end - ) - (func $~lib/runtime/runtime.newArray (; 31 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 16 - call $~lib/util/runtime/allocate - local.get $2 - call $~lib/util/runtime/register - local.tee $2 - local.set $6 - local.get $0 - local.get $1 - i32.shl - local.tee $4 - call $~lib/util/runtime/allocate - i32.const 11 - call $~lib/util/runtime/register - local.tee $5 - local.tee $1 - local.get $2 - i32.load - i32.ne - if - local.get $1 - local.get $6 - call $~lib/collector/itcm/__ref_link - end - local.get $2 - local.get $1 - i32.store - local.get $2 - local.get $5 - i32.store offset=4 - local.get $2 - local.get $4 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=12 - local.get $3 - if - local.get $5 - local.get $3 - local.get $4 - call $~lib/memory/memory.copy - end - local.get $2 - ) - (func $~lib/runtime/runtime.retain (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/runtime/ROOT - call $~lib/collector/itcm/__ref_link - ) - (func $~lib/runtime/runtime.release (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/allocator/tlsf/__mem_free (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.tee $1 - if - local.get $0 - i32.const 8 - i32.sub - local.tee $2 - i32.load - local.tee $3 - i32.const 1 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - i32.const 1 - i32.or - i32.store - local.get $1 - local.get $0 - i32.const 8 - i32.sub - call $~lib/allocator/tlsf/Root#insert - end - end - ) - (func $~lib/collector/itcm/step (; 35 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - if - local.get $0 - i32.const 1 - i32.sub - br_table $case1|0 $case2|0 $case3|0 $break|0 - end - unreachable - end - call $~lib/runtime/__gc_mark_roots - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - end - global.get $~lib/collector/itcm/iter - i32.load offset=8 - i32.const -4 - i32.and - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - i32.or - i32.store offset=8 - local.get $0 - i32.load - call $~lib/runtime/__gc_mark_members - else - call $~lib/runtime/__gc_mark_roots - global.get $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/iter - i32.load offset=8 - i32.const -4 - i32.and - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $0 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $0 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - end - global.get $~lib/collector/itcm/iter - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - i32.load offset=8 - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - local.get $0 - i32.const 128 - i32.ge_u - if - local.get $0 - call $~lib/allocator/tlsf/__mem_free - end - else - global.get $~lib/collector/itcm/toSpace - local.tee $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - i32.const 1 - global.set $~lib/collector/itcm/state - end - end - ) - (func $~lib/collector/itcm/__ref_collect (; 36 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/maybeInit - loop $continue|0 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|0 - end - end - loop $continue|1 - call $~lib/collector/itcm/step - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - br_if $continue|1 - end - ) - (func $~lib/runtime/runtime.collect (; 37 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/__ref_collect - ) - (func $start (; 38 ;) (type $FUNCSIG$v) + (func $start (; 6 ;) (type $FUNCSIG$v) call $start:constructor - i32.const 0 - call $~lib/util/runtime/allocate - i32.const 12 - call $~lib/util/runtime/register - global.set $~lib/runtime/ROOT - ) - (func $~lib/collector/itcm/__ref_mark (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) - call $~lib/collector/itcm/maybeInit - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/runtime/__gc_mark_roots (; 40 ;) (type $FUNCSIG$v) - (local $0 i32) - global.get $~lib/runtime/ROOT - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/emptyCtor - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/emptyCtorWithFieldInit - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/emptyCtorWithFieldNoInit - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/none - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/justFieldInit - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/justFieldNoInit - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/ctorReturns - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/ctorConditionallyReturns - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/ctorAllocates - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/ctorConditionallyAllocates - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - ) - (func $~lib/runtime/__gc_mark_members (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) - block $invalid - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $constructor/CtorConditionallyAllocates - block $constructor/CtorAllocates - block $constructor/CtorConditionallyReturns - block $constructor/JustFieldNoInit - block $constructor/JustFieldInit - block $constructor/None - block $constructor/EmptyCtorWithFieldNoInit - block $constructor/EmptyCtorWithFieldInit - block $constructor/EmptyCtor - block $~lib/string/String - local.get $0 - i32.const 1 - i32.sub - br_table $~lib/string/String $constructor/EmptyCtor $constructor/EmptyCtorWithFieldInit $constructor/EmptyCtorWithFieldNoInit $constructor/None $constructor/JustFieldInit $constructor/JustFieldNoInit $constructor/CtorConditionallyReturns $constructor/CtorAllocates $constructor/CtorConditionallyAllocates $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - unreachable ) - (func $~lib/runtime/__runtime_instanceof (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - block $nope - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $constructor/CtorConditionallyAllocates - block $constructor/CtorAllocates - block $constructor/CtorConditionallyReturns - block $constructor/JustFieldNoInit - block $constructor/JustFieldInit - block $constructor/None - block $constructor/EmptyCtorWithFieldNoInit - block $constructor/EmptyCtorWithFieldInit - block $constructor/EmptyCtor - block $~lib/string/String - local.get $0 - i32.const 1 - i32.sub - br_table $~lib/string/String $constructor/EmptyCtor $constructor/EmptyCtorWithFieldInit $constructor/EmptyCtorWithFieldNoInit $constructor/None $constructor/JustFieldInit $constructor/JustFieldNoInit $constructor/CtorConditionallyReturns $constructor/CtorAllocates $constructor/CtorConditionallyAllocates $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope - end - local.get $1 - i32.const 1 - i32.eq - return - end - local.get $1 - i32.const 2 - i32.eq - return - end - local.get $1 - i32.const 3 - i32.eq - return - end - local.get $1 - i32.const 4 - i32.eq - return - end - local.get $1 - i32.const 5 - i32.eq - return - end - local.get $1 - i32.const 6 - i32.eq - return - end - local.get $1 - i32.const 7 - i32.eq - return - end - local.get $1 - i32.const 8 - i32.eq - return - end - local.get $1 - i32.const 9 - i32.eq - return - end - local.get $1 - i32.const 10 - i32.eq - return - end - local.get $1 - i32.const 11 - i32.eq - return - end - local.get $1 - i32.const 12 - i32.eq - return - end - i32.const 0 - ) - (func $null (; 43 ;) (type $FUNCSIG$v) + (func $null (; 7 ;) (type $FUNCSIG$v) nop ) - (func $~lib/runtime/runtime.newArray|trampoline (; 44 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 3 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 0 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/runtime/runtime.newArray - ) - (func $~lib/setargc (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.set $~lib/argc - ) ) diff --git a/tests/compiler/constructor.ts b/tests/compiler/constructor.ts index 89ee7be427..c039c67710 100644 --- a/tests/compiler/constructor.ts +++ b/tests/compiler/constructor.ts @@ -1,3 +1,5 @@ +import "allocator/arena"; + // trailing conditional allocate class EmptyCtor { constructor() {} diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index 80582d771f..b0b552a029 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -1,44 +1,18 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") - (data (i32.const 72) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) - (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) - (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) - (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) - (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) - (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) - (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) - (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) - (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) - (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) - (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) - (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) - (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) - (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) - (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) - (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $constructor/emptyCtor (mut i32) (i32.const 0)) (global $constructor/emptyCtorWithFieldInit (mut i32) (i32.const 0)) (global $constructor/emptyCtorWithFieldNoInit (mut i32) (i32.const 0)) @@ -50,23 +24,8 @@ (global $constructor/ctorConditionallyReturns (mut i32) (i32.const 0)) (global $constructor/ctorAllocates (mut i32) (i32.const 0)) (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) - (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 128)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) (export "memory" (memory $0)) - (export "table" (table $0)) - (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) - (export "$.flags" (func $~lib/runtime/runtime.flags)) - (export "$.newObject" (func $~lib/runtime/runtime.newObject)) - (export "$.newString" (func $~lib/runtime/runtime.newString)) - (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export "$.setArgc" (func $~lib/setargc)) - (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) - (export "$.retain" (func $~lib/runtime/runtime.retain)) - (export "$.release" (func $~lib/runtime/runtime.release)) - (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -80,2623 +39,337 @@ i32.sub i32.shl ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 0 - local.get $1 - i32.store offset=2912 - ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u if + local.get $4 + local.get $1 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select + local.set $3 + local.get $3 + grow_memory i32.const 0 - i32.const 24 - i32.const 159 - i32.const 4 - call $~lib/env/abort - unreachable + i32.lt_s + if + local.get $2 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate + return + ) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 local.get $1 - i32.const 4 - i32.mul - i32.add - local.get $2 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 i32.store offset=4 - ) - (func $~lib/allocator/tlsf/Root#setHead (; 4 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u i32.eqz if i32.const 0 - i32.const 24 - i32.const 184 + i32.const 16 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 local.get $2 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq i32.eqz if i32.const 0 - i32.const 24 - i32.const 185 + i32.const 16 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.mul local.get $2 - i32.add - i32.const 4 - i32.mul - i32.add - local.get $3 - i32.store offset=96 - ) - (func $~lib/allocator/tlsf/Root#get:tailRef (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 - i32.load offset=2912 + local.get $1 + i32.store + local.get $0 ) - (func $~lib/allocator/tlsf/Block#get:right (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $constructor/EmptyCtor#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and i32.eqz if i32.const 0 - i32.const 24 - i32.const 104 - i32.const 4 - call $~lib/env/abort - unreachable + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + local.set $0 end local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.add + ) + (func $constructor/EmptyCtorWithFieldInit#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - i32.add - local.tee $1 i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 105 - i32.const 11 - call $~lib/env/abort - unreachable - else - local.get $1 + if + i32.const 4 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register + local.set $0 end + local.get $0 + i32.const 1 + i32.store + local.get $0 ) - (func $~lib/allocator/tlsf/fls (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 0 - i32.ne i32.eqz if - i32.const 0 - i32.const 24 - i32.const 447 - i32.const 2 - call $~lib/env/abort - unreachable + i32.const 4 + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register + local.set $0 end - i32.const 31 local.get $0 - i32.clz - i32.sub + i32.const 0 + i32.store + local.get $0 ) - (func $~lib/allocator/tlsf/Root#getHead (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u + (func $constructor/None#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 i32.eqz if i32.const 0 - i32.const 24 - i32.const 175 - i32.const 4 - call $~lib/env/abort - unreachable + call $~lib/util/runtime/allocate + i32.const 20 + call $~lib/util/runtime/register + local.set $0 end - local.get $2 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u + local.get $0 + ) + (func $constructor/JustFieldInit#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 i32.eqz if - i32.const 0 - i32.const 24 - i32.const 176 i32.const 4 - call $~lib/env/abort - unreachable + call $~lib/util/runtime/allocate + i32.const 21 + call $~lib/util/runtime/register + local.set $0 end local.get $0 - local.get $1 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.mul - local.get $2 - i32.add - i32.const 4 - i32.mul - i32.add - i32.load offset=96 + i32.const 1 + i32.store + local.get $0 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u + (func $constructor/JustFieldNoInit#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 i32.eqz if - i32.const 0 - i32.const 24 - i32.const 153 i32.const 4 - call $~lib/env/abort - unreachable + call $~lib/util/runtime/allocate + i32.const 22 + call $~lib/util/runtime/register + local.set $0 end local.get $0 - local.get $1 - i32.const 4 - i32.mul - i32.add - i32.load offset=4 + i32.const 0 + i32.store + local.get $0 ) - (func $~lib/allocator/tlsf/Root#remove (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 - i32.load - local.set $2 - local.get $2 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz + (func $constructor/CtorReturns#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + call $~lib/memory/memory.allocate + ) + (func $constructor/CtorConditionallyReturns#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + global.get $constructor/b if i32.const 0 - i32.const 24 - i32.const 277 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $4 - if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $4 + call $~lib/memory/memory.allocate + return end + local.get $0 i32.eqz if i32.const 0 + call $~lib/util/runtime/allocate i32.const 24 - i32.const 279 - i32.const 4 - call $~lib/env/abort - unreachable + call $~lib/util/runtime/register + local.set $0 end - local.get $3 - global.get $~lib/allocator/tlsf/SB_SIZE - i32.lt_u + local.get $0 + ) + (func $constructor/CtorAllocates#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + block (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 25 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + end + drop + local.get $0 + ) + (func $constructor/CtorConditionallyAllocates#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + global.get $constructor/b if - i32.const 0 - local.set $5 - local.get $3 - i32.const 8 - i32.div_u - local.set $6 - else - local.get $3 - call $~lib/allocator/tlsf/fls - local.set $5 - local.get $3 - local.get $5 - global.get $~lib/allocator/tlsf/SL_BITS - i32.sub - i32.shr_u - i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS - i32.shl - i32.xor - local.set $6 - local.get $5 - global.get $~lib/allocator/tlsf/SB_BITS - i32.const 1 - i32.sub - i32.sub - local.set $5 - end - local.get $1 - i32.load offset=4 - local.set $7 - local.get $1 - i32.load offset=8 - local.set $8 - local.get $7 - if - local.get $7 - local.get $8 - i32.store offset=8 - end - local.get $8 - if - local.get $8 - local.get $7 - i32.store offset=4 - end - local.get $1 - local.get $0 - local.get $5 - local.get $6 - call $~lib/allocator/tlsf/Root#getHead - i32.eq - if - local.get $0 - local.get $5 - local.get $6 - local.get $8 - call $~lib/allocator/tlsf/Root#setHead - local.get $8 - i32.eqz - if - local.get $0 - local.get $5 - call $~lib/allocator/tlsf/Root#getSLMap - local.set $4 - local.get $0 - local.get $5 - local.get $4 - i32.const 1 - local.get $6 - i32.shl - i32.const -1 - i32.xor - i32.and - local.tee $4 - call $~lib/allocator/tlsf/Root#setSLMap - local.get $4 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $5 - i32.shl - i32.const -1 - i32.xor - i32.and - i32.store - end - end - end - ) - (func $~lib/allocator/tlsf/Block#get:left (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 96 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 4 - i32.sub - i32.load - local.tee $1 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 97 - i32.const 11 - call $~lib/env/abort - unreachable - else - local.get $1 - end - ) - (func $~lib/allocator/tlsf/Root#setJump (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - i32.load - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 353 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.get $2 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 354 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 355 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 4 - i32.sub - local.get $1 - i32.store - ) - (func $~lib/allocator/tlsf/Root#insert (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 208 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - local.set $2 - local.get $2 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 210 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.tee $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $4 - if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $4 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 212 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 216 - i32.const 23 - call $~lib/env/abort - unreachable - else - local.get $4 - end - local.set $5 - local.get $5 - i32.load - local.set $6 - local.get $6 - global.get $~lib/allocator/tlsf/FREE - i32.and - if - local.get $0 - local.get $5 - call $~lib/allocator/tlsf/Root#remove - local.get $1 - local.get $2 - global.get $~lib/allocator/tlsf/Block.INFO - local.get $6 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - i32.add - i32.add - local.tee $2 - i32.store - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.set $5 - local.get $5 - i32.load - local.set $6 - end - local.get $2 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - if - local.get $1 - call $~lib/allocator/tlsf/Block#get:left - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 230 - i32.const 24 - call $~lib/env/abort - unreachable - else - local.get $4 - end - local.set $4 - local.get $4 - i32.load - local.set $7 - local.get $7 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 232 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $4 - call $~lib/allocator/tlsf/Root#remove - local.get $4 - local.get $7 - global.get $~lib/allocator/tlsf/Block.INFO - local.get $2 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - i32.add - i32.add - local.tee $7 - i32.store - local.get $4 - local.set $1 - local.get $7 - local.set $2 - end - local.get $5 - local.get $6 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.or - i32.store - local.get $0 - local.get $1 - local.get $5 - call $~lib/allocator/tlsf/Root#setJump - local.get $2 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $7 - if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $7 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 245 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $3 - global.get $~lib/allocator/tlsf/SB_SIZE - i32.lt_u - if - i32.const 0 - local.set $8 - local.get $3 - i32.const 8 - i32.div_u - local.set $9 - else - local.get $3 - call $~lib/allocator/tlsf/fls - local.set $8 - local.get $3 - local.get $8 - global.get $~lib/allocator/tlsf/SL_BITS - i32.sub - i32.shr_u - i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS - i32.shl - i32.xor - local.set $9 - local.get $8 - global.get $~lib/allocator/tlsf/SB_BITS - i32.const 1 - i32.sub - i32.sub - local.set $8 - end - local.get $0 - local.get $8 - local.get $9 - call $~lib/allocator/tlsf/Root#getHead - local.set $10 - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $10 - i32.store offset=8 - local.get $10 - if - local.get $10 - local.get $1 - i32.store offset=4 - end - local.get $0 - local.get $8 - local.get $9 - local.get $1 - call $~lib/allocator/tlsf/Root#setHead - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $8 - i32.shl - i32.or - i32.store - local.get $0 - local.get $8 - local.get $0 - local.get $8 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const 1 - local.get $9 - i32.shl - i32.or - call $~lib/allocator/tlsf/Root#setSLMap - ) - (func $~lib/allocator/tlsf/Root#addMemory (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 - local.get $2 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 396 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 397 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 398 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - call $~lib/allocator/tlsf/Root#get:tailRef - local.set $3 - i32.const 0 - local.set $4 - local.get $3 - if - local.get $1 - local.get $3 - i32.const 4 - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 403 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.get $3 - i32.eq - if - local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.set $1 - local.get $3 - i32.load - local.set $4 - end - else - local.get $1 - local.get $0 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 412 - i32.const 6 - call $~lib/env/abort - unreachable - end - end - local.get $2 - local.get $1 - i32.sub - local.set $5 - local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.add - global.get $~lib/allocator/tlsf/Block.INFO - i32.add - i32.lt_u - if - i32.const 0 - return - end - local.get $5 - i32.const 2 - global.get $~lib/allocator/tlsf/Block.INFO - i32.mul - i32.sub - local.set $6 - local.get $1 - local.set $7 - local.get $7 - local.get $6 - global.get $~lib/allocator/tlsf/FREE - i32.or - local.get $4 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - i32.or - i32.store - local.get $7 - i32.const 0 - i32.store offset=4 - local.get $7 - i32.const 0 - i32.store offset=8 - local.get $1 - local.get $5 - i32.add - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.set $8 - local.get $8 - i32.const 0 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.or - i32.store - local.get $0 - local.get $8 - call $~lib/allocator/tlsf/Root#set:tailRef - local.get $0 - local.get $7 - call $~lib/allocator/tlsf/Root#insert - i32.const 1 - ) - (func $~lib/allocator/tlsf/ffs (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 441 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.ctz - ) - (func $~lib/allocator/tlsf/ffs (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 441 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.ctz - ) - (func $~lib/allocator/tlsf/Root#search (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $1 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $2 - if (result i32) - local.get $1 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $2 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 315 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - global.get $~lib/allocator/tlsf/SB_SIZE - i32.lt_u - if - i32.const 0 - local.set $3 - local.get $1 - i32.const 8 - i32.div_u - local.set $4 - else - local.get $1 - call $~lib/allocator/tlsf/fls - local.set $3 - local.get $1 - local.get $3 - global.get $~lib/allocator/tlsf/SL_BITS - i32.sub - i32.shr_u - i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS - i32.shl - i32.xor - local.set $4 - local.get $3 - global.get $~lib/allocator/tlsf/SB_BITS - i32.const 1 - i32.sub - i32.sub - local.set $3 - local.get $4 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.const 1 - i32.sub - i32.lt_u - if - local.get $4 - i32.const 1 - i32.add - local.set $4 - else - local.get $3 - i32.const 1 - i32.add - local.set $3 - i32.const 0 - local.set $4 - end - end - local.get $0 - local.get $3 - call $~lib/allocator/tlsf/Root#getSLMap - i32.const 0 - i32.const -1 - i32.xor - local.get $4 - i32.shl - i32.and - local.set $5 - local.get $5 - i32.eqz - if - local.get $0 - i32.load - i32.const 0 - i32.const -1 - i32.xor - local.get $3 - i32.const 1 - i32.add - i32.shl - i32.and - local.set $2 - local.get $2 - i32.eqz - if - i32.const 0 - local.set $6 - else - local.get $2 - call $~lib/allocator/tlsf/ffs - local.set $3 - local.get $0 - local.get $3 - call $~lib/allocator/tlsf/Root#getSLMap - local.tee $7 - if (result i32) - local.get $7 - else - i32.const 0 - i32.const 24 - i32.const 342 - i32.const 16 - call $~lib/env/abort - unreachable - end - local.set $5 - local.get $0 - local.get $3 - local.get $5 - call $~lib/allocator/tlsf/ffs - call $~lib/allocator/tlsf/Root#getHead - local.set $6 - end - else - local.get $0 - local.get $3 - local.get $5 - call $~lib/allocator/tlsf/ffs - call $~lib/allocator/tlsf/Root#getHead - local.set $6 - end - local.get $6 - ) - (func $~lib/allocator/tlsf/Root#use (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 367 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $4 - if (result i32) - local.get $2 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $4 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 368 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 369 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/allocator/tlsf/Root#remove - local.get $3 - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.sub - local.set $5 - local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.add - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and - i32.or - i32.store - local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO - i32.add - local.get $2 - i32.add - local.set $4 - local.get $4 - local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - global.get $~lib/allocator/tlsf/FREE - i32.or - i32.store - local.get $0 - local.get $4 - call $~lib/allocator/tlsf/Root#insert - else - local.get $1 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.const -1 - i32.xor - i32.and - i32.store - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 387 - i32.const 25 - call $~lib/env/abort - unreachable - else - local.get $4 - end - local.set $4 - local.get $4 - local.get $4 - i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.const -1 - i32.xor - i32.and - i32.store - end - local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO - i32.add - ) - (func $~lib/allocator/tlsf/__mem_allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - global.get $~lib/allocator/tlsf/ROOT - local.set $1 - local.get $1 - i32.eqz - if - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $2 - current_memory - local.set $3 - local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $4 - local.get $4 - local.get $3 - i32.gt_s - local.tee $5 - if (result i32) - local.get $4 - local.get $3 - i32.sub - grow_memory - i32.const 0 - i32.lt_s - else - local.get $5 - end - if - unreachable - end - local.get $2 - local.tee $1 - global.set $~lib/allocator/tlsf/ROOT - local.get $1 - i32.const 0 - call $~lib/allocator/tlsf/Root#set:tailRef - local.get $1 - i32.const 0 - i32.store - block $break|0 - i32.const 0 - local.set $5 - loop $repeat|0 - local.get $5 - global.get $~lib/allocator/tlsf/FL_BITS - i32.lt_u - i32.eqz - br_if $break|0 - block - local.get $1 - local.get $5 - i32.const 0 - call $~lib/allocator/tlsf/Root#setSLMap - block $break|1 - i32.const 0 - local.set $6 - loop $repeat|1 - local.get $6 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u - i32.eqz - br_if $break|1 - local.get $1 - local.get $5 - local.get $6 - i32.const 0 - call $~lib/allocator/tlsf/Root#setHead - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $repeat|1 - unreachable - end - unreachable - end - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $repeat|0 - unreachable - end - unreachable - end - local.get $1 - local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - current_memory - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - drop - end - local.get $0 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.gt_u - if - unreachable - end - local.get $0 - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.tee $4 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - local.tee $3 - local.get $4 - local.get $3 - i32.gt_u - select - local.set $0 - local.get $1 - local.get $0 - call $~lib/allocator/tlsf/Root#search - local.set $7 - local.get $7 - i32.eqz - if - current_memory - local.set $4 - local.get $0 - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $3 - local.get $4 - local.tee $2 - local.get $3 - local.tee $5 - local.get $2 - local.get $5 - i32.gt_s - select - local.set $2 - local.get $2 - grow_memory - i32.const 0 - i32.lt_s - if - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - current_memory - local.set $5 - local.get $1 - local.get $4 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shl - call $~lib/allocator/tlsf/Root#addMemory - drop - local.get $1 - local.get $0 - call $~lib/allocator/tlsf/Root#search - local.tee $6 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 502 - i32.const 12 - call $~lib/env/abort - unreachable - else - local.get $6 - end - local.set $7 - end - local.get $7 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor - i32.and - local.get $0 - i32.ge_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 505 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $1 - local.get $7 - local.get $0 - call $~lib/allocator/tlsf/Root#use - ) - (func $~lib/memory/memory.allocate (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/tlsf/__mem_allocate - return - ) - (func $~lib/util/runtime/allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - call $~lib/util/runtime/adjust - call $~lib/memory/memory.allocate - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_MAGIC - i32.store - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - ) - (func $~lib/collector/itcm/ManagedObjectList#clear (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - local.get $0 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store offset=12 - ) - (func $~lib/collector/itcm/maybeInit (; 23 ;) (type $FUNCSIG$v) - global.get $~lib/collector/itcm/state - i32.const 0 - i32.eq - if - global.get $~lib/util/runtime/HEADER_SIZE - call $~lib/memory/memory.allocate - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - i32.const -1 - i32.store - global.get $~lib/collector/itcm/fromSpace - i32.const 0 - i32.store offset=4 - global.get $~lib/collector/itcm/fromSpace - call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/util/runtime/HEADER_SIZE - call $~lib/memory/memory.allocate - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - i32.const -1 - i32.store - global.get $~lib/collector/itcm/toSpace - i32.const 0 - i32.store offset=4 - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - ) - (func $~lib/collector/itcm/ManagedObject#set:color (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $1 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.and - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=12 - local.set $2 - local.get $1 - local.get $0 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/collector/itcm/__ref_register (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - call $~lib/collector/itcm/maybeInit - block $~lib/collector/itcm/refToObj|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - end - local.set $2 - local.get $2 - global.get $~lib/collector/itcm/white - call $~lib/collector/itcm/ManagedObject#set:color - global.get $~lib/collector/itcm/fromSpace - local.get $2 - call $~lib/collector/itcm/ManagedObjectList#push - ) - (func $~lib/util/runtime/register (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 88 - i32.const 128 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - local.set $2 - local.get $2 - i32.load - global.get $~lib/util/runtime/HEADER_MAGIC - i32.eq - i32.eqz - if - i32.const 0 - i32.const 88 - i32.const 130 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $1 - i32.store - local.get $0 - call $~lib/collector/itcm/__ref_register - local.get $0 - ) - (func $constructor/EmptyCtor#constructor (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - call $~lib/util/runtime/allocate - i32.const 2 - call $~lib/util/runtime/register - local.set $0 - end - local.get $0 - ) - (func $constructor/EmptyCtorWithFieldInit#constructor (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 4 - call $~lib/util/runtime/allocate - i32.const 3 - call $~lib/util/runtime/register - local.set $0 - end - local.get $0 - i32.const 1 - i32.store - local.get $0 - ) - (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 4 - call $~lib/util/runtime/allocate - i32.const 4 - call $~lib/util/runtime/register - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - ) - (func $constructor/None#constructor (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - call $~lib/util/runtime/allocate - i32.const 5 - call $~lib/util/runtime/register - local.set $0 - end - local.get $0 - ) - (func $constructor/JustFieldInit#constructor (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 4 - call $~lib/util/runtime/allocate - i32.const 6 - call $~lib/util/runtime/register - local.set $0 - end - local.get $0 - i32.const 1 - i32.store - local.get $0 - ) - (func $constructor/JustFieldNoInit#constructor (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 4 - call $~lib/util/runtime/allocate - i32.const 7 - call $~lib/util/runtime/register - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - ) - (func $constructor/CtorReturns#constructor (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 - call $~lib/memory/memory.allocate - ) - (func $constructor/CtorConditionallyReturns#constructor (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - global.get $constructor/b - if - i32.const 0 - call $~lib/memory/memory.allocate - return - end - local.get $0 - i32.eqz - if - i32.const 0 - call $~lib/util/runtime/allocate - i32.const 8 - call $~lib/util/runtime/register - local.set $0 - end - local.get $0 - ) - (func $constructor/CtorAllocates#constructor (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - block (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - call $~lib/util/runtime/allocate - i32.const 9 - call $~lib/util/runtime/register - local.set $0 - end - local.get $0 - end - drop - local.get $0 - ) - (func $constructor/CtorConditionallyAllocates#constructor (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - global.get $constructor/b - if - block (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - call $~lib/util/runtime/allocate - i32.const 10 - call $~lib/util/runtime/register - local.set $0 - end - local.get $0 - end - drop - end - local.get $0 - i32.eqz - if - i32.const 0 - call $~lib/util/runtime/allocate - i32.const 10 - call $~lib/util/runtime/register - local.set $0 - end - local.get $0 - ) - (func $start:constructor (; 39 ;) (type $FUNCSIG$v) - i32.const 0 - call $constructor/EmptyCtor#constructor - global.set $constructor/emptyCtor - i32.const 0 - call $constructor/EmptyCtorWithFieldInit#constructor - global.set $constructor/emptyCtorWithFieldInit - i32.const 0 - call $constructor/EmptyCtorWithFieldNoInit#constructor - global.set $constructor/emptyCtorWithFieldNoInit - i32.const 0 - call $constructor/None#constructor - global.set $constructor/none - i32.const 0 - call $constructor/JustFieldInit#constructor - global.set $constructor/justFieldInit - i32.const 0 - call $constructor/JustFieldNoInit#constructor - global.set $constructor/justFieldNoInit - i32.const 0 - call $constructor/CtorReturns#constructor - global.set $constructor/ctorReturns - i32.const 0 - call $constructor/CtorConditionallyReturns#constructor - global.set $constructor/ctorConditionallyReturns - i32.const 0 - call $constructor/CtorAllocates#constructor - global.set $constructor/ctorAllocates - i32.const 0 - call $constructor/CtorConditionallyAllocates#constructor - global.set $constructor/ctorConditionallyAllocates - ) - (func $~lib/runtime/runtime.instanceof (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - if (result i32) - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - i32.load - local.get $1 - call $~lib/runtime/__runtime_instanceof - else - i32.const 0 - end - ) - (func $~lib/runtime/runtime.flags (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/__runtime_flags - ) - (func $~lib/runtime/runtime.newObject (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/util/runtime/allocate - local.get $1 - call $~lib/util/runtime/register - ) - (func $~lib/runtime/runtime.newString (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/runtime/runtime.newObject - ) - (func $~lib/runtime/runtime.newArrayBuffer (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 11 - call $~lib/runtime/runtime.newObject - ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 - i32.const 3 - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 - i32.const 3 - i32.const -1 - i32.xor - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 47 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - local.set $1 - local.get $0 - i32.load offset=12 - local.set $2 - local.get $1 - local.get $2 - i32.store offset=12 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/collector/itcm/iter - i32.eq - if - local.get $0 - i32.load offset=12 - global.set $~lib/collector/itcm/iter - end - local.get $0 - call $~lib/collector/itcm/ManagedObject#unlink - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 2 - i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/__ref_link (; 49 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - call $~lib/collector/itcm/maybeInit - block $~lib/collector/itcm/refToObj|inlined.1 (result i32) - local.get $1 - local.set $2 - local.get $2 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - end - local.set $3 - local.get $3 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eqz - i32.eq - local.tee $2 - if (result i32) - block $~lib/collector/itcm/refToObj|inlined.3 (result i32) - local.get $0 - local.set $2 - local.get $2 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - end - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - else - local.get $2 - end - if - local.get $3 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/memory/memory.copy (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and + block (result i32) local.get $0 - i32.const 7 - i32.and - i32.eq + i32.eqz if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - br $continue|1 - end - end - end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|2 - end - end + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 26 + call $~lib/util/runtime/register + local.set $0 end - else - local.get $1 - i32.const 7 - i32.and local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - end - br $continue|3 - end - end - end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 - end - end - end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end end + drop end - ) - (func $~lib/runtime/runtime.newArray (; 51 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - i32.const 16 - call $~lib/util/runtime/allocate - local.get $2 - call $~lib/util/runtime/register - local.set $4 - local.get $0 - local.get $1 - i32.shl - local.set $5 - local.get $5 - call $~lib/util/runtime/allocate - i32.const 11 - call $~lib/util/runtime/register - local.set $6 - local.get $4 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - i32.load - local.tee $9 - i32.ne - if (result i32) - nop - local.get $8 - local.get $7 - call $~lib/collector/itcm/__ref_link - local.get $8 - else - local.get $8 - end - i32.store - local.get $4 - local.get $6 - i32.store offset=4 - local.get $4 - local.get $5 - i32.store offset=8 - local.get $4 - local.get $0 - i32.store offset=12 - local.get $3 - if - local.get $6 - local.get $3 - local.get $5 - call $~lib/memory/memory.copy - end - local.get $4 - ) - (func $~lib/runtime/Root#constructor (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 call $~lib/util/runtime/allocate - i32.const 12 + i32.const 26 call $~lib/util/runtime/register local.set $0 end local.get $0 ) - (func $~lib/runtime/runtime.retain (; 53 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/runtime/ROOT - call $~lib/collector/itcm/__ref_link - ) - (func $~lib/runtime/runtime.release (; 54 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/allocator/tlsf/__mem_free (; 55 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - if - global.get $~lib/allocator/tlsf/ROOT - local.set $1 - local.get $1 - if - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - local.set $2 - local.get $2 - i32.load - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 518 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $3 - global.get $~lib/allocator/tlsf/FREE - i32.or - i32.store - local.get $1 - local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO - i32.sub - call $~lib/allocator/tlsf/Root#insert - end - end - ) - (func $~lib/memory/memory.free (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - call $~lib/allocator/tlsf/__mem_free - ) - (func $~lib/collector/itcm/step (; 57 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - block $case0|0 - global.get $~lib/collector/itcm/state - local.set $1 - local.get $1 - i32.const 0 - i32.eq - br_if $case0|0 - local.get $1 - i32.const 1 - i32.eq - br_if $case1|0 - local.get $1 - i32.const 2 - i32.eq - br_if $case2|0 - local.get $1 - i32.const 3 - i32.eq - br_if $case3|0 - br $break|0 - end - unreachable - end - block - call $~lib/runtime/__gc_mark_roots - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - call $~lib/collector/itcm/ManagedObject#set:color - local.get $0 - i32.load - block $~lib/collector/itcm/objToRef|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.add - end - call $~lib/runtime/__gc_mark_members - else - call $~lib/runtime/__gc_mark_roots - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $1 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $1 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $1 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.ge_u - if - local.get $0 - call $~lib/memory/memory.free - end - else - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - i32.const 1 - global.set $~lib/collector/itcm/state - end - br $break|0 - unreachable - end - unreachable - end - ) - (func $~lib/collector/itcm/__ref_collect (; 58 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/maybeInit - block $break|0 - loop $continue|0 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - call $~lib/collector/itcm/step - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - br_if $continue|1 - end - end - ) - (func $~lib/runtime/runtime.collect (; 59 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/__ref_collect - ) - (func $~lib/runtime/runtime#constructor (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - unreachable - ) - (func $start (; 61 ;) (type $FUNCSIG$v) - call $start:constructor + (func $start:constructor (; 16 ;) (type $FUNCSIG$v) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset i32.const 0 - call $~lib/runtime/Root#constructor - global.set $~lib/runtime/ROOT - ) - (func $~lib/collector/itcm/__ref_mark (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - call $~lib/collector/itcm/maybeInit - block $~lib/collector/itcm/refToObj|inlined.4 (result i32) - local.get $0 - local.set $1 - local.get $1 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub - end - local.set $2 - local.get $2 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/runtime/__gc_mark_roots (; 63 ;) (type $FUNCSIG$v) - (local $0 i32) - global.get $~lib/runtime/ROOT - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/emptyCtor - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/emptyCtorWithFieldInit - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/emptyCtorWithFieldNoInit - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/none - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/justFieldInit - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/justFieldNoInit - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/ctorReturns - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/ctorConditionallyReturns - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/ctorAllocates - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - global.get $constructor/ctorConditionallyAllocates - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - end - ) - (func $~lib/runtime/__gc_mark_members (; 64 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - block $invalid - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $constructor/CtorConditionallyAllocates - block $constructor/CtorAllocates - block $constructor/CtorConditionallyReturns - block $constructor/JustFieldNoInit - block $constructor/JustFieldInit - block $constructor/None - block $constructor/EmptyCtorWithFieldNoInit - block $constructor/EmptyCtorWithFieldInit - block $constructor/EmptyCtor - block $~lib/string/String - local.get $0 - br_table $invalid $~lib/string/String $constructor/EmptyCtor $constructor/EmptyCtorWithFieldInit $constructor/EmptyCtorWithFieldNoInit $constructor/None $constructor/JustFieldInit $constructor/JustFieldNoInit $constructor/CtorConditionallyReturns $constructor/CtorAllocates $constructor/CtorConditionallyAllocates $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - return - end - unreachable - ) - (func $~lib/runtime/__runtime_instanceof (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - block $nope - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $constructor/CtorConditionallyAllocates - block $constructor/CtorAllocates - block $constructor/CtorConditionallyReturns - block $constructor/JustFieldNoInit - block $constructor/JustFieldInit - block $constructor/None - block $constructor/EmptyCtorWithFieldNoInit - block $constructor/EmptyCtorWithFieldInit - block $constructor/EmptyCtor - block $~lib/string/String - local.get $0 - br_table $nope $~lib/string/String $constructor/EmptyCtor $constructor/EmptyCtorWithFieldInit $constructor/EmptyCtorWithFieldNoInit $constructor/None $constructor/JustFieldInit $constructor/JustFieldNoInit $constructor/CtorConditionallyReturns $constructor/CtorAllocates $constructor/CtorConditionallyAllocates $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope - end - local.get $1 - i32.const 1 - i32.eq - return - end - local.get $1 - i32.const 2 - i32.eq - return - end - local.get $1 - i32.const 3 - i32.eq - return - end - local.get $1 - i32.const 4 - i32.eq - return - end - local.get $1 - i32.const 5 - i32.eq - return - end - local.get $1 - i32.const 6 - i32.eq - return - end - local.get $1 - i32.const 7 - i32.eq - return - end - local.get $1 - i32.const 8 - i32.eq - return - end - local.get $1 - i32.const 9 - i32.eq - return - end - local.get $1 - i32.const 10 - i32.eq - return - end - local.get $1 - i32.const 11 - i32.eq - return - end - local.get $1 - i32.const 12 - i32.eq - return - end + call $constructor/EmptyCtor#constructor + global.set $constructor/emptyCtor i32.const 0 - return - ) - (func $~lib/runtime/__runtime_flags (; 66 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - block $invalid - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $constructor/CtorConditionallyAllocates - block $constructor/CtorAllocates - block $constructor/CtorConditionallyReturns - block $constructor/JustFieldNoInit - block $constructor/JustFieldInit - block $constructor/None - block $constructor/EmptyCtorWithFieldNoInit - block $constructor/EmptyCtorWithFieldInit - block $constructor/EmptyCtor - block $~lib/string/String - local.get $0 - br_table $invalid $~lib/string/String $constructor/EmptyCtor $constructor/EmptyCtorWithFieldInit $constructor/EmptyCtorWithFieldNoInit $constructor/None $constructor/JustFieldInit $constructor/JustFieldNoInit $constructor/CtorConditionallyReturns $constructor/CtorAllocates $constructor/CtorConditionallyAllocates $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid - end - i32.const 0 - return - end - i32.const 0 - return - end - i32.const 0 - return - end - i32.const 0 - return - end - i32.const 0 - return - end - i32.const 0 - return - end - i32.const 0 - return - end - i32.const 0 - return - end - i32.const 0 - return - end - i32.const 0 - return - end - i32.const 0 - return - end - i32.const 0 - return - end - unreachable - ) - (func $null (; 67 ;) (type $FUNCSIG$v) + call $constructor/EmptyCtorWithFieldInit#constructor + global.set $constructor/emptyCtorWithFieldInit + i32.const 0 + call $constructor/EmptyCtorWithFieldNoInit#constructor + global.set $constructor/emptyCtorWithFieldNoInit + i32.const 0 + call $constructor/None#constructor + global.set $constructor/none + i32.const 0 + call $constructor/JustFieldInit#constructor + global.set $constructor/justFieldInit + i32.const 0 + call $constructor/JustFieldNoInit#constructor + global.set $constructor/justFieldNoInit + i32.const 0 + call $constructor/CtorReturns#constructor + global.set $constructor/ctorReturns + i32.const 0 + call $constructor/CtorConditionallyReturns#constructor + global.set $constructor/ctorConditionallyReturns + i32.const 0 + call $constructor/CtorAllocates#constructor + global.set $constructor/ctorAllocates + i32.const 0 + call $constructor/CtorConditionallyAllocates#constructor + global.set $constructor/ctorConditionallyAllocates ) - (func $~lib/runtime/runtime.newArray|trampoline (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 3 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 0 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/runtime/runtime.newArray + (func $start (; 17 ;) (type $FUNCSIG$v) + call $start:constructor ) - (func $~lib/setargc (; 69 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.set $~lib/argc + (func $null (; 18 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/declare.optimized.wat b/tests/compiler/declare.optimized.wat index 8d9f46b62b..cc7663d131 100644 --- a/tests/compiler/declare.optimized.wat +++ b/tests/compiler/declare.optimized.wat @@ -4,14 +4,11 @@ (import "declare" "externalConstant" (global $declare/externalConstant i32)) (import "declare" "my.externalConstant" (global $declare/my.externalConstant i32)) (import "declare" "externalFunction" (func $declare/externalFunction)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "declare" "my.externalFunction" (func $declare/my.externalFunction)) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\14\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\14\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s") (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:declare (; 3 ;) (type $FUNCSIG$v) call $declare/externalFunction @@ -23,7 +20,7 @@ i32.const 16 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $declare/my.externalFunction @@ -35,7 +32,7 @@ i32.const 16 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/declare.untouched.wat b/tests/compiler/declare.untouched.wat index 65646b05da..074031b92e 100644 --- a/tests/compiler/declare.untouched.wat +++ b/tests/compiler/declare.untouched.wat @@ -4,15 +4,13 @@ (import "declare" "externalConstant" (global $declare/externalConstant i32)) (import "declare" "my.externalConstant" (global $declare/my.externalConstant i32)) (import "declare" "externalFunction" (func $declare/externalFunction)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "declare" "my.externalFunction" (func $declare/my.externalFunction)) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\14\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\14\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 36)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:declare (; 3 ;) (type $FUNCSIG$v) call $declare/externalFunction @@ -25,7 +23,7 @@ i32.const 16 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $declare/my.externalFunction @@ -38,7 +36,7 @@ i32.const 16 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index cbe1030f0f..b23a5d2642 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1,16 +1,13 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\n\00\00\00d\00o\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\n\00\00\00d\00o\00.\00t\00s") (global $do/n (mut i32) (i32.const 10)) (global $do/m (mut i32) (i32.const 0)) (global $do/o (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:do (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -32,7 +29,7 @@ i32.const 16 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $do/m @@ -43,7 +40,7 @@ i32.const 16 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 10 @@ -65,7 +62,7 @@ i32.const 16 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 10 @@ -99,7 +96,7 @@ i32.const 16 i32.const 24 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $do/o @@ -110,7 +107,7 @@ i32.const 16 i32.const 25 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $do/n @@ -122,7 +119,7 @@ i32.const 16 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $do/m @@ -133,7 +130,7 @@ i32.const 16 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $do/o @@ -144,7 +141,7 @@ i32.const 16 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/do.untouched.wat b/tests/compiler/do.untouched.wat index 8977815a6c..8194184797 100644 --- a/tests/compiler/do.untouched.wat +++ b/tests/compiler/do.untouched.wat @@ -1,17 +1,15 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\n\00\00\00d\00o\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\n\00\00\00d\00o\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $do/n (mut i32) (i32.const 10)) (global $do/m (mut i32) (i32.const 0)) (global $do/o (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 28)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:do (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -40,7 +38,7 @@ i32.const 16 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $do/m @@ -52,7 +50,7 @@ i32.const 16 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 10 @@ -80,7 +78,7 @@ i32.const 16 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 10 @@ -123,7 +121,7 @@ i32.const 16 i32.const 24 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $do/o @@ -135,7 +133,7 @@ i32.const 16 i32.const 25 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -152,7 +150,7 @@ i32.const 16 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $do/m @@ -164,7 +162,7 @@ i32.const 16 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $do/o @@ -176,7 +174,7 @@ i32.const 16 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/empty.optimized.wat b/tests/compiler/empty.optimized.wat index 587c7142d7..bb456a1172 100644 --- a/tests/compiler/empty.optimized.wat +++ b/tests/compiler/empty.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (func $null (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/empty.untouched.wat b/tests/compiler/empty.untouched.wat index 4560a6a15a..29ee81b836 100644 --- a/tests/compiler/empty.untouched.wat +++ b/tests/compiler/empty.untouched.wat @@ -3,9 +3,7 @@ (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (func $null (; 0 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/enum.optimized.wat b/tests/compiler/enum.optimized.wat index ef489ff645..918613db6f 100644 --- a/tests/compiler/enum.optimized.wat +++ b/tests/compiler/enum.optimized.wat @@ -1,8 +1,6 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $enum/Implicit.ZERO i32 (i32.const 0)) (global $enum/Implicit.ONE i32 (i32.const 1)) (global $enum/Implicit.TWO i32 (i32.const 2)) @@ -34,7 +32,6 @@ (global $enum/SelfReferenceConst.ZERO i32 (i32.const 0)) (global $enum/SelfReferenceConst.ONE i32 (i32.const 1)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "Implicit.ZERO" (global $enum/Implicit.ZERO)) (export "Implicit.ONE" (global $enum/Implicit.ONE)) (export "Implicit.TWO" (global $enum/Implicit.TWO)) diff --git a/tests/compiler/enum.untouched.wat b/tests/compiler/enum.untouched.wat index 1df56dd14d..51d9aa74ba 100644 --- a/tests/compiler/enum.untouched.wat +++ b/tests/compiler/enum.untouched.wat @@ -35,9 +35,7 @@ (global $enum/SelfReferenceConst.ZERO i32 (i32.const 0)) (global $enum/SelfReferenceConst.ONE i32 (i32.const 1)) (global $enum/enumType (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "Implicit.ZERO" (global $enum/Implicit.ZERO)) (export "Implicit.ONE" (global $enum/Implicit.ONE)) (export "Implicit.TWO" (global $enum/Implicit.TWO)) diff --git a/tests/compiler/export.optimized.wat b/tests/compiler/export.optimized.wat index be7678c324..4bb092470c 100644 --- a/tests/compiler/export.optimized.wat +++ b/tests/compiler/export.optimized.wat @@ -2,13 +2,10 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $export/ns.one) (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "add" (func $export/add)) (export "sub" (func $export/sub)) (export "renamed_mul" (func $export/mul)) diff --git a/tests/compiler/export.untouched.wat b/tests/compiler/export.untouched.wat index ea0955dfd5..9da32dc4fa 100644 --- a/tests/compiler/export.untouched.wat +++ b/tests/compiler/export.untouched.wat @@ -7,9 +7,7 @@ (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "add" (func $export/add)) (export "sub" (func $export/sub)) (export "renamed_mul" (func $export/mul)) diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index bacc9845da..55fa3e4e30 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -6,11 +6,9 @@ (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (global $exports/Animal.CAT i32 (i32.const 0)) (global $exports/Animal.DOG i32 (i32.const 1)) (global $exports/animals.Animal.CAT i32 (i32.const 0)) @@ -21,10 +19,9 @@ (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) - (global $exports/Car i32 (i32.const 1)) - (global $exports/vehicles.Car i32 (i32.const 3)) + (global $exports/Car i32 (i32.const 17)) + (global $exports/vehicles.Car i32 (i32.const 18)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "add" (func $exports/add)) (export "$.setArgc" (func $~lib/setargc)) (export "subOpt" (func $exports/subOpt|trampoline)) @@ -150,9 +147,9 @@ if i32.const 0 i32.const 16 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -165,9 +162,9 @@ if i32.const 0 i32.const 16 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -234,7 +231,7 @@ i32.eqz if call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.set $0 end @@ -262,7 +259,7 @@ i32.eqz if call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register local.set $0 end diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 4518780c56..54436b1f7d 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -6,9 +6,9 @@ (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $exports/Animal.CAT i32 (i32.const 0)) @@ -25,10 +25,9 @@ (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) (global $~lib/argc (mut i32) (i32.const 0)) - (global $exports/Car i32 (i32.const 1)) - (global $exports/vehicles.Car i32 (i32.const 3)) + (global $exports/Car i32 (i32.const 17)) + (global $exports/vehicles.Car i32 (i32.const 18)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "add" (func $exports/add)) (export "$.setArgc" (func $~lib/setargc)) (export "subOpt" (func $exports/subOpt|trampoline)) @@ -196,9 +195,9 @@ if i32.const 0 i32.const 16 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -213,9 +212,9 @@ if i32.const 0 i32.const 16 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -230,7 +229,7 @@ if i32.const 4 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.set $0 end @@ -265,7 +264,7 @@ if i32.const 4 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register local.set $0 end diff --git a/tests/compiler/external.optimized.wat b/tests/compiler/external.optimized.wat index 694a47c7e4..3cd8fa2698 100644 --- a/tests/compiler/external.optimized.wat +++ b/tests/compiler/external.optimized.wat @@ -6,10 +6,7 @@ (import "external" "bar" (func $external/two)) (import "foo" "baz" (func $external/three)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (export "foo" (func $external/foo)) (export "foo.bar" (func $external/foo.bar)) (export "two" (func $external/two)) diff --git a/tests/compiler/external.untouched.wat b/tests/compiler/external.untouched.wat index f3f10b1e4c..664061dcc0 100644 --- a/tests/compiler/external.untouched.wat +++ b/tests/compiler/external.untouched.wat @@ -8,9 +8,7 @@ (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "foo" (func $external/foo)) (export "foo.bar" (func $external/foo.bar)) (export "two" (func $external/two)) diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 82032018fa..d7a3cce84d 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -1,14 +1,11 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\0c\00\00\00f\00o\00r\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\0c\00\00\00f\00o\00r\00.\00t\00s") (global $for/i (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:for (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -36,7 +33,7 @@ i32.const 16 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end loop $repeat|1 @@ -71,7 +68,7 @@ i32.const 16 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end loop $repeat|3 @@ -119,7 +116,7 @@ i32.const 16 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 diff --git a/tests/compiler/for.untouched.wat b/tests/compiler/for.untouched.wat index 222039d806..e7477e413e 100644 --- a/tests/compiler/for.untouched.wat +++ b/tests/compiler/for.untouched.wat @@ -1,15 +1,13 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\0c\00\00\00f\00o\00r\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\0c\00\00\00f\00o\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $for/i (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 28)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:for (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -44,7 +42,7 @@ i32.const 16 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -92,7 +90,7 @@ i32.const 16 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -168,7 +166,7 @@ i32.const 16 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|6 diff --git a/tests/compiler/function-expression.optimized.wat b/tests/compiler/function-expression.optimized.wat index f90052aae1..7ef1ebc03f 100644 --- a/tests/compiler/function-expression.optimized.wat +++ b/tests/compiler/function-expression.optimized.wat @@ -4,9 +4,9 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00,\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00,\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s") (table $0 11 funcref) (elem (i32.const 0) $start:function-expression~someName $start:function-expression~anonymous|0 $start:function-expression~anonymous|0 $start:function-expression~someName $start:function-expression~anonymous|2 $start:function-expression~anonymous|3 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5 $start:function-expression~anonymous|3 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5) (global $function-expression/f1 (mut i32) (i32.const 1)) @@ -15,7 +15,6 @@ (global $function-expression/f3 (mut i32) (i32.const 3)) (global $function-expression/f4 (mut i32) (i32.const 4)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:function-expression~anonymous|0 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -50,7 +49,7 @@ i32.const 16 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -65,7 +64,7 @@ i32.const 16 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -83,7 +82,7 @@ i32.const 16 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -99,7 +98,7 @@ i32.const 16 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -115,7 +114,7 @@ i32.const 16 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -131,7 +130,7 @@ i32.const 16 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -147,7 +146,7 @@ i32.const 16 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -163,7 +162,7 @@ i32.const 16 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -179,7 +178,7 @@ i32.const 16 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/function-expression.untouched.wat b/tests/compiler/function-expression.untouched.wat index 1e02707c61..d780c0d354 100644 --- a/tests/compiler/function-expression.untouched.wat +++ b/tests/compiler/function-expression.untouched.wat @@ -4,9 +4,9 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00,\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00,\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s\00") (table $0 11 funcref) (elem (i32.const 0) $null $start:function-expression~anonymous|0 $start:function-expression~anonymous|1 $start:function-expression~someName $start:function-expression~anonymous|2 $start:function-expression~anonymous|3 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5 $function-expression/testOmittedReturn1~anonymous|0 $function-expression/testOmittedReturn2~anonymous|0 $function-expression/testOmittedReturn3~anonymous|0) (global $function-expression/f1 (mut i32) (i32.const 1)) @@ -14,9 +14,7 @@ (global $function-expression/f2 (mut i32) (i32.const 2)) (global $function-expression/f3 (mut i32) (i32.const 3)) (global $function-expression/f4 (mut i32) (i32.const 4)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 60)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:function-expression~anonymous|0 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -85,7 +83,7 @@ i32.const 16 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -103,7 +101,7 @@ i32.const 16 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block @@ -126,7 +124,7 @@ i32.const 16 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 @@ -139,7 +137,7 @@ i32.const 16 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 6 @@ -152,7 +150,7 @@ i32.const 16 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 7 @@ -165,7 +163,7 @@ i32.const 16 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -184,7 +182,7 @@ i32.const 16 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -203,7 +201,7 @@ i32.const 16 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -222,7 +220,7 @@ i32.const 16 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/function-types.optimized.wat b/tests/compiler/function-types.optimized.wat index 18a1abc67c..57cfbfcdca 100644 --- a/tests/compiler/function-types.optimized.wat +++ b/tests/compiler/function-types.optimized.wat @@ -4,16 +4,15 @@ (type $FUNCSIG$jjj (func (param i64 i64) (result i64))) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\"\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\"\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s") (table $0 5 funcref) (elem (i32.const 0) $null $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0) (global $function-types/i32Adder (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (global $function-types/i64Adder (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $function-types/makeAdder~anonymous|0 (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -47,7 +46,7 @@ i32.const 16 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -65,7 +64,7 @@ i32.const 16 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -81,7 +80,7 @@ i32.const 16 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -97,7 +96,7 @@ i32.const 16 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -113,7 +112,7 @@ i32.const 16 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -129,7 +128,7 @@ i32.const 16 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -160,7 +159,7 @@ i32.const 16 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -176,7 +175,7 @@ i32.const 16 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/function-types.untouched.wat b/tests/compiler/function-types.untouched.wat index 70a30e4c6e..2fda5a8d1a 100644 --- a/tests/compiler/function-types.untouched.wat +++ b/tests/compiler/function-types.untouched.wat @@ -6,17 +6,15 @@ (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\"\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\"\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s\00") (table $0 5 funcref) (elem (i32.const 0) $null $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/addI32) (global $function-types/i32Adder (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (global $function-types/i64Adder (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 52)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $function-types/makeAdder~anonymous|0 (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -109,7 +107,7 @@ i32.const 16 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $function-types/makeAdder @@ -130,7 +128,7 @@ i32.const 16 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result f64) @@ -149,7 +147,7 @@ i32.const 16 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -164,7 +162,7 @@ i32.const 16 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -178,7 +176,7 @@ i32.const 16 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -193,7 +191,7 @@ i32.const 16 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -212,7 +210,7 @@ i32.const 16 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -227,7 +225,7 @@ i32.const 16 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/function.optimized.wat b/tests/compiler/function.optimized.wat index 86b388ad0a..e2acb0a3b8 100644 --- a/tests/compiler/function.optimized.wat +++ b/tests/compiler/function.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/function.untouched.wat b/tests/compiler/function.untouched.wat index b76f67e92f..c06f81daaa 100644 --- a/tests/compiler/function.untouched.wat +++ b/tests/compiler/function.untouched.wat @@ -17,9 +17,7 @@ (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $function/_ (; 0 ;) (type $FUNCSIG$v) nop diff --git a/tests/compiler/gc.json b/tests/compiler/gc.json index 85b9ce0f6e..b1da366ff4 100644 --- a/tests/compiler/gc.json +++ b/tests/compiler/gc.json @@ -1,5 +1,5 @@ { "asc_flags": [ - "--runtime arena" + "--runtime none" ] } \ No newline at end of file diff --git a/tests/compiler/gc.optimized.wat b/tests/compiler/gc.optimized.wat index 656ae34d3a..efc7378e23 100644 --- a/tests/compiler/gc.optimized.wat +++ b/tests/compiler/gc.optimized.wat @@ -7,23 +7,21 @@ (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(") + (data (i32.const 8) "\10\00\00\00(") (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 64) "\02\00\00\00\16") + (data (i32.const 64) "\10\00\00\00\16") (data (i32.const 80) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") - (data (i32.const 104) "\02\00\00\00\0e") + (data (i32.const 104) "\10\00\00\00\0e") (data (i32.const 120) "g\00c\00.\00l\00i\00n\00k") - (data (i32.const 136) "\02\00\00\00\n") + (data (i32.const 136) "\10\00\00\00\n") (data (i32.const 152) "g\00c\00.\00t\00s") - (data (i32.const 168) "\02\00\00\00\12") + (data (i32.const 168) "\10\00\00\00\12") (data (i32.const 184) "g\00c\00.\00u\00n\00l\00i\00n\00k") - (data (i32.const 208) "\02\00\00\00\14") + (data (i32.const 208) "\10\00\00\00\14") (data (i32.const 224) "g\00c\00.\00c\00o\00l\00l\00e\00c\00t") - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) @@ -39,7 +37,6 @@ (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $gc/main)) (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -133,7 +130,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/_dummy/register_count i32.const 1 i32.add @@ -149,9 +146,9 @@ if i32.const 0 i32.const 24 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -164,9 +161,9 @@ if i32.const 0 i32.const 24 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -186,7 +183,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/_dummy/link_count i32.const 1 i32.add @@ -206,7 +203,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/_dummy/unlink_count i32.const 1 i32.add @@ -229,14 +226,14 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register global.set $~lib/runtime/ROOT i32.const 1 global.set $~lib/started end call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.set $2 global.get $gc/_dummy/link_count @@ -256,9 +253,9 @@ if i32.const 0 i32.const 152 - i32.const 14 + i32.const 15 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/unlink_count @@ -267,9 +264,9 @@ if i32.const 0 i32.const 152 - i32.const 15 + i32.const 16 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/collect_count @@ -278,9 +275,9 @@ if i32.const 0 i32.const 152 - i32.const 16 + i32.const 17 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/link_count @@ -298,9 +295,9 @@ if i32.const 0 i32.const 152 - i32.const 23 + i32.const 24 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/unlink_count @@ -311,9 +308,9 @@ if i32.const 0 i32.const 152 - i32.const 24 + i32.const 25 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/collect_count @@ -322,9 +319,9 @@ if i32.const 0 i32.const 152 - i32.const 25 + i32.const 26 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/link_count @@ -340,7 +337,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/_dummy/collect_count i32.const 1 i32.add @@ -351,9 +348,9 @@ if i32.const 0 i32.const 152 - i32.const 32 + i32.const 33 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/unlink_count @@ -362,9 +359,9 @@ if i32.const 0 i32.const 152 - i32.const 33 + i32.const 34 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/collect_count @@ -375,9 +372,9 @@ if i32.const 0 i32.const 152 - i32.const 34 + i32.const 35 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/gc.ts b/tests/compiler/gc.ts index 3242df9ce1..fe20e10934 100644 --- a/tests/compiler/gc.ts +++ b/tests/compiler/gc.ts @@ -1,3 +1,4 @@ +import "allocator/arena"; import { link_count, unlink_count, collect_count } from "./gc/_dummy"; class Ref {} diff --git a/tests/compiler/gc.untouched.wat b/tests/compiler/gc.untouched.wat index eb4ba1c905..11ad485066 100644 --- a/tests/compiler/gc.untouched.wat +++ b/tests/compiler/gc.untouched.wat @@ -6,15 +6,15 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$vii (func (param i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 64) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") - (data (i32.const 104) "\02\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00l\00i\00n\00k\00") - (data (i32.const 136) "\02\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00t\00s\00") - (data (i32.const 168) "\02\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00u\00n\00l\00i\00n\00k\00") - (data (i32.const 208) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00c\00o\00l\00l\00e\00c\00t\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 104) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00l\00i\00n\00k\00") + (data (i32.const 136) "\10\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00t\00s\00") + (data (i32.const 168) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00u\00n\00l\00i\00n\00k\00") + (data (i32.const 208) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00c\00o\00l\00l\00e\00c\00t\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) @@ -38,7 +38,6 @@ (global $~lib/memory/HEAP_BASE i32 (i32.const 244)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $gc/main)) (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -168,7 +167,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/_dummy/register_count i32.const 1 i32.add @@ -185,9 +184,9 @@ if i32.const 0 i32.const 24 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -202,9 +201,9 @@ if i32.const 0 i32.const 24 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -220,7 +219,7 @@ if i32.const 0 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.set $0 end @@ -232,7 +231,7 @@ if i32.const 0 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register local.set $0 end @@ -248,7 +247,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/_dummy/link_count i32.const 1 i32.add @@ -273,7 +272,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/_dummy/unlink_count i32.const 1 i32.add @@ -296,7 +295,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/_dummy/collect_count i32.const 1 i32.add @@ -337,9 +336,9 @@ if i32.const 0 i32.const 152 - i32.const 14 + i32.const 15 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/unlink_count @@ -349,9 +348,9 @@ if i32.const 0 i32.const 152 - i32.const 15 + i32.const 16 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/collect_count @@ -361,9 +360,9 @@ if i32.const 0 i32.const 152 - i32.const 16 + i32.const 17 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/link_count @@ -381,9 +380,9 @@ if i32.const 0 i32.const 152 - i32.const 23 + i32.const 24 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/unlink_count @@ -395,9 +394,9 @@ if i32.const 0 i32.const 152 - i32.const 24 + i32.const 25 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/collect_count @@ -407,9 +406,9 @@ if i32.const 0 i32.const 152 - i32.const 25 + i32.const 26 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/link_count @@ -426,9 +425,9 @@ if i32.const 0 i32.const 152 - i32.const 32 + i32.const 33 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/unlink_count @@ -438,9 +437,9 @@ if i32.const 0 i32.const 152 - i32.const 33 + i32.const 34 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/collect_count @@ -452,9 +451,9 @@ if i32.const 0 i32.const 152 - i32.const 34 + i32.const 35 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/gc/global-assign.json b/tests/compiler/gc/global-assign.json index 85b9ce0f6e..b1da366ff4 100644 --- a/tests/compiler/gc/global-assign.json +++ b/tests/compiler/gc/global-assign.json @@ -1,5 +1,5 @@ { "asc_flags": [ - "--runtime arena" + "--runtime none" ] } \ No newline at end of file diff --git a/tests/compiler/gc/global-assign.optimized.wat b/tests/compiler/gc/global-assign.optimized.wat index a4feb0e8bd..78321a5a4f 100644 --- a/tests/compiler/gc/global-assign.optimized.wat +++ b/tests/compiler/gc/global-assign.optimized.wat @@ -5,17 +5,15 @@ (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(") + (data (i32.const 8) "\10\00\00\00(") (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 64) "\02\00\00\00\16") + (data (i32.const 64) "\10\00\00\00\16") (data (i32.const 80) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") - (data (i32.const 104) "\02\00\00\00&") + (data (i32.const 104) "\10\00\00\00&") (data (i32.const 120) "g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) (global $gc/_dummy/link_count (mut i32) (i32.const 0)) @@ -27,7 +25,6 @@ (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $gc/global-assign/main)) (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -121,7 +118,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/_dummy/register_count i32.const 1 i32.add @@ -137,9 +134,9 @@ if i32.const 0 i32.const 24 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -152,13 +149,13 @@ if i32.const 0 i32.const 24 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 - i32.const 1 + i32.const 17 i32.store local.get $0 call $gc/_dummy/__ref_register @@ -180,27 +177,27 @@ if i32.const 0 i32.const 120 - i32.const 11 + i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/link_count if i32.const 0 i32.const 120 - i32.const 12 + i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/unlink_count if i32.const 0 i32.const 120 - i32.const 13 + i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $~lib/util/runtime/allocate @@ -212,27 +209,27 @@ if i32.const 0 i32.const 120 - i32.const 18 + i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/link_count if i32.const 0 i32.const 120 - i32.const 19 + i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/unlink_count if i32.const 0 i32.const 120 - i32.const 20 + i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/gc/global-assign.ts b/tests/compiler/gc/global-assign.ts index 06b3cf7d06..3240387d1c 100644 --- a/tests/compiler/gc/global-assign.ts +++ b/tests/compiler/gc/global-assign.ts @@ -1,3 +1,4 @@ +import "allocator/arena"; import { register_count, link_count, unlink_count } from "./_dummy"; @start export function main(): void {} diff --git a/tests/compiler/gc/global-assign.untouched.wat b/tests/compiler/gc/global-assign.untouched.wat index 7abc9c7abf..7204ebc425 100644 --- a/tests/compiler/gc/global-assign.untouched.wat +++ b/tests/compiler/gc/global-assign.untouched.wat @@ -5,12 +5,12 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 64) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") - (data (i32.const 104) "\02\00\00\00&\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 104) "\10\00\00\00&\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) @@ -35,7 +35,6 @@ (global $~lib/memory/HEAP_BASE i32 (i32.const 160)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $gc/global-assign/main)) (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -165,7 +164,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/_dummy/register_count i32.const 1 i32.add @@ -182,9 +181,9 @@ if i32.const 0 i32.const 24 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -199,9 +198,9 @@ if i32.const 0 i32.const 24 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -217,7 +216,7 @@ if i32.const 0 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.set $0 end @@ -246,9 +245,9 @@ if i32.const 0 i32.const 120 - i32.const 11 + i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/link_count @@ -258,9 +257,9 @@ if i32.const 0 i32.const 120 - i32.const 12 + i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/unlink_count @@ -270,9 +269,9 @@ if i32.const 0 i32.const 120 - i32.const 13 + i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -285,9 +284,9 @@ if i32.const 0 i32.const 120 - i32.const 18 + i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/link_count @@ -297,9 +296,9 @@ if i32.const 0 i32.const 120 - i32.const 19 + i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/unlink_count @@ -309,9 +308,9 @@ if i32.const 0 i32.const 120 - i32.const 20 + i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/gc/global-init.json b/tests/compiler/gc/global-init.json index 85b9ce0f6e..b1da366ff4 100644 --- a/tests/compiler/gc/global-init.json +++ b/tests/compiler/gc/global-init.json @@ -1,5 +1,5 @@ { "asc_flags": [ - "--runtime arena" + "--runtime none" ] } \ No newline at end of file diff --git a/tests/compiler/gc/global-init.optimized.wat b/tests/compiler/gc/global-init.optimized.wat index 1356e33075..f95cc5db8e 100644 --- a/tests/compiler/gc/global-init.optimized.wat +++ b/tests/compiler/gc/global-init.optimized.wat @@ -5,17 +5,15 @@ (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(") + (data (i32.const 8) "\10\00\00\00(") (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 64) "\02\00\00\00\16") + (data (i32.const 64) "\10\00\00\00\16") (data (i32.const 80) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") - (data (i32.const 104) "\02\00\00\00\"") + (data (i32.const 104) "\10\00\00\00\"") (data (i32.const 120) "g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) (global $gc/_dummy/link_count (mut i32) (i32.const 0)) @@ -26,7 +24,6 @@ (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $gc/global-init/main)) (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -120,7 +117,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/_dummy/register_count i32.const 1 i32.add @@ -136,9 +133,9 @@ if i32.const 0 i32.const 24 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -151,13 +148,13 @@ if i32.const 0 i32.const 24 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 - i32.const 1 + i32.const 17 i32.store local.get $0 call $gc/_dummy/__ref_register @@ -177,27 +174,27 @@ if i32.const 0 i32.const 120 - i32.const 10 + i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/link_count if i32.const 0 i32.const 120 - i32.const 11 + i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/unlink_count if i32.const 0 i32.const 120 - i32.const 12 + i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $~lib/util/runtime/allocate @@ -209,27 +206,27 @@ if i32.const 0 i32.const 120 - i32.const 15 + i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/link_count if i32.const 0 i32.const 120 - i32.const 16 + i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/unlink_count if i32.const 0 i32.const 120 - i32.const 17 + i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/gc/global-init.ts b/tests/compiler/gc/global-init.ts index d4857d001d..9f89bc7ad6 100644 --- a/tests/compiler/gc/global-init.ts +++ b/tests/compiler/gc/global-init.ts @@ -1,3 +1,4 @@ +import "allocator/arena"; import { register_count, link_count, unlink_count } from "./_dummy"; @start export function main(): void {} diff --git a/tests/compiler/gc/global-init.untouched.wat b/tests/compiler/gc/global-init.untouched.wat index 12382a1ebb..27c57d88c1 100644 --- a/tests/compiler/gc/global-init.untouched.wat +++ b/tests/compiler/gc/global-init.untouched.wat @@ -5,12 +5,12 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 64) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") - (data (i32.const 104) "\02\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 104) "\10\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) @@ -34,7 +34,6 @@ (global $~lib/memory/HEAP_BASE i32 (i32.const 156)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $gc/global-init/main)) (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -164,7 +163,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/_dummy/register_count i32.const 1 i32.add @@ -181,9 +180,9 @@ if i32.const 0 i32.const 24 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -198,9 +197,9 @@ if i32.const 0 i32.const 24 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -216,7 +215,7 @@ if i32.const 0 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.set $0 end @@ -243,9 +242,9 @@ if i32.const 0 i32.const 120 - i32.const 10 + i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/link_count @@ -255,9 +254,9 @@ if i32.const 0 i32.const 120 - i32.const 11 + i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/unlink_count @@ -267,9 +266,9 @@ if i32.const 0 i32.const 120 - i32.const 12 + i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -282,9 +281,9 @@ if i32.const 0 i32.const 120 - i32.const 15 + i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/link_count @@ -294,9 +293,9 @@ if i32.const 0 i32.const 120 - i32.const 16 + i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/_dummy/unlink_count @@ -306,9 +305,9 @@ if i32.const 0 i32.const 120 - i32.const 17 + i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/gc/itcm/trace.json b/tests/compiler/gc/itcm/trace.json index 85b9ce0f6e..b1da366ff4 100644 --- a/tests/compiler/gc/itcm/trace.json +++ b/tests/compiler/gc/itcm/trace.json @@ -1,5 +1,5 @@ { "asc_flags": [ - "--runtime arena" + "--runtime none" ] } \ No newline at end of file diff --git a/tests/compiler/gc/itcm/trace.optimized.wat b/tests/compiler/gc/itcm/trace.optimized.wat index f1f6a1f51b..c28cf99b33 100644 --- a/tests/compiler/gc/itcm/trace.optimized.wat +++ b/tests/compiler/gc/itcm/trace.optimized.wat @@ -8,67 +8,65 @@ (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00 ") + (data (i32.const 8) "\10\00\00\00 ") (data (i32.const 24) "g\00c\00/\00i\00t\00c\00m\00/\00t\00r\00a\00c\00e\00.\00t\00s") - (data (i32.const 56) "\01\00\00\00\"") + (data (i32.const 56) "\10\00\00\00\"") (data (i32.const 72) "#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)") - (data (i32.const 112) "\01\00\00\00(") + (data (i32.const 112) "\10\00\00\00(") (data (i32.const 128) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 168) "\01\00\00\00\1a") + (data (i32.const 168) "\10\00\00\00\1a") (data (i32.const 184) "i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r") - (data (i32.const 216) "\01\00\00\00\12") + (data (i32.const 216) "\10\00\00\00\12") (data (i32.const 232) "i\00t\00c\00m\00~\00i\00n\00i\00t") - (data (i32.const 256) "\01\00\00\00 ") + (data (i32.const 256) "\10\00\00\00 ") (data (i32.const 272) " \00 \00 \00 \00 \00f\00r\00o\00m\00S\00p\00a\00c\00e\00 \00=") - (data (i32.const 304) "\01\00\00\00\14") + (data (i32.const 304) "\10\00\00\00\14") (data (i32.const 320) " \00 \00 \00 \00 \00c\00l\00e\00a\00r") - (data (i32.const 344) "\01\00\00\00\1c") + (data (i32.const 344) "\10\00\00\00\1c") (data (i32.const 360) " \00 \00 \00 \00 \00t\00o\00S\00p\00a\00c\00e\00 \00=") - (data (i32.const 392) "\01\00\00\00\"") + (data (i32.const 392) "\10\00\00\00\"") (data (i32.const 408) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00I\00D\00L\00E") - (data (i32.const 448) "\01\00\00\006") + (data (i32.const 448) "\10\00\00\006") (data (i32.const 464) " \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]") - (data (i32.const 520) "\01\00\00\00(") + (data (i32.const 520) "\10\00\00\00(") (data (i32.const 536) "#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)") - (data (i32.const 576) "\01\00\00\00&") + (data (i32.const 576) "\10\00\00\00&") (data (i32.const 592) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 632) "\01\00\00\00\12") + (data (i32.const 632) "\10\00\00\00\12") (data (i32.const 648) "i\00t\00c\00m\00.\00l\00i\00n\00k") - (data (i32.const 672) "\01\00\00\00\1a") + (data (i32.const 672) "\10\00\00\00\1a") (data (i32.const 688) " \00 \00 \00 \00 \00m\00a\00k\00e\00G\00r\00a\00y") - (data (i32.const 720) "\01\00\00\00:") + (data (i32.const 720) "\10\00\00\00:") (data (i32.const 736) " \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]") - (data (i32.const 800) "\01\00\00\00\1c") + (data (i32.const 800) "\10\00\00\00\1c") (data (i32.const 816) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f") - (data (i32.const 848) "\01\00\00\00\1a") + (data (i32.const 848) "\10\00\00\00\1a") (data (i32.const 864) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 896) "\01\00\00\00\1e") + (data (i32.const 896) "\10\00\00\00\1e") (data (i32.const 912) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l") - (data (i32.const 944) "\01\00\00\00\16") + (data (i32.const 944) "\10\00\00\00\16") (data (i32.const 960) "#\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)") - (data (i32.const 984) "\01\00\00\00\18") + (data (i32.const 984) "\10\00\00\00\18") (data (i32.const 1000) "i\00t\00c\00m\00.\00c\00o\00l\00l\00e\00c\00t") - (data (i32.const 1024) "\01\00\00\00\1c") + (data (i32.const 1024) "\10\00\00\00\1c") (data (i32.const 1040) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E") - (data (i32.const 1072) "\01\00\00\00\"") + (data (i32.const 1072) "\10\00\00\00\"") (data (i32.const 1088) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K") - (data (i32.const 1128) "\01\00\00\00\1c") + (data (i32.const 1128) "\10\00\00\00\1c") (data (i32.const 1144) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K") - (data (i32.const 1176) "\01\00\00\00*") + (data (i32.const 1176) "\10\00\00\00*") (data (i32.const 1192) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h") - (data (i32.const 1240) "\01\00\00\00$") + (data (i32.const 1240) "\10\00\00\00$") (data (i32.const 1256) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P") - (data (i32.const 1296) "\01\00\00\00(") + (data (i32.const 1296) "\10\00\00\00(") (data (i32.const 1312) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e") - (data (i32.const 1352) "\01\00\00\00,") + (data (i32.const 1352) "\10\00\00\00,") (data (i32.const 1368) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h") - (data (i32.const 1416) "\01\00\00\00\12") + (data (i32.const 1416) "\10\00\00\00\12") (data (i32.const 1432) "i\00t\00c\00m\00.\00m\00a\00r\00k") - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) @@ -79,7 +77,6 @@ (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $gc/itcm/trace/main)) (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -182,7 +179,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace local.get $0 local.get $0 i32.store offset=8 @@ -202,7 +199,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 16 call $~lib/allocator/arena/__mem_allocate global.set $~lib/collector/itcm/fromSpace @@ -216,7 +213,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $~lib/collector/itcm/fromSpace local.tee $0 i32.const -1 @@ -239,7 +236,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $~lib/collector/itcm/toSpace local.tee $0 i32.const -1 @@ -260,7 +257,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace end ) (func $~lib/collector/itcm/ManagedObjectList#push (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) @@ -283,7 +280,7 @@ f64.convert_i32_u f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace local.get $1 local.get $1 i32.load offset=8 @@ -316,7 +313,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace call $~lib/collector/itcm/maybeInit local.get $0 i32.const 16 @@ -341,9 +338,9 @@ if i32.const 0 i32.const 128 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -356,9 +353,9 @@ if i32.const 0 i32.const 128 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -372,7 +369,7 @@ (local $0 i32) i32.const 4 call $~lib/util/runtime/allocate - i32.const 2 + i32.const 17 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -614,7 +611,7 @@ f64.convert_i32_u f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace local.get $0 local.get $1 i32.store offset=12 @@ -638,7 +635,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $~lib/collector/itcm/iter local.get $0 i32.eq @@ -672,7 +669,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace call $~lib/collector/itcm/maybeInit global.get $~lib/collector/itcm/white i32.eqz @@ -710,7 +707,7 @@ i32.const 4 call $~lib/memory/memory.fill local.get $1 - i32.const 3 + i32.const 15 call $~lib/util/runtime/register local.set $1 local.get $0 @@ -718,7 +715,7 @@ if i32.const 12 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 14 call $~lib/util/runtime/register local.set $0 end @@ -989,9 +986,9 @@ if i32.const 0 i32.const 128 - i32.const 88 + i32.const 91 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end else @@ -1106,7 +1103,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace call $gc/itcm/trace/Ref#constructor local.set $1 i32.const 536 @@ -1116,10 +1113,10 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 16 call $~lib/util/runtime/allocate - i32.const 5 + i32.const 18 call $~lib/util/runtime/register call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 @@ -1135,7 +1132,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace local.get $0 local.get $1 call $~lib/array/Array#__set @@ -1146,7 +1143,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace local.get $0 i32.const 0 call $~lib/array/Array#__set @@ -1157,7 +1154,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace call $gc/itcm/trace/Ref#constructor drop ) @@ -1185,7 +1182,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 2 global.set $~lib/collector/itcm/state i32.const 1088 @@ -1195,7 +1192,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace br $break|0 end global.get $~lib/collector/itcm/iter @@ -1217,7 +1214,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace local.get $0 global.set $~lib/collector/itcm/iter local.get $0 @@ -1241,7 +1238,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $~lib/collector/itcm/toSpace global.get $~lib/collector/itcm/iter i32.load offset=8 @@ -1272,7 +1269,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace end end br $break|0 @@ -1292,7 +1289,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace local.get $0 i32.load offset=8 i32.const -4 @@ -1306,7 +1303,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $~lib/collector/itcm/toSpace call $~lib/collector/itcm/ManagedObjectList#clear i32.const 1 @@ -1318,7 +1315,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace end end ) @@ -1330,7 +1327,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace call $~lib/collector/itcm/maybeInit loop $continue|0 global.get $~lib/collector/itcm/state @@ -1372,7 +1369,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace call $~lib/collector/itcm/maybeInit global.get $~lib/collector/itcm/white local.get $0 @@ -1412,7 +1409,7 @@ if local.get $0 call $~lib/collector/itcm/__ref_mark - i32.const 2 + i32.const 17 local.get $0 call $~lib/runtime/__gc_mark_members end @@ -1427,27 +1424,66 @@ (func $~lib/runtime/__gc_mark_members (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $invalid block $~lib/array/Array - block $~lib/arraybuffer/ArrayBufferView - block $~lib/arraybuffer/ArrayBuffer - block $gc/itcm/trace/Ref - block $~lib/string/String + block $gc/itcm/trace/Ref + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/arraybuffer/ArrayBufferView + block $~lib/number/F64 + block $~lib/number/F32 + block $~lib/number/Bool + block $~lib/number/Usize + block $~lib/number/U64 + block $~lib/number/U32 + block $~lib/number/U16 + block $~lib/number/U8 + block $~lib/number/Isize + block $~lib/number/I64 + block $~lib/number/I32 + block $~lib/number/I16 + block $~lib/number/I8 + local.get $0 + i32.const 1 + i32.sub + br_table $~lib/number/I8 $~lib/number/I16 $~lib/number/I32 $~lib/number/I64 $~lib/number/Isize $~lib/number/U8 $~lib/number/U16 $~lib/number/U32 $~lib/number/U64 $~lib/number/Usize $~lib/number/Bool $~lib/number/F32 $~lib/number/F64 $~lib/arraybuffer/ArrayBufferView $~lib/arraybuffer/ArrayBuffer $~lib/string/String $gc/itcm/trace/Ref $~lib/array/Array $invalid + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + local.get $1 + i32.load + local.tee $0 + if local.get $0 - i32.const 1 - i32.sub - br_table $~lib/string/String $gc/itcm/trace/Ref $~lib/arraybuffer/ArrayBuffer $~lib/arraybuffer/ArrayBufferView $~lib/array/Array $invalid + call $~lib/collector/itcm/__ref_mark + i32.const 15 + local.get $0 + call $~lib/runtime/__gc_mark_members end return end - local.get $1 - i32.load - local.tee $0 - if - local.get $0 - call $~lib/collector/itcm/__ref_mark - i32.const 2 - local.get $0 - call $~lib/runtime/__gc_mark_members - end return end return @@ -1458,7 +1494,7 @@ if local.get $0 call $~lib/collector/itcm/__ref_mark - i32.const 3 + i32.const 17 local.get $0 call $~lib/runtime/__gc_mark_members end diff --git a/tests/compiler/gc/itcm/trace.ts b/tests/compiler/gc/itcm/trace.ts index 959695637c..72857f6b69 100644 --- a/tests/compiler/gc/itcm/trace.ts +++ b/tests/compiler/gc/itcm/trace.ts @@ -1,4 +1,5 @@ @global const GC_TRACE = true; +import "allocator/arena"; import "collector/itcm"; import { HEADER_SIZE } from "util/runtime"; diff --git a/tests/compiler/gc/itcm/trace.untouched.wat b/tests/compiler/gc/itcm/trace.untouched.wat index a9e42ed97f..3e9d32a2f4 100644 --- a/tests/compiler/gc/itcm/trace.untouched.wat +++ b/tests/compiler/gc/itcm/trace.untouched.wat @@ -8,37 +8,37 @@ (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00 \00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00i\00t\00c\00m\00/\00t\00r\00a\00c\00e\00.\00t\00s\00") - (data (i32.const 56) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)\00") - (data (i32.const 112) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 168) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") - (data (i32.const 216) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00i\00n\00i\00t\00") - (data (i32.const 256) "\01\00\00\00 \00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00f\00r\00o\00m\00S\00p\00a\00c\00e\00 \00=\00") - (data (i32.const 304) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00c\00l\00e\00a\00r\00") - (data (i32.const 344) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00t\00o\00S\00p\00a\00c\00e\00 \00=\00") - (data (i32.const 392) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00I\00D\00L\00E\00") - (data (i32.const 448) "\01\00\00\006\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") - (data (i32.const 520) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)\00") - (data (i32.const 576) "\01\00\00\00&\00\00\00\00\00\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 632) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00l\00i\00n\00k\00") - (data (i32.const 672) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00m\00a\00k\00e\00G\00r\00a\00y\00") - (data (i32.const 720) "\01\00\00\00:\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") - (data (i32.const 800) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f\00") - (data (i32.const 848) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 896) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l\00") - (data (i32.const 944) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00#\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)\00") - (data (i32.const 984) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00c\00o\00l\00l\00e\00c\00t\00") - (data (i32.const 1024) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E\00") - (data (i32.const 1072) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K\00") - (data (i32.const 1128) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00") - (data (i32.const 1176) "\01\00\00\00*\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h\00") - (data (i32.const 1240) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P\00") - (data (i32.const 1296) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e\00") - (data (i32.const 1352) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h\00") - (data (i32.const 1416) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00m\00a\00r\00k\00") + (data (i32.const 8) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00i\00t\00c\00m\00/\00t\00r\00a\00c\00e\00.\00t\00s\00") + (data (i32.const 56) "\10\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)\00") + (data (i32.const 112) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 168) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 216) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00i\00n\00i\00t\00") + (data (i32.const 256) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00f\00r\00o\00m\00S\00p\00a\00c\00e\00 \00=\00") + (data (i32.const 304) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00c\00l\00e\00a\00r\00") + (data (i32.const 344) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00t\00o\00S\00p\00a\00c\00e\00 \00=\00") + (data (i32.const 392) "\10\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00I\00D\00L\00E\00") + (data (i32.const 448) "\10\00\00\006\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") + (data (i32.const 520) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)\00") + (data (i32.const 576) "\10\00\00\00&\00\00\00\00\00\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 632) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00l\00i\00n\00k\00") + (data (i32.const 672) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00m\00a\00k\00e\00G\00r\00a\00y\00") + (data (i32.const 720) "\10\00\00\00:\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") + (data (i32.const 800) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f\00") + (data (i32.const 848) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 896) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l\00") + (data (i32.const 944) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00#\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)\00") + (data (i32.const 984) "\10\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00c\00o\00l\00l\00e\00c\00t\00") + (data (i32.const 1024) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E\00") + (data (i32.const 1072) "\10\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K\00") + (data (i32.const 1128) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00") + (data (i32.const 1176) "\10\00\00\00*\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h\00") + (data (i32.const 1240) "\10\00\00\00$\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P\00") + (data (i32.const 1296) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e\00") + (data (i32.const 1352) "\10\00\00\00,\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h\00") + (data (i32.const 1416) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00m\00a\00r\00k\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/itcm/trace/GC_TRACE i32 (i32.const 1)) @@ -57,7 +57,6 @@ (global $~lib/memory/HEAP_BASE i32 (i32.const 1452)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $gc/itcm/trace/main)) (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -194,7 +193,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace local.get $0 local.get $0 i32.store offset=8 @@ -215,7 +214,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $~lib/util/runtime/HEADER_SIZE call $~lib/memory/memory.allocate global.set $~lib/collector/itcm/fromSpace @@ -233,7 +232,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $~lib/collector/itcm/fromSpace i32.const -1 i32.store @@ -259,7 +258,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $~lib/collector/itcm/toSpace i32.const -1 i32.store @@ -279,7 +278,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace end ) (func $~lib/collector/itcm/ManagedObject#set:color (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) @@ -338,7 +337,7 @@ f64.convert_i32_u f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace local.get $1 local.get $0 call $~lib/collector/itcm/ManagedObject#set:next @@ -363,7 +362,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace call $~lib/collector/itcm/maybeInit block $~lib/collector/itcm/refToObj|inlined.0 (result i32) local.get $0 @@ -389,9 +388,9 @@ if i32.const 0 i32.const 128 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -406,9 +405,9 @@ if i32.const 0 i32.const 128 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -424,7 +423,7 @@ if i32.const 4 call $~lib/util/runtime/allocate - i32.const 2 + i32.const 17 call $~lib/util/runtime/register local.set $0 end @@ -700,7 +699,7 @@ i32.const 592 i32.const 54 i32.const 43 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -711,7 +710,7 @@ local.get $1 call $~lib/memory/memory.fill local.get $2 - i32.const 3 + i32.const 15 call $~lib/util/runtime/register ) (func $~lib/collector/itcm/ManagedObject#get:color (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -766,7 +765,7 @@ f64.convert_i32_u f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace local.get $1 local.get $2 i32.store offset=12 @@ -790,7 +789,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace local.get $0 global.get $~lib/collector/itcm/iter i32.eq @@ -827,7 +826,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace call $~lib/collector/itcm/maybeInit block $~lib/collector/itcm/refToObj|inlined.1 (result i32) local.get $1 @@ -877,7 +876,7 @@ i32.const 592 i32.const 12 i32.const 57 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -893,7 +892,7 @@ if i32.const 12 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 14 call $~lib/util/runtime/register local.set $0 end @@ -940,7 +939,7 @@ else i32.const 16 call $~lib/util/runtime/allocate - i32.const 5 + i32.const 18 call $~lib/util/runtime/register end local.get $1 @@ -1242,9 +1241,9 @@ if i32.const 0 i32.const 128 - i32.const 88 + i32.const 91 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1299,7 +1298,7 @@ i32.const 864 i32.const 14 i32.const 64 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1410,7 +1409,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 0 call $gc/itcm/trace/Ref#constructor local.set $0 @@ -1421,7 +1420,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 0 i32.const 1 call $~lib/array/Array#constructor @@ -1433,7 +1432,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace local.get $1 i32.const 0 local.get $0 @@ -1445,7 +1444,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace local.get $1 i32.const 0 i32.const 0 @@ -1457,7 +1456,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 0 call $gc/itcm/trace/Ref#constructor drop @@ -1500,7 +1499,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace call $~lib/runtime/__gc_mark_roots i32.const 2 global.set $~lib/collector/itcm/state @@ -1511,7 +1510,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace br $break|0 unreachable end @@ -1539,7 +1538,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace local.get $0 global.set $~lib/collector/itcm/iter local.get $0 @@ -1565,7 +1564,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $~lib/collector/itcm/iter call $~lib/collector/itcm/ManagedObject#get:next local.set $0 @@ -1594,7 +1593,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace end end br $break|0 @@ -1623,7 +1622,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace local.get $0 call $~lib/collector/itcm/ManagedObject#get:next global.set $~lib/collector/itcm/iter @@ -1642,7 +1641,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $~lib/collector/itcm/toSpace call $~lib/collector/itcm/ManagedObjectList#clear i32.const 1 @@ -1654,7 +1653,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace end br $break|0 unreachable @@ -1670,7 +1669,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace call $~lib/collector/itcm/maybeInit block $break|0 loop $continue|0 @@ -1704,9 +1703,9 @@ if i32.const 0 i32.const 24 - i32.const 6 + i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/memory/HEAP_BASE @@ -1745,7 +1744,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace call $~lib/collector/itcm/maybeInit block $~lib/collector/itcm/refToObj|inlined.4 (result i32) local.get $0 @@ -1797,7 +1796,7 @@ if local.get $3 call $~lib/collector/itcm/__ref_mark - i32.const 2 + i32.const 17 local.get $3 call $~lib/runtime/__gc_mark_members end @@ -1815,25 +1814,64 @@ (local $2 i32) block $invalid block $~lib/array/Array - block $~lib/arraybuffer/ArrayBufferView - block $~lib/arraybuffer/ArrayBuffer - block $gc/itcm/trace/Ref - block $~lib/string/String - local.get $0 - br_table $invalid $~lib/string/String $gc/itcm/trace/Ref $~lib/arraybuffer/ArrayBuffer $~lib/arraybuffer/ArrayBufferView $~lib/array/Array $invalid + block $gc/itcm/trace/Ref + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/arraybuffer/ArrayBufferView + block $~lib/number/F64 + block $~lib/number/F32 + block $~lib/number/Bool + block $~lib/number/Usize + block $~lib/number/U64 + block $~lib/number/U32 + block $~lib/number/U16 + block $~lib/number/U8 + block $~lib/number/Isize + block $~lib/number/I64 + block $~lib/number/I32 + block $~lib/number/I16 + block $~lib/number/I8 + local.get $0 + br_table $invalid $~lib/number/I8 $~lib/number/I16 $~lib/number/I32 $~lib/number/I64 $~lib/number/Isize $~lib/number/U8 $~lib/number/U16 $~lib/number/U32 $~lib/number/U64 $~lib/number/Usize $~lib/number/Bool $~lib/number/F32 $~lib/number/F64 $~lib/arraybuffer/ArrayBufferView $~lib/arraybuffer/ArrayBuffer $~lib/string/String $gc/itcm/trace/Ref $~lib/array/Array $invalid + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 15 + local.get $2 + call $~lib/runtime/__gc_mark_members end return end - local.get $1 - i32.load - local.tee $2 - if - local.get $2 - call $~lib/collector/itcm/__ref_mark - i32.const 2 - local.get $2 - call $~lib/runtime/__gc_mark_members - end return end return @@ -1844,7 +1882,7 @@ if local.get $2 call $~lib/collector/itcm/__ref_mark - i32.const 3 + i32.const 17 local.get $2 call $~lib/runtime/__gc_mark_members end diff --git a/tests/compiler/gc/rc/global-assign.json b/tests/compiler/gc/rc/global-assign.json index 85b9ce0f6e..b1da366ff4 100644 --- a/tests/compiler/gc/rc/global-assign.json +++ b/tests/compiler/gc/rc/global-assign.json @@ -1,5 +1,5 @@ { "asc_flags": [ - "--runtime arena" + "--runtime none" ] } \ No newline at end of file diff --git a/tests/compiler/gc/rc/global-assign.optimized.wat b/tests/compiler/gc/rc/global-assign.optimized.wat index 3b0256a755..7b5857ed50 100644 --- a/tests/compiler/gc/rc/global-assign.optimized.wat +++ b/tests/compiler/gc/rc/global-assign.optimized.wat @@ -5,21 +5,19 @@ (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(") + (data (i32.const 8) "\10\00\00\00(") (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 64) "\02\00\00\00\16") + (data (i32.const 64) "\10\00\00\00\16") (data (i32.const 80) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") - (data (i32.const 104) "\02\00\00\00\12") + (data (i32.const 104) "\10\00\00\00\12") (data (i32.const 120) "g\00c\00.\00r\00e\00t\00a\00i\00n") - (data (i32.const 144) "\02\00\00\00,") + (data (i32.const 144) "\10\00\00\00,") (data (i32.const 160) "g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s") - (data (i32.const 208) "\02\00\00\00\14") + (data (i32.const 208) "\10\00\00\00\14") (data (i32.const 224) "g\00c\00.\00r\00e\00l\00e\00a\00s\00e") - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $gc/rc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/rc/_dummy/register_ref (mut i32) (i32.const 0)) (global $gc/rc/_dummy/retain_count (mut i32) (i32.const 0)) @@ -33,7 +31,6 @@ (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $gc/rc/global-assign/main)) (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -127,7 +124,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/rc/_dummy/register_count i32.const 1 i32.add @@ -143,9 +140,9 @@ if i32.const 0 i32.const 24 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -158,13 +155,13 @@ if i32.const 0 i32.const 24 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 - i32.const 1 + i32.const 17 i32.store local.get $0 call $gc/rc/_dummy/__ref_register @@ -179,7 +176,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/rc/_dummy/retain_count i32.const 1 i32.add @@ -196,7 +193,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/rc/_dummy/release_count i32.const 1 i32.add @@ -225,9 +222,9 @@ if i32.const 0 i32.const 160 - i32.const 11 + i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/retain_count @@ -236,9 +233,9 @@ if i32.const 0 i32.const 160 - i32.const 12 + i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/retain_ref @@ -247,18 +244,18 @@ if i32.const 0 i32.const 160 - i32.const 13 + i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/release_count if i32.const 0 i32.const 160 - i32.const 14 + i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $~lib/util/runtime/allocate @@ -285,9 +282,9 @@ if i32.const 0 i32.const 160 - i32.const 19 + i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/retain_count @@ -296,9 +293,9 @@ if i32.const 0 i32.const 160 - i32.const 20 + i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/retain_ref @@ -307,9 +304,9 @@ if i32.const 0 i32.const 160 - i32.const 21 + i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/release_count @@ -318,9 +315,9 @@ if i32.const 0 i32.const 160 - i32.const 22 + i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/release_ref @@ -329,9 +326,9 @@ if i32.const 0 i32.const 160 - i32.const 23 + i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/gc/rc/global-assign.ts b/tests/compiler/gc/rc/global-assign.ts index 8102b2cf18..6fb0bb400c 100644 --- a/tests/compiler/gc/rc/global-assign.ts +++ b/tests/compiler/gc/rc/global-assign.ts @@ -1,3 +1,4 @@ +import "allocator/arena"; import { register_count, retain_count, retain_ref, release_count, release_ref } from "./_dummy"; @start export function main(): void {} diff --git a/tests/compiler/gc/rc/global-assign.untouched.wat b/tests/compiler/gc/rc/global-assign.untouched.wat index c6256f40a8..fd25552427 100644 --- a/tests/compiler/gc/rc/global-assign.untouched.wat +++ b/tests/compiler/gc/rc/global-assign.untouched.wat @@ -5,14 +5,14 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 64) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") - (data (i32.const 104) "\02\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00t\00a\00i\00n\00") - (data (i32.const 144) "\02\00\00\00,\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s\00") - (data (i32.const 208) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00l\00e\00a\00s\00e\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 104) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00t\00a\00i\00n\00") + (data (i32.const 144) "\10\00\00\00,\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s\00") + (data (i32.const 208) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00l\00e\00a\00s\00e\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/rc/_dummy/collect_count (mut i32) (i32.const 0)) @@ -33,7 +33,6 @@ (global $~lib/memory/HEAP_BASE i32 (i32.const 244)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $gc/rc/global-assign/main)) (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -163,7 +162,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/rc/_dummy/register_count i32.const 1 i32.add @@ -180,9 +179,9 @@ if i32.const 0 i32.const 24 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -197,9 +196,9 @@ if i32.const 0 i32.const 24 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -215,7 +214,7 @@ if i32.const 0 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.set $0 end @@ -230,7 +229,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/rc/_dummy/retain_count i32.const 1 i32.add @@ -247,7 +246,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/rc/_dummy/release_count i32.const 1 i32.add @@ -286,9 +285,9 @@ if i32.const 0 i32.const 160 - i32.const 11 + i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/retain_count @@ -298,9 +297,9 @@ if i32.const 0 i32.const 160 - i32.const 12 + i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/retain_ref @@ -310,9 +309,9 @@ if i32.const 0 i32.const 160 - i32.const 13 + i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/release_count @@ -322,9 +321,9 @@ if i32.const 0 i32.const 160 - i32.const 14 + i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -353,9 +352,9 @@ if i32.const 0 i32.const 160 - i32.const 19 + i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/retain_count @@ -365,9 +364,9 @@ if i32.const 0 i32.const 160 - i32.const 20 + i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/retain_ref @@ -377,9 +376,9 @@ if i32.const 0 i32.const 160 - i32.const 21 + i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/release_count @@ -389,9 +388,9 @@ if i32.const 0 i32.const 160 - i32.const 22 + i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/release_ref @@ -401,9 +400,9 @@ if i32.const 0 i32.const 160 - i32.const 23 + i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/gc/rc/global-init.json b/tests/compiler/gc/rc/global-init.json index 85b9ce0f6e..b1da366ff4 100644 --- a/tests/compiler/gc/rc/global-init.json +++ b/tests/compiler/gc/rc/global-init.json @@ -1,5 +1,5 @@ { "asc_flags": [ - "--runtime arena" + "--runtime none" ] } \ No newline at end of file diff --git a/tests/compiler/gc/rc/global-init.optimized.wat b/tests/compiler/gc/rc/global-init.optimized.wat index 0eb4ffcc95..416f9d1e60 100644 --- a/tests/compiler/gc/rc/global-init.optimized.wat +++ b/tests/compiler/gc/rc/global-init.optimized.wat @@ -5,19 +5,17 @@ (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(") + (data (i32.const 8) "\10\00\00\00(") (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 64) "\02\00\00\00\16") + (data (i32.const 64) "\10\00\00\00\16") (data (i32.const 80) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") - (data (i32.const 104) "\02\00\00\00\12") + (data (i32.const 104) "\10\00\00\00\12") (data (i32.const 120) "g\00c\00.\00r\00e\00t\00a\00i\00n") - (data (i32.const 144) "\02\00\00\00(") + (data (i32.const 144) "\10\00\00\00(") (data (i32.const 160) "g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $gc/rc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/rc/_dummy/register_ref (mut i32) (i32.const 0)) (global $gc/rc/_dummy/retain_count (mut i32) (i32.const 0)) @@ -29,7 +27,6 @@ (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $gc/rc/global-init/main)) (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -123,7 +120,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/rc/_dummy/register_count i32.const 1 i32.add @@ -139,9 +136,9 @@ if i32.const 0 i32.const 24 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -154,13 +151,13 @@ if i32.const 0 i32.const 24 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 - i32.const 1 + i32.const 17 i32.store local.get $0 call $gc/rc/_dummy/__ref_register @@ -175,7 +172,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/rc/_dummy/retain_count i32.const 1 i32.add @@ -201,9 +198,9 @@ if i32.const 0 i32.const 160 - i32.const 10 + i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/retain_count @@ -212,9 +209,9 @@ if i32.const 0 i32.const 160 - i32.const 11 + i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/retain_ref @@ -223,18 +220,18 @@ if i32.const 0 i32.const 160 - i32.const 12 + i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/release_count if i32.const 0 i32.const 160 - i32.const 13 + i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/gc/rc/global-init.ts b/tests/compiler/gc/rc/global-init.ts index faa6a1e00f..46c36ba565 100644 --- a/tests/compiler/gc/rc/global-init.ts +++ b/tests/compiler/gc/rc/global-init.ts @@ -1,3 +1,4 @@ +import "allocator/arena"; import { register_count, retain_count, retain_ref, release_count } from "./_dummy"; @start export function main(): void {} diff --git a/tests/compiler/gc/rc/global-init.untouched.wat b/tests/compiler/gc/rc/global-init.untouched.wat index e39ae50e84..e5bd882596 100644 --- a/tests/compiler/gc/rc/global-init.untouched.wat +++ b/tests/compiler/gc/rc/global-init.untouched.wat @@ -5,13 +5,13 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 64) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") - (data (i32.const 104) "\02\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00t\00a\00i\00n\00") - (data (i32.const 144) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 104) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00t\00a\00i\00n\00") + (data (i32.const 144) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/rc/_dummy/collect_count (mut i32) (i32.const 0)) @@ -31,7 +31,6 @@ (global $~lib/memory/HEAP_BASE i32 (i32.const 200)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $gc/rc/global-init/main)) (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -161,7 +160,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/rc/_dummy/register_count i32.const 1 i32.add @@ -178,9 +177,9 @@ if i32.const 0 i32.const 24 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -195,9 +194,9 @@ if i32.const 0 i32.const 24 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -213,7 +212,7 @@ if i32.const 0 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.set $0 end @@ -228,7 +227,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/rc/_dummy/retain_count i32.const 1 i32.add @@ -264,9 +263,9 @@ if i32.const 0 i32.const 160 - i32.const 10 + i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/retain_count @@ -276,9 +275,9 @@ if i32.const 0 i32.const 160 - i32.const 11 + i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/retain_ref @@ -288,9 +287,9 @@ if i32.const 0 i32.const 160 - i32.const 12 + i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $gc/rc/_dummy/release_count @@ -300,9 +299,9 @@ if i32.const 0 i32.const 160 - i32.const 13 + i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 480d871d50..9988295b26 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -3,16 +3,15 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 2 funcref) (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $getter-call/test)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -85,9 +84,9 @@ if i32.const 0 i32.const 16 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -100,13 +99,13 @@ if i32.const 0 i32.const 16 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 - i32.const 1 + i32.const 17 i32.store local.get $0 ) diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index 08c98f90a5..32c2a69d26 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -4,9 +4,9 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 2 funcref) (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|0) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) @@ -17,7 +17,6 @@ (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $getter-call/test)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -141,9 +140,9 @@ if i32.const 0 i32.const 16 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -158,9 +157,9 @@ if i32.const 0 i32.const 16 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -174,7 +173,7 @@ if i32.const 0 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.set $0 end diff --git a/tests/compiler/getter-setter.optimized.wat b/tests/compiler/getter-setter.optimized.wat index ca02235af5..d9e77d97b9 100644 --- a/tests/compiler/getter-setter.optimized.wat +++ b/tests/compiler/getter-setter.optimized.wat @@ -1,14 +1,11 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00 \00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00 \00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s") (global $getter-setter/Foo._bar (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:getter-setter (; 1 ;) (type $FUNCSIG$v) global.get $getter-setter/Foo._bar @@ -17,7 +14,7 @@ i32.const 16 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -30,7 +27,7 @@ i32.const 16 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -43,7 +40,7 @@ i32.const 16 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/getter-setter.untouched.wat b/tests/compiler/getter-setter.untouched.wat index e82b9ab35f..5d1df0ec3b 100644 --- a/tests/compiler/getter-setter.untouched.wat +++ b/tests/compiler/getter-setter.untouched.wat @@ -3,15 +3,13 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00 \00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00 \00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $getter-setter/Foo._bar (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $getter-setter/Foo.bar.get:bar (; 1 ;) (type $FUNCSIG$i) (result i32) global.get $getter-setter/Foo._bar @@ -30,7 +28,7 @@ i32.const 16 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -44,7 +42,7 @@ i32.const 16 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -60,7 +58,7 @@ i32.const 16 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/i64-polyfill.optimized.wat b/tests/compiler/i64-polyfill.optimized.wat index 4a46ba16d3..ebf36e83cf 100644 --- a/tests/compiler/i64-polyfill.optimized.wat +++ b/tests/compiler/i64-polyfill.optimized.wat @@ -4,12 +4,9 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $../../examples/i64-polyfill/assembly/i64/lo (mut i32) (i32.const 0)) (global $../../examples/i64-polyfill/assembly/i64/hi (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "getHi" (func $../../examples/i64-polyfill/assembly/i64/getHi)) (export "getLo" (func $../../examples/i64-polyfill/assembly/i64/getLo)) (export "clz" (func $../../examples/i64-polyfill/assembly/i64/clz)) diff --git a/tests/compiler/i64-polyfill.untouched.wat b/tests/compiler/i64-polyfill.untouched.wat index 429af491ce..f1c2ca5885 100644 --- a/tests/compiler/i64-polyfill.untouched.wat +++ b/tests/compiler/i64-polyfill.untouched.wat @@ -8,9 +8,7 @@ (elem (i32.const 0) $null) (global $../../examples/i64-polyfill/assembly/i64/lo (mut i32) (i32.const 0)) (global $../../examples/i64-polyfill/assembly/i64/hi (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "getHi" (func $../../examples/i64-polyfill/assembly/i64/getHi)) (export "getLo" (func $../../examples/i64-polyfill/assembly/i64/getLo)) (export "clz" (func $../../examples/i64-polyfill/assembly/i64/clz)) diff --git a/tests/compiler/if.optimized.wat b/tests/compiler/if.optimized.wat index 8415b7eae3..3f1f4a974a 100644 --- a/tests/compiler/if.optimized.wat +++ b/tests/compiler/if.optimized.wat @@ -2,13 +2,10 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\n\00\00\00i\00f\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $start) + (data (i32.const 8) "\10\00\00\00\n\00\00\00i\00f\00.\00t\00s") (export "memory" (memory $0)) - (export "table" (table $0)) (export "ifThenElse" (func $if/ifThenElse)) (export "ifThen" (func $if/ifThen)) (export "ifThenElseBlock" (func $if/ifThenElse)) @@ -36,7 +33,7 @@ i32.const 16 i32.const 37 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/if.untouched.wat b/tests/compiler/if.untouched.wat index 6ed4a2269d..2db3f63e1c 100644 --- a/tests/compiler/if.untouched.wat +++ b/tests/compiler/if.untouched.wat @@ -2,14 +2,12 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\n\00\00\00i\00f\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\n\00\00\00i\00f\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 28)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "ifThenElse" (func $if/ifThenElse)) (export "ifThen" (func $if/ifThen)) (export "ifThenElseBlock" (func $if/ifThenElseBlock)) @@ -58,7 +56,7 @@ i32.const 16 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -71,7 +69,7 @@ i32.const 16 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -84,7 +82,7 @@ i32.const 16 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -97,7 +95,7 @@ i32.const 16 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -110,7 +108,7 @@ i32.const 16 i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -123,7 +121,7 @@ i32.const 16 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -137,7 +135,7 @@ i32.const 16 i32.const 37 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable diff --git a/tests/compiler/import.optimized.wat b/tests/compiler/import.optimized.wat index 86b388ad0a..e2acb0a3b8 100644 --- a/tests/compiler/import.optimized.wat +++ b/tests/compiler/import.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/import.untouched.wat b/tests/compiler/import.untouched.wat index ddade6dbc1..58a39afa2d 100644 --- a/tests/compiler/import.untouched.wat +++ b/tests/compiler/import.untouched.wat @@ -7,9 +7,7 @@ (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $export/add (; 0 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 diff --git a/tests/compiler/infer-type.optimized.wat b/tests/compiler/infer-type.optimized.wat index 6237556e35..0d76d221a7 100644 --- a/tests/compiler/infer-type.optimized.wat +++ b/tests/compiler/infer-type.optimized.wat @@ -1,15 +1,12 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1a\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\1a\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s") (global $infer-type/ri (mut i32) (i32.const 0)) (global $infer-type/rI (mut i64) (i64.const 0)) (global $infer-type/rf (mut f32) (f32.const 0)) (global $infer-type/rF (mut f64) (f64.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:infer-type (; 0 ;) (type $FUNCSIG$v) (local $0 i32) diff --git a/tests/compiler/infer-type.untouched.wat b/tests/compiler/infer-type.untouched.wat index 8c89b18bc5..2fd7c456af 100644 --- a/tests/compiler/infer-type.untouched.wat +++ b/tests/compiler/infer-type.untouched.wat @@ -5,9 +5,9 @@ (type $FUNCSIG$f (func (result f32))) (type $FUNCSIG$d (func (result f64))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1a\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1a\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $infer-type/i i32 (i32.const 10)) @@ -19,9 +19,7 @@ (global $infer-type/rF (mut f64) (f64.const 0)) (global $infer-type/inferi (mut i32) (i32.const -2147483648)) (global $infer-type/inferu (mut i32) (i32.const 2147483647)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $infer-type/locals (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -112,7 +110,7 @@ i32.const 16 i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -122,7 +120,7 @@ i32.const 16 i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/inlining-blocklocals.optimized.wat b/tests/compiler/inlining-blocklocals.optimized.wat index ce8a09fdc6..54e6d33648 100644 --- a/tests/compiler/inlining-blocklocals.optimized.wat +++ b/tests/compiler/inlining-blocklocals.optimized.wat @@ -1,16 +1,13 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00.\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00-\00b\00l\00o\00c\00k\00l\00o\00c\00a\00l\00s\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00.\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00-\00b\00l\00o\00c\00k\00l\00o\00c\00a\00l\00s\00.\00t\00s") (global $inlining-blocklocals/b (mut i32) (i32.const 2)) (global $inlining-blocklocals/theCall_a (mut i32) (i32.const 0)) (global $inlining-blocklocals/theCall_b (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $inlining-blocklocals/test (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -31,7 +28,7 @@ i32.const 16 i32.const 16 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $inlining-blocklocals/theCall_b @@ -42,7 +39,7 @@ i32.const 16 i32.const 17 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/inlining-blocklocals.untouched.wat b/tests/compiler/inlining-blocklocals.untouched.wat index 9d3b327fb4..7c784ef86a 100644 --- a/tests/compiler/inlining-blocklocals.untouched.wat +++ b/tests/compiler/inlining-blocklocals.untouched.wat @@ -1,17 +1,15 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00.\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00-\00b\00l\00o\00c\00k\00l\00o\00c\00a\00l\00s\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00.\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00-\00b\00l\00o\00c\00k\00l\00o\00c\00a\00l\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $inlining-blocklocals/b (mut i32) (i32.const 2)) (global $inlining-blocklocals/theCall_a (mut i32) (i32.const 0)) (global $inlining-blocklocals/theCall_b (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $inlining-blocklocals/test (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -46,7 +44,7 @@ i32.const 16 i32.const 16 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $inlining-blocklocals/theCall_b @@ -58,7 +56,7 @@ i32.const 16 i32.const 17 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/inlining-recursive.optimized.wat b/tests/compiler/inlining-recursive.optimized.wat index ae83157f80..d75cc7c9bd 100644 --- a/tests/compiler/inlining-recursive.optimized.wat +++ b/tests/compiler/inlining-recursive.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (export "foo" (func $inlining-recursive/foo)) (export "bar" (func $inlining-recursive/baz)) (export "baz" (func $inlining-recursive/baz)) diff --git a/tests/compiler/inlining-recursive.untouched.wat b/tests/compiler/inlining-recursive.untouched.wat index 89e671958e..c8f5c4fa9d 100644 --- a/tests/compiler/inlining-recursive.untouched.wat +++ b/tests/compiler/inlining-recursive.untouched.wat @@ -3,9 +3,7 @@ (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "foo" (func $inlining-recursive/foo)) (export "bar" (func $inlining-recursive/bar)) (export "baz" (func $inlining-recursive/baz)) diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index a3381170bf..2e896e630e 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -4,17 +4,16 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\16\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s") - (data (i32.const 40) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\16\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s") + (data (i32.const 40) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 2 funcref) (elem (i32.const 0) $null $inlining/func_fe~anonymous|0) (global $~lib/argc (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)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $inlining/test)) (start $start) (func $inlining/test (; 1 ;) (type $FUNCSIG$i) (result i32) @@ -36,7 +35,7 @@ i32.const 16 i32.const 68 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -131,9 +130,9 @@ if i32.const 0 i32.const 48 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -146,9 +145,9 @@ if i32.const 0 i32.const 48 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -160,14 +159,14 @@ (local $0 i32) i32.const 16 call $~lib/util/runtime/allocate - i32.const 2 + i32.const 19 call $~lib/util/runtime/register local.tee $0 i32.eqz if i32.const 8 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register local.set $0 end @@ -198,7 +197,7 @@ i32.const 16 i32.const 97 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -210,7 +209,7 @@ i32.const 16 i32.const 98 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -222,7 +221,7 @@ i32.const 16 i32.const 99 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -234,7 +233,7 @@ i32.const 16 i32.const 100 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index eefe1e82f9..015ff4dc97 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -4,10 +4,10 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\16\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 40) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\16\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 40) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 2 funcref) (elem (i32.const 0) $null $inlining/func_fe~anonymous|0) (global $inlining/constantGlobal i32 (i32.const 1)) @@ -19,7 +19,6 @@ (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 88)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $inlining/test)) (start $start) (func $inlining/test (; 1 ;) (type $FUNCSIG$i) (result i32) @@ -70,7 +69,7 @@ i32.const 16 i32.const 60 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $inlining/func_ii|inlined.1 (result i32) @@ -100,7 +99,7 @@ i32.const 16 i32.const 61 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $inlining/func_ii|inlined.2 (result i32) @@ -130,7 +129,7 @@ i32.const 16 i32.const 62 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $inlining/func_ii_opt|inlined.0 (result i32) @@ -146,7 +145,7 @@ i32.const 16 i32.const 63 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $inlining/func_ii_opt|inlined.1 (result i32) @@ -162,7 +161,7 @@ i32.const 16 i32.const 64 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $inlining/func_ii_loc|inlined.0 (result i32) @@ -188,7 +187,7 @@ i32.const 16 i32.const 65 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $inlining/func_ii_loc|inlined.1 (result i32) @@ -214,7 +213,7 @@ i32.const 16 i32.const 66 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $inlining/func_iv|inlined.0 @@ -238,7 +237,7 @@ i32.const 16 i32.const 68 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $inlining/Foo.method_static|inlined.0 (result i32) @@ -258,7 +257,7 @@ i32.const 16 i32.const 69 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 123 @@ -280,7 +279,7 @@ i32.const 16 i32.const 71 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -405,9 +404,9 @@ if i32.const 0 i32.const 48 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -422,9 +421,9 @@ if i32.const 0 i32.const 48 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -450,7 +449,7 @@ else i32.const 16 call $~lib/util/runtime/allocate - i32.const 2 + i32.const 19 call $~lib/util/runtime/register end local.set $3 @@ -462,7 +461,7 @@ if i32.const 8 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register local.set $3 end @@ -501,7 +500,7 @@ i32.const 16 i32.const 97 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -514,7 +513,7 @@ i32.const 16 i32.const 98 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -527,7 +526,7 @@ i32.const 16 i32.const 99 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -540,7 +539,7 @@ i32.const 16 i32.const 100 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -554,7 +553,7 @@ i32.const 16 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $inlining/test_funcs diff --git a/tests/compiler/instanceof.optimized.wat b/tests/compiler/instanceof.optimized.wat index dd62dccf65..65f4112a6c 100644 --- a/tests/compiler/instanceof.optimized.wat +++ b/tests/compiler/instanceof.optimized.wat @@ -1,14 +1,11 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1a\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\1a\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s") (global $instanceof/an (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:instanceof (; 1 ;) (type $FUNCSIG$v) global.get $instanceof/an @@ -17,7 +14,7 @@ i32.const 16 i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -29,7 +26,7 @@ i32.const 16 i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/instanceof.untouched.wat b/tests/compiler/instanceof.untouched.wat index 65e10c40ef..938ce3304f 100644 --- a/tests/compiler/instanceof.untouched.wat +++ b/tests/compiler/instanceof.untouched.wat @@ -3,9 +3,9 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1a\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1a\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $instanceof/a (mut i32) (i32.const 0)) @@ -15,9 +15,7 @@ (global $instanceof/f (mut f32) (f32.const 0)) (global $instanceof/F (mut f64) (f64.const 0)) (global $instanceof/an (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $instanceof/isI32 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) @@ -95,7 +93,7 @@ i32.const 16 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -109,7 +107,7 @@ i32.const 16 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -124,7 +122,7 @@ i32.const 16 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -139,7 +137,7 @@ i32.const 16 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -154,7 +152,7 @@ i32.const 16 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -169,7 +167,7 @@ i32.const 16 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -183,7 +181,7 @@ i32.const 16 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -198,7 +196,7 @@ i32.const 16 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -213,7 +211,7 @@ i32.const 16 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -228,7 +226,7 @@ i32.const 16 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -243,7 +241,7 @@ i32.const 16 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -258,7 +256,7 @@ i32.const 16 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -273,7 +271,7 @@ i32.const 16 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -287,7 +285,7 @@ i32.const 16 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -302,7 +300,7 @@ i32.const 16 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -317,7 +315,7 @@ i32.const 16 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -332,7 +330,7 @@ i32.const 16 i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -347,7 +345,7 @@ i32.const 16 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -362,7 +360,7 @@ i32.const 16 i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -377,7 +375,7 @@ i32.const 16 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -391,7 +389,7 @@ i32.const 16 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -406,7 +404,7 @@ i32.const 16 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -421,7 +419,7 @@ i32.const 16 i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -436,7 +434,7 @@ i32.const 16 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -451,7 +449,7 @@ i32.const 16 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -466,7 +464,7 @@ i32.const 16 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -481,7 +479,7 @@ i32.const 16 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -495,7 +493,7 @@ i32.const 16 i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -510,7 +508,7 @@ i32.const 16 i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -525,7 +523,7 @@ i32.const 16 i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -540,7 +538,7 @@ i32.const 16 i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -555,7 +553,7 @@ i32.const 16 i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -570,7 +568,7 @@ i32.const 16 i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -585,7 +583,7 @@ i32.const 16 i32.const 50 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -599,7 +597,7 @@ i32.const 16 i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -610,7 +608,7 @@ i32.const 16 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -622,7 +620,7 @@ i32.const 16 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -634,7 +632,7 @@ i32.const 16 i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -646,7 +644,7 @@ i32.const 16 i32.const 65 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $instanceof/an @@ -659,7 +657,7 @@ i32.const 16 i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -673,7 +671,7 @@ i32.const 16 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -687,7 +685,7 @@ i32.const 16 i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -701,7 +699,7 @@ i32.const 16 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/limits.optimized.wat b/tests/compiler/limits.optimized.wat index 86b388ad0a..e2acb0a3b8 100644 --- a/tests/compiler/limits.optimized.wat +++ b/tests/compiler/limits.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/limits.untouched.wat b/tests/compiler/limits.untouched.wat index 16d076f1f4..73017341a9 100644 --- a/tests/compiler/limits.untouched.wat +++ b/tests/compiler/limits.untouched.wat @@ -29,9 +29,7 @@ (global $~lib/builtins/f32.MAX_SAFE_INTEGER f32 (f32.const 16777215)) (global $~lib/builtins/f64.MIN_SAFE_INTEGER f64 (f64.const -9007199254740991)) (global $~lib/builtins/f64.MAX_SAFE_INTEGER f64 (f64.const 9007199254740991)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:limits (; 0 ;) (type $FUNCSIG$v) global.get $~lib/builtins/i8.MIN_VALUE diff --git a/tests/compiler/literals.optimized.wat b/tests/compiler/literals.optimized.wat index 86b388ad0a..e2acb0a3b8 100644 --- a/tests/compiler/literals.optimized.wat +++ b/tests/compiler/literals.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/literals.untouched.wat b/tests/compiler/literals.untouched.wat index c40324953e..947b448255 100644 --- a/tests/compiler/literals.untouched.wat +++ b/tests/compiler/literals.untouched.wat @@ -3,9 +3,7 @@ (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:literals (; 0 ;) (type $FUNCSIG$v) i32.const 0 diff --git a/tests/compiler/logical.optimized.wat b/tests/compiler/logical.optimized.wat index d9c5e50c5a..8fa227a97c 100644 --- a/tests/compiler/logical.optimized.wat +++ b/tests/compiler/logical.optimized.wat @@ -1,17 +1,14 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\14\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\14\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s") (global $logical/i (mut i32) (i32.const 0)) (global $logical/I (mut i64) (i64.const 0)) (global $logical/f (mut f32) (f32.const 0)) (global $logical/F (mut f64) (f64.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:logical (; 1 ;) (type $FUNCSIG$v) i32.const 2 @@ -24,7 +21,7 @@ i32.const 16 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -37,7 +34,7 @@ i32.const 16 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -50,7 +47,7 @@ i32.const 16 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -63,7 +60,7 @@ i32.const 16 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -76,7 +73,7 @@ i32.const 16 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -89,7 +86,7 @@ i32.const 16 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -102,7 +99,7 @@ i32.const 16 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -115,7 +112,7 @@ i32.const 16 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/logical.untouched.wat b/tests/compiler/logical.untouched.wat index 64494942cd..0020b70633 100644 --- a/tests/compiler/logical.untouched.wat +++ b/tests/compiler/logical.untouched.wat @@ -1,18 +1,16 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\14\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\14\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $logical/i (mut i32) (i32.const 0)) (global $logical/I (mut i64) (i64.const 0)) (global $logical/f (mut f32) (f32.const 0)) (global $logical/F (mut f64) (f64.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 36)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:logical (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -95,7 +93,7 @@ i32.const 16 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -114,7 +112,7 @@ i32.const 16 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -135,7 +133,7 @@ i32.const 16 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -156,7 +154,7 @@ i32.const 16 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -177,7 +175,7 @@ i32.const 16 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -198,7 +196,7 @@ i32.const 16 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -219,7 +217,7 @@ i32.const 16 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -240,7 +238,7 @@ i32.const 16 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/main.optimized.wat b/tests/compiler/main.optimized.wat index 4316755194..069143d90d 100644 --- a/tests/compiler/main.optimized.wat +++ b/tests/compiler/main.optimized.wat @@ -2,12 +2,9 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $main/code (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $main/main)) (func $main/main (; 0 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) global.get $~lib/started diff --git a/tests/compiler/main.untouched.wat b/tests/compiler/main.untouched.wat index 1483eb58c4..b232da54c7 100644 --- a/tests/compiler/main.untouched.wat +++ b/tests/compiler/main.untouched.wat @@ -6,9 +6,7 @@ (elem (i32.const 0) $null) (global $main/code (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $main/main)) (func $start:main (; 0 ;) (type $FUNCSIG$v) i32.const 1 diff --git a/tests/compiler/mandelbrot.optimized.wat b/tests/compiler/mandelbrot.optimized.wat index b94c86ea2a..9288c5353c 100644 --- a/tests/compiler/mandelbrot.optimized.wat +++ b/tests/compiler/mandelbrot.optimized.wat @@ -3,10 +3,7 @@ (type $FUNCSIG$dd (func (param f64) (result f64))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (export "computeLine" (func $../../examples/mandelbrot/assembly/index/computeLine)) (func $~lib/math/NativeMath.log (; 0 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i32) diff --git a/tests/compiler/mandelbrot.untouched.wat b/tests/compiler/mandelbrot.untouched.wat index 6ba4f0f28f..d9af864b83 100644 --- a/tests/compiler/mandelbrot.untouched.wat +++ b/tests/compiler/mandelbrot.untouched.wat @@ -7,9 +7,7 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $../../examples/mandelbrot/assembly/index/NUM_COLORS i32 (i32.const 2048)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "computeLine" (func $../../examples/mandelbrot/assembly/index/computeLine)) (func $~lib/math/NativeMath.log (; 0 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) diff --git a/tests/compiler/many-locals.optimized.wat b/tests/compiler/many-locals.optimized.wat index 3769196f40..c25c037f68 100644 --- a/tests/compiler/many-locals.optimized.wat +++ b/tests/compiler/many-locals.optimized.wat @@ -2,11 +2,8 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1c\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $start) + (data (i32.const 8) "\10\00\00\00\1c\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s") (export "memory" (memory $0)) - (export "table" (table $0)) (export "testI32" (func $many-locals/testI32)) (export "testI8" (func $many-locals/testI8)) (func $many-locals/testI32 (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) diff --git a/tests/compiler/many-locals.untouched.wat b/tests/compiler/many-locals.untouched.wat index 881677bda0..6e2721607f 100644 --- a/tests/compiler/many-locals.untouched.wat +++ b/tests/compiler/many-locals.untouched.wat @@ -2,14 +2,12 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1c\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1c\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "testI32" (func $many-locals/testI32)) (export "testI8" (func $many-locals/testI8)) (start $start) @@ -802,7 +800,7 @@ i32.const 16 i32.const 133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 42 @@ -815,7 +813,7 @@ i32.const 16 i32.const 267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/memcpy.optimized.wat b/tests/compiler/memcpy.optimized.wat index 47bfe1eb70..2237d7a4f8 100644 --- a/tests/compiler/memcpy.optimized.wat +++ b/tests/compiler/memcpy.optimized.wat @@ -2,14 +2,11 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\12\00\00\00m\00e\00m\00c\00p\00y\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\12\00\00\00m\00e\00m\00c\00p\00y\00.\00t\00s") (global $memcpy/dest (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "memcpy" (func $memcpy/memcpy)) (start $start) (func $memcpy/memcpy (; 1 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -890,7 +887,7 @@ i32.const 16 i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -902,7 +899,7 @@ i32.const 16 i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -918,7 +915,7 @@ i32.const 16 i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -930,7 +927,7 @@ i32.const 16 i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -942,7 +939,7 @@ i32.const 16 i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 24 @@ -954,7 +951,7 @@ i32.const 16 i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 32 @@ -966,7 +963,7 @@ i32.const 16 i32.const 159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 13 @@ -983,7 +980,7 @@ i32.const 16 i32.const 162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -1000,7 +997,7 @@ i32.const 16 i32.const 165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -1012,7 +1009,7 @@ i32.const 16 i32.const 166 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 24 @@ -1024,7 +1021,7 @@ i32.const 16 i32.const 167 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 32 @@ -1036,7 +1033,7 @@ i32.const 16 i32.const 168 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/memcpy.untouched.wat b/tests/compiler/memcpy.untouched.wat index 0da94f6da4..98a170321e 100644 --- a/tests/compiler/memcpy.untouched.wat +++ b/tests/compiler/memcpy.untouched.wat @@ -2,16 +2,14 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\12\00\00\00m\00e\00m\00c\00p\00y\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\12\00\00\00m\00e\00m\00c\00p\00y\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $memcpy/base i32 (i32.const 8)) (global $memcpy/dest (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 36)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "memcpy" (func $memcpy/memcpy)) (start $start) (func $memcpy/memcpy (; 1 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -1247,7 +1245,7 @@ i32.const 16 i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1260,7 +1258,7 @@ i32.const 16 i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1277,7 +1275,7 @@ i32.const 16 i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1290,7 +1288,7 @@ i32.const 16 i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1305,7 +1303,7 @@ i32.const 16 i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1320,7 +1318,7 @@ i32.const 16 i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1335,7 +1333,7 @@ i32.const 16 i32.const 159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1357,7 +1355,7 @@ i32.const 16 i32.const 162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1379,7 +1377,7 @@ i32.const 16 i32.const 165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1394,7 +1392,7 @@ i32.const 16 i32.const 166 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1409,7 +1407,7 @@ i32.const 16 i32.const 167 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1424,7 +1422,7 @@ i32.const 16 i32.const 168 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/memmove.optimized.wat b/tests/compiler/memmove.optimized.wat index 85d2930661..ffd5a371ee 100644 --- a/tests/compiler/memmove.optimized.wat +++ b/tests/compiler/memmove.optimized.wat @@ -2,14 +2,11 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\14\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\14\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s") (global $memmove/dest (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $memmove/memmove (; 1 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -219,7 +216,7 @@ i32.const 16 i32.const 55 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -231,7 +228,7 @@ i32.const 16 i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -247,7 +244,7 @@ i32.const 16 i32.const 59 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -259,7 +256,7 @@ i32.const 16 i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -271,7 +268,7 @@ i32.const 16 i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 24 @@ -283,7 +280,7 @@ i32.const 16 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 32 @@ -295,7 +292,7 @@ i32.const 16 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 13 @@ -312,7 +309,7 @@ i32.const 16 i32.const 66 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -329,7 +326,7 @@ i32.const 16 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -341,7 +338,7 @@ i32.const 16 i32.const 70 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 24 @@ -353,7 +350,7 @@ i32.const 16 i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 32 @@ -365,7 +362,7 @@ i32.const 16 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/memmove.untouched.wat b/tests/compiler/memmove.untouched.wat index c361df18e7..0880c12496 100644 --- a/tests/compiler/memmove.untouched.wat +++ b/tests/compiler/memmove.untouched.wat @@ -2,16 +2,14 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\14\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\14\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $memmove/base i32 (i32.const 8)) (global $memmove/dest (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 36)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $memmove/memmove (; 1 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -264,7 +262,7 @@ i32.const 16 i32.const 55 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -277,7 +275,7 @@ i32.const 16 i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -294,7 +292,7 @@ i32.const 16 i32.const 59 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -307,7 +305,7 @@ i32.const 16 i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -322,7 +320,7 @@ i32.const 16 i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -337,7 +335,7 @@ i32.const 16 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -352,7 +350,7 @@ i32.const 16 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -374,7 +372,7 @@ i32.const 16 i32.const 66 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -396,7 +394,7 @@ i32.const 16 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -411,7 +409,7 @@ i32.const 16 i32.const 70 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -426,7 +424,7 @@ i32.const 16 i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -441,7 +439,7 @@ i32.const 16 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/memset.optimized.wat b/tests/compiler/memset.optimized.wat index 84dd1231ba..0eafaf8260 100644 --- a/tests/compiler/memset.optimized.wat +++ b/tests/compiler/memset.optimized.wat @@ -2,14 +2,11 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\12\00\00\00m\00e\00m\00s\00e\00t\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\12\00\00\00m\00e\00m\00s\00e\00t\00.\00t\00s") (global $memset/dest (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $memset/memset (; 1 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -252,7 +249,7 @@ i32.const 16 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -266,7 +263,7 @@ i32.const 16 i32.const 73 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -284,7 +281,7 @@ i32.const 16 i32.const 77 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -298,7 +295,7 @@ i32.const 16 i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -312,7 +309,7 @@ i32.const 16 i32.const 79 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -326,7 +323,7 @@ i32.const 16 i32.const 80 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/memset.untouched.wat b/tests/compiler/memset.untouched.wat index 7b9653e5af..b278734452 100644 --- a/tests/compiler/memset.untouched.wat +++ b/tests/compiler/memset.untouched.wat @@ -2,15 +2,14 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\12\00\00\00m\00e\00m\00s\00e\00t\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\12\00\00\00m\00e\00m\00s\00e\00t\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $memset/dest (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 36)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $memset/memset (; 1 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -294,7 +293,7 @@ i32.const 16 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -309,7 +308,7 @@ i32.const 16 i32.const 73 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -329,7 +328,7 @@ i32.const 16 i32.const 77 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -344,7 +343,7 @@ i32.const 16 i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -359,7 +358,7 @@ i32.const 16 i32.const 79 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -374,7 +373,7 @@ i32.const 16 i32.const 80 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/merge.optimized.wat b/tests/compiler/merge.optimized.wat index 86b388ad0a..e2acb0a3b8 100644 --- a/tests/compiler/merge.optimized.wat +++ b/tests/compiler/merge.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/merge.untouched.wat b/tests/compiler/merge.untouched.wat index b4d854ae7c..e1dceafa81 100644 --- a/tests/compiler/merge.untouched.wat +++ b/tests/compiler/merge.untouched.wat @@ -13,9 +13,7 @@ (global $merge/typeFunction_test (mut i32) (i32.const 0)) (global $merge/enumNamespace.val i32 (i32.const 1)) (global $merge/namespaceEnum.val i32 (i32.const 2)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $merge/namespaceType.test (; 0 ;) (type $FUNCSIG$v) nop diff --git a/tests/compiler/named-export-default.optimized.wat b/tests/compiler/named-export-default.optimized.wat index 2249847b51..0886d5cce7 100644 --- a/tests/compiler/named-export-default.optimized.wat +++ b/tests/compiler/named-export-default.optimized.wat @@ -2,10 +2,7 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (export "default" (func $named-export-default/get3)) (func $named-export-default/get3 (; 0 ;) (type $FUNCSIG$i) (result i32) i32.const 3 diff --git a/tests/compiler/named-export-default.untouched.wat b/tests/compiler/named-export-default.untouched.wat index 4aae7011ac..3f1ff0ab82 100644 --- a/tests/compiler/named-export-default.untouched.wat +++ b/tests/compiler/named-export-default.untouched.wat @@ -4,9 +4,7 @@ (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "default" (func $named-export-default/get3)) (func $named-export-default/get3 (; 0 ;) (type $FUNCSIG$i) (result i32) i32.const 3 diff --git a/tests/compiler/named-import-default.optimized.wat b/tests/compiler/named-import-default.optimized.wat index 55fca5c159..e9b05938fc 100644 --- a/tests/compiler/named-import-default.optimized.wat +++ b/tests/compiler/named-import-default.optimized.wat @@ -2,10 +2,7 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (export "getValue" (func $named-import-default/getValue)) (func $named-import-default/getValue (; 0 ;) (type $FUNCSIG$i) (result i32) i32.const 3 diff --git a/tests/compiler/named-import-default.untouched.wat b/tests/compiler/named-import-default.untouched.wat index d54881d010..f24ee8a33a 100644 --- a/tests/compiler/named-import-default.untouched.wat +++ b/tests/compiler/named-import-default.untouched.wat @@ -4,9 +4,7 @@ (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "getValue" (func $named-import-default/getValue)) (func $named-export-default/get3 (; 0 ;) (type $FUNCSIG$i) (result i32) i32.const 3 diff --git a/tests/compiler/namespace.optimized.wat b/tests/compiler/namespace.optimized.wat index 86b388ad0a..e2acb0a3b8 100644 --- a/tests/compiler/namespace.optimized.wat +++ b/tests/compiler/namespace.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/namespace.untouched.wat b/tests/compiler/namespace.untouched.wat index 13bbb9ab71..39966a5e53 100644 --- a/tests/compiler/namespace.untouched.wat +++ b/tests/compiler/namespace.untouched.wat @@ -7,9 +7,7 @@ (global $namespace/Outer.Inner.aVar (mut i32) (i32.const 0)) (global $namespace/Outer.Inner.anEnum.ONE i32 (i32.const 1)) (global $namespace/Outer.Inner.anEnum.TWO i32 (i32.const 2)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $namespace/Outer.Inner.aFunc (; 0 ;) (type $FUNCSIG$i) (result i32) global.get $namespace/Outer.Inner.aVar diff --git a/tests/compiler/number.json b/tests/compiler/number.json index 85b9ce0f6e..b1da366ff4 100644 --- a/tests/compiler/number.json +++ b/tests/compiler/number.json @@ -1,5 +1,5 @@ { "asc_flags": [ - "--runtime arena" + "--runtime none" ] } \ No newline at end of file diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index de76f515b4..4a6aeaa6c9 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -7,35 +7,33 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$iijijij (func (param i32 i64 i32 i64 i32 i64) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\02\00\00\000") - (data (i32.const 24) "\02\00\00\00\90\01\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 432) "\03\00\00\00\10\00\00\00 \00\00\00 \00\00\00\90\01\00\00d") - (data (i32.const 456) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 504) "\01\00\00\00\02\00\00\001") - (data (i32.const 520) "\01\00\00\00\12\00\00\00n\00u\00m\00b\00e\00r\00.\00t\00s") - (data (i32.const 552) "\01\00\00\00\06\00\00\000\00.\000") - (data (i32.const 568) "\01\00\00\00\06\00\00\00N\00a\00N") - (data (i32.const 584) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 616) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 640) "\02\00\00\00\b8\02\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8 (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -2195,7 +2194,7 @@ i32.const 1656 i32.const 203 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2292,7 +2291,7 @@ local.get $3 call $~lib/memory/memory.copy local.get $10 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/allocator/arena/__mem_free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) @@ -2311,9 +2310,9 @@ if i32.const 0 i32.const 464 - i32.const 114 + i32.const 117 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2328,9 +2327,9 @@ if i32.const 0 i32.const 464 - i32.const 116 + i32.const 119 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2489,9 +2488,9 @@ if i32.const 0 i32.const 528 - i32.const 5 + i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -2502,9 +2501,9 @@ if i32.const 0 i32.const 528 - i32.const 7 + i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -2515,9 +2514,9 @@ if i32.const 0 i32.const 528 - i32.const 8 + i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -5 @@ -2528,9 +2527,9 @@ if i32.const 0 i32.const 528 - i32.const 10 + i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -2541,9 +2540,9 @@ if i32.const 0 i32.const 528 - i32.const 11 + i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -2561,9 +2560,9 @@ if i32.const 0 i32.const 528 - i32.const 12 + i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -2581,9 +2580,9 @@ if i32.const 0 i32.const 528 - i32.const 13 + i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2595,9 +2594,9 @@ if i32.const 0 i32.const 528 - i32.const 14 + i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -2609,9 +2608,9 @@ if i32.const 0 i32.const 528 - i32.const 15 + i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -2629,9 +2628,9 @@ if i32.const 0 i32.const 528 - i32.const 18 + i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -2649,9 +2648,9 @@ if i32.const 0 i32.const 528 - i32.const 19 + i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/number/F32.NaN @@ -2660,9 +2659,9 @@ if i32.const 0 i32.const 528 - i32.const 23 + i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MIN_SAFE_INTEGER @@ -2675,9 +2674,9 @@ if i32.const 0 i32.const 528 - i32.const 25 + i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MIN_SAFE_INTEGER @@ -2688,9 +2687,9 @@ if i32.const 0 i32.const 528 - i32.const 26 + i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -2701,9 +2700,9 @@ if i32.const 0 i32.const 528 - i32.const 27 + i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -2714,9 +2713,9 @@ if i32.const 0 i32.const 528 - i32.const 28 + i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2727,9 +2726,9 @@ if i32.const 0 i32.const 528 - i32.const 29 + i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2740,9 +2739,9 @@ if i32.const 0 i32.const 528 - i32.const 30 + i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_SAFE_INTEGER @@ -2753,9 +2752,9 @@ if i32.const 0 i32.const 528 - i32.const 31 + i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_SAFE_INTEGER @@ -2768,9 +2767,9 @@ if i32.const 0 i32.const 528 - i32.const 32 + i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -2781,9 +2780,9 @@ if i32.const 0 i32.const 528 - i32.const 33 + i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -2794,9 +2793,9 @@ if i32.const 0 i32.const 528 - i32.const 34 + i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -2807,9 +2806,9 @@ if i32.const 0 i32.const 528 - i32.const 35 + i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2820,9 +2819,9 @@ if i32.const 0 i32.const 528 - i32.const 36 + i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2833,9 +2832,9 @@ if i32.const 0 i32.const 528 - i32.const 37 + i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.EPSILON @@ -2846,9 +2845,9 @@ if i32.const 0 i32.const 528 - i32.const 38 + i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -2859,9 +2858,9 @@ if i32.const 0 i32.const 528 - i32.const 39 + i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -2872,9 +2871,9 @@ if i32.const 0 i32.const 528 - i32.const 40 + i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MIN_SAFE_INTEGER @@ -2885,9 +2884,9 @@ if i32.const 0 i32.const 528 - i32.const 41 + i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_SAFE_INTEGER @@ -2898,9 +2897,9 @@ if i32.const 0 i32.const 528 - i32.const 42 + i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -2911,9 +2910,9 @@ if i32.const 0 i32.const 528 - i32.const 43 + i32.const 45 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -2924,9 +2923,9 @@ if i32.const 0 i32.const 528 - i32.const 44 + i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/number/F64.NaN @@ -2935,9 +2934,9 @@ if i32.const 0 i32.const 528 - i32.const 46 + i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_SAFE_INTEGER @@ -2950,9 +2949,9 @@ if i32.const 0 i32.const 528 - i32.const 48 + i32.const 50 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_SAFE_INTEGER @@ -2963,9 +2962,9 @@ if i32.const 0 i32.const 528 - i32.const 49 + i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -2976,9 +2975,9 @@ if i32.const 0 i32.const 528 - i32.const 50 + i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -2989,9 +2988,9 @@ if i32.const 0 i32.const 528 - i32.const 51 + i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -3002,9 +3001,9 @@ if i32.const 0 i32.const 528 - i32.const 52 + i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -3015,9 +3014,9 @@ if i32.const 0 i32.const 528 - i32.const 53 + i32.const 55 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_SAFE_INTEGER @@ -3028,9 +3027,9 @@ if i32.const 0 i32.const 528 - i32.const 54 + i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_SAFE_INTEGER @@ -3043,9 +3042,9 @@ if i32.const 0 i32.const 528 - i32.const 55 + i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -3056,9 +3055,9 @@ if i32.const 0 i32.const 528 - i32.const 56 + i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -3069,9 +3068,9 @@ if i32.const 0 i32.const 528 - i32.const 57 + i32.const 59 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -3082,9 +3081,9 @@ if i32.const 0 i32.const 528 - i32.const 58 + i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -3095,9 +3094,9 @@ if i32.const 0 i32.const 528 - i32.const 59 + i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -3108,9 +3107,9 @@ if i32.const 0 i32.const 528 - i32.const 60 + i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.EPSILON @@ -3121,9 +3120,9 @@ if i32.const 0 i32.const 528 - i32.const 61 + i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -3134,9 +3133,9 @@ if i32.const 0 i32.const 528 - i32.const 62 + i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -3147,9 +3146,9 @@ if i32.const 0 i32.const 528 - i32.const 63 + i32.const 65 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_SAFE_INTEGER @@ -3160,9 +3159,9 @@ if i32.const 0 i32.const 528 - i32.const 64 + i32.const 66 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_SAFE_INTEGER @@ -3173,9 +3172,9 @@ if i32.const 0 i32.const 528 - i32.const 65 + i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -3186,9 +3185,9 @@ if i32.const 0 i32.const 528 - i32.const 66 + i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -3199,9 +3198,9 @@ if i32.const 0 i32.const 528 - i32.const 67 + i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 472176422b..7334a7899d 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -4,17 +4,14 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $optional-typeparameters/tConcrete (mut i32) (i32.const 0)) (global $optional-typeparameters/tDerived (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -100,9 +97,9 @@ if i32.const 0 i32.const 16 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -115,9 +112,9 @@ if i32.const 0 i32.const 16 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -131,11 +128,11 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register global.set $optional-typeparameters/tConcrete call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register global.set $optional-typeparameters/tDerived ) diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index c2029bf244..fae84532e0 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -5,9 +5,9 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$didd (func (param i32 f64 f64) (result f64))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) @@ -19,7 +19,6 @@ (global $optional-typeparameters/tDerived (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $optional-typeparameters/testConcrete (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -148,9 +147,9 @@ if i32.const 0 i32.const 16 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -165,9 +164,9 @@ if i32.const 0 i32.const 16 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -181,7 +180,7 @@ if i32.const 0 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.set $0 end @@ -198,7 +197,7 @@ if i32.const 0 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register local.set $0 end diff --git a/tests/compiler/overflow.optimized.wat b/tests/compiler/overflow.optimized.wat index 601e96007f..10510005e8 100644 --- a/tests/compiler/overflow.optimized.wat +++ b/tests/compiler/overflow.optimized.wat @@ -1,11 +1,8 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\16\00\00\00o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $start) + (data (i32.const 8) "\10\00\00\00\16\00\00\00o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s") (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/overflow.untouched.wat b/tests/compiler/overflow.untouched.wat index 73c44a2f64..c5233b0d35 100644 --- a/tests/compiler/overflow.untouched.wat +++ b/tests/compiler/overflow.untouched.wat @@ -1,14 +1,12 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\16\00\00\00o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\16\00\00\00o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:overflow (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -34,7 +32,7 @@ i32.const 16 i32.const 10 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -54,7 +52,7 @@ i32.const 16 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -79,7 +77,7 @@ i32.const 16 i32.const 16 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -104,7 +102,7 @@ i32.const 16 i32.const 19 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -124,7 +122,7 @@ i32.const 16 i32.const 22 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -144,7 +142,7 @@ i32.const 16 i32.const 25 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -165,7 +163,7 @@ i32.const 16 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -186,7 +184,7 @@ i32.const 16 i32.const 31 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -204,7 +202,7 @@ i32.const 16 i32.const 33 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -228,7 +226,7 @@ i32.const 16 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -248,7 +246,7 @@ i32.const 16 i32.const 45 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -273,7 +271,7 @@ i32.const 16 i32.const 48 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -298,7 +296,7 @@ i32.const 16 i32.const 51 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -318,7 +316,7 @@ i32.const 16 i32.const 54 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -338,7 +336,7 @@ i32.const 16 i32.const 57 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -359,7 +357,7 @@ i32.const 16 i32.const 60 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -380,7 +378,7 @@ i32.const 16 i32.const 63 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -398,7 +396,7 @@ i32.const 16 i32.const 65 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -420,7 +418,7 @@ i32.const 16 i32.const 74 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -438,7 +436,7 @@ i32.const 16 i32.const 77 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -461,7 +459,7 @@ i32.const 16 i32.const 80 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -484,7 +482,7 @@ i32.const 16 i32.const 83 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -502,7 +500,7 @@ i32.const 16 i32.const 86 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -520,7 +518,7 @@ i32.const 16 i32.const 89 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -539,7 +537,7 @@ i32.const 16 i32.const 92 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -558,7 +556,7 @@ i32.const 16 i32.const 95 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -574,7 +572,7 @@ i32.const 16 i32.const 97 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -596,7 +594,7 @@ i32.const 16 i32.const 106 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -614,7 +612,7 @@ i32.const 16 i32.const 109 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -637,7 +635,7 @@ i32.const 16 i32.const 112 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -660,7 +658,7 @@ i32.const 16 i32.const 115 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -678,7 +676,7 @@ i32.const 16 i32.const 118 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -696,7 +694,7 @@ i32.const 16 i32.const 121 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -715,7 +713,7 @@ i32.const 16 i32.const 124 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -734,7 +732,7 @@ i32.const 16 i32.const 127 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -750,7 +748,7 @@ i32.const 16 i32.const 129 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end diff --git a/tests/compiler/portable-conversions.optimized.wat b/tests/compiler/portable-conversions.optimized.wat index ae142dfe42..fd0ec7e54f 100644 --- a/tests/compiler/portable-conversions.optimized.wat +++ b/tests/compiler/portable-conversions.optimized.wat @@ -1,17 +1,14 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00.\00\00\00p\00o\00r\00t\00a\00b\00l\00e\00-\00c\00o\00n\00v\00e\00r\00s\00i\00o\00n\00s\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00.\00\00\00p\00o\00r\00t\00a\00b\00l\00e\00-\00c\00o\00n\00v\00e\00r\00s\00i\00o\00n\00s\00.\00t\00s") (global $portable-conversions/i (mut i32) (i32.const 1)) (global $portable-conversions/I (mut i64) (i64.const 1)) (global $portable-conversions/f (mut f32) (f32.const 1)) (global $portable-conversions/F (mut f64) (f64.const 1)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:portable-conversions (; 1 ;) (type $FUNCSIG$v) global.get $portable-conversions/i @@ -23,7 +20,7 @@ i32.const 16 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -36,7 +33,7 @@ i32.const 16 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -49,7 +46,7 @@ i32.const 16 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -62,7 +59,7 @@ i32.const 16 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -74,7 +71,7 @@ i32.const 16 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -87,7 +84,7 @@ i32.const 16 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -100,7 +97,7 @@ i32.const 16 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -113,7 +110,7 @@ i32.const 16 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -123,7 +120,7 @@ i32.const 16 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -134,7 +131,7 @@ i32.const 16 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -145,7 +142,7 @@ i32.const 16 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -156,7 +153,7 @@ i32.const 16 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -167,7 +164,7 @@ i32.const 16 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -177,7 +174,7 @@ i32.const 16 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -188,7 +185,7 @@ i32.const 16 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -199,7 +196,7 @@ i32.const 16 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -209,7 +206,7 @@ i32.const 16 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -220,7 +217,7 @@ i32.const 16 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -231,7 +228,7 @@ i32.const 16 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -242,7 +239,7 @@ i32.const 16 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -254,7 +251,7 @@ i32.const 16 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -267,7 +264,7 @@ i32.const 16 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -280,7 +277,7 @@ i32.const 16 i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -293,7 +290,7 @@ i32.const 16 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -305,7 +302,7 @@ i32.const 16 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -318,7 +315,7 @@ i32.const 16 i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -331,7 +328,7 @@ i32.const 16 i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -344,7 +341,7 @@ i32.const 16 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -354,7 +351,7 @@ i32.const 16 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -365,7 +362,7 @@ i32.const 16 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -376,7 +373,7 @@ i32.const 16 i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -387,7 +384,7 @@ i32.const 16 i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -398,7 +395,7 @@ i32.const 16 i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -408,7 +405,7 @@ i32.const 16 i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -419,7 +416,7 @@ i32.const 16 i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -430,7 +427,7 @@ i32.const 16 i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -440,7 +437,7 @@ i32.const 16 i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -451,7 +448,7 @@ i32.const 16 i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -462,7 +459,7 @@ i32.const 16 i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -473,7 +470,7 @@ i32.const 16 i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -483,7 +480,7 @@ i32.const 16 i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -494,7 +491,7 @@ i32.const 16 i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -505,7 +502,7 @@ i32.const 16 i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -516,7 +513,7 @@ i32.const 16 i32.const 59 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -528,7 +525,7 @@ i32.const 16 i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -540,7 +537,7 @@ i32.const 16 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -551,7 +548,7 @@ i32.const 16 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -563,7 +560,7 @@ i32.const 16 i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -575,7 +572,7 @@ i32.const 16 i32.const 66 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -587,7 +584,7 @@ i32.const 16 i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -599,7 +596,7 @@ i32.const 16 i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -610,7 +607,7 @@ i32.const 16 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/portable-conversions.untouched.wat b/tests/compiler/portable-conversions.untouched.wat index 35eaeafd0a..adcd1f6eb4 100644 --- a/tests/compiler/portable-conversions.untouched.wat +++ b/tests/compiler/portable-conversions.untouched.wat @@ -1,18 +1,16 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00.\00\00\00p\00o\00r\00t\00a\00b\00l\00e\00-\00c\00o\00n\00v\00e\00r\00s\00i\00o\00n\00s\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00.\00\00\00p\00o\00r\00t\00a\00b\00l\00e\00-\00c\00o\00n\00v\00e\00r\00s\00i\00o\00n\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $portable-conversions/i (mut i32) (i32.const 1)) (global $portable-conversions/I (mut i64) (i64.const 1)) (global $portable-conversions/f (mut f32) (f32.const 1)) (global $portable-conversions/F (mut f64) (f64.const 1)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:portable-conversions (; 1 ;) (type $FUNCSIG$v) global.get $portable-conversions/i @@ -26,7 +24,7 @@ i32.const 16 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -41,7 +39,7 @@ i32.const 16 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -56,7 +54,7 @@ i32.const 16 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -71,7 +69,7 @@ i32.const 16 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -85,7 +83,7 @@ i32.const 16 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -100,7 +98,7 @@ i32.const 16 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -115,7 +113,7 @@ i32.const 16 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -130,7 +128,7 @@ i32.const 16 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -140,7 +138,7 @@ i32.const 16 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -151,7 +149,7 @@ i32.const 16 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -162,7 +160,7 @@ i32.const 16 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -173,7 +171,7 @@ i32.const 16 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -184,7 +182,7 @@ i32.const 16 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -194,7 +192,7 @@ i32.const 16 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -205,7 +203,7 @@ i32.const 16 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -216,7 +214,7 @@ i32.const 16 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -226,7 +224,7 @@ i32.const 16 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -237,7 +235,7 @@ i32.const 16 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -248,7 +246,7 @@ i32.const 16 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -259,7 +257,7 @@ i32.const 16 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -271,7 +269,7 @@ i32.const 16 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -284,7 +282,7 @@ i32.const 16 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -297,7 +295,7 @@ i32.const 16 i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -310,7 +308,7 @@ i32.const 16 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -322,7 +320,7 @@ i32.const 16 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -335,7 +333,7 @@ i32.const 16 i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -348,7 +346,7 @@ i32.const 16 i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -361,7 +359,7 @@ i32.const 16 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -371,7 +369,7 @@ i32.const 16 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -382,7 +380,7 @@ i32.const 16 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -393,7 +391,7 @@ i32.const 16 i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -404,7 +402,7 @@ i32.const 16 i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -415,7 +413,7 @@ i32.const 16 i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -425,7 +423,7 @@ i32.const 16 i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -436,7 +434,7 @@ i32.const 16 i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -447,7 +445,7 @@ i32.const 16 i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -457,7 +455,7 @@ i32.const 16 i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -468,7 +466,7 @@ i32.const 16 i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -479,7 +477,7 @@ i32.const 16 i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -490,7 +488,7 @@ i32.const 16 i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -502,7 +500,7 @@ i32.const 16 i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -514,7 +512,7 @@ i32.const 16 i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -526,7 +524,7 @@ i32.const 16 i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -538,7 +536,7 @@ i32.const 16 i32.const 59 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -550,7 +548,7 @@ i32.const 16 i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -562,7 +560,7 @@ i32.const 16 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -573,7 +571,7 @@ i32.const 16 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -585,7 +583,7 @@ i32.const 16 i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -597,7 +595,7 @@ i32.const 16 i32.const 66 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -609,7 +607,7 @@ i32.const 16 i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -621,7 +619,7 @@ i32.const 16 i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -632,7 +630,7 @@ i32.const 16 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/recursive.optimized.wat b/tests/compiler/recursive.optimized.wat index 70374ac5e9..8be1699992 100644 --- a/tests/compiler/recursive.optimized.wat +++ b/tests/compiler/recursive.optimized.wat @@ -2,10 +2,7 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (export "fib" (func $recursive/fib)) (func $recursive/fib (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/recursive.untouched.wat b/tests/compiler/recursive.untouched.wat index 432e9ee8e4..daf56987dc 100644 --- a/tests/compiler/recursive.untouched.wat +++ b/tests/compiler/recursive.untouched.wat @@ -4,9 +4,7 @@ (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "fib" (func $recursive/fib)) (func $recursive/fib (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/reexport.optimized.wat b/tests/compiler/reexport.optimized.wat index 5246631d08..5496139f6b 100644 --- a/tests/compiler/reexport.optimized.wat +++ b/tests/compiler/reexport.optimized.wat @@ -2,13 +2,10 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $export/ns.one) (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "add" (func $export/add)) (export "renamed_sub" (func $export/sub)) (export "renamed_mul" (func $export/mul)) diff --git a/tests/compiler/reexport.untouched.wat b/tests/compiler/reexport.untouched.wat index 057ad25d43..662fe579a4 100644 --- a/tests/compiler/reexport.untouched.wat +++ b/tests/compiler/reexport.untouched.wat @@ -7,9 +7,7 @@ (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "add" (func $export/add)) (export "renamed_sub" (func $export/sub)) (export "renamed_mul" (func $export/mul)) diff --git a/tests/compiler/rereexport.optimized.wat b/tests/compiler/rereexport.optimized.wat index 1139e552a6..306f12dff1 100644 --- a/tests/compiler/rereexport.optimized.wat +++ b/tests/compiler/rereexport.optimized.wat @@ -1,12 +1,9 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "a" (global $export/a)) (export "renamed_a" (global $export/a)) (export "renamed_b" (global $export/b)) diff --git a/tests/compiler/rereexport.untouched.wat b/tests/compiler/rereexport.untouched.wat index a8dee375de..7f469d6e96 100644 --- a/tests/compiler/rereexport.untouched.wat +++ b/tests/compiler/rereexport.untouched.wat @@ -7,9 +7,7 @@ (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "a" (global $export/a)) (export "renamed_a" (global $export/a)) (export "renamed_b" (global $export/b)) diff --git a/tests/compiler/resolve-nested.optimized.wat b/tests/compiler/resolve-nested.optimized.wat index 9bf204a7de..b351045e63 100644 --- a/tests/compiler/resolve-nested.optimized.wat +++ b/tests/compiler/resolve-nested.optimized.wat @@ -4,12 +4,9 @@ (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) - (global $resolve-nested/Outer.InnerClass i32 (i32.const 1)) - (global $resolve-nested/Outer.Inner.EvenInnerClass i32 (i32.const 2)) + (global $resolve-nested/Outer.InnerClass i32 (i32.const 18)) + (global $resolve-nested/Outer.Inner.EvenInnerClass i32 (i32.const 19)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "Outer.InnerClass" (global $resolve-nested/Outer.InnerClass)) (export "Outer.Inner.EvenInnerClass" (global $resolve-nested/Outer.Inner.EvenInnerClass)) (export "Outer.Inner.evenInner" (func $resolve-nested/Outer.Inner.evenInner)) diff --git a/tests/compiler/resolve-nested.untouched.wat b/tests/compiler/resolve-nested.untouched.wat index 00b7ed8302..72b4edb30f 100644 --- a/tests/compiler/resolve-nested.untouched.wat +++ b/tests/compiler/resolve-nested.untouched.wat @@ -20,11 +20,9 @@ (global $resolve-nested/a (mut i32) (i32.const 0)) (global $resolve-nested/b (mut i32) (i32.const 0)) (global $resolve-nested/c (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) - (global $resolve-nested/Outer.InnerClass i32 (i32.const 1)) - (global $resolve-nested/Outer.Inner.EvenInnerClass i32 (i32.const 2)) + (global $resolve-nested/Outer.InnerClass i32 (i32.const 18)) + (global $resolve-nested/Outer.Inner.EvenInnerClass i32 (i32.const 19)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "Outer.InnerClass" (global $resolve-nested/Outer.InnerClass)) (export "Outer.Inner.EvenInnerClass" (global $resolve-nested/Outer.Inner.EvenInnerClass)) (export "Outer.Inner.evenInner" (func $resolve-nested/Outer.Inner.evenInner)) diff --git a/tests/compiler/retain-i32.optimized.wat b/tests/compiler/retain-i32.optimized.wat index 93280cc91a..fd5d368565 100644 --- a/tests/compiler/retain-i32.optimized.wat +++ b/tests/compiler/retain-i32.optimized.wat @@ -1,15 +1,12 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1a\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\1a\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s") (global $retain-i32/si (mut i32) (i32.const 0)) (global $retain-i32/ui (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:retain-i32 (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -37,7 +34,7 @@ i32.const 16 i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 @@ -50,7 +47,7 @@ i32.const 16 i32.const 81 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -2 @@ -63,7 +60,7 @@ i32.const 16 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -128 @@ -76,7 +73,7 @@ i32.const 16 i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -128 @@ -89,7 +86,7 @@ i32.const 16 i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -127 @@ -102,7 +99,7 @@ i32.const 16 i32.const 93 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -128 @@ -115,7 +112,7 @@ i32.const 16 i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -128,7 +125,7 @@ i32.const 16 i32.const 99 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -141,7 +138,7 @@ i32.const 16 i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -152,7 +149,7 @@ i32.const 16 i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -165,7 +162,7 @@ i32.const 16 i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -178,7 +175,7 @@ i32.const 16 i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -191,7 +188,7 @@ i32.const 16 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 254 @@ -204,7 +201,7 @@ i32.const 16 i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -217,7 +214,7 @@ i32.const 16 i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -230,7 +227,7 @@ i32.const 16 i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -243,7 +240,7 @@ i32.const 16 i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -254,7 +251,7 @@ i32.const 16 i32.const 131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/retain-i32.untouched.wat b/tests/compiler/retain-i32.untouched.wat index fa0b48961b..90e4952e2b 100644 --- a/tests/compiler/retain-i32.untouched.wat +++ b/tests/compiler/retain-i32.untouched.wat @@ -2,9 +2,9 @@ (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1a\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1a\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/builtins/i8.MAX_VALUE i32 (i32.const 127)) @@ -18,9 +18,7 @@ (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) (global $retain-i32/si (mut i32) (i32.const 0)) (global $retain-i32/ui (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $retain-i32/test (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 @@ -44,7 +42,7 @@ i32.const 16 i32.const 4 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -68,7 +66,7 @@ i32.const 16 i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -92,7 +90,7 @@ i32.const 16 i32.const 6 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -116,7 +114,7 @@ i32.const 16 i32.const 7 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -140,7 +138,7 @@ i32.const 16 i32.const 8 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -164,7 +162,7 @@ i32.const 16 i32.const 9 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -188,7 +186,7 @@ i32.const 16 i32.const 10 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -208,7 +206,7 @@ i32.const 16 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -228,7 +226,7 @@ i32.const 16 i32.const 14 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -248,7 +246,7 @@ i32.const 16 i32.const 15 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -268,7 +266,7 @@ i32.const 16 i32.const 16 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -288,7 +286,7 @@ i32.const 16 i32.const 17 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -308,7 +306,7 @@ i32.const 16 i32.const 18 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -328,7 +326,7 @@ i32.const 16 i32.const 19 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -478,7 +476,7 @@ i32.const 16 i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 127 @@ -500,7 +498,7 @@ i32.const 16 i32.const 81 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 127 @@ -520,7 +518,7 @@ i32.const 16 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -540,7 +538,7 @@ i32.const 16 i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -128 @@ -560,7 +558,7 @@ i32.const 16 i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 127 @@ -580,7 +578,7 @@ i32.const 16 i32.const 93 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -128 @@ -600,7 +598,7 @@ i32.const 16 i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 127 @@ -616,7 +614,7 @@ i32.const 16 i32.const 99 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -632,7 +630,7 @@ i32.const 16 i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -128 @@ -648,7 +646,7 @@ i32.const 16 i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -664,7 +662,7 @@ i32.const 16 i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -684,7 +682,7 @@ i32.const 16 i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -704,7 +702,7 @@ i32.const 16 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -722,7 +720,7 @@ i32.const 16 i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -740,7 +738,7 @@ i32.const 16 i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -756,7 +754,7 @@ i32.const 16 i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -772,7 +770,7 @@ i32.const 16 i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -788,7 +786,7 @@ i32.const 16 i32.const 131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/runtime-arena.optimized.wat b/tests/compiler/runtime-arena.optimized.wat index 587c7142d7..ef8780ace5 100644 --- a/tests/compiler/runtime-arena.optimized.wat +++ b/tests/compiler/runtime-arena.optimized.wat @@ -1,11 +1,336 @@ (module + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 56) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 96) "\11") + (data (i32.const 232) "!\00\00\00\0e") + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) - (func $null (; 0 ;) (type $FUNCSIG$v) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (start $start) + (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 8 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 96 + i32.load + i32.le_u + else + local.get $0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 96 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + local.tee $1 + i32.eqz + if + local.get $0 + i32.const 96 + i32.load + i32.gt_u + local.set $1 + end + local.get $1 + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 96 + i32.add + i32.load + end + ) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.tee $1 + local.get $0 + i32.const 1 + local.get $0 + i32.const 1 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + current_memory + local.tee $2 + i32.const 16 + i32.shl + i32.gt_u + if + local.get $2 + local.get $0 + local.get $1 + i32.sub + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $2 + local.get $3 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $0 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 7 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add + ) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 240 + i32.le_u + if + i32.const 0 + i32.const 16 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 8 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 16 + i32.const 133 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/runtime/runtime.newObject (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block (result i32) + local.get $0 + call $~lib/util/runtime/allocate + end + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + i32.const 96 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 96 + i32.add + i32.load + end + local.tee $3 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 8 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $2 + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $3 + i32.const 512 + i32.and + if + local.get $1 + local.get $2 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + if + i32.const 0 + i32.const 64 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 11 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 64 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $start (; 12 ;) (type $FUNCSIG$v) + i32.const 240 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + ) + (func $null (; 13 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/runtime-arena.untouched.wat b/tests/compiler/runtime-arena.untouched.wat index 4560a6a15a..cdcc6943b7 100644 --- a/tests/compiler/runtime-arena.untouched.wat +++ b/tests/compiler/runtime-arena.untouched.wat @@ -1,11 +1,394 @@ (module + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (memory $0 0) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 96) "\11\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 96)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 240)) (export "memory" (memory $0)) - (export "table" (table $0)) - (func $null (; 0 ;) (type $FUNCSIG$v) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (start $start) + (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + local.get $2 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/util/runtime/adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/arena/__mem_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if + local.get $4 + local.get $1 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select + local.set $3 + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $2 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate + return + ) + (func $~lib/util/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 133 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/runtime/runtime.newObject (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 512 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $7 + block $break|0 + loop $continue|0 + local.get $6 + local.get $7 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $8 + local.get $8 + if + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 64 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/runtime.retain (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.release (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 15 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 64 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/runtime/runtime#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 17 ;) (type $FUNCSIG$v) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + ) + (func $null (; 18 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/runtime-default.optimized.wat b/tests/compiler/runtime-default.optimized.wat index 5c19014713..29ef92283f 100644 --- a/tests/compiler/runtime-default.optimized.wat +++ b/tests/compiler/runtime-default.optimized.wat @@ -7,15 +7,14 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00,") + (data (i32.const 8) "\10\00\00\00,") (data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 72) "\01\00\00\00(") + (data (i32.const 72) "\10\00\00\00(") (data (i32.const 88) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 128) "\12") + (data (i32.const 264) "!\00\00\00\0e") (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) @@ -23,17 +22,14 @@ (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) (export "$.newObject" (func $~lib/runtime/runtime.newObject)) (export "$.newString" (func $~lib/runtime/runtime.newString)) (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export "$.setArgc" (func $~lib/setargc)) - (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.release)) (export "$.collect" (func $~lib/runtime/runtime.collect)) @@ -41,29 +37,64 @@ (start $start) (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 if (result i32) local.get $0 - i32.const 16 - i32.sub + i32.const 128 i32.load - local.get $1 - call $~lib/runtime/__runtime_instanceof + i32.le_u else - i32.const 0 + local.get $0 end - ) - (func $~lib/runtime/runtime.flags (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - block $__inlined_func$~lib/runtime/__runtime_flags - block $invalid + if + loop $continue|0 local.get $0 - i32.const 1 - i32.sub - br_table $__inlined_func$~lib/runtime/__runtime_flags $__inlined_func$~lib/runtime/__runtime_flags $__inlined_func$~lib/runtime/__runtime_flags $invalid + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 128 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 end - unreachable end i32.const 0 ) + (func $~lib/runtime/runtime.flags (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + local.tee $1 + i32.eqz + if + local.get $0 + i32.const 128 + i32.load + i32.gt_u + local.set $1 + end + local.get $1 + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 128 + i32.add + i32.load + end + ) (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.const 22 @@ -73,7 +104,7 @@ i32.const 24 i32.const 159 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -93,7 +124,7 @@ i32.const 24 i32.const 184 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -104,7 +135,7 @@ i32.const 24 i32.const 185 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -130,7 +161,7 @@ i32.const 24 i32.const 104 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -148,7 +179,7 @@ i32.const 24 i32.const 105 i32.const 11 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -161,7 +192,7 @@ i32.const 24 i32.const 447 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 31 @@ -178,7 +209,7 @@ i32.const 24 i32.const 175 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -189,7 +220,7 @@ i32.const 24 i32.const 176 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -212,7 +243,7 @@ i32.const 24 i32.const 153 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -238,7 +269,7 @@ i32.const 24 i32.const 277 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -261,7 +292,7 @@ i32.const 24 i32.const 279 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -362,7 +393,7 @@ i32.const 24 i32.const 96 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -376,7 +407,7 @@ i32.const 24 i32.const 97 i32.const 11 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -392,7 +423,7 @@ i32.const 24 i32.const 353 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -404,7 +435,7 @@ i32.const 24 i32.const 354 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -417,7 +448,7 @@ i32.const 24 i32.const 355 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -438,7 +469,7 @@ i32.const 24 i32.const 208 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -452,7 +483,7 @@ i32.const 24 i32.const 210 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -476,7 +507,7 @@ i32.const 24 i32.const 212 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -488,7 +519,7 @@ i32.const 24 i32.const 216 i32.const 23 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -529,7 +560,7 @@ i32.const 24 i32.const 230 i32.const 24 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -543,7 +574,7 @@ i32.const 24 i32.const 232 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -588,7 +619,7 @@ i32.const 24 i32.const 245 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -667,7 +698,7 @@ i32.const 24 i32.const 396 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -678,7 +709,7 @@ i32.const 24 i32.const 397 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -689,7 +720,7 @@ i32.const 24 i32.const 398 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2912 @@ -706,7 +737,7 @@ i32.const 24 i32.const 403 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -734,7 +765,7 @@ i32.const 24 i32.const 412 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -787,7 +818,7 @@ i32.const 24 i32.const 441 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -813,7 +844,7 @@ i32.const 24 i32.const 315 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -892,7 +923,7 @@ i32.const 24 i32.const 342 i32.const 16 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -919,7 +950,7 @@ i32.const 24 i32.const 367 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -939,7 +970,7 @@ i32.const 24 i32.const 368 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -950,7 +981,7 @@ i32.const 24 i32.const 369 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1002,7 +1033,7 @@ i32.const 24 i32.const 387 i32.const 25 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1042,14 +1073,14 @@ if unreachable end - i32.const 128 + i32.const 280 local.set $2 - i32.const 128 + i32.const 280 global.set $~lib/allocator/tlsf/ROOT i32.const 2912 i32.const 0 i32.store - i32.const 128 + i32.const 280 i32.const 0 i32.store i32.const 0 @@ -1059,7 +1090,7 @@ i32.const 22 i32.lt_u if - i32.const 128 + i32.const 280 local.get $1 i32.const 0 call $~lib/allocator/tlsf/Root#setSLMap @@ -1070,7 +1101,7 @@ i32.const 32 i32.lt_u if - i32.const 128 + i32.const 280 local.get $1 local.get $3 i32.const 0 @@ -1089,8 +1120,8 @@ br $repeat|0 end end - i32.const 128 - i32.const 3048 + i32.const 280 + i32.const 3200 current_memory i32.const 16 i32.shl @@ -1163,7 +1194,7 @@ i32.const 24 i32.const 502 i32.const 12 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1178,7 +1209,7 @@ i32.const 24 i32.const 505 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1304,14 +1335,14 @@ (func $~lib/util/runtime/register (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 128 + i32.const 280 i32.le_u if i32.const 0 i32.const 88 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1324,9 +1355,9 @@ if i32.const 0 i32.const 88 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1348,12 +1379,12 @@ local.get $0 i32.const 1 i32.shl - i32.const 1 + i32.const 16 call $~lib/runtime/runtime.newObject ) (func $~lib/runtime/runtime.newArrayBuffer (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 2 + i32.const 15 call $~lib/runtime/runtime.newObject ) (func $~lib/collector/itcm/ManagedObject#makeGray (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) @@ -1427,234 +1458,120 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/memory/memory.copy (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/runtime/runtime.newArray (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + (local $5 i32) + local.get $0 + local.tee $3 + i32.eqz + local.tee $0 + if (result i32) local.get $0 + else + local.get $3 + i32.const 128 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $3 + i32.const 3 + i32.shl + i32.const 128 + i32.add + i32.load + end + local.tee $0 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $5 + local.get $1 + if (result i32) local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 - end - end - end - loop $continue|2 - local.get $2 - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|3 - end - end - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - br $continue|4 - end - end - end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 end - ) - (func $~lib/runtime/runtime.newArray (; 29 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + local.set $4 + local.get $3 i32.const 16 - call $~lib/util/runtime/allocate - local.get $2 - call $~lib/util/runtime/register + call $~lib/runtime/runtime.newObject local.tee $2 - local.set $6 - local.get $0 - local.get $1 - i32.shl - local.tee $4 - call $~lib/util/runtime/allocate - i32.const 2 - call $~lib/util/runtime/register - local.tee $5 - local.tee $1 + local.set $3 local.get $2 i32.load + local.get $1 i32.ne if local.get $1 - local.get $6 + local.get $3 call $~lib/collector/itcm/__ref_link end local.get $2 local.get $1 i32.store local.get $2 - local.get $5 + local.get $1 i32.store offset=4 local.get $2 local.get $4 i32.store offset=8 local.get $2 - local.get $0 + local.get $4 + local.get $5 + i32.shr_u i32.store offset=12 - local.get $3 + local.get $0 + i32.const 512 + i32.and if - local.get $5 - local.get $3 + local.get $1 local.get $4 - call $~lib/memory/memory.copy + i32.add + local.set $4 + loop $continue|0 + local.get $1 + local.get $4 + i32.lt_u + if + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + local.get $2 + call $~lib/collector/itcm/__ref_link + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end end local.get $2 ) - (func $~lib/runtime/runtime.retain (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.retain (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/runtime/ROOT call $~lib/collector/itcm/__ref_link ) - (func $~lib/runtime/runtime.release (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.release (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/allocator/tlsf/__mem_free (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1676,7 +1593,7 @@ i32.const 24 i32.const 518 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1692,7 +1609,7 @@ end end ) - (func $~lib/collector/itcm/step (; 33 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/step (; 32 ;) (type $FUNCSIG$v) (local $0 i32) block $break|0 block $case3|0 @@ -1732,16 +1649,12 @@ i32.and i32.or i32.store offset=8 - block $__inlined_func$~lib/runtime/__gc_mark_members - block $invalid - local.get $0 - i32.load - i32.const 1 - i32.sub - br_table $__inlined_func$~lib/runtime/__gc_mark_members $__inlined_func$~lib/runtime/__gc_mark_members $__inlined_func$~lib/runtime/__gc_mark_members $invalid - end - unreachable - end + local.get $0 + i32.load + local.get $0 + i32.const 16 + i32.add + call $~lib/runtime/__gc_mark_members else call $~lib/runtime/__gc_mark_roots global.get $~lib/collector/itcm/toSpace @@ -1782,7 +1695,7 @@ i32.and global.set $~lib/collector/itcm/iter local.get $0 - i32.const 128 + i32.const 280 i32.ge_u if local.get $0 @@ -1801,7 +1714,7 @@ end end ) - (func $~lib/collector/itcm/__ref_collect (; 34 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/__ref_collect (; 33 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/maybeInit loop $continue|0 global.get $~lib/collector/itcm/state @@ -1820,89 +1733,118 @@ br_if $continue|1 end ) - (func $~lib/runtime/runtime.collect (; 35 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.collect (; 34 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/__ref_collect ) - (func $start (; 36 ;) (type $FUNCSIG$v) + (func $start (; 35 ;) (type $FUNCSIG$v) i32.const 0 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register global.set $~lib/runtime/ROOT ) + (func $~lib/collector/itcm/__ref_mark (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) + call $~lib/collector/itcm/maybeInit + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) (func $~lib/runtime/__gc_mark_roots (; 37 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/runtime/ROOT local.tee $0 if - call $~lib/collector/itcm/maybeInit - global.get $~lib/collector/itcm/white local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end + call $~lib/collector/itcm/__ref_mark end ) - (func $~lib/runtime/__runtime_instanceof (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - block $nope + (func $~lib/runtime/__gc_mark_members (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + block $invalid block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer + block $~lib/array/Array block $~lib/string/String - local.get $0 - i32.const 1 - i32.sub - br_table $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope + block $~lib/arraybuffer/ArrayBuffer + block $~lib/arraybuffer/ArrayBufferView + block $~lib/number/F64 + block $~lib/number/F32 + block $~lib/number/Bool + block $~lib/number/Usize + block $~lib/number/U64 + block $~lib/number/U32 + block $~lib/number/U16 + block $~lib/number/U8 + block $~lib/number/Isize + block $~lib/number/I64 + block $~lib/number/I32 + block $~lib/number/I16 + block $~lib/number/I8 + local.get $0 + i32.const 1 + i32.sub + br_table $~lib/number/I8 $~lib/number/I16 $~lib/number/I32 $~lib/number/I64 $~lib/number/Isize $~lib/number/U8 $~lib/number/U16 $~lib/number/U32 $~lib/number/U64 $~lib/number/Usize $~lib/number/Bool $~lib/number/F32 $~lib/number/F64 $~lib/arraybuffer/ArrayBufferView $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/array/Array $~lib/runtime/Root $invalid + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 15 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + return + end + return end - local.get $1 - i32.const 1 - i32.eq return end local.get $1 - i32.const 2 - i32.eq + i32.load + call $~lib/collector/itcm/__ref_mark return end - local.get $1 - i32.const 3 - i32.eq return end - i32.const 0 + unreachable ) (func $null (; 39 ;) (type $FUNCSIG$v) nop ) - (func $~lib/runtime/runtime.newArray|trampoline (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 3 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 0 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/runtime/runtime.newArray - ) - (func $~lib/setargc (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.set $~lib/argc - ) ) diff --git a/tests/compiler/runtime-default.untouched.wat b/tests/compiler/runtime-default.untouched.wat index c54dc003b4..0259d404ad 100644 --- a/tests/compiler/runtime-default.untouched.wat +++ b/tests/compiler/runtime-default.untouched.wat @@ -7,11 +7,11 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") - (data (i32.const 72) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 72) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 128) "\12\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -40,39 +40,87 @@ (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 128)) - (global $~lib/argc (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 128)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 280)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) (export "$.newObject" (func $~lib/runtime/runtime.newObject)) (export "$.newString" (func $~lib/runtime/runtime.newString)) (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export "$.setArgc" (func $~lib/setargc)) - (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.release)) (export "$.collect" (func $~lib/runtime/runtime.collect)) (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 if (result i32) - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub + local.get $2 + local.get $3 i32.load - local.get $1 - call $~lib/runtime/__runtime_instanceof + i32.le_u else - i32.const 0 + local.get $2 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end end + i32.const 0 ) (func $~lib/runtime/runtime.flags (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 local.get $0 - call $~lib/runtime/__runtime_flags + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end ) (func $~lib/util/runtime/adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -101,7 +149,7 @@ i32.const 24 i32.const 159 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -122,7 +170,7 @@ i32.const 24 i32.const 184 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -134,7 +182,7 @@ i32.const 24 i32.const 185 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -167,7 +215,7 @@ i32.const 24 i32.const 104 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -187,7 +235,7 @@ i32.const 24 i32.const 105 i32.const 11 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $1 @@ -203,7 +251,7 @@ i32.const 24 i32.const 447 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 31 @@ -221,7 +269,7 @@ i32.const 24 i32.const 175 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -233,7 +281,7 @@ i32.const 24 i32.const 176 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -257,7 +305,7 @@ i32.const 24 i32.const 153 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -287,7 +335,7 @@ i32.const 24 i32.const 277 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -313,7 +361,7 @@ i32.const 24 i32.const 279 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -424,7 +472,7 @@ i32.const 24 i32.const 96 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -438,7 +486,7 @@ i32.const 24 i32.const 97 i32.const 11 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $1 @@ -455,7 +503,7 @@ i32.const 24 i32.const 353 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -468,7 +516,7 @@ i32.const 24 i32.const 354 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -481,7 +529,7 @@ i32.const 24 i32.const 355 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -507,7 +555,7 @@ i32.const 24 i32.const 208 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -522,7 +570,7 @@ i32.const 24 i32.const 210 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -548,7 +596,7 @@ i32.const 24 i32.const 212 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -560,7 +608,7 @@ i32.const 24 i32.const 216 i32.const 23 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $4 @@ -608,7 +656,7 @@ i32.const 24 i32.const 230 i32.const 24 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $4 @@ -626,7 +674,7 @@ i32.const 24 i32.const 232 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -681,7 +729,7 @@ i32.const 24 i32.const 245 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -772,7 +820,7 @@ i32.const 24 i32.const 396 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -785,7 +833,7 @@ i32.const 24 i32.const 397 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -798,7 +846,7 @@ i32.const 24 i32.const 398 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -819,7 +867,7 @@ i32.const 24 i32.const 403 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -848,7 +896,7 @@ i32.const 24 i32.const 412 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -919,7 +967,7 @@ i32.const 24 i32.const 441 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -935,7 +983,7 @@ i32.const 24 i32.const 441 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -965,7 +1013,7 @@ i32.const 24 i32.const 315 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1061,7 +1109,7 @@ i32.const 24 i32.const 342 i32.const 16 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.set $5 @@ -1098,7 +1146,7 @@ i32.const 24 i32.const 367 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1118,7 +1166,7 @@ i32.const 24 i32.const 368 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1131,7 +1179,7 @@ i32.const 24 i32.const 369 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1191,7 +1239,7 @@ i32.const 24 i32.const 387 i32.const 25 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $4 @@ -1417,7 +1465,7 @@ i32.const 24 i32.const 502 i32.const 12 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $6 @@ -1438,7 +1486,7 @@ i32.const 24 i32.const 505 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1582,9 +1630,9 @@ if i32.const 0 i32.const 88 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1599,9 +1647,9 @@ if i32.const 0 i32.const 88 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1621,21 +1669,27 @@ local.get $0 i32.const 1 i32.shl - i32.const 1 + i32.const 16 call $~lib/runtime/runtime.newObject ) (func $~lib/runtime/runtime.newArrayBuffer (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 2 + i32.const 15 call $~lib/runtime/runtime.newObject ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/collector/itcm/ManagedObject#get:color (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 i32.and ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/ManagedObject#get:next (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 @@ -1643,7 +1697,7 @@ i32.xor i32.and ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#unlink (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1659,7 +1713,7 @@ local.get $1 call $~lib/collector/itcm/ManagedObject#set:next ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/collector/itcm/iter i32.eq @@ -1684,7 +1738,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/__ref_link (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/__ref_link (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) call $~lib/collector/itcm/maybeInit @@ -1721,271 +1775,105 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/memory/memory.copy (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/runtime/runtime.newArray (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - br $continue|1 - end - end - end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|2 - end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - end - br $continue|3 - end - end - end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 - end - end - end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - end - end - ) - (func $~lib/runtime/runtime.newArray (; 40 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - i32.const 16 - call $~lib/util/runtime/allocate - local.get $2 - call $~lib/util/runtime/register - local.set $4 local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $3 local.get $1 - i32.shl + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject local.set $5 local.get $5 - call $~lib/util/runtime/allocate - i32.const 2 - call $~lib/util/runtime/register - local.set $6 - local.get $4 + local.tee $6 + local.get $1 local.tee $7 local.get $6 - local.tee $8 - local.get $7 i32.load - local.tee $9 + local.tee $8 i32.ne if (result i32) nop - local.get $8 local.get $7 + local.get $6 call $~lib/collector/itcm/__ref_link - local.get $8 + local.get $7 else - local.get $8 + local.get $7 end i32.store - local.get $4 - local.get $6 + local.get $5 + local.get $1 i32.store offset=4 - local.get $4 local.get $5 + local.get $4 i32.store offset=8 + local.get $5 local.get $4 - local.get $0 - i32.store offset=12 local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 512 + i32.and if + local.get $1 + local.set $6 local.get $6 - local.get $3 - local.get $5 - call $~lib/memory/memory.copy + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $~lib/collector/itcm/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end end - local.get $4 + local.get $5 ) (func $~lib/runtime/Root#constructor (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -1993,7 +1881,7 @@ if i32.const 0 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register local.set $0 end @@ -2034,7 +1922,7 @@ i32.const 24 i32.const 518 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2240,92 +2128,85 @@ call $~lib/collector/itcm/__ref_mark end ) - (func $~lib/runtime/__gc_mark_members (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__traverse (; 53 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/runtime/__gc_mark_members (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $invalid block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/string/String - local.get $0 - br_table $invalid $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid - end - return - end - return - end - return - end - unreachable - ) - (func $~lib/runtime/__runtime_instanceof (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - block $nope - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer + block $~lib/array/Array block $~lib/string/String - local.get $0 - br_table $nope $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $nope + block $~lib/arraybuffer/ArrayBuffer + block $~lib/arraybuffer/ArrayBufferView + block $~lib/number/F64 + block $~lib/number/F32 + block $~lib/number/Bool + block $~lib/number/Usize + block $~lib/number/U64 + block $~lib/number/U32 + block $~lib/number/U16 + block $~lib/number/U8 + block $~lib/number/Isize + block $~lib/number/I64 + block $~lib/number/I32 + block $~lib/number/I16 + block $~lib/number/I8 + local.get $0 + br_table $invalid $~lib/number/I8 $~lib/number/I16 $~lib/number/I32 $~lib/number/I64 $~lib/number/Isize $~lib/number/U8 $~lib/number/U16 $~lib/number/U32 $~lib/number/U64 $~lib/number/Usize $~lib/number/Bool $~lib/number/F32 $~lib/number/F64 $~lib/arraybuffer/ArrayBufferView $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/array/Array $~lib/runtime/Root $invalid + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 15 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + return + end + return end - local.get $1 - i32.const 1 - i32.eq return end local.get $1 - i32.const 2 - i32.eq + call $~lib/array/Array#__traverse return end - local.get $1 - i32.const 3 - i32.eq - return - end - i32.const 0 - return - ) - (func $~lib/runtime/__runtime_flags (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - block $invalid - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/string/String - local.get $0 - br_table $invalid $~lib/string/String $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $invalid - end - i32.const 0 - return - end - i32.const 0 - return - end - i32.const 0 return end unreachable ) - (func $null (; 56 ;) (type $FUNCSIG$v) - ) - (func $~lib/runtime/runtime.newArray|trampoline (; 57 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 3 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 0 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/runtime/runtime.newArray - ) - (func $~lib/setargc (; 58 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.set $~lib/argc + (func $null (; 55 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/runtime-none.optimized.wat b/tests/compiler/runtime-none.optimized.wat index 587c7142d7..bb456a1172 100644 --- a/tests/compiler/runtime-none.optimized.wat +++ b/tests/compiler/runtime-none.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (func $null (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/runtime-none.untouched.wat b/tests/compiler/runtime-none.untouched.wat index 4560a6a15a..29ee81b836 100644 --- a/tests/compiler/runtime-none.untouched.wat +++ b/tests/compiler/runtime-none.untouched.wat @@ -3,9 +3,7 @@ (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (func $null (; 0 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/runtime/flags.optimized.wat b/tests/compiler/runtime/flags.optimized.wat index f8f0697517..ed72b50725 100644 --- a/tests/compiler/runtime/flags.optimized.wat +++ b/tests/compiler/runtime/flags.optimized.wat @@ -1,23 +1,23 @@ (module (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00 ") + (data (i32.const 8) "\11\00\00\00 ") (data (i32.const 24) "r\00u\00n\00t\00i\00m\00e\00/\00f\00l\00a\00g\00s\00.\00t\00s") - (data (i32.const 56) "\02\00\00\00,") + (data (i32.const 56) "\11\00\00\00,") (data (i32.const 72) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 120) "\02\00\00\00(") + (data (i32.const 120) "\11\00\00\00(") (data (i32.const 136) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 176) "+") + (data (i32.const 320) "\t\00\00\00\0f\00\00\00\11\00\00\00\0f\00\00\00!\00\00\00\0f\00\00\00A\00\00\00\0f\00\00\00\81\00\00\00\0f") + (data (i32.const 368) "!\02\00\00\0f\00\00\00!\03\00\00\0f\00\00\00\n\00\00\00\00\00\00\00\12\00\00\00\00\00\00\00\"\00\00\00\00\00\00\00B\00\00\00\00\00\00\00\82\00\00\00\00\00\00\00\"\02\00\00\00\00\00\00\"\03\00\00\00\00\00\00\0c@\00\00\00\00\00\00\14 \00\00\00\00\00\00$\10\00\00\00\00\00\00D\08\00\00\00\00\00\00\84\04\00\00\00\00\00\00\0c\10\01\00\00\00\00\00\0c\90\01\00\00\00\00\00$\06\00\00\00\00\00\00$\07\00\00\00\00\00\00$\93\01") (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) @@ -25,219 +25,682 @@ (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) (export "$.newObject" (func $~lib/runtime/runtime.newObject)) (export "$.newString" (func $~lib/runtime/runtime.newString)) (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export "$.setArgc" (func $~lib/setargc)) - (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.release)) (export "$.collect" (func $~lib/runtime/runtime.collect)) (export "$.capabilities" (global $~lib/capabilities)) (start $start) - (func $start:runtime/flags (; 1 ;) (type $FUNCSIG$v) - block $folding-inner0 - i32.const 1 - call $~lib/runtime/__runtime_flags - i32.const 9 - i32.ne - if - br $folding-inner0 - end + (func $~lib/runtime/runtime.flags (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + local.tee $1 + i32.eqz + if + local.get $0 + i32.const 176 + i32.load + i32.gt_u + local.set $1 + end + local.get $1 + if (result i32) + unreachable + else + local.get $0 i32.const 3 - call $~lib/runtime/__runtime_flags - i32.const 17 - i32.ne - if - br $folding-inner0 - end - i32.const 4 - call $~lib/runtime/__runtime_flags - i32.const 33 - i32.ne - if - br $folding-inner0 - end + i32.shl + i32.const 176 + i32.add + i32.load + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 2 ;) (type $FUNCSIG$v) + i32.const 18 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 320 + i32.load + end + i32.const 9 + i32.ne + if + i32.const 0 + i32.const 24 i32.const 5 - call $~lib/runtime/__runtime_flags - i32.const 65 - i32.ne - if - br $folding-inner0 - end - i32.const 6 - call $~lib/runtime/__runtime_flags - i32.const 129 - i32.ne - if - br $folding-inner0 - end - i32.const 7 - call $~lib/runtime/__runtime_flags - i32.const 545 - i32.ne - if - br $folding-inner0 - end - i32.const 8 - call $~lib/runtime/__runtime_flags - i32.const 801 - i32.ne - if - br $folding-inner0 - end - i32.const 9 - call $~lib/runtime/__runtime_flags - i32.const 10 - i32.ne - if - br $folding-inner0 - end - i32.const 10 - call $~lib/runtime/__runtime_flags - i32.const 18 - i32.ne - if - br $folding-inner0 - end - i32.const 11 - call $~lib/runtime/__runtime_flags - i32.const 34 - i32.ne - if - br $folding-inner0 - end - i32.const 12 - call $~lib/runtime/__runtime_flags - i32.const 66 - i32.ne - if - br $folding-inner0 - end - i32.const 13 - call $~lib/runtime/__runtime_flags - i32.const 130 - i32.ne - if - br $folding-inner0 - end - i32.const 14 - call $~lib/runtime/__runtime_flags - i32.const 546 - i32.ne - if - br $folding-inner0 - end - i32.const 15 - call $~lib/runtime/__runtime_flags - i32.const 802 - i32.ne - if - br $folding-inner0 - end - i32.const 16 - call $~lib/runtime/__runtime_flags - i32.const 16396 - i32.ne - if - br $folding-inner0 - end - i32.const 17 - call $~lib/runtime/__runtime_flags - i32.const 8212 - i32.ne - if - br $folding-inner0 - end - i32.const 18 - call $~lib/runtime/__runtime_flags - i32.const 4132 - i32.ne - if - br $folding-inner0 - end - i32.const 19 - call $~lib/runtime/__runtime_flags - i32.const 2116 - i32.ne - if - br $folding-inner0 - end - i32.const 20 - call $~lib/runtime/__runtime_flags - i32.const 1156 - i32.ne - if - br $folding-inner0 - end - i32.const 21 - call $~lib/runtime/__runtime_flags - i32.const 69644 - i32.ne - if - br $folding-inner0 - end - i32.const 22 - call $~lib/runtime/__runtime_flags - i32.const 102412 - i32.ne - if - br $folding-inner0 - end - i32.const 23 - call $~lib/runtime/__runtime_flags - i32.const 1572 - i32.ne - if - br $folding-inner0 - end + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 3 ;) (type $FUNCSIG$v) + i32.const 19 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 328 + i32.load + end + i32.const 17 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 4 ;) (type $FUNCSIG$v) + i32.const 20 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 336 + i32.load + end + i32.const 33 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 5 ;) (type $FUNCSIG$v) + i32.const 21 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 344 + i32.load + end + i32.const 65 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 6 ;) (type $FUNCSIG$v) + i32.const 22 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 352 + i32.load + end + i32.const 129 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 7 ;) (type $FUNCSIG$v) + i32.const 24 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 368 + i32.load + end + i32.const 545 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 8 ;) (type $FUNCSIG$v) + i32.const 25 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 376 + i32.load + end + i32.const 801 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 9 ;) (type $FUNCSIG$v) + i32.const 26 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 384 + i32.load + end + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 10 ;) (type $FUNCSIG$v) + i32.const 27 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 392 + i32.load + end + i32.const 18 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 11 ;) (type $FUNCSIG$v) + i32.const 28 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 400 + i32.load + end + i32.const 34 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 12 ;) (type $FUNCSIG$v) + i32.const 29 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 408 + i32.load + end + i32.const 66 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 13 ;) (type $FUNCSIG$v) + i32.const 30 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 416 + i32.load + end + i32.const 130 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 14 ;) (type $FUNCSIG$v) + i32.const 31 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 424 + i32.load + end + i32.const 546 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 15 ;) (type $FUNCSIG$v) + i32.const 32 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 432 + i32.load + end + i32.const 802 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 16 ;) (type $FUNCSIG$v) + i32.const 33 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 440 + i32.load + end + i32.const 16396 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 17 ;) (type $FUNCSIG$v) + i32.const 34 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 448 + i32.load + end + i32.const 8212 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 18 ;) (type $FUNCSIG$v) + i32.const 35 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 456 + i32.load + end + i32.const 4132 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 19 ;) (type $FUNCSIG$v) + i32.const 36 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 464 + i32.load + end + i32.const 2116 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 20 ;) (type $FUNCSIG$v) + i32.const 37 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 472 + i32.load + end + i32.const 1156 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 21 ;) (type $FUNCSIG$v) + i32.const 38 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 480 + i32.load + end + i32.const 69644 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 22 ;) (type $FUNCSIG$v) + i32.const 39 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 488 + i32.load + end + i32.const 102412 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 23 ;) (type $FUNCSIG$v) + i32.const 40 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 496 + i32.load + end + i32.const 1572 + i32.ne + if + i32.const 0 i32.const 24 - call $~lib/runtime/__runtime_flags - i32.const 1828 - i32.ne - if - br $folding-inner0 - end - i32.const 25 - call $~lib/runtime/__runtime_flags - i32.const 103204 - i32.ne - if - br $folding-inner0 - end - return + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable end - i32.const 0 - i32.const 24 - i32.const 42 - i32.const 2 - call $~lib/env/abort - unreachable ) - (func $~lib/runtime/runtime.instanceof (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $runtime/flags/test<~lib/map/Map> (; 24 ;) (type $FUNCSIG$v) + i32.const 41 + i32.const 176 + i32.load + i32.gt_u if (result i32) - local.get $0 - i32.const 16 - i32.sub + unreachable + else + i32.const 504 i32.load - local.get $1 - call $~lib/runtime/__runtime_instanceof + end + i32.const 1828 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 25 ;) (type $FUNCSIG$v) + i32.const 42 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable else + i32.const 512 + i32.load + end + i32.const 103204 + i32.ne + if i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $start:runtime/flags (; 26 ;) (type $FUNCSIG$v) + block + call $runtime/flags/test<~lib/array/Array> + end + block + call $runtime/flags/test<~lib/array/Array> + end + block + call $runtime/flags/test<~lib/array/Array> + end + block + call $runtime/flags/test<~lib/array/Array> + end + block + call $runtime/flags/test<~lib/array/Array> + end + block + call $runtime/flags/test<~lib/array/Array> + end + block + call $runtime/flags/test<~lib/array/Array> + end + block + call $runtime/flags/test<~lib/set/Set> + end + block + call $runtime/flags/test<~lib/set/Set> + end + block + call $runtime/flags/test<~lib/set/Set> + end + block + call $runtime/flags/test<~lib/set/Set> + end + block + call $runtime/flags/test<~lib/set/Set> + end + block + call $runtime/flags/test<~lib/set/Set> + end + block + call $runtime/flags/test<~lib/set/Set> + end + block + call $runtime/flags/test<~lib/map/Map> + end + block + call $runtime/flags/test<~lib/map/Map> + end + block + call $runtime/flags/test<~lib/map/Map> + end + block + call $runtime/flags/test<~lib/map/Map> + end + block + call $runtime/flags/test<~lib/map/Map> + end + block + call $runtime/flags/test<~lib/map/Map> + end + block + call $runtime/flags/test<~lib/map/Map> + end + block + call $runtime/flags/test<~lib/map/Map> + end + block + call $runtime/flags/test<~lib/map/Map> + end + block + call $runtime/flags/test<~lib/map/Map> end ) - (func $~lib/runtime/runtime.flags (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.instanceof (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - call $~lib/runtime/__runtime_flags + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 176 + i32.load + i32.le_u + else + local.get $0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 176 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.const 22 i32.ge_u @@ -246,7 +709,7 @@ i32.const 72 i32.const 159 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -257,7 +720,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 5 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 29 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 22 i32.ge_u @@ -266,7 +729,7 @@ i32.const 72 i32.const 184 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -277,7 +740,7 @@ i32.const 72 i32.const 185 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -292,7 +755,7 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Block#get:right (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const -4 @@ -303,7 +766,7 @@ i32.const 72 i32.const 104 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -321,12 +784,12 @@ i32.const 72 i32.const 105 i32.const 11 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 ) - (func $~lib/allocator/tlsf/fls (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -334,7 +797,7 @@ i32.const 72 i32.const 447 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 31 @@ -342,7 +805,7 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -351,7 +814,7 @@ i32.const 72 i32.const 175 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -362,7 +825,7 @@ i32.const 72 i32.const 176 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -376,7 +839,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -385,7 +848,7 @@ i32.const 72 i32.const 153 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -395,7 +858,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -411,7 +874,7 @@ i32.const 72 i32.const 277 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -434,7 +897,7 @@ i32.const 72 i32.const 279 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -524,7 +987,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const 2 @@ -535,7 +998,7 @@ i32.const 72 i32.const 96 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -549,12 +1012,12 @@ i32.const 72 i32.const 97 i32.const 11 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 ) - (func $~lib/allocator/tlsf/Root#setJump (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 i32.load i32.const 1 @@ -565,7 +1028,7 @@ i32.const 72 i32.const 353 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -577,7 +1040,7 @@ i32.const 72 i32.const 354 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -590,7 +1053,7 @@ i32.const 72 i32.const 355 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -599,7 +1062,7 @@ local.get $0 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -611,7 +1074,7 @@ i32.const 72 i32.const 208 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -625,7 +1088,7 @@ i32.const 72 i32.const 210 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -649,7 +1112,7 @@ i32.const 72 i32.const 212 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -661,7 +1124,7 @@ i32.const 72 i32.const 216 i32.const 23 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -702,7 +1165,7 @@ i32.const 72 i32.const 230 i32.const 24 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -716,7 +1179,7 @@ i32.const 72 i32.const 232 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -761,7 +1224,7 @@ i32.const 72 i32.const 245 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -829,7 +1292,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -840,7 +1303,7 @@ i32.const 72 i32.const 396 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -851,7 +1314,7 @@ i32.const 72 i32.const 397 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -862,7 +1325,7 @@ i32.const 72 i32.const 398 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2912 @@ -879,7 +1342,7 @@ i32.const 72 i32.const 403 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -907,7 +1370,7 @@ i32.const 72 i32.const 412 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -952,7 +1415,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#insert ) - (func $~lib/allocator/tlsf/ffs (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -960,13 +1423,13 @@ i32.const 72 i32.const 441 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -986,7 +1449,7 @@ i32.const 72 i32.const 315 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1065,7 +1528,7 @@ i32.const 72 i32.const 342 i32.const 16 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1078,7 +1541,7 @@ end end ) - (func $~lib/allocator/tlsf/Root#use (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1092,7 +1555,7 @@ i32.const 72 i32.const 367 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1112,7 +1575,7 @@ i32.const 72 i32.const 368 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1123,7 +1586,7 @@ i32.const 72 i32.const 369 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1175,7 +1638,7 @@ i32.const 72 i32.const 387 i32.const 25 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1189,7 +1652,7 @@ i32.const 8 i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1215,14 +1678,14 @@ if unreachable end - i32.const 176 + i32.const 528 local.set $2 - i32.const 176 + i32.const 528 global.set $~lib/allocator/tlsf/ROOT i32.const 2912 i32.const 0 i32.store - i32.const 176 + i32.const 528 i32.const 0 i32.store i32.const 0 @@ -1232,7 +1695,7 @@ i32.const 22 i32.lt_u if - i32.const 176 + i32.const 528 local.get $1 i32.const 0 call $~lib/allocator/tlsf/Root#setSLMap @@ -1243,7 +1706,7 @@ i32.const 32 i32.lt_u if - i32.const 176 + i32.const 528 local.get $1 local.get $3 i32.const 0 @@ -1262,8 +1725,8 @@ br $repeat|0 end end - i32.const 176 - i32.const 3096 + i32.const 528 + i32.const 3448 current_memory i32.const 16 i32.shl @@ -1336,7 +1799,7 @@ i32.const 72 i32.const 502 i32.const 12 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1351,7 +1814,7 @@ i32.const 72 i32.const 505 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1359,7 +1822,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/util/runtime/allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -1386,7 +1849,7 @@ i32.const 16 i32.add ) - (func $~lib/collector/itcm/maybeInit (; 20 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/maybeInit (; 44 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/collector/itcm/state i32.eqz @@ -1429,7 +1892,7 @@ global.set $~lib/collector/itcm/state end ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -1457,7 +1920,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/collector/itcm/__ref_register (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_register (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) call $~lib/collector/itcm/maybeInit local.get $0 i32.const 16 @@ -1474,17 +1937,17 @@ local.get $0 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/util/runtime/register (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 176 + i32.const 528 i32.le_u if i32.const 0 i32.const 136 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1497,9 +1960,9 @@ if i32.const 0 i32.const 136 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1511,25 +1974,25 @@ end local.get $0 ) - (func $~lib/runtime/runtime.newObject (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.newObject (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/util/runtime/allocate local.get $1 call $~lib/util/runtime/register ) - (func $~lib/runtime/runtime.newString (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.newString (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1 i32.shl - i32.const 2 + i32.const 17 call $~lib/runtime/runtime.newObject ) - (func $~lib/runtime/runtime.newArrayBuffer (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.newArrayBuffer (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 26 + i32.const 16 call $~lib/runtime/runtime.newObject ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 51 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) global.get $~lib/collector/itcm/iter @@ -1567,267 +2030,153 @@ i32.and i32.const 2 i32.or - i32.store offset=8 - ) - (func $~lib/collector/itcm/__ref_link (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - call $~lib/collector/itcm/maybeInit - global.get $~lib/collector/itcm/white - i32.eqz - local.get $1 - i32.const 16 - i32.sub - local.tee $2 - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - local.tee $1 - if (result i32) - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - i32.load offset=8 - i32.const 3 - i32.and - i32.eq - else - local.get $1 - end - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/memory/memory.copy (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 - end - end - end - loop $continue|2 - local.get $2 - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|3 - end - end - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - br $continue|4 - end - end - end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end + i32.store offset=8 + ) + (func $~lib/collector/itcm/__ref_link (; 52 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + global.get $~lib/collector/itcm/white + i32.eqz + local.get $1 + i32.const 16 + i32.sub + local.tee $2 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + local.tee $1 + if (result i32) + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + else + local.get $1 + end + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/runtime/runtime.newArray (; 30 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - i32.const 16 - call $~lib/util/runtime/allocate - local.get $2 - call $~lib/util/runtime/register - local.tee $2 - local.set $6 local.get $0 + local.tee $3 + i32.eqz + local.tee $0 + if (result i32) + local.get $0 + else + local.get $3 + i32.const 176 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $3 + i32.const 3 + i32.shl + i32.const 176 + i32.add + i32.load + end + local.tee $0 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $5 local.get $1 - i32.shl - local.tee $4 - call $~lib/util/runtime/allocate - i32.const 26 - call $~lib/util/runtime/register - local.tee $5 - local.tee $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $4 + local.get $3 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $2 + local.set $3 local.get $2 i32.load + local.get $1 i32.ne if local.get $1 - local.get $6 + local.get $3 call $~lib/collector/itcm/__ref_link end local.get $2 local.get $1 i32.store local.get $2 - local.get $5 + local.get $1 i32.store offset=4 local.get $2 local.get $4 i32.store offset=8 local.get $2 - local.get $0 + local.get $4 + local.get $5 + i32.shr_u i32.store offset=12 - local.get $3 + local.get $0 + i32.const 512 + i32.and if - local.get $5 - local.get $3 + local.get $1 local.get $4 - call $~lib/memory/memory.copy + i32.add + local.set $4 + loop $continue|0 + local.get $1 + local.get $4 + i32.lt_u + if + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + local.get $2 + call $~lib/collector/itcm/__ref_link + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end end local.get $2 ) - (func $~lib/runtime/runtime.retain (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.retain (; 54 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/runtime/ROOT call $~lib/collector/itcm/__ref_link ) - (func $~lib/runtime/runtime.release (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.release (; 55 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/allocator/tlsf/__mem_free (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1849,7 +2198,7 @@ i32.const 72 i32.const 518 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1865,7 +2214,7 @@ end end ) - (func $~lib/collector/itcm/step (; 34 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/step (; 57 ;) (type $FUNCSIG$v) (local $0 i32) block $break|0 block $case3|0 @@ -1951,7 +2300,7 @@ i32.and global.set $~lib/collector/itcm/iter local.get $0 - i32.const 176 + i32.const 528 i32.ge_u if local.get $0 @@ -1970,7 +2319,7 @@ end end ) - (func $~lib/collector/itcm/__ref_collect (; 35 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/__ref_collect (; 58 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/maybeInit loop $continue|0 global.get $~lib/collector/itcm/state @@ -1989,18 +2338,18 @@ br_if $continue|1 end ) - (func $~lib/runtime/runtime.collect (; 36 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.collect (; 59 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/__ref_collect ) - (func $start (; 37 ;) (type $FUNCSIG$v) + (func $start (; 60 ;) (type $FUNCSIG$v) call $start:runtime/flags i32.const 0 call $~lib/util/runtime/allocate - i32.const 27 + i32.const 43 call $~lib/util/runtime/register global.set $~lib/runtime/ROOT ) - (func $~lib/collector/itcm/__ref_mark (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_mark (; 61 ;) (type $FUNCSIG$vi) (param $0 i32) call $~lib/collector/itcm/maybeInit global.get $~lib/collector/itcm/white local.get $0 @@ -2016,7 +2365,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/runtime/__gc_mark_roots (; 39 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__gc_mark_roots (; 62 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/runtime/ROOT local.tee $0 @@ -2025,7 +2374,7 @@ call $~lib/collector/itcm/__ref_mark end ) - (func $~lib/array/Array#__traverse (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#__traverse (; 63 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2047,7 +2396,7 @@ i32.load local.tee $2 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $2 call $~lib/runtime/__gc_mark_members local.get $1 @@ -2058,7 +2407,7 @@ end end ) - (func $~lib/array/Array#__traverse (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#__traverse (; 64 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2082,7 +2431,7 @@ if local.get $0 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $0 call $~lib/runtime/__gc_mark_members end @@ -2094,7 +2443,7 @@ end end ) - (func $~lib/set/Set#__traverse (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#__traverse (; 65 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2126,7 +2475,7 @@ i32.load local.tee $2 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $2 call $~lib/runtime/__gc_mark_members end @@ -2138,7 +2487,7 @@ end end ) - (func $~lib/set/Set#__traverse (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#__traverse (; 66 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2172,7 +2521,7 @@ if local.get $0 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $0 call $~lib/runtime/__gc_mark_members end @@ -2185,7 +2534,7 @@ end end ) - (func $~lib/map/Map#__traverse (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 67 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2217,7 +2566,7 @@ i32.load local.tee $2 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $2 call $~lib/runtime/__gc_mark_members end @@ -2229,7 +2578,7 @@ end end ) - (func $~lib/map/Map#__traverse (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 68 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2263,7 +2612,7 @@ if local.get $0 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $0 call $~lib/runtime/__gc_mark_members end @@ -2276,7 +2625,7 @@ end end ) - (func $~lib/map/Map#__traverse (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 69 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2308,7 +2657,7 @@ i32.load offset=4 local.tee $2 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $2 call $~lib/runtime/__gc_mark_members end @@ -2320,7 +2669,7 @@ end end ) - (func $~lib/map/Map#__traverse (; 47 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 70 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2354,7 +2703,7 @@ if local.get $0 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $0 call $~lib/runtime/__gc_mark_members end @@ -2367,7 +2716,7 @@ end end ) - (func $~lib/map/Map#__traverse (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 71 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2401,7 +2750,7 @@ if local.get $0 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $0 call $~lib/runtime/__gc_mark_members end @@ -2411,7 +2760,7 @@ if local.get $0 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $0 call $~lib/runtime/__gc_mark_members end @@ -2424,447 +2773,142 @@ end end ) - (func $~lib/runtime/__gc_mark_members (; 49 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/runtime/__gc_mark_members (; 72 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $folding-inner1 block $folding-inner0 block $invalid - block $runtime/flags/Ref - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/set/Set - block $~lib/set/Set - block $~lib/array/Array - block $~lib/array/Array - block $~lib/string/String - local.get $0 - i32.const 1 - i32.sub - br_table $folding-inner0 $~lib/string/String $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $~lib/array/Array $~lib/array/Array $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $~lib/set/Set $~lib/set/Set $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $runtime/flags/Ref $invalid - end - return - end - local.get $1 - call $~lib/array/Array#__traverse - return - end - local.get $1 - call $~lib/array/Array#__traverse - return - end - local.get $1 - call $~lib/set/Set#__traverse - return - end - local.get $1 - call $~lib/set/Set#__traverse - return - end - local.get $1 - call $~lib/map/Map#__traverse - return - end - local.get $1 - call $~lib/map/Map#__traverse - return - end - local.get $1 - call $~lib/map/Map#__traverse - return - end - local.get $1 - call $~lib/map/Map#__traverse - return - end - local.get $1 - call $~lib/map/Map#__traverse - return - end - return - end - return - end - return - end - unreachable - end - local.get $1 - i32.load - call $~lib/collector/itcm/__ref_mark - return - end - local.get $1 - i32.load - call $~lib/collector/itcm/__ref_mark - local.get $1 - i32.load offset=8 - call $~lib/collector/itcm/__ref_mark - ) - (func $~lib/runtime/__runtime_instanceof (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - block $nope - block $~lib/arraybuffer/ArrayBufferView - block $runtime/flags/Ref block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/string/String - block $~lib/array/Array - local.get $0 - i32.const 1 - i32.sub - br_table $~lib/array/Array $~lib/string/String $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $runtime/flags/Ref $~lib/arraybuffer/ArrayBufferView $nope + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/set/Set + block $~lib/set/Set + block $~lib/array/Array + block $~lib/array/Array + block $runtime/flags/Ref + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/arraybuffer/ArrayBufferView + block $~lib/vector/V128 + block $~lib/number/F64 + block $~lib/number/F32 + block $~lib/number/Bool + block $~lib/number/Usize + block $~lib/number/U64 + block $~lib/number/U32 + block $~lib/number/U16 + block $~lib/number/U8 + block $~lib/number/Isize + block $~lib/number/I64 + block $~lib/number/I32 + block $~lib/number/I16 + block $~lib/number/I8 + local.get $0 + i32.const 1 + i32.sub + br_table $~lib/number/I8 $~lib/number/I16 $~lib/number/I32 $~lib/number/I64 $~lib/number/Isize $~lib/number/U8 $~lib/number/U16 $~lib/number/U32 $~lib/number/U64 $~lib/number/Usize $~lib/number/Bool $~lib/number/F32 $~lib/number/F64 $~lib/vector/V128 $~lib/arraybuffer/ArrayBufferView $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $runtime/flags/Ref $~lib/array/Array $~lib/array/Array $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $~lib/set/Set $~lib/set/Set $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/runtime/Root $invalid + end + return end - local.get $1 - i32.const 1 - i32.eq - local.get $1 - i32.const 29 - i32.eq - i32.or return end - local.get $1 - i32.const 2 - i32.eq return end - local.get $1 - i32.const 3 - i32.eq - local.get $1 - i32.const 29 - i32.eq - i32.or return end - local.get $1 - i32.const 4 - i32.eq - local.get $1 - i32.const 29 - i32.eq - i32.or return end - local.get $1 - i32.const 5 - i32.eq - local.get $1 - i32.const 29 - i32.eq - i32.or return end - local.get $1 - i32.const 6 - i32.eq - local.get $1 - i32.const 29 - i32.eq - i32.or return end - local.get $1 - i32.const 7 - i32.eq - local.get $1 - i32.const 29 - i32.eq - i32.or return end - local.get $1 - i32.const 8 - i32.eq - local.get $1 - i32.const 29 - i32.eq - i32.or return end - local.get $1 - i32.const 9 - i32.eq return end - local.get $1 - i32.const 10 - i32.eq return end - local.get $1 - i32.const 11 - i32.eq return end - local.get $1 - i32.const 12 - i32.eq return end - local.get $1 - i32.const 13 - i32.eq return end local.get $1 - i32.const 14 - i32.eq + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 16 + local.get $0 + call $~lib/runtime/__gc_mark_members + end return end - local.get $1 - i32.const 15 - i32.eq return end - local.get $1 - i32.const 16 - i32.eq return end - local.get $1 - i32.const 17 - i32.eq return end local.get $1 - i32.const 18 - i32.eq + call $~lib/array/Array#__traverse return end local.get $1 - i32.const 19 - i32.eq + call $~lib/array/Array#__traverse return end local.get $1 - i32.const 20 - i32.eq + call $~lib/set/Set#__traverse return end local.get $1 - i32.const 21 - i32.eq + call $~lib/set/Set#__traverse return end local.get $1 - i32.const 22 - i32.eq + call $~lib/map/Map#__traverse return end local.get $1 - i32.const 23 - i32.eq + call $~lib/map/Map#__traverse return end local.get $1 - i32.const 24 - i32.eq + call $~lib/map/Map#__traverse return end local.get $1 - i32.const 25 - i32.eq + call $~lib/map/Map#__traverse return end local.get $1 - i32.const 26 - i32.eq + call $~lib/map/Map#__traverse return end - local.get $1 - i32.const 27 - i32.eq return end - local.get $1 - i32.const 28 - i32.eq - return + unreachable end local.get $1 - i32.const 29 - i32.eq - return - end - i32.const 0 - ) - (func $~lib/runtime/__runtime_flags (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - block $invalid - block $~lib/arraybuffer/ArrayBufferView - block $runtime/flags/Ref - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/string/String - block $~lib/array/Array - local.get $0 - i32.const 1 - i32.sub - br_table $~lib/array/Array $~lib/string/String $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $runtime/flags/Ref $~lib/arraybuffer/ArrayBufferView $invalid - end - i32.const 9 - return - end - i32.const 0 - return - end - i32.const 17 - return - end - i32.const 33 - return - end - i32.const 65 - return - end - i32.const 129 - return - end - i32.const 545 - return - end - i32.const 801 - return - end - i32.const 10 - return - end - i32.const 18 - return - end - i32.const 34 - return - end - i32.const 66 - return - end - i32.const 130 - return - end - i32.const 546 - return - end - i32.const 802 - return - end - i32.const 16396 - return - end - i32.const 8212 - return - end - i32.const 4132 - return - end - i32.const 2116 - return - end - i32.const 1156 - return - end - i32.const 69644 - return - end - i32.const 102412 - return - end - i32.const 1572 - return - end - i32.const 1828 - return - end - i32.const 103204 - return - end - i32.const 0 - return - end - i32.const 0 - return - end - i32.const 0 - return - end - i32.const 0 + i32.load + call $~lib/collector/itcm/__ref_mark return end - unreachable - ) - (func $null (; 52 ;) (type $FUNCSIG$v) - nop - ) - (func $~lib/runtime/runtime.newArray|trampoline (; 53 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 3 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 0 - local.set $3 - end - local.get $0 local.get $1 - local.get $2 - local.get $3 - call $~lib/runtime/runtime.newArray + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $1 + i32.load offset=8 + call $~lib/collector/itcm/__ref_mark ) - (func $~lib/setargc (; 54 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.set $~lib/argc + (func $null (; 73 ;) (type $FUNCSIG$v) + nop ) ) diff --git a/tests/compiler/runtime/flags.ts b/tests/compiler/runtime/flags.ts index 091996dc0a..7c0eed64fa 100644 --- a/tests/compiler/runtime/flags.ts +++ b/tests/compiler/runtime/flags.ts @@ -1,46 +1,9 @@ -import { __runtime_id, __runtime_flags } from "runtime"; +import { runtime, __runtime_id } from "runtime"; +import { RTTIFlags } from "common/rtti"; -const enum RuntimeFlags { // keep in sync with src/program.ts - NONE = 0, - /** Type is an `Array`. */ - ARRAY = 1 << 0, - /** Type is a `Set`. */ - SET = 1 << 1, - /** Type is a `Map`. */ - MAP = 1 << 2, - /** Value alignment of 1 byte. */ - VALUE_ALIGN_0 = 1 << 3, - /** Value alignment of 2 bytes. */ - VALUE_ALIGN_1 = 1 << 4, - /** Value alignment of 4 bytes. */ - VALUE_ALIGN_2 = 1 << 5, - /** Value alignment of 8 bytes. */ - VALUE_ALIGN_3 = 1 << 6, - /** Value alignment of 16 bytes. */ - VALUE_ALIGN_4 = 1 << 7, - /** Value type is nullable. */ - VALUE_NULLABLE = 1 << 8, - /** Value type is managed. */ - VALUE_MANAGED = 1 << 9, - /** Key alignment of 1 byte. */ - KEY_ALIGN_0 = 1 << 10, - /** Key alignment of 2 bytes. */ - KEY_ALIGN_1 = 1 << 11, - /** Key alignment of 4 bytes. */ - KEY_ALIGN_2 = 1 << 12, - /** Key alignment of 8 bytes. */ - KEY_ALIGN_3 = 1 << 13, - /** Key alignment of 16 bytes. */ - KEY_ALIGN_4 = 1 << 14, - /** Key type is nullable. */ - KEY_NULLABLE = 1 << 15, - /** Key type is managed. */ - KEY_MANAGED = 1 << 16 -} - -function test(flags: RuntimeFlags): void { +function test(flags: RTTIFlags): void { assert( - __runtime_flags(__runtime_id()) + runtime.flags(__runtime_id()) == flags ); @@ -48,34 +11,32 @@ function test(flags: RuntimeFlags): void { class Ref {} -const VALUE_ALIGN_REF = sizeof() == 4 ? RuntimeFlags.VALUE_ALIGN_2 : RuntimeFlags.VALUE_ALIGN_3; -const KEY_ALIGN_REF = sizeof() == 4 ? RuntimeFlags.KEY_ALIGN_2 : RuntimeFlags.KEY_ALIGN_3; - -test>(RuntimeFlags.ARRAY | RuntimeFlags.VALUE_ALIGN_0); -test>(RuntimeFlags.ARRAY | RuntimeFlags.VALUE_ALIGN_1); -test>(RuntimeFlags.ARRAY | RuntimeFlags.VALUE_ALIGN_2); -test>(RuntimeFlags.ARRAY | RuntimeFlags.VALUE_ALIGN_3); -test>(RuntimeFlags.ARRAY | RuntimeFlags.VALUE_ALIGN_4); -test>(RuntimeFlags.ARRAY | VALUE_ALIGN_REF | RuntimeFlags.VALUE_MANAGED); -test>(RuntimeFlags.ARRAY | VALUE_ALIGN_REF | RuntimeFlags.VALUE_NULLABLE | RuntimeFlags.VALUE_MANAGED); - -test>(RuntimeFlags.SET | RuntimeFlags.VALUE_ALIGN_0); -test>(RuntimeFlags.SET | RuntimeFlags.VALUE_ALIGN_1); -test>(RuntimeFlags.SET | RuntimeFlags.VALUE_ALIGN_2); -test>(RuntimeFlags.SET | RuntimeFlags.VALUE_ALIGN_3); -test>(RuntimeFlags.SET | RuntimeFlags.VALUE_ALIGN_4); -test>(RuntimeFlags.SET | VALUE_ALIGN_REF | RuntimeFlags.VALUE_MANAGED); -test>(RuntimeFlags.SET | VALUE_ALIGN_REF | RuntimeFlags.VALUE_NULLABLE | RuntimeFlags.VALUE_MANAGED); - -test>(RuntimeFlags.MAP | RuntimeFlags.KEY_ALIGN_4 | RuntimeFlags.VALUE_ALIGN_0); -test>(RuntimeFlags.MAP | RuntimeFlags.KEY_ALIGN_3 | RuntimeFlags.VALUE_ALIGN_1); -test>(RuntimeFlags.MAP | RuntimeFlags.KEY_ALIGN_2 | RuntimeFlags.VALUE_ALIGN_2); -test>(RuntimeFlags.MAP | RuntimeFlags.KEY_ALIGN_1 | RuntimeFlags.VALUE_ALIGN_3); -test>(RuntimeFlags.MAP | RuntimeFlags.KEY_ALIGN_0 | RuntimeFlags.VALUE_ALIGN_4); -test>(RuntimeFlags.MAP | KEY_ALIGN_REF | RuntimeFlags.KEY_MANAGED | RuntimeFlags.VALUE_ALIGN_0); -test>(RuntimeFlags.MAP |KEY_ALIGN_REF | RuntimeFlags.KEY_NULLABLE | RuntimeFlags.KEY_MANAGED | RuntimeFlags.VALUE_ALIGN_0); -test>(RuntimeFlags.MAP | RuntimeFlags.KEY_ALIGN_0 | RuntimeFlags.VALUE_MANAGED | VALUE_ALIGN_REF); -test>(RuntimeFlags.MAP | RuntimeFlags.KEY_ALIGN_0 | RuntimeFlags.VALUE_NULLABLE | RuntimeFlags.VALUE_MANAGED | VALUE_ALIGN_REF); -test>(RuntimeFlags.MAP | RuntimeFlags.KEY_NULLABLE | RuntimeFlags.KEY_MANAGED | KEY_ALIGN_REF | RuntimeFlags.VALUE_NULLABLE | RuntimeFlags.VALUE_MANAGED | VALUE_ALIGN_REF); - -// TODO: WASM64 +const VALUE_ALIGN_REF = sizeof() == 4 ? RTTIFlags.VALUE_ALIGN_2 : RTTIFlags.VALUE_ALIGN_3; +const KEY_ALIGN_REF = sizeof() == 4 ? RTTIFlags.KEY_ALIGN_2 : RTTIFlags.KEY_ALIGN_3; + +test>(RTTIFlags.ARRAY | RTTIFlags.VALUE_ALIGN_0); +test>(RTTIFlags.ARRAY | RTTIFlags.VALUE_ALIGN_1); +test>(RTTIFlags.ARRAY | RTTIFlags.VALUE_ALIGN_2); +test>(RTTIFlags.ARRAY | RTTIFlags.VALUE_ALIGN_3); +test>(RTTIFlags.ARRAY | RTTIFlags.VALUE_ALIGN_4); +test>(RTTIFlags.ARRAY | VALUE_ALIGN_REF | RTTIFlags.VALUE_MANAGED); +test>(RTTIFlags.ARRAY | VALUE_ALIGN_REF | RTTIFlags.VALUE_NULLABLE | RTTIFlags.VALUE_MANAGED); + +test>(RTTIFlags.SET | RTTIFlags.VALUE_ALIGN_0); +test>(RTTIFlags.SET | RTTIFlags.VALUE_ALIGN_1); +test>(RTTIFlags.SET | RTTIFlags.VALUE_ALIGN_2); +test>(RTTIFlags.SET | RTTIFlags.VALUE_ALIGN_3); +test>(RTTIFlags.SET | RTTIFlags.VALUE_ALIGN_4); +test>(RTTIFlags.SET | VALUE_ALIGN_REF | RTTIFlags.VALUE_MANAGED); +test>(RTTIFlags.SET | VALUE_ALIGN_REF | RTTIFlags.VALUE_NULLABLE | RTTIFlags.VALUE_MANAGED); + +test>(RTTIFlags.MAP | RTTIFlags.KEY_ALIGN_4 | RTTIFlags.VALUE_ALIGN_0); +test>(RTTIFlags.MAP | RTTIFlags.KEY_ALIGN_3 | RTTIFlags.VALUE_ALIGN_1); +test>(RTTIFlags.MAP | RTTIFlags.KEY_ALIGN_2 | RTTIFlags.VALUE_ALIGN_2); +test>(RTTIFlags.MAP | RTTIFlags.KEY_ALIGN_1 | RTTIFlags.VALUE_ALIGN_3); +test>(RTTIFlags.MAP | RTTIFlags.KEY_ALIGN_0 | RTTIFlags.VALUE_ALIGN_4); +test>(RTTIFlags.MAP | KEY_ALIGN_REF | RTTIFlags.KEY_MANAGED | RTTIFlags.VALUE_ALIGN_0); +test>(RTTIFlags.MAP |KEY_ALIGN_REF | RTTIFlags.KEY_NULLABLE | RTTIFlags.KEY_MANAGED | RTTIFlags.VALUE_ALIGN_0); +test>(RTTIFlags.MAP | RTTIFlags.KEY_ALIGN_0 | RTTIFlags.VALUE_MANAGED | VALUE_ALIGN_REF); +test>(RTTIFlags.MAP | RTTIFlags.KEY_ALIGN_0 | RTTIFlags.VALUE_NULLABLE | RTTIFlags.VALUE_MANAGED | VALUE_ALIGN_REF); +test>(RTTIFlags.MAP | RTTIFlags.KEY_NULLABLE | RTTIFlags.KEY_MANAGED | KEY_ALIGN_REF | RTTIFlags.VALUE_NULLABLE | RTTIFlags.VALUE_MANAGED | VALUE_ALIGN_REF); diff --git a/tests/compiler/runtime/flags.untouched.wat b/tests/compiler/runtime/flags.untouched.wat index 348e0c016b..01061d0d6b 100644 --- a/tests/compiler/runtime/flags.untouched.wat +++ b/tests/compiler/runtime/flags.untouched.wat @@ -1,18 +1,18 @@ (module (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00 \00\00\00\00\00\00\00\00\00\00\00r\00u\00n\00t\00i\00m\00e\00/\00f\00l\00a\00g\00s\00.\00t\00s\00") - (data (i32.const 56) "\02\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") - (data (i32.const 120) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\11\00\00\00 \00\00\00\00\00\00\00\00\00\00\00r\00u\00n\00t\00i\00m\00e\00/\00f\00l\00a\00g\00s\00.\00t\00s\00") + (data (i32.const 56) "\11\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 120) "\11\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 176) "+\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\0f\00\00\00\11\00\00\00\0f\00\00\00!\00\00\00\0f\00\00\00A\00\00\00\0f\00\00\00\81\00\00\00\0f\00\00\00\00\00\00\00\00\00\00\00!\02\00\00\0f\00\00\00!\03\00\00\0f\00\00\00\n\00\00\00\00\00\00\00\12\00\00\00\00\00\00\00\"\00\00\00\00\00\00\00B\00\00\00\00\00\00\00\82\00\00\00\00\00\00\00\"\02\00\00\00\00\00\00\"\03\00\00\00\00\00\00\0c@\00\00\00\00\00\00\14 \00\00\00\00\00\00$\10\00\00\00\00\00\00D\08\00\00\00\00\00\00\84\04\00\00\00\00\00\00\0c\10\01\00\00\00\00\00\0c\90\01\00\00\00\00\00$\06\00\00\00\00\00\00$\07\00\00\00\00\00\00$\93\01\00\00\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $runtime/flags/VALUE_ALIGN_REF i32 (i32.const 32)) @@ -43,384 +43,409 @@ (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 176)) - (global $~lib/argc (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 176)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 528)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) (export "$.newObject" (func $~lib/runtime/runtime.newObject)) (export "$.newString" (func $~lib/runtime/runtime.newString)) (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) - (export "$.setArgc" (func $~lib/setargc)) - (export "$.newArray" (func $~lib/runtime/runtime.newArray|trampoline)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.release)) (export "$.collect" (func $~lib/runtime/runtime.collect)) (export "$.capabilities" (global $~lib/capabilities)) (start $start) - (func $runtime/flags/test<~lib/array/Array> (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 1 - call $~lib/runtime/__runtime_flags + (func $~lib/runtime/runtime.flags (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 18 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/array/Array> (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 3 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/array/Array> (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 19 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/array/Array> (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 4 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/array/Array> (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 20 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/array/Array> (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 5 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/array/Array> (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 21 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/array/Array> (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 6 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/array/Array> (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 22 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/array/Array> (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 7 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/array/Array> (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 24 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/array/Array> (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 8 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/array/Array> (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 25 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/set/Set> (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 9 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/set/Set> (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 26 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/set/Set> (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 10 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/set/Set> (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 27 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/set/Set> (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 11 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/set/Set> (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 28 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/set/Set> (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 12 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/set/Set> (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 29 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/set/Set> (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 13 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/set/Set> (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 30 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/set/Set> (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 14 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/set/Set> (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 31 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/set/Set> (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 15 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/set/Set> (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 32 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/map/Map> (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 16 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/map/Map> (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 33 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/map/Map> (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 17 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/map/Map> (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 34 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/map/Map> (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 18 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/map/Map> (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 35 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/map/Map> (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 19 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/map/Map> (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 36 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/map/Map> (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 20 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/map/Map> (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 37 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/map/Map> (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 21 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/map/Map> (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 38 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/map/Map> (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 22 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/map/Map> (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 39 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/map/Map> (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 23 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/map/Map> (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 40 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/map/Map> (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 24 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/map/Map> (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 41 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/flags/test<~lib/map/Map> (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 25 - call $~lib/runtime/__runtime_flags + (func $runtime/flags/test<~lib/map/Map> (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 42 + call $~lib/runtime/runtime.flags local.get $0 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 42 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start:runtime/flags (; 25 ;) (type $FUNCSIG$v) + (func $start:runtime/flags (; 26 ;) (type $FUNCSIG$v) i32.const 1 i32.const 8 i32.or @@ -570,22 +595,45 @@ i32.or call $runtime/flags/test<~lib/map/Map> ) - (func $~lib/runtime/runtime.instanceof (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.instanceof (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 if (result i32) - local.get $0 - global.get $~lib/util/runtime/HEADER_SIZE - i32.sub + local.get $2 + local.get $3 i32.load - local.get $1 - call $~lib/runtime/__runtime_instanceof + i32.le_u else - i32.const 0 + local.get $2 end - ) - (func $~lib/runtime/runtime.flags (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/runtime/__runtime_flags + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 ) (func $~lib/util/runtime/adjust (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -614,7 +662,7 @@ i32.const 72 i32.const 159 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -635,7 +683,7 @@ i32.const 72 i32.const 184 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -647,7 +695,7 @@ i32.const 72 i32.const 185 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -680,7 +728,7 @@ i32.const 72 i32.const 104 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -700,7 +748,7 @@ i32.const 72 i32.const 105 i32.const 11 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $1 @@ -716,7 +764,7 @@ i32.const 72 i32.const 447 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 31 @@ -734,7 +782,7 @@ i32.const 72 i32.const 175 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -746,7 +794,7 @@ i32.const 72 i32.const 176 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -770,7 +818,7 @@ i32.const 72 i32.const 153 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -800,7 +848,7 @@ i32.const 72 i32.const 277 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -826,7 +874,7 @@ i32.const 72 i32.const 279 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -937,7 +985,7 @@ i32.const 72 i32.const 96 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -951,7 +999,7 @@ i32.const 72 i32.const 97 i32.const 11 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $1 @@ -968,7 +1016,7 @@ i32.const 72 i32.const 353 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -981,7 +1029,7 @@ i32.const 72 i32.const 354 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -994,7 +1042,7 @@ i32.const 72 i32.const 355 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1020,7 +1068,7 @@ i32.const 72 i32.const 208 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1035,7 +1083,7 @@ i32.const 72 i32.const 210 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1061,7 +1109,7 @@ i32.const 72 i32.const 212 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1073,7 +1121,7 @@ i32.const 72 i32.const 216 i32.const 23 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $4 @@ -1121,7 +1169,7 @@ i32.const 72 i32.const 230 i32.const 24 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $4 @@ -1139,7 +1187,7 @@ i32.const 72 i32.const 232 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1194,7 +1242,7 @@ i32.const 72 i32.const 245 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1285,7 +1333,7 @@ i32.const 72 i32.const 396 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1298,7 +1346,7 @@ i32.const 72 i32.const 397 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1311,7 +1359,7 @@ i32.const 72 i32.const 398 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1332,7 +1380,7 @@ i32.const 72 i32.const 403 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1361,7 +1409,7 @@ i32.const 72 i32.const 412 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1432,7 +1480,7 @@ i32.const 72 i32.const 441 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1448,7 +1496,7 @@ i32.const 72 i32.const 441 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1478,7 +1526,7 @@ i32.const 72 i32.const 315 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1574,7 +1622,7 @@ i32.const 72 i32.const 342 i32.const 16 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.set $5 @@ -1611,7 +1659,7 @@ i32.const 72 i32.const 367 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1631,7 +1679,7 @@ i32.const 72 i32.const 368 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1644,7 +1692,7 @@ i32.const 72 i32.const 369 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1704,7 +1752,7 @@ i32.const 72 i32.const 387 i32.const 25 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $4 @@ -1930,7 +1978,7 @@ i32.const 72 i32.const 502 i32.const 12 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $6 @@ -1951,7 +1999,7 @@ i32.const 72 i32.const 505 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2095,9 +2143,9 @@ if i32.const 0 i32.const 136 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2112,9 +2160,9 @@ if i32.const 0 i32.const 136 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2134,21 +2182,27 @@ local.get $0 i32.const 1 i32.shl - i32.const 2 + i32.const 17 call $~lib/runtime/runtime.newObject ) (func $~lib/runtime/runtime.newArrayBuffer (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 26 + i32.const 16 call $~lib/runtime/runtime.newObject ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/collector/itcm/ManagedObject#get:color (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 i32.and ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/ManagedObject#get:next (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 @@ -2156,7 +2210,7 @@ i32.xor i32.and ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 61 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#unlink (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2172,7 +2226,7 @@ local.get $1 call $~lib/collector/itcm/ManagedObject#set:next ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 63 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/collector/itcm/iter i32.eq @@ -2197,7 +2251,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/__ref_link (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/__ref_link (; 64 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) call $~lib/collector/itcm/maybeInit @@ -2234,271 +2288,105 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/memory/memory.copy (; 64 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/runtime/runtime.newArray (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - br $continue|1 - end - end - end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|2 - end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - end - br $continue|3 - end - end - end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 - end - end - end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - end - end - ) - (func $~lib/runtime/runtime.newArray (; 65 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - i32.const 16 - call $~lib/util/runtime/allocate - local.get $2 - call $~lib/util/runtime/register - local.set $4 local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $3 local.get $1 - i32.shl + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject local.set $5 local.get $5 - call $~lib/util/runtime/allocate - i32.const 26 - call $~lib/util/runtime/register - local.set $6 - local.get $4 + local.tee $6 + local.get $1 local.tee $7 local.get $6 - local.tee $8 - local.get $7 i32.load - local.tee $9 + local.tee $8 i32.ne if (result i32) nop - local.get $8 local.get $7 + local.get $6 call $~lib/collector/itcm/__ref_link - local.get $8 + local.get $7 else - local.get $8 + local.get $7 end i32.store - local.get $4 - local.get $6 + local.get $5 + local.get $1 i32.store offset=4 - local.get $4 local.get $5 + local.get $4 i32.store offset=8 + local.get $5 local.get $4 - local.get $0 - i32.store offset=12 local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 512 + i32.and if + local.get $1 + local.set $6 local.get $6 - local.get $3 - local.get $5 - call $~lib/memory/memory.copy + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $~lib/collector/itcm/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end end - local.get $4 + local.get $5 ) (func $~lib/runtime/Root#constructor (; 66 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -2506,7 +2394,7 @@ if i32.const 0 call $~lib/util/runtime/allocate - i32.const 27 + i32.const 43 call $~lib/util/runtime/register local.set $0 end @@ -2547,7 +2435,7 @@ i32.const 72 i32.const 518 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2806,7 +2694,7 @@ local.set $3 local.get $3 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $3 call $~lib/runtime/__gc_mark_members local.get $1 @@ -2848,7 +2736,7 @@ if local.get $3 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $3 call $~lib/runtime/__gc_mark_members end @@ -2962,7 +2850,7 @@ local.set $5 local.get $5 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $5 call $~lib/runtime/__gc_mark_members end @@ -3025,7 +2913,7 @@ if local.get $5 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $5 call $~lib/runtime/__gc_mark_members end @@ -3142,7 +3030,7 @@ local.set $5 local.get $5 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $5 call $~lib/runtime/__gc_mark_members end @@ -3205,7 +3093,7 @@ if local.get $5 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $5 call $~lib/runtime/__gc_mark_members end @@ -3267,7 +3155,7 @@ local.set $5 local.get $5 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $5 call $~lib/runtime/__gc_mark_members end @@ -3330,7 +3218,7 @@ if local.get $5 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $5 call $~lib/runtime/__gc_mark_members end @@ -3394,7 +3282,7 @@ if local.get $5 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $5 call $~lib/runtime/__gc_mark_members end @@ -3405,7 +3293,7 @@ if local.get $5 call $~lib/collector/itcm/__ref_mark - i32.const 28 + i32.const 23 local.get $5 call $~lib/runtime/__gc_mark_members end @@ -3425,500 +3313,198 @@ (func $~lib/runtime/__gc_mark_members (; 102 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $invalid - block $runtime/flags/Ref - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array + block $~lib/runtime/Root + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/array/Array + block $~lib/array/Array + block $runtime/flags/Ref + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array block $~lib/string/String - block $~lib/array/Array - local.get $0 - br_table $invalid $~lib/array/Array $~lib/string/String $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $runtime/flags/Ref $invalid - end - local.get $1 - call $~lib/array/Array#__traverse - return - end - return - end - local.get $1 - call $~lib/array/Array#__traverse - return - end - local.get $1 - call $~lib/array/Array#__traverse - return - end - local.get $1 - call $~lib/array/Array#__traverse - return - end - local.get $1 - call $~lib/array/Array#__traverse - return - end - local.get $1 - call $~lib/array/Array#__traverse - return - end - local.get $1 - call $~lib/array/Array#__traverse - return - end - local.get $1 - call $~lib/set/Set#__traverse - return - end - local.get $1 - call $~lib/set/Set#__traverse - return - end - local.get $1 - call $~lib/set/Set#__traverse - return - end - local.get $1 - call $~lib/set/Set#__traverse - return - end - local.get $1 - call $~lib/set/Set#__traverse - return - end - local.get $1 - call $~lib/set/Set#__traverse - return - end - local.get $1 - call $~lib/set/Set#__traverse - return - end - local.get $1 - call $~lib/map/Map#__traverse - return - end - local.get $1 - call $~lib/map/Map#__traverse - return - end - local.get $1 - call $~lib/map/Map#__traverse - return - end - local.get $1 - call $~lib/map/Map#__traverse - return - end - local.get $1 - call $~lib/map/Map#__traverse - return - end - local.get $1 - call $~lib/map/Map#__traverse - return - end - local.get $1 - call $~lib/map/Map#__traverse - return - end - local.get $1 - call $~lib/map/Map#__traverse - return - end - local.get $1 - call $~lib/map/Map#__traverse - return - end - local.get $1 - call $~lib/map/Map#__traverse - return - end - return - end - return - end - return - end - unreachable - ) - (func $~lib/runtime/__runtime_instanceof (; 103 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - block $nope - block $~lib/arraybuffer/ArrayBufferView - block $runtime/flags/Ref - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/string/String - block $~lib/array/Array - local.get $0 - br_table $nope $~lib/array/Array $~lib/string/String $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $runtime/flags/Ref $~lib/arraybuffer/ArrayBufferView $nope + block $~lib/arraybuffer/ArrayBuffer + block $~lib/arraybuffer/ArrayBufferView + block $~lib/vector/V128 + block $~lib/number/F64 + block $~lib/number/F32 + block $~lib/number/Bool + block $~lib/number/Usize + block $~lib/number/U64 + block $~lib/number/U32 + block $~lib/number/U16 + block $~lib/number/U8 + block $~lib/number/Isize + block $~lib/number/I64 + block $~lib/number/I32 + block $~lib/number/I16 + block $~lib/number/I8 + local.get $0 + br_table $invalid $~lib/number/I8 $~lib/number/I16 $~lib/number/I32 $~lib/number/I64 $~lib/number/Isize $~lib/number/U8 $~lib/number/U16 $~lib/number/U32 $~lib/number/U64 $~lib/number/Usize $~lib/number/Bool $~lib/number/F32 $~lib/number/F64 $~lib/vector/V128 $~lib/arraybuffer/ArrayBufferView $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $runtime/flags/Ref $~lib/array/Array $~lib/array/Array $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/runtime/Root $invalid + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return end local.get $1 - i32.const 1 - i32.eq - local.get $1 - i32.const 29 - i32.eq - i32.or + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 16 + local.get $2 + call $~lib/runtime/__gc_mark_members + end return end - local.get $1 - i32.const 2 - i32.eq return end - local.get $1 - i32.const 3 - i32.eq - local.get $1 - i32.const 29 - i32.eq - i32.or return end local.get $1 - i32.const 4 - i32.eq - local.get $1 - i32.const 29 - i32.eq - i32.or + call $~lib/array/Array#__traverse return end local.get $1 - i32.const 5 - i32.eq - local.get $1 - i32.const 29 - i32.eq - i32.or + call $~lib/array/Array#__traverse return end local.get $1 - i32.const 6 - i32.eq - local.get $1 - i32.const 29 - i32.eq - i32.or + call $~lib/array/Array#__traverse return end local.get $1 - i32.const 7 - i32.eq - local.get $1 - i32.const 29 - i32.eq - i32.or + call $~lib/array/Array#__traverse return end local.get $1 - i32.const 8 - i32.eq - local.get $1 - i32.const 29 - i32.eq - i32.or + call $~lib/array/Array#__traverse return end - local.get $1 - i32.const 9 - i32.eq return end local.get $1 - i32.const 10 - i32.eq + call $~lib/array/Array#__traverse return end local.get $1 - i32.const 11 - i32.eq + call $~lib/array/Array#__traverse return end local.get $1 - i32.const 12 - i32.eq + call $~lib/set/Set#__traverse return end local.get $1 - i32.const 13 - i32.eq + call $~lib/set/Set#__traverse return end local.get $1 - i32.const 14 - i32.eq + call $~lib/set/Set#__traverse return end local.get $1 - i32.const 15 - i32.eq + call $~lib/set/Set#__traverse return end local.get $1 - i32.const 16 - i32.eq + call $~lib/set/Set#__traverse return end local.get $1 - i32.const 17 - i32.eq + call $~lib/set/Set#__traverse return end local.get $1 - i32.const 18 - i32.eq + call $~lib/set/Set#__traverse return end local.get $1 - i32.const 19 - i32.eq + call $~lib/map/Map#__traverse return end local.get $1 - i32.const 20 - i32.eq + call $~lib/map/Map#__traverse return end local.get $1 - i32.const 21 - i32.eq + call $~lib/map/Map#__traverse return end local.get $1 - i32.const 22 - i32.eq + call $~lib/map/Map#__traverse return end local.get $1 - i32.const 23 - i32.eq + call $~lib/map/Map#__traverse return end local.get $1 - i32.const 24 - i32.eq + call $~lib/map/Map#__traverse return end local.get $1 - i32.const 25 - i32.eq + call $~lib/map/Map#__traverse return end local.get $1 - i32.const 26 - i32.eq + call $~lib/map/Map#__traverse return end local.get $1 - i32.const 27 - i32.eq + call $~lib/map/Map#__traverse return end local.get $1 - i32.const 28 - i32.eq + call $~lib/map/Map#__traverse return end - local.get $1 - i32.const 29 - i32.eq - return - end - i32.const 0 - return - ) - (func $~lib/runtime/__runtime_flags (; 104 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - block $invalid - block $~lib/arraybuffer/ArrayBufferView - block $runtime/flags/Ref - block $~lib/runtime/Root - block $~lib/arraybuffer/ArrayBuffer - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/string/String - block $~lib/array/Array - local.get $0 - br_table $invalid $~lib/array/Array $~lib/string/String $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/arraybuffer/ArrayBuffer $~lib/runtime/Root $runtime/flags/Ref $~lib/arraybuffer/ArrayBufferView $invalid - end - i32.const 9 - return - end - i32.const 0 - return - end - i32.const 17 - return - end - i32.const 33 - return - end - i32.const 65 - return - end - i32.const 129 - return - end - i32.const 545 - return - end - i32.const 801 - return - end - i32.const 10 - return - end - i32.const 18 - return - end - i32.const 34 - return - end - i32.const 66 - return - end - i32.const 130 - return - end - i32.const 546 - return - end - i32.const 802 - return - end - i32.const 16396 - return - end - i32.const 8212 - return - end - i32.const 4132 - return - end - i32.const 2116 - return - end - i32.const 1156 - return - end - i32.const 69644 - return - end - i32.const 102412 - return - end - i32.const 1572 - return - end - i32.const 1828 - return - end - i32.const 103204 - return - end - i32.const 0 - return - end - i32.const 0 - return - end - i32.const 0 - return - end - i32.const 0 return end unreachable ) - (func $null (; 105 ;) (type $FUNCSIG$v) - ) - (func $~lib/runtime/runtime.newArray|trampoline (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 3 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 0 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/runtime/runtime.newArray - ) - (func $~lib/setargc (; 107 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.set $~lib/argc + (func $null (; 103 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/runtime/instanceof.optimized.wat b/tests/compiler/runtime/instanceof.optimized.wat index acaa34bd5a..04530e3643 100644 --- a/tests/compiler/runtime/instanceof.optimized.wat +++ b/tests/compiler/runtime/instanceof.optimized.wat @@ -1,24 +1,38 @@ (module - (type $FUNCSIG$viiii (func (param i32 i32 i32 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$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00*") - (data (i32.const 24) "r\00u\00n\00t\00i\00m\00e\00/\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s") - (data (i32.const 72) "\02\00\00\00(") - (data (i32.const 88) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 128) "\02\00\00\00\16") - (data (i32.const 144) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00\16") + (data (i32.const 80) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 104) "\10\00\00\00*") + (data (i32.const 120) "r\00u\00n\00t\00i\00m\00e\00/\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s") + (data (i32.const 168) "\10\00\00\00\0e") + (data (i32.const 184) "g\00c\00.\00l\00i\00n\00k") + (data (i32.const 200) "\10\00\00\00\12") + (data (i32.const 216) "g\00c\00.\00u\00n\00l\00i\00n\00k") + (data (i32.const 240) "\10\00\00\00\14") + (data (i32.const 256) "g\00c\00.\00c\00o\00l\00l\00e\00c\00t") + (data (i32.const 280) "\15") + (data (i32.const 428) "\11\00\00\00\00\00\00\00\12\00\00\00!\00\00\00\0e") + (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_count (mut i32) (i32.const 0)) + (global $gc/_dummy/link_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_parentRef (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_count (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_parentRef (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 $runtime/instanceof/animal (mut i32) (i32.const 0)) @@ -31,10 +45,19 @@ (global $runtime/instanceof/nullCat (mut i32) (i32.const 0)) (global $runtime/instanceof/nullBlackcat (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $runtime/instanceof/main)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -98,28 +121,35 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/util/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - i32.const 16 + (func $~lib/util/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl call $~lib/allocator/arena/__mem_allocate - local.tee $0 + local.tee $1 i32.const -1520547049 i32.store + local.get $1 local.get $0 - i32.const 0 i32.store offset=4 - local.get $0 + local.get $1 i32.const 0 i32.store offset=8 - local.get $0 + local.get $1 i32.const 0 i32.store offset=12 - local.get $0 + local.get $1 i32.const 16 i32.add ) (func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 144 + i32.const 80 i32.const 1 local.get $0 f64.convert_i32_u @@ -127,7 +157,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/_dummy/register_count i32.const 1 i32.add @@ -138,14 +168,14 @@ (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 168 + i32.const 456 i32.le_u if i32.const 0 - i32.const 88 - i32.const 128 + i32.const 24 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -157,10 +187,10 @@ i32.ne if i32.const 0 - i32.const 88 - i32.const 130 + i32.const 24 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -175,8 +205,9 @@ if (result i32) local.get $0 else + i32.const 0 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register end ) @@ -185,114 +216,58 @@ if (result i32) local.get $0 else + i32.const 0 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register end call $runtime/instanceof/Animal#constructor ) (func $runtime/instanceof/BlackCat#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) + i32.const 0 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 19 call $~lib/util/runtime/register call $runtime/instanceof/Cat#constructor ) - (func $start:runtime/instanceof (; 9 ;) (type $FUNCSIG$v) - (local $0 i32) - i32.const 1 - i32.const 1 - call $~lib/runtime/__runtime_instanceof - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 8 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 3 - i32.const 1 - call $~lib/runtime/__runtime_instanceof - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 15 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 4 - i32.const 1 - call $~lib/runtime/__runtime_instanceof - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 22 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 3 - i32.const 3 - call $~lib/runtime/__runtime_instanceof - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 29 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 4 - i32.const 3 - call $~lib/runtime/__runtime_instanceof - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 36 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 1 - i32.const 3 - call $~lib/runtime/__runtime_instanceof - if - i32.const 0 - i32.const 24 - i32.const 43 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 1 - i32.const 4 - call $~lib/runtime/__runtime_instanceof - if - i32.const 0 - i32.const 24 - i32.const 50 - i32.const 0 - call $~lib/env/abort - unreachable + (func $~lib/runtime/runtime.instanceof (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 280 + i32.load + i32.le_u + else + local.get $0 end - i32.const 3 - i32.const 4 - call $~lib/runtime/__runtime_instanceof if - i32.const 0 - i32.const 24 - i32.const 57 - i32.const 0 - call $~lib/env/abort - unreachable + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 280 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end end - i32.const 168 + i32.const 0 + ) + (func $start:runtime/instanceof (; 10 ;) (type $FUNCSIG$v) + (local $0 i32) + i32.const 456 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -308,123 +283,105 @@ local.tee $0 if (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 3 - call $~lib/runtime/__runtime_instanceof + i32.const 18 + call $~lib/runtime/runtime.instanceof else i32.const 0 end if i32.const 0 - i32.const 24 - i32.const 69 + i32.const 120 + i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/animal local.tee $0 if (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 4 - call $~lib/runtime/__runtime_instanceof + i32.const 19 + call $~lib/runtime/runtime.instanceof else i32.const 0 end if i32.const 0 - i32.const 24 - i32.const 70 + i32.const 120 + i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/cat local.tee $0 if (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 3 - call $~lib/runtime/__runtime_instanceof + i32.const 18 + call $~lib/runtime/runtime.instanceof else i32.const 0 end i32.eqz if i32.const 0 - i32.const 24 - i32.const 73 + i32.const 120 + i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/cat local.tee $0 if (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 4 - call $~lib/runtime/__runtime_instanceof + i32.const 19 + call $~lib/runtime/runtime.instanceof else i32.const 0 end if i32.const 0 - i32.const 24 - i32.const 74 + i32.const 120 + i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/blackcat local.tee $0 if (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 3 - call $~lib/runtime/__runtime_instanceof + i32.const 18 + call $~lib/runtime/runtime.instanceof else i32.const 0 end i32.eqz if i32.const 0 - i32.const 24 - i32.const 77 + i32.const 120 + i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/blackcat local.tee $0 if (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 4 - call $~lib/runtime/__runtime_instanceof + i32.const 19 + call $~lib/runtime/runtime.instanceof else i32.const 0 end i32.eqz if i32.const 0 - i32.const 24 - i32.const 78 + i32.const 120 + i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -439,358 +396,502 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 84 + i32.const 120 + i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullableAnimal local.tee $0 if (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 3 - call $~lib/runtime/__runtime_instanceof + i32.const 18 + call $~lib/runtime/runtime.instanceof else i32.const 0 end if i32.const 0 - i32.const 24 - i32.const 85 + i32.const 120 + i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullableAnimal local.tee $0 if (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 4 - call $~lib/runtime/__runtime_instanceof + i32.const 19 + call $~lib/runtime/runtime.instanceof else i32.const 0 end if i32.const 0 - i32.const 24 - i32.const 86 + i32.const 120 + i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullableCat i32.eqz if i32.const 0 - i32.const 24 - i32.const 88 + i32.const 120 + i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullableCat local.tee $0 if (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 3 - call $~lib/runtime/__runtime_instanceof + i32.const 18 + call $~lib/runtime/runtime.instanceof else i32.const 0 end i32.eqz if i32.const 0 - i32.const 24 - i32.const 89 + i32.const 120 + i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullableCat local.tee $0 if (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 4 - call $~lib/runtime/__runtime_instanceof + i32.const 19 + call $~lib/runtime/runtime.instanceof else i32.const 0 end if i32.const 0 - i32.const 24 - i32.const 90 + i32.const 120 + i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullableBlackcat i32.eqz if i32.const 0 - i32.const 24 - i32.const 92 + i32.const 120 + i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullableBlackcat local.tee $0 if (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 3 - call $~lib/runtime/__runtime_instanceof + i32.const 18 + call $~lib/runtime/runtime.instanceof else i32.const 0 end i32.eqz if i32.const 0 - i32.const 24 - i32.const 93 + i32.const 120 + i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullableBlackcat local.tee $0 if (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 4 - call $~lib/runtime/__runtime_instanceof + i32.const 19 + call $~lib/runtime/runtime.instanceof else i32.const 0 end i32.eqz if i32.const 0 - i32.const 24 - i32.const 94 + i32.const 120 + i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullAnimal if i32.const 0 - i32.const 24 - i32.const 100 + i32.const 120 + i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullAnimal local.tee $0 if (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 3 - call $~lib/runtime/__runtime_instanceof + i32.const 18 + call $~lib/runtime/runtime.instanceof else i32.const 0 end if i32.const 0 - i32.const 24 - i32.const 101 + i32.const 120 + i32.const 45 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullAnimal local.tee $0 if (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 4 - call $~lib/runtime/__runtime_instanceof + i32.const 19 + call $~lib/runtime/runtime.instanceof else i32.const 0 end if i32.const 0 - i32.const 24 - i32.const 102 + i32.const 120 + i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullCat if i32.const 0 - i32.const 24 - i32.const 104 + i32.const 120 + i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullCat local.tee $0 if (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 3 - call $~lib/runtime/__runtime_instanceof + i32.const 18 + call $~lib/runtime/runtime.instanceof else i32.const 0 end if i32.const 0 - i32.const 24 - i32.const 105 + i32.const 120 + i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullCat local.tee $0 if (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 4 - call $~lib/runtime/__runtime_instanceof + i32.const 19 + call $~lib/runtime/runtime.instanceof else i32.const 0 end if i32.const 0 - i32.const 24 - i32.const 106 + i32.const 120 + i32.const 50 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullBlackcat if i32.const 0 - i32.const 24 - i32.const 108 + i32.const 120 + i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullBlackcat local.tee $0 if (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 3 - call $~lib/runtime/__runtime_instanceof + i32.const 18 + call $~lib/runtime/runtime.instanceof else i32.const 0 end if i32.const 0 - i32.const 24 - i32.const 109 + i32.const 120 + i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullBlackcat local.tee $0 if (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 4 - call $~lib/runtime/__runtime_instanceof + i32.const 19 + call $~lib/runtime/runtime.instanceof else i32.const 0 end if i32.const 0 - i32.const 24 - i32.const 110 + i32.const 120 + i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/instanceof/main (; 10 ;) (type $FUNCSIG$v) + (func $runtime/instanceof/main (; 11 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if call $start:runtime/instanceof + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 21 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT i32.const 1 global.set $~lib/started end ) - (func $~lib/runtime/__runtime_instanceof (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - block $nope - block $runtime/instanceof/BlackCat - block $runtime/instanceof/Cat - block $~lib/string/String - block $runtime/instanceof/Animal - local.get $0 - i32.const 1 - i32.sub - br_table $runtime/instanceof/Animal $~lib/string/String $runtime/instanceof/Cat $runtime/instanceof/BlackCat $nope - end - local.get $1 - i32.const 1 - i32.eq - return + (func $~lib/runtime/runtime.flags (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + local.tee $1 + i32.eqz + if + local.get $0 + i32.const 280 + i32.load + i32.gt_u + local.set $1 + end + local.get $1 + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 280 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $gc/_dummy/__ref_link (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 184 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/link_count + i32.const 1 + i32.add + global.set $gc/_dummy/link_count + local.get $0 + global.set $gc/_dummy/link_ref + local.get $0 + global.set $gc/_dummy/link_parentRef + ) + (func $gc/_dummy/__ref_unlink (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 216 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/unlink_count + i32.const 1 + i32.add + global.set $gc/_dummy/unlink_count + local.get $0 + global.set $gc/_dummy/unlink_ref + local.get $1 + global.set $gc/_dummy/unlink_parentRef + ) + (func $~lib/runtime/runtime.newArray (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + local.tee $3 + i32.eqz + local.tee $0 + if (result i32) + local.get $0 + else + local.get $3 + i32.const 280 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $3 + i32.const 3 + i32.shl + i32.const 280 + i32.add + i32.load + end + local.tee $0 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $6 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $4 + local.get $3 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $2 + local.set $5 + local.get $2 + i32.load + local.tee $3 + local.get $1 + i32.ne + if + local.get $3 + if + local.get $3 + local.get $5 + call $gc/_dummy/__ref_unlink + end + local.get $1 + local.get $5 + call $gc/_dummy/__ref_link + end + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $4 + i32.store offset=8 + local.get $2 + local.get $4 + local.get $6 + i32.shr_u + i32.store offset=12 + local.get $0 + i32.const 512 + i32.and + if + local.get $1 + local.get $4 + i32.add + local.set $4 + loop $continue|0 + local.get $1 + local.get $4 + i32.lt_u + if + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + local.get $2 + call $gc/_dummy/__ref_link end local.get $1 - i32.const 2 - i32.eq - return + i32.const 4 + i32.add + local.set $1 + br $continue|0 end - local.get $1 - i32.const 3 - i32.eq - local.get $1 - i32.const 1 - i32.eq - i32.or - return end - local.get $1 - i32.const 4 - i32.eq - local.get $1 - i32.const 3 - i32.eq - i32.or - local.get $1 - i32.const 1 - i32.eq - i32.or - return end + local.get $2 + ) + (func $~lib/runtime/runtime.retain (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $gc/_dummy/__ref_link + ) + (func $~lib/runtime/runtime.release (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $gc/_dummy/__ref_unlink + ) + (func $~lib/runtime/runtime.collect (; 21 ;) (type $FUNCSIG$v) + i32.const 256 i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/collect_count + i32.const 1 + i32.add + global.set $gc/_dummy/collect_count ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 22 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/runtime/instanceof.ts b/tests/compiler/runtime/instanceof.ts index bb367bc494..9c66214116 100644 --- a/tests/compiler/runtime/instanceof.ts +++ b/tests/compiler/runtime/instanceof.ts @@ -1,66 +1,10 @@ -import { __runtime_id, __runtime_instanceof } from "runtime"; +import { __runtime_id } from "runtime"; import "../gc/_dummy"; class Animal {} class Cat extends Animal {} class BlackCat extends Cat {} -assert( // Animal is an Animal - __runtime_instanceof( - __runtime_id(), - __runtime_id() - ) -); - -assert( // Cat is an Animal - __runtime_instanceof( - __runtime_id(), - __runtime_id() - ) -); - -assert( // BlackCat is an Animal - __runtime_instanceof( - __runtime_id(), - __runtime_id() - ) -); - -assert( // Cat is a Cat - __runtime_instanceof( - __runtime_id(), - __runtime_id() - ) -); - -assert( // BlackCat is a Cat - __runtime_instanceof( - __runtime_id(), - __runtime_id() - ) -); - -assert(! // Animal isn't necessarily a Cat - __runtime_instanceof( - __runtime_id(), - __runtime_id() - ) -); - -assert(! // Animal isn't necessarily a BlackCat - __runtime_instanceof( - __runtime_id(), - __runtime_id() - ) -); - -assert(! // Cat isn't necessarily a BlackCat - __runtime_instanceof( - __runtime_id(), - __runtime_id() - ) -); - var animal: Animal = new Animal(); var cat: Animal = new Cat(); var blackcat: Animal = new BlackCat(); diff --git a/tests/compiler/runtime/instanceof.untouched.wat b/tests/compiler/runtime/instanceof.untouched.wat index 66eb33f473..9d88ccdb2e 100644 --- a/tests/compiler/runtime/instanceof.untouched.wat +++ b/tests/compiler/runtime/instanceof.untouched.wat @@ -1,16 +1,21 @@ (module - (type $FUNCSIG$viiii (func (param i32 i32 i32 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$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$vii (func (param i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00*\00\00\00\00\00\00\00\00\00\00\00r\00u\00n\00t\00i\00m\00e\00/\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s\00") - (data (i32.const 72) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 128) "\02\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 104) "\10\00\00\00*\00\00\00\00\00\00\00\00\00\00\00r\00u\00n\00t\00i\00m\00e\00/\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s\00") + (data (i32.const 168) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00l\00i\00n\00k\00") + (data (i32.const 200) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00u\00n\00l\00i\00n\00k\00") + (data (i32.const 240) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00c\00o\00l\00l\00e\00c\00t\00") + (data (i32.const 280) "\15\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\00\00\00\00\12\00\00\00!\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) @@ -39,11 +44,21 @@ (global $runtime/instanceof/nullCat (mut i32) (i32.const 0)) (global $runtime/instanceof/nullBlackcat (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 168)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 280)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 456)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $runtime/instanceof/main)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -164,7 +179,7 @@ i32.add ) (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 144 + i32.const 80 i32.const 1 local.get $0 f64.convert_i32_u @@ -172,7 +187,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace global.get $gc/_dummy/register_count i32.const 1 i32.add @@ -188,10 +203,10 @@ i32.eqz if i32.const 0 - i32.const 88 - i32.const 128 + i32.const 24 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -205,10 +220,10 @@ i32.eqz if i32.const 0 - i32.const 88 - i32.const 130 + i32.const 24 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -224,7 +239,7 @@ if i32.const 0 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.set $0 end @@ -236,7 +251,7 @@ if i32.const 0 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register local.set $0 end @@ -251,7 +266,7 @@ if i32.const 0 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 19 call $~lib/util/runtime/register local.set $0 end @@ -260,107 +275,48 @@ local.set $0 local.get $0 ) - (func $start:runtime/instanceof (; 11 ;) (type $FUNCSIG$v) - (local $0 i32) - i32.const 1 - i32.const 1 - call $~lib/runtime/__runtime_instanceof - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 8 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 3 - i32.const 1 - call $~lib/runtime/__runtime_instanceof - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 15 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 4 - i32.const 1 - call $~lib/runtime/__runtime_instanceof - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 22 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 3 - i32.const 3 - call $~lib/runtime/__runtime_instanceof - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 29 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 4 - i32.const 3 - call $~lib/runtime/__runtime_instanceof - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 36 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 1 - i32.const 3 - call $~lib/runtime/__runtime_instanceof - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 43 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 1 - i32.const 4 - call $~lib/runtime/__runtime_instanceof - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 50 - i32.const 0 - call $~lib/env/abort - unreachable + (func $~lib/runtime/runtime.instanceof (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + local.get $2 end - i32.const 3 - i32.const 4 - call $~lib/runtime/__runtime_instanceof - i32.eqz - i32.eqz if - i32.const 0 - i32.const 24 - i32.const 57 - i32.const 0 - call $~lib/env/abort - unreachable + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end end + i32.const 0 + ) + (func $start:runtime/instanceof (; 12 ;) (type $FUNCSIG$v) + (local $0 i32) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -388,10 +344,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 68 + i32.const 120 + i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/animal @@ -401,20 +357,17 @@ i32.const 0 else local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 3 - call $~lib/runtime/__runtime_instanceof + i32.const 18 + call $~lib/runtime/runtime.instanceof end i32.eqz i32.eqz if i32.const 0 - i32.const 24 - i32.const 69 + i32.const 120 + i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/animal @@ -424,20 +377,17 @@ i32.const 0 else local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 4 - call $~lib/runtime/__runtime_instanceof + i32.const 19 + call $~lib/runtime/runtime.instanceof end i32.eqz i32.eqz if i32.const 0 - i32.const 24 - i32.const 70 + i32.const 120 + i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -448,10 +398,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 72 + i32.const 120 + i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/cat @@ -461,19 +411,16 @@ i32.const 0 else local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 3 - call $~lib/runtime/__runtime_instanceof + i32.const 18 + call $~lib/runtime/runtime.instanceof end i32.eqz if i32.const 0 - i32.const 24 - i32.const 73 + i32.const 120 + i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/cat @@ -483,20 +430,17 @@ i32.const 0 else local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 4 - call $~lib/runtime/__runtime_instanceof + i32.const 19 + call $~lib/runtime/runtime.instanceof end i32.eqz i32.eqz if i32.const 0 - i32.const 24 - i32.const 74 + i32.const 120 + i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -507,10 +451,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 76 + i32.const 120 + i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/blackcat @@ -520,19 +464,16 @@ i32.const 0 else local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 3 - call $~lib/runtime/__runtime_instanceof + i32.const 18 + call $~lib/runtime/runtime.instanceof end i32.eqz if i32.const 0 - i32.const 24 - i32.const 77 + i32.const 120 + i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/blackcat @@ -542,19 +483,16 @@ i32.const 0 else local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 4 - call $~lib/runtime/__runtime_instanceof + i32.const 19 + call $~lib/runtime/runtime.instanceof end i32.eqz if i32.const 0 - i32.const 24 - i32.const 78 + i32.const 120 + i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -572,10 +510,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 84 + i32.const 120 + i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullableAnimal @@ -585,20 +523,17 @@ i32.const 0 else local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 3 - call $~lib/runtime/__runtime_instanceof + i32.const 18 + call $~lib/runtime/runtime.instanceof end i32.eqz i32.eqz if i32.const 0 - i32.const 24 - i32.const 85 + i32.const 120 + i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullableAnimal @@ -608,20 +543,17 @@ i32.const 0 else local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 4 - call $~lib/runtime/__runtime_instanceof + i32.const 19 + call $~lib/runtime/runtime.instanceof end i32.eqz i32.eqz if i32.const 0 - i32.const 24 - i32.const 86 + i32.const 120 + i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullableCat @@ -630,10 +562,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 88 + i32.const 120 + i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullableCat @@ -643,19 +575,16 @@ i32.const 0 else local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 3 - call $~lib/runtime/__runtime_instanceof + i32.const 18 + call $~lib/runtime/runtime.instanceof end i32.eqz if i32.const 0 - i32.const 24 - i32.const 89 + i32.const 120 + i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullableCat @@ -665,20 +594,17 @@ i32.const 0 else local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 4 - call $~lib/runtime/__runtime_instanceof + i32.const 19 + call $~lib/runtime/runtime.instanceof end i32.eqz i32.eqz if i32.const 0 - i32.const 24 - i32.const 90 + i32.const 120 + i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullableBlackcat @@ -687,10 +613,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 92 + i32.const 120 + i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullableBlackcat @@ -700,19 +626,16 @@ i32.const 0 else local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 3 - call $~lib/runtime/__runtime_instanceof + i32.const 18 + call $~lib/runtime/runtime.instanceof end i32.eqz if i32.const 0 - i32.const 24 - i32.const 93 + i32.const 120 + i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullableBlackcat @@ -722,19 +645,16 @@ i32.const 0 else local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 4 - call $~lib/runtime/__runtime_instanceof + i32.const 19 + call $~lib/runtime/runtime.instanceof end i32.eqz if i32.const 0 - i32.const 24 - i32.const 94 + i32.const 120 + i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullAnimal @@ -744,10 +664,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 100 + i32.const 120 + i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullAnimal @@ -757,20 +677,17 @@ i32.const 0 else local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 3 - call $~lib/runtime/__runtime_instanceof + i32.const 18 + call $~lib/runtime/runtime.instanceof end i32.eqz i32.eqz if i32.const 0 - i32.const 24 - i32.const 101 + i32.const 120 + i32.const 45 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullAnimal @@ -780,20 +697,17 @@ i32.const 0 else local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 4 - call $~lib/runtime/__runtime_instanceof + i32.const 19 + call $~lib/runtime/runtime.instanceof end i32.eqz i32.eqz if i32.const 0 - i32.const 24 - i32.const 102 + i32.const 120 + i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullCat @@ -803,10 +717,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 104 + i32.const 120 + i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullCat @@ -816,20 +730,17 @@ i32.const 0 else local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 3 - call $~lib/runtime/__runtime_instanceof + i32.const 18 + call $~lib/runtime/runtime.instanceof end i32.eqz i32.eqz if i32.const 0 - i32.const 24 - i32.const 105 + i32.const 120 + i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullCat @@ -839,20 +750,17 @@ i32.const 0 else local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 4 - call $~lib/runtime/__runtime_instanceof + i32.const 19 + call $~lib/runtime/runtime.instanceof end i32.eqz i32.eqz if i32.const 0 - i32.const 24 - i32.const 106 + i32.const 120 + i32.const 50 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullBlackcat @@ -862,10 +770,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 108 + i32.const 120 + i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullBlackcat @@ -875,20 +783,17 @@ i32.const 0 else local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 3 - call $~lib/runtime/__runtime_instanceof + i32.const 18 + call $~lib/runtime/runtime.instanceof end i32.eqz i32.eqz if i32.const 0 - i32.const 24 - i32.const 109 + i32.const 120 + i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $runtime/instanceof/nullBlackcat @@ -898,24 +803,21 @@ i32.const 0 else local.get $0 - i32.const 16 - i32.sub - i32.load - i32.const 4 - call $~lib/runtime/__runtime_instanceof + i32.const 19 + call $~lib/runtime/runtime.instanceof end i32.eqz i32.eqz if i32.const 0 - i32.const 24 - i32.const 110 + i32.const 120 + i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $runtime/instanceof/main (; 12 ;) (type $FUNCSIG$v) + (func $runtime/instanceof/main (; 13 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -924,53 +826,250 @@ global.set $~lib/started end ) - (func $start (; 13 ;) (type $FUNCSIG$v) - call $start:runtime/instanceof + (func $~lib/runtime/runtime.flags (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $gc/_dummy/__ref_link (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 184 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/link_count + i32.const 1 + i32.add + global.set $gc/_dummy/link_count + local.get $0 + global.set $gc/_dummy/link_ref + local.get $0 + global.set $gc/_dummy/link_parentRef ) - (func $~lib/runtime/__runtime_instanceof (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - block $nope - block $runtime/instanceof/BlackCat - block $runtime/instanceof/Cat - block $~lib/string/String - block $runtime/instanceof/Animal - local.get $0 - br_table $nope $runtime/instanceof/Animal $~lib/string/String $runtime/instanceof/Cat $runtime/instanceof/BlackCat $nope + (func $gc/_dummy/__ref_unlink (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 216 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/unlink_count + i32.const 1 + i32.add + global.set $gc/_dummy/unlink_count + local.get $0 + global.set $gc/_dummy/unlink_ref + local.get $1 + global.set $gc/_dummy/unlink_parentRef + ) + (func $~lib/runtime/runtime.newArray (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.tee $6 + local.get $1 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + local.get $8 + if + local.get $8 + local.get $6 + call $gc/_dummy/__ref_unlink + end + local.get $7 + local.get $6 + call $gc/_dummy/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 512 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $gc/_dummy/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 end - local.get $1 - i32.const 1 - i32.eq - return + br $continue|0 end - local.get $1 - i32.const 2 - i32.eq - return end - local.get $1 - i32.const 3 - i32.eq - local.get $1 - i32.const 1 - i32.eq - i32.or - return end - local.get $1 - i32.const 4 - i32.eq - local.get $1 - i32.const 3 - i32.eq - i32.or - local.get $1 - i32.const 1 - i32.eq - i32.or - return end + local.get $5 + ) + (func $~lib/runtime/Root#constructor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 21 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $gc/_dummy/__ref_link + ) + (func $~lib/runtime/runtime.release (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $gc/_dummy/__ref_unlink + ) + (func $gc/_dummy/__ref_collect (; 25 ;) (type $FUNCSIG$v) + i32.const 256 i32.const 0 - return + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/collect_count + i32.const 1 + i32.add + global.set $gc/_dummy/collect_count + ) + (func $~lib/runtime/runtime.collect (; 26 ;) (type $FUNCSIG$v) + call $gc/_dummy/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 28 ;) (type $FUNCSIG$v) + call $start:runtime/instanceof + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT ) - (func $null (; 15 ;) (type $FUNCSIG$v) + (func $null (; 29 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/scoped.optimized.wat b/tests/compiler/scoped.optimized.wat index 393c758087..e340413096 100644 --- a/tests/compiler/scoped.optimized.wat +++ b/tests/compiler/scoped.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:scoped (; 0 ;) (type $FUNCSIG$v) (local $0 i32) diff --git a/tests/compiler/scoped.untouched.wat b/tests/compiler/scoped.untouched.wat index eb15d593b2..f6f37e3def 100644 --- a/tests/compiler/scoped.untouched.wat +++ b/tests/compiler/scoped.untouched.wat @@ -7,9 +7,7 @@ (global $scoped/aGlobal (mut i32) (i32.const 1)) (global $scoped/aConstant i32 (i32.const 3)) (global $scoped/aStartFunctionLocal (mut i32) (i32.const 2)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $scoped/fn (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) diff --git a/tests/compiler/simd.optimized.wat b/tests/compiler/simd.optimized.wat index 73244308c4..93b7e87c8e 100644 --- a/tests/compiler/simd.optimized.wat +++ b/tests/compiler/simd.optimized.wat @@ -1,11 +1,8 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\0e\00\00\00s\00i\00m\00d\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $start) + (data (i32.const 8) "\11\00\00\00\0e\00\00\00s\00i\00m\00d\00.\00t\00s") (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/simd.untouched.wat b/tests/compiler/simd.untouched.wat index 3c29449b12..8077a4753e 100644 --- a/tests/compiler/simd.untouched.wat +++ b/tests/compiler/simd.untouched.wat @@ -1,15 +1,13 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\0e\00\00\00s\00i\00m\00d\00.\00t\00s\00") + (data (i32.const 8) "\11\00\00\00\0e\00\00\00s\00i\00m\00d\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/ASC_FEATURE_SIMD i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $simd/test_v128 (; 1 ;) (type $FUNCSIG$v) v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d @@ -24,7 +22,7 @@ i32.const 16 i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d @@ -39,7 +37,7 @@ i32.const 16 i32.const 10 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d @@ -56,7 +54,7 @@ i32.const 16 i32.const 16 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d @@ -73,7 +71,7 @@ i32.const 16 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d @@ -90,7 +88,7 @@ i32.const 16 i32.const 30 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d @@ -106,7 +104,7 @@ i32.const 16 i32.const 37 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d @@ -124,7 +122,7 @@ i32.const 16 i32.const 43 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -150,7 +148,7 @@ i32.const 16 i32.const 60 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -168,7 +166,7 @@ i32.const 16 i32.const 62 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -187,7 +185,7 @@ i32.const 16 i32.const 64 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -204,7 +202,7 @@ i32.const 16 i32.const 65 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -221,7 +219,7 @@ i32.const 16 i32.const 66 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -237,7 +235,7 @@ i32.const 16 i32.const 67 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -254,7 +252,7 @@ i32.const 16 i32.const 72 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -271,7 +269,7 @@ i32.const 16 i32.const 73 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -286,7 +284,7 @@ i32.const 16 i32.const 74 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -303,7 +301,7 @@ i32.const 16 i32.const 75 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -320,7 +318,7 @@ i32.const 16 i32.const 80 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x7f7f7f7e 0x7f7f7f7f 0x7f7f7f7f 0x7f7f7f7f @@ -339,7 +337,7 @@ i32.const 16 i32.const 85 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0xfffffffe 0xffffffff 0xffffffff 0xffffffff @@ -358,7 +356,7 @@ i32.const 16 i32.const 91 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x80808081 0x80808080 0x80808080 0x80808080 @@ -377,7 +375,7 @@ i32.const 16 i32.const 97 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x00000001 0x00000000 0x00000000 0x00000000 @@ -396,7 +394,7 @@ i32.const 16 i32.const 103 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -415,7 +413,7 @@ i32.const 16 i32.const 109 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -2 @@ -434,7 +432,7 @@ i32.const 16 i32.const 110 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 @@ -453,7 +451,7 @@ i32.const 16 i32.const 111 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x00000001 0x00000000 0x00000000 0x00000000 @@ -468,7 +466,7 @@ i32.const 16 i32.const 112 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -484,7 +482,7 @@ i32.const 16 i32.const 113 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -516,7 +514,7 @@ i32.const 16 i32.const 118 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -533,7 +531,7 @@ i32.const 16 i32.const 119 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -550,7 +548,7 @@ i32.const 16 i32.const 120 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -567,7 +565,7 @@ i32.const 16 i32.const 121 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -584,7 +582,7 @@ i32.const 16 i32.const 122 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -601,7 +599,7 @@ i32.const 16 i32.const 123 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -618,7 +616,7 @@ i32.const 16 i32.const 124 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -635,7 +633,7 @@ i32.const 16 i32.const 125 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -652,7 +650,7 @@ i32.const 16 i32.const 126 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -669,7 +667,7 @@ i32.const 16 i32.const 127 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -695,7 +693,7 @@ i32.const 16 i32.const 132 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -713,7 +711,7 @@ i32.const 16 i32.const 134 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -732,7 +730,7 @@ i32.const 16 i32.const 136 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -749,7 +747,7 @@ i32.const 16 i32.const 137 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -766,7 +764,7 @@ i32.const 16 i32.const 138 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -782,7 +780,7 @@ i32.const 16 i32.const 139 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -799,7 +797,7 @@ i32.const 16 i32.const 144 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -816,7 +814,7 @@ i32.const 16 i32.const 145 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -831,7 +829,7 @@ i32.const 16 i32.const 146 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -848,7 +846,7 @@ i32.const 16 i32.const 147 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -865,7 +863,7 @@ i32.const 16 i32.const 152 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x7fff7ffe 0x7fff7fff 0x7fff7fff 0x7fff7fff @@ -884,7 +882,7 @@ i32.const 16 i32.const 157 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0xfffffffe 0xffffffff 0xffffffff 0xffffffff @@ -903,7 +901,7 @@ i32.const 16 i32.const 163 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x80008001 0x80008000 0x80008000 0x80008000 @@ -922,7 +920,7 @@ i32.const 16 i32.const 169 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x00000001 0x00000000 0x00000000 0x00000000 @@ -941,7 +939,7 @@ i32.const 16 i32.const 175 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -960,7 +958,7 @@ i32.const 16 i32.const 181 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -2 @@ -979,7 +977,7 @@ i32.const 16 i32.const 182 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 @@ -998,7 +996,7 @@ i32.const 16 i32.const 183 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x00000001 0x00000000 0x00000000 0x00000000 @@ -1013,7 +1011,7 @@ i32.const 16 i32.const 184 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1029,7 +1027,7 @@ i32.const 16 i32.const 185 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1061,7 +1059,7 @@ i32.const 16 i32.const 190 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1078,7 +1076,7 @@ i32.const 16 i32.const 191 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1095,7 +1093,7 @@ i32.const 16 i32.const 192 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1112,7 +1110,7 @@ i32.const 16 i32.const 193 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1129,7 +1127,7 @@ i32.const 16 i32.const 194 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1146,7 +1144,7 @@ i32.const 16 i32.const 195 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1163,7 +1161,7 @@ i32.const 16 i32.const 196 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1180,7 +1178,7 @@ i32.const 16 i32.const 197 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1197,7 +1195,7 @@ i32.const 16 i32.const 198 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1214,7 +1212,7 @@ i32.const 16 i32.const 199 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -1240,7 +1238,7 @@ i32.const 16 i32.const 204 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1258,7 +1256,7 @@ i32.const 16 i32.const 206 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1277,7 +1275,7 @@ i32.const 16 i32.const 208 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1294,7 +1292,7 @@ i32.const 16 i32.const 209 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1311,7 +1309,7 @@ i32.const 16 i32.const 210 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1327,7 +1325,7 @@ i32.const 16 i32.const 211 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1340,7 +1338,7 @@ i32.const 16 i32.const 216 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1353,7 +1351,7 @@ i32.const 16 i32.const 217 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1370,7 +1368,7 @@ i32.const 16 i32.const 218 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1387,7 +1385,7 @@ i32.const 16 i32.const 223 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1406,7 +1404,7 @@ i32.const 16 i32.const 228 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -2 @@ -1425,7 +1423,7 @@ i32.const 16 i32.const 229 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 @@ -1444,7 +1442,7 @@ i32.const 16 i32.const 230 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x00000001 0x00000000 0x00000000 0x00000000 @@ -1459,7 +1457,7 @@ i32.const 16 i32.const 231 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1475,7 +1473,7 @@ i32.const 16 i32.const 232 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1507,7 +1505,7 @@ i32.const 16 i32.const 237 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1524,7 +1522,7 @@ i32.const 16 i32.const 238 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1541,7 +1539,7 @@ i32.const 16 i32.const 239 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1558,7 +1556,7 @@ i32.const 16 i32.const 240 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1575,7 +1573,7 @@ i32.const 16 i32.const 241 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1592,7 +1590,7 @@ i32.const 16 i32.const 242 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1609,7 +1607,7 @@ i32.const 16 i32.const 243 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1626,7 +1624,7 @@ i32.const 16 i32.const 244 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1643,7 +1641,7 @@ i32.const 16 i32.const 245 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1660,7 +1658,7 @@ i32.const 16 i32.const 246 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -1678,7 +1676,7 @@ i32.const 16 i32.const 247 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -1696,7 +1694,7 @@ i32.const 16 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -1718,7 +1716,7 @@ i32.const 16 i32.const 261 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -1736,7 +1734,7 @@ i32.const 16 i32.const 263 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1755,7 +1753,7 @@ i32.const 16 i32.const 265 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1772,7 +1770,7 @@ i32.const 16 i32.const 266 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1788,7 +1786,7 @@ i32.const 16 i32.const 267 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1801,7 +1799,7 @@ i32.const 16 i32.const 272 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1814,7 +1812,7 @@ i32.const 16 i32.const 273 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1831,7 +1829,7 @@ i32.const 16 i32.const 274 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1848,7 +1846,7 @@ i32.const 16 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -1867,7 +1865,7 @@ i32.const 16 i32.const 284 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -2 @@ -1886,7 +1884,7 @@ i32.const 16 i32.const 285 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -1905,7 +1903,7 @@ i32.const 16 i32.const 286 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x00000001 0x00000000 0x00000000 0x00000000 @@ -1920,7 +1918,7 @@ i32.const 16 i32.const 287 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -1936,7 +1934,7 @@ i32.const 16 i32.const 288 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -1954,7 +1952,7 @@ i32.const 16 i32.const 289 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -1972,7 +1970,7 @@ i32.const 16 i32.const 294 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -1999,7 +1997,7 @@ i32.const 16 i32.const 303 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -2017,7 +2015,7 @@ i32.const 16 i32.const 305 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2036,7 +2034,7 @@ i32.const 16 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2053,7 +2051,7 @@ i32.const 16 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2070,7 +2068,7 @@ i32.const 16 i32.const 309 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2091,7 +2089,7 @@ i32.const 16 i32.const 311 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -2108,7 +2106,7 @@ i32.const 16 i32.const 312 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2124,7 +2122,7 @@ i32.const 16 i32.const 313 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2137,7 +2135,7 @@ i32.const 16 i32.const 314 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2150,7 +2148,7 @@ i32.const 16 i32.const 315 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2167,7 +2165,7 @@ i32.const 16 i32.const 316 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2184,7 +2182,7 @@ i32.const 16 i32.const 321 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -2215,7 +2213,7 @@ i32.const 16 i32.const 330 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2232,7 +2230,7 @@ i32.const 16 i32.const 331 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2249,7 +2247,7 @@ i32.const 16 i32.const 332 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -2266,7 +2264,7 @@ i32.const 16 i32.const 333 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -2283,7 +2281,7 @@ i32.const 16 i32.const 334 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2300,7 +2298,7 @@ i32.const 16 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2317,7 +2315,7 @@ i32.const 16 i32.const 336 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2334,7 +2332,7 @@ i32.const 16 i32.const 337 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2350,7 +2348,7 @@ i32.const 16 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x40800000 0x41100000 0x41800000 0x41c80000 @@ -2366,7 +2364,7 @@ i32.const 16 i32.const 339 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 @@ -2384,7 +2382,7 @@ i32.const 16 i32.const 340 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 @@ -2402,7 +2400,7 @@ i32.const 16 i32.const 345 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -2429,7 +2427,7 @@ i32.const 16 i32.const 354 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -2447,7 +2445,7 @@ i32.const 16 i32.const 356 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2466,7 +2464,7 @@ i32.const 16 i32.const 358 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2483,7 +2481,7 @@ i32.const 16 i32.const 359 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2500,7 +2498,7 @@ i32.const 16 i32.const 360 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2521,7 +2519,7 @@ i32.const 16 i32.const 362 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -2538,7 +2536,7 @@ i32.const 16 i32.const 363 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2554,7 +2552,7 @@ i32.const 16 i32.const 364 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2567,7 +2565,7 @@ i32.const 16 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2580,7 +2578,7 @@ i32.const 16 i32.const 366 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2597,7 +2595,7 @@ i32.const 16 i32.const 367 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2614,7 +2612,7 @@ i32.const 16 i32.const 372 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -2645,7 +2643,7 @@ i32.const 16 i32.const 381 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2662,7 +2660,7 @@ i32.const 16 i32.const 382 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2679,7 +2677,7 @@ i32.const 16 i32.const 383 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -2696,7 +2694,7 @@ i32.const 16 i32.const 384 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -2713,7 +2711,7 @@ i32.const 16 i32.const 385 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2730,7 +2728,7 @@ i32.const 16 i32.const 386 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2747,7 +2745,7 @@ i32.const 16 i32.const 387 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2764,7 +2762,7 @@ i32.const 16 i32.const 388 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2780,7 +2778,7 @@ i32.const 16 i32.const 389 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x00000000 0x40100000 0x00000000 0x40220000 @@ -2796,7 +2794,7 @@ i32.const 16 i32.const 390 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -2814,7 +2812,7 @@ i32.const 16 i32.const 391 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -2832,7 +2830,7 @@ i32.const 16 i32.const 396 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -2857,7 +2855,7 @@ i32.const 16 i32.const 406 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/static-this.optimized.wat b/tests/compiler/static-this.optimized.wat index 2fa32220a5..638e79d9a3 100644 --- a/tests/compiler/static-this.optimized.wat +++ b/tests/compiler/static-this.optimized.wat @@ -1,14 +1,11 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1c\00\00\00s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\1c\00\00\00s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s") (global $static-this/Foo.bar (mut i32) (i32.const 42)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start (; 1 ;) (type $FUNCSIG$v) global.get $static-this/Foo.bar @@ -19,7 +16,7 @@ i32.const 16 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/static-this.untouched.wat b/tests/compiler/static-this.untouched.wat index 6d01a76079..3bec403b85 100644 --- a/tests/compiler/static-this.untouched.wat +++ b/tests/compiler/static-this.untouched.wat @@ -2,15 +2,13 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1c\00\00\00s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1c\00\00\00s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $static-this/Foo.bar (mut i32) (i32.const 42)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $static-this/Foo.getBar (; 1 ;) (type $FUNCSIG$i) (result i32) global.get $static-this/Foo.bar @@ -25,7 +23,7 @@ i32.const 16 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/std/allocator_arena.optimized.wat b/tests/compiler/std/allocator_arena.optimized.wat index 027358323e..b9b6f52c56 100644 --- a/tests/compiler/std/allocator_arena.optimized.wat +++ b/tests/compiler/std/allocator_arena.optimized.wat @@ -4,18 +4,15 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00,\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00,\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/allocator_arena/ptr1 (mut i32) (i32.const 0)) (global $std/allocator_arena/ptr2 (mut i32) (i32.const 0)) (global $std/allocator_arena/i (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) @@ -455,7 +452,7 @@ i32.const 16 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/allocator_arena/ptr1 @@ -478,7 +475,7 @@ i32.const 16 i32.const 12 i32.const 27 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else global.get $std/allocator_arena/i @@ -511,7 +508,7 @@ i32.const 16 i32.const 16 i32.const 27 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else global.get $std/allocator_arena/i @@ -580,7 +577,7 @@ i32.const 16 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/allocator/arena/startOffset @@ -595,7 +592,7 @@ i32.const 16 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/std/allocator_arena.untouched.wat b/tests/compiler/std/allocator_arena.untouched.wat index f8b3ac262e..01e4682282 100644 --- a/tests/compiler/std/allocator_arena.untouched.wat +++ b/tests/compiler/std/allocator_arena.untouched.wat @@ -4,9 +4,9 @@ (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00,\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00,\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/allocator_arena/size i32 (i32.const 42)) @@ -17,7 +17,6 @@ (global $std/allocator_arena/i (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 60)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -616,7 +615,7 @@ i32.const 16 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/allocator_arena/ptr1 @@ -644,7 +643,7 @@ i32.const 16 i32.const 12 i32.const 27 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/allocator_arena/i @@ -681,7 +680,7 @@ i32.const 16 i32.const 16 i32.const 27 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/allocator_arena/i @@ -768,7 +767,7 @@ i32.const 16 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/allocator_arena/ptr1 @@ -794,7 +793,7 @@ i32.const 16 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index cbeb13b2e2..6097dddb37 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -4,16 +4,13 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (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/builtins/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") - (data (i32.const 48) "\01") - (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) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 48) "\10") + (data (i32.const 56) "\10\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 96) "\10\00\00\00\08\00\00\00n\00u\00l\00l") (export "memory" (memory $0)) - (export "table" (table $0)) (export "i32ArrayArrayElementAccess" (func $std/array-access/i32ArrayArrayElementAccess)) (export "stringArrayPropertyAccess" (func $std/array-access/stringArrayPropertyAccess)) (export "stringArrayMethodCall" (func $std/array-access/stringArrayMethodCall)) @@ -29,7 +26,7 @@ i32.const 16 i32.const 96 i32.const 45 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -43,7 +40,7 @@ i32.const 16 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -66,7 +63,7 @@ i32.const 16 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -144,7 +141,7 @@ i32.const 64 i32.const 178 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 52 diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 73edcecb4a..4a617a670b 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -5,18 +5,16 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/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") - (data (i32.const 48) "\01\00\00\00\00\00\00\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") + (data (i32.const 8) "\10\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 48) "\10\00\00\00\00\00\00\00") + (data (i32.const 56) "\10\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) "\10\00\00\00\08\00\00\00n\00u\00l\00l\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 112)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "i32ArrayArrayElementAccess" (func $std/array-access/i32ArrayArrayElementAccess)) (export "stringArrayPropertyAccess" (func $std/array-access/stringArrayPropertyAccess)) (export "stringArrayMethodCall" (func $std/array-access/stringArrayMethodCall)) @@ -41,7 +39,7 @@ i32.const 16 i32.const 96 i32.const 45 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -55,7 +53,7 @@ i32.const 16 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -83,7 +81,7 @@ i32.const 16 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -116,7 +114,7 @@ i32.const 16 i32.const 96 i32.const 45 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -130,7 +128,7 @@ i32.const 16 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -220,7 +218,7 @@ i32.const 64 i32.const 178 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -298,7 +296,7 @@ i32.const 16 i32.const 96 i32.const 45 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -312,7 +310,7 @@ i32.const 16 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 2d41c866a4..c9c8deed7d 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -2,29 +2,32 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\03") + (data (i32.const 8) "\0f\00\00\00\03") (data (i32.const 25) "\01\02") - (data (i32.const 32) "\02\00\00\00\10") + (data (i32.const 32) "\11\00\00\00\10") (data (i32.const 48) "\18\00\00\00\18\00\00\00\03\00\00\00\03") - (data (i32.const 64) "\03\00\00\00(") + (data (i32.const 64) "\10\00\00\00(") (data (i32.const 80) "s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") - (data (i32.const 120) "\03\00\00\00\1a") + (data (i32.const 120) "\10\00\00\00\1a") (data (i32.const 136) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 168) "\01\00\00\00\0c") + (data (i32.const 168) "\0f\00\00\00\0c") (data (i32.const 188) "\01\00\00\00\02") - (data (i32.const 200) "\04\00\00\00\10") + (data (i32.const 200) "\12\00\00\00\10") (data (i32.const 216) "\b8\00\00\00\b8\00\00\00\0c\00\00\00\03") - (data (i32.const 232) "\01") - (data (i32.const 248) "\04\00\00\00\10") + (data (i32.const 232) "\0f") + (data (i32.const 248) "\12\00\00\00\10") (data (i32.const 264) "\f8\00\00\00\f8") - (data (i32.const 280) "\03\00\00\00(") + (data (i32.const 280) "\10\00\00\00(") (data (i32.const 296) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 336) "\17") + (data (i32.const 472) "\t\00\00\00\0e\00\00\00!\00\00\00\0e") + (data (i32.const 496) "!\02\00\00\0e") + (data (i32.const 512) "!\02\00\00\0e") (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 264)) (global $std/array-literal/i (mut i32) (i32.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -33,9 +36,18 @@ (global $std/array-literal/dynamicArrayI32 (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 $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/array/Array#__get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -48,7 +60,7 @@ i32.const 136 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -69,7 +81,7 @@ i32.const 136 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -172,14 +184,14 @@ (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 336 + i32.const 528 i32.le_u if i32.const 0 i32.const 296 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -192,9 +204,9 @@ if i32.const 0 i32.const 296 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -202,7 +214,7 @@ i32.store local.get $0 ) - (func $~lib/runtime/runtime.newArray (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/makeArray (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 16 @@ -215,7 +227,7 @@ i32.shl local.tee $0 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 15 call $~lib/util/runtime/register local.tee $2 local.tee $3 @@ -240,13 +252,13 @@ (func $std/array-literal/Ref#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/util/runtime/allocate - i32.const 5 + i32.const 19 call $~lib/util/runtime/register ) (func $std/array-literal/RefWithCtor#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/util/runtime/allocate - i32.const 7 + i32.const 21 call $~lib/util/runtime/register ) (func $start:std/array-literal (; 9 ;) (type $FUNCSIG$v) @@ -262,7 +274,7 @@ i32.const 80 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 48 @@ -273,7 +285,7 @@ i32.const 80 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 48 @@ -286,7 +298,7 @@ i32.const 80 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 48 @@ -299,7 +311,7 @@ i32.const 80 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 228 @@ -311,7 +323,7 @@ i32.const 80 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 216 @@ -322,7 +334,7 @@ i32.const 80 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 216 @@ -335,7 +347,7 @@ i32.const 80 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 216 @@ -348,7 +360,7 @@ i32.const 80 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/emptyArrayI32 @@ -358,16 +370,16 @@ i32.const 80 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 336 + i32.const 528 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 0 - i32.const 2 - call $~lib/runtime/runtime.newArray + i32.const 17 + call $~lib/util/runtime/makeArray local.tee $2 i32.load offset=4 local.tee $0 @@ -401,7 +413,7 @@ i32.const 80 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/dynamicArrayI8 @@ -412,7 +424,7 @@ i32.const 80 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/dynamicArrayI8 @@ -425,7 +437,7 @@ i32.const 80 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/dynamicArrayI8 @@ -438,14 +450,14 @@ i32.const 80 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 global.set $std/array-literal/i i32.const 2 - i32.const 4 - call $~lib/runtime/runtime.newArray + i32.const 18 + call $~lib/util/runtime/makeArray local.tee $2 i32.load offset=4 local.tee $0 @@ -479,7 +491,7 @@ i32.const 80 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/dynamicArrayI32 @@ -490,7 +502,7 @@ i32.const 80 i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/dynamicArrayI32 @@ -503,7 +515,7 @@ i32.const 80 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/dynamicArrayI32 @@ -516,12 +528,12 @@ i32.const 80 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 - i32.const 6 - call $~lib/runtime/runtime.newArray + i32.const 20 + call $~lib/util/runtime/makeArray local.tee $2 i32.load offset=4 local.tee $0 @@ -544,12 +556,12 @@ i32.const 80 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 - i32.const 8 - call $~lib/runtime/runtime.newArray + i32.const 22 + call $~lib/util/runtime/makeArray local.tee $2 i32.load offset=4 local.tee $0 @@ -572,14 +584,191 @@ i32.const 80 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start (; 10 ;) (type $FUNCSIG$v) - call $start:std/array-literal + (func $~lib/runtime/runtime.instanceof (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 336 + i32.load + i32.le_u + else + local.get $0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 336 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + local.tee $1 + i32.eqz + if + local.get $0 + i32.const 336 + i32.load + i32.gt_u + local.set $1 + end + local.get $1 + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 336 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.tee $2 + i32.eqz + local.tee $0 + if (result i32) + local.get $0 + else + local.get $2 + i32.const 336 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $2 + i32.const 3 + i32.shl + i32.const 336 + i32.add + i32.load + end + local.tee $0 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $3 + local.get $2 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $2 + i32.load + drop + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $3 + i32.store offset=8 + local.get $2 + local.get $3 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $0 + i32.const 512 + i32.and + if + local.get $1 + local.get $3 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load + drop + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $2 ) - (func $null (; 11 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.retain (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) + (func $~lib/runtime/runtime.collect (; 17 ;) (type $FUNCSIG$v) + nop + ) + (func $start (; 18 ;) (type $FUNCSIG$v) + call $start:std/array-literal + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 23 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT + ) ) diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index bb62bc711e..f5016a26c4 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -7,17 +7,18 @@ (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\01\02") - (data (i32.const 32) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\18\00\00\00\03\00\00\00\03\00\00\00") - (data (i32.const 64) "\03\00\00\00(\00\00\00\00\00\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 120) "\03\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 168) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 200) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\b8\00\00\00\b8\00\00\00\0c\00\00\00\03\00\00\00") - (data (i32.const 232) "\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 248) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\f8\00\00\00\f8\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 280) "\03\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\0f\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\01\02") + (data (i32.const 32) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\18\00\00\00\03\00\00\00\03\00\00\00") + (data (i32.const 64) "\10\00\00\00(\00\00\00\00\00\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 120) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 168) "\0f\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 200) "\12\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\b8\00\00\00\b8\00\00\00\0c\00\00\00\03\00\00\00") + (data (i32.const 232) "\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 248) "\12\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\f8\00\00\00\f8\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 280) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 336) "\17\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\0e\00\00\00!\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00!\02\00\00\0e\00\00\00\00\00\00\00\00\00\00\00!\02\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/array-literal/staticArrayI8 i32 (i32.const 48)) @@ -33,10 +34,20 @@ (global $std/array-literal/dynamicArrayI32 (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 $~lib/memory/HEAP_BASE i32 (i32.const 336)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 336)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 528)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/array/Array#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -64,7 +75,7 @@ i32.const 136 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -96,7 +107,7 @@ i32.const 136 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -233,9 +244,9 @@ if i32.const 0 i32.const 296 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -250,9 +261,9 @@ if i32.const 0 i32.const 296 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -477,7 +488,7 @@ end end ) - (func $~lib/runtime/runtime.newArray (; 16 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/runtime/makeArray (; 16 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -495,7 +506,7 @@ local.set $5 local.get $5 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 15 call $~lib/util/runtime/register local.set $6 local.get $4 @@ -545,7 +556,7 @@ if i32.const 0 call $~lib/util/runtime/allocate - i32.const 5 + i32.const 19 call $~lib/util/runtime/register local.set $0 end @@ -561,7 +572,7 @@ if i32.const 0 call $~lib/util/runtime/allocate - i32.const 7 + i32.const 21 call $~lib/util/runtime/register local.set $0 end @@ -585,7 +596,7 @@ i32.const 80 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/staticArrayI8 @@ -599,7 +610,7 @@ i32.const 80 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/staticArrayI8 @@ -613,7 +624,7 @@ i32.const 80 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/staticArrayI8 @@ -627,7 +638,7 @@ i32.const 80 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/staticArrayI32 @@ -640,7 +651,7 @@ i32.const 80 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/staticArrayI32 @@ -654,7 +665,7 @@ i32.const 80 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/staticArrayI32 @@ -668,7 +679,7 @@ i32.const 80 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/staticArrayI32 @@ -682,7 +693,7 @@ i32.const 80 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/emptyArrayI32 @@ -695,7 +706,7 @@ i32.const 80 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/memory/HEAP_BASE @@ -711,9 +722,9 @@ block (result i32) i32.const 3 i32.const 0 - i32.const 2 + i32.const 17 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.set $0 local.get $0 i32.load offset=4 @@ -754,7 +765,7 @@ i32.const 80 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/dynamicArrayI8 @@ -768,7 +779,7 @@ i32.const 80 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/dynamicArrayI8 @@ -782,7 +793,7 @@ i32.const 80 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/dynamicArrayI8 @@ -796,7 +807,7 @@ i32.const 80 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -804,9 +815,9 @@ block (result i32) i32.const 3 i32.const 2 - i32.const 4 + i32.const 18 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.set $1 local.get $1 i32.load offset=4 @@ -847,7 +858,7 @@ i32.const 80 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/dynamicArrayI32 @@ -861,7 +872,7 @@ i32.const 80 i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/dynamicArrayI32 @@ -875,7 +886,7 @@ i32.const 80 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/dynamicArrayI32 @@ -889,15 +900,15 @@ i32.const 80 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) i32.const 3 i32.const 2 - i32.const 6 + i32.const 20 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.set $0 local.get $0 i32.load offset=4 @@ -948,15 +959,15 @@ i32.const 80 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) i32.const 3 i32.const 2 - i32.const 8 + i32.const 22 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.set $1 local.get $1 i32.load offset=4 @@ -1007,13 +1018,243 @@ i32.const 80 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + local.get $2 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.tee $6 + local.get $1 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + local.get $8 + if + local.get $8 + local.get $6 + call $~lib/collector/dummy/__ref_unlink + end + local.get $7 + local.get $6 + call $~lib/collector/dummy/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 512 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $~lib/collector/dummy/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end end + local.get $5 ) - (func $start (; 22 ;) (type $FUNCSIG$v) + (func $~lib/runtime/Root#constructor (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 23 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_link + ) + (func $~lib/runtime/runtime.release (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_unlink + ) + (func $~lib/collector/dummy/__ref_collect (; 32 ;) (type $FUNCSIG$v) + nop + ) + (func $~lib/runtime/runtime.collect (; 33 ;) (type $FUNCSIG$v) + call $~lib/collector/dummy/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 35 ;) (type $FUNCSIG$v) call $start:std/array-literal + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT ) - (func $null (; 23 ;) (type $FUNCSIG$v) + (func $null (; 36 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index ca8e1841ec..9b175a7271 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -23,387 +23,392 @@ (type $FUNCSIG$iiij (func (param i32 i32 i64) (result i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00&") + (data (i32.const 8) "\10\00\00\00&") (data (i32.const 24) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 64) "\01\00\00\00(") + (data (i32.const 64) "\10\00\00\00(") (data (i32.const 80) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 120) "\01\00\00\00\06") + (data (i32.const 120) "\10\00\00\00\06") (data (i32.const 136) "a\00b\00c") - (data (i32.const 144) "\01\00\00\00\18") + (data (i32.const 144) "\10\00\00\00\18") (data (i32.const 160) "s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 184) "\02\00\00\00\05") + (data (i32.const 184) "\0f\00\00\00\05") (data (i32.const 200) "\01\02\03\04\05") - (data (i32.const 208) "\07\00\00\00\10") + (data (i32.const 208) "\14\00\00\00\10") (data (i32.const 224) "\c8\00\00\00\c8\00\00\00\05\00\00\00\05") - (data (i32.const 240) "\02\00\00\00\05") + (data (i32.const 240) "\0f\00\00\00\05") (data (i32.const 256) "\01\01\01\04\05") - (data (i32.const 264) "\01\00\00\00\1a") + (data (i32.const 264) "\10\00\00\00\1a") (data (i32.const 280) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 312) "\02\00\00\00\05") - (data (i32.const 336) "\02\00\00\00\05") + (data (i32.const 312) "\0f\00\00\00\05") + (data (i32.const 336) "\0f\00\00\00\05") (data (i32.const 352) "\01\01") - (data (i32.const 360) "\02\00\00\00\05") + (data (i32.const 360) "\0f\00\00\00\05") (data (i32.const 376) "\01\01\00\02\02") - (data (i32.const 384) "\02\00\00\00\05") + (data (i32.const 384) "\0f\00\00\00\05") (data (i32.const 400) "\01\01\00\02\02") - (data (i32.const 408) "\02\00\00\00\14") + (data (i32.const 408) "\0f\00\00\00\14") (data (i32.const 424) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 448) "\08\00\00\00\10") + (data (i32.const 448) "\15\00\00\00\10") (data (i32.const 464) "\a8\01\00\00\a8\01\00\00\14\00\00\00\05") - (data (i32.const 480) "\02\00\00\00\14") + (data (i32.const 480) "\0f\00\00\00\14") (data (i32.const 496) "\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") - (data (i32.const 520) "\02\00\00\00\14") - (data (i32.const 560) "\02\00\00\00\14") + (data (i32.const 520) "\0f\00\00\00\14") + (data (i32.const 560) "\0f\00\00\00\14") (data (i32.const 576) "\01\00\00\00\01") - (data (i32.const 600) "\02\00\00\00\14") + (data (i32.const 600) "\0f\00\00\00\14") (data (i32.const 616) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 640) "\02\00\00\00\14") + (data (i32.const 640) "\0f\00\00\00\14") (data (i32.const 656) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 680) "\02") - (data (i32.const 696) "\02") - (data (i32.const 712) "\04\00\00\00\10") + (data (i32.const 680) "\0f") + (data (i32.const 696) "\0f") + (data (i32.const 712) "\11\00\00\00\10") (data (i32.const 728) "\c8\02\00\00\c8\02") - (data (i32.const 744) "\02\00\00\00\14") + (data (i32.const 744) "\0f\00\00\00\14") (data (i32.const 760) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 784) "\02\00\00\00\14") + (data (i32.const 784) "\0f\00\00\00\14") (data (i32.const 800) "\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 824) "\02\00\00\00\14") + (data (i32.const 824) "\0f\00\00\00\14") (data (i32.const 840) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 864) "\02\00\00\00\14") + (data (i32.const 864) "\0f\00\00\00\14") (data (i32.const 880) "\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05") - (data (i32.const 904) "\02\00\00\00\14") + (data (i32.const 904) "\0f\00\00\00\14") (data (i32.const 920) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 944) "\02\00\00\00\14") + (data (i32.const 944) "\0f\00\00\00\14") (data (i32.const 960) "\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") - (data (i32.const 984) "\02\00\00\00\14") + (data (i32.const 984) "\0f\00\00\00\14") (data (i32.const 1000) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1024) "\02\00\00\00\14") + (data (i32.const 1024) "\0f\00\00\00\14") (data (i32.const 1040) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1064) "\02\00\00\00\14") + (data (i32.const 1064) "\0f\00\00\00\14") (data (i32.const 1080) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1104) "\02\00\00\00\14") + (data (i32.const 1104) "\0f\00\00\00\14") (data (i32.const 1120) "\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1144) "\02\00\00\00\14") + (data (i32.const 1144) "\0f\00\00\00\14") (data (i32.const 1160) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1184) "\02\00\00\00\14") + (data (i32.const 1184) "\0f\00\00\00\14") (data (i32.const 1200) "\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1224) "\02\00\00\00\14") + (data (i32.const 1224) "\0f\00\00\00\14") (data (i32.const 1240) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1264) "\02\00\00\00\14") + (data (i32.const 1264) "\0f\00\00\00\14") (data (i32.const 1280) "\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") - (data (i32.const 1304) "\02\00\00\00\14") + (data (i32.const 1304) "\0f\00\00\00\14") (data (i32.const 1320) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1344) "\02\00\00\00\14") + (data (i32.const 1344) "\0f\00\00\00\14") (data (i32.const 1360) "\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1384) "\02\00\00\00\14") + (data (i32.const 1384) "\0f\00\00\00\14") (data (i32.const 1400) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1424) "\02\00\00\00\14") + (data (i32.const 1424) "\0f\00\00\00\14") (data (i32.const 1440) "\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1464) "\02\00\00\00\14") + (data (i32.const 1464) "\0f\00\00\00\14") (data (i32.const 1480) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1504) "\02\00\00\00\14") + (data (i32.const 1504) "\0f\00\00\00\14") (data (i32.const 1520) "\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1544) "\02\00\00\00\14") + (data (i32.const 1544) "\0f\00\00\00\14") (data (i32.const 1560) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1584) "\02\00\00\00\14") + (data (i32.const 1584) "\0f\00\00\00\14") (data (i32.const 1600) "\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") - (data (i32.const 1624) "\02\00\00\00\14") + (data (i32.const 1624) "\0f\00\00\00\14") (data (i32.const 1640) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1664) "\02\00\00\00\14") + (data (i32.const 1664) "\0f\00\00\00\14") (data (i32.const 1680) "\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") - (data (i32.const 1704) "\02\00\00\00\14") + (data (i32.const 1704) "\0f\00\00\00\14") (data (i32.const 1720) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1744) "\04\00\00\00\10") + (data (i32.const 1744) "\11\00\00\00\10") (data (i32.const 1760) "\b8\06\00\00\b8\06\00\00\14\00\00\00\05") - (data (i32.const 1776) "\02\00\00\00\14") + (data (i32.const 1776) "\0f\00\00\00\14") (data (i32.const 1792) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1816) "\02") - (data (i32.const 1832) "\02\00\00\00\14") + (data (i32.const 1816) "\0f") + (data (i32.const 1832) "\0f\00\00\00\14") (data (i32.const 1848) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1872) "\02\00\00\00\0c") + (data (i32.const 1872) "\0f\00\00\00\0c") (data (i32.const 1888) "\03\00\00\00\04\00\00\00\05") - (data (i32.const 1904) "\02\00\00\00\08") + (data (i32.const 1904) "\0f\00\00\00\08") (data (i32.const 1920) "\01\00\00\00\02") - (data (i32.const 1928) "\02\00\00\00\14") + (data (i32.const 1928) "\0f\00\00\00\14") (data (i32.const 1944) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1968) "\02\00\00\00\08") + (data (i32.const 1968) "\0f\00\00\00\08") (data (i32.const 1984) "\03\00\00\00\04") - (data (i32.const 1992) "\02\00\00\00\0c") + (data (i32.const 1992) "\0f\00\00\00\0c") (data (i32.const 2008) "\01\00\00\00\02\00\00\00\05") - (data (i32.const 2024) "\02\00\00\00\14") + (data (i32.const 2024) "\0f\00\00\00\14") (data (i32.const 2040) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2064) "\02\00\00\00\04") + (data (i32.const 2064) "\0f\00\00\00\04") (data (i32.const 2080) "\01") - (data (i32.const 2088) "\02\00\00\00\10") + (data (i32.const 2088) "\0f\00\00\00\10") (data (i32.const 2104) "\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2120) "\02\00\00\00\14") + (data (i32.const 2120) "\0f\00\00\00\14") (data (i32.const 2136) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2160) "\02\00\00\00\04") + (data (i32.const 2160) "\0f\00\00\00\04") (data (i32.const 2176) "\05") - (data (i32.const 2184) "\02\00\00\00\10") + (data (i32.const 2184) "\0f\00\00\00\10") (data (i32.const 2200) "\01\00\00\00\02\00\00\00\03\00\00\00\04") - (data (i32.const 2216) "\02\00\00\00\14") + (data (i32.const 2216) "\0f\00\00\00\14") (data (i32.const 2232) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2256) "\02\00\00\00\08") + (data (i32.const 2256) "\0f\00\00\00\08") (data (i32.const 2272) "\04\00\00\00\05") - (data (i32.const 2280) "\02\00\00\00\0c") + (data (i32.const 2280) "\0f\00\00\00\0c") (data (i32.const 2296) "\01\00\00\00\02\00\00\00\03") - (data (i32.const 2312) "\02\00\00\00\14") + (data (i32.const 2312) "\0f\00\00\00\14") (data (i32.const 2328) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2352) "\02\00\00\00\04") + (data (i32.const 2352) "\0f\00\00\00\04") (data (i32.const 2368) "\04") - (data (i32.const 2376) "\02\00\00\00\10") + (data (i32.const 2376) "\0f\00\00\00\10") (data (i32.const 2392) "\01\00\00\00\02\00\00\00\03\00\00\00\05") - (data (i32.const 2408) "\02\00\00\00\14") + (data (i32.const 2408) "\0f\00\00\00\14") (data (i32.const 2424) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2448) "\02\00\00\00\04") + (data (i32.const 2448) "\0f\00\00\00\04") (data (i32.const 2464) "\01") - (data (i32.const 2472) "\02\00\00\00\10") + (data (i32.const 2472) "\0f\00\00\00\10") (data (i32.const 2488) "\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2504) "\02\00\00\00\14") + (data (i32.const 2504) "\0f\00\00\00\14") (data (i32.const 2520) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2544) "\02") - (data (i32.const 2560) "\02\00\00\00\14") + (data (i32.const 2544) "\0f") + (data (i32.const 2560) "\0f\00\00\00\14") (data (i32.const 2576) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2600) "\02\00\00\00\14") + (data (i32.const 2600) "\0f\00\00\00\14") (data (i32.const 2616) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2640) "\02") - (data (i32.const 2656) "\02\00\00\00\14") + (data (i32.const 2640) "\0f") + (data (i32.const 2656) "\0f\00\00\00\14") (data (i32.const 2672) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2696) "\02\00\00\00\14") + (data (i32.const 2696) "\0f\00\00\00\14") (data (i32.const 2712) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2736) "\02") - (data (i32.const 2752) "\02\00\00\00\14") + (data (i32.const 2736) "\0f") + (data (i32.const 2752) "\0f\00\00\00\14") (data (i32.const 2768) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2792) "\02\00\00\00\14") + (data (i32.const 2792) "\0f\00\00\00\14") (data (i32.const 2808) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2832) "\02") - (data (i32.const 2848) "\02\00\00\00\14") + (data (i32.const 2832) "\0f") + (data (i32.const 2848) "\0f\00\00\00\14") (data (i32.const 2864) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2888) "\02\00\00\00\14") + (data (i32.const 2888) "\0f\00\00\00\14") (data (i32.const 2904) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2928) "\02") - (data (i32.const 2944) "\02\00\00\00\14") + (data (i32.const 2928) "\0f") + (data (i32.const 2944) "\0f\00\00\00\14") (data (i32.const 2960) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2984) "\01\00\00\00\18") + (data (i32.const 2984) "\10\00\00\00\18") (data (i32.const 3000) "~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") - (data (i32.const 3024) "\01\00\00\00\ac") + (data (i32.const 3024) "\10\00\00\00\ac") (data (i32.const 3040) "A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?") - (data (i32.const 3216) "\02\00\00\00 ") + (data (i32.const 3216) "\0f\00\00\00 ") (data (i32.const 3234) "\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") - (data (i32.const 3264) "\t\00\00\00\10") + (data (i32.const 3264) "\16\00\00\00\10") (data (i32.const 3280) "\a0\0c\00\00\a0\0c\00\00 \00\00\00\08") - (data (i32.const 3296) "\02\00\00\00 ") + (data (i32.const 3296) "\0f\00\00\00 ") (data (i32.const 3314) "\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") - (data (i32.const 3344) "\02\00\00\00@") + (data (i32.const 3344) "\0f\00\00\00@") (data (i32.const 3366) "\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?") (data (i32.const 3406) "\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") - (data (i32.const 3424) "\n\00\00\00\10") + (data (i32.const 3424) "\17\00\00\00\10") (data (i32.const 3440) " \0d\00\00 \0d\00\00@\00\00\00\08") - (data (i32.const 3456) "\02\00\00\00@") + (data (i32.const 3456) "\0f\00\00\00@") (data (i32.const 3478) "\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf") (data (i32.const 3510) "\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") - (data (i32.const 3536) "\02\00\00\00\14") + (data (i32.const 3536) "\0f\00\00\00\14") (data (i32.const 3552) "\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02") - (data (i32.const 3576) "\04\00\00\00\10") + (data (i32.const 3576) "\11\00\00\00\10") (data (i32.const 3592) "\e0\0d\00\00\e0\0d\00\00\14\00\00\00\05") - (data (i32.const 3608) "\02\00\00\00\14") + (data (i32.const 3608) "\0f\00\00\00\14") (data (i32.const 3624) "\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02") - (data (i32.const 3648) "\02\00\00\00\14") + (data (i32.const 3648) "\0f\00\00\00\14") (data (i32.const 3664) "\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02") - (data (i32.const 3688) "\08\00\00\00\10") + (data (i32.const 3688) "\15\00\00\00\10") (data (i32.const 3704) "P\0e\00\00P\0e\00\00\14\00\00\00\05") - (data (i32.const 3720) "\02\00\00\00\14") + (data (i32.const 3720) "\0f\00\00\00\14") (data (i32.const 3740) "\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") - (data (i32.const 3760) "\02") - (data (i32.const 3776) "\04\00\00\00\10") + (data (i32.const 3760) "\0f") + (data (i32.const 3776) "\11\00\00\00\10") (data (i32.const 3792) "\c0\0e\00\00\c0\0e") - (data (i32.const 3808) "\02\00\00\00\04") + (data (i32.const 3808) "\0f\00\00\00\04") (data (i32.const 3824) "\01") - (data (i32.const 3832) "\04\00\00\00\10") + (data (i32.const 3832) "\11\00\00\00\10") (data (i32.const 3848) "\f0\0e\00\00\f0\0e\00\00\04\00\00\00\01") - (data (i32.const 3864) "\02\00\00\00\08") + (data (i32.const 3864) "\0f\00\00\00\08") (data (i32.const 3880) "\02\00\00\00\01") - (data (i32.const 3888) "\04\00\00\00\10") + (data (i32.const 3888) "\11\00\00\00\10") (data (i32.const 3904) "(\0f\00\00(\0f\00\00\08\00\00\00\02") - (data (i32.const 3920) "\02\00\00\00\10") + (data (i32.const 3920) "\0f\00\00\00\10") (data (i32.const 3936) "\03\00\00\00\02\00\00\00\01") - (data (i32.const 3952) "\04\00\00\00\10") + (data (i32.const 3952) "\11\00\00\00\10") (data (i32.const 3968) "`\0f\00\00`\0f\00\00\10\00\00\00\04") - (data (i32.const 3984) "\02\00\00\00\10") + (data (i32.const 3984) "\0f\00\00\00\10") (data (i32.const 4004) "\01\00\00\00\02\00\00\00\03") - (data (i32.const 4016) "\04\00\00\00\10") + (data (i32.const 4016) "\11\00\00\00\10") (data (i32.const 4032) "\a0\0f\00\00\a0\0f\00\00\10\00\00\00\04") - (data (i32.const 4048) "\02\00\00\00\04") + (data (i32.const 4048) "\0f\00\00\00\04") (data (i32.const 4064) "\01") - (data (i32.const 4072) "\02\00\00\00\08") + (data (i32.const 4072) "\0f\00\00\00\08") (data (i32.const 4088) "\01\00\00\00\02") - (data (i32.const 4096) "\01\00\00\00\02") + (data (i32.const 4096) "\10\00\00\00\02") (data (i32.const 4112) "a") - (data (i32.const 4120) "\01\00\00\00\02") + (data (i32.const 4120) "\10\00\00\00\02") (data (i32.const 4136) "b") - (data (i32.const 4144) "\01\00\00\00\04") + (data (i32.const 4144) "\10\00\00\00\04") (data (i32.const 4160) "a\00b") - (data (i32.const 4168) "\01\00\00\00\04") + (data (i32.const 4168) "\10\00\00\00\04") (data (i32.const 4184) "b\00a") - (data (i32.const 4192) "\01") - (data (i32.const 4208) "\02\00\00\00\1c") + (data (i32.const 4192) "\10") + (data (i32.const 4208) "\0f\00\00\00\1c") (data (i32.const 4224) "\10\10\00\00(\10\00\00\10\10\00\00@\10\00\00X\10\00\00p\10") - (data (i32.const 4256) "\0e\00\00\00\10") + (data (i32.const 4256) "\1b\00\00\00\10") (data (i32.const 4272) "\80\10\00\00\80\10\00\00\1c\00\00\00\07") - (data (i32.const 4288) "\02\00\00\00\1c") + (data (i32.const 4288) "\0f\00\00\00\1c") (data (i32.const 4304) "p\10\00\00\10\10\00\00\10\10\00\00@\10\00\00(\10\00\00X\10") - (data (i32.const 4336) "\0e\00\00\00\10") + (data (i32.const 4336) "\1b\00\00\00\10") (data (i32.const 4352) "\d0\10\00\00\d0\10\00\00\1c\00\00\00\07") - (data (i32.const 4368) "\01\00\00\00\1c") + (data (i32.const 4368) "\10\00\00\00\1c") (data (i32.const 4384) "~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 4416) "\01\00\00\00\08") + (data (i32.const 4416) "\10\00\00\00\08") (data (i32.const 4432) "n\00u\00l\00l") - (data (i32.const 4440) "\02\00\00\00\02") + (data (i32.const 4440) "\0f\00\00\00\02") (data (i32.const 4456) "\01") - (data (i32.const 4464) "\01\00\00\00\08") + (data (i32.const 4464) "\10\00\00\00\08") (data (i32.const 4480) "t\00r\00u\00e") - (data (i32.const 4488) "\01\00\00\00\n") + (data (i32.const 4488) "\10\00\00\00\n") (data (i32.const 4504) "f\00a\00l\00s\00e") - (data (i32.const 4520) "\01\00\00\00\02") + (data (i32.const 4520) "\10\00\00\00\02") (data (i32.const 4536) ",") - (data (i32.const 4544) "\02\00\00\00\02") + (data (i32.const 4544) "\0f\00\00\00\02") (data (i32.const 4560) "\01") - (data (i32.const 4568) "\01\00\00\00\14") + (data (i32.const 4568) "\10\00\00\00\14") (data (i32.const 4584) "t\00r\00u\00e\00,\00f\00a\00l\00s\00e") - (data (i32.const 4608) "\02\00\00\00\0c") + (data (i32.const 4608) "\0f\00\00\00\0c") (data (i32.const 4624) "\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 4640) "\01\00\00\00\02") + (data (i32.const 4640) "\10\00\00\00\02") (data (i32.const 4656) "0") - (data (i32.const 4664) "\02\00\00\00\90\01") + (data (i32.const 4664) "\0f\00\00\00\90\01") (data (i32.const 4680) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 5080) "\08\00\00\00\10") + (data (i32.const 5080) "\15\00\00\00\10") (data (i32.const 5096) "H\12\00\00H\12\00\00\90\01\00\00d") - (data (i32.const 5112) "\02\00\00\00\0c") + (data (i32.const 5112) "\0f\00\00\00\0c") (data (i32.const 5128) "\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 5144) "\01\00\00\00\n") + (data (i32.const 5144) "\10\00\00\00\n") (data (i32.const 5160) "1\00-\002\00-\003") - (data (i32.const 5176) "\02\00\00\00\0c") + (data (i32.const 5176) "\0f\00\00\00\0c") (data (i32.const 5192) "\01\00\00\00\02\00\00\00\03") - (data (i32.const 5208) "\01\00\00\00\02") + (data (i32.const 5208) "\10\00\00\00\02") (data (i32.const 5224) "-") - (data (i32.const 5232) "\02\00\00\00\0c") + (data (i32.const 5232) "\0f\00\00\00\0c") (data (i32.const 5248) "\01\00\00\00\02\00\00\00\03") - (data (i32.const 5264) "\02\00\00\00\08") + (data (i32.const 5264) "\0f\00\00\00\08") (data (i32.const 5283) "\80\00\00\00\80") - (data (i32.const 5288) "\01\00\00\00\04") + (data (i32.const 5288) "\10\00\00\00\04") (data (i32.const 5304) "_\00_") - (data (i32.const 5312) "\02\00\00\00\08") + (data (i32.const 5312) "\0f\00\00\00\08") (data (i32.const 5331) "\80\00\00\00\80") - (data (i32.const 5336) "\01\00\00\000") + (data (i32.const 5336) "\10\00\00\000") (data (i32.const 5352) "-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 5400) "\02\00\00\000") + (data (i32.const 5400) "\0f\00\00\000") (data (i32.const 5430) "\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") - (data (i32.const 5464) "\01\00\00\00\04") + (data (i32.const 5464) "\10\00\00\00\04") (data (i32.const 5480) ",\00 ") - (data (i32.const 5488) "\01\00\00\00\06") + (data (i32.const 5488) "\10\00\00\00\06") (data (i32.const 5504) "0\00.\000") - (data (i32.const 5512) "\01\00\00\00\06") + (data (i32.const 5512) "\10\00\00\00\06") (data (i32.const 5528) "N\00a\00N") - (data (i32.const 5536) "\01\00\00\00\12") + (data (i32.const 5536) "\10\00\00\00\12") (data (i32.const 5552) "-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 5576) "\01\00\00\00\10") + (data (i32.const 5576) "\10\00\00\00\10") (data (i32.const 5592) "I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 5608) "\02\00\00\00\b8\02") + (data (i32.const 5608) "\0f\00\00\00\b8\02") (data (i32.const 5624) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0) + (elem (i32.const 0) $~lib/runtime/runtime.collect $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|2 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|16 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) @@ -460,10 +465,19 @@ (global $std/array/subarr8 (mut i32) (i32.const 0)) (global $std/array/subarrU32 (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $std/array/main)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -782,14 +796,14 @@ (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 8068 + i32.const 8400 i32.le_u if i32.const 0 i32.const 80 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -802,9 +816,9 @@ if i32.const 0 i32.const 80 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -822,7 +836,7 @@ i32.const 24 i32.const 54 i32.const 43 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -832,7 +846,7 @@ local.get $0 call $~lib/memory/memory.fill local.get $1 - i32.const 2 + i32.const 15 call $~lib/util/runtime/register ) (func $~lib/arraybuffer/ArrayBufferView#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -846,7 +860,7 @@ i32.const 24 i32.const 12 i32.const 57 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -860,7 +874,7 @@ if i32.const 12 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 14 call $~lib/util/runtime/register local.set $0 end @@ -891,7 +905,7 @@ (local $0 i32) i32.const 16 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 17 call $~lib/util/runtime/register i32.const 0 i32.const 2 @@ -1140,7 +1154,7 @@ end end ) - (func $~lib/runtime/runtime.newArray (; 11 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/runtime/makeArray (; 11 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) i32.const 16 @@ -1153,7 +1167,7 @@ i32.shl local.tee $4 call $~lib/util/runtime/allocate - i32.const 2 + i32.const 15 call $~lib/util/runtime/register local.tee $1 local.set $5 @@ -1191,7 +1205,7 @@ i32.const 280 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1331,7 +1345,7 @@ i32.const 280 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1426,7 +1440,7 @@ i32.shl i32.const 0 local.get $0 - i32.const 8068 + i32.const 8400 i32.gt_u select local.get $3 @@ -1465,14 +1479,14 @@ i32.eq if local.get $0 - i32.const 8068 + i32.const 8400 i32.le_u if i32.const 0 i32.const 80 - i32.const 88 + i32.const 91 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1514,7 +1528,7 @@ i32.const 280 i32.const 14 i32.const 64 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1579,9 +1593,9 @@ if i32.const 0 i32.const 280 - i32.const 309 + i32.const 311 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1607,24 +1621,36 @@ (local $5 i32) local.get $0 i32.load offset=12 - local.tee $2 + local.tee $3 local.get $1 i32.load offset=12 i32.const 0 local.get $1 select - local.tee $3 + local.tee $4 i32.add + local.tee $2 + i32.const 268435452 + i32.gt_u + if + i32.const 0 + i32.const 280 + i32.const 236 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $2 i32.const 2 - i32.const 4 + i32.const 17 i32.const 0 - call $~lib/runtime/runtime.newArray - local.tee $4 + call $~lib/util/runtime/makeArray + local.tee $2 i32.load offset=4 local.tee $5 local.get $0 i32.load offset=4 - local.get $2 + local.get $3 i32.const 2 i32.shl local.tee $0 @@ -1634,11 +1660,11 @@ i32.add local.get $1 i32.load offset=4 - local.get $3 + local.get $4 i32.const 2 i32.shl call $~lib/memory/memory.copy - local.get $4 + local.get $2 ) (func $~lib/array/Array#copyWithin (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) @@ -1847,9 +1873,9 @@ if i32.const 0 i32.const 280 - i32.const 381 + i32.const 383 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2043,9 +2069,9 @@ select local.tee $2 i32.const 2 - i32.const 4 + i32.const 17 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.tee $4 i32.load offset=4 drop @@ -2514,7 +2540,7 @@ i32.const 160 i32.const 561 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2534,9 +2560,9 @@ i32.load offset=12 local.tee $3 i32.const 2 - i32.const 9 + i32.const 22 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.tee $4 i32.load offset=4 local.set $5 @@ -2593,7 +2619,7 @@ i32.const 280 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2624,9 +2650,9 @@ i32.load offset=12 local.tee $4 i32.const 2 - i32.const 4 + i32.const 17 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.load offset=4 local.set $5 loop $repeat|0 @@ -2698,9 +2724,9 @@ (local $5 i32) i32.const 0 i32.const 2 - i32.const 4 + i32.const 17 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.set $4 local.get $0 i32.load offset=12 @@ -2945,7 +2971,7 @@ i32.const 3000 i32.const 1021 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -3348,9 +3374,9 @@ if i32.const 0 i32.const 280 - i32.const 526 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3844,9 +3870,9 @@ if i32.const 0 i32.const 280 - i32.const 526 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3944,7 +3970,7 @@ i32.const 280 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4363,9 +4389,9 @@ if i32.const 0 i32.const 280 - i32.const 526 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4448,24 +4474,24 @@ i32.const 280 i32.const 44 i32.const 62 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - i32.const 4 + i32.const 17 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 i32.load offset=4 i32.const 0 local.get $0 i32.load offset=8 call $~lib/memory/memory.fill local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 ) (func $std/array/createReverseOrderedArray (; 91 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -4506,7 +4532,7 @@ i32.const 3000 i32.const 1030 i32.const 24 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/random_state0_64 @@ -4626,7 +4652,7 @@ i32.const 160 i32.const 813 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4644,19 +4670,19 @@ (local $0 i32) i32.const 512 i32.const 2 - i32.const 11 + i32.const 24 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 i32.load offset=4 i32.const 0 local.get $0 i32.load offset=8 call $~lib/memory/memory.fill local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 ) (func $~lib/array/Array<~lib/array/Array>#__set (; 99 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -4671,7 +4697,7 @@ i32.const 280 i32.const 111 i32.const 38 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4755,9 +4781,9 @@ if i32.const 0 i32.const 280 - i32.const 526 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4817,7 +4843,7 @@ i32.const 280 i32.const 96 i32.const 45 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4831,7 +4857,7 @@ i32.const 280 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4896,7 +4922,7 @@ i32.const 160 i32.const 813 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4904,19 +4930,19 @@ (local $0 i32) i32.const 512 i32.const 2 - i32.const 12 + i32.const 26 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 i32.load offset=4 i32.const 0 local.get $0 i32.load offset=8 call $~lib/memory/memory.fill local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 ) (func $std/array/createReverseOrderedElementsArray (; 107 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) @@ -4931,7 +4957,7 @@ if i32.const 4 call $~lib/util/runtime/allocate - i32.const 13 + i32.const 25 call $~lib/util/runtime/register local.tee $2 i32.const 511 @@ -5093,7 +5119,7 @@ i32.const 160 i32.const 813 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5194,19 +5220,19 @@ (local $0 i32) i32.const 400 i32.const 2 - i32.const 15 + i32.const 28 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 i32.load offset=4 i32.const 0 local.get $0 i32.load offset=8 call $~lib/memory/memory.fill local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 ) (func $~lib/string/String#charAt (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -5231,7 +5257,7 @@ i32.load16_u i32.store16 local.get $1 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/string/String#concat (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -5280,7 +5306,7 @@ local.get $4 call $~lib/memory/memory.copy local.get $2 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/string/String.__concat (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -5361,7 +5387,7 @@ i32.const 4384 i32.const 203 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -5443,19 +5469,19 @@ local.get $3 call $~lib/memory/memory.copy local.get $1 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/runtime/discard (; 121 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 8068 + i32.const 8400 i32.le_u if i32.const 0 i32.const 80 - i32.const 114 + i32.const 117 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5467,9 +5493,9 @@ if i32.const 0 i32.const 80 - i32.const 116 + i32.const 119 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5622,7 +5648,7 @@ return end local.get $2 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/number/decimalCount32 (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -5828,7 +5854,7 @@ i32.store16 end local.get $2 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/number/itoa_stream (; 126 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -5990,7 +6016,7 @@ return end local.get $2 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -6018,7 +6044,7 @@ local.get $1 call $~lib/util/number/utoa32_lut local.get $2 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/number/itoa_stream (; 130 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -6160,7 +6186,7 @@ return end local.get $2 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -7359,7 +7385,7 @@ return end local.get $1 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/array/Array<~lib/string/String>#join_str (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -7529,7 +7555,7 @@ call $~lib/memory/memory.copy end local.get $2 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/array/Array<~lib/string/String>#join (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -7540,7 +7566,7 @@ (func $std/array/Ref#constructor (; 141 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/util/runtime/allocate - i32.const 19 + i32.const 32 call $~lib/util/runtime/register ) (func $~lib/array/Array#join_ref (; 142 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -7673,7 +7699,7 @@ return end local.get $1 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/array/Array#toString (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -7845,7 +7871,7 @@ return end local.get $1 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/number/itoa_stream (; 146 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -7991,7 +8017,7 @@ return end local.get $1 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/number/decimalCount64 (; 148 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) @@ -8184,7 +8210,7 @@ call $~lib/util/number/utoa64_lut end local.get $2 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/number/itoa_stream (; 151 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) @@ -8340,7 +8366,7 @@ return end local.get $1 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/number/itoa64 (; 153 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) @@ -8405,7 +8431,7 @@ i32.store16 end local.get $3 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/number/itoa_stream (; 154 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) @@ -8584,7 +8610,7 @@ return end local.get $1 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/array/Array<~lib/string/String | null>#toString (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -8826,7 +8852,7 @@ return end local.get $1 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/array/Array<~lib/array/Array>#join_arr (; 160 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -9112,7 +9138,7 @@ (local $0 i32) (local $1 i32) (local $2 i32) - i32.const 8072 + i32.const 8400 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -9124,7 +9150,7 @@ i32.const 160 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9137,17 +9163,17 @@ i32.const 160 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 call $~lib/util/runtime/allocate - i32.const 5 + i32.const 18 call $~lib/util/runtime/register drop i32.const 12 call $~lib/util/runtime/allocate - i32.const 6 + i32.const 19 call $~lib/util/runtime/register i32.const 1 i32.const 0 @@ -9161,9 +9187,9 @@ global.get $std/array/arr8 i32.const 5 i32.const 0 - i32.const 7 + i32.const 20 i32.const 256 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/array/isArraysEqual i32.eqz if @@ -9171,7 +9197,7 @@ i32.const 160 i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr8 @@ -9182,9 +9208,9 @@ global.get $std/array/arr8 i32.const 5 i32.const 0 - i32.const 7 + i32.const 20 i32.const 328 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/array/isArraysEqual i32.eqz if @@ -9192,7 +9218,7 @@ i32.const 160 i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr8 @@ -9203,9 +9229,9 @@ global.get $std/array/arr8 i32.const 5 i32.const 0 - i32.const 7 + i32.const 20 i32.const 352 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/array/isArraysEqual i32.eqz if @@ -9213,7 +9239,7 @@ i32.const 160 i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr8 @@ -9224,9 +9250,9 @@ global.get $std/array/arr8 i32.const 5 i32.const 0 - i32.const 7 + i32.const 20 i32.const 376 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/array/isArraysEqual i32.eqz if @@ -9234,7 +9260,7 @@ i32.const 160 i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr8 @@ -9245,9 +9271,9 @@ global.get $std/array/arr8 i32.const 5 i32.const 0 - i32.const 7 + i32.const 20 i32.const 400 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/array/isArraysEqual i32.eqz if @@ -9255,7 +9281,7 @@ i32.const 160 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr32 @@ -9266,9 +9292,9 @@ global.get $std/array/arr32 i32.const 5 i32.const 2 - i32.const 8 + i32.const 21 i32.const 496 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9277,7 +9303,7 @@ i32.const 160 i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr32 @@ -9288,9 +9314,9 @@ global.get $std/array/arr32 i32.const 5 i32.const 2 - i32.const 8 + i32.const 21 i32.const 536 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9299,7 +9325,7 @@ i32.const 160 i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr32 @@ -9310,9 +9336,9 @@ global.get $std/array/arr32 i32.const 5 i32.const 2 - i32.const 8 + i32.const 21 i32.const 576 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9321,7 +9347,7 @@ i32.const 160 i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr32 @@ -9332,9 +9358,9 @@ global.get $std/array/arr32 i32.const 5 i32.const 2 - i32.const 8 + i32.const 21 i32.const 616 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9343,7 +9369,7 @@ i32.const 160 i32.const 77 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr32 @@ -9354,9 +9380,9 @@ global.get $std/array/arr32 i32.const 5 i32.const 2 - i32.const 8 + i32.const 21 i32.const 656 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9365,7 +9391,7 @@ i32.const 160 i32.const 80 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9375,7 +9401,7 @@ i32.const 160 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9390,7 +9416,7 @@ i32.const 160 i32.const 85 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9406,7 +9432,7 @@ i32.const 160 i32.const 89 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9418,7 +9444,7 @@ i32.const 160 i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9435,7 +9461,7 @@ i32.const 160 i32.const 91 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9449,7 +9475,7 @@ i32.const 160 i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9459,7 +9485,7 @@ i32.const 160 i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9476,7 +9502,7 @@ i32.const 160 i32.const 97 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9491,7 +9517,7 @@ i32.const 160 i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9508,7 +9534,7 @@ i32.const 160 i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9521,7 +9547,7 @@ i32.const 160 i32.const 103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9536,7 +9562,7 @@ i32.const 160 i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9553,7 +9579,7 @@ i32.const 160 i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9566,7 +9592,7 @@ i32.const 160 i32.const 109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9579,7 +9605,7 @@ i32.const 160 i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9594,7 +9620,7 @@ i32.const 160 i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9611,7 +9637,7 @@ i32.const 160 i32.const 115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9624,7 +9650,7 @@ i32.const 160 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9637,7 +9663,7 @@ i32.const 160 i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9650,7 +9676,7 @@ i32.const 160 i32.const 118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $~lib/array/Array#constructor @@ -9673,7 +9699,7 @@ i32.const 160 i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9685,7 +9711,7 @@ i32.const 160 i32.const 126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -9697,15 +9723,15 @@ i32.const 160 i32.const 127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out i32.const 0 i32.const 2 - i32.const 4 + i32.const 17 i32.const 696 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $~lib/array/Array#concat drop global.get $std/array/arr @@ -9722,7 +9748,7 @@ i32.const 160 i32.const 130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -9735,7 +9761,7 @@ i32.const 160 i32.const 132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -9748,7 +9774,7 @@ i32.const 160 i32.const 133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -9761,7 +9787,7 @@ i32.const 160 i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/other @@ -9788,7 +9814,7 @@ i32.const 160 i32.const 141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/other @@ -9800,7 +9826,7 @@ i32.const 160 i32.const 142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -9812,7 +9838,7 @@ i32.const 160 i32.const 143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -9825,7 +9851,7 @@ i32.const 160 i32.const 144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -9838,7 +9864,7 @@ i32.const 160 i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -9851,7 +9877,7 @@ i32.const 160 i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -9864,7 +9890,7 @@ i32.const 160 i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -9877,7 +9903,7 @@ i32.const 160 i32.const 148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -9892,7 +9918,7 @@ i32.const 160 i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9908,7 +9934,7 @@ i32.const 160 i32.const 154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -9921,7 +9947,7 @@ i32.const 160 i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/source @@ -9931,7 +9957,7 @@ i32.const 160 i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/source @@ -9947,7 +9973,7 @@ i32.const 160 i32.const 160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/source @@ -9957,14 +9983,14 @@ i32.const 160 i32.const 161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 760 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -9973,9 +9999,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 800 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9984,14 +10010,14 @@ i32.const 160 i32.const 167 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 840 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -10000,9 +10026,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 880 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10011,14 +10037,14 @@ i32.const 160 i32.const 169 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 920 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -10027,9 +10053,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 960 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10038,14 +10064,14 @@ i32.const 160 i32.const 171 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1000 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 2 @@ -10054,9 +10080,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1040 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10065,14 +10091,14 @@ i32.const 160 i32.const 173 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1080 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -10081,9 +10107,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1120 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10092,14 +10118,14 @@ i32.const 160 i32.const 175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1160 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -10108,9 +10134,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1200 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10119,14 +10145,14 @@ i32.const 160 i32.const 177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1240 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -10135,9 +10161,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1280 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10146,14 +10172,14 @@ i32.const 160 i32.const 179 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1320 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -10162,9 +10188,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1360 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10173,14 +10199,14 @@ i32.const 160 i32.const 181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1400 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -10189,9 +10215,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1440 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10200,14 +10226,14 @@ i32.const 160 i32.const 183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1480 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -10216,9 +10242,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1520 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10227,14 +10253,14 @@ i32.const 160 i32.const 185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1560 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -10243,9 +10269,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1600 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10254,14 +10280,14 @@ i32.const 160 i32.const 187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1640 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -10270,9 +10296,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1680 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10281,7 +10307,7 @@ i32.const 160 i32.const 189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10296,7 +10322,7 @@ i32.const 160 i32.const 195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10313,7 +10339,7 @@ i32.const 160 i32.const 196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10326,7 +10352,7 @@ i32.const 160 i32.const 197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10339,7 +10365,7 @@ i32.const 160 i32.const 198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10352,7 +10378,7 @@ i32.const 160 i32.const 199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10365,7 +10391,7 @@ i32.const 160 i32.const 200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10380,7 +10406,7 @@ i32.const 160 i32.const 204 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10397,7 +10423,7 @@ i32.const 160 i32.const 205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10410,7 +10436,7 @@ i32.const 160 i32.const 206 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10423,7 +10449,7 @@ i32.const 160 i32.const 207 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10436,7 +10462,7 @@ i32.const 160 i32.const 208 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10449,7 +10475,7 @@ i32.const 160 i32.const 209 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10462,7 +10488,7 @@ i32.const 160 i32.const 210 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10476,7 +10502,7 @@ i32.const 160 i32.const 216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10488,7 +10514,7 @@ i32.const 160 i32.const 217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10505,7 +10531,7 @@ i32.const 160 i32.const 218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10518,7 +10544,7 @@ i32.const 160 i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10531,7 +10557,7 @@ i32.const 160 i32.const 220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10544,7 +10570,7 @@ i32.const 160 i32.const 221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10557,7 +10583,7 @@ i32.const 160 i32.const 222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10571,7 +10597,7 @@ i32.const 160 i32.const 226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10583,7 +10609,7 @@ i32.const 160 i32.const 227 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10600,7 +10626,7 @@ i32.const 160 i32.const 228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10613,7 +10639,7 @@ i32.const 160 i32.const 229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10626,7 +10652,7 @@ i32.const 160 i32.const 230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10639,7 +10665,7 @@ i32.const 160 i32.const 231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10653,7 +10679,7 @@ i32.const 160 i32.const 237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10670,7 +10696,7 @@ i32.const 160 i32.const 238 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10683,7 +10709,7 @@ i32.const 160 i32.const 239 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10696,7 +10722,7 @@ i32.const 160 i32.const 240 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10709,7 +10735,7 @@ i32.const 160 i32.const 241 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10729,7 +10755,7 @@ i32.const 160 i32.const 250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10745,7 +10771,7 @@ i32.const 160 i32.const 254 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10761,7 +10787,7 @@ i32.const 160 i32.const 258 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10777,7 +10803,7 @@ i32.const 160 i32.const 262 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10793,7 +10819,7 @@ i32.const 160 i32.const 266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10809,7 +10835,7 @@ i32.const 160 i32.const 270 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10825,7 +10851,7 @@ i32.const 160 i32.const 274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10841,7 +10867,7 @@ i32.const 160 i32.const 278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10857,7 +10883,7 @@ i32.const 160 i32.const 282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10873,7 +10899,7 @@ i32.const 160 i32.const 286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10889,7 +10915,7 @@ i32.const 160 i32.const 292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10905,7 +10931,7 @@ i32.const 160 i32.const 296 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10919,7 +10945,7 @@ i32.const 160 i32.const 300 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10933,7 +10959,7 @@ i32.const 160 i32.const 304 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10949,7 +10975,7 @@ i32.const 160 i32.const 308 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10965,7 +10991,7 @@ i32.const 160 i32.const 312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10981,7 +11007,7 @@ i32.const 160 i32.const 316 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10997,7 +11023,7 @@ i32.const 160 i32.const 320 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11013,7 +11039,7 @@ i32.const 160 i32.const 324 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11029,7 +11055,7 @@ i32.const 160 i32.const 328 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11046,7 +11072,7 @@ i32.const 160 i32.const 332 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11063,7 +11089,7 @@ i32.const 160 i32.const 333 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11076,7 +11102,7 @@ i32.const 160 i32.const 334 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11089,7 +11115,7 @@ i32.const 160 i32.const 335 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr @@ -11098,9 +11124,9 @@ call $~lib/array/Array#splice i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1792 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11109,15 +11135,15 @@ i32.const 160 i32.const 340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 0 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1832 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11126,14 +11152,14 @@ i32.const 160 i32.const 341 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1848 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 @@ -11141,9 +11167,9 @@ call $~lib/array/Array#splice i32.const 3 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1888 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11152,15 +11178,15 @@ i32.const 160 i32.const 344 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 2 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1920 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11169,14 +11195,14 @@ i32.const 160 i32.const 345 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1944 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 @@ -11184,9 +11210,9 @@ call $~lib/array/Array#splice i32.const 2 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1984 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11195,15 +11221,15 @@ i32.const 160 i32.const 348 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 3 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2008 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11212,14 +11238,14 @@ i32.const 160 i32.const 349 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2040 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 0 @@ -11227,9 +11253,9 @@ call $~lib/array/Array#splice i32.const 1 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2080 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11238,15 +11264,15 @@ i32.const 160 i32.const 352 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 4 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2104 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11255,14 +11281,14 @@ i32.const 160 i32.const 353 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2136 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -1 @@ -11270,9 +11296,9 @@ call $~lib/array/Array#splice i32.const 1 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2176 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11281,15 +11307,15 @@ i32.const 160 i32.const 356 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 4 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2200 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11298,14 +11324,14 @@ i32.const 160 i32.const 357 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2232 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 @@ -11313,9 +11339,9 @@ call $~lib/array/Array#splice i32.const 2 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2272 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11324,15 +11350,15 @@ i32.const 160 i32.const 360 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 3 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2296 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11341,14 +11367,14 @@ i32.const 160 i32.const 361 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2328 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 @@ -11356,9 +11382,9 @@ call $~lib/array/Array#splice i32.const 1 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2368 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11367,15 +11393,15 @@ i32.const 160 i32.const 364 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 4 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2392 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11384,14 +11410,14 @@ i32.const 160 i32.const 365 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2424 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -7 @@ -11399,9 +11425,9 @@ call $~lib/array/Array#splice i32.const 1 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2464 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11410,15 +11436,15 @@ i32.const 160 i32.const 368 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 4 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2488 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11427,14 +11453,14 @@ i32.const 160 i32.const 369 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2520 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 @@ -11442,9 +11468,9 @@ call $~lib/array/Array#splice i32.const 0 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2560 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11453,15 +11479,15 @@ i32.const 160 i32.const 372 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2576 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11470,14 +11496,14 @@ i32.const 160 i32.const 373 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2616 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 1 @@ -11485,9 +11511,9 @@ call $~lib/array/Array#splice i32.const 0 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2656 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11496,15 +11522,15 @@ i32.const 160 i32.const 376 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2672 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11513,14 +11539,14 @@ i32.const 160 i32.const 377 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2712 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 4 @@ -11528,9 +11554,9 @@ call $~lib/array/Array#splice i32.const 0 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2752 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11539,15 +11565,15 @@ i32.const 160 i32.const 380 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2768 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11556,14 +11582,14 @@ i32.const 160 i32.const 381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2808 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 @@ -11571,9 +11597,9 @@ call $~lib/array/Array#splice i32.const 0 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2848 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11582,15 +11608,15 @@ i32.const 160 i32.const 384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2864 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11599,14 +11625,14 @@ i32.const 160 i32.const 385 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2904 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 @@ -11614,9 +11640,9 @@ call $~lib/array/Array#splice i32.const 0 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2944 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11625,15 +11651,15 @@ i32.const 160 i32.const 388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2960 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11642,7 +11668,7 @@ i32.const 160 i32.const 389 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11671,7 +11697,7 @@ i32.const 160 i32.const 399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11686,7 +11712,7 @@ i32.const 160 i32.const 402 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11701,7 +11727,7 @@ i32.const 160 i32.const 405 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11716,7 +11742,7 @@ i32.const 160 i32.const 413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11728,7 +11754,7 @@ i32.const 160 i32.const 414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11743,7 +11769,7 @@ i32.const 160 i32.const 416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11770,7 +11796,7 @@ i32.const 160 i32.const 429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11782,7 +11808,7 @@ i32.const 160 i32.const 430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11803,7 +11829,7 @@ i32.const 160 i32.const 438 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11816,7 +11842,7 @@ i32.const 160 i32.const 441 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11831,7 +11857,7 @@ i32.const 160 i32.const 449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11843,7 +11869,7 @@ i32.const 160 i32.const 450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11856,7 +11882,7 @@ i32.const 160 i32.const 452 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11883,7 +11909,7 @@ i32.const 160 i32.const 465 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11895,7 +11921,7 @@ i32.const 160 i32.const 466 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11916,7 +11942,7 @@ i32.const 160 i32.const 474 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11929,7 +11955,7 @@ i32.const 160 i32.const 477 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11942,7 +11968,7 @@ i32.const 160 i32.const 485 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11954,7 +11980,7 @@ i32.const 160 i32.const 486 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11969,7 +11995,7 @@ i32.const 160 i32.const 488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11994,7 +12020,7 @@ i32.const 160 i32.const 501 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12006,7 +12032,7 @@ i32.const 160 i32.const 502 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12028,7 +12054,7 @@ i32.const 160 i32.const 511 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -12044,7 +12070,7 @@ i32.const 160 i32.const 520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12056,7 +12082,7 @@ i32.const 160 i32.const 521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -12072,7 +12098,7 @@ i32.const 160 i32.const 524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12100,7 +12126,7 @@ i32.const 160 i32.const 538 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12112,7 +12138,7 @@ i32.const 160 i32.const 539 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12133,7 +12159,7 @@ i32.const 160 i32.const 564 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end loop $repeat|0 @@ -12175,7 +12201,7 @@ i32.const 160 i32.const 575 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/newArr @@ -12191,7 +12217,7 @@ i32.const 160 i32.const 576 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -12207,7 +12233,7 @@ i32.const 160 i32.const 585 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12219,7 +12245,7 @@ i32.const 160 i32.const 586 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -12235,7 +12261,7 @@ i32.const 160 i32.const 593 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12263,7 +12289,7 @@ i32.const 160 i32.const 608 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12275,7 +12301,7 @@ i32.const 160 i32.const 609 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12297,7 +12323,7 @@ i32.const 160 i32.const 617 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -12314,7 +12340,7 @@ i32.const 160 i32.const 626 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12326,7 +12352,7 @@ i32.const 160 i32.const 627 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -12343,7 +12369,7 @@ i32.const 160 i32.const 634 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12372,7 +12398,7 @@ i32.const 160 i32.const 649 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12384,7 +12410,7 @@ i32.const 160 i32.const 650 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12406,7 +12432,7 @@ i32.const 160 i32.const 658 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12422,7 +12448,7 @@ i32.const 160 i32.const 662 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12440,7 +12466,7 @@ i32.const 160 i32.const 665 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12456,7 +12482,7 @@ i32.const 160 i32.const 668 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12472,7 +12498,7 @@ i32.const 160 i32.const 676 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12484,7 +12510,7 @@ i32.const 160 i32.const 677 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12500,7 +12526,7 @@ i32.const 160 i32.const 679 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12528,7 +12554,7 @@ i32.const 160 i32.const 692 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12540,7 +12566,7 @@ i32.const 160 i32.const 693 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12562,7 +12588,7 @@ i32.const 160 i32.const 701 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12578,7 +12604,7 @@ i32.const 160 i32.const 705 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12596,7 +12622,7 @@ i32.const 160 i32.const 708 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12612,7 +12638,7 @@ i32.const 160 i32.const 711 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12628,7 +12654,7 @@ i32.const 160 i32.const 719 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12640,7 +12666,7 @@ i32.const 160 i32.const 720 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12656,7 +12682,7 @@ i32.const 160 i32.const 722 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12684,7 +12710,7 @@ i32.const 160 i32.const 735 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12694,7 +12720,7 @@ i32.const 160 i32.const 736 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12735,9 +12761,9 @@ global.get $std/array/f32ArrayTyped i32.const 8 i32.const 2 - i32.const 9 + i32.const 22 i32.const 3312 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/array/isArraysEqual i32.eqz if @@ -12745,7 +12771,7 @@ i32.const 160 i32.const 824 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -12771,9 +12797,9 @@ global.get $std/array/f64ArrayTyped i32.const 8 i32.const 3 - i32.const 10 + i32.const 23 i32.const 3472 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/array/isArraysEqual i32.eqz if @@ -12781,7 +12807,7 @@ i32.const 160 i32.const 828 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -12808,9 +12834,9 @@ global.get $std/array/i32ArrayTyped i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 3624 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12819,7 +12845,7 @@ i32.const 160 i32.const 832 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -12846,9 +12872,9 @@ global.get $std/array/u32ArrayTyped i32.const 5 i32.const 2 - i32.const 8 + i32.const 21 i32.const 3736 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12857,7 +12883,7 @@ i32.const 160 i32.const 836 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 64 @@ -12882,9 +12908,9 @@ global.get $std/array/reversed1 i32.const 1 i32.const 2 - i32.const 4 + i32.const 17 i32.const 4064 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12893,7 +12919,7 @@ i32.const 160 i32.const 856 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed2 @@ -12901,9 +12927,9 @@ global.get $std/array/reversed2 i32.const 2 i32.const 2 - i32.const 4 + i32.const 17 i32.const 4088 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12912,7 +12938,7 @@ i32.const 160 i32.const 859 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed4 @@ -12927,7 +12953,7 @@ i32.const 160 i32.const 862 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed64 @@ -12942,7 +12968,7 @@ i32.const 160 i32.const 865 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed128 @@ -12957,7 +12983,7 @@ i32.const 160 i32.const 868 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed1024 @@ -12972,7 +12998,7 @@ i32.const 160 i32.const 871 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed10000 @@ -12987,7 +13013,7 @@ i32.const 160 i32.const 874 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/randomized512 @@ -13033,7 +13059,7 @@ i32.const 160 i32.const 904 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $std/array/createRandomStringArray @@ -13062,9 +13088,9 @@ call $std/array/assertSorted<~lib/array/Array> i32.const 2 i32.const 0 - i32.const 16 + i32.const 29 i32.const 4560 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $~lib/array/Array#join_bool i32.const 4584 call $~lib/string/String.__eq @@ -13074,14 +13100,14 @@ i32.const 160 i32.const 913 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 i32.const 2 - i32.const 4 + i32.const 17 i32.const 5128 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 4208 call $~lib/array/Array#join i32.const 5160 @@ -13092,14 +13118,14 @@ i32.const 160 i32.const 914 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 i32.const 2 - i32.const 8 + i32.const 21 i32.const 5248 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 5224 call $~lib/array/Array#join i32.const 5160 @@ -13110,14 +13136,14 @@ i32.const 160 i32.const 915 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 i32.const 2 - i32.const 4 + i32.const 17 i32.const 5328 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 5304 call $~lib/array/Array#join i32.const 5352 @@ -13128,14 +13154,14 @@ i32.const 160 i32.const 916 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 6 i32.const 3 - i32.const 10 + i32.const 23 i32.const 6680 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $~lib/array/Array#join_flt i32.const 6744 call $~lib/string/String.__eq @@ -13145,14 +13171,14 @@ i32.const 160 i32.const 917 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 i32.const 2 - i32.const 15 + i32.const 28 i32.const 6896 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 4208 call $~lib/array/Array<~lib/string/String>#join i32.const 6840 @@ -13163,14 +13189,14 @@ i32.const 160 i32.const 918 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 i32.const 2 - i32.const 20 + i32.const 33 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.tee $1 i32.load offset=4 local.tee $0 @@ -13194,7 +13220,7 @@ i32.const 160 i32.const 920 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed0 @@ -13207,7 +13233,7 @@ i32.const 160 i32.const 924 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed1 @@ -13220,7 +13246,7 @@ i32.const 160 i32.const 925 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed2 @@ -13233,7 +13259,7 @@ i32.const 160 i32.const 926 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed4 @@ -13246,14 +13272,14 @@ i32.const 160 i32.const 927 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 i32.const 0 - i32.const 21 + i32.const 34 i32.const 7136 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $~lib/array/Array#join_int i32.const 7160 call $~lib/string/String.__eq @@ -13263,14 +13289,14 @@ i32.const 160 i32.const 929 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 i32.const 1 - i32.const 22 + i32.const 35 i32.const 7216 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $~lib/array/Array#join_int i32.const 7240 call $~lib/string/String.__eq @@ -13280,14 +13306,14 @@ i32.const 160 i32.const 930 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 i32.const 3 - i32.const 17 + i32.const 30 i32.const 7320 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $~lib/array/Array#join_int i32.const 7360 call $~lib/string/String.__eq @@ -13297,14 +13323,14 @@ i32.const 160 i32.const 931 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 i32.const 3 - i32.const 23 + i32.const 36 i32.const 7472 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $~lib/array/Array#join_int i32.const 7520 call $~lib/string/String.__eq @@ -13314,7 +13340,7 @@ i32.const 160 i32.const 932 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/randomStringsExpected @@ -13327,14 +13353,14 @@ i32.const 160 i32.const 933 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 i32.const 2 - i32.const 15 + i32.const 28 i32.const 7752 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $~lib/array/Array<~lib/string/String | null>#toString i32.const 7784 call $~lib/string/String.__eq @@ -13344,29 +13370,29 @@ i32.const 160 i32.const 934 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 i32.const 2 - i32.const 11 + i32.const 24 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.tee $0 i32.load offset=4 local.tee $1 i32.const 2 i32.const 2 - i32.const 4 + i32.const 17 i32.const 7840 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.store local.get $1 i32.const 2 i32.const 2 - i32.const 4 + i32.const 17 i32.const 7864 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.store offset=4 local.get $0 global.set $std/array/subarr32 @@ -13380,29 +13406,29 @@ i32.const 160 i32.const 937 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 i32.const 2 - i32.const 24 + i32.const 37 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.tee $0 i32.load offset=4 local.tee $1 i32.const 2 i32.const 0 - i32.const 7 + i32.const 20 i32.const 7944 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.store local.get $1 i32.const 2 i32.const 0 - i32.const 7 + i32.const 20 i32.const 7968 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.store offset=4 local.get $0 global.set $std/array/subarr8 @@ -13416,29 +13442,29 @@ i32.const 160 i32.const 940 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.const 2 - i32.const 26 + i32.const 39 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.tee $0 i32.load offset=4 local.set $1 i32.const 1 i32.const 2 - i32.const 25 + i32.const 38 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.tee $2 i32.load offset=4 i32.const 1 i32.const 2 - i32.const 8 + i32.const 21 i32.const 8064 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.store local.get $1 local.get $2 @@ -13455,7 +13481,7 @@ i32.const 160 i32.const 943 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -13464,11 +13490,188 @@ i32.eqz if call $start:std/array + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 40 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT i32.const 1 global.set $~lib/started end ) - (func $null (; 165 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 8072 + i32.load + i32.le_u + else + local.get $0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 8072 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 166 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + local.tee $1 + i32.eqz + if + local.get $0 + i32.const 8072 + i32.load + i32.gt_u + local.set $1 + end + local.get $1 + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 8072 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 168 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 169 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.tee $2 + i32.eqz + local.tee $0 + if (result i32) + local.get $0 + else + local.get $2 + i32.const 8072 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $2 + i32.const 3 + i32.shl + i32.const 8072 + i32.add + i32.load + end + local.tee $0 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $3 + local.get $2 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $2 + i32.load + drop + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $3 + i32.store offset=8 + local.get $2 + local.get $3 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $0 + i32.const 512 + i32.and + if + local.get $1 + local.get $3 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load + drop + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $2 + ) + (func $~lib/runtime/runtime.retain (; 171 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 172 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index b277b396ff..e8e76bc2f1 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -26,201 +26,202 @@ (type $FUNCSIG$viji (func (param i32 i64 i32))) (type $FUNCSIG$iiij (func (param i32 i32 i64) (result i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00&\00\00\00\00\00\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 64) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 120) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00") - (data (i32.const 144) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 184) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\02\03\04\05") - (data (i32.const 208) "\07\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c8\00\00\00\c8\00\00\00\05\00\00\00\05\00\00\00") - (data (i32.const 240) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\01\04\05") - (data (i32.const 264) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 312) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 336) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\00\00") - (data (i32.const 360) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") - (data (i32.const 384) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") - (data (i32.const 408) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 448) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a8\01\00\00\a8\01\00\00\14\00\00\00\05\00\00\00") - (data (i32.const 480) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 520) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 560) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 600) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") - (data (i32.const 640) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") - (data (i32.const 680) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 696) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 712) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c8\02\00\00\c8\02\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 744) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 784) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 824) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 864) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 904) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 944) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00") - (data (i32.const 984) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1024) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1064) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1104) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1144) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1184) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1224) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1264) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1304) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1344) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1384) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1424) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1464) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1504) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1544) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1584) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1624) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1664) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00") - (data (i32.const 1704) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1744) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\b8\06\00\00\b8\06\00\00\14\00\00\00\05\00\00\00") - (data (i32.const 1776) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1816) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1832) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1872) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1904) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 1928) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 1968) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00") - (data (i32.const 1992) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\05\00\00\00") - (data (i32.const 2024) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2064) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") - (data (i32.const 2088) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2120) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2160) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00") - (data (i32.const 2184) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00") - (data (i32.const 2216) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2256) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2280) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") - (data (i32.const 2312) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2352) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00") - (data (i32.const 2376) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05\00\00\00") - (data (i32.const 2408) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2448) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") - (data (i32.const 2472) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2504) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2544) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2560) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2600) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2640) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2656) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2696) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2736) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2752) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2792) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2832) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2848) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2888) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2928) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2944) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2984) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") - (data (i32.const 3024) "\01\00\00\00\ac\00\00\00\00\00\00\00\00\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?\00") - (data (i32.const 3216) "\02\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") - (data (i32.const 3264) "\t\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a0\0c\00\00\a0\0c\00\00 \00\00\00\08\00\00\00") - (data (i32.const 3296) "\02\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") - (data (i32.const 3344) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") - (data (i32.const 3424) "\n\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00 \0d\00\00 \0d\00\00@\00\00\00\08\00\00\00") - (data (i32.const 3456) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") - (data (i32.const 3536) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02\00\00\00") - (data (i32.const 3576) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\e0\0d\00\00\e0\0d\00\00\14\00\00\00\05\00\00\00") - (data (i32.const 3608) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 3648) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02\00\00\00") - (data (i32.const 3688) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00P\0e\00\00P\0e\00\00\14\00\00\00\05\00\00\00") - (data (i32.const 3720) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") - (data (i32.const 3760) "\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3776) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c0\0e\00\00\c0\0e\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3808) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") - (data (i32.const 3832) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\f0\0e\00\00\f0\0e\00\00\04\00\00\00\01\00\00\00") - (data (i32.const 3864) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\01\00\00\00") - (data (i32.const 3888) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00(\0f\00\00(\0f\00\00\08\00\00\00\02\00\00\00") - (data (i32.const 3920) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 3952) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00`\0f\00\00`\0f\00\00\10\00\00\00\04\00\00\00") - (data (i32.const 3984) "\02\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") - (data (i32.const 4016) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a0\0f\00\00\a0\0f\00\00\10\00\00\00\04\00\00\00") - (data (i32.const 4048) "\02\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") - (data (i32.const 4072) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 4096) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00a\00") - (data (i32.const 4120) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00b\00") - (data (i32.const 4144) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00a\00b\00") - (data (i32.const 4168) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00b\00a\00") - (data (i32.const 4192) "\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4208) "\02\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00\10\10\00\00(\10\00\00\10\10\00\00@\10\00\00X\10\00\00p\10\00\00\00\00\00\00") - (data (i32.const 4256) "\0e\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\80\10\00\00\80\10\00\00\1c\00\00\00\07\00\00\00") - (data (i32.const 4288) "\02\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00p\10\00\00\10\10\00\00\10\10\00\00@\10\00\00(\10\00\00X\10\00\00\00\00\00\00") - (data (i32.const 4336) "\0e\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\d0\10\00\00\d0\10\00\00\1c\00\00\00\07\00\00\00") - (data (i32.const 4368) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 4416) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00n\00u\00l\00l\00") - (data (i32.const 4440) "\02\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\01\00") - (data (i32.const 4464) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00t\00r\00u\00e\00") - (data (i32.const 4488) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00f\00a\00l\00s\00e\00") - (data (i32.const 4520) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00,\00") - (data (i32.const 4544) "\02\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\01\00") - (data (i32.const 4568) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e\00") - (data (i32.const 4608) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 4640) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\000\00") - (data (i32.const 4664) "\02\00\00\00\90\01\00\00\00\00\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") - (data (i32.const 5080) "\08\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00H\12\00\00H\12\00\00\90\01\00\00d\00\00\00") - (data (i32.const 5112) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 5144) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\001\00-\002\00-\003\00") - (data (i32.const 5176) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") - (data (i32.const 5208) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00-\00") - (data (i32.const 5232) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") - (data (i32.const 5264) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\00\00\00\80") - (data (i32.const 5288) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00_\00_\00") - (data (i32.const 5312) "\02\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\00\00\00\80") - (data (i32.const 5336) "\01\00\00\000\00\00\00\00\00\00\00\00\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 5400) "\02\00\00\000\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") - (data (i32.const 5464) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00,\00 \00") - (data (i32.const 5488) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\000\00.\000\00") - (data (i32.const 5512) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00N\00a\00N\00") - (data (i32.const 5536) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 5576) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 5608) "\02\00\00\00\b8\02\00\00\00\00\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\00*\00&\00$\00%\00^\00@\00#\00!\00?\00") + (data (i32.const 3216) "\0f\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") + (data (i32.const 3264) "\16\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a0\0c\00\00\a0\0c\00\00 \00\00\00\08\00\00\00") + (data (i32.const 3296) "\0f\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") + (data (i32.const 3344) "\0f\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") + (data (i32.const 3424) "\17\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00 \0d\00\00 \0d\00\00@\00\00\00\08\00\00\00") + (data (i32.const 3456) "\0f\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") + (data (i32.const 3536) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02\00\00\00") + (data (i32.const 3576) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\e0\0d\00\00\e0\0d\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 3608) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 3648) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02\00\00\00") + (data (i32.const 3688) "\15\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00P\0e\00\00P\0e\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 3720) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") + (data (i32.const 3760) "\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 3776) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c0\0e\00\00\c0\0e\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 3808) "\0f\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") + (data (i32.const 3832) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\f0\0e\00\00\f0\0e\00\00\04\00\00\00\01\00\00\00") + (data (i32.const 3864) "\0f\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\01\00\00\00") + (data (i32.const 3888) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00(\0f\00\00(\0f\00\00\08\00\00\00\02\00\00\00") + (data (i32.const 3920) "\0f\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01\00\00\00\00\00\00\00") + (data (i32.const 3952) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00`\0f\00\00`\0f\00\00\10\00\00\00\04\00\00\00") + (data (i32.const 3984) "\0f\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 4016) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a0\0f\00\00\a0\0f\00\00\10\00\00\00\04\00\00\00") + (data (i32.const 4048) "\0f\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") + (data (i32.const 4072) "\0f\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 4096) "\10\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00a\00") + (data (i32.const 4120) "\10\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00b\00") + (data (i32.const 4144) "\10\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00a\00b\00") + (data (i32.const 4168) "\10\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00b\00a\00") + (data (i32.const 4192) "\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 4208) "\0f\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00\10\10\00\00(\10\00\00\10\10\00\00@\10\00\00X\10\00\00p\10\00\00\00\00\00\00") + (data (i32.const 4256) "\1b\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\80\10\00\00\80\10\00\00\1c\00\00\00\07\00\00\00") + (data (i32.const 4288) "\0f\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00p\10\00\00\10\10\00\00\10\10\00\00@\10\00\00(\10\00\00X\10\00\00\00\00\00\00") + (data (i32.const 4336) "\1b\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\d0\10\00\00\d0\10\00\00\1c\00\00\00\07\00\00\00") + (data (i32.const 4368) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 4416) "\10\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00n\00u\00l\00l\00") + (data (i32.const 4440) "\0f\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\01\00") + (data (i32.const 4464) "\10\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00t\00r\00u\00e\00") + (data (i32.const 4488) "\10\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00f\00a\00l\00s\00e\00") + (data (i32.const 4520) "\10\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00,\00") + (data (i32.const 4544) "\0f\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\01\00") + (data (i32.const 4568) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e\00") + (data (i32.const 4608) "\0f\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 4640) "\10\00\00\00\02\00\00\00\00\00\00\00\00\00\00\000\00") + (data (i32.const 4664) "\0f\00\00\00\90\01\00\00\00\00\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") + (data (i32.const 5080) "\15\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00H\12\00\00H\12\00\00\90\01\00\00d\00\00\00") + (data (i32.const 5112) "\0f\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 5144) "\10\00\00\00\n\00\00\00\00\00\00\00\00\00\00\001\00-\002\00-\003\00") + (data (i32.const 5176) "\0f\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 5208) "\10\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00-\00") + (data (i32.const 5232) "\0f\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 5264) "\0f\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\00\00\00\80") + (data (i32.const 5288) "\10\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00_\00_\00") + (data (i32.const 5312) "\0f\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\00\00\00\80") + (data (i32.const 5336) "\10\00\00\000\00\00\00\00\00\00\00\00\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008\00") + (data (i32.const 5400) "\0f\00\00\000\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") + (data (i32.const 5464) "\10\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00,\00 \00") + (data (i32.const 5488) "\10\00\00\00\06\00\00\00\00\00\00\00\00\00\00\000\00.\000\00") + (data (i32.const 5512) "\10\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00N\00a\00N\00") + (data (i32.const 5536) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") + (data (i32.const 5576) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") + (data (i32.const 5608) "\0f\00\00\00\b8\02\00\00\00\00\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -291,11 +292,21 @@ (global $std/array/subarr8 (mut i32) (i32.const 0)) (global $std/array/subarrU32 (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8068)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 8072)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 8400)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $std/array/main)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -684,9 +695,9 @@ if i32.const 0 i32.const 80 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -701,9 +712,9 @@ if i32.const 0 i32.const 80 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -723,7 +734,7 @@ i32.const 24 i32.const 54 i32.const 43 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -734,7 +745,7 @@ local.get $1 call $~lib/memory/memory.fill local.get $2 - i32.const 2 + i32.const 15 call $~lib/util/runtime/register ) (func $~lib/collector/dummy/__ref_link (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) @@ -758,7 +769,7 @@ i32.const 24 i32.const 12 i32.const 57 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -774,7 +785,7 @@ if i32.const 12 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 14 call $~lib/util/runtime/register local.set $0 end @@ -826,7 +837,7 @@ else i32.const 16 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 17 call $~lib/util/runtime/register end local.get $1 @@ -867,7 +878,7 @@ if i32.const 0 call $~lib/util/runtime/allocate - i32.const 5 + i32.const 18 call $~lib/util/runtime/register local.set $0 end @@ -890,7 +901,7 @@ else i32.const 12 call $~lib/util/runtime/allocate - i32.const 6 + i32.const 19 call $~lib/util/runtime/register end local.get $1 @@ -1214,7 +1225,7 @@ end end ) - (func $~lib/runtime/runtime.newArray (; 24 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/runtime/makeArray (; 24 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1232,7 +1243,7 @@ local.set $5 local.get $5 call $~lib/util/runtime/allocate - i32.const 2 + i32.const 15 call $~lib/util/runtime/register local.set $6 local.get $4 @@ -1301,7 +1312,7 @@ i32.const 280 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1474,7 +1485,7 @@ i32.const 280 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1634,9 +1645,9 @@ if i32.const 0 i32.const 80 - i32.const 88 + i32.const 91 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1691,7 +1702,7 @@ i32.const 280 i32.const 14 i32.const 64 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1789,7 +1800,7 @@ i32.const 280 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1808,9 +1819,9 @@ if i32.const 0 i32.const 280 - i32.const 309 + i32.const 311 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1835,6 +1846,8 @@ (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) + (local $8 i32) local.get $0 i32.load offset=12 local.set $2 @@ -1849,25 +1862,44 @@ local.get $2 local.get $3 i32.add - i32.const 2 - i32.const 4 - i32.const 0 - call $~lib/runtime/runtime.newArray local.set $4 local.get $4 + global.get $~lib/util/runtime/MAX_BYTELENGTH + i32.const 2 + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 280 + i32.const 236 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + block $~lib/util/runtime/NEWARRAY|inlined.0 (result i32) + local.get $4 + local.set $5 + local.get $5 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + end + local.set $6 + local.get $6 i32.load offset=4 - local.set $5 + local.set $7 local.get $2 i32.const 2 i32.shl - local.set $6 - local.get $5 + local.set $8 + local.get $7 local.get $0 i32.load offset=4 - local.get $6 + local.get $8 call $~lib/memory/memory.copy - local.get $5 - local.get $6 + local.get $7 + local.get $8 i32.add local.get $1 i32.load offset=4 @@ -1875,7 +1907,7 @@ i32.const 2 i32.shl call $~lib/memory/memory.copy - local.get $4 + local.get $6 ) (func $~lib/array/Array#copyWithin (; 46 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) @@ -2169,9 +2201,9 @@ if i32.const 0 i32.const 280 - i32.const 381 + i32.const 383 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2394,11 +2426,15 @@ i32.gt_s select local.set $2 - local.get $2 - i32.const 2 - i32.const 4 - i32.const 0 - call $~lib/runtime/runtime.newArray + block $~lib/util/runtime/NEWARRAY|inlined.1 (result i32) + local.get $2 + local.set $4 + local.get $4 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + end local.set $6 local.get $6 i32.load offset=4 @@ -2955,7 +2991,7 @@ i32.const 160 i32.const 561 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2974,20 +3010,24 @@ local.get $0 i32.load offset=12 local.set $2 - local.get $2 - i32.const 2 - i32.const 9 - i32.const 0 - call $~lib/runtime/runtime.newArray - local.set $3 - local.get $3 - i32.load offset=4 + block $~lib/util/runtime/NEWARRAY|inlined.0 (result i32) + local.get $2 + local.set $3 + local.get $3 + i32.const 2 + i32.const 22 + i32.const 0 + call $~lib/util/runtime/makeArray + end local.set $4 + local.get $4 + i32.load offset=4 + local.set $5 block $break|0 i32.const 0 - local.set $5 + local.set $3 loop $repeat|0 - local.get $5 + local.get $3 local.get $2 local.tee $6 local.get $0 @@ -3003,14 +3043,14 @@ block local.get $0 i32.load offset=4 - local.get $5 + local.get $3 i32.const 2 i32.shl i32.add i32.load local.set $6 - local.get $4 local.get $5 + local.get $3 i32.const 2 i32.shl i32.add @@ -3018,23 +3058,23 @@ i32.const 3 global.set $~lib/argc local.get $6 - local.get $5 + local.get $3 local.get $0 local.get $1 call_indirect (type $FUNCSIG$fiii) end f32.store end - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $repeat|0 unreachable end unreachable end - local.get $3 + local.get $4 ) (func $~lib/array/Array#get:length (; 83 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -3061,7 +3101,7 @@ i32.const 280 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3089,20 +3129,24 @@ local.get $0 i32.load offset=12 local.set $2 - local.get $2 - i32.const 2 - i32.const 4 - i32.const 0 - call $~lib/runtime/runtime.newArray - local.set $3 - local.get $3 - i32.load offset=4 + block $~lib/util/runtime/NEWARRAY|inlined.2 (result i32) + local.get $2 + local.set $3 + local.get $3 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + end local.set $4 + local.get $4 + i32.load offset=4 + local.set $5 block $break|0 i32.const 0 - local.set $5 + local.set $3 loop $repeat|0 - local.get $5 + local.get $3 local.get $2 local.tee $6 local.get $0 @@ -3118,14 +3162,14 @@ block local.get $0 i32.load offset=4 - local.get $5 + local.get $3 i32.const 2 i32.shl i32.add i32.load local.set $6 - local.get $4 local.get $5 + local.get $3 i32.const 2 i32.shl i32.add @@ -3133,23 +3177,23 @@ i32.const 3 global.set $~lib/argc local.get $6 - local.get $5 + local.get $3 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) end i32.store end - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $repeat|0 unreachable end unreachable end - local.get $3 + local.get $4 ) (func $start:std/array~anonymous|23 (; 88 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i @@ -3179,22 +3223,26 @@ (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 0 - i32.const 2 - i32.const 4 - i32.const 0 - call $~lib/runtime/runtime.newArray - local.set $2 + block $~lib/util/runtime/NEWARRAY|inlined.3 (result i32) + i32.const 0 + local.set $2 + local.get $2 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + end + local.set $3 block $break|0 block i32.const 0 - local.set $3 + local.set $2 local.get $0 i32.load offset=12 local.set $4 end loop $repeat|0 - local.get $3 + local.get $2 local.get $4 local.tee $5 local.get $0 @@ -3210,7 +3258,7 @@ block local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add @@ -3220,7 +3268,7 @@ i32.const 3 global.set $~lib/argc local.get $5 - local.get $3 + local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) @@ -3228,22 +3276,22 @@ i32.const 0 i32.ne if - local.get $2 + local.get $3 local.get $5 call $~lib/array/Array#push drop end end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 unreachable end unreachable end - local.get $2 + local.get $3 ) (func $start:std/array~anonymous|26 (; 92 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 @@ -3669,7 +3717,7 @@ i32.const 3000 i32.const 1021 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -4099,9 +4147,9 @@ if i32.const 0 i32.const 280 - i32.const 526 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4709,9 +4757,9 @@ if i32.const 0 i32.const 280 - i32.const 526 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4859,7 +4907,7 @@ i32.const 280 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5349,9 +5397,9 @@ if i32.const 0 i32.const 280 - i32.const 526 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5853,9 +5901,9 @@ if i32.const 0 i32.const 280 - i32.const 526 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5956,6 +6004,7 @@ ) (func $~lib/array/Array.create (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) local.get $0 global.get $~lib/util/runtime/MAX_BYTELENGTH i32.const 2 @@ -5966,25 +6015,29 @@ i32.const 280 i32.const 44 i32.const 62 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 2 - i32.const 4 + block $~lib/util/runtime/NEWARRAY|inlined.4 (result i32) + local.get $0 + local.set $1 + local.get $1 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + end + local.set $2 + local.get $2 i32.const 0 - call $~lib/runtime/runtime.newArray - local.set $1 - local.get $1 + i32.store offset=12 + local.get $2 i32.load offset=4 i32.const 0 - local.get $1 + local.get $2 i32.load offset=8 call $~lib/memory/memory.fill - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 + local.get $2 ) (func $std/array/createReverseOrderedArray (; 144 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -6031,7 +6084,7 @@ i32.const 3000 i32.const 1030 i32.const 24 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/random_state0_64 @@ -6176,7 +6229,7 @@ i32.const 160 i32.const 813 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6210,6 +6263,7 @@ ) (func $~lib/array/Array.create<~lib/array/Array> (; 155 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) local.get $0 global.get $~lib/util/runtime/MAX_BYTELENGTH i32.const 2 @@ -6220,25 +6274,29 @@ i32.const 280 i32.const 44 i32.const 62 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 2 - i32.const 11 + block $~lib/util/runtime/NEWARRAY<~lib/array/Array>|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + i32.const 2 + i32.const 24 + i32.const 0 + call $~lib/util/runtime/makeArray + end + local.set $2 + local.get $2 i32.const 0 - call $~lib/runtime/runtime.newArray - local.set $1 - local.get $1 + i32.store offset=12 + local.get $2 i32.load offset=4 i32.const 0 - local.get $1 + local.get $2 i32.load offset=8 call $~lib/memory/memory.fill - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 + local.get $2 ) (func $~lib/array/Array<~lib/array/Array>#__unchecked_set (; 156 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -6286,7 +6344,7 @@ i32.const 280 i32.const 111 i32.const 38 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6470,9 +6528,9 @@ if i32.const 0 i32.const 280 - i32.const 526 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6556,7 +6614,7 @@ i32.const 280 i32.const 96 i32.const 45 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6570,7 +6628,7 @@ i32.const 280 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6637,12 +6695,13 @@ i32.const 160 i32.const 813 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) (func $~lib/array/Array.create> (; 167 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) local.get $0 global.get $~lib/util/runtime/MAX_BYTELENGTH i32.const 2 @@ -6653,25 +6712,29 @@ i32.const 280 i32.const 44 i32.const 62 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 2 - i32.const 12 + block $~lib/util/runtime/NEWARRAY>|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + i32.const 2 + i32.const 26 + i32.const 0 + call $~lib/util/runtime/makeArray + end + local.set $2 + local.get $2 i32.const 0 - call $~lib/runtime/runtime.newArray - local.set $1 - local.get $1 + i32.store offset=12 + local.get $2 i32.load offset=4 i32.const 0 - local.get $1 + local.get $2 i32.load offset=8 call $~lib/memory/memory.fill - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 + local.get $2 ) (func $std/array/Proxy#constructor (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -6679,7 +6742,7 @@ if i32.const 4 call $~lib/util/runtime/allocate - i32.const 13 + i32.const 25 call $~lib/util/runtime/register local.set $0 end @@ -6734,7 +6797,7 @@ i32.const 280 i32.const 111 i32.const 38 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6908,9 +6971,9 @@ if i32.const 0 i32.const 280 - i32.const 526 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6994,7 +7057,7 @@ i32.const 280 i32.const 96 i32.const 45 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -7008,7 +7071,7 @@ i32.const 280 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7075,7 +7138,7 @@ i32.const 160 i32.const 813 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7186,9 +7249,9 @@ if i32.const 0 i32.const 280 - i32.const 526 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7274,7 +7337,7 @@ i32.const 280 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7341,7 +7404,7 @@ i32.const 160 i32.const 813 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7607,6 +7670,7 @@ ) (func $~lib/array/Array.create<~lib/string/String> (; 194 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) local.get $0 global.get $~lib/util/runtime/MAX_BYTELENGTH i32.const 2 @@ -7617,25 +7681,29 @@ i32.const 280 i32.const 44 i32.const 62 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 2 - i32.const 15 + block $~lib/util/runtime/NEWARRAY<~lib/string/String>|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + i32.const 2 + i32.const 28 + i32.const 0 + call $~lib/util/runtime/makeArray + end + local.set $2 + local.get $2 i32.const 0 - call $~lib/runtime/runtime.newArray - local.set $1 - local.get $1 + i32.store offset=12 + local.get $2 i32.load offset=4 i32.const 0 - local.get $1 + local.get $2 i32.load offset=8 call $~lib/memory/memory.fill - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $1 + local.get $2 ) (func $~lib/string/String#charAt (; 195 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -7648,7 +7716,7 @@ i32.const 4384 i32.const 47 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -7671,7 +7739,7 @@ i32.load16_u i32.store16 local.get $2 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/string/String#concat (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -7721,7 +7789,7 @@ local.get $3 call $~lib/memory/memory.copy local.get $5 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/string/String.__concat (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -7822,7 +7890,7 @@ i32.const 280 i32.const 111 i32.const 38 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7987,9 +8055,9 @@ if i32.const 0 i32.const 280 - i32.const 526 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8073,7 +8141,7 @@ i32.const 280 i32.const 96 i32.const 45 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -8087,7 +8155,7 @@ i32.const 280 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8154,7 +8222,7 @@ i32.const 160 i32.const 813 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8270,7 +8338,7 @@ i32.const 4384 i32.const 203 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8367,7 +8435,7 @@ local.get $3 call $~lib/memory/memory.copy local.get $10 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/runtime/discard (; 212 ;) (type $FUNCSIG$vi) (param $0 i32) @@ -8379,9 +8447,9 @@ if i32.const 0 i32.const 80 - i32.const 114 + i32.const 117 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8396,9 +8464,9 @@ if i32.const 0 i32.const 80 - i32.const 116 + i32.const 119 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -8575,7 +8643,7 @@ return end local.get $7 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -8849,7 +8917,7 @@ i32.store16 end local.get $3 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/number/itoa (; 218 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -9046,7 +9114,7 @@ return end local.get $6 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -9088,7 +9156,7 @@ call $~lib/util/number/utoa32_lut end local.get $2 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/number/itoa (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -9265,7 +9333,7 @@ return end local.get $6 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -10892,7 +10960,7 @@ return end local.get $6 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -11082,7 +11150,7 @@ call $~lib/memory/memory.copy end local.get $10 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/array/Array<~lib/string/String>#join (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -11097,7 +11165,7 @@ if i32.const 0 call $~lib/util/runtime/allocate - i32.const 19 + i32.const 32 call $~lib/util/runtime/register local.set $0 end @@ -11249,7 +11317,7 @@ return end local.get $6 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 241 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -11477,7 +11545,7 @@ return end local.get $6 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -11673,7 +11741,7 @@ return end local.get $6 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 251 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -11949,7 +12017,7 @@ end end local.get $1 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/number/itoa (; 256 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) @@ -12153,7 +12221,7 @@ return end local.get $6 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -12254,7 +12322,7 @@ i32.store16 end local.get $2 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/number/itoa (; 262 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) @@ -12480,7 +12548,7 @@ return end local.get $6 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 265 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -12675,7 +12743,7 @@ call $~lib/memory/memory.copy end local.get $10 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/array/Array<~lib/string/String | null>#join (; 268 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -12991,7 +13059,7 @@ return end local.get $6 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/array/Array#join (; 277 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -13370,7 +13438,7 @@ i32.const 160 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13383,7 +13451,7 @@ i32.const 160 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -13397,7 +13465,7 @@ i32.const 160 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -13412,7 +13480,7 @@ i32.const 160 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/num @@ -13425,7 +13493,7 @@ i32.const 160 i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/str @@ -13438,7 +13506,7 @@ i32.const 160 i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr8 @@ -13450,9 +13518,9 @@ global.get $std/array/arr8 i32.const 5 i32.const 0 - i32.const 7 + i32.const 20 i32.const 256 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13461,7 +13529,7 @@ i32.const 160 i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr8 @@ -13473,9 +13541,9 @@ global.get $std/array/arr8 i32.const 5 i32.const 0 - i32.const 7 + i32.const 20 i32.const 328 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13484,7 +13552,7 @@ i32.const 160 i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr8 @@ -13496,9 +13564,9 @@ global.get $std/array/arr8 i32.const 5 i32.const 0 - i32.const 7 + i32.const 20 i32.const 352 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13507,7 +13575,7 @@ i32.const 160 i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr8 @@ -13519,9 +13587,9 @@ global.get $std/array/arr8 i32.const 5 i32.const 0 - i32.const 7 + i32.const 20 i32.const 376 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13530,7 +13598,7 @@ i32.const 160 i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr8 @@ -13542,9 +13610,9 @@ global.get $std/array/arr8 i32.const 5 i32.const 0 - i32.const 7 + i32.const 20 i32.const 400 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13553,7 +13621,7 @@ i32.const 160 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr32 @@ -13565,9 +13633,9 @@ global.get $std/array/arr32 i32.const 5 i32.const 2 - i32.const 8 + i32.const 21 i32.const 496 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13576,7 +13644,7 @@ i32.const 160 i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr32 @@ -13588,9 +13656,9 @@ global.get $std/array/arr32 i32.const 5 i32.const 2 - i32.const 8 + i32.const 21 i32.const 536 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13599,7 +13667,7 @@ i32.const 160 i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr32 @@ -13611,9 +13679,9 @@ global.get $std/array/arr32 i32.const 5 i32.const 2 - i32.const 8 + i32.const 21 i32.const 576 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13622,7 +13690,7 @@ i32.const 160 i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr32 @@ -13634,9 +13702,9 @@ global.get $std/array/arr32 i32.const 5 i32.const 2 - i32.const 8 + i32.const 21 i32.const 616 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13645,7 +13713,7 @@ i32.const 160 i32.const 77 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr32 @@ -13657,9 +13725,9 @@ global.get $std/array/arr32 i32.const 5 i32.const 2 - i32.const 8 + i32.const 21 i32.const 656 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13668,7 +13736,7 @@ i32.const 160 i32.const 80 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13681,7 +13749,7 @@ i32.const 160 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13694,7 +13762,7 @@ i32.const 160 i32.const 85 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13712,7 +13780,7 @@ i32.const 160 i32.const 89 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13725,7 +13793,7 @@ i32.const 160 i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13738,7 +13806,7 @@ i32.const 160 i32.const 91 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13753,7 +13821,7 @@ i32.const 160 i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13766,7 +13834,7 @@ i32.const 160 i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13779,7 +13847,7 @@ i32.const 160 i32.const 97 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13796,7 +13864,7 @@ i32.const 160 i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13809,7 +13877,7 @@ i32.const 160 i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13823,7 +13891,7 @@ i32.const 160 i32.const 103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13840,7 +13908,7 @@ i32.const 160 i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13853,7 +13921,7 @@ i32.const 160 i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13867,7 +13935,7 @@ i32.const 160 i32.const 109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13881,7 +13949,7 @@ i32.const 160 i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13898,7 +13966,7 @@ i32.const 160 i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13911,7 +13979,7 @@ i32.const 160 i32.const 115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13925,7 +13993,7 @@ i32.const 160 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13939,7 +14007,7 @@ i32.const 160 i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13953,7 +14021,7 @@ i32.const 160 i32.const 118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -13974,7 +14042,7 @@ i32.const 160 i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13987,7 +14055,7 @@ i32.const 160 i32.const 126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -14000,15 +14068,15 @@ i32.const 160 i32.const 127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out i32.const 0 i32.const 2 - i32.const 4 + i32.const 17 i32.const 696 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $~lib/array/Array#concat drop global.get $std/array/arr @@ -14021,7 +14089,7 @@ i32.const 160 i32.const 130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -14035,7 +14103,7 @@ i32.const 160 i32.const 132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -14049,7 +14117,7 @@ i32.const 160 i32.const 133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -14063,7 +14131,7 @@ i32.const 160 i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/other @@ -14088,7 +14156,7 @@ i32.const 160 i32.const 141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/other @@ -14101,7 +14169,7 @@ i32.const 160 i32.const 142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -14114,7 +14182,7 @@ i32.const 160 i32.const 143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -14128,7 +14196,7 @@ i32.const 160 i32.const 144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -14142,7 +14210,7 @@ i32.const 160 i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -14156,7 +14224,7 @@ i32.const 160 i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -14170,7 +14238,7 @@ i32.const 160 i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -14184,7 +14252,7 @@ i32.const 160 i32.const 148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -14200,7 +14268,7 @@ i32.const 160 i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14217,7 +14285,7 @@ i32.const 160 i32.const 154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -14231,7 +14299,7 @@ i32.const 160 i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/source @@ -14244,7 +14312,7 @@ i32.const 160 i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/source @@ -14261,7 +14329,7 @@ i32.const 160 i32.const 160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/source @@ -14274,14 +14342,14 @@ i32.const 160 i32.const 161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 760 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -14290,9 +14358,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 800 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14301,14 +14369,14 @@ i32.const 160 i32.const 167 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 840 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -14317,9 +14385,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 880 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14328,14 +14396,14 @@ i32.const 160 i32.const 169 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 920 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -14344,9 +14412,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 960 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14355,14 +14423,14 @@ i32.const 160 i32.const 171 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1000 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 2 @@ -14371,9 +14439,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1040 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14382,14 +14450,14 @@ i32.const 160 i32.const 173 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1080 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -14398,9 +14466,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1120 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14409,14 +14477,14 @@ i32.const 160 i32.const 175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1160 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -14425,9 +14493,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1200 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14436,14 +14504,14 @@ i32.const 160 i32.const 177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1240 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 @@ -14452,9 +14520,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1280 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14463,14 +14531,14 @@ i32.const 160 i32.const 179 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1320 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -14479,9 +14547,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1360 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14490,14 +14558,14 @@ i32.const 160 i32.const 181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1400 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 @@ -14506,9 +14574,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1440 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14517,14 +14585,14 @@ i32.const 160 i32.const 183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1480 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -14533,9 +14601,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1520 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14544,14 +14612,14 @@ i32.const 160 i32.const 185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1560 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -14560,9 +14628,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1600 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14571,14 +14639,14 @@ i32.const 160 i32.const 187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1640 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 @@ -14587,9 +14655,9 @@ call $~lib/array/Array#copyWithin i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1680 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14598,7 +14666,7 @@ i32.const 160 i32.const 189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14615,7 +14683,7 @@ i32.const 160 i32.const 195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14628,7 +14696,7 @@ i32.const 160 i32.const 196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14642,7 +14710,7 @@ i32.const 160 i32.const 197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14656,7 +14724,7 @@ i32.const 160 i32.const 198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14670,7 +14738,7 @@ i32.const 160 i32.const 199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14684,7 +14752,7 @@ i32.const 160 i32.const 200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14701,7 +14769,7 @@ i32.const 160 i32.const 204 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14714,7 +14782,7 @@ i32.const 160 i32.const 205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14728,7 +14796,7 @@ i32.const 160 i32.const 206 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14742,7 +14810,7 @@ i32.const 160 i32.const 207 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14756,7 +14824,7 @@ i32.const 160 i32.const 208 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14770,7 +14838,7 @@ i32.const 160 i32.const 209 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14784,7 +14852,7 @@ i32.const 160 i32.const 210 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14799,7 +14867,7 @@ i32.const 160 i32.const 216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14812,7 +14880,7 @@ i32.const 160 i32.const 217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14825,7 +14893,7 @@ i32.const 160 i32.const 218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14839,7 +14907,7 @@ i32.const 160 i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14853,7 +14921,7 @@ i32.const 160 i32.const 220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14867,7 +14935,7 @@ i32.const 160 i32.const 221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14881,7 +14949,7 @@ i32.const 160 i32.const 222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14896,7 +14964,7 @@ i32.const 160 i32.const 226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14909,7 +14977,7 @@ i32.const 160 i32.const 227 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14922,7 +14990,7 @@ i32.const 160 i32.const 228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14936,7 +15004,7 @@ i32.const 160 i32.const 229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14950,7 +15018,7 @@ i32.const 160 i32.const 230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14964,7 +15032,7 @@ i32.const 160 i32.const 231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14980,7 +15048,7 @@ i32.const 160 i32.const 237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -14993,7 +15061,7 @@ i32.const 160 i32.const 238 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15007,7 +15075,7 @@ i32.const 160 i32.const 239 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15021,7 +15089,7 @@ i32.const 160 i32.const 240 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15035,7 +15103,7 @@ i32.const 160 i32.const 241 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15060,7 +15128,7 @@ i32.const 160 i32.const 250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15077,7 +15145,7 @@ i32.const 160 i32.const 254 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15094,7 +15162,7 @@ i32.const 160 i32.const 258 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15111,7 +15179,7 @@ i32.const 160 i32.const 262 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15128,7 +15196,7 @@ i32.const 160 i32.const 266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15145,7 +15213,7 @@ i32.const 160 i32.const 270 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15162,7 +15230,7 @@ i32.const 160 i32.const 274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15179,7 +15247,7 @@ i32.const 160 i32.const 278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15196,7 +15264,7 @@ i32.const 160 i32.const 282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15213,7 +15281,7 @@ i32.const 160 i32.const 286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15230,7 +15298,7 @@ i32.const 160 i32.const 292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15247,7 +15315,7 @@ i32.const 160 i32.const 296 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15264,7 +15332,7 @@ i32.const 160 i32.const 300 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15281,7 +15349,7 @@ i32.const 160 i32.const 304 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15298,7 +15366,7 @@ i32.const 160 i32.const 308 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15315,7 +15383,7 @@ i32.const 160 i32.const 312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15332,7 +15400,7 @@ i32.const 160 i32.const 316 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15349,7 +15417,7 @@ i32.const 160 i32.const 320 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15366,7 +15434,7 @@ i32.const 160 i32.const 324 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15383,7 +15451,7 @@ i32.const 160 i32.const 328 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15401,7 +15469,7 @@ i32.const 160 i32.const 332 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15414,7 +15482,7 @@ i32.const 160 i32.const 333 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15428,7 +15496,7 @@ i32.const 160 i32.const 334 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -15442,7 +15510,7 @@ i32.const 160 i32.const 335 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr @@ -15451,9 +15519,9 @@ call $~lib/array/Array#splice i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1792 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15462,15 +15530,15 @@ i32.const 160 i32.const 340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 0 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1832 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15479,14 +15547,14 @@ i32.const 160 i32.const 341 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1848 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 @@ -15494,9 +15562,9 @@ call $~lib/array/Array#splice i32.const 3 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1888 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15505,15 +15573,15 @@ i32.const 160 i32.const 344 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 2 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1920 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15522,14 +15590,14 @@ i32.const 160 i32.const 345 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1944 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 @@ -15537,9 +15605,9 @@ call $~lib/array/Array#splice i32.const 2 i32.const 2 - i32.const 4 + i32.const 17 i32.const 1984 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15548,15 +15616,15 @@ i32.const 160 i32.const 348 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 3 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2008 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15565,14 +15633,14 @@ i32.const 160 i32.const 349 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2040 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 0 @@ -15580,9 +15648,9 @@ call $~lib/array/Array#splice i32.const 1 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2080 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15591,15 +15659,15 @@ i32.const 160 i32.const 352 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 4 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2104 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15608,14 +15676,14 @@ i32.const 160 i32.const 353 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2136 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -1 @@ -15623,9 +15691,9 @@ call $~lib/array/Array#splice i32.const 1 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2176 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15634,15 +15702,15 @@ i32.const 160 i32.const 356 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 4 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2200 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15651,14 +15719,14 @@ i32.const 160 i32.const 357 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2232 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 @@ -15666,9 +15734,9 @@ call $~lib/array/Array#splice i32.const 2 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2272 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15677,15 +15745,15 @@ i32.const 160 i32.const 360 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 3 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2296 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15694,14 +15762,14 @@ i32.const 160 i32.const 361 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2328 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 @@ -15709,9 +15777,9 @@ call $~lib/array/Array#splice i32.const 1 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2368 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15720,15 +15788,15 @@ i32.const 160 i32.const 364 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 4 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2392 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15737,14 +15805,14 @@ i32.const 160 i32.const 365 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2424 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -7 @@ -15752,9 +15820,9 @@ call $~lib/array/Array#splice i32.const 1 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2464 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15763,15 +15831,15 @@ i32.const 160 i32.const 368 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 4 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2488 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15780,14 +15848,14 @@ i32.const 160 i32.const 369 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2520 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 @@ -15795,9 +15863,9 @@ call $~lib/array/Array#splice i32.const 0 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2560 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15806,15 +15874,15 @@ i32.const 160 i32.const 372 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2576 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15823,14 +15891,14 @@ i32.const 160 i32.const 373 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2616 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 1 @@ -15838,9 +15906,9 @@ call $~lib/array/Array#splice i32.const 0 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2656 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15849,15 +15917,15 @@ i32.const 160 i32.const 376 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2672 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15866,14 +15934,14 @@ i32.const 160 i32.const 377 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2712 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 4 @@ -15881,9 +15949,9 @@ call $~lib/array/Array#splice i32.const 0 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2752 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15892,15 +15960,15 @@ i32.const 160 i32.const 380 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2768 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15909,14 +15977,14 @@ i32.const 160 i32.const 381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2808 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 @@ -15924,9 +15992,9 @@ call $~lib/array/Array#splice i32.const 0 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2848 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15935,15 +16003,15 @@ i32.const 160 i32.const 384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2864 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15952,14 +16020,14 @@ i32.const 160 i32.const 385 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2904 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 @@ -15967,9 +16035,9 @@ call $~lib/array/Array#splice i32.const 0 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2944 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15978,15 +16046,15 @@ i32.const 160 i32.const 388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 2960 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15995,7 +16063,7 @@ i32.const 160 i32.const 389 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16027,7 +16095,7 @@ i32.const 160 i32.const 399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16043,7 +16111,7 @@ i32.const 160 i32.const 402 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16059,7 +16127,7 @@ i32.const 160 i32.const 405 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16075,7 +16143,7 @@ i32.const 160 i32.const 413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16088,7 +16156,7 @@ i32.const 160 i32.const 414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16104,7 +16172,7 @@ i32.const 160 i32.const 416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16132,7 +16200,7 @@ i32.const 160 i32.const 429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16145,7 +16213,7 @@ i32.const 160 i32.const 430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16169,7 +16237,7 @@ i32.const 160 i32.const 438 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16185,7 +16253,7 @@ i32.const 160 i32.const 441 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16201,7 +16269,7 @@ i32.const 160 i32.const 449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16214,7 +16282,7 @@ i32.const 160 i32.const 450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16230,7 +16298,7 @@ i32.const 160 i32.const 452 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16258,7 +16326,7 @@ i32.const 160 i32.const 465 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16271,7 +16339,7 @@ i32.const 160 i32.const 466 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16295,7 +16363,7 @@ i32.const 160 i32.const 474 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16311,7 +16379,7 @@ i32.const 160 i32.const 477 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16327,7 +16395,7 @@ i32.const 160 i32.const 485 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16340,7 +16408,7 @@ i32.const 160 i32.const 486 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16356,7 +16424,7 @@ i32.const 160 i32.const 488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16384,7 +16452,7 @@ i32.const 160 i32.const 501 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16397,7 +16465,7 @@ i32.const 160 i32.const 502 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16422,7 +16490,7 @@ i32.const 160 i32.const 511 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -16439,7 +16507,7 @@ i32.const 160 i32.const 520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16452,7 +16520,7 @@ i32.const 160 i32.const 521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -16469,7 +16537,7 @@ i32.const 160 i32.const 524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16498,7 +16566,7 @@ i32.const 160 i32.const 538 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16511,7 +16579,7 @@ i32.const 160 i32.const 539 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16535,7 +16603,7 @@ i32.const 160 i32.const 564 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|0 @@ -16589,7 +16657,7 @@ i32.const 160 i32.const 575 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/newArr @@ -16606,7 +16674,7 @@ i32.const 160 i32.const 576 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -16624,7 +16692,7 @@ i32.const 160 i32.const 585 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16637,7 +16705,7 @@ i32.const 160 i32.const 586 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -16655,7 +16723,7 @@ i32.const 160 i32.const 593 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16685,7 +16753,7 @@ i32.const 160 i32.const 608 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16698,7 +16766,7 @@ i32.const 160 i32.const 609 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16723,7 +16791,7 @@ i32.const 160 i32.const 617 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -16741,7 +16809,7 @@ i32.const 160 i32.const 626 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16754,7 +16822,7 @@ i32.const 160 i32.const 627 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -16772,7 +16840,7 @@ i32.const 160 i32.const 634 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16802,7 +16870,7 @@ i32.const 160 i32.const 649 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16815,7 +16883,7 @@ i32.const 160 i32.const 650 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16840,7 +16908,7 @@ i32.const 160 i32.const 658 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16857,7 +16925,7 @@ i32.const 160 i32.const 662 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16876,7 +16944,7 @@ i32.const 160 i32.const 665 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16895,7 +16963,7 @@ i32.const 160 i32.const 668 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16912,7 +16980,7 @@ i32.const 160 i32.const 676 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16925,7 +16993,7 @@ i32.const 160 i32.const 677 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16942,7 +17010,7 @@ i32.const 160 i32.const 679 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16971,7 +17039,7 @@ i32.const 160 i32.const 692 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -16984,7 +17052,7 @@ i32.const 160 i32.const 693 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17009,7 +17077,7 @@ i32.const 160 i32.const 701 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17026,7 +17094,7 @@ i32.const 160 i32.const 705 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17045,7 +17113,7 @@ i32.const 160 i32.const 708 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17064,7 +17132,7 @@ i32.const 160 i32.const 711 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17081,7 +17149,7 @@ i32.const 160 i32.const 719 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17094,7 +17162,7 @@ i32.const 160 i32.const 720 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17111,7 +17179,7 @@ i32.const 160 i32.const 722 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17140,7 +17208,7 @@ i32.const 160 i32.const 735 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17153,7 +17221,7 @@ i32.const 160 i32.const 736 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17186,9 +17254,9 @@ global.get $std/array/f32ArrayTyped i32.const 8 i32.const 2 - i32.const 9 + i32.const 22 i32.const 3312 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17197,7 +17265,7 @@ i32.const 160 i32.const 824 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -17211,9 +17279,9 @@ global.get $std/array/f64ArrayTyped i32.const 8 i32.const 3 - i32.const 10 + i32.const 23 i32.const 3472 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17222,7 +17290,7 @@ i32.const 160 i32.const 828 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -17236,9 +17304,9 @@ global.get $std/array/i32ArrayTyped i32.const 5 i32.const 2 - i32.const 4 + i32.const 17 i32.const 3624 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17247,7 +17315,7 @@ i32.const 160 i32.const 832 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -17261,9 +17329,9 @@ global.get $std/array/u32ArrayTyped i32.const 5 i32.const 2 - i32.const 8 + i32.const 21 i32.const 3736 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17272,7 +17340,7 @@ i32.const 160 i32.const 836 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 64 @@ -17297,9 +17365,9 @@ global.get $std/array/reversed1 i32.const 1 i32.const 2 - i32.const 4 + i32.const 17 i32.const 4064 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17308,7 +17376,7 @@ i32.const 160 i32.const 856 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed2 @@ -17316,9 +17384,9 @@ global.get $std/array/reversed2 i32.const 2 i32.const 2 - i32.const 4 + i32.const 17 i32.const 4088 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17327,7 +17395,7 @@ i32.const 160 i32.const 859 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed4 @@ -17342,7 +17410,7 @@ i32.const 160 i32.const 862 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed64 @@ -17357,7 +17425,7 @@ i32.const 160 i32.const 865 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed128 @@ -17372,7 +17440,7 @@ i32.const 160 i32.const 868 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed1024 @@ -17387,7 +17455,7 @@ i32.const 160 i32.const 871 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed10000 @@ -17402,7 +17470,7 @@ i32.const 160 i32.const 874 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/randomized512 @@ -17454,7 +17522,7 @@ i32.const 160 i32.const 904 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 400 @@ -17469,9 +17537,9 @@ end i32.const 2 i32.const 0 - i32.const 16 + i32.const 29 i32.const 4560 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 4536 call $~lib/array/Array#join i32.const 4584 @@ -17482,14 +17550,14 @@ i32.const 160 i32.const 913 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 i32.const 2 - i32.const 4 + i32.const 17 i32.const 5128 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 4208 call $~lib/array/Array#join i32.const 5160 @@ -17500,14 +17568,14 @@ i32.const 160 i32.const 914 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 i32.const 2 - i32.const 8 + i32.const 21 i32.const 5248 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 5224 call $~lib/array/Array#join i32.const 5160 @@ -17518,14 +17586,14 @@ i32.const 160 i32.const 915 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 i32.const 2 - i32.const 4 + i32.const 17 i32.const 5328 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 5304 call $~lib/array/Array#join i32.const 5352 @@ -17536,14 +17604,14 @@ i32.const 160 i32.const 916 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 6 i32.const 3 - i32.const 10 + i32.const 23 i32.const 6680 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 5480 call $~lib/array/Array#join i32.const 6744 @@ -17554,14 +17622,14 @@ i32.const 160 i32.const 917 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 i32.const 2 - i32.const 15 + i32.const 28 i32.const 6896 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray i32.const 4208 call $~lib/array/Array<~lib/string/String>#join i32.const 6840 @@ -17572,15 +17640,15 @@ i32.const 160 i32.const 918 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) i32.const 3 i32.const 2 - i32.const 20 + i32.const 33 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.set $0 local.get $0 i32.load offset=4 @@ -17640,7 +17708,7 @@ i32.const 160 i32.const 920 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed0 @@ -17653,7 +17721,7 @@ i32.const 160 i32.const 924 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed1 @@ -17666,7 +17734,7 @@ i32.const 160 i32.const 925 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed2 @@ -17679,7 +17747,7 @@ i32.const 160 i32.const 926 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed4 @@ -17692,14 +17760,14 @@ i32.const 160 i32.const 927 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 i32.const 0 - i32.const 21 + i32.const 34 i32.const 7136 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $~lib/array/Array#toString i32.const 7160 call $~lib/string/String.__eq @@ -17709,14 +17777,14 @@ i32.const 160 i32.const 929 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 i32.const 1 - i32.const 22 + i32.const 35 i32.const 7216 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $~lib/array/Array#toString i32.const 7240 call $~lib/string/String.__eq @@ -17726,14 +17794,14 @@ i32.const 160 i32.const 930 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 i32.const 3 - i32.const 17 + i32.const 30 i32.const 7320 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $~lib/array/Array#toString i32.const 7360 call $~lib/string/String.__eq @@ -17743,14 +17811,14 @@ i32.const 160 i32.const 931 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 i32.const 3 - i32.const 23 + i32.const 36 i32.const 7472 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $~lib/array/Array#toString i32.const 7520 call $~lib/string/String.__eq @@ -17760,7 +17828,7 @@ i32.const 160 i32.const 932 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/randomStringsExpected @@ -17773,14 +17841,14 @@ i32.const 160 i32.const 933 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 i32.const 2 - i32.const 15 + i32.const 28 i32.const 7752 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $~lib/array/Array<~lib/string/String>#toString i32.const 7784 call $~lib/string/String.__eq @@ -17790,15 +17858,15 @@ i32.const 160 i32.const 934 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) i32.const 2 i32.const 2 - i32.const 11 + i32.const 24 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.set $1 local.get $1 i32.load offset=4 @@ -17807,9 +17875,9 @@ block (result i32) i32.const 2 i32.const 2 - i32.const 4 + i32.const 17 i32.const 7840 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.set $2 local.get $2 local.get $1 @@ -17821,9 +17889,9 @@ block (result i32) i32.const 2 i32.const 2 - i32.const 4 + i32.const 17 i32.const 7864 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.set $2 local.get $2 local.get $1 @@ -17844,15 +17912,15 @@ i32.const 160 i32.const 937 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) i32.const 2 i32.const 2 - i32.const 24 + i32.const 37 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.set $0 local.get $0 i32.load offset=4 @@ -17861,9 +17929,9 @@ block (result i32) i32.const 2 i32.const 0 - i32.const 7 + i32.const 20 i32.const 7944 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.set $2 local.get $2 local.get $0 @@ -17875,9 +17943,9 @@ block (result i32) i32.const 2 i32.const 0 - i32.const 7 + i32.const 20 i32.const 7968 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.set $2 local.get $2 local.get $0 @@ -17898,15 +17966,15 @@ i32.const 160 i32.const 940 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) i32.const 1 i32.const 2 - i32.const 26 + i32.const 39 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.set $0 local.get $0 i32.load offset=4 @@ -17916,9 +17984,9 @@ block (result i32) i32.const 1 i32.const 2 - i32.const 25 + i32.const 38 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.set $2 local.get $2 i32.load offset=4 @@ -17927,9 +17995,9 @@ block (result i32) i32.const 1 i32.const 2 - i32.const 8 + i32.const 21 i32.const 8064 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.set $4 local.get $4 local.get $2 @@ -17959,7 +18027,7 @@ i32.const 160 i32.const 943 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -17972,9 +18040,233 @@ global.set $~lib/started end ) - (func $start (; 288 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 288 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + local.get $2 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 289 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 290 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 291 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 292 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 293 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.tee $6 + local.get $1 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + local.get $8 + if + local.get $8 + local.get $6 + call $~lib/collector/dummy/__ref_unlink + end + local.get $7 + local.get $6 + call $~lib/collector/dummy/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 512 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $~lib/collector/dummy/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/Root#constructor (; 294 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 40 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 295 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_link + ) + (func $~lib/runtime/runtime.release (; 296 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_unlink + ) + (func $~lib/collector/dummy/__ref_collect (; 297 ;) (type $FUNCSIG$v) + nop + ) + (func $~lib/runtime/runtime.collect (; 298 ;) (type $FUNCSIG$v) + call $~lib/collector/dummy/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 299 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 300 ;) (type $FUNCSIG$v) call $start:std/array + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT ) - (func $null (; 289 ;) (type $FUNCSIG$v) + (func $null (; 301 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index ceb90c524d..2f794dd4ce 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -5,17 +5,19 @@ (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 56) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 104) "\01\00\00\00$\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 152) "\02\00\00\00\08\00\00\00\01\00\00\00\02") - (data (i32.const 168) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 56) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 104) "\10\00\00\00$\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 152) "\0f\00\00\00\08\00\00\00\01\00\00\00\02") + (data (i32.const 168) "\10\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 208) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 248) "\1d") + (data (i32.const 384) "!\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/arraybuffer/buffer (mut i32) (i32.const 0)) @@ -23,7 +25,15 @@ (global $std/arraybuffer/arr8 (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -322,14 +332,14 @@ (func $~lib/util/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 208 + i32.const 488 i32.le_u if i32.const 0 i32.const 64 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -342,9 +352,9 @@ if i32.const 0 i32.const 64 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -362,7 +372,7 @@ i32.const 16 i32.const 54 i32.const 43 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -371,7 +381,7 @@ local.get $0 call $~lib/memory/memory.fill local.get $1 - i32.const 2 + i32.const 15 call $~lib/util/runtime/register ) (func $~lib/memory/memory.copy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -612,7 +622,7 @@ local.get $2 call $~lib/memory/memory.copy local.get $3 - i32.const 2 + i32.const 15 call $~lib/util/runtime/register ) (func $~lib/arraybuffer/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -627,7 +637,7 @@ i32.const 16 i32.const 12 i32.const 57 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -641,7 +651,7 @@ if i32.const 12 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 14 call $~lib/util/runtime/register local.set $0 end @@ -665,17 +675,17 @@ i32.store offset=8 local.get $0 ) - (func $~lib/runtime/runtime.newArray (; 9 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/util/runtime/makeArray (; 9 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) i32.const 16 call $~lib/util/runtime/allocate - i32.const 5 + i32.const 17 call $~lib/util/runtime/register local.tee $0 i32.const 8 call $~lib/util/runtime/allocate - i32.const 2 + i32.const 15 call $~lib/util/runtime/register local.tee $1 i32.store @@ -711,12 +721,12 @@ i32.const 176 i32.const 21 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 12 call $~lib/util/runtime/allocate - i32.const 7 + i32.const 29 call $~lib/util/runtime/register local.tee $2 i32.const 0 @@ -761,7 +771,7 @@ call $~lib/dataview/DataView#constructor ) (func $start:std/arraybuffer (; 12 ;) (type $FUNCSIG$v) - i32.const 208 + i32.const 488 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -779,7 +789,7 @@ i32.const 112 i32.const 3 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -798,7 +808,7 @@ i32.const 112 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/sliced @@ -809,7 +819,7 @@ i32.const 112 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -828,7 +838,7 @@ i32.const 112 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -847,7 +857,7 @@ i32.const 112 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -866,7 +876,7 @@ i32.const 112 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -885,7 +895,7 @@ i32.const 112 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -904,7 +914,7 @@ i32.const 112 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -923,7 +933,7 @@ i32.const 112 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -940,7 +950,7 @@ i32.const 112 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/sliced @@ -950,17 +960,17 @@ i32.const 112 i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 12 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 19 call $~lib/util/runtime/register i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor global.set $std/arraybuffer/arr8 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray drop global.get $std/arraybuffer/arr8 if (result i32) @@ -974,14 +984,14 @@ i32.const 112 i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array>11 (result i32) i32.const 1 i32.const 12 call $~lib/util/runtime/allocate - i32.const 6 + i32.const 23 call $~lib/util/runtime/register i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor @@ -995,7 +1005,7 @@ i32.const 112 i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1015,14 +1025,197 @@ i32.const 112 i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 8 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 248 + i32.load + i32.le_u + else + local.get $0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 248 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + local.tee $1 + i32.eqz + if + local.get $0 + i32.const 248 + i32.load + i32.gt_u + local.set $1 + end + local.get $1 + if (result i32) unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 248 + i32.add + i32.load end ) - (func $start (; 13 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.newObject (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + i32.const 248 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 248 + i32.add + i32.load + end + local.tee $3 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 8 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $2 + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $3 + i32.const 512 + i32.and + if + local.get $1 + local.get $2 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + if + i32.const 0 + i32.const 216 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 20 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 216 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $start (; 21 ;) (type $FUNCSIG$v) call $start:std/arraybuffer ) - (func $null (; 14 ;) (type $FUNCSIG$v) + (func $null (; 22 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 00dee2f80f..825e15de7d 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -6,13 +6,16 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 56) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 104) "\01\00\00\00$\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 152) "\02\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 168) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 56) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 104) "\10\00\00\00$\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 152) "\0f\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 168) "\10\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 208) "\10\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 248) "\1d\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) @@ -25,9 +28,18 @@ (global $std/arraybuffer/sliced (mut i32) (i32.const 0)) (global $std/arraybuffer/arr8 (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 208)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 248)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 488)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -407,9 +419,9 @@ if i32.const 0 i32.const 64 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -424,9 +436,9 @@ if i32.const 0 i32.const 64 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -444,7 +456,7 @@ i32.const 16 i32.const 54 i32.const 43 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -455,7 +467,7 @@ local.get $1 call $~lib/memory/memory.fill local.get $2 - i32.const 2 + i32.const 15 call $~lib/util/runtime/register ) (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -753,7 +765,7 @@ local.get $6 call $~lib/memory/memory.copy local.get $7 - i32.const 2 + i32.const 15 call $~lib/util/runtime/register ) (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array> (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -1338,7 +1350,7 @@ i32.const 16 i32.const 12 i32.const 57 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1354,7 +1366,7 @@ if i32.const 12 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 14 call $~lib/util/runtime/register local.set $0 end @@ -1386,7 +1398,7 @@ else i32.const 12 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 19 call $~lib/util/runtime/register end local.get $1 @@ -1395,7 +1407,7 @@ local.set $0 local.get $0 ) - (func $~lib/runtime/runtime.newArray (; 18 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/runtime/makeArray (; 18 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1410,7 +1422,7 @@ local.set $5 local.get $5 call $~lib/util/runtime/allocate - i32.const 2 + i32.const 15 call $~lib/util/runtime/register local.set $6 local.get $4 @@ -1441,7 +1453,7 @@ else i32.const 12 call $~lib/util/runtime/allocate - i32.const 6 + i32.const 23 call $~lib/util/runtime/register end local.get $1 @@ -1467,7 +1479,7 @@ i32.const 176 i32.const 21 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -1476,7 +1488,7 @@ if i32.const 12 call $~lib/util/runtime/allocate - i32.const 7 + i32.const 29 call $~lib/util/runtime/register local.set $0 end @@ -1559,7 +1571,7 @@ i32.const 112 i32.const 3 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -1577,7 +1589,7 @@ i32.const 112 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/sliced @@ -1589,7 +1601,7 @@ i32.const 112 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -1607,7 +1619,7 @@ i32.const 112 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -1625,7 +1637,7 @@ i32.const 112 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -1643,7 +1655,7 @@ i32.const 112 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -1661,7 +1673,7 @@ i32.const 112 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -1679,7 +1691,7 @@ i32.const 112 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -1697,7 +1709,7 @@ i32.const 112 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -1715,7 +1727,7 @@ i32.const 112 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/sliced @@ -1727,7 +1739,7 @@ i32.const 112 i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1739,7 +1751,7 @@ i32.const 112 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1751,7 +1763,7 @@ i32.const 112 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1763,7 +1775,7 @@ i32.const 112 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1775,7 +1787,7 @@ i32.const 112 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1787,7 +1799,7 @@ i32.const 112 i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1796,9 +1808,9 @@ global.set $std/arraybuffer/arr8 i32.const 2 i32.const 2 - i32.const 5 + i32.const 17 i32.const 160 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array> i32.eqz i32.eqz @@ -1807,7 +1819,7 @@ i32.const 112 i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/arr8 @@ -1818,7 +1830,7 @@ i32.const 112 i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1831,7 +1843,7 @@ i32.const 112 i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -1851,13 +1863,207 @@ i32.const 112 i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start (; 24 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + local.get $2 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 512 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $7 + block $break|0 + loop $continue|0 + local.get $6 + local.get $7 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $8 + local.get $8 + if + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 216 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/runtime.retain (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.release (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 32 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 216 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/runtime/runtime#constructor (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 34 ;) (type $FUNCSIG$v) call $start:std/arraybuffer ) - (func $null (; 25 ;) (type $FUNCSIG$v) + (func $null (; 35 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index cec7a2f001..7d084c702b 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -13,22 +13,32 @@ (type $FUNCSIG$vifi (func (param i32 f32 i32))) (type $FUNCSIG$vidi (func (param i32 f64 i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 56) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 104) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 152) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") - (data (i32.const 192) "\01\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 56) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 104) "\10\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 152) "\10\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 192) "\10\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 232) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 272) "\13") + (data (i32.const 412) "\0e") + (data (i32.const 424) "!\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/dataview/array (mut i32) (i32.const 0)) (global $std/dataview/view (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -160,14 +170,14 @@ (func $~lib/util/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 232 + i32.const 432 i32.le_u if i32.const 0 i32.const 64 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -180,9 +190,9 @@ if i32.const 0 i32.const 64 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -197,7 +207,7 @@ local.tee $1 call $~lib/memory/memory.fill local.get $1 - i32.const 2 + i32.const 15 call $~lib/util/runtime/register local.set $1 local.get $0 @@ -205,7 +215,7 @@ if i32.const 12 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 14 call $~lib/util/runtime/register local.set $0 end @@ -239,7 +249,7 @@ i32.const 112 i32.const 116 i32.const 44 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -268,12 +278,12 @@ i32.const 160 i32.const 21 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 12 call $~lib/util/runtime/allocate - i32.const 5 + i32.const 18 call $~lib/util/runtime/register local.tee $3 i32.const 0 @@ -313,7 +323,7 @@ i32.const 160 i32.const 44 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -379,7 +389,7 @@ i32.const 160 i32.const 58 i32.const 7 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -405,7 +415,7 @@ i32.const 160 i32.const 69 i32.const 49 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -430,7 +440,7 @@ i32.const 160 i32.const 77 i32.const 7 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -472,7 +482,7 @@ i32.const 160 i32.const 86 i32.const 7 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -509,7 +519,7 @@ i32.const 160 i32.const 180 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -534,7 +544,7 @@ i32.const 160 i32.const 92 i32.const 49 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -559,7 +569,7 @@ i32.const 160 i32.const 100 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -599,7 +609,7 @@ i32.const 160 i32.const 109 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -636,7 +646,7 @@ i32.const 160 i32.const 189 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -661,7 +671,7 @@ i32.const 160 i32.const 118 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -699,7 +709,7 @@ i32.const 160 i32.const 127 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -727,7 +737,7 @@ i32.const 160 i32.const 133 i32.const 49 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -745,7 +755,7 @@ i32.const 160 i32.const 141 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -781,7 +791,7 @@ i32.const 160 i32.const 149 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -817,7 +827,7 @@ i32.const 160 i32.const 198 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -841,7 +851,7 @@ i32.const 160 i32.const 154 i32.const 49 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -859,7 +869,7 @@ i32.const 160 i32.const 162 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -893,7 +903,7 @@ i32.const 160 i32.const 170 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -929,7 +939,7 @@ i32.const 160 i32.const 206 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -968,13 +978,13 @@ ) (func $start:std/dataview (; 30 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 232 + i32.const 432 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 12 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 17 call $~lib/util/runtime/register call $~lib/arraybuffer/ArrayBufferView#constructor global.set $std/dataview/array @@ -1033,7 +1043,7 @@ i32.const 200 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1047,7 +1057,7 @@ i32.const 200 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1061,7 +1071,7 @@ i32.const 200 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1075,7 +1085,7 @@ i32.const 200 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1089,7 +1099,7 @@ i32.const 200 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1103,7 +1113,7 @@ i32.const 200 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1117,7 +1127,7 @@ i32.const 200 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1131,7 +1141,7 @@ i32.const 200 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1145,7 +1155,7 @@ i32.const 200 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1159,7 +1169,7 @@ i32.const 200 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1172,7 +1182,7 @@ i32.const 200 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1185,7 +1195,7 @@ i32.const 200 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1198,7 +1208,7 @@ i32.const 200 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1211,7 +1221,7 @@ i32.const 200 i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1224,7 +1234,7 @@ i32.const 200 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1237,7 +1247,7 @@ i32.const 200 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1250,7 +1260,7 @@ i32.const 200 i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1263,7 +1273,7 @@ i32.const 200 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1276,7 +1286,7 @@ i32.const 200 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1289,7 +1299,7 @@ i32.const 200 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1305,7 +1315,7 @@ i32.const 200 i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1321,7 +1331,7 @@ i32.const 200 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1337,7 +1347,7 @@ i32.const 200 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1353,7 +1363,7 @@ i32.const 200 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1369,7 +1379,7 @@ i32.const 200 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1385,7 +1395,7 @@ i32.const 200 i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1401,7 +1411,7 @@ i32.const 200 i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1417,7 +1427,7 @@ i32.const 200 i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1433,7 +1443,7 @@ i32.const 200 i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1449,7 +1459,7 @@ i32.const 200 i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1465,7 +1475,7 @@ i32.const 200 i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1481,7 +1491,7 @@ i32.const 200 i32.const 50 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1497,7 +1507,7 @@ i32.const 200 i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1513,7 +1523,7 @@ i32.const 200 i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1527,7 +1537,7 @@ i32.const 200 i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1541,7 +1551,7 @@ i32.const 200 i32.const 55 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1555,7 +1565,7 @@ i32.const 200 i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1569,7 +1579,7 @@ i32.const 200 i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1583,7 +1593,7 @@ i32.const 200 i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1597,7 +1607,7 @@ i32.const 200 i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1611,7 +1621,7 @@ i32.const 200 i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1625,7 +1635,7 @@ i32.const 200 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1639,7 +1649,7 @@ i32.const 200 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1653,7 +1663,7 @@ i32.const 200 i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1666,7 +1676,7 @@ i32.const 200 i32.const 66 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1679,7 +1689,7 @@ i32.const 200 i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1692,7 +1702,7 @@ i32.const 200 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1705,7 +1715,7 @@ i32.const 200 i32.const 70 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1718,7 +1728,7 @@ i32.const 200 i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1731,7 +1741,7 @@ i32.const 200 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1744,7 +1754,7 @@ i32.const 200 i32.const 73 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1757,7 +1767,7 @@ i32.const 200 i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1770,7 +1780,7 @@ i32.const 200 i32.const 75 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1783,7 +1793,7 @@ i32.const 200 i32.const 76 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1799,7 +1809,7 @@ i32.const 200 i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1815,7 +1825,7 @@ i32.const 200 i32.const 79 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1831,7 +1841,7 @@ i32.const 200 i32.const 80 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1847,7 +1857,7 @@ i32.const 200 i32.const 81 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1863,7 +1873,7 @@ i32.const 200 i32.const 82 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1879,7 +1889,7 @@ i32.const 200 i32.const 83 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1895,7 +1905,7 @@ i32.const 200 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1911,7 +1921,7 @@ i32.const 200 i32.const 86 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1927,7 +1937,7 @@ i32.const 200 i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1943,7 +1953,7 @@ i32.const 200 i32.const 88 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1959,7 +1969,7 @@ i32.const 200 i32.const 89 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1975,7 +1985,7 @@ i32.const 200 i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1991,7 +2001,7 @@ i32.const 200 i32.const 91 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2007,7 +2017,7 @@ i32.const 200 i32.const 92 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2021,7 +2031,7 @@ i32.const 200 i32.const 94 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2035,7 +2045,7 @@ i32.const 200 i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2049,7 +2059,7 @@ i32.const 200 i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2063,7 +2073,7 @@ i32.const 200 i32.const 97 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2077,7 +2087,7 @@ i32.const 200 i32.const 98 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2091,7 +2101,7 @@ i32.const 200 i32.const 100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2105,7 +2115,7 @@ i32.const 200 i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2119,7 +2129,7 @@ i32.const 200 i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2133,7 +2143,7 @@ i32.const 200 i32.const 103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2147,7 +2157,7 @@ i32.const 200 i32.const 104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2160,7 +2170,7 @@ i32.const 200 i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2173,7 +2183,7 @@ i32.const 200 i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2191,7 +2201,7 @@ i32.const 200 i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2209,7 +2219,7 @@ i32.const 200 i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2226,7 +2236,7 @@ i32.const 200 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2243,7 +2253,7 @@ i32.const 200 i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2258,7 +2268,7 @@ i32.const 200 i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2278,7 +2288,7 @@ i32.const 200 i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2298,7 +2308,7 @@ i32.const 200 i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2316,7 +2326,7 @@ i32.const 200 i32.const 131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2334,7 +2344,7 @@ i32.const 200 i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2351,7 +2361,7 @@ i32.const 200 i32.const 137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2368,7 +2378,7 @@ i32.const 200 i32.const 140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2383,7 +2393,7 @@ i32.const 200 i32.const 143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2403,7 +2413,7 @@ i32.const 200 i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2423,7 +2433,7 @@ i32.const 200 i32.const 149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2441,7 +2451,7 @@ i32.const 200 i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2459,7 +2469,7 @@ i32.const 200 i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2476,7 +2486,7 @@ i32.const 200 i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2493,7 +2503,7 @@ i32.const 200 i32.const 161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -2513,7 +2523,7 @@ i32.const 200 i32.const 164 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2525,14 +2535,197 @@ i32.const 200 i32.const 165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 8 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 272 + i32.load + i32.le_u + else + local.get $0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 272 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + local.tee $1 + i32.eqz + if + local.get $0 + i32.const 272 + i32.load + i32.gt_u + local.set $1 + end + local.get $1 + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 272 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + i32.const 272 + i32.load + i32.gt_u + end + if (result i32) unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 272 + i32.add + i32.load + end + local.tee $3 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 8 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 end + local.set $2 + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $3 + i32.const 512 + i32.and + if + local.get $1 + local.get $2 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + if + i32.const 0 + i32.const 240 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 38 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 240 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable ) - (func $start (; 31 ;) (type $FUNCSIG$v) + (func $start (; 39 ;) (type $FUNCSIG$v) call $start:std/dataview ) - (func $null (; 32 ;) (type $FUNCSIG$v) + (func $null (; 40 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index caabcb0149..cdb5839d45 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -13,13 +13,16 @@ (type $FUNCSIG$viidi (func (param i32 i32 f64 i32))) (type $FUNCSIG$viiji (func (param i32 i32 i64 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 56) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 104) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 152) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") - (data (i32.const 192) "\01\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 56) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 104) "\10\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 152) "\10\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 192) "\10\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 232) "\10\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 272) "\13\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) @@ -31,9 +34,18 @@ (global $std/dataview/array (mut i32) (i32.const 0)) (global $std/dataview/view (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 232)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 272)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 432)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -413,9 +425,9 @@ if i32.const 0 i32.const 64 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -430,9 +442,9 @@ if i32.const 0 i32.const 64 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -450,7 +462,7 @@ i32.const 16 i32.const 54 i32.const 43 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -461,7 +473,7 @@ local.get $1 call $~lib/memory/memory.fill local.get $2 - i32.const 2 + i32.const 15 call $~lib/util/runtime/register ) (func $~lib/arraybuffer/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -476,7 +488,7 @@ i32.const 16 i32.const 12 i32.const 57 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -492,7 +504,7 @@ if i32.const 12 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 14 call $~lib/util/runtime/register local.set $0 end @@ -524,7 +536,7 @@ else i32.const 12 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 17 call $~lib/util/runtime/register end local.get $1 @@ -543,7 +555,7 @@ i32.const 112 i32.const 116 i32.const 44 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -576,7 +588,7 @@ i32.const 160 i32.const 21 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -585,7 +597,7 @@ if i32.const 12 call $~lib/util/runtime/allocate - i32.const 5 + i32.const 18 call $~lib/util/runtime/register local.set $0 end @@ -659,7 +671,7 @@ i32.const 160 i32.const 44 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -736,7 +748,7 @@ i32.const 160 i32.const 58 i32.const 7 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -768,7 +780,7 @@ i32.const 160 i32.const 69 i32.const 49 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -810,7 +822,7 @@ i32.const 160 i32.const 77 i32.const 7 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -860,7 +872,7 @@ i32.const 160 i32.const 86 i32.const 7 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -935,7 +947,7 @@ i32.const 160 i32.const 180 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -964,7 +976,7 @@ i32.const 160 i32.const 92 i32.const 49 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1004,7 +1016,7 @@ i32.const 160 i32.const 100 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1040,7 +1052,7 @@ i32.const 160 i32.const 109 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1076,7 +1088,7 @@ i32.const 160 i32.const 189 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1111,7 +1123,7 @@ i32.const 160 i32.const 118 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1151,7 +1163,7 @@ i32.const 160 i32.const 127 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1185,7 +1197,7 @@ i32.const 160 i32.const 133 i32.const 49 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1211,7 +1223,7 @@ i32.const 160 i32.const 141 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1245,7 +1257,7 @@ i32.const 160 i32.const 149 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1279,7 +1291,7 @@ i32.const 160 i32.const 198 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1307,7 +1319,7 @@ i32.const 160 i32.const 154 i32.const 49 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1333,7 +1345,7 @@ i32.const 160 i32.const 162 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1367,7 +1379,7 @@ i32.const 160 i32.const 170 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1401,7 +1413,7 @@ i32.const 160 i32.const 206 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1523,7 +1535,7 @@ i32.const 200 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1538,7 +1550,7 @@ i32.const 200 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1553,7 +1565,7 @@ i32.const 200 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1568,7 +1580,7 @@ i32.const 200 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1583,7 +1595,7 @@ i32.const 200 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1598,7 +1610,7 @@ i32.const 200 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1613,7 +1625,7 @@ i32.const 200 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1628,7 +1640,7 @@ i32.const 200 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1643,7 +1655,7 @@ i32.const 200 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1658,7 +1670,7 @@ i32.const 200 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1673,7 +1685,7 @@ i32.const 200 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1688,7 +1700,7 @@ i32.const 200 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1702,7 +1714,7 @@ i32.const 200 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1716,7 +1728,7 @@ i32.const 200 i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1730,7 +1742,7 @@ i32.const 200 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1744,7 +1756,7 @@ i32.const 200 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1758,7 +1770,7 @@ i32.const 200 i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1772,7 +1784,7 @@ i32.const 200 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1786,7 +1798,7 @@ i32.const 200 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1800,7 +1812,7 @@ i32.const 200 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1819,7 +1831,7 @@ i32.const 200 i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1838,7 +1850,7 @@ i32.const 200 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1857,7 +1869,7 @@ i32.const 200 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1876,7 +1888,7 @@ i32.const 200 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1895,7 +1907,7 @@ i32.const 200 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1914,7 +1926,7 @@ i32.const 200 i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1933,7 +1945,7 @@ i32.const 200 i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1952,7 +1964,7 @@ i32.const 200 i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1971,7 +1983,7 @@ i32.const 200 i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1990,7 +2002,7 @@ i32.const 200 i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2009,7 +2021,7 @@ i32.const 200 i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2028,7 +2040,7 @@ i32.const 200 i32.const 50 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2047,7 +2059,7 @@ i32.const 200 i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2066,7 +2078,7 @@ i32.const 200 i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2081,7 +2093,7 @@ i32.const 200 i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2096,7 +2108,7 @@ i32.const 200 i32.const 55 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2111,7 +2123,7 @@ i32.const 200 i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2126,7 +2138,7 @@ i32.const 200 i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2141,7 +2153,7 @@ i32.const 200 i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2156,7 +2168,7 @@ i32.const 200 i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2171,7 +2183,7 @@ i32.const 200 i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2186,7 +2198,7 @@ i32.const 200 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2201,7 +2213,7 @@ i32.const 200 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2216,7 +2228,7 @@ i32.const 200 i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2231,7 +2243,7 @@ i32.const 200 i32.const 66 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2246,7 +2258,7 @@ i32.const 200 i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2260,7 +2272,7 @@ i32.const 200 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2274,7 +2286,7 @@ i32.const 200 i32.const 70 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2288,7 +2300,7 @@ i32.const 200 i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2302,7 +2314,7 @@ i32.const 200 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2316,7 +2328,7 @@ i32.const 200 i32.const 73 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2330,7 +2342,7 @@ i32.const 200 i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2344,7 +2356,7 @@ i32.const 200 i32.const 75 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2358,7 +2370,7 @@ i32.const 200 i32.const 76 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2375,7 +2387,7 @@ i32.const 200 i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2392,7 +2404,7 @@ i32.const 200 i32.const 79 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2409,7 +2421,7 @@ i32.const 200 i32.const 80 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2426,7 +2438,7 @@ i32.const 200 i32.const 81 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2443,7 +2455,7 @@ i32.const 200 i32.const 82 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2460,7 +2472,7 @@ i32.const 200 i32.const 83 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2477,7 +2489,7 @@ i32.const 200 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2494,7 +2506,7 @@ i32.const 200 i32.const 86 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2511,7 +2523,7 @@ i32.const 200 i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2528,7 +2540,7 @@ i32.const 200 i32.const 88 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2545,7 +2557,7 @@ i32.const 200 i32.const 89 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2562,7 +2574,7 @@ i32.const 200 i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2579,7 +2591,7 @@ i32.const 200 i32.const 91 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2596,7 +2608,7 @@ i32.const 200 i32.const 92 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2611,7 +2623,7 @@ i32.const 200 i32.const 94 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2626,7 +2638,7 @@ i32.const 200 i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2641,7 +2653,7 @@ i32.const 200 i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2656,7 +2668,7 @@ i32.const 200 i32.const 97 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2671,7 +2683,7 @@ i32.const 200 i32.const 98 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2686,7 +2698,7 @@ i32.const 200 i32.const 100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2701,7 +2713,7 @@ i32.const 200 i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2716,7 +2728,7 @@ i32.const 200 i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2731,7 +2743,7 @@ i32.const 200 i32.const 103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2746,7 +2758,7 @@ i32.const 200 i32.const 104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2761,7 +2773,7 @@ i32.const 200 i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2776,7 +2788,7 @@ i32.const 200 i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2796,7 +2808,7 @@ i32.const 200 i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2816,7 +2828,7 @@ i32.const 200 i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2836,7 +2848,7 @@ i32.const 200 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2856,7 +2868,7 @@ i32.const 200 i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2874,7 +2886,7 @@ i32.const 200 i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2898,7 +2910,7 @@ i32.const 200 i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2922,7 +2934,7 @@ i32.const 200 i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2942,7 +2954,7 @@ i32.const 200 i32.const 131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2962,7 +2974,7 @@ i32.const 200 i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2982,7 +2994,7 @@ i32.const 200 i32.const 137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3002,7 +3014,7 @@ i32.const 200 i32.const 140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3020,7 +3032,7 @@ i32.const 200 i32.const 143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3042,7 +3054,7 @@ i32.const 200 i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3064,7 +3076,7 @@ i32.const 200 i32.const 149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3084,7 +3096,7 @@ i32.const 200 i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3104,7 +3116,7 @@ i32.const 200 i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3124,7 +3136,7 @@ i32.const 200 i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3144,7 +3156,7 @@ i32.const 200 i32.const 161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -3168,7 +3180,7 @@ i32.const 200 i32.const 164 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3181,13 +3193,207 @@ i32.const 200 i32.const 165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + local.get $2 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 512 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $7 + block $break|0 + loop $continue|0 + local.get $6 + local.get $7 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $8 + local.get $8 + if + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 240 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end end + local.get $5 + ) + (func $~lib/runtime/runtime.retain (; 52 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.release (; 53 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 54 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 240 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/runtime/runtime#constructor (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable ) - (func $start (; 46 ;) (type $FUNCSIG$v) + (func $start (; 56 ;) (type $FUNCSIG$v) call $start:std/dataview ) - (func $null (; 47 ;) (type $FUNCSIG$v) + (func $null (; 57 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 8cea4628ab..961665f032 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -3,21 +3,32 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$d (func (result f64))) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) + (type $FUNCSIG$vi (func (param i32))) (import "Date" "UTC" (func $~lib/bindings/Date/UTC (param i32 i32 i32 i32 i32 i32 f64) (result f64))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "Date" "now" (func $~lib/bindings/Date/now (result f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\16\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s") - (data (i32.const 40) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\16\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s") + (data (i32.const 40) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 88) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 128) "\12") + (data (i32.const 272) "!\00\00\00\0e") (global $std/date/creationTime (mut i64) (i64.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/date/date (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -81,40 +92,61 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/util/runtime/register (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 7 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add + ) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - i32.const 88 + i32.const 280 i32.le_u if i32.const 0 i32.const 48 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 8 i32.sub - local.tee $1 + local.tee $2 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 48 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + local.get $2 local.get $1 - i32.const 2 i32.store local.get $0 ) - (func $start:std/date (; 5 ;) (type $FUNCSIG$v) + (func $start:std/date (; 6 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 1970 @@ -133,7 +165,7 @@ i32.const 16 i32.const 1 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1970 @@ -152,7 +184,7 @@ i32.const 16 i32.const 2 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2018 @@ -173,7 +205,7 @@ i32.const 16 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $~lib/bindings/Date/now @@ -185,26 +217,18 @@ i32.const 16 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 88 + i32.const 280 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset global.get $std/date/creationTime local.set $1 - i32.const 16 - call $~lib/allocator/arena/__mem_allocate - local.tee $0 - i32.const -1520547049 - i32.store - local.get $0 - i32.const 8 - i32.store offset=4 - local.get $0 i32.const 8 - i32.add + call $~lib/util/runtime/allocate + i32.const 17 call $~lib/util/runtime/register local.tee $0 i64.const 0 @@ -223,33 +247,216 @@ i32.const 16 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/date/date - local.tee $0 global.get $std/date/creationTime i64.const 1 i64.add - local.tee $1 i64.store - local.get $0 + global.get $std/date/date i64.load - local.get $1 + global.get $std/date/creationTime + i64.const 1 + i64.add i64.ne if i32.const 0 i32.const 16 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 8 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 128 + i32.load + i32.le_u + else + local.get $0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 128 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + local.tee $1 + i32.eqz + if + local.get $0 + i32.const 128 + i32.load + i32.gt_u + local.set $1 + end + local.get $1 + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 128 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + i32.const 128 + i32.load + i32.gt_u + end + if (result i32) unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 128 + i32.add + i32.load end + local.tee $3 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 8 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $2 + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $3 + i32.const 512 + i32.and + if + local.get $1 + local.get $2 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + if + i32.const 0 + i32.const 96 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 14 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 96 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable ) - (func $start (; 6 ;) (type $FUNCSIG$v) + (func $start (; 15 ;) (type $FUNCSIG$v) call $start:std/date ) - (func $null (; 7 ;) (type $FUNCSIG$v) + (func $null (; 16 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index c226b9a8d9..66285d60e3 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -8,12 +8,15 @@ (type $FUNCSIG$ji (func (param i32) (result i64))) (type $FUNCSIG$jij (func (param i32 i64) (result i64))) (type $FUNCSIG$v (func)) + (type $FUNCSIG$vi (func (param i32))) (import "Date" "UTC" (func $~lib/bindings/Date/UTC (param i32 i32 i32 i32 i32 i32 f64) (result f64))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "Date" "now" (func $~lib/bindings/Date/now (result f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\16\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s\00") - (data (i32.const 40) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\16\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s\00") + (data (i32.const 40) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 88) "\10\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 128) "\12\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/date/creationTime (mut i64) (i64.const 0)) @@ -23,9 +26,18 @@ (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/date/date (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 88)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 128)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 280)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) (func $~lib/util/runtime/adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -148,9 +160,9 @@ if i32.const 0 i32.const 48 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -165,9 +177,9 @@ if i32.const 0 i32.const 48 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -182,7 +194,7 @@ if i32.const 8 call $~lib/util/runtime/allocate - i32.const 2 + i32.const 17 call $~lib/util/runtime/register local.set $0 end @@ -247,7 +259,7 @@ i32.const 16 i32.const 1 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/date/Date.UTC|inlined.1 (result i64) @@ -284,7 +296,7 @@ i32.const 16 i32.const 2 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/date/Date.UTC|inlined.2 (result i64) @@ -323,7 +335,7 @@ i32.const 16 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/date/Date.now|inlined.0 (result i64) @@ -338,7 +350,7 @@ i32.const 16 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/memory/HEAP_BASE @@ -365,7 +377,7 @@ i32.const 16 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/date/date @@ -386,13 +398,213 @@ i32.const 16 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start (; 12 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + local.get $2 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 512 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $7 + block $break|0 + loop $continue|0 + local.get $6 + local.get $7 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $8 + local.get $8 + if + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 96 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/runtime.retain (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.release (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 21 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 96 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/runtime/runtime#constructor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 23 ;) (type $FUNCSIG$v) call $start:std/date ) - (func $null (; 13 ;) (type $FUNCSIG$v) + (func $null (; 24 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/hash.optimized.wat b/tests/compiler/std/hash.optimized.wat index c544cb7b59..6bb84d521c 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -3,14 +3,11 @@ (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\01") - (data (i32.const 16) "\01\00\00\00\02\00\00\00a") - (data (i32.const 32) "\01\00\00\00\04\00\00\00a\00b") - (data (i32.const 48) "\01\00\00\00\06\00\00\00a\00b\00c") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10") + (data (i32.const 16) "\10\00\00\00\02\00\00\00a") + (data (i32.const 32) "\10\00\00\00\04\00\00\00a\00b") + (data (i32.const 48) "\10\00\00\00\06\00\00\00a\00b\00c") (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $~lib/util/hash/hashStr (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index 33697e2ff4..85478d254d 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -3,16 +3,14 @@ (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\00\00\00\00") - (data (i32.const 16) "\01\00\00\00\02\00\00\00a\00") - (data (i32.const 32) "\01\00\00\00\04\00\00\00a\00b\00") - (data (i32.const 48) "\01\00\00\00\06\00\00\00a\00b\00c\00") + (data (i32.const 8) "\10\00\00\00\00\00\00\00") + (data (i32.const 16) "\10\00\00\00\02\00\00\00a\00") + (data (i32.const 32) "\10\00\00\00\04\00\00\00a\00b\00") + (data (i32.const 48) "\10\00\00\00\06\00\00\00a\00b\00c\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $~lib/string/String#get:length (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index f9c83f5c55..3ac8166d55 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -5,8 +5,6 @@ (type $FUNCSIG$fd (func (param f64) (result f32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $std/libm/E f64 (f64.const 2.718281828459045)) (global $std/libm/LN10 f64 (f64.const 2.302585092994046)) (global $std/libm/LN2 f64 (f64.const 0.6931471805599453)) @@ -16,7 +14,6 @@ (global $std/libm/SQRT1_2 f64 (f64.const 0.7071067811865476)) (global $std/libm/SQRT2 f64 (f64.const 1.4142135623730951)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "E" (global $std/libm/E)) (export "LN10" (global $std/libm/LN10)) (export "LN2" (global $std/libm/LN2)) diff --git a/tests/compiler/std/libm.untouched.wat b/tests/compiler/std/libm.untouched.wat index 5d0679607f..2a93d70e19 100644 --- a/tests/compiler/std/libm.untouched.wat +++ b/tests/compiler/std/libm.untouched.wat @@ -25,9 +25,7 @@ (global $~lib/math/NativeMath.SQRT2 f64 (f64.const 1.4142135623730951)) (global $std/libm/SQRT2 f64 (f64.const 1.4142135623730951)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "E" (global $std/libm/E)) (export "LN10" (global $std/libm/LN10)) (export "LN2" (global $std/libm/LN2)) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index cd823e7241..ec3443128b 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -21,21 +21,30 @@ (type $FUNCSIG$vij (func (param i32 i64))) (type $FUNCSIG$vif (func (param i32 f32))) (type $FUNCSIG$vid (func (param i32 f64))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(") + (data (i32.const 8) "\10\00\00\00(") (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 64) "\02\00\00\00&") + (data (i32.const 64) "\10\00\00\00&") (data (i32.const 80) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 120) "\02\00\00\00\14") + (data (i32.const 120) "\10\00\00\00\14") (data (i32.const 136) "s\00t\00d\00/\00m\00a\00p\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 160) "\1c") + (data (i32.const 296) "$\04\00\00\00\00\00\00$\04\00\00\00\00\00\00$\08\00\00\00\00\00\00$\08\00\00\00\00\00\00$\10\00\00\00\00\00\00$\10\00\00\00\00\00\00$ \00\00\00\00\00\00$ \00\00\00\00\00\00$\10\00\00\00\00\00\00$ \00\00\00\00\00\00!\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -130,14 +139,14 @@ (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 156 + i32.const 392 i32.le_u if i32.const 0 i32.const 24 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -150,9 +159,9 @@ if i32.const 0 i32.const 24 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -381,7 +390,7 @@ i32.const 80 i32.const 54 i32.const 43 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -390,7 +399,7 @@ local.get $0 call $~lib/memory/memory.fill local.get $1 - i32.const 3 + i32.const 15 call $~lib/util/runtime/register ) (func $~lib/map/Map#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) @@ -432,7 +441,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -832,7 +841,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -854,7 +863,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -873,7 +882,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -894,7 +903,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -913,7 +922,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -932,7 +941,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -954,7 +963,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -973,7 +982,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -994,7 +1003,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1013,7 +1022,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1032,7 +1041,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1046,7 +1055,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -1067,7 +1076,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1085,7 +1094,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1107,7 +1116,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1121,7 +1130,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -1142,7 +1151,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1154,7 +1163,7 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -1162,7 +1171,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 18 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -1509,7 +1518,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1529,7 +1538,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1546,7 +1555,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -1567,7 +1576,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1586,7 +1595,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1603,7 +1612,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1623,7 +1632,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1640,7 +1649,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -1661,7 +1670,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1680,7 +1689,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1697,7 +1706,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1711,7 +1720,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -1732,7 +1741,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1750,7 +1759,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1770,7 +1779,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1784,7 +1793,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -1805,7 +1814,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1817,7 +1826,7 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -1825,7 +1834,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 5 + i32.const 19 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -2270,7 +2279,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2292,7 +2301,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2311,7 +2320,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -2332,7 +2341,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2351,7 +2360,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2370,7 +2379,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2392,7 +2401,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2411,7 +2420,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -2432,7 +2441,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2451,7 +2460,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2470,7 +2479,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2484,7 +2493,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -2505,7 +2514,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2523,7 +2532,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2545,7 +2554,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2559,7 +2568,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -2580,7 +2589,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2592,7 +2601,7 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -2600,7 +2609,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 6 + i32.const 20 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -2992,7 +3001,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3012,7 +3021,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3029,7 +3038,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3050,7 +3059,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3069,7 +3078,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3086,7 +3095,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3106,7 +3115,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3123,7 +3132,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3144,7 +3153,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3163,7 +3172,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3180,7 +3189,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3194,7 +3203,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3215,7 +3224,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3233,7 +3242,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3253,7 +3262,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3267,7 +3276,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3288,7 +3297,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3300,7 +3309,7 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3308,7 +3317,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 7 + i32.const 21 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -3704,7 +3713,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3722,7 +3731,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3737,7 +3746,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3758,7 +3767,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3777,7 +3786,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3792,7 +3801,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3810,7 +3819,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3825,7 +3834,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3846,7 +3855,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3865,7 +3874,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3880,7 +3889,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3894,7 +3903,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3915,7 +3924,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3933,7 +3942,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3951,7 +3960,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3965,7 +3974,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3986,7 +3995,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3998,7 +4007,7 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4006,7 +4015,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 8 + i32.const 22 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -4048,7 +4057,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4066,7 +4075,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4081,7 +4090,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4102,7 +4111,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -4121,7 +4130,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4136,7 +4145,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4154,7 +4163,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4169,7 +4178,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4190,7 +4199,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -4209,7 +4218,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4224,7 +4233,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4238,7 +4247,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4259,7 +4268,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -4277,7 +4286,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4295,7 +4304,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4309,7 +4318,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4330,7 +4339,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4342,7 +4351,7 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4385,7 +4394,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 9 + i32.const 23 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -4817,7 +4826,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4836,7 +4845,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4852,7 +4861,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4873,7 +4882,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -4892,7 +4901,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4908,7 +4917,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4927,7 +4936,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4943,7 +4952,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4964,7 +4973,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -4983,7 +4992,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4999,7 +5008,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5013,7 +5022,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5034,7 +5043,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -5052,7 +5061,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5071,7 +5080,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5085,7 +5094,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5106,7 +5115,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5118,7 +5127,7 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5126,7 +5135,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 10 + i32.const 24 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -5168,7 +5177,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5187,7 +5196,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5203,7 +5212,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5224,7 +5233,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -5243,7 +5252,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5259,7 +5268,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5278,7 +5287,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5294,7 +5303,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5315,7 +5324,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -5334,7 +5343,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5350,7 +5359,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5364,7 +5373,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5385,7 +5394,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -5403,7 +5412,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5422,7 +5431,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5436,7 +5445,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5457,7 +5466,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5469,7 +5478,7 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5477,7 +5486,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 11 + i32.const 25 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -5848,7 +5857,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5867,7 +5876,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5883,7 +5892,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5904,7 +5913,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -5923,7 +5932,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5939,7 +5948,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5958,7 +5967,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5974,7 +5983,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5995,7 +6004,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -6014,7 +6023,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6030,7 +6039,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6044,7 +6053,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -6065,7 +6074,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -6083,7 +6092,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6102,7 +6111,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6116,7 +6125,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -6137,7 +6146,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6149,7 +6158,7 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6157,7 +6166,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 12 + i32.const 26 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -6528,7 +6537,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6547,7 +6556,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6563,7 +6572,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -6584,7 +6593,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -6603,7 +6612,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6619,7 +6628,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6638,7 +6647,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6654,7 +6663,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -6675,7 +6684,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -6694,7 +6703,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6710,7 +6719,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6724,7 +6733,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -6745,7 +6754,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -6763,7 +6772,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6782,7 +6791,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6796,7 +6805,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -6817,7 +6826,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6829,12 +6838,187 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 160 + i32.load + i32.le_u + else + local.get $0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 160 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 77 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + local.tee $1 + i32.eqz + if + local.get $0 + i32.const 160 + i32.load + i32.gt_u + local.set $1 + end + local.get $1 + if (result i32) unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 160 + i32.add + i32.load end ) - (func $start (; 76 ;) (type $FUNCSIG$v) - i32.const 160 + (func $~lib/runtime/runtime.newObject (; 78 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 81 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.tee $2 + i32.eqz + local.tee $0 + if (result i32) + local.get $0 + else + local.get $2 + i32.const 160 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $2 + i32.const 3 + i32.shl + i32.const 160 + i32.add + i32.load + end + local.tee $0 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $3 + local.get $2 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $2 + i32.load + drop + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $3 + i32.store offset=8 + local.get $2 + local.get $3 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $0 + i32.const 512 + i32.and + if + local.get $1 + local.get $3 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load + drop + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $2 + ) + (func $~lib/runtime/runtime.retain (; 82 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 83 ;) (type $FUNCSIG$v) + nop + ) + (func $start (; 84 ;) (type $FUNCSIG$v) + i32.const 392 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -6848,8 +7032,10 @@ call $std/map/testNumeric call $std/map/testNumeric call $std/map/testNumeric - ) - (func $null (; 77 ;) (type $FUNCSIG$v) - nop + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 28 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT ) ) diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index e10187c57e..f030a8a12f 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -17,11 +17,12 @@ (type $FUNCSIG$iid (func (param i32 f64) (result i32))) (type $FUNCSIG$iidi (func (param i32 f64 i32) (result i32))) (type $FUNCSIG$vidi (func (param i32 f64 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 64) "\02\00\00\00&\00\00\00\00\00\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 120) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00&\00\00\00\00\00\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 120) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") + (data (i32.const 160) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00$\04\00\00\00\00\00\00$\04\00\00\00\00\00\00$\08\00\00\00\00\00\00$\08\00\00\00\00\00\00$\10\00\00\00\00\00\00$\10\00\00\00\00\00\00$ \00\00\00\00\00\00$ \00\00\00\00\00\00$\10\00\00\00\00\00\00$ \00\00\00\00\00\00!\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -30,10 +31,20 @@ (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 156)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 160)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 392)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -166,9 +177,9 @@ if i32.const 0 i32.const 24 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -183,9 +194,9 @@ if i32.const 0 i32.const 24 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -462,7 +473,7 @@ i32.const 80 i32.const 54 i32.const 43 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -473,7 +484,7 @@ local.get $1 call $~lib/memory/memory.fill local.get $2 - i32.const 3 + i32.const 15 call $~lib/util/runtime/register ) (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) @@ -558,7 +569,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.set $0 end @@ -1081,7 +1092,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1103,7 +1114,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1123,7 +1134,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1146,7 +1157,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -1168,7 +1179,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1188,7 +1199,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1210,7 +1221,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1230,7 +1241,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1253,7 +1264,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -1275,7 +1286,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1295,7 +1306,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1312,7 +1323,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1335,7 +1346,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -1358,7 +1369,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1380,7 +1391,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1397,7 +1408,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1420,7 +1431,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1435,7 +1446,7 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -1515,7 +1526,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 18 call $~lib/util/runtime/register local.set $0 end @@ -2021,7 +2032,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2041,7 +2052,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2059,7 +2070,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2082,7 +2093,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -2104,7 +2115,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2122,7 +2133,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2142,7 +2153,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2160,7 +2171,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2183,7 +2194,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -2205,7 +2216,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2223,7 +2234,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2240,7 +2251,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2263,7 +2274,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -2286,7 +2297,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2306,7 +2317,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2323,7 +2334,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2346,7 +2357,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2361,7 +2372,7 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -2441,7 +2452,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 5 + i32.const 19 call $~lib/util/runtime/register local.set $0 end @@ -2979,7 +2990,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3001,7 +3012,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3021,7 +3032,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3044,7 +3055,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -3066,7 +3077,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3086,7 +3097,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3108,7 +3119,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3128,7 +3139,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3151,7 +3162,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -3173,7 +3184,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3193,7 +3204,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3210,7 +3221,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3233,7 +3244,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -3256,7 +3267,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3278,7 +3289,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3295,7 +3306,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3318,7 +3329,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3333,7 +3344,7 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3413,7 +3424,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 6 + i32.const 20 call $~lib/util/runtime/register local.set $0 end @@ -3919,7 +3930,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3939,7 +3950,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3957,7 +3968,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3980,7 +3991,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -4002,7 +4013,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4020,7 +4031,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4040,7 +4051,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4058,7 +4069,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -4081,7 +4092,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -4103,7 +4114,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4121,7 +4132,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4138,7 +4149,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -4161,7 +4172,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -4184,7 +4195,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4204,7 +4215,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4221,7 +4232,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -4244,7 +4255,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4259,7 +4270,7 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4339,7 +4350,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 7 + i32.const 21 call $~lib/util/runtime/register local.set $0 end @@ -4877,7 +4888,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4895,7 +4906,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4911,7 +4922,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -4934,7 +4945,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -4956,7 +4967,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4972,7 +4983,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4990,7 +5001,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5006,7 +5017,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -5029,7 +5040,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -5051,7 +5062,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5067,7 +5078,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5084,7 +5095,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -5107,7 +5118,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -5130,7 +5141,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5148,7 +5159,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5165,7 +5176,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -5188,7 +5199,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5203,7 +5214,7 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5283,7 +5294,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 8 + i32.const 22 call $~lib/util/runtime/register local.set $0 end @@ -5779,7 +5790,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5797,7 +5808,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5813,7 +5824,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -5836,7 +5847,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -5858,7 +5869,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5874,7 +5885,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5892,7 +5903,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5908,7 +5919,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -5931,7 +5942,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -5953,7 +5964,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5969,7 +5980,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5986,7 +5997,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6009,7 +6020,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -6032,7 +6043,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6050,7 +6061,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6067,7 +6078,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6090,7 +6101,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6105,7 +6116,7 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6185,7 +6196,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 9 + i32.const 23 call $~lib/util/runtime/register local.set $0 end @@ -6772,7 +6783,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6791,7 +6802,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6808,7 +6819,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6831,7 +6842,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -6853,7 +6864,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6870,7 +6881,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6889,7 +6900,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6906,7 +6917,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6929,7 +6940,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -6951,7 +6962,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6968,7 +6979,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6985,7 +6996,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7008,7 +7019,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -7031,7 +7042,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7050,7 +7061,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7067,7 +7078,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7090,7 +7101,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7105,7 +7116,7 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7185,7 +7196,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 10 + i32.const 24 call $~lib/util/runtime/register local.set $0 end @@ -7684,7 +7695,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7703,7 +7714,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7720,7 +7731,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7743,7 +7754,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -7765,7 +7776,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7782,7 +7793,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7801,7 +7812,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7818,7 +7829,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7841,7 +7852,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -7863,7 +7874,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7880,7 +7891,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7897,7 +7908,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7920,7 +7931,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -7943,7 +7954,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7962,7 +7973,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7979,7 +7990,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -8002,7 +8013,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8017,7 +8028,7 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8097,7 +8108,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 11 + i32.const 25 call $~lib/util/runtime/register local.set $0 end @@ -8601,7 +8612,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8620,7 +8631,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8637,7 +8648,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -8660,7 +8671,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -8682,7 +8693,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8699,7 +8710,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8718,7 +8729,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8735,7 +8746,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -8758,7 +8769,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -8780,7 +8791,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8797,7 +8808,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8814,7 +8825,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -8837,7 +8848,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -8860,7 +8871,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8879,7 +8890,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8896,7 +8907,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -8919,7 +8930,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8934,7 +8945,7 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -9014,7 +9025,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 12 + i32.const 26 call $~lib/util/runtime/register local.set $0 end @@ -9518,7 +9529,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9537,7 +9548,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9554,7 +9565,7 @@ i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -9577,7 +9588,7 @@ i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -9599,7 +9610,7 @@ i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9616,7 +9627,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9635,7 +9646,7 @@ i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9652,7 +9663,7 @@ i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -9675,7 +9686,7 @@ i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -9697,7 +9708,7 @@ i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9714,7 +9725,7 @@ i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9731,7 +9742,7 @@ i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -9754,7 +9765,7 @@ i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -9777,7 +9788,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9796,7 +9807,7 @@ i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9813,7 +9824,7 @@ i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -9836,7 +9847,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9851,7 +9862,7 @@ i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -9877,9 +9888,239 @@ call $std/map/testNumeric call $std/map/testNumeric ) - (func $start (; 116 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + local.get $2 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 117 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 118 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 119 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 120 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 121 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 122 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.tee $6 + local.get $1 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + local.get $8 + if + local.get $8 + local.get $6 + call $~lib/collector/dummy/__ref_unlink + end + local.get $7 + local.get $6 + call $~lib/collector/dummy/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 512 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $~lib/collector/dummy/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/Root#constructor (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 28 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 124 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_link + ) + (func $~lib/runtime/runtime.release (; 125 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_unlink + ) + (func $~lib/collector/dummy/__ref_collect (; 126 ;) (type $FUNCSIG$v) + nop + ) + (func $~lib/runtime/runtime.collect (; 127 ;) (type $FUNCSIG$v) + call $~lib/collector/dummy/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 128 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 129 ;) (type $FUNCSIG$v) call $start:std/map + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT ) - (func $null (; 117 ;) (type $FUNCSIG$v) + (func $null (; 130 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index e243996b08..7259c1ec60 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -29,7 +29,7 @@ (import "Math" "PI" (global $~lib/bindings/Math/PI f64)) (import "Math" "SQRT1_2" (global $~lib/bindings/Math/SQRT1_2 f64)) (import "Math" "SQRT2" (global $~lib/bindings/Math/SQRT2 f64)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "Math" "abs" (func $~lib/bindings/Math/abs (param f64) (result f64))) (import "Math" "acos" (func $~lib/bindings/Math/acos (param f64) (result f64))) (import "Math" "acosh" (func $~lib/bindings/Math/acosh (param f64) (result f64))) @@ -60,12 +60,10 @@ (import "Math" "tanh" (func $~lib/bindings/Math/tanh (param f64) (result f64))) (import "Math" "trunc" (func $~lib/bindings/Math/trunc (param f64) (result f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\16\00\00\00s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s") - (data (i32.const 40) "\02\00\00\00 \00\00\00)\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe") - (data (i32.const 80) "\03\00\00\00\10\00\00\000\00\00\000\00\00\00 \00\00\00\04") - (data (i32.const 104) "\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\16\00\00\00s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s") + (data (i32.const 40) "\0f\00\00\00 \00\00\00)\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe") + (data (i32.const 80) "\11\00\00\00\10\00\00\000\00\00\000\00\00\00 \00\00\00\04") + (data (i32.const 104) "\10\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") (global $~lib/math/rempio2f_y (mut f64) (f64.const 0)) (global $~lib/math/random_seeded (mut i32) (i32.const 0)) (global $~lib/math/random_state0_64 (mut i64) (i64.const 0)) @@ -73,7 +71,6 @@ (global $~lib/math/random_state0_32 (mut i32) (i32.const 0)) (global $~lib/math/random_state1_32 (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $~lib/math/NativeMath.scalbn (; 30 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) local.get $1 @@ -8407,7 +8404,7 @@ i32.const 112 i32.const 1021 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -8473,7 +8470,7 @@ i32.const 112 i32.const 1030 i32.const 24 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/random_state0_64 @@ -8520,7 +8517,7 @@ i32.const 112 i32.const 2312 i32.const 24 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/random_state0_32 @@ -10873,7 +10870,7 @@ i32.const 16 i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6931471805599453 @@ -10886,7 +10883,7 @@ i32.const 16 i32.const 109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.302585092994046 @@ -10899,7 +10896,7 @@ i32.const 16 i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.4426950408889634 @@ -10912,7 +10909,7 @@ i32.const 16 i32.const 111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3.141592653589793 @@ -10925,7 +10922,7 @@ i32.const 16 i32.const 112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7071067811865476 @@ -10938,7 +10935,7 @@ i32.const 16 i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.4142135623730951 @@ -10951,7 +10948,7 @@ i32.const 16 i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.7182817459106445 @@ -10965,7 +10962,7 @@ i32.const 16 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6931471824645996 @@ -10979,7 +10976,7 @@ i32.const 16 i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3025851249694824 @@ -10993,7 +10990,7 @@ i32.const 16 i32.const 118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.4426950216293335 @@ -11007,7 +11004,7 @@ i32.const 16 i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3.1415927410125732 @@ -11021,7 +11018,7 @@ i32.const 16 i32.const 120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7071067690849304 @@ -11035,7 +11032,7 @@ i32.const 16 i32.const 121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.4142135381698608 @@ -11049,7 +11046,7 @@ i32.const 16 i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -11062,7 +11059,7 @@ i32.const 16 i32.const 133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -11075,7 +11072,7 @@ i32.const 16 i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -11088,7 +11085,7 @@ i32.const 16 i32.const 135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -11101,7 +11098,7 @@ i32.const 16 i32.const 136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -11114,7 +11111,7 @@ i32.const 16 i32.const 137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -11127,7 +11124,7 @@ i32.const 16 i32.const 138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -11140,7 +11137,7 @@ i32.const 16 i32.const 139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -11153,7 +11150,7 @@ i32.const 16 i32.const 140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -11166,7 +11163,7 @@ i32.const 16 i32.const 141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -11179,7 +11176,7 @@ i32.const 16 i32.const 142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -11192,7 +11189,7 @@ i32.const 16 i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -11205,7 +11202,7 @@ i32.const 16 i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -11218,7 +11215,7 @@ i32.const 16 i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -11231,7 +11228,7 @@ i32.const 16 i32.const 148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -11244,7 +11241,7 @@ i32.const 16 i32.const 149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -11257,7 +11254,7 @@ i32.const 16 i32.const 150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -11270,7 +11267,7 @@ i32.const 16 i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -11283,7 +11280,7 @@ i32.const 16 i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -11296,7 +11293,7 @@ i32.const 16 i32.const 153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -11309,7 +11306,7 @@ i32.const 16 i32.const 154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -11322,7 +11319,7 @@ i32.const 16 i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -11335,7 +11332,7 @@ i32.const 16 i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -11348,7 +11345,7 @@ i32.const 16 i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -11361,7 +11358,7 @@ i32.const 16 i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8988465674311579538646525e283 @@ -11374,7 +11371,7 @@ i32.const 16 i32.const 159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -11387,7 +11384,7 @@ i32.const 16 i32.const 160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.000244140625 @@ -11400,7 +11397,7 @@ i32.const 16 i32.const 161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7499999999999999 @@ -11413,7 +11410,7 @@ i32.const 16 i32.const 162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5000000000000012 @@ -11426,7 +11423,7 @@ i32.const 16 i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -11439,7 +11436,7 @@ i32.const 16 i32.const 172 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -11452,7 +11449,7 @@ i32.const 16 i32.const 173 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -11465,7 +11462,7 @@ i32.const 16 i32.const 174 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -11478,7 +11475,7 @@ i32.const 16 i32.const 175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -11491,7 +11488,7 @@ i32.const 16 i32.const 176 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -11504,7 +11501,7 @@ i32.const 16 i32.const 177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -11517,7 +11514,7 @@ i32.const 16 i32.const 178 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -11530,7 +11527,7 @@ i32.const 16 i32.const 179 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -11543,7 +11540,7 @@ i32.const 16 i32.const 180 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -11556,7 +11553,7 @@ i32.const 16 i32.const 181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -11569,7 +11566,7 @@ i32.const 16 i32.const 184 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -11582,7 +11579,7 @@ i32.const 16 i32.const 185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -11595,7 +11592,7 @@ i32.const 16 i32.const 186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -11608,7 +11605,7 @@ i32.const 16 i32.const 187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -11621,7 +11618,7 @@ i32.const 16 i32.const 188 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -11634,7 +11631,7 @@ i32.const 16 i32.const 189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -11647,7 +11644,7 @@ i32.const 16 i32.const 190 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -11660,7 +11657,7 @@ i32.const 16 i32.const 191 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -11673,7 +11670,7 @@ i32.const 16 i32.const 192 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -11686,7 +11683,7 @@ i32.const 16 i32.const 193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -11699,7 +11696,7 @@ i32.const 16 i32.const 194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -11712,7 +11709,7 @@ i32.const 16 i32.const 195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -11725,7 +11722,7 @@ i32.const 16 i32.const 196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -11738,7 +11735,7 @@ i32.const 16 i32.const 197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1701411834604692317316873e14 @@ -11751,7 +11748,7 @@ i32.const 16 i32.const 198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -11764,7 +11761,7 @@ i32.const 16 i32.const 199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.000244140625 @@ -11777,7 +11774,7 @@ i32.const 16 i32.const 200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7499999403953552 @@ -11790,7 +11787,7 @@ i32.const 16 i32.const 201 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5000006556510925 @@ -11803,7 +11800,7 @@ i32.const 16 i32.const 202 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -11815,7 +11812,7 @@ i32.const 16 i32.const 214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -11827,7 +11824,7 @@ i32.const 16 i32.const 215 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -11839,7 +11836,7 @@ i32.const 16 i32.const 216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -11851,7 +11848,7 @@ i32.const 16 i32.const 217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -11863,7 +11860,7 @@ i32.const 16 i32.const 218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -11875,7 +11872,7 @@ i32.const 16 i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -11887,7 +11884,7 @@ i32.const 16 i32.const 220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -11899,7 +11896,7 @@ i32.const 16 i32.const 221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -11911,7 +11908,7 @@ i32.const 16 i32.const 222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -11923,7 +11920,7 @@ i32.const 16 i32.const 223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -11935,7 +11932,7 @@ i32.const 16 i32.const 226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -11947,7 +11944,7 @@ i32.const 16 i32.const 227 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -11959,7 +11956,7 @@ i32.const 16 i32.const 228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -11971,7 +11968,7 @@ i32.const 16 i32.const 229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -11983,7 +11980,7 @@ i32.const 16 i32.const 230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -11995,7 +11992,7 @@ i32.const 16 i32.const 231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -12007,7 +12004,7 @@ i32.const 16 i32.const 232 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -12019,7 +12016,7 @@ i32.const 16 i32.const 241 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -12031,7 +12028,7 @@ i32.const 16 i32.const 242 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -12043,7 +12040,7 @@ i32.const 16 i32.const 243 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -12055,7 +12052,7 @@ i32.const 16 i32.const 244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -12067,7 +12064,7 @@ i32.const 16 i32.const 245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -12079,7 +12076,7 @@ i32.const 16 i32.const 246 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -12091,7 +12088,7 @@ i32.const 16 i32.const 247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -12103,7 +12100,7 @@ i32.const 16 i32.const 248 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -12115,7 +12112,7 @@ i32.const 16 i32.const 249 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -12127,7 +12124,7 @@ i32.const 16 i32.const 250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -12139,7 +12136,7 @@ i32.const 16 i32.const 253 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -12151,7 +12148,7 @@ i32.const 16 i32.const 254 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -12163,7 +12160,7 @@ i32.const 16 i32.const 255 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -12175,7 +12172,7 @@ i32.const 16 i32.const 256 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -12187,7 +12184,7 @@ i32.const 16 i32.const 257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -12199,7 +12196,7 @@ i32.const 16 i32.const 258 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -12211,7 +12208,7 @@ i32.const 16 i32.const 259 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -12224,7 +12221,7 @@ i32.const 16 i32.const 271 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -12237,7 +12234,7 @@ i32.const 16 i32.const 272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -12250,7 +12247,7 @@ i32.const 16 i32.const 273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -12263,7 +12260,7 @@ i32.const 16 i32.const 274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -12276,7 +12273,7 @@ i32.const 16 i32.const 275 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -12289,7 +12286,7 @@ i32.const 16 i32.const 276 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -12302,7 +12299,7 @@ i32.const 16 i32.const 277 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -12315,7 +12312,7 @@ i32.const 16 i32.const 278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -12328,7 +12325,7 @@ i32.const 16 i32.const 279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -12341,7 +12338,7 @@ i32.const 16 i32.const 280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -12354,7 +12351,7 @@ i32.const 16 i32.const 283 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -12367,7 +12364,7 @@ i32.const 16 i32.const 284 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -12380,7 +12377,7 @@ i32.const 16 i32.const 285 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000000000000002 @@ -12393,7 +12390,7 @@ i32.const 16 i32.const 286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000000000000002 @@ -12406,7 +12403,7 @@ i32.const 16 i32.const 287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -12419,7 +12416,7 @@ i32.const 16 i32.const 288 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -12432,7 +12429,7 @@ i32.const 16 i32.const 289 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -12445,7 +12442,7 @@ i32.const 16 i32.const 290 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5309227209592985 @@ -12458,7 +12455,7 @@ i32.const 16 i32.const 291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.4939556746399746 @@ -12471,7 +12468,7 @@ i32.const 16 i32.const 292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -12484,7 +12481,7 @@ i32.const 16 i32.const 301 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -12497,7 +12494,7 @@ i32.const 16 i32.const 302 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -12510,7 +12507,7 @@ i32.const 16 i32.const 303 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -12523,7 +12520,7 @@ i32.const 16 i32.const 304 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -12536,7 +12533,7 @@ i32.const 16 i32.const 305 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -12549,7 +12546,7 @@ i32.const 16 i32.const 306 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -12562,7 +12559,7 @@ i32.const 16 i32.const 307 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -12575,7 +12572,7 @@ i32.const 16 i32.const 308 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -12588,7 +12585,7 @@ i32.const 16 i32.const 309 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -12601,7 +12598,7 @@ i32.const 16 i32.const 310 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -12614,7 +12611,7 @@ i32.const 16 i32.const 313 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -12627,7 +12624,7 @@ i32.const 16 i32.const 314 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -12640,7 +12637,7 @@ i32.const 16 i32.const 315 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000001192092896 @@ -12653,7 +12650,7 @@ i32.const 16 i32.const 316 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000001192092896 @@ -12666,7 +12663,7 @@ i32.const 16 i32.const 317 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -12679,7 +12676,7 @@ i32.const 16 i32.const 318 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -12692,7 +12689,7 @@ i32.const 16 i32.const 319 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -12705,7 +12702,7 @@ i32.const 16 i32.const 320 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.49965065717697144 @@ -12718,7 +12715,7 @@ i32.const 16 i32.const 321 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5051405429840088 @@ -12731,7 +12728,7 @@ i32.const 16 i32.const 322 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5189794898033142 @@ -12744,7 +12741,7 @@ i32.const 16 i32.const 323 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -12757,7 +12754,7 @@ i32.const 16 i32.const 335 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -12770,7 +12767,7 @@ i32.const 16 i32.const 336 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -12783,7 +12780,7 @@ i32.const 16 i32.const 337 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -12796,7 +12793,7 @@ i32.const 16 i32.const 338 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -12809,7 +12806,7 @@ i32.const 16 i32.const 339 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -12822,7 +12819,7 @@ i32.const 16 i32.const 340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -12835,7 +12832,7 @@ i32.const 16 i32.const 341 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -12848,7 +12845,7 @@ i32.const 16 i32.const 342 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -12861,7 +12858,7 @@ i32.const 16 i32.const 343 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -12874,7 +12871,7 @@ i32.const 16 i32.const 344 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -12887,7 +12884,7 @@ i32.const 16 i32.const 347 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -12900,7 +12897,7 @@ i32.const 16 i32.const 348 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -12913,7 +12910,7 @@ i32.const 16 i32.const 349 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -12926,7 +12923,7 @@ i32.const 16 i32.const 350 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -12939,7 +12936,7 @@ i32.const 16 i32.const 351 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -12952,7 +12949,7 @@ i32.const 16 i32.const 352 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -12965,7 +12962,7 @@ i32.const 16 i32.const 353 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1060831199926429 @@ -12978,7 +12975,7 @@ i32.const 16 i32.const 369 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1089809557628658 @@ -12991,7 +12988,7 @@ i32.const 16 i32.const 371 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1169429159875521 @@ -13004,7 +13001,7 @@ i32.const 16 i32.const 372 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -13017,7 +13014,7 @@ i32.const 16 i32.const 381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -13030,7 +13027,7 @@ i32.const 16 i32.const 382 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -13043,7 +13040,7 @@ i32.const 16 i32.const 383 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -13056,7 +13053,7 @@ i32.const 16 i32.const 384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -13069,7 +13066,7 @@ i32.const 16 i32.const 385 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -13082,7 +13079,7 @@ i32.const 16 i32.const 386 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -13095,7 +13092,7 @@ i32.const 16 i32.const 387 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -13108,7 +13105,7 @@ i32.const 16 i32.const 388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -13121,7 +13118,7 @@ i32.const 16 i32.const 389 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -13134,7 +13131,7 @@ i32.const 16 i32.const 390 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -13147,7 +13144,7 @@ i32.const 16 i32.const 393 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -13160,7 +13157,7 @@ i32.const 16 i32.const 394 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -13173,7 +13170,7 @@ i32.const 16 i32.const 395 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -13186,7 +13183,7 @@ i32.const 16 i32.const 396 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -13199,7 +13196,7 @@ i32.const 16 i32.const 397 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -13212,7 +13209,7 @@ i32.const 16 i32.const 398 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -13225,7 +13222,7 @@ i32.const 16 i32.const 399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1125899906842624 @@ -13238,7 +13235,7 @@ i32.const 16 i32.const 400 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -13251,7 +13248,7 @@ i32.const 16 i32.const 412 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -13264,7 +13261,7 @@ i32.const 16 i32.const 413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -13277,7 +13274,7 @@ i32.const 16 i32.const 414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -13290,7 +13287,7 @@ i32.const 16 i32.const 415 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -13303,7 +13300,7 @@ i32.const 16 i32.const 416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -13316,7 +13313,7 @@ i32.const 16 i32.const 417 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -13329,7 +13326,7 @@ i32.const 16 i32.const 418 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -13342,7 +13339,7 @@ i32.const 16 i32.const 419 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -13355,7 +13352,7 @@ i32.const 16 i32.const 420 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -13368,7 +13365,7 @@ i32.const 16 i32.const 421 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -13381,7 +13378,7 @@ i32.const 16 i32.const 424 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -13394,7 +13391,7 @@ i32.const 16 i32.const 425 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -13407,7 +13404,7 @@ i32.const 16 i32.const 426 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -13420,7 +13417,7 @@ i32.const 16 i32.const 427 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000000000000002 @@ -13433,7 +13430,7 @@ i32.const 16 i32.const 428 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000000000000002 @@ -13446,7 +13443,7 @@ i32.const 16 i32.const 429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -13459,7 +13456,7 @@ i32.const 16 i32.const 430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -13472,7 +13469,7 @@ i32.const 16 i32.const 431 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -13485,7 +13482,7 @@ i32.const 16 i32.const 432 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5073043929119148 @@ -13498,7 +13495,7 @@ i32.const 16 i32.const 433 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -13511,7 +13508,7 @@ i32.const 16 i32.const 442 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -13524,7 +13521,7 @@ i32.const 16 i32.const 443 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -13537,7 +13534,7 @@ i32.const 16 i32.const 444 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -13550,7 +13547,7 @@ i32.const 16 i32.const 445 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -13563,7 +13560,7 @@ i32.const 16 i32.const 446 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -13576,7 +13573,7 @@ i32.const 16 i32.const 447 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -13589,7 +13586,7 @@ i32.const 16 i32.const 448 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -13602,7 +13599,7 @@ i32.const 16 i32.const 449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -13615,7 +13612,7 @@ i32.const 16 i32.const 450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -13628,7 +13625,7 @@ i32.const 16 i32.const 451 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -13641,7 +13638,7 @@ i32.const 16 i32.const 454 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -13654,7 +13651,7 @@ i32.const 16 i32.const 455 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -13667,7 +13664,7 @@ i32.const 16 i32.const 456 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -13680,7 +13677,7 @@ i32.const 16 i32.const 457 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000001192092896 @@ -13693,7 +13690,7 @@ i32.const 16 i32.const 458 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000001192092896 @@ -13706,7 +13703,7 @@ i32.const 16 i32.const 459 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -13719,7 +13716,7 @@ i32.const 16 i32.const 460 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -13732,7 +13729,7 @@ i32.const 16 i32.const 461 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -13745,7 +13742,7 @@ i32.const 16 i32.const 462 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5004770159721375 @@ -13758,7 +13755,7 @@ i32.const 16 i32.const 463 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -13771,7 +13768,7 @@ i32.const 16 i32.const 475 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -13784,7 +13781,7 @@ i32.const 16 i32.const 476 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -13797,7 +13794,7 @@ i32.const 16 i32.const 477 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -13810,7 +13807,7 @@ i32.const 16 i32.const 478 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -13823,7 +13820,7 @@ i32.const 16 i32.const 479 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -13836,7 +13833,7 @@ i32.const 16 i32.const 480 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -13849,7 +13846,7 @@ i32.const 16 i32.const 481 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -13862,7 +13859,7 @@ i32.const 16 i32.const 482 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -13875,7 +13872,7 @@ i32.const 16 i32.const 483 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -13888,7 +13885,7 @@ i32.const 16 i32.const 484 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -13901,7 +13898,7 @@ i32.const 16 i32.const 487 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -13914,7 +13911,7 @@ i32.const 16 i32.const 488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -13927,7 +13924,7 @@ i32.const 16 i32.const 489 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -13940,7 +13937,7 @@ i32.const 16 i32.const 490 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -13953,7 +13950,7 @@ i32.const 16 i32.const 491 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -13966,7 +13963,7 @@ i32.const 16 i32.const 520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -13979,7 +13976,7 @@ i32.const 16 i32.const 521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -13992,7 +13989,7 @@ i32.const 16 i32.const 522 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -14005,7 +14002,7 @@ i32.const 16 i32.const 523 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -14018,7 +14015,7 @@ i32.const 16 i32.const 524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -14031,7 +14028,7 @@ i32.const 16 i32.const 525 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -14044,7 +14041,7 @@ i32.const 16 i32.const 526 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -14057,7 +14054,7 @@ i32.const 16 i32.const 527 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -14070,7 +14067,7 @@ i32.const 16 i32.const 528 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -14083,7 +14080,7 @@ i32.const 16 i32.const 529 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -14096,7 +14093,7 @@ i32.const 16 i32.const 532 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -14109,7 +14106,7 @@ i32.const 16 i32.const 533 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -14122,7 +14119,7 @@ i32.const 16 i32.const 534 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -14135,7 +14132,7 @@ i32.const 16 i32.const 535 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -14148,7 +14145,7 @@ i32.const 16 i32.const 536 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -14161,7 +14158,7 @@ i32.const 16 i32.const 548 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -14174,7 +14171,7 @@ i32.const 16 i32.const 549 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -14187,7 +14184,7 @@ i32.const 16 i32.const 550 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -14200,7 +14197,7 @@ i32.const 16 i32.const 551 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -14213,7 +14210,7 @@ i32.const 16 i32.const 552 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -14226,7 +14223,7 @@ i32.const 16 i32.const 553 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -14239,7 +14236,7 @@ i32.const 16 i32.const 554 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -14252,7 +14249,7 @@ i32.const 16 i32.const 555 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -14265,7 +14262,7 @@ i32.const 16 i32.const 556 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -14278,7 +14275,7 @@ i32.const 16 i32.const 557 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -14291,7 +14288,7 @@ i32.const 16 i32.const 560 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -14304,7 +14301,7 @@ i32.const 16 i32.const 561 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -14317,7 +14314,7 @@ i32.const 16 i32.const 562 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -14330,7 +14327,7 @@ i32.const 16 i32.const 563 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -14343,7 +14340,7 @@ i32.const 16 i32.const 564 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -14356,7 +14353,7 @@ i32.const 16 i32.const 565 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -14369,7 +14366,7 @@ i32.const 16 i32.const 566 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6929821535674624 @@ -14382,7 +14379,7 @@ i32.const 16 i32.const 567 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -14395,7 +14392,7 @@ i32.const 16 i32.const 576 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -14408,7 +14405,7 @@ i32.const 16 i32.const 577 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -14421,7 +14418,7 @@ i32.const 16 i32.const 578 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -14434,7 +14431,7 @@ i32.const 16 i32.const 579 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -14447,7 +14444,7 @@ i32.const 16 i32.const 580 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -14460,7 +14457,7 @@ i32.const 16 i32.const 581 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -14473,7 +14470,7 @@ i32.const 16 i32.const 582 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -14486,7 +14483,7 @@ i32.const 16 i32.const 583 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -14499,7 +14496,7 @@ i32.const 16 i32.const 584 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -14512,7 +14509,7 @@ i32.const 16 i32.const 585 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -14525,7 +14522,7 @@ i32.const 16 i32.const 588 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -14538,7 +14535,7 @@ i32.const 16 i32.const 589 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -14551,7 +14548,7 @@ i32.const 16 i32.const 590 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -14564,7 +14561,7 @@ i32.const 16 i32.const 591 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -14577,7 +14574,7 @@ i32.const 16 i32.const 592 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -14590,7 +14587,7 @@ i32.const 16 i32.const 593 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -14603,7 +14600,7 @@ i32.const 16 i32.const 594 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -14616,7 +14613,7 @@ i32.const 16 i32.const 606 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -14629,7 +14626,7 @@ i32.const 16 i32.const 607 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -14642,7 +14639,7 @@ i32.const 16 i32.const 608 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -14655,7 +14652,7 @@ i32.const 16 i32.const 609 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -14668,7 +14665,7 @@ i32.const 16 i32.const 610 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -14681,7 +14678,7 @@ i32.const 16 i32.const 611 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -14694,7 +14691,7 @@ i32.const 16 i32.const 612 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -14707,7 +14704,7 @@ i32.const 16 i32.const 613 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -14720,7 +14717,7 @@ i32.const 16 i32.const 614 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -14733,7 +14730,7 @@ i32.const 16 i32.const 615 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -14746,7 +14743,7 @@ i32.const 16 i32.const 618 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -14759,7 +14756,7 @@ i32.const 16 i32.const 619 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -14772,7 +14769,7 @@ i32.const 16 i32.const 620 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -14785,7 +14782,7 @@ i32.const 16 i32.const 621 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -14798,7 +14795,7 @@ i32.const 16 i32.const 622 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -14811,7 +14808,7 @@ i32.const 16 i32.const 623 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -14824,7 +14821,7 @@ i32.const 16 i32.const 624 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -14837,7 +14834,7 @@ i32.const 16 i32.const 625 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -14850,7 +14847,7 @@ i32.const 16 i32.const 626 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.3552527156068805e-20 @@ -14863,7 +14860,7 @@ i32.const 16 i32.const 627 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.332636185032189e-302 @@ -14876,7 +14873,7 @@ i32.const 16 i32.const 628 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5.562684646268003e-309 @@ -14889,7 +14886,7 @@ i32.const 16 i32.const 629 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -5.562684646268003e-309 @@ -14902,7 +14899,7 @@ i32.const 16 i32.const 630 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8988465674311579538646525e283 @@ -14915,7 +14912,7 @@ i32.const 16 i32.const 631 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -14928,7 +14925,7 @@ i32.const 16 i32.const 640 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -14941,7 +14938,7 @@ i32.const 16 i32.const 641 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -14954,7 +14951,7 @@ i32.const 16 i32.const 642 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -14967,7 +14964,7 @@ i32.const 16 i32.const 643 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -14980,7 +14977,7 @@ i32.const 16 i32.const 644 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -14993,7 +14990,7 @@ i32.const 16 i32.const 645 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -15006,7 +15003,7 @@ i32.const 16 i32.const 646 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -15019,7 +15016,7 @@ i32.const 16 i32.const 647 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -15032,7 +15029,7 @@ i32.const 16 i32.const 648 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -15045,7 +15042,7 @@ i32.const 16 i32.const 649 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -15058,7 +15055,7 @@ i32.const 16 i32.const 652 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -15071,7 +15068,7 @@ i32.const 16 i32.const 653 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -15084,7 +15081,7 @@ i32.const 16 i32.const 654 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -15097,7 +15094,7 @@ i32.const 16 i32.const 655 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -15110,7 +15107,7 @@ i32.const 16 i32.const 656 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -15123,7 +15120,7 @@ i32.const 16 i32.const 657 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -15136,7 +15133,7 @@ i32.const 16 i32.const 658 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -15149,7 +15146,7 @@ i32.const 16 i32.const 659 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -15162,7 +15159,7 @@ i32.const 16 i32.const 660 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.3552527156068805e-20 @@ -15175,7 +15172,7 @@ i32.const 16 i32.const 661 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -15188,7 +15185,7 @@ i32.const 16 i32.const 662 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.938735877055719e-39 @@ -15201,7 +15198,7 @@ i32.const 16 i32.const 663 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.938735877055719e-39 @@ -15214,7 +15211,7 @@ i32.const 16 i32.const 664 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1701411834604692317316873e14 @@ -15227,7 +15224,7 @@ i32.const 16 i32.const 665 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -15241,7 +15238,7 @@ i32.const 16 i32.const 677 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -15255,7 +15252,7 @@ i32.const 16 i32.const 678 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -15269,7 +15266,7 @@ i32.const 16 i32.const 679 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -15283,7 +15280,7 @@ i32.const 16 i32.const 680 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -15297,7 +15294,7 @@ i32.const 16 i32.const 681 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -15311,7 +15308,7 @@ i32.const 16 i32.const 682 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -15325,7 +15322,7 @@ i32.const 16 i32.const 683 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -15339,7 +15336,7 @@ i32.const 16 i32.const 684 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -15353,7 +15350,7 @@ i32.const 16 i32.const 685 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -15367,7 +15364,7 @@ i32.const 16 i32.const 686 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -15381,7 +15378,7 @@ i32.const 16 i32.const 689 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -15395,7 +15392,7 @@ i32.const 16 i32.const 690 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -15409,7 +15406,7 @@ i32.const 16 i32.const 691 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -15423,7 +15420,7 @@ i32.const 16 i32.const 692 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -15437,7 +15434,7 @@ i32.const 16 i32.const 693 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -15451,7 +15448,7 @@ i32.const 16 i32.const 694 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -15465,7 +15462,7 @@ i32.const 16 i32.const 695 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -15479,7 +15476,7 @@ i32.const 16 i32.const 696 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -15493,7 +15490,7 @@ i32.const 16 i32.const 697 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -15507,7 +15504,7 @@ i32.const 16 i32.const 698 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -15521,7 +15518,7 @@ i32.const 16 i32.const 699 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -15535,7 +15532,7 @@ i32.const 16 i32.const 700 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -15549,7 +15546,7 @@ i32.const 16 i32.const 701 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -15563,7 +15560,7 @@ i32.const 16 i32.const 702 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -15577,7 +15574,7 @@ i32.const 16 i32.const 703 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -15591,7 +15588,7 @@ i32.const 16 i32.const 704 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -15605,7 +15602,7 @@ i32.const 16 i32.const 705 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -15619,7 +15616,7 @@ i32.const 16 i32.const 706 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -15633,7 +15630,7 @@ i32.const 16 i32.const 707 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -15647,7 +15644,7 @@ i32.const 16 i32.const 708 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -15661,7 +15658,7 @@ i32.const 16 i32.const 709 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -15675,7 +15672,7 @@ i32.const 16 i32.const 710 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -15689,7 +15686,7 @@ i32.const 16 i32.const 711 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -15703,7 +15700,7 @@ i32.const 16 i32.const 712 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -15717,7 +15714,7 @@ i32.const 16 i32.const 713 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -15731,7 +15728,7 @@ i32.const 16 i32.const 714 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1125369292536007e-308 @@ -15745,7 +15742,7 @@ i32.const 16 i32.const 715 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -15759,7 +15756,7 @@ i32.const 16 i32.const 716 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -15773,7 +15770,7 @@ i32.const 16 i32.const 717 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -15787,7 +15784,7 @@ i32.const 16 i32.const 718 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -15801,7 +15798,7 @@ i32.const 16 i32.const 727 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -15815,7 +15812,7 @@ i32.const 16 i32.const 728 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -15829,7 +15826,7 @@ i32.const 16 i32.const 729 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -15843,7 +15840,7 @@ i32.const 16 i32.const 730 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -15857,7 +15854,7 @@ i32.const 16 i32.const 731 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -15871,7 +15868,7 @@ i32.const 16 i32.const 732 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -15885,7 +15882,7 @@ i32.const 16 i32.const 733 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -15899,7 +15896,7 @@ i32.const 16 i32.const 734 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -15913,7 +15910,7 @@ i32.const 16 i32.const 735 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -15927,7 +15924,7 @@ i32.const 16 i32.const 736 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -15941,7 +15938,7 @@ i32.const 16 i32.const 739 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -15955,7 +15952,7 @@ i32.const 16 i32.const 740 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -15969,7 +15966,7 @@ i32.const 16 i32.const 741 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -15983,7 +15980,7 @@ i32.const 16 i32.const 742 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -15997,7 +15994,7 @@ i32.const 16 i32.const 743 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -16011,7 +16008,7 @@ i32.const 16 i32.const 744 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -16025,7 +16022,7 @@ i32.const 16 i32.const 745 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -16039,7 +16036,7 @@ i32.const 16 i32.const 746 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -16053,7 +16050,7 @@ i32.const 16 i32.const 747 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -16067,7 +16064,7 @@ i32.const 16 i32.const 748 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -16081,7 +16078,7 @@ i32.const 16 i32.const 749 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -16095,7 +16092,7 @@ i32.const 16 i32.const 750 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -16109,7 +16106,7 @@ i32.const 16 i32.const 751 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -16123,7 +16120,7 @@ i32.const 16 i32.const 752 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -16137,7 +16134,7 @@ i32.const 16 i32.const 753 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -16151,7 +16148,7 @@ i32.const 16 i32.const 754 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -16165,7 +16162,7 @@ i32.const 16 i32.const 755 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -16179,7 +16176,7 @@ i32.const 16 i32.const 756 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -16193,7 +16190,7 @@ i32.const 16 i32.const 757 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -16207,7 +16204,7 @@ i32.const 16 i32.const 758 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -16221,7 +16218,7 @@ i32.const 16 i32.const 759 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -16235,7 +16232,7 @@ i32.const 16 i32.const 760 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -16249,7 +16246,7 @@ i32.const 16 i32.const 761 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -16263,7 +16260,7 @@ i32.const 16 i32.const 762 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -16277,7 +16274,7 @@ i32.const 16 i32.const 763 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -16291,7 +16288,7 @@ i32.const 16 i32.const 764 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -16305,7 +16302,7 @@ i32.const 16 i32.const 765 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -16319,7 +16316,7 @@ i32.const 16 i32.const 766 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -16332,7 +16329,7 @@ i32.const 16 i32.const 778 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -16345,7 +16342,7 @@ i32.const 16 i32.const 779 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -16358,7 +16355,7 @@ i32.const 16 i32.const 780 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -16371,7 +16368,7 @@ i32.const 16 i32.const 781 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -16384,7 +16381,7 @@ i32.const 16 i32.const 782 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -16397,7 +16394,7 @@ i32.const 16 i32.const 783 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -16410,7 +16407,7 @@ i32.const 16 i32.const 784 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -16423,7 +16420,7 @@ i32.const 16 i32.const 785 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -16436,7 +16433,7 @@ i32.const 16 i32.const 786 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -16449,7 +16446,7 @@ i32.const 16 i32.const 787 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -16462,7 +16459,7 @@ i32.const 16 i32.const 790 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -16475,7 +16472,7 @@ i32.const 16 i32.const 791 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -16488,7 +16485,7 @@ i32.const 16 i32.const 792 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -16501,7 +16498,7 @@ i32.const 16 i32.const 793 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -16514,7 +16511,7 @@ i32.const 16 i32.const 794 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.313225746154785e-10 @@ -16527,7 +16524,7 @@ i32.const 16 i32.const 795 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -9.313225746154785e-10 @@ -16540,7 +16537,7 @@ i32.const 16 i32.const 796 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -16553,7 +16550,7 @@ i32.const 16 i32.const 797 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -16566,7 +16563,7 @@ i32.const 16 i32.const 798 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8 @@ -16579,7 +16576,7 @@ i32.const 16 i32.const 799 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -16592,7 +16589,7 @@ i32.const 16 i32.const 808 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -16605,7 +16602,7 @@ i32.const 16 i32.const 809 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -16618,7 +16615,7 @@ i32.const 16 i32.const 810 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -16631,7 +16628,7 @@ i32.const 16 i32.const 811 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -16644,7 +16641,7 @@ i32.const 16 i32.const 812 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -16657,7 +16654,7 @@ i32.const 16 i32.const 813 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -16670,7 +16667,7 @@ i32.const 16 i32.const 814 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -16683,7 +16680,7 @@ i32.const 16 i32.const 815 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -16696,7 +16693,7 @@ i32.const 16 i32.const 816 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -16709,7 +16706,7 @@ i32.const 16 i32.const 817 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -16722,7 +16719,7 @@ i32.const 16 i32.const 820 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -16735,7 +16732,7 @@ i32.const 16 i32.const 821 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -16748,7 +16745,7 @@ i32.const 16 i32.const 822 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -16761,7 +16758,7 @@ i32.const 16 i32.const 823 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -16774,7 +16771,7 @@ i32.const 16 i32.const 824 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.313225746154785e-10 @@ -16787,7 +16784,7 @@ i32.const 16 i32.const 825 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -9.313225746154785e-10 @@ -16800,7 +16797,7 @@ i32.const 16 i32.const 826 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -16813,7 +16810,7 @@ i32.const 16 i32.const 827 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -16826,7 +16823,7 @@ i32.const 16 i32.const 828 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 8 @@ -16839,7 +16836,7 @@ i32.const 16 i32.const 829 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -16851,7 +16848,7 @@ i32.const 16 i32.const 841 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -16863,7 +16860,7 @@ i32.const 16 i32.const 842 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -16875,7 +16872,7 @@ i32.const 16 i32.const 843 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -16887,7 +16884,7 @@ i32.const 16 i32.const 844 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -16899,7 +16896,7 @@ i32.const 16 i32.const 845 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -16911,7 +16908,7 @@ i32.const 16 i32.const 846 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -16923,7 +16920,7 @@ i32.const 16 i32.const 847 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -16935,7 +16932,7 @@ i32.const 16 i32.const 848 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -16947,7 +16944,7 @@ i32.const 16 i32.const 849 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -16959,7 +16956,7 @@ i32.const 16 i32.const 850 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -16971,7 +16968,7 @@ i32.const 16 i32.const 853 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -16983,7 +16980,7 @@ i32.const 16 i32.const 854 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -16995,7 +16992,7 @@ i32.const 16 i32.const 855 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -17007,7 +17004,7 @@ i32.const 16 i32.const 856 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -17019,7 +17016,7 @@ i32.const 16 i32.const 857 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -17031,7 +17028,7 @@ i32.const 16 i32.const 858 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -17043,7 +17040,7 @@ i32.const 16 i32.const 859 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -17055,7 +17052,7 @@ i32.const 16 i32.const 860 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -17067,7 +17064,7 @@ i32.const 16 i32.const 861 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -17079,7 +17076,7 @@ i32.const 16 i32.const 862 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -17091,7 +17088,7 @@ i32.const 16 i32.const 863 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -17103,7 +17100,7 @@ i32.const 16 i32.const 864 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -17115,7 +17112,7 @@ i32.const 16 i32.const 865 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -17127,7 +17124,7 @@ i32.const 16 i32.const 866 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -17139,7 +17136,7 @@ i32.const 16 i32.const 867 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -17151,7 +17148,7 @@ i32.const 16 i32.const 868 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -17163,7 +17160,7 @@ i32.const 16 i32.const 869 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -17175,7 +17172,7 @@ i32.const 16 i32.const 870 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -17187,7 +17184,7 @@ i32.const 16 i32.const 871 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -17199,7 +17196,7 @@ i32.const 16 i32.const 872 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -17211,7 +17208,7 @@ i32.const 16 i32.const 873 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -17223,7 +17220,7 @@ i32.const 16 i32.const 874 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -17235,7 +17232,7 @@ i32.const 16 i32.const 875 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -17247,7 +17244,7 @@ i32.const 16 i32.const 876 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -17259,7 +17256,7 @@ i32.const 16 i32.const 877 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -17271,7 +17268,7 @@ i32.const 16 i32.const 878 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -17283,7 +17280,7 @@ i32.const 16 i32.const 879 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -17295,7 +17292,7 @@ i32.const 16 i32.const 880 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -17307,7 +17304,7 @@ i32.const 16 i32.const 881 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -17319,7 +17316,7 @@ i32.const 16 i32.const 882 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -17331,7 +17328,7 @@ i32.const 16 i32.const 883 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -17343,7 +17340,7 @@ i32.const 16 i32.const 884 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -17355,7 +17352,7 @@ i32.const 16 i32.const 885 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -17367,7 +17364,7 @@ i32.const 16 i32.const 886 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -17379,7 +17376,7 @@ i32.const 16 i32.const 887 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -17391,7 +17388,7 @@ i32.const 16 i32.const 888 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -17403,7 +17400,7 @@ i32.const 16 i32.const 889 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -17415,7 +17412,7 @@ i32.const 16 i32.const 890 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -17427,7 +17424,7 @@ i32.const 16 i32.const 891 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -17439,7 +17436,7 @@ i32.const 16 i32.const 892 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -17451,7 +17448,7 @@ i32.const 16 i32.const 893 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -17463,7 +17460,7 @@ i32.const 16 i32.const 894 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -17475,7 +17472,7 @@ i32.const 16 i32.const 895 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -17487,7 +17484,7 @@ i32.const 16 i32.const 896 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -17499,7 +17496,7 @@ i32.const 16 i32.const 897 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -17511,7 +17508,7 @@ i32.const 16 i32.const 906 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -17523,7 +17520,7 @@ i32.const 16 i32.const 907 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -17535,7 +17532,7 @@ i32.const 16 i32.const 908 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -17547,7 +17544,7 @@ i32.const 16 i32.const 909 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -17559,7 +17556,7 @@ i32.const 16 i32.const 910 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -17571,7 +17568,7 @@ i32.const 16 i32.const 911 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -17583,7 +17580,7 @@ i32.const 16 i32.const 912 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -17595,7 +17592,7 @@ i32.const 16 i32.const 913 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -17607,7 +17604,7 @@ i32.const 16 i32.const 914 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -17619,7 +17616,7 @@ i32.const 16 i32.const 915 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -17631,7 +17628,7 @@ i32.const 16 i32.const 918 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -17643,7 +17640,7 @@ i32.const 16 i32.const 919 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -17655,7 +17652,7 @@ i32.const 16 i32.const 920 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -17667,7 +17664,7 @@ i32.const 16 i32.const 921 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -17679,7 +17676,7 @@ i32.const 16 i32.const 922 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -17691,7 +17688,7 @@ i32.const 16 i32.const 923 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -17703,7 +17700,7 @@ i32.const 16 i32.const 924 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -17715,7 +17712,7 @@ i32.const 16 i32.const 925 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -17727,7 +17724,7 @@ i32.const 16 i32.const 926 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -17739,7 +17736,7 @@ i32.const 16 i32.const 927 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -17751,7 +17748,7 @@ i32.const 16 i32.const 928 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -17763,7 +17760,7 @@ i32.const 16 i32.const 929 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -17775,7 +17772,7 @@ i32.const 16 i32.const 930 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -17787,7 +17784,7 @@ i32.const 16 i32.const 931 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -17799,7 +17796,7 @@ i32.const 16 i32.const 932 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -17811,7 +17808,7 @@ i32.const 16 i32.const 933 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -17823,7 +17820,7 @@ i32.const 16 i32.const 934 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -17835,7 +17832,7 @@ i32.const 16 i32.const 935 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -17847,7 +17844,7 @@ i32.const 16 i32.const 936 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -17859,7 +17856,7 @@ i32.const 16 i32.const 937 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -17871,7 +17868,7 @@ i32.const 16 i32.const 938 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -17883,7 +17880,7 @@ i32.const 16 i32.const 939 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -17895,7 +17892,7 @@ i32.const 16 i32.const 940 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -17907,7 +17904,7 @@ i32.const 16 i32.const 941 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -17919,7 +17916,7 @@ i32.const 16 i32.const 942 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -17931,7 +17928,7 @@ i32.const 16 i32.const 943 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -17943,7 +17940,7 @@ i32.const 16 i32.const 944 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -17955,7 +17952,7 @@ i32.const 16 i32.const 945 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -17967,7 +17964,7 @@ i32.const 16 i32.const 946 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -17979,7 +17976,7 @@ i32.const 16 i32.const 947 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -17991,7 +17988,7 @@ i32.const 16 i32.const 948 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -18003,7 +18000,7 @@ i32.const 16 i32.const 949 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -18015,7 +18012,7 @@ i32.const 16 i32.const 950 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -18027,7 +18024,7 @@ i32.const 16 i32.const 951 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -18039,7 +18036,7 @@ i32.const 16 i32.const 952 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -18051,7 +18048,7 @@ i32.const 16 i32.const 953 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -18063,7 +18060,7 @@ i32.const 16 i32.const 954 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -18075,7 +18072,7 @@ i32.const 16 i32.const 955 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -18087,7 +18084,7 @@ i32.const 16 i32.const 956 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -18099,7 +18096,7 @@ i32.const 16 i32.const 957 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -18111,7 +18108,7 @@ i32.const 16 i32.const 958 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -18123,7 +18120,7 @@ i32.const 16 i32.const 959 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -18135,7 +18132,7 @@ i32.const 16 i32.const 960 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -18147,7 +18144,7 @@ i32.const 16 i32.const 961 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -18159,7 +18156,7 @@ i32.const 16 i32.const 962 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -18172,7 +18169,7 @@ i32.const 16 i32.const 1073 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -18185,7 +18182,7 @@ i32.const 16 i32.const 1074 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -18198,7 +18195,7 @@ i32.const 16 i32.const 1075 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -18211,7 +18208,7 @@ i32.const 16 i32.const 1076 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -18224,7 +18221,7 @@ i32.const 16 i32.const 1077 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -18237,7 +18234,7 @@ i32.const 16 i32.const 1078 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -18250,7 +18247,7 @@ i32.const 16 i32.const 1079 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -18263,7 +18260,7 @@ i32.const 16 i32.const 1080 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -18276,7 +18273,7 @@ i32.const 16 i32.const 1081 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -18289,7 +18286,7 @@ i32.const 16 i32.const 1082 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -18302,7 +18299,7 @@ i32.const 16 i32.const 1085 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -18315,7 +18312,7 @@ i32.const 16 i32.const 1086 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -18328,7 +18325,7 @@ i32.const 16 i32.const 1087 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -18341,7 +18338,7 @@ i32.const 16 i32.const 1088 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -18354,7 +18351,7 @@ i32.const 16 i32.const 1089 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.862645149230957e-09 @@ -18367,7 +18364,7 @@ i32.const 16 i32.const 1092 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.862645149230957e-09 @@ -18380,7 +18377,7 @@ i32.const 16 i32.const 1093 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754943508222875e-38 @@ -18393,7 +18390,7 @@ i32.const 16 i32.const 1094 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754943508222875e-38 @@ -18406,7 +18403,7 @@ i32.const 16 i32.const 1095 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -18419,7 +18416,7 @@ i32.const 16 i32.const 1096 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.401298464324817e-45 @@ -18432,7 +18429,7 @@ i32.const 16 i32.const 1097 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.802596928649634e-45 @@ -18445,7 +18442,7 @@ i32.const 16 i32.const 1098 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.2611686178923354e-44 @@ -18458,7 +18455,7 @@ i32.const 16 i32.const 1099 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.938735877055719e-39 @@ -18471,7 +18468,7 @@ i32.const 16 i32.const 1100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -18484,7 +18481,7 @@ i32.const 16 i32.const 1101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754940705625946e-38 @@ -18497,7 +18494,7 @@ i32.const 16 i32.const 1102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754942106924411e-38 @@ -18510,7 +18507,7 @@ i32.const 16 i32.const 1103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.175494490952134e-38 @@ -18523,7 +18520,7 @@ i32.const 16 i32.const 1104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754946310819804e-38 @@ -18536,7 +18533,7 @@ i32.const 16 i32.const 1105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509880009953429e-38 @@ -18549,7 +18546,7 @@ i32.const 16 i32.const 1106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.350988701644575e-38 @@ -18562,7 +18559,7 @@ i32.const 16 i32.const 1107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509895424236536e-38 @@ -18575,7 +18572,7 @@ i32.const 16 i32.const 1108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.70197740328915e-38 @@ -18588,7 +18585,7 @@ i32.const 16 i32.const 1109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.450580596923828e-09 @@ -18601,7 +18598,7 @@ i32.const 16 i32.const 1110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.000244140625 @@ -18614,7 +18611,7 @@ i32.const 16 i32.const 1111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.00048828125 @@ -18627,7 +18624,7 @@ i32.const 16 i32.const 1112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.0009765625 @@ -18640,7 +18637,7 @@ i32.const 16 i32.const 1113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.802596928649634e-45 @@ -18653,7 +18650,7 @@ i32.const 16 i32.const 1114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.2611686178923354e-44 @@ -18666,7 +18663,7 @@ i32.const 16 i32.const 1115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.938735877055719e-39 @@ -18679,7 +18676,7 @@ i32.const 16 i32.const 1116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5.877471754111438e-39 @@ -18692,7 +18689,7 @@ i32.const 16 i32.const 1117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754940705625946e-38 @@ -18705,7 +18702,7 @@ i32.const 16 i32.const 1118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754942106924411e-38 @@ -18718,7 +18715,7 @@ i32.const 16 i32.const 1119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.175494490952134e-38 @@ -18731,7 +18728,7 @@ i32.const 16 i32.const 1120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754946310819804e-38 @@ -18744,7 +18741,7 @@ i32.const 16 i32.const 1121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509880009953429e-38 @@ -18757,7 +18754,7 @@ i32.const 16 i32.const 1122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.350988701644575e-38 @@ -18770,7 +18767,7 @@ i32.const 16 i32.const 1123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509895424236536e-38 @@ -18783,7 +18780,7 @@ i32.const 16 i32.const 1124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -4.70197740328915e-38 @@ -18796,7 +18793,7 @@ i32.const 16 i32.const 1125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.450580596923828e-09 @@ -18809,7 +18806,7 @@ i32.const 16 i32.const 1126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.000244140625 @@ -18822,7 +18819,7 @@ i32.const 16 i32.const 1127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.00048828125 @@ -18835,7 +18832,7 @@ i32.const 16 i32.const 1128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.0009765625 @@ -18848,7 +18845,7 @@ i32.const 16 i32.const 1129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 255.99993896484375 @@ -18861,7 +18858,7 @@ i32.const 16 i32.const 1132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5033165 @@ -18874,7 +18871,7 @@ i32.const 16 i32.const 1133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 421657440 @@ -18887,7 +18884,7 @@ i32.const 16 i32.const 1134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2147483392 @@ -18900,7 +18897,7 @@ i32.const 16 i32.const 1135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 68719476736 @@ -18913,7 +18910,7 @@ i32.const 16 i32.const 1136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 549755813888 @@ -18926,7 +18923,7 @@ i32.const 16 i32.const 1137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -18939,7 +18936,7 @@ i32.const 16 i32.const 1138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -255.99993896484375 @@ -18952,7 +18949,7 @@ i32.const 16 i32.const 1139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5033165 @@ -18965,7 +18962,7 @@ i32.const 16 i32.const 1140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -421657440 @@ -18978,7 +18975,7 @@ i32.const 16 i32.const 1141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2147483392 @@ -18991,7 +18988,7 @@ i32.const 16 i32.const 1142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -68719476736 @@ -19004,7 +19001,7 @@ i32.const 16 i32.const 1143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -549755813888 @@ -19017,7 +19014,7 @@ i32.const 16 i32.const 1144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3402823466385288598117041e14 @@ -19030,7 +19027,7 @@ i32.const 16 i32.const 1145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -19043,7 +19040,7 @@ i32.const 16 i32.const 1156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -19056,7 +19053,7 @@ i32.const 16 i32.const 1157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -19069,7 +19066,7 @@ i32.const 16 i32.const 1158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -19082,7 +19079,7 @@ i32.const 16 i32.const 1159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -19095,7 +19092,7 @@ i32.const 16 i32.const 1160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -19108,7 +19105,7 @@ i32.const 16 i32.const 1161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -19121,7 +19118,7 @@ i32.const 16 i32.const 1162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -19134,7 +19131,7 @@ i32.const 16 i32.const 1163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -19147,7 +19144,7 @@ i32.const 16 i32.const 1164 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -19160,7 +19157,7 @@ i32.const 16 i32.const 1165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -19173,7 +19170,7 @@ i32.const 16 i32.const 1168 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -19186,7 +19183,7 @@ i32.const 16 i32.const 1169 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -19199,7 +19196,7 @@ i32.const 16 i32.const 1170 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -19212,7 +19209,7 @@ i32.const 16 i32.const 1171 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -19225,7 +19222,7 @@ i32.const 16 i32.const 1172 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -19238,7 +19235,7 @@ i32.const 16 i32.const 1181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -19251,7 +19248,7 @@ i32.const 16 i32.const 1182 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -19264,7 +19261,7 @@ i32.const 16 i32.const 1183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -19277,7 +19274,7 @@ i32.const 16 i32.const 1184 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -19290,7 +19287,7 @@ i32.const 16 i32.const 1185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -19303,7 +19300,7 @@ i32.const 16 i32.const 1186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -19316,7 +19313,7 @@ i32.const 16 i32.const 1187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -19329,7 +19326,7 @@ i32.const 16 i32.const 1188 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -19342,7 +19339,7 @@ i32.const 16 i32.const 1189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -19355,7 +19352,7 @@ i32.const 16 i32.const 1190 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -19368,7 +19365,7 @@ i32.const 16 i32.const 1193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -19381,7 +19378,7 @@ i32.const 16 i32.const 1194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -19394,7 +19391,7 @@ i32.const 16 i32.const 1195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -19407,7 +19404,7 @@ i32.const 16 i32.const 1196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -19420,7 +19417,7 @@ i32.const 16 i32.const 1197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -19433,7 +19430,7 @@ i32.const 16 i32.const 1209 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -19446,7 +19443,7 @@ i32.const 16 i32.const 1210 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -19459,7 +19456,7 @@ i32.const 16 i32.const 1211 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -19472,7 +19469,7 @@ i32.const 16 i32.const 1212 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -19485,7 +19482,7 @@ i32.const 16 i32.const 1213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -19498,7 +19495,7 @@ i32.const 16 i32.const 1214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -19511,7 +19508,7 @@ i32.const 16 i32.const 1215 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -19524,7 +19521,7 @@ i32.const 16 i32.const 1216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -19537,7 +19534,7 @@ i32.const 16 i32.const 1217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -19550,7 +19547,7 @@ i32.const 16 i32.const 1218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -19563,7 +19560,7 @@ i32.const 16 i32.const 1221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -19576,7 +19573,7 @@ i32.const 16 i32.const 1222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -19589,7 +19586,7 @@ i32.const 16 i32.const 1223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -19602,7 +19599,7 @@ i32.const 16 i32.const 1224 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -19615,7 +19612,7 @@ i32.const 16 i32.const 1225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -19628,7 +19625,7 @@ i32.const 16 i32.const 1226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -19641,7 +19638,7 @@ i32.const 16 i32.const 1227 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0397214889526365 @@ -19654,7 +19651,7 @@ i32.const 16 i32.const 1228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0397214889526365 @@ -19667,7 +19664,7 @@ i32.const 16 i32.const 1229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0397210121154785 @@ -19680,7 +19677,7 @@ i32.const 16 i32.const 1230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0397214889526367 @@ -19693,7 +19690,7 @@ i32.const 16 i32.const 1231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -19706,7 +19703,7 @@ i32.const 16 i32.const 1234 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -5e-324 @@ -19719,7 +19716,7 @@ i32.const 16 i32.const 1235 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 709.782712893384 @@ -19732,7 +19729,7 @@ i32.const 16 i32.const 1237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 709.7827128933841 @@ -19745,7 +19742,7 @@ i32.const 16 i32.const 1244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -745.1332191019411 @@ -19758,7 +19755,7 @@ i32.const 16 i32.const 1245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -745.1332191019412 @@ -19771,7 +19768,7 @@ i32.const 16 i32.const 1252 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -708.3964185322641 @@ -19784,7 +19781,7 @@ i32.const 16 i32.const 1259 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -708.3964185322642 @@ -19797,7 +19794,7 @@ i32.const 16 i32.const 1266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5006933289508785 @@ -19810,7 +19807,7 @@ i32.const 16 i32.const 1273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.628493326460252 @@ -19823,7 +19820,7 @@ i32.const 16 i32.const 1280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.837522455340574 @@ -19836,7 +19833,7 @@ i32.const 16 i32.const 1287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.8504909932810999 @@ -19849,7 +19846,7 @@ i32.const 16 i32.const 1293 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.6270060846924657 @@ -19862,7 +19859,7 @@ i32.const 16 i32.const 1299 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.6744336219614115 @@ -19875,7 +19872,7 @@ i32.const 16 i32.const 1305 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 6.657914718791208 @@ -19888,7 +19885,7 @@ i32.const 16 i32.const 1312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 11.022872793631722 @@ -19901,7 +19898,7 @@ i32.const 16 i32.const 1319 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 11.411195701885317 @@ -19914,7 +19911,7 @@ i32.const 16 i32.const 1326 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 11.794490387560606 @@ -19927,7 +19924,7 @@ i32.const 16 i32.const 1333 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 412.83872756953286 @@ -19940,7 +19937,7 @@ i32.const 16 i32.const 1340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 510.87569028483415 @@ -19953,7 +19950,7 @@ i32.const 16 i32.const 1347 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2.6589841439772853e-14 @@ -19966,7 +19963,7 @@ i32.const 16 i32.const 1354 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2.7144952952085447e-14 @@ -19979,7 +19976,7 @@ i32.const 16 i32.const 1361 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -19992,7 +19989,7 @@ i32.const 16 i32.const 1375 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -20005,7 +20002,7 @@ i32.const 16 i32.const 1376 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -20018,7 +20015,7 @@ i32.const 16 i32.const 1377 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -20031,7 +20028,7 @@ i32.const 16 i32.const 1378 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -20044,7 +20041,7 @@ i32.const 16 i32.const 1379 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -20057,7 +20054,7 @@ i32.const 16 i32.const 1380 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -20070,7 +20067,7 @@ i32.const 16 i32.const 1381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -20083,7 +20080,7 @@ i32.const 16 i32.const 1382 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -20096,7 +20093,7 @@ i32.const 16 i32.const 1383 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -20109,7 +20106,7 @@ i32.const 16 i32.const 1384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -20122,7 +20119,7 @@ i32.const 16 i32.const 1387 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -20135,7 +20132,7 @@ i32.const 16 i32.const 1388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -20148,7 +20145,7 @@ i32.const 16 i32.const 1389 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -20161,7 +20158,7 @@ i32.const 16 i32.const 1390 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -20174,7 +20171,7 @@ i32.const 16 i32.const 1391 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -20187,7 +20184,7 @@ i32.const 16 i32.const 1392 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -20200,7 +20197,7 @@ i32.const 16 i32.const 1393 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 88.72283172607422 @@ -20213,7 +20210,7 @@ i32.const 16 i32.const 1394 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 88.72283935546875 @@ -20226,7 +20223,7 @@ i32.const 16 i32.const 1395 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -103.97207641601562 @@ -20239,7 +20236,7 @@ i32.const 16 i32.const 1396 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -103.97208404541016 @@ -20252,7 +20249,7 @@ i32.const 16 i32.const 1397 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.3465735614299774 @@ -20265,7 +20262,7 @@ i32.const 16 i32.const 1398 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.3465735912322998 @@ -20278,7 +20275,7 @@ i32.const 16 i32.const 1399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.3465736210346222 @@ -20291,7 +20288,7 @@ i32.const 16 i32.const 1400 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -20304,7 +20301,7 @@ i32.const 16 i32.const 1412 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -20317,7 +20314,7 @@ i32.const 16 i32.const 1413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -20330,7 +20327,7 @@ i32.const 16 i32.const 1414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -20343,7 +20340,7 @@ i32.const 16 i32.const 1415 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -20356,7 +20353,7 @@ i32.const 16 i32.const 1416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -20369,7 +20366,7 @@ i32.const 16 i32.const 1417 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -20382,7 +20379,7 @@ i32.const 16 i32.const 1418 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -20395,7 +20392,7 @@ i32.const 16 i32.const 1419 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -20408,7 +20405,7 @@ i32.const 16 i32.const 1420 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -20421,7 +20418,7 @@ i32.const 16 i32.const 1421 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -20434,7 +20431,7 @@ i32.const 16 i32.const 1424 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -20447,7 +20444,7 @@ i32.const 16 i32.const 1425 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -20460,7 +20457,7 @@ i32.const 16 i32.const 1426 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -20473,7 +20470,7 @@ i32.const 16 i32.const 1427 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -20486,7 +20483,7 @@ i32.const 16 i32.const 1428 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -20499,7 +20496,7 @@ i32.const 16 i32.const 1429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -20512,7 +20509,7 @@ i32.const 16 i32.const 1430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507201e-308 @@ -20525,7 +20522,7 @@ i32.const 16 i32.const 1431 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2.225073858507201e-308 @@ -20538,7 +20535,7 @@ i32.const 16 i32.const 1432 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -20551,7 +20548,7 @@ i32.const 16 i32.const 1441 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -20564,7 +20561,7 @@ i32.const 16 i32.const 1442 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -20577,7 +20574,7 @@ i32.const 16 i32.const 1443 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -20590,7 +20587,7 @@ i32.const 16 i32.const 1444 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -20603,7 +20600,7 @@ i32.const 16 i32.const 1445 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -20616,7 +20613,7 @@ i32.const 16 i32.const 1446 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -20629,7 +20626,7 @@ i32.const 16 i32.const 1447 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -20642,7 +20639,7 @@ i32.const 16 i32.const 1448 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -20655,7 +20652,7 @@ i32.const 16 i32.const 1449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -20668,7 +20665,7 @@ i32.const 16 i32.const 1450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -20681,7 +20678,7 @@ i32.const 16 i32.const 1453 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -20694,7 +20691,7 @@ i32.const 16 i32.const 1454 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -20707,7 +20704,7 @@ i32.const 16 i32.const 1455 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -20720,7 +20717,7 @@ i32.const 16 i32.const 1456 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -20733,7 +20730,7 @@ i32.const 16 i32.const 1457 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -20746,7 +20743,7 @@ i32.const 16 i32.const 1458 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -20759,7 +20756,7 @@ i32.const 16 i32.const 1459 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -20771,7 +20768,7 @@ i32.const 16 i32.const 1471 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -20783,7 +20780,7 @@ i32.const 16 i32.const 1472 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -20795,7 +20792,7 @@ i32.const 16 i32.const 1473 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -20807,7 +20804,7 @@ i32.const 16 i32.const 1474 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -20819,7 +20816,7 @@ i32.const 16 i32.const 1475 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -20831,7 +20828,7 @@ i32.const 16 i32.const 1476 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -20843,7 +20840,7 @@ i32.const 16 i32.const 1477 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -20855,7 +20852,7 @@ i32.const 16 i32.const 1478 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -20867,7 +20864,7 @@ i32.const 16 i32.const 1479 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -20879,7 +20876,7 @@ i32.const 16 i32.const 1480 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -20891,7 +20888,7 @@ i32.const 16 i32.const 1483 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -20903,7 +20900,7 @@ i32.const 16 i32.const 1484 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -20915,7 +20912,7 @@ i32.const 16 i32.const 1485 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -20927,7 +20924,7 @@ i32.const 16 i32.const 1486 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -20939,7 +20936,7 @@ i32.const 16 i32.const 1487 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -20951,7 +20948,7 @@ i32.const 16 i32.const 1488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -20963,7 +20960,7 @@ i32.const 16 i32.const 1489 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -20975,7 +20972,7 @@ i32.const 16 i32.const 1490 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -20987,7 +20984,7 @@ i32.const 16 i32.const 1491 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -20999,7 +20996,7 @@ i32.const 16 i32.const 1492 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -21011,7 +21008,7 @@ i32.const 16 i32.const 1493 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -21023,7 +21020,7 @@ i32.const 16 i32.const 1494 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -21035,7 +21032,7 @@ i32.const 16 i32.const 1495 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -21047,7 +21044,7 @@ i32.const 16 i32.const 1496 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -21059,7 +21056,7 @@ i32.const 16 i32.const 1497 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -21071,7 +21068,7 @@ i32.const 16 i32.const 1506 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -21083,7 +21080,7 @@ i32.const 16 i32.const 1507 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -21095,7 +21092,7 @@ i32.const 16 i32.const 1508 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -21107,7 +21104,7 @@ i32.const 16 i32.const 1509 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -21119,7 +21116,7 @@ i32.const 16 i32.const 1510 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -21131,7 +21128,7 @@ i32.const 16 i32.const 1511 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -21143,7 +21140,7 @@ i32.const 16 i32.const 1512 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -21155,7 +21152,7 @@ i32.const 16 i32.const 1513 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -21167,7 +21164,7 @@ i32.const 16 i32.const 1514 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -21179,7 +21176,7 @@ i32.const 16 i32.const 1515 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -21191,7 +21188,7 @@ i32.const 16 i32.const 1518 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -21203,7 +21200,7 @@ i32.const 16 i32.const 1519 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -21215,7 +21212,7 @@ i32.const 16 i32.const 1520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -21227,7 +21224,7 @@ i32.const 16 i32.const 1521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -21239,7 +21236,7 @@ i32.const 16 i32.const 1522 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -21251,7 +21248,7 @@ i32.const 16 i32.const 1523 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -21263,7 +21260,7 @@ i32.const 16 i32.const 1524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -21275,7 +21272,7 @@ i32.const 16 i32.const 1525 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -21287,7 +21284,7 @@ i32.const 16 i32.const 1526 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -21299,7 +21296,7 @@ i32.const 16 i32.const 1527 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -21311,7 +21308,7 @@ i32.const 16 i32.const 1528 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -21323,7 +21320,7 @@ i32.const 16 i32.const 1529 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -21335,7 +21332,7 @@ i32.const 16 i32.const 1530 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -21347,7 +21344,7 @@ i32.const 16 i32.const 1531 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -21359,7 +21356,7 @@ i32.const 16 i32.const 1532 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -21373,7 +21370,7 @@ i32.const 16 i32.const 1544 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -21387,7 +21384,7 @@ i32.const 16 i32.const 1545 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -21401,7 +21398,7 @@ i32.const 16 i32.const 1546 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -21415,7 +21412,7 @@ i32.const 16 i32.const 1547 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -21429,7 +21426,7 @@ i32.const 16 i32.const 1548 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -21443,7 +21440,7 @@ i32.const 16 i32.const 1549 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -21457,7 +21454,7 @@ i32.const 16 i32.const 1550 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -21471,7 +21468,7 @@ i32.const 16 i32.const 1551 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -21485,7 +21482,7 @@ i32.const 16 i32.const 1552 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -21499,7 +21496,7 @@ i32.const 16 i32.const 1553 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3 @@ -21513,7 +21510,7 @@ i32.const 16 i32.const 1556 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -21527,7 +21524,7 @@ i32.const 16 i32.const 1557 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4 @@ -21541,7 +21538,7 @@ i32.const 16 i32.const 1558 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4 @@ -21555,7 +21552,7 @@ i32.const 16 i32.const 1559 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -21569,7 +21566,7 @@ i32.const 16 i32.const 1560 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -21583,7 +21580,7 @@ i32.const 16 i32.const 1561 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -21597,7 +21594,7 @@ i32.const 16 i32.const 1562 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -21611,7 +21608,7 @@ i32.const 16 i32.const 1563 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -21625,7 +21622,7 @@ i32.const 16 i32.const 1564 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -21639,7 +21636,7 @@ i32.const 16 i32.const 1565 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -21653,7 +21650,7 @@ i32.const 16 i32.const 1566 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -21667,7 +21664,7 @@ i32.const 16 i32.const 1567 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -21681,7 +21678,7 @@ i32.const 16 i32.const 1568 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -21695,7 +21692,7 @@ i32.const 16 i32.const 1569 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -21709,7 +21706,7 @@ i32.const 16 i32.const 1570 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -21723,7 +21720,7 @@ i32.const 16 i32.const 1571 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -21737,7 +21734,7 @@ i32.const 16 i32.const 1572 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -21751,7 +21748,7 @@ i32.const 16 i32.const 1573 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -21765,7 +21762,7 @@ i32.const 16 i32.const 1574 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -21779,7 +21776,7 @@ i32.const 16 i32.const 1583 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -21793,7 +21790,7 @@ i32.const 16 i32.const 1584 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -21807,7 +21804,7 @@ i32.const 16 i32.const 1585 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -21821,7 +21818,7 @@ i32.const 16 i32.const 1586 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -21835,7 +21832,7 @@ i32.const 16 i32.const 1587 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -21849,7 +21846,7 @@ i32.const 16 i32.const 1588 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -21863,7 +21860,7 @@ i32.const 16 i32.const 1589 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -21877,7 +21874,7 @@ i32.const 16 i32.const 1590 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -21891,7 +21888,7 @@ i32.const 16 i32.const 1591 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -21905,7 +21902,7 @@ i32.const 16 i32.const 1592 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -21919,7 +21916,7 @@ i32.const 16 i32.const 1595 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -21933,7 +21930,7 @@ i32.const 16 i32.const 1596 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4 @@ -21947,7 +21944,7 @@ i32.const 16 i32.const 1597 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4 @@ -21961,7 +21958,7 @@ i32.const 16 i32.const 1598 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -21975,7 +21972,7 @@ i32.const 16 i32.const 1599 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -21989,7 +21986,7 @@ i32.const 16 i32.const 1600 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -22003,7 +22000,7 @@ i32.const 16 i32.const 1601 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -22017,7 +22014,7 @@ i32.const 16 i32.const 1602 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -22031,7 +22028,7 @@ i32.const 16 i32.const 1603 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -22045,7 +22042,7 @@ i32.const 16 i32.const 1604 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -22059,7 +22056,7 @@ i32.const 16 i32.const 1605 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -22073,7 +22070,7 @@ i32.const 16 i32.const 1606 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -22087,7 +22084,7 @@ i32.const 16 i32.const 1607 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -22101,7 +22098,7 @@ i32.const 16 i32.const 1608 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -22115,7 +22112,7 @@ i32.const 16 i32.const 1609 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -22129,7 +22126,7 @@ i32.const 16 i32.const 1610 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -22143,7 +22140,7 @@ i32.const 16 i32.const 1611 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -22157,7 +22154,7 @@ i32.const 16 i32.const 1612 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -22171,7 +22168,7 @@ i32.const 16 i32.const 1613 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -22184,7 +22181,7 @@ i32.const 16 i32.const 1625 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -22197,7 +22194,7 @@ i32.const 16 i32.const 1626 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -22210,7 +22207,7 @@ i32.const 16 i32.const 1627 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -22223,7 +22220,7 @@ i32.const 16 i32.const 1628 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -22236,7 +22233,7 @@ i32.const 16 i32.const 1629 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -22249,7 +22246,7 @@ i32.const 16 i32.const 1630 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -22262,7 +22259,7 @@ i32.const 16 i32.const 1631 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -22275,7 +22272,7 @@ i32.const 16 i32.const 1632 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -22288,7 +22285,7 @@ i32.const 16 i32.const 1633 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -22301,7 +22298,7 @@ i32.const 16 i32.const 1634 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -22314,7 +22311,7 @@ i32.const 16 i32.const 1637 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -22327,7 +22324,7 @@ i32.const 16 i32.const 1638 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -22340,7 +22337,7 @@ i32.const 16 i32.const 1639 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -22353,7 +22350,7 @@ i32.const 16 i32.const 1640 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -22366,7 +22363,7 @@ i32.const 16 i32.const 1641 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -22379,7 +22376,7 @@ i32.const 16 i32.const 1642 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -22392,7 +22389,7 @@ i32.const 16 i32.const 1643 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -22405,7 +22402,7 @@ i32.const 16 i32.const 1644 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -22417,7 +22414,7 @@ i32.const 16 i32.const 1653 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -22429,7 +22426,7 @@ i32.const 16 i32.const 1654 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -22441,7 +22438,7 @@ i32.const 16 i32.const 1655 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -22453,7 +22450,7 @@ i32.const 16 i32.const 1656 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -22465,7 +22462,7 @@ i32.const 16 i32.const 1657 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -22477,7 +22474,7 @@ i32.const 16 i32.const 1658 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -22489,7 +22486,7 @@ i32.const 16 i32.const 1659 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -22501,7 +22498,7 @@ i32.const 16 i32.const 1660 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -22513,7 +22510,7 @@ i32.const 16 i32.const 1663 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -22525,7 +22522,7 @@ i32.const 16 i32.const 1664 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -22537,7 +22534,7 @@ i32.const 16 i32.const 1665 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -22549,7 +22546,7 @@ i32.const 16 i32.const 1666 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -22561,7 +22558,7 @@ i32.const 16 i32.const 1667 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -22573,7 +22570,7 @@ i32.const 16 i32.const 1668 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -22585,7 +22582,7 @@ i32.const 16 i32.const 1669 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -22597,7 +22594,7 @@ i32.const 16 i32.const 1670 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -22610,7 +22607,7 @@ i32.const 16 i32.const 1682 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -22623,7 +22620,7 @@ i32.const 16 i32.const 1683 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -22636,7 +22633,7 @@ i32.const 16 i32.const 1684 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -22649,7 +22646,7 @@ i32.const 16 i32.const 1685 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -22662,7 +22659,7 @@ i32.const 16 i32.const 1686 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -22675,7 +22672,7 @@ i32.const 16 i32.const 1687 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -22688,7 +22685,7 @@ i32.const 16 i32.const 1688 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -22701,7 +22698,7 @@ i32.const 16 i32.const 1689 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -22714,7 +22711,7 @@ i32.const 16 i32.const 1690 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -22727,7 +22724,7 @@ i32.const 16 i32.const 1691 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -22740,7 +22737,7 @@ i32.const 16 i32.const 1694 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -22753,7 +22750,7 @@ i32.const 16 i32.const 1695 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -22766,7 +22763,7 @@ i32.const 16 i32.const 1696 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -22779,7 +22776,7 @@ i32.const 16 i32.const 1697 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -22792,7 +22789,7 @@ i32.const 16 i32.const 1698 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -22805,7 +22802,7 @@ i32.const 16 i32.const 1699 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -22818,7 +22815,7 @@ i32.const 16 i32.const 1700 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -22831,7 +22828,7 @@ i32.const 16 i32.const 1701 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -22844,7 +22841,7 @@ i32.const 16 i32.const 1710 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -22857,7 +22854,7 @@ i32.const 16 i32.const 1711 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -22870,7 +22867,7 @@ i32.const 16 i32.const 1712 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -22883,7 +22880,7 @@ i32.const 16 i32.const 1713 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -22896,7 +22893,7 @@ i32.const 16 i32.const 1714 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -22909,7 +22906,7 @@ i32.const 16 i32.const 1715 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -22922,7 +22919,7 @@ i32.const 16 i32.const 1716 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -22935,7 +22932,7 @@ i32.const 16 i32.const 1717 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -22948,7 +22945,7 @@ i32.const 16 i32.const 1718 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -22961,7 +22958,7 @@ i32.const 16 i32.const 1719 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -22974,7 +22971,7 @@ i32.const 16 i32.const 1722 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -22987,7 +22984,7 @@ i32.const 16 i32.const 1723 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -23000,7 +22997,7 @@ i32.const 16 i32.const 1724 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -23013,7 +23010,7 @@ i32.const 16 i32.const 1725 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -23026,7 +23023,7 @@ i32.const 16 i32.const 1726 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -23039,7 +23036,7 @@ i32.const 16 i32.const 1727 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -23052,7 +23049,7 @@ i32.const 16 i32.const 1728 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -23065,7 +23062,7 @@ i32.const 16 i32.const 1729 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -23078,7 +23075,7 @@ i32.const 16 i32.const 1741 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -23091,7 +23088,7 @@ i32.const 16 i32.const 1742 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -23104,7 +23101,7 @@ i32.const 16 i32.const 1743 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -23117,7 +23114,7 @@ i32.const 16 i32.const 1744 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -23130,7 +23127,7 @@ i32.const 16 i32.const 1745 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -23143,7 +23140,7 @@ i32.const 16 i32.const 1746 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -23156,7 +23153,7 @@ i32.const 16 i32.const 1747 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -23169,7 +23166,7 @@ i32.const 16 i32.const 1748 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -23182,7 +23179,7 @@ i32.const 16 i32.const 1749 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -23195,7 +23192,7 @@ i32.const 16 i32.const 1750 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -23208,7 +23205,7 @@ i32.const 16 i32.const 1753 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -23221,7 +23218,7 @@ i32.const 16 i32.const 1754 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -23234,7 +23231,7 @@ i32.const 16 i32.const 1755 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -23247,7 +23244,7 @@ i32.const 16 i32.const 1756 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -23260,7 +23257,7 @@ i32.const 16 i32.const 1757 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -23273,7 +23270,7 @@ i32.const 16 i32.const 1758 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -23286,7 +23283,7 @@ i32.const 16 i32.const 1759 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -23299,7 +23296,7 @@ i32.const 16 i32.const 1760 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -23312,7 +23309,7 @@ i32.const 16 i32.const 1769 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -23325,7 +23322,7 @@ i32.const 16 i32.const 1770 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -23338,7 +23335,7 @@ i32.const 16 i32.const 1771 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -23351,7 +23348,7 @@ i32.const 16 i32.const 1772 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -23364,7 +23361,7 @@ i32.const 16 i32.const 1773 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -23377,7 +23374,7 @@ i32.const 16 i32.const 1774 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -23390,7 +23387,7 @@ i32.const 16 i32.const 1775 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -23403,7 +23400,7 @@ i32.const 16 i32.const 1776 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -23416,7 +23413,7 @@ i32.const 16 i32.const 1777 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -23429,7 +23426,7 @@ i32.const 16 i32.const 1778 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -23442,7 +23439,7 @@ i32.const 16 i32.const 1781 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -23455,7 +23452,7 @@ i32.const 16 i32.const 1782 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -23468,7 +23465,7 @@ i32.const 16 i32.const 1783 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -23481,7 +23478,7 @@ i32.const 16 i32.const 1784 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -23494,7 +23491,7 @@ i32.const 16 i32.const 1785 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -23507,7 +23504,7 @@ i32.const 16 i32.const 1786 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -23520,7 +23517,7 @@ i32.const 16 i32.const 1787 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -23533,7 +23530,7 @@ i32.const 16 i32.const 1788 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754942106924411e-38 @@ -23546,7 +23543,7 @@ i32.const 16 i32.const 1789 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -23559,7 +23556,7 @@ i32.const 16 i32.const 1801 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -23572,7 +23569,7 @@ i32.const 16 i32.const 1802 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -23585,7 +23582,7 @@ i32.const 16 i32.const 1803 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -23598,7 +23595,7 @@ i32.const 16 i32.const 1804 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -23611,7 +23608,7 @@ i32.const 16 i32.const 1805 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -23624,7 +23621,7 @@ i32.const 16 i32.const 1806 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -23637,7 +23634,7 @@ i32.const 16 i32.const 1807 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -23650,7 +23647,7 @@ i32.const 16 i32.const 1808 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -23663,7 +23660,7 @@ i32.const 16 i32.const 1809 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -23676,7 +23673,7 @@ i32.const 16 i32.const 1810 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -23689,7 +23686,7 @@ i32.const 16 i32.const 1813 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -23702,7 +23699,7 @@ i32.const 16 i32.const 1814 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -23715,7 +23712,7 @@ i32.const 16 i32.const 1815 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -23728,7 +23725,7 @@ i32.const 16 i32.const 1816 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -23741,7 +23738,7 @@ i32.const 16 i32.const 1817 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -23754,7 +23751,7 @@ i32.const 16 i32.const 1818 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -23767,7 +23764,7 @@ i32.const 16 i32.const 1819 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -23780,7 +23777,7 @@ i32.const 16 i32.const 1820 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -23793,7 +23790,7 @@ i32.const 16 i32.const 1829 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -23806,7 +23803,7 @@ i32.const 16 i32.const 1830 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -23819,7 +23816,7 @@ i32.const 16 i32.const 1831 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -23832,7 +23829,7 @@ i32.const 16 i32.const 1832 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -23845,7 +23842,7 @@ i32.const 16 i32.const 1833 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -23858,7 +23855,7 @@ i32.const 16 i32.const 1834 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -23871,7 +23868,7 @@ i32.const 16 i32.const 1835 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -23884,7 +23881,7 @@ i32.const 16 i32.const 1836 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -23897,7 +23894,7 @@ i32.const 16 i32.const 1837 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -23910,7 +23907,7 @@ i32.const 16 i32.const 1838 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -23923,7 +23920,7 @@ i32.const 16 i32.const 1841 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -23936,7 +23933,7 @@ i32.const 16 i32.const 1842 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -23949,7 +23946,7 @@ i32.const 16 i32.const 1843 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -23962,7 +23959,7 @@ i32.const 16 i32.const 1844 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -23975,7 +23972,7 @@ i32.const 16 i32.const 1845 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -23988,7 +23985,7 @@ i32.const 16 i32.const 1846 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -24001,7 +23998,7 @@ i32.const 16 i32.const 1847 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -24014,7 +24011,7 @@ i32.const 16 i32.const 1848 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -24027,7 +24024,7 @@ i32.const 16 i32.const 1860 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -24040,7 +24037,7 @@ i32.const 16 i32.const 1861 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -24053,7 +24050,7 @@ i32.const 16 i32.const 1862 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -24066,7 +24063,7 @@ i32.const 16 i32.const 1863 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -24079,7 +24076,7 @@ i32.const 16 i32.const 1864 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -24092,7 +24089,7 @@ i32.const 16 i32.const 1865 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -24105,7 +24102,7 @@ i32.const 16 i32.const 1866 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -24118,7 +24115,7 @@ i32.const 16 i32.const 1867 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -24131,7 +24128,7 @@ i32.const 16 i32.const 1868 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -24144,7 +24141,7 @@ i32.const 16 i32.const 1869 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -24157,7 +24154,7 @@ i32.const 16 i32.const 1872 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -24170,7 +24167,7 @@ i32.const 16 i32.const 1873 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -24183,7 +24180,7 @@ i32.const 16 i32.const 1874 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -24196,7 +24193,7 @@ i32.const 16 i32.const 1875 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -24209,7 +24206,7 @@ i32.const 16 i32.const 1876 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -24222,7 +24219,7 @@ i32.const 16 i32.const 1877 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24235,7 +24232,7 @@ i32.const 16 i32.const 1878 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -24248,7 +24245,7 @@ i32.const 16 i32.const 1879 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -24261,7 +24258,7 @@ i32.const 16 i32.const 1880 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -24274,7 +24271,7 @@ i32.const 16 i32.const 1881 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -24287,7 +24284,7 @@ i32.const 16 i32.const 1882 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -24300,7 +24297,7 @@ i32.const 16 i32.const 1883 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -24313,7 +24310,7 @@ i32.const 16 i32.const 1884 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -24326,7 +24323,7 @@ i32.const 16 i32.const 1885 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -24339,7 +24336,7 @@ i32.const 16 i32.const 1886 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24352,7 +24349,7 @@ i32.const 16 i32.const 1887 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -24365,7 +24362,7 @@ i32.const 16 i32.const 1888 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -24378,7 +24375,7 @@ i32.const 16 i32.const 1889 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -24391,7 +24388,7 @@ i32.const 16 i32.const 1890 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -24404,7 +24401,7 @@ i32.const 16 i32.const 1891 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -24417,7 +24414,7 @@ i32.const 16 i32.const 1892 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -24430,7 +24427,7 @@ i32.const 16 i32.const 1893 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -24443,7 +24440,7 @@ i32.const 16 i32.const 1894 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -24456,7 +24453,7 @@ i32.const 16 i32.const 1895 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -24469,7 +24466,7 @@ i32.const 16 i32.const 1896 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -24482,7 +24479,7 @@ i32.const 16 i32.const 1897 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -24495,7 +24492,7 @@ i32.const 16 i32.const 1898 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -24508,7 +24505,7 @@ i32.const 16 i32.const 1899 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -24521,7 +24518,7 @@ i32.const 16 i32.const 1900 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -24534,7 +24531,7 @@ i32.const 16 i32.const 1901 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24547,7 +24544,7 @@ i32.const 16 i32.const 1902 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -24560,7 +24557,7 @@ i32.const 16 i32.const 1903 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -24573,7 +24570,7 @@ i32.const 16 i32.const 1904 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -24586,7 +24583,7 @@ i32.const 16 i32.const 1905 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24599,7 +24596,7 @@ i32.const 16 i32.const 1906 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -24612,7 +24609,7 @@ i32.const 16 i32.const 1907 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -24625,7 +24622,7 @@ i32.const 16 i32.const 1908 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24638,7 +24635,7 @@ i32.const 16 i32.const 1909 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24651,7 +24648,7 @@ i32.const 16 i32.const 1910 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24664,7 +24661,7 @@ i32.const 16 i32.const 1911 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -24677,7 +24674,7 @@ i32.const 16 i32.const 1912 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -24690,7 +24687,7 @@ i32.const 16 i32.const 1913 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -24703,7 +24700,7 @@ i32.const 16 i32.const 1914 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -24716,7 +24713,7 @@ i32.const 16 i32.const 1915 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -24729,7 +24726,7 @@ i32.const 16 i32.const 1916 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -24742,7 +24739,7 @@ i32.const 16 i32.const 1917 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -24755,7 +24752,7 @@ i32.const 16 i32.const 1918 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -24768,7 +24765,7 @@ i32.const 16 i32.const 1919 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24781,7 +24778,7 @@ i32.const 16 i32.const 1920 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -24794,7 +24791,7 @@ i32.const 16 i32.const 1921 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -24807,7 +24804,7 @@ i32.const 16 i32.const 1922 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -24820,7 +24817,7 @@ i32.const 16 i32.const 1923 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24833,7 +24830,7 @@ i32.const 16 i32.const 1924 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -24846,7 +24843,7 @@ i32.const 16 i32.const 1925 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -24859,7 +24856,7 @@ i32.const 16 i32.const 1926 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -24872,7 +24869,7 @@ i32.const 16 i32.const 1927 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -24885,7 +24882,7 @@ i32.const 16 i32.const 1928 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -24898,7 +24895,7 @@ i32.const 16 i32.const 1929 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -24911,7 +24908,7 @@ i32.const 16 i32.const 1938 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -24924,7 +24921,7 @@ i32.const 16 i32.const 1939 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -24937,7 +24934,7 @@ i32.const 16 i32.const 1940 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -24950,7 +24947,7 @@ i32.const 16 i32.const 1941 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -24963,7 +24960,7 @@ i32.const 16 i32.const 1942 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -24976,7 +24973,7 @@ i32.const 16 i32.const 1943 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -24989,7 +24986,7 @@ i32.const 16 i32.const 1944 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -25002,7 +24999,7 @@ i32.const 16 i32.const 1945 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -25015,7 +25012,7 @@ i32.const 16 i32.const 1946 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -25028,7 +25025,7 @@ i32.const 16 i32.const 1947 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -25041,7 +25038,7 @@ i32.const 16 i32.const 1950 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -25054,7 +25051,7 @@ i32.const 16 i32.const 1951 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -25067,7 +25064,7 @@ i32.const 16 i32.const 1952 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -25080,7 +25077,7 @@ i32.const 16 i32.const 1953 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -25093,7 +25090,7 @@ i32.const 16 i32.const 1954 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -25106,7 +25103,7 @@ i32.const 16 i32.const 1955 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25119,7 +25116,7 @@ i32.const 16 i32.const 1956 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -25132,7 +25129,7 @@ i32.const 16 i32.const 1957 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -25145,7 +25142,7 @@ i32.const 16 i32.const 1958 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -25158,7 +25155,7 @@ i32.const 16 i32.const 1959 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -25171,7 +25168,7 @@ i32.const 16 i32.const 1960 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -25184,7 +25181,7 @@ i32.const 16 i32.const 1961 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -25197,7 +25194,7 @@ i32.const 16 i32.const 1962 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -25210,7 +25207,7 @@ i32.const 16 i32.const 1963 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -25223,7 +25220,7 @@ i32.const 16 i32.const 1964 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25236,7 +25233,7 @@ i32.const 16 i32.const 1965 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -25249,7 +25246,7 @@ i32.const 16 i32.const 1966 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -25262,7 +25259,7 @@ i32.const 16 i32.const 1967 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -25275,7 +25272,7 @@ i32.const 16 i32.const 1968 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -25288,7 +25285,7 @@ i32.const 16 i32.const 1969 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -25301,7 +25298,7 @@ i32.const 16 i32.const 1970 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -25314,7 +25311,7 @@ i32.const 16 i32.const 1971 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -25327,7 +25324,7 @@ i32.const 16 i32.const 1972 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -25340,7 +25337,7 @@ i32.const 16 i32.const 1973 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -25353,7 +25350,7 @@ i32.const 16 i32.const 1974 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -25366,7 +25363,7 @@ i32.const 16 i32.const 1975 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -25379,7 +25376,7 @@ i32.const 16 i32.const 1976 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -25392,7 +25389,7 @@ i32.const 16 i32.const 1977 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -25405,7 +25402,7 @@ i32.const 16 i32.const 1978 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -25418,7 +25415,7 @@ i32.const 16 i32.const 1979 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25431,7 +25428,7 @@ i32.const 16 i32.const 1980 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -25444,7 +25441,7 @@ i32.const 16 i32.const 1981 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -25457,7 +25454,7 @@ i32.const 16 i32.const 1982 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -25470,7 +25467,7 @@ i32.const 16 i32.const 1983 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25483,7 +25480,7 @@ i32.const 16 i32.const 1984 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -25496,7 +25493,7 @@ i32.const 16 i32.const 1985 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -25509,7 +25506,7 @@ i32.const 16 i32.const 1986 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25522,7 +25519,7 @@ i32.const 16 i32.const 1987 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25535,7 +25532,7 @@ i32.const 16 i32.const 1988 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25548,7 +25545,7 @@ i32.const 16 i32.const 1989 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -25561,7 +25558,7 @@ i32.const 16 i32.const 1990 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -25574,7 +25571,7 @@ i32.const 16 i32.const 1991 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -25587,7 +25584,7 @@ i32.const 16 i32.const 1992 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -25600,7 +25597,7 @@ i32.const 16 i32.const 1993 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -25613,7 +25610,7 @@ i32.const 16 i32.const 1994 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -25626,7 +25623,7 @@ i32.const 16 i32.const 1995 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -25639,7 +25636,7 @@ i32.const 16 i32.const 1996 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -25652,7 +25649,7 @@ i32.const 16 i32.const 1997 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25665,7 +25662,7 @@ i32.const 16 i32.const 1998 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -25678,7 +25675,7 @@ i32.const 16 i32.const 1999 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -25691,7 +25688,7 @@ i32.const 16 i32.const 2000 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -25704,7 +25701,7 @@ i32.const 16 i32.const 2001 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25717,7 +25714,7 @@ i32.const 16 i32.const 2002 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -25730,7 +25727,7 @@ i32.const 16 i32.const 2003 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -25743,7 +25740,7 @@ i32.const 16 i32.const 2004 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -25756,7 +25753,7 @@ i32.const 16 i32.const 2005 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -25769,7 +25766,7 @@ i32.const 16 i32.const 2006 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -25782,7 +25779,7 @@ i32.const 16 i32.const 2007 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -25795,7 +25792,7 @@ i32.const 16 i32.const 2019 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -25808,7 +25805,7 @@ i32.const 16 i32.const 2020 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -25821,7 +25818,7 @@ i32.const 16 i32.const 2021 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -25834,7 +25831,7 @@ i32.const 16 i32.const 2022 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -25847,7 +25844,7 @@ i32.const 16 i32.const 2023 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -25860,7 +25857,7 @@ i32.const 16 i32.const 2024 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -25873,7 +25870,7 @@ i32.const 16 i32.const 2025 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -25886,7 +25883,7 @@ i32.const 16 i32.const 2026 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -25899,7 +25896,7 @@ i32.const 16 i32.const 2027 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -25912,7 +25909,7 @@ i32.const 16 i32.const 2028 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -25925,7 +25922,7 @@ i32.const 16 i32.const 2031 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -25938,7 +25935,7 @@ i32.const 16 i32.const 2032 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -25951,7 +25948,7 @@ i32.const 16 i32.const 2033 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -25964,7 +25961,7 @@ i32.const 16 i32.const 2034 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -25977,7 +25974,7 @@ i32.const 16 i32.const 2035 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -25990,7 +25987,7 @@ i32.const 16 i32.const 2036 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26003,7 +26000,7 @@ i32.const 16 i32.const 2037 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -26016,7 +26013,7 @@ i32.const 16 i32.const 2038 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -26029,7 +26026,7 @@ i32.const 16 i32.const 2039 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -26042,7 +26039,7 @@ i32.const 16 i32.const 2040 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -26055,7 +26052,7 @@ i32.const 16 i32.const 2041 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -26068,7 +26065,7 @@ i32.const 16 i32.const 2042 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -26081,7 +26078,7 @@ i32.const 16 i32.const 2043 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -26094,7 +26091,7 @@ i32.const 16 i32.const 2044 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -26107,7 +26104,7 @@ i32.const 16 i32.const 2045 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26120,7 +26117,7 @@ i32.const 16 i32.const 2046 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -26133,7 +26130,7 @@ i32.const 16 i32.const 2047 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -26146,7 +26143,7 @@ i32.const 16 i32.const 2048 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -26159,7 +26156,7 @@ i32.const 16 i32.const 2049 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -26172,7 +26169,7 @@ i32.const 16 i32.const 2050 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -26185,7 +26182,7 @@ i32.const 16 i32.const 2051 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -26198,7 +26195,7 @@ i32.const 16 i32.const 2052 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -26211,7 +26208,7 @@ i32.const 16 i32.const 2053 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -26224,7 +26221,7 @@ i32.const 16 i32.const 2054 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -26237,7 +26234,7 @@ i32.const 16 i32.const 2055 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -26250,7 +26247,7 @@ i32.const 16 i32.const 2056 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -26263,7 +26260,7 @@ i32.const 16 i32.const 2057 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -26276,7 +26273,7 @@ i32.const 16 i32.const 2058 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -26289,7 +26286,7 @@ i32.const 16 i32.const 2059 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -26302,7 +26299,7 @@ i32.const 16 i32.const 2060 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26315,7 +26312,7 @@ i32.const 16 i32.const 2061 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -26328,7 +26325,7 @@ i32.const 16 i32.const 2062 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -26341,7 +26338,7 @@ i32.const 16 i32.const 2063 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -26354,7 +26351,7 @@ i32.const 16 i32.const 2064 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26367,7 +26364,7 @@ i32.const 16 i32.const 2065 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -26380,7 +26377,7 @@ i32.const 16 i32.const 2066 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -26393,7 +26390,7 @@ i32.const 16 i32.const 2067 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26406,7 +26403,7 @@ i32.const 16 i32.const 2068 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26419,7 +26416,7 @@ i32.const 16 i32.const 2069 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26432,7 +26429,7 @@ i32.const 16 i32.const 2070 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -26445,7 +26442,7 @@ i32.const 16 i32.const 2071 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -26458,7 +26455,7 @@ i32.const 16 i32.const 2072 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -26471,7 +26468,7 @@ i32.const 16 i32.const 2073 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -26484,7 +26481,7 @@ i32.const 16 i32.const 2074 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -26497,7 +26494,7 @@ i32.const 16 i32.const 2075 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -26510,7 +26507,7 @@ i32.const 16 i32.const 2076 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -26523,7 +26520,7 @@ i32.const 16 i32.const 2077 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -26536,7 +26533,7 @@ i32.const 16 i32.const 2078 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26549,7 +26546,7 @@ i32.const 16 i32.const 2079 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -26562,7 +26559,7 @@ i32.const 16 i32.const 2080 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -26575,7 +26572,7 @@ i32.const 16 i32.const 2081 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -26588,7 +26585,7 @@ i32.const 16 i32.const 2082 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26601,7 +26598,7 @@ i32.const 16 i32.const 2083 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -26614,7 +26611,7 @@ i32.const 16 i32.const 2084 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -26627,7 +26624,7 @@ i32.const 16 i32.const 2085 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -26640,7 +26637,7 @@ i32.const 16 i32.const 2086 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -26653,7 +26650,7 @@ i32.const 16 i32.const 2087 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -26666,7 +26663,7 @@ i32.const 16 i32.const 2088 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -26679,7 +26676,7 @@ i32.const 16 i32.const 2097 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -26692,7 +26689,7 @@ i32.const 16 i32.const 2098 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -26705,7 +26702,7 @@ i32.const 16 i32.const 2099 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -26718,7 +26715,7 @@ i32.const 16 i32.const 2100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -26731,7 +26728,7 @@ i32.const 16 i32.const 2101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -26744,7 +26741,7 @@ i32.const 16 i32.const 2102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -26757,7 +26754,7 @@ i32.const 16 i32.const 2103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -26770,7 +26767,7 @@ i32.const 16 i32.const 2104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -26783,7 +26780,7 @@ i32.const 16 i32.const 2105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -26796,7 +26793,7 @@ i32.const 16 i32.const 2106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -26809,7 +26806,7 @@ i32.const 16 i32.const 2109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -26822,7 +26819,7 @@ i32.const 16 i32.const 2110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -26835,7 +26832,7 @@ i32.const 16 i32.const 2111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -26848,7 +26845,7 @@ i32.const 16 i32.const 2112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -26861,7 +26858,7 @@ i32.const 16 i32.const 2113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -26874,7 +26871,7 @@ i32.const 16 i32.const 2114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -26887,7 +26884,7 @@ i32.const 16 i32.const 2115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -26900,7 +26897,7 @@ i32.const 16 i32.const 2116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -26913,7 +26910,7 @@ i32.const 16 i32.const 2117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -26926,7 +26923,7 @@ i32.const 16 i32.const 2118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -26939,7 +26936,7 @@ i32.const 16 i32.const 2119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -26952,7 +26949,7 @@ i32.const 16 i32.const 2120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -26965,7 +26962,7 @@ i32.const 16 i32.const 2121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -26978,7 +26975,7 @@ i32.const 16 i32.const 2122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -26991,7 +26988,7 @@ i32.const 16 i32.const 2123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27004,7 +27001,7 @@ i32.const 16 i32.const 2124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -27017,7 +27014,7 @@ i32.const 16 i32.const 2125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -27030,7 +27027,7 @@ i32.const 16 i32.const 2126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -27043,7 +27040,7 @@ i32.const 16 i32.const 2127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -27056,7 +27053,7 @@ i32.const 16 i32.const 2128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -27069,7 +27066,7 @@ i32.const 16 i32.const 2129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -27082,7 +27079,7 @@ i32.const 16 i32.const 2130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -27095,7 +27092,7 @@ i32.const 16 i32.const 2131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -27108,7 +27105,7 @@ i32.const 16 i32.const 2132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -27121,7 +27118,7 @@ i32.const 16 i32.const 2133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -27134,7 +27131,7 @@ i32.const 16 i32.const 2134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -27147,7 +27144,7 @@ i32.const 16 i32.const 2135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -27160,7 +27157,7 @@ i32.const 16 i32.const 2136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -27173,7 +27170,7 @@ i32.const 16 i32.const 2137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -27186,7 +27183,7 @@ i32.const 16 i32.const 2138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27199,7 +27196,7 @@ i32.const 16 i32.const 2139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -27212,7 +27209,7 @@ i32.const 16 i32.const 2140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -27225,7 +27222,7 @@ i32.const 16 i32.const 2141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -27238,7 +27235,7 @@ i32.const 16 i32.const 2142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27251,7 +27248,7 @@ i32.const 16 i32.const 2143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -27264,7 +27261,7 @@ i32.const 16 i32.const 2144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -27277,7 +27274,7 @@ i32.const 16 i32.const 2145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27290,7 +27287,7 @@ i32.const 16 i32.const 2146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27303,7 +27300,7 @@ i32.const 16 i32.const 2147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27316,7 +27313,7 @@ i32.const 16 i32.const 2148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -27329,7 +27326,7 @@ i32.const 16 i32.const 2149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -27342,7 +27339,7 @@ i32.const 16 i32.const 2150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -27355,7 +27352,7 @@ i32.const 16 i32.const 2151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -27368,7 +27365,7 @@ i32.const 16 i32.const 2152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -27381,7 +27378,7 @@ i32.const 16 i32.const 2153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -27394,7 +27391,7 @@ i32.const 16 i32.const 2154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -27407,7 +27404,7 @@ i32.const 16 i32.const 2155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -27420,7 +27417,7 @@ i32.const 16 i32.const 2156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27433,7 +27430,7 @@ i32.const 16 i32.const 2157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -27446,7 +27443,7 @@ i32.const 16 i32.const 2158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -27459,7 +27456,7 @@ i32.const 16 i32.const 2159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -27472,7 +27469,7 @@ i32.const 16 i32.const 2160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27485,7 +27482,7 @@ i32.const 16 i32.const 2161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -27498,7 +27495,7 @@ i32.const 16 i32.const 2162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -27511,7 +27508,7 @@ i32.const 16 i32.const 2163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -27524,7 +27521,7 @@ i32.const 16 i32.const 2164 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -27537,7 +27534,7 @@ i32.const 16 i32.const 2165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -27550,7 +27547,7 @@ i32.const 16 i32.const 2166 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -27563,7 +27560,7 @@ i32.const 16 i32.const 2180 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -27576,7 +27573,7 @@ i32.const 16 i32.const 2181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -27589,7 +27586,7 @@ i32.const 16 i32.const 2182 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -27602,7 +27599,7 @@ i32.const 16 i32.const 2183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -27615,7 +27612,7 @@ i32.const 16 i32.const 2184 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -27628,7 +27625,7 @@ i32.const 16 i32.const 2185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -27641,7 +27638,7 @@ i32.const 16 i32.const 2186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -27654,7 +27651,7 @@ i32.const 16 i32.const 2187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -27667,7 +27664,7 @@ i32.const 16 i32.const 2188 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -27680,7 +27677,7 @@ i32.const 16 i32.const 2189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -27693,7 +27690,7 @@ i32.const 16 i32.const 2192 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -27706,7 +27703,7 @@ i32.const 16 i32.const 2193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -27719,7 +27716,7 @@ i32.const 16 i32.const 2194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -27732,7 +27729,7 @@ i32.const 16 i32.const 2195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -27745,7 +27742,7 @@ i32.const 16 i32.const 2196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -27758,7 +27755,7 @@ i32.const 16 i32.const 2197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -27771,7 +27768,7 @@ i32.const 16 i32.const 2198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -27784,7 +27781,7 @@ i32.const 16 i32.const 2199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -27797,7 +27794,7 @@ i32.const 16 i32.const 2200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -27810,7 +27807,7 @@ i32.const 16 i32.const 2201 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -27823,7 +27820,7 @@ i32.const 16 i32.const 2202 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -27836,7 +27833,7 @@ i32.const 16 i32.const 2203 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -27849,7 +27846,7 @@ i32.const 16 i32.const 2204 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -27862,7 +27859,7 @@ i32.const 16 i32.const 2205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -27875,7 +27872,7 @@ i32.const 16 i32.const 2206 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -27888,7 +27885,7 @@ i32.const 16 i32.const 2207 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -27901,7 +27898,7 @@ i32.const 16 i32.const 2208 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -27914,7 +27911,7 @@ i32.const 16 i32.const 2209 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -27927,7 +27924,7 @@ i32.const 16 i32.const 2210 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -27940,7 +27937,7 @@ i32.const 16 i32.const 2211 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -27953,7 +27950,7 @@ i32.const 16 i32.const 2212 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -27966,7 +27963,7 @@ i32.const 16 i32.const 2213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -27979,7 +27976,7 @@ i32.const 16 i32.const 2214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -27992,7 +27989,7 @@ i32.const 16 i32.const 2215 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -28005,7 +28002,7 @@ i32.const 16 i32.const 2216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -28018,7 +28015,7 @@ i32.const 16 i32.const 2217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28031,7 +28028,7 @@ i32.const 16 i32.const 2218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28044,7 +28041,7 @@ i32.const 16 i32.const 2219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28057,7 +28054,7 @@ i32.const 16 i32.const 2220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28070,7 +28067,7 @@ i32.const 16 i32.const 2221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28083,7 +28080,7 @@ i32.const 16 i32.const 2222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28096,7 +28093,7 @@ i32.const 16 i32.const 2223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28109,7 +28106,7 @@ i32.const 16 i32.const 2224 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28122,7 +28119,7 @@ i32.const 16 i32.const 2225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28135,7 +28132,7 @@ i32.const 16 i32.const 2226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28148,7 +28145,7 @@ i32.const 16 i32.const 2227 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -28161,7 +28158,7 @@ i32.const 16 i32.const 2228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -28174,7 +28171,7 @@ i32.const 16 i32.const 2229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28187,7 +28184,7 @@ i32.const 16 i32.const 2230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -28200,7 +28197,7 @@ i32.const 16 i32.const 2231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -28213,7 +28210,7 @@ i32.const 16 i32.const 2232 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -28226,7 +28223,7 @@ i32.const 16 i32.const 2233 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28239,7 +28236,7 @@ i32.const 16 i32.const 2234 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -28252,7 +28249,7 @@ i32.const 16 i32.const 2235 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -28265,7 +28262,7 @@ i32.const 16 i32.const 2236 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28278,7 +28275,7 @@ i32.const 16 i32.const 2237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28291,7 +28288,7 @@ i32.const 16 i32.const 2238 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28304,7 +28301,7 @@ i32.const 16 i32.const 2239 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -28317,7 +28314,7 @@ i32.const 16 i32.const 2240 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -28330,7 +28327,7 @@ i32.const 16 i32.const 2241 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -28343,7 +28340,7 @@ i32.const 16 i32.const 2242 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -28356,7 +28353,7 @@ i32.const 16 i32.const 2243 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -28369,7 +28366,7 @@ i32.const 16 i32.const 2244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -28382,7 +28379,7 @@ i32.const 16 i32.const 2245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -28395,7 +28392,7 @@ i32.const 16 i32.const 2246 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -28408,7 +28405,7 @@ i32.const 16 i32.const 2247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28421,7 +28418,7 @@ i32.const 16 i32.const 2248 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -28434,7 +28431,7 @@ i32.const 16 i32.const 2249 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -28447,7 +28444,7 @@ i32.const 16 i32.const 2250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -28460,7 +28457,7 @@ i32.const 16 i32.const 2251 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28473,7 +28470,7 @@ i32.const 16 i32.const 2252 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -28486,7 +28483,7 @@ i32.const 16 i32.const 2253 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -28499,7 +28496,7 @@ i32.const 16 i32.const 2254 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -28512,7 +28509,7 @@ i32.const 16 i32.const 2255 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -28525,7 +28522,7 @@ i32.const 16 i32.const 2256 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -28538,7 +28535,7 @@ i32.const 16 i32.const 2257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -28551,7 +28548,7 @@ i32.const 16 i32.const 2266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -28564,7 +28561,7 @@ i32.const 16 i32.const 2267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -28577,7 +28574,7 @@ i32.const 16 i32.const 2268 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -28590,7 +28587,7 @@ i32.const 16 i32.const 2269 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -28603,7 +28600,7 @@ i32.const 16 i32.const 2270 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -28616,7 +28613,7 @@ i32.const 16 i32.const 2271 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -28629,7 +28626,7 @@ i32.const 16 i32.const 2272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -28642,7 +28639,7 @@ i32.const 16 i32.const 2273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -28655,7 +28652,7 @@ i32.const 16 i32.const 2274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -28668,7 +28665,7 @@ i32.const 16 i32.const 2275 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -28681,7 +28678,7 @@ i32.const 16 i32.const 2278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -28694,7 +28691,7 @@ i32.const 16 i32.const 2279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -28707,7 +28704,7 @@ i32.const 16 i32.const 2280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -28720,7 +28717,7 @@ i32.const 16 i32.const 2281 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -28733,7 +28730,7 @@ i32.const 16 i32.const 2282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -28746,7 +28743,7 @@ i32.const 16 i32.const 2283 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -28759,7 +28756,7 @@ i32.const 16 i32.const 2284 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -28772,7 +28769,7 @@ i32.const 16 i32.const 2285 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -28785,7 +28782,7 @@ i32.const 16 i32.const 2286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -28798,7 +28795,7 @@ i32.const 16 i32.const 2287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -28811,7 +28808,7 @@ i32.const 16 i32.const 2288 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -28824,7 +28821,7 @@ i32.const 16 i32.const 2289 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -28837,7 +28834,7 @@ i32.const 16 i32.const 2290 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -28850,7 +28847,7 @@ i32.const 16 i32.const 2291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -28863,7 +28860,7 @@ i32.const 16 i32.const 2292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -28876,7 +28873,7 @@ i32.const 16 i32.const 2293 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -28889,7 +28886,7 @@ i32.const 16 i32.const 2294 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -28902,7 +28899,7 @@ i32.const 16 i32.const 2295 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -28915,7 +28912,7 @@ i32.const 16 i32.const 2296 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -28928,7 +28925,7 @@ i32.const 16 i32.const 2297 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -28941,7 +28938,7 @@ i32.const 16 i32.const 2298 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -28954,7 +28951,7 @@ i32.const 16 i32.const 2299 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -28967,7 +28964,7 @@ i32.const 16 i32.const 2300 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -28980,7 +28977,7 @@ i32.const 16 i32.const 2301 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -28993,7 +28990,7 @@ i32.const 16 i32.const 2302 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -29006,7 +29003,7 @@ i32.const 16 i32.const 2303 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29019,7 +29016,7 @@ i32.const 16 i32.const 2304 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29032,7 +29029,7 @@ i32.const 16 i32.const 2305 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29045,7 +29042,7 @@ i32.const 16 i32.const 2306 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29058,7 +29055,7 @@ i32.const 16 i32.const 2307 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29071,7 +29068,7 @@ i32.const 16 i32.const 2308 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29084,7 +29081,7 @@ i32.const 16 i32.const 2309 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29097,7 +29094,7 @@ i32.const 16 i32.const 2310 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29110,7 +29107,7 @@ i32.const 16 i32.const 2311 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29123,7 +29120,7 @@ i32.const 16 i32.const 2312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29136,7 +29133,7 @@ i32.const 16 i32.const 2313 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -29149,7 +29146,7 @@ i32.const 16 i32.const 2314 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -29162,7 +29159,7 @@ i32.const 16 i32.const 2315 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29175,7 +29172,7 @@ i32.const 16 i32.const 2316 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -29188,7 +29185,7 @@ i32.const 16 i32.const 2317 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -29201,7 +29198,7 @@ i32.const 16 i32.const 2318 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -29214,7 +29211,7 @@ i32.const 16 i32.const 2319 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29227,7 +29224,7 @@ i32.const 16 i32.const 2320 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -29240,7 +29237,7 @@ i32.const 16 i32.const 2321 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -29253,7 +29250,7 @@ i32.const 16 i32.const 2322 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29266,7 +29263,7 @@ i32.const 16 i32.const 2323 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29279,7 +29276,7 @@ i32.const 16 i32.const 2324 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29292,7 +29289,7 @@ i32.const 16 i32.const 2325 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -29305,7 +29302,7 @@ i32.const 16 i32.const 2326 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -29318,7 +29315,7 @@ i32.const 16 i32.const 2327 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -29331,7 +29328,7 @@ i32.const 16 i32.const 2328 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -29344,7 +29341,7 @@ i32.const 16 i32.const 2329 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -29357,7 +29354,7 @@ i32.const 16 i32.const 2330 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -29370,7 +29367,7 @@ i32.const 16 i32.const 2331 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -29383,7 +29380,7 @@ i32.const 16 i32.const 2332 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -29396,7 +29393,7 @@ i32.const 16 i32.const 2333 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29409,7 +29406,7 @@ i32.const 16 i32.const 2334 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -29422,7 +29419,7 @@ i32.const 16 i32.const 2335 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -29435,7 +29432,7 @@ i32.const 16 i32.const 2336 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -29448,7 +29445,7 @@ i32.const 16 i32.const 2337 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29461,7 +29458,7 @@ i32.const 16 i32.const 2338 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -29474,7 +29471,7 @@ i32.const 16 i32.const 2339 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -29487,7 +29484,7 @@ i32.const 16 i32.const 2340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -29500,7 +29497,7 @@ i32.const 16 i32.const 2341 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -29513,7 +29510,7 @@ i32.const 16 i32.const 2342 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -29526,7 +29523,7 @@ i32.const 16 i32.const 2343 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -29540,7 +29537,7 @@ i32.const 16 i32.const 2355 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -29554,7 +29551,7 @@ i32.const 16 i32.const 2356 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -29568,7 +29565,7 @@ i32.const 16 i32.const 2357 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -29582,7 +29579,7 @@ i32.const 16 i32.const 2358 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -29596,7 +29593,7 @@ i32.const 16 i32.const 2359 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -29610,7 +29607,7 @@ i32.const 16 i32.const 2360 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -29624,7 +29621,7 @@ i32.const 16 i32.const 2361 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -29638,7 +29635,7 @@ i32.const 16 i32.const 2362 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -29652,7 +29649,7 @@ i32.const 16 i32.const 2363 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -29666,7 +29663,7 @@ i32.const 16 i32.const 2364 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29680,7 +29677,7 @@ i32.const 16 i32.const 2367 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29694,7 +29691,7 @@ i32.const 16 i32.const 2368 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29708,7 +29705,7 @@ i32.const 16 i32.const 2369 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29722,7 +29719,7 @@ i32.const 16 i32.const 2370 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29736,7 +29733,7 @@ i32.const 16 i32.const 2371 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29750,7 +29747,7 @@ i32.const 16 i32.const 2372 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29764,7 +29761,7 @@ i32.const 16 i32.const 2373 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29778,7 +29775,7 @@ i32.const 16 i32.const 2374 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29792,7 +29789,7 @@ i32.const 16 i32.const 2375 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29806,7 +29803,7 @@ i32.const 16 i32.const 2376 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29820,7 +29817,7 @@ i32.const 16 i32.const 2377 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29834,7 +29831,7 @@ i32.const 16 i32.const 2378 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29848,7 +29845,7 @@ i32.const 16 i32.const 2379 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29862,7 +29859,7 @@ i32.const 16 i32.const 2380 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -29876,7 +29873,7 @@ i32.const 16 i32.const 2381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -29890,7 +29887,7 @@ i32.const 16 i32.const 2382 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -29904,7 +29901,7 @@ i32.const 16 i32.const 2383 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -29918,7 +29915,7 @@ i32.const 16 i32.const 2384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -29932,7 +29929,7 @@ i32.const 16 i32.const 2385 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -29946,7 +29943,7 @@ i32.const 16 i32.const 2386 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -29960,7 +29957,7 @@ i32.const 16 i32.const 2387 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -29974,7 +29971,7 @@ i32.const 16 i32.const 2388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -29988,7 +29985,7 @@ i32.const 16 i32.const 2389 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30002,7 +29999,7 @@ i32.const 16 i32.const 2390 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30016,7 +30013,7 @@ i32.const 16 i32.const 2391 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30030,7 +30027,7 @@ i32.const 16 i32.const 2392 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30044,7 +30041,7 @@ i32.const 16 i32.const 2393 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30058,7 +30055,7 @@ i32.const 16 i32.const 2394 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -30072,7 +30069,7 @@ i32.const 16 i32.const 2395 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30086,7 +30083,7 @@ i32.const 16 i32.const 2396 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30100,7 +30097,7 @@ i32.const 16 i32.const 2397 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30114,7 +30111,7 @@ i32.const 16 i32.const 2398 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30128,7 +30125,7 @@ i32.const 16 i32.const 2399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30142,7 +30139,7 @@ i32.const 16 i32.const 2400 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -30156,7 +30153,7 @@ i32.const 16 i32.const 2401 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30170,7 +30167,7 @@ i32.const 16 i32.const 2402 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30184,7 +30181,7 @@ i32.const 16 i32.const 2403 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30198,7 +30195,7 @@ i32.const 16 i32.const 2404 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30212,7 +30209,7 @@ i32.const 16 i32.const 2405 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30226,7 +30223,7 @@ i32.const 16 i32.const 2406 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30240,7 +30237,7 @@ i32.const 16 i32.const 2407 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30254,7 +30251,7 @@ i32.const 16 i32.const 2408 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30268,7 +30265,7 @@ i32.const 16 i32.const 2409 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30282,7 +30279,7 @@ i32.const 16 i32.const 2410 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30296,7 +30293,7 @@ i32.const 16 i32.const 2411 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30310,7 +30307,7 @@ i32.const 16 i32.const 2412 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30324,7 +30321,7 @@ i32.const 16 i32.const 2413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30338,7 +30335,7 @@ i32.const 16 i32.const 2414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30352,7 +30349,7 @@ i32.const 16 i32.const 2415 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30366,7 +30363,7 @@ i32.const 16 i32.const 2416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30380,7 +30377,7 @@ i32.const 16 i32.const 2417 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30394,7 +30391,7 @@ i32.const 16 i32.const 2418 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30408,7 +30405,7 @@ i32.const 16 i32.const 2419 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30422,7 +30419,7 @@ i32.const 16 i32.const 2420 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30436,7 +30433,7 @@ i32.const 16 i32.const 2421 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30450,7 +30447,7 @@ i32.const 16 i32.const 2422 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30464,7 +30461,7 @@ i32.const 16 i32.const 2423 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30478,7 +30475,7 @@ i32.const 16 i32.const 2424 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30492,7 +30489,7 @@ i32.const 16 i32.const 2425 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30506,7 +30503,7 @@ i32.const 16 i32.const 2426 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30520,7 +30517,7 @@ i32.const 16 i32.const 2427 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30534,7 +30531,7 @@ i32.const 16 i32.const 2428 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -30548,7 +30545,7 @@ i32.const 16 i32.const 2429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -30562,7 +30559,7 @@ i32.const 16 i32.const 2430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -30576,7 +30573,7 @@ i32.const 16 i32.const 2431 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -30590,7 +30587,7 @@ i32.const 16 i32.const 2432 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -30604,7 +30601,7 @@ i32.const 16 i32.const 2433 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -30618,7 +30615,7 @@ i32.const 16 i32.const 2434 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30632,7 +30629,7 @@ i32.const 16 i32.const 2435 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30646,7 +30643,7 @@ i32.const 16 i32.const 2436 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30660,7 +30657,7 @@ i32.const 16 i32.const 2437 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30674,7 +30671,7 @@ i32.const 16 i32.const 2438 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30688,7 +30685,7 @@ i32.const 16 i32.const 2439 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30702,7 +30699,7 @@ i32.const 16 i32.const 2440 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30716,7 +30713,7 @@ i32.const 16 i32.const 2441 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30730,7 +30727,7 @@ i32.const 16 i32.const 2442 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30744,7 +30741,7 @@ i32.const 16 i32.const 2443 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30758,7 +30755,7 @@ i32.const 16 i32.const 2444 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30772,7 +30769,7 @@ i32.const 16 i32.const 2445 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30786,7 +30783,7 @@ i32.const 16 i32.const 2446 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30800,7 +30797,7 @@ i32.const 16 i32.const 2447 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30814,7 +30811,7 @@ i32.const 16 i32.const 2448 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30828,7 +30825,7 @@ i32.const 16 i32.const 2449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30842,7 +30839,7 @@ i32.const 16 i32.const 2450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30856,7 +30853,7 @@ i32.const 16 i32.const 2451 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30870,7 +30867,7 @@ i32.const 16 i32.const 2452 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30884,7 +30881,7 @@ i32.const 16 i32.const 2453 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30898,7 +30895,7 @@ i32.const 16 i32.const 2454 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -30912,7 +30909,7 @@ i32.const 16 i32.const 2455 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -30926,7 +30923,7 @@ i32.const 16 i32.const 2456 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -30940,7 +30937,7 @@ i32.const 16 i32.const 2457 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -30954,7 +30951,7 @@ i32.const 16 i32.const 2458 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -30968,7 +30965,7 @@ i32.const 16 i32.const 2467 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -30982,7 +30979,7 @@ i32.const 16 i32.const 2468 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -30996,7 +30993,7 @@ i32.const 16 i32.const 2469 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -31010,7 +31007,7 @@ i32.const 16 i32.const 2470 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -31024,7 +31021,7 @@ i32.const 16 i32.const 2471 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -31038,7 +31035,7 @@ i32.const 16 i32.const 2472 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -31052,7 +31049,7 @@ i32.const 16 i32.const 2473 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -31066,7 +31063,7 @@ i32.const 16 i32.const 2474 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -31080,7 +31077,7 @@ i32.const 16 i32.const 2475 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -31094,7 +31091,7 @@ i32.const 16 i32.const 2476 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31108,7 +31105,7 @@ i32.const 16 i32.const 2479 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31122,7 +31119,7 @@ i32.const 16 i32.const 2480 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31136,7 +31133,7 @@ i32.const 16 i32.const 2481 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31150,7 +31147,7 @@ i32.const 16 i32.const 2482 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31164,7 +31161,7 @@ i32.const 16 i32.const 2483 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31178,7 +31175,7 @@ i32.const 16 i32.const 2484 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31192,7 +31189,7 @@ i32.const 16 i32.const 2485 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31206,7 +31203,7 @@ i32.const 16 i32.const 2486 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31220,7 +31217,7 @@ i32.const 16 i32.const 2487 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31234,7 +31231,7 @@ i32.const 16 i32.const 2488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31248,7 +31245,7 @@ i32.const 16 i32.const 2489 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31262,7 +31259,7 @@ i32.const 16 i32.const 2490 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31276,7 +31273,7 @@ i32.const 16 i32.const 2491 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31290,7 +31287,7 @@ i32.const 16 i32.const 2492 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31304,7 +31301,7 @@ i32.const 16 i32.const 2493 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31318,7 +31315,7 @@ i32.const 16 i32.const 2494 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31332,7 +31329,7 @@ i32.const 16 i32.const 2495 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31346,7 +31343,7 @@ i32.const 16 i32.const 2496 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31360,7 +31357,7 @@ i32.const 16 i32.const 2497 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31374,7 +31371,7 @@ i32.const 16 i32.const 2498 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31388,7 +31385,7 @@ i32.const 16 i32.const 2499 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31402,7 +31399,7 @@ i32.const 16 i32.const 2500 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31416,7 +31413,7 @@ i32.const 16 i32.const 2501 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31430,7 +31427,7 @@ i32.const 16 i32.const 2502 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31444,7 +31441,7 @@ i32.const 16 i32.const 2503 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31458,7 +31455,7 @@ i32.const 16 i32.const 2504 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31472,7 +31469,7 @@ i32.const 16 i32.const 2505 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31486,7 +31483,7 @@ i32.const 16 i32.const 2506 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -31500,7 +31497,7 @@ i32.const 16 i32.const 2507 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -31514,7 +31511,7 @@ i32.const 16 i32.const 2508 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -31528,7 +31525,7 @@ i32.const 16 i32.const 2509 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31542,7 +31539,7 @@ i32.const 16 i32.const 2510 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31556,7 +31553,7 @@ i32.const 16 i32.const 2511 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31570,7 +31567,7 @@ i32.const 16 i32.const 2512 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -31584,7 +31581,7 @@ i32.const 16 i32.const 2513 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -31598,7 +31595,7 @@ i32.const 16 i32.const 2514 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -31612,7 +31609,7 @@ i32.const 16 i32.const 2515 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31626,7 +31623,7 @@ i32.const 16 i32.const 2516 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31640,7 +31637,7 @@ i32.const 16 i32.const 2517 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31654,7 +31651,7 @@ i32.const 16 i32.const 2518 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31668,7 +31665,7 @@ i32.const 16 i32.const 2519 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31682,7 +31679,7 @@ i32.const 16 i32.const 2520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31696,7 +31693,7 @@ i32.const 16 i32.const 2521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31710,7 +31707,7 @@ i32.const 16 i32.const 2522 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31724,7 +31721,7 @@ i32.const 16 i32.const 2523 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31738,7 +31735,7 @@ i32.const 16 i32.const 2524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31752,7 +31749,7 @@ i32.const 16 i32.const 2525 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31766,7 +31763,7 @@ i32.const 16 i32.const 2526 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31780,7 +31777,7 @@ i32.const 16 i32.const 2527 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31794,7 +31791,7 @@ i32.const 16 i32.const 2528 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31808,7 +31805,7 @@ i32.const 16 i32.const 2529 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31822,7 +31819,7 @@ i32.const 16 i32.const 2530 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31836,7 +31833,7 @@ i32.const 16 i32.const 2531 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31850,7 +31847,7 @@ i32.const 16 i32.const 2532 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31864,7 +31861,7 @@ i32.const 16 i32.const 2533 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31878,7 +31875,7 @@ i32.const 16 i32.const 2534 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31892,7 +31889,7 @@ i32.const 16 i32.const 2535 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31906,7 +31903,7 @@ i32.const 16 i32.const 2536 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31920,7 +31917,7 @@ i32.const 16 i32.const 2537 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31934,7 +31931,7 @@ i32.const 16 i32.const 2538 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31948,7 +31945,7 @@ i32.const 16 i32.const 2539 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31962,7 +31959,7 @@ i32.const 16 i32.const 2540 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -31976,7 +31973,7 @@ i32.const 16 i32.const 2541 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -31990,7 +31987,7 @@ i32.const 16 i32.const 2542 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -32004,7 +32001,7 @@ i32.const 16 i32.const 2543 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -32018,7 +32015,7 @@ i32.const 16 i32.const 2544 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -32032,7 +32029,7 @@ i32.const 16 i32.const 2545 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -32046,7 +32043,7 @@ i32.const 16 i32.const 2546 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32060,7 +32057,7 @@ i32.const 16 i32.const 2547 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32074,7 +32071,7 @@ i32.const 16 i32.const 2548 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32088,7 +32085,7 @@ i32.const 16 i32.const 2549 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32102,7 +32099,7 @@ i32.const 16 i32.const 2550 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32116,7 +32113,7 @@ i32.const 16 i32.const 2551 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32130,7 +32127,7 @@ i32.const 16 i32.const 2552 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32144,7 +32141,7 @@ i32.const 16 i32.const 2553 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32158,7 +32155,7 @@ i32.const 16 i32.const 2554 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32172,7 +32169,7 @@ i32.const 16 i32.const 2555 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32186,7 +32183,7 @@ i32.const 16 i32.const 2556 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32200,7 +32197,7 @@ i32.const 16 i32.const 2557 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32214,7 +32211,7 @@ i32.const 16 i32.const 2558 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32228,7 +32225,7 @@ i32.const 16 i32.const 2559 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32242,7 +32239,7 @@ i32.const 16 i32.const 2560 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32256,7 +32253,7 @@ i32.const 16 i32.const 2561 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32270,7 +32267,7 @@ i32.const 16 i32.const 2562 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32284,7 +32281,7 @@ i32.const 16 i32.const 2563 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32298,7 +32295,7 @@ i32.const 16 i32.const 2564 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32312,7 +32309,7 @@ i32.const 16 i32.const 2565 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32326,7 +32323,7 @@ i32.const 16 i32.const 2566 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -32340,7 +32337,7 @@ i32.const 16 i32.const 2567 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -32354,7 +32351,7 @@ i32.const 16 i32.const 2568 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -32368,7 +32365,7 @@ i32.const 16 i32.const 2569 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -32382,7 +32379,7 @@ i32.const 16 i32.const 2570 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $~lib/bindings/Math/random @@ -32417,7 +32414,7 @@ i32.const 16 i32.const 2579 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -32457,7 +32454,7 @@ i32.const 16 i32.const 2587 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -32472,7 +32469,7 @@ i32.const 16 i32.const 2601 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -32484,7 +32481,7 @@ i32.const 16 i32.const 2602 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -32496,7 +32493,7 @@ i32.const 16 i32.const 2603 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -32508,7 +32505,7 @@ i32.const 16 i32.const 2604 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -32520,7 +32517,7 @@ i32.const 16 i32.const 2605 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -32532,7 +32529,7 @@ i32.const 16 i32.const 2606 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -32544,7 +32541,7 @@ i32.const 16 i32.const 2607 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -32556,7 +32553,7 @@ i32.const 16 i32.const 2608 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -32568,7 +32565,7 @@ i32.const 16 i32.const 2609 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -32580,7 +32577,7 @@ i32.const 16 i32.const 2610 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -32592,7 +32589,7 @@ i32.const 16 i32.const 2613 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -32604,7 +32601,7 @@ i32.const 16 i32.const 2614 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -32616,7 +32613,7 @@ i32.const 16 i32.const 2615 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -32628,7 +32625,7 @@ i32.const 16 i32.const 2616 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -32640,7 +32637,7 @@ i32.const 16 i32.const 2617 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -32652,7 +32649,7 @@ i32.const 16 i32.const 2618 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -32664,7 +32661,7 @@ i32.const 16 i32.const 2619 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -32676,7 +32673,7 @@ i32.const 16 i32.const 2620 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -32688,7 +32685,7 @@ i32.const 16 i32.const 2621 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -32700,7 +32697,7 @@ i32.const 16 i32.const 2622 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -32712,7 +32709,7 @@ i32.const 16 i32.const 2623 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -32724,7 +32721,7 @@ i32.const 16 i32.const 2624 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -32736,7 +32733,7 @@ i32.const 16 i32.const 2625 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -32748,7 +32745,7 @@ i32.const 16 i32.const 2626 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -32760,7 +32757,7 @@ i32.const 16 i32.const 2627 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -32772,7 +32769,7 @@ i32.const 16 i32.const 2628 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -32784,7 +32781,7 @@ i32.const 16 i32.const 2629 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -32796,7 +32793,7 @@ i32.const 16 i32.const 2638 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -32808,7 +32805,7 @@ i32.const 16 i32.const 2639 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -32820,7 +32817,7 @@ i32.const 16 i32.const 2640 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -32832,7 +32829,7 @@ i32.const 16 i32.const 2641 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -32844,7 +32841,7 @@ i32.const 16 i32.const 2642 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -32856,7 +32853,7 @@ i32.const 16 i32.const 2643 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -32868,7 +32865,7 @@ i32.const 16 i32.const 2644 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -32880,7 +32877,7 @@ i32.const 16 i32.const 2645 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -32892,7 +32889,7 @@ i32.const 16 i32.const 2646 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -32904,7 +32901,7 @@ i32.const 16 i32.const 2647 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -32916,7 +32913,7 @@ i32.const 16 i32.const 2650 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32928,7 +32925,7 @@ i32.const 16 i32.const 2651 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32940,7 +32937,7 @@ i32.const 16 i32.const 2652 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -32952,7 +32949,7 @@ i32.const 16 i32.const 2653 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -32964,7 +32961,7 @@ i32.const 16 i32.const 2654 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -32976,7 +32973,7 @@ i32.const 16 i32.const 2655 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -32988,7 +32985,7 @@ i32.const 16 i32.const 2656 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -33000,7 +32997,7 @@ i32.const 16 i32.const 2657 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -33012,7 +33009,7 @@ i32.const 16 i32.const 2658 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -33024,7 +33021,7 @@ i32.const 16 i32.const 2659 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -33036,7 +33033,7 @@ i32.const 16 i32.const 2660 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -33048,7 +33045,7 @@ i32.const 16 i32.const 2661 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -33060,7 +33057,7 @@ i32.const 16 i32.const 2662 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -33072,7 +33069,7 @@ i32.const 16 i32.const 2663 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -33084,7 +33081,7 @@ i32.const 16 i32.const 2664 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -33096,7 +33093,7 @@ i32.const 16 i32.const 2665 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -33108,7 +33105,7 @@ i32.const 16 i32.const 2666 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33120,7 +33117,7 @@ i32.const 16 i32.const 2677 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33132,7 +33129,7 @@ i32.const 16 i32.const 2678 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -33144,7 +33141,7 @@ i32.const 16 i32.const 2679 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -33156,7 +33153,7 @@ i32.const 16 i32.const 2680 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -33168,7 +33165,7 @@ i32.const 16 i32.const 2681 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -33180,7 +33177,7 @@ i32.const 16 i32.const 2682 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33192,7 +33189,7 @@ i32.const 16 i32.const 2683 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -33204,7 +33201,7 @@ i32.const 16 i32.const 2684 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -33216,7 +33213,7 @@ i32.const 16 i32.const 2685 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -33228,7 +33225,7 @@ i32.const 16 i32.const 2693 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -33240,7 +33237,7 @@ i32.const 16 i32.const 2694 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -33252,7 +33249,7 @@ i32.const 16 i32.const 2695 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -33264,7 +33261,7 @@ i32.const 16 i32.const 2696 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -33276,7 +33273,7 @@ i32.const 16 i32.const 2697 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -33288,7 +33285,7 @@ i32.const 16 i32.const 2698 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -33300,7 +33297,7 @@ i32.const 16 i32.const 2699 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -33312,7 +33309,7 @@ i32.const 16 i32.const 2700 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -33324,7 +33321,7 @@ i32.const 16 i32.const 2701 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -33337,7 +33334,7 @@ i32.const 16 i32.const 2738 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -33350,7 +33347,7 @@ i32.const 16 i32.const 2739 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -33363,7 +33360,7 @@ i32.const 16 i32.const 2740 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -33376,7 +33373,7 @@ i32.const 16 i32.const 2741 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -33389,7 +33386,7 @@ i32.const 16 i32.const 2742 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -33402,7 +33399,7 @@ i32.const 16 i32.const 2743 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -33415,7 +33412,7 @@ i32.const 16 i32.const 2744 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -33428,7 +33425,7 @@ i32.const 16 i32.const 2745 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -33441,7 +33438,7 @@ i32.const 16 i32.const 2746 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -33454,7 +33451,7 @@ i32.const 16 i32.const 2747 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33467,7 +33464,7 @@ i32.const 16 i32.const 2750 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33480,7 +33477,7 @@ i32.const 16 i32.const 2751 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -33493,7 +33490,7 @@ i32.const 16 i32.const 2752 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -33506,7 +33503,7 @@ i32.const 16 i32.const 2753 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -33519,7 +33516,7 @@ i32.const 16 i32.const 2754 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -33532,7 +33529,7 @@ i32.const 16 i32.const 2755 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -33545,7 +33542,7 @@ i32.const 16 i32.const 2756 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -33558,7 +33555,7 @@ i32.const 16 i32.const 2757 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -33571,7 +33568,7 @@ i32.const 16 i32.const 2758 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -33584,7 +33581,7 @@ i32.const 16 i32.const 2759 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33597,7 +33594,7 @@ i32.const 16 i32.const 2760 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -33610,7 +33607,7 @@ i32.const 16 i32.const 2761 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -33623,7 +33620,7 @@ i32.const 16 i32.const 2762 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33636,7 +33633,7 @@ i32.const 16 i32.const 2763 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33649,7 +33646,7 @@ i32.const 16 i32.const 2764 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -33662,7 +33659,7 @@ i32.const 16 i32.const 2765 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -33675,7 +33672,7 @@ i32.const 16 i32.const 2766 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -33688,7 +33685,7 @@ i32.const 16 i32.const 2767 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -33701,7 +33698,7 @@ i32.const 16 i32.const 2768 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -33714,7 +33711,7 @@ i32.const 16 i32.const 2769 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -33727,7 +33724,7 @@ i32.const 16 i32.const 2770 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -33740,7 +33737,7 @@ i32.const 16 i32.const 2771 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -33753,7 +33750,7 @@ i32.const 16 i32.const 2772 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33766,7 +33763,7 @@ i32.const 16 i32.const 2773 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -33779,7 +33776,7 @@ i32.const 16 i32.const 2774 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -33792,7 +33789,7 @@ i32.const 16 i32.const 2775 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33805,7 +33802,7 @@ i32.const 16 i32.const 2776 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33818,7 +33815,7 @@ i32.const 16 i32.const 2777 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33831,7 +33828,7 @@ i32.const 16 i32.const 2778 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33844,7 +33841,7 @@ i32.const 16 i32.const 2779 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33857,7 +33854,7 @@ i32.const 16 i32.const 2780 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33870,7 +33867,7 @@ i32.const 16 i32.const 2781 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33883,7 +33880,7 @@ i32.const 16 i32.const 2782 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33896,7 +33893,7 @@ i32.const 16 i32.const 2783 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33909,7 +33906,7 @@ i32.const 16 i32.const 2784 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33922,7 +33919,7 @@ i32.const 16 i32.const 2785 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -33935,7 +33932,7 @@ i32.const 16 i32.const 2786 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -33948,7 +33945,7 @@ i32.const 16 i32.const 2787 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33961,7 +33958,7 @@ i32.const 16 i32.const 2788 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -33974,7 +33971,7 @@ i32.const 16 i32.const 2789 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -33987,7 +33984,7 @@ i32.const 16 i32.const 2790 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -34000,7 +33997,7 @@ i32.const 16 i32.const 2791 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -34013,7 +34010,7 @@ i32.const 16 i32.const 2792 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -34026,7 +34023,7 @@ i32.const 16 i32.const 2793 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -34039,7 +34036,7 @@ i32.const 16 i32.const 2794 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -34052,7 +34049,7 @@ i32.const 16 i32.const 2795 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -34065,7 +34062,7 @@ i32.const 16 i32.const 2796 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -34078,7 +34075,7 @@ i32.const 16 i32.const 2797 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -34091,7 +34088,7 @@ i32.const 16 i32.const 2798 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -34104,7 +34101,7 @@ i32.const 16 i32.const 2799 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -34117,7 +34114,7 @@ i32.const 16 i32.const 2800 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -34130,7 +34127,7 @@ i32.const 16 i32.const 2801 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -34143,7 +34140,7 @@ i32.const 16 i32.const 2802 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -34156,7 +34153,7 @@ i32.const 16 i32.const 2803 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -34169,7 +34166,7 @@ i32.const 16 i32.const 2804 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -34182,7 +34179,7 @@ i32.const 16 i32.const 2805 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -34195,7 +34192,7 @@ i32.const 16 i32.const 2806 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -34208,7 +34205,7 @@ i32.const 16 i32.const 2807 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -34221,7 +34218,7 @@ i32.const 16 i32.const 2808 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -34234,7 +34231,7 @@ i32.const 16 i32.const 2809 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -34247,7 +34244,7 @@ i32.const 16 i32.const 2810 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -34260,7 +34257,7 @@ i32.const 16 i32.const 2811 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -34273,7 +34270,7 @@ i32.const 16 i32.const 2812 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -34286,7 +34283,7 @@ i32.const 16 i32.const 2813 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -34299,7 +34296,7 @@ i32.const 16 i32.const 2814 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -34312,7 +34309,7 @@ i32.const 16 i32.const 2815 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8e-323 @@ -34325,7 +34322,7 @@ i32.const 16 i32.const 2816 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -34338,7 +34335,7 @@ i32.const 16 i32.const 2825 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -34351,7 +34348,7 @@ i32.const 16 i32.const 2826 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -34364,7 +34361,7 @@ i32.const 16 i32.const 2827 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -34377,7 +34374,7 @@ i32.const 16 i32.const 2828 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -34390,7 +34387,7 @@ i32.const 16 i32.const 2829 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -34403,7 +34400,7 @@ i32.const 16 i32.const 2830 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -34416,7 +34413,7 @@ i32.const 16 i32.const 2831 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -34429,7 +34426,7 @@ i32.const 16 i32.const 2832 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -34442,7 +34439,7 @@ i32.const 16 i32.const 2833 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -34455,7 +34452,7 @@ i32.const 16 i32.const 2834 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34468,7 +34465,7 @@ i32.const 16 i32.const 2837 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34481,7 +34478,7 @@ i32.const 16 i32.const 2838 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -34494,7 +34491,7 @@ i32.const 16 i32.const 2839 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -34507,7 +34504,7 @@ i32.const 16 i32.const 2840 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -34520,7 +34517,7 @@ i32.const 16 i32.const 2841 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -34533,7 +34530,7 @@ i32.const 16 i32.const 2842 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -34546,7 +34543,7 @@ i32.const 16 i32.const 2843 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -34559,7 +34556,7 @@ i32.const 16 i32.const 2844 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -34572,7 +34569,7 @@ i32.const 16 i32.const 2845 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -34585,7 +34582,7 @@ i32.const 16 i32.const 2846 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34598,7 +34595,7 @@ i32.const 16 i32.const 2847 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -34611,7 +34608,7 @@ i32.const 16 i32.const 2848 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -34624,7 +34621,7 @@ i32.const 16 i32.const 2849 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34637,7 +34634,7 @@ i32.const 16 i32.const 2850 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34650,7 +34647,7 @@ i32.const 16 i32.const 2851 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -34663,7 +34660,7 @@ i32.const 16 i32.const 2852 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -34676,7 +34673,7 @@ i32.const 16 i32.const 2853 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -34689,7 +34686,7 @@ i32.const 16 i32.const 2854 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -34702,7 +34699,7 @@ i32.const 16 i32.const 2855 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -34715,7 +34712,7 @@ i32.const 16 i32.const 2856 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -34728,7 +34725,7 @@ i32.const 16 i32.const 2857 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -34741,7 +34738,7 @@ i32.const 16 i32.const 2858 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -34754,7 +34751,7 @@ i32.const 16 i32.const 2859 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34767,7 +34764,7 @@ i32.const 16 i32.const 2860 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -34780,7 +34777,7 @@ i32.const 16 i32.const 2861 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -34793,7 +34790,7 @@ i32.const 16 i32.const 2862 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34806,7 +34803,7 @@ i32.const 16 i32.const 2863 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34819,7 +34816,7 @@ i32.const 16 i32.const 2864 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34832,7 +34829,7 @@ i32.const 16 i32.const 2865 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34845,7 +34842,7 @@ i32.const 16 i32.const 2866 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34858,7 +34855,7 @@ i32.const 16 i32.const 2867 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34871,7 +34868,7 @@ i32.const 16 i32.const 2868 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34884,7 +34881,7 @@ i32.const 16 i32.const 2869 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34897,7 +34894,7 @@ i32.const 16 i32.const 2870 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34910,7 +34907,7 @@ i32.const 16 i32.const 2871 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34923,7 +34920,7 @@ i32.const 16 i32.const 2872 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -34936,7 +34933,7 @@ i32.const 16 i32.const 2873 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -34949,7 +34946,7 @@ i32.const 16 i32.const 2874 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34962,7 +34959,7 @@ i32.const 16 i32.const 2875 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -34975,7 +34972,7 @@ i32.const 16 i32.const 2876 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -34988,7 +34985,7 @@ i32.const 16 i32.const 2877 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -35001,7 +34998,7 @@ i32.const 16 i32.const 2878 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -35014,7 +35011,7 @@ i32.const 16 i32.const 2879 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -35027,7 +35024,7 @@ i32.const 16 i32.const 2880 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -35040,7 +35037,7 @@ i32.const 16 i32.const 2881 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -35053,7 +35050,7 @@ i32.const 16 i32.const 2882 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -35066,7 +35063,7 @@ i32.const 16 i32.const 2883 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -35079,7 +35076,7 @@ i32.const 16 i32.const 2884 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -35092,7 +35089,7 @@ i32.const 16 i32.const 2885 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -35105,7 +35102,7 @@ i32.const 16 i32.const 2886 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -35118,7 +35115,7 @@ i32.const 16 i32.const 2887 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -35131,7 +35128,7 @@ i32.const 16 i32.const 2888 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -35144,7 +35141,7 @@ i32.const 16 i32.const 2889 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -35157,7 +35154,7 @@ i32.const 16 i32.const 2890 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -35170,7 +35167,7 @@ i32.const 16 i32.const 2891 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -35183,7 +35180,7 @@ i32.const 16 i32.const 2892 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -35196,7 +35193,7 @@ i32.const 16 i32.const 2893 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -35209,7 +35206,7 @@ i32.const 16 i32.const 2894 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -35222,7 +35219,7 @@ i32.const 16 i32.const 2895 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -35235,7 +35232,7 @@ i32.const 16 i32.const 2896 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -35248,7 +35245,7 @@ i32.const 16 i32.const 2897 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -35261,7 +35258,7 @@ i32.const 16 i32.const 2898 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -35274,7 +35271,7 @@ i32.const 16 i32.const 2899 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -35287,7 +35284,7 @@ i32.const 16 i32.const 2900 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -35300,7 +35297,7 @@ i32.const 16 i32.const 2901 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -35313,7 +35310,7 @@ i32.const 16 i32.const 2902 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -35326,7 +35323,7 @@ i32.const 16 i32.const 2903 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -35339,7 +35336,7 @@ i32.const 16 i32.const 2941 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -35352,7 +35349,7 @@ i32.const 16 i32.const 2942 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -35365,7 +35362,7 @@ i32.const 16 i32.const 2943 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -35378,7 +35375,7 @@ i32.const 16 i32.const 2944 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -35391,7 +35388,7 @@ i32.const 16 i32.const 2945 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -35404,7 +35401,7 @@ i32.const 16 i32.const 2946 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -35417,7 +35414,7 @@ i32.const 16 i32.const 2947 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -35430,7 +35427,7 @@ i32.const 16 i32.const 2948 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -35443,7 +35440,7 @@ i32.const 16 i32.const 2949 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -35456,7 +35453,7 @@ i32.const 16 i32.const 2950 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -35469,7 +35466,7 @@ i32.const 16 i32.const 2953 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -35482,7 +35479,7 @@ i32.const 16 i32.const 2954 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -35495,7 +35492,7 @@ i32.const 16 i32.const 2955 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -35508,7 +35505,7 @@ i32.const 16 i32.const 2956 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -35521,7 +35518,7 @@ i32.const 16 i32.const 2957 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.862645149230957e-09 @@ -35534,7 +35531,7 @@ i32.const 16 i32.const 2960 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.862645149230957e-09 @@ -35547,7 +35544,7 @@ i32.const 16 i32.const 2961 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754943508222875e-38 @@ -35560,7 +35557,7 @@ i32.const 16 i32.const 2962 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754943508222875e-38 @@ -35573,7 +35570,7 @@ i32.const 16 i32.const 2963 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -35586,7 +35583,7 @@ i32.const 16 i32.const 2964 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.401298464324817e-45 @@ -35599,7 +35596,7 @@ i32.const 16 i32.const 2965 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.175494490952134e-38 @@ -35612,7 +35609,7 @@ i32.const 16 i32.const 2966 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754946310819804e-38 @@ -35625,7 +35622,7 @@ i32.const 16 i32.const 2967 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509880009953429e-38 @@ -35638,7 +35635,7 @@ i32.const 16 i32.const 2968 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.350988701644575e-38 @@ -35651,7 +35648,7 @@ i32.const 16 i32.const 2969 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509895424236536e-38 @@ -35664,7 +35661,7 @@ i32.const 16 i32.const 2970 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.70197740328915e-38 @@ -35677,7 +35674,7 @@ i32.const 16 i32.const 2971 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1175870895385742e-08 @@ -35690,7 +35687,7 @@ i32.const 16 i32.const 2972 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.4901161193847656e-08 @@ -35703,7 +35700,7 @@ i32.const 16 i32.const 2973 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.000244140625 @@ -35716,7 +35713,7 @@ i32.const 16 i32.const 2974 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.0003662109375 @@ -35729,7 +35726,7 @@ i32.const 16 i32.const 2975 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.175494490952134e-38 @@ -35742,7 +35739,7 @@ i32.const 16 i32.const 2976 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754946310819804e-38 @@ -35755,7 +35752,7 @@ i32.const 16 i32.const 2977 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509880009953429e-38 @@ -35768,7 +35765,7 @@ i32.const 16 i32.const 2978 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.350988701644575e-38 @@ -35781,7 +35778,7 @@ i32.const 16 i32.const 2979 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509895424236536e-38 @@ -35794,7 +35791,7 @@ i32.const 16 i32.const 2980 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -4.70197740328915e-38 @@ -35807,7 +35804,7 @@ i32.const 16 i32.const 2981 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1175870895385742e-08 @@ -35820,7 +35817,7 @@ i32.const 16 i32.const 2982 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.4901161193847656e-08 @@ -35833,7 +35830,7 @@ i32.const 16 i32.const 2983 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.000244140625 @@ -35846,7 +35843,7 @@ i32.const 16 i32.const 2984 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.0003662109375 @@ -35859,7 +35856,7 @@ i32.const 16 i32.const 2985 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.802596928649634e-45 @@ -35872,7 +35869,7 @@ i32.const 16 i32.const 2986 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.2611686178923354e-44 @@ -35885,7 +35882,7 @@ i32.const 16 i32.const 2987 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.938735877055719e-39 @@ -35898,7 +35895,7 @@ i32.const 16 i32.const 2988 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -35911,7 +35908,7 @@ i32.const 16 i32.const 2989 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754940705625946e-38 @@ -35924,7 +35921,7 @@ i32.const 16 i32.const 2990 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754942106924411e-38 @@ -35937,7 +35934,7 @@ i32.const 16 i32.const 2991 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.802596928649634e-45 @@ -35950,7 +35947,7 @@ i32.const 16 i32.const 2992 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.2611686178923354e-44 @@ -35963,7 +35960,7 @@ i32.const 16 i32.const 2993 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.938735877055719e-39 @@ -35976,7 +35973,7 @@ i32.const 16 i32.const 2994 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5.877471754111438e-39 @@ -35989,7 +35986,7 @@ i32.const 16 i32.const 2995 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754940705625946e-38 @@ -36002,7 +35999,7 @@ i32.const 16 i32.const 2996 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754942106924411e-38 @@ -36015,7 +36012,7 @@ i32.const 16 i32.const 2997 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 255.99993896484375 @@ -36028,7 +36025,7 @@ i32.const 16 i32.const 3000 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5033165 @@ -36041,7 +36038,7 @@ i32.const 16 i32.const 3001 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 421657440 @@ -36054,7 +36051,7 @@ i32.const 16 i32.const 3002 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2147483392 @@ -36067,7 +36064,7 @@ i32.const 16 i32.const 3003 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 68719476736 @@ -36080,7 +36077,7 @@ i32.const 16 i32.const 3004 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 549755813888 @@ -36093,7 +36090,7 @@ i32.const 16 i32.const 3005 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -36106,7 +36103,7 @@ i32.const 16 i32.const 3006 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -255.99993896484375 @@ -36119,7 +36116,7 @@ i32.const 16 i32.const 3007 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5033165 @@ -36132,7 +36129,7 @@ i32.const 16 i32.const 3008 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -421657440 @@ -36145,7 +36142,7 @@ i32.const 16 i32.const 3009 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2147483392 @@ -36158,7 +36155,7 @@ i32.const 16 i32.const 3010 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -68719476736 @@ -36171,7 +36168,7 @@ i32.const 16 i32.const 3011 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -549755813888 @@ -36184,7 +36181,7 @@ i32.const 16 i32.const 3012 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3402823466385288598117041e14 @@ -36197,7 +36194,7 @@ i32.const 16 i32.const 3013 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -36210,7 +36207,7 @@ i32.const 16 i32.const 3025 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -36223,7 +36220,7 @@ i32.const 16 i32.const 3026 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -36236,7 +36233,7 @@ i32.const 16 i32.const 3027 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -36249,7 +36246,7 @@ i32.const 16 i32.const 3028 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -36262,7 +36259,7 @@ i32.const 16 i32.const 3029 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -36275,7 +36272,7 @@ i32.const 16 i32.const 3030 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -36288,7 +36285,7 @@ i32.const 16 i32.const 3031 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -36301,7 +36298,7 @@ i32.const 16 i32.const 3032 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -36314,7 +36311,7 @@ i32.const 16 i32.const 3033 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -36327,7 +36324,7 @@ i32.const 16 i32.const 3034 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -36340,7 +36337,7 @@ i32.const 16 i32.const 3037 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -36353,7 +36350,7 @@ i32.const 16 i32.const 3038 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36366,7 +36363,7 @@ i32.const 16 i32.const 3039 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -36379,7 +36376,7 @@ i32.const 16 i32.const 3040 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -36392,7 +36389,7 @@ i32.const 16 i32.const 3041 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -36405,7 +36402,7 @@ i32.const 16 i32.const 3050 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -36418,7 +36415,7 @@ i32.const 16 i32.const 3051 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -36431,7 +36428,7 @@ i32.const 16 i32.const 3052 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -36444,7 +36441,7 @@ i32.const 16 i32.const 3053 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -36457,7 +36454,7 @@ i32.const 16 i32.const 3054 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -36470,7 +36467,7 @@ i32.const 16 i32.const 3055 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -36483,7 +36480,7 @@ i32.const 16 i32.const 3056 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -36496,7 +36493,7 @@ i32.const 16 i32.const 3057 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -36509,7 +36506,7 @@ i32.const 16 i32.const 3058 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -36522,7 +36519,7 @@ i32.const 16 i32.const 3059 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36535,7 +36532,7 @@ i32.const 16 i32.const 3062 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36548,7 +36545,7 @@ i32.const 16 i32.const 3063 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -36561,7 +36558,7 @@ i32.const 16 i32.const 3064 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -36574,7 +36571,7 @@ i32.const 16 i32.const 3065 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -36587,7 +36584,7 @@ i32.const 16 i32.const 3066 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -36600,7 +36597,7 @@ i32.const 16 i32.const 3078 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -36613,7 +36610,7 @@ i32.const 16 i32.const 3079 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -36626,7 +36623,7 @@ i32.const 16 i32.const 3080 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -36639,7 +36636,7 @@ i32.const 16 i32.const 3081 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -36652,7 +36649,7 @@ i32.const 16 i32.const 3082 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -36665,7 +36662,7 @@ i32.const 16 i32.const 3083 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -36678,7 +36675,7 @@ i32.const 16 i32.const 3084 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -36691,7 +36688,7 @@ i32.const 16 i32.const 3085 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -36704,7 +36701,7 @@ i32.const 16 i32.const 3086 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -36717,7 +36714,7 @@ i32.const 16 i32.const 3087 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -36730,7 +36727,7 @@ i32.const 16 i32.const 3090 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36743,7 +36740,7 @@ i32.const 16 i32.const 3091 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -36756,7 +36753,7 @@ i32.const 16 i32.const 3092 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -36769,7 +36766,7 @@ i32.const 16 i32.const 3093 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -36782,7 +36779,7 @@ i32.const 16 i32.const 3094 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -36795,7 +36792,7 @@ i32.const 16 i32.const 3095 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -36808,7 +36805,7 @@ i32.const 16 i32.const 3096 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4 @@ -36821,7 +36818,7 @@ i32.const 16 i32.const 3097 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-323 @@ -36834,7 +36831,7 @@ i32.const 16 i32.const 3098 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5e-323 @@ -36847,7 +36844,7 @@ i32.const 16 i32.const 3099 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -36860,7 +36857,7 @@ i32.const 16 i32.const 3100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -5e-324 @@ -36873,7 +36870,7 @@ i32.const 16 i32.const 3101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999999999999999 @@ -36886,7 +36883,7 @@ i32.const 16 i32.const 3102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.9999999999999998 @@ -36899,7 +36896,7 @@ i32.const 16 i32.const 3103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000000000000002 @@ -36912,7 +36909,7 @@ i32.const 16 i32.const 3104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.0000000000000004 @@ -36925,7 +36922,7 @@ i32.const 16 i32.const 3105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000000000000002 @@ -36938,7 +36935,7 @@ i32.const 16 i32.const 3106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999999999999999 @@ -36951,7 +36948,7 @@ i32.const 16 i32.const 3107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1797693134862315708145274e284 @@ -36964,7 +36961,7 @@ i32.const 16 i32.const 3108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -36977,7 +36974,7 @@ i32.const 16 i32.const 3109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 179769313486231490980915e285 @@ -36990,7 +36987,7 @@ i32.const 16 i32.const 3110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862314111473026e284 @@ -37003,7 +37000,7 @@ i32.const 16 i32.const 3111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862313313136902e284 @@ -37016,7 +37013,7 @@ i32.const 16 i32.const 3112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862312514800778e284 @@ -37029,7 +37026,7 @@ i32.const 16 i32.const 3113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862311716464655e284 @@ -37042,7 +37039,7 @@ i32.const 16 i32.const 3114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862310918128531e284 @@ -37055,7 +37052,7 @@ i32.const 16 i32.const 3115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862310119792407e284 @@ -37068,7 +37065,7 @@ i32.const 16 i32.const 3116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862309321456283e284 @@ -37081,7 +37078,7 @@ i32.const 16 i32.const 3117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862308523120159e284 @@ -37094,7 +37091,7 @@ i32.const 16 i32.const 3118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862307724784036e284 @@ -37107,7 +37104,7 @@ i32.const 16 i32.const 3119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507203e-308 @@ -37120,7 +37117,7 @@ i32.const 16 i32.const 3120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507205e-308 @@ -37133,7 +37130,7 @@ i32.const 16 i32.const 3121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507207e-308 @@ -37146,7 +37143,7 @@ i32.const 16 i32.const 3122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507209e-308 @@ -37159,7 +37156,7 @@ i32.const 16 i32.const 3123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507211e-308 @@ -37172,7 +37169,7 @@ i32.const 16 i32.const 3124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072127e-308 @@ -37185,7 +37182,7 @@ i32.const 16 i32.const 3125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072147e-308 @@ -37198,7 +37195,7 @@ i32.const 16 i32.const 3126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072167e-308 @@ -37211,7 +37208,7 @@ i32.const 16 i32.const 3127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072187e-308 @@ -37224,7 +37221,7 @@ i32.const 16 i32.const 3128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072207e-308 @@ -37237,7 +37234,7 @@ i32.const 16 i32.const 3129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072226e-308 @@ -37250,7 +37247,7 @@ i32.const 16 i32.const 3130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072246e-308 @@ -37263,7 +37260,7 @@ i32.const 16 i32.const 3131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072266e-308 @@ -37276,7 +37273,7 @@ i32.const 16 i32.const 3132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072286e-308 @@ -37289,7 +37286,7 @@ i32.const 16 i32.const 3133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 92.35130391890645 @@ -37302,7 +37299,7 @@ i32.const 16 i32.const 3134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 93.3599596388916 @@ -37315,7 +37312,7 @@ i32.const 16 i32.const 3135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 95.42049628886124 @@ -37328,7 +37325,7 @@ i32.const 16 i32.const 3136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 95.87916941885449 @@ -37341,7 +37338,7 @@ i32.const 16 i32.const 3137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 96.84804174884022 @@ -37354,7 +37351,7 @@ i32.const 16 i32.const 3138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 97.43639050883155 @@ -37367,7 +37364,7 @@ i32.const 16 i32.const 3139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 97.50957979883047 @@ -37380,7 +37377,7 @@ i32.const 16 i32.const 3140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 97.80496893882612 @@ -37393,7 +37390,7 @@ i32.const 16 i32.const 3141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 98.2751822888192 @@ -37406,7 +37403,7 @@ i32.const 16 i32.const 3142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 99.47293564880155 @@ -37419,7 +37416,7 @@ i32.const 16 i32.const 3143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 100.57047130878539 @@ -37432,7 +37429,7 @@ i32.const 16 i32.const 3144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 100.60954608878481 @@ -37445,7 +37442,7 @@ i32.const 16 i32.const 3145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 100.67909109878379 @@ -37458,7 +37455,7 @@ i32.const 16 i32.const 3146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 101.12268095877725 @@ -37471,7 +37468,7 @@ i32.const 16 i32.const 3147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 101.3027691287746 @@ -37484,7 +37481,7 @@ i32.const 16 i32.const 3148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.45932313565507e-307 @@ -37497,7 +37494,7 @@ i32.const 16 i32.const 3149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5.610957305180409e-307 @@ -37510,7 +37507,7 @@ i32.const 16 i32.const 3150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5.8073887977408524e-307 @@ -37523,7 +37520,7 @@ i32.const 16 i32.const 3151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.026137080471427e-307 @@ -37536,7 +37533,7 @@ i32.const 16 i32.const 3152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8.438697769194972e-307 @@ -37549,7 +37546,7 @@ i32.const 16 i32.const 3153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1607792515836795e-306 @@ -37562,7 +37559,7 @@ i32.const 16 i32.const 3154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.2827413827423193e-306 @@ -37575,7 +37572,7 @@ i32.const 16 i32.const 3155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.7116604596087457e-306 @@ -37588,7 +37585,7 @@ i32.const 16 i32.const 3156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.038173251686994e-306 @@ -37601,7 +37598,7 @@ i32.const 16 i32.const 3157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.171572060856931e-306 @@ -37614,7 +37611,7 @@ i32.const 16 i32.const 3158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.4681399631804094e-306 @@ -37627,7 +37624,7 @@ i32.const 16 i32.const 3159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.5175533964200588e-306 @@ -37640,7 +37637,7 @@ i32.const 16 i32.const 3160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.6461505468829625e-306 @@ -37653,7 +37650,7 @@ i32.const 16 i32.const 3161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3.8167076367720413e-306 @@ -37666,7 +37663,7 @@ i32.const 16 i32.const 3162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.5743220778562766e-306 @@ -37679,7 +37676,7 @@ i32.const 16 i32.const 3163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -37692,7 +37689,7 @@ i32.const 16 i32.const 3172 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -37705,7 +37702,7 @@ i32.const 16 i32.const 3173 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -37718,7 +37715,7 @@ i32.const 16 i32.const 3174 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -37731,7 +37728,7 @@ i32.const 16 i32.const 3175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -37744,7 +37741,7 @@ i32.const 16 i32.const 3176 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -37757,7 +37754,7 @@ i32.const 16 i32.const 3177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -37770,7 +37767,7 @@ i32.const 16 i32.const 3178 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -37783,7 +37780,7 @@ i32.const 16 i32.const 3179 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -37796,7 +37793,7 @@ i32.const 16 i32.const 3180 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -37809,7 +37806,7 @@ i32.const 16 i32.const 3181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -37822,7 +37819,7 @@ i32.const 16 i32.const 3184 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37835,7 +37832,7 @@ i32.const 16 i32.const 3185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -37848,7 +37845,7 @@ i32.const 16 i32.const 3186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -37861,7 +37858,7 @@ i32.const 16 i32.const 3187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -37874,7 +37871,7 @@ i32.const 16 i32.const 3188 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -37887,7 +37884,7 @@ i32.const 16 i32.const 3189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37900,7 +37897,7 @@ i32.const 16 i32.const 3190 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4 @@ -37913,7 +37910,7 @@ i32.const 16 i32.const 3191 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.802596928649634e-45 @@ -37926,7 +37923,7 @@ i32.const 16 i32.const 3192 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.203895392974451e-45 @@ -37939,7 +37936,7 @@ i32.const 16 i32.const 3193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -37952,7 +37949,7 @@ i32.const 16 i32.const 3194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.401298464324817e-45 @@ -37965,7 +37962,7 @@ i32.const 16 i32.const 3195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -37978,7 +37975,7 @@ i32.const 16 i32.const 3196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3402823466385288598117041e14 @@ -37991,7 +37988,7 @@ i32.const 16 i32.const 3197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999998807907104 @@ -38004,7 +38001,7 @@ i32.const 16 i32.const 3198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999999403953552 @@ -38017,7 +38014,7 @@ i32.const 16 i32.const 3199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.999999761581421 @@ -38030,7 +38027,7 @@ i32.const 16 i32.const 3200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.9999998807907104 @@ -38043,7 +38040,7 @@ i32.const 16 i32.const 3201 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000001192092896 @@ -38056,7 +38053,7 @@ i32.const 16 i32.const 3202 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.000000238418579 @@ -38069,7 +38066,7 @@ i32.const 16 i32.const 3203 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.000000238418579 @@ -38082,7 +38079,7 @@ i32.const 16 i32.const 3204 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.000000476837158 @@ -38095,7 +38092,7 @@ i32.const 16 i32.const 3205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -38108,7 +38105,7 @@ i32.const 16 i32.const 3243 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -38121,7 +38118,7 @@ i32.const 16 i32.const 3244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -38134,7 +38131,7 @@ i32.const 16 i32.const 3245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -38147,7 +38144,7 @@ i32.const 16 i32.const 3246 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -38160,7 +38157,7 @@ i32.const 16 i32.const 3247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -38173,7 +38170,7 @@ i32.const 16 i32.const 3248 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -38186,7 +38183,7 @@ i32.const 16 i32.const 3249 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -38199,7 +38196,7 @@ i32.const 16 i32.const 3250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -38212,7 +38209,7 @@ i32.const 16 i32.const 3251 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -38225,7 +38222,7 @@ i32.const 16 i32.const 3252 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -38238,7 +38235,7 @@ i32.const 16 i32.const 3255 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -38251,7 +38248,7 @@ i32.const 16 i32.const 3256 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -38264,7 +38261,7 @@ i32.const 16 i32.const 3257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -38277,7 +38274,7 @@ i32.const 16 i32.const 3258 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -38290,7 +38287,7 @@ i32.const 16 i32.const 3259 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.862645149230957e-09 @@ -38303,7 +38300,7 @@ i32.const 16 i32.const 3262 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.862645149230957e-09 @@ -38316,7 +38313,7 @@ i32.const 16 i32.const 3263 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754943508222875e-38 @@ -38329,7 +38326,7 @@ i32.const 16 i32.const 3264 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754943508222875e-38 @@ -38342,7 +38339,7 @@ i32.const 16 i32.const 3265 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -38355,7 +38352,7 @@ i32.const 16 i32.const 3266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.401298464324817e-45 @@ -38368,7 +38365,7 @@ i32.const 16 i32.const 3267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.175494490952134e-38 @@ -38381,7 +38378,7 @@ i32.const 16 i32.const 3268 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754946310819804e-38 @@ -38394,7 +38391,7 @@ i32.const 16 i32.const 3269 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509880009953429e-38 @@ -38407,7 +38404,7 @@ i32.const 16 i32.const 3270 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.350988701644575e-38 @@ -38420,7 +38417,7 @@ i32.const 16 i32.const 3271 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509895424236536e-38 @@ -38433,7 +38430,7 @@ i32.const 16 i32.const 3272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.70197740328915e-38 @@ -38446,7 +38443,7 @@ i32.const 16 i32.const 3273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1175870895385742e-08 @@ -38459,7 +38456,7 @@ i32.const 16 i32.const 3274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.4901161193847656e-08 @@ -38472,7 +38469,7 @@ i32.const 16 i32.const 3275 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.000244140625 @@ -38485,7 +38482,7 @@ i32.const 16 i32.const 3276 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.175494490952134e-38 @@ -38498,7 +38495,7 @@ i32.const 16 i32.const 3277 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754946310819804e-38 @@ -38511,7 +38508,7 @@ i32.const 16 i32.const 3278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509880009953429e-38 @@ -38524,7 +38521,7 @@ i32.const 16 i32.const 3279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.350988701644575e-38 @@ -38537,7 +38534,7 @@ i32.const 16 i32.const 3280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509895424236536e-38 @@ -38550,7 +38547,7 @@ i32.const 16 i32.const 3281 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -4.70197740328915e-38 @@ -38563,7 +38560,7 @@ i32.const 16 i32.const 3282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1175870895385742e-08 @@ -38576,7 +38573,7 @@ i32.const 16 i32.const 3283 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.4901161193847656e-08 @@ -38589,7 +38586,7 @@ i32.const 16 i32.const 3284 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.000244140625 @@ -38602,7 +38599,7 @@ i32.const 16 i32.const 3285 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.802596928649634e-45 @@ -38615,7 +38612,7 @@ i32.const 16 i32.const 3286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.2611686178923354e-44 @@ -38628,7 +38625,7 @@ i32.const 16 i32.const 3287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.938735877055719e-39 @@ -38641,7 +38638,7 @@ i32.const 16 i32.const 3288 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -38654,7 +38651,7 @@ i32.const 16 i32.const 3289 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754940705625946e-38 @@ -38667,7 +38664,7 @@ i32.const 16 i32.const 3290 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754942106924411e-38 @@ -38680,7 +38677,7 @@ i32.const 16 i32.const 3291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.802596928649634e-45 @@ -38693,7 +38690,7 @@ i32.const 16 i32.const 3292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.2611686178923354e-44 @@ -38706,7 +38703,7 @@ i32.const 16 i32.const 3293 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.938735877055719e-39 @@ -38719,7 +38716,7 @@ i32.const 16 i32.const 3294 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5.877471754111438e-39 @@ -38732,7 +38729,7 @@ i32.const 16 i32.const 3295 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754940705625946e-38 @@ -38745,7 +38742,7 @@ i32.const 16 i32.const 3296 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754942106924411e-38 @@ -38758,7 +38755,7 @@ i32.const 16 i32.const 3297 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -38771,7 +38768,7 @@ i32.const 16 i32.const 3309 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -38784,7 +38781,7 @@ i32.const 16 i32.const 3310 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -38797,7 +38794,7 @@ i32.const 16 i32.const 3311 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -38810,7 +38807,7 @@ i32.const 16 i32.const 3312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -38823,7 +38820,7 @@ i32.const 16 i32.const 3313 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -38836,7 +38833,7 @@ i32.const 16 i32.const 3314 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -38849,7 +38846,7 @@ i32.const 16 i32.const 3315 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -38862,7 +38859,7 @@ i32.const 16 i32.const 3316 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -38875,7 +38872,7 @@ i32.const 16 i32.const 3317 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -38888,7 +38885,7 @@ i32.const 16 i32.const 3318 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -38901,7 +38898,7 @@ i32.const 16 i32.const 3321 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -38914,7 +38911,7 @@ i32.const 16 i32.const 3322 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -38927,7 +38924,7 @@ i32.const 16 i32.const 3323 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -38940,7 +38937,7 @@ i32.const 16 i32.const 3324 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -38953,7 +38950,7 @@ i32.const 16 i32.const 3325 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -38966,7 +38963,7 @@ i32.const 16 i32.const 3334 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -38979,7 +38976,7 @@ i32.const 16 i32.const 3335 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -38992,7 +38989,7 @@ i32.const 16 i32.const 3336 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -39005,7 +39002,7 @@ i32.const 16 i32.const 3337 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -39018,7 +39015,7 @@ i32.const 16 i32.const 3338 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -39031,7 +39028,7 @@ i32.const 16 i32.const 3339 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -39044,7 +39041,7 @@ i32.const 16 i32.const 3340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -39057,7 +39054,7 @@ i32.const 16 i32.const 3341 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -39070,7 +39067,7 @@ i32.const 16 i32.const 3342 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -39083,7 +39080,7 @@ i32.const 16 i32.const 3343 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -39096,7 +39093,7 @@ i32.const 16 i32.const 3346 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -39109,7 +39106,7 @@ i32.const 16 i32.const 3347 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -39122,7 +39119,7 @@ i32.const 16 i32.const 3348 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -39135,7 +39132,7 @@ i32.const 16 i32.const 3349 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -39148,7 +39145,7 @@ i32.const 16 i32.const 3350 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -39160,7 +39157,7 @@ i32.const 16 i32.const 3362 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -39172,7 +39169,7 @@ i32.const 16 i32.const 3363 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -39184,7 +39181,7 @@ i32.const 16 i32.const 3364 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -39196,7 +39193,7 @@ i32.const 16 i32.const 3365 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -39208,7 +39205,7 @@ i32.const 16 i32.const 3366 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -39220,7 +39217,7 @@ i32.const 16 i32.const 3367 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -39232,7 +39229,7 @@ i32.const 16 i32.const 3368 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -39244,7 +39241,7 @@ i32.const 16 i32.const 3369 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -39256,7 +39253,7 @@ i32.const 16 i32.const 3370 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -39268,7 +39265,7 @@ i32.const 16 i32.const 3371 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -39280,7 +39277,7 @@ i32.const 16 i32.const 3374 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -39292,7 +39289,7 @@ i32.const 16 i32.const 3375 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -39304,7 +39301,7 @@ i32.const 16 i32.const 3376 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -39316,7 +39313,7 @@ i32.const 16 i32.const 3377 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -39328,7 +39325,7 @@ i32.const 16 i32.const 3378 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -39340,7 +39337,7 @@ i32.const 16 i32.const 3379 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -39352,7 +39349,7 @@ i32.const 16 i32.const 3380 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -39364,7 +39361,7 @@ i32.const 16 i32.const 3381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -39376,7 +39373,7 @@ i32.const 16 i32.const 3382 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -39388,7 +39385,7 @@ i32.const 16 i32.const 3383 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -39400,7 +39397,7 @@ i32.const 16 i32.const 3384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -39412,7 +39409,7 @@ i32.const 16 i32.const 3385 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -39424,7 +39421,7 @@ i32.const 16 i32.const 3386 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -39436,7 +39433,7 @@ i32.const 16 i32.const 3387 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -39448,7 +39445,7 @@ i32.const 16 i32.const 3388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -39460,7 +39457,7 @@ i32.const 16 i32.const 3397 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -39472,7 +39469,7 @@ i32.const 16 i32.const 3398 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -39484,7 +39481,7 @@ i32.const 16 i32.const 3399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -39496,7 +39493,7 @@ i32.const 16 i32.const 3400 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -39508,7 +39505,7 @@ i32.const 16 i32.const 3401 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -39520,7 +39517,7 @@ i32.const 16 i32.const 3402 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -39532,7 +39529,7 @@ i32.const 16 i32.const 3403 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -39544,7 +39541,7 @@ i32.const 16 i32.const 3404 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -39556,7 +39553,7 @@ i32.const 16 i32.const 3405 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -39568,7 +39565,7 @@ i32.const 16 i32.const 3406 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -39580,7 +39577,7 @@ i32.const 16 i32.const 3409 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -39592,7 +39589,7 @@ i32.const 16 i32.const 3410 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -39604,7 +39601,7 @@ i32.const 16 i32.const 3411 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -39616,7 +39613,7 @@ i32.const 16 i32.const 3412 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -39628,7 +39625,7 @@ i32.const 16 i32.const 3413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -39640,7 +39637,7 @@ i32.const 16 i32.const 3414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -39652,7 +39649,7 @@ i32.const 16 i32.const 3415 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -39664,7 +39661,7 @@ i32.const 16 i32.const 3416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -39676,7 +39673,7 @@ i32.const 16 i32.const 3417 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -39688,7 +39685,7 @@ i32.const 16 i32.const 3418 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -39700,7 +39697,7 @@ i32.const 16 i32.const 3419 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -39712,7 +39709,7 @@ i32.const 16 i32.const 3420 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -39724,7 +39721,7 @@ i32.const 16 i32.const 3421 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -39736,7 +39733,7 @@ i32.const 16 i32.const 3422 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -39748,7 +39745,7 @@ i32.const 16 i32.const 3423 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -39761,7 +39758,7 @@ i32.const 16 i32.const 3427 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -39774,7 +39771,7 @@ i32.const 16 i32.const 3428 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -39787,7 +39784,7 @@ i32.const 16 i32.const 3429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967295 @@ -39800,7 +39797,7 @@ i32.const 16 i32.const 3430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967294 @@ -39813,7 +39810,7 @@ i32.const 16 i32.const 3431 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.e+60 @@ -39826,7 +39823,7 @@ i32.const 16 i32.const 3432 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.e+60 @@ -39839,7 +39836,7 @@ i32.const 16 i32.const 3433 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.e+60 @@ -39852,7 +39849,7 @@ i32.const 16 i32.const 3434 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.e+24 @@ -39865,7 +39862,7 @@ i32.const 16 i32.const 3435 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -39878,7 +39875,7 @@ i32.const 16 i32.const 3436 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -39891,7 +39888,7 @@ i32.const 16 i32.const 3437 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -39904,7 +39901,7 @@ i32.const 16 i32.const 3438 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -39916,7 +39913,7 @@ i32.const 16 i32.const 3442 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -39928,7 +39925,7 @@ i32.const 16 i32.const 3443 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -39940,7 +39937,7 @@ i32.const 16 i32.const 3444 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -128 @@ -39952,7 +39949,7 @@ i32.const 16 i32.const 3445 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967295 @@ -39964,7 +39961,7 @@ i32.const 16 i32.const 3446 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967295.5 @@ -39976,7 +39973,7 @@ i32.const 16 i32.const 3447 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967296 @@ -39988,7 +39985,7 @@ i32.const 16 i32.const 3448 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967297 @@ -40000,7 +39997,7 @@ i32.const 16 i32.const 3449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -40012,7 +40009,7 @@ i32.const 16 i32.const 3450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40024,7 +40021,7 @@ i32.const 16 i32.const 3451 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9007199254740991 @@ -40036,7 +40033,7 @@ i32.const 16 i32.const 3452 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -9007199254740991 @@ -40048,7 +40045,7 @@ i32.const 16 i32.const 3453 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -40060,7 +40057,7 @@ i32.const 16 i32.const 3454 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -40072,7 +40069,7 @@ i32.const 16 i32.const 3455 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1797693134862315708145274e284 @@ -40084,7 +40081,7 @@ i32.const 16 i32.const 3456 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.220446049250313e-16 @@ -40096,7 +40093,7 @@ i32.const 16 i32.const 3457 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -40109,7 +40106,7 @@ i32.const 16 i32.const 3461 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -40122,7 +40119,7 @@ i32.const 16 i32.const 3462 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -40135,7 +40132,7 @@ i32.const 16 i32.const 3463 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -40148,7 +40145,7 @@ i32.const 16 i32.const 3464 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -40161,7 +40158,7 @@ i32.const 16 i32.const 3466 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -40174,7 +40171,7 @@ i32.const 16 i32.const 3467 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -40187,7 +40184,7 @@ i32.const 16 i32.const 3468 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -40200,7 +40197,7 @@ i32.const 16 i32.const 3469 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -40213,7 +40210,7 @@ i32.const 16 i32.const 3471 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -40226,7 +40223,7 @@ i32.const 16 i32.const 3472 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -40239,7 +40236,7 @@ i32.const 16 i32.const 3473 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -40252,7 +40249,7 @@ i32.const 16 i32.const 3474 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -40265,7 +40262,7 @@ i32.const 16 i32.const 3476 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -40278,7 +40275,7 @@ i32.const 16 i32.const 3477 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -40291,7 +40288,7 @@ i32.const 16 i32.const 3478 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -40304,7 +40301,7 @@ i32.const 16 i32.const 3479 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -2 @@ -40317,7 +40314,7 @@ i32.const 16 i32.const 3481 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -2 @@ -40330,7 +40327,7 @@ i32.const 16 i32.const 3482 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -2 @@ -40343,7 +40340,7 @@ i32.const 16 i32.const 3483 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -2 @@ -40356,7 +40353,7 @@ i32.const 16 i32.const 3484 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -40369,7 +40366,7 @@ i32.const 16 i32.const 3486 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -40382,7 +40379,7 @@ i32.const 16 i32.const 3487 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -40395,7 +40392,7 @@ i32.const 16 i32.const 3488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -40408,7 +40405,7 @@ i32.const 16 i32.const 3489 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -40421,7 +40418,7 @@ i32.const 16 i32.const 3490 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -40434,7 +40431,7 @@ i32.const 16 i32.const 3491 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -40447,7 +40444,7 @@ i32.const 16 i32.const 3492 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 57055 @@ -40464,7 +40461,7 @@ i32.const 16 i32.const 3494 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -40477,7 +40474,7 @@ i32.const 16 i32.const 3498 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -40490,7 +40487,7 @@ i32.const 16 i32.const 3499 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -40504,7 +40501,7 @@ i32.const 16 i32.const 3500 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -40518,7 +40515,7 @@ i32.const 16 i32.const 3501 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -40532,7 +40529,7 @@ i32.const 16 i32.const 3502 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -40545,7 +40542,7 @@ i32.const 16 i32.const 3503 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -40558,7 +40555,7 @@ i32.const 16 i32.const 3504 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -40571,7 +40568,7 @@ i32.const 16 i32.const 3505 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -40584,7 +40581,7 @@ i32.const 16 i32.const 3506 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -40597,7 +40594,7 @@ i32.const 16 i32.const 3507 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -40610,7 +40607,7 @@ i32.const 16 i32.const 3508 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -40623,7 +40620,7 @@ i32.const 16 i32.const 3509 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -40636,7 +40633,7 @@ i32.const 16 i32.const 3510 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -40649,7 +40646,7 @@ i32.const 16 i32.const 3511 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 10 @@ -40662,7 +40659,7 @@ i32.const 16 i32.const 3512 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 10 @@ -40675,7 +40672,7 @@ i32.const 16 i32.const 3513 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -40688,7 +40685,7 @@ i32.const 16 i32.const 3517 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -40701,7 +40698,7 @@ i32.const 16 i32.const 3518 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -40715,7 +40712,7 @@ i32.const 16 i32.const 3519 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -40729,7 +40726,7 @@ i32.const 16 i32.const 3520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -40743,7 +40740,7 @@ i32.const 16 i32.const 3521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40756,7 +40753,7 @@ i32.const 16 i32.const 3522 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40769,7 +40766,7 @@ i32.const 16 i32.const 3523 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -40782,7 +40779,7 @@ i32.const 16 i32.const 3524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -40795,7 +40792,7 @@ i32.const 16 i32.const 3525 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -40808,7 +40805,7 @@ i32.const 16 i32.const 3526 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -40821,7 +40818,7 @@ i32.const 16 i32.const 3527 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -40834,7 +40831,7 @@ i32.const 16 i32.const 3528 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -40847,7 +40844,7 @@ i32.const 16 i32.const 3529 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -40860,7 +40857,7 @@ i32.const 16 i32.const 3530 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 10 @@ -40873,7 +40870,7 @@ i32.const 16 i32.const 3531 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 10 @@ -40886,7 +40883,7 @@ i32.const 16 i32.const 3532 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index 8c6422997f..cc7d80b249 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -31,7 +31,7 @@ (import "Math" "PI" (global $~lib/bindings/Math/PI f64)) (import "Math" "SQRT1_2" (global $~lib/bindings/Math/SQRT1_2 f64)) (import "Math" "SQRT2" (global $~lib/bindings/Math/SQRT2 f64)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "Math" "abs" (func $~lib/bindings/Math/abs (param f64) (result f64))) (import "Math" "acos" (func $~lib/bindings/Math/acos (param f64) (result f64))) (import "Math" "acosh" (func $~lib/bindings/Math/acosh (param f64) (result f64))) @@ -62,10 +62,10 @@ (import "Math" "tanh" (func $~lib/bindings/Math/tanh (param f64) (result f64))) (import "Math" "trunc" (func $~lib/bindings/Math/trunc (param f64) (result f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\16\00\00\00s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s\00") - (data (i32.const 40) "\02\00\00\00 \00\00\00)\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe") - (data (i32.const 80) "\03\00\00\00\10\00\00\000\00\00\000\00\00\00 \00\00\00\04\00\00\00") - (data (i32.const 104) "\01\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\16\00\00\00s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s\00") + (data (i32.const 40) "\0f\00\00\00 \00\00\00)\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe") + (data (i32.const 80) "\11\00\00\00\10\00\00\000\00\00\000\00\00\00 \00\00\00\04\00\00\00") + (data (i32.const 104) "\10\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/math/js i32 (i32.const 1)) @@ -102,9 +102,7 @@ (global $~lib/builtins/f64.MAX_SAFE_INTEGER f64 (f64.const 9007199254740991)) (global $~lib/builtins/f64.EPSILON f64 (f64.const 2.220446049250313e-16)) (global $~lib/builtins/f32.MIN_VALUE f32 (f32.const 1.401298464324817e-45)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 136)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $~lib/builtins/isNaN (; 30 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 @@ -10421,7 +10419,7 @@ i32.const 112 i32.const 1021 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -10453,7 +10451,7 @@ i32.const 112 i32.const 1030 i32.const 24 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/random_state0_64 @@ -10510,7 +10508,7 @@ i32.const 112 i32.const 2312 i32.const 24 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/random_state0_32 @@ -13579,7 +13577,7 @@ i32.const 16 i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMathf.E @@ -13591,7 +13589,7 @@ i32.const 16 i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMath.E @@ -13605,7 +13603,7 @@ i32.const 16 i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMath.LN2 @@ -13619,7 +13617,7 @@ i32.const 16 i32.const 109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMath.LN10 @@ -13633,7 +13631,7 @@ i32.const 16 i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMath.LOG2E @@ -13647,7 +13645,7 @@ i32.const 16 i32.const 111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMath.PI @@ -13661,7 +13659,7 @@ i32.const 16 i32.const 112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMath.SQRT1_2 @@ -13675,7 +13673,7 @@ i32.const 16 i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMath.SQRT2 @@ -13689,7 +13687,7 @@ i32.const 16 i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMathf.E @@ -13704,7 +13702,7 @@ i32.const 16 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMathf.LN2 @@ -13719,7 +13717,7 @@ i32.const 16 i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMathf.LN10 @@ -13734,7 +13732,7 @@ i32.const 16 i32.const 118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMathf.LOG2E @@ -13749,7 +13747,7 @@ i32.const 16 i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMathf.PI @@ -13764,7 +13762,7 @@ i32.const 16 i32.const 120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMathf.SQRT1_2 @@ -13779,7 +13777,7 @@ i32.const 16 i32.const 121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMathf.SQRT2 @@ -13794,7 +13792,7 @@ i32.const 16 i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -13809,7 +13807,7 @@ i32.const 16 i32.const 133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -13824,7 +13822,7 @@ i32.const 16 i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -13839,7 +13837,7 @@ i32.const 16 i32.const 135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -13854,7 +13852,7 @@ i32.const 16 i32.const 136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -13869,7 +13867,7 @@ i32.const 16 i32.const 137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -13884,7 +13882,7 @@ i32.const 16 i32.const 138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -13899,7 +13897,7 @@ i32.const 16 i32.const 139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -13914,7 +13912,7 @@ i32.const 16 i32.const 140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -13929,7 +13927,7 @@ i32.const 16 i32.const 141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -13944,7 +13942,7 @@ i32.const 16 i32.const 142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -13959,7 +13957,7 @@ i32.const 16 i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -13974,7 +13972,7 @@ i32.const 16 i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -13989,7 +13987,7 @@ i32.const 16 i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -14004,7 +14002,7 @@ i32.const 16 i32.const 148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -14019,7 +14017,7 @@ i32.const 16 i32.const 149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -14036,7 +14034,7 @@ i32.const 16 i32.const 150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -14051,7 +14049,7 @@ i32.const 16 i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -14066,7 +14064,7 @@ i32.const 16 i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -14081,7 +14079,7 @@ i32.const 16 i32.const 153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -14098,7 +14096,7 @@ i32.const 16 i32.const 154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -14113,7 +14111,7 @@ i32.const 16 i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -14128,7 +14126,7 @@ i32.const 16 i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -14143,7 +14141,7 @@ i32.const 16 i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -14160,7 +14158,7 @@ i32.const 16 i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8988465674311579538646525e283 @@ -14175,7 +14173,7 @@ i32.const 16 i32.const 159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -14190,7 +14188,7 @@ i32.const 16 i32.const 160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.000244140625 @@ -14207,7 +14205,7 @@ i32.const 16 i32.const 161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7499999999999999 @@ -14224,7 +14222,7 @@ i32.const 16 i32.const 162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5000000000000012 @@ -14241,7 +14239,7 @@ i32.const 16 i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -14256,7 +14254,7 @@ i32.const 16 i32.const 172 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -14271,7 +14269,7 @@ i32.const 16 i32.const 173 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -14286,7 +14284,7 @@ i32.const 16 i32.const 174 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -14301,7 +14299,7 @@ i32.const 16 i32.const 175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -14316,7 +14314,7 @@ i32.const 16 i32.const 176 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -14331,7 +14329,7 @@ i32.const 16 i32.const 177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -14346,7 +14344,7 @@ i32.const 16 i32.const 178 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -14361,7 +14359,7 @@ i32.const 16 i32.const 179 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -14376,7 +14374,7 @@ i32.const 16 i32.const 180 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -14391,7 +14389,7 @@ i32.const 16 i32.const 181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -14406,7 +14404,7 @@ i32.const 16 i32.const 184 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -14421,7 +14419,7 @@ i32.const 16 i32.const 185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -14436,7 +14434,7 @@ i32.const 16 i32.const 186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -14451,7 +14449,7 @@ i32.const 16 i32.const 187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -14466,7 +14464,7 @@ i32.const 16 i32.const 188 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -14483,7 +14481,7 @@ i32.const 16 i32.const 189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -14498,7 +14496,7 @@ i32.const 16 i32.const 190 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -14513,7 +14511,7 @@ i32.const 16 i32.const 191 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -14528,7 +14526,7 @@ i32.const 16 i32.const 192 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -14545,7 +14543,7 @@ i32.const 16 i32.const 193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -14560,7 +14558,7 @@ i32.const 16 i32.const 194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -14575,7 +14573,7 @@ i32.const 16 i32.const 195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -14590,7 +14588,7 @@ i32.const 16 i32.const 196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -14607,7 +14605,7 @@ i32.const 16 i32.const 197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1701411834604692317316873e14 @@ -14622,7 +14620,7 @@ i32.const 16 i32.const 198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -14637,7 +14635,7 @@ i32.const 16 i32.const 199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.000244140625 @@ -14654,7 +14652,7 @@ i32.const 16 i32.const 200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7499999403953552 @@ -14671,7 +14669,7 @@ i32.const 16 i32.const 201 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5000006556510925 @@ -14688,7 +14686,7 @@ i32.const 16 i32.const 202 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -14702,7 +14700,7 @@ i32.const 16 i32.const 214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -14716,7 +14714,7 @@ i32.const 16 i32.const 215 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -14730,7 +14728,7 @@ i32.const 16 i32.const 216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -14744,7 +14742,7 @@ i32.const 16 i32.const 217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -14758,7 +14756,7 @@ i32.const 16 i32.const 218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -14772,7 +14770,7 @@ i32.const 16 i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -14786,7 +14784,7 @@ i32.const 16 i32.const 220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -14800,7 +14798,7 @@ i32.const 16 i32.const 221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -14814,7 +14812,7 @@ i32.const 16 i32.const 222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -14828,7 +14826,7 @@ i32.const 16 i32.const 223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -14842,7 +14840,7 @@ i32.const 16 i32.const 226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -14856,7 +14854,7 @@ i32.const 16 i32.const 227 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -14870,7 +14868,7 @@ i32.const 16 i32.const 228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -14884,7 +14882,7 @@ i32.const 16 i32.const 229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -14898,7 +14896,7 @@ i32.const 16 i32.const 230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -14913,7 +14911,7 @@ i32.const 16 i32.const 231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -14927,7 +14925,7 @@ i32.const 16 i32.const 232 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -14941,7 +14939,7 @@ i32.const 16 i32.const 241 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -14955,7 +14953,7 @@ i32.const 16 i32.const 242 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -14969,7 +14967,7 @@ i32.const 16 i32.const 243 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -14983,7 +14981,7 @@ i32.const 16 i32.const 244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -14997,7 +14995,7 @@ i32.const 16 i32.const 245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -15011,7 +15009,7 @@ i32.const 16 i32.const 246 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -15025,7 +15023,7 @@ i32.const 16 i32.const 247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -15039,7 +15037,7 @@ i32.const 16 i32.const 248 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -15053,7 +15051,7 @@ i32.const 16 i32.const 249 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -15067,7 +15065,7 @@ i32.const 16 i32.const 250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -15081,7 +15079,7 @@ i32.const 16 i32.const 253 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -15095,7 +15093,7 @@ i32.const 16 i32.const 254 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -15109,7 +15107,7 @@ i32.const 16 i32.const 255 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -15123,7 +15121,7 @@ i32.const 16 i32.const 256 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -15137,7 +15135,7 @@ i32.const 16 i32.const 257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -15152,7 +15150,7 @@ i32.const 16 i32.const 258 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -15166,7 +15164,7 @@ i32.const 16 i32.const 259 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -15180,7 +15178,7 @@ i32.const 16 i32.const 271 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -15194,7 +15192,7 @@ i32.const 16 i32.const 272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -15208,7 +15206,7 @@ i32.const 16 i32.const 273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -15222,7 +15220,7 @@ i32.const 16 i32.const 274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -15236,7 +15234,7 @@ i32.const 16 i32.const 275 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -15250,7 +15248,7 @@ i32.const 16 i32.const 276 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -15264,7 +15262,7 @@ i32.const 16 i32.const 277 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -15278,7 +15276,7 @@ i32.const 16 i32.const 278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -15292,7 +15290,7 @@ i32.const 16 i32.const 279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -15306,7 +15304,7 @@ i32.const 16 i32.const 280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -15320,7 +15318,7 @@ i32.const 16 i32.const 283 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -15334,7 +15332,7 @@ i32.const 16 i32.const 284 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -15348,7 +15346,7 @@ i32.const 16 i32.const 285 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000000000000002 @@ -15362,7 +15360,7 @@ i32.const 16 i32.const 286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000000000000002 @@ -15376,7 +15374,7 @@ i32.const 16 i32.const 287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -15390,7 +15388,7 @@ i32.const 16 i32.const 288 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -15405,7 +15403,7 @@ i32.const 16 i32.const 289 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -15419,7 +15417,7 @@ i32.const 16 i32.const 290 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5309227209592985 @@ -15433,7 +15431,7 @@ i32.const 16 i32.const 291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.4939556746399746 @@ -15447,7 +15445,7 @@ i32.const 16 i32.const 292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -15461,7 +15459,7 @@ i32.const 16 i32.const 301 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -15475,7 +15473,7 @@ i32.const 16 i32.const 302 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -15489,7 +15487,7 @@ i32.const 16 i32.const 303 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -15503,7 +15501,7 @@ i32.const 16 i32.const 304 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -15517,7 +15515,7 @@ i32.const 16 i32.const 305 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -15531,7 +15529,7 @@ i32.const 16 i32.const 306 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -15545,7 +15543,7 @@ i32.const 16 i32.const 307 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -15559,7 +15557,7 @@ i32.const 16 i32.const 308 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -15573,7 +15571,7 @@ i32.const 16 i32.const 309 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -15587,7 +15585,7 @@ i32.const 16 i32.const 310 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -15601,7 +15599,7 @@ i32.const 16 i32.const 313 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -15615,7 +15613,7 @@ i32.const 16 i32.const 314 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -15629,7 +15627,7 @@ i32.const 16 i32.const 315 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000001192092896 @@ -15643,7 +15641,7 @@ i32.const 16 i32.const 316 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000001192092896 @@ -15657,7 +15655,7 @@ i32.const 16 i32.const 317 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -15671,7 +15669,7 @@ i32.const 16 i32.const 318 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -15686,7 +15684,7 @@ i32.const 16 i32.const 319 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -15700,7 +15698,7 @@ i32.const 16 i32.const 320 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.49965065717697144 @@ -15714,7 +15712,7 @@ i32.const 16 i32.const 321 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5051405429840088 @@ -15728,7 +15726,7 @@ i32.const 16 i32.const 322 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5189794898033142 @@ -15742,7 +15740,7 @@ i32.const 16 i32.const 323 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -15756,7 +15754,7 @@ i32.const 16 i32.const 335 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -15770,7 +15768,7 @@ i32.const 16 i32.const 336 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -15784,7 +15782,7 @@ i32.const 16 i32.const 337 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -15798,7 +15796,7 @@ i32.const 16 i32.const 338 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -15812,7 +15810,7 @@ i32.const 16 i32.const 339 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -15826,7 +15824,7 @@ i32.const 16 i32.const 340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -15840,7 +15838,7 @@ i32.const 16 i32.const 341 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -15854,7 +15852,7 @@ i32.const 16 i32.const 342 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -15868,7 +15866,7 @@ i32.const 16 i32.const 343 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -15882,7 +15880,7 @@ i32.const 16 i32.const 344 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -15896,7 +15894,7 @@ i32.const 16 i32.const 347 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -15910,7 +15908,7 @@ i32.const 16 i32.const 348 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -15924,7 +15922,7 @@ i32.const 16 i32.const 349 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -15938,7 +15936,7 @@ i32.const 16 i32.const 350 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -15952,7 +15950,7 @@ i32.const 16 i32.const 351 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -15966,7 +15964,7 @@ i32.const 16 i32.const 352 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -15981,7 +15979,7 @@ i32.const 16 i32.const 353 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1060831199926429 @@ -15995,7 +15993,7 @@ i32.const 16 i32.const 369 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1089809557628658 @@ -16009,7 +16007,7 @@ i32.const 16 i32.const 371 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1169429159875521 @@ -16023,7 +16021,7 @@ i32.const 16 i32.const 372 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -16037,7 +16035,7 @@ i32.const 16 i32.const 381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -16051,7 +16049,7 @@ i32.const 16 i32.const 382 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -16065,7 +16063,7 @@ i32.const 16 i32.const 383 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -16079,7 +16077,7 @@ i32.const 16 i32.const 384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -16093,7 +16091,7 @@ i32.const 16 i32.const 385 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -16107,7 +16105,7 @@ i32.const 16 i32.const 386 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -16121,7 +16119,7 @@ i32.const 16 i32.const 387 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -16135,7 +16133,7 @@ i32.const 16 i32.const 388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -16149,7 +16147,7 @@ i32.const 16 i32.const 389 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -16163,7 +16161,7 @@ i32.const 16 i32.const 390 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -16177,7 +16175,7 @@ i32.const 16 i32.const 393 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -16191,7 +16189,7 @@ i32.const 16 i32.const 394 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -16205,7 +16203,7 @@ i32.const 16 i32.const 395 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -16219,7 +16217,7 @@ i32.const 16 i32.const 396 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -16233,7 +16231,7 @@ i32.const 16 i32.const 397 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -16247,7 +16245,7 @@ i32.const 16 i32.const 398 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -16262,7 +16260,7 @@ i32.const 16 i32.const 399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1125899906842624 @@ -16276,7 +16274,7 @@ i32.const 16 i32.const 400 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -16290,7 +16288,7 @@ i32.const 16 i32.const 412 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -16304,7 +16302,7 @@ i32.const 16 i32.const 413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -16318,7 +16316,7 @@ i32.const 16 i32.const 414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -16332,7 +16330,7 @@ i32.const 16 i32.const 415 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -16346,7 +16344,7 @@ i32.const 16 i32.const 416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -16360,7 +16358,7 @@ i32.const 16 i32.const 417 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -16374,7 +16372,7 @@ i32.const 16 i32.const 418 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -16388,7 +16386,7 @@ i32.const 16 i32.const 419 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -16402,7 +16400,7 @@ i32.const 16 i32.const 420 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -16416,7 +16414,7 @@ i32.const 16 i32.const 421 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -16430,7 +16428,7 @@ i32.const 16 i32.const 424 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -16444,7 +16442,7 @@ i32.const 16 i32.const 425 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -16458,7 +16456,7 @@ i32.const 16 i32.const 426 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -16472,7 +16470,7 @@ i32.const 16 i32.const 427 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000000000000002 @@ -16486,7 +16484,7 @@ i32.const 16 i32.const 428 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000000000000002 @@ -16500,7 +16498,7 @@ i32.const 16 i32.const 429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -16514,7 +16512,7 @@ i32.const 16 i32.const 430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -16529,7 +16527,7 @@ i32.const 16 i32.const 431 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -16543,7 +16541,7 @@ i32.const 16 i32.const 432 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5073043929119148 @@ -16557,7 +16555,7 @@ i32.const 16 i32.const 433 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -16571,7 +16569,7 @@ i32.const 16 i32.const 442 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -16585,7 +16583,7 @@ i32.const 16 i32.const 443 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -16599,7 +16597,7 @@ i32.const 16 i32.const 444 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -16613,7 +16611,7 @@ i32.const 16 i32.const 445 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -16627,7 +16625,7 @@ i32.const 16 i32.const 446 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -16641,7 +16639,7 @@ i32.const 16 i32.const 447 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -16655,7 +16653,7 @@ i32.const 16 i32.const 448 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -16669,7 +16667,7 @@ i32.const 16 i32.const 449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -16683,7 +16681,7 @@ i32.const 16 i32.const 450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -16697,7 +16695,7 @@ i32.const 16 i32.const 451 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -16711,7 +16709,7 @@ i32.const 16 i32.const 454 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -16725,7 +16723,7 @@ i32.const 16 i32.const 455 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -16739,7 +16737,7 @@ i32.const 16 i32.const 456 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -16753,7 +16751,7 @@ i32.const 16 i32.const 457 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000001192092896 @@ -16767,7 +16765,7 @@ i32.const 16 i32.const 458 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000001192092896 @@ -16781,7 +16779,7 @@ i32.const 16 i32.const 459 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -16795,7 +16793,7 @@ i32.const 16 i32.const 460 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -16810,7 +16808,7 @@ i32.const 16 i32.const 461 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -16824,7 +16822,7 @@ i32.const 16 i32.const 462 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5004770159721375 @@ -16838,7 +16836,7 @@ i32.const 16 i32.const 463 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -16852,7 +16850,7 @@ i32.const 16 i32.const 475 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -16866,7 +16864,7 @@ i32.const 16 i32.const 476 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -16880,7 +16878,7 @@ i32.const 16 i32.const 477 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -16894,7 +16892,7 @@ i32.const 16 i32.const 478 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -16908,7 +16906,7 @@ i32.const 16 i32.const 479 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -16922,7 +16920,7 @@ i32.const 16 i32.const 480 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -16936,7 +16934,7 @@ i32.const 16 i32.const 481 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -16950,7 +16948,7 @@ i32.const 16 i32.const 482 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -16964,7 +16962,7 @@ i32.const 16 i32.const 483 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -16978,7 +16976,7 @@ i32.const 16 i32.const 484 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -16992,7 +16990,7 @@ i32.const 16 i32.const 487 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -17006,7 +17004,7 @@ i32.const 16 i32.const 488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -17022,7 +17020,7 @@ i32.const 16 i32.const 489 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -17036,7 +17034,7 @@ i32.const 16 i32.const 490 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -17050,7 +17048,7 @@ i32.const 16 i32.const 491 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -17064,7 +17062,7 @@ i32.const 16 i32.const 520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -17078,7 +17076,7 @@ i32.const 16 i32.const 521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -17092,7 +17090,7 @@ i32.const 16 i32.const 522 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -17106,7 +17104,7 @@ i32.const 16 i32.const 523 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -17120,7 +17118,7 @@ i32.const 16 i32.const 524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -17134,7 +17132,7 @@ i32.const 16 i32.const 525 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -17148,7 +17146,7 @@ i32.const 16 i32.const 526 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -17162,7 +17160,7 @@ i32.const 16 i32.const 527 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -17176,7 +17174,7 @@ i32.const 16 i32.const 528 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -17190,7 +17188,7 @@ i32.const 16 i32.const 529 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -17204,7 +17202,7 @@ i32.const 16 i32.const 532 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -17218,7 +17216,7 @@ i32.const 16 i32.const 533 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -17234,7 +17232,7 @@ i32.const 16 i32.const 534 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -17248,7 +17246,7 @@ i32.const 16 i32.const 535 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -17262,7 +17260,7 @@ i32.const 16 i32.const 536 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -17276,7 +17274,7 @@ i32.const 16 i32.const 548 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -17290,7 +17288,7 @@ i32.const 16 i32.const 549 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -17304,7 +17302,7 @@ i32.const 16 i32.const 550 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -17318,7 +17316,7 @@ i32.const 16 i32.const 551 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -17332,7 +17330,7 @@ i32.const 16 i32.const 552 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -17346,7 +17344,7 @@ i32.const 16 i32.const 553 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -17360,7 +17358,7 @@ i32.const 16 i32.const 554 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -17374,7 +17372,7 @@ i32.const 16 i32.const 555 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -17388,7 +17386,7 @@ i32.const 16 i32.const 556 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -17402,7 +17400,7 @@ i32.const 16 i32.const 557 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -17416,7 +17414,7 @@ i32.const 16 i32.const 560 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -17430,7 +17428,7 @@ i32.const 16 i32.const 561 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -17444,7 +17442,7 @@ i32.const 16 i32.const 562 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -17458,7 +17456,7 @@ i32.const 16 i32.const 563 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -17472,7 +17470,7 @@ i32.const 16 i32.const 564 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -17487,7 +17485,7 @@ i32.const 16 i32.const 565 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -17501,7 +17499,7 @@ i32.const 16 i32.const 566 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6929821535674624 @@ -17515,7 +17513,7 @@ i32.const 16 i32.const 567 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -17529,7 +17527,7 @@ i32.const 16 i32.const 576 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -17543,7 +17541,7 @@ i32.const 16 i32.const 577 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -17557,7 +17555,7 @@ i32.const 16 i32.const 578 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -17571,7 +17569,7 @@ i32.const 16 i32.const 579 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -17585,7 +17583,7 @@ i32.const 16 i32.const 580 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -17599,7 +17597,7 @@ i32.const 16 i32.const 581 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -17613,7 +17611,7 @@ i32.const 16 i32.const 582 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -17627,7 +17625,7 @@ i32.const 16 i32.const 583 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -17641,7 +17639,7 @@ i32.const 16 i32.const 584 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -17655,7 +17653,7 @@ i32.const 16 i32.const 585 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -17669,7 +17667,7 @@ i32.const 16 i32.const 588 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -17683,7 +17681,7 @@ i32.const 16 i32.const 589 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -17697,7 +17695,7 @@ i32.const 16 i32.const 590 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -17711,7 +17709,7 @@ i32.const 16 i32.const 591 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -17725,7 +17723,7 @@ i32.const 16 i32.const 592 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -17740,7 +17738,7 @@ i32.const 16 i32.const 593 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -17754,7 +17752,7 @@ i32.const 16 i32.const 594 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -17768,7 +17766,7 @@ i32.const 16 i32.const 606 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -17782,7 +17780,7 @@ i32.const 16 i32.const 607 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -17796,7 +17794,7 @@ i32.const 16 i32.const 608 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -17810,7 +17808,7 @@ i32.const 16 i32.const 609 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -17824,7 +17822,7 @@ i32.const 16 i32.const 610 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -17838,7 +17836,7 @@ i32.const 16 i32.const 611 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -17852,7 +17850,7 @@ i32.const 16 i32.const 612 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -17866,7 +17864,7 @@ i32.const 16 i32.const 613 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -17880,7 +17878,7 @@ i32.const 16 i32.const 614 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -17894,7 +17892,7 @@ i32.const 16 i32.const 615 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -17908,7 +17906,7 @@ i32.const 16 i32.const 618 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -17922,7 +17920,7 @@ i32.const 16 i32.const 619 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -17937,7 +17935,7 @@ i32.const 16 i32.const 620 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -17951,7 +17949,7 @@ i32.const 16 i32.const 621 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -17965,7 +17963,7 @@ i32.const 16 i32.const 622 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -17979,7 +17977,7 @@ i32.const 16 i32.const 623 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -17994,7 +17992,7 @@ i32.const 16 i32.const 624 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -18008,7 +18006,7 @@ i32.const 16 i32.const 625 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -18022,7 +18020,7 @@ i32.const 16 i32.const 626 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.3552527156068805e-20 @@ -18036,7 +18034,7 @@ i32.const 16 i32.const 627 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.332636185032189e-302 @@ -18050,7 +18048,7 @@ i32.const 16 i32.const 628 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5.562684646268003e-309 @@ -18066,7 +18064,7 @@ i32.const 16 i32.const 629 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -5.562684646268003e-309 @@ -18082,7 +18080,7 @@ i32.const 16 i32.const 630 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8988465674311579538646525e283 @@ -18096,7 +18094,7 @@ i32.const 16 i32.const 631 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -18110,7 +18108,7 @@ i32.const 16 i32.const 640 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -18124,7 +18122,7 @@ i32.const 16 i32.const 641 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -18138,7 +18136,7 @@ i32.const 16 i32.const 642 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -18152,7 +18150,7 @@ i32.const 16 i32.const 643 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -18166,7 +18164,7 @@ i32.const 16 i32.const 644 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -18180,7 +18178,7 @@ i32.const 16 i32.const 645 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -18194,7 +18192,7 @@ i32.const 16 i32.const 646 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -18208,7 +18206,7 @@ i32.const 16 i32.const 647 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -18222,7 +18220,7 @@ i32.const 16 i32.const 648 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -18236,7 +18234,7 @@ i32.const 16 i32.const 649 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -18250,7 +18248,7 @@ i32.const 16 i32.const 652 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -18264,7 +18262,7 @@ i32.const 16 i32.const 653 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -18279,7 +18277,7 @@ i32.const 16 i32.const 654 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -18293,7 +18291,7 @@ i32.const 16 i32.const 655 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -18307,7 +18305,7 @@ i32.const 16 i32.const 656 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -18321,7 +18319,7 @@ i32.const 16 i32.const 657 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -18336,7 +18334,7 @@ i32.const 16 i32.const 658 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -18350,7 +18348,7 @@ i32.const 16 i32.const 659 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -18364,7 +18362,7 @@ i32.const 16 i32.const 660 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.3552527156068805e-20 @@ -18378,7 +18376,7 @@ i32.const 16 i32.const 661 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -18392,7 +18390,7 @@ i32.const 16 i32.const 662 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.938735877055719e-39 @@ -18408,7 +18406,7 @@ i32.const 16 i32.const 663 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.938735877055719e-39 @@ -18424,7 +18422,7 @@ i32.const 16 i32.const 664 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1701411834604692317316873e14 @@ -18438,7 +18436,7 @@ i32.const 16 i32.const 665 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -18453,7 +18451,7 @@ i32.const 16 i32.const 677 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -18468,7 +18466,7 @@ i32.const 16 i32.const 678 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -18483,7 +18481,7 @@ i32.const 16 i32.const 679 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -18498,7 +18496,7 @@ i32.const 16 i32.const 680 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -18513,7 +18511,7 @@ i32.const 16 i32.const 681 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -18528,7 +18526,7 @@ i32.const 16 i32.const 682 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -18543,7 +18541,7 @@ i32.const 16 i32.const 683 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -18558,7 +18556,7 @@ i32.const 16 i32.const 684 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -18573,7 +18571,7 @@ i32.const 16 i32.const 685 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -18588,7 +18586,7 @@ i32.const 16 i32.const 686 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -18603,7 +18601,7 @@ i32.const 16 i32.const 689 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -18618,7 +18616,7 @@ i32.const 16 i32.const 690 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -18633,7 +18631,7 @@ i32.const 16 i32.const 691 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -18649,7 +18647,7 @@ i32.const 16 i32.const 692 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -18664,7 +18662,7 @@ i32.const 16 i32.const 693 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -18679,7 +18677,7 @@ i32.const 16 i32.const 694 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -18694,7 +18692,7 @@ i32.const 16 i32.const 695 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -18709,7 +18707,7 @@ i32.const 16 i32.const 696 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -18724,7 +18722,7 @@ i32.const 16 i32.const 697 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -18740,7 +18738,7 @@ i32.const 16 i32.const 698 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -18755,7 +18753,7 @@ i32.const 16 i32.const 699 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -18770,7 +18768,7 @@ i32.const 16 i32.const 700 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -18785,7 +18783,7 @@ i32.const 16 i32.const 701 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -18800,7 +18798,7 @@ i32.const 16 i32.const 702 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -18815,7 +18813,7 @@ i32.const 16 i32.const 703 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -18830,7 +18828,7 @@ i32.const 16 i32.const 704 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -18845,7 +18843,7 @@ i32.const 16 i32.const 705 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -18860,7 +18858,7 @@ i32.const 16 i32.const 706 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -18876,7 +18874,7 @@ i32.const 16 i32.const 707 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -18892,7 +18890,7 @@ i32.const 16 i32.const 708 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -18907,7 +18905,7 @@ i32.const 16 i32.const 709 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -18923,7 +18921,7 @@ i32.const 16 i32.const 710 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -18938,7 +18936,7 @@ i32.const 16 i32.const 711 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -18954,7 +18952,7 @@ i32.const 16 i32.const 712 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -18970,7 +18968,7 @@ i32.const 16 i32.const 713 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -18987,7 +18985,7 @@ i32.const 16 i32.const 714 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1125369292536007e-308 @@ -19004,7 +19002,7 @@ i32.const 16 i32.const 715 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -19021,7 +19019,7 @@ i32.const 16 i32.const 716 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -19038,7 +19036,7 @@ i32.const 16 i32.const 717 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -19053,7 +19051,7 @@ i32.const 16 i32.const 718 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -19068,7 +19066,7 @@ i32.const 16 i32.const 727 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -19083,7 +19081,7 @@ i32.const 16 i32.const 728 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -19098,7 +19096,7 @@ i32.const 16 i32.const 729 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -19113,7 +19111,7 @@ i32.const 16 i32.const 730 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -19128,7 +19126,7 @@ i32.const 16 i32.const 731 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -19143,7 +19141,7 @@ i32.const 16 i32.const 732 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -19158,7 +19156,7 @@ i32.const 16 i32.const 733 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -19173,7 +19171,7 @@ i32.const 16 i32.const 734 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -19188,7 +19186,7 @@ i32.const 16 i32.const 735 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -19203,7 +19201,7 @@ i32.const 16 i32.const 736 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -19218,7 +19216,7 @@ i32.const 16 i32.const 739 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -19233,7 +19231,7 @@ i32.const 16 i32.const 740 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -19248,7 +19246,7 @@ i32.const 16 i32.const 741 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -19264,7 +19262,7 @@ i32.const 16 i32.const 742 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -19279,7 +19277,7 @@ i32.const 16 i32.const 743 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -19294,7 +19292,7 @@ i32.const 16 i32.const 744 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -19309,7 +19307,7 @@ i32.const 16 i32.const 745 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -19324,7 +19322,7 @@ i32.const 16 i32.const 746 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -19339,7 +19337,7 @@ i32.const 16 i32.const 747 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -19355,7 +19353,7 @@ i32.const 16 i32.const 748 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -19370,7 +19368,7 @@ i32.const 16 i32.const 749 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -19385,7 +19383,7 @@ i32.const 16 i32.const 750 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -19400,7 +19398,7 @@ i32.const 16 i32.const 751 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -19415,7 +19413,7 @@ i32.const 16 i32.const 752 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -19430,7 +19428,7 @@ i32.const 16 i32.const 753 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -19445,7 +19443,7 @@ i32.const 16 i32.const 754 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -19460,7 +19458,7 @@ i32.const 16 i32.const 755 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -19475,7 +19473,7 @@ i32.const 16 i32.const 756 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -19491,7 +19489,7 @@ i32.const 16 i32.const 757 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -19507,7 +19505,7 @@ i32.const 16 i32.const 758 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -19522,7 +19520,7 @@ i32.const 16 i32.const 759 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -19538,7 +19536,7 @@ i32.const 16 i32.const 760 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -19553,7 +19551,7 @@ i32.const 16 i32.const 761 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -19569,7 +19567,7 @@ i32.const 16 i32.const 762 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -19585,7 +19583,7 @@ i32.const 16 i32.const 763 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -19602,7 +19600,7 @@ i32.const 16 i32.const 764 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -19619,7 +19617,7 @@ i32.const 16 i32.const 765 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -19636,7 +19634,7 @@ i32.const 16 i32.const 766 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -19650,7 +19648,7 @@ i32.const 16 i32.const 778 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -19664,7 +19662,7 @@ i32.const 16 i32.const 779 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -19678,7 +19676,7 @@ i32.const 16 i32.const 780 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -19692,7 +19690,7 @@ i32.const 16 i32.const 781 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -19706,7 +19704,7 @@ i32.const 16 i32.const 782 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -19720,7 +19718,7 @@ i32.const 16 i32.const 783 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -19734,7 +19732,7 @@ i32.const 16 i32.const 784 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -19748,7 +19746,7 @@ i32.const 16 i32.const 785 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -19762,7 +19760,7 @@ i32.const 16 i32.const 786 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -19776,7 +19774,7 @@ i32.const 16 i32.const 787 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -19790,7 +19788,7 @@ i32.const 16 i32.const 790 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -19804,7 +19802,7 @@ i32.const 16 i32.const 791 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -19820,7 +19818,7 @@ i32.const 16 i32.const 792 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -19834,7 +19832,7 @@ i32.const 16 i32.const 793 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -19848,7 +19846,7 @@ i32.const 16 i32.const 794 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.313225746154785e-10 @@ -19862,7 +19860,7 @@ i32.const 16 i32.const 795 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -9.313225746154785e-10 @@ -19876,7 +19874,7 @@ i32.const 16 i32.const 796 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -19890,7 +19888,7 @@ i32.const 16 i32.const 797 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -19904,7 +19902,7 @@ i32.const 16 i32.const 798 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8 @@ -19918,7 +19916,7 @@ i32.const 16 i32.const 799 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -19932,7 +19930,7 @@ i32.const 16 i32.const 808 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -19946,7 +19944,7 @@ i32.const 16 i32.const 809 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -19960,7 +19958,7 @@ i32.const 16 i32.const 810 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -19974,7 +19972,7 @@ i32.const 16 i32.const 811 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -19988,7 +19986,7 @@ i32.const 16 i32.const 812 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -20002,7 +20000,7 @@ i32.const 16 i32.const 813 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -20016,7 +20014,7 @@ i32.const 16 i32.const 814 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -20030,7 +20028,7 @@ i32.const 16 i32.const 815 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -20044,7 +20042,7 @@ i32.const 16 i32.const 816 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -20058,7 +20056,7 @@ i32.const 16 i32.const 817 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -20072,7 +20070,7 @@ i32.const 16 i32.const 820 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -20086,7 +20084,7 @@ i32.const 16 i32.const 821 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -20102,7 +20100,7 @@ i32.const 16 i32.const 822 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -20116,7 +20114,7 @@ i32.const 16 i32.const 823 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -20130,7 +20128,7 @@ i32.const 16 i32.const 824 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.313225746154785e-10 @@ -20144,7 +20142,7 @@ i32.const 16 i32.const 825 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -9.313225746154785e-10 @@ -20158,7 +20156,7 @@ i32.const 16 i32.const 826 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -20172,7 +20170,7 @@ i32.const 16 i32.const 827 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -20186,7 +20184,7 @@ i32.const 16 i32.const 828 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 8 @@ -20200,7 +20198,7 @@ i32.const 16 i32.const 829 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -20214,7 +20212,7 @@ i32.const 16 i32.const 841 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -20228,7 +20226,7 @@ i32.const 16 i32.const 842 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -20242,7 +20240,7 @@ i32.const 16 i32.const 843 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -20256,7 +20254,7 @@ i32.const 16 i32.const 844 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -20270,7 +20268,7 @@ i32.const 16 i32.const 845 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -20284,7 +20282,7 @@ i32.const 16 i32.const 846 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -20298,7 +20296,7 @@ i32.const 16 i32.const 847 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -20312,7 +20310,7 @@ i32.const 16 i32.const 848 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -20326,7 +20324,7 @@ i32.const 16 i32.const 849 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -20340,7 +20338,7 @@ i32.const 16 i32.const 850 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -20354,7 +20352,7 @@ i32.const 16 i32.const 853 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -20368,7 +20366,7 @@ i32.const 16 i32.const 854 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -20384,7 +20382,7 @@ i32.const 16 i32.const 855 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -20398,7 +20396,7 @@ i32.const 16 i32.const 856 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -20412,7 +20410,7 @@ i32.const 16 i32.const 857 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -20426,7 +20424,7 @@ i32.const 16 i32.const 858 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -20440,7 +20438,7 @@ i32.const 16 i32.const 859 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -20454,7 +20452,7 @@ i32.const 16 i32.const 860 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -20468,7 +20466,7 @@ i32.const 16 i32.const 861 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -20482,7 +20480,7 @@ i32.const 16 i32.const 862 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -20496,7 +20494,7 @@ i32.const 16 i32.const 863 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -20510,7 +20508,7 @@ i32.const 16 i32.const 864 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -20524,7 +20522,7 @@ i32.const 16 i32.const 865 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -20538,7 +20536,7 @@ i32.const 16 i32.const 866 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -20552,7 +20550,7 @@ i32.const 16 i32.const 867 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -20566,7 +20564,7 @@ i32.const 16 i32.const 868 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -20580,7 +20578,7 @@ i32.const 16 i32.const 869 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -20596,7 +20594,7 @@ i32.const 16 i32.const 870 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -20610,7 +20608,7 @@ i32.const 16 i32.const 871 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -20624,7 +20622,7 @@ i32.const 16 i32.const 872 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -20638,7 +20636,7 @@ i32.const 16 i32.const 873 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -20652,7 +20650,7 @@ i32.const 16 i32.const 874 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -20666,7 +20664,7 @@ i32.const 16 i32.const 875 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -20680,7 +20678,7 @@ i32.const 16 i32.const 876 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -20694,7 +20692,7 @@ i32.const 16 i32.const 877 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -20708,7 +20706,7 @@ i32.const 16 i32.const 878 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -20722,7 +20720,7 @@ i32.const 16 i32.const 879 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -20736,7 +20734,7 @@ i32.const 16 i32.const 880 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -20750,7 +20748,7 @@ i32.const 16 i32.const 881 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -20764,7 +20762,7 @@ i32.const 16 i32.const 882 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -20778,7 +20776,7 @@ i32.const 16 i32.const 883 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -20792,7 +20790,7 @@ i32.const 16 i32.const 884 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -20808,7 +20806,7 @@ i32.const 16 i32.const 885 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -20822,7 +20820,7 @@ i32.const 16 i32.const 886 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -20836,7 +20834,7 @@ i32.const 16 i32.const 887 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -20850,7 +20848,7 @@ i32.const 16 i32.const 888 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -20864,7 +20862,7 @@ i32.const 16 i32.const 889 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -20878,7 +20876,7 @@ i32.const 16 i32.const 890 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -20892,7 +20890,7 @@ i32.const 16 i32.const 891 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -20906,7 +20904,7 @@ i32.const 16 i32.const 892 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -20920,7 +20918,7 @@ i32.const 16 i32.const 893 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -20934,7 +20932,7 @@ i32.const 16 i32.const 894 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -20948,7 +20946,7 @@ i32.const 16 i32.const 895 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -20962,7 +20960,7 @@ i32.const 16 i32.const 896 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -20976,7 +20974,7 @@ i32.const 16 i32.const 897 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -20990,7 +20988,7 @@ i32.const 16 i32.const 906 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -21004,7 +21002,7 @@ i32.const 16 i32.const 907 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -21018,7 +21016,7 @@ i32.const 16 i32.const 908 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -21032,7 +21030,7 @@ i32.const 16 i32.const 909 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -21046,7 +21044,7 @@ i32.const 16 i32.const 910 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -21060,7 +21058,7 @@ i32.const 16 i32.const 911 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -21074,7 +21072,7 @@ i32.const 16 i32.const 912 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -21088,7 +21086,7 @@ i32.const 16 i32.const 913 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -21102,7 +21100,7 @@ i32.const 16 i32.const 914 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -21116,7 +21114,7 @@ i32.const 16 i32.const 915 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -21130,7 +21128,7 @@ i32.const 16 i32.const 918 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -21144,7 +21142,7 @@ i32.const 16 i32.const 919 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -21160,7 +21158,7 @@ i32.const 16 i32.const 920 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -21174,7 +21172,7 @@ i32.const 16 i32.const 921 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -21188,7 +21186,7 @@ i32.const 16 i32.const 922 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -21202,7 +21200,7 @@ i32.const 16 i32.const 923 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -21216,7 +21214,7 @@ i32.const 16 i32.const 924 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -21230,7 +21228,7 @@ i32.const 16 i32.const 925 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -21244,7 +21242,7 @@ i32.const 16 i32.const 926 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -21258,7 +21256,7 @@ i32.const 16 i32.const 927 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -21272,7 +21270,7 @@ i32.const 16 i32.const 928 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -21286,7 +21284,7 @@ i32.const 16 i32.const 929 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -21300,7 +21298,7 @@ i32.const 16 i32.const 930 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -21314,7 +21312,7 @@ i32.const 16 i32.const 931 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -21328,7 +21326,7 @@ i32.const 16 i32.const 932 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -21342,7 +21340,7 @@ i32.const 16 i32.const 933 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -21356,7 +21354,7 @@ i32.const 16 i32.const 934 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -21372,7 +21370,7 @@ i32.const 16 i32.const 935 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -21386,7 +21384,7 @@ i32.const 16 i32.const 936 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -21400,7 +21398,7 @@ i32.const 16 i32.const 937 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -21414,7 +21412,7 @@ i32.const 16 i32.const 938 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -21428,7 +21426,7 @@ i32.const 16 i32.const 939 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -21442,7 +21440,7 @@ i32.const 16 i32.const 940 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -21456,7 +21454,7 @@ i32.const 16 i32.const 941 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -21470,7 +21468,7 @@ i32.const 16 i32.const 942 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -21484,7 +21482,7 @@ i32.const 16 i32.const 943 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -21498,7 +21496,7 @@ i32.const 16 i32.const 944 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -21512,7 +21510,7 @@ i32.const 16 i32.const 945 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -21526,7 +21524,7 @@ i32.const 16 i32.const 946 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -21540,7 +21538,7 @@ i32.const 16 i32.const 947 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -21554,7 +21552,7 @@ i32.const 16 i32.const 948 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -21568,7 +21566,7 @@ i32.const 16 i32.const 949 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -21584,7 +21582,7 @@ i32.const 16 i32.const 950 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -21598,7 +21596,7 @@ i32.const 16 i32.const 951 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -21612,7 +21610,7 @@ i32.const 16 i32.const 952 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -21626,7 +21624,7 @@ i32.const 16 i32.const 953 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -21640,7 +21638,7 @@ i32.const 16 i32.const 954 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -21654,7 +21652,7 @@ i32.const 16 i32.const 955 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -21668,7 +21666,7 @@ i32.const 16 i32.const 956 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -21682,7 +21680,7 @@ i32.const 16 i32.const 957 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -21696,7 +21694,7 @@ i32.const 16 i32.const 958 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -21710,7 +21708,7 @@ i32.const 16 i32.const 959 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -21724,7 +21722,7 @@ i32.const 16 i32.const 960 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -21738,7 +21736,7 @@ i32.const 16 i32.const 961 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -21752,7 +21750,7 @@ i32.const 16 i32.const 962 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -21766,7 +21764,7 @@ i32.const 16 i32.const 1073 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -21780,7 +21778,7 @@ i32.const 16 i32.const 1074 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -21794,7 +21792,7 @@ i32.const 16 i32.const 1075 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -21808,7 +21806,7 @@ i32.const 16 i32.const 1076 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -21822,7 +21820,7 @@ i32.const 16 i32.const 1077 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -21836,7 +21834,7 @@ i32.const 16 i32.const 1078 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -21850,7 +21848,7 @@ i32.const 16 i32.const 1079 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -21864,7 +21862,7 @@ i32.const 16 i32.const 1080 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -21878,7 +21876,7 @@ i32.const 16 i32.const 1081 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -21892,7 +21890,7 @@ i32.const 16 i32.const 1082 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -21906,7 +21904,7 @@ i32.const 16 i32.const 1085 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -21920,7 +21918,7 @@ i32.const 16 i32.const 1086 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -21934,7 +21932,7 @@ i32.const 16 i32.const 1087 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -21949,7 +21947,7 @@ i32.const 16 i32.const 1088 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -21963,7 +21961,7 @@ i32.const 16 i32.const 1089 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.862645149230957e-09 @@ -21977,7 +21975,7 @@ i32.const 16 i32.const 1092 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.862645149230957e-09 @@ -21991,7 +21989,7 @@ i32.const 16 i32.const 1093 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754943508222875e-38 @@ -22005,7 +22003,7 @@ i32.const 16 i32.const 1094 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754943508222875e-38 @@ -22019,7 +22017,7 @@ i32.const 16 i32.const 1095 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -22033,7 +22031,7 @@ i32.const 16 i32.const 1096 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.401298464324817e-45 @@ -22047,7 +22045,7 @@ i32.const 16 i32.const 1097 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.802596928649634e-45 @@ -22061,7 +22059,7 @@ i32.const 16 i32.const 1098 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.2611686178923354e-44 @@ -22075,7 +22073,7 @@ i32.const 16 i32.const 1099 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.938735877055719e-39 @@ -22089,7 +22087,7 @@ i32.const 16 i32.const 1100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -22103,7 +22101,7 @@ i32.const 16 i32.const 1101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754940705625946e-38 @@ -22117,7 +22115,7 @@ i32.const 16 i32.const 1102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754942106924411e-38 @@ -22131,7 +22129,7 @@ i32.const 16 i32.const 1103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.175494490952134e-38 @@ -22145,7 +22143,7 @@ i32.const 16 i32.const 1104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754946310819804e-38 @@ -22159,7 +22157,7 @@ i32.const 16 i32.const 1105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509880009953429e-38 @@ -22173,7 +22171,7 @@ i32.const 16 i32.const 1106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.350988701644575e-38 @@ -22187,7 +22185,7 @@ i32.const 16 i32.const 1107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509895424236536e-38 @@ -22201,7 +22199,7 @@ i32.const 16 i32.const 1108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.70197740328915e-38 @@ -22215,7 +22213,7 @@ i32.const 16 i32.const 1109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.450580596923828e-09 @@ -22229,7 +22227,7 @@ i32.const 16 i32.const 1110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.000244140625 @@ -22243,7 +22241,7 @@ i32.const 16 i32.const 1111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.00048828125 @@ -22257,7 +22255,7 @@ i32.const 16 i32.const 1112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.0009765625 @@ -22271,7 +22269,7 @@ i32.const 16 i32.const 1113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.802596928649634e-45 @@ -22285,7 +22283,7 @@ i32.const 16 i32.const 1114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.2611686178923354e-44 @@ -22299,7 +22297,7 @@ i32.const 16 i32.const 1115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.938735877055719e-39 @@ -22313,7 +22311,7 @@ i32.const 16 i32.const 1116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5.877471754111438e-39 @@ -22327,7 +22325,7 @@ i32.const 16 i32.const 1117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754940705625946e-38 @@ -22341,7 +22339,7 @@ i32.const 16 i32.const 1118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754942106924411e-38 @@ -22355,7 +22353,7 @@ i32.const 16 i32.const 1119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.175494490952134e-38 @@ -22369,7 +22367,7 @@ i32.const 16 i32.const 1120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754946310819804e-38 @@ -22383,7 +22381,7 @@ i32.const 16 i32.const 1121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509880009953429e-38 @@ -22397,7 +22395,7 @@ i32.const 16 i32.const 1122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.350988701644575e-38 @@ -22411,7 +22409,7 @@ i32.const 16 i32.const 1123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509895424236536e-38 @@ -22425,7 +22423,7 @@ i32.const 16 i32.const 1124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -4.70197740328915e-38 @@ -22439,7 +22437,7 @@ i32.const 16 i32.const 1125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.450580596923828e-09 @@ -22453,7 +22451,7 @@ i32.const 16 i32.const 1126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.000244140625 @@ -22467,7 +22465,7 @@ i32.const 16 i32.const 1127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.00048828125 @@ -22481,7 +22479,7 @@ i32.const 16 i32.const 1128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.0009765625 @@ -22495,7 +22493,7 @@ i32.const 16 i32.const 1129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 255.99993896484375 @@ -22509,7 +22507,7 @@ i32.const 16 i32.const 1132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5033165 @@ -22523,7 +22521,7 @@ i32.const 16 i32.const 1133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 421657440 @@ -22537,7 +22535,7 @@ i32.const 16 i32.const 1134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2147483392 @@ -22551,7 +22549,7 @@ i32.const 16 i32.const 1135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 68719476736 @@ -22565,7 +22563,7 @@ i32.const 16 i32.const 1136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 549755813888 @@ -22579,7 +22577,7 @@ i32.const 16 i32.const 1137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_VALUE @@ -22593,7 +22591,7 @@ i32.const 16 i32.const 1138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -255.99993896484375 @@ -22607,7 +22605,7 @@ i32.const 16 i32.const 1139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5033165 @@ -22621,7 +22619,7 @@ i32.const 16 i32.const 1140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -421657440 @@ -22635,7 +22633,7 @@ i32.const 16 i32.const 1141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2147483392 @@ -22649,7 +22647,7 @@ i32.const 16 i32.const 1142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -68719476736 @@ -22663,7 +22661,7 @@ i32.const 16 i32.const 1143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -549755813888 @@ -22677,7 +22675,7 @@ i32.const 16 i32.const 1144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_VALUE @@ -22692,7 +22690,7 @@ i32.const 16 i32.const 1145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -22706,7 +22704,7 @@ i32.const 16 i32.const 1156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -22720,7 +22718,7 @@ i32.const 16 i32.const 1157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -22734,7 +22732,7 @@ i32.const 16 i32.const 1158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -22748,7 +22746,7 @@ i32.const 16 i32.const 1159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -22762,7 +22760,7 @@ i32.const 16 i32.const 1160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -22776,7 +22774,7 @@ i32.const 16 i32.const 1161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -22790,7 +22788,7 @@ i32.const 16 i32.const 1162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -22804,7 +22802,7 @@ i32.const 16 i32.const 1163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -22818,7 +22816,7 @@ i32.const 16 i32.const 1164 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -22832,7 +22830,7 @@ i32.const 16 i32.const 1165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -22846,7 +22844,7 @@ i32.const 16 i32.const 1168 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -22860,7 +22858,7 @@ i32.const 16 i32.const 1169 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -22874,7 +22872,7 @@ i32.const 16 i32.const 1170 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -22889,7 +22887,7 @@ i32.const 16 i32.const 1171 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -22903,7 +22901,7 @@ i32.const 16 i32.const 1172 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -22917,7 +22915,7 @@ i32.const 16 i32.const 1181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -22931,7 +22929,7 @@ i32.const 16 i32.const 1182 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -22945,7 +22943,7 @@ i32.const 16 i32.const 1183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -22959,7 +22957,7 @@ i32.const 16 i32.const 1184 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -22973,7 +22971,7 @@ i32.const 16 i32.const 1185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -22987,7 +22985,7 @@ i32.const 16 i32.const 1186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -23001,7 +22999,7 @@ i32.const 16 i32.const 1187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -23015,7 +23013,7 @@ i32.const 16 i32.const 1188 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -23029,7 +23027,7 @@ i32.const 16 i32.const 1189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -23043,7 +23041,7 @@ i32.const 16 i32.const 1190 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -23057,7 +23055,7 @@ i32.const 16 i32.const 1193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -23071,7 +23069,7 @@ i32.const 16 i32.const 1194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -23085,7 +23083,7 @@ i32.const 16 i32.const 1195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -23100,7 +23098,7 @@ i32.const 16 i32.const 1196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -23114,7 +23112,7 @@ i32.const 16 i32.const 1197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -23128,7 +23126,7 @@ i32.const 16 i32.const 1209 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -23142,7 +23140,7 @@ i32.const 16 i32.const 1210 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -23156,7 +23154,7 @@ i32.const 16 i32.const 1211 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -23170,7 +23168,7 @@ i32.const 16 i32.const 1212 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -23184,7 +23182,7 @@ i32.const 16 i32.const 1213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -23198,7 +23196,7 @@ i32.const 16 i32.const 1214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -23212,7 +23210,7 @@ i32.const 16 i32.const 1215 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -23226,7 +23224,7 @@ i32.const 16 i32.const 1216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -23240,7 +23238,7 @@ i32.const 16 i32.const 1217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -23254,7 +23252,7 @@ i32.const 16 i32.const 1218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -23268,7 +23266,7 @@ i32.const 16 i32.const 1221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -23282,7 +23280,7 @@ i32.const 16 i32.const 1222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -23296,7 +23294,7 @@ i32.const 16 i32.const 1223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -23310,7 +23308,7 @@ i32.const 16 i32.const 1224 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -23324,7 +23322,7 @@ i32.const 16 i32.const 1225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -23339,7 +23337,7 @@ i32.const 16 i32.const 1226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -23353,7 +23351,7 @@ i32.const 16 i32.const 1227 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0397214889526365 @@ -23367,7 +23365,7 @@ i32.const 16 i32.const 1228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0397214889526365 @@ -23381,7 +23379,7 @@ i32.const 16 i32.const 1229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0397210121154785 @@ -23395,7 +23393,7 @@ i32.const 16 i32.const 1230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0397214889526367 @@ -23409,7 +23407,7 @@ i32.const 16 i32.const 1231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_VALUE @@ -23423,7 +23421,7 @@ i32.const 16 i32.const 1234 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_VALUE @@ -23438,7 +23436,7 @@ i32.const 16 i32.const 1235 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4649454530587146735 @@ -23455,7 +23453,7 @@ i32.const 16 i32.const 1237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4649454530587146736 @@ -23472,7 +23470,7 @@ i32.const 16 i32.const 1244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -4573606559926636463 @@ -23490,7 +23488,7 @@ i32.const 16 i32.const 1245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -4573606559926636462 @@ -23508,7 +23506,7 @@ i32.const 16 i32.const 1252 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -4573929700241785646 @@ -23525,7 +23523,7 @@ i32.const 16 i32.const 1259 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -4573929700241785645 @@ -23544,7 +23542,7 @@ i32.const 16 i32.const 1266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4602685064124656555 @@ -23561,7 +23559,7 @@ i32.const 16 i32.const 1273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4603836184166978885 @@ -23578,7 +23576,7 @@ i32.const 16 i32.const 1280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4605718951180848880 @@ -23595,7 +23593,7 @@ i32.const 16 i32.const 1287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4605835761386121865 @@ -23612,7 +23610,7 @@ i32.const 16 i32.const 1293 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4610006203169397430 @@ -23629,7 +23627,7 @@ i32.const 16 i32.const 1299 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4610219797808568955 @@ -23646,7 +23644,7 @@ i32.const 16 i32.const 1305 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4619182163989041060 @@ -23663,7 +23661,7 @@ i32.const 16 i32.const 1312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4622394943780502425 @@ -23680,7 +23678,7 @@ i32.const 16 i32.const 1319 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4622613550143616215 @@ -23697,7 +23695,7 @@ i32.const 16 i32.const 1326 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4622829325869063755 @@ -23714,7 +23712,7 @@ i32.const 16 i32.const 1333 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4645970351893354075 @@ -23731,7 +23729,7 @@ i32.const 16 i32.const 1340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4647695036380671130 @@ -23748,7 +23746,7 @@ i32.const 16 i32.const 1347 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -4819432143425896336 @@ -23765,7 +23763,7 @@ i32.const 16 i32.const 1354 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -4819256221565452171 @@ -23782,7 +23780,7 @@ i32.const 16 i32.const 1361 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -23796,7 +23794,7 @@ i32.const 16 i32.const 1375 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -23810,7 +23808,7 @@ i32.const 16 i32.const 1376 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -23824,7 +23822,7 @@ i32.const 16 i32.const 1377 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -23838,7 +23836,7 @@ i32.const 16 i32.const 1378 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -23852,7 +23850,7 @@ i32.const 16 i32.const 1379 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -23866,7 +23864,7 @@ i32.const 16 i32.const 1380 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -23880,7 +23878,7 @@ i32.const 16 i32.const 1381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -23894,7 +23892,7 @@ i32.const 16 i32.const 1382 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -23908,7 +23906,7 @@ i32.const 16 i32.const 1383 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -23922,7 +23920,7 @@ i32.const 16 i32.const 1384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -23936,7 +23934,7 @@ i32.const 16 i32.const 1387 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -23950,7 +23948,7 @@ i32.const 16 i32.const 1388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -23964,7 +23962,7 @@ i32.const 16 i32.const 1389 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -23978,7 +23976,7 @@ i32.const 16 i32.const 1390 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -23992,7 +23990,7 @@ i32.const 16 i32.const 1391 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -24007,7 +24005,7 @@ i32.const 16 i32.const 1392 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -24021,7 +24019,7 @@ i32.const 16 i32.const 1393 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 88.72283172607422 @@ -24035,7 +24033,7 @@ i32.const 16 i32.const 1394 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 88.72283935546875 @@ -24051,7 +24049,7 @@ i32.const 16 i32.const 1395 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -103.97207641601562 @@ -24067,7 +24065,7 @@ i32.const 16 i32.const 1396 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -103.97208404541016 @@ -24083,7 +24081,7 @@ i32.const 16 i32.const 1397 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.3465735614299774 @@ -24097,7 +24095,7 @@ i32.const 16 i32.const 1398 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.3465735912322998 @@ -24111,7 +24109,7 @@ i32.const 16 i32.const 1399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.3465736210346222 @@ -24125,7 +24123,7 @@ i32.const 16 i32.const 1400 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -24139,7 +24137,7 @@ i32.const 16 i32.const 1412 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -24153,7 +24151,7 @@ i32.const 16 i32.const 1413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -24167,7 +24165,7 @@ i32.const 16 i32.const 1414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -24181,7 +24179,7 @@ i32.const 16 i32.const 1415 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -24195,7 +24193,7 @@ i32.const 16 i32.const 1416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -24209,7 +24207,7 @@ i32.const 16 i32.const 1417 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -24223,7 +24221,7 @@ i32.const 16 i32.const 1418 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -24237,7 +24235,7 @@ i32.const 16 i32.const 1419 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -24251,7 +24249,7 @@ i32.const 16 i32.const 1420 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -24265,7 +24263,7 @@ i32.const 16 i32.const 1421 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -24279,7 +24277,7 @@ i32.const 16 i32.const 1424 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -24293,7 +24291,7 @@ i32.const 16 i32.const 1425 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -24307,7 +24305,7 @@ i32.const 16 i32.const 1426 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -24321,7 +24319,7 @@ i32.const 16 i32.const 1427 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24335,7 +24333,7 @@ i32.const 16 i32.const 1428 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24350,7 +24348,7 @@ i32.const 16 i32.const 1429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -24364,7 +24362,7 @@ i32.const 16 i32.const 1430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507201e-308 @@ -24380,7 +24378,7 @@ i32.const 16 i32.const 1431 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2.225073858507201e-308 @@ -24396,7 +24394,7 @@ i32.const 16 i32.const 1432 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -24410,7 +24408,7 @@ i32.const 16 i32.const 1441 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -24424,7 +24422,7 @@ i32.const 16 i32.const 1442 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -24438,7 +24436,7 @@ i32.const 16 i32.const 1443 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -24452,7 +24450,7 @@ i32.const 16 i32.const 1444 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -24466,7 +24464,7 @@ i32.const 16 i32.const 1445 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -24480,7 +24478,7 @@ i32.const 16 i32.const 1446 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -24494,7 +24492,7 @@ i32.const 16 i32.const 1447 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -24508,7 +24506,7 @@ i32.const 16 i32.const 1448 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -24522,7 +24520,7 @@ i32.const 16 i32.const 1449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -24536,7 +24534,7 @@ i32.const 16 i32.const 1450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -24550,7 +24548,7 @@ i32.const 16 i32.const 1453 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -24564,7 +24562,7 @@ i32.const 16 i32.const 1454 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -24578,7 +24576,7 @@ i32.const 16 i32.const 1455 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -24592,7 +24590,7 @@ i32.const 16 i32.const 1456 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -24606,7 +24604,7 @@ i32.const 16 i32.const 1457 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -24621,7 +24619,7 @@ i32.const 16 i32.const 1458 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -24635,7 +24633,7 @@ i32.const 16 i32.const 1459 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -24649,7 +24647,7 @@ i32.const 16 i32.const 1471 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -24663,7 +24661,7 @@ i32.const 16 i32.const 1472 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -24677,7 +24675,7 @@ i32.const 16 i32.const 1473 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -24691,7 +24689,7 @@ i32.const 16 i32.const 1474 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -24705,7 +24703,7 @@ i32.const 16 i32.const 1475 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -24719,7 +24717,7 @@ i32.const 16 i32.const 1476 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -24733,7 +24731,7 @@ i32.const 16 i32.const 1477 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -24747,7 +24745,7 @@ i32.const 16 i32.const 1478 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -24761,7 +24759,7 @@ i32.const 16 i32.const 1479 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -24775,7 +24773,7 @@ i32.const 16 i32.const 1480 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -24789,7 +24787,7 @@ i32.const 16 i32.const 1483 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24803,7 +24801,7 @@ i32.const 16 i32.const 1484 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24819,7 +24817,7 @@ i32.const 16 i32.const 1485 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -24833,7 +24831,7 @@ i32.const 16 i32.const 1486 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -24847,7 +24845,7 @@ i32.const 16 i32.const 1487 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -24861,7 +24859,7 @@ i32.const 16 i32.const 1488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -24875,7 +24873,7 @@ i32.const 16 i32.const 1489 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -24889,7 +24887,7 @@ i32.const 16 i32.const 1490 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -24903,7 +24901,7 @@ i32.const 16 i32.const 1491 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -24917,7 +24915,7 @@ i32.const 16 i32.const 1492 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -24931,7 +24929,7 @@ i32.const 16 i32.const 1493 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -24945,7 +24943,7 @@ i32.const 16 i32.const 1494 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -24959,7 +24957,7 @@ i32.const 16 i32.const 1495 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -24973,7 +24971,7 @@ i32.const 16 i32.const 1496 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -24987,7 +24985,7 @@ i32.const 16 i32.const 1497 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -25001,7 +24999,7 @@ i32.const 16 i32.const 1506 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -25015,7 +25013,7 @@ i32.const 16 i32.const 1507 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -25029,7 +25027,7 @@ i32.const 16 i32.const 1508 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -25043,7 +25041,7 @@ i32.const 16 i32.const 1509 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -25057,7 +25055,7 @@ i32.const 16 i32.const 1510 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -25071,7 +25069,7 @@ i32.const 16 i32.const 1511 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -25085,7 +25083,7 @@ i32.const 16 i32.const 1512 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -25099,7 +25097,7 @@ i32.const 16 i32.const 1513 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -25113,7 +25111,7 @@ i32.const 16 i32.const 1514 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -25127,7 +25125,7 @@ i32.const 16 i32.const 1515 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -25141,7 +25139,7 @@ i32.const 16 i32.const 1518 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25155,7 +25153,7 @@ i32.const 16 i32.const 1519 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25171,7 +25169,7 @@ i32.const 16 i32.const 1520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -25185,7 +25183,7 @@ i32.const 16 i32.const 1521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -25199,7 +25197,7 @@ i32.const 16 i32.const 1522 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -25213,7 +25211,7 @@ i32.const 16 i32.const 1523 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -25227,7 +25225,7 @@ i32.const 16 i32.const 1524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -25241,7 +25239,7 @@ i32.const 16 i32.const 1525 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -25255,7 +25253,7 @@ i32.const 16 i32.const 1526 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -25269,7 +25267,7 @@ i32.const 16 i32.const 1527 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -25283,7 +25281,7 @@ i32.const 16 i32.const 1528 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -25297,7 +25295,7 @@ i32.const 16 i32.const 1529 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -25311,7 +25309,7 @@ i32.const 16 i32.const 1530 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -25325,7 +25323,7 @@ i32.const 16 i32.const 1531 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -25339,7 +25337,7 @@ i32.const 16 i32.const 1532 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -25354,7 +25352,7 @@ i32.const 16 i32.const 1544 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -25369,7 +25367,7 @@ i32.const 16 i32.const 1545 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -25384,7 +25382,7 @@ i32.const 16 i32.const 1546 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -25399,7 +25397,7 @@ i32.const 16 i32.const 1547 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -25414,7 +25412,7 @@ i32.const 16 i32.const 1548 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -25429,7 +25427,7 @@ i32.const 16 i32.const 1549 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -25444,7 +25442,7 @@ i32.const 16 i32.const 1550 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -25459,7 +25457,7 @@ i32.const 16 i32.const 1551 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -25474,7 +25472,7 @@ i32.const 16 i32.const 1552 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -25489,7 +25487,7 @@ i32.const 16 i32.const 1553 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3 @@ -25504,7 +25502,7 @@ i32.const 16 i32.const 1556 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -25519,7 +25517,7 @@ i32.const 16 i32.const 1557 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4 @@ -25534,7 +25532,7 @@ i32.const 16 i32.const 1558 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4 @@ -25549,7 +25547,7 @@ i32.const 16 i32.const 1559 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -25564,7 +25562,7 @@ i32.const 16 i32.const 1560 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -25579,7 +25577,7 @@ i32.const 16 i32.const 1561 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -25594,7 +25592,7 @@ i32.const 16 i32.const 1562 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -25609,7 +25607,7 @@ i32.const 16 i32.const 1563 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -25624,7 +25622,7 @@ i32.const 16 i32.const 1564 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -25639,7 +25637,7 @@ i32.const 16 i32.const 1565 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -25654,7 +25652,7 @@ i32.const 16 i32.const 1566 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -25669,7 +25667,7 @@ i32.const 16 i32.const 1567 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -25684,7 +25682,7 @@ i32.const 16 i32.const 1568 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -25700,7 +25698,7 @@ i32.const 16 i32.const 1569 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -25716,7 +25714,7 @@ i32.const 16 i32.const 1570 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -25732,7 +25730,7 @@ i32.const 16 i32.const 1571 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -25748,7 +25746,7 @@ i32.const 16 i32.const 1572 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -25763,7 +25761,7 @@ i32.const 16 i32.const 1573 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -25778,7 +25776,7 @@ i32.const 16 i32.const 1574 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -25793,7 +25791,7 @@ i32.const 16 i32.const 1583 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -25808,7 +25806,7 @@ i32.const 16 i32.const 1584 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -25823,7 +25821,7 @@ i32.const 16 i32.const 1585 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -25838,7 +25836,7 @@ i32.const 16 i32.const 1586 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -25853,7 +25851,7 @@ i32.const 16 i32.const 1587 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -25868,7 +25866,7 @@ i32.const 16 i32.const 1588 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -25883,7 +25881,7 @@ i32.const 16 i32.const 1589 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -25898,7 +25896,7 @@ i32.const 16 i32.const 1590 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -25913,7 +25911,7 @@ i32.const 16 i32.const 1591 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -25928,7 +25926,7 @@ i32.const 16 i32.const 1592 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -25943,7 +25941,7 @@ i32.const 16 i32.const 1595 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -25958,7 +25956,7 @@ i32.const 16 i32.const 1596 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4 @@ -25973,7 +25971,7 @@ i32.const 16 i32.const 1597 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4 @@ -25988,7 +25986,7 @@ i32.const 16 i32.const 1598 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -26003,7 +26001,7 @@ i32.const 16 i32.const 1599 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -26018,7 +26016,7 @@ i32.const 16 i32.const 1600 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -26033,7 +26031,7 @@ i32.const 16 i32.const 1601 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -26048,7 +26046,7 @@ i32.const 16 i32.const 1602 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -26063,7 +26061,7 @@ i32.const 16 i32.const 1603 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -26078,7 +26076,7 @@ i32.const 16 i32.const 1604 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -26093,7 +26091,7 @@ i32.const 16 i32.const 1605 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -26108,7 +26106,7 @@ i32.const 16 i32.const 1606 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -26123,7 +26121,7 @@ i32.const 16 i32.const 1607 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -26139,7 +26137,7 @@ i32.const 16 i32.const 1608 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -26155,7 +26153,7 @@ i32.const 16 i32.const 1609 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -26171,7 +26169,7 @@ i32.const 16 i32.const 1610 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -26187,7 +26185,7 @@ i32.const 16 i32.const 1611 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -26202,7 +26200,7 @@ i32.const 16 i32.const 1612 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -26217,7 +26215,7 @@ i32.const 16 i32.const 1613 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -26231,7 +26229,7 @@ i32.const 16 i32.const 1625 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -26245,7 +26243,7 @@ i32.const 16 i32.const 1626 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -26259,7 +26257,7 @@ i32.const 16 i32.const 1627 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -26273,7 +26271,7 @@ i32.const 16 i32.const 1628 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -26287,7 +26285,7 @@ i32.const 16 i32.const 1629 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -26301,7 +26299,7 @@ i32.const 16 i32.const 1630 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -26315,7 +26313,7 @@ i32.const 16 i32.const 1631 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -26329,7 +26327,7 @@ i32.const 16 i32.const 1632 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -26343,7 +26341,7 @@ i32.const 16 i32.const 1633 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -26357,7 +26355,7 @@ i32.const 16 i32.const 1634 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -26372,7 +26370,7 @@ i32.const 16 i32.const 1637 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -26387,7 +26385,7 @@ i32.const 16 i32.const 1638 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -26401,7 +26399,7 @@ i32.const 16 i32.const 1639 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -26415,7 +26413,7 @@ i32.const 16 i32.const 1640 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -26429,7 +26427,7 @@ i32.const 16 i32.const 1641 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26443,7 +26441,7 @@ i32.const 16 i32.const 1642 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26458,7 +26456,7 @@ i32.const 16 i32.const 1643 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -26472,7 +26470,7 @@ i32.const 16 i32.const 1644 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -26487,7 +26485,7 @@ i32.const 16 i32.const 1653 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -26502,7 +26500,7 @@ i32.const 16 i32.const 1654 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -26516,7 +26514,7 @@ i32.const 16 i32.const 1655 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -26530,7 +26528,7 @@ i32.const 16 i32.const 1656 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -26544,7 +26542,7 @@ i32.const 16 i32.const 1657 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -26558,7 +26556,7 @@ i32.const 16 i32.const 1658 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -26573,7 +26571,7 @@ i32.const 16 i32.const 1659 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -26587,7 +26585,7 @@ i32.const 16 i32.const 1660 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -26602,7 +26600,7 @@ i32.const 16 i32.const 1663 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -26617,7 +26615,7 @@ i32.const 16 i32.const 1664 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -26631,7 +26629,7 @@ i32.const 16 i32.const 1665 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -26645,7 +26643,7 @@ i32.const 16 i32.const 1666 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -26659,7 +26657,7 @@ i32.const 16 i32.const 1667 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -26673,7 +26671,7 @@ i32.const 16 i32.const 1668 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -26688,7 +26686,7 @@ i32.const 16 i32.const 1669 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -26702,7 +26700,7 @@ i32.const 16 i32.const 1670 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -26716,7 +26714,7 @@ i32.const 16 i32.const 1682 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -26730,7 +26728,7 @@ i32.const 16 i32.const 1683 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -26744,7 +26742,7 @@ i32.const 16 i32.const 1684 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -26758,7 +26756,7 @@ i32.const 16 i32.const 1685 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -26772,7 +26770,7 @@ i32.const 16 i32.const 1686 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -26786,7 +26784,7 @@ i32.const 16 i32.const 1687 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -26800,7 +26798,7 @@ i32.const 16 i32.const 1688 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -26814,7 +26812,7 @@ i32.const 16 i32.const 1689 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -26828,7 +26826,7 @@ i32.const 16 i32.const 1690 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -26842,7 +26840,7 @@ i32.const 16 i32.const 1691 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -26857,7 +26855,7 @@ i32.const 16 i32.const 1694 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -26872,7 +26870,7 @@ i32.const 16 i32.const 1695 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -26886,7 +26884,7 @@ i32.const 16 i32.const 1696 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -26900,7 +26898,7 @@ i32.const 16 i32.const 1697 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -26914,7 +26912,7 @@ i32.const 16 i32.const 1698 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26928,7 +26926,7 @@ i32.const 16 i32.const 1699 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26943,7 +26941,7 @@ i32.const 16 i32.const 1700 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -26957,7 +26955,7 @@ i32.const 16 i32.const 1701 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -26971,7 +26969,7 @@ i32.const 16 i32.const 1710 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -26985,7 +26983,7 @@ i32.const 16 i32.const 1711 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -26999,7 +26997,7 @@ i32.const 16 i32.const 1712 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -27013,7 +27011,7 @@ i32.const 16 i32.const 1713 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -27027,7 +27025,7 @@ i32.const 16 i32.const 1714 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -27041,7 +27039,7 @@ i32.const 16 i32.const 1715 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -27055,7 +27053,7 @@ i32.const 16 i32.const 1716 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -27069,7 +27067,7 @@ i32.const 16 i32.const 1717 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -27083,7 +27081,7 @@ i32.const 16 i32.const 1718 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -27097,7 +27095,7 @@ i32.const 16 i32.const 1719 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -27112,7 +27110,7 @@ i32.const 16 i32.const 1722 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -27127,7 +27125,7 @@ i32.const 16 i32.const 1723 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -27141,7 +27139,7 @@ i32.const 16 i32.const 1724 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -27155,7 +27153,7 @@ i32.const 16 i32.const 1725 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -27169,7 +27167,7 @@ i32.const 16 i32.const 1726 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27183,7 +27181,7 @@ i32.const 16 i32.const 1727 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27198,7 +27196,7 @@ i32.const 16 i32.const 1728 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -27212,7 +27210,7 @@ i32.const 16 i32.const 1729 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -27226,7 +27224,7 @@ i32.const 16 i32.const 1741 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -27240,7 +27238,7 @@ i32.const 16 i32.const 1742 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -27254,7 +27252,7 @@ i32.const 16 i32.const 1743 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -27268,7 +27266,7 @@ i32.const 16 i32.const 1744 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -27282,7 +27280,7 @@ i32.const 16 i32.const 1745 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -27296,7 +27294,7 @@ i32.const 16 i32.const 1746 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -27310,7 +27308,7 @@ i32.const 16 i32.const 1747 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -27324,7 +27322,7 @@ i32.const 16 i32.const 1748 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -27338,7 +27336,7 @@ i32.const 16 i32.const 1749 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -27352,7 +27350,7 @@ i32.const 16 i32.const 1750 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -27366,7 +27364,7 @@ i32.const 16 i32.const 1753 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -27380,7 +27378,7 @@ i32.const 16 i32.const 1754 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -27394,7 +27392,7 @@ i32.const 16 i32.const 1755 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -27408,7 +27406,7 @@ i32.const 16 i32.const 1756 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -27423,7 +27421,7 @@ i32.const 16 i32.const 1757 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -27437,7 +27435,7 @@ i32.const 16 i32.const 1758 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -27452,7 +27450,7 @@ i32.const 16 i32.const 1759 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -27466,7 +27464,7 @@ i32.const 16 i32.const 1760 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -27480,7 +27478,7 @@ i32.const 16 i32.const 1769 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -27494,7 +27492,7 @@ i32.const 16 i32.const 1770 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -27508,7 +27506,7 @@ i32.const 16 i32.const 1771 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -27522,7 +27520,7 @@ i32.const 16 i32.const 1772 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -27536,7 +27534,7 @@ i32.const 16 i32.const 1773 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -27550,7 +27548,7 @@ i32.const 16 i32.const 1774 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -27564,7 +27562,7 @@ i32.const 16 i32.const 1775 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -27578,7 +27576,7 @@ i32.const 16 i32.const 1776 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -27592,7 +27590,7 @@ i32.const 16 i32.const 1777 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -27606,7 +27604,7 @@ i32.const 16 i32.const 1778 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -27620,7 +27618,7 @@ i32.const 16 i32.const 1781 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -27634,7 +27632,7 @@ i32.const 16 i32.const 1782 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -27648,7 +27646,7 @@ i32.const 16 i32.const 1783 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -27662,7 +27660,7 @@ i32.const 16 i32.const 1784 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -27677,7 +27675,7 @@ i32.const 16 i32.const 1785 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27691,7 +27689,7 @@ i32.const 16 i32.const 1786 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27706,7 +27704,7 @@ i32.const 16 i32.const 1787 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -27720,7 +27718,7 @@ i32.const 16 i32.const 1788 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754942106924411e-38 @@ -27736,7 +27734,7 @@ i32.const 16 i32.const 1789 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -27750,7 +27748,7 @@ i32.const 16 i32.const 1801 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -27764,7 +27762,7 @@ i32.const 16 i32.const 1802 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -27778,7 +27776,7 @@ i32.const 16 i32.const 1803 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -27792,7 +27790,7 @@ i32.const 16 i32.const 1804 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -27806,7 +27804,7 @@ i32.const 16 i32.const 1805 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -27820,7 +27818,7 @@ i32.const 16 i32.const 1806 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -27834,7 +27832,7 @@ i32.const 16 i32.const 1807 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -27848,7 +27846,7 @@ i32.const 16 i32.const 1808 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -27862,7 +27860,7 @@ i32.const 16 i32.const 1809 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -27876,7 +27874,7 @@ i32.const 16 i32.const 1810 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -27891,7 +27889,7 @@ i32.const 16 i32.const 1813 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -27906,7 +27904,7 @@ i32.const 16 i32.const 1814 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -27920,7 +27918,7 @@ i32.const 16 i32.const 1815 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -27934,7 +27932,7 @@ i32.const 16 i32.const 1816 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -27948,7 +27946,7 @@ i32.const 16 i32.const 1817 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -27962,7 +27960,7 @@ i32.const 16 i32.const 1818 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -27977,7 +27975,7 @@ i32.const 16 i32.const 1819 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -27991,7 +27989,7 @@ i32.const 16 i32.const 1820 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -28005,7 +28003,7 @@ i32.const 16 i32.const 1829 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -28019,7 +28017,7 @@ i32.const 16 i32.const 1830 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -28033,7 +28031,7 @@ i32.const 16 i32.const 1831 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -28047,7 +28045,7 @@ i32.const 16 i32.const 1832 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -28061,7 +28059,7 @@ i32.const 16 i32.const 1833 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -28075,7 +28073,7 @@ i32.const 16 i32.const 1834 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -28089,7 +28087,7 @@ i32.const 16 i32.const 1835 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -28103,7 +28101,7 @@ i32.const 16 i32.const 1836 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -28117,7 +28115,7 @@ i32.const 16 i32.const 1837 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -28131,7 +28129,7 @@ i32.const 16 i32.const 1838 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -28146,7 +28144,7 @@ i32.const 16 i32.const 1841 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -28161,7 +28159,7 @@ i32.const 16 i32.const 1842 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -28175,7 +28173,7 @@ i32.const 16 i32.const 1843 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -28189,7 +28187,7 @@ i32.const 16 i32.const 1844 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -28203,7 +28201,7 @@ i32.const 16 i32.const 1845 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -28217,7 +28215,7 @@ i32.const 16 i32.const 1846 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -28232,7 +28230,7 @@ i32.const 16 i32.const 1847 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -28246,7 +28244,7 @@ i32.const 16 i32.const 1848 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -28261,7 +28259,7 @@ i32.const 16 i32.const 1860 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -28276,7 +28274,7 @@ i32.const 16 i32.const 1861 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -28291,7 +28289,7 @@ i32.const 16 i32.const 1862 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -28306,7 +28304,7 @@ i32.const 16 i32.const 1863 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -28321,7 +28319,7 @@ i32.const 16 i32.const 1864 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -28336,7 +28334,7 @@ i32.const 16 i32.const 1865 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -28351,7 +28349,7 @@ i32.const 16 i32.const 1866 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -28366,7 +28364,7 @@ i32.const 16 i32.const 1867 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -28381,7 +28379,7 @@ i32.const 16 i32.const 1868 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -28396,7 +28394,7 @@ i32.const 16 i32.const 1869 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28411,7 +28409,7 @@ i32.const 16 i32.const 1872 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28426,7 +28424,7 @@ i32.const 16 i32.const 1873 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -28441,7 +28439,7 @@ i32.const 16 i32.const 1874 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -28456,7 +28454,7 @@ i32.const 16 i32.const 1875 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -28471,7 +28469,7 @@ i32.const 16 i32.const 1876 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -28486,7 +28484,7 @@ i32.const 16 i32.const 1877 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28501,7 +28499,7 @@ i32.const 16 i32.const 1878 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28517,7 +28515,7 @@ i32.const 16 i32.const 1879 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -28532,7 +28530,7 @@ i32.const 16 i32.const 1880 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28547,7 +28545,7 @@ i32.const 16 i32.const 1881 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28562,7 +28560,7 @@ i32.const 16 i32.const 1882 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -28577,7 +28575,7 @@ i32.const 16 i32.const 1883 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -28592,7 +28590,7 @@ i32.const 16 i32.const 1884 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -28607,7 +28605,7 @@ i32.const 16 i32.const 1885 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -28622,7 +28620,7 @@ i32.const 16 i32.const 1886 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28637,7 +28635,7 @@ i32.const 16 i32.const 1887 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28653,7 +28651,7 @@ i32.const 16 i32.const 1888 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -28668,7 +28666,7 @@ i32.const 16 i32.const 1889 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28683,7 +28681,7 @@ i32.const 16 i32.const 1890 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28698,7 +28696,7 @@ i32.const 16 i32.const 1891 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28713,7 +28711,7 @@ i32.const 16 i32.const 1892 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28729,7 +28727,7 @@ i32.const 16 i32.const 1893 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28744,7 +28742,7 @@ i32.const 16 i32.const 1894 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28759,7 +28757,7 @@ i32.const 16 i32.const 1895 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28774,7 +28772,7 @@ i32.const 16 i32.const 1896 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28789,7 +28787,7 @@ i32.const 16 i32.const 1897 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28805,7 +28803,7 @@ i32.const 16 i32.const 1898 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28820,7 +28818,7 @@ i32.const 16 i32.const 1899 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -28835,7 +28833,7 @@ i32.const 16 i32.const 1900 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -28850,7 +28848,7 @@ i32.const 16 i32.const 1901 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28865,7 +28863,7 @@ i32.const 16 i32.const 1902 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28881,7 +28879,7 @@ i32.const 16 i32.const 1903 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -28896,7 +28894,7 @@ i32.const 16 i32.const 1904 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -28911,7 +28909,7 @@ i32.const 16 i32.const 1905 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28926,7 +28924,7 @@ i32.const 16 i32.const 1906 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28942,7 +28940,7 @@ i32.const 16 i32.const 1907 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -28957,7 +28955,7 @@ i32.const 16 i32.const 1908 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28972,7 +28970,7 @@ i32.const 16 i32.const 1909 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28987,7 +28985,7 @@ i32.const 16 i32.const 1910 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -29002,7 +29000,7 @@ i32.const 16 i32.const 1911 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -29018,7 +29016,7 @@ i32.const 16 i32.const 1912 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -29034,7 +29032,7 @@ i32.const 16 i32.const 1913 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -29050,7 +29048,7 @@ i32.const 16 i32.const 1914 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -29065,7 +29063,7 @@ i32.const 16 i32.const 1915 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -29080,7 +29078,7 @@ i32.const 16 i32.const 1916 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -29095,7 +29093,7 @@ i32.const 16 i32.const 1917 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -29110,7 +29108,7 @@ i32.const 16 i32.const 1918 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -29125,7 +29123,7 @@ i32.const 16 i32.const 1919 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -29140,7 +29138,7 @@ i32.const 16 i32.const 1920 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -29156,7 +29154,7 @@ i32.const 16 i32.const 1921 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -29172,7 +29170,7 @@ i32.const 16 i32.const 1922 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -29188,7 +29186,7 @@ i32.const 16 i32.const 1923 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -29204,7 +29202,7 @@ i32.const 16 i32.const 1924 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -29222,7 +29220,7 @@ i32.const 16 i32.const 1925 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -29237,7 +29235,7 @@ i32.const 16 i32.const 1926 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -29252,7 +29250,7 @@ i32.const 16 i32.const 1927 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -29267,7 +29265,7 @@ i32.const 16 i32.const 1928 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -29282,7 +29280,7 @@ i32.const 16 i32.const 1929 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -29297,7 +29295,7 @@ i32.const 16 i32.const 1938 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -29312,7 +29310,7 @@ i32.const 16 i32.const 1939 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -29327,7 +29325,7 @@ i32.const 16 i32.const 1940 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -29342,7 +29340,7 @@ i32.const 16 i32.const 1941 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -29357,7 +29355,7 @@ i32.const 16 i32.const 1942 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -29372,7 +29370,7 @@ i32.const 16 i32.const 1943 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -29387,7 +29385,7 @@ i32.const 16 i32.const 1944 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -29402,7 +29400,7 @@ i32.const 16 i32.const 1945 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -29417,7 +29415,7 @@ i32.const 16 i32.const 1946 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -29432,7 +29430,7 @@ i32.const 16 i32.const 1947 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29447,7 +29445,7 @@ i32.const 16 i32.const 1950 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29462,7 +29460,7 @@ i32.const 16 i32.const 1951 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -29477,7 +29475,7 @@ i32.const 16 i32.const 1952 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -29492,7 +29490,7 @@ i32.const 16 i32.const 1953 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -29507,7 +29505,7 @@ i32.const 16 i32.const 1954 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -29522,7 +29520,7 @@ i32.const 16 i32.const 1955 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29537,7 +29535,7 @@ i32.const 16 i32.const 1956 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29553,7 +29551,7 @@ i32.const 16 i32.const 1957 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -29568,7 +29566,7 @@ i32.const 16 i32.const 1958 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29583,7 +29581,7 @@ i32.const 16 i32.const 1959 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29598,7 +29596,7 @@ i32.const 16 i32.const 1960 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -29613,7 +29611,7 @@ i32.const 16 i32.const 1961 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -29628,7 +29626,7 @@ i32.const 16 i32.const 1962 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -29643,7 +29641,7 @@ i32.const 16 i32.const 1963 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -29658,7 +29656,7 @@ i32.const 16 i32.const 1964 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29673,7 +29671,7 @@ i32.const 16 i32.const 1965 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29689,7 +29687,7 @@ i32.const 16 i32.const 1966 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -29704,7 +29702,7 @@ i32.const 16 i32.const 1967 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29719,7 +29717,7 @@ i32.const 16 i32.const 1968 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29734,7 +29732,7 @@ i32.const 16 i32.const 1969 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29749,7 +29747,7 @@ i32.const 16 i32.const 1970 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29765,7 +29763,7 @@ i32.const 16 i32.const 1971 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29780,7 +29778,7 @@ i32.const 16 i32.const 1972 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29795,7 +29793,7 @@ i32.const 16 i32.const 1973 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29810,7 +29808,7 @@ i32.const 16 i32.const 1974 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29825,7 +29823,7 @@ i32.const 16 i32.const 1975 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29841,7 +29839,7 @@ i32.const 16 i32.const 1976 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29856,7 +29854,7 @@ i32.const 16 i32.const 1977 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -29871,7 +29869,7 @@ i32.const 16 i32.const 1978 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -29886,7 +29884,7 @@ i32.const 16 i32.const 1979 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29901,7 +29899,7 @@ i32.const 16 i32.const 1980 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29917,7 +29915,7 @@ i32.const 16 i32.const 1981 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -29932,7 +29930,7 @@ i32.const 16 i32.const 1982 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -29947,7 +29945,7 @@ i32.const 16 i32.const 1983 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29962,7 +29960,7 @@ i32.const 16 i32.const 1984 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29978,7 +29976,7 @@ i32.const 16 i32.const 1985 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -29993,7 +29991,7 @@ i32.const 16 i32.const 1986 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30008,7 +30006,7 @@ i32.const 16 i32.const 1987 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30023,7 +30021,7 @@ i32.const 16 i32.const 1988 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30038,7 +30036,7 @@ i32.const 16 i32.const 1989 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30054,7 +30052,7 @@ i32.const 16 i32.const 1990 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30070,7 +30068,7 @@ i32.const 16 i32.const 1991 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30086,7 +30084,7 @@ i32.const 16 i32.const 1992 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -30101,7 +30099,7 @@ i32.const 16 i32.const 1993 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -30116,7 +30114,7 @@ i32.const 16 i32.const 1994 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -30131,7 +30129,7 @@ i32.const 16 i32.const 1995 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -30146,7 +30144,7 @@ i32.const 16 i32.const 1996 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -30161,7 +30159,7 @@ i32.const 16 i32.const 1997 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30176,7 +30174,7 @@ i32.const 16 i32.const 1998 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30192,7 +30190,7 @@ i32.const 16 i32.const 1999 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -30208,7 +30206,7 @@ i32.const 16 i32.const 2000 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -30224,7 +30222,7 @@ i32.const 16 i32.const 2001 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30240,7 +30238,7 @@ i32.const 16 i32.const 2002 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30258,7 +30256,7 @@ i32.const 16 i32.const 2003 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -30273,7 +30271,7 @@ i32.const 16 i32.const 2004 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -30288,7 +30286,7 @@ i32.const 16 i32.const 2005 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -30303,7 +30301,7 @@ i32.const 16 i32.const 2006 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -30318,7 +30316,7 @@ i32.const 16 i32.const 2007 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -30333,7 +30331,7 @@ i32.const 16 i32.const 2019 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -30348,7 +30346,7 @@ i32.const 16 i32.const 2020 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -30363,7 +30361,7 @@ i32.const 16 i32.const 2021 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -30378,7 +30376,7 @@ i32.const 16 i32.const 2022 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -30393,7 +30391,7 @@ i32.const 16 i32.const 2023 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -30408,7 +30406,7 @@ i32.const 16 i32.const 2024 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -30423,7 +30421,7 @@ i32.const 16 i32.const 2025 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -30438,7 +30436,7 @@ i32.const 16 i32.const 2026 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -30453,7 +30451,7 @@ i32.const 16 i32.const 2027 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -30468,7 +30466,7 @@ i32.const 16 i32.const 2028 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -30483,7 +30481,7 @@ i32.const 16 i32.const 2031 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30498,7 +30496,7 @@ i32.const 16 i32.const 2032 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -30513,7 +30511,7 @@ i32.const 16 i32.const 2033 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30528,7 +30526,7 @@ i32.const 16 i32.const 2034 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30543,7 +30541,7 @@ i32.const 16 i32.const 2035 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30558,7 +30556,7 @@ i32.const 16 i32.const 2036 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30573,7 +30571,7 @@ i32.const 16 i32.const 2037 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30590,7 +30588,7 @@ i32.const 16 i32.const 2038 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -30605,7 +30603,7 @@ i32.const 16 i32.const 2039 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -30620,7 +30618,7 @@ i32.const 16 i32.const 2040 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30635,7 +30633,7 @@ i32.const 16 i32.const 2041 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -30650,7 +30648,7 @@ i32.const 16 i32.const 2042 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30665,7 +30663,7 @@ i32.const 16 i32.const 2043 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30680,7 +30678,7 @@ i32.const 16 i32.const 2044 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30695,7 +30693,7 @@ i32.const 16 i32.const 2045 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30710,7 +30708,7 @@ i32.const 16 i32.const 2046 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30727,7 +30725,7 @@ i32.const 16 i32.const 2047 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -30742,7 +30740,7 @@ i32.const 16 i32.const 2048 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -30757,7 +30755,7 @@ i32.const 16 i32.const 2049 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -30772,7 +30770,7 @@ i32.const 16 i32.const 2050 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -30787,7 +30785,7 @@ i32.const 16 i32.const 2051 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -30804,7 +30802,7 @@ i32.const 16 i32.const 2052 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -30819,7 +30817,7 @@ i32.const 16 i32.const 2053 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30834,7 +30832,7 @@ i32.const 16 i32.const 2054 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30849,7 +30847,7 @@ i32.const 16 i32.const 2055 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30864,7 +30862,7 @@ i32.const 16 i32.const 2056 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30881,7 +30879,7 @@ i32.const 16 i32.const 2057 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30896,7 +30894,7 @@ i32.const 16 i32.const 2058 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30911,7 +30909,7 @@ i32.const 16 i32.const 2059 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30926,7 +30924,7 @@ i32.const 16 i32.const 2060 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30941,7 +30939,7 @@ i32.const 16 i32.const 2061 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30958,7 +30956,7 @@ i32.const 16 i32.const 2062 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -30973,7 +30971,7 @@ i32.const 16 i32.const 2063 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30988,7 +30986,7 @@ i32.const 16 i32.const 2064 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31003,7 +31001,7 @@ i32.const 16 i32.const 2065 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31020,7 +31018,7 @@ i32.const 16 i32.const 2066 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -31035,7 +31033,7 @@ i32.const 16 i32.const 2067 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31050,7 +31048,7 @@ i32.const 16 i32.const 2068 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31065,7 +31063,7 @@ i32.const 16 i32.const 2069 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31080,7 +31078,7 @@ i32.const 16 i32.const 2070 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31097,7 +31095,7 @@ i32.const 16 i32.const 2071 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31114,7 +31112,7 @@ i32.const 16 i32.const 2072 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31130,7 +31128,7 @@ i32.const 16 i32.const 2073 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -31145,7 +31143,7 @@ i32.const 16 i32.const 2074 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -31160,7 +31158,7 @@ i32.const 16 i32.const 2075 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -31175,7 +31173,7 @@ i32.const 16 i32.const 2076 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -31190,7 +31188,7 @@ i32.const 16 i32.const 2077 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -31205,7 +31203,7 @@ i32.const 16 i32.const 2078 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31220,7 +31218,7 @@ i32.const 16 i32.const 2079 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31237,7 +31235,7 @@ i32.const 16 i32.const 2080 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -31254,7 +31252,7 @@ i32.const 16 i32.const 2081 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -31271,7 +31269,7 @@ i32.const 16 i32.const 2082 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31288,7 +31286,7 @@ i32.const 16 i32.const 2083 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31306,7 +31304,7 @@ i32.const 16 i32.const 2084 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -31321,7 +31319,7 @@ i32.const 16 i32.const 2085 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -31336,7 +31334,7 @@ i32.const 16 i32.const 2086 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -31351,7 +31349,7 @@ i32.const 16 i32.const 2087 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -31366,7 +31364,7 @@ i32.const 16 i32.const 2088 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -31381,7 +31379,7 @@ i32.const 16 i32.const 2097 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -31396,7 +31394,7 @@ i32.const 16 i32.const 2098 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -31411,7 +31409,7 @@ i32.const 16 i32.const 2099 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -31426,7 +31424,7 @@ i32.const 16 i32.const 2100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -31441,7 +31439,7 @@ i32.const 16 i32.const 2101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -31456,7 +31454,7 @@ i32.const 16 i32.const 2102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -31471,7 +31469,7 @@ i32.const 16 i32.const 2103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -31486,7 +31484,7 @@ i32.const 16 i32.const 2104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -31501,7 +31499,7 @@ i32.const 16 i32.const 2105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -31516,7 +31514,7 @@ i32.const 16 i32.const 2106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31531,7 +31529,7 @@ i32.const 16 i32.const 2109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31546,7 +31544,7 @@ i32.const 16 i32.const 2110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -31561,7 +31559,7 @@ i32.const 16 i32.const 2111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31576,7 +31574,7 @@ i32.const 16 i32.const 2112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31591,7 +31589,7 @@ i32.const 16 i32.const 2113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31606,7 +31604,7 @@ i32.const 16 i32.const 2114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -31621,7 +31619,7 @@ i32.const 16 i32.const 2115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -31638,7 +31636,7 @@ i32.const 16 i32.const 2116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -31653,7 +31651,7 @@ i32.const 16 i32.const 2117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31668,7 +31666,7 @@ i32.const 16 i32.const 2118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31683,7 +31681,7 @@ i32.const 16 i32.const 2119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -31698,7 +31696,7 @@ i32.const 16 i32.const 2120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31713,7 +31711,7 @@ i32.const 16 i32.const 2121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31728,7 +31726,7 @@ i32.const 16 i32.const 2122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31743,7 +31741,7 @@ i32.const 16 i32.const 2123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -31758,7 +31756,7 @@ i32.const 16 i32.const 2124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -31775,7 +31773,7 @@ i32.const 16 i32.const 2125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -31790,7 +31788,7 @@ i32.const 16 i32.const 2126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31805,7 +31803,7 @@ i32.const 16 i32.const 2127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31820,7 +31818,7 @@ i32.const 16 i32.const 2128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31835,7 +31833,7 @@ i32.const 16 i32.const 2129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31852,7 +31850,7 @@ i32.const 16 i32.const 2130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31867,7 +31865,7 @@ i32.const 16 i32.const 2131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31882,7 +31880,7 @@ i32.const 16 i32.const 2132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31897,7 +31895,7 @@ i32.const 16 i32.const 2133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31912,7 +31910,7 @@ i32.const 16 i32.const 2134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31929,7 +31927,7 @@ i32.const 16 i32.const 2135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31944,7 +31942,7 @@ i32.const 16 i32.const 2136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31959,7 +31957,7 @@ i32.const 16 i32.const 2137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31974,7 +31972,7 @@ i32.const 16 i32.const 2138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -31989,7 +31987,7 @@ i32.const 16 i32.const 2139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32006,7 +32004,7 @@ i32.const 16 i32.const 2140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -32021,7 +32019,7 @@ i32.const 16 i32.const 2141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -32036,7 +32034,7 @@ i32.const 16 i32.const 2142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32051,7 +32049,7 @@ i32.const 16 i32.const 2143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32068,7 +32066,7 @@ i32.const 16 i32.const 2144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -32083,7 +32081,7 @@ i32.const 16 i32.const 2145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32098,7 +32096,7 @@ i32.const 16 i32.const 2146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32113,7 +32111,7 @@ i32.const 16 i32.const 2147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32128,7 +32126,7 @@ i32.const 16 i32.const 2148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32145,7 +32143,7 @@ i32.const 16 i32.const 2149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32162,7 +32160,7 @@ i32.const 16 i32.const 2150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32178,7 +32176,7 @@ i32.const 16 i32.const 2151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -32193,7 +32191,7 @@ i32.const 16 i32.const 2152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -32208,7 +32206,7 @@ i32.const 16 i32.const 2153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -32223,7 +32221,7 @@ i32.const 16 i32.const 2154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -32238,7 +32236,7 @@ i32.const 16 i32.const 2155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -32253,7 +32251,7 @@ i32.const 16 i32.const 2156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32268,7 +32266,7 @@ i32.const 16 i32.const 2157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32285,7 +32283,7 @@ i32.const 16 i32.const 2158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -32302,7 +32300,7 @@ i32.const 16 i32.const 2159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -32319,7 +32317,7 @@ i32.const 16 i32.const 2160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32336,7 +32334,7 @@ i32.const 16 i32.const 2161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32354,7 +32352,7 @@ i32.const 16 i32.const 2162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -32369,7 +32367,7 @@ i32.const 16 i32.const 2163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -32384,7 +32382,7 @@ i32.const 16 i32.const 2164 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -32399,7 +32397,7 @@ i32.const 16 i32.const 2165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -32414,7 +32412,7 @@ i32.const 16 i32.const 2166 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -32429,7 +32427,7 @@ i32.const 16 i32.const 2180 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -32444,7 +32442,7 @@ i32.const 16 i32.const 2181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -32459,7 +32457,7 @@ i32.const 16 i32.const 2182 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -32474,7 +32472,7 @@ i32.const 16 i32.const 2183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -32489,7 +32487,7 @@ i32.const 16 i32.const 2184 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -32504,7 +32502,7 @@ i32.const 16 i32.const 2185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -32519,7 +32517,7 @@ i32.const 16 i32.const 2186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -32534,7 +32532,7 @@ i32.const 16 i32.const 2187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -32549,7 +32547,7 @@ i32.const 16 i32.const 2188 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -32564,7 +32562,7 @@ i32.const 16 i32.const 2189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -32579,7 +32577,7 @@ i32.const 16 i32.const 2192 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -32594,7 +32592,7 @@ i32.const 16 i32.const 2193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -32609,7 +32607,7 @@ i32.const 16 i32.const 2194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -32624,7 +32622,7 @@ i32.const 16 i32.const 2195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -32639,7 +32637,7 @@ i32.const 16 i32.const 2196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -32654,7 +32652,7 @@ i32.const 16 i32.const 2197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -32669,7 +32667,7 @@ i32.const 16 i32.const 2198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -32684,7 +32682,7 @@ i32.const 16 i32.const 2199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -32699,7 +32697,7 @@ i32.const 16 i32.const 2200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -32714,7 +32712,7 @@ i32.const 16 i32.const 2201 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -32729,7 +32727,7 @@ i32.const 16 i32.const 2202 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -32745,7 +32743,7 @@ i32.const 16 i32.const 2203 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -32760,7 +32758,7 @@ i32.const 16 i32.const 2204 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -32775,7 +32773,7 @@ i32.const 16 i32.const 2205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -32790,7 +32788,7 @@ i32.const 16 i32.const 2206 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -32805,7 +32803,7 @@ i32.const 16 i32.const 2207 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -32820,7 +32818,7 @@ i32.const 16 i32.const 2208 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -32835,7 +32833,7 @@ i32.const 16 i32.const 2209 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -32850,7 +32848,7 @@ i32.const 16 i32.const 2210 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -32865,7 +32863,7 @@ i32.const 16 i32.const 2211 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -32880,7 +32878,7 @@ i32.const 16 i32.const 2212 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -32895,7 +32893,7 @@ i32.const 16 i32.const 2213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -32910,7 +32908,7 @@ i32.const 16 i32.const 2214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -32925,7 +32923,7 @@ i32.const 16 i32.const 2215 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -32941,7 +32939,7 @@ i32.const 16 i32.const 2216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -32956,7 +32954,7 @@ i32.const 16 i32.const 2217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -32971,7 +32969,7 @@ i32.const 16 i32.const 2218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -32986,7 +32984,7 @@ i32.const 16 i32.const 2219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33001,7 +32999,7 @@ i32.const 16 i32.const 2220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33017,7 +33015,7 @@ i32.const 16 i32.const 2221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33032,7 +33030,7 @@ i32.const 16 i32.const 2222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33047,7 +33045,7 @@ i32.const 16 i32.const 2223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33062,7 +33060,7 @@ i32.const 16 i32.const 2224 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33077,7 +33075,7 @@ i32.const 16 i32.const 2225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33093,7 +33091,7 @@ i32.const 16 i32.const 2226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33108,7 +33106,7 @@ i32.const 16 i32.const 2227 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -33123,7 +33121,7 @@ i32.const 16 i32.const 2228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -33138,7 +33136,7 @@ i32.const 16 i32.const 2229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33153,7 +33151,7 @@ i32.const 16 i32.const 2230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33169,7 +33167,7 @@ i32.const 16 i32.const 2231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -33184,7 +33182,7 @@ i32.const 16 i32.const 2232 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -33199,7 +33197,7 @@ i32.const 16 i32.const 2233 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33214,7 +33212,7 @@ i32.const 16 i32.const 2234 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33230,7 +33228,7 @@ i32.const 16 i32.const 2235 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -33245,7 +33243,7 @@ i32.const 16 i32.const 2236 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33260,7 +33258,7 @@ i32.const 16 i32.const 2237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33275,7 +33273,7 @@ i32.const 16 i32.const 2238 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33290,7 +33288,7 @@ i32.const 16 i32.const 2239 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33306,7 +33304,7 @@ i32.const 16 i32.const 2240 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33322,7 +33320,7 @@ i32.const 16 i32.const 2241 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33338,7 +33336,7 @@ i32.const 16 i32.const 2242 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -33353,7 +33351,7 @@ i32.const 16 i32.const 2243 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -33368,7 +33366,7 @@ i32.const 16 i32.const 2244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -33383,7 +33381,7 @@ i32.const 16 i32.const 2245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -33398,7 +33396,7 @@ i32.const 16 i32.const 2246 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -33413,7 +33411,7 @@ i32.const 16 i32.const 2247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33428,7 +33426,7 @@ i32.const 16 i32.const 2248 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33444,7 +33442,7 @@ i32.const 16 i32.const 2249 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -33460,7 +33458,7 @@ i32.const 16 i32.const 2250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -33476,7 +33474,7 @@ i32.const 16 i32.const 2251 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33492,7 +33490,7 @@ i32.const 16 i32.const 2252 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33509,7 +33507,7 @@ i32.const 16 i32.const 2253 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -33524,7 +33522,7 @@ i32.const 16 i32.const 2254 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -33539,7 +33537,7 @@ i32.const 16 i32.const 2255 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -33554,7 +33552,7 @@ i32.const 16 i32.const 2256 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -33569,7 +33567,7 @@ i32.const 16 i32.const 2257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -33584,7 +33582,7 @@ i32.const 16 i32.const 2266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -33599,7 +33597,7 @@ i32.const 16 i32.const 2267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -33614,7 +33612,7 @@ i32.const 16 i32.const 2268 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -33629,7 +33627,7 @@ i32.const 16 i32.const 2269 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -33644,7 +33642,7 @@ i32.const 16 i32.const 2270 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -33659,7 +33657,7 @@ i32.const 16 i32.const 2271 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -33674,7 +33672,7 @@ i32.const 16 i32.const 2272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -33689,7 +33687,7 @@ i32.const 16 i32.const 2273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -33704,7 +33702,7 @@ i32.const 16 i32.const 2274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -33719,7 +33717,7 @@ i32.const 16 i32.const 2275 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -33734,7 +33732,7 @@ i32.const 16 i32.const 2278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -33749,7 +33747,7 @@ i32.const 16 i32.const 2279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -33764,7 +33762,7 @@ i32.const 16 i32.const 2280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -33779,7 +33777,7 @@ i32.const 16 i32.const 2281 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -33794,7 +33792,7 @@ i32.const 16 i32.const 2282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -33809,7 +33807,7 @@ i32.const 16 i32.const 2283 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -33824,7 +33822,7 @@ i32.const 16 i32.const 2284 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -33839,7 +33837,7 @@ i32.const 16 i32.const 2285 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -33854,7 +33852,7 @@ i32.const 16 i32.const 2286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -33869,7 +33867,7 @@ i32.const 16 i32.const 2287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -33884,7 +33882,7 @@ i32.const 16 i32.const 2288 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -33900,7 +33898,7 @@ i32.const 16 i32.const 2289 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -33915,7 +33913,7 @@ i32.const 16 i32.const 2290 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -33930,7 +33928,7 @@ i32.const 16 i32.const 2291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -33945,7 +33943,7 @@ i32.const 16 i32.const 2292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -33960,7 +33958,7 @@ i32.const 16 i32.const 2293 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -33975,7 +33973,7 @@ i32.const 16 i32.const 2294 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -33990,7 +33988,7 @@ i32.const 16 i32.const 2295 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -34005,7 +34003,7 @@ i32.const 16 i32.const 2296 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -34020,7 +34018,7 @@ i32.const 16 i32.const 2297 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -34035,7 +34033,7 @@ i32.const 16 i32.const 2298 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -34050,7 +34048,7 @@ i32.const 16 i32.const 2299 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -34065,7 +34063,7 @@ i32.const 16 i32.const 2300 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34080,7 +34078,7 @@ i32.const 16 i32.const 2301 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34096,7 +34094,7 @@ i32.const 16 i32.const 2302 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -34111,7 +34109,7 @@ i32.const 16 i32.const 2303 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34126,7 +34124,7 @@ i32.const 16 i32.const 2304 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34141,7 +34139,7 @@ i32.const 16 i32.const 2305 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34156,7 +34154,7 @@ i32.const 16 i32.const 2306 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34172,7 +34170,7 @@ i32.const 16 i32.const 2307 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34187,7 +34185,7 @@ i32.const 16 i32.const 2308 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34202,7 +34200,7 @@ i32.const 16 i32.const 2309 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34217,7 +34215,7 @@ i32.const 16 i32.const 2310 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34232,7 +34230,7 @@ i32.const 16 i32.const 2311 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34248,7 +34246,7 @@ i32.const 16 i32.const 2312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34263,7 +34261,7 @@ i32.const 16 i32.const 2313 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -34278,7 +34276,7 @@ i32.const 16 i32.const 2314 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -34293,7 +34291,7 @@ i32.const 16 i32.const 2315 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34308,7 +34306,7 @@ i32.const 16 i32.const 2316 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34324,7 +34322,7 @@ i32.const 16 i32.const 2317 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -34339,7 +34337,7 @@ i32.const 16 i32.const 2318 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -34354,7 +34352,7 @@ i32.const 16 i32.const 2319 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34369,7 +34367,7 @@ i32.const 16 i32.const 2320 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34385,7 +34383,7 @@ i32.const 16 i32.const 2321 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -34400,7 +34398,7 @@ i32.const 16 i32.const 2322 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34415,7 +34413,7 @@ i32.const 16 i32.const 2323 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34430,7 +34428,7 @@ i32.const 16 i32.const 2324 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34445,7 +34443,7 @@ i32.const 16 i32.const 2325 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34461,7 +34459,7 @@ i32.const 16 i32.const 2326 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34477,7 +34475,7 @@ i32.const 16 i32.const 2327 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34493,7 +34491,7 @@ i32.const 16 i32.const 2328 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -34508,7 +34506,7 @@ i32.const 16 i32.const 2329 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -34523,7 +34521,7 @@ i32.const 16 i32.const 2330 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -34538,7 +34536,7 @@ i32.const 16 i32.const 2331 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -34553,7 +34551,7 @@ i32.const 16 i32.const 2332 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -34568,7 +34566,7 @@ i32.const 16 i32.const 2333 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34583,7 +34581,7 @@ i32.const 16 i32.const 2334 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34599,7 +34597,7 @@ i32.const 16 i32.const 2335 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -34615,7 +34613,7 @@ i32.const 16 i32.const 2336 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -34631,7 +34629,7 @@ i32.const 16 i32.const 2337 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34647,7 +34645,7 @@ i32.const 16 i32.const 2338 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34664,7 +34662,7 @@ i32.const 16 i32.const 2339 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -34679,7 +34677,7 @@ i32.const 16 i32.const 2340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -34694,7 +34692,7 @@ i32.const 16 i32.const 2341 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -34709,7 +34707,7 @@ i32.const 16 i32.const 2342 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -34724,7 +34722,7 @@ i32.const 16 i32.const 2343 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -34739,7 +34737,7 @@ i32.const 16 i32.const 2355 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -34754,7 +34752,7 @@ i32.const 16 i32.const 2356 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -34769,7 +34767,7 @@ i32.const 16 i32.const 2357 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -34784,7 +34782,7 @@ i32.const 16 i32.const 2358 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -34799,7 +34797,7 @@ i32.const 16 i32.const 2359 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -34814,7 +34812,7 @@ i32.const 16 i32.const 2360 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -34829,7 +34827,7 @@ i32.const 16 i32.const 2361 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -34844,7 +34842,7 @@ i32.const 16 i32.const 2362 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -34859,7 +34857,7 @@ i32.const 16 i32.const 2363 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -34874,7 +34872,7 @@ i32.const 16 i32.const 2364 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -34889,7 +34887,7 @@ i32.const 16 i32.const 2367 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -34904,7 +34902,7 @@ i32.const 16 i32.const 2368 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -34919,7 +34917,7 @@ i32.const 16 i32.const 2369 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -34934,7 +34932,7 @@ i32.const 16 i32.const 2370 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -34949,7 +34947,7 @@ i32.const 16 i32.const 2371 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -34964,7 +34962,7 @@ i32.const 16 i32.const 2372 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -34979,7 +34977,7 @@ i32.const 16 i32.const 2373 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -34994,7 +34992,7 @@ i32.const 16 i32.const 2374 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -35009,7 +35007,7 @@ i32.const 16 i32.const 2375 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -35024,7 +35022,7 @@ i32.const 16 i32.const 2376 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -35039,7 +35037,7 @@ i32.const 16 i32.const 2377 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -35054,7 +35052,7 @@ i32.const 16 i32.const 2378 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -35069,7 +35067,7 @@ i32.const 16 i32.const 2379 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -35085,7 +35083,7 @@ i32.const 16 i32.const 2380 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35100,7 +35098,7 @@ i32.const 16 i32.const 2381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35115,7 +35113,7 @@ i32.const 16 i32.const 2382 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35130,7 +35128,7 @@ i32.const 16 i32.const 2383 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35145,7 +35143,7 @@ i32.const 16 i32.const 2384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35160,7 +35158,7 @@ i32.const 16 i32.const 2385 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35175,7 +35173,7 @@ i32.const 16 i32.const 2386 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35190,7 +35188,7 @@ i32.const 16 i32.const 2387 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35205,7 +35203,7 @@ i32.const 16 i32.const 2388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35220,7 +35218,7 @@ i32.const 16 i32.const 2389 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35236,7 +35234,7 @@ i32.const 16 i32.const 2390 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35251,7 +35249,7 @@ i32.const 16 i32.const 2391 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35267,7 +35265,7 @@ i32.const 16 i32.const 2392 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35282,7 +35280,7 @@ i32.const 16 i32.const 2393 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35298,7 +35296,7 @@ i32.const 16 i32.const 2394 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -35313,7 +35311,7 @@ i32.const 16 i32.const 2395 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -35328,7 +35326,7 @@ i32.const 16 i32.const 2396 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -35344,7 +35342,7 @@ i32.const 16 i32.const 2397 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -35359,7 +35357,7 @@ i32.const 16 i32.const 2398 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35374,7 +35372,7 @@ i32.const 16 i32.const 2399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -35389,7 +35387,7 @@ i32.const 16 i32.const 2400 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -35404,7 +35402,7 @@ i32.const 16 i32.const 2401 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -35419,7 +35417,7 @@ i32.const 16 i32.const 2402 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -35435,7 +35433,7 @@ i32.const 16 i32.const 2403 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -35450,7 +35448,7 @@ i32.const 16 i32.const 2404 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35465,7 +35463,7 @@ i32.const 16 i32.const 2405 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -35480,7 +35478,7 @@ i32.const 16 i32.const 2406 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35495,7 +35493,7 @@ i32.const 16 i32.const 2407 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35510,7 +35508,7 @@ i32.const 16 i32.const 2408 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35526,7 +35524,7 @@ i32.const 16 i32.const 2409 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35541,7 +35539,7 @@ i32.const 16 i32.const 2410 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35556,7 +35554,7 @@ i32.const 16 i32.const 2411 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35571,7 +35569,7 @@ i32.const 16 i32.const 2412 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35586,7 +35584,7 @@ i32.const 16 i32.const 2413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35601,7 +35599,7 @@ i32.const 16 i32.const 2414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -35616,7 +35614,7 @@ i32.const 16 i32.const 2415 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -35631,7 +35629,7 @@ i32.const 16 i32.const 2416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -35647,7 +35645,7 @@ i32.const 16 i32.const 2417 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -35662,7 +35660,7 @@ i32.const 16 i32.const 2418 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -35677,7 +35675,7 @@ i32.const 16 i32.const 2419 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -35692,7 +35690,7 @@ i32.const 16 i32.const 2420 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -35707,7 +35705,7 @@ i32.const 16 i32.const 2421 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -35722,7 +35720,7 @@ i32.const 16 i32.const 2422 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -35737,7 +35735,7 @@ i32.const 16 i32.const 2423 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -35752,7 +35750,7 @@ i32.const 16 i32.const 2424 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -35767,7 +35765,7 @@ i32.const 16 i32.const 2425 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -35782,7 +35780,7 @@ i32.const 16 i32.const 2426 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -35798,7 +35796,7 @@ i32.const 16 i32.const 2427 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -35813,7 +35811,7 @@ i32.const 16 i32.const 2428 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -35828,7 +35826,7 @@ i32.const 16 i32.const 2429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -35844,7 +35842,7 @@ i32.const 16 i32.const 2430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -35859,7 +35857,7 @@ i32.const 16 i32.const 2431 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -35874,7 +35872,7 @@ i32.const 16 i32.const 2432 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -35890,7 +35888,7 @@ i32.const 16 i32.const 2433 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -35905,7 +35903,7 @@ i32.const 16 i32.const 2434 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -35920,7 +35918,7 @@ i32.const 16 i32.const 2435 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -35935,7 +35933,7 @@ i32.const 16 i32.const 2436 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -35951,7 +35949,7 @@ i32.const 16 i32.const 2437 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -35966,7 +35964,7 @@ i32.const 16 i32.const 2438 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -35981,7 +35979,7 @@ i32.const 16 i32.const 2439 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -35996,7 +35994,7 @@ i32.const 16 i32.const 2440 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36011,7 +36009,7 @@ i32.const 16 i32.const 2441 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36026,7 +36024,7 @@ i32.const 16 i32.const 2442 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36041,7 +36039,7 @@ i32.const 16 i32.const 2443 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36056,7 +36054,7 @@ i32.const 16 i32.const 2444 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36072,7 +36070,7 @@ i32.const 16 i32.const 2445 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36088,7 +36086,7 @@ i32.const 16 i32.const 2446 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36105,7 +36103,7 @@ i32.const 16 i32.const 2447 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36122,7 +36120,7 @@ i32.const 16 i32.const 2448 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36138,7 +36136,7 @@ i32.const 16 i32.const 2449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36155,7 +36153,7 @@ i32.const 16 i32.const 2450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36171,7 +36169,7 @@ i32.const 16 i32.const 2451 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36187,7 +36185,7 @@ i32.const 16 i32.const 2452 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36203,7 +36201,7 @@ i32.const 16 i32.const 2453 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36219,7 +36217,7 @@ i32.const 16 i32.const 2454 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -36234,7 +36232,7 @@ i32.const 16 i32.const 2455 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -36249,7 +36247,7 @@ i32.const 16 i32.const 2456 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -36264,7 +36262,7 @@ i32.const 16 i32.const 2457 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -36279,7 +36277,7 @@ i32.const 16 i32.const 2458 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -36294,7 +36292,7 @@ i32.const 16 i32.const 2467 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -36309,7 +36307,7 @@ i32.const 16 i32.const 2468 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -36324,7 +36322,7 @@ i32.const 16 i32.const 2469 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -36339,7 +36337,7 @@ i32.const 16 i32.const 2470 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -36354,7 +36352,7 @@ i32.const 16 i32.const 2471 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -36369,7 +36367,7 @@ i32.const 16 i32.const 2472 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -36384,7 +36382,7 @@ i32.const 16 i32.const 2473 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -36399,7 +36397,7 @@ i32.const 16 i32.const 2474 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -36414,7 +36412,7 @@ i32.const 16 i32.const 2475 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -36429,7 +36427,7 @@ i32.const 16 i32.const 2476 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36444,7 +36442,7 @@ i32.const 16 i32.const 2479 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36459,7 +36457,7 @@ i32.const 16 i32.const 2480 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36474,7 +36472,7 @@ i32.const 16 i32.const 2481 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36489,7 +36487,7 @@ i32.const 16 i32.const 2482 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36504,7 +36502,7 @@ i32.const 16 i32.const 2483 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36519,7 +36517,7 @@ i32.const 16 i32.const 2484 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36534,7 +36532,7 @@ i32.const 16 i32.const 2485 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36549,7 +36547,7 @@ i32.const 16 i32.const 2486 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36564,7 +36562,7 @@ i32.const 16 i32.const 2487 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36579,7 +36577,7 @@ i32.const 16 i32.const 2488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36594,7 +36592,7 @@ i32.const 16 i32.const 2489 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36609,7 +36607,7 @@ i32.const 16 i32.const 2490 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36624,7 +36622,7 @@ i32.const 16 i32.const 2491 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36640,7 +36638,7 @@ i32.const 16 i32.const 2492 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36655,7 +36653,7 @@ i32.const 16 i32.const 2493 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36670,7 +36668,7 @@ i32.const 16 i32.const 2494 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36685,7 +36683,7 @@ i32.const 16 i32.const 2495 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36700,7 +36698,7 @@ i32.const 16 i32.const 2496 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36715,7 +36713,7 @@ i32.const 16 i32.const 2497 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36730,7 +36728,7 @@ i32.const 16 i32.const 2498 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36745,7 +36743,7 @@ i32.const 16 i32.const 2499 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36760,7 +36758,7 @@ i32.const 16 i32.const 2500 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36775,7 +36773,7 @@ i32.const 16 i32.const 2501 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36791,7 +36789,7 @@ i32.const 16 i32.const 2502 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36806,7 +36804,7 @@ i32.const 16 i32.const 2503 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36822,7 +36820,7 @@ i32.const 16 i32.const 2504 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36837,7 +36835,7 @@ i32.const 16 i32.const 2505 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36853,7 +36851,7 @@ i32.const 16 i32.const 2506 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -36868,7 +36866,7 @@ i32.const 16 i32.const 2507 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -36883,7 +36881,7 @@ i32.const 16 i32.const 2508 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -36899,7 +36897,7 @@ i32.const 16 i32.const 2509 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -36914,7 +36912,7 @@ i32.const 16 i32.const 2510 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -36929,7 +36927,7 @@ i32.const 16 i32.const 2511 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -36944,7 +36942,7 @@ i32.const 16 i32.const 2512 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -36959,7 +36957,7 @@ i32.const 16 i32.const 2513 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -36974,7 +36972,7 @@ i32.const 16 i32.const 2514 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -36990,7 +36988,7 @@ i32.const 16 i32.const 2515 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -37005,7 +37003,7 @@ i32.const 16 i32.const 2516 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37020,7 +37018,7 @@ i32.const 16 i32.const 2517 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -37035,7 +37033,7 @@ i32.const 16 i32.const 2518 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37050,7 +37048,7 @@ i32.const 16 i32.const 2519 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37065,7 +37063,7 @@ i32.const 16 i32.const 2520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37081,7 +37079,7 @@ i32.const 16 i32.const 2521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37096,7 +37094,7 @@ i32.const 16 i32.const 2522 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37111,7 +37109,7 @@ i32.const 16 i32.const 2523 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37126,7 +37124,7 @@ i32.const 16 i32.const 2524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37141,7 +37139,7 @@ i32.const 16 i32.const 2525 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37156,7 +37154,7 @@ i32.const 16 i32.const 2526 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -37171,7 +37169,7 @@ i32.const 16 i32.const 2527 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -37186,7 +37184,7 @@ i32.const 16 i32.const 2528 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -37202,7 +37200,7 @@ i32.const 16 i32.const 2529 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -37217,7 +37215,7 @@ i32.const 16 i32.const 2530 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -37232,7 +37230,7 @@ i32.const 16 i32.const 2531 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -37247,7 +37245,7 @@ i32.const 16 i32.const 2532 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -37262,7 +37260,7 @@ i32.const 16 i32.const 2533 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -37277,7 +37275,7 @@ i32.const 16 i32.const 2534 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -37292,7 +37290,7 @@ i32.const 16 i32.const 2535 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -37307,7 +37305,7 @@ i32.const 16 i32.const 2536 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -37322,7 +37320,7 @@ i32.const 16 i32.const 2537 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -37337,7 +37335,7 @@ i32.const 16 i32.const 2538 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -37353,7 +37351,7 @@ i32.const 16 i32.const 2539 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -37368,7 +37366,7 @@ i32.const 16 i32.const 2540 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -37383,7 +37381,7 @@ i32.const 16 i32.const 2541 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -37399,7 +37397,7 @@ i32.const 16 i32.const 2542 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -37414,7 +37412,7 @@ i32.const 16 i32.const 2543 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -37429,7 +37427,7 @@ i32.const 16 i32.const 2544 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -37445,7 +37443,7 @@ i32.const 16 i32.const 2545 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -37460,7 +37458,7 @@ i32.const 16 i32.const 2546 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37475,7 +37473,7 @@ i32.const 16 i32.const 2547 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37490,7 +37488,7 @@ i32.const 16 i32.const 2548 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37506,7 +37504,7 @@ i32.const 16 i32.const 2549 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37521,7 +37519,7 @@ i32.const 16 i32.const 2550 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37536,7 +37534,7 @@ i32.const 16 i32.const 2551 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37551,7 +37549,7 @@ i32.const 16 i32.const 2552 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37566,7 +37564,7 @@ i32.const 16 i32.const 2553 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37581,7 +37579,7 @@ i32.const 16 i32.const 2554 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37596,7 +37594,7 @@ i32.const 16 i32.const 2555 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37611,7 +37609,7 @@ i32.const 16 i32.const 2556 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37627,7 +37625,7 @@ i32.const 16 i32.const 2557 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37643,7 +37641,7 @@ i32.const 16 i32.const 2558 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37660,7 +37658,7 @@ i32.const 16 i32.const 2559 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37677,7 +37675,7 @@ i32.const 16 i32.const 2560 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37693,7 +37691,7 @@ i32.const 16 i32.const 2561 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37710,7 +37708,7 @@ i32.const 16 i32.const 2562 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37726,7 +37724,7 @@ i32.const 16 i32.const 2563 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37742,7 +37740,7 @@ i32.const 16 i32.const 2564 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37758,7 +37756,7 @@ i32.const 16 i32.const 2565 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37774,7 +37772,7 @@ i32.const 16 i32.const 2566 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -37789,7 +37787,7 @@ i32.const 16 i32.const 2567 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -37804,7 +37802,7 @@ i32.const 16 i32.const 2568 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -37819,7 +37817,7 @@ i32.const 16 i32.const 2569 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -37834,7 +37832,7 @@ i32.const 16 i32.const 2570 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $~lib/bindings/Math/random @@ -37870,7 +37868,7 @@ i32.const 16 i32.const 2579 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -37920,7 +37918,7 @@ i32.const 16 i32.const 2587 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -37944,7 +37942,7 @@ i32.const 16 i32.const 2601 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -37958,7 +37956,7 @@ i32.const 16 i32.const 2602 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -37972,7 +37970,7 @@ i32.const 16 i32.const 2603 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -37986,7 +37984,7 @@ i32.const 16 i32.const 2604 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -38000,7 +37998,7 @@ i32.const 16 i32.const 2605 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -38014,7 +38012,7 @@ i32.const 16 i32.const 2606 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -38028,7 +38026,7 @@ i32.const 16 i32.const 2607 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -38042,7 +38040,7 @@ i32.const 16 i32.const 2608 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -38056,7 +38054,7 @@ i32.const 16 i32.const 2609 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -38070,7 +38068,7 @@ i32.const 16 i32.const 2610 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -38084,7 +38082,7 @@ i32.const 16 i32.const 2613 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -38098,7 +38096,7 @@ i32.const 16 i32.const 2614 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -38114,7 +38112,7 @@ i32.const 16 i32.const 2615 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -38128,7 +38126,7 @@ i32.const 16 i32.const 2616 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -38142,7 +38140,7 @@ i32.const 16 i32.const 2617 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -38156,7 +38154,7 @@ i32.const 16 i32.const 2618 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -38170,7 +38168,7 @@ i32.const 16 i32.const 2619 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -38184,7 +38182,7 @@ i32.const 16 i32.const 2620 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -38198,7 +38196,7 @@ i32.const 16 i32.const 2621 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -38212,7 +38210,7 @@ i32.const 16 i32.const 2622 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -38226,7 +38224,7 @@ i32.const 16 i32.const 2623 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -38240,7 +38238,7 @@ i32.const 16 i32.const 2624 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -38254,7 +38252,7 @@ i32.const 16 i32.const 2625 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -38268,7 +38266,7 @@ i32.const 16 i32.const 2626 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -38282,7 +38280,7 @@ i32.const 16 i32.const 2627 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -38296,7 +38294,7 @@ i32.const 16 i32.const 2628 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -38310,7 +38308,7 @@ i32.const 16 i32.const 2629 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -38324,7 +38322,7 @@ i32.const 16 i32.const 2638 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -38338,7 +38336,7 @@ i32.const 16 i32.const 2639 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -38352,7 +38350,7 @@ i32.const 16 i32.const 2640 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -38366,7 +38364,7 @@ i32.const 16 i32.const 2641 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -38380,7 +38378,7 @@ i32.const 16 i32.const 2642 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -38394,7 +38392,7 @@ i32.const 16 i32.const 2643 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -38408,7 +38406,7 @@ i32.const 16 i32.const 2644 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -38422,7 +38420,7 @@ i32.const 16 i32.const 2645 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -38436,7 +38434,7 @@ i32.const 16 i32.const 2646 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -38450,7 +38448,7 @@ i32.const 16 i32.const 2647 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -38464,7 +38462,7 @@ i32.const 16 i32.const 2650 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -38478,7 +38476,7 @@ i32.const 16 i32.const 2651 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -38494,7 +38492,7 @@ i32.const 16 i32.const 2652 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -38508,7 +38506,7 @@ i32.const 16 i32.const 2653 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -38522,7 +38520,7 @@ i32.const 16 i32.const 2654 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -38536,7 +38534,7 @@ i32.const 16 i32.const 2655 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -38550,7 +38548,7 @@ i32.const 16 i32.const 2656 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -38564,7 +38562,7 @@ i32.const 16 i32.const 2657 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -38578,7 +38576,7 @@ i32.const 16 i32.const 2658 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -38592,7 +38590,7 @@ i32.const 16 i32.const 2659 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -38606,7 +38604,7 @@ i32.const 16 i32.const 2660 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -38620,7 +38618,7 @@ i32.const 16 i32.const 2661 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -38634,7 +38632,7 @@ i32.const 16 i32.const 2662 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -38648,7 +38646,7 @@ i32.const 16 i32.const 2663 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -38662,7 +38660,7 @@ i32.const 16 i32.const 2664 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -38676,7 +38674,7 @@ i32.const 16 i32.const 2665 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -38690,7 +38688,7 @@ i32.const 16 i32.const 2666 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -38704,7 +38702,7 @@ i32.const 16 i32.const 2677 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -38718,7 +38716,7 @@ i32.const 16 i32.const 2678 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -38732,7 +38730,7 @@ i32.const 16 i32.const 2679 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -38746,7 +38744,7 @@ i32.const 16 i32.const 2680 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -38760,7 +38758,7 @@ i32.const 16 i32.const 2681 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -38774,7 +38772,7 @@ i32.const 16 i32.const 2682 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -38788,7 +38786,7 @@ i32.const 16 i32.const 2683 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -38803,7 +38801,7 @@ i32.const 16 i32.const 2684 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -38817,7 +38815,7 @@ i32.const 16 i32.const 2685 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -38831,7 +38829,7 @@ i32.const 16 i32.const 2693 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -38845,7 +38843,7 @@ i32.const 16 i32.const 2694 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -38859,7 +38857,7 @@ i32.const 16 i32.const 2695 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -38873,7 +38871,7 @@ i32.const 16 i32.const 2696 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -38887,7 +38885,7 @@ i32.const 16 i32.const 2697 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -38901,7 +38899,7 @@ i32.const 16 i32.const 2698 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -38915,7 +38913,7 @@ i32.const 16 i32.const 2699 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -38930,7 +38928,7 @@ i32.const 16 i32.const 2700 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -38944,7 +38942,7 @@ i32.const 16 i32.const 2701 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMath.signbit|inlined.4 (result i32) @@ -38970,7 +38968,7 @@ i32.const 16 i32.const 2707 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMath.signbit|inlined.5 (result i32) @@ -38996,7 +38994,7 @@ i32.const 16 i32.const 2708 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMath.signbit|inlined.6 (result i32) @@ -39022,7 +39020,7 @@ i32.const 16 i32.const 2709 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMath.signbit|inlined.7 (result i32) @@ -39048,7 +39046,7 @@ i32.const 16 i32.const 2710 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMath.signbit|inlined.8 (result i32) @@ -39074,7 +39072,7 @@ i32.const 16 i32.const 2711 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMath.signbit|inlined.9 (result i32) @@ -39101,7 +39099,7 @@ i32.const 16 i32.const 2712 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMath.signbit|inlined.10 (result i32) @@ -39127,7 +39125,7 @@ i32.const 16 i32.const 2713 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMath.signbit|inlined.11 (result i32) @@ -39154,7 +39152,7 @@ i32.const 16 i32.const 2714 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMathf.signbit|inlined.4 (result i32) @@ -39179,7 +39177,7 @@ i32.const 16 i32.const 2720 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMathf.signbit|inlined.5 (result i32) @@ -39204,7 +39202,7 @@ i32.const 16 i32.const 2721 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMathf.signbit|inlined.6 (result i32) @@ -39229,7 +39227,7 @@ i32.const 16 i32.const 2722 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMathf.signbit|inlined.7 (result i32) @@ -39254,7 +39252,7 @@ i32.const 16 i32.const 2723 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMathf.signbit|inlined.8 (result i32) @@ -39279,7 +39277,7 @@ i32.const 16 i32.const 2724 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMathf.signbit|inlined.9 (result i32) @@ -39305,7 +39303,7 @@ i32.const 16 i32.const 2725 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMathf.signbit|inlined.10 (result i32) @@ -39330,7 +39328,7 @@ i32.const 16 i32.const 2726 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMathf.signbit|inlined.11 (result i32) @@ -39356,7 +39354,7 @@ i32.const 16 i32.const 2727 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -39371,7 +39369,7 @@ i32.const 16 i32.const 2738 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -39386,7 +39384,7 @@ i32.const 16 i32.const 2739 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -39401,7 +39399,7 @@ i32.const 16 i32.const 2740 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -39416,7 +39414,7 @@ i32.const 16 i32.const 2741 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -39431,7 +39429,7 @@ i32.const 16 i32.const 2742 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -39446,7 +39444,7 @@ i32.const 16 i32.const 2743 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -39461,7 +39459,7 @@ i32.const 16 i32.const 2744 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -39476,7 +39474,7 @@ i32.const 16 i32.const 2745 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -39491,7 +39489,7 @@ i32.const 16 i32.const 2746 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -39506,7 +39504,7 @@ i32.const 16 i32.const 2747 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -39521,7 +39519,7 @@ i32.const 16 i32.const 2750 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -39536,7 +39534,7 @@ i32.const 16 i32.const 2751 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -39551,7 +39549,7 @@ i32.const 16 i32.const 2752 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -39566,7 +39564,7 @@ i32.const 16 i32.const 2753 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -39581,7 +39579,7 @@ i32.const 16 i32.const 2754 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -39596,7 +39594,7 @@ i32.const 16 i32.const 2755 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -39611,7 +39609,7 @@ i32.const 16 i32.const 2756 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -39626,7 +39624,7 @@ i32.const 16 i32.const 2757 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -39641,7 +39639,7 @@ i32.const 16 i32.const 2758 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -39656,7 +39654,7 @@ i32.const 16 i32.const 2759 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -39671,7 +39669,7 @@ i32.const 16 i32.const 2760 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -39687,7 +39685,7 @@ i32.const 16 i32.const 2761 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -39702,7 +39700,7 @@ i32.const 16 i32.const 2762 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -39717,7 +39715,7 @@ i32.const 16 i32.const 2763 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -39732,7 +39730,7 @@ i32.const 16 i32.const 2764 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -39747,7 +39745,7 @@ i32.const 16 i32.const 2765 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -39762,7 +39760,7 @@ i32.const 16 i32.const 2766 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -39777,7 +39775,7 @@ i32.const 16 i32.const 2767 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -39792,7 +39790,7 @@ i32.const 16 i32.const 2768 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -39807,7 +39805,7 @@ i32.const 16 i32.const 2769 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -39822,7 +39820,7 @@ i32.const 16 i32.const 2770 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -39837,7 +39835,7 @@ i32.const 16 i32.const 2771 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -39852,7 +39850,7 @@ i32.const 16 i32.const 2772 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -39867,7 +39865,7 @@ i32.const 16 i32.const 2773 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -39883,7 +39881,7 @@ i32.const 16 i32.const 2774 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -39898,7 +39896,7 @@ i32.const 16 i32.const 2775 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -39913,7 +39911,7 @@ i32.const 16 i32.const 2776 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -39928,7 +39926,7 @@ i32.const 16 i32.const 2777 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -39943,7 +39941,7 @@ i32.const 16 i32.const 2778 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -39959,7 +39957,7 @@ i32.const 16 i32.const 2779 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -39974,7 +39972,7 @@ i32.const 16 i32.const 2780 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -39989,7 +39987,7 @@ i32.const 16 i32.const 2781 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -40004,7 +40002,7 @@ i32.const 16 i32.const 2782 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -40019,7 +40017,7 @@ i32.const 16 i32.const 2783 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -40035,7 +40033,7 @@ i32.const 16 i32.const 2784 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -40050,7 +40048,7 @@ i32.const 16 i32.const 2785 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -40065,7 +40063,7 @@ i32.const 16 i32.const 2786 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -40080,7 +40078,7 @@ i32.const 16 i32.const 2787 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40095,7 +40093,7 @@ i32.const 16 i32.const 2788 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40111,7 +40109,7 @@ i32.const 16 i32.const 2789 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -40126,7 +40124,7 @@ i32.const 16 i32.const 2790 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -40141,7 +40139,7 @@ i32.const 16 i32.const 2791 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40156,7 +40154,7 @@ i32.const 16 i32.const 2792 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40172,7 +40170,7 @@ i32.const 16 i32.const 2793 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -40187,7 +40185,7 @@ i32.const 16 i32.const 2794 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40202,7 +40200,7 @@ i32.const 16 i32.const 2795 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40217,7 +40215,7 @@ i32.const 16 i32.const 2796 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40232,7 +40230,7 @@ i32.const 16 i32.const 2797 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40248,7 +40246,7 @@ i32.const 16 i32.const 2798 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40264,7 +40262,7 @@ i32.const 16 i32.const 2799 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40280,7 +40278,7 @@ i32.const 16 i32.const 2800 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -40295,7 +40293,7 @@ i32.const 16 i32.const 2801 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -40310,7 +40308,7 @@ i32.const 16 i32.const 2802 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -40325,7 +40323,7 @@ i32.const 16 i32.const 2803 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -40340,7 +40338,7 @@ i32.const 16 i32.const 2804 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -40355,7 +40353,7 @@ i32.const 16 i32.const 2805 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40370,7 +40368,7 @@ i32.const 16 i32.const 2806 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40386,7 +40384,7 @@ i32.const 16 i32.const 2807 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -40402,7 +40400,7 @@ i32.const 16 i32.const 2808 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -40418,7 +40416,7 @@ i32.const 16 i32.const 2809 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40434,7 +40432,7 @@ i32.const 16 i32.const 2810 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40451,7 +40449,7 @@ i32.const 16 i32.const 2811 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -40466,7 +40464,7 @@ i32.const 16 i32.const 2812 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -40481,7 +40479,7 @@ i32.const 16 i32.const 2813 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -40496,7 +40494,7 @@ i32.const 16 i32.const 2814 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -40511,7 +40509,7 @@ i32.const 16 i32.const 2815 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8e-323 @@ -40526,7 +40524,7 @@ i32.const 16 i32.const 2816 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -40541,7 +40539,7 @@ i32.const 16 i32.const 2825 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -40556,7 +40554,7 @@ i32.const 16 i32.const 2826 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -40571,7 +40569,7 @@ i32.const 16 i32.const 2827 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -40586,7 +40584,7 @@ i32.const 16 i32.const 2828 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -40601,7 +40599,7 @@ i32.const 16 i32.const 2829 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -40616,7 +40614,7 @@ i32.const 16 i32.const 2830 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -40631,7 +40629,7 @@ i32.const 16 i32.const 2831 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -40646,7 +40644,7 @@ i32.const 16 i32.const 2832 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -40661,7 +40659,7 @@ i32.const 16 i32.const 2833 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -40676,7 +40674,7 @@ i32.const 16 i32.const 2834 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -40691,7 +40689,7 @@ i32.const 16 i32.const 2837 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -40706,7 +40704,7 @@ i32.const 16 i32.const 2838 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -40721,7 +40719,7 @@ i32.const 16 i32.const 2839 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -40736,7 +40734,7 @@ i32.const 16 i32.const 2840 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -40751,7 +40749,7 @@ i32.const 16 i32.const 2841 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -40766,7 +40764,7 @@ i32.const 16 i32.const 2842 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -40781,7 +40779,7 @@ i32.const 16 i32.const 2843 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -40796,7 +40794,7 @@ i32.const 16 i32.const 2844 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -40811,7 +40809,7 @@ i32.const 16 i32.const 2845 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -40826,7 +40824,7 @@ i32.const 16 i32.const 2846 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -40841,7 +40839,7 @@ i32.const 16 i32.const 2847 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -40857,7 +40855,7 @@ i32.const 16 i32.const 2848 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -40872,7 +40870,7 @@ i32.const 16 i32.const 2849 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -40887,7 +40885,7 @@ i32.const 16 i32.const 2850 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -40902,7 +40900,7 @@ i32.const 16 i32.const 2851 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -40917,7 +40915,7 @@ i32.const 16 i32.const 2852 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -40932,7 +40930,7 @@ i32.const 16 i32.const 2853 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -40947,7 +40945,7 @@ i32.const 16 i32.const 2854 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -40962,7 +40960,7 @@ i32.const 16 i32.const 2855 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -40977,7 +40975,7 @@ i32.const 16 i32.const 2856 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -40992,7 +40990,7 @@ i32.const 16 i32.const 2857 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -41007,7 +41005,7 @@ i32.const 16 i32.const 2858 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -41022,7 +41020,7 @@ i32.const 16 i32.const 2859 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41037,7 +41035,7 @@ i32.const 16 i32.const 2860 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41053,7 +41051,7 @@ i32.const 16 i32.const 2861 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -41068,7 +41066,7 @@ i32.const 16 i32.const 2862 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -41083,7 +41081,7 @@ i32.const 16 i32.const 2863 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -41098,7 +41096,7 @@ i32.const 16 i32.const 2864 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -41113,7 +41111,7 @@ i32.const 16 i32.const 2865 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -41129,7 +41127,7 @@ i32.const 16 i32.const 2866 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -41144,7 +41142,7 @@ i32.const 16 i32.const 2867 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -41159,7 +41157,7 @@ i32.const 16 i32.const 2868 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -41174,7 +41172,7 @@ i32.const 16 i32.const 2869 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -41189,7 +41187,7 @@ i32.const 16 i32.const 2870 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -41205,7 +41203,7 @@ i32.const 16 i32.const 2871 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -41220,7 +41218,7 @@ i32.const 16 i32.const 2872 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -41235,7 +41233,7 @@ i32.const 16 i32.const 2873 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -41250,7 +41248,7 @@ i32.const 16 i32.const 2874 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41265,7 +41263,7 @@ i32.const 16 i32.const 2875 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41281,7 +41279,7 @@ i32.const 16 i32.const 2876 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -41296,7 +41294,7 @@ i32.const 16 i32.const 2877 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -41311,7 +41309,7 @@ i32.const 16 i32.const 2878 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41326,7 +41324,7 @@ i32.const 16 i32.const 2879 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41342,7 +41340,7 @@ i32.const 16 i32.const 2880 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -41357,7 +41355,7 @@ i32.const 16 i32.const 2881 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41372,7 +41370,7 @@ i32.const 16 i32.const 2882 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41387,7 +41385,7 @@ i32.const 16 i32.const 2883 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41402,7 +41400,7 @@ i32.const 16 i32.const 2884 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41418,7 +41416,7 @@ i32.const 16 i32.const 2885 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41434,7 +41432,7 @@ i32.const 16 i32.const 2886 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41450,7 +41448,7 @@ i32.const 16 i32.const 2887 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -41465,7 +41463,7 @@ i32.const 16 i32.const 2888 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -41480,7 +41478,7 @@ i32.const 16 i32.const 2889 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -41495,7 +41493,7 @@ i32.const 16 i32.const 2890 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -41510,7 +41508,7 @@ i32.const 16 i32.const 2891 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -41525,7 +41523,7 @@ i32.const 16 i32.const 2892 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41540,7 +41538,7 @@ i32.const 16 i32.const 2893 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41556,7 +41554,7 @@ i32.const 16 i32.const 2894 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -41572,7 +41570,7 @@ i32.const 16 i32.const 2895 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -41588,7 +41586,7 @@ i32.const 16 i32.const 2896 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41604,7 +41602,7 @@ i32.const 16 i32.const 2897 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41621,7 +41619,7 @@ i32.const 16 i32.const 2898 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -41636,7 +41634,7 @@ i32.const 16 i32.const 2899 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -41651,7 +41649,7 @@ i32.const 16 i32.const 2900 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -41666,7 +41664,7 @@ i32.const 16 i32.const 2901 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -41681,7 +41679,7 @@ i32.const 16 i32.const 2902 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -41696,7 +41694,7 @@ i32.const 16 i32.const 2903 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -41710,7 +41708,7 @@ i32.const 16 i32.const 2941 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -41724,7 +41722,7 @@ i32.const 16 i32.const 2942 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -41738,7 +41736,7 @@ i32.const 16 i32.const 2943 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -41752,7 +41750,7 @@ i32.const 16 i32.const 2944 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -41766,7 +41764,7 @@ i32.const 16 i32.const 2945 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -41780,7 +41778,7 @@ i32.const 16 i32.const 2946 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -41794,7 +41792,7 @@ i32.const 16 i32.const 2947 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -41808,7 +41806,7 @@ i32.const 16 i32.const 2948 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -41822,7 +41820,7 @@ i32.const 16 i32.const 2949 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -41836,7 +41834,7 @@ i32.const 16 i32.const 2950 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -41850,7 +41848,7 @@ i32.const 16 i32.const 2953 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -41864,7 +41862,7 @@ i32.const 16 i32.const 2954 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41878,7 +41876,7 @@ i32.const 16 i32.const 2955 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41893,7 +41891,7 @@ i32.const 16 i32.const 2956 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -41907,7 +41905,7 @@ i32.const 16 i32.const 2957 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.862645149230957e-09 @@ -41921,7 +41919,7 @@ i32.const 16 i32.const 2960 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.862645149230957e-09 @@ -41935,7 +41933,7 @@ i32.const 16 i32.const 2961 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754943508222875e-38 @@ -41949,7 +41947,7 @@ i32.const 16 i32.const 2962 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754943508222875e-38 @@ -41963,7 +41961,7 @@ i32.const 16 i32.const 2963 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -41979,7 +41977,7 @@ i32.const 16 i32.const 2964 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.401298464324817e-45 @@ -41995,7 +41993,7 @@ i32.const 16 i32.const 2965 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.175494490952134e-38 @@ -42009,7 +42007,7 @@ i32.const 16 i32.const 2966 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754946310819804e-38 @@ -42023,7 +42021,7 @@ i32.const 16 i32.const 2967 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509880009953429e-38 @@ -42037,7 +42035,7 @@ i32.const 16 i32.const 2968 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.350988701644575e-38 @@ -42051,7 +42049,7 @@ i32.const 16 i32.const 2969 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509895424236536e-38 @@ -42065,7 +42063,7 @@ i32.const 16 i32.const 2970 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.70197740328915e-38 @@ -42079,7 +42077,7 @@ i32.const 16 i32.const 2971 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1175870895385742e-08 @@ -42093,7 +42091,7 @@ i32.const 16 i32.const 2972 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.4901161193847656e-08 @@ -42107,7 +42105,7 @@ i32.const 16 i32.const 2973 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.000244140625 @@ -42121,7 +42119,7 @@ i32.const 16 i32.const 2974 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.0003662109375 @@ -42135,7 +42133,7 @@ i32.const 16 i32.const 2975 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.175494490952134e-38 @@ -42149,7 +42147,7 @@ i32.const 16 i32.const 2976 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754946310819804e-38 @@ -42163,7 +42161,7 @@ i32.const 16 i32.const 2977 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509880009953429e-38 @@ -42177,7 +42175,7 @@ i32.const 16 i32.const 2978 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.350988701644575e-38 @@ -42191,7 +42189,7 @@ i32.const 16 i32.const 2979 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509895424236536e-38 @@ -42205,7 +42203,7 @@ i32.const 16 i32.const 2980 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -4.70197740328915e-38 @@ -42219,7 +42217,7 @@ i32.const 16 i32.const 2981 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1175870895385742e-08 @@ -42233,7 +42231,7 @@ i32.const 16 i32.const 2982 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.4901161193847656e-08 @@ -42247,7 +42245,7 @@ i32.const 16 i32.const 2983 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.000244140625 @@ -42261,7 +42259,7 @@ i32.const 16 i32.const 2984 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.0003662109375 @@ -42275,7 +42273,7 @@ i32.const 16 i32.const 2985 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.802596928649634e-45 @@ -42291,7 +42289,7 @@ i32.const 16 i32.const 2986 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.2611686178923354e-44 @@ -42307,7 +42305,7 @@ i32.const 16 i32.const 2987 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.938735877055719e-39 @@ -42323,7 +42321,7 @@ i32.const 16 i32.const 2988 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -42339,7 +42337,7 @@ i32.const 16 i32.const 2989 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754940705625946e-38 @@ -42355,7 +42353,7 @@ i32.const 16 i32.const 2990 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754942106924411e-38 @@ -42371,7 +42369,7 @@ i32.const 16 i32.const 2991 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.802596928649634e-45 @@ -42387,7 +42385,7 @@ i32.const 16 i32.const 2992 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.2611686178923354e-44 @@ -42403,7 +42401,7 @@ i32.const 16 i32.const 2993 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.938735877055719e-39 @@ -42419,7 +42417,7 @@ i32.const 16 i32.const 2994 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5.877471754111438e-39 @@ -42435,7 +42433,7 @@ i32.const 16 i32.const 2995 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754940705625946e-38 @@ -42451,7 +42449,7 @@ i32.const 16 i32.const 2996 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754942106924411e-38 @@ -42467,7 +42465,7 @@ i32.const 16 i32.const 2997 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 255.99993896484375 @@ -42481,7 +42479,7 @@ i32.const 16 i32.const 3000 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5033165 @@ -42495,7 +42493,7 @@ i32.const 16 i32.const 3001 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 421657440 @@ -42509,7 +42507,7 @@ i32.const 16 i32.const 3002 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2147483392 @@ -42523,7 +42521,7 @@ i32.const 16 i32.const 3003 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 68719476736 @@ -42537,7 +42535,7 @@ i32.const 16 i32.const 3004 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 549755813888 @@ -42551,7 +42549,7 @@ i32.const 16 i32.const 3005 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_VALUE @@ -42565,7 +42563,7 @@ i32.const 16 i32.const 3006 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -255.99993896484375 @@ -42579,7 +42577,7 @@ i32.const 16 i32.const 3007 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5033165 @@ -42593,7 +42591,7 @@ i32.const 16 i32.const 3008 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -421657440 @@ -42607,7 +42605,7 @@ i32.const 16 i32.const 3009 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2147483392 @@ -42621,7 +42619,7 @@ i32.const 16 i32.const 3010 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -68719476736 @@ -42635,7 +42633,7 @@ i32.const 16 i32.const 3011 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -549755813888 @@ -42649,7 +42647,7 @@ i32.const 16 i32.const 3012 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_VALUE @@ -42664,7 +42662,7 @@ i32.const 16 i32.const 3013 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -42678,7 +42676,7 @@ i32.const 16 i32.const 3025 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -42692,7 +42690,7 @@ i32.const 16 i32.const 3026 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -42706,7 +42704,7 @@ i32.const 16 i32.const 3027 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -42720,7 +42718,7 @@ i32.const 16 i32.const 3028 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -42734,7 +42732,7 @@ i32.const 16 i32.const 3029 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -42748,7 +42746,7 @@ i32.const 16 i32.const 3030 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -42762,7 +42760,7 @@ i32.const 16 i32.const 3031 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -42776,7 +42774,7 @@ i32.const 16 i32.const 3032 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -42790,7 +42788,7 @@ i32.const 16 i32.const 3033 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -42804,7 +42802,7 @@ i32.const 16 i32.const 3034 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -42818,7 +42816,7 @@ i32.const 16 i32.const 3037 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -42832,7 +42830,7 @@ i32.const 16 i32.const 3038 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -42846,7 +42844,7 @@ i32.const 16 i32.const 3039 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -42862,7 +42860,7 @@ i32.const 16 i32.const 3040 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -42876,7 +42874,7 @@ i32.const 16 i32.const 3041 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -42890,7 +42888,7 @@ i32.const 16 i32.const 3050 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -42904,7 +42902,7 @@ i32.const 16 i32.const 3051 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -42918,7 +42916,7 @@ i32.const 16 i32.const 3052 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -42932,7 +42930,7 @@ i32.const 16 i32.const 3053 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -42946,7 +42944,7 @@ i32.const 16 i32.const 3054 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -42960,7 +42958,7 @@ i32.const 16 i32.const 3055 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -42974,7 +42972,7 @@ i32.const 16 i32.const 3056 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -42988,7 +42986,7 @@ i32.const 16 i32.const 3057 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -43002,7 +43000,7 @@ i32.const 16 i32.const 3058 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -43016,7 +43014,7 @@ i32.const 16 i32.const 3059 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -43030,7 +43028,7 @@ i32.const 16 i32.const 3062 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -43044,7 +43042,7 @@ i32.const 16 i32.const 3063 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -43058,7 +43056,7 @@ i32.const 16 i32.const 3064 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -43074,7 +43072,7 @@ i32.const 16 i32.const 3065 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -43088,7 +43086,7 @@ i32.const 16 i32.const 3066 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -43102,7 +43100,7 @@ i32.const 16 i32.const 3078 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -43116,7 +43114,7 @@ i32.const 16 i32.const 3079 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -43130,7 +43128,7 @@ i32.const 16 i32.const 3080 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -43144,7 +43142,7 @@ i32.const 16 i32.const 3081 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -43158,7 +43156,7 @@ i32.const 16 i32.const 3082 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -43172,7 +43170,7 @@ i32.const 16 i32.const 3083 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -43186,7 +43184,7 @@ i32.const 16 i32.const 3084 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -43200,7 +43198,7 @@ i32.const 16 i32.const 3085 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -43214,7 +43212,7 @@ i32.const 16 i32.const 3086 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -43228,7 +43226,7 @@ i32.const 16 i32.const 3087 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -43242,7 +43240,7 @@ i32.const 16 i32.const 3090 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -43256,7 +43254,7 @@ i32.const 16 i32.const 3091 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -43271,7 +43269,7 @@ i32.const 16 i32.const 3092 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -43285,7 +43283,7 @@ i32.const 16 i32.const 3093 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -43299,7 +43297,7 @@ i32.const 16 i32.const 3094 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -43313,7 +43311,7 @@ i32.const 16 i32.const 3095 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -43327,7 +43325,7 @@ i32.const 16 i32.const 3096 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4 @@ -43341,7 +43339,7 @@ i32.const 16 i32.const 3097 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-323 @@ -43355,7 +43353,7 @@ i32.const 16 i32.const 3098 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5e-323 @@ -43369,7 +43367,7 @@ i32.const 16 i32.const 3099 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -43383,7 +43381,7 @@ i32.const 16 i32.const 3100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -5e-324 @@ -43397,7 +43395,7 @@ i32.const 16 i32.const 3101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999999999999999 @@ -43411,7 +43409,7 @@ i32.const 16 i32.const 3102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.9999999999999998 @@ -43425,7 +43423,7 @@ i32.const 16 i32.const 3103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000000000000002 @@ -43439,7 +43437,7 @@ i32.const 16 i32.const 3104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.0000000000000004 @@ -43453,7 +43451,7 @@ i32.const 16 i32.const 3105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000000000000002 @@ -43467,7 +43465,7 @@ i32.const 16 i32.const 3106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999999999999999 @@ -43481,7 +43479,7 @@ i32.const 16 i32.const 3107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1797693134862315708145274e284 @@ -43495,7 +43493,7 @@ i32.const 16 i32.const 3108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -43509,7 +43507,7 @@ i32.const 16 i32.const 3109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 179769313486231490980915e285 @@ -43523,7 +43521,7 @@ i32.const 16 i32.const 3110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862314111473026e284 @@ -43537,7 +43535,7 @@ i32.const 16 i32.const 3111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862313313136902e284 @@ -43551,7 +43549,7 @@ i32.const 16 i32.const 3112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862312514800778e284 @@ -43565,7 +43563,7 @@ i32.const 16 i32.const 3113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862311716464655e284 @@ -43579,7 +43577,7 @@ i32.const 16 i32.const 3114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862310918128531e284 @@ -43593,7 +43591,7 @@ i32.const 16 i32.const 3115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862310119792407e284 @@ -43607,7 +43605,7 @@ i32.const 16 i32.const 3116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862309321456283e284 @@ -43621,7 +43619,7 @@ i32.const 16 i32.const 3117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862308523120159e284 @@ -43635,7 +43633,7 @@ i32.const 16 i32.const 3118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862307724784036e284 @@ -43649,7 +43647,7 @@ i32.const 16 i32.const 3119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507203e-308 @@ -43663,7 +43661,7 @@ i32.const 16 i32.const 3120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507205e-308 @@ -43677,7 +43675,7 @@ i32.const 16 i32.const 3121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507207e-308 @@ -43691,7 +43689,7 @@ i32.const 16 i32.const 3122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507209e-308 @@ -43705,7 +43703,7 @@ i32.const 16 i32.const 3123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507211e-308 @@ -43719,7 +43717,7 @@ i32.const 16 i32.const 3124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072127e-308 @@ -43733,7 +43731,7 @@ i32.const 16 i32.const 3125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072147e-308 @@ -43747,7 +43745,7 @@ i32.const 16 i32.const 3126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072167e-308 @@ -43761,7 +43759,7 @@ i32.const 16 i32.const 3127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072187e-308 @@ -43775,7 +43773,7 @@ i32.const 16 i32.const 3128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072207e-308 @@ -43789,7 +43787,7 @@ i32.const 16 i32.const 3129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072226e-308 @@ -43803,7 +43801,7 @@ i32.const 16 i32.const 3130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072246e-308 @@ -43817,7 +43815,7 @@ i32.const 16 i32.const 3131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072266e-308 @@ -43831,7 +43829,7 @@ i32.const 16 i32.const 3132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072286e-308 @@ -43845,7 +43843,7 @@ i32.const 16 i32.const 3133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 92.35130391890645 @@ -43859,7 +43857,7 @@ i32.const 16 i32.const 3134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 93.3599596388916 @@ -43873,7 +43871,7 @@ i32.const 16 i32.const 3135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 95.42049628886124 @@ -43887,7 +43885,7 @@ i32.const 16 i32.const 3136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 95.87916941885449 @@ -43901,7 +43899,7 @@ i32.const 16 i32.const 3137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 96.84804174884022 @@ -43915,7 +43913,7 @@ i32.const 16 i32.const 3138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 97.43639050883155 @@ -43929,7 +43927,7 @@ i32.const 16 i32.const 3139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 97.50957979883047 @@ -43943,7 +43941,7 @@ i32.const 16 i32.const 3140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 97.80496893882612 @@ -43957,7 +43955,7 @@ i32.const 16 i32.const 3141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 98.2751822888192 @@ -43971,7 +43969,7 @@ i32.const 16 i32.const 3142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 99.47293564880155 @@ -43985,7 +43983,7 @@ i32.const 16 i32.const 3143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 100.57047130878539 @@ -43999,7 +43997,7 @@ i32.const 16 i32.const 3144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 100.60954608878481 @@ -44013,7 +44011,7 @@ i32.const 16 i32.const 3145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 100.67909109878379 @@ -44027,7 +44025,7 @@ i32.const 16 i32.const 3146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 101.12268095877725 @@ -44041,7 +44039,7 @@ i32.const 16 i32.const 3147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 101.3027691287746 @@ -44055,7 +44053,7 @@ i32.const 16 i32.const 3148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.45932313565507e-307 @@ -44069,7 +44067,7 @@ i32.const 16 i32.const 3149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5.610957305180409e-307 @@ -44083,7 +44081,7 @@ i32.const 16 i32.const 3150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5.8073887977408524e-307 @@ -44097,7 +44095,7 @@ i32.const 16 i32.const 3151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.026137080471427e-307 @@ -44111,7 +44109,7 @@ i32.const 16 i32.const 3152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8.438697769194972e-307 @@ -44125,7 +44123,7 @@ i32.const 16 i32.const 3153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1607792515836795e-306 @@ -44139,7 +44137,7 @@ i32.const 16 i32.const 3154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.2827413827423193e-306 @@ -44153,7 +44151,7 @@ i32.const 16 i32.const 3155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.7116604596087457e-306 @@ -44167,7 +44165,7 @@ i32.const 16 i32.const 3156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.038173251686994e-306 @@ -44181,7 +44179,7 @@ i32.const 16 i32.const 3157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.171572060856931e-306 @@ -44195,7 +44193,7 @@ i32.const 16 i32.const 3158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.4681399631804094e-306 @@ -44209,7 +44207,7 @@ i32.const 16 i32.const 3159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.5175533964200588e-306 @@ -44223,7 +44221,7 @@ i32.const 16 i32.const 3160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.6461505468829625e-306 @@ -44237,7 +44235,7 @@ i32.const 16 i32.const 3161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3.8167076367720413e-306 @@ -44251,7 +44249,7 @@ i32.const 16 i32.const 3162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.5743220778562766e-306 @@ -44265,7 +44263,7 @@ i32.const 16 i32.const 3163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -44279,7 +44277,7 @@ i32.const 16 i32.const 3172 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -44293,7 +44291,7 @@ i32.const 16 i32.const 3173 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -44307,7 +44305,7 @@ i32.const 16 i32.const 3174 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -44321,7 +44319,7 @@ i32.const 16 i32.const 3175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -44335,7 +44333,7 @@ i32.const 16 i32.const 3176 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -44349,7 +44347,7 @@ i32.const 16 i32.const 3177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -44363,7 +44361,7 @@ i32.const 16 i32.const 3178 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -44377,7 +44375,7 @@ i32.const 16 i32.const 3179 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -44391,7 +44389,7 @@ i32.const 16 i32.const 3180 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -44405,7 +44403,7 @@ i32.const 16 i32.const 3181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -44419,7 +44417,7 @@ i32.const 16 i32.const 3184 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -44433,7 +44431,7 @@ i32.const 16 i32.const 3185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -44448,7 +44446,7 @@ i32.const 16 i32.const 3186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -44462,7 +44460,7 @@ i32.const 16 i32.const 3187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -44476,7 +44474,7 @@ i32.const 16 i32.const 3188 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -44490,7 +44488,7 @@ i32.const 16 i32.const 3189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -44504,7 +44502,7 @@ i32.const 16 i32.const 3190 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4 @@ -44518,7 +44516,7 @@ i32.const 16 i32.const 3191 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.802596928649634e-45 @@ -44532,7 +44530,7 @@ i32.const 16 i32.const 3192 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.203895392974451e-45 @@ -44546,7 +44544,7 @@ i32.const 16 i32.const 3193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -44560,7 +44558,7 @@ i32.const 16 i32.const 3194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.401298464324817e-45 @@ -44574,7 +44572,7 @@ i32.const 16 i32.const 3195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -44588,7 +44586,7 @@ i32.const 16 i32.const 3196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3402823466385288598117041e14 @@ -44602,7 +44600,7 @@ i32.const 16 i32.const 3197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999998807907104 @@ -44616,7 +44614,7 @@ i32.const 16 i32.const 3198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999999403953552 @@ -44630,7 +44628,7 @@ i32.const 16 i32.const 3199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.999999761581421 @@ -44644,7 +44642,7 @@ i32.const 16 i32.const 3200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.9999998807907104 @@ -44658,7 +44656,7 @@ i32.const 16 i32.const 3201 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000001192092896 @@ -44672,7 +44670,7 @@ i32.const 16 i32.const 3202 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.000000238418579 @@ -44686,7 +44684,7 @@ i32.const 16 i32.const 3203 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.000000238418579 @@ -44700,7 +44698,7 @@ i32.const 16 i32.const 3204 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.000000476837158 @@ -44714,7 +44712,7 @@ i32.const 16 i32.const 3205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -44728,7 +44726,7 @@ i32.const 16 i32.const 3243 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -44742,7 +44740,7 @@ i32.const 16 i32.const 3244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -44756,7 +44754,7 @@ i32.const 16 i32.const 3245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -44770,7 +44768,7 @@ i32.const 16 i32.const 3246 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -44784,7 +44782,7 @@ i32.const 16 i32.const 3247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -44798,7 +44796,7 @@ i32.const 16 i32.const 3248 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -44812,7 +44810,7 @@ i32.const 16 i32.const 3249 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -44826,7 +44824,7 @@ i32.const 16 i32.const 3250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -44840,7 +44838,7 @@ i32.const 16 i32.const 3251 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -44854,7 +44852,7 @@ i32.const 16 i32.const 3252 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -44868,7 +44866,7 @@ i32.const 16 i32.const 3255 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -44882,7 +44880,7 @@ i32.const 16 i32.const 3256 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -44896,7 +44894,7 @@ i32.const 16 i32.const 3257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -44911,7 +44909,7 @@ i32.const 16 i32.const 3258 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -44925,7 +44923,7 @@ i32.const 16 i32.const 3259 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.862645149230957e-09 @@ -44939,7 +44937,7 @@ i32.const 16 i32.const 3262 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.862645149230957e-09 @@ -44953,7 +44951,7 @@ i32.const 16 i32.const 3263 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754943508222875e-38 @@ -44967,7 +44965,7 @@ i32.const 16 i32.const 3264 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754943508222875e-38 @@ -44981,7 +44979,7 @@ i32.const 16 i32.const 3265 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -44997,7 +44995,7 @@ i32.const 16 i32.const 3266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.401298464324817e-45 @@ -45013,7 +45011,7 @@ i32.const 16 i32.const 3267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.175494490952134e-38 @@ -45027,7 +45025,7 @@ i32.const 16 i32.const 3268 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754946310819804e-38 @@ -45041,7 +45039,7 @@ i32.const 16 i32.const 3269 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509880009953429e-38 @@ -45055,7 +45053,7 @@ i32.const 16 i32.const 3270 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.350988701644575e-38 @@ -45069,7 +45067,7 @@ i32.const 16 i32.const 3271 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509895424236536e-38 @@ -45083,7 +45081,7 @@ i32.const 16 i32.const 3272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.70197740328915e-38 @@ -45097,7 +45095,7 @@ i32.const 16 i32.const 3273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1175870895385742e-08 @@ -45111,7 +45109,7 @@ i32.const 16 i32.const 3274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.4901161193847656e-08 @@ -45125,7 +45123,7 @@ i32.const 16 i32.const 3275 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.000244140625 @@ -45139,7 +45137,7 @@ i32.const 16 i32.const 3276 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.175494490952134e-38 @@ -45153,7 +45151,7 @@ i32.const 16 i32.const 3277 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754946310819804e-38 @@ -45167,7 +45165,7 @@ i32.const 16 i32.const 3278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509880009953429e-38 @@ -45181,7 +45179,7 @@ i32.const 16 i32.const 3279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.350988701644575e-38 @@ -45195,7 +45193,7 @@ i32.const 16 i32.const 3280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509895424236536e-38 @@ -45209,7 +45207,7 @@ i32.const 16 i32.const 3281 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -4.70197740328915e-38 @@ -45223,7 +45221,7 @@ i32.const 16 i32.const 3282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1175870895385742e-08 @@ -45237,7 +45235,7 @@ i32.const 16 i32.const 3283 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.4901161193847656e-08 @@ -45251,7 +45249,7 @@ i32.const 16 i32.const 3284 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.000244140625 @@ -45265,7 +45263,7 @@ i32.const 16 i32.const 3285 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.802596928649634e-45 @@ -45281,7 +45279,7 @@ i32.const 16 i32.const 3286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.2611686178923354e-44 @@ -45297,7 +45295,7 @@ i32.const 16 i32.const 3287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.938735877055719e-39 @@ -45313,7 +45311,7 @@ i32.const 16 i32.const 3288 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -45329,7 +45327,7 @@ i32.const 16 i32.const 3289 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754940705625946e-38 @@ -45345,7 +45343,7 @@ i32.const 16 i32.const 3290 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754942106924411e-38 @@ -45361,7 +45359,7 @@ i32.const 16 i32.const 3291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.802596928649634e-45 @@ -45377,7 +45375,7 @@ i32.const 16 i32.const 3292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.2611686178923354e-44 @@ -45393,7 +45391,7 @@ i32.const 16 i32.const 3293 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.938735877055719e-39 @@ -45409,7 +45407,7 @@ i32.const 16 i32.const 3294 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5.877471754111438e-39 @@ -45425,7 +45423,7 @@ i32.const 16 i32.const 3295 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754940705625946e-38 @@ -45441,7 +45439,7 @@ i32.const 16 i32.const 3296 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754942106924411e-38 @@ -45457,7 +45455,7 @@ i32.const 16 i32.const 3297 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -45471,7 +45469,7 @@ i32.const 16 i32.const 3309 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -45485,7 +45483,7 @@ i32.const 16 i32.const 3310 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -45499,7 +45497,7 @@ i32.const 16 i32.const 3311 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -45513,7 +45511,7 @@ i32.const 16 i32.const 3312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -45527,7 +45525,7 @@ i32.const 16 i32.const 3313 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -45541,7 +45539,7 @@ i32.const 16 i32.const 3314 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -45555,7 +45553,7 @@ i32.const 16 i32.const 3315 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -45569,7 +45567,7 @@ i32.const 16 i32.const 3316 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -45583,7 +45581,7 @@ i32.const 16 i32.const 3317 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -45597,7 +45595,7 @@ i32.const 16 i32.const 3318 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -45611,7 +45609,7 @@ i32.const 16 i32.const 3321 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -45625,7 +45623,7 @@ i32.const 16 i32.const 3322 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -45639,7 +45637,7 @@ i32.const 16 i32.const 3323 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -45654,7 +45652,7 @@ i32.const 16 i32.const 3324 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -45668,7 +45666,7 @@ i32.const 16 i32.const 3325 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -45682,7 +45680,7 @@ i32.const 16 i32.const 3334 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -45696,7 +45694,7 @@ i32.const 16 i32.const 3335 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -45710,7 +45708,7 @@ i32.const 16 i32.const 3336 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -45724,7 +45722,7 @@ i32.const 16 i32.const 3337 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -45738,7 +45736,7 @@ i32.const 16 i32.const 3338 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -45752,7 +45750,7 @@ i32.const 16 i32.const 3339 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -45766,7 +45764,7 @@ i32.const 16 i32.const 3340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -45780,7 +45778,7 @@ i32.const 16 i32.const 3341 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -45794,7 +45792,7 @@ i32.const 16 i32.const 3342 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -45808,7 +45806,7 @@ i32.const 16 i32.const 3343 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -45822,7 +45820,7 @@ i32.const 16 i32.const 3346 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -45836,7 +45834,7 @@ i32.const 16 i32.const 3347 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -45850,7 +45848,7 @@ i32.const 16 i32.const 3348 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -45865,7 +45863,7 @@ i32.const 16 i32.const 3349 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -45879,7 +45877,7 @@ i32.const 16 i32.const 3350 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -45893,7 +45891,7 @@ i32.const 16 i32.const 3362 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -45907,7 +45905,7 @@ i32.const 16 i32.const 3363 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -45921,7 +45919,7 @@ i32.const 16 i32.const 3364 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -45935,7 +45933,7 @@ i32.const 16 i32.const 3365 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -45949,7 +45947,7 @@ i32.const 16 i32.const 3366 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -45963,7 +45961,7 @@ i32.const 16 i32.const 3367 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -45977,7 +45975,7 @@ i32.const 16 i32.const 3368 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -45991,7 +45989,7 @@ i32.const 16 i32.const 3369 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -46005,7 +46003,7 @@ i32.const 16 i32.const 3370 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -46019,7 +46017,7 @@ i32.const 16 i32.const 3371 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -46033,7 +46031,7 @@ i32.const 16 i32.const 3374 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -46047,7 +46045,7 @@ i32.const 16 i32.const 3375 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -46063,7 +46061,7 @@ i32.const 16 i32.const 3376 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -46077,7 +46075,7 @@ i32.const 16 i32.const 3377 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -46091,7 +46089,7 @@ i32.const 16 i32.const 3378 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -46105,7 +46103,7 @@ i32.const 16 i32.const 3379 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -46119,7 +46117,7 @@ i32.const 16 i32.const 3380 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -46133,7 +46131,7 @@ i32.const 16 i32.const 3381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -46147,7 +46145,7 @@ i32.const 16 i32.const 3382 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -46161,7 +46159,7 @@ i32.const 16 i32.const 3383 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -46175,7 +46173,7 @@ i32.const 16 i32.const 3384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -46189,7 +46187,7 @@ i32.const 16 i32.const 3385 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -46203,7 +46201,7 @@ i32.const 16 i32.const 3386 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -46217,7 +46215,7 @@ i32.const 16 i32.const 3387 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -46231,7 +46229,7 @@ i32.const 16 i32.const 3388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -46245,7 +46243,7 @@ i32.const 16 i32.const 3397 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -46259,7 +46257,7 @@ i32.const 16 i32.const 3398 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -46273,7 +46271,7 @@ i32.const 16 i32.const 3399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -46287,7 +46285,7 @@ i32.const 16 i32.const 3400 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -46301,7 +46299,7 @@ i32.const 16 i32.const 3401 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -46315,7 +46313,7 @@ i32.const 16 i32.const 3402 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -46329,7 +46327,7 @@ i32.const 16 i32.const 3403 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -46343,7 +46341,7 @@ i32.const 16 i32.const 3404 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -46357,7 +46355,7 @@ i32.const 16 i32.const 3405 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -46371,7 +46369,7 @@ i32.const 16 i32.const 3406 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -46385,7 +46383,7 @@ i32.const 16 i32.const 3409 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -46399,7 +46397,7 @@ i32.const 16 i32.const 3410 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -46415,7 +46413,7 @@ i32.const 16 i32.const 3411 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -46429,7 +46427,7 @@ i32.const 16 i32.const 3412 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -46443,7 +46441,7 @@ i32.const 16 i32.const 3413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -46457,7 +46455,7 @@ i32.const 16 i32.const 3414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -46471,7 +46469,7 @@ i32.const 16 i32.const 3415 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -46485,7 +46483,7 @@ i32.const 16 i32.const 3416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -46499,7 +46497,7 @@ i32.const 16 i32.const 3417 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -46513,7 +46511,7 @@ i32.const 16 i32.const 3418 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -46527,7 +46525,7 @@ i32.const 16 i32.const 3419 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -46541,7 +46539,7 @@ i32.const 16 i32.const 3420 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -46555,7 +46553,7 @@ i32.const 16 i32.const 3421 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -46569,7 +46567,7 @@ i32.const 16 i32.const 3422 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -46583,7 +46581,7 @@ i32.const 16 i32.const 3423 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -46597,7 +46595,7 @@ i32.const 16 i32.const 3427 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -46611,7 +46609,7 @@ i32.const 16 i32.const 3428 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -46625,7 +46623,7 @@ i32.const 16 i32.const 3429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967295 @@ -46639,7 +46637,7 @@ i32.const 16 i32.const 3430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967294 @@ -46653,7 +46651,7 @@ i32.const 16 i32.const 3431 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.e+60 @@ -46667,7 +46665,7 @@ i32.const 16 i32.const 3432 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.e+60 @@ -46681,7 +46679,7 @@ i32.const 16 i32.const 3433 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.e+60 @@ -46695,7 +46693,7 @@ i32.const 16 i32.const 3434 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.e+24 @@ -46709,7 +46707,7 @@ i32.const 16 i32.const 3435 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -46723,7 +46721,7 @@ i32.const 16 i32.const 3436 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -46737,7 +46735,7 @@ i32.const 16 i32.const 3437 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_VALUE @@ -46751,7 +46749,7 @@ i32.const 16 i32.const 3438 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -46764,7 +46762,7 @@ i32.const 16 i32.const 3442 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -46777,7 +46775,7 @@ i32.const 16 i32.const 3443 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -46790,7 +46788,7 @@ i32.const 16 i32.const 3444 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -128 @@ -46803,7 +46801,7 @@ i32.const 16 i32.const 3445 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967295 @@ -46816,7 +46814,7 @@ i32.const 16 i32.const 3446 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967295.5 @@ -46829,7 +46827,7 @@ i32.const 16 i32.const 3447 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967296 @@ -46842,7 +46840,7 @@ i32.const 16 i32.const 3448 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967297 @@ -46855,7 +46853,7 @@ i32.const 16 i32.const 3449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -46868,7 +46866,7 @@ i32.const 16 i32.const 3450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -46881,7 +46879,7 @@ i32.const 16 i32.const 3451 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_SAFE_INTEGER @@ -46894,7 +46892,7 @@ i32.const 16 i32.const 3452 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_SAFE_INTEGER @@ -46908,7 +46906,7 @@ i32.const 16 i32.const 3453 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_VALUE @@ -46921,7 +46919,7 @@ i32.const 16 i32.const 3454 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_VALUE @@ -46934,7 +46932,7 @@ i32.const 16 i32.const 3455 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_VALUE @@ -46948,7 +46946,7 @@ i32.const 16 i32.const 3456 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.EPSILON @@ -46961,7 +46959,7 @@ i32.const 16 i32.const 3457 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -46975,7 +46973,7 @@ i32.const 16 i32.const 3461 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -46989,7 +46987,7 @@ i32.const 16 i32.const 3462 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -47003,7 +47001,7 @@ i32.const 16 i32.const 3463 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -47017,7 +47015,7 @@ i32.const 16 i32.const 3464 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -47031,7 +47029,7 @@ i32.const 16 i32.const 3466 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -47045,7 +47043,7 @@ i32.const 16 i32.const 3467 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -47059,7 +47057,7 @@ i32.const 16 i32.const 3468 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -47073,7 +47071,7 @@ i32.const 16 i32.const 3469 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -47087,7 +47085,7 @@ i32.const 16 i32.const 3471 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -47101,7 +47099,7 @@ i32.const 16 i32.const 3472 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -47115,7 +47113,7 @@ i32.const 16 i32.const 3473 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -47129,7 +47127,7 @@ i32.const 16 i32.const 3474 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -47143,7 +47141,7 @@ i32.const 16 i32.const 3476 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -47157,7 +47155,7 @@ i32.const 16 i32.const 3477 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -47171,7 +47169,7 @@ i32.const 16 i32.const 3478 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -47185,7 +47183,7 @@ i32.const 16 i32.const 3479 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -2 @@ -47199,7 +47197,7 @@ i32.const 16 i32.const 3481 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -2 @@ -47213,7 +47211,7 @@ i32.const 16 i32.const 3482 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -2 @@ -47227,7 +47225,7 @@ i32.const 16 i32.const 3483 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -2 @@ -47241,7 +47239,7 @@ i32.const 16 i32.const 3484 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -47255,7 +47253,7 @@ i32.const 16 i32.const 3486 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -47269,7 +47267,7 @@ i32.const 16 i32.const 3487 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -47283,7 +47281,7 @@ i32.const 16 i32.const 3488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -47297,7 +47295,7 @@ i32.const 16 i32.const 3489 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -47311,7 +47309,7 @@ i32.const 16 i32.const 3490 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -47325,7 +47323,7 @@ i32.const 16 i32.const 3491 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -47339,7 +47337,7 @@ i32.const 16 i32.const 3492 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 57055 @@ -47357,7 +47355,7 @@ i32.const 16 i32.const 3494 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -47371,7 +47369,7 @@ i32.const 16 i32.const 3498 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -47385,7 +47383,7 @@ i32.const 16 i32.const 3499 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -47398,7 +47396,7 @@ i32.const 16 i32.const 3500 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -47411,7 +47409,7 @@ i32.const 16 i32.const 3501 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -47424,7 +47422,7 @@ i32.const 16 i32.const 3502 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -47438,7 +47436,7 @@ i32.const 16 i32.const 3503 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -47452,7 +47450,7 @@ i32.const 16 i32.const 3504 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -47467,7 +47465,7 @@ i32.const 16 i32.const 3505 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -47483,7 +47481,7 @@ i32.const 16 i32.const 3506 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -47498,7 +47496,7 @@ i32.const 16 i32.const 3507 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -47512,7 +47510,7 @@ i32.const 16 i32.const 3508 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_VALUE @@ -47526,7 +47524,7 @@ i32.const 16 i32.const 3509 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MIN_VALUE @@ -47540,7 +47538,7 @@ i32.const 16 i32.const 3510 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_VALUE @@ -47554,7 +47552,7 @@ i32.const 16 i32.const 3511 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 10 @@ -47568,7 +47566,7 @@ i32.const 16 i32.const 3512 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 10 @@ -47582,7 +47580,7 @@ i32.const 16 i32.const 3513 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -47596,7 +47594,7 @@ i32.const 16 i32.const 3517 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -47610,7 +47608,7 @@ i32.const 16 i32.const 3518 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -47623,7 +47621,7 @@ i32.const 16 i32.const 3519 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -47636,7 +47634,7 @@ i32.const 16 i32.const 3520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -47649,7 +47647,7 @@ i32.const 16 i32.const 3521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -47663,7 +47661,7 @@ i32.const 16 i32.const 3522 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -47677,7 +47675,7 @@ i32.const 16 i32.const 3523 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -47692,7 +47690,7 @@ i32.const 16 i32.const 3524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -47708,7 +47706,7 @@ i32.const 16 i32.const 3525 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -47723,7 +47721,7 @@ i32.const 16 i32.const 3526 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -47737,7 +47735,7 @@ i32.const 16 i32.const 3527 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_VALUE @@ -47751,7 +47749,7 @@ i32.const 16 i32.const 3528 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_VALUE @@ -47765,7 +47763,7 @@ i32.const 16 i32.const 3529 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_VALUE @@ -47779,7 +47777,7 @@ i32.const 16 i32.const 3530 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 10 @@ -47793,7 +47791,7 @@ i32.const 16 i32.const 3531 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 10 @@ -47807,7 +47805,7 @@ i32.const 16 i32.const 3532 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/std/mod.optimized.wat b/tests/compiler/std/mod.optimized.wat index c67583d71a..1388652d01 100644 --- a/tests/compiler/std/mod.optimized.wat +++ b/tests/compiler/std/mod.optimized.wat @@ -8,13 +8,10 @@ (type $FUNCSIG$iff (func (param f32 f32) (result i32))) (type $FUNCSIG$v (func)) (import "math" "mod" (func $std/mod/mod (param f64 f64) (result f64))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\14\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\14\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s") (export "memory" (memory $0)) - (export "table" (table $0)) (export "mod" (func $std/mod/mod)) (start $start) (func $~lib/math/NativeMath.mod (; 2 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) @@ -515,7 +512,7 @@ i32.const 16 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3 @@ -528,7 +525,7 @@ i32.const 16 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -541,7 +538,7 @@ i32.const 16 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -554,7 +551,7 @@ i32.const 16 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3.5 @@ -567,7 +564,7 @@ i32.const 16 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3.5 @@ -580,7 +577,7 @@ i32.const 16 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3.5 @@ -593,7 +590,7 @@ i32.const 16 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3.5 @@ -606,7 +603,7 @@ i32.const 16 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3 @@ -619,7 +616,7 @@ i32.const 16 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3 @@ -632,7 +629,7 @@ i32.const 16 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -645,7 +642,7 @@ i32.const 16 i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -658,7 +655,7 @@ i32.const 16 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -671,7 +668,7 @@ i32.const 16 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -684,7 +681,7 @@ i32.const 16 i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -697,7 +694,7 @@ i32.const 16 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -710,7 +707,7 @@ i32.const 16 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -723,7 +720,7 @@ i32.const 16 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -736,7 +733,7 @@ i32.const 16 i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -749,7 +746,7 @@ i32.const 16 i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -762,7 +759,7 @@ i32.const 16 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.25 @@ -775,7 +772,7 @@ i32.const 16 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.25 @@ -788,7 +785,7 @@ i32.const 16 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.25 @@ -801,7 +798,7 @@ i32.const 16 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.25 @@ -814,7 +811,7 @@ i32.const 16 i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -827,7 +824,7 @@ i32.const 16 i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -840,7 +837,7 @@ i32.const 16 i32.const 45 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -853,7 +850,7 @@ i32.const 16 i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -866,7 +863,7 @@ i32.const 16 i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -13 @@ -879,7 +876,7 @@ i32.const 16 i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -892,7 +889,7 @@ i32.const 16 i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -905,7 +902,7 @@ i32.const 16 i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -918,7 +915,7 @@ i32.const 16 i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -931,7 +928,7 @@ i32.const 16 i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -944,7 +941,7 @@ i32.const 16 i32.const 55 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -957,7 +954,7 @@ i32.const 16 i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -970,7 +967,7 @@ i32.const 16 i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -983,7 +980,7 @@ i32.const 16 i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -996,7 +993,7 @@ i32.const 16 i32.const 59 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -1009,7 +1006,7 @@ i32.const 16 i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -1022,7 +1019,7 @@ i32.const 16 i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -1035,7 +1032,7 @@ i32.const 16 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1048,7 +1045,7 @@ i32.const 16 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1061,7 +1058,7 @@ i32.const 16 i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1074,7 +1071,7 @@ i32.const 16 i32.const 65 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1087,7 +1084,7 @@ i32.const 16 i32.const 66 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1100,7 +1097,7 @@ i32.const 16 i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1113,7 +1110,7 @@ i32.const 16 i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1126,7 +1123,7 @@ i32.const 16 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1139,7 +1136,7 @@ i32.const 16 i32.const 70 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1152,7 +1149,7 @@ i32.const 16 i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -1165,7 +1162,7 @@ i32.const 16 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -1178,7 +1175,7 @@ i32.const 16 i32.const 73 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -1191,7 +1188,7 @@ i32.const 16 i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -1204,7 +1201,7 @@ i32.const 16 i32.const 75 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -1217,7 +1214,7 @@ i32.const 16 i32.const 76 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -1230,7 +1227,7 @@ i32.const 16 i32.const 77 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -1243,7 +1240,7 @@ i32.const 16 i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -1256,7 +1253,7 @@ i32.const 16 i32.const 79 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1269,7 +1266,7 @@ i32.const 16 i32.const 80 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1282,7 +1279,7 @@ i32.const 16 i32.const 81 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -1295,7 +1292,7 @@ i32.const 16 i32.const 82 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -1308,7 +1305,7 @@ i32.const 16 i32.const 83 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1321,7 +1318,7 @@ i32.const 16 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1334,7 +1331,7 @@ i32.const 16 i32.const 85 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -1347,7 +1344,7 @@ i32.const 16 i32.const 86 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -1360,7 +1357,7 @@ i32.const 16 i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1373,7 +1370,7 @@ i32.const 16 i32.const 88 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -1386,7 +1383,7 @@ i32.const 16 i32.const 89 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1399,7 +1396,7 @@ i32.const 16 i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -1412,7 +1409,7 @@ i32.const 16 i32.const 91 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1425,7 +1422,7 @@ i32.const 16 i32.const 92 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -1438,7 +1435,7 @@ i32.const 16 i32.const 93 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1451,7 +1448,7 @@ i32.const 16 i32.const 94 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1464,7 +1461,7 @@ i32.const 16 i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -1477,7 +1474,7 @@ i32.const 16 i32.const 104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -1490,7 +1487,7 @@ i32.const 16 i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -1503,7 +1500,7 @@ i32.const 16 i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -1516,7 +1513,7 @@ i32.const 16 i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3.5 @@ -1529,7 +1526,7 @@ i32.const 16 i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3.5 @@ -1542,7 +1539,7 @@ i32.const 16 i32.const 109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3.5 @@ -1555,7 +1552,7 @@ i32.const 16 i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3.5 @@ -1568,7 +1565,7 @@ i32.const 16 i32.const 111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -1581,7 +1578,7 @@ i32.const 16 i32.const 112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -1594,7 +1591,7 @@ i32.const 16 i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -1607,7 +1604,7 @@ i32.const 16 i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -1620,7 +1617,7 @@ i32.const 16 i32.const 115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -1633,7 +1630,7 @@ i32.const 16 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -1646,7 +1643,7 @@ i32.const 16 i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -1659,7 +1656,7 @@ i32.const 16 i32.const 118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -1672,7 +1669,7 @@ i32.const 16 i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -1685,7 +1682,7 @@ i32.const 16 i32.const 120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -1698,7 +1695,7 @@ i32.const 16 i32.const 121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -1711,7 +1708,7 @@ i32.const 16 i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -1724,7 +1721,7 @@ i32.const 16 i32.const 123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -1737,7 +1734,7 @@ i32.const 16 i32.const 126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -1750,7 +1747,7 @@ i32.const 16 i32.const 127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -1763,7 +1760,7 @@ i32.const 16 i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -1776,7 +1773,7 @@ i32.const 16 i32.const 129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -1789,7 +1786,7 @@ i32.const 16 i32.const 130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -1802,7 +1799,7 @@ i32.const 16 i32.const 131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -1815,7 +1812,7 @@ i32.const 16 i32.const 132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -1828,7 +1825,7 @@ i32.const 16 i32.const 133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1841,7 +1838,7 @@ i32.const 16 i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1854,7 +1851,7 @@ i32.const 16 i32.const 135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1867,7 +1864,7 @@ i32.const 16 i32.const 136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1880,7 +1877,7 @@ i32.const 16 i32.const 137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1893,7 +1890,7 @@ i32.const 16 i32.const 138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1906,7 +1903,7 @@ i32.const 16 i32.const 139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1919,7 +1916,7 @@ i32.const 16 i32.const 140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1932,7 +1929,7 @@ i32.const 16 i32.const 141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1945,7 +1942,7 @@ i32.const 16 i32.const 142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -1958,7 +1955,7 @@ i32.const 16 i32.const 143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -1971,7 +1968,7 @@ i32.const 16 i32.const 144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -1984,7 +1981,7 @@ i32.const 16 i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -1997,7 +1994,7 @@ i32.const 16 i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -2010,7 +2007,7 @@ i32.const 16 i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -2023,7 +2020,7 @@ i32.const 16 i32.const 148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -2036,7 +2033,7 @@ i32.const 16 i32.const 149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -2049,7 +2046,7 @@ i32.const 16 i32.const 150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2062,7 +2059,7 @@ i32.const 16 i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2075,7 +2072,7 @@ i32.const 16 i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -2088,7 +2085,7 @@ i32.const 16 i32.const 153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -2101,7 +2098,7 @@ i32.const 16 i32.const 154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2114,7 +2111,7 @@ i32.const 16 i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2127,7 +2124,7 @@ i32.const 16 i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -2140,7 +2137,7 @@ i32.const 16 i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -2153,7 +2150,7 @@ i32.const 16 i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2166,7 +2163,7 @@ i32.const 16 i32.const 159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -2179,7 +2176,7 @@ i32.const 16 i32.const 160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2192,7 +2189,7 @@ i32.const 16 i32.const 161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -2205,7 +2202,7 @@ i32.const 16 i32.const 162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2218,7 +2215,7 @@ i32.const 16 i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -2231,7 +2228,7 @@ i32.const 16 i32.const 164 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2244,7 +2241,7 @@ i32.const 16 i32.const 165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2257,7 +2254,7 @@ i32.const 16 i32.const 166 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/std/mod.untouched.wat b/tests/compiler/std/mod.untouched.wat index 15146cdec6..52392790ef 100644 --- a/tests/compiler/std/mod.untouched.wat +++ b/tests/compiler/std/mod.untouched.wat @@ -10,15 +10,13 @@ (type $FUNCSIG$iff (func (param f32 f32) (result i32))) (type $FUNCSIG$v (func)) (import "math" "mod" (func $std/mod/mod (param f64 f64) (result f64))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\14\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\14\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/mod/js i32 (i32.const 1)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 36)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "mod" (func $std/mod/mod)) (start $start) (func $~lib/builtins/isNaN (; 2 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) @@ -630,7 +628,7 @@ i32.const 16 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3 @@ -643,7 +641,7 @@ i32.const 16 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -656,7 +654,7 @@ i32.const 16 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -669,7 +667,7 @@ i32.const 16 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3.5 @@ -682,7 +680,7 @@ i32.const 16 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3.5 @@ -695,7 +693,7 @@ i32.const 16 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3.5 @@ -708,7 +706,7 @@ i32.const 16 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3.5 @@ -721,7 +719,7 @@ i32.const 16 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3 @@ -734,7 +732,7 @@ i32.const 16 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3 @@ -747,7 +745,7 @@ i32.const 16 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -760,7 +758,7 @@ i32.const 16 i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -773,7 +771,7 @@ i32.const 16 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -786,7 +784,7 @@ i32.const 16 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -799,7 +797,7 @@ i32.const 16 i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -812,7 +810,7 @@ i32.const 16 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -825,7 +823,7 @@ i32.const 16 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -838,7 +836,7 @@ i32.const 16 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -851,7 +849,7 @@ i32.const 16 i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -864,7 +862,7 @@ i32.const 16 i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -877,7 +875,7 @@ i32.const 16 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.25 @@ -890,7 +888,7 @@ i32.const 16 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.25 @@ -903,7 +901,7 @@ i32.const 16 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.25 @@ -916,7 +914,7 @@ i32.const 16 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.25 @@ -929,7 +927,7 @@ i32.const 16 i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -942,7 +940,7 @@ i32.const 16 i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -955,7 +953,7 @@ i32.const 16 i32.const 45 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -968,7 +966,7 @@ i32.const 16 i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -981,7 +979,7 @@ i32.const 16 i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -13 @@ -994,7 +992,7 @@ i32.const 16 i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -1007,7 +1005,7 @@ i32.const 16 i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -1020,7 +1018,7 @@ i32.const 16 i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -1033,7 +1031,7 @@ i32.const 16 i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -1046,7 +1044,7 @@ i32.const 16 i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -1059,7 +1057,7 @@ i32.const 16 i32.const 55 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -1072,7 +1070,7 @@ i32.const 16 i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -1085,7 +1083,7 @@ i32.const 16 i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -1098,7 +1096,7 @@ i32.const 16 i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -1111,7 +1109,7 @@ i32.const 16 i32.const 59 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -1124,7 +1122,7 @@ i32.const 16 i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -1137,7 +1135,7 @@ i32.const 16 i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -1150,7 +1148,7 @@ i32.const 16 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1163,7 +1161,7 @@ i32.const 16 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1176,7 +1174,7 @@ i32.const 16 i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1189,7 +1187,7 @@ i32.const 16 i32.const 65 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1202,7 +1200,7 @@ i32.const 16 i32.const 66 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1215,7 +1213,7 @@ i32.const 16 i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1228,7 +1226,7 @@ i32.const 16 i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1241,7 +1239,7 @@ i32.const 16 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1254,7 +1252,7 @@ i32.const 16 i32.const 70 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1267,7 +1265,7 @@ i32.const 16 i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -1280,7 +1278,7 @@ i32.const 16 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -1293,7 +1291,7 @@ i32.const 16 i32.const 73 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -1307,7 +1305,7 @@ i32.const 16 i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -1321,7 +1319,7 @@ i32.const 16 i32.const 75 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -1334,7 +1332,7 @@ i32.const 16 i32.const 76 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -1347,7 +1345,7 @@ i32.const 16 i32.const 77 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -1361,7 +1359,7 @@ i32.const 16 i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -1375,7 +1373,7 @@ i32.const 16 i32.const 79 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1388,7 +1386,7 @@ i32.const 16 i32.const 80 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1401,7 +1399,7 @@ i32.const 16 i32.const 81 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1415,7 +1413,7 @@ i32.const 16 i32.const 82 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1429,7 +1427,7 @@ i32.const 16 i32.const 83 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1442,7 +1440,7 @@ i32.const 16 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1455,7 +1453,7 @@ i32.const 16 i32.const 85 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1469,7 +1467,7 @@ i32.const 16 i32.const 86 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1483,7 +1481,7 @@ i32.const 16 i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1496,7 +1494,7 @@ i32.const 16 i32.const 88 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1510,7 +1508,7 @@ i32.const 16 i32.const 89 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1524,7 +1522,7 @@ i32.const 16 i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1539,7 +1537,7 @@ i32.const 16 i32.const 91 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1552,7 +1550,7 @@ i32.const 16 i32.const 92 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1566,7 +1564,7 @@ i32.const 16 i32.const 93 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1579,7 +1577,7 @@ i32.const 16 i32.const 94 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1593,7 +1591,7 @@ i32.const 16 i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -1606,7 +1604,7 @@ i32.const 16 i32.const 104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -1619,7 +1617,7 @@ i32.const 16 i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -1632,7 +1630,7 @@ i32.const 16 i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -1645,7 +1643,7 @@ i32.const 16 i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3.5 @@ -1658,7 +1656,7 @@ i32.const 16 i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3.5 @@ -1671,7 +1669,7 @@ i32.const 16 i32.const 109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3.5 @@ -1684,7 +1682,7 @@ i32.const 16 i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3.5 @@ -1697,7 +1695,7 @@ i32.const 16 i32.const 111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -1710,7 +1708,7 @@ i32.const 16 i32.const 112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -1723,7 +1721,7 @@ i32.const 16 i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -1736,7 +1734,7 @@ i32.const 16 i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -1749,7 +1747,7 @@ i32.const 16 i32.const 115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -1762,7 +1760,7 @@ i32.const 16 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -1775,7 +1773,7 @@ i32.const 16 i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -1788,7 +1786,7 @@ i32.const 16 i32.const 118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -1801,7 +1799,7 @@ i32.const 16 i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -1814,7 +1812,7 @@ i32.const 16 i32.const 120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -1827,7 +1825,7 @@ i32.const 16 i32.const 121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -1840,7 +1838,7 @@ i32.const 16 i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -1853,7 +1851,7 @@ i32.const 16 i32.const 123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -1866,7 +1864,7 @@ i32.const 16 i32.const 126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -1879,7 +1877,7 @@ i32.const 16 i32.const 127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -1892,7 +1890,7 @@ i32.const 16 i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -1905,7 +1903,7 @@ i32.const 16 i32.const 129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -1918,7 +1916,7 @@ i32.const 16 i32.const 130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -1931,7 +1929,7 @@ i32.const 16 i32.const 131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -1944,7 +1942,7 @@ i32.const 16 i32.const 132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -1957,7 +1955,7 @@ i32.const 16 i32.const 133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1970,7 +1968,7 @@ i32.const 16 i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1983,7 +1981,7 @@ i32.const 16 i32.const 135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1996,7 +1994,7 @@ i32.const 16 i32.const 136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2009,7 +2007,7 @@ i32.const 16 i32.const 137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2022,7 +2020,7 @@ i32.const 16 i32.const 138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2035,7 +2033,7 @@ i32.const 16 i32.const 139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2048,7 +2046,7 @@ i32.const 16 i32.const 140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2061,7 +2059,7 @@ i32.const 16 i32.const 141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2074,7 +2072,7 @@ i32.const 16 i32.const 142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -2087,7 +2085,7 @@ i32.const 16 i32.const 143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -2100,7 +2098,7 @@ i32.const 16 i32.const 144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -2114,7 +2112,7 @@ i32.const 16 i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -2128,7 +2126,7 @@ i32.const 16 i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -2141,7 +2139,7 @@ i32.const 16 i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -2154,7 +2152,7 @@ i32.const 16 i32.const 148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -2168,7 +2166,7 @@ i32.const 16 i32.const 149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -2182,7 +2180,7 @@ i32.const 16 i32.const 150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2195,7 +2193,7 @@ i32.const 16 i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2208,7 +2206,7 @@ i32.const 16 i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2222,7 +2220,7 @@ i32.const 16 i32.const 153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2236,7 +2234,7 @@ i32.const 16 i32.const 154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2249,7 +2247,7 @@ i32.const 16 i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2262,7 +2260,7 @@ i32.const 16 i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2276,7 +2274,7 @@ i32.const 16 i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2290,7 +2288,7 @@ i32.const 16 i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2303,7 +2301,7 @@ i32.const 16 i32.const 159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2317,7 +2315,7 @@ i32.const 16 i32.const 160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2331,7 +2329,7 @@ i32.const 16 i32.const 161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2346,7 +2344,7 @@ i32.const 16 i32.const 162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2359,7 +2357,7 @@ i32.const 16 i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2373,7 +2371,7 @@ i32.const 16 i32.const 164 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2386,7 +2384,7 @@ i32.const 16 i32.const 165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2400,7 +2398,7 @@ i32.const 16 i32.const 166 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index b2449798b1..0de0adc601 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -1,18 +1,29 @@ (module (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$v (func)) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 56) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 96) "\12") + (data (i32.const 240) "!\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/new/aClass (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -76,52 +87,65 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/util/runtime/register (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) + i32.const 1 + i32.const 32 local.get $0 - i32.const 56 + i32.const 7 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add + ) + (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 248 i32.le_u if i32.const 0 i32.const 16 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 8 i32.sub - local.tee $1 + local.tee $2 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 16 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + local.get $2 local.get $1 - i32.const 1 i32.store local.get $0 ) - (func $std/new/AClass#constructor (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $std/new/AClass#constructor (; 4 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) - i32.const 16 - call $~lib/allocator/arena/__mem_allocate - local.tee $0 - i32.const -1520547049 - i32.store - local.get $0 i32.const 8 - i32.store offset=4 - local.get $0 - i32.const 8 - i32.add + call $~lib/util/runtime/allocate + i32.const 17 call $~lib/util/runtime/register local.tee $0 i32.const 1 @@ -140,15 +164,198 @@ f32.store offset=4 local.get $0 ) - (func $start (; 4 ;) (type $FUNCSIG$v) - i32.const 56 + (func $~lib/runtime/runtime.instanceof (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 8 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 96 + i32.load + i32.le_u + else + local.get $0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 96 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + local.tee $1 + i32.eqz + if + local.get $0 + i32.const 96 + i32.load + i32.gt_u + local.set $1 + end + local.get $1 + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 96 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + i32.const 96 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 96 + i32.add + i32.load + end + local.tee $3 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 8 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $2 + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $3 + i32.const 512 + i32.and + if + local.get $1 + local.get $2 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + if + i32.const 0 + i32.const 64 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 12 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 64 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $start (; 13 ;) (type $FUNCSIG$v) + i32.const 248 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset call $std/new/AClass#constructor global.set $std/new/aClass ) - (func $null (; 5 ;) (type $FUNCSIG$v) + (func $null (; 14 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 026b4b6fce..caddfb4329 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -4,9 +4,12 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 96) "\12\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/new/AClass.aStaticField (mut i32) (i32.const 0)) @@ -16,9 +19,18 @@ (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/new/aClass (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 96)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 248)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -141,9 +153,9 @@ if i32.const 0 i32.const 16 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -158,9 +170,9 @@ if i32.const 0 i32.const 16 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -176,7 +188,7 @@ if i32.const 8 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.set $0 end @@ -213,9 +225,209 @@ call $std/new/AClass#constructor global.set $std/new/aClass ) - (func $start (; 8 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + local.get $2 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 512 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $7 + block $break|0 + loop $continue|0 + local.get $6 + local.get $7 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $8 + local.get $8 + if + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 64 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/runtime.retain (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.release (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 17 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 64 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/runtime/runtime#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 19 ;) (type $FUNCSIG$v) call $start:std/new ) - (func $null (; 9 ;) (type $FUNCSIG$v) + (func $null (; 20 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index a300b711a1..c6f62370dd 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -4,21 +4,30 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\16") + (data (i32.const 8) "\10\00\00\00\16") (data (i32.const 24) "h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d") - (data (i32.const 48) "\01\00\00\00(") + (data (i32.const 48) "\10\00\00\00(") (data (i32.const 64) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 104) "\01\00\00\00*") + (data (i32.const 104) "\10\00\00\00*") (data (i32.const 120) "s\00t\00d\00/\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 168) "\14") + (data (i32.const 320) "!\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -113,14 +122,14 @@ (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 164 + i32.const 336 i32.le_u if i32.const 0 i32.const 64 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -133,9 +142,9 @@ if i32.const 0 i32.const 64 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -232,7 +241,7 @@ i32.const 120 i32.const 9 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -244,19 +253,19 @@ i32.const 120 i32.const 10 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) (func $start:std/object-literal (; 7 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 168 + i32.const 336 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 8 call $~lib/util/runtime/allocate - i32.const 2 + i32.const 17 call $~lib/util/runtime/register local.tee $0 i32.const 1 @@ -268,7 +277,7 @@ call $std/object-literal/bar i32.const 4 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register local.tee $0 i32.const 2 @@ -282,12 +291,12 @@ i32.const 120 i32.const 26 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register local.tee $0 i32.const 3 @@ -301,14 +310,191 @@ i32.const 120 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start (; 8 ;) (type $FUNCSIG$v) - call $start:std/object-literal + (func $~lib/runtime/runtime.instanceof (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 168 + i32.load + i32.le_u + else + local.get $0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 168 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + local.tee $1 + i32.eqz + if + local.get $0 + i32.const 168 + i32.load + i32.gt_u + local.set $1 + end + local.get $1 + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 168 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.tee $2 + i32.eqz + local.tee $0 + if (result i32) + local.get $0 + else + local.get $2 + i32.const 168 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $2 + i32.const 3 + i32.shl + i32.const 168 + i32.add + i32.load + end + local.tee $0 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $3 + local.get $2 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $2 + i32.load + drop + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $3 + i32.store offset=8 + local.get $2 + local.get $3 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $0 + i32.const 512 + i32.and + if + local.get $1 + local.get $3 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load + drop + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $2 ) - (func $null (; 9 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.retain (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) + (func $~lib/runtime/runtime.collect (; 15 ;) (type $FUNCSIG$v) + nop + ) + (func $start (; 16 ;) (type $FUNCSIG$v) + call $start:std/object-literal + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 20 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT + ) ) diff --git a/tests/compiler/std/object-literal.untouched.wat b/tests/compiler/std/object-literal.untouched.wat index dec6807015..3d19a2f8a0 100644 --- a/tests/compiler/std/object-literal.untouched.wat +++ b/tests/compiler/std/object-literal.untouched.wat @@ -5,11 +5,13 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d\00") - (data (i32.const 48) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 104) "\01\00\00\00*\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d\00") + (data (i32.const 48) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 104) "\10\00\00\00*\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") + (data (i32.const 168) "\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -17,10 +19,20 @@ (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 164)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 168)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 336)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -153,9 +165,9 @@ if i32.const 0 i32.const 64 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -170,9 +182,9 @@ if i32.const 0 i32.const 64 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -298,7 +310,7 @@ i32.const 120 i32.const 9 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -311,7 +323,7 @@ i32.const 120 i32.const 10 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -326,7 +338,7 @@ i32.const 120 i32.const 26 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -341,7 +353,7 @@ i32.const 120 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -362,7 +374,7 @@ block (result i32) i32.const 8 call $~lib/util/runtime/allocate - i32.const 2 + i32.const 17 call $~lib/util/runtime/register local.set $0 local.get $0 @@ -377,7 +389,7 @@ block (result i32) i32.const 4 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register local.set $1 local.get $1 @@ -389,7 +401,7 @@ block (result i32) i32.const 4 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register local.set $2 local.get $2 @@ -399,9 +411,245 @@ end call $std/object-literal/Foo2#test ) - (func $start (; 14 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + local.get $2 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/collector/dummy/__ref_link (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/collector/dummy/__ref_unlink (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/runtime/runtime.newArray (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.tee $6 + local.get $1 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + local.get $8 + if + local.get $8 + local.get $6 + call $~lib/collector/dummy/__ref_unlink + end + local.get $7 + local.get $6 + call $~lib/collector/dummy/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 512 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $~lib/collector/dummy/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/Root#constructor (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 20 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_link + ) + (func $~lib/runtime/runtime.release (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_unlink + ) + (func $~lib/collector/dummy/__ref_collect (; 26 ;) (type $FUNCSIG$v) + nop + ) + (func $~lib/runtime/runtime.collect (; 27 ;) (type $FUNCSIG$v) + call $~lib/collector/dummy/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 29 ;) (type $FUNCSIG$v) call $start:std/object-literal + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT ) - (func $null (; 15 ;) (type $FUNCSIG$v) + (func $null (; 30 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 4a189e5c9b..f201dad05d 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -5,13 +5,14 @@ (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$ddi (func (param f64 i32) (result f64))) (type $FUNCSIG$v (func)) - (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 56) "\02\00\00\006\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 56) "\10\00\00\006\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s") + (data (i32.const 120) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 160) "\14") + (data (i32.const 320) "!\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/operator-overloading/a1 (mut i32) (i32.const 0)) @@ -81,7 +82,15 @@ (global $std/operator-overloading/aii2 (mut i32) (i32.const 0)) (global $std/operator-overloading/aii (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -145,31 +154,38 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - i32.const 16 + (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 7 + i32.add + i32.clz + i32.sub + i32.shl call $~lib/allocator/arena/__mem_allocate - local.tee $0 + local.tee $1 i32.const -1520547049 i32.store + local.get $1 local.get $0 - i32.const 8 i32.store offset=4 - local.get $0 + local.get $1 i32.const 8 i32.add ) (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 120 + i32.const 328 i32.le_u if i32.const 0 i32.const 16 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -182,9 +198,9 @@ if i32.const 0 i32.const 16 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -194,8 +210,9 @@ ) (func $std/operator-overloading/Tester#constructor (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + i32.const 8 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.tee $2 local.get $0 @@ -1239,8 +1256,9 @@ ) (func $std/operator-overloading/TesterInlineStatic#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + i32.const 8 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register local.tee $2 local.get $0 @@ -1252,8 +1270,9 @@ ) (func $std/operator-overloading/TesterInlineInstance#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + i32.const 8 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 19 call $~lib/util/runtime/register local.tee $2 local.get $0 @@ -1267,7 +1286,7 @@ (local $0 i32) (local $1 i32) (local $2 i32) - i32.const 120 + i32.const 328 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -1312,7 +1331,7 @@ i32.const 64 i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -1355,7 +1374,7 @@ i32.const 64 i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -1399,7 +1418,7 @@ i32.const 64 i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 6 @@ -1443,7 +1462,7 @@ i32.const 64 i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 10 @@ -1486,7 +1505,7 @@ i32.const 64 i32.const 169 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -1520,7 +1539,7 @@ i32.const 64 i32.const 175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -1564,7 +1583,7 @@ i32.const 64 i32.const 181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3855 @@ -1608,7 +1627,7 @@ i32.const 64 i32.const 187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -1652,7 +1671,7 @@ i32.const 64 i32.const 193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1689,7 +1708,7 @@ i32.const 64 i32.const 199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1724,7 +1743,7 @@ i32.const 64 i32.const 205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/eq1 @@ -1751,7 +1770,7 @@ i32.const 64 i32.const 209 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/eq3 @@ -1780,7 +1799,7 @@ i32.const 64 i32.const 213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -1817,7 +1836,7 @@ i32.const 64 i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -1854,7 +1873,7 @@ i32.const 64 i32.const 225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 @@ -1891,7 +1910,7 @@ i32.const 64 i32.const 231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -1928,7 +1947,7 @@ i32.const 64 i32.const 237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -1965,7 +1984,7 @@ i32.const 64 i32.const 242 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -8 @@ -2002,7 +2021,7 @@ i32.const 64 i32.const 247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -2039,7 +2058,7 @@ i32.const 64 i32.const 252 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -2074,7 +2093,7 @@ i32.const 64 i32.const 257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 @@ -2117,7 +2136,7 @@ i32.const 64 i32.const 262 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -2160,7 +2179,7 @@ i32.const 64 i32.const 267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2200,7 +2219,7 @@ i32.const 64 i32.const 272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/bres @@ -2211,7 +2230,7 @@ i32.const 64 i32.const 273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2252,7 +2271,7 @@ i32.const 64 i32.const 279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/incdec @@ -2288,7 +2307,7 @@ i32.const 64 i32.const 282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2326,7 +2345,7 @@ i32.const 64 i32.const 287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/incdec @@ -2348,7 +2367,7 @@ i32.const 64 i32.const 288 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/incdec @@ -2383,7 +2402,7 @@ i32.const 64 i32.const 291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/incdec @@ -2404,7 +2423,7 @@ i32.const 64 i32.const 292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -2459,7 +2478,7 @@ i32.const 64 i32.const 312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -2514,14 +2533,197 @@ i32.const 64 i32.const 332 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 8 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 160 + i32.load + i32.le_u + else + local.get $0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 160 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + local.tee $1 + i32.eqz + if + local.get $0 + i32.const 160 + i32.load + i32.gt_u + local.set $1 + end + local.get $1 + if (result i32) unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 160 + i32.add + i32.load end ) - (func $start (; 11 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.newObject (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + i32.const 160 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 160 + i32.add + i32.load + end + local.tee $3 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 8 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $2 + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $3 + i32.const 512 + i32.and + if + local.get $1 + local.get $2 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + if + i32.const 0 + i32.const 128 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 18 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 128 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $start (; 19 ;) (type $FUNCSIG$v) call $start:std/operator-overloading ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 20 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 62a8dbbedd..5d40c4035b 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -6,10 +6,13 @@ (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$ddi (func (param f64 i32) (result f64))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 56) "\02\00\00\006\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\10\00\00\006\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 120) "\10\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 160) "\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) @@ -84,9 +87,18 @@ (global $std/operator-overloading/aii1 (mut i32) (i32.const 0)) (global $std/operator-overloading/aii2 (mut i32) (i32.const 0)) (global $std/operator-overloading/aii (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 120)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 160)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 328)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -209,9 +221,9 @@ if i32.const 0 i32.const 16 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -226,9 +238,9 @@ if i32.const 0 i32.const 16 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -242,7 +254,7 @@ if i32.const 8 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.set $0 end @@ -1815,7 +1827,7 @@ if i32.const 8 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 18 call $~lib/util/runtime/register local.set $0 end @@ -1833,7 +1845,7 @@ if i32.const 8 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 19 call $~lib/util/runtime/register local.set $0 end @@ -1891,7 +1903,7 @@ i32.const 64 i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1927,7 +1939,7 @@ i32.const 64 i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1963,7 +1975,7 @@ i32.const 64 i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1999,7 +2011,7 @@ i32.const 64 i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2035,7 +2047,7 @@ i32.const 64 i32.const 169 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2071,7 +2083,7 @@ i32.const 64 i32.const 175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2107,7 +2119,7 @@ i32.const 64 i32.const 181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2143,7 +2155,7 @@ i32.const 64 i32.const 187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2179,7 +2191,7 @@ i32.const 64 i32.const 193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2205,7 +2217,7 @@ i32.const 64 i32.const 199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2231,7 +2243,7 @@ i32.const 64 i32.const 205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/eq1 @@ -2247,7 +2259,7 @@ i32.const 64 i32.const 209 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/eq3 @@ -2263,7 +2275,7 @@ i32.const 64 i32.const 213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2289,7 +2301,7 @@ i32.const 64 i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2315,7 +2327,7 @@ i32.const 64 i32.const 225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2341,7 +2353,7 @@ i32.const 64 i32.const 231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2367,7 +2379,7 @@ i32.const 64 i32.const 237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2398,7 +2410,7 @@ i32.const 64 i32.const 242 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2429,7 +2441,7 @@ i32.const 64 i32.const 247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2460,7 +2472,7 @@ i32.const 64 i32.const 252 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2492,7 +2504,7 @@ i32.const 64 i32.const 257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2528,7 +2540,7 @@ i32.const 64 i32.const 262 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2564,7 +2576,7 @@ i32.const 64 i32.const 267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2594,7 +2606,7 @@ i32.const 64 i32.const 272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/bres @@ -2606,7 +2618,7 @@ i32.const 64 i32.const 273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2636,7 +2648,7 @@ i32.const 64 i32.const 279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/incdec @@ -2661,7 +2673,7 @@ i32.const 64 i32.const 282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2696,7 +2708,7 @@ i32.const 64 i32.const 287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/incdec @@ -2718,7 +2730,7 @@ i32.const 64 i32.const 288 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -2748,7 +2760,7 @@ i32.const 64 i32.const 291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/incdec @@ -2770,7 +2782,7 @@ i32.const 64 i32.const 292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2836,7 +2848,7 @@ i32.const 64 i32.const 312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2902,13 +2914,213 @@ i32.const 64 i32.const 332 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + local.get $2 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 512 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $7 + block $break|0 + loop $continue|0 + local.get $6 + local.get $7 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $8 + local.get $8 + if + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 128 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end end + local.get $5 + ) + (func $~lib/runtime/runtime.retain (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.release (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 47 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 128 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/runtime/runtime#constructor (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable ) - (func $start (; 38 ;) (type $FUNCSIG$v) + (func $start (; 49 ;) (type $FUNCSIG$v) call $start:std/operator-overloading ) - (func $null (; 39 ;) (type $FUNCSIG$v) + (func $null (; 50 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index b9ff9164df..95efbef146 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -3,11 +3,9 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1c\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\1c\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s") (global $std/pointer/one (mut i32) (i32.const 0)) (global $std/pointer/two (mut i32) (i32.const 0)) (global $std/pointer/add (mut i32) (i32.const 0)) @@ -15,7 +13,6 @@ (global $std/pointer/nextOne (mut i32) (i32.const 0)) (global $std/pointer/buf (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $~lib/memory/memory.fill (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) @@ -250,7 +247,7 @@ i32.const 16 i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/two @@ -261,7 +258,7 @@ i32.const 16 i32.const 79 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one @@ -280,7 +277,7 @@ i32.const 16 i32.const 83 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one @@ -292,7 +289,7 @@ i32.const 16 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one @@ -307,7 +304,7 @@ i32.const 16 i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/two @@ -322,7 +319,7 @@ i32.const 16 i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one @@ -333,7 +330,7 @@ i32.const 16 i32.const 92 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one @@ -351,7 +348,7 @@ i32.const 16 i32.const 94 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one @@ -362,7 +359,7 @@ i32.const 16 i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/two @@ -373,7 +370,7 @@ i32.const 16 i32.const 97 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/two @@ -392,7 +389,7 @@ i32.const 16 i32.const 100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/two @@ -404,7 +401,7 @@ i32.const 16 i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/two @@ -416,7 +413,7 @@ i32.const 16 i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one @@ -439,7 +436,7 @@ i32.const 16 i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one @@ -451,7 +448,7 @@ i32.const 16 i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one @@ -463,7 +460,7 @@ i32.const 16 i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -485,7 +482,7 @@ i32.const 16 i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/buf @@ -499,7 +496,7 @@ i32.const 16 i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/buf @@ -511,7 +508,7 @@ i32.const 16 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/buf @@ -525,7 +522,7 @@ i32.const 16 i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -537,7 +534,7 @@ i32.const 16 i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -549,7 +546,7 @@ i32.const 16 i32.const 120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/buf @@ -567,7 +564,7 @@ i32.const 16 i32.const 123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/buf @@ -581,7 +578,7 @@ i32.const 16 i32.const 124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -593,7 +590,7 @@ i32.const 16 i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/buf @@ -608,7 +605,7 @@ i32.const 16 i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -620,7 +617,7 @@ i32.const 16 i32.const 129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/std/pointer.untouched.wat b/tests/compiler/std/pointer.untouched.wat index 866407afd4..0146c17e94 100644 --- a/tests/compiler/std/pointer.untouched.wat +++ b/tests/compiler/std/pointer.untouched.wat @@ -5,9 +5,9 @@ (type $FUNCSIG$viif (func (param i32 i32 f32))) (type $FUNCSIG$vif (func (param i32 f32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1c\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1c\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/pointer/one (mut i32) (i32.const 0)) @@ -16,9 +16,7 @@ (global $std/pointer/sub (mut i32) (i32.const 0)) (global $std/pointer/nextOne (mut i32) (i32.const 0)) (global $std/pointer/buf (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $~lib/memory/memory.fill (; 1 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -549,7 +547,7 @@ i32.const 16 i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:offset|inlined.1 (result i32) @@ -565,7 +563,7 @@ i32.const 16 i32.const 79 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:value|inlined.0 (result i32) @@ -599,7 +597,7 @@ i32.const 16 i32.const 83 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:value|inlined.3 (result i32) @@ -617,7 +615,7 @@ i32.const 16 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#add|inlined.0 (result i32) @@ -643,7 +641,7 @@ i32.const 16 i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#sub|inlined.0 (result i32) @@ -669,7 +667,7 @@ i32.const 16 i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:offset|inlined.4 (result i32) @@ -685,7 +683,7 @@ i32.const 16 i32.const 92 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -710,7 +708,7 @@ i32.const 16 i32.const 94 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:offset|inlined.5 (result i32) @@ -726,7 +724,7 @@ i32.const 16 i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:offset|inlined.6 (result i32) @@ -742,7 +740,7 @@ i32.const 16 i32.const 97 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#dec|inlined.0 (result i32) @@ -774,7 +772,7 @@ i32.const 16 i32.const 100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:value|inlined.4 (result i32) @@ -792,7 +790,7 @@ i32.const 16 i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:value|inlined.5 (result i32) @@ -810,7 +808,7 @@ i32.const 16 i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one @@ -838,7 +836,7 @@ i32.const 16 i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:value|inlined.7 (result i32) @@ -856,7 +854,7 @@ i32.const 16 i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:value|inlined.8 (result i32) @@ -874,7 +872,7 @@ i32.const 16 i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#constructor|inlined.0 (result i32) @@ -913,7 +911,7 @@ i32.const 16 i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get|inlined.1 (result f32) @@ -936,7 +934,7 @@ i32.const 16 i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get|inlined.2 (result f32) @@ -959,7 +957,7 @@ i32.const 16 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get|inlined.3 (result f32) @@ -982,7 +980,7 @@ i32.const 16 i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -995,7 +993,7 @@ i32.const 16 i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -1008,7 +1006,7 @@ i32.const 16 i32.const 120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#set|inlined.0 @@ -1046,7 +1044,7 @@ i32.const 16 i32.const 123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get|inlined.5 (result f32) @@ -1069,7 +1067,7 @@ i32.const 16 i32.const 124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -1082,7 +1080,7 @@ i32.const 16 i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/buf @@ -1103,7 +1101,7 @@ i32.const 16 i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1116,7 +1114,7 @@ i32.const 16 i32.const 129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/std/polyfills.optimized.wat b/tests/compiler/std/polyfills.optimized.wat index f125f5282a..6b1a46b259 100644 --- a/tests/compiler/std/polyfills.optimized.wat +++ b/tests/compiler/std/polyfills.optimized.wat @@ -1,11 +1,8 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\01\00\00\00 \00\00\00s\00t\00d\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $start) + (data (i32.const 8) "\10\00\00\00 \00\00\00s\00t\00d\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s") (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/std/polyfills.untouched.wat b/tests/compiler/std/polyfills.untouched.wat index c15467108d..cc18163292 100644 --- a/tests/compiler/std/polyfills.untouched.wat +++ b/tests/compiler/std/polyfills.untouched.wat @@ -3,14 +3,12 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$jj (func (param i64) (result i64))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00 \00\00\00s\00t\00d\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00 \00\00\00s\00t\00d\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $~lib/polyfills/bswap (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -271,7 +269,7 @@ i32.const 16 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 170 @@ -292,7 +290,7 @@ i32.const 16 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 43707 @@ -307,7 +305,7 @@ i32.const 16 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 43707 @@ -328,7 +326,7 @@ i32.const 16 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1430532899 @@ -341,7 +339,7 @@ i32.const 16 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1430532899 @@ -354,7 +352,7 @@ i32.const 16 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4822679907192029 @@ -367,7 +365,7 @@ i32.const 16 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4822679907192029 @@ -380,7 +378,7 @@ i32.const 16 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1430532899 @@ -393,7 +391,7 @@ i32.const 16 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1430532899 @@ -406,7 +404,7 @@ i32.const 16 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 170 @@ -421,7 +419,7 @@ i32.const 16 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 170 @@ -442,7 +440,7 @@ i32.const 16 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 43707 @@ -457,7 +455,7 @@ i32.const 16 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 43707 @@ -478,7 +476,7 @@ i32.const 16 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -7820613 @@ -491,7 +489,7 @@ i32.const 16 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -7820613 @@ -504,7 +502,7 @@ i32.const 16 i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index ca3aad5779..123c806f80 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -8,23 +8,21 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\03\00\00\00\1c") + (data (i32.const 8) "\10\00\00\00\1c") (data (i32.const 24) "s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 56) "\03\00\00\00\10") + (data (i32.const 56) "\10\00\00\00\10") (data (i32.const 72) "b\00a\00r\00r\00i\00e\00r\001") - (data (i32.const 88) "\03\00\00\00\10") + (data (i32.const 88) "\10\00\00\00\10") (data (i32.const 104) "b\00a\00r\00r\00i\00e\00r\002") - (data (i32.const 120) "\03\00\00\00\10") + (data (i32.const 120) "\10\00\00\00\10") (data (i32.const 136) "b\00a\00r\00r\00i\00e\00r\003") - (data (i32.const 152) "\03\00\00\00,") + (data (i32.const 152) "\10\00\00\00,") (data (i32.const 168) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 216) "\03\00\00\00(") + (data (i32.const 216) "\10\00\00\00(") (data (i32.const 232) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $std/runtime/register_ref (mut i32) (i32.const 0)) (global $std/runtime/barrier1 (mut i32) (i32.const 0)) (global $std/runtime/barrier2 (mut i32) (i32.const 0)) @@ -41,7 +39,6 @@ (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $std/runtime/main)) (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/tlsf/Root#setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -53,7 +50,7 @@ i32.const 168 i32.const 159 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -73,7 +70,7 @@ i32.const 168 i32.const 184 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -84,7 +81,7 @@ i32.const 168 i32.const 185 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -110,7 +107,7 @@ i32.const 168 i32.const 104 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -128,7 +125,7 @@ i32.const 168 i32.const 105 i32.const 11 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -141,7 +138,7 @@ i32.const 168 i32.const 447 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 31 @@ -158,7 +155,7 @@ i32.const 168 i32.const 175 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -169,7 +166,7 @@ i32.const 168 i32.const 176 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -192,7 +189,7 @@ i32.const 168 i32.const 153 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -218,7 +215,7 @@ i32.const 168 i32.const 277 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -241,7 +238,7 @@ i32.const 168 i32.const 279 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -342,7 +339,7 @@ i32.const 168 i32.const 96 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -356,7 +353,7 @@ i32.const 168 i32.const 97 i32.const 11 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -372,7 +369,7 @@ i32.const 168 i32.const 353 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -384,7 +381,7 @@ i32.const 168 i32.const 354 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -397,7 +394,7 @@ i32.const 168 i32.const 355 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -418,7 +415,7 @@ i32.const 168 i32.const 208 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -432,7 +429,7 @@ i32.const 168 i32.const 210 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -456,7 +453,7 @@ i32.const 168 i32.const 212 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -468,7 +465,7 @@ i32.const 168 i32.const 216 i32.const 23 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -509,7 +506,7 @@ i32.const 168 i32.const 230 i32.const 24 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -523,7 +520,7 @@ i32.const 168 i32.const 232 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -568,7 +565,7 @@ i32.const 168 i32.const 245 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -647,7 +644,7 @@ i32.const 168 i32.const 396 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -658,7 +655,7 @@ i32.const 168 i32.const 397 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -669,7 +666,7 @@ i32.const 168 i32.const 398 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2912 @@ -686,7 +683,7 @@ i32.const 168 i32.const 403 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -714,7 +711,7 @@ i32.const 168 i32.const 412 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -767,7 +764,7 @@ i32.const 168 i32.const 441 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -793,7 +790,7 @@ i32.const 168 i32.const 315 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -872,7 +869,7 @@ i32.const 168 i32.const 342 i32.const 16 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -899,7 +896,7 @@ i32.const 168 i32.const 367 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -919,7 +916,7 @@ i32.const 168 i32.const 368 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -930,7 +927,7 @@ i32.const 168 i32.const 369 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -982,7 +979,7 @@ i32.const 168 i32.const 387 i32.const 25 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1143,7 +1140,7 @@ i32.const 168 i32.const 502 i32.const 12 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1158,7 +1155,7 @@ i32.const 168 i32.const 505 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1597,7 +1594,7 @@ i32.const 168 i32.const 518 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1690,9 +1687,9 @@ if i32.const 0 i32.const 232 - i32.const 88 + i32.const 91 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1727,9 +1724,9 @@ if i32.const 0 i32.const 232 - i32.const 114 + i32.const 117 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1742,9 +1739,9 @@ if i32.const 0 i32.const 232 - i32.const 116 + i32.const 119 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1758,9 +1755,9 @@ if i32.const 0 i32.const 232 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1773,13 +1770,13 @@ if i32.const 0 i32.const 232 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 - i32.const 1 + i32.const 17 i32.store local.get $0 global.set $std/runtime/register_ref @@ -1826,7 +1823,7 @@ i32.const 24 i32.const 52 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -1902,7 +1899,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 104 i32.const 1 global.get $std/runtime/barrier2 @@ -1911,7 +1908,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 136 i32.const 1 global.get $std/runtime/barrier3 @@ -1920,7 +1917,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 1 call $~lib/util/runtime/allocate global.set $std/runtime/ref1 @@ -1937,7 +1934,7 @@ i32.const 24 i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/header1 @@ -1949,7 +1946,7 @@ i32.const 24 i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/ref1 @@ -1963,7 +1960,7 @@ i32.const 24 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/barrier1 @@ -1975,7 +1972,7 @@ i32.const 24 i32.const 70 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/ref1 @@ -1990,7 +1987,7 @@ i32.const 24 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/ref2 @@ -2006,7 +2003,7 @@ i32.const 24 i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/ref2 @@ -2022,7 +2019,7 @@ i32.const 24 i32.const 77 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/barrier1 @@ -2038,7 +2035,7 @@ i32.const 24 i32.const 81 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/register_ref @@ -2047,14 +2044,14 @@ global.set $std/runtime/header4 global.get $std/runtime/header4 i32.load - i32.const 1 + i32.const 17 i32.ne if i32.const 0 i32.const 24 i32.const 83 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/barrier1 @@ -2066,7 +2063,7 @@ i32.const 24 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 10 @@ -2083,7 +2080,7 @@ i32.const 24 i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/ref5 @@ -2099,7 +2096,7 @@ i32.const 24 i32.const 88 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 70f30eee16..6b426e6cb1 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -8,15 +8,15 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\03\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 56) "\03\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\001\00") - (data (i32.const 88) "\03\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\002\00") - (data (i32.const 120) "\03\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\003\00") - (data (i32.const 152) "\03\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") - (data (i32.const 216) "\03\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\001\00") + (data (i32.const 88) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\002\00") + (data (i32.const 120) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\003\00") + (data (i32.const 152) "\10\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 216) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/runtime/register_ref (mut i32) (i32.const 0)) @@ -57,7 +57,6 @@ (global $~lib/memory/HEAP_BASE i32 (i32.const 272)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $std/runtime/main)) (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -105,7 +104,7 @@ i32.const 168 i32.const 159 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -126,7 +125,7 @@ i32.const 168 i32.const 184 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -138,7 +137,7 @@ i32.const 168 i32.const 185 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -171,7 +170,7 @@ i32.const 168 i32.const 104 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -191,7 +190,7 @@ i32.const 168 i32.const 105 i32.const 11 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $1 @@ -207,7 +206,7 @@ i32.const 168 i32.const 447 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 31 @@ -225,7 +224,7 @@ i32.const 168 i32.const 175 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -237,7 +236,7 @@ i32.const 168 i32.const 176 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -261,7 +260,7 @@ i32.const 168 i32.const 153 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -291,7 +290,7 @@ i32.const 168 i32.const 277 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -317,7 +316,7 @@ i32.const 168 i32.const 279 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -428,7 +427,7 @@ i32.const 168 i32.const 96 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -442,7 +441,7 @@ i32.const 168 i32.const 97 i32.const 11 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $1 @@ -459,7 +458,7 @@ i32.const 168 i32.const 353 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -472,7 +471,7 @@ i32.const 168 i32.const 354 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -485,7 +484,7 @@ i32.const 168 i32.const 355 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -511,7 +510,7 @@ i32.const 168 i32.const 208 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -526,7 +525,7 @@ i32.const 168 i32.const 210 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -552,7 +551,7 @@ i32.const 168 i32.const 212 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -564,7 +563,7 @@ i32.const 168 i32.const 216 i32.const 23 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $4 @@ -612,7 +611,7 @@ i32.const 168 i32.const 230 i32.const 24 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $4 @@ -630,7 +629,7 @@ i32.const 168 i32.const 232 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -685,7 +684,7 @@ i32.const 168 i32.const 245 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -776,7 +775,7 @@ i32.const 168 i32.const 396 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -789,7 +788,7 @@ i32.const 168 i32.const 397 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -802,7 +801,7 @@ i32.const 168 i32.const 398 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -823,7 +822,7 @@ i32.const 168 i32.const 403 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -852,7 +851,7 @@ i32.const 168 i32.const 412 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -923,7 +922,7 @@ i32.const 168 i32.const 441 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -939,7 +938,7 @@ i32.const 168 i32.const 441 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -969,7 +968,7 @@ i32.const 168 i32.const 315 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1065,7 +1064,7 @@ i32.const 168 i32.const 342 i32.const 16 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.set $5 @@ -1102,7 +1101,7 @@ i32.const 168 i32.const 367 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1122,7 +1121,7 @@ i32.const 168 i32.const 368 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1135,7 +1134,7 @@ i32.const 168 i32.const 369 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1195,7 +1194,7 @@ i32.const 168 i32.const 387 i32.const 25 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $4 @@ -1421,7 +1420,7 @@ i32.const 168 i32.const 502 i32.const 12 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $6 @@ -1442,7 +1441,7 @@ i32.const 168 i32.const 505 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1970,7 +1969,7 @@ i32.const 168 i32.const 518 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2065,9 +2064,9 @@ if i32.const 0 i32.const 232 - i32.const 88 + i32.const 91 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2107,9 +2106,9 @@ if i32.const 0 i32.const 232 - i32.const 114 + i32.const 117 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2124,9 +2123,9 @@ if i32.const 0 i32.const 232 - i32.const 116 + i32.const 119 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2141,9 +2140,9 @@ if i32.const 0 i32.const 232 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2158,9 +2157,9 @@ if i32.const 0 i32.const 232 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2186,8 +2185,8 @@ ) (func $start:std/runtime (; 34 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 1 - i32.const 2 + i32.const 17 + i32.const 18 i32.ne i32.eqz if @@ -2195,7 +2194,7 @@ i32.const 24 i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2208,7 +2207,7 @@ i32.const 24 i32.const 50 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|0 @@ -2229,7 +2228,7 @@ i32.const 24 i32.const 52 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2296,7 +2295,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 104 i32.const 1 global.get $std/runtime/barrier2 @@ -2305,7 +2304,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 136 i32.const 1 global.get $std/runtime/barrier3 @@ -2314,7 +2313,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 1 call $~lib/util/runtime/allocate global.set $std/runtime/ref1 @@ -2332,7 +2331,7 @@ i32.const 24 i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/header1 @@ -2345,7 +2344,7 @@ i32.const 24 i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/ref1 @@ -2359,7 +2358,7 @@ i32.const 24 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/header1 @@ -2372,7 +2371,7 @@ i32.const 24 i32.const 70 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/ref1 @@ -2388,7 +2387,7 @@ i32.const 24 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/ref2 @@ -2405,7 +2404,7 @@ i32.const 24 i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/ref2 @@ -2422,14 +2421,14 @@ i32.const 24 i32.const 77 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/barrier1 call $~lib/util/runtime/allocate global.set $std/runtime/ref4 global.get $std/runtime/ref4 - i32.const 1 + i32.const 17 call $~lib/util/runtime/register drop global.get $std/runtime/register_ref @@ -2441,7 +2440,7 @@ i32.const 24 i32.const 81 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/register_ref @@ -2450,7 +2449,7 @@ global.set $std/runtime/header4 global.get $std/runtime/header4 i32.load - i32.const 1 + i32.const 17 i32.eq i32.eqz if @@ -2458,7 +2457,7 @@ i32.const 24 i32.const 83 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/header4 @@ -2471,7 +2470,7 @@ i32.const 24 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 10 @@ -2487,7 +2486,7 @@ i32.const 24 i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/runtime/ref5 @@ -2500,7 +2499,7 @@ i32.const 24 i32.const 88 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 1342b31d63..5a11eaa347 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -17,21 +17,30 @@ (type $FUNCSIG$iidi (func (param i32 f64 i32) (result i32))) (type $FUNCSIG$vid (func (param i32 f64))) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(") + (data (i32.const 8) "\10\00\00\00(") (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 64) "\02\00\00\00&") + (data (i32.const 64) "\10\00\00\00&") (data (i32.const 80) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 120) "\02\00\00\00\14") + (data (i32.const 120) "\10\00\00\00\14") (data (i32.const 136) "s\00t\00d\00/\00s\00e\00t\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 160) "\1c") + (data (i32.const 296) "\n\00\00\00\00\00\00\00\n\00\00\00\00\00\00\00\12\00\00\00\00\00\00\00\12\00\00\00\00\00\00\00\"\00\00\00\00\00\00\00\"\00\00\00\00\00\00\00B\00\00\00\00\00\00\00B\00\00\00\00\00\00\00\"\00\00\00\00\00\00\00B\00\00\00\00\00\00\00!\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -126,14 +135,14 @@ (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 156 + i32.const 392 i32.le_u if i32.const 0 i32.const 24 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -146,9 +155,9 @@ if i32.const 0 i32.const 24 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -377,7 +386,7 @@ i32.const 80 i32.const 54 i32.const 43 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -386,7 +395,7 @@ local.get $0 call $~lib/memory/memory.fill local.get $1 - i32.const 3 + i32.const 15 call $~lib/util/runtime/register ) (func $~lib/set/Set#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) @@ -428,7 +437,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -796,7 +805,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -816,7 +825,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -831,7 +840,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 50 @@ -850,7 +859,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -870,7 +879,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -885,7 +894,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -904,7 +913,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -918,7 +927,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -939,7 +948,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -957,7 +966,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -972,7 +981,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -986,7 +995,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -1007,7 +1016,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1019,7 +1028,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -1027,7 +1036,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 18 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -1344,7 +1353,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1364,7 +1373,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -1379,7 +1388,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 50 @@ -1398,7 +1407,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1418,7 +1427,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -1433,7 +1442,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1452,7 +1461,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1466,7 +1475,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -1487,7 +1496,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1505,7 +1514,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1520,7 +1529,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1534,7 +1543,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -1555,7 +1564,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1567,7 +1576,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -1575,7 +1584,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 5 + i32.const 19 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -1979,7 +1988,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1999,7 +2008,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -2014,7 +2023,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 50 @@ -2033,7 +2042,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2053,7 +2062,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -2068,7 +2077,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2087,7 +2096,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2101,7 +2110,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -2122,7 +2131,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2140,7 +2149,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2155,7 +2164,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2169,7 +2178,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -2190,7 +2199,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2202,7 +2211,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -2210,7 +2219,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 6 + i32.const 20 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -2563,7 +2572,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2583,7 +2592,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -2598,7 +2607,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 50 @@ -2617,7 +2626,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2637,7 +2646,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -2652,7 +2661,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2671,7 +2680,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2685,7 +2694,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -2706,7 +2715,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2724,7 +2733,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2739,7 +2748,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2753,7 +2762,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -2774,7 +2783,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2786,7 +2795,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -2794,7 +2803,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 7 + i32.const 21 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -3165,7 +3174,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3185,7 +3194,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -3200,7 +3209,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 50 @@ -3219,7 +3228,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3239,7 +3248,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -3254,7 +3263,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3273,7 +3282,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3287,7 +3296,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3308,7 +3317,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3326,7 +3335,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3341,7 +3350,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3355,7 +3364,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3376,7 +3385,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3388,7 +3397,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3396,7 +3405,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 8 + i32.const 22 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -3438,7 +3447,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3458,7 +3467,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -3473,7 +3482,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 50 @@ -3492,7 +3501,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3512,7 +3521,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -3527,7 +3536,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3546,7 +3555,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3560,7 +3569,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3581,7 +3590,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3599,7 +3608,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3614,7 +3623,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3628,7 +3637,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3649,7 +3658,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3661,7 +3670,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3704,7 +3713,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 9 + i32.const 23 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -4111,7 +4120,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4131,7 +4140,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -4146,7 +4155,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 50 @@ -4165,7 +4174,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4185,7 +4194,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -4200,7 +4209,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -4219,7 +4228,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4233,7 +4242,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4254,7 +4263,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -4272,7 +4281,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4287,7 +4296,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4301,7 +4310,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4322,7 +4331,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4334,7 +4343,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4342,7 +4351,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 10 + i32.const 24 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -4384,7 +4393,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4404,7 +4413,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -4419,7 +4428,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 50 @@ -4438,7 +4447,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4458,7 +4467,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -4473,7 +4482,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -4492,7 +4501,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4506,7 +4515,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4527,7 +4536,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -4545,7 +4554,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4560,7 +4569,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4574,7 +4583,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4595,7 +4604,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4607,7 +4616,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4615,7 +4624,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 11 + i32.const 25 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -4960,7 +4969,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4980,7 +4989,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -4995,7 +5004,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 50 @@ -5014,7 +5023,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5034,7 +5043,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -5049,7 +5058,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -5068,7 +5077,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5082,7 +5091,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5103,7 +5112,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -5121,7 +5130,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5136,7 +5145,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5150,7 +5159,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5171,7 +5180,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5183,7 +5192,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5191,7 +5200,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 12 + i32.const 26 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -5536,7 +5545,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5556,7 +5565,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -5571,7 +5580,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 50 @@ -5590,7 +5599,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5610,7 +5619,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -5625,7 +5634,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -5644,7 +5653,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5658,7 +5667,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5679,7 +5688,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -5697,7 +5706,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5712,7 +5721,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5726,7 +5735,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5747,7 +5756,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5759,12 +5768,187 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 68 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 160 + i32.load + i32.le_u + else + local.get $0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 160 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + local.tee $1 + i32.eqz + if + local.get $0 + i32.const 160 + i32.load + i32.gt_u + local.set $1 + end + local.get $1 + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 160 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 71 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 72 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 73 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.tee $2 + i32.eqz + local.tee $0 + if (result i32) + local.get $0 + else + local.get $2 + i32.const 160 + i32.load + i32.gt_u + end + if (result i32) unreachable + else + local.get $2 + i32.const 3 + i32.shl + i32.const 160 + i32.add + i32.load + end + local.tee $0 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $3 + local.get $2 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $2 + i32.load + drop + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $3 + i32.store offset=8 + local.get $2 + local.get $3 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $0 + i32.const 512 + i32.and + if + local.get $1 + local.get $3 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load + drop + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end end + local.get $2 ) - (func $start (; 68 ;) (type $FUNCSIG$v) - i32.const 160 + (func $~lib/runtime/runtime.retain (; 74 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 75 ;) (type $FUNCSIG$v) + nop + ) + (func $start (; 76 ;) (type $FUNCSIG$v) + i32.const 392 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -5778,8 +5962,10 @@ call $std/set/testNumeric call $std/set/testNumeric call $std/set/testNumeric - ) - (func $null (; 69 ;) (type $FUNCSIG$v) - nop + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 28 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT ) ) diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 3031b85793..e55446ba52 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -17,11 +17,12 @@ (type $FUNCSIG$iid (func (param i32 f64) (result i32))) (type $FUNCSIG$iidi (func (param i32 f64 i32) (result i32))) (type $FUNCSIG$vid (func (param i32 f64))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 64) "\02\00\00\00&\00\00\00\00\00\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 120) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00&\00\00\00\00\00\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 120) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") + (data (i32.const 160) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\00\00\00\00\n\00\00\00\00\00\00\00\12\00\00\00\00\00\00\00\12\00\00\00\00\00\00\00\"\00\00\00\00\00\00\00\"\00\00\00\00\00\00\00B\00\00\00\00\00\00\00B\00\00\00\00\00\00\00\"\00\00\00\00\00\00\00B\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -30,10 +31,20 @@ (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 156)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 160)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 392)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -166,9 +177,9 @@ if i32.const 0 i32.const 24 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -183,9 +194,9 @@ if i32.const 0 i32.const 24 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -462,7 +473,7 @@ i32.const 80 i32.const 54 i32.const 43 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -473,7 +484,7 @@ local.get $1 call $~lib/memory/memory.fill local.get $2 - i32.const 3 + i32.const 15 call $~lib/util/runtime/register ) (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) @@ -558,7 +569,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 1 + i32.const 17 call $~lib/util/runtime/register local.set $0 end @@ -1045,7 +1056,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1060,7 +1071,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1083,7 +1094,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -1105,7 +1116,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1120,7 +1131,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1143,7 +1154,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -1165,7 +1176,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1182,7 +1193,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1205,7 +1216,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -1228,7 +1239,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1243,7 +1254,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1260,7 +1271,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1283,7 +1294,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1298,7 +1309,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -1378,7 +1389,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 18 call $~lib/util/runtime/register local.set $0 end @@ -1850,7 +1861,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1865,7 +1876,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1888,7 +1899,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -1910,7 +1921,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1925,7 +1936,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1948,7 +1959,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -1970,7 +1981,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1987,7 +1998,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2010,7 +2021,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -2033,7 +2044,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2048,7 +2059,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2065,7 +2076,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2088,7 +2099,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2103,7 +2114,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -2183,7 +2194,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 5 + i32.const 19 call $~lib/util/runtime/register local.set $0 end @@ -2685,7 +2696,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2700,7 +2711,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2723,7 +2734,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -2745,7 +2756,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2760,7 +2771,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2783,7 +2794,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -2805,7 +2816,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2822,7 +2833,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2845,7 +2856,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -2868,7 +2879,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2883,7 +2894,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2900,7 +2911,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2923,7 +2934,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2938,7 +2949,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3018,7 +3029,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 6 + i32.const 20 call $~lib/util/runtime/register local.set $0 end @@ -3490,7 +3501,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3505,7 +3516,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3528,7 +3539,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -3550,7 +3561,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3565,7 +3576,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3588,7 +3599,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -3610,7 +3621,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3627,7 +3638,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3650,7 +3661,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -3673,7 +3684,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3688,7 +3699,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3705,7 +3716,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3728,7 +3739,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3743,7 +3754,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3823,7 +3834,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 7 + i32.const 21 call $~lib/util/runtime/register local.set $0 end @@ -4329,7 +4340,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4344,7 +4355,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -4367,7 +4378,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -4389,7 +4400,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4404,7 +4415,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -4427,7 +4438,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -4449,7 +4460,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4466,7 +4477,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -4489,7 +4500,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -4512,7 +4523,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4527,7 +4538,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4544,7 +4555,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -4567,7 +4578,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4582,7 +4593,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4662,7 +4673,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 8 + i32.const 22 call $~lib/util/runtime/register local.set $0 end @@ -5126,7 +5137,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5141,7 +5152,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -5164,7 +5175,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -5186,7 +5197,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5201,7 +5212,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -5224,7 +5235,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -5246,7 +5257,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5263,7 +5274,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -5286,7 +5297,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -5309,7 +5320,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5324,7 +5335,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5341,7 +5352,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -5364,7 +5375,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5379,7 +5390,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5459,7 +5470,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 9 + i32.const 23 call $~lib/util/runtime/register local.set $0 end @@ -6014,7 +6025,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6029,7 +6040,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6052,7 +6063,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -6074,7 +6085,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6089,7 +6100,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6112,7 +6123,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -6134,7 +6145,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6151,7 +6162,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6174,7 +6185,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -6197,7 +6208,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6212,7 +6223,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6229,7 +6240,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6252,7 +6263,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6267,7 +6278,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6347,7 +6358,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 10 + i32.const 24 call $~lib/util/runtime/register local.set $0 end @@ -6814,7 +6825,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6829,7 +6840,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6852,7 +6863,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -6874,7 +6885,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6889,7 +6900,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6912,7 +6923,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -6934,7 +6945,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6951,7 +6962,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6974,7 +6985,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -6997,7 +7008,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7012,7 +7023,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7029,7 +7040,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7052,7 +7063,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7067,7 +7078,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7147,7 +7158,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 11 + i32.const 25 call $~lib/util/runtime/register local.set $0 end @@ -7618,7 +7629,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7633,7 +7644,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7656,7 +7667,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -7678,7 +7689,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7693,7 +7704,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7716,7 +7727,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -7738,7 +7749,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7755,7 +7766,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7778,7 +7789,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -7801,7 +7812,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7816,7 +7827,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7833,7 +7844,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7856,7 +7867,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7871,7 +7882,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7951,7 +7962,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 12 + i32.const 26 call $~lib/util/runtime/register local.set $0 end @@ -8422,7 +8433,7 @@ i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8437,7 +8448,7 @@ i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -8460,7 +8471,7 @@ i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -8482,7 +8493,7 @@ i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8497,7 +8508,7 @@ i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -8520,7 +8531,7 @@ i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -8542,7 +8553,7 @@ i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8559,7 +8570,7 @@ i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -8582,7 +8593,7 @@ i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -8605,7 +8616,7 @@ i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8620,7 +8631,7 @@ i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8637,7 +8648,7 @@ i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -8660,7 +8671,7 @@ i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8675,7 +8686,7 @@ i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8701,9 +8712,239 @@ call $std/set/testNumeric call $std/set/testNumeric ) - (func $start (; 106 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + local.get $2 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 107 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 109 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 110 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 111 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 112 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.tee $6 + local.get $1 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + local.get $8 + if + local.get $8 + local.get $6 + call $~lib/collector/dummy/__ref_unlink + end + local.get $7 + local.get $6 + call $~lib/collector/dummy/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 512 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $~lib/collector/dummy/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/Root#constructor (; 113 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 28 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 114 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_link + ) + (func $~lib/runtime/runtime.release (; 115 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_unlink + ) + (func $~lib/collector/dummy/__ref_collect (; 116 ;) (type $FUNCSIG$v) + nop + ) + (func $~lib/runtime/runtime.collect (; 117 ;) (type $FUNCSIG$v) + call $~lib/collector/dummy/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 118 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 119 ;) (type $FUNCSIG$v) call $start:std/set + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT ) - (func $null (; 107 ;) (type $FUNCSIG$v) + (func $null (; 120 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/simd.optimized.wat b/tests/compiler/std/simd.optimized.wat index 587c7142d7..bb456a1172 100644 --- a/tests/compiler/std/simd.optimized.wat +++ b/tests/compiler/std/simd.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (func $null (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/std/simd.untouched.wat b/tests/compiler/std/simd.untouched.wat index 2f0347c4aa..9f14327565 100644 --- a/tests/compiler/std/simd.untouched.wat +++ b/tests/compiler/std/simd.untouched.wat @@ -4,9 +4,7 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/ASC_FEATURE_SIMD i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (func $null (; 0 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 63c3e41042..a1513dfcc4 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -3,31 +3,41 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (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/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\08\00\00\00\01\00\00\00\02") - (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\08\00\00\00\02") - (data (i32.const 48) "\01\00\00\00\10\00\00\00\03\00\00\00\00\00\00\00\04") - (data (i32.const 72) "\03\00\00\00\10\00\00\008\00\00\008\00\00\00\10\00\00\00\02") - (data (i32.const 96) "\01\00\00\00\08\00\00\00\00\00\c0?\00\00 @") - (data (i32.const 112) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00\08\00\00\00\02") - (data (i32.const 136) "\01\00\00\00\10") + (data (i32.const 8) "\0f\00\00\00\08\00\00\00\01\00\00\00\02") + (data (i32.const 24) "\11\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\08\00\00\00\02") + (data (i32.const 48) "\0f\00\00\00\10\00\00\00\03\00\00\00\00\00\00\00\04") + (data (i32.const 72) "\12\00\00\00\10\00\00\008\00\00\008\00\00\00\10\00\00\00\02") + (data (i32.const 96) "\0f\00\00\00\08\00\00\00\00\00\c0?\00\00 @") + (data (i32.const 112) "\13\00\00\00\10\00\00\00h\00\00\00h\00\00\00\08\00\00\00\02") + (data (i32.const 136) "\0f\00\00\00\10") (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 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(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 160) "\14\00\00\00\10\00\00\00\90\00\00\00\90\00\00\00\10\00\00\00\02") + (data (i32.const 184) "\10\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) "\10\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 272) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 320) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 360) "\14") + (data (i32.const 496) "!\00\00\00\0e\00\00\00A\00\00\00\0e\00\00\00!\00\00\00\0e\00\00\00A\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/allocator/arena/__mem_free)) + (export "$.release" (func $~lib/allocator/arena/__mem_free)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) (func $~lib/array/Array#__get (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -41,7 +51,7 @@ i32.const 240 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 36 @@ -496,7 +506,10 @@ end end ) - (func $~lib/util/runtime/reallocate (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/arena/__mem_free (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/util/runtime/reallocate (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -530,7 +543,7 @@ i32.shl i32.const 0 local.get $0 - i32.const 320 + i32.const 528 i32.gt_u select local.get $4 @@ -562,14 +575,14 @@ i32.eq if local.get $0 - i32.const 320 + i32.const 528 i32.le_u if i32.const 0 i32.const 280 - i32.const 88 + i32.const 91 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -592,7 +605,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/ensureCapacity (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureCapacity (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -612,7 +625,7 @@ i32.const 240 i32.const 14 i32.const 64 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -640,7 +653,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 7 ;) (type $FUNCSIG$v) + (func $~lib/array/Array#__set (; 8 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 44 i32.load @@ -661,7 +674,7 @@ i32.store end ) - (func $~lib/array/Array#__get (; 8 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) + (func $~lib/array/Array#__get (; 9 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) local.get $0 i32.const 88 i32.load @@ -673,7 +686,7 @@ i32.const 240 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 84 @@ -684,7 +697,7 @@ i32.add i64.load ) - (func $~lib/array/Array#__set (; 9 ;) (type $FUNCSIG$v) + (func $~lib/array/Array#__set (; 10 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 92 i32.load @@ -705,7 +718,7 @@ i32.store end ) - (func $~lib/array/Array#__get (; 10 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $~lib/array/Array#__get (; 11 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) local.get $0 i32.const 128 i32.load @@ -717,7 +730,7 @@ i32.const 240 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 124 @@ -728,7 +741,7 @@ i32.add f32.load ) - (func $~lib/array/Array#__set (; 11 ;) (type $FUNCSIG$v) + (func $~lib/array/Array#__set (; 12 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 132 i32.load @@ -749,7 +762,7 @@ i32.store end ) - (func $~lib/array/Array#__get (; 12 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/array/Array#__get (; 13 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) local.get $0 i32.const 176 i32.load @@ -761,7 +774,7 @@ i32.const 240 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 172 @@ -772,7 +785,7 @@ i32.add f64.load ) - (func $~lib/array/Array#__set (; 13 ;) (type $FUNCSIG$v) + (func $~lib/array/Array#__set (; 14 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 180 i32.load @@ -793,7 +806,7 @@ i32.store end ) - (func $start:std/static-array (; 14 ;) (type $FUNCSIG$v) + (func $start:std/static-array (; 15 ;) (type $FUNCSIG$v) i32.const 44 i32.load i32.const 2 @@ -803,7 +816,7 @@ i32.const 192 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -815,7 +828,7 @@ i32.const 192 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -827,10 +840,10 @@ i32.const 192 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 320 + i32.const 528 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -844,7 +857,7 @@ i32.const 192 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 92 @@ -856,7 +869,7 @@ i32.const 192 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -868,7 +881,7 @@ i32.const 192 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -880,7 +893,7 @@ i32.const 192 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $~lib/array/Array#__set @@ -893,7 +906,7 @@ i32.const 192 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 132 @@ -905,7 +918,7 @@ i32.const 192 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -917,7 +930,7 @@ i32.const 192 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -929,7 +942,7 @@ i32.const 192 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $~lib/array/Array#__set @@ -942,7 +955,7 @@ i32.const 192 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 180 @@ -954,7 +967,7 @@ i32.const 192 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -966,7 +979,7 @@ i32.const 192 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -978,7 +991,7 @@ i32.const 192 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $~lib/array/Array#__set @@ -991,14 +1004,250 @@ i32.const 192 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 8 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 360 + i32.load + i32.le_u + else + local.get $0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 360 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + local.tee $1 + i32.eqz + if + local.get $0 + i32.const 360 + i32.load + i32.gt_u + local.set $1 + end + local.get $1 + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 360 + i32.add + i32.load + end + ) + (func $~lib/util/runtime/allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 7 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add + ) + (func $~lib/util/runtime/register (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 528 + i32.le_u + if + i32.const 0 + i32.const 280 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 8 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 280 + i32.const 133 + i32.const 4 + call $~lib/builtins/abort unreachable end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/runtime/runtime.newObject (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block (result i32) + local.get $0 + call $~lib/util/runtime/allocate + end + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + i32.const 360 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 360 + i32.add + i32.load + end + local.tee $3 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 8 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $2 + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $3 + i32.const 512 + i32.and + if + local.get $1 + local.get $2 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + if + i32.const 0 + i32.const 328 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $0 + ) + (func $~lib/runtime/runtime.collect (; 24 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 328 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable ) - (func $start (; 15 ;) (type $FUNCSIG$v) + (func $start (; 25 ;) (type $FUNCSIG$v) call $start:std/static-array ) - (func $null (; 16 ;) (type $FUNCSIG$v) + (func $null (; 26 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index e8745b3056..ddb6f4994b 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -11,19 +11,21 @@ (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$viid (func (param i32 i32 f64))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\08\00\00\00\02\00\00\00") - (data (i32.const 48) "\01\00\00\00\10\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00") - (data (i32.const 72) "\03\00\00\00\10\00\00\008\00\00\008\00\00\00\10\00\00\00\02\00\00\00") - (data (i32.const 96) "\01\00\00\00\08\00\00\00\00\00\c0?\00\00 @") - (data (i32.const 112) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00\08\00\00\00\02\00\00\00") - (data (i32.const 136) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\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\00\00\00") - (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\00") - (data (i32.const 232) "\06\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 272) "\06\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\0f\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 24) "\11\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\08\00\00\00\02\00\00\00") + (data (i32.const 48) "\0f\00\00\00\10\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00") + (data (i32.const 72) "\12\00\00\00\10\00\00\008\00\00\008\00\00\00\10\00\00\00\02\00\00\00") + (data (i32.const 96) "\0f\00\00\00\08\00\00\00\00\00\c0?\00\00 @") + (data (i32.const 112) "\13\00\00\00\10\00\00\00h\00\00\00h\00\00\00\08\00\00\00\02\00\00\00") + (data (i32.const 136) "\0f\00\00\00\10\00\00\00\00\00\00\00\00\00\f4?\00\00\00\00\00\00\02@") + (data (i32.const 160) "\14\00\00\00\10\00\00\00\90\00\00\00\90\00\00\00\10\00\00\00\02\00\00\00") + (data (i32.const 184) "\10\00\00\00&\00\00\00s\00t\00d\00/\00s\00t\00a\00t\00i\00c\00-\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 232) "\10\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 272) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 320) "\10\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 360) "\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00A\00\00\00\0e\00\00\00!\00\00\00\0e\00\00\00A\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/static-array/i i32 (i32.const 32)) @@ -35,9 +37,19 @@ (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 320)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 360)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 528)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) (func $~lib/array/Array#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -64,7 +76,7 @@ i32.const 240 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -705,9 +717,9 @@ if i32.const 0 i32.const 280 - i32.const 88 + i32.const 91 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -758,7 +770,7 @@ i32.const 240 i32.const 14 i32.const 64 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -849,7 +861,7 @@ i32.const 240 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -917,7 +929,7 @@ i32.const 240 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -985,7 +997,7 @@ i32.const 240 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1039,7 +1051,7 @@ i32.const 192 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/i @@ -1053,7 +1065,7 @@ i32.const 192 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/i @@ -1067,7 +1079,7 @@ i32.const 192 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/memory/HEAP_BASE @@ -1095,7 +1107,7 @@ i32.const 192 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/I @@ -1108,7 +1120,7 @@ i32.const 192 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/I @@ -1122,7 +1134,7 @@ i32.const 192 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/I @@ -1136,7 +1148,7 @@ i32.const 192 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/I @@ -1154,7 +1166,7 @@ i32.const 192 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/f @@ -1167,7 +1179,7 @@ i32.const 192 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/f @@ -1181,7 +1193,7 @@ i32.const 192 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/f @@ -1195,7 +1207,7 @@ i32.const 192 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/f @@ -1213,7 +1225,7 @@ i32.const 192 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/F @@ -1226,7 +1238,7 @@ i32.const 192 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/F @@ -1240,7 +1252,7 @@ i32.const 192 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/F @@ -1254,7 +1266,7 @@ i32.const 192 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/F @@ -1272,13 +1284,265 @@ i32.const 192 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start (; 31 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + local.get $2 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/util/runtime/allocate (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/util/runtime/register (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 280 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 280 + i32.const 133 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/runtime/runtime.newObject (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 512 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $7 + block $break|0 + loop $continue|0 + local.get $6 + local.get $7 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $8 + local.get $8 + if + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 328 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/runtime.retain (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.release (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 42 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 328 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/runtime/runtime#constructor (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 44 ;) (type $FUNCSIG$v) call $start:std/static-array ) - (func $null (; 32 ;) (type $FUNCSIG$v) + (func $null (; 45 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index 531e1b6915..58380a577d 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -3,28 +3,38 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (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/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\0c\00\00\00\01\d87\dch\00i\00R\d8b\df") - (data (i32.const 32) "\01\00\00\00$\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s") - (data (i32.const 80) "\01") - (data (i32.const 88) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 128) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 176) "\01\00\00\00\04\00\00\00\01\d87\dc") - (data (i32.const 192) "\01\00\00\00\04\00\00\00h\00i") - (data (i32.const 208) "\01\00\00\00\04\00\00\00R\d8b\df") - (data (i32.const 224) "\01\00\00\00\02") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\0c\00\00\00\01\d87\dch\00i\00R\d8b\df") + (data (i32.const 32) "\10\00\00\00$\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s") + (data (i32.const 80) "\10") + (data (i32.const 88) "\10\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 128) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 176) "\10\00\00\00\04\00\00\00\01\d87\dc") + (data (i32.const 192) "\10\00\00\00\04\00\00\00h\00i") + (data (i32.const 208) "\10\00\00\00\04\00\00\00R\d8b\df") + (data (i32.const 224) "\10\00\00\00\02") + (data (i32.const 240) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 280) "\11") + (data (i32.const 416) "!\00\00\00\0e") (global $std/string-utf8/str (mut i32) (i32.const 16)) (global $std/string-utf8/len (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 $std/string-utf8/ptr (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/allocator/arena/__mem_free)) + (export "$.release" (func $~lib/allocator/arena/__mem_free)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) (func $~lib/string/String#get:lengthUTF8 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -586,40 +596,43 @@ end end ) - (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/allocator/arena/__mem_free (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - i32.const 236 + i32.const 424 i32.le_u if i32.const 0 i32.const 136 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 8 i32.sub - local.tee $1 + local.tee $2 i32.load i32.const -1520547049 i32.ne if i32.const 0 i32.const 136 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + local.get $2 local.get $1 - i32.const 1 i32.store local.get $0 ) - (func $~lib/string/String.fromUTF8 (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.fromUTF8 (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -683,7 +696,7 @@ i32.const 96 i32.const 461 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -730,7 +743,7 @@ i32.const 96 i32.const 465 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -809,7 +822,7 @@ i32.const 96 i32.const 477 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -864,7 +877,7 @@ i32.const 96 i32.const 486 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -874,9 +887,10 @@ local.get $5 call $~lib/memory/memory.copy local.get $0 + i32.const 16 call $~lib/util/runtime/register ) - (func $~lib/util/string/compareImpl (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 @@ -909,7 +923,7 @@ end local.get $3 ) - (func $~lib/string/String.__eq (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -955,7 +969,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $start:std/string-utf8 (; 10 ;) (type $FUNCSIG$v) + (func $start:std/string-utf8 (; 11 ;) (type $FUNCSIG$v) global.get $std/string-utf8/str call $~lib/string/String#get:lengthUTF8 global.set $std/string-utf8/len @@ -967,10 +981,10 @@ i32.const 40 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 240 + i32.const 424 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -986,7 +1000,7 @@ i32.const 40 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -998,7 +1012,7 @@ i32.const 40 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1010,7 +1024,7 @@ i32.const 40 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1022,7 +1036,7 @@ i32.const 40 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1034,7 +1048,7 @@ i32.const 40 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1046,7 +1060,7 @@ i32.const 40 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1058,7 +1072,7 @@ i32.const 40 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1070,7 +1084,7 @@ i32.const 40 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1082,7 +1096,7 @@ i32.const 40 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1094,7 +1108,7 @@ i32.const 40 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1104,7 +1118,7 @@ i32.const 40 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1118,7 +1132,7 @@ i32.const 40 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1134,7 +1148,7 @@ i32.const 40 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1148,7 +1162,7 @@ i32.const 40 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1164,7 +1178,7 @@ i32.const 40 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1180,7 +1194,7 @@ i32.const 40 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1196,14 +1210,194 @@ i32.const 40 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 8 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 280 + i32.load + i32.le_u + else + local.get $0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 280 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + local.tee $1 + i32.eqz + if + local.get $0 + i32.const 280 + i32.load + i32.gt_u + local.set $1 + end + local.get $1 + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 280 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + i32.const 280 + i32.load + i32.gt_u + end + if (result i32) unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 280 + i32.add + i32.load + end + local.tee $3 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 8 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 end + local.set $2 + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $3 + i32.const 512 + i32.and + if + local.get $1 + local.get $2 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + if + i32.const 0 + i32.const 248 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $0 + ) + (func $~lib/runtime/runtime.collect (; 18 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 248 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable ) - (func $start (; 11 ;) (type $FUNCSIG$v) + (func $start (; 19 ;) (type $FUNCSIG$v) call $start:std/string-utf8 ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 20 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index 3766bf107b..ae0f54c0f8 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -6,17 +6,19 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\0c\00\00\00\01\d87\dch\00i\00R\d8b\df") - (data (i32.const 32) "\01\00\00\00$\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s\00") - (data (i32.const 80) "\01\00\00\00\00\00\00\00") - (data (i32.const 88) "\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 128) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 176) "\01\00\00\00\04\00\00\00\01\d87\dc") - (data (i32.const 192) "\01\00\00\00\04\00\00\00h\00i\00") - (data (i32.const 208) "\01\00\00\00\04\00\00\00R\d8b\df") - (data (i32.const 224) "\01\00\00\00\02\00\00\00\00\00") + (data (i32.const 8) "\10\00\00\00\0c\00\00\00\01\d87\dch\00i\00R\d8b\df") + (data (i32.const 32) "\10\00\00\00$\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s\00") + (data (i32.const 80) "\10\00\00\00\00\00\00\00") + (data (i32.const 88) "\10\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 128) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 176) "\10\00\00\00\04\00\00\00\01\d87\dc") + (data (i32.const 192) "\10\00\00\00\04\00\00\00h\00i\00") + (data (i32.const 208) "\10\00\00\00\04\00\00\00R\d8b\df") + (data (i32.const 224) "\10\00\00\00\02\00\00\00\00\00") + (data (i32.const 240) "\10\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 280) "\11\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/string-utf8/str (mut i32) (i32.const 16)) @@ -27,9 +29,18 @@ (global $std/string-utf8/ptr (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 236)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 280)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 424)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) (func $~lib/string/String#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -706,9 +717,9 @@ if i32.const 0 i32.const 136 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -723,9 +734,9 @@ if i32.const 0 i32.const 136 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -812,7 +823,7 @@ i32.const 96 i32.const 461 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -866,7 +877,7 @@ i32.const 96 i32.const 465 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -961,7 +972,7 @@ i32.const 96 i32.const 477 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1024,7 +1035,7 @@ i32.const 96 i32.const 486 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1037,7 +1048,7 @@ local.get $3 call $~lib/memory/memory.free local.get $7 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/string/compareImpl (; 13 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) @@ -1150,7 +1161,7 @@ i32.const 40 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/memory/HEAP_BASE @@ -1176,7 +1187,7 @@ i32.const 40 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1189,7 +1200,7 @@ i32.const 40 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1202,7 +1213,7 @@ i32.const 40 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1215,7 +1226,7 @@ i32.const 40 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1228,7 +1239,7 @@ i32.const 40 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1241,7 +1252,7 @@ i32.const 40 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1254,7 +1265,7 @@ i32.const 40 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1267,7 +1278,7 @@ i32.const 40 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1280,7 +1291,7 @@ i32.const 40 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1293,7 +1304,7 @@ i32.const 40 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1306,7 +1317,7 @@ i32.const 40 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1320,7 +1331,7 @@ i32.const 40 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1336,7 +1347,7 @@ i32.const 40 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1350,7 +1361,7 @@ i32.const 40 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1366,7 +1377,7 @@ i32.const 40 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1382,7 +1393,7 @@ i32.const 40 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1398,15 +1409,215 @@ i32.const 40 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr call $~lib/memory/memory.free ) - (func $start (; 16 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + local.get $2 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 512 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $7 + block $break|0 + loop $continue|0 + local.get $6 + local.get $7 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $8 + local.get $8 + if + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 248 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/runtime.retain (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.release (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 25 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 248 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/runtime/runtime#constructor (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 27 ;) (type $FUNCSIG$v) call $start:std/string-utf8 ) - (func $null (; 17 ;) (type $FUNCSIG$v) + (func $null (; 28 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 5bcf94de6f..e5cd260efe 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -15,318 +15,318 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00 ") + (data (i32.const 8) "\10\00\00\00 ") (data (i32.const 24) "h\00i\00,\00 \00I\00\'\00m\00 \00a\00 \00s\00t\00r\00i\00n\00g") - (data (i32.const 56) "\01\00\00\00\1a") + (data (i32.const 56) "\10\00\00\00\1a") (data (i32.const 72) "s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 104) "\01") - (data (i32.const 120) "\01\00\00\00\02") - (data (i32.const 144) "\01\00\00\00\02") + (data (i32.const 104) "\10") + (data (i32.const 120) "\10\00\00\00\02") + (data (i32.const 144) "\10\00\00\00\02") (data (i32.const 160) "a") - (data (i32.const 168) "\01\00\00\00(") + (data (i32.const 168) "\10\00\00\00(") (data (i32.const 184) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 224) "\01\00\00\00\02") + (data (i32.const 224) "\10\00\00\00\02") (data (i32.const 240) "6") - (data (i32.const 248) "\01\00\00\00\1c") + (data (i32.const 248) "\10\00\00\00\1c") (data (i32.const 264) "~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 296) "\01\00\00\00\04") + (data (i32.const 296) "\10\00\00\00\04") (data (i32.const 312) "4\d8\06\df") - (data (i32.const 320) "\01\00\00\00\04") + (data (i32.const 320) "\10\00\00\00\04") (data (i32.const 336) "h\00i") - (data (i32.const 344) "\01\00\00\00\08") + (data (i32.const 344) "\10\00\00\00\08") (data (i32.const 360) "n\00u\00l\00l") - (data (i32.const 368) "\01\00\00\00\0c") + (data (i32.const 368) "\10\00\00\00\0c") (data (i32.const 384) "s\00t\00r\00i\00n\00g") - (data (i32.const 400) "\01\00\00\00\06") + (data (i32.const 400) "\10\00\00\00\06") (data (i32.const 416) "I\00\'\00m") - (data (i32.const 424) "\01\00\00\00\02") + (data (i32.const 424) "\10\00\00\00\02") (data (i32.const 440) " ") - (data (i32.const 448) "\01\00\00\00\06") + (data (i32.const 448) "\10\00\00\00\06") (data (i32.const 464) " \00 \00 ") - (data (i32.const 472) "\01\00\00\00\06") + (data (i32.const 472) "\10\00\00\00\06") (data (i32.const 488) "a\00b\00c") - (data (i32.const 496) "\01\00\00\00\n") + (data (i32.const 496) "\10\00\00\00\n") (data (i32.const 512) " \00 \00a\00b\00c") - (data (i32.const 528) "\01\00\00\00\06") + (data (i32.const 528) "\10\00\00\00\06") (data (i32.const 544) "1\002\003") - (data (i32.const 552) "\01\00\00\00\0c") + (data (i32.const 552) "\10\00\00\00\0c") (data (i32.const 568) "1\002\003\00a\00b\00c") - (data (i32.const 584) "\01\00\00\00\10") + (data (i32.const 584) "\10\00\00\00\10") (data (i32.const 600) "1\002\003\001\002\00a\00b\00c") - (data (i32.const 616) "\01\00\00\00\n") + (data (i32.const 616) "\10\00\00\00\n") (data (i32.const 632) "a\00b\00c\00 \00 ") - (data (i32.const 648) "\01\00\00\00\0c") + (data (i32.const 648) "\10\00\00\00\0c") (data (i32.const 664) "a\00b\00c\00a\00b\00c") - (data (i32.const 680) "\01\00\00\00\10") + (data (i32.const 680) "\10\00\00\00\10") (data (i32.const 696) "a\00b\00c\00a\00b\00c\00a\00b") - (data (i32.const 712) "\01\00\00\00\02") + (data (i32.const 712) "\10\00\00\00\02") (data (i32.const 728) ",") - (data (i32.const 736) "\01\00\00\00\02") + (data (i32.const 736) "\10\00\00\00\02") (data (i32.const 752) "x") - (data (i32.const 760) "\01\00\00\00\06") + (data (i32.const 760) "\10\00\00\00\06") (data (i32.const 776) ",\00 \00I") - (data (i32.const 784) "\01\00\00\00\02") + (data (i32.const 784) "\10\00\00\00\02") (data (i32.const 800) "g") - (data (i32.const 808) "\01\00\00\00\02") + (data (i32.const 808) "\10\00\00\00\02") (data (i32.const 824) "i") - (data (i32.const 832) "\01\00\00\00\02") + (data (i32.const 832) "\10\00\00\00\02") (data (i32.const 848) "0") - (data (i32.const 856) "\01\00\00\00\02") + (data (i32.const 856) "\10\00\00\00\02") (data (i32.const 872) "1") - (data (i32.const 880) "\01\00\00\00\n") + (data (i32.const 880) "\10\00\00\00\n") (data (i32.const 896) "0\00b\001\000\001") - (data (i32.const 912) "\01\00\00\00\n") + (data (i32.const 912) "\10\00\00\00\n") (data (i32.const 928) "0\00o\007\000\007") - (data (i32.const 944) "\01\00\00\00\n") + (data (i32.const 944) "\10\00\00\00\n") (data (i32.const 960) "0\00x\00f\000\00f") - (data (i32.const 976) "\01\00\00\00\n") + (data (i32.const 976) "\10\00\00\00\n") (data (i32.const 992) "0\00x\00F\000\00F") - (data (i32.const 1008) "\01\00\00\00\06") + (data (i32.const 1008) "\10\00\00\00\06") (data (i32.const 1024) "0\001\001") - (data (i32.const 1032) "\01\00\00\00\08") + (data (i32.const 1032) "\10\00\00\00\08") (data (i32.const 1048) "0\00x\001\00g") - (data (i32.const 1056) "\01\00\00\00\06") + (data (i32.const 1056) "\10\00\00\00\06") (data (i32.const 1072) "0\00.\001") - (data (i32.const 1080) "\01\00\00\00\06") + (data (i32.const 1080) "\10\00\00\00\06") (data (i32.const 1096) ".\002\005") - (data (i32.const 1104) "\01\00\00\00\10") + (data (i32.const 1104) "\10\00\00\00\10") (data (i32.const 1120) ".\001\00f\00o\00o\00b\00a\00r") - (data (i32.const 1136) "\01\00\00\00\02") + (data (i32.const 1136) "\10\00\00\00\02") (data (i32.const 1152) "b") - (data (i32.const 1160) "\01\00\00\00\04") + (data (i32.const 1160) "\10\00\00\00\04") (data (i32.const 1176) "a\00b") - (data (i32.const 1184) "\01\00\00\00\08") + (data (i32.const 1184) "\10\00\00\00\08") (data (i32.const 1200) "k\00e\00y\001") - (data (i32.const 1208) "\01\00\00\00\08") + (data (i32.const 1208) "\10\00\00\00\08") (data (i32.const 1224) "k\00e\00y\002") - (data (i32.const 1232) "\01\00\00\00\06") + (data (i32.const 1232) "\10\00\00\00\06") (data (i32.const 1248) "k\00e\001") - (data (i32.const 1256) "\01\00\00\00\06") + (data (i32.const 1256) "\10\00\00\00\06") (data (i32.const 1272) "k\00e\002") - (data (i32.const 1280) "\01\00\00\00\n") + (data (i32.const 1280) "\10\00\00\00\n") (data (i32.const 1296) "k\00e\00y\001\002") - (data (i32.const 1312) "\01\00\00\00\n") + (data (i32.const 1312) "\10\00\00\00\n") (data (i32.const 1328) "k\00e\00y\001\001") - (data (i32.const 1344) "\01\00\00\00\0e") + (data (i32.const 1344) "\10\00\00\00\0e") (data (i32.const 1360) "\a40\ed0\cf0\cb0\db0\d80\c80") - (data (i32.const 1376) "\01\00\00\00\0e") + (data (i32.const 1376) "\10\00\00\00\0e") (data (i32.const 1392) "\a60\f00\ce0\aa0\af0\e40\de0") - (data (i32.const 1408) "\01\00\00\00\16") + (data (i32.const 1408) "\10\00\00\00\16") (data (i32.const 1424) "D\00\19 f\00h\00u\00a\00s\00c\00a\00i\00l") - (data (i32.const 1448) "\01\00\00\00\14") + (data (i32.const 1448) "\10\00\00\00\14") (data (i32.const 1464) "D\00\19 \1f\1eu\00a\00s\00c\00a\00i\00l") - (data (i32.const 1488) "\01\00\00\00\04") + (data (i32.const 1488) "\10\00\00\00\04") (data (i32.const 1504) "b\00a") - (data (i32.const 1512) "\01\00\00\00\04") + (data (i32.const 1512) "\10\00\00\00\04") (data (i32.const 1528) "a\00a") - (data (i32.const 1536) "\01\00\00\00\06") + (data (i32.const 1536) "\10\00\00\00\06") (data (i32.const 1552) "a\00a\00a") - (data (i32.const 1560) "\01\00\00\00\10") + (data (i32.const 1560) "\10\00\00\00\10") (data (i32.const 1576) "a\00b\00a\00b\00a\00b\00a\00b") - (data (i32.const 1592) "\01\00\00\00\n") + (data (i32.const 1592) "\10\00\00\00\n") (data (i32.const 1608) "a\00a\00a\00a\00a") - (data (i32.const 1624) "\01\00\00\00\0c") + (data (i32.const 1624) "\10\00\00\00\0c") (data (i32.const 1640) "a\00a\00a\00a\00a\00a") - (data (i32.const 1656) "\01\00\00\00\0e") + (data (i32.const 1656) "\10\00\00\00\0e") (data (i32.const 1672) "a\00a\00a\00a\00a\00a\00a") - (data (i32.const 1688) "\01\00\00\00\1c") + (data (i32.const 1688) "\10\00\00\00\1c") (data (i32.const 1704) "a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n") - (data (i32.const 1736) "\01\00\00\00\02") + (data (i32.const 1736) "\10\00\00\00\02") (data (i32.const 1752) "n") - (data (i32.const 1760) "\01\00\00\00\n") + (data (i32.const 1760) "\10\00\00\00\n") (data (i32.const 1776) "j\00k\00l\00m\00n") - (data (i32.const 1792) "\01\00\00\00\n") + (data (i32.const 1792) "\10\00\00\00\n") (data (i32.const 1808) "c\00d\00e\00f\00g") - (data (i32.const 1824) "\01\00\00\00\n") + (data (i32.const 1824) "\10\00\00\00\n") (data (i32.const 1840) "d\00e\00f\00g\00h") - (data (i32.const 1856) "\01\00\00\00\1a") + (data (i32.const 1856) "\10\00\00\00\1a") (data (i32.const 1872) "a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m") - (data (i32.const 1904) "\01\00\00\00\1a") + (data (i32.const 1904) "\10\00\00\00\1a") (data (i32.const 1920) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1952) "\01\00\00\00\n") + (data (i32.const 1952) "\10\00\00\00\n") (data (i32.const 1968) "a\00,\00b\00,\00c") - (data (i32.const 1984) "\01\00\00\00\02") + (data (i32.const 1984) "\10\00\00\00\02") (data (i32.const 2000) ".") - (data (i32.const 2008) "\01\00\00\00\02") + (data (i32.const 2008) "\10\00\00\00\02") (data (i32.const 2024) "c") - (data (i32.const 2032) "\01\00\00\00\0e") + (data (i32.const 2032) "\10\00\00\00\0e") (data (i32.const 2048) "a\00,\00 \00b\00,\00 \00c") - (data (i32.const 2064) "\01\00\00\00\04") + (data (i32.const 2064) "\10\00\00\00\04") (data (i32.const 2080) ",\00 ") - (data (i32.const 2088) "\01\00\00\00\0c") + (data (i32.const 2088) "\10\00\00\00\0c") (data (i32.const 2104) "a\00,\00b\00,\00,\00c") - (data (i32.const 2120) "\01\00\00\00\0c") + (data (i32.const 2120) "\10\00\00\00\0c") (data (i32.const 2136) ",\00a\00,\00b\00,\00c") - (data (i32.const 2152) "\01\00\00\00\0c") + (data (i32.const 2152) "\10\00\00\00\0c") (data (i32.const 2168) "a\00,\00b\00,\00c\00,") - (data (i32.const 2184) "\03\00\00\00\90\01") + (data (i32.const 2184) "\0f\00\00\00\90\01") (data (i32.const 2200) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 2600) "\04\00\00\00\10") + (data (i32.const 2600) "\13\00\00\00\10") (data (i32.const 2616) "\98\08\00\00\98\08\00\00\90\01\00\00d") - (data (i32.const 2632) "\01\00\00\00\02") + (data (i32.const 2632) "\10\00\00\00\02") (data (i32.const 2648) "8") - (data (i32.const 2656) "\01\00\00\00\n") + (data (i32.const 2656) "\10\00\00\00\n") (data (i32.const 2672) "-\001\000\000\000") - (data (i32.const 2688) "\01\00\00\00\08") + (data (i32.const 2688) "\10\00\00\00\08") (data (i32.const 2704) "1\002\003\004") - (data (i32.const 2712) "\01\00\00\00\n") + (data (i32.const 2712) "\10\00\00\00\n") (data (i32.const 2728) "1\002\003\004\005") - (data (i32.const 2744) "\01\00\00\00\0c") + (data (i32.const 2744) "\10\00\00\00\0c") (data (i32.const 2760) "1\002\003\004\005\006") - (data (i32.const 2776) "\01\00\00\00\0e") + (data (i32.const 2776) "\10\00\00\00\0e") (data (i32.const 2792) "1\001\001\001\001\001\001") - (data (i32.const 2808) "\01\00\00\00\0e") + (data (i32.const 2808) "\10\00\00\00\0e") (data (i32.const 2824) "1\002\003\004\005\006\007") - (data (i32.const 2840) "\01\00\00\00\14") + (data (i32.const 2840) "\10\00\00\00\14") (data (i32.const 2856) "2\001\004\007\004\008\003\006\004\006") - (data (i32.const 2880) "\01\00\00\00\14") + (data (i32.const 2880) "\10\00\00\00\14") (data (i32.const 2896) "2\001\004\007\004\008\003\006\004\007") - (data (i32.const 2920) "\01\00\00\00\16") + (data (i32.const 2920) "\10\00\00\00\16") (data (i32.const 2936) "-\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 2960) "\01\00\00\00\04") + (data (i32.const 2960) "\10\00\00\00\04") (data (i32.const 2976) "-\001") - (data (i32.const 2984) "\01\00\00\00\08") + (data (i32.const 2984) "\10\00\00\00\08") (data (i32.const 3000) "1\000\000\000") - (data (i32.const 3008) "\01\00\00\00\14") + (data (i32.const 3008) "\10\00\00\00\14") (data (i32.const 3024) "2\001\004\007\004\008\003\006\004\008") - (data (i32.const 3048) "\01\00\00\00\14") + (data (i32.const 3048) "\10\00\00\00\14") (data (i32.const 3064) "4\002\009\004\009\006\007\002\009\005") - (data (i32.const 3088) "\01\00\00\00\10") + (data (i32.const 3088) "\10\00\00\00\10") (data (i32.const 3104) "9\009\009\009\009\009\009\009") - (data (i32.const 3120) "\01\00\00\00\12") + (data (i32.const 3120) "\10\00\00\00\12") (data (i32.const 3136) "1\000\000\000\000\000\000\000\000") - (data (i32.const 3160) "\01\00\00\00\16") + (data (i32.const 3160) "\10\00\00\00\16") (data (i32.const 3176) "6\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3200) "\01\00\00\00\18") + (data (i32.const 3200) "\10\00\00\00\18") (data (i32.const 3216) "8\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3240) "\01\00\00\00\1e") + (data (i32.const 3240) "\10\00\00\00\1e") (data (i32.const 3256) "9\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3288) "\01\00\00\00 ") + (data (i32.const 3288) "\10\00\00\00 ") (data (i32.const 3304) "9\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3336) "\01\00\00\00\"") + (data (i32.const 3336) "\10\00\00\00\"") (data (i32.const 3352) "1\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3392) "\01\00\00\00(") + (data (i32.const 3392) "\10\00\00\00(") (data (i32.const 3408) "1\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005") - (data (i32.const 3448) "\01\00\00\00\n") + (data (i32.const 3448) "\10\00\00\00\n") (data (i32.const 3464) "-\001\002\003\004") - (data (i32.const 3480) "\01\00\00\00\16") + (data (i32.const 3480) "\10\00\00\00\16") (data (i32.const 3496) "-\004\002\009\004\009\006\007\002\009\005") - (data (i32.const 3520) "\01\00\00\00\18") + (data (i32.const 3520) "\10\00\00\00\18") (data (i32.const 3536) "-\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3560) "\01\00\00\00\1a") + (data (i32.const 3560) "\10\00\00\00\1a") (data (i32.const 3576) "-\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3608) "\01\00\00\00 ") + (data (i32.const 3608) "\10\00\00\00 ") (data (i32.const 3624) "-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3656) "\01\00\00\00$") + (data (i32.const 3656) "\10\00\00\00$") (data (i32.const 3672) "-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 3712) "\01\00\00\00&") + (data (i32.const 3712) "\10\00\00\00&") (data (i32.const 3728) "9\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007") - (data (i32.const 3768) "\01\00\00\00(") + (data (i32.const 3768) "\10\00\00\00(") (data (i32.const 3784) "-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008") - (data (i32.const 3824) "\01\00\00\00\06") + (data (i32.const 3824) "\10\00\00\00\06") (data (i32.const 3840) "0\00.\000") - (data (i32.const 3848) "\01\00\00\00\06") + (data (i32.const 3848) "\10\00\00\00\06") (data (i32.const 3864) "N\00a\00N") - (data (i32.const 3872) "\01\00\00\00\12") + (data (i32.const 3872) "\10\00\00\00\12") (data (i32.const 3888) "-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3912) "\01\00\00\00\10") + (data (i32.const 3912) "\10\00\00\00\10") (data (i32.const 3928) "I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 3944) "\03\00\00\00\b8\02") + (data (i32.const 3944) "\0f\00\00\00\b8\02") (data (i32.const 3960) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8#push + else + local.get $2 + i32.const 120 + call $~lib/array/Array<~lib/string/String>#push + end + local.get $5 + local.get $10 i32.const 1 - i32.shl - local.get $0 i32.add - local.get $6 - call $~lib/memory/memory.copy - local.get $2 - local.get $9 - i32.const 1 - call $~lib/util/runtime/register - call $~lib/array/Array<~lib/string/String>#push - else - local.get $2 - i32.const 120 - call $~lib/array/Array<~lib/string/String>#push + local.tee $10 + i32.eq + if + local.get $2 + return + end + local.get $7 + local.get $8 + i32.add + local.set $4 + br $continue|1 end - local.get $5 - local.get $10 + end + local.get $4 + i32.eqz + if i32.const 1 - i32.add - local.tee $10 - i32.eq + call $~lib/util/runtime/makeArray + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.load + local.get $0 + i32.ne if local.get $2 - return + local.get $0 + i32.store end - local.get $7 - local.get $8 - i32.add - local.set $4 - br $continue|1 + local.get $1 + return end - end - local.get $4 - i32.eqz - if - i32.const 1 - i32.const 2 - call $~lib/runtime/runtime.newArray + local.get $3 + local.get $4 + i32.sub local.tee $1 - i32.load offset=4 - local.tee $2 - i32.load - local.get $0 - i32.ne + i32.const 0 + i32.gt_s if - local.get $2 + local.get $1 + i32.const 1 + i32.shl + local.tee $1 + call $~lib/util/runtime/allocate + local.tee $3 + local.get $4 + i32.const 1 + i32.shl local.get $0 - i32.store + i32.add + local.get $1 + call $~lib/memory/memory.copy + local.get $2 + local.get $3 + i32.const 16 + call $~lib/util/runtime/register + call $~lib/array/Array<~lib/string/String>#push + else + local.get $2 + i32.const 120 + call $~lib/array/Array<~lib/string/String>#push end - local.get $1 + local.get $2 return end - local.get $3 - local.get $4 - i32.sub - local.tee $1 i32.const 0 - i32.gt_s - if - local.get $1 - i32.const 1 - i32.shl - local.tee $1 - call $~lib/util/runtime/allocate - local.tee $3 - local.get $4 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.get $1 - call $~lib/memory/memory.copy - local.get $2 - local.get $3 - i32.const 1 - call $~lib/util/runtime/register - call $~lib/array/Array<~lib/string/String>#push - else - local.get $2 - i32.const 120 - call $~lib/array/Array<~lib/string/String>#push - end - local.get $2 + call $~lib/util/runtime/makeArray ) (func $~lib/array/Array<~lib/string/String>#__get (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -2730,7 +2730,7 @@ i32.const 1920 i32.const 96 i32.const 45 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2744,7 +2744,7 @@ i32.const 1920 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2958,7 +2958,7 @@ i32.store16 end local.get $2 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/number/utoa32 (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -2981,7 +2981,7 @@ local.get $1 call $~lib/util/number/utoa32_lut local.get $2 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/number/decimalCount64 (; 38 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) @@ -3174,7 +3174,7 @@ call $~lib/util/number/utoa64_lut end local.get $2 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/number/itoa64 (; 41 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) @@ -3239,7 +3239,7 @@ i32.store16 end local.get $3 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/number/genDigits (; 42 ;) (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) @@ -4215,7 +4215,7 @@ i32.const 264 i32.const 203 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -4297,19 +4297,19 @@ local.get $3 call $~lib/memory/memory.copy local.get $1 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/runtime/discard (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 6744 + i32.const 6928 i32.le_u if i32.const 0 i32.const 184 - i32.const 114 + i32.const 117 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4321,9 +4321,9 @@ if i32.const 0 i32.const 184 - i32.const 116 + i32.const 119 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4382,7 +4382,7 @@ i32.const 72 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -4398,7 +4398,7 @@ i32.const 72 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $__inlined_func$~lib/string/String#charCodeAt (result i32) @@ -4424,7 +4424,7 @@ i32.const 72 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 108 @@ -4436,7 +4436,7 @@ i32.const 72 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 124 @@ -4452,7 +4452,7 @@ i32.const 72 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 148 @@ -4468,10 +4468,10 @@ i32.const 72 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 6744 + i32.const 6928 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -4485,7 +4485,7 @@ i32.const 72 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 54 @@ -4498,7 +4498,7 @@ i32.const 72 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 65590 @@ -4511,7 +4511,7 @@ i32.const 72 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -4524,7 +4524,7 @@ i32.const 72 i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 54 @@ -4537,7 +4537,7 @@ i32.const 72 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 119558 @@ -4548,7 +4548,7 @@ i32.const 72 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -4559,7 +4559,7 @@ i32.const 72 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -4570,7 +4570,7 @@ i32.const 72 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -4584,7 +4584,7 @@ i32.const 72 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -4599,7 +4599,7 @@ i32.const 72 i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -4614,7 +4614,7 @@ i32.const 72 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -4629,7 +4629,7 @@ i32.const 72 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -4644,7 +4644,7 @@ i32.const 72 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -4659,7 +4659,7 @@ i32.const 72 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -4674,7 +4674,7 @@ i32.const 72 i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -4689,7 +4689,7 @@ i32.const 72 i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -4704,7 +4704,7 @@ i32.const 72 i32.const 45 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -4719,7 +4719,7 @@ i32.const 72 i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -4734,7 +4734,7 @@ i32.const 72 i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -4749,7 +4749,7 @@ i32.const 72 i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -4764,7 +4764,7 @@ i32.const 72 i32.const 50 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -4779,7 +4779,7 @@ i32.const 72 i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -4794,7 +4794,7 @@ i32.const 72 i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -4809,7 +4809,7 @@ i32.const 72 i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -4824,7 +4824,7 @@ i32.const 72 i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -4836,7 +4836,7 @@ i32.const 72 i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -4850,7 +4850,7 @@ i32.const 72 i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -4862,7 +4862,7 @@ i32.const 72 i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -4875,7 +4875,7 @@ i32.const 72 i32.const 59 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -4887,7 +4887,7 @@ i32.const 72 i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -4901,7 +4901,7 @@ i32.const 72 i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -4915,7 +4915,7 @@ i32.const 72 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -4929,7 +4929,7 @@ i32.const 72 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -4943,7 +4943,7 @@ i32.const 72 i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -4957,7 +4957,7 @@ i32.const 72 i32.const 65 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -4969,7 +4969,7 @@ i32.const 72 i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -4983,7 +4983,7 @@ i32.const 72 i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5002,7 +5002,7 @@ i32.const 72 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5016,7 +5016,7 @@ i32.const 72 i32.const 70 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5030,7 +5030,7 @@ i32.const 72 i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5044,7 +5044,7 @@ i32.const 72 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5058,7 +5058,7 @@ i32.const 72 i32.const 73 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5072,7 +5072,7 @@ i32.const 72 i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5086,7 +5086,7 @@ i32.const 72 i32.const 75 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5100,7 +5100,7 @@ i32.const 72 i32.const 76 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5112,7 +5112,7 @@ i32.const 72 i32.const 77 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 848 @@ -5124,7 +5124,7 @@ i32.const 72 i32.const 83 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 872 @@ -5136,7 +5136,7 @@ i32.const 72 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 896 @@ -5148,7 +5148,7 @@ i32.const 72 i32.const 85 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 928 @@ -5160,7 +5160,7 @@ i32.const 72 i32.const 86 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 960 @@ -5172,7 +5172,7 @@ i32.const 72 i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 992 @@ -5184,7 +5184,7 @@ i32.const 72 i32.const 88 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1024 @@ -5196,7 +5196,7 @@ i32.const 72 i32.const 89 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1048 @@ -5208,7 +5208,7 @@ i32.const 72 i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 848 @@ -5220,7 +5220,7 @@ i32.const 72 i32.const 92 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 872 @@ -5232,7 +5232,7 @@ i32.const 72 i32.const 93 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1072 @@ -5244,7 +5244,7 @@ i32.const 72 i32.const 94 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1096 @@ -5256,7 +5256,7 @@ i32.const 72 i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1120 @@ -5268,7 +5268,7 @@ i32.const 72 i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -5284,7 +5284,7 @@ i32.const 72 i32.const 99 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/c @@ -5296,7 +5296,7 @@ i32.const 72 i32.const 100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -5308,7 +5308,7 @@ i32.const 72 i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -5320,7 +5320,7 @@ i32.const 72 i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/nullStr @@ -5332,7 +5332,7 @@ i32.const 72 i32.const 103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -5344,7 +5344,7 @@ i32.const 72 i32.const 104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -5356,7 +5356,7 @@ i32.const 72 i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1200 @@ -5368,7 +5368,7 @@ i32.const 72 i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1200 @@ -5380,7 +5380,7 @@ i32.const 72 i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1248 @@ -5392,7 +5392,7 @@ i32.const 72 i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1296 @@ -5404,7 +5404,7 @@ i32.const 72 i32.const 109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1360 @@ -5416,7 +5416,7 @@ i32.const 72 i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1360 @@ -5428,7 +5428,7 @@ i32.const 72 i32.const 111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1424 @@ -5440,7 +5440,7 @@ i32.const 72 i32.const 112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1152 @@ -5452,7 +5452,7 @@ i32.const 72 i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1504 @@ -5464,7 +5464,7 @@ i32.const 72 i32.const 115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1504 @@ -5476,7 +5476,7 @@ i32.const 72 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1504 @@ -5488,7 +5488,7 @@ i32.const 72 i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1504 @@ -5499,7 +5499,7 @@ i32.const 72 i32.const 118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1152 @@ -5510,7 +5510,7 @@ i32.const 72 i32.const 120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/nullStr @@ -5521,7 +5521,7 @@ i32.const 72 i32.const 121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -5533,7 +5533,7 @@ i32.const 72 i32.const 123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -5545,7 +5545,7 @@ i32.const 72 i32.const 124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -5557,7 +5557,7 @@ i32.const 72 i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -5568,7 +5568,7 @@ i32.const 72 i32.const 126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -5579,7 +5579,7 @@ i32.const 72 i32.const 127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -5590,7 +5590,7 @@ i32.const 72 i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -5601,7 +5601,7 @@ i32.const 72 i32.const 129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -5612,7 +5612,7 @@ i32.const 72 i32.const 130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -5624,7 +5624,7 @@ i32.const 72 i32.const 131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -5635,7 +5635,7 @@ i32.const 72 i32.const 132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 65377 @@ -5656,7 +5656,7 @@ i32.const 72 i32.const 136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 532 @@ -5670,7 +5670,7 @@ i32.const 72 i32.const 138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -5684,7 +5684,7 @@ i32.const 72 i32.const 140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -5698,7 +5698,7 @@ i32.const 72 i32.const 141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -5712,7 +5712,7 @@ i32.const 72 i32.const 142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -5726,7 +5726,7 @@ i32.const 72 i32.const 143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -5740,7 +5740,7 @@ i32.const 72 i32.const 144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1176 @@ -5754,7 +5754,7 @@ i32.const 72 i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -5768,7 +5768,7 @@ i32.const 72 i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -5782,7 +5782,7 @@ i32.const 72 i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -5796,7 +5796,7 @@ i32.const 72 i32.const 148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1704 @@ -5813,7 +5813,7 @@ i32.const 72 i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5828,7 +5828,7 @@ i32.const 72 i32.const 153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5843,7 +5843,7 @@ i32.const 72 i32.const 154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5858,7 +5858,7 @@ i32.const 72 i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5873,7 +5873,7 @@ i32.const 72 i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5888,7 +5888,7 @@ i32.const 72 i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5903,7 +5903,7 @@ i32.const 72 i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -5931,7 +5931,7 @@ i32.const 72 i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -5946,7 +5946,7 @@ i32.const 72 i32.const 165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -5974,7 +5974,7 @@ i32.const 72 i32.const 167 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1968 @@ -6002,7 +6002,7 @@ i32.const 72 i32.const 169 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1968 @@ -6052,7 +6052,7 @@ i32.const 72 i32.const 171 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2048 @@ -6102,7 +6102,7 @@ i32.const 72 i32.const 173 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2104 @@ -6163,7 +6163,7 @@ i32.const 72 i32.const 175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2136 @@ -6224,7 +6224,7 @@ i32.const 72 i32.const 177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2168 @@ -6285,7 +6285,7 @@ i32.const 72 i32.const 179 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -6335,7 +6335,7 @@ i32.const 72 i32.const 181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -6350,7 +6350,7 @@ i32.const 72 i32.const 183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -6378,7 +6378,7 @@ i32.const 72 i32.const 185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1968 @@ -6406,7 +6406,7 @@ i32.const 72 i32.const 187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -6456,7 +6456,7 @@ i32.const 72 i32.const 189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -6506,7 +6506,7 @@ i32.const 72 i32.const 191 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1968 @@ -6556,7 +6556,7 @@ i32.const 72 i32.const 193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -6569,7 +6569,7 @@ i32.const 72 i32.const 195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -6582,7 +6582,7 @@ i32.const 72 i32.const 196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -6595,7 +6595,7 @@ i32.const 72 i32.const 197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 123 @@ -6608,7 +6608,7 @@ i32.const 72 i32.const 198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1000 @@ -6621,7 +6621,7 @@ i32.const 72 i32.const 199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1234 @@ -6634,7 +6634,7 @@ i32.const 72 i32.const 200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 12345 @@ -6647,7 +6647,7 @@ i32.const 72 i32.const 201 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 123456 @@ -6660,7 +6660,7 @@ i32.const 72 i32.const 202 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1111111 @@ -6673,7 +6673,7 @@ i32.const 72 i32.const 203 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1234567 @@ -6686,7 +6686,7 @@ i32.const 72 i32.const 204 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2147483646 @@ -6699,7 +6699,7 @@ i32.const 72 i32.const 205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2147483647 @@ -6712,7 +6712,7 @@ i32.const 72 i32.const 206 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -2147483648 @@ -6725,7 +6725,7 @@ i32.const 72 i32.const 207 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 @@ -6738,7 +6738,7 @@ i32.const 72 i32.const 208 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -6751,7 +6751,7 @@ i32.const 72 i32.const 210 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1000 @@ -6764,7 +6764,7 @@ i32.const 72 i32.const 211 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2147483647 @@ -6777,7 +6777,7 @@ i32.const 72 i32.const 212 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -2147483648 @@ -6790,7 +6790,7 @@ i32.const 72 i32.const 213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 @@ -6803,7 +6803,7 @@ i32.const 72 i32.const 214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -6816,7 +6816,7 @@ i32.const 72 i32.const 216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1234 @@ -6829,7 +6829,7 @@ i32.const 72 i32.const 217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 99999999 @@ -6842,7 +6842,7 @@ i32.const 72 i32.const 218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 100000000 @@ -6855,7 +6855,7 @@ i32.const 72 i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4294967295 @@ -6868,7 +6868,7 @@ i32.const 72 i32.const 220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 68719476735 @@ -6881,7 +6881,7 @@ i32.const 72 i32.const 221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 868719476735 @@ -6894,7 +6894,7 @@ i32.const 72 i32.const 222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 999868719476735 @@ -6907,7 +6907,7 @@ i32.const 72 i32.const 223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 9999868719476735 @@ -6920,7 +6920,7 @@ i32.const 72 i32.const 224 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 19999868719476735 @@ -6933,7 +6933,7 @@ i32.const 72 i32.const 225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -6946,7 +6946,7 @@ i32.const 72 i32.const 226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -6959,7 +6959,7 @@ i32.const 72 i32.const 228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1234 @@ -6972,7 +6972,7 @@ i32.const 72 i32.const 229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4294967295 @@ -6985,7 +6985,7 @@ i32.const 72 i32.const 230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -4294967295 @@ -6998,7 +6998,7 @@ i32.const 72 i32.const 231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 68719476735 @@ -7011,7 +7011,7 @@ i32.const 72 i32.const 232 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -68719476735 @@ -7024,7 +7024,7 @@ i32.const 72 i32.const 233 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -868719476735 @@ -7037,7 +7037,7 @@ i32.const 72 i32.const 234 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -999868719476735 @@ -7050,7 +7050,7 @@ i32.const 72 i32.const 235 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -19999868719476735 @@ -7063,7 +7063,7 @@ i32.const 72 i32.const 236 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 9223372036854775807 @@ -7076,7 +7076,7 @@ i32.const 72 i32.const 237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -9223372036854775808 @@ -7089,7 +7089,7 @@ i32.const 72 i32.const 238 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -7102,7 +7102,7 @@ i32.const 72 i32.const 241 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -7115,7 +7115,7 @@ i32.const 72 i32.const 242 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -7128,7 +7128,7 @@ i32.const 72 i32.const 243 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -7141,7 +7141,7 @@ i32.const 72 i32.const 244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -7154,7 +7154,7 @@ i32.const 72 i32.const 245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.220446049250313e-16 @@ -7167,7 +7167,7 @@ i32.const 72 i32.const 246 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2.220446049250313e-16 @@ -7180,7 +7180,7 @@ i32.const 72 i32.const 247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -7193,7 +7193,7 @@ i32.const 72 i32.const 248 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1797693134862315708145274e284 @@ -7206,7 +7206,7 @@ i32.const 72 i32.const 249 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4185580496821356722454785e274 @@ -7219,7 +7219,7 @@ i32.const 72 i32.const 250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072014e-308 @@ -7232,7 +7232,7 @@ i32.const 72 i32.const 251 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.940656e-318 @@ -7245,7 +7245,7 @@ i32.const 72 i32.const 254 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9060801153433600 @@ -7258,7 +7258,7 @@ i32.const 72 i32.const 255 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4708356024711512064 @@ -7271,7 +7271,7 @@ i32.const 72 i32.const 256 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9409340012568248320 @@ -7284,7 +7284,7 @@ i32.const 72 i32.const 257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -7297,7 +7297,7 @@ i32.const 72 i32.const 258 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -7310,7 +7310,7 @@ i32.const 72 i32.const 264 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.1 @@ -7323,7 +7323,7 @@ i32.const 72 i32.const 265 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -7336,7 +7336,7 @@ i32.const 72 i32.const 266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.1 @@ -7349,7 +7349,7 @@ i32.const 72 i32.const 267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e6 @@ -7362,7 +7362,7 @@ i32.const 72 i32.const 269 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-06 @@ -7375,7 +7375,7 @@ i32.const 72 i32.const 270 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1e6 @@ -7388,7 +7388,7 @@ i32.const 72 i32.const 271 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1e-06 @@ -7401,7 +7401,7 @@ i32.const 72 i32.const 272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e7 @@ -7414,7 +7414,7 @@ i32.const 72 i32.const 273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-07 @@ -7427,7 +7427,7 @@ i32.const 72 i32.const 274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.e+308 @@ -7440,7 +7440,7 @@ i32.const 72 i32.const 276 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.e+308 @@ -7453,7 +7453,7 @@ i32.const 72 i32.const 277 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -7466,7 +7466,7 @@ i32.const 72 i32.const 278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -7479,7 +7479,7 @@ i32.const 72 i32.const 279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-308 @@ -7492,7 +7492,7 @@ i32.const 72 i32.const 280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1e-308 @@ -7505,7 +7505,7 @@ i32.const 72 i32.const 281 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-323 @@ -7518,7 +7518,7 @@ i32.const 72 i32.const 282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1e-323 @@ -7531,7 +7531,7 @@ i32.const 72 i32.const 283 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -7544,7 +7544,7 @@ i32.const 72 i32.const 284 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967272 @@ -7557,7 +7557,7 @@ i32.const 72 i32.const 286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.2312145673456234e-08 @@ -7570,7 +7570,7 @@ i32.const 72 i32.const 287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 555555555.5555556 @@ -7583,7 +7583,7 @@ i32.const 72 i32.const 289 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999999999999999 @@ -7596,7 +7596,7 @@ i32.const 72 i32.const 290 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -7609,7 +7609,7 @@ i32.const 72 i32.const 291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 12.34 @@ -7622,7 +7622,7 @@ i32.const 72 i32.const 292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.3333333333333333 @@ -7635,7 +7635,7 @@ i32.const 72 i32.const 294 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1234e17 @@ -7648,7 +7648,7 @@ i32.const 72 i32.const 295 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1234e18 @@ -7661,7 +7661,7 @@ i32.const 72 i32.const 296 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.71828 @@ -7674,7 +7674,7 @@ i32.const 72 i32.const 297 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.0271828 @@ -7687,7 +7687,7 @@ i32.const 72 i32.const 298 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 271.828 @@ -7700,7 +7700,7 @@ i32.const 72 i32.const 299 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1e+128 @@ -7713,7 +7713,7 @@ i32.const 72 i32.const 300 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1e-64 @@ -7726,7 +7726,7 @@ i32.const 72 i32.const 301 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.000035689 @@ -7739,17 +7739,194 @@ i32.const 72 i32.const 302 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) (func $std/string/getString (; 49 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 50 ;) (type $FUNCSIG$v) - call $start:std/string + (func $~lib/runtime/runtime.instanceof (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 6744 + i32.load + i32.le_u + else + local.get $0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 6744 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 ) - (func $null (; 51 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.flags (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + local.tee $1 + i32.eqz + if + local.get $0 + i32.const 6744 + i32.load + i32.gt_u + local.set $1 + end + local.get $1 + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 6744 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.tee $2 + i32.eqz + local.tee $0 + if (result i32) + local.get $0 + else + local.get $2 + i32.const 6744 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $2 + i32.const 3 + i32.shl + i32.const 6744 + i32.add + i32.load + end + local.tee $0 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $3 + local.get $2 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $2 + i32.load + drop + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $3 + i32.store offset=8 + local.get $2 + local.get $3 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $0 + i32.const 512 + i32.and + if + local.get $1 + local.get $3 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load + drop + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $2 + ) + (func $~lib/runtime/runtime.retain (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) + (func $~lib/runtime/runtime.collect (; 57 ;) (type $FUNCSIG$v) + nop + ) + (func $start (; 58 ;) (type $FUNCSIG$v) + call $start:std/string + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 22 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT + ) ) diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index f4758114ae..24baf97d25 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -18,163 +18,164 @@ (type $FUNCSIG$iijijiji (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00 \00\00\00\00\00\00\00\00\00\00\00h\00i\00,\00 \00I\00\'\00m\00 \00a\00 \00s\00t\00r\00i\00n\00g\00") - (data (i32.const 56) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 104) "\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 120) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 144) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00a\00") - (data (i32.const 168) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 224) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\006\00") - (data (i32.const 248) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 296) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\004\d8\06\df") - (data (i32.const 320) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00h\00i\00") - (data (i32.const 344) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00n\00u\00l\00l\00") - (data (i32.const 368) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00s\00t\00r\00i\00n\00g\00") - (data (i32.const 400) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00I\00\'\00m\00") - (data (i32.const 424) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00 \00") - (data (i32.const 448) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00") - (data (i32.const 472) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00") - (data (i32.const 496) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00 \00 \00a\00b\00c\00") - (data (i32.const 528) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\001\002\003\00") - (data (i32.const 552) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\001\002\003\00a\00b\00c\00") - (data (i32.const 584) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\001\002\003\001\002\00a\00b\00c\00") - (data (i32.const 616) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00 \00 \00") - (data (i32.const 648) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00a\00b\00c\00") - (data (i32.const 680) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00a\00b\00c\00a\00b\00") - (data (i32.const 712) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00,\00") - (data (i32.const 736) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00x\00") - (data (i32.const 760) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00,\00 \00I\00") - (data (i32.const 784) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00g\00") - (data (i32.const 808) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00i\00") - (data (i32.const 832) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\000\00") - (data (i32.const 856) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\001\00") - (data (i32.const 880) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\000\00b\001\000\001\00") - (data (i32.const 912) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\000\00o\007\000\007\00") - (data (i32.const 944) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\000\00x\00f\000\00f\00") - (data (i32.const 976) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\000\00x\00F\000\00F\00") - (data (i32.const 1008) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\000\001\001\00") - (data (i32.const 1032) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\000\00x\001\00g\00") - (data (i32.const 1056) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\000\00.\001\00") - (data (i32.const 1080) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00.\002\005\00") - (data (i32.const 1104) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00.\001\00f\00o\00o\00b\00a\00r\00") - (data (i32.const 1136) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00b\00") - (data (i32.const 1160) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00a\00b\00") - (data (i32.const 1184) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00k\00e\00y\001\00") - (data (i32.const 1208) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00k\00e\00y\002\00") - (data (i32.const 1232) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00k\00e\001\00") - (data (i32.const 1256) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00k\00e\002\00") - (data (i32.const 1280) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00k\00e\00y\001\002\00") - (data (i32.const 1312) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00k\00e\00y\001\001\00") - (data (i32.const 1344) "\01\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00\a40\ed0\cf0\cb0\db0\d80\c80") - (data (i32.const 1376) "\01\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00\a60\f00\ce0\aa0\af0\e40\de0") - (data (i32.const 1408) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00D\00\19 f\00h\00u\00a\00s\00c\00a\00i\00l\00") - (data (i32.const 1448) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00D\00\19 \1f\1eu\00a\00s\00c\00a\00i\00l\00") - (data (i32.const 1488) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00b\00a\00") - (data (i32.const 1512) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00a\00a\00") - (data (i32.const 1536) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00a\00a\00a\00") - (data (i32.const 1560) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00a\00b\00a\00b\00a\00b\00a\00b\00") - (data (i32.const 1592) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00a\00a\00a\00a\00a\00") - (data (i32.const 1624) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00a\00a\00a\00a\00a\00a\00") - (data (i32.const 1656) "\01\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00a\00a\00a\00a\00a\00a\00a\00") - (data (i32.const 1688) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00") - (data (i32.const 1736) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00n\00") - (data (i32.const 1760) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00j\00k\00l\00m\00n\00") - (data (i32.const 1792) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00c\00d\00e\00f\00g\00") - (data (i32.const 1824) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00d\00e\00f\00g\00h\00") - (data (i32.const 1856) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00") - (data (i32.const 1904) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 1952) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00a\00,\00b\00,\00c\00") - (data (i32.const 1984) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00.\00") - (data (i32.const 2008) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00c\00") - (data (i32.const 2032) "\01\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00a\00,\00 \00b\00,\00 \00c\00") - (data (i32.const 2064) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00,\00 \00") - (data (i32.const 2088) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00a\00,\00b\00,\00,\00c\00") - (data (i32.const 2120) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00,\00a\00,\00b\00,\00c\00") - (data (i32.const 2152) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00a\00,\00b\00,\00c\00,\00") - (data (i32.const 2184) "\03\00\00\00\90\01\00\00\00\00\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") - (data (i32.const 2600) "\04\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\98\08\00\00\98\08\00\00\90\01\00\00d\00\00\00") - (data (i32.const 2632) "\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\008\00") - (data (i32.const 2656) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00-\001\000\000\000\00") - (data (i32.const 2688) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\001\002\003\004\00") - (data (i32.const 2712) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\001\002\003\004\005\00") - (data (i32.const 2744) "\01\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\001\002\003\004\005\006\00") - (data (i32.const 2776) "\01\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\001\001\001\001\001\001\001\00") - (data (i32.const 2808) "\01\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\001\002\003\004\005\006\007\00") - (data (i32.const 2840) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\002\001\004\007\004\008\003\006\004\006\00") - (data (i32.const 2880) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\002\001\004\007\004\008\003\006\004\007\00") - (data (i32.const 2920) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00-\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 2960) "\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00-\001\00") - (data (i32.const 2984) "\01\00\00\00\08\00\00\00\00\00\00\00\00\00\00\001\000\000\000\00") - (data (i32.const 3008) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 3048) "\01\00\00\00\14\00\00\00\00\00\00\00\00\00\00\004\002\009\004\009\006\007\002\009\005\00") - (data (i32.const 3088) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\009\009\009\009\009\009\009\009\00") - (data (i32.const 3120) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\001\000\000\000\000\000\000\000\000\00") - (data (i32.const 3160) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3200) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3240) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3288) "\01\00\00\00 \00\00\00\00\00\00\00\00\00\00\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3336) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3392) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\001\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005\00") - (data (i32.const 3448) "\01\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00-\001\002\003\004\00") - (data (i32.const 3480) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00-\004\002\009\004\009\006\007\002\009\005\00") - (data (i32.const 3520) "\01\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00-\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3560) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00-\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3608) "\01\00\00\00 \00\00\00\00\00\00\00\00\00\00\00-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3656) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 3712) "\01\00\00\00&\00\00\00\00\00\00\00\00\00\00\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007\00") - (data (i32.const 3768) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008\00") - (data (i32.const 3824) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\000\00.\000\00") - (data (i32.const 3848) "\01\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00N\00a\00N\00") - (data (i32.const 3872) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 3912) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 3944) "\03\00\00\00\b8\02\00\00\00\00\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8|inlined.0 (result i32) + i32.const 0 + local.set $3 + local.get $3 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + end return end local.get $1 @@ -2856,9 +2871,9 @@ block (result i32) i32.const 1 i32.const 2 - i32.const 2 + i32.const 17 i32.const 0 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray local.set $3 local.get $3 i32.load offset=4 @@ -2896,11 +2911,15 @@ local.get $6 i32.eqz if - i32.const 0 - i32.const 2 - i32.const 1 - i32.const 0 - call $~lib/runtime/runtime.newArray + block $~lib/util/runtime/NEWARRAY<~lib/string/String>|inlined.1 (result i32) + i32.const 0 + local.set $4 + local.get $4 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + end return end local.get $6 @@ -2912,11 +2931,15 @@ i32.lt_s select local.set $6 - local.get $6 - i32.const 2 - i32.const 2 - i32.const 0 - call $~lib/runtime/runtime.newArray + block $~lib/util/runtime/NEWARRAY<~lib/string/String>|inlined.2 (result i32) + local.get $6 + local.set $4 + local.get $4 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + end local.set $4 local.get $4 i32.load offset=4 @@ -2950,7 +2973,7 @@ local.get $8 i32.store local.get $8 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register drop local.get $8 @@ -2972,11 +2995,15 @@ local.get $6 i32.eqz if - i32.const 1 - i32.const 2 - i32.const 2 - i32.const 0 - call $~lib/runtime/runtime.newArray + block $~lib/util/runtime/NEWARRAY<~lib/string/String>|inlined.3 (result i32) + i32.const 1 + local.set $3 + local.get $3 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + end local.set $3 local.get $3 i32.load offset=4 @@ -2986,11 +3013,15 @@ return end end - i32.const 0 - i32.const 2 - i32.const 2 - i32.const 0 - call $~lib/runtime/runtime.newArray + block $~lib/util/runtime/NEWARRAY<~lib/string/String>|inlined.4 (result i32) + i32.const 0 + local.set $3 + local.get $3 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + end local.set $9 i32.const 0 local.set $10 @@ -3040,7 +3071,7 @@ call $~lib/memory/memory.copy local.get $9 local.get $4 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register call $~lib/array/Array<~lib/string/String>#push drop @@ -3072,11 +3103,15 @@ local.get $11 i32.eqz if - i32.const 1 - i32.const 2 - i32.const 2 - i32.const 0 - call $~lib/runtime/runtime.newArray + block $~lib/util/runtime/NEWARRAY<~lib/string/String>|inlined.5 (result i32) + i32.const 1 + local.set $3 + local.get $3 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + end local.set $3 local.get $3 i32.const 0 @@ -3110,7 +3145,7 @@ call $~lib/memory/memory.copy local.get $9 local.get $3 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register call $~lib/array/Array<~lib/string/String>#push drop @@ -3145,7 +3180,7 @@ i32.const 1920 i32.const 96 i32.const 45 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3159,7 +3194,7 @@ i32.const 1920 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3431,7 +3466,7 @@ i32.store16 end local.get $3 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/number/utoa32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -3467,7 +3502,7 @@ call $~lib/util/number/utoa32_lut end local.get $2 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/number/decimalCount64 (; 52 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) @@ -3732,7 +3767,7 @@ end end local.get $1 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/number/itoa64 (; 55 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) @@ -3822,7 +3857,7 @@ i32.store16 end local.get $2 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/builtins/isFinite (; 56 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) @@ -5215,7 +5250,7 @@ i32.const 264 i32.const 203 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5312,7 +5347,7 @@ local.get $3 call $~lib/memory/memory.copy local.get $10 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/util/runtime/discard (; 64 ;) (type $FUNCSIG$vi) (param $0 i32) @@ -5324,9 +5359,9 @@ if i32.const 0 i32.const 184 - i32.const 114 + i32.const 117 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5341,9 +5376,9 @@ if i32.const 0 i32.const 184 - i32.const 116 + i32.const 119 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5409,7 +5444,7 @@ i32.const 72 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5422,7 +5457,7 @@ i32.const 72 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5436,7 +5471,7 @@ i32.const 72 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -5450,7 +5485,7 @@ i32.const 72 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 136 @@ -5464,7 +5499,7 @@ i32.const 72 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -5478,7 +5513,7 @@ i32.const 72 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/memory/HEAP_BASE @@ -5501,7 +5536,7 @@ i32.const 72 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 54 @@ -5514,7 +5549,7 @@ i32.const 72 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 65536 @@ -5529,7 +5564,7 @@ i32.const 72 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -5542,7 +5577,7 @@ i32.const 72 i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 54 @@ -5555,7 +5590,7 @@ i32.const 72 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 119558 @@ -5566,7 +5601,7 @@ i32.const 72 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5579,7 +5614,7 @@ i32.const 72 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5592,7 +5627,7 @@ i32.const 72 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/string/String#includes|inlined.0 (result i32) @@ -5617,7 +5652,7 @@ i32.const 72 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5632,7 +5667,7 @@ i32.const 72 i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5647,7 +5682,7 @@ i32.const 72 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -5662,7 +5697,7 @@ i32.const 72 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -5677,7 +5712,7 @@ i32.const 72 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -5692,7 +5727,7 @@ i32.const 72 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -5707,7 +5742,7 @@ i32.const 72 i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -5722,7 +5757,7 @@ i32.const 72 i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -5737,7 +5772,7 @@ i32.const 72 i32.const 45 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5752,7 +5787,7 @@ i32.const 72 i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5767,7 +5802,7 @@ i32.const 72 i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -5782,7 +5817,7 @@ i32.const 72 i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -5797,7 +5832,7 @@ i32.const 72 i32.const 50 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -5812,7 +5847,7 @@ i32.const 72 i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -5827,7 +5862,7 @@ i32.const 72 i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -5842,7 +5877,7 @@ i32.const 72 i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -5857,7 +5892,7 @@ i32.const 72 i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -5872,7 +5907,7 @@ i32.const 72 i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -5887,7 +5922,7 @@ i32.const 72 i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -5902,7 +5937,7 @@ i32.const 72 i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5917,7 +5952,7 @@ i32.const 72 i32.const 59 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5932,7 +5967,7 @@ i32.const 72 i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5947,7 +5982,7 @@ i32.const 72 i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5962,7 +5997,7 @@ i32.const 72 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5977,7 +6012,7 @@ i32.const 72 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5992,7 +6027,7 @@ i32.const 72 i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -6007,7 +6042,7 @@ i32.const 72 i32.const 65 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -6022,7 +6057,7 @@ i32.const 72 i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -6037,7 +6072,7 @@ i32.const 72 i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -6053,7 +6088,7 @@ i32.const 72 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -6068,7 +6103,7 @@ i32.const 72 i32.const 70 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -6083,7 +6118,7 @@ i32.const 72 i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -6098,7 +6133,7 @@ i32.const 72 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -6113,7 +6148,7 @@ i32.const 72 i32.const 73 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -6128,7 +6163,7 @@ i32.const 72 i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -6143,7 +6178,7 @@ i32.const 72 i32.const 75 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -6158,7 +6193,7 @@ i32.const 72 i32.const 76 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -6173,7 +6208,7 @@ i32.const 72 i32.const 77 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 848 @@ -6187,7 +6222,7 @@ i32.const 72 i32.const 83 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 872 @@ -6201,7 +6236,7 @@ i32.const 72 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 896 @@ -6215,7 +6250,7 @@ i32.const 72 i32.const 85 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 928 @@ -6229,7 +6264,7 @@ i32.const 72 i32.const 86 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 960 @@ -6243,7 +6278,7 @@ i32.const 72 i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 992 @@ -6257,7 +6292,7 @@ i32.const 72 i32.const 88 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1024 @@ -6271,7 +6306,7 @@ i32.const 72 i32.const 89 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1048 @@ -6285,7 +6320,7 @@ i32.const 72 i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 848 @@ -6298,7 +6333,7 @@ i32.const 72 i32.const 92 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 872 @@ -6311,7 +6346,7 @@ i32.const 72 i32.const 93 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1072 @@ -6324,7 +6359,7 @@ i32.const 72 i32.const 94 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1096 @@ -6337,7 +6372,7 @@ i32.const 72 i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1120 @@ -6350,7 +6385,7 @@ i32.const 72 i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -6366,7 +6401,7 @@ i32.const 72 i32.const 99 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/c @@ -6378,7 +6413,7 @@ i32.const 72 i32.const 100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -6390,7 +6425,7 @@ i32.const 72 i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -6402,7 +6437,7 @@ i32.const 72 i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/nullStr @@ -6414,7 +6449,7 @@ i32.const 72 i32.const 103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -6426,7 +6461,7 @@ i32.const 72 i32.const 104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -6438,7 +6473,7 @@ i32.const 72 i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1200 @@ -6450,7 +6485,7 @@ i32.const 72 i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1200 @@ -6462,7 +6497,7 @@ i32.const 72 i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1248 @@ -6474,7 +6509,7 @@ i32.const 72 i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1296 @@ -6486,7 +6521,7 @@ i32.const 72 i32.const 109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1360 @@ -6498,7 +6533,7 @@ i32.const 72 i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1360 @@ -6510,7 +6545,7 @@ i32.const 72 i32.const 111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1424 @@ -6522,7 +6557,7 @@ i32.const 72 i32.const 112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1152 @@ -6534,7 +6569,7 @@ i32.const 72 i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1504 @@ -6546,7 +6581,7 @@ i32.const 72 i32.const 115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1504 @@ -6558,7 +6593,7 @@ i32.const 72 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1504 @@ -6570,7 +6605,7 @@ i32.const 72 i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1504 @@ -6583,7 +6618,7 @@ i32.const 72 i32.const 118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1152 @@ -6596,7 +6631,7 @@ i32.const 72 i32.const 120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/nullStr @@ -6609,7 +6644,7 @@ i32.const 72 i32.const 121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -6621,7 +6656,7 @@ i32.const 72 i32.const 123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -6633,7 +6668,7 @@ i32.const 72 i32.const 124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -6645,7 +6680,7 @@ i32.const 72 i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -6657,7 +6692,7 @@ i32.const 72 i32.const 126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -6670,7 +6705,7 @@ i32.const 72 i32.const 127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -6683,7 +6718,7 @@ i32.const 72 i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -6696,7 +6731,7 @@ i32.const 72 i32.const 129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -6709,7 +6744,7 @@ i32.const 72 i32.const 130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -6721,7 +6756,7 @@ i32.const 72 i32.const 131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -6733,7 +6768,7 @@ i32.const 72 i32.const 132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 65377 @@ -6754,7 +6789,7 @@ i32.const 72 i32.const 136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 544 @@ -6767,7 +6802,7 @@ i32.const 72 i32.const 138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -6781,7 +6816,7 @@ i32.const 72 i32.const 140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -6795,7 +6830,7 @@ i32.const 72 i32.const 141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -6809,7 +6844,7 @@ i32.const 72 i32.const 142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -6823,7 +6858,7 @@ i32.const 72 i32.const 143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -6837,7 +6872,7 @@ i32.const 72 i32.const 144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1176 @@ -6851,7 +6886,7 @@ i32.const 72 i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -6865,7 +6900,7 @@ i32.const 72 i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -6879,7 +6914,7 @@ i32.const 72 i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 160 @@ -6893,7 +6928,7 @@ i32.const 72 i32.const 148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1704 @@ -6910,7 +6945,7 @@ i32.const 72 i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -6925,7 +6960,7 @@ i32.const 72 i32.const 153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -6940,7 +6975,7 @@ i32.const 72 i32.const 154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -6955,7 +6990,7 @@ i32.const 72 i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -6970,7 +7005,7 @@ i32.const 72 i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -6985,7 +7020,7 @@ i32.const 72 i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -7000,7 +7035,7 @@ i32.const 72 i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -7028,7 +7063,7 @@ i32.const 72 i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -7046,7 +7081,7 @@ i32.const 72 i32.const 165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 120 @@ -7074,7 +7109,7 @@ i32.const 72 i32.const 167 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1968 @@ -7102,7 +7137,7 @@ i32.const 72 i32.const 169 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1968 @@ -7150,7 +7185,7 @@ i32.const 72 i32.const 171 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2048 @@ -7198,7 +7233,7 @@ i32.const 72 i32.const 173 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2104 @@ -7256,7 +7291,7 @@ i32.const 72 i32.const 175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2136 @@ -7314,7 +7349,7 @@ i32.const 72 i32.const 177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2168 @@ -7372,7 +7407,7 @@ i32.const 72 i32.const 179 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -7420,7 +7455,7 @@ i32.const 72 i32.const 181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -7438,7 +7473,7 @@ i32.const 72 i32.const 183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -7466,7 +7501,7 @@ i32.const 72 i32.const 185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1968 @@ -7494,7 +7529,7 @@ i32.const 72 i32.const 187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -7542,7 +7577,7 @@ i32.const 72 i32.const 189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 488 @@ -7590,7 +7625,7 @@ i32.const 72 i32.const 191 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1968 @@ -7638,7 +7673,7 @@ i32.const 72 i32.const 193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -7651,7 +7686,7 @@ i32.const 72 i32.const 195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -7664,7 +7699,7 @@ i32.const 72 i32.const 196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -7677,7 +7712,7 @@ i32.const 72 i32.const 197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 123 @@ -7690,7 +7725,7 @@ i32.const 72 i32.const 198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1000 @@ -7703,7 +7738,7 @@ i32.const 72 i32.const 199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1234 @@ -7716,7 +7751,7 @@ i32.const 72 i32.const 200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 12345 @@ -7729,7 +7764,7 @@ i32.const 72 i32.const 201 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 123456 @@ -7742,7 +7777,7 @@ i32.const 72 i32.const 202 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1111111 @@ -7755,7 +7790,7 @@ i32.const 72 i32.const 203 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1234567 @@ -7768,7 +7803,7 @@ i32.const 72 i32.const 204 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2147483646 @@ -7781,7 +7816,7 @@ i32.const 72 i32.const 205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2147483647 @@ -7794,7 +7829,7 @@ i32.const 72 i32.const 206 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -2147483648 @@ -7807,7 +7842,7 @@ i32.const 72 i32.const 207 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 @@ -7820,7 +7855,7 @@ i32.const 72 i32.const 208 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -7833,7 +7868,7 @@ i32.const 72 i32.const 210 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1000 @@ -7846,7 +7881,7 @@ i32.const 72 i32.const 211 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2147483647 @@ -7859,7 +7894,7 @@ i32.const 72 i32.const 212 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -2147483648 @@ -7872,7 +7907,7 @@ i32.const 72 i32.const 213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u32.MAX_VALUE @@ -7885,7 +7920,7 @@ i32.const 72 i32.const 214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -7898,7 +7933,7 @@ i32.const 72 i32.const 216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1234 @@ -7911,7 +7946,7 @@ i32.const 72 i32.const 217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 99999999 @@ -7924,7 +7959,7 @@ i32.const 72 i32.const 218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 100000000 @@ -7937,7 +7972,7 @@ i32.const 72 i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4294967295 @@ -7950,7 +7985,7 @@ i32.const 72 i32.const 220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 68719476735 @@ -7963,7 +7998,7 @@ i32.const 72 i32.const 221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 868719476735 @@ -7976,7 +8011,7 @@ i32.const 72 i32.const 222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 999868719476735 @@ -7989,7 +8024,7 @@ i32.const 72 i32.const 223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 9999868719476735 @@ -8002,7 +8037,7 @@ i32.const 72 i32.const 224 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 19999868719476735 @@ -8015,7 +8050,7 @@ i32.const 72 i32.const 225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u64.MAX_VALUE @@ -8028,7 +8063,7 @@ i32.const 72 i32.const 226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -8041,7 +8076,7 @@ i32.const 72 i32.const 228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1234 @@ -8054,7 +8089,7 @@ i32.const 72 i32.const 229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4294967295 @@ -8067,7 +8102,7 @@ i32.const 72 i32.const 230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -4294967295 @@ -8080,7 +8115,7 @@ i32.const 72 i32.const 231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 68719476735 @@ -8093,7 +8128,7 @@ i32.const 72 i32.const 232 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -68719476735 @@ -8106,7 +8141,7 @@ i32.const 72 i32.const 233 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -868719476735 @@ -8119,7 +8154,7 @@ i32.const 72 i32.const 234 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -999868719476735 @@ -8132,7 +8167,7 @@ i32.const 72 i32.const 235 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -19999868719476735 @@ -8145,7 +8180,7 @@ i32.const 72 i32.const 236 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i64.MAX_VALUE @@ -8158,7 +8193,7 @@ i32.const 72 i32.const 237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i64.MIN_VALUE @@ -8171,7 +8206,7 @@ i32.const 72 i32.const 238 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -8184,7 +8219,7 @@ i32.const 72 i32.const 241 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -8197,7 +8232,7 @@ i32.const 72 i32.const 242 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -8210,7 +8245,7 @@ i32.const 72 i32.const 243 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -8223,7 +8258,7 @@ i32.const 72 i32.const 244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -8237,7 +8272,7 @@ i32.const 72 i32.const 245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.EPSILON @@ -8250,7 +8285,7 @@ i32.const 72 i32.const 246 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.EPSILON @@ -8264,7 +8299,7 @@ i32.const 72 i32.const 247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_VALUE @@ -8277,7 +8312,7 @@ i32.const 72 i32.const 248 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_VALUE @@ -8291,7 +8326,7 @@ i32.const 72 i32.const 249 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4185580496821356722454785e274 @@ -8304,7 +8339,7 @@ i32.const 72 i32.const 250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072014e-308 @@ -8317,7 +8352,7 @@ i32.const 72 i32.const 251 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.940656e-318 @@ -8330,7 +8365,7 @@ i32.const 72 i32.const 254 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9060801153433600 @@ -8343,7 +8378,7 @@ i32.const 72 i32.const 255 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4708356024711512064 @@ -8356,7 +8391,7 @@ i32.const 72 i32.const 256 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9409340012568248320 @@ -8369,7 +8404,7 @@ i32.const 72 i32.const 257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -8382,7 +8417,7 @@ i32.const 72 i32.const 258 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -8395,7 +8430,7 @@ i32.const 72 i32.const 264 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.1 @@ -8408,7 +8443,7 @@ i32.const 72 i32.const 265 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -8421,7 +8456,7 @@ i32.const 72 i32.const 266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.1 @@ -8434,7 +8469,7 @@ i32.const 72 i32.const 267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e6 @@ -8447,7 +8482,7 @@ i32.const 72 i32.const 269 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-06 @@ -8460,7 +8495,7 @@ i32.const 72 i32.const 270 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1e6 @@ -8473,7 +8508,7 @@ i32.const 72 i32.const 271 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1e-06 @@ -8486,7 +8521,7 @@ i32.const 72 i32.const 272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e7 @@ -8499,7 +8534,7 @@ i32.const 72 i32.const 273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-07 @@ -8512,7 +8547,7 @@ i32.const 72 i32.const 274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.e+308 @@ -8525,7 +8560,7 @@ i32.const 72 i32.const 276 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.e+308 @@ -8538,7 +8573,7 @@ i32.const 72 i32.const 277 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -8551,7 +8586,7 @@ i32.const 72 i32.const 278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -8564,7 +8599,7 @@ i32.const 72 i32.const 279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-308 @@ -8577,7 +8612,7 @@ i32.const 72 i32.const 280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1e-308 @@ -8590,7 +8625,7 @@ i32.const 72 i32.const 281 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-323 @@ -8603,7 +8638,7 @@ i32.const 72 i32.const 282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1e-323 @@ -8616,7 +8651,7 @@ i32.const 72 i32.const 283 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -8629,7 +8664,7 @@ i32.const 72 i32.const 284 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967272 @@ -8642,7 +8677,7 @@ i32.const 72 i32.const 286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.2312145673456234e-08 @@ -8655,7 +8690,7 @@ i32.const 72 i32.const 287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 555555555.5555556 @@ -8668,7 +8703,7 @@ i32.const 72 i32.const 289 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999999999999999 @@ -8681,7 +8716,7 @@ i32.const 72 i32.const 290 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -8694,7 +8729,7 @@ i32.const 72 i32.const 291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 12.34 @@ -8707,7 +8742,7 @@ i32.const 72 i32.const 292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -8722,7 +8757,7 @@ i32.const 72 i32.const 294 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1234e17 @@ -8735,7 +8770,7 @@ i32.const 72 i32.const 295 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1234e18 @@ -8748,7 +8783,7 @@ i32.const 72 i32.const 296 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.71828 @@ -8761,7 +8796,7 @@ i32.const 72 i32.const 297 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.0271828 @@ -8774,7 +8809,7 @@ i32.const 72 i32.const 298 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 271.828 @@ -8787,7 +8822,7 @@ i32.const 72 i32.const 299 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1e+128 @@ -8800,7 +8835,7 @@ i32.const 72 i32.const 300 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1e-64 @@ -8813,7 +8848,7 @@ i32.const 72 i32.const 301 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.000035689 @@ -8826,16 +8861,246 @@ i32.const 72 i32.const 302 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) (func $std/string/getString (; 67 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 68 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 68 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + local.get $2 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 71 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 72 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 74 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.tee $6 + local.get $1 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + local.get $8 + if + local.get $8 + local.get $6 + call $~lib/collector/dummy/__ref_unlink + end + local.get $7 + local.get $6 + call $~lib/collector/dummy/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 512 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $~lib/collector/dummy/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/Root#constructor (; 75 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 22 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 76 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_link + ) + (func $~lib/runtime/runtime.release (; 77 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_unlink + ) + (func $~lib/collector/dummy/__ref_collect (; 78 ;) (type $FUNCSIG$v) + nop + ) + (func $~lib/runtime/runtime.collect (; 79 ;) (type $FUNCSIG$v) + call $~lib/collector/dummy/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 81 ;) (type $FUNCSIG$v) call $start:std/string + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT ) - (func $null (; 69 ;) (type $FUNCSIG$v) + (func $null (; 82 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index d00fd4e83d..70b25c5813 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -8,33 +8,34 @@ (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\06\00\00\001\002\003") - (data (i32.const 24) "\01\00\00\00\1a\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s") - (data (i32.const 64) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 112) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 160) "\01") - (data (i32.const 168) "\01\00\00\00\16\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e") - (data (i32.const 200) "\01\00\00\00$\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e") - (data (i32.const 248) "\01\00\00\00\10\00\00\00i\00s\00R\00e\00g\00E\00x\00p") - (data (i32.const 272) "\01\00\00\00\n\00\00\00m\00a\00t\00c\00h") - (data (i32.const 296) "\01\00\00\00\0e\00\00\00r\00e\00p\00l\00a\00c\00e") - (data (i32.const 320) "\01\00\00\00\0c\00\00\00s\00e\00a\00r\00c\00h") - (data (i32.const 344) "\01\00\00\00\0e\00\00\00s\00p\00e\00c\00i\00e\00s") - (data (i32.const 368) "\01\00\00\00\n\00\00\00s\00p\00l\00i\00t") - (data (i32.const 392) "\01\00\00\00\16\00\00\00t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e") - (data (i32.const 424) "\01\00\00\00\16\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g") - (data (i32.const 456) "\01\00\00\00\16\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s") - (data (i32.const 488) "\01\00\00\00\0e\00\00\00S\00y\00m\00b\00o\00l\00(") - (data (i32.const 512) "\01\00\00\00\08\00\00\00n\00u\00l\00l") - (data (i32.const 528) "\01\00\00\00\02\00\00\00)") - (data (i32.const 544) "\01\00\00\00\10\00\00\00S\00y\00m\00b\00o\00l\00(\00)") - (data (i32.const 568) "\01\00\00\00\16\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)") - (data (i32.const 600) "\01\00\00\00&\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)") - (data (i32.const 648) "\01\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\06\00\00\001\002\003") + (data (i32.const 24) "\10\00\00\00\1a\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 112) "\10\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 160) "\10") + (data (i32.const 168) "\10\00\00\00\16\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e") + (data (i32.const 200) "\10\00\00\00$\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e") + (data (i32.const 248) "\10\00\00\00\10\00\00\00i\00s\00R\00e\00g\00E\00x\00p") + (data (i32.const 272) "\10\00\00\00\n\00\00\00m\00a\00t\00c\00h") + (data (i32.const 296) "\10\00\00\00\0e\00\00\00r\00e\00p\00l\00a\00c\00e") + (data (i32.const 320) "\10\00\00\00\0c\00\00\00s\00e\00a\00r\00c\00h") + (data (i32.const 344) "\10\00\00\00\0e\00\00\00s\00p\00e\00c\00i\00e\00s") + (data (i32.const 368) "\10\00\00\00\n\00\00\00s\00p\00l\00i\00t") + (data (i32.const 392) "\10\00\00\00\16\00\00\00t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e") + (data (i32.const 424) "\10\00\00\00\16\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g") + (data (i32.const 456) "\10\00\00\00\16\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s") + (data (i32.const 488) "\10\00\00\00\0e\00\00\00S\00y\00m\00b\00o\00l\00(") + (data (i32.const 512) "\10\00\00\00\08\00\00\00n\00u\00l\00l") + (data (i32.const 528) "\10\00\00\00\02\00\00\00)") + (data (i32.const 544) "\10\00\00\00\10\00\00\00S\00y\00m\00b\00o\00l\00(\00)") + (data (i32.const 568) "\10\00\00\00\16\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)") + (data (i32.const 600) "\10\00\00\00&\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)") + (data (i32.const 648) "\10\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)") + (data (i32.const 712) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 752) "\13") + (data (i32.const 888) "$\10\00\00\00\00\00\00$\10\00\00\00\00\00\00!\00\00\00\0e") (global $~lib/symbol/nextId (mut i32) (i32.const 12)) (global $std/symbol/sym1 (mut i32) (i32.const 0)) (global $std/symbol/sym2 (mut i32) (i32.const 0)) @@ -51,7 +52,15 @@ (global $std/symbol/hasInstance (mut i32) (i32.const 0)) (global $std/symbol/isConcatSpreadable (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -139,14 +148,14 @@ (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 708 + i32.const 912 i32.le_u if i32.const 0 i32.const 72 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -159,9 +168,9 @@ if i32.const 0 i32.const 72 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -390,7 +399,7 @@ i32.const 120 i32.const 54 i32.const 43 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -399,7 +408,7 @@ local.get $0 call $~lib/memory/memory.fill local.get $1 - i32.const 3 + i32.const 15 call $~lib/util/runtime/register ) (func $~lib/map/Map<~lib/string/String,usize>#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) @@ -428,7 +437,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 2 + i32.const 17 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -456,7 +465,7 @@ (local $0 i32) i32.const 24 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 18 call $~lib/util/runtime/register local.tee $0 i32.const 0 @@ -1408,7 +1417,7 @@ local.get $4 call $~lib/memory/memory.copy local.get $2 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/string/String.__concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -1544,10 +1553,10 @@ i32.const 32 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 712 + i32.const 912 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -1563,7 +1572,7 @@ i32.const 32 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/sym1 @@ -1578,7 +1587,7 @@ i32.const 32 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/key2 @@ -1587,7 +1596,7 @@ i32.const 32 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/sym3 @@ -1617,7 +1626,7 @@ i32.const 32 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/key3 @@ -1629,7 +1638,7 @@ i32.const 32 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/symbol/nextId @@ -1652,7 +1661,7 @@ i32.const 32 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/sym3 @@ -1665,7 +1674,7 @@ i32.const 32 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1682,7 +1691,7 @@ i32.const 32 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/isConcatSpreadable @@ -1695,14 +1704,197 @@ i32.const 32 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start (; 28 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 8 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 752 + i32.load + i32.le_u + else + local.get $0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 752 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + local.tee $1 + i32.eqz + if + local.get $0 + i32.const 752 + i32.load + i32.gt_u + local.set $1 + end + local.get $1 + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 752 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + i32.const 752 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 752 + i32.add + i32.load + end + local.tee $3 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 8 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $2 + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $3 + i32.const 512 + i32.and + if + local.get $1 + local.get $2 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + if + i32.const 0 + i32.const 720 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 35 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 720 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $start (; 36 ;) (type $FUNCSIG$v) call $start:std/symbol ) - (func $null (; 29 ;) (type $FUNCSIG$v) + (func $null (; 37 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 4815c9181a..7e6d7bba71 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -8,31 +8,33 @@ (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\06\00\00\001\002\003\00") - (data (i32.const 24) "\01\00\00\00\1a\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s\00") - (data (i32.const 64) "\01\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 112) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 160) "\01\00\00\00\00\00\00\00") - (data (i32.const 168) "\01\00\00\00\16\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00") - (data (i32.const 200) "\01\00\00\00$\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00") - (data (i32.const 248) "\01\00\00\00\10\00\00\00i\00s\00R\00e\00g\00E\00x\00p\00") - (data (i32.const 272) "\01\00\00\00\n\00\00\00m\00a\00t\00c\00h\00") - (data (i32.const 296) "\01\00\00\00\0e\00\00\00r\00e\00p\00l\00a\00c\00e\00") - (data (i32.const 320) "\01\00\00\00\0c\00\00\00s\00e\00a\00r\00c\00h\00") - (data (i32.const 344) "\01\00\00\00\0e\00\00\00s\00p\00e\00c\00i\00e\00s\00") - (data (i32.const 368) "\01\00\00\00\n\00\00\00s\00p\00l\00i\00t\00") - (data (i32.const 392) "\01\00\00\00\16\00\00\00t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e\00") - (data (i32.const 424) "\01\00\00\00\16\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g\00") - (data (i32.const 456) "\01\00\00\00\16\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s\00") - (data (i32.const 488) "\01\00\00\00\0e\00\00\00S\00y\00m\00b\00o\00l\00(\00") - (data (i32.const 512) "\01\00\00\00\08\00\00\00n\00u\00l\00l\00") - (data (i32.const 528) "\01\00\00\00\02\00\00\00)\00") - (data (i32.const 544) "\01\00\00\00\10\00\00\00S\00y\00m\00b\00o\00l\00(\00)\00") - (data (i32.const 568) "\01\00\00\00\16\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)\00") - (data (i32.const 600) "\01\00\00\00&\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)\00") - (data (i32.const 648) "\01\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)\00") + (data (i32.const 8) "\10\00\00\00\06\00\00\001\002\003\00") + (data (i32.const 24) "\10\00\00\00\1a\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 112) "\10\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 160) "\10\00\00\00\00\00\00\00") + (data (i32.const 168) "\10\00\00\00\16\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00") + (data (i32.const 200) "\10\00\00\00$\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00") + (data (i32.const 248) "\10\00\00\00\10\00\00\00i\00s\00R\00e\00g\00E\00x\00p\00") + (data (i32.const 272) "\10\00\00\00\n\00\00\00m\00a\00t\00c\00h\00") + (data (i32.const 296) "\10\00\00\00\0e\00\00\00r\00e\00p\00l\00a\00c\00e\00") + (data (i32.const 320) "\10\00\00\00\0c\00\00\00s\00e\00a\00r\00c\00h\00") + (data (i32.const 344) "\10\00\00\00\0e\00\00\00s\00p\00e\00c\00i\00e\00s\00") + (data (i32.const 368) "\10\00\00\00\n\00\00\00s\00p\00l\00i\00t\00") + (data (i32.const 392) "\10\00\00\00\16\00\00\00t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e\00") + (data (i32.const 424) "\10\00\00\00\16\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g\00") + (data (i32.const 456) "\10\00\00\00\16\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s\00") + (data (i32.const 488) "\10\00\00\00\0e\00\00\00S\00y\00m\00b\00o\00l\00(\00") + (data (i32.const 512) "\10\00\00\00\08\00\00\00n\00u\00l\00l\00") + (data (i32.const 528) "\10\00\00\00\02\00\00\00)\00") + (data (i32.const 544) "\10\00\00\00\10\00\00\00S\00y\00m\00b\00o\00l\00(\00)\00") + (data (i32.const 568) "\10\00\00\00\16\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)\00") + (data (i32.const 600) "\10\00\00\00&\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)\00") + (data (i32.const 648) "\10\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)\00") + (data (i32.const 712) "\10\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 752) "\13\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00$\10\00\00\00\00\00\00$\10\00\00\00\00\00\00!\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/symbol/nextId (mut i32) (i32.const 12)) @@ -56,9 +58,18 @@ (global $std/symbol/hasInstance (mut i32) (i32.const 0)) (global $~lib/symbol/_Symbol.isConcatSpreadable i32 (i32.const 2)) (global $std/symbol/isConcatSpreadable (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 708)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 752)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 912)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) (func $~lib/symbol/Symbol (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -200,9 +211,9 @@ if i32.const 0 i32.const 72 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -217,9 +228,9 @@ if i32.const 0 i32.const 72 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -494,7 +505,7 @@ i32.const 120 i32.const 54 i32.const 43 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -505,7 +516,7 @@ local.get $1 call $~lib/memory/memory.fill local.get $2 - i32.const 3 + i32.const 15 call $~lib/util/runtime/register ) (func $~lib/map/Map<~lib/string/String,usize>#clear (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) @@ -541,7 +552,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 2 + i32.const 17 call $~lib/util/runtime/register local.set $0 end @@ -601,7 +612,7 @@ if i32.const 24 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 18 call $~lib/util/runtime/register local.set $0 end @@ -1798,7 +1809,7 @@ local.get $3 call $~lib/memory/memory.copy local.get $5 - i32.const 1 + i32.const 16 call $~lib/util/runtime/register ) (func $~lib/string/String.__concat (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -2014,7 +2025,7 @@ i32.const 32 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/memory/HEAP_BASE @@ -2042,7 +2053,7 @@ i32.const 32 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/sym1 @@ -2060,7 +2071,7 @@ i32.const 32 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/key2 @@ -2072,7 +2083,7 @@ i32.const 32 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/sym3 @@ -2102,7 +2113,7 @@ i32.const 32 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/key3 @@ -2114,7 +2125,7 @@ i32.const 32 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2128,7 +2139,7 @@ i32.const 32 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/sym3 @@ -2141,7 +2152,7 @@ i32.const 32 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/symbol/_Symbol.hasInstance @@ -2158,7 +2169,7 @@ i32.const 32 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/isConcatSpreadable @@ -2171,7 +2182,7 @@ i32.const 32 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/symbol/_Symbol.hasInstance @@ -2179,9 +2190,209 @@ global.get $~lib/symbol/_Symbol.isConcatSpreadable drop ) - (func $start (; 35 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + local.get $2 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 512 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $7 + block $break|0 + loop $continue|0 + local.get $6 + local.get $7 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $8 + local.get $8 + if + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 720 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/runtime.retain (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.release (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 44 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 720 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/runtime/runtime#constructor (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 46 ;) (type $FUNCSIG$v) call $start:std/symbol ) - (func $null (; 36 ;) (type $FUNCSIG$v) + (func $null (; 47 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/trace.optimized.wat b/tests/compiler/std/trace.optimized.wat index 740e55c12d..d0dfd2b336 100644 --- a/tests/compiler/std/trace.optimized.wat +++ b/tests/compiler/std/trace.optimized.wat @@ -1,21 +1,18 @@ (module (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t") - (data (i32.const 48) "\01\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t") - (data (i32.const 88) "\01\00\00\00\0e\00\00\00o\00n\00e\00_\00i\00n\00t") - (data (i32.const 112) "\01\00\00\00\0e\00\00\00t\00w\00o\00_\00i\00n\00t") - (data (i32.const 136) "\01\00\00\00\12\00\00\00t\00h\00r\00e\00e\00_\00i\00n\00t") - (data (i32.const 168) "\01\00\00\00\10\00\00\00f\00o\00u\00r\00_\00i\00n\00t") - (data (i32.const 192) "\01\00\00\00\10\00\00\00f\00i\00v\00e\00_\00i\00n\00t") - (data (i32.const 216) "\01\00\00\00\10\00\00\00f\00i\00v\00e\00_\00d\00b\00l") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t") + (data (i32.const 48) "\10\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t") + (data (i32.const 88) "\10\00\00\00\0e\00\00\00o\00n\00e\00_\00i\00n\00t") + (data (i32.const 112) "\10\00\00\00\0e\00\00\00t\00w\00o\00_\00i\00n\00t") + (data (i32.const 136) "\10\00\00\00\12\00\00\00t\00h\00r\00e\00e\00_\00i\00n\00t") + (data (i32.const 168) "\10\00\00\00\10\00\00\00f\00o\00u\00r\00_\00i\00n\00t") + (data (i32.const 192) "\10\00\00\00\10\00\00\00f\00i\00v\00e\00_\00i\00n\00t") + (data (i32.const 216) "\10\00\00\00\10\00\00\00f\00i\00v\00e\00_\00d\00b\00l") (global $~lib/started (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $std/trace/main)) (func $start:std/trace (; 1 ;) (type $FUNCSIG$v) i32.const 16 @@ -25,7 +22,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 56 i32.const 0 f64.const 0 @@ -33,7 +30,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 96 i32.const 1 f64.const 1 @@ -41,7 +38,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 120 i32.const 2 f64.const 1 @@ -49,7 +46,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 144 i32.const 3 f64.const 1 @@ -57,7 +54,7 @@ f64.const 3 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 176 i32.const 4 f64.const 1 @@ -65,7 +62,7 @@ f64.const 3 f64.const 4 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 200 i32.const 5 f64.const 1 @@ -73,7 +70,7 @@ f64.const 3 f64.const 4 f64.const 5 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 224 i32.const 5 f64.const 1.1 @@ -81,7 +78,7 @@ f64.const 3.3 f64.const 4.4 f64.const 5.5 - call $~lib/env/trace + call $~lib/builtins/trace ) (func $std/trace/main (; 2 ;) (type $FUNCSIG$v) global.get $~lib/started diff --git a/tests/compiler/std/trace.untouched.wat b/tests/compiler/std/trace.untouched.wat index de6114e2a0..329ad5ef67 100644 --- a/tests/compiler/std/trace.untouched.wat +++ b/tests/compiler/std/trace.untouched.wat @@ -1,22 +1,20 @@ (module (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t\00") - (data (i32.const 48) "\01\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t\00") - (data (i32.const 88) "\01\00\00\00\0e\00\00\00o\00n\00e\00_\00i\00n\00t\00") - (data (i32.const 112) "\01\00\00\00\0e\00\00\00t\00w\00o\00_\00i\00n\00t\00") - (data (i32.const 136) "\01\00\00\00\12\00\00\00t\00h\00r\00e\00e\00_\00i\00n\00t\00") - (data (i32.const 168) "\01\00\00\00\10\00\00\00f\00o\00u\00r\00_\00i\00n\00t\00") - (data (i32.const 192) "\01\00\00\00\10\00\00\00f\00i\00v\00e\00_\00i\00n\00t\00") - (data (i32.const 216) "\01\00\00\00\10\00\00\00f\00i\00v\00e\00_\00d\00b\00l\00") + (data (i32.const 8) "\10\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t\00") + (data (i32.const 48) "\10\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t\00") + (data (i32.const 88) "\10\00\00\00\0e\00\00\00o\00n\00e\00_\00i\00n\00t\00") + (data (i32.const 112) "\10\00\00\00\0e\00\00\00t\00w\00o\00_\00i\00n\00t\00") + (data (i32.const 136) "\10\00\00\00\12\00\00\00t\00h\00r\00e\00e\00_\00i\00n\00t\00") + (data (i32.const 168) "\10\00\00\00\10\00\00\00f\00o\00u\00r\00_\00i\00n\00t\00") + (data (i32.const 192) "\10\00\00\00\10\00\00\00f\00i\00v\00e\00_\00i\00n\00t\00") + (data (i32.const 216) "\10\00\00\00\10\00\00\00f\00i\00v\00e\00_\00d\00b\00l\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 240)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $std/trace/main)) (func $start:std/trace (; 1 ;) (type $FUNCSIG$v) i32.const 16 @@ -26,7 +24,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 56 i32.const 0 f64.const 0 @@ -34,7 +32,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 96 i32.const 1 f64.const 1 @@ -42,7 +40,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 120 i32.const 2 f64.const 1 @@ -50,7 +48,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 144 i32.const 3 f64.const 1 @@ -58,7 +56,7 @@ f64.const 3 f64.const 0 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 176 i32.const 4 f64.const 1 @@ -66,7 +64,7 @@ f64.const 3 f64.const 4 f64.const 0 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 200 i32.const 5 f64.const 1 @@ -74,7 +72,7 @@ f64.const 3 f64.const 4 f64.const 5 - call $~lib/env/trace + call $~lib/builtins/trace i32.const 224 i32.const 5 f64.const 1.1 @@ -82,7 +80,7 @@ f64.const 3.3 f64.const 4.4 f64.const 5.5 - call $~lib/env/trace + call $~lib/builtins/trace ) (func $std/trace/main (; 2 ;) (type $FUNCSIG$v) global.get $~lib/started diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 4dfc46e120..0df220e78a 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -31,69 +31,71 @@ (type $FUNCSIG$di (func (param i32) (result f64))) (type $FUNCSIG$ff (func (param f32) (result f32))) (type $FUNCSIG$dd (func (param f64) (result f64))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\"") + (data (i32.const 8) "\10\00\00\00\"") (data (i32.const 24) "s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 64) "\01\00\00\00&") + (data (i32.const 64) "\10\00\00\00&") (data (i32.const 80) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 120) "\01\00\00\00(") + (data (i32.const 120) "\10\00\00\00(") (data (i32.const 136) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 176) "\01\00\00\00$") + (data (i32.const 176) "\10\00\00\00$") (data (i32.const 192) "~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 232) "\02\00\00\00\05") + (data (i32.const 232) "\0f\00\00\00\05") (data (i32.const 248) "\01\01\01\04\05") - (data (i32.const 256) "\01\00\00\00\1a") + (data (i32.const 256) "\10\00\00\00\1a") (data (i32.const 272) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 304) "\02\00\00\00\05") - (data (i32.const 328) "\02\00\00\00\05") + (data (i32.const 304) "\0f\00\00\00\05") + (data (i32.const 328) "\0f\00\00\00\05") (data (i32.const 344) "\01\01") - (data (i32.const 352) "\02\00\00\00\05") + (data (i32.const 352) "\0f\00\00\00\05") (data (i32.const 368) "\01\01\00\02\02") - (data (i32.const 376) "\02\00\00\00\05") + (data (i32.const 376) "\0f\00\00\00\05") (data (i32.const 392) "\01\01\00\02\02") - (data (i32.const 400) "\02\00\00\00\03") - (data (i32.const 424) "\02\00\00\00\05") + (data (i32.const 400) "\0f\00\00\00\03") + (data (i32.const 424) "\0f\00\00\00\05") (data (i32.const 440) "\01\00\00\00\02") - (data (i32.const 448) "\02\00\00\00\14") + (data (i32.const 448) "\0f\00\00\00\14") (data (i32.const 464) "\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") - (data (i32.const 488) "\02\00\00\00\14") - (data (i32.const 528) "\02\00\00\00\14") + (data (i32.const 488) "\0f\00\00\00\14") + (data (i32.const 528) "\0f\00\00\00\14") (data (i32.const 544) "\01\00\00\00\01") - (data (i32.const 568) "\02\00\00\00\14") + (data (i32.const 568) "\0f\00\00\00\14") (data (i32.const 584) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 608) "\02\00\00\00\14") + (data (i32.const 608) "\0f\00\00\00\14") (data (i32.const 624) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 648) "\02\00\00\00\0c") - (data (i32.const 680) "\02\00\00\00\14") + (data (i32.const 648) "\0f\00\00\00\0c") + (data (i32.const 680) "\0f\00\00\00\14") (data (i32.const 696) "\01") (data (i32.const 712) "\02") - (data (i32.const 720) "\01\00\00\00\1e") + (data (i32.const 720) "\10\00\00\00\1e") (data (i32.const 736) "r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 768) "\01\00\00\00(") + (data (i32.const 768) "\10\00\00\00(") (data (i32.const 784) "f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 824) "\02\00\00\00\0c") + (data (i32.const 824) "\0f\00\00\00\0c") (data (i32.const 840) "\n\00\00\00\0c\00\00\00\0e") - (data (i32.const 856) "\10\00\00\00\10") + (data (i32.const 856) "\1d\00\00\00\10") (data (i32.const 872) "H\03\00\00H\03\00\00\0c\00\00\00\03") - (data (i32.const 888) "\01\00\00\00,") + (data (i32.const 888) "\10\00\00\00,") (data (i32.const 904) "f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 952) "\01\00\00\00,") + (data (i32.const 952) "\10\00\00\00,") (data (i32.const 968) "f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 1016) "\01\00\00\00>") + (data (i32.const 1016) "\10\00\00\00>") (data (i32.const 1032) "f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 1096) "\01\00\00\006") + (data (i32.const 1096) "\10\00\00\006") (data (i32.const 1112) "f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 1168) "\02\00\00\00$") + (data (i32.const 1168) "\0f\00\00\00$") (data (i32.const 1184) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") - (data (i32.const 1224) "\10\00\00\00\10") + (data (i32.const 1224) "\1d\00\00\00\10") (data (i32.const 1240) "\a0\04\00\00\a0\04\00\00$\00\00\00\t") - (data (i32.const 1256) "\01\00\00\00B") + (data (i32.const 1256) "\10\00\00\00B") (data (i32.const 1272) "T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 1344) "\01\00\00\00V") + (data (i32.const 1344) "\10\00\00\00V") (data (i32.const 1360) "T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 1448) "\1e") + (data (i32.const 1588) "\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\t\00\00\00\0e\00\00\00!\00\00\00\0e") (table $0 112 funcref) - (elem (i32.const 0) $null $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) + (elem (i32.const 0) $~lib/runtime/runtime.collect $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/typedarray/arr (mut i32) (i32.const 0)) @@ -112,9 +114,18 @@ (global $std/typedarray/forEachSelf (mut i32) (i32.const 0)) (global $std/typedarray/forEachValues (mut i32) (i32.const 872)) (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 1240)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -434,14 +445,14 @@ (func $~lib/util/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 1448 + i32.const 1696 i32.le_u if i32.const 0 i32.const 136 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -454,9 +465,9 @@ if i32.const 0 i32.const 136 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -474,7 +485,7 @@ i32.const 80 i32.const 54 i32.const 43 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -484,7 +495,7 @@ local.get $0 call $~lib/memory/memory.fill local.get $1 - i32.const 2 + i32.const 15 call $~lib/util/runtime/register ) (func $~lib/arraybuffer/ArrayBufferView#constructor (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -498,7 +509,7 @@ i32.const 80 i32.const 12 i32.const 57 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -512,7 +523,7 @@ if i32.const 12 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 14 call $~lib/util/runtime/register local.set $0 end @@ -542,7 +553,7 @@ (func $~lib/typedarray/Int8Array#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 17 call $~lib/util/runtime/register local.get $0 i32.const 0 @@ -551,7 +562,7 @@ (func $~lib/typedarray/Uint8Array#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/util/runtime/allocate - i32.const 5 + i32.const 18 call $~lib/util/runtime/register local.get $0 i32.const 0 @@ -560,7 +571,7 @@ (func $~lib/typedarray/Uint8ClampedArray#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/util/runtime/allocate - i32.const 6 + i32.const 19 call $~lib/util/runtime/register local.get $0 i32.const 0 @@ -569,7 +580,7 @@ (func $~lib/typedarray/Int16Array#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/util/runtime/allocate - i32.const 7 + i32.const 20 call $~lib/util/runtime/register local.get $0 i32.const 1 @@ -578,7 +589,7 @@ (func $~lib/typedarray/Uint16Array#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/util/runtime/allocate - i32.const 8 + i32.const 21 call $~lib/util/runtime/register local.get $0 i32.const 1 @@ -587,7 +598,7 @@ (func $~lib/typedarray/Int32Array#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/util/runtime/allocate - i32.const 9 + i32.const 22 call $~lib/util/runtime/register local.get $0 i32.const 2 @@ -596,7 +607,7 @@ (func $~lib/typedarray/Uint32Array#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/util/runtime/allocate - i32.const 10 + i32.const 23 call $~lib/util/runtime/register local.get $0 i32.const 2 @@ -605,7 +616,7 @@ (func $~lib/typedarray/Int64Array#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/util/runtime/allocate - i32.const 11 + i32.const 24 call $~lib/util/runtime/register local.get $0 i32.const 3 @@ -614,7 +625,7 @@ (func $~lib/typedarray/Uint64Array#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/util/runtime/allocate - i32.const 12 + i32.const 25 call $~lib/util/runtime/register local.get $0 i32.const 3 @@ -623,7 +634,7 @@ (func $~lib/typedarray/Float32Array#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/util/runtime/allocate - i32.const 13 + i32.const 26 call $~lib/util/runtime/register local.get $0 i32.const 2 @@ -632,7 +643,7 @@ (func $~lib/typedarray/Float64Array#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 call $~lib/util/runtime/allocate - i32.const 14 + i32.const 27 call $~lib/util/runtime/register local.get $0 i32.const 3 @@ -652,7 +663,7 @@ i32.const 24 i32.const 34 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -664,7 +675,7 @@ i32.const 24 i32.const 35 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -676,7 +687,7 @@ i32.const 24 i32.const 36 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -691,7 +702,7 @@ i32.const 24 i32.const 39 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -703,7 +714,7 @@ i32.const 24 i32.const 40 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -715,7 +726,7 @@ i32.const 24 i32.const 41 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -730,7 +741,7 @@ i32.const 24 i32.const 44 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -742,7 +753,7 @@ i32.const 24 i32.const 45 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -754,7 +765,7 @@ i32.const 24 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -769,7 +780,7 @@ i32.const 24 i32.const 49 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -783,7 +794,7 @@ i32.const 24 i32.const 50 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -797,7 +808,7 @@ i32.const 24 i32.const 51 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -812,7 +823,7 @@ i32.const 24 i32.const 54 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -826,7 +837,7 @@ i32.const 24 i32.const 55 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -840,7 +851,7 @@ i32.const 24 i32.const 56 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -855,7 +866,7 @@ i32.const 24 i32.const 59 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -869,7 +880,7 @@ i32.const 24 i32.const 60 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -883,7 +894,7 @@ i32.const 24 i32.const 61 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -898,7 +909,7 @@ i32.const 24 i32.const 64 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -912,7 +923,7 @@ i32.const 24 i32.const 65 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -926,7 +937,7 @@ i32.const 24 i32.const 66 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -941,7 +952,7 @@ i32.const 24 i32.const 69 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -955,7 +966,7 @@ i32.const 24 i32.const 70 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -969,7 +980,7 @@ i32.const 24 i32.const 71 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -984,7 +995,7 @@ i32.const 24 i32.const 74 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -998,7 +1009,7 @@ i32.const 24 i32.const 75 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1012,7 +1023,7 @@ i32.const 24 i32.const 76 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1027,7 +1038,7 @@ i32.const 24 i32.const 79 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1041,7 +1052,7 @@ i32.const 24 i32.const 80 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1055,7 +1066,7 @@ i32.const 24 i32.const 81 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1070,7 +1081,7 @@ i32.const 24 i32.const 84 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1084,7 +1095,7 @@ i32.const 24 i32.const 85 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1098,7 +1109,7 @@ i32.const 24 i32.const 86 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -1114,7 +1125,7 @@ i32.const 192 i32.const 444 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1138,7 +1149,7 @@ i32.const 192 i32.const 438 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1238,7 +1249,7 @@ i32.shl i32.store offset=8 local.get $2 - i32.const 9 + i32.const 22 call $~lib/util/runtime/register ) (func $~lib/typedarray/Float64Array#__set (; 22 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) @@ -1253,7 +1264,7 @@ i32.const 192 i32.const 854 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1354,7 +1365,7 @@ i32.shl i32.store offset=8 local.get $2 - i32.const 14 + i32.const 27 call $~lib/util/runtime/register ) (func $~lib/util/sort/insertionSort (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -1796,7 +1807,7 @@ i32.const 192 i32.const 848 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1817,7 +1828,7 @@ i32.const 192 i32.const 198 i32.const 44 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1849,7 +1860,7 @@ i32.const 192 i32.const 192 i32.const 44 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1868,7 +1879,7 @@ i32.const 192 i32.const 34 i32.const 44 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2114,7 +2125,7 @@ end end ) - (func $~lib/runtime/runtime.newArray (; 34 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/runtime/makeArray (; 34 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) i32.const 16 @@ -2127,7 +2138,7 @@ i32.shl local.tee $4 call $~lib/util/runtime/allocate - i32.const 2 + i32.const 15 call $~lib/util/runtime/register local.tee $1 local.set $5 @@ -2165,7 +2176,7 @@ i32.const 192 i32.const 28 i32.const 44 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2184,7 +2195,7 @@ i32.const 272 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2318,7 +2329,7 @@ i32.sub i32.store offset=8 local.get $2 - i32.const 4 + i32.const 17 call $~lib/util/runtime/register ) (func $~lib/typedarray/Int32Array#fill (; 39 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) @@ -2410,7 +2421,7 @@ i32.const 272 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2536,7 +2547,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -2550,7 +2561,7 @@ i32.const 192 i32.const 116 i32.const 44 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2625,7 +2636,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -2657,7 +2668,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -2673,7 +2684,7 @@ i32.const 192 i32.const 280 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2753,7 +2764,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -2769,7 +2780,7 @@ i32.const 192 i32.const 362 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2849,7 +2860,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -2920,7 +2931,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -2936,7 +2947,7 @@ i32.const 192 i32.const 526 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2974,7 +2985,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -2990,7 +3001,7 @@ i32.const 192 i32.const 608 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3074,7 +3085,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3090,7 +3101,7 @@ i32.const 192 i32.const 690 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3128,7 +3139,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3144,7 +3155,7 @@ i32.const 192 i32.const 772 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3227,7 +3238,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3302,7 +3313,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3371,7 +3382,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3441,7 +3452,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3473,7 +3484,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3546,7 +3557,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3619,7 +3630,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3691,7 +3702,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3721,7 +3732,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3793,7 +3804,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3823,7 +3834,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3894,7 +3905,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3965,7 +3976,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4048,7 +4059,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4061,7 +4072,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4074,7 +4085,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4134,7 +4145,7 @@ i32.const 192 i32.const 110 i32.const 44 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4171,7 +4182,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4184,7 +4195,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4197,7 +4208,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4275,7 +4286,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4288,7 +4299,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4301,7 +4312,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4372,7 +4383,7 @@ i32.const 192 i32.const 274 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4411,7 +4422,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4424,7 +4435,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4437,7 +4448,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4508,7 +4519,7 @@ i32.const 192 i32.const 356 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4547,7 +4558,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4560,7 +4571,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4573,7 +4584,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4660,7 +4671,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4673,7 +4684,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4686,7 +4697,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4757,7 +4768,7 @@ i32.const 192 i32.const 520 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4796,7 +4807,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4809,7 +4820,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4822,7 +4833,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4898,7 +4909,7 @@ i32.const 192 i32.const 602 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4937,7 +4948,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4950,7 +4961,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4963,7 +4974,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5034,7 +5045,7 @@ i32.const 192 i32.const 684 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5073,7 +5084,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5086,7 +5097,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5099,7 +5110,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5175,7 +5186,7 @@ i32.const 192 i32.const 766 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5214,7 +5225,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5227,7 +5238,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5240,7 +5251,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5332,7 +5343,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5345,7 +5356,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5358,7 +5369,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5439,7 +5450,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5450,7 +5461,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5518,7 +5529,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5529,7 +5540,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5558,7 +5569,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5569,7 +5580,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5654,7 +5665,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5665,7 +5676,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5737,7 +5748,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5748,7 +5759,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5829,7 +5840,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5840,7 +5851,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5869,7 +5880,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5880,7 +5891,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5962,7 +5973,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5973,7 +5984,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6002,7 +6013,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6013,7 +6024,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6095,7 +6106,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6106,7 +6117,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6188,7 +6199,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6199,7 +6210,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6278,7 +6289,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6291,7 +6302,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6363,7 +6374,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6376,7 +6387,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6406,7 +6417,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6419,7 +6430,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6502,7 +6513,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6515,7 +6526,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6591,7 +6602,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6604,7 +6615,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6685,7 +6696,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6698,7 +6709,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6728,7 +6739,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6741,7 +6752,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6822,7 +6833,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6835,7 +6846,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6865,7 +6876,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6878,7 +6889,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6959,7 +6970,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6972,7 +6983,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7053,7 +7064,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7066,7 +7077,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7145,7 +7156,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7156,7 +7167,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7231,7 +7242,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7242,7 +7253,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7271,7 +7282,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7282,7 +7293,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7365,7 +7376,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7376,7 +7387,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7449,7 +7460,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7460,7 +7471,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7539,7 +7550,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7550,7 +7561,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7579,7 +7590,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7590,7 +7601,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7670,7 +7681,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7681,7 +7692,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7717,7 +7728,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7728,7 +7739,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7958,7 +7969,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7969,7 +7980,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8207,7 +8218,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8218,7 +8229,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8237,7 +8248,7 @@ i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -8248,7 +8259,7 @@ i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -8259,7 +8270,7 @@ i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -8348,7 +8359,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8428,7 +8439,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8475,7 +8486,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8494,7 +8505,7 @@ i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -8505,7 +8516,7 @@ i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -8516,7 +8527,7 @@ i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -8609,7 +8620,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8692,7 +8703,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8707,7 +8718,7 @@ i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -8718,7 +8729,7 @@ i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -8729,7 +8740,7 @@ i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -8811,7 +8822,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8852,7 +8863,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8868,7 +8879,7 @@ i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -8879,7 +8890,7 @@ i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -8890,7 +8901,7 @@ i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -8975,7 +8986,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -9019,7 +9030,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -9035,7 +9046,7 @@ i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -9046,7 +9057,7 @@ i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -9057,7 +9068,7 @@ i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -9141,7 +9152,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -9157,7 +9168,7 @@ i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -9168,7 +9179,7 @@ i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -9179,7 +9190,7 @@ i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -9263,7 +9274,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -9390,7 +9401,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -9417,7 +9428,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9430,7 +9441,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9443,7 +9454,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9456,7 +9467,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -9560,7 +9571,7 @@ i32.sub i32.store offset=8 local.get $1 - i32.const 5 + i32.const 18 call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 238 ;) (type $FUNCSIG$v) @@ -9632,7 +9643,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -9657,7 +9668,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9670,7 +9681,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9683,7 +9694,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9696,7 +9707,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -9752,7 +9763,7 @@ i32.sub i32.store offset=8 local.get $1 - i32.const 6 + i32.const 19 call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 240 ;) (type $FUNCSIG$v) @@ -9824,7 +9835,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -9849,7 +9860,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9862,7 +9873,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9875,7 +9886,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9888,7 +9899,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -10004,7 +10015,7 @@ i32.shl i32.store offset=8 local.get $1 - i32.const 7 + i32.const 20 call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 243 ;) (type $FUNCSIG$v) @@ -10082,7 +10093,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -10107,7 +10118,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10120,7 +10131,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10133,7 +10144,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10146,7 +10157,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -10262,7 +10273,7 @@ i32.shl i32.store offset=8 local.get $1 - i32.const 8 + i32.const 21 call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 246 ;) (type $FUNCSIG$v) @@ -10334,7 +10345,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -10359,7 +10370,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10372,7 +10383,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10385,7 +10396,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10398,7 +10409,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -10519,7 +10530,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -10546,7 +10557,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10559,7 +10570,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10572,7 +10583,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10585,7 +10596,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -10647,7 +10658,7 @@ i32.shl i32.store offset=8 local.get $1 - i32.const 10 + i32.const 23 call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 250 ;) (type $FUNCSIG$v) @@ -10713,7 +10724,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -10738,7 +10749,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10751,7 +10762,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10764,7 +10775,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10777,7 +10788,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -10893,7 +10904,7 @@ i32.shl i32.store offset=8 local.get $1 - i32.const 11 + i32.const 24 call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 253 ;) (type $FUNCSIG$v) @@ -10962,7 +10973,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -10987,7 +10998,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11000,7 +11011,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11013,7 +11024,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11026,7 +11037,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -11088,7 +11099,7 @@ i32.shl i32.store offset=8 local.get $1 - i32.const 12 + i32.const 25 call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 255 ;) (type $FUNCSIG$v) @@ -11157,7 +11168,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -11182,7 +11193,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11195,7 +11206,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11208,7 +11219,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11221,7 +11232,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -11337,7 +11348,7 @@ i32.shl i32.store offset=8 local.get $1 - i32.const 13 + i32.const 26 call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 258 ;) (type $FUNCSIG$v) @@ -11406,7 +11417,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -11431,7 +11442,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11444,7 +11455,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11457,7 +11468,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11470,7 +11481,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -11594,7 +11605,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -11621,7 +11632,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11634,7 +11645,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11647,7 +11658,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11660,14 +11671,14 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) (func $start:std/typedarray (; 261 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - i32.const 1448 + i32.const 1696 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -11701,7 +11712,7 @@ i32.const 24 i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -11715,7 +11726,7 @@ i32.const 24 i32.const 97 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -11727,7 +11738,7 @@ i32.const 24 i32.const 98 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -11740,7 +11751,7 @@ i32.const 24 i32.const 99 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -11753,7 +11764,7 @@ i32.const 24 i32.const 100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -11766,7 +11777,7 @@ i32.const 24 i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -11785,7 +11796,7 @@ i32.const 24 i32.const 104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -11801,7 +11812,7 @@ i32.const 24 i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -11813,7 +11824,7 @@ i32.const 24 i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -11826,7 +11837,7 @@ i32.const 24 i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -11880,7 +11891,7 @@ i32.const 24 i32.const 121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/af64 @@ -11896,7 +11907,7 @@ i32.const 24 i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/af64 @@ -11908,7 +11919,7 @@ i32.const 24 i32.const 123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -11974,7 +11985,7 @@ i32.const 24 i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -12000,7 +12011,7 @@ i32.const 24 i32.const 132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/clampedArr @@ -12013,7 +12024,7 @@ i32.const 24 i32.const 133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/clampedArr @@ -12026,7 +12037,7 @@ i32.const 24 i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 @@ -12060,9 +12071,9 @@ global.get $std/typedarray/arr8 i32.const 5 i32.const 0 - i32.const 15 + i32.const 28 i32.const 248 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -12070,7 +12081,7 @@ i32.const 24 i32.const 144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 @@ -12081,9 +12092,9 @@ global.get $std/typedarray/arr8 i32.const 5 i32.const 0 - i32.const 15 + i32.const 28 i32.const 320 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -12091,7 +12102,7 @@ i32.const 24 i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 @@ -12102,9 +12113,9 @@ global.get $std/typedarray/arr8 i32.const 5 i32.const 0 - i32.const 15 + i32.const 28 i32.const 344 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -12112,7 +12123,7 @@ i32.const 24 i32.const 150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 @@ -12123,9 +12134,9 @@ global.get $std/typedarray/arr8 i32.const 5 i32.const 0 - i32.const 15 + i32.const 28 i32.const 368 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -12133,7 +12144,7 @@ i32.const 24 i32.const 153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 @@ -12144,9 +12155,9 @@ global.get $std/typedarray/arr8 i32.const 5 i32.const 0 - i32.const 15 + i32.const 28 i32.const 392 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -12154,7 +12165,7 @@ i32.const 24 i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 @@ -12176,7 +12187,7 @@ i32.const 24 i32.const 160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub8 @@ -12192,7 +12203,7 @@ i32.const 24 i32.const 161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub8 @@ -12204,15 +12215,15 @@ i32.const 24 i32.const 162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub8 i32.const 3 i32.const 0 - i32.const 15 + i32.const 28 i32.const 416 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -12220,15 +12231,15 @@ i32.const 24 i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 i32.const 5 i32.const 0 - i32.const 15 + i32.const 28 i32.const 440 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -12236,7 +12247,7 @@ i32.const 24 i32.const 164 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 @@ -12270,9 +12281,9 @@ global.get $std/typedarray/arr32 i32.const 5 i32.const 2 - i32.const 16 + i32.const 29 i32.const 464 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -12280,7 +12291,7 @@ i32.const 24 i32.const 174 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 @@ -12291,9 +12302,9 @@ global.get $std/typedarray/arr32 i32.const 5 i32.const 2 - i32.const 16 + i32.const 29 i32.const 504 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -12301,7 +12312,7 @@ i32.const 24 i32.const 177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 @@ -12312,9 +12323,9 @@ global.get $std/typedarray/arr32 i32.const 5 i32.const 2 - i32.const 16 + i32.const 29 i32.const 544 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -12322,7 +12333,7 @@ i32.const 24 i32.const 180 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 @@ -12333,9 +12344,9 @@ global.get $std/typedarray/arr32 i32.const 5 i32.const 2 - i32.const 16 + i32.const 29 i32.const 584 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -12343,7 +12354,7 @@ i32.const 24 i32.const 183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 @@ -12354,9 +12365,9 @@ global.get $std/typedarray/arr32 i32.const 5 i32.const 2 - i32.const 16 + i32.const 29 i32.const 624 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -12364,7 +12375,7 @@ i32.const 24 i32.const 186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 @@ -12388,7 +12399,7 @@ i32.const 24 i32.const 190 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub32 @@ -12404,7 +12415,7 @@ i32.const 24 i32.const 191 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub32 @@ -12416,15 +12427,15 @@ i32.const 24 i32.const 192 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub32 i32.const 3 i32.const 2 - i32.const 16 + i32.const 29 i32.const 664 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -12432,15 +12443,15 @@ i32.const 24 i32.const 193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 i32.const 5 i32.const 2 - i32.const 16 + i32.const 29 i32.const 696 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -12448,7 +12459,7 @@ i32.const 24 i32.const 194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 134217726 @@ -12496,7 +12507,7 @@ i32.const 24 i32.const 211 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr1 @@ -12508,7 +12519,7 @@ i32.const 24 i32.const 212 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr1 @@ -12524,7 +12535,7 @@ i32.const 24 i32.const 213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr1 @@ -12536,7 +12547,7 @@ i32.const 24 i32.const 214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr1 @@ -12554,7 +12565,7 @@ i32.const 24 i32.const 217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr2 @@ -12566,7 +12577,7 @@ i32.const 24 i32.const 218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr2 @@ -12582,7 +12593,7 @@ i32.const 24 i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr2 @@ -12594,7 +12605,7 @@ i32.const 24 i32.const 220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr2 @@ -12612,7 +12623,7 @@ i32.const 24 i32.const 223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr3 @@ -12624,7 +12635,7 @@ i32.const 24 i32.const 224 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr3 @@ -12640,7 +12651,7 @@ i32.const 24 i32.const 225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr3 @@ -12652,7 +12663,7 @@ i32.const 24 i32.const 226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> @@ -12744,10 +12755,187 @@ call $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> call $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> ) - (func $start (; 262 ;) (type $FUNCSIG$v) - call $start:std/typedarray + (func $~lib/runtime/runtime.instanceof (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 1448 + i32.load + i32.le_u + else + local.get $0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 1448 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 263 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.eqz + local.tee $1 + i32.eqz + if + local.get $0 + i32.const 1448 + i32.load + i32.gt_u + local.set $1 + end + local.get $1 + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 1448 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 264 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register ) - (func $null (; 263 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.newString (; 265 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 266 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 267 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.tee $2 + i32.eqz + local.tee $0 + if (result i32) + local.get $0 + else + local.get $2 + i32.const 1448 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $2 + i32.const 3 + i32.shl + i32.const 1448 + i32.add + i32.load + end + local.tee $0 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $3 + local.get $2 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $2 + i32.load + drop + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $3 + i32.store offset=8 + local.get $2 + local.get $3 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $0 + i32.const 512 + i32.and + if + local.get $1 + local.get $3 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load + drop + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $2 + ) + (func $~lib/runtime/runtime.retain (; 268 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 269 ;) (type $FUNCSIG$v) nop ) + (func $start (; 270 ;) (type $FUNCSIG$v) + call $start:std/typedarray + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 30 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT + ) ) diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 7123557cc6..8f97fe6fb2 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -34,39 +34,40 @@ (type $FUNCSIG$vjii (func (param i64 i32 i32))) (type $FUNCSIG$vfii (func (param f32 i32 i32))) (type $FUNCSIG$vdii (func (param f64 i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 64) "\01\00\00\00&\00\00\00\00\00\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 120) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 176) "\01\00\00\00$\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 232) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\01\04\05") - (data (i32.const 256) "\01\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 304) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 328) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\00\00") - (data (i32.const 352) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") - (data (i32.const 376) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") - (data (i32.const 400) "\02\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 424) "\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02") - (data (i32.const 448) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 488) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 528) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 568) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") - (data (i32.const 608) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") - (data (i32.const 648) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 680) "\02\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00") - (data (i32.const 720) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 768) "\01\00\00\00(\00\00\00\00\00\00\00\00\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 824) "\02\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\0c\00\00\00\0e\00\00\00") - (data (i32.const 856) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00H\03\00\00H\03\00\00\0c\00\00\00\03\00\00\00") - (data (i32.const 888) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 952) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 1016) "\01\00\00\00>\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 1096) "\01\00\00\006\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 1168) "\02\00\00\00$\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00") - (data (i32.const 1224) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a0\04\00\00\a0\04\00\00$\00\00\00\t\00\00\00") - (data (i32.const 1256) "\01\00\00\00B\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 1344) "\01\00\00\00V\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 8) "\10\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00&\00\00\00\00\00\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 120) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 176) "\10\00\00\00$\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 232) "\0f\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\01\04\05") + (data (i32.const 256) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 304) "\0f\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 328) "\0f\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\00\00") + (data (i32.const 352) "\0f\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") + (data (i32.const 376) "\0f\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") + (data (i32.const 400) "\0f\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 424) "\0f\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02") + (data (i32.const 448) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 488) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 528) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 568) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") + (data (i32.const 608) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") + (data (i32.const 648) "\0f\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 680) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00") + (data (i32.const 720) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 768) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 824) "\0f\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\0c\00\00\00\0e\00\00\00") + (data (i32.const 856) "\1d\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00H\03\00\00H\03\00\00\0c\00\00\00\03\00\00\00") + (data (i32.const 888) "\10\00\00\00,\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 952) "\10\00\00\00,\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1016) "\10\00\00\00>\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1096) "\10\00\00\006\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1168) "\0f\00\00\00$\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00") + (data (i32.const 1224) "\1d\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a0\04\00\00\a0\04\00\00$\00\00\00\t\00\00\00") + (data (i32.const 1256) "\10\00\00\00B\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1344) "\10\00\00\00V\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1448) "\1e\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\t\00\00\00\0e\00\00\00!\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") (table $0 112 funcref) (elem (i32.const 0) $null $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32 (i32.const 1)) @@ -104,10 +105,20 @@ (global $std/typedarray/forEachSelf (mut i32) (i32.const 0)) (global $std/typedarray/forEachValues (mut i32) (i32.const 872)) (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 1240)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 1448)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 1448)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 1696)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -497,9 +508,9 @@ if i32.const 0 i32.const 136 - i32.const 128 + i32.const 131 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -514,9 +525,9 @@ if i32.const 0 i32.const 136 - i32.const 130 + i32.const 133 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -536,7 +547,7 @@ i32.const 80 i32.const 54 i32.const 43 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -547,7 +558,7 @@ local.get $1 call $~lib/memory/memory.fill local.get $2 - i32.const 2 + i32.const 15 call $~lib/util/runtime/register ) (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) @@ -571,7 +582,7 @@ i32.const 80 i32.const 12 i32.const 57 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -587,7 +598,7 @@ if i32.const 12 call $~lib/util/runtime/allocate - i32.const 3 + i32.const 14 call $~lib/util/runtime/register local.set $0 end @@ -639,7 +650,7 @@ else i32.const 12 call $~lib/util/runtime/allocate - i32.const 4 + i32.const 17 call $~lib/util/runtime/register end local.get $1 @@ -670,7 +681,7 @@ else i32.const 12 call $~lib/util/runtime/allocate - i32.const 5 + i32.const 18 call $~lib/util/runtime/register end local.get $1 @@ -690,7 +701,7 @@ else i32.const 12 call $~lib/util/runtime/allocate - i32.const 6 + i32.const 19 call $~lib/util/runtime/register end local.get $1 @@ -710,7 +721,7 @@ else i32.const 12 call $~lib/util/runtime/allocate - i32.const 7 + i32.const 20 call $~lib/util/runtime/register end local.get $1 @@ -732,7 +743,7 @@ else i32.const 12 call $~lib/util/runtime/allocate - i32.const 8 + i32.const 21 call $~lib/util/runtime/register end local.get $1 @@ -754,7 +765,7 @@ else i32.const 12 call $~lib/util/runtime/allocate - i32.const 9 + i32.const 22 call $~lib/util/runtime/register end local.get $1 @@ -776,7 +787,7 @@ else i32.const 12 call $~lib/util/runtime/allocate - i32.const 10 + i32.const 23 call $~lib/util/runtime/register end local.get $1 @@ -798,7 +809,7 @@ else i32.const 12 call $~lib/util/runtime/allocate - i32.const 11 + i32.const 24 call $~lib/util/runtime/register end local.get $1 @@ -820,7 +831,7 @@ else i32.const 12 call $~lib/util/runtime/allocate - i32.const 12 + i32.const 25 call $~lib/util/runtime/register end local.get $1 @@ -842,7 +853,7 @@ else i32.const 12 call $~lib/util/runtime/allocate - i32.const 13 + i32.const 26 call $~lib/util/runtime/register end local.get $1 @@ -864,7 +875,7 @@ else i32.const 12 call $~lib/util/runtime/allocate - i32.const 14 + i32.const 27 call $~lib/util/runtime/register end local.get $1 @@ -905,7 +916,7 @@ i32.const 24 i32.const 34 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -920,7 +931,7 @@ i32.const 24 i32.const 35 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -933,7 +944,7 @@ i32.const 24 i32.const 36 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -950,7 +961,7 @@ i32.const 24 i32.const 39 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -965,7 +976,7 @@ i32.const 24 i32.const 40 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -978,7 +989,7 @@ i32.const 24 i32.const 41 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -995,7 +1006,7 @@ i32.const 24 i32.const 44 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1010,7 +1021,7 @@ i32.const 24 i32.const 45 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1023,7 +1034,7 @@ i32.const 24 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1040,7 +1051,7 @@ i32.const 24 i32.const 49 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1055,7 +1066,7 @@ i32.const 24 i32.const 50 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1068,7 +1079,7 @@ i32.const 24 i32.const 51 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1085,7 +1096,7 @@ i32.const 24 i32.const 54 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -1100,7 +1111,7 @@ i32.const 24 i32.const 55 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -1113,7 +1124,7 @@ i32.const 24 i32.const 56 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1130,7 +1141,7 @@ i32.const 24 i32.const 59 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $6 @@ -1145,7 +1156,7 @@ i32.const 24 i32.const 60 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $6 @@ -1158,7 +1169,7 @@ i32.const 24 i32.const 61 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1175,7 +1186,7 @@ i32.const 24 i32.const 64 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $7 @@ -1190,7 +1201,7 @@ i32.const 24 i32.const 65 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $7 @@ -1203,7 +1214,7 @@ i32.const 24 i32.const 66 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1220,7 +1231,7 @@ i32.const 24 i32.const 69 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $8 @@ -1235,7 +1246,7 @@ i32.const 24 i32.const 70 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $8 @@ -1248,7 +1259,7 @@ i32.const 24 i32.const 71 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1265,7 +1276,7 @@ i32.const 24 i32.const 74 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $9 @@ -1280,7 +1291,7 @@ i32.const 24 i32.const 75 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $9 @@ -1293,7 +1304,7 @@ i32.const 24 i32.const 76 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1310,7 +1321,7 @@ i32.const 24 i32.const 79 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $10 @@ -1325,7 +1336,7 @@ i32.const 24 i32.const 80 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $10 @@ -1338,7 +1349,7 @@ i32.const 24 i32.const 81 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1355,7 +1366,7 @@ i32.const 24 i32.const 84 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $11 @@ -1370,7 +1381,7 @@ i32.const 24 i32.const 85 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $11 @@ -1383,7 +1394,7 @@ i32.const 24 i32.const 86 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -1399,7 +1410,7 @@ i32.const 192 i32.const 444 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1423,7 +1434,7 @@ i32.const 192 i32.const 438 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1560,7 +1571,7 @@ i32.shl i32.store offset=8 local.get $7 - i32.const 9 + i32.const 22 call $~lib/util/runtime/register ) (func $~lib/typedarray/Float64Array#__set (; 40 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) @@ -1575,7 +1586,7 @@ i32.const 192 i32.const 854 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1713,7 +1724,7 @@ i32.shl i32.store offset=8 local.get $7 - i32.const 14 + i32.const 27 call $~lib/util/runtime/register ) (func $~lib/util/sort/insertionSort (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -2267,7 +2278,7 @@ i32.const 192 i32.const 848 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2288,7 +2299,7 @@ i32.const 192 i32.const 198 i32.const 44 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2320,7 +2331,7 @@ i32.const 192 i32.const 192 i32.const 44 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2339,7 +2350,7 @@ i32.const 192 i32.const 34 i32.const 44 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2646,7 +2657,7 @@ end end ) - (func $~lib/runtime/runtime.newArray (; 55 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/runtime/makeArray (; 55 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2664,7 +2675,7 @@ local.set $5 local.get $5 call $~lib/util/runtime/allocate - i32.const 2 + i32.const 15 call $~lib/util/runtime/register local.set $6 local.get $4 @@ -2722,7 +2733,7 @@ i32.const 192 i32.const 28 i32.const 44 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2752,7 +2763,7 @@ i32.const 272 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2933,7 +2944,7 @@ i32.shl i32.store offset=8 local.get $7 - i32.const 4 + i32.const 17 call $~lib/util/runtime/register ) (func $~lib/typedarray/Int32Array#fill (; 62 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) @@ -3059,7 +3070,7 @@ i32.const 272 i32.const 99 i32.const 61 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3213,7 +3224,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3227,7 +3238,7 @@ i32.const 192 i32.const 116 i32.const 44 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3334,7 +3345,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3435,7 +3446,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3451,7 +3462,7 @@ i32.const 192 i32.const 280 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3562,7 +3573,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3578,7 +3589,7 @@ i32.const 192 i32.const 362 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3687,7 +3698,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3786,7 +3797,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3802,7 +3813,7 @@ i32.const 192 i32.const 526 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3909,7 +3920,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -3925,7 +3936,7 @@ i32.const 192 i32.const 608 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4032,7 +4043,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4048,7 +4059,7 @@ i32.const 192 i32.const 690 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4155,7 +4166,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4171,7 +4182,7 @@ i32.const 192 i32.const 772 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4278,7 +4289,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4377,7 +4388,7 @@ i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4477,7 +4488,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4575,7 +4586,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4673,7 +4684,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4773,7 +4784,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4871,7 +4882,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -4967,7 +4978,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5063,7 +5074,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5159,7 +5170,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5255,7 +5266,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5351,7 +5362,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5447,7 +5458,7 @@ i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5555,7 +5566,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5569,7 +5580,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5583,7 +5594,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5667,7 +5678,7 @@ i32.const 192 i32.const 110 i32.const 44 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5710,7 +5721,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5724,7 +5735,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5738,7 +5749,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5846,7 +5857,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5860,7 +5871,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5874,7 +5885,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -5960,7 +5971,7 @@ i32.const 192 i32.const 274 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6005,7 +6016,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6019,7 +6030,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6033,7 +6044,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6119,7 +6130,7 @@ i32.const 192 i32.const 356 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6164,7 +6175,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6178,7 +6189,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6192,7 +6203,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6300,7 +6311,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6314,7 +6325,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6328,7 +6339,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6414,7 +6425,7 @@ i32.const 192 i32.const 520 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6459,7 +6470,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6473,7 +6484,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6487,7 +6498,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6573,7 +6584,7 @@ i32.const 192 i32.const 602 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6618,7 +6629,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6632,7 +6643,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6646,7 +6657,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6732,7 +6743,7 @@ i32.const 192 i32.const 684 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6777,7 +6788,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6791,7 +6802,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6805,7 +6816,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -6891,7 +6902,7 @@ i32.const 192 i32.const 766 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6936,7 +6947,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6950,7 +6961,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6964,7 +6975,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7072,7 +7083,7 @@ i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -7086,7 +7097,7 @@ i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -7100,7 +7111,7 @@ i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7215,7 +7226,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7232,7 +7243,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7343,7 +7354,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7360,7 +7371,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7471,7 +7482,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7488,7 +7499,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7603,7 +7614,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7620,7 +7631,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7731,7 +7742,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7748,7 +7759,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7855,7 +7866,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7872,7 +7883,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -7979,7 +7990,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7996,7 +8007,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8103,7 +8114,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8120,7 +8131,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8227,7 +8238,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8244,7 +8255,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8351,7 +8362,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8368,7 +8379,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8475,7 +8486,7 @@ i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8492,7 +8503,7 @@ i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8607,7 +8618,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8623,7 +8634,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8734,7 +8745,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8750,7 +8761,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8861,7 +8872,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8877,7 +8888,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -8992,7 +9003,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9008,7 +9019,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -9119,7 +9130,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9135,7 +9146,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -9242,7 +9253,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9258,7 +9269,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -9365,7 +9376,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9381,7 +9392,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -9488,7 +9499,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9504,7 +9515,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -9611,7 +9622,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9627,7 +9638,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -9734,7 +9745,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9750,7 +9761,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -9857,7 +9868,7 @@ i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9873,7 +9884,7 @@ i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -9997,7 +10008,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10014,7 +10025,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -10134,7 +10145,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10151,7 +10162,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -10271,7 +10282,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10288,7 +10299,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -10412,7 +10423,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10429,7 +10440,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -10549,7 +10560,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10566,7 +10577,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -10682,7 +10693,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10699,7 +10710,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -10815,7 +10826,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10832,7 +10843,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -10948,7 +10959,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10965,7 +10976,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -11081,7 +11092,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11098,7 +11109,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -11470,7 +11481,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11487,7 +11498,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -11861,7 +11872,7 @@ i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11878,7 +11889,7 @@ i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -11905,7 +11916,7 @@ i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -11917,7 +11928,7 @@ i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -11929,7 +11940,7 @@ i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -12034,7 +12045,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -12057,7 +12068,7 @@ i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -12069,7 +12080,7 @@ i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -12081,7 +12092,7 @@ i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -12180,7 +12191,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -12203,7 +12214,7 @@ i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -12215,7 +12226,7 @@ i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -12227,7 +12238,7 @@ i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -12326,7 +12337,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -12353,7 +12364,7 @@ i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -12365,7 +12376,7 @@ i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -12377,7 +12388,7 @@ i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -12482,7 +12493,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -12505,7 +12516,7 @@ i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -12517,7 +12528,7 @@ i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -12529,7 +12540,7 @@ i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -12628,7 +12639,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -12647,7 +12658,7 @@ i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -12659,7 +12670,7 @@ i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -12671,7 +12682,7 @@ i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -12764,7 +12775,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -12783,7 +12794,7 @@ i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -12795,7 +12806,7 @@ i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -12807,7 +12818,7 @@ i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -12900,7 +12911,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -12920,7 +12931,7 @@ i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -12932,7 +12943,7 @@ i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -12944,7 +12955,7 @@ i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -13040,7 +13051,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -13060,7 +13071,7 @@ i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -13072,7 +13083,7 @@ i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -13084,7 +13095,7 @@ i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -13180,7 +13191,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -13200,7 +13211,7 @@ i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -13212,7 +13223,7 @@ i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -13224,7 +13235,7 @@ i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -13320,7 +13331,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -13340,7 +13351,7 @@ i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -13352,7 +13363,7 @@ i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -13364,7 +13375,7 @@ i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -13460,7 +13471,7 @@ i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -13623,7 +13634,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -13652,7 +13663,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -13666,7 +13677,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -13680,7 +13691,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -13694,7 +13705,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -13894,7 +13905,7 @@ i32.shl i32.store offset=8 local.get $7 - i32.const 5 + i32.const 18 call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 353 ;) (type $FUNCSIG$v) @@ -13980,7 +13991,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -14009,7 +14020,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -14023,7 +14034,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -14037,7 +14048,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -14051,7 +14062,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -14251,7 +14262,7 @@ i32.shl i32.store offset=8 local.get $7 - i32.const 6 + i32.const 19 call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 356 ;) (type $FUNCSIG$v) @@ -14337,7 +14348,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -14366,7 +14377,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -14380,7 +14391,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -14394,7 +14405,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -14408,7 +14419,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -14608,7 +14619,7 @@ i32.shl i32.store offset=8 local.get $7 - i32.const 7 + i32.const 20 call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 359 ;) (type $FUNCSIG$v) @@ -14700,7 +14711,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -14729,7 +14740,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -14743,7 +14754,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -14757,7 +14768,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -14771,7 +14782,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -14971,7 +14982,7 @@ i32.shl i32.store offset=8 local.get $7 - i32.const 8 + i32.const 21 call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 362 ;) (type $FUNCSIG$v) @@ -15057,7 +15068,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -15086,7 +15097,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -15100,7 +15111,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -15114,7 +15125,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -15128,7 +15139,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -15279,7 +15290,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -15308,7 +15319,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -15322,7 +15333,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -15336,7 +15347,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -15350,7 +15361,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -15550,7 +15561,7 @@ i32.shl i32.store offset=8 local.get $7 - i32.const 10 + i32.const 23 call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 367 ;) (type $FUNCSIG$v) @@ -15630,7 +15641,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -15659,7 +15670,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -15673,7 +15684,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -15687,7 +15698,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -15701,7 +15712,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -15901,7 +15912,7 @@ i32.shl i32.store offset=8 local.get $7 - i32.const 11 + i32.const 24 call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 370 ;) (type $FUNCSIG$v) @@ -15984,7 +15995,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -16013,7 +16024,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -16027,7 +16038,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -16041,7 +16052,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -16055,7 +16066,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -16255,7 +16266,7 @@ i32.shl i32.store offset=8 local.get $7 - i32.const 12 + i32.const 25 call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 373 ;) (type $FUNCSIG$v) @@ -16338,7 +16349,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -16367,7 +16378,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -16381,7 +16392,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -16395,7 +16406,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -16409,7 +16420,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -16609,7 +16620,7 @@ i32.shl i32.store offset=8 local.get $7 - i32.const 13 + i32.const 26 call $~lib/util/runtime/register ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 376 ;) (type $FUNCSIG$v) @@ -16692,7 +16703,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -16721,7 +16732,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -16735,7 +16746,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -16749,7 +16760,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -16763,7 +16774,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -16917,7 +16928,7 @@ i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -16946,7 +16957,7 @@ i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -16960,7 +16971,7 @@ i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -16974,7 +16985,7 @@ i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -16988,7 +16999,7 @@ i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -17003,7 +17014,7 @@ i32.const 24 i32.const 3 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Uint8Array.BYTES_PER_ELEMENT @@ -17015,7 +17026,7 @@ i32.const 24 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Uint8ClampedArray.BYTES_PER_ELEMENT @@ -17027,7 +17038,7 @@ i32.const 24 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Int16Array.BYTES_PER_ELEMENT @@ -17039,7 +17050,7 @@ i32.const 24 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Uint16Array.BYTES_PER_ELEMENT @@ -17051,7 +17062,7 @@ i32.const 24 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Int32Array.BYTES_PER_ELEMENT @@ -17063,7 +17074,7 @@ i32.const 24 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Uint32Array.BYTES_PER_ELEMENT @@ -17075,7 +17086,7 @@ i32.const 24 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Int64Array.BYTES_PER_ELEMENT @@ -17087,7 +17098,7 @@ i32.const 24 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Uint64Array.BYTES_PER_ELEMENT @@ -17099,7 +17110,7 @@ i32.const 24 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Float32Array.BYTES_PER_ELEMENT @@ -17111,7 +17122,7 @@ i32.const 24 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Float64Array.BYTES_PER_ELEMENT @@ -17123,7 +17134,7 @@ i32.const 24 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/memory/HEAP_BASE @@ -17166,7 +17177,7 @@ i32.const 24 i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -17179,7 +17190,7 @@ i32.const 24 i32.const 97 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -17194,7 +17205,7 @@ i32.const 24 i32.const 98 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -17208,7 +17219,7 @@ i32.const 24 i32.const 99 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -17222,7 +17233,7 @@ i32.const 24 i32.const 100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -17236,7 +17247,7 @@ i32.const 24 i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -17254,7 +17265,7 @@ i32.const 24 i32.const 104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -17269,7 +17280,7 @@ i32.const 24 i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -17284,7 +17295,7 @@ i32.const 24 i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -17298,7 +17309,7 @@ i32.const 24 i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -17352,7 +17363,7 @@ i32.const 24 i32.const 121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/af64 @@ -17367,7 +17378,7 @@ i32.const 24 i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/af64 @@ -17382,7 +17393,7 @@ i32.const 24 i32.const 123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -17434,7 +17445,7 @@ i32.const 24 i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -17464,7 +17475,7 @@ i32.const 24 i32.const 132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/clampedArr @@ -17478,7 +17489,7 @@ i32.const 24 i32.const 133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/clampedArr @@ -17492,7 +17503,7 @@ i32.const 24 i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -17528,9 +17539,9 @@ global.get $std/typedarray/arr8 i32.const 5 i32.const 0 - i32.const 15 + i32.const 28 i32.const 248 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -17538,7 +17549,7 @@ i32.const 24 i32.const 144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 @@ -17550,9 +17561,9 @@ global.get $std/typedarray/arr8 i32.const 5 i32.const 0 - i32.const 15 + i32.const 28 i32.const 320 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -17560,7 +17571,7 @@ i32.const 24 i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 @@ -17572,9 +17583,9 @@ global.get $std/typedarray/arr8 i32.const 5 i32.const 0 - i32.const 15 + i32.const 28 i32.const 344 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -17582,7 +17593,7 @@ i32.const 24 i32.const 150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 @@ -17594,9 +17605,9 @@ global.get $std/typedarray/arr8 i32.const 5 i32.const 0 - i32.const 15 + i32.const 28 i32.const 368 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -17604,7 +17615,7 @@ i32.const 24 i32.const 153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 @@ -17616,9 +17627,9 @@ global.get $std/typedarray/arr8 i32.const 5 i32.const 0 - i32.const 15 + i32.const 28 i32.const 392 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -17626,7 +17637,7 @@ i32.const 24 i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 @@ -17650,7 +17661,7 @@ i32.const 24 i32.const 160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub8 @@ -17663,7 +17674,7 @@ i32.const 24 i32.const 161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub8 @@ -17676,15 +17687,15 @@ i32.const 24 i32.const 162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub8 i32.const 3 i32.const 0 - i32.const 15 + i32.const 28 i32.const 416 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -17692,15 +17703,15 @@ i32.const 24 i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 i32.const 5 i32.const 0 - i32.const 15 + i32.const 28 i32.const 440 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -17708,7 +17719,7 @@ i32.const 24 i32.const 164 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -17744,9 +17755,9 @@ global.get $std/typedarray/arr32 i32.const 5 i32.const 2 - i32.const 16 + i32.const 29 i32.const 464 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -17754,7 +17765,7 @@ i32.const 24 i32.const 174 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 @@ -17766,9 +17777,9 @@ global.get $std/typedarray/arr32 i32.const 5 i32.const 2 - i32.const 16 + i32.const 29 i32.const 504 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -17776,7 +17787,7 @@ i32.const 24 i32.const 177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 @@ -17788,9 +17799,9 @@ global.get $std/typedarray/arr32 i32.const 5 i32.const 2 - i32.const 16 + i32.const 29 i32.const 544 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -17798,7 +17809,7 @@ i32.const 24 i32.const 180 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 @@ -17810,9 +17821,9 @@ global.get $std/typedarray/arr32 i32.const 5 i32.const 2 - i32.const 16 + i32.const 29 i32.const 584 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -17820,7 +17831,7 @@ i32.const 24 i32.const 183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 @@ -17832,9 +17843,9 @@ global.get $std/typedarray/arr32 i32.const 5 i32.const 2 - i32.const 16 + i32.const 29 i32.const 624 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -17842,7 +17853,7 @@ i32.const 24 i32.const 186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 @@ -17866,7 +17877,7 @@ i32.const 24 i32.const 190 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub32 @@ -17881,7 +17892,7 @@ i32.const 24 i32.const 191 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub32 @@ -17896,15 +17907,15 @@ i32.const 24 i32.const 192 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub32 i32.const 3 i32.const 2 - i32.const 16 + i32.const 29 i32.const 664 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -17912,15 +17923,15 @@ i32.const 24 i32.const 193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 i32.const 5 i32.const 2 - i32.const 16 + i32.const 29 i32.const 696 - call $~lib/runtime/runtime.newArray + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -17928,7 +17939,7 @@ i32.const 24 i32.const 194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -17979,7 +17990,7 @@ i32.const 24 i32.const 211 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr1 @@ -17992,7 +18003,7 @@ i32.const 24 i32.const 212 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr1 @@ -18005,7 +18016,7 @@ i32.const 24 i32.const 213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr1 @@ -18018,7 +18029,7 @@ i32.const 24 i32.const 214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr1 @@ -18037,7 +18048,7 @@ i32.const 24 i32.const 217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr2 @@ -18050,7 +18061,7 @@ i32.const 24 i32.const 218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr2 @@ -18063,7 +18074,7 @@ i32.const 24 i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr2 @@ -18076,7 +18087,7 @@ i32.const 24 i32.const 220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr2 @@ -18095,7 +18106,7 @@ i32.const 24 i32.const 223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr3 @@ -18108,7 +18119,7 @@ i32.const 24 i32.const 224 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr3 @@ -18121,7 +18132,7 @@ i32.const 24 i32.const 225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr3 @@ -18134,7 +18145,7 @@ i32.const 24 i32.const 226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> @@ -18226,9 +18237,239 @@ call $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> call $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> ) - (func $start (; 380 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 380 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + local.get $2 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 381 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + local.tee $2 + if (result i32) + local.get $2 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 382 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 383 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 384 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 385 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 386 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 8 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.tee $6 + local.get $1 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + local.get $8 + if + local.get $8 + local.get $6 + call $~lib/collector/dummy/__ref_unlink + end + local.get $7 + local.get $6 + call $~lib/collector/dummy/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 512 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $~lib/collector/dummy/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/Root#constructor (; 387 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 30 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 388 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_link + ) + (func $~lib/runtime/runtime.release (; 389 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_unlink + ) + (func $~lib/collector/dummy/__ref_collect (; 390 ;) (type $FUNCSIG$v) + nop + ) + (func $~lib/runtime/runtime.collect (; 391 ;) (type $FUNCSIG$v) + call $~lib/collector/dummy/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 392 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 393 ;) (type $FUNCSIG$v) call $start:std/typedarray + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT ) - (func $null (; 381 ;) (type $FUNCSIG$v) + (func $null (; 394 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/switch.optimized.wat b/tests/compiler/switch.optimized.wat index 3bac6c9cb2..0b165397e6 100644 --- a/tests/compiler/switch.optimized.wat +++ b/tests/compiler/switch.optimized.wat @@ -2,13 +2,10 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\12\00\00\00s\00w\00i\00t\00c\00h\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\12\00\00\00s\00w\00i\00t\00c\00h\00.\00t\00s") (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $switch/doSwitch (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block $case4|0 @@ -71,7 +68,7 @@ i32.const 16 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -83,7 +80,7 @@ i32.const 16 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -95,7 +92,7 @@ i32.const 16 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -107,7 +104,7 @@ i32.const 16 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -117,7 +114,7 @@ i32.const 16 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -127,7 +124,7 @@ i32.const 16 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -139,7 +136,7 @@ i32.const 16 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -151,7 +148,7 @@ i32.const 16 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -163,7 +160,7 @@ i32.const 16 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -173,7 +170,7 @@ i32.const 16 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -183,7 +180,7 @@ i32.const 16 i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -195,7 +192,7 @@ i32.const 16 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -207,7 +204,7 @@ i32.const 16 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -219,7 +216,7 @@ i32.const 16 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -229,7 +226,7 @@ i32.const 16 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/switch.untouched.wat b/tests/compiler/switch.untouched.wat index 494c50397d..ddacf54185 100644 --- a/tests/compiler/switch.untouched.wat +++ b/tests/compiler/switch.untouched.wat @@ -2,14 +2,12 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\12\00\00\00s\00w\00i\00t\00c\00h\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\12\00\00\00s\00w\00i\00t\00c\00h\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 36)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $switch/doSwitch (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -179,7 +177,7 @@ i32.const 16 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -192,7 +190,7 @@ i32.const 16 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -205,7 +203,7 @@ i32.const 16 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -218,7 +216,7 @@ i32.const 16 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -231,7 +229,7 @@ i32.const 16 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -244,7 +242,7 @@ i32.const 16 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -257,7 +255,7 @@ i32.const 16 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -270,7 +268,7 @@ i32.const 16 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -283,7 +281,7 @@ i32.const 16 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -296,7 +294,7 @@ i32.const 16 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -309,7 +307,7 @@ i32.const 16 i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -322,7 +320,7 @@ i32.const 16 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -335,7 +333,7 @@ i32.const 16 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -348,7 +346,7 @@ i32.const 16 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -361,7 +359,7 @@ i32.const 16 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -374,7 +372,7 @@ i32.const 16 i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -387,7 +385,7 @@ i32.const 16 i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -400,7 +398,7 @@ i32.const 16 i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -413,7 +411,7 @@ i32.const 16 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -426,7 +424,7 @@ i32.const 16 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -439,7 +437,7 @@ i32.const 16 i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -452,7 +450,7 @@ i32.const 16 i32.const 73 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -465,7 +463,7 @@ i32.const 16 i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -478,7 +476,7 @@ i32.const 16 i32.const 75 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -491,7 +489,7 @@ i32.const 16 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -504,7 +502,7 @@ i32.const 16 i32.const 85 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -517,7 +515,7 @@ i32.const 16 i32.const 86 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -530,7 +528,7 @@ i32.const 16 i32.const 92 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -543,7 +541,7 @@ i32.const 16 i32.const 93 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -556,7 +554,7 @@ i32.const 16 i32.const 94 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/ternary.optimized.wat b/tests/compiler/ternary.optimized.wat index 55ac7fbfba..56846df9d8 100644 --- a/tests/compiler/ternary.optimized.wat +++ b/tests/compiler/ternary.optimized.wat @@ -1,11 +1,8 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $ternary/a (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start (; 0 ;) (type $FUNCSIG$v) i32.const 1 diff --git a/tests/compiler/ternary.untouched.wat b/tests/compiler/ternary.untouched.wat index 61a47091d6..e281029495 100644 --- a/tests/compiler/ternary.untouched.wat +++ b/tests/compiler/ternary.untouched.wat @@ -4,9 +4,7 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $ternary/a (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:ternary (; 0 ;) (type $FUNCSIG$v) i32.const 1 diff --git a/tests/compiler/threads.optimized.wat b/tests/compiler/threads.optimized.wat index 85fe9b4a28..c002c873cb 100644 --- a/tests/compiler/threads.optimized.wat +++ b/tests/compiler/threads.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 (shared 1 1)) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $threads/testAtomic (; 0 ;) (type $FUNCSIG$v) i32.const 0 diff --git a/tests/compiler/threads.untouched.wat b/tests/compiler/threads.untouched.wat index 74598aa5b8..3b6ad104e8 100644 --- a/tests/compiler/threads.untouched.wat +++ b/tests/compiler/threads.untouched.wat @@ -4,9 +4,7 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/ASC_FEATURE_THREADS i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $threads/testAtomic (; 0 ;) (type $FUNCSIG$v) i32.const 0 diff --git a/tests/compiler/typealias.optimized.wat b/tests/compiler/typealias.optimized.wat index f4a8304ebb..4a7b9bd96f 100644 --- a/tests/compiler/typealias.optimized.wat +++ b/tests/compiler/typealias.optimized.wat @@ -2,10 +2,7 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (export "alias" (func $typealias/alias)) (func $typealias/alias (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/typealias.untouched.wat b/tests/compiler/typealias.untouched.wat index 72e197e1ee..8cd06aa993 100644 --- a/tests/compiler/typealias.untouched.wat +++ b/tests/compiler/typealias.untouched.wat @@ -4,9 +4,7 @@ (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "alias" (func $typealias/alias)) (func $typealias/alias (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/unary.optimized.wat b/tests/compiler/unary.optimized.wat index a56a7f4140..fd6525e13b 100644 --- a/tests/compiler/unary.optimized.wat +++ b/tests/compiler/unary.optimized.wat @@ -1,14 +1,11 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $unary/i (mut i32) (i32.const 0)) (global $unary/I (mut i64) (i64.const 0)) (global $unary/f (mut f32) (f32.const 0)) (global $unary/F (mut f64) (f64.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:unary (; 0 ;) (type $FUNCSIG$v) (local $0 f32) diff --git a/tests/compiler/unary.untouched.wat b/tests/compiler/unary.untouched.wat index 0114ad8060..e0fbbd5389 100644 --- a/tests/compiler/unary.untouched.wat +++ b/tests/compiler/unary.untouched.wat @@ -7,9 +7,7 @@ (global $unary/I (mut i64) (i64.const 0)) (global $unary/f (mut f32) (f32.const 0)) (global $unary/F (mut f64) (f64.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:unary (; 0 ;) (type $FUNCSIG$v) (local $0 i32) diff --git a/tests/compiler/void.optimized.wat b/tests/compiler/void.optimized.wat index 86b388ad0a..e2acb0a3b8 100644 --- a/tests/compiler/void.optimized.wat +++ b/tests/compiler/void.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/void.untouched.wat b/tests/compiler/void.untouched.wat index 8ee4c756ac..a46ab488c7 100644 --- a/tests/compiler/void.untouched.wat +++ b/tests/compiler/void.untouched.wat @@ -6,9 +6,7 @@ (elem (i32.const 0) $null) (global $void/u8Val1 (mut i32) (i32.const 1)) (global $void/u8Val2 (mut i32) (i32.const 255)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $void/anInt (; 0 ;) (type $FUNCSIG$i) (result i32) i32.const 2 diff --git a/tests/compiler/wasi.optimized.wat b/tests/compiler/wasi.optimized.wat index dd129858a1..66a2d3405b 100644 --- a/tests/compiler/wasi.optimized.wat +++ b/tests/compiler/wasi.optimized.wat @@ -1,12 +1,9 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\0e\00\00\00w\00a\00s\00i\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\0e\00\00\00w\00a\00s\00i\00.\00t\00s") (global $wasi/sig (mut i32) (i32.const 1)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start (; 0 ;) (type $FUNCSIG$v) i32.const 9 diff --git a/tests/compiler/wasi.ts b/tests/compiler/wasi.ts index cd42168ffb..cf2a76dbf5 100644 --- a/tests/compiler/wasi.ts +++ b/tests/compiler/wasi.ts @@ -1,7 +1,5 @@ import { dirent, rwevent, fdstat, filestat, iovec, clocksubscription, fdsubscription, signal, dirprestat } from "bindings/wasi"; - -const WASM32 = 1; -const WASM64 = 2; +import { Target } from "common/target"; assert(offsetof("next") == 0); assert(offsetof("ino") == 8); @@ -33,10 +31,10 @@ assert(offsetof("ctim") == 48); assert(offsetof() == 56); assert(offsetof("buf") == 0); -if (ASC_TARGET == WASM32) { +if (ASC_TARGET == Target.WASM32) { assert(offsetof("buf_len") == 4); assert(offsetof() == 8); -} else if (ASC_TARGET == WASM64) { +} else if (ASC_TARGET == Target.WASM64) { assert(offsetof("buf_len") == 8); assert(offsetof() == 16); } else { @@ -58,10 +56,10 @@ assert(offsetof("fd") == 16); assert(offsetof() == 20); assert(offsetof("type") == 0); -if (ASC_TARGET == WASM32) { +if (ASC_TARGET == Target.WASM32) { assert(offsetof("name_len") == 4); assert(offsetof() == 8); -} else if (ASC_TARGET == WASM64) { +} else if (ASC_TARGET == Target.WASM64) { assert(offsetof("name_len") == 8); assert(offsetof() == 16); } else { diff --git a/tests/compiler/wasi.untouched.wat b/tests/compiler/wasi.untouched.wat index b2cb630c18..1f077ba208 100644 --- a/tests/compiler/wasi.untouched.wat +++ b/tests/compiler/wasi.untouched.wat @@ -1,18 +1,17 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\0e\00\00\00w\00a\00s\00i\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\0e\00\00\00w\00a\00s\00i\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $wasi/WASM32 i32 (i32.const 1)) - (global $wasi/WASM64 i32 (i32.const 2)) + (global $~lib/common/target/Target.WASM32 i32 (i32.const 0)) + (global $~lib/common/target/Target.WASM64 i32 (i32.const 1)) + (global $~lib/common/target/Target.JS i32 (i32.const 2)) (global $~lib/ASC_TARGET i32 (i32.const 0)) (global $wasi/sig (mut i32) (i32.const 1)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:wasi (; 1 ;) (type $FUNCSIG$v) i32.const 0 @@ -22,9 +21,9 @@ if i32.const 0 i32.const 16 - i32.const 6 + i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -34,9 +33,9 @@ if i32.const 0 i32.const 16 - i32.const 7 + i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -46,9 +45,9 @@ if i32.const 0 i32.const 16 - i32.const 8 + i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 20 @@ -58,9 +57,9 @@ if i32.const 0 i32.const 16 - i32.const 9 + i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 24 @@ -70,9 +69,9 @@ if i32.const 0 i32.const 16 - i32.const 10 + i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -82,9 +81,9 @@ if i32.const 0 i32.const 16 - i32.const 12 + i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -94,9 +93,9 @@ if i32.const 0 i32.const 16 - i32.const 13 + i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 10 @@ -106,9 +105,9 @@ if i32.const 0 i32.const 16 - i32.const 14 + i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -118,9 +117,9 @@ if i32.const 0 i32.const 16 - i32.const 15 + i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 24 @@ -130,9 +129,9 @@ if i32.const 0 i32.const 16 - i32.const 16 + i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 32 @@ -142,9 +141,9 @@ if i32.const 0 i32.const 16 - i32.const 17 + i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -154,9 +153,9 @@ if i32.const 0 i32.const 16 - i32.const 19 + i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -166,9 +165,9 @@ if i32.const 0 i32.const 16 - i32.const 20 + i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -178,9 +177,9 @@ if i32.const 0 i32.const 16 - i32.const 21 + i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -190,9 +189,9 @@ if i32.const 0 i32.const 16 - i32.const 22 + i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 24 @@ -202,9 +201,9 @@ if i32.const 0 i32.const 16 - i32.const 23 + i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -214,9 +213,9 @@ if i32.const 0 i32.const 16 - i32.const 25 + i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -226,9 +225,9 @@ if i32.const 0 i32.const 16 - i32.const 26 + i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -238,9 +237,9 @@ if i32.const 0 i32.const 16 - i32.const 27 + i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 20 @@ -250,9 +249,9 @@ if i32.const 0 i32.const 16 - i32.const 28 + i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 24 @@ -262,9 +261,9 @@ if i32.const 0 i32.const 16 - i32.const 29 + i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 32 @@ -274,9 +273,9 @@ if i32.const 0 i32.const 16 - i32.const 30 + i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 40 @@ -286,9 +285,9 @@ if i32.const 0 i32.const 16 - i32.const 31 + i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 48 @@ -298,9 +297,9 @@ if i32.const 0 i32.const 16 - i32.const 32 + i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 56 @@ -310,9 +309,9 @@ if i32.const 0 i32.const 16 - i32.const 33 + i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -322,9 +321,9 @@ if i32.const 0 i32.const 16 - i32.const 35 + i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block @@ -335,9 +334,9 @@ if i32.const 0 i32.const 16 - i32.const 37 + i32.const 35 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -347,9 +346,9 @@ if i32.const 0 i32.const 16 - i32.const 38 + i32.const 36 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -360,9 +359,9 @@ if i32.const 0 i32.const 16 - i32.const 46 + i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -372,9 +371,9 @@ if i32.const 0 i32.const 16 - i32.const 47 + i32.const 45 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -384,9 +383,9 @@ if i32.const 0 i32.const 16 - i32.const 48 + i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 24 @@ -396,9 +395,9 @@ if i32.const 0 i32.const 16 - i32.const 49 + i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 32 @@ -408,9 +407,9 @@ if i32.const 0 i32.const 16 - i32.const 50 + i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 40 @@ -420,9 +419,9 @@ if i32.const 0 i32.const 16 - i32.const 51 + i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 48 @@ -432,9 +431,9 @@ if i32.const 0 i32.const 16 - i32.const 52 + i32.const 50 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 56 @@ -444,9 +443,9 @@ if i32.const 0 i32.const 16 - i32.const 53 + i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -456,9 +455,9 @@ if i32.const 0 i32.const 16 - i32.const 55 + i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -468,9 +467,9 @@ if i32.const 0 i32.const 16 - i32.const 56 + i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -480,9 +479,9 @@ if i32.const 0 i32.const 16 - i32.const 57 + i32.const 55 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 20 @@ -492,9 +491,9 @@ if i32.const 0 i32.const 16 - i32.const 58 + i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -504,9 +503,9 @@ if i32.const 0 i32.const 16 - i32.const 60 + i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block @@ -517,9 +516,9 @@ if i32.const 0 i32.const 16 - i32.const 62 + i32.const 60 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -529,9 +528,9 @@ if i32.const 0 i32.const 16 - i32.const 63 + i32.const 61 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 41f4f950ba..c7317e81a4 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1,16 +1,13 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\10\00\00\00w\00h\00i\00l\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\10\00\00\00w\00h\00i\00l\00e\00.\00t\00s") (global $while/n (mut i32) (i32.const 10)) (global $while/m (mut i32) (i32.const 0)) (global $while/o (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:while (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -34,7 +31,7 @@ i32.const 16 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/m @@ -45,7 +42,7 @@ i32.const 16 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 10 @@ -83,7 +80,7 @@ i32.const 16 i32.const 21 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/o @@ -94,7 +91,7 @@ i32.const 16 i32.const 22 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end br $continue|1 @@ -106,7 +103,7 @@ i32.const 16 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/m @@ -117,7 +114,7 @@ i32.const 16 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/o @@ -128,7 +125,7 @@ i32.const 16 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -160,7 +157,7 @@ i32.const 16 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/m @@ -171,7 +168,7 @@ i32.const 16 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/while.untouched.wat b/tests/compiler/while.untouched.wat index ea0fecdcf7..ba149171c8 100644 --- a/tests/compiler/while.untouched.wat +++ b/tests/compiler/while.untouched.wat @@ -1,17 +1,15 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\10\00\00\00w\00h\00i\00l\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\10\00\00\00w\00h\00i\00l\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $while/n (mut i32) (i32.const 10)) (global $while/m (mut i32) (i32.const 0)) (global $while/o (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:while (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -42,7 +40,7 @@ i32.const 16 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/m @@ -54,7 +52,7 @@ i32.const 16 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 10 @@ -101,7 +99,7 @@ i32.const 16 i32.const 21 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/o @@ -113,7 +111,7 @@ i32.const 16 i32.const 22 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -130,7 +128,7 @@ i32.const 16 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/m @@ -142,7 +140,7 @@ i32.const 16 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/o @@ -154,7 +152,7 @@ i32.const 16 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -197,7 +195,7 @@ i32.const 16 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/m @@ -209,7 +207,7 @@ i32.const 16 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/wildcard-export.optimized.wat b/tests/compiler/wildcard-export.optimized.wat index 1139e552a6..306f12dff1 100644 --- a/tests/compiler/wildcard-export.optimized.wat +++ b/tests/compiler/wildcard-export.optimized.wat @@ -1,12 +1,9 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "a" (global $export/a)) (export "renamed_a" (global $export/a)) (export "renamed_b" (global $export/b)) diff --git a/tests/compiler/wildcard-export.untouched.wat b/tests/compiler/wildcard-export.untouched.wat index a1662de342..b86295da07 100644 --- a/tests/compiler/wildcard-export.untouched.wat +++ b/tests/compiler/wildcard-export.untouched.wat @@ -7,9 +7,7 @@ (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "a" (global $export/a)) (export "renamed_a" (global $export/a)) (export "renamed_b" (global $export/b)) From 57c8bd01caeec165bd3a1fd79bec06e818f6ea9f Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 7 Apr 2019 00:55:50 +0200 Subject: [PATCH 096/119] handle references externally assigned to fields --- src/compiler.ts | 133 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 95 insertions(+), 38 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index c7613404ca..70c1c25cd0 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -528,45 +528,9 @@ export class Compiler extends DiagnosticEmitter { break; } case ElementKind.FIELD: { - let module = this.module; - let type = (element).type; - let nativeType = type.toNativeType(); - let offset = (element).memoryOffset; - let usizeType = this.options.usizeType; - let nativeSizeType = this.options.nativeSizeType; - - // make a getter - let getterName = prefix + GETTER_PREFIX + name; - module.addFunction( - getterName, - this.ensureFunctionType(null, type, usizeType), - null, - module.createLoad( - type.byteSize, - type.is(TypeFlags.SIGNED), - module.createGetLocal(0, nativeSizeType), - nativeType, - offset - ) - ); - module.addFunctionExport(getterName, getterName); - - // make a setter + this.ensureModuleFieldGetter(prefix + GETTER_PREFIX + name, element); if (!element.is(CommonFlags.READONLY)) { - let setterName = prefix + SETTER_PREFIX + name; - module.addFunction( - setterName, - this.ensureFunctionType([ type ], Type.void, usizeType), - null, - module.createStore( - type.byteSize, - module.createGetLocal(0, nativeSizeType), - module.createGetLocal(1, nativeType), - nativeType, - offset - ) - ); - module.addFunctionExport(setterName, setterName); + this.ensureModuleFieldSetter(prefix + SETTER_PREFIX + name, element); } break; } @@ -614,6 +578,99 @@ export class Compiler extends DiagnosticEmitter { } } + /** Makes a function to get the value of a field of an exported class. */ + private ensureModuleFieldGetter(name: string, field: Field): void { + var module = this.module; + var type = field.type; + var usizeType = this.options.usizeType; + module.addFunction( + name, + this.ensureFunctionType(null, type, usizeType), + null, + module.createLoad(type.byteSize, type.is(TypeFlags.SIGNED), + module.createGetLocal(0, usizeType.toNativeType()), + type.toNativeType(), field.memoryOffset + ) + ); + module.addFunctionExport(name, name); + } + + /** Makes a function to set the value of a field of an exported class. */ + private ensureModuleFieldSetter(name: string, field: Field): void { + var module = this.module; + var program = this.program; + var type = field.type; + var nativeType = type.toNativeType(); + var usizeType = this.options.usizeType; + var nativeSizeType = usizeType.toNativeType(); + if (type.isManaged(program)) { + let fn1: Function | null, fn2: Function | null; + let body: ExpressionRef[] = []; + if (fn1 = program.linkRef) { // tracing + if (fn2 = program.unlinkRef) { + body.push( + module.createCall(fn2.internalName, [ + module.createGetLocal(2, nativeType), + module.createGetLocal(0, nativeSizeType) + ], NativeType.None) + ); + } + body.push( + module.createCall(fn1.internalName, [ + module.createGetLocal(1, nativeSizeType), + module.createGetLocal(0, nativeSizeType) + ], NativeType.None) + ); + } else if (fn1 = program.retainRef) { // arc + fn2 = assert(program.releaseRef); + body.push( + module.createCall(fn2.internalName, [ + module.createGetLocal(2, nativeType) + ], NativeType.None) + ); + body.push( + module.createCall(fn1.internalName, [ + module.createGetLocal(1, nativeSizeType) + ], NativeType.None) + ); + } + module.addFunction( + name, + this.ensureFunctionType([ type ], Type.void, usizeType), + [ nativeType ], + module.createIf( // if (value != oldValue) release/retain .. + module.createBinary( + nativeSizeType == NativeType.I64 + ? BinaryOp.NeI64 + : BinaryOp.NeI32, + module.createGetLocal(1, nativeType), + module.createTeeLocal(2, + module.createLoad(type.byteSize, false, + module.createGetLocal(0, nativeSizeType), + nativeType, field.memoryOffset + ) + ) + ), + module.createBlock(null, body) + ) + ); + } else { + module.addFunction( + name, + this.ensureFunctionType([ type ], Type.void, usizeType), + null, + module.createStore( + type.byteSize, + module.createGetLocal(0, nativeSizeType), + module.createGetLocal(1, nativeType), + nativeType, + field.memoryOffset + ) + ); + } + module.addFunctionExport(name, name); + } + // === Elements ================================================================================= /** Compiles any element. */ From c3ff3f23767f38e035df1ae97650fc0acb80a31a Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 8 Apr 2019 03:49:41 +0200 Subject: [PATCH 097/119] inherent acylic data structure detection this will become useful for the pure collector eventually --- src/builtins.ts | 17 +- src/program.ts | 107 +- std/assembly/common/rtti.ts | 30 +- std/assembly/runtime.ts | 2 +- tests/compiler/runtime-arena.optimized.wat | 7 +- tests/compiler/runtime-arena.untouched.wat | 6 +- tests/compiler/runtime-default.optimized.wat | 7 +- tests/compiler/runtime-default.untouched.wat | 6 +- tests/compiler/runtime/flags.optimized.wat | 852 +++++++++++--- tests/compiler/runtime/flags.ts | 131 ++- tests/compiler/runtime/flags.untouched.wat | 1022 +++++++++++++---- .../compiler/runtime/instanceof.optimized.wat | 7 +- .../compiler/runtime/instanceof.untouched.wat | 6 +- .../compiler/std/array-literal.optimized.wat | 9 +- .../compiler/std/array-literal.untouched.wat | 6 +- tests/compiler/std/array.optimized.wat | 10 +- tests/compiler/std/array.untouched.wat | 6 +- tests/compiler/std/arraybuffer.optimized.wat | 7 +- tests/compiler/std/arraybuffer.untouched.wat | 6 +- tests/compiler/std/dataview.optimized.wat | 8 +- tests/compiler/std/dataview.untouched.wat | 6 +- tests/compiler/std/date.optimized.wat | 7 +- tests/compiler/std/date.untouched.wat | 6 +- tests/compiler/std/map.optimized.wat | 7 +- tests/compiler/std/map.untouched.wat | 6 +- tests/compiler/std/new.optimized.wat | 7 +- tests/compiler/std/new.untouched.wat | 6 +- .../compiler/std/object-literal.optimized.wat | 7 +- .../compiler/std/object-literal.untouched.wat | 6 +- .../std/operator-overloading.optimized.wat | 7 +- .../std/operator-overloading.untouched.wat | 6 +- tests/compiler/std/set.optimized.wat | 7 +- tests/compiler/std/set.untouched.wat | 6 +- tests/compiler/std/static-array.optimized.wat | 7 +- tests/compiler/std/static-array.untouched.wat | 6 +- tests/compiler/std/string-utf8.optimized.wat | 7 +- tests/compiler/std/string-utf8.untouched.wat | 6 +- tests/compiler/std/string.optimized.wat | 7 +- tests/compiler/std/string.untouched.wat | 6 +- tests/compiler/std/symbol.optimized.wat | 7 +- tests/compiler/std/symbol.untouched.wat | 6 +- tests/compiler/std/typedarray.optimized.wat | 7 +- tests/compiler/std/typedarray.untouched.wat | 6 +- 43 files changed, 1891 insertions(+), 510 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index 4dfc803081..0f057d24e9 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -4233,7 +4233,6 @@ function typeToRuntimeFlags(type: Type, program: Program): RTTIFlags { /** Compiles runtime type information for use by stdlib. */ export function compileRTTI(compiler: Compiler): void { - // TODO: only add this if actually accessed? var program = compiler.program; var module = compiler.module; var managedClasses = program.managedClasses; @@ -4242,22 +4241,26 @@ export function compileRTTI(compiler: Compiler): void { var data = new Uint8Array(size); writeI32(count, data, 0); var off = 8; + var arrayPrototype = assert(program.arrayPrototype); + var setPrototype = assert(program.setPrototype); + var mapPrototype = assert(program.mapPrototype); var lastId = 0; for (let [id, instance] of managedClasses) { assert(id == ++lastId); let flags: RTTIFlags = 0; - if (instance.prototype.extends(program.arrayPrototype)) { - let typeArguments = assert(instance.typeArguments); + if (instance.isAcyclic) flags |= RTTIFlags.ACYCLIC; + if (instance.prototype.extends(arrayPrototype)) { + let typeArguments = assert(instance.getTypeArgumentsTo(arrayPrototype)); assert(typeArguments.length == 1); flags |= RTTIFlags.ARRAY; flags |= RTTIFlags.VALUE_ALIGN_0 * typeToRuntimeFlags(typeArguments[0], program); - } else if (instance.prototype.extends(program.setPrototype)) { - let typeArguments = assert(instance.typeArguments); + } else if (instance.prototype.extends(setPrototype)) { + let typeArguments = assert(instance.getTypeArgumentsTo(setPrototype)); assert(typeArguments.length == 1); flags |= RTTIFlags.SET; flags |= RTTIFlags.VALUE_ALIGN_0 * typeToRuntimeFlags(typeArguments[0], program); - } else if (instance.prototype.extends(program.mapPrototype)) { - let typeArguments = assert(instance.typeArguments); + } else if (instance.prototype.extends(mapPrototype)) { + let typeArguments = assert(instance.getTypeArgumentsTo(mapPrototype)); assert(typeArguments.length == 2); flags |= RTTIFlags.MAP; flags |= RTTIFlags.KEY_ALIGN_0 * typeToRuntimeFlags(typeArguments[0], program); diff --git a/src/program.ts b/src/program.ts index 9fee86cffd..2d33919d8c 100644 --- a/src/program.ts +++ b/src/program.ts @@ -2971,9 +2971,8 @@ export class ClassPrototype extends DeclaredElement { /** Tests if this prototype extends the specified. */ extends(basePtototype: ClassPrototype | null): bool { var current: ClassPrototype | null = this; - do { - if (current === basePtototype) return true; - } while (current = current.basePrototype); + do if (current === basePtototype) return true; + while (current = current.basePrototype); return false; } @@ -3022,6 +3021,12 @@ export class ClassPrototype extends DeclaredElement { } } +const enum AcyclicState { + UNKNOWN, + ACYCLIC, + NOT_ACYCLIC +} + /** A resolved class. */ export class Class extends TypedElement { @@ -3041,6 +3046,8 @@ export class Class extends TypedElement { overloads: Map | null = null; /** Unique class id. */ private _id: u32 = 0; + /** Remembers acyclic state. */ + private _acyclic: AcyclicState = AcyclicState.UNKNOWN; /** Gets the unique runtime id of this class. Must be a managed class. */ get id(): u32 { @@ -3225,6 +3232,100 @@ export class Class extends TypedElement { assert(false); return 0; } + + /** Tests if this class extends the specified prototype. */ + extends(prototype: ClassPrototype): bool { + return this.prototype.extends(prototype); + } + + /** Gets the concrete type arguments to the specified extendend prototype. */ + getTypeArgumentsTo(extendedPrototype: ClassPrototype): Type[] | null { + var current: Class | null = this; + do if (current.prototype === extendedPrototype) return current.typeArguments; + while (current = current.base); + return null; + } + + /** Tests if this class is inherently acyclic. */ + get isAcyclic(): bool { + var acyclic = this._acyclic; + if (acyclic == AcyclicState.UNKNOWN) { + let hasCycle = this.cyclesTo(this); + if (hasCycle) this._acyclic = acyclic = AcyclicState.NOT_ACYCLIC; + else this._acyclic = acyclic = AcyclicState.ACYCLIC; + } + return acyclic == AcyclicState.ACYCLIC; + } + + /** Tests if this class potentially forms a reference cycle to another one. */ + private cyclesTo(other: Class, except: Set = new Set()): bool { + if (except.has(this)) return false; + except.add(this); // don't recurse indefinitely + + // Find out if any field references 'other' directly or indirectly + var current: Class | null; + var members = this.members; + if (members) { + for (let member of members.values()) { + if ( + member.kind == ElementKind.FIELD && + (current = (member).type.classReference) !== null && + ( + current === other || + current.cyclesTo(other, except) + ) + ) return true; + } + } + + // Do the same for non-field data + var basePrototype: ClassPrototype | null; + + // Arrayother?> + if ((basePrototype = this.program.arrayPrototype) && this.prototype.extends(basePrototype)) { + let typeArguments = assert(this.getTypeArgumentsTo(basePrototype)); + assert(typeArguments.length == 1); + if ( + (current = typeArguments[0].classReference) !== null && + ( + current === other || + current.cyclesTo(other, except) + ) + ) return true; + + // Setother?> + } else if ((basePrototype = this.program.setPrototype) && this.prototype.extends(basePrototype)) { + let typeArguments = assert(this.getTypeArgumentsTo(basePrototype)); + assert(typeArguments.length == 1); + if ( + (current = typeArguments[0].classReference) !== null && + ( + current === other || + current.cyclesTo(other, except) + ) + ) return true; + + // Mapother?,V->other?> + } else if ((basePrototype = this.program.mapPrototype) && this.prototype.extends(basePrototype)) { + let typeArguments = assert(this.getTypeArgumentsTo(basePrototype)); + assert(typeArguments.length == 2); + if ( + (current = typeArguments[0].classReference) !== null && + ( + current === other || + current.cyclesTo(other, except) + ) + ) return true; + if ( + (current = typeArguments[1].classReference) !== null && + ( + current === other || + current.cyclesTo(other, except) + ) + ) return true; + } + return false; + } } /** A yet unresolved interface. */ diff --git a/std/assembly/common/rtti.ts b/std/assembly/common/rtti.ts index fd75483227..cda38fd396 100644 --- a/std/assembly/common/rtti.ts +++ b/std/assembly/common/rtti.ts @@ -29,32 +29,34 @@ export const enum RTTIFlags { SET = 1 << 1, /** Type is a `Map`. */ MAP = 1 << 2, + /** Type is inherently acyclic. */ + ACYCLIC = 1 << 3, /** Value alignment of 1 byte. */ - VALUE_ALIGN_0 = 1 << 3, + VALUE_ALIGN_0 = 1 << 4, /** Value alignment of 2 bytes. */ - VALUE_ALIGN_1 = 1 << 4, + VALUE_ALIGN_1 = 1 << 5, /** Value alignment of 4 bytes. */ - VALUE_ALIGN_2 = 1 << 5, + VALUE_ALIGN_2 = 1 << 6, /** Value alignment of 8 bytes. */ - VALUE_ALIGN_3 = 1 << 6, + VALUE_ALIGN_3 = 1 << 7, /** Value alignment of 16 bytes. */ - VALUE_ALIGN_4 = 1 << 7, + VALUE_ALIGN_4 = 1 << 8, /** Value type is nullable. */ - VALUE_NULLABLE = 1 << 8, + VALUE_NULLABLE = 1 << 9, /** Value type is managed. */ - VALUE_MANAGED = 1 << 9, + VALUE_MANAGED = 1 << 10, /** Key alignment of 1 byte. */ - KEY_ALIGN_0 = 1 << 10, + KEY_ALIGN_0 = 1 << 11, /** Key alignment of 2 bytes. */ - KEY_ALIGN_1 = 1 << 11, + KEY_ALIGN_1 = 1 << 12, /** Key alignment of 4 bytes. */ - KEY_ALIGN_2 = 1 << 12, + KEY_ALIGN_2 = 1 << 13, /** Key alignment of 8 bytes. */ - KEY_ALIGN_3 = 1 << 13, + KEY_ALIGN_3 = 1 << 14, /** Key alignment of 16 bytes. */ - KEY_ALIGN_4 = 1 << 14, + KEY_ALIGN_4 = 1 << 15, /** Key type is nullable. */ - KEY_NULLABLE = 1 << 15, + KEY_NULLABLE = 1 << 16, /** Key type is managed. */ - KEY_MANAGED = 1 << 16 + KEY_MANAGED = 1 << 17 } diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 0723159b09..6adfb1b26e 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -72,7 +72,7 @@ export namespace runtime { return newObject(byteLength, __runtime_id()); } - /** Allocates and registers a new `Array` of the specified kind using the given backing buffer.*/ + /** Allocates and registers a new `Array` of the specified kind using the given backing buffer. */ // @ts-ignore: decorator @unsafe export function newArray(id: u32, buffer: usize): usize { diff --git a/tests/compiler/runtime-arena.optimized.wat b/tests/compiler/runtime-arena.optimized.wat index ef8780ace5..84b7f875cc 100644 --- a/tests/compiler/runtime-arena.optimized.wat +++ b/tests/compiler/runtime-arena.optimized.wat @@ -8,8 +8,7 @@ (memory $0 1) (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (data (i32.const 56) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 96) "\11") - (data (i32.const 232) "!\00\00\00\0e") + (data (i32.const 96) "\11\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) @@ -245,7 +244,7 @@ i32.load end local.tee $3 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -281,7 +280,7 @@ i32.shr_u i32.store offset=12 local.get $3 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/runtime-arena.untouched.wat b/tests/compiler/runtime-arena.untouched.wat index cdcc6943b7..0930f7a27c 100644 --- a/tests/compiler/runtime-arena.untouched.wat +++ b/tests/compiler/runtime-arena.untouched.wat @@ -8,7 +8,7 @@ (memory $0 1) (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 56) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 96) "\11\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00") + (data (i32.const 96) "\11\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) @@ -280,7 +280,7 @@ call $~lib/runtime/runtime.flags local.set $2 local.get $2 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -316,7 +316,7 @@ i32.shr_u i32.store offset=12 local.get $2 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/runtime-default.optimized.wat b/tests/compiler/runtime-default.optimized.wat index 29ef92283f..bbe9419dd1 100644 --- a/tests/compiler/runtime-default.optimized.wat +++ b/tests/compiler/runtime-default.optimized.wat @@ -13,8 +13,7 @@ (data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") (data (i32.const 72) "\10\00\00\00(") (data (i32.const 88) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 128) "\12") - (data (i32.const 264) "!\00\00\00\0e") + (data (i32.const 128) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08") (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) @@ -1486,7 +1485,7 @@ i32.load end local.tee $0 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -1533,7 +1532,7 @@ i32.shr_u i32.store offset=12 local.get $0 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/runtime-default.untouched.wat b/tests/compiler/runtime-default.untouched.wat index 0259d404ad..377157bd4b 100644 --- a/tests/compiler/runtime-default.untouched.wat +++ b/tests/compiler/runtime-default.untouched.wat @@ -11,7 +11,7 @@ (memory $0 1) (data (i32.const 8) "\10\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") (data (i32.const 72) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 128) "\12\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 128) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -1787,7 +1787,7 @@ call $~lib/runtime/runtime.flags local.set $2 local.get $2 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -1838,7 +1838,7 @@ i32.shr_u i32.store offset=12 local.get $2 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/runtime/flags.optimized.wat b/tests/compiler/runtime/flags.optimized.wat index ed72b50725..98c86df6d5 100644 --- a/tests/compiler/runtime/flags.optimized.wat +++ b/tests/compiler/runtime/flags.optimized.wat @@ -15,9 +15,11 @@ (data (i32.const 72) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") (data (i32.const 120) "\11\00\00\00(") (data (i32.const 136) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 176) "+") - (data (i32.const 320) "\t\00\00\00\0f\00\00\00\11\00\00\00\0f\00\00\00!\00\00\00\0f\00\00\00A\00\00\00\0f\00\00\00\81\00\00\00\0f") - (data (i32.const 368) "!\02\00\00\0f\00\00\00!\03\00\00\0f\00\00\00\n\00\00\00\00\00\00\00\12\00\00\00\00\00\00\00\"\00\00\00\00\00\00\00B\00\00\00\00\00\00\00\82\00\00\00\00\00\00\00\"\02\00\00\00\00\00\00\"\03\00\00\00\00\00\00\0c@\00\00\00\00\00\00\14 \00\00\00\00\00\00$\10\00\00\00\00\00\00D\08\00\00\00\00\00\00\84\04\00\00\00\00\00\00\0c\10\01\00\00\00\00\00\0c\90\01\00\00\00\00\00$\06\00\00\00\00\00\00$\07\00\00\00\00\00\00$\93\01") + (data (i32.const 176) ";\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\19\00\00\00\0f\00\00\00)\00\00\00\0f\00\00\00I\00\00\00\0f\00\00\00\89\00\00\00\0f\00\00\00\t\01\00\00\0f\00\00\00\08\00\00\00\00\00\00\00I\04\00\00\0f\00\00\00I\06\00\00\0f\00\00\00\1a\00\00\00\00\00\00\00*\00\00\00\00\00\00\00J\00\00\00\00\00\00\00\8a\00\00\00\00\00\00\00\n\01\00\00\00\00\00\00J\04\00\00\00\00\00\00J\06\00\00\00\00\00\00\1c\80\00\00\00\00\00\00,@\00\00\00\00\00\00L \00\00\00\00\00\00\8c\10\00\00\00\00\00\00\0c\t\00\00\00\00\00\00\1c \02\00\00\00\00\00\1c \03\00\00\00\00\00L\0c\00\00\00\00\00\00L\0e\00\00\00\00\00\00L&\03\00\00\00\00\00\08") + (data (i32.const 560) "A\04\00\00\0f\00\00\00\08") + (data (i32.const 584) "B\04\00\00\00\00\00\00\08") + (data (i32.const 608) "D \02") + (data (i32.const 624) "D$\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08") (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) @@ -74,7 +76,7 @@ i32.const 320 i32.load end - i32.const 9 + i32.const 25 i32.ne if i32.const 0 @@ -96,7 +98,7 @@ i32.const 328 i32.load end - i32.const 17 + i32.const 41 i32.ne if i32.const 0 @@ -118,7 +120,7 @@ i32.const 336 i32.load end - i32.const 33 + i32.const 73 i32.ne if i32.const 0 @@ -140,7 +142,7 @@ i32.const 344 i32.load end - i32.const 65 + i32.const 137 i32.ne if i32.const 0 @@ -162,7 +164,7 @@ i32.const 352 i32.load end - i32.const 129 + i32.const 265 i32.ne if i32.const 0 @@ -184,7 +186,7 @@ i32.const 368 i32.load end - i32.const 545 + i32.const 1097 i32.ne if i32.const 0 @@ -206,7 +208,7 @@ i32.const 376 i32.load end - i32.const 801 + i32.const 1609 i32.ne if i32.const 0 @@ -228,7 +230,7 @@ i32.const 384 i32.load end - i32.const 10 + i32.const 26 i32.ne if i32.const 0 @@ -250,7 +252,7 @@ i32.const 392 i32.load end - i32.const 18 + i32.const 42 i32.ne if i32.const 0 @@ -272,7 +274,7 @@ i32.const 400 i32.load end - i32.const 34 + i32.const 74 i32.ne if i32.const 0 @@ -294,7 +296,7 @@ i32.const 408 i32.load end - i32.const 66 + i32.const 138 i32.ne if i32.const 0 @@ -316,7 +318,7 @@ i32.const 416 i32.load end - i32.const 130 + i32.const 266 i32.ne if i32.const 0 @@ -338,7 +340,7 @@ i32.const 424 i32.load end - i32.const 546 + i32.const 1098 i32.ne if i32.const 0 @@ -360,7 +362,7 @@ i32.const 432 i32.load end - i32.const 802 + i32.const 1610 i32.ne if i32.const 0 @@ -382,7 +384,7 @@ i32.const 440 i32.load end - i32.const 16396 + i32.const 32796 i32.ne if i32.const 0 @@ -404,7 +406,7 @@ i32.const 448 i32.load end - i32.const 8212 + i32.const 16428 i32.ne if i32.const 0 @@ -426,7 +428,7 @@ i32.const 456 i32.load end - i32.const 4132 + i32.const 8268 i32.ne if i32.const 0 @@ -448,7 +450,7 @@ i32.const 464 i32.load end - i32.const 2116 + i32.const 4236 i32.ne if i32.const 0 @@ -470,7 +472,7 @@ i32.const 472 i32.load end - i32.const 1156 + i32.const 2316 i32.ne if i32.const 0 @@ -492,7 +494,7 @@ i32.const 480 i32.load end - i32.const 69644 + i32.const 139292 i32.ne if i32.const 0 @@ -514,7 +516,7 @@ i32.const 488 i32.load end - i32.const 102412 + i32.const 204828 i32.ne if i32.const 0 @@ -536,7 +538,7 @@ i32.const 496 i32.load end - i32.const 1572 + i32.const 3148 i32.ne if i32.const 0 @@ -558,7 +560,7 @@ i32.const 504 i32.load end - i32.const 1828 + i32.const 3660 i32.ne if i32.const 0 @@ -580,7 +582,215 @@ i32.const 512 i32.load end - i32.const 103204 + i32.const 206412 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 26 ;) (type $FUNCSIG$v) + i32.const 43 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 520 + i32.load + end + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 27 ;) (type $FUNCSIG$v) + i32.const 44 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 528 + i32.load + end + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 28 ;) (type $FUNCSIG$v) + i32.const 45 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 536 + i32.load + end + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 29 ;) (type $FUNCSIG$v) + i32.const 47 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 552 + i32.load + end + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 30 ;) (type $FUNCSIG$v) + i32.const 49 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 568 + i32.load + end + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 31 ;) (type $FUNCSIG$v) + i32.const 50 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 576 + i32.load + end + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 32 ;) (type $FUNCSIG$v) + i32.const 52 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 592 + i32.load + end + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 33 ;) (type $FUNCSIG$v) + i32.const 53 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 600 + i32.load + end + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 34 ;) (type $FUNCSIG$v) + i32.const 55 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 616 + i32.load + end + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 35 ;) (type $FUNCSIG$v) + i32.const 57 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 632 + i32.load + end + i32.const 8 i32.ne if i32.const 0 @@ -591,7 +801,29 @@ unreachable end ) - (func $start:runtime/flags (; 26 ;) (type $FUNCSIG$v) + (func $runtime/flags/test (; 36 ;) (type $FUNCSIG$v) + i32.const 58 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 640 + i32.load + end + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $start:runtime/flags (; 37 ;) (type $FUNCSIG$v) block call $runtime/flags/test<~lib/array/Array> end @@ -664,8 +896,41 @@ block call $runtime/flags/test<~lib/map/Map> end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end ) - (func $~lib/runtime/runtime.instanceof (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.instanceof (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -700,7 +965,7 @@ end i32.const 0 ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.const 22 i32.ge_u @@ -720,7 +985,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 29 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 40 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 22 i32.ge_u @@ -755,7 +1020,7 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Block#get:right (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const -4 @@ -789,7 +1054,7 @@ end local.get $0 ) - (func $~lib/allocator/tlsf/fls (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -805,7 +1070,7 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -839,7 +1104,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 i32.const 22 i32.ge_u @@ -858,7 +1123,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -987,7 +1252,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.const 2 @@ -1017,7 +1282,7 @@ end local.get $0 ) - (func $~lib/allocator/tlsf/Root#setJump (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 47 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 i32.load i32.const 1 @@ -1062,7 +1327,7 @@ local.get $0 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 48 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1292,7 +1557,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1415,7 +1680,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#insert ) - (func $~lib/allocator/tlsf/ffs (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -1429,7 +1694,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -1541,7 +1806,7 @@ end end ) - (func $~lib/allocator/tlsf/Root#use (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1652,7 +1917,7 @@ i32.const 8 i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1678,14 +1943,14 @@ if unreachable end - i32.const 528 + i32.const 656 local.set $2 - i32.const 528 + i32.const 656 global.set $~lib/allocator/tlsf/ROOT i32.const 2912 i32.const 0 i32.store - i32.const 528 + i32.const 656 i32.const 0 i32.store i32.const 0 @@ -1695,7 +1960,7 @@ i32.const 22 i32.lt_u if - i32.const 528 + i32.const 656 local.get $1 i32.const 0 call $~lib/allocator/tlsf/Root#setSLMap @@ -1706,7 +1971,7 @@ i32.const 32 i32.lt_u if - i32.const 528 + i32.const 656 local.get $1 local.get $3 i32.const 0 @@ -1725,8 +1990,8 @@ br $repeat|0 end end - i32.const 528 - i32.const 3448 + i32.const 656 + i32.const 3576 current_memory i32.const 16 i32.shl @@ -1822,7 +2087,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/util/runtime/allocate (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 @@ -1849,7 +2114,7 @@ i32.const 16 i32.add ) - (func $~lib/collector/itcm/maybeInit (; 44 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/maybeInit (; 55 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/collector/itcm/state i32.eqz @@ -1892,7 +2157,7 @@ global.set $~lib/collector/itcm/state end ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 56 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -1920,7 +2185,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/collector/itcm/__ref_register (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_register (; 57 ;) (type $FUNCSIG$vi) (param $0 i32) call $~lib/collector/itcm/maybeInit local.get $0 i32.const 16 @@ -1937,10 +2202,10 @@ local.get $0 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/util/runtime/register (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 528 + i32.const 656 i32.le_u if i32.const 0 @@ -1974,25 +2239,25 @@ end local.get $0 ) - (func $~lib/runtime/runtime.newObject (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.newObject (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/util/runtime/allocate local.get $1 call $~lib/util/runtime/register ) - (func $~lib/runtime/runtime.newString (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.newString (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1 i32.shl i32.const 17 call $~lib/runtime/runtime.newObject ) - (func $~lib/runtime/runtime.newArrayBuffer (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.newArrayBuffer (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 16 call $~lib/runtime/runtime.newObject ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 51 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) global.get $~lib/collector/itcm/iter @@ -2032,7 +2297,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/__ref_link (; 52 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/__ref_link (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) call $~lib/collector/itcm/maybeInit global.get $~lib/collector/itcm/white @@ -2063,7 +2328,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/runtime/runtime.newArray (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2091,7 +2356,7 @@ i32.load end local.tee $0 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -2138,7 +2403,7 @@ i32.shr_u i32.store offset=12 local.get $0 - i32.const 512 + i32.const 1024 i32.and if local.get $1 @@ -2168,15 +2433,15 @@ end local.get $2 ) - (func $~lib/runtime/runtime.retain (; 54 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.retain (; 65 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/runtime/ROOT call $~lib/collector/itcm/__ref_link ) - (func $~lib/runtime/runtime.release (; 55 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.release (; 66 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/allocator/tlsf/__mem_free (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 67 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2214,7 +2479,7 @@ end end ) - (func $~lib/collector/itcm/step (; 57 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/step (; 68 ;) (type $FUNCSIG$v) (local $0 i32) block $break|0 block $case3|0 @@ -2300,7 +2565,7 @@ i32.and global.set $~lib/collector/itcm/iter local.get $0 - i32.const 528 + i32.const 656 i32.ge_u if local.get $0 @@ -2319,7 +2584,7 @@ end end ) - (func $~lib/collector/itcm/__ref_collect (; 58 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/__ref_collect (; 69 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/maybeInit loop $continue|0 global.get $~lib/collector/itcm/state @@ -2338,18 +2603,18 @@ br_if $continue|1 end ) - (func $~lib/runtime/runtime.collect (; 59 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.collect (; 70 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/__ref_collect ) - (func $start (; 60 ;) (type $FUNCSIG$v) + (func $start (; 71 ;) (type $FUNCSIG$v) call $start:runtime/flags i32.const 0 call $~lib/util/runtime/allocate - i32.const 43 + i32.const 59 call $~lib/util/runtime/register global.set $~lib/runtime/ROOT ) - (func $~lib/collector/itcm/__ref_mark (; 61 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_mark (; 72 ;) (type $FUNCSIG$vi) (param $0 i32) call $~lib/collector/itcm/maybeInit global.get $~lib/collector/itcm/white local.get $0 @@ -2365,7 +2630,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/runtime/__gc_mark_roots (; 62 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__gc_mark_roots (; 73 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/runtime/ROOT local.tee $0 @@ -2374,7 +2639,7 @@ call $~lib/collector/itcm/__ref_mark end ) - (func $~lib/array/Array#__traverse (; 63 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#__traverse (; 74 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2407,7 +2672,7 @@ end end ) - (func $~lib/array/Array#__traverse (; 64 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#__traverse (; 75 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2443,7 +2708,7 @@ end end ) - (func $~lib/set/Set#__traverse (; 65 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#__traverse (; 76 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2487,7 +2752,7 @@ end end ) - (func $~lib/set/Set#__traverse (; 66 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#__traverse (; 77 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2534,7 +2799,7 @@ end end ) - (func $~lib/map/Map#__traverse (; 67 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 78 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2578,7 +2843,7 @@ end end ) - (func $~lib/map/Map#__traverse (; 68 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 79 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2625,7 +2890,7 @@ end end ) - (func $~lib/map/Map#__traverse (; 69 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 80 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2669,7 +2934,7 @@ end end ) - (func $~lib/map/Map#__traverse (; 70 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 81 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2716,7 +2981,7 @@ end end ) - (func $~lib/map/Map#__traverse (; 71 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 82 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2773,69 +3038,330 @@ end end ) - (func $~lib/runtime/__gc_mark_members (; 72 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__traverse (; 83 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=4 + local.tee $1 + local.get $0 + i32.load offset=8 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load + local.tee $2 + call $~lib/collector/itcm/__ref_mark + i32.const 47 + local.get $2 + call $~lib/runtime/__gc_mark_members + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/set/Set#__traverse (; 84 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 3 + i32.shl + local.get $1 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load + local.tee $2 + call $~lib/collector/itcm/__ref_mark + i32.const 50 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/map/Map#__traverse (; 85 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 12 + i32.mul + local.get $1 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load + local.tee $2 + call $~lib/collector/itcm/__ref_mark + i32.const 53 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.const 12 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/map/Map#__traverse (; 86 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 12 + i32.mul + local.get $1 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load offset=4 + local.tee $2 + call $~lib/collector/itcm/__ref_mark + i32.const 55 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.const 12 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/runtime/__gc_mark_members (; 87 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $folding-inner1 block $folding-inner0 block $invalid block $~lib/runtime/Root - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/set/Set - block $~lib/set/Set - block $~lib/array/Array - block $~lib/array/Array - block $runtime/flags/Ref - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - block $~lib/arraybuffer/ArrayBufferView - block $~lib/vector/V128 - block $~lib/number/F64 - block $~lib/number/F32 - block $~lib/number/Bool - block $~lib/number/Usize - block $~lib/number/U64 - block $~lib/number/U32 - block $~lib/number/U16 - block $~lib/number/U8 - block $~lib/number/Isize - block $~lib/number/I64 - block $~lib/number/I32 - block $~lib/number/I16 - block $~lib/number/I8 - local.get $0 - i32.const 1 - i32.sub - br_table $~lib/number/I8 $~lib/number/I16 $~lib/number/I32 $~lib/number/I64 $~lib/number/Isize $~lib/number/U8 $~lib/number/U16 $~lib/number/U32 $~lib/number/U64 $~lib/number/Usize $~lib/number/Bool $~lib/number/F32 $~lib/number/F64 $~lib/vector/V128 $~lib/arraybuffer/ArrayBufferView $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $runtime/flags/Ref $~lib/array/Array $~lib/array/Array $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $~lib/set/Set $~lib/set/Set $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/runtime/Root $invalid + block $runtime/flags/InnerCycleMapValue + block $runtime/flags/InnerCycleMapKey + block $~lib/map/Map + block $runtime/flags/IndirectCycleMapValue + block $~lib/map/Map + block $runtime/flags/IndirectCycleMapKey + block $runtime/flags/InnerCycleSet + block $~lib/set/Set + block $runtime/flags/IndirectCycleSet + block $runtime/flags/InnerCycleArray + block $~lib/array/Array + block $runtime/flags/IndirectCycleArray + block $runtime/flags/IndirectCycleBack + block $runtime/flags/IndirectCycle + block $runtime/flags/DirectCycle + block $runtime/flags/NoCycle + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/set/Set + block $~lib/set/Set + block $~lib/array/Array + block $~lib/array/Array + block $runtime/flags/Ref + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/arraybuffer/ArrayBufferView + block $~lib/vector/V128 + block $~lib/number/F64 + block $~lib/number/F32 + block $~lib/number/Bool + block $~lib/number/Usize + block $~lib/number/U64 + block $~lib/number/U32 + block $~lib/number/U16 + block $~lib/number/U8 + block $~lib/number/Isize + block $~lib/number/I64 + block $~lib/number/I32 + block $~lib/number/I16 + block $~lib/number/I8 + local.get $0 + i32.const 1 + i32.sub + br_table $~lib/number/I8 $~lib/number/I16 $~lib/number/I32 $~lib/number/I64 $~lib/number/Isize $~lib/number/U8 $~lib/number/U16 $~lib/number/U32 $~lib/number/U64 $~lib/number/Usize $~lib/number/Bool $~lib/number/F32 $~lib/number/F64 $~lib/vector/V128 $~lib/arraybuffer/ArrayBufferView $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $runtime/flags/Ref $~lib/array/Array $~lib/array/Array $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $~lib/set/Set $~lib/set/Set $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $runtime/flags/NoCycle $runtime/flags/DirectCycle $runtime/flags/IndirectCycle $runtime/flags/IndirectCycleBack $runtime/flags/IndirectCycleArray $~lib/array/Array $runtime/flags/InnerCycleArray $runtime/flags/IndirectCycleSet $~lib/set/Set $runtime/flags/InnerCycleSet $runtime/flags/IndirectCycleMapKey $~lib/map/Map $runtime/flags/IndirectCycleMapValue $~lib/map/Map $runtime/flags/InnerCycleMapKey $runtime/flags/InnerCycleMapValue $~lib/runtime/Root $invalid + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 16 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + return + end + return end return end return end + local.get $1 + call $~lib/array/Array#__traverse return end + local.get $1 + call $~lib/array/Array#__traverse return end + local.get $1 + call $~lib/set/Set#__traverse return end + local.get $1 + call $~lib/set/Set#__traverse return end + local.get $1 + call $~lib/map/Map#__traverse return end + local.get $1 + call $~lib/map/Map#__traverse return end + local.get $1 + call $~lib/map/Map#__traverse return end + local.get $1 + call $~lib/map/Map#__traverse return end + local.get $1 + call $~lib/map/Map#__traverse return end return end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 44 + local.get $0 + call $~lib/runtime/__gc_mark_members + end return end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 46 + local.get $0 + call $~lib/runtime/__gc_mark_members + end return end local.get $1 @@ -2844,52 +3370,122 @@ if local.get $0 call $~lib/collector/itcm/__ref_mark - i32.const 16 + i32.const 45 local.get $0 call $~lib/runtime/__gc_mark_members end return end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 48 + local.get $0 + call $~lib/runtime/__gc_mark_members + end return end + local.get $1 + call $~lib/array/Array#__traverse return end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 47 + local.get $0 + call $~lib/runtime/__gc_mark_members + end return end local.get $1 - call $~lib/array/Array#__traverse + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 51 + local.get $0 + call $~lib/runtime/__gc_mark_members + end return end local.get $1 - call $~lib/array/Array#__traverse + call $~lib/set/Set#__traverse return end local.get $1 - call $~lib/set/Set#__traverse + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 50 + local.get $0 + call $~lib/runtime/__gc_mark_members + end return end local.get $1 - call $~lib/set/Set#__traverse + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 54 + local.get $0 + call $~lib/runtime/__gc_mark_members + end return end local.get $1 - call $~lib/map/Map#__traverse + call $~lib/map/Map#__traverse return end local.get $1 - call $~lib/map/Map#__traverse + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 56 + local.get $0 + call $~lib/runtime/__gc_mark_members + end return end local.get $1 - call $~lib/map/Map#__traverse + call $~lib/map/Map#__traverse return end local.get $1 - call $~lib/map/Map#__traverse + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 53 + local.get $0 + call $~lib/runtime/__gc_mark_members + end return end local.get $1 - call $~lib/map/Map#__traverse + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 55 + local.get $0 + call $~lib/runtime/__gc_mark_members + end return end return @@ -2908,7 +3504,7 @@ i32.load offset=8 call $~lib/collector/itcm/__ref_mark ) - (func $null (; 73 ;) (type $FUNCSIG$v) + (func $null (; 88 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/runtime/flags.ts b/tests/compiler/runtime/flags.ts index 7c0eed64fa..2c642c9a7d 100644 --- a/tests/compiler/runtime/flags.ts +++ b/tests/compiler/runtime/flags.ts @@ -9,34 +9,113 @@ function test(flags: RTTIFlags): void { ); } +// structure flags + class Ref {} const VALUE_ALIGN_REF = sizeof() == 4 ? RTTIFlags.VALUE_ALIGN_2 : RTTIFlags.VALUE_ALIGN_3; const KEY_ALIGN_REF = sizeof() == 4 ? RTTIFlags.KEY_ALIGN_2 : RTTIFlags.KEY_ALIGN_3; -test>(RTTIFlags.ARRAY | RTTIFlags.VALUE_ALIGN_0); -test>(RTTIFlags.ARRAY | RTTIFlags.VALUE_ALIGN_1); -test>(RTTIFlags.ARRAY | RTTIFlags.VALUE_ALIGN_2); -test>(RTTIFlags.ARRAY | RTTIFlags.VALUE_ALIGN_3); -test>(RTTIFlags.ARRAY | RTTIFlags.VALUE_ALIGN_4); -test>(RTTIFlags.ARRAY | VALUE_ALIGN_REF | RTTIFlags.VALUE_MANAGED); -test>(RTTIFlags.ARRAY | VALUE_ALIGN_REF | RTTIFlags.VALUE_NULLABLE | RTTIFlags.VALUE_MANAGED); - -test>(RTTIFlags.SET | RTTIFlags.VALUE_ALIGN_0); -test>(RTTIFlags.SET | RTTIFlags.VALUE_ALIGN_1); -test>(RTTIFlags.SET | RTTIFlags.VALUE_ALIGN_2); -test>(RTTIFlags.SET | RTTIFlags.VALUE_ALIGN_3); -test>(RTTIFlags.SET | RTTIFlags.VALUE_ALIGN_4); -test>(RTTIFlags.SET | VALUE_ALIGN_REF | RTTIFlags.VALUE_MANAGED); -test>(RTTIFlags.SET | VALUE_ALIGN_REF | RTTIFlags.VALUE_NULLABLE | RTTIFlags.VALUE_MANAGED); - -test>(RTTIFlags.MAP | RTTIFlags.KEY_ALIGN_4 | RTTIFlags.VALUE_ALIGN_0); -test>(RTTIFlags.MAP | RTTIFlags.KEY_ALIGN_3 | RTTIFlags.VALUE_ALIGN_1); -test>(RTTIFlags.MAP | RTTIFlags.KEY_ALIGN_2 | RTTIFlags.VALUE_ALIGN_2); -test>(RTTIFlags.MAP | RTTIFlags.KEY_ALIGN_1 | RTTIFlags.VALUE_ALIGN_3); -test>(RTTIFlags.MAP | RTTIFlags.KEY_ALIGN_0 | RTTIFlags.VALUE_ALIGN_4); -test>(RTTIFlags.MAP | KEY_ALIGN_REF | RTTIFlags.KEY_MANAGED | RTTIFlags.VALUE_ALIGN_0); -test>(RTTIFlags.MAP |KEY_ALIGN_REF | RTTIFlags.KEY_NULLABLE | RTTIFlags.KEY_MANAGED | RTTIFlags.VALUE_ALIGN_0); -test>(RTTIFlags.MAP | RTTIFlags.KEY_ALIGN_0 | RTTIFlags.VALUE_MANAGED | VALUE_ALIGN_REF); -test>(RTTIFlags.MAP | RTTIFlags.KEY_ALIGN_0 | RTTIFlags.VALUE_NULLABLE | RTTIFlags.VALUE_MANAGED | VALUE_ALIGN_REF); -test>(RTTIFlags.MAP | RTTIFlags.KEY_NULLABLE | RTTIFlags.KEY_MANAGED | KEY_ALIGN_REF | RTTIFlags.VALUE_NULLABLE | RTTIFlags.VALUE_MANAGED | VALUE_ALIGN_REF); +test>(RTTIFlags.ARRAY | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_0); +test>(RTTIFlags.ARRAY | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_1); +test>(RTTIFlags.ARRAY | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_2); +test>(RTTIFlags.ARRAY | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_3); +test>(RTTIFlags.ARRAY | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_4); +test>(RTTIFlags.ARRAY | RTTIFlags.ACYCLIC | VALUE_ALIGN_REF | RTTIFlags.VALUE_MANAGED); +test>(RTTIFlags.ARRAY | RTTIFlags.ACYCLIC | VALUE_ALIGN_REF | RTTIFlags.VALUE_NULLABLE | RTTIFlags.VALUE_MANAGED); + +test>(RTTIFlags.SET | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_0); +test>(RTTIFlags.SET | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_1); +test>(RTTIFlags.SET | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_2); +test>(RTTIFlags.SET | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_3); +test>(RTTIFlags.SET | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_4); +test>(RTTIFlags.SET | RTTIFlags.ACYCLIC | VALUE_ALIGN_REF | RTTIFlags.VALUE_MANAGED); +test>(RTTIFlags.SET | RTTIFlags.ACYCLIC | VALUE_ALIGN_REF | RTTIFlags.VALUE_NULLABLE | RTTIFlags.VALUE_MANAGED); + +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC | RTTIFlags.KEY_ALIGN_4 | RTTIFlags.VALUE_ALIGN_0); +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC | RTTIFlags.KEY_ALIGN_3 | RTTIFlags.VALUE_ALIGN_1); +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC | RTTIFlags.KEY_ALIGN_2 | RTTIFlags.VALUE_ALIGN_2); +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC | RTTIFlags.KEY_ALIGN_1 | RTTIFlags.VALUE_ALIGN_3); +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC | RTTIFlags.KEY_ALIGN_0 | RTTIFlags.VALUE_ALIGN_4); +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC | KEY_ALIGN_REF | RTTIFlags.KEY_MANAGED | RTTIFlags.VALUE_ALIGN_0); +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC |KEY_ALIGN_REF | RTTIFlags.KEY_NULLABLE | RTTIFlags.KEY_MANAGED | RTTIFlags.VALUE_ALIGN_0); +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC | RTTIFlags.KEY_ALIGN_0 | RTTIFlags.VALUE_MANAGED | VALUE_ALIGN_REF); +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC | RTTIFlags.KEY_ALIGN_0 | RTTIFlags.VALUE_NULLABLE | RTTIFlags.VALUE_MANAGED | VALUE_ALIGN_REF); +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC | RTTIFlags.KEY_NULLABLE | RTTIFlags.KEY_MANAGED | KEY_ALIGN_REF | RTTIFlags.VALUE_NULLABLE | RTTIFlags.VALUE_MANAGED | VALUE_ALIGN_REF); + +// cycle detection + +class NoCycle { + a: i32; +} + +test(RTTIFlags.ACYCLIC); + +class DirectCycle { + a: DirectCycle; +} + +test(RTTIFlags.NONE); + +class IndirectCycle { + a: IndirectCycleBack; +} +class IndirectCycleBack { + a: IndirectCycle; +} + +test(RTTIFlags.NONE); + +// array + +class IndirectCycleArray { + a: Array; +} + +test(RTTIFlags.NONE); + +class InnerCycleArray { + a: IndirectCycleArray; +} + +test(RTTIFlags.ACYCLIC); + +// set + +class IndirectCycleSet { + a: Set; +} + +test(RTTIFlags.NONE); + +class InnerCycleSet { + a: IndirectCycleSet; +} + +test(RTTIFlags.ACYCLIC); + +// map + +class IndirectCycleMapKey { + a: Map; +} + +test(RTTIFlags.NONE); + +class IndirectCycleMapValue { + a: Map; +} + +test(RTTIFlags.NONE); + +class InnerCycleMapKey { + a: IndirectCycleMapKey; +} + +test(RTTIFlags.ACYCLIC); + +class InnerCycleMapValue { + a: IndirectCycleMapValue; +} + +test(RTTIFlags.ACYCLIC); diff --git a/tests/compiler/runtime/flags.untouched.wat b/tests/compiler/runtime/flags.untouched.wat index 01061d0d6b..424ae076ff 100644 --- a/tests/compiler/runtime/flags.untouched.wat +++ b/tests/compiler/runtime/flags.untouched.wat @@ -12,11 +12,11 @@ (data (i32.const 8) "\11\00\00\00 \00\00\00\00\00\00\00\00\00\00\00r\00u\00n\00t\00i\00m\00e\00/\00f\00l\00a\00g\00s\00.\00t\00s\00") (data (i32.const 56) "\11\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") (data (i32.const 120) "\11\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 176) "+\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\0f\00\00\00\11\00\00\00\0f\00\00\00!\00\00\00\0f\00\00\00A\00\00\00\0f\00\00\00\81\00\00\00\0f\00\00\00\00\00\00\00\00\00\00\00!\02\00\00\0f\00\00\00!\03\00\00\0f\00\00\00\n\00\00\00\00\00\00\00\12\00\00\00\00\00\00\00\"\00\00\00\00\00\00\00B\00\00\00\00\00\00\00\82\00\00\00\00\00\00\00\"\02\00\00\00\00\00\00\"\03\00\00\00\00\00\00\0c@\00\00\00\00\00\00\14 \00\00\00\00\00\00$\10\00\00\00\00\00\00D\08\00\00\00\00\00\00\84\04\00\00\00\00\00\00\0c\10\01\00\00\00\00\00\0c\90\01\00\00\00\00\00$\06\00\00\00\00\00\00$\07\00\00\00\00\00\00$\93\01\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 176) ";\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\19\00\00\00\0f\00\00\00)\00\00\00\0f\00\00\00I\00\00\00\0f\00\00\00\89\00\00\00\0f\00\00\00\t\01\00\00\0f\00\00\00\08\00\00\00\00\00\00\00I\04\00\00\0f\00\00\00I\06\00\00\0f\00\00\00\1a\00\00\00\00\00\00\00*\00\00\00\00\00\00\00J\00\00\00\00\00\00\00\8a\00\00\00\00\00\00\00\n\01\00\00\00\00\00\00J\04\00\00\00\00\00\00J\06\00\00\00\00\00\00\1c\80\00\00\00\00\00\00,@\00\00\00\00\00\00L \00\00\00\00\00\00\8c\10\00\00\00\00\00\00\0c\t\00\00\00\00\00\00\1c \02\00\00\00\00\00\1c \03\00\00\00\00\00L\0c\00\00\00\00\00\00L\0e\00\00\00\00\00\00L&\03\00\00\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00A\04\00\00\0f\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00B\04\00\00\00\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00D \02\00\00\00\00\00\00\00\00\00\00\00\00\00D$\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $runtime/flags/VALUE_ALIGN_REF i32 (i32.const 32)) - (global $runtime/flags/KEY_ALIGN_REF i32 (i32.const 4096)) + (global $runtime/flags/VALUE_ALIGN_REF i32 (i32.const 64)) + (global $runtime/flags/KEY_ALIGN_REF i32 (i32.const 8192)) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) @@ -44,7 +44,7 @@ (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/runtime/RTTI_BASE i32 (i32.const 176)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 528)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 656)) (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) @@ -445,157 +445,392 @@ unreachable end ) - (func $start:runtime/flags (; 26 ;) (type $FUNCSIG$v) + (func $runtime/flags/test (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 43 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 44 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 45 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 47 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 49 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 50 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 52 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 53 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 55 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 57 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 58 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $start:runtime/flags (; 37 ;) (type $FUNCSIG$v) i32.const 1 i32.const 8 i32.or + i32.const 16 + i32.or call $runtime/flags/test<~lib/array/Array> i32.const 1 - i32.const 16 + i32.const 8 + i32.or + i32.const 32 i32.or call $runtime/flags/test<~lib/array/Array> i32.const 1 - i32.const 32 + i32.const 8 + i32.or + i32.const 64 i32.or call $runtime/flags/test<~lib/array/Array> i32.const 1 - i32.const 64 + i32.const 8 + i32.or + i32.const 128 i32.or call $runtime/flags/test<~lib/array/Array> i32.const 1 - i32.const 128 + i32.const 8 + i32.or + i32.const 256 i32.or call $runtime/flags/test<~lib/array/Array> i32.const 1 + i32.const 8 + i32.or global.get $runtime/flags/VALUE_ALIGN_REF i32.or - i32.const 512 + i32.const 1024 i32.or call $runtime/flags/test<~lib/array/Array> i32.const 1 - global.get $runtime/flags/VALUE_ALIGN_REF + i32.const 8 i32.or - i32.const 256 + global.get $runtime/flags/VALUE_ALIGN_REF i32.or i32.const 512 i32.or + i32.const 1024 + i32.or call $runtime/flags/test<~lib/array/Array> i32.const 2 i32.const 8 i32.or + i32.const 16 + i32.or call $runtime/flags/test<~lib/set/Set> i32.const 2 - i32.const 16 + i32.const 8 + i32.or + i32.const 32 i32.or call $runtime/flags/test<~lib/set/Set> i32.const 2 - i32.const 32 + i32.const 8 + i32.or + i32.const 64 i32.or call $runtime/flags/test<~lib/set/Set> i32.const 2 - i32.const 64 + i32.const 8 + i32.or + i32.const 128 i32.or call $runtime/flags/test<~lib/set/Set> i32.const 2 - i32.const 128 + i32.const 8 + i32.or + i32.const 256 i32.or call $runtime/flags/test<~lib/set/Set> i32.const 2 + i32.const 8 + i32.or global.get $runtime/flags/VALUE_ALIGN_REF i32.or - i32.const 512 + i32.const 1024 i32.or call $runtime/flags/test<~lib/set/Set> i32.const 2 - global.get $runtime/flags/VALUE_ALIGN_REF + i32.const 8 i32.or - i32.const 256 + global.get $runtime/flags/VALUE_ALIGN_REF i32.or i32.const 512 i32.or + i32.const 1024 + i32.or call $runtime/flags/test<~lib/set/Set> i32.const 4 - i32.const 16384 - i32.or i32.const 8 i32.or + i32.const 32768 + i32.or + i32.const 16 + i32.or call $runtime/flags/test<~lib/map/Map> i32.const 4 - i32.const 8192 + i32.const 8 i32.or - i32.const 16 + i32.const 16384 + i32.or + i32.const 32 i32.or call $runtime/flags/test<~lib/map/Map> i32.const 4 - i32.const 4096 + i32.const 8 i32.or - i32.const 32 + i32.const 8192 + i32.or + i32.const 64 i32.or call $runtime/flags/test<~lib/map/Map> i32.const 4 - i32.const 2048 + i32.const 8 i32.or - i32.const 64 + i32.const 4096 + i32.or + i32.const 128 i32.or call $runtime/flags/test<~lib/map/Map> i32.const 4 - i32.const 1024 + i32.const 8 i32.or - i32.const 128 + i32.const 2048 + i32.or + i32.const 256 i32.or call $runtime/flags/test<~lib/map/Map> i32.const 4 + i32.const 8 + i32.or global.get $runtime/flags/KEY_ALIGN_REF i32.or - i32.const 65536 + i32.const 131072 i32.or - i32.const 8 + i32.const 16 i32.or call $runtime/flags/test<~lib/map/Map> i32.const 4 - global.get $runtime/flags/KEY_ALIGN_REF + i32.const 8 i32.or - i32.const 32768 + global.get $runtime/flags/KEY_ALIGN_REF i32.or i32.const 65536 i32.or - i32.const 8 + i32.const 131072 + i32.or + i32.const 16 i32.or call $runtime/flags/test<~lib/map/Map> i32.const 4 - i32.const 1024 + i32.const 8 i32.or - i32.const 512 + i32.const 2048 + i32.or + i32.const 1024 i32.or global.get $runtime/flags/VALUE_ALIGN_REF i32.or call $runtime/flags/test<~lib/map/Map> i32.const 4 - i32.const 1024 + i32.const 8 i32.or - i32.const 256 + i32.const 2048 i32.or i32.const 512 i32.or + i32.const 1024 + i32.or global.get $runtime/flags/VALUE_ALIGN_REF i32.or call $runtime/flags/test<~lib/map/Map> i32.const 4 - i32.const 32768 + i32.const 8 i32.or i32.const 65536 i32.or - global.get $runtime/flags/KEY_ALIGN_REF + i32.const 131072 i32.or - i32.const 256 + global.get $runtime/flags/KEY_ALIGN_REF i32.or i32.const 512 i32.or + i32.const 1024 + i32.or global.get $runtime/flags/VALUE_ALIGN_REF i32.or call $runtime/flags/test<~lib/map/Map> + i32.const 8 + call $runtime/flags/test + i32.const 0 + call $runtime/flags/test + i32.const 0 + call $runtime/flags/test + i32.const 0 + call $runtime/flags/test + i32.const 8 + call $runtime/flags/test + i32.const 0 + call $runtime/flags/test + i32.const 8 + call $runtime/flags/test + i32.const 0 + call $runtime/flags/test + i32.const 0 + call $runtime/flags/test + i32.const 8 + call $runtime/flags/test + i32.const 8 + call $runtime/flags/test ) - (func $~lib/runtime/runtime.instanceof (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.instanceof (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -635,7 +870,7 @@ end i32.const 0 ) - (func $~lib/util/runtime/adjust (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -647,12 +882,12 @@ i32.sub i32.shl ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 40 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 0 local.get $1 i32.store offset=2912 ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -673,7 +908,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 31 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 42 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -710,11 +945,11 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Root#get:tailRef (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.load offset=2912 ) - (func $~lib/allocator/tlsf/Block#get:right (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -754,7 +989,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/fls (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -772,7 +1007,7 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -808,7 +1043,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u @@ -828,7 +1063,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 48 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -973,7 +1208,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -1005,7 +1240,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/Root#setJump (; 39 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.load global.get $~lib/allocator/tlsf/FREE @@ -1051,7 +1286,7 @@ local.get $1 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 40 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 51 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1317,7 +1552,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1470,7 +1705,7 @@ call $~lib/allocator/tlsf/Root#insert i32.const 1 ) - (func $~lib/allocator/tlsf/ffs (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -1486,7 +1721,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/ffs (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -1502,7 +1737,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1643,7 +1878,7 @@ end local.get $6 ) - (func $~lib/allocator/tlsf/Root#use (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1771,7 +2006,7 @@ global.get $~lib/allocator/tlsf/Block.INFO i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2007,12 +2242,12 @@ local.get $0 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/memory/memory.allocate (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/util/runtime/allocate (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/util/runtime/adjust @@ -2034,7 +2269,7 @@ global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/collector/itcm/ManagedObjectList#clear (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 60 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.store offset=8 @@ -2042,7 +2277,7 @@ local.get $0 i32.store offset=12 ) - (func $~lib/collector/itcm/maybeInit (; 50 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/maybeInit (; 61 ;) (type $FUNCSIG$v) global.get $~lib/collector/itcm/state i32.const 0 i32.eq @@ -2075,7 +2310,7 @@ global.set $~lib/collector/itcm/state end ) - (func $~lib/collector/itcm/ManagedObject#set:color (; 51 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#set:color (; 62 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $0 i32.load offset=8 @@ -2087,7 +2322,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 52 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#set:next (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 local.get $0 @@ -2097,7 +2332,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 64 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load offset=12 @@ -2115,7 +2350,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/collector/itcm/__ref_register (; 54 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_register (; 65 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) call $~lib/collector/itcm/maybeInit @@ -2134,7 +2369,7 @@ local.get $2 call $~lib/collector/itcm/ManagedObjectList#push ) - (func $~lib/util/runtime/register (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/register (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -2172,37 +2407,37 @@ call $~lib/collector/itcm/__ref_register local.get $0 ) - (func $~lib/runtime/runtime.newObject (; 56 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.newObject (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/util/runtime/allocate local.get $1 call $~lib/util/runtime/register ) - (func $~lib/runtime/runtime.newString (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.newString (; 68 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1 i32.shl i32.const 17 call $~lib/runtime/runtime.newObject ) - (func $~lib/runtime/runtime.newArrayBuffer (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime.newArrayBuffer (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 16 call $~lib/runtime/runtime.newObject ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 70 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/util/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/ManagedObject#get:color (; 71 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 i32.and ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/collector/itcm/ManagedObject#get:next (; 72 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=8 i32.const 3 @@ -2210,7 +2445,7 @@ i32.xor i32.and ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#unlink (; 73 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2226,7 +2461,7 @@ local.get $1 call $~lib/collector/itcm/ManagedObject#set:next ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 63 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 74 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/collector/itcm/iter i32.eq @@ -2251,7 +2486,7 @@ i32.or i32.store offset=8 ) - (func $~lib/collector/itcm/__ref_link (; 64 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/__ref_link (; 75 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) call $~lib/collector/itcm/maybeInit @@ -2288,7 +2523,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/runtime/runtime.newArray (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/runtime.newArray (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2300,7 +2535,7 @@ call $~lib/runtime/runtime.flags local.set $2 local.get $2 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -2351,7 +2586,7 @@ i32.shr_u i32.store offset=12 local.get $2 - i32.const 512 + i32.const 1024 i32.and if local.get $1 @@ -2388,27 +2623,27 @@ end local.get $5 ) - (func $~lib/runtime/Root#constructor (; 66 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/Root#constructor (; 77 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 call $~lib/util/runtime/allocate - i32.const 43 + i32.const 59 call $~lib/util/runtime/register local.set $0 end local.get $0 ) - (func $~lib/runtime/runtime.retain (; 67 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.retain (; 78 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.get $~lib/runtime/ROOT call $~lib/collector/itcm/__ref_link ) - (func $~lib/runtime/runtime.release (; 68 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/runtime.release (; 79 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/allocator/tlsf/__mem_free (; 69 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 80 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2451,11 +2686,11 @@ end end ) - (func $~lib/memory/memory.free (; 70 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 81 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/tlsf/__mem_free ) - (func $~lib/collector/itcm/step (; 71 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/step (; 82 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) block $break|0 @@ -2577,7 +2812,7 @@ unreachable end ) - (func $~lib/collector/itcm/__ref_collect (; 72 ;) (type $FUNCSIG$v) + (func $~lib/collector/itcm/__ref_collect (; 83 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/maybeInit block $break|0 loop $continue|0 @@ -2600,19 +2835,19 @@ end end ) - (func $~lib/runtime/runtime.collect (; 73 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.collect (; 84 ;) (type $FUNCSIG$v) call $~lib/collector/itcm/__ref_collect ) - (func $~lib/runtime/runtime#constructor (; 74 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/runtime#constructor (; 85 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) unreachable ) - (func $start (; 75 ;) (type $FUNCSIG$v) + (func $start (; 86 ;) (type $FUNCSIG$v) call $start:runtime/flags i32.const 0 call $~lib/runtime/Root#constructor global.set $~lib/runtime/ROOT ) - (func $~lib/collector/itcm/__ref_mark (; 76 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/itcm/__ref_mark (; 87 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) call $~lib/collector/itcm/maybeInit @@ -2633,7 +2868,7 @@ call $~lib/collector/itcm/ManagedObject#makeGray end ) - (func $~lib/runtime/__gc_mark_roots (; 77 ;) (type $FUNCSIG$v) + (func $~lib/runtime/__gc_mark_roots (; 88 ;) (type $FUNCSIG$v) (local $0 i32) global.get $~lib/runtime/ROOT local.tee $0 @@ -2642,32 +2877,32 @@ call $~lib/collector/itcm/__ref_mark end ) - (func $~lib/array/Array#__traverse (; 78 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#__traverse (; 89 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load call $~lib/collector/itcm/__ref_mark ) - (func $~lib/array/Array#__traverse (; 79 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#__traverse (; 90 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load call $~lib/collector/itcm/__ref_mark ) - (func $~lib/array/Array#__traverse (; 80 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#__traverse (; 91 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load call $~lib/collector/itcm/__ref_mark ) - (func $~lib/array/Array#__traverse (; 81 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#__traverse (; 92 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load call $~lib/collector/itcm/__ref_mark ) - (func $~lib/array/Array#__traverse (; 82 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#__traverse (; 93 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load call $~lib/collector/itcm/__ref_mark ) - (func $~lib/array/Array#__traverse (; 83 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#__traverse (; 94 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2707,7 +2942,7 @@ end end ) - (func $~lib/array/Array#__traverse (; 84 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#__traverse (; 95 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2750,7 +2985,7 @@ end end ) - (func $~lib/set/Set#__traverse (; 85 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#__traverse (; 96 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load @@ -2761,7 +2996,7 @@ local.get $1 call $~lib/collector/itcm/__ref_mark ) - (func $~lib/set/Set#__traverse (; 86 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#__traverse (; 97 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load @@ -2772,7 +3007,7 @@ local.get $1 call $~lib/collector/itcm/__ref_mark ) - (func $~lib/set/Set#__traverse (; 87 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#__traverse (; 98 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load @@ -2783,7 +3018,7 @@ local.get $1 call $~lib/collector/itcm/__ref_mark ) - (func $~lib/set/Set#__traverse (; 88 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#__traverse (; 99 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load @@ -2794,7 +3029,7 @@ local.get $1 call $~lib/collector/itcm/__ref_mark ) - (func $~lib/set/Set#__traverse (; 89 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#__traverse (; 100 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load @@ -2805,7 +3040,7 @@ local.get $1 call $~lib/collector/itcm/__ref_mark ) - (func $~lib/set/Set#__traverse (; 90 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#__traverse (; 101 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2866,7 +3101,7 @@ end end ) - (func $~lib/set/Set#__traverse (; 91 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#__traverse (; 102 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2930,7 +3165,7 @@ end end ) - (func $~lib/map/Map#__traverse (; 92 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 103 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load @@ -2941,7 +3176,7 @@ local.get $1 call $~lib/collector/itcm/__ref_mark ) - (func $~lib/map/Map#__traverse (; 93 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 104 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load @@ -2952,7 +3187,7 @@ local.get $1 call $~lib/collector/itcm/__ref_mark ) - (func $~lib/map/Map#__traverse (; 94 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 105 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load @@ -2963,7 +3198,7 @@ local.get $1 call $~lib/collector/itcm/__ref_mark ) - (func $~lib/map/Map#__traverse (; 95 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 106 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load @@ -2974,7 +3209,7 @@ local.get $1 call $~lib/collector/itcm/__ref_mark ) - (func $~lib/map/Map#__traverse (; 96 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 107 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load @@ -2985,7 +3220,7 @@ local.get $1 call $~lib/collector/itcm/__ref_mark ) - (func $~lib/map/Map#__traverse (; 97 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 108 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3046,7 +3281,7 @@ end end ) - (func $~lib/map/Map#__traverse (; 98 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 109 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3110,7 +3345,7 @@ end end ) - (func $~lib/map/Map#__traverse (; 99 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 110 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3171,7 +3406,7 @@ end end ) - (func $~lib/map/Map#__traverse (; 100 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 111 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3235,7 +3470,7 @@ end end ) - (func $~lib/map/Map#__traverse (; 101 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#__traverse (; 112 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3310,201 +3545,590 @@ end end ) - (func $~lib/runtime/__gc_mark_members (; 102 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__traverse (; 113 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.add + local.set $2 + block $break|0 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + block + local.get $1 + i32.load + local.set $3 + local.get $3 + call $~lib/collector/itcm/__ref_mark + i32.const 47 + local.get $3 + call $~lib/runtime/__gc_mark_members + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + br $continue|0 + end + end + end + ) + (func $~lib/set/Set#__traverse (; 114 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/set/ENTRY_SIZE|inlined.0 (result i32) + i32.const 8 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load + local.set $5 + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 50 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + local.get $2 + block $~lib/set/ENTRY_SIZE|inlined.1 (result i32) + i32.const 8 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/map/Map#__traverse (; 115 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/map/ENTRY_SIZE|inlined.0 (result i32) + i32.const 12 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load + local.set $5 + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 53 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + local.get $2 + block $~lib/map/ENTRY_SIZE|inlined.1 (result i32) + i32.const 12 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/map/Map#__traverse (; 116 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/map/ENTRY_SIZE|inlined.0 (result i32) + i32.const 12 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load offset=4 + local.set $5 + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 55 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + local.get $2 + block $~lib/map/ENTRY_SIZE|inlined.1 (result i32) + i32.const 12 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/runtime/__gc_mark_members (; 117 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $invalid block $~lib/runtime/Root - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/map/Map - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/set/Set - block $~lib/array/Array - block $~lib/array/Array - block $runtime/flags/Ref - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/array/Array - block $~lib/string/String - block $~lib/arraybuffer/ArrayBuffer - block $~lib/arraybuffer/ArrayBufferView - block $~lib/vector/V128 - block $~lib/number/F64 - block $~lib/number/F32 - block $~lib/number/Bool - block $~lib/number/Usize - block $~lib/number/U64 - block $~lib/number/U32 - block $~lib/number/U16 - block $~lib/number/U8 - block $~lib/number/Isize - block $~lib/number/I64 - block $~lib/number/I32 - block $~lib/number/I16 - block $~lib/number/I8 - local.get $0 - br_table $invalid $~lib/number/I8 $~lib/number/I16 $~lib/number/I32 $~lib/number/I64 $~lib/number/Isize $~lib/number/U8 $~lib/number/U16 $~lib/number/U32 $~lib/number/U64 $~lib/number/Usize $~lib/number/Bool $~lib/number/F32 $~lib/number/F64 $~lib/vector/V128 $~lib/arraybuffer/ArrayBufferView $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $runtime/flags/Ref $~lib/array/Array $~lib/array/Array $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/runtime/Root $invalid + block $runtime/flags/InnerCycleMapValue + block $runtime/flags/InnerCycleMapKey + block $~lib/map/Map + block $runtime/flags/IndirectCycleMapValue + block $~lib/map/Map + block $runtime/flags/IndirectCycleMapKey + block $runtime/flags/InnerCycleSet + block $~lib/set/Set + block $runtime/flags/IndirectCycleSet + block $runtime/flags/InnerCycleArray + block $~lib/array/Array + block $runtime/flags/IndirectCycleArray + block $runtime/flags/IndirectCycleBack + block $runtime/flags/IndirectCycle + block $runtime/flags/DirectCycle + block $runtime/flags/NoCycle + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/array/Array + block $~lib/array/Array + block $runtime/flags/Ref + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/arraybuffer/ArrayBufferView + block $~lib/vector/V128 + block $~lib/number/F64 + block $~lib/number/F32 + block $~lib/number/Bool + block $~lib/number/Usize + block $~lib/number/U64 + block $~lib/number/U32 + block $~lib/number/U16 + block $~lib/number/U8 + block $~lib/number/Isize + block $~lib/number/I64 + block $~lib/number/I32 + block $~lib/number/I16 + block $~lib/number/I8 + local.get $0 + br_table $invalid $~lib/number/I8 $~lib/number/I16 $~lib/number/I32 $~lib/number/I64 $~lib/number/Isize $~lib/number/U8 $~lib/number/U16 $~lib/number/U32 $~lib/number/U64 $~lib/number/Usize $~lib/number/Bool $~lib/number/F32 $~lib/number/F64 $~lib/vector/V128 $~lib/arraybuffer/ArrayBufferView $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $runtime/flags/Ref $~lib/array/Array $~lib/array/Array $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $runtime/flags/NoCycle $runtime/flags/DirectCycle $runtime/flags/IndirectCycle $runtime/flags/IndirectCycleBack $runtime/flags/IndirectCycleArray $~lib/array/Array $runtime/flags/InnerCycleArray $runtime/flags/IndirectCycleSet $~lib/set/Set $runtime/flags/InnerCycleSet $runtime/flags/IndirectCycleMapKey $~lib/map/Map $runtime/flags/IndirectCycleMapValue $~lib/map/Map $runtime/flags/InnerCycleMapKey $runtime/flags/InnerCycleMapValue $~lib/runtime/Root $invalid + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 16 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + return + end + return end return end + local.get $1 + call $~lib/array/Array#__traverse return end + local.get $1 + call $~lib/array/Array#__traverse return end + local.get $1 + call $~lib/array/Array#__traverse return end + local.get $1 + call $~lib/array/Array#__traverse return end + local.get $1 + call $~lib/array/Array#__traverse return end return end + local.get $1 + call $~lib/array/Array#__traverse return end + local.get $1 + call $~lib/array/Array#__traverse return end + local.get $1 + call $~lib/set/Set#__traverse return end + local.get $1 + call $~lib/set/Set#__traverse return end + local.get $1 + call $~lib/set/Set#__traverse return end + local.get $1 + call $~lib/set/Set#__traverse return end + local.get $1 + call $~lib/set/Set#__traverse return end local.get $1 - i32.load - local.tee $2 - if - local.get $2 - call $~lib/collector/itcm/__ref_mark - i32.const 16 - local.get $2 - call $~lib/runtime/__gc_mark_members - end + call $~lib/set/Set#__traverse return end + local.get $1 + call $~lib/set/Set#__traverse return end + local.get $1 + call $~lib/map/Map#__traverse return end local.get $1 - call $~lib/array/Array#__traverse + call $~lib/map/Map#__traverse return end local.get $1 - call $~lib/array/Array#__traverse + call $~lib/map/Map#__traverse return end local.get $1 - call $~lib/array/Array#__traverse + call $~lib/map/Map#__traverse return end local.get $1 - call $~lib/array/Array#__traverse + call $~lib/map/Map#__traverse return end local.get $1 - call $~lib/array/Array#__traverse + call $~lib/map/Map#__traverse return end + local.get $1 + call $~lib/map/Map#__traverse return end local.get $1 - call $~lib/array/Array#__traverse + call $~lib/map/Map#__traverse return end local.get $1 - call $~lib/array/Array#__traverse + call $~lib/map/Map#__traverse return end local.get $1 - call $~lib/set/Set#__traverse + call $~lib/map/Map#__traverse return end - local.get $1 - call $~lib/set/Set#__traverse return end local.get $1 - call $~lib/set/Set#__traverse + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 44 + local.get $2 + call $~lib/runtime/__gc_mark_members + end return end local.get $1 - call $~lib/set/Set#__traverse + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 46 + local.get $2 + call $~lib/runtime/__gc_mark_members + end return end local.get $1 - call $~lib/set/Set#__traverse + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 45 + local.get $2 + call $~lib/runtime/__gc_mark_members + end return end local.get $1 - call $~lib/set/Set#__traverse + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 48 + local.get $2 + call $~lib/runtime/__gc_mark_members + end return end local.get $1 - call $~lib/set/Set#__traverse + call $~lib/array/Array#__traverse return end local.get $1 - call $~lib/map/Map#__traverse + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 47 + local.get $2 + call $~lib/runtime/__gc_mark_members + end return end local.get $1 - call $~lib/map/Map#__traverse + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 51 + local.get $2 + call $~lib/runtime/__gc_mark_members + end return end local.get $1 - call $~lib/map/Map#__traverse + call $~lib/set/Set#__traverse return end local.get $1 - call $~lib/map/Map#__traverse + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 50 + local.get $2 + call $~lib/runtime/__gc_mark_members + end return end local.get $1 - call $~lib/map/Map#__traverse + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 54 + local.get $2 + call $~lib/runtime/__gc_mark_members + end return end local.get $1 - call $~lib/map/Map#__traverse + call $~lib/map/Map#__traverse return end local.get $1 - call $~lib/map/Map#__traverse + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 56 + local.get $2 + call $~lib/runtime/__gc_mark_members + end return end local.get $1 - call $~lib/map/Map#__traverse + call $~lib/map/Map#__traverse return end local.get $1 - call $~lib/map/Map#__traverse + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 53 + local.get $2 + call $~lib/runtime/__gc_mark_members + end return end local.get $1 - call $~lib/map/Map#__traverse + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 55 + local.get $2 + call $~lib/runtime/__gc_mark_members + end return end return end unreachable ) - (func $null (; 103 ;) (type $FUNCSIG$v) + (func $null (; 118 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/runtime/instanceof.optimized.wat b/tests/compiler/runtime/instanceof.optimized.wat index 04530e3643..e88a955f11 100644 --- a/tests/compiler/runtime/instanceof.optimized.wat +++ b/tests/compiler/runtime/instanceof.optimized.wat @@ -22,8 +22,7 @@ (data (i32.const 216) "g\00c\00.\00u\00n\00l\00i\00n\00k") (data (i32.const 240) "\10\00\00\00\14") (data (i32.const 256) "g\00c\00.\00c\00o\00l\00l\00e\00c\00t") - (data (i32.const 280) "\15") - (data (i32.const 428) "\11\00\00\00\00\00\00\00\12\00\00\00!\00\00\00\0e") + (data (i32.const 280) "\15\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\11\00\00\00\08\00\00\00\12\00\00\00I\00\00\00\0e\00\00\00\08") (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_count (mut i32) (i32.const 0)) (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) @@ -783,7 +782,7 @@ i32.load end local.tee $0 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -837,7 +836,7 @@ i32.shr_u i32.store offset=12 local.get $0 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/runtime/instanceof.untouched.wat b/tests/compiler/runtime/instanceof.untouched.wat index 9d88ccdb2e..48a2618ccb 100644 --- a/tests/compiler/runtime/instanceof.untouched.wat +++ b/tests/compiler/runtime/instanceof.untouched.wat @@ -15,7 +15,7 @@ (data (i32.const 168) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00l\00i\00n\00k\00") (data (i32.const 200) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00u\00n\00l\00i\00n\00k\00") (data (i32.const 240) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00c\00o\00l\00l\00e\00c\00t\00") - (data (i32.const 280) "\15\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\00\00\00\00\12\00\00\00!\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 280) "\15\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\11\00\00\00\08\00\00\00\12\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) @@ -929,7 +929,7 @@ call $~lib/runtime/runtime.flags local.set $2 local.get $2 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -985,7 +985,7 @@ i32.shr_u i32.store offset=12 local.get $2 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index c9c8deed7d..4f6ce901ac 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -24,10 +24,7 @@ (data (i32.const 264) "\f8\00\00\00\f8") (data (i32.const 280) "\10\00\00\00(") (data (i32.const 296) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 336) "\17") - (data (i32.const 472) "\t\00\00\00\0e\00\00\00!\00\00\00\0e") - (data (i32.const 496) "!\02\00\00\0e") - (data (i32.const 512) "!\02\00\00\0e") + (data (i32.const 336) "\17\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\19\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\04\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\04\00\00\0e\00\00\00\08") (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 264)) (global $std/array-literal/i (mut i32) (i32.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -693,7 +690,7 @@ i32.load end local.tee $0 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -732,7 +729,7 @@ i32.shr_u i32.store offset=12 local.get $0 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index f5016a26c4..dff312f1d2 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -18,7 +18,7 @@ (data (i32.const 232) "\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 248) "\12\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\f8\00\00\00\f8\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 280) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 336) "\17\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\t\00\00\00\0e\00\00\00!\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00!\02\00\00\0e\00\00\00\00\00\00\00\00\00\00\00!\02\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 336) "\17\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\19\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\04\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\04\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/array-literal/staticArrayI8 i32 (i32.const 48)) @@ -1125,7 +1125,7 @@ call $~lib/runtime/runtime.flags local.set $2 local.get $2 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -1181,7 +1181,7 @@ i32.shr_u i32.store offset=12 local.get $2 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 9b175a7271..56cfc20eb2 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -402,11 +402,7 @@ (data (i32.const 8040) "\01") (data (i32.const 8048) "\0f\00\00\00\04") (data (i32.const 8064) "\01") - (data (i32.const 8072) "(") - (data (i32.const 8208) "!\00\00\00\0e") - (data (i32.const 8228) "\0e\00\00\00\t\00\00\00\0e\00\00\00!\00\00\00\0e\00\00\00!\00\00\00\0e\00\00\00A\00\00\00\0e\00\00\00!\02\00\00\0e") - (data (i32.const 8280) "!\02\00\00\0e\00\00\00!\03\00\00\0e\00\00\00!\02\00\00\0e\00\00\00\t\00\00\00\0e\00\00\00A\00\00\00\0e\00\00\00\11\00\00\00\0e") - (data (i32.const 8336) "!\03\00\00\0e\00\00\00\t\00\00\00\0e\00\00\00\11\00\00\00\0e\00\00\00A\00\00\00\0e\00\00\00!\02\00\00\0e\00\00\00!\02\00\00\0e\00\00\00!\02\00\00\0e") + (data (i32.const 8072) "(\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\0e\00\00\00\19\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00I\04\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\04\00\00\0e\00\00\00I\06\00\00\0e\00\00\00I\04\00\00\0e\00\00\00\19\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00)\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\06\00\00\0e\00\00\00\19\00\00\00\0e\00\00\00)\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00I\04\00\00\0e\00\00\00I\04\00\00\0e\00\00\00I\04\00\00\0e\00\00\00\08") (table $0 57 funcref) (elem (i32.const 0) $~lib/runtime/runtime.collect $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|2 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|16 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -13604,7 +13600,7 @@ i32.load end local.tee $0 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -13643,7 +13639,7 @@ i32.shr_u i32.store offset=12 local.get $0 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index e8e76bc2f1..ae1fc9129c 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -221,7 +221,7 @@ (data (i32.const 8000) "\0f\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") (data (i32.const 8024) "\0f\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") (data (i32.const 8048) "\0f\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") - (data (i32.const 8072) "(\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\t\00\00\00\0e\00\00\00!\00\00\00\0e\00\00\00!\00\00\00\0e\00\00\00A\00\00\00\0e\00\00\00!\02\00\00\0e\00\00\00\00\00\00\00\00\00\00\00!\02\00\00\0e\00\00\00!\03\00\00\0e\00\00\00!\02\00\00\0e\00\00\00\t\00\00\00\0e\00\00\00A\00\00\00\0e\00\00\00\11\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00!\03\00\00\0e\00\00\00\t\00\00\00\0e\00\00\00\11\00\00\00\0e\00\00\00A\00\00\00\0e\00\00\00!\02\00\00\0e\00\00\00!\02\00\00\0e\00\00\00!\02\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 8072) "(\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\0e\00\00\00\19\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00I\04\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\04\00\00\0e\00\00\00I\06\00\00\0e\00\00\00I\04\00\00\0e\00\00\00\19\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00)\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\06\00\00\0e\00\00\00\19\00\00\00\0e\00\00\00)\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00I\04\00\00\0e\00\00\00I\04\00\00\0e\00\00\00I\04\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") (table $0 57 funcref) (elem (i32.const 0) $null $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|4 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|18 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|30 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|34 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|38 $start:std/array~anonymous|39 $start:std/array~anonymous|40 $start:std/array~anonymous|41 $start:std/array~anonymous|42 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -18137,7 +18137,7 @@ call $~lib/runtime/runtime.flags local.set $2 local.get $2 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -18193,7 +18193,7 @@ i32.shr_u i32.store offset=12 local.get $2 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 2f794dd4ce..8cbef925ab 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -16,8 +16,7 @@ (data (i32.const 152) "\0f\00\00\00\08\00\00\00\01\00\00\00\02") (data (i32.const 168) "\10\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") (data (i32.const 208) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 248) "\1d") - (data (i32.const 384) "!\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e") + (data (i32.const 248) "\1d\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/arraybuffer/buffer (mut i32) (i32.const 0)) @@ -1133,7 +1132,7 @@ i32.load end local.tee $3 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -1169,7 +1168,7 @@ i32.shr_u i32.store offset=12 local.get $3 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 825e15de7d..13bec10401 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -15,7 +15,7 @@ (data (i32.const 152) "\0f\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00") (data (i32.const 168) "\10\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") (data (i32.const 208) "\10\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 248) "\1d\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 248) "\1d\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) @@ -1964,7 +1964,7 @@ call $~lib/runtime/runtime.flags local.set $2 local.get $2 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -2000,7 +2000,7 @@ i32.shr_u i32.store offset=12 local.get $2 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 7d084c702b..0f26e35f1e 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -21,9 +21,7 @@ (data (i32.const 152) "\10\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") (data (i32.const 192) "\10\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") (data (i32.const 232) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 272) "\13") - (data (i32.const 412) "\0e") - (data (i32.const 424) "!\00\00\00\0e") + (data (i32.const 272) "\13\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/dataview/array (mut i32) (i32.const 0)) @@ -2643,7 +2641,7 @@ i32.load end local.tee $3 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -2679,7 +2677,7 @@ i32.shr_u i32.store offset=12 local.get $3 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index cdb5839d45..4bba76e948 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -22,7 +22,7 @@ (data (i32.const 152) "\10\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") (data (i32.const 192) "\10\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") (data (i32.const 232) "\10\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 272) "\13\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00") + (data (i32.const 272) "\13\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) @@ -3294,7 +3294,7 @@ call $~lib/runtime/runtime.flags local.set $2 local.get $2 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -3330,7 +3330,7 @@ i32.shr_u i32.store offset=12 local.get $2 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 961665f032..e1d30654ca 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -13,8 +13,7 @@ (data (i32.const 8) "\10\00\00\00\16\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s") (data (i32.const 40) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (data (i32.const 88) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 128) "\12") - (data (i32.const 272) "!\00\00\00\0e") + (data (i32.const 128) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") (global $std/date/creationTime (mut i64) (i64.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) @@ -374,7 +373,7 @@ i32.load end local.tee $3 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -410,7 +409,7 @@ i32.shr_u i32.store offset=12 local.get $3 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 66285d60e3..014f2e6d01 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -16,7 +16,7 @@ (data (i32.const 8) "\10\00\00\00\16\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s\00") (data (i32.const 40) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 88) "\10\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 128) "\12\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00") + (data (i32.const 128) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/date/creationTime (mut i64) (i64.const 0)) @@ -505,7 +505,7 @@ call $~lib/runtime/runtime.flags local.set $2 local.get $2 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -541,7 +541,7 @@ i32.shr_u i32.store offset=12 local.get $2 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index ec3443128b..9c7435c8f9 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -29,8 +29,7 @@ (data (i32.const 80) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") (data (i32.const 120) "\10\00\00\00\14") (data (i32.const 136) "s\00t\00d\00/\00m\00a\00p\00.\00t\00s") - (data (i32.const 160) "\1c") - (data (i32.const 296) "$\04\00\00\00\00\00\00$\04\00\00\00\00\00\00$\08\00\00\00\00\00\00$\08\00\00\00\00\00\00$\10\00\00\00\00\00\00$\10\00\00\00\00\00\00$ \00\00\00\00\00\00$ \00\00\00\00\00\00$\10\00\00\00\00\00\00$ \00\00\00\00\00\00!\00\00\00\0e") + (data (i32.const 160) "\1c\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00L\08\00\00\00\00\00\00L\08\00\00\00\00\00\00L\10\00\00\00\00\00\00L\10\00\00\00\00\00\00L \00\00\00\00\00\00L \00\00\00\00\00\00L@\00\00\00\00\00\00L@\00\00\00\00\00\00L \00\00\00\00\00\00L@\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) @@ -6947,7 +6946,7 @@ i32.load end local.tee $0 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -6986,7 +6985,7 @@ i32.shr_u i32.store offset=12 local.get $0 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index f030a8a12f..3de094043d 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -22,7 +22,7 @@ (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 64) "\10\00\00\00&\00\00\00\00\00\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 120) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") - (data (i32.const 160) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00$\04\00\00\00\00\00\00$\04\00\00\00\00\00\00$\08\00\00\00\00\00\00$\08\00\00\00\00\00\00$\10\00\00\00\00\00\00$\10\00\00\00\00\00\00$ \00\00\00\00\00\00$ \00\00\00\00\00\00$\10\00\00\00\00\00\00$ \00\00\00\00\00\00!\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 160) "\1c\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00L\08\00\00\00\00\00\00L\08\00\00\00\00\00\00L\10\00\00\00\00\00\00L\10\00\00\00\00\00\00L \00\00\00\00\00\00L \00\00\00\00\00\00L@\00\00\00\00\00\00L@\00\00\00\00\00\00L \00\00\00\00\00\00L@\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -9991,7 +9991,7 @@ call $~lib/runtime/runtime.flags local.set $2 local.get $2 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -10047,7 +10047,7 @@ i32.shr_u i32.store offset=12 local.get $2 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 0de0adc601..20faac8717 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -9,8 +9,7 @@ (memory $0 1) (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (data (i32.const 56) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 96) "\12") - (data (i32.const 240) "!\00\00\00\0e") + (data (i32.const 96) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/new/aClass (mut i32) (i32.const 0)) @@ -268,7 +267,7 @@ i32.load end local.tee $3 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -304,7 +303,7 @@ i32.shr_u i32.store offset=12 local.get $3 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index caddfb4329..8bfae60794 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -9,7 +9,7 @@ (memory $0 1) (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 56) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 96) "\12\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00") + (data (i32.const 96) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/new/AClass.aStaticField (mut i32) (i32.const 0)) @@ -328,7 +328,7 @@ call $~lib/runtime/runtime.flags local.set $2 local.get $2 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -364,7 +364,7 @@ i32.shr_u i32.store offset=12 local.get $2 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index c6f62370dd..2deba474f4 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -12,8 +12,7 @@ (data (i32.const 64) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (data (i32.const 104) "\10\00\00\00*") (data (i32.const 120) "s\00t\00d\00/\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") - (data (i32.const 168) "\14") - (data (i32.const 320) "!\00\00\00\0e") + (data (i32.const 168) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) @@ -419,7 +418,7 @@ i32.load end local.tee $0 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -458,7 +457,7 @@ i32.shr_u i32.store offset=12 local.get $0 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/object-literal.untouched.wat b/tests/compiler/std/object-literal.untouched.wat index 3d19a2f8a0..6e247ac87f 100644 --- a/tests/compiler/std/object-literal.untouched.wat +++ b/tests/compiler/std/object-literal.untouched.wat @@ -11,7 +11,7 @@ (data (i32.const 8) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d\00") (data (i32.const 48) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 104) "\10\00\00\00*\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") - (data (i32.const 168) "\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 168) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -520,7 +520,7 @@ call $~lib/runtime/runtime.flags local.set $2 local.get $2 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -576,7 +576,7 @@ i32.shr_u i32.store offset=12 local.get $2 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index f201dad05d..8c4e9add28 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -11,8 +11,7 @@ (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (data (i32.const 56) "\10\00\00\006\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s") (data (i32.const 120) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 160) "\14") - (data (i32.const 320) "!\00\00\00\0e") + (data (i32.const 160) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/operator-overloading/a1 (mut i32) (i32.const 0)) @@ -2641,7 +2640,7 @@ i32.load end local.tee $3 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -2677,7 +2676,7 @@ i32.shr_u i32.store offset=12 local.get $3 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 5d40c4035b..659b248b72 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -12,7 +12,7 @@ (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 56) "\10\00\00\006\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s\00") (data (i32.const 120) "\10\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 160) "\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00") + (data (i32.const 160) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) @@ -3021,7 +3021,7 @@ call $~lib/runtime/runtime.flags local.set $2 local.get $2 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -3057,7 +3057,7 @@ i32.shr_u i32.store offset=12 local.get $2 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 5a11eaa347..70fbc99374 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -25,8 +25,7 @@ (data (i32.const 80) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") (data (i32.const 120) "\10\00\00\00\14") (data (i32.const 136) "s\00t\00d\00/\00s\00e\00t\00.\00t\00s") - (data (i32.const 160) "\1c") - (data (i32.const 296) "\n\00\00\00\00\00\00\00\n\00\00\00\00\00\00\00\12\00\00\00\00\00\00\00\12\00\00\00\00\00\00\00\"\00\00\00\00\00\00\00\"\00\00\00\00\00\00\00B\00\00\00\00\00\00\00B\00\00\00\00\00\00\00\"\00\00\00\00\00\00\00B\00\00\00\00\00\00\00!\00\00\00\0e") + (data (i32.const 160) "\1c\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\1a\00\00\00\00\00\00\00\1a\00\00\00\00\00\00\00*\00\00\00\00\00\00\00*\00\00\00\00\00\00\00J\00\00\00\00\00\00\00J\00\00\00\00\00\00\00\8a\00\00\00\00\00\00\00\8a\00\00\00\00\00\00\00J\00\00\00\00\00\00\00\8a\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) @@ -5877,7 +5876,7 @@ i32.load end local.tee $0 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -5916,7 +5915,7 @@ i32.shr_u i32.store offset=12 local.get $0 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index e55446ba52..3f0f322388 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -22,7 +22,7 @@ (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 64) "\10\00\00\00&\00\00\00\00\00\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 120) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") - (data (i32.const 160) "\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\00\00\00\00\n\00\00\00\00\00\00\00\12\00\00\00\00\00\00\00\12\00\00\00\00\00\00\00\"\00\00\00\00\00\00\00\"\00\00\00\00\00\00\00B\00\00\00\00\00\00\00B\00\00\00\00\00\00\00\"\00\00\00\00\00\00\00B\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 160) "\1c\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\1a\00\00\00\00\00\00\00\1a\00\00\00\00\00\00\00*\00\00\00\00\00\00\00*\00\00\00\00\00\00\00J\00\00\00\00\00\00\00J\00\00\00\00\00\00\00\8a\00\00\00\00\00\00\00\8a\00\00\00\00\00\00\00J\00\00\00\00\00\00\00\8a\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) @@ -8815,7 +8815,7 @@ call $~lib/runtime/runtime.flags local.set $2 local.get $2 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -8871,7 +8871,7 @@ i32.shr_u i32.store offset=12 local.get $2 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index a1513dfcc4..f1b20bca3b 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -24,8 +24,7 @@ (data (i32.const 232) "\10\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 272) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (data (i32.const 320) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 360) "\14") - (data (i32.const 496) "!\00\00\00\0e\00\00\00A\00\00\00\0e\00\00\00!\00\00\00\0e\00\00\00A\00\00\00\0e") + (data (i32.const 360) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) @@ -1168,7 +1167,7 @@ i32.load end local.tee $3 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -1204,7 +1203,7 @@ i32.shr_u i32.store offset=12 local.get $3 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index ddb6f4994b..0e8e44936c 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -25,7 +25,7 @@ (data (i32.const 232) "\10\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 272) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 320) "\10\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 360) "\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00A\00\00\00\0e\00\00\00!\00\00\00\0e\00\00\00A\00\00\00\0e\00\00\00") + (data (i32.const 360) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/static-array/i i32 (i32.const 32)) @@ -1443,7 +1443,7 @@ call $~lib/runtime/runtime.flags local.set $2 local.get $2 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -1479,7 +1479,7 @@ i32.shr_u i32.store offset=12 local.get $2 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index 58380a577d..81016f5c09 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -18,8 +18,7 @@ (data (i32.const 208) "\10\00\00\00\04\00\00\00R\d8b\df") (data (i32.const 224) "\10\00\00\00\02") (data (i32.const 240) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 280) "\11") - (data (i32.const 416) "!\00\00\00\0e") + (data (i32.const 280) "\11\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") (global $std/string-utf8/str (mut i32) (i32.const 16)) (global $std/string-utf8/len (mut i32) (i32.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -1318,7 +1317,7 @@ i32.load end local.tee $3 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -1354,7 +1353,7 @@ i32.shr_u i32.store offset=12 local.get $3 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index ae0f54c0f8..fa51b677e6 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -18,7 +18,7 @@ (data (i32.const 208) "\10\00\00\00\04\00\00\00R\d8b\df") (data (i32.const 224) "\10\00\00\00\02\00\00\00\00\00") (data (i32.const 240) "\10\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 280) "\11\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\00\00\00\0e\00\00\00") + (data (i32.const 280) "\11\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/string-utf8/str (mut i32) (i32.const 16)) @@ -1518,7 +1518,7 @@ call $~lib/runtime/runtime.flags local.set $2 local.get $2 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -1554,7 +1554,7 @@ i32.shr_u i32.store offset=12 local.get $2 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index e5cd260efe..2e8891f22c 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -325,8 +325,7 @@ (data (i32.const 6688) "1\00.\001\00e\00-\006\004") (data (i32.const 6704) "\10\00\00\00\16") (data (i32.const 6720) "0\00.\000\000\000\000\003\005\006\008\009") - (data (i32.const 6744) "\16") - (data (i32.const 6880) "!\02\00\00\0e\00\00\00!\00\00\00\0e\00\00\00!\00\00\00\0e\00\00\00A\00\00\00\0e\00\00\00\11\00\00\00\0e") + (data (i32.const 6744) "\16\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\04\00\00\0e\00\00\00I\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00)\00\00\00\0e\00\00\00\08") (global $std/string/str (mut i32) (i32.const 24)) (global $std/string/nullStr (mut i32) (i32.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -7851,7 +7850,7 @@ i32.load end local.tee $0 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -7890,7 +7889,7 @@ i32.shr_u i32.store offset=12 local.get $0 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 24baf97d25..b83e2f137a 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -175,7 +175,7 @@ (data (i32.const 6640) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\001\00.\001\00e\00+\001\002\008\00") (data (i32.const 6672) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\001\00.\001\00e\00-\006\004\00") (data (i32.const 6704) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\000\00.\000\000\000\000\003\005\006\008\009\00") - (data (i32.const 6744) "\16\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!\02\00\00\0e\00\00\00!\00\00\00\0e\00\00\00!\00\00\00\0e\00\00\00A\00\00\00\0e\00\00\00\11\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 6744) "\16\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\04\00\00\0e\00\00\00I\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00)\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/string/str (mut i32) (i32.const 24)) @@ -8971,7 +8971,7 @@ call $~lib/runtime/runtime.flags local.set $2 local.get $2 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -9027,7 +9027,7 @@ i32.shr_u i32.store offset=12 local.get $2 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 70b25c5813..4e9c687181 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -34,8 +34,7 @@ (data (i32.const 600) "\10\00\00\00&\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)") (data (i32.const 648) "\10\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)") (data (i32.const 712) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 752) "\13") - (data (i32.const 888) "$\10\00\00\00\00\00\00$\10\00\00\00\00\00\00!\00\00\00\0e") + (data (i32.const 752) "\13\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00L \00\00\00\00\00\00L \00\00\00\00\00\00I\00\00\00\0e") (global $~lib/symbol/nextId (mut i32) (i32.const 12)) (global $std/symbol/sym1 (mut i32) (i32.const 0)) (global $std/symbol/sym2 (mut i32) (i32.const 0)) @@ -1812,7 +1811,7 @@ i32.load end local.tee $3 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -1848,7 +1847,7 @@ i32.shr_u i32.store offset=12 local.get $3 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 7e6d7bba71..142ee744f0 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -34,7 +34,7 @@ (data (i32.const 600) "\10\00\00\00&\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)\00") (data (i32.const 648) "\10\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)\00") (data (i32.const 712) "\10\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 752) "\13\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00$\10\00\00\00\00\00\00$\10\00\00\00\00\00\00!\00\00\00\0e\00\00\00") + (data (i32.const 752) "\13\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00L \00\00\00\00\00\00L \00\00\00\00\00\00I\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/symbol/nextId (mut i32) (i32.const 12)) @@ -2293,7 +2293,7 @@ call $~lib/runtime/runtime.flags local.set $2 local.get $2 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -2329,7 +2329,7 @@ i32.shr_u i32.store offset=12 local.get $2 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 0df220e78a..f1b7349af2 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -92,8 +92,7 @@ (data (i32.const 1272) "T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") (data (i32.const 1344) "\10\00\00\00V") (data (i32.const 1360) "T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 1448) "\1e") - (data (i32.const 1588) "\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\t\00\00\00\0e\00\00\00!\00\00\00\0e") + (data (i32.const 1448) "\1e\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\19\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\08") (table $0 112 funcref) (elem (i32.const 0) $~lib/runtime/runtime.collect $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -12860,7 +12859,7 @@ i32.load end local.tee $0 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -12899,7 +12898,7 @@ i32.shr_u i32.store offset=12 local.get $0 - i32.const 512 + i32.const 1024 i32.and if local.get $1 diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 8f97fe6fb2..b33577efc2 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -67,7 +67,7 @@ (data (i32.const 1224) "\1d\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a0\04\00\00\a0\04\00\00$\00\00\00\t\00\00\00") (data (i32.const 1256) "\10\00\00\00B\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") (data (i32.const 1344) "\10\00\00\00V\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 1448) "\1e\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\0e\00\00\00\t\00\00\00\0e\00\00\00!\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1448) "\1e\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\19\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") (table $0 112 funcref) (elem (i32.const 0) $null $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32 (i32.const 1)) @@ -18340,7 +18340,7 @@ call $~lib/runtime/runtime.flags local.set $2 local.get $2 - i32.const 8 + i32.const 16 i32.div_u i32.const 31 i32.and @@ -18396,7 +18396,7 @@ i32.shr_u i32.store offset=12 local.get $2 - i32.const 512 + i32.const 1024 i32.and if local.get $1 From 6f25642601272bc4f10c56b15f3ad30299afbdac Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 8 Apr 2019 04:18:13 +0200 Subject: [PATCH 098/119] add a note on acyclic detection --- src/program.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/program.ts b/src/program.ts index 2d33919d8c..a8d3f79d72 100644 --- a/src/program.ts +++ b/src/program.ts @@ -3259,6 +3259,16 @@ export class Class extends TypedElement { /** Tests if this class potentially forms a reference cycle to another one. */ private cyclesTo(other: Class, except: Set = new Set()): bool { + // TODO: The pure RC paper describes acyclic data structures as classes that may contain + // + // - scalars + // - references to classes that are both acyclic and final (here: Java); and + // - arrays (in our case: also sets, maps) of either of the above + // + // Our implementation, however, treats all objects that do not reference themselves directly + // or indirectly as acylic, allowing them to contain inner cycles of other non-acyclic objects. + // This contradicts the second assumption and must be revisited when actually implementing RC. + if (except.has(this)) return false; except.add(this); // don't recurse indefinitely From c16c19e18d5847de77d7d2d7c397359dfb230734 Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 8 Apr 2019 23:22:13 +0200 Subject: [PATCH 099/119] unify runtime header --- src/common.ts | 3 +- src/compiler.ts | 10 - src/program.ts | 4 +- std/assembly/common/capability.ts | 9 - std/assembly/util/runtime.ts | 8 +- tests/compiler.js | 2 +- tests/compiler/abi.optimized.wat | 5 +- tests/compiler/abi.untouched.wat | 18 +- tests/compiler/assert-nonnull.optimized.wat | 9 +- tests/compiler/assert-nonnull.untouched.wat | 8 +- tests/compiler/assert.optimized.wat | 6 +- tests/compiler/assert.untouched.wat | 22 +- tests/compiler/bool.optimized.wat | 17 +- tests/compiler/bool.untouched.wat | 16 +- tests/compiler/builtins.optimized.wat | 20 +- tests/compiler/builtins.untouched.wat | 244 +- tests/compiler/call-inferred.optimized.wat | 3 +- tests/compiler/call-inferred.untouched.wat | 10 +- tests/compiler/call-optional.optimized.wat | 13 +- tests/compiler/call-optional.untouched.wat | 14 +- tests/compiler/call-super.optimized.wat | 56 +- tests/compiler/call-super.untouched.wat | 48 +- tests/compiler/class.optimized.wat | 3 +- tests/compiler/class.untouched.wat | 4 +- tests/compiler/comma.optimized.wat | 21 +- tests/compiler/comma.untouched.wat | 20 +- tests/compiler/constructor.optimized.wat | 21 +- tests/compiler/constructor.untouched.wat | 14 +- tests/compiler/declare.optimized.wat | 7 +- tests/compiler/declare.untouched.wat | 6 +- tests/compiler/do.optimized.wat | 19 +- tests/compiler/do.untouched.wat | 18 +- tests/compiler/exports.optimized.wat | 21 +- tests/compiler/exports.untouched.wat | 14 +- tests/compiler/for.optimized.wat | 9 +- tests/compiler/for.untouched.wat | 8 +- .../function-expression.optimized.wat | 39 +- .../function-expression.untouched.wat | 20 +- tests/compiler/function-types.optimized.wat | 31 +- tests/compiler/function-types.untouched.wat | 18 +- tests/compiler/gc.optimized.wat | 6 +- tests/compiler/gc.untouched.wat | 6 +- tests/compiler/gc/global-assign.optimized.wat | 6 +- tests/compiler/gc/global-assign.untouched.wat | 6 +- tests/compiler/gc/global-init.optimized.wat | 6 +- tests/compiler/gc/global-init.untouched.wat | 6 +- tests/compiler/gc/itcm/trace.optimized.wat | 8 +- tests/compiler/gc/itcm/trace.untouched.wat | 8 +- .../gc/rc/global-assign.optimized.wat | 6 +- .../gc/rc/global-assign.untouched.wat | 6 +- .../compiler/gc/rc/global-init.optimized.wat | 6 +- .../compiler/gc/rc/global-init.untouched.wat | 6 +- tests/compiler/getter-call.optimized.wat | 24 +- tests/compiler/getter-call.untouched.wat | 14 +- tests/compiler/getter-setter.optimized.wat | 9 +- tests/compiler/getter-setter.untouched.wat | 8 +- tests/compiler/if.optimized.wat | 5 +- tests/compiler/if.untouched.wat | 16 +- tests/compiler/infer-type.optimized.wat | 3 +- tests/compiler/infer-type.untouched.wat | 6 +- .../inlining-blocklocals.optimized.wat | 7 +- .../inlining-blocklocals.untouched.wat | 6 +- tests/compiler/inlining.optimized.wat | 37 +- tests/compiler/inlining.untouched.wat | 46 +- tests/compiler/instanceof.optimized.wat | 7 +- tests/compiler/instanceof.untouched.wat | 88 +- tests/compiler/logical.optimized.wat | 19 +- tests/compiler/logical.untouched.wat | 18 +- tests/compiler/many-locals.optimized.wat | 3 +- tests/compiler/many-locals.untouched.wat | 6 +- tests/compiler/memcpy.optimized.wat | 27 +- tests/compiler/memcpy.untouched.wat | 26 +- tests/compiler/memmove.optimized.wat | 27 +- tests/compiler/memmove.untouched.wat | 26 +- tests/compiler/memset.optimized.wat | 17 +- tests/compiler/memset.untouched.wat | 16 +- tests/compiler/number.optimized.wat | 174 +- tests/compiler/number.untouched.wat | 224 +- .../optional-typeparameters.optimized.wat | 21 +- .../optional-typeparameters.untouched.wat | 14 +- tests/compiler/overflow.optimized.wat | 3 +- tests/compiler/overflow.untouched.wat | 74 +- .../portable-conversions.optimized.wat | 107 +- .../portable-conversions.untouched.wat | 106 +- tests/compiler/retain-i32.optimized.wat | 39 +- tests/compiler/retain-i32.untouched.wat | 66 +- tests/compiler/runtime-arena.optimized.wat | 46 +- tests/compiler/runtime-arena.untouched.wat | 24 +- tests/compiler/runtime-default.optimized.wat | 6 +- tests/compiler/runtime-default.untouched.wat | 6 +- tests/compiler/runtime/flags.optimized.wat | 6 +- tests/compiler/runtime/flags.untouched.wat | 6 +- .../compiler/runtime/instanceof.optimized.wat | 6 +- .../compiler/runtime/instanceof.untouched.wat | 6 +- tests/compiler/simd.optimized.wat | 3 +- tests/compiler/simd.untouched.wat | 320 +- tests/compiler/static-this.optimized.wat | 5 +- tests/compiler/static-this.untouched.wat | 4 +- .../std/allocator_arena.optimized.wat | 17 +- .../std/allocator_arena.untouched.wat | 14 +- tests/compiler/std/array-access.optimized.wat | 29 +- tests/compiler/std/array-access.untouched.wat | 32 +- .../compiler/std/array-literal.optimized.wat | 6 +- .../compiler/std/array-literal.untouched.wat | 6 +- tests/compiler/std/array.optimized.wat | 15 +- tests/compiler/std/array.untouched.wat | 12 +- tests/compiler/std/arraybuffer.optimized.wat | 132 +- tests/compiler/std/arraybuffer.untouched.wat | 82 +- tests/compiler/std/dataview.optimized.wat | 308 +- tests/compiler/std/dataview.untouched.wat | 282 +- tests/compiler/std/date.optimized.wat | 61 +- tests/compiler/std/date.untouched.wat | 38 +- tests/compiler/std/hash.optimized.wat | 19 +- tests/compiler/std/hash.untouched.wat | 18 +- tests/compiler/std/map.optimized.wat | 6 +- tests/compiler/std/map.untouched.wat | 6 +- tests/compiler/std/math.optimized.wat | 4646 ++++++++-------- tests/compiler/std/math.untouched.wat | 4680 ++++++++--------- tests/compiler/std/mod.optimized.wat | 273 +- tests/compiler/std/mod.untouched.wat | 272 +- tests/compiler/std/new.optimized.wat | 46 +- tests/compiler/std/new.untouched.wat | 24 +- .../compiler/std/object-literal.optimized.wat | 6 +- .../compiler/std/object-literal.untouched.wat | 6 +- .../std/operator-overloading.optimized.wat | 115 +- .../std/operator-overloading.untouched.wat | 92 +- tests/compiler/std/pointer.optimized.wat | 57 +- tests/compiler/std/pointer.untouched.wat | 56 +- tests/compiler/std/polyfills.optimized.wat | 3 +- tests/compiler/std/polyfills.untouched.wat | 34 +- tests/compiler/std/runtime.optimized.wat | 12 +- tests/compiler/std/runtime.untouched.wat | 12 +- tests/compiler/std/set.optimized.wat | 6 +- tests/compiler/std/set.untouched.wat | 6 +- tests/compiler/std/static-array.optimized.wat | 193 +- tests/compiler/std/static-array.untouched.wat | 100 +- tests/compiler/std/string-utf8.optimized.wat | 134 +- tests/compiler/std/string-utf8.untouched.wat | 98 +- tests/compiler/std/string.optimized.wat | 12 +- tests/compiler/std/string.untouched.wat | 12 +- tests/compiler/std/symbol.optimized.wat | 205 +- tests/compiler/std/symbol.untouched.wat | 144 +- tests/compiler/std/trace.optimized.wat | 40 +- tests/compiler/std/trace.untouched.wat | 32 +- tests/compiler/std/typedarray.optimized.wat | 84 +- tests/compiler/std/typedarray.untouched.wat | 6 +- tests/compiler/switch.optimized.wat | 33 +- tests/compiler/switch.untouched.wat | 62 +- tests/compiler/wasi.optimized.wat | 3 +- tests/compiler/wasi.untouched.wat | 88 +- tests/compiler/while.optimized.wat | 21 +- tests/compiler/while.untouched.wat | 20 +- 152 files changed, 7690 insertions(+), 7667 deletions(-) delete mode 100644 std/assembly/common/capability.ts diff --git a/src/common.ts b/src/common.ts index 733893675a..78d5840067 100644 --- a/src/common.ts +++ b/src/common.ts @@ -192,8 +192,7 @@ export namespace CommonSymbols { } // shared -import { Capability } from "../std/assembly/common/capability"; import { Feature } from "../std/assembly/common/feature"; import { RTTIData, RTTIFlags } from "../std/assembly/common/rtti"; import { Target } from "../std/assembly/common/target"; -export { Capability, Feature, RTTIData, RTTIFlags, Target }; +export { Feature, RTTIData, RTTIFlags, Target }; diff --git a/src/compiler.ts b/src/compiler.ts index 70c1c25cd0..18f75250cb 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -50,7 +50,6 @@ import { SETTER_PREFIX, CommonSymbols, INDEX_SUFFIX, - Capability, Feature, Target } from "./common"; @@ -422,15 +421,6 @@ export class Compiler extends DiagnosticEmitter { for (let file of this.program.filesByName.values()) { if (file.source.isEntry) this.ensureModuleExports(file); } - - // expose module capabilities - var capabilities = Capability.NONE; - if (program.options.isWasm64) capabilities |= Capability.WASM64; - if (program.collectorKind != CollectorKind.NONE) capabilities |= Capability.GC; - if (capabilities != 0) { - module.addGlobal(BuiltinSymbols.capabilities, NativeType.I32, false, module.createI32(capabilities)); - module.addGlobalExport(BuiltinSymbols.capabilities, "$.capabilities"); - } return module; } diff --git a/src/program.ts b/src/program.ts index a8d3f79d72..4a4e90a438 100644 --- a/src/program.ts +++ b/src/program.ts @@ -419,9 +419,9 @@ export class Program extends DiagnosticEmitter { this.resolver = new Resolver(this); } - /** Gets the size of a common runtime header. */ + /** Gets the size of a runtime header. */ get runtimeHeaderSize(): i32 { - return this.collectorKind ? 16 : 8; + return 16; } /** Writes a common runtime header to the specified buffer. */ diff --git a/std/assembly/common/capability.ts b/std/assembly/common/capability.ts deleted file mode 100644 index 9b903515ee..0000000000 --- a/std/assembly/common/capability.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** Indicates module capabilities. */ -export const enum Capability { - /** No specific capabilities. */ - NONE = 0, - /** Uses WebAssembly with 64-bit pointers. */ - WASM64 = 1 << 0, - /** Garbage collector is present (full runtime header). */ - GC = 1 << 1 -} diff --git a/std/assembly/util/runtime.ts b/std/assembly/util/runtime.ts index d2f23b48eb..b3512c0c80 100644 --- a/std/assembly/util/runtime.ts +++ b/std/assembly/util/runtime.ts @@ -15,18 +15,16 @@ import { ArrayBufferView } from "../arraybuffer"; classId: u32; /** Size of the allocated payload. */ payloadSize: u32; - /** Reserved field for use by GC. Only present if GC is. */ + /** Reserved field for use by GC. */ reserved1: usize; // itcm: tagged next - /** Reserved field for use by GC. Only present if GC is. */ + /** Reserved field for use by GC. */ reserved2: usize; // itcm: prev } /** Common runtime header size. */ // @ts-ignore: decorator @lazy -export const HEADER_SIZE: usize = isDefined(__ref_collect) - ? (offsetof
( ) + AL_MASK) & ~AL_MASK // full header if GC is present - : (offsetof
("reserved1") + AL_MASK) & ~AL_MASK; // half header if GC is absent +export const HEADER_SIZE: usize = (offsetof
() + AL_MASK) & ~AL_MASK; /** Common runtime header magic. Used to assert registered/unregistered status. */ // @ts-ignore: decorator diff --git a/tests/compiler.js b/tests/compiler.js index ded0aceaeb..54cf4c25cb 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -236,7 +236,7 @@ tests.forEach(filename => { let exports = {}; function getString(ptr) { - const RUNTIME_HEADER_SIZE = exports[".capabilities"] & 2 ? 16 : 8; + const RUNTIME_HEADER_SIZE = 16; if (!ptr) return "null"; var U32 = new Uint32Array(exports.memory ? exports.memory.buffer : memory.buffer); var U16 = new Uint16Array(exports.memory ? exports.memory.buffer : memory.buffer); diff --git a/tests/compiler/abi.optimized.wat b/tests/compiler/abi.optimized.wat index 4614520e88..0abe0f089d 100644 --- a/tests/compiler/abi.optimized.wat +++ b/tests/compiler/abi.optimized.wat @@ -4,7 +4,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\0c\00\00\00a\00b\00i\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\0c") + (data (i32.const 24) "a\00b\00i\00.\00t\00s") (global $abi/condition (mut i32) (i32.const 0)) (global $abi/y (mut i32) (i32.const 0)) (export "memory" (memory $0)) @@ -23,7 +24,7 @@ global.get $abi/y if i32.const 0 - i32.const 16 + i32.const 24 i32.const 65 i32.const 2 call $~lib/builtins/abort diff --git a/tests/compiler/abi.untouched.wat b/tests/compiler/abi.untouched.wat index 42710bfed1..89527822ee 100644 --- a/tests/compiler/abi.untouched.wat +++ b/tests/compiler/abi.untouched.wat @@ -4,7 +4,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\0c\00\00\00a\00b\00i\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00a\00b\00i\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $abi/condition (mut i32) (i32.const 0)) @@ -37,7 +37,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 32 i32.const 2 call $~lib/builtins/abort @@ -76,7 +76,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 45 i32.const 2 call $~lib/builtins/abort @@ -107,7 +107,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 58 i32.const 2 call $~lib/builtins/abort @@ -126,7 +126,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 65 i32.const 2 call $~lib/builtins/abort @@ -143,7 +143,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 72 i32.const 2 call $~lib/builtins/abort @@ -158,7 +158,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 74 i32.const 2 call $~lib/builtins/abort @@ -171,7 +171,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 77 i32.const 2 call $~lib/builtins/abort @@ -184,7 +184,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 79 i32.const 2 call $~lib/builtins/abort diff --git a/tests/compiler/assert-nonnull.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat index b3697678d5..b4d131e5ea 100644 --- a/tests/compiler/assert-nonnull.optimized.wat +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -5,7 +5,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\1a") + (data (i32.const 24) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/argc (mut i32) (i32.const 0)) @@ -56,7 +57,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 96 i32.const 45 call $~lib/builtins/abort @@ -70,7 +71,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 99 i32.const 61 call $~lib/builtins/abort @@ -98,7 +99,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 99 i32.const 61 call $~lib/builtins/abort diff --git a/tests/compiler/assert-nonnull.untouched.wat b/tests/compiler/assert-nonnull.untouched.wat index 4dce2382f0..74528f3cbc 100644 --- a/tests/compiler/assert-nonnull.untouched.wat +++ b/tests/compiler/assert-nonnull.untouched.wat @@ -6,7 +6,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/argc (mut i32) (i32.const 0)) @@ -71,7 +71,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 96 i32.const 45 call $~lib/builtins/abort @@ -85,7 +85,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 99 i32.const 61 call $~lib/builtins/abort @@ -125,7 +125,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 99 i32.const 61 call $~lib/builtins/abort diff --git a/tests/compiler/assert.optimized.wat b/tests/compiler/assert.optimized.wat index 0ed844f16a..b70fe4f15c 100644 --- a/tests/compiler/assert.optimized.wat +++ b/tests/compiler/assert.optimized.wat @@ -1,8 +1,10 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\12\00\00\00a\00s\00s\00e\00r\00t\00.\00t\00s") - (data (i32.const 40) "\10\00\00\00\18\00\00\00m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e") + (data (i32.const 8) "\10\00\00\00\12") + (data (i32.const 24) "a\00s\00s\00e\00r\00t\00.\00t\00s") + (data (i32.const 48) "\10\00\00\00\18") + (data (i32.const 64) "m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e") (export "memory" (memory $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop diff --git a/tests/compiler/assert.untouched.wat b/tests/compiler/assert.untouched.wat index 8054fc6806..e316002ec2 100644 --- a/tests/compiler/assert.untouched.wat +++ b/tests/compiler/assert.untouched.wat @@ -3,8 +3,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\12\00\00\00a\00s\00s\00e\00r\00t\00.\00t\00s\00") - (data (i32.const 40) "\10\00\00\00\18\00\00\00m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e\00") + (data (i32.const 8) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00a\00s\00s\00e\00r\00t\00.\00t\00s\00") + (data (i32.const 48) "\10\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e\00") (table $0 1 funcref) (elem (i32.const 0) $null) (export "memory" (memory $0)) @@ -15,7 +15,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1 i32.const 0 call $~lib/builtins/abort @@ -25,7 +25,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2 i32.const 0 call $~lib/builtins/abort @@ -37,7 +37,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3 i32.const 0 call $~lib/builtins/abort @@ -48,7 +48,7 @@ f64.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 4 i32.const 0 call $~lib/builtins/abort @@ -60,7 +60,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 5 i32.const 0 call $~lib/builtins/abort @@ -70,7 +70,7 @@ i64.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 6 i32.const 0 call $~lib/builtins/abort @@ -82,7 +82,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 7 i32.const 0 call $~lib/builtins/abort @@ -93,8 +93,8 @@ if (result i32) local.get $0 else - i32.const 48 - i32.const 16 + i32.const 64 + i32.const 24 i32.const 10 i32.const 5 call $~lib/builtins/abort diff --git a/tests/compiler/bool.optimized.wat b/tests/compiler/bool.optimized.wat index 581beabc3c..698b678a8d 100644 --- a/tests/compiler/bool.optimized.wat +++ b/tests/compiler/bool.optimized.wat @@ -3,7 +3,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\0e\00\00\00b\00o\00o\00l\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\0e") + (data (i32.const 24) "b\00o\00o\00l\00.\00t\00s") (global $bool/i (mut i32) (i32.const 2)) (global $bool/I (mut i64) (i64.const 2)) (global $bool/u (mut i32) (i32.const 2)) @@ -21,7 +22,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2 i32.const 0 call $~lib/builtins/abort @@ -34,7 +35,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 4 i32.const 0 call $~lib/builtins/abort @@ -47,7 +48,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 6 i32.const 0 call $~lib/builtins/abort @@ -60,7 +61,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 8 i32.const 0 call $~lib/builtins/abort @@ -73,7 +74,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 10 i32.const 0 call $~lib/builtins/abort @@ -86,7 +87,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -99,7 +100,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 14 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/bool.untouched.wat b/tests/compiler/bool.untouched.wat index c2b6014dda..bee3cecbbb 100644 --- a/tests/compiler/bool.untouched.wat +++ b/tests/compiler/bool.untouched.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\0e\00\00\00b\00o\00o\00l\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00b\00o\00o\00l\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $bool/i (mut i32) (i32.const 2)) @@ -24,7 +24,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2 i32.const 0 call $~lib/builtins/abort @@ -38,7 +38,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 4 i32.const 0 call $~lib/builtins/abort @@ -52,7 +52,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 6 i32.const 0 call $~lib/builtins/abort @@ -66,7 +66,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 8 i32.const 0 call $~lib/builtins/abort @@ -80,7 +80,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 10 i32.const 0 call $~lib/builtins/abort @@ -94,7 +94,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -108,7 +108,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 14 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index ada687b403..f0fadc981c 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -4,9 +4,11 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\16\00\00\00b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s") - (data (i32.const 40) "\10") - (data (i32.const 48) "\10\00\00\00\06\00\00\00a\00b\00c") + (data (i32.const 8) "\10\00\00\00\16") + (data (i32.const 24) "b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s") + (data (i32.const 48) "\10") + (data (i32.const 64) "\10\00\00\00\06") + (data (i32.const 80) "a\00b\00c") (table $0 2 funcref) (elem (i32.const 0) $builtins/test $start:builtins~anonymous|0) (global $builtins/b (mut i32) (i32.const 0)) @@ -42,7 +44,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 67 i32.const 19 call $~lib/builtins/abort @@ -55,7 +57,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 68 i32.const 20 call $~lib/builtins/abort @@ -68,7 +70,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 69 i32.const 20 call $~lib/builtins/abort @@ -91,7 +93,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 85 i32.const 19 call $~lib/builtins/abort @@ -104,7 +106,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 86 i32.const 20 call $~lib/builtins/abort @@ -117,7 +119,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 87 i32.const 20 call $~lib/builtins/abort diff --git a/tests/compiler/builtins.untouched.wat b/tests/compiler/builtins.untouched.wat index bc65837630..f1c9e8f71e 100644 --- a/tests/compiler/builtins.untouched.wat +++ b/tests/compiler/builtins.untouched.wat @@ -6,9 +6,9 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\16\00\00\00b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s\00") - (data (i32.const 40) "\10\00\00\00\00\00\00\00") - (data (i32.const 48) "\10\00\00\00\06\00\00\00a\00b\00c\00") + (data (i32.const 8) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s\00") + (data (i32.const 48) "\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 64) "\10\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00") (table $0 2 funcref) (elem (i32.const 0) $null $start:builtins~anonymous|0) (global $builtins/b (mut i32) (i32.const 0)) @@ -90,7 +90,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 6 i32.const 0 call $~lib/builtins/abort @@ -101,7 +101,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 7 i32.const 0 call $~lib/builtins/abort @@ -111,7 +111,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 8 i32.const 0 call $~lib/builtins/abort @@ -122,7 +122,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 9 i32.const 0 call $~lib/builtins/abort @@ -132,7 +132,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 10 i32.const 0 call $~lib/builtins/abort @@ -143,7 +143,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 11 i32.const 0 call $~lib/builtins/abort @@ -153,7 +153,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -164,7 +164,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 13 i32.const 0 call $~lib/builtins/abort @@ -174,7 +174,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 14 i32.const 0 call $~lib/builtins/abort @@ -184,7 +184,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 15 i32.const 0 call $~lib/builtins/abort @@ -194,7 +194,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 16 i32.const 0 call $~lib/builtins/abort @@ -205,7 +205,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 17 i32.const 0 call $~lib/builtins/abort @@ -215,7 +215,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 18 i32.const 0 call $~lib/builtins/abort @@ -226,7 +226,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 19 i32.const 0 call $~lib/builtins/abort @@ -236,7 +236,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 20 i32.const 0 call $~lib/builtins/abort @@ -247,7 +247,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 21 i32.const 0 call $~lib/builtins/abort @@ -257,7 +257,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 23 i32.const 0 call $~lib/builtins/abort @@ -268,7 +268,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -278,7 +278,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 25 i32.const 0 call $~lib/builtins/abort @@ -289,7 +289,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 26 i32.const 0 call $~lib/builtins/abort @@ -299,7 +299,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 27 i32.const 0 call $~lib/builtins/abort @@ -310,7 +310,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -320,7 +320,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 29 i32.const 0 call $~lib/builtins/abort @@ -330,7 +330,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 30 i32.const 0 call $~lib/builtins/abort @@ -341,7 +341,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 31 i32.const 0 call $~lib/builtins/abort @@ -351,7 +351,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 32 i32.const 0 call $~lib/builtins/abort @@ -361,7 +361,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 33 i32.const 0 call $~lib/builtins/abort @@ -371,7 +371,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 34 i32.const 0 call $~lib/builtins/abort @@ -381,7 +381,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 35 i32.const 0 call $~lib/builtins/abort @@ -392,7 +392,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 36 i32.const 0 call $~lib/builtins/abort @@ -402,7 +402,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 37 i32.const 0 call $~lib/builtins/abort @@ -413,7 +413,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 38 i32.const 0 call $~lib/builtins/abort @@ -423,7 +423,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 39 i32.const 0 call $~lib/builtins/abort @@ -434,7 +434,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 40 i32.const 0 call $~lib/builtins/abort @@ -444,7 +444,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 44 i32.const 0 call $~lib/builtins/abort @@ -455,7 +455,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 45 i32.const 0 call $~lib/builtins/abort @@ -465,7 +465,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 46 i32.const 0 call $~lib/builtins/abort @@ -476,7 +476,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 47 i32.const 0 call $~lib/builtins/abort @@ -560,7 +560,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 67 i32.const 19 call $~lib/builtins/abort @@ -581,7 +581,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 68 i32.const 20 call $~lib/builtins/abort @@ -602,7 +602,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 69 i32.const 20 call $~lib/builtins/abort @@ -668,7 +668,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 85 i32.const 19 call $~lib/builtins/abort @@ -689,7 +689,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 86 i32.const 20 call $~lib/builtins/abort @@ -710,7 +710,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 87 i32.const 20 call $~lib/builtins/abort @@ -757,7 +757,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 104 i32.const 0 call $~lib/builtins/abort @@ -770,7 +770,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 105 i32.const 0 call $~lib/builtins/abort @@ -783,7 +783,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 106 i32.const 0 call $~lib/builtins/abort @@ -796,7 +796,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 107 i32.const 0 call $~lib/builtins/abort @@ -810,7 +810,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 108 i32.const 0 call $~lib/builtins/abort @@ -823,7 +823,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 109 i32.const 0 call $~lib/builtins/abort @@ -914,7 +914,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 140 i32.const 0 call $~lib/builtins/abort @@ -927,7 +927,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 141 i32.const 0 call $~lib/builtins/abort @@ -940,7 +940,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 142 i32.const 0 call $~lib/builtins/abort @@ -953,7 +953,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 143 i32.const 0 call $~lib/builtins/abort @@ -967,7 +967,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 144 i32.const 0 call $~lib/builtins/abort @@ -980,7 +980,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 145 i32.const 0 call $~lib/builtins/abort @@ -1280,7 +1280,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 264 i32.const 0 call $~lib/builtins/abort @@ -1292,7 +1292,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 265 i32.const 0 call $~lib/builtins/abort @@ -1304,7 +1304,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 266 i32.const 0 call $~lib/builtins/abort @@ -1316,7 +1316,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 267 i32.const 0 call $~lib/builtins/abort @@ -1330,7 +1330,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 269 i32.const 0 call $~lib/builtins/abort @@ -1342,7 +1342,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 270 i32.const 0 call $~lib/builtins/abort @@ -1354,7 +1354,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 271 i32.const 0 call $~lib/builtins/abort @@ -1366,7 +1366,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 272 i32.const 0 call $~lib/builtins/abort @@ -1378,7 +1378,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 273 i32.const 0 call $~lib/builtins/abort @@ -1392,7 +1392,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 275 i32.const 0 call $~lib/builtins/abort @@ -1404,7 +1404,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 276 i32.const 0 call $~lib/builtins/abort @@ -1416,7 +1416,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 278 i32.const 0 call $~lib/builtins/abort @@ -1428,7 +1428,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 279 i32.const 0 call $~lib/builtins/abort @@ -1440,7 +1440,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 280 i32.const 0 call $~lib/builtins/abort @@ -1452,7 +1452,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 281 i32.const 0 call $~lib/builtins/abort @@ -1464,7 +1464,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 282 i32.const 0 call $~lib/builtins/abort @@ -1476,7 +1476,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 285 i32.const 0 call $~lib/builtins/abort @@ -1488,7 +1488,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 286 i32.const 0 call $~lib/builtins/abort @@ -1500,7 +1500,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 287 i32.const 0 call $~lib/builtins/abort @@ -1512,7 +1512,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 288 i32.const 0 call $~lib/builtins/abort @@ -1524,7 +1524,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 290 i32.const 0 call $~lib/builtins/abort @@ -1536,7 +1536,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 291 i32.const 0 call $~lib/builtins/abort @@ -1548,7 +1548,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 293 i32.const 0 call $~lib/builtins/abort @@ -1559,7 +1559,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 294 i32.const 0 call $~lib/builtins/abort @@ -1570,7 +1570,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 295 i32.const 0 call $~lib/builtins/abort @@ -1582,7 +1582,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 296 i32.const 0 call $~lib/builtins/abort @@ -1594,7 +1594,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 297 i32.const 0 call $~lib/builtins/abort @@ -1606,7 +1606,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 298 i32.const 0 call $~lib/builtins/abort @@ -1618,7 +1618,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 299 i32.const 0 call $~lib/builtins/abort @@ -1629,7 +1629,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 300 i32.const 0 call $~lib/builtins/abort @@ -1640,7 +1640,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 301 i32.const 0 call $~lib/builtins/abort @@ -1656,7 +1656,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 314 i32.const 0 call $~lib/builtins/abort @@ -1668,7 +1668,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 315 i32.const 0 call $~lib/builtins/abort @@ -1684,7 +1684,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 316 i32.const 0 call $~lib/builtins/abort @@ -1696,7 +1696,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 317 i32.const 0 call $~lib/builtins/abort @@ -1708,7 +1708,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 318 i32.const 0 call $~lib/builtins/abort @@ -1720,7 +1720,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 319 i32.const 0 call $~lib/builtins/abort @@ -1732,7 +1732,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 320 i32.const 0 call $~lib/builtins/abort @@ -1744,7 +1744,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 321 i32.const 0 call $~lib/builtins/abort @@ -1756,7 +1756,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 323 i32.const 0 call $~lib/builtins/abort @@ -1768,7 +1768,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 324 i32.const 0 call $~lib/builtins/abort @@ -1780,7 +1780,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 325 i32.const 0 call $~lib/builtins/abort @@ -1792,7 +1792,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 326 i32.const 0 call $~lib/builtins/abort @@ -1804,7 +1804,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 327 i32.const 0 call $~lib/builtins/abort @@ -1816,7 +1816,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 328 i32.const 0 call $~lib/builtins/abort @@ -1828,7 +1828,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 329 i32.const 0 call $~lib/builtins/abort @@ -1840,7 +1840,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 330 i32.const 0 call $~lib/builtins/abort @@ -1852,7 +1852,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 331 i32.const 0 call $~lib/builtins/abort @@ -1864,7 +1864,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 331 i32.const 29 call $~lib/builtins/abort @@ -1876,7 +1876,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 332 i32.const 0 call $~lib/builtins/abort @@ -1888,7 +1888,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 332 i32.const 29 call $~lib/builtins/abort @@ -1900,7 +1900,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 334 i32.const 0 call $~lib/builtins/abort @@ -1912,7 +1912,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 335 i32.const 0 call $~lib/builtins/abort @@ -1924,7 +1924,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 336 i32.const 0 call $~lib/builtins/abort @@ -1936,7 +1936,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 337 i32.const 0 call $~lib/builtins/abort @@ -1948,7 +1948,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 338 i32.const 0 call $~lib/builtins/abort @@ -1960,7 +1960,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 339 i32.const 0 call $~lib/builtins/abort @@ -1972,7 +1972,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 341 i32.const 0 call $~lib/builtins/abort @@ -1984,7 +1984,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 342 i32.const 0 call $~lib/builtins/abort @@ -1996,7 +1996,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 343 i32.const 0 call $~lib/builtins/abort @@ -2008,7 +2008,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 344 i32.const 0 call $~lib/builtins/abort @@ -2020,7 +2020,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 345 i32.const 0 call $~lib/builtins/abort @@ -2032,7 +2032,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 346 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/call-inferred.optimized.wat b/tests/compiler/call-inferred.optimized.wat index 4592fd12e4..7999547f0d 100644 --- a/tests/compiler/call-inferred.optimized.wat +++ b/tests/compiler/call-inferred.optimized.wat @@ -1,7 +1,8 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\10\00\00\00 \00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00 ") + (data (i32.const 24) "c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s") (export "memory" (memory $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop diff --git a/tests/compiler/call-inferred.untouched.wat b/tests/compiler/call-inferred.untouched.wat index e2053fdabc..9f45f175bd 100644 --- a/tests/compiler/call-inferred.untouched.wat +++ b/tests/compiler/call-inferred.untouched.wat @@ -6,7 +6,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00 \00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (export "memory" (memory $0)) @@ -31,7 +31,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 5 i32.const 0 call $~lib/builtins/abort @@ -44,7 +44,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 6 i32.const 0 call $~lib/builtins/abort @@ -57,7 +57,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 7 i32.const 0 call $~lib/builtins/abort @@ -70,7 +70,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 13 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/call-optional.optimized.wat b/tests/compiler/call-optional.optimized.wat index 58f70b73c6..16a404bf6c 100644 --- a/tests/compiler/call-optional.optimized.wat +++ b/tests/compiler/call-optional.optimized.wat @@ -4,7 +4,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00 \00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00 ") + (data (i32.const 24) "c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s") (table $0 2 funcref) (elem (i32.const 0) $null $call-optional/opt|trampoline) (global $~lib/argc (mut i32) (i32.const 0)) @@ -64,7 +65,7 @@ i32.add if i32.const 0 - i32.const 16 + i32.const 24 i32.const 4 i32.const 0 call $~lib/builtins/abort @@ -102,7 +103,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 5 i32.const 0 call $~lib/builtins/abort @@ -117,7 +118,7 @@ call_indirect (type $FUNCSIG$iiii) if i32.const 0 - i32.const 16 + i32.const 24 i32.const 9 i32.const 0 call $~lib/builtins/abort @@ -134,7 +135,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 10 i32.const 0 call $~lib/builtins/abort @@ -151,7 +152,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 11 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/call-optional.untouched.wat b/tests/compiler/call-optional.untouched.wat index 9b15b88d8c..622f6af336 100644 --- a/tests/compiler/call-optional.untouched.wat +++ b/tests/compiler/call-optional.untouched.wat @@ -4,7 +4,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00 \00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s\00") (table $0 2 funcref) (elem (i32.const 0) $null $call-optional/opt|trampoline) (global $~lib/argc (mut i32) (i32.const 0)) @@ -55,7 +55,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 4 i32.const 0 call $~lib/builtins/abort @@ -74,7 +74,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 5 i32.const 0 call $~lib/builtins/abort @@ -89,7 +89,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 6 i32.const 0 call $~lib/builtins/abort @@ -109,7 +109,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 9 i32.const 0 call $~lib/builtins/abort @@ -129,7 +129,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 10 i32.const 0 call $~lib/builtins/abort @@ -149,7 +149,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 11 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 7c78e198ff..e5c9ddb6bf 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -6,8 +6,10 @@ (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 56) "\10\00\00\00\1a\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00\1a") + (data (i32.const 80) "c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) @@ -79,7 +81,7 @@ i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -92,24 +94,24 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 16 i32.add ) (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 92 + i32.const 108 i32.le_u if i32.const 0 - i32.const 16 - i32.const 131 + i32.const 24 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $2 i32.load @@ -117,8 +119,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 133 + i32.const 24 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -147,7 +149,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 8 i32.const 4 call $~lib/builtins/abort @@ -171,7 +173,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 17 i32.const 4 call $~lib/builtins/abort @@ -183,7 +185,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 18 i32.const 4 call $~lib/builtins/abort @@ -200,7 +202,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 24 i32.const 2 call $~lib/builtins/abort @@ -212,7 +214,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 25 i32.const 2 call $~lib/builtins/abort @@ -246,7 +248,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 40 i32.const 4 call $~lib/builtins/abort @@ -258,7 +260,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 41 i32.const 4 call $~lib/builtins/abort @@ -275,7 +277,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 47 i32.const 2 call $~lib/builtins/abort @@ -287,7 +289,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 48 i32.const 2 call $~lib/builtins/abort @@ -313,7 +315,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 58 i32.const 4 call $~lib/builtins/abort @@ -337,7 +339,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 68 i32.const 2 call $~lib/builtins/abort @@ -349,7 +351,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 69 i32.const 2 call $~lib/builtins/abort @@ -390,7 +392,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 86 i32.const 2 call $~lib/builtins/abort @@ -402,7 +404,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 87 i32.const 2 call $~lib/builtins/abort @@ -443,7 +445,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 106 i32.const 2 call $~lib/builtins/abort @@ -455,7 +457,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 107 i32.const 2 call $~lib/builtins/abort @@ -463,7 +465,7 @@ end ) (func $start (; 15 ;) (type $FUNCSIG$v) - i32.const 96 + i32.const 112 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index 8d93e72756..a98336e811 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -5,16 +5,16 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 56) "\10\00\00\00\1a\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 92)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 108)) (export "memory" (memory $0)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -137,8 +137,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 131 + i32.const 24 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -154,8 +154,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 133 + i32.const 24 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -187,7 +187,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 8 i32.const 4 call $~lib/builtins/abort @@ -217,7 +217,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 17 i32.const 4 call $~lib/builtins/abort @@ -230,7 +230,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 18 i32.const 4 call $~lib/builtins/abort @@ -250,7 +250,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 24 i32.const 2 call $~lib/builtins/abort @@ -263,7 +263,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 25 i32.const 2 call $~lib/builtins/abort @@ -307,7 +307,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 40 i32.const 4 call $~lib/builtins/abort @@ -320,7 +320,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 41 i32.const 4 call $~lib/builtins/abort @@ -340,7 +340,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 47 i32.const 2 call $~lib/builtins/abort @@ -353,7 +353,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 48 i32.const 2 call $~lib/builtins/abort @@ -382,7 +382,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 58 i32.const 4 call $~lib/builtins/abort @@ -420,7 +420,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 68 i32.const 2 call $~lib/builtins/abort @@ -433,7 +433,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 69 i32.const 2 call $~lib/builtins/abort @@ -485,7 +485,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 86 i32.const 2 call $~lib/builtins/abort @@ -498,7 +498,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 87 i32.const 2 call $~lib/builtins/abort @@ -550,7 +550,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 106 i32.const 2 call $~lib/builtins/abort @@ -563,7 +563,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 107 i32.const 2 call $~lib/builtins/abort diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index 67d5e53425..40ab207f05 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -2,7 +2,8 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\10\00\00\00c\00l\00a\00s\00s\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\10") + (data (i32.const 24) "c\00l\00a\00s\00s\00.\00t\00s") (export "memory" (memory $0)) (export "test" (func $class/test)) (func $class/test (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) diff --git a/tests/compiler/class.untouched.wat b/tests/compiler/class.untouched.wat index 35b3696e30..abba2ca051 100644 --- a/tests/compiler/class.untouched.wat +++ b/tests/compiler/class.untouched.wat @@ -8,7 +8,7 @@ (type $FUNCSIG$fiff (func (param i32 f32 f32) (result f32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\10\00\00\00c\00l\00a\00s\00s\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00c\00l\00a\00s\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $class/Animal.ONE (mut i32) (i32.const 1)) @@ -37,7 +37,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 15 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/comma.optimized.wat b/tests/compiler/comma.optimized.wat index aeef5d6d58..bc893ceb85 100644 --- a/tests/compiler/comma.optimized.wat +++ b/tests/compiler/comma.optimized.wat @@ -3,7 +3,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\10\00\00\00c\00o\00m\00m\00a\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\10") + (data (i32.const 24) "c\00o\00m\00m\00a\00.\00t\00s") (global $comma/a (mut i32) (i32.const 0)) (global $comma/b (mut i32) (i32.const 0)) (export "memory" (memory $0)) @@ -22,7 +23,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 4 i32.const 0 call $~lib/builtins/abort @@ -31,7 +32,7 @@ global.get $comma/b if i32.const 0 - i32.const 16 + i32.const 24 i32.const 5 i32.const 0 call $~lib/builtins/abort @@ -49,7 +50,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 8 i32.const 0 call $~lib/builtins/abort @@ -60,7 +61,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 9 i32.const 0 call $~lib/builtins/abort @@ -82,7 +83,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 14 i32.const 0 call $~lib/builtins/abort @@ -93,7 +94,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 15 i32.const 0 call $~lib/builtins/abort @@ -113,7 +114,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 18 i32.const 0 call $~lib/builtins/abort @@ -124,7 +125,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 19 i32.const 0 call $~lib/builtins/abort @@ -154,7 +155,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 22 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/comma.untouched.wat b/tests/compiler/comma.untouched.wat index 51b4d314c0..10dffbc5af 100644 --- a/tests/compiler/comma.untouched.wat +++ b/tests/compiler/comma.untouched.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\10\00\00\00c\00o\00m\00m\00a\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00c\00o\00m\00m\00a\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $comma/a (mut i32) (i32.const 0)) @@ -32,7 +32,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 4 i32.const 0 call $~lib/builtins/abort @@ -44,7 +44,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 5 i32.const 0 call $~lib/builtins/abort @@ -64,7 +64,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 8 i32.const 0 call $~lib/builtins/abort @@ -76,7 +76,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 9 i32.const 0 call $~lib/builtins/abort @@ -103,7 +103,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 14 i32.const 0 call $~lib/builtins/abort @@ -115,7 +115,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 15 i32.const 0 call $~lib/builtins/abort @@ -140,7 +140,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 18 i32.const 0 call $~lib/builtins/abort @@ -152,7 +152,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 19 i32.const 0 call $~lib/builtins/abort @@ -189,7 +189,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 22 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index 6956bc0d45..fd3e5742c2 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -6,7 +6,8 @@ (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $constructor/emptyCtor (mut i32) (i32.const 0)) @@ -89,7 +90,7 @@ i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -102,24 +103,24 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 16 i32.add ) (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 56 + i32.const 64 i32.le_u if i32.const 0 - i32.const 16 - i32.const 131 + i32.const 24 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $2 i32.load @@ -127,8 +128,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 133 + i32.const 24 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -163,7 +164,7 @@ ) (func $start:constructor (; 5 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 56 + i32.const 64 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index b0b552a029..f21f00bbb4 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -5,10 +5,10 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) @@ -24,7 +24,7 @@ (global $constructor/ctorConditionallyReturns (mut i32) (i32.const 0)) (global $constructor/ctorAllocates (mut i32) (i32.const 0)) (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) (export "memory" (memory $0)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -147,8 +147,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 131 + i32.const 24 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -164,8 +164,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 133 + i32.const 24 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/declare.optimized.wat b/tests/compiler/declare.optimized.wat index cc7663d131..59f7a991f1 100644 --- a/tests/compiler/declare.optimized.wat +++ b/tests/compiler/declare.optimized.wat @@ -7,7 +7,8 @@ (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "declare" "my.externalFunction" (func $declare/my.externalFunction)) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\14\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\14") + (data (i32.const 24) "d\00e\00c\00l\00a\00r\00e\00.\00t\00s") (export "memory" (memory $0)) (start $start) (func $start:declare (; 3 ;) (type $FUNCSIG$v) @@ -17,7 +18,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 5 i32.const 0 call $~lib/builtins/abort @@ -29,7 +30,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 13 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/declare.untouched.wat b/tests/compiler/declare.untouched.wat index 074031b92e..fd3e834382 100644 --- a/tests/compiler/declare.untouched.wat +++ b/tests/compiler/declare.untouched.wat @@ -7,7 +7,7 @@ (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "declare" "my.externalFunction" (func $declare/my.externalFunction)) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\14\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (export "memory" (memory $0)) @@ -20,7 +20,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 5 i32.const 0 call $~lib/builtins/abort @@ -33,7 +33,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 13 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index b23a5d2642..b803d61537 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -3,7 +3,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\n\00\00\00d\00o\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\n") + (data (i32.const 24) "d\00o\00.\00t\00s") (global $do/n (mut i32) (i32.const 10)) (global $do/m (mut i32) (i32.const 0)) (global $do/o (mut i32) (i32.const 0)) @@ -26,7 +27,7 @@ global.get $do/n if i32.const 0 - i32.const 16 + i32.const 24 i32.const 7 i32.const 0 call $~lib/builtins/abort @@ -37,7 +38,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 8 i32.const 0 call $~lib/builtins/abort @@ -59,7 +60,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -93,7 +94,7 @@ global.get $do/n if i32.const 0 - i32.const 16 + i32.const 24 i32.const 24 i32.const 2 call $~lib/builtins/abort @@ -104,7 +105,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 25 i32.const 2 call $~lib/builtins/abort @@ -116,7 +117,7 @@ global.get $do/n if i32.const 0 - i32.const 16 + i32.const 24 i32.const 27 i32.const 0 call $~lib/builtins/abort @@ -127,7 +128,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -138,7 +139,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 29 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/do.untouched.wat b/tests/compiler/do.untouched.wat index 8194184797..8aea2d55bd 100644 --- a/tests/compiler/do.untouched.wat +++ b/tests/compiler/do.untouched.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\n\00\00\00d\00o\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00d\00o\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $do/n (mut i32) (i32.const 10)) @@ -35,7 +35,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 7 i32.const 0 call $~lib/builtins/abort @@ -47,7 +47,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 8 i32.const 0 call $~lib/builtins/abort @@ -75,7 +75,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -118,7 +118,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 24 i32.const 2 call $~lib/builtins/abort @@ -130,7 +130,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 25 i32.const 2 call $~lib/builtins/abort @@ -147,7 +147,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 27 i32.const 0 call $~lib/builtins/abort @@ -159,7 +159,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -171,7 +171,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 29 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index 55fa3e4e30..8b61e3de14 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -8,7 +8,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (global $exports/Animal.CAT i32 (i32.const 0)) (global $exports/Animal.DOG i32 (i32.const 1)) (global $exports/animals.Animal.CAT i32 (i32.const 0)) @@ -127,7 +128,7 @@ ) (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) - i32.const 16 + i32.const 32 call $~lib/allocator/arena/__mem_allocate local.tee $0 i32.const -1520547049 @@ -136,24 +137,24 @@ i32.const 4 i32.store offset=4 local.get $0 - i32.const 8 + i32.const 16 i32.add ) (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 56 + i32.const 64 i32.le_u if i32.const 0 - i32.const 16 - i32.const 131 + i32.const 24 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $2 i32.load @@ -161,8 +162,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 133 + i32.const 24 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -185,7 +186,7 @@ nop ) (func $start (; 10 ;) (type $FUNCSIG$v) - i32.const 56 + i32.const 64 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 54436b1f7d..0559c3a692 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -8,7 +8,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $exports/Animal.CAT i32 (i32.const 0)) @@ -18,12 +18,12 @@ (global $exports/Car.TIRES i32 (i32.const 4)) (global $exports/vehicles.Car.TIRES i32 (i32.const 4)) (global $exports/outer.inner.a i32 (i32.const 42)) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) (global $~lib/argc (mut i32) (i32.const 0)) (global $exports/Car i32 (i32.const 17)) (global $exports/vehicles.Car i32 (i32.const 18)) @@ -194,8 +194,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 131 + i32.const 24 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -211,8 +211,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 133 + i32.const 24 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index d7a3cce84d..ef845db0db 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -3,7 +3,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\0c\00\00\00f\00o\00r\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\0c") + (data (i32.const 24) "f\00o\00r\00.\00t\00s") (global $for/i (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $start) @@ -30,7 +31,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 5 i32.const 0 call $~lib/builtins/abort @@ -65,7 +66,7 @@ global.get $for/i if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -113,7 +114,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 19 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/for.untouched.wat b/tests/compiler/for.untouched.wat index e7477e413e..44747e30e2 100644 --- a/tests/compiler/for.untouched.wat +++ b/tests/compiler/for.untouched.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\0c\00\00\00f\00o\00r\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $for/i (mut i32) (i32.const 0)) @@ -39,7 +39,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 5 i32.const 0 call $~lib/builtins/abort @@ -87,7 +87,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -163,7 +163,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 19 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/function-expression.optimized.wat b/tests/compiler/function-expression.optimized.wat index 7ef1ebc03f..3d0d23d1ac 100644 --- a/tests/compiler/function-expression.optimized.wat +++ b/tests/compiler/function-expression.optimized.wat @@ -6,7 +6,8 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00,\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00,") + (data (i32.const 24) "f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s") (table $0 11 funcref) (elem (i32.const 0) $start:function-expression~someName $start:function-expression~anonymous|0 $start:function-expression~anonymous|0 $start:function-expression~someName $start:function-expression~anonymous|2 $start:function-expression~anonymous|3 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5 $start:function-expression~anonymous|3 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5) (global $function-expression/f1 (mut i32) (i32.const 1)) @@ -46,7 +47,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 4 i32.const 0 call $~lib/builtins/abort @@ -61,7 +62,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 9 i32.const 0 call $~lib/builtins/abort @@ -79,7 +80,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 16 i32.const 0 call $~lib/builtins/abort @@ -89,13 +90,12 @@ global.set $~lib/argc i32.const 1 i32.const 2 - i32.const 5 - call_indirect (type $FUNCSIG$iii) + call $start:function-expression~anonymous|3 i32.const 3 i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 21 i32.const 0 call $~lib/builtins/abort @@ -105,13 +105,12 @@ global.set $~lib/argc i32.const 1 i32.const 2 - i32.const 6 - call_indirect (type $FUNCSIG$iii) + call $start:function-expression~anonymous|4 i32.const 1 i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 22 i32.const 0 call $~lib/builtins/abort @@ -121,13 +120,12 @@ global.set $~lib/argc i32.const 1 i32.const 2 - i32.const 7 - call_indirect (type $FUNCSIG$iii) + call $start:function-expression~anonymous|5 i32.const 42 i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 23 i32.const 0 call $~lib/builtins/abort @@ -137,13 +135,12 @@ global.set $~lib/argc i32.const 1 i32.const 2 - i32.const 8 - call_indirect (type $FUNCSIG$iii) + call $start:function-expression~anonymous|3 i32.const 3 i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 34 i32.const 0 call $~lib/builtins/abort @@ -153,13 +150,12 @@ global.set $~lib/argc i32.const 1 i32.const 2 - i32.const 9 - call_indirect (type $FUNCSIG$iii) + call $start:function-expression~anonymous|4 i32.const 1 i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 35 i32.const 0 call $~lib/builtins/abort @@ -169,13 +165,12 @@ global.set $~lib/argc i32.const 1 i32.const 2 - i32.const 10 - call_indirect (type $FUNCSIG$iii) + call $start:function-expression~anonymous|5 i32.const 42 i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 36 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/function-expression.untouched.wat b/tests/compiler/function-expression.untouched.wat index d780c0d354..7bd630c33c 100644 --- a/tests/compiler/function-expression.untouched.wat +++ b/tests/compiler/function-expression.untouched.wat @@ -6,7 +6,7 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00,\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00,\00\00\00\00\00\00\00\00\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s\00") (table $0 11 funcref) (elem (i32.const 0) $null $start:function-expression~anonymous|0 $start:function-expression~anonymous|1 $start:function-expression~someName $start:function-expression~anonymous|2 $start:function-expression~anonymous|3 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5 $function-expression/testOmittedReturn1~anonymous|0 $function-expression/testOmittedReturn2~anonymous|0 $function-expression/testOmittedReturn3~anonymous|0) (global $function-expression/f1 (mut i32) (i32.const 1)) @@ -80,7 +80,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 4 i32.const 0 call $~lib/builtins/abort @@ -98,7 +98,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 9 i32.const 0 call $~lib/builtins/abort @@ -121,7 +121,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 16 i32.const 0 call $~lib/builtins/abort @@ -134,7 +134,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 21 i32.const 0 call $~lib/builtins/abort @@ -147,7 +147,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 22 i32.const 0 call $~lib/builtins/abort @@ -160,7 +160,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 23 i32.const 0 call $~lib/builtins/abort @@ -179,7 +179,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 34 i32.const 0 call $~lib/builtins/abort @@ -198,7 +198,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 35 i32.const 0 call $~lib/builtins/abort @@ -217,7 +217,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 36 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/function-types.optimized.wat b/tests/compiler/function-types.optimized.wat index 57cfbfcdca..a2d5700513 100644 --- a/tests/compiler/function-types.optimized.wat +++ b/tests/compiler/function-types.optimized.wat @@ -6,7 +6,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\"\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\"") + (data (i32.const 24) "f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s") (table $0 5 funcref) (elem (i32.const 0) $null $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0) (global $function-types/i32Adder (mut i32) (i32.const 0)) @@ -43,7 +44,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 11 i32.const 0 call $~lib/builtins/abort @@ -61,7 +62,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 15 i32.const 0 call $~lib/builtins/abort @@ -71,13 +72,12 @@ global.set $~lib/argc f64.const 1.5 f64.const 2.5 - i32.const 3 - call_indirect (type $FUNCSIG$ddd) + call $function-types/makeAdder~anonymous|0 f64.const 4 f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 17 i32.const 0 call $~lib/builtins/abort @@ -93,7 +93,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 23 i32.const 0 call $~lib/builtins/abort @@ -103,13 +103,12 @@ global.set $~lib/argc i32.const 3 i32.const 4 - i32.const 1 - call_indirect (type $FUNCSIG$iii) + call $function-types/makeAdder~anonymous|0 i32.const 7 i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 29 i32.const 0 call $~lib/builtins/abort @@ -119,13 +118,12 @@ global.set $~lib/argc i32.const 4 i32.const 5 - i32.const 4 - call_indirect (type $FUNCSIG$iii) + call $function-types/makeAdder~anonymous|0 i32.const 9 i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 35 i32.const 0 call $~lib/builtins/abort @@ -156,7 +154,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 41 i32.const 0 call $~lib/builtins/abort @@ -166,13 +164,12 @@ global.set $~lib/argc i32.const 1 i32.const 2 - i32.const 1 - call_indirect (type $FUNCSIG$iii) + call $function-types/makeAdder~anonymous|0 i32.const 3 i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 42 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/function-types.untouched.wat b/tests/compiler/function-types.untouched.wat index 2fda5a8d1a..fb90ab7a0c 100644 --- a/tests/compiler/function-types.untouched.wat +++ b/tests/compiler/function-types.untouched.wat @@ -8,7 +8,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\"\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s\00") (table $0 5 funcref) (elem (i32.const 0) $null $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/addI32) (global $function-types/i32Adder (mut i32) (i32.const 0)) @@ -104,7 +104,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 11 i32.const 0 call $~lib/builtins/abort @@ -125,7 +125,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 15 i32.const 0 call $~lib/builtins/abort @@ -144,7 +144,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 17 i32.const 0 call $~lib/builtins/abort @@ -159,7 +159,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 23 i32.const 0 call $~lib/builtins/abort @@ -173,7 +173,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 29 i32.const 0 call $~lib/builtins/abort @@ -188,7 +188,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 35 i32.const 0 call $~lib/builtins/abort @@ -207,7 +207,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 41 i32.const 0 call $~lib/builtins/abort @@ -222,7 +222,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 42 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/gc.optimized.wat b/tests/compiler/gc.optimized.wat index efc7378e23..a31527ee67 100644 --- a/tests/compiler/gc.optimized.wat +++ b/tests/compiler/gc.optimized.wat @@ -35,10 +35,8 @@ (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "main" (func $gc/main)) - (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -146,7 +144,7 @@ if i32.const 0 i32.const 24 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -161,7 +159,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/gc.untouched.wat b/tests/compiler/gc.untouched.wat index 11ad485066..6a09c64b0b 100644 --- a/tests/compiler/gc.untouched.wat +++ b/tests/compiler/gc.untouched.wat @@ -36,10 +36,8 @@ (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 244)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "main" (func $gc/main)) - (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 @@ -184,7 +182,7 @@ if i32.const 0 i32.const 24 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -201,7 +199,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/gc/global-assign.optimized.wat b/tests/compiler/gc/global-assign.optimized.wat index 78321a5a4f..cead2b5618 100644 --- a/tests/compiler/gc/global-assign.optimized.wat +++ b/tests/compiler/gc/global-assign.optimized.wat @@ -23,10 +23,8 @@ (global $gc/global-assign/global (mut i32) (i32.const 0)) (global $gc/global-assign/globalRef (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "main" (func $gc/global-assign/main)) - (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -134,7 +132,7 @@ if i32.const 0 i32.const 24 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -149,7 +147,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/gc/global-assign.untouched.wat b/tests/compiler/gc/global-assign.untouched.wat index 7204ebc425..e8172bc044 100644 --- a/tests/compiler/gc/global-assign.untouched.wat +++ b/tests/compiler/gc/global-assign.untouched.wat @@ -33,10 +33,8 @@ (global $gc/global-assign/globalRef (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 160)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "main" (func $gc/global-assign/main)) - (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 @@ -181,7 +179,7 @@ if i32.const 0 i32.const 24 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -198,7 +196,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/gc/global-init.optimized.wat b/tests/compiler/gc/global-init.optimized.wat index f95cc5db8e..61e7bdda3c 100644 --- a/tests/compiler/gc/global-init.optimized.wat +++ b/tests/compiler/gc/global-init.optimized.wat @@ -22,10 +22,8 @@ (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $gc/global-init/global (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "main" (func $gc/global-init/main)) - (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -133,7 +131,7 @@ if i32.const 0 i32.const 24 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -148,7 +146,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/gc/global-init.untouched.wat b/tests/compiler/gc/global-init.untouched.wat index 27c57d88c1..83fbe478a4 100644 --- a/tests/compiler/gc/global-init.untouched.wat +++ b/tests/compiler/gc/global-init.untouched.wat @@ -32,10 +32,8 @@ (global $gc/global-init/global (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 156)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "main" (func $gc/global-init/main)) - (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 @@ -180,7 +178,7 @@ if i32.const 0 i32.const 24 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -197,7 +195,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/gc/itcm/trace.optimized.wat b/tests/compiler/gc/itcm/trace.optimized.wat index c28cf99b33..49923f7244 100644 --- a/tests/compiler/gc/itcm/trace.optimized.wat +++ b/tests/compiler/gc/itcm/trace.optimized.wat @@ -75,10 +75,8 @@ (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "main" (func $gc/itcm/trace/main)) - (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -338,7 +336,7 @@ if i32.const 0 i32.const 128 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -353,7 +351,7 @@ if i32.const 0 i32.const 128 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -986,7 +984,7 @@ if i32.const 0 i32.const 128 - i32.const 91 + i32.const 89 i32.const 8 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/gc/itcm/trace.untouched.wat b/tests/compiler/gc/itcm/trace.untouched.wat index 3e9d32a2f4..992f483bbf 100644 --- a/tests/compiler/gc/itcm/trace.untouched.wat +++ b/tests/compiler/gc/itcm/trace.untouched.wat @@ -55,10 +55,8 @@ (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 1452)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "main" (func $gc/itcm/trace/main)) - (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 @@ -388,7 +386,7 @@ if i32.const 0 i32.const 128 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -405,7 +403,7 @@ if i32.const 0 i32.const 128 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -1241,7 +1239,7 @@ if i32.const 0 i32.const 128 - i32.const 91 + i32.const 89 i32.const 8 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/gc/rc/global-assign.optimized.wat b/tests/compiler/gc/rc/global-assign.optimized.wat index 7b5857ed50..b766d5ffbc 100644 --- a/tests/compiler/gc/rc/global-assign.optimized.wat +++ b/tests/compiler/gc/rc/global-assign.optimized.wat @@ -29,10 +29,8 @@ (global $gc/rc/global-assign/global (mut i32) (i32.const 0)) (global $gc/rc/global-assign/globalRef (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "main" (func $gc/rc/global-assign/main)) - (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -140,7 +138,7 @@ if i32.const 0 i32.const 24 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -155,7 +153,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/gc/rc/global-assign.untouched.wat b/tests/compiler/gc/rc/global-assign.untouched.wat index fd25552427..e7c7619ca2 100644 --- a/tests/compiler/gc/rc/global-assign.untouched.wat +++ b/tests/compiler/gc/rc/global-assign.untouched.wat @@ -31,10 +31,8 @@ (global $gc/rc/global-assign/globalRef (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 244)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "main" (func $gc/rc/global-assign/main)) - (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 @@ -179,7 +177,7 @@ if i32.const 0 i32.const 24 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -196,7 +194,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/gc/rc/global-init.optimized.wat b/tests/compiler/gc/rc/global-init.optimized.wat index 416f9d1e60..8d6c4f0587 100644 --- a/tests/compiler/gc/rc/global-init.optimized.wat +++ b/tests/compiler/gc/rc/global-init.optimized.wat @@ -25,10 +25,8 @@ (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $gc/rc/global-init/global (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "main" (func $gc/rc/global-init/main)) - (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -136,7 +134,7 @@ if i32.const 0 i32.const 24 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -151,7 +149,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/gc/rc/global-init.untouched.wat b/tests/compiler/gc/rc/global-init.untouched.wat index e5bd882596..861cf46bf3 100644 --- a/tests/compiler/gc/rc/global-init.untouched.wat +++ b/tests/compiler/gc/rc/global-init.untouched.wat @@ -29,10 +29,8 @@ (global $gc/rc/global-init/global (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 200)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "main" (func $gc/rc/global-init/main)) - (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 @@ -177,7 +175,7 @@ if i32.const 0 i32.const 24 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -194,7 +192,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 9988295b26..aa1c104a2e 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -5,7 +5,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 2 funcref) (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -79,18 +80,18 @@ (func $~lib/util/runtime/register (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 56 + i32.const 64 i32.le_u if i32.const 0 - i32.const 16 - i32.const 131 + i32.const 24 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $1 i32.load @@ -98,8 +99,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 133 + i32.const 24 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -114,7 +115,7 @@ ) (func $getter-call/test (; 4 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) - i32.const 8 + i32.const 16 call $~lib/allocator/arena/__mem_allocate local.tee $0 i32.const -1520547049 @@ -123,17 +124,16 @@ i32.const 0 i32.store offset=4 local.get $0 - i32.const 8 + i32.const 16 i32.add call $~lib/util/runtime/register drop i32.const 0 global.set $~lib/argc - i32.const 1 - call_indirect (type $FUNCSIG$i) + call $getter-call/C#get:x~anonymous|0 ) (func $start (; 5 ;) (type $FUNCSIG$v) - i32.const 56 + i32.const 64 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index 32c2a69d26..9870e0b2d8 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -6,16 +6,16 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 2 funcref) (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|0) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) (export "memory" (memory $0)) (export "test" (func $getter-call/test)) (start $start) @@ -139,8 +139,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 131 + i32.const 24 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -156,8 +156,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 133 + i32.const 24 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/getter-setter.optimized.wat b/tests/compiler/getter-setter.optimized.wat index d9e77d97b9..913fab817b 100644 --- a/tests/compiler/getter-setter.optimized.wat +++ b/tests/compiler/getter-setter.optimized.wat @@ -3,7 +3,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00 \00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00 ") + (data (i32.const 24) "g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s") (global $getter-setter/Foo._bar (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $start) @@ -11,7 +12,7 @@ global.get $getter-setter/Foo._bar if i32.const 0 - i32.const 16 + i32.const 24 i32.const 13 i32.const 0 call $~lib/builtins/abort @@ -24,7 +25,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 15 i32.const 0 call $~lib/builtins/abort @@ -37,7 +38,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 16 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/getter-setter.untouched.wat b/tests/compiler/getter-setter.untouched.wat index 5d1df0ec3b..f72e11e21d 100644 --- a/tests/compiler/getter-setter.untouched.wat +++ b/tests/compiler/getter-setter.untouched.wat @@ -5,7 +5,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00 \00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $getter-setter/Foo._bar (mut i32) (i32.const 0)) @@ -25,7 +25,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 13 i32.const 0 call $~lib/builtins/abort @@ -39,7 +39,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 15 i32.const 0 call $~lib/builtins/abort @@ -55,7 +55,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 16 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/if.optimized.wat b/tests/compiler/if.optimized.wat index 3f1f4a974a..d2091eb409 100644 --- a/tests/compiler/if.optimized.wat +++ b/tests/compiler/if.optimized.wat @@ -4,7 +4,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\n\00\00\00i\00f\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\n") + (data (i32.const 24) "i\00f\00.\00t\00s") (export "memory" (memory $0)) (export "ifThenElse" (func $if/ifThenElse)) (export "ifThen" (func $if/ifThen)) @@ -30,7 +31,7 @@ i32.const 1 else i32.const 0 - i32.const 16 + i32.const 24 i32.const 37 i32.const 4 call $~lib/builtins/abort diff --git a/tests/compiler/if.untouched.wat b/tests/compiler/if.untouched.wat index 2db3f63e1c..38af3f87b8 100644 --- a/tests/compiler/if.untouched.wat +++ b/tests/compiler/if.untouched.wat @@ -4,7 +4,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\n\00\00\00i\00f\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00i\00f\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (export "memory" (memory $0)) @@ -53,7 +53,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 8 i32.const 0 call $~lib/builtins/abort @@ -66,7 +66,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 9 i32.const 0 call $~lib/builtins/abort @@ -79,7 +79,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 17 i32.const 0 call $~lib/builtins/abort @@ -92,7 +92,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 18 i32.const 0 call $~lib/builtins/abort @@ -105,7 +105,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 30 i32.const 0 call $~lib/builtins/abort @@ -118,7 +118,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 31 i32.const 0 call $~lib/builtins/abort @@ -132,7 +132,7 @@ return else i32.const 0 - i32.const 16 + i32.const 24 i32.const 37 i32.const 4 call $~lib/builtins/abort diff --git a/tests/compiler/infer-type.optimized.wat b/tests/compiler/infer-type.optimized.wat index 0d76d221a7..73fe1d5615 100644 --- a/tests/compiler/infer-type.optimized.wat +++ b/tests/compiler/infer-type.optimized.wat @@ -1,7 +1,8 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1a\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\1a") + (data (i32.const 24) "i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s") (global $infer-type/ri (mut i32) (i32.const 0)) (global $infer-type/rI (mut i64) (i64.const 0)) (global $infer-type/rf (mut f32) (f32.const 0)) diff --git a/tests/compiler/infer-type.untouched.wat b/tests/compiler/infer-type.untouched.wat index 2fd7c456af..d5bed29cd4 100644 --- a/tests/compiler/infer-type.untouched.wat +++ b/tests/compiler/infer-type.untouched.wat @@ -7,7 +7,7 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1a\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $infer-type/i i32 (i32.const 10)) @@ -107,7 +107,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 49 i32.const 0 call $~lib/builtins/abort @@ -117,7 +117,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 52 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/inlining-blocklocals.optimized.wat b/tests/compiler/inlining-blocklocals.optimized.wat index 54e6d33648..2720b80de0 100644 --- a/tests/compiler/inlining-blocklocals.optimized.wat +++ b/tests/compiler/inlining-blocklocals.optimized.wat @@ -3,7 +3,8 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00.\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00-\00b\00l\00o\00c\00k\00l\00o\00c\00a\00l\00s\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00.") + (data (i32.const 24) "i\00n\00l\00i\00n\00i\00n\00g\00-\00b\00l\00o\00c\00k\00l\00o\00c\00a\00l\00s\00.\00t\00s") (global $inlining-blocklocals/b (mut i32) (i32.const 2)) (global $inlining-blocklocals/theCall_a (mut i32) (i32.const 0)) (global $inlining-blocklocals/theCall_b (mut i32) (i32.const 0)) @@ -25,7 +26,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 16 i32.const 2 call $~lib/builtins/abort @@ -36,7 +37,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 17 i32.const 2 call $~lib/builtins/abort diff --git a/tests/compiler/inlining-blocklocals.untouched.wat b/tests/compiler/inlining-blocklocals.untouched.wat index 7c784ef86a..4c3525983d 100644 --- a/tests/compiler/inlining-blocklocals.untouched.wat +++ b/tests/compiler/inlining-blocklocals.untouched.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00.\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00-\00b\00l\00o\00c\00k\00l\00o\00c\00a\00l\00s\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00.\00\00\00\00\00\00\00\00\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00-\00b\00l\00o\00c\00k\00l\00o\00c\00a\00l\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $inlining-blocklocals/b (mut i32) (i32.const 2)) @@ -41,7 +41,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 16 i32.const 2 call $~lib/builtins/abort @@ -53,7 +53,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 17 i32.const 2 call $~lib/builtins/abort diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index 2e896e630e..3d3c6a99f0 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -6,8 +6,10 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\16\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s") - (data (i32.const 40) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\16") + (data (i32.const 24) "i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s") + (data (i32.const 48) "\10\00\00\00(") + (data (i32.const 64) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 2 funcref) (elem (i32.const 0) $null $inlining/func_fe~anonymous|0) (global $~lib/argc (mut i32) (i32.const 0)) @@ -26,13 +28,12 @@ i32.const 1 global.set $~lib/argc i32.const 2 - i32.const 1 - call_indirect (type $FUNCSIG$ii) + call $inlining/func_fe~anonymous|0 i32.const 2 i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 68 i32.const 2 call $~lib/builtins/abort @@ -106,7 +107,7 @@ i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -119,24 +120,24 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 16 i32.add ) (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 88 + i32.const 104 i32.le_u if i32.const 0 - i32.const 48 - i32.const 131 + i32.const 64 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $2 i32.load @@ -144,8 +145,8 @@ i32.ne if i32.const 0 - i32.const 48 - i32.const 133 + i32.const 64 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -194,7 +195,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 97 i32.const 2 call $~lib/builtins/abort @@ -206,7 +207,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 98 i32.const 2 call $~lib/builtins/abort @@ -218,7 +219,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 99 i32.const 2 call $~lib/builtins/abort @@ -230,7 +231,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 100 i32.const 2 call $~lib/builtins/abort @@ -239,7 +240,7 @@ ) (func $start (; 8 ;) (type $FUNCSIG$v) call $inlining/test_funcs - i32.const 88 + i32.const 104 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 015ff4dc97..b6b2b2e32a 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -6,18 +6,18 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\16\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 40) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 48) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 2 funcref) (elem (i32.const 0) $null $inlining/func_fe~anonymous|0) (global $inlining/constantGlobal i32 (i32.const 1)) (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 88)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 104)) (export "memory" (memory $0)) (export "test" (func $inlining/test)) (start $start) @@ -66,7 +66,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 60 i32.const 2 call $~lib/builtins/abort @@ -96,7 +96,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 61 i32.const 2 call $~lib/builtins/abort @@ -126,7 +126,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 62 i32.const 2 call $~lib/builtins/abort @@ -142,7 +142,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 63 i32.const 2 call $~lib/builtins/abort @@ -158,7 +158,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 64 i32.const 2 call $~lib/builtins/abort @@ -184,7 +184,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 65 i32.const 2 call $~lib/builtins/abort @@ -210,7 +210,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 66 i32.const 2 call $~lib/builtins/abort @@ -234,7 +234,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 68 i32.const 2 call $~lib/builtins/abort @@ -254,7 +254,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 69 i32.const 2 call $~lib/builtins/abort @@ -276,7 +276,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 71 i32.const 2 call $~lib/builtins/abort @@ -403,8 +403,8 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 131 + i32.const 64 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -420,8 +420,8 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 133 + i32.const 64 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -497,7 +497,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 97 i32.const 2 call $~lib/builtins/abort @@ -510,7 +510,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 98 i32.const 2 call $~lib/builtins/abort @@ -523,7 +523,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 99 i32.const 2 call $~lib/builtins/abort @@ -536,7 +536,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 100 i32.const 2 call $~lib/builtins/abort @@ -550,7 +550,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 10 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/instanceof.optimized.wat b/tests/compiler/instanceof.optimized.wat index 65f4112a6c..58056cd07a 100644 --- a/tests/compiler/instanceof.optimized.wat +++ b/tests/compiler/instanceof.optimized.wat @@ -3,7 +3,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1a\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\1a") + (data (i32.const 24) "i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s") (global $instanceof/an (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $start) @@ -11,7 +12,7 @@ global.get $instanceof/an if i32.const 0 - i32.const 16 + i32.const 24 i32.const 68 i32.const 0 call $~lib/builtins/abort @@ -23,7 +24,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 71 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/instanceof.untouched.wat b/tests/compiler/instanceof.untouched.wat index 938ce3304f..964e5f12ce 100644 --- a/tests/compiler/instanceof.untouched.wat +++ b/tests/compiler/instanceof.untouched.wat @@ -5,7 +5,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1a\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $instanceof/a (mut i32) (i32.const 0)) @@ -90,7 +90,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 11 i32.const 0 call $~lib/builtins/abort @@ -104,7 +104,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -119,7 +119,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 13 i32.const 0 call $~lib/builtins/abort @@ -134,7 +134,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 14 i32.const 0 call $~lib/builtins/abort @@ -149,7 +149,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 15 i32.const 0 call $~lib/builtins/abort @@ -164,7 +164,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 16 i32.const 0 call $~lib/builtins/abort @@ -178,7 +178,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 19 i32.const 0 call $~lib/builtins/abort @@ -193,7 +193,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 20 i32.const 0 call $~lib/builtins/abort @@ -208,7 +208,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 21 i32.const 0 call $~lib/builtins/abort @@ -223,7 +223,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 22 i32.const 0 call $~lib/builtins/abort @@ -238,7 +238,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 23 i32.const 0 call $~lib/builtins/abort @@ -253,7 +253,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 25 i32.const 0 call $~lib/builtins/abort @@ -268,7 +268,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 26 i32.const 0 call $~lib/builtins/abort @@ -282,7 +282,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 27 i32.const 0 call $~lib/builtins/abort @@ -297,7 +297,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -312,7 +312,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 29 i32.const 0 call $~lib/builtins/abort @@ -327,7 +327,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 30 i32.const 0 call $~lib/builtins/abort @@ -342,7 +342,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 32 i32.const 0 call $~lib/builtins/abort @@ -357,7 +357,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 33 i32.const 0 call $~lib/builtins/abort @@ -372,7 +372,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 34 i32.const 0 call $~lib/builtins/abort @@ -386,7 +386,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 35 i32.const 0 call $~lib/builtins/abort @@ -401,7 +401,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 36 i32.const 0 call $~lib/builtins/abort @@ -416,7 +416,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 37 i32.const 0 call $~lib/builtins/abort @@ -431,7 +431,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 39 i32.const 0 call $~lib/builtins/abort @@ -446,7 +446,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 40 i32.const 0 call $~lib/builtins/abort @@ -461,7 +461,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 41 i32.const 0 call $~lib/builtins/abort @@ -476,7 +476,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 42 i32.const 0 call $~lib/builtins/abort @@ -490,7 +490,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 43 i32.const 0 call $~lib/builtins/abort @@ -505,7 +505,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 44 i32.const 0 call $~lib/builtins/abort @@ -520,7 +520,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 46 i32.const 0 call $~lib/builtins/abort @@ -535,7 +535,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 47 i32.const 0 call $~lib/builtins/abort @@ -550,7 +550,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 48 i32.const 0 call $~lib/builtins/abort @@ -565,7 +565,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 49 i32.const 0 call $~lib/builtins/abort @@ -580,7 +580,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 50 i32.const 0 call $~lib/builtins/abort @@ -594,7 +594,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 51 i32.const 0 call $~lib/builtins/abort @@ -605,7 +605,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 62 i32.const 0 call $~lib/builtins/abort @@ -617,7 +617,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 63 i32.const 0 call $~lib/builtins/abort @@ -629,7 +629,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 64 i32.const 0 call $~lib/builtins/abort @@ -641,7 +641,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 65 i32.const 0 call $~lib/builtins/abort @@ -654,7 +654,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 68 i32.const 0 call $~lib/builtins/abort @@ -668,7 +668,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 69 i32.const 0 call $~lib/builtins/abort @@ -682,7 +682,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 71 i32.const 0 call $~lib/builtins/abort @@ -696,7 +696,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 72 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/logical.optimized.wat b/tests/compiler/logical.optimized.wat index 8fa227a97c..f6f188bfe2 100644 --- a/tests/compiler/logical.optimized.wat +++ b/tests/compiler/logical.optimized.wat @@ -3,7 +3,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\14\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\14") + (data (i32.const 24) "l\00o\00g\00i\00c\00a\00l\00.\00t\00s") (global $logical/i (mut i32) (i32.const 0)) (global $logical/I (mut i64) (i64.const 0)) (global $logical/f (mut f32) (f32.const 0)) @@ -18,7 +19,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -31,7 +32,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 15 i32.const 0 call $~lib/builtins/abort @@ -44,7 +45,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 20 i32.const 0 call $~lib/builtins/abort @@ -57,7 +58,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 23 i32.const 0 call $~lib/builtins/abort @@ -70,7 +71,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -83,7 +84,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 31 i32.const 0 call $~lib/builtins/abort @@ -96,7 +97,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 36 i32.const 0 call $~lib/builtins/abort @@ -109,7 +110,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 39 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/logical.untouched.wat b/tests/compiler/logical.untouched.wat index 0020b70633..9e67493c0f 100644 --- a/tests/compiler/logical.untouched.wat +++ b/tests/compiler/logical.untouched.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\14\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $logical/i (mut i32) (i32.const 0)) @@ -90,7 +90,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -109,7 +109,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 15 i32.const 0 call $~lib/builtins/abort @@ -130,7 +130,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 20 i32.const 0 call $~lib/builtins/abort @@ -151,7 +151,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 23 i32.const 0 call $~lib/builtins/abort @@ -172,7 +172,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -193,7 +193,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 31 i32.const 0 call $~lib/builtins/abort @@ -214,7 +214,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 36 i32.const 0 call $~lib/builtins/abort @@ -235,7 +235,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 39 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/many-locals.optimized.wat b/tests/compiler/many-locals.optimized.wat index c25c037f68..53e206bd23 100644 --- a/tests/compiler/many-locals.optimized.wat +++ b/tests/compiler/many-locals.optimized.wat @@ -2,7 +2,8 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1c\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\1c") + (data (i32.const 24) "m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s") (export "memory" (memory $0)) (export "testI32" (func $many-locals/testI32)) (export "testI8" (func $many-locals/testI8)) diff --git a/tests/compiler/many-locals.untouched.wat b/tests/compiler/many-locals.untouched.wat index 6e2721607f..7229e7671d 100644 --- a/tests/compiler/many-locals.untouched.wat +++ b/tests/compiler/many-locals.untouched.wat @@ -4,7 +4,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1c\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (export "memory" (memory $0)) @@ -797,7 +797,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 133 i32.const 0 call $~lib/builtins/abort @@ -810,7 +810,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 267 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/memcpy.optimized.wat b/tests/compiler/memcpy.optimized.wat index 2237d7a4f8..27fa46a9c3 100644 --- a/tests/compiler/memcpy.optimized.wat +++ b/tests/compiler/memcpy.optimized.wat @@ -4,7 +4,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\12\00\00\00m\00e\00m\00c\00p\00y\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\12") + (data (i32.const 24) "m\00e\00m\00c\00p\00y\00.\00t\00s") (global $memcpy/dest (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "memcpy" (func $memcpy/memcpy)) @@ -884,7 +885,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 151 i32.const 0 call $~lib/builtins/abort @@ -896,7 +897,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 152 i32.const 0 call $~lib/builtins/abort @@ -912,7 +913,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 155 i32.const 0 call $~lib/builtins/abort @@ -924,7 +925,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 156 i32.const 0 call $~lib/builtins/abort @@ -936,7 +937,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 157 i32.const 0 call $~lib/builtins/abort @@ -948,7 +949,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 158 i32.const 0 call $~lib/builtins/abort @@ -960,7 +961,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 159 i32.const 0 call $~lib/builtins/abort @@ -977,7 +978,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 162 i32.const 0 call $~lib/builtins/abort @@ -994,7 +995,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 165 i32.const 0 call $~lib/builtins/abort @@ -1006,7 +1007,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 166 i32.const 0 call $~lib/builtins/abort @@ -1018,7 +1019,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 167 i32.const 0 call $~lib/builtins/abort @@ -1030,7 +1031,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 168 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/memcpy.untouched.wat b/tests/compiler/memcpy.untouched.wat index 98a170321e..24a043ac9f 100644 --- a/tests/compiler/memcpy.untouched.wat +++ b/tests/compiler/memcpy.untouched.wat @@ -4,7 +4,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\12\00\00\00m\00e\00m\00c\00p\00y\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00m\00e\00m\00c\00p\00y\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $memcpy/base i32 (i32.const 8)) @@ -1242,7 +1242,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 151 i32.const 0 call $~lib/builtins/abort @@ -1255,7 +1255,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 152 i32.const 0 call $~lib/builtins/abort @@ -1272,7 +1272,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 155 i32.const 0 call $~lib/builtins/abort @@ -1285,7 +1285,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 156 i32.const 0 call $~lib/builtins/abort @@ -1300,7 +1300,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 157 i32.const 0 call $~lib/builtins/abort @@ -1315,7 +1315,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 158 i32.const 0 call $~lib/builtins/abort @@ -1330,7 +1330,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 159 i32.const 0 call $~lib/builtins/abort @@ -1352,7 +1352,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 162 i32.const 0 call $~lib/builtins/abort @@ -1374,7 +1374,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 165 i32.const 0 call $~lib/builtins/abort @@ -1389,7 +1389,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 166 i32.const 0 call $~lib/builtins/abort @@ -1404,7 +1404,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 167 i32.const 0 call $~lib/builtins/abort @@ -1419,7 +1419,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 168 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/memmove.optimized.wat b/tests/compiler/memmove.optimized.wat index ffd5a371ee..0c411976ab 100644 --- a/tests/compiler/memmove.optimized.wat +++ b/tests/compiler/memmove.optimized.wat @@ -4,7 +4,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\14\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\14") + (data (i32.const 24) "m\00e\00m\00m\00o\00v\00e\00.\00t\00s") (global $memmove/dest (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $start) @@ -213,7 +214,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 55 i32.const 0 call $~lib/builtins/abort @@ -225,7 +226,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 56 i32.const 0 call $~lib/builtins/abort @@ -241,7 +242,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 59 i32.const 0 call $~lib/builtins/abort @@ -253,7 +254,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 60 i32.const 0 call $~lib/builtins/abort @@ -265,7 +266,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 61 i32.const 0 call $~lib/builtins/abort @@ -277,7 +278,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 62 i32.const 0 call $~lib/builtins/abort @@ -289,7 +290,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 63 i32.const 0 call $~lib/builtins/abort @@ -306,7 +307,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 66 i32.const 0 call $~lib/builtins/abort @@ -323,7 +324,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 69 i32.const 0 call $~lib/builtins/abort @@ -335,7 +336,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 70 i32.const 0 call $~lib/builtins/abort @@ -347,7 +348,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 71 i32.const 0 call $~lib/builtins/abort @@ -359,7 +360,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 72 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/memmove.untouched.wat b/tests/compiler/memmove.untouched.wat index 0880c12496..0b35b3900d 100644 --- a/tests/compiler/memmove.untouched.wat +++ b/tests/compiler/memmove.untouched.wat @@ -4,7 +4,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\14\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $memmove/base i32 (i32.const 8)) @@ -259,7 +259,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 55 i32.const 0 call $~lib/builtins/abort @@ -272,7 +272,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 56 i32.const 0 call $~lib/builtins/abort @@ -289,7 +289,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 59 i32.const 0 call $~lib/builtins/abort @@ -302,7 +302,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 60 i32.const 0 call $~lib/builtins/abort @@ -317,7 +317,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 61 i32.const 0 call $~lib/builtins/abort @@ -332,7 +332,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 62 i32.const 0 call $~lib/builtins/abort @@ -347,7 +347,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 63 i32.const 0 call $~lib/builtins/abort @@ -369,7 +369,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 66 i32.const 0 call $~lib/builtins/abort @@ -391,7 +391,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 69 i32.const 0 call $~lib/builtins/abort @@ -406,7 +406,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 70 i32.const 0 call $~lib/builtins/abort @@ -421,7 +421,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 71 i32.const 0 call $~lib/builtins/abort @@ -436,7 +436,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 72 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/memset.optimized.wat b/tests/compiler/memset.optimized.wat index 0eafaf8260..44cf52957b 100644 --- a/tests/compiler/memset.optimized.wat +++ b/tests/compiler/memset.optimized.wat @@ -4,7 +4,8 @@ (type $FUNCSIG$viii (func (param i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\12\00\00\00m\00e\00m\00s\00e\00t\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\12") + (data (i32.const 24) "m\00e\00m\00s\00e\00t\00.\00t\00s") (global $memset/dest (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $start) @@ -234,7 +235,7 @@ end ) (func $start:memset (; 2 ;) (type $FUNCSIG$v) - i32.const 36 + i32.const 44 global.set $memset/dest global.get $memset/dest i32.const 1 @@ -246,7 +247,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 72 i32.const 0 call $~lib/builtins/abort @@ -260,7 +261,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 73 i32.const 0 call $~lib/builtins/abort @@ -278,7 +279,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 77 i32.const 0 call $~lib/builtins/abort @@ -292,7 +293,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 78 i32.const 0 call $~lib/builtins/abort @@ -306,7 +307,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 79 i32.const 0 call $~lib/builtins/abort @@ -320,7 +321,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 80 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/memset.untouched.wat b/tests/compiler/memset.untouched.wat index b278734452..1423ed49d1 100644 --- a/tests/compiler/memset.untouched.wat +++ b/tests/compiler/memset.untouched.wat @@ -4,11 +4,11 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\12\00\00\00m\00e\00m\00s\00e\00t\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00m\00e\00m\00s\00e\00t\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $memset/dest (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 36)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) (start $start) (func $memset/memset (; 1 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -290,7 +290,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 72 i32.const 0 call $~lib/builtins/abort @@ -305,7 +305,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 73 i32.const 0 call $~lib/builtins/abort @@ -325,7 +325,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 77 i32.const 0 call $~lib/builtins/abort @@ -340,7 +340,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 78 i32.const 0 call $~lib/builtins/abort @@ -355,7 +355,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 79 i32.const 0 call $~lib/builtins/abort @@ -370,7 +370,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 80 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 4a6aeaa6c9..fecf4a30c8 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -9,31 +9,55 @@ (type $FUNCSIG$iijijij (func (param i32 i64 i32 i64 i32 i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\02\00\00\000") - (data (i32.const 24) "\0f\00\00\00\90\01\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 432) "\11\00\00\00\10\00\00\00 \00\00\00 \00\00\00\90\01\00\00d") - (data (i32.const 456) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 504) "\10\00\00\00\02\00\00\001") - (data (i32.const 520) "\10\00\00\00\12\00\00\00n\00u\00m\00b\00e\00r\00.\00t\00s") - (data (i32.const 552) "\10\00\00\00\06\00\00\000\00.\000") - (data (i32.const 568) "\10\00\00\00\06\00\00\00N\00a\00N") - (data (i32.const 584) "\10\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 616) "\10\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 640) "\0f\00\00\00\b8\02\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8#__unchecked_get global.set $~lib/util/number/_frc_pow - i32.const 1560 + i32.const 1672 local.get $13 call $~lib/array/Array#__unchecked_get global.set $~lib/util/number/_exp_pow @@ -2191,7 +2191,7 @@ i32.eqz if i32.const 0 - i32.const 1656 + i32.const 1792 i32.const 203 i32.const 4 call $~lib/builtins/abort @@ -2261,7 +2261,7 @@ local.get $3 i32.eqz if - i32.const 1696 + i32.const 1840 return end local.get $8 @@ -2309,8 +2309,8 @@ i32.eqz if i32.const 0 - i32.const 464 - i32.const 117 + i32.const 496 + i32.const 115 i32.const 4 call $~lib/builtins/abort unreachable @@ -2326,8 +2326,8 @@ i32.eqz if i32.const 0 - i32.const 464 - i32.const 119 + i32.const 496 + i32.const 117 i32.const 4 call $~lib/builtins/abort unreachable @@ -2343,7 +2343,7 @@ f64.const 0 f64.eq if - i32.const 560 + i32.const 616 return end local.get $0 @@ -2353,11 +2353,11 @@ local.get $0 call $~lib/builtins/isNaN if - i32.const 576 + i32.const 640 return end - i32.const 592 - i32.const 624 + i32.const 664 + i32.const 704 local.get $0 f64.const 0 f64.lt @@ -2391,9 +2391,9 @@ i32.const 0 i32.ne if (result i32) - i32.const 1784 + i32.const 1976 else - i32.const 1800 + i32.const 2000 end ) (func $~lib/builtins/isNaN (; 29 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) @@ -2482,12 +2482,12 @@ global.set $~lib/allocator/arena/offset global.get $number/a call $~lib/number/I32#toString - i32.const 512 + i32.const 552 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 7 i32.const 0 call $~lib/builtins/abort @@ -2495,12 +2495,12 @@ end f64.const 2 call $~lib/number/F64#toString - i32.const 1704 + i32.const 1856 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 9 i32.const 0 call $~lib/builtins/abort @@ -2508,12 +2508,12 @@ end i32.const 3 call $~lib/number/I32#toString - i32.const 1720 + i32.const 1880 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 10 i32.const 0 call $~lib/builtins/abort @@ -2521,12 +2521,12 @@ end i32.const -5 call $~lib/number/I32#toString - i32.const 1736 + i32.const 1904 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -2534,12 +2534,12 @@ end i32.const 4 call $~lib/number/I32#toString - i32.const 1752 + i32.const 1928 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 13 i32.const 0 call $~lib/builtins/abort @@ -2554,12 +2554,12 @@ local.get $0 end call $~lib/number/I32#toString - i32.const 1768 + i32.const 1952 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 14 i32.const 0 call $~lib/builtins/abort @@ -2574,12 +2574,12 @@ local.get $0 end call $~lib/number/I32#toString - i32.const 512 + i32.const 552 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 15 i32.const 0 call $~lib/builtins/abort @@ -2588,12 +2588,12 @@ i32.const 0 i32.eqz call $~lib/number/Bool#toString - i32.const 1784 + i32.const 1976 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 16 i32.const 0 call $~lib/builtins/abort @@ -2602,12 +2602,12 @@ i32.const 1 i32.eqz call $~lib/number/Bool#toString - i32.const 1800 + i32.const 2000 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 17 i32.const 0 call $~lib/builtins/abort @@ -2622,12 +2622,12 @@ local.get $0 end call $~lib/number/I32#toString - i32.const 512 + i32.const 552 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 20 i32.const 0 call $~lib/builtins/abort @@ -2642,12 +2642,12 @@ local.get $0 end call $~lib/number/I32#toString - i32.const 1768 + i32.const 1952 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 21 i32.const 0 call $~lib/builtins/abort @@ -2658,7 +2658,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 25 i32.const 0 call $~lib/builtins/abort @@ -2673,7 +2673,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 27 i32.const 0 call $~lib/builtins/abort @@ -2686,7 +2686,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -2699,7 +2699,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 29 i32.const 0 call $~lib/builtins/abort @@ -2712,7 +2712,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 30 i32.const 0 call $~lib/builtins/abort @@ -2725,7 +2725,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 31 i32.const 0 call $~lib/builtins/abort @@ -2738,7 +2738,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 32 i32.const 0 call $~lib/builtins/abort @@ -2751,7 +2751,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 33 i32.const 0 call $~lib/builtins/abort @@ -2766,7 +2766,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 34 i32.const 0 call $~lib/builtins/abort @@ -2779,7 +2779,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 35 i32.const 0 call $~lib/builtins/abort @@ -2792,7 +2792,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 36 i32.const 0 call $~lib/builtins/abort @@ -2805,7 +2805,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 37 i32.const 0 call $~lib/builtins/abort @@ -2818,7 +2818,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 38 i32.const 0 call $~lib/builtins/abort @@ -2831,7 +2831,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 39 i32.const 0 call $~lib/builtins/abort @@ -2844,7 +2844,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 40 i32.const 0 call $~lib/builtins/abort @@ -2857,7 +2857,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 41 i32.const 0 call $~lib/builtins/abort @@ -2870,7 +2870,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 42 i32.const 0 call $~lib/builtins/abort @@ -2883,7 +2883,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 43 i32.const 0 call $~lib/builtins/abort @@ -2896,7 +2896,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 44 i32.const 0 call $~lib/builtins/abort @@ -2909,7 +2909,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 45 i32.const 0 call $~lib/builtins/abort @@ -2922,7 +2922,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 46 i32.const 0 call $~lib/builtins/abort @@ -2933,7 +2933,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 48 i32.const 0 call $~lib/builtins/abort @@ -2948,7 +2948,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 50 i32.const 0 call $~lib/builtins/abort @@ -2961,7 +2961,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 51 i32.const 0 call $~lib/builtins/abort @@ -2974,7 +2974,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 52 i32.const 0 call $~lib/builtins/abort @@ -2987,7 +2987,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 53 i32.const 0 call $~lib/builtins/abort @@ -3000,7 +3000,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 54 i32.const 0 call $~lib/builtins/abort @@ -3013,7 +3013,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 55 i32.const 0 call $~lib/builtins/abort @@ -3026,7 +3026,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 56 i32.const 0 call $~lib/builtins/abort @@ -3041,7 +3041,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 57 i32.const 0 call $~lib/builtins/abort @@ -3054,7 +3054,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 58 i32.const 0 call $~lib/builtins/abort @@ -3067,7 +3067,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 59 i32.const 0 call $~lib/builtins/abort @@ -3080,7 +3080,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 60 i32.const 0 call $~lib/builtins/abort @@ -3093,7 +3093,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 61 i32.const 0 call $~lib/builtins/abort @@ -3106,7 +3106,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 62 i32.const 0 call $~lib/builtins/abort @@ -3119,7 +3119,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 63 i32.const 0 call $~lib/builtins/abort @@ -3132,7 +3132,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 64 i32.const 0 call $~lib/builtins/abort @@ -3145,7 +3145,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 65 i32.const 0 call $~lib/builtins/abort @@ -3158,7 +3158,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 66 i32.const 0 call $~lib/builtins/abort @@ -3171,7 +3171,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 67 i32.const 0 call $~lib/builtins/abort @@ -3184,7 +3184,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 68 i32.const 0 call $~lib/builtins/abort @@ -3197,7 +3197,7 @@ i32.eqz if i32.const 0 - i32.const 528 + i32.const 576 i32.const 69 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 7334a7899d..8aa288831b 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -6,7 +6,8 @@ (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $optional-typeparameters/tConcrete (mut i32) (i32.const 0)) @@ -77,7 +78,7 @@ ) (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) - i32.const 8 + i32.const 16 call $~lib/allocator/arena/__mem_allocate local.tee $0 i32.const -1520547049 @@ -86,24 +87,24 @@ i32.const 0 i32.store offset=4 local.get $0 - i32.const 8 + i32.const 16 i32.add ) (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 56 + i32.const 64 i32.le_u if i32.const 0 - i32.const 16 - i32.const 131 + i32.const 24 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $2 i32.load @@ -111,8 +112,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 133 + i32.const 24 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -123,7 +124,7 @@ local.get $0 ) (func $start (; 4 ;) (type $FUNCSIG$v) - i32.const 56 + i32.const 64 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index fae84532e0..a74e88c3f2 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -7,17 +7,17 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $optional-typeparameters/tConcrete (mut i32) (i32.const 0)) (global $optional-typeparameters/tDerived (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) (export "memory" (memory $0)) (start $start) (func $optional-typeparameters/testConcrete (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -146,8 +146,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 131 + i32.const 24 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -163,8 +163,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 133 + i32.const 24 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/overflow.optimized.wat b/tests/compiler/overflow.optimized.wat index 10510005e8..5388fe30b2 100644 --- a/tests/compiler/overflow.optimized.wat +++ b/tests/compiler/overflow.optimized.wat @@ -1,7 +1,8 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\16\00\00\00o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\16") + (data (i32.const 24) "o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s") (export "memory" (memory $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop diff --git a/tests/compiler/overflow.untouched.wat b/tests/compiler/overflow.untouched.wat index c5233b0d35..ea0abbf1fd 100644 --- a/tests/compiler/overflow.untouched.wat +++ b/tests/compiler/overflow.untouched.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\16\00\00\00o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (export "memory" (memory $0)) @@ -29,7 +29,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 10 i32.const 2 call $~lib/builtins/abort @@ -49,7 +49,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 13 i32.const 2 call $~lib/builtins/abort @@ -74,7 +74,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 16 i32.const 2 call $~lib/builtins/abort @@ -99,7 +99,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 19 i32.const 2 call $~lib/builtins/abort @@ -119,7 +119,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 22 i32.const 2 call $~lib/builtins/abort @@ -139,7 +139,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 25 i32.const 2 call $~lib/builtins/abort @@ -160,7 +160,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 28 i32.const 2 call $~lib/builtins/abort @@ -181,7 +181,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 31 i32.const 2 call $~lib/builtins/abort @@ -199,7 +199,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 33 i32.const 2 call $~lib/builtins/abort @@ -223,7 +223,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 42 i32.const 2 call $~lib/builtins/abort @@ -243,7 +243,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 45 i32.const 2 call $~lib/builtins/abort @@ -268,7 +268,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 48 i32.const 2 call $~lib/builtins/abort @@ -293,7 +293,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 51 i32.const 2 call $~lib/builtins/abort @@ -313,7 +313,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 54 i32.const 2 call $~lib/builtins/abort @@ -333,7 +333,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 57 i32.const 2 call $~lib/builtins/abort @@ -354,7 +354,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 60 i32.const 2 call $~lib/builtins/abort @@ -375,7 +375,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 63 i32.const 2 call $~lib/builtins/abort @@ -393,7 +393,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 65 i32.const 2 call $~lib/builtins/abort @@ -415,7 +415,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 74 i32.const 2 call $~lib/builtins/abort @@ -433,7 +433,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 77 i32.const 2 call $~lib/builtins/abort @@ -456,7 +456,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 80 i32.const 2 call $~lib/builtins/abort @@ -479,7 +479,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 83 i32.const 2 call $~lib/builtins/abort @@ -497,7 +497,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 86 i32.const 2 call $~lib/builtins/abort @@ -515,7 +515,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 89 i32.const 2 call $~lib/builtins/abort @@ -534,7 +534,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 92 i32.const 2 call $~lib/builtins/abort @@ -553,7 +553,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 95 i32.const 2 call $~lib/builtins/abort @@ -569,7 +569,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 97 i32.const 2 call $~lib/builtins/abort @@ -591,7 +591,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 106 i32.const 2 call $~lib/builtins/abort @@ -609,7 +609,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 109 i32.const 2 call $~lib/builtins/abort @@ -632,7 +632,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 112 i32.const 2 call $~lib/builtins/abort @@ -655,7 +655,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 115 i32.const 2 call $~lib/builtins/abort @@ -673,7 +673,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 118 i32.const 2 call $~lib/builtins/abort @@ -691,7 +691,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 121 i32.const 2 call $~lib/builtins/abort @@ -710,7 +710,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 124 i32.const 2 call $~lib/builtins/abort @@ -729,7 +729,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 127 i32.const 2 call $~lib/builtins/abort @@ -745,7 +745,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 129 i32.const 2 call $~lib/builtins/abort diff --git a/tests/compiler/portable-conversions.optimized.wat b/tests/compiler/portable-conversions.optimized.wat index fd0ec7e54f..f26424d5f8 100644 --- a/tests/compiler/portable-conversions.optimized.wat +++ b/tests/compiler/portable-conversions.optimized.wat @@ -3,7 +3,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00.\00\00\00p\00o\00r\00t\00a\00b\00l\00e\00-\00c\00o\00n\00v\00e\00r\00s\00i\00o\00n\00s\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00.") + (data (i32.const 24) "p\00o\00r\00t\00a\00b\00l\00e\00-\00c\00o\00n\00v\00e\00r\00s\00i\00o\00n\00s\00.\00t\00s") (global $portable-conversions/i (mut i32) (i32.const 1)) (global $portable-conversions/I (mut i64) (i64.const 1)) (global $portable-conversions/f (mut f32) (f32.const 1)) @@ -17,7 +18,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 6 i32.const 0 call $~lib/builtins/abort @@ -30,7 +31,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 7 i32.const 0 call $~lib/builtins/abort @@ -43,7 +44,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 8 i32.const 0 call $~lib/builtins/abort @@ -56,7 +57,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 9 i32.const 0 call $~lib/builtins/abort @@ -68,7 +69,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 11 i32.const 0 call $~lib/builtins/abort @@ -81,7 +82,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -94,7 +95,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 13 i32.const 0 call $~lib/builtins/abort @@ -107,7 +108,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 14 i32.const 0 call $~lib/builtins/abort @@ -117,7 +118,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 16 i32.const 0 call $~lib/builtins/abort @@ -128,7 +129,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 17 i32.const 0 call $~lib/builtins/abort @@ -139,7 +140,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 18 i32.const 0 call $~lib/builtins/abort @@ -150,7 +151,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 19 i32.const 0 call $~lib/builtins/abort @@ -161,7 +162,7 @@ i64.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 21 i32.const 0 call $~lib/builtins/abort @@ -171,7 +172,7 @@ i64.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 22 i32.const 0 call $~lib/builtins/abort @@ -182,7 +183,7 @@ i64.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 23 i32.const 0 call $~lib/builtins/abort @@ -193,7 +194,7 @@ i64.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -203,7 +204,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 26 i32.const 0 call $~lib/builtins/abort @@ -214,7 +215,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 27 i32.const 0 call $~lib/builtins/abort @@ -225,7 +226,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -236,7 +237,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 29 i32.const 0 call $~lib/builtins/abort @@ -248,7 +249,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 31 i32.const 0 call $~lib/builtins/abort @@ -261,7 +262,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 32 i32.const 0 call $~lib/builtins/abort @@ -274,7 +275,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 33 i32.const 0 call $~lib/builtins/abort @@ -287,7 +288,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 34 i32.const 0 call $~lib/builtins/abort @@ -299,7 +300,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 36 i32.const 0 call $~lib/builtins/abort @@ -312,7 +313,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 37 i32.const 0 call $~lib/builtins/abort @@ -325,7 +326,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 38 i32.const 0 call $~lib/builtins/abort @@ -338,7 +339,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 39 i32.const 0 call $~lib/builtins/abort @@ -348,7 +349,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 41 i32.const 0 call $~lib/builtins/abort @@ -359,7 +360,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 42 i32.const 0 call $~lib/builtins/abort @@ -370,7 +371,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 43 i32.const 0 call $~lib/builtins/abort @@ -381,7 +382,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 44 i32.const 0 call $~lib/builtins/abort @@ -392,7 +393,7 @@ i64.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 46 i32.const 0 call $~lib/builtins/abort @@ -402,7 +403,7 @@ i64.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 47 i32.const 0 call $~lib/builtins/abort @@ -413,7 +414,7 @@ i64.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 48 i32.const 0 call $~lib/builtins/abort @@ -424,7 +425,7 @@ i64.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 49 i32.const 0 call $~lib/builtins/abort @@ -434,7 +435,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 51 i32.const 0 call $~lib/builtins/abort @@ -445,7 +446,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 52 i32.const 0 call $~lib/builtins/abort @@ -456,7 +457,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 53 i32.const 0 call $~lib/builtins/abort @@ -467,7 +468,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 54 i32.const 0 call $~lib/builtins/abort @@ -477,7 +478,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 56 i32.const 0 call $~lib/builtins/abort @@ -488,7 +489,7 @@ i64.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 57 i32.const 0 call $~lib/builtins/abort @@ -499,7 +500,7 @@ f32.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 58 i32.const 0 call $~lib/builtins/abort @@ -510,7 +511,7 @@ f64.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 59 i32.const 0 call $~lib/builtins/abort @@ -522,7 +523,7 @@ f32.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 61 i32.const 0 call $~lib/builtins/abort @@ -534,7 +535,7 @@ f32.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 62 i32.const 0 call $~lib/builtins/abort @@ -545,7 +546,7 @@ f32.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 63 i32.const 0 call $~lib/builtins/abort @@ -557,7 +558,7 @@ f32.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 64 i32.const 0 call $~lib/builtins/abort @@ -569,7 +570,7 @@ f64.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 66 i32.const 0 call $~lib/builtins/abort @@ -581,7 +582,7 @@ f64.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 67 i32.const 0 call $~lib/builtins/abort @@ -593,7 +594,7 @@ f64.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 68 i32.const 0 call $~lib/builtins/abort @@ -604,7 +605,7 @@ f64.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 69 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/portable-conversions.untouched.wat b/tests/compiler/portable-conversions.untouched.wat index adcd1f6eb4..66015b9a78 100644 --- a/tests/compiler/portable-conversions.untouched.wat +++ b/tests/compiler/portable-conversions.untouched.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00.\00\00\00p\00o\00r\00t\00a\00b\00l\00e\00-\00c\00o\00n\00v\00e\00r\00s\00i\00o\00n\00s\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00.\00\00\00\00\00\00\00\00\00\00\00p\00o\00r\00t\00a\00b\00l\00e\00-\00c\00o\00n\00v\00e\00r\00s\00i\00o\00n\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $portable-conversions/i (mut i32) (i32.const 1)) @@ -21,7 +21,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 6 i32.const 0 call $~lib/builtins/abort @@ -36,7 +36,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 7 i32.const 0 call $~lib/builtins/abort @@ -51,7 +51,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 8 i32.const 0 call $~lib/builtins/abort @@ -66,7 +66,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 9 i32.const 0 call $~lib/builtins/abort @@ -80,7 +80,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 11 i32.const 0 call $~lib/builtins/abort @@ -95,7 +95,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -110,7 +110,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 13 i32.const 0 call $~lib/builtins/abort @@ -125,7 +125,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 14 i32.const 0 call $~lib/builtins/abort @@ -135,7 +135,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 16 i32.const 0 call $~lib/builtins/abort @@ -146,7 +146,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 17 i32.const 0 call $~lib/builtins/abort @@ -157,7 +157,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 18 i32.const 0 call $~lib/builtins/abort @@ -168,7 +168,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 19 i32.const 0 call $~lib/builtins/abort @@ -179,7 +179,7 @@ i64.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 21 i32.const 0 call $~lib/builtins/abort @@ -189,7 +189,7 @@ i64.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 22 i32.const 0 call $~lib/builtins/abort @@ -200,7 +200,7 @@ i64.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 23 i32.const 0 call $~lib/builtins/abort @@ -211,7 +211,7 @@ i64.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -221,7 +221,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 26 i32.const 0 call $~lib/builtins/abort @@ -232,7 +232,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 27 i32.const 0 call $~lib/builtins/abort @@ -243,7 +243,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -254,7 +254,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 29 i32.const 0 call $~lib/builtins/abort @@ -266,7 +266,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 31 i32.const 0 call $~lib/builtins/abort @@ -279,7 +279,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 32 i32.const 0 call $~lib/builtins/abort @@ -292,7 +292,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 33 i32.const 0 call $~lib/builtins/abort @@ -305,7 +305,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 34 i32.const 0 call $~lib/builtins/abort @@ -317,7 +317,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 36 i32.const 0 call $~lib/builtins/abort @@ -330,7 +330,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 37 i32.const 0 call $~lib/builtins/abort @@ -343,7 +343,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 38 i32.const 0 call $~lib/builtins/abort @@ -356,7 +356,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 39 i32.const 0 call $~lib/builtins/abort @@ -366,7 +366,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 41 i32.const 0 call $~lib/builtins/abort @@ -377,7 +377,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 42 i32.const 0 call $~lib/builtins/abort @@ -388,7 +388,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 43 i32.const 0 call $~lib/builtins/abort @@ -399,7 +399,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 44 i32.const 0 call $~lib/builtins/abort @@ -410,7 +410,7 @@ i64.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 46 i32.const 0 call $~lib/builtins/abort @@ -420,7 +420,7 @@ i64.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 47 i32.const 0 call $~lib/builtins/abort @@ -431,7 +431,7 @@ i64.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 48 i32.const 0 call $~lib/builtins/abort @@ -442,7 +442,7 @@ i64.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 49 i32.const 0 call $~lib/builtins/abort @@ -452,7 +452,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 51 i32.const 0 call $~lib/builtins/abort @@ -463,7 +463,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 52 i32.const 0 call $~lib/builtins/abort @@ -474,7 +474,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 53 i32.const 0 call $~lib/builtins/abort @@ -485,7 +485,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 54 i32.const 0 call $~lib/builtins/abort @@ -497,7 +497,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 56 i32.const 0 call $~lib/builtins/abort @@ -509,7 +509,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 57 i32.const 0 call $~lib/builtins/abort @@ -521,7 +521,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 58 i32.const 0 call $~lib/builtins/abort @@ -533,7 +533,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 59 i32.const 0 call $~lib/builtins/abort @@ -545,7 +545,7 @@ f32.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 61 i32.const 0 call $~lib/builtins/abort @@ -557,7 +557,7 @@ f32.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 62 i32.const 0 call $~lib/builtins/abort @@ -568,7 +568,7 @@ f32.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 63 i32.const 0 call $~lib/builtins/abort @@ -580,7 +580,7 @@ f32.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 64 i32.const 0 call $~lib/builtins/abort @@ -592,7 +592,7 @@ f64.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 66 i32.const 0 call $~lib/builtins/abort @@ -604,7 +604,7 @@ f64.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 67 i32.const 0 call $~lib/builtins/abort @@ -616,7 +616,7 @@ f64.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 68 i32.const 0 call $~lib/builtins/abort @@ -627,7 +627,7 @@ f64.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 69 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/retain-i32.optimized.wat b/tests/compiler/retain-i32.optimized.wat index fd5d368565..5a77a5e26b 100644 --- a/tests/compiler/retain-i32.optimized.wat +++ b/tests/compiler/retain-i32.optimized.wat @@ -3,7 +3,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1a\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\1a") + (data (i32.const 24) "r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s") (global $retain-i32/si (mut i32) (i32.const 0)) (global $retain-i32/ui (mut i32) (i32.const 0)) (export "memory" (memory $0)) @@ -31,7 +32,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 78 i32.const 0 call $~lib/builtins/abort @@ -44,7 +45,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 81 i32.const 0 call $~lib/builtins/abort @@ -57,7 +58,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 84 i32.const 0 call $~lib/builtins/abort @@ -70,7 +71,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 87 i32.const 0 call $~lib/builtins/abort @@ -83,7 +84,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 90 i32.const 0 call $~lib/builtins/abort @@ -96,7 +97,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 93 i32.const 0 call $~lib/builtins/abort @@ -109,7 +110,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 96 i32.const 0 call $~lib/builtins/abort @@ -122,7 +123,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 99 i32.const 0 call $~lib/builtins/abort @@ -135,7 +136,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 102 i32.const 0 call $~lib/builtins/abort @@ -146,7 +147,7 @@ global.get $retain-i32/si if i32.const 0 - i32.const 16 + i32.const 24 i32.const 105 i32.const 0 call $~lib/builtins/abort @@ -159,7 +160,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 108 i32.const 0 call $~lib/builtins/abort @@ -172,7 +173,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 113 i32.const 0 call $~lib/builtins/abort @@ -185,7 +186,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 116 i32.const 0 call $~lib/builtins/abort @@ -198,7 +199,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 119 i32.const 0 call $~lib/builtins/abort @@ -211,7 +212,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 122 i32.const 0 call $~lib/builtins/abort @@ -224,7 +225,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 125 i32.const 0 call $~lib/builtins/abort @@ -237,7 +238,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 128 i32.const 0 call $~lib/builtins/abort @@ -248,7 +249,7 @@ global.get $retain-i32/ui if i32.const 0 - i32.const 16 + i32.const 24 i32.const 131 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/retain-i32.untouched.wat b/tests/compiler/retain-i32.untouched.wat index 90e4952e2b..93dd760466 100644 --- a/tests/compiler/retain-i32.untouched.wat +++ b/tests/compiler/retain-i32.untouched.wat @@ -4,7 +4,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1a\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/builtins/i8.MAX_VALUE i32 (i32.const 127)) @@ -39,7 +39,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 4 i32.const 2 call $~lib/builtins/abort @@ -63,7 +63,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 5 i32.const 2 call $~lib/builtins/abort @@ -87,7 +87,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 6 i32.const 2 call $~lib/builtins/abort @@ -111,7 +111,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 7 i32.const 2 call $~lib/builtins/abort @@ -135,7 +135,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 8 i32.const 2 call $~lib/builtins/abort @@ -159,7 +159,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 9 i32.const 2 call $~lib/builtins/abort @@ -183,7 +183,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 10 i32.const 2 call $~lib/builtins/abort @@ -203,7 +203,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 13 i32.const 2 call $~lib/builtins/abort @@ -223,7 +223,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 14 i32.const 2 call $~lib/builtins/abort @@ -243,7 +243,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 15 i32.const 2 call $~lib/builtins/abort @@ -263,7 +263,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 16 i32.const 2 call $~lib/builtins/abort @@ -283,7 +283,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 17 i32.const 2 call $~lib/builtins/abort @@ -303,7 +303,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 18 i32.const 2 call $~lib/builtins/abort @@ -323,7 +323,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 19 i32.const 2 call $~lib/builtins/abort @@ -473,7 +473,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 78 i32.const 0 call $~lib/builtins/abort @@ -495,7 +495,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 81 i32.const 0 call $~lib/builtins/abort @@ -515,7 +515,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 84 i32.const 0 call $~lib/builtins/abort @@ -535,7 +535,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 87 i32.const 0 call $~lib/builtins/abort @@ -555,7 +555,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 90 i32.const 0 call $~lib/builtins/abort @@ -575,7 +575,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 93 i32.const 0 call $~lib/builtins/abort @@ -595,7 +595,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 96 i32.const 0 call $~lib/builtins/abort @@ -611,7 +611,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 99 i32.const 0 call $~lib/builtins/abort @@ -627,7 +627,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 102 i32.const 0 call $~lib/builtins/abort @@ -643,7 +643,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 105 i32.const 0 call $~lib/builtins/abort @@ -659,7 +659,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 108 i32.const 0 call $~lib/builtins/abort @@ -679,7 +679,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 113 i32.const 0 call $~lib/builtins/abort @@ -699,7 +699,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 116 i32.const 0 call $~lib/builtins/abort @@ -717,7 +717,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 119 i32.const 0 call $~lib/builtins/abort @@ -735,7 +735,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 122 i32.const 0 call $~lib/builtins/abort @@ -751,7 +751,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 125 i32.const 0 call $~lib/builtins/abort @@ -767,7 +767,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 128 i32.const 0 call $~lib/builtins/abort @@ -783,7 +783,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 131 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/runtime-arena.optimized.wat b/tests/compiler/runtime-arena.optimized.wat index 84b7f875cc..70b2203325 100644 --- a/tests/compiler/runtime-arena.optimized.wat +++ b/tests/compiler/runtime-arena.optimized.wat @@ -6,9 +6,11 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 56) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 96) "\11\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00\1e") + (data (i32.const 80) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 112) "\11\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) @@ -24,13 +26,13 @@ (start $start) (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load local.tee $0 if (result i32) local.get $0 - i32.const 96 + i32.const 112 i32.load i32.le_u else @@ -48,7 +50,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 96 + i32.const 112 i32.add i32.load offset=4 local.tee $0 @@ -65,7 +67,7 @@ i32.eqz if local.get $0 - i32.const 96 + i32.const 112 i32.load i32.gt_u local.set $1 @@ -77,7 +79,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 96 + i32.const 112 i32.add i32.load end @@ -149,7 +151,7 @@ i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -162,24 +164,24 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 16 i32.add ) (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 240 + i32.const 256 i32.le_u if i32.const 0 - i32.const 16 - i32.const 131 + i32.const 24 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $2 i32.load @@ -187,8 +189,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 133 + i32.const 24 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -229,7 +231,7 @@ local.get $2 else local.get $0 - i32.const 96 + i32.const 112 i32.load i32.gt_u end @@ -239,7 +241,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 96 + i32.const 112 i32.add i32.load end @@ -252,7 +254,7 @@ local.get $1 if (result i32) local.get $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 else @@ -296,7 +298,7 @@ i32.load if i32.const 0 - i32.const 64 + i32.const 80 i32.const 97 i32.const 15 call $~lib/builtins/abort @@ -317,14 +319,14 @@ ) (func $~lib/runtime/runtime.collect (; 11 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 64 + i32.const 80 i32.const 139 i32.const 9 call $~lib/builtins/abort unreachable ) (func $start (; 12 ;) (type $FUNCSIG$v) - i32.const 240 + i32.const 256 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset diff --git a/tests/compiler/runtime-arena.untouched.wat b/tests/compiler/runtime-arena.untouched.wat index 0930f7a27c..4f82fb75c2 100644 --- a/tests/compiler/runtime-arena.untouched.wat +++ b/tests/compiler/runtime-arena.untouched.wat @@ -6,18 +6,18 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 56) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 96) "\11\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 112) "\11\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/runtime/RTTI_BASE i32 (i32.const 96)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 240)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 112)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 256)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -216,8 +216,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 131 + i32.const 24 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -233,8 +233,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 133 + i32.const 24 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -341,7 +341,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 97 i32.const 15 call $~lib/builtins/abort @@ -368,7 +368,7 @@ ) (func $~lib/runtime/runtime.collect (; 15 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 64 + i32.const 80 i32.const 139 i32.const 9 call $~lib/builtins/abort diff --git a/tests/compiler/runtime-default.optimized.wat b/tests/compiler/runtime-default.optimized.wat index bbe9419dd1..cee27ccd09 100644 --- a/tests/compiler/runtime-default.optimized.wat +++ b/tests/compiler/runtime-default.optimized.wat @@ -21,7 +21,6 @@ (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -32,7 +31,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.release)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -1339,7 +1337,7 @@ if i32.const 0 i32.const 88 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -1354,7 +1352,7 @@ if i32.const 0 i32.const 88 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/runtime-default.untouched.wat b/tests/compiler/runtime-default.untouched.wat index 377157bd4b..57c79cd8b7 100644 --- a/tests/compiler/runtime-default.untouched.wat +++ b/tests/compiler/runtime-default.untouched.wat @@ -42,7 +42,6 @@ (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/runtime/RTTI_BASE i32 (i32.const 128)) (global $~lib/memory/HEAP_BASE i32 (i32.const 280)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -53,7 +52,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.release)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -1630,7 +1628,7 @@ if i32.const 0 i32.const 88 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -1647,7 +1645,7 @@ if i32.const 0 i32.const 88 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/runtime/flags.optimized.wat b/tests/compiler/runtime/flags.optimized.wat index 98c86df6d5..bd9956a2e9 100644 --- a/tests/compiler/runtime/flags.optimized.wat +++ b/tests/compiler/runtime/flags.optimized.wat @@ -27,7 +27,6 @@ (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -38,7 +37,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.release)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/runtime/runtime.flags (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -2210,7 +2208,7 @@ if i32.const 0 i32.const 136 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -2225,7 +2223,7 @@ if i32.const 0 i32.const 136 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/runtime/flags.untouched.wat b/tests/compiler/runtime/flags.untouched.wat index 424ae076ff..128e165455 100644 --- a/tests/compiler/runtime/flags.untouched.wat +++ b/tests/compiler/runtime/flags.untouched.wat @@ -45,7 +45,6 @@ (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/runtime/RTTI_BASE i32 (i32.const 176)) (global $~lib/memory/HEAP_BASE i32 (i32.const 656)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -56,7 +55,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.release)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/runtime/runtime.flags (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -2378,7 +2376,7 @@ if i32.const 0 i32.const 136 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -2395,7 +2393,7 @@ if i32.const 0 i32.const 136 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/runtime/instanceof.optimized.wat b/tests/compiler/runtime/instanceof.optimized.wat index e88a955f11..843f42d356 100644 --- a/tests/compiler/runtime/instanceof.optimized.wat +++ b/tests/compiler/runtime/instanceof.optimized.wat @@ -45,7 +45,6 @@ (global $runtime/instanceof/nullBlackcat (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "main" (func $runtime/instanceof/main)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) @@ -57,7 +56,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.release)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -172,7 +170,7 @@ if i32.const 0 i32.const 24 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -187,7 +185,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/runtime/instanceof.untouched.wat b/tests/compiler/runtime/instanceof.untouched.wat index 48a2618ccb..1b646882c3 100644 --- a/tests/compiler/runtime/instanceof.untouched.wat +++ b/tests/compiler/runtime/instanceof.untouched.wat @@ -47,7 +47,6 @@ (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/runtime/RTTI_BASE i32 (i32.const 280)) (global $~lib/memory/HEAP_BASE i32 (i32.const 456)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "main" (func $runtime/instanceof/main)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) @@ -59,7 +58,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.release)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 @@ -204,7 +202,7 @@ if i32.const 0 i32.const 24 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -221,7 +219,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/simd.optimized.wat b/tests/compiler/simd.optimized.wat index 93b7e87c8e..78cef42102 100644 --- a/tests/compiler/simd.optimized.wat +++ b/tests/compiler/simd.optimized.wat @@ -1,7 +1,8 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\11\00\00\00\0e\00\00\00s\00i\00m\00d\00.\00t\00s") + (data (i32.const 8) "\11\00\00\00\0e") + (data (i32.const 24) "s\00i\00m\00d\00.\00t\00s") (export "memory" (memory $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop diff --git a/tests/compiler/simd.untouched.wat b/tests/compiler/simd.untouched.wat index 8077a4753e..a90a70d500 100644 --- a/tests/compiler/simd.untouched.wat +++ b/tests/compiler/simd.untouched.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\11\00\00\00\0e\00\00\00s\00i\00m\00d\00.\00t\00s\00") + (data (i32.const 8) "\11\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00s\00i\00m\00d\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/ASC_FEATURE_SIMD i32 (i32.const 0)) @@ -19,7 +19,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 5 i32.const 2 call $~lib/builtins/abort @@ -34,7 +34,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 10 i32.const 2 call $~lib/builtins/abort @@ -51,7 +51,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 16 i32.const 2 call $~lib/builtins/abort @@ -68,7 +68,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 23 i32.const 2 call $~lib/builtins/abort @@ -85,7 +85,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 30 i32.const 2 call $~lib/builtins/abort @@ -101,7 +101,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 37 i32.const 2 call $~lib/builtins/abort @@ -119,7 +119,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 43 i32.const 2 call $~lib/builtins/abort @@ -145,7 +145,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 60 i32.const 2 call $~lib/builtins/abort @@ -163,7 +163,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 62 i32.const 2 call $~lib/builtins/abort @@ -182,7 +182,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 64 i32.const 2 call $~lib/builtins/abort @@ -199,7 +199,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 65 i32.const 2 call $~lib/builtins/abort @@ -216,7 +216,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 66 i32.const 2 call $~lib/builtins/abort @@ -232,7 +232,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 67 i32.const 2 call $~lib/builtins/abort @@ -249,7 +249,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 72 i32.const 2 call $~lib/builtins/abort @@ -266,7 +266,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 73 i32.const 2 call $~lib/builtins/abort @@ -281,7 +281,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 74 i32.const 2 call $~lib/builtins/abort @@ -298,7 +298,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 75 i32.const 2 call $~lib/builtins/abort @@ -315,7 +315,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 80 i32.const 2 call $~lib/builtins/abort @@ -334,7 +334,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 85 i32.const 2 call $~lib/builtins/abort @@ -353,7 +353,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 91 i32.const 2 call $~lib/builtins/abort @@ -372,7 +372,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 97 i32.const 2 call $~lib/builtins/abort @@ -391,7 +391,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 103 i32.const 2 call $~lib/builtins/abort @@ -410,7 +410,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 109 i32.const 2 call $~lib/builtins/abort @@ -429,7 +429,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 110 i32.const 2 call $~lib/builtins/abort @@ -448,7 +448,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 111 i32.const 2 call $~lib/builtins/abort @@ -463,7 +463,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 112 i32.const 2 call $~lib/builtins/abort @@ -479,7 +479,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 113 i32.const 2 call $~lib/builtins/abort @@ -511,7 +511,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 118 i32.const 2 call $~lib/builtins/abort @@ -528,7 +528,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 119 i32.const 2 call $~lib/builtins/abort @@ -545,7 +545,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 120 i32.const 2 call $~lib/builtins/abort @@ -562,7 +562,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 121 i32.const 2 call $~lib/builtins/abort @@ -579,7 +579,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 122 i32.const 2 call $~lib/builtins/abort @@ -596,7 +596,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 123 i32.const 2 call $~lib/builtins/abort @@ -613,7 +613,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 124 i32.const 2 call $~lib/builtins/abort @@ -630,7 +630,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 125 i32.const 2 call $~lib/builtins/abort @@ -647,7 +647,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 126 i32.const 2 call $~lib/builtins/abort @@ -664,7 +664,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 127 i32.const 2 call $~lib/builtins/abort @@ -690,7 +690,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 132 i32.const 2 call $~lib/builtins/abort @@ -708,7 +708,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 134 i32.const 2 call $~lib/builtins/abort @@ -727,7 +727,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 136 i32.const 2 call $~lib/builtins/abort @@ -744,7 +744,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 137 i32.const 2 call $~lib/builtins/abort @@ -761,7 +761,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 138 i32.const 2 call $~lib/builtins/abort @@ -777,7 +777,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 139 i32.const 2 call $~lib/builtins/abort @@ -794,7 +794,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 144 i32.const 2 call $~lib/builtins/abort @@ -811,7 +811,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 145 i32.const 2 call $~lib/builtins/abort @@ -826,7 +826,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 146 i32.const 2 call $~lib/builtins/abort @@ -843,7 +843,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 147 i32.const 2 call $~lib/builtins/abort @@ -860,7 +860,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 152 i32.const 2 call $~lib/builtins/abort @@ -879,7 +879,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 157 i32.const 2 call $~lib/builtins/abort @@ -898,7 +898,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 163 i32.const 2 call $~lib/builtins/abort @@ -917,7 +917,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 169 i32.const 2 call $~lib/builtins/abort @@ -936,7 +936,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 175 i32.const 2 call $~lib/builtins/abort @@ -955,7 +955,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 181 i32.const 2 call $~lib/builtins/abort @@ -974,7 +974,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 182 i32.const 2 call $~lib/builtins/abort @@ -993,7 +993,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 183 i32.const 2 call $~lib/builtins/abort @@ -1008,7 +1008,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 184 i32.const 2 call $~lib/builtins/abort @@ -1024,7 +1024,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 185 i32.const 2 call $~lib/builtins/abort @@ -1056,7 +1056,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 190 i32.const 2 call $~lib/builtins/abort @@ -1073,7 +1073,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 191 i32.const 2 call $~lib/builtins/abort @@ -1090,7 +1090,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 192 i32.const 2 call $~lib/builtins/abort @@ -1107,7 +1107,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 193 i32.const 2 call $~lib/builtins/abort @@ -1124,7 +1124,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 194 i32.const 2 call $~lib/builtins/abort @@ -1141,7 +1141,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 195 i32.const 2 call $~lib/builtins/abort @@ -1158,7 +1158,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 196 i32.const 2 call $~lib/builtins/abort @@ -1175,7 +1175,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 197 i32.const 2 call $~lib/builtins/abort @@ -1192,7 +1192,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 198 i32.const 2 call $~lib/builtins/abort @@ -1209,7 +1209,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 199 i32.const 2 call $~lib/builtins/abort @@ -1235,7 +1235,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 204 i32.const 2 call $~lib/builtins/abort @@ -1253,7 +1253,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 206 i32.const 2 call $~lib/builtins/abort @@ -1272,7 +1272,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 208 i32.const 2 call $~lib/builtins/abort @@ -1289,7 +1289,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 209 i32.const 2 call $~lib/builtins/abort @@ -1306,7 +1306,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 210 i32.const 2 call $~lib/builtins/abort @@ -1322,7 +1322,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 211 i32.const 2 call $~lib/builtins/abort @@ -1335,7 +1335,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 216 i32.const 2 call $~lib/builtins/abort @@ -1348,7 +1348,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 217 i32.const 2 call $~lib/builtins/abort @@ -1365,7 +1365,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 218 i32.const 2 call $~lib/builtins/abort @@ -1382,7 +1382,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 223 i32.const 2 call $~lib/builtins/abort @@ -1401,7 +1401,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 228 i32.const 2 call $~lib/builtins/abort @@ -1420,7 +1420,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 229 i32.const 2 call $~lib/builtins/abort @@ -1439,7 +1439,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 230 i32.const 2 call $~lib/builtins/abort @@ -1454,7 +1454,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 231 i32.const 2 call $~lib/builtins/abort @@ -1470,7 +1470,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 232 i32.const 2 call $~lib/builtins/abort @@ -1502,7 +1502,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 237 i32.const 2 call $~lib/builtins/abort @@ -1519,7 +1519,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 238 i32.const 2 call $~lib/builtins/abort @@ -1536,7 +1536,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 239 i32.const 2 call $~lib/builtins/abort @@ -1553,7 +1553,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 240 i32.const 2 call $~lib/builtins/abort @@ -1570,7 +1570,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 241 i32.const 2 call $~lib/builtins/abort @@ -1587,7 +1587,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 242 i32.const 2 call $~lib/builtins/abort @@ -1604,7 +1604,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 243 i32.const 2 call $~lib/builtins/abort @@ -1621,7 +1621,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 244 i32.const 2 call $~lib/builtins/abort @@ -1638,7 +1638,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 245 i32.const 2 call $~lib/builtins/abort @@ -1655,7 +1655,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 246 i32.const 2 call $~lib/builtins/abort @@ -1673,7 +1673,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 247 i32.const 2 call $~lib/builtins/abort @@ -1691,7 +1691,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 252 i32.const 2 call $~lib/builtins/abort @@ -1713,7 +1713,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 261 i32.const 2 call $~lib/builtins/abort @@ -1731,7 +1731,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 263 i32.const 2 call $~lib/builtins/abort @@ -1750,7 +1750,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 265 i32.const 2 call $~lib/builtins/abort @@ -1767,7 +1767,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 266 i32.const 2 call $~lib/builtins/abort @@ -1783,7 +1783,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 267 i32.const 2 call $~lib/builtins/abort @@ -1796,7 +1796,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 272 i32.const 2 call $~lib/builtins/abort @@ -1809,7 +1809,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 273 i32.const 2 call $~lib/builtins/abort @@ -1826,7 +1826,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 274 i32.const 2 call $~lib/builtins/abort @@ -1843,7 +1843,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 279 i32.const 2 call $~lib/builtins/abort @@ -1862,7 +1862,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 284 i32.const 2 call $~lib/builtins/abort @@ -1881,7 +1881,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 285 i32.const 2 call $~lib/builtins/abort @@ -1900,7 +1900,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 286 i32.const 2 call $~lib/builtins/abort @@ -1915,7 +1915,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 287 i32.const 2 call $~lib/builtins/abort @@ -1931,7 +1931,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 288 i32.const 2 call $~lib/builtins/abort @@ -1949,7 +1949,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 289 i32.const 2 call $~lib/builtins/abort @@ -1967,7 +1967,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 294 i32.const 2 call $~lib/builtins/abort @@ -1994,7 +1994,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 303 i32.const 2 call $~lib/builtins/abort @@ -2012,7 +2012,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 305 i32.const 2 call $~lib/builtins/abort @@ -2031,7 +2031,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 307 i32.const 2 call $~lib/builtins/abort @@ -2048,7 +2048,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 308 i32.const 2 call $~lib/builtins/abort @@ -2065,7 +2065,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 309 i32.const 2 call $~lib/builtins/abort @@ -2086,7 +2086,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 311 i32.const 2 call $~lib/builtins/abort @@ -2103,7 +2103,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 312 i32.const 2 call $~lib/builtins/abort @@ -2119,7 +2119,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 313 i32.const 2 call $~lib/builtins/abort @@ -2132,7 +2132,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 314 i32.const 2 call $~lib/builtins/abort @@ -2145,7 +2145,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 315 i32.const 2 call $~lib/builtins/abort @@ -2162,7 +2162,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 316 i32.const 2 call $~lib/builtins/abort @@ -2179,7 +2179,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 321 i32.const 2 call $~lib/builtins/abort @@ -2210,7 +2210,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 330 i32.const 2 call $~lib/builtins/abort @@ -2227,7 +2227,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 331 i32.const 2 call $~lib/builtins/abort @@ -2244,7 +2244,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 332 i32.const 2 call $~lib/builtins/abort @@ -2261,7 +2261,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 333 i32.const 2 call $~lib/builtins/abort @@ -2278,7 +2278,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 334 i32.const 2 call $~lib/builtins/abort @@ -2295,7 +2295,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 335 i32.const 2 call $~lib/builtins/abort @@ -2312,7 +2312,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 336 i32.const 2 call $~lib/builtins/abort @@ -2329,7 +2329,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 337 i32.const 2 call $~lib/builtins/abort @@ -2345,7 +2345,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 338 i32.const 2 call $~lib/builtins/abort @@ -2361,7 +2361,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 339 i32.const 2 call $~lib/builtins/abort @@ -2379,7 +2379,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 340 i32.const 2 call $~lib/builtins/abort @@ -2397,7 +2397,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 345 i32.const 2 call $~lib/builtins/abort @@ -2424,7 +2424,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 354 i32.const 2 call $~lib/builtins/abort @@ -2442,7 +2442,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 356 i32.const 2 call $~lib/builtins/abort @@ -2461,7 +2461,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 358 i32.const 2 call $~lib/builtins/abort @@ -2478,7 +2478,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 359 i32.const 2 call $~lib/builtins/abort @@ -2495,7 +2495,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 360 i32.const 2 call $~lib/builtins/abort @@ -2516,7 +2516,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 362 i32.const 2 call $~lib/builtins/abort @@ -2533,7 +2533,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 363 i32.const 2 call $~lib/builtins/abort @@ -2549,7 +2549,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 364 i32.const 2 call $~lib/builtins/abort @@ -2562,7 +2562,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 365 i32.const 2 call $~lib/builtins/abort @@ -2575,7 +2575,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 366 i32.const 2 call $~lib/builtins/abort @@ -2592,7 +2592,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 367 i32.const 2 call $~lib/builtins/abort @@ -2609,7 +2609,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 372 i32.const 2 call $~lib/builtins/abort @@ -2640,7 +2640,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 381 i32.const 2 call $~lib/builtins/abort @@ -2657,7 +2657,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 382 i32.const 2 call $~lib/builtins/abort @@ -2674,7 +2674,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 383 i32.const 2 call $~lib/builtins/abort @@ -2691,7 +2691,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 384 i32.const 2 call $~lib/builtins/abort @@ -2708,7 +2708,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 385 i32.const 2 call $~lib/builtins/abort @@ -2725,7 +2725,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 386 i32.const 2 call $~lib/builtins/abort @@ -2742,7 +2742,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 387 i32.const 2 call $~lib/builtins/abort @@ -2759,7 +2759,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 388 i32.const 2 call $~lib/builtins/abort @@ -2775,7 +2775,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 389 i32.const 2 call $~lib/builtins/abort @@ -2791,7 +2791,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 390 i32.const 2 call $~lib/builtins/abort @@ -2809,7 +2809,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 391 i32.const 2 call $~lib/builtins/abort @@ -2827,7 +2827,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 396 i32.const 2 call $~lib/builtins/abort @@ -2852,7 +2852,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 406 i32.const 2 call $~lib/builtins/abort diff --git a/tests/compiler/static-this.optimized.wat b/tests/compiler/static-this.optimized.wat index 638e79d9a3..ab59dfb01f 100644 --- a/tests/compiler/static-this.optimized.wat +++ b/tests/compiler/static-this.optimized.wat @@ -3,7 +3,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1c\00\00\00s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\1c") + (data (i32.const 24) "s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s") (global $static-this/Foo.bar (mut i32) (i32.const 42)) (export "memory" (memory $0)) (start $start) @@ -13,7 +14,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 8 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/static-this.untouched.wat b/tests/compiler/static-this.untouched.wat index 3bec403b85..839a41d180 100644 --- a/tests/compiler/static-this.untouched.wat +++ b/tests/compiler/static-this.untouched.wat @@ -4,7 +4,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1c\00\00\00s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $static-this/Foo.bar (mut i32) (i32.const 42)) @@ -20,7 +20,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 8 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/std/allocator_arena.optimized.wat b/tests/compiler/std/allocator_arena.optimized.wat index b9b6f52c56..7a87a4ea35 100644 --- a/tests/compiler/std/allocator_arena.optimized.wat +++ b/tests/compiler/std/allocator_arena.optimized.wat @@ -6,7 +6,8 @@ (type $FUNCSIG$vii (func (param i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00,\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00,") + (data (i32.const 24) "s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/allocator_arena/ptr1 (mut i32) (i32.const 0)) @@ -436,7 +437,7 @@ (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 64 + i32.const 72 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -449,7 +450,7 @@ i32.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 7 i32.const 0 call $~lib/builtins/abort @@ -472,7 +473,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 27 call $~lib/builtins/abort @@ -505,7 +506,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 16 i32.const 27 call $~lib/builtins/abort @@ -574,7 +575,7 @@ end if i32.const 0 - i32.const 16 + i32.const 24 i32.const 18 i32.const 0 call $~lib/builtins/abort @@ -585,11 +586,11 @@ call $~lib/allocator/arena/__mem_allocate global.set $std/allocator_arena/ptr1 global.get $std/allocator_arena/ptr1 - i32.const 64 + i32.const 72 i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 25 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/std/allocator_arena.untouched.wat b/tests/compiler/std/allocator_arena.untouched.wat index 01e4682282..c61ed815df 100644 --- a/tests/compiler/std/allocator_arena.untouched.wat +++ b/tests/compiler/std/allocator_arena.untouched.wat @@ -6,7 +6,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00,\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00,\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/allocator_arena/size i32 (i32.const 42)) @@ -15,7 +15,7 @@ (global $std/allocator_arena/ptr1 (mut i32) (i32.const 0)) (global $std/allocator_arena/ptr2 (mut i32) (i32.const 0)) (global $std/allocator_arena/i (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 60)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 68)) (export "memory" (memory $0)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -612,7 +612,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 7 i32.const 0 call $~lib/builtins/abort @@ -640,7 +640,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 27 call $~lib/builtins/abort @@ -677,7 +677,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 16 i32.const 27 call $~lib/builtins/abort @@ -764,7 +764,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 18 i32.const 0 call $~lib/builtins/abort @@ -790,7 +790,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 25 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 6097dddb37..5d36b739a9 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -6,10 +6,13 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 48) "\10") - (data (i32.const 56) "\10\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 96) "\10\00\00\00\08\00\00\00n\00u\00l\00l") + (data (i32.const 8) "\10\00\00\00\1a") + (data (i32.const 24) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 56) "\10") + (data (i32.const 72) "\10\00\00\00\1c") + (data (i32.const 88) "~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 120) "\10\00\00\00\08") + (data (i32.const 136) "n\00u\00l\00l") (export "memory" (memory $0)) (export "i32ArrayArrayElementAccess" (func $std/array-access/i32ArrayArrayElementAccess)) (export "stringArrayPropertyAccess" (func $std/array-access/stringArrayPropertyAccess)) @@ -23,7 +26,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 96 i32.const 45 call $~lib/builtins/abort @@ -37,7 +40,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 99 i32.const 61 call $~lib/builtins/abort @@ -60,7 +63,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 99 i32.const 61 call $~lib/builtins/abort @@ -82,7 +85,7 @@ local.get $0 i32.const 0 call $~lib/array/Array<~lib/array/Array>#__get - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -91,7 +94,7 @@ (func $~lib/util/string/compareImpl (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - i32.const 56 + i32.const 72 local.set $3 local.get $1 i32.const 1 @@ -138,13 +141,13 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 88 i32.const 178 i32.const 4 call $~lib/builtins/abort unreachable end - i32.const 52 + i32.const 60 i32.load i32.const 1 i32.shr_u @@ -153,7 +156,7 @@ local.get $1 i32.const 0 local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -189,7 +192,7 @@ call $~lib/array/Array<~lib/array/Array>#__get i32.const 1 call $~lib/array/Array<~lib/array/Array>#__get - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 4a617a670b..247837bcdf 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -7,13 +7,13 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 48) "\10\00\00\00\00\00\00\00") - (data (i32.const 56) "\10\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) "\10\00\00\00\08\00\00\00n\00u\00l\00l\00") + (data (i32.const 8) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 56) "\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 72) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 120) "\10\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00n\00u\00l\00l\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (export "memory" (memory $0)) (export "i32ArrayArrayElementAccess" (func $std/array-access/i32ArrayArrayElementAccess)) (export "stringArrayPropertyAccess" (func $std/array-access/stringArrayPropertyAccess)) @@ -36,7 +36,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 96 i32.const 45 call $~lib/builtins/abort @@ -50,7 +50,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 99 i32.const 61 call $~lib/builtins/abort @@ -78,7 +78,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 99 i32.const 61 call $~lib/builtins/abort @@ -111,7 +111,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 96 i32.const 45 call $~lib/builtins/abort @@ -125,7 +125,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 99 i32.const 61 call $~lib/builtins/abort @@ -215,7 +215,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 88 i32.const 178 i32.const 4 call $~lib/builtins/abort @@ -225,7 +225,7 @@ i32.const 0 i32.eq if - i32.const 104 + i32.const 136 local.set $1 end local.get $2 @@ -273,7 +273,7 @@ local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 56 + i32.const 72 i32.const 0 call $~lib/string/String#startsWith ) @@ -293,7 +293,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 96 i32.const 45 call $~lib/builtins/abort @@ -307,7 +307,7 @@ i32.ge_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 99 i32.const 61 call $~lib/builtins/abort @@ -331,7 +331,7 @@ call $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__get i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 56 + i32.const 72 i32.const 0 call $~lib/string/String#startsWith ) diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 4f6ce901ac..5e06fcffe7 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -34,7 +34,6 @@ (global $std/array-literal/dynamicArrayRef (mut i32) (i32.const 0)) (global $std/array-literal/dynamicArrayRefWithCtor (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -45,7 +44,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.retain)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/array/Array#__get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -186,7 +184,7 @@ if i32.const 0 i32.const 296 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -201,7 +199,7 @@ if i32.const 0 i32.const 296 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index dff312f1d2..a728ff0e49 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -37,7 +37,6 @@ (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/runtime/RTTI_BASE i32 (i32.const 336)) (global $~lib/memory/HEAP_BASE i32 (i32.const 528)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -48,7 +47,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.release)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/array/Array#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -244,7 +242,7 @@ if i32.const 0 i32.const 296 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -261,7 +259,7 @@ if i32.const 0 i32.const 296 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 56cfc20eb2..9f49ff3927 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -462,7 +462,6 @@ (global $std/array/subarrU32 (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "main" (func $std/array/main)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) @@ -474,7 +473,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.retain)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -797,7 +795,7 @@ if i32.const 0 i32.const 80 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -812,7 +810,7 @@ if i32.const 0 i32.const 80 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -1480,7 +1478,7 @@ if i32.const 0 i32.const 80 - i32.const 91 + i32.const 89 i32.const 8 call $~lib/builtins/abort unreachable @@ -2591,8 +2589,7 @@ local.get $6 local.get $1 local.get $0 - i32.const 22 - call_indirect (type $FUNCSIG$fiii) + call $start:std/array~anonymous|21 f32.store local.get $1 i32.const 1 @@ -5475,7 +5472,7 @@ if i32.const 0 i32.const 80 - i32.const 117 + i32.const 115 i32.const 4 call $~lib/builtins/abort unreachable @@ -5489,7 +5486,7 @@ if i32.const 0 i32.const 80 - i32.const 119 + i32.const 117 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index ae1fc9129c..c76fdbcef2 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -295,7 +295,6 @@ (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/runtime/RTTI_BASE i32 (i32.const 8072)) (global $~lib/memory/HEAP_BASE i32 (i32.const 8400)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "main" (func $std/array/main)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) @@ -307,7 +306,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.release)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 @@ -695,7 +693,7 @@ if i32.const 0 i32.const 80 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -712,7 +710,7 @@ if i32.const 0 i32.const 80 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -1645,7 +1643,7 @@ if i32.const 0 i32.const 80 - i32.const 91 + i32.const 89 i32.const 8 call $~lib/builtins/abort unreachable @@ -8447,7 +8445,7 @@ if i32.const 0 i32.const 80 - i32.const 117 + i32.const 115 i32.const 4 call $~lib/builtins/abort unreachable @@ -8464,7 +8462,7 @@ if i32.const 0 i32.const 80 - i32.const 119 + i32.const 117 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 8cbef925ab..844b0fc553 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -10,13 +10,19 @@ (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 56) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 104) "\10\00\00\00$\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 152) "\0f\00\00\00\08\00\00\00\01\00\00\00\02") - (data (i32.const 168) "\10\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") - (data (i32.const 208) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 248) "\1d\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08") + (data (i32.const 8) "\10\00\00\00&") + (data (i32.const 24) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00(") + (data (i32.const 80) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 120) "\10\00\00\00$") + (data (i32.const 136) "s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 176) "\0f\00\00\00\08") + (data (i32.const 192) "\01\00\00\00\02") + (data (i32.const 200) "\10\00\00\00 ") + (data (i32.const 216) "~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 248) "\10\00\00\00\1e") + (data (i32.const 264) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 296) "\1d\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/arraybuffer/buffer (mut i32) (i32.const 0)) @@ -101,7 +107,7 @@ i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -114,7 +120,7 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 16 i32.add ) (func $~lib/memory/memory.fill (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) @@ -331,18 +337,18 @@ (func $~lib/util/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 488 + i32.const 536 i32.le_u if i32.const 0 - i32.const 64 - i32.const 131 + i32.const 80 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $2 i32.load @@ -350,8 +356,8 @@ i32.ne if i32.const 0 - i32.const 64 - i32.const 133 + i32.const 80 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -364,11 +370,11 @@ (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 1073741816 + i32.const 1073741808 i32.gt_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 54 i32.const 43 call $~lib/builtins/abort @@ -557,7 +563,7 @@ (func $~lib/arraybuffer/ArrayBuffer#slice (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 local.set $3 @@ -627,13 +633,13 @@ (func $~lib/arraybuffer/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) i32.const 1 - i32.const 1073741816 + i32.const 1073741808 local.get $1 i32.shr_u i32.gt_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 57 call $~lib/builtins/abort @@ -698,7 +704,7 @@ i32.const 2 i32.store offset=12 local.get $1 - i32.const 160 + i32.const 192 i32.const 8 call $~lib/memory/memory.copy local.get $0 @@ -706,18 +712,18 @@ (func $~lib/dataview/DataView#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 - i32.const 1073741816 + i32.const 1073741808 i32.gt_u local.get $1 local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.gt_u i32.or if i32.const 0 - i32.const 176 + i32.const 216 i32.const 21 i32.const 6 call $~lib/builtins/abort @@ -760,7 +766,7 @@ unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 local.set $1 @@ -770,7 +776,7 @@ call $~lib/dataview/DataView#constructor ) (func $start:std/arraybuffer (; 12 ;) (type $FUNCSIG$v) - i32.const 488 + i32.const 536 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -778,14 +784,14 @@ call $~lib/arraybuffer/ArrayBuffer#constructor global.set $std/arraybuffer/buffer global.get $std/arraybuffer/buffer - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 8 i32.ne if i32.const 0 - i32.const 112 + i32.const 136 i32.const 3 i32.const 0 call $~lib/builtins/abort @@ -793,18 +799,18 @@ end global.get $std/arraybuffer/buffer i32.const 0 - i32.const 1073741816 + i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 8 i32.ne if i32.const 0 - i32.const 112 + i32.const 136 i32.const 7 i32.const 0 call $~lib/builtins/abort @@ -815,7 +821,7 @@ i32.eq if i32.const 0 - i32.const 112 + i32.const 136 i32.const 8 i32.const 0 call $~lib/builtins/abort @@ -823,18 +829,18 @@ end global.get $std/arraybuffer/buffer i32.const 1 - i32.const 1073741816 + i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 7 i32.ne if i32.const 0 - i32.const 112 + i32.const 136 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -842,18 +848,18 @@ end global.get $std/arraybuffer/buffer i32.const -1 - i32.const 1073741816 + i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 i32.ne if i32.const 0 - i32.const 112 + i32.const 136 i32.const 16 i32.const 0 call $~lib/builtins/abort @@ -865,14 +871,14 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 2 i32.ne if i32.const 0 - i32.const 112 + i32.const 136 i32.const 20 i32.const 0 call $~lib/builtins/abort @@ -884,14 +890,14 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 6 i32.ne if i32.const 0 - i32.const 112 + i32.const 136 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -903,14 +909,14 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 2 i32.ne if i32.const 0 - i32.const 112 + i32.const 136 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -922,14 +928,14 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 4 i32.ne if i32.const 0 - i32.const 112 + i32.const 136 i32.const 32 i32.const 0 call $~lib/builtins/abort @@ -937,16 +943,16 @@ end global.get $std/arraybuffer/buffer i32.const 42 - i32.const 1073741816 + i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 if i32.const 0 - i32.const 112 + i32.const 136 i32.const 36 i32.const 0 call $~lib/builtins/abort @@ -956,7 +962,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 37 i32.const 0 call $~lib/builtins/abort @@ -980,7 +986,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 47 i32.const 0 call $~lib/builtins/abort @@ -1001,7 +1007,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 48 i32.const 0 call $~lib/builtins/abort @@ -1021,7 +1027,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 49 i32.const 0 call $~lib/builtins/abort @@ -1030,13 +1036,13 @@ ) (func $~lib/runtime/runtime.instanceof (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load local.tee $0 if (result i32) local.get $0 - i32.const 248 + i32.const 296 i32.load i32.le_u else @@ -1054,7 +1060,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 248 + i32.const 296 i32.add i32.load offset=4 local.tee $0 @@ -1071,7 +1077,7 @@ i32.eqz if local.get $0 - i32.const 248 + i32.const 296 i32.load i32.gt_u local.set $1 @@ -1083,7 +1089,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 248 + i32.const 296 i32.add i32.load end @@ -1117,7 +1123,7 @@ local.get $2 else local.get $0 - i32.const 248 + i32.const 296 i32.load i32.gt_u end @@ -1127,7 +1133,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 248 + i32.const 296 i32.add i32.load end @@ -1140,7 +1146,7 @@ local.get $1 if (result i32) local.get $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 else @@ -1184,7 +1190,7 @@ i32.load if i32.const 0 - i32.const 216 + i32.const 264 i32.const 97 i32.const 15 call $~lib/builtins/abort @@ -1205,7 +1211,7 @@ ) (func $~lib/runtime/runtime.collect (; 20 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 216 + i32.const 264 i32.const 139 i32.const 9 call $~lib/builtins/abort diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 13bec10401..aa140afed2 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -9,17 +9,17 @@ (type $FUNCSIG$vi (func (param i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 56) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 104) "\10\00\00\00$\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 152) "\0f\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 168) "\10\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") - (data (i32.const 208) "\10\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 248) "\1d\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") + (data (i32.const 8) "\10\00\00\00&\00\00\00\00\00\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 64) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 120) "\10\00\00\00$\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 176) "\0f\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 200) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 248) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 296) "\1d\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) @@ -28,8 +28,8 @@ (global $std/arraybuffer/sliced (mut i32) (i32.const 0)) (global $std/arraybuffer/arr8 (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/runtime/RTTI_BASE i32 (i32.const 248)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 488)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 296)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 536)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -418,8 +418,8 @@ i32.eqz if i32.const 0 - i32.const 64 - i32.const 131 + i32.const 80 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -435,8 +435,8 @@ i32.eqz if i32.const 0 - i32.const 64 - i32.const 133 + i32.const 80 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -453,7 +453,7 @@ i32.gt_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 54 i32.const 43 call $~lib/builtins/abort @@ -1347,7 +1347,7 @@ i32.gt_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 57 call $~lib/builtins/abort @@ -1476,7 +1476,7 @@ i32.or if i32.const 0 - i32.const 176 + i32.const 216 i32.const 21 i32.const 6 call $~lib/builtins/abort @@ -1568,7 +1568,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 3 i32.const 0 call $~lib/builtins/abort @@ -1586,7 +1586,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 7 i32.const 0 call $~lib/builtins/abort @@ -1598,7 +1598,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 8 i32.const 0 call $~lib/builtins/abort @@ -1616,7 +1616,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -1634,7 +1634,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 16 i32.const 0 call $~lib/builtins/abort @@ -1652,7 +1652,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 20 i32.const 0 call $~lib/builtins/abort @@ -1670,7 +1670,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -1688,7 +1688,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -1706,7 +1706,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 32 i32.const 0 call $~lib/builtins/abort @@ -1724,7 +1724,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 36 i32.const 0 call $~lib/builtins/abort @@ -1736,7 +1736,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 37 i32.const 0 call $~lib/builtins/abort @@ -1748,7 +1748,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 39 i32.const 0 call $~lib/builtins/abort @@ -1760,7 +1760,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 40 i32.const 0 call $~lib/builtins/abort @@ -1772,7 +1772,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 41 i32.const 0 call $~lib/builtins/abort @@ -1784,7 +1784,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 42 i32.const 0 call $~lib/builtins/abort @@ -1796,7 +1796,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 43 i32.const 0 call $~lib/builtins/abort @@ -1809,14 +1809,14 @@ i32.const 2 i32.const 2 i32.const 17 - i32.const 160 + i32.const 192 call $~lib/util/runtime/makeArray call $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array> i32.eqz i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 46 i32.const 0 call $~lib/builtins/abort @@ -1827,7 +1827,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 47 i32.const 0 call $~lib/builtins/abort @@ -1840,7 +1840,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 48 i32.const 0 call $~lib/builtins/abort @@ -1860,7 +1860,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 136 i32.const 49 i32.const 0 call $~lib/builtins/abort @@ -2025,7 +2025,7 @@ i32.eqz if i32.const 0 - i32.const 216 + i32.const 264 i32.const 97 i32.const 15 call $~lib/builtins/abort @@ -2052,7 +2052,7 @@ ) (func $~lib/runtime/runtime.collect (; 32 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 216 + i32.const 264 i32.const 139 i32.const 9 call $~lib/builtins/abort diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 0f26e35f1e..ecae10449a 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -15,13 +15,19 @@ (type $FUNCSIG$viji (func (param i32 i64 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 56) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 104) "\10\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 152) "\10\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") - (data (i32.const 192) "\10\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") - (data (i32.const 232) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 272) "\13\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") + (data (i32.const 8) "\10\00\00\00&") + (data (i32.const 24) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00(") + (data (i32.const 80) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 120) "\10\00\00\00$") + (data (i32.const 136) "~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 176) "\10\00\00\00 ") + (data (i32.const 192) "~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 224) "\10\00\00\00\1e") + (data (i32.const 240) "s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 272) "\10\00\00\00\1e") + (data (i32.const 288) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 320) "\13\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/dataview/array (mut i32) (i32.const 0)) @@ -105,7 +111,7 @@ i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -118,7 +124,7 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 16 i32.add ) (func $~lib/memory/memory.fill (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) @@ -168,18 +174,18 @@ (func $~lib/util/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 432 + i32.const 480 i32.le_u if i32.const 0 - i32.const 64 - i32.const 131 + i32.const 80 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $2 i32.load @@ -187,8 +193,8 @@ i32.ne if i32.const 0 - i32.const 64 - i32.const 133 + i32.const 80 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -244,7 +250,7 @@ i32.ge_u if i32.const 0 - i32.const 112 + i32.const 136 i32.const 116 i32.const 44 call $~lib/builtins/abort @@ -260,20 +266,20 @@ (func $~lib/dataview/DataView#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 - i32.const 1073741816 + i32.const 1073741808 i32.gt_u local.get $1 local.get $2 i32.add local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.gt_u i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 21 i32.const 6 call $~lib/builtins/abort @@ -318,7 +324,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 44 i32.const 6 call $~lib/builtins/abort @@ -384,7 +390,7 @@ i32.gt_s if i32.const 0 - i32.const 160 + i32.const 192 i32.const 58 i32.const 7 call $~lib/builtins/abort @@ -410,7 +416,7 @@ i32.ge_u if i32.const 0 - i32.const 160 + i32.const 192 i32.const 69 i32.const 49 call $~lib/builtins/abort @@ -435,7 +441,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 77 i32.const 7 call $~lib/builtins/abort @@ -477,7 +483,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 86 i32.const 7 call $~lib/builtins/abort @@ -514,7 +520,7 @@ i32.gt_s if i32.const 0 - i32.const 160 + i32.const 192 i32.const 180 i32.const 6 call $~lib/builtins/abort @@ -539,7 +545,7 @@ i32.ge_u if i32.const 0 - i32.const 160 + i32.const 192 i32.const 92 i32.const 49 call $~lib/builtins/abort @@ -564,7 +570,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 100 i32.const 6 call $~lib/builtins/abort @@ -604,7 +610,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 109 i32.const 6 call $~lib/builtins/abort @@ -641,7 +647,7 @@ i32.gt_s if i32.const 0 - i32.const 160 + i32.const 192 i32.const 189 i32.const 6 call $~lib/builtins/abort @@ -666,7 +672,7 @@ i32.gt_s if i32.const 0 - i32.const 160 + i32.const 192 i32.const 118 i32.const 6 call $~lib/builtins/abort @@ -704,7 +710,7 @@ i32.gt_s if i32.const 0 - i32.const 160 + i32.const 192 i32.const 127 i32.const 6 call $~lib/builtins/abort @@ -732,7 +738,7 @@ i32.ge_u if i32.const 0 - i32.const 160 + i32.const 192 i32.const 133 i32.const 49 call $~lib/builtins/abort @@ -750,7 +756,7 @@ i32.gt_s if i32.const 0 - i32.const 160 + i32.const 192 i32.const 141 i32.const 6 call $~lib/builtins/abort @@ -786,7 +792,7 @@ i32.gt_s if i32.const 0 - i32.const 160 + i32.const 192 i32.const 149 i32.const 6 call $~lib/builtins/abort @@ -822,7 +828,7 @@ i32.gt_s if i32.const 0 - i32.const 160 + i32.const 192 i32.const 198 i32.const 6 call $~lib/builtins/abort @@ -846,7 +852,7 @@ i32.ge_u if i32.const 0 - i32.const 160 + i32.const 192 i32.const 154 i32.const 49 call $~lib/builtins/abort @@ -864,7 +870,7 @@ i32.gt_s if i32.const 0 - i32.const 160 + i32.const 192 i32.const 162 i32.const 6 call $~lib/builtins/abort @@ -898,7 +904,7 @@ i32.gt_s if i32.const 0 - i32.const 160 + i32.const 192 i32.const 170 i32.const 6 call $~lib/builtins/abort @@ -934,7 +940,7 @@ i32.gt_s if i32.const 0 - i32.const 160 + i32.const 192 i32.const 206 i32.const 6 call $~lib/builtins/abort @@ -964,7 +970,7 @@ unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 local.set $1 @@ -976,7 +982,7 @@ ) (func $start:std/dataview (; 30 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 432 + i32.const 480 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -1038,7 +1044,7 @@ f32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 14 i32.const 0 call $~lib/builtins/abort @@ -1052,7 +1058,7 @@ f32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 15 i32.const 0 call $~lib/builtins/abort @@ -1066,7 +1072,7 @@ f32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 16 i32.const 0 call $~lib/builtins/abort @@ -1080,7 +1086,7 @@ f32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 17 i32.const 0 call $~lib/builtins/abort @@ -1094,7 +1100,7 @@ f32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 18 i32.const 0 call $~lib/builtins/abort @@ -1108,7 +1114,7 @@ f32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 20 i32.const 0 call $~lib/builtins/abort @@ -1122,7 +1128,7 @@ f32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 21 i32.const 0 call $~lib/builtins/abort @@ -1136,7 +1142,7 @@ f32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 22 i32.const 0 call $~lib/builtins/abort @@ -1150,7 +1156,7 @@ f32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 23 i32.const 0 call $~lib/builtins/abort @@ -1164,7 +1170,7 @@ f32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -1177,7 +1183,7 @@ f64.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 26 i32.const 0 call $~lib/builtins/abort @@ -1190,7 +1196,7 @@ f64.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 27 i32.const 0 call $~lib/builtins/abort @@ -1203,7 +1209,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 29 i32.const 0 call $~lib/builtins/abort @@ -1216,7 +1222,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 30 i32.const 0 call $~lib/builtins/abort @@ -1229,7 +1235,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 31 i32.const 0 call $~lib/builtins/abort @@ -1242,7 +1248,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 32 i32.const 0 call $~lib/builtins/abort @@ -1255,7 +1261,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 33 i32.const 0 call $~lib/builtins/abort @@ -1268,7 +1274,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 34 i32.const 0 call $~lib/builtins/abort @@ -1281,7 +1287,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 35 i32.const 0 call $~lib/builtins/abort @@ -1294,7 +1300,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 36 i32.const 0 call $~lib/builtins/abort @@ -1310,7 +1316,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 38 i32.const 0 call $~lib/builtins/abort @@ -1326,7 +1332,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 39 i32.const 0 call $~lib/builtins/abort @@ -1342,7 +1348,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 40 i32.const 0 call $~lib/builtins/abort @@ -1358,7 +1364,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 41 i32.const 0 call $~lib/builtins/abort @@ -1374,7 +1380,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 42 i32.const 0 call $~lib/builtins/abort @@ -1390,7 +1396,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 43 i32.const 0 call $~lib/builtins/abort @@ -1406,7 +1412,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 44 i32.const 0 call $~lib/builtins/abort @@ -1422,7 +1428,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 46 i32.const 0 call $~lib/builtins/abort @@ -1438,7 +1444,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 47 i32.const 0 call $~lib/builtins/abort @@ -1454,7 +1460,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 48 i32.const 0 call $~lib/builtins/abort @@ -1470,7 +1476,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 49 i32.const 0 call $~lib/builtins/abort @@ -1486,7 +1492,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 50 i32.const 0 call $~lib/builtins/abort @@ -1502,7 +1508,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 51 i32.const 0 call $~lib/builtins/abort @@ -1518,7 +1524,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 52 i32.const 0 call $~lib/builtins/abort @@ -1532,7 +1538,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 54 i32.const 0 call $~lib/builtins/abort @@ -1546,7 +1552,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 55 i32.const 0 call $~lib/builtins/abort @@ -1560,7 +1566,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 56 i32.const 0 call $~lib/builtins/abort @@ -1574,7 +1580,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 57 i32.const 0 call $~lib/builtins/abort @@ -1588,7 +1594,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 58 i32.const 0 call $~lib/builtins/abort @@ -1602,7 +1608,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 60 i32.const 0 call $~lib/builtins/abort @@ -1616,7 +1622,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 61 i32.const 0 call $~lib/builtins/abort @@ -1630,7 +1636,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 62 i32.const 0 call $~lib/builtins/abort @@ -1644,7 +1650,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 63 i32.const 0 call $~lib/builtins/abort @@ -1658,7 +1664,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 64 i32.const 0 call $~lib/builtins/abort @@ -1671,7 +1677,7 @@ i64.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 66 i32.const 0 call $~lib/builtins/abort @@ -1684,7 +1690,7 @@ i64.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 67 i32.const 0 call $~lib/builtins/abort @@ -1697,7 +1703,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 69 i32.const 0 call $~lib/builtins/abort @@ -1710,7 +1716,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 70 i32.const 0 call $~lib/builtins/abort @@ -1723,7 +1729,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 71 i32.const 0 call $~lib/builtins/abort @@ -1736,7 +1742,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 72 i32.const 0 call $~lib/builtins/abort @@ -1749,7 +1755,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 73 i32.const 0 call $~lib/builtins/abort @@ -1762,7 +1768,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 74 i32.const 0 call $~lib/builtins/abort @@ -1775,7 +1781,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 75 i32.const 0 call $~lib/builtins/abort @@ -1788,7 +1794,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 76 i32.const 0 call $~lib/builtins/abort @@ -1804,7 +1810,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 78 i32.const 0 call $~lib/builtins/abort @@ -1820,7 +1826,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 79 i32.const 0 call $~lib/builtins/abort @@ -1836,7 +1842,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 80 i32.const 0 call $~lib/builtins/abort @@ -1852,7 +1858,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 81 i32.const 0 call $~lib/builtins/abort @@ -1868,7 +1874,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 82 i32.const 0 call $~lib/builtins/abort @@ -1884,7 +1890,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 83 i32.const 0 call $~lib/builtins/abort @@ -1900,7 +1906,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 84 i32.const 0 call $~lib/builtins/abort @@ -1916,7 +1922,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 86 i32.const 0 call $~lib/builtins/abort @@ -1932,7 +1938,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 87 i32.const 0 call $~lib/builtins/abort @@ -1948,7 +1954,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 88 i32.const 0 call $~lib/builtins/abort @@ -1964,7 +1970,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 89 i32.const 0 call $~lib/builtins/abort @@ -1980,7 +1986,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 90 i32.const 0 call $~lib/builtins/abort @@ -1996,7 +2002,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 91 i32.const 0 call $~lib/builtins/abort @@ -2012,7 +2018,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 92 i32.const 0 call $~lib/builtins/abort @@ -2026,7 +2032,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 94 i32.const 0 call $~lib/builtins/abort @@ -2040,7 +2046,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 95 i32.const 0 call $~lib/builtins/abort @@ -2054,7 +2060,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 96 i32.const 0 call $~lib/builtins/abort @@ -2068,7 +2074,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 97 i32.const 0 call $~lib/builtins/abort @@ -2082,7 +2088,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 98 i32.const 0 call $~lib/builtins/abort @@ -2096,7 +2102,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 100 i32.const 0 call $~lib/builtins/abort @@ -2110,7 +2116,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 101 i32.const 0 call $~lib/builtins/abort @@ -2124,7 +2130,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 102 i32.const 0 call $~lib/builtins/abort @@ -2138,7 +2144,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 103 i32.const 0 call $~lib/builtins/abort @@ -2152,7 +2158,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 104 i32.const 0 call $~lib/builtins/abort @@ -2165,7 +2171,7 @@ i64.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 106 i32.const 0 call $~lib/builtins/abort @@ -2178,7 +2184,7 @@ i64.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 107 i32.const 0 call $~lib/builtins/abort @@ -2196,7 +2202,7 @@ f32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 110 i32.const 0 call $~lib/builtins/abort @@ -2214,7 +2220,7 @@ f32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 113 i32.const 0 call $~lib/builtins/abort @@ -2231,7 +2237,7 @@ f64.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 116 i32.const 0 call $~lib/builtins/abort @@ -2248,7 +2254,7 @@ f64.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 119 i32.const 0 call $~lib/builtins/abort @@ -2263,7 +2269,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 122 i32.const 0 call $~lib/builtins/abort @@ -2283,7 +2289,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 125 i32.const 0 call $~lib/builtins/abort @@ -2303,7 +2309,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 128 i32.const 0 call $~lib/builtins/abort @@ -2321,7 +2327,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 131 i32.const 0 call $~lib/builtins/abort @@ -2339,7 +2345,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 134 i32.const 0 call $~lib/builtins/abort @@ -2356,7 +2362,7 @@ i64.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 137 i32.const 0 call $~lib/builtins/abort @@ -2373,7 +2379,7 @@ i64.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 140 i32.const 0 call $~lib/builtins/abort @@ -2388,7 +2394,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 143 i32.const 0 call $~lib/builtins/abort @@ -2408,7 +2414,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 146 i32.const 0 call $~lib/builtins/abort @@ -2428,7 +2434,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 149 i32.const 0 call $~lib/builtins/abort @@ -2446,7 +2452,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 152 i32.const 0 call $~lib/builtins/abort @@ -2464,7 +2470,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 155 i32.const 0 call $~lib/builtins/abort @@ -2481,7 +2487,7 @@ i64.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 158 i32.const 0 call $~lib/builtins/abort @@ -2498,7 +2504,7 @@ i64.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 161 i32.const 0 call $~lib/builtins/abort @@ -2518,7 +2524,7 @@ i32.sub if i32.const 0 - i32.const 200 + i32.const 240 i32.const 164 i32.const 0 call $~lib/builtins/abort @@ -2530,7 +2536,7 @@ i32.ne if i32.const 0 - i32.const 200 + i32.const 240 i32.const 165 i32.const 0 call $~lib/builtins/abort @@ -2539,13 +2545,13 @@ ) (func $~lib/runtime/runtime.instanceof (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load local.tee $0 if (result i32) local.get $0 - i32.const 272 + i32.const 320 i32.load i32.le_u else @@ -2563,7 +2569,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 272 + i32.const 320 i32.add i32.load offset=4 local.tee $0 @@ -2580,7 +2586,7 @@ i32.eqz if local.get $0 - i32.const 272 + i32.const 320 i32.load i32.gt_u local.set $1 @@ -2592,7 +2598,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 272 + i32.const 320 i32.add i32.load end @@ -2626,7 +2632,7 @@ local.get $2 else local.get $0 - i32.const 272 + i32.const 320 i32.load i32.gt_u end @@ -2636,7 +2642,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 272 + i32.const 320 i32.add i32.load end @@ -2649,7 +2655,7 @@ local.get $1 if (result i32) local.get $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 else @@ -2693,7 +2699,7 @@ i32.load if i32.const 0 - i32.const 240 + i32.const 288 i32.const 97 i32.const 15 call $~lib/builtins/abort @@ -2714,7 +2720,7 @@ ) (func $~lib/runtime/runtime.collect (; 38 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 240 + i32.const 288 i32.const 139 i32.const 9 call $~lib/builtins/abort diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 4bba76e948..7e06a04865 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -16,17 +16,17 @@ (type $FUNCSIG$vi (func (param i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 56) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 104) "\10\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 152) "\10\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") - (data (i32.const 192) "\10\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") - (data (i32.const 232) "\10\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 272) "\13\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") + (data (i32.const 8) "\10\00\00\00&\00\00\00\00\00\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 64) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 120) "\10\00\00\00$\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 176) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 224) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 272) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 320) "\13\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) @@ -34,8 +34,8 @@ (global $std/dataview/array (mut i32) (i32.const 0)) (global $std/dataview/view (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/runtime/RTTI_BASE i32 (i32.const 272)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 432)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 320)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 480)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -424,8 +424,8 @@ i32.eqz if i32.const 0 - i32.const 64 - i32.const 131 + i32.const 80 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -441,8 +441,8 @@ i32.eqz if i32.const 0 - i32.const 64 - i32.const 133 + i32.const 80 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -459,7 +459,7 @@ i32.gt_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 54 i32.const 43 call $~lib/builtins/abort @@ -485,7 +485,7 @@ i32.gt_u if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 57 call $~lib/builtins/abort @@ -552,7 +552,7 @@ i32.ge_u if i32.const 0 - i32.const 112 + i32.const 136 i32.const 116 i32.const 44 call $~lib/builtins/abort @@ -585,7 +585,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 21 i32.const 6 call $~lib/builtins/abort @@ -668,7 +668,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 44 i32.const 6 call $~lib/builtins/abort @@ -745,7 +745,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 58 i32.const 7 call $~lib/builtins/abort @@ -777,7 +777,7 @@ i32.ge_u if i32.const 0 - i32.const 160 + i32.const 192 i32.const 69 i32.const 49 call $~lib/builtins/abort @@ -819,7 +819,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 77 i32.const 7 call $~lib/builtins/abort @@ -869,7 +869,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 86 i32.const 7 call $~lib/builtins/abort @@ -944,7 +944,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 180 i32.const 6 call $~lib/builtins/abort @@ -973,7 +973,7 @@ i32.ge_u if i32.const 0 - i32.const 160 + i32.const 192 i32.const 92 i32.const 49 call $~lib/builtins/abort @@ -1013,7 +1013,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 100 i32.const 6 call $~lib/builtins/abort @@ -1049,7 +1049,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 109 i32.const 6 call $~lib/builtins/abort @@ -1085,7 +1085,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 189 i32.const 6 call $~lib/builtins/abort @@ -1120,7 +1120,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 118 i32.const 6 call $~lib/builtins/abort @@ -1160,7 +1160,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 127 i32.const 6 call $~lib/builtins/abort @@ -1194,7 +1194,7 @@ i32.ge_u if i32.const 0 - i32.const 160 + i32.const 192 i32.const 133 i32.const 49 call $~lib/builtins/abort @@ -1220,7 +1220,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 141 i32.const 6 call $~lib/builtins/abort @@ -1254,7 +1254,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 149 i32.const 6 call $~lib/builtins/abort @@ -1288,7 +1288,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 198 i32.const 6 call $~lib/builtins/abort @@ -1316,7 +1316,7 @@ i32.ge_u if i32.const 0 - i32.const 160 + i32.const 192 i32.const 154 i32.const 49 call $~lib/builtins/abort @@ -1342,7 +1342,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 162 i32.const 6 call $~lib/builtins/abort @@ -1376,7 +1376,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 170 i32.const 6 call $~lib/builtins/abort @@ -1410,7 +1410,7 @@ i32.or if i32.const 0 - i32.const 160 + i32.const 192 i32.const 206 i32.const 6 call $~lib/builtins/abort @@ -1532,7 +1532,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 14 i32.const 0 call $~lib/builtins/abort @@ -1547,7 +1547,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 15 i32.const 0 call $~lib/builtins/abort @@ -1562,7 +1562,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 16 i32.const 0 call $~lib/builtins/abort @@ -1577,7 +1577,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 17 i32.const 0 call $~lib/builtins/abort @@ -1592,7 +1592,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 18 i32.const 0 call $~lib/builtins/abort @@ -1607,7 +1607,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 20 i32.const 0 call $~lib/builtins/abort @@ -1622,7 +1622,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 21 i32.const 0 call $~lib/builtins/abort @@ -1637,7 +1637,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 22 i32.const 0 call $~lib/builtins/abort @@ -1652,7 +1652,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 23 i32.const 0 call $~lib/builtins/abort @@ -1667,7 +1667,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -1682,7 +1682,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 26 i32.const 0 call $~lib/builtins/abort @@ -1697,7 +1697,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 27 i32.const 0 call $~lib/builtins/abort @@ -1711,7 +1711,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 29 i32.const 0 call $~lib/builtins/abort @@ -1725,7 +1725,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 30 i32.const 0 call $~lib/builtins/abort @@ -1739,7 +1739,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 31 i32.const 0 call $~lib/builtins/abort @@ -1753,7 +1753,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 32 i32.const 0 call $~lib/builtins/abort @@ -1767,7 +1767,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 33 i32.const 0 call $~lib/builtins/abort @@ -1781,7 +1781,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 34 i32.const 0 call $~lib/builtins/abort @@ -1795,7 +1795,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 35 i32.const 0 call $~lib/builtins/abort @@ -1809,7 +1809,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 36 i32.const 0 call $~lib/builtins/abort @@ -1828,7 +1828,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 38 i32.const 0 call $~lib/builtins/abort @@ -1847,7 +1847,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 39 i32.const 0 call $~lib/builtins/abort @@ -1866,7 +1866,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 40 i32.const 0 call $~lib/builtins/abort @@ -1885,7 +1885,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 41 i32.const 0 call $~lib/builtins/abort @@ -1904,7 +1904,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 42 i32.const 0 call $~lib/builtins/abort @@ -1923,7 +1923,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 43 i32.const 0 call $~lib/builtins/abort @@ -1942,7 +1942,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 44 i32.const 0 call $~lib/builtins/abort @@ -1961,7 +1961,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 46 i32.const 0 call $~lib/builtins/abort @@ -1980,7 +1980,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 47 i32.const 0 call $~lib/builtins/abort @@ -1999,7 +1999,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 48 i32.const 0 call $~lib/builtins/abort @@ -2018,7 +2018,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 49 i32.const 0 call $~lib/builtins/abort @@ -2037,7 +2037,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 50 i32.const 0 call $~lib/builtins/abort @@ -2056,7 +2056,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 51 i32.const 0 call $~lib/builtins/abort @@ -2075,7 +2075,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 52 i32.const 0 call $~lib/builtins/abort @@ -2090,7 +2090,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 54 i32.const 0 call $~lib/builtins/abort @@ -2105,7 +2105,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 55 i32.const 0 call $~lib/builtins/abort @@ -2120,7 +2120,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 56 i32.const 0 call $~lib/builtins/abort @@ -2135,7 +2135,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 57 i32.const 0 call $~lib/builtins/abort @@ -2150,7 +2150,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 58 i32.const 0 call $~lib/builtins/abort @@ -2165,7 +2165,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 60 i32.const 0 call $~lib/builtins/abort @@ -2180,7 +2180,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 61 i32.const 0 call $~lib/builtins/abort @@ -2195,7 +2195,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 62 i32.const 0 call $~lib/builtins/abort @@ -2210,7 +2210,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 63 i32.const 0 call $~lib/builtins/abort @@ -2225,7 +2225,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 64 i32.const 0 call $~lib/builtins/abort @@ -2240,7 +2240,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 66 i32.const 0 call $~lib/builtins/abort @@ -2255,7 +2255,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 67 i32.const 0 call $~lib/builtins/abort @@ -2269,7 +2269,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 69 i32.const 0 call $~lib/builtins/abort @@ -2283,7 +2283,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 70 i32.const 0 call $~lib/builtins/abort @@ -2297,7 +2297,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 71 i32.const 0 call $~lib/builtins/abort @@ -2311,7 +2311,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 72 i32.const 0 call $~lib/builtins/abort @@ -2325,7 +2325,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 73 i32.const 0 call $~lib/builtins/abort @@ -2339,7 +2339,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 74 i32.const 0 call $~lib/builtins/abort @@ -2353,7 +2353,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 75 i32.const 0 call $~lib/builtins/abort @@ -2367,7 +2367,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 76 i32.const 0 call $~lib/builtins/abort @@ -2384,7 +2384,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 78 i32.const 0 call $~lib/builtins/abort @@ -2401,7 +2401,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 79 i32.const 0 call $~lib/builtins/abort @@ -2418,7 +2418,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 80 i32.const 0 call $~lib/builtins/abort @@ -2435,7 +2435,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 81 i32.const 0 call $~lib/builtins/abort @@ -2452,7 +2452,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 82 i32.const 0 call $~lib/builtins/abort @@ -2469,7 +2469,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 83 i32.const 0 call $~lib/builtins/abort @@ -2486,7 +2486,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 84 i32.const 0 call $~lib/builtins/abort @@ -2503,7 +2503,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 86 i32.const 0 call $~lib/builtins/abort @@ -2520,7 +2520,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 87 i32.const 0 call $~lib/builtins/abort @@ -2537,7 +2537,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 88 i32.const 0 call $~lib/builtins/abort @@ -2554,7 +2554,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 89 i32.const 0 call $~lib/builtins/abort @@ -2571,7 +2571,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 90 i32.const 0 call $~lib/builtins/abort @@ -2588,7 +2588,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 91 i32.const 0 call $~lib/builtins/abort @@ -2605,7 +2605,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 92 i32.const 0 call $~lib/builtins/abort @@ -2620,7 +2620,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 94 i32.const 0 call $~lib/builtins/abort @@ -2635,7 +2635,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 95 i32.const 0 call $~lib/builtins/abort @@ -2650,7 +2650,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 96 i32.const 0 call $~lib/builtins/abort @@ -2665,7 +2665,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 97 i32.const 0 call $~lib/builtins/abort @@ -2680,7 +2680,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 98 i32.const 0 call $~lib/builtins/abort @@ -2695,7 +2695,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 100 i32.const 0 call $~lib/builtins/abort @@ -2710,7 +2710,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 101 i32.const 0 call $~lib/builtins/abort @@ -2725,7 +2725,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 102 i32.const 0 call $~lib/builtins/abort @@ -2740,7 +2740,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 103 i32.const 0 call $~lib/builtins/abort @@ -2755,7 +2755,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 104 i32.const 0 call $~lib/builtins/abort @@ -2770,7 +2770,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 106 i32.const 0 call $~lib/builtins/abort @@ -2785,7 +2785,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 107 i32.const 0 call $~lib/builtins/abort @@ -2805,7 +2805,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 110 i32.const 0 call $~lib/builtins/abort @@ -2825,7 +2825,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 113 i32.const 0 call $~lib/builtins/abort @@ -2845,7 +2845,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 116 i32.const 0 call $~lib/builtins/abort @@ -2865,7 +2865,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 119 i32.const 0 call $~lib/builtins/abort @@ -2883,7 +2883,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 122 i32.const 0 call $~lib/builtins/abort @@ -2907,7 +2907,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 125 i32.const 0 call $~lib/builtins/abort @@ -2931,7 +2931,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 128 i32.const 0 call $~lib/builtins/abort @@ -2951,7 +2951,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 131 i32.const 0 call $~lib/builtins/abort @@ -2971,7 +2971,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 134 i32.const 0 call $~lib/builtins/abort @@ -2991,7 +2991,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 137 i32.const 0 call $~lib/builtins/abort @@ -3011,7 +3011,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 140 i32.const 0 call $~lib/builtins/abort @@ -3029,7 +3029,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 143 i32.const 0 call $~lib/builtins/abort @@ -3051,7 +3051,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 146 i32.const 0 call $~lib/builtins/abort @@ -3073,7 +3073,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 149 i32.const 0 call $~lib/builtins/abort @@ -3093,7 +3093,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 152 i32.const 0 call $~lib/builtins/abort @@ -3113,7 +3113,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 155 i32.const 0 call $~lib/builtins/abort @@ -3133,7 +3133,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 158 i32.const 0 call $~lib/builtins/abort @@ -3153,7 +3153,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 161 i32.const 0 call $~lib/builtins/abort @@ -3177,7 +3177,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 164 i32.const 0 call $~lib/builtins/abort @@ -3190,7 +3190,7 @@ i32.eqz if i32.const 0 - i32.const 200 + i32.const 240 i32.const 165 i32.const 0 call $~lib/builtins/abort @@ -3355,7 +3355,7 @@ i32.eqz if i32.const 0 - i32.const 240 + i32.const 288 i32.const 97 i32.const 15 call $~lib/builtins/abort @@ -3382,7 +3382,7 @@ ) (func $~lib/runtime/runtime.collect (; 54 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 240 + i32.const 288 i32.const 139 i32.const 9 call $~lib/builtins/abort diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index e1d30654ca..df16427ab8 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -10,10 +10,13 @@ (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "Date" "now" (func $~lib/bindings/Date/now (result f64))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\16\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s") - (data (i32.const 40) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 88) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 128) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") + (data (i32.const 8) "\10\00\00\00\16") + (data (i32.const 24) "s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s") + (data (i32.const 48) "\10\00\00\00(") + (data (i32.const 64) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 104) "\10\00\00\00\1e") + (data (i32.const 120) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 152) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") (global $std/date/creationTime (mut i64) (i64.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) @@ -96,7 +99,7 @@ i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -109,24 +112,24 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 16 i32.add ) (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 280 + i32.const 304 i32.le_u if i32.const 0 - i32.const 48 - i32.const 131 + i32.const 64 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $2 i32.load @@ -134,8 +137,8 @@ i32.ne if i32.const 0 - i32.const 48 - i32.const 133 + i32.const 64 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -161,7 +164,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1 i32.const 0 call $~lib/builtins/abort @@ -180,7 +183,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2 i32.const 0 call $~lib/builtins/abort @@ -201,7 +204,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 5 i32.const 0 call $~lib/builtins/abort @@ -213,13 +216,13 @@ i64.le_s if i32.const 0 - i32.const 16 + i32.const 24 i32.const 7 i32.const 0 call $~lib/builtins/abort unreachable end - i32.const 280 + i32.const 304 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -243,7 +246,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 10 i32.const 0 call $~lib/builtins/abort @@ -262,7 +265,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -271,13 +274,13 @@ ) (func $~lib/runtime/runtime.instanceof (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load local.tee $0 if (result i32) local.get $0 - i32.const 128 + i32.const 152 i32.load i32.le_u else @@ -295,7 +298,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 128 + i32.const 152 i32.add i32.load offset=4 local.tee $0 @@ -312,7 +315,7 @@ i32.eqz if local.get $0 - i32.const 128 + i32.const 152 i32.load i32.gt_u local.set $1 @@ -324,7 +327,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 128 + i32.const 152 i32.add i32.load end @@ -358,7 +361,7 @@ local.get $2 else local.get $0 - i32.const 128 + i32.const 152 i32.load i32.gt_u end @@ -368,7 +371,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 128 + i32.const 152 i32.add i32.load end @@ -381,7 +384,7 @@ local.get $1 if (result i32) local.get $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 else @@ -425,7 +428,7 @@ i32.load if i32.const 0 - i32.const 96 + i32.const 120 i32.const 97 i32.const 15 call $~lib/builtins/abort @@ -446,7 +449,7 @@ ) (func $~lib/runtime/runtime.collect (; 14 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 96 + i32.const 120 i32.const 139 i32.const 9 call $~lib/builtins/abort diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 014f2e6d01..e0115afecb 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -13,21 +13,21 @@ (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "Date" "now" (func $~lib/bindings/Date/now (result f64))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\16\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s\00") - (data (i32.const 40) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 88) "\10\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 128) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") + (data (i32.const 8) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s\00") + (data (i32.const 48) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 104) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 152) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/date/creationTime (mut i64) (i64.const 0)) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/date/date (mut i32) (i32.const 0)) - (global $~lib/runtime/RTTI_BASE i32 (i32.const 128)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 280)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 152)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 304)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -159,8 +159,8 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 131 + i32.const 64 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -176,8 +176,8 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 133 + i32.const 64 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -256,7 +256,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1 i32.const 0 call $~lib/builtins/abort @@ -293,7 +293,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2 i32.const 0 call $~lib/builtins/abort @@ -332,7 +332,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 5 i32.const 0 call $~lib/builtins/abort @@ -347,7 +347,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 7 i32.const 0 call $~lib/builtins/abort @@ -374,7 +374,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 10 i32.const 0 call $~lib/builtins/abort @@ -395,7 +395,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -566,7 +566,7 @@ i32.eqz if i32.const 0 - i32.const 96 + i32.const 120 i32.const 97 i32.const 15 call $~lib/builtins/abort @@ -593,7 +593,7 @@ ) (func $~lib/runtime/runtime.collect (; 21 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 96 + i32.const 120 i32.const 139 i32.const 9 call $~lib/builtins/abort diff --git a/tests/compiler/std/hash.optimized.wat b/tests/compiler/std/hash.optimized.wat index 6bb84d521c..040e21ee98 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -4,9 +4,12 @@ (type $FUNCSIG$v (func)) (memory $0 1) (data (i32.const 8) "\10") - (data (i32.const 16) "\10\00\00\00\02\00\00\00a") - (data (i32.const 32) "\10\00\00\00\04\00\00\00a\00b") - (data (i32.const 48) "\10\00\00\00\06\00\00\00a\00b\00c") + (data (i32.const 24) "\10\00\00\00\02") + (data (i32.const 40) "a") + (data (i32.const 48) "\10\00\00\00\04") + (data (i32.const 64) "a\00b") + (data (i32.const 72) "\10\00\00\00\06") + (data (i32.const 88) "a\00b\00c") (export "memory" (memory $0)) (start $start) (func $~lib/util/hash/hashStr (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -19,7 +22,7 @@ if block $break|0 local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -154,16 +157,16 @@ i32.const 0 call $~lib/util/hash/hashStr drop - i32.const 16 - call $~lib/util/hash/hashStr - drop i32.const 24 call $~lib/util/hash/hashStr drop i32.const 40 call $~lib/util/hash/hashStr drop - i32.const 56 + i32.const 64 + call $~lib/util/hash/hashStr + drop + i32.const 88 call $~lib/util/hash/hashStr drop i32.const 0 diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index 85478d254d..885ce43db4 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -3,13 +3,13 @@ (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\00\00\00\00") - (data (i32.const 16) "\10\00\00\00\02\00\00\00a\00") - (data (i32.const 32) "\10\00\00\00\04\00\00\00a\00b\00") - (data (i32.const 48) "\10\00\00\00\06\00\00\00a\00b\00c\00") + (data (i32.const 8) "\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 24) "\10\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00a\00") + (data (i32.const 48) "\10\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00a\00b\00") + (data (i32.const 72) "\10\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (export "memory" (memory $0)) (start $start) (func $~lib/string/String#get:length (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -214,7 +214,7 @@ call $std/hash/check drop block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i32) - i32.const 16 + i32.const 24 local.set $0 local.get $0 call $~lib/util/hash/hashStr @@ -223,7 +223,7 @@ call $std/hash/check drop block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i32) - i32.const 24 + i32.const 40 local.set $0 local.get $0 call $~lib/util/hash/hashStr @@ -232,7 +232,7 @@ call $std/hash/check drop block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i32) - i32.const 40 + i32.const 64 local.set $0 local.get $0 call $~lib/util/hash/hashStr @@ -241,7 +241,7 @@ call $std/hash/check drop block $~lib/util/hash/HASH<~lib/string/String>|inlined.4 (result i32) - i32.const 56 + i32.const 88 local.set $0 local.get $0 call $~lib/util/hash/hashStr diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 9c7435c8f9..f88a238ff6 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -33,7 +33,6 @@ (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -44,7 +43,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.retain)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -143,7 +141,7 @@ if i32.const 0 i32.const 24 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -158,7 +156,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 3de094043d..bf01c8cd76 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -34,7 +34,6 @@ (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/runtime/RTTI_BASE i32 (i32.const 160)) (global $~lib/memory/HEAP_BASE i32 (i32.const 392)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -45,7 +44,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.release)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -177,7 +175,7 @@ if i32.const 0 i32.const 24 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -194,7 +192,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 7259c1ec60..1832ea7554 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -60,10 +60,14 @@ (import "Math" "tanh" (func $~lib/bindings/Math/tanh (param f64) (result f64))) (import "Math" "trunc" (func $~lib/bindings/Math/trunc (param f64) (result f64))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\16\00\00\00s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s") - (data (i32.const 40) "\0f\00\00\00 \00\00\00)\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe") - (data (i32.const 80) "\11\00\00\00\10\00\00\000\00\00\000\00\00\00 \00\00\00\04") - (data (i32.const 104) "\10\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\16") + (data (i32.const 24) "s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s") + (data (i32.const 48) "\0f\00\00\00 ") + (data (i32.const 64) ")\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe") + (data (i32.const 96) "\11\00\00\00\10") + (data (i32.const 112) "@\00\00\00@\00\00\00 \00\00\00\04") + (data (i32.const 128) "\10\00\00\00\18") + (data (i32.const 144) "~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") (global $~lib/math/rempio2f_y (mut f64) (f64.const 0)) (global $~lib/math/random_seeded (mut i32) (i32.const 0)) (global $~lib/math/random_state0_64 (mut i64) (i64.const 0)) @@ -3678,7 +3682,7 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.0 end - i32.const 92 + i32.const 116 i32.load local.get $3 i32.const 23 @@ -3694,7 +3698,7 @@ i32.add i64.load local.set $10 - i32.const 92 + i32.const 116 i32.load local.get $9 i32.const 1 @@ -3717,7 +3721,7 @@ i32.sub i64.extend_i32_s i64.shl - i32.const 92 + i32.const 116 i32.load local.get $9 i32.const 2 @@ -8401,7 +8405,7 @@ i64.eqz if i32.const 0 - i32.const 112 + i32.const 144 i32.const 1021 i32.const 4 call $~lib/builtins/abort @@ -8467,7 +8471,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 144 i32.const 1030 i32.const 24 call $~lib/builtins/abort @@ -8514,7 +8518,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 144 i32.const 2312 i32.const 24 call $~lib/builtins/abort @@ -9479,7 +9483,7 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.1 end - i32.const 92 + i32.const 116 i32.load local.get $3 i32.const 23 @@ -9495,7 +9499,7 @@ i32.add i64.load local.set $10 - i32.const 92 + i32.const 116 i32.load local.get $9 i32.const 1 @@ -9518,7 +9522,7 @@ i32.sub i64.extend_i32_s i64.shl - i32.const 92 + i32.const 116 i32.load local.get $9 i32.const 2 @@ -10072,7 +10076,7 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.2 end - i32.const 92 + i32.const 116 i32.load local.get $4 i32.const 23 @@ -10088,7 +10092,7 @@ i32.add i64.load local.set $10 - i32.const 92 + i32.const 116 i32.load local.get $9 i32.const 1 @@ -10111,7 +10115,7 @@ i32.sub i64.extend_i32_s i64.shl - i32.const 92 + i32.const 116 i32.load local.get $9 i32.const 2 @@ -10867,7 +10871,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 108 i32.const 0 call $~lib/builtins/abort @@ -10880,7 +10884,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 109 i32.const 0 call $~lib/builtins/abort @@ -10893,7 +10897,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 110 i32.const 0 call $~lib/builtins/abort @@ -10906,7 +10910,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 111 i32.const 0 call $~lib/builtins/abort @@ -10919,7 +10923,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 112 i32.const 0 call $~lib/builtins/abort @@ -10932,7 +10936,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 113 i32.const 0 call $~lib/builtins/abort @@ -10945,7 +10949,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 114 i32.const 0 call $~lib/builtins/abort @@ -10959,7 +10963,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 116 i32.const 0 call $~lib/builtins/abort @@ -10973,7 +10977,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 117 i32.const 0 call $~lib/builtins/abort @@ -10987,7 +10991,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 118 i32.const 0 call $~lib/builtins/abort @@ -11001,7 +11005,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 119 i32.const 0 call $~lib/builtins/abort @@ -11015,7 +11019,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 120 i32.const 0 call $~lib/builtins/abort @@ -11029,7 +11033,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 121 i32.const 0 call $~lib/builtins/abort @@ -11043,7 +11047,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 122 i32.const 0 call $~lib/builtins/abort @@ -11056,7 +11060,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 133 i32.const 0 call $~lib/builtins/abort @@ -11069,7 +11073,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 134 i32.const 0 call $~lib/builtins/abort @@ -11082,7 +11086,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 135 i32.const 0 call $~lib/builtins/abort @@ -11095,7 +11099,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 136 i32.const 0 call $~lib/builtins/abort @@ -11108,7 +11112,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 137 i32.const 0 call $~lib/builtins/abort @@ -11121,7 +11125,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 138 i32.const 0 call $~lib/builtins/abort @@ -11134,7 +11138,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 139 i32.const 0 call $~lib/builtins/abort @@ -11147,7 +11151,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 140 i32.const 0 call $~lib/builtins/abort @@ -11160,7 +11164,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 141 i32.const 0 call $~lib/builtins/abort @@ -11173,7 +11177,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 142 i32.const 0 call $~lib/builtins/abort @@ -11186,7 +11190,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 145 i32.const 0 call $~lib/builtins/abort @@ -11199,7 +11203,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 146 i32.const 0 call $~lib/builtins/abort @@ -11212,7 +11216,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 147 i32.const 0 call $~lib/builtins/abort @@ -11225,7 +11229,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 148 i32.const 0 call $~lib/builtins/abort @@ -11238,7 +11242,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 149 i32.const 0 call $~lib/builtins/abort @@ -11251,7 +11255,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 150 i32.const 0 call $~lib/builtins/abort @@ -11264,7 +11268,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 151 i32.const 0 call $~lib/builtins/abort @@ -11277,7 +11281,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 152 i32.const 0 call $~lib/builtins/abort @@ -11290,7 +11294,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 153 i32.const 0 call $~lib/builtins/abort @@ -11303,7 +11307,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 154 i32.const 0 call $~lib/builtins/abort @@ -11316,7 +11320,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 155 i32.const 0 call $~lib/builtins/abort @@ -11329,7 +11333,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 156 i32.const 0 call $~lib/builtins/abort @@ -11342,7 +11346,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 157 i32.const 0 call $~lib/builtins/abort @@ -11355,7 +11359,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 158 i32.const 0 call $~lib/builtins/abort @@ -11368,7 +11372,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 159 i32.const 0 call $~lib/builtins/abort @@ -11381,7 +11385,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 160 i32.const 0 call $~lib/builtins/abort @@ -11394,7 +11398,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 161 i32.const 0 call $~lib/builtins/abort @@ -11407,7 +11411,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 162 i32.const 0 call $~lib/builtins/abort @@ -11420,7 +11424,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 163 i32.const 0 call $~lib/builtins/abort @@ -11433,7 +11437,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 172 i32.const 0 call $~lib/builtins/abort @@ -11446,7 +11450,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 173 i32.const 0 call $~lib/builtins/abort @@ -11459,7 +11463,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 174 i32.const 0 call $~lib/builtins/abort @@ -11472,7 +11476,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 175 i32.const 0 call $~lib/builtins/abort @@ -11485,7 +11489,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 176 i32.const 0 call $~lib/builtins/abort @@ -11498,7 +11502,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 177 i32.const 0 call $~lib/builtins/abort @@ -11511,7 +11515,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 178 i32.const 0 call $~lib/builtins/abort @@ -11524,7 +11528,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 179 i32.const 0 call $~lib/builtins/abort @@ -11537,7 +11541,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 180 i32.const 0 call $~lib/builtins/abort @@ -11550,7 +11554,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 181 i32.const 0 call $~lib/builtins/abort @@ -11563,7 +11567,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 184 i32.const 0 call $~lib/builtins/abort @@ -11576,7 +11580,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 185 i32.const 0 call $~lib/builtins/abort @@ -11589,7 +11593,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 186 i32.const 0 call $~lib/builtins/abort @@ -11602,7 +11606,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 187 i32.const 0 call $~lib/builtins/abort @@ -11615,7 +11619,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 188 i32.const 0 call $~lib/builtins/abort @@ -11628,7 +11632,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 189 i32.const 0 call $~lib/builtins/abort @@ -11641,7 +11645,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 190 i32.const 0 call $~lib/builtins/abort @@ -11654,7 +11658,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 191 i32.const 0 call $~lib/builtins/abort @@ -11667,7 +11671,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 192 i32.const 0 call $~lib/builtins/abort @@ -11680,7 +11684,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 193 i32.const 0 call $~lib/builtins/abort @@ -11693,7 +11697,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 194 i32.const 0 call $~lib/builtins/abort @@ -11706,7 +11710,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 195 i32.const 0 call $~lib/builtins/abort @@ -11719,7 +11723,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 196 i32.const 0 call $~lib/builtins/abort @@ -11732,7 +11736,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 197 i32.const 0 call $~lib/builtins/abort @@ -11745,7 +11749,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 198 i32.const 0 call $~lib/builtins/abort @@ -11758,7 +11762,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 199 i32.const 0 call $~lib/builtins/abort @@ -11771,7 +11775,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 200 i32.const 0 call $~lib/builtins/abort @@ -11784,7 +11788,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 201 i32.const 0 call $~lib/builtins/abort @@ -11797,7 +11801,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 202 i32.const 0 call $~lib/builtins/abort @@ -11809,7 +11813,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 214 i32.const 0 call $~lib/builtins/abort @@ -11821,7 +11825,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 215 i32.const 0 call $~lib/builtins/abort @@ -11833,7 +11837,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 216 i32.const 0 call $~lib/builtins/abort @@ -11845,7 +11849,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 217 i32.const 0 call $~lib/builtins/abort @@ -11857,7 +11861,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 218 i32.const 0 call $~lib/builtins/abort @@ -11869,7 +11873,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 219 i32.const 0 call $~lib/builtins/abort @@ -11881,7 +11885,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 220 i32.const 0 call $~lib/builtins/abort @@ -11893,7 +11897,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 221 i32.const 0 call $~lib/builtins/abort @@ -11905,7 +11909,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 222 i32.const 0 call $~lib/builtins/abort @@ -11917,7 +11921,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 223 i32.const 0 call $~lib/builtins/abort @@ -11929,7 +11933,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 226 i32.const 0 call $~lib/builtins/abort @@ -11941,7 +11945,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 227 i32.const 0 call $~lib/builtins/abort @@ -11953,7 +11957,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 228 i32.const 0 call $~lib/builtins/abort @@ -11965,7 +11969,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 229 i32.const 0 call $~lib/builtins/abort @@ -11977,7 +11981,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 230 i32.const 0 call $~lib/builtins/abort @@ -11989,7 +11993,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 231 i32.const 0 call $~lib/builtins/abort @@ -12001,7 +12005,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 232 i32.const 0 call $~lib/builtins/abort @@ -12013,7 +12017,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 241 i32.const 0 call $~lib/builtins/abort @@ -12025,7 +12029,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 242 i32.const 0 call $~lib/builtins/abort @@ -12037,7 +12041,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 243 i32.const 0 call $~lib/builtins/abort @@ -12049,7 +12053,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 244 i32.const 0 call $~lib/builtins/abort @@ -12061,7 +12065,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 245 i32.const 0 call $~lib/builtins/abort @@ -12073,7 +12077,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 246 i32.const 0 call $~lib/builtins/abort @@ -12085,7 +12089,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 247 i32.const 0 call $~lib/builtins/abort @@ -12097,7 +12101,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 248 i32.const 0 call $~lib/builtins/abort @@ -12109,7 +12113,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 249 i32.const 0 call $~lib/builtins/abort @@ -12121,7 +12125,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 250 i32.const 0 call $~lib/builtins/abort @@ -12133,7 +12137,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 253 i32.const 0 call $~lib/builtins/abort @@ -12145,7 +12149,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 254 i32.const 0 call $~lib/builtins/abort @@ -12157,7 +12161,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 255 i32.const 0 call $~lib/builtins/abort @@ -12169,7 +12173,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 256 i32.const 0 call $~lib/builtins/abort @@ -12181,7 +12185,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 257 i32.const 0 call $~lib/builtins/abort @@ -12193,7 +12197,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 258 i32.const 0 call $~lib/builtins/abort @@ -12205,7 +12209,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 259 i32.const 0 call $~lib/builtins/abort @@ -12218,7 +12222,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 271 i32.const 0 call $~lib/builtins/abort @@ -12231,7 +12235,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 272 i32.const 0 call $~lib/builtins/abort @@ -12244,7 +12248,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 273 i32.const 0 call $~lib/builtins/abort @@ -12257,7 +12261,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 274 i32.const 0 call $~lib/builtins/abort @@ -12270,7 +12274,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 275 i32.const 0 call $~lib/builtins/abort @@ -12283,7 +12287,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 276 i32.const 0 call $~lib/builtins/abort @@ -12296,7 +12300,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 277 i32.const 0 call $~lib/builtins/abort @@ -12309,7 +12313,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 278 i32.const 0 call $~lib/builtins/abort @@ -12322,7 +12326,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 279 i32.const 0 call $~lib/builtins/abort @@ -12335,7 +12339,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 280 i32.const 0 call $~lib/builtins/abort @@ -12348,7 +12352,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 283 i32.const 0 call $~lib/builtins/abort @@ -12361,7 +12365,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 284 i32.const 0 call $~lib/builtins/abort @@ -12374,7 +12378,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 285 i32.const 0 call $~lib/builtins/abort @@ -12387,7 +12391,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 286 i32.const 0 call $~lib/builtins/abort @@ -12400,7 +12404,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 287 i32.const 0 call $~lib/builtins/abort @@ -12413,7 +12417,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 288 i32.const 0 call $~lib/builtins/abort @@ -12426,7 +12430,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 289 i32.const 0 call $~lib/builtins/abort @@ -12439,7 +12443,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 290 i32.const 0 call $~lib/builtins/abort @@ -12452,7 +12456,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 291 i32.const 0 call $~lib/builtins/abort @@ -12465,7 +12469,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 292 i32.const 0 call $~lib/builtins/abort @@ -12478,7 +12482,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 301 i32.const 0 call $~lib/builtins/abort @@ -12491,7 +12495,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 302 i32.const 0 call $~lib/builtins/abort @@ -12504,7 +12508,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 303 i32.const 0 call $~lib/builtins/abort @@ -12517,7 +12521,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 304 i32.const 0 call $~lib/builtins/abort @@ -12530,7 +12534,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 305 i32.const 0 call $~lib/builtins/abort @@ -12543,7 +12547,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 306 i32.const 0 call $~lib/builtins/abort @@ -12556,7 +12560,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 307 i32.const 0 call $~lib/builtins/abort @@ -12569,7 +12573,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 308 i32.const 0 call $~lib/builtins/abort @@ -12582,7 +12586,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 309 i32.const 0 call $~lib/builtins/abort @@ -12595,7 +12599,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 310 i32.const 0 call $~lib/builtins/abort @@ -12608,7 +12612,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 313 i32.const 0 call $~lib/builtins/abort @@ -12621,7 +12625,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 314 i32.const 0 call $~lib/builtins/abort @@ -12634,7 +12638,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 315 i32.const 0 call $~lib/builtins/abort @@ -12647,7 +12651,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 316 i32.const 0 call $~lib/builtins/abort @@ -12660,7 +12664,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 317 i32.const 0 call $~lib/builtins/abort @@ -12673,7 +12677,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 318 i32.const 0 call $~lib/builtins/abort @@ -12686,7 +12690,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 319 i32.const 0 call $~lib/builtins/abort @@ -12699,7 +12703,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 320 i32.const 0 call $~lib/builtins/abort @@ -12712,7 +12716,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 321 i32.const 0 call $~lib/builtins/abort @@ -12725,7 +12729,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 322 i32.const 0 call $~lib/builtins/abort @@ -12738,7 +12742,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 323 i32.const 0 call $~lib/builtins/abort @@ -12751,7 +12755,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 335 i32.const 0 call $~lib/builtins/abort @@ -12764,7 +12768,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 336 i32.const 0 call $~lib/builtins/abort @@ -12777,7 +12781,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 337 i32.const 0 call $~lib/builtins/abort @@ -12790,7 +12794,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 338 i32.const 0 call $~lib/builtins/abort @@ -12803,7 +12807,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 339 i32.const 0 call $~lib/builtins/abort @@ -12816,7 +12820,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 340 i32.const 0 call $~lib/builtins/abort @@ -12829,7 +12833,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 341 i32.const 0 call $~lib/builtins/abort @@ -12842,7 +12846,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 342 i32.const 0 call $~lib/builtins/abort @@ -12855,7 +12859,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 343 i32.const 0 call $~lib/builtins/abort @@ -12868,7 +12872,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 344 i32.const 0 call $~lib/builtins/abort @@ -12881,7 +12885,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 347 i32.const 0 call $~lib/builtins/abort @@ -12894,7 +12898,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 348 i32.const 0 call $~lib/builtins/abort @@ -12907,7 +12911,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 349 i32.const 0 call $~lib/builtins/abort @@ -12920,7 +12924,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 350 i32.const 0 call $~lib/builtins/abort @@ -12933,7 +12937,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 351 i32.const 0 call $~lib/builtins/abort @@ -12946,7 +12950,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 352 i32.const 0 call $~lib/builtins/abort @@ -12959,7 +12963,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 353 i32.const 0 call $~lib/builtins/abort @@ -12972,7 +12976,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 369 i32.const 0 call $~lib/builtins/abort @@ -12985,7 +12989,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 371 i32.const 0 call $~lib/builtins/abort @@ -12998,7 +13002,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 372 i32.const 0 call $~lib/builtins/abort @@ -13011,7 +13015,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 381 i32.const 0 call $~lib/builtins/abort @@ -13024,7 +13028,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 382 i32.const 0 call $~lib/builtins/abort @@ -13037,7 +13041,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 383 i32.const 0 call $~lib/builtins/abort @@ -13050,7 +13054,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 384 i32.const 0 call $~lib/builtins/abort @@ -13063,7 +13067,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 385 i32.const 0 call $~lib/builtins/abort @@ -13076,7 +13080,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 386 i32.const 0 call $~lib/builtins/abort @@ -13089,7 +13093,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 387 i32.const 0 call $~lib/builtins/abort @@ -13102,7 +13106,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 388 i32.const 0 call $~lib/builtins/abort @@ -13115,7 +13119,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 389 i32.const 0 call $~lib/builtins/abort @@ -13128,7 +13132,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 390 i32.const 0 call $~lib/builtins/abort @@ -13141,7 +13145,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 393 i32.const 0 call $~lib/builtins/abort @@ -13154,7 +13158,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 394 i32.const 0 call $~lib/builtins/abort @@ -13167,7 +13171,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 395 i32.const 0 call $~lib/builtins/abort @@ -13180,7 +13184,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 396 i32.const 0 call $~lib/builtins/abort @@ -13193,7 +13197,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 397 i32.const 0 call $~lib/builtins/abort @@ -13206,7 +13210,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 398 i32.const 0 call $~lib/builtins/abort @@ -13219,7 +13223,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 399 i32.const 0 call $~lib/builtins/abort @@ -13232,7 +13236,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 400 i32.const 0 call $~lib/builtins/abort @@ -13245,7 +13249,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 412 i32.const 0 call $~lib/builtins/abort @@ -13258,7 +13262,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 413 i32.const 0 call $~lib/builtins/abort @@ -13271,7 +13275,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 414 i32.const 0 call $~lib/builtins/abort @@ -13284,7 +13288,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 415 i32.const 0 call $~lib/builtins/abort @@ -13297,7 +13301,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 416 i32.const 0 call $~lib/builtins/abort @@ -13310,7 +13314,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 417 i32.const 0 call $~lib/builtins/abort @@ -13323,7 +13327,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 418 i32.const 0 call $~lib/builtins/abort @@ -13336,7 +13340,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 419 i32.const 0 call $~lib/builtins/abort @@ -13349,7 +13353,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 420 i32.const 0 call $~lib/builtins/abort @@ -13362,7 +13366,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 421 i32.const 0 call $~lib/builtins/abort @@ -13375,7 +13379,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 424 i32.const 0 call $~lib/builtins/abort @@ -13388,7 +13392,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 425 i32.const 0 call $~lib/builtins/abort @@ -13401,7 +13405,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 426 i32.const 0 call $~lib/builtins/abort @@ -13414,7 +13418,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 427 i32.const 0 call $~lib/builtins/abort @@ -13427,7 +13431,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 428 i32.const 0 call $~lib/builtins/abort @@ -13440,7 +13444,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 429 i32.const 0 call $~lib/builtins/abort @@ -13453,7 +13457,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 430 i32.const 0 call $~lib/builtins/abort @@ -13466,7 +13470,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 431 i32.const 0 call $~lib/builtins/abort @@ -13479,7 +13483,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 432 i32.const 0 call $~lib/builtins/abort @@ -13492,7 +13496,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 433 i32.const 0 call $~lib/builtins/abort @@ -13505,7 +13509,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 442 i32.const 0 call $~lib/builtins/abort @@ -13518,7 +13522,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 443 i32.const 0 call $~lib/builtins/abort @@ -13531,7 +13535,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 444 i32.const 0 call $~lib/builtins/abort @@ -13544,7 +13548,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 445 i32.const 0 call $~lib/builtins/abort @@ -13557,7 +13561,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 446 i32.const 0 call $~lib/builtins/abort @@ -13570,7 +13574,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 447 i32.const 0 call $~lib/builtins/abort @@ -13583,7 +13587,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 448 i32.const 0 call $~lib/builtins/abort @@ -13596,7 +13600,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 449 i32.const 0 call $~lib/builtins/abort @@ -13609,7 +13613,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 450 i32.const 0 call $~lib/builtins/abort @@ -13622,7 +13626,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 451 i32.const 0 call $~lib/builtins/abort @@ -13635,7 +13639,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 454 i32.const 0 call $~lib/builtins/abort @@ -13648,7 +13652,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 455 i32.const 0 call $~lib/builtins/abort @@ -13661,7 +13665,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 456 i32.const 0 call $~lib/builtins/abort @@ -13674,7 +13678,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 457 i32.const 0 call $~lib/builtins/abort @@ -13687,7 +13691,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 458 i32.const 0 call $~lib/builtins/abort @@ -13700,7 +13704,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 459 i32.const 0 call $~lib/builtins/abort @@ -13713,7 +13717,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 460 i32.const 0 call $~lib/builtins/abort @@ -13726,7 +13730,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 461 i32.const 0 call $~lib/builtins/abort @@ -13739,7 +13743,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 462 i32.const 0 call $~lib/builtins/abort @@ -13752,7 +13756,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 463 i32.const 0 call $~lib/builtins/abort @@ -13765,7 +13769,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 475 i32.const 0 call $~lib/builtins/abort @@ -13778,7 +13782,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 476 i32.const 0 call $~lib/builtins/abort @@ -13791,7 +13795,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 477 i32.const 0 call $~lib/builtins/abort @@ -13804,7 +13808,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 478 i32.const 0 call $~lib/builtins/abort @@ -13817,7 +13821,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 479 i32.const 0 call $~lib/builtins/abort @@ -13830,7 +13834,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 480 i32.const 0 call $~lib/builtins/abort @@ -13843,7 +13847,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 481 i32.const 0 call $~lib/builtins/abort @@ -13856,7 +13860,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 482 i32.const 0 call $~lib/builtins/abort @@ -13869,7 +13873,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 483 i32.const 0 call $~lib/builtins/abort @@ -13882,7 +13886,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 484 i32.const 0 call $~lib/builtins/abort @@ -13895,7 +13899,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 487 i32.const 0 call $~lib/builtins/abort @@ -13908,7 +13912,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 488 i32.const 0 call $~lib/builtins/abort @@ -13921,7 +13925,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 489 i32.const 0 call $~lib/builtins/abort @@ -13934,7 +13938,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 490 i32.const 0 call $~lib/builtins/abort @@ -13947,7 +13951,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 491 i32.const 0 call $~lib/builtins/abort @@ -13960,7 +13964,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 520 i32.const 0 call $~lib/builtins/abort @@ -13973,7 +13977,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 521 i32.const 0 call $~lib/builtins/abort @@ -13986,7 +13990,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 522 i32.const 0 call $~lib/builtins/abort @@ -13999,7 +14003,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 523 i32.const 0 call $~lib/builtins/abort @@ -14012,7 +14016,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 524 i32.const 0 call $~lib/builtins/abort @@ -14025,7 +14029,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 525 i32.const 0 call $~lib/builtins/abort @@ -14038,7 +14042,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 526 i32.const 0 call $~lib/builtins/abort @@ -14051,7 +14055,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 527 i32.const 0 call $~lib/builtins/abort @@ -14064,7 +14068,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 528 i32.const 0 call $~lib/builtins/abort @@ -14077,7 +14081,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 529 i32.const 0 call $~lib/builtins/abort @@ -14090,7 +14094,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 532 i32.const 0 call $~lib/builtins/abort @@ -14103,7 +14107,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 533 i32.const 0 call $~lib/builtins/abort @@ -14116,7 +14120,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 534 i32.const 0 call $~lib/builtins/abort @@ -14129,7 +14133,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 535 i32.const 0 call $~lib/builtins/abort @@ -14142,7 +14146,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 536 i32.const 0 call $~lib/builtins/abort @@ -14155,7 +14159,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 548 i32.const 0 call $~lib/builtins/abort @@ -14168,7 +14172,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 549 i32.const 0 call $~lib/builtins/abort @@ -14181,7 +14185,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 550 i32.const 0 call $~lib/builtins/abort @@ -14194,7 +14198,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 551 i32.const 0 call $~lib/builtins/abort @@ -14207,7 +14211,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 552 i32.const 0 call $~lib/builtins/abort @@ -14220,7 +14224,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 553 i32.const 0 call $~lib/builtins/abort @@ -14233,7 +14237,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 554 i32.const 0 call $~lib/builtins/abort @@ -14246,7 +14250,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 555 i32.const 0 call $~lib/builtins/abort @@ -14259,7 +14263,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 556 i32.const 0 call $~lib/builtins/abort @@ -14272,7 +14276,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 557 i32.const 0 call $~lib/builtins/abort @@ -14285,7 +14289,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 560 i32.const 0 call $~lib/builtins/abort @@ -14298,7 +14302,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 561 i32.const 0 call $~lib/builtins/abort @@ -14311,7 +14315,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 562 i32.const 0 call $~lib/builtins/abort @@ -14324,7 +14328,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 563 i32.const 0 call $~lib/builtins/abort @@ -14337,7 +14341,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 564 i32.const 0 call $~lib/builtins/abort @@ -14350,7 +14354,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 565 i32.const 0 call $~lib/builtins/abort @@ -14363,7 +14367,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 566 i32.const 0 call $~lib/builtins/abort @@ -14376,7 +14380,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 567 i32.const 0 call $~lib/builtins/abort @@ -14389,7 +14393,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 576 i32.const 0 call $~lib/builtins/abort @@ -14402,7 +14406,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 577 i32.const 0 call $~lib/builtins/abort @@ -14415,7 +14419,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 578 i32.const 0 call $~lib/builtins/abort @@ -14428,7 +14432,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 579 i32.const 0 call $~lib/builtins/abort @@ -14441,7 +14445,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 580 i32.const 0 call $~lib/builtins/abort @@ -14454,7 +14458,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 581 i32.const 0 call $~lib/builtins/abort @@ -14467,7 +14471,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 582 i32.const 0 call $~lib/builtins/abort @@ -14480,7 +14484,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 583 i32.const 0 call $~lib/builtins/abort @@ -14493,7 +14497,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 584 i32.const 0 call $~lib/builtins/abort @@ -14506,7 +14510,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 585 i32.const 0 call $~lib/builtins/abort @@ -14519,7 +14523,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 588 i32.const 0 call $~lib/builtins/abort @@ -14532,7 +14536,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 589 i32.const 0 call $~lib/builtins/abort @@ -14545,7 +14549,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 590 i32.const 0 call $~lib/builtins/abort @@ -14558,7 +14562,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 591 i32.const 0 call $~lib/builtins/abort @@ -14571,7 +14575,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 592 i32.const 0 call $~lib/builtins/abort @@ -14584,7 +14588,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 593 i32.const 0 call $~lib/builtins/abort @@ -14597,7 +14601,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 594 i32.const 0 call $~lib/builtins/abort @@ -14610,7 +14614,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 606 i32.const 0 call $~lib/builtins/abort @@ -14623,7 +14627,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 607 i32.const 0 call $~lib/builtins/abort @@ -14636,7 +14640,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 608 i32.const 0 call $~lib/builtins/abort @@ -14649,7 +14653,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 609 i32.const 0 call $~lib/builtins/abort @@ -14662,7 +14666,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 610 i32.const 0 call $~lib/builtins/abort @@ -14675,7 +14679,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 611 i32.const 0 call $~lib/builtins/abort @@ -14688,7 +14692,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 612 i32.const 0 call $~lib/builtins/abort @@ -14701,7 +14705,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 613 i32.const 0 call $~lib/builtins/abort @@ -14714,7 +14718,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 614 i32.const 0 call $~lib/builtins/abort @@ -14727,7 +14731,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 615 i32.const 0 call $~lib/builtins/abort @@ -14740,7 +14744,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 618 i32.const 0 call $~lib/builtins/abort @@ -14753,7 +14757,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 619 i32.const 0 call $~lib/builtins/abort @@ -14766,7 +14770,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 620 i32.const 0 call $~lib/builtins/abort @@ -14779,7 +14783,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 621 i32.const 0 call $~lib/builtins/abort @@ -14792,7 +14796,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 622 i32.const 0 call $~lib/builtins/abort @@ -14805,7 +14809,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 623 i32.const 0 call $~lib/builtins/abort @@ -14818,7 +14822,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 624 i32.const 0 call $~lib/builtins/abort @@ -14831,7 +14835,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 625 i32.const 0 call $~lib/builtins/abort @@ -14844,7 +14848,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 626 i32.const 0 call $~lib/builtins/abort @@ -14857,7 +14861,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 627 i32.const 0 call $~lib/builtins/abort @@ -14870,7 +14874,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 628 i32.const 0 call $~lib/builtins/abort @@ -14883,7 +14887,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 629 i32.const 0 call $~lib/builtins/abort @@ -14896,7 +14900,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 630 i32.const 0 call $~lib/builtins/abort @@ -14909,7 +14913,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 631 i32.const 0 call $~lib/builtins/abort @@ -14922,7 +14926,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 640 i32.const 0 call $~lib/builtins/abort @@ -14935,7 +14939,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 641 i32.const 0 call $~lib/builtins/abort @@ -14948,7 +14952,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 642 i32.const 0 call $~lib/builtins/abort @@ -14961,7 +14965,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 643 i32.const 0 call $~lib/builtins/abort @@ -14974,7 +14978,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 644 i32.const 0 call $~lib/builtins/abort @@ -14987,7 +14991,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 645 i32.const 0 call $~lib/builtins/abort @@ -15000,7 +15004,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 646 i32.const 0 call $~lib/builtins/abort @@ -15013,7 +15017,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 647 i32.const 0 call $~lib/builtins/abort @@ -15026,7 +15030,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 648 i32.const 0 call $~lib/builtins/abort @@ -15039,7 +15043,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 649 i32.const 0 call $~lib/builtins/abort @@ -15052,7 +15056,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 652 i32.const 0 call $~lib/builtins/abort @@ -15065,7 +15069,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 653 i32.const 0 call $~lib/builtins/abort @@ -15078,7 +15082,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 654 i32.const 0 call $~lib/builtins/abort @@ -15091,7 +15095,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 655 i32.const 0 call $~lib/builtins/abort @@ -15104,7 +15108,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 656 i32.const 0 call $~lib/builtins/abort @@ -15117,7 +15121,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 657 i32.const 0 call $~lib/builtins/abort @@ -15130,7 +15134,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 658 i32.const 0 call $~lib/builtins/abort @@ -15143,7 +15147,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 659 i32.const 0 call $~lib/builtins/abort @@ -15156,7 +15160,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 660 i32.const 0 call $~lib/builtins/abort @@ -15169,7 +15173,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 661 i32.const 0 call $~lib/builtins/abort @@ -15182,7 +15186,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 662 i32.const 0 call $~lib/builtins/abort @@ -15195,7 +15199,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 663 i32.const 0 call $~lib/builtins/abort @@ -15208,7 +15212,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 664 i32.const 0 call $~lib/builtins/abort @@ -15221,7 +15225,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 665 i32.const 0 call $~lib/builtins/abort @@ -15235,7 +15239,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 677 i32.const 0 call $~lib/builtins/abort @@ -15249,7 +15253,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 678 i32.const 0 call $~lib/builtins/abort @@ -15263,7 +15267,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 679 i32.const 0 call $~lib/builtins/abort @@ -15277,7 +15281,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 680 i32.const 0 call $~lib/builtins/abort @@ -15291,7 +15295,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 681 i32.const 0 call $~lib/builtins/abort @@ -15305,7 +15309,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 682 i32.const 0 call $~lib/builtins/abort @@ -15319,7 +15323,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 683 i32.const 0 call $~lib/builtins/abort @@ -15333,7 +15337,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 684 i32.const 0 call $~lib/builtins/abort @@ -15347,7 +15351,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 685 i32.const 0 call $~lib/builtins/abort @@ -15361,7 +15365,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 686 i32.const 0 call $~lib/builtins/abort @@ -15375,7 +15379,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 689 i32.const 0 call $~lib/builtins/abort @@ -15389,7 +15393,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 690 i32.const 0 call $~lib/builtins/abort @@ -15403,7 +15407,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 691 i32.const 0 call $~lib/builtins/abort @@ -15417,7 +15421,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 692 i32.const 0 call $~lib/builtins/abort @@ -15431,7 +15435,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 693 i32.const 0 call $~lib/builtins/abort @@ -15445,7 +15449,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 694 i32.const 0 call $~lib/builtins/abort @@ -15459,7 +15463,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 695 i32.const 0 call $~lib/builtins/abort @@ -15473,7 +15477,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 696 i32.const 0 call $~lib/builtins/abort @@ -15487,7 +15491,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 697 i32.const 0 call $~lib/builtins/abort @@ -15501,7 +15505,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 698 i32.const 0 call $~lib/builtins/abort @@ -15515,7 +15519,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 699 i32.const 0 call $~lib/builtins/abort @@ -15529,7 +15533,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 700 i32.const 0 call $~lib/builtins/abort @@ -15543,7 +15547,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 701 i32.const 0 call $~lib/builtins/abort @@ -15557,7 +15561,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 702 i32.const 0 call $~lib/builtins/abort @@ -15571,7 +15575,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 703 i32.const 0 call $~lib/builtins/abort @@ -15585,7 +15589,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 704 i32.const 0 call $~lib/builtins/abort @@ -15599,7 +15603,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 705 i32.const 0 call $~lib/builtins/abort @@ -15613,7 +15617,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 706 i32.const 0 call $~lib/builtins/abort @@ -15627,7 +15631,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 707 i32.const 0 call $~lib/builtins/abort @@ -15641,7 +15645,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 708 i32.const 0 call $~lib/builtins/abort @@ -15655,7 +15659,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 709 i32.const 0 call $~lib/builtins/abort @@ -15669,7 +15673,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 710 i32.const 0 call $~lib/builtins/abort @@ -15683,7 +15687,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 711 i32.const 0 call $~lib/builtins/abort @@ -15697,7 +15701,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 712 i32.const 0 call $~lib/builtins/abort @@ -15711,7 +15715,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 713 i32.const 0 call $~lib/builtins/abort @@ -15725,7 +15729,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 714 i32.const 0 call $~lib/builtins/abort @@ -15739,7 +15743,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 715 i32.const 0 call $~lib/builtins/abort @@ -15753,7 +15757,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 716 i32.const 0 call $~lib/builtins/abort @@ -15767,7 +15771,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 717 i32.const 0 call $~lib/builtins/abort @@ -15781,7 +15785,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 718 i32.const 0 call $~lib/builtins/abort @@ -15795,7 +15799,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 727 i32.const 0 call $~lib/builtins/abort @@ -15809,7 +15813,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 728 i32.const 0 call $~lib/builtins/abort @@ -15823,7 +15827,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 729 i32.const 0 call $~lib/builtins/abort @@ -15837,7 +15841,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 730 i32.const 0 call $~lib/builtins/abort @@ -15851,7 +15855,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 731 i32.const 0 call $~lib/builtins/abort @@ -15865,7 +15869,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 732 i32.const 0 call $~lib/builtins/abort @@ -15879,7 +15883,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 733 i32.const 0 call $~lib/builtins/abort @@ -15893,7 +15897,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 734 i32.const 0 call $~lib/builtins/abort @@ -15907,7 +15911,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 735 i32.const 0 call $~lib/builtins/abort @@ -15921,7 +15925,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 736 i32.const 0 call $~lib/builtins/abort @@ -15935,7 +15939,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 739 i32.const 0 call $~lib/builtins/abort @@ -15949,7 +15953,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 740 i32.const 0 call $~lib/builtins/abort @@ -15963,7 +15967,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 741 i32.const 0 call $~lib/builtins/abort @@ -15977,7 +15981,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 742 i32.const 0 call $~lib/builtins/abort @@ -15991,7 +15995,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 743 i32.const 0 call $~lib/builtins/abort @@ -16005,7 +16009,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 744 i32.const 0 call $~lib/builtins/abort @@ -16019,7 +16023,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 745 i32.const 0 call $~lib/builtins/abort @@ -16033,7 +16037,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 746 i32.const 0 call $~lib/builtins/abort @@ -16047,7 +16051,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 747 i32.const 0 call $~lib/builtins/abort @@ -16061,7 +16065,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 748 i32.const 0 call $~lib/builtins/abort @@ -16075,7 +16079,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 749 i32.const 0 call $~lib/builtins/abort @@ -16089,7 +16093,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 750 i32.const 0 call $~lib/builtins/abort @@ -16103,7 +16107,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 751 i32.const 0 call $~lib/builtins/abort @@ -16117,7 +16121,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 752 i32.const 0 call $~lib/builtins/abort @@ -16131,7 +16135,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 753 i32.const 0 call $~lib/builtins/abort @@ -16145,7 +16149,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 754 i32.const 0 call $~lib/builtins/abort @@ -16159,7 +16163,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 755 i32.const 0 call $~lib/builtins/abort @@ -16173,7 +16177,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 756 i32.const 0 call $~lib/builtins/abort @@ -16187,7 +16191,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 757 i32.const 0 call $~lib/builtins/abort @@ -16201,7 +16205,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 758 i32.const 0 call $~lib/builtins/abort @@ -16215,7 +16219,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 759 i32.const 0 call $~lib/builtins/abort @@ -16229,7 +16233,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 760 i32.const 0 call $~lib/builtins/abort @@ -16243,7 +16247,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 761 i32.const 0 call $~lib/builtins/abort @@ -16257,7 +16261,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 762 i32.const 0 call $~lib/builtins/abort @@ -16271,7 +16275,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 763 i32.const 0 call $~lib/builtins/abort @@ -16285,7 +16289,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 764 i32.const 0 call $~lib/builtins/abort @@ -16299,7 +16303,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 765 i32.const 0 call $~lib/builtins/abort @@ -16313,7 +16317,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 766 i32.const 0 call $~lib/builtins/abort @@ -16326,7 +16330,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 778 i32.const 0 call $~lib/builtins/abort @@ -16339,7 +16343,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 779 i32.const 0 call $~lib/builtins/abort @@ -16352,7 +16356,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 780 i32.const 0 call $~lib/builtins/abort @@ -16365,7 +16369,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 781 i32.const 0 call $~lib/builtins/abort @@ -16378,7 +16382,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 782 i32.const 0 call $~lib/builtins/abort @@ -16391,7 +16395,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 783 i32.const 0 call $~lib/builtins/abort @@ -16404,7 +16408,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 784 i32.const 0 call $~lib/builtins/abort @@ -16417,7 +16421,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 785 i32.const 0 call $~lib/builtins/abort @@ -16430,7 +16434,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 786 i32.const 0 call $~lib/builtins/abort @@ -16443,7 +16447,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 787 i32.const 0 call $~lib/builtins/abort @@ -16456,7 +16460,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 790 i32.const 0 call $~lib/builtins/abort @@ -16469,7 +16473,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 791 i32.const 0 call $~lib/builtins/abort @@ -16482,7 +16486,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 792 i32.const 0 call $~lib/builtins/abort @@ -16495,7 +16499,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 793 i32.const 0 call $~lib/builtins/abort @@ -16508,7 +16512,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 794 i32.const 0 call $~lib/builtins/abort @@ -16521,7 +16525,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 795 i32.const 0 call $~lib/builtins/abort @@ -16534,7 +16538,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 796 i32.const 0 call $~lib/builtins/abort @@ -16547,7 +16551,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 797 i32.const 0 call $~lib/builtins/abort @@ -16560,7 +16564,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 798 i32.const 0 call $~lib/builtins/abort @@ -16573,7 +16577,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 799 i32.const 0 call $~lib/builtins/abort @@ -16586,7 +16590,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 808 i32.const 0 call $~lib/builtins/abort @@ -16599,7 +16603,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 809 i32.const 0 call $~lib/builtins/abort @@ -16612,7 +16616,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 810 i32.const 0 call $~lib/builtins/abort @@ -16625,7 +16629,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 811 i32.const 0 call $~lib/builtins/abort @@ -16638,7 +16642,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 812 i32.const 0 call $~lib/builtins/abort @@ -16651,7 +16655,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 813 i32.const 0 call $~lib/builtins/abort @@ -16664,7 +16668,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 814 i32.const 0 call $~lib/builtins/abort @@ -16677,7 +16681,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 815 i32.const 0 call $~lib/builtins/abort @@ -16690,7 +16694,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 816 i32.const 0 call $~lib/builtins/abort @@ -16703,7 +16707,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 817 i32.const 0 call $~lib/builtins/abort @@ -16716,7 +16720,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 820 i32.const 0 call $~lib/builtins/abort @@ -16729,7 +16733,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 821 i32.const 0 call $~lib/builtins/abort @@ -16742,7 +16746,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 822 i32.const 0 call $~lib/builtins/abort @@ -16755,7 +16759,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 823 i32.const 0 call $~lib/builtins/abort @@ -16768,7 +16772,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 824 i32.const 0 call $~lib/builtins/abort @@ -16781,7 +16785,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 825 i32.const 0 call $~lib/builtins/abort @@ -16794,7 +16798,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 826 i32.const 0 call $~lib/builtins/abort @@ -16807,7 +16811,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 827 i32.const 0 call $~lib/builtins/abort @@ -16820,7 +16824,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 828 i32.const 0 call $~lib/builtins/abort @@ -16833,7 +16837,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 829 i32.const 0 call $~lib/builtins/abort @@ -16845,7 +16849,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 841 i32.const 0 call $~lib/builtins/abort @@ -16857,7 +16861,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 842 i32.const 0 call $~lib/builtins/abort @@ -16869,7 +16873,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 843 i32.const 0 call $~lib/builtins/abort @@ -16881,7 +16885,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 844 i32.const 0 call $~lib/builtins/abort @@ -16893,7 +16897,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 845 i32.const 0 call $~lib/builtins/abort @@ -16905,7 +16909,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 846 i32.const 0 call $~lib/builtins/abort @@ -16917,7 +16921,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 847 i32.const 0 call $~lib/builtins/abort @@ -16929,7 +16933,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 848 i32.const 0 call $~lib/builtins/abort @@ -16941,7 +16945,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 849 i32.const 0 call $~lib/builtins/abort @@ -16953,7 +16957,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 850 i32.const 0 call $~lib/builtins/abort @@ -16965,7 +16969,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 853 i32.const 0 call $~lib/builtins/abort @@ -16977,7 +16981,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 854 i32.const 0 call $~lib/builtins/abort @@ -16989,7 +16993,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 855 i32.const 0 call $~lib/builtins/abort @@ -17001,7 +17005,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 856 i32.const 0 call $~lib/builtins/abort @@ -17013,7 +17017,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 857 i32.const 0 call $~lib/builtins/abort @@ -17025,7 +17029,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 858 i32.const 0 call $~lib/builtins/abort @@ -17037,7 +17041,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 859 i32.const 0 call $~lib/builtins/abort @@ -17049,7 +17053,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 860 i32.const 0 call $~lib/builtins/abort @@ -17061,7 +17065,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 861 i32.const 0 call $~lib/builtins/abort @@ -17073,7 +17077,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 862 i32.const 0 call $~lib/builtins/abort @@ -17085,7 +17089,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 863 i32.const 0 call $~lib/builtins/abort @@ -17097,7 +17101,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 864 i32.const 0 call $~lib/builtins/abort @@ -17109,7 +17113,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 865 i32.const 0 call $~lib/builtins/abort @@ -17121,7 +17125,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 866 i32.const 0 call $~lib/builtins/abort @@ -17133,7 +17137,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 867 i32.const 0 call $~lib/builtins/abort @@ -17145,7 +17149,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 868 i32.const 0 call $~lib/builtins/abort @@ -17157,7 +17161,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 869 i32.const 0 call $~lib/builtins/abort @@ -17169,7 +17173,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 870 i32.const 0 call $~lib/builtins/abort @@ -17181,7 +17185,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 871 i32.const 0 call $~lib/builtins/abort @@ -17193,7 +17197,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 872 i32.const 0 call $~lib/builtins/abort @@ -17205,7 +17209,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 873 i32.const 0 call $~lib/builtins/abort @@ -17217,7 +17221,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 874 i32.const 0 call $~lib/builtins/abort @@ -17229,7 +17233,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 875 i32.const 0 call $~lib/builtins/abort @@ -17241,7 +17245,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 876 i32.const 0 call $~lib/builtins/abort @@ -17253,7 +17257,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 877 i32.const 0 call $~lib/builtins/abort @@ -17265,7 +17269,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 878 i32.const 0 call $~lib/builtins/abort @@ -17277,7 +17281,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 879 i32.const 0 call $~lib/builtins/abort @@ -17289,7 +17293,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 880 i32.const 0 call $~lib/builtins/abort @@ -17301,7 +17305,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 881 i32.const 0 call $~lib/builtins/abort @@ -17313,7 +17317,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 882 i32.const 0 call $~lib/builtins/abort @@ -17325,7 +17329,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 883 i32.const 0 call $~lib/builtins/abort @@ -17337,7 +17341,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 884 i32.const 0 call $~lib/builtins/abort @@ -17349,7 +17353,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 885 i32.const 0 call $~lib/builtins/abort @@ -17361,7 +17365,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 886 i32.const 0 call $~lib/builtins/abort @@ -17373,7 +17377,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 887 i32.const 0 call $~lib/builtins/abort @@ -17385,7 +17389,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 888 i32.const 0 call $~lib/builtins/abort @@ -17397,7 +17401,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 889 i32.const 0 call $~lib/builtins/abort @@ -17409,7 +17413,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 890 i32.const 0 call $~lib/builtins/abort @@ -17421,7 +17425,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 891 i32.const 0 call $~lib/builtins/abort @@ -17433,7 +17437,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 892 i32.const 0 call $~lib/builtins/abort @@ -17445,7 +17449,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 893 i32.const 0 call $~lib/builtins/abort @@ -17457,7 +17461,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 894 i32.const 0 call $~lib/builtins/abort @@ -17469,7 +17473,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 895 i32.const 0 call $~lib/builtins/abort @@ -17481,7 +17485,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 896 i32.const 0 call $~lib/builtins/abort @@ -17493,7 +17497,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 897 i32.const 0 call $~lib/builtins/abort @@ -17505,7 +17509,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 906 i32.const 0 call $~lib/builtins/abort @@ -17517,7 +17521,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 907 i32.const 0 call $~lib/builtins/abort @@ -17529,7 +17533,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 908 i32.const 0 call $~lib/builtins/abort @@ -17541,7 +17545,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 909 i32.const 0 call $~lib/builtins/abort @@ -17553,7 +17557,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 910 i32.const 0 call $~lib/builtins/abort @@ -17565,7 +17569,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 911 i32.const 0 call $~lib/builtins/abort @@ -17577,7 +17581,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 912 i32.const 0 call $~lib/builtins/abort @@ -17589,7 +17593,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 913 i32.const 0 call $~lib/builtins/abort @@ -17601,7 +17605,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 914 i32.const 0 call $~lib/builtins/abort @@ -17613,7 +17617,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 915 i32.const 0 call $~lib/builtins/abort @@ -17625,7 +17629,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 918 i32.const 0 call $~lib/builtins/abort @@ -17637,7 +17641,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 919 i32.const 0 call $~lib/builtins/abort @@ -17649,7 +17653,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 920 i32.const 0 call $~lib/builtins/abort @@ -17661,7 +17665,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 921 i32.const 0 call $~lib/builtins/abort @@ -17673,7 +17677,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 922 i32.const 0 call $~lib/builtins/abort @@ -17685,7 +17689,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 923 i32.const 0 call $~lib/builtins/abort @@ -17697,7 +17701,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 924 i32.const 0 call $~lib/builtins/abort @@ -17709,7 +17713,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 925 i32.const 0 call $~lib/builtins/abort @@ -17721,7 +17725,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 926 i32.const 0 call $~lib/builtins/abort @@ -17733,7 +17737,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 927 i32.const 0 call $~lib/builtins/abort @@ -17745,7 +17749,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 928 i32.const 0 call $~lib/builtins/abort @@ -17757,7 +17761,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 929 i32.const 0 call $~lib/builtins/abort @@ -17769,7 +17773,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 930 i32.const 0 call $~lib/builtins/abort @@ -17781,7 +17785,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 931 i32.const 0 call $~lib/builtins/abort @@ -17793,7 +17797,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 932 i32.const 0 call $~lib/builtins/abort @@ -17805,7 +17809,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 933 i32.const 0 call $~lib/builtins/abort @@ -17817,7 +17821,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 934 i32.const 0 call $~lib/builtins/abort @@ -17829,7 +17833,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 935 i32.const 0 call $~lib/builtins/abort @@ -17841,7 +17845,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 936 i32.const 0 call $~lib/builtins/abort @@ -17853,7 +17857,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 937 i32.const 0 call $~lib/builtins/abort @@ -17865,7 +17869,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 938 i32.const 0 call $~lib/builtins/abort @@ -17877,7 +17881,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 939 i32.const 0 call $~lib/builtins/abort @@ -17889,7 +17893,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 940 i32.const 0 call $~lib/builtins/abort @@ -17901,7 +17905,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 941 i32.const 0 call $~lib/builtins/abort @@ -17913,7 +17917,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 942 i32.const 0 call $~lib/builtins/abort @@ -17925,7 +17929,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 943 i32.const 0 call $~lib/builtins/abort @@ -17937,7 +17941,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 944 i32.const 0 call $~lib/builtins/abort @@ -17949,7 +17953,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 945 i32.const 0 call $~lib/builtins/abort @@ -17961,7 +17965,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 946 i32.const 0 call $~lib/builtins/abort @@ -17973,7 +17977,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 947 i32.const 0 call $~lib/builtins/abort @@ -17985,7 +17989,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 948 i32.const 0 call $~lib/builtins/abort @@ -17997,7 +18001,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 949 i32.const 0 call $~lib/builtins/abort @@ -18009,7 +18013,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 950 i32.const 0 call $~lib/builtins/abort @@ -18021,7 +18025,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 951 i32.const 0 call $~lib/builtins/abort @@ -18033,7 +18037,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 952 i32.const 0 call $~lib/builtins/abort @@ -18045,7 +18049,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 953 i32.const 0 call $~lib/builtins/abort @@ -18057,7 +18061,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 954 i32.const 0 call $~lib/builtins/abort @@ -18069,7 +18073,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 955 i32.const 0 call $~lib/builtins/abort @@ -18081,7 +18085,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 956 i32.const 0 call $~lib/builtins/abort @@ -18093,7 +18097,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 957 i32.const 0 call $~lib/builtins/abort @@ -18105,7 +18109,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 958 i32.const 0 call $~lib/builtins/abort @@ -18117,7 +18121,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 959 i32.const 0 call $~lib/builtins/abort @@ -18129,7 +18133,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 960 i32.const 0 call $~lib/builtins/abort @@ -18141,7 +18145,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 961 i32.const 0 call $~lib/builtins/abort @@ -18153,7 +18157,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 962 i32.const 0 call $~lib/builtins/abort @@ -18166,7 +18170,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1073 i32.const 0 call $~lib/builtins/abort @@ -18179,7 +18183,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1074 i32.const 0 call $~lib/builtins/abort @@ -18192,7 +18196,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1075 i32.const 0 call $~lib/builtins/abort @@ -18205,7 +18209,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1076 i32.const 0 call $~lib/builtins/abort @@ -18218,7 +18222,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1077 i32.const 0 call $~lib/builtins/abort @@ -18231,7 +18235,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1078 i32.const 0 call $~lib/builtins/abort @@ -18244,7 +18248,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1079 i32.const 0 call $~lib/builtins/abort @@ -18257,7 +18261,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1080 i32.const 0 call $~lib/builtins/abort @@ -18270,7 +18274,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1081 i32.const 0 call $~lib/builtins/abort @@ -18283,7 +18287,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1082 i32.const 0 call $~lib/builtins/abort @@ -18296,7 +18300,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1085 i32.const 0 call $~lib/builtins/abort @@ -18309,7 +18313,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1086 i32.const 0 call $~lib/builtins/abort @@ -18322,7 +18326,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1087 i32.const 0 call $~lib/builtins/abort @@ -18335,7 +18339,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1088 i32.const 0 call $~lib/builtins/abort @@ -18348,7 +18352,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1089 i32.const 0 call $~lib/builtins/abort @@ -18361,7 +18365,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1092 i32.const 0 call $~lib/builtins/abort @@ -18374,7 +18378,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1093 i32.const 0 call $~lib/builtins/abort @@ -18387,7 +18391,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1094 i32.const 0 call $~lib/builtins/abort @@ -18400,7 +18404,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1095 i32.const 0 call $~lib/builtins/abort @@ -18413,7 +18417,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1096 i32.const 0 call $~lib/builtins/abort @@ -18426,7 +18430,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1097 i32.const 0 call $~lib/builtins/abort @@ -18439,7 +18443,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1098 i32.const 0 call $~lib/builtins/abort @@ -18452,7 +18456,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1099 i32.const 0 call $~lib/builtins/abort @@ -18465,7 +18469,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1100 i32.const 0 call $~lib/builtins/abort @@ -18478,7 +18482,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1101 i32.const 0 call $~lib/builtins/abort @@ -18491,7 +18495,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1102 i32.const 0 call $~lib/builtins/abort @@ -18504,7 +18508,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1103 i32.const 0 call $~lib/builtins/abort @@ -18517,7 +18521,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1104 i32.const 0 call $~lib/builtins/abort @@ -18530,7 +18534,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1105 i32.const 0 call $~lib/builtins/abort @@ -18543,7 +18547,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1106 i32.const 0 call $~lib/builtins/abort @@ -18556,7 +18560,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1107 i32.const 0 call $~lib/builtins/abort @@ -18569,7 +18573,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1108 i32.const 0 call $~lib/builtins/abort @@ -18582,7 +18586,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1109 i32.const 0 call $~lib/builtins/abort @@ -18595,7 +18599,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1110 i32.const 0 call $~lib/builtins/abort @@ -18608,7 +18612,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1111 i32.const 0 call $~lib/builtins/abort @@ -18621,7 +18625,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1112 i32.const 0 call $~lib/builtins/abort @@ -18634,7 +18638,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1113 i32.const 0 call $~lib/builtins/abort @@ -18647,7 +18651,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1114 i32.const 0 call $~lib/builtins/abort @@ -18660,7 +18664,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1115 i32.const 0 call $~lib/builtins/abort @@ -18673,7 +18677,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1116 i32.const 0 call $~lib/builtins/abort @@ -18686,7 +18690,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1117 i32.const 0 call $~lib/builtins/abort @@ -18699,7 +18703,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1118 i32.const 0 call $~lib/builtins/abort @@ -18712,7 +18716,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1119 i32.const 0 call $~lib/builtins/abort @@ -18725,7 +18729,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1120 i32.const 0 call $~lib/builtins/abort @@ -18738,7 +18742,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1121 i32.const 0 call $~lib/builtins/abort @@ -18751,7 +18755,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1122 i32.const 0 call $~lib/builtins/abort @@ -18764,7 +18768,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1123 i32.const 0 call $~lib/builtins/abort @@ -18777,7 +18781,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1124 i32.const 0 call $~lib/builtins/abort @@ -18790,7 +18794,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1125 i32.const 0 call $~lib/builtins/abort @@ -18803,7 +18807,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1126 i32.const 0 call $~lib/builtins/abort @@ -18816,7 +18820,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1127 i32.const 0 call $~lib/builtins/abort @@ -18829,7 +18833,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1128 i32.const 0 call $~lib/builtins/abort @@ -18842,7 +18846,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1129 i32.const 0 call $~lib/builtins/abort @@ -18855,7 +18859,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1132 i32.const 0 call $~lib/builtins/abort @@ -18868,7 +18872,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1133 i32.const 0 call $~lib/builtins/abort @@ -18881,7 +18885,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1134 i32.const 0 call $~lib/builtins/abort @@ -18894,7 +18898,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1135 i32.const 0 call $~lib/builtins/abort @@ -18907,7 +18911,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1136 i32.const 0 call $~lib/builtins/abort @@ -18920,7 +18924,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1137 i32.const 0 call $~lib/builtins/abort @@ -18933,7 +18937,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1138 i32.const 0 call $~lib/builtins/abort @@ -18946,7 +18950,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1139 i32.const 0 call $~lib/builtins/abort @@ -18959,7 +18963,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1140 i32.const 0 call $~lib/builtins/abort @@ -18972,7 +18976,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1141 i32.const 0 call $~lib/builtins/abort @@ -18985,7 +18989,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1142 i32.const 0 call $~lib/builtins/abort @@ -18998,7 +19002,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1143 i32.const 0 call $~lib/builtins/abort @@ -19011,7 +19015,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1144 i32.const 0 call $~lib/builtins/abort @@ -19024,7 +19028,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1145 i32.const 0 call $~lib/builtins/abort @@ -19037,7 +19041,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1156 i32.const 0 call $~lib/builtins/abort @@ -19050,7 +19054,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1157 i32.const 0 call $~lib/builtins/abort @@ -19063,7 +19067,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1158 i32.const 0 call $~lib/builtins/abort @@ -19076,7 +19080,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1159 i32.const 0 call $~lib/builtins/abort @@ -19089,7 +19093,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1160 i32.const 0 call $~lib/builtins/abort @@ -19102,7 +19106,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1161 i32.const 0 call $~lib/builtins/abort @@ -19115,7 +19119,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1162 i32.const 0 call $~lib/builtins/abort @@ -19128,7 +19132,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1163 i32.const 0 call $~lib/builtins/abort @@ -19141,7 +19145,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1164 i32.const 0 call $~lib/builtins/abort @@ -19154,7 +19158,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1165 i32.const 0 call $~lib/builtins/abort @@ -19167,7 +19171,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1168 i32.const 0 call $~lib/builtins/abort @@ -19180,7 +19184,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1169 i32.const 0 call $~lib/builtins/abort @@ -19193,7 +19197,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1170 i32.const 0 call $~lib/builtins/abort @@ -19206,7 +19210,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1171 i32.const 0 call $~lib/builtins/abort @@ -19219,7 +19223,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1172 i32.const 0 call $~lib/builtins/abort @@ -19232,7 +19236,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1181 i32.const 0 call $~lib/builtins/abort @@ -19245,7 +19249,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1182 i32.const 0 call $~lib/builtins/abort @@ -19258,7 +19262,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1183 i32.const 0 call $~lib/builtins/abort @@ -19271,7 +19275,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1184 i32.const 0 call $~lib/builtins/abort @@ -19284,7 +19288,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1185 i32.const 0 call $~lib/builtins/abort @@ -19297,7 +19301,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1186 i32.const 0 call $~lib/builtins/abort @@ -19310,7 +19314,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1187 i32.const 0 call $~lib/builtins/abort @@ -19323,7 +19327,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1188 i32.const 0 call $~lib/builtins/abort @@ -19336,7 +19340,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1189 i32.const 0 call $~lib/builtins/abort @@ -19349,7 +19353,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1190 i32.const 0 call $~lib/builtins/abort @@ -19362,7 +19366,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1193 i32.const 0 call $~lib/builtins/abort @@ -19375,7 +19379,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1194 i32.const 0 call $~lib/builtins/abort @@ -19388,7 +19392,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1195 i32.const 0 call $~lib/builtins/abort @@ -19401,7 +19405,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1196 i32.const 0 call $~lib/builtins/abort @@ -19414,7 +19418,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1197 i32.const 0 call $~lib/builtins/abort @@ -19427,7 +19431,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1209 i32.const 0 call $~lib/builtins/abort @@ -19440,7 +19444,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1210 i32.const 0 call $~lib/builtins/abort @@ -19453,7 +19457,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1211 i32.const 0 call $~lib/builtins/abort @@ -19466,7 +19470,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1212 i32.const 0 call $~lib/builtins/abort @@ -19479,7 +19483,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1213 i32.const 0 call $~lib/builtins/abort @@ -19492,7 +19496,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1214 i32.const 0 call $~lib/builtins/abort @@ -19505,7 +19509,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1215 i32.const 0 call $~lib/builtins/abort @@ -19518,7 +19522,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1216 i32.const 0 call $~lib/builtins/abort @@ -19531,7 +19535,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1217 i32.const 0 call $~lib/builtins/abort @@ -19544,7 +19548,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1218 i32.const 0 call $~lib/builtins/abort @@ -19557,7 +19561,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1221 i32.const 0 call $~lib/builtins/abort @@ -19570,7 +19574,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1222 i32.const 0 call $~lib/builtins/abort @@ -19583,7 +19587,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1223 i32.const 0 call $~lib/builtins/abort @@ -19596,7 +19600,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1224 i32.const 0 call $~lib/builtins/abort @@ -19609,7 +19613,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1225 i32.const 0 call $~lib/builtins/abort @@ -19622,7 +19626,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1226 i32.const 0 call $~lib/builtins/abort @@ -19635,7 +19639,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1227 i32.const 0 call $~lib/builtins/abort @@ -19648,7 +19652,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1228 i32.const 0 call $~lib/builtins/abort @@ -19661,7 +19665,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1229 i32.const 0 call $~lib/builtins/abort @@ -19674,7 +19678,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1230 i32.const 0 call $~lib/builtins/abort @@ -19687,7 +19691,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1231 i32.const 0 call $~lib/builtins/abort @@ -19700,7 +19704,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1234 i32.const 0 call $~lib/builtins/abort @@ -19713,7 +19717,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1235 i32.const 0 call $~lib/builtins/abort @@ -19726,7 +19730,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1237 i32.const 0 call $~lib/builtins/abort @@ -19739,7 +19743,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1244 i32.const 0 call $~lib/builtins/abort @@ -19752,7 +19756,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1245 i32.const 0 call $~lib/builtins/abort @@ -19765,7 +19769,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1252 i32.const 0 call $~lib/builtins/abort @@ -19778,7 +19782,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1259 i32.const 0 call $~lib/builtins/abort @@ -19791,7 +19795,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1266 i32.const 0 call $~lib/builtins/abort @@ -19804,7 +19808,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1273 i32.const 0 call $~lib/builtins/abort @@ -19817,7 +19821,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1280 i32.const 0 call $~lib/builtins/abort @@ -19830,7 +19834,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1287 i32.const 0 call $~lib/builtins/abort @@ -19843,7 +19847,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1293 i32.const 0 call $~lib/builtins/abort @@ -19856,7 +19860,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1299 i32.const 0 call $~lib/builtins/abort @@ -19869,7 +19873,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1305 i32.const 0 call $~lib/builtins/abort @@ -19882,7 +19886,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1312 i32.const 0 call $~lib/builtins/abort @@ -19895,7 +19899,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1319 i32.const 0 call $~lib/builtins/abort @@ -19908,7 +19912,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1326 i32.const 0 call $~lib/builtins/abort @@ -19921,7 +19925,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1333 i32.const 0 call $~lib/builtins/abort @@ -19934,7 +19938,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1340 i32.const 0 call $~lib/builtins/abort @@ -19947,7 +19951,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1347 i32.const 0 call $~lib/builtins/abort @@ -19960,7 +19964,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1354 i32.const 0 call $~lib/builtins/abort @@ -19973,7 +19977,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1361 i32.const 0 call $~lib/builtins/abort @@ -19986,7 +19990,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1375 i32.const 0 call $~lib/builtins/abort @@ -19999,7 +20003,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1376 i32.const 0 call $~lib/builtins/abort @@ -20012,7 +20016,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1377 i32.const 0 call $~lib/builtins/abort @@ -20025,7 +20029,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1378 i32.const 0 call $~lib/builtins/abort @@ -20038,7 +20042,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1379 i32.const 0 call $~lib/builtins/abort @@ -20051,7 +20055,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1380 i32.const 0 call $~lib/builtins/abort @@ -20064,7 +20068,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1381 i32.const 0 call $~lib/builtins/abort @@ -20077,7 +20081,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1382 i32.const 0 call $~lib/builtins/abort @@ -20090,7 +20094,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1383 i32.const 0 call $~lib/builtins/abort @@ -20103,7 +20107,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1384 i32.const 0 call $~lib/builtins/abort @@ -20116,7 +20120,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1387 i32.const 0 call $~lib/builtins/abort @@ -20129,7 +20133,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1388 i32.const 0 call $~lib/builtins/abort @@ -20142,7 +20146,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1389 i32.const 0 call $~lib/builtins/abort @@ -20155,7 +20159,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1390 i32.const 0 call $~lib/builtins/abort @@ -20168,7 +20172,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1391 i32.const 0 call $~lib/builtins/abort @@ -20181,7 +20185,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1392 i32.const 0 call $~lib/builtins/abort @@ -20194,7 +20198,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1393 i32.const 0 call $~lib/builtins/abort @@ -20207,7 +20211,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1394 i32.const 0 call $~lib/builtins/abort @@ -20220,7 +20224,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1395 i32.const 0 call $~lib/builtins/abort @@ -20233,7 +20237,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1396 i32.const 0 call $~lib/builtins/abort @@ -20246,7 +20250,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1397 i32.const 0 call $~lib/builtins/abort @@ -20259,7 +20263,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1398 i32.const 0 call $~lib/builtins/abort @@ -20272,7 +20276,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1399 i32.const 0 call $~lib/builtins/abort @@ -20285,7 +20289,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1400 i32.const 0 call $~lib/builtins/abort @@ -20298,7 +20302,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1412 i32.const 0 call $~lib/builtins/abort @@ -20311,7 +20315,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1413 i32.const 0 call $~lib/builtins/abort @@ -20324,7 +20328,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1414 i32.const 0 call $~lib/builtins/abort @@ -20337,7 +20341,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1415 i32.const 0 call $~lib/builtins/abort @@ -20350,7 +20354,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1416 i32.const 0 call $~lib/builtins/abort @@ -20363,7 +20367,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1417 i32.const 0 call $~lib/builtins/abort @@ -20376,7 +20380,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1418 i32.const 0 call $~lib/builtins/abort @@ -20389,7 +20393,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1419 i32.const 0 call $~lib/builtins/abort @@ -20402,7 +20406,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1420 i32.const 0 call $~lib/builtins/abort @@ -20415,7 +20419,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1421 i32.const 0 call $~lib/builtins/abort @@ -20428,7 +20432,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1424 i32.const 0 call $~lib/builtins/abort @@ -20441,7 +20445,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1425 i32.const 0 call $~lib/builtins/abort @@ -20454,7 +20458,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1426 i32.const 0 call $~lib/builtins/abort @@ -20467,7 +20471,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1427 i32.const 0 call $~lib/builtins/abort @@ -20480,7 +20484,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1428 i32.const 0 call $~lib/builtins/abort @@ -20493,7 +20497,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1429 i32.const 0 call $~lib/builtins/abort @@ -20506,7 +20510,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1430 i32.const 0 call $~lib/builtins/abort @@ -20519,7 +20523,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1431 i32.const 0 call $~lib/builtins/abort @@ -20532,7 +20536,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1432 i32.const 0 call $~lib/builtins/abort @@ -20545,7 +20549,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1441 i32.const 0 call $~lib/builtins/abort @@ -20558,7 +20562,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1442 i32.const 0 call $~lib/builtins/abort @@ -20571,7 +20575,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1443 i32.const 0 call $~lib/builtins/abort @@ -20584,7 +20588,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1444 i32.const 0 call $~lib/builtins/abort @@ -20597,7 +20601,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1445 i32.const 0 call $~lib/builtins/abort @@ -20610,7 +20614,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1446 i32.const 0 call $~lib/builtins/abort @@ -20623,7 +20627,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1447 i32.const 0 call $~lib/builtins/abort @@ -20636,7 +20640,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1448 i32.const 0 call $~lib/builtins/abort @@ -20649,7 +20653,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1449 i32.const 0 call $~lib/builtins/abort @@ -20662,7 +20666,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1450 i32.const 0 call $~lib/builtins/abort @@ -20675,7 +20679,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1453 i32.const 0 call $~lib/builtins/abort @@ -20688,7 +20692,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1454 i32.const 0 call $~lib/builtins/abort @@ -20701,7 +20705,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1455 i32.const 0 call $~lib/builtins/abort @@ -20714,7 +20718,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1456 i32.const 0 call $~lib/builtins/abort @@ -20727,7 +20731,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1457 i32.const 0 call $~lib/builtins/abort @@ -20740,7 +20744,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1458 i32.const 0 call $~lib/builtins/abort @@ -20753,7 +20757,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1459 i32.const 0 call $~lib/builtins/abort @@ -20765,7 +20769,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1471 i32.const 0 call $~lib/builtins/abort @@ -20777,7 +20781,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1472 i32.const 0 call $~lib/builtins/abort @@ -20789,7 +20793,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1473 i32.const 0 call $~lib/builtins/abort @@ -20801,7 +20805,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1474 i32.const 0 call $~lib/builtins/abort @@ -20813,7 +20817,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1475 i32.const 0 call $~lib/builtins/abort @@ -20825,7 +20829,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1476 i32.const 0 call $~lib/builtins/abort @@ -20837,7 +20841,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1477 i32.const 0 call $~lib/builtins/abort @@ -20849,7 +20853,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1478 i32.const 0 call $~lib/builtins/abort @@ -20861,7 +20865,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1479 i32.const 0 call $~lib/builtins/abort @@ -20873,7 +20877,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1480 i32.const 0 call $~lib/builtins/abort @@ -20885,7 +20889,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1483 i32.const 0 call $~lib/builtins/abort @@ -20897,7 +20901,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1484 i32.const 0 call $~lib/builtins/abort @@ -20909,7 +20913,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1485 i32.const 0 call $~lib/builtins/abort @@ -20921,7 +20925,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1486 i32.const 0 call $~lib/builtins/abort @@ -20933,7 +20937,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1487 i32.const 0 call $~lib/builtins/abort @@ -20945,7 +20949,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1488 i32.const 0 call $~lib/builtins/abort @@ -20957,7 +20961,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1489 i32.const 0 call $~lib/builtins/abort @@ -20969,7 +20973,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1490 i32.const 0 call $~lib/builtins/abort @@ -20981,7 +20985,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1491 i32.const 0 call $~lib/builtins/abort @@ -20993,7 +20997,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1492 i32.const 0 call $~lib/builtins/abort @@ -21005,7 +21009,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1493 i32.const 0 call $~lib/builtins/abort @@ -21017,7 +21021,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1494 i32.const 0 call $~lib/builtins/abort @@ -21029,7 +21033,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1495 i32.const 0 call $~lib/builtins/abort @@ -21041,7 +21045,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1496 i32.const 0 call $~lib/builtins/abort @@ -21053,7 +21057,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1497 i32.const 0 call $~lib/builtins/abort @@ -21065,7 +21069,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1506 i32.const 0 call $~lib/builtins/abort @@ -21077,7 +21081,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1507 i32.const 0 call $~lib/builtins/abort @@ -21089,7 +21093,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1508 i32.const 0 call $~lib/builtins/abort @@ -21101,7 +21105,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1509 i32.const 0 call $~lib/builtins/abort @@ -21113,7 +21117,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1510 i32.const 0 call $~lib/builtins/abort @@ -21125,7 +21129,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1511 i32.const 0 call $~lib/builtins/abort @@ -21137,7 +21141,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1512 i32.const 0 call $~lib/builtins/abort @@ -21149,7 +21153,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1513 i32.const 0 call $~lib/builtins/abort @@ -21161,7 +21165,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1514 i32.const 0 call $~lib/builtins/abort @@ -21173,7 +21177,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1515 i32.const 0 call $~lib/builtins/abort @@ -21185,7 +21189,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1518 i32.const 0 call $~lib/builtins/abort @@ -21197,7 +21201,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1519 i32.const 0 call $~lib/builtins/abort @@ -21209,7 +21213,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1520 i32.const 0 call $~lib/builtins/abort @@ -21221,7 +21225,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1521 i32.const 0 call $~lib/builtins/abort @@ -21233,7 +21237,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1522 i32.const 0 call $~lib/builtins/abort @@ -21245,7 +21249,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1523 i32.const 0 call $~lib/builtins/abort @@ -21257,7 +21261,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1524 i32.const 0 call $~lib/builtins/abort @@ -21269,7 +21273,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1525 i32.const 0 call $~lib/builtins/abort @@ -21281,7 +21285,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1526 i32.const 0 call $~lib/builtins/abort @@ -21293,7 +21297,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1527 i32.const 0 call $~lib/builtins/abort @@ -21305,7 +21309,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1528 i32.const 0 call $~lib/builtins/abort @@ -21317,7 +21321,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1529 i32.const 0 call $~lib/builtins/abort @@ -21329,7 +21333,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1530 i32.const 0 call $~lib/builtins/abort @@ -21341,7 +21345,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1531 i32.const 0 call $~lib/builtins/abort @@ -21353,7 +21357,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1532 i32.const 0 call $~lib/builtins/abort @@ -21367,7 +21371,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1544 i32.const 0 call $~lib/builtins/abort @@ -21381,7 +21385,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1545 i32.const 0 call $~lib/builtins/abort @@ -21395,7 +21399,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1546 i32.const 0 call $~lib/builtins/abort @@ -21409,7 +21413,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1547 i32.const 0 call $~lib/builtins/abort @@ -21423,7 +21427,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1548 i32.const 0 call $~lib/builtins/abort @@ -21437,7 +21441,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1549 i32.const 0 call $~lib/builtins/abort @@ -21451,7 +21455,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1550 i32.const 0 call $~lib/builtins/abort @@ -21465,7 +21469,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1551 i32.const 0 call $~lib/builtins/abort @@ -21479,7 +21483,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1552 i32.const 0 call $~lib/builtins/abort @@ -21493,7 +21497,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1553 i32.const 0 call $~lib/builtins/abort @@ -21507,7 +21511,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1556 i32.const 0 call $~lib/builtins/abort @@ -21521,7 +21525,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1557 i32.const 0 call $~lib/builtins/abort @@ -21535,7 +21539,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1558 i32.const 0 call $~lib/builtins/abort @@ -21549,7 +21553,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1559 i32.const 0 call $~lib/builtins/abort @@ -21563,7 +21567,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1560 i32.const 0 call $~lib/builtins/abort @@ -21577,7 +21581,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1561 i32.const 0 call $~lib/builtins/abort @@ -21591,7 +21595,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1562 i32.const 0 call $~lib/builtins/abort @@ -21605,7 +21609,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1563 i32.const 0 call $~lib/builtins/abort @@ -21619,7 +21623,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1564 i32.const 0 call $~lib/builtins/abort @@ -21633,7 +21637,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1565 i32.const 0 call $~lib/builtins/abort @@ -21647,7 +21651,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1566 i32.const 0 call $~lib/builtins/abort @@ -21661,7 +21665,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1567 i32.const 0 call $~lib/builtins/abort @@ -21675,7 +21679,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1568 i32.const 0 call $~lib/builtins/abort @@ -21689,7 +21693,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1569 i32.const 0 call $~lib/builtins/abort @@ -21703,7 +21707,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1570 i32.const 0 call $~lib/builtins/abort @@ -21717,7 +21721,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1571 i32.const 0 call $~lib/builtins/abort @@ -21731,7 +21735,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1572 i32.const 0 call $~lib/builtins/abort @@ -21745,7 +21749,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1573 i32.const 0 call $~lib/builtins/abort @@ -21759,7 +21763,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1574 i32.const 0 call $~lib/builtins/abort @@ -21773,7 +21777,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1583 i32.const 0 call $~lib/builtins/abort @@ -21787,7 +21791,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1584 i32.const 0 call $~lib/builtins/abort @@ -21801,7 +21805,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1585 i32.const 0 call $~lib/builtins/abort @@ -21815,7 +21819,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1586 i32.const 0 call $~lib/builtins/abort @@ -21829,7 +21833,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1587 i32.const 0 call $~lib/builtins/abort @@ -21843,7 +21847,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1588 i32.const 0 call $~lib/builtins/abort @@ -21857,7 +21861,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1589 i32.const 0 call $~lib/builtins/abort @@ -21871,7 +21875,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1590 i32.const 0 call $~lib/builtins/abort @@ -21885,7 +21889,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1591 i32.const 0 call $~lib/builtins/abort @@ -21899,7 +21903,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1592 i32.const 0 call $~lib/builtins/abort @@ -21913,7 +21917,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1595 i32.const 0 call $~lib/builtins/abort @@ -21927,7 +21931,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1596 i32.const 0 call $~lib/builtins/abort @@ -21941,7 +21945,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1597 i32.const 0 call $~lib/builtins/abort @@ -21955,7 +21959,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1598 i32.const 0 call $~lib/builtins/abort @@ -21969,7 +21973,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1599 i32.const 0 call $~lib/builtins/abort @@ -21983,7 +21987,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1600 i32.const 0 call $~lib/builtins/abort @@ -21997,7 +22001,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1601 i32.const 0 call $~lib/builtins/abort @@ -22011,7 +22015,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1602 i32.const 0 call $~lib/builtins/abort @@ -22025,7 +22029,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1603 i32.const 0 call $~lib/builtins/abort @@ -22039,7 +22043,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1604 i32.const 0 call $~lib/builtins/abort @@ -22053,7 +22057,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1605 i32.const 0 call $~lib/builtins/abort @@ -22067,7 +22071,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1606 i32.const 0 call $~lib/builtins/abort @@ -22081,7 +22085,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1607 i32.const 0 call $~lib/builtins/abort @@ -22095,7 +22099,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1608 i32.const 0 call $~lib/builtins/abort @@ -22109,7 +22113,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1609 i32.const 0 call $~lib/builtins/abort @@ -22123,7 +22127,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1610 i32.const 0 call $~lib/builtins/abort @@ -22137,7 +22141,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1611 i32.const 0 call $~lib/builtins/abort @@ -22151,7 +22155,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1612 i32.const 0 call $~lib/builtins/abort @@ -22165,7 +22169,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1613 i32.const 0 call $~lib/builtins/abort @@ -22178,7 +22182,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1625 i32.const 0 call $~lib/builtins/abort @@ -22191,7 +22195,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1626 i32.const 0 call $~lib/builtins/abort @@ -22204,7 +22208,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1627 i32.const 0 call $~lib/builtins/abort @@ -22217,7 +22221,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1628 i32.const 0 call $~lib/builtins/abort @@ -22230,7 +22234,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1629 i32.const 0 call $~lib/builtins/abort @@ -22243,7 +22247,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1630 i32.const 0 call $~lib/builtins/abort @@ -22256,7 +22260,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1631 i32.const 0 call $~lib/builtins/abort @@ -22269,7 +22273,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1632 i32.const 0 call $~lib/builtins/abort @@ -22282,7 +22286,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1633 i32.const 0 call $~lib/builtins/abort @@ -22295,7 +22299,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1634 i32.const 0 call $~lib/builtins/abort @@ -22308,7 +22312,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1637 i32.const 0 call $~lib/builtins/abort @@ -22321,7 +22325,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1638 i32.const 0 call $~lib/builtins/abort @@ -22334,7 +22338,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1639 i32.const 0 call $~lib/builtins/abort @@ -22347,7 +22351,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1640 i32.const 0 call $~lib/builtins/abort @@ -22360,7 +22364,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1641 i32.const 0 call $~lib/builtins/abort @@ -22373,7 +22377,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1642 i32.const 0 call $~lib/builtins/abort @@ -22386,7 +22390,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1643 i32.const 0 call $~lib/builtins/abort @@ -22399,7 +22403,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1644 i32.const 0 call $~lib/builtins/abort @@ -22411,7 +22415,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1653 i32.const 0 call $~lib/builtins/abort @@ -22423,7 +22427,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1654 i32.const 0 call $~lib/builtins/abort @@ -22435,7 +22439,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1655 i32.const 0 call $~lib/builtins/abort @@ -22447,7 +22451,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1656 i32.const 0 call $~lib/builtins/abort @@ -22459,7 +22463,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1657 i32.const 0 call $~lib/builtins/abort @@ -22471,7 +22475,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1658 i32.const 0 call $~lib/builtins/abort @@ -22483,7 +22487,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1659 i32.const 0 call $~lib/builtins/abort @@ -22495,7 +22499,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1660 i32.const 0 call $~lib/builtins/abort @@ -22507,7 +22511,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1663 i32.const 0 call $~lib/builtins/abort @@ -22519,7 +22523,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1664 i32.const 0 call $~lib/builtins/abort @@ -22531,7 +22535,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1665 i32.const 0 call $~lib/builtins/abort @@ -22543,7 +22547,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1666 i32.const 0 call $~lib/builtins/abort @@ -22555,7 +22559,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1667 i32.const 0 call $~lib/builtins/abort @@ -22567,7 +22571,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1668 i32.const 0 call $~lib/builtins/abort @@ -22579,7 +22583,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1669 i32.const 0 call $~lib/builtins/abort @@ -22591,7 +22595,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1670 i32.const 0 call $~lib/builtins/abort @@ -22604,7 +22608,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1682 i32.const 0 call $~lib/builtins/abort @@ -22617,7 +22621,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1683 i32.const 0 call $~lib/builtins/abort @@ -22630,7 +22634,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1684 i32.const 0 call $~lib/builtins/abort @@ -22643,7 +22647,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1685 i32.const 0 call $~lib/builtins/abort @@ -22656,7 +22660,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1686 i32.const 0 call $~lib/builtins/abort @@ -22669,7 +22673,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1687 i32.const 0 call $~lib/builtins/abort @@ -22682,7 +22686,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1688 i32.const 0 call $~lib/builtins/abort @@ -22695,7 +22699,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1689 i32.const 0 call $~lib/builtins/abort @@ -22708,7 +22712,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1690 i32.const 0 call $~lib/builtins/abort @@ -22721,7 +22725,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1691 i32.const 0 call $~lib/builtins/abort @@ -22734,7 +22738,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1694 i32.const 0 call $~lib/builtins/abort @@ -22747,7 +22751,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1695 i32.const 0 call $~lib/builtins/abort @@ -22760,7 +22764,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1696 i32.const 0 call $~lib/builtins/abort @@ -22773,7 +22777,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1697 i32.const 0 call $~lib/builtins/abort @@ -22786,7 +22790,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1698 i32.const 0 call $~lib/builtins/abort @@ -22799,7 +22803,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1699 i32.const 0 call $~lib/builtins/abort @@ -22812,7 +22816,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1700 i32.const 0 call $~lib/builtins/abort @@ -22825,7 +22829,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1701 i32.const 0 call $~lib/builtins/abort @@ -22838,7 +22842,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1710 i32.const 0 call $~lib/builtins/abort @@ -22851,7 +22855,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1711 i32.const 0 call $~lib/builtins/abort @@ -22864,7 +22868,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1712 i32.const 0 call $~lib/builtins/abort @@ -22877,7 +22881,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1713 i32.const 0 call $~lib/builtins/abort @@ -22890,7 +22894,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1714 i32.const 0 call $~lib/builtins/abort @@ -22903,7 +22907,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1715 i32.const 0 call $~lib/builtins/abort @@ -22916,7 +22920,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1716 i32.const 0 call $~lib/builtins/abort @@ -22929,7 +22933,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1717 i32.const 0 call $~lib/builtins/abort @@ -22942,7 +22946,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1718 i32.const 0 call $~lib/builtins/abort @@ -22955,7 +22959,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1719 i32.const 0 call $~lib/builtins/abort @@ -22968,7 +22972,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1722 i32.const 0 call $~lib/builtins/abort @@ -22981,7 +22985,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1723 i32.const 0 call $~lib/builtins/abort @@ -22994,7 +22998,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1724 i32.const 0 call $~lib/builtins/abort @@ -23007,7 +23011,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1725 i32.const 0 call $~lib/builtins/abort @@ -23020,7 +23024,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1726 i32.const 0 call $~lib/builtins/abort @@ -23033,7 +23037,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1727 i32.const 0 call $~lib/builtins/abort @@ -23046,7 +23050,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1728 i32.const 0 call $~lib/builtins/abort @@ -23059,7 +23063,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1729 i32.const 0 call $~lib/builtins/abort @@ -23072,7 +23076,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1741 i32.const 0 call $~lib/builtins/abort @@ -23085,7 +23089,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1742 i32.const 0 call $~lib/builtins/abort @@ -23098,7 +23102,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1743 i32.const 0 call $~lib/builtins/abort @@ -23111,7 +23115,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1744 i32.const 0 call $~lib/builtins/abort @@ -23124,7 +23128,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1745 i32.const 0 call $~lib/builtins/abort @@ -23137,7 +23141,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1746 i32.const 0 call $~lib/builtins/abort @@ -23150,7 +23154,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1747 i32.const 0 call $~lib/builtins/abort @@ -23163,7 +23167,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1748 i32.const 0 call $~lib/builtins/abort @@ -23176,7 +23180,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1749 i32.const 0 call $~lib/builtins/abort @@ -23189,7 +23193,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1750 i32.const 0 call $~lib/builtins/abort @@ -23202,7 +23206,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1753 i32.const 0 call $~lib/builtins/abort @@ -23215,7 +23219,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1754 i32.const 0 call $~lib/builtins/abort @@ -23228,7 +23232,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1755 i32.const 0 call $~lib/builtins/abort @@ -23241,7 +23245,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1756 i32.const 0 call $~lib/builtins/abort @@ -23254,7 +23258,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1757 i32.const 0 call $~lib/builtins/abort @@ -23267,7 +23271,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1758 i32.const 0 call $~lib/builtins/abort @@ -23280,7 +23284,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1759 i32.const 0 call $~lib/builtins/abort @@ -23293,7 +23297,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1760 i32.const 0 call $~lib/builtins/abort @@ -23306,7 +23310,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1769 i32.const 0 call $~lib/builtins/abort @@ -23319,7 +23323,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1770 i32.const 0 call $~lib/builtins/abort @@ -23332,7 +23336,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1771 i32.const 0 call $~lib/builtins/abort @@ -23345,7 +23349,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1772 i32.const 0 call $~lib/builtins/abort @@ -23358,7 +23362,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1773 i32.const 0 call $~lib/builtins/abort @@ -23371,7 +23375,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1774 i32.const 0 call $~lib/builtins/abort @@ -23384,7 +23388,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1775 i32.const 0 call $~lib/builtins/abort @@ -23397,7 +23401,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1776 i32.const 0 call $~lib/builtins/abort @@ -23410,7 +23414,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1777 i32.const 0 call $~lib/builtins/abort @@ -23423,7 +23427,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1778 i32.const 0 call $~lib/builtins/abort @@ -23436,7 +23440,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1781 i32.const 0 call $~lib/builtins/abort @@ -23449,7 +23453,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1782 i32.const 0 call $~lib/builtins/abort @@ -23462,7 +23466,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1783 i32.const 0 call $~lib/builtins/abort @@ -23475,7 +23479,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1784 i32.const 0 call $~lib/builtins/abort @@ -23488,7 +23492,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1785 i32.const 0 call $~lib/builtins/abort @@ -23501,7 +23505,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1786 i32.const 0 call $~lib/builtins/abort @@ -23514,7 +23518,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1787 i32.const 0 call $~lib/builtins/abort @@ -23527,7 +23531,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1788 i32.const 0 call $~lib/builtins/abort @@ -23540,7 +23544,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1789 i32.const 0 call $~lib/builtins/abort @@ -23553,7 +23557,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1801 i32.const 0 call $~lib/builtins/abort @@ -23566,7 +23570,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1802 i32.const 0 call $~lib/builtins/abort @@ -23579,7 +23583,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1803 i32.const 0 call $~lib/builtins/abort @@ -23592,7 +23596,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1804 i32.const 0 call $~lib/builtins/abort @@ -23605,7 +23609,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1805 i32.const 0 call $~lib/builtins/abort @@ -23618,7 +23622,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1806 i32.const 0 call $~lib/builtins/abort @@ -23631,7 +23635,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1807 i32.const 0 call $~lib/builtins/abort @@ -23644,7 +23648,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1808 i32.const 0 call $~lib/builtins/abort @@ -23657,7 +23661,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1809 i32.const 0 call $~lib/builtins/abort @@ -23670,7 +23674,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1810 i32.const 0 call $~lib/builtins/abort @@ -23683,7 +23687,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1813 i32.const 0 call $~lib/builtins/abort @@ -23696,7 +23700,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1814 i32.const 0 call $~lib/builtins/abort @@ -23709,7 +23713,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1815 i32.const 0 call $~lib/builtins/abort @@ -23722,7 +23726,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1816 i32.const 0 call $~lib/builtins/abort @@ -23735,7 +23739,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1817 i32.const 0 call $~lib/builtins/abort @@ -23748,7 +23752,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1818 i32.const 0 call $~lib/builtins/abort @@ -23761,7 +23765,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1819 i32.const 0 call $~lib/builtins/abort @@ -23774,7 +23778,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1820 i32.const 0 call $~lib/builtins/abort @@ -23787,7 +23791,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1829 i32.const 0 call $~lib/builtins/abort @@ -23800,7 +23804,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1830 i32.const 0 call $~lib/builtins/abort @@ -23813,7 +23817,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1831 i32.const 0 call $~lib/builtins/abort @@ -23826,7 +23830,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1832 i32.const 0 call $~lib/builtins/abort @@ -23839,7 +23843,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1833 i32.const 0 call $~lib/builtins/abort @@ -23852,7 +23856,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1834 i32.const 0 call $~lib/builtins/abort @@ -23865,7 +23869,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1835 i32.const 0 call $~lib/builtins/abort @@ -23878,7 +23882,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1836 i32.const 0 call $~lib/builtins/abort @@ -23891,7 +23895,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1837 i32.const 0 call $~lib/builtins/abort @@ -23904,7 +23908,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1838 i32.const 0 call $~lib/builtins/abort @@ -23917,7 +23921,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1841 i32.const 0 call $~lib/builtins/abort @@ -23930,7 +23934,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1842 i32.const 0 call $~lib/builtins/abort @@ -23943,7 +23947,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1843 i32.const 0 call $~lib/builtins/abort @@ -23956,7 +23960,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1844 i32.const 0 call $~lib/builtins/abort @@ -23969,7 +23973,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1845 i32.const 0 call $~lib/builtins/abort @@ -23982,7 +23986,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1846 i32.const 0 call $~lib/builtins/abort @@ -23995,7 +23999,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1847 i32.const 0 call $~lib/builtins/abort @@ -24008,7 +24012,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1848 i32.const 0 call $~lib/builtins/abort @@ -24021,7 +24025,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1860 i32.const 0 call $~lib/builtins/abort @@ -24034,7 +24038,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1861 i32.const 0 call $~lib/builtins/abort @@ -24047,7 +24051,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1862 i32.const 0 call $~lib/builtins/abort @@ -24060,7 +24064,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1863 i32.const 0 call $~lib/builtins/abort @@ -24073,7 +24077,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1864 i32.const 0 call $~lib/builtins/abort @@ -24086,7 +24090,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1865 i32.const 0 call $~lib/builtins/abort @@ -24099,7 +24103,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1866 i32.const 0 call $~lib/builtins/abort @@ -24112,7 +24116,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1867 i32.const 0 call $~lib/builtins/abort @@ -24125,7 +24129,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1868 i32.const 0 call $~lib/builtins/abort @@ -24138,7 +24142,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1869 i32.const 0 call $~lib/builtins/abort @@ -24151,7 +24155,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1872 i32.const 0 call $~lib/builtins/abort @@ -24164,7 +24168,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1873 i32.const 0 call $~lib/builtins/abort @@ -24177,7 +24181,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1874 i32.const 0 call $~lib/builtins/abort @@ -24190,7 +24194,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1875 i32.const 0 call $~lib/builtins/abort @@ -24203,7 +24207,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1876 i32.const 0 call $~lib/builtins/abort @@ -24216,7 +24220,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1877 i32.const 0 call $~lib/builtins/abort @@ -24229,7 +24233,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1878 i32.const 0 call $~lib/builtins/abort @@ -24242,7 +24246,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1879 i32.const 0 call $~lib/builtins/abort @@ -24255,7 +24259,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1880 i32.const 0 call $~lib/builtins/abort @@ -24268,7 +24272,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1881 i32.const 0 call $~lib/builtins/abort @@ -24281,7 +24285,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1882 i32.const 0 call $~lib/builtins/abort @@ -24294,7 +24298,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1883 i32.const 0 call $~lib/builtins/abort @@ -24307,7 +24311,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1884 i32.const 0 call $~lib/builtins/abort @@ -24320,7 +24324,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1885 i32.const 0 call $~lib/builtins/abort @@ -24333,7 +24337,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1886 i32.const 0 call $~lib/builtins/abort @@ -24346,7 +24350,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1887 i32.const 0 call $~lib/builtins/abort @@ -24359,7 +24363,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1888 i32.const 0 call $~lib/builtins/abort @@ -24372,7 +24376,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1889 i32.const 0 call $~lib/builtins/abort @@ -24385,7 +24389,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1890 i32.const 0 call $~lib/builtins/abort @@ -24398,7 +24402,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1891 i32.const 0 call $~lib/builtins/abort @@ -24411,7 +24415,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1892 i32.const 0 call $~lib/builtins/abort @@ -24424,7 +24428,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1893 i32.const 0 call $~lib/builtins/abort @@ -24437,7 +24441,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1894 i32.const 0 call $~lib/builtins/abort @@ -24450,7 +24454,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1895 i32.const 0 call $~lib/builtins/abort @@ -24463,7 +24467,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1896 i32.const 0 call $~lib/builtins/abort @@ -24476,7 +24480,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1897 i32.const 0 call $~lib/builtins/abort @@ -24489,7 +24493,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1898 i32.const 0 call $~lib/builtins/abort @@ -24502,7 +24506,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1899 i32.const 0 call $~lib/builtins/abort @@ -24515,7 +24519,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1900 i32.const 0 call $~lib/builtins/abort @@ -24528,7 +24532,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1901 i32.const 0 call $~lib/builtins/abort @@ -24541,7 +24545,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1902 i32.const 0 call $~lib/builtins/abort @@ -24554,7 +24558,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1903 i32.const 0 call $~lib/builtins/abort @@ -24567,7 +24571,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1904 i32.const 0 call $~lib/builtins/abort @@ -24580,7 +24584,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1905 i32.const 0 call $~lib/builtins/abort @@ -24593,7 +24597,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1906 i32.const 0 call $~lib/builtins/abort @@ -24606,7 +24610,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1907 i32.const 0 call $~lib/builtins/abort @@ -24619,7 +24623,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1908 i32.const 0 call $~lib/builtins/abort @@ -24632,7 +24636,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1909 i32.const 0 call $~lib/builtins/abort @@ -24645,7 +24649,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1910 i32.const 0 call $~lib/builtins/abort @@ -24658,7 +24662,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1911 i32.const 0 call $~lib/builtins/abort @@ -24671,7 +24675,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1912 i32.const 0 call $~lib/builtins/abort @@ -24684,7 +24688,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1913 i32.const 0 call $~lib/builtins/abort @@ -24697,7 +24701,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1914 i32.const 0 call $~lib/builtins/abort @@ -24710,7 +24714,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1915 i32.const 0 call $~lib/builtins/abort @@ -24723,7 +24727,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1916 i32.const 0 call $~lib/builtins/abort @@ -24736,7 +24740,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1917 i32.const 0 call $~lib/builtins/abort @@ -24749,7 +24753,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1918 i32.const 0 call $~lib/builtins/abort @@ -24762,7 +24766,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1919 i32.const 0 call $~lib/builtins/abort @@ -24775,7 +24779,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1920 i32.const 0 call $~lib/builtins/abort @@ -24788,7 +24792,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1921 i32.const 0 call $~lib/builtins/abort @@ -24801,7 +24805,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1922 i32.const 0 call $~lib/builtins/abort @@ -24814,7 +24818,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1923 i32.const 0 call $~lib/builtins/abort @@ -24827,7 +24831,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1924 i32.const 0 call $~lib/builtins/abort @@ -24840,7 +24844,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1925 i32.const 0 call $~lib/builtins/abort @@ -24853,7 +24857,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1926 i32.const 0 call $~lib/builtins/abort @@ -24866,7 +24870,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1927 i32.const 0 call $~lib/builtins/abort @@ -24879,7 +24883,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1928 i32.const 0 call $~lib/builtins/abort @@ -24892,7 +24896,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1929 i32.const 0 call $~lib/builtins/abort @@ -24905,7 +24909,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1938 i32.const 0 call $~lib/builtins/abort @@ -24918,7 +24922,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1939 i32.const 0 call $~lib/builtins/abort @@ -24931,7 +24935,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1940 i32.const 0 call $~lib/builtins/abort @@ -24944,7 +24948,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1941 i32.const 0 call $~lib/builtins/abort @@ -24957,7 +24961,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1942 i32.const 0 call $~lib/builtins/abort @@ -24970,7 +24974,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1943 i32.const 0 call $~lib/builtins/abort @@ -24983,7 +24987,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1944 i32.const 0 call $~lib/builtins/abort @@ -24996,7 +25000,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1945 i32.const 0 call $~lib/builtins/abort @@ -25009,7 +25013,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1946 i32.const 0 call $~lib/builtins/abort @@ -25022,7 +25026,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1947 i32.const 0 call $~lib/builtins/abort @@ -25035,7 +25039,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1950 i32.const 0 call $~lib/builtins/abort @@ -25048,7 +25052,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1951 i32.const 0 call $~lib/builtins/abort @@ -25061,7 +25065,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1952 i32.const 0 call $~lib/builtins/abort @@ -25074,7 +25078,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1953 i32.const 0 call $~lib/builtins/abort @@ -25087,7 +25091,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1954 i32.const 0 call $~lib/builtins/abort @@ -25100,7 +25104,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1955 i32.const 0 call $~lib/builtins/abort @@ -25113,7 +25117,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1956 i32.const 0 call $~lib/builtins/abort @@ -25126,7 +25130,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1957 i32.const 0 call $~lib/builtins/abort @@ -25139,7 +25143,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1958 i32.const 0 call $~lib/builtins/abort @@ -25152,7 +25156,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1959 i32.const 0 call $~lib/builtins/abort @@ -25165,7 +25169,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1960 i32.const 0 call $~lib/builtins/abort @@ -25178,7 +25182,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1961 i32.const 0 call $~lib/builtins/abort @@ -25191,7 +25195,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1962 i32.const 0 call $~lib/builtins/abort @@ -25204,7 +25208,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1963 i32.const 0 call $~lib/builtins/abort @@ -25217,7 +25221,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1964 i32.const 0 call $~lib/builtins/abort @@ -25230,7 +25234,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1965 i32.const 0 call $~lib/builtins/abort @@ -25243,7 +25247,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1966 i32.const 0 call $~lib/builtins/abort @@ -25256,7 +25260,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1967 i32.const 0 call $~lib/builtins/abort @@ -25269,7 +25273,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1968 i32.const 0 call $~lib/builtins/abort @@ -25282,7 +25286,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1969 i32.const 0 call $~lib/builtins/abort @@ -25295,7 +25299,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1970 i32.const 0 call $~lib/builtins/abort @@ -25308,7 +25312,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1971 i32.const 0 call $~lib/builtins/abort @@ -25321,7 +25325,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1972 i32.const 0 call $~lib/builtins/abort @@ -25334,7 +25338,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1973 i32.const 0 call $~lib/builtins/abort @@ -25347,7 +25351,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1974 i32.const 0 call $~lib/builtins/abort @@ -25360,7 +25364,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1975 i32.const 0 call $~lib/builtins/abort @@ -25373,7 +25377,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1976 i32.const 0 call $~lib/builtins/abort @@ -25386,7 +25390,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1977 i32.const 0 call $~lib/builtins/abort @@ -25399,7 +25403,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1978 i32.const 0 call $~lib/builtins/abort @@ -25412,7 +25416,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1979 i32.const 0 call $~lib/builtins/abort @@ -25425,7 +25429,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1980 i32.const 0 call $~lib/builtins/abort @@ -25438,7 +25442,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1981 i32.const 0 call $~lib/builtins/abort @@ -25451,7 +25455,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1982 i32.const 0 call $~lib/builtins/abort @@ -25464,7 +25468,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1983 i32.const 0 call $~lib/builtins/abort @@ -25477,7 +25481,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1984 i32.const 0 call $~lib/builtins/abort @@ -25490,7 +25494,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1985 i32.const 0 call $~lib/builtins/abort @@ -25503,7 +25507,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1986 i32.const 0 call $~lib/builtins/abort @@ -25516,7 +25520,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1987 i32.const 0 call $~lib/builtins/abort @@ -25529,7 +25533,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1988 i32.const 0 call $~lib/builtins/abort @@ -25542,7 +25546,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1989 i32.const 0 call $~lib/builtins/abort @@ -25555,7 +25559,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1990 i32.const 0 call $~lib/builtins/abort @@ -25568,7 +25572,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1991 i32.const 0 call $~lib/builtins/abort @@ -25581,7 +25585,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1992 i32.const 0 call $~lib/builtins/abort @@ -25594,7 +25598,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1993 i32.const 0 call $~lib/builtins/abort @@ -25607,7 +25611,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1994 i32.const 0 call $~lib/builtins/abort @@ -25620,7 +25624,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1995 i32.const 0 call $~lib/builtins/abort @@ -25633,7 +25637,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1996 i32.const 0 call $~lib/builtins/abort @@ -25646,7 +25650,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1997 i32.const 0 call $~lib/builtins/abort @@ -25659,7 +25663,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1998 i32.const 0 call $~lib/builtins/abort @@ -25672,7 +25676,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1999 i32.const 0 call $~lib/builtins/abort @@ -25685,7 +25689,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2000 i32.const 0 call $~lib/builtins/abort @@ -25698,7 +25702,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2001 i32.const 0 call $~lib/builtins/abort @@ -25711,7 +25715,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2002 i32.const 0 call $~lib/builtins/abort @@ -25724,7 +25728,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2003 i32.const 0 call $~lib/builtins/abort @@ -25737,7 +25741,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2004 i32.const 0 call $~lib/builtins/abort @@ -25750,7 +25754,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2005 i32.const 0 call $~lib/builtins/abort @@ -25763,7 +25767,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2006 i32.const 0 call $~lib/builtins/abort @@ -25776,7 +25780,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2007 i32.const 0 call $~lib/builtins/abort @@ -25789,7 +25793,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2019 i32.const 0 call $~lib/builtins/abort @@ -25802,7 +25806,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2020 i32.const 0 call $~lib/builtins/abort @@ -25815,7 +25819,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2021 i32.const 0 call $~lib/builtins/abort @@ -25828,7 +25832,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2022 i32.const 0 call $~lib/builtins/abort @@ -25841,7 +25845,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2023 i32.const 0 call $~lib/builtins/abort @@ -25854,7 +25858,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2024 i32.const 0 call $~lib/builtins/abort @@ -25867,7 +25871,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2025 i32.const 0 call $~lib/builtins/abort @@ -25880,7 +25884,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2026 i32.const 0 call $~lib/builtins/abort @@ -25893,7 +25897,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2027 i32.const 0 call $~lib/builtins/abort @@ -25906,7 +25910,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2028 i32.const 0 call $~lib/builtins/abort @@ -25919,7 +25923,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2031 i32.const 0 call $~lib/builtins/abort @@ -25932,7 +25936,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2032 i32.const 0 call $~lib/builtins/abort @@ -25945,7 +25949,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2033 i32.const 0 call $~lib/builtins/abort @@ -25958,7 +25962,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2034 i32.const 0 call $~lib/builtins/abort @@ -25971,7 +25975,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2035 i32.const 0 call $~lib/builtins/abort @@ -25984,7 +25988,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2036 i32.const 0 call $~lib/builtins/abort @@ -25997,7 +26001,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2037 i32.const 0 call $~lib/builtins/abort @@ -26010,7 +26014,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2038 i32.const 0 call $~lib/builtins/abort @@ -26023,7 +26027,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2039 i32.const 0 call $~lib/builtins/abort @@ -26036,7 +26040,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2040 i32.const 0 call $~lib/builtins/abort @@ -26049,7 +26053,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2041 i32.const 0 call $~lib/builtins/abort @@ -26062,7 +26066,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2042 i32.const 0 call $~lib/builtins/abort @@ -26075,7 +26079,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2043 i32.const 0 call $~lib/builtins/abort @@ -26088,7 +26092,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2044 i32.const 0 call $~lib/builtins/abort @@ -26101,7 +26105,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2045 i32.const 0 call $~lib/builtins/abort @@ -26114,7 +26118,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2046 i32.const 0 call $~lib/builtins/abort @@ -26127,7 +26131,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2047 i32.const 0 call $~lib/builtins/abort @@ -26140,7 +26144,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2048 i32.const 0 call $~lib/builtins/abort @@ -26153,7 +26157,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2049 i32.const 0 call $~lib/builtins/abort @@ -26166,7 +26170,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2050 i32.const 0 call $~lib/builtins/abort @@ -26179,7 +26183,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2051 i32.const 0 call $~lib/builtins/abort @@ -26192,7 +26196,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2052 i32.const 0 call $~lib/builtins/abort @@ -26205,7 +26209,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2053 i32.const 0 call $~lib/builtins/abort @@ -26218,7 +26222,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2054 i32.const 0 call $~lib/builtins/abort @@ -26231,7 +26235,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2055 i32.const 0 call $~lib/builtins/abort @@ -26244,7 +26248,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2056 i32.const 0 call $~lib/builtins/abort @@ -26257,7 +26261,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2057 i32.const 0 call $~lib/builtins/abort @@ -26270,7 +26274,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2058 i32.const 0 call $~lib/builtins/abort @@ -26283,7 +26287,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2059 i32.const 0 call $~lib/builtins/abort @@ -26296,7 +26300,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2060 i32.const 0 call $~lib/builtins/abort @@ -26309,7 +26313,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2061 i32.const 0 call $~lib/builtins/abort @@ -26322,7 +26326,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2062 i32.const 0 call $~lib/builtins/abort @@ -26335,7 +26339,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2063 i32.const 0 call $~lib/builtins/abort @@ -26348,7 +26352,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2064 i32.const 0 call $~lib/builtins/abort @@ -26361,7 +26365,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2065 i32.const 0 call $~lib/builtins/abort @@ -26374,7 +26378,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2066 i32.const 0 call $~lib/builtins/abort @@ -26387,7 +26391,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2067 i32.const 0 call $~lib/builtins/abort @@ -26400,7 +26404,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2068 i32.const 0 call $~lib/builtins/abort @@ -26413,7 +26417,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2069 i32.const 0 call $~lib/builtins/abort @@ -26426,7 +26430,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2070 i32.const 0 call $~lib/builtins/abort @@ -26439,7 +26443,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2071 i32.const 0 call $~lib/builtins/abort @@ -26452,7 +26456,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2072 i32.const 0 call $~lib/builtins/abort @@ -26465,7 +26469,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2073 i32.const 0 call $~lib/builtins/abort @@ -26478,7 +26482,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2074 i32.const 0 call $~lib/builtins/abort @@ -26491,7 +26495,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2075 i32.const 0 call $~lib/builtins/abort @@ -26504,7 +26508,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2076 i32.const 0 call $~lib/builtins/abort @@ -26517,7 +26521,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2077 i32.const 0 call $~lib/builtins/abort @@ -26530,7 +26534,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2078 i32.const 0 call $~lib/builtins/abort @@ -26543,7 +26547,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2079 i32.const 0 call $~lib/builtins/abort @@ -26556,7 +26560,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2080 i32.const 0 call $~lib/builtins/abort @@ -26569,7 +26573,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2081 i32.const 0 call $~lib/builtins/abort @@ -26582,7 +26586,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2082 i32.const 0 call $~lib/builtins/abort @@ -26595,7 +26599,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2083 i32.const 0 call $~lib/builtins/abort @@ -26608,7 +26612,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2084 i32.const 0 call $~lib/builtins/abort @@ -26621,7 +26625,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2085 i32.const 0 call $~lib/builtins/abort @@ -26634,7 +26638,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2086 i32.const 0 call $~lib/builtins/abort @@ -26647,7 +26651,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2087 i32.const 0 call $~lib/builtins/abort @@ -26660,7 +26664,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2088 i32.const 0 call $~lib/builtins/abort @@ -26673,7 +26677,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2097 i32.const 0 call $~lib/builtins/abort @@ -26686,7 +26690,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2098 i32.const 0 call $~lib/builtins/abort @@ -26699,7 +26703,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2099 i32.const 0 call $~lib/builtins/abort @@ -26712,7 +26716,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2100 i32.const 0 call $~lib/builtins/abort @@ -26725,7 +26729,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2101 i32.const 0 call $~lib/builtins/abort @@ -26738,7 +26742,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2102 i32.const 0 call $~lib/builtins/abort @@ -26751,7 +26755,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2103 i32.const 0 call $~lib/builtins/abort @@ -26764,7 +26768,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2104 i32.const 0 call $~lib/builtins/abort @@ -26777,7 +26781,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2105 i32.const 0 call $~lib/builtins/abort @@ -26790,7 +26794,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2106 i32.const 0 call $~lib/builtins/abort @@ -26803,7 +26807,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2109 i32.const 0 call $~lib/builtins/abort @@ -26816,7 +26820,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2110 i32.const 0 call $~lib/builtins/abort @@ -26829,7 +26833,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2111 i32.const 0 call $~lib/builtins/abort @@ -26842,7 +26846,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2112 i32.const 0 call $~lib/builtins/abort @@ -26855,7 +26859,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2113 i32.const 0 call $~lib/builtins/abort @@ -26868,7 +26872,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2114 i32.const 0 call $~lib/builtins/abort @@ -26881,7 +26885,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2115 i32.const 0 call $~lib/builtins/abort @@ -26894,7 +26898,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2116 i32.const 0 call $~lib/builtins/abort @@ -26907,7 +26911,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2117 i32.const 0 call $~lib/builtins/abort @@ -26920,7 +26924,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2118 i32.const 0 call $~lib/builtins/abort @@ -26933,7 +26937,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2119 i32.const 0 call $~lib/builtins/abort @@ -26946,7 +26950,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2120 i32.const 0 call $~lib/builtins/abort @@ -26959,7 +26963,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2121 i32.const 0 call $~lib/builtins/abort @@ -26972,7 +26976,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2122 i32.const 0 call $~lib/builtins/abort @@ -26985,7 +26989,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2123 i32.const 0 call $~lib/builtins/abort @@ -26998,7 +27002,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2124 i32.const 0 call $~lib/builtins/abort @@ -27011,7 +27015,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2125 i32.const 0 call $~lib/builtins/abort @@ -27024,7 +27028,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2126 i32.const 0 call $~lib/builtins/abort @@ -27037,7 +27041,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2127 i32.const 0 call $~lib/builtins/abort @@ -27050,7 +27054,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2128 i32.const 0 call $~lib/builtins/abort @@ -27063,7 +27067,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2129 i32.const 0 call $~lib/builtins/abort @@ -27076,7 +27080,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2130 i32.const 0 call $~lib/builtins/abort @@ -27089,7 +27093,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2131 i32.const 0 call $~lib/builtins/abort @@ -27102,7 +27106,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2132 i32.const 0 call $~lib/builtins/abort @@ -27115,7 +27119,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2133 i32.const 0 call $~lib/builtins/abort @@ -27128,7 +27132,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2134 i32.const 0 call $~lib/builtins/abort @@ -27141,7 +27145,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2135 i32.const 0 call $~lib/builtins/abort @@ -27154,7 +27158,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2136 i32.const 0 call $~lib/builtins/abort @@ -27167,7 +27171,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2137 i32.const 0 call $~lib/builtins/abort @@ -27180,7 +27184,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2138 i32.const 0 call $~lib/builtins/abort @@ -27193,7 +27197,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2139 i32.const 0 call $~lib/builtins/abort @@ -27206,7 +27210,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2140 i32.const 0 call $~lib/builtins/abort @@ -27219,7 +27223,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2141 i32.const 0 call $~lib/builtins/abort @@ -27232,7 +27236,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2142 i32.const 0 call $~lib/builtins/abort @@ -27245,7 +27249,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2143 i32.const 0 call $~lib/builtins/abort @@ -27258,7 +27262,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2144 i32.const 0 call $~lib/builtins/abort @@ -27271,7 +27275,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2145 i32.const 0 call $~lib/builtins/abort @@ -27284,7 +27288,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2146 i32.const 0 call $~lib/builtins/abort @@ -27297,7 +27301,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2147 i32.const 0 call $~lib/builtins/abort @@ -27310,7 +27314,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2148 i32.const 0 call $~lib/builtins/abort @@ -27323,7 +27327,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2149 i32.const 0 call $~lib/builtins/abort @@ -27336,7 +27340,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2150 i32.const 0 call $~lib/builtins/abort @@ -27349,7 +27353,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2151 i32.const 0 call $~lib/builtins/abort @@ -27362,7 +27366,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2152 i32.const 0 call $~lib/builtins/abort @@ -27375,7 +27379,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2153 i32.const 0 call $~lib/builtins/abort @@ -27388,7 +27392,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2154 i32.const 0 call $~lib/builtins/abort @@ -27401,7 +27405,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2155 i32.const 0 call $~lib/builtins/abort @@ -27414,7 +27418,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2156 i32.const 0 call $~lib/builtins/abort @@ -27427,7 +27431,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2157 i32.const 0 call $~lib/builtins/abort @@ -27440,7 +27444,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2158 i32.const 0 call $~lib/builtins/abort @@ -27453,7 +27457,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2159 i32.const 0 call $~lib/builtins/abort @@ -27466,7 +27470,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2160 i32.const 0 call $~lib/builtins/abort @@ -27479,7 +27483,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2161 i32.const 0 call $~lib/builtins/abort @@ -27492,7 +27496,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2162 i32.const 0 call $~lib/builtins/abort @@ -27505,7 +27509,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2163 i32.const 0 call $~lib/builtins/abort @@ -27518,7 +27522,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2164 i32.const 0 call $~lib/builtins/abort @@ -27531,7 +27535,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2165 i32.const 0 call $~lib/builtins/abort @@ -27544,7 +27548,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2166 i32.const 0 call $~lib/builtins/abort @@ -27557,7 +27561,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2180 i32.const 0 call $~lib/builtins/abort @@ -27570,7 +27574,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2181 i32.const 0 call $~lib/builtins/abort @@ -27583,7 +27587,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2182 i32.const 0 call $~lib/builtins/abort @@ -27596,7 +27600,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2183 i32.const 0 call $~lib/builtins/abort @@ -27609,7 +27613,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2184 i32.const 0 call $~lib/builtins/abort @@ -27622,7 +27626,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2185 i32.const 0 call $~lib/builtins/abort @@ -27635,7 +27639,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2186 i32.const 0 call $~lib/builtins/abort @@ -27648,7 +27652,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2187 i32.const 0 call $~lib/builtins/abort @@ -27661,7 +27665,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2188 i32.const 0 call $~lib/builtins/abort @@ -27674,7 +27678,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2189 i32.const 0 call $~lib/builtins/abort @@ -27687,7 +27691,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2192 i32.const 0 call $~lib/builtins/abort @@ -27700,7 +27704,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2193 i32.const 0 call $~lib/builtins/abort @@ -27713,7 +27717,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2194 i32.const 0 call $~lib/builtins/abort @@ -27726,7 +27730,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2195 i32.const 0 call $~lib/builtins/abort @@ -27739,7 +27743,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2196 i32.const 0 call $~lib/builtins/abort @@ -27752,7 +27756,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2197 i32.const 0 call $~lib/builtins/abort @@ -27765,7 +27769,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2198 i32.const 0 call $~lib/builtins/abort @@ -27778,7 +27782,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2199 i32.const 0 call $~lib/builtins/abort @@ -27791,7 +27795,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2200 i32.const 0 call $~lib/builtins/abort @@ -27804,7 +27808,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2201 i32.const 0 call $~lib/builtins/abort @@ -27817,7 +27821,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2202 i32.const 0 call $~lib/builtins/abort @@ -27830,7 +27834,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2203 i32.const 0 call $~lib/builtins/abort @@ -27843,7 +27847,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2204 i32.const 0 call $~lib/builtins/abort @@ -27856,7 +27860,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2205 i32.const 0 call $~lib/builtins/abort @@ -27869,7 +27873,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2206 i32.const 0 call $~lib/builtins/abort @@ -27882,7 +27886,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2207 i32.const 0 call $~lib/builtins/abort @@ -27895,7 +27899,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2208 i32.const 0 call $~lib/builtins/abort @@ -27908,7 +27912,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2209 i32.const 0 call $~lib/builtins/abort @@ -27921,7 +27925,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2210 i32.const 0 call $~lib/builtins/abort @@ -27934,7 +27938,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2211 i32.const 0 call $~lib/builtins/abort @@ -27947,7 +27951,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2212 i32.const 0 call $~lib/builtins/abort @@ -27960,7 +27964,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2213 i32.const 0 call $~lib/builtins/abort @@ -27973,7 +27977,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2214 i32.const 0 call $~lib/builtins/abort @@ -27986,7 +27990,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2215 i32.const 0 call $~lib/builtins/abort @@ -27999,7 +28003,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2216 i32.const 0 call $~lib/builtins/abort @@ -28012,7 +28016,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2217 i32.const 0 call $~lib/builtins/abort @@ -28025,7 +28029,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2218 i32.const 0 call $~lib/builtins/abort @@ -28038,7 +28042,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2219 i32.const 0 call $~lib/builtins/abort @@ -28051,7 +28055,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2220 i32.const 0 call $~lib/builtins/abort @@ -28064,7 +28068,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2221 i32.const 0 call $~lib/builtins/abort @@ -28077,7 +28081,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2222 i32.const 0 call $~lib/builtins/abort @@ -28090,7 +28094,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2223 i32.const 0 call $~lib/builtins/abort @@ -28103,7 +28107,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2224 i32.const 0 call $~lib/builtins/abort @@ -28116,7 +28120,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2225 i32.const 0 call $~lib/builtins/abort @@ -28129,7 +28133,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2226 i32.const 0 call $~lib/builtins/abort @@ -28142,7 +28146,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2227 i32.const 0 call $~lib/builtins/abort @@ -28155,7 +28159,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2228 i32.const 0 call $~lib/builtins/abort @@ -28168,7 +28172,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2229 i32.const 0 call $~lib/builtins/abort @@ -28181,7 +28185,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2230 i32.const 0 call $~lib/builtins/abort @@ -28194,7 +28198,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2231 i32.const 0 call $~lib/builtins/abort @@ -28207,7 +28211,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2232 i32.const 0 call $~lib/builtins/abort @@ -28220,7 +28224,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2233 i32.const 0 call $~lib/builtins/abort @@ -28233,7 +28237,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2234 i32.const 0 call $~lib/builtins/abort @@ -28246,7 +28250,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2235 i32.const 0 call $~lib/builtins/abort @@ -28259,7 +28263,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2236 i32.const 0 call $~lib/builtins/abort @@ -28272,7 +28276,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2237 i32.const 0 call $~lib/builtins/abort @@ -28285,7 +28289,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2238 i32.const 0 call $~lib/builtins/abort @@ -28298,7 +28302,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2239 i32.const 0 call $~lib/builtins/abort @@ -28311,7 +28315,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2240 i32.const 0 call $~lib/builtins/abort @@ -28324,7 +28328,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2241 i32.const 0 call $~lib/builtins/abort @@ -28337,7 +28341,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2242 i32.const 0 call $~lib/builtins/abort @@ -28350,7 +28354,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2243 i32.const 0 call $~lib/builtins/abort @@ -28363,7 +28367,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2244 i32.const 0 call $~lib/builtins/abort @@ -28376,7 +28380,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2245 i32.const 0 call $~lib/builtins/abort @@ -28389,7 +28393,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2246 i32.const 0 call $~lib/builtins/abort @@ -28402,7 +28406,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2247 i32.const 0 call $~lib/builtins/abort @@ -28415,7 +28419,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2248 i32.const 0 call $~lib/builtins/abort @@ -28428,7 +28432,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2249 i32.const 0 call $~lib/builtins/abort @@ -28441,7 +28445,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2250 i32.const 0 call $~lib/builtins/abort @@ -28454,7 +28458,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2251 i32.const 0 call $~lib/builtins/abort @@ -28467,7 +28471,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2252 i32.const 0 call $~lib/builtins/abort @@ -28480,7 +28484,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2253 i32.const 0 call $~lib/builtins/abort @@ -28493,7 +28497,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2254 i32.const 0 call $~lib/builtins/abort @@ -28506,7 +28510,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2255 i32.const 0 call $~lib/builtins/abort @@ -28519,7 +28523,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2256 i32.const 0 call $~lib/builtins/abort @@ -28532,7 +28536,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2257 i32.const 0 call $~lib/builtins/abort @@ -28545,7 +28549,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2266 i32.const 0 call $~lib/builtins/abort @@ -28558,7 +28562,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2267 i32.const 0 call $~lib/builtins/abort @@ -28571,7 +28575,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2268 i32.const 0 call $~lib/builtins/abort @@ -28584,7 +28588,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2269 i32.const 0 call $~lib/builtins/abort @@ -28597,7 +28601,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2270 i32.const 0 call $~lib/builtins/abort @@ -28610,7 +28614,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2271 i32.const 0 call $~lib/builtins/abort @@ -28623,7 +28627,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2272 i32.const 0 call $~lib/builtins/abort @@ -28636,7 +28640,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2273 i32.const 0 call $~lib/builtins/abort @@ -28649,7 +28653,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2274 i32.const 0 call $~lib/builtins/abort @@ -28662,7 +28666,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2275 i32.const 0 call $~lib/builtins/abort @@ -28675,7 +28679,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2278 i32.const 0 call $~lib/builtins/abort @@ -28688,7 +28692,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2279 i32.const 0 call $~lib/builtins/abort @@ -28701,7 +28705,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2280 i32.const 0 call $~lib/builtins/abort @@ -28714,7 +28718,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2281 i32.const 0 call $~lib/builtins/abort @@ -28727,7 +28731,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2282 i32.const 0 call $~lib/builtins/abort @@ -28740,7 +28744,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2283 i32.const 0 call $~lib/builtins/abort @@ -28753,7 +28757,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2284 i32.const 0 call $~lib/builtins/abort @@ -28766,7 +28770,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2285 i32.const 0 call $~lib/builtins/abort @@ -28779,7 +28783,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2286 i32.const 0 call $~lib/builtins/abort @@ -28792,7 +28796,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2287 i32.const 0 call $~lib/builtins/abort @@ -28805,7 +28809,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2288 i32.const 0 call $~lib/builtins/abort @@ -28818,7 +28822,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2289 i32.const 0 call $~lib/builtins/abort @@ -28831,7 +28835,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2290 i32.const 0 call $~lib/builtins/abort @@ -28844,7 +28848,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2291 i32.const 0 call $~lib/builtins/abort @@ -28857,7 +28861,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2292 i32.const 0 call $~lib/builtins/abort @@ -28870,7 +28874,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2293 i32.const 0 call $~lib/builtins/abort @@ -28883,7 +28887,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2294 i32.const 0 call $~lib/builtins/abort @@ -28896,7 +28900,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2295 i32.const 0 call $~lib/builtins/abort @@ -28909,7 +28913,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2296 i32.const 0 call $~lib/builtins/abort @@ -28922,7 +28926,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2297 i32.const 0 call $~lib/builtins/abort @@ -28935,7 +28939,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2298 i32.const 0 call $~lib/builtins/abort @@ -28948,7 +28952,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2299 i32.const 0 call $~lib/builtins/abort @@ -28961,7 +28965,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2300 i32.const 0 call $~lib/builtins/abort @@ -28974,7 +28978,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2301 i32.const 0 call $~lib/builtins/abort @@ -28987,7 +28991,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2302 i32.const 0 call $~lib/builtins/abort @@ -29000,7 +29004,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2303 i32.const 0 call $~lib/builtins/abort @@ -29013,7 +29017,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2304 i32.const 0 call $~lib/builtins/abort @@ -29026,7 +29030,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2305 i32.const 0 call $~lib/builtins/abort @@ -29039,7 +29043,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2306 i32.const 0 call $~lib/builtins/abort @@ -29052,7 +29056,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2307 i32.const 0 call $~lib/builtins/abort @@ -29065,7 +29069,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2308 i32.const 0 call $~lib/builtins/abort @@ -29078,7 +29082,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2309 i32.const 0 call $~lib/builtins/abort @@ -29091,7 +29095,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2310 i32.const 0 call $~lib/builtins/abort @@ -29104,7 +29108,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2311 i32.const 0 call $~lib/builtins/abort @@ -29117,7 +29121,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2312 i32.const 0 call $~lib/builtins/abort @@ -29130,7 +29134,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2313 i32.const 0 call $~lib/builtins/abort @@ -29143,7 +29147,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2314 i32.const 0 call $~lib/builtins/abort @@ -29156,7 +29160,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2315 i32.const 0 call $~lib/builtins/abort @@ -29169,7 +29173,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2316 i32.const 0 call $~lib/builtins/abort @@ -29182,7 +29186,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2317 i32.const 0 call $~lib/builtins/abort @@ -29195,7 +29199,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2318 i32.const 0 call $~lib/builtins/abort @@ -29208,7 +29212,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2319 i32.const 0 call $~lib/builtins/abort @@ -29221,7 +29225,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2320 i32.const 0 call $~lib/builtins/abort @@ -29234,7 +29238,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2321 i32.const 0 call $~lib/builtins/abort @@ -29247,7 +29251,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2322 i32.const 0 call $~lib/builtins/abort @@ -29260,7 +29264,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2323 i32.const 0 call $~lib/builtins/abort @@ -29273,7 +29277,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2324 i32.const 0 call $~lib/builtins/abort @@ -29286,7 +29290,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2325 i32.const 0 call $~lib/builtins/abort @@ -29299,7 +29303,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2326 i32.const 0 call $~lib/builtins/abort @@ -29312,7 +29316,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2327 i32.const 0 call $~lib/builtins/abort @@ -29325,7 +29329,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2328 i32.const 0 call $~lib/builtins/abort @@ -29338,7 +29342,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2329 i32.const 0 call $~lib/builtins/abort @@ -29351,7 +29355,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2330 i32.const 0 call $~lib/builtins/abort @@ -29364,7 +29368,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2331 i32.const 0 call $~lib/builtins/abort @@ -29377,7 +29381,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2332 i32.const 0 call $~lib/builtins/abort @@ -29390,7 +29394,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2333 i32.const 0 call $~lib/builtins/abort @@ -29403,7 +29407,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2334 i32.const 0 call $~lib/builtins/abort @@ -29416,7 +29420,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2335 i32.const 0 call $~lib/builtins/abort @@ -29429,7 +29433,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2336 i32.const 0 call $~lib/builtins/abort @@ -29442,7 +29446,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2337 i32.const 0 call $~lib/builtins/abort @@ -29455,7 +29459,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2338 i32.const 0 call $~lib/builtins/abort @@ -29468,7 +29472,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2339 i32.const 0 call $~lib/builtins/abort @@ -29481,7 +29485,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2340 i32.const 0 call $~lib/builtins/abort @@ -29494,7 +29498,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2341 i32.const 0 call $~lib/builtins/abort @@ -29507,7 +29511,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2342 i32.const 0 call $~lib/builtins/abort @@ -29520,7 +29524,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2343 i32.const 0 call $~lib/builtins/abort @@ -29534,7 +29538,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2355 i32.const 0 call $~lib/builtins/abort @@ -29548,7 +29552,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2356 i32.const 0 call $~lib/builtins/abort @@ -29562,7 +29566,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2357 i32.const 0 call $~lib/builtins/abort @@ -29576,7 +29580,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2358 i32.const 0 call $~lib/builtins/abort @@ -29590,7 +29594,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2359 i32.const 0 call $~lib/builtins/abort @@ -29604,7 +29608,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2360 i32.const 0 call $~lib/builtins/abort @@ -29618,7 +29622,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2361 i32.const 0 call $~lib/builtins/abort @@ -29632,7 +29636,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2362 i32.const 0 call $~lib/builtins/abort @@ -29646,7 +29650,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2363 i32.const 0 call $~lib/builtins/abort @@ -29660,7 +29664,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2364 i32.const 0 call $~lib/builtins/abort @@ -29674,7 +29678,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2367 i32.const 0 call $~lib/builtins/abort @@ -29688,7 +29692,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2368 i32.const 0 call $~lib/builtins/abort @@ -29702,7 +29706,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2369 i32.const 0 call $~lib/builtins/abort @@ -29716,7 +29720,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2370 i32.const 0 call $~lib/builtins/abort @@ -29730,7 +29734,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2371 i32.const 0 call $~lib/builtins/abort @@ -29744,7 +29748,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2372 i32.const 0 call $~lib/builtins/abort @@ -29758,7 +29762,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2373 i32.const 0 call $~lib/builtins/abort @@ -29772,7 +29776,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2374 i32.const 0 call $~lib/builtins/abort @@ -29786,7 +29790,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2375 i32.const 0 call $~lib/builtins/abort @@ -29800,7 +29804,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2376 i32.const 0 call $~lib/builtins/abort @@ -29814,7 +29818,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2377 i32.const 0 call $~lib/builtins/abort @@ -29828,7 +29832,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2378 i32.const 0 call $~lib/builtins/abort @@ -29842,7 +29846,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2379 i32.const 0 call $~lib/builtins/abort @@ -29856,7 +29860,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2380 i32.const 0 call $~lib/builtins/abort @@ -29870,7 +29874,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2381 i32.const 0 call $~lib/builtins/abort @@ -29884,7 +29888,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2382 i32.const 0 call $~lib/builtins/abort @@ -29898,7 +29902,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2383 i32.const 0 call $~lib/builtins/abort @@ -29912,7 +29916,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2384 i32.const 0 call $~lib/builtins/abort @@ -29926,7 +29930,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2385 i32.const 0 call $~lib/builtins/abort @@ -29940,7 +29944,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2386 i32.const 0 call $~lib/builtins/abort @@ -29954,7 +29958,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2387 i32.const 0 call $~lib/builtins/abort @@ -29968,7 +29972,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2388 i32.const 0 call $~lib/builtins/abort @@ -29982,7 +29986,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2389 i32.const 0 call $~lib/builtins/abort @@ -29996,7 +30000,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2390 i32.const 0 call $~lib/builtins/abort @@ -30010,7 +30014,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2391 i32.const 0 call $~lib/builtins/abort @@ -30024,7 +30028,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2392 i32.const 0 call $~lib/builtins/abort @@ -30038,7 +30042,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2393 i32.const 0 call $~lib/builtins/abort @@ -30052,7 +30056,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2394 i32.const 0 call $~lib/builtins/abort @@ -30066,7 +30070,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2395 i32.const 0 call $~lib/builtins/abort @@ -30080,7 +30084,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2396 i32.const 0 call $~lib/builtins/abort @@ -30094,7 +30098,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2397 i32.const 0 call $~lib/builtins/abort @@ -30108,7 +30112,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2398 i32.const 0 call $~lib/builtins/abort @@ -30122,7 +30126,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2399 i32.const 0 call $~lib/builtins/abort @@ -30136,7 +30140,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2400 i32.const 0 call $~lib/builtins/abort @@ -30150,7 +30154,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2401 i32.const 0 call $~lib/builtins/abort @@ -30164,7 +30168,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2402 i32.const 0 call $~lib/builtins/abort @@ -30178,7 +30182,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2403 i32.const 0 call $~lib/builtins/abort @@ -30192,7 +30196,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2404 i32.const 0 call $~lib/builtins/abort @@ -30206,7 +30210,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2405 i32.const 0 call $~lib/builtins/abort @@ -30220,7 +30224,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2406 i32.const 0 call $~lib/builtins/abort @@ -30234,7 +30238,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2407 i32.const 0 call $~lib/builtins/abort @@ -30248,7 +30252,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2408 i32.const 0 call $~lib/builtins/abort @@ -30262,7 +30266,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2409 i32.const 0 call $~lib/builtins/abort @@ -30276,7 +30280,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2410 i32.const 0 call $~lib/builtins/abort @@ -30290,7 +30294,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2411 i32.const 0 call $~lib/builtins/abort @@ -30304,7 +30308,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2412 i32.const 0 call $~lib/builtins/abort @@ -30318,7 +30322,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2413 i32.const 0 call $~lib/builtins/abort @@ -30332,7 +30336,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2414 i32.const 0 call $~lib/builtins/abort @@ -30346,7 +30350,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2415 i32.const 0 call $~lib/builtins/abort @@ -30360,7 +30364,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2416 i32.const 0 call $~lib/builtins/abort @@ -30374,7 +30378,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2417 i32.const 0 call $~lib/builtins/abort @@ -30388,7 +30392,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2418 i32.const 0 call $~lib/builtins/abort @@ -30402,7 +30406,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2419 i32.const 0 call $~lib/builtins/abort @@ -30416,7 +30420,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2420 i32.const 0 call $~lib/builtins/abort @@ -30430,7 +30434,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2421 i32.const 0 call $~lib/builtins/abort @@ -30444,7 +30448,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2422 i32.const 0 call $~lib/builtins/abort @@ -30458,7 +30462,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2423 i32.const 0 call $~lib/builtins/abort @@ -30472,7 +30476,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2424 i32.const 0 call $~lib/builtins/abort @@ -30486,7 +30490,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2425 i32.const 0 call $~lib/builtins/abort @@ -30500,7 +30504,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2426 i32.const 0 call $~lib/builtins/abort @@ -30514,7 +30518,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2427 i32.const 0 call $~lib/builtins/abort @@ -30528,7 +30532,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2428 i32.const 0 call $~lib/builtins/abort @@ -30542,7 +30546,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2429 i32.const 0 call $~lib/builtins/abort @@ -30556,7 +30560,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2430 i32.const 0 call $~lib/builtins/abort @@ -30570,7 +30574,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2431 i32.const 0 call $~lib/builtins/abort @@ -30584,7 +30588,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2432 i32.const 0 call $~lib/builtins/abort @@ -30598,7 +30602,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2433 i32.const 0 call $~lib/builtins/abort @@ -30612,7 +30616,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2434 i32.const 0 call $~lib/builtins/abort @@ -30626,7 +30630,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2435 i32.const 0 call $~lib/builtins/abort @@ -30640,7 +30644,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2436 i32.const 0 call $~lib/builtins/abort @@ -30654,7 +30658,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2437 i32.const 0 call $~lib/builtins/abort @@ -30668,7 +30672,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2438 i32.const 0 call $~lib/builtins/abort @@ -30682,7 +30686,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2439 i32.const 0 call $~lib/builtins/abort @@ -30696,7 +30700,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2440 i32.const 0 call $~lib/builtins/abort @@ -30710,7 +30714,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2441 i32.const 0 call $~lib/builtins/abort @@ -30724,7 +30728,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2442 i32.const 0 call $~lib/builtins/abort @@ -30738,7 +30742,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2443 i32.const 0 call $~lib/builtins/abort @@ -30752,7 +30756,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2444 i32.const 0 call $~lib/builtins/abort @@ -30766,7 +30770,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2445 i32.const 0 call $~lib/builtins/abort @@ -30780,7 +30784,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2446 i32.const 0 call $~lib/builtins/abort @@ -30794,7 +30798,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2447 i32.const 0 call $~lib/builtins/abort @@ -30808,7 +30812,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2448 i32.const 0 call $~lib/builtins/abort @@ -30822,7 +30826,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2449 i32.const 0 call $~lib/builtins/abort @@ -30836,7 +30840,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2450 i32.const 0 call $~lib/builtins/abort @@ -30850,7 +30854,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2451 i32.const 0 call $~lib/builtins/abort @@ -30864,7 +30868,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2452 i32.const 0 call $~lib/builtins/abort @@ -30878,7 +30882,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2453 i32.const 0 call $~lib/builtins/abort @@ -30892,7 +30896,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2454 i32.const 0 call $~lib/builtins/abort @@ -30906,7 +30910,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2455 i32.const 0 call $~lib/builtins/abort @@ -30920,7 +30924,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2456 i32.const 0 call $~lib/builtins/abort @@ -30934,7 +30938,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2457 i32.const 0 call $~lib/builtins/abort @@ -30948,7 +30952,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2458 i32.const 0 call $~lib/builtins/abort @@ -30962,7 +30966,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2467 i32.const 0 call $~lib/builtins/abort @@ -30976,7 +30980,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2468 i32.const 0 call $~lib/builtins/abort @@ -30990,7 +30994,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2469 i32.const 0 call $~lib/builtins/abort @@ -31004,7 +31008,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2470 i32.const 0 call $~lib/builtins/abort @@ -31018,7 +31022,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2471 i32.const 0 call $~lib/builtins/abort @@ -31032,7 +31036,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2472 i32.const 0 call $~lib/builtins/abort @@ -31046,7 +31050,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2473 i32.const 0 call $~lib/builtins/abort @@ -31060,7 +31064,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2474 i32.const 0 call $~lib/builtins/abort @@ -31074,7 +31078,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2475 i32.const 0 call $~lib/builtins/abort @@ -31088,7 +31092,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2476 i32.const 0 call $~lib/builtins/abort @@ -31102,7 +31106,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2479 i32.const 0 call $~lib/builtins/abort @@ -31116,7 +31120,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2480 i32.const 0 call $~lib/builtins/abort @@ -31130,7 +31134,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2481 i32.const 0 call $~lib/builtins/abort @@ -31144,7 +31148,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2482 i32.const 0 call $~lib/builtins/abort @@ -31158,7 +31162,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2483 i32.const 0 call $~lib/builtins/abort @@ -31172,7 +31176,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2484 i32.const 0 call $~lib/builtins/abort @@ -31186,7 +31190,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2485 i32.const 0 call $~lib/builtins/abort @@ -31200,7 +31204,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2486 i32.const 0 call $~lib/builtins/abort @@ -31214,7 +31218,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2487 i32.const 0 call $~lib/builtins/abort @@ -31228,7 +31232,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2488 i32.const 0 call $~lib/builtins/abort @@ -31242,7 +31246,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2489 i32.const 0 call $~lib/builtins/abort @@ -31256,7 +31260,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2490 i32.const 0 call $~lib/builtins/abort @@ -31270,7 +31274,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2491 i32.const 0 call $~lib/builtins/abort @@ -31284,7 +31288,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2492 i32.const 0 call $~lib/builtins/abort @@ -31298,7 +31302,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2493 i32.const 0 call $~lib/builtins/abort @@ -31312,7 +31316,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2494 i32.const 0 call $~lib/builtins/abort @@ -31326,7 +31330,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2495 i32.const 0 call $~lib/builtins/abort @@ -31340,7 +31344,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2496 i32.const 0 call $~lib/builtins/abort @@ -31354,7 +31358,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2497 i32.const 0 call $~lib/builtins/abort @@ -31368,7 +31372,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2498 i32.const 0 call $~lib/builtins/abort @@ -31382,7 +31386,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2499 i32.const 0 call $~lib/builtins/abort @@ -31396,7 +31400,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2500 i32.const 0 call $~lib/builtins/abort @@ -31410,7 +31414,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2501 i32.const 0 call $~lib/builtins/abort @@ -31424,7 +31428,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2502 i32.const 0 call $~lib/builtins/abort @@ -31438,7 +31442,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2503 i32.const 0 call $~lib/builtins/abort @@ -31452,7 +31456,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2504 i32.const 0 call $~lib/builtins/abort @@ -31466,7 +31470,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2505 i32.const 0 call $~lib/builtins/abort @@ -31480,7 +31484,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2506 i32.const 0 call $~lib/builtins/abort @@ -31494,7 +31498,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2507 i32.const 0 call $~lib/builtins/abort @@ -31508,7 +31512,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2508 i32.const 0 call $~lib/builtins/abort @@ -31522,7 +31526,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2509 i32.const 0 call $~lib/builtins/abort @@ -31536,7 +31540,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2510 i32.const 0 call $~lib/builtins/abort @@ -31550,7 +31554,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2511 i32.const 0 call $~lib/builtins/abort @@ -31564,7 +31568,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2512 i32.const 0 call $~lib/builtins/abort @@ -31578,7 +31582,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2513 i32.const 0 call $~lib/builtins/abort @@ -31592,7 +31596,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2514 i32.const 0 call $~lib/builtins/abort @@ -31606,7 +31610,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2515 i32.const 0 call $~lib/builtins/abort @@ -31620,7 +31624,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2516 i32.const 0 call $~lib/builtins/abort @@ -31634,7 +31638,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2517 i32.const 0 call $~lib/builtins/abort @@ -31648,7 +31652,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2518 i32.const 0 call $~lib/builtins/abort @@ -31662,7 +31666,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2519 i32.const 0 call $~lib/builtins/abort @@ -31676,7 +31680,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2520 i32.const 0 call $~lib/builtins/abort @@ -31690,7 +31694,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2521 i32.const 0 call $~lib/builtins/abort @@ -31704,7 +31708,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2522 i32.const 0 call $~lib/builtins/abort @@ -31718,7 +31722,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2523 i32.const 0 call $~lib/builtins/abort @@ -31732,7 +31736,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2524 i32.const 0 call $~lib/builtins/abort @@ -31746,7 +31750,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2525 i32.const 0 call $~lib/builtins/abort @@ -31760,7 +31764,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2526 i32.const 0 call $~lib/builtins/abort @@ -31774,7 +31778,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2527 i32.const 0 call $~lib/builtins/abort @@ -31788,7 +31792,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2528 i32.const 0 call $~lib/builtins/abort @@ -31802,7 +31806,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2529 i32.const 0 call $~lib/builtins/abort @@ -31816,7 +31820,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2530 i32.const 0 call $~lib/builtins/abort @@ -31830,7 +31834,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2531 i32.const 0 call $~lib/builtins/abort @@ -31844,7 +31848,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2532 i32.const 0 call $~lib/builtins/abort @@ -31858,7 +31862,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2533 i32.const 0 call $~lib/builtins/abort @@ -31872,7 +31876,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2534 i32.const 0 call $~lib/builtins/abort @@ -31886,7 +31890,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2535 i32.const 0 call $~lib/builtins/abort @@ -31900,7 +31904,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2536 i32.const 0 call $~lib/builtins/abort @@ -31914,7 +31918,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2537 i32.const 0 call $~lib/builtins/abort @@ -31928,7 +31932,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2538 i32.const 0 call $~lib/builtins/abort @@ -31942,7 +31946,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2539 i32.const 0 call $~lib/builtins/abort @@ -31956,7 +31960,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2540 i32.const 0 call $~lib/builtins/abort @@ -31970,7 +31974,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2541 i32.const 0 call $~lib/builtins/abort @@ -31984,7 +31988,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2542 i32.const 0 call $~lib/builtins/abort @@ -31998,7 +32002,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2543 i32.const 0 call $~lib/builtins/abort @@ -32012,7 +32016,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2544 i32.const 0 call $~lib/builtins/abort @@ -32026,7 +32030,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2545 i32.const 0 call $~lib/builtins/abort @@ -32040,7 +32044,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2546 i32.const 0 call $~lib/builtins/abort @@ -32054,7 +32058,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2547 i32.const 0 call $~lib/builtins/abort @@ -32068,7 +32072,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2548 i32.const 0 call $~lib/builtins/abort @@ -32082,7 +32086,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2549 i32.const 0 call $~lib/builtins/abort @@ -32096,7 +32100,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2550 i32.const 0 call $~lib/builtins/abort @@ -32110,7 +32114,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2551 i32.const 0 call $~lib/builtins/abort @@ -32124,7 +32128,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2552 i32.const 0 call $~lib/builtins/abort @@ -32138,7 +32142,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2553 i32.const 0 call $~lib/builtins/abort @@ -32152,7 +32156,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2554 i32.const 0 call $~lib/builtins/abort @@ -32166,7 +32170,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2555 i32.const 0 call $~lib/builtins/abort @@ -32180,7 +32184,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2556 i32.const 0 call $~lib/builtins/abort @@ -32194,7 +32198,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2557 i32.const 0 call $~lib/builtins/abort @@ -32208,7 +32212,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2558 i32.const 0 call $~lib/builtins/abort @@ -32222,7 +32226,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2559 i32.const 0 call $~lib/builtins/abort @@ -32236,7 +32240,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2560 i32.const 0 call $~lib/builtins/abort @@ -32250,7 +32254,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2561 i32.const 0 call $~lib/builtins/abort @@ -32264,7 +32268,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2562 i32.const 0 call $~lib/builtins/abort @@ -32278,7 +32282,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2563 i32.const 0 call $~lib/builtins/abort @@ -32292,7 +32296,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2564 i32.const 0 call $~lib/builtins/abort @@ -32306,7 +32310,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2565 i32.const 0 call $~lib/builtins/abort @@ -32320,7 +32324,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2566 i32.const 0 call $~lib/builtins/abort @@ -32334,7 +32338,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2567 i32.const 0 call $~lib/builtins/abort @@ -32348,7 +32352,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2568 i32.const 0 call $~lib/builtins/abort @@ -32362,7 +32366,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2569 i32.const 0 call $~lib/builtins/abort @@ -32376,7 +32380,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2570 i32.const 0 call $~lib/builtins/abort @@ -32411,7 +32415,7 @@ br $repeat|0 else i32.const 0 - i32.const 16 + i32.const 24 i32.const 2579 i32.const 2 call $~lib/builtins/abort @@ -32451,7 +32455,7 @@ br $repeat|1 else i32.const 0 - i32.const 16 + i32.const 24 i32.const 2587 i32.const 2 call $~lib/builtins/abort @@ -32466,7 +32470,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2601 i32.const 0 call $~lib/builtins/abort @@ -32478,7 +32482,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2602 i32.const 0 call $~lib/builtins/abort @@ -32490,7 +32494,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2603 i32.const 0 call $~lib/builtins/abort @@ -32502,7 +32506,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2604 i32.const 0 call $~lib/builtins/abort @@ -32514,7 +32518,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2605 i32.const 0 call $~lib/builtins/abort @@ -32526,7 +32530,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2606 i32.const 0 call $~lib/builtins/abort @@ -32538,7 +32542,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2607 i32.const 0 call $~lib/builtins/abort @@ -32550,7 +32554,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2608 i32.const 0 call $~lib/builtins/abort @@ -32562,7 +32566,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2609 i32.const 0 call $~lib/builtins/abort @@ -32574,7 +32578,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2610 i32.const 0 call $~lib/builtins/abort @@ -32586,7 +32590,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2613 i32.const 0 call $~lib/builtins/abort @@ -32598,7 +32602,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2614 i32.const 0 call $~lib/builtins/abort @@ -32610,7 +32614,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2615 i32.const 0 call $~lib/builtins/abort @@ -32622,7 +32626,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2616 i32.const 0 call $~lib/builtins/abort @@ -32634,7 +32638,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2617 i32.const 0 call $~lib/builtins/abort @@ -32646,7 +32650,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2618 i32.const 0 call $~lib/builtins/abort @@ -32658,7 +32662,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2619 i32.const 0 call $~lib/builtins/abort @@ -32670,7 +32674,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2620 i32.const 0 call $~lib/builtins/abort @@ -32682,7 +32686,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2621 i32.const 0 call $~lib/builtins/abort @@ -32694,7 +32698,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2622 i32.const 0 call $~lib/builtins/abort @@ -32706,7 +32710,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2623 i32.const 0 call $~lib/builtins/abort @@ -32718,7 +32722,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2624 i32.const 0 call $~lib/builtins/abort @@ -32730,7 +32734,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2625 i32.const 0 call $~lib/builtins/abort @@ -32742,7 +32746,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2626 i32.const 0 call $~lib/builtins/abort @@ -32754,7 +32758,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2627 i32.const 0 call $~lib/builtins/abort @@ -32766,7 +32770,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2628 i32.const 0 call $~lib/builtins/abort @@ -32778,7 +32782,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2629 i32.const 0 call $~lib/builtins/abort @@ -32790,7 +32794,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2638 i32.const 0 call $~lib/builtins/abort @@ -32802,7 +32806,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2639 i32.const 0 call $~lib/builtins/abort @@ -32814,7 +32818,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2640 i32.const 0 call $~lib/builtins/abort @@ -32826,7 +32830,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2641 i32.const 0 call $~lib/builtins/abort @@ -32838,7 +32842,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2642 i32.const 0 call $~lib/builtins/abort @@ -32850,7 +32854,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2643 i32.const 0 call $~lib/builtins/abort @@ -32862,7 +32866,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2644 i32.const 0 call $~lib/builtins/abort @@ -32874,7 +32878,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2645 i32.const 0 call $~lib/builtins/abort @@ -32886,7 +32890,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2646 i32.const 0 call $~lib/builtins/abort @@ -32898,7 +32902,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2647 i32.const 0 call $~lib/builtins/abort @@ -32910,7 +32914,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2650 i32.const 0 call $~lib/builtins/abort @@ -32922,7 +32926,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2651 i32.const 0 call $~lib/builtins/abort @@ -32934,7 +32938,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2652 i32.const 0 call $~lib/builtins/abort @@ -32946,7 +32950,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2653 i32.const 0 call $~lib/builtins/abort @@ -32958,7 +32962,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2654 i32.const 0 call $~lib/builtins/abort @@ -32970,7 +32974,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2655 i32.const 0 call $~lib/builtins/abort @@ -32982,7 +32986,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2656 i32.const 0 call $~lib/builtins/abort @@ -32994,7 +32998,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2657 i32.const 0 call $~lib/builtins/abort @@ -33006,7 +33010,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2658 i32.const 0 call $~lib/builtins/abort @@ -33018,7 +33022,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2659 i32.const 0 call $~lib/builtins/abort @@ -33030,7 +33034,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2660 i32.const 0 call $~lib/builtins/abort @@ -33042,7 +33046,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2661 i32.const 0 call $~lib/builtins/abort @@ -33054,7 +33058,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2662 i32.const 0 call $~lib/builtins/abort @@ -33066,7 +33070,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2663 i32.const 0 call $~lib/builtins/abort @@ -33078,7 +33082,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2664 i32.const 0 call $~lib/builtins/abort @@ -33090,7 +33094,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2665 i32.const 0 call $~lib/builtins/abort @@ -33102,7 +33106,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2666 i32.const 0 call $~lib/builtins/abort @@ -33114,7 +33118,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2677 i32.const 0 call $~lib/builtins/abort @@ -33126,7 +33130,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2678 i32.const 0 call $~lib/builtins/abort @@ -33138,7 +33142,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2679 i32.const 0 call $~lib/builtins/abort @@ -33150,7 +33154,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2680 i32.const 0 call $~lib/builtins/abort @@ -33162,7 +33166,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2681 i32.const 0 call $~lib/builtins/abort @@ -33174,7 +33178,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2682 i32.const 0 call $~lib/builtins/abort @@ -33186,7 +33190,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2683 i32.const 0 call $~lib/builtins/abort @@ -33198,7 +33202,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2684 i32.const 0 call $~lib/builtins/abort @@ -33210,7 +33214,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2685 i32.const 0 call $~lib/builtins/abort @@ -33222,7 +33226,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2693 i32.const 0 call $~lib/builtins/abort @@ -33234,7 +33238,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2694 i32.const 0 call $~lib/builtins/abort @@ -33246,7 +33250,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2695 i32.const 0 call $~lib/builtins/abort @@ -33258,7 +33262,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2696 i32.const 0 call $~lib/builtins/abort @@ -33270,7 +33274,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2697 i32.const 0 call $~lib/builtins/abort @@ -33282,7 +33286,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2698 i32.const 0 call $~lib/builtins/abort @@ -33294,7 +33298,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2699 i32.const 0 call $~lib/builtins/abort @@ -33306,7 +33310,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2700 i32.const 0 call $~lib/builtins/abort @@ -33318,7 +33322,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2701 i32.const 0 call $~lib/builtins/abort @@ -33331,7 +33335,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2738 i32.const 0 call $~lib/builtins/abort @@ -33344,7 +33348,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2739 i32.const 0 call $~lib/builtins/abort @@ -33357,7 +33361,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2740 i32.const 0 call $~lib/builtins/abort @@ -33370,7 +33374,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2741 i32.const 0 call $~lib/builtins/abort @@ -33383,7 +33387,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2742 i32.const 0 call $~lib/builtins/abort @@ -33396,7 +33400,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2743 i32.const 0 call $~lib/builtins/abort @@ -33409,7 +33413,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2744 i32.const 0 call $~lib/builtins/abort @@ -33422,7 +33426,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2745 i32.const 0 call $~lib/builtins/abort @@ -33435,7 +33439,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2746 i32.const 0 call $~lib/builtins/abort @@ -33448,7 +33452,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2747 i32.const 0 call $~lib/builtins/abort @@ -33461,7 +33465,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2750 i32.const 0 call $~lib/builtins/abort @@ -33474,7 +33478,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2751 i32.const 0 call $~lib/builtins/abort @@ -33487,7 +33491,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2752 i32.const 0 call $~lib/builtins/abort @@ -33500,7 +33504,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2753 i32.const 0 call $~lib/builtins/abort @@ -33513,7 +33517,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2754 i32.const 0 call $~lib/builtins/abort @@ -33526,7 +33530,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2755 i32.const 0 call $~lib/builtins/abort @@ -33539,7 +33543,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2756 i32.const 0 call $~lib/builtins/abort @@ -33552,7 +33556,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2757 i32.const 0 call $~lib/builtins/abort @@ -33565,7 +33569,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2758 i32.const 0 call $~lib/builtins/abort @@ -33578,7 +33582,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2759 i32.const 0 call $~lib/builtins/abort @@ -33591,7 +33595,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2760 i32.const 0 call $~lib/builtins/abort @@ -33604,7 +33608,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2761 i32.const 0 call $~lib/builtins/abort @@ -33617,7 +33621,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2762 i32.const 0 call $~lib/builtins/abort @@ -33630,7 +33634,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2763 i32.const 0 call $~lib/builtins/abort @@ -33643,7 +33647,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2764 i32.const 0 call $~lib/builtins/abort @@ -33656,7 +33660,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2765 i32.const 0 call $~lib/builtins/abort @@ -33669,7 +33673,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2766 i32.const 0 call $~lib/builtins/abort @@ -33682,7 +33686,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2767 i32.const 0 call $~lib/builtins/abort @@ -33695,7 +33699,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2768 i32.const 0 call $~lib/builtins/abort @@ -33708,7 +33712,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2769 i32.const 0 call $~lib/builtins/abort @@ -33721,7 +33725,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2770 i32.const 0 call $~lib/builtins/abort @@ -33734,7 +33738,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2771 i32.const 0 call $~lib/builtins/abort @@ -33747,7 +33751,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2772 i32.const 0 call $~lib/builtins/abort @@ -33760,7 +33764,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2773 i32.const 0 call $~lib/builtins/abort @@ -33773,7 +33777,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2774 i32.const 0 call $~lib/builtins/abort @@ -33786,7 +33790,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2775 i32.const 0 call $~lib/builtins/abort @@ -33799,7 +33803,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2776 i32.const 0 call $~lib/builtins/abort @@ -33812,7 +33816,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2777 i32.const 0 call $~lib/builtins/abort @@ -33825,7 +33829,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2778 i32.const 0 call $~lib/builtins/abort @@ -33838,7 +33842,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2779 i32.const 0 call $~lib/builtins/abort @@ -33851,7 +33855,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2780 i32.const 0 call $~lib/builtins/abort @@ -33864,7 +33868,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2781 i32.const 0 call $~lib/builtins/abort @@ -33877,7 +33881,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2782 i32.const 0 call $~lib/builtins/abort @@ -33890,7 +33894,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2783 i32.const 0 call $~lib/builtins/abort @@ -33903,7 +33907,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2784 i32.const 0 call $~lib/builtins/abort @@ -33916,7 +33920,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2785 i32.const 0 call $~lib/builtins/abort @@ -33929,7 +33933,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2786 i32.const 0 call $~lib/builtins/abort @@ -33942,7 +33946,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2787 i32.const 0 call $~lib/builtins/abort @@ -33955,7 +33959,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2788 i32.const 0 call $~lib/builtins/abort @@ -33968,7 +33972,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2789 i32.const 0 call $~lib/builtins/abort @@ -33981,7 +33985,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2790 i32.const 0 call $~lib/builtins/abort @@ -33994,7 +33998,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2791 i32.const 0 call $~lib/builtins/abort @@ -34007,7 +34011,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2792 i32.const 0 call $~lib/builtins/abort @@ -34020,7 +34024,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2793 i32.const 0 call $~lib/builtins/abort @@ -34033,7 +34037,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2794 i32.const 0 call $~lib/builtins/abort @@ -34046,7 +34050,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2795 i32.const 0 call $~lib/builtins/abort @@ -34059,7 +34063,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2796 i32.const 0 call $~lib/builtins/abort @@ -34072,7 +34076,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2797 i32.const 0 call $~lib/builtins/abort @@ -34085,7 +34089,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2798 i32.const 0 call $~lib/builtins/abort @@ -34098,7 +34102,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2799 i32.const 0 call $~lib/builtins/abort @@ -34111,7 +34115,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2800 i32.const 0 call $~lib/builtins/abort @@ -34124,7 +34128,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2801 i32.const 0 call $~lib/builtins/abort @@ -34137,7 +34141,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2802 i32.const 0 call $~lib/builtins/abort @@ -34150,7 +34154,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2803 i32.const 0 call $~lib/builtins/abort @@ -34163,7 +34167,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2804 i32.const 0 call $~lib/builtins/abort @@ -34176,7 +34180,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2805 i32.const 0 call $~lib/builtins/abort @@ -34189,7 +34193,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2806 i32.const 0 call $~lib/builtins/abort @@ -34202,7 +34206,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2807 i32.const 0 call $~lib/builtins/abort @@ -34215,7 +34219,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2808 i32.const 0 call $~lib/builtins/abort @@ -34228,7 +34232,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2809 i32.const 0 call $~lib/builtins/abort @@ -34241,7 +34245,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2810 i32.const 0 call $~lib/builtins/abort @@ -34254,7 +34258,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2811 i32.const 0 call $~lib/builtins/abort @@ -34267,7 +34271,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2812 i32.const 0 call $~lib/builtins/abort @@ -34280,7 +34284,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2813 i32.const 0 call $~lib/builtins/abort @@ -34293,7 +34297,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2814 i32.const 0 call $~lib/builtins/abort @@ -34306,7 +34310,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2815 i32.const 0 call $~lib/builtins/abort @@ -34319,7 +34323,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2816 i32.const 0 call $~lib/builtins/abort @@ -34332,7 +34336,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2825 i32.const 0 call $~lib/builtins/abort @@ -34345,7 +34349,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2826 i32.const 0 call $~lib/builtins/abort @@ -34358,7 +34362,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2827 i32.const 0 call $~lib/builtins/abort @@ -34371,7 +34375,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2828 i32.const 0 call $~lib/builtins/abort @@ -34384,7 +34388,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2829 i32.const 0 call $~lib/builtins/abort @@ -34397,7 +34401,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2830 i32.const 0 call $~lib/builtins/abort @@ -34410,7 +34414,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2831 i32.const 0 call $~lib/builtins/abort @@ -34423,7 +34427,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2832 i32.const 0 call $~lib/builtins/abort @@ -34436,7 +34440,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2833 i32.const 0 call $~lib/builtins/abort @@ -34449,7 +34453,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2834 i32.const 0 call $~lib/builtins/abort @@ -34462,7 +34466,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2837 i32.const 0 call $~lib/builtins/abort @@ -34475,7 +34479,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2838 i32.const 0 call $~lib/builtins/abort @@ -34488,7 +34492,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2839 i32.const 0 call $~lib/builtins/abort @@ -34501,7 +34505,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2840 i32.const 0 call $~lib/builtins/abort @@ -34514,7 +34518,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2841 i32.const 0 call $~lib/builtins/abort @@ -34527,7 +34531,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2842 i32.const 0 call $~lib/builtins/abort @@ -34540,7 +34544,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2843 i32.const 0 call $~lib/builtins/abort @@ -34553,7 +34557,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2844 i32.const 0 call $~lib/builtins/abort @@ -34566,7 +34570,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2845 i32.const 0 call $~lib/builtins/abort @@ -34579,7 +34583,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2846 i32.const 0 call $~lib/builtins/abort @@ -34592,7 +34596,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2847 i32.const 0 call $~lib/builtins/abort @@ -34605,7 +34609,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2848 i32.const 0 call $~lib/builtins/abort @@ -34618,7 +34622,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2849 i32.const 0 call $~lib/builtins/abort @@ -34631,7 +34635,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2850 i32.const 0 call $~lib/builtins/abort @@ -34644,7 +34648,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2851 i32.const 0 call $~lib/builtins/abort @@ -34657,7 +34661,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2852 i32.const 0 call $~lib/builtins/abort @@ -34670,7 +34674,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2853 i32.const 0 call $~lib/builtins/abort @@ -34683,7 +34687,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2854 i32.const 0 call $~lib/builtins/abort @@ -34696,7 +34700,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2855 i32.const 0 call $~lib/builtins/abort @@ -34709,7 +34713,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2856 i32.const 0 call $~lib/builtins/abort @@ -34722,7 +34726,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2857 i32.const 0 call $~lib/builtins/abort @@ -34735,7 +34739,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2858 i32.const 0 call $~lib/builtins/abort @@ -34748,7 +34752,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2859 i32.const 0 call $~lib/builtins/abort @@ -34761,7 +34765,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2860 i32.const 0 call $~lib/builtins/abort @@ -34774,7 +34778,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2861 i32.const 0 call $~lib/builtins/abort @@ -34787,7 +34791,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2862 i32.const 0 call $~lib/builtins/abort @@ -34800,7 +34804,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2863 i32.const 0 call $~lib/builtins/abort @@ -34813,7 +34817,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2864 i32.const 0 call $~lib/builtins/abort @@ -34826,7 +34830,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2865 i32.const 0 call $~lib/builtins/abort @@ -34839,7 +34843,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2866 i32.const 0 call $~lib/builtins/abort @@ -34852,7 +34856,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2867 i32.const 0 call $~lib/builtins/abort @@ -34865,7 +34869,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2868 i32.const 0 call $~lib/builtins/abort @@ -34878,7 +34882,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2869 i32.const 0 call $~lib/builtins/abort @@ -34891,7 +34895,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2870 i32.const 0 call $~lib/builtins/abort @@ -34904,7 +34908,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2871 i32.const 0 call $~lib/builtins/abort @@ -34917,7 +34921,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2872 i32.const 0 call $~lib/builtins/abort @@ -34930,7 +34934,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2873 i32.const 0 call $~lib/builtins/abort @@ -34943,7 +34947,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2874 i32.const 0 call $~lib/builtins/abort @@ -34956,7 +34960,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2875 i32.const 0 call $~lib/builtins/abort @@ -34969,7 +34973,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2876 i32.const 0 call $~lib/builtins/abort @@ -34982,7 +34986,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2877 i32.const 0 call $~lib/builtins/abort @@ -34995,7 +34999,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2878 i32.const 0 call $~lib/builtins/abort @@ -35008,7 +35012,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2879 i32.const 0 call $~lib/builtins/abort @@ -35021,7 +35025,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2880 i32.const 0 call $~lib/builtins/abort @@ -35034,7 +35038,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2881 i32.const 0 call $~lib/builtins/abort @@ -35047,7 +35051,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2882 i32.const 0 call $~lib/builtins/abort @@ -35060,7 +35064,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2883 i32.const 0 call $~lib/builtins/abort @@ -35073,7 +35077,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2884 i32.const 0 call $~lib/builtins/abort @@ -35086,7 +35090,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2885 i32.const 0 call $~lib/builtins/abort @@ -35099,7 +35103,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2886 i32.const 0 call $~lib/builtins/abort @@ -35112,7 +35116,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2887 i32.const 0 call $~lib/builtins/abort @@ -35125,7 +35129,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2888 i32.const 0 call $~lib/builtins/abort @@ -35138,7 +35142,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2889 i32.const 0 call $~lib/builtins/abort @@ -35151,7 +35155,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2890 i32.const 0 call $~lib/builtins/abort @@ -35164,7 +35168,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2891 i32.const 0 call $~lib/builtins/abort @@ -35177,7 +35181,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2892 i32.const 0 call $~lib/builtins/abort @@ -35190,7 +35194,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2893 i32.const 0 call $~lib/builtins/abort @@ -35203,7 +35207,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2894 i32.const 0 call $~lib/builtins/abort @@ -35216,7 +35220,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2895 i32.const 0 call $~lib/builtins/abort @@ -35229,7 +35233,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2896 i32.const 0 call $~lib/builtins/abort @@ -35242,7 +35246,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2897 i32.const 0 call $~lib/builtins/abort @@ -35255,7 +35259,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2898 i32.const 0 call $~lib/builtins/abort @@ -35268,7 +35272,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2899 i32.const 0 call $~lib/builtins/abort @@ -35281,7 +35285,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2900 i32.const 0 call $~lib/builtins/abort @@ -35294,7 +35298,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2901 i32.const 0 call $~lib/builtins/abort @@ -35307,7 +35311,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2902 i32.const 0 call $~lib/builtins/abort @@ -35320,7 +35324,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2903 i32.const 0 call $~lib/builtins/abort @@ -35333,7 +35337,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2941 i32.const 0 call $~lib/builtins/abort @@ -35346,7 +35350,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2942 i32.const 0 call $~lib/builtins/abort @@ -35359,7 +35363,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2943 i32.const 0 call $~lib/builtins/abort @@ -35372,7 +35376,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2944 i32.const 0 call $~lib/builtins/abort @@ -35385,7 +35389,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2945 i32.const 0 call $~lib/builtins/abort @@ -35398,7 +35402,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2946 i32.const 0 call $~lib/builtins/abort @@ -35411,7 +35415,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2947 i32.const 0 call $~lib/builtins/abort @@ -35424,7 +35428,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2948 i32.const 0 call $~lib/builtins/abort @@ -35437,7 +35441,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2949 i32.const 0 call $~lib/builtins/abort @@ -35450,7 +35454,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2950 i32.const 0 call $~lib/builtins/abort @@ -35463,7 +35467,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2953 i32.const 0 call $~lib/builtins/abort @@ -35476,7 +35480,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2954 i32.const 0 call $~lib/builtins/abort @@ -35489,7 +35493,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2955 i32.const 0 call $~lib/builtins/abort @@ -35502,7 +35506,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2956 i32.const 0 call $~lib/builtins/abort @@ -35515,7 +35519,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2957 i32.const 0 call $~lib/builtins/abort @@ -35528,7 +35532,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2960 i32.const 0 call $~lib/builtins/abort @@ -35541,7 +35545,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2961 i32.const 0 call $~lib/builtins/abort @@ -35554,7 +35558,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2962 i32.const 0 call $~lib/builtins/abort @@ -35567,7 +35571,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2963 i32.const 0 call $~lib/builtins/abort @@ -35580,7 +35584,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2964 i32.const 0 call $~lib/builtins/abort @@ -35593,7 +35597,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2965 i32.const 0 call $~lib/builtins/abort @@ -35606,7 +35610,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2966 i32.const 0 call $~lib/builtins/abort @@ -35619,7 +35623,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2967 i32.const 0 call $~lib/builtins/abort @@ -35632,7 +35636,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2968 i32.const 0 call $~lib/builtins/abort @@ -35645,7 +35649,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2969 i32.const 0 call $~lib/builtins/abort @@ -35658,7 +35662,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2970 i32.const 0 call $~lib/builtins/abort @@ -35671,7 +35675,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2971 i32.const 0 call $~lib/builtins/abort @@ -35684,7 +35688,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2972 i32.const 0 call $~lib/builtins/abort @@ -35697,7 +35701,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2973 i32.const 0 call $~lib/builtins/abort @@ -35710,7 +35714,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2974 i32.const 0 call $~lib/builtins/abort @@ -35723,7 +35727,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2975 i32.const 0 call $~lib/builtins/abort @@ -35736,7 +35740,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2976 i32.const 0 call $~lib/builtins/abort @@ -35749,7 +35753,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2977 i32.const 0 call $~lib/builtins/abort @@ -35762,7 +35766,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2978 i32.const 0 call $~lib/builtins/abort @@ -35775,7 +35779,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2979 i32.const 0 call $~lib/builtins/abort @@ -35788,7 +35792,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2980 i32.const 0 call $~lib/builtins/abort @@ -35801,7 +35805,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2981 i32.const 0 call $~lib/builtins/abort @@ -35814,7 +35818,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2982 i32.const 0 call $~lib/builtins/abort @@ -35827,7 +35831,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2983 i32.const 0 call $~lib/builtins/abort @@ -35840,7 +35844,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2984 i32.const 0 call $~lib/builtins/abort @@ -35853,7 +35857,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2985 i32.const 0 call $~lib/builtins/abort @@ -35866,7 +35870,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2986 i32.const 0 call $~lib/builtins/abort @@ -35879,7 +35883,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2987 i32.const 0 call $~lib/builtins/abort @@ -35892,7 +35896,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2988 i32.const 0 call $~lib/builtins/abort @@ -35905,7 +35909,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2989 i32.const 0 call $~lib/builtins/abort @@ -35918,7 +35922,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2990 i32.const 0 call $~lib/builtins/abort @@ -35931,7 +35935,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2991 i32.const 0 call $~lib/builtins/abort @@ -35944,7 +35948,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2992 i32.const 0 call $~lib/builtins/abort @@ -35957,7 +35961,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2993 i32.const 0 call $~lib/builtins/abort @@ -35970,7 +35974,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2994 i32.const 0 call $~lib/builtins/abort @@ -35983,7 +35987,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2995 i32.const 0 call $~lib/builtins/abort @@ -35996,7 +36000,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2996 i32.const 0 call $~lib/builtins/abort @@ -36009,7 +36013,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2997 i32.const 0 call $~lib/builtins/abort @@ -36022,7 +36026,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3000 i32.const 0 call $~lib/builtins/abort @@ -36035,7 +36039,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3001 i32.const 0 call $~lib/builtins/abort @@ -36048,7 +36052,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3002 i32.const 0 call $~lib/builtins/abort @@ -36061,7 +36065,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3003 i32.const 0 call $~lib/builtins/abort @@ -36074,7 +36078,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3004 i32.const 0 call $~lib/builtins/abort @@ -36087,7 +36091,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3005 i32.const 0 call $~lib/builtins/abort @@ -36100,7 +36104,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3006 i32.const 0 call $~lib/builtins/abort @@ -36113,7 +36117,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3007 i32.const 0 call $~lib/builtins/abort @@ -36126,7 +36130,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3008 i32.const 0 call $~lib/builtins/abort @@ -36139,7 +36143,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3009 i32.const 0 call $~lib/builtins/abort @@ -36152,7 +36156,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3010 i32.const 0 call $~lib/builtins/abort @@ -36165,7 +36169,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3011 i32.const 0 call $~lib/builtins/abort @@ -36178,7 +36182,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3012 i32.const 0 call $~lib/builtins/abort @@ -36191,7 +36195,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3013 i32.const 0 call $~lib/builtins/abort @@ -36204,7 +36208,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3025 i32.const 0 call $~lib/builtins/abort @@ -36217,7 +36221,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3026 i32.const 0 call $~lib/builtins/abort @@ -36230,7 +36234,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3027 i32.const 0 call $~lib/builtins/abort @@ -36243,7 +36247,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3028 i32.const 0 call $~lib/builtins/abort @@ -36256,7 +36260,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3029 i32.const 0 call $~lib/builtins/abort @@ -36269,7 +36273,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3030 i32.const 0 call $~lib/builtins/abort @@ -36282,7 +36286,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3031 i32.const 0 call $~lib/builtins/abort @@ -36295,7 +36299,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3032 i32.const 0 call $~lib/builtins/abort @@ -36308,7 +36312,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3033 i32.const 0 call $~lib/builtins/abort @@ -36321,7 +36325,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3034 i32.const 0 call $~lib/builtins/abort @@ -36334,7 +36338,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3037 i32.const 0 call $~lib/builtins/abort @@ -36347,7 +36351,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3038 i32.const 0 call $~lib/builtins/abort @@ -36360,7 +36364,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3039 i32.const 0 call $~lib/builtins/abort @@ -36373,7 +36377,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3040 i32.const 0 call $~lib/builtins/abort @@ -36386,7 +36390,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3041 i32.const 0 call $~lib/builtins/abort @@ -36399,7 +36403,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3050 i32.const 0 call $~lib/builtins/abort @@ -36412,7 +36416,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3051 i32.const 0 call $~lib/builtins/abort @@ -36425,7 +36429,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3052 i32.const 0 call $~lib/builtins/abort @@ -36438,7 +36442,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3053 i32.const 0 call $~lib/builtins/abort @@ -36451,7 +36455,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3054 i32.const 0 call $~lib/builtins/abort @@ -36464,7 +36468,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3055 i32.const 0 call $~lib/builtins/abort @@ -36477,7 +36481,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3056 i32.const 0 call $~lib/builtins/abort @@ -36490,7 +36494,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3057 i32.const 0 call $~lib/builtins/abort @@ -36503,7 +36507,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3058 i32.const 0 call $~lib/builtins/abort @@ -36516,7 +36520,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3059 i32.const 0 call $~lib/builtins/abort @@ -36529,7 +36533,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3062 i32.const 0 call $~lib/builtins/abort @@ -36542,7 +36546,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3063 i32.const 0 call $~lib/builtins/abort @@ -36555,7 +36559,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3064 i32.const 0 call $~lib/builtins/abort @@ -36568,7 +36572,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3065 i32.const 0 call $~lib/builtins/abort @@ -36581,7 +36585,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3066 i32.const 0 call $~lib/builtins/abort @@ -36594,7 +36598,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3078 i32.const 0 call $~lib/builtins/abort @@ -36607,7 +36611,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3079 i32.const 0 call $~lib/builtins/abort @@ -36620,7 +36624,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3080 i32.const 0 call $~lib/builtins/abort @@ -36633,7 +36637,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3081 i32.const 0 call $~lib/builtins/abort @@ -36646,7 +36650,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3082 i32.const 0 call $~lib/builtins/abort @@ -36659,7 +36663,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3083 i32.const 0 call $~lib/builtins/abort @@ -36672,7 +36676,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3084 i32.const 0 call $~lib/builtins/abort @@ -36685,7 +36689,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3085 i32.const 0 call $~lib/builtins/abort @@ -36698,7 +36702,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3086 i32.const 0 call $~lib/builtins/abort @@ -36711,7 +36715,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3087 i32.const 0 call $~lib/builtins/abort @@ -36724,7 +36728,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3090 i32.const 0 call $~lib/builtins/abort @@ -36737,7 +36741,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3091 i32.const 0 call $~lib/builtins/abort @@ -36750,7 +36754,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3092 i32.const 0 call $~lib/builtins/abort @@ -36763,7 +36767,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3093 i32.const 0 call $~lib/builtins/abort @@ -36776,7 +36780,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3094 i32.const 0 call $~lib/builtins/abort @@ -36789,7 +36793,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3095 i32.const 0 call $~lib/builtins/abort @@ -36802,7 +36806,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3096 i32.const 0 call $~lib/builtins/abort @@ -36815,7 +36819,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3097 i32.const 0 call $~lib/builtins/abort @@ -36828,7 +36832,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3098 i32.const 0 call $~lib/builtins/abort @@ -36841,7 +36845,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3099 i32.const 0 call $~lib/builtins/abort @@ -36854,7 +36858,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3100 i32.const 0 call $~lib/builtins/abort @@ -36867,7 +36871,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3101 i32.const 0 call $~lib/builtins/abort @@ -36880,7 +36884,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3102 i32.const 0 call $~lib/builtins/abort @@ -36893,7 +36897,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3103 i32.const 0 call $~lib/builtins/abort @@ -36906,7 +36910,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3104 i32.const 0 call $~lib/builtins/abort @@ -36919,7 +36923,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3105 i32.const 0 call $~lib/builtins/abort @@ -36932,7 +36936,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3106 i32.const 0 call $~lib/builtins/abort @@ -36945,7 +36949,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3107 i32.const 0 call $~lib/builtins/abort @@ -36958,7 +36962,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3108 i32.const 0 call $~lib/builtins/abort @@ -36971,7 +36975,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3109 i32.const 0 call $~lib/builtins/abort @@ -36984,7 +36988,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3110 i32.const 0 call $~lib/builtins/abort @@ -36997,7 +37001,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3111 i32.const 0 call $~lib/builtins/abort @@ -37010,7 +37014,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3112 i32.const 0 call $~lib/builtins/abort @@ -37023,7 +37027,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3113 i32.const 0 call $~lib/builtins/abort @@ -37036,7 +37040,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3114 i32.const 0 call $~lib/builtins/abort @@ -37049,7 +37053,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3115 i32.const 0 call $~lib/builtins/abort @@ -37062,7 +37066,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3116 i32.const 0 call $~lib/builtins/abort @@ -37075,7 +37079,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3117 i32.const 0 call $~lib/builtins/abort @@ -37088,7 +37092,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3118 i32.const 0 call $~lib/builtins/abort @@ -37101,7 +37105,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3119 i32.const 0 call $~lib/builtins/abort @@ -37114,7 +37118,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3120 i32.const 0 call $~lib/builtins/abort @@ -37127,7 +37131,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3121 i32.const 0 call $~lib/builtins/abort @@ -37140,7 +37144,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3122 i32.const 0 call $~lib/builtins/abort @@ -37153,7 +37157,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3123 i32.const 0 call $~lib/builtins/abort @@ -37166,7 +37170,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3124 i32.const 0 call $~lib/builtins/abort @@ -37179,7 +37183,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3125 i32.const 0 call $~lib/builtins/abort @@ -37192,7 +37196,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3126 i32.const 0 call $~lib/builtins/abort @@ -37205,7 +37209,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3127 i32.const 0 call $~lib/builtins/abort @@ -37218,7 +37222,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3128 i32.const 0 call $~lib/builtins/abort @@ -37231,7 +37235,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3129 i32.const 0 call $~lib/builtins/abort @@ -37244,7 +37248,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3130 i32.const 0 call $~lib/builtins/abort @@ -37257,7 +37261,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3131 i32.const 0 call $~lib/builtins/abort @@ -37270,7 +37274,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3132 i32.const 0 call $~lib/builtins/abort @@ -37283,7 +37287,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3133 i32.const 0 call $~lib/builtins/abort @@ -37296,7 +37300,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3134 i32.const 0 call $~lib/builtins/abort @@ -37309,7 +37313,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3135 i32.const 0 call $~lib/builtins/abort @@ -37322,7 +37326,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3136 i32.const 0 call $~lib/builtins/abort @@ -37335,7 +37339,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3137 i32.const 0 call $~lib/builtins/abort @@ -37348,7 +37352,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3138 i32.const 0 call $~lib/builtins/abort @@ -37361,7 +37365,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3139 i32.const 0 call $~lib/builtins/abort @@ -37374,7 +37378,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3140 i32.const 0 call $~lib/builtins/abort @@ -37387,7 +37391,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3141 i32.const 0 call $~lib/builtins/abort @@ -37400,7 +37404,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3142 i32.const 0 call $~lib/builtins/abort @@ -37413,7 +37417,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3143 i32.const 0 call $~lib/builtins/abort @@ -37426,7 +37430,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3144 i32.const 0 call $~lib/builtins/abort @@ -37439,7 +37443,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3145 i32.const 0 call $~lib/builtins/abort @@ -37452,7 +37456,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3146 i32.const 0 call $~lib/builtins/abort @@ -37465,7 +37469,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3147 i32.const 0 call $~lib/builtins/abort @@ -37478,7 +37482,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3148 i32.const 0 call $~lib/builtins/abort @@ -37491,7 +37495,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3149 i32.const 0 call $~lib/builtins/abort @@ -37504,7 +37508,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3150 i32.const 0 call $~lib/builtins/abort @@ -37517,7 +37521,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3151 i32.const 0 call $~lib/builtins/abort @@ -37530,7 +37534,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3152 i32.const 0 call $~lib/builtins/abort @@ -37543,7 +37547,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3153 i32.const 0 call $~lib/builtins/abort @@ -37556,7 +37560,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3154 i32.const 0 call $~lib/builtins/abort @@ -37569,7 +37573,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3155 i32.const 0 call $~lib/builtins/abort @@ -37582,7 +37586,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3156 i32.const 0 call $~lib/builtins/abort @@ -37595,7 +37599,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3157 i32.const 0 call $~lib/builtins/abort @@ -37608,7 +37612,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3158 i32.const 0 call $~lib/builtins/abort @@ -37621,7 +37625,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3159 i32.const 0 call $~lib/builtins/abort @@ -37634,7 +37638,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3160 i32.const 0 call $~lib/builtins/abort @@ -37647,7 +37651,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3161 i32.const 0 call $~lib/builtins/abort @@ -37660,7 +37664,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3162 i32.const 0 call $~lib/builtins/abort @@ -37673,7 +37677,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3163 i32.const 0 call $~lib/builtins/abort @@ -37686,7 +37690,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3172 i32.const 0 call $~lib/builtins/abort @@ -37699,7 +37703,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3173 i32.const 0 call $~lib/builtins/abort @@ -37712,7 +37716,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3174 i32.const 0 call $~lib/builtins/abort @@ -37725,7 +37729,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3175 i32.const 0 call $~lib/builtins/abort @@ -37738,7 +37742,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3176 i32.const 0 call $~lib/builtins/abort @@ -37751,7 +37755,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3177 i32.const 0 call $~lib/builtins/abort @@ -37764,7 +37768,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3178 i32.const 0 call $~lib/builtins/abort @@ -37777,7 +37781,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3179 i32.const 0 call $~lib/builtins/abort @@ -37790,7 +37794,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3180 i32.const 0 call $~lib/builtins/abort @@ -37803,7 +37807,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3181 i32.const 0 call $~lib/builtins/abort @@ -37816,7 +37820,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3184 i32.const 0 call $~lib/builtins/abort @@ -37829,7 +37833,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3185 i32.const 0 call $~lib/builtins/abort @@ -37842,7 +37846,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3186 i32.const 0 call $~lib/builtins/abort @@ -37855,7 +37859,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3187 i32.const 0 call $~lib/builtins/abort @@ -37868,7 +37872,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3188 i32.const 0 call $~lib/builtins/abort @@ -37881,7 +37885,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3189 i32.const 0 call $~lib/builtins/abort @@ -37894,7 +37898,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3190 i32.const 0 call $~lib/builtins/abort @@ -37907,7 +37911,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3191 i32.const 0 call $~lib/builtins/abort @@ -37920,7 +37924,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3192 i32.const 0 call $~lib/builtins/abort @@ -37933,7 +37937,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3193 i32.const 0 call $~lib/builtins/abort @@ -37946,7 +37950,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3194 i32.const 0 call $~lib/builtins/abort @@ -37959,7 +37963,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3195 i32.const 0 call $~lib/builtins/abort @@ -37972,7 +37976,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3196 i32.const 0 call $~lib/builtins/abort @@ -37985,7 +37989,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3197 i32.const 0 call $~lib/builtins/abort @@ -37998,7 +38002,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3198 i32.const 0 call $~lib/builtins/abort @@ -38011,7 +38015,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3199 i32.const 0 call $~lib/builtins/abort @@ -38024,7 +38028,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3200 i32.const 0 call $~lib/builtins/abort @@ -38037,7 +38041,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3201 i32.const 0 call $~lib/builtins/abort @@ -38050,7 +38054,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3202 i32.const 0 call $~lib/builtins/abort @@ -38063,7 +38067,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3203 i32.const 0 call $~lib/builtins/abort @@ -38076,7 +38080,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3204 i32.const 0 call $~lib/builtins/abort @@ -38089,7 +38093,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3205 i32.const 0 call $~lib/builtins/abort @@ -38102,7 +38106,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3243 i32.const 0 call $~lib/builtins/abort @@ -38115,7 +38119,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3244 i32.const 0 call $~lib/builtins/abort @@ -38128,7 +38132,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3245 i32.const 0 call $~lib/builtins/abort @@ -38141,7 +38145,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3246 i32.const 0 call $~lib/builtins/abort @@ -38154,7 +38158,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3247 i32.const 0 call $~lib/builtins/abort @@ -38167,7 +38171,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3248 i32.const 0 call $~lib/builtins/abort @@ -38180,7 +38184,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3249 i32.const 0 call $~lib/builtins/abort @@ -38193,7 +38197,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3250 i32.const 0 call $~lib/builtins/abort @@ -38206,7 +38210,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3251 i32.const 0 call $~lib/builtins/abort @@ -38219,7 +38223,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3252 i32.const 0 call $~lib/builtins/abort @@ -38232,7 +38236,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3255 i32.const 0 call $~lib/builtins/abort @@ -38245,7 +38249,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3256 i32.const 0 call $~lib/builtins/abort @@ -38258,7 +38262,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3257 i32.const 0 call $~lib/builtins/abort @@ -38271,7 +38275,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3258 i32.const 0 call $~lib/builtins/abort @@ -38284,7 +38288,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3259 i32.const 0 call $~lib/builtins/abort @@ -38297,7 +38301,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3262 i32.const 0 call $~lib/builtins/abort @@ -38310,7 +38314,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3263 i32.const 0 call $~lib/builtins/abort @@ -38323,7 +38327,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3264 i32.const 0 call $~lib/builtins/abort @@ -38336,7 +38340,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3265 i32.const 0 call $~lib/builtins/abort @@ -38349,7 +38353,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3266 i32.const 0 call $~lib/builtins/abort @@ -38362,7 +38366,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3267 i32.const 0 call $~lib/builtins/abort @@ -38375,7 +38379,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3268 i32.const 0 call $~lib/builtins/abort @@ -38388,7 +38392,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3269 i32.const 0 call $~lib/builtins/abort @@ -38401,7 +38405,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3270 i32.const 0 call $~lib/builtins/abort @@ -38414,7 +38418,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3271 i32.const 0 call $~lib/builtins/abort @@ -38427,7 +38431,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3272 i32.const 0 call $~lib/builtins/abort @@ -38440,7 +38444,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3273 i32.const 0 call $~lib/builtins/abort @@ -38453,7 +38457,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3274 i32.const 0 call $~lib/builtins/abort @@ -38466,7 +38470,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3275 i32.const 0 call $~lib/builtins/abort @@ -38479,7 +38483,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3276 i32.const 0 call $~lib/builtins/abort @@ -38492,7 +38496,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3277 i32.const 0 call $~lib/builtins/abort @@ -38505,7 +38509,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3278 i32.const 0 call $~lib/builtins/abort @@ -38518,7 +38522,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3279 i32.const 0 call $~lib/builtins/abort @@ -38531,7 +38535,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3280 i32.const 0 call $~lib/builtins/abort @@ -38544,7 +38548,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3281 i32.const 0 call $~lib/builtins/abort @@ -38557,7 +38561,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3282 i32.const 0 call $~lib/builtins/abort @@ -38570,7 +38574,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3283 i32.const 0 call $~lib/builtins/abort @@ -38583,7 +38587,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3284 i32.const 0 call $~lib/builtins/abort @@ -38596,7 +38600,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3285 i32.const 0 call $~lib/builtins/abort @@ -38609,7 +38613,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3286 i32.const 0 call $~lib/builtins/abort @@ -38622,7 +38626,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3287 i32.const 0 call $~lib/builtins/abort @@ -38635,7 +38639,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3288 i32.const 0 call $~lib/builtins/abort @@ -38648,7 +38652,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3289 i32.const 0 call $~lib/builtins/abort @@ -38661,7 +38665,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3290 i32.const 0 call $~lib/builtins/abort @@ -38674,7 +38678,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3291 i32.const 0 call $~lib/builtins/abort @@ -38687,7 +38691,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3292 i32.const 0 call $~lib/builtins/abort @@ -38700,7 +38704,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3293 i32.const 0 call $~lib/builtins/abort @@ -38713,7 +38717,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3294 i32.const 0 call $~lib/builtins/abort @@ -38726,7 +38730,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3295 i32.const 0 call $~lib/builtins/abort @@ -38739,7 +38743,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3296 i32.const 0 call $~lib/builtins/abort @@ -38752,7 +38756,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3297 i32.const 0 call $~lib/builtins/abort @@ -38765,7 +38769,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3309 i32.const 0 call $~lib/builtins/abort @@ -38778,7 +38782,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3310 i32.const 0 call $~lib/builtins/abort @@ -38791,7 +38795,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3311 i32.const 0 call $~lib/builtins/abort @@ -38804,7 +38808,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3312 i32.const 0 call $~lib/builtins/abort @@ -38817,7 +38821,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3313 i32.const 0 call $~lib/builtins/abort @@ -38830,7 +38834,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3314 i32.const 0 call $~lib/builtins/abort @@ -38843,7 +38847,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3315 i32.const 0 call $~lib/builtins/abort @@ -38856,7 +38860,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3316 i32.const 0 call $~lib/builtins/abort @@ -38869,7 +38873,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3317 i32.const 0 call $~lib/builtins/abort @@ -38882,7 +38886,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3318 i32.const 0 call $~lib/builtins/abort @@ -38895,7 +38899,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3321 i32.const 0 call $~lib/builtins/abort @@ -38908,7 +38912,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3322 i32.const 0 call $~lib/builtins/abort @@ -38921,7 +38925,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3323 i32.const 0 call $~lib/builtins/abort @@ -38934,7 +38938,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3324 i32.const 0 call $~lib/builtins/abort @@ -38947,7 +38951,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3325 i32.const 0 call $~lib/builtins/abort @@ -38960,7 +38964,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3334 i32.const 0 call $~lib/builtins/abort @@ -38973,7 +38977,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3335 i32.const 0 call $~lib/builtins/abort @@ -38986,7 +38990,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3336 i32.const 0 call $~lib/builtins/abort @@ -38999,7 +39003,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3337 i32.const 0 call $~lib/builtins/abort @@ -39012,7 +39016,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3338 i32.const 0 call $~lib/builtins/abort @@ -39025,7 +39029,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3339 i32.const 0 call $~lib/builtins/abort @@ -39038,7 +39042,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3340 i32.const 0 call $~lib/builtins/abort @@ -39051,7 +39055,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3341 i32.const 0 call $~lib/builtins/abort @@ -39064,7 +39068,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3342 i32.const 0 call $~lib/builtins/abort @@ -39077,7 +39081,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3343 i32.const 0 call $~lib/builtins/abort @@ -39090,7 +39094,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3346 i32.const 0 call $~lib/builtins/abort @@ -39103,7 +39107,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3347 i32.const 0 call $~lib/builtins/abort @@ -39116,7 +39120,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3348 i32.const 0 call $~lib/builtins/abort @@ -39129,7 +39133,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3349 i32.const 0 call $~lib/builtins/abort @@ -39142,7 +39146,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3350 i32.const 0 call $~lib/builtins/abort @@ -39154,7 +39158,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3362 i32.const 0 call $~lib/builtins/abort @@ -39166,7 +39170,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3363 i32.const 0 call $~lib/builtins/abort @@ -39178,7 +39182,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3364 i32.const 0 call $~lib/builtins/abort @@ -39190,7 +39194,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3365 i32.const 0 call $~lib/builtins/abort @@ -39202,7 +39206,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3366 i32.const 0 call $~lib/builtins/abort @@ -39214,7 +39218,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3367 i32.const 0 call $~lib/builtins/abort @@ -39226,7 +39230,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3368 i32.const 0 call $~lib/builtins/abort @@ -39238,7 +39242,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3369 i32.const 0 call $~lib/builtins/abort @@ -39250,7 +39254,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3370 i32.const 0 call $~lib/builtins/abort @@ -39262,7 +39266,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3371 i32.const 0 call $~lib/builtins/abort @@ -39274,7 +39278,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3374 i32.const 0 call $~lib/builtins/abort @@ -39286,7 +39290,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3375 i32.const 0 call $~lib/builtins/abort @@ -39298,7 +39302,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3376 i32.const 0 call $~lib/builtins/abort @@ -39310,7 +39314,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3377 i32.const 0 call $~lib/builtins/abort @@ -39322,7 +39326,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3378 i32.const 0 call $~lib/builtins/abort @@ -39334,7 +39338,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3379 i32.const 0 call $~lib/builtins/abort @@ -39346,7 +39350,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3380 i32.const 0 call $~lib/builtins/abort @@ -39358,7 +39362,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3381 i32.const 0 call $~lib/builtins/abort @@ -39370,7 +39374,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3382 i32.const 0 call $~lib/builtins/abort @@ -39382,7 +39386,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3383 i32.const 0 call $~lib/builtins/abort @@ -39394,7 +39398,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3384 i32.const 0 call $~lib/builtins/abort @@ -39406,7 +39410,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3385 i32.const 0 call $~lib/builtins/abort @@ -39418,7 +39422,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3386 i32.const 0 call $~lib/builtins/abort @@ -39430,7 +39434,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3387 i32.const 0 call $~lib/builtins/abort @@ -39442,7 +39446,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3388 i32.const 0 call $~lib/builtins/abort @@ -39454,7 +39458,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3397 i32.const 0 call $~lib/builtins/abort @@ -39466,7 +39470,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3398 i32.const 0 call $~lib/builtins/abort @@ -39478,7 +39482,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3399 i32.const 0 call $~lib/builtins/abort @@ -39490,7 +39494,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3400 i32.const 0 call $~lib/builtins/abort @@ -39502,7 +39506,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3401 i32.const 0 call $~lib/builtins/abort @@ -39514,7 +39518,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3402 i32.const 0 call $~lib/builtins/abort @@ -39526,7 +39530,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3403 i32.const 0 call $~lib/builtins/abort @@ -39538,7 +39542,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3404 i32.const 0 call $~lib/builtins/abort @@ -39550,7 +39554,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3405 i32.const 0 call $~lib/builtins/abort @@ -39562,7 +39566,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3406 i32.const 0 call $~lib/builtins/abort @@ -39574,7 +39578,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3409 i32.const 0 call $~lib/builtins/abort @@ -39586,7 +39590,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3410 i32.const 0 call $~lib/builtins/abort @@ -39598,7 +39602,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3411 i32.const 0 call $~lib/builtins/abort @@ -39610,7 +39614,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3412 i32.const 0 call $~lib/builtins/abort @@ -39622,7 +39626,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3413 i32.const 0 call $~lib/builtins/abort @@ -39634,7 +39638,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3414 i32.const 0 call $~lib/builtins/abort @@ -39646,7 +39650,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3415 i32.const 0 call $~lib/builtins/abort @@ -39658,7 +39662,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3416 i32.const 0 call $~lib/builtins/abort @@ -39670,7 +39674,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3417 i32.const 0 call $~lib/builtins/abort @@ -39682,7 +39686,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3418 i32.const 0 call $~lib/builtins/abort @@ -39694,7 +39698,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3419 i32.const 0 call $~lib/builtins/abort @@ -39706,7 +39710,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3420 i32.const 0 call $~lib/builtins/abort @@ -39718,7 +39722,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3421 i32.const 0 call $~lib/builtins/abort @@ -39730,7 +39734,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3422 i32.const 0 call $~lib/builtins/abort @@ -39742,7 +39746,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3423 i32.const 0 call $~lib/builtins/abort @@ -39755,7 +39759,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3427 i32.const 0 call $~lib/builtins/abort @@ -39768,7 +39772,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3428 i32.const 0 call $~lib/builtins/abort @@ -39781,7 +39785,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3429 i32.const 0 call $~lib/builtins/abort @@ -39794,7 +39798,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3430 i32.const 0 call $~lib/builtins/abort @@ -39807,7 +39811,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3431 i32.const 0 call $~lib/builtins/abort @@ -39820,7 +39824,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3432 i32.const 0 call $~lib/builtins/abort @@ -39833,7 +39837,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3433 i32.const 0 call $~lib/builtins/abort @@ -39846,7 +39850,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3434 i32.const 0 call $~lib/builtins/abort @@ -39859,7 +39863,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3435 i32.const 0 call $~lib/builtins/abort @@ -39872,7 +39876,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3436 i32.const 0 call $~lib/builtins/abort @@ -39885,7 +39889,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3437 i32.const 0 call $~lib/builtins/abort @@ -39898,7 +39902,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3438 i32.const 0 call $~lib/builtins/abort @@ -39910,7 +39914,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3442 i32.const 0 call $~lib/builtins/abort @@ -39922,7 +39926,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3443 i32.const 0 call $~lib/builtins/abort @@ -39934,7 +39938,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3444 i32.const 0 call $~lib/builtins/abort @@ -39946,7 +39950,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3445 i32.const 0 call $~lib/builtins/abort @@ -39958,7 +39962,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3446 i32.const 0 call $~lib/builtins/abort @@ -39970,7 +39974,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3447 i32.const 0 call $~lib/builtins/abort @@ -39982,7 +39986,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3448 i32.const 0 call $~lib/builtins/abort @@ -39994,7 +39998,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3449 i32.const 0 call $~lib/builtins/abort @@ -40006,7 +40010,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3450 i32.const 0 call $~lib/builtins/abort @@ -40018,7 +40022,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3451 i32.const 0 call $~lib/builtins/abort @@ -40030,7 +40034,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3452 i32.const 0 call $~lib/builtins/abort @@ -40042,7 +40046,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3453 i32.const 0 call $~lib/builtins/abort @@ -40054,7 +40058,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3454 i32.const 0 call $~lib/builtins/abort @@ -40066,7 +40070,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3455 i32.const 0 call $~lib/builtins/abort @@ -40078,7 +40082,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3456 i32.const 0 call $~lib/builtins/abort @@ -40090,7 +40094,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3457 i32.const 0 call $~lib/builtins/abort @@ -40103,7 +40107,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3461 i32.const 0 call $~lib/builtins/abort @@ -40116,7 +40120,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3462 i32.const 0 call $~lib/builtins/abort @@ -40129,7 +40133,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3463 i32.const 0 call $~lib/builtins/abort @@ -40142,7 +40146,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3464 i32.const 0 call $~lib/builtins/abort @@ -40155,7 +40159,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3466 i32.const 0 call $~lib/builtins/abort @@ -40168,7 +40172,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3467 i32.const 0 call $~lib/builtins/abort @@ -40181,7 +40185,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3468 i32.const 0 call $~lib/builtins/abort @@ -40194,7 +40198,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3469 i32.const 0 call $~lib/builtins/abort @@ -40207,7 +40211,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3471 i32.const 0 call $~lib/builtins/abort @@ -40220,7 +40224,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3472 i32.const 0 call $~lib/builtins/abort @@ -40233,7 +40237,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3473 i32.const 0 call $~lib/builtins/abort @@ -40246,7 +40250,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3474 i32.const 0 call $~lib/builtins/abort @@ -40259,7 +40263,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3476 i32.const 0 call $~lib/builtins/abort @@ -40272,7 +40276,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3477 i32.const 0 call $~lib/builtins/abort @@ -40285,7 +40289,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3478 i32.const 0 call $~lib/builtins/abort @@ -40298,7 +40302,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3479 i32.const 0 call $~lib/builtins/abort @@ -40311,7 +40315,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3481 i32.const 0 call $~lib/builtins/abort @@ -40324,7 +40328,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3482 i32.const 0 call $~lib/builtins/abort @@ -40337,7 +40341,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3483 i32.const 0 call $~lib/builtins/abort @@ -40350,7 +40354,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3484 i32.const 0 call $~lib/builtins/abort @@ -40363,7 +40367,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3486 i32.const 0 call $~lib/builtins/abort @@ -40376,7 +40380,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3487 i32.const 0 call $~lib/builtins/abort @@ -40389,7 +40393,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3488 i32.const 0 call $~lib/builtins/abort @@ -40402,7 +40406,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3489 i32.const 0 call $~lib/builtins/abort @@ -40415,7 +40419,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3490 i32.const 0 call $~lib/builtins/abort @@ -40428,7 +40432,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3491 i32.const 0 call $~lib/builtins/abort @@ -40441,7 +40445,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3492 i32.const 0 call $~lib/builtins/abort @@ -40458,7 +40462,7 @@ i64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3494 i32.const 0 call $~lib/builtins/abort @@ -40471,7 +40475,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3498 i32.const 0 call $~lib/builtins/abort @@ -40484,7 +40488,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3499 i32.const 0 call $~lib/builtins/abort @@ -40498,7 +40502,7 @@ f32.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3500 i32.const 0 call $~lib/builtins/abort @@ -40512,7 +40516,7 @@ f32.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3501 i32.const 0 call $~lib/builtins/abort @@ -40526,7 +40530,7 @@ f32.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3502 i32.const 0 call $~lib/builtins/abort @@ -40539,7 +40543,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3503 i32.const 0 call $~lib/builtins/abort @@ -40552,7 +40556,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3504 i32.const 0 call $~lib/builtins/abort @@ -40565,7 +40569,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3505 i32.const 0 call $~lib/builtins/abort @@ -40578,7 +40582,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3506 i32.const 0 call $~lib/builtins/abort @@ -40591,7 +40595,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3507 i32.const 0 call $~lib/builtins/abort @@ -40604,7 +40608,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3508 i32.const 0 call $~lib/builtins/abort @@ -40617,7 +40621,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3509 i32.const 0 call $~lib/builtins/abort @@ -40630,7 +40634,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3510 i32.const 0 call $~lib/builtins/abort @@ -40643,7 +40647,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3511 i32.const 0 call $~lib/builtins/abort @@ -40656,7 +40660,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3512 i32.const 0 call $~lib/builtins/abort @@ -40669,7 +40673,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3513 i32.const 0 call $~lib/builtins/abort @@ -40682,7 +40686,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3517 i32.const 0 call $~lib/builtins/abort @@ -40695,7 +40699,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3518 i32.const 0 call $~lib/builtins/abort @@ -40709,7 +40713,7 @@ f64.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3519 i32.const 0 call $~lib/builtins/abort @@ -40723,7 +40727,7 @@ f64.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3520 i32.const 0 call $~lib/builtins/abort @@ -40737,7 +40741,7 @@ f64.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3521 i32.const 0 call $~lib/builtins/abort @@ -40750,7 +40754,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3522 i32.const 0 call $~lib/builtins/abort @@ -40763,7 +40767,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3523 i32.const 0 call $~lib/builtins/abort @@ -40776,7 +40780,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3524 i32.const 0 call $~lib/builtins/abort @@ -40789,7 +40793,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3525 i32.const 0 call $~lib/builtins/abort @@ -40802,7 +40806,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3526 i32.const 0 call $~lib/builtins/abort @@ -40815,7 +40819,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3527 i32.const 0 call $~lib/builtins/abort @@ -40828,7 +40832,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3528 i32.const 0 call $~lib/builtins/abort @@ -40841,7 +40845,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3529 i32.const 0 call $~lib/builtins/abort @@ -40854,7 +40858,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3530 i32.const 0 call $~lib/builtins/abort @@ -40867,7 +40871,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3531 i32.const 0 call $~lib/builtins/abort @@ -40880,7 +40884,7 @@ f64.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3532 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index cc7d80b249..767383e8d3 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -62,10 +62,10 @@ (import "Math" "tanh" (func $~lib/bindings/Math/tanh (param f64) (result f64))) (import "Math" "trunc" (func $~lib/bindings/Math/trunc (param f64) (result f64))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\16\00\00\00s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s\00") - (data (i32.const 40) "\0f\00\00\00 \00\00\00)\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe") - (data (i32.const 80) "\11\00\00\00\10\00\00\000\00\00\000\00\00\00 \00\00\00\04\00\00\00") - (data (i32.const 104) "\10\00\00\00\18\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s\00") + (data (i32.const 48) "\0f\00\00\00 \00\00\00\00\00\00\00\00\00\00\00)\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe") + (data (i32.const 96) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00@\00\00\00@\00\00\00 \00\00\00\04\00\00\00") + (data (i32.const 128) "\10\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/math/js i32 (i32.const 1)) @@ -90,7 +90,7 @@ (global $~lib/math/NativeMathf.SQRT2 f32 (f32.const 1.4142135381698608)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/math/rempio2f_y (mut f64) (f64.const 0)) - (global $~lib/math/PIO2_TABLE i32 (i32.const 88)) + (global $~lib/math/PIO2_TABLE i32 (i32.const 112)) (global $~lib/builtins/f32.MAX_VALUE f32 (f32.const 3402823466385288598117041e14)) (global $~lib/builtins/f64.MIN_VALUE f64 (f64.const 5e-324)) (global $~lib/math/random_seeded (mut i32) (i32.const 0)) @@ -4751,13 +4751,13 @@ i32.const 63 i32.and local.set $15 - i32.const 88 + i32.const 112 local.get $14 i32.const 0 i32.add call $~lib/array/Array#__unchecked_get local.set $16 - i32.const 88 + i32.const 112 local.get $14 i32.const 1 i32.add @@ -4767,7 +4767,7 @@ i32.const 32 i32.gt_s if - i32.const 88 + i32.const 112 local.get $14 i32.const 2 i32.add @@ -10416,7 +10416,7 @@ i64.eqz if i32.const 0 - i32.const 112 + i32.const 144 i32.const 1021 i32.const 4 call $~lib/builtins/abort @@ -10448,7 +10448,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 144 i32.const 1030 i32.const 24 call $~lib/builtins/abort @@ -10505,7 +10505,7 @@ i32.eqz if i32.const 0 - i32.const 112 + i32.const 144 i32.const 2312 i32.const 24 call $~lib/builtins/abort @@ -11751,13 +11751,13 @@ i32.const 63 i32.and local.set $15 - i32.const 88 + i32.const 112 local.get $14 i32.const 0 i32.add call $~lib/array/Array#__unchecked_get local.set $16 - i32.const 88 + i32.const 112 local.get $14 i32.const 1 i32.add @@ -11767,7 +11767,7 @@ i32.const 32 i32.gt_s if - i32.const 88 + i32.const 112 local.get $14 i32.const 2 i32.add @@ -12731,13 +12731,13 @@ i32.const 63 i32.and local.set $17 - i32.const 88 + i32.const 112 local.get $16 i32.const 0 i32.add call $~lib/array/Array#__unchecked_get local.set $18 - i32.const 88 + i32.const 112 local.get $16 i32.const 1 i32.add @@ -12747,7 +12747,7 @@ i32.const 32 i32.gt_s if - i32.const 88 + i32.const 112 local.get $16 i32.const 2 i32.add @@ -13574,7 +13574,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 101 i32.const 0 call $~lib/builtins/abort @@ -13586,7 +13586,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 102 i32.const 0 call $~lib/builtins/abort @@ -13600,7 +13600,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 108 i32.const 0 call $~lib/builtins/abort @@ -13614,7 +13614,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 109 i32.const 0 call $~lib/builtins/abort @@ -13628,7 +13628,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 110 i32.const 0 call $~lib/builtins/abort @@ -13642,7 +13642,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 111 i32.const 0 call $~lib/builtins/abort @@ -13656,7 +13656,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 112 i32.const 0 call $~lib/builtins/abort @@ -13670,7 +13670,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 113 i32.const 0 call $~lib/builtins/abort @@ -13684,7 +13684,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 114 i32.const 0 call $~lib/builtins/abort @@ -13699,7 +13699,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 116 i32.const 0 call $~lib/builtins/abort @@ -13714,7 +13714,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 117 i32.const 0 call $~lib/builtins/abort @@ -13729,7 +13729,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 118 i32.const 0 call $~lib/builtins/abort @@ -13744,7 +13744,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 119 i32.const 0 call $~lib/builtins/abort @@ -13759,7 +13759,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 120 i32.const 0 call $~lib/builtins/abort @@ -13774,7 +13774,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 121 i32.const 0 call $~lib/builtins/abort @@ -13789,7 +13789,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 122 i32.const 0 call $~lib/builtins/abort @@ -13804,7 +13804,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 133 i32.const 0 call $~lib/builtins/abort @@ -13819,7 +13819,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 134 i32.const 0 call $~lib/builtins/abort @@ -13834,7 +13834,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 135 i32.const 0 call $~lib/builtins/abort @@ -13849,7 +13849,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 136 i32.const 0 call $~lib/builtins/abort @@ -13864,7 +13864,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 137 i32.const 0 call $~lib/builtins/abort @@ -13879,7 +13879,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 138 i32.const 0 call $~lib/builtins/abort @@ -13894,7 +13894,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 139 i32.const 0 call $~lib/builtins/abort @@ -13909,7 +13909,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 140 i32.const 0 call $~lib/builtins/abort @@ -13924,7 +13924,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 141 i32.const 0 call $~lib/builtins/abort @@ -13939,7 +13939,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 142 i32.const 0 call $~lib/builtins/abort @@ -13954,7 +13954,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 145 i32.const 0 call $~lib/builtins/abort @@ -13969,7 +13969,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 146 i32.const 0 call $~lib/builtins/abort @@ -13984,7 +13984,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 147 i32.const 0 call $~lib/builtins/abort @@ -13999,7 +13999,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 148 i32.const 0 call $~lib/builtins/abort @@ -14014,7 +14014,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 149 i32.const 0 call $~lib/builtins/abort @@ -14031,7 +14031,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 150 i32.const 0 call $~lib/builtins/abort @@ -14046,7 +14046,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 151 i32.const 0 call $~lib/builtins/abort @@ -14061,7 +14061,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 152 i32.const 0 call $~lib/builtins/abort @@ -14076,7 +14076,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 153 i32.const 0 call $~lib/builtins/abort @@ -14093,7 +14093,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 154 i32.const 0 call $~lib/builtins/abort @@ -14108,7 +14108,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 155 i32.const 0 call $~lib/builtins/abort @@ -14123,7 +14123,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 156 i32.const 0 call $~lib/builtins/abort @@ -14138,7 +14138,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 157 i32.const 0 call $~lib/builtins/abort @@ -14155,7 +14155,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 158 i32.const 0 call $~lib/builtins/abort @@ -14170,7 +14170,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 159 i32.const 0 call $~lib/builtins/abort @@ -14185,7 +14185,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 160 i32.const 0 call $~lib/builtins/abort @@ -14202,7 +14202,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 161 i32.const 0 call $~lib/builtins/abort @@ -14219,7 +14219,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 162 i32.const 0 call $~lib/builtins/abort @@ -14236,7 +14236,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 163 i32.const 0 call $~lib/builtins/abort @@ -14251,7 +14251,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 172 i32.const 0 call $~lib/builtins/abort @@ -14266,7 +14266,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 173 i32.const 0 call $~lib/builtins/abort @@ -14281,7 +14281,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 174 i32.const 0 call $~lib/builtins/abort @@ -14296,7 +14296,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 175 i32.const 0 call $~lib/builtins/abort @@ -14311,7 +14311,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 176 i32.const 0 call $~lib/builtins/abort @@ -14326,7 +14326,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 177 i32.const 0 call $~lib/builtins/abort @@ -14341,7 +14341,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 178 i32.const 0 call $~lib/builtins/abort @@ -14356,7 +14356,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 179 i32.const 0 call $~lib/builtins/abort @@ -14371,7 +14371,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 180 i32.const 0 call $~lib/builtins/abort @@ -14386,7 +14386,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 181 i32.const 0 call $~lib/builtins/abort @@ -14401,7 +14401,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 184 i32.const 0 call $~lib/builtins/abort @@ -14416,7 +14416,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 185 i32.const 0 call $~lib/builtins/abort @@ -14431,7 +14431,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 186 i32.const 0 call $~lib/builtins/abort @@ -14446,7 +14446,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 187 i32.const 0 call $~lib/builtins/abort @@ -14461,7 +14461,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 188 i32.const 0 call $~lib/builtins/abort @@ -14478,7 +14478,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 189 i32.const 0 call $~lib/builtins/abort @@ -14493,7 +14493,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 190 i32.const 0 call $~lib/builtins/abort @@ -14508,7 +14508,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 191 i32.const 0 call $~lib/builtins/abort @@ -14523,7 +14523,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 192 i32.const 0 call $~lib/builtins/abort @@ -14540,7 +14540,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 193 i32.const 0 call $~lib/builtins/abort @@ -14555,7 +14555,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 194 i32.const 0 call $~lib/builtins/abort @@ -14570,7 +14570,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 195 i32.const 0 call $~lib/builtins/abort @@ -14585,7 +14585,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 196 i32.const 0 call $~lib/builtins/abort @@ -14602,7 +14602,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 197 i32.const 0 call $~lib/builtins/abort @@ -14617,7 +14617,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 198 i32.const 0 call $~lib/builtins/abort @@ -14632,7 +14632,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 199 i32.const 0 call $~lib/builtins/abort @@ -14649,7 +14649,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 200 i32.const 0 call $~lib/builtins/abort @@ -14666,7 +14666,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 201 i32.const 0 call $~lib/builtins/abort @@ -14683,7 +14683,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 202 i32.const 0 call $~lib/builtins/abort @@ -14697,7 +14697,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 214 i32.const 0 call $~lib/builtins/abort @@ -14711,7 +14711,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 215 i32.const 0 call $~lib/builtins/abort @@ -14725,7 +14725,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 216 i32.const 0 call $~lib/builtins/abort @@ -14739,7 +14739,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 217 i32.const 0 call $~lib/builtins/abort @@ -14753,7 +14753,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 218 i32.const 0 call $~lib/builtins/abort @@ -14767,7 +14767,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 219 i32.const 0 call $~lib/builtins/abort @@ -14781,7 +14781,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 220 i32.const 0 call $~lib/builtins/abort @@ -14795,7 +14795,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 221 i32.const 0 call $~lib/builtins/abort @@ -14809,7 +14809,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 222 i32.const 0 call $~lib/builtins/abort @@ -14823,7 +14823,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 223 i32.const 0 call $~lib/builtins/abort @@ -14837,7 +14837,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 226 i32.const 0 call $~lib/builtins/abort @@ -14851,7 +14851,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 227 i32.const 0 call $~lib/builtins/abort @@ -14865,7 +14865,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 228 i32.const 0 call $~lib/builtins/abort @@ -14879,7 +14879,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 229 i32.const 0 call $~lib/builtins/abort @@ -14893,7 +14893,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 230 i32.const 0 call $~lib/builtins/abort @@ -14908,7 +14908,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 231 i32.const 0 call $~lib/builtins/abort @@ -14922,7 +14922,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 232 i32.const 0 call $~lib/builtins/abort @@ -14936,7 +14936,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 241 i32.const 0 call $~lib/builtins/abort @@ -14950,7 +14950,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 242 i32.const 0 call $~lib/builtins/abort @@ -14964,7 +14964,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 243 i32.const 0 call $~lib/builtins/abort @@ -14978,7 +14978,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 244 i32.const 0 call $~lib/builtins/abort @@ -14992,7 +14992,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 245 i32.const 0 call $~lib/builtins/abort @@ -15006,7 +15006,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 246 i32.const 0 call $~lib/builtins/abort @@ -15020,7 +15020,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 247 i32.const 0 call $~lib/builtins/abort @@ -15034,7 +15034,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 248 i32.const 0 call $~lib/builtins/abort @@ -15048,7 +15048,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 249 i32.const 0 call $~lib/builtins/abort @@ -15062,7 +15062,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 250 i32.const 0 call $~lib/builtins/abort @@ -15076,7 +15076,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 253 i32.const 0 call $~lib/builtins/abort @@ -15090,7 +15090,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 254 i32.const 0 call $~lib/builtins/abort @@ -15104,7 +15104,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 255 i32.const 0 call $~lib/builtins/abort @@ -15118,7 +15118,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 256 i32.const 0 call $~lib/builtins/abort @@ -15132,7 +15132,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 257 i32.const 0 call $~lib/builtins/abort @@ -15147,7 +15147,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 258 i32.const 0 call $~lib/builtins/abort @@ -15161,7 +15161,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 259 i32.const 0 call $~lib/builtins/abort @@ -15175,7 +15175,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 271 i32.const 0 call $~lib/builtins/abort @@ -15189,7 +15189,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 272 i32.const 0 call $~lib/builtins/abort @@ -15203,7 +15203,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 273 i32.const 0 call $~lib/builtins/abort @@ -15217,7 +15217,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 274 i32.const 0 call $~lib/builtins/abort @@ -15231,7 +15231,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 275 i32.const 0 call $~lib/builtins/abort @@ -15245,7 +15245,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 276 i32.const 0 call $~lib/builtins/abort @@ -15259,7 +15259,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 277 i32.const 0 call $~lib/builtins/abort @@ -15273,7 +15273,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 278 i32.const 0 call $~lib/builtins/abort @@ -15287,7 +15287,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 279 i32.const 0 call $~lib/builtins/abort @@ -15301,7 +15301,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 280 i32.const 0 call $~lib/builtins/abort @@ -15315,7 +15315,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 283 i32.const 0 call $~lib/builtins/abort @@ -15329,7 +15329,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 284 i32.const 0 call $~lib/builtins/abort @@ -15343,7 +15343,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 285 i32.const 0 call $~lib/builtins/abort @@ -15357,7 +15357,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 286 i32.const 0 call $~lib/builtins/abort @@ -15371,7 +15371,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 287 i32.const 0 call $~lib/builtins/abort @@ -15385,7 +15385,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 288 i32.const 0 call $~lib/builtins/abort @@ -15400,7 +15400,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 289 i32.const 0 call $~lib/builtins/abort @@ -15414,7 +15414,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 290 i32.const 0 call $~lib/builtins/abort @@ -15428,7 +15428,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 291 i32.const 0 call $~lib/builtins/abort @@ -15442,7 +15442,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 292 i32.const 0 call $~lib/builtins/abort @@ -15456,7 +15456,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 301 i32.const 0 call $~lib/builtins/abort @@ -15470,7 +15470,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 302 i32.const 0 call $~lib/builtins/abort @@ -15484,7 +15484,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 303 i32.const 0 call $~lib/builtins/abort @@ -15498,7 +15498,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 304 i32.const 0 call $~lib/builtins/abort @@ -15512,7 +15512,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 305 i32.const 0 call $~lib/builtins/abort @@ -15526,7 +15526,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 306 i32.const 0 call $~lib/builtins/abort @@ -15540,7 +15540,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 307 i32.const 0 call $~lib/builtins/abort @@ -15554,7 +15554,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 308 i32.const 0 call $~lib/builtins/abort @@ -15568,7 +15568,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 309 i32.const 0 call $~lib/builtins/abort @@ -15582,7 +15582,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 310 i32.const 0 call $~lib/builtins/abort @@ -15596,7 +15596,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 313 i32.const 0 call $~lib/builtins/abort @@ -15610,7 +15610,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 314 i32.const 0 call $~lib/builtins/abort @@ -15624,7 +15624,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 315 i32.const 0 call $~lib/builtins/abort @@ -15638,7 +15638,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 316 i32.const 0 call $~lib/builtins/abort @@ -15652,7 +15652,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 317 i32.const 0 call $~lib/builtins/abort @@ -15666,7 +15666,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 318 i32.const 0 call $~lib/builtins/abort @@ -15681,7 +15681,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 319 i32.const 0 call $~lib/builtins/abort @@ -15695,7 +15695,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 320 i32.const 0 call $~lib/builtins/abort @@ -15709,7 +15709,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 321 i32.const 0 call $~lib/builtins/abort @@ -15723,7 +15723,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 322 i32.const 0 call $~lib/builtins/abort @@ -15737,7 +15737,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 323 i32.const 0 call $~lib/builtins/abort @@ -15751,7 +15751,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 335 i32.const 0 call $~lib/builtins/abort @@ -15765,7 +15765,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 336 i32.const 0 call $~lib/builtins/abort @@ -15779,7 +15779,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 337 i32.const 0 call $~lib/builtins/abort @@ -15793,7 +15793,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 338 i32.const 0 call $~lib/builtins/abort @@ -15807,7 +15807,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 339 i32.const 0 call $~lib/builtins/abort @@ -15821,7 +15821,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 340 i32.const 0 call $~lib/builtins/abort @@ -15835,7 +15835,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 341 i32.const 0 call $~lib/builtins/abort @@ -15849,7 +15849,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 342 i32.const 0 call $~lib/builtins/abort @@ -15863,7 +15863,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 343 i32.const 0 call $~lib/builtins/abort @@ -15877,7 +15877,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 344 i32.const 0 call $~lib/builtins/abort @@ -15891,7 +15891,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 347 i32.const 0 call $~lib/builtins/abort @@ -15905,7 +15905,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 348 i32.const 0 call $~lib/builtins/abort @@ -15919,7 +15919,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 349 i32.const 0 call $~lib/builtins/abort @@ -15933,7 +15933,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 350 i32.const 0 call $~lib/builtins/abort @@ -15947,7 +15947,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 351 i32.const 0 call $~lib/builtins/abort @@ -15961,7 +15961,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 352 i32.const 0 call $~lib/builtins/abort @@ -15976,7 +15976,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 353 i32.const 0 call $~lib/builtins/abort @@ -15990,7 +15990,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 369 i32.const 0 call $~lib/builtins/abort @@ -16004,7 +16004,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 371 i32.const 0 call $~lib/builtins/abort @@ -16018,7 +16018,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 372 i32.const 0 call $~lib/builtins/abort @@ -16032,7 +16032,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 381 i32.const 0 call $~lib/builtins/abort @@ -16046,7 +16046,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 382 i32.const 0 call $~lib/builtins/abort @@ -16060,7 +16060,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 383 i32.const 0 call $~lib/builtins/abort @@ -16074,7 +16074,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 384 i32.const 0 call $~lib/builtins/abort @@ -16088,7 +16088,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 385 i32.const 0 call $~lib/builtins/abort @@ -16102,7 +16102,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 386 i32.const 0 call $~lib/builtins/abort @@ -16116,7 +16116,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 387 i32.const 0 call $~lib/builtins/abort @@ -16130,7 +16130,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 388 i32.const 0 call $~lib/builtins/abort @@ -16144,7 +16144,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 389 i32.const 0 call $~lib/builtins/abort @@ -16158,7 +16158,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 390 i32.const 0 call $~lib/builtins/abort @@ -16172,7 +16172,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 393 i32.const 0 call $~lib/builtins/abort @@ -16186,7 +16186,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 394 i32.const 0 call $~lib/builtins/abort @@ -16200,7 +16200,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 395 i32.const 0 call $~lib/builtins/abort @@ -16214,7 +16214,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 396 i32.const 0 call $~lib/builtins/abort @@ -16228,7 +16228,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 397 i32.const 0 call $~lib/builtins/abort @@ -16242,7 +16242,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 398 i32.const 0 call $~lib/builtins/abort @@ -16257,7 +16257,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 399 i32.const 0 call $~lib/builtins/abort @@ -16271,7 +16271,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 400 i32.const 0 call $~lib/builtins/abort @@ -16285,7 +16285,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 412 i32.const 0 call $~lib/builtins/abort @@ -16299,7 +16299,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 413 i32.const 0 call $~lib/builtins/abort @@ -16313,7 +16313,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 414 i32.const 0 call $~lib/builtins/abort @@ -16327,7 +16327,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 415 i32.const 0 call $~lib/builtins/abort @@ -16341,7 +16341,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 416 i32.const 0 call $~lib/builtins/abort @@ -16355,7 +16355,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 417 i32.const 0 call $~lib/builtins/abort @@ -16369,7 +16369,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 418 i32.const 0 call $~lib/builtins/abort @@ -16383,7 +16383,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 419 i32.const 0 call $~lib/builtins/abort @@ -16397,7 +16397,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 420 i32.const 0 call $~lib/builtins/abort @@ -16411,7 +16411,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 421 i32.const 0 call $~lib/builtins/abort @@ -16425,7 +16425,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 424 i32.const 0 call $~lib/builtins/abort @@ -16439,7 +16439,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 425 i32.const 0 call $~lib/builtins/abort @@ -16453,7 +16453,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 426 i32.const 0 call $~lib/builtins/abort @@ -16467,7 +16467,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 427 i32.const 0 call $~lib/builtins/abort @@ -16481,7 +16481,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 428 i32.const 0 call $~lib/builtins/abort @@ -16495,7 +16495,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 429 i32.const 0 call $~lib/builtins/abort @@ -16509,7 +16509,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 430 i32.const 0 call $~lib/builtins/abort @@ -16524,7 +16524,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 431 i32.const 0 call $~lib/builtins/abort @@ -16538,7 +16538,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 432 i32.const 0 call $~lib/builtins/abort @@ -16552,7 +16552,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 433 i32.const 0 call $~lib/builtins/abort @@ -16566,7 +16566,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 442 i32.const 0 call $~lib/builtins/abort @@ -16580,7 +16580,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 443 i32.const 0 call $~lib/builtins/abort @@ -16594,7 +16594,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 444 i32.const 0 call $~lib/builtins/abort @@ -16608,7 +16608,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 445 i32.const 0 call $~lib/builtins/abort @@ -16622,7 +16622,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 446 i32.const 0 call $~lib/builtins/abort @@ -16636,7 +16636,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 447 i32.const 0 call $~lib/builtins/abort @@ -16650,7 +16650,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 448 i32.const 0 call $~lib/builtins/abort @@ -16664,7 +16664,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 449 i32.const 0 call $~lib/builtins/abort @@ -16678,7 +16678,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 450 i32.const 0 call $~lib/builtins/abort @@ -16692,7 +16692,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 451 i32.const 0 call $~lib/builtins/abort @@ -16706,7 +16706,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 454 i32.const 0 call $~lib/builtins/abort @@ -16720,7 +16720,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 455 i32.const 0 call $~lib/builtins/abort @@ -16734,7 +16734,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 456 i32.const 0 call $~lib/builtins/abort @@ -16748,7 +16748,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 457 i32.const 0 call $~lib/builtins/abort @@ -16762,7 +16762,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 458 i32.const 0 call $~lib/builtins/abort @@ -16776,7 +16776,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 459 i32.const 0 call $~lib/builtins/abort @@ -16790,7 +16790,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 460 i32.const 0 call $~lib/builtins/abort @@ -16805,7 +16805,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 461 i32.const 0 call $~lib/builtins/abort @@ -16819,7 +16819,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 462 i32.const 0 call $~lib/builtins/abort @@ -16833,7 +16833,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 463 i32.const 0 call $~lib/builtins/abort @@ -16847,7 +16847,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 475 i32.const 0 call $~lib/builtins/abort @@ -16861,7 +16861,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 476 i32.const 0 call $~lib/builtins/abort @@ -16875,7 +16875,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 477 i32.const 0 call $~lib/builtins/abort @@ -16889,7 +16889,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 478 i32.const 0 call $~lib/builtins/abort @@ -16903,7 +16903,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 479 i32.const 0 call $~lib/builtins/abort @@ -16917,7 +16917,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 480 i32.const 0 call $~lib/builtins/abort @@ -16931,7 +16931,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 481 i32.const 0 call $~lib/builtins/abort @@ -16945,7 +16945,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 482 i32.const 0 call $~lib/builtins/abort @@ -16959,7 +16959,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 483 i32.const 0 call $~lib/builtins/abort @@ -16973,7 +16973,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 484 i32.const 0 call $~lib/builtins/abort @@ -16987,7 +16987,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 487 i32.const 0 call $~lib/builtins/abort @@ -17001,7 +17001,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 488 i32.const 0 call $~lib/builtins/abort @@ -17017,7 +17017,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 489 i32.const 0 call $~lib/builtins/abort @@ -17031,7 +17031,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 490 i32.const 0 call $~lib/builtins/abort @@ -17045,7 +17045,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 491 i32.const 0 call $~lib/builtins/abort @@ -17059,7 +17059,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 520 i32.const 0 call $~lib/builtins/abort @@ -17073,7 +17073,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 521 i32.const 0 call $~lib/builtins/abort @@ -17087,7 +17087,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 522 i32.const 0 call $~lib/builtins/abort @@ -17101,7 +17101,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 523 i32.const 0 call $~lib/builtins/abort @@ -17115,7 +17115,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 524 i32.const 0 call $~lib/builtins/abort @@ -17129,7 +17129,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 525 i32.const 0 call $~lib/builtins/abort @@ -17143,7 +17143,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 526 i32.const 0 call $~lib/builtins/abort @@ -17157,7 +17157,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 527 i32.const 0 call $~lib/builtins/abort @@ -17171,7 +17171,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 528 i32.const 0 call $~lib/builtins/abort @@ -17185,7 +17185,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 529 i32.const 0 call $~lib/builtins/abort @@ -17199,7 +17199,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 532 i32.const 0 call $~lib/builtins/abort @@ -17213,7 +17213,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 533 i32.const 0 call $~lib/builtins/abort @@ -17229,7 +17229,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 534 i32.const 0 call $~lib/builtins/abort @@ -17243,7 +17243,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 535 i32.const 0 call $~lib/builtins/abort @@ -17257,7 +17257,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 536 i32.const 0 call $~lib/builtins/abort @@ -17271,7 +17271,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 548 i32.const 0 call $~lib/builtins/abort @@ -17285,7 +17285,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 549 i32.const 0 call $~lib/builtins/abort @@ -17299,7 +17299,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 550 i32.const 0 call $~lib/builtins/abort @@ -17313,7 +17313,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 551 i32.const 0 call $~lib/builtins/abort @@ -17327,7 +17327,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 552 i32.const 0 call $~lib/builtins/abort @@ -17341,7 +17341,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 553 i32.const 0 call $~lib/builtins/abort @@ -17355,7 +17355,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 554 i32.const 0 call $~lib/builtins/abort @@ -17369,7 +17369,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 555 i32.const 0 call $~lib/builtins/abort @@ -17383,7 +17383,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 556 i32.const 0 call $~lib/builtins/abort @@ -17397,7 +17397,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 557 i32.const 0 call $~lib/builtins/abort @@ -17411,7 +17411,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 560 i32.const 0 call $~lib/builtins/abort @@ -17425,7 +17425,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 561 i32.const 0 call $~lib/builtins/abort @@ -17439,7 +17439,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 562 i32.const 0 call $~lib/builtins/abort @@ -17453,7 +17453,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 563 i32.const 0 call $~lib/builtins/abort @@ -17467,7 +17467,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 564 i32.const 0 call $~lib/builtins/abort @@ -17482,7 +17482,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 565 i32.const 0 call $~lib/builtins/abort @@ -17496,7 +17496,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 566 i32.const 0 call $~lib/builtins/abort @@ -17510,7 +17510,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 567 i32.const 0 call $~lib/builtins/abort @@ -17524,7 +17524,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 576 i32.const 0 call $~lib/builtins/abort @@ -17538,7 +17538,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 577 i32.const 0 call $~lib/builtins/abort @@ -17552,7 +17552,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 578 i32.const 0 call $~lib/builtins/abort @@ -17566,7 +17566,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 579 i32.const 0 call $~lib/builtins/abort @@ -17580,7 +17580,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 580 i32.const 0 call $~lib/builtins/abort @@ -17594,7 +17594,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 581 i32.const 0 call $~lib/builtins/abort @@ -17608,7 +17608,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 582 i32.const 0 call $~lib/builtins/abort @@ -17622,7 +17622,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 583 i32.const 0 call $~lib/builtins/abort @@ -17636,7 +17636,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 584 i32.const 0 call $~lib/builtins/abort @@ -17650,7 +17650,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 585 i32.const 0 call $~lib/builtins/abort @@ -17664,7 +17664,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 588 i32.const 0 call $~lib/builtins/abort @@ -17678,7 +17678,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 589 i32.const 0 call $~lib/builtins/abort @@ -17692,7 +17692,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 590 i32.const 0 call $~lib/builtins/abort @@ -17706,7 +17706,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 591 i32.const 0 call $~lib/builtins/abort @@ -17720,7 +17720,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 592 i32.const 0 call $~lib/builtins/abort @@ -17735,7 +17735,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 593 i32.const 0 call $~lib/builtins/abort @@ -17749,7 +17749,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 594 i32.const 0 call $~lib/builtins/abort @@ -17763,7 +17763,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 606 i32.const 0 call $~lib/builtins/abort @@ -17777,7 +17777,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 607 i32.const 0 call $~lib/builtins/abort @@ -17791,7 +17791,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 608 i32.const 0 call $~lib/builtins/abort @@ -17805,7 +17805,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 609 i32.const 0 call $~lib/builtins/abort @@ -17819,7 +17819,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 610 i32.const 0 call $~lib/builtins/abort @@ -17833,7 +17833,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 611 i32.const 0 call $~lib/builtins/abort @@ -17847,7 +17847,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 612 i32.const 0 call $~lib/builtins/abort @@ -17861,7 +17861,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 613 i32.const 0 call $~lib/builtins/abort @@ -17875,7 +17875,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 614 i32.const 0 call $~lib/builtins/abort @@ -17889,7 +17889,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 615 i32.const 0 call $~lib/builtins/abort @@ -17903,7 +17903,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 618 i32.const 0 call $~lib/builtins/abort @@ -17917,7 +17917,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 619 i32.const 0 call $~lib/builtins/abort @@ -17932,7 +17932,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 620 i32.const 0 call $~lib/builtins/abort @@ -17946,7 +17946,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 621 i32.const 0 call $~lib/builtins/abort @@ -17960,7 +17960,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 622 i32.const 0 call $~lib/builtins/abort @@ -17974,7 +17974,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 623 i32.const 0 call $~lib/builtins/abort @@ -17989,7 +17989,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 624 i32.const 0 call $~lib/builtins/abort @@ -18003,7 +18003,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 625 i32.const 0 call $~lib/builtins/abort @@ -18017,7 +18017,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 626 i32.const 0 call $~lib/builtins/abort @@ -18031,7 +18031,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 627 i32.const 0 call $~lib/builtins/abort @@ -18045,7 +18045,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 628 i32.const 0 call $~lib/builtins/abort @@ -18061,7 +18061,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 629 i32.const 0 call $~lib/builtins/abort @@ -18077,7 +18077,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 630 i32.const 0 call $~lib/builtins/abort @@ -18091,7 +18091,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 631 i32.const 0 call $~lib/builtins/abort @@ -18105,7 +18105,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 640 i32.const 0 call $~lib/builtins/abort @@ -18119,7 +18119,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 641 i32.const 0 call $~lib/builtins/abort @@ -18133,7 +18133,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 642 i32.const 0 call $~lib/builtins/abort @@ -18147,7 +18147,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 643 i32.const 0 call $~lib/builtins/abort @@ -18161,7 +18161,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 644 i32.const 0 call $~lib/builtins/abort @@ -18175,7 +18175,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 645 i32.const 0 call $~lib/builtins/abort @@ -18189,7 +18189,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 646 i32.const 0 call $~lib/builtins/abort @@ -18203,7 +18203,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 647 i32.const 0 call $~lib/builtins/abort @@ -18217,7 +18217,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 648 i32.const 0 call $~lib/builtins/abort @@ -18231,7 +18231,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 649 i32.const 0 call $~lib/builtins/abort @@ -18245,7 +18245,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 652 i32.const 0 call $~lib/builtins/abort @@ -18259,7 +18259,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 653 i32.const 0 call $~lib/builtins/abort @@ -18274,7 +18274,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 654 i32.const 0 call $~lib/builtins/abort @@ -18288,7 +18288,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 655 i32.const 0 call $~lib/builtins/abort @@ -18302,7 +18302,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 656 i32.const 0 call $~lib/builtins/abort @@ -18316,7 +18316,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 657 i32.const 0 call $~lib/builtins/abort @@ -18331,7 +18331,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 658 i32.const 0 call $~lib/builtins/abort @@ -18345,7 +18345,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 659 i32.const 0 call $~lib/builtins/abort @@ -18359,7 +18359,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 660 i32.const 0 call $~lib/builtins/abort @@ -18373,7 +18373,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 661 i32.const 0 call $~lib/builtins/abort @@ -18387,7 +18387,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 662 i32.const 0 call $~lib/builtins/abort @@ -18403,7 +18403,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 663 i32.const 0 call $~lib/builtins/abort @@ -18419,7 +18419,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 664 i32.const 0 call $~lib/builtins/abort @@ -18433,7 +18433,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 665 i32.const 0 call $~lib/builtins/abort @@ -18448,7 +18448,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 677 i32.const 0 call $~lib/builtins/abort @@ -18463,7 +18463,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 678 i32.const 0 call $~lib/builtins/abort @@ -18478,7 +18478,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 679 i32.const 0 call $~lib/builtins/abort @@ -18493,7 +18493,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 680 i32.const 0 call $~lib/builtins/abort @@ -18508,7 +18508,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 681 i32.const 0 call $~lib/builtins/abort @@ -18523,7 +18523,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 682 i32.const 0 call $~lib/builtins/abort @@ -18538,7 +18538,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 683 i32.const 0 call $~lib/builtins/abort @@ -18553,7 +18553,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 684 i32.const 0 call $~lib/builtins/abort @@ -18568,7 +18568,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 685 i32.const 0 call $~lib/builtins/abort @@ -18583,7 +18583,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 686 i32.const 0 call $~lib/builtins/abort @@ -18598,7 +18598,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 689 i32.const 0 call $~lib/builtins/abort @@ -18613,7 +18613,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 690 i32.const 0 call $~lib/builtins/abort @@ -18628,7 +18628,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 691 i32.const 0 call $~lib/builtins/abort @@ -18644,7 +18644,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 692 i32.const 0 call $~lib/builtins/abort @@ -18659,7 +18659,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 693 i32.const 0 call $~lib/builtins/abort @@ -18674,7 +18674,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 694 i32.const 0 call $~lib/builtins/abort @@ -18689,7 +18689,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 695 i32.const 0 call $~lib/builtins/abort @@ -18704,7 +18704,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 696 i32.const 0 call $~lib/builtins/abort @@ -18719,7 +18719,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 697 i32.const 0 call $~lib/builtins/abort @@ -18735,7 +18735,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 698 i32.const 0 call $~lib/builtins/abort @@ -18750,7 +18750,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 699 i32.const 0 call $~lib/builtins/abort @@ -18765,7 +18765,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 700 i32.const 0 call $~lib/builtins/abort @@ -18780,7 +18780,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 701 i32.const 0 call $~lib/builtins/abort @@ -18795,7 +18795,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 702 i32.const 0 call $~lib/builtins/abort @@ -18810,7 +18810,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 703 i32.const 0 call $~lib/builtins/abort @@ -18825,7 +18825,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 704 i32.const 0 call $~lib/builtins/abort @@ -18840,7 +18840,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 705 i32.const 0 call $~lib/builtins/abort @@ -18855,7 +18855,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 706 i32.const 0 call $~lib/builtins/abort @@ -18871,7 +18871,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 707 i32.const 0 call $~lib/builtins/abort @@ -18887,7 +18887,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 708 i32.const 0 call $~lib/builtins/abort @@ -18902,7 +18902,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 709 i32.const 0 call $~lib/builtins/abort @@ -18918,7 +18918,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 710 i32.const 0 call $~lib/builtins/abort @@ -18933,7 +18933,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 711 i32.const 0 call $~lib/builtins/abort @@ -18949,7 +18949,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 712 i32.const 0 call $~lib/builtins/abort @@ -18965,7 +18965,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 713 i32.const 0 call $~lib/builtins/abort @@ -18982,7 +18982,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 714 i32.const 0 call $~lib/builtins/abort @@ -18999,7 +18999,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 715 i32.const 0 call $~lib/builtins/abort @@ -19016,7 +19016,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 716 i32.const 0 call $~lib/builtins/abort @@ -19033,7 +19033,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 717 i32.const 0 call $~lib/builtins/abort @@ -19048,7 +19048,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 718 i32.const 0 call $~lib/builtins/abort @@ -19063,7 +19063,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 727 i32.const 0 call $~lib/builtins/abort @@ -19078,7 +19078,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 728 i32.const 0 call $~lib/builtins/abort @@ -19093,7 +19093,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 729 i32.const 0 call $~lib/builtins/abort @@ -19108,7 +19108,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 730 i32.const 0 call $~lib/builtins/abort @@ -19123,7 +19123,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 731 i32.const 0 call $~lib/builtins/abort @@ -19138,7 +19138,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 732 i32.const 0 call $~lib/builtins/abort @@ -19153,7 +19153,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 733 i32.const 0 call $~lib/builtins/abort @@ -19168,7 +19168,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 734 i32.const 0 call $~lib/builtins/abort @@ -19183,7 +19183,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 735 i32.const 0 call $~lib/builtins/abort @@ -19198,7 +19198,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 736 i32.const 0 call $~lib/builtins/abort @@ -19213,7 +19213,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 739 i32.const 0 call $~lib/builtins/abort @@ -19228,7 +19228,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 740 i32.const 0 call $~lib/builtins/abort @@ -19243,7 +19243,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 741 i32.const 0 call $~lib/builtins/abort @@ -19259,7 +19259,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 742 i32.const 0 call $~lib/builtins/abort @@ -19274,7 +19274,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 743 i32.const 0 call $~lib/builtins/abort @@ -19289,7 +19289,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 744 i32.const 0 call $~lib/builtins/abort @@ -19304,7 +19304,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 745 i32.const 0 call $~lib/builtins/abort @@ -19319,7 +19319,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 746 i32.const 0 call $~lib/builtins/abort @@ -19334,7 +19334,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 747 i32.const 0 call $~lib/builtins/abort @@ -19350,7 +19350,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 748 i32.const 0 call $~lib/builtins/abort @@ -19365,7 +19365,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 749 i32.const 0 call $~lib/builtins/abort @@ -19380,7 +19380,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 750 i32.const 0 call $~lib/builtins/abort @@ -19395,7 +19395,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 751 i32.const 0 call $~lib/builtins/abort @@ -19410,7 +19410,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 752 i32.const 0 call $~lib/builtins/abort @@ -19425,7 +19425,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 753 i32.const 0 call $~lib/builtins/abort @@ -19440,7 +19440,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 754 i32.const 0 call $~lib/builtins/abort @@ -19455,7 +19455,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 755 i32.const 0 call $~lib/builtins/abort @@ -19470,7 +19470,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 756 i32.const 0 call $~lib/builtins/abort @@ -19486,7 +19486,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 757 i32.const 0 call $~lib/builtins/abort @@ -19502,7 +19502,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 758 i32.const 0 call $~lib/builtins/abort @@ -19517,7 +19517,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 759 i32.const 0 call $~lib/builtins/abort @@ -19533,7 +19533,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 760 i32.const 0 call $~lib/builtins/abort @@ -19548,7 +19548,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 761 i32.const 0 call $~lib/builtins/abort @@ -19564,7 +19564,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 762 i32.const 0 call $~lib/builtins/abort @@ -19580,7 +19580,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 763 i32.const 0 call $~lib/builtins/abort @@ -19597,7 +19597,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 764 i32.const 0 call $~lib/builtins/abort @@ -19614,7 +19614,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 765 i32.const 0 call $~lib/builtins/abort @@ -19631,7 +19631,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 766 i32.const 0 call $~lib/builtins/abort @@ -19645,7 +19645,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 778 i32.const 0 call $~lib/builtins/abort @@ -19659,7 +19659,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 779 i32.const 0 call $~lib/builtins/abort @@ -19673,7 +19673,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 780 i32.const 0 call $~lib/builtins/abort @@ -19687,7 +19687,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 781 i32.const 0 call $~lib/builtins/abort @@ -19701,7 +19701,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 782 i32.const 0 call $~lib/builtins/abort @@ -19715,7 +19715,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 783 i32.const 0 call $~lib/builtins/abort @@ -19729,7 +19729,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 784 i32.const 0 call $~lib/builtins/abort @@ -19743,7 +19743,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 785 i32.const 0 call $~lib/builtins/abort @@ -19757,7 +19757,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 786 i32.const 0 call $~lib/builtins/abort @@ -19771,7 +19771,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 787 i32.const 0 call $~lib/builtins/abort @@ -19785,7 +19785,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 790 i32.const 0 call $~lib/builtins/abort @@ -19799,7 +19799,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 791 i32.const 0 call $~lib/builtins/abort @@ -19815,7 +19815,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 792 i32.const 0 call $~lib/builtins/abort @@ -19829,7 +19829,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 793 i32.const 0 call $~lib/builtins/abort @@ -19843,7 +19843,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 794 i32.const 0 call $~lib/builtins/abort @@ -19857,7 +19857,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 795 i32.const 0 call $~lib/builtins/abort @@ -19871,7 +19871,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 796 i32.const 0 call $~lib/builtins/abort @@ -19885,7 +19885,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 797 i32.const 0 call $~lib/builtins/abort @@ -19899,7 +19899,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 798 i32.const 0 call $~lib/builtins/abort @@ -19913,7 +19913,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 799 i32.const 0 call $~lib/builtins/abort @@ -19927,7 +19927,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 808 i32.const 0 call $~lib/builtins/abort @@ -19941,7 +19941,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 809 i32.const 0 call $~lib/builtins/abort @@ -19955,7 +19955,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 810 i32.const 0 call $~lib/builtins/abort @@ -19969,7 +19969,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 811 i32.const 0 call $~lib/builtins/abort @@ -19983,7 +19983,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 812 i32.const 0 call $~lib/builtins/abort @@ -19997,7 +19997,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 813 i32.const 0 call $~lib/builtins/abort @@ -20011,7 +20011,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 814 i32.const 0 call $~lib/builtins/abort @@ -20025,7 +20025,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 815 i32.const 0 call $~lib/builtins/abort @@ -20039,7 +20039,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 816 i32.const 0 call $~lib/builtins/abort @@ -20053,7 +20053,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 817 i32.const 0 call $~lib/builtins/abort @@ -20067,7 +20067,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 820 i32.const 0 call $~lib/builtins/abort @@ -20081,7 +20081,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 821 i32.const 0 call $~lib/builtins/abort @@ -20097,7 +20097,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 822 i32.const 0 call $~lib/builtins/abort @@ -20111,7 +20111,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 823 i32.const 0 call $~lib/builtins/abort @@ -20125,7 +20125,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 824 i32.const 0 call $~lib/builtins/abort @@ -20139,7 +20139,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 825 i32.const 0 call $~lib/builtins/abort @@ -20153,7 +20153,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 826 i32.const 0 call $~lib/builtins/abort @@ -20167,7 +20167,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 827 i32.const 0 call $~lib/builtins/abort @@ -20181,7 +20181,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 828 i32.const 0 call $~lib/builtins/abort @@ -20195,7 +20195,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 829 i32.const 0 call $~lib/builtins/abort @@ -20209,7 +20209,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 841 i32.const 0 call $~lib/builtins/abort @@ -20223,7 +20223,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 842 i32.const 0 call $~lib/builtins/abort @@ -20237,7 +20237,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 843 i32.const 0 call $~lib/builtins/abort @@ -20251,7 +20251,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 844 i32.const 0 call $~lib/builtins/abort @@ -20265,7 +20265,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 845 i32.const 0 call $~lib/builtins/abort @@ -20279,7 +20279,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 846 i32.const 0 call $~lib/builtins/abort @@ -20293,7 +20293,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 847 i32.const 0 call $~lib/builtins/abort @@ -20307,7 +20307,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 848 i32.const 0 call $~lib/builtins/abort @@ -20321,7 +20321,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 849 i32.const 0 call $~lib/builtins/abort @@ -20335,7 +20335,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 850 i32.const 0 call $~lib/builtins/abort @@ -20349,7 +20349,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 853 i32.const 0 call $~lib/builtins/abort @@ -20363,7 +20363,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 854 i32.const 0 call $~lib/builtins/abort @@ -20379,7 +20379,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 855 i32.const 0 call $~lib/builtins/abort @@ -20393,7 +20393,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 856 i32.const 0 call $~lib/builtins/abort @@ -20407,7 +20407,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 857 i32.const 0 call $~lib/builtins/abort @@ -20421,7 +20421,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 858 i32.const 0 call $~lib/builtins/abort @@ -20435,7 +20435,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 859 i32.const 0 call $~lib/builtins/abort @@ -20449,7 +20449,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 860 i32.const 0 call $~lib/builtins/abort @@ -20463,7 +20463,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 861 i32.const 0 call $~lib/builtins/abort @@ -20477,7 +20477,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 862 i32.const 0 call $~lib/builtins/abort @@ -20491,7 +20491,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 863 i32.const 0 call $~lib/builtins/abort @@ -20505,7 +20505,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 864 i32.const 0 call $~lib/builtins/abort @@ -20519,7 +20519,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 865 i32.const 0 call $~lib/builtins/abort @@ -20533,7 +20533,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 866 i32.const 0 call $~lib/builtins/abort @@ -20547,7 +20547,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 867 i32.const 0 call $~lib/builtins/abort @@ -20561,7 +20561,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 868 i32.const 0 call $~lib/builtins/abort @@ -20575,7 +20575,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 869 i32.const 0 call $~lib/builtins/abort @@ -20591,7 +20591,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 870 i32.const 0 call $~lib/builtins/abort @@ -20605,7 +20605,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 871 i32.const 0 call $~lib/builtins/abort @@ -20619,7 +20619,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 872 i32.const 0 call $~lib/builtins/abort @@ -20633,7 +20633,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 873 i32.const 0 call $~lib/builtins/abort @@ -20647,7 +20647,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 874 i32.const 0 call $~lib/builtins/abort @@ -20661,7 +20661,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 875 i32.const 0 call $~lib/builtins/abort @@ -20675,7 +20675,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 876 i32.const 0 call $~lib/builtins/abort @@ -20689,7 +20689,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 877 i32.const 0 call $~lib/builtins/abort @@ -20703,7 +20703,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 878 i32.const 0 call $~lib/builtins/abort @@ -20717,7 +20717,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 879 i32.const 0 call $~lib/builtins/abort @@ -20731,7 +20731,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 880 i32.const 0 call $~lib/builtins/abort @@ -20745,7 +20745,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 881 i32.const 0 call $~lib/builtins/abort @@ -20759,7 +20759,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 882 i32.const 0 call $~lib/builtins/abort @@ -20773,7 +20773,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 883 i32.const 0 call $~lib/builtins/abort @@ -20787,7 +20787,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 884 i32.const 0 call $~lib/builtins/abort @@ -20803,7 +20803,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 885 i32.const 0 call $~lib/builtins/abort @@ -20817,7 +20817,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 886 i32.const 0 call $~lib/builtins/abort @@ -20831,7 +20831,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 887 i32.const 0 call $~lib/builtins/abort @@ -20845,7 +20845,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 888 i32.const 0 call $~lib/builtins/abort @@ -20859,7 +20859,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 889 i32.const 0 call $~lib/builtins/abort @@ -20873,7 +20873,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 890 i32.const 0 call $~lib/builtins/abort @@ -20887,7 +20887,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 891 i32.const 0 call $~lib/builtins/abort @@ -20901,7 +20901,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 892 i32.const 0 call $~lib/builtins/abort @@ -20915,7 +20915,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 893 i32.const 0 call $~lib/builtins/abort @@ -20929,7 +20929,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 894 i32.const 0 call $~lib/builtins/abort @@ -20943,7 +20943,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 895 i32.const 0 call $~lib/builtins/abort @@ -20957,7 +20957,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 896 i32.const 0 call $~lib/builtins/abort @@ -20971,7 +20971,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 897 i32.const 0 call $~lib/builtins/abort @@ -20985,7 +20985,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 906 i32.const 0 call $~lib/builtins/abort @@ -20999,7 +20999,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 907 i32.const 0 call $~lib/builtins/abort @@ -21013,7 +21013,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 908 i32.const 0 call $~lib/builtins/abort @@ -21027,7 +21027,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 909 i32.const 0 call $~lib/builtins/abort @@ -21041,7 +21041,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 910 i32.const 0 call $~lib/builtins/abort @@ -21055,7 +21055,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 911 i32.const 0 call $~lib/builtins/abort @@ -21069,7 +21069,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 912 i32.const 0 call $~lib/builtins/abort @@ -21083,7 +21083,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 913 i32.const 0 call $~lib/builtins/abort @@ -21097,7 +21097,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 914 i32.const 0 call $~lib/builtins/abort @@ -21111,7 +21111,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 915 i32.const 0 call $~lib/builtins/abort @@ -21125,7 +21125,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 918 i32.const 0 call $~lib/builtins/abort @@ -21139,7 +21139,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 919 i32.const 0 call $~lib/builtins/abort @@ -21155,7 +21155,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 920 i32.const 0 call $~lib/builtins/abort @@ -21169,7 +21169,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 921 i32.const 0 call $~lib/builtins/abort @@ -21183,7 +21183,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 922 i32.const 0 call $~lib/builtins/abort @@ -21197,7 +21197,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 923 i32.const 0 call $~lib/builtins/abort @@ -21211,7 +21211,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 924 i32.const 0 call $~lib/builtins/abort @@ -21225,7 +21225,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 925 i32.const 0 call $~lib/builtins/abort @@ -21239,7 +21239,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 926 i32.const 0 call $~lib/builtins/abort @@ -21253,7 +21253,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 927 i32.const 0 call $~lib/builtins/abort @@ -21267,7 +21267,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 928 i32.const 0 call $~lib/builtins/abort @@ -21281,7 +21281,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 929 i32.const 0 call $~lib/builtins/abort @@ -21295,7 +21295,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 930 i32.const 0 call $~lib/builtins/abort @@ -21309,7 +21309,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 931 i32.const 0 call $~lib/builtins/abort @@ -21323,7 +21323,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 932 i32.const 0 call $~lib/builtins/abort @@ -21337,7 +21337,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 933 i32.const 0 call $~lib/builtins/abort @@ -21351,7 +21351,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 934 i32.const 0 call $~lib/builtins/abort @@ -21367,7 +21367,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 935 i32.const 0 call $~lib/builtins/abort @@ -21381,7 +21381,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 936 i32.const 0 call $~lib/builtins/abort @@ -21395,7 +21395,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 937 i32.const 0 call $~lib/builtins/abort @@ -21409,7 +21409,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 938 i32.const 0 call $~lib/builtins/abort @@ -21423,7 +21423,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 939 i32.const 0 call $~lib/builtins/abort @@ -21437,7 +21437,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 940 i32.const 0 call $~lib/builtins/abort @@ -21451,7 +21451,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 941 i32.const 0 call $~lib/builtins/abort @@ -21465,7 +21465,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 942 i32.const 0 call $~lib/builtins/abort @@ -21479,7 +21479,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 943 i32.const 0 call $~lib/builtins/abort @@ -21493,7 +21493,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 944 i32.const 0 call $~lib/builtins/abort @@ -21507,7 +21507,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 945 i32.const 0 call $~lib/builtins/abort @@ -21521,7 +21521,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 946 i32.const 0 call $~lib/builtins/abort @@ -21535,7 +21535,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 947 i32.const 0 call $~lib/builtins/abort @@ -21549,7 +21549,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 948 i32.const 0 call $~lib/builtins/abort @@ -21563,7 +21563,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 949 i32.const 0 call $~lib/builtins/abort @@ -21579,7 +21579,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 950 i32.const 0 call $~lib/builtins/abort @@ -21593,7 +21593,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 951 i32.const 0 call $~lib/builtins/abort @@ -21607,7 +21607,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 952 i32.const 0 call $~lib/builtins/abort @@ -21621,7 +21621,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 953 i32.const 0 call $~lib/builtins/abort @@ -21635,7 +21635,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 954 i32.const 0 call $~lib/builtins/abort @@ -21649,7 +21649,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 955 i32.const 0 call $~lib/builtins/abort @@ -21663,7 +21663,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 956 i32.const 0 call $~lib/builtins/abort @@ -21677,7 +21677,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 957 i32.const 0 call $~lib/builtins/abort @@ -21691,7 +21691,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 958 i32.const 0 call $~lib/builtins/abort @@ -21705,7 +21705,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 959 i32.const 0 call $~lib/builtins/abort @@ -21719,7 +21719,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 960 i32.const 0 call $~lib/builtins/abort @@ -21733,7 +21733,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 961 i32.const 0 call $~lib/builtins/abort @@ -21747,7 +21747,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 962 i32.const 0 call $~lib/builtins/abort @@ -21761,7 +21761,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1073 i32.const 0 call $~lib/builtins/abort @@ -21775,7 +21775,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1074 i32.const 0 call $~lib/builtins/abort @@ -21789,7 +21789,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1075 i32.const 0 call $~lib/builtins/abort @@ -21803,7 +21803,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1076 i32.const 0 call $~lib/builtins/abort @@ -21817,7 +21817,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1077 i32.const 0 call $~lib/builtins/abort @@ -21831,7 +21831,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1078 i32.const 0 call $~lib/builtins/abort @@ -21845,7 +21845,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1079 i32.const 0 call $~lib/builtins/abort @@ -21859,7 +21859,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1080 i32.const 0 call $~lib/builtins/abort @@ -21873,7 +21873,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1081 i32.const 0 call $~lib/builtins/abort @@ -21887,7 +21887,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1082 i32.const 0 call $~lib/builtins/abort @@ -21901,7 +21901,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1085 i32.const 0 call $~lib/builtins/abort @@ -21915,7 +21915,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1086 i32.const 0 call $~lib/builtins/abort @@ -21929,7 +21929,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1087 i32.const 0 call $~lib/builtins/abort @@ -21944,7 +21944,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1088 i32.const 0 call $~lib/builtins/abort @@ -21958,7 +21958,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1089 i32.const 0 call $~lib/builtins/abort @@ -21972,7 +21972,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1092 i32.const 0 call $~lib/builtins/abort @@ -21986,7 +21986,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1093 i32.const 0 call $~lib/builtins/abort @@ -22000,7 +22000,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1094 i32.const 0 call $~lib/builtins/abort @@ -22014,7 +22014,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1095 i32.const 0 call $~lib/builtins/abort @@ -22028,7 +22028,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1096 i32.const 0 call $~lib/builtins/abort @@ -22042,7 +22042,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1097 i32.const 0 call $~lib/builtins/abort @@ -22056,7 +22056,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1098 i32.const 0 call $~lib/builtins/abort @@ -22070,7 +22070,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1099 i32.const 0 call $~lib/builtins/abort @@ -22084,7 +22084,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1100 i32.const 0 call $~lib/builtins/abort @@ -22098,7 +22098,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1101 i32.const 0 call $~lib/builtins/abort @@ -22112,7 +22112,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1102 i32.const 0 call $~lib/builtins/abort @@ -22126,7 +22126,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1103 i32.const 0 call $~lib/builtins/abort @@ -22140,7 +22140,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1104 i32.const 0 call $~lib/builtins/abort @@ -22154,7 +22154,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1105 i32.const 0 call $~lib/builtins/abort @@ -22168,7 +22168,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1106 i32.const 0 call $~lib/builtins/abort @@ -22182,7 +22182,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1107 i32.const 0 call $~lib/builtins/abort @@ -22196,7 +22196,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1108 i32.const 0 call $~lib/builtins/abort @@ -22210,7 +22210,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1109 i32.const 0 call $~lib/builtins/abort @@ -22224,7 +22224,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1110 i32.const 0 call $~lib/builtins/abort @@ -22238,7 +22238,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1111 i32.const 0 call $~lib/builtins/abort @@ -22252,7 +22252,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1112 i32.const 0 call $~lib/builtins/abort @@ -22266,7 +22266,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1113 i32.const 0 call $~lib/builtins/abort @@ -22280,7 +22280,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1114 i32.const 0 call $~lib/builtins/abort @@ -22294,7 +22294,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1115 i32.const 0 call $~lib/builtins/abort @@ -22308,7 +22308,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1116 i32.const 0 call $~lib/builtins/abort @@ -22322,7 +22322,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1117 i32.const 0 call $~lib/builtins/abort @@ -22336,7 +22336,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1118 i32.const 0 call $~lib/builtins/abort @@ -22350,7 +22350,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1119 i32.const 0 call $~lib/builtins/abort @@ -22364,7 +22364,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1120 i32.const 0 call $~lib/builtins/abort @@ -22378,7 +22378,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1121 i32.const 0 call $~lib/builtins/abort @@ -22392,7 +22392,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1122 i32.const 0 call $~lib/builtins/abort @@ -22406,7 +22406,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1123 i32.const 0 call $~lib/builtins/abort @@ -22420,7 +22420,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1124 i32.const 0 call $~lib/builtins/abort @@ -22434,7 +22434,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1125 i32.const 0 call $~lib/builtins/abort @@ -22448,7 +22448,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1126 i32.const 0 call $~lib/builtins/abort @@ -22462,7 +22462,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1127 i32.const 0 call $~lib/builtins/abort @@ -22476,7 +22476,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1128 i32.const 0 call $~lib/builtins/abort @@ -22490,7 +22490,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1129 i32.const 0 call $~lib/builtins/abort @@ -22504,7 +22504,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1132 i32.const 0 call $~lib/builtins/abort @@ -22518,7 +22518,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1133 i32.const 0 call $~lib/builtins/abort @@ -22532,7 +22532,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1134 i32.const 0 call $~lib/builtins/abort @@ -22546,7 +22546,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1135 i32.const 0 call $~lib/builtins/abort @@ -22560,7 +22560,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1136 i32.const 0 call $~lib/builtins/abort @@ -22574,7 +22574,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1137 i32.const 0 call $~lib/builtins/abort @@ -22588,7 +22588,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1138 i32.const 0 call $~lib/builtins/abort @@ -22602,7 +22602,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1139 i32.const 0 call $~lib/builtins/abort @@ -22616,7 +22616,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1140 i32.const 0 call $~lib/builtins/abort @@ -22630,7 +22630,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1141 i32.const 0 call $~lib/builtins/abort @@ -22644,7 +22644,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1142 i32.const 0 call $~lib/builtins/abort @@ -22658,7 +22658,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1143 i32.const 0 call $~lib/builtins/abort @@ -22672,7 +22672,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1144 i32.const 0 call $~lib/builtins/abort @@ -22687,7 +22687,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1145 i32.const 0 call $~lib/builtins/abort @@ -22701,7 +22701,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1156 i32.const 0 call $~lib/builtins/abort @@ -22715,7 +22715,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1157 i32.const 0 call $~lib/builtins/abort @@ -22729,7 +22729,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1158 i32.const 0 call $~lib/builtins/abort @@ -22743,7 +22743,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1159 i32.const 0 call $~lib/builtins/abort @@ -22757,7 +22757,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1160 i32.const 0 call $~lib/builtins/abort @@ -22771,7 +22771,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1161 i32.const 0 call $~lib/builtins/abort @@ -22785,7 +22785,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1162 i32.const 0 call $~lib/builtins/abort @@ -22799,7 +22799,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1163 i32.const 0 call $~lib/builtins/abort @@ -22813,7 +22813,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1164 i32.const 0 call $~lib/builtins/abort @@ -22827,7 +22827,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1165 i32.const 0 call $~lib/builtins/abort @@ -22841,7 +22841,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1168 i32.const 0 call $~lib/builtins/abort @@ -22855,7 +22855,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1169 i32.const 0 call $~lib/builtins/abort @@ -22869,7 +22869,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1170 i32.const 0 call $~lib/builtins/abort @@ -22884,7 +22884,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1171 i32.const 0 call $~lib/builtins/abort @@ -22898,7 +22898,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1172 i32.const 0 call $~lib/builtins/abort @@ -22912,7 +22912,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1181 i32.const 0 call $~lib/builtins/abort @@ -22926,7 +22926,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1182 i32.const 0 call $~lib/builtins/abort @@ -22940,7 +22940,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1183 i32.const 0 call $~lib/builtins/abort @@ -22954,7 +22954,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1184 i32.const 0 call $~lib/builtins/abort @@ -22968,7 +22968,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1185 i32.const 0 call $~lib/builtins/abort @@ -22982,7 +22982,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1186 i32.const 0 call $~lib/builtins/abort @@ -22996,7 +22996,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1187 i32.const 0 call $~lib/builtins/abort @@ -23010,7 +23010,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1188 i32.const 0 call $~lib/builtins/abort @@ -23024,7 +23024,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1189 i32.const 0 call $~lib/builtins/abort @@ -23038,7 +23038,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1190 i32.const 0 call $~lib/builtins/abort @@ -23052,7 +23052,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1193 i32.const 0 call $~lib/builtins/abort @@ -23066,7 +23066,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1194 i32.const 0 call $~lib/builtins/abort @@ -23080,7 +23080,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1195 i32.const 0 call $~lib/builtins/abort @@ -23095,7 +23095,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1196 i32.const 0 call $~lib/builtins/abort @@ -23109,7 +23109,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1197 i32.const 0 call $~lib/builtins/abort @@ -23123,7 +23123,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1209 i32.const 0 call $~lib/builtins/abort @@ -23137,7 +23137,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1210 i32.const 0 call $~lib/builtins/abort @@ -23151,7 +23151,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1211 i32.const 0 call $~lib/builtins/abort @@ -23165,7 +23165,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1212 i32.const 0 call $~lib/builtins/abort @@ -23179,7 +23179,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1213 i32.const 0 call $~lib/builtins/abort @@ -23193,7 +23193,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1214 i32.const 0 call $~lib/builtins/abort @@ -23207,7 +23207,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1215 i32.const 0 call $~lib/builtins/abort @@ -23221,7 +23221,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1216 i32.const 0 call $~lib/builtins/abort @@ -23235,7 +23235,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1217 i32.const 0 call $~lib/builtins/abort @@ -23249,7 +23249,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1218 i32.const 0 call $~lib/builtins/abort @@ -23263,7 +23263,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1221 i32.const 0 call $~lib/builtins/abort @@ -23277,7 +23277,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1222 i32.const 0 call $~lib/builtins/abort @@ -23291,7 +23291,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1223 i32.const 0 call $~lib/builtins/abort @@ -23305,7 +23305,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1224 i32.const 0 call $~lib/builtins/abort @@ -23319,7 +23319,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1225 i32.const 0 call $~lib/builtins/abort @@ -23334,7 +23334,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1226 i32.const 0 call $~lib/builtins/abort @@ -23348,7 +23348,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1227 i32.const 0 call $~lib/builtins/abort @@ -23362,7 +23362,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1228 i32.const 0 call $~lib/builtins/abort @@ -23376,7 +23376,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1229 i32.const 0 call $~lib/builtins/abort @@ -23390,7 +23390,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1230 i32.const 0 call $~lib/builtins/abort @@ -23404,7 +23404,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1231 i32.const 0 call $~lib/builtins/abort @@ -23418,7 +23418,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1234 i32.const 0 call $~lib/builtins/abort @@ -23433,7 +23433,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1235 i32.const 0 call $~lib/builtins/abort @@ -23450,7 +23450,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1237 i32.const 0 call $~lib/builtins/abort @@ -23467,7 +23467,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1244 i32.const 0 call $~lib/builtins/abort @@ -23485,7 +23485,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1245 i32.const 0 call $~lib/builtins/abort @@ -23503,7 +23503,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1252 i32.const 0 call $~lib/builtins/abort @@ -23520,7 +23520,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1259 i32.const 0 call $~lib/builtins/abort @@ -23539,7 +23539,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1266 i32.const 0 call $~lib/builtins/abort @@ -23556,7 +23556,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1273 i32.const 0 call $~lib/builtins/abort @@ -23573,7 +23573,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1280 i32.const 0 call $~lib/builtins/abort @@ -23590,7 +23590,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1287 i32.const 0 call $~lib/builtins/abort @@ -23607,7 +23607,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1293 i32.const 0 call $~lib/builtins/abort @@ -23624,7 +23624,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1299 i32.const 0 call $~lib/builtins/abort @@ -23641,7 +23641,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1305 i32.const 0 call $~lib/builtins/abort @@ -23658,7 +23658,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1312 i32.const 0 call $~lib/builtins/abort @@ -23675,7 +23675,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1319 i32.const 0 call $~lib/builtins/abort @@ -23692,7 +23692,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1326 i32.const 0 call $~lib/builtins/abort @@ -23709,7 +23709,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1333 i32.const 0 call $~lib/builtins/abort @@ -23726,7 +23726,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1340 i32.const 0 call $~lib/builtins/abort @@ -23743,7 +23743,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1347 i32.const 0 call $~lib/builtins/abort @@ -23760,7 +23760,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1354 i32.const 0 call $~lib/builtins/abort @@ -23777,7 +23777,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1361 i32.const 0 call $~lib/builtins/abort @@ -23791,7 +23791,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1375 i32.const 0 call $~lib/builtins/abort @@ -23805,7 +23805,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1376 i32.const 0 call $~lib/builtins/abort @@ -23819,7 +23819,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1377 i32.const 0 call $~lib/builtins/abort @@ -23833,7 +23833,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1378 i32.const 0 call $~lib/builtins/abort @@ -23847,7 +23847,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1379 i32.const 0 call $~lib/builtins/abort @@ -23861,7 +23861,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1380 i32.const 0 call $~lib/builtins/abort @@ -23875,7 +23875,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1381 i32.const 0 call $~lib/builtins/abort @@ -23889,7 +23889,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1382 i32.const 0 call $~lib/builtins/abort @@ -23903,7 +23903,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1383 i32.const 0 call $~lib/builtins/abort @@ -23917,7 +23917,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1384 i32.const 0 call $~lib/builtins/abort @@ -23931,7 +23931,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1387 i32.const 0 call $~lib/builtins/abort @@ -23945,7 +23945,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1388 i32.const 0 call $~lib/builtins/abort @@ -23959,7 +23959,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1389 i32.const 0 call $~lib/builtins/abort @@ -23973,7 +23973,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1390 i32.const 0 call $~lib/builtins/abort @@ -23987,7 +23987,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1391 i32.const 0 call $~lib/builtins/abort @@ -24002,7 +24002,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1392 i32.const 0 call $~lib/builtins/abort @@ -24016,7 +24016,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1393 i32.const 0 call $~lib/builtins/abort @@ -24030,7 +24030,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1394 i32.const 0 call $~lib/builtins/abort @@ -24046,7 +24046,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1395 i32.const 0 call $~lib/builtins/abort @@ -24062,7 +24062,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1396 i32.const 0 call $~lib/builtins/abort @@ -24078,7 +24078,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1397 i32.const 0 call $~lib/builtins/abort @@ -24092,7 +24092,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1398 i32.const 0 call $~lib/builtins/abort @@ -24106,7 +24106,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1399 i32.const 0 call $~lib/builtins/abort @@ -24120,7 +24120,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1400 i32.const 0 call $~lib/builtins/abort @@ -24134,7 +24134,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1412 i32.const 0 call $~lib/builtins/abort @@ -24148,7 +24148,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1413 i32.const 0 call $~lib/builtins/abort @@ -24162,7 +24162,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1414 i32.const 0 call $~lib/builtins/abort @@ -24176,7 +24176,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1415 i32.const 0 call $~lib/builtins/abort @@ -24190,7 +24190,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1416 i32.const 0 call $~lib/builtins/abort @@ -24204,7 +24204,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1417 i32.const 0 call $~lib/builtins/abort @@ -24218,7 +24218,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1418 i32.const 0 call $~lib/builtins/abort @@ -24232,7 +24232,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1419 i32.const 0 call $~lib/builtins/abort @@ -24246,7 +24246,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1420 i32.const 0 call $~lib/builtins/abort @@ -24260,7 +24260,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1421 i32.const 0 call $~lib/builtins/abort @@ -24274,7 +24274,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1424 i32.const 0 call $~lib/builtins/abort @@ -24288,7 +24288,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1425 i32.const 0 call $~lib/builtins/abort @@ -24302,7 +24302,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1426 i32.const 0 call $~lib/builtins/abort @@ -24316,7 +24316,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1427 i32.const 0 call $~lib/builtins/abort @@ -24330,7 +24330,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1428 i32.const 0 call $~lib/builtins/abort @@ -24345,7 +24345,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1429 i32.const 0 call $~lib/builtins/abort @@ -24359,7 +24359,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1430 i32.const 0 call $~lib/builtins/abort @@ -24375,7 +24375,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1431 i32.const 0 call $~lib/builtins/abort @@ -24391,7 +24391,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1432 i32.const 0 call $~lib/builtins/abort @@ -24405,7 +24405,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1441 i32.const 0 call $~lib/builtins/abort @@ -24419,7 +24419,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1442 i32.const 0 call $~lib/builtins/abort @@ -24433,7 +24433,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1443 i32.const 0 call $~lib/builtins/abort @@ -24447,7 +24447,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1444 i32.const 0 call $~lib/builtins/abort @@ -24461,7 +24461,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1445 i32.const 0 call $~lib/builtins/abort @@ -24475,7 +24475,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1446 i32.const 0 call $~lib/builtins/abort @@ -24489,7 +24489,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1447 i32.const 0 call $~lib/builtins/abort @@ -24503,7 +24503,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1448 i32.const 0 call $~lib/builtins/abort @@ -24517,7 +24517,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1449 i32.const 0 call $~lib/builtins/abort @@ -24531,7 +24531,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1450 i32.const 0 call $~lib/builtins/abort @@ -24545,7 +24545,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1453 i32.const 0 call $~lib/builtins/abort @@ -24559,7 +24559,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1454 i32.const 0 call $~lib/builtins/abort @@ -24573,7 +24573,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1455 i32.const 0 call $~lib/builtins/abort @@ -24587,7 +24587,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1456 i32.const 0 call $~lib/builtins/abort @@ -24601,7 +24601,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1457 i32.const 0 call $~lib/builtins/abort @@ -24616,7 +24616,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1458 i32.const 0 call $~lib/builtins/abort @@ -24630,7 +24630,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1459 i32.const 0 call $~lib/builtins/abort @@ -24644,7 +24644,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1471 i32.const 0 call $~lib/builtins/abort @@ -24658,7 +24658,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1472 i32.const 0 call $~lib/builtins/abort @@ -24672,7 +24672,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1473 i32.const 0 call $~lib/builtins/abort @@ -24686,7 +24686,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1474 i32.const 0 call $~lib/builtins/abort @@ -24700,7 +24700,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1475 i32.const 0 call $~lib/builtins/abort @@ -24714,7 +24714,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1476 i32.const 0 call $~lib/builtins/abort @@ -24728,7 +24728,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1477 i32.const 0 call $~lib/builtins/abort @@ -24742,7 +24742,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1478 i32.const 0 call $~lib/builtins/abort @@ -24756,7 +24756,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1479 i32.const 0 call $~lib/builtins/abort @@ -24770,7 +24770,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1480 i32.const 0 call $~lib/builtins/abort @@ -24784,7 +24784,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1483 i32.const 0 call $~lib/builtins/abort @@ -24798,7 +24798,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1484 i32.const 0 call $~lib/builtins/abort @@ -24814,7 +24814,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1485 i32.const 0 call $~lib/builtins/abort @@ -24828,7 +24828,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1486 i32.const 0 call $~lib/builtins/abort @@ -24842,7 +24842,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1487 i32.const 0 call $~lib/builtins/abort @@ -24856,7 +24856,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1488 i32.const 0 call $~lib/builtins/abort @@ -24870,7 +24870,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1489 i32.const 0 call $~lib/builtins/abort @@ -24884,7 +24884,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1490 i32.const 0 call $~lib/builtins/abort @@ -24898,7 +24898,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1491 i32.const 0 call $~lib/builtins/abort @@ -24912,7 +24912,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1492 i32.const 0 call $~lib/builtins/abort @@ -24926,7 +24926,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1493 i32.const 0 call $~lib/builtins/abort @@ -24940,7 +24940,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1494 i32.const 0 call $~lib/builtins/abort @@ -24954,7 +24954,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1495 i32.const 0 call $~lib/builtins/abort @@ -24968,7 +24968,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1496 i32.const 0 call $~lib/builtins/abort @@ -24982,7 +24982,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1497 i32.const 0 call $~lib/builtins/abort @@ -24996,7 +24996,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1506 i32.const 0 call $~lib/builtins/abort @@ -25010,7 +25010,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1507 i32.const 0 call $~lib/builtins/abort @@ -25024,7 +25024,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1508 i32.const 0 call $~lib/builtins/abort @@ -25038,7 +25038,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1509 i32.const 0 call $~lib/builtins/abort @@ -25052,7 +25052,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1510 i32.const 0 call $~lib/builtins/abort @@ -25066,7 +25066,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1511 i32.const 0 call $~lib/builtins/abort @@ -25080,7 +25080,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1512 i32.const 0 call $~lib/builtins/abort @@ -25094,7 +25094,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1513 i32.const 0 call $~lib/builtins/abort @@ -25108,7 +25108,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1514 i32.const 0 call $~lib/builtins/abort @@ -25122,7 +25122,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1515 i32.const 0 call $~lib/builtins/abort @@ -25136,7 +25136,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1518 i32.const 0 call $~lib/builtins/abort @@ -25150,7 +25150,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1519 i32.const 0 call $~lib/builtins/abort @@ -25166,7 +25166,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1520 i32.const 0 call $~lib/builtins/abort @@ -25180,7 +25180,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1521 i32.const 0 call $~lib/builtins/abort @@ -25194,7 +25194,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1522 i32.const 0 call $~lib/builtins/abort @@ -25208,7 +25208,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1523 i32.const 0 call $~lib/builtins/abort @@ -25222,7 +25222,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1524 i32.const 0 call $~lib/builtins/abort @@ -25236,7 +25236,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1525 i32.const 0 call $~lib/builtins/abort @@ -25250,7 +25250,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1526 i32.const 0 call $~lib/builtins/abort @@ -25264,7 +25264,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1527 i32.const 0 call $~lib/builtins/abort @@ -25278,7 +25278,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1528 i32.const 0 call $~lib/builtins/abort @@ -25292,7 +25292,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1529 i32.const 0 call $~lib/builtins/abort @@ -25306,7 +25306,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1530 i32.const 0 call $~lib/builtins/abort @@ -25320,7 +25320,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1531 i32.const 0 call $~lib/builtins/abort @@ -25334,7 +25334,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1532 i32.const 0 call $~lib/builtins/abort @@ -25349,7 +25349,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1544 i32.const 0 call $~lib/builtins/abort @@ -25364,7 +25364,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1545 i32.const 0 call $~lib/builtins/abort @@ -25379,7 +25379,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1546 i32.const 0 call $~lib/builtins/abort @@ -25394,7 +25394,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1547 i32.const 0 call $~lib/builtins/abort @@ -25409,7 +25409,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1548 i32.const 0 call $~lib/builtins/abort @@ -25424,7 +25424,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1549 i32.const 0 call $~lib/builtins/abort @@ -25439,7 +25439,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1550 i32.const 0 call $~lib/builtins/abort @@ -25454,7 +25454,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1551 i32.const 0 call $~lib/builtins/abort @@ -25469,7 +25469,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1552 i32.const 0 call $~lib/builtins/abort @@ -25484,7 +25484,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1553 i32.const 0 call $~lib/builtins/abort @@ -25499,7 +25499,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1556 i32.const 0 call $~lib/builtins/abort @@ -25514,7 +25514,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1557 i32.const 0 call $~lib/builtins/abort @@ -25529,7 +25529,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1558 i32.const 0 call $~lib/builtins/abort @@ -25544,7 +25544,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1559 i32.const 0 call $~lib/builtins/abort @@ -25559,7 +25559,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1560 i32.const 0 call $~lib/builtins/abort @@ -25574,7 +25574,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1561 i32.const 0 call $~lib/builtins/abort @@ -25589,7 +25589,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1562 i32.const 0 call $~lib/builtins/abort @@ -25604,7 +25604,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1563 i32.const 0 call $~lib/builtins/abort @@ -25619,7 +25619,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1564 i32.const 0 call $~lib/builtins/abort @@ -25634,7 +25634,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1565 i32.const 0 call $~lib/builtins/abort @@ -25649,7 +25649,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1566 i32.const 0 call $~lib/builtins/abort @@ -25664,7 +25664,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1567 i32.const 0 call $~lib/builtins/abort @@ -25679,7 +25679,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1568 i32.const 0 call $~lib/builtins/abort @@ -25695,7 +25695,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1569 i32.const 0 call $~lib/builtins/abort @@ -25711,7 +25711,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1570 i32.const 0 call $~lib/builtins/abort @@ -25727,7 +25727,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1571 i32.const 0 call $~lib/builtins/abort @@ -25743,7 +25743,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1572 i32.const 0 call $~lib/builtins/abort @@ -25758,7 +25758,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1573 i32.const 0 call $~lib/builtins/abort @@ -25773,7 +25773,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1574 i32.const 0 call $~lib/builtins/abort @@ -25788,7 +25788,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1583 i32.const 0 call $~lib/builtins/abort @@ -25803,7 +25803,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1584 i32.const 0 call $~lib/builtins/abort @@ -25818,7 +25818,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1585 i32.const 0 call $~lib/builtins/abort @@ -25833,7 +25833,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1586 i32.const 0 call $~lib/builtins/abort @@ -25848,7 +25848,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1587 i32.const 0 call $~lib/builtins/abort @@ -25863,7 +25863,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1588 i32.const 0 call $~lib/builtins/abort @@ -25878,7 +25878,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1589 i32.const 0 call $~lib/builtins/abort @@ -25893,7 +25893,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1590 i32.const 0 call $~lib/builtins/abort @@ -25908,7 +25908,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1591 i32.const 0 call $~lib/builtins/abort @@ -25923,7 +25923,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1592 i32.const 0 call $~lib/builtins/abort @@ -25938,7 +25938,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1595 i32.const 0 call $~lib/builtins/abort @@ -25953,7 +25953,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1596 i32.const 0 call $~lib/builtins/abort @@ -25968,7 +25968,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1597 i32.const 0 call $~lib/builtins/abort @@ -25983,7 +25983,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1598 i32.const 0 call $~lib/builtins/abort @@ -25998,7 +25998,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1599 i32.const 0 call $~lib/builtins/abort @@ -26013,7 +26013,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1600 i32.const 0 call $~lib/builtins/abort @@ -26028,7 +26028,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1601 i32.const 0 call $~lib/builtins/abort @@ -26043,7 +26043,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1602 i32.const 0 call $~lib/builtins/abort @@ -26058,7 +26058,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1603 i32.const 0 call $~lib/builtins/abort @@ -26073,7 +26073,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1604 i32.const 0 call $~lib/builtins/abort @@ -26088,7 +26088,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1605 i32.const 0 call $~lib/builtins/abort @@ -26103,7 +26103,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1606 i32.const 0 call $~lib/builtins/abort @@ -26118,7 +26118,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1607 i32.const 0 call $~lib/builtins/abort @@ -26134,7 +26134,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1608 i32.const 0 call $~lib/builtins/abort @@ -26150,7 +26150,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1609 i32.const 0 call $~lib/builtins/abort @@ -26166,7 +26166,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1610 i32.const 0 call $~lib/builtins/abort @@ -26182,7 +26182,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1611 i32.const 0 call $~lib/builtins/abort @@ -26197,7 +26197,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1612 i32.const 0 call $~lib/builtins/abort @@ -26212,7 +26212,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1613 i32.const 0 call $~lib/builtins/abort @@ -26226,7 +26226,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1625 i32.const 0 call $~lib/builtins/abort @@ -26240,7 +26240,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1626 i32.const 0 call $~lib/builtins/abort @@ -26254,7 +26254,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1627 i32.const 0 call $~lib/builtins/abort @@ -26268,7 +26268,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1628 i32.const 0 call $~lib/builtins/abort @@ -26282,7 +26282,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1629 i32.const 0 call $~lib/builtins/abort @@ -26296,7 +26296,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1630 i32.const 0 call $~lib/builtins/abort @@ -26310,7 +26310,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1631 i32.const 0 call $~lib/builtins/abort @@ -26324,7 +26324,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1632 i32.const 0 call $~lib/builtins/abort @@ -26338,7 +26338,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1633 i32.const 0 call $~lib/builtins/abort @@ -26352,7 +26352,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1634 i32.const 0 call $~lib/builtins/abort @@ -26367,7 +26367,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1637 i32.const 0 call $~lib/builtins/abort @@ -26382,7 +26382,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1638 i32.const 0 call $~lib/builtins/abort @@ -26396,7 +26396,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1639 i32.const 0 call $~lib/builtins/abort @@ -26410,7 +26410,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1640 i32.const 0 call $~lib/builtins/abort @@ -26424,7 +26424,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1641 i32.const 0 call $~lib/builtins/abort @@ -26438,7 +26438,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1642 i32.const 0 call $~lib/builtins/abort @@ -26453,7 +26453,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1643 i32.const 0 call $~lib/builtins/abort @@ -26467,7 +26467,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1644 i32.const 0 call $~lib/builtins/abort @@ -26482,7 +26482,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1653 i32.const 0 call $~lib/builtins/abort @@ -26497,7 +26497,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1654 i32.const 0 call $~lib/builtins/abort @@ -26511,7 +26511,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1655 i32.const 0 call $~lib/builtins/abort @@ -26525,7 +26525,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1656 i32.const 0 call $~lib/builtins/abort @@ -26539,7 +26539,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1657 i32.const 0 call $~lib/builtins/abort @@ -26553,7 +26553,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1658 i32.const 0 call $~lib/builtins/abort @@ -26568,7 +26568,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1659 i32.const 0 call $~lib/builtins/abort @@ -26582,7 +26582,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1660 i32.const 0 call $~lib/builtins/abort @@ -26597,7 +26597,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1663 i32.const 0 call $~lib/builtins/abort @@ -26612,7 +26612,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1664 i32.const 0 call $~lib/builtins/abort @@ -26626,7 +26626,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1665 i32.const 0 call $~lib/builtins/abort @@ -26640,7 +26640,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1666 i32.const 0 call $~lib/builtins/abort @@ -26654,7 +26654,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1667 i32.const 0 call $~lib/builtins/abort @@ -26668,7 +26668,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1668 i32.const 0 call $~lib/builtins/abort @@ -26683,7 +26683,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1669 i32.const 0 call $~lib/builtins/abort @@ -26697,7 +26697,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1670 i32.const 0 call $~lib/builtins/abort @@ -26711,7 +26711,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1682 i32.const 0 call $~lib/builtins/abort @@ -26725,7 +26725,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1683 i32.const 0 call $~lib/builtins/abort @@ -26739,7 +26739,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1684 i32.const 0 call $~lib/builtins/abort @@ -26753,7 +26753,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1685 i32.const 0 call $~lib/builtins/abort @@ -26767,7 +26767,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1686 i32.const 0 call $~lib/builtins/abort @@ -26781,7 +26781,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1687 i32.const 0 call $~lib/builtins/abort @@ -26795,7 +26795,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1688 i32.const 0 call $~lib/builtins/abort @@ -26809,7 +26809,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1689 i32.const 0 call $~lib/builtins/abort @@ -26823,7 +26823,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1690 i32.const 0 call $~lib/builtins/abort @@ -26837,7 +26837,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1691 i32.const 0 call $~lib/builtins/abort @@ -26852,7 +26852,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1694 i32.const 0 call $~lib/builtins/abort @@ -26867,7 +26867,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1695 i32.const 0 call $~lib/builtins/abort @@ -26881,7 +26881,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1696 i32.const 0 call $~lib/builtins/abort @@ -26895,7 +26895,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1697 i32.const 0 call $~lib/builtins/abort @@ -26909,7 +26909,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1698 i32.const 0 call $~lib/builtins/abort @@ -26923,7 +26923,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1699 i32.const 0 call $~lib/builtins/abort @@ -26938,7 +26938,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1700 i32.const 0 call $~lib/builtins/abort @@ -26952,7 +26952,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1701 i32.const 0 call $~lib/builtins/abort @@ -26966,7 +26966,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1710 i32.const 0 call $~lib/builtins/abort @@ -26980,7 +26980,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1711 i32.const 0 call $~lib/builtins/abort @@ -26994,7 +26994,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1712 i32.const 0 call $~lib/builtins/abort @@ -27008,7 +27008,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1713 i32.const 0 call $~lib/builtins/abort @@ -27022,7 +27022,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1714 i32.const 0 call $~lib/builtins/abort @@ -27036,7 +27036,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1715 i32.const 0 call $~lib/builtins/abort @@ -27050,7 +27050,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1716 i32.const 0 call $~lib/builtins/abort @@ -27064,7 +27064,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1717 i32.const 0 call $~lib/builtins/abort @@ -27078,7 +27078,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1718 i32.const 0 call $~lib/builtins/abort @@ -27092,7 +27092,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1719 i32.const 0 call $~lib/builtins/abort @@ -27107,7 +27107,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1722 i32.const 0 call $~lib/builtins/abort @@ -27122,7 +27122,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1723 i32.const 0 call $~lib/builtins/abort @@ -27136,7 +27136,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1724 i32.const 0 call $~lib/builtins/abort @@ -27150,7 +27150,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1725 i32.const 0 call $~lib/builtins/abort @@ -27164,7 +27164,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1726 i32.const 0 call $~lib/builtins/abort @@ -27178,7 +27178,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1727 i32.const 0 call $~lib/builtins/abort @@ -27193,7 +27193,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1728 i32.const 0 call $~lib/builtins/abort @@ -27207,7 +27207,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1729 i32.const 0 call $~lib/builtins/abort @@ -27221,7 +27221,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1741 i32.const 0 call $~lib/builtins/abort @@ -27235,7 +27235,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1742 i32.const 0 call $~lib/builtins/abort @@ -27249,7 +27249,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1743 i32.const 0 call $~lib/builtins/abort @@ -27263,7 +27263,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1744 i32.const 0 call $~lib/builtins/abort @@ -27277,7 +27277,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1745 i32.const 0 call $~lib/builtins/abort @@ -27291,7 +27291,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1746 i32.const 0 call $~lib/builtins/abort @@ -27305,7 +27305,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1747 i32.const 0 call $~lib/builtins/abort @@ -27319,7 +27319,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1748 i32.const 0 call $~lib/builtins/abort @@ -27333,7 +27333,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1749 i32.const 0 call $~lib/builtins/abort @@ -27347,7 +27347,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1750 i32.const 0 call $~lib/builtins/abort @@ -27361,7 +27361,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1753 i32.const 0 call $~lib/builtins/abort @@ -27375,7 +27375,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1754 i32.const 0 call $~lib/builtins/abort @@ -27389,7 +27389,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1755 i32.const 0 call $~lib/builtins/abort @@ -27403,7 +27403,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1756 i32.const 0 call $~lib/builtins/abort @@ -27418,7 +27418,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1757 i32.const 0 call $~lib/builtins/abort @@ -27432,7 +27432,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1758 i32.const 0 call $~lib/builtins/abort @@ -27447,7 +27447,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1759 i32.const 0 call $~lib/builtins/abort @@ -27461,7 +27461,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1760 i32.const 0 call $~lib/builtins/abort @@ -27475,7 +27475,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1769 i32.const 0 call $~lib/builtins/abort @@ -27489,7 +27489,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1770 i32.const 0 call $~lib/builtins/abort @@ -27503,7 +27503,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1771 i32.const 0 call $~lib/builtins/abort @@ -27517,7 +27517,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1772 i32.const 0 call $~lib/builtins/abort @@ -27531,7 +27531,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1773 i32.const 0 call $~lib/builtins/abort @@ -27545,7 +27545,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1774 i32.const 0 call $~lib/builtins/abort @@ -27559,7 +27559,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1775 i32.const 0 call $~lib/builtins/abort @@ -27573,7 +27573,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1776 i32.const 0 call $~lib/builtins/abort @@ -27587,7 +27587,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1777 i32.const 0 call $~lib/builtins/abort @@ -27601,7 +27601,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1778 i32.const 0 call $~lib/builtins/abort @@ -27615,7 +27615,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1781 i32.const 0 call $~lib/builtins/abort @@ -27629,7 +27629,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1782 i32.const 0 call $~lib/builtins/abort @@ -27643,7 +27643,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1783 i32.const 0 call $~lib/builtins/abort @@ -27657,7 +27657,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1784 i32.const 0 call $~lib/builtins/abort @@ -27672,7 +27672,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1785 i32.const 0 call $~lib/builtins/abort @@ -27686,7 +27686,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1786 i32.const 0 call $~lib/builtins/abort @@ -27701,7 +27701,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1787 i32.const 0 call $~lib/builtins/abort @@ -27715,7 +27715,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1788 i32.const 0 call $~lib/builtins/abort @@ -27731,7 +27731,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1789 i32.const 0 call $~lib/builtins/abort @@ -27745,7 +27745,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1801 i32.const 0 call $~lib/builtins/abort @@ -27759,7 +27759,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1802 i32.const 0 call $~lib/builtins/abort @@ -27773,7 +27773,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1803 i32.const 0 call $~lib/builtins/abort @@ -27787,7 +27787,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1804 i32.const 0 call $~lib/builtins/abort @@ -27801,7 +27801,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1805 i32.const 0 call $~lib/builtins/abort @@ -27815,7 +27815,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1806 i32.const 0 call $~lib/builtins/abort @@ -27829,7 +27829,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1807 i32.const 0 call $~lib/builtins/abort @@ -27843,7 +27843,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1808 i32.const 0 call $~lib/builtins/abort @@ -27857,7 +27857,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1809 i32.const 0 call $~lib/builtins/abort @@ -27871,7 +27871,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1810 i32.const 0 call $~lib/builtins/abort @@ -27886,7 +27886,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1813 i32.const 0 call $~lib/builtins/abort @@ -27901,7 +27901,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1814 i32.const 0 call $~lib/builtins/abort @@ -27915,7 +27915,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1815 i32.const 0 call $~lib/builtins/abort @@ -27929,7 +27929,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1816 i32.const 0 call $~lib/builtins/abort @@ -27943,7 +27943,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1817 i32.const 0 call $~lib/builtins/abort @@ -27957,7 +27957,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1818 i32.const 0 call $~lib/builtins/abort @@ -27972,7 +27972,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1819 i32.const 0 call $~lib/builtins/abort @@ -27986,7 +27986,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1820 i32.const 0 call $~lib/builtins/abort @@ -28000,7 +28000,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1829 i32.const 0 call $~lib/builtins/abort @@ -28014,7 +28014,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1830 i32.const 0 call $~lib/builtins/abort @@ -28028,7 +28028,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1831 i32.const 0 call $~lib/builtins/abort @@ -28042,7 +28042,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1832 i32.const 0 call $~lib/builtins/abort @@ -28056,7 +28056,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1833 i32.const 0 call $~lib/builtins/abort @@ -28070,7 +28070,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1834 i32.const 0 call $~lib/builtins/abort @@ -28084,7 +28084,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1835 i32.const 0 call $~lib/builtins/abort @@ -28098,7 +28098,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1836 i32.const 0 call $~lib/builtins/abort @@ -28112,7 +28112,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1837 i32.const 0 call $~lib/builtins/abort @@ -28126,7 +28126,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1838 i32.const 0 call $~lib/builtins/abort @@ -28141,7 +28141,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1841 i32.const 0 call $~lib/builtins/abort @@ -28156,7 +28156,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1842 i32.const 0 call $~lib/builtins/abort @@ -28170,7 +28170,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1843 i32.const 0 call $~lib/builtins/abort @@ -28184,7 +28184,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1844 i32.const 0 call $~lib/builtins/abort @@ -28198,7 +28198,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1845 i32.const 0 call $~lib/builtins/abort @@ -28212,7 +28212,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1846 i32.const 0 call $~lib/builtins/abort @@ -28227,7 +28227,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1847 i32.const 0 call $~lib/builtins/abort @@ -28241,7 +28241,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1848 i32.const 0 call $~lib/builtins/abort @@ -28256,7 +28256,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1860 i32.const 0 call $~lib/builtins/abort @@ -28271,7 +28271,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1861 i32.const 0 call $~lib/builtins/abort @@ -28286,7 +28286,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1862 i32.const 0 call $~lib/builtins/abort @@ -28301,7 +28301,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1863 i32.const 0 call $~lib/builtins/abort @@ -28316,7 +28316,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1864 i32.const 0 call $~lib/builtins/abort @@ -28331,7 +28331,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1865 i32.const 0 call $~lib/builtins/abort @@ -28346,7 +28346,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1866 i32.const 0 call $~lib/builtins/abort @@ -28361,7 +28361,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1867 i32.const 0 call $~lib/builtins/abort @@ -28376,7 +28376,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1868 i32.const 0 call $~lib/builtins/abort @@ -28391,7 +28391,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1869 i32.const 0 call $~lib/builtins/abort @@ -28406,7 +28406,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1872 i32.const 0 call $~lib/builtins/abort @@ -28421,7 +28421,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1873 i32.const 0 call $~lib/builtins/abort @@ -28436,7 +28436,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1874 i32.const 0 call $~lib/builtins/abort @@ -28451,7 +28451,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1875 i32.const 0 call $~lib/builtins/abort @@ -28466,7 +28466,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1876 i32.const 0 call $~lib/builtins/abort @@ -28481,7 +28481,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1877 i32.const 0 call $~lib/builtins/abort @@ -28496,7 +28496,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1878 i32.const 0 call $~lib/builtins/abort @@ -28512,7 +28512,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1879 i32.const 0 call $~lib/builtins/abort @@ -28527,7 +28527,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1880 i32.const 0 call $~lib/builtins/abort @@ -28542,7 +28542,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1881 i32.const 0 call $~lib/builtins/abort @@ -28557,7 +28557,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1882 i32.const 0 call $~lib/builtins/abort @@ -28572,7 +28572,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1883 i32.const 0 call $~lib/builtins/abort @@ -28587,7 +28587,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1884 i32.const 0 call $~lib/builtins/abort @@ -28602,7 +28602,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1885 i32.const 0 call $~lib/builtins/abort @@ -28617,7 +28617,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1886 i32.const 0 call $~lib/builtins/abort @@ -28632,7 +28632,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1887 i32.const 0 call $~lib/builtins/abort @@ -28648,7 +28648,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1888 i32.const 0 call $~lib/builtins/abort @@ -28663,7 +28663,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1889 i32.const 0 call $~lib/builtins/abort @@ -28678,7 +28678,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1890 i32.const 0 call $~lib/builtins/abort @@ -28693,7 +28693,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1891 i32.const 0 call $~lib/builtins/abort @@ -28708,7 +28708,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1892 i32.const 0 call $~lib/builtins/abort @@ -28724,7 +28724,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1893 i32.const 0 call $~lib/builtins/abort @@ -28739,7 +28739,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1894 i32.const 0 call $~lib/builtins/abort @@ -28754,7 +28754,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1895 i32.const 0 call $~lib/builtins/abort @@ -28769,7 +28769,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1896 i32.const 0 call $~lib/builtins/abort @@ -28784,7 +28784,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1897 i32.const 0 call $~lib/builtins/abort @@ -28800,7 +28800,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1898 i32.const 0 call $~lib/builtins/abort @@ -28815,7 +28815,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1899 i32.const 0 call $~lib/builtins/abort @@ -28830,7 +28830,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1900 i32.const 0 call $~lib/builtins/abort @@ -28845,7 +28845,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1901 i32.const 0 call $~lib/builtins/abort @@ -28860,7 +28860,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1902 i32.const 0 call $~lib/builtins/abort @@ -28876,7 +28876,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1903 i32.const 0 call $~lib/builtins/abort @@ -28891,7 +28891,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1904 i32.const 0 call $~lib/builtins/abort @@ -28906,7 +28906,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1905 i32.const 0 call $~lib/builtins/abort @@ -28921,7 +28921,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1906 i32.const 0 call $~lib/builtins/abort @@ -28937,7 +28937,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1907 i32.const 0 call $~lib/builtins/abort @@ -28952,7 +28952,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1908 i32.const 0 call $~lib/builtins/abort @@ -28967,7 +28967,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1909 i32.const 0 call $~lib/builtins/abort @@ -28982,7 +28982,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1910 i32.const 0 call $~lib/builtins/abort @@ -28997,7 +28997,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1911 i32.const 0 call $~lib/builtins/abort @@ -29013,7 +29013,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1912 i32.const 0 call $~lib/builtins/abort @@ -29029,7 +29029,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1913 i32.const 0 call $~lib/builtins/abort @@ -29045,7 +29045,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1914 i32.const 0 call $~lib/builtins/abort @@ -29060,7 +29060,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1915 i32.const 0 call $~lib/builtins/abort @@ -29075,7 +29075,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1916 i32.const 0 call $~lib/builtins/abort @@ -29090,7 +29090,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1917 i32.const 0 call $~lib/builtins/abort @@ -29105,7 +29105,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1918 i32.const 0 call $~lib/builtins/abort @@ -29120,7 +29120,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1919 i32.const 0 call $~lib/builtins/abort @@ -29135,7 +29135,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1920 i32.const 0 call $~lib/builtins/abort @@ -29151,7 +29151,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1921 i32.const 0 call $~lib/builtins/abort @@ -29167,7 +29167,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1922 i32.const 0 call $~lib/builtins/abort @@ -29183,7 +29183,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1923 i32.const 0 call $~lib/builtins/abort @@ -29199,7 +29199,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1924 i32.const 0 call $~lib/builtins/abort @@ -29217,7 +29217,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1925 i32.const 0 call $~lib/builtins/abort @@ -29232,7 +29232,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1926 i32.const 0 call $~lib/builtins/abort @@ -29247,7 +29247,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1927 i32.const 0 call $~lib/builtins/abort @@ -29262,7 +29262,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1928 i32.const 0 call $~lib/builtins/abort @@ -29277,7 +29277,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1929 i32.const 0 call $~lib/builtins/abort @@ -29292,7 +29292,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1938 i32.const 0 call $~lib/builtins/abort @@ -29307,7 +29307,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1939 i32.const 0 call $~lib/builtins/abort @@ -29322,7 +29322,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1940 i32.const 0 call $~lib/builtins/abort @@ -29337,7 +29337,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1941 i32.const 0 call $~lib/builtins/abort @@ -29352,7 +29352,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1942 i32.const 0 call $~lib/builtins/abort @@ -29367,7 +29367,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1943 i32.const 0 call $~lib/builtins/abort @@ -29382,7 +29382,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1944 i32.const 0 call $~lib/builtins/abort @@ -29397,7 +29397,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1945 i32.const 0 call $~lib/builtins/abort @@ -29412,7 +29412,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1946 i32.const 0 call $~lib/builtins/abort @@ -29427,7 +29427,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1947 i32.const 0 call $~lib/builtins/abort @@ -29442,7 +29442,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1950 i32.const 0 call $~lib/builtins/abort @@ -29457,7 +29457,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1951 i32.const 0 call $~lib/builtins/abort @@ -29472,7 +29472,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1952 i32.const 0 call $~lib/builtins/abort @@ -29487,7 +29487,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1953 i32.const 0 call $~lib/builtins/abort @@ -29502,7 +29502,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1954 i32.const 0 call $~lib/builtins/abort @@ -29517,7 +29517,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1955 i32.const 0 call $~lib/builtins/abort @@ -29532,7 +29532,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1956 i32.const 0 call $~lib/builtins/abort @@ -29548,7 +29548,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1957 i32.const 0 call $~lib/builtins/abort @@ -29563,7 +29563,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1958 i32.const 0 call $~lib/builtins/abort @@ -29578,7 +29578,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1959 i32.const 0 call $~lib/builtins/abort @@ -29593,7 +29593,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1960 i32.const 0 call $~lib/builtins/abort @@ -29608,7 +29608,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1961 i32.const 0 call $~lib/builtins/abort @@ -29623,7 +29623,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1962 i32.const 0 call $~lib/builtins/abort @@ -29638,7 +29638,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1963 i32.const 0 call $~lib/builtins/abort @@ -29653,7 +29653,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1964 i32.const 0 call $~lib/builtins/abort @@ -29668,7 +29668,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1965 i32.const 0 call $~lib/builtins/abort @@ -29684,7 +29684,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1966 i32.const 0 call $~lib/builtins/abort @@ -29699,7 +29699,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1967 i32.const 0 call $~lib/builtins/abort @@ -29714,7 +29714,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1968 i32.const 0 call $~lib/builtins/abort @@ -29729,7 +29729,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1969 i32.const 0 call $~lib/builtins/abort @@ -29744,7 +29744,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1970 i32.const 0 call $~lib/builtins/abort @@ -29760,7 +29760,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1971 i32.const 0 call $~lib/builtins/abort @@ -29775,7 +29775,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1972 i32.const 0 call $~lib/builtins/abort @@ -29790,7 +29790,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1973 i32.const 0 call $~lib/builtins/abort @@ -29805,7 +29805,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1974 i32.const 0 call $~lib/builtins/abort @@ -29820,7 +29820,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1975 i32.const 0 call $~lib/builtins/abort @@ -29836,7 +29836,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1976 i32.const 0 call $~lib/builtins/abort @@ -29851,7 +29851,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1977 i32.const 0 call $~lib/builtins/abort @@ -29866,7 +29866,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1978 i32.const 0 call $~lib/builtins/abort @@ -29881,7 +29881,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1979 i32.const 0 call $~lib/builtins/abort @@ -29896,7 +29896,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1980 i32.const 0 call $~lib/builtins/abort @@ -29912,7 +29912,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1981 i32.const 0 call $~lib/builtins/abort @@ -29927,7 +29927,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1982 i32.const 0 call $~lib/builtins/abort @@ -29942,7 +29942,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1983 i32.const 0 call $~lib/builtins/abort @@ -29957,7 +29957,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1984 i32.const 0 call $~lib/builtins/abort @@ -29973,7 +29973,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1985 i32.const 0 call $~lib/builtins/abort @@ -29988,7 +29988,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1986 i32.const 0 call $~lib/builtins/abort @@ -30003,7 +30003,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1987 i32.const 0 call $~lib/builtins/abort @@ -30018,7 +30018,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1988 i32.const 0 call $~lib/builtins/abort @@ -30033,7 +30033,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1989 i32.const 0 call $~lib/builtins/abort @@ -30049,7 +30049,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1990 i32.const 0 call $~lib/builtins/abort @@ -30065,7 +30065,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1991 i32.const 0 call $~lib/builtins/abort @@ -30081,7 +30081,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1992 i32.const 0 call $~lib/builtins/abort @@ -30096,7 +30096,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1993 i32.const 0 call $~lib/builtins/abort @@ -30111,7 +30111,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1994 i32.const 0 call $~lib/builtins/abort @@ -30126,7 +30126,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1995 i32.const 0 call $~lib/builtins/abort @@ -30141,7 +30141,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1996 i32.const 0 call $~lib/builtins/abort @@ -30156,7 +30156,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1997 i32.const 0 call $~lib/builtins/abort @@ -30171,7 +30171,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1998 i32.const 0 call $~lib/builtins/abort @@ -30187,7 +30187,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 1999 i32.const 0 call $~lib/builtins/abort @@ -30203,7 +30203,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2000 i32.const 0 call $~lib/builtins/abort @@ -30219,7 +30219,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2001 i32.const 0 call $~lib/builtins/abort @@ -30235,7 +30235,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2002 i32.const 0 call $~lib/builtins/abort @@ -30253,7 +30253,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2003 i32.const 0 call $~lib/builtins/abort @@ -30268,7 +30268,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2004 i32.const 0 call $~lib/builtins/abort @@ -30283,7 +30283,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2005 i32.const 0 call $~lib/builtins/abort @@ -30298,7 +30298,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2006 i32.const 0 call $~lib/builtins/abort @@ -30313,7 +30313,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2007 i32.const 0 call $~lib/builtins/abort @@ -30328,7 +30328,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2019 i32.const 0 call $~lib/builtins/abort @@ -30343,7 +30343,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2020 i32.const 0 call $~lib/builtins/abort @@ -30358,7 +30358,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2021 i32.const 0 call $~lib/builtins/abort @@ -30373,7 +30373,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2022 i32.const 0 call $~lib/builtins/abort @@ -30388,7 +30388,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2023 i32.const 0 call $~lib/builtins/abort @@ -30403,7 +30403,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2024 i32.const 0 call $~lib/builtins/abort @@ -30418,7 +30418,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2025 i32.const 0 call $~lib/builtins/abort @@ -30433,7 +30433,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2026 i32.const 0 call $~lib/builtins/abort @@ -30448,7 +30448,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2027 i32.const 0 call $~lib/builtins/abort @@ -30463,7 +30463,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2028 i32.const 0 call $~lib/builtins/abort @@ -30478,7 +30478,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2031 i32.const 0 call $~lib/builtins/abort @@ -30493,7 +30493,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2032 i32.const 0 call $~lib/builtins/abort @@ -30508,7 +30508,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2033 i32.const 0 call $~lib/builtins/abort @@ -30523,7 +30523,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2034 i32.const 0 call $~lib/builtins/abort @@ -30538,7 +30538,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2035 i32.const 0 call $~lib/builtins/abort @@ -30553,7 +30553,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2036 i32.const 0 call $~lib/builtins/abort @@ -30568,7 +30568,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2037 i32.const 0 call $~lib/builtins/abort @@ -30585,7 +30585,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2038 i32.const 0 call $~lib/builtins/abort @@ -30600,7 +30600,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2039 i32.const 0 call $~lib/builtins/abort @@ -30615,7 +30615,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2040 i32.const 0 call $~lib/builtins/abort @@ -30630,7 +30630,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2041 i32.const 0 call $~lib/builtins/abort @@ -30645,7 +30645,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2042 i32.const 0 call $~lib/builtins/abort @@ -30660,7 +30660,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2043 i32.const 0 call $~lib/builtins/abort @@ -30675,7 +30675,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2044 i32.const 0 call $~lib/builtins/abort @@ -30690,7 +30690,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2045 i32.const 0 call $~lib/builtins/abort @@ -30705,7 +30705,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2046 i32.const 0 call $~lib/builtins/abort @@ -30722,7 +30722,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2047 i32.const 0 call $~lib/builtins/abort @@ -30737,7 +30737,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2048 i32.const 0 call $~lib/builtins/abort @@ -30752,7 +30752,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2049 i32.const 0 call $~lib/builtins/abort @@ -30767,7 +30767,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2050 i32.const 0 call $~lib/builtins/abort @@ -30782,7 +30782,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2051 i32.const 0 call $~lib/builtins/abort @@ -30799,7 +30799,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2052 i32.const 0 call $~lib/builtins/abort @@ -30814,7 +30814,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2053 i32.const 0 call $~lib/builtins/abort @@ -30829,7 +30829,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2054 i32.const 0 call $~lib/builtins/abort @@ -30844,7 +30844,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2055 i32.const 0 call $~lib/builtins/abort @@ -30859,7 +30859,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2056 i32.const 0 call $~lib/builtins/abort @@ -30876,7 +30876,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2057 i32.const 0 call $~lib/builtins/abort @@ -30891,7 +30891,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2058 i32.const 0 call $~lib/builtins/abort @@ -30906,7 +30906,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2059 i32.const 0 call $~lib/builtins/abort @@ -30921,7 +30921,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2060 i32.const 0 call $~lib/builtins/abort @@ -30936,7 +30936,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2061 i32.const 0 call $~lib/builtins/abort @@ -30953,7 +30953,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2062 i32.const 0 call $~lib/builtins/abort @@ -30968,7 +30968,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2063 i32.const 0 call $~lib/builtins/abort @@ -30983,7 +30983,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2064 i32.const 0 call $~lib/builtins/abort @@ -30998,7 +30998,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2065 i32.const 0 call $~lib/builtins/abort @@ -31015,7 +31015,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2066 i32.const 0 call $~lib/builtins/abort @@ -31030,7 +31030,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2067 i32.const 0 call $~lib/builtins/abort @@ -31045,7 +31045,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2068 i32.const 0 call $~lib/builtins/abort @@ -31060,7 +31060,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2069 i32.const 0 call $~lib/builtins/abort @@ -31075,7 +31075,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2070 i32.const 0 call $~lib/builtins/abort @@ -31092,7 +31092,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2071 i32.const 0 call $~lib/builtins/abort @@ -31109,7 +31109,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2072 i32.const 0 call $~lib/builtins/abort @@ -31125,7 +31125,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2073 i32.const 0 call $~lib/builtins/abort @@ -31140,7 +31140,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2074 i32.const 0 call $~lib/builtins/abort @@ -31155,7 +31155,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2075 i32.const 0 call $~lib/builtins/abort @@ -31170,7 +31170,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2076 i32.const 0 call $~lib/builtins/abort @@ -31185,7 +31185,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2077 i32.const 0 call $~lib/builtins/abort @@ -31200,7 +31200,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2078 i32.const 0 call $~lib/builtins/abort @@ -31215,7 +31215,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2079 i32.const 0 call $~lib/builtins/abort @@ -31232,7 +31232,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2080 i32.const 0 call $~lib/builtins/abort @@ -31249,7 +31249,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2081 i32.const 0 call $~lib/builtins/abort @@ -31266,7 +31266,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2082 i32.const 0 call $~lib/builtins/abort @@ -31283,7 +31283,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2083 i32.const 0 call $~lib/builtins/abort @@ -31301,7 +31301,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2084 i32.const 0 call $~lib/builtins/abort @@ -31316,7 +31316,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2085 i32.const 0 call $~lib/builtins/abort @@ -31331,7 +31331,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2086 i32.const 0 call $~lib/builtins/abort @@ -31346,7 +31346,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2087 i32.const 0 call $~lib/builtins/abort @@ -31361,7 +31361,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2088 i32.const 0 call $~lib/builtins/abort @@ -31376,7 +31376,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2097 i32.const 0 call $~lib/builtins/abort @@ -31391,7 +31391,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2098 i32.const 0 call $~lib/builtins/abort @@ -31406,7 +31406,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2099 i32.const 0 call $~lib/builtins/abort @@ -31421,7 +31421,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2100 i32.const 0 call $~lib/builtins/abort @@ -31436,7 +31436,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2101 i32.const 0 call $~lib/builtins/abort @@ -31451,7 +31451,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2102 i32.const 0 call $~lib/builtins/abort @@ -31466,7 +31466,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2103 i32.const 0 call $~lib/builtins/abort @@ -31481,7 +31481,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2104 i32.const 0 call $~lib/builtins/abort @@ -31496,7 +31496,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2105 i32.const 0 call $~lib/builtins/abort @@ -31511,7 +31511,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2106 i32.const 0 call $~lib/builtins/abort @@ -31526,7 +31526,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2109 i32.const 0 call $~lib/builtins/abort @@ -31541,7 +31541,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2110 i32.const 0 call $~lib/builtins/abort @@ -31556,7 +31556,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2111 i32.const 0 call $~lib/builtins/abort @@ -31571,7 +31571,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2112 i32.const 0 call $~lib/builtins/abort @@ -31586,7 +31586,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2113 i32.const 0 call $~lib/builtins/abort @@ -31601,7 +31601,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2114 i32.const 0 call $~lib/builtins/abort @@ -31616,7 +31616,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2115 i32.const 0 call $~lib/builtins/abort @@ -31633,7 +31633,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2116 i32.const 0 call $~lib/builtins/abort @@ -31648,7 +31648,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2117 i32.const 0 call $~lib/builtins/abort @@ -31663,7 +31663,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2118 i32.const 0 call $~lib/builtins/abort @@ -31678,7 +31678,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2119 i32.const 0 call $~lib/builtins/abort @@ -31693,7 +31693,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2120 i32.const 0 call $~lib/builtins/abort @@ -31708,7 +31708,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2121 i32.const 0 call $~lib/builtins/abort @@ -31723,7 +31723,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2122 i32.const 0 call $~lib/builtins/abort @@ -31738,7 +31738,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2123 i32.const 0 call $~lib/builtins/abort @@ -31753,7 +31753,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2124 i32.const 0 call $~lib/builtins/abort @@ -31770,7 +31770,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2125 i32.const 0 call $~lib/builtins/abort @@ -31785,7 +31785,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2126 i32.const 0 call $~lib/builtins/abort @@ -31800,7 +31800,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2127 i32.const 0 call $~lib/builtins/abort @@ -31815,7 +31815,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2128 i32.const 0 call $~lib/builtins/abort @@ -31830,7 +31830,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2129 i32.const 0 call $~lib/builtins/abort @@ -31847,7 +31847,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2130 i32.const 0 call $~lib/builtins/abort @@ -31862,7 +31862,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2131 i32.const 0 call $~lib/builtins/abort @@ -31877,7 +31877,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2132 i32.const 0 call $~lib/builtins/abort @@ -31892,7 +31892,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2133 i32.const 0 call $~lib/builtins/abort @@ -31907,7 +31907,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2134 i32.const 0 call $~lib/builtins/abort @@ -31924,7 +31924,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2135 i32.const 0 call $~lib/builtins/abort @@ -31939,7 +31939,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2136 i32.const 0 call $~lib/builtins/abort @@ -31954,7 +31954,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2137 i32.const 0 call $~lib/builtins/abort @@ -31969,7 +31969,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2138 i32.const 0 call $~lib/builtins/abort @@ -31984,7 +31984,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2139 i32.const 0 call $~lib/builtins/abort @@ -32001,7 +32001,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2140 i32.const 0 call $~lib/builtins/abort @@ -32016,7 +32016,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2141 i32.const 0 call $~lib/builtins/abort @@ -32031,7 +32031,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2142 i32.const 0 call $~lib/builtins/abort @@ -32046,7 +32046,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2143 i32.const 0 call $~lib/builtins/abort @@ -32063,7 +32063,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2144 i32.const 0 call $~lib/builtins/abort @@ -32078,7 +32078,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2145 i32.const 0 call $~lib/builtins/abort @@ -32093,7 +32093,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2146 i32.const 0 call $~lib/builtins/abort @@ -32108,7 +32108,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2147 i32.const 0 call $~lib/builtins/abort @@ -32123,7 +32123,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2148 i32.const 0 call $~lib/builtins/abort @@ -32140,7 +32140,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2149 i32.const 0 call $~lib/builtins/abort @@ -32157,7 +32157,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2150 i32.const 0 call $~lib/builtins/abort @@ -32173,7 +32173,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2151 i32.const 0 call $~lib/builtins/abort @@ -32188,7 +32188,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2152 i32.const 0 call $~lib/builtins/abort @@ -32203,7 +32203,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2153 i32.const 0 call $~lib/builtins/abort @@ -32218,7 +32218,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2154 i32.const 0 call $~lib/builtins/abort @@ -32233,7 +32233,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2155 i32.const 0 call $~lib/builtins/abort @@ -32248,7 +32248,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2156 i32.const 0 call $~lib/builtins/abort @@ -32263,7 +32263,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2157 i32.const 0 call $~lib/builtins/abort @@ -32280,7 +32280,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2158 i32.const 0 call $~lib/builtins/abort @@ -32297,7 +32297,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2159 i32.const 0 call $~lib/builtins/abort @@ -32314,7 +32314,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2160 i32.const 0 call $~lib/builtins/abort @@ -32331,7 +32331,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2161 i32.const 0 call $~lib/builtins/abort @@ -32349,7 +32349,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2162 i32.const 0 call $~lib/builtins/abort @@ -32364,7 +32364,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2163 i32.const 0 call $~lib/builtins/abort @@ -32379,7 +32379,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2164 i32.const 0 call $~lib/builtins/abort @@ -32394,7 +32394,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2165 i32.const 0 call $~lib/builtins/abort @@ -32409,7 +32409,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2166 i32.const 0 call $~lib/builtins/abort @@ -32424,7 +32424,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2180 i32.const 0 call $~lib/builtins/abort @@ -32439,7 +32439,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2181 i32.const 0 call $~lib/builtins/abort @@ -32454,7 +32454,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2182 i32.const 0 call $~lib/builtins/abort @@ -32469,7 +32469,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2183 i32.const 0 call $~lib/builtins/abort @@ -32484,7 +32484,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2184 i32.const 0 call $~lib/builtins/abort @@ -32499,7 +32499,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2185 i32.const 0 call $~lib/builtins/abort @@ -32514,7 +32514,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2186 i32.const 0 call $~lib/builtins/abort @@ -32529,7 +32529,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2187 i32.const 0 call $~lib/builtins/abort @@ -32544,7 +32544,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2188 i32.const 0 call $~lib/builtins/abort @@ -32559,7 +32559,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2189 i32.const 0 call $~lib/builtins/abort @@ -32574,7 +32574,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2192 i32.const 0 call $~lib/builtins/abort @@ -32589,7 +32589,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2193 i32.const 0 call $~lib/builtins/abort @@ -32604,7 +32604,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2194 i32.const 0 call $~lib/builtins/abort @@ -32619,7 +32619,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2195 i32.const 0 call $~lib/builtins/abort @@ -32634,7 +32634,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2196 i32.const 0 call $~lib/builtins/abort @@ -32649,7 +32649,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2197 i32.const 0 call $~lib/builtins/abort @@ -32664,7 +32664,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2198 i32.const 0 call $~lib/builtins/abort @@ -32679,7 +32679,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2199 i32.const 0 call $~lib/builtins/abort @@ -32694,7 +32694,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2200 i32.const 0 call $~lib/builtins/abort @@ -32709,7 +32709,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2201 i32.const 0 call $~lib/builtins/abort @@ -32724,7 +32724,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2202 i32.const 0 call $~lib/builtins/abort @@ -32740,7 +32740,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2203 i32.const 0 call $~lib/builtins/abort @@ -32755,7 +32755,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2204 i32.const 0 call $~lib/builtins/abort @@ -32770,7 +32770,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2205 i32.const 0 call $~lib/builtins/abort @@ -32785,7 +32785,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2206 i32.const 0 call $~lib/builtins/abort @@ -32800,7 +32800,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2207 i32.const 0 call $~lib/builtins/abort @@ -32815,7 +32815,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2208 i32.const 0 call $~lib/builtins/abort @@ -32830,7 +32830,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2209 i32.const 0 call $~lib/builtins/abort @@ -32845,7 +32845,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2210 i32.const 0 call $~lib/builtins/abort @@ -32860,7 +32860,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2211 i32.const 0 call $~lib/builtins/abort @@ -32875,7 +32875,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2212 i32.const 0 call $~lib/builtins/abort @@ -32890,7 +32890,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2213 i32.const 0 call $~lib/builtins/abort @@ -32905,7 +32905,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2214 i32.const 0 call $~lib/builtins/abort @@ -32920,7 +32920,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2215 i32.const 0 call $~lib/builtins/abort @@ -32936,7 +32936,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2216 i32.const 0 call $~lib/builtins/abort @@ -32951,7 +32951,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2217 i32.const 0 call $~lib/builtins/abort @@ -32966,7 +32966,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2218 i32.const 0 call $~lib/builtins/abort @@ -32981,7 +32981,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2219 i32.const 0 call $~lib/builtins/abort @@ -32996,7 +32996,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2220 i32.const 0 call $~lib/builtins/abort @@ -33012,7 +33012,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2221 i32.const 0 call $~lib/builtins/abort @@ -33027,7 +33027,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2222 i32.const 0 call $~lib/builtins/abort @@ -33042,7 +33042,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2223 i32.const 0 call $~lib/builtins/abort @@ -33057,7 +33057,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2224 i32.const 0 call $~lib/builtins/abort @@ -33072,7 +33072,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2225 i32.const 0 call $~lib/builtins/abort @@ -33088,7 +33088,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2226 i32.const 0 call $~lib/builtins/abort @@ -33103,7 +33103,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2227 i32.const 0 call $~lib/builtins/abort @@ -33118,7 +33118,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2228 i32.const 0 call $~lib/builtins/abort @@ -33133,7 +33133,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2229 i32.const 0 call $~lib/builtins/abort @@ -33148,7 +33148,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2230 i32.const 0 call $~lib/builtins/abort @@ -33164,7 +33164,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2231 i32.const 0 call $~lib/builtins/abort @@ -33179,7 +33179,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2232 i32.const 0 call $~lib/builtins/abort @@ -33194,7 +33194,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2233 i32.const 0 call $~lib/builtins/abort @@ -33209,7 +33209,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2234 i32.const 0 call $~lib/builtins/abort @@ -33225,7 +33225,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2235 i32.const 0 call $~lib/builtins/abort @@ -33240,7 +33240,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2236 i32.const 0 call $~lib/builtins/abort @@ -33255,7 +33255,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2237 i32.const 0 call $~lib/builtins/abort @@ -33270,7 +33270,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2238 i32.const 0 call $~lib/builtins/abort @@ -33285,7 +33285,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2239 i32.const 0 call $~lib/builtins/abort @@ -33301,7 +33301,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2240 i32.const 0 call $~lib/builtins/abort @@ -33317,7 +33317,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2241 i32.const 0 call $~lib/builtins/abort @@ -33333,7 +33333,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2242 i32.const 0 call $~lib/builtins/abort @@ -33348,7 +33348,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2243 i32.const 0 call $~lib/builtins/abort @@ -33363,7 +33363,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2244 i32.const 0 call $~lib/builtins/abort @@ -33378,7 +33378,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2245 i32.const 0 call $~lib/builtins/abort @@ -33393,7 +33393,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2246 i32.const 0 call $~lib/builtins/abort @@ -33408,7 +33408,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2247 i32.const 0 call $~lib/builtins/abort @@ -33423,7 +33423,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2248 i32.const 0 call $~lib/builtins/abort @@ -33439,7 +33439,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2249 i32.const 0 call $~lib/builtins/abort @@ -33455,7 +33455,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2250 i32.const 0 call $~lib/builtins/abort @@ -33471,7 +33471,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2251 i32.const 0 call $~lib/builtins/abort @@ -33487,7 +33487,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2252 i32.const 0 call $~lib/builtins/abort @@ -33504,7 +33504,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2253 i32.const 0 call $~lib/builtins/abort @@ -33519,7 +33519,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2254 i32.const 0 call $~lib/builtins/abort @@ -33534,7 +33534,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2255 i32.const 0 call $~lib/builtins/abort @@ -33549,7 +33549,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2256 i32.const 0 call $~lib/builtins/abort @@ -33564,7 +33564,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2257 i32.const 0 call $~lib/builtins/abort @@ -33579,7 +33579,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2266 i32.const 0 call $~lib/builtins/abort @@ -33594,7 +33594,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2267 i32.const 0 call $~lib/builtins/abort @@ -33609,7 +33609,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2268 i32.const 0 call $~lib/builtins/abort @@ -33624,7 +33624,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2269 i32.const 0 call $~lib/builtins/abort @@ -33639,7 +33639,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2270 i32.const 0 call $~lib/builtins/abort @@ -33654,7 +33654,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2271 i32.const 0 call $~lib/builtins/abort @@ -33669,7 +33669,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2272 i32.const 0 call $~lib/builtins/abort @@ -33684,7 +33684,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2273 i32.const 0 call $~lib/builtins/abort @@ -33699,7 +33699,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2274 i32.const 0 call $~lib/builtins/abort @@ -33714,7 +33714,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2275 i32.const 0 call $~lib/builtins/abort @@ -33729,7 +33729,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2278 i32.const 0 call $~lib/builtins/abort @@ -33744,7 +33744,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2279 i32.const 0 call $~lib/builtins/abort @@ -33759,7 +33759,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2280 i32.const 0 call $~lib/builtins/abort @@ -33774,7 +33774,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2281 i32.const 0 call $~lib/builtins/abort @@ -33789,7 +33789,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2282 i32.const 0 call $~lib/builtins/abort @@ -33804,7 +33804,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2283 i32.const 0 call $~lib/builtins/abort @@ -33819,7 +33819,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2284 i32.const 0 call $~lib/builtins/abort @@ -33834,7 +33834,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2285 i32.const 0 call $~lib/builtins/abort @@ -33849,7 +33849,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2286 i32.const 0 call $~lib/builtins/abort @@ -33864,7 +33864,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2287 i32.const 0 call $~lib/builtins/abort @@ -33879,7 +33879,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2288 i32.const 0 call $~lib/builtins/abort @@ -33895,7 +33895,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2289 i32.const 0 call $~lib/builtins/abort @@ -33910,7 +33910,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2290 i32.const 0 call $~lib/builtins/abort @@ -33925,7 +33925,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2291 i32.const 0 call $~lib/builtins/abort @@ -33940,7 +33940,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2292 i32.const 0 call $~lib/builtins/abort @@ -33955,7 +33955,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2293 i32.const 0 call $~lib/builtins/abort @@ -33970,7 +33970,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2294 i32.const 0 call $~lib/builtins/abort @@ -33985,7 +33985,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2295 i32.const 0 call $~lib/builtins/abort @@ -34000,7 +34000,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2296 i32.const 0 call $~lib/builtins/abort @@ -34015,7 +34015,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2297 i32.const 0 call $~lib/builtins/abort @@ -34030,7 +34030,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2298 i32.const 0 call $~lib/builtins/abort @@ -34045,7 +34045,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2299 i32.const 0 call $~lib/builtins/abort @@ -34060,7 +34060,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2300 i32.const 0 call $~lib/builtins/abort @@ -34075,7 +34075,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2301 i32.const 0 call $~lib/builtins/abort @@ -34091,7 +34091,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2302 i32.const 0 call $~lib/builtins/abort @@ -34106,7 +34106,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2303 i32.const 0 call $~lib/builtins/abort @@ -34121,7 +34121,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2304 i32.const 0 call $~lib/builtins/abort @@ -34136,7 +34136,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2305 i32.const 0 call $~lib/builtins/abort @@ -34151,7 +34151,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2306 i32.const 0 call $~lib/builtins/abort @@ -34167,7 +34167,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2307 i32.const 0 call $~lib/builtins/abort @@ -34182,7 +34182,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2308 i32.const 0 call $~lib/builtins/abort @@ -34197,7 +34197,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2309 i32.const 0 call $~lib/builtins/abort @@ -34212,7 +34212,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2310 i32.const 0 call $~lib/builtins/abort @@ -34227,7 +34227,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2311 i32.const 0 call $~lib/builtins/abort @@ -34243,7 +34243,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2312 i32.const 0 call $~lib/builtins/abort @@ -34258,7 +34258,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2313 i32.const 0 call $~lib/builtins/abort @@ -34273,7 +34273,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2314 i32.const 0 call $~lib/builtins/abort @@ -34288,7 +34288,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2315 i32.const 0 call $~lib/builtins/abort @@ -34303,7 +34303,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2316 i32.const 0 call $~lib/builtins/abort @@ -34319,7 +34319,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2317 i32.const 0 call $~lib/builtins/abort @@ -34334,7 +34334,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2318 i32.const 0 call $~lib/builtins/abort @@ -34349,7 +34349,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2319 i32.const 0 call $~lib/builtins/abort @@ -34364,7 +34364,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2320 i32.const 0 call $~lib/builtins/abort @@ -34380,7 +34380,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2321 i32.const 0 call $~lib/builtins/abort @@ -34395,7 +34395,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2322 i32.const 0 call $~lib/builtins/abort @@ -34410,7 +34410,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2323 i32.const 0 call $~lib/builtins/abort @@ -34425,7 +34425,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2324 i32.const 0 call $~lib/builtins/abort @@ -34440,7 +34440,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2325 i32.const 0 call $~lib/builtins/abort @@ -34456,7 +34456,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2326 i32.const 0 call $~lib/builtins/abort @@ -34472,7 +34472,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2327 i32.const 0 call $~lib/builtins/abort @@ -34488,7 +34488,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2328 i32.const 0 call $~lib/builtins/abort @@ -34503,7 +34503,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2329 i32.const 0 call $~lib/builtins/abort @@ -34518,7 +34518,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2330 i32.const 0 call $~lib/builtins/abort @@ -34533,7 +34533,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2331 i32.const 0 call $~lib/builtins/abort @@ -34548,7 +34548,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2332 i32.const 0 call $~lib/builtins/abort @@ -34563,7 +34563,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2333 i32.const 0 call $~lib/builtins/abort @@ -34578,7 +34578,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2334 i32.const 0 call $~lib/builtins/abort @@ -34594,7 +34594,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2335 i32.const 0 call $~lib/builtins/abort @@ -34610,7 +34610,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2336 i32.const 0 call $~lib/builtins/abort @@ -34626,7 +34626,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2337 i32.const 0 call $~lib/builtins/abort @@ -34642,7 +34642,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2338 i32.const 0 call $~lib/builtins/abort @@ -34659,7 +34659,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2339 i32.const 0 call $~lib/builtins/abort @@ -34674,7 +34674,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2340 i32.const 0 call $~lib/builtins/abort @@ -34689,7 +34689,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2341 i32.const 0 call $~lib/builtins/abort @@ -34704,7 +34704,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2342 i32.const 0 call $~lib/builtins/abort @@ -34719,7 +34719,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2343 i32.const 0 call $~lib/builtins/abort @@ -34734,7 +34734,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2355 i32.const 0 call $~lib/builtins/abort @@ -34749,7 +34749,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2356 i32.const 0 call $~lib/builtins/abort @@ -34764,7 +34764,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2357 i32.const 0 call $~lib/builtins/abort @@ -34779,7 +34779,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2358 i32.const 0 call $~lib/builtins/abort @@ -34794,7 +34794,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2359 i32.const 0 call $~lib/builtins/abort @@ -34809,7 +34809,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2360 i32.const 0 call $~lib/builtins/abort @@ -34824,7 +34824,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2361 i32.const 0 call $~lib/builtins/abort @@ -34839,7 +34839,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2362 i32.const 0 call $~lib/builtins/abort @@ -34854,7 +34854,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2363 i32.const 0 call $~lib/builtins/abort @@ -34869,7 +34869,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2364 i32.const 0 call $~lib/builtins/abort @@ -34884,7 +34884,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2367 i32.const 0 call $~lib/builtins/abort @@ -34899,7 +34899,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2368 i32.const 0 call $~lib/builtins/abort @@ -34914,7 +34914,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2369 i32.const 0 call $~lib/builtins/abort @@ -34929,7 +34929,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2370 i32.const 0 call $~lib/builtins/abort @@ -34944,7 +34944,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2371 i32.const 0 call $~lib/builtins/abort @@ -34959,7 +34959,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2372 i32.const 0 call $~lib/builtins/abort @@ -34974,7 +34974,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2373 i32.const 0 call $~lib/builtins/abort @@ -34989,7 +34989,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2374 i32.const 0 call $~lib/builtins/abort @@ -35004,7 +35004,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2375 i32.const 0 call $~lib/builtins/abort @@ -35019,7 +35019,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2376 i32.const 0 call $~lib/builtins/abort @@ -35034,7 +35034,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2377 i32.const 0 call $~lib/builtins/abort @@ -35049,7 +35049,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2378 i32.const 0 call $~lib/builtins/abort @@ -35064,7 +35064,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2379 i32.const 0 call $~lib/builtins/abort @@ -35080,7 +35080,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2380 i32.const 0 call $~lib/builtins/abort @@ -35095,7 +35095,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2381 i32.const 0 call $~lib/builtins/abort @@ -35110,7 +35110,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2382 i32.const 0 call $~lib/builtins/abort @@ -35125,7 +35125,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2383 i32.const 0 call $~lib/builtins/abort @@ -35140,7 +35140,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2384 i32.const 0 call $~lib/builtins/abort @@ -35155,7 +35155,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2385 i32.const 0 call $~lib/builtins/abort @@ -35170,7 +35170,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2386 i32.const 0 call $~lib/builtins/abort @@ -35185,7 +35185,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2387 i32.const 0 call $~lib/builtins/abort @@ -35200,7 +35200,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2388 i32.const 0 call $~lib/builtins/abort @@ -35215,7 +35215,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2389 i32.const 0 call $~lib/builtins/abort @@ -35231,7 +35231,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2390 i32.const 0 call $~lib/builtins/abort @@ -35246,7 +35246,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2391 i32.const 0 call $~lib/builtins/abort @@ -35262,7 +35262,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2392 i32.const 0 call $~lib/builtins/abort @@ -35277,7 +35277,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2393 i32.const 0 call $~lib/builtins/abort @@ -35293,7 +35293,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2394 i32.const 0 call $~lib/builtins/abort @@ -35308,7 +35308,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2395 i32.const 0 call $~lib/builtins/abort @@ -35323,7 +35323,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2396 i32.const 0 call $~lib/builtins/abort @@ -35339,7 +35339,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2397 i32.const 0 call $~lib/builtins/abort @@ -35354,7 +35354,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2398 i32.const 0 call $~lib/builtins/abort @@ -35369,7 +35369,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2399 i32.const 0 call $~lib/builtins/abort @@ -35384,7 +35384,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2400 i32.const 0 call $~lib/builtins/abort @@ -35399,7 +35399,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2401 i32.const 0 call $~lib/builtins/abort @@ -35414,7 +35414,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2402 i32.const 0 call $~lib/builtins/abort @@ -35430,7 +35430,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2403 i32.const 0 call $~lib/builtins/abort @@ -35445,7 +35445,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2404 i32.const 0 call $~lib/builtins/abort @@ -35460,7 +35460,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2405 i32.const 0 call $~lib/builtins/abort @@ -35475,7 +35475,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2406 i32.const 0 call $~lib/builtins/abort @@ -35490,7 +35490,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2407 i32.const 0 call $~lib/builtins/abort @@ -35505,7 +35505,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2408 i32.const 0 call $~lib/builtins/abort @@ -35521,7 +35521,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2409 i32.const 0 call $~lib/builtins/abort @@ -35536,7 +35536,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2410 i32.const 0 call $~lib/builtins/abort @@ -35551,7 +35551,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2411 i32.const 0 call $~lib/builtins/abort @@ -35566,7 +35566,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2412 i32.const 0 call $~lib/builtins/abort @@ -35581,7 +35581,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2413 i32.const 0 call $~lib/builtins/abort @@ -35596,7 +35596,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2414 i32.const 0 call $~lib/builtins/abort @@ -35611,7 +35611,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2415 i32.const 0 call $~lib/builtins/abort @@ -35626,7 +35626,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2416 i32.const 0 call $~lib/builtins/abort @@ -35642,7 +35642,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2417 i32.const 0 call $~lib/builtins/abort @@ -35657,7 +35657,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2418 i32.const 0 call $~lib/builtins/abort @@ -35672,7 +35672,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2419 i32.const 0 call $~lib/builtins/abort @@ -35687,7 +35687,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2420 i32.const 0 call $~lib/builtins/abort @@ -35702,7 +35702,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2421 i32.const 0 call $~lib/builtins/abort @@ -35717,7 +35717,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2422 i32.const 0 call $~lib/builtins/abort @@ -35732,7 +35732,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2423 i32.const 0 call $~lib/builtins/abort @@ -35747,7 +35747,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2424 i32.const 0 call $~lib/builtins/abort @@ -35762,7 +35762,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2425 i32.const 0 call $~lib/builtins/abort @@ -35777,7 +35777,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2426 i32.const 0 call $~lib/builtins/abort @@ -35793,7 +35793,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2427 i32.const 0 call $~lib/builtins/abort @@ -35808,7 +35808,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2428 i32.const 0 call $~lib/builtins/abort @@ -35823,7 +35823,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2429 i32.const 0 call $~lib/builtins/abort @@ -35839,7 +35839,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2430 i32.const 0 call $~lib/builtins/abort @@ -35854,7 +35854,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2431 i32.const 0 call $~lib/builtins/abort @@ -35869,7 +35869,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2432 i32.const 0 call $~lib/builtins/abort @@ -35885,7 +35885,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2433 i32.const 0 call $~lib/builtins/abort @@ -35900,7 +35900,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2434 i32.const 0 call $~lib/builtins/abort @@ -35915,7 +35915,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2435 i32.const 0 call $~lib/builtins/abort @@ -35930,7 +35930,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2436 i32.const 0 call $~lib/builtins/abort @@ -35946,7 +35946,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2437 i32.const 0 call $~lib/builtins/abort @@ -35961,7 +35961,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2438 i32.const 0 call $~lib/builtins/abort @@ -35976,7 +35976,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2439 i32.const 0 call $~lib/builtins/abort @@ -35991,7 +35991,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2440 i32.const 0 call $~lib/builtins/abort @@ -36006,7 +36006,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2441 i32.const 0 call $~lib/builtins/abort @@ -36021,7 +36021,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2442 i32.const 0 call $~lib/builtins/abort @@ -36036,7 +36036,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2443 i32.const 0 call $~lib/builtins/abort @@ -36051,7 +36051,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2444 i32.const 0 call $~lib/builtins/abort @@ -36067,7 +36067,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2445 i32.const 0 call $~lib/builtins/abort @@ -36083,7 +36083,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2446 i32.const 0 call $~lib/builtins/abort @@ -36100,7 +36100,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2447 i32.const 0 call $~lib/builtins/abort @@ -36117,7 +36117,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2448 i32.const 0 call $~lib/builtins/abort @@ -36133,7 +36133,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2449 i32.const 0 call $~lib/builtins/abort @@ -36150,7 +36150,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2450 i32.const 0 call $~lib/builtins/abort @@ -36166,7 +36166,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2451 i32.const 0 call $~lib/builtins/abort @@ -36182,7 +36182,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2452 i32.const 0 call $~lib/builtins/abort @@ -36198,7 +36198,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2453 i32.const 0 call $~lib/builtins/abort @@ -36214,7 +36214,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2454 i32.const 0 call $~lib/builtins/abort @@ -36229,7 +36229,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2455 i32.const 0 call $~lib/builtins/abort @@ -36244,7 +36244,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2456 i32.const 0 call $~lib/builtins/abort @@ -36259,7 +36259,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2457 i32.const 0 call $~lib/builtins/abort @@ -36274,7 +36274,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2458 i32.const 0 call $~lib/builtins/abort @@ -36289,7 +36289,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2467 i32.const 0 call $~lib/builtins/abort @@ -36304,7 +36304,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2468 i32.const 0 call $~lib/builtins/abort @@ -36319,7 +36319,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2469 i32.const 0 call $~lib/builtins/abort @@ -36334,7 +36334,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2470 i32.const 0 call $~lib/builtins/abort @@ -36349,7 +36349,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2471 i32.const 0 call $~lib/builtins/abort @@ -36364,7 +36364,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2472 i32.const 0 call $~lib/builtins/abort @@ -36379,7 +36379,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2473 i32.const 0 call $~lib/builtins/abort @@ -36394,7 +36394,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2474 i32.const 0 call $~lib/builtins/abort @@ -36409,7 +36409,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2475 i32.const 0 call $~lib/builtins/abort @@ -36424,7 +36424,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2476 i32.const 0 call $~lib/builtins/abort @@ -36439,7 +36439,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2479 i32.const 0 call $~lib/builtins/abort @@ -36454,7 +36454,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2480 i32.const 0 call $~lib/builtins/abort @@ -36469,7 +36469,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2481 i32.const 0 call $~lib/builtins/abort @@ -36484,7 +36484,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2482 i32.const 0 call $~lib/builtins/abort @@ -36499,7 +36499,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2483 i32.const 0 call $~lib/builtins/abort @@ -36514,7 +36514,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2484 i32.const 0 call $~lib/builtins/abort @@ -36529,7 +36529,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2485 i32.const 0 call $~lib/builtins/abort @@ -36544,7 +36544,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2486 i32.const 0 call $~lib/builtins/abort @@ -36559,7 +36559,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2487 i32.const 0 call $~lib/builtins/abort @@ -36574,7 +36574,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2488 i32.const 0 call $~lib/builtins/abort @@ -36589,7 +36589,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2489 i32.const 0 call $~lib/builtins/abort @@ -36604,7 +36604,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2490 i32.const 0 call $~lib/builtins/abort @@ -36619,7 +36619,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2491 i32.const 0 call $~lib/builtins/abort @@ -36635,7 +36635,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2492 i32.const 0 call $~lib/builtins/abort @@ -36650,7 +36650,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2493 i32.const 0 call $~lib/builtins/abort @@ -36665,7 +36665,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2494 i32.const 0 call $~lib/builtins/abort @@ -36680,7 +36680,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2495 i32.const 0 call $~lib/builtins/abort @@ -36695,7 +36695,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2496 i32.const 0 call $~lib/builtins/abort @@ -36710,7 +36710,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2497 i32.const 0 call $~lib/builtins/abort @@ -36725,7 +36725,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2498 i32.const 0 call $~lib/builtins/abort @@ -36740,7 +36740,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2499 i32.const 0 call $~lib/builtins/abort @@ -36755,7 +36755,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2500 i32.const 0 call $~lib/builtins/abort @@ -36770,7 +36770,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2501 i32.const 0 call $~lib/builtins/abort @@ -36786,7 +36786,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2502 i32.const 0 call $~lib/builtins/abort @@ -36801,7 +36801,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2503 i32.const 0 call $~lib/builtins/abort @@ -36817,7 +36817,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2504 i32.const 0 call $~lib/builtins/abort @@ -36832,7 +36832,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2505 i32.const 0 call $~lib/builtins/abort @@ -36848,7 +36848,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2506 i32.const 0 call $~lib/builtins/abort @@ -36863,7 +36863,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2507 i32.const 0 call $~lib/builtins/abort @@ -36878,7 +36878,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2508 i32.const 0 call $~lib/builtins/abort @@ -36894,7 +36894,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2509 i32.const 0 call $~lib/builtins/abort @@ -36909,7 +36909,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2510 i32.const 0 call $~lib/builtins/abort @@ -36924,7 +36924,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2511 i32.const 0 call $~lib/builtins/abort @@ -36939,7 +36939,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2512 i32.const 0 call $~lib/builtins/abort @@ -36954,7 +36954,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2513 i32.const 0 call $~lib/builtins/abort @@ -36969,7 +36969,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2514 i32.const 0 call $~lib/builtins/abort @@ -36985,7 +36985,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2515 i32.const 0 call $~lib/builtins/abort @@ -37000,7 +37000,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2516 i32.const 0 call $~lib/builtins/abort @@ -37015,7 +37015,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2517 i32.const 0 call $~lib/builtins/abort @@ -37030,7 +37030,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2518 i32.const 0 call $~lib/builtins/abort @@ -37045,7 +37045,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2519 i32.const 0 call $~lib/builtins/abort @@ -37060,7 +37060,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2520 i32.const 0 call $~lib/builtins/abort @@ -37076,7 +37076,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2521 i32.const 0 call $~lib/builtins/abort @@ -37091,7 +37091,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2522 i32.const 0 call $~lib/builtins/abort @@ -37106,7 +37106,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2523 i32.const 0 call $~lib/builtins/abort @@ -37121,7 +37121,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2524 i32.const 0 call $~lib/builtins/abort @@ -37136,7 +37136,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2525 i32.const 0 call $~lib/builtins/abort @@ -37151,7 +37151,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2526 i32.const 0 call $~lib/builtins/abort @@ -37166,7 +37166,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2527 i32.const 0 call $~lib/builtins/abort @@ -37181,7 +37181,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2528 i32.const 0 call $~lib/builtins/abort @@ -37197,7 +37197,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2529 i32.const 0 call $~lib/builtins/abort @@ -37212,7 +37212,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2530 i32.const 0 call $~lib/builtins/abort @@ -37227,7 +37227,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2531 i32.const 0 call $~lib/builtins/abort @@ -37242,7 +37242,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2532 i32.const 0 call $~lib/builtins/abort @@ -37257,7 +37257,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2533 i32.const 0 call $~lib/builtins/abort @@ -37272,7 +37272,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2534 i32.const 0 call $~lib/builtins/abort @@ -37287,7 +37287,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2535 i32.const 0 call $~lib/builtins/abort @@ -37302,7 +37302,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2536 i32.const 0 call $~lib/builtins/abort @@ -37317,7 +37317,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2537 i32.const 0 call $~lib/builtins/abort @@ -37332,7 +37332,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2538 i32.const 0 call $~lib/builtins/abort @@ -37348,7 +37348,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2539 i32.const 0 call $~lib/builtins/abort @@ -37363,7 +37363,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2540 i32.const 0 call $~lib/builtins/abort @@ -37378,7 +37378,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2541 i32.const 0 call $~lib/builtins/abort @@ -37394,7 +37394,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2542 i32.const 0 call $~lib/builtins/abort @@ -37409,7 +37409,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2543 i32.const 0 call $~lib/builtins/abort @@ -37424,7 +37424,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2544 i32.const 0 call $~lib/builtins/abort @@ -37440,7 +37440,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2545 i32.const 0 call $~lib/builtins/abort @@ -37455,7 +37455,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2546 i32.const 0 call $~lib/builtins/abort @@ -37470,7 +37470,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2547 i32.const 0 call $~lib/builtins/abort @@ -37485,7 +37485,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2548 i32.const 0 call $~lib/builtins/abort @@ -37501,7 +37501,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2549 i32.const 0 call $~lib/builtins/abort @@ -37516,7 +37516,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2550 i32.const 0 call $~lib/builtins/abort @@ -37531,7 +37531,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2551 i32.const 0 call $~lib/builtins/abort @@ -37546,7 +37546,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2552 i32.const 0 call $~lib/builtins/abort @@ -37561,7 +37561,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2553 i32.const 0 call $~lib/builtins/abort @@ -37576,7 +37576,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2554 i32.const 0 call $~lib/builtins/abort @@ -37591,7 +37591,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2555 i32.const 0 call $~lib/builtins/abort @@ -37606,7 +37606,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2556 i32.const 0 call $~lib/builtins/abort @@ -37622,7 +37622,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2557 i32.const 0 call $~lib/builtins/abort @@ -37638,7 +37638,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2558 i32.const 0 call $~lib/builtins/abort @@ -37655,7 +37655,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2559 i32.const 0 call $~lib/builtins/abort @@ -37672,7 +37672,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2560 i32.const 0 call $~lib/builtins/abort @@ -37688,7 +37688,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2561 i32.const 0 call $~lib/builtins/abort @@ -37705,7 +37705,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2562 i32.const 0 call $~lib/builtins/abort @@ -37721,7 +37721,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2563 i32.const 0 call $~lib/builtins/abort @@ -37737,7 +37737,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2564 i32.const 0 call $~lib/builtins/abort @@ -37753,7 +37753,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2565 i32.const 0 call $~lib/builtins/abort @@ -37769,7 +37769,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2566 i32.const 0 call $~lib/builtins/abort @@ -37784,7 +37784,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2567 i32.const 0 call $~lib/builtins/abort @@ -37799,7 +37799,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2568 i32.const 0 call $~lib/builtins/abort @@ -37814,7 +37814,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2569 i32.const 0 call $~lib/builtins/abort @@ -37829,7 +37829,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2570 i32.const 0 call $~lib/builtins/abort @@ -37865,7 +37865,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2579 i32.const 2 call $~lib/builtins/abort @@ -37915,7 +37915,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2587 i32.const 2 call $~lib/builtins/abort @@ -37939,7 +37939,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2601 i32.const 0 call $~lib/builtins/abort @@ -37953,7 +37953,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2602 i32.const 0 call $~lib/builtins/abort @@ -37967,7 +37967,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2603 i32.const 0 call $~lib/builtins/abort @@ -37981,7 +37981,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2604 i32.const 0 call $~lib/builtins/abort @@ -37995,7 +37995,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2605 i32.const 0 call $~lib/builtins/abort @@ -38009,7 +38009,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2606 i32.const 0 call $~lib/builtins/abort @@ -38023,7 +38023,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2607 i32.const 0 call $~lib/builtins/abort @@ -38037,7 +38037,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2608 i32.const 0 call $~lib/builtins/abort @@ -38051,7 +38051,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2609 i32.const 0 call $~lib/builtins/abort @@ -38065,7 +38065,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2610 i32.const 0 call $~lib/builtins/abort @@ -38079,7 +38079,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2613 i32.const 0 call $~lib/builtins/abort @@ -38093,7 +38093,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2614 i32.const 0 call $~lib/builtins/abort @@ -38109,7 +38109,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2615 i32.const 0 call $~lib/builtins/abort @@ -38123,7 +38123,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2616 i32.const 0 call $~lib/builtins/abort @@ -38137,7 +38137,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2617 i32.const 0 call $~lib/builtins/abort @@ -38151,7 +38151,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2618 i32.const 0 call $~lib/builtins/abort @@ -38165,7 +38165,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2619 i32.const 0 call $~lib/builtins/abort @@ -38179,7 +38179,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2620 i32.const 0 call $~lib/builtins/abort @@ -38193,7 +38193,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2621 i32.const 0 call $~lib/builtins/abort @@ -38207,7 +38207,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2622 i32.const 0 call $~lib/builtins/abort @@ -38221,7 +38221,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2623 i32.const 0 call $~lib/builtins/abort @@ -38235,7 +38235,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2624 i32.const 0 call $~lib/builtins/abort @@ -38249,7 +38249,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2625 i32.const 0 call $~lib/builtins/abort @@ -38263,7 +38263,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2626 i32.const 0 call $~lib/builtins/abort @@ -38277,7 +38277,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2627 i32.const 0 call $~lib/builtins/abort @@ -38291,7 +38291,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2628 i32.const 0 call $~lib/builtins/abort @@ -38305,7 +38305,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2629 i32.const 0 call $~lib/builtins/abort @@ -38319,7 +38319,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2638 i32.const 0 call $~lib/builtins/abort @@ -38333,7 +38333,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2639 i32.const 0 call $~lib/builtins/abort @@ -38347,7 +38347,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2640 i32.const 0 call $~lib/builtins/abort @@ -38361,7 +38361,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2641 i32.const 0 call $~lib/builtins/abort @@ -38375,7 +38375,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2642 i32.const 0 call $~lib/builtins/abort @@ -38389,7 +38389,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2643 i32.const 0 call $~lib/builtins/abort @@ -38403,7 +38403,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2644 i32.const 0 call $~lib/builtins/abort @@ -38417,7 +38417,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2645 i32.const 0 call $~lib/builtins/abort @@ -38431,7 +38431,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2646 i32.const 0 call $~lib/builtins/abort @@ -38445,7 +38445,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2647 i32.const 0 call $~lib/builtins/abort @@ -38459,7 +38459,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2650 i32.const 0 call $~lib/builtins/abort @@ -38473,7 +38473,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2651 i32.const 0 call $~lib/builtins/abort @@ -38489,7 +38489,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2652 i32.const 0 call $~lib/builtins/abort @@ -38503,7 +38503,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2653 i32.const 0 call $~lib/builtins/abort @@ -38517,7 +38517,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2654 i32.const 0 call $~lib/builtins/abort @@ -38531,7 +38531,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2655 i32.const 0 call $~lib/builtins/abort @@ -38545,7 +38545,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2656 i32.const 0 call $~lib/builtins/abort @@ -38559,7 +38559,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2657 i32.const 0 call $~lib/builtins/abort @@ -38573,7 +38573,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2658 i32.const 0 call $~lib/builtins/abort @@ -38587,7 +38587,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2659 i32.const 0 call $~lib/builtins/abort @@ -38601,7 +38601,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2660 i32.const 0 call $~lib/builtins/abort @@ -38615,7 +38615,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2661 i32.const 0 call $~lib/builtins/abort @@ -38629,7 +38629,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2662 i32.const 0 call $~lib/builtins/abort @@ -38643,7 +38643,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2663 i32.const 0 call $~lib/builtins/abort @@ -38657,7 +38657,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2664 i32.const 0 call $~lib/builtins/abort @@ -38671,7 +38671,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2665 i32.const 0 call $~lib/builtins/abort @@ -38685,7 +38685,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2666 i32.const 0 call $~lib/builtins/abort @@ -38699,7 +38699,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2677 i32.const 0 call $~lib/builtins/abort @@ -38713,7 +38713,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2678 i32.const 0 call $~lib/builtins/abort @@ -38727,7 +38727,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2679 i32.const 0 call $~lib/builtins/abort @@ -38741,7 +38741,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2680 i32.const 0 call $~lib/builtins/abort @@ -38755,7 +38755,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2681 i32.const 0 call $~lib/builtins/abort @@ -38769,7 +38769,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2682 i32.const 0 call $~lib/builtins/abort @@ -38783,7 +38783,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2683 i32.const 0 call $~lib/builtins/abort @@ -38798,7 +38798,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2684 i32.const 0 call $~lib/builtins/abort @@ -38812,7 +38812,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2685 i32.const 0 call $~lib/builtins/abort @@ -38826,7 +38826,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2693 i32.const 0 call $~lib/builtins/abort @@ -38840,7 +38840,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2694 i32.const 0 call $~lib/builtins/abort @@ -38854,7 +38854,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2695 i32.const 0 call $~lib/builtins/abort @@ -38868,7 +38868,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2696 i32.const 0 call $~lib/builtins/abort @@ -38882,7 +38882,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2697 i32.const 0 call $~lib/builtins/abort @@ -38896,7 +38896,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2698 i32.const 0 call $~lib/builtins/abort @@ -38910,7 +38910,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2699 i32.const 0 call $~lib/builtins/abort @@ -38925,7 +38925,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2700 i32.const 0 call $~lib/builtins/abort @@ -38939,7 +38939,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2701 i32.const 0 call $~lib/builtins/abort @@ -38965,7 +38965,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2707 i32.const 0 call $~lib/builtins/abort @@ -38991,7 +38991,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2708 i32.const 0 call $~lib/builtins/abort @@ -39017,7 +39017,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2709 i32.const 0 call $~lib/builtins/abort @@ -39043,7 +39043,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2710 i32.const 0 call $~lib/builtins/abort @@ -39069,7 +39069,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2711 i32.const 0 call $~lib/builtins/abort @@ -39096,7 +39096,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2712 i32.const 0 call $~lib/builtins/abort @@ -39122,7 +39122,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2713 i32.const 0 call $~lib/builtins/abort @@ -39149,7 +39149,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2714 i32.const 0 call $~lib/builtins/abort @@ -39174,7 +39174,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2720 i32.const 0 call $~lib/builtins/abort @@ -39199,7 +39199,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2721 i32.const 0 call $~lib/builtins/abort @@ -39224,7 +39224,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2722 i32.const 0 call $~lib/builtins/abort @@ -39249,7 +39249,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2723 i32.const 0 call $~lib/builtins/abort @@ -39274,7 +39274,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2724 i32.const 0 call $~lib/builtins/abort @@ -39300,7 +39300,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2725 i32.const 0 call $~lib/builtins/abort @@ -39325,7 +39325,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2726 i32.const 0 call $~lib/builtins/abort @@ -39351,7 +39351,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2727 i32.const 0 call $~lib/builtins/abort @@ -39366,7 +39366,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2738 i32.const 0 call $~lib/builtins/abort @@ -39381,7 +39381,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2739 i32.const 0 call $~lib/builtins/abort @@ -39396,7 +39396,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2740 i32.const 0 call $~lib/builtins/abort @@ -39411,7 +39411,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2741 i32.const 0 call $~lib/builtins/abort @@ -39426,7 +39426,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2742 i32.const 0 call $~lib/builtins/abort @@ -39441,7 +39441,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2743 i32.const 0 call $~lib/builtins/abort @@ -39456,7 +39456,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2744 i32.const 0 call $~lib/builtins/abort @@ -39471,7 +39471,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2745 i32.const 0 call $~lib/builtins/abort @@ -39486,7 +39486,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2746 i32.const 0 call $~lib/builtins/abort @@ -39501,7 +39501,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2747 i32.const 0 call $~lib/builtins/abort @@ -39516,7 +39516,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2750 i32.const 0 call $~lib/builtins/abort @@ -39531,7 +39531,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2751 i32.const 0 call $~lib/builtins/abort @@ -39546,7 +39546,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2752 i32.const 0 call $~lib/builtins/abort @@ -39561,7 +39561,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2753 i32.const 0 call $~lib/builtins/abort @@ -39576,7 +39576,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2754 i32.const 0 call $~lib/builtins/abort @@ -39591,7 +39591,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2755 i32.const 0 call $~lib/builtins/abort @@ -39606,7 +39606,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2756 i32.const 0 call $~lib/builtins/abort @@ -39621,7 +39621,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2757 i32.const 0 call $~lib/builtins/abort @@ -39636,7 +39636,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2758 i32.const 0 call $~lib/builtins/abort @@ -39651,7 +39651,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2759 i32.const 0 call $~lib/builtins/abort @@ -39666,7 +39666,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2760 i32.const 0 call $~lib/builtins/abort @@ -39682,7 +39682,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2761 i32.const 0 call $~lib/builtins/abort @@ -39697,7 +39697,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2762 i32.const 0 call $~lib/builtins/abort @@ -39712,7 +39712,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2763 i32.const 0 call $~lib/builtins/abort @@ -39727,7 +39727,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2764 i32.const 0 call $~lib/builtins/abort @@ -39742,7 +39742,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2765 i32.const 0 call $~lib/builtins/abort @@ -39757,7 +39757,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2766 i32.const 0 call $~lib/builtins/abort @@ -39772,7 +39772,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2767 i32.const 0 call $~lib/builtins/abort @@ -39787,7 +39787,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2768 i32.const 0 call $~lib/builtins/abort @@ -39802,7 +39802,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2769 i32.const 0 call $~lib/builtins/abort @@ -39817,7 +39817,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2770 i32.const 0 call $~lib/builtins/abort @@ -39832,7 +39832,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2771 i32.const 0 call $~lib/builtins/abort @@ -39847,7 +39847,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2772 i32.const 0 call $~lib/builtins/abort @@ -39862,7 +39862,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2773 i32.const 0 call $~lib/builtins/abort @@ -39878,7 +39878,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2774 i32.const 0 call $~lib/builtins/abort @@ -39893,7 +39893,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2775 i32.const 0 call $~lib/builtins/abort @@ -39908,7 +39908,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2776 i32.const 0 call $~lib/builtins/abort @@ -39923,7 +39923,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2777 i32.const 0 call $~lib/builtins/abort @@ -39938,7 +39938,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2778 i32.const 0 call $~lib/builtins/abort @@ -39954,7 +39954,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2779 i32.const 0 call $~lib/builtins/abort @@ -39969,7 +39969,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2780 i32.const 0 call $~lib/builtins/abort @@ -39984,7 +39984,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2781 i32.const 0 call $~lib/builtins/abort @@ -39999,7 +39999,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2782 i32.const 0 call $~lib/builtins/abort @@ -40014,7 +40014,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2783 i32.const 0 call $~lib/builtins/abort @@ -40030,7 +40030,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2784 i32.const 0 call $~lib/builtins/abort @@ -40045,7 +40045,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2785 i32.const 0 call $~lib/builtins/abort @@ -40060,7 +40060,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2786 i32.const 0 call $~lib/builtins/abort @@ -40075,7 +40075,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2787 i32.const 0 call $~lib/builtins/abort @@ -40090,7 +40090,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2788 i32.const 0 call $~lib/builtins/abort @@ -40106,7 +40106,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2789 i32.const 0 call $~lib/builtins/abort @@ -40121,7 +40121,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2790 i32.const 0 call $~lib/builtins/abort @@ -40136,7 +40136,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2791 i32.const 0 call $~lib/builtins/abort @@ -40151,7 +40151,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2792 i32.const 0 call $~lib/builtins/abort @@ -40167,7 +40167,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2793 i32.const 0 call $~lib/builtins/abort @@ -40182,7 +40182,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2794 i32.const 0 call $~lib/builtins/abort @@ -40197,7 +40197,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2795 i32.const 0 call $~lib/builtins/abort @@ -40212,7 +40212,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2796 i32.const 0 call $~lib/builtins/abort @@ -40227,7 +40227,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2797 i32.const 0 call $~lib/builtins/abort @@ -40243,7 +40243,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2798 i32.const 0 call $~lib/builtins/abort @@ -40259,7 +40259,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2799 i32.const 0 call $~lib/builtins/abort @@ -40275,7 +40275,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2800 i32.const 0 call $~lib/builtins/abort @@ -40290,7 +40290,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2801 i32.const 0 call $~lib/builtins/abort @@ -40305,7 +40305,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2802 i32.const 0 call $~lib/builtins/abort @@ -40320,7 +40320,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2803 i32.const 0 call $~lib/builtins/abort @@ -40335,7 +40335,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2804 i32.const 0 call $~lib/builtins/abort @@ -40350,7 +40350,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2805 i32.const 0 call $~lib/builtins/abort @@ -40365,7 +40365,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2806 i32.const 0 call $~lib/builtins/abort @@ -40381,7 +40381,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2807 i32.const 0 call $~lib/builtins/abort @@ -40397,7 +40397,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2808 i32.const 0 call $~lib/builtins/abort @@ -40413,7 +40413,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2809 i32.const 0 call $~lib/builtins/abort @@ -40429,7 +40429,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2810 i32.const 0 call $~lib/builtins/abort @@ -40446,7 +40446,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2811 i32.const 0 call $~lib/builtins/abort @@ -40461,7 +40461,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2812 i32.const 0 call $~lib/builtins/abort @@ -40476,7 +40476,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2813 i32.const 0 call $~lib/builtins/abort @@ -40491,7 +40491,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2814 i32.const 0 call $~lib/builtins/abort @@ -40506,7 +40506,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2815 i32.const 0 call $~lib/builtins/abort @@ -40521,7 +40521,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2816 i32.const 0 call $~lib/builtins/abort @@ -40536,7 +40536,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2825 i32.const 0 call $~lib/builtins/abort @@ -40551,7 +40551,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2826 i32.const 0 call $~lib/builtins/abort @@ -40566,7 +40566,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2827 i32.const 0 call $~lib/builtins/abort @@ -40581,7 +40581,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2828 i32.const 0 call $~lib/builtins/abort @@ -40596,7 +40596,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2829 i32.const 0 call $~lib/builtins/abort @@ -40611,7 +40611,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2830 i32.const 0 call $~lib/builtins/abort @@ -40626,7 +40626,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2831 i32.const 0 call $~lib/builtins/abort @@ -40641,7 +40641,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2832 i32.const 0 call $~lib/builtins/abort @@ -40656,7 +40656,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2833 i32.const 0 call $~lib/builtins/abort @@ -40671,7 +40671,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2834 i32.const 0 call $~lib/builtins/abort @@ -40686,7 +40686,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2837 i32.const 0 call $~lib/builtins/abort @@ -40701,7 +40701,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2838 i32.const 0 call $~lib/builtins/abort @@ -40716,7 +40716,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2839 i32.const 0 call $~lib/builtins/abort @@ -40731,7 +40731,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2840 i32.const 0 call $~lib/builtins/abort @@ -40746,7 +40746,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2841 i32.const 0 call $~lib/builtins/abort @@ -40761,7 +40761,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2842 i32.const 0 call $~lib/builtins/abort @@ -40776,7 +40776,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2843 i32.const 0 call $~lib/builtins/abort @@ -40791,7 +40791,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2844 i32.const 0 call $~lib/builtins/abort @@ -40806,7 +40806,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2845 i32.const 0 call $~lib/builtins/abort @@ -40821,7 +40821,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2846 i32.const 0 call $~lib/builtins/abort @@ -40836,7 +40836,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2847 i32.const 0 call $~lib/builtins/abort @@ -40852,7 +40852,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2848 i32.const 0 call $~lib/builtins/abort @@ -40867,7 +40867,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2849 i32.const 0 call $~lib/builtins/abort @@ -40882,7 +40882,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2850 i32.const 0 call $~lib/builtins/abort @@ -40897,7 +40897,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2851 i32.const 0 call $~lib/builtins/abort @@ -40912,7 +40912,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2852 i32.const 0 call $~lib/builtins/abort @@ -40927,7 +40927,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2853 i32.const 0 call $~lib/builtins/abort @@ -40942,7 +40942,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2854 i32.const 0 call $~lib/builtins/abort @@ -40957,7 +40957,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2855 i32.const 0 call $~lib/builtins/abort @@ -40972,7 +40972,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2856 i32.const 0 call $~lib/builtins/abort @@ -40987,7 +40987,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2857 i32.const 0 call $~lib/builtins/abort @@ -41002,7 +41002,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2858 i32.const 0 call $~lib/builtins/abort @@ -41017,7 +41017,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2859 i32.const 0 call $~lib/builtins/abort @@ -41032,7 +41032,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2860 i32.const 0 call $~lib/builtins/abort @@ -41048,7 +41048,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2861 i32.const 0 call $~lib/builtins/abort @@ -41063,7 +41063,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2862 i32.const 0 call $~lib/builtins/abort @@ -41078,7 +41078,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2863 i32.const 0 call $~lib/builtins/abort @@ -41093,7 +41093,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2864 i32.const 0 call $~lib/builtins/abort @@ -41108,7 +41108,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2865 i32.const 0 call $~lib/builtins/abort @@ -41124,7 +41124,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2866 i32.const 0 call $~lib/builtins/abort @@ -41139,7 +41139,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2867 i32.const 0 call $~lib/builtins/abort @@ -41154,7 +41154,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2868 i32.const 0 call $~lib/builtins/abort @@ -41169,7 +41169,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2869 i32.const 0 call $~lib/builtins/abort @@ -41184,7 +41184,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2870 i32.const 0 call $~lib/builtins/abort @@ -41200,7 +41200,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2871 i32.const 0 call $~lib/builtins/abort @@ -41215,7 +41215,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2872 i32.const 0 call $~lib/builtins/abort @@ -41230,7 +41230,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2873 i32.const 0 call $~lib/builtins/abort @@ -41245,7 +41245,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2874 i32.const 0 call $~lib/builtins/abort @@ -41260,7 +41260,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2875 i32.const 0 call $~lib/builtins/abort @@ -41276,7 +41276,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2876 i32.const 0 call $~lib/builtins/abort @@ -41291,7 +41291,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2877 i32.const 0 call $~lib/builtins/abort @@ -41306,7 +41306,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2878 i32.const 0 call $~lib/builtins/abort @@ -41321,7 +41321,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2879 i32.const 0 call $~lib/builtins/abort @@ -41337,7 +41337,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2880 i32.const 0 call $~lib/builtins/abort @@ -41352,7 +41352,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2881 i32.const 0 call $~lib/builtins/abort @@ -41367,7 +41367,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2882 i32.const 0 call $~lib/builtins/abort @@ -41382,7 +41382,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2883 i32.const 0 call $~lib/builtins/abort @@ -41397,7 +41397,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2884 i32.const 0 call $~lib/builtins/abort @@ -41413,7 +41413,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2885 i32.const 0 call $~lib/builtins/abort @@ -41429,7 +41429,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2886 i32.const 0 call $~lib/builtins/abort @@ -41445,7 +41445,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2887 i32.const 0 call $~lib/builtins/abort @@ -41460,7 +41460,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2888 i32.const 0 call $~lib/builtins/abort @@ -41475,7 +41475,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2889 i32.const 0 call $~lib/builtins/abort @@ -41490,7 +41490,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2890 i32.const 0 call $~lib/builtins/abort @@ -41505,7 +41505,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2891 i32.const 0 call $~lib/builtins/abort @@ -41520,7 +41520,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2892 i32.const 0 call $~lib/builtins/abort @@ -41535,7 +41535,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2893 i32.const 0 call $~lib/builtins/abort @@ -41551,7 +41551,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2894 i32.const 0 call $~lib/builtins/abort @@ -41567,7 +41567,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2895 i32.const 0 call $~lib/builtins/abort @@ -41583,7 +41583,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2896 i32.const 0 call $~lib/builtins/abort @@ -41599,7 +41599,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2897 i32.const 0 call $~lib/builtins/abort @@ -41616,7 +41616,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2898 i32.const 0 call $~lib/builtins/abort @@ -41631,7 +41631,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2899 i32.const 0 call $~lib/builtins/abort @@ -41646,7 +41646,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2900 i32.const 0 call $~lib/builtins/abort @@ -41661,7 +41661,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2901 i32.const 0 call $~lib/builtins/abort @@ -41676,7 +41676,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2902 i32.const 0 call $~lib/builtins/abort @@ -41691,7 +41691,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2903 i32.const 0 call $~lib/builtins/abort @@ -41705,7 +41705,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2941 i32.const 0 call $~lib/builtins/abort @@ -41719,7 +41719,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2942 i32.const 0 call $~lib/builtins/abort @@ -41733,7 +41733,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2943 i32.const 0 call $~lib/builtins/abort @@ -41747,7 +41747,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2944 i32.const 0 call $~lib/builtins/abort @@ -41761,7 +41761,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2945 i32.const 0 call $~lib/builtins/abort @@ -41775,7 +41775,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2946 i32.const 0 call $~lib/builtins/abort @@ -41789,7 +41789,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2947 i32.const 0 call $~lib/builtins/abort @@ -41803,7 +41803,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2948 i32.const 0 call $~lib/builtins/abort @@ -41817,7 +41817,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2949 i32.const 0 call $~lib/builtins/abort @@ -41831,7 +41831,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2950 i32.const 0 call $~lib/builtins/abort @@ -41845,7 +41845,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2953 i32.const 0 call $~lib/builtins/abort @@ -41859,7 +41859,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2954 i32.const 0 call $~lib/builtins/abort @@ -41873,7 +41873,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2955 i32.const 0 call $~lib/builtins/abort @@ -41888,7 +41888,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2956 i32.const 0 call $~lib/builtins/abort @@ -41902,7 +41902,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2957 i32.const 0 call $~lib/builtins/abort @@ -41916,7 +41916,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2960 i32.const 0 call $~lib/builtins/abort @@ -41930,7 +41930,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2961 i32.const 0 call $~lib/builtins/abort @@ -41944,7 +41944,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2962 i32.const 0 call $~lib/builtins/abort @@ -41958,7 +41958,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2963 i32.const 0 call $~lib/builtins/abort @@ -41974,7 +41974,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2964 i32.const 0 call $~lib/builtins/abort @@ -41990,7 +41990,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2965 i32.const 0 call $~lib/builtins/abort @@ -42004,7 +42004,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2966 i32.const 0 call $~lib/builtins/abort @@ -42018,7 +42018,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2967 i32.const 0 call $~lib/builtins/abort @@ -42032,7 +42032,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2968 i32.const 0 call $~lib/builtins/abort @@ -42046,7 +42046,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2969 i32.const 0 call $~lib/builtins/abort @@ -42060,7 +42060,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2970 i32.const 0 call $~lib/builtins/abort @@ -42074,7 +42074,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2971 i32.const 0 call $~lib/builtins/abort @@ -42088,7 +42088,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2972 i32.const 0 call $~lib/builtins/abort @@ -42102,7 +42102,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2973 i32.const 0 call $~lib/builtins/abort @@ -42116,7 +42116,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2974 i32.const 0 call $~lib/builtins/abort @@ -42130,7 +42130,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2975 i32.const 0 call $~lib/builtins/abort @@ -42144,7 +42144,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2976 i32.const 0 call $~lib/builtins/abort @@ -42158,7 +42158,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2977 i32.const 0 call $~lib/builtins/abort @@ -42172,7 +42172,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2978 i32.const 0 call $~lib/builtins/abort @@ -42186,7 +42186,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2979 i32.const 0 call $~lib/builtins/abort @@ -42200,7 +42200,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2980 i32.const 0 call $~lib/builtins/abort @@ -42214,7 +42214,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2981 i32.const 0 call $~lib/builtins/abort @@ -42228,7 +42228,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2982 i32.const 0 call $~lib/builtins/abort @@ -42242,7 +42242,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2983 i32.const 0 call $~lib/builtins/abort @@ -42256,7 +42256,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2984 i32.const 0 call $~lib/builtins/abort @@ -42270,7 +42270,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2985 i32.const 0 call $~lib/builtins/abort @@ -42286,7 +42286,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2986 i32.const 0 call $~lib/builtins/abort @@ -42302,7 +42302,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2987 i32.const 0 call $~lib/builtins/abort @@ -42318,7 +42318,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2988 i32.const 0 call $~lib/builtins/abort @@ -42334,7 +42334,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2989 i32.const 0 call $~lib/builtins/abort @@ -42350,7 +42350,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2990 i32.const 0 call $~lib/builtins/abort @@ -42366,7 +42366,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2991 i32.const 0 call $~lib/builtins/abort @@ -42382,7 +42382,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2992 i32.const 0 call $~lib/builtins/abort @@ -42398,7 +42398,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2993 i32.const 0 call $~lib/builtins/abort @@ -42414,7 +42414,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2994 i32.const 0 call $~lib/builtins/abort @@ -42430,7 +42430,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2995 i32.const 0 call $~lib/builtins/abort @@ -42446,7 +42446,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2996 i32.const 0 call $~lib/builtins/abort @@ -42462,7 +42462,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 2997 i32.const 0 call $~lib/builtins/abort @@ -42476,7 +42476,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3000 i32.const 0 call $~lib/builtins/abort @@ -42490,7 +42490,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3001 i32.const 0 call $~lib/builtins/abort @@ -42504,7 +42504,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3002 i32.const 0 call $~lib/builtins/abort @@ -42518,7 +42518,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3003 i32.const 0 call $~lib/builtins/abort @@ -42532,7 +42532,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3004 i32.const 0 call $~lib/builtins/abort @@ -42546,7 +42546,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3005 i32.const 0 call $~lib/builtins/abort @@ -42560,7 +42560,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3006 i32.const 0 call $~lib/builtins/abort @@ -42574,7 +42574,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3007 i32.const 0 call $~lib/builtins/abort @@ -42588,7 +42588,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3008 i32.const 0 call $~lib/builtins/abort @@ -42602,7 +42602,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3009 i32.const 0 call $~lib/builtins/abort @@ -42616,7 +42616,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3010 i32.const 0 call $~lib/builtins/abort @@ -42630,7 +42630,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3011 i32.const 0 call $~lib/builtins/abort @@ -42644,7 +42644,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3012 i32.const 0 call $~lib/builtins/abort @@ -42659,7 +42659,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3013 i32.const 0 call $~lib/builtins/abort @@ -42673,7 +42673,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3025 i32.const 0 call $~lib/builtins/abort @@ -42687,7 +42687,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3026 i32.const 0 call $~lib/builtins/abort @@ -42701,7 +42701,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3027 i32.const 0 call $~lib/builtins/abort @@ -42715,7 +42715,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3028 i32.const 0 call $~lib/builtins/abort @@ -42729,7 +42729,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3029 i32.const 0 call $~lib/builtins/abort @@ -42743,7 +42743,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3030 i32.const 0 call $~lib/builtins/abort @@ -42757,7 +42757,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3031 i32.const 0 call $~lib/builtins/abort @@ -42771,7 +42771,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3032 i32.const 0 call $~lib/builtins/abort @@ -42785,7 +42785,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3033 i32.const 0 call $~lib/builtins/abort @@ -42799,7 +42799,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3034 i32.const 0 call $~lib/builtins/abort @@ -42813,7 +42813,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3037 i32.const 0 call $~lib/builtins/abort @@ -42827,7 +42827,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3038 i32.const 0 call $~lib/builtins/abort @@ -42841,7 +42841,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3039 i32.const 0 call $~lib/builtins/abort @@ -42857,7 +42857,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3040 i32.const 0 call $~lib/builtins/abort @@ -42871,7 +42871,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3041 i32.const 0 call $~lib/builtins/abort @@ -42885,7 +42885,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3050 i32.const 0 call $~lib/builtins/abort @@ -42899,7 +42899,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3051 i32.const 0 call $~lib/builtins/abort @@ -42913,7 +42913,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3052 i32.const 0 call $~lib/builtins/abort @@ -42927,7 +42927,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3053 i32.const 0 call $~lib/builtins/abort @@ -42941,7 +42941,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3054 i32.const 0 call $~lib/builtins/abort @@ -42955,7 +42955,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3055 i32.const 0 call $~lib/builtins/abort @@ -42969,7 +42969,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3056 i32.const 0 call $~lib/builtins/abort @@ -42983,7 +42983,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3057 i32.const 0 call $~lib/builtins/abort @@ -42997,7 +42997,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3058 i32.const 0 call $~lib/builtins/abort @@ -43011,7 +43011,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3059 i32.const 0 call $~lib/builtins/abort @@ -43025,7 +43025,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3062 i32.const 0 call $~lib/builtins/abort @@ -43039,7 +43039,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3063 i32.const 0 call $~lib/builtins/abort @@ -43053,7 +43053,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3064 i32.const 0 call $~lib/builtins/abort @@ -43069,7 +43069,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3065 i32.const 0 call $~lib/builtins/abort @@ -43083,7 +43083,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3066 i32.const 0 call $~lib/builtins/abort @@ -43097,7 +43097,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3078 i32.const 0 call $~lib/builtins/abort @@ -43111,7 +43111,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3079 i32.const 0 call $~lib/builtins/abort @@ -43125,7 +43125,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3080 i32.const 0 call $~lib/builtins/abort @@ -43139,7 +43139,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3081 i32.const 0 call $~lib/builtins/abort @@ -43153,7 +43153,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3082 i32.const 0 call $~lib/builtins/abort @@ -43167,7 +43167,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3083 i32.const 0 call $~lib/builtins/abort @@ -43181,7 +43181,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3084 i32.const 0 call $~lib/builtins/abort @@ -43195,7 +43195,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3085 i32.const 0 call $~lib/builtins/abort @@ -43209,7 +43209,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3086 i32.const 0 call $~lib/builtins/abort @@ -43223,7 +43223,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3087 i32.const 0 call $~lib/builtins/abort @@ -43237,7 +43237,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3090 i32.const 0 call $~lib/builtins/abort @@ -43251,7 +43251,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3091 i32.const 0 call $~lib/builtins/abort @@ -43266,7 +43266,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3092 i32.const 0 call $~lib/builtins/abort @@ -43280,7 +43280,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3093 i32.const 0 call $~lib/builtins/abort @@ -43294,7 +43294,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3094 i32.const 0 call $~lib/builtins/abort @@ -43308,7 +43308,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3095 i32.const 0 call $~lib/builtins/abort @@ -43322,7 +43322,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3096 i32.const 0 call $~lib/builtins/abort @@ -43336,7 +43336,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3097 i32.const 0 call $~lib/builtins/abort @@ -43350,7 +43350,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3098 i32.const 0 call $~lib/builtins/abort @@ -43364,7 +43364,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3099 i32.const 0 call $~lib/builtins/abort @@ -43378,7 +43378,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3100 i32.const 0 call $~lib/builtins/abort @@ -43392,7 +43392,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3101 i32.const 0 call $~lib/builtins/abort @@ -43406,7 +43406,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3102 i32.const 0 call $~lib/builtins/abort @@ -43420,7 +43420,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3103 i32.const 0 call $~lib/builtins/abort @@ -43434,7 +43434,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3104 i32.const 0 call $~lib/builtins/abort @@ -43448,7 +43448,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3105 i32.const 0 call $~lib/builtins/abort @@ -43462,7 +43462,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3106 i32.const 0 call $~lib/builtins/abort @@ -43476,7 +43476,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3107 i32.const 0 call $~lib/builtins/abort @@ -43490,7 +43490,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3108 i32.const 0 call $~lib/builtins/abort @@ -43504,7 +43504,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3109 i32.const 0 call $~lib/builtins/abort @@ -43518,7 +43518,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3110 i32.const 0 call $~lib/builtins/abort @@ -43532,7 +43532,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3111 i32.const 0 call $~lib/builtins/abort @@ -43546,7 +43546,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3112 i32.const 0 call $~lib/builtins/abort @@ -43560,7 +43560,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3113 i32.const 0 call $~lib/builtins/abort @@ -43574,7 +43574,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3114 i32.const 0 call $~lib/builtins/abort @@ -43588,7 +43588,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3115 i32.const 0 call $~lib/builtins/abort @@ -43602,7 +43602,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3116 i32.const 0 call $~lib/builtins/abort @@ -43616,7 +43616,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3117 i32.const 0 call $~lib/builtins/abort @@ -43630,7 +43630,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3118 i32.const 0 call $~lib/builtins/abort @@ -43644,7 +43644,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3119 i32.const 0 call $~lib/builtins/abort @@ -43658,7 +43658,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3120 i32.const 0 call $~lib/builtins/abort @@ -43672,7 +43672,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3121 i32.const 0 call $~lib/builtins/abort @@ -43686,7 +43686,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3122 i32.const 0 call $~lib/builtins/abort @@ -43700,7 +43700,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3123 i32.const 0 call $~lib/builtins/abort @@ -43714,7 +43714,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3124 i32.const 0 call $~lib/builtins/abort @@ -43728,7 +43728,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3125 i32.const 0 call $~lib/builtins/abort @@ -43742,7 +43742,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3126 i32.const 0 call $~lib/builtins/abort @@ -43756,7 +43756,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3127 i32.const 0 call $~lib/builtins/abort @@ -43770,7 +43770,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3128 i32.const 0 call $~lib/builtins/abort @@ -43784,7 +43784,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3129 i32.const 0 call $~lib/builtins/abort @@ -43798,7 +43798,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3130 i32.const 0 call $~lib/builtins/abort @@ -43812,7 +43812,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3131 i32.const 0 call $~lib/builtins/abort @@ -43826,7 +43826,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3132 i32.const 0 call $~lib/builtins/abort @@ -43840,7 +43840,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3133 i32.const 0 call $~lib/builtins/abort @@ -43854,7 +43854,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3134 i32.const 0 call $~lib/builtins/abort @@ -43868,7 +43868,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3135 i32.const 0 call $~lib/builtins/abort @@ -43882,7 +43882,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3136 i32.const 0 call $~lib/builtins/abort @@ -43896,7 +43896,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3137 i32.const 0 call $~lib/builtins/abort @@ -43910,7 +43910,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3138 i32.const 0 call $~lib/builtins/abort @@ -43924,7 +43924,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3139 i32.const 0 call $~lib/builtins/abort @@ -43938,7 +43938,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3140 i32.const 0 call $~lib/builtins/abort @@ -43952,7 +43952,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3141 i32.const 0 call $~lib/builtins/abort @@ -43966,7 +43966,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3142 i32.const 0 call $~lib/builtins/abort @@ -43980,7 +43980,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3143 i32.const 0 call $~lib/builtins/abort @@ -43994,7 +43994,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3144 i32.const 0 call $~lib/builtins/abort @@ -44008,7 +44008,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3145 i32.const 0 call $~lib/builtins/abort @@ -44022,7 +44022,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3146 i32.const 0 call $~lib/builtins/abort @@ -44036,7 +44036,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3147 i32.const 0 call $~lib/builtins/abort @@ -44050,7 +44050,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3148 i32.const 0 call $~lib/builtins/abort @@ -44064,7 +44064,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3149 i32.const 0 call $~lib/builtins/abort @@ -44078,7 +44078,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3150 i32.const 0 call $~lib/builtins/abort @@ -44092,7 +44092,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3151 i32.const 0 call $~lib/builtins/abort @@ -44106,7 +44106,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3152 i32.const 0 call $~lib/builtins/abort @@ -44120,7 +44120,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3153 i32.const 0 call $~lib/builtins/abort @@ -44134,7 +44134,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3154 i32.const 0 call $~lib/builtins/abort @@ -44148,7 +44148,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3155 i32.const 0 call $~lib/builtins/abort @@ -44162,7 +44162,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3156 i32.const 0 call $~lib/builtins/abort @@ -44176,7 +44176,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3157 i32.const 0 call $~lib/builtins/abort @@ -44190,7 +44190,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3158 i32.const 0 call $~lib/builtins/abort @@ -44204,7 +44204,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3159 i32.const 0 call $~lib/builtins/abort @@ -44218,7 +44218,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3160 i32.const 0 call $~lib/builtins/abort @@ -44232,7 +44232,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3161 i32.const 0 call $~lib/builtins/abort @@ -44246,7 +44246,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3162 i32.const 0 call $~lib/builtins/abort @@ -44260,7 +44260,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3163 i32.const 0 call $~lib/builtins/abort @@ -44274,7 +44274,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3172 i32.const 0 call $~lib/builtins/abort @@ -44288,7 +44288,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3173 i32.const 0 call $~lib/builtins/abort @@ -44302,7 +44302,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3174 i32.const 0 call $~lib/builtins/abort @@ -44316,7 +44316,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3175 i32.const 0 call $~lib/builtins/abort @@ -44330,7 +44330,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3176 i32.const 0 call $~lib/builtins/abort @@ -44344,7 +44344,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3177 i32.const 0 call $~lib/builtins/abort @@ -44358,7 +44358,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3178 i32.const 0 call $~lib/builtins/abort @@ -44372,7 +44372,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3179 i32.const 0 call $~lib/builtins/abort @@ -44386,7 +44386,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3180 i32.const 0 call $~lib/builtins/abort @@ -44400,7 +44400,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3181 i32.const 0 call $~lib/builtins/abort @@ -44414,7 +44414,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3184 i32.const 0 call $~lib/builtins/abort @@ -44428,7 +44428,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3185 i32.const 0 call $~lib/builtins/abort @@ -44443,7 +44443,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3186 i32.const 0 call $~lib/builtins/abort @@ -44457,7 +44457,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3187 i32.const 0 call $~lib/builtins/abort @@ -44471,7 +44471,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3188 i32.const 0 call $~lib/builtins/abort @@ -44485,7 +44485,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3189 i32.const 0 call $~lib/builtins/abort @@ -44499,7 +44499,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3190 i32.const 0 call $~lib/builtins/abort @@ -44513,7 +44513,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3191 i32.const 0 call $~lib/builtins/abort @@ -44527,7 +44527,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3192 i32.const 0 call $~lib/builtins/abort @@ -44541,7 +44541,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3193 i32.const 0 call $~lib/builtins/abort @@ -44555,7 +44555,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3194 i32.const 0 call $~lib/builtins/abort @@ -44569,7 +44569,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3195 i32.const 0 call $~lib/builtins/abort @@ -44583,7 +44583,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3196 i32.const 0 call $~lib/builtins/abort @@ -44597,7 +44597,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3197 i32.const 0 call $~lib/builtins/abort @@ -44611,7 +44611,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3198 i32.const 0 call $~lib/builtins/abort @@ -44625,7 +44625,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3199 i32.const 0 call $~lib/builtins/abort @@ -44639,7 +44639,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3200 i32.const 0 call $~lib/builtins/abort @@ -44653,7 +44653,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3201 i32.const 0 call $~lib/builtins/abort @@ -44667,7 +44667,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3202 i32.const 0 call $~lib/builtins/abort @@ -44681,7 +44681,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3203 i32.const 0 call $~lib/builtins/abort @@ -44695,7 +44695,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3204 i32.const 0 call $~lib/builtins/abort @@ -44709,7 +44709,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3205 i32.const 0 call $~lib/builtins/abort @@ -44723,7 +44723,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3243 i32.const 0 call $~lib/builtins/abort @@ -44737,7 +44737,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3244 i32.const 0 call $~lib/builtins/abort @@ -44751,7 +44751,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3245 i32.const 0 call $~lib/builtins/abort @@ -44765,7 +44765,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3246 i32.const 0 call $~lib/builtins/abort @@ -44779,7 +44779,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3247 i32.const 0 call $~lib/builtins/abort @@ -44793,7 +44793,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3248 i32.const 0 call $~lib/builtins/abort @@ -44807,7 +44807,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3249 i32.const 0 call $~lib/builtins/abort @@ -44821,7 +44821,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3250 i32.const 0 call $~lib/builtins/abort @@ -44835,7 +44835,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3251 i32.const 0 call $~lib/builtins/abort @@ -44849,7 +44849,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3252 i32.const 0 call $~lib/builtins/abort @@ -44863,7 +44863,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3255 i32.const 0 call $~lib/builtins/abort @@ -44877,7 +44877,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3256 i32.const 0 call $~lib/builtins/abort @@ -44891,7 +44891,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3257 i32.const 0 call $~lib/builtins/abort @@ -44906,7 +44906,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3258 i32.const 0 call $~lib/builtins/abort @@ -44920,7 +44920,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3259 i32.const 0 call $~lib/builtins/abort @@ -44934,7 +44934,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3262 i32.const 0 call $~lib/builtins/abort @@ -44948,7 +44948,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3263 i32.const 0 call $~lib/builtins/abort @@ -44962,7 +44962,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3264 i32.const 0 call $~lib/builtins/abort @@ -44976,7 +44976,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3265 i32.const 0 call $~lib/builtins/abort @@ -44992,7 +44992,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3266 i32.const 0 call $~lib/builtins/abort @@ -45008,7 +45008,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3267 i32.const 0 call $~lib/builtins/abort @@ -45022,7 +45022,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3268 i32.const 0 call $~lib/builtins/abort @@ -45036,7 +45036,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3269 i32.const 0 call $~lib/builtins/abort @@ -45050,7 +45050,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3270 i32.const 0 call $~lib/builtins/abort @@ -45064,7 +45064,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3271 i32.const 0 call $~lib/builtins/abort @@ -45078,7 +45078,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3272 i32.const 0 call $~lib/builtins/abort @@ -45092,7 +45092,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3273 i32.const 0 call $~lib/builtins/abort @@ -45106,7 +45106,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3274 i32.const 0 call $~lib/builtins/abort @@ -45120,7 +45120,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3275 i32.const 0 call $~lib/builtins/abort @@ -45134,7 +45134,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3276 i32.const 0 call $~lib/builtins/abort @@ -45148,7 +45148,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3277 i32.const 0 call $~lib/builtins/abort @@ -45162,7 +45162,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3278 i32.const 0 call $~lib/builtins/abort @@ -45176,7 +45176,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3279 i32.const 0 call $~lib/builtins/abort @@ -45190,7 +45190,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3280 i32.const 0 call $~lib/builtins/abort @@ -45204,7 +45204,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3281 i32.const 0 call $~lib/builtins/abort @@ -45218,7 +45218,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3282 i32.const 0 call $~lib/builtins/abort @@ -45232,7 +45232,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3283 i32.const 0 call $~lib/builtins/abort @@ -45246,7 +45246,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3284 i32.const 0 call $~lib/builtins/abort @@ -45260,7 +45260,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3285 i32.const 0 call $~lib/builtins/abort @@ -45276,7 +45276,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3286 i32.const 0 call $~lib/builtins/abort @@ -45292,7 +45292,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3287 i32.const 0 call $~lib/builtins/abort @@ -45308,7 +45308,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3288 i32.const 0 call $~lib/builtins/abort @@ -45324,7 +45324,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3289 i32.const 0 call $~lib/builtins/abort @@ -45340,7 +45340,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3290 i32.const 0 call $~lib/builtins/abort @@ -45356,7 +45356,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3291 i32.const 0 call $~lib/builtins/abort @@ -45372,7 +45372,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3292 i32.const 0 call $~lib/builtins/abort @@ -45388,7 +45388,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3293 i32.const 0 call $~lib/builtins/abort @@ -45404,7 +45404,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3294 i32.const 0 call $~lib/builtins/abort @@ -45420,7 +45420,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3295 i32.const 0 call $~lib/builtins/abort @@ -45436,7 +45436,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3296 i32.const 0 call $~lib/builtins/abort @@ -45452,7 +45452,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3297 i32.const 0 call $~lib/builtins/abort @@ -45466,7 +45466,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3309 i32.const 0 call $~lib/builtins/abort @@ -45480,7 +45480,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3310 i32.const 0 call $~lib/builtins/abort @@ -45494,7 +45494,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3311 i32.const 0 call $~lib/builtins/abort @@ -45508,7 +45508,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3312 i32.const 0 call $~lib/builtins/abort @@ -45522,7 +45522,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3313 i32.const 0 call $~lib/builtins/abort @@ -45536,7 +45536,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3314 i32.const 0 call $~lib/builtins/abort @@ -45550,7 +45550,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3315 i32.const 0 call $~lib/builtins/abort @@ -45564,7 +45564,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3316 i32.const 0 call $~lib/builtins/abort @@ -45578,7 +45578,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3317 i32.const 0 call $~lib/builtins/abort @@ -45592,7 +45592,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3318 i32.const 0 call $~lib/builtins/abort @@ -45606,7 +45606,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3321 i32.const 0 call $~lib/builtins/abort @@ -45620,7 +45620,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3322 i32.const 0 call $~lib/builtins/abort @@ -45634,7 +45634,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3323 i32.const 0 call $~lib/builtins/abort @@ -45649,7 +45649,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3324 i32.const 0 call $~lib/builtins/abort @@ -45663,7 +45663,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3325 i32.const 0 call $~lib/builtins/abort @@ -45677,7 +45677,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3334 i32.const 0 call $~lib/builtins/abort @@ -45691,7 +45691,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3335 i32.const 0 call $~lib/builtins/abort @@ -45705,7 +45705,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3336 i32.const 0 call $~lib/builtins/abort @@ -45719,7 +45719,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3337 i32.const 0 call $~lib/builtins/abort @@ -45733,7 +45733,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3338 i32.const 0 call $~lib/builtins/abort @@ -45747,7 +45747,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3339 i32.const 0 call $~lib/builtins/abort @@ -45761,7 +45761,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3340 i32.const 0 call $~lib/builtins/abort @@ -45775,7 +45775,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3341 i32.const 0 call $~lib/builtins/abort @@ -45789,7 +45789,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3342 i32.const 0 call $~lib/builtins/abort @@ -45803,7 +45803,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3343 i32.const 0 call $~lib/builtins/abort @@ -45817,7 +45817,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3346 i32.const 0 call $~lib/builtins/abort @@ -45831,7 +45831,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3347 i32.const 0 call $~lib/builtins/abort @@ -45845,7 +45845,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3348 i32.const 0 call $~lib/builtins/abort @@ -45860,7 +45860,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3349 i32.const 0 call $~lib/builtins/abort @@ -45874,7 +45874,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3350 i32.const 0 call $~lib/builtins/abort @@ -45888,7 +45888,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3362 i32.const 0 call $~lib/builtins/abort @@ -45902,7 +45902,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3363 i32.const 0 call $~lib/builtins/abort @@ -45916,7 +45916,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3364 i32.const 0 call $~lib/builtins/abort @@ -45930,7 +45930,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3365 i32.const 0 call $~lib/builtins/abort @@ -45944,7 +45944,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3366 i32.const 0 call $~lib/builtins/abort @@ -45958,7 +45958,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3367 i32.const 0 call $~lib/builtins/abort @@ -45972,7 +45972,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3368 i32.const 0 call $~lib/builtins/abort @@ -45986,7 +45986,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3369 i32.const 0 call $~lib/builtins/abort @@ -46000,7 +46000,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3370 i32.const 0 call $~lib/builtins/abort @@ -46014,7 +46014,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3371 i32.const 0 call $~lib/builtins/abort @@ -46028,7 +46028,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3374 i32.const 0 call $~lib/builtins/abort @@ -46042,7 +46042,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3375 i32.const 0 call $~lib/builtins/abort @@ -46058,7 +46058,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3376 i32.const 0 call $~lib/builtins/abort @@ -46072,7 +46072,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3377 i32.const 0 call $~lib/builtins/abort @@ -46086,7 +46086,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3378 i32.const 0 call $~lib/builtins/abort @@ -46100,7 +46100,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3379 i32.const 0 call $~lib/builtins/abort @@ -46114,7 +46114,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3380 i32.const 0 call $~lib/builtins/abort @@ -46128,7 +46128,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3381 i32.const 0 call $~lib/builtins/abort @@ -46142,7 +46142,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3382 i32.const 0 call $~lib/builtins/abort @@ -46156,7 +46156,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3383 i32.const 0 call $~lib/builtins/abort @@ -46170,7 +46170,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3384 i32.const 0 call $~lib/builtins/abort @@ -46184,7 +46184,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3385 i32.const 0 call $~lib/builtins/abort @@ -46198,7 +46198,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3386 i32.const 0 call $~lib/builtins/abort @@ -46212,7 +46212,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3387 i32.const 0 call $~lib/builtins/abort @@ -46226,7 +46226,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3388 i32.const 0 call $~lib/builtins/abort @@ -46240,7 +46240,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3397 i32.const 0 call $~lib/builtins/abort @@ -46254,7 +46254,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3398 i32.const 0 call $~lib/builtins/abort @@ -46268,7 +46268,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3399 i32.const 0 call $~lib/builtins/abort @@ -46282,7 +46282,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3400 i32.const 0 call $~lib/builtins/abort @@ -46296,7 +46296,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3401 i32.const 0 call $~lib/builtins/abort @@ -46310,7 +46310,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3402 i32.const 0 call $~lib/builtins/abort @@ -46324,7 +46324,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3403 i32.const 0 call $~lib/builtins/abort @@ -46338,7 +46338,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3404 i32.const 0 call $~lib/builtins/abort @@ -46352,7 +46352,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3405 i32.const 0 call $~lib/builtins/abort @@ -46366,7 +46366,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3406 i32.const 0 call $~lib/builtins/abort @@ -46380,7 +46380,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3409 i32.const 0 call $~lib/builtins/abort @@ -46394,7 +46394,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3410 i32.const 0 call $~lib/builtins/abort @@ -46410,7 +46410,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3411 i32.const 0 call $~lib/builtins/abort @@ -46424,7 +46424,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3412 i32.const 0 call $~lib/builtins/abort @@ -46438,7 +46438,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3413 i32.const 0 call $~lib/builtins/abort @@ -46452,7 +46452,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3414 i32.const 0 call $~lib/builtins/abort @@ -46466,7 +46466,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3415 i32.const 0 call $~lib/builtins/abort @@ -46480,7 +46480,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3416 i32.const 0 call $~lib/builtins/abort @@ -46494,7 +46494,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3417 i32.const 0 call $~lib/builtins/abort @@ -46508,7 +46508,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3418 i32.const 0 call $~lib/builtins/abort @@ -46522,7 +46522,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3419 i32.const 0 call $~lib/builtins/abort @@ -46536,7 +46536,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3420 i32.const 0 call $~lib/builtins/abort @@ -46550,7 +46550,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3421 i32.const 0 call $~lib/builtins/abort @@ -46564,7 +46564,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3422 i32.const 0 call $~lib/builtins/abort @@ -46578,7 +46578,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3423 i32.const 0 call $~lib/builtins/abort @@ -46592,7 +46592,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3427 i32.const 0 call $~lib/builtins/abort @@ -46606,7 +46606,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3428 i32.const 0 call $~lib/builtins/abort @@ -46620,7 +46620,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3429 i32.const 0 call $~lib/builtins/abort @@ -46634,7 +46634,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3430 i32.const 0 call $~lib/builtins/abort @@ -46648,7 +46648,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3431 i32.const 0 call $~lib/builtins/abort @@ -46662,7 +46662,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3432 i32.const 0 call $~lib/builtins/abort @@ -46676,7 +46676,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3433 i32.const 0 call $~lib/builtins/abort @@ -46690,7 +46690,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3434 i32.const 0 call $~lib/builtins/abort @@ -46704,7 +46704,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3435 i32.const 0 call $~lib/builtins/abort @@ -46718,7 +46718,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3436 i32.const 0 call $~lib/builtins/abort @@ -46732,7 +46732,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3437 i32.const 0 call $~lib/builtins/abort @@ -46746,7 +46746,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3438 i32.const 0 call $~lib/builtins/abort @@ -46759,7 +46759,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3442 i32.const 0 call $~lib/builtins/abort @@ -46772,7 +46772,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3443 i32.const 0 call $~lib/builtins/abort @@ -46785,7 +46785,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3444 i32.const 0 call $~lib/builtins/abort @@ -46798,7 +46798,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3445 i32.const 0 call $~lib/builtins/abort @@ -46811,7 +46811,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3446 i32.const 0 call $~lib/builtins/abort @@ -46824,7 +46824,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3447 i32.const 0 call $~lib/builtins/abort @@ -46837,7 +46837,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3448 i32.const 0 call $~lib/builtins/abort @@ -46850,7 +46850,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3449 i32.const 0 call $~lib/builtins/abort @@ -46863,7 +46863,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3450 i32.const 0 call $~lib/builtins/abort @@ -46876,7 +46876,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3451 i32.const 0 call $~lib/builtins/abort @@ -46889,7 +46889,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3452 i32.const 0 call $~lib/builtins/abort @@ -46903,7 +46903,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3453 i32.const 0 call $~lib/builtins/abort @@ -46916,7 +46916,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3454 i32.const 0 call $~lib/builtins/abort @@ -46929,7 +46929,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3455 i32.const 0 call $~lib/builtins/abort @@ -46943,7 +46943,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3456 i32.const 0 call $~lib/builtins/abort @@ -46956,7 +46956,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3457 i32.const 0 call $~lib/builtins/abort @@ -46970,7 +46970,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3461 i32.const 0 call $~lib/builtins/abort @@ -46984,7 +46984,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3462 i32.const 0 call $~lib/builtins/abort @@ -46998,7 +46998,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3463 i32.const 0 call $~lib/builtins/abort @@ -47012,7 +47012,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3464 i32.const 0 call $~lib/builtins/abort @@ -47026,7 +47026,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3466 i32.const 0 call $~lib/builtins/abort @@ -47040,7 +47040,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3467 i32.const 0 call $~lib/builtins/abort @@ -47054,7 +47054,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3468 i32.const 0 call $~lib/builtins/abort @@ -47068,7 +47068,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3469 i32.const 0 call $~lib/builtins/abort @@ -47082,7 +47082,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3471 i32.const 0 call $~lib/builtins/abort @@ -47096,7 +47096,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3472 i32.const 0 call $~lib/builtins/abort @@ -47110,7 +47110,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3473 i32.const 0 call $~lib/builtins/abort @@ -47124,7 +47124,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3474 i32.const 0 call $~lib/builtins/abort @@ -47138,7 +47138,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3476 i32.const 0 call $~lib/builtins/abort @@ -47152,7 +47152,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3477 i32.const 0 call $~lib/builtins/abort @@ -47166,7 +47166,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3478 i32.const 0 call $~lib/builtins/abort @@ -47180,7 +47180,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3479 i32.const 0 call $~lib/builtins/abort @@ -47194,7 +47194,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3481 i32.const 0 call $~lib/builtins/abort @@ -47208,7 +47208,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3482 i32.const 0 call $~lib/builtins/abort @@ -47222,7 +47222,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3483 i32.const 0 call $~lib/builtins/abort @@ -47236,7 +47236,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3484 i32.const 0 call $~lib/builtins/abort @@ -47250,7 +47250,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3486 i32.const 0 call $~lib/builtins/abort @@ -47264,7 +47264,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3487 i32.const 0 call $~lib/builtins/abort @@ -47278,7 +47278,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3488 i32.const 0 call $~lib/builtins/abort @@ -47292,7 +47292,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3489 i32.const 0 call $~lib/builtins/abort @@ -47306,7 +47306,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3490 i32.const 0 call $~lib/builtins/abort @@ -47320,7 +47320,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3491 i32.const 0 call $~lib/builtins/abort @@ -47334,7 +47334,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3492 i32.const 0 call $~lib/builtins/abort @@ -47352,7 +47352,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3494 i32.const 0 call $~lib/builtins/abort @@ -47366,7 +47366,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3498 i32.const 0 call $~lib/builtins/abort @@ -47380,7 +47380,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3499 i32.const 0 call $~lib/builtins/abort @@ -47393,7 +47393,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3500 i32.const 0 call $~lib/builtins/abort @@ -47406,7 +47406,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3501 i32.const 0 call $~lib/builtins/abort @@ -47419,7 +47419,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3502 i32.const 0 call $~lib/builtins/abort @@ -47433,7 +47433,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3503 i32.const 0 call $~lib/builtins/abort @@ -47447,7 +47447,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3504 i32.const 0 call $~lib/builtins/abort @@ -47462,7 +47462,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3505 i32.const 0 call $~lib/builtins/abort @@ -47478,7 +47478,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3506 i32.const 0 call $~lib/builtins/abort @@ -47493,7 +47493,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3507 i32.const 0 call $~lib/builtins/abort @@ -47507,7 +47507,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3508 i32.const 0 call $~lib/builtins/abort @@ -47521,7 +47521,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3509 i32.const 0 call $~lib/builtins/abort @@ -47535,7 +47535,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3510 i32.const 0 call $~lib/builtins/abort @@ -47549,7 +47549,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3511 i32.const 0 call $~lib/builtins/abort @@ -47563,7 +47563,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3512 i32.const 0 call $~lib/builtins/abort @@ -47577,7 +47577,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3513 i32.const 0 call $~lib/builtins/abort @@ -47591,7 +47591,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3517 i32.const 0 call $~lib/builtins/abort @@ -47605,7 +47605,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3518 i32.const 0 call $~lib/builtins/abort @@ -47618,7 +47618,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3519 i32.const 0 call $~lib/builtins/abort @@ -47631,7 +47631,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3520 i32.const 0 call $~lib/builtins/abort @@ -47644,7 +47644,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3521 i32.const 0 call $~lib/builtins/abort @@ -47658,7 +47658,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3522 i32.const 0 call $~lib/builtins/abort @@ -47672,7 +47672,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3523 i32.const 0 call $~lib/builtins/abort @@ -47687,7 +47687,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3524 i32.const 0 call $~lib/builtins/abort @@ -47703,7 +47703,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3525 i32.const 0 call $~lib/builtins/abort @@ -47718,7 +47718,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3526 i32.const 0 call $~lib/builtins/abort @@ -47732,7 +47732,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3527 i32.const 0 call $~lib/builtins/abort @@ -47746,7 +47746,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3528 i32.const 0 call $~lib/builtins/abort @@ -47760,7 +47760,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3529 i32.const 0 call $~lib/builtins/abort @@ -47774,7 +47774,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3530 i32.const 0 call $~lib/builtins/abort @@ -47788,7 +47788,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3531 i32.const 0 call $~lib/builtins/abort @@ -47802,7 +47802,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 3532 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/std/mod.optimized.wat b/tests/compiler/std/mod.optimized.wat index 1388652d01..1fd03fae5c 100644 --- a/tests/compiler/std/mod.optimized.wat +++ b/tests/compiler/std/mod.optimized.wat @@ -10,7 +10,8 @@ (import "math" "mod" (func $std/mod/mod (param f64 f64) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\14\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\14") + (data (i32.const 24) "s\00t\00d\00/\00m\00o\00d\00.\00t\00s") (export "memory" (memory $0)) (export "mod" (func $std/mod/mod)) (start $start) @@ -509,7 +510,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 20 i32.const 0 call $~lib/builtins/abort @@ -522,7 +523,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 21 i32.const 0 call $~lib/builtins/abort @@ -535,7 +536,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 22 i32.const 0 call $~lib/builtins/abort @@ -548,7 +549,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 23 i32.const 0 call $~lib/builtins/abort @@ -561,7 +562,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -574,7 +575,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 25 i32.const 0 call $~lib/builtins/abort @@ -587,7 +588,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 26 i32.const 0 call $~lib/builtins/abort @@ -600,7 +601,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 27 i32.const 0 call $~lib/builtins/abort @@ -613,7 +614,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -626,7 +627,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 29 i32.const 0 call $~lib/builtins/abort @@ -639,7 +640,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 30 i32.const 0 call $~lib/builtins/abort @@ -652,7 +653,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 31 i32.const 0 call $~lib/builtins/abort @@ -665,7 +666,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 32 i32.const 0 call $~lib/builtins/abort @@ -678,7 +679,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 33 i32.const 0 call $~lib/builtins/abort @@ -691,7 +692,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 34 i32.const 0 call $~lib/builtins/abort @@ -704,7 +705,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 35 i32.const 0 call $~lib/builtins/abort @@ -717,7 +718,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 36 i32.const 0 call $~lib/builtins/abort @@ -730,7 +731,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 37 i32.const 0 call $~lib/builtins/abort @@ -743,7 +744,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 38 i32.const 0 call $~lib/builtins/abort @@ -756,7 +757,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 39 i32.const 0 call $~lib/builtins/abort @@ -769,7 +770,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 40 i32.const 0 call $~lib/builtins/abort @@ -782,7 +783,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 41 i32.const 0 call $~lib/builtins/abort @@ -795,7 +796,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 42 i32.const 0 call $~lib/builtins/abort @@ -808,7 +809,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 43 i32.const 0 call $~lib/builtins/abort @@ -821,7 +822,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 44 i32.const 0 call $~lib/builtins/abort @@ -834,7 +835,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 45 i32.const 0 call $~lib/builtins/abort @@ -847,7 +848,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 46 i32.const 0 call $~lib/builtins/abort @@ -860,7 +861,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 47 i32.const 0 call $~lib/builtins/abort @@ -873,7 +874,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 48 i32.const 0 call $~lib/builtins/abort @@ -886,7 +887,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 51 i32.const 0 call $~lib/builtins/abort @@ -899,7 +900,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 52 i32.const 0 call $~lib/builtins/abort @@ -912,7 +913,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 53 i32.const 0 call $~lib/builtins/abort @@ -925,7 +926,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 54 i32.const 0 call $~lib/builtins/abort @@ -938,7 +939,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 55 i32.const 0 call $~lib/builtins/abort @@ -951,7 +952,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 56 i32.const 0 call $~lib/builtins/abort @@ -964,7 +965,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 57 i32.const 0 call $~lib/builtins/abort @@ -977,7 +978,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 58 i32.const 0 call $~lib/builtins/abort @@ -990,7 +991,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 59 i32.const 0 call $~lib/builtins/abort @@ -1003,7 +1004,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 60 i32.const 0 call $~lib/builtins/abort @@ -1016,7 +1017,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 61 i32.const 0 call $~lib/builtins/abort @@ -1029,7 +1030,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 62 i32.const 0 call $~lib/builtins/abort @@ -1042,7 +1043,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 63 i32.const 0 call $~lib/builtins/abort @@ -1055,7 +1056,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 64 i32.const 0 call $~lib/builtins/abort @@ -1068,7 +1069,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 65 i32.const 0 call $~lib/builtins/abort @@ -1081,7 +1082,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 66 i32.const 0 call $~lib/builtins/abort @@ -1094,7 +1095,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 67 i32.const 0 call $~lib/builtins/abort @@ -1107,7 +1108,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 68 i32.const 0 call $~lib/builtins/abort @@ -1120,7 +1121,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 69 i32.const 0 call $~lib/builtins/abort @@ -1133,7 +1134,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 70 i32.const 0 call $~lib/builtins/abort @@ -1146,7 +1147,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 71 i32.const 0 call $~lib/builtins/abort @@ -1159,7 +1160,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 72 i32.const 0 call $~lib/builtins/abort @@ -1172,7 +1173,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 73 i32.const 0 call $~lib/builtins/abort @@ -1185,7 +1186,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 74 i32.const 0 call $~lib/builtins/abort @@ -1198,7 +1199,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 75 i32.const 0 call $~lib/builtins/abort @@ -1211,7 +1212,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 76 i32.const 0 call $~lib/builtins/abort @@ -1224,7 +1225,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 77 i32.const 0 call $~lib/builtins/abort @@ -1237,7 +1238,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 78 i32.const 0 call $~lib/builtins/abort @@ -1250,7 +1251,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 79 i32.const 0 call $~lib/builtins/abort @@ -1263,7 +1264,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 80 i32.const 0 call $~lib/builtins/abort @@ -1276,7 +1277,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 81 i32.const 0 call $~lib/builtins/abort @@ -1289,7 +1290,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 82 i32.const 0 call $~lib/builtins/abort @@ -1302,7 +1303,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 83 i32.const 0 call $~lib/builtins/abort @@ -1315,7 +1316,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 84 i32.const 0 call $~lib/builtins/abort @@ -1328,7 +1329,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 85 i32.const 0 call $~lib/builtins/abort @@ -1341,7 +1342,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 86 i32.const 0 call $~lib/builtins/abort @@ -1354,7 +1355,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 87 i32.const 0 call $~lib/builtins/abort @@ -1367,7 +1368,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 88 i32.const 0 call $~lib/builtins/abort @@ -1380,7 +1381,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 89 i32.const 0 call $~lib/builtins/abort @@ -1393,7 +1394,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 90 i32.const 0 call $~lib/builtins/abort @@ -1406,7 +1407,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 91 i32.const 0 call $~lib/builtins/abort @@ -1419,7 +1420,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 92 i32.const 0 call $~lib/builtins/abort @@ -1432,7 +1433,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 93 i32.const 0 call $~lib/builtins/abort @@ -1445,7 +1446,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 94 i32.const 0 call $~lib/builtins/abort @@ -1458,7 +1459,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 95 i32.const 0 call $~lib/builtins/abort @@ -1471,7 +1472,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 104 i32.const 0 call $~lib/builtins/abort @@ -1484,7 +1485,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 105 i32.const 0 call $~lib/builtins/abort @@ -1497,7 +1498,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 106 i32.const 0 call $~lib/builtins/abort @@ -1510,7 +1511,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 107 i32.const 0 call $~lib/builtins/abort @@ -1523,7 +1524,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 108 i32.const 0 call $~lib/builtins/abort @@ -1536,7 +1537,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 109 i32.const 0 call $~lib/builtins/abort @@ -1549,7 +1550,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 110 i32.const 0 call $~lib/builtins/abort @@ -1562,7 +1563,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 111 i32.const 0 call $~lib/builtins/abort @@ -1575,7 +1576,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 112 i32.const 0 call $~lib/builtins/abort @@ -1588,7 +1589,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 113 i32.const 0 call $~lib/builtins/abort @@ -1601,7 +1602,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 114 i32.const 0 call $~lib/builtins/abort @@ -1614,7 +1615,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 115 i32.const 0 call $~lib/builtins/abort @@ -1627,7 +1628,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 116 i32.const 0 call $~lib/builtins/abort @@ -1640,7 +1641,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 117 i32.const 0 call $~lib/builtins/abort @@ -1653,7 +1654,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 118 i32.const 0 call $~lib/builtins/abort @@ -1666,7 +1667,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 119 i32.const 0 call $~lib/builtins/abort @@ -1679,7 +1680,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 120 i32.const 0 call $~lib/builtins/abort @@ -1692,7 +1693,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 121 i32.const 0 call $~lib/builtins/abort @@ -1705,7 +1706,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 122 i32.const 0 call $~lib/builtins/abort @@ -1718,7 +1719,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 123 i32.const 0 call $~lib/builtins/abort @@ -1731,7 +1732,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 126 i32.const 0 call $~lib/builtins/abort @@ -1744,7 +1745,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 127 i32.const 0 call $~lib/builtins/abort @@ -1757,7 +1758,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 128 i32.const 0 call $~lib/builtins/abort @@ -1770,7 +1771,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 129 i32.const 0 call $~lib/builtins/abort @@ -1783,7 +1784,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 130 i32.const 0 call $~lib/builtins/abort @@ -1796,7 +1797,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 131 i32.const 0 call $~lib/builtins/abort @@ -1809,7 +1810,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 132 i32.const 0 call $~lib/builtins/abort @@ -1822,7 +1823,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 133 i32.const 0 call $~lib/builtins/abort @@ -1835,7 +1836,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 134 i32.const 0 call $~lib/builtins/abort @@ -1848,7 +1849,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 135 i32.const 0 call $~lib/builtins/abort @@ -1861,7 +1862,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 136 i32.const 0 call $~lib/builtins/abort @@ -1874,7 +1875,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 137 i32.const 0 call $~lib/builtins/abort @@ -1887,7 +1888,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 138 i32.const 0 call $~lib/builtins/abort @@ -1900,7 +1901,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 139 i32.const 0 call $~lib/builtins/abort @@ -1913,7 +1914,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 140 i32.const 0 call $~lib/builtins/abort @@ -1926,7 +1927,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 141 i32.const 0 call $~lib/builtins/abort @@ -1939,7 +1940,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 142 i32.const 0 call $~lib/builtins/abort @@ -1952,7 +1953,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 143 i32.const 0 call $~lib/builtins/abort @@ -1965,7 +1966,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 144 i32.const 0 call $~lib/builtins/abort @@ -1978,7 +1979,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 145 i32.const 0 call $~lib/builtins/abort @@ -1991,7 +1992,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 146 i32.const 0 call $~lib/builtins/abort @@ -2004,7 +2005,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 147 i32.const 0 call $~lib/builtins/abort @@ -2017,7 +2018,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 148 i32.const 0 call $~lib/builtins/abort @@ -2030,7 +2031,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 149 i32.const 0 call $~lib/builtins/abort @@ -2043,7 +2044,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 150 i32.const 0 call $~lib/builtins/abort @@ -2056,7 +2057,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 151 i32.const 0 call $~lib/builtins/abort @@ -2069,7 +2070,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 152 i32.const 0 call $~lib/builtins/abort @@ -2082,7 +2083,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 153 i32.const 0 call $~lib/builtins/abort @@ -2095,7 +2096,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 154 i32.const 0 call $~lib/builtins/abort @@ -2108,7 +2109,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 155 i32.const 0 call $~lib/builtins/abort @@ -2121,7 +2122,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 156 i32.const 0 call $~lib/builtins/abort @@ -2134,7 +2135,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 157 i32.const 0 call $~lib/builtins/abort @@ -2147,7 +2148,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 158 i32.const 0 call $~lib/builtins/abort @@ -2160,7 +2161,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 159 i32.const 0 call $~lib/builtins/abort @@ -2173,7 +2174,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 160 i32.const 0 call $~lib/builtins/abort @@ -2186,7 +2187,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 161 i32.const 0 call $~lib/builtins/abort @@ -2199,7 +2200,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 162 i32.const 0 call $~lib/builtins/abort @@ -2212,7 +2213,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 163 i32.const 0 call $~lib/builtins/abort @@ -2225,7 +2226,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 164 i32.const 0 call $~lib/builtins/abort @@ -2238,7 +2239,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 165 i32.const 0 call $~lib/builtins/abort @@ -2251,7 +2252,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 166 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/std/mod.untouched.wat b/tests/compiler/std/mod.untouched.wat index 52392790ef..c5757d420a 100644 --- a/tests/compiler/std/mod.untouched.wat +++ b/tests/compiler/std/mod.untouched.wat @@ -12,7 +12,7 @@ (import "math" "mod" (func $std/mod/mod (param f64 f64) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\14\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/mod/js i32 (i32.const 1)) @@ -625,7 +625,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 20 i32.const 0 call $~lib/builtins/abort @@ -638,7 +638,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 21 i32.const 0 call $~lib/builtins/abort @@ -651,7 +651,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 22 i32.const 0 call $~lib/builtins/abort @@ -664,7 +664,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 23 i32.const 0 call $~lib/builtins/abort @@ -677,7 +677,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -690,7 +690,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 25 i32.const 0 call $~lib/builtins/abort @@ -703,7 +703,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 26 i32.const 0 call $~lib/builtins/abort @@ -716,7 +716,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 27 i32.const 0 call $~lib/builtins/abort @@ -729,7 +729,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -742,7 +742,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 29 i32.const 0 call $~lib/builtins/abort @@ -755,7 +755,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 30 i32.const 0 call $~lib/builtins/abort @@ -768,7 +768,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 31 i32.const 0 call $~lib/builtins/abort @@ -781,7 +781,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 32 i32.const 0 call $~lib/builtins/abort @@ -794,7 +794,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 33 i32.const 0 call $~lib/builtins/abort @@ -807,7 +807,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 34 i32.const 0 call $~lib/builtins/abort @@ -820,7 +820,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 35 i32.const 0 call $~lib/builtins/abort @@ -833,7 +833,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 36 i32.const 0 call $~lib/builtins/abort @@ -846,7 +846,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 37 i32.const 0 call $~lib/builtins/abort @@ -859,7 +859,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 38 i32.const 0 call $~lib/builtins/abort @@ -872,7 +872,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 39 i32.const 0 call $~lib/builtins/abort @@ -885,7 +885,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 40 i32.const 0 call $~lib/builtins/abort @@ -898,7 +898,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 41 i32.const 0 call $~lib/builtins/abort @@ -911,7 +911,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 42 i32.const 0 call $~lib/builtins/abort @@ -924,7 +924,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 43 i32.const 0 call $~lib/builtins/abort @@ -937,7 +937,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 44 i32.const 0 call $~lib/builtins/abort @@ -950,7 +950,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 45 i32.const 0 call $~lib/builtins/abort @@ -963,7 +963,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 46 i32.const 0 call $~lib/builtins/abort @@ -976,7 +976,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 47 i32.const 0 call $~lib/builtins/abort @@ -989,7 +989,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 48 i32.const 0 call $~lib/builtins/abort @@ -1002,7 +1002,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 51 i32.const 0 call $~lib/builtins/abort @@ -1015,7 +1015,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 52 i32.const 0 call $~lib/builtins/abort @@ -1028,7 +1028,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 53 i32.const 0 call $~lib/builtins/abort @@ -1041,7 +1041,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 54 i32.const 0 call $~lib/builtins/abort @@ -1054,7 +1054,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 55 i32.const 0 call $~lib/builtins/abort @@ -1067,7 +1067,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 56 i32.const 0 call $~lib/builtins/abort @@ -1080,7 +1080,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 57 i32.const 0 call $~lib/builtins/abort @@ -1093,7 +1093,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 58 i32.const 0 call $~lib/builtins/abort @@ -1106,7 +1106,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 59 i32.const 0 call $~lib/builtins/abort @@ -1119,7 +1119,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 60 i32.const 0 call $~lib/builtins/abort @@ -1132,7 +1132,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 61 i32.const 0 call $~lib/builtins/abort @@ -1145,7 +1145,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 62 i32.const 0 call $~lib/builtins/abort @@ -1158,7 +1158,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 63 i32.const 0 call $~lib/builtins/abort @@ -1171,7 +1171,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 64 i32.const 0 call $~lib/builtins/abort @@ -1184,7 +1184,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 65 i32.const 0 call $~lib/builtins/abort @@ -1197,7 +1197,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 66 i32.const 0 call $~lib/builtins/abort @@ -1210,7 +1210,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 67 i32.const 0 call $~lib/builtins/abort @@ -1223,7 +1223,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 68 i32.const 0 call $~lib/builtins/abort @@ -1236,7 +1236,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 69 i32.const 0 call $~lib/builtins/abort @@ -1249,7 +1249,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 70 i32.const 0 call $~lib/builtins/abort @@ -1262,7 +1262,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 71 i32.const 0 call $~lib/builtins/abort @@ -1275,7 +1275,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 72 i32.const 0 call $~lib/builtins/abort @@ -1288,7 +1288,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 73 i32.const 0 call $~lib/builtins/abort @@ -1302,7 +1302,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 74 i32.const 0 call $~lib/builtins/abort @@ -1316,7 +1316,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 75 i32.const 0 call $~lib/builtins/abort @@ -1329,7 +1329,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 76 i32.const 0 call $~lib/builtins/abort @@ -1342,7 +1342,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 77 i32.const 0 call $~lib/builtins/abort @@ -1356,7 +1356,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 78 i32.const 0 call $~lib/builtins/abort @@ -1370,7 +1370,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 79 i32.const 0 call $~lib/builtins/abort @@ -1383,7 +1383,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 80 i32.const 0 call $~lib/builtins/abort @@ -1396,7 +1396,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 81 i32.const 0 call $~lib/builtins/abort @@ -1410,7 +1410,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 82 i32.const 0 call $~lib/builtins/abort @@ -1424,7 +1424,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 83 i32.const 0 call $~lib/builtins/abort @@ -1437,7 +1437,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 84 i32.const 0 call $~lib/builtins/abort @@ -1450,7 +1450,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 85 i32.const 0 call $~lib/builtins/abort @@ -1464,7 +1464,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 86 i32.const 0 call $~lib/builtins/abort @@ -1478,7 +1478,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 87 i32.const 0 call $~lib/builtins/abort @@ -1491,7 +1491,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 88 i32.const 0 call $~lib/builtins/abort @@ -1505,7 +1505,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 89 i32.const 0 call $~lib/builtins/abort @@ -1519,7 +1519,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 90 i32.const 0 call $~lib/builtins/abort @@ -1534,7 +1534,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 91 i32.const 0 call $~lib/builtins/abort @@ -1547,7 +1547,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 92 i32.const 0 call $~lib/builtins/abort @@ -1561,7 +1561,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 93 i32.const 0 call $~lib/builtins/abort @@ -1574,7 +1574,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 94 i32.const 0 call $~lib/builtins/abort @@ -1588,7 +1588,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 95 i32.const 0 call $~lib/builtins/abort @@ -1601,7 +1601,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 104 i32.const 0 call $~lib/builtins/abort @@ -1614,7 +1614,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 105 i32.const 0 call $~lib/builtins/abort @@ -1627,7 +1627,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 106 i32.const 0 call $~lib/builtins/abort @@ -1640,7 +1640,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 107 i32.const 0 call $~lib/builtins/abort @@ -1653,7 +1653,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 108 i32.const 0 call $~lib/builtins/abort @@ -1666,7 +1666,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 109 i32.const 0 call $~lib/builtins/abort @@ -1679,7 +1679,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 110 i32.const 0 call $~lib/builtins/abort @@ -1692,7 +1692,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 111 i32.const 0 call $~lib/builtins/abort @@ -1705,7 +1705,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 112 i32.const 0 call $~lib/builtins/abort @@ -1718,7 +1718,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 113 i32.const 0 call $~lib/builtins/abort @@ -1731,7 +1731,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 114 i32.const 0 call $~lib/builtins/abort @@ -1744,7 +1744,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 115 i32.const 0 call $~lib/builtins/abort @@ -1757,7 +1757,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 116 i32.const 0 call $~lib/builtins/abort @@ -1770,7 +1770,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 117 i32.const 0 call $~lib/builtins/abort @@ -1783,7 +1783,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 118 i32.const 0 call $~lib/builtins/abort @@ -1796,7 +1796,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 119 i32.const 0 call $~lib/builtins/abort @@ -1809,7 +1809,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 120 i32.const 0 call $~lib/builtins/abort @@ -1822,7 +1822,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 121 i32.const 0 call $~lib/builtins/abort @@ -1835,7 +1835,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 122 i32.const 0 call $~lib/builtins/abort @@ -1848,7 +1848,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 123 i32.const 0 call $~lib/builtins/abort @@ -1861,7 +1861,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 126 i32.const 0 call $~lib/builtins/abort @@ -1874,7 +1874,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 127 i32.const 0 call $~lib/builtins/abort @@ -1887,7 +1887,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 128 i32.const 0 call $~lib/builtins/abort @@ -1900,7 +1900,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 129 i32.const 0 call $~lib/builtins/abort @@ -1913,7 +1913,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 130 i32.const 0 call $~lib/builtins/abort @@ -1926,7 +1926,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 131 i32.const 0 call $~lib/builtins/abort @@ -1939,7 +1939,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 132 i32.const 0 call $~lib/builtins/abort @@ -1952,7 +1952,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 133 i32.const 0 call $~lib/builtins/abort @@ -1965,7 +1965,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 134 i32.const 0 call $~lib/builtins/abort @@ -1978,7 +1978,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 135 i32.const 0 call $~lib/builtins/abort @@ -1991,7 +1991,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 136 i32.const 0 call $~lib/builtins/abort @@ -2004,7 +2004,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 137 i32.const 0 call $~lib/builtins/abort @@ -2017,7 +2017,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 138 i32.const 0 call $~lib/builtins/abort @@ -2030,7 +2030,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 139 i32.const 0 call $~lib/builtins/abort @@ -2043,7 +2043,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 140 i32.const 0 call $~lib/builtins/abort @@ -2056,7 +2056,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 141 i32.const 0 call $~lib/builtins/abort @@ -2069,7 +2069,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 142 i32.const 0 call $~lib/builtins/abort @@ -2082,7 +2082,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 143 i32.const 0 call $~lib/builtins/abort @@ -2095,7 +2095,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 144 i32.const 0 call $~lib/builtins/abort @@ -2109,7 +2109,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 145 i32.const 0 call $~lib/builtins/abort @@ -2123,7 +2123,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 146 i32.const 0 call $~lib/builtins/abort @@ -2136,7 +2136,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 147 i32.const 0 call $~lib/builtins/abort @@ -2149,7 +2149,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 148 i32.const 0 call $~lib/builtins/abort @@ -2163,7 +2163,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 149 i32.const 0 call $~lib/builtins/abort @@ -2177,7 +2177,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 150 i32.const 0 call $~lib/builtins/abort @@ -2190,7 +2190,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 151 i32.const 0 call $~lib/builtins/abort @@ -2203,7 +2203,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 152 i32.const 0 call $~lib/builtins/abort @@ -2217,7 +2217,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 153 i32.const 0 call $~lib/builtins/abort @@ -2231,7 +2231,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 154 i32.const 0 call $~lib/builtins/abort @@ -2244,7 +2244,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 155 i32.const 0 call $~lib/builtins/abort @@ -2257,7 +2257,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 156 i32.const 0 call $~lib/builtins/abort @@ -2271,7 +2271,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 157 i32.const 0 call $~lib/builtins/abort @@ -2285,7 +2285,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 158 i32.const 0 call $~lib/builtins/abort @@ -2298,7 +2298,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 159 i32.const 0 call $~lib/builtins/abort @@ -2312,7 +2312,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 160 i32.const 0 call $~lib/builtins/abort @@ -2326,7 +2326,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 161 i32.const 0 call $~lib/builtins/abort @@ -2341,7 +2341,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 162 i32.const 0 call $~lib/builtins/abort @@ -2354,7 +2354,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 163 i32.const 0 call $~lib/builtins/abort @@ -2368,7 +2368,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 164 i32.const 0 call $~lib/builtins/abort @@ -2381,7 +2381,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 165 i32.const 0 call $~lib/builtins/abort @@ -2395,7 +2395,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 166 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 20faac8717..fe2e85af6c 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -7,9 +7,11 @@ (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 56) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 96) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00\1e") + (data (i32.const 80) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 112) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/new/aClass (mut i32) (i32.const 0)) @@ -91,7 +93,7 @@ i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -104,24 +106,24 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 16 i32.add ) (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 248 + i32.const 264 i32.le_u if i32.const 0 - i32.const 16 - i32.const 131 + i32.const 24 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $2 i32.load @@ -129,8 +131,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 133 + i32.const 24 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -165,13 +167,13 @@ ) (func $~lib/runtime/runtime.instanceof (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load local.tee $0 if (result i32) local.get $0 - i32.const 96 + i32.const 112 i32.load i32.le_u else @@ -189,7 +191,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 96 + i32.const 112 i32.add i32.load offset=4 local.tee $0 @@ -206,7 +208,7 @@ i32.eqz if local.get $0 - i32.const 96 + i32.const 112 i32.load i32.gt_u local.set $1 @@ -218,7 +220,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 96 + i32.const 112 i32.add i32.load end @@ -252,7 +254,7 @@ local.get $2 else local.get $0 - i32.const 96 + i32.const 112 i32.load i32.gt_u end @@ -262,7 +264,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 96 + i32.const 112 i32.add i32.load end @@ -275,7 +277,7 @@ local.get $1 if (result i32) local.get $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 else @@ -319,7 +321,7 @@ i32.load if i32.const 0 - i32.const 64 + i32.const 80 i32.const 97 i32.const 15 call $~lib/builtins/abort @@ -340,14 +342,14 @@ ) (func $~lib/runtime/runtime.collect (; 12 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 64 + i32.const 80 i32.const 139 i32.const 9 call $~lib/builtins/abort unreachable ) (func $start (; 13 ;) (type $FUNCSIG$v) - i32.const 248 + i32.const 264 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 8bfae60794..ba40155b6a 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -7,20 +7,20 @@ (type $FUNCSIG$vi (func (param i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 56) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 96) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 112) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/new/AClass.aStaticField (mut i32) (i32.const 0)) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/new/aClass (mut i32) (i32.const 0)) - (global $~lib/runtime/RTTI_BASE i32 (i32.const 96)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 248)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 112)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 264)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -152,8 +152,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 131 + i32.const 24 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -169,8 +169,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 133 + i32.const 24 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -389,7 +389,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 97 i32.const 15 call $~lib/builtins/abort @@ -416,7 +416,7 @@ ) (func $~lib/runtime/runtime.collect (; 17 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 64 + i32.const 80 i32.const 139 i32.const 9 call $~lib/builtins/abort diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index 2deba474f4..70dcb9eb43 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -16,7 +16,6 @@ (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -27,7 +26,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.retain)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -126,7 +124,7 @@ if i32.const 0 i32.const 64 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -141,7 +139,7 @@ if i32.const 0 i32.const 64 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/object-literal.untouched.wat b/tests/compiler/std/object-literal.untouched.wat index 6e247ac87f..894a103015 100644 --- a/tests/compiler/std/object-literal.untouched.wat +++ b/tests/compiler/std/object-literal.untouched.wat @@ -22,7 +22,6 @@ (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/runtime/RTTI_BASE i32 (i32.const 168)) (global $~lib/memory/HEAP_BASE i32 (i32.const 336)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -33,7 +32,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.release)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -165,7 +163,7 @@ if i32.const 0 i32.const 64 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -182,7 +180,7 @@ if i32.const 0 i32.const 64 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 8c4e9add28..bdca92a614 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -8,10 +8,13 @@ (type $FUNCSIG$vi (func (param i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 56) "\10\00\00\006\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s") - (data (i32.const 120) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 160) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\10\00\00\006") + (data (i32.const 80) "s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s") + (data (i32.const 136) "\10\00\00\00\1e") + (data (i32.const 152) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 184) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/operator-overloading/a1 (mut i32) (i32.const 0)) @@ -158,7 +161,7 @@ i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -171,24 +174,24 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 16 i32.add ) (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 328 + i32.const 352 i32.le_u if i32.const 0 - i32.const 16 - i32.const 131 + i32.const 24 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $2 i32.load @@ -196,8 +199,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 133 + i32.const 24 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -1285,7 +1288,7 @@ (local $0 i32) (local $1 i32) (local $2 i32) - i32.const 328 + i32.const 352 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -1327,7 +1330,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 145 i32.const 0 call $~lib/builtins/abort @@ -1370,7 +1373,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 151 i32.const 0 call $~lib/builtins/abort @@ -1414,7 +1417,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 157 i32.const 0 call $~lib/builtins/abort @@ -1458,7 +1461,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 163 i32.const 0 call $~lib/builtins/abort @@ -1501,7 +1504,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 169 i32.const 0 call $~lib/builtins/abort @@ -1535,7 +1538,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 175 i32.const 0 call $~lib/builtins/abort @@ -1579,7 +1582,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 181 i32.const 0 call $~lib/builtins/abort @@ -1623,7 +1626,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 187 i32.const 0 call $~lib/builtins/abort @@ -1667,7 +1670,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 193 i32.const 0 call $~lib/builtins/abort @@ -1704,7 +1707,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 199 i32.const 0 call $~lib/builtins/abort @@ -1739,7 +1742,7 @@ global.get $std/operator-overloading/eqf if i32.const 0 - i32.const 64 + i32.const 80 i32.const 205 i32.const 0 call $~lib/builtins/abort @@ -1766,7 +1769,7 @@ global.get $std/operator-overloading/eq if i32.const 0 - i32.const 64 + i32.const 80 i32.const 209 i32.const 0 call $~lib/builtins/abort @@ -1795,7 +1798,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 213 i32.const 0 call $~lib/builtins/abort @@ -1832,7 +1835,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 219 i32.const 0 call $~lib/builtins/abort @@ -1869,7 +1872,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 225 i32.const 0 call $~lib/builtins/abort @@ -1906,7 +1909,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 231 i32.const 0 call $~lib/builtins/abort @@ -1943,7 +1946,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 237 i32.const 0 call $~lib/builtins/abort @@ -1980,7 +1983,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 242 i32.const 0 call $~lib/builtins/abort @@ -2017,7 +2020,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 247 i32.const 0 call $~lib/builtins/abort @@ -2054,7 +2057,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 252 i32.const 0 call $~lib/builtins/abort @@ -2089,7 +2092,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 257 i32.const 0 call $~lib/builtins/abort @@ -2132,7 +2135,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 262 i32.const 0 call $~lib/builtins/abort @@ -2175,7 +2178,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 267 i32.const 0 call $~lib/builtins/abort @@ -2215,7 +2218,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 272 i32.const 0 call $~lib/builtins/abort @@ -2226,7 +2229,7 @@ i32.ne if i32.const 0 - i32.const 64 + i32.const 80 i32.const 273 i32.const 0 call $~lib/builtins/abort @@ -2267,7 +2270,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 279 i32.const 0 call $~lib/builtins/abort @@ -2303,7 +2306,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 282 i32.const 0 call $~lib/builtins/abort @@ -2341,7 +2344,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 287 i32.const 0 call $~lib/builtins/abort @@ -2363,7 +2366,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 288 i32.const 0 call $~lib/builtins/abort @@ -2398,7 +2401,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 291 i32.const 0 call $~lib/builtins/abort @@ -2419,7 +2422,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 292 i32.const 0 call $~lib/builtins/abort @@ -2474,7 +2477,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 312 i32.const 0 call $~lib/builtins/abort @@ -2529,7 +2532,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 332 i32.const 0 call $~lib/builtins/abort @@ -2538,13 +2541,13 @@ ) (func $~lib/runtime/runtime.instanceof (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load local.tee $0 if (result i32) local.get $0 - i32.const 160 + i32.const 184 i32.load i32.le_u else @@ -2562,7 +2565,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 160 + i32.const 184 i32.add i32.load offset=4 local.tee $0 @@ -2579,7 +2582,7 @@ i32.eqz if local.get $0 - i32.const 160 + i32.const 184 i32.load i32.gt_u local.set $1 @@ -2591,7 +2594,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 160 + i32.const 184 i32.add i32.load end @@ -2625,7 +2628,7 @@ local.get $2 else local.get $0 - i32.const 160 + i32.const 184 i32.load i32.gt_u end @@ -2635,7 +2638,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 160 + i32.const 184 i32.add i32.load end @@ -2648,7 +2651,7 @@ local.get $1 if (result i32) local.get $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 else @@ -2692,7 +2695,7 @@ i32.load if i32.const 0 - i32.const 128 + i32.const 152 i32.const 97 i32.const 15 call $~lib/builtins/abort @@ -2713,7 +2716,7 @@ ) (func $~lib/runtime/runtime.collect (; 18 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 128 + i32.const 152 i32.const 139 i32.const 9 call $~lib/builtins/abort diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 659b248b72..70a16071e1 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -9,13 +9,13 @@ (type $FUNCSIG$vi (func (param i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 56) "\10\00\00\006\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 120) "\10\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 160) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\006\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 136) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 184) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) @@ -87,8 +87,8 @@ (global $std/operator-overloading/aii1 (mut i32) (i32.const 0)) (global $std/operator-overloading/aii2 (mut i32) (i32.const 0)) (global $std/operator-overloading/aii (mut i32) (i32.const 0)) - (global $~lib/runtime/RTTI_BASE i32 (i32.const 160)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 328)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 184)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 352)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -220,8 +220,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 131 + i32.const 24 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -237,8 +237,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 133 + i32.const 24 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -1900,7 +1900,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 145 i32.const 0 call $~lib/builtins/abort @@ -1936,7 +1936,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 151 i32.const 0 call $~lib/builtins/abort @@ -1972,7 +1972,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 157 i32.const 0 call $~lib/builtins/abort @@ -2008,7 +2008,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 163 i32.const 0 call $~lib/builtins/abort @@ -2044,7 +2044,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 169 i32.const 0 call $~lib/builtins/abort @@ -2080,7 +2080,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 175 i32.const 0 call $~lib/builtins/abort @@ -2116,7 +2116,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 181 i32.const 0 call $~lib/builtins/abort @@ -2152,7 +2152,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 187 i32.const 0 call $~lib/builtins/abort @@ -2188,7 +2188,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 193 i32.const 0 call $~lib/builtins/abort @@ -2214,7 +2214,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 199 i32.const 0 call $~lib/builtins/abort @@ -2240,7 +2240,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 205 i32.const 0 call $~lib/builtins/abort @@ -2256,7 +2256,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 209 i32.const 0 call $~lib/builtins/abort @@ -2272,7 +2272,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 213 i32.const 0 call $~lib/builtins/abort @@ -2298,7 +2298,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 219 i32.const 0 call $~lib/builtins/abort @@ -2324,7 +2324,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 225 i32.const 0 call $~lib/builtins/abort @@ -2350,7 +2350,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 231 i32.const 0 call $~lib/builtins/abort @@ -2376,7 +2376,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 237 i32.const 0 call $~lib/builtins/abort @@ -2407,7 +2407,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 242 i32.const 0 call $~lib/builtins/abort @@ -2438,7 +2438,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 247 i32.const 0 call $~lib/builtins/abort @@ -2469,7 +2469,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 252 i32.const 0 call $~lib/builtins/abort @@ -2501,7 +2501,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 257 i32.const 0 call $~lib/builtins/abort @@ -2537,7 +2537,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 262 i32.const 0 call $~lib/builtins/abort @@ -2573,7 +2573,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 267 i32.const 0 call $~lib/builtins/abort @@ -2603,7 +2603,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 272 i32.const 0 call $~lib/builtins/abort @@ -2615,7 +2615,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 273 i32.const 0 call $~lib/builtins/abort @@ -2645,7 +2645,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 279 i32.const 0 call $~lib/builtins/abort @@ -2670,7 +2670,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 282 i32.const 0 call $~lib/builtins/abort @@ -2705,7 +2705,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 287 i32.const 0 call $~lib/builtins/abort @@ -2727,7 +2727,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 288 i32.const 0 call $~lib/builtins/abort @@ -2757,7 +2757,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 291 i32.const 0 call $~lib/builtins/abort @@ -2779,7 +2779,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 292 i32.const 0 call $~lib/builtins/abort @@ -2845,7 +2845,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 312 i32.const 0 call $~lib/builtins/abort @@ -2911,7 +2911,7 @@ i32.eqz if i32.const 0 - i32.const 64 + i32.const 80 i32.const 332 i32.const 0 call $~lib/builtins/abort @@ -3082,7 +3082,7 @@ i32.eqz if i32.const 0 - i32.const 128 + i32.const 152 i32.const 97 i32.const 15 call $~lib/builtins/abort @@ -3109,7 +3109,7 @@ ) (func $~lib/runtime/runtime.collect (; 47 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 128 + i32.const 152 i32.const 139 i32.const 9 call $~lib/builtins/abort diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index 95efbef146..e7fba8fbc6 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -5,7 +5,8 @@ (type $FUNCSIG$vii (func (param i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1c\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\1c") + (data (i32.const 24) "s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s") (global $std/pointer/one (mut i32) (i32.const 0)) (global $std/pointer/two (mut i32) (i32.const 0)) (global $std/pointer/add (mut i32) (i32.const 0)) @@ -244,7 +245,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 78 i32.const 0 call $~lib/builtins/abort @@ -255,7 +256,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 79 i32.const 0 call $~lib/builtins/abort @@ -274,7 +275,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 83 i32.const 0 call $~lib/builtins/abort @@ -286,7 +287,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 84 i32.const 0 call $~lib/builtins/abort @@ -301,7 +302,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 87 i32.const 0 call $~lib/builtins/abort @@ -316,7 +317,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 90 i32.const 0 call $~lib/builtins/abort @@ -327,7 +328,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 92 i32.const 0 call $~lib/builtins/abort @@ -345,7 +346,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 94 i32.const 0 call $~lib/builtins/abort @@ -356,7 +357,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 95 i32.const 0 call $~lib/builtins/abort @@ -367,7 +368,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 97 i32.const 0 call $~lib/builtins/abort @@ -386,7 +387,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 100 i32.const 0 call $~lib/builtins/abort @@ -398,7 +399,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 101 i32.const 0 call $~lib/builtins/abort @@ -410,7 +411,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 102 i32.const 0 call $~lib/builtins/abort @@ -433,7 +434,7 @@ i32.eq if i32.const 0 - i32.const 16 + i32.const 24 i32.const 105 i32.const 0 call $~lib/builtins/abort @@ -445,7 +446,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 106 i32.const 0 call $~lib/builtins/abort @@ -457,7 +458,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 107 i32.const 0 call $~lib/builtins/abort @@ -479,7 +480,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 113 i32.const 0 call $~lib/builtins/abort @@ -493,7 +494,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 114 i32.const 0 call $~lib/builtins/abort @@ -505,7 +506,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 116 i32.const 0 call $~lib/builtins/abort @@ -519,7 +520,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 117 i32.const 0 call $~lib/builtins/abort @@ -531,7 +532,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 119 i32.const 0 call $~lib/builtins/abort @@ -543,7 +544,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 120 i32.const 0 call $~lib/builtins/abort @@ -561,7 +562,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 123 i32.const 0 call $~lib/builtins/abort @@ -575,7 +576,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 124 i32.const 0 call $~lib/builtins/abort @@ -587,7 +588,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 125 i32.const 0 call $~lib/builtins/abort @@ -602,7 +603,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 128 i32.const 0 call $~lib/builtins/abort @@ -614,7 +615,7 @@ f32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 129 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/std/pointer.untouched.wat b/tests/compiler/std/pointer.untouched.wat index 0146c17e94..4e11a239fc 100644 --- a/tests/compiler/std/pointer.untouched.wat +++ b/tests/compiler/std/pointer.untouched.wat @@ -7,7 +7,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1c\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/pointer/one (mut i32) (i32.const 0)) @@ -544,7 +544,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 78 i32.const 0 call $~lib/builtins/abort @@ -560,7 +560,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 79 i32.const 0 call $~lib/builtins/abort @@ -594,7 +594,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 83 i32.const 0 call $~lib/builtins/abort @@ -612,7 +612,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 84 i32.const 0 call $~lib/builtins/abort @@ -638,7 +638,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 87 i32.const 0 call $~lib/builtins/abort @@ -664,7 +664,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 90 i32.const 0 call $~lib/builtins/abort @@ -680,7 +680,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 92 i32.const 0 call $~lib/builtins/abort @@ -705,7 +705,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 94 i32.const 0 call $~lib/builtins/abort @@ -721,7 +721,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 95 i32.const 0 call $~lib/builtins/abort @@ -737,7 +737,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 97 i32.const 0 call $~lib/builtins/abort @@ -769,7 +769,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 100 i32.const 0 call $~lib/builtins/abort @@ -787,7 +787,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 101 i32.const 0 call $~lib/builtins/abort @@ -805,7 +805,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 102 i32.const 0 call $~lib/builtins/abort @@ -833,7 +833,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 105 i32.const 0 call $~lib/builtins/abort @@ -851,7 +851,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 106 i32.const 0 call $~lib/builtins/abort @@ -869,7 +869,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 107 i32.const 0 call $~lib/builtins/abort @@ -908,7 +908,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 113 i32.const 0 call $~lib/builtins/abort @@ -931,7 +931,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 114 i32.const 0 call $~lib/builtins/abort @@ -954,7 +954,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 116 i32.const 0 call $~lib/builtins/abort @@ -977,7 +977,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 117 i32.const 0 call $~lib/builtins/abort @@ -990,7 +990,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 119 i32.const 0 call $~lib/builtins/abort @@ -1003,7 +1003,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 120 i32.const 0 call $~lib/builtins/abort @@ -1041,7 +1041,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 123 i32.const 0 call $~lib/builtins/abort @@ -1064,7 +1064,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 124 i32.const 0 call $~lib/builtins/abort @@ -1077,7 +1077,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 125 i32.const 0 call $~lib/builtins/abort @@ -1098,7 +1098,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 128 i32.const 0 call $~lib/builtins/abort @@ -1111,7 +1111,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 129 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/std/polyfills.optimized.wat b/tests/compiler/std/polyfills.optimized.wat index 6b1a46b259..f983ab5f0a 100644 --- a/tests/compiler/std/polyfills.optimized.wat +++ b/tests/compiler/std/polyfills.optimized.wat @@ -1,7 +1,8 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\10\00\00\00 \00\00\00s\00t\00d\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00 ") + (data (i32.const 24) "s\00t\00d\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s") (export "memory" (memory $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop diff --git a/tests/compiler/std/polyfills.untouched.wat b/tests/compiler/std/polyfills.untouched.wat index cc18163292..20f565deee 100644 --- a/tests/compiler/std/polyfills.untouched.wat +++ b/tests/compiler/std/polyfills.untouched.wat @@ -5,7 +5,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00 \00\00\00s\00t\00d\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (export "memory" (memory $0)) @@ -266,7 +266,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 4 i32.const 0 call $~lib/builtins/abort @@ -287,7 +287,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 5 i32.const 0 call $~lib/builtins/abort @@ -302,7 +302,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 8 i32.const 0 call $~lib/builtins/abort @@ -323,7 +323,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 9 i32.const 0 call $~lib/builtins/abort @@ -336,7 +336,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -349,7 +349,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 13 i32.const 0 call $~lib/builtins/abort @@ -362,7 +362,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 16 i32.const 0 call $~lib/builtins/abort @@ -375,7 +375,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 17 i32.const 0 call $~lib/builtins/abort @@ -388,7 +388,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 20 i32.const 0 call $~lib/builtins/abort @@ -401,7 +401,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 21 i32.const 0 call $~lib/builtins/abort @@ -416,7 +416,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -437,7 +437,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 25 i32.const 0 call $~lib/builtins/abort @@ -452,7 +452,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -473,7 +473,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 29 i32.const 0 call $~lib/builtins/abort @@ -486,7 +486,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 32 i32.const 0 call $~lib/builtins/abort @@ -499,7 +499,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 33 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 123c806f80..21985e820c 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -37,10 +37,8 @@ (global $std/runtime/header4 (mut i32) (i32.const 0)) (global $std/runtime/ref5 (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "main" (func $std/runtime/main)) - (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/allocator/tlsf/Root#setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.const 22 @@ -1687,7 +1685,7 @@ if i32.const 0 i32.const 232 - i32.const 91 + i32.const 89 i32.const 8 call $~lib/builtins/abort unreachable @@ -1724,7 +1722,7 @@ if i32.const 0 i32.const 232 - i32.const 117 + i32.const 115 i32.const 4 call $~lib/builtins/abort unreachable @@ -1739,7 +1737,7 @@ if i32.const 0 i32.const 232 - i32.const 119 + i32.const 117 i32.const 4 call $~lib/builtins/abort unreachable @@ -1755,7 +1753,7 @@ if i32.const 0 i32.const 232 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -1770,7 +1768,7 @@ if i32.const 0 i32.const 232 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 6b426e6cb1..bfe746e6b8 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -55,10 +55,8 @@ (global $std/runtime/ref5 (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 272)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "main" (func $std/runtime/main)) - (export "$.capabilities" (global $~lib/capabilities)) (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 @@ -2064,7 +2062,7 @@ if i32.const 0 i32.const 232 - i32.const 91 + i32.const 89 i32.const 8 call $~lib/builtins/abort unreachable @@ -2106,7 +2104,7 @@ if i32.const 0 i32.const 232 - i32.const 117 + i32.const 115 i32.const 4 call $~lib/builtins/abort unreachable @@ -2123,7 +2121,7 @@ if i32.const 0 i32.const 232 - i32.const 119 + i32.const 117 i32.const 4 call $~lib/builtins/abort unreachable @@ -2140,7 +2138,7 @@ if i32.const 0 i32.const 232 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -2157,7 +2155,7 @@ if i32.const 0 i32.const 232 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 70fbc99374..bf17eb5ce2 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -29,7 +29,6 @@ (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -40,7 +39,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.retain)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -139,7 +137,7 @@ if i32.const 0 i32.const 24 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -154,7 +152,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 3f0f322388..a650f319a4 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -34,7 +34,6 @@ (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/runtime/RTTI_BASE i32 (i32.const 160)) (global $~lib/memory/HEAP_BASE i32 (i32.const 392)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -45,7 +44,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.release)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -177,7 +175,7 @@ if i32.const 0 i32.const 24 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -194,7 +192,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index f1b20bca3b..a8e8b03ae4 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -11,20 +11,31 @@ (type $FUNCSIG$di (func (param i32) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0f\00\00\00\08\00\00\00\01\00\00\00\02") - (data (i32.const 24) "\11\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\08\00\00\00\02") - (data (i32.const 48) "\0f\00\00\00\10\00\00\00\03\00\00\00\00\00\00\00\04") - (data (i32.const 72) "\12\00\00\00\10\00\00\008\00\00\008\00\00\00\10\00\00\00\02") - (data (i32.const 96) "\0f\00\00\00\08\00\00\00\00\00\c0?\00\00 @") - (data (i32.const 112) "\13\00\00\00\10\00\00\00h\00\00\00h\00\00\00\08\00\00\00\02") - (data (i32.const 136) "\0f\00\00\00\10") - (data (i32.const 150) "\f4?\00\00\00\00\00\00\02@") - (data (i32.const 160) "\14\00\00\00\10\00\00\00\90\00\00\00\90\00\00\00\10\00\00\00\02") - (data (i32.const 184) "\10\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) "\10\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 272) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 320) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 360) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e") + (data (i32.const 8) "\0f\00\00\00\08") + (data (i32.const 24) "\01\00\00\00\02") + (data (i32.const 32) "\11\00\00\00\10") + (data (i32.const 48) "\18\00\00\00\18\00\00\00\08\00\00\00\02") + (data (i32.const 64) "\0f\00\00\00\10") + (data (i32.const 80) "\03\00\00\00\00\00\00\00\04") + (data (i32.const 96) "\12\00\00\00\10") + (data (i32.const 112) "P\00\00\00P\00\00\00\10\00\00\00\02") + (data (i32.const 128) "\0f\00\00\00\08") + (data (i32.const 146) "\c0?\00\00 @") + (data (i32.const 152) "\13\00\00\00\10") + (data (i32.const 168) "\90\00\00\00\90\00\00\00\08\00\00\00\02") + (data (i32.const 184) "\0f\00\00\00\10") + (data (i32.const 206) "\f4?\00\00\00\00\00\00\02@") + (data (i32.const 216) "\14\00\00\00\10") + (data (i32.const 232) "\c8\00\00\00\c8\00\00\00\10\00\00\00\02") + (data (i32.const 248) "\10\00\00\00&") + (data (i32.const 264) "s\00t\00d\00/\00s\00t\00a\00t\00i\00c\00-\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 304) "\10\00\00\00\1a") + (data (i32.const 320) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 352) "\10\00\00\00(") + (data (i32.const 368) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 408) "\10\00\00\00\1e") + (data (i32.const 424) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 456) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) @@ -40,20 +51,20 @@ (start $start) (func $~lib/array/Array#__get (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 40 + i32.const 56 i32.load i32.const 2 i32.shr_u i32.ge_u if i32.const 0 - i32.const 240 + i32.const 320 i32.const 99 i32.const 61 call $~lib/builtins/abort unreachable end - i32.const 36 + i32.const 52 i32.load local.get $0 i32.const 2 @@ -514,7 +525,7 @@ (local $4 i32) (local $5 i32) local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $3 i32.load offset=4 @@ -525,7 +536,7 @@ i32.const 1 i32.const 32 local.get $1 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -535,14 +546,14 @@ i32.const 1 i32.const 32 local.get $2 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub i32.shl i32.const 0 local.get $0 - i32.const 528 + i32.const 624 i32.gt_u select local.get $4 @@ -555,7 +566,7 @@ i32.load i32.store local.get $4 - i32.const 8 + i32.const 16 i32.add local.tee $5 local.get $0 @@ -574,12 +585,12 @@ i32.eq if local.get $0 - i32.const 528 + i32.const 624 i32.le_u if i32.const 0 - i32.const 280 - i32.const 91 + i32.const 368 + i32.const 89 i32.const 8 call $~lib/builtins/abort unreachable @@ -615,13 +626,13 @@ i32.gt_u if i32.const 1 - i32.const 1073741816 + i32.const 1073741808 local.get $1 i32.shr_u i32.gt_u if i32.const 0 - i32.const 240 + i32.const 320 i32.const 14 i32.const 64 call $~lib/builtins/abort @@ -654,13 +665,13 @@ ) (func $~lib/array/Array#__set (; 8 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 44 + i32.const 60 i32.load local.set $0 - i32.const 32 + i32.const 48 i32.const 2 call $~lib/array/ensureCapacity - i32.const 36 + i32.const 52 i32.load i32.const 2 i32.store @@ -668,27 +679,27 @@ local.get $0 i32.ge_s if - i32.const 44 + i32.const 60 i32.const 1 i32.store end ) (func $~lib/array/Array#__get (; 9 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) local.get $0 - i32.const 88 + i32.const 120 i32.load i32.const 3 i32.shr_u i32.ge_u if i32.const 0 - i32.const 240 + i32.const 320 i32.const 99 i32.const 61 call $~lib/builtins/abort unreachable end - i32.const 84 + i32.const 116 i32.load local.get $0 i32.const 3 @@ -698,13 +709,13 @@ ) (func $~lib/array/Array#__set (; 10 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 92 + i32.const 124 i32.load local.set $0 - i32.const 80 + i32.const 112 i32.const 3 call $~lib/array/ensureCapacity - i32.const 84 + i32.const 116 i32.load i64.const 4 i64.store @@ -712,27 +723,27 @@ local.get $0 i32.ge_s if - i32.const 92 + i32.const 124 i32.const 1 i32.store end ) (func $~lib/array/Array#__get (; 11 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) local.get $0 - i32.const 128 + i32.const 176 i32.load i32.const 2 i32.shr_u i32.ge_u if i32.const 0 - i32.const 240 + i32.const 320 i32.const 99 i32.const 61 call $~lib/builtins/abort unreachable end - i32.const 124 + i32.const 172 i32.load local.get $0 i32.const 2 @@ -742,13 +753,13 @@ ) (func $~lib/array/Array#__set (; 12 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 132 + i32.const 180 i32.load local.set $0 - i32.const 120 + i32.const 168 i32.const 2 call $~lib/array/ensureCapacity - i32.const 124 + i32.const 172 i32.load f32.const 2.5 f32.store @@ -756,27 +767,27 @@ local.get $0 i32.ge_s if - i32.const 132 + i32.const 180 i32.const 1 i32.store end ) (func $~lib/array/Array#__get (; 13 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) local.get $0 - i32.const 176 + i32.const 240 i32.load i32.const 3 i32.shr_u i32.ge_u if i32.const 0 - i32.const 240 + i32.const 320 i32.const 99 i32.const 61 call $~lib/builtins/abort unreachable end - i32.const 172 + i32.const 236 i32.load local.get $0 i32.const 3 @@ -786,13 +797,13 @@ ) (func $~lib/array/Array#__set (; 14 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 180 + i32.const 244 i32.load local.set $0 - i32.const 168 + i32.const 232 i32.const 3 call $~lib/array/ensureCapacity - i32.const 172 + i32.const 236 i32.load f64.const 2.25 f64.store @@ -800,19 +811,19 @@ local.get $0 i32.ge_s if - i32.const 180 + i32.const 244 i32.const 1 i32.store end ) (func $start:std/static-array (; 15 ;) (type $FUNCSIG$v) - i32.const 44 + i32.const 60 i32.load i32.const 2 i32.ne if i32.const 0 - i32.const 192 + i32.const 264 i32.const 6 i32.const 0 call $~lib/builtins/abort @@ -824,7 +835,7 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 264 i32.const 7 i32.const 0 call $~lib/builtins/abort @@ -836,13 +847,13 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 264 i32.const 8 i32.const 0 call $~lib/builtins/abort unreachable end - i32.const 528 + i32.const 624 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -853,19 +864,19 @@ i32.ne if i32.const 0 - i32.const 192 + i32.const 264 i32.const 10 i32.const 0 call $~lib/builtins/abort unreachable end - i32.const 92 + i32.const 124 i32.load i32.const 2 i32.ne if i32.const 0 - i32.const 192 + i32.const 264 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -877,7 +888,7 @@ i64.ne if i32.const 0 - i32.const 192 + i32.const 264 i32.const 13 i32.const 0 call $~lib/builtins/abort @@ -889,7 +900,7 @@ i64.ne if i32.const 0 - i32.const 192 + i32.const 264 i32.const 14 i32.const 0 call $~lib/builtins/abort @@ -902,19 +913,19 @@ i64.ne if i32.const 0 - i32.const 192 + i32.const 264 i32.const 16 i32.const 0 call $~lib/builtins/abort unreachable end - i32.const 132 + i32.const 180 i32.load i32.const 2 i32.ne if i32.const 0 - i32.const 192 + i32.const 264 i32.const 18 i32.const 0 call $~lib/builtins/abort @@ -926,7 +937,7 @@ f32.ne if i32.const 0 - i32.const 192 + i32.const 264 i32.const 19 i32.const 0 call $~lib/builtins/abort @@ -938,7 +949,7 @@ f32.ne if i32.const 0 - i32.const 192 + i32.const 264 i32.const 20 i32.const 0 call $~lib/builtins/abort @@ -951,19 +962,19 @@ f32.ne if i32.const 0 - i32.const 192 + i32.const 264 i32.const 22 i32.const 0 call $~lib/builtins/abort unreachable end - i32.const 180 + i32.const 244 i32.load i32.const 2 i32.ne if i32.const 0 - i32.const 192 + i32.const 264 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -975,7 +986,7 @@ f64.ne if i32.const 0 - i32.const 192 + i32.const 264 i32.const 25 i32.const 0 call $~lib/builtins/abort @@ -987,7 +998,7 @@ f64.ne if i32.const 0 - i32.const 192 + i32.const 264 i32.const 26 i32.const 0 call $~lib/builtins/abort @@ -1000,7 +1011,7 @@ f64.ne if i32.const 0 - i32.const 192 + i32.const 264 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -1009,13 +1020,13 @@ ) (func $~lib/runtime/runtime.instanceof (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load local.tee $0 if (result i32) local.get $0 - i32.const 360 + i32.const 456 i32.load i32.le_u else @@ -1033,7 +1044,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 360 + i32.const 456 i32.add i32.load offset=4 local.tee $0 @@ -1050,7 +1061,7 @@ i32.eqz if local.get $0 - i32.const 360 + i32.const 456 i32.load i32.gt_u local.set $1 @@ -1062,7 +1073,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 360 + i32.const 456 i32.add i32.load end @@ -1072,7 +1083,7 @@ i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -1085,24 +1096,24 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 16 i32.add ) (func $~lib/util/runtime/register (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 528 + i32.const 624 i32.le_u if i32.const 0 - i32.const 280 - i32.const 131 + i32.const 368 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $2 i32.load @@ -1110,8 +1121,8 @@ i32.ne if i32.const 0 - i32.const 280 - i32.const 133 + i32.const 368 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -1152,7 +1163,7 @@ local.get $2 else local.get $0 - i32.const 360 + i32.const 456 i32.load i32.gt_u end @@ -1162,7 +1173,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 360 + i32.const 456 i32.add i32.load end @@ -1175,7 +1186,7 @@ local.get $1 if (result i32) local.get $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 else @@ -1219,7 +1230,7 @@ i32.load if i32.const 0 - i32.const 328 + i32.const 424 i32.const 97 i32.const 15 call $~lib/builtins/abort @@ -1237,7 +1248,7 @@ ) (func $~lib/runtime/runtime.collect (; 24 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 328 + i32.const 424 i32.const 139 i32.const 9 call $~lib/builtins/abort diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 0e8e44936c..420582c1a5 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -13,33 +13,33 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0f\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 24) "\11\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\08\00\00\00\02\00\00\00") - (data (i32.const 48) "\0f\00\00\00\10\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00") - (data (i32.const 72) "\12\00\00\00\10\00\00\008\00\00\008\00\00\00\10\00\00\00\02\00\00\00") - (data (i32.const 96) "\0f\00\00\00\08\00\00\00\00\00\c0?\00\00 @") - (data (i32.const 112) "\13\00\00\00\10\00\00\00h\00\00\00h\00\00\00\08\00\00\00\02\00\00\00") - (data (i32.const 136) "\0f\00\00\00\10\00\00\00\00\00\00\00\00\00\f4?\00\00\00\00\00\00\02@") - (data (i32.const 160) "\14\00\00\00\10\00\00\00\90\00\00\00\90\00\00\00\10\00\00\00\02\00\00\00") - (data (i32.const 184) "\10\00\00\00&\00\00\00s\00t\00d\00/\00s\00t\00a\00t\00i\00c\00-\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 232) "\10\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 272) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 320) "\10\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 360) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00") + (data (i32.const 8) "\0f\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 32) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\18\00\00\00\08\00\00\00\02\00\00\00") + (data (i32.const 64) "\0f\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00") + (data (i32.const 96) "\12\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00P\00\00\00P\00\00\00\10\00\00\00\02\00\00\00") + (data (i32.const 128) "\0f\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\c0?\00\00 @") + (data (i32.const 152) "\13\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\90\00\00\00\90\00\00\00\08\00\00\00\02\00\00\00") + (data (i32.const 184) "\0f\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f4?\00\00\00\00\00\00\02@") + (data (i32.const 216) "\14\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c8\00\00\00\c8\00\00\00\10\00\00\00\02\00\00\00") + (data (i32.const 248) "\10\00\00\00&\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00s\00t\00a\00t\00i\00c\00-\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 304) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 352) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 408) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 456) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $std/static-array/i i32 (i32.const 32)) - (global $std/static-array/I i32 (i32.const 80)) - (global $std/static-array/f i32 (i32.const 120)) - (global $std/static-array/F i32 (i32.const 168)) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $std/static-array/i i32 (i32.const 48)) + (global $std/static-array/I i32 (i32.const 112)) + (global $std/static-array/f i32 (i32.const 168)) + (global $std/static-array/F i32 (i32.const 232)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/runtime/RTTI_BASE i32 (i32.const 360)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 528)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 456)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 624)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -73,7 +73,7 @@ i32.ge_u if i32.const 0 - i32.const 240 + i32.const 320 i32.const 99 i32.const 61 call $~lib/builtins/abort @@ -716,8 +716,8 @@ i32.eqz if i32.const 0 - i32.const 280 - i32.const 91 + i32.const 368 + i32.const 89 i32.const 8 call $~lib/builtins/abort unreachable @@ -767,7 +767,7 @@ i32.gt_u if i32.const 0 - i32.const 240 + i32.const 320 i32.const 14 i32.const 64 call $~lib/builtins/abort @@ -858,7 +858,7 @@ i32.ge_u if i32.const 0 - i32.const 240 + i32.const 320 i32.const 99 i32.const 61 call $~lib/builtins/abort @@ -926,7 +926,7 @@ i32.ge_u if i32.const 0 - i32.const 240 + i32.const 320 i32.const 99 i32.const 61 call $~lib/builtins/abort @@ -994,7 +994,7 @@ i32.ge_u if i32.const 0 - i32.const 240 + i32.const 320 i32.const 99 i32.const 61 call $~lib/builtins/abort @@ -1048,7 +1048,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 264 i32.const 6 i32.const 0 call $~lib/builtins/abort @@ -1062,7 +1062,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 264 i32.const 7 i32.const 0 call $~lib/builtins/abort @@ -1076,7 +1076,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 264 i32.const 8 i32.const 0 call $~lib/builtins/abort @@ -1104,7 +1104,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 264 i32.const 10 i32.const 0 call $~lib/builtins/abort @@ -1117,7 +1117,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 264 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -1131,7 +1131,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 264 i32.const 13 i32.const 0 call $~lib/builtins/abort @@ -1145,7 +1145,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 264 i32.const 14 i32.const 0 call $~lib/builtins/abort @@ -1163,7 +1163,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 264 i32.const 16 i32.const 0 call $~lib/builtins/abort @@ -1176,7 +1176,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 264 i32.const 18 i32.const 0 call $~lib/builtins/abort @@ -1190,7 +1190,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 264 i32.const 19 i32.const 0 call $~lib/builtins/abort @@ -1204,7 +1204,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 264 i32.const 20 i32.const 0 call $~lib/builtins/abort @@ -1222,7 +1222,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 264 i32.const 22 i32.const 0 call $~lib/builtins/abort @@ -1235,7 +1235,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 264 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -1249,7 +1249,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 264 i32.const 25 i32.const 0 call $~lib/builtins/abort @@ -1263,7 +1263,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 264 i32.const 26 i32.const 0 call $~lib/builtins/abort @@ -1281,7 +1281,7 @@ i32.eqz if i32.const 0 - i32.const 192 + i32.const 264 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -1379,8 +1379,8 @@ i32.eqz if i32.const 0 - i32.const 280 - i32.const 131 + i32.const 368 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -1396,8 +1396,8 @@ i32.eqz if i32.const 0 - i32.const 280 - i32.const 133 + i32.const 368 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -1504,7 +1504,7 @@ i32.eqz if i32.const 0 - i32.const 328 + i32.const 424 i32.const 97 i32.const 15 call $~lib/builtins/abort @@ -1531,7 +1531,7 @@ ) (func $~lib/runtime/runtime.collect (; 42 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 328 + i32.const 424 i32.const 139 i32.const 9 call $~lib/builtins/abort diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index 81016f5c09..c2c17d771b 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -8,18 +8,26 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\0c\00\00\00\01\d87\dch\00i\00R\d8b\df") - (data (i32.const 32) "\10\00\00\00$\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s") - (data (i32.const 80) "\10") - (data (i32.const 88) "\10\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 128) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 176) "\10\00\00\00\04\00\00\00\01\d87\dc") - (data (i32.const 192) "\10\00\00\00\04\00\00\00h\00i") - (data (i32.const 208) "\10\00\00\00\04\00\00\00R\d8b\df") - (data (i32.const 224) "\10\00\00\00\02") - (data (i32.const 240) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 280) "\11\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") - (global $std/string-utf8/str (mut i32) (i32.const 16)) + (data (i32.const 8) "\10\00\00\00\0c") + (data (i32.const 24) "\01\d87\dch\00i\00R\d8b\df") + (data (i32.const 40) "\10\00\00\00$") + (data (i32.const 56) "s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s") + (data (i32.const 96) "\10") + (data (i32.const 112) "\10\00\00\00\1c") + (data (i32.const 128) "~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 160) "\10\00\00\00(") + (data (i32.const 176) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 216) "\10\00\00\00\04") + (data (i32.const 232) "\01\d87\dc") + (data (i32.const 240) "\10\00\00\00\04") + (data (i32.const 256) "h\00i") + (data (i32.const 264) "\10\00\00\00\04") + (data (i32.const 280) "R\d8b\df") + (data (i32.const 288) "\10\00\00\00\02") + (data (i32.const 312) "\10\00\00\00\1e") + (data (i32.const 328) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 360) "\11\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") + (global $std/string-utf8/str (mut i32) (i32.const 24)) (global $std/string-utf8/len (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)) @@ -43,7 +51,7 @@ i32.const 1 local.set $1 local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -217,7 +225,7 @@ call $~lib/allocator/arena/__mem_allocate local.set $5 local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -408,7 +416,7 @@ i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -421,7 +429,7 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 16 i32.add ) (func $~lib/memory/memory.copy (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -601,18 +609,18 @@ (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 424 + i32.const 504 i32.le_u if i32.const 0 - i32.const 136 - i32.const 131 + i32.const 176 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $2 i32.load @@ -620,8 +628,8 @@ i32.ne if i32.const 0 - i32.const 136 - i32.const 133 + i32.const 176 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -641,7 +649,7 @@ i32.const 1 i32.lt_u if - i32.const 88 + i32.const 112 return end local.get $1 @@ -692,7 +700,7 @@ i32.gt_u if i32.const 0 - i32.const 96 + i32.const 128 i32.const 461 i32.const 8 call $~lib/builtins/abort @@ -739,7 +747,7 @@ i32.gt_u if i32.const 0 - i32.const 96 + i32.const 128 i32.const 465 i32.const 8 call $~lib/builtins/abort @@ -818,7 +826,7 @@ i32.gt_u if i32.const 0 - i32.const 96 + i32.const 128 i32.const 477 i32.const 8 call $~lib/builtins/abort @@ -873,7 +881,7 @@ i32.ne if i32.const 0 - i32.const 96 + i32.const 128 i32.const 486 i32.const 4 call $~lib/builtins/abort @@ -945,14 +953,14 @@ return end local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 i32.shr_u local.tee $2 local.get $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -977,13 +985,13 @@ i32.ne if i32.const 0 - i32.const 40 + i32.const 56 i32.const 5 i32.const 0 call $~lib/builtins/abort unreachable end - i32.const 424 + i32.const 504 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -996,7 +1004,7 @@ i32.ne if i32.const 0 - i32.const 40 + i32.const 56 i32.const 9 i32.const 0 call $~lib/builtins/abort @@ -1008,7 +1016,7 @@ i32.ne if i32.const 0 - i32.const 40 + i32.const 56 i32.const 10 i32.const 0 call $~lib/builtins/abort @@ -1020,7 +1028,7 @@ i32.ne if i32.const 0 - i32.const 40 + i32.const 56 i32.const 11 i32.const 0 call $~lib/builtins/abort @@ -1032,7 +1040,7 @@ i32.ne if i32.const 0 - i32.const 40 + i32.const 56 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -1044,7 +1052,7 @@ i32.ne if i32.const 0 - i32.const 40 + i32.const 56 i32.const 13 i32.const 0 call $~lib/builtins/abort @@ -1056,7 +1064,7 @@ i32.ne if i32.const 0 - i32.const 40 + i32.const 56 i32.const 14 i32.const 0 call $~lib/builtins/abort @@ -1068,7 +1076,7 @@ i32.ne if i32.const 0 - i32.const 40 + i32.const 56 i32.const 15 i32.const 0 call $~lib/builtins/abort @@ -1080,7 +1088,7 @@ i32.ne if i32.const 0 - i32.const 40 + i32.const 56 i32.const 16 i32.const 0 call $~lib/builtins/abort @@ -1092,7 +1100,7 @@ i32.ne if i32.const 0 - i32.const 40 + i32.const 56 i32.const 17 i32.const 0 call $~lib/builtins/abort @@ -1104,7 +1112,7 @@ i32.ne if i32.const 0 - i32.const 40 + i32.const 56 i32.const 18 i32.const 0 call $~lib/builtins/abort @@ -1114,7 +1122,7 @@ i32.load8_u offset=10 if i32.const 0 - i32.const 40 + i32.const 56 i32.const 19 i32.const 0 call $~lib/builtins/abort @@ -1123,12 +1131,12 @@ global.get $std/string-utf8/ptr i32.const 0 call $~lib/string/String.fromUTF8 - i32.const 88 + i32.const 112 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 21 i32.const 0 call $~lib/builtins/abort @@ -1144,7 +1152,7 @@ i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 22 i32.const 0 call $~lib/builtins/abort @@ -1153,12 +1161,12 @@ global.get $std/string-utf8/ptr i32.const 4 call $~lib/string/String.fromUTF8 - i32.const 184 + i32.const 232 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 23 i32.const 0 call $~lib/builtins/abort @@ -1169,12 +1177,12 @@ i32.add i32.const 2 call $~lib/string/String.fromUTF8 - i32.const 200 + i32.const 256 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -1185,12 +1193,12 @@ i32.add i32.const 4 call $~lib/string/String.fromUTF8 - i32.const 216 + i32.const 280 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 25 i32.const 0 call $~lib/builtins/abort @@ -1201,12 +1209,12 @@ i32.add i32.const 1 call $~lib/string/String.fromUTF8 - i32.const 232 + i32.const 304 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 26 i32.const 0 call $~lib/builtins/abort @@ -1215,13 +1223,13 @@ ) (func $~lib/runtime/runtime.instanceof (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load local.tee $0 if (result i32) local.get $0 - i32.const 280 + i32.const 360 i32.load i32.le_u else @@ -1239,7 +1247,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 280 + i32.const 360 i32.add i32.load offset=4 local.tee $0 @@ -1256,7 +1264,7 @@ i32.eqz if local.get $0 - i32.const 280 + i32.const 360 i32.load i32.gt_u local.set $1 @@ -1268,7 +1276,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 280 + i32.const 360 i32.add i32.load end @@ -1302,7 +1310,7 @@ local.get $2 else local.get $0 - i32.const 280 + i32.const 360 i32.load i32.gt_u end @@ -1312,7 +1320,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 280 + i32.const 360 i32.add i32.load end @@ -1325,7 +1333,7 @@ local.get $1 if (result i32) local.get $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 else @@ -1369,7 +1377,7 @@ i32.load if i32.const 0 - i32.const 248 + i32.const 328 i32.const 97 i32.const 15 call $~lib/builtins/abort @@ -1387,7 +1395,7 @@ ) (func $~lib/runtime/runtime.collect (; 18 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 248 + i32.const 328 i32.const 139 i32.const 9 call $~lib/builtins/abort diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index fa51b677e6..dc5492f8ae 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -8,29 +8,29 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\0c\00\00\00\01\d87\dch\00i\00R\d8b\df") - (data (i32.const 32) "\10\00\00\00$\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s\00") - (data (i32.const 80) "\10\00\00\00\00\00\00\00") - (data (i32.const 88) "\10\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 128) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 176) "\10\00\00\00\04\00\00\00\01\d87\dc") - (data (i32.const 192) "\10\00\00\00\04\00\00\00h\00i\00") - (data (i32.const 208) "\10\00\00\00\04\00\00\00R\d8b\df") - (data (i32.const 224) "\10\00\00\00\02\00\00\00\00\00") - (data (i32.const 240) "\10\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 280) "\11\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") + (data (i32.const 8) "\10\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\d87\dch\00i\00R\d8b\df") + (data (i32.const 40) "\10\00\00\00$\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s\00") + (data (i32.const 96) "\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 112) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 160) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 216) "\10\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\d87\dc") + (data (i32.const 240) "\10\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00h\00i\00") + (data (i32.const 264) "\10\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00R\d8b\df") + (data (i32.const 288) "\10\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 312) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 360) "\11\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $std/string-utf8/str (mut i32) (i32.const 16)) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $std/string-utf8/str (mut i32) (i32.const 24)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $std/string-utf8/len (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 $std/string-utf8/ptr (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/runtime/RTTI_BASE i32 (i32.const 280)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 424)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 360)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 504)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -716,8 +716,8 @@ i32.eqz if i32.const 0 - i32.const 136 - i32.const 131 + i32.const 176 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -733,8 +733,8 @@ i32.eqz if i32.const 0 - i32.const 136 - i32.const 133 + i32.const 176 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -755,7 +755,7 @@ i32.const 1 i32.lt_u if - i32.const 88 + i32.const 112 return end i32.const 0 @@ -820,7 +820,7 @@ i32.eqz if i32.const 0 - i32.const 96 + i32.const 128 i32.const 461 i32.const 8 call $~lib/builtins/abort @@ -874,7 +874,7 @@ i32.eqz if i32.const 0 - i32.const 96 + i32.const 128 i32.const 465 i32.const 8 call $~lib/builtins/abort @@ -969,7 +969,7 @@ i32.eqz if i32.const 0 - i32.const 96 + i32.const 128 i32.const 477 i32.const 8 call $~lib/builtins/abort @@ -1032,7 +1032,7 @@ i32.eqz if i32.const 0 - i32.const 96 + i32.const 128 i32.const 486 i32.const 4 call $~lib/builtins/abort @@ -1158,7 +1158,7 @@ i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 5 i32.const 0 call $~lib/builtins/abort @@ -1184,7 +1184,7 @@ i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 9 i32.const 0 call $~lib/builtins/abort @@ -1197,7 +1197,7 @@ i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 10 i32.const 0 call $~lib/builtins/abort @@ -1210,7 +1210,7 @@ i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 11 i32.const 0 call $~lib/builtins/abort @@ -1223,7 +1223,7 @@ i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -1236,7 +1236,7 @@ i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 13 i32.const 0 call $~lib/builtins/abort @@ -1249,7 +1249,7 @@ i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 14 i32.const 0 call $~lib/builtins/abort @@ -1262,7 +1262,7 @@ i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 15 i32.const 0 call $~lib/builtins/abort @@ -1275,7 +1275,7 @@ i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 16 i32.const 0 call $~lib/builtins/abort @@ -1288,7 +1288,7 @@ i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 17 i32.const 0 call $~lib/builtins/abort @@ -1301,7 +1301,7 @@ i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 18 i32.const 0 call $~lib/builtins/abort @@ -1314,7 +1314,7 @@ i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 19 i32.const 0 call $~lib/builtins/abort @@ -1323,12 +1323,12 @@ global.get $std/string-utf8/ptr i32.const 0 call $~lib/string/String.fromUTF8 - i32.const 88 + i32.const 112 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 21 i32.const 0 call $~lib/builtins/abort @@ -1344,7 +1344,7 @@ i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 22 i32.const 0 call $~lib/builtins/abort @@ -1353,12 +1353,12 @@ global.get $std/string-utf8/ptr i32.const 4 call $~lib/string/String.fromUTF8 - i32.const 184 + i32.const 232 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 23 i32.const 0 call $~lib/builtins/abort @@ -1369,12 +1369,12 @@ i32.add i32.const 2 call $~lib/string/String.fromUTF8 - i32.const 200 + i32.const 256 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -1385,12 +1385,12 @@ i32.add i32.const 4 call $~lib/string/String.fromUTF8 - i32.const 216 + i32.const 280 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 25 i32.const 0 call $~lib/builtins/abort @@ -1401,12 +1401,12 @@ i32.add i32.const 1 call $~lib/string/String.fromUTF8 - i32.const 232 + i32.const 304 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 40 + i32.const 56 i32.const 26 i32.const 0 call $~lib/builtins/abort @@ -1579,7 +1579,7 @@ i32.eqz if i32.const 0 - i32.const 248 + i32.const 328 i32.const 97 i32.const 15 call $~lib/builtins/abort @@ -1606,7 +1606,7 @@ ) (func $~lib/runtime/runtime.collect (; 25 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 248 + i32.const 328 i32.const 139 i32.const 9 call $~lib/builtins/abort diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 2e8891f22c..c81d1902bc 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -341,7 +341,6 @@ (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "getString" (func $std/string/getString)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) @@ -353,7 +352,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.retain)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -452,7 +450,7 @@ if i32.const 0 i32.const 184 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -467,7 +465,7 @@ if i32.const 0 i32.const 184 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -2374,7 +2372,7 @@ if i32.const 0 i32.const 184 - i32.const 91 + i32.const 89 i32.const 8 call $~lib/builtins/abort unreachable @@ -4306,7 +4304,7 @@ if i32.const 0 i32.const 184 - i32.const 117 + i32.const 115 i32.const 4 call $~lib/builtins/abort unreachable @@ -4320,7 +4318,7 @@ if i32.const 0 i32.const 184 - i32.const 119 + i32.const 117 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index b83e2f137a..940885c008 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -208,7 +208,6 @@ (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/runtime/RTTI_BASE i32 (i32.const 6744)) (global $~lib/memory/HEAP_BASE i32 (i32.const 6928)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "getString" (func $std/string/getString)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) @@ -220,7 +219,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.release)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/string/String#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -390,7 +388,7 @@ if i32.const 0 i32.const 184 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -407,7 +405,7 @@ if i32.const 0 i32.const 184 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -2636,7 +2634,7 @@ if i32.const 0 i32.const 184 - i32.const 91 + i32.const 89 i32.const 8 call $~lib/builtins/abort unreachable @@ -5359,7 +5357,7 @@ if i32.const 0 i32.const 184 - i32.const 117 + i32.const 115 i32.const 4 call $~lib/builtins/abort unreachable @@ -5376,7 +5374,7 @@ if i32.const 0 i32.const 184 - i32.const 119 + i32.const 117 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 4e9c687181..ebb11c3b2e 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -10,31 +10,54 @@ (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\06\00\00\001\002\003") - (data (i32.const 24) "\10\00\00\00\1a\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s") - (data (i32.const 64) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 112) "\10\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 160) "\10") - (data (i32.const 168) "\10\00\00\00\16\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e") - (data (i32.const 200) "\10\00\00\00$\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e") - (data (i32.const 248) "\10\00\00\00\10\00\00\00i\00s\00R\00e\00g\00E\00x\00p") - (data (i32.const 272) "\10\00\00\00\n\00\00\00m\00a\00t\00c\00h") - (data (i32.const 296) "\10\00\00\00\0e\00\00\00r\00e\00p\00l\00a\00c\00e") - (data (i32.const 320) "\10\00\00\00\0c\00\00\00s\00e\00a\00r\00c\00h") - (data (i32.const 344) "\10\00\00\00\0e\00\00\00s\00p\00e\00c\00i\00e\00s") - (data (i32.const 368) "\10\00\00\00\n\00\00\00s\00p\00l\00i\00t") - (data (i32.const 392) "\10\00\00\00\16\00\00\00t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e") - (data (i32.const 424) "\10\00\00\00\16\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g") - (data (i32.const 456) "\10\00\00\00\16\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s") - (data (i32.const 488) "\10\00\00\00\0e\00\00\00S\00y\00m\00b\00o\00l\00(") - (data (i32.const 512) "\10\00\00\00\08\00\00\00n\00u\00l\00l") - (data (i32.const 528) "\10\00\00\00\02\00\00\00)") - (data (i32.const 544) "\10\00\00\00\10\00\00\00S\00y\00m\00b\00o\00l\00(\00)") - (data (i32.const 568) "\10\00\00\00\16\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)") - (data (i32.const 600) "\10\00\00\00&\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)") - (data (i32.const 648) "\10\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)") - (data (i32.const 712) "\10\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 752) "\13\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00L \00\00\00\00\00\00L \00\00\00\00\00\00I\00\00\00\0e") + (data (i32.const 8) "\10\00\00\00\06") + (data (i32.const 24) "1\002\003") + (data (i32.const 32) "\10\00\00\00\1a") + (data (i32.const 48) "s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s") + (data (i32.const 80) "\10\00\00\00(") + (data (i32.const 96) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 136) "\10\00\00\00&") + (data (i32.const 152) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 192) "\10") + (data (i32.const 208) "\10\00\00\00\16") + (data (i32.const 224) "h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e") + (data (i32.const 248) "\10\00\00\00$") + (data (i32.const 264) "i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e") + (data (i32.const 304) "\10\00\00\00\10") + (data (i32.const 320) "i\00s\00R\00e\00g\00E\00x\00p") + (data (i32.const 336) "\10\00\00\00\n") + (data (i32.const 352) "m\00a\00t\00c\00h") + (data (i32.const 368) "\10\00\00\00\0e") + (data (i32.const 384) "r\00e\00p\00l\00a\00c\00e") + (data (i32.const 400) "\10\00\00\00\0c") + (data (i32.const 416) "s\00e\00a\00r\00c\00h") + (data (i32.const 432) "\10\00\00\00\0e") + (data (i32.const 448) "s\00p\00e\00c\00i\00e\00s") + (data (i32.const 464) "\10\00\00\00\n") + (data (i32.const 480) "s\00p\00l\00i\00t") + (data (i32.const 496) "\10\00\00\00\16") + (data (i32.const 512) "t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e") + (data (i32.const 536) "\10\00\00\00\16") + (data (i32.const 552) "t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g") + (data (i32.const 576) "\10\00\00\00\16") + (data (i32.const 592) "u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s") + (data (i32.const 616) "\10\00\00\00\0e") + (data (i32.const 632) "S\00y\00m\00b\00o\00l\00(") + (data (i32.const 648) "\10\00\00\00\08") + (data (i32.const 664) "n\00u\00l\00l") + (data (i32.const 672) "\10\00\00\00\02") + (data (i32.const 688) ")") + (data (i32.const 696) "\10\00\00\00\10") + (data (i32.const 712) "S\00y\00m\00b\00o\00l\00(\00)") + (data (i32.const 728) "\10\00\00\00\16") + (data (i32.const 744) "S\00y\00m\00b\00o\00l\00(\001\002\003\00)") + (data (i32.const 768) "\10\00\00\00&") + (data (i32.const 784) "S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)") + (data (i32.const 824) "\10\00\00\004") + (data (i32.const 840) "S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)") + (data (i32.const 896) "\10\00\00\00\1e") + (data (i32.const 912) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 944) "\13\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00L \00\00\00\00\00\00L \00\00\00\00\00\00I\00\00\00\0e") (global $~lib/symbol/nextId (mut i32) (i32.const 12)) (global $std/symbol/sym1 (mut i32) (i32.const 0)) (global $std/symbol/sym2 (mut i32) (i32.const 0)) @@ -128,7 +151,7 @@ i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -141,24 +164,24 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 16 i32.add ) (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 912 + i32.const 1104 i32.le_u if i32.const 0 - i32.const 72 - i32.const 131 + i32.const 96 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $2 i32.load @@ -166,8 +189,8 @@ i32.ne if i32.const 0 - i32.const 72 - i32.const 133 + i32.const 96 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -391,11 +414,11 @@ (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 1073741816 + i32.const 1073741808 i32.gt_u if i32.const 0 - i32.const 120 + i32.const 152 i32.const 54 i32.const 43 call $~lib/builtins/abort @@ -498,7 +521,7 @@ if block $break|0 local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -588,14 +611,14 @@ return end local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 i32.shr_u local.tee $2 local.get $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -635,7 +658,7 @@ if (result i32) local.get $1 i32.load - i32.const 16 + i32.const 24 call $~lib/string/String.__eq else local.get $0 @@ -760,7 +783,7 @@ (local $3 i32) (local $4 i32) local.get $0 - i32.const 16 + i32.const 24 call $~lib/util/hash/hashStr local.tee $3 call $~lib/map/Map<~lib/string/String,usize>#find @@ -815,7 +838,7 @@ local.get $2 i32.add local.tee $2 - i32.const 16 + i32.const 24 i32.store local.get $2 local.get $1 @@ -1032,7 +1055,7 @@ local.tee $2 if local.get $2 - i32.const 16 + i32.const 24 i32.store offset=4 else local.get $0 @@ -1083,7 +1106,7 @@ local.get $1 i32.store local.get $2 - i32.const 16 + i32.const 24 i32.store offset=4 local.get $0 local.get $0 @@ -1114,12 +1137,12 @@ global.get $~lib/symbol/stringToId if global.get $~lib/symbol/stringToId - i32.const 16 + i32.const 24 call $~lib/util/hash/hashStr call $~lib/map/Map<~lib/string/String,usize>#find if global.get $~lib/symbol/stringToId - i32.const 16 + i32.const 24 call $~lib/util/hash/hashStr call $~lib/map/Map<~lib/string/String,usize>#find local.tee $0 @@ -1375,11 +1398,11 @@ (local $3 i32) (local $4 i32) local.get $1 - i32.const 520 + i32.const 664 local.get $1 select local.tee $3 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -1388,7 +1411,7 @@ i32.shl local.tee $4 local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -1400,7 +1423,7 @@ local.tee $2 i32.eqz if - i32.const 168 + i32.const 208 return end local.get $2 @@ -1421,7 +1444,7 @@ ) (func $~lib/string/String.__concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 520 + i32.const 664 local.get $0 select local.get $1 @@ -1430,9 +1453,9 @@ (func $~lib/symbol/_Symbol#toString (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - i32.const 168 + i32.const 208 local.set $2 - i32.const 496 + i32.const 632 block $break|0 (result i32) block $case11|0 block $case10|0 @@ -1462,37 +1485,37 @@ end br $case11|0 end - i32.const 176 + i32.const 224 br $break|0 end - i32.const 208 + i32.const 264 br $break|0 end - i32.const 256 + i32.const 320 br $break|0 end - i32.const 280 + i32.const 352 br $break|0 end - i32.const 304 + i32.const 384 br $break|0 end - i32.const 328 + i32.const 416 br $break|0 end - i32.const 352 + i32.const 448 br $break|0 end - i32.const 376 + i32.const 480 br $break|0 end - i32.const 400 + i32.const 512 br $break|0 end - i32.const 432 + i32.const 552 br $break|0 end - i32.const 464 + i32.const 592 br $break|0 end global.get $~lib/symbol/idToString @@ -1511,11 +1534,11 @@ local.get $0 call $~lib/map/Map#get else - i32.const 168 + i32.const 208 end end call $~lib/string/String.__concat - i32.const 536 + i32.const 688 call $~lib/string/String.__concat ) (func $start:std/symbol (; 27 ;) (type $FUNCSIG$v) @@ -1549,13 +1572,13 @@ i32.eq if i32.const 0 - i32.const 32 + i32.const 48 i32.const 4 i32.const 0 call $~lib/builtins/abort unreachable end - i32.const 912 + i32.const 1104 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -1568,7 +1591,7 @@ i32.ne if i32.const 0 - i32.const 32 + i32.const 48 i32.const 9 i32.const 0 call $~lib/builtins/abort @@ -1583,7 +1606,7 @@ global.get $std/symbol/key1 if i32.const 0 - i32.const 32 + i32.const 48 i32.const 14 i32.const 0 call $~lib/builtins/abort @@ -1592,7 +1615,7 @@ global.get $std/symbol/key2 if i32.const 0 - i32.const 32 + i32.const 48 i32.const 15 i32.const 0 call $~lib/builtins/abort @@ -1617,12 +1640,12 @@ local.get $0 global.set $std/symbol/key4 global.get $std/symbol/key3 - i32.const 16 + i32.const 24 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 48 i32.const 20 i32.const 0 call $~lib/builtins/abort @@ -1634,7 +1657,7 @@ i32.eqz if i32.const 0 - i32.const 32 + i32.const 48 i32.const 21 i32.const 0 call $~lib/builtins/abort @@ -1652,12 +1675,12 @@ end local.get $0 call $~lib/symbol/_Symbol#toString - i32.const 552 + i32.const 712 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 48 i32.const 23 i32.const 0 call $~lib/builtins/abort @@ -1665,12 +1688,12 @@ end global.get $std/symbol/sym3 call $~lib/symbol/_Symbol#toString - i32.const 576 + i32.const 744 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 48 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -1682,12 +1705,12 @@ global.set $std/symbol/isConcatSpreadable global.get $std/symbol/hasInstance call $~lib/symbol/_Symbol#toString - i32.const 608 + i32.const 784 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 48 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -1695,12 +1718,12 @@ end global.get $std/symbol/isConcatSpreadable call $~lib/symbol/_Symbol#toString - i32.const 656 + i32.const 840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 48 i32.const 29 i32.const 0 call $~lib/builtins/abort @@ -1709,13 +1732,13 @@ ) (func $~lib/runtime/runtime.instanceof (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load local.tee $0 if (result i32) local.get $0 - i32.const 752 + i32.const 944 i32.load i32.le_u else @@ -1733,7 +1756,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 752 + i32.const 944 i32.add i32.load offset=4 local.tee $0 @@ -1750,7 +1773,7 @@ i32.eqz if local.get $0 - i32.const 752 + i32.const 944 i32.load i32.gt_u local.set $1 @@ -1762,7 +1785,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 752 + i32.const 944 i32.add i32.load end @@ -1796,7 +1819,7 @@ local.get $2 else local.get $0 - i32.const 752 + i32.const 944 i32.load i32.gt_u end @@ -1806,7 +1829,7 @@ local.get $0 i32.const 3 i32.shl - i32.const 752 + i32.const 944 i32.add i32.load end @@ -1819,7 +1842,7 @@ local.get $1 if (result i32) local.get $1 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 else @@ -1863,7 +1886,7 @@ i32.load if i32.const 0 - i32.const 720 + i32.const 912 i32.const 97 i32.const 15 call $~lib/builtins/abort @@ -1884,7 +1907,7 @@ ) (func $~lib/runtime/runtime.collect (; 35 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 720 + i32.const 912 i32.const 139 i32.const 9 call $~lib/builtins/abort diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 142ee744f0..b004f6b772 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -10,43 +10,43 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\06\00\00\001\002\003\00") - (data (i32.const 24) "\10\00\00\00\1a\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s\00") - (data (i32.const 64) "\10\00\00\00(\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 112) "\10\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 160) "\10\00\00\00\00\00\00\00") - (data (i32.const 168) "\10\00\00\00\16\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00") - (data (i32.const 200) "\10\00\00\00$\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00") - (data (i32.const 248) "\10\00\00\00\10\00\00\00i\00s\00R\00e\00g\00E\00x\00p\00") - (data (i32.const 272) "\10\00\00\00\n\00\00\00m\00a\00t\00c\00h\00") - (data (i32.const 296) "\10\00\00\00\0e\00\00\00r\00e\00p\00l\00a\00c\00e\00") - (data (i32.const 320) "\10\00\00\00\0c\00\00\00s\00e\00a\00r\00c\00h\00") - (data (i32.const 344) "\10\00\00\00\0e\00\00\00s\00p\00e\00c\00i\00e\00s\00") - (data (i32.const 368) "\10\00\00\00\n\00\00\00s\00p\00l\00i\00t\00") - (data (i32.const 392) "\10\00\00\00\16\00\00\00t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e\00") - (data (i32.const 424) "\10\00\00\00\16\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g\00") - (data (i32.const 456) "\10\00\00\00\16\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s\00") - (data (i32.const 488) "\10\00\00\00\0e\00\00\00S\00y\00m\00b\00o\00l\00(\00") - (data (i32.const 512) "\10\00\00\00\08\00\00\00n\00u\00l\00l\00") - (data (i32.const 528) "\10\00\00\00\02\00\00\00)\00") - (data (i32.const 544) "\10\00\00\00\10\00\00\00S\00y\00m\00b\00o\00l\00(\00)\00") - (data (i32.const 568) "\10\00\00\00\16\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)\00") - (data (i32.const 600) "\10\00\00\00&\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)\00") - (data (i32.const 648) "\10\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)\00") - (data (i32.const 712) "\10\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 752) "\13\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00L \00\00\00\00\00\00L \00\00\00\00\00\00I\00\00\00\0e\00\00\00") + (data (i32.const 8) "\10\00\00\00\06\00\00\00\00\00\00\00\00\00\00\001\002\003\00") + (data (i32.const 32) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s\00") + (data (i32.const 80) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 136) "\10\00\00\00&\00\00\00\00\00\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 192) "\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 208) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00") + (data (i32.const 248) "\10\00\00\00$\00\00\00\00\00\00\00\00\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00") + (data (i32.const 304) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00i\00s\00R\00e\00g\00E\00x\00p\00") + (data (i32.const 336) "\10\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00m\00a\00t\00c\00h\00") + (data (i32.const 368) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00r\00e\00p\00l\00a\00c\00e\00") + (data (i32.const 400) "\10\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00s\00e\00a\00r\00c\00h\00") + (data (i32.const 432) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00s\00p\00e\00c\00i\00e\00s\00") + (data (i32.const 464) "\10\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00s\00p\00l\00i\00t\00") + (data (i32.const 496) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e\00") + (data (i32.const 536) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g\00") + (data (i32.const 576) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s\00") + (data (i32.const 616) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00S\00y\00m\00b\00o\00l\00(\00") + (data (i32.const 648) "\10\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00n\00u\00l\00l\00") + (data (i32.const 672) "\10\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00)\00") + (data (i32.const 696) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00S\00y\00m\00b\00o\00l\00(\00)\00") + (data (i32.const 728) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)\00") + (data (i32.const 768) "\10\00\00\00&\00\00\00\00\00\00\00\00\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)\00") + (data (i32.const 824) "\10\00\00\004\00\00\00\00\00\00\00\00\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)\00") + (data (i32.const 896) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 944) "\13\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00L \00\00\00\00\00\00L \00\00\00\00\00\00I\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/symbol/nextId (mut i32) (i32.const 12)) (global $std/symbol/sym1 (mut i32) (i32.const 0)) (global $std/symbol/sym2 (mut i32) (i32.const 0)) (global $~lib/symbol/stringToId (mut i32) (i32.const 0)) - (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/symbol/idToString (mut i32) (i32.const 0)) (global $std/symbol/sym3 (mut i32) (i32.const 0)) (global $std/symbol/sym4 (mut i32) (i32.const 0)) @@ -58,8 +58,8 @@ (global $std/symbol/hasInstance (mut i32) (i32.const 0)) (global $~lib/symbol/_Symbol.isConcatSpreadable i32 (i32.const 2)) (global $std/symbol/isConcatSpreadable (mut i32) (i32.const 0)) - (global $~lib/runtime/RTTI_BASE i32 (i32.const 752)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 912)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 944)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 1104)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -210,8 +210,8 @@ i32.eqz if i32.const 0 - i32.const 72 - i32.const 131 + i32.const 96 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -227,8 +227,8 @@ i32.eqz if i32.const 0 - i32.const 72 - i32.const 133 + i32.const 96 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -502,7 +502,7 @@ i32.gt_u if i32.const 0 - i32.const 120 + i32.const 152 i32.const 54 i32.const 43 call $~lib/builtins/abort @@ -1771,7 +1771,7 @@ i32.const 0 i32.eq if - i32.const 520 + i32.const 664 local.set $1 end local.get $0 @@ -1792,7 +1792,7 @@ i32.const 0 i32.eq if - i32.const 168 + i32.const 208 return end local.get $4 @@ -1814,7 +1814,7 @@ ) (func $~lib/string/String.__concat (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 520 + i32.const 664 local.get $0 i32.const 0 i32.ne @@ -1828,7 +1828,7 @@ (local $3 i32) local.get $0 local.set $1 - i32.const 168 + i32.const 208 local.set $2 block $break|0 block $case11|0 @@ -1892,7 +1892,7 @@ br $case11|0 end block - i32.const 176 + i32.const 224 local.set $2 br $break|0 unreachable @@ -1900,7 +1900,7 @@ unreachable end block - i32.const 208 + i32.const 264 local.set $2 br $break|0 unreachable @@ -1908,7 +1908,7 @@ unreachable end block - i32.const 256 + i32.const 320 local.set $2 br $break|0 unreachable @@ -1916,7 +1916,7 @@ unreachable end block - i32.const 280 + i32.const 352 local.set $2 br $break|0 unreachable @@ -1924,7 +1924,7 @@ unreachable end block - i32.const 304 + i32.const 384 local.set $2 br $break|0 unreachable @@ -1932,7 +1932,7 @@ unreachable end block - i32.const 328 + i32.const 416 local.set $2 br $break|0 unreachable @@ -1940,7 +1940,7 @@ unreachable end block - i32.const 352 + i32.const 448 local.set $2 br $break|0 unreachable @@ -1948,7 +1948,7 @@ unreachable end block - i32.const 376 + i32.const 480 local.set $2 br $break|0 unreachable @@ -1956,7 +1956,7 @@ unreachable end block - i32.const 400 + i32.const 512 local.set $2 br $break|0 unreachable @@ -1964,7 +1964,7 @@ unreachable end block - i32.const 432 + i32.const 552 local.set $2 br $break|0 unreachable @@ -1972,7 +1972,7 @@ unreachable end block - i32.const 464 + i32.const 592 local.set $2 br $break|0 unreachable @@ -2002,18 +2002,18 @@ end unreachable end - i32.const 496 + i32.const 632 local.get $2 call $~lib/string/String.__concat - i32.const 536 + i32.const 688 call $~lib/string/String.__concat ) (func $start:std/symbol (; 34 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 16 + i32.const 24 call $~lib/symbol/Symbol global.set $std/symbol/sym1 - i32.const 16 + i32.const 24 call $~lib/symbol/Symbol global.set $std/symbol/sym2 global.get $std/symbol/sym1 @@ -2022,7 +2022,7 @@ i32.eqz if i32.const 0 - i32.const 32 + i32.const 48 i32.const 4 i32.const 0 call $~lib/builtins/abort @@ -2038,10 +2038,10 @@ global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - i32.const 16 + i32.const 24 call $~lib/symbol/_Symbol.for global.set $std/symbol/sym3 - i32.const 16 + i32.const 24 call $~lib/symbol/_Symbol.for global.set $std/symbol/sym4 global.get $std/symbol/sym3 @@ -2050,7 +2050,7 @@ i32.eqz if i32.const 0 - i32.const 32 + i32.const 48 i32.const 9 i32.const 0 call $~lib/builtins/abort @@ -2068,7 +2068,7 @@ i32.eqz if i32.const 0 - i32.const 32 + i32.const 48 i32.const 14 i32.const 0 call $~lib/builtins/abort @@ -2080,7 +2080,7 @@ i32.eqz if i32.const 0 - i32.const 32 + i32.const 48 i32.const 15 i32.const 0 call $~lib/builtins/abort @@ -2105,12 +2105,12 @@ end global.set $std/symbol/key4 global.get $std/symbol/key3 - i32.const 16 + i32.const 24 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 48 i32.const 20 i32.const 0 call $~lib/builtins/abort @@ -2122,7 +2122,7 @@ i32.eqz if i32.const 0 - i32.const 32 + i32.const 48 i32.const 21 i32.const 0 call $~lib/builtins/abort @@ -2131,12 +2131,12 @@ i32.const 0 call $~lib/symbol/Symbol call $~lib/symbol/_Symbol#toString - i32.const 552 + i32.const 712 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 48 i32.const 23 i32.const 0 call $~lib/builtins/abort @@ -2144,12 +2144,12 @@ end global.get $std/symbol/sym3 call $~lib/symbol/_Symbol#toString - i32.const 576 + i32.const 744 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 48 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -2161,12 +2161,12 @@ global.set $std/symbol/isConcatSpreadable global.get $std/symbol/hasInstance call $~lib/symbol/_Symbol#toString - i32.const 608 + i32.const 784 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 48 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -2174,12 +2174,12 @@ end global.get $std/symbol/isConcatSpreadable call $~lib/symbol/_Symbol#toString - i32.const 656 + i32.const 840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 48 i32.const 29 i32.const 0 call $~lib/builtins/abort @@ -2354,7 +2354,7 @@ i32.eqz if i32.const 0 - i32.const 720 + i32.const 912 i32.const 97 i32.const 15 call $~lib/builtins/abort @@ -2381,7 +2381,7 @@ ) (func $~lib/runtime/runtime.collect (; 44 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 720 + i32.const 912 i32.const 139 i32.const 9 call $~lib/builtins/abort diff --git a/tests/compiler/std/trace.optimized.wat b/tests/compiler/std/trace.optimized.wat index d0dfd2b336..ecaca42aa3 100644 --- a/tests/compiler/std/trace.optimized.wat +++ b/tests/compiler/std/trace.optimized.wat @@ -3,19 +3,27 @@ (type $FUNCSIG$v (func)) (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t") - (data (i32.const 48) "\10\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t") - (data (i32.const 88) "\10\00\00\00\0e\00\00\00o\00n\00e\00_\00i\00n\00t") - (data (i32.const 112) "\10\00\00\00\0e\00\00\00t\00w\00o\00_\00i\00n\00t") - (data (i32.const 136) "\10\00\00\00\12\00\00\00t\00h\00r\00e\00e\00_\00i\00n\00t") - (data (i32.const 168) "\10\00\00\00\10\00\00\00f\00o\00u\00r\00_\00i\00n\00t") - (data (i32.const 192) "\10\00\00\00\10\00\00\00f\00i\00v\00e\00_\00i\00n\00t") - (data (i32.const 216) "\10\00\00\00\10\00\00\00f\00i\00v\00e\00_\00d\00b\00l") + (data (i32.const 8) "\10\00\00\00\1a") + (data (i32.const 24) "z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t") + (data (i32.const 56) "\10\00\00\00\1a") + (data (i32.const 72) "z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t") + (data (i32.const 104) "\10\00\00\00\0e") + (data (i32.const 120) "o\00n\00e\00_\00i\00n\00t") + (data (i32.const 136) "\10\00\00\00\0e") + (data (i32.const 152) "t\00w\00o\00_\00i\00n\00t") + (data (i32.const 168) "\10\00\00\00\12") + (data (i32.const 184) "t\00h\00r\00e\00e\00_\00i\00n\00t") + (data (i32.const 208) "\10\00\00\00\10") + (data (i32.const 224) "f\00o\00u\00r\00_\00i\00n\00t") + (data (i32.const 240) "\10\00\00\00\10") + (data (i32.const 256) "f\00i\00v\00e\00_\00i\00n\00t") + (data (i32.const 272) "\10\00\00\00\10") + (data (i32.const 288) "f\00i\00v\00e\00_\00d\00b\00l") (global $~lib/started (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "main" (func $std/trace/main)) (func $start:std/trace (; 1 ;) (type $FUNCSIG$v) - i32.const 16 + i32.const 24 i32.const 0 f64.const 0 f64.const 0 @@ -23,7 +31,7 @@ f64.const 0 f64.const 0 call $~lib/builtins/trace - i32.const 56 + i32.const 72 i32.const 0 f64.const 0 f64.const 0 @@ -31,7 +39,7 @@ f64.const 0 f64.const 0 call $~lib/builtins/trace - i32.const 96 + i32.const 120 i32.const 1 f64.const 1 f64.const 0 @@ -39,7 +47,7 @@ f64.const 0 f64.const 0 call $~lib/builtins/trace - i32.const 120 + i32.const 152 i32.const 2 f64.const 1 f64.const 2 @@ -47,7 +55,7 @@ f64.const 0 f64.const 0 call $~lib/builtins/trace - i32.const 144 + i32.const 184 i32.const 3 f64.const 1 f64.const 2 @@ -55,7 +63,7 @@ f64.const 0 f64.const 0 call $~lib/builtins/trace - i32.const 176 + i32.const 224 i32.const 4 f64.const 1 f64.const 2 @@ -63,7 +71,7 @@ f64.const 4 f64.const 0 call $~lib/builtins/trace - i32.const 200 + i32.const 256 i32.const 5 f64.const 1 f64.const 2 @@ -71,7 +79,7 @@ f64.const 4 f64.const 5 call $~lib/builtins/trace - i32.const 224 + i32.const 288 i32.const 5 f64.const 1.1 f64.const 2.2 diff --git a/tests/compiler/std/trace.untouched.wat b/tests/compiler/std/trace.untouched.wat index 329ad5ef67..d653dde323 100644 --- a/tests/compiler/std/trace.untouched.wat +++ b/tests/compiler/std/trace.untouched.wat @@ -3,21 +3,21 @@ (type $FUNCSIG$v (func)) (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t\00") - (data (i32.const 48) "\10\00\00\00\1a\00\00\00z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t\00") - (data (i32.const 88) "\10\00\00\00\0e\00\00\00o\00n\00e\00_\00i\00n\00t\00") - (data (i32.const 112) "\10\00\00\00\0e\00\00\00t\00w\00o\00_\00i\00n\00t\00") - (data (i32.const 136) "\10\00\00\00\12\00\00\00t\00h\00r\00e\00e\00_\00i\00n\00t\00") - (data (i32.const 168) "\10\00\00\00\10\00\00\00f\00o\00u\00r\00_\00i\00n\00t\00") - (data (i32.const 192) "\10\00\00\00\10\00\00\00f\00i\00v\00e\00_\00i\00n\00t\00") - (data (i32.const 216) "\10\00\00\00\10\00\00\00f\00i\00v\00e\00_\00d\00b\00l\00") + (data (i32.const 8) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t\00") + (data (i32.const 56) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t\00") + (data (i32.const 104) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00o\00n\00e\00_\00i\00n\00t\00") + (data (i32.const 136) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00t\00w\00o\00_\00i\00n\00t\00") + (data (i32.const 168) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00t\00h\00r\00e\00e\00_\00i\00n\00t\00") + (data (i32.const 208) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00f\00o\00u\00r\00_\00i\00n\00t\00") + (data (i32.const 240) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00f\00i\00v\00e\00_\00i\00n\00t\00") + (data (i32.const 272) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00f\00i\00v\00e\00_\00d\00b\00l\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/started (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "main" (func $std/trace/main)) (func $start:std/trace (; 1 ;) (type $FUNCSIG$v) - i32.const 16 + i32.const 24 i32.const 0 f64.const 0 f64.const 0 @@ -25,7 +25,7 @@ f64.const 0 f64.const 0 call $~lib/builtins/trace - i32.const 56 + i32.const 72 i32.const 0 f64.const 0 f64.const 0 @@ -33,7 +33,7 @@ f64.const 0 f64.const 0 call $~lib/builtins/trace - i32.const 96 + i32.const 120 i32.const 1 f64.const 1 f64.const 0 @@ -41,7 +41,7 @@ f64.const 0 f64.const 0 call $~lib/builtins/trace - i32.const 120 + i32.const 152 i32.const 2 f64.const 1 f64.const 2 @@ -49,7 +49,7 @@ f64.const 0 f64.const 0 call $~lib/builtins/trace - i32.const 144 + i32.const 184 i32.const 3 f64.const 1 f64.const 2 @@ -57,7 +57,7 @@ f64.const 0 f64.const 0 call $~lib/builtins/trace - i32.const 176 + i32.const 224 i32.const 4 f64.const 1 f64.const 2 @@ -65,7 +65,7 @@ f64.const 4 f64.const 0 call $~lib/builtins/trace - i32.const 200 + i32.const 256 i32.const 5 f64.const 1 f64.const 2 @@ -73,7 +73,7 @@ f64.const 4 f64.const 5 call $~lib/builtins/trace - i32.const 224 + i32.const 288 i32.const 5 f64.const 1.1 f64.const 2.2 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index f1b7349af2..80bf5ac9bd 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -114,7 +114,6 @@ (global $std/typedarray/forEachValues (mut i32) (i32.const 872)) (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 1240)) (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -125,7 +124,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.retain)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -449,7 +447,7 @@ if i32.const 0 i32.const 136 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -464,7 +462,7 @@ if i32.const 0 i32.const 136 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable @@ -2507,8 +2505,7 @@ i32.load8_s local.get $1 local.get $0 - i32.const 2 - call_indirect (type $FUNCSIG$iiiii) + call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -2724,8 +2721,7 @@ i32.load16_s local.get $1 local.get $0 - i32.const 5 - call_indirect (type $FUNCSIG$iiiii) + call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -2820,8 +2816,7 @@ i32.load16_u local.get $1 local.get $0 - i32.const 6 - call_indirect (type $FUNCSIG$iiiii) + call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -3200,8 +3195,7 @@ f32.load local.get $1 local.get $0 - i32.const 11 - call_indirect (type $FUNCSIG$fffii) + call $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -3275,8 +3269,7 @@ f64.load local.get $1 local.get $0 - i32.const 12 - call_indirect (type $FUNCSIG$dddii) + call $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -3342,8 +3335,7 @@ i32.load8_s local.get $1 local.get $0 - i32.const 13 - call_indirect (type $FUNCSIG$iiiii) + call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -3517,8 +3509,7 @@ i32.load16_s local.get $1 local.get $0 - i32.const 16 - call_indirect (type $FUNCSIG$iiiii) + call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -3590,8 +3581,7 @@ i32.load16_u local.get $1 local.get $0 - i32.const 17 - call_indirect (type $FUNCSIG$iiiii) + call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -3867,8 +3857,7 @@ f32.load local.get $1 local.get $0 - i32.const 22 - call_indirect (type $FUNCSIG$fffii) + call $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -3938,8 +3927,7 @@ f64.load local.get $1 local.get $0 - i32.const 23 - call_indirect (type $FUNCSIG$dddii) + call $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -4018,8 +4006,7 @@ i32.load8_s local.get $1 local.get $0 - i32.const 24 - call_indirect (type $FUNCSIG$iiii) + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 i32.store8 local.get $1 i32.const 1 @@ -4122,8 +4109,7 @@ i32.load8_u local.get $1 local.get $0 - i32.const 25 - call_indirect (type $FUNCSIG$iiii) + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 i32.store8 local.get $1 i32.const 1 @@ -4245,8 +4231,7 @@ i32.load8_u local.get $1 local.get $0 - i32.const 26 - call_indirect (type $FUNCSIG$iiii) + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 i32.store8 local.get $1 i32.const 1 @@ -4353,8 +4338,7 @@ i32.load16_s local.get $1 local.get $0 - i32.const 27 - call_indirect (type $FUNCSIG$iiii) + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 local.set $7 local.get $5 local.get $6 @@ -4489,8 +4473,7 @@ i32.load16_u local.get $1 local.get $0 - i32.const 28 - call_indirect (type $FUNCSIG$iiii) + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 local.set $7 local.get $5 local.get $6 @@ -4625,8 +4608,7 @@ i32.load local.get $1 local.get $0 - i32.const 29 - call_indirect (type $FUNCSIG$iiii) + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 local.set $7 local.get $5 local.get $6 @@ -4738,8 +4720,7 @@ i32.load local.get $1 local.get $0 - i32.const 30 - call_indirect (type $FUNCSIG$iiii) + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 local.set $7 local.get $5 local.get $6 @@ -4879,8 +4860,7 @@ i64.load local.get $1 local.get $0 - i32.const 31 - call_indirect (type $FUNCSIG$jjii) + call $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 local.set $7 local.get $5 local.get $6 @@ -5015,8 +4995,7 @@ i64.load local.get $1 local.get $0 - i32.const 32 - call_indirect (type $FUNCSIG$jjii) + call $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 local.set $7 local.get $5 local.get $6 @@ -5156,8 +5135,7 @@ f32.load local.get $1 local.get $0 - i32.const 33 - call_indirect (type $FUNCSIG$ffii) + call $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 local.set $7 local.get $5 local.get $6 @@ -5297,8 +5275,7 @@ f64.load local.get $1 local.get $0 - i32.const 34 - call_indirect (type $FUNCSIG$ddii) + call $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 local.set $7 local.get $5 local.get $6 @@ -8300,8 +8277,7 @@ i32.load8_s local.get $1 local.get $0 - i32.const 101 - call_indirect (type $FUNCSIG$viii) + call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 local.get $1 i32.const 1 i32.add @@ -8561,8 +8537,7 @@ i32.load16_s local.get $1 local.get $0 - i32.const 104 - call_indirect (type $FUNCSIG$viii) + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 local.get $1 i32.const 1 i32.add @@ -8650,8 +8625,7 @@ i32.load16_u local.get $1 local.get $0 - i32.const 105 - call_indirect (type $FUNCSIG$viii) + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 local.get $1 i32.const 1 i32.add @@ -9102,8 +9076,7 @@ f32.load local.get $1 local.get $0 - i32.const 110 - call_indirect (type $FUNCSIG$vfii) + call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 local.get $1 i32.const 1 i32.add @@ -9224,8 +9197,7 @@ f64.load local.get $1 local.get $0 - i32.const 111 - call_indirect (type $FUNCSIG$vdii) + call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 local.get $1 i32.const 1 i32.add diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index b33577efc2..84d4f5e4f9 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -108,7 +108,6 @@ (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (global $~lib/runtime/RTTI_BASE i32 (i32.const 1448)) (global $~lib/memory/HEAP_BASE i32 (i32.const 1696)) - (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) (export "$.flags" (func $~lib/runtime/runtime.flags)) @@ -119,7 +118,6 @@ (export "$.retain" (func $~lib/runtime/runtime.retain)) (export "$.release" (func $~lib/runtime/runtime.release)) (export "$.collect" (func $~lib/runtime/runtime.collect)) - (export "$.capabilities" (global $~lib/capabilities)) (start $start) (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 @@ -508,7 +506,7 @@ if i32.const 0 i32.const 136 - i32.const 131 + i32.const 129 i32.const 4 call $~lib/builtins/abort unreachable @@ -525,7 +523,7 @@ if i32.const 0 i32.const 136 - i32.const 133 + i32.const 131 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/switch.optimized.wat b/tests/compiler/switch.optimized.wat index 0b165397e6..884f3adc97 100644 --- a/tests/compiler/switch.optimized.wat +++ b/tests/compiler/switch.optimized.wat @@ -4,7 +4,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\12\00\00\00s\00w\00i\00t\00c\00h\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\12") + (data (i32.const 24) "s\00w\00i\00t\00c\00h\00.\00t\00s") (export "memory" (memory $0)) (start $start) (func $switch/doSwitch (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -65,7 +66,7 @@ call $switch/doSwitch if i32.const 0 - i32.const 16 + i32.const 24 i32.const 10 i32.const 0 call $~lib/builtins/abort @@ -77,7 +78,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 11 i32.const 0 call $~lib/builtins/abort @@ -89,7 +90,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -101,7 +102,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 13 i32.const 0 call $~lib/builtins/abort @@ -111,7 +112,7 @@ call $switch/doSwitch if i32.const 0 - i32.const 16 + i32.const 24 i32.const 14 i32.const 0 call $~lib/builtins/abort @@ -121,7 +122,7 @@ call $switch/doSwitch if i32.const 0 - i32.const 16 + i32.const 24 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -133,7 +134,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 25 i32.const 0 call $~lib/builtins/abort @@ -145,7 +146,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 26 i32.const 0 call $~lib/builtins/abort @@ -157,7 +158,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 27 i32.const 0 call $~lib/builtins/abort @@ -167,7 +168,7 @@ call $switch/doSwitch if i32.const 0 - i32.const 16 + i32.const 24 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -177,7 +178,7 @@ call $switch/doSwitchDefaultOmitted if i32.const 0 - i32.const 16 + i32.const 24 i32.const 38 i32.const 0 call $~lib/builtins/abort @@ -189,7 +190,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 39 i32.const 0 call $~lib/builtins/abort @@ -201,7 +202,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 40 i32.const 0 call $~lib/builtins/abort @@ -213,7 +214,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 41 i32.const 0 call $~lib/builtins/abort @@ -223,7 +224,7 @@ call $switch/doSwitchDefaultOmitted if i32.const 0 - i32.const 16 + i32.const 24 i32.const 42 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/switch.untouched.wat b/tests/compiler/switch.untouched.wat index ddacf54185..653916eecc 100644 --- a/tests/compiler/switch.untouched.wat +++ b/tests/compiler/switch.untouched.wat @@ -4,7 +4,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\12\00\00\00s\00w\00i\00t\00c\00h\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00s\00w\00i\00t\00c\00h\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (export "memory" (memory $0)) @@ -174,7 +174,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 10 i32.const 0 call $~lib/builtins/abort @@ -187,7 +187,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 11 i32.const 0 call $~lib/builtins/abort @@ -200,7 +200,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -213,7 +213,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 13 i32.const 0 call $~lib/builtins/abort @@ -226,7 +226,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 14 i32.const 0 call $~lib/builtins/abort @@ -239,7 +239,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -252,7 +252,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 25 i32.const 0 call $~lib/builtins/abort @@ -265,7 +265,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 26 i32.const 0 call $~lib/builtins/abort @@ -278,7 +278,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 27 i32.const 0 call $~lib/builtins/abort @@ -291,7 +291,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -304,7 +304,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 38 i32.const 0 call $~lib/builtins/abort @@ -317,7 +317,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 39 i32.const 0 call $~lib/builtins/abort @@ -330,7 +330,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 40 i32.const 0 call $~lib/builtins/abort @@ -343,7 +343,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 41 i32.const 0 call $~lib/builtins/abort @@ -356,7 +356,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 42 i32.const 0 call $~lib/builtins/abort @@ -369,7 +369,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 51 i32.const 0 call $~lib/builtins/abort @@ -382,7 +382,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 52 i32.const 0 call $~lib/builtins/abort @@ -395,7 +395,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 53 i32.const 0 call $~lib/builtins/abort @@ -408,7 +408,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 62 i32.const 0 call $~lib/builtins/abort @@ -421,7 +421,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 63 i32.const 0 call $~lib/builtins/abort @@ -434,7 +434,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 64 i32.const 0 call $~lib/builtins/abort @@ -447,7 +447,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 73 i32.const 0 call $~lib/builtins/abort @@ -460,7 +460,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 74 i32.const 0 call $~lib/builtins/abort @@ -473,7 +473,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 75 i32.const 0 call $~lib/builtins/abort @@ -486,7 +486,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 84 i32.const 0 call $~lib/builtins/abort @@ -499,7 +499,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 85 i32.const 0 call $~lib/builtins/abort @@ -512,7 +512,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 86 i32.const 0 call $~lib/builtins/abort @@ -525,7 +525,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 92 i32.const 0 call $~lib/builtins/abort @@ -538,7 +538,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 93 i32.const 0 call $~lib/builtins/abort @@ -551,7 +551,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 94 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/wasi.optimized.wat b/tests/compiler/wasi.optimized.wat index 66a2d3405b..e31c1f81e7 100644 --- a/tests/compiler/wasi.optimized.wat +++ b/tests/compiler/wasi.optimized.wat @@ -1,7 +1,8 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\0e\00\00\00w\00a\00s\00i\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\0e") + (data (i32.const 24) "w\00a\00s\00i\00.\00t\00s") (global $wasi/sig (mut i32) (i32.const 1)) (export "memory" (memory $0)) (start $start) diff --git a/tests/compiler/wasi.untouched.wat b/tests/compiler/wasi.untouched.wat index 1f077ba208..b4564bf151 100644 --- a/tests/compiler/wasi.untouched.wat +++ b/tests/compiler/wasi.untouched.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\0e\00\00\00w\00a\00s\00i\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00w\00a\00s\00i\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/common/target/Target.WASM32 i32 (i32.const 0)) @@ -20,7 +20,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 4 i32.const 0 call $~lib/builtins/abort @@ -32,7 +32,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 5 i32.const 0 call $~lib/builtins/abort @@ -44,7 +44,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 6 i32.const 0 call $~lib/builtins/abort @@ -56,7 +56,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 7 i32.const 0 call $~lib/builtins/abort @@ -68,7 +68,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 8 i32.const 0 call $~lib/builtins/abort @@ -80,7 +80,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 10 i32.const 0 call $~lib/builtins/abort @@ -92,7 +92,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 11 i32.const 0 call $~lib/builtins/abort @@ -104,7 +104,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 12 i32.const 0 call $~lib/builtins/abort @@ -116,7 +116,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 13 i32.const 0 call $~lib/builtins/abort @@ -128,7 +128,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 14 i32.const 0 call $~lib/builtins/abort @@ -140,7 +140,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 15 i32.const 0 call $~lib/builtins/abort @@ -152,7 +152,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 17 i32.const 0 call $~lib/builtins/abort @@ -164,7 +164,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 18 i32.const 0 call $~lib/builtins/abort @@ -176,7 +176,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 19 i32.const 0 call $~lib/builtins/abort @@ -188,7 +188,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 20 i32.const 0 call $~lib/builtins/abort @@ -200,7 +200,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 21 i32.const 0 call $~lib/builtins/abort @@ -212,7 +212,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 23 i32.const 0 call $~lib/builtins/abort @@ -224,7 +224,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -236,7 +236,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 25 i32.const 0 call $~lib/builtins/abort @@ -248,7 +248,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 26 i32.const 0 call $~lib/builtins/abort @@ -260,7 +260,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 27 i32.const 0 call $~lib/builtins/abort @@ -272,7 +272,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 28 i32.const 0 call $~lib/builtins/abort @@ -284,7 +284,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 29 i32.const 0 call $~lib/builtins/abort @@ -296,7 +296,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 30 i32.const 0 call $~lib/builtins/abort @@ -308,7 +308,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 31 i32.const 0 call $~lib/builtins/abort @@ -320,7 +320,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 33 i32.const 0 call $~lib/builtins/abort @@ -333,7 +333,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 35 i32.const 2 call $~lib/builtins/abort @@ -345,7 +345,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 36 i32.const 2 call $~lib/builtins/abort @@ -358,7 +358,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 44 i32.const 0 call $~lib/builtins/abort @@ -370,7 +370,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 45 i32.const 0 call $~lib/builtins/abort @@ -382,7 +382,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 46 i32.const 0 call $~lib/builtins/abort @@ -394,7 +394,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 47 i32.const 0 call $~lib/builtins/abort @@ -406,7 +406,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 48 i32.const 0 call $~lib/builtins/abort @@ -418,7 +418,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 49 i32.const 0 call $~lib/builtins/abort @@ -430,7 +430,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 50 i32.const 0 call $~lib/builtins/abort @@ -442,7 +442,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 51 i32.const 0 call $~lib/builtins/abort @@ -454,7 +454,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 53 i32.const 0 call $~lib/builtins/abort @@ -466,7 +466,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 54 i32.const 0 call $~lib/builtins/abort @@ -478,7 +478,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 55 i32.const 0 call $~lib/builtins/abort @@ -490,7 +490,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 56 i32.const 0 call $~lib/builtins/abort @@ -502,7 +502,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 58 i32.const 0 call $~lib/builtins/abort @@ -515,7 +515,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 60 i32.const 2 call $~lib/builtins/abort @@ -527,7 +527,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 61 i32.const 2 call $~lib/builtins/abort diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index c7317e81a4..c8018f682e 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -3,7 +3,8 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\10\00\00\00w\00h\00i\00l\00e\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\10") + (data (i32.const 24) "w\00h\00i\00l\00e\00.\00t\00s") (global $while/n (mut i32) (i32.const 10)) (global $while/m (mut i32) (i32.const 0)) (global $while/o (mut i32) (i32.const 0)) @@ -28,7 +29,7 @@ global.get $while/n if i32.const 0 - i32.const 16 + i32.const 24 i32.const 8 i32.const 0 call $~lib/builtins/abort @@ -39,7 +40,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 9 i32.const 0 call $~lib/builtins/abort @@ -77,7 +78,7 @@ global.get $while/n if i32.const 0 - i32.const 16 + i32.const 24 i32.const 21 i32.const 2 call $~lib/builtins/abort @@ -88,7 +89,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 22 i32.const 2 call $~lib/builtins/abort @@ -100,7 +101,7 @@ global.get $while/n if i32.const 0 - i32.const 16 + i32.const 24 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -111,7 +112,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 25 i32.const 0 call $~lib/builtins/abort @@ -122,7 +123,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 26 i32.const 0 call $~lib/builtins/abort @@ -154,7 +155,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 31 i32.const 0 call $~lib/builtins/abort @@ -165,7 +166,7 @@ i32.ne if i32.const 0 - i32.const 16 + i32.const 24 i32.const 32 i32.const 0 call $~lib/builtins/abort diff --git a/tests/compiler/while.untouched.wat b/tests/compiler/while.untouched.wat index ba149171c8..05b86d4013 100644 --- a/tests/compiler/while.untouched.wat +++ b/tests/compiler/while.untouched.wat @@ -3,7 +3,7 @@ (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\10\00\00\00w\00h\00i\00l\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00w\00h\00i\00l\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $while/n (mut i32) (i32.const 10)) @@ -37,7 +37,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 8 i32.const 0 call $~lib/builtins/abort @@ -49,7 +49,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 9 i32.const 0 call $~lib/builtins/abort @@ -96,7 +96,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 21 i32.const 2 call $~lib/builtins/abort @@ -108,7 +108,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 22 i32.const 2 call $~lib/builtins/abort @@ -125,7 +125,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 24 i32.const 0 call $~lib/builtins/abort @@ -137,7 +137,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 25 i32.const 0 call $~lib/builtins/abort @@ -149,7 +149,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 26 i32.const 0 call $~lib/builtins/abort @@ -192,7 +192,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 31 i32.const 0 call $~lib/builtins/abort @@ -204,7 +204,7 @@ i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 32 i32.const 0 call $~lib/builtins/abort From da4a7751fd0a3174004e1cb275251b5a84e3a6f7 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 9 Apr 2019 03:04:45 +0200 Subject: [PATCH 100/119] optimize logical and/or, initial null checking in flows --- src/compiler.ts | 138 +- src/diagnosticMessages.generated.ts | 2 + src/diagnosticMessages.json | 1 + src/flow.ts | 190 +- src/types.ts | 6 +- std/assembly/string.ts | 6 +- tests/compiler/binary.optimized.wat | 296 ++- tests/compiler/binary.untouched.wat | 226 +- tests/compiler/gc/itcm/trace.optimized.wat | 8 +- tests/compiler/gc/itcm/trace.untouched.wat | 3 +- tests/compiler/logical.untouched.wat | 24 +- tests/compiler/mandelbrot.optimized.wat | 166 +- tests/compiler/mandelbrot.untouched.wat | 164 +- tests/compiler/memcpy.optimized.wat | 2 +- tests/compiler/memcpy.untouched.wat | 2 +- tests/compiler/number.optimized.wat | 225 +- tests/compiler/number.untouched.wat | 61 +- tests/compiler/possibly-null.json | 5 + tests/compiler/possibly-null.optimized.wat | 58 + tests/compiler/possibly-null.ts | 98 + tests/compiler/possibly-null.untouched.wat | 133 ++ tests/compiler/runtime-arena.optimized.wat | 18 +- tests/compiler/runtime-arena.untouched.wat | 6 +- tests/compiler/runtime-default.optimized.wat | 204 +- tests/compiler/runtime-default.untouched.wat | 159 +- tests/compiler/runtime/flags.optimized.wat | 204 +- tests/compiler/runtime/flags.untouched.wat | 159 +- .../compiler/runtime/instanceof.optimized.wat | 18 +- .../compiler/runtime/instanceof.untouched.wat | 6 +- .../std/allocator_arena.optimized.wat | 10 +- .../std/allocator_arena.untouched.wat | 4 +- tests/compiler/std/array-access.optimized.wat | 23 +- tests/compiler/std/array-access.untouched.wat | 2 +- .../compiler/std/array-literal.optimized.wat | 18 +- .../compiler/std/array-literal.untouched.wat | 6 +- tests/compiler/std/array.optimized.wat | 319 ++- tests/compiler/std/array.untouched.wat | 141 +- tests/compiler/std/arraybuffer.optimized.wat | 18 +- tests/compiler/std/arraybuffer.untouched.wat | 6 +- tests/compiler/std/dataview.optimized.wat | 18 +- tests/compiler/std/dataview.untouched.wat | 38 +- tests/compiler/std/date.optimized.wat | 18 +- tests/compiler/std/date.untouched.wat | 6 +- tests/compiler/std/libm.optimized.wat | 739 +++---- tests/compiler/std/libm.untouched.wat | 541 +++-- tests/compiler/std/map.optimized.wat | 190 +- tests/compiler/std/map.untouched.wat | 76 +- tests/compiler/std/math.optimized.wat | 1957 ++++++++--------- tests/compiler/std/math.untouched.wat | 1534 ++++++------- tests/compiler/std/mod.optimized.wat | 122 +- tests/compiler/std/mod.untouched.wat | 65 +- tests/compiler/std/new.optimized.wat | 18 +- tests/compiler/std/new.untouched.wat | 6 +- .../compiler/std/object-literal.optimized.wat | 31 +- .../compiler/std/object-literal.untouched.wat | 18 +- .../std/operator-overloading.optimized.wat | 482 ++-- .../std/operator-overloading.untouched.wat | 177 +- tests/compiler/std/runtime.optimized.wat | 198 +- tests/compiler/std/runtime.untouched.wat | 154 +- tests/compiler/std/set.optimized.wat | 190 +- tests/compiler/std/set.untouched.wat | 76 +- tests/compiler/std/static-array.optimized.wat | 18 +- tests/compiler/std/static-array.untouched.wat | 6 +- tests/compiler/std/string-utf8.optimized.wat | 164 +- tests/compiler/std/string-utf8.untouched.wat | 34 +- tests/compiler/std/string.optimized.wat | 1010 ++++----- tests/compiler/std/string.untouched.wat | 297 +-- tests/compiler/std/symbol.optimized.wat | 99 +- tests/compiler/std/symbol.untouched.wat | 33 +- tests/compiler/std/typedarray.optimized.wat | 180 +- tests/compiler/std/typedarray.untouched.wat | 140 +- tests/compiler/while.optimized.wat | 3 + tests/compiler/while.untouched.wat | 3 +- 73 files changed, 5415 insertions(+), 6361 deletions(-) create mode 100644 tests/compiler/possibly-null.json create mode 100644 tests/compiler/possibly-null.optimized.wat create mode 100644 tests/compiler/possibly-null.ts create mode 100644 tests/compiler/possibly-null.untouched.wat diff --git a/src/compiler.ts b/src/compiler.ts index 18f75250cb..940cf2d6a0 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -1954,6 +1954,7 @@ export class Compiler extends DiagnosticEmitter { condExpr = module.createI32(1); alwaysTrue = true; } + innerFlow.inheritNonnullIf(condExpr); var incrExpr = statement.incrementor ? this.compileExpression(statement.incrementor, Type.void, ConversionKind.IMPLICIT, WrapMode.NONE) : 0; @@ -2010,7 +2011,6 @@ export class Compiler extends DiagnosticEmitter { var ifTrue = statement.ifTrue; var ifFalse = statement.ifFalse; var outerFlow = this.currentFlow; - var actualFunction = outerFlow.actualFunction; // The condition doesn't initiate a branch yet var condExpr = this.makeIsTrueish( @@ -2041,6 +2041,7 @@ export class Compiler extends DiagnosticEmitter { // Each arm initiates a branch var ifTrueFlow = outerFlow.fork(); this.currentFlow = ifTrueFlow; + ifTrueFlow.inheritNonnullIf(condExpr); var ifTrueExpr = this.compileStatement(ifTrue); ifTrueFlow.freeScopedLocals(); this.currentFlow = outerFlow; @@ -2049,12 +2050,16 @@ export class Compiler extends DiagnosticEmitter { if (ifFalse) { let ifFalseFlow = outerFlow.fork(); this.currentFlow = ifFalseFlow; + ifFalseFlow.inheritNonnullIfNot(condExpr); ifFalseExpr = this.compileStatement(ifFalse); ifFalseFlow.freeScopedLocals(); this.currentFlow = outerFlow; outerFlow.inheritMutual(ifTrueFlow, ifFalseFlow); } else { outerFlow.inheritConditional(ifTrueFlow); + if (ifTrueFlow.isAny(FlowFlags.ANY_TERMINATING)) { + outerFlow.inheritNonnullIfNot(condExpr); + } } return module.createIf(condExpr, ifTrueExpr, ifFalseExpr); } @@ -2431,6 +2436,7 @@ export class Compiler extends DiagnosticEmitter { var continueLabel = "continue|" + label; innerFlow.continueLabel = continueLabel; + innerFlow.inheritNonnullIf(condExpr); var body = this.compileStatement(statement.statement); var alwaysTrue = false; // TODO var terminated = innerFlow.isAny(FlowFlags.ANY_TERMINATING); @@ -2705,10 +2711,17 @@ export class Compiler extends DiagnosticEmitter { if (!fromType.isAssignableTo(toType)) { if (conversionKind == ConversionKind.IMPLICIT) { - this.error( - DiagnosticCode.Conversion_from_type_0_to_1_requires_an_explicit_cast, - reportNode.range, fromType.toString(), toType.toString() - ); // recoverable + if (fromType.nonNullableType == toType) { + this.error( + DiagnosticCode.Object_is_possibly_null, + reportNode.range + ); // recoverable + } else { + this.error( + DiagnosticCode.Conversion_from_type_0_to_1_requires_an_explicit_cast, + reportNode.range, fromType.toString(), toType.toString() + ); // recoverable + } } } @@ -4743,10 +4756,19 @@ export class Compiler extends DiagnosticEmitter { leftExpr = this.compileExpressionRetainType(left, contextualType, WrapMode.NONE); leftType = this.currentType; rightExpr = this.compileExpression(right, leftType, ConversionKind.IMPLICIT, WrapMode.NONE); - rightType = this.currentType; + rightType = leftType; + + // simplify if only interested in true or false + if (contextualType == Type.bool || contextualType == Type.void) { + this.currentType = Type.bool; + expr = module.createIf( + this.makeIsTrueish(leftExpr, leftType), + this.makeIsTrueish(rightExpr, rightType), + module.createI32(0) + ); // simplify if cloning left without side effects is possible - if (expr = module.cloneExpression(leftExpr, true, 0)) { + } else if (expr = module.cloneExpression(leftExpr, true, 0)) { expr = module.createIf( this.makeIsTrueish(leftExpr, this.currentType), rightExpr, @@ -4778,11 +4800,20 @@ export class Compiler extends DiagnosticEmitter { leftExpr = this.compileExpressionRetainType(left, contextualType, WrapMode.NONE); leftType = this.currentType; rightExpr = this.compileExpression(right, leftType, ConversionKind.IMPLICIT, WrapMode.NONE); - rightType = this.currentType; + rightType = leftType; + + // simplify if only interested in true or false + if (contextualType == Type.bool || contextualType == Type.void) { + this.currentType = Type.bool; + expr = module.createIf( + this.makeIsTrueish(leftExpr, leftType), + module.createI32(1), + this.makeIsTrueish(rightExpr, rightType) + ); // simplify if cloning left without side effects is possible - if (expr = this.module.cloneExpression(leftExpr, true, 0)) { - expr = this.module.createIf( + } else if (expr = module.cloneExpression(leftExpr, true, 0)) { + expr = module.createIf( this.makeIsTrueish(leftExpr, this.currentType), expr, rightExpr @@ -4815,7 +4846,11 @@ export class Compiler extends DiagnosticEmitter { } } return compound - ? this.compileAssignmentWithValue(left, expr, contextualType != Type.void) + ? this.compileAssignmentWithValue( + left, + expr, + contextualType != Type.void + ) : expr; } @@ -4833,6 +4868,7 @@ export class Compiler extends DiagnosticEmitter { } else { argumentExpressions = [ value ]; // annotated type might differ -> recompile } + this.currentType = operatorInstance.signature.returnType; return this.compileCallDirect( operatorInstance, argumentExpressions, @@ -4857,13 +4893,13 @@ export class Compiler extends DiagnosticEmitter { } else { argumentExpressions = [ left, right ]; // annotated type of LHS might differ -> recompile } - var ret = this.compileCallDirect( + this.currentType = operatorInstance.signature.returnType; + return this.compileCallDirect( operatorInstance, argumentExpressions, reportNode, thisArg ); - return ret; } compileAssignment(expression: Expression, valueExpression: Expression, contextualType: Type): ExpressionRef { @@ -4977,11 +5013,12 @@ export class Compiler extends DiagnosticEmitter { compileAssignmentWithValue( expression: Expression, valueExpr: ExpressionRef, - tee: bool = false + tee: bool ): ExpressionRef { var module = this.module; var flow = this.currentFlow; var target = this.resolver.resolveExpression(expression, flow); // reports + var possiblyNull = this.currentType.is(TypeFlags.NULLABLE) && !flow.isNonnull(valueExpr); if (!target) return module.createUnreachable(); switch (target.kind) { @@ -4994,7 +5031,7 @@ export class Compiler extends DiagnosticEmitter { this.currentType = tee ? (target).type : Type.void; return module.createUnreachable(); } - return this.makeLocalAssignment(target, valueExpr, tee); + return this.makeLocalAssignment(target, valueExpr, tee, possiblyNull); } case ElementKind.GLOBAL: { if (!this.compileGlobal(target)) return module.createUnreachable(); @@ -5177,17 +5214,23 @@ export class Compiler extends DiagnosticEmitter { return module.createUnreachable(); } - makeLocalAssignment(local: Local, valueExpr: ExpressionRef, tee: bool): ExpressionRef { + makeLocalAssignment( + local: Local, + valueExpr: ExpressionRef, + tee: bool, + possiblyNull: bool + ): ExpressionRef { // TBD: use REPLACE macro to keep track of managed refcounts? or can the compiler evaluate // this statically in closed contexts like functions in order to safe the extra work? var type = local.type; assert(type != Type.void); + var flow = this.currentFlow; var localIndex = local.index; if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) { - let flow = this.currentFlow; if (!flow.canOverflow(valueExpr, type)) flow.setLocalFlag(localIndex, LocalFlags.WRAPPED); else flow.unsetLocalFlag(localIndex, LocalFlags.WRAPPED); } + if (possiblyNull) flow.unsetLocalFlag(localIndex, LocalFlags.NONNULL); if (tee) { this.currentType = type; return this.module.createTeeLocal(localIndex, valueExpr); @@ -6633,6 +6676,9 @@ export class Compiler extends DiagnosticEmitter { } let localIndex = (target).index; assert(localIndex >= 0); + if (localType.is(TypeFlags.NULLABLE) && flow.isLocalFlag(localIndex, LocalFlags.NONNULL, false)) { + localType = localType.nonNullableType; + } this.currentType = localType; return this.module.createGetLocal(localIndex, localType.toNativeType()); } @@ -7489,23 +7535,21 @@ export class Compiler extends DiagnosticEmitter { // shortcut if compiling the getter already failed if (getExpressionId(getValue) == ExpressionId.Unreachable) return getValue; - var currentType = this.currentType; - // if the value isn't dropped, a temp. local is required to remember the original value var tempLocal: Local | null = null; if (contextualType != Type.void) { - tempLocal = flow.getTempLocal(currentType, false); + tempLocal = flow.getTempLocal(this.currentType, false); getValue = module.createTeeLocal( tempLocal.index, getValue ); } - var calcValue: ExpressionRef; + var expr: ExpressionRef; switch (expression.operator) { case Token.PLUS_PLUS: { - switch (currentType.kind) { + switch (this.currentType.kind) { case TypeKind.I8: case TypeKind.I16: case TypeKind.I32: @@ -7513,7 +7557,7 @@ export class Compiler extends DiagnosticEmitter { case TypeKind.U16: case TypeKind.U32: case TypeKind.BOOL: { - calcValue = module.createBinary( + expr = module.createBinary( BinaryOp.AddI32, getValue, module.createI32(1) @@ -7527,7 +7571,7 @@ export class Compiler extends DiagnosticEmitter { if (classReference) { let overload = classReference.lookupOverload(OperatorKind.POSTFIX_INC); if (overload) { - calcValue = this.compileUnaryOverload(overload, expression.operand, getValue, expression); + expr = this.compileUnaryOverload(overload, expression.operand, getValue, expression); break; } } @@ -7540,18 +7584,18 @@ export class Compiler extends DiagnosticEmitter { } case TypeKind.ISIZE: { let options = this.options; - calcValue = module.createBinary( + expr = module.createBinary( options.isWasm64 ? BinaryOp.AddI64 : BinaryOp.AddI32, getValue, - currentType.toNativeOne(module) + this.currentType.toNativeOne(module) ); break; } case TypeKind.I64: case TypeKind.U64: { - calcValue = module.createBinary( + expr = module.createBinary( BinaryOp.AddI64, getValue, module.createI64(1) @@ -7559,7 +7603,7 @@ export class Compiler extends DiagnosticEmitter { break; } case TypeKind.F32: { - calcValue = module.createBinary( + expr = module.createBinary( BinaryOp.AddF32, getValue, module.createF32(1) @@ -7567,7 +7611,7 @@ export class Compiler extends DiagnosticEmitter { break; } case TypeKind.F64: { - calcValue = module.createBinary( + expr = module.createBinary( BinaryOp.AddF64, getValue, module.createF64(1) @@ -7582,7 +7626,7 @@ export class Compiler extends DiagnosticEmitter { break; } case Token.MINUS_MINUS: { - switch (currentType.kind) { + switch (this.currentType.kind) { case TypeKind.I8: case TypeKind.I16: case TypeKind.I32: @@ -7590,7 +7634,7 @@ export class Compiler extends DiagnosticEmitter { case TypeKind.U16: case TypeKind.U32: case TypeKind.BOOL: { - calcValue = module.createBinary( + expr = module.createBinary( BinaryOp.SubI32, getValue, module.createI32(1) @@ -7604,7 +7648,7 @@ export class Compiler extends DiagnosticEmitter { if (classReference) { let overload = classReference.lookupOverload(OperatorKind.POSTFIX_DEC); if (overload) { - calcValue = this.compileUnaryOverload(overload, expression.operand, getValue, expression); + expr = this.compileUnaryOverload(overload, expression.operand, getValue, expression); break; } } @@ -7617,18 +7661,18 @@ export class Compiler extends DiagnosticEmitter { } case TypeKind.ISIZE: { let options = this.options; - calcValue = module.createBinary( + expr = module.createBinary( options.isWasm64 ? BinaryOp.SubI64 : BinaryOp.SubI32, getValue, - currentType.toNativeOne(module) + this.currentType.toNativeOne(module) ); break; } case TypeKind.I64: case TypeKind.U64: { - calcValue = module.createBinary( + expr = module.createBinary( BinaryOp.SubI64, getValue, module.createI64(1) @@ -7636,7 +7680,7 @@ export class Compiler extends DiagnosticEmitter { break; } case TypeKind.F32: { - calcValue = module.createBinary( + expr = module.createBinary( BinaryOp.SubF32, getValue, module.createF32(1) @@ -7644,7 +7688,7 @@ export class Compiler extends DiagnosticEmitter { break; } case TypeKind.F64: { - calcValue = module.createBinary( + expr = module.createBinary( BinaryOp.SubF64, getValue, module.createF64(1) @@ -7667,15 +7711,17 @@ export class Compiler extends DiagnosticEmitter { // simplify if dropped anyway if (!tempLocal) { this.currentType = Type.void; - return this.compileAssignmentWithValue(expression.operand, - calcValue, + return this.compileAssignmentWithValue( + expression.operand, + expr, false ); } // otherwise use the temp. local for the intermediate value (always possibly overflows) - var setValue = this.compileAssignmentWithValue(expression.operand, - calcValue, // also tees getValue to tempLocal + var setValue = this.compileAssignmentWithValue( + expression.operand, + expr, // also tees getValue to tempLocal false ); @@ -8058,7 +8104,11 @@ export class Compiler extends DiagnosticEmitter { } } return compound - ? this.compileAssignmentWithValue(expression.operand, expr, contextualType != Type.void) + ? this.compileAssignmentWithValue( + expression.operand, + expr, + contextualType != Type.void + ) : expr; } @@ -8182,11 +8232,11 @@ export class Compiler extends DiagnosticEmitter { case TypeKind.I8: case TypeKind.I16: case TypeKind.U8: - case TypeKind.U16: - case TypeKind.BOOL: { + case TypeKind.U16: { expr = this.ensureSmallIntegerWrap(expr, type); // fall-through } + case TypeKind.BOOL: // not a mask, just != 0 case TypeKind.I32: case TypeKind.U32: { return expr; diff --git a/src/diagnosticMessages.generated.ts b/src/diagnosticMessages.generated.ts index d678ac493c..933c3456f4 100644 --- a/src/diagnosticMessages.generated.ts +++ b/src/diagnosticMessages.generated.ts @@ -122,6 +122,7 @@ export enum DiagnosticCode { The_0_operator_cannot_be_applied_to_type_1 = 2469, In_const_enum_declarations_member_initializer_must_be_constant_expression = 2474, Export_declaration_conflicts_with_exported_declaration_of_0 = 2484, + Object_is_possibly_null = 2531, Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property = 2540, The_target_of_an_assignment_must_be_a_variable_or_a_property_access = 2541, Index_signature_in_type_0_only_permits_reading = 2542, @@ -259,6 +260,7 @@ export function diagnosticCodeToString(code: DiagnosticCode): string { case 2469: return "The '{0}' operator cannot be applied to type '{1}'."; case 2474: return "In 'const' enum declarations member initializer must be constant expression."; case 2484: return "Export declaration conflicts with exported declaration of '{0}'."; + case 2531: return "Object is possibly 'null'."; case 2540: return "Cannot assign to '{0}' because it is a constant or a read-only property."; case 2541: return "The target of an assignment must be a variable or a property access."; case 2542: return "Index signature in type '{0}' only permits reading."; diff --git a/src/diagnosticMessages.json b/src/diagnosticMessages.json index 6516c953af..86731c5b59 100644 --- a/src/diagnosticMessages.json +++ b/src/diagnosticMessages.json @@ -116,6 +116,7 @@ "The '{0}' operator cannot be applied to type '{1}'.": 2469, "In 'const' enum declarations member initializer must be constant expression.": 2474, "Export declaration conflicts with exported declaration of '{0}'.": 2484, + "Object is possibly 'null'.": 2531, "Cannot assign to '{0}' because it is a constant or a read-only property.": 2540, "The target of an assignment must be a variable or a property access.": 2541, "Index signature in type '{0}' only permits reading.": 2542, diff --git a/src/flow.ts b/src/flow.ts index 7bbe99a11d..8c090752ce 100644 --- a/src/flow.ts +++ b/src/flow.ts @@ -47,7 +47,11 @@ import { getIfFalse, getSelectThen, getSelectElse, - getCallTarget + getCallTarget, + getSetLocalIndex, + getIfCondition, + getConstValueI64High, + getUnaryValue } from "./module"; import { @@ -136,8 +140,8 @@ export enum LocalFlags { /** Local is properly wrapped. Relevant for small integers. */ WRAPPED = 1 << 0, - /** Local is possibly null. */ - MAYBENULL = 1 << 1, + /** Local is non-null. */ + NONNULL = 1 << 1, /** Local is read from. */ READFROM = 1 << 2, /** Local is written to. */ @@ -149,7 +153,7 @@ export enum LocalFlags { CONDITIONALLY_WRITTENTO = 1 << 5, /** Any categorical flag. */ - ANY_CATEGORICAL = WRAPPED | MAYBENULL | READFROM | WRITTENTO, + ANY_CATEGORICAL = WRAPPED | NONNULL | READFROM | WRITTENTO, /** Any conditional flag. */ ANY_CONDITIONAL = CONDITIONALLY_READFROM | CONDITIONALLY_WRITTENTO } @@ -578,6 +582,184 @@ export class Flow { this.localFlags = combinedFlags; } + /** Checks if an expression is known to be non-null. */ + isNonnull(expr: ExpressionRef): bool { + switch (getExpressionId(expr)) { + case ExpressionId.SetLocal: { + if (!isTeeLocal(expr)) break; + let local = this.parentFunction.localsByIndex[getSetLocalIndex(expr)]; + return !local.type.is(TypeFlags.NULLABLE) || this.isLocalFlag(local.index, LocalFlags.NONNULL, false); + } + case ExpressionId.GetLocal: { + let local = this.parentFunction.localsByIndex[getGetLocalIndex(expr)]; + return !local.type.is(TypeFlags.NULLABLE) || this.isLocalFlag(local.index, LocalFlags.NONNULL, false); + } + } + return false; + } + + /** Sets local states where this branch is only taken when `expr` is true-ish. */ + inheritNonnullIf(expr: ExpressionRef): void { + switch (getExpressionId(expr)) { + case ExpressionId.SetLocal: { + if (!isTeeLocal(expr)) break; + let local = this.parentFunction.localsByIndex[getSetLocalIndex(expr)]; + this.setLocalFlag(local.index, LocalFlags.NONNULL); + break; + } + case ExpressionId.GetLocal: { // local must be true-ish/non-null + let local = this.parentFunction.localsByIndex[getGetLocalIndex(expr)]; + this.setLocalFlag(local.index, LocalFlags.NONNULL); + break; + } + case ExpressionId.If: { + let ifFalse = getIfFalse(expr); + if (!ifFalse) break; + if (getExpressionId(ifFalse) == ExpressionId.Const && getExpressionType(ifFalse) == NativeType.I32 && getConstValueI32(ifFalse) == 0) { + // Logical AND: (if (condition ifTrue 0)) + // the only way this can become true is if condition and ifTrue are true + this.inheritNonnullIf(getIfCondition(expr)); + this.inheritNonnullIf(getIfTrue(expr)); + } + break; + } + case ExpressionId.Unary: { + switch (getUnaryOp(expr)) { + case UnaryOp.EqzI32: { + this.inheritNonnullIfNot(getUnaryValue(expr)); // !expr + break; + } + case UnaryOp.EqzI64: { + this.inheritNonnullIfNot(getUnaryValue(expr)); // !expr + break; + } + } + break; + } + case ExpressionId.Binary: { + switch (getBinaryOp(expr)) { + case BinaryOp.EqI32: { + let left = getBinaryLeft(expr); + let right = getBinaryRight(expr); + if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) != 0) { + this.inheritNonnullIf(right); // TRUE == right + } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) != 0) { + this.inheritNonnullIf(left); // left == TRUE + } + break; + } + case BinaryOp.EqI64: { + let left = getBinaryLeft(expr); + let right = getBinaryRight(expr); + if (getExpressionId(left) == ExpressionId.Const && (getConstValueI64Low(left) != 0 || getConstValueI64High(left) != 0)) { + this.inheritNonnullIf(right); // TRUE == right + } else if (getExpressionId(right) == ExpressionId.Const && (getConstValueI64Low(right) != 0 && getConstValueI64High(right) != 0)) { + this.inheritNonnullIf(left); // left == TRUE + } + break; + } + case BinaryOp.NeI32: { + let left = getBinaryLeft(expr); + let right = getBinaryRight(expr); + if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) == 0) { + this.inheritNonnullIf(right); // FALSE != right + } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) == 0) { + this.inheritNonnullIf(left); // left != FALSE + } + break; + } + case BinaryOp.NeI64: { + let left = getBinaryLeft(expr); + let right = getBinaryRight(expr); + if (getExpressionId(left) == ExpressionId.Const && getConstValueI64Low(left) == 0 && getConstValueI64High(left) == 0) { + this.inheritNonnullIf(right); // FALSE != right + } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI64Low(right) == 0 && getConstValueI64High(right) == 0) { + this.inheritNonnullIf(left); // left != FALSE + } + break; + } + } + break; + } + } + } + + /** Sets local states where this branch is only taken when `expr` is false-ish. */ + inheritNonnullIfNot(expr: ExpressionRef): void { + switch (getExpressionId(expr)) { + case ExpressionId.Unary: { + switch (getUnaryOp(expr)) { + case UnaryOp.EqzI32: { + this.inheritNonnullIf(getUnaryValue(expr)); // !expr + break; + } + case UnaryOp.EqzI64: { + this.inheritNonnullIf(getUnaryValue(expr)); // !expr + break; + } + } + break; + } + case ExpressionId.If: { + let ifTrue = getIfTrue(expr); + if (getExpressionId(ifTrue) == ExpressionId.Const && getExpressionType(ifTrue) == NativeType.I32 && getConstValueI32(ifTrue) != 0) { + let ifFalse = getIfFalse(expr); + if (!ifFalse) break; + // Logical OR: (if (condition 1 ifFalse)) + // the only way this can become false is if condition and ifFalse are false + this.inheritNonnullIfNot(getIfCondition(expr)); + this.inheritNonnullIfNot(getIfFalse(expr)); + } + break; + } + case ExpressionId.Binary: { + switch (getBinaryOp(expr)) { + case BinaryOp.EqI32: { + let left = getBinaryLeft(expr); + let right = getBinaryRight(expr); + if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) == 0) { + this.inheritNonnullIf(right); // FALSE == right + } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) == 0) { + this.inheritNonnullIf(left); // left == FALSE + } + break; + } + case BinaryOp.EqI64: { + let left = getBinaryLeft(expr); + let right = getBinaryRight(expr); + if (getExpressionId(left) == ExpressionId.Const && getConstValueI64Low(left) == 0 && getConstValueI64High(left) == 0) { + this.inheritNonnullIf(right); // FALSE == right + } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI64Low(right) == 0 && getConstValueI64High(right) == 0) { + this.inheritNonnullIf(left); // left == FALSE + } + break; + } + case BinaryOp.NeI32: { + let left = getBinaryLeft(expr); + let right = getBinaryRight(expr); + if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) != 0) { + this.inheritNonnullIf(right); // TRUE != right + } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) != 0) { + this.inheritNonnullIf(left); // left != TRUE + } + break; + } + case BinaryOp.NeI64: { + let left = getBinaryLeft(expr); + let right = getBinaryRight(expr); + if (getExpressionId(left) == ExpressionId.Const && (getConstValueI64Low(left) != 0 || getConstValueI64High(left) != 0)) { + this.inheritNonnullIf(right); // TRUE != right + } else if (getExpressionId(right) == ExpressionId.Const && (getConstValueI64Low(right) != 0 || getConstValueI64High(right) != 0)) { + this.inheritNonnullIf(left); // left != TRUE + } + break; + } + } + break; + } + } + } + /** * Tests if an expression can possibly overflow in the context of this flow. Assumes that the * expression might already have overflown and returns `false` only if the operation neglects diff --git a/src/types.ts b/src/types.ts index 35551e1d0b..2276f22aa0 100644 --- a/src/types.ts +++ b/src/types.ts @@ -219,9 +219,7 @@ export class Type { var targetFunction: Signature | null; if (this.is(TypeFlags.REFERENCE)) { if (target.is(TypeFlags.REFERENCE)) { - // FIXME: turned out resolveType didn't handle nullability properly, and fixing it there - // leads to this check failing all over the place due to not yet implemented null states. - // if (!this.is(TypeFlags.NULLABLE) || target.is(TypeFlags.NULLABLE)) { + if (!this.is(TypeFlags.NULLABLE) || target.is(TypeFlags.NULLABLE)) { if (currentClass = this.classReference) { if (targetClass = target.classReference) { return currentClass.isAssignableTo(targetClass); @@ -231,7 +229,7 @@ export class Type { return currentFunction.isAssignableTo(targetFunction); } } - // } + } } } else if (!target.is(TypeFlags.REFERENCE)) { if (this.is(TypeFlags.INTEGER)) { diff --git a/std/assembly/string.ts b/std/assembly/string.ts index 653e34713b..98c8898a97 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -102,12 +102,12 @@ import { ArrayBufferView } from "./arraybuffer"; } @operator.prefix("!") - private static __not(str: String): bool { + private static __not(str: String | null): bool { return str === null || !str.length; } @operator("!=") - private static __ne(left: String, right: String): bool { + private static __ne(left: String | null, right: String | null): bool { return !this.__eq(left, right); } @@ -391,7 +391,7 @@ import { ArrayBufferView } from "./arraybuffer"; } var result = NEWARRAY(0); var end = 0, start = 0, i = 0; - while ((end = this.indexOf(separator!, start)) != -1) { + while ((end = this.indexOf(separator, start)) != -1) { let len = end - start; if (len > 0) { let out = allocate(len << 1); diff --git a/tests/compiler/binary.optimized.wat b/tests/compiler/binary.optimized.wat index cc70e25a7e..89a908dd27 100644 --- a/tests/compiler/binary.optimized.wat +++ b/tests/compiler/binary.optimized.wat @@ -15,55 +15,42 @@ (local $2 i64) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 i64.reinterpret_f64 local.tee $2 i32.wrap_i64 - local.set $3 - block (result i32) - block (result i32) - block (result i32) - local.get $2 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.tee $4 - i32.const 2147483647 - i32.and - local.tee $5 - i32.const 2146435072 - i32.gt_s - local.tee $1 - i32.eqz - if - local.get $5 - i32.const 2146435072 - i32.eq - local.tee $1 - if - local.get $3 - i32.const 0 - i32.ne - local.set $1 - end - end - local.get $1 - i32.eqz - end - if - i32.const 0 - local.set $1 - end - local.get $1 - i32.eqz - end - if - i32.const 0 - local.set $1 - end + local.set $1 + i32.const 1 + i32.const 0 + local.get $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $3 + i32.const 2147483647 + i32.and + local.tee $4 + i32.const 2146435072 + i32.gt_s + if (result i32) + i32.const 1 + else local.get $1 + i32.const 0 + i32.ne + i32.const 0 + local.get $4 + i32.const 2146435072 + i32.eq + select end + select + if (result i32) + i32.const 1 + else + i32.const 0 + end + local.tee $1 if local.get $0 f64.const 1 @@ -79,25 +66,23 @@ (local $4 i32) local.get $0 i32.reinterpret_f32 - local.tee $3 + local.tee $2 i32.const -2147483648 i32.and local.set $4 - local.get $3 + local.get $2 i32.const 23 i32.shr_u i32.const 255 i32.and - local.tee $2 + local.tee $3 i32.const 255 i32.eq - local.tee $1 - i32.eqz - if + if (result i32) + i32.const 1 + else i32.const 0 - local.set $1 end - local.get $1 if local.get $0 local.get $0 @@ -105,7 +90,7 @@ return end block $folding-inner0 - local.get $3 + local.get $2 i32.const 1 i32.shl local.tee $1 @@ -119,29 +104,29 @@ local.get $0 return end - local.get $2 + local.get $3 if (result i32) - local.get $3 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $3 - i32.const 1 local.get $2 + i32.const 1 local.get $3 + local.get $2 i32.const 9 i32.shl i32.clz i32.sub - local.tee $2 + local.tee $3 i32.sub i32.shl end local.set $1 loop $continue|0 - local.get $2 + local.get $3 i32.const 127 i32.gt_s if @@ -162,10 +147,10 @@ i32.const 1 i32.shl local.set $1 - local.get $2 + local.get $3 i32.const 1 i32.sub - local.set $2 + local.set $3 br $continue|0 end end @@ -187,27 +172,27 @@ i32.const 8 i32.shl i32.clz - local.tee $3 + local.tee $1 i32.shl - local.set $1 - local.get $2 + local.set $2 local.get $3 + local.get $1 i32.sub - local.tee $2 + local.tee $1 i32.const 0 i32.gt_s if (result i32) - local.get $1 + local.get $2 i32.const 8388608 i32.sub - local.get $2 + local.get $1 i32.const 23 i32.shl i32.or else - local.get $1 - i32.const 1 local.get $2 + i32.const 1 + local.get $1 i32.sub i32.shr_u end @@ -220,60 +205,30 @@ local.get $0 f32.mul ) - (func $~lib/math/NativeMathf.pow (; 2 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) - (local $1 i32) - (local $2 i32) - block (result i32) - local.get $0 - i32.reinterpret_f32 - local.tee $2 - i32.const 2147483647 - i32.and - i32.const 2139095040 - i32.gt_s - local.tee $1 - i32.eqz - if - i32.const 0 - local.set $1 - end - local.get $1 - end - if - local.get $0 - f32.const 1 - f32.add - return - end - local.get $0 - ) - (func $~lib/math/NativeMath.mod (; 3 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 2 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 i64) - (local $4 i32) - (local $5 i64) + (local $4 i64) local.get $0 i64.reinterpret_f64 - local.tee $1 + local.tee $2 i64.const 63 i64.shr_u - local.set $5 - local.get $1 + local.set $4 + local.get $2 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.tee $2 + local.tee $3 i64.const 2047 i64.eq - local.tee $4 - i32.eqz - if + if (result i32) + i32.const 1 + else i32.const 0 - local.set $4 end - local.get $4 if local.get $0 local.get $0 @@ -281,38 +236,38 @@ return end block $folding-inner0 - local.get $1 + local.get $2 i64.const 1 i64.shl - local.tee $3 + local.tee $1 i64.const 9214364837600034816 i64.le_u if - local.get $3 + local.get $1 i64.const 9214364837600034816 i64.eq br_if $folding-inner0 local.get $0 return end - local.get $2 + local.get $3 i64.eqz if (result i64) - local.get $1 + local.get $2 i64.const 0 + local.get $3 local.get $2 - local.get $1 i64.const 12 i64.shl i64.clz i64.sub - local.tee $2 + local.tee $3 i64.sub i64.const 1 i64.add i64.shl else - local.get $1 + local.get $2 i64.const 4503599627370495 i64.and i64.const 4503599627370496 @@ -320,7 +275,7 @@ end local.set $1 loop $continue|0 - local.get $2 + local.get $3 i64.const 1023 i64.gt_s if @@ -341,10 +296,10 @@ i64.const 1 i64.shl local.set $1 - local.get $2 + local.get $3 i64.const 1 i64.sub - local.set $2 + local.set $3 br $continue|0 end end @@ -366,33 +321,33 @@ i64.const 11 i64.shl i64.clz - local.tee $3 + local.tee $1 i64.shl - local.set $1 - local.get $2 + local.set $2 local.get $3 + local.get $1 i64.sub - local.tee $2 + local.tee $1 i64.const 0 i64.gt_s if (result i64) - local.get $1 + local.get $2 i64.const 4503599627370496 i64.sub - local.get $2 + local.get $1 i64.const 52 i64.shl i64.or else - local.get $1 - i64.const 0 local.get $2 + i64.const 0 + local.get $1 i64.sub i64.const 1 i64.add i64.shr_u end - local.get $5 + local.get $4 i64.const 63 i64.shl i64.or @@ -403,10 +358,10 @@ local.get $0 f64.mul ) - (func $start:binary (; 4 ;) (type $FUNCSIG$v) + (func $start:binary (; 3 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i64) - (local $2 f32) + (local $1 f32) + (local $2 i64) (local $3 f64) (local $4 i32) global.get $binary/i @@ -520,39 +475,39 @@ i32.xor global.set $binary/i global.get $binary/I - local.tee $1 + local.tee $2 i64.const 1 i64.rem_s drop - local.get $1 + local.get $2 f64.convert_i64_s call $~lib/math/NativeMath.pow drop global.get $binary/I - local.tee $1 + local.tee $2 i64.const 1 i64.lt_s global.set $binary/b - local.get $1 + local.get $2 i64.const 1 i64.gt_s global.set $binary/b - local.get $1 + local.get $2 i64.const 1 i64.le_s global.set $binary/b - local.get $1 + local.get $2 i64.const 1 i64.ge_s global.set $binary/b - local.get $1 + local.get $2 i64.const 1 i64.eq local.tee $0 global.set $binary/b local.get $0 global.set $binary/b - local.get $1 + local.get $2 i64.const 1 i64.add global.set $binary/I @@ -632,34 +587,43 @@ global.get $binary/f call $~lib/math/NativeMathf.mod drop + block $__inlined_func$~lib/math/NativeMathf.pow + i32.const 1 + i32.const 0 + global.get $binary/f + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + i32.const 2139095040 + i32.gt_s + select + br_if $__inlined_func$~lib/math/NativeMathf.pow + end global.get $binary/f - call $~lib/math/NativeMathf.pow - drop - global.get $binary/f - local.tee $2 + local.tee $1 f32.const 1 f32.lt global.set $binary/b - local.get $2 + local.get $1 f32.const 1 f32.gt global.set $binary/b - local.get $2 + local.get $1 f32.const 1 f32.le global.set $binary/b - local.get $2 + local.get $1 f32.const 1 f32.ge global.set $binary/b - local.get $2 + local.get $1 f32.const 1 f32.eq local.tee $0 global.set $binary/b local.get $0 global.set $binary/b - local.get $2 + local.get $1 f32.const 1 f32.add global.set $binary/f @@ -670,8 +634,23 @@ global.get $binary/f call $~lib/math/NativeMathf.mod global.set $binary/f + i32.const 1 + i32.const 0 global.get $binary/f - call $~lib/math/NativeMathf.pow + local.tee $1 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + i32.const 2139095040 + i32.gt_s + select + if + local.get $1 + f32.const 1 + f32.add + local.set $1 + end + local.get $1 global.set $binary/f global.get $binary/f f32.const 1 @@ -684,8 +663,23 @@ global.get $binary/f call $~lib/math/NativeMathf.mod global.set $binary/f + i32.const 1 + i32.const 0 global.get $binary/f - call $~lib/math/NativeMathf.pow + local.tee $1 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + i32.const 2139095040 + i32.gt_s + select + if + local.get $1 + f32.const 1 + f32.add + local.set $1 + end + local.get $1 global.set $binary/f global.get $binary/F call $~lib/math/NativeMath.mod @@ -746,10 +740,10 @@ call $~lib/math/NativeMath.pow global.set $binary/F ) - (func $start (; 5 ;) (type $FUNCSIG$v) + (func $start (; 4 ;) (type $FUNCSIG$v) call $start:binary ) - (func $null (; 6 ;) (type $FUNCSIG$v) + (func $null (; 5 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/binary.untouched.wat b/tests/compiler/binary.untouched.wat index effa386c0f..899c60703c 100644 --- a/tests/compiler/binary.untouched.wat +++ b/tests/compiler/binary.untouched.wat @@ -190,44 +190,39 @@ local.get $7 i32.const 2146435072 i32.gt_s - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $7 i32.const 2146435072 i32.eq - local.tee $9 if (result i32) local.get $4 i32.const 0 i32.ne else - local.get $9 + i32.const 0 end end - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $8 i32.const 2146435072 i32.gt_s end - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $8 i32.const 2146435072 i32.eq - local.tee $9 if (result i32) local.get $6 i32.const 0 i32.ne else - local.get $9 + i32.const 0 end end if @@ -237,7 +232,7 @@ return end i32.const 0 - local.set $10 + local.set $9 local.get $3 i32.const 0 i32.lt_s @@ -247,7 +242,7 @@ i32.ge_s if i32.const 2 - local.set $10 + local.set $9 else local.get $8 i32.const 1072693248 @@ -258,21 +253,21 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 - local.get $11 + local.set $10 + local.get $10 i32.const 20 i32.gt_s - local.set $9 + local.set $11 i32.const 52 i32.const 20 - local.get $9 - select local.get $11 + select + local.get $10 i32.sub local.set $12 local.get $6 local.get $8 - local.get $9 + local.get $11 select local.set $13 local.get $13 @@ -290,7 +285,7 @@ i32.const 1 i32.and i32.sub - local.set $10 + local.set $9 end end end @@ -393,17 +388,15 @@ local.get $7 i32.const 0 i32.eq - local.tee $14 if (result i32) - local.get $14 + i32.const 1 else local.get $7 i32.const 2146435072 i32.eq end - local.tee $14 if (result i32) - local.get $14 + i32.const 1 else local.get $7 i32.const 1072693248 @@ -428,7 +421,7 @@ local.get $7 i32.const 1072693248 i32.sub - local.get $10 + local.get $9 i32.or i32.const 0 i32.eq @@ -442,7 +435,7 @@ f64.div local.set $16 else - local.get $10 + local.get $9 i32.const 1 i32.eq if @@ -462,7 +455,7 @@ i32.const 0 i32.lt_s if - local.get $10 + local.get $9 i32.const 0 i32.eq if @@ -475,7 +468,7 @@ f64.div return end - local.get $10 + local.get $9 i32.const 1 i32.eq if @@ -661,17 +654,17 @@ i32.le_s if i32.const 0 - local.set $11 + local.set $10 else local.get $28 i32.const 767610 i32.lt_s if i32.const 1 - local.set $11 + local.set $10 else i32.const 0 - local.set $11 + local.set $10 local.get $29 i32.const 1 i32.add @@ -695,7 +688,7 @@ local.set $15 f64.const 1.5 f64.const 1 - local.get $11 + local.get $10 select local.set $35 local.get $15 @@ -727,7 +720,7 @@ i32.or i32.const 524288 i32.add - local.get $11 + local.get $10 i32.const 18 i32.shl i32.add @@ -850,7 +843,7 @@ local.set $36 f64.const 1.350039202129749e-08 f64.const 0 - local.get $11 + local.get $10 select local.set $37 f64.const -7.028461650952758e-09 @@ -868,7 +861,7 @@ local.set $24 f64.const 0.5849624872207642 f64.const 0 - local.get $11 + local.get $10 select local.set $39 local.get $36 @@ -1013,7 +1006,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 + local.set $10 i32.const 0 local.set $29 local.get $41 @@ -1022,7 +1015,7 @@ if local.get $28 i32.const 1048576 - local.get $11 + local.get $10 i32.const 1 i32.add i32.shr_s @@ -1035,12 +1028,12 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 + local.set $10 f64.const 0 local.set $24 local.get $29 i32.const 1048575 - local.get $11 + local.get $10 i32.shr_s i32.const -1 i32.xor @@ -1056,7 +1049,7 @@ i32.const 1048576 i32.or i32.const 20 - local.get $11 + local.get $10 i32.sub i32.shr_s local.set $29 @@ -1207,10 +1200,9 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 f32) + (local $8 f32) + (local $9 i32) (local $10 i32) - (local $11 i32) local.get $0 i32.reinterpret_f32 local.set $2 @@ -1240,17 +1232,15 @@ local.get $7 i32.const 0 i32.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i32.const 255 i32.eq end - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $1 call $~lib/builtins/isNaN @@ -1259,21 +1249,21 @@ local.get $0 local.get $1 f32.mul - local.set $9 - local.get $9 - local.get $9 + local.set $8 + local.get $8 + local.get $8 f32.div return end local.get $2 i32.const 1 i32.shl - local.set $10 - local.get $10 + local.set $9 + local.get $9 local.get $7 i32.le_u if - local.get $10 + local.get $9 local.get $7 i32.eq if @@ -1409,13 +1399,13 @@ i32.const 8 i32.shl i32.clz - local.set $11 + local.set $10 local.get $4 - local.get $11 + local.get $10 i32.sub local.set $4 local.get $2 - local.get $11 + local.get $10 i32.shl local.set $2 local.get $4 @@ -1601,9 +1591,8 @@ local.get $4 i32.const 2139095040 i32.gt_s - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $5 i32.const 2139095040 @@ -1616,7 +1605,7 @@ return end i32.const 0 - local.set $7 + local.set $6 local.get $2 i32.const 0 i32.lt_s @@ -1626,7 +1615,7 @@ i32.ge_s if i32.const 2 - local.set $7 + local.set $6 else local.get $5 i32.const 1065353216 @@ -1637,27 +1626,27 @@ i32.shr_s i32.const 127 i32.sub - local.set $9 + local.set $8 i32.const 23 - local.get $9 + local.get $8 i32.sub - local.set $6 + local.set $9 local.get $5 - local.get $6 + local.get $9 i32.shr_s - local.set $8 - local.get $8 - local.get $6 + local.set $7 + local.get $7 + local.get $9 i32.shl local.get $5 i32.eq if i32.const 2 - local.get $8 + local.get $7 i32.const 1 i32.and i32.sub - local.set $7 + local.set $6 end end end @@ -1747,17 +1736,15 @@ local.get $4 i32.const 2139095040 i32.eq - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $4 i32.const 0 i32.eq end - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $4 i32.const 1065353216 @@ -1782,7 +1769,7 @@ local.get $4 i32.const 1065353216 i32.sub - local.get $7 + local.get $6 i32.or i32.const 0 i32.eq @@ -1796,7 +1783,7 @@ f32.div local.set $11 else - local.get $7 + local.get $6 i32.const 1 i32.eq if @@ -1815,7 +1802,7 @@ i32.const 0 i32.lt_s if - local.get $7 + local.get $6 i32.const 0 i32.eq if @@ -1828,7 +1815,7 @@ f32.div return end - local.get $7 + local.get $6 i32.const 1 i32.eq if @@ -1962,27 +1949,27 @@ local.get $4 i32.const 8388607 i32.and - local.set $8 - local.get $8 + local.set $7 + local.get $7 i32.const 1065353216 i32.or local.set $4 - local.get $8 + local.get $7 i32.const 1885297 i32.le_s if i32.const 0 - local.set $9 + local.set $8 else - local.get $8 + local.get $7 i32.const 6140887 i32.lt_s if i32.const 1 - local.set $9 + local.set $8 else i32.const 0 - local.set $9 + local.set $8 local.get $24 i32.const 1 i32.add @@ -1998,7 +1985,7 @@ local.set $10 f32.const 1.5 f32.const 1 - local.get $9 + local.get $8 select local.set $30 local.get $10 @@ -2036,7 +2023,7 @@ local.get $25 i32.const 4194304 i32.add - local.get $9 + local.get $8 i32.const 21 i32.shl i32.add @@ -2160,7 +2147,7 @@ local.set $31 f32.const 1.5632208487659227e-06 f32.const 0 - local.get $9 + local.get $8 select local.set $32 f32.const -1.1736857413779944e-04 @@ -2178,7 +2165,7 @@ local.set $18 f32.const 0.5849609375 f32.const 0 - local.get $9 + local.get $8 select local.set $34 local.get $31 @@ -2236,8 +2223,8 @@ local.set $11 local.get $11 i32.reinterpret_f32 - local.set $8 - local.get $8 + local.set $7 + local.get $7 i32.const 1124073472 i32.gt_s if @@ -2248,7 +2235,7 @@ f32.mul return else - local.get $8 + local.get $7 i32.const 1124073472 i32.eq if @@ -2268,7 +2255,7 @@ return end else - local.get $8 + local.get $7 i32.const 2147483647 i32.and i32.const 1125515264 @@ -2281,7 +2268,7 @@ f32.mul return else - local.get $8 + local.get $7 i32.const -1021968384 i32.eq if @@ -2302,7 +2289,7 @@ end end end - local.get $8 + local.get $7 i32.const 2147483647 i32.and local.set $36 @@ -2311,16 +2298,16 @@ i32.shr_s i32.const 127 i32.sub - local.set $9 + local.set $8 i32.const 0 local.set $24 local.get $36 i32.const 1056964608 i32.gt_s if - local.get $8 + local.get $7 i32.const 8388608 - local.get $9 + local.get $8 i32.const 1 i32.add i32.shr_s @@ -2333,10 +2320,10 @@ i32.shr_s i32.const 127 i32.sub - local.set $9 + local.set $8 local.get $24 i32.const 8388607 - local.get $9 + local.get $8 i32.shr_s i32.const -1 i32.xor @@ -2349,11 +2336,11 @@ i32.const 8388608 i32.or i32.const 23 - local.get $9 + local.get $8 i32.sub i32.shr_s local.set $24 - local.get $8 + local.get $7 i32.const 0 i32.lt_s if @@ -2453,14 +2440,14 @@ local.set $11 local.get $11 i32.reinterpret_f32 - local.set $8 - local.get $8 + local.set $7 + local.get $7 local.get $24 i32.const 23 i32.shl i32.add - local.set $8 - local.get $8 + local.set $7 + local.get $7 i32.const 23 i32.shr_s i32.const 0 @@ -2471,7 +2458,7 @@ call $~lib/math/NativeMathf.scalbn local.set $11 else - local.get $8 + local.get $7 f32.reinterpret_i32 local.set $11 end @@ -2491,10 +2478,9 @@ (local $5 i64) (local $6 i64) (local $7 i64) - (local $8 i32) - (local $9 f64) + (local $8 f64) + (local $9 i64) (local $10 i64) - (local $11 i64) local.get $0 i64.reinterpret_f64 local.set $2 @@ -2524,17 +2510,15 @@ local.get $7 i64.const 0 i64.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i64.const 2047 i64.eq end - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $1 call $~lib/builtins/isNaN @@ -2543,21 +2527,21 @@ local.get $0 local.get $1 f64.mul - local.set $9 - local.get $9 - local.get $9 + local.set $8 + local.get $8 + local.get $8 f64.div return end local.get $2 i64.const 1 i64.shl - local.set $10 - local.get $10 + local.set $9 + local.get $9 local.get $7 i64.le_u if - local.get $10 + local.get $9 local.get $7 i64.eq if @@ -2693,13 +2677,13 @@ i64.const 11 i64.shl i64.clz - local.set $11 + local.set $10 local.get $4 - local.get $11 + local.get $10 i64.sub local.set $4 local.get $2 - local.get $11 + local.get $10 i64.shl local.set $2 local.get $4 diff --git a/tests/compiler/gc/itcm/trace.optimized.wat b/tests/compiler/gc/itcm/trace.optimized.wat index 49923f7244..e8fcbdcd8f 100644 --- a/tests/compiler/gc/itcm/trace.optimized.wat +++ b/tests/compiler/gc/itcm/trace.optimized.wat @@ -657,7 +657,6 @@ i32.store offset=8 ) (func $~lib/collector/itcm/__ref_link (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) i32.const 648 i32.const 2 local.get $0 @@ -674,12 +673,11 @@ local.get $1 i32.const 16 i32.sub - local.tee $2 + local.tee $1 i32.load offset=8 i32.const 3 i32.and i32.eq - local.tee $1 if (result i32) global.get $~lib/collector/itcm/white local.get $0 @@ -690,10 +688,10 @@ i32.and i32.eq else - local.get $1 + i32.const 0 end if - local.get $2 + local.get $1 call $~lib/collector/itcm/ManagedObject#makeGray end ) diff --git a/tests/compiler/gc/itcm/trace.untouched.wat b/tests/compiler/gc/itcm/trace.untouched.wat index 992f483bbf..c5753e0ded 100644 --- a/tests/compiler/gc/itcm/trace.untouched.wat +++ b/tests/compiler/gc/itcm/trace.untouched.wat @@ -839,7 +839,6 @@ global.get $~lib/collector/itcm/white i32.eqz i32.eq - local.tee $2 if (result i32) block $~lib/collector/itcm/refToObj|inlined.3 (result i32) local.get $0 @@ -852,7 +851,7 @@ global.get $~lib/collector/itcm/white i32.eq else - local.get $2 + i32.const 0 end if local.get $3 diff --git a/tests/compiler/logical.untouched.wat b/tests/compiler/logical.untouched.wat index 9e67493c0f..0433ecb625 100644 --- a/tests/compiler/logical.untouched.wat +++ b/tests/compiler/logical.untouched.wat @@ -13,8 +13,6 @@ (export "memory" (memory $0)) (start $start) (func $start:logical (; 1 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 f64) i32.const 0 if (result i32) unreachable @@ -25,10 +23,12 @@ f64.const 0 f64.const 0 f64.ne - if (result f64) + if (result i32) unreachable - else f64.const 0 + unreachable + else + i32.const 0 end drop i32.const 1 @@ -41,10 +41,12 @@ f64.const 1 f64.const 0 f64.ne - if (result f64) - f64.const 1 + if (result i32) + i32.const 1 else unreachable + f64.const 0 + unreachable end drop i32.const 1 @@ -53,9 +55,8 @@ else i32.const 1 end - local.tee $0 if (result i32) - local.get $0 + i32.const 1 else unreachable end @@ -68,13 +69,14 @@ else f64.const 1 end - local.tee $1 f64.const 0 f64.ne - if (result f64) - local.get $1 + if (result i32) + i32.const 1 else unreachable + f64.const 0 + unreachable end drop i32.const 1 diff --git a/tests/compiler/mandelbrot.optimized.wat b/tests/compiler/mandelbrot.optimized.wat index 9288c5353c..4e919e73f2 100644 --- a/tests/compiler/mandelbrot.optimized.wat +++ b/tests/compiler/mandelbrot.optimized.wat @@ -7,32 +7,29 @@ (export "computeLine" (func $../../examples/mandelbrot/assembly/index/computeLine)) (func $~lib/math/NativeMath.log (; 0 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 f64) (local $4 f64) - (local $5 f64) - (local $6 i32) - (local $7 f64) + (local $5 i32) + (local $6 f64) local.get $0 i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $1 i32.const 1048576 i32.lt_u - local.tee $1 - i32.eqz - if - local.get $2 + if (result i32) + i32.const 1 + else + local.get $1 i32.const 31 i32.shr_u - local.set $1 end - local.get $1 if - local.get $3 + local.get $2 i64.const 1 i64.shl i64.const 0 @@ -45,7 +42,7 @@ f64.div return end - local.get $2 + local.get $1 i32.const 31 i32.shr_u if @@ -57,18 +54,18 @@ return end i32.const -54 - local.set $6 + local.set $5 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 + local.set $1 else - local.get $2 + local.get $1 i32.const 2146435072 i32.ge_u if @@ -76,28 +73,25 @@ return else local.get $2 + i64.const 32 + i64.shl + i64.const 0 + i64.eq + i32.const 0 + local.get $1 i32.const 1072693248 i32.eq - local.tee $1 - if - local.get $3 - i64.const 32 - i64.shl - i64.const 0 - i64.eq - local.set $1 - end - local.get $1 + select if f64.const 0 return end end end - local.get $3 + local.get $2 i64.const 4294967295 i64.and - local.get $2 + local.get $1 i32.const 614242 i32.add local.tee $1 @@ -112,26 +106,26 @@ f64.reinterpret_i64 f64.const 1 f64.sub - local.tee $4 + local.tee $3 f64.const 2 - local.get $4 + local.get $3 f64.add f64.div - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 f64.mul - local.tee $7 - local.get $7 + local.tee $6 + local.get $6 f64.mul local.set $0 - local.get $5 - f64.const 0.5 local.get $4 + f64.const 0.5 + local.get $3 f64.mul - local.get $4 + local.get $3 f64.mul - local.tee $5 - local.get $7 + local.tee $4 + local.get $6 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -165,16 +159,16 @@ i32.shr_s i32.const 1023 i32.sub - local.get $6 + local.get $5 i32.add f64.convert_i32_s local.tee $0 f64.const 1.9082149292705877e-10 f64.mul f64.add - local.get $5 - f64.sub local.get $4 + f64.sub + local.get $3 f64.add local.get $0 f64.const 0.6931471803691238 @@ -184,32 +178,29 @@ (func $~lib/math/NativeMath.log2 (; 1 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 f64) (local $5 f64) - (local $6 f64) - (local $7 i32) - (local $8 f64) + (local $6 i32) + (local $7 f64) local.get $0 i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $2 i32.const 1048576 i32.lt_u - local.tee $2 - i32.eqz - if - local.get $3 + if (result i32) + i32.const 1 + else + local.get $2 i32.const 31 i32.shr_u - local.set $2 end - local.get $2 if - local.get $4 + local.get $3 i64.const 1 i64.shl i64.const 0 @@ -222,7 +213,7 @@ f64.div return end - local.get $3 + local.get $2 i32.const 31 i32.shr_u if @@ -234,18 +225,18 @@ return end i32.const -54 - local.set $7 + local.set $6 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $3 + local.set $2 else - local.get $3 + local.get $2 i32.const 2146435072 i32.ge_u if @@ -253,28 +244,25 @@ return else local.get $3 + i64.const 32 + i64.shl + i64.const 0 + i64.eq + i32.const 0 + local.get $2 i32.const 1072693248 i32.eq - local.tee $2 - if - local.get $4 - i64.const 32 - i64.shl - i64.const 0 - i64.eq - local.set $2 - end - local.get $2 + select if f64.const 0 return end end end - local.get $4 + local.get $3 i64.const 4294967295 i64.and - local.get $3 + local.get $2 i32.const 614242 i32.add local.tee $2 @@ -294,12 +282,12 @@ local.get $1 f64.add f64.div + local.tee $4 + local.get $4 + f64.mul local.tee $5 local.get $5 f64.mul - local.tee $6 - local.get $6 - f64.mul local.set $0 local.get $1 local.get $1 @@ -314,13 +302,13 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $8 + local.tee $7 f64.sub local.get $1 f64.sub - local.get $5 + local.get $4 local.get $1 - local.get $6 + local.get $5 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -356,18 +344,18 @@ i32.shr_u i32.const 1023 i32.sub - local.get $7 + local.get $6 i32.add f64.convert_i32_s - local.tee $5 - local.get $8 + local.tee $4 + local.get $7 f64.const 1.4426950407214463 f64.mul - local.tee $6 + local.tee $5 f64.add local.set $1 local.get $0 - local.get $8 + local.get $7 f64.add f64.const 1.6751713164886512e-10 f64.mul @@ -375,10 +363,10 @@ f64.const 1.4426950407214463 f64.mul f64.add - local.get $5 + local.get $4 local.get $1 f64.sub - local.get $6 + local.get $5 f64.add f64.add local.get $1 diff --git a/tests/compiler/mandelbrot.untouched.wat b/tests/compiler/mandelbrot.untouched.wat index d9af864b83..39c67f7a27 100644 --- a/tests/compiler/mandelbrot.untouched.wat +++ b/tests/compiler/mandelbrot.untouched.wat @@ -13,7 +13,7 @@ (local $1 i64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) @@ -21,8 +21,7 @@ (local $9 f64) (local $10 f64) (local $11 f64) - (local $12 f64) - (local $13 i32) + (local $12 i32) local.get $0 i64.reinterpret_f64 local.set $1 @@ -36,9 +35,8 @@ local.get $2 i32.const 1048576 i32.lt_u - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 i32.const 31 @@ -96,7 +94,6 @@ local.get $2 i32.const 1072693248 i32.eq - local.tee $4 if (result i32) local.get $1 i64.const 32 @@ -104,7 +101,7 @@ i64.const 0 i64.eq else - local.get $4 + i32.const 0 end if f64.const 0 @@ -147,46 +144,46 @@ local.get $0 f64.const 1 f64.sub - local.set $5 + local.set $4 f64.const 0.5 - local.get $5 + local.get $4 f64.mul - local.get $5 + local.get $4 f64.mul - local.set $6 - local.get $5 + local.set $5 + local.get $4 f64.const 2 - local.get $5 + local.get $4 f64.add f64.div + local.set $6 + local.get $6 + local.get $6 + f64.mul local.set $7 local.get $7 local.get $7 f64.mul local.set $8 local.get $8 - local.get $8 - f64.mul - local.set $9 - local.get $9 f64.const 0.3999999999940942 - local.get $9 + local.get $8 f64.const 0.22222198432149784 - local.get $9 + local.get $8 f64.const 0.15313837699209373 f64.mul f64.add f64.mul f64.add f64.mul - local.set $10 - local.get $8 + local.set $9 + local.get $7 f64.const 0.6666666666666735 - local.get $9 + local.get $8 f64.const 0.2857142874366239 - local.get $9 + local.get $8 f64.const 0.1818357216161805 - local.get $9 + local.get $8 f64.const 0.14798198605116586 f64.mul f64.add @@ -195,28 +192,28 @@ f64.mul f64.add f64.mul - local.set $11 - local.get $11 + local.set $10 local.get $10 + local.get $9 f64.add - local.set $12 + local.set $11 local.get $3 - local.set $13 - local.get $7 + local.set $12 local.get $6 - local.get $12 + local.get $5 + local.get $11 f64.add f64.mul - local.get $13 + local.get $12 f64.convert_i32_s f64.const 1.9082149292705877e-10 f64.mul f64.add - local.get $6 - f64.sub local.get $5 + f64.sub + local.get $4 f64.add - local.get $13 + local.get $12 f64.convert_i32_s f64.const 0.6931471803691238 f64.mul @@ -226,7 +223,7 @@ (local $1 i64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) @@ -239,7 +236,6 @@ (local $14 f64) (local $15 f64) (local $16 f64) - (local $17 f64) local.get $0 i64.reinterpret_f64 local.set $1 @@ -253,9 +249,8 @@ local.get $2 i32.const 1048576 i32.lt_u - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 i32.const 31 @@ -313,7 +308,6 @@ local.get $2 i32.const 1072693248 i32.eq - local.tee $4 if (result i32) local.get $1 i64.const 32 @@ -321,7 +315,7 @@ i64.const 0 i64.eq else - local.get $4 + i32.const 0 end if f64.const 0 @@ -364,46 +358,46 @@ local.get $0 f64.const 1 f64.sub - local.set $5 + local.set $4 f64.const 0.5 - local.get $5 + local.get $4 f64.mul - local.get $5 + local.get $4 f64.mul - local.set $6 - local.get $5 + local.set $5 + local.get $4 f64.const 2 - local.get $5 + local.get $4 f64.add f64.div + local.set $6 + local.get $6 + local.get $6 + f64.mul local.set $7 local.get $7 local.get $7 f64.mul local.set $8 local.get $8 - local.get $8 - f64.mul - local.set $9 - local.get $9 f64.const 0.3999999999940942 - local.get $9 + local.get $8 f64.const 0.22222198432149784 - local.get $9 + local.get $8 f64.const 0.15313837699209373 f64.mul f64.add f64.mul f64.add f64.mul - local.set $10 - local.get $8 + local.set $9 + local.get $7 f64.const 0.6666666666666735 - local.get $9 + local.get $8 f64.const 0.2857142874366239 - local.get $9 + local.get $8 f64.const 0.1818357216161805 - local.get $9 + local.get $8 f64.const 0.14798198605116586 f64.mul f64.add @@ -412,16 +406,16 @@ f64.mul f64.add f64.mul - local.set $11 - local.get $11 + local.set $10 local.get $10 + local.get $9 f64.add - local.set $12 + local.set $11 + local.get $4 local.get $5 - local.get $6 f64.sub - local.set $13 - local.get $13 + local.set $12 + local.get $12 i64.reinterpret_f64 local.set $1 local.get $1 @@ -430,52 +424,52 @@ local.set $1 local.get $1 f64.reinterpret_i64 - local.set $13 - local.get $5 - local.get $13 + local.set $12 + local.get $4 + local.get $12 f64.sub - local.get $6 + local.get $5 f64.sub - local.get $7 local.get $6 - local.get $12 + local.get $5 + local.get $11 f64.add f64.mul f64.add - local.set $14 - local.get $13 + local.set $13 + local.get $12 f64.const 1.4426950407214463 f64.mul - local.set $15 - local.get $14 + local.set $14 local.get $13 + local.get $12 f64.add f64.const 1.6751713164886512e-10 f64.mul - local.get $14 + local.get $13 f64.const 1.4426950407214463 f64.mul f64.add - local.set $16 + local.set $15 local.get $3 f64.convert_i32_s - local.set $17 - local.get $17 - local.get $15 + local.set $16 + local.get $16 + local.get $14 f64.add - local.set $9 + local.set $8 + local.get $15 local.get $16 - local.get $17 - local.get $9 + local.get $8 f64.sub - local.get $15 + local.get $14 f64.add f64.add - local.set $16 - local.get $9 local.set $15 - local.get $16 + local.get $8 + local.set $14 local.get $15 + local.get $14 f64.add ) (func $../../examples/mandelbrot/assembly/index/clamp (; 2 ;) (type $FUNCSIG$dddd) (param $0 f64) (param $1 f64) (param $2 f64) (result f64) diff --git a/tests/compiler/memcpy.optimized.wat b/tests/compiler/memcpy.optimized.wat index 27fa46a9c3..4abc28ce13 100644 --- a/tests/compiler/memcpy.optimized.wat +++ b/tests/compiler/memcpy.optimized.wat @@ -21,7 +21,7 @@ local.get $1 i32.const 3 i32.and - local.get $2 + i32.const 0 local.get $2 select if diff --git a/tests/compiler/memcpy.untouched.wat b/tests/compiler/memcpy.untouched.wat index 24a043ac9f..5e7661bbe5 100644 --- a/tests/compiler/memcpy.untouched.wat +++ b/tests/compiler/memcpy.untouched.wat @@ -27,7 +27,7 @@ i32.const 4 i32.rem_u else - local.get $2 + i32.const 0 end if block diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index fecf4a30c8..a176036c65 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -403,7 +403,7 @@ local.tee $3 i32.eqz else - local.get $2 + i32.const 0 end if local.get $2 @@ -432,15 +432,11 @@ i32.const 1 return end - local.get $0 + local.get $1 i32.eqz - local.tee $2 - if (result i32) - local.get $2 - else - local.get $1 - i32.eqz - end + i32.const 1 + local.get $0 + select if i32.const 0 return @@ -474,8 +470,8 @@ (local $7 i32) (local $8 i64) (local $9 i64) - (local $10 i64) - (local $11 i32) + (local $10 i32) + (local $11 i64) (local $12 i32) (local $13 i64) (local $14 i32) @@ -484,22 +480,22 @@ local.get $3 local.get $1 i64.sub - local.set $8 + local.set $9 i64.const 1 i32.const 0 local.get $4 i32.sub - local.tee $11 + local.tee $10 i64.extend_i32_s local.tee $1 i64.shl - local.tee $9 + local.tee $11 i64.const 1 i64.sub local.tee $13 local.get $3 i64.and - local.set $10 + local.set $8 local.get $3 local.get $1 i64.shr_u @@ -668,10 +664,10 @@ local.set $4 local.get $6 i64.extend_i32_u - local.get $11 + local.get $10 i64.extend_i32_s i64.shl - local.get $10 + local.get $8 i64.add local.tee $1 local.get $5 @@ -687,7 +683,7 @@ local.get $12 i32.add i64.load32_u - local.get $11 + local.get $10 i64.extend_i32_s i64.shl local.set $3 @@ -702,43 +698,34 @@ i32.load16_u local.set $4 loop $continue|2 - block (result i32) - local.get $1 - local.get $8 - i64.lt_u - local.tee $0 - if - local.get $5 - local.get $1 - i64.sub - local.get $3 - i64.ge_u - local.set $0 - end - local.get $0 - end + local.get $5 + local.get $1 + i64.sub + local.get $3 + i64.ge_u + i32.const 0 + local.get $1 + local.get $9 + i64.lt_u + select if (result i32) + i32.const 1 + local.get $9 + local.get $1 + i64.sub local.get $1 local.get $3 i64.add + local.tee $8 + local.get $9 + i64.sub + i64.gt_u local.get $8 + local.get $9 i64.lt_u - local.tee $0 - if (result i32) - local.get $0 - else - local.get $8 - local.get $1 - i64.sub - local.get $1 - local.get $3 - i64.add - local.get $8 - i64.sub - i64.gt_u - end + select else - local.get $0 + i32.const 0 end if local.get $4 @@ -766,11 +753,11 @@ i64.const 10 i64.mul local.set $5 - local.get $10 + local.get $8 i64.const 10 i64.mul local.tee $1 - local.get $11 + local.get $10 i64.extend_i32_s i64.shr_u local.tee $3 @@ -805,7 +792,7 @@ local.get $1 local.get $13 i64.and - local.tee $10 + local.tee $8 local.get $5 i64.ge_u br_if $continue|3 @@ -814,7 +801,7 @@ local.get $4 i32.add global.set $~lib/util/number/_K - local.get $10 + local.get $8 local.set $1 i32.const 0 local.get $4 @@ -824,7 +811,7 @@ local.get $12 i32.add i64.load32_u - local.get $8 + local.get $9 i64.mul local.set $3 local.get $2 @@ -838,43 +825,34 @@ i32.load16_u local.set $4 loop $continue|4 - block (result i32) - local.get $1 - local.get $3 - i64.lt_u - local.tee $0 - if - local.get $5 - local.get $1 - i64.sub - local.get $9 - i64.ge_u - local.set $0 - end - local.get $0 - end + local.get $5 + local.get $1 + i64.sub + local.get $11 + i64.ge_u + i32.const 0 + local.get $1 + local.get $3 + i64.lt_u + select if (result i32) + i32.const 1 + local.get $3 + local.get $1 + i64.sub local.get $1 - local.get $9 + local.get $11 i64.add + local.tee $8 + local.get $3 + i64.sub + i64.gt_u + local.get $8 local.get $3 i64.lt_u - local.tee $0 - if (result i32) - local.get $0 - else - local.get $3 - local.get $1 - i64.sub - local.get $1 - local.get $9 - i64.add - local.get $3 - i64.sub - i64.gt_u - end + select else - local.get $0 + i32.const 0 end if local.get $4 @@ -882,7 +860,7 @@ i32.sub local.set $4 local.get $1 - local.get $9 + local.get $11 i64.add local.set $1 br $continue|4 @@ -1066,7 +1044,6 @@ ) (func $~lib/util/number/prettify (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $2 i32.eqz if @@ -1088,14 +1065,13 @@ i32.add local.tee $3 i32.le_s - local.tee $4 - if + if (result i32) local.get $3 i32.const 21 i32.le_s - local.set $4 + else + i32.const 0 end - local.get $4 if (result i32) loop $repeat|0 block $break|0 @@ -1128,17 +1104,14 @@ i32.const 2 i32.add else + local.get $3 + i32.const 21 + i32.le_s + i32.const 0 local.get $3 i32.const 0 i32.gt_s - local.tee $4 - if - local.get $3 - i32.const 21 - i32.le_s - local.set $4 - end - local.get $4 + select if (result i32) local.get $3 i32.const 1 @@ -1162,22 +1135,19 @@ i32.const 1 i32.add else + local.get $3 + i32.const 0 + i32.le_s + i32.const 0 i32.const -6 local.get $3 i32.lt_s - local.tee $2 - if - local.get $3 - i32.const 0 - i32.le_s - local.set $2 - end - local.get $2 + select if (result i32) i32.const 2 local.get $3 i32.sub - local.tee $4 + local.tee $3 i32.const 1 i32.shl local.get $0 @@ -1195,7 +1165,7 @@ loop $repeat|1 block $break|1 local.get $2 - local.get $4 + local.get $3 i32.ge_s br_if $break|1 local.get $2 @@ -1213,7 +1183,7 @@ end end local.get $1 - local.get $4 + local.get $3 i32.add else local.get $1 @@ -1292,7 +1262,7 @@ local.tee $0 i32.const 0 i32.lt_s - local.tee $4 + local.tee $3 if i32.const 0 local.get $0 @@ -1310,7 +1280,7 @@ local.get $2 i32.const 45 i32.const 43 - local.get $4 + local.get $3 select i32.store16 local.get $0 @@ -1503,7 +1473,6 @@ (func $~lib/string/String#substring (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 i32.eqz if @@ -1539,34 +1508,34 @@ local.get $2 i32.lt_s select - local.tee $1 + local.tee $2 local.get $3 - local.get $1 + local.get $2 i32.gt_s select i32.const 1 i32.shl - local.tee $4 + local.tee $1 local.get $3 - local.get $1 + local.get $2 local.get $3 - local.get $1 + local.get $2 i32.lt_s select i32.const 1 i32.shl - local.tee $2 - i32.sub local.tee $3 + i32.sub + local.tee $2 i32.eqz if i32.const 1840 return end - local.get $2 - i32.eqz - local.tee $1 - if + local.get $3 + if (result i32) + i32.const 0 + else local.get $0 i32.const 16 i32.sub @@ -1575,22 +1544,20 @@ i32.shr_u i32.const 1 i32.shl - local.get $4 + local.get $1 i32.eq - local.set $1 end - local.get $1 if local.get $0 return end - local.get $3 + local.get $2 call $~lib/util/runtime/allocate local.tee $1 local.get $0 - local.get $2 - i32.add local.get $3 + i32.add + local.get $2 call $~lib/memory/memory.copy local.get $1 call $~lib/util/runtime/register diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index a135d5f2f8..3f63b140b8 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -528,7 +528,7 @@ local.tee $5 i32.eqz else - local.get $4 + i32.const 0 end if block @@ -553,7 +553,6 @@ ) (func $~lib/string/String.__eq (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 i32.eq @@ -564,9 +563,8 @@ local.get $0 i32.const 0 i32.eq - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $1 i32.const 0 @@ -578,8 +576,8 @@ end local.get $0 call $~lib/string/String#get:length - local.set $3 - local.get $3 + local.set $2 + local.get $2 local.get $1 call $~lib/string/String#get:length i32.ne @@ -591,7 +589,7 @@ i32.const 0 local.get $1 i32.const 0 - local.get $3 + local.get $2 call $~lib/util/string/compareImpl i32.eqz ) @@ -646,7 +644,6 @@ (local $24 i64) (local $25 i32) (local $26 i32) - (local $27 i32) i32.const 0 local.get $4 i32.sub @@ -971,7 +968,6 @@ local.get $23 local.get $21 i64.lt_u - local.tee $27 if (result i32) local.get $24 local.get $23 @@ -979,18 +975,16 @@ local.get $22 i64.ge_u else - local.get $27 + i32.const 0 end - local.tee $27 if (result i32) local.get $23 local.get $22 i64.add local.get $21 i64.lt_u - local.tee $27 if (result i32) - local.get $27 + i32.const 1 else local.get $21 local.get $23 @@ -1003,7 +997,7 @@ i64.gt_u end else - local.get $27 + i32.const 0 end if block @@ -1133,7 +1127,6 @@ local.get $23 local.get $21 i64.lt_u - local.tee $20 if (result i32) local.get $24 local.get $23 @@ -1141,18 +1134,16 @@ local.get $22 i64.ge_u else - local.get $20 + i32.const 0 end - local.tee $20 if (result i32) local.get $23 local.get $22 i64.add local.get $21 i64.lt_u - local.tee $20 if (result i32) - local.get $20 + i32.const 1 else local.get $21 local.get $23 @@ -1165,7 +1156,7 @@ i64.gt_u end else - local.get $20 + i32.const 0 end if block @@ -1441,13 +1432,12 @@ local.get $1 local.get $3 i32.le_s - local.tee $4 if (result i32) local.get $3 i32.const 21 i32.le_s else - local.get $4 + i32.const 0 end if block $break|0 @@ -1494,13 +1484,12 @@ local.get $3 i32.const 0 i32.gt_s - local.tee $4 if (result i32) local.get $3 i32.const 21 i32.le_s else - local.get $4 + i32.const 0 end if local.get $0 @@ -1534,13 +1523,12 @@ i32.const -6 local.get $3 i32.lt_s - local.tee $4 if (result i32) local.get $3 i32.const 0 i32.le_s else - local.get $4 + i32.const 0 end if i32.const 2 @@ -2266,7 +2254,6 @@ end local.get $8 i32.eqz - local.tee $4 if (result i32) local.get $9 local.get $0 @@ -2275,7 +2262,7 @@ i32.shl i32.eq else - local.get $4 + i32.const 0 end if local.get $0 @@ -2388,8 +2375,6 @@ ) (func $~lib/number/Bool#toString (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 0 - i32.ne if (result i32) i32.const 1976 else @@ -2402,19 +2387,17 @@ f32.ne ) (func $~lib/number/F32.isSafeInteger (; 30 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) - (local $1 i32) local.get $0 f32.abs global.get $~lib/builtins/f32.MAX_SAFE_INTEGER f32.le - local.tee $1 if (result i32) local.get $0 f32.trunc local.get $0 f32.eq else - local.get $1 + i32.const 0 end ) (func $~lib/builtins/isFinite (; 31 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) @@ -2425,47 +2408,41 @@ f32.eq ) (func $~lib/number/F32.isInteger (; 32 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) - (local $1 i32) local.get $0 call $~lib/builtins/isFinite - local.tee $1 if (result i32) local.get $0 f32.trunc local.get $0 f32.eq else - local.get $1 + i32.const 0 end ) (func $~lib/number/F64.isSafeInteger (; 33 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) - (local $1 i32) local.get $0 f64.abs global.get $~lib/builtins/f64.MAX_SAFE_INTEGER f64.le - local.tee $1 if (result i32) local.get $0 f64.trunc local.get $0 f64.eq else - local.get $1 + i32.const 0 end ) (func $~lib/number/F64.isInteger (; 34 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) - (local $1 i32) local.get $0 call $~lib/builtins/isFinite - local.tee $1 if (result i32) local.get $0 f64.trunc local.get $0 f64.eq else - local.get $1 + i32.const 0 end ) (func $start:number (; 35 ;) (type $FUNCSIG$v) diff --git a/tests/compiler/possibly-null.json b/tests/compiler/possibly-null.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/possibly-null.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/possibly-null.optimized.wat b/tests/compiler/possibly-null.optimized.wat new file mode 100644 index 0000000000..634a749aaf --- /dev/null +++ b/tests/compiler/possibly-null.optimized.wat @@ -0,0 +1,58 @@ +(module + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$v (func)) + (memory $0 0) + (export "memory" (memory $0)) + (export "testTrue" (func $possibly-null/testTrue)) + (export "testFalseElse" (func $possibly-null/testTrue)) + (export "testFalseContinuation" (func $possibly-null/testTrue)) + (export "testNeNull" (func $possibly-null/testTrue)) + (export "testEqNullElse" (func $possibly-null/testTrue)) + (export "testEqNullContinuation" (func $possibly-null/testTrue)) + (export "testNotEqNull" (func $possibly-null/testTrue)) + (export "testNotNeNullElse" (func $possibly-null/testTrue)) + (export "testNotNeNullContinuation" (func $possibly-null/testTrue)) + (export "testWhile" (func $possibly-null/testWhile)) + (export "testWhile2" (func $possibly-null/testWhile2)) + (export "testWhile3" (func $possibly-null/testWhile3)) + (func $possibly-null/testTrue (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $possibly-null/testWhile (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + loop $continue|0 + local.get $0 + if + i32.const 0 + local.set $0 + br $continue|0 + end + end + ) + (func $possibly-null/testWhile2 (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + loop $continue|0 + local.get $0 + if + local.get $1 + local.set $0 + br $continue|0 + end + end + ) + (func $possibly-null/testWhile3 (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + loop $continue|0 + local.get $0 + if + local.get $1 + local.get $0 + local.get $1 + select + local.set $0 + br $continue|0 + end + end + ) + (func $null (; 4 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/possibly-null.ts b/tests/compiler/possibly-null.ts new file mode 100644 index 0000000000..8618567112 --- /dev/null +++ b/tests/compiler/possibly-null.ts @@ -0,0 +1,98 @@ +class Ref {} + +// the following makes use of the fact that branches that can be eliminated statically +// won't become compiled, hence the ERROR statement is never executed. + +export function testTrue(a: Ref | null): void { + if (a) { + if (isNullable(a)) ERROR("should be non-nullable"); + } +} + +export function testFalseElse(a: Ref | null): void { + if (!a) return; + else { + if (isNullable(a)) ERROR("should be non-nullable"); + } +} + +export function testFalseContinuation(a: Ref | null): void { + if (!a) return; + if (isNullable(a)) ERROR("should be non-nullable"); +} + +export function testNeNull(a: Ref | null): void { + if (a != null) { + if (isNullable(a)) ERROR("should be non-nullable"); + } +} + +export function testEqNullElse(a: Ref | null): void { + if (a == null) return; + else { + if (isNullable(a)) ERROR("should be non-nullable"); + } +} + +export function testEqNullContinuation(a: Ref | null): void { + if (a == null) return; + if (isNullable(a)) ERROR("should be non-nullable"); +} + +export function testNotEqNull(a: Ref | null): void { + if (!(a == null)) { + if (isNullable(a)) ERROR("should be non-nullable"); + } +} + +export function testNotNeNullElse(a: Ref | null): void { + if (!(a != null)) return; + else { + if (isNullable(a)) ERROR("should be non-nullable"); + } +} + +export function testNotNeNullContinuation(a: Ref | null): void { + if (!(a != null)) return; + if (isNullable(a)) ERROR("should be non-nullable"); +} + +export function testWhile(a: Ref | null): void { + while (a) { + if (isNullable(a)) ERROR("should be non-nullable"); + a = null; + if (!isNullable(a)) ERROR("should be nullable again"); + } +} + +export function testWhile2(a: Ref | null, b: Ref | null): void { + while (a) { + if (isNullable(a)) ERROR("should be non-nullable"); + a = b; + if (!isNullable(a)) ERROR("should be nullable again"); + } +} + +export function testWhile3(a: Ref | null, b: Ref | null): void { + while (a) { + if (isNullable(a)) ERROR("should be non-nullable"); + if (b) { + a = b; + if (isNullable(a)) ERROR("should be non-nullable still"); + } + } +} + +// TODO: + +// function requireNonNull(a: Ref): Ref { +// return a; +// } + +// export function testLogicalAnd(a: Ref | null): void { +// a && requireNonNull(a); +// } + +// export function testLogicalOr(a: Ref | null): void { +// !a || requireNonNull(a); +// } diff --git a/tests/compiler/possibly-null.untouched.wat b/tests/compiler/possibly-null.untouched.wat new file mode 100644 index 0000000000..04f6b77d5c --- /dev/null +++ b/tests/compiler/possibly-null.untouched.wat @@ -0,0 +1,133 @@ +(module + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$v (func)) + (memory $0 0) + (table $0 1 funcref) + (elem (i32.const 0) $null) + (export "memory" (memory $0)) + (export "testTrue" (func $possibly-null/testTrue)) + (export "testFalseElse" (func $possibly-null/testFalseElse)) + (export "testFalseContinuation" (func $possibly-null/testFalseContinuation)) + (export "testNeNull" (func $possibly-null/testNeNull)) + (export "testEqNullElse" (func $possibly-null/testEqNullElse)) + (export "testEqNullContinuation" (func $possibly-null/testEqNullContinuation)) + (export "testNotEqNull" (func $possibly-null/testNotEqNull)) + (export "testNotNeNullElse" (func $possibly-null/testNotNeNullElse)) + (export "testNotNeNullContinuation" (func $possibly-null/testNotNeNullContinuation)) + (export "testWhile" (func $possibly-null/testWhile)) + (export "testWhile2" (func $possibly-null/testWhile2)) + (export "testWhile3" (func $possibly-null/testWhile3)) + (func $possibly-null/testTrue (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + if + nop + end + ) + (func $possibly-null/testFalseElse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.eqz + if + return + else + nop + end + ) + (func $possibly-null/testFalseContinuation (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.eqz + if + return + end + ) + (func $possibly-null/testNeNull (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 0 + i32.ne + if + nop + end + ) + (func $possibly-null/testEqNullElse (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 0 + i32.eq + if + return + else + nop + end + ) + (func $possibly-null/testEqNullContinuation (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 0 + i32.eq + if + return + end + ) + (func $possibly-null/testNotEqNull (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 0 + i32.eq + i32.eqz + if + nop + end + ) + (func $possibly-null/testNotNeNullElse (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + return + else + nop + end + ) + (func $possibly-null/testNotNeNullContinuation (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + return + end + ) + (func $possibly-null/testWhile (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + loop $continue|0 + local.get $0 + if + i32.const 0 + local.set $0 + br $continue|0 + end + end + ) + (func $possibly-null/testWhile2 (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + loop $continue|0 + local.get $0 + if + local.get $1 + local.set $0 + br $continue|0 + end + end + ) + (func $possibly-null/testWhile3 (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + loop $continue|0 + local.get $0 + if + local.get $1 + if + local.get $1 + local.set $0 + end + br $continue|0 + end + end + ) + (func $null (; 12 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/runtime-arena.optimized.wat b/tests/compiler/runtime-arena.optimized.wat index 70b2203325..bdacf2606a 100644 --- a/tests/compiler/runtime-arena.optimized.wat +++ b/tests/compiler/runtime-arena.optimized.wat @@ -36,7 +36,7 @@ i32.load i32.le_u else - local.get $0 + i32.const 0 end if loop $continue|0 @@ -60,19 +60,15 @@ i32.const 0 ) (func $~lib/runtime/runtime.flags (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if + if (result i32) local.get $0 i32.const 112 i32.load i32.gt_u - local.set $1 + else + i32.const 1 end - local.get $1 if (result i32) unreachable else @@ -225,15 +221,13 @@ (local $3 i32) (local $4 i32) local.get $0 - i32.eqz - local.tee $2 if (result i32) - local.get $2 - else local.get $0 i32.const 112 i32.load i32.gt_u + else + i32.const 1 end if (result i32) unreachable diff --git a/tests/compiler/runtime-arena.untouched.wat b/tests/compiler/runtime-arena.untouched.wat index 4f82fb75c2..b8ba66a346 100644 --- a/tests/compiler/runtime-arena.untouched.wat +++ b/tests/compiler/runtime-arena.untouched.wat @@ -46,7 +46,7 @@ i32.load i32.le_u else - local.get $2 + i32.const 0 end if loop $continue|0 @@ -71,14 +71,12 @@ ) (func $~lib/runtime/runtime.flags (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/runtime/RTTI_BASE local.set $1 local.get $0 i32.eqz - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 local.get $1 diff --git a/tests/compiler/runtime-default.optimized.wat b/tests/compiler/runtime-default.optimized.wat index cee27ccd09..145b7c805a 100644 --- a/tests/compiler/runtime-default.optimized.wat +++ b/tests/compiler/runtime-default.optimized.wat @@ -44,7 +44,7 @@ i32.load i32.le_u else - local.get $0 + i32.const 0 end if loop $continue|0 @@ -68,19 +68,15 @@ i32.const 0 ) (func $~lib/runtime/runtime.flags (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if + if (result i32) local.get $0 i32.const 128 i32.load i32.gt_u - local.set $1 + else + i32.const 1 end - local.get $1 if (result i32) unreachable else @@ -257,7 +253,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $2 + local.tee $3 i32.const 1 i32.and i32.eqz @@ -269,20 +265,19 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const -4 i32.and - local.tee $3 + local.tee $2 i32.const 16 i32.ge_u - local.tee $2 - if - local.get $3 + if (result i32) + local.get $2 i32.const 1073741824 i32.lt_u - local.set $2 + else + i32.const 0 end - local.get $2 i32.eqz if i32.const 0 @@ -292,67 +287,67 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 256 i32.lt_u if (result i32) - local.get $3 + local.get $2 i32.const 8 i32.div_u local.set $4 i32.const 0 else - local.get $3 - local.get $3 + local.get $2 + local.get $2 call $~lib/allocator/tlsf/fls - local.tee $2 + local.tee $3 i32.const 5 i32.sub i32.shr_u i32.const 32 i32.xor local.set $4 - local.get $2 + local.get $3 i32.const 7 i32.sub end - local.set $2 + local.set $3 local.get $1 i32.load offset=8 - local.set $3 + local.set $2 local.get $1 i32.load offset=4 local.tee $5 if local.get $5 - local.get $3 + local.get $2 i32.store offset=8 end - local.get $3 + local.get $2 if - local.get $3 + local.get $2 local.get $5 i32.store offset=4 end local.get $0 - local.get $2 + local.get $3 local.get $4 call $~lib/allocator/tlsf/Root#getHead local.get $1 i32.eq if local.get $0 - local.get $2 - local.get $4 local.get $3 + local.get $4 + local.get $2 call $~lib/allocator/tlsf/Root#setHead - local.get $3 + local.get $2 i32.eqz if local.get $0 - local.get $2 + local.get $3 local.get $0 - local.get $2 + local.get $3 call $~lib/allocator/tlsf/Root#getSLMap i32.const 1 local.get $4 @@ -369,7 +364,7 @@ local.get $0 i32.load i32.const 1 - local.get $2 + local.get $3 i32.shl i32.const -1 i32.xor @@ -471,7 +466,7 @@ end local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -487,17 +482,16 @@ i32.load i32.const -4 i32.and - local.tee $4 + local.tee $3 i32.const 16 i32.ge_u - local.tee $2 - if - local.get $4 + if (result i32) + local.get $3 i32.const 1073741824 i32.lt_u - local.set $2 + else + i32.const 0 end - local.get $2 i32.eqz if i32.const 0 @@ -509,7 +503,7 @@ end local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $2 + local.tee $3 i32.eqz if i32.const 0 @@ -519,14 +513,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.load local.tee $4 i32.const 1 i32.and if local.get $0 - local.get $2 + local.get $3 call $~lib/allocator/tlsf/Root#remove local.get $1 local.get $4 @@ -534,17 +528,17 @@ i32.and i32.const 8 i32.add - local.get $3 + local.get $2 i32.add - local.tee $3 + local.tee $2 i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $2 + local.tee $3 i32.load local.set $4 end - local.get $3 + local.get $2 i32.const 2 i32.and if @@ -578,38 +572,37 @@ local.get $1 call $~lib/allocator/tlsf/Root#remove local.get $1 - local.get $3 + local.get $2 i32.const -4 i32.and i32.const 8 i32.add local.get $5 i32.add - local.tee $3 + local.tee $2 i32.store end - local.get $2 + local.get $3 local.get $4 i32.const 2 i32.or i32.store local.get $1 - local.get $2 - call $~lib/allocator/tlsf/Root#setJump local.get $3 + call $~lib/allocator/tlsf/Root#setJump + local.get $2 i32.const -4 i32.and - local.tee $3 + local.tee $2 i32.const 16 i32.ge_u - local.tee $2 - if - local.get $3 + if (result i32) + local.get $2 i32.const 1073741824 i32.lt_u - local.set $2 + else + i32.const 0 end - local.get $2 i32.eqz if i32.const 0 @@ -620,32 +613,32 @@ unreachable end local.get $0 - local.get $3 + local.get $2 i32.const 256 i32.lt_u if (result i32) - local.get $3 + local.get $2 i32.const 8 i32.div_u - local.set $3 + local.set $2 i32.const 0 else - local.get $3 - local.get $3 + local.get $2 + local.get $2 call $~lib/allocator/tlsf/fls - local.tee $2 + local.tee $3 i32.const 5 i32.sub i32.shr_u i32.const 32 i32.xor - local.set $3 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end - local.tee $2 - local.get $3 + local.tee $3 + local.get $2 call $~lib/allocator/tlsf/Root#getHead local.set $4 local.get $1 @@ -661,25 +654,25 @@ i32.store offset=4 end local.get $0 - local.get $2 local.get $3 + local.get $2 local.get $1 call $~lib/allocator/tlsf/Root#setHead local.get $0 local.get $0 i32.load i32.const 1 - local.get $2 + local.get $3 i32.shl i32.or i32.store local.get $0 - local.get $2 + local.get $3 local.get $0 - local.get $2 + local.get $3 call $~lib/allocator/tlsf/Root#getSLMap i32.const 1 - local.get $3 + local.get $2 i32.shl i32.or call $~lib/allocator/tlsf/Root#setSLMap @@ -825,16 +818,13 @@ (local $2 i32) (local $3 i32) local.get $1 + i32.const 1073741824 + i32.lt_u + i32.const 0 + local.get $1 i32.const 16 i32.ge_u - local.tee $2 - if - local.get $1 - i32.const 1073741824 - i32.lt_u - local.set $2 - end - local.get $2 + select i32.eqz if i32.const 0 @@ -848,8 +838,6 @@ i32.const 256 i32.lt_u if (result i32) - i32.const 0 - local.set $2 local.get $1 i32.const 8 i32.div_u @@ -938,7 +926,7 @@ (local $4 i32) local.get $1 i32.load - local.tee $4 + local.tee $3 i32.const 1 i32.and i32.eqz @@ -951,16 +939,13 @@ unreachable end local.get $2 + i32.const 1073741824 + i32.lt_u + i32.const 0 + local.get $2 i32.const 16 i32.ge_u - local.tee $3 - if - local.get $2 - i32.const 1073741824 - i32.lt_u - local.set $3 - end - local.get $3 + select i32.eqz if i32.const 0 @@ -984,17 +969,17 @@ local.get $0 local.get $1 call $~lib/allocator/tlsf/Root#remove - local.get $4 + local.get $3 i32.const -4 i32.and local.get $2 i32.sub - local.tee $3 + local.tee $4 i32.const 24 i32.ge_u if local.get $1 - local.get $4 + local.get $3 i32.const 2 i32.and local.get $2 @@ -1006,7 +991,7 @@ local.get $2 i32.add local.tee $2 - local.get $3 + local.get $4 i32.const 8 i32.sub i32.const 1 @@ -1017,7 +1002,7 @@ call $~lib/allocator/tlsf/Root#insert else local.get $1 - local.get $4 + local.get $3 i32.const -2 i32.and i32.store @@ -1054,18 +1039,17 @@ if i32.const 1 current_memory - local.tee $1 - i32.gt_s local.tee $2 + i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $2 i32.sub grow_memory i32.const 0 i32.lt_s else - local.get $2 + i32.const 0 end if unreachable @@ -1080,8 +1064,6 @@ i32.const 280 i32.const 0 i32.store - i32.const 0 - local.set $1 loop $repeat|0 local.get $1 i32.const 22 @@ -1425,19 +1407,17 @@ i32.store offset=8 ) (func $~lib/collector/itcm/__ref_link (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) call $~lib/collector/itcm/maybeInit global.get $~lib/collector/itcm/white i32.eqz local.get $1 i32.const 16 i32.sub - local.tee $2 + local.tee $1 i32.load offset=8 i32.const 3 i32.and i32.eq - local.tee $1 if (result i32) global.get $~lib/collector/itcm/white local.get $0 @@ -1448,10 +1428,10 @@ i32.and i32.eq else - local.get $1 + i32.const 0 end if - local.get $2 + local.get $1 call $~lib/collector/itcm/ManagedObject#makeGray end ) @@ -1462,15 +1442,13 @@ (local $5 i32) local.get $0 local.tee $3 - i32.eqz - local.tee $0 if (result i32) - local.get $0 - else local.get $3 i32.const 128 i32.load i32.gt_u + else + i32.const 1 end if (result i32) unreachable diff --git a/tests/compiler/runtime-default.untouched.wat b/tests/compiler/runtime-default.untouched.wat index 57c79cd8b7..b1b6428714 100644 --- a/tests/compiler/runtime-default.untouched.wat +++ b/tests/compiler/runtime-default.untouched.wat @@ -70,7 +70,7 @@ i32.load i32.le_u else - local.get $2 + i32.const 0 end if loop $continue|0 @@ -95,14 +95,12 @@ ) (func $~lib/runtime/runtime.flags (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/runtime/RTTI_BASE local.set $1 local.get $0 i32.eqz - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 local.get $1 @@ -345,13 +343,12 @@ local.get $3 global.get $~lib/allocator/tlsf/Block.MIN_SIZE i32.ge_u - local.tee $4 if (result i32) local.get $3 global.get $~lib/allocator/tlsf/Block.MAX_SIZE i32.lt_u else - local.get $4 + i32.const 0 end i32.eqz if @@ -367,17 +364,17 @@ i32.lt_u if i32.const 0 - local.set $5 + local.set $4 local.get $3 i32.const 8 i32.div_u - local.set $6 + local.set $5 else local.get $3 call $~lib/allocator/tlsf/fls - local.set $5 + local.set $4 local.get $3 - local.get $5 + local.get $4 global.get $~lib/allocator/tlsf/SL_BITS i32.sub i32.shr_u @@ -385,70 +382,70 @@ global.get $~lib/allocator/tlsf/SL_BITS i32.shl i32.xor - local.set $6 - local.get $5 + local.set $5 + local.get $4 global.get $~lib/allocator/tlsf/SB_BITS i32.const 1 i32.sub i32.sub - local.set $5 + local.set $4 end local.get $1 i32.load offset=4 - local.set $7 + local.set $6 local.get $1 i32.load offset=8 - local.set $8 - local.get $7 + local.set $7 + local.get $6 if + local.get $6 local.get $7 - local.get $8 i32.store offset=8 end - local.get $8 + local.get $7 if - local.get $8 local.get $7 + local.get $6 i32.store offset=4 end local.get $1 local.get $0 + local.get $4 local.get $5 - local.get $6 call $~lib/allocator/tlsf/Root#getHead i32.eq if local.get $0 + local.get $4 local.get $5 - local.get $6 - local.get $8 + local.get $7 call $~lib/allocator/tlsf/Root#setHead - local.get $8 + local.get $7 i32.eqz if local.get $0 - local.get $5 + local.get $4 call $~lib/allocator/tlsf/Root#getSLMap - local.set $4 + local.set $8 local.get $0 - local.get $5 local.get $4 + local.get $8 i32.const 1 - local.get $6 + local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $4 + local.tee $8 call $~lib/allocator/tlsf/Root#setSLMap - local.get $4 + local.get $8 i32.eqz if local.get $0 local.get $0 i32.load i32.const 1 - local.get $5 + local.get $4 i32.shl i32.const -1 i32.xor @@ -580,13 +577,12 @@ local.tee $3 global.get $~lib/allocator/tlsf/Block.MIN_SIZE i32.ge_u - local.tee $4 if (result i32) local.get $3 global.get $~lib/allocator/tlsf/Block.MAX_SIZE i32.lt_u else - local.get $4 + i32.const 0 end i32.eqz if @@ -713,13 +709,12 @@ local.get $3 global.get $~lib/allocator/tlsf/Block.MIN_SIZE i32.ge_u - local.tee $7 if (result i32) local.get $3 global.get $~lib/allocator/tlsf/Block.MAX_SIZE i32.lt_u else - local.get $7 + i32.const 0 end i32.eqz if @@ -997,13 +992,12 @@ local.get $1 global.get $~lib/allocator/tlsf/Block.MIN_SIZE i32.ge_u - local.tee $2 if (result i32) local.get $1 global.get $~lib/allocator/tlsf/Block.MAX_SIZE i32.lt_u else - local.get $2 + i32.const 0 end i32.eqz if @@ -1019,17 +1013,17 @@ i32.lt_u if i32.const 0 - local.set $3 + local.set $2 local.get $1 i32.const 8 i32.div_u - local.set $4 + local.set $3 else local.get $1 call $~lib/allocator/tlsf/fls - local.set $3 + local.set $2 local.get $1 - local.get $3 + local.get $2 global.get $~lib/allocator/tlsf/SL_BITS i32.sub i32.shr_u @@ -1037,43 +1031,43 @@ global.get $~lib/allocator/tlsf/SL_BITS i32.shl i32.xor - local.set $4 - local.get $3 + local.set $3 + local.get $2 global.get $~lib/allocator/tlsf/SB_BITS i32.const 1 i32.sub i32.sub - local.set $3 - local.get $4 + local.set $2 + local.get $3 global.get $~lib/allocator/tlsf/SL_SIZE i32.const 1 i32.sub i32.lt_u if - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 else - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 i32.const 0 - local.set $4 + local.set $3 end end local.get $0 - local.get $3 + local.get $2 call $~lib/allocator/tlsf/Root#getSLMap i32.const 0 i32.const -1 i32.xor - local.get $4 + local.get $3 i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -1081,23 +1075,23 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $2 i32.const 1 i32.add i32.shl i32.and - local.set $2 - local.get $2 + local.set $6 + local.get $6 i32.eqz if i32.const 0 - local.set $6 + local.set $5 else - local.get $2 + local.get $6 call $~lib/allocator/tlsf/ffs - local.set $3 + local.set $2 local.get $0 - local.get $3 + local.get $2 call $~lib/allocator/tlsf/Root#getSLMap local.tee $7 if (result i32) @@ -1110,23 +1104,23 @@ call $~lib/builtins/abort unreachable end - local.set $5 + local.set $4 local.get $0 - local.get $3 - local.get $5 + local.get $2 + local.get $4 call $~lib/allocator/tlsf/ffs call $~lib/allocator/tlsf/Root#getHead - local.set $6 + local.set $5 end else local.get $0 - local.get $3 - local.get $5 + local.get $2 + local.get $4 call $~lib/allocator/tlsf/ffs call $~lib/allocator/tlsf/Root#getHead - local.set $6 + local.set $5 end - local.get $6 + local.get $5 ) (func $~lib/allocator/tlsf/Root#use (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -1150,13 +1144,12 @@ local.get $2 global.get $~lib/allocator/tlsf/Block.MIN_SIZE i32.ge_u - local.tee $4 if (result i32) local.get $2 global.get $~lib/allocator/tlsf/Block.MAX_SIZE i32.lt_u else - local.get $4 + i32.const 0 end i32.eqz if @@ -1190,8 +1183,8 @@ i32.and local.get $2 i32.sub - local.set $5 - local.get $5 + local.set $4 + local.get $4 global.get $~lib/allocator/tlsf/Block.INFO global.get $~lib/allocator/tlsf/Block.MIN_SIZE i32.add @@ -1209,16 +1202,16 @@ i32.add local.get $2 i32.add - local.set $4 - local.get $4 + local.set $5 local.get $5 + local.get $4 global.get $~lib/allocator/tlsf/Block.INFO i32.sub global.get $~lib/allocator/tlsf/FREE i32.or i32.store local.get $0 - local.get $4 + local.get $5 call $~lib/allocator/tlsf/Root#insert else local.get $1 @@ -1230,7 +1223,7 @@ i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $4 + local.tee $5 i32.eqz if (result i32) i32.const 0 @@ -1240,11 +1233,11 @@ call $~lib/builtins/abort unreachable else - local.get $4 + local.get $5 end - local.set $4 - local.get $4 - local.get $4 + local.set $5 + local.get $5 + local.get $5 i32.load global.get $~lib/allocator/tlsf/LEFT_FREE i32.const -1 @@ -1294,7 +1287,6 @@ local.get $4 local.get $3 i32.gt_s - local.tee $5 if (result i32) local.get $4 local.get $3 @@ -1303,7 +1295,7 @@ i32.const 0 i32.lt_s else - local.get $5 + i32.const 0 end if unreachable @@ -1753,7 +1745,6 @@ global.get $~lib/collector/itcm/white i32.eqz i32.eq - local.tee $2 if (result i32) block $~lib/collector/itcm/refToObj|inlined.3 (result i32) local.get $0 @@ -1766,7 +1757,7 @@ global.get $~lib/collector/itcm/white i32.eq else - local.get $2 + i32.const 0 end if local.get $3 diff --git a/tests/compiler/runtime/flags.optimized.wat b/tests/compiler/runtime/flags.optimized.wat index bd9956a2e9..055591b565 100644 --- a/tests/compiler/runtime/flags.optimized.wat +++ b/tests/compiler/runtime/flags.optimized.wat @@ -39,19 +39,15 @@ (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) (func $~lib/runtime/runtime.flags (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if + if (result i32) local.get $0 i32.const 176 i32.load i32.gt_u - local.set $1 + else + i32.const 1 end - local.get $1 if (result i32) unreachable else @@ -940,7 +936,7 @@ i32.load i32.le_u else - local.get $0 + i32.const 0 end if loop $continue|0 @@ -1128,7 +1124,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $2 + local.tee $3 i32.const 1 i32.and i32.eqz @@ -1140,20 +1136,19 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const -4 i32.and - local.tee $3 + local.tee $2 i32.const 16 i32.ge_u - local.tee $2 - if - local.get $3 + if (result i32) + local.get $2 i32.const 1073741824 i32.lt_u - local.set $2 + else + i32.const 0 end - local.get $2 i32.eqz if i32.const 0 @@ -1163,67 +1158,67 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 256 i32.lt_u if (result i32) - local.get $3 + local.get $2 i32.const 8 i32.div_u local.set $4 i32.const 0 else - local.get $3 - local.get $3 + local.get $2 + local.get $2 call $~lib/allocator/tlsf/fls - local.tee $2 + local.tee $3 i32.const 5 i32.sub i32.shr_u i32.const 32 i32.xor local.set $4 - local.get $2 + local.get $3 i32.const 7 i32.sub end - local.set $2 + local.set $3 local.get $1 i32.load offset=8 - local.set $3 + local.set $2 local.get $1 i32.load offset=4 local.tee $5 if local.get $5 - local.get $3 + local.get $2 i32.store offset=8 end - local.get $3 + local.get $2 if - local.get $3 + local.get $2 local.get $5 i32.store offset=4 end local.get $0 - local.get $2 + local.get $3 local.get $4 call $~lib/allocator/tlsf/Root#getHead local.get $1 i32.eq if local.get $0 - local.get $2 - local.get $4 local.get $3 + local.get $4 + local.get $2 call $~lib/allocator/tlsf/Root#setHead - local.get $3 + local.get $2 i32.eqz if local.get $0 - local.get $2 + local.get $3 local.get $0 - local.get $2 + local.get $3 call $~lib/allocator/tlsf/Root#getSLMap i32.const 1 local.get $4 @@ -1240,7 +1235,7 @@ local.get $0 i32.load i32.const 1 - local.get $2 + local.get $3 i32.shl i32.const -1 i32.xor @@ -1342,7 +1337,7 @@ end local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -1358,17 +1353,16 @@ i32.load i32.const -4 i32.and - local.tee $4 + local.tee $3 i32.const 16 i32.ge_u - local.tee $2 - if - local.get $4 + if (result i32) + local.get $3 i32.const 1073741824 i32.lt_u - local.set $2 + else + i32.const 0 end - local.get $2 i32.eqz if i32.const 0 @@ -1380,7 +1374,7 @@ end local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $2 + local.tee $3 i32.eqz if i32.const 0 @@ -1390,14 +1384,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.load local.tee $4 i32.const 1 i32.and if local.get $0 - local.get $2 + local.get $3 call $~lib/allocator/tlsf/Root#remove local.get $1 local.get $4 @@ -1405,17 +1399,17 @@ i32.and i32.const 8 i32.add - local.get $3 + local.get $2 i32.add - local.tee $3 + local.tee $2 i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $2 + local.tee $3 i32.load local.set $4 end - local.get $3 + local.get $2 i32.const 2 i32.and if @@ -1449,38 +1443,37 @@ local.get $1 call $~lib/allocator/tlsf/Root#remove local.get $1 - local.get $3 + local.get $2 i32.const -4 i32.and i32.const 8 i32.add local.get $5 i32.add - local.tee $3 + local.tee $2 i32.store end - local.get $2 + local.get $3 local.get $4 i32.const 2 i32.or i32.store local.get $1 - local.get $2 - call $~lib/allocator/tlsf/Root#setJump local.get $3 + call $~lib/allocator/tlsf/Root#setJump + local.get $2 i32.const -4 i32.and - local.tee $3 + local.tee $2 i32.const 16 i32.ge_u - local.tee $2 - if - local.get $3 + if (result i32) + local.get $2 i32.const 1073741824 i32.lt_u - local.set $2 + else + i32.const 0 end - local.get $2 i32.eqz if i32.const 0 @@ -1491,32 +1484,32 @@ unreachable end local.get $0 - local.get $3 + local.get $2 i32.const 256 i32.lt_u if (result i32) - local.get $3 + local.get $2 i32.const 8 i32.div_u - local.set $3 + local.set $2 i32.const 0 else - local.get $3 - local.get $3 + local.get $2 + local.get $2 call $~lib/allocator/tlsf/fls - local.tee $2 + local.tee $3 i32.const 5 i32.sub i32.shr_u i32.const 32 i32.xor - local.set $3 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end - local.tee $2 - local.get $3 + local.tee $3 + local.get $2 call $~lib/allocator/tlsf/Root#getHead local.set $4 local.get $1 @@ -1532,25 +1525,25 @@ i32.store offset=4 end local.get $0 - local.get $2 local.get $3 + local.get $2 local.get $1 call $~lib/allocator/tlsf/Root#setHead local.get $0 local.get $0 i32.load i32.const 1 - local.get $2 + local.get $3 i32.shl i32.or i32.store local.get $0 - local.get $2 + local.get $3 local.get $0 - local.get $2 + local.get $3 call $~lib/allocator/tlsf/Root#getSLMap i32.const 1 - local.get $3 + local.get $2 i32.shl i32.or call $~lib/allocator/tlsf/Root#setSLMap @@ -1696,16 +1689,13 @@ (local $2 i32) (local $3 i32) local.get $1 + i32.const 1073741824 + i32.lt_u + i32.const 0 + local.get $1 i32.const 16 i32.ge_u - local.tee $2 - if - local.get $1 - i32.const 1073741824 - i32.lt_u - local.set $2 - end - local.get $2 + select i32.eqz if i32.const 0 @@ -1719,8 +1709,6 @@ i32.const 256 i32.lt_u if (result i32) - i32.const 0 - local.set $2 local.get $1 i32.const 8 i32.div_u @@ -1809,7 +1797,7 @@ (local $4 i32) local.get $1 i32.load - local.tee $4 + local.tee $3 i32.const 1 i32.and i32.eqz @@ -1822,16 +1810,13 @@ unreachable end local.get $2 + i32.const 1073741824 + i32.lt_u + i32.const 0 + local.get $2 i32.const 16 i32.ge_u - local.tee $3 - if - local.get $2 - i32.const 1073741824 - i32.lt_u - local.set $3 - end - local.get $3 + select i32.eqz if i32.const 0 @@ -1855,17 +1840,17 @@ local.get $0 local.get $1 call $~lib/allocator/tlsf/Root#remove - local.get $4 + local.get $3 i32.const -4 i32.and local.get $2 i32.sub - local.tee $3 + local.tee $4 i32.const 24 i32.ge_u if local.get $1 - local.get $4 + local.get $3 i32.const 2 i32.and local.get $2 @@ -1877,7 +1862,7 @@ local.get $2 i32.add local.tee $2 - local.get $3 + local.get $4 i32.const 8 i32.sub i32.const 1 @@ -1888,7 +1873,7 @@ call $~lib/allocator/tlsf/Root#insert else local.get $1 - local.get $4 + local.get $3 i32.const -2 i32.and i32.store @@ -1925,18 +1910,17 @@ if i32.const 1 current_memory - local.tee $1 - i32.gt_s local.tee $2 + i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $2 i32.sub grow_memory i32.const 0 i32.lt_s else - local.get $2 + i32.const 0 end if unreachable @@ -1951,8 +1935,6 @@ i32.const 656 i32.const 0 i32.store - i32.const 0 - local.set $1 loop $repeat|0 local.get $1 i32.const 22 @@ -2296,19 +2278,17 @@ i32.store offset=8 ) (func $~lib/collector/itcm/__ref_link (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) call $~lib/collector/itcm/maybeInit global.get $~lib/collector/itcm/white i32.eqz local.get $1 i32.const 16 i32.sub - local.tee $2 + local.tee $1 i32.load offset=8 i32.const 3 i32.and i32.eq - local.tee $1 if (result i32) global.get $~lib/collector/itcm/white local.get $0 @@ -2319,10 +2299,10 @@ i32.and i32.eq else - local.get $1 + i32.const 0 end if - local.get $2 + local.get $1 call $~lib/collector/itcm/ManagedObject#makeGray end ) @@ -2333,15 +2313,13 @@ (local $5 i32) local.get $0 local.tee $3 - i32.eqz - local.tee $0 if (result i32) - local.get $0 - else local.get $3 i32.const 176 i32.load i32.gt_u + else + i32.const 1 end if (result i32) unreachable diff --git a/tests/compiler/runtime/flags.untouched.wat b/tests/compiler/runtime/flags.untouched.wat index 128e165455..7d6d5c7fb5 100644 --- a/tests/compiler/runtime/flags.untouched.wat +++ b/tests/compiler/runtime/flags.untouched.wat @@ -58,14 +58,12 @@ (start $start) (func $~lib/runtime/runtime.flags (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/runtime/RTTI_BASE local.set $1 local.get $0 i32.eqz - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 local.get $1 @@ -845,7 +843,7 @@ i32.load i32.le_u else - local.get $2 + i32.const 0 end if loop $continue|0 @@ -1093,13 +1091,12 @@ local.get $3 global.get $~lib/allocator/tlsf/Block.MIN_SIZE i32.ge_u - local.tee $4 if (result i32) local.get $3 global.get $~lib/allocator/tlsf/Block.MAX_SIZE i32.lt_u else - local.get $4 + i32.const 0 end i32.eqz if @@ -1115,17 +1112,17 @@ i32.lt_u if i32.const 0 - local.set $5 + local.set $4 local.get $3 i32.const 8 i32.div_u - local.set $6 + local.set $5 else local.get $3 call $~lib/allocator/tlsf/fls - local.set $5 + local.set $4 local.get $3 - local.get $5 + local.get $4 global.get $~lib/allocator/tlsf/SL_BITS i32.sub i32.shr_u @@ -1133,70 +1130,70 @@ global.get $~lib/allocator/tlsf/SL_BITS i32.shl i32.xor - local.set $6 - local.get $5 + local.set $5 + local.get $4 global.get $~lib/allocator/tlsf/SB_BITS i32.const 1 i32.sub i32.sub - local.set $5 + local.set $4 end local.get $1 i32.load offset=4 - local.set $7 + local.set $6 local.get $1 i32.load offset=8 - local.set $8 - local.get $7 + local.set $7 + local.get $6 if + local.get $6 local.get $7 - local.get $8 i32.store offset=8 end - local.get $8 + local.get $7 if - local.get $8 local.get $7 + local.get $6 i32.store offset=4 end local.get $1 local.get $0 + local.get $4 local.get $5 - local.get $6 call $~lib/allocator/tlsf/Root#getHead i32.eq if local.get $0 + local.get $4 local.get $5 - local.get $6 - local.get $8 + local.get $7 call $~lib/allocator/tlsf/Root#setHead - local.get $8 + local.get $7 i32.eqz if local.get $0 - local.get $5 + local.get $4 call $~lib/allocator/tlsf/Root#getSLMap - local.set $4 + local.set $8 local.get $0 - local.get $5 local.get $4 + local.get $8 i32.const 1 - local.get $6 + local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $4 + local.tee $8 call $~lib/allocator/tlsf/Root#setSLMap - local.get $4 + local.get $8 i32.eqz if local.get $0 local.get $0 i32.load i32.const 1 - local.get $5 + local.get $4 i32.shl i32.const -1 i32.xor @@ -1328,13 +1325,12 @@ local.tee $3 global.get $~lib/allocator/tlsf/Block.MIN_SIZE i32.ge_u - local.tee $4 if (result i32) local.get $3 global.get $~lib/allocator/tlsf/Block.MAX_SIZE i32.lt_u else - local.get $4 + i32.const 0 end i32.eqz if @@ -1461,13 +1457,12 @@ local.get $3 global.get $~lib/allocator/tlsf/Block.MIN_SIZE i32.ge_u - local.tee $7 if (result i32) local.get $3 global.get $~lib/allocator/tlsf/Block.MAX_SIZE i32.lt_u else - local.get $7 + i32.const 0 end i32.eqz if @@ -1745,13 +1740,12 @@ local.get $1 global.get $~lib/allocator/tlsf/Block.MIN_SIZE i32.ge_u - local.tee $2 if (result i32) local.get $1 global.get $~lib/allocator/tlsf/Block.MAX_SIZE i32.lt_u else - local.get $2 + i32.const 0 end i32.eqz if @@ -1767,17 +1761,17 @@ i32.lt_u if i32.const 0 - local.set $3 + local.set $2 local.get $1 i32.const 8 i32.div_u - local.set $4 + local.set $3 else local.get $1 call $~lib/allocator/tlsf/fls - local.set $3 + local.set $2 local.get $1 - local.get $3 + local.get $2 global.get $~lib/allocator/tlsf/SL_BITS i32.sub i32.shr_u @@ -1785,43 +1779,43 @@ global.get $~lib/allocator/tlsf/SL_BITS i32.shl i32.xor - local.set $4 - local.get $3 + local.set $3 + local.get $2 global.get $~lib/allocator/tlsf/SB_BITS i32.const 1 i32.sub i32.sub - local.set $3 - local.get $4 + local.set $2 + local.get $3 global.get $~lib/allocator/tlsf/SL_SIZE i32.const 1 i32.sub i32.lt_u if - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 else - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 i32.const 0 - local.set $4 + local.set $3 end end local.get $0 - local.get $3 + local.get $2 call $~lib/allocator/tlsf/Root#getSLMap i32.const 0 i32.const -1 i32.xor - local.get $4 + local.get $3 i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -1829,23 +1823,23 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $2 i32.const 1 i32.add i32.shl i32.and - local.set $2 - local.get $2 + local.set $6 + local.get $6 i32.eqz if i32.const 0 - local.set $6 + local.set $5 else - local.get $2 + local.get $6 call $~lib/allocator/tlsf/ffs - local.set $3 + local.set $2 local.get $0 - local.get $3 + local.get $2 call $~lib/allocator/tlsf/Root#getSLMap local.tee $7 if (result i32) @@ -1858,23 +1852,23 @@ call $~lib/builtins/abort unreachable end - local.set $5 + local.set $4 local.get $0 - local.get $3 - local.get $5 + local.get $2 + local.get $4 call $~lib/allocator/tlsf/ffs call $~lib/allocator/tlsf/Root#getHead - local.set $6 + local.set $5 end else local.get $0 - local.get $3 - local.get $5 + local.get $2 + local.get $4 call $~lib/allocator/tlsf/ffs call $~lib/allocator/tlsf/Root#getHead - local.set $6 + local.set $5 end - local.get $6 + local.get $5 ) (func $~lib/allocator/tlsf/Root#use (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -1898,13 +1892,12 @@ local.get $2 global.get $~lib/allocator/tlsf/Block.MIN_SIZE i32.ge_u - local.tee $4 if (result i32) local.get $2 global.get $~lib/allocator/tlsf/Block.MAX_SIZE i32.lt_u else - local.get $4 + i32.const 0 end i32.eqz if @@ -1938,8 +1931,8 @@ i32.and local.get $2 i32.sub - local.set $5 - local.get $5 + local.set $4 + local.get $4 global.get $~lib/allocator/tlsf/Block.INFO global.get $~lib/allocator/tlsf/Block.MIN_SIZE i32.add @@ -1957,16 +1950,16 @@ i32.add local.get $2 i32.add - local.set $4 - local.get $4 + local.set $5 local.get $5 + local.get $4 global.get $~lib/allocator/tlsf/Block.INFO i32.sub global.get $~lib/allocator/tlsf/FREE i32.or i32.store local.get $0 - local.get $4 + local.get $5 call $~lib/allocator/tlsf/Root#insert else local.get $1 @@ -1978,7 +1971,7 @@ i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $4 + local.tee $5 i32.eqz if (result i32) i32.const 0 @@ -1988,11 +1981,11 @@ call $~lib/builtins/abort unreachable else - local.get $4 + local.get $5 end - local.set $4 - local.get $4 - local.get $4 + local.set $5 + local.get $5 + local.get $5 i32.load global.get $~lib/allocator/tlsf/LEFT_FREE i32.const -1 @@ -2042,7 +2035,6 @@ local.get $4 local.get $3 i32.gt_s - local.tee $5 if (result i32) local.get $4 local.get $3 @@ -2051,7 +2043,7 @@ i32.const 0 i32.lt_s else - local.get $5 + i32.const 0 end if unreachable @@ -2501,7 +2493,6 @@ global.get $~lib/collector/itcm/white i32.eqz i32.eq - local.tee $2 if (result i32) block $~lib/collector/itcm/refToObj|inlined.3 (result i32) local.get $0 @@ -2514,7 +2505,7 @@ global.get $~lib/collector/itcm/white i32.eq else - local.get $2 + i32.const 0 end if local.get $3 diff --git a/tests/compiler/runtime/instanceof.optimized.wat b/tests/compiler/runtime/instanceof.optimized.wat index 843f42d356..0f9b512d38 100644 --- a/tests/compiler/runtime/instanceof.optimized.wat +++ b/tests/compiler/runtime/instanceof.optimized.wat @@ -239,7 +239,7 @@ i32.load i32.le_u else - local.get $0 + i32.const 0 end if loop $continue|0 @@ -669,19 +669,15 @@ end ) (func $~lib/runtime/runtime.flags (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if + if (result i32) local.get $0 i32.const 280 i32.load i32.gt_u - local.set $1 + else + i32.const 1 end - local.get $1 if (result i32) unreachable else @@ -759,15 +755,13 @@ (local $6 i32) local.get $0 local.tee $3 - i32.eqz - local.tee $0 if (result i32) - local.get $0 - else local.get $3 i32.const 280 i32.load i32.gt_u + else + i32.const 1 end if (result i32) unreachable diff --git a/tests/compiler/runtime/instanceof.untouched.wat b/tests/compiler/runtime/instanceof.untouched.wat index 1b646882c3..d3bee43c27 100644 --- a/tests/compiler/runtime/instanceof.untouched.wat +++ b/tests/compiler/runtime/instanceof.untouched.wat @@ -290,7 +290,7 @@ i32.load i32.le_u else - local.get $2 + i32.const 0 end if loop $continue|0 @@ -826,14 +826,12 @@ ) (func $~lib/runtime/runtime.flags (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/runtime/RTTI_BASE local.set $1 local.get $0 i32.eqz - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 local.get $1 diff --git a/tests/compiler/std/allocator_arena.optimized.wat b/tests/compiler/std/allocator_arena.optimized.wat index 7a87a4ea35..7e7d9d6247 100644 --- a/tests/compiler/std/allocator_arena.optimized.wat +++ b/tests/compiler/std/allocator_arena.optimized.wat @@ -436,7 +436,6 @@ (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) i32.const 72 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset @@ -534,18 +533,15 @@ drop loop $continue|2 local.get $0 - i32.const 0 - i32.ne - local.tee $3 - if + if (result i32) local.get $2 i32.load8_u local.get $1 i32.load8_u i32.eq - local.set $3 + else + i32.const 0 end - local.get $3 if local.get $0 i32.const 1 diff --git a/tests/compiler/std/allocator_arena.untouched.wat b/tests/compiler/std/allocator_arena.untouched.wat index c61ed815df..bab984aa68 100644 --- a/tests/compiler/std/allocator_arena.untouched.wat +++ b/tests/compiler/std/allocator_arena.untouched.wat @@ -589,7 +589,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -718,7 +717,6 @@ local.get $3 i32.const 0 i32.ne - local.tee $6 if (result i32) local.get $5 i32.load8_u @@ -726,7 +724,7 @@ i32.load8_u i32.eq else - local.get $6 + i32.const 0 end if block diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 5d36b739a9..e70fc97cb0 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -93,45 +93,44 @@ ) (func $~lib/util/string/compareImpl (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) - i32.const 72 - local.set $3 local.get $1 i32.const 1 i32.shl local.get $0 i32.add + local.set $0 + i32.const 72 local.set $1 loop $continue|0 local.get $2 if (result i32) - local.get $1 + local.get $0 i32.load16_u - local.get $3 + local.get $1 i32.load16_u i32.sub - local.tee $4 + local.tee $3 i32.eqz else - local.get $2 + i32.const 0 end if local.get $2 i32.const 1 i32.sub local.set $2 - local.get $1 + local.get $0 i32.const 2 i32.add - local.set $1 - local.get $3 + local.set $0 + local.get $1 i32.const 2 i32.add - local.set $3 + local.set $1 br $continue|0 end end - local.get $4 + local.get $3 ) (func $~lib/string/String#startsWith (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 247837bcdf..518cfbf2d0 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -179,7 +179,7 @@ local.tee $5 i32.eqz else - local.get $4 + i32.const 0 end if block diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 5e06fcffe7..81fc76cd45 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -595,7 +595,7 @@ i32.load i32.le_u else - local.get $0 + i32.const 0 end if loop $continue|0 @@ -619,19 +619,15 @@ i32.const 0 ) (func $~lib/runtime/runtime.flags (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if + if (result i32) local.get $0 i32.const 336 i32.load i32.gt_u - local.set $1 + else + i32.const 1 end - local.get $1 if (result i32) unreachable else @@ -667,15 +663,13 @@ (local $4 i32) local.get $0 local.tee $2 - i32.eqz - local.tee $0 if (result i32) - local.get $0 - else local.get $2 i32.const 336 i32.load i32.gt_u + else + i32.const 1 end if (result i32) unreachable diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index a728ff0e49..f51516df75 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -1037,7 +1037,7 @@ i32.load i32.le_u else - local.get $2 + i32.const 0 end if loop $continue|0 @@ -1062,14 +1062,12 @@ ) (func $~lib/runtime/runtime.flags (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/runtime/RTTI_BASE local.set $1 local.get $0 i32.eqz - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 local.get $1 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 9f49ff3927..d488ca16e0 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -1751,34 +1751,31 @@ local.get $4 i32.lt_s select - local.set $4 + local.set $3 + local.get $1 + local.get $2 + local.get $3 + i32.add + i32.lt_s + i32.const 0 local.get $2 local.get $1 i32.lt_s - local.tee $3 - if - local.get $1 - local.get $2 - local.get $4 - i32.add - i32.lt_s - local.set $3 - end - local.get $3 + select if - local.get $4 + local.get $3 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $2 i32.add local.set $2 local.get $1 - local.get $3 + local.get $4 i32.add local.set $1 loop $continue|0 - local.get $4 + local.get $3 if local.get $1 i32.const 2 @@ -1800,10 +1797,10 @@ i32.const 1 i32.sub local.set $1 - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $continue|0 end end @@ -1818,7 +1815,7 @@ i32.shl local.get $5 i32.add - local.get $4 + local.get $3 i32.const 2 i32.shl call $~lib/memory/memory.copy @@ -1948,20 +1945,16 @@ ) (func $~lib/array/Array#indexOf (; 26 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load offset=12 local.tee $3 - i32.eqz - local.tee $4 - i32.eqz - if + if (result i32) local.get $2 local.get $3 i32.ge_s - local.set $4 + else + i32.const 1 end - local.get $4 if i32.const -1 return @@ -2849,26 +2842,20 @@ local.get $2 ) (func $start:std/array~anonymous|31 (; 67 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + i32.const 1 + local.get $1 + i32.const 2 + i32.gt_s local.get $0 - i32.eqz - if - local.get $1 - i32.const 2 - i32.gt_s - local.set $0 - end - local.get $0 + select ) (func $start:std/array~anonymous|32 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + i32.const 1 + local.get $1 + i32.const 100 + i32.gt_s local.get $0 - i32.eqz - if - local.get $1 - i32.const 100 - i32.gt_s - local.set $0 - end - local.get $0 + select ) (func $start:std/array~anonymous|33 (; 69 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 @@ -4990,7 +4977,7 @@ local.tee $3 i32.eqz else - local.get $2 + i32.const 0 end if local.get $2 @@ -5013,64 +5000,49 @@ (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 110 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - block (result i32) - local.get $0 - local.get $1 - i32.eq - local.tee $2 - i32.eqz - if - local.get $0 - i32.eqz - local.set $2 - end - local.get $2 - i32.eqz - end - if (result i32) - local.get $1 - i32.eqz - else - local.get $2 - end + i32.const 1 + local.get $1 + i32.eqz + i32.const 1 + local.get $0 + i32.eqz + local.get $0 + local.get $1 + i32.eq + select + select if i32.const 0 return end + i32.const 0 local.get $1 i32.const 16 i32.sub i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 + local.tee $2 + i32.eqz local.get $0 i32.const 16 i32.sub i32.load offset=4 i32.const 1 i32.shr_u - local.tee $4 - i32.eqz - local.tee $2 - if (result i32) - local.get $3 - i32.eqz - else - local.get $2 - end + local.tee $3 + select if i32.const 0 return end - local.get $4 + local.get $3 i32.eqz if i32.const -1 return end - local.get $3 + local.get $2 i32.eqz if i32.const 1 @@ -5078,10 +5050,10 @@ end local.get $0 local.get $1 - local.get $4 local.get $3 - local.get $4 + local.get $2 local.get $3 + local.get $2 i32.lt_s select call $~lib/util/string/compareImpl @@ -5125,15 +5097,11 @@ i32.const 1 return end - local.get $0 + local.get $1 i32.eqz - local.tee $2 - if (result i32) - local.get $2 - else - local.get $1 - i32.eqz - end + i32.const 1 + local.get $0 + select if i32.const 0 return @@ -5372,7 +5340,6 @@ (func $~lib/string/String#substring (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 i32.eqz if @@ -5408,34 +5375,34 @@ local.get $2 i32.lt_s select - local.tee $1 + local.tee $2 local.get $3 - local.get $1 + local.get $2 i32.gt_s select i32.const 1 i32.shl - local.tee $4 + local.tee $1 local.get $3 - local.get $1 + local.get $2 local.get $3 - local.get $1 + local.get $2 i32.lt_s select i32.const 1 i32.shl - local.tee $2 - i32.sub local.tee $3 + i32.sub + local.tee $2 i32.eqz if i32.const 4208 return end - local.get $2 - i32.eqz - local.tee $1 - if + local.get $3 + if (result i32) + i32.const 0 + else local.get $0 i32.const 16 i32.sub @@ -5444,22 +5411,20 @@ i32.shr_u i32.const 1 i32.shl - local.get $4 + local.get $1 i32.eq - local.set $1 end - local.get $1 if local.get $0 return end - local.get $3 + local.get $2 call $~lib/util/runtime/allocate local.tee $1 local.get $0 - local.get $2 - i32.add local.get $3 + i32.add + local.get $2 call $~lib/memory/memory.copy local.get $1 i32.const 16 @@ -5552,8 +5517,6 @@ local.get $5 i32.add i32.load8_u - i32.const 0 - i32.ne local.tee $8 i32.eqz i32.const 4 @@ -5604,8 +5567,6 @@ local.get $3 i32.add i32.load8_u - i32.const 0 - i32.ne local.tee $3 i32.eqz i32.const 4 @@ -6417,41 +6378,36 @@ i32.load16_u local.set $4 loop $continue|2 + local.get $5 + local.get $1 + i64.sub + local.get $3 + i64.ge_u + i32.const 0 local.get $1 local.get $9 i64.lt_u - local.tee $0 - if - local.get $5 + select + if (result i32) + i32.const 1 + local.get $9 local.get $1 i64.sub + local.get $1 local.get $3 - i64.ge_u - local.set $0 - end - local.get $0 - if + i64.add + local.get $9 + i64.sub + i64.gt_u local.get $1 local.get $3 i64.add local.get $9 i64.lt_u - local.tee $0 - i32.eqz - if - local.get $9 - local.get $1 - i64.sub - local.get $1 - local.get $3 - i64.add - local.get $9 - i64.sub - i64.gt_u - local.set $0 - end + select + else + i32.const 0 end - local.get $0 if local.get $4 i32.const 1 @@ -6549,41 +6505,36 @@ i32.load16_u local.set $4 loop $continue|4 + local.get $5 + local.get $1 + i64.sub + local.get $10 + i64.ge_u + i32.const 0 local.get $1 local.get $3 i64.lt_u - local.tee $0 - if - local.get $5 + select + if (result i32) + i32.const 1 + local.get $3 local.get $1 i64.sub + local.get $1 local.get $10 - i64.ge_u - local.set $0 - end - local.get $0 - if + i64.add + local.get $3 + i64.sub + i64.gt_u local.get $1 local.get $10 i64.add local.get $3 i64.lt_u - local.tee $0 - i32.eqz - if - local.get $3 - local.get $1 - i64.sub - local.get $1 - local.get $10 - i64.add - local.get $3 - i64.sub - i64.gt_u - local.set $0 - end + select + else + i32.const 0 end - local.get $0 if local.get $4 i32.const 1 @@ -6604,7 +6555,6 @@ ) (func $~lib/util/number/prettify (; 134 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $2 i32.eqz if @@ -6626,14 +6576,13 @@ i32.add local.tee $3 i32.le_s - local.tee $4 - if + if (result i32) local.get $3 i32.const 21 i32.le_s - local.set $4 + else + i32.const 0 end - local.get $4 if (result i32) loop $repeat|0 block $break|0 @@ -6666,17 +6615,14 @@ i32.const 2 i32.add else + local.get $3 + i32.const 21 + i32.le_s + i32.const 0 local.get $3 i32.const 0 i32.gt_s - local.tee $4 - if - local.get $3 - i32.const 21 - i32.le_s - local.set $4 - end - local.get $4 + select if (result i32) local.get $3 i32.const 1 @@ -6700,22 +6646,19 @@ i32.const 1 i32.add else + local.get $3 + i32.const 0 + i32.le_s + i32.const 0 i32.const -6 local.get $3 i32.lt_s - local.tee $2 - if - local.get $3 - i32.const 0 - i32.le_s - local.set $2 - end - local.get $2 + select if (result i32) i32.const 2 local.get $3 i32.sub - local.tee $4 + local.tee $3 i32.const 1 i32.shl local.get $0 @@ -6733,7 +6676,7 @@ loop $repeat|1 block $break|1 local.get $2 - local.get $4 + local.get $3 i32.ge_s br_if $break|1 local.get $2 @@ -6751,7 +6694,7 @@ end end local.get $1 - local.get $4 + local.get $3 i32.add else local.get $1 @@ -6830,7 +6773,7 @@ local.tee $0 i32.const 0 i32.lt_s - local.tee $4 + local.tee $3 if i32.const 0 local.get $0 @@ -6848,7 +6791,7 @@ local.get $2 i32.const 45 i32.const 43 - local.get $4 + local.get $3 select i32.store16 local.get $0 @@ -13504,7 +13447,7 @@ i32.load i32.le_u else - local.get $0 + i32.const 0 end if loop $continue|0 @@ -13528,19 +13471,15 @@ i32.const 0 ) (func $~lib/runtime/runtime.flags (; 166 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if + if (result i32) local.get $0 i32.const 8072 i32.load i32.gt_u - local.set $1 + else + i32.const 1 end - local.get $1 if (result i32) unreachable else @@ -13576,15 +13515,13 @@ (local $4 i32) local.get $0 local.tee $2 - i32.eqz - local.tee $0 if (result i32) - local.get $0 - else local.get $2 i32.const 8072 i32.load i32.gt_u + else + i32.const 1 end if (result i32) unreachable diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index c76fdbcef2..153a667d76 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -857,7 +857,7 @@ i32.const 0 i32.ne else - i32.const 1 + i32.const 0 end ) (func $~lib/array/Array.isArray<~lib/array/Array> (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -867,7 +867,7 @@ i32.const 0 i32.ne else - i32.const 1 + i32.const 0 end ) (func $std/array/P#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -2022,7 +2022,6 @@ local.get $9 local.get $8 i32.lt_s - local.tee $6 if (result i32) local.get $8 local.get $9 @@ -2030,7 +2029,7 @@ i32.add i32.lt_s else - local.get $6 + i32.const 0 end if local.get $9 @@ -2300,9 +2299,8 @@ local.get $3 i32.const 0 i32.eq - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 local.get $3 @@ -2564,8 +2562,6 @@ local.get $1 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if local.get $2 return @@ -2752,8 +2748,6 @@ local.get $1 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if i32.const 1 return @@ -3271,8 +3265,6 @@ local.get $1 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if local.get $3 local.get $5 @@ -3395,10 +3387,8 @@ ) (func $start:std/array~anonymous|31 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 - i32.const 0 - i32.ne if (result i32) - local.get $0 + i32.const 1 else local.get $1 i32.const 2 @@ -3465,10 +3455,8 @@ ) (func $start:std/array~anonymous|32 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 - i32.const 0 - i32.ne if (result i32) - local.get $0 + i32.const 1 else local.get $1 i32.const 100 @@ -3554,10 +3542,8 @@ ) (func $start:std/array~anonymous|38 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 - i32.const 0 - i32.ne if (result i32) - local.get $0 + i32.const 1 else local.get $1 i32.const 2 @@ -3611,10 +3597,8 @@ ) (func $start:std/array~anonymous|39 (; 109 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 - i32.const 0 - i32.ne if (result i32) - local.get $0 + i32.const 1 else local.get $1 i32.const 100 @@ -7444,7 +7428,7 @@ local.tee $5 i32.eqz else - local.get $4 + i32.const 0 end if block @@ -7475,17 +7459,15 @@ local.get $0 local.get $1 i32.eq - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 i32.const 0 i32.eq end - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $1 i32.const 0 @@ -7497,30 +7479,29 @@ end local.get $0 call $~lib/string/String#get:length - local.set $3 + local.set $2 local.get $1 call $~lib/string/String#get:length - local.set $4 - local.get $3 + local.set $3 + local.get $2 i32.eqz - local.tee $2 if (result i32) - local.get $4 + local.get $3 i32.eqz else - local.get $2 + i32.const 0 end if i32.const 0 return end - local.get $3 + local.get $2 i32.eqz if i32.const -1 return end - local.get $4 + local.get $3 i32.eqz if i32.const 1 @@ -7530,11 +7511,11 @@ i32.const 0 local.get $1 i32.const 0 + local.get $2 + local.tee $4 local.get $3 - local.tee $2 - local.get $4 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.lt_s select @@ -7563,7 +7544,6 @@ ) (func $~lib/string/String.__eq (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 i32.eq @@ -7574,9 +7554,8 @@ local.get $0 i32.const 0 i32.eq - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $1 i32.const 0 @@ -7588,8 +7567,8 @@ end local.get $0 call $~lib/string/String#get:length - local.set $3 - local.get $3 + local.set $2 + local.get $2 local.get $1 call $~lib/string/String#get:length i32.ne @@ -7601,7 +7580,7 @@ i32.const 0 local.get $1 i32.const 0 - local.get $3 + local.get $2 call $~lib/util/string/compareImpl i32.eqz ) @@ -8232,17 +8211,15 @@ local.get $0 local.get $1 i32.eq - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 i32.const 0 i32.eq end - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $1 i32.const 0 @@ -8254,30 +8231,29 @@ end local.get $0 call $~lib/string/String#get:length - local.set $3 + local.set $2 local.get $1 call $~lib/string/String#get:length - local.set $4 - local.get $3 + local.set $3 + local.get $2 i32.eqz - local.tee $2 if (result i32) - local.get $4 + local.get $3 i32.eqz else - local.get $2 + i32.const 0 end if i32.const 0 return end - local.get $3 + local.get $2 i32.eqz if i32.const -1 return end - local.get $4 + local.get $3 i32.eqz if i32.const 1 @@ -8287,11 +8263,11 @@ i32.const 0 local.get $1 i32.const 0 + local.get $2 + local.tee $4 local.get $3 - local.tee $2 - local.get $4 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.lt_s select @@ -8408,7 +8384,6 @@ end local.get $8 i32.eqz - local.tee $4 if (result i32) local.get $9 local.get $0 @@ -8417,7 +8392,7 @@ i32.shl i32.eq else - local.get $4 + i32.const 0 end if local.get $0 @@ -8502,8 +8477,6 @@ i32.const 4504 local.get $3 i32.load8_u - i32.const 0 - i32.ne select return end @@ -8557,8 +8530,6 @@ i32.const 4480 i32.const 4504 local.get $9 - i32.const 0 - i32.ne select local.get $5 i32.const 1 @@ -8615,8 +8586,6 @@ i32.const 4480 i32.const 4504 local.get $9 - i32.const 0 - i32.ne select local.get $5 i32.const 1 @@ -9386,7 +9355,6 @@ (local $24 i64) (local $25 i32) (local $26 i32) - (local $27 i32) i32.const 0 local.get $4 i32.sub @@ -9711,7 +9679,6 @@ local.get $23 local.get $21 i64.lt_u - local.tee $27 if (result i32) local.get $24 local.get $23 @@ -9719,18 +9686,16 @@ local.get $22 i64.ge_u else - local.get $27 + i32.const 0 end - local.tee $27 if (result i32) local.get $23 local.get $22 i64.add local.get $21 i64.lt_u - local.tee $27 if (result i32) - local.get $27 + i32.const 1 else local.get $21 local.get $23 @@ -9743,7 +9708,7 @@ i64.gt_u end else - local.get $27 + i32.const 0 end if block @@ -9873,7 +9838,6 @@ local.get $23 local.get $21 i64.lt_u - local.tee $20 if (result i32) local.get $24 local.get $23 @@ -9881,18 +9845,16 @@ local.get $22 i64.ge_u else - local.get $20 + i32.const 0 end - local.tee $20 if (result i32) local.get $23 local.get $22 i64.add local.get $21 i64.lt_u - local.tee $20 if (result i32) - local.get $20 + i32.const 1 else local.get $21 local.get $23 @@ -9905,7 +9867,7 @@ i64.gt_u end else - local.get $20 + i32.const 0 end if block @@ -9972,13 +9934,12 @@ local.get $1 local.get $3 i32.le_s - local.tee $4 if (result i32) local.get $3 i32.const 21 i32.le_s else - local.get $4 + i32.const 0 end if block $break|0 @@ -10025,13 +9986,12 @@ local.get $3 i32.const 0 i32.gt_s - local.tee $4 if (result i32) local.get $3 i32.const 21 i32.le_s else - local.get $4 + i32.const 0 end if local.get $0 @@ -10065,13 +10025,12 @@ i32.const -6 local.get $3 i32.lt_s - local.tee $4 if (result i32) local.get $3 i32.const 0 i32.le_s else - local.get $4 + i32.const 0 end if i32.const 2 @@ -18055,7 +18014,7 @@ i32.load i32.le_u else - local.get $2 + i32.const 0 end if loop $continue|0 @@ -18080,14 +18039,12 @@ ) (func $~lib/runtime/runtime.flags (; 289 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/runtime/RTTI_BASE local.set $1 local.get $0 i32.eqz - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 local.get $1 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 844b0fc553..4373eeb8ca 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1046,7 +1046,7 @@ i32.load i32.le_u else - local.get $0 + i32.const 0 end if loop $continue|0 @@ -1070,19 +1070,15 @@ i32.const 0 ) (func $~lib/runtime/runtime.flags (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if + if (result i32) local.get $0 i32.const 296 i32.load i32.gt_u - local.set $1 + else + i32.const 1 end - local.get $1 if (result i32) unreachable else @@ -1117,15 +1113,13 @@ (local $3 i32) (local $4 i32) local.get $0 - i32.eqz - local.tee $2 if (result i32) - local.get $2 - else local.get $0 i32.const 296 i32.load i32.gt_u + else + i32.const 1 end if (result i32) unreachable diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index aa140afed2..40fb69f7d0 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -1884,7 +1884,7 @@ i32.load i32.le_u else - local.get $2 + i32.const 0 end if loop $continue|0 @@ -1909,14 +1909,12 @@ ) (func $~lib/runtime/runtime.flags (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/runtime/RTTI_BASE local.set $1 local.get $0 i32.eqz - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 local.get $1 diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index ecae10449a..6533820060 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -2555,7 +2555,7 @@ i32.load i32.le_u else - local.get $0 + i32.const 0 end if loop $continue|0 @@ -2579,19 +2579,15 @@ i32.const 0 ) (func $~lib/runtime/runtime.flags (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if + if (result i32) local.get $0 i32.const 320 i32.load i32.gt_u - local.set $1 + else + i32.const 1 end - local.get $1 if (result i32) unreachable else @@ -2626,15 +2622,13 @@ (local $3 i32) (local $4 i32) local.get $0 - i32.eqz - local.tee $2 if (result i32) - local.get $2 - else local.get $0 i32.const 320 i32.load i32.gt_u + else + i32.const 1 end if (result i32) unreachable diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 7e06a04865..55cad3ba47 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -675,8 +675,6 @@ unreachable end local.get $2 - i32.const 0 - i32.ne if (result f32) local.get $0 i32.load offset=4 @@ -752,8 +750,6 @@ unreachable end local.get $2 - i32.const 0 - i32.ne if (result f64) local.get $0 i32.load offset=4 @@ -832,8 +828,6 @@ i32.load16_s local.set $3 local.get $2 - i32.const 0 - i32.ne if (result i32) local.get $3 else @@ -882,8 +876,6 @@ i32.load local.set $3 local.get $2 - i32.const 0 - i32.ne if (result i32) local.get $3 else @@ -957,8 +949,6 @@ i64.load local.set $3 local.get $2 - i32.const 0 - i32.ne if (result i64) local.get $3 else @@ -1026,8 +1016,6 @@ i32.load16_u local.set $3 local.get $2 - i32.const 0 - i32.ne if (result i32) local.get $3 else @@ -1062,8 +1050,6 @@ i32.load local.set $3 local.get $2 - i32.const 0 - i32.ne if (result i32) local.get $3 else @@ -1098,8 +1084,6 @@ i64.load local.set $3 local.get $2 - i32.const 0 - i32.ne if (result i64) local.get $3 else @@ -1127,8 +1111,6 @@ unreachable end local.get $3 - i32.const 0 - i32.ne if local.get $0 i32.load offset=4 @@ -1167,8 +1149,6 @@ unreachable end local.get $3 - i32.const 0 - i32.ne if local.get $0 i32.load offset=4 @@ -1231,8 +1211,6 @@ local.get $1 i32.add local.get $3 - i32.const 0 - i32.ne if (result i32) local.get $2 else @@ -1265,8 +1243,6 @@ local.get $1 i32.add local.get $3 - i32.const 0 - i32.ne if (result i32) local.get $2 else @@ -1299,8 +1275,6 @@ local.get $1 i32.add local.get $3 - i32.const 0 - i32.ne if (result i64) local.get $2 else @@ -1353,8 +1327,6 @@ local.get $1 i32.add local.get $3 - i32.const 0 - i32.ne if (result i32) local.get $2 else @@ -1387,8 +1359,6 @@ local.get $1 i32.add local.get $3 - i32.const 0 - i32.ne if (result i32) local.get $2 else @@ -1421,8 +1391,6 @@ local.get $1 i32.add local.get $3 - i32.const 0 - i32.ne if (result i64) local.get $2 else @@ -3214,7 +3182,7 @@ i32.load i32.le_u else - local.get $2 + i32.const 0 end if loop $continue|0 @@ -3239,14 +3207,12 @@ ) (func $~lib/runtime/runtime.flags (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/runtime/RTTI_BASE local.set $1 local.get $0 i32.eqz - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 local.get $1 diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index df16427ab8..e5f42c2fc0 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -284,7 +284,7 @@ i32.load i32.le_u else - local.get $0 + i32.const 0 end if loop $continue|0 @@ -308,19 +308,15 @@ i32.const 0 ) (func $~lib/runtime/runtime.flags (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if + if (result i32) local.get $0 i32.const 152 i32.load i32.gt_u - local.set $1 + else + i32.const 1 end - local.get $1 if (result i32) unreachable else @@ -355,15 +351,13 @@ (local $3 i32) (local $4 i32) local.get $0 - i32.eqz - local.tee $2 if (result i32) - local.get $2 - else local.get $0 i32.const 152 i32.load i32.gt_u + else + i32.const 1 end if (result i32) unreachable diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index e0115afecb..7819724ecc 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -419,7 +419,7 @@ i32.load i32.le_u else - local.get $2 + i32.const 0 end if loop $continue|0 @@ -444,14 +444,12 @@ ) (func $~lib/runtime/runtime.flags (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/runtime/RTTI_BASE local.set $1 local.get $0 i32.eqz - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 local.get $1 diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index 3ac8166d55..67dda68010 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -235,32 +235,29 @@ (local $1 f64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) - (local $6 f64) - (local $7 i64) - (local $8 f64) + (local $6 i64) + (local $7 f64) i32.const 1 - local.set $2 + local.set $3 local.get $0 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $2 i32.const 1071284858 i32.lt_u - local.tee $4 - i32.eqz - if - local.get $3 + if (result i32) + i32.const 1 + else + local.get $2 i32.const 31 i32.shr_u - local.set $4 end - local.get $4 if - local.get $3 + local.get $2 i32.const -1074790400 i32.ge_u if @@ -280,7 +277,7 @@ f64.div return end - local.get $3 + local.get $2 i32.const 1 i32.shl i32.const 2034237440 @@ -289,17 +286,17 @@ local.get $0 return end - local.get $3 + local.get $2 i32.const -1076707644 i32.le_u if i32.const 0 - local.set $2 + local.set $3 local.get $0 local.set $1 end else - local.get $3 + local.get $2 i32.const 2146435072 i32.ge_u if @@ -307,28 +304,28 @@ return end end - local.get $2 + local.get $3 if f64.const 1 local.get $0 f64.add i64.reinterpret_f64 - local.tee $7 + local.tee $6 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 614242 i32.add - local.tee $4 + local.tee $2 i32.const 20 i32.shr_u i32.const 1023 i32.sub - local.tee $2 + local.tee $3 i32.const 54 i32.lt_s if (result f64) - local.get $7 + local.get $6 f64.reinterpret_i64 local.set $1 f64.const 1 @@ -341,7 +338,7 @@ f64.const 1 f64.sub f64.sub - local.get $2 + local.get $3 i32.const 2 i32.ge_s select @@ -350,11 +347,11 @@ else f64.const 0 end - local.set $6 - local.get $7 + local.set $5 + local.get $6 i64.const 4294967295 i64.and - local.get $4 + local.get $2 i32.const 1048575 i32.and i32.const 1072079006 @@ -373,21 +370,21 @@ local.get $1 f64.add f64.div - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 f64.mul - local.tee $8 - local.get $8 + local.tee $7 + local.get $7 f64.mul local.set $0 - local.get $5 + local.get $4 f64.const 0.5 local.get $1 f64.mul local.get $1 f64.mul - local.tee $5 - local.get $8 + local.tee $4 + local.get $7 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -416,15 +413,15 @@ f64.add f64.add f64.mul - local.get $2 + local.get $3 f64.convert_i32_s local.tee $0 f64.const 1.9082149292705877e-10 f64.mul - local.get $6 + local.get $5 f64.add f64.add - local.get $5 + local.get $4 f64.sub local.get $1 f64.add @@ -435,32 +432,29 @@ ) (func $~lib/math/NativeMath.log (; 5 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 f64) (local $4 f64) - (local $5 f64) - (local $6 i32) - (local $7 f64) + (local $5 i32) + (local $6 f64) local.get $0 i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $1 i32.const 1048576 i32.lt_u - local.tee $1 - i32.eqz - if - local.get $2 + if (result i32) + i32.const 1 + else + local.get $1 i32.const 31 i32.shr_u - local.set $1 end - local.get $1 if - local.get $3 + local.get $2 i64.const 1 i64.shl i64.const 0 @@ -473,7 +467,7 @@ f64.div return end - local.get $2 + local.get $1 i32.const 31 i32.shr_u if @@ -485,18 +479,18 @@ return end i32.const -54 - local.set $6 + local.set $5 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 + local.set $1 else - local.get $2 + local.get $1 i32.const 2146435072 i32.ge_u if @@ -504,28 +498,25 @@ return else local.get $2 + i64.const 32 + i64.shl + i64.const 0 + i64.eq + i32.const 0 + local.get $1 i32.const 1072693248 i32.eq - local.tee $1 - if - local.get $3 - i64.const 32 - i64.shl - i64.const 0 - i64.eq - local.set $1 - end - local.get $1 + select if f64.const 0 return end end end - local.get $3 + local.get $2 i64.const 4294967295 i64.and - local.get $2 + local.get $1 i32.const 614242 i32.add local.tee $1 @@ -540,26 +531,26 @@ f64.reinterpret_i64 f64.const 1 f64.sub - local.tee $4 + local.tee $3 f64.const 2 - local.get $4 + local.get $3 f64.add f64.div - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 f64.mul - local.tee $7 - local.get $7 + local.tee $6 + local.get $6 f64.mul local.set $0 - local.get $5 - f64.const 0.5 local.get $4 + f64.const 0.5 + local.get $3 f64.mul - local.get $4 + local.get $3 f64.mul - local.tee $5 - local.get $7 + local.tee $4 + local.get $6 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -593,16 +584,16 @@ i32.shr_s i32.const 1023 i32.sub - local.get $6 + local.get $5 i32.add f64.convert_i32_s local.tee $0 f64.const 1.9082149292705877e-10 f64.mul f64.add - local.get $5 - f64.sub local.get $4 + f64.sub + local.get $3 f64.add local.get $0 f64.const 0.6931471803691238 @@ -670,14 +661,14 @@ (func $~lib/math/NativeMath.asin (; 8 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) - (local $3 i32) - (local $4 f64) + (local $3 f64) + (local $4 i32) local.get $0 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $4 i32.const 2147483647 i32.and local.tee $2 @@ -711,17 +702,14 @@ i32.const 1071644672 i32.lt_u if + local.get $2 + i32.const 1048576 + i32.ge_u + i32.const 0 local.get $2 i32.const 1045430272 i32.lt_u - local.tee $3 - if - local.get $2 - i32.const 1048576 - i32.ge_u - local.set $3 - end - local.get $3 + select if local.get $0 return @@ -747,7 +735,7 @@ local.set $0 local.get $1 call $~lib/math/R - local.set $4 + local.set $3 local.get $2 i32.const 1072640819 i32.ge_u @@ -756,7 +744,7 @@ f64.const 2 local.get $0 local.get $0 - local.get $4 + local.get $3 f64.mul f64.add f64.mul @@ -768,7 +756,7 @@ f64.const 2 local.get $0 f64.mul - local.get $4 + local.get $3 f64.mul f64.const 6.123233995736766e-17 f64.const 2 @@ -798,7 +786,7 @@ f64.sub end local.set $0 - local.get $3 + local.get $4 i32.const 31 i32.shr_u if @@ -1178,19 +1166,16 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i64) + (local $5 i64) + (local $6 i32) (local $7 i32) - local.get $1 - local.get $1 - f64.ne - local.tee $3 - local.set $2 - local.get $2 + i32.const 1 local.get $0 local.get $0 f64.ne - local.get $3 + local.get $1 + local.get $1 + f64.ne select if local.get $1 @@ -1200,20 +1185,20 @@ end local.get $0 i64.reinterpret_f64 - local.tee $6 + local.tee $5 i64.const 32 i64.shr_u i32.wrap_i64 local.set $3 - local.get $6 + local.get $5 i32.wrap_i64 - local.set $5 + local.set $6 local.get $1 i64.reinterpret_f64 - local.tee $6 + local.tee $5 i32.wrap_i64 local.tee $7 - local.get $6 + local.get $5 i64.const 32 i64.shr_u i32.wrap_i64 @@ -1241,11 +1226,11 @@ i32.const 2147483647 i32.and local.set $4 - local.get $5 local.get $3 i32.const 2147483647 i32.and - local.tee $5 + local.tee $3 + local.get $6 i32.or i32.eqz if @@ -1284,7 +1269,7 @@ i32.const 2146435072 i32.eq if - local.get $5 + local.get $3 i32.const 2146435072 i32.eq if @@ -1337,33 +1322,27 @@ end end end + i32.const 1 + local.get $3 + i32.const 2146435072 + i32.eq local.get $4 i32.const 67108864 i32.add - local.get $5 + local.get $3 i32.lt_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $5 - i32.const 2146435072 - i32.eq - end + select br_if $folding-inner0 + local.get $3 + i32.const 67108864 + i32.add + local.get $4 + i32.lt_u + i32.const 0 local.get $2 i32.const 2 i32.and - local.tee $3 - if (result i32) - local.get $5 - i32.const 67108864 - i32.add - local.get $4 - i32.lt_u - else - local.get $3 - end + select if (result f64) f64.const 0 else @@ -1595,14 +1574,14 @@ i64.const 63 i64.shr_u i32.wrap_i64 - local.set $5 + local.set $6 local.get $8 i64.const 32 i64.shr_u i64.const 2147483647 i64.and i32.wrap_i64 - local.tee $6 + local.tee $5 i32.const 1078159482 i32.ge_u if @@ -1613,7 +1592,7 @@ local.get $0 return end - local.get $5 + local.get $6 if f64.const -1 return @@ -1628,13 +1607,13 @@ return end end - local.get $6 + local.get $5 i32.const 1071001154 i32.gt_u if local.get $0 i32.const 1 - local.get $5 + local.get $6 i32.const 1 i32.shl i32.sub @@ -1646,7 +1625,7 @@ f64.copysign f64.add i32.trunc_f64_s - local.get $6 + local.get $5 i32.const 1072734898 i32.lt_u select @@ -1669,7 +1648,7 @@ f64.sub local.set $7 else - local.get $6 + local.get $5 i32.const 1016070144 i32.lt_u if @@ -1795,17 +1774,14 @@ i64.shl f64.reinterpret_i64 local.set $1 + i32.const 1 + local.get $3 + i32.const 56 + i32.gt_s local.get $3 i32.const 0 i32.lt_s - local.tee $5 - if (result i32) - local.get $5 - else - local.get $3 - i32.const 56 - i32.gt_s - end + select if local.get $0 local.get $2 @@ -2179,9 +2155,8 @@ (local $7 f64) (local $8 f64) (local $9 i32) - (local $10 i32) - (local $11 f64) - (local $12 i64) + (local $10 f64) + (local $11 i64) local.get $0 i64.reinterpret_f64 i64.const 9223372036854775807 @@ -2195,10 +2170,10 @@ i64.lt_u if local.get $4 - local.set $12 + local.set $11 local.get $2 local.set $4 - local.get $12 + local.get $11 local.set $2 end local.get $4 @@ -2223,18 +2198,14 @@ local.get $4 f64.reinterpret_i64 local.set $0 + i32.const 1 + local.get $2 + i64.const 0 + i64.eq local.get $5 i32.const 2047 i32.eq - local.tee $10 - i32.eqz - if - local.get $2 - i64.const 0 - i64.eq - local.set $10 - end - local.get $10 + select if local.get $0 return @@ -2294,7 +2265,7 @@ f64.add local.tee $7 f64.sub - local.set $11 + local.set $10 local.get $1 local.get $1 local.get $1 @@ -2335,9 +2306,9 @@ f64.const 2 local.get $7 f64.mul - local.get $11 + local.get $10 f64.add - local.get $11 + local.get $10 f64.mul f64.add f64.add @@ -2402,33 +2373,30 @@ (func $~lib/math/NativeMath.log10 (; 38 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 f64) - (local $6 i32) + (local $3 i64) + (local $4 f64) + (local $5 i32) + (local $6 f64) (local $7 f64) (local $8 f64) - (local $9 f64) local.get $0 i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $2 i32.const 1048576 i32.lt_u - local.tee $2 - i32.eqz - if - local.get $3 + if (result i32) + i32.const 1 + else + local.get $2 i32.const 31 i32.shr_u - local.set $2 end - local.get $2 if - local.get $4 + local.get $3 i64.const 1 i64.shl i64.const 0 @@ -2441,7 +2409,7 @@ f64.div return end - local.get $3 + local.get $2 i32.const 31 i32.shr_u if @@ -2453,18 +2421,18 @@ return end i32.const -54 - local.set $6 + local.set $5 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $3 + local.set $2 else - local.get $3 + local.get $2 i32.const 2146435072 i32.ge_u if @@ -2472,28 +2440,25 @@ return else local.get $3 + i64.const 32 + i64.shl + i64.const 0 + i64.eq + i32.const 0 + local.get $2 i32.const 1072693248 i32.eq - local.tee $2 - if - local.get $4 - i64.const 32 - i64.shl - i64.const 0 - i64.eq - local.set $2 - end - local.get $2 + select if f64.const 0 return end end end - local.get $4 + local.get $3 i64.const 4294967295 i64.and - local.get $3 + local.get $2 i32.const 614242 i32.add local.tee $2 @@ -2513,26 +2478,26 @@ local.get $1 f64.add f64.div + local.tee $6 + local.get $6 + f64.mul local.tee $7 local.get $7 f64.mul - local.tee $8 - local.get $8 - f64.mul local.set $0 local.get $2 i32.const 20 i32.shr_u i32.const 1023 i32.sub - local.get $6 + local.get $5 i32.add f64.convert_i32_s - local.tee $5 + local.tee $4 f64.const 0.30102999566361177 f64.mul - local.set $9 - local.get $5 + local.set $8 + local.get $4 f64.const 3.694239077158931e-13 f64.mul local.get $1 @@ -2548,13 +2513,13 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $5 + local.tee $4 f64.sub local.get $1 f64.sub - local.get $7 + local.get $6 local.get $1 - local.get $8 + local.get $7 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -2585,7 +2550,7 @@ f64.mul f64.add local.tee $0 - local.get $5 + local.get $4 f64.add f64.const 2.5082946711645275e-11 f64.mul @@ -2594,9 +2559,9 @@ f64.const 0.4342944818781689 f64.mul f64.add - local.get $9 - local.get $9 - local.get $5 + local.get $8 + local.get $8 + local.get $4 f64.const 0.4342944818781689 f64.mul local.tee $0 @@ -2620,32 +2585,29 @@ (func $~lib/math/NativeMath.log2 (; 41 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 f64) (local $5 f64) - (local $6 f64) - (local $7 i32) - (local $8 f64) + (local $6 i32) + (local $7 f64) local.get $0 i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $2 i32.const 1048576 i32.lt_u - local.tee $2 - i32.eqz - if - local.get $3 + if (result i32) + i32.const 1 + else + local.get $2 i32.const 31 i32.shr_u - local.set $2 end - local.get $2 if - local.get $4 + local.get $3 i64.const 1 i64.shl i64.const 0 @@ -2658,7 +2620,7 @@ f64.div return end - local.get $3 + local.get $2 i32.const 31 i32.shr_u if @@ -2670,18 +2632,18 @@ return end i32.const -54 - local.set $7 + local.set $6 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $3 + local.set $2 else - local.get $3 + local.get $2 i32.const 2146435072 i32.ge_u if @@ -2689,28 +2651,25 @@ return else local.get $3 + i64.const 32 + i64.shl + i64.const 0 + i64.eq + i32.const 0 + local.get $2 i32.const 1072693248 i32.eq - local.tee $2 - if - local.get $4 - i64.const 32 - i64.shl - i64.const 0 - i64.eq - local.set $2 - end - local.get $2 + select if f64.const 0 return end end end - local.get $4 + local.get $3 i64.const 4294967295 i64.and - local.get $3 + local.get $2 i32.const 614242 i32.add local.tee $2 @@ -2730,12 +2689,12 @@ local.get $1 f64.add f64.div + local.tee $4 + local.get $4 + f64.mul local.tee $5 local.get $5 f64.mul - local.tee $6 - local.get $6 - f64.mul local.set $0 local.get $1 local.get $1 @@ -2750,13 +2709,13 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $8 + local.tee $7 f64.sub local.get $1 f64.sub - local.get $5 + local.get $4 local.get $1 - local.get $6 + local.get $5 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -2792,18 +2751,18 @@ i32.shr_u i32.const 1023 i32.sub - local.get $7 + local.get $6 i32.add f64.convert_i32_s - local.tee $5 - local.get $8 + local.tee $4 + local.get $7 f64.const 1.4426950407214463 f64.mul - local.tee $6 + local.tee $5 f64.add local.set $1 local.get $0 - local.get $8 + local.get $7 f64.add f64.const 1.6751713164886512e-10 f64.mul @@ -2811,10 +2770,10 @@ f64.const 1.4426950407214463 f64.mul f64.add - local.get $5 + local.get $4 local.get $1 f64.sub - local.get $6 + local.get $5 f64.add f64.add local.get $1 @@ -2835,9 +2794,9 @@ f64.min ) (func $~lib/math/NativeMath.pow (; 45 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) - (local $2 i32) + (local $2 f64) (local $3 f64) - (local $4 f64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 f64) @@ -2866,7 +2825,7 @@ local.tee $17 i32.const 2147483647 i32.and - local.set $5 + local.set $4 local.get $1 i64.reinterpret_f64 local.tee $16 @@ -2887,46 +2846,38 @@ f64.const 1 return end - local.get $5 + i32.const 1 + local.get $8 i32.const 2146435072 i32.gt_s - local.tee $2 - i32.eqz - if - local.get $5 + local.get $4 + i32.const 2146435072 + i32.gt_s + if (result i32) + i32.const 1 + else + local.get $19 + i32.const 0 + i32.ne + i32.const 0 + local.get $4 i32.const 2146435072 i32.eq - local.tee $2 - if - local.get $19 - i32.const 0 - i32.ne - local.set $2 - end - end - local.get $2 - i32.eqz - if - local.get $8 - i32.const 2146435072 - i32.gt_s - local.set $2 + select end - local.get $2 - i32.eqz - if + select + if (result i32) + i32.const 1 + else + local.get $6 + i32.const 0 + i32.ne + i32.const 0 local.get $8 i32.const 2146435072 i32.eq - local.tee $2 - if - local.get $6 - i32.const 0 - i32.ne - local.set $2 - end + select end - local.get $2 if local.get $0 local.get $1 @@ -2959,8 +2910,8 @@ i32.gt_s local.tee $13 select - local.tee $2 - local.get $2 + local.tee $5 + local.get $5 i32.const 52 i32.const 20 local.get $13 @@ -2969,13 +2920,13 @@ i32.sub local.tee $13 i32.shr_s - local.tee $2 + local.tee $5 local.get $13 i32.shl i32.eq if (result i32) i32.const 2 - local.get $2 + local.get $5 i32.const 1 i32.and i32.sub @@ -2995,13 +2946,13 @@ i32.const 2146435072 i32.eq if - local.get $5 + local.get $4 i32.const 1072693248 i32.sub local.get $19 i32.or if - local.get $5 + local.get $4 i32.const 1072693248 i32.ge_s if @@ -3072,66 +3023,58 @@ end local.get $0 f64.abs - local.set $4 + local.set $3 local.get $19 i32.eqz if - local.get $5 - i32.eqz - local.tee $2 - i32.eqz - if - local.get $5 - i32.const 2146435072 - i32.eq - local.set $2 - end - local.get $2 - i32.eqz - if - local.get $5 - i32.const 1072693248 - i32.eq - local.set $2 - end - local.get $2 + i32.const 1 + local.get $4 + i32.const 1072693248 + i32.eq + local.get $4 + i32.const 2146435072 + i32.eq + i32.const 1 + local.get $4 + select + select if f64.const 1 - local.get $4 + local.get $3 f64.div - local.get $4 + local.get $3 local.get $9 i32.const 0 i32.lt_s select - local.set $4 + local.set $3 local.get $17 i32.const 0 i32.lt_s if (result f64) - local.get $5 + local.get $4 i32.const 1072693248 i32.sub local.get $11 i32.or if (result f64) - local.get $4 + local.get $3 f64.neg - local.get $4 + local.get $3 local.get $11 i32.const 1 i32.eq select else - local.get $4 - local.get $4 + local.get $3 + local.get $3 f64.sub local.tee $0 local.get $0 f64.div end else - local.get $4 + local.get $3 end return end @@ -3169,7 +3112,7 @@ i32.const 1139802112 i32.gt_s if - local.get $5 + local.get $4 i32.const 1072693247 i32.le_s if @@ -3181,7 +3124,7 @@ select return end - local.get $5 + local.get $4 i32.const 1072693248 i32.ge_s if @@ -3194,7 +3137,7 @@ return end end - local.get $5 + local.get $4 i32.const 1072693247 i32.lt_s if @@ -3216,7 +3159,7 @@ end return end - local.get $5 + local.get $4 i32.const 1072693248 i32.gt_s if @@ -3238,16 +3181,16 @@ end return end - local.get $4 + local.get $3 f64.const 1 f64.sub - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f64.mul f64.const 0.5 - local.get $3 + local.get $2 f64.const 0.3333333333333333 - local.get $3 + local.get $2 f64.const 0.25 f64.mul f64.sub @@ -3256,10 +3199,10 @@ f64.mul local.set $0 f64.const 1.4426950216293335 - local.get $3 + local.get $2 f64.mul - local.tee $4 - local.get $3 + local.tee $3 + local.get $2 f64.const 1.9259629911266175e-08 f64.mul local.get $0 @@ -3275,50 +3218,50 @@ local.set $10 local.get $0 local.get $10 - local.get $4 + local.get $3 f64.sub f64.sub else i32.const 0 local.set $6 - local.get $5 + local.get $4 i32.const 1048576 i32.lt_s if (result i32) - local.get $4 + local.get $3 f64.const 9007199254740992 f64.mul - local.tee $4 + local.tee $3 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $5 + local.set $4 i32.const -53 else i32.const 0 end - local.get $5 + local.get $4 i32.const 20 i32.shr_s i32.const 1023 i32.sub i32.add local.set $6 - local.get $5 + local.get $4 i32.const 1048575 i32.and - local.tee $2 + local.tee $5 i32.const 1072693248 i32.or - local.set $5 - local.get $2 + local.set $4 + local.get $5 i32.const 235662 i32.le_s if (result i32) i32.const 0 else - local.get $2 + local.get $5 i32.const 767610 i32.lt_s if (result i32) @@ -3328,38 +3271,38 @@ i32.const 1 i32.add local.set $6 - local.get $5 + local.get $4 i32.const -1048576 i32.add - local.set $5 + local.set $4 i32.const 0 end end - local.set $2 - local.get $4 + local.set $5 + local.get $3 i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $5 + local.get $4 i64.extend_i32_s i64.const 32 i64.shl i64.or f64.reinterpret_i64 - local.tee $4 + local.tee $3 f64.const 1.5 f64.const 1 - local.get $2 + local.get $5 select local.tee $0 f64.sub local.tee $10 f64.const 1 - local.get $4 + local.get $3 local.get $0 f64.add f64.div - local.tee $3 + local.tee $2 f64.mul local.tee $18 i64.reinterpret_f64 @@ -3367,15 +3310,15 @@ i64.and f64.reinterpret_i64 local.set $14 + local.get $3 local.get $4 - local.get $5 i32.const 1 i32.shr_s i32.const 536870912 i32.or i32.const 524288 i32.add - local.get $2 + local.get $5 i32.const 18 i32.shl i32.add @@ -3383,7 +3326,7 @@ i64.const 32 i64.shl f64.reinterpret_i64 - local.tee $4 + local.tee $3 local.get $0 f64.sub f64.sub @@ -3424,10 +3367,10 @@ f64.mul f64.add f64.mul - local.get $3 + local.get $2 local.get $10 local.get $14 - local.get $4 + local.get $3 f64.mul f64.sub local.get $14 @@ -3435,7 +3378,7 @@ f64.mul f64.sub f64.mul - local.tee $3 + local.tee $2 local.get $14 local.get $18 f64.add @@ -3449,8 +3392,8 @@ f64.reinterpret_i64 local.tee $10 f64.mul - local.tee $4 - local.get $3 + local.tee $3 + local.get $2 local.get $10 f64.mul local.get $0 @@ -3469,15 +3412,15 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $3 + local.tee $2 f64.mul local.tee $20 f64.const -7.028461650952758e-09 - local.get $3 + local.get $2 f64.mul local.get $0 + local.get $2 local.get $3 - local.get $4 f64.sub f64.sub f64.const 0.9617966939259756 @@ -3485,16 +3428,16 @@ f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $2 + local.get $5 select f64.add - local.tee $3 + local.tee $2 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $2 + local.get $5 select - local.tee $4 + local.tee $3 f64.add local.get $6 f64.convert_i32_s @@ -3505,17 +3448,17 @@ i64.and f64.reinterpret_i64 local.set $10 - local.get $3 + local.get $2 local.get $10 local.get $0 f64.sub - local.get $4 + local.get $3 f64.sub local.get $20 f64.sub f64.sub end - local.set $4 + local.set $3 local.get $1 local.get $1 i64.reinterpret_f64 @@ -3527,20 +3470,20 @@ local.get $10 f64.mul local.get $1 - local.get $4 + local.get $3 f64.mul f64.add local.tee $1 local.get $0 local.get $10 f64.mul - local.tee $3 + local.tee $2 f64.add local.tee $0 i64.reinterpret_f64 local.tee $16 i32.wrap_i64 - local.set $2 + local.set $5 block $folding-inner1 block $folding-inner0 local.get $16 @@ -3554,14 +3497,14 @@ local.get $12 i32.const 1083179008 i32.sub - local.get $2 + local.get $5 i32.or br_if $folding-inner0 local.get $1 f64.const 8.008566259537294e-17 f64.add local.get $0 - local.get $3 + local.get $2 f64.sub f64.gt br_if $folding-inner0 @@ -3575,12 +3518,12 @@ local.get $12 i32.const -1064252416 i32.sub - local.get $2 + local.get $5 i32.or br_if $folding-inner1 local.get $1 local.get $0 - local.get $3 + local.get $2 f64.sub f64.le br_if $folding-inner1 @@ -3594,7 +3537,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $2 + local.set $5 i32.const 0 local.set $6 local.get $13 @@ -3602,7 +3545,7 @@ i32.gt_s if i32.const 1048576 - local.get $2 + local.get $5 i32.const 1 i32.add i32.shr_s @@ -3615,9 +3558,9 @@ i32.shr_s i32.const 1023 i32.sub - local.set $2 + local.set $5 i32.const 1048575 - local.get $2 + local.get $5 i32.shr_s i32.const -1 i32.xor @@ -3634,7 +3577,7 @@ i32.const 1048576 i32.or i32.const 20 - local.get $2 + local.get $5 i32.sub i32.shr_s local.set $6 @@ -3647,13 +3590,13 @@ i32.lt_s select local.set $6 - local.get $3 + local.get $2 local.get $0 f64.sub - local.set $3 + local.set $2 end local.get $1 - local.get $3 + local.get $2 f64.add i64.reinterpret_f64 i64.const -4294967296 @@ -3662,10 +3605,10 @@ local.tee $0 f64.const 0.6931471824645996 f64.mul - local.tee $4 + local.tee $3 local.get $1 local.get $0 - local.get $3 + local.get $2 f64.sub f64.sub f64.const 0.6931471805599453 @@ -3676,14 +3619,14 @@ f64.add local.tee $1 f64.add - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f64.mul local.set $0 local.get $7 f64.const 1 - local.get $3 - local.get $3 + local.get $2 + local.get $2 local.get $0 f64.const 0.16666666666666602 local.get $0 @@ -3711,17 +3654,17 @@ f64.sub f64.div local.get $1 + local.get $2 local.get $3 - local.get $4 f64.sub f64.sub local.tee $0 - local.get $3 + local.get $2 local.get $0 f64.mul f64.add f64.sub - local.get $3 + local.get $2 f64.sub f64.sub local.tee $0 @@ -3733,7 +3676,7 @@ i32.const 20 i32.shl i32.add - local.tee $2 + local.tee $5 i32.const 20 i32.shr_s i32.const 0 @@ -3747,7 +3690,7 @@ i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $2 + local.get $5 i64.extend_i32_s i64.const 32 i64.shl diff --git a/tests/compiler/std/libm.untouched.wat b/tests/compiler/std/libm.untouched.wat index 2a93d70e19..f1cdd6658d 100644 --- a/tests/compiler/std/libm.untouched.wat +++ b/tests/compiler/std/libm.untouched.wat @@ -313,9 +313,8 @@ local.get $2 i32.const 1071284858 i32.lt_u - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $2 i32.const 31 @@ -529,7 +528,7 @@ (local $1 i64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) @@ -537,8 +536,7 @@ (local $9 f64) (local $10 f64) (local $11 f64) - (local $12 f64) - (local $13 i32) + (local $12 i32) local.get $0 i64.reinterpret_f64 local.set $1 @@ -552,9 +550,8 @@ local.get $2 i32.const 1048576 i32.lt_u - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 i32.const 31 @@ -612,7 +609,6 @@ local.get $2 i32.const 1072693248 i32.eq - local.tee $4 if (result i32) local.get $1 i64.const 32 @@ -620,7 +616,7 @@ i64.const 0 i64.eq else - local.get $4 + i32.const 0 end if f64.const 0 @@ -663,46 +659,46 @@ local.get $0 f64.const 1 f64.sub - local.set $5 + local.set $4 f64.const 0.5 - local.get $5 + local.get $4 f64.mul - local.get $5 + local.get $4 f64.mul - local.set $6 - local.get $5 + local.set $5 + local.get $4 f64.const 2 - local.get $5 + local.get $4 f64.add f64.div + local.set $6 + local.get $6 + local.get $6 + f64.mul local.set $7 local.get $7 local.get $7 f64.mul local.set $8 local.get $8 - local.get $8 - f64.mul - local.set $9 - local.get $9 f64.const 0.3999999999940942 - local.get $9 + local.get $8 f64.const 0.22222198432149784 - local.get $9 + local.get $8 f64.const 0.15313837699209373 f64.mul f64.add f64.mul f64.add f64.mul - local.set $10 - local.get $8 + local.set $9 + local.get $7 f64.const 0.6666666666666735 - local.get $9 + local.get $8 f64.const 0.2857142874366239 - local.get $9 + local.get $8 f64.const 0.1818357216161805 - local.get $9 + local.get $8 f64.const 0.14798198605116586 f64.mul f64.add @@ -711,28 +707,28 @@ f64.mul f64.add f64.mul - local.set $11 - local.get $11 + local.set $10 local.get $10 + local.get $9 f64.add - local.set $12 + local.set $11 local.get $3 - local.set $13 - local.get $7 + local.set $12 local.get $6 - local.get $12 + local.get $5 + local.get $11 f64.add f64.mul - local.get $13 + local.get $12 f64.convert_i32_s f64.const 1.9082149292705877e-10 f64.mul f64.add - local.get $6 - f64.sub local.get $5 + f64.sub + local.get $4 f64.add - local.get $13 + local.get $12 f64.convert_i32_s f64.const 0.6931471803691238 f64.mul @@ -863,13 +859,12 @@ local.get $2 i32.const 1045430272 i32.lt_u - local.tee $3 if (result i32) local.get $2 i32.const 1048576 i32.ge_u else - local.get $3 + i32.const 0 end if local.get $0 @@ -1415,8 +1410,8 @@ call $~lib/math/NativeMath.atanh ) (func $~lib/math/NativeMath.atan2 (; 17 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1425,9 +1420,8 @@ (local $9 f64) local.get $1 call $~lib/builtins/isNaN - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 call $~lib/builtins/isNaN @@ -1440,30 +1434,30 @@ end local.get $1 i64.reinterpret_f64 - local.set $3 - local.get $3 + local.set $2 + local.get $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $3 + local.set $3 + local.get $2 i32.wrap_i64 - local.set $5 + local.set $4 local.get $0 i64.reinterpret_f64 - local.set $3 - local.get $3 + local.set $2 + local.get $2 i64.const 32 i64.shr_u i32.wrap_i64 + local.set $5 + local.get $2 + i32.wrap_i64 local.set $6 local.get $3 - i32.wrap_i64 - local.set $7 - local.get $4 i32.const 1072693248 i32.sub - local.get $5 + local.get $4 i32.or i32.const 0 i32.eq @@ -1472,28 +1466,28 @@ call $~lib/math/NativeMath.atan return end - local.get $6 + local.get $5 i32.const 31 i32.shr_u i32.const 1 i32.and - local.get $4 + local.get $3 i32.const 30 i32.shr_u i32.const 2 i32.and i32.or - local.set $8 - local.get $4 + local.set $7 + local.get $3 i32.const 2147483647 i32.and - local.set $4 - local.get $6 + local.set $3 + local.get $5 i32.const 2147483647 i32.and - local.set $6 + local.set $5 + local.get $5 local.get $6 - local.get $7 i32.or i32.const 0 i32.eq @@ -1503,21 +1497,21 @@ block $case2|0 block $case1|0 block $case0|0 + local.get $7 + local.set $8 local.get $8 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|0 - local.get $2 + local.get $8 i32.const 1 i32.eq br_if $case1|0 - local.get $2 + local.get $8 i32.const 2 i32.eq br_if $case2|0 - local.get $2 + local.get $8 i32.const 3 i32.eq br_if $case3|0 @@ -1535,13 +1529,13 @@ return end end + local.get $3 local.get $4 - local.get $5 i32.or i32.const 0 i32.eq if - local.get $8 + local.get $7 i32.const 1 i32.and if (result f64) @@ -1556,11 +1550,11 @@ end return end - local.get $4 + local.get $3 i32.const 2146435072 i32.eq if - local.get $6 + local.get $5 i32.const 2146435072 i32.eq if @@ -1569,21 +1563,21 @@ block $case2|1 block $case1|1 block $case0|1 + local.get $7 + local.set $8 local.get $8 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|1 - local.get $2 + local.get $8 i32.const 1 i32.eq br_if $case1|1 - local.get $2 + local.get $8 i32.const 2 i32.eq br_if $case2|1 - local.get $2 + local.get $8 i32.const 3 i32.eq br_if $case3|1 @@ -1620,21 +1614,21 @@ block $case2|2 block $case1|2 block $case0|2 + local.get $7 + local.set $8 local.get $8 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|2 - local.get $2 + local.get $8 i32.const 1 i32.eq br_if $case1|2 - local.get $2 + local.get $8 i32.const 2 i32.eq br_if $case2|2 - local.get $2 + local.get $8 i32.const 3 i32.eq br_if $case3|2 @@ -1655,23 +1649,22 @@ end end end - local.get $4 + local.get $3 i32.const 64 i32.const 20 i32.shl i32.add - local.get $6 + local.get $5 i32.lt_u - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else - local.get $6 + local.get $5 i32.const 2146435072 i32.eq end if - local.get $8 + local.get $7 i32.const 1 i32.and if (result f64) @@ -1686,20 +1679,19 @@ end return end - local.get $8 + local.get $7 i32.const 2 i32.and - local.tee $2 if (result i32) - local.get $6 + local.get $5 i32.const 64 i32.const 20 i32.shl i32.add - local.get $4 + local.get $3 i32.lt_u else - local.get $2 + i32.const 0 end if f64.const 0 @@ -1717,21 +1709,21 @@ block $case2|3 block $case1|3 block $case0|3 + local.get $7 + local.set $8 local.get $8 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|3 - local.get $2 + local.get $8 i32.const 1 i32.eq br_if $case1|3 - local.get $2 + local.get $8 i32.const 2 i32.eq br_if $case2|3 - local.get $2 + local.get $8 i32.const 3 i32.eq br_if $case3|3 @@ -1979,7 +1971,6 @@ (local $13 f64) (local $14 f64) (local $15 f64) - (local $16 i32) local.get $0 i64.reinterpret_f64 local.set $1 @@ -2207,9 +2198,8 @@ local.get $3 i32.const 0 i32.lt_s - local.tee $16 if (result i32) - local.get $16 + i32.const 1 else local.get $3 i32.const 56 @@ -2660,7 +2650,7 @@ (local $4 i64) (local $5 i32) (local $6 i32) - (local $7 i32) + (local $7 f64) (local $8 f64) (local $9 f64) (local $10 f64) @@ -2668,7 +2658,6 @@ (local $12 f64) (local $13 f64) (local $14 f64) - (local $15 f64) local.get $0 i64.reinterpret_f64 local.set $2 @@ -2720,9 +2709,8 @@ local.get $5 i32.const 2047 i32.eq - local.tee $7 if (result i32) - local.get $7 + i32.const 1 else local.get $3 i64.const 0 @@ -2744,7 +2732,7 @@ return end f64.const 1 - local.set $8 + local.set $7 local.get $5 i32.const 1023 i32.const 510 @@ -2752,7 +2740,7 @@ i32.gt_s if f64.const 5260135901548373507240989e186 - local.set $8 + local.set $7 local.get $0 f64.const 1.90109156629516e-211 f64.mul @@ -2769,7 +2757,7 @@ i32.lt_s if f64.const 1.90109156629516e-211 - local.set $8 + local.set $7 local.get $0 f64.const 5260135901548373507240989e186 f64.mul @@ -2783,75 +2771,75 @@ local.get $0 f64.const 134217729 f64.mul - local.set $9 + local.set $8 local.get $0 - local.get $9 + local.get $8 f64.sub - local.get $9 + local.get $8 f64.add - local.set $10 + local.set $9 local.get $0 - local.get $10 + local.get $9 f64.sub - local.set $11 + local.set $10 local.get $0 local.get $0 f64.mul - local.set $12 - local.get $10 - local.get $10 + local.set $11 + local.get $9 + local.get $9 f64.mul - local.get $12 + local.get $11 f64.sub f64.const 2 - local.get $10 + local.get $9 f64.mul - local.get $11 + local.get $10 f64.add - local.get $11 + local.get $10 f64.mul f64.add - local.set $13 + local.set $12 local.get $1 f64.const 134217729 f64.mul - local.set $9 + local.set $8 local.get $1 - local.get $9 + local.get $8 f64.sub - local.get $9 + local.get $8 f64.add - local.set $10 + local.set $9 local.get $1 - local.get $10 + local.get $9 f64.sub - local.set $11 + local.set $10 local.get $1 local.get $1 f64.mul - local.set $14 - local.get $10 - local.get $10 + local.set $13 + local.get $9 + local.get $9 f64.mul - local.get $14 + local.get $13 f64.sub f64.const 2 - local.get $10 + local.get $9 f64.mul - local.get $11 + local.get $10 f64.add - local.get $11 + local.get $10 f64.mul f64.add - local.set $15 - local.get $8 - local.get $15 - local.get $13 - f64.add + local.set $14 + local.get $7 local.get $14 - f64.add local.get $12 f64.add + local.get $13 + f64.add + local.get $11 + f64.add f64.sqrt f64.mul ) @@ -2906,7 +2894,7 @@ (local $1 i64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) @@ -2920,7 +2908,6 @@ (local $15 f64) (local $16 f64) (local $17 f64) - (local $18 f64) local.get $0 i64.reinterpret_f64 local.set $1 @@ -2934,9 +2921,8 @@ local.get $2 i32.const 1048576 i32.lt_u - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 i32.const 31 @@ -2994,7 +2980,6 @@ local.get $2 i32.const 1072693248 i32.eq - local.tee $4 if (result i32) local.get $1 i64.const 32 @@ -3002,7 +2987,7 @@ i64.const 0 i64.eq else - local.get $4 + i32.const 0 end if f64.const 0 @@ -3045,46 +3030,46 @@ local.get $0 f64.const 1 f64.sub - local.set $5 + local.set $4 f64.const 0.5 - local.get $5 + local.get $4 f64.mul - local.get $5 + local.get $4 f64.mul - local.set $6 - local.get $5 + local.set $5 + local.get $4 f64.const 2 - local.get $5 + local.get $4 f64.add f64.div + local.set $6 + local.get $6 + local.get $6 + f64.mul local.set $7 local.get $7 local.get $7 f64.mul local.set $8 local.get $8 - local.get $8 - f64.mul - local.set $9 - local.get $9 f64.const 0.3999999999940942 - local.get $9 + local.get $8 f64.const 0.22222198432149784 - local.get $9 + local.get $8 f64.const 0.15313837699209373 f64.mul f64.add f64.mul f64.add f64.mul - local.set $10 - local.get $8 + local.set $9 + local.get $7 f64.const 0.6666666666666735 - local.get $9 + local.get $8 f64.const 0.2857142874366239 - local.get $9 + local.get $8 f64.const 0.1818357216161805 - local.get $9 + local.get $8 f64.const 0.14798198605116586 f64.mul f64.add @@ -3093,16 +3078,16 @@ f64.mul f64.add f64.mul - local.set $11 - local.get $11 + local.set $10 local.get $10 + local.get $9 f64.add - local.set $12 + local.set $11 + local.get $4 local.get $5 - local.get $6 f64.sub - local.set $13 - local.get $13 + local.set $12 + local.get $12 i64.reinterpret_f64 local.set $1 local.get $1 @@ -3111,58 +3096,58 @@ local.set $1 local.get $1 f64.reinterpret_i64 - local.set $13 - local.get $5 - local.get $13 + local.set $12 + local.get $4 + local.get $12 f64.sub - local.get $6 + local.get $5 f64.sub - local.get $7 local.get $6 - local.get $12 + local.get $5 + local.get $11 f64.add f64.mul f64.add - local.set $14 - local.get $13 + local.set $13 + local.get $12 f64.const 0.4342944818781689 f64.mul - local.set $15 + local.set $14 local.get $3 f64.convert_i32_s - local.set $16 - local.get $16 + local.set $15 + local.get $15 f64.const 0.30102999566361177 f64.mul - local.set $17 - local.get $16 + local.set $16 + local.get $15 f64.const 3.694239077158931e-13 f64.mul - local.get $14 local.get $13 + local.get $12 f64.add f64.const 2.5082946711645275e-11 f64.mul f64.add - local.get $14 + local.get $13 f64.const 0.4342944818781689 f64.mul f64.add - local.set $18 - local.get $17 - local.get $15 + local.set $17 + local.get $16 + local.get $14 f64.add - local.set $9 - local.get $18 + local.set $8 local.get $17 - local.get $9 + local.get $16 + local.get $8 f64.sub - local.get $15 + local.get $14 f64.add f64.add - local.set $18 - local.get $18 - local.get $9 + local.set $17 + local.get $17 + local.get $8 f64.add ) (func $std/libm/log10 (; 42 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) @@ -3177,7 +3162,7 @@ (local $1 i64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) @@ -3190,7 +3175,6 @@ (local $14 f64) (local $15 f64) (local $16 f64) - (local $17 f64) local.get $0 i64.reinterpret_f64 local.set $1 @@ -3204,9 +3188,8 @@ local.get $2 i32.const 1048576 i32.lt_u - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 i32.const 31 @@ -3264,7 +3247,6 @@ local.get $2 i32.const 1072693248 i32.eq - local.tee $4 if (result i32) local.get $1 i64.const 32 @@ -3272,7 +3254,7 @@ i64.const 0 i64.eq else - local.get $4 + i32.const 0 end if f64.const 0 @@ -3315,46 +3297,46 @@ local.get $0 f64.const 1 f64.sub - local.set $5 + local.set $4 f64.const 0.5 - local.get $5 + local.get $4 f64.mul - local.get $5 + local.get $4 f64.mul - local.set $6 - local.get $5 + local.set $5 + local.get $4 f64.const 2 - local.get $5 + local.get $4 f64.add f64.div + local.set $6 + local.get $6 + local.get $6 + f64.mul local.set $7 local.get $7 local.get $7 f64.mul local.set $8 local.get $8 - local.get $8 - f64.mul - local.set $9 - local.get $9 f64.const 0.3999999999940942 - local.get $9 + local.get $8 f64.const 0.22222198432149784 - local.get $9 + local.get $8 f64.const 0.15313837699209373 f64.mul f64.add f64.mul f64.add f64.mul - local.set $10 - local.get $8 + local.set $9 + local.get $7 f64.const 0.6666666666666735 - local.get $9 + local.get $8 f64.const 0.2857142874366239 - local.get $9 + local.get $8 f64.const 0.1818357216161805 - local.get $9 + local.get $8 f64.const 0.14798198605116586 f64.mul f64.add @@ -3363,16 +3345,16 @@ f64.mul f64.add f64.mul - local.set $11 - local.get $11 + local.set $10 local.get $10 + local.get $9 f64.add - local.set $12 + local.set $11 + local.get $4 local.get $5 - local.get $6 f64.sub - local.set $13 - local.get $13 + local.set $12 + local.get $12 i64.reinterpret_f64 local.set $1 local.get $1 @@ -3381,52 +3363,52 @@ local.set $1 local.get $1 f64.reinterpret_i64 - local.set $13 - local.get $5 - local.get $13 + local.set $12 + local.get $4 + local.get $12 f64.sub - local.get $6 + local.get $5 f64.sub - local.get $7 local.get $6 - local.get $12 + local.get $5 + local.get $11 f64.add f64.mul f64.add - local.set $14 - local.get $13 + local.set $13 + local.get $12 f64.const 1.4426950407214463 f64.mul - local.set $15 - local.get $14 + local.set $14 local.get $13 + local.get $12 f64.add f64.const 1.6751713164886512e-10 f64.mul - local.get $14 + local.get $13 f64.const 1.4426950407214463 f64.mul f64.add - local.set $16 + local.set $15 local.get $3 f64.convert_i32_s - local.set $17 - local.get $17 - local.get $15 + local.set $16 + local.get $16 + local.get $14 f64.add - local.set $9 + local.set $8 + local.get $15 local.get $16 - local.get $17 - local.get $9 + local.get $8 f64.sub - local.get $15 + local.get $14 f64.add f64.add - local.set $16 - local.get $9 local.set $15 - local.get $16 + local.get $8 + local.set $14 local.get $15 + local.get $14 f64.add ) (func $std/libm/log2 (; 45 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) @@ -3538,44 +3520,39 @@ local.get $7 i32.const 2146435072 i32.gt_s - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $7 i32.const 2146435072 i32.eq - local.tee $9 if (result i32) local.get $4 i32.const 0 i32.ne else - local.get $9 + i32.const 0 end end - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $8 i32.const 2146435072 i32.gt_s end - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $8 i32.const 2146435072 i32.eq - local.tee $9 if (result i32) local.get $6 i32.const 0 i32.ne else - local.get $9 + i32.const 0 end end if @@ -3585,7 +3562,7 @@ return end i32.const 0 - local.set $10 + local.set $9 local.get $3 i32.const 0 i32.lt_s @@ -3595,7 +3572,7 @@ i32.ge_s if i32.const 2 - local.set $10 + local.set $9 else local.get $8 i32.const 1072693248 @@ -3606,21 +3583,21 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 - local.get $11 + local.set $10 + local.get $10 i32.const 20 i32.gt_s - local.set $9 + local.set $11 i32.const 52 i32.const 20 - local.get $9 - select local.get $11 + select + local.get $10 i32.sub local.set $12 local.get $6 local.get $8 - local.get $9 + local.get $11 select local.set $13 local.get $13 @@ -3638,7 +3615,7 @@ i32.const 1 i32.and i32.sub - local.set $10 + local.set $9 end end end @@ -3741,17 +3718,15 @@ local.get $7 i32.const 0 i32.eq - local.tee $14 if (result i32) - local.get $14 + i32.const 1 else local.get $7 i32.const 2146435072 i32.eq end - local.tee $14 if (result i32) - local.get $14 + i32.const 1 else local.get $7 i32.const 1072693248 @@ -3776,7 +3751,7 @@ local.get $7 i32.const 1072693248 i32.sub - local.get $10 + local.get $9 i32.or i32.const 0 i32.eq @@ -3790,7 +3765,7 @@ f64.div local.set $16 else - local.get $10 + local.get $9 i32.const 1 i32.eq if @@ -3810,7 +3785,7 @@ i32.const 0 i32.lt_s if - local.get $10 + local.get $9 i32.const 0 i32.eq if @@ -3823,7 +3798,7 @@ f64.div return end - local.get $10 + local.get $9 i32.const 1 i32.eq if @@ -4009,17 +3984,17 @@ i32.le_s if i32.const 0 - local.set $11 + local.set $10 else local.get $28 i32.const 767610 i32.lt_s if i32.const 1 - local.set $11 + local.set $10 else i32.const 0 - local.set $11 + local.set $10 local.get $29 i32.const 1 i32.add @@ -4043,7 +4018,7 @@ local.set $15 f64.const 1.5 f64.const 1 - local.get $11 + local.get $10 select local.set $35 local.get $15 @@ -4075,7 +4050,7 @@ i32.or i32.const 524288 i32.add - local.get $11 + local.get $10 i32.const 18 i32.shl i32.add @@ -4198,7 +4173,7 @@ local.set $36 f64.const 1.350039202129749e-08 f64.const 0 - local.get $11 + local.get $10 select local.set $37 f64.const -7.028461650952758e-09 @@ -4216,7 +4191,7 @@ local.set $24 f64.const 0.5849624872207642 f64.const 0 - local.get $11 + local.get $10 select local.set $39 local.get $36 @@ -4361,7 +4336,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 + local.set $10 i32.const 0 local.set $29 local.get $41 @@ -4370,7 +4345,7 @@ if local.get $28 i32.const 1048576 - local.get $11 + local.get $10 i32.const 1 i32.add i32.shr_s @@ -4383,12 +4358,12 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 + local.set $10 f64.const 0 local.set $24 local.get $29 i32.const 1048575 - local.get $11 + local.get $10 i32.shr_s i32.const -1 i32.xor @@ -4404,7 +4379,7 @@ i32.const 1048576 i32.or i32.const 20 - local.get $11 + local.get $10 i32.sub i32.shr_s local.set $29 diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index f88a238ff6..66a50a9c30 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -473,35 +473,33 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 i32.load8_u local.get $1 i32.const 255 i32.and i32.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=8 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end @@ -800,8 +798,7 @@ i32.gt_u select i32.ge_u - local.tee $1 - if + if (result i32) local.get $0 i32.load offset=20 local.get $0 @@ -811,9 +808,9 @@ f64.mul i32.trunc_f64_s i32.lt_s - local.set $1 + else + i32.const 0 end - local.get $1 if local.get $0 local.get $2 @@ -1477,8 +1474,7 @@ i32.gt_u select i32.ge_u - local.tee $1 - if + if (result i32) local.get $0 i32.load offset=20 local.get $0 @@ -1488,9 +1484,9 @@ f64.mul i32.trunc_f64_s i32.lt_s - local.set $1 + else + i32.const 0 end - local.get $1 if local.get $0 local.get $2 @@ -1866,35 +1862,33 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 i32.load16_u local.get $1 i32.const 65535 i32.and i32.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=8 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end @@ -2238,8 +2232,7 @@ i32.gt_u select i32.ge_u - local.tee $1 - if + if (result i32) local.get $0 i32.load offset=20 local.get $0 @@ -2249,9 +2242,9 @@ f64.mul i32.trunc_f64_s i32.lt_s - local.set $1 + else + i32.const 0 end - local.get $1 if local.get $0 local.get $2 @@ -2960,8 +2953,7 @@ i32.gt_u select i32.ge_u - local.tee $1 - if + if (result i32) local.get $0 i32.load offset=20 local.get $0 @@ -2971,9 +2963,9 @@ f64.mul i32.trunc_f64_s i32.lt_s - local.set $1 + else + i32.const 0 end - local.get $1 if local.get $0 local.get $2 @@ -3380,33 +3372,31 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 i32.load local.get $1 i32.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=8 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end @@ -3672,7 +3662,6 @@ i32.gt_u select i32.ge_u - local.tee $1 if (result i32) local.get $0 i32.load offset=20 @@ -3684,7 +3673,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $1 + i32.const 0 end if local.get $0 @@ -4492,33 +4481,31 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=12 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 i64.load local.get $1 i64.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=12 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end @@ -4785,7 +4772,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -4797,7 +4783,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -5518,33 +5504,31 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 f32.load local.get $1 f32.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=8 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end @@ -5816,7 +5800,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -5828,7 +5811,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -6198,33 +6181,31 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=12 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 f64.load local.get $1 f64.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=12 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end @@ -6496,7 +6477,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -6508,7 +6488,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -6851,7 +6831,7 @@ i32.load i32.le_u else - local.get $0 + i32.const 0 end if loop $continue|0 @@ -6875,19 +6855,15 @@ i32.const 0 ) (func $~lib/runtime/runtime.flags (; 77 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if + if (result i32) local.get $0 i32.const 160 i32.load i32.gt_u - local.set $1 + else + i32.const 1 end - local.get $1 if (result i32) unreachable else @@ -6923,15 +6899,13 @@ (local $4 i32) local.get $0 local.tee $2 - i32.eqz - local.tee $0 if (result i32) - local.get $0 - else local.get $2 i32.const 160 i32.load i32.gt_u + else + i32.const 1 end if (result i32) unreachable diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index bf01c8cd76..17e5e9516b 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -603,7 +603,6 @@ ) (func $~lib/map/Map#find (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -625,7 +624,6 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load8_s @@ -636,7 +634,7 @@ i32.shr_s i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -1043,7 +1041,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -1055,7 +1052,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -1553,7 +1550,6 @@ ) (func $~lib/map/Map#find (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -1575,7 +1571,6 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load8_u @@ -1584,7 +1579,7 @@ i32.and i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -1983,7 +1978,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -1995,7 +1989,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -2501,7 +2495,6 @@ ) (func $~lib/map/Map#find (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -2523,7 +2516,6 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load16_s @@ -2534,7 +2526,7 @@ i32.shr_s i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -2941,7 +2933,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -2953,7 +2944,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -3451,7 +3442,6 @@ ) (func $~lib/map/Map#find (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -3473,7 +3463,6 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load16_u @@ -3482,7 +3471,7 @@ i32.and i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -3881,7 +3870,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -3893,7 +3881,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -4419,7 +4407,6 @@ ) (func $~lib/map/Map#find (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -4441,14 +4428,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load local.get $1 i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -4839,7 +4825,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -4851,7 +4836,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -5321,7 +5306,6 @@ ) (func $~lib/map/Map#find (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -5343,14 +5327,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load local.get $1 i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -5741,7 +5724,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -5753,7 +5735,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -6311,7 +6293,6 @@ ) (func $~lib/map/Map#find (; 77 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -6333,14 +6314,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i64.load local.get $1 i64.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -6734,7 +6714,6 @@ i32.gt_u select i32.ge_u - local.tee $5 if (result i32) local.get $0 i32.load offset=20 @@ -6746,7 +6725,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $5 + i32.const 0 end if local.get $0 @@ -7223,7 +7202,6 @@ ) (func $~lib/map/Map#find (; 87 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -7245,14 +7223,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i64.load local.get $1 i64.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -7646,7 +7623,6 @@ i32.gt_u select i32.ge_u - local.tee $5 if (result i32) local.get $0 i32.load offset=20 @@ -7658,7 +7634,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $5 + i32.const 0 end if local.get $0 @@ -8135,7 +8111,6 @@ ) (func $~lib/map/Map#find (; 97 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -8157,14 +8132,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 f32.load local.get $1 f32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -8563,7 +8537,6 @@ i32.gt_u select i32.ge_u - local.tee $5 if (result i32) local.get $0 i32.load offset=20 @@ -8575,7 +8548,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $5 + i32.const 0 end if local.get $0 @@ -9052,7 +9025,6 @@ ) (func $~lib/map/Map#find (; 107 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -9074,14 +9046,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 f64.load local.get $1 f64.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -9480,7 +9451,6 @@ i32.gt_u select i32.ge_u - local.tee $5 if (result i32) local.get $0 i32.load offset=20 @@ -9492,7 +9462,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $5 + i32.const 0 end if local.get $0 @@ -9903,7 +9873,7 @@ i32.load i32.le_u else - local.get $2 + i32.const 0 end if loop $continue|0 @@ -9928,14 +9898,12 @@ ) (func $~lib/runtime/runtime.flags (; 117 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/runtime/RTTI_BASE local.set $1 local.get $0 i32.eqz - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 local.get $1 diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 1832ea7554..906f5ddc87 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -155,17 +155,13 @@ ) (func $std/math/ulperr (; 31 ;) (type $FUNCSIG$dddd) (param $0 f64) (param $1 f64) (param $2 f64) (result f64) (local $3 i32) - (local $4 i32) - local.get $0 - local.get $0 - f64.ne - local.tee $4 - local.set $3 local.get $1 local.get $1 f64.ne - local.get $3 - local.get $4 + i32.const 0 + local.get $0 + local.get $0 + f64.ne select if f64.const 0 @@ -357,17 +353,13 @@ ) (func $std/math/ulperrf (; 34 ;) (type $FUNCSIG$ffff) (param $0 f32) (param $1 f32) (param $2 f32) (result f32) (local $3 i32) - (local $4 i32) - local.get $0 - local.get $0 - f32.ne - local.tee $4 - local.set $3 local.get $1 local.get $1 f32.ne - local.get $3 - local.get $4 + i32.const 0 + local.get $0 + local.get $0 + f32.ne select if f32.const 0 @@ -495,22 +487,20 @@ call $std/math/check ) (func $std/math/test_abs (; 38 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) - (local $2 i32) local.get $0 f64.abs local.get $1 f64.const 0 call $std/math/check - local.tee $2 - if + if (result i32) local.get $0 call $~lib/bindings/Math/abs local.get $1 f64.const 0 call $std/math/check - local.set $2 + else + i32.const 0 end - local.get $2 ) (func $std/math/test_absf (; 39 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) local.get $0 @@ -687,22 +677,20 @@ f64.mul ) (func $std/math/test_acos (; 42 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.acos local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/acos local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.acos (; 43 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 f32) @@ -879,32 +867,29 @@ (local $1 f64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) - (local $6 f64) - (local $7 i64) - (local $8 f64) + (local $6 i64) + (local $7 f64) i32.const 1 - local.set $2 + local.set $3 local.get $0 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $2 i32.const 1071284858 i32.lt_u - local.tee $4 - i32.eqz - if - local.get $3 + if (result i32) + i32.const 1 + else + local.get $2 i32.const 31 i32.shr_u - local.set $4 end - local.get $4 if - local.get $3 + local.get $2 i32.const -1074790400 i32.ge_u if @@ -924,7 +909,7 @@ f64.div return end - local.get $3 + local.get $2 i32.const 1 i32.shl i32.const 2034237440 @@ -933,17 +918,17 @@ local.get $0 return end - local.get $3 + local.get $2 i32.const -1076707644 i32.le_u if i32.const 0 - local.set $2 + local.set $3 local.get $0 local.set $1 end else - local.get $3 + local.get $2 i32.const 2146435072 i32.ge_u if @@ -951,28 +936,28 @@ return end end - local.get $2 + local.get $3 if f64.const 1 local.get $0 f64.add i64.reinterpret_f64 - local.tee $7 + local.tee $6 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 614242 i32.add - local.tee $4 + local.tee $2 i32.const 20 i32.shr_u i32.const 1023 i32.sub - local.tee $2 + local.tee $3 i32.const 54 i32.lt_s if (result f64) - local.get $7 + local.get $6 f64.reinterpret_i64 local.set $1 f64.const 1 @@ -985,7 +970,7 @@ f64.const 1 f64.sub f64.sub - local.get $2 + local.get $3 i32.const 2 i32.ge_s select @@ -994,11 +979,11 @@ else f64.const 0 end - local.set $6 - local.get $7 + local.set $5 + local.get $6 i64.const 4294967295 i64.and - local.get $4 + local.get $2 i32.const 1048575 i32.and i32.const 1072079006 @@ -1017,21 +1002,21 @@ local.get $1 f64.add f64.div - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 f64.mul - local.tee $8 - local.get $8 + local.tee $7 + local.get $7 f64.mul local.set $0 - local.get $5 + local.get $4 f64.const 0.5 local.get $1 f64.mul local.get $1 f64.mul - local.tee $5 - local.get $8 + local.tee $4 + local.get $7 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -1060,15 +1045,15 @@ f64.add f64.add f64.mul - local.get $2 + local.get $3 f64.convert_i32_s local.tee $0 f64.const 1.9082149292705877e-10 f64.mul - local.get $6 + local.get $5 f64.add f64.add - local.get $5 + local.get $4 f64.sub local.get $1 f64.add @@ -1079,32 +1064,29 @@ ) (func $~lib/math/NativeMath.log (; 46 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 f64) (local $4 f64) - (local $5 f64) - (local $6 i32) - (local $7 f64) + (local $5 i32) + (local $6 f64) local.get $0 i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $1 i32.const 1048576 i32.lt_u - local.tee $1 - i32.eqz - if - local.get $2 + if (result i32) + i32.const 1 + else + local.get $1 i32.const 31 i32.shr_u - local.set $1 end - local.get $1 if - local.get $3 + local.get $2 i64.const 1 i64.shl i64.const 0 @@ -1117,7 +1099,7 @@ f64.div return end - local.get $2 + local.get $1 i32.const 31 i32.shr_u if @@ -1129,18 +1111,18 @@ return end i32.const -54 - local.set $6 + local.set $5 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 + local.set $1 else - local.get $2 + local.get $1 i32.const 2146435072 i32.ge_u if @@ -1148,28 +1130,25 @@ return else local.get $2 + i64.const 32 + i64.shl + i64.const 0 + i64.eq + i32.const 0 + local.get $1 i32.const 1072693248 i32.eq - local.tee $1 - if - local.get $3 - i64.const 32 - i64.shl - i64.const 0 - i64.eq - local.set $1 - end - local.get $1 + select if f64.const 0 return end end end - local.get $3 + local.get $2 i64.const 4294967295 i64.and - local.get $2 + local.get $1 i32.const 614242 i32.add local.tee $1 @@ -1184,26 +1163,26 @@ f64.reinterpret_i64 f64.const 1 f64.sub - local.tee $4 + local.tee $3 f64.const 2 - local.get $4 + local.get $3 f64.add f64.div - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 f64.mul - local.tee $7 - local.get $7 + local.tee $6 + local.get $6 f64.mul local.set $0 - local.get $5 - f64.const 0.5 local.get $4 + f64.const 0.5 + local.get $3 f64.mul - local.get $4 + local.get $3 f64.mul - local.tee $5 - local.get $7 + local.tee $4 + local.get $6 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -1237,16 +1216,16 @@ i32.shr_s i32.const 1023 i32.sub - local.get $6 + local.get $5 i32.add f64.convert_i32_s local.tee $0 f64.const 1.9082149292705877e-10 f64.mul f64.add - local.get $5 - f64.sub local.get $4 + f64.sub + local.get $3 f64.add local.get $0 f64.const 0.6931471803691238 @@ -1308,49 +1287,44 @@ f64.add ) (func $std/math/test_acosh (; 48 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.acosh local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/acosh local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.log1p (; 49 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f32) (local $5 f32) (local $6 f32) - (local $7 f32) i32.const 1 - local.set $2 + local.set $3 local.get $0 i32.reinterpret_f32 - local.tee $3 + local.tee $2 i32.const 1054086096 i32.lt_u - local.tee $4 - i32.eqz - if - local.get $3 + if (result i32) + i32.const 1 + else + local.get $2 i32.const 31 i32.shr_u - local.set $4 end - local.get $4 if - local.get $3 + local.get $2 i32.const -1082130432 i32.ge_u if @@ -1370,7 +1344,7 @@ f32.div return end - local.get $3 + local.get $2 i32.const 1 i32.shl i32.const 1728053248 @@ -1379,17 +1353,17 @@ local.get $0 return end - local.get $3 + local.get $2 i32.const -1097468391 i32.le_u if i32.const 0 - local.set $2 + local.set $3 local.get $0 local.set $1 end else - local.get $3 + local.get $2 i32.const 2139095040 i32.ge_u if @@ -1397,7 +1371,7 @@ return end end - local.get $2 + local.get $3 if f32.const 1 local.get $0 @@ -1406,12 +1380,12 @@ i32.reinterpret_f32 i32.const 4913933 i32.add - local.tee $4 + local.tee $2 i32.const 23 i32.shr_u i32.const 127 i32.sub - local.tee $2 + local.tee $3 i32.const 25 i32.lt_s if (result f32) @@ -1425,7 +1399,7 @@ f32.const 1 f32.sub f32.sub - local.get $2 + local.get $3 i32.const 2 i32.ge_s select @@ -1434,8 +1408,8 @@ else f32.const 0 end - local.set $6 - local.get $4 + local.set $5 + local.get $2 i32.const 8388607 i32.and i32.const 1060439283 @@ -1450,21 +1424,21 @@ local.get $1 f32.add f32.div - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 f32.mul - local.tee $7 - local.get $7 + local.tee $6 + local.get $6 f32.mul local.set $0 - local.get $5 + local.get $4 f32.const 0.5 local.get $1 f32.mul local.get $1 f32.mul - local.tee $5 - local.get $7 + local.tee $4 + local.get $6 f32.const 0.6666666269302368 local.get $0 f32.const 0.2849878668785095 @@ -1481,15 +1455,15 @@ f32.add f32.add f32.mul - local.get $2 + local.get $3 f32.convert_i32_s local.tee $0 f32.const 9.05800061445916e-06 f32.mul - local.get $6 + local.get $5 f32.add f32.add - local.get $5 + local.get $4 f32.sub local.get $1 f32.add @@ -1501,24 +1475,21 @@ (func $~lib/math/NativeMathf.log (; 50 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) - (local $3 i32) - (local $4 f32) - (local $5 i32) - (local $6 f32) + (local $3 f32) + (local $4 i32) + (local $5 f32) local.get $0 i32.reinterpret_f32 local.tee $1 i32.const 8388608 i32.lt_u - local.tee $3 - i32.eqz - if + if (result i32) + i32.const 1 + else local.get $1 i32.const 31 i32.shr_u - local.set $3 end - local.get $3 if local.get $1 i32.const 1 @@ -1544,7 +1515,7 @@ return end i32.const -25 - local.set $5 + local.set $4 local.get $0 f32.const 33554432 f32.mul @@ -1570,7 +1541,7 @@ local.get $1 i32.const 4913933 i32.add - local.tee $3 + local.tee $1 i32.const 8388607 i32.and i32.const 1060439283 @@ -1583,21 +1554,21 @@ local.get $0 f32.add f32.div - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f32.mul - local.tee $6 - local.get $6 + local.tee $5 + local.get $5 f32.mul local.set $2 - local.get $4 + local.get $3 f32.const 0.5 local.get $0 f32.mul local.get $0 f32.mul - local.tee $4 - local.get $6 + local.tee $3 + local.get $5 f32.const 0.6666666269302368 local.get $2 f32.const 0.2849878668785095 @@ -1614,19 +1585,19 @@ f32.add f32.add f32.mul - local.get $3 + local.get $1 i32.const 23 i32.shr_s i32.const 127 i32.sub - local.get $5 + local.get $4 i32.add f32.convert_i32_s local.tee $2 f32.const 9.05800061445916e-06 f32.mul f32.add - local.get $4 + local.get $3 f32.sub local.get $0 f32.add @@ -1695,14 +1666,14 @@ (func $~lib/math/NativeMath.asin (; 53 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) - (local $3 i32) - (local $4 f64) + (local $3 f64) + (local $4 i32) local.get $0 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $4 i32.const 2147483647 i32.and local.tee $2 @@ -1736,17 +1707,14 @@ i32.const 1071644672 i32.lt_u if + local.get $2 + i32.const 1048576 + i32.ge_u + i32.const 0 local.get $2 i32.const 1045430272 i32.lt_u - local.tee $3 - if - local.get $2 - i32.const 1048576 - i32.ge_u - local.set $3 - end - local.get $3 + select if local.get $0 return @@ -1772,7 +1740,7 @@ local.set $0 local.get $1 call $~lib/math/R - local.set $4 + local.set $3 local.get $2 i32.const 1072640819 i32.ge_u @@ -1781,7 +1749,7 @@ f64.const 2 local.get $0 local.get $0 - local.get $4 + local.get $3 f64.mul f64.add f64.mul @@ -1793,7 +1761,7 @@ f64.const 2 local.get $0 f64.mul - local.get $4 + local.get $3 f64.mul f64.const 6.123233995736766e-17 f64.const 2 @@ -1823,7 +1791,7 @@ f64.sub end local.set $0 - local.get $3 + local.get $4 i32.const 31 i32.shr_u if @@ -1834,29 +1802,26 @@ local.get $0 ) (func $std/math/test_asin (; 54 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.asin local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/asin local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.asin (; 55 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) - (local $3 i32) - (local $4 f32) - (local $5 f64) + (local $3 f32) + (local $4 f64) local.get $0 i32.reinterpret_f32 i32.const 2147483647 @@ -1887,17 +1852,14 @@ i32.const 1056964608 i32.lt_u if + local.get $1 + i32.const 8388608 + i32.ge_u + i32.const 0 local.get $1 i32.const 964689920 i32.lt_u - local.tee $3 - if (result i32) - local.get $1 - i32.const 8388608 - i32.ge_u - else - local.get $3 - end + select if local.get $0 return @@ -1951,15 +1913,15 @@ f32.mul f32.add f32.div - local.set $4 + local.set $3 f64.const 1.5707963705062866 f64.const 2 local.get $2 f64.promote_f32 f64.sqrt - local.tee $5 - local.get $5 + local.tee $4 local.get $4 + local.get $3 f64.promote_f32 f64.mul f64.add @@ -2047,22 +2009,20 @@ f64.copysign ) (func $std/math/test_asinh (; 58 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.asinh local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/asinh local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.asinh (; 59 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 f32) @@ -2360,22 +2320,20 @@ f64.copysign ) (func $std/math/test_atan (; 62 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.atan local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/atan local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.atan (; 63 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) @@ -2638,22 +2596,20 @@ f64.copysign ) (func $std/math/test_atanh (; 66 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.atanh local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/atanh local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.atanh (; 67 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 f32) @@ -2716,19 +2672,16 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i64) + (local $5 i64) + (local $6 i32) (local $7 i32) - local.get $1 - local.get $1 - f64.ne - local.tee $3 - local.set $2 - local.get $2 + i32.const 1 local.get $0 local.get $0 f64.ne - local.get $3 + local.get $1 + local.get $1 + f64.ne select if local.get $1 @@ -2738,20 +2691,20 @@ end local.get $0 i64.reinterpret_f64 - local.tee $6 + local.tee $5 i64.const 32 i64.shr_u i32.wrap_i64 local.set $3 - local.get $6 + local.get $5 i32.wrap_i64 - local.set $5 + local.set $6 local.get $1 i64.reinterpret_f64 - local.tee $6 + local.tee $5 i32.wrap_i64 local.tee $7 - local.get $6 + local.get $5 i64.const 32 i64.shr_u i32.wrap_i64 @@ -2779,11 +2732,11 @@ i32.const 2147483647 i32.and local.set $4 - local.get $5 local.get $3 i32.const 2147483647 i32.and - local.tee $5 + local.tee $3 + local.get $6 i32.or i32.eqz if @@ -2822,7 +2775,7 @@ i32.const 2146435072 i32.eq if - local.get $5 + local.get $3 i32.const 2146435072 i32.eq if @@ -2875,33 +2828,27 @@ end end end + i32.const 1 + local.get $3 + i32.const 2146435072 + i32.eq local.get $4 i32.const 67108864 i32.add - local.get $5 + local.get $3 i32.lt_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $5 - i32.const 2146435072 - i32.eq - end + select br_if $folding-inner0 + local.get $3 + i32.const 67108864 + i32.add + local.get $4 + i32.lt_u + i32.const 0 local.get $2 i32.const 2 i32.and - local.tee $3 - if (result i32) - local.get $5 - i32.const 67108864 - i32.add - local.get $4 - i32.lt_u - else - local.get $3 - end + select if (result f64) f64.const 0 else @@ -2954,40 +2901,34 @@ select ) (func $std/math/test_atan2 (; 70 ;) (type $FUNCSIG$idddd) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) - (local $4 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.atan2 local.get $2 local.get $3 call $std/math/check - local.tee $4 - if + if (result i32) local.get $0 local.get $1 call $~lib/bindings/Math/atan2 local.get $2 local.get $3 call $std/math/check - local.set $4 + else + i32.const 0 end - local.get $4 ) (func $~lib/math/NativeMathf.atan2 (; 71 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - local.get $1 - local.get $1 - f32.ne - local.tee $3 - local.set $2 - local.get $2 + i32.const 1 local.get $0 local.get $0 f32.ne - local.get $3 + local.get $1 + local.get $1 + f32.ne select if local.get $1 @@ -3025,7 +2966,7 @@ local.get $3 i32.const 2147483647 i32.and - local.tee $5 + local.tee $3 i32.eqz if block $break|0 @@ -3061,7 +3002,7 @@ i32.const 2139095040 i32.eq if - local.get $5 + local.get $3 i32.const 2139095040 i32.eq if @@ -3114,33 +3055,27 @@ end end end + i32.const 1 + local.get $3 + i32.const 2139095040 + i32.eq local.get $4 i32.const 218103808 i32.add - local.get $5 + local.get $3 i32.lt_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $5 - i32.const 2139095040 - i32.eq - end + select br_if $folding-inner0 + local.get $3 + i32.const 218103808 + i32.add + local.get $4 + i32.lt_u + i32.const 0 local.get $2 i32.const 2 i32.and - local.tee $3 - if (result i32) - local.get $5 - i32.const 218103808 - i32.add - local.get $4 - i32.lt_u - else - local.get $3 - end + select if (result f32) f32.const 0 else @@ -3323,22 +3258,20 @@ f64.add ) (func $std/math/test_cbrt (; 74 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.cbrt local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/cbrt local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.cbrt (; 75 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 f64) @@ -3444,13 +3377,11 @@ call $std/math/check ) (func $std/math/test_ceil (; 77 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) - (local $2 i32) local.get $0 f64.ceil local.get $1 f64.const 0 call $std/math/check - local.tee $2 if (result i32) local.get $0 call $~lib/bindings/Math/ceil @@ -3458,7 +3389,7 @@ f64.const 0 call $std/math/check else - local.get $2 + i32.const 0 end ) (func $std/math/test_ceilf (; 78 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) @@ -3939,14 +3870,14 @@ i64.const 63 i64.shr_u i32.wrap_i64 - local.set $5 + local.set $6 local.get $8 i64.const 32 i64.shr_u i64.const 2147483647 i64.and i32.wrap_i64 - local.tee $6 + local.tee $5 i32.const 1078159482 i32.ge_u if @@ -3957,7 +3888,7 @@ local.get $0 return end - local.get $5 + local.get $6 if f64.const -1 return @@ -3972,13 +3903,13 @@ return end end - local.get $6 + local.get $5 i32.const 1071001154 i32.gt_u if local.get $0 i32.const 1 - local.get $5 + local.get $6 i32.const 1 i32.shl i32.sub @@ -3990,7 +3921,7 @@ f64.copysign f64.add i32.trunc_f64_s - local.get $6 + local.get $5 i32.const 1072734898 i32.lt_u select @@ -4013,7 +3944,7 @@ f64.sub local.set $7 else - local.get $6 + local.get $5 i32.const 1016070144 i32.lt_u if @@ -4139,17 +4070,14 @@ i64.shl f64.reinterpret_i64 local.set $1 + i32.const 1 + local.get $3 + i32.const 56 + i32.gt_s local.get $3 i32.const 0 i32.lt_s - local.tee $5 - if (result i32) - local.get $5 - else - local.get $3 - i32.const 56 - i32.gt_s - end + select if local.get $0 local.get $2 @@ -4418,51 +4346,49 @@ f64.mul ) (func $std/math/test_cosh (; 84 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.cosh local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/cosh local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.expm1 (; 85 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) - (local $1 f32) - (local $2 i32) + (local $1 i32) + (local $2 f32) (local $3 f32) - (local $4 i32) - (local $5 f32) + (local $4 f32) + (local $5 i32) (local $6 f32) local.get $0 i32.reinterpret_f32 - local.tee $4 + local.tee $1 i32.const 31 i32.shr_u - local.set $2 - local.get $4 + local.set $5 + local.get $1 i32.const 2147483647 i32.and - local.tee $4 + local.tee $1 i32.const 1100331076 i32.ge_u if - local.get $4 + local.get $1 i32.const 2139095040 i32.gt_u if local.get $0 return end - local.get $2 + local.get $5 if f32.const -1 return @@ -4477,13 +4403,13 @@ return end end - local.get $4 + local.get $1 i32.const 1051816472 i32.gt_u if local.get $0 i32.const 1 - local.get $2 + local.get $5 i32.const 1 i32.shl i32.sub @@ -4495,30 +4421,30 @@ f32.copysign f32.add i32.trunc_f32_s - local.get $4 + local.get $1 i32.const 1065686418 i32.lt_u select - local.tee $2 + local.tee $1 f32.convert_i32_s local.tee $0 f32.const 0.6931381225585938 f32.mul f32.sub - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 local.get $0 f32.const 9.05800061445916e-06 f32.mul - local.tee $1 + local.tee $2 f32.sub local.tee $0 f32.sub - local.get $1 + local.get $2 f32.sub - local.set $5 + local.set $4 else - local.get $4 + local.get $1 i32.const 855638016 i32.lt_u if (result i32) @@ -4527,7 +4453,7 @@ else i32.const 0 end - local.set $2 + local.set $1 end f32.const 3 f32.const 1 @@ -4537,9 +4463,9 @@ f32.mul local.tee $3 f32.mul - local.tee $1 + local.tee $2 f32.const -0.03333321213722229 - local.get $1 + local.get $2 f32.const 1.5807170420885086e-03 f32.mul f32.add @@ -4550,7 +4476,7 @@ f32.mul f32.sub local.set $3 - local.get $1 + local.get $2 local.get $6 local.get $3 f32.sub @@ -4562,42 +4488,42 @@ f32.div f32.mul local.set $3 - local.get $2 + local.get $1 i32.eqz if local.get $0 local.get $0 local.get $3 f32.mul - local.get $1 + local.get $2 f32.sub f32.sub return end local.get $0 local.get $3 - local.get $5 + local.get $4 f32.sub f32.mul - local.get $5 - f32.sub - local.get $1 + local.get $4 f32.sub - local.set $1 local.get $2 + f32.sub + local.set $2 + local.get $1 i32.const -1 i32.eq if f32.const 0.5 local.get $0 - local.get $1 + local.get $2 f32.sub f32.mul f32.const 0.5 f32.sub return end - local.get $2 + local.get $1 i32.const 1 i32.eq if @@ -4606,7 +4532,7 @@ f32.lt if f32.const -2 - local.get $1 + local.get $2 local.get $0 f32.const 0.5 f32.add @@ -4617,39 +4543,35 @@ f32.const 1 f32.const 2 local.get $0 - local.get $1 + local.get $2 f32.sub f32.mul f32.add return end - local.get $2 + local.get $1 i32.const 127 i32.add i32.const 23 i32.shl f32.reinterpret_i32 - local.set $5 - local.get $2 + local.set $4 + i32.const 1 + local.get $1 + i32.const 56 + i32.gt_s + local.get $1 i32.const 0 i32.lt_s - local.tee $4 - i32.eqz - if - local.get $2 - i32.const 56 - i32.gt_s - local.set $4 - end - local.get $4 + select if local.get $0 - local.get $1 + local.get $2 f32.sub f32.const 1 f32.add local.set $0 - local.get $2 + local.get $1 i32.const 128 i32.eq if (result f32) @@ -4660,7 +4582,7 @@ f32.mul else local.get $0 - local.get $5 + local.get $4 f32.mul end f32.const 1 @@ -4668,7 +4590,7 @@ return end i32.const 127 - local.get $2 + local.get $1 i32.sub i32.const 23 i32.shl @@ -4678,19 +4600,19 @@ f32.const 1 local.get $3 f32.sub - local.get $1 + local.get $2 f32.sub f32.const 1 - local.get $1 + local.get $2 local.get $3 f32.add f32.sub - local.get $2 + local.get $1 i32.const 20 i32.lt_s select f32.add - local.get $5 + local.get $4 f32.mul ) (func $~lib/math/NativeMathf.exp (; 86 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -4888,22 +4810,20 @@ call $std/math/check ) (func $std/math/test_exp (; 89 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.exp local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/exp local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $std/math/test_expf (; 90 ;) (type $FUNCSIG$ifff) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 @@ -4913,22 +4833,20 @@ call $std/math/check ) (func $std/math/test_expm1 (; 91 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.expm1 local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/expm1 local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $std/math/test_expm1f (; 92 ;) (type $FUNCSIG$ifff) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 @@ -4938,13 +4856,11 @@ call $std/math/check ) (func $std/math/test_floor (; 93 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) - (local $2 i32) local.get $0 f64.floor local.get $1 f64.const 0 call $std/math/check - local.tee $2 if (result i32) local.get $0 call $~lib/bindings/Math/floor @@ -4952,7 +4868,7 @@ f64.const 0 call $std/math/check else - local.get $2 + i32.const 0 end ) (func $std/math/test_floorf (; 94 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) @@ -4971,9 +4887,8 @@ (local $7 f64) (local $8 f64) (local $9 i32) - (local $10 i32) - (local $11 f64) - (local $12 i64) + (local $10 f64) + (local $11 i64) local.get $0 i64.reinterpret_f64 i64.const 9223372036854775807 @@ -4987,10 +4902,10 @@ i64.lt_u if local.get $4 - local.set $12 + local.set $11 local.get $2 local.set $4 - local.get $12 + local.get $11 local.set $2 end local.get $4 @@ -5015,18 +4930,14 @@ local.get $4 f64.reinterpret_i64 local.set $0 + i32.const 1 + local.get $2 + i64.const 0 + i64.eq local.get $5 i32.const 2047 i32.eq - local.tee $10 - i32.eqz - if - local.get $2 - i64.const 0 - i64.eq - local.set $10 - end - local.get $10 + select if local.get $0 return @@ -5086,7 +4997,7 @@ f64.add local.tee $7 f64.sub - local.set $11 + local.set $10 local.get $1 local.get $1 local.get $1 @@ -5127,9 +5038,9 @@ f64.const 2 local.get $7 f64.mul - local.get $11 + local.get $10 f64.add - local.get $11 + local.get $10 f64.mul f64.add f64.add @@ -5141,31 +5052,29 @@ f64.mul ) (func $std/math/test_hypot (; 96 ;) (type $FUNCSIG$idddd) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) - (local $4 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.hypot local.get $2 local.get $3 call $std/math/check - local.tee $4 - if + if (result i32) local.get $0 local.get $1 call $~lib/bindings/Math/hypot local.get $2 local.get $3 call $std/math/check - local.set $4 + else + i32.const 0 end - local.get $4 ) (func $~lib/math/NativeMathf.hypot (; 97 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 f32) - (local $6 f64) + (local $4 f32) + (local $5 f64) + (local $6 i32) local.get $0 i32.reinterpret_f32 i32.const 2147483647 @@ -5179,10 +5088,10 @@ i32.lt_u if local.get $3 - local.set $4 + local.set $6 local.get $2 local.set $3 - local.get $4 + local.get $6 local.set $2 end local.get $3 @@ -5198,27 +5107,20 @@ local.get $1 return end + i32.const 1 local.get $3 - i32.const 2139095040 + local.get $2 + i32.sub + i32.const 209715200 i32.ge_u - local.tee $4 - i32.eqz - if - local.get $2 - i32.eqz - local.set $4 - end - local.get $4 + i32.const 1 + local.get $2 i32.eqz - if - local.get $3 - local.get $2 - i32.sub - i32.const 209715200 - i32.ge_u - local.set $4 - end - local.get $4 + local.get $3 + i32.const 2139095040 + i32.ge_u + select + select if local.get $0 local.get $1 @@ -5226,13 +5128,13 @@ return end f32.const 1 - local.set $5 + local.set $4 local.get $3 i32.const 1568669696 i32.ge_u if (result f32) f32.const 1237940039285380274899124e3 - local.set $5 + local.set $4 local.get $1 f32.const 8.077935669463161e-28 f32.mul @@ -5246,7 +5148,7 @@ i32.lt_u if (result f32) f32.const 8.077935669463161e-28 - local.set $5 + local.set $4 local.get $1 f32.const 1237940039285380274899124e3 f32.mul @@ -5259,16 +5161,16 @@ end end local.set $0 - local.get $5 + local.get $4 local.get $0 f64.promote_f32 - local.tee $6 - local.get $6 + local.tee $5 + local.get $5 f64.mul local.get $1 f64.promote_f32 - local.tee $6 - local.get $6 + local.tee $5 + local.get $5 f64.mul f64.add f32.demote_f64 @@ -5284,22 +5186,20 @@ call $std/math/check ) (func $std/math/test_log (; 99 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.log local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/log local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $std/math/test_logf (; 100 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) local.get $0 @@ -5311,33 +5211,30 @@ (func $~lib/math/NativeMath.log10 (; 101 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 f64) - (local $6 i32) + (local $3 i64) + (local $4 f64) + (local $5 i32) + (local $6 f64) (local $7 f64) (local $8 f64) - (local $9 f64) local.get $0 i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $2 i32.const 1048576 i32.lt_u - local.tee $2 - i32.eqz - if - local.get $3 + if (result i32) + i32.const 1 + else + local.get $2 i32.const 31 i32.shr_u - local.set $2 end - local.get $2 if - local.get $4 + local.get $3 i64.const 1 i64.shl i64.const 0 @@ -5350,7 +5247,7 @@ f64.div return end - local.get $3 + local.get $2 i32.const 31 i32.shr_u if @@ -5362,18 +5259,18 @@ return end i32.const -54 - local.set $6 + local.set $5 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $3 + local.set $2 else - local.get $3 + local.get $2 i32.const 2146435072 i32.ge_u if @@ -5381,28 +5278,25 @@ return else local.get $3 + i64.const 32 + i64.shl + i64.const 0 + i64.eq + i32.const 0 + local.get $2 i32.const 1072693248 i32.eq - local.tee $2 - if - local.get $4 - i64.const 32 - i64.shl - i64.const 0 - i64.eq - local.set $2 - end - local.get $2 + select if f64.const 0 return end end end - local.get $4 + local.get $3 i64.const 4294967295 i64.and - local.get $3 + local.get $2 i32.const 614242 i32.add local.tee $2 @@ -5422,26 +5316,26 @@ local.get $1 f64.add f64.div + local.tee $6 + local.get $6 + f64.mul local.tee $7 local.get $7 f64.mul - local.tee $8 - local.get $8 - f64.mul local.set $0 local.get $2 i32.const 20 i32.shr_u i32.const 1023 i32.sub - local.get $6 + local.get $5 i32.add f64.convert_i32_s - local.tee $5 + local.tee $4 f64.const 0.30102999566361177 f64.mul - local.set $9 - local.get $5 + local.set $8 + local.get $4 f64.const 3.694239077158931e-13 f64.mul local.get $1 @@ -5457,13 +5351,13 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $5 + local.tee $4 f64.sub local.get $1 f64.sub - local.get $7 + local.get $6 local.get $1 - local.get $8 + local.get $7 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -5494,7 +5388,7 @@ f64.mul f64.add local.tee $0 - local.get $5 + local.get $4 f64.add f64.const 2.5082946711645275e-11 f64.mul @@ -5503,9 +5397,9 @@ f64.const 0.4342944818781689 f64.mul f64.add - local.get $9 - local.get $9 - local.get $5 + local.get $8 + local.get $8 + local.get $4 f64.const 0.4342944818781689 f64.mul local.tee $0 @@ -5519,46 +5413,41 @@ f64.add ) (func $std/math/test_log10 (; 102 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.log10 local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/log10 local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.log10 (; 103 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) + (local $2 f32) + (local $3 i32) + (local $4 f32) (local $5 f32) (local $6 f32) (local $7 f32) - (local $8 f32) local.get $0 i32.reinterpret_f32 local.tee $1 i32.const 8388608 i32.lt_u - local.tee $2 - i32.eqz - if + if (result i32) + i32.const 1 + else local.get $1 i32.const 31 i32.shr_u - local.set $2 end - local.get $2 if local.get $1 i32.const 1 @@ -5584,7 +5473,7 @@ return end i32.const -25 - local.set $4 + local.set $3 local.get $0 f32.const 33554432 f32.mul @@ -5610,7 +5499,7 @@ local.get $1 i32.const 4913933 i32.add - local.tee $2 + local.tee $1 i32.const 8388607 i32.and i32.const 1060439283 @@ -5623,22 +5512,22 @@ local.get $0 f32.add f32.div + local.tee $4 + local.get $4 + f32.mul local.tee $5 local.get $5 f32.mul - local.tee $6 - local.get $6 - f32.mul - local.set $3 - local.get $2 + local.set $2 + local.get $1 i32.const 23 i32.shr_u i32.const 127 i32.sub - local.get $4 + local.get $3 i32.add f32.convert_i32_s - local.tee $8 + local.tee $7 f32.const 7.903415166765626e-07 f32.mul local.get $0 @@ -5654,22 +5543,22 @@ i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $7 + local.tee $6 f32.sub local.get $0 f32.sub - local.get $5 + local.get $4 local.get $0 - local.get $6 + local.get $5 f32.const 0.6666666269302368 - local.get $3 + local.get $2 f32.const 0.2849878668785095 f32.mul f32.add f32.mul - local.get $3 + local.get $2 f32.const 0.40000972151756287 - local.get $3 + local.get $2 f32.const 0.24279078841209412 f32.mul f32.add @@ -5679,7 +5568,7 @@ f32.mul f32.add local.tee $0 - local.get $7 + local.get $6 f32.add f32.const -3.168997136526741e-05 f32.mul @@ -5688,11 +5577,11 @@ f32.const 0.434326171875 f32.mul f32.add - local.get $7 + local.get $6 f32.const 0.434326171875 f32.mul f32.add - local.get $8 + local.get $7 f32.const 0.3010292053222656 f32.mul f32.add @@ -5705,22 +5594,20 @@ call $std/math/check ) (func $std/math/test_log1p (; 105 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.log1p local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/log1p local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $std/math/test_log1pf (; 106 ;) (type $FUNCSIG$ifff) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 @@ -5732,32 +5619,29 @@ (func $~lib/math/NativeMath.log2 (; 107 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 f64) (local $5 f64) - (local $6 f64) - (local $7 i32) - (local $8 f64) + (local $6 i32) + (local $7 f64) local.get $0 i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $2 i32.const 1048576 i32.lt_u - local.tee $2 - i32.eqz - if - local.get $3 + if (result i32) + i32.const 1 + else + local.get $2 i32.const 31 i32.shr_u - local.set $2 end - local.get $2 if - local.get $4 + local.get $3 i64.const 1 i64.shl i64.const 0 @@ -5770,7 +5654,7 @@ f64.div return end - local.get $3 + local.get $2 i32.const 31 i32.shr_u if @@ -5782,18 +5666,18 @@ return end i32.const -54 - local.set $7 + local.set $6 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $3 + local.set $2 else - local.get $3 + local.get $2 i32.const 2146435072 i32.ge_u if @@ -5801,28 +5685,25 @@ return else local.get $3 + i64.const 32 + i64.shl + i64.const 0 + i64.eq + i32.const 0 + local.get $2 i32.const 1072693248 i32.eq - local.tee $2 - if - local.get $4 - i64.const 32 - i64.shl - i64.const 0 - i64.eq - local.set $2 - end - local.get $2 + select if f64.const 0 return end end end - local.get $4 + local.get $3 i64.const 4294967295 i64.and - local.get $3 + local.get $2 i32.const 614242 i32.add local.tee $2 @@ -5842,12 +5723,12 @@ local.get $1 f64.add f64.div + local.tee $4 + local.get $4 + f64.mul local.tee $5 local.get $5 f64.mul - local.tee $6 - local.get $6 - f64.mul local.set $0 local.get $1 local.get $1 @@ -5862,13 +5743,13 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $8 + local.tee $7 f64.sub local.get $1 f64.sub - local.get $5 + local.get $4 local.get $1 - local.get $6 + local.get $5 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -5904,18 +5785,18 @@ i32.shr_u i32.const 1023 i32.sub - local.get $7 + local.get $6 i32.add f64.convert_i32_s - local.tee $5 - local.get $8 + local.tee $4 + local.get $7 f64.const 1.4426950407214463 f64.mul - local.tee $6 + local.tee $5 f64.add local.set $1 local.get $0 - local.get $8 + local.get $7 f64.add f64.const 1.6751713164886512e-10 f64.mul @@ -5923,55 +5804,50 @@ f64.const 1.4426950407214463 f64.mul f64.add - local.get $5 + local.get $4 local.get $1 f64.sub - local.get $6 + local.get $5 f64.add f64.add local.get $1 f64.add ) (func $std/math/test_log2 (; 108 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.log2 local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/log2 local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.log2 (; 109 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) + (local $2 f32) + (local $3 i32) + (local $4 f32) (local $5 f32) (local $6 f32) - (local $7 f32) local.get $0 i32.reinterpret_f32 local.tee $1 i32.const 8388608 i32.lt_u - local.tee $2 - i32.eqz - if + if (result i32) + i32.const 1 + else local.get $1 i32.const 31 i32.shr_u - local.set $2 end - local.get $2 if local.get $1 i32.const 1 @@ -5997,7 +5873,7 @@ return end i32.const -25 - local.set $4 + local.set $3 local.get $0 f32.const 33554432 f32.mul @@ -6023,7 +5899,7 @@ local.get $1 i32.const 4913933 i32.add - local.tee $2 + local.tee $1 i32.const 8388607 i32.and i32.const 1060439283 @@ -6036,13 +5912,13 @@ local.get $0 f32.add f32.div + local.tee $4 + local.get $4 + f32.mul local.tee $5 local.get $5 f32.mul - local.tee $6 - local.get $6 - f32.mul - local.set $3 + local.set $2 local.get $0 local.get $0 f32.const 0.5 @@ -6056,22 +5932,22 @@ i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $7 + local.tee $6 f32.sub local.get $0 f32.sub - local.get $5 + local.get $4 local.get $0 - local.get $6 + local.get $5 f32.const 0.6666666269302368 - local.get $3 + local.get $2 f32.const 0.2849878668785095 f32.mul f32.add f32.mul - local.get $3 + local.get $2 f32.const 0.40000972151756287 - local.get $3 + local.get $2 f32.const 0.24279078841209412 f32.mul f32.add @@ -6081,7 +5957,7 @@ f32.mul f32.add local.tee $0 - local.get $7 + local.get $6 f32.add f32.const -1.7605285393074155e-04 f32.mul @@ -6089,16 +5965,16 @@ f32.const 1.44287109375 f32.mul f32.add - local.get $7 + local.get $6 f32.const 1.44287109375 f32.mul f32.add - local.get $2 + local.get $1 i32.const 23 i32.shr_u i32.const 127 i32.sub - local.get $4 + local.get $3 i32.add f32.convert_i32_s f32.add @@ -6111,24 +5987,22 @@ call $std/math/check ) (func $std/math/test_max (; 111 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 local.get $1 f64.max local.get $2 f64.const 0 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 local.get $1 call $~lib/bindings/Math/max local.get $2 f64.const 0 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $std/math/test_maxf (; 112 ;) (type $FUNCSIG$ifff) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 @@ -6139,24 +6013,22 @@ call $std/math/check ) (func $std/math/test_min (; 113 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 local.get $1 f64.min local.get $2 f64.const 0 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 local.get $1 call $~lib/bindings/Math/min local.get $2 f64.const 0 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $std/math/test_minf (; 114 ;) (type $FUNCSIG$ifff) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 @@ -6171,10 +6043,9 @@ (local $3 i64) (local $4 i64) (local $5 i64) - (local $6 i32) + (local $6 i64) (local $7 i64) (local $8 i64) - (local $9 i64) local.get $0 i64.reinterpret_f64 local.tee $2 @@ -6194,31 +6065,26 @@ local.get $2 i64.const 63 i64.shr_u - local.set $8 - block (result i32) - local.get $3 - i64.const 1 - i64.shl - local.tee $7 - i64.const 0 + local.set $7 + local.get $3 + i64.const 1 + i64.shl + local.tee $6 + i64.const 0 + i64.eq + if (result i32) + i32.const 1 + else + local.get $4 + i64.const 2047 i64.eq - local.tee $6 - i32.eqz - if - local.get $4 - i64.const 2047 - i64.eq - local.set $6 - end - local.get $6 - i32.eqz end if (result i32) + i32.const 1 + else local.get $1 local.get $1 f64.ne - else - local.get $6 end if local.get $0 @@ -6233,12 +6099,12 @@ local.get $2 i64.const 1 i64.shl - local.tee $9 - local.get $7 + local.tee $8 + local.get $6 i64.le_u if - local.get $7 - local.get $9 + local.get $6 + local.get $8 i64.eq br_if $folding-inner0 local.get $0 @@ -6365,7 +6231,7 @@ i64.add i64.shr_u end - local.get $8 + local.get $7 i64.const 63 i64.shl i64.or @@ -6377,14 +6243,12 @@ f64.mul ) (func $std/math/test_mod (; 116 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.mod local.get $2 f64.const 0 call $std/math/check - local.tee $3 if (result i32) local.get $0 local.get $1 @@ -6393,7 +6257,7 @@ f64.const 0 call $std/math/check else - local.get $3 + i32.const 0 end ) (func $~lib/math/NativeMathf.mod (; 117 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) @@ -6406,7 +6270,7 @@ (local $8 i32) local.get $0 i32.reinterpret_f32 - local.tee $3 + local.tee $2 i32.const 23 i32.shr_u i32.const 255 @@ -6414,39 +6278,33 @@ local.set $4 local.get $1 i32.reinterpret_f32 - local.tee $5 + local.tee $3 i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $6 - local.get $3 + local.set $5 + local.get $2 i32.const -2147483648 i32.and - local.set $8 - block (result i32) - local.get $5 + local.set $7 + local.get $3 + i32.const 1 + i32.shl + local.tee $6 + if (result i32) + local.get $4 + i32.const 255 + i32.eq + else i32.const 1 - i32.shl - local.tee $7 - i32.eqz - local.tee $2 - i32.eqz - if - local.get $4 - i32.const 255 - i32.eq - local.set $2 - end - local.get $2 - i32.eqz end if (result i32) + i32.const 1 + else local.get $1 local.get $1 f32.ne - else - local.get $2 end if local.get $0 @@ -6458,15 +6316,15 @@ return end block $folding-inner0 - local.get $3 + local.get $2 i32.const 1 i32.shl - local.tee $2 - local.get $7 + local.tee $8 + local.get $6 i32.le_u if - local.get $2 - local.get $7 + local.get $6 + local.get $8 i32.eq br_if $folding-inner0 local.get $0 @@ -6474,16 +6332,16 @@ end local.get $4 if (result i32) - local.get $3 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $3 + local.get $2 i32.const 1 local.get $4 - local.get $3 + local.get $2 i32.const 9 i32.shl i32.clz @@ -6493,30 +6351,30 @@ i32.shl end local.set $2 - local.get $6 + local.get $5 if (result i32) - local.get $5 + local.get $3 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $5 + local.get $3 i32.const 1 - local.get $6 local.get $5 + local.get $3 i32.const 9 i32.shl i32.clz i32.sub - local.tee $6 + local.tee $5 i32.sub i32.shl end local.set $3 loop $continue|0 local.get $4 - local.get $6 + local.get $5 i32.gt_s if local.get $2 @@ -6585,7 +6443,7 @@ i32.sub i32.shr_u end - local.get $8 + local.get $7 i32.or f32.reinterpret_i32 return @@ -6603,9 +6461,9 @@ call $std/math/check ) (func $~lib/math/NativeMath.pow (; 119 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) - (local $2 i32) + (local $2 f64) (local $3 f64) - (local $4 f64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 f64) @@ -6634,7 +6492,7 @@ local.tee $17 i32.const 2147483647 i32.and - local.set $5 + local.set $4 local.get $1 i64.reinterpret_f64 local.tee $16 @@ -6655,46 +6513,38 @@ f64.const 1 return end - local.get $5 + i32.const 1 + local.get $8 i32.const 2146435072 i32.gt_s - local.tee $2 - i32.eqz - if - local.get $5 + local.get $4 + i32.const 2146435072 + i32.gt_s + if (result i32) + i32.const 1 + else + local.get $19 + i32.const 0 + i32.ne + i32.const 0 + local.get $4 i32.const 2146435072 i32.eq - local.tee $2 - if - local.get $19 - i32.const 0 - i32.ne - local.set $2 - end - end - local.get $2 - i32.eqz - if - local.get $8 - i32.const 2146435072 - i32.gt_s - local.set $2 + select end - local.get $2 - i32.eqz - if + select + if (result i32) + i32.const 1 + else + local.get $6 + i32.const 0 + i32.ne + i32.const 0 local.get $8 i32.const 2146435072 i32.eq - local.tee $2 - if - local.get $6 - i32.const 0 - i32.ne - local.set $2 - end + select end - local.get $2 if local.get $0 local.get $1 @@ -6727,8 +6577,8 @@ i32.gt_s local.tee $13 select - local.tee $2 - local.get $2 + local.tee $5 + local.get $5 i32.const 52 i32.const 20 local.get $13 @@ -6737,13 +6587,13 @@ i32.sub local.tee $13 i32.shr_s - local.tee $2 + local.tee $5 local.get $13 i32.shl i32.eq if (result i32) i32.const 2 - local.get $2 + local.get $5 i32.const 1 i32.and i32.sub @@ -6763,13 +6613,13 @@ i32.const 2146435072 i32.eq if - local.get $5 + local.get $4 i32.const 1072693248 i32.sub local.get $19 i32.or if - local.get $5 + local.get $4 i32.const 1072693248 i32.ge_s if @@ -6840,66 +6690,58 @@ end local.get $0 f64.abs - local.set $4 + local.set $3 local.get $19 i32.eqz if - local.get $5 - i32.eqz - local.tee $2 - i32.eqz - if - local.get $5 - i32.const 2146435072 - i32.eq - local.set $2 - end - local.get $2 - i32.eqz - if - local.get $5 - i32.const 1072693248 - i32.eq - local.set $2 - end - local.get $2 + i32.const 1 + local.get $4 + i32.const 1072693248 + i32.eq + local.get $4 + i32.const 2146435072 + i32.eq + i32.const 1 + local.get $4 + select + select if f64.const 1 - local.get $4 + local.get $3 f64.div - local.get $4 + local.get $3 local.get $9 i32.const 0 i32.lt_s select - local.set $4 + local.set $3 local.get $17 i32.const 0 i32.lt_s if (result f64) - local.get $5 + local.get $4 i32.const 1072693248 i32.sub local.get $11 i32.or if (result f64) - local.get $4 + local.get $3 f64.neg - local.get $4 + local.get $3 local.get $11 i32.const 1 i32.eq select else - local.get $4 - local.get $4 + local.get $3 + local.get $3 f64.sub local.tee $0 local.get $0 f64.div end else - local.get $4 + local.get $3 end return end @@ -6937,7 +6779,7 @@ i32.const 1139802112 i32.gt_s if - local.get $5 + local.get $4 i32.const 1072693247 i32.le_s if @@ -6949,7 +6791,7 @@ select return end - local.get $5 + local.get $4 i32.const 1072693248 i32.ge_s if @@ -6962,7 +6804,7 @@ return end end - local.get $5 + local.get $4 i32.const 1072693247 i32.lt_s if @@ -6984,7 +6826,7 @@ end return end - local.get $5 + local.get $4 i32.const 1072693248 i32.gt_s if @@ -7006,16 +6848,16 @@ end return end - local.get $4 + local.get $3 f64.const 1 f64.sub - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f64.mul f64.const 0.5 - local.get $3 + local.get $2 f64.const 0.3333333333333333 - local.get $3 + local.get $2 f64.const 0.25 f64.mul f64.sub @@ -7024,10 +6866,10 @@ f64.mul local.set $0 f64.const 1.4426950216293335 - local.get $3 + local.get $2 f64.mul - local.tee $4 - local.get $3 + local.tee $3 + local.get $2 f64.const 1.9259629911266175e-08 f64.mul local.get $0 @@ -7043,50 +6885,50 @@ local.set $10 local.get $0 local.get $10 - local.get $4 + local.get $3 f64.sub f64.sub else i32.const 0 local.set $6 - local.get $5 + local.get $4 i32.const 1048576 i32.lt_s if (result i32) - local.get $4 + local.get $3 f64.const 9007199254740992 f64.mul - local.tee $4 + local.tee $3 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $5 + local.set $4 i32.const -53 else i32.const 0 end - local.get $5 + local.get $4 i32.const 20 i32.shr_s i32.const 1023 i32.sub i32.add local.set $6 - local.get $5 + local.get $4 i32.const 1048575 i32.and - local.tee $2 + local.tee $5 i32.const 1072693248 i32.or - local.set $5 - local.get $2 + local.set $4 + local.get $5 i32.const 235662 i32.le_s if (result i32) i32.const 0 else - local.get $2 + local.get $5 i32.const 767610 i32.lt_s if (result i32) @@ -7096,38 +6938,38 @@ i32.const 1 i32.add local.set $6 - local.get $5 + local.get $4 i32.const -1048576 i32.add - local.set $5 + local.set $4 i32.const 0 end end - local.set $2 - local.get $4 + local.set $5 + local.get $3 i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $5 + local.get $4 i64.extend_i32_s i64.const 32 i64.shl i64.or f64.reinterpret_i64 - local.tee $4 + local.tee $3 f64.const 1.5 f64.const 1 - local.get $2 + local.get $5 select local.tee $0 f64.sub local.tee $10 f64.const 1 - local.get $4 + local.get $3 local.get $0 f64.add f64.div - local.tee $3 + local.tee $2 f64.mul local.tee $18 i64.reinterpret_f64 @@ -7135,15 +6977,15 @@ i64.and f64.reinterpret_i64 local.set $14 + local.get $3 local.get $4 - local.get $5 i32.const 1 i32.shr_s i32.const 536870912 i32.or i32.const 524288 i32.add - local.get $2 + local.get $5 i32.const 18 i32.shl i32.add @@ -7151,7 +6993,7 @@ i64.const 32 i64.shl f64.reinterpret_i64 - local.tee $4 + local.tee $3 local.get $0 f64.sub f64.sub @@ -7192,10 +7034,10 @@ f64.mul f64.add f64.mul - local.get $3 + local.get $2 local.get $10 local.get $14 - local.get $4 + local.get $3 f64.mul f64.sub local.get $14 @@ -7203,7 +7045,7 @@ f64.mul f64.sub f64.mul - local.tee $3 + local.tee $2 local.get $14 local.get $18 f64.add @@ -7217,8 +7059,8 @@ f64.reinterpret_i64 local.tee $10 f64.mul - local.tee $4 - local.get $3 + local.tee $3 + local.get $2 local.get $10 f64.mul local.get $0 @@ -7237,15 +7079,15 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $3 + local.tee $2 f64.mul local.tee $20 f64.const -7.028461650952758e-09 - local.get $3 + local.get $2 f64.mul local.get $0 + local.get $2 local.get $3 - local.get $4 f64.sub f64.sub f64.const 0.9617966939259756 @@ -7253,16 +7095,16 @@ f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $2 + local.get $5 select f64.add - local.tee $3 + local.tee $2 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $2 + local.get $5 select - local.tee $4 + local.tee $3 f64.add local.get $6 f64.convert_i32_s @@ -7273,17 +7115,17 @@ i64.and f64.reinterpret_i64 local.set $10 - local.get $3 + local.get $2 local.get $10 local.get $0 f64.sub - local.get $4 + local.get $3 f64.sub local.get $20 f64.sub f64.sub end - local.set $4 + local.set $3 local.get $1 local.get $1 i64.reinterpret_f64 @@ -7295,20 +7137,20 @@ local.get $10 f64.mul local.get $1 - local.get $4 + local.get $3 f64.mul f64.add local.tee $1 local.get $0 local.get $10 f64.mul - local.tee $3 + local.tee $2 f64.add local.tee $0 i64.reinterpret_f64 local.tee $16 i32.wrap_i64 - local.set $2 + local.set $5 block $folding-inner1 block $folding-inner0 local.get $16 @@ -7322,14 +7164,14 @@ local.get $12 i32.const 1083179008 i32.sub - local.get $2 + local.get $5 i32.or br_if $folding-inner0 local.get $1 f64.const 8.008566259537294e-17 f64.add local.get $0 - local.get $3 + local.get $2 f64.sub f64.gt br_if $folding-inner0 @@ -7343,12 +7185,12 @@ local.get $12 i32.const -1064252416 i32.sub - local.get $2 + local.get $5 i32.or br_if $folding-inner1 local.get $1 local.get $0 - local.get $3 + local.get $2 f64.sub f64.le br_if $folding-inner1 @@ -7362,7 +7204,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $2 + local.set $5 i32.const 0 local.set $6 local.get $13 @@ -7370,7 +7212,7 @@ i32.gt_s if i32.const 1048576 - local.get $2 + local.get $5 i32.const 1 i32.add i32.shr_s @@ -7383,9 +7225,9 @@ i32.shr_s i32.const 1023 i32.sub - local.set $2 + local.set $5 i32.const 1048575 - local.get $2 + local.get $5 i32.shr_s i32.const -1 i32.xor @@ -7402,7 +7244,7 @@ i32.const 1048576 i32.or i32.const 20 - local.get $2 + local.get $5 i32.sub i32.shr_s local.set $6 @@ -7415,13 +7257,13 @@ i32.lt_s select local.set $6 - local.get $3 + local.get $2 local.get $0 f64.sub - local.set $3 + local.set $2 end local.get $1 - local.get $3 + local.get $2 f64.add i64.reinterpret_f64 i64.const -4294967296 @@ -7430,10 +7272,10 @@ local.tee $0 f64.const 0.6931471824645996 f64.mul - local.tee $4 + local.tee $3 local.get $1 local.get $0 - local.get $3 + local.get $2 f64.sub f64.sub f64.const 0.6931471805599453 @@ -7444,14 +7286,14 @@ f64.add local.tee $1 f64.add - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f64.mul local.set $0 local.get $7 f64.const 1 - local.get $3 - local.get $3 + local.get $2 + local.get $2 local.get $0 f64.const 0.16666666666666602 local.get $0 @@ -7479,17 +7321,17 @@ f64.sub f64.div local.get $1 + local.get $2 local.get $3 - local.get $4 f64.sub f64.sub local.tee $0 - local.get $3 + local.get $2 local.get $0 f64.mul f64.add f64.sub - local.get $3 + local.get $2 f64.sub f64.sub local.tee $0 @@ -7501,7 +7343,7 @@ i32.const 20 i32.shl i32.add - local.tee $2 + local.tee $5 i32.const 20 i32.shr_s i32.const 0 @@ -7515,7 +7357,7 @@ i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $2 + local.get $5 i64.extend_i32_s i64.const 32 i64.shl @@ -7539,24 +7381,22 @@ f64.mul ) (func $std/math/test_pow (; 120 ;) (type $FUNCSIG$idddd) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) - (local $4 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.pow local.get $2 local.get $3 call $std/math/check - local.tee $4 - if + if (result i32) local.get $0 local.get $1 call $~lib/bindings/Math/pow local.get $2 local.get $3 call $std/math/check - local.set $4 + else + i32.const 0 end - local.get $4 ) (func $~lib/math/NativeMathf.pow (; 121 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 f32) @@ -7579,7 +7419,7 @@ local.tee $8 i32.const 2147483647 i32.and - local.set $6 + local.set $5 local.get $1 i32.reinterpret_f32 local.tee $11 @@ -7591,18 +7431,14 @@ f32.const 1 return end - local.get $6 + i32.const 1 + local.get $10 i32.const 2139095040 i32.gt_s - local.tee $4 - i32.eqz - if - local.get $10 - i32.const 2139095040 - i32.gt_s - local.set $4 - end - local.get $4 + local.get $5 + i32.const 2139095040 + i32.gt_s + select if local.get $0 local.get $1 @@ -7631,14 +7467,14 @@ i32.sub local.tee $12 i32.shr_s - local.tee $4 + local.tee $6 local.get $12 i32.shl local.get $10 i32.eq if (result i32) i32.const 2 - local.get $4 + local.get $6 i32.const 1 i32.and i32.sub @@ -7649,20 +7485,20 @@ i32.const 0 end end - local.set $5 + local.set $4 end local.get $10 i32.const 2139095040 i32.eq if - local.get $6 + local.get $5 i32.const 1065353216 i32.eq if f32.const nan:0x400000 return else - local.get $6 + local.get $5 i32.const 1065353216 i32.gt_s if @@ -7730,25 +7566,18 @@ local.get $0 f32.abs local.set $3 - local.get $6 - i32.const 2139095040 + i32.const 1 + local.get $5 + i32.const 1065353216 i32.eq - local.tee $4 - i32.eqz - if - local.get $6 - i32.eqz - local.set $4 - end - local.get $4 + i32.const 1 + local.get $5 i32.eqz - if - local.get $6 - i32.const 1065353216 - i32.eq - local.set $4 - end - local.get $4 + local.get $5 + i32.const 2139095040 + i32.eq + select + select if f32.const 1 local.get $3 @@ -7763,16 +7592,16 @@ i32.const 0 i32.lt_s if (result f32) - local.get $6 + local.get $5 i32.const 1065353216 i32.sub - local.get $5 + local.get $4 i32.or if (result f32) local.get $3 f32.neg local.get $3 - local.get $5 + local.get $4 i32.const 1 i32.eq select @@ -7795,7 +7624,7 @@ i32.const 0 i32.lt_s if - local.get $5 + local.get $4 i32.eqz if local.get $0 @@ -7808,7 +7637,7 @@ end f32.const -1 f32.const 1 - local.get $5 + local.get $4 i32.const 1 i32.eq select @@ -7818,7 +7647,7 @@ i32.const 1291845632 i32.gt_s if (result f32) - local.get $6 + local.get $5 i32.const 1065353208 i32.lt_s if @@ -7840,7 +7669,7 @@ end return end - local.get $6 + local.get $5 i32.const 1065353223 i32.gt_s if @@ -7904,8 +7733,8 @@ f32.sub else i32.const 0 - local.set $5 - local.get $6 + local.set $4 + local.get $5 i32.const 8388608 i32.lt_s if (result i32) @@ -7913,55 +7742,55 @@ f32.const 16777216 f32.mul i32.reinterpret_f32 - local.set $6 + local.set $5 i32.const -24 else i32.const 0 end - local.get $6 + local.get $5 i32.const 23 i32.shr_s i32.const 127 i32.sub i32.add - local.set $5 - local.get $6 + local.set $4 + local.get $5 i32.const 8388607 i32.and - local.tee $4 + local.tee $6 i32.const 1065353216 i32.or - local.set $6 - local.get $4 + local.set $5 + local.get $6 i32.const 1885297 i32.le_s if (result i32) i32.const 0 else - local.get $4 + local.get $6 i32.const 6140887 i32.lt_s if (result i32) i32.const 1 else - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 - local.get $6 + local.set $4 + local.get $5 i32.const 8388608 i32.sub - local.set $6 + local.set $5 i32.const 0 end end - local.set $4 - local.get $6 + local.set $6 + local.get $5 f32.reinterpret_i32 local.tee $3 f32.const 1.5 f32.const 1 - local.get $4 + local.get $6 select local.tee $0 f32.sub @@ -7980,7 +7809,7 @@ f32.reinterpret_i32 local.set $13 local.get $3 - local.get $6 + local.get $5 i32.const 1 i32.shr_s i32.const -4096 @@ -7989,7 +7818,7 @@ i32.or i32.const 4194304 i32.add - local.get $4 + local.get $6 i32.const 21 i32.shl i32.add @@ -8096,18 +7925,18 @@ f32.add f32.const 1.5632208487659227e-06 f32.const 0 - local.get $4 + local.get $6 select f32.add local.tee $2 f32.add f32.const 0.5849609375 f32.const 0 - local.get $4 + local.get $6 select local.tee $3 f32.add - local.get $5 + local.get $4 f32.convert_i32_s local.tee $0 f32.add @@ -8197,15 +8026,15 @@ i32.shr_s i32.const 127 i32.sub - local.set $4 + local.set $6 i32.const 0 - local.set $5 + local.set $4 local.get $12 i32.const 1056964608 i32.gt_s if i32.const 8388608 - local.get $4 + local.get $6 i32.const 1 i32.add i32.shr_s @@ -8218,9 +8047,9 @@ i32.shr_s i32.const 127 i32.sub - local.set $4 + local.set $6 i32.const 8388607 - local.get $4 + local.get $6 i32.shr_s i32.const -1 i32.xor @@ -8234,19 +8063,19 @@ i32.const 8388608 i32.or i32.const 23 - local.get $4 + local.get $6 i32.sub i32.shr_s - local.set $5 + local.set $4 i32.const 0 - local.get $5 + local.get $4 i32.sub - local.get $5 + local.get $4 local.get $8 i32.const 0 i32.lt_s select - local.set $5 + local.set $4 local.get $2 local.get $0 f32.sub @@ -8326,21 +8155,21 @@ f32.sub local.tee $0 i32.reinterpret_f32 - local.get $5 + local.get $4 i32.const 23 i32.shl i32.add - local.tee $4 + local.tee $6 i32.const 23 i32.shr_s i32.const 0 i32.le_s if (result f32) local.get $0 - local.get $5 + local.get $4 call $~lib/math/NativeMathf.scalbn else - local.get $4 + local.get $6 f32.reinterpret_i32 end f32.mul @@ -8581,7 +8410,6 @@ ) (func $std/math/test_sign (; 129 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 f64) - (local $3 i32) local.get $0 local.set $2 f64.const 1 @@ -8598,16 +8426,15 @@ local.get $1 f64.const 0 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/sign local.get $1 f64.const 0 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $std/math/test_signf (; 130 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) f32.const 1 @@ -8629,19 +8456,10 @@ (local $2 i64) (local $3 i64) (local $4 i64) - (local $5 i32) - (local $6 i64) - (local $7 i32) - (local $8 f64) - (local $9 i32) - local.get $0 - i64.reinterpret_f64 - local.tee $2 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.set $3 + (local $5 i64) + (local $6 i32) + (local $7 f64) + (local $8 i32) local.get $1 i64.reinterpret_f64 local.tee $4 @@ -8649,35 +8467,35 @@ i64.shr_u i64.const 2047 i64.and - local.set $6 - local.get $2 + local.set $5 + local.get $0 + i64.reinterpret_f64 + local.tee $2 i64.const 63 i64.shr_u i32.wrap_i64 - local.set $9 - block (result i32) - local.get $4 - i64.const 1 - i64.shl - i64.const 0 - i64.eq - local.tee $5 - i32.eqz - if - local.get $3 - i64.const 2047 - i64.eq - local.set $5 - end - local.get $5 - i32.eqz - end + local.set $8 + i32.const 1 + local.get $2 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.tee $3 + i64.const 2047 + i64.eq + local.get $4 + i64.const 1 + i64.shl + i64.const 0 + i64.eq + select if (result i32) + i32.const 1 + else local.get $1 local.get $1 f64.ne - else - local.get $5 end if local.get $0 @@ -8721,18 +8539,18 @@ i64.or end local.set $2 - local.get $6 + local.get $5 i64.eqz if (result i64) local.get $4 i64.const 0 - local.get $6 + local.get $5 local.get $4 i64.const 12 i64.shl i64.clz i64.sub - local.tee $6 + local.tee $5 i64.sub i64.const 1 i64.add @@ -8747,13 +8565,13 @@ local.set $4 block $break|0 local.get $3 - local.get $6 + local.get $5 i64.lt_s if local.get $3 i64.const 1 i64.add - local.get $6 + local.get $5 i64.eq br_if $break|0 local.get $0 @@ -8761,30 +8579,30 @@ end loop $continue|1 local.get $3 - local.get $6 + local.get $5 i64.gt_s if local.get $2 local.get $4 i64.ge_u if - local.get $7 - i32.const 1 - i32.add - local.set $7 local.get $2 local.get $4 i64.sub local.set $2 + local.get $6 + i32.const 1 + i32.add + local.set $6 end local.get $2 i64.const 1 i64.shl local.set $2 - local.get $7 + local.get $6 i32.const 1 i32.shl - local.set $7 + local.set $6 local.get $3 i64.const 1 i64.sub @@ -8792,24 +8610,22 @@ br $continue|1 end end - block (result i32) + local.get $2 + local.get $4 + i64.ge_u + if local.get $2 local.get $4 - i64.ge_u - if - local.get $7 - i32.const 1 - i32.add - local.set $7 - local.get $2 - local.get $4 - i64.sub - local.set $2 - end - local.get $2 - i64.const 0 - i64.eq + i64.sub + local.set $2 + local.get $6 + i32.const 1 + i32.add + local.set $6 end + local.get $2 + i64.const 0 + i64.eq if i64.const -60 local.set $3 @@ -8830,7 +8646,7 @@ end local.get $1 f64.abs - local.set $0 + local.set $1 local.get $3 i64.const 0 i64.gt_s @@ -8852,49 +8668,43 @@ i64.shr_u end f64.reinterpret_i64 - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 f64.add - local.set $8 - local.get $1 + local.set $7 local.get $0 - f64.sub local.get $1 + f64.sub + local.get $0 local.get $3 - local.get $6 + local.get $5 i64.eq - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $3 i64.const 1 i64.add - local.get $6 + local.get $5 i64.eq - local.tee $5 if (result i32) - local.get $8 - local.get $0 + local.get $7 + local.get $1 f64.gt - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else - local.get $8 - local.get $0 + local.get $6 + i32.const 1 + i32.and + i32.const 0 + local.get $7 + local.get $1 f64.eq - local.tee $5 - if (result i32) - local.get $7 - i32.const 1 - i32.and - else - local.get $5 - end + select end else - local.get $5 + i32.const 0 end end select @@ -8902,7 +8712,7 @@ local.get $0 f64.neg local.get $0 - local.get $9 + local.get $8 select ) (func $std/math/test_rem (; 132 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) @@ -8921,48 +8731,39 @@ (local $6 i32) (local $7 f32) (local $8 i32) - local.get $0 + local.get $1 i32.reinterpret_f32 local.tee $4 i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $3 - local.get $1 + local.set $5 + local.get $0 i32.reinterpret_f32 - local.tee $5 + local.tee $2 + i32.const 31 + i32.shr_u + local.set $8 + local.get $2 i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $6 + local.tee $3 + i32.const 255 + i32.eq + i32.const 1 local.get $4 - i32.const 31 - i32.shr_u - local.set $8 - block (result i32) - local.get $5 - i32.const 1 - i32.shl - i32.eqz - local.tee $2 - i32.eqz - if - local.get $3 - i32.const 255 - i32.eq - local.set $2 - end - local.get $2 - i32.eqz - end + i32.const 1 + i32.shl + select if (result i32) + i32.const 1 + else local.get $1 local.get $1 f32.ne - else - local.get $2 end if local.get $0 @@ -8973,7 +8774,7 @@ f32.div return end - local.get $4 + local.get $2 i32.const 1 i32.shl i32.eqz @@ -8983,16 +8784,16 @@ end local.get $3 if (result i32) - local.get $4 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $4 + local.get $2 i32.const 1 local.get $3 - local.get $4 + local.get $2 i32.const 9 i32.shl i32.clz @@ -9002,38 +8803,36 @@ i32.shl end local.set $2 - local.get $6 + local.get $5 if (result i32) - local.get $5 + local.get $4 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $5 + local.get $4 i32.const 1 - local.get $6 local.get $5 + local.get $4 i32.const 9 i32.shl i32.clz i32.sub - local.tee $6 + local.tee $5 i32.sub i32.shl end local.set $4 - i32.const 0 - local.set $5 block $break|0 local.get $3 - local.get $6 + local.get $5 i32.lt_s if local.get $3 i32.const 1 i32.add - local.get $6 + local.get $5 i32.eq br_if $break|0 local.get $0 @@ -9041,30 +8840,30 @@ end loop $continue|1 local.get $3 - local.get $6 + local.get $5 i32.gt_s if local.get $2 local.get $4 i32.ge_u - if (result i32) - local.get $5 + if + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 local.get $2 local.get $4 i32.sub - else - local.get $2 + local.set $2 end + local.get $2 i32.const 1 i32.shl local.set $2 - local.get $5 + local.get $6 i32.const 1 i32.shl - local.set $5 + local.set $6 local.get $3 i32.const 1 i32.sub @@ -9077,18 +8876,22 @@ local.get $4 i32.ge_u if - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 local.get $2 local.get $4 i32.sub local.set $2 end local.get $2 + i32.eqz end if + i32.const -30 + local.set $3 + else local.get $3 local.get $2 i32.const 8 @@ -9101,14 +8904,11 @@ local.get $4 i32.shl local.set $2 - else - i32.const -30 - local.set $3 end end local.get $1 f32.abs - local.set $0 + local.set $1 local.get $3 i32.const 0 i32.gt_s @@ -9128,49 +8928,43 @@ i32.shr_u end f32.reinterpret_i32 - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 f32.add local.set $7 - local.get $1 local.get $0 - f32.sub local.get $1 + f32.sub + local.get $0 local.get $3 - local.get $6 + local.get $5 i32.eq - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $3 i32.const 1 i32.add - local.get $6 + local.get $5 i32.eq - local.tee $2 if (result i32) local.get $7 - local.get $0 + local.get $1 f32.gt - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else + local.get $6 + i32.const 1 + i32.and + i32.const 0 local.get $7 - local.get $0 + local.get $1 f32.eq - local.tee $2 - if (result i32) - local.get $5 - i32.const 1 - i32.and - else - local.get $2 - end + select end else - local.get $2 + i32.const 0 end end select @@ -9779,22 +9573,20 @@ f64.mul ) (func $std/math/test_sinh (; 138 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.sinh local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/sinh local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.sinh (; 139 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 f32) @@ -9876,22 +9668,20 @@ call $std/math/check ) (func $std/math/test_sqrt (; 141 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 f64.sqrt local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/sqrt local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $std/math/test_sqrtf (; 142 ;) (type $FUNCSIG$ifff) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 @@ -10395,22 +10185,20 @@ f64.copysign ) (func $std/math/test_tanh (; 146 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.tanh local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/tanh local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.tanh (; 147 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 f32) @@ -10494,13 +10282,11 @@ call $std/math/check ) (func $std/math/test_trunc (; 149 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) - (local $2 i32) local.get $0 f64.trunc local.get $1 f64.const 0 call $std/math/check - local.tee $2 if (result i32) local.get $0 call $~lib/bindings/Math/trunc @@ -10508,7 +10294,7 @@ f64.const 0 call $std/math/check else - local.get $2 + i32.const 0 end ) (func $std/math/test_truncf (; 150 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) @@ -10863,7 +10649,6 @@ (local $0 f64) (local $1 f32) (local $2 i32) - (local $3 i32) f64.const 2.718281828459045 global.get $~lib/bindings/Math/E f64.const 0 @@ -32399,13 +32184,12 @@ local.tee $0 f64.const 0 f64.ge - local.tee $3 if (result i32) local.get $0 f64.const 1 f64.lt else - local.get $3 + i32.const 0 end if local.get $2 @@ -32439,13 +32223,12 @@ local.tee $1 f32.const 0 f32.ge - local.tee $3 if (result i32) local.get $1 f32.const 1 f32.lt else - local.get $3 + i32.const 0 end if local.get $2 diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index 767383e8d3..ed77e58bee 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -235,16 +235,14 @@ f64.mul ) (func $std/math/ulperr (; 34 ;) (type $FUNCSIG$dddd) (param $0 f64) (param $1 f64) (param $2 f64) (result f64) - (local $3 i32) - (local $4 f64) + (local $3 f64) local.get $0 call $~lib/builtins/isNaN - local.tee $3 if (result i32) local.get $1 call $~lib/builtins/isNaN else - local.get $3 + i32.const 0 end if f64.const 0 @@ -256,14 +254,14 @@ if block $~lib/math/NativeMath.signbit|inlined.2 (result i32) local.get $0 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i64.reinterpret_f64 i64.const 63 i64.shr_u i32.wrap_i64 - local.get $4 - local.get $4 + local.get $3 + local.get $3 f64.eq i32.and end @@ -271,14 +269,14 @@ i32.ne block $~lib/math/NativeMath.signbit|inlined.3 (result i32) local.get $1 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i64.reinterpret_f64 i64.const 63 i64.shr_u i32.wrap_i64 - local.get $4 - local.get $4 + local.get $3 + local.get $3 f64.eq i32.and end @@ -476,16 +474,14 @@ f32.mul ) (func $std/math/ulperrf (; 40 ;) (type $FUNCSIG$ffff) (param $0 f32) (param $1 f32) (param $2 f32) (result f32) - (local $3 i32) - (local $4 f32) + (local $3 f32) local.get $0 call $~lib/builtins/isNaN - local.tee $3 if (result i32) local.get $1 call $~lib/builtins/isNaN else - local.get $3 + i32.const 0 end if f32.const 0 @@ -497,13 +493,13 @@ if block $~lib/math/NativeMathf.signbit|inlined.2 (result i32) local.get $0 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end @@ -511,13 +507,13 @@ i32.ne block $~lib/math/NativeMathf.signbit|inlined.3 (result i32) local.get $1 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end @@ -606,7 +602,6 @@ ) (func $std/math/test_abs (; 44 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) - (local $5 i32) block $~lib/math/NativeMath.abs|inlined.0 (result f64) local.get $0 local.set $4 @@ -617,13 +612,11 @@ local.get $2 local.get $3 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 call $~lib/bindings/Math/abs @@ -633,7 +626,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $std/math/test_absf (; 45 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -851,20 +844,17 @@ f64.mul ) (func $std/math/test_acos (; 48 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.acos local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/acos @@ -874,7 +864,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/Rf (; 49 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -1083,9 +1073,8 @@ local.get $2 i32.const 1071284858 i32.lt_u - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $2 i32.const 31 @@ -1299,7 +1288,7 @@ (local $1 i64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) @@ -1307,8 +1296,7 @@ (local $9 f64) (local $10 f64) (local $11 f64) - (local $12 f64) - (local $13 i32) + (local $12 i32) local.get $0 i64.reinterpret_f64 local.set $1 @@ -1322,9 +1310,8 @@ local.get $2 i32.const 1048576 i32.lt_u - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 i32.const 31 @@ -1382,7 +1369,6 @@ local.get $2 i32.const 1072693248 i32.eq - local.tee $4 if (result i32) local.get $1 i64.const 32 @@ -1390,7 +1376,7 @@ i64.const 0 i64.eq else - local.get $4 + i32.const 0 end if f64.const 0 @@ -1433,46 +1419,46 @@ local.get $0 f64.const 1 f64.sub - local.set $5 + local.set $4 f64.const 0.5 - local.get $5 + local.get $4 f64.mul - local.get $5 + local.get $4 f64.mul - local.set $6 - local.get $5 + local.set $5 + local.get $4 f64.const 2 - local.get $5 + local.get $4 f64.add f64.div + local.set $6 + local.get $6 + local.get $6 + f64.mul local.set $7 local.get $7 local.get $7 f64.mul local.set $8 local.get $8 - local.get $8 - f64.mul - local.set $9 - local.get $9 f64.const 0.3999999999940942 - local.get $9 + local.get $8 f64.const 0.22222198432149784 - local.get $9 + local.get $8 f64.const 0.15313837699209373 f64.mul f64.add f64.mul f64.add f64.mul - local.set $10 - local.get $8 + local.set $9 + local.get $7 f64.const 0.6666666666666735 - local.get $9 + local.get $8 f64.const 0.2857142874366239 - local.get $9 + local.get $8 f64.const 0.1818357216161805 - local.get $9 + local.get $8 f64.const 0.14798198605116586 f64.mul f64.add @@ -1481,28 +1467,28 @@ f64.mul f64.add f64.mul - local.set $11 - local.get $11 + local.set $10 local.get $10 + local.get $9 f64.add - local.set $12 + local.set $11 local.get $3 - local.set $13 - local.get $7 + local.set $12 local.get $6 - local.get $12 + local.get $5 + local.get $11 f64.add f64.mul - local.get $13 + local.get $12 f64.convert_i32_s f64.const 1.9082149292705877e-10 f64.mul f64.add - local.get $6 - f64.sub local.get $5 + f64.sub + local.get $4 f64.add - local.get $13 + local.get $12 f64.convert_i32_s f64.const 0.6931471803691238 f64.mul @@ -1573,20 +1559,17 @@ f64.add ) (func $std/math/test_acosh (; 55 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.acosh local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/acosh @@ -1596,7 +1579,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.log1p (; 56 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -1604,8 +1587,8 @@ (local $2 f32) (local $3 f32) (local $4 i32) - (local $5 i32) - (local $6 f32) + (local $5 f32) + (local $6 i32) (local $7 f32) (local $8 f32) (local $9 f32) @@ -1626,9 +1609,8 @@ local.get $1 i32.const 1054086096 i32.lt_u - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $1 i32.const 31 @@ -1691,17 +1673,17 @@ f32.const 1 local.get $0 f32.add - local.set $6 - local.get $6 - i32.reinterpret_f32 local.set $5 local.get $5 + i32.reinterpret_f32 + local.set $6 + local.get $6 i32.const 1065353216 i32.const 1060439283 i32.sub i32.add - local.set $5 - local.get $5 + local.set $6 + local.get $6 i32.const 23 i32.shr_u i32.const 127 @@ -1716,33 +1698,33 @@ i32.ge_s if (result f32) f32.const 1 - local.get $6 + local.get $5 local.get $0 f32.sub f32.sub else local.get $0 - local.get $6 + local.get $5 f32.const 1 f32.sub f32.sub end local.set $2 local.get $2 - local.get $6 + local.get $5 f32.div local.set $2 else f32.const 0 local.set $2 end - local.get $5 + local.get $6 i32.const 8388607 i32.and i32.const 1060439283 i32.add - local.set $5 - local.get $5 + local.set $6 + local.get $6 f32.reinterpret_i32 f32.const 1 f32.sub @@ -1814,7 +1796,7 @@ (func $~lib/math/NativeMathf.log (; 57 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) - (local $3 i32) + (local $3 f32) (local $4 f32) (local $5 f32) (local $6 f32) @@ -1823,7 +1805,6 @@ (local $9 f32) (local $10 f32) (local $11 f32) - (local $12 f32) local.get $0 i32.reinterpret_f32 local.set $1 @@ -1832,9 +1813,8 @@ local.get $1 i32.const 8388608 i32.lt_u - local.tee $3 if (result i32) - local.get $3 + i32.const 1 else local.get $1 i32.const 31 @@ -1919,64 +1899,64 @@ local.get $0 f32.const 1 f32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 f32.const 2 - local.get $4 + local.get $3 f32.add f32.div + local.set $4 + local.get $4 + local.get $4 + f32.mul local.set $5 local.get $5 local.get $5 f32.mul local.set $6 local.get $6 - local.get $6 - f32.mul - local.set $7 - local.get $7 f32.const 0.40000972151756287 - local.get $7 + local.get $6 f32.const 0.24279078841209412 f32.mul f32.add f32.mul - local.set $8 - local.get $6 + local.set $7 + local.get $5 f32.const 0.6666666269302368 - local.get $7 + local.get $6 f32.const 0.2849878668785095 f32.mul f32.add f32.mul - local.set $9 - local.get $9 + local.set $8 local.get $8 + local.get $7 f32.add - local.set $10 + local.set $9 f32.const 0.5 - local.get $4 + local.get $3 f32.mul - local.get $4 + local.get $3 f32.mul - local.set $11 + local.set $10 local.get $2 f32.convert_i32_s - local.set $12 - local.get $5 - local.get $11 + local.set $11 + local.get $4 local.get $10 + local.get $9 f32.add f32.mul - local.get $12 + local.get $11 f32.const 9.05800061445916e-06 f32.mul f32.add - local.get $11 + local.get $10 f32.sub - local.get $4 + local.get $3 f32.add - local.get $12 + local.get $11 f32.const 0.6931381225585938 f32.mul f32.add @@ -2110,13 +2090,12 @@ local.get $2 i32.const 1045430272 i32.lt_u - local.tee $3 if (result i32) local.get $2 i32.const 1048576 i32.ge_u else - local.get $3 + i32.const 0 end if local.get $0 @@ -2214,20 +2193,17 @@ local.get $0 ) (func $std/math/test_asin (; 61 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.asin local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/asin @@ -2237,15 +2213,14 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.asin (; 62 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) - (local $3 i32) - (local $4 f32) - (local $5 f64) + (local $3 f32) + (local $4 f64) local.get $0 local.set $1 local.get $0 @@ -2282,13 +2257,12 @@ local.get $2 i32.const 964689920 i32.lt_u - local.tee $3 if (result i32) local.get $2 i32.const 8388608 i32.ge_u else - local.get $3 + i32.const 0 end if local.get $0 @@ -2310,18 +2284,18 @@ f32.const 0.5 f32.mul f32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 f64.promote_f32 f64.sqrt - local.set $5 + local.set $4 f32.const 1.5707963705062866 f64.promote_f32 f32.const 2 f64.promote_f32 - local.get $5 - local.get $5 local.get $4 + local.get $4 + local.get $3 call $~lib/math/Rf f64.promote_f32 f64.mul @@ -2425,20 +2399,17 @@ f64.copysign ) (func $std/math/test_asinh (; 65 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.asinh local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/asinh @@ -2448,7 +2419,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.asinh (; 66 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -2814,20 +2785,17 @@ f64.copysign ) (func $std/math/test_atan (; 69 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.atan local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/atan @@ -2837,7 +2805,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.atan (; 70 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -3166,20 +3134,17 @@ f64.copysign ) (func $std/math/test_atanh (; 73 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.atanh local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/atanh @@ -3189,7 +3154,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.atanh (; 74 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -3263,8 +3228,8 @@ call $std/math/check ) (func $~lib/math/NativeMath.atan2 (; 76 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3273,9 +3238,8 @@ (local $9 f64) local.get $1 call $~lib/builtins/isNaN - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 call $~lib/builtins/isNaN @@ -3288,30 +3252,30 @@ end local.get $1 i64.reinterpret_f64 - local.set $3 - local.get $3 + local.set $2 + local.get $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $3 + local.set $3 + local.get $2 i32.wrap_i64 - local.set $5 + local.set $4 local.get $0 i64.reinterpret_f64 - local.set $3 - local.get $3 + local.set $2 + local.get $2 i64.const 32 i64.shr_u i32.wrap_i64 + local.set $5 + local.get $2 + i32.wrap_i64 local.set $6 local.get $3 - i32.wrap_i64 - local.set $7 - local.get $4 i32.const 1072693248 i32.sub - local.get $5 + local.get $4 i32.or i32.const 0 i32.eq @@ -3320,28 +3284,28 @@ call $~lib/math/NativeMath.atan return end - local.get $6 + local.get $5 i32.const 31 i32.shr_u i32.const 1 i32.and - local.get $4 + local.get $3 i32.const 30 i32.shr_u i32.const 2 i32.and i32.or - local.set $8 - local.get $4 + local.set $7 + local.get $3 i32.const 2147483647 i32.and - local.set $4 - local.get $6 + local.set $3 + local.get $5 i32.const 2147483647 i32.and - local.set $6 + local.set $5 + local.get $5 local.get $6 - local.get $7 i32.or i32.const 0 i32.eq @@ -3351,21 +3315,21 @@ block $case2|0 block $case1|0 block $case0|0 + local.get $7 + local.set $8 local.get $8 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|0 - local.get $2 + local.get $8 i32.const 1 i32.eq br_if $case1|0 - local.get $2 + local.get $8 i32.const 2 i32.eq br_if $case2|0 - local.get $2 + local.get $8 i32.const 3 i32.eq br_if $case3|0 @@ -3383,13 +3347,13 @@ return end end + local.get $3 local.get $4 - local.get $5 i32.or i32.const 0 i32.eq if - local.get $8 + local.get $7 i32.const 1 i32.and if (result f64) @@ -3404,11 +3368,11 @@ end return end - local.get $4 + local.get $3 i32.const 2146435072 i32.eq if - local.get $6 + local.get $5 i32.const 2146435072 i32.eq if @@ -3417,21 +3381,21 @@ block $case2|1 block $case1|1 block $case0|1 + local.get $7 + local.set $8 local.get $8 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|1 - local.get $2 + local.get $8 i32.const 1 i32.eq br_if $case1|1 - local.get $2 + local.get $8 i32.const 2 i32.eq br_if $case2|1 - local.get $2 + local.get $8 i32.const 3 i32.eq br_if $case3|1 @@ -3468,21 +3432,21 @@ block $case2|2 block $case1|2 block $case0|2 + local.get $7 + local.set $8 local.get $8 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|2 - local.get $2 + local.get $8 i32.const 1 i32.eq br_if $case1|2 - local.get $2 + local.get $8 i32.const 2 i32.eq br_if $case2|2 - local.get $2 + local.get $8 i32.const 3 i32.eq br_if $case3|2 @@ -3503,23 +3467,22 @@ end end end - local.get $4 + local.get $3 i32.const 64 i32.const 20 i32.shl i32.add - local.get $6 + local.get $5 i32.lt_u - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else - local.get $6 + local.get $5 i32.const 2146435072 i32.eq end if - local.get $8 + local.get $7 i32.const 1 i32.and if (result f64) @@ -3534,20 +3497,19 @@ end return end - local.get $8 + local.get $7 i32.const 2 i32.and - local.tee $2 if (result i32) - local.get $6 + local.get $5 i32.const 64 i32.const 20 i32.shl i32.add - local.get $4 + local.get $3 i32.lt_u else - local.get $2 + i32.const 0 end if f64.const 0 @@ -3565,21 +3527,21 @@ block $case2|3 block $case1|3 block $case0|3 + local.get $7 + local.set $8 local.get $8 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|3 - local.get $2 + local.get $8 i32.const 1 i32.eq br_if $case1|3 - local.get $2 + local.get $8 i32.const 2 i32.eq br_if $case2|3 - local.get $2 + local.get $8 i32.const 3 i32.eq br_if $case3|3 @@ -3610,7 +3572,6 @@ f64.const 0 ) (func $std/math/test_atan2 (; 77 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - (local $5 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.atan2 @@ -3618,13 +3579,11 @@ local.get $3 local.get $4 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 local.get $1 @@ -3635,7 +3594,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $~lib/math/NativeMathf.atan2 (; 78 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) @@ -3646,9 +3605,8 @@ (local $6 f32) local.get $1 call $~lib/builtins/isNaN - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 call $~lib/builtins/isNaN @@ -3661,11 +3619,11 @@ end local.get $1 i32.reinterpret_f32 - local.set $3 + local.set $2 local.get $0 i32.reinterpret_f32 - local.set $4 - local.get $3 + local.set $3 + local.get $2 i32.const 1065353216 i32.eq if @@ -3673,27 +3631,27 @@ call $~lib/math/NativeMathf.atan return end - local.get $4 + local.get $3 i32.const 31 i32.shr_u i32.const 1 i32.and - local.get $3 + local.get $2 i32.const 30 i32.shr_u i32.const 2 i32.and i32.or - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 2147483647 i32.and - local.set $3 - local.get $4 + local.set $2 + local.get $3 i32.const 2147483647 i32.and - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.eq if @@ -3702,21 +3660,21 @@ block $case2|0 block $case1|0 block $case0|0 + local.get $4 + local.set $5 local.get $5 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|0 - local.get $2 + local.get $5 i32.const 1 i32.eq br_if $case1|0 - local.get $2 + local.get $5 i32.const 2 i32.eq br_if $case2|0 - local.get $2 + local.get $5 i32.const 3 i32.eq br_if $case3|0 @@ -3734,11 +3692,11 @@ return end end - local.get $3 + local.get $2 i32.const 0 i32.eq if - local.get $5 + local.get $4 i32.const 1 i32.and if (result f32) @@ -3753,11 +3711,11 @@ end return end - local.get $3 + local.get $2 i32.const 2139095040 i32.eq if - local.get $4 + local.get $3 i32.const 2139095040 i32.eq if @@ -3766,21 +3724,21 @@ block $case2|1 block $case1|1 block $case0|1 + local.get $4 + local.set $5 local.get $5 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|1 - local.get $2 + local.get $5 i32.const 1 i32.eq br_if $case1|1 - local.get $2 + local.get $5 i32.const 2 i32.eq br_if $case2|1 - local.get $2 + local.get $5 i32.const 3 i32.eq br_if $case3|1 @@ -3817,21 +3775,21 @@ block $case2|2 block $case1|2 block $case0|2 + local.get $4 + local.set $5 local.get $5 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|2 - local.get $2 + local.get $5 i32.const 1 i32.eq br_if $case1|2 - local.get $2 + local.get $5 i32.const 2 i32.eq br_if $case2|2 - local.get $2 + local.get $5 i32.const 3 i32.eq br_if $case3|2 @@ -3852,23 +3810,22 @@ end end end - local.get $3 + local.get $2 i32.const 26 i32.const 23 i32.shl i32.add - local.get $4 + local.get $3 i32.lt_u - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else - local.get $4 + local.get $3 i32.const 2139095040 i32.eq end if - local.get $5 + local.get $4 i32.const 1 i32.and if (result f32) @@ -3883,20 +3840,19 @@ end return end - local.get $5 + local.get $4 i32.const 2 i32.and - local.tee $2 if (result i32) - local.get $4 + local.get $3 i32.const 26 i32.const 23 i32.shl i32.add - local.get $3 + local.get $2 i32.lt_u else - local.get $2 + i32.const 0 end if f32.const 0 @@ -3914,21 +3870,21 @@ block $case2|3 block $case1|3 block $case0|3 + local.get $4 + local.set $5 local.get $5 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|3 - local.get $2 + local.get $5 i32.const 1 i32.eq br_if $case1|3 - local.get $2 + local.get $5 i32.const 2 i32.eq br_if $case2|3 - local.get $2 + local.get $5 i32.const 3 i32.eq br_if $case3|3 @@ -4112,20 +4068,17 @@ local.get $3 ) (func $std/math/test_cbrt (; 81 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.cbrt local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/cbrt @@ -4135,7 +4088,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.cbrt (; 82 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -4264,7 +4217,6 @@ ) (func $std/math/test_ceil (; 84 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) - (local $5 i32) block $~lib/math/NativeMath.ceil|inlined.0 (result f64) local.get $0 local.set $4 @@ -4275,13 +4227,11 @@ local.get $2 local.get $3 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 call $~lib/bindings/Math/ceil @@ -4291,7 +4241,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $std/math/test_ceilf (; 85 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -4973,7 +4923,6 @@ (local $13 f64) (local $14 f64) (local $15 f64) - (local $16 i32) local.get $0 i64.reinterpret_f64 local.set $1 @@ -5201,9 +5150,8 @@ local.get $3 i32.const 0 i32.lt_s - local.tee $16 if (result i32) - local.get $16 + i32.const 1 else local.get $3 i32.const 56 @@ -5532,20 +5480,17 @@ local.get $3 ) (func $std/math/test_cosh (; 92 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.cosh local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/cosh @@ -5555,7 +5500,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.expm1 (; 93 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -5573,7 +5518,6 @@ (local $12 f32) (local $13 f32) (local $14 f32) - (local $15 i32) local.get $0 i32.reinterpret_f32 local.set $1 @@ -5784,9 +5728,8 @@ local.get $6 i32.const 0 i32.lt_s - local.tee $15 if (result i32) - local.get $15 + i32.const 1 else local.get $6 i32.const 56 @@ -6089,20 +6032,17 @@ call $std/math/check ) (func $std/math/test_exp (; 97 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.exp local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/exp @@ -6112,7 +6052,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $std/math/test_expf (; 98 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -6124,20 +6064,17 @@ call $std/math/check ) (func $std/math/test_expm1 (; 99 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.expm1 local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/expm1 @@ -6147,7 +6084,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $std/math/test_expm1f (; 100 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -6160,7 +6097,6 @@ ) (func $std/math/test_floor (; 101 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) - (local $5 i32) block $~lib/math/NativeMath.floor|inlined.0 (result f64) local.get $0 local.set $4 @@ -6171,13 +6107,11 @@ local.get $2 local.get $3 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 call $~lib/bindings/Math/floor @@ -6187,7 +6121,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $std/math/test_floorf (; 102 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -6209,7 +6143,7 @@ (local $4 i64) (local $5 i32) (local $6 i32) - (local $7 i32) + (local $7 f64) (local $8 f64) (local $9 f64) (local $10 f64) @@ -6217,7 +6151,6 @@ (local $12 f64) (local $13 f64) (local $14 f64) - (local $15 f64) local.get $0 i64.reinterpret_f64 local.set $2 @@ -6269,9 +6202,8 @@ local.get $5 i32.const 2047 i32.eq - local.tee $7 if (result i32) - local.get $7 + i32.const 1 else local.get $3 i64.const 0 @@ -6293,7 +6225,7 @@ return end f64.const 1 - local.set $8 + local.set $7 local.get $5 i32.const 1023 i32.const 510 @@ -6301,7 +6233,7 @@ i32.gt_s if f64.const 5260135901548373507240989e186 - local.set $8 + local.set $7 local.get $0 f64.const 1.90109156629516e-211 f64.mul @@ -6318,7 +6250,7 @@ i32.lt_s if f64.const 1.90109156629516e-211 - local.set $8 + local.set $7 local.get $0 f64.const 5260135901548373507240989e186 f64.mul @@ -6332,80 +6264,79 @@ local.get $0 f64.const 134217729 f64.mul - local.set $9 + local.set $8 local.get $0 - local.get $9 + local.get $8 f64.sub - local.get $9 + local.get $8 f64.add - local.set $10 + local.set $9 local.get $0 - local.get $10 + local.get $9 f64.sub - local.set $11 + local.set $10 local.get $0 local.get $0 f64.mul - local.set $12 - local.get $10 - local.get $10 + local.set $11 + local.get $9 + local.get $9 f64.mul - local.get $12 + local.get $11 f64.sub f64.const 2 - local.get $10 + local.get $9 f64.mul - local.get $11 + local.get $10 f64.add - local.get $11 + local.get $10 f64.mul f64.add - local.set $13 + local.set $12 local.get $1 f64.const 134217729 f64.mul - local.set $9 + local.set $8 local.get $1 - local.get $9 + local.get $8 f64.sub - local.get $9 + local.get $8 f64.add - local.set $10 + local.set $9 local.get $1 - local.get $10 + local.get $9 f64.sub - local.set $11 + local.set $10 local.get $1 local.get $1 f64.mul - local.set $14 - local.get $10 - local.get $10 + local.set $13 + local.get $9 + local.get $9 f64.mul - local.get $14 + local.get $13 f64.sub f64.const 2 - local.get $10 + local.get $9 f64.mul - local.get $11 + local.get $10 f64.add - local.get $11 + local.get $10 f64.mul f64.add - local.set $15 - local.get $8 - local.get $15 - local.get $13 - f64.add + local.set $14 + local.get $7 local.get $14 - f64.add local.get $12 f64.add + local.get $13 + f64.add + local.get $11 + f64.add f64.sqrt f64.mul ) (func $std/math/test_hypot (; 104 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - (local $5 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.hypot @@ -6413,13 +6344,11 @@ local.get $3 local.get $4 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 local.get $1 @@ -6430,7 +6359,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $~lib/math/NativeMathf.hypot (; 105 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) @@ -6483,17 +6412,15 @@ i32.const 23 i32.shl i32.ge_u - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $3 i32.const 0 i32.eq end - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 local.get $3 @@ -6576,20 +6503,17 @@ call $std/math/check ) (func $std/math/test_log (; 107 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.log local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/log @@ -6599,7 +6523,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $std/math/test_logf (; 108 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -6614,7 +6538,7 @@ (local $1 i64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) @@ -6628,7 +6552,6 @@ (local $15 f64) (local $16 f64) (local $17 f64) - (local $18 f64) local.get $0 i64.reinterpret_f64 local.set $1 @@ -6642,9 +6565,8 @@ local.get $2 i32.const 1048576 i32.lt_u - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 i32.const 31 @@ -6702,7 +6624,6 @@ local.get $2 i32.const 1072693248 i32.eq - local.tee $4 if (result i32) local.get $1 i64.const 32 @@ -6710,7 +6631,7 @@ i64.const 0 i64.eq else - local.get $4 + i32.const 0 end if f64.const 0 @@ -6753,46 +6674,46 @@ local.get $0 f64.const 1 f64.sub - local.set $5 + local.set $4 f64.const 0.5 - local.get $5 + local.get $4 f64.mul - local.get $5 + local.get $4 f64.mul - local.set $6 - local.get $5 + local.set $5 + local.get $4 f64.const 2 - local.get $5 + local.get $4 f64.add f64.div + local.set $6 + local.get $6 + local.get $6 + f64.mul local.set $7 local.get $7 local.get $7 f64.mul local.set $8 local.get $8 - local.get $8 - f64.mul - local.set $9 - local.get $9 f64.const 0.3999999999940942 - local.get $9 + local.get $8 f64.const 0.22222198432149784 - local.get $9 + local.get $8 f64.const 0.15313837699209373 f64.mul f64.add f64.mul f64.add f64.mul - local.set $10 - local.get $8 + local.set $9 + local.get $7 f64.const 0.6666666666666735 - local.get $9 + local.get $8 f64.const 0.2857142874366239 - local.get $9 + local.get $8 f64.const 0.1818357216161805 - local.get $9 + local.get $8 f64.const 0.14798198605116586 f64.mul f64.add @@ -6801,16 +6722,16 @@ f64.mul f64.add f64.mul - local.set $11 - local.get $11 + local.set $10 local.get $10 + local.get $9 f64.add - local.set $12 + local.set $11 + local.get $4 local.get $5 - local.get $6 f64.sub - local.set $13 - local.get $13 + local.set $12 + local.get $12 i64.reinterpret_f64 local.set $1 local.get $1 @@ -6819,75 +6740,72 @@ local.set $1 local.get $1 f64.reinterpret_i64 - local.set $13 - local.get $5 - local.get $13 + local.set $12 + local.get $4 + local.get $12 f64.sub - local.get $6 + local.get $5 f64.sub - local.get $7 local.get $6 - local.get $12 + local.get $5 + local.get $11 f64.add f64.mul f64.add - local.set $14 - local.get $13 + local.set $13 + local.get $12 f64.const 0.4342944818781689 f64.mul - local.set $15 + local.set $14 local.get $3 f64.convert_i32_s - local.set $16 - local.get $16 + local.set $15 + local.get $15 f64.const 0.30102999566361177 f64.mul - local.set $17 - local.get $16 + local.set $16 + local.get $15 f64.const 3.694239077158931e-13 f64.mul - local.get $14 local.get $13 + local.get $12 f64.add f64.const 2.5082946711645275e-11 f64.mul f64.add - local.get $14 + local.get $13 f64.const 0.4342944818781689 f64.mul f64.add - local.set $18 - local.get $17 - local.get $15 + local.set $17 + local.get $16 + local.get $14 f64.add - local.set $9 - local.get $18 + local.set $8 local.get $17 - local.get $9 + local.get $16 + local.get $8 f64.sub - local.get $15 + local.get $14 f64.add f64.add - local.set $18 - local.get $18 - local.get $9 + local.set $17 + local.get $17 + local.get $8 f64.add ) (func $std/math/test_log10 (; 110 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.log10 local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/log10 @@ -6897,13 +6815,13 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.log10 (; 111 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) - (local $3 i32) + (local $3 f32) (local $4 f32) (local $5 f32) (local $6 f32) @@ -6914,7 +6832,6 @@ (local $11 f32) (local $12 f32) (local $13 f32) - (local $14 f32) local.get $0 i32.reinterpret_f32 local.set $1 @@ -6923,9 +6840,8 @@ local.get $1 i32.const 8388608 i32.lt_u - local.tee $3 if (result i32) - local.get $3 + i32.const 1 else local.get $1 i32.const 31 @@ -7010,52 +6926,52 @@ local.get $0 f32.const 1 f32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 f32.const 2 - local.get $4 + local.get $3 f32.add f32.div + local.set $4 + local.get $4 + local.get $4 + f32.mul local.set $5 local.get $5 local.get $5 f32.mul local.set $6 local.get $6 - local.get $6 - f32.mul - local.set $7 - local.get $7 f32.const 0.40000972151756287 - local.get $7 + local.get $6 f32.const 0.24279078841209412 f32.mul f32.add f32.mul - local.set $8 - local.get $6 + local.set $7 + local.get $5 f32.const 0.6666666269302368 - local.get $7 + local.get $6 f32.const 0.2849878668785095 f32.mul f32.add f32.mul - local.set $9 - local.get $9 + local.set $8 local.get $8 + local.get $7 f32.add - local.set $10 + local.set $9 f32.const 0.5 - local.get $4 + local.get $3 f32.mul - local.get $4 + local.get $3 f32.mul + local.set $10 + local.get $3 + local.get $10 + f32.sub local.set $11 - local.get $4 local.get $11 - f32.sub - local.set $12 - local.get $12 i32.reinterpret_f32 local.set $1 local.get $1 @@ -7064,40 +6980,40 @@ local.set $1 local.get $1 f32.reinterpret_i32 - local.set $12 - local.get $4 - local.get $12 - f32.sub + local.set $11 + local.get $3 local.get $11 f32.sub - local.get $5 - local.get $11 local.get $10 + f32.sub + local.get $4 + local.get $10 + local.get $9 f32.add f32.mul f32.add - local.set $13 + local.set $12 local.get $2 f32.convert_i32_s - local.set $14 - local.get $14 + local.set $13 + local.get $13 f32.const 7.903415166765626e-07 f32.mul - local.get $13 local.get $12 + local.get $11 f32.add f32.const -3.168997136526741e-05 f32.mul f32.add - local.get $13 + local.get $12 f32.const 0.434326171875 f32.mul f32.add - local.get $12 + local.get $11 f32.const 0.434326171875 f32.mul f32.add - local.get $14 + local.get $13 f32.const 0.3010292053222656 f32.mul f32.add @@ -7111,20 +7027,17 @@ call $std/math/check ) (func $std/math/test_log1p (; 113 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.log1p local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/log1p @@ -7134,7 +7047,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $std/math/test_log1pf (; 114 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -7149,7 +7062,7 @@ (local $1 i64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) @@ -7162,7 +7075,6 @@ (local $14 f64) (local $15 f64) (local $16 f64) - (local $17 f64) local.get $0 i64.reinterpret_f64 local.set $1 @@ -7176,9 +7088,8 @@ local.get $2 i32.const 1048576 i32.lt_u - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 i32.const 31 @@ -7236,7 +7147,6 @@ local.get $2 i32.const 1072693248 i32.eq - local.tee $4 if (result i32) local.get $1 i64.const 32 @@ -7244,7 +7154,7 @@ i64.const 0 i64.eq else - local.get $4 + i32.const 0 end if f64.const 0 @@ -7287,46 +7197,46 @@ local.get $0 f64.const 1 f64.sub - local.set $5 + local.set $4 f64.const 0.5 - local.get $5 + local.get $4 f64.mul - local.get $5 + local.get $4 f64.mul - local.set $6 - local.get $5 + local.set $5 + local.get $4 f64.const 2 - local.get $5 + local.get $4 f64.add f64.div + local.set $6 + local.get $6 + local.get $6 + f64.mul local.set $7 local.get $7 local.get $7 f64.mul local.set $8 local.get $8 - local.get $8 - f64.mul - local.set $9 - local.get $9 f64.const 0.3999999999940942 - local.get $9 + local.get $8 f64.const 0.22222198432149784 - local.get $9 + local.get $8 f64.const 0.15313837699209373 f64.mul f64.add f64.mul f64.add f64.mul - local.set $10 - local.get $8 + local.set $9 + local.get $7 f64.const 0.6666666666666735 - local.get $9 + local.get $8 f64.const 0.2857142874366239 - local.get $9 + local.get $8 f64.const 0.1818357216161805 - local.get $9 + local.get $8 f64.const 0.14798198605116586 f64.mul f64.add @@ -7335,16 +7245,16 @@ f64.mul f64.add f64.mul - local.set $11 - local.get $11 + local.set $10 local.get $10 + local.get $9 f64.add - local.set $12 + local.set $11 + local.get $4 local.get $5 - local.get $6 f64.sub - local.set $13 - local.get $13 + local.set $12 + local.get $12 i64.reinterpret_f64 local.set $1 local.get $1 @@ -7353,69 +7263,66 @@ local.set $1 local.get $1 f64.reinterpret_i64 - local.set $13 - local.get $5 - local.get $13 + local.set $12 + local.get $4 + local.get $12 f64.sub - local.get $6 + local.get $5 f64.sub - local.get $7 local.get $6 - local.get $12 + local.get $5 + local.get $11 f64.add f64.mul f64.add - local.set $14 - local.get $13 + local.set $13 + local.get $12 f64.const 1.4426950407214463 f64.mul - local.set $15 - local.get $14 + local.set $14 local.get $13 + local.get $12 f64.add f64.const 1.6751713164886512e-10 f64.mul - local.get $14 + local.get $13 f64.const 1.4426950407214463 f64.mul f64.add - local.set $16 + local.set $15 local.get $3 f64.convert_i32_s - local.set $17 - local.get $17 - local.get $15 + local.set $16 + local.get $16 + local.get $14 f64.add - local.set $9 + local.set $8 + local.get $15 local.get $16 - local.get $17 - local.get $9 + local.get $8 f64.sub - local.get $15 + local.get $14 f64.add f64.add - local.set $16 - local.get $9 local.set $15 - local.get $16 + local.get $8 + local.set $14 local.get $15 + local.get $14 f64.add ) (func $std/math/test_log2 (; 116 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.log2 local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/log2 @@ -7425,13 +7332,13 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.log2 (; 117 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) - (local $3 i32) + (local $3 f32) (local $4 f32) (local $5 f32) (local $6 f32) @@ -7440,10 +7347,9 @@ (local $9 f32) (local $10 f32) (local $11 f32) - (local $12 f32) - (local $13 i32) + (local $12 i32) + (local $13 f32) (local $14 f32) - (local $15 f32) local.get $0 i32.reinterpret_f32 local.set $1 @@ -7452,9 +7358,8 @@ local.get $1 i32.const 8388608 i32.lt_u - local.tee $3 if (result i32) - local.get $3 + i32.const 1 else local.get $1 i32.const 31 @@ -7539,90 +7444,90 @@ local.get $0 f32.const 1 f32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 f32.const 2 - local.get $4 + local.get $3 f32.add f32.div + local.set $4 + local.get $4 + local.get $4 + f32.mul local.set $5 local.get $5 local.get $5 f32.mul local.set $6 local.get $6 - local.get $6 - f32.mul - local.set $7 - local.get $7 f32.const 0.40000972151756287 - local.get $7 + local.get $6 f32.const 0.24279078841209412 f32.mul f32.add f32.mul - local.set $8 - local.get $6 + local.set $7 + local.get $5 f32.const 0.6666666269302368 - local.get $7 + local.get $6 f32.const 0.2849878668785095 f32.mul f32.add f32.mul - local.set $9 - local.get $9 + local.set $8 local.get $8 + local.get $7 f32.add - local.set $10 + local.set $9 f32.const 0.5 - local.get $4 + local.get $3 f32.mul - local.get $4 + local.get $3 f32.mul + local.set $10 + local.get $3 + local.get $10 + f32.sub local.set $11 - local.get $4 local.get $11 - f32.sub + i32.reinterpret_f32 local.set $12 local.get $12 - i32.reinterpret_f32 - local.set $13 - local.get $13 i32.const -4096 i32.and - local.set $13 - local.get $13 - f32.reinterpret_i32 local.set $12 - local.get $4 local.get $12 - f32.sub + f32.reinterpret_i32 + local.set $11 + local.get $3 local.get $11 f32.sub - local.get $5 - local.get $11 local.get $10 + f32.sub + local.get $4 + local.get $10 + local.get $9 f32.add f32.mul f32.add - local.set $14 + local.set $13 local.get $2 f32.convert_i32_s - local.set $15 - local.get $14 - local.get $12 + local.set $14 + local.get $13 + local.get $11 f32.add f32.const -1.7605285393074155e-04 f32.mul - local.get $14 + local.get $13 f32.const 1.44287109375 f32.mul f32.add - local.get $12 + local.get $11 f32.const 1.44287109375 f32.mul f32.add - local.get $15 + local.get $14 f32.add ) (func $std/math/test_log2f (; 118 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -7636,7 +7541,6 @@ (func $std/math/test_max (; 119 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) (local $5 f64) (local $6 f64) - (local $7 i32) block $~lib/math/NativeMath.max|inlined.0 (result f64) local.get $0 local.set $6 @@ -7650,13 +7554,11 @@ local.get $3 local.get $4 call $std/math/check - local.tee $7 if (result i32) global.get $std/math/js i32.eqz - local.tee $7 if (result i32) - local.get $7 + i32.const 1 else local.get $0 local.get $1 @@ -7667,7 +7569,7 @@ call $std/math/check end else - local.get $7 + i32.const 0 end ) (func $std/math/test_maxf (; 120 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) @@ -7690,7 +7592,6 @@ (func $std/math/test_min (; 121 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) (local $5 f64) (local $6 f64) - (local $7 i32) block $~lib/math/NativeMath.min|inlined.0 (result f64) local.get $0 local.set $6 @@ -7704,13 +7605,11 @@ local.get $3 local.get $4 call $std/math/check - local.tee $7 if (result i32) global.get $std/math/js i32.eqz - local.tee $7 if (result i32) - local.get $7 + i32.const 1 else local.get $0 local.get $1 @@ -7721,7 +7620,7 @@ call $std/math/check end else - local.get $7 + i32.const 0 end ) (func $std/math/test_minf (; 122 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) @@ -7748,10 +7647,9 @@ (local $5 i64) (local $6 i64) (local $7 i64) - (local $8 i32) - (local $9 f64) + (local $8 f64) + (local $9 i64) (local $10 i64) - (local $11 i64) local.get $0 i64.reinterpret_f64 local.set $2 @@ -7781,17 +7679,15 @@ local.get $7 i64.const 0 i64.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i64.const 2047 i64.eq end - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $1 call $~lib/builtins/isNaN @@ -7800,21 +7696,21 @@ local.get $0 local.get $1 f64.mul - local.set $9 - local.get $9 - local.get $9 + local.set $8 + local.get $8 + local.get $8 f64.div return end local.get $2 i64.const 1 i64.shl - local.set $10 - local.get $10 + local.set $9 + local.get $9 local.get $7 i64.le_u if - local.get $10 + local.get $9 local.get $7 i64.eq if @@ -7950,13 +7846,13 @@ i64.const 11 i64.shl i64.clz - local.set $11 + local.set $10 local.get $4 - local.get $11 + local.get $10 i64.sub local.set $4 local.get $2 - local.get $11 + local.get $10 i64.shl local.set $2 local.get $4 @@ -7995,7 +7891,6 @@ f64.reinterpret_i64 ) (func $std/math/test_mod (; 124 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - (local $5 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.mod @@ -8003,13 +7898,11 @@ local.get $3 local.get $4 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 local.get $1 @@ -8020,7 +7913,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $~lib/math/NativeMathf.mod (; 125 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) @@ -8030,10 +7923,9 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 f32) + (local $8 f32) + (local $9 i32) (local $10 i32) - (local $11 i32) local.get $0 i32.reinterpret_f32 local.set $2 @@ -8063,17 +7955,15 @@ local.get $7 i32.const 0 i32.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i32.const 255 i32.eq end - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $1 call $~lib/builtins/isNaN @@ -8082,21 +7972,21 @@ local.get $0 local.get $1 f32.mul - local.set $9 - local.get $9 - local.get $9 + local.set $8 + local.get $8 + local.get $8 f32.div return end local.get $2 i32.const 1 i32.shl - local.set $10 - local.get $10 + local.set $9 + local.get $9 local.get $7 i32.le_u if - local.get $10 + local.get $9 local.get $7 i32.eq if @@ -8232,13 +8122,13 @@ i32.const 8 i32.shl i32.clz - local.set $11 + local.set $10 local.get $4 - local.get $11 + local.get $10 i32.sub local.set $4 local.get $2 - local.get $11 + local.get $10 i32.shl local.set $2 local.get $4 @@ -8366,44 +8256,39 @@ local.get $7 i32.const 2146435072 i32.gt_s - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $7 i32.const 2146435072 i32.eq - local.tee $9 if (result i32) local.get $4 i32.const 0 i32.ne else - local.get $9 + i32.const 0 end end - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $8 i32.const 2146435072 i32.gt_s end - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $8 i32.const 2146435072 i32.eq - local.tee $9 if (result i32) local.get $6 i32.const 0 i32.ne else - local.get $9 + i32.const 0 end end if @@ -8413,7 +8298,7 @@ return end i32.const 0 - local.set $10 + local.set $9 local.get $3 i32.const 0 i32.lt_s @@ -8423,7 +8308,7 @@ i32.ge_s if i32.const 2 - local.set $10 + local.set $9 else local.get $8 i32.const 1072693248 @@ -8434,21 +8319,21 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 - local.get $11 + local.set $10 + local.get $10 i32.const 20 i32.gt_s - local.set $9 + local.set $11 i32.const 52 i32.const 20 - local.get $9 - select local.get $11 + select + local.get $10 i32.sub local.set $12 local.get $6 local.get $8 - local.get $9 + local.get $11 select local.set $13 local.get $13 @@ -8466,7 +8351,7 @@ i32.const 1 i32.and i32.sub - local.set $10 + local.set $9 end end end @@ -8569,17 +8454,15 @@ local.get $7 i32.const 0 i32.eq - local.tee $14 if (result i32) - local.get $14 + i32.const 1 else local.get $7 i32.const 2146435072 i32.eq end - local.tee $14 if (result i32) - local.get $14 + i32.const 1 else local.get $7 i32.const 1072693248 @@ -8604,7 +8487,7 @@ local.get $7 i32.const 1072693248 i32.sub - local.get $10 + local.get $9 i32.or i32.const 0 i32.eq @@ -8618,7 +8501,7 @@ f64.div local.set $16 else - local.get $10 + local.get $9 i32.const 1 i32.eq if @@ -8638,7 +8521,7 @@ i32.const 0 i32.lt_s if - local.get $10 + local.get $9 i32.const 0 i32.eq if @@ -8651,7 +8534,7 @@ f64.div return end - local.get $10 + local.get $9 i32.const 1 i32.eq if @@ -8837,17 +8720,17 @@ i32.le_s if i32.const 0 - local.set $11 + local.set $10 else local.get $28 i32.const 767610 i32.lt_s if i32.const 1 - local.set $11 + local.set $10 else i32.const 0 - local.set $11 + local.set $10 local.get $29 i32.const 1 i32.add @@ -8871,7 +8754,7 @@ local.set $15 f64.const 1.5 f64.const 1 - local.get $11 + local.get $10 select local.set $35 local.get $15 @@ -8903,7 +8786,7 @@ i32.or i32.const 524288 i32.add - local.get $11 + local.get $10 i32.const 18 i32.shl i32.add @@ -9026,7 +8909,7 @@ local.set $36 f64.const 1.350039202129749e-08 f64.const 0 - local.get $11 + local.get $10 select local.set $37 f64.const -7.028461650952758e-09 @@ -9044,7 +8927,7 @@ local.set $24 f64.const 0.5849624872207642 f64.const 0 - local.get $11 + local.get $10 select local.set $39 local.get $36 @@ -9189,7 +9072,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 + local.set $10 i32.const 0 local.set $29 local.get $41 @@ -9198,7 +9081,7 @@ if local.get $28 i32.const 1048576 - local.get $11 + local.get $10 i32.const 1 i32.add i32.shr_s @@ -9211,12 +9094,12 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 + local.set $10 f64.const 0 local.set $24 local.get $29 i32.const 1048575 - local.get $11 + local.get $10 i32.shr_s i32.const -1 i32.xor @@ -9232,7 +9115,7 @@ i32.const 1048576 i32.or i32.const 20 - local.get $11 + local.get $10 i32.sub i32.shr_s local.set $29 @@ -9372,7 +9255,6 @@ f64.mul ) (func $std/math/test_pow (; 128 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - (local $5 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.pow @@ -9380,13 +9262,11 @@ local.get $3 local.get $4 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 local.get $1 @@ -9397,7 +9277,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $~lib/math/NativeMathf.pow (; 129 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) @@ -9460,9 +9340,8 @@ local.get $4 i32.const 2139095040 i32.gt_s - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $5 i32.const 2139095040 @@ -9475,7 +9354,7 @@ return end i32.const 0 - local.set $7 + local.set $6 local.get $2 i32.const 0 i32.lt_s @@ -9485,7 +9364,7 @@ i32.ge_s if i32.const 2 - local.set $7 + local.set $6 else local.get $5 i32.const 1065353216 @@ -9496,27 +9375,27 @@ i32.shr_s i32.const 127 i32.sub - local.set $9 + local.set $8 i32.const 23 - local.get $9 + local.get $8 i32.sub - local.set $6 + local.set $9 local.get $5 - local.get $6 + local.get $9 i32.shr_s - local.set $8 - local.get $8 - local.get $6 + local.set $7 + local.get $7 + local.get $9 i32.shl local.get $5 i32.eq if i32.const 2 - local.get $8 + local.get $7 i32.const 1 i32.and i32.sub - local.set $7 + local.set $6 end end end @@ -9606,17 +9485,15 @@ local.get $4 i32.const 2139095040 i32.eq - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $4 i32.const 0 i32.eq end - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $4 i32.const 1065353216 @@ -9641,7 +9518,7 @@ local.get $4 i32.const 1065353216 i32.sub - local.get $7 + local.get $6 i32.or i32.const 0 i32.eq @@ -9655,7 +9532,7 @@ f32.div local.set $11 else - local.get $7 + local.get $6 i32.const 1 i32.eq if @@ -9674,7 +9551,7 @@ i32.const 0 i32.lt_s if - local.get $7 + local.get $6 i32.const 0 i32.eq if @@ -9687,7 +9564,7 @@ f32.div return end - local.get $7 + local.get $6 i32.const 1 i32.eq if @@ -9821,27 +9698,27 @@ local.get $4 i32.const 8388607 i32.and - local.set $8 - local.get $8 + local.set $7 + local.get $7 i32.const 1065353216 i32.or local.set $4 - local.get $8 + local.get $7 i32.const 1885297 i32.le_s if i32.const 0 - local.set $9 + local.set $8 else - local.get $8 + local.get $7 i32.const 6140887 i32.lt_s if i32.const 1 - local.set $9 + local.set $8 else i32.const 0 - local.set $9 + local.set $8 local.get $24 i32.const 1 i32.add @@ -9857,7 +9734,7 @@ local.set $10 f32.const 1.5 f32.const 1 - local.get $9 + local.get $8 select local.set $30 local.get $10 @@ -9895,7 +9772,7 @@ local.get $25 i32.const 4194304 i32.add - local.get $9 + local.get $8 i32.const 21 i32.shl i32.add @@ -10019,7 +9896,7 @@ local.set $31 f32.const 1.5632208487659227e-06 f32.const 0 - local.get $9 + local.get $8 select local.set $32 f32.const -1.1736857413779944e-04 @@ -10037,7 +9914,7 @@ local.set $18 f32.const 0.5849609375 f32.const 0 - local.get $9 + local.get $8 select local.set $34 local.get $31 @@ -10095,8 +9972,8 @@ local.set $11 local.get $11 i32.reinterpret_f32 - local.set $8 - local.get $8 + local.set $7 + local.get $7 i32.const 1124073472 i32.gt_s if @@ -10107,7 +9984,7 @@ f32.mul return else - local.get $8 + local.get $7 i32.const 1124073472 i32.eq if @@ -10127,7 +10004,7 @@ return end else - local.get $8 + local.get $7 i32.const 2147483647 i32.and i32.const 1125515264 @@ -10140,7 +10017,7 @@ f32.mul return else - local.get $8 + local.get $7 i32.const -1021968384 i32.eq if @@ -10161,7 +10038,7 @@ end end end - local.get $8 + local.get $7 i32.const 2147483647 i32.and local.set $36 @@ -10170,16 +10047,16 @@ i32.shr_s i32.const 127 i32.sub - local.set $9 + local.set $8 i32.const 0 local.set $24 local.get $36 i32.const 1056964608 i32.gt_s if - local.get $8 + local.get $7 i32.const 8388608 - local.get $9 + local.get $8 i32.const 1 i32.add i32.shr_s @@ -10192,10 +10069,10 @@ i32.shr_s i32.const 127 i32.sub - local.set $9 + local.set $8 local.get $24 i32.const 8388607 - local.get $9 + local.get $8 i32.shr_s i32.const -1 i32.xor @@ -10208,11 +10085,11 @@ i32.const 8388608 i32.or i32.const 23 - local.get $9 + local.get $8 i32.sub i32.shr_s local.set $24 - local.get $8 + local.get $7 i32.const 0 i32.lt_s if @@ -10312,14 +10189,14 @@ local.set $11 local.get $11 i32.reinterpret_f32 - local.set $8 - local.get $8 + local.set $7 + local.get $7 local.get $24 i32.const 23 i32.shl i32.add - local.set $8 - local.get $8 + local.set $7 + local.get $7 i32.const 23 i32.shr_s i32.const 0 @@ -10330,7 +10207,7 @@ call $~lib/math/NativeMathf.scalbn local.set $11 else - local.get $8 + local.get $7 f32.reinterpret_i32 local.set $11 end @@ -10588,7 +10465,6 @@ ) (func $std/math/test_sign (; 138 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) - (local $5 i32) block $~lib/math/NativeMath.sign|inlined.0 (result f64) local.get $0 local.set $4 @@ -10613,13 +10489,11 @@ local.get $2 local.get $3 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 call $~lib/bindings/Math/sign @@ -10629,7 +10503,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $std/math/test_signf (; 139 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -10665,12 +10539,11 @@ (local $4 i64) (local $5 i64) (local $6 i32) - (local $7 i32) - (local $8 f64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 f64) + (local $7 f64) + (local $8 i64) + (local $9 i32) + (local $10 i64) + (local $11 f64) local.get $0 i64.reinterpret_f64 local.set $2 @@ -10699,17 +10572,15 @@ i64.shl i64.const 0 i64.eq - local.tee $7 if (result i32) - local.get $7 + i32.const 1 else local.get $4 i64.const 2047 i64.eq end - local.tee $7 if (result i32) - local.get $7 + i32.const 1 else local.get $1 call $~lib/builtins/isNaN @@ -10718,9 +10589,9 @@ local.get $0 local.get $1 f64.mul - local.set $8 - local.get $8 - local.get $8 + local.set $7 + local.get $7 + local.get $7 f64.div return end @@ -10734,38 +10605,38 @@ return end local.get $2 - local.set $9 + local.set $8 local.get $4 i64.eqz if local.get $4 - local.get $9 + local.get $8 i64.const 12 i64.shl i64.clz i64.sub local.set $4 - local.get $9 + local.get $8 i64.const 0 local.get $4 i64.sub i64.const 1 i64.add i64.shl - local.set $9 + local.set $8 else - local.get $9 + local.get $8 i64.const -1 i64.const 12 i64.shr_u i64.and - local.set $9 - local.get $9 + local.set $8 + local.get $8 i64.const 1 i64.const 52 i64.shl i64.or - local.set $9 + local.set $8 end local.get $5 i64.eqz @@ -10800,7 +10671,7 @@ local.set $3 end i32.const 0 - local.set $10 + local.set $9 block $break|0 loop $continue|0 local.get $4 @@ -10825,27 +10696,27 @@ i64.gt_s if block - local.get $9 + local.get $8 local.get $3 i64.ge_u if - local.get $9 + local.get $8 local.get $3 i64.sub - local.set $9 - local.get $10 + local.set $8 + local.get $9 i32.const 1 i32.add - local.set $10 + local.set $9 end - local.get $9 + local.get $8 i64.const 1 i64.shl - local.set $9 - local.get $10 + local.set $8 + local.get $9 i32.const 1 i32.shl - local.set $10 + local.set $9 local.get $4 i64.const 1 i64.sub @@ -10855,39 +10726,39 @@ end end end - local.get $9 + local.get $8 local.get $3 i64.ge_u if - local.get $9 + local.get $8 local.get $3 i64.sub - local.set $9 - local.get $10 + local.set $8 + local.get $9 i32.const 1 i32.add - local.set $10 + local.set $9 end - local.get $9 + local.get $8 i64.const 0 i64.eq if i64.const -60 local.set $4 else - local.get $9 + local.get $8 i64.const 11 i64.shl i64.clz - local.set $11 + local.set $10 local.get $4 - local.get $11 + local.get $10 i64.sub local.set $4 - local.get $9 - local.get $11 + local.get $8 + local.get $10 i64.shl - local.set $9 + local.set $8 end br $break|0 unreachable @@ -10899,29 +10770,29 @@ i64.const 0 i64.gt_s if - local.get $9 + local.get $8 i64.const 1 i64.const 52 i64.shl i64.sub - local.set $9 - local.get $9 + local.set $8 + local.get $8 local.get $4 i64.const 52 i64.shl i64.or - local.set $9 + local.set $8 else - local.get $9 + local.get $8 i64.const 0 local.get $4 i64.sub i64.const 1 i64.add i64.shr_u - local.set $9 + local.set $8 end - local.get $9 + local.get $8 f64.reinterpret_i64 local.set $0 local.get $1 @@ -10930,42 +10801,38 @@ local.get $0 local.get $0 f64.add - local.set $12 + local.set $11 local.get $4 local.get $5 i64.eq - local.tee $7 if (result i32) - local.get $7 + i32.const 1 else local.get $4 i64.const 1 i64.add local.get $5 i64.eq - local.tee $7 if (result i32) - local.get $12 + local.get $11 local.get $1 f64.gt - local.tee $7 if (result i32) - local.get $7 + i32.const 1 else - local.get $12 + local.get $11 local.get $1 f64.eq - local.tee $7 if (result i32) - local.get $10 + local.get $9 i32.const 1 i32.and else - local.get $7 + i32.const 0 end end else - local.get $7 + i32.const 0 end end if @@ -11030,17 +10897,15 @@ i32.shl i32.const 0 i32.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i32.const 255 i32.eq end - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $1 call $~lib/builtins/isNaN @@ -11129,7 +10994,7 @@ local.set $3 end i32.const 0 - local.set $9 + local.set $8 block $break|0 loop $continue|0 local.get $4 @@ -11162,19 +11027,19 @@ local.get $3 i32.sub local.set $7 - local.get $9 + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 end local.get $7 i32.const 1 i32.shl local.set $7 - local.get $9 + local.get $8 i32.const 1 i32.shl - local.set $9 + local.set $8 local.get $4 i32.const 1 i32.sub @@ -11192,10 +11057,10 @@ local.get $3 i32.sub local.set $7 - local.get $9 + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 end local.get $7 i32.const 0 @@ -11208,13 +11073,13 @@ i32.const 8 i32.shl i32.clz - local.set $8 + local.set $9 local.get $4 - local.get $8 + local.get $9 i32.sub local.set $4 local.get $7 - local.get $8 + local.get $9 i32.shl local.set $7 end @@ -11263,38 +11128,34 @@ local.get $4 local.get $5 i32.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i32.const 1 i32.add local.get $5 i32.eq - local.tee $8 if (result i32) local.get $10 local.get $1 f32.gt - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $10 local.get $1 f32.eq - local.tee $8 if (result i32) - local.get $9 + local.get $8 i32.const 1 i32.and else - local.get $8 + i32.const 0 end end else - local.get $8 + i32.const 0 end end if @@ -12060,20 +11921,17 @@ local.get $4 ) (func $std/math/test_sinh (; 147 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.sinh local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/sinh @@ -12083,7 +11941,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.sinh (; 148 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -12191,7 +12049,6 @@ ) (func $std/math/test_sqrt (; 150 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) - (local $5 i32) block $~lib/math/NativeMath.sqrt|inlined.0 (result f64) local.get $0 local.set $4 @@ -12202,13 +12059,11 @@ local.get $2 local.get $3 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 call $~lib/bindings/Math/sqrt @@ -12218,7 +12073,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $std/math/test_sqrtf (; 151 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -13007,20 +12862,17 @@ f64.copysign ) (func $std/math/test_tanh (; 155 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.tanh local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/tanh @@ -13030,7 +12882,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.tanh (; 156 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -13129,7 +12981,6 @@ ) (func $std/math/test_trunc (; 158 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) - (local $5 i32) block $~lib/math/NativeMath.trunc|inlined.0 (result f64) local.get $0 local.set $4 @@ -13140,13 +12991,11 @@ local.get $2 local.get $3 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 call $~lib/bindings/Math/trunc @@ -13156,7 +13005,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $std/math/test_truncf (; 159 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -13565,9 +13414,8 @@ (func $start:std/math (; 165 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) - (local $2 i32) - (local $3 i64) - (local $4 f32) + (local $2 i64) + (local $3 f32) global.get $~lib/math/NativeMath.E global.get $~lib/math/NativeMath.E f64.eq @@ -37854,13 +37702,12 @@ local.get $1 f64.const 0 f64.ge - local.tee $2 if (result i32) local.get $1 f64.const 1 f64.lt else - local.get $2 + i32.const 0 end i32.eqz if @@ -37884,8 +37731,8 @@ block $~lib/math/NativeMathf.seedRandom|inlined.0 call $~lib/bindings/Math/random i64.reinterpret_f64 - local.set $3 - local.get $3 + local.set $2 + local.get $2 call $~lib/math/NativeMath.seedRandom end block $break|1 @@ -37900,17 +37747,16 @@ br_if $break|1 block call $~lib/math/NativeMathf.random - local.set $4 - local.get $4 + local.set $3 + local.get $3 f32.const 0 f32.ge - local.tee $2 if (result i32) - local.get $4 + local.get $3 f32.const 1 f32.lt else - local.get $2 + i32.const 0 end i32.eqz if @@ -39157,13 +39003,13 @@ end block $~lib/math/NativeMathf.signbit|inlined.4 (result i32) f32.const 0 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end @@ -39182,13 +39028,13 @@ end block $~lib/math/NativeMathf.signbit|inlined.5 (result i32) f32.const -0 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end @@ -39207,13 +39053,13 @@ end block $~lib/math/NativeMathf.signbit|inlined.6 (result i32) f32.const 1 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end @@ -39232,13 +39078,13 @@ end block $~lib/math/NativeMathf.signbit|inlined.7 (result i32) f32.const -1 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end @@ -39257,13 +39103,13 @@ end block $~lib/math/NativeMathf.signbit|inlined.8 (result i32) f32.const nan:0x400000 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end @@ -39283,13 +39129,13 @@ block $~lib/math/NativeMathf.signbit|inlined.9 (result i32) f32.const nan:0x400000 f32.neg - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end @@ -39308,13 +39154,13 @@ end block $~lib/math/NativeMathf.signbit|inlined.10 (result i32) f32.const inf - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end @@ -39334,13 +39180,13 @@ block $~lib/math/NativeMathf.signbit|inlined.11 (result i32) f32.const inf f32.neg - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end diff --git a/tests/compiler/std/mod.optimized.wat b/tests/compiler/std/mod.optimized.wat index 1fd03fae5c..e69838d63a 100644 --- a/tests/compiler/std/mod.optimized.wat +++ b/tests/compiler/std/mod.optimized.wat @@ -20,10 +20,9 @@ (local $3 i64) (local $4 i64) (local $5 i64) - (local $6 i32) + (local $6 i64) (local $7 i64) (local $8 i64) - (local $9 i64) local.get $0 i64.reinterpret_f64 local.tee $2 @@ -43,31 +42,26 @@ local.get $2 i64.const 63 i64.shr_u - local.set $8 - block (result i32) - local.get $3 - i64.const 1 - i64.shl - local.tee $7 - i64.const 0 + local.set $7 + local.get $3 + i64.const 1 + i64.shl + local.tee $6 + i64.const 0 + i64.eq + if (result i32) + i32.const 1 + else + local.get $4 + i64.const 2047 i64.eq - local.tee $6 - i32.eqz - if - local.get $4 - i64.const 2047 - i64.eq - local.set $6 - end - local.get $6 - i32.eqz end if (result i32) + i32.const 1 + else local.get $1 local.get $1 f64.ne - else - local.get $6 end if local.get $0 @@ -82,12 +76,12 @@ local.get $2 i64.const 1 i64.shl - local.tee $9 - local.get $7 + local.tee $8 + local.get $6 i64.le_u if - local.get $7 - local.get $9 + local.get $6 + local.get $8 i64.eq br_if $folding-inner0 local.get $0 @@ -214,7 +208,7 @@ i64.add i64.shr_u end - local.get $8 + local.get $7 i64.const 63 i64.shl i64.or @@ -253,22 +247,20 @@ f64.eq ) (func $std/mod/test_fmod (; 4 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.mod local.get $2 call $std/mod/check - local.tee $3 - if + if (result i32) local.get $0 local.get $1 call $std/mod/mod local.get $2 call $std/mod/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.mod (; 5 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) @@ -280,7 +272,7 @@ (local $8 i32) local.get $0 i32.reinterpret_f32 - local.tee $3 + local.tee $2 i32.const 23 i32.shr_u i32.const 255 @@ -288,39 +280,33 @@ local.set $4 local.get $1 i32.reinterpret_f32 - local.tee $5 + local.tee $3 i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $6 - local.get $3 + local.set $5 + local.get $2 i32.const -2147483648 i32.and - local.set $8 - block (result i32) - local.get $5 + local.set $7 + local.get $3 + i32.const 1 + i32.shl + local.tee $6 + if (result i32) + local.get $4 + i32.const 255 + i32.eq + else i32.const 1 - i32.shl - local.tee $7 - i32.eqz - local.tee $2 - i32.eqz - if - local.get $4 - i32.const 255 - i32.eq - local.set $2 - end - local.get $2 - i32.eqz end if (result i32) + i32.const 1 + else local.get $1 local.get $1 f32.ne - else - local.get $2 end if local.get $0 @@ -332,15 +318,15 @@ return end block $folding-inner0 - local.get $3 + local.get $2 i32.const 1 i32.shl - local.tee $2 - local.get $7 + local.tee $8 + local.get $6 i32.le_u if - local.get $2 - local.get $7 + local.get $6 + local.get $8 i32.eq br_if $folding-inner0 local.get $0 @@ -348,16 +334,16 @@ end local.get $4 if (result i32) - local.get $3 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $3 + local.get $2 i32.const 1 local.get $4 - local.get $3 + local.get $2 i32.const 9 i32.shl i32.clz @@ -367,30 +353,30 @@ i32.shl end local.set $2 - local.get $6 + local.get $5 if (result i32) - local.get $5 + local.get $3 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $5 + local.get $3 i32.const 1 - local.get $6 local.get $5 + local.get $3 i32.const 9 i32.shl i32.clz i32.sub - local.tee $6 + local.tee $5 i32.sub i32.shl end local.set $3 loop $continue|0 local.get $4 - local.get $6 + local.get $5 i32.gt_s if local.get $2 @@ -459,7 +445,7 @@ i32.sub i32.shr_u end - local.get $8 + local.get $7 i32.or f32.reinterpret_i32 return diff --git a/tests/compiler/std/mod.untouched.wat b/tests/compiler/std/mod.untouched.wat index c5757d420a..3f997d2df9 100644 --- a/tests/compiler/std/mod.untouched.wat +++ b/tests/compiler/std/mod.untouched.wat @@ -31,10 +31,9 @@ (local $5 i64) (local $6 i64) (local $7 i64) - (local $8 i32) - (local $9 f64) + (local $8 f64) + (local $9 i64) (local $10 i64) - (local $11 i64) local.get $0 i64.reinterpret_f64 local.set $2 @@ -64,17 +63,15 @@ local.get $7 i64.const 0 i64.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i64.const 2047 i64.eq end - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $1 call $~lib/builtins/isNaN @@ -83,21 +80,21 @@ local.get $0 local.get $1 f64.mul - local.set $9 - local.get $9 - local.get $9 + local.set $8 + local.get $8 + local.get $8 f64.div return end local.get $2 i64.const 1 i64.shl - local.set $10 - local.get $10 + local.set $9 + local.get $9 local.get $7 i64.le_u if - local.get $10 + local.get $9 local.get $7 i64.eq if @@ -233,13 +230,13 @@ i64.const 11 i64.shl i64.clz - local.set $11 + local.set $10 local.get $4 - local.get $11 + local.get $10 i64.sub local.set $4 local.get $2 - local.get $11 + local.get $10 i64.shl local.set $2 local.get $4 @@ -304,19 +301,16 @@ f64.eq ) (func $std/mod/test_fmod (; 5 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.mod local.get $2 call $std/mod/check - local.tee $3 if (result i32) global.get $std/mod/js i32.eqz - local.tee $3 if (result i32) - local.get $3 + i32.const 1 else local.get $0 local.get $1 @@ -325,7 +319,7 @@ call $std/mod/check end else - local.get $3 + i32.const 0 end ) (func $~lib/builtins/isNaN (; 6 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) @@ -340,10 +334,9 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 f32) + (local $8 f32) + (local $9 i32) (local $10 i32) - (local $11 i32) local.get $0 i32.reinterpret_f32 local.set $2 @@ -373,17 +366,15 @@ local.get $7 i32.const 0 i32.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i32.const 255 i32.eq end - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $1 call $~lib/builtins/isNaN @@ -392,21 +383,21 @@ local.get $0 local.get $1 f32.mul - local.set $9 - local.get $9 - local.get $9 + local.set $8 + local.get $8 + local.get $8 f32.div return end local.get $2 i32.const 1 i32.shl - local.set $10 - local.get $10 + local.set $9 + local.get $9 local.get $7 i32.le_u if - local.get $10 + local.get $9 local.get $7 i32.eq if @@ -542,13 +533,13 @@ i32.const 8 i32.shl i32.clz - local.set $11 + local.set $10 local.get $4 - local.get $11 + local.get $10 i32.sub local.set $4 local.get $2 - local.get $11 + local.get $10 i32.shl local.set $2 local.get $4 diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index fe2e85af6c..d7b579f78c 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -177,7 +177,7 @@ i32.load i32.le_u else - local.get $0 + i32.const 0 end if loop $continue|0 @@ -201,19 +201,15 @@ i32.const 0 ) (func $~lib/runtime/runtime.flags (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if + if (result i32) local.get $0 i32.const 112 i32.load i32.gt_u - local.set $1 + else + i32.const 1 end - local.get $1 if (result i32) unreachable else @@ -248,15 +244,13 @@ (local $3 i32) (local $4 i32) local.get $0 - i32.eqz - local.tee $2 if (result i32) - local.get $2 - else local.get $0 i32.const 112 i32.load i32.gt_u + else + i32.const 1 end if (result i32) unreachable diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index ba40155b6a..f0193317ae 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -242,7 +242,7 @@ i32.load i32.le_u else - local.get $2 + i32.const 0 end if loop $continue|0 @@ -267,14 +267,12 @@ ) (func $~lib/runtime/runtime.flags (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/runtime/RTTI_BASE local.set $1 local.get $0 i32.eqz - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 local.get $1 diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index 70dcb9eb43..811595e03f 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -165,7 +165,7 @@ local.tee $3 i32.eqz else - local.get $1 + i32.const 0 end if local.get $1 @@ -194,15 +194,10 @@ i32.const 1 return end + i32.const 0 + i32.const 1 local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if - i32.const 0 - local.set $1 - end - local.get $1 + select if i32.const 0 return @@ -323,7 +318,7 @@ i32.load i32.le_u else - local.get $0 + i32.const 0 end if loop $continue|0 @@ -347,19 +342,15 @@ i32.const 0 ) (func $~lib/runtime/runtime.flags (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if + if (result i32) local.get $0 i32.const 168 i32.load i32.gt_u - local.set $1 + else + i32.const 1 end - local.get $1 if (result i32) unreachable else @@ -395,15 +386,13 @@ (local $4 i32) local.get $0 local.tee $2 - i32.eqz - local.tee $0 if (result i32) - local.get $0 - else local.get $2 i32.const 168 i32.load i32.gt_u + else + i32.const 1 end if (result i32) unreachable diff --git a/tests/compiler/std/object-literal.untouched.wat b/tests/compiler/std/object-literal.untouched.wat index 894a103015..b71be61893 100644 --- a/tests/compiler/std/object-literal.untouched.wat +++ b/tests/compiler/std/object-literal.untouched.wat @@ -230,7 +230,7 @@ local.tee $5 i32.eqz else - local.get $4 + i32.const 0 end if block @@ -255,7 +255,6 @@ ) (func $~lib/string/String.__eq (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 i32.eq @@ -266,9 +265,8 @@ local.get $0 i32.const 0 i32.eq - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $1 i32.const 0 @@ -280,8 +278,8 @@ end local.get $0 call $~lib/string/String#get:length - local.set $3 - local.get $3 + local.set $2 + local.get $2 local.get $1 call $~lib/string/String#get:length i32.ne @@ -293,7 +291,7 @@ i32.const 0 local.get $1 i32.const 0 - local.get $3 + local.get $2 call $~lib/util/string/compareImpl i32.eqz ) @@ -426,7 +424,7 @@ i32.load i32.le_u else - local.get $2 + i32.const 0 end if loop $continue|0 @@ -451,14 +449,12 @@ ) (func $~lib/runtime/runtime.flags (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/runtime/RTTI_BASE local.set $1 local.get $0 i32.eqz - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 local.get $1 diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index bdca92a614..780ebff7cc 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -302,9 +302,9 @@ f64.mul ) (func $~lib/math/NativeMath.pow (; 6 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) - (local $2 i32) + (local $2 f64) (local $3 f64) - (local $4 f64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 f64) @@ -333,7 +333,7 @@ local.tee $17 i32.const 2147483647 i32.and - local.set $5 + local.set $4 local.get $1 i64.reinterpret_f64 local.tee $16 @@ -354,46 +354,38 @@ f64.const 1 return end - local.get $5 + i32.const 1 + local.get $8 i32.const 2146435072 i32.gt_s - local.tee $2 - i32.eqz - if - local.get $5 + local.get $4 + i32.const 2146435072 + i32.gt_s + if (result i32) + i32.const 1 + else + local.get $19 + i32.const 0 + i32.ne + i32.const 0 + local.get $4 i32.const 2146435072 i32.eq - local.tee $2 - if - local.get $19 - i32.const 0 - i32.ne - local.set $2 - end - end - local.get $2 - i32.eqz - if - local.get $8 - i32.const 2146435072 - i32.gt_s - local.set $2 + select end - local.get $2 - i32.eqz - if + select + if (result i32) + i32.const 1 + else + local.get $6 + i32.const 0 + i32.ne + i32.const 0 local.get $8 i32.const 2146435072 i32.eq - local.tee $2 - if - local.get $6 - i32.const 0 - i32.ne - local.set $2 - end + select end - local.get $2 if local.get $0 local.get $1 @@ -426,8 +418,8 @@ i32.gt_s local.tee $13 select - local.tee $2 - local.get $2 + local.tee $5 + local.get $5 i32.const 52 i32.const 20 local.get $13 @@ -436,13 +428,13 @@ i32.sub local.tee $13 i32.shr_s - local.tee $2 + local.tee $5 local.get $13 i32.shl i32.eq if (result i32) i32.const 2 - local.get $2 + local.get $5 i32.const 1 i32.and i32.sub @@ -462,13 +454,13 @@ i32.const 2146435072 i32.eq if - local.get $5 + local.get $4 i32.const 1072693248 i32.sub local.get $19 i32.or if - local.get $5 + local.get $4 i32.const 1072693248 i32.ge_s if @@ -539,66 +531,58 @@ end local.get $0 f64.abs - local.set $4 + local.set $3 local.get $19 i32.eqz if - local.get $5 - i32.eqz - local.tee $2 - i32.eqz - if - local.get $5 - i32.const 2146435072 - i32.eq - local.set $2 - end - local.get $2 - i32.eqz - if - local.get $5 - i32.const 1072693248 - i32.eq - local.set $2 - end - local.get $2 + i32.const 1 + local.get $4 + i32.const 1072693248 + i32.eq + local.get $4 + i32.const 2146435072 + i32.eq + i32.const 1 + local.get $4 + select + select if f64.const 1 - local.get $4 + local.get $3 f64.div - local.get $4 + local.get $3 local.get $9 i32.const 0 i32.lt_s select - local.set $4 + local.set $3 local.get $17 i32.const 0 i32.lt_s if (result f64) - local.get $5 + local.get $4 i32.const 1072693248 i32.sub local.get $11 i32.or if (result f64) - local.get $4 + local.get $3 f64.neg - local.get $4 + local.get $3 local.get $11 i32.const 1 i32.eq select else - local.get $4 - local.get $4 + local.get $3 + local.get $3 f64.sub local.tee $0 local.get $0 f64.div end else - local.get $4 + local.get $3 end return end @@ -636,7 +620,7 @@ i32.const 1139802112 i32.gt_s if - local.get $5 + local.get $4 i32.const 1072693247 i32.le_s if @@ -648,7 +632,7 @@ select return end - local.get $5 + local.get $4 i32.const 1072693248 i32.ge_s if @@ -661,7 +645,7 @@ return end end - local.get $5 + local.get $4 i32.const 1072693247 i32.lt_s if @@ -683,7 +667,7 @@ end return end - local.get $5 + local.get $4 i32.const 1072693248 i32.gt_s if @@ -705,16 +689,16 @@ end return end - local.get $4 + local.get $3 f64.const 1 f64.sub - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f64.mul f64.const 0.5 - local.get $3 + local.get $2 f64.const 0.3333333333333333 - local.get $3 + local.get $2 f64.const 0.25 f64.mul f64.sub @@ -723,10 +707,10 @@ f64.mul local.set $0 f64.const 1.4426950216293335 - local.get $3 + local.get $2 f64.mul - local.tee $4 - local.get $3 + local.tee $3 + local.get $2 f64.const 1.9259629911266175e-08 f64.mul local.get $0 @@ -742,50 +726,50 @@ local.set $10 local.get $0 local.get $10 - local.get $4 + local.get $3 f64.sub f64.sub else i32.const 0 local.set $6 - local.get $5 + local.get $4 i32.const 1048576 i32.lt_s if (result i32) - local.get $4 + local.get $3 f64.const 9007199254740992 f64.mul - local.tee $4 + local.tee $3 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $5 + local.set $4 i32.const -53 else i32.const 0 end - local.get $5 + local.get $4 i32.const 20 i32.shr_s i32.const 1023 i32.sub i32.add local.set $6 - local.get $5 + local.get $4 i32.const 1048575 i32.and - local.tee $2 + local.tee $5 i32.const 1072693248 i32.or - local.set $5 - local.get $2 + local.set $4 + local.get $5 i32.const 235662 i32.le_s if (result i32) i32.const 0 else - local.get $2 + local.get $5 i32.const 767610 i32.lt_s if (result i32) @@ -795,38 +779,38 @@ i32.const 1 i32.add local.set $6 - local.get $5 + local.get $4 i32.const -1048576 i32.add - local.set $5 + local.set $4 i32.const 0 end end - local.set $2 - local.get $4 + local.set $5 + local.get $3 i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $5 + local.get $4 i64.extend_i32_s i64.const 32 i64.shl i64.or f64.reinterpret_i64 - local.tee $4 + local.tee $3 f64.const 1.5 f64.const 1 - local.get $2 + local.get $5 select local.tee $0 f64.sub local.tee $10 f64.const 1 - local.get $4 + local.get $3 local.get $0 f64.add f64.div - local.tee $3 + local.tee $2 f64.mul local.tee $18 i64.reinterpret_f64 @@ -834,15 +818,15 @@ i64.and f64.reinterpret_i64 local.set $14 + local.get $3 local.get $4 - local.get $5 i32.const 1 i32.shr_s i32.const 536870912 i32.or i32.const 524288 i32.add - local.get $2 + local.get $5 i32.const 18 i32.shl i32.add @@ -850,7 +834,7 @@ i64.const 32 i64.shl f64.reinterpret_i64 - local.tee $4 + local.tee $3 local.get $0 f64.sub f64.sub @@ -891,10 +875,10 @@ f64.mul f64.add f64.mul - local.get $3 + local.get $2 local.get $10 local.get $14 - local.get $4 + local.get $3 f64.mul f64.sub local.get $14 @@ -902,7 +886,7 @@ f64.mul f64.sub f64.mul - local.tee $3 + local.tee $2 local.get $14 local.get $18 f64.add @@ -916,8 +900,8 @@ f64.reinterpret_i64 local.tee $10 f64.mul - local.tee $4 - local.get $3 + local.tee $3 + local.get $2 local.get $10 f64.mul local.get $0 @@ -936,15 +920,15 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $3 + local.tee $2 f64.mul local.tee $20 f64.const -7.028461650952758e-09 - local.get $3 + local.get $2 f64.mul local.get $0 + local.get $2 local.get $3 - local.get $4 f64.sub f64.sub f64.const 0.9617966939259756 @@ -952,16 +936,16 @@ f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $2 + local.get $5 select f64.add - local.tee $3 + local.tee $2 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $2 + local.get $5 select - local.tee $4 + local.tee $3 f64.add local.get $6 f64.convert_i32_s @@ -972,17 +956,17 @@ i64.and f64.reinterpret_i64 local.set $10 - local.get $3 + local.get $2 local.get $10 local.get $0 f64.sub - local.get $4 + local.get $3 f64.sub local.get $20 f64.sub f64.sub end - local.set $4 + local.set $3 local.get $1 local.get $1 i64.reinterpret_f64 @@ -994,20 +978,20 @@ local.get $10 f64.mul local.get $1 - local.get $4 + local.get $3 f64.mul f64.add local.tee $1 local.get $0 local.get $10 f64.mul - local.tee $3 + local.tee $2 f64.add local.tee $0 i64.reinterpret_f64 local.tee $16 i32.wrap_i64 - local.set $2 + local.set $5 block $folding-inner1 block $folding-inner0 local.get $16 @@ -1021,14 +1005,14 @@ local.get $12 i32.const 1083179008 i32.sub - local.get $2 + local.get $5 i32.or br_if $folding-inner0 local.get $1 f64.const 8.008566259537294e-17 f64.add local.get $0 - local.get $3 + local.get $2 f64.sub f64.gt br_if $folding-inner0 @@ -1042,12 +1026,12 @@ local.get $12 i32.const -1064252416 i32.sub - local.get $2 + local.get $5 i32.or br_if $folding-inner1 local.get $1 local.get $0 - local.get $3 + local.get $2 f64.sub f64.le br_if $folding-inner1 @@ -1061,7 +1045,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $2 + local.set $5 i32.const 0 local.set $6 local.get $13 @@ -1069,7 +1053,7 @@ i32.gt_s if i32.const 1048576 - local.get $2 + local.get $5 i32.const 1 i32.add i32.shr_s @@ -1082,9 +1066,9 @@ i32.shr_s i32.const 1023 i32.sub - local.set $2 + local.set $5 i32.const 1048575 - local.get $2 + local.get $5 i32.shr_s i32.const -1 i32.xor @@ -1101,7 +1085,7 @@ i32.const 1048576 i32.or i32.const 20 - local.get $2 + local.get $5 i32.sub i32.shr_s local.set $6 @@ -1114,13 +1098,13 @@ i32.lt_s select local.set $6 - local.get $3 + local.get $2 local.get $0 f64.sub - local.set $3 + local.set $2 end local.get $1 - local.get $3 + local.get $2 f64.add i64.reinterpret_f64 i64.const -4294967296 @@ -1129,10 +1113,10 @@ local.tee $0 f64.const 0.6931471824645996 f64.mul - local.tee $4 + local.tee $3 local.get $1 local.get $0 - local.get $3 + local.get $2 f64.sub f64.sub f64.const 0.6931471805599453 @@ -1143,14 +1127,14 @@ f64.add local.tee $1 f64.add - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f64.mul local.set $0 local.get $7 f64.const 1 - local.get $3 - local.get $3 + local.get $2 + local.get $2 local.get $0 f64.const 0.16666666666666602 local.get $0 @@ -1178,17 +1162,17 @@ f64.sub f64.div local.get $1 + local.get $2 local.get $3 - local.get $4 f64.sub f64.sub local.tee $0 - local.get $3 + local.get $2 local.get $0 f64.mul f64.add f64.sub - local.get $3 + local.get $2 f64.sub f64.sub local.tee $0 @@ -1200,7 +1184,7 @@ i32.const 20 i32.shl i32.add - local.tee $2 + local.tee $5 i32.const 20 i32.shr_s i32.const 0 @@ -1214,7 +1198,7 @@ i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $2 + local.get $5 i64.extend_i32_s i64.const 32 i64.shl @@ -1287,7 +1271,6 @@ (func $start:std/operator-overloading (; 10 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - (local $2 i32) i32.const 352 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset @@ -1318,14 +1301,13 @@ i32.load i32.const 3 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/a i32.load offset=4 i32.const 5 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -1360,15 +1342,13 @@ global.set $std/operator-overloading/s global.get $std/operator-overloading/s i32.load - i32.eqz - local.tee $0 if (result i32) + i32.const 0 + else global.get $std/operator-overloading/s i32.load offset=4 i32.const 6 i32.eq - else - local.get $0 end i32.eqz if @@ -1405,14 +1385,13 @@ i32.load i32.const 6 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/m i32.load offset=4 i32.const 10 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -1449,14 +1428,13 @@ i32.load i32.const 2 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/d i32.load offset=4 i32.const 5 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -1493,13 +1471,12 @@ i32.load i32.const 4 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/f i32.load offset=4 i32.eqz else - local.get $0 + i32.const 0 end i32.eqz if @@ -1526,14 +1503,13 @@ i32.load i32.const 16 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/p i32.load offset=4 i32.const 243 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -1570,14 +1546,13 @@ i32.load i32.const 15 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/n i32.load offset=4 i32.const 15 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -1614,14 +1589,13 @@ i32.load i32.const 65535 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/o i32.load offset=4 i32.const 255 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -1658,14 +1632,13 @@ i32.load i32.const 65535 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/x i32.load offset=4 i32.const 255 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -1685,21 +1658,20 @@ call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/eq2 global.get $std/operator-overloading/eq1 - local.tee $1 + local.tee $0 i32.load global.get $std/operator-overloading/eq2 - local.tee $2 + local.tee $1 i32.load i32.eq - local.tee $0 if (result i32) - local.get $1 + local.get $0 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=4 i32.eq else - local.get $0 + i32.const 0 end global.set $std/operator-overloading/eq global.get $std/operator-overloading/eq @@ -1722,21 +1694,20 @@ call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/eq4 global.get $std/operator-overloading/eq3 - local.tee $1 + local.tee $0 i32.load global.get $std/operator-overloading/eq4 - local.tee $2 + local.tee $1 i32.load i32.eq - local.tee $0 if (result i32) - local.get $1 + local.get $0 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=4 i32.eq else - local.get $0 + i32.const 0 end global.set $std/operator-overloading/eqf global.get $std/operator-overloading/eqf @@ -1749,21 +1720,20 @@ unreachable end global.get $std/operator-overloading/eq1 - local.tee $1 + local.tee $0 i32.load global.get $std/operator-overloading/eq2 - local.tee $2 + local.tee $1 i32.load i32.ne - local.tee $0 if (result i32) - local.get $1 + local.get $0 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=4 i32.ne else - local.get $0 + i32.const 0 end global.set $std/operator-overloading/eq global.get $std/operator-overloading/eq @@ -1776,21 +1746,20 @@ unreachable end global.get $std/operator-overloading/eq3 - local.tee $1 + local.tee $0 i32.load global.get $std/operator-overloading/eq4 - local.tee $2 + local.tee $1 i32.load i32.ne - local.tee $0 if (result i32) - local.get $1 + local.get $0 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=4 i32.ne else - local.get $0 + i32.const 0 end global.set $std/operator-overloading/eqf global.get $std/operator-overloading/eqf @@ -1813,21 +1782,20 @@ call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/gt2 global.get $std/operator-overloading/gt1 - local.tee $1 + local.tee $0 i32.load global.get $std/operator-overloading/gt2 - local.tee $2 + local.tee $1 i32.load i32.gt_s - local.tee $0 if (result i32) - local.get $1 + local.get $0 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=4 i32.gt_s else - local.get $0 + i32.const 0 end global.set $std/operator-overloading/gt global.get $std/operator-overloading/gt @@ -1850,21 +1818,20 @@ call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/gte2 global.get $std/operator-overloading/gte1 - local.tee $1 + local.tee $0 i32.load global.get $std/operator-overloading/gte2 - local.tee $2 + local.tee $1 i32.load i32.ge_s - local.tee $0 if (result i32) - local.get $1 + local.get $0 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=4 i32.ge_s else - local.get $0 + i32.const 0 end global.set $std/operator-overloading/gte global.get $std/operator-overloading/gte @@ -1887,21 +1854,20 @@ call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/le2 global.get $std/operator-overloading/le1 - local.tee $1 + local.tee $0 i32.load global.get $std/operator-overloading/le2 - local.tee $2 + local.tee $1 i32.load i32.lt_s - local.tee $0 if (result i32) - local.get $1 + local.get $0 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=4 i32.lt_s else - local.get $0 + i32.const 0 end global.set $std/operator-overloading/le global.get $std/operator-overloading/le @@ -1924,21 +1890,20 @@ call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/leq2 global.get $std/operator-overloading/leq1 - local.tee $1 + local.tee $0 i32.load global.get $std/operator-overloading/leq2 - local.tee $2 + local.tee $1 i32.load i32.le_s - local.tee $0 if (result i32) - local.get $1 + local.get $0 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=4 i32.le_s else - local.get $0 + i32.const 0 end global.set $std/operator-overloading/leq global.get $std/operator-overloading/leq @@ -1971,14 +1936,13 @@ i32.load i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/sres i32.load offset=4 i32.const 2 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2008,14 +1972,13 @@ i32.load i32.const 536870911 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/ures i32.load offset=4 i32.const 536870910 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2045,14 +2008,13 @@ i32.load i32.const 8 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/sres i32.load offset=4 i32.const 16 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2079,7 +2041,6 @@ global.get $std/operator-overloading/pos i32.load i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/pres i32.load offset=4 @@ -2087,7 +2048,7 @@ i32.load offset=4 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2120,7 +2081,6 @@ i32.load i32.sub i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/nres i32.load offset=4 @@ -2130,7 +2090,7 @@ i32.sub i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2163,7 +2123,6 @@ i32.const -1 i32.xor i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/res i32.load offset=4 @@ -2173,7 +2132,7 @@ i32.xor i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2189,32 +2148,26 @@ call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/excl global.get $std/operator-overloading/excl - local.tee $1 - i32.load - i32.eqz local.tee $0 + i32.load if (result i32) - local.get $1 - i32.load offset=4 - i32.eqz + i32.const 0 else local.get $0 + i32.load offset=4 + i32.eqz end global.set $std/operator-overloading/bres - global.get $std/operator-overloading/bres - local.set $1 global.get $std/operator-overloading/excl i32.load - i32.eqz - local.tee $0 if (result i32) + i32.const 0 + else global.get $std/operator-overloading/excl i32.load offset=4 i32.eqz - else - local.get $0 end - local.get $1 + global.get $std/operator-overloading/bres i32.ne if i32.const 0 @@ -2258,14 +2211,13 @@ i32.load i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/incdec i32.load offset=4 i32.const 2 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2293,15 +2245,13 @@ global.set $std/operator-overloading/incdec global.get $std/operator-overloading/incdec i32.load - i32.eqz - local.tee $0 if (result i32) + i32.const 0 + else global.get $std/operator-overloading/incdec i32.load offset=4 i32.const 1 i32.eq - else - local.get $0 end i32.eqz if @@ -2331,15 +2281,13 @@ global.set $std/operator-overloading/tmp global.get $std/operator-overloading/tmp i32.load - i32.eqz - local.tee $0 if (result i32) + i32.const 0 + else global.get $std/operator-overloading/tmp i32.load offset=4 i32.const 1 i32.eq - else - local.get $0 end i32.eqz if @@ -2354,14 +2302,13 @@ i32.load i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/incdec i32.load offset=4 i32.const 2 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2389,14 +2336,13 @@ i32.load i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/tmp i32.load offset=4 i32.const 2 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2409,15 +2355,13 @@ end global.get $std/operator-overloading/incdec i32.load - i32.eqz - local.tee $0 if (result i32) + i32.const 0 + else global.get $std/operator-overloading/incdec i32.load offset=4 i32.const 1 i32.eq - else - local.get $0 end i32.eqz if @@ -2465,14 +2409,13 @@ i32.load i32.const 4 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/ais i32.load offset=4 i32.const 6 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2520,14 +2463,13 @@ i32.load i32.const 4 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/aii i32.load offset=4 i32.const 6 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2551,7 +2493,7 @@ i32.load i32.le_u else - local.get $0 + i32.const 0 end if loop $continue|0 @@ -2575,19 +2517,15 @@ i32.const 0 ) (func $~lib/runtime/runtime.flags (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if + if (result i32) local.get $0 i32.const 184 i32.load i32.gt_u - local.set $1 + else + i32.const 1 end - local.get $1 if (result i32) unreachable else @@ -2622,15 +2560,13 @@ (local $3 i32) (local $4 i32) local.get $0 - i32.eqz - local.tee $2 if (result i32) - local.get $2 - else local.get $0 i32.const 184 i32.load i32.gt_u + else + i32.const 1 end if (result i32) unreachable diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 70a16071e1..ddfe2feec2 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -510,44 +510,39 @@ local.get $7 i32.const 2146435072 i32.gt_s - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $7 i32.const 2146435072 i32.eq - local.tee $9 if (result i32) local.get $4 i32.const 0 i32.ne else - local.get $9 + i32.const 0 end end - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $8 i32.const 2146435072 i32.gt_s end - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $8 i32.const 2146435072 i32.eq - local.tee $9 if (result i32) local.get $6 i32.const 0 i32.ne else - local.get $9 + i32.const 0 end end if @@ -557,7 +552,7 @@ return end i32.const 0 - local.set $10 + local.set $9 local.get $3 i32.const 0 i32.lt_s @@ -567,7 +562,7 @@ i32.ge_s if i32.const 2 - local.set $10 + local.set $9 else local.get $8 i32.const 1072693248 @@ -578,21 +573,21 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 - local.get $11 + local.set $10 + local.get $10 i32.const 20 i32.gt_s - local.set $9 + local.set $11 i32.const 52 i32.const 20 - local.get $9 - select local.get $11 + select + local.get $10 i32.sub local.set $12 local.get $6 local.get $8 - local.get $9 + local.get $11 select local.set $13 local.get $13 @@ -610,7 +605,7 @@ i32.const 1 i32.and i32.sub - local.set $10 + local.set $9 end end end @@ -713,17 +708,15 @@ local.get $7 i32.const 0 i32.eq - local.tee $14 if (result i32) - local.get $14 + i32.const 1 else local.get $7 i32.const 2146435072 i32.eq end - local.tee $14 if (result i32) - local.get $14 + i32.const 1 else local.get $7 i32.const 1072693248 @@ -748,7 +741,7 @@ local.get $7 i32.const 1072693248 i32.sub - local.get $10 + local.get $9 i32.or i32.const 0 i32.eq @@ -762,7 +755,7 @@ f64.div local.set $16 else - local.get $10 + local.get $9 i32.const 1 i32.eq if @@ -782,7 +775,7 @@ i32.const 0 i32.lt_s if - local.get $10 + local.get $9 i32.const 0 i32.eq if @@ -795,7 +788,7 @@ f64.div return end - local.get $10 + local.get $9 i32.const 1 i32.eq if @@ -981,17 +974,17 @@ i32.le_s if i32.const 0 - local.set $11 + local.set $10 else local.get $28 i32.const 767610 i32.lt_s if i32.const 1 - local.set $11 + local.set $10 else i32.const 0 - local.set $11 + local.set $10 local.get $29 i32.const 1 i32.add @@ -1015,7 +1008,7 @@ local.set $15 f64.const 1.5 f64.const 1 - local.get $11 + local.get $10 select local.set $35 local.get $15 @@ -1047,7 +1040,7 @@ i32.or i32.const 524288 i32.add - local.get $11 + local.get $10 i32.const 18 i32.shl i32.add @@ -1170,7 +1163,7 @@ local.set $36 f64.const 1.350039202129749e-08 f64.const 0 - local.get $11 + local.get $10 select local.set $37 f64.const -7.028461650952758e-09 @@ -1188,7 +1181,7 @@ local.set $24 f64.const 0.5849624872207642 f64.const 0 - local.get $11 + local.get $10 select local.set $39 local.get $36 @@ -1333,7 +1326,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 + local.set $10 i32.const 0 local.set $29 local.get $41 @@ -1342,7 +1335,7 @@ if local.get $28 i32.const 1048576 - local.get $11 + local.get $10 i32.const 1 i32.add i32.shr_s @@ -1355,12 +1348,12 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 + local.set $10 f64.const 0 local.set $24 local.get $29 i32.const 1048575 - local.get $11 + local.get $10 i32.shr_s i32.const -1 i32.xor @@ -1376,7 +1369,7 @@ i32.const 1048576 i32.or i32.const 20 - local.get $11 + local.get $10 i32.sub i32.shr_s local.set $29 @@ -1578,13 +1571,11 @@ call $std/operator-overloading/Tester#constructor ) (func $std/operator-overloading/Tester.equals (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 i32.load local.get $1 i32.load i32.eq - local.tee $2 if (result i32) local.get $0 i32.load offset=4 @@ -1592,17 +1583,15 @@ i32.load offset=4 i32.eq else - local.get $2 + i32.const 0 end ) (func $std/operator-overloading/Tester.notEquals (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 i32.load local.get $1 i32.load i32.ne - local.tee $2 if (result i32) local.get $0 i32.load offset=4 @@ -1610,17 +1599,15 @@ i32.load offset=4 i32.ne else - local.get $2 + i32.const 0 end ) (func $std/operator-overloading/Tester.greater (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 i32.load local.get $1 i32.load i32.gt_s - local.tee $2 if (result i32) local.get $0 i32.load offset=4 @@ -1628,17 +1615,15 @@ i32.load offset=4 i32.gt_s else - local.get $2 + i32.const 0 end ) (func $std/operator-overloading/Tester.greaterEquals (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 i32.load local.get $1 i32.load i32.ge_s - local.tee $2 if (result i32) local.get $0 i32.load offset=4 @@ -1646,17 +1631,15 @@ i32.load offset=4 i32.ge_s else - local.get $2 + i32.const 0 end ) (func $std/operator-overloading/Tester.less (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 i32.load local.get $1 i32.load i32.lt_s - local.tee $2 if (result i32) local.get $0 i32.load offset=4 @@ -1664,17 +1647,15 @@ i32.load offset=4 i32.lt_s else - local.get $2 + i32.const 0 end ) (func $std/operator-overloading/Tester.lessEquals (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 i32.load local.get $1 i32.load i32.le_s - local.tee $2 if (result i32) local.get $0 i32.load offset=4 @@ -1682,7 +1663,7 @@ i32.load offset=4 i32.le_s else - local.get $2 + i32.const 0 end ) (func $std/operator-overloading/Tester.shr (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -1754,17 +1735,15 @@ call $std/operator-overloading/Tester#constructor ) (func $std/operator-overloading/Tester.excl (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.load i32.eqz - local.tee $1 if (result i32) local.get $0 i32.load offset=4 i32.eqz else - local.get $1 + i32.const 0 end ) (func $std/operator-overloading/Tester#inc (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -1888,14 +1867,13 @@ i32.load i32.const 3 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/a i32.load offset=4 i32.const 5 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -1924,14 +1902,13 @@ i32.load i32.const 0 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/s i32.load offset=4 i32.const 6 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -1960,14 +1937,13 @@ i32.load i32.const 6 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/m i32.load offset=4 i32.const 10 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -1996,14 +1972,13 @@ i32.load i32.const 2 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/d i32.load offset=4 i32.const 5 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2032,14 +2007,13 @@ i32.load i32.const 4 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/f i32.load offset=4 i32.const 0 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2068,14 +2042,13 @@ i32.load i32.const 16 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/p i32.load offset=4 i32.const 243 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2104,14 +2077,13 @@ i32.load i32.const 15 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/n i32.load offset=4 i32.const 15 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2140,14 +2112,13 @@ i32.load i32.const 65535 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/o i32.load offset=4 i32.const 255 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2176,14 +2147,13 @@ i32.load i32.const 65535 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/x i32.load offset=4 i32.const 255 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2395,14 +2365,13 @@ i32.load i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/sres i32.load offset=4 i32.const 2 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2426,14 +2395,13 @@ i32.load i32.const 536870911 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/ures i32.load offset=4 i32.const 536870910 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2457,14 +2425,13 @@ i32.load i32.const 8 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/sres i32.load offset=4 i32.const 16 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2488,7 +2455,6 @@ global.get $std/operator-overloading/pos i32.load i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/pres i32.load offset=4 @@ -2496,7 +2462,7 @@ i32.load offset=4 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2522,7 +2488,6 @@ i32.load i32.sub i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/nres i32.load offset=4 @@ -2532,7 +2497,7 @@ i32.sub i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2558,7 +2523,6 @@ i32.const -1 i32.xor i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/res i32.load offset=4 @@ -2568,7 +2532,7 @@ i32.xor i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2591,13 +2555,12 @@ global.get $std/operator-overloading/excl i32.load i32.eqz - local.tee $0 if (result i32) global.get $std/operator-overloading/excl i32.load offset=4 i32.eqz else - local.get $0 + i32.const 0 end i32.eq i32.eqz @@ -2633,14 +2596,13 @@ i32.load i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/incdec i32.load offset=4 i32.const 2 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2658,14 +2620,13 @@ i32.load i32.const 0 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/incdec i32.load offset=4 i32.const 1 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2693,14 +2654,13 @@ i32.load i32.const 0 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/tmp i32.load offset=4 i32.const 1 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2715,14 +2675,13 @@ i32.load i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/incdec i32.load offset=4 i32.const 2 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2745,14 +2704,13 @@ i32.load i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/tmp i32.load offset=4 i32.const 2 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2767,14 +2725,13 @@ i32.load i32.const 0 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/incdec i32.load offset=4 i32.const 1 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2833,14 +2790,13 @@ i32.load i32.const 4 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/ais i32.load offset=4 i32.const 6 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2899,14 +2855,13 @@ i32.load i32.const 4 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/aii i32.load offset=4 i32.const 6 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -2935,7 +2890,7 @@ i32.load i32.le_u else - local.get $2 + i32.const 0 end if loop $continue|0 @@ -2960,14 +2915,12 @@ ) (func $~lib/runtime/runtime.flags (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/runtime/RTTI_BASE local.set $1 local.get $0 i32.eqz - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 local.get $1 diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index 21985e820c..f4b09ccb1c 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -204,7 +204,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $2 + local.tee $3 i32.const 1 i32.and i32.eqz @@ -216,20 +216,19 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const -4 i32.and - local.tee $3 + local.tee $2 i32.const 16 i32.ge_u - local.tee $2 - if - local.get $3 + if (result i32) + local.get $2 i32.const 1073741824 i32.lt_u - local.set $2 + else + i32.const 0 end - local.get $2 i32.eqz if i32.const 0 @@ -239,67 +238,67 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 256 i32.lt_u if (result i32) - local.get $3 + local.get $2 i32.const 8 i32.div_u local.set $4 i32.const 0 else - local.get $3 - local.get $3 + local.get $2 + local.get $2 call $~lib/allocator/tlsf/fls - local.tee $2 + local.tee $3 i32.const 5 i32.sub i32.shr_u i32.const 32 i32.xor local.set $4 - local.get $2 + local.get $3 i32.const 7 i32.sub end - local.set $2 + local.set $3 local.get $1 i32.load offset=8 - local.set $3 + local.set $2 local.get $1 i32.load offset=4 local.tee $5 if local.get $5 - local.get $3 + local.get $2 i32.store offset=8 end - local.get $3 + local.get $2 if - local.get $3 + local.get $2 local.get $5 i32.store offset=4 end local.get $0 - local.get $2 + local.get $3 local.get $4 call $~lib/allocator/tlsf/Root#getHead local.get $1 i32.eq if local.get $0 - local.get $2 - local.get $4 local.get $3 + local.get $4 + local.get $2 call $~lib/allocator/tlsf/Root#setHead - local.get $3 + local.get $2 i32.eqz if local.get $0 - local.get $2 + local.get $3 local.get $0 - local.get $2 + local.get $3 call $~lib/allocator/tlsf/Root#getSLMap i32.const 1 local.get $4 @@ -316,7 +315,7 @@ local.get $0 i32.load i32.const 1 - local.get $2 + local.get $3 i32.shl i32.const -1 i32.xor @@ -418,7 +417,7 @@ end local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -434,17 +433,16 @@ i32.load i32.const -4 i32.and - local.tee $4 + local.tee $3 i32.const 16 i32.ge_u - local.tee $2 - if - local.get $4 + if (result i32) + local.get $3 i32.const 1073741824 i32.lt_u - local.set $2 + else + i32.const 0 end - local.get $2 i32.eqz if i32.const 0 @@ -456,7 +454,7 @@ end local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $2 + local.tee $3 i32.eqz if i32.const 0 @@ -466,14 +464,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.load local.tee $4 i32.const 1 i32.and if local.get $0 - local.get $2 + local.get $3 call $~lib/allocator/tlsf/Root#remove local.get $1 local.get $4 @@ -481,17 +479,17 @@ i32.and i32.const 8 i32.add - local.get $3 + local.get $2 i32.add - local.tee $3 + local.tee $2 i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $2 + local.tee $3 i32.load local.set $4 end - local.get $3 + local.get $2 i32.const 2 i32.and if @@ -525,38 +523,37 @@ local.get $1 call $~lib/allocator/tlsf/Root#remove local.get $1 - local.get $3 + local.get $2 i32.const -4 i32.and i32.const 8 i32.add local.get $5 i32.add - local.tee $3 + local.tee $2 i32.store end - local.get $2 + local.get $3 local.get $4 i32.const 2 i32.or i32.store local.get $1 - local.get $2 - call $~lib/allocator/tlsf/Root#setJump local.get $3 + call $~lib/allocator/tlsf/Root#setJump + local.get $2 i32.const -4 i32.and - local.tee $3 + local.tee $2 i32.const 16 i32.ge_u - local.tee $2 - if - local.get $3 + if (result i32) + local.get $2 i32.const 1073741824 i32.lt_u - local.set $2 + else + i32.const 0 end - local.get $2 i32.eqz if i32.const 0 @@ -567,32 +564,32 @@ unreachable end local.get $0 - local.get $3 + local.get $2 i32.const 256 i32.lt_u if (result i32) - local.get $3 + local.get $2 i32.const 8 i32.div_u - local.set $3 + local.set $2 i32.const 0 else - local.get $3 - local.get $3 + local.get $2 + local.get $2 call $~lib/allocator/tlsf/fls - local.tee $2 + local.tee $3 i32.const 5 i32.sub i32.shr_u i32.const 32 i32.xor - local.set $3 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end - local.tee $2 - local.get $3 + local.tee $3 + local.get $2 call $~lib/allocator/tlsf/Root#getHead local.set $4 local.get $1 @@ -608,25 +605,25 @@ i32.store offset=4 end local.get $0 - local.get $2 local.get $3 + local.get $2 local.get $1 call $~lib/allocator/tlsf/Root#setHead local.get $0 local.get $0 i32.load i32.const 1 - local.get $2 + local.get $3 i32.shl i32.or i32.store local.get $0 - local.get $2 + local.get $3 local.get $0 - local.get $2 + local.get $3 call $~lib/allocator/tlsf/Root#getSLMap i32.const 1 - local.get $3 + local.get $2 i32.shl i32.or call $~lib/allocator/tlsf/Root#setSLMap @@ -772,16 +769,13 @@ (local $2 i32) (local $3 i32) local.get $1 + i32.const 1073741824 + i32.lt_u + i32.const 0 + local.get $1 i32.const 16 i32.ge_u - local.tee $2 - if - local.get $1 - i32.const 1073741824 - i32.lt_u - local.set $2 - end - local.get $2 + select i32.eqz if i32.const 0 @@ -795,8 +789,6 @@ i32.const 256 i32.lt_u if (result i32) - i32.const 0 - local.set $2 local.get $1 i32.const 8 i32.div_u @@ -885,7 +877,7 @@ (local $4 i32) local.get $1 i32.load - local.tee $4 + local.tee $3 i32.const 1 i32.and i32.eqz @@ -898,16 +890,13 @@ unreachable end local.get $2 + i32.const 1073741824 + i32.lt_u + i32.const 0 + local.get $2 i32.const 16 i32.ge_u - local.tee $3 - if - local.get $2 - i32.const 1073741824 - i32.lt_u - local.set $3 - end - local.get $3 + select i32.eqz if i32.const 0 @@ -931,17 +920,17 @@ local.get $0 local.get $1 call $~lib/allocator/tlsf/Root#remove - local.get $4 + local.get $3 i32.const -4 i32.and local.get $2 i32.sub - local.tee $3 + local.tee $4 i32.const 24 i32.ge_u if local.get $1 - local.get $4 + local.get $3 i32.const 2 i32.and local.get $2 @@ -953,7 +942,7 @@ local.get $2 i32.add local.tee $2 - local.get $3 + local.get $4 i32.const 8 i32.sub i32.const 1 @@ -964,7 +953,7 @@ call $~lib/allocator/tlsf/Root#insert else local.get $1 - local.get $4 + local.get $3 i32.const -2 i32.and i32.store @@ -1001,18 +990,17 @@ if i32.const 1 current_memory - local.tee $1 - i32.gt_s local.tee $2 + i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $2 i32.sub grow_memory i32.const 0 i32.lt_s else - local.get $2 + i32.const 0 end if unreachable @@ -1027,8 +1015,6 @@ i32.const 272 i32.const 0 i32.store - i32.const 0 - local.set $1 loop $repeat|0 local.get $1 i32.const 22 @@ -1782,7 +1768,6 @@ (func $start:std/runtime (; 24 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - (local $2 i32) loop $repeat|0 local.get $0 i32.const 9000 @@ -1797,19 +1782,14 @@ i32.sub i32.shl local.tee $1 + local.get $1 + i32.const 1 + i32.sub + i32.and + i32.eqz i32.const 0 - i32.ne - local.tee $2 - if (result i32) - local.get $1 - i32.const 1 - i32.sub - local.get $1 - i32.and - i32.eqz - else - local.get $2 - end + local.get $1 + select if local.get $0 i32.const 1 diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index bfe746e6b8..436f88bd22 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -70,11 +70,9 @@ i32.shl ) (func $std/runtime/isPowerOf2 (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.const 0 i32.ne - local.tee $1 if (result i32) local.get $0 local.get $0 @@ -84,7 +82,7 @@ i32.const 0 i32.eq else - local.get $1 + i32.const 0 end ) (func $~lib/allocator/tlsf/Root#set:tailRef (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) @@ -300,13 +298,12 @@ local.get $3 global.get $~lib/allocator/tlsf/Block.MIN_SIZE i32.ge_u - local.tee $4 if (result i32) local.get $3 global.get $~lib/allocator/tlsf/Block.MAX_SIZE i32.lt_u else - local.get $4 + i32.const 0 end i32.eqz if @@ -322,17 +319,17 @@ i32.lt_u if i32.const 0 - local.set $5 + local.set $4 local.get $3 i32.const 8 i32.div_u - local.set $6 + local.set $5 else local.get $3 call $~lib/allocator/tlsf/fls - local.set $5 + local.set $4 local.get $3 - local.get $5 + local.get $4 global.get $~lib/allocator/tlsf/SL_BITS i32.sub i32.shr_u @@ -340,70 +337,70 @@ global.get $~lib/allocator/tlsf/SL_BITS i32.shl i32.xor - local.set $6 - local.get $5 + local.set $5 + local.get $4 global.get $~lib/allocator/tlsf/SB_BITS i32.const 1 i32.sub i32.sub - local.set $5 + local.set $4 end local.get $1 i32.load offset=4 - local.set $7 + local.set $6 local.get $1 i32.load offset=8 - local.set $8 - local.get $7 + local.set $7 + local.get $6 if + local.get $6 local.get $7 - local.get $8 i32.store offset=8 end - local.get $8 + local.get $7 if - local.get $8 local.get $7 + local.get $6 i32.store offset=4 end local.get $1 local.get $0 + local.get $4 local.get $5 - local.get $6 call $~lib/allocator/tlsf/Root#getHead i32.eq if local.get $0 + local.get $4 local.get $5 - local.get $6 - local.get $8 + local.get $7 call $~lib/allocator/tlsf/Root#setHead - local.get $8 + local.get $7 i32.eqz if local.get $0 - local.get $5 + local.get $4 call $~lib/allocator/tlsf/Root#getSLMap - local.set $4 + local.set $8 local.get $0 - local.get $5 local.get $4 + local.get $8 i32.const 1 - local.get $6 + local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $4 + local.tee $8 call $~lib/allocator/tlsf/Root#setSLMap - local.get $4 + local.get $8 i32.eqz if local.get $0 local.get $0 i32.load i32.const 1 - local.get $5 + local.get $4 i32.shl i32.const -1 i32.xor @@ -535,13 +532,12 @@ local.tee $3 global.get $~lib/allocator/tlsf/Block.MIN_SIZE i32.ge_u - local.tee $4 if (result i32) local.get $3 global.get $~lib/allocator/tlsf/Block.MAX_SIZE i32.lt_u else - local.get $4 + i32.const 0 end i32.eqz if @@ -668,13 +664,12 @@ local.get $3 global.get $~lib/allocator/tlsf/Block.MIN_SIZE i32.ge_u - local.tee $7 if (result i32) local.get $3 global.get $~lib/allocator/tlsf/Block.MAX_SIZE i32.lt_u else - local.get $7 + i32.const 0 end i32.eqz if @@ -952,13 +947,12 @@ local.get $1 global.get $~lib/allocator/tlsf/Block.MIN_SIZE i32.ge_u - local.tee $2 if (result i32) local.get $1 global.get $~lib/allocator/tlsf/Block.MAX_SIZE i32.lt_u else - local.get $2 + i32.const 0 end i32.eqz if @@ -974,17 +968,17 @@ i32.lt_u if i32.const 0 - local.set $3 + local.set $2 local.get $1 i32.const 8 i32.div_u - local.set $4 + local.set $3 else local.get $1 call $~lib/allocator/tlsf/fls - local.set $3 + local.set $2 local.get $1 - local.get $3 + local.get $2 global.get $~lib/allocator/tlsf/SL_BITS i32.sub i32.shr_u @@ -992,43 +986,43 @@ global.get $~lib/allocator/tlsf/SL_BITS i32.shl i32.xor - local.set $4 - local.get $3 + local.set $3 + local.get $2 global.get $~lib/allocator/tlsf/SB_BITS i32.const 1 i32.sub i32.sub - local.set $3 - local.get $4 + local.set $2 + local.get $3 global.get $~lib/allocator/tlsf/SL_SIZE i32.const 1 i32.sub i32.lt_u if - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 else - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 i32.const 0 - local.set $4 + local.set $3 end end local.get $0 - local.get $3 + local.get $2 call $~lib/allocator/tlsf/Root#getSLMap i32.const 0 i32.const -1 i32.xor - local.get $4 + local.get $3 i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -1036,23 +1030,23 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $2 i32.const 1 i32.add i32.shl i32.and - local.set $2 - local.get $2 + local.set $6 + local.get $6 i32.eqz if i32.const 0 - local.set $6 + local.set $5 else - local.get $2 + local.get $6 call $~lib/allocator/tlsf/ffs - local.set $3 + local.set $2 local.get $0 - local.get $3 + local.get $2 call $~lib/allocator/tlsf/Root#getSLMap local.tee $7 if (result i32) @@ -1065,23 +1059,23 @@ call $~lib/builtins/abort unreachable end - local.set $5 + local.set $4 local.get $0 - local.get $3 - local.get $5 + local.get $2 + local.get $4 call $~lib/allocator/tlsf/ffs call $~lib/allocator/tlsf/Root#getHead - local.set $6 + local.set $5 end else local.get $0 - local.get $3 - local.get $5 + local.get $2 + local.get $4 call $~lib/allocator/tlsf/ffs call $~lib/allocator/tlsf/Root#getHead - local.set $6 + local.set $5 end - local.get $6 + local.get $5 ) (func $~lib/allocator/tlsf/Root#use (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -1105,13 +1099,12 @@ local.get $2 global.get $~lib/allocator/tlsf/Block.MIN_SIZE i32.ge_u - local.tee $4 if (result i32) local.get $2 global.get $~lib/allocator/tlsf/Block.MAX_SIZE i32.lt_u else - local.get $4 + i32.const 0 end i32.eqz if @@ -1145,8 +1138,8 @@ i32.and local.get $2 i32.sub - local.set $5 - local.get $5 + local.set $4 + local.get $4 global.get $~lib/allocator/tlsf/Block.INFO global.get $~lib/allocator/tlsf/Block.MIN_SIZE i32.add @@ -1164,16 +1157,16 @@ i32.add local.get $2 i32.add - local.set $4 - local.get $4 + local.set $5 local.get $5 + local.get $4 global.get $~lib/allocator/tlsf/Block.INFO i32.sub global.get $~lib/allocator/tlsf/FREE i32.or i32.store local.get $0 - local.get $4 + local.get $5 call $~lib/allocator/tlsf/Root#insert else local.get $1 @@ -1185,7 +1178,7 @@ i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $4 + local.tee $5 i32.eqz if (result i32) i32.const 0 @@ -1195,11 +1188,11 @@ call $~lib/builtins/abort unreachable else - local.get $4 + local.get $5 end - local.set $4 - local.get $4 - local.get $4 + local.set $5 + local.get $5 + local.get $5 i32.load global.get $~lib/allocator/tlsf/LEFT_FREE i32.const -1 @@ -1249,7 +1242,6 @@ local.get $4 local.get $3 i32.gt_s - local.tee $5 if (result i32) local.get $4 local.get $3 @@ -1258,7 +1250,7 @@ i32.const 0 i32.lt_s else - local.get $5 + i32.const 0 end if unreachable diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index bf17eb5ce2..8194d76daf 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -469,35 +469,33 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=4 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 i32.load8_u local.get $1 i32.const 255 i32.and i32.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=4 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end @@ -764,8 +762,7 @@ i32.gt_u select i32.ge_u - local.tee $1 - if + if (result i32) local.get $0 i32.load offset=20 local.get $0 @@ -775,9 +772,9 @@ f64.mul i32.trunc_f64_s i32.lt_s - local.set $1 + else + i32.const 0 end - local.get $1 if local.get $0 local.get $2 @@ -1312,8 +1309,7 @@ i32.gt_u select i32.ge_u - local.tee $1 - if + if (result i32) local.get $0 i32.load offset=20 local.get $0 @@ -1323,9 +1319,9 @@ f64.mul i32.trunc_f64_s i32.lt_s - local.set $1 + else + i32.const 0 end - local.get $1 if local.get $0 local.get $2 @@ -1616,35 +1612,33 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=4 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 i32.load16_u local.get $1 i32.const 65535 i32.and i32.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=4 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end @@ -1947,8 +1941,7 @@ i32.gt_u select i32.ge_u - local.tee $1 - if + if (result i32) local.get $0 i32.load offset=20 local.get $0 @@ -1958,9 +1951,9 @@ f64.mul i32.trunc_f64_s i32.lt_s - local.set $1 + else + i32.const 0 end - local.get $1 if local.get $0 local.get $2 @@ -2531,8 +2524,7 @@ i32.gt_u select i32.ge_u - local.tee $1 - if + if (result i32) local.get $0 i32.load offset=20 local.get $0 @@ -2542,9 +2534,9 @@ f64.mul i32.trunc_f64_s i32.lt_s - local.set $1 + else + i32.const 0 end - local.get $1 if local.get $0 local.get $2 @@ -2866,33 +2858,31 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=4 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 i32.load local.get $1 i32.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=4 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end @@ -3133,7 +3123,6 @@ i32.gt_u select i32.ge_u - local.tee $1 if (result i32) local.get $0 i32.load offset=20 @@ -3145,7 +3134,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $1 + i32.const 0 end if local.get $0 @@ -3811,33 +3800,31 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 i64.load local.get $1 i64.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=8 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end @@ -4079,7 +4066,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -4091,7 +4077,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -4656,33 +4642,31 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=4 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 f32.load local.get $1 f32.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=4 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end @@ -4928,7 +4912,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -4940,7 +4923,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -5232,33 +5215,31 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 f64.load local.get $1 f64.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=8 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end @@ -5504,7 +5485,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -5516,7 +5496,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -5781,7 +5761,7 @@ i32.load i32.le_u else - local.get $0 + i32.const 0 end if loop $continue|0 @@ -5805,19 +5785,15 @@ i32.const 0 ) (func $~lib/runtime/runtime.flags (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if + if (result i32) local.get $0 i32.const 160 i32.load i32.gt_u - local.set $1 + else + i32.const 1 end - local.get $1 if (result i32) unreachable else @@ -5853,15 +5829,13 @@ (local $4 i32) local.get $0 local.tee $2 - i32.eqz - local.tee $0 if (result i32) - local.get $0 - else local.get $2 i32.const 160 i32.load i32.gt_u + else + i32.const 1 end if (result i32) unreachable diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index a650f319a4..02b1cb552b 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -603,7 +603,6 @@ ) (func $~lib/set/Set#find (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -625,7 +624,6 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load8_s @@ -636,7 +634,7 @@ i32.shr_s i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -1007,7 +1005,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -1019,7 +1016,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -1416,7 +1413,6 @@ ) (func $~lib/set/Set#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -1438,7 +1434,6 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load8_u @@ -1447,7 +1442,7 @@ i32.and i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -1812,7 +1807,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -1824,7 +1818,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -2243,7 +2237,6 @@ ) (func $~lib/set/Set#find (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -2265,7 +2258,6 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load16_s @@ -2276,7 +2268,7 @@ i32.shr_s i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -2647,7 +2639,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -2659,7 +2650,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -3056,7 +3047,6 @@ ) (func $~lib/set/Set#find (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -3078,7 +3068,6 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load16_u @@ -3087,7 +3076,7 @@ i32.and i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -3452,7 +3441,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -3464,7 +3452,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -3903,7 +3891,6 @@ ) (func $~lib/set/Set#find (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -3925,14 +3912,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load local.get $1 i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -4291,7 +4277,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -4303,7 +4288,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -4700,7 +4685,6 @@ ) (func $~lib/set/Set#find (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -4722,14 +4706,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load local.get $1 i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -5088,7 +5071,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -5100,7 +5082,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -5585,7 +5567,6 @@ ) (func $~lib/set/Set#find (; 71 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -5607,14 +5588,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i64.load local.get $1 i64.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -5976,7 +5956,6 @@ i32.gt_u select i32.ge_u - local.tee $5 if (result i32) local.get $0 i32.load offset=20 @@ -5988,7 +5967,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $5 + i32.const 0 end if local.get $0 @@ -6385,7 +6364,6 @@ ) (func $~lib/set/Set#find (; 80 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -6407,14 +6385,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i64.load local.get $1 i64.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -6776,7 +6753,6 @@ i32.gt_u select i32.ge_u - local.tee $5 if (result i32) local.get $0 i32.load offset=20 @@ -6788,7 +6764,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $5 + i32.const 0 end if local.get $0 @@ -7185,7 +7161,6 @@ ) (func $~lib/set/Set#find (; 89 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -7207,14 +7182,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 f32.load local.get $1 f32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -7580,7 +7554,6 @@ i32.gt_u select i32.ge_u - local.tee $5 if (result i32) local.get $0 i32.load offset=20 @@ -7592,7 +7565,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $5 + i32.const 0 end if local.get $0 @@ -7989,7 +7962,6 @@ ) (func $~lib/set/Set#find (; 98 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -8011,14 +7983,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 f64.load local.get $1 f64.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -8384,7 +8355,6 @@ i32.gt_u select i32.ge_u - local.tee $5 if (result i32) local.get $0 i32.load offset=20 @@ -8396,7 +8366,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $5 + i32.const 0 end if local.get $0 @@ -8727,7 +8697,7 @@ i32.load i32.le_u else - local.get $2 + i32.const 0 end if loop $continue|0 @@ -8752,14 +8722,12 @@ ) (func $~lib/runtime/runtime.flags (; 107 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/runtime/RTTI_BASE local.set $1 local.get $0 i32.eqz - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 local.get $1 diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index a8e8b03ae4..8c54411ad7 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -1030,7 +1030,7 @@ i32.load i32.le_u else - local.get $0 + i32.const 0 end if loop $continue|0 @@ -1054,19 +1054,15 @@ i32.const 0 ) (func $~lib/runtime/runtime.flags (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if + if (result i32) local.get $0 i32.const 456 i32.load i32.gt_u - local.set $1 + else + i32.const 1 end - local.get $1 if (result i32) unreachable else @@ -1157,15 +1153,13 @@ (local $3 i32) (local $4 i32) local.get $0 - i32.eqz - local.tee $2 if (result i32) - local.get $2 - else local.get $0 i32.const 456 i32.load i32.gt_u + else + i32.const 1 end if (result i32) unreachable diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 420582c1a5..be3f14d951 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -1305,7 +1305,7 @@ i32.load i32.le_u else - local.get $2 + i32.const 0 end if loop $continue|0 @@ -1330,14 +1330,12 @@ ) (func $~lib/runtime/runtime.flags (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/runtime/RTTI_BASE local.set $1 local.get $0 i32.eqz - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 local.get $1 diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index c2c17d771b..f7a404ca08 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -56,10 +56,10 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 + local.set $3 loop $continue|0 local.get $2 - local.get $4 + local.get $3 i32.lt_u if local.get $2 @@ -68,7 +68,7 @@ local.get $0 i32.add i32.load16_u - local.tee $3 + local.tee $4 i32.const 128 i32.lt_u if (result i32) @@ -80,7 +80,7 @@ i32.const 1 i32.add else - local.get $3 + local.get $4 i32.const 2048 i32.lt_u if (result i32) @@ -92,23 +92,18 @@ i32.const 1 i32.add else - block (result i32) - local.get $3 - i32.const 64512 - i32.and - i32.const 55296 - i32.eq - local.tee $3 - if - local.get $2 - i32.const 1 - i32.add - local.get $4 - i32.lt_u - local.set $3 - end - local.get $3 - end + local.get $2 + i32.const 1 + i32.add + local.get $3 + i32.lt_u + i32.const 0 + local.get $4 + i32.const 64512 + i32.and + i32.const 55296 + i32.eq + select if (result i32) local.get $2 i32.const 1 @@ -123,7 +118,7 @@ i32.const 56320 i32.eq else - local.get $3 + i32.const 0 end if (result i32) local.get $1 @@ -230,10 +225,10 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $7 + local.set $6 loop $continue|0 local.get $4 - local.get $7 + local.get $6 i32.lt_u if local.get $4 @@ -284,21 +279,18 @@ local.get $5 i32.add local.set $3 + local.get $4 + i32.const 1 + i32.add + local.get $6 + i32.lt_u + i32.const 0 local.get $1 i32.const 64512 i32.and i32.const 55296 i32.eq - local.tee $6 - if (result i32) - local.get $4 - i32.const 1 - i32.add - local.get $7 - i32.lt_u - else - local.get $6 - end + select if local.get $4 i32.const 1 @@ -308,7 +300,7 @@ local.get $0 i32.add i32.load16_u - local.tee $6 + local.tee $7 i32.const 64512 i32.and i32.const 56320 @@ -322,7 +314,7 @@ i32.shl i32.const 65536 i32.add - local.get $6 + local.get $7 i32.const 1023 i32.and i32.add @@ -663,35 +655,32 @@ i32.lt_u if local.get $2 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $2 local.get $0 - local.get $3 + local.get $4 i32.add i32.load8_u - local.tee $4 + local.tee $3 i32.const 128 i32.lt_u if local.get $5 local.get $6 i32.add - local.get $4 + local.get $3 i32.store16 else - local.get $4 + local.get $3 + i32.const 224 + i32.lt_u + i32.const 0 + local.get $3 i32.const 191 i32.gt_u - local.tee $3 - if - local.get $4 - i32.const 224 - i32.lt_u - local.set $3 - end - local.get $3 + select if local.get $2 i32.const 1 @@ -707,7 +696,7 @@ unreachable end local.get $2 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $2 @@ -715,12 +704,12 @@ local.get $6 i32.add local.get $0 - local.get $3 + local.get $4 i32.add i32.load8_u i32.const 63 i32.and - local.get $4 + local.get $3 i32.const 31 i32.and i32.const 6 @@ -728,17 +717,14 @@ i32.or i32.store16 else - local.get $4 + local.get $3 + i32.const 365 + i32.lt_u + i32.const 0 + local.get $3 i32.const 239 i32.gt_u - local.tee $3 - if - local.get $4 - i32.const 365 - i32.lt_u - local.set $3 - end - local.get $3 + select if local.get $2 i32.const 3 @@ -753,7 +739,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 7 i32.and i32.const 18 @@ -779,11 +765,11 @@ i32.const 6 i32.shl i32.or - local.set $3 + local.set $4 local.get $2 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $2 @@ -791,16 +777,16 @@ local.get $6 i32.add local.get $0 - local.get $4 + local.get $3 i32.add i32.load8_u i32.const 63 i32.and - local.get $3 + local.get $4 i32.or i32.const 65536 i32.sub - local.tee $3 + local.tee $4 i32.const 10 i32.shr_u i32.const 55296 @@ -812,7 +798,7 @@ i32.add local.tee $5 i32.add - local.get $3 + local.get $4 i32.const 1023 i32.and i32.const 56320 @@ -832,7 +818,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 15 i32.and i32.const 12 @@ -846,11 +832,11 @@ i32.const 6 i32.shl i32.or - local.set $3 + local.set $4 local.get $2 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $2 @@ -858,12 +844,12 @@ local.get $6 i32.add local.get $0 - local.get $4 + local.get $3 i32.add i32.load8_u i32.const 63 i32.and - local.get $3 + local.get $4 i32.or i32.store16 end @@ -910,7 +896,7 @@ local.tee $3 i32.eqz else - local.get $2 + i32.const 0 end if local.get $2 @@ -939,15 +925,11 @@ i32.const 1 return end - local.get $0 + local.get $1 i32.eqz - local.tee $2 - if (result i32) - local.get $2 - else - local.get $1 - i32.eqz - end + i32.const 1 + local.get $0 + select if i32.const 0 return @@ -1233,7 +1215,7 @@ i32.load i32.le_u else - local.get $0 + i32.const 0 end if loop $continue|0 @@ -1257,19 +1239,15 @@ i32.const 0 ) (func $~lib/runtime/runtime.flags (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if + if (result i32) local.get $0 i32.const 360 i32.load i32.gt_u - local.set $1 + else + i32.const 1 end - local.get $1 if (result i32) unreachable else @@ -1304,15 +1282,13 @@ (local $3 i32) (local $4 i32) local.get $0 - i32.eqz - local.tee $2 if (result i32) - local.get $2 - else local.get $0 i32.const 360 i32.load i32.gt_u + else + i32.const 1 end if (result i32) unreachable diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index dc5492f8ae..2ae5f61b86 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -55,7 +55,6 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) i32.const 1 local.set $1 i32.const 0 @@ -108,7 +107,6 @@ i32.and i32.const 55296 i32.eq - local.tee $5 if (result i32) local.get $2 i32.const 1 @@ -116,9 +114,8 @@ local.get $3 i32.lt_u else - local.get $5 + i32.const 0 end - local.tee $5 if (result i32) local.get $0 local.get $2 @@ -133,7 +130,7 @@ i32.const 56320 i32.eq else - local.get $5 + i32.const 0 end if local.get $1 @@ -338,7 +335,6 @@ i32.and i32.const 55296 i32.eq - local.tee $7 if (result i32) local.get $2 i32.const 1 @@ -346,7 +342,7 @@ local.get $3 i32.lt_u else - local.get $7 + i32.const 0 end if local.get $0 @@ -803,13 +799,12 @@ local.get $5 i32.const 191 i32.gt_u - local.tee $6 if (result i32) local.get $5 i32.const 224 i32.lt_u else - local.get $6 + i32.const 0 end if local.get $2 @@ -857,13 +852,12 @@ local.get $5 i32.const 239 i32.gt_u - local.tee $6 if (result i32) local.get $5 i32.const 365 i32.lt_u else - local.get $6 + i32.const 0 end if local.get $2 @@ -1081,7 +1075,7 @@ local.tee $5 i32.eqz else - local.get $4 + i32.const 0 end if block @@ -1106,7 +1100,6 @@ ) (func $~lib/string/String.__eq (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 i32.eq @@ -1117,9 +1110,8 @@ local.get $0 i32.const 0 i32.eq - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $1 i32.const 0 @@ -1131,8 +1123,8 @@ end local.get $0 call $~lib/string/String#get:length - local.set $3 - local.get $3 + local.set $2 + local.get $2 local.get $1 call $~lib/string/String#get:length i32.ne @@ -1144,7 +1136,7 @@ i32.const 0 local.get $1 i32.const 0 - local.get $3 + local.get $2 call $~lib/util/string/compareImpl i32.eqz ) @@ -1432,7 +1424,7 @@ i32.load i32.le_u else - local.get $2 + i32.const 0 end if loop $continue|0 @@ -1457,14 +1449,12 @@ ) (func $~lib/runtime/runtime.flags (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/runtime/RTTI_BASE local.set $1 local.get $0 i32.eqz - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 local.get $1 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index c81d1902bc..203a3b5620 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -493,33 +493,35 @@ i32.shl local.get $0 i32.add + local.set $0 + local.get $2 local.set $1 loop $continue|0 local.get $3 if (result i32) - local.get $1 + local.get $0 i32.load16_u - local.get $2 + local.get $1 i32.load16_u i32.sub local.tee $4 i32.eqz else - local.get $3 + i32.const 0 end if local.get $3 i32.const 1 i32.sub local.set $3 - local.get $1 + local.get $0 i32.const 2 i32.add - local.set $1 - local.get $2 + local.set $0 + local.get $1 i32.const 2 i32.add - local.set $2 + local.set $1 br $continue|0 end end @@ -534,15 +536,11 @@ i32.const 1 return end - local.get $0 + local.get $1 i32.eqz - local.tee $2 - if (result i32) - local.get $2 - else - local.get $1 - i32.eqz - end + i32.const 1 + local.get $0 + select if i32.const 0 return @@ -1041,9 +1039,8 @@ i32.shl local.tee $5 i32.lt_u - local.tee $1 if (result i32) - local.get $1 + i32.const 1 else local.get $3 i32.eqz @@ -1125,7 +1122,7 @@ local.get $1 i32.const 1 i32.shl - local.tee $5 + local.tee $4 local.get $0 i32.const 16 i32.sub @@ -1134,11 +1131,10 @@ i32.shr_u i32.const 1 i32.shl - local.tee $4 - i32.lt_u local.tee $1 + i32.lt_u if (result i32) - local.get $1 + i32.const 1 else local.get $3 i32.eqz @@ -1147,23 +1143,23 @@ local.get $0 return end - local.get $5 + local.get $4 call $~lib/util/runtime/allocate - local.tee $1 + local.tee $5 local.get $0 - local.get $4 + local.get $1 call $~lib/memory/memory.copy - local.get $5 local.get $4 + local.get $1 i32.sub local.tee $0 local.get $3 i32.gt_u if local.get $1 - local.get $4 + local.get $5 i32.add - local.tee $4 + local.tee $1 local.get $2 local.get $3 local.get $0 @@ -1171,11 +1167,11 @@ i32.sub local.get $3 i32.div_u - local.tee $5 + local.tee $4 call $~lib/memory/memory.repeat - local.get $4 + local.get $1 local.get $3 - local.get $5 + local.get $4 i32.mul local.tee $3 i32.add @@ -1186,13 +1182,13 @@ call $~lib/memory/memory.copy else local.get $1 - local.get $4 + local.get $5 i32.add local.get $2 local.get $0 call $~lib/memory/memory.copy end - local.get $1 + local.get $5 i32.const 16 call $~lib/util/runtime/register ) @@ -1283,9 +1279,8 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) - (local $6 f64) local.get $0 i32.const 16 i32.sub @@ -1343,18 +1338,15 @@ end f64.const 1 end - local.set $6 + local.set $5 + local.get $2 + i32.const 2 + i32.gt_s + i32.const 0 local.get $1 i32.const 48 i32.eq - local.tee $1 - if - local.get $2 - i32.const 2 - i32.gt_s - local.set $1 - end - local.get $1 + select if (result i32) block $break|0 (result i32) block $case6|0 @@ -1429,7 +1421,7 @@ else i32.const 10 end - local.set $4 + local.set $3 loop $continue|1 block $break|1 local.get $2 @@ -1441,68 +1433,61 @@ if local.get $0 i32.load16_u - local.tee $3 + local.tee $1 i32.const 48 i32.ge_s - local.tee $1 - if - local.get $3 + if (result i32) + local.get $1 i32.const 57 i32.le_s - local.set $1 + else + i32.const 0 end - local.get $1 if (result i32) - local.get $3 + local.get $1 i32.const 48 i32.sub else - local.get $3 + local.get $1 + i32.const 90 + i32.le_s + i32.const 0 + local.get $1 i32.const 65 i32.ge_s - local.tee $1 - if - local.get $3 - i32.const 90 - i32.le_s - local.set $1 - end - local.get $1 + select if (result i32) - local.get $3 + local.get $1 i32.const 55 i32.sub else - local.get $3 + local.get $1 + i32.const 122 + i32.le_s + i32.const 0 + local.get $1 i32.const 97 i32.ge_s - local.tee $1 - if - local.get $3 - i32.const 122 - i32.le_s - local.set $1 - end - local.get $1 + select i32.eqz br_if $break|1 - local.get $3 + local.get $1 i32.const 87 i32.sub end end local.tee $1 - local.get $4 + local.get $3 i32.ge_s br_if $break|1 - local.get $5 local.get $4 + local.get $3 f64.convert_i32_s f64.mul local.get $1 f64.convert_i32_s f64.add - local.set $5 + local.set $4 local.get $0 i32.const 2 i32.add @@ -1511,8 +1496,8 @@ end end end - local.get $6 local.get $5 + local.get $4 f64.mul ) (func $~lib/string/parseFloat (; 17 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) @@ -1521,7 +1506,6 @@ (local $3 f64) (local $4 f64) (local $5 f64) - (local $6 i32) local.get $0 i32.const 16 i32.sub @@ -1615,9 +1599,8 @@ local.tee $1 i32.const 69 i32.eq - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $1 i32.const 101 @@ -1751,26 +1734,17 @@ (func $~lib/string/String.__gt (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - block (result i32) - local.get $0 - local.get $1 - i32.eq - local.tee $2 - i32.eqz - if - local.get $0 - i32.eqz - local.set $2 - end - local.get $2 - i32.eqz - end - if (result i32) - local.get $1 - i32.eqz - else - local.get $2 - end + i32.const 1 + local.get $1 + i32.eqz + i32.const 1 + local.get $0 + i32.eqz + local.get $0 + local.get $1 + i32.eq + select + select if i32.const 0 return @@ -1816,26 +1790,17 @@ (func $~lib/string/String.__lt (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - block (result i32) - local.get $0 - local.get $1 - i32.eq - local.tee $2 - i32.eqz - if - local.get $0 - i32.eqz - local.set $2 - end - local.get $2 - i32.eqz - end - if (result i32) - local.get $1 - i32.eqz - else - local.get $2 - end + i32.const 1 + local.get $1 + i32.eqz + i32.const 1 + local.get $0 + i32.eqz + local.get $0 + local.get $1 + i32.eq + select + select if i32.const 0 return @@ -1909,15 +1874,14 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 + local.set $2 local.get $1 i32.const 0 i32.lt_s - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else - local.get $3 + local.get $2 i64.extend_i32_s local.get $1 i64.extend_i32_s @@ -1933,15 +1897,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.eqz - local.tee $2 - if (result i32) - local.get $2 - else - local.get $3 - i32.eqz - end + i32.const 1 + local.get $1 + select if i32.const 120 return @@ -1954,19 +1914,19 @@ return end local.get $1 - local.get $3 + local.get $2 i32.mul i32.const 1 i32.shl call $~lib/util/runtime/allocate - local.tee $2 + local.tee $3 local.get $0 - local.get $3 + local.get $2 i32.const 1 i32.shl local.get $1 call $~lib/memory/memory.repeat - local.get $2 + local.get $3 i32.const 16 call $~lib/util/runtime/register ) @@ -2602,11 +2562,6 @@ call $~lib/util/runtime/makeArray local.set $2 loop $continue|1 - local.get $1 - i32.eqz - if - unreachable - end local.get $0 local.get $1 local.get $4 @@ -3469,41 +3424,36 @@ i32.load16_u local.set $4 loop $continue|2 + local.get $5 + local.get $1 + i64.sub + local.get $3 + i64.ge_u + i32.const 0 local.get $1 local.get $9 i64.lt_u - local.tee $0 - if - local.get $5 + select + if (result i32) + i32.const 1 + local.get $9 local.get $1 i64.sub + local.get $1 local.get $3 - i64.ge_u - local.set $0 - end - local.get $0 - if + i64.add + local.get $9 + i64.sub + i64.gt_u local.get $1 local.get $3 i64.add local.get $9 i64.lt_u - local.tee $0 - i32.eqz - if - local.get $9 - local.get $1 - i64.sub - local.get $1 - local.get $3 - i64.add - local.get $9 - i64.sub - i64.gt_u - local.set $0 - end + select + else + i32.const 0 end - local.get $0 if local.get $4 i32.const 1 @@ -3601,41 +3551,36 @@ i32.load16_u local.set $4 loop $continue|4 + local.get $5 + local.get $1 + i64.sub + local.get $10 + i64.ge_u + i32.const 0 local.get $1 local.get $3 i64.lt_u - local.tee $0 - if - local.get $5 - local.get $1 - i64.sub + select + if (result i32) + i32.const 1 + local.get $3 + local.get $1 + i64.sub + local.get $1 local.get $10 - i64.ge_u - local.set $0 - end - local.get $0 - if + i64.add + local.get $3 + i64.sub + i64.gt_u local.get $1 local.get $10 i64.add local.get $3 i64.lt_u - local.tee $0 - i32.eqz - if - local.get $3 - local.get $1 - i64.sub - local.get $1 - local.get $10 - i64.add - local.get $3 - i64.sub - i64.gt_u - local.set $0 - end + select + else + i32.const 0 end - local.get $0 if local.get $4 i32.const 1 @@ -3656,7 +3601,6 @@ ) (func $~lib/util/number/prettify (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $2 i32.eqz if @@ -3678,14 +3622,13 @@ i32.add local.tee $3 i32.le_s - local.tee $4 - if + if (result i32) local.get $3 i32.const 21 i32.le_s - local.set $4 + else + i32.const 0 end - local.get $4 if (result i32) loop $repeat|0 block $break|0 @@ -3718,17 +3661,14 @@ i32.const 2 i32.add else + local.get $3 + i32.const 21 + i32.le_s + i32.const 0 local.get $3 i32.const 0 i32.gt_s - local.tee $4 - if - local.get $3 - i32.const 21 - i32.le_s - local.set $4 - end - local.get $4 + select if (result i32) local.get $3 i32.const 1 @@ -3752,22 +3692,19 @@ i32.const 1 i32.add else + local.get $3 + i32.const 0 + i32.le_s + i32.const 0 i32.const -6 local.get $3 i32.lt_s - local.tee $2 - if - local.get $3 - i32.const 0 - i32.le_s - local.set $2 - end - local.get $2 + select if (result i32) i32.const 2 local.get $3 i32.sub - local.tee $4 + local.tee $3 i32.const 1 i32.shl local.get $0 @@ -3785,7 +3722,7 @@ loop $repeat|1 block $break|1 local.get $2 - local.get $4 + local.get $3 i32.ge_s br_if $break|1 local.get $2 @@ -3803,7 +3740,7 @@ end end local.get $1 - local.get $4 + local.get $3 i32.add else local.get $1 @@ -3882,7 +3819,7 @@ local.tee $0 i32.const 0 i32.lt_s - local.tee $4 + local.tee $3 if i32.const 0 local.get $0 @@ -3900,7 +3837,7 @@ local.get $2 i32.const 45 i32.const 43 - local.get $4 + local.get $3 select i32.store16 local.get $0 @@ -4204,7 +4141,6 @@ (func $~lib/string/String#substring (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 i32.eqz if @@ -4240,34 +4176,34 @@ local.get $2 i32.lt_s select - local.tee $1 + local.tee $2 local.get $3 - local.get $1 + local.get $2 i32.gt_s select i32.const 1 i32.shl - local.tee $4 + local.tee $1 local.get $3 - local.get $1 + local.get $2 local.get $3 - local.get $1 + local.get $2 i32.lt_s select i32.const 1 i32.shl - local.tee $2 - i32.sub local.tee $3 + i32.sub + local.tee $2 i32.eqz if i32.const 120 return end - local.get $2 - i32.eqz - local.tee $1 - if + local.get $3 + if (result i32) + i32.const 0 + else local.get $0 i32.const 16 i32.sub @@ -4276,22 +4212,20 @@ i32.shr_u i32.const 1 i32.shl - local.get $4 + local.get $1 i32.eq - local.set $1 end - local.get $1 if local.get $0 return end - local.get $3 + local.get $2 call $~lib/util/runtime/allocate local.tee $1 local.get $0 - local.get $2 - i32.add local.get $3 + i32.add + local.get $2 call $~lib/memory/memory.copy local.get $1 i32.const 16 @@ -5912,16 +5846,15 @@ i32.load offset=12 i32.const 1 i32.eq - local.tee $0 - if + if (result i32) global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get i32.const 120 call $~lib/string/String.__eq - local.set $0 + else + i32.const 0 end - local.get $0 i32.eqz if i32.const 0 @@ -5955,16 +5888,15 @@ i32.load offset=12 i32.const 1 i32.eq - local.tee $0 - if + if (result i32) global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get i32.const 120 call $~lib/string/String.__eq - local.set $0 + else + i32.const 0 end - local.get $0 i32.eqz if i32.const 0 @@ -5983,16 +5915,15 @@ i32.load offset=12 i32.const 1 i32.eq - local.tee $0 - if + if (result i32) global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get i32.const 1968 call $~lib/string/String.__eq - local.set $0 + else + i32.const 0 end - local.get $0 i32.eqz if i32.const 0 @@ -6007,42 +5938,37 @@ i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa - block (result i32) - block (result i32) - global.get $std/string/sa - i32.load offset=12 - i32.const 3 - i32.eq - local.tee $0 - if - global.get $std/string/sa - i32.const 0 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 160 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - global.get $std/string/sa - i32.const 1 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 1152 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 + global.get $std/string/sa + i32.load offset=12 + i32.const 3 + i32.eq + if (result i32) + global.get $std/string/sa + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 160 + call $~lib/string/String.__eq + else + i32.const 0 end - if + if (result i32) + global.get $std/string/sa + i32.const 1 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 1152 + call $~lib/string/String.__eq + else + i32.const 0 + end + if (result i32) global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get i32.const 2024 call $~lib/string/String.__eq - local.set $0 + else + i32.const 0 end - local.get $0 i32.eqz if i32.const 0 @@ -6057,42 +5983,37 @@ i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa - block (result i32) - block (result i32) - global.get $std/string/sa - i32.load offset=12 - i32.const 3 - i32.eq - local.tee $0 - if - global.get $std/string/sa - i32.const 0 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 160 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - global.get $std/string/sa - i32.const 1 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 1152 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 + global.get $std/string/sa + i32.load offset=12 + i32.const 3 + i32.eq + if (result i32) + global.get $std/string/sa + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 160 + call $~lib/string/String.__eq + else + i32.const 0 end - if + if (result i32) + global.get $std/string/sa + i32.const 1 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 1152 + call $~lib/string/String.__eq + else + i32.const 0 + end + if (result i32) global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get i32.const 2024 call $~lib/string/String.__eq - local.set $0 + else + i32.const 0 end - local.get $0 i32.eqz if i32.const 0 @@ -6107,114 +6028,100 @@ i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa - block (result i32) - block (result i32) - block (result i32) - global.get $std/string/sa - i32.load offset=12 - i32.const 4 - i32.eq - local.tee $0 - if - global.get $std/string/sa - i32.const 0 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 160 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - global.get $std/string/sa - i32.const 1 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 1152 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - global.get $std/string/sa - i32.const 2 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 120 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if + global.get $std/string/sa + i32.load offset=12 + i32.const 4 + i32.eq + if (result i32) global.get $std/string/sa - i32.const 3 + i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 2024 + i32.const 160 call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - i32.eqz - if + else i32.const 0 - i32.const 72 - i32.const 175 + end + if (result i32) + global.get $std/string/sa + i32.const 1 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 1152 + call $~lib/string/String.__eq + else i32.const 0 - call $~lib/builtins/abort - unreachable end - i32.const 2136 - i32.const 728 + if (result i32) + global.get $std/string/sa + i32.const 2 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 120 + call $~lib/string/String.__eq + else + i32.const 0 + end + if (result i32) + global.get $std/string/sa + i32.const 3 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 2024 + call $~lib/string/String.__eq + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 175 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 2136 + i32.const 728 i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa - block (result i32) - block (result i32) - block (result i32) - global.get $std/string/sa - i32.load offset=12 - i32.const 4 - i32.eq - local.tee $0 - if - global.get $std/string/sa - i32.const 0 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 120 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - global.get $std/string/sa - i32.const 1 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 160 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - global.get $std/string/sa - i32.const 2 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 1152 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 + global.get $std/string/sa + i32.load offset=12 + i32.const 4 + i32.eq + if (result i32) + global.get $std/string/sa + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 120 + call $~lib/string/String.__eq + else + i32.const 0 end - if + if (result i32) + global.get $std/string/sa + i32.const 1 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 160 + call $~lib/string/String.__eq + else + i32.const 0 + end + if (result i32) + global.get $std/string/sa + i32.const 2 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 1152 + call $~lib/string/String.__eq + else + i32.const 0 + end + if (result i32) global.get $std/string/sa i32.const 3 call $~lib/array/Array<~lib/string/String>#__get i32.const 2024 call $~lib/string/String.__eq - local.set $0 + else + i32.const 0 end - local.get $0 i32.eqz if i32.const 0 @@ -6229,53 +6136,46 @@ i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa - block (result i32) - block (result i32) - block (result i32) - global.get $std/string/sa - i32.load offset=12 - i32.const 4 - i32.eq - local.tee $0 - if - global.get $std/string/sa - i32.const 0 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 160 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - global.get $std/string/sa - i32.const 1 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 1152 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - global.get $std/string/sa - i32.const 2 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 2024 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 + global.get $std/string/sa + i32.load offset=12 + i32.const 4 + i32.eq + if (result i32) + global.get $std/string/sa + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 160 + call $~lib/string/String.__eq + else + i32.const 0 end - if + if (result i32) + global.get $std/string/sa + i32.const 1 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 1152 + call $~lib/string/String.__eq + else + i32.const 0 + end + if (result i32) + global.get $std/string/sa + i32.const 2 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 2024 + call $~lib/string/String.__eq + else + i32.const 0 + end + if (result i32) global.get $std/string/sa i32.const 3 call $~lib/array/Array<~lib/string/String>#__get i32.const 120 call $~lib/string/String.__eq - local.set $0 + else + i32.const 0 end - local.get $0 i32.eqz if i32.const 0 @@ -6290,42 +6190,37 @@ i32.const 2147483647 call $~lib/string/String#split global.set $std/string/sa - block (result i32) - block (result i32) - global.get $std/string/sa - i32.load offset=12 - i32.const 3 - i32.eq - local.tee $0 - if - global.get $std/string/sa - i32.const 0 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 160 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - global.get $std/string/sa - i32.const 1 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 1152 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 + global.get $std/string/sa + i32.load offset=12 + i32.const 3 + i32.eq + if (result i32) + global.get $std/string/sa + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 160 + call $~lib/string/String.__eq + else + i32.const 0 end - if + if (result i32) + global.get $std/string/sa + i32.const 1 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 1152 + call $~lib/string/String.__eq + else + i32.const 0 + end + if (result i32) global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get i32.const 2024 call $~lib/string/String.__eq - local.set $0 + else + i32.const 0 end - local.get $0 i32.eqz if i32.const 0 @@ -6359,16 +6254,15 @@ i32.load offset=12 i32.const 1 i32.eq - local.tee $0 - if + if (result i32) global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get i32.const 160 call $~lib/string/String.__eq - local.set $0 + else + i32.const 0 end - local.get $0 i32.eqz if i32.const 0 @@ -6387,16 +6281,15 @@ i32.load offset=12 i32.const 1 i32.eq - local.tee $0 - if + if (result i32) global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get i32.const 160 call $~lib/string/String.__eq - local.set $0 + else + i32.const 0 end - local.get $0 i32.eqz if i32.const 0 @@ -6411,42 +6304,37 @@ i32.const 4 call $~lib/string/String#split global.set $std/string/sa - block (result i32) - block (result i32) - global.get $std/string/sa - i32.load offset=12 - i32.const 3 - i32.eq - local.tee $0 - if - global.get $std/string/sa - i32.const 0 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 160 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - global.get $std/string/sa - i32.const 1 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 1152 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 + global.get $std/string/sa + i32.load offset=12 + i32.const 3 + i32.eq + if (result i32) + global.get $std/string/sa + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 160 + call $~lib/string/String.__eq + else + i32.const 0 end - if + if (result i32) + global.get $std/string/sa + i32.const 1 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 1152 + call $~lib/string/String.__eq + else + i32.const 0 + end + if (result i32) global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get i32.const 2024 call $~lib/string/String.__eq - local.set $0 + else + i32.const 0 end - local.get $0 i32.eqz if i32.const 0 @@ -6461,42 +6349,37 @@ i32.const -1 call $~lib/string/String#split global.set $std/string/sa - block (result i32) - block (result i32) - global.get $std/string/sa - i32.load offset=12 - i32.const 3 - i32.eq - local.tee $0 - if - global.get $std/string/sa - i32.const 0 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 160 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - global.get $std/string/sa - i32.const 1 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 1152 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 + global.get $std/string/sa + i32.load offset=12 + i32.const 3 + i32.eq + if (result i32) + global.get $std/string/sa + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 160 + call $~lib/string/String.__eq + else + i32.const 0 end - if + if (result i32) + global.get $std/string/sa + i32.const 1 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 1152 + call $~lib/string/String.__eq + else + i32.const 0 + end + if (result i32) global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get i32.const 2024 call $~lib/string/String.__eq - local.set $0 + else + i32.const 0 end - local.get $0 i32.eqz if i32.const 0 @@ -6511,42 +6394,37 @@ i32.const -1 call $~lib/string/String#split global.set $std/string/sa - block (result i32) - block (result i32) - global.get $std/string/sa - i32.load offset=12 - i32.const 3 - i32.eq - local.tee $0 - if - global.get $std/string/sa - i32.const 0 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 160 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - global.get $std/string/sa - i32.const 1 - call $~lib/array/Array<~lib/string/String>#__get - i32.const 1152 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 + global.get $std/string/sa + i32.load offset=12 + i32.const 3 + i32.eq + if (result i32) + global.get $std/string/sa + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 160 + call $~lib/string/String.__eq + else + i32.const 0 end - if + if (result i32) + global.get $std/string/sa + i32.const 1 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 1152 + call $~lib/string/String.__eq + else + i32.const 0 + end + if (result i32) global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get i32.const 2024 call $~lib/string/String.__eq - local.set $0 + else + i32.const 0 end - local.get $0 i32.eqz if i32.const 0 @@ -7755,7 +7633,7 @@ i32.load i32.le_u else - local.get $0 + i32.const 0 end if loop $continue|0 @@ -7779,19 +7657,15 @@ i32.const 0 ) (func $~lib/runtime/runtime.flags (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if + if (result i32) local.get $0 i32.const 6744 i32.load i32.gt_u - local.set $1 + else + i32.const 1 end - local.get $1 if (result i32) unreachable else @@ -7827,15 +7701,13 @@ (local $4 i32) local.get $0 local.tee $2 - i32.eqz - local.tee $0 if (result i32) - local.get $0 - else local.get $2 i32.const 6744 i32.load i32.gt_u + else + i32.const 1 end if (result i32) unreachable diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 940885c008..93d8323d34 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -245,13 +245,11 @@ i32.load16_u ) (func $~lib/string/String.__not (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 i32.const 0 i32.eq - local.tee $1 if (result i32) - local.get $1 + i32.const 1 else local.get $0 call $~lib/string/String#get:length @@ -459,7 +457,7 @@ local.tee $5 i32.eqz else - local.get $4 + i32.const 0 end if block @@ -484,7 +482,6 @@ ) (func $~lib/string/String.__eq (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 i32.eq @@ -495,9 +492,8 @@ local.get $0 i32.const 0 i32.eq - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $1 i32.const 0 @@ -509,8 +505,8 @@ end local.get $0 call $~lib/string/String#get:length - local.set $3 - local.get $3 + local.set $2 + local.get $2 local.get $1 call $~lib/string/String#get:length i32.ne @@ -522,7 +518,7 @@ i32.const 0 local.get $1 i32.const 0 - local.get $3 + local.get $2 call $~lib/util/string/compareImpl i32.eqz ) @@ -1093,9 +1089,8 @@ local.get $4 local.get $3 i32.lt_u - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $5 i32.eqz @@ -1107,52 +1102,52 @@ local.get $4 local.get $3 i32.sub - local.set $7 + local.set $6 local.get $4 call $~lib/util/runtime/allocate - local.set $8 - local.get $7 + local.set $7 + local.get $6 local.get $5 i32.gt_u if - local.get $7 + local.get $6 i32.const 2 i32.sub local.get $5 i32.div_u - local.set $6 - local.get $6 + local.set $8 + local.get $8 local.get $5 i32.mul local.set $9 - local.get $7 + local.get $6 local.get $9 i32.sub local.set $10 - local.get $8 + local.get $7 local.get $2 local.get $5 - local.get $6 - call $~lib/memory/memory.repeat local.get $8 + call $~lib/memory/memory.repeat + local.get $7 local.get $9 i32.add local.get $2 local.get $10 call $~lib/memory/memory.copy else - local.get $8 - local.get $2 local.get $7 + local.get $2 + local.get $6 call $~lib/memory/memory.copy end - local.get $8 local.get $7 + local.get $6 i32.add local.get $0 local.get $3 call $~lib/memory/memory.copy - local.get $8 + local.get $7 i32.const 16 call $~lib/util/runtime/register ) @@ -1194,9 +1189,8 @@ local.get $4 local.get $3 i32.lt_u - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $5 i32.eqz @@ -1208,40 +1202,40 @@ local.get $4 local.get $3 i32.sub - local.set $7 + local.set $6 local.get $4 call $~lib/util/runtime/allocate - local.set $8 - local.get $8 + local.set $7 + local.get $7 local.get $0 local.get $3 call $~lib/memory/memory.copy - local.get $7 + local.get $6 local.get $5 i32.gt_u if - local.get $7 + local.get $6 i32.const 2 i32.sub local.get $5 i32.div_u - local.set $6 - local.get $6 + local.set $8 + local.get $8 local.get $5 i32.mul local.set $9 - local.get $7 + local.get $6 local.get $9 i32.sub local.set $10 - local.get $8 + local.get $7 local.get $3 i32.add local.get $2 local.get $5 - local.get $6 - call $~lib/memory/memory.repeat local.get $8 + call $~lib/memory/memory.repeat + local.get $7 local.get $3 i32.add local.get $9 @@ -1250,14 +1244,14 @@ local.get $10 call $~lib/memory/memory.copy else - local.get $8 + local.get $7 local.get $3 i32.add local.get $2 - local.get $7 + local.get $6 call $~lib/memory/memory.copy end - local.get $8 + local.get $7 i32.const 16 call $~lib/util/runtime/register ) @@ -1428,13 +1422,12 @@ local.get $4 i32.const 48 i32.eq - local.tee $6 if (result i32) local.get $2 i32.const 2 i32.gt_s else - local.get $6 + i32.const 0 end if block $break|0 @@ -1538,9 +1531,8 @@ local.get $1 i32.const 2 i32.lt_s - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $1 i32.const 36 @@ -1571,13 +1563,12 @@ local.get $4 i32.const 48 i32.ge_s - local.tee $6 if (result i32) local.get $4 i32.const 57 i32.le_s else - local.get $6 + i32.const 0 end if local.get $4 @@ -1588,13 +1579,12 @@ local.get $4 i32.const 65 i32.ge_s - local.tee $6 if (result i32) local.get $4 i32.const 90 i32.le_s else - local.get $6 + i32.const 0 end if local.get $4 @@ -1607,13 +1597,12 @@ local.get $4 i32.const 97 i32.ge_s - local.tee $6 if (result i32) local.get $4 i32.const 122 i32.le_s else - local.get $6 + i32.const 0 end if local.get $4 @@ -1774,9 +1763,8 @@ local.get $3 i32.const 69 i32.eq - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $3 i32.const 101 @@ -1930,17 +1918,15 @@ local.get $0 local.get $1 i32.eq - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 i32.const 0 i32.eq end - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $1 i32.const 0 @@ -1952,17 +1938,17 @@ end local.get $0 call $~lib/string/String#get:length - local.set $3 + local.set $2 local.get $1 call $~lib/string/String#get:length - local.set $4 - local.get $3 + local.set $3 + local.get $2 i32.eqz if i32.const 0 return end - local.get $4 + local.get $3 i32.eqz if i32.const 1 @@ -1972,11 +1958,11 @@ i32.const 0 local.get $1 i32.const 0 + local.get $2 + local.tee $4 local.get $3 - local.tee $2 - local.get $4 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.lt_s select @@ -1992,17 +1978,15 @@ local.get $0 local.get $1 i32.eq - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 i32.const 0 i32.eq end - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $1 i32.const 0 @@ -2014,17 +1998,17 @@ end local.get $0 call $~lib/string/String#get:length - local.set $3 + local.set $2 local.get $1 call $~lib/string/String#get:length - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if i32.const 0 return end - local.get $3 + local.get $2 i32.eqz if i32.const 1 @@ -2034,11 +2018,11 @@ i32.const 0 local.get $1 i32.const 0 + local.get $2 + local.tee $4 local.get $3 - local.tee $2 - local.get $4 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.lt_s select @@ -2061,7 +2045,6 @@ (func $~lib/string/String#repeat (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 i32.const 0 i32.ne @@ -2080,9 +2063,8 @@ local.get $1 i32.const 0 i32.lt_s - local.tee $3 if (result i32) - local.get $3 + i32.const 1 else local.get $2 i64.extend_i32_s @@ -2105,9 +2087,8 @@ local.get $1 i32.const 0 i32.eq - local.tee $3 if (result i32) - local.get $3 + i32.const 1 else local.get $2 i32.eqz @@ -2129,15 +2110,15 @@ i32.const 1 i32.shl call $~lib/util/runtime/allocate - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $0 local.get $2 i32.const 1 i32.shl local.get $1 call $~lib/memory/memory.repeat - local.get $4 + local.get $3 i32.const 16 call $~lib/util/runtime/register ) @@ -3031,12 +3012,6 @@ loop $continue|1 local.get $0 local.get $1 - local.tee $3 - if (result i32) - local.get $3 - else - unreachable - end local.get $11 call $~lib/string/String#indexOf local.tee $10 @@ -3909,7 +3884,6 @@ (local $24 i64) (local $25 i32) (local $26 i32) - (local $27 i32) i32.const 0 local.get $4 i32.sub @@ -4234,7 +4208,6 @@ local.get $23 local.get $21 i64.lt_u - local.tee $27 if (result i32) local.get $24 local.get $23 @@ -4242,18 +4215,16 @@ local.get $22 i64.ge_u else - local.get $27 + i32.const 0 end - local.tee $27 if (result i32) local.get $23 local.get $22 i64.add local.get $21 i64.lt_u - local.tee $27 if (result i32) - local.get $27 + i32.const 1 else local.get $21 local.get $23 @@ -4266,7 +4237,7 @@ i64.gt_u end else - local.get $27 + i32.const 0 end if block @@ -4396,7 +4367,6 @@ local.get $23 local.get $21 i64.lt_u - local.tee $20 if (result i32) local.get $24 local.get $23 @@ -4404,18 +4374,16 @@ local.get $22 i64.ge_u else - local.get $20 + i32.const 0 end - local.tee $20 if (result i32) local.get $23 local.get $22 i64.add local.get $21 i64.lt_u - local.tee $20 if (result i32) - local.get $20 + i32.const 1 else local.get $21 local.get $23 @@ -4428,7 +4396,7 @@ i64.gt_u end else - local.get $20 + i32.const 0 end if block @@ -4495,13 +4463,12 @@ local.get $1 local.get $3 i32.le_s - local.tee $4 if (result i32) local.get $3 i32.const 21 i32.le_s else - local.get $4 + i32.const 0 end if block $break|0 @@ -4548,13 +4515,12 @@ local.get $3 i32.const 0 i32.gt_s - local.tee $4 if (result i32) local.get $3 i32.const 21 i32.le_s else - local.get $4 + i32.const 0 end if local.get $0 @@ -4588,13 +4554,12 @@ i32.const -6 local.get $3 i32.lt_s - local.tee $4 if (result i32) local.get $3 i32.const 0 i32.le_s else - local.get $4 + i32.const 0 end if i32.const 2 @@ -5320,7 +5285,6 @@ end local.get $8 i32.eqz - local.tee $4 if (result i32) local.get $9 local.get $0 @@ -5329,7 +5293,7 @@ i32.shl i32.eq else - local.get $4 + i32.const 0 end if local.get $0 @@ -7045,7 +7009,6 @@ call $~lib/array/Array<~lib/string/String>#get:length i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -7053,7 +7016,7 @@ i32.const 120 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -7091,7 +7054,6 @@ call $~lib/array/Array<~lib/string/String>#get:length i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -7099,7 +7061,7 @@ i32.const 120 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -7119,7 +7081,6 @@ call $~lib/array/Array<~lib/string/String>#get:length i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -7127,7 +7088,7 @@ i32.const 1968 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -7147,7 +7108,6 @@ call $~lib/array/Array<~lib/string/String>#get:length i32.const 3 i32.eq - local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -7155,9 +7115,8 @@ i32.const 160 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 1 @@ -7165,9 +7124,8 @@ i32.const 1152 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 2 @@ -7175,7 +7133,7 @@ i32.const 2024 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -7195,7 +7153,6 @@ call $~lib/array/Array<~lib/string/String>#get:length i32.const 3 i32.eq - local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -7203,9 +7160,8 @@ i32.const 160 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 1 @@ -7213,9 +7169,8 @@ i32.const 1152 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 2 @@ -7223,7 +7178,7 @@ i32.const 2024 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -7243,7 +7198,6 @@ call $~lib/array/Array<~lib/string/String>#get:length i32.const 4 i32.eq - local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -7251,9 +7205,8 @@ i32.const 160 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 1 @@ -7261,9 +7214,8 @@ i32.const 1152 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 2 @@ -7271,9 +7223,8 @@ i32.const 120 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 3 @@ -7281,7 +7232,7 @@ i32.const 2024 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -7301,7 +7252,6 @@ call $~lib/array/Array<~lib/string/String>#get:length i32.const 4 i32.eq - local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -7309,9 +7259,8 @@ i32.const 120 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 1 @@ -7319,9 +7268,8 @@ i32.const 160 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 2 @@ -7329,9 +7277,8 @@ i32.const 1152 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 3 @@ -7339,7 +7286,7 @@ i32.const 2024 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -7359,7 +7306,6 @@ call $~lib/array/Array<~lib/string/String>#get:length i32.const 4 i32.eq - local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -7367,9 +7313,8 @@ i32.const 160 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 1 @@ -7377,9 +7322,8 @@ i32.const 1152 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 2 @@ -7387,9 +7331,8 @@ i32.const 2024 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 3 @@ -7397,7 +7340,7 @@ i32.const 120 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -7417,7 +7360,6 @@ call $~lib/array/Array<~lib/string/String>#get:length i32.const 3 i32.eq - local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -7425,9 +7367,8 @@ i32.const 160 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 1 @@ -7435,9 +7376,8 @@ i32.const 1152 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 2 @@ -7445,7 +7385,7 @@ i32.const 2024 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -7483,7 +7423,6 @@ call $~lib/array/Array<~lib/string/String>#get:length i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -7491,7 +7430,7 @@ i32.const 160 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -7511,7 +7450,6 @@ call $~lib/array/Array<~lib/string/String>#get:length i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -7519,7 +7457,7 @@ i32.const 160 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -7539,7 +7477,6 @@ call $~lib/array/Array<~lib/string/String>#get:length i32.const 3 i32.eq - local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -7547,9 +7484,8 @@ i32.const 160 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 1 @@ -7557,9 +7493,8 @@ i32.const 1152 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 2 @@ -7567,7 +7502,7 @@ i32.const 2024 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -7587,7 +7522,6 @@ call $~lib/array/Array<~lib/string/String>#get:length i32.const 3 i32.eq - local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -7595,9 +7529,8 @@ i32.const 160 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 1 @@ -7605,9 +7538,8 @@ i32.const 1152 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 2 @@ -7615,7 +7547,7 @@ i32.const 2024 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -7635,7 +7567,6 @@ call $~lib/array/Array<~lib/string/String>#get:length i32.const 3 i32.eq - local.tee $0 if (result i32) global.get $std/string/sa i32.const 0 @@ -7643,9 +7574,8 @@ i32.const 160 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 1 @@ -7653,9 +7583,8 @@ i32.const 1152 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/string/sa i32.const 2 @@ -7663,7 +7592,7 @@ i32.const 2024 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -8883,7 +8812,7 @@ i32.load i32.le_u else - local.get $2 + i32.const 0 end if loop $continue|0 @@ -8908,14 +8837,12 @@ ) (func $~lib/runtime/runtime.flags (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/runtime/RTTI_BASE local.set $1 local.get $0 i32.eqz - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 local.get $1 diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index ebb11c3b2e..a9129fb90a 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -568,7 +568,7 @@ local.tee $3 i32.eqz else - local.get $2 + i32.const 0 end if local.get $2 @@ -597,15 +597,11 @@ i32.const 1 return end - local.get $0 + local.get $1 i32.eqz - local.tee $2 - if (result i32) - local.get $2 - else - local.get $1 - i32.eqz - end + i32.const 1 + local.get $0 + select if i32.const 0 return @@ -645,33 +641,31 @@ i32.shl i32.add i32.load - local.set $1 + local.set $0 loop $continue|0 - local.get $1 + local.get $0 if - local.get $1 + local.get $0 i32.load offset=8 i32.const 1 i32.and - i32.eqz - local.tee $0 if (result i32) - local.get $1 + i32.const 0 + else + local.get $0 i32.load i32.const 24 call $~lib/string/String.__eq - else - local.get $0 end if - local.get $1 + local.get $0 return end - local.get $1 + local.get $0 i32.load offset=8 i32.const -2 i32.and - local.set $1 + local.set $0 br $continue|0 end end @@ -909,33 +903,31 @@ i32.shl i32.add i32.load - local.set $2 + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 i32.load local.get $1 i32.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=8 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end @@ -1202,18 +1194,14 @@ end ) (func $~lib/symbol/_Symbol.keyFor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) global.get $~lib/symbol/idToString - i32.const 0 - i32.ne - local.tee $1 - if + if (result i32) global.get $~lib/symbol/idToString local.get $0 call $~lib/map/Map#has - local.set $1 + else + i32.const 0 end - local.get $1 if (result i32) global.get $~lib/symbol/idToString local.get $0 @@ -1454,7 +1442,7 @@ (local $1 i32) (local $2 i32) i32.const 208 - local.set $2 + local.set $1 i32.const 632 block $break|0 (result i32) block $case11|0 @@ -1473,12 +1461,12 @@ i32.ne if local.get $0 - local.tee $1 + local.tee $2 i32.const 2 i32.eq br_if $case1|0 block $tablify|0 - local.get $1 + local.get $2 i32.const 3 i32.sub br_table $case2|0 $case3|0 $case4|0 $case5|0 $case6|0 $case7|0 $case8|0 $case9|0 $case10|0 $tablify|0 @@ -1519,16 +1507,13 @@ br $break|0 end global.get $~lib/symbol/idToString - i32.const 0 - i32.ne - local.tee $1 - if + if (result i32) global.get $~lib/symbol/idToString local.get $0 call $~lib/map/Map#has - local.set $1 + else + i32.const 0 end - local.get $1 if (result i32) global.get $~lib/symbol/idToString local.get $0 @@ -1742,7 +1727,7 @@ i32.load i32.le_u else - local.get $0 + i32.const 0 end if loop $continue|0 @@ -1766,19 +1751,15 @@ i32.const 0 ) (func $~lib/runtime/runtime.flags (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if + if (result i32) local.get $0 i32.const 944 i32.load i32.gt_u - local.set $1 + else + i32.const 1 end - local.get $1 if (result i32) unreachable else @@ -1813,15 +1794,13 @@ (local $3 i32) (local $4 i32) local.get $0 - i32.eqz - local.tee $2 if (result i32) - local.get $2 - else local.get $0 i32.const 944 i32.load i32.gt_u + else + i32.const 1 end if (result i32) unreachable diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index b004f6b772..d5a21860a9 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -724,7 +724,7 @@ local.tee $5 i32.eqz else - local.get $4 + i32.const 0 end if block @@ -749,7 +749,6 @@ ) (func $~lib/string/String.__eq (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 i32.eq @@ -760,9 +759,8 @@ local.get $0 i32.const 0 i32.eq - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $1 i32.const 0 @@ -774,8 +772,8 @@ end local.get $0 call $~lib/string/String#get:length - local.set $3 - local.get $3 + local.set $2 + local.get $2 local.get $1 call $~lib/string/String#get:length i32.ne @@ -787,13 +785,12 @@ i32.const 0 local.get $1 i32.const 0 - local.get $3 + local.get $2 call $~lib/util/string/compareImpl i32.eqz ) (func $~lib/map/Map<~lib/string/String,usize>#find (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -815,14 +812,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load local.get $1 call $~lib/string/String.__eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -1161,7 +1157,6 @@ ) (func $~lib/map/Map#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -1183,14 +1178,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load local.get $1 i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -1533,17 +1527,15 @@ end ) (func $~lib/symbol/_Symbol.keyFor (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) global.get $~lib/symbol/idToString i32.const 0 i32.ne - local.tee $1 if (result i32) global.get $~lib/symbol/idToString local.get $0 call $~lib/map/Map#has else - local.get $1 + i32.const 0 end if (result i32) global.get $~lib/symbol/idToString @@ -1983,13 +1975,12 @@ global.get $~lib/symbol/idToString i32.const 0 i32.ne - local.tee $3 if (result i32) global.get $~lib/symbol/idToString local.get $1 call $~lib/map/Map#has else - local.get $3 + i32.const 0 end if global.get $~lib/symbol/idToString @@ -2207,7 +2198,7 @@ i32.load i32.le_u else - local.get $2 + i32.const 0 end if loop $continue|0 @@ -2232,14 +2223,12 @@ ) (func $~lib/runtime/runtime.flags (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/runtime/RTTI_BASE local.set $1 local.get $0 i32.eqz - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 local.get $1 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 80bf5ac9bd..0042d0a3d2 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -7726,25 +7726,23 @@ (local $4 i32) local.get $0 i32.reinterpret_f32 - local.tee $3 + local.tee $2 i32.const -2147483648 i32.and local.set $4 - local.get $3 + local.get $2 i32.const 23 i32.shr_u i32.const 255 i32.and - local.tee $2 + local.tee $3 i32.const 255 i32.eq - local.tee $1 - i32.eqz - if + if (result i32) + i32.const 1 + else i32.const 0 - local.set $1 end - local.get $1 if local.get $0 f32.const 2 @@ -7755,7 +7753,7 @@ return end block $folding-inner0 - local.get $3 + local.get $2 i32.const 1 i32.shl local.tee $1 @@ -7769,29 +7767,29 @@ local.get $0 return end - local.get $2 + local.get $3 if (result i32) - local.get $3 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $3 - i32.const 1 local.get $2 + i32.const 1 local.get $3 + local.get $2 i32.const 9 i32.shl i32.clz i32.sub - local.tee $2 + local.tee $3 i32.sub i32.shl end local.set $1 loop $continue|0 - local.get $2 + local.get $3 i32.const 128 i32.gt_s if @@ -7812,10 +7810,10 @@ i32.const 1 i32.shl local.set $1 - local.get $2 + local.get $3 i32.const 1 i32.sub - local.set $2 + local.set $3 br $continue|0 end end @@ -7837,27 +7835,27 @@ i32.const 8 i32.shl i32.clz - local.tee $3 + local.tee $1 i32.shl - local.set $1 - local.get $2 + local.set $2 local.get $3 + local.get $1 i32.sub - local.tee $2 + local.tee $1 i32.const 0 i32.gt_s if (result i32) - local.get $1 + local.get $2 i32.const 8388608 i32.sub - local.get $2 + local.get $1 i32.const 23 i32.shl i32.or else - local.get $1 - i32.const 1 local.get $2 + i32.const 1 + local.get $1 i32.sub i32.shr_u end @@ -7964,29 +7962,26 @@ (local $1 i64) (local $2 i64) (local $3 i64) - (local $4 i32) - (local $5 i64) + (local $4 i64) local.get $0 i64.reinterpret_f64 - local.tee $1 + local.tee $2 i64.const 63 i64.shr_u - local.set $5 - local.get $1 + local.set $4 + local.get $2 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.tee $2 + local.tee $3 i64.const 2047 i64.eq - local.tee $4 - i32.eqz - if + if (result i32) + i32.const 1 + else i32.const 0 - local.set $4 end - local.get $4 if local.get $0 f64.const 2 @@ -7997,38 +7992,38 @@ return end block $folding-inner0 - local.get $1 + local.get $2 i64.const 1 i64.shl - local.tee $3 + local.tee $1 i64.const -9223372036854775808 i64.le_u if - local.get $3 + local.get $1 i64.const -9223372036854775808 i64.eq br_if $folding-inner0 local.get $0 return end - local.get $2 + local.get $3 i64.eqz if (result i64) - local.get $1 + local.get $2 i64.const 0 + local.get $3 local.get $2 - local.get $1 i64.const 12 i64.shl i64.clz i64.sub - local.tee $2 + local.tee $3 i64.sub i64.const 1 i64.add i64.shl else - local.get $1 + local.get $2 i64.const 4503599627370495 i64.and i64.const 4503599627370496 @@ -8036,7 +8031,7 @@ end local.set $1 loop $continue|0 - local.get $2 + local.get $3 i64.const 1024 i64.gt_s if @@ -8057,10 +8052,10 @@ i64.const 1 i64.shl local.set $1 - local.get $2 + local.get $3 i64.const 1 i64.sub - local.set $2 + local.set $3 br $continue|0 end end @@ -8082,33 +8077,33 @@ i64.const 11 i64.shl i64.clz - local.tee $3 + local.tee $1 i64.shl - local.set $1 - local.get $2 + local.set $2 local.get $3 + local.get $1 i64.sub - local.tee $2 + local.tee $1 i64.const 0 i64.gt_s if (result i64) - local.get $1 + local.get $2 i64.const 4503599627370496 i64.sub - local.get $2 + local.get $1 i64.const 52 i64.shl i64.or else - local.get $1 - i64.const 0 local.get $2 + i64.const 0 + local.get $1 i64.sub i64.const 1 i64.add i64.shr_u end - local.get $5 + local.get $4 i64.const 63 i64.shl i64.or @@ -11913,43 +11908,38 @@ local.get $1 local.get $0 call $~lib/typedarray/Float64Array#sort - block (result i32) - block (result i32) - global.get $std/typedarray/af64 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 4 - f64.eq - local.tee $0 - if - global.get $std/typedarray/af64 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 5 - f64.eq - local.set $0 - end - local.get $0 - end - if - global.get $std/typedarray/af64 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 6 - f64.eq - local.set $0 - end - local.get $0 + global.get $std/typedarray/af64 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.eq + if (result i32) + global.get $std/typedarray/af64 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 5 + f64.eq + else + i32.const 0 end - if + if (result i32) + global.get $std/typedarray/af64 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 6 + f64.eq + else + i32.const 0 + end + if (result i32) global.get $std/typedarray/af64 i32.const 3 call $~lib/typedarray/Float64Array#__get f64.const 7 f64.eq - local.set $0 + else + i32.const 0 end - local.get $0 i32.eqz if i32.const 0 @@ -12738,7 +12728,7 @@ i32.load i32.le_u else - local.get $0 + i32.const 0 end if loop $continue|0 @@ -12762,19 +12752,15 @@ i32.const 0 ) (func $~lib/runtime/runtime.flags (; 263 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) local.get $0 - i32.eqz - local.tee $1 - i32.eqz - if + if (result i32) local.get $0 i32.const 1448 i32.load i32.gt_u - local.set $1 + else + i32.const 1 end - local.get $1 if (result i32) unreachable else @@ -12810,15 +12796,13 @@ (local $4 i32) local.get $0 local.tee $2 - i32.eqz - local.tee $0 if (result i32) - local.get $0 - else local.get $2 i32.const 1448 i32.load i32.gt_u + else + i32.const 1 end if (result i32) unreachable diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 84d4f5e4f9..be12393a62 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -7164,8 +7164,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 @@ -7294,8 +7292,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 @@ -7422,8 +7418,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 @@ -7552,8 +7546,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 @@ -7682,8 +7674,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 @@ -7808,8 +7798,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 @@ -7932,8 +7920,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Uint32Array,u32>|inlined.0 @@ -8056,8 +8042,6 @@ local.get $2 call_indirect (type $FUNCSIG$ijii) end - i32.const 0 - i32.ne if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 @@ -8180,8 +8164,6 @@ local.get $2 call_indirect (type $FUNCSIG$ijii) end - i32.const 0 - i32.ne if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Uint64Array,u64>|inlined.0 @@ -8304,8 +8286,6 @@ local.get $2 call_indirect (type $FUNCSIG$ifii) end - i32.const 0 - i32.ne if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 @@ -8428,8 +8408,6 @@ local.get $2 call_indirect (type $FUNCSIG$idii) end - i32.const 0 - i32.ne if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 @@ -8556,8 +8534,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if local.get $5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 @@ -8685,8 +8661,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if local.get $5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 @@ -8812,8 +8786,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if local.get $5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 @@ -8941,8 +8913,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if local.get $5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 @@ -9070,8 +9040,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if local.get $5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 @@ -9195,8 +9163,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if local.get $5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 @@ -9318,8 +9284,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if local.get $5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.0 @@ -9441,8 +9405,6 @@ local.get $2 call_indirect (type $FUNCSIG$ijii) end - i32.const 0 - i32.ne if local.get $5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 @@ -9564,8 +9526,6 @@ local.get $2 call_indirect (type $FUNCSIG$ijii) end - i32.const 0 - i32.ne if local.get $5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.0 @@ -9687,8 +9647,6 @@ local.get $2 call_indirect (type $FUNCSIG$ifii) end - i32.const 0 - i32.ne if local.get $5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 @@ -9810,8 +9768,6 @@ local.get $2 call_indirect (type $FUNCSIG$idii) end - i32.const 0 - i32.ne if local.get $5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 @@ -9941,8 +9897,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if br $continue|0 end @@ -10080,8 +10034,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if br $continue|0 end @@ -10217,8 +10169,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if br $continue|0 end @@ -10356,8 +10306,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if br $continue|0 end @@ -10495,8 +10443,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if br $continue|0 end @@ -10630,8 +10576,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if br $continue|0 end @@ -10763,8 +10707,6 @@ local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if br $continue|0 end @@ -10896,8 +10838,6 @@ local.get $2 call_indirect (type $FUNCSIG$ijii) end - i32.const 0 - i32.ne if br $continue|0 end @@ -11029,8 +10969,6 @@ local.get $2 call_indirect (type $FUNCSIG$ijii) end - i32.const 0 - i32.ne if br $continue|0 end @@ -11123,10 +11061,9 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 f32) + (local $8 f32) + (local $9 i32) (local $10 i32) - (local $11 i32) local.get $0 i32.reinterpret_f32 local.set $2 @@ -11156,17 +11093,15 @@ local.get $7 i32.const 0 i32.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i32.const 255 i32.eq end - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $1 call $~lib/builtins/isNaN @@ -11175,21 +11110,21 @@ local.get $0 local.get $1 f32.mul - local.set $9 - local.get $9 - local.get $9 + local.set $8 + local.get $8 + local.get $8 f32.div return end local.get $2 i32.const 1 i32.shl - local.set $10 - local.get $10 + local.set $9 + local.get $9 local.get $7 i32.le_u if - local.get $10 + local.get $9 local.get $7 i32.eq if @@ -11325,13 +11260,13 @@ i32.const 8 i32.shl i32.clz - local.set $11 + local.set $10 local.get $4 - local.get $11 + local.get $10 i32.sub local.set $4 local.get $2 - local.get $11 + local.get $10 i32.shl local.set $2 local.get $4 @@ -11418,8 +11353,6 @@ local.get $2 call_indirect (type $FUNCSIG$ifii) end - i32.const 0 - i32.ne if br $continue|0 end @@ -11512,10 +11445,9 @@ (local $5 i64) (local $6 i64) (local $7 i64) - (local $8 i32) - (local $9 f64) + (local $8 f64) + (local $9 i64) (local $10 i64) - (local $11 i64) local.get $0 i64.reinterpret_f64 local.set $2 @@ -11545,17 +11477,15 @@ local.get $7 i64.const 0 i64.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i64.const 2047 i64.eq end - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $1 call $~lib/builtins/isNaN @@ -11564,21 +11494,21 @@ local.get $0 local.get $1 f64.mul - local.set $9 - local.get $9 - local.get $9 + local.set $8 + local.get $8 + local.get $8 f64.div return end local.get $2 i64.const 1 i64.shl - local.set $10 - local.get $10 + local.set $9 + local.get $9 local.get $7 i64.le_u if - local.get $10 + local.get $9 local.get $7 i64.eq if @@ -11714,13 +11644,13 @@ i64.const 11 i64.shl i64.clz - local.set $11 + local.set $10 local.get $4 - local.get $11 + local.get $10 i64.sub local.set $4 local.get $2 - local.get $11 + local.get $10 i64.shl local.set $2 local.get $4 @@ -11809,8 +11739,6 @@ local.get $2 call_indirect (type $FUNCSIG$idii) end - i32.const 0 - i32.ne if br $continue|0 end @@ -17002,7 +16930,6 @@ end ) (func $start:std/typedarray (; 379 ;) (type $FUNCSIG$v) - (local $0 i32) global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32.const 1 i32.eq @@ -17407,7 +17334,6 @@ call $~lib/typedarray/Float64Array#__get f64.const 4 f64.eq - local.tee $0 if (result i32) global.get $std/typedarray/af64 i32.const 1 @@ -17415,9 +17341,8 @@ f64.const 5 f64.eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/typedarray/af64 i32.const 2 @@ -17425,9 +17350,8 @@ f64.const 6 f64.eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/typedarray/af64 i32.const 3 @@ -17435,7 +17359,7 @@ f64.const 7 f64.eq else - local.get $0 + i32.const 0 end i32.eqz if @@ -18252,7 +18176,7 @@ i32.load i32.le_u else - local.get $2 + i32.const 0 end if loop $continue|0 @@ -18277,14 +18201,12 @@ ) (func $~lib/runtime/runtime.flags (; 381 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $~lib/runtime/RTTI_BASE local.set $1 local.get $0 i32.eqz - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 local.get $1 diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index c8018f682e..863d496d5f 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -146,6 +146,9 @@ i32.add local.tee $0 global.set $while/m + else + i32.const 0 + local.set $0 end local.get $0 br_if $continue|3 diff --git a/tests/compiler/while.untouched.wat b/tests/compiler/while.untouched.wat index 05b86d4013..2838d8dc4e 100644 --- a/tests/compiler/while.untouched.wat +++ b/tests/compiler/while.untouched.wat @@ -169,7 +169,6 @@ global.set $while/n local.get $0 end - local.tee $0 if (result i32) global.get $while/m i32.const 1 @@ -178,7 +177,7 @@ global.set $while/m local.get $0 else - local.get $0 + i32.const 0 end if nop From cd79376101850273c0207d42da764db92aaa85c6 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 9 Apr 2019 04:25:38 +0200 Subject: [PATCH 101/119] null checking throughout logical and/or --- src/compiler.ts | 12 +++++ tests/compiler/possibly-null.optimized.wat | 9 +++- tests/compiler/possibly-null.ts | 34 +++++++++---- tests/compiler/possibly-null.untouched.wat | 59 +++++++++++++++++++++- 4 files changed, 102 insertions(+), 12 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index 940cf2d6a0..a165446352 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -4755,8 +4755,14 @@ export class Compiler extends DiagnosticEmitter { case Token.AMPERSAND_AMPERSAND: { // left && right leftExpr = this.compileExpressionRetainType(left, contextualType, WrapMode.NONE); leftType = this.currentType; + + let previousFlow = this.currentFlow; + let rightFlow = previousFlow.fork(); + this.currentFlow = rightFlow; + rightFlow.inheritNonnullIf(leftExpr); rightExpr = this.compileExpression(right, leftType, ConversionKind.IMPLICIT, WrapMode.NONE); rightType = leftType; + this.currentFlow = previousFlow; // simplify if only interested in true or false if (contextualType == Type.bool || contextualType == Type.void) { @@ -4799,8 +4805,14 @@ export class Compiler extends DiagnosticEmitter { case Token.BAR_BAR: { // left || right leftExpr = this.compileExpressionRetainType(left, contextualType, WrapMode.NONE); leftType = this.currentType; + + let previousFlow = this.currentFlow; + let rightFlow = previousFlow.fork(); + this.currentFlow = rightFlow; + rightFlow.inheritNonnullIfNot(leftExpr); rightExpr = this.compileExpression(right, leftType, ConversionKind.IMPLICIT, WrapMode.NONE); rightType = leftType; + this.currentFlow = previousFlow; // simplify if only interested in true or false if (contextualType == Type.bool || contextualType == Type.void) { diff --git a/tests/compiler/possibly-null.optimized.wat b/tests/compiler/possibly-null.optimized.wat index 634a749aaf..c83e8f1a37 100644 --- a/tests/compiler/possibly-null.optimized.wat +++ b/tests/compiler/possibly-null.optimized.wat @@ -16,6 +16,10 @@ (export "testWhile" (func $possibly-null/testWhile)) (export "testWhile2" (func $possibly-null/testWhile2)) (export "testWhile3" (func $possibly-null/testWhile3)) + (export "testLogicalAnd" (func $possibly-null/testTrue)) + (export "testLogicalOr" (func $possibly-null/testTrue)) + (export "testLogicalAndMulti" (func $possibly-null/testLogicalAndMulti)) + (export "testLogicalOrMulti" (func $possibly-null/testLogicalAndMulti)) (func $possibly-null/testTrue (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) @@ -52,7 +56,10 @@ end end ) - (func $null (; 4 ;) (type $FUNCSIG$v) + (func $possibly-null/testLogicalAndMulti (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $null (; 5 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/possibly-null.ts b/tests/compiler/possibly-null.ts index 8618567112..01af0a4ad7 100644 --- a/tests/compiler/possibly-null.ts +++ b/tests/compiler/possibly-null.ts @@ -83,16 +83,30 @@ export function testWhile3(a: Ref | null, b: Ref | null): void { } } -// TODO: +function requireNonNull(a: Ref): Ref { + return a; +} -// function requireNonNull(a: Ref): Ref { -// return a; -// } +export function testLogicalAnd(a: Ref | null): void { + a && requireNonNull(a); +} -// export function testLogicalAnd(a: Ref | null): void { -// a && requireNonNull(a); -// } +export function testLogicalOr(a: Ref | null): void { + !a || requireNonNull(a) != null; +} + +export function testLogicalAndMulti(a: Ref | null, b: Ref | null): void { + if (a && b) { + if (isNullable(a)) ERROR("should be non-nullable"); + if (isNullable(b)) ERROR("should be non-nullable"); + } +} -// export function testLogicalOr(a: Ref | null): void { -// !a || requireNonNull(a); -// } +export function testLogicalOrMulti(a: Ref | null, b: Ref | null): void { + if (!a || !b) { + // something + } else { + if (isNullable(a)) ERROR("should be non-nullable"); + if (isNullable(b)) ERROR("should be non-nullable"); + } +} diff --git a/tests/compiler/possibly-null.untouched.wat b/tests/compiler/possibly-null.untouched.wat index 04f6b77d5c..5ad3050489 100644 --- a/tests/compiler/possibly-null.untouched.wat +++ b/tests/compiler/possibly-null.untouched.wat @@ -1,6 +1,7 @@ (module (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$v (func)) (memory $0 0) (table $0 1 funcref) @@ -18,6 +19,10 @@ (export "testWhile" (func $possibly-null/testWhile)) (export "testWhile2" (func $possibly-null/testWhile2)) (export "testWhile3" (func $possibly-null/testWhile3)) + (export "testLogicalAnd" (func $possibly-null/testLogicalAnd)) + (export "testLogicalOr" (func $possibly-null/testLogicalOr)) + (export "testLogicalAndMulti" (func $possibly-null/testLogicalAndMulti)) + (export "testLogicalOrMulti" (func $possibly-null/testLogicalOrMulti)) (func $possibly-null/testTrue (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 if @@ -128,6 +133,58 @@ end end ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $possibly-null/requireNonNull (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + ) + (func $possibly-null/testLogicalAnd (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + if (result i32) + local.get $0 + call $possibly-null/requireNonNull + else + i32.const 0 + end + drop + ) + (func $possibly-null/testLogicalOr (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + call $possibly-null/requireNonNull + i32.const 0 + i32.ne + end + drop + ) + (func $possibly-null/testLogicalAndMulti (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + if (result i32) + local.get $1 + else + i32.const 0 + end + if + nop + end + ) + (func $possibly-null/testLogicalOrMulti (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $1 + i32.eqz + end + if + nop + else + nop + end + ) + (func $null (; 17 ;) (type $FUNCSIG$v) ) ) From eb6c4c09ee571e39739df695628dffac6b002508 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 9 Apr 2019 06:57:28 +0200 Subject: [PATCH 102/119] possible-null assignment to non-null, notes --- src/compiler.ts | 22 ++--- src/flow.ts | 94 ++++++++++++---------- tests/compiler/possibly-null.optimized.wat | 1 + tests/compiler/possibly-null.ts | 11 ++- tests/compiler/possibly-null.untouched.wat | 9 ++- 5 files changed, 84 insertions(+), 53 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index a165446352..94d17b0273 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -1954,7 +1954,7 @@ export class Compiler extends DiagnosticEmitter { condExpr = module.createI32(1); alwaysTrue = true; } - innerFlow.inheritNonnullIf(condExpr); + innerFlow.inheritNonnullIfTrue(condExpr); var incrExpr = statement.incrementor ? this.compileExpression(statement.incrementor, Type.void, ConversionKind.IMPLICIT, WrapMode.NONE) : 0; @@ -2041,7 +2041,7 @@ export class Compiler extends DiagnosticEmitter { // Each arm initiates a branch var ifTrueFlow = outerFlow.fork(); this.currentFlow = ifTrueFlow; - ifTrueFlow.inheritNonnullIf(condExpr); + ifTrueFlow.inheritNonnullIfTrue(condExpr); var ifTrueExpr = this.compileStatement(ifTrue); ifTrueFlow.freeScopedLocals(); this.currentFlow = outerFlow; @@ -2050,7 +2050,7 @@ export class Compiler extends DiagnosticEmitter { if (ifFalse) { let ifFalseFlow = outerFlow.fork(); this.currentFlow = ifFalseFlow; - ifFalseFlow.inheritNonnullIfNot(condExpr); + ifFalseFlow.inheritNonnullIfFalse(condExpr); ifFalseExpr = this.compileStatement(ifFalse); ifFalseFlow.freeScopedLocals(); this.currentFlow = outerFlow; @@ -2058,7 +2058,7 @@ export class Compiler extends DiagnosticEmitter { } else { outerFlow.inheritConditional(ifTrueFlow); if (ifTrueFlow.isAny(FlowFlags.ANY_TERMINATING)) { - outerFlow.inheritNonnullIfNot(condExpr); + outerFlow.inheritNonnullIfFalse(condExpr); } } return module.createIf(condExpr, ifTrueExpr, ifFalseExpr); @@ -2436,7 +2436,7 @@ export class Compiler extends DiagnosticEmitter { var continueLabel = "continue|" + label; innerFlow.continueLabel = continueLabel; - innerFlow.inheritNonnullIf(condExpr); + innerFlow.inheritNonnullIfTrue(condExpr); var body = this.compileStatement(statement.statement); var alwaysTrue = false; // TODO var terminated = innerFlow.isAny(FlowFlags.ANY_TERMINATING); @@ -4759,7 +4759,7 @@ export class Compiler extends DiagnosticEmitter { let previousFlow = this.currentFlow; let rightFlow = previousFlow.fork(); this.currentFlow = rightFlow; - rightFlow.inheritNonnullIf(leftExpr); + rightFlow.inheritNonnullIfTrue(leftExpr); rightExpr = this.compileExpression(right, leftType, ConversionKind.IMPLICIT, WrapMode.NONE); rightType = leftType; this.currentFlow = previousFlow; @@ -4809,7 +4809,7 @@ export class Compiler extends DiagnosticEmitter { let previousFlow = this.currentFlow; let rightFlow = previousFlow.fork(); this.currentFlow = rightFlow; - rightFlow.inheritNonnullIfNot(leftExpr); + rightFlow.inheritNonnullIfFalse(leftExpr); rightExpr = this.compileExpression(right, leftType, ConversionKind.IMPLICIT, WrapMode.NONE); rightType = leftType; this.currentFlow = previousFlow; @@ -5030,7 +5030,6 @@ export class Compiler extends DiagnosticEmitter { var module = this.module; var flow = this.currentFlow; var target = this.resolver.resolveExpression(expression, flow); // reports - var possiblyNull = this.currentType.is(TypeFlags.NULLABLE) && !flow.isNonnull(valueExpr); if (!target) return module.createUnreachable(); switch (target.kind) { @@ -5043,7 +5042,7 @@ export class Compiler extends DiagnosticEmitter { this.currentType = tee ? (target).type : Type.void; return module.createUnreachable(); } - return this.makeLocalAssignment(target, valueExpr, tee, possiblyNull); + return this.makeLocalAssignment(target, valueExpr, tee, !flow.isNonnull(this.currentType, valueExpr)); } case ElementKind.GLOBAL: { if (!this.compileGlobal(target)) return module.createUnreachable(); @@ -5242,7 +5241,10 @@ export class Compiler extends DiagnosticEmitter { if (!flow.canOverflow(valueExpr, type)) flow.setLocalFlag(localIndex, LocalFlags.WRAPPED); else flow.unsetLocalFlag(localIndex, LocalFlags.WRAPPED); } - if (possiblyNull) flow.unsetLocalFlag(localIndex, LocalFlags.NONNULL); + if (type.is(TypeFlags.NULLABLE)) { + if (possiblyNull) flow.unsetLocalFlag(localIndex, LocalFlags.NONNULL); + else flow.setLocalFlag(localIndex, LocalFlags.NONNULL); + } if (tee) { this.currentType = type; return this.module.createTeeLocal(localIndex, valueExpr); diff --git a/src/flow.ts b/src/flow.ts index 8c090752ce..4a7227d172 100644 --- a/src/flow.ts +++ b/src/flow.ts @@ -582,8 +582,12 @@ export class Flow { this.localFlags = combinedFlags; } - /** Checks if an expression is known to be non-null. */ - isNonnull(expr: ExpressionRef): bool { + /** Checks if an expression of the specified type is known to be non-null, even if the type might be nullable. */ + isNonnull(type: Type, expr: ExpressionRef): bool { + if (!type.is(TypeFlags.NULLABLE)) return true; + // below, only teeLocal/getLocal are relevant because these are the only expressions that + // depend on a dynamic nullable state (flag = LocalFlags.NONNULL), while everything else + // has already been handled by the nullable type check above. switch (getExpressionId(expr)) { case ExpressionId.SetLocal: { if (!isTeeLocal(expr)) break; @@ -598,8 +602,9 @@ export class Flow { return false; } - /** Sets local states where this branch is only taken when `expr` is true-ish. */ - inheritNonnullIf(expr: ExpressionRef): void { + /** Updates local states to reflect that this branch is only taken when `expr` is true-ish. */ + inheritNonnullIfTrue(expr: ExpressionRef): void { + // A: `expr` is true-ish -> Q: how did that happen? switch (getExpressionId(expr)) { case ExpressionId.SetLocal: { if (!isTeeLocal(expr)) break; @@ -607,7 +612,7 @@ export class Flow { this.setLocalFlag(local.index, LocalFlags.NONNULL); break; } - case ExpressionId.GetLocal: { // local must be true-ish/non-null + case ExpressionId.GetLocal: { let local = this.parentFunction.localsByIndex[getGetLocalIndex(expr)]; this.setLocalFlag(local.index, LocalFlags.NONNULL); break; @@ -615,22 +620,24 @@ export class Flow { case ExpressionId.If: { let ifFalse = getIfFalse(expr); if (!ifFalse) break; - if (getExpressionId(ifFalse) == ExpressionId.Const && getExpressionType(ifFalse) == NativeType.I32 && getConstValueI32(ifFalse) == 0) { + if (getExpressionId(ifFalse) == ExpressionId.Const) { // Logical AND: (if (condition ifTrue 0)) - // the only way this can become true is if condition and ifTrue are true - this.inheritNonnullIf(getIfCondition(expr)); - this.inheritNonnullIf(getIfTrue(expr)); + // the only way this had become true is if condition and ifTrue are true + if ( + (getExpressionType(ifFalse) == NativeType.I32 && getConstValueI32(ifFalse) == 0) || + (getExpressionType(ifFalse) == NativeType.I64 && getConstValueI64Low(ifFalse) == 0 && getConstValueI64High(ifFalse) == 0) + ) { + this.inheritNonnullIfTrue(getIfCondition(expr)); + this.inheritNonnullIfTrue(getIfTrue(expr)); + } } break; } case ExpressionId.Unary: { switch (getUnaryOp(expr)) { - case UnaryOp.EqzI32: { - this.inheritNonnullIfNot(getUnaryValue(expr)); // !expr - break; - } + case UnaryOp.EqzI32: case UnaryOp.EqzI64: { - this.inheritNonnullIfNot(getUnaryValue(expr)); // !expr + this.inheritNonnullIfFalse(getUnaryValue(expr)); // !value -> value must have been false break; } } @@ -642,9 +649,9 @@ export class Flow { let left = getBinaryLeft(expr); let right = getBinaryRight(expr); if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) != 0) { - this.inheritNonnullIf(right); // TRUE == right + this.inheritNonnullIfTrue(right); // TRUE == right -> right must have been true } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) != 0) { - this.inheritNonnullIf(left); // left == TRUE + this.inheritNonnullIfTrue(left); // left == TRUE -> left must have been true } break; } @@ -652,9 +659,9 @@ export class Flow { let left = getBinaryLeft(expr); let right = getBinaryRight(expr); if (getExpressionId(left) == ExpressionId.Const && (getConstValueI64Low(left) != 0 || getConstValueI64High(left) != 0)) { - this.inheritNonnullIf(right); // TRUE == right + this.inheritNonnullIfTrue(right); // TRUE == right -> right must have been true } else if (getExpressionId(right) == ExpressionId.Const && (getConstValueI64Low(right) != 0 && getConstValueI64High(right) != 0)) { - this.inheritNonnullIf(left); // left == TRUE + this.inheritNonnullIfTrue(left); // left == TRUE -> left must have been true } break; } @@ -662,9 +669,9 @@ export class Flow { let left = getBinaryLeft(expr); let right = getBinaryRight(expr); if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) == 0) { - this.inheritNonnullIf(right); // FALSE != right + this.inheritNonnullIfTrue(right); // FALSE != right -> right must have been true } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) == 0) { - this.inheritNonnullIf(left); // left != FALSE + this.inheritNonnullIfTrue(left); // left != FALSE -> left must have been true } break; } @@ -672,9 +679,9 @@ export class Flow { let left = getBinaryLeft(expr); let right = getBinaryRight(expr); if (getExpressionId(left) == ExpressionId.Const && getConstValueI64Low(left) == 0 && getConstValueI64High(left) == 0) { - this.inheritNonnullIf(right); // FALSE != right + this.inheritNonnullIfTrue(right); // FALSE != right -> right must have been true } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI64Low(right) == 0 && getConstValueI64High(right) == 0) { - this.inheritNonnullIf(left); // left != FALSE + this.inheritNonnullIfTrue(left); // left != FALSE -> left must have been true } break; } @@ -684,17 +691,15 @@ export class Flow { } } - /** Sets local states where this branch is only taken when `expr` is false-ish. */ - inheritNonnullIfNot(expr: ExpressionRef): void { + /** Updates local states to reflect that this branch is only taken when `expr` is false-ish. */ + inheritNonnullIfFalse(expr: ExpressionRef): void { + // A: `expr` is false-ish -> Q: how did that happen? switch (getExpressionId(expr)) { case ExpressionId.Unary: { switch (getUnaryOp(expr)) { - case UnaryOp.EqzI32: { - this.inheritNonnullIf(getUnaryValue(expr)); // !expr - break; - } + case UnaryOp.EqzI32: case UnaryOp.EqzI64: { - this.inheritNonnullIf(getUnaryValue(expr)); // !expr + this.inheritNonnullIfTrue(getUnaryValue(expr)); // !value -> value must have been true break; } } @@ -702,25 +707,32 @@ export class Flow { } case ExpressionId.If: { let ifTrue = getIfTrue(expr); - if (getExpressionId(ifTrue) == ExpressionId.Const && getExpressionType(ifTrue) == NativeType.I32 && getConstValueI32(ifTrue) != 0) { + if (getExpressionId(ifTrue) == ExpressionId.Const) { let ifFalse = getIfFalse(expr); if (!ifFalse) break; // Logical OR: (if (condition 1 ifFalse)) - // the only way this can become false is if condition and ifFalse are false - this.inheritNonnullIfNot(getIfCondition(expr)); - this.inheritNonnullIfNot(getIfFalse(expr)); + // the only way this had become false is if condition and ifFalse are false + if ( + (getExpressionType(ifTrue) == NativeType.I32 && getConstValueI32(ifTrue) != 0) || + (getExpressionType(ifTrue) == NativeType.I64 && (getConstValueI64Low(ifTrue) != 0 || getConstValueI64High(ifTrue) != 0)) + ) { + this.inheritNonnullIfFalse(getIfCondition(expr)); + this.inheritNonnullIfFalse(getIfFalse(expr)); + } + } break; } case ExpressionId.Binary: { switch (getBinaryOp(expr)) { + // remember: we want to know how the _entire_ expression became FALSE (!) case BinaryOp.EqI32: { let left = getBinaryLeft(expr); let right = getBinaryRight(expr); if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) == 0) { - this.inheritNonnullIf(right); // FALSE == right + this.inheritNonnullIfTrue(right); // FALSE == right -> right must have been true } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) == 0) { - this.inheritNonnullIf(left); // left == FALSE + this.inheritNonnullIfTrue(left); // left == FALSE -> left must have been true } break; } @@ -728,9 +740,9 @@ export class Flow { let left = getBinaryLeft(expr); let right = getBinaryRight(expr); if (getExpressionId(left) == ExpressionId.Const && getConstValueI64Low(left) == 0 && getConstValueI64High(left) == 0) { - this.inheritNonnullIf(right); // FALSE == right + this.inheritNonnullIfTrue(right); // FALSE == right -> right must have been true } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI64Low(right) == 0 && getConstValueI64High(right) == 0) { - this.inheritNonnullIf(left); // left == FALSE + this.inheritNonnullIfTrue(left); // left == FALSE -> left must have been true } break; } @@ -738,9 +750,9 @@ export class Flow { let left = getBinaryLeft(expr); let right = getBinaryRight(expr); if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) != 0) { - this.inheritNonnullIf(right); // TRUE != right + this.inheritNonnullIfTrue(right); // TRUE != right -> right must have been true } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) != 0) { - this.inheritNonnullIf(left); // left != TRUE + this.inheritNonnullIfTrue(left); // left != TRUE -> left must have been true } break; } @@ -748,9 +760,9 @@ export class Flow { let left = getBinaryLeft(expr); let right = getBinaryRight(expr); if (getExpressionId(left) == ExpressionId.Const && (getConstValueI64Low(left) != 0 || getConstValueI64High(left) != 0)) { - this.inheritNonnullIf(right); // TRUE != right + this.inheritNonnullIfTrue(right); // TRUE != right -> right must have been true for this to become false } else if (getExpressionId(right) == ExpressionId.Const && (getConstValueI64Low(right) != 0 || getConstValueI64High(right) != 0)) { - this.inheritNonnullIf(left); // left != TRUE + this.inheritNonnullIfTrue(left); // left != TRUE -> left must have been true for this to become false } break; } diff --git a/tests/compiler/possibly-null.optimized.wat b/tests/compiler/possibly-null.optimized.wat index c83e8f1a37..fe8403d3f9 100644 --- a/tests/compiler/possibly-null.optimized.wat +++ b/tests/compiler/possibly-null.optimized.wat @@ -20,6 +20,7 @@ (export "testLogicalOr" (func $possibly-null/testTrue)) (export "testLogicalAndMulti" (func $possibly-null/testLogicalAndMulti)) (export "testLogicalOrMulti" (func $possibly-null/testLogicalAndMulti)) + (export "testAssign" (func $possibly-null/testLogicalAndMulti)) (func $possibly-null/testTrue (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) diff --git a/tests/compiler/possibly-null.ts b/tests/compiler/possibly-null.ts index 01af0a4ad7..101c103f93 100644 --- a/tests/compiler/possibly-null.ts +++ b/tests/compiler/possibly-null.ts @@ -99,14 +99,23 @@ export function testLogicalAndMulti(a: Ref | null, b: Ref | null): void { if (a && b) { if (isNullable(a)) ERROR("should be non-nullable"); if (isNullable(b)) ERROR("should be non-nullable"); + } else { + if (!isNullable(a)) ERROR("should be nullable"); + if (!isNullable(b)) ERROR("should be nullable"); } } export function testLogicalOrMulti(a: Ref | null, b: Ref | null): void { if (!a || !b) { - // something + if (!isNullable(a)) ERROR("should be nullable"); + if (!isNullable(b)) ERROR("should be nullable"); } else { if (isNullable(a)) ERROR("should be non-nullable"); if (isNullable(b)) ERROR("should be non-nullable"); } } + +export function testAssign(a: Ref | null, b: Ref): void { + a = b; + if (isNullable(a)) ERROR("should be non-nullable"); +} diff --git a/tests/compiler/possibly-null.untouched.wat b/tests/compiler/possibly-null.untouched.wat index 5ad3050489..a4be7dfbec 100644 --- a/tests/compiler/possibly-null.untouched.wat +++ b/tests/compiler/possibly-null.untouched.wat @@ -23,6 +23,7 @@ (export "testLogicalOr" (func $possibly-null/testLogicalOr)) (export "testLogicalAndMulti" (func $possibly-null/testLogicalAndMulti)) (export "testLogicalOrMulti" (func $possibly-null/testLogicalOrMulti)) + (export "testAssign" (func $possibly-null/testAssign)) (func $possibly-null/testTrue (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 if @@ -168,6 +169,8 @@ end if nop + else + nop end ) (func $possibly-null/testLogicalOrMulti (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) @@ -185,6 +188,10 @@ nop end ) - (func $null (; 17 ;) (type $FUNCSIG$v) + (func $possibly-null/testAssign (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $1 + local.set $0 + ) + (func $null (; 18 ;) (type $FUNCSIG$v) ) ) From bb659bbdcd0515772167b2085bb899e6140de80e Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 9 Apr 2019 08:28:14 +0200 Subject: [PATCH 103/119] Runtime 'none' by default --- cli/asc.json | 8 +- examples/game-of-life/build/optimized.wasm | Bin 939 -> 916 bytes examples/game-of-life/build/optimized.wat | 15 +- examples/game-of-life/build/untouched.wat | 120 +- examples/i64-polyfill/build/optimized.wat | 3 - examples/i64-polyfill/build/untouched.wat | 2 - examples/mandelbrot/assembly/index.ts | 2 +- examples/mandelbrot/build/optimized.d.ts | 1 - examples/mandelbrot/build/optimized.wasm | Bin 592 -> 578 bytes examples/mandelbrot/build/optimized.wat | 102 +- examples/mandelbrot/build/untouched.wat | 48 +- examples/n-body/assembly/index.js | 2 +- examples/n-body/assembly/index.ts | 18 +- examples/n-body/build/index.asm.js | 327 ++--- examples/n-body/build/index.js | 4 +- examples/n-body/build/optimized.wasm | Bin 2090 -> 1691 bytes examples/n-body/build/optimized.wat | 418 ++----- examples/n-body/build/untouched.wat | 1083 ++++++++--------- examples/pson/build/optimized.wat | 7 +- examples/pson/build/untouched.wat | 2 - lib/parse/build/index.wat | 504 ++++---- src/compiler.ts | 2 +- std/assembly/runtime/README.md | 30 +- std/assembly/runtime/{default.ts => trace.ts} | 0 tests/compiler/mandelbrot.optimized.wat | 101 +- tests/compiler/mandelbrot.untouched.wat | 46 +- tests/compiler/possibly-null.optimized.wat | 1 + tests/compiler/possibly-null.ts | 6 + tests/compiler/possibly-null.untouched.wat | 10 +- tests/compiler/runtime-default.json | 2 +- tests/compiler/runtime/flags.json | 3 + 31 files changed, 1193 insertions(+), 1674 deletions(-) rename std/assembly/runtime/{default.ts => trace.ts} (100%) diff --git a/cli/asc.json b/cli/asc.json index f5adcac22b..76be15b213 100644 --- a/cli/asc.json +++ b/cli/asc.json @@ -85,13 +85,13 @@ "description": [ "Specifies the runtime template to include in the program.", "", - " default TLSF memory allocator and ITCM garbage collector.", - " arena Just the arena memory allocator. No free/GC.", - " none No allocator/GC or compose your own.", + " none No allocator/GC or compose your own. [default]", + " trace TLSF memory allocator and ITCM garbage collector.", + " arena Just the arena memory allocator. No free/GC.", "" ], "type": "s", - "default": "default" + "default": "none" }, "debug": { "description": "Enables debug information in emitted binaries.", diff --git a/examples/game-of-life/build/optimized.wasm b/examples/game-of-life/build/optimized.wasm index 7178bc54c38dde2d995f28d5eca3a898b7e6e5e8..17c21d1b0ac293f776d19bb9138c0fca9d93383c 100644 GIT binary patch delta 115 zcmZ3@K81ZkjWL@5b3LOY12=+TmuF$iP0h_Os$^nd$;`_vVPIq_E=et5U}8zj%*kP3 zo_OpEBlG0hjQSEx%FGHZIa!WOB^pc&j*Nv_Kt4l`0`uexj0%(0nD{6EXJnf!&LqUh Kv{{R(kr4m}R2rcG delta 122 zcmbQjzM6ePjTZ|GV*vvrn*eh?qay=1f?!u?Wy?*?%`d8CVqh&vOv*`RWMIk6%Pe7F zWGOC5Enr|`Nz2U1VPNKDXJi2CWMrAR{t6@0Pr%+JI> R`4^+a 1.0) { let frac = Math.log2(0.5 * Math.log(sqd)); - col = ((NUM_COLORS - 1) * clamp((iteration + 1 - frac) * invLimit, 0.0, 1.0)); + col = ((NUM_COLORS - 1) * clamp((iteration + 1 - frac) * invLimit, 0.0, 1.0)); } store(stride + (x << 1), col); } diff --git a/examples/mandelbrot/build/optimized.d.ts b/examples/mandelbrot/build/optimized.d.ts index 58fe356b06..820085f607 100644 --- a/examples/mandelbrot/build/optimized.d.ts +++ b/examples/mandelbrot/build/optimized.d.ts @@ -14,6 +14,5 @@ declare module ASModule { } var NUM_COLORS: i32; function computeLine(y: u32, width: u32, height: u32, limit: u32): void; - function clamp(value: f64, minValue: f64, maxValue: f64): f64; } export default ASModule; diff --git a/examples/mandelbrot/build/optimized.wasm b/examples/mandelbrot/build/optimized.wasm index 3439f6160b6cc8e367fad598ab59f9766db666ce..4857d3a4b3287228cec614e6b76247dc8661f89e 100644 GIT binary patch literal 578 zcmY*XyG{a85S{zj2V5Q-E6ceXV`*V)u}fkJF)^`+z(z4HyHU_+Nca@tf|Zrseh!5n zzz3M03$V`j3@dq^1out0R>j2?8^luf$;{8-3NZ+s)}vTI-^lmt(KiDdNX zrb(LJKXU*fIB@Tf|5j8#OY_M%X%9yU@M43`yk85!*uwP3{IZt&pAnZ`42P8Y-s=h literal 592 zcmY*X&1%~~5T4mxX=SgSiax=t2tDS|YY&p3mqJ3J(7RPfq&Ai%5~ZcZ;76&waiNey zu6mpt`T%}_LOXU=E#1q`e)IjzE(^s?g#duDoTxP~nBWRm69Dl-s*9riC>Qk=;IUL( zz66xz@>5uqRek+M07xl7D1{B6Cixc++Tz2aL@?93YHr)|e6}n>3^YOx2IcTUiXT$o zdboPc@w`qmUql&UmqgAVTmIlraDe}nA)E$5k0pTLY)`D;B zQ<7bx@9fwEl#$-qNM@u6-zeTXR?=u|jb{MZK8VXO2P>EzP~egi3Mq7n-gs)9l`0ec z^uR2~eHw0TNGGJXWHvS+LGtYwNaQ%TVkC?)>?b;krW}9pJ-Qyrx}V`cD}69|Qll}X z_<{uUf6`6T>-OoTT0eRG`ob&J+N;(D?=q_d)*qnR$h9NSIqS q;xHot4V=a|_3ibvyeOJxw!C`(?)-V(w6kjVwY)t0%>U@DDw;o~!EICk diff --git a/examples/mandelbrot/build/optimized.wat b/examples/mandelbrot/build/optimized.wat index 2936b04384..026da996c8 100644 --- a/examples/mandelbrot/build/optimized.wat +++ b/examples/mandelbrot/build/optimized.wat @@ -5,52 +5,51 @@ (import "env" "memory" (memory $0 0)) (import "Math" "log" (func $~lib/bindings/Math/log (param f64) (result f64))) (import "Math" "log2" (func $~lib/bindings/Math/log2 (param f64) (result f64))) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (export "computeLine" (func $assembly/index/computeLine)) (func $assembly/index/computeLine (; 2 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 f64) (local $5 f64) (local $6 f64) (local $7 i32) - (local $8 f64) + (local $8 i32) (local $9 f64) (local $10 f64) (local $11 f64) (local $12 f64) (local $13 f64) (local $14 f64) - f64.const 10 - f64.const 3 + (local $15 f64) local.get $1 f64.convert_i32_u - local.tee $8 - f64.mul - f64.const 4 - local.get $2 - f64.convert_i32_u - local.tee $4 + local.tee $9 + f64.const 0.625 f64.mul - f64.min - f64.div - local.set $9 + local.set $4 local.get $0 f64.convert_i32_u - local.get $4 + local.get $2 + f64.convert_i32_u + local.tee $6 f64.const 0.5 f64.mul f64.sub + f64.const 10 + f64.const 3 local.get $9 f64.mul - local.set $10 - local.get $8 - f64.const 0.625 + f64.const 4 + local.get $6 f64.mul - local.get $9 + f64.min + f64.div + local.tee $10 f64.mul - local.set $12 + local.set $11 + local.get $4 + local.get $10 + f64.mul + local.set $13 local.get $0 local.get $1 i32.mul @@ -62,34 +61,35 @@ f64.convert_i32_u local.tee $6 f64.div - local.set $13 + local.set $14 f64.const 8 local.get $6 f64.min - local.set $8 + local.set $15 loop $repeat|0 - local.get $7 - local.get $1 - i32.lt_u - if - local.get $7 + block $break|0 + local.get $8 + local.get $1 + i32.ge_u + br_if $break|0 + local.get $8 f64.convert_i32_u - local.get $9 + local.get $10 f64.mul - local.get $12 + local.get $13 f64.sub - local.set $11 + local.set $12 f64.const 0 local.set $4 f64.const 0 local.set $5 i32.const 0 - local.set $2 + local.set $7 loop $continue|1 local.get $4 local.get $4 f64.mul - local.tee $14 + local.tee $9 local.get $5 local.get $5 f64.mul @@ -104,31 +104,31 @@ f64.mul local.get $5 f64.mul - local.get $10 + local.get $11 f64.add local.set $5 - local.get $14 + local.get $9 local.get $6 f64.sub - local.get $11 + local.get $12 f64.add local.set $4 - local.get $2 + local.get $7 local.get $3 i32.ge_u br_if $break|1 - local.get $2 + local.get $7 i32.const 1 i32.add - local.set $2 + local.set $7 br $continue|1 end end end loop $continue|2 - local.get $2 + local.get $7 f64.convert_i32_u - local.get $8 + local.get $15 f64.lt if local.get $4 @@ -138,7 +138,7 @@ local.get $5 f64.mul f64.sub - local.get $11 + local.get $12 f64.add local.set $6 f64.const 2 @@ -146,19 +146,21 @@ f64.mul local.get $5 f64.mul - local.get $10 + local.get $11 f64.add local.set $5 local.get $6 local.set $4 - local.get $2 + local.get $7 i32.const 1 i32.add - local.set $2 + local.set $7 br $continue|2 end end - local.get $7 + i32.const 2047 + local.set $2 + local.get $8 i32.const 1 i32.shl local.get $0 @@ -175,7 +177,7 @@ f64.gt if (result i32) f64.const 2047 - local.get $2 + local.get $7 i32.const 1 i32.add f64.convert_i32_u @@ -185,7 +187,7 @@ f64.mul call $~lib/bindings/Math/log2 f64.sub - local.get $13 + local.get $14 f64.mul f64.const 0 f64.max @@ -197,10 +199,10 @@ i32.const 2047 end i32.store16 - local.get $7 + local.get $8 i32.const 1 i32.add - local.set $7 + local.set $8 br $repeat|0 end end diff --git a/examples/mandelbrot/build/untouched.wat b/examples/mandelbrot/build/untouched.wat index db2e3fde91..9b2e60e08f 100644 --- a/examples/mandelbrot/build/untouched.wat +++ b/examples/mandelbrot/build/untouched.wat @@ -1,7 +1,6 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$dd (func (param f64) (result f64))) - (type $FUNCSIG$dddd (func (param f64 f64 f64) (result f64))) (type $FUNCSIG$v (func)) (import "env" "memory" (memory $0 0)) (import "Math" "log" (func $~lib/bindings/Math/log (param f64) (result f64))) @@ -9,18 +8,9 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $assembly/index/NUM_COLORS i32 (i32.const 2048)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "computeLine" (func $assembly/index/computeLine)) - (func $assembly/index/clamp (; 2 ;) (type $FUNCSIG$dddd) (param $0 f64) (param $1 f64) (param $2 f64) (result f64) - local.get $0 - local.get $1 - f64.max - local.get $2 - f64.min - ) - (func $assembly/index/computeLine (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/index/computeLine (; 2 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 f64) (local $5 f64) (local $6 f64) @@ -39,6 +29,9 @@ (local $19 f64) (local $20 i32) (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) local.get $1 f64.convert_i32_u f64.const 1 @@ -222,17 +215,26 @@ i32.const 1 i32.sub f64.convert_i32_s - local.get $18 - i32.const 1 - i32.add - f64.convert_i32_u - local.get $21 - f64.sub - local.get $10 - f64.mul - f64.const 0 - f64.const 1 - call $assembly/index/clamp + block $assembly/index/clamp|inlined.0 (result f64) + local.get $18 + i32.const 1 + i32.add + f64.convert_i32_u + local.get $21 + f64.sub + local.get $10 + f64.mul + local.set $24 + f64.const 0 + local.set $23 + f64.const 1 + local.set $22 + local.get $24 + local.get $23 + f64.max + local.get $22 + f64.min + end f64.mul i32.trunc_f64_u local.set $20 @@ -255,6 +257,6 @@ unreachable end ) - (func $null (; 4 ;) (type $FUNCSIG$v) + (func $null (; 3 ;) (type $FUNCSIG$v) ) ) diff --git a/examples/n-body/assembly/index.js b/examples/n-body/assembly/index.js index 11c076b27a..3f84716427 100644 --- a/examples/n-body/assembly/index.js +++ b/examples/n-body/assembly/index.js @@ -9,7 +9,7 @@ const imports = { env: { memory: new WebAssembly.Memory({ initial: 10 }), abort: (filename, line, column) => { - throw Error("abort called at " + line + ":" + colum); + throw Error("abort called at " + line + ":" + column); } } }; diff --git a/examples/n-body/assembly/index.ts b/examples/n-body/assembly/index.ts index 8741406e7e..9a37c2d6ae 100644 --- a/examples/n-body/assembly/index.ts +++ b/examples/n-body/assembly/index.ts @@ -84,7 +84,7 @@ function Neptune(): Body { class NBodySystem { - constructor(public bodies: FixedArray) { + constructor(public bodies: Body[]) { var px: float = 0.0; var py: float = 0.0; var pz: float = 0.0; @@ -186,15 +186,13 @@ class NBodySystem { var system: NBodySystem; export function init(): void { - var bodies = new FixedArray(5); - unchecked(( - bodies[0] = Sun(), - bodies[1] = Jupiter(), - bodies[2] = Saturn(), - bodies[3] = Uranus(), - bodies[4] = Neptune() - )); - system = new NBodySystem(bodies); + system = new NBodySystem([ + Sun(), + Jupiter(), + Saturn(), + Uranus(), + Neptune() + ]); } export function step(): float { diff --git a/examples/n-body/build/index.asm.js b/examples/n-body/build/index.asm.js index a06bcd502d..1c85f4bef6 100644 --- a/examples/n-body/build/index.asm.js +++ b/examples/n-body/build/index.asm.js @@ -24,7 +24,7 @@ function asmFunc(global, env, buffer) { var $lib_allocator_arena_startOffset = 0; var $lib_allocator_arena_offset = 0; var i64toi32_i32$HIGH_BITS = 0; - function $lib_memory_memory_allocate($0) { + function $lib_allocator_arena___mem_allocate($0) { $0 = $0 | 0; var $1 = 0, $2 = 0, $3 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0; if ($0 >>> 0 > 1073741824 >>> 0) abort(); @@ -39,142 +39,53 @@ function asmFunc(global, env, buffer) { return $1 | 0; } - function $lib_runtime_doAllocate($0) { + function $lib_util_runtime_allocate($0) { $0 = $0 | 0; var $1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; - $1 = $lib_memory_memory_allocate(1 << (32 - Math_clz32($0 + 7 | 0) | 0) | 0 | 0) | 0; + $1 = $lib_allocator_arena___mem_allocate(1 << (32 - Math_clz32($0 + 15 | 0) | 0) | 0 | 0) | 0; wasm2js_i32$0 = $1; wasm2js_i32$1 = 2774420247; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; wasm2js_i32$0 = $1; wasm2js_i32$1 = $0; HEAP32[(wasm2js_i32$0 + 4 | 0) >> 2] = wasm2js_i32$1; - return $1 + 8 | 0 | 0; + return $1 + 16 | 0 | 0; } - function $lib_memory_memory_fill($0) { + function assembly_index_NBodySystem_constructor($0) { $0 = $0 | 0; - var $1 = 0, $2 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0, wasm2js_i32$3 = 0; - $lib_util_memory_memset_inlined_0 : { - wasm2js_i32$0 = $0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - $1 = $0 + 20 | 0; - wasm2js_i32$0 = $1 - 1 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 1 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 2 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - wasm2js_i32$0 = $1 - 2 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - wasm2js_i32$0 = $1 - 3 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 3 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - wasm2js_i32$0 = $1 - 4 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - $1 = (0 - $0 | 0) & 3 | 0; - $2 = 20 - $1 | 0; - $0 = $0 + $1 | 0; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - $2 = $2 & 4294967292 | 0; - wasm2js_i32$0 = ($2 + $0 | 0) - 4 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - if ($2 >>> 0 <= 8 >>> 0) break $lib_util_memory_memset_inlined_0; - wasm2js_i32$0 = $0 + 4 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 8 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - $1 = $0 + $2 | 0; - wasm2js_i32$0 = $1 - 12 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $1 - 8 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - if ($2 >>> 0 <= 24 >>> 0) break $lib_util_memory_memset_inlined_0; - wasm2js_i32$0 = $0 + 12 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 16 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 20 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 24 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - $1 = $0 + $2 | 0; - wasm2js_i32$0 = $1 - 28 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $1 - 24 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $1 - 20 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $1 - 16 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - $1 = ($0 & 4 | 0) + 24 | 0; - $0 = $1 + $0 | 0; - $2 = $2 - $1 | 0; - continue_0 : do { - if ($2 >>> 0 >= 32 >>> 0) { - i64toi32_i32$1 = $0; - i64toi32_i32$0 = 0; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = i64toi32_i32$0; - (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; - i64toi32_i32$1 = $0 + 8 | 0; - i64toi32_i32$0 = 0; - wasm2js_i32$0 = i64toi32_i32$1; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = i64toi32_i32$1; - wasm2js_i32$1 = i64toi32_i32$0; - (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; - i64toi32_i32$1 = $0 + 16 | 0; - i64toi32_i32$0 = 0; - wasm2js_i32$0 = i64toi32_i32$1; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = i64toi32_i32$1; - wasm2js_i32$1 = i64toi32_i32$0; - (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; - i64toi32_i32$1 = $0 + 24 | 0; - i64toi32_i32$0 = 0; - wasm2js_i32$0 = i64toi32_i32$1; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = i64toi32_i32$1; - wasm2js_i32$1 = i64toi32_i32$0; - (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; - $2 = $2 - 32 | 0; - $0 = $0 + 32 | 0; - continue continue_0; - } - break continue_0; - } while (1); - }; + var $1 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0; + $7 = HEAP32[($0 + 12 | 0) >> 2] | 0; + repeat_0 : do { + if (($1 | 0) < ($7 | 0)) { + $2 = HEAPU32[((HEAPU32[($0 + 4 | 0) >> 2] | 0) + ($1 << 2 | 0) | 0) >> 2] | 0; + $3 = +HEAPF64[($2 + 48 | 0) >> 3]; + $4 = $4 + +HEAPF64[($2 + 24 | 0) >> 3] * $3; + $5 = $5 + +HEAPF64[($2 + 32 | 0) >> 3] * $3; + $6 = $6 + +HEAPF64[($2 + 40 | 0) >> 3] * $3; + $1 = $1 + 1 | 0; + continue repeat_0; + } + break repeat_0; + } while (1); + $1 = HEAPU32[(HEAPU32[($0 + 4 | 0) >> 2] | 0) >> 2] | 0; + wasm2js_i32$0 = $1; + wasm2js_f64$0 = -$4 / 39.47841760435743; + HEAPF64[(wasm2js_i32$0 + 24 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $1; + wasm2js_f64$0 = -$5 / 39.47841760435743; + HEAPF64[(wasm2js_i32$0 + 32 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $1; + wasm2js_f64$0 = -$6 / 39.47841760435743; + HEAPF64[(wasm2js_i32$0 + 40 | 0) >> 3] = wasm2js_f64$0; + $1 = $lib_util_runtime_allocate(4 | 0) | 0; + wasm2js_i32$0 = $1 - 16 | 0; + wasm2js_i32$1 = 17; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $1; + wasm2js_i32$1 = $0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + return $1 | 0; } function assembly_index_Body_constructor($0, $1, $2, $3, $4, $5, $6) { @@ -186,9 +97,9 @@ function asmFunc(global, env, buffer) { $5 = +$5; $6 = +$6; var $7 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_f64$0 = 0.0; - $7 = $lib_runtime_doAllocate(56 | 0) | 0; - wasm2js_i32$0 = $7 - 8 | 0; - wasm2js_i32$1 = 3; + $7 = $lib_util_runtime_allocate(56 | 0) | 0; + wasm2js_i32$0 = $7 - 16 | 0; + wasm2js_i32$1 = 18; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; wasm2js_i32$0 = $7; wasm2js_f64$0 = $0; @@ -214,75 +125,61 @@ function asmFunc(global, env, buffer) { return $7 | 0; } - function assembly_index_NBodySystem_constructor($0) { - $0 = $0 | 0; - var $1 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0; - $7 = (HEAPU32[(($0 - 8 | 0) + 4 | 0) >> 2] | 0) >>> 2 | 0; - repeat_0 : do { - if (($1 | 0) < ($7 | 0)) { - $2 = HEAPU32[(($1 << 2 | 0) + $0 | 0) >> 2] | 0; - $3 = +HEAPF64[($2 + 48 | 0) >> 3]; - $4 = $4 + +HEAPF64[($2 + 24 | 0) >> 3] * $3; - $5 = $5 + +HEAPF64[($2 + 32 | 0) >> 3] * $3; - $6 = $6 + +HEAPF64[($2 + 40 | 0) >> 3] * $3; - $1 = $1 + 1 | 0; - continue repeat_0; - } - break repeat_0; - } while (1); - $1 = HEAPU32[$0 >> 2] | 0; - wasm2js_i32$0 = $1; - wasm2js_f64$0 = -$4 / 39.47841760435743; - HEAPF64[(wasm2js_i32$0 + 24 | 0) >> 3] = wasm2js_f64$0; - wasm2js_i32$0 = $1; - wasm2js_f64$0 = -$5 / 39.47841760435743; - HEAPF64[(wasm2js_i32$0 + 32 | 0) >> 3] = wasm2js_f64$0; - wasm2js_i32$0 = $1; - wasm2js_f64$0 = -$6 / 39.47841760435743; - HEAPF64[(wasm2js_i32$0 + 40 | 0) >> 3] = wasm2js_f64$0; - $1 = $lib_runtime_doAllocate(4 | 0) | 0; - wasm2js_i32$0 = $1 - 8 | 0; - wasm2js_i32$1 = 4; + function $lib_util_runtime_makeArray() { + var $0 = 0, $1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; + $0 = $lib_util_runtime_allocate(16 | 0) | 0; + wasm2js_i32$0 = $0 - 16 | 0; + wasm2js_i32$1 = 19; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $1; - wasm2js_i32$1 = $0; + $1 = $lib_util_runtime_allocate(20 | 0) | 0; + wasm2js_i32$0 = $1 - 16 | 0; + wasm2js_i32$1 = 15; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - return $1 | 0; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = $1; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = $1; + HEAP32[(wasm2js_i32$0 + 4 | 0) >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = 20; + HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = 5; + HEAP32[(wasm2js_i32$0 + 12 | 0) >> 2] = wasm2js_i32$1; + return $0 | 0; } function assembly_index_init() { - var $0 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; - $0 = $lib_runtime_doAllocate(20 | 0) | 0; - $lib_memory_memory_fill($0 | 0); - wasm2js_i32$0 = $0 - 8 | 0; - wasm2js_i32$1 = 2; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + var $0 = 0, $1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; + $1 = $lib_util_runtime_makeArray() | 0; + $0 = HEAPU32[($1 + 4 | 0) >> 2] | 0; wasm2js_i32$0 = $0; wasm2js_i32$1 = assembly_index_Body_constructor(+(0.0), +(0.0), +(0.0), +(0.0), +(0.0), +(0.0), +(39.47841760435743)) | 0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 4 | 0; + wasm2js_i32$0 = $0; wasm2js_i32$1 = assembly_index_Body_constructor(+(4.841431442464721), +(-1.1603200440274284), +(-.10362204447112311), +(.606326392995832), +(2.81198684491626), +(-.02521836165988763), +(.03769367487038949)) | 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 8 | 0; + HEAP32[(wasm2js_i32$0 + 4 | 0) >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; wasm2js_i32$1 = assembly_index_Body_constructor(+(8.34336671824458), +(4.124798564124305), +(-.4035234171143214), +(-1.0107743461787924), +(1.8256623712304119), +(.008415761376584154), +(.011286326131968767)) | 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 12 | 0; + HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; wasm2js_i32$1 = assembly_index_Body_constructor(+(12.894369562139131), +(-15.111151401698631), +(-.22330757889265573), +(1.0827910064415354), +(.8687130181696082), +(-.010832637401363636), +(1.7237240570597112e-03)) | 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 16 | 0; + HEAP32[(wasm2js_i32$0 + 12 | 0) >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; wasm2js_i32$1 = assembly_index_Body_constructor(+(15.379697114850917), +(-25.919314609987964), +(.17925877295037118), +(.979090732243898), +(.5946989986476762), +(-.034755955504078104), +(2.0336868699246304e-03)) | 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - assembly_index_system = assembly_index_NBodySystem_constructor($0 | 0) | 0; + HEAP32[(wasm2js_i32$0 + 16 | 0) >> 2] = wasm2js_i32$1; + assembly_index_system = assembly_index_NBodySystem_constructor($1 | 0) | 0; } function assembly_index_NBodySystem_advance($0) { $0 = $0 | 0; - var $1 = 0, $2 = 0.0, $8 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $9 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $18 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0; + var $1 = 0, $2 = 0.0, $8 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $9 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $107 = 0.0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0; $12 = HEAPU32[$0 >> 2] | 0; - $13 = (HEAPU32[(($12 - 8 | 0) + 4 | 0) >> 2] | 0) >>> 2 | 0; + $13 = HEAP32[($12 + 12 | 0) >> 2] | 0; repeat_0 : do { if ($3 >>> 0 < $13 >>> 0) { - $0 = HEAPU32[(($3 << 2 | 0) + $12 | 0) >> 2] | 0; + $0 = HEAPU32[((HEAPU32[($12 + 4 | 0) >> 2] | 0) + ($3 << 2 | 0) | 0) >> 2] | 0; $14 = +HEAPF64[$0 >> 3]; $15 = +HEAPF64[($0 + 8 | 0) >> 3]; $16 = +HEAPF64[($0 + 16 | 0) >> 3]; @@ -293,9 +190,8 @@ function asmFunc(global, env, buffer) { $7 = $3 + 1 | 0; repeat_1 : do { if ($7 >>> 0 < $13 >>> 0) { - $1 = HEAPU32[(($7 << 2 | 0) + $12 | 0) >> 2] | 0; - $18 = $14 - +HEAPF64[$1 >> 3]; - $2 = $18; + $1 = HEAPU32[((HEAPU32[($12 + 4 | 0) >> 2] | 0) + ($7 << 2 | 0) | 0) >> 2] | 0; + $2 = $14 - +HEAPF64[$1 >> 3]; $9 = $15 - +HEAPF64[($1 + 8 | 0) >> 3]; $10 = $16 - +HEAPF64[($1 + 16 | 0) >> 3]; $8 = $2 * $2 + $9 * $9 + $10 * $10; @@ -305,9 +201,10 @@ function asmFunc(global, env, buffer) { $4 = $4 - $2 * $8; $5 = $5 - $9 * $8; $6 = $6 - $10 * $8; + $107 = $2; $2 = $17 * $11; wasm2js_i32$0 = $1; - wasm2js_f64$0 = +HEAPF64[($1 + 24 | 0) >> 3] + $18 * $2; + wasm2js_f64$0 = +HEAPF64[($1 + 24 | 0) >> 3] + $107 * $2; HEAPF64[(wasm2js_i32$0 + 24 | 0) >> 3] = wasm2js_f64$0; wasm2js_i32$0 = $1; wasm2js_f64$0 = +HEAPF64[($1 + 32 | 0) >> 3] + $9 * $2; @@ -347,35 +244,33 @@ function asmFunc(global, env, buffer) { function assembly_index_NBodySystem_energy($0) { $0 = $0 | 0; - var $1 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $9 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $31 = 0.0, $40 = 0.0, $46 = 0.0, $10 = 0.0, $72 = 0.0, $86 = 0.0; + var $1 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $10 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, $30 = 0.0, $39 = 0.0, $45 = 0.0, $69 = 0.0, $84 = 0.0; $4 = HEAPU32[$0 >> 2] | 0; - $5 = (HEAPU32[(($4 - 8 | 0) + 4 | 0) >> 2] | 0) >>> 2 | 0; + $5 = HEAP32[($4 + 12 | 0) >> 2] | 0; repeat_0 : do { if ($2 >>> 0 < $5 >>> 0) { - $0 = HEAPU32[(($2 << 2 | 0) + $4 | 0) >> 2] | 0; - $6 = +HEAPF64[$0 >> 3]; - $7 = +HEAPF64[($0 + 8 | 0) >> 3]; - $8 = +HEAPF64[($0 + 16 | 0) >> 3]; - $31 = $1; - $9 = +HEAPF64[($0 + 48 | 0) >> 3]; + $0 = HEAPU32[((HEAPU32[($4 + 4 | 0) >> 2] | 0) + ($2 << 2 | 0) | 0) >> 2] | 0; + $7 = +HEAPF64[$0 >> 3]; + $8 = +HEAPF64[($0 + 8 | 0) >> 3]; + $9 = +HEAPF64[($0 + 16 | 0) >> 3]; + $30 = $1; + $10 = +HEAPF64[($0 + 48 | 0) >> 3]; $1 = +HEAPF64[($0 + 24 | 0) >> 3]; - $40 = $1 * $1; + $39 = $1 * $1; $1 = +HEAPF64[($0 + 32 | 0) >> 3]; - $46 = $40 + $1 * $1; + $45 = $39 + $1 * $1; $1 = +HEAPF64[($0 + 40 | 0) >> 3]; - $1 = $31 + .5 * $9 * ($46 + $1 * $1); + $1 = $30 + .5 * $10 * ($45 + $1 * $1); $0 = $2 + 1 | 0; repeat_1 : do { if ($0 >>> 0 < $5 >>> 0) { - $10 = $1; - $3 = HEAPU32[(($0 << 2 | 0) + $4 | 0) >> 2] | 0; - $1 = $6 - +HEAPF64[$3 >> 3]; - $72 = $1 * $1; - $1 = $7 - +HEAPF64[($3 + 8 | 0) >> 3]; - $1 = $72 + $1 * $1; - $86 = $1; - $1 = $8 - +HEAPF64[($3 + 16 | 0) >> 3]; - $1 = $10 - $9 * +HEAPF64[($3 + 48 | 0) >> 3] / Math_sqrt($86 + $1 * $1); + $3 = HEAPU32[((HEAPU32[($4 + 4 | 0) >> 2] | 0) + ($0 << 2 | 0) | 0) >> 2] | 0; + $6 = $7 - +HEAPF64[$3 >> 3]; + $69 = $1; + $1 = $8 - +HEAPF64[($3 + 8 | 0) >> 3]; + $84 = $6 * $6 + $1 * $1; + $1 = $9 - +HEAPF64[($3 + 16 | 0) >> 3]; + $1 = $69 - $10 * +HEAPF64[($3 + 48 | 0) >> 3] / Math_sqrt($84 + $1 * $1); $0 = $0 + 1 | 0; continue repeat_1; } @@ -410,14 +305,14 @@ function asmFunc(global, env, buffer) { function assembly_index_getBody($0) { $0 = $0 | 0; - var $1 = 0, $15 = 0; + var $1 = 0, $14 = 0; $1 = HEAPU32[assembly_index_system >> 2] | 0; - if ($0 >>> 0 < ((HEAPU32[(($1 - 8 | 0) + 4 | 0) >> 2] | 0) >>> 2 | 0) >>> 0) $15 = HEAPU32[(($0 << 2 | 0) + $1 | 0) >> 2] | 0; else $15 = 0; - return $15 | 0; + if ($0 >>> 0 < (HEAP32[($1 + 12 | 0) >> 2] | 0) >>> 0) $14 = HEAPU32[((HEAPU32[($1 + 4 | 0) >> 2] | 0) + ($0 << 2 | 0) | 0) >> 2] | 0; else $14 = 0; + return $14 | 0; } function start() { - $lib_allocator_arena_startOffset = 56; + $lib_allocator_arena_startOffset = 8; $lib_allocator_arena_offset = $lib_allocator_arena_startOffset; } @@ -425,7 +320,6 @@ function asmFunc(global, env, buffer) { } - var FUNCTION_TABLE_v = [null_]; function __wasm_grow_memory(pagesToAdd) { pagesToAdd = pagesToAdd | 0; var oldPages = __wasm_current_memory() | 0; @@ -471,23 +365,6 @@ function asmFunc(global, env, buffer) { } const memasmFunc = new ArrayBuffer(65536); -const assignasmFunc = ( - function(mem) { - const _mem = new Uint8Array(mem); - return function(offset, s) { - if (typeof Buffer === 'undefined') { - const bytes = atob(s); - for (let i = 0; i < bytes.length; i++) - _mem[offset + i] = bytes.charCodeAt(i); - } else { - const bytes = Buffer.from(s, 'base64'); - for (let i = 0; i < bytes.length; i++) - _mem[offset + i] = bytes[i]; - } - } - } - )(memasmFunc); -assignasmFunc(8, "AQAAACQAAAB+AGwAaQBiAC8AZgBpAHgAZQBkAGEAcgByAGEAeQAuAHQAcw=="); const retasmFunc = asmFunc({Math,Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,NaN,Infinity}, {abort:function() { throw new Error('abort'); }},memasmFunc); export const memory = retasmFunc.memory; export const init = retasmFunc.init; diff --git a/examples/n-body/build/index.js b/examples/n-body/build/index.js index 820b3773ed..ca3ead7976 100644 --- a/examples/n-body/build/index.js +++ b/examples/n-body/build/index.js @@ -49,7 +49,7 @@ class NBodySystem { py += b.vy * m; pz += b.vz * m; } - bodies[0].offsetMomentum(px, py, pz); + unchecked(bodies[0]).offsetMomentum(px, py, pz); } advance(dt) { var bodies = this.bodies; @@ -139,6 +139,6 @@ function bench(steps) { exports.bench = bench; function getBody(index) { var bodies = system.bodies; - return index < bodies.length ? bodies[index] : null; + return index < bodies.length ? unchecked(bodies[index]) : null; } exports.getBody = getBody; diff --git a/examples/n-body/build/optimized.wasm b/examples/n-body/build/optimized.wasm index 47d60e671710a32d5a1b5ffb34f31bba6a999a75..ea9364a216ef6c07353b6997c2e17d96d7d667b4 100644 GIT binary patch delta 583 zcmYLGOKTKC5Uxje&+PUl(;9Cg)J!H23}`Nno-}O~5)sjZcSUkpSp}a6!g%w%^ic$} z7a>RS2lzu2ym-z}(CS&EbC|Ecs`~1A6h5qYc=&vV0Dv3C+{^U`fIU^n2TxwP*}?4T zvo{35t1F0T9T+B~!7gx*5&ZvOao(PU&tJDZem|Lieu-5&hiBU`^}JR_En@l2DL%9t!ZF9 zqYN{vvP|{=z=(P~Div%;69Iorst=|?t>2_?d@=ptQ99--q1k1PPq!3RkdmS*(s#3a zAqWO)!M|g&{bZO18k0w|+Bb>a*O8PPp*+%EySFwlRyN%vXmE?+Fdf-P=+dhDc<&dI z>D}K%oD-R0Hzp@izTC|q1(nu?D3rDKwZ)+xiM^qR)9>fCY}szc>9^~;Vkw1_s+6nN zPOOYY-`fju;ucb7QXV!|?BbJ*(zLjLX+u{nu&!s(X0@Mv(@WlwZf-e()vNn4#InV8 JY{@gA{{tO7Sw{c> delta 987 zcmYLIO=}cE5Ur~2o}JC?#&Oxhf*yJ%i$nsN2(H0{ZX1OxC?3=wu+bHq&8nNkU?4c+ zK~El*_9g)n@ZwPr|As%on;!fDf)}gjYiF40*VV6Hy((rtHot@c40k6802q0*K;NcQ zC`M2By~$|uZ0CRg#bOgtDg-G=GEqu=4(NpNosGnwLQYwq}!<15SWLJ zg&&Kv4==E07w}B#C&6z*N~y2;^eO-^?IcEn<8q5hiKswms5nI@vEFpp3^9qCah4q zLY)%jI%g}L4x`l7Les8-VS(7m)O5Ho+l<(s#&JZV&qnoK+1GFbu87=aiNd5rodPkJ zleiVl5)BOax`mjU^$_ElYeV$xAMAC%B8gNUx}L|&Bn|CHf=i(mn_P;Ay{Ewr(Af8Q z?L4Q+%(Twtguz?kG~28Rp)1A&as>OD&e6V&934 zH710z3&9&fDs8f-WrA4FjVU(+tp;q2oH1$tip`eDVB)yABH%b~*?aOKw(NI#bpIEU zOua%%%%x=3qjXYPk0Q$l&W}9Jiyzh85=OpOHzB)zUU!kzxNbkI-eskk=PKu!lvP$* zo#>k8jei`w&8JA|y4$awXr+C7+Iuiw=8GJamw&4kE!9{q?>q{8HBN)OC-$OWn3$O>f{{f8>nJNGP diff --git a/examples/n-body/build/optimized.wat b/examples/n-body/build/optimized.wat index 4c40794ce6..a1504ac147 100644 --- a/examples/n-body/build/optimized.wat +++ b/examples/n-body/build/optimized.wat @@ -5,21 +5,18 @@ (type $FUNCSIG$di (func (param i32) (result f64))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iddddddd (func (param f64 f64 f64 f64 f64 f64 f64) (result i32))) - (import "env" "memory" (memory $0 1)) - (data (i32.const 8) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00f\00i\00x\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (type $FUNCSIG$i (func (result i32))) + (import "env" "memory" (memory $0 0)) (global $assembly/index/system (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)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "init" (func $assembly/index/init)) (export "step" (func $assembly/index/step)) (export "bench" (func $assembly/index/bench)) (export "getBody" (func $assembly/index/getBody)) (start $start) - (func $~lib/memory/memory.allocate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -81,17 +78,17 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/doAllocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub i32.shl - call $~lib/memory/memory.allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 i32.const -1520547049 i32.store @@ -99,235 +96,10 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - i32.const 20 - i32.add - local.tee $1 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - 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 $1 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 3 - i32.add - i32.const 0 - i32.store8 - local.get $1 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - i32.const 20 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $1 - i32.sub - local.set $2 - local.get $0 - local.get $1 - i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $2 - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 4 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $2 - i32.add - local.tee $1 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 12 - i32.add - 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 $2 - i32.add - local.tee $1 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $1 - 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 $1 - local.get $0 - i32.add - local.set $0 - local.get $2 - local.get $1 - i32.sub - local.set $2 - loop $continue|0 - local.get $2 - 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 $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $continue|0 - end - end - end - ) - (func $assembly/index/Body#constructor (; 3 ;) (type $FUNCSIG$iddddddd) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) - (local $7 i32) - i32.const 56 - call $~lib/runtime/doAllocate - local.tee $7 - i32.const 8 - i32.sub - i32.const 3 - i32.store - local.get $7 - local.get $0 - f64.store - local.get $7 - local.get $1 - f64.store offset=8 - local.get $7 - local.get $2 - f64.store offset=16 - local.get $7 - local.get $3 - f64.store offset=24 - local.get $7 - local.get $4 - f64.store offset=32 - local.get $7 - local.get $5 - f64.store offset=40 - local.get $7 - local.get $6 - f64.store offset=48 - local.get $7 - ) - (func $assembly/index/NBodySystem#constructor (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/NBodySystem#constructor (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -336,21 +108,18 @@ (local $6 f64) (local $7 i32) local.get $0 - i32.const 8 - i32.sub - i32.load offset=4 - i32.const 2 - i32.shr_u + i32.load offset=12 local.set $7 loop $repeat|0 local.get $1 local.get $7 i32.lt_s if + local.get $0 + i32.load offset=4 local.get $1 i32.const 2 i32.shl - local.get $0 i32.add i32.load local.tee $2 @@ -385,6 +154,7 @@ end end local.get $0 + i32.load offset=4 i32.load local.tee $1 local.get $4 @@ -405,29 +175,87 @@ f64.div f64.store offset=40 i32.const 4 - call $~lib/runtime/doAllocate + call $~lib/util/runtime/allocate local.tee $1 - i32.const 8 + i32.const 16 i32.sub - i32.const 4 + i32.const 17 i32.store local.get $1 local.get $0 i32.store local.get $1 ) - (func $assembly/index/init (; 5 ;) (type $FUNCSIG$v) + (func $assembly/index/Body#constructor (; 3 ;) (type $FUNCSIG$iddddddd) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (local $7 i32) + i32.const 56 + call $~lib/util/runtime/allocate + local.tee $7 + i32.const 16 + i32.sub + i32.const 18 + i32.store + local.get $7 + local.get $0 + f64.store + local.get $7 + local.get $1 + f64.store offset=8 + local.get $7 + local.get $2 + f64.store offset=16 + local.get $7 + local.get $3 + f64.store offset=24 + local.get $7 + local.get $4 + f64.store offset=32 + local.get $7 + local.get $5 + f64.store offset=40 + local.get $7 + local.get $6 + f64.store offset=48 + local.get $7 + ) + (func $~lib/util/runtime/makeArray (; 4 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) - i32.const 20 - call $~lib/runtime/doAllocate + (local $1 i32) + i32.const 16 + call $~lib/util/runtime/allocate local.tee $0 - call $~lib/memory/memory.fill - local.get $0 - i32.const 8 + i32.const 16 + i32.sub + i32.const 19 + i32.store + i32.const 20 + call $~lib/util/runtime/allocate + local.tee $1 + i32.const 16 i32.sub - i32.const 2 + i32.const 15 + i32.store + local.get $0 + local.get $1 i32.store local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 20 + i32.store offset=8 + local.get $0 + i32.const 5 + i32.store offset=12 + local.get $0 + ) + (func $assembly/index/init (; 5 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + call $~lib/util/runtime/makeArray + local.tee $1 + i32.load offset=4 + local.tee $0 f64.const 0 f64.const 0 f64.const 0 @@ -438,8 +266,6 @@ call $assembly/index/Body#constructor i32.store local.get $0 - i32.const 4 - i32.add f64.const 4.841431442464721 f64.const -1.1603200440274284 f64.const -0.10362204447112311 @@ -448,10 +274,8 @@ f64.const -0.02521836165988763 f64.const 0.03769367487038949 call $assembly/index/Body#constructor - i32.store + i32.store offset=4 local.get $0 - i32.const 8 - i32.add f64.const 8.34336671824458 f64.const 4.124798564124305 f64.const -0.4035234171143214 @@ -460,10 +284,8 @@ f64.const 0.008415761376584154 f64.const 0.011286326131968767 call $assembly/index/Body#constructor - i32.store + i32.store offset=8 local.get $0 - i32.const 12 - i32.add f64.const 12.894369562139131 f64.const -15.111151401698631 f64.const -0.22330757889265573 @@ -472,10 +294,8 @@ f64.const -0.010832637401363636 f64.const 1.7237240570597112e-03 call $assembly/index/Body#constructor - i32.store + i32.store offset=12 local.get $0 - i32.const 16 - i32.add f64.const 15.379697114850917 f64.const -25.919314609987964 f64.const 0.17925877295037118 @@ -484,8 +304,8 @@ f64.const -0.034755955504078104 f64.const 2.0336868699246304e-03 call $assembly/index/Body#constructor - i32.store - local.get $0 + i32.store offset=16 + local.get $1 call $assembly/index/NBodySystem#constructor global.set $assembly/index/system ) @@ -507,25 +327,21 @@ (local $15 f64) (local $16 f64) (local $17 f64) - (local $18 f64) local.get $0 i32.load local.tee $12 - i32.const 8 - i32.sub - i32.load offset=4 - i32.const 2 - i32.shr_u + i32.load offset=12 local.set $13 loop $repeat|0 local.get $3 local.get $13 i32.lt_u if + local.get $12 + i32.load offset=4 local.get $3 i32.const 2 i32.shl - local.get $12 i32.add i32.load local.tee $0 @@ -559,16 +375,16 @@ i32.lt_u if local.get $14 + local.get $12 + i32.load offset=4 local.get $7 i32.const 2 i32.shl - local.get $12 i32.add i32.load local.tee $1 f64.load f64.sub - local.tee $18 local.tee $2 local.get $2 f64.mul @@ -621,7 +437,7 @@ local.get $1 local.get $1 f64.load offset=24 - local.get $18 + local.get $2 local.get $17 local.get $11 f64.mul @@ -707,37 +523,34 @@ local.get $0 i32.load local.tee $4 - i32.const 8 - i32.sub - i32.load offset=4 - i32.const 2 - i32.shr_u + i32.load offset=12 local.set $5 loop $repeat|0 local.get $2 local.get $5 i32.lt_u if + local.get $4 + i32.load offset=4 local.get $2 i32.const 2 i32.shl - local.get $4 i32.add i32.load local.tee $0 f64.load - local.set $6 + local.set $7 local.get $0 f64.load offset=8 - local.set $7 + local.set $8 local.get $0 f64.load offset=16 - local.set $8 + local.set $9 local.get $1 f64.const 0.5 local.get $0 f64.load offset=48 - local.tee $9 + local.tee $10 f64.mul local.get $0 f64.load offset=24 @@ -768,22 +581,27 @@ local.get $5 i32.lt_u if - local.get $1 - local.set $10 - local.get $6 + local.get $7 + local.get $4 + i32.load offset=4 local.get $0 i32.const 2 i32.shl - local.get $4 i32.add i32.load local.tee $3 f64.load f64.sub - local.tee $1 + local.set $6 local.get $1 + local.get $10 + local.get $3 + f64.load offset=48 f64.mul - local.get $7 + local.get $6 + local.get $6 + f64.mul + local.get $8 local.get $3 f64.load offset=8 f64.sub @@ -791,15 +609,8 @@ local.get $1 f64.mul f64.add - local.set $1 - local.get $10 local.get $9 local.get $3 - f64.load offset=48 - f64.mul - local.get $1 - local.get $8 - local.get $3 f64.load offset=16 f64.sub local.tee $1 @@ -858,17 +669,14 @@ global.get $assembly/index/system i32.load local.tee $1 - i32.const 8 - i32.sub - i32.load offset=4 - i32.const 2 - i32.shr_u + i32.load offset=12 i32.lt_u if (result i32) + local.get $1 + i32.load offset=4 local.get $0 i32.const 2 i32.shl - local.get $1 i32.add i32.load else @@ -876,7 +684,7 @@ end ) (func $start (; 11 ;) (type $FUNCSIG$v) - i32.const 56 + i32.const 8 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset diff --git a/examples/n-body/build/untouched.wat b/examples/n-body/build/untouched.wat index 6712a5379c..629228a815 100644 --- a/examples/n-body/build/untouched.wat +++ b/examples/n-body/build/untouched.wat @@ -1,46 +1,77 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$iiddd (func (param i32 f64 f64 f64) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iiddddddd (func (param i32 f64 f64 f64 f64 f64 f64 f64) (result i32))) - (type $FUNCSIG$iiddd (func (param i32 f64 f64 f64) (result i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$d (func (result f64))) (type $FUNCSIG$vid (func (param i32 f64))) (type $FUNCSIG$di (func (param i32) (result f64))) + (type $FUNCSIG$vi (func (param i32))) (import "env" "memory" (memory $0 1)) - (data (i32.const 8) "\01\00\00\00$\00\00\00~\00l\00i\00b\00/\00f\00i\00x\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 56) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/math/NativeMath.PI f64 (f64.const 3.141592653589793)) (global $assembly/index/SOLAR_MASS f64 (f64.const 39.47841760435743)) (global $assembly/index/DAYS_PER_YEAR f64 (f64.const 365.24)) (global $assembly/index/system (mut 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_MAGIC i32 (i32.const -1520547049)) - (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 96)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "init" (func $assembly/index/init)) (export "step" (func $assembly/index/step)) (export "bench" (func $assembly/index/bench)) (export "getBody" (func $assembly/index/getBody)) (start $start) - (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $~lib/array/Array#__unchecked_get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $assembly/index/Body#offsetMomentum (; 3 ;) (type $FUNCSIG$iiddd) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + local.get $0 + local.get $1 + f64.neg + global.get $assembly/index/SOLAR_MASS + f64.div + f64.store offset=24 + local.get $0 + local.get $2 + f64.neg + global.get $assembly/index/SOLAR_MASS + f64.div + f64.store offset=32 + local.get $0 + local.get $3 + f64.neg + global.get $assembly/index/SOLAR_MASS + f64.div + f64.store offset=40 + local.get $0 + ) + (func $~lib/util/runtime/adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -48,459 +79,237 @@ i32.sub i32.shl ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $2 - local.get $2 - local.get $1 - local.tee $3 - i32.const 1 - local.tee $4 - local.get $3 + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $1 + local.get $1 + local.get $0 + local.tee $2 + i32.const 1 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $4 + current_memory + local.set $5 + local.get $4 + local.get $5 + i32.const 16 + i32.shl + i32.gt_u + if local.get $4 - i32.gt_u - select - i32.add - i32.const 7 + local.get $1 + i32.sub + i32.const 65535 i32.add - i32.const 7 + i32.const 65535 i32.const -1 i32.xor i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $5 + local.tee $3 + local.get $2 + local.tee $6 + local.get $3 + local.get $6 + i32.gt_s + select local.set $3 - current_memory - local.set $4 local.get $3 - local.get $4 - i32.const 16 - i32.shl - i32.gt_u + grow_memory + i32.const 0 + i32.lt_s if - local.get $3 local.get $2 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $5 - local.get $4 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $6 - local.get $6 grow_memory i32.const 0 i32.lt_s if - local.get $5 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $3 - global.set $~lib/allocator/arena/offset - local.get $2 end + local.get $4 + global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/memory/memory.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - call $~lib/runtime/ADJUSTOBLOCK + call $~lib/util/runtime/adjust call $~lib/memory/memory.allocate local.set $1 local.get $1 - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 local.get $0 i32.store offset=4 local.get $1 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.add ) - (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i64) - block $~lib/util/memory/memset|inlined.0 - local.get $2 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - end - br $continue|0 - end - end - end - end - ) - (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/util/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE i32.gt_u i32.eqz if i32.const 0 - i32.const 64 - i32.const 199 - i32.const 2 - call $~lib/env/abort + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort unreachable end local.get $0 - global.get $~lib/runtime/HEADER_SIZE + global.get $~lib/util/runtime/HEADER_SIZE i32.sub + local.set $2 + local.get $2 i32.load - global.get $~lib/runtime/HEADER_MAGIC + global.get $~lib/util/runtime/HEADER_MAGIC i32.eq i32.eqz if i32.const 0 - i32.const 64 - i32.const 200 - i32.const 2 - call $~lib/env/abort + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort unreachable end - ) - (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - call $~lib/runtime/assertUnregistered - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub + local.get $2 local.get $1 i32.store local.get $0 ) - (func $~lib/fixedarray/FixedArray#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $assembly/index/NBodySystem#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 f64) + f64.const 0 + local.set $2 + f64.const 0 + local.set $3 + f64.const 0 + local.set $4 local.get $1 - global.get $~lib/runtime/MAX_BYTELENGTH - i32.const 2 - i32.shr_u - i32.gt_u - if + call $~lib/array/Array#get:length + local.set $5 + block $break|0 i32.const 0 - i32.const 16 - i32.const 12 - i32.const 60 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - block $~lib/runtime/ALLOCATE|inlined.0 (result i32) - local.get $2 - local.set $3 - local.get $3 - call $~lib/runtime/doAllocate + local.set $6 + loop $repeat|0 + local.get $6 + local.get $5 + i32.lt_s + i32.eqz + br_if $break|0 + block + local.get $1 + local.get $6 + call $~lib/array/Array#__unchecked_get + local.set $7 + local.get $7 + f64.load offset=48 + local.set $8 + local.get $2 + local.get $7 + f64.load offset=24 + local.get $8 + f64.mul + f64.add + local.set $2 + local.get $3 + local.get $7 + f64.load offset=32 + local.get $8 + f64.mul + f64.add + local.set $3 + local.get $4 + local.get $7 + f64.load offset=40 + local.get $8 + f64.mul + f64.add + local.set $4 + end + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $repeat|0 + unreachable + end + unreachable end - local.set $4 - local.get $4 + local.get $1 i32.const 0 + call $~lib/array/Array#__unchecked_get local.get $2 - call $~lib/memory/memory.fill - block $~lib/runtime/REGISTER>|inlined.0 (result i32) - local.get $4 - local.set $3 - local.get $3 - i32.const 2 - call $~lib/runtime/doRegister + local.get $3 + local.get $4 + call $assembly/index/Body#offsetMomentum + drop + local.get $0 + i32.eqz + if + i32.const 4 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + local.set $0 end + local.get $0 + local.get $1 + i32.store + local.get $0 ) - (func $assembly/index/Body#constructor (; 8 ;) (type $FUNCSIG$iiddddddd) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (result i32) - (local $8 i32) + (func $assembly/index/Body#constructor (; 10 ;) (type $FUNCSIG$iiddddddd) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (result i32) local.get $0 i32.eqz if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.1 (result i32) - i32.const 56 - local.set $8 - local.get $8 - call $~lib/runtime/doAllocate - end - local.set $8 - local.get $8 - i32.const 3 - call $~lib/runtime/doRegister - end + i32.const 56 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -526,7 +335,7 @@ f64.store offset=48 local.get $0 ) - (func $assembly/index/Sun (; 9 ;) (type $FUNCSIG$i) (result i32) + (func $assembly/index/Sun (; 11 ;) (type $FUNCSIG$i) (result i32) i32.const 0 f64.const 0 f64.const 0 @@ -537,16 +346,255 @@ global.get $assembly/index/SOLAR_MASS call $assembly/index/Body#constructor ) - (func $~lib/fixedarray/FixedArray#__unchecked_set (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|2 + end + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + end + ) + (func $~lib/util/runtime/makeArray (; 13 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 16 + call $~lib/util/runtime/allocate + local.get $2 + call $~lib/util/runtime/register + local.set $4 local.get $0 local.get $1 - i32.const 2 i32.shl - i32.add - local.get $2 + local.set $5 + local.get $5 + call $~lib/util/runtime/allocate + i32.const 15 + call $~lib/util/runtime/register + local.set $6 + local.get $4 + local.get $6 i32.store + local.get $4 + local.get $6 + i32.store offset=4 + local.get $4 + local.get $5 + i32.store offset=8 + local.get $4 + local.get $0 + i32.store offset=12 + local.get $3 + if + local.get $6 + local.get $3 + local.get $5 + call $~lib/memory/memory.copy + end + local.get $4 ) - (func $assembly/index/Jupiter (; 11 ;) (type $FUNCSIG$i) (result i32) + (func $assembly/index/Jupiter (; 14 ;) (type $FUNCSIG$i) (result i32) i32.const 0 f64.const 4.841431442464721 f64.const -1.1603200440274284 @@ -565,7 +613,7 @@ f64.mul call $assembly/index/Body#constructor ) - (func $assembly/index/Saturn (; 12 ;) (type $FUNCSIG$i) (result i32) + (func $assembly/index/Saturn (; 15 ;) (type $FUNCSIG$i) (result i32) i32.const 0 f64.const 8.34336671824458 f64.const 4.124798564124305 @@ -584,7 +632,7 @@ f64.mul call $assembly/index/Body#constructor ) - (func $assembly/index/Uranus (; 13 ;) (type $FUNCSIG$i) (result i32) + (func $assembly/index/Uranus (; 16 ;) (type $FUNCSIG$i) (result i32) i32.const 0 f64.const 12.894369562139131 f64.const -15.111151401698631 @@ -603,7 +651,7 @@ f64.mul call $assembly/index/Body#constructor ) - (func $assembly/index/Neptune (; 14 ;) (type $FUNCSIG$i) (result i32) + (func $assembly/index/Neptune (; 17 ;) (type $FUNCSIG$i) (result i32) i32.const 0 f64.const 15.379697114850917 f64.const -25.919314609987964 @@ -622,170 +670,41 @@ f64.mul call $assembly/index/Body#constructor ) - (func $~lib/fixedarray/FixedArray#get:length (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - global.get $~lib/runtime/HEADER_SIZE - i32.sub - i32.load offset=4 - i32.const 2 - i32.shr_u - ) - (func $~lib/fixedarray/FixedArray#__unchecked_get (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - ) - (func $assembly/index/Body#offsetMomentum (; 17 ;) (type $FUNCSIG$iiddd) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) - local.get $0 - local.get $1 - f64.neg - global.get $assembly/index/SOLAR_MASS - f64.div - f64.store offset=24 - local.get $0 - local.get $2 - f64.neg - global.get $assembly/index/SOLAR_MASS - f64.div - f64.store offset=32 - local.get $0 - local.get $3 - f64.neg - global.get $assembly/index/SOLAR_MASS - f64.div - f64.store offset=40 - local.get $0 - ) - (func $assembly/index/NBodySystem#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 f64) - (local $4 f64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 f64) - f64.const 0 - local.set $2 - f64.const 0 - local.set $3 - f64.const 0 - local.set $4 - local.get $1 - call $~lib/fixedarray/FixedArray#get:length - local.set $5 - block $break|0 - i32.const 0 - local.set $6 - loop $repeat|0 - local.get $6 - local.get $5 - i32.lt_s - i32.eqz - br_if $break|0 - block - local.get $1 - local.get $6 - call $~lib/fixedarray/FixedArray#__unchecked_get - local.set $7 - local.get $7 - f64.load offset=48 - local.set $8 - local.get $2 - local.get $7 - f64.load offset=24 - local.get $8 - f64.mul - f64.add - local.set $2 - local.get $3 - local.get $7 - f64.load offset=32 - local.get $8 - f64.mul - f64.add - local.set $3 - local.get $4 - local.get $7 - f64.load offset=40 - local.get $8 - f64.mul - f64.add - local.set $4 - end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $repeat|0 - unreachable - end - unreachable - end - local.get $1 + (func $assembly/index/init (; 18 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) i32.const 0 - call $~lib/fixedarray/FixedArray#__unchecked_get - local.get $2 - local.get $3 - local.get $4 - call $assembly/index/Body#offsetMomentum - drop - local.get $0 - i32.eqz - if - block $~lib/runtime/REGISTER|inlined.0 (result i32) - block $~lib/runtime/ALLOCATE|inlined.2 (result i32) - i32.const 4 - local.set $6 - local.get $6 - call $~lib/runtime/doAllocate - end - local.set $6 - local.get $6 - i32.const 4 - call $~lib/runtime/doRegister - end + block (result i32) + i32.const 5 + i32.const 2 + i32.const 19 + i32.const 0 + call $~lib/util/runtime/makeArray local.set $0 + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + call $assembly/index/Sun + i32.store + local.get $1 + call $assembly/index/Jupiter + i32.store offset=4 + local.get $1 + call $assembly/index/Saturn + i32.store offset=8 + local.get $1 + call $assembly/index/Uranus + i32.store offset=12 + local.get $1 + call $assembly/index/Neptune + i32.store offset=16 + local.get $0 end - local.get $0 - local.get $1 - i32.store - local.get $0 - ) - (func $assembly/index/init (; 19 ;) (type $FUNCSIG$v) - (local $0 i32) - i32.const 0 - i32.const 5 - call $~lib/fixedarray/FixedArray#constructor - local.set $0 - local.get $0 - i32.const 0 - call $assembly/index/Sun - call $~lib/fixedarray/FixedArray#__unchecked_set - local.get $0 - i32.const 1 - call $assembly/index/Jupiter - call $~lib/fixedarray/FixedArray#__unchecked_set - local.get $0 - i32.const 2 - call $assembly/index/Saturn - call $~lib/fixedarray/FixedArray#__unchecked_set - local.get $0 - i32.const 3 - call $assembly/index/Uranus - call $~lib/fixedarray/FixedArray#__unchecked_set - local.get $0 - i32.const 4 - call $assembly/index/Neptune - call $~lib/fixedarray/FixedArray#__unchecked_set - i32.const 0 - local.get $0 call $assembly/index/NBodySystem#constructor global.set $assembly/index/system ) - (func $assembly/index/NBodySystem#advance (; 20 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $assembly/index/NBodySystem#advance (; 19 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -811,7 +730,7 @@ i32.load local.set $2 local.get $2 - call $~lib/fixedarray/FixedArray#get:length + call $~lib/array/Array#get:length local.set $3 block $break|0 i32.const 0 @@ -825,7 +744,7 @@ block local.get $2 local.get $4 - call $~lib/fixedarray/FixedArray#__unchecked_get + call $~lib/array/Array#__unchecked_get local.set $5 local.get $5 f64.load @@ -862,7 +781,7 @@ block local.get $2 local.get $13 - call $~lib/fixedarray/FixedArray#__unchecked_get + call $~lib/array/Array#__unchecked_get local.set $14 local.get $6 local.get $14 @@ -1009,7 +928,7 @@ unreachable end ) - (func $assembly/index/NBodySystem#energy (; 21 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $assembly/index/NBodySystem#energy (; 20 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -1038,7 +957,7 @@ i32.const 0 local.set $3 local.get $2 - call $~lib/fixedarray/FixedArray#get:length + call $~lib/array/Array#get:length local.set $4 end loop $repeat|0 @@ -1050,7 +969,7 @@ block local.get $2 local.get $3 - call $~lib/fixedarray/FixedArray#__unchecked_get + call $~lib/array/Array#__unchecked_get local.set $5 local.get $5 f64.load @@ -1105,7 +1024,7 @@ block local.get $2 local.get $13 - call $~lib/fixedarray/FixedArray#__unchecked_get + call $~lib/array/Array#__unchecked_get local.set $14 local.get $6 local.get $14 @@ -1170,14 +1089,14 @@ end local.get $1 ) - (func $assembly/index/step (; 22 ;) (type $FUNCSIG$d) (result f64) + (func $assembly/index/step (; 21 ;) (type $FUNCSIG$d) (result f64) global.get $assembly/index/system f64.const 0.01 call $assembly/index/NBodySystem#advance global.get $assembly/index/system call $assembly/index/NBodySystem#energy ) - (func $assembly/index/bench (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/bench (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) block $break|0 i32.const 0 @@ -1201,24 +1120,24 @@ unreachable end ) - (func $assembly/index/getBody (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/getBody (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) global.get $assembly/index/system i32.load local.set $1 local.get $0 local.get $1 - call $~lib/fixedarray/FixedArray#get:length + call $~lib/array/Array#get:length i32.lt_u if (result i32) local.get $1 local.get $0 - call $~lib/fixedarray/FixedArray#__unchecked_get + call $~lib/array/Array#__unchecked_get else i32.const 0 end ) - (func $start (; 25 ;) (type $FUNCSIG$v) + (func $start (; 24 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -1230,6 +1149,6 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 26 ;) (type $FUNCSIG$v) + (func $null (; 25 ;) (type $FUNCSIG$v) ) ) diff --git a/examples/pson/build/optimized.wat b/examples/pson/build/optimized.wat index e996c355e7..b8ba316970 100644 --- a/examples/pson/build/optimized.wat +++ b/examples/pson/build/optimized.wat @@ -21,11 +21,8 @@ (import "pson" "onString" (func $assembly/pson/onString (param i32 i32))) (import "pson" "onBinary" (func $assembly/pson/onBinary (param i32 i32))) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $assembly/pson/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "onNull" (func $assembly/pson/onNull)) (export "onTrue" (func $assembly/pson/onTrue)) (export "onFalse" (func $assembly/pson/onFalse)) @@ -120,7 +117,7 @@ (local $2 i64) block $break|0 global.get $assembly/pson/offset - local.tee $1 + local.tee $0 i32.const 1 i32.add global.set $assembly/pson/offset @@ -141,7 +138,7 @@ block $case1|0 block $case0|0 block $tablify|0 - local.get $1 + local.get $0 i32.load8_u local.tee $0 local.tee $1 diff --git a/examples/pson/build/untouched.wat b/examples/pson/build/untouched.wat index e7a6be1ed1..2f37a02804 100644 --- a/examples/pson/build/untouched.wat +++ b/examples/pson/build/untouched.wat @@ -24,9 +24,7 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $assembly/pson/offset (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "onNull" (func $assembly/pson/onNull)) (export "onTrue" (func $assembly/pson/onTrue)) (export "onFalse" (func $assembly/pson/onFalse)) diff --git a/lib/parse/build/index.wat b/lib/parse/build/index.wat index 4955d09220..84a5cab80d 100644 --- a/lib/parse/build/index.wat +++ b/lib/parse/build/index.wat @@ -29,36 +29,8 @@ (import "options" "onFunctionName" (func $assembly/options/onFunctionName (param i32 i32 i32))) (import "options" "onLocalName" (func $assembly/options/onLocalName (param i32 i32 i32 i32))) (import "options" "onSourceMappingURL" (func $assembly/options/onSourceMappingURL (param i32 i32))) - (table $0 1 funcref) - (elem (i32.const 0) $null) - (global $src/common/SectionId.Custom (mut i32) (i32.const 0)) - (global $src/common/SectionId.Type (mut i32) (i32.const 1)) - (global $src/common/SectionId.Import (mut i32) (i32.const 2)) - (global $src/common/SectionId.Function (mut i32) (i32.const 3)) - (global $src/common/SectionId.Table (mut i32) (i32.const 4)) - (global $src/common/SectionId.Memory (mut i32) (i32.const 5)) - (global $src/common/SectionId.Global (mut i32) (i32.const 6)) - (global $src/common/SectionId.Export (mut i32) (i32.const 7)) - (global $src/common/SectionId.Start (mut i32) (i32.const 8)) - (global $src/common/SectionId.Element (mut i32) (i32.const 9)) - (global $src/common/SectionId.Code (mut i32) (i32.const 10)) - (global $src/common/SectionId.Data (mut i32) (i32.const 11)) - (global $src/common/ExternalKind.Function (mut i32) (i32.const 0)) - (global $src/common/ExternalKind.Table (mut i32) (i32.const 1)) - (global $src/common/ExternalKind.Memory (mut i32) (i32.const 2)) - (global $src/common/ExternalKind.Global (mut i32) (i32.const 3)) - (global $src/common/NameType.Module (mut i32) (i32.const 0)) - (global $src/common/NameType.Function (mut i32) (i32.const 1)) - (global $src/common/NameType.Local (mut i32) (i32.const 2)) - (global $src/common/Opcode.end (mut i32) (i32.const 11)) - (global $src/common/Opcode.get_global (mut i32) (i32.const 35)) - (global $src/common/Opcode.i32_const (mut i32) (i32.const 65)) - (global $src/common/Opcode.i64_const (mut i32) (i32.const 66)) - (global $src/common/Opcode.f32_const (mut i32) (i32.const 67)) - (global $src/common/Opcode.f64_const (mut i32) (i32.const 68)) (global $assembly/index/off (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "parse" (func $assembly/index/parse)) (func $assembly/index/readVaruint (; 19 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) @@ -103,57 +75,51 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $assembly/index/off - local.set $2 + local.set $4 loop $continue|0 - local.get $2 - local.tee $4 + local.get $4 + local.tee $3 i32.const 1 i32.add - local.set $2 - local.get $4 + local.set $4 + local.get $3 i32.load8_u - local.tee $5 + local.tee $3 i32.const 127 i32.and local.get $1 i32.shl - local.get $3 + local.get $2 i32.or - local.set $3 + local.set $2 local.get $1 i32.const 7 i32.add local.set $1 - local.get $5 + local.get $3 i32.const 128 i32.and br_if $continue|0 end - local.get $2 + local.get $4 global.set $assembly/index/off i32.const -1 local.get $1 i32.shl - local.get $3 + local.get $2 i32.or - local.set $2 + local.get $2 + local.get $3 + i32.const 64 + i32.and + i32.const 0 + i32.ne + i32.const 0 local.get $1 local.get $0 i32.lt_u - local.tee $4 - if - local.get $5 - i32.const 64 - i32.and - i32.const 0 - i32.ne - local.set $4 - end - local.get $2 - local.get $3 - local.get $4 + select select ) (func $assembly/index/readVarint64 (; 21 ;) (type $FUNCSIG$v) @@ -211,24 +177,24 @@ block $case3|0 block $case2|0 block $case1|0 - global.get $src/common/Opcode.i32_const local.get $0 + i32.const 65 i32.ne if - global.get $src/common/Opcode.i64_const local.get $0 + i32.const 66 i32.eq br_if $case1|0 - global.get $src/common/Opcode.f32_const local.get $0 + i32.const 67 i32.eq br_if $case2|0 - global.get $src/common/Opcode.f64_const local.get $0 + i32.const 68 i32.eq br_if $case3|0 - global.get $src/common/Opcode.get_global local.get $0 + i32.const 35 i32.eq br_if $case4|0 br $case5|0 @@ -275,8 +241,8 @@ i32.const 1 i32.add global.set $assembly/index/off - global.get $src/common/Opcode.end local.get $0 + i32.const 11 i32.ne if unreachable @@ -301,12 +267,12 @@ global.get $assembly/index/off local.tee $0 i32.load - local.set $6 + local.set $2 local.get $0 i32.const 4 i32.add global.set $assembly/index/off - local.get $6 + local.get $2 i32.const 1836278016 i32.ne if @@ -315,17 +281,19 @@ global.get $assembly/index/off local.tee $0 i32.load - local.set $6 + local.set $2 local.get $0 i32.const 4 i32.add global.set $assembly/index/off - local.get $6 + local.get $2 i32.const 1 i32.ne if unreachable end + i32.const 0 + local.set $0 loop $continue|0 global.get $assembly/index/off local.get $1 @@ -334,41 +302,42 @@ call $assembly/index/readVaruint local.set $2 call $assembly/index/readVaruint - local.set $8 + local.set $3 i32.const 0 local.set $4 i32.const 0 - local.set $0 + local.set $5 local.get $2 if local.get $2 - global.get $src/common/SectionId.Data + i32.const 11 i32.gt_u if unreachable end else global.get $assembly/index/off - local.set $5 + local.set $6 call $assembly/index/readVaruint - local.tee $0 + local.set $5 + local.get $5 global.get $assembly/index/off local.tee $4 i32.add global.set $assembly/index/off - local.get $8 + local.get $3 global.get $assembly/index/off - local.get $5 + local.get $6 i32.sub i32.sub - local.set $8 + local.set $3 end local.get $2 global.get $assembly/index/off - local.tee $5 - local.get $8 + local.tee $6 + local.get $3 local.get $4 - local.get $0 + local.get $5 call $assembly/options/onSection if block $break|1 @@ -382,63 +351,27 @@ block $case3|1 block $case2|1 block $case1|1 - global.get $src/common/SectionId.Type local.get $2 + i32.const 1 i32.ne if - global.get $src/common/SectionId.Import local.get $2 + i32.const 2 i32.eq br_if $case1|1 - global.get $src/common/SectionId.Function - local.get $2 - i32.eq - br_if $case2|1 - global.get $src/common/SectionId.Table - local.get $2 - i32.eq - br_if $case3|1 - global.get $src/common/SectionId.Memory - local.get $2 - i32.eq - br_if $case4|1 - global.get $src/common/SectionId.Global - local.get $2 - i32.eq - br_if $case5|1 - global.get $src/common/SectionId.Export - local.get $2 - i32.eq - br_if $case6|1 - global.get $src/common/SectionId.Start - local.get $2 - i32.eq - br_if $case7|1 - global.get $src/common/SectionId.Custom - local.get $2 - i32.eq - br_if $case8|1 - global.get $src/common/SectionId.Element - local.get $2 - i32.eq - br_if $case11|1 - global.get $src/common/SectionId.Code - local.get $2 - i32.eq - br_if $case11|1 - global.get $src/common/SectionId.Data - local.get $2 - i32.eq - br_if $case11|1 + block $tablify|0 + local.get $2 + br_table $case8|1 $tablify|0 $tablify|0 $case2|1 $case3|1 $case4|1 $case5|1 $case6|1 $case7|1 $case11|1 $case11|1 $case11|1 $tablify|0 + end br $case12|1 end call $assembly/index/readVaruint - local.set $2 + local.set $4 i32.const 0 local.set $3 loop $repeat|2 local.get $3 - local.get $2 + local.get $4 i32.lt_u if local.get $3 @@ -450,46 +383,46 @@ call $assembly/index/readVaruint local.set $5 i32.const 0 - local.set $7 + local.set $2 loop $repeat|3 - local.get $7 + local.get $2 local.get $5 i32.lt_u if local.get $3 - local.get $7 + local.get $2 i32.const 7 call $assembly/index/readVarint i32.const 127 i32.and call $assembly/options/onTypeParam - local.get $7 + local.get $2 i32.const 1 i32.add - local.set $7 + local.set $2 br $repeat|3 end end call $assembly/index/readVaruint - local.set $7 + local.set $5 i32.const 0 - local.set $4 + local.set $2 loop $repeat|4 - local.get $4 - local.get $7 + local.get $2 + local.get $5 i32.lt_u if local.get $3 - local.get $4 + local.get $2 i32.const 7 call $assembly/index/readVarint i32.const 127 i32.and call $assembly/options/onTypeReturn - local.get $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $repeat|4 end end @@ -503,73 +436,59 @@ br $break|1 end call $assembly/index/readVaruint - local.set $2 + local.set $7 i32.const 0 local.set $3 loop $repeat|5 local.get $3 - local.get $2 + local.get $7 i32.lt_u if call $assembly/index/readVaruint - local.set $7 - local.get $7 + local.tee $4 global.get $assembly/index/off local.tee $5 i32.add global.set $assembly/index/off call $assembly/index/readVaruint - local.set $9 - local.get $9 + local.tee $6 global.get $assembly/index/off - local.tee $4 + local.tee $8 i32.add global.set $assembly/index/off global.get $assembly/index/off - local.tee $6 + local.tee $9 i32.load8_u - local.set $0 - local.get $6 + local.set $2 + local.get $9 i32.const 1 i32.add global.set $assembly/index/off local.get $3 - local.get $0 + local.get $2 local.get $5 - local.get $7 local.get $4 - local.get $9 + local.get $8 + local.get $6 call $assembly/options/onImport block $break|6 block $case4|6 block $case3|6 block $case2|6 block $case1|6 - local.get $0 - local.tee $6 - global.get $src/common/ExternalKind.Function - i32.ne + local.get $2 if - global.get $src/common/ExternalKind.Table - local.get $6 - i32.eq - br_if $case1|6 - global.get $src/common/ExternalKind.Memory - local.get $6 - i32.eq - br_if $case2|6 - global.get $src/common/ExternalKind.Global - local.get $6 - i32.eq - br_if $case3|6 - br $case4|6 + local.get $2 + i32.const 1 + i32.sub + br_table $case1|6 $case2|6 $case3|6 $case4|6 end - local.get $11 - local.tee $10 + local.get $0 + local.tee $2 i32.const 1 i32.add - local.set $11 - local.get $10 + local.set $0 + local.get $2 call $assembly/index/readVaruint call $assembly/options/onFunctionImport br $break|6 @@ -578,18 +497,18 @@ call $assembly/index/readVarint i32.const 127 i32.and - local.set $6 + local.set $4 call $assembly/index/readVaruint - local.set $10 - local.get $12 - local.tee $0 + local.set $5 + local.get $10 + local.tee $2 i32.const 1 i32.add - local.set $12 - local.get $0 - local.get $6 + local.set $10 + local.get $2 + local.get $4 call $assembly/index/readVaruint - local.get $10 + local.get $5 i32.const 1 i32.and if (result i32) @@ -597,20 +516,20 @@ else i32.const -1 end - local.get $10 + local.get $5 call $assembly/options/onTableImport br $break|6 end call $assembly/index/readVaruint - local.set $8 - local.get $13 - local.tee $6 + local.set $4 + local.get $11 + local.tee $2 i32.const 1 i32.add - local.set $13 - local.get $6 + local.set $11 + local.get $2 call $assembly/index/readVaruint - local.get $8 + local.get $4 i32.const 1 i32.and if (result i32) @@ -618,16 +537,16 @@ else i32.const 65535 end - local.get $8 + local.get $4 call $assembly/options/onMemoryImport br $break|6 end - local.get $14 - local.tee $8 + local.get $12 + local.tee $2 i32.const 1 i32.add - local.set $14 - local.get $8 + local.set $12 + local.get $2 i32.const 7 call $assembly/index/readVarint i32.const 127 @@ -648,20 +567,20 @@ br $break|1 end call $assembly/index/readVaruint - local.set $2 + local.set $4 i32.const 0 local.set $3 loop $repeat|7 local.get $3 - local.get $2 + local.get $4 i32.lt_u if - local.get $11 - local.tee $4 + local.get $0 + local.tee $2 i32.const 1 i32.add - local.set $11 - local.get $4 + local.set $0 + local.get $2 call $assembly/index/readVaruint call $assembly/options/onFunction local.get $3 @@ -674,29 +593,29 @@ br $break|1 end call $assembly/index/readVaruint - local.set $2 + local.set $7 i32.const 0 local.set $3 loop $repeat|8 local.get $3 - local.get $2 + local.get $7 i32.lt_u if call $assembly/index/readVaruint i32.const 127 i32.and - local.set $0 - call $assembly/index/readVaruint local.set $4 - local.get $12 - local.tee $7 + call $assembly/index/readVaruint + local.set $5 + local.get $10 + local.tee $2 i32.const 1 i32.add - local.set $12 - local.get $7 - local.get $0 - call $assembly/index/readVaruint + local.set $10 + local.get $2 local.get $4 + call $assembly/index/readVaruint + local.get $5 i32.const 1 i32.and if (result i32) @@ -704,7 +623,7 @@ else i32.const -1 end - local.get $4 + local.get $5 call $assembly/options/onTable local.get $3 i32.const 1 @@ -716,24 +635,24 @@ br $break|1 end call $assembly/index/readVaruint - local.set $2 + local.set $6 i32.const 0 local.set $3 loop $repeat|9 local.get $3 - local.get $2 + local.get $6 i32.lt_u if call $assembly/index/readVaruint - local.set $5 - local.get $13 - local.tee $0 + local.set $4 + local.get $11 + local.tee $2 i32.const 1 i32.add - local.set $13 - local.get $0 + local.set $11 + local.get $2 call $assembly/index/readVaruint - local.get $5 + local.get $4 i32.const 1 i32.and if (result i32) @@ -741,7 +660,7 @@ else i32.const 65535 end - local.get $5 + local.get $4 call $assembly/options/onMemory local.get $3 i32.const 1 @@ -753,30 +672,30 @@ br $break|1 end call $assembly/index/readVaruint - local.set $2 + local.set $4 i32.const 0 local.set $3 loop $repeat|10 local.get $3 - local.get $2 + local.get $4 i32.lt_u if i32.const 7 call $assembly/index/readVarint i32.const 127 i32.and - local.set $4 + local.set $5 call $assembly/index/readVaruint - local.set $9 + local.set $6 call $assembly/index/skipInitExpr - local.get $14 - local.tee $5 + local.get $12 + local.tee $2 i32.const 1 i32.add - local.set $14 + local.set $12 + local.get $2 local.get $5 - local.get $4 - local.get $9 + local.get $6 call $assembly/options/onGlobal local.get $3 i32.const 1 @@ -797,25 +716,24 @@ i32.lt_u if call $assembly/index/readVaruint - local.set $9 - local.get $9 - global.get $assembly/index/off local.tee $4 + global.get $assembly/index/off + local.tee $5 i32.add global.set $assembly/index/off global.get $assembly/index/off - local.tee $0 + local.tee $6 i32.load8_u - local.set $6 - local.get $0 + local.set $7 + local.get $6 i32.const 1 i32.add global.set $assembly/index/off local.get $3 - local.get $6 + local.get $7 call $assembly/index/readVaruint + local.get $5 local.get $4 - local.get $9 call $assembly/options/onExport local.get $3 i32.const 1 @@ -830,126 +748,121 @@ call $assembly/options/onStart br $break|1 end - local.get $0 + local.get $5 i32.const 4 i32.eq - local.tee $2 if (result i32) local.get $4 i32.load i32.const 1701667182 i32.eq else - local.get $2 + i32.const 0 end if call $assembly/index/readVaruint local.set $2 call $assembly/index/readVaruint - local.set $3 + local.set $4 global.get $assembly/index/off - local.set $0 + local.set $5 block $break|12 block $case3|12 block $case2|12 block $case1|12 local.get $2 - local.tee $5 - global.get $src/common/NameType.Module - i32.ne if - global.get $src/common/NameType.Function - local.get $5 + local.get $2 + i32.const 1 i32.eq br_if $case1|12 - global.get $src/common/NameType.Local - local.get $5 + local.get $2 + i32.const 2 i32.eq br_if $case2|12 br $case3|12 end call $assembly/index/readVaruint - local.set $5 + local.set $2 global.get $assembly/index/off - local.get $5 + local.get $2 call $assembly/options/onModuleName br $break|12 end call $assembly/index/readVaruint - local.set $4 + local.set $3 i32.const 0 - local.set $5 + local.set $2 loop $repeat|13 - local.get $5 - local.get $4 + local.get $2 + local.get $3 i32.lt_u if call $assembly/index/readVaruint - local.set $9 + local.set $6 call $assembly/index/readVaruint - local.set $7 - local.get $7 + local.tee $7 global.get $assembly/index/off - local.tee $2 + local.tee $8 i32.add global.set $assembly/index/off - local.get $9 - local.get $2 + local.get $6 + local.get $8 local.get $7 call $assembly/options/onFunctionName - local.get $5 + local.get $2 i32.const 1 i32.add - local.set $5 + local.set $2 br $repeat|13 end end br $break|12 end call $assembly/index/readVaruint - local.set $4 + local.set $6 i32.const 0 - local.set $5 + local.set $2 loop $repeat|14 - local.get $5 - local.get $4 + local.get $2 + local.get $6 i32.lt_u if - call $assembly/index/readVaruint - local.set $2 call $assembly/index/readVaruint local.set $7 + call $assembly/index/readVaruint + local.set $8 i32.const 0 - local.set $9 + local.set $3 loop $repeat|15 - local.get $9 - local.get $7 + local.get $3 + local.get $8 i32.lt_u if call $assembly/index/readVaruint - local.set $10 + local.set $9 call $assembly/index/readVaruint - local.tee $8 + local.tee $13 global.get $assembly/index/off - local.tee $6 + local.tee $14 i32.add global.set $assembly/index/off - local.get $2 - local.get $10 - local.get $6 - local.get $8 - call $assembly/options/onLocalName + local.get $7 local.get $9 + local.get $14 + local.get $13 + call $assembly/options/onLocalName + local.get $3 i32.const 1 i32.add - local.set $9 + local.set $3 br $repeat|15 end end - local.get $5 + local.get $2 i32.const 1 i32.add - local.set $5 + local.set $2 br $repeat|14 end end @@ -957,25 +870,22 @@ end unreachable end - local.get $0 - local.get $3 + local.get $4 + local.get $5 i32.add global.set $assembly/index/off br $break|1 else - block (result i32) - local.get $0 - i32.const 16 - i32.eq - local.tee $0 - if - local.get $4 - i64.load - i64.const 7011371672682196851 - i64.eq - local.set $0 - end - local.get $0 + local.get $5 + i32.const 16 + i32.eq + if (result i32) + local.get $4 + i64.load + i64.const 7011371672682196851 + i64.eq + else + i32.const 0 end if (result i32) local.get $4 @@ -985,28 +895,28 @@ i64.const 5499551997695193200 i64.eq else - local.get $0 + i32.const 0 end if call $assembly/index/readVaruint - local.tee $0 + local.tee $2 global.get $assembly/index/off - local.tee $3 + local.tee $4 i32.add global.set $assembly/index/off - local.get $3 - local.get $0 + local.get $4 + local.get $2 call $assembly/options/onSourceMappingURL end end - local.get $5 - local.get $8 + local.get $3 + local.get $6 i32.add global.set $assembly/index/off br $break|1 end global.get $assembly/index/off - local.get $8 + local.get $3 i32.add global.set $assembly/index/off br $break|1 @@ -1015,7 +925,7 @@ end else global.get $assembly/index/off - local.get $8 + local.get $3 i32.add global.set $assembly/index/off end diff --git a/src/compiler.ts b/src/compiler.ts index 94d17b0273..5520d0eb97 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -2890,7 +2890,7 @@ export class Compiler extends DiagnosticEmitter { assert(!expression.toType); let expr = this.compileExpressionRetainType(expression.expression, contextualType, WrapMode.NONE); let type = this.currentType; - if (!type.is(TypeFlags.NULLABLE | TypeFlags.REFERENCE)) { + if (!type.is(TypeFlags.NULLABLE | TypeFlags.REFERENCE) || this.currentFlow.isNonnull(type, expr)) { this.info( DiagnosticCode.Expression_is_never_null, expression.expression.range diff --git a/std/assembly/runtime/README.md b/std/assembly/runtime/README.md index a25e30ef70..22d4f4ba50 100644 --- a/std/assembly/runtime/README.md +++ b/std/assembly/runtime/README.md @@ -1,14 +1,26 @@ AssemblyScript runtimes ======================= -Default -------- +None +---- + +``` +$> asc ... --runtime none +``` + +[No runtime](./none.ts) features at all. Useful for building low-level modules that do not require language features like managed classes, or if you'd like to compose your own runtime by including a custom memory allocator and garbage collector. + +* No memory allocator +* No garbage collector + +Trace +----- ``` $> asc ... ``` -The [default runtime](./default.ts) adds proper support for dynamic memory management and garbage collection to your program. +The [trace runtime](./trace.ts) adds support for dynamic memory management and garbage collection to your program. * [TLSF memory allocator](../allocator/tlsf.ts) * [ITCM garbage collector](../collector/itcm.ts) @@ -24,15 +36,3 @@ The [arena runtime](./arena.ts) is just enough to make most language features wo * [Arena memory allocator](../allocator/arena.ts) with `memory.reset()` * No garbage collector - -None ------------------ - -``` -$> asc ... --runtime none -``` - -[No runtime](./none.ts) features at all. Useful for building low-level modules that do not require language features like managed classes, or if you'd like to compose your own runtime by including a custom memory allocator and garbage collector. - -* No memory allocator -* No garbage collector diff --git a/std/assembly/runtime/default.ts b/std/assembly/runtime/trace.ts similarity index 100% rename from std/assembly/runtime/default.ts rename to std/assembly/runtime/trace.ts diff --git a/tests/compiler/mandelbrot.optimized.wat b/tests/compiler/mandelbrot.optimized.wat index 4e919e73f2..cdf7d77443 100644 --- a/tests/compiler/mandelbrot.optimized.wat +++ b/tests/compiler/mandelbrot.optimized.wat @@ -377,81 +377,84 @@ (local $5 f64) (local $6 f64) (local $7 i32) - (local $8 f64) + (local $8 i32) (local $9 f64) (local $10 f64) (local $11 f64) (local $12 f64) (local $13 f64) (local $14 f64) - f64.const 10 - f64.const 3 + (local $15 f64) local.get $1 f64.convert_i32_u - local.tee $4 + local.tee $9 + f64.const 0.625 f64.mul - f64.const 4 + local.set $4 + local.get $0 + f64.convert_i32_u local.get $2 f64.convert_i32_u local.tee $6 - f64.mul - f64.min - f64.div - local.set $8 - local.get $0 - f64.convert_i32_u - local.get $6 f64.const 0.5 f64.mul f64.sub - local.get $8 + f64.const 10 + f64.const 3 + local.get $9 f64.mul - local.set $9 - local.get $4 - f64.const 0.625 + f64.const 4 + local.get $6 f64.mul - local.get $8 + f64.min + f64.div + local.tee $10 f64.mul local.set $11 + local.get $4 + local.get $10 + f64.mul + local.set $13 local.get $0 local.get $1 i32.mul i32.const 1 i32.shl - local.set $2 + local.set $0 f64.const 1 local.get $3 f64.convert_i32_u local.tee $6 f64.div - local.set $12 + local.set $14 f64.const 8 local.get $6 f64.min - local.set $13 + local.set $15 loop $repeat|0 - local.get $7 - local.get $1 - i32.lt_u - if - local.get $7 - f64.convert_i32_u + block $break|0 + local.get $8 + local.get $1 + i32.ge_u + br_if $break|0 local.get $8 + f64.convert_i32_u + local.get $10 f64.mul - local.get $11 + local.get $13 f64.sub - local.set $10 + local.set $12 f64.const 0 local.set $4 f64.const 0 local.set $5 i32.const 0 - local.set $0 + local.set $7 loop $continue|1 local.get $4 local.get $4 f64.mul - local.tee $14 + local.tee $9 local.get $5 local.get $5 f64.mul @@ -466,31 +469,31 @@ f64.mul local.get $5 f64.mul - local.get $9 + local.get $11 f64.add local.set $5 - local.get $14 + local.get $9 local.get $6 f64.sub - local.get $10 + local.get $12 f64.add local.set $4 - local.get $0 + local.get $7 local.get $3 i32.ge_u br_if $break|1 - local.get $0 + local.get $7 i32.const 1 i32.add - local.set $0 + local.set $7 br $continue|1 end end end loop $continue|2 - local.get $0 + local.get $7 f64.convert_i32_u - local.get $13 + local.get $15 f64.lt if local.get $4 @@ -500,7 +503,7 @@ local.get $5 f64.mul f64.sub - local.get $10 + local.get $12 f64.add local.set $6 f64.const 2 @@ -508,22 +511,24 @@ f64.mul local.get $5 f64.mul - local.get $9 + local.get $11 f64.add local.set $5 local.get $6 local.set $4 - local.get $0 + local.get $7 i32.const 1 i32.add - local.set $0 + local.set $7 br $continue|2 end end - local.get $7 + i32.const 2047 + local.set $2 + local.get $8 i32.const 1 i32.shl - local.get $2 + local.get $0 i32.add local.get $4 local.get $4 @@ -537,7 +542,7 @@ f64.gt if (result i32) f64.const 2047 - local.get $0 + local.get $7 i32.const 1 i32.add f64.convert_i32_u @@ -547,7 +552,7 @@ f64.mul call $~lib/math/NativeMath.log2 f64.sub - local.get $12 + local.get $14 f64.mul f64.const 0 f64.max @@ -559,10 +564,10 @@ i32.const 2047 end i32.store16 - local.get $7 + local.get $8 i32.const 1 i32.add - local.set $7 + local.set $8 br $repeat|0 end end diff --git a/tests/compiler/mandelbrot.untouched.wat b/tests/compiler/mandelbrot.untouched.wat index 39c67f7a27..5222f085fb 100644 --- a/tests/compiler/mandelbrot.untouched.wat +++ b/tests/compiler/mandelbrot.untouched.wat @@ -1,7 +1,6 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$dd (func (param f64) (result f64))) - (type $FUNCSIG$dddd (func (param f64 f64 f64) (result f64))) (type $FUNCSIG$v (func)) (memory $0 0) (table $0 1 funcref) @@ -472,14 +471,7 @@ local.get $14 f64.add ) - (func $../../examples/mandelbrot/assembly/index/clamp (; 2 ;) (type $FUNCSIG$dddd) (param $0 f64) (param $1 f64) (param $2 f64) (result f64) - local.get $0 - local.get $1 - f64.max - local.get $2 - f64.min - ) - (func $../../examples/mandelbrot/assembly/index/computeLine (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $../../examples/mandelbrot/assembly/index/computeLine (; 2 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 f64) (local $5 f64) (local $6 f64) @@ -498,6 +490,9 @@ (local $19 f64) (local $20 i32) (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) local.get $1 f64.convert_i32_u f64.const 1 @@ -681,17 +676,26 @@ i32.const 1 i32.sub f64.convert_i32_s - local.get $18 - i32.const 1 - i32.add - f64.convert_i32_u - local.get $21 - f64.sub - local.get $10 - f64.mul - f64.const 0 - f64.const 1 - call $../../examples/mandelbrot/assembly/index/clamp + block $../../examples/mandelbrot/assembly/index/clamp|inlined.0 (result f64) + local.get $18 + i32.const 1 + i32.add + f64.convert_i32_u + local.get $21 + f64.sub + local.get $10 + f64.mul + local.set $24 + f64.const 0 + local.set $23 + f64.const 1 + local.set $22 + local.get $24 + local.get $23 + f64.max + local.get $22 + f64.min + end f64.mul i32.trunc_f64_u local.set $20 @@ -714,6 +718,6 @@ unreachable end ) - (func $null (; 4 ;) (type $FUNCSIG$v) + (func $null (; 3 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/possibly-null.optimized.wat b/tests/compiler/possibly-null.optimized.wat index fe8403d3f9..4af480291f 100644 --- a/tests/compiler/possibly-null.optimized.wat +++ b/tests/compiler/possibly-null.optimized.wat @@ -21,6 +21,7 @@ (export "testLogicalAndMulti" (func $possibly-null/testLogicalAndMulti)) (export "testLogicalOrMulti" (func $possibly-null/testLogicalAndMulti)) (export "testAssign" (func $possibly-null/testLogicalAndMulti)) + (export "testNeverNull" (func $possibly-null/testTrue)) (func $possibly-null/testTrue (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) diff --git a/tests/compiler/possibly-null.ts b/tests/compiler/possibly-null.ts index 101c103f93..4e1d79a989 100644 --- a/tests/compiler/possibly-null.ts +++ b/tests/compiler/possibly-null.ts @@ -119,3 +119,9 @@ export function testAssign(a: Ref | null, b: Ref): void { a = b; if (isNullable(a)) ERROR("should be non-nullable"); } + +export function testNeverNull(a: Ref | null): void { + if (a) { + a!; // INFO AS225: Expression is never 'null'. + } +} diff --git a/tests/compiler/possibly-null.untouched.wat b/tests/compiler/possibly-null.untouched.wat index a4be7dfbec..045c0f063b 100644 --- a/tests/compiler/possibly-null.untouched.wat +++ b/tests/compiler/possibly-null.untouched.wat @@ -24,6 +24,7 @@ (export "testLogicalAndMulti" (func $possibly-null/testLogicalAndMulti)) (export "testLogicalOrMulti" (func $possibly-null/testLogicalOrMulti)) (export "testAssign" (func $possibly-null/testAssign)) + (export "testNeverNull" (func $possibly-null/testNeverNull)) (func $possibly-null/testTrue (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 if @@ -192,6 +193,13 @@ local.get $1 local.set $0 ) - (func $null (; 18 ;) (type $FUNCSIG$v) + (func $possibly-null/testNeverNull (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + if + local.get $0 + drop + end + ) + (func $null (; 19 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/runtime-default.json b/tests/compiler/runtime-default.json index 02748ee2ac..e6739f3d85 100644 --- a/tests/compiler/runtime-default.json +++ b/tests/compiler/runtime-default.json @@ -1,5 +1,5 @@ { "asc_flags": [ - "--runtime default" + "--runtime trace" ] } diff --git a/tests/compiler/runtime/flags.json b/tests/compiler/runtime/flags.json index 8152a147f7..c9fbb95fc1 100644 --- a/tests/compiler/runtime/flags.json +++ b/tests/compiler/runtime/flags.json @@ -1,5 +1,8 @@ { "features": [ "simd" + ], + "asc_flags": [ + "--runtime trace" ] } \ No newline at end of file From 8b5c629cdeaf5e8c59bc343a8db19bc6812783fc Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 11 Apr 2019 02:29:25 +0200 Subject: [PATCH 104/119] reduce tlsf footprint --- std/assembly/allocator/tlsf.ts | 136 +- tests/allocators/tlsf/optimized.wat | 1141 +-------- tests/allocators/tlsf/untouched.wat | 2161 ++++-------------- tests/compiler/runtime-default.optimized.wat | 323 +-- tests/compiler/runtime-default.untouched.wat | 499 ++-- tests/compiler/runtime/flags.optimized.wat | 323 +-- tests/compiler/runtime/flags.untouched.wat | 499 ++-- tests/compiler/std/runtime.optimized.wat | 323 +-- tests/compiler/std/runtime.untouched.wat | 499 ++-- 9 files changed, 1454 insertions(+), 4450 deletions(-) diff --git a/std/assembly/allocator/tlsf.ts b/std/assembly/allocator/tlsf.ts index dd08a7361b..4fd90fe535 100644 --- a/std/assembly/allocator/tlsf.ts +++ b/std/assembly/allocator/tlsf.ts @@ -15,23 +15,23 @@ import { AL_BITS, AL_SIZE, AL_MASK } from "../util/allocator"; import { HEAP_BASE, memory } from "../memory"; // @ts-ignore: decorator -@lazy +@inline const SL_BITS: u32 = 5; // @ts-ignore: decorator -@lazy +@inline const SL_SIZE: usize = 1 << SL_BITS; // @ts-ignore: decorator -@lazy +@inline const SB_BITS: usize = (SL_BITS + AL_BITS); // @ts-ignore: decorator -@lazy +@inline const SB_SIZE: usize = 1 << SB_BITS; // @ts-ignore: decorator -@lazy +@inline const FL_BITS: u32 = (sizeof() == sizeof() ? 30 // ^= up to 1GB per block : 32 // ^= up to 4GB per block @@ -55,17 +55,17 @@ const FL_BITS: u32 = (sizeof() == sizeof() /** Tag indicating that this block is free. */ // @ts-ignore: decorator -@lazy +@inline const FREE: usize = 1 << 0; /** Tag indicating that this block's left block is free. */ // @ts-ignore: decorator -@lazy +@inline const LEFT_FREE: usize = 1 << 1; /** Mask to obtain all tags. */ // @ts-ignore: decorator -@lazy +@inline const TAGS: usize = FREE | LEFT_FREE; /** Block structure. */ @@ -73,10 +73,16 @@ const TAGS: usize = FREE | LEFT_FREE; /** Info field holding this block's size and tags. */ info: usize; + /** Class id. */ // TODO + // classId: u32; // + /** Size of the payload. */ // + // payloadSize: u32; // + /** Reference count. */ // + // refCount: u32; // - /** End offset of the {@link Block#info} field. User data starts here. */ - @lazy - static readonly INFO: usize = (sizeof() + AL_MASK) & ~AL_MASK; + /** Size of the always present header fields. User data starts here. */ + @inline + static readonly HEADER_SIZE: usize = (offsetof("prev") + AL_MASK) & ~AL_MASK; /** Previous free block, if any. Only valid if free. */ prev: Block | null; @@ -84,16 +90,16 @@ const TAGS: usize = FREE | LEFT_FREE; next: Block | null; /** Minimum size of a block, excluding {@link Block#info}. */ - @lazy + @inline static readonly MIN_SIZE: usize = (3 * sizeof() + AL_MASK) & ~AL_MASK;// prev + next + jump /** Maximum size of a used block, excluding {@link Block#info}. */ - @lazy + @inline static readonly MAX_SIZE: usize = 1 << (FL_BITS + SB_BITS); /** Gets this block's left (free) block in memory. */ get left(): Block { - assert(this.info & LEFT_FREE); // must be free to contain a jump + assert(this.info & LEFT_FREE); // left must be free or it doesn't contain 'jump' return assert( load(changetype(this) - sizeof()) ); // can't be null @@ -101,10 +107,10 @@ const TAGS: usize = FREE | LEFT_FREE; /** Gets this block's right block in memory. */ get right(): Block { - assert(this.info & ~TAGS); // can't skip beyond the tail block + assert(this.info & ~TAGS); // can't skip beyond the tail block (the only valid empty block) return assert( changetype( - changetype(this) + Block.INFO + (this.info & ~TAGS) + changetype(this) + Block.HEADER_SIZE + (this.info & ~TAGS) ) ); // can't be null } @@ -143,7 +149,7 @@ const TAGS: usize = FREE | LEFT_FREE; flMap: usize = 0; /** Start offset of second level maps. */ - @lazy + @inline private static readonly SL_START: usize = sizeof(); // Using *one* SL map per *FL bit* @@ -161,19 +167,18 @@ const TAGS: usize = FREE | LEFT_FREE; } /** End offset of second level maps. */ - @lazy + @inline private static readonly SL_END: usize = Root.SL_START + FL_BITS * 4; // Using *number bits per SL* heads per *FL bit* /** Start offset of FL/SL heads. */ - @lazy + @inline private static readonly HL_START: usize = (Root.SL_END + AL_MASK) & ~AL_MASK; /** Gets the head of the specified first and second level index. */ getHead(fl: usize, sl: u32): Block | null { - assert(fl < FL_BITS); // fl out of range - assert(sl < SL_SIZE); // sl out of range + assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range return changetype(load( changetype(this) + (fl * SL_SIZE + sl) * sizeof() , Root.HL_START)); @@ -181,25 +186,23 @@ const TAGS: usize = FREE | LEFT_FREE; /** Sets the head of the specified first and second level index. */ setHead(fl: usize, sl: u32, value: Block | null): void { - assert(fl < FL_BITS); // fl out of range - assert(sl < SL_SIZE); // sl out of range + assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range store( - changetype(this) + (fl * SL_SIZE + sl) * sizeof() - , changetype(value) - , Root.HL_START); + changetype(this) + (fl * SL_SIZE + sl) * sizeof(), + changetype(value), + Root.HL_START + ); } /** End offset of FL/SL heads. */ - @lazy - private static readonly HL_END: usize = ( - Root.HL_START + FL_BITS * SL_SIZE * sizeof() - ); + @inline + private static readonly HL_END: usize = Root.HL_START + FL_BITS * SL_SIZE * sizeof(); get tailRef(): usize { return load(0, Root.HL_END); } set tailRef(value: usize) { store(0, value, Root.HL_END); } /** Total size of the {@link Root} structure. */ - @lazy + @inline static readonly SIZE: usize = Root.HL_END + sizeof(); /** Inserts a previously used block back into the free list. */ @@ -208,18 +211,14 @@ const TAGS: usize = FREE | LEFT_FREE; assert(block); // cannot be null var blockInfo = block.info; assert(blockInfo & FREE); // must be free - var size: usize; - assert( - (size = block.info & ~TAGS) >= Block.MIN_SIZE && size < Block.MAX_SIZE - ); // must be valid, not necessary to compute yet if noAssert=true - var right: Block = assert(block.right); // can't be null + var right = block.right; // asserts != null var rightInfo = right.info; // merge with right block if also free if (rightInfo & FREE) { this.remove(right); - block.info = (blockInfo += Block.INFO + (rightInfo & ~TAGS)); + block.info = (blockInfo += Block.HEADER_SIZE + (rightInfo & ~TAGS)); right = block.right; rightInfo = right.info; // jump is set below @@ -227,11 +226,11 @@ const TAGS: usize = FREE | LEFT_FREE; // merge with left block if also free if (blockInfo & LEFT_FREE) { - let left: Block = assert(block.left); // can't be null + let left = block.left; // asserts != null let leftInfo = left.info; - assert(leftInfo & FREE); // must be free according to tags + assert(leftInfo & FREE); // must be free according to right tags this.remove(left); - left.info = (leftInfo += Block.INFO + (blockInfo & ~TAGS)); + left.info = (leftInfo += Block.HEADER_SIZE + (blockInfo & ~TAGS)); block = left; blockInfo = leftInfo; // jump is set below @@ -241,7 +240,7 @@ const TAGS: usize = FREE | LEFT_FREE; this.setJump(block, right); // right is no longer used now, hence rightInfo is not synced - size = blockInfo & ~TAGS; + var size = blockInfo & ~TAGS; assert(size >= Block.MIN_SIZE && size < Block.MAX_SIZE); // must be valid // mapping_insert @@ -312,7 +311,7 @@ const TAGS: usize = FREE | LEFT_FREE; /** Searches for a free block of at least the specified size. */ search(size: usize): Block | null { - assert(size >= Block.MIN_SIZE && size < Block.MAX_SIZE); + // size was already asserted by caller // mapping_search var fl: usize, sl: u32; @@ -350,9 +349,11 @@ const TAGS: usize = FREE | LEFT_FREE; /** Links a free left with its right block in memory. */ private setJump(left: Block, right: Block): void { - assert(left.info & FREE); // must be free - assert(left.right == right); // right block must match - assert(right.info & LEFT_FREE); // right block must be tagged as LEFT_FREE + assert( + (left.info & FREE) != 0 && // must be free to contain 'jump' + left.right == right && // right block must match + (right.info & LEFT_FREE) != 0 // free status must match + ); store( changetype(right) - sizeof() , left); // last word in left block's (free) data region @@ -363,39 +364,43 @@ const TAGS: usize = FREE | LEFT_FREE; * splitting it if possible, and returns its data pointer. */ use(block: Block, size: usize): usize { - var blockInfo = block.info; - assert(blockInfo & FREE); // must be free so we can use it - assert(size >= Block.MIN_SIZE && size < Block.MAX_SIZE); // must be valid - assert(!(size & AL_MASK)); // size must be aligned so the new block is + // size was already asserted by caller + var blockInfo = block.info; + assert( + (blockInfo & FREE) != 0 && // must be free + !(size & AL_MASK) // size must be aligned so the new block is + ); this.remove(block); // split if the block can hold another MIN_SIZE block var remaining = (blockInfo & ~TAGS) - size; - if (remaining >= Block.INFO + Block.MIN_SIZE) { + if (remaining >= Block.HEADER_SIZE + Block.MIN_SIZE) { block.info = size | (blockInfo & LEFT_FREE); // also discards FREE let spare = changetype( - changetype(block) + Block.INFO + size + changetype(block) + Block.HEADER_SIZE + size ); - spare.info = (remaining - Block.INFO) | FREE; // not LEFT_FREE + spare.info = (remaining - Block.HEADER_SIZE) | FREE; // not LEFT_FREE this.insert(spare); // also sets jump // otherwise tag block as no longer FREE and right as no longer LEFT_FREE } else { block.info = blockInfo & ~FREE; - let right: Block = assert(block.right); // can't be null (tail) + let right = block.right; // asserts != null right.info &= ~LEFT_FREE; } - return changetype(block) + Block.INFO; + return changetype(block) + Block.HEADER_SIZE; } /** Adds more memory to the pool. */ addMemory(start: usize, end: usize): bool { - assert(start <= end); - assert(!(start & AL_MASK)); // must be aligned - assert(!(end & AL_MASK)); // must be aligned + assert( + start <= end && // must be valid + !(start & AL_MASK) && // must be aligned + !(end & AL_MASK) // must be aligned + ); var tailRef = this.tailRef; var tailInfo: usize = 0; @@ -403,8 +408,8 @@ const TAGS: usize = FREE | LEFT_FREE; assert(start >= tailRef + sizeof()); // starts after tail // merge with current tail if adjacent - if (start - Block.INFO == tailRef) { - start -= Block.INFO; + if (start - Block.HEADER_SIZE == tailRef) { + start -= Block.HEADER_SIZE; tailInfo = changetype(tailRef).info; } @@ -414,19 +419,19 @@ const TAGS: usize = FREE | LEFT_FREE; // check if size is large enough for a free block and the tail block var size = end - start; - if (size < Block.INFO + Block.MIN_SIZE + Block.INFO) { + if (size < Block.HEADER_SIZE + Block.MIN_SIZE + Block.HEADER_SIZE) { return false; } // left size is total minus its own and the zero-length tail's header - var leftSize = size - 2 * Block.INFO; + var leftSize = size - 2 * Block.HEADER_SIZE; var left = changetype(start); left.info = leftSize | FREE | (tailInfo & LEFT_FREE); left.prev = null; left.next = null; // tail is a zero-length used block - var tail = changetype(start + size - Block.INFO); + var tail = changetype(start + size - Block.HEADER_SIZE); tail.info = 0 | LEFT_FREE; this.tailRef = changetype(tail); @@ -502,7 +507,7 @@ function __mem_allocate(size: usize): usize { block = assert(root.search(size)); // must be found now } - assert((block.info & ~TAGS) >= size); + assert((block.info & ~TAGS) >= size); // must fit return root.use(block, size); } @@ -511,13 +516,14 @@ function __mem_allocate(size: usize): usize { @unsafe @global function __mem_free(data: usize): void { if (data) { + assert(!(data & AL_MASK)); // must be aligned let root = ROOT; if (root) { - let block = changetype(data - Block.INFO); + let block = changetype(data - Block.HEADER_SIZE); let blockInfo = block.info; assert(!(blockInfo & FREE)); // must be used block.info = blockInfo | FREE; - root.insert(changetype(data - Block.INFO)); + root.insert(changetype(data - Block.HEADER_SIZE)); } } } diff --git a/tests/allocators/tlsf/optimized.wat b/tests/allocators/tlsf/optimized.wat index 15fbd03be4..7a3210adb1 100644 --- a/tests/allocators/tlsf/optimized.wat +++ b/tests/allocators/tlsf/optimized.wat @@ -7,15 +7,13 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\1c") + (data (i32.const 24) "~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") (global $~lib/memory/memory.implemented i32 (i32.const 1)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "memory.implemented" (global $~lib/memory/memory.implemented)) (export "memory.copy" (func $~lib/memory/memory.copy)) (export "memory.init" (func $~lib/memory/memory.init)) @@ -27,18 +25,18 @@ (export "memory.compare" (func $~lib/memory/memory.compare)) (func $~lib/memory/memory.init (; 1 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) i32.const 0 - i32.const 16 + i32.const 24 i32.const 46 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable ) (func $~lib/memory/memory.drop (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 0 - i32.const 16 + i32.const 24 i32.const 53 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable ) (func $~lib/allocator/tlsf/Root#set:tailRef (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) @@ -549,7 +547,7 @@ local.tee $1 i32.eqz if - i32.const 48 + i32.const 56 local.tee $4 i32.const 68451 i32.add @@ -559,18 +557,17 @@ i32.shr_u local.tee $2 current_memory - local.tee $3 - i32.gt_s local.tee $1 + i32.gt_s if (result i32) local.get $2 - local.get $3 + local.get $1 i32.sub grow_memory i32.const 0 i32.lt_s else - local.get $1 + i32.const 0 end if unreachable @@ -583,42 +580,40 @@ local.get $1 i32.const 0 i32.store - i32.const 0 - local.set $2 loop $repeat|0 block $break|0 - local.get $2 + local.get $3 i32.const 22 i32.ge_u br_if $break|0 local.get $1 - local.get $2 + local.get $3 i32.const 0 call $~lib/allocator/tlsf/Root#setSLMap i32.const 0 - local.set $3 + local.set $2 loop $repeat|1 block $break|1 - local.get $3 + local.get $2 i32.const 32 i32.ge_u br_if $break|1 local.get $1 - local.get $2 local.get $3 + local.get $2 i32.const 0 call $~lib/allocator/tlsf/Root#setHead - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|1 end end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $repeat|0 end end @@ -660,8 +655,8 @@ local.get $0 else current_memory - local.tee $2 local.tee $3 + local.tee $2 local.get $5 i32.const 65535 i32.add @@ -671,7 +666,7 @@ i32.shr_u local.tee $4 local.tee $0 - local.get $3 + local.get $2 local.get $0 i32.gt_s select @@ -688,7 +683,7 @@ end end local.get $1 - local.get $2 + local.get $3 i32.const 16 i32.shl current_memory @@ -737,1030 +732,108 @@ ) (func $~lib/memory/memory.reset (; 19 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 16 + i32.const 24 i32.const 77 i32.const 9 - call $~lib/env/abort + call $~lib/builtins/abort unreachable ) - (func $~lib/util/memory/memcpy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $continue|0 + block $~lib/util/memory/memmove|inlined.0 + local.get $0 local.get $1 - i32.const 3 - i32.and - local.get $2 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u if - local.get $0 local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - i32.const 3 - i32.and + local.tee $3 i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + br $continue|0 + end + end + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 end - local.get $1 - i32.load - local.set $4 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 + end + end + loop $continue|2 + local.get $2 + if local.get $0 + local.tee $3 i32.const 1 i32.add - local.tee $0 - i32.const 1 - i32.add - local.set $3 - local.get $0 + local.set $0 + local.get $3 block (result i32) local.get $1 + local.tee $3 i32.const 1 i32.add - local.tee $0 - i32.const 1 - i32.add - local.set $5 - local.get $0 + local.set $1 + local.get $3 i32.load8_u end i32.store8 - local.get $3 - i32.const 1 - i32.add - local.set $0 - local.get $5 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $5 - i32.load8_u - i32.store8 local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 13 - i32.add - i32.load - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $4 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 - i32.add - i32.load - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $4 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 15 - i32.add - i32.load - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 - end - end - end - loop $continue|2 - local.get $2 - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $2 - i32.const 1 + i32.const 1 i32.sub local.set $2 br $continue|2 @@ -1839,7 +912,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 22 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 21 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $2 local.get $3 @@ -1864,8 +937,7 @@ end end ) - (func $~lib/memory/memory.compare (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) + (func $~lib/memory/memory.compare (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.eq @@ -1874,9 +946,6 @@ else loop $continue|0 local.get $2 - i32.const 0 - i32.ne - local.tee $3 if (result i32) local.get $0 i32.load8_u @@ -1884,7 +953,7 @@ i32.load8_u i32.eq else - local.get $3 + i32.const 0 end if local.get $2 @@ -1914,7 +983,7 @@ end end ) - (func $null (; 24 ;) (type $FUNCSIG$v) + (func $null (; 23 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/allocators/tlsf/untouched.wat b/tests/allocators/tlsf/untouched.wat index 84737f39bb..6b185db94a 100644 --- a/tests/allocators/tlsf/untouched.wat +++ b/tests/allocators/tlsf/untouched.wat @@ -7,33 +7,16 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") - (data (i32.const 48) "\01\00\00\00,\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") + (data (i32.const 56) "\10\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/memory/memory.implemented i32 (i32.const 1)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) - (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) - (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) - (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) - (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) - (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) - (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) - (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) - (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) - (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) - (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) - (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) - (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) - (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) - (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) - (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 100)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 116)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "memory.implemented" (global $~lib/memory/memory.implemented)) (export "memory.copy" (func $~lib/memory/memory.copy)) (export "memory.init" (func $~lib/memory/memory.init)) @@ -45,18 +28,18 @@ (export "memory.compare" (func $~lib/memory/memory.compare)) (func $~lib/memory/memory.init (; 1 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) i32.const 0 - i32.const 16 + i32.const 24 i32.const 46 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable ) (func $~lib/memory/memory.drop (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 0 - i32.const 16 + i32.const 24 i32.const 53 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable ) (func $~lib/allocator/tlsf/Root#set:tailRef (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) @@ -66,15 +49,15 @@ ) (func $~lib/allocator/tlsf/Root#setSLMap (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u i32.eqz if i32.const 0 - i32.const 56 - i32.const 159 + i32.const 72 + i32.const 165 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -87,32 +70,27 @@ ) (func $~lib/allocator/tlsf/Root#setHead (; 5 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u - i32.eqz - if + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else i32.const 0 - i32.const 56 - i32.const 184 - i32.const 4 - call $~lib/env/abort - unreachable end - local.get $2 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u i32.eqz if i32.const 0 - i32.const 56 - i32.const 185 + i32.const 72 + i32.const 189 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 local.get $1 - global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 32 i32.mul local.get $2 i32.add @@ -130,25 +108,25 @@ (local $1 i32) local.get $0 i32.load - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and i32.eqz if i32.const 0 - i32.const 56 - i32.const 104 + i32.const 72 + i32.const 110 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add local.get $0 i32.load - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and @@ -157,10 +135,10 @@ i32.eqz if (result i32) i32.const 0 - i32.const 56 - i32.const 105 + i32.const 72 + i32.const 111 i32.const 11 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $1 @@ -173,10 +151,10 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 447 + i32.const 72 + i32.const 452 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 31 @@ -186,32 +164,27 @@ ) (func $~lib/allocator/tlsf/Root#getHead (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u - i32.eqz - if + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else i32.const 0 - i32.const 56 - i32.const 175 - i32.const 4 - call $~lib/env/abort - unreachable end - local.get $2 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u i32.eqz if i32.const 0 - i32.const 56 - i32.const 176 + i32.const 72 + i32.const 181 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 local.get $1 - global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 32 i32.mul local.get $2 i32.add @@ -222,15 +195,15 @@ ) (func $~lib/allocator/tlsf/Root#getSLMap (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u i32.eqz if i32.const 0 - i32.const 56 - i32.const 153 + i32.const 72 + i32.const 159 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -252,130 +225,129 @@ i32.load local.set $2 local.get $2 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and i32.eqz if i32.const 0 - i32.const 56 - i32.const 277 + i32.const 72 + i32.const 276 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and local.set $3 local.get $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.const 16 i32.ge_u - local.tee $4 if (result i32) local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.const 1073741824 i32.lt_u else - local.get $4 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 56 - i32.const 279 + i32.const 72 + i32.const 278 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 - global.get $~lib/allocator/tlsf/SB_SIZE + i32.const 256 i32.lt_u if i32.const 0 - local.set $5 + local.set $4 local.get $3 i32.const 8 i32.div_u - local.set $6 + local.set $5 else local.get $3 call $~lib/allocator/tlsf/fls - local.set $5 + local.set $4 local.get $3 - local.get $5 - global.get $~lib/allocator/tlsf/SL_BITS + local.get $4 + i32.const 5 i32.sub i32.shr_u i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.shl i32.xor - local.set $6 - local.get $5 - global.get $~lib/allocator/tlsf/SB_BITS + local.set $5 + local.get $4 + i32.const 8 i32.const 1 i32.sub i32.sub - local.set $5 + local.set $4 end local.get $1 i32.load offset=4 - local.set $7 + local.set $6 local.get $1 i32.load offset=8 - local.set $8 - local.get $7 + local.set $7 + local.get $6 if + local.get $6 local.get $7 - local.get $8 i32.store offset=8 end - local.get $8 + local.get $7 if - local.get $8 local.get $7 + local.get $6 i32.store offset=4 end local.get $1 local.get $0 + local.get $4 local.get $5 - local.get $6 call $~lib/allocator/tlsf/Root#getHead i32.eq if local.get $0 + local.get $4 local.get $5 - local.get $6 - local.get $8 + local.get $7 call $~lib/allocator/tlsf/Root#setHead - local.get $8 + local.get $7 i32.eqz if local.get $0 - local.get $5 + local.get $4 call $~lib/allocator/tlsf/Root#getSLMap - local.set $4 + local.set $8 local.get $0 - local.get $5 local.get $4 + local.get $8 i32.const 1 - local.get $6 + local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $4 + local.tee $8 call $~lib/allocator/tlsf/Root#setSLMap - local.get $4 + local.get $8 i32.eqz if local.get $0 local.get $0 i32.load i32.const 1 - local.get $5 + local.get $4 i32.shl i32.const -1 i32.xor @@ -389,15 +361,15 @@ (local $1 i32) local.get $0 i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.and i32.eqz if i32.const 0 - i32.const 56 - i32.const 96 + i32.const 72 + i32.const 102 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -408,10 +380,10 @@ i32.eqz if (result i32) i32.const 0 - i32.const 56 - i32.const 97 + i32.const 72 + i32.const 103 i32.const 11 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $1 @@ -420,41 +392,35 @@ (func $~lib/allocator/tlsf/Root#setJump (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.load - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and - i32.eqz - if + i32.const 0 + i32.ne + if (result i32) + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.get $2 + i32.eq + else i32.const 0 - i32.const 56 - i32.const 353 - i32.const 4 - call $~lib/env/abort - unreachable end - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.get $2 - i32.eq - i32.eqz - if + if (result i32) + local.get $2 + i32.load + i32.const 2 + i32.and + i32.const 0 + i32.ne + else i32.const 0 - i32.const 56 - i32.const 354 - i32.const 4 - call $~lib/env/abort - unreachable end - local.get $2 - i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and i32.eqz if i32.const 0 - i32.const 56 - i32.const 355 + i32.const 72 + i32.const 352 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -477,83 +443,45 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 208 + i32.const 72 + i32.const 211 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.load local.set $2 local.get $2 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 210 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor + i32.const 1 i32.and - local.tee $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $4 - if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $4 - end i32.eqz if i32.const 0 - i32.const 56 - i32.const 212 + i32.const 72 + i32.const 213 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 56 - i32.const 216 - i32.const 23 - call $~lib/env/abort - unreachable - else - local.get $4 - end - local.set $5 - local.get $5 + local.set $3 + local.get $3 i32.load - local.set $6 - local.get $6 - global.get $~lib/allocator/tlsf/FREE + local.set $4 + local.get $4 + i32.const 1 i32.and if local.get $0 - local.get $5 + local.get $3 call $~lib/allocator/tlsf/Root#remove local.get $1 local.get $2 - global.get $~lib/allocator/tlsf/Block.INFO - local.get $6 - global.get $~lib/allocator/tlsf/TAGS + i32.const 8 + local.get $4 + i32.const 3 i32.const -1 i32.xor i32.and @@ -563,126 +491,113 @@ i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.set $5 - local.get $5 + local.set $3 + local.get $3 i32.load - local.set $6 + local.set $4 end local.get $2 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.and if local.get $1 call $~lib/allocator/tlsf/Block#get:left - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 56 - i32.const 230 - i32.const 24 - call $~lib/env/abort - unreachable - else - local.get $4 - end - local.set $4 - local.get $4 + local.set $5 + local.get $5 i32.load - local.set $7 - local.get $7 - global.get $~lib/allocator/tlsf/FREE + local.set $6 + local.get $6 + i32.const 1 i32.and i32.eqz if i32.const 0 - i32.const 56 - i32.const 232 + i32.const 72 + i32.const 231 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - local.get $4 + local.get $5 call $~lib/allocator/tlsf/Root#remove - local.get $4 - local.get $7 - global.get $~lib/allocator/tlsf/Block.INFO + local.get $5 + local.get $6 + i32.const 8 local.get $2 - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and i32.add i32.add - local.tee $7 + local.tee $6 i32.store - local.get $4 + local.get $5 local.set $1 - local.get $7 + local.get $6 local.set $2 end - local.get $5 - local.get $6 - global.get $~lib/allocator/tlsf/LEFT_FREE + local.get $3 + local.get $4 + i32.const 2 i32.or i32.store local.get $0 local.get $1 - local.get $5 + local.get $3 call $~lib/allocator/tlsf/Root#setJump local.get $2 - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + local.set $7 + local.get $7 + i32.const 16 i32.ge_u - local.tee $7 if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE + local.get $7 + i32.const 1073741824 i32.lt_u else - local.get $7 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 56 - i32.const 245 + i32.const 72 + i32.const 244 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $3 - global.get $~lib/allocator/tlsf/SB_SIZE + local.get $7 + i32.const 256 i32.lt_u if i32.const 0 local.set $8 - local.get $3 + local.get $7 i32.const 8 i32.div_u local.set $9 else - local.get $3 + local.get $7 call $~lib/allocator/tlsf/fls local.set $8 - local.get $3 + local.get $7 local.get $8 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.sub i32.shr_u i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.shl i32.xor local.set $9 local.get $8 - global.get $~lib/allocator/tlsf/SB_BITS + i32.const 8 i32.const 1 i32.sub i32.sub @@ -739,39 +654,29 @@ local.get $1 local.get $2 i32.le_u - i32.eqz - if + if (result i32) + local.get $1 + i32.const 7 + i32.and + i32.eqz + else i32.const 0 - i32.const 56 - i32.const 396 - i32.const 4 - call $~lib/env/abort - unreachable end - local.get $1 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else i32.const 0 - i32.const 56 - i32.const 397 - i32.const 4 - call $~lib/env/abort - unreachable end - local.get $2 - i32.const 7 - i32.and - i32.eqz i32.eqz if i32.const 0 - i32.const 56 - i32.const 398 + i32.const 72 + i32.const 399 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -789,20 +694,20 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 403 + i32.const 72 + i32.const 408 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.get $3 i32.eq if local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.set $1 local.get $3 @@ -812,16 +717,16 @@ else local.get $1 local.get $0 - global.get $~lib/allocator/tlsf/Root.SIZE + i32.const 2916 i32.add i32.ge_u i32.eqz if i32.const 0 - i32.const 56 - i32.const 412 + i32.const 72 + i32.const 417 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -830,10 +735,10 @@ i32.sub local.set $5 local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.const 8 + i32.const 16 i32.add - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add i32.lt_u if @@ -842,7 +747,7 @@ end local.get $5 i32.const 2 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.mul i32.sub local.set $6 @@ -850,10 +755,10 @@ local.set $7 local.get $7 local.get $6 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.or local.get $4 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.and i32.or i32.store @@ -866,12 +771,12 @@ local.get $1 local.get $5 i32.add - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.set $8 local.get $8 i32.const 0 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.or i32.store local.get $0 @@ -889,10 +794,10 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 441 + i32.const 72 + i32.const 446 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -905,10 +810,10 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 441 + i32.const 72 + i32.const 446 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -922,85 +827,65 @@ (local $6 i32) (local $7 i32) local.get $1 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $2 - if (result i32) - local.get $1 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - local.get $2 - end - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 315 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - global.get $~lib/allocator/tlsf/SB_SIZE + i32.const 256 i32.lt_u if i32.const 0 - local.set $3 + local.set $2 local.get $1 i32.const 8 i32.div_u - local.set $4 + local.set $3 else local.get $1 call $~lib/allocator/tlsf/fls - local.set $3 + local.set $2 local.get $1 - local.get $3 - global.get $~lib/allocator/tlsf/SL_BITS + local.get $2 + i32.const 5 i32.sub i32.shr_u i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.shl i32.xor - local.set $4 - local.get $3 - global.get $~lib/allocator/tlsf/SB_BITS + local.set $3 + local.get $2 + i32.const 8 i32.const 1 i32.sub i32.sub - local.set $3 - local.get $4 - global.get $~lib/allocator/tlsf/SL_SIZE + local.set $2 + local.get $3 + i32.const 32 i32.const 1 i32.sub i32.lt_u if - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 else - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 i32.const 0 - local.set $4 + local.set $3 end end local.get $0 - local.get $3 + local.get $2 call $~lib/allocator/tlsf/Root#getSLMap i32.const 0 i32.const -1 i32.xor - local.get $4 + local.get $3 i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -1008,52 +893,52 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $2 i32.const 1 i32.add i32.shl i32.and - local.set $2 - local.get $2 + local.set $6 + local.get $6 i32.eqz if i32.const 0 - local.set $6 + local.set $5 else - local.get $2 + local.get $6 call $~lib/allocator/tlsf/ffs - local.set $3 + local.set $2 local.get $0 - local.get $3 + local.get $2 call $~lib/allocator/tlsf/Root#getSLMap local.tee $7 if (result i32) local.get $7 else i32.const 0 - i32.const 56 - i32.const 342 + i32.const 72 + i32.const 341 i32.const 16 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.set $5 + local.set $4 local.get $0 - local.get $3 - local.get $5 + local.get $2 + local.get $4 call $~lib/allocator/tlsf/ffs call $~lib/allocator/tlsf/Root#getHead - local.set $6 + local.set $5 end else local.get $0 - local.get $3 - local.get $5 + local.get $2 + local.get $4 call $~lib/allocator/tlsf/ffs call $~lib/allocator/tlsf/Root#getHead - local.set $6 + local.set $5 end - local.get $6 + local.get $5 ) (func $~lib/allocator/tlsf/Root#use (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -1063,124 +948,89 @@ i32.load local.set $3 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 367 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $2 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - local.tee $4 + i32.const 0 + i32.ne if (result i32) local.get $2 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u + i32.const 7 + i32.and + i32.eqz else - local.get $4 - end - i32.eqz - if i32.const 0 - i32.const 56 - i32.const 368 - i32.const 4 - call $~lib/env/abort - unreachable end - local.get $2 - i32.const 7 - i32.and - i32.eqz i32.eqz if i32.const 0 - i32.const 56 - i32.const 369 + i32.const 72 + i32.const 370 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 local.get $1 call $~lib/allocator/tlsf/Root#remove local.get $3 - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and local.get $2 i32.sub - local.set $5 - local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + local.set $4 + local.get $4 + i32.const 8 + i32.const 16 i32.add i32.ge_u if local.get $1 local.get $2 local.get $3 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.and i32.or i32.store local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add local.get $2 i32.add - local.set $4 - local.get $4 + local.set $5 local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO + local.get $4 + i32.const 8 i32.sub - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.or i32.store local.get $0 - local.get $4 + local.get $5 call $~lib/allocator/tlsf/Root#insert else local.get $1 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.const -1 i32.xor i32.and i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 56 - i32.const 387 - i32.const 25 - call $~lib/env/abort - unreachable - else - local.get $4 - end - local.set $4 - local.get $4 - local.get $4 + local.set $5 + local.get $5 + local.get $5 i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.const -1 i32.xor i32.and i32.store end local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add ) (func $~lib/allocator/tlsf/__mem_allocate (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -1207,7 +1057,7 @@ current_memory local.set $3 local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE + i32.const 2916 i32.add i32.const 65535 i32.add @@ -1221,7 +1071,6 @@ local.get $4 local.get $3 i32.gt_s - local.tee $5 if (result i32) local.get $4 local.get $3 @@ -1230,7 +1079,7 @@ i32.const 0 i32.lt_s else - local.get $5 + i32.const 0 end if unreachable @@ -1249,7 +1098,7 @@ local.set $5 loop $repeat|0 local.get $5 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u i32.eqz br_if $break|0 @@ -1263,7 +1112,7 @@ local.set $6 loop $repeat|1 local.get $6 - global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 32 i32.lt_u i32.eqz br_if $break|1 @@ -1293,7 +1142,7 @@ end local.get $1 local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE + i32.const 2916 i32.add i32.const 7 i32.add @@ -1308,7 +1157,7 @@ drop end local.get $0 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.const 1073741824 i32.gt_u if unreachable @@ -1321,7 +1170,7 @@ i32.xor i32.and local.tee $4 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.const 16 local.tee $3 local.get $4 local.get $3 @@ -1387,10 +1236,10 @@ i32.eqz if (result i32) i32.const 0 - i32.const 56 - i32.const 502 + i32.const 72 + i32.const 507 i32.const 12 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $6 @@ -1399,7 +1248,7 @@ end local.get $7 i32.load - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and @@ -1408,10 +1257,10 @@ i32.eqz if i32.const 0 - i32.const 56 - i32.const 505 + i32.const 72 + i32.const 510 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1430,38 +1279,51 @@ (local $3 i32) local.get $0 if + local.get $0 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 519 + i32.const 4 + call $~lib/builtins/abort + unreachable + end global.get $~lib/allocator/tlsf/ROOT local.set $1 local.get $1 if local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.set $2 local.get $2 i32.load local.set $3 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and i32.eqz i32.eqz if i32.const 0 - i32.const 56 - i32.const 518 + i32.const 72 + i32.const 524 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.or i32.store local.get $1 local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub call $~lib/allocator/tlsf/Root#insert end @@ -1473,1323 +1335,100 @@ ) (func $~lib/memory/memory.reset (; 24 ;) (type $FUNCSIG$v) i32.const 0 - i32.const 16 + i32.const 24 i32.const 77 i32.const 9 - call $~lib/env/abort + call $~lib/builtins/abort unreachable ) - (func $~lib/util/memory/memcpy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - block - block (result i32) + block $break|0 + loop $continue|0 local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - br $continue|1 - end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end end end end @@ -2911,7 +1550,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 27 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 26 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) i32.const 0 @@ -2943,11 +1582,10 @@ end end ) - (func $~lib/memory/memory.compare (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.compare (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) block $~lib/util/memory/memcmp|inlined.0 (result i32) local.get $0 local.set $5 @@ -2967,7 +1605,6 @@ local.get $3 i32.const 0 i32.ne - local.tee $6 if (result i32) local.get $5 i32.load8_u @@ -2975,7 +1612,7 @@ i32.load8_u i32.eq else - local.get $6 + i32.const 0 end if block @@ -3008,6 +1645,6 @@ end end ) - (func $null (; 29 ;) (type $FUNCSIG$v) + (func $null (; 28 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/runtime-default.optimized.wat b/tests/compiler/runtime-default.optimized.wat index 145b7c805a..e8b4743a6b 100644 --- a/tests/compiler/runtime-default.optimized.wat +++ b/tests/compiler/runtime-default.optimized.wat @@ -95,7 +95,7 @@ if i32.const 0 i32.const 24 - i32.const 159 + i32.const 165 i32.const 4 call $~lib/builtins/abort unreachable @@ -109,24 +109,19 @@ i32.store offset=4 ) (func $~lib/allocator/tlsf/Root#setHead (; 4 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 184 - i32.const 4 - call $~lib/builtins/abort - unreachable - end local.get $2 i32.const 32 - i32.ge_u + i32.lt_u + i32.const 0 + local.get $1 + i32.const 22 + i32.lt_u + select + i32.eqz if i32.const 0 i32.const 24 - i32.const 185 + i32.const 189 i32.const 4 call $~lib/builtins/abort unreachable @@ -152,7 +147,7 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 110 i32.const 4 call $~lib/builtins/abort unreachable @@ -170,7 +165,7 @@ if i32.const 0 i32.const 24 - i32.const 105 + i32.const 111 i32.const 11 call $~lib/builtins/abort unreachable @@ -183,7 +178,7 @@ if i32.const 0 i32.const 24 - i32.const 447 + i32.const 452 i32.const 2 call $~lib/builtins/abort unreachable @@ -194,24 +189,19 @@ i32.sub ) (func $~lib/allocator/tlsf/Root#getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 175 - i32.const 4 - call $~lib/builtins/abort - unreachable - end local.get $2 i32.const 32 - i32.ge_u + i32.lt_u + i32.const 0 + local.get $1 + i32.const 22 + i32.lt_u + select + i32.eqz if i32.const 0 i32.const 24 - i32.const 176 + i32.const 181 i32.const 4 call $~lib/builtins/abort unreachable @@ -234,7 +224,7 @@ if i32.const 0 i32.const 24 - i32.const 153 + i32.const 159 i32.const 4 call $~lib/builtins/abort unreachable @@ -260,7 +250,7 @@ if i32.const 0 i32.const 24 - i32.const 277 + i32.const 276 i32.const 4 call $~lib/builtins/abort unreachable @@ -282,7 +272,7 @@ if i32.const 0 i32.const 24 - i32.const 279 + i32.const 278 i32.const 4 call $~lib/builtins/abort unreachable @@ -383,7 +373,7 @@ if i32.const 0 i32.const 24 - i32.const 96 + i32.const 102 i32.const 4 call $~lib/builtins/abort unreachable @@ -397,7 +387,7 @@ if i32.const 0 i32.const 24 - i32.const 97 + i32.const 103 i32.const 11 call $~lib/builtins/abort unreachable @@ -409,36 +399,29 @@ i32.load i32.const 1 i32.and - i32.eqz - if + if (result i32) + local.get $0 + call $~lib/allocator/tlsf/Block#get:right + local.get $1 + i32.eq + else i32.const 0 - i32.const 24 - i32.const 353 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $0 - call $~lib/allocator/tlsf/Block#get:right - local.get $1 - i32.ne - if + if (result i32) + local.get $1 + i32.load + i32.const 2 + i32.and + i32.const 0 + i32.ne + else i32.const 0 - i32.const 24 - i32.const 354 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $1 - i32.load - i32.const 2 - i32.and i32.eqz if i32.const 0 i32.const 24 - i32.const 355 + i32.const 352 i32.const 4 call $~lib/builtins/abort unreachable @@ -459,7 +442,7 @@ if i32.const 0 i32.const 24 - i32.const 208 + i32.const 211 i32.const 4 call $~lib/builtins/abort unreachable @@ -473,54 +456,21 @@ if i32.const 0 i32.const 24 - i32.const 210 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - i32.const -4 - i32.and - local.tee $3 - i32.const 16 - i32.ge_u - if (result i32) - local.get $3 - i32.const 1073741824 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 212 + i32.const 213 i32.const 4 call $~lib/builtins/abort unreachable end local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $3 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 216 - i32.const 23 - call $~lib/builtins/abort - unreachable - end - local.get $3 + local.tee $5 i32.load local.tee $4 i32.const 1 i32.and if local.get $0 - local.get $3 + local.get $5 call $~lib/allocator/tlsf/Root#remove local.get $1 local.get $4 @@ -534,7 +484,7 @@ i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $3 + local.tee $5 i32.load local.set $4 end @@ -545,25 +495,15 @@ local.get $1 call $~lib/allocator/tlsf/Block#get:left local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 230 - i32.const 24 - call $~lib/builtins/abort - unreachable - end - local.get $1 i32.load - local.tee $5 + local.tee $3 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 24 - i32.const 232 + i32.const 231 i32.const 6 call $~lib/builtins/abort unreachable @@ -577,27 +517,27 @@ i32.and i32.const 8 i32.add - local.get $5 + local.get $3 i32.add local.tee $2 i32.store end - local.get $3 + local.get $5 local.get $4 i32.const 2 i32.or i32.store local.get $1 - local.get $3 + local.get $5 call $~lib/allocator/tlsf/Root#setJump local.get $2 i32.const -4 i32.and - local.tee $2 + local.tee $3 i32.const 16 i32.ge_u if (result i32) - local.get $2 + local.get $3 i32.const 1073741824 i32.lt_u else @@ -607,72 +547,72 @@ if i32.const 0 i32.const 24 - i32.const 245 + i32.const 244 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - local.get $2 + local.get $3 i32.const 256 i32.lt_u if (result i32) - local.get $2 + local.get $3 i32.const 8 i32.div_u - local.set $2 + local.set $3 i32.const 0 else - local.get $2 - local.get $2 + local.get $3 + local.get $3 call $~lib/allocator/tlsf/fls - local.tee $3 + local.tee $2 i32.const 5 i32.sub i32.shr_u i32.const 32 i32.xor - local.set $2 - local.get $3 + local.set $3 + local.get $2 i32.const 7 i32.sub end - local.tee $3 - local.get $2 + local.tee $4 + local.get $3 call $~lib/allocator/tlsf/Root#getHead - local.set $4 + local.set $2 local.get $1 i32.const 0 i32.store offset=4 local.get $1 - local.get $4 + local.get $2 i32.store offset=8 - local.get $4 + local.get $2 if - local.get $4 + local.get $2 local.get $1 i32.store offset=4 end local.get $0 + local.get $4 local.get $3 - local.get $2 local.get $1 call $~lib/allocator/tlsf/Root#setHead local.get $0 local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $4 local.get $0 - local.get $3 + local.get $4 call $~lib/allocator/tlsf/Root#getSLMap i32.const 1 - local.get $2 + local.get $3 i32.shl i32.or call $~lib/allocator/tlsf/Root#setSLMap @@ -680,35 +620,26 @@ (func $~lib/allocator/tlsf/Root#addMemory (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - local.get $1 local.get $2 - i32.gt_u - if - i32.const 0 - i32.const 24 - i32.const 396 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 i32.const 7 i32.and - if - i32.const 0 - i32.const 24 - i32.const 397 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 + i32.eqz + i32.const 0 + local.get $1 i32.const 7 i32.and + i32.eqz + i32.const 0 + local.get $1 + local.get $2 + i32.le_u + select + select + i32.eqz if i32.const 0 i32.const 24 - i32.const 398 + i32.const 399 i32.const 4 call $~lib/builtins/abort unreachable @@ -725,7 +656,7 @@ if i32.const 0 i32.const 24 - i32.const 403 + i32.const 408 i32.const 6 call $~lib/builtins/abort unreachable @@ -753,7 +684,7 @@ if i32.const 0 i32.const 24 - i32.const 412 + i32.const 417 i32.const 6 call $~lib/builtins/abort unreachable @@ -806,7 +737,7 @@ if i32.const 0 i32.const 24 - i32.const 441 + i32.const 446 i32.const 2 call $~lib/builtins/abort unreachable @@ -818,23 +749,6 @@ (local $2 i32) (local $3 i32) local.get $1 - i32.const 1073741824 - i32.lt_u - i32.const 0 - local.get $1 - i32.const 16 - i32.ge_u - select - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 315 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 i32.const 256 i32.lt_u if (result i32) @@ -906,7 +820,7 @@ if i32.const 0 i32.const 24 - i32.const 342 + i32.const 341 i32.const 16 call $~lib/builtins/abort unreachable @@ -929,39 +843,19 @@ local.tee $3 i32.const 1 i32.and - i32.eqz - if + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else i32.const 0 - i32.const 24 - i32.const 367 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $2 - i32.const 1073741824 - i32.lt_u - i32.const 0 - local.get $2 - i32.const 16 - i32.ge_u - select i32.eqz if i32.const 0 i32.const 24 - i32.const 368 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 369 + i32.const 370 i32.const 4 call $~lib/builtins/abort unreachable @@ -1009,16 +903,6 @@ local.get $1 call $~lib/allocator/tlsf/Block#get:right local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 387 - i32.const 25 - call $~lib/builtins/abort - unreachable - end - local.get $0 local.get $0 i32.load i32.const -3 @@ -1171,7 +1055,7 @@ if i32.const 0 i32.const 24 - i32.const 502 + i32.const 507 i32.const 12 call $~lib/builtins/abort unreachable @@ -1186,7 +1070,7 @@ if i32.const 0 i32.const 24 - i32.const 505 + i32.const 510 i32.const 2 call $~lib/builtins/abort unreachable @@ -1552,6 +1436,17 @@ (local $3 i32) local.get $0 if + local.get $0 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 519 + i32.const 4 + call $~lib/builtins/abort + unreachable + end global.get $~lib/allocator/tlsf/ROOT local.tee $1 if @@ -1566,7 +1461,7 @@ if i32.const 0 i32.const 24 - i32.const 518 + i32.const 524 i32.const 6 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/runtime-default.untouched.wat b/tests/compiler/runtime-default.untouched.wat index b1b6428714..2616fb6ccf 100644 --- a/tests/compiler/runtime-default.untouched.wat +++ b/tests/compiler/runtime-default.untouched.wat @@ -16,22 +16,6 @@ (elem (i32.const 0) $null) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) - (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) - (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) - (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) - (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) - (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) - (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) - (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) - (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) - (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) - (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) - (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) - (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) - (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) - (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) - (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) @@ -137,13 +121,13 @@ ) (func $~lib/allocator/tlsf/Root#setSLMap (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u i32.eqz if i32.const 0 i32.const 24 - i32.const 159 + i32.const 165 i32.const 4 call $~lib/builtins/abort unreachable @@ -158,32 +142,27 @@ ) (func $~lib/allocator/tlsf/Root#setHead (; 6 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u - i32.eqz - if + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else i32.const 0 - i32.const 24 - i32.const 184 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $2 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u i32.eqz if i32.const 0 i32.const 24 - i32.const 185 + i32.const 189 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 local.get $1 - global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 32 i32.mul local.get $2 i32.add @@ -201,7 +180,7 @@ (local $1 i32) local.get $0 i32.load - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and @@ -209,17 +188,17 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 110 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add local.get $0 i32.load - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and @@ -229,7 +208,7 @@ if (result i32) i32.const 0 i32.const 24 - i32.const 105 + i32.const 111 i32.const 11 call $~lib/builtins/abort unreachable @@ -245,7 +224,7 @@ if i32.const 0 i32.const 24 - i32.const 447 + i32.const 452 i32.const 2 call $~lib/builtins/abort unreachable @@ -257,32 +236,27 @@ ) (func $~lib/allocator/tlsf/Root#getHead (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u - i32.eqz - if + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else i32.const 0 - i32.const 24 - i32.const 175 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $2 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u i32.eqz if i32.const 0 i32.const 24 - i32.const 176 + i32.const 181 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 local.get $1 - global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 32 i32.mul local.get $2 i32.add @@ -293,13 +267,13 @@ ) (func $~lib/allocator/tlsf/Root#getSLMap (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u i32.eqz if i32.const 0 i32.const 24 - i32.const 153 + i32.const 159 i32.const 4 call $~lib/builtins/abort unreachable @@ -323,29 +297,29 @@ i32.load local.set $2 local.get $2 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 24 - i32.const 277 + i32.const 276 i32.const 4 call $~lib/builtins/abort unreachable end local.get $2 - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and local.set $3 local.get $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.const 16 i32.ge_u if (result i32) local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.const 1073741824 i32.lt_u else i32.const 0 @@ -354,13 +328,13 @@ if i32.const 0 i32.const 24 - i32.const 279 + i32.const 278 i32.const 4 call $~lib/builtins/abort unreachable end local.get $3 - global.get $~lib/allocator/tlsf/SB_SIZE + i32.const 256 i32.lt_u if i32.const 0 @@ -375,16 +349,16 @@ local.set $4 local.get $3 local.get $4 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.sub i32.shr_u i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.shl i32.xor local.set $5 local.get $4 - global.get $~lib/allocator/tlsf/SB_BITS + i32.const 8 i32.const 1 i32.sub i32.sub @@ -459,13 +433,13 @@ (local $1 i32) local.get $0 i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.and i32.eqz if i32.const 0 i32.const 24 - i32.const 96 + i32.const 102 i32.const 4 call $~lib/builtins/abort unreachable @@ -479,7 +453,7 @@ if (result i32) i32.const 0 i32.const 24 - i32.const 97 + i32.const 103 i32.const 11 call $~lib/builtins/abort unreachable @@ -490,39 +464,33 @@ (func $~lib/allocator/tlsf/Root#setJump (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.load - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and - i32.eqz - if + i32.const 0 + i32.ne + if (result i32) + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.get $2 + i32.eq + else i32.const 0 - i32.const 24 - i32.const 353 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.get $2 - i32.eq - i32.eqz - if + if (result i32) + local.get $2 + i32.load + i32.const 2 + i32.and + i32.const 0 + i32.ne + else i32.const 0 - i32.const 24 - i32.const 354 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $2 - i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and i32.eqz if i32.const 0 i32.const 24 - i32.const 355 + i32.const 352 i32.const 4 call $~lib/builtins/abort unreachable @@ -548,7 +516,7 @@ if i32.const 0 i32.const 24 - i32.const 208 + i32.const 211 i32.const 4 call $~lib/builtins/abort unreachable @@ -557,72 +525,35 @@ i32.load local.set $2 local.get $2 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 210 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor + i32.const 1 i32.and - local.tee $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - i32.const 0 - end i32.eqz if i32.const 0 i32.const 24 - i32.const 212 + i32.const 213 i32.const 4 call $~lib/builtins/abort unreachable end local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 216 - i32.const 23 - call $~lib/builtins/abort - unreachable - else - local.get $4 - end - local.set $5 - local.get $5 + local.set $3 + local.get $3 i32.load - local.set $6 - local.get $6 - global.get $~lib/allocator/tlsf/FREE + local.set $4 + local.get $4 + i32.const 1 i32.and if local.get $0 - local.get $5 + local.get $3 call $~lib/allocator/tlsf/Root#remove local.get $1 local.get $2 - global.get $~lib/allocator/tlsf/Block.INFO - local.get $6 - global.get $~lib/allocator/tlsf/TAGS + i32.const 8 + local.get $4 + i32.const 3 i32.const -1 i32.xor i32.and @@ -632,86 +563,74 @@ i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.set $5 - local.get $5 + local.set $3 + local.get $3 i32.load - local.set $6 + local.set $4 end local.get $2 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.and if local.get $1 call $~lib/allocator/tlsf/Block#get:left - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 230 - i32.const 24 - call $~lib/builtins/abort - unreachable - else - local.get $4 - end - local.set $4 - local.get $4 + local.set $5 + local.get $5 i32.load - local.set $7 - local.get $7 - global.get $~lib/allocator/tlsf/FREE + local.set $6 + local.get $6 + i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 24 - i32.const 232 + i32.const 231 i32.const 6 call $~lib/builtins/abort unreachable end local.get $0 - local.get $4 + local.get $5 call $~lib/allocator/tlsf/Root#remove - local.get $4 - local.get $7 - global.get $~lib/allocator/tlsf/Block.INFO + local.get $5 + local.get $6 + i32.const 8 local.get $2 - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and i32.add i32.add - local.tee $7 + local.tee $6 i32.store - local.get $4 + local.get $5 local.set $1 - local.get $7 + local.get $6 local.set $2 end - local.get $5 - local.get $6 - global.get $~lib/allocator/tlsf/LEFT_FREE + local.get $3 + local.get $4 + i32.const 2 i32.or i32.store local.get $0 local.get $1 - local.get $5 + local.get $3 call $~lib/allocator/tlsf/Root#setJump local.get $2 - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + local.set $7 + local.get $7 + i32.const 16 i32.ge_u if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE + local.get $7 + i32.const 1073741824 i32.lt_u else i32.const 0 @@ -720,37 +639,37 @@ if i32.const 0 i32.const 24 - i32.const 245 + i32.const 244 i32.const 4 call $~lib/builtins/abort unreachable end - local.get $3 - global.get $~lib/allocator/tlsf/SB_SIZE + local.get $7 + i32.const 256 i32.lt_u if i32.const 0 local.set $8 - local.get $3 + local.get $7 i32.const 8 i32.div_u local.set $9 else - local.get $3 + local.get $7 call $~lib/allocator/tlsf/fls local.set $8 - local.get $3 + local.get $7 local.get $8 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.sub i32.shr_u i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.shl i32.xor local.set $9 local.get $8 - global.get $~lib/allocator/tlsf/SB_BITS + i32.const 8 i32.const 1 i32.sub i32.sub @@ -807,37 +726,27 @@ local.get $1 local.get $2 i32.le_u - i32.eqz - if + if (result i32) + local.get $1 + i32.const 7 + i32.and + i32.eqz + else i32.const 0 - i32.const 24 - i32.const 396 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $1 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else i32.const 0 - i32.const 24 - i32.const 397 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $2 - i32.const 7 - i32.and - i32.eqz i32.eqz if i32.const 0 i32.const 24 - i32.const 398 + i32.const 399 i32.const 4 call $~lib/builtins/abort unreachable @@ -858,19 +767,19 @@ if i32.const 0 i32.const 24 - i32.const 403 + i32.const 408 i32.const 6 call $~lib/builtins/abort unreachable end local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.get $3 i32.eq if local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.set $1 local.get $3 @@ -880,14 +789,14 @@ else local.get $1 local.get $0 - global.get $~lib/allocator/tlsf/Root.SIZE + i32.const 2916 i32.add i32.ge_u i32.eqz if i32.const 0 i32.const 24 - i32.const 412 + i32.const 417 i32.const 6 call $~lib/builtins/abort unreachable @@ -898,10 +807,10 @@ i32.sub local.set $5 local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.const 8 + i32.const 16 i32.add - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add i32.lt_u if @@ -910,7 +819,7 @@ end local.get $5 i32.const 2 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.mul i32.sub local.set $6 @@ -918,10 +827,10 @@ local.set $7 local.get $7 local.get $6 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.or local.get $4 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.and i32.or i32.store @@ -934,12 +843,12 @@ local.get $1 local.get $5 i32.add - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.set $8 local.get $8 i32.const 0 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.or i32.store local.get $0 @@ -958,7 +867,7 @@ if i32.const 0 i32.const 24 - i32.const 441 + i32.const 446 i32.const 2 call $~lib/builtins/abort unreachable @@ -974,7 +883,7 @@ if i32.const 0 i32.const 24 - i32.const 441 + i32.const 446 i32.const 2 call $~lib/builtins/abort unreachable @@ -990,26 +899,7 @@ (local $6 i32) (local $7 i32) local.get $1 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - if (result i32) - local.get $1 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 315 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $~lib/allocator/tlsf/SB_SIZE + i32.const 256 i32.lt_u if i32.const 0 @@ -1024,22 +914,22 @@ local.set $2 local.get $1 local.get $2 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.sub i32.shr_u i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.shl i32.xor local.set $3 local.get $2 - global.get $~lib/allocator/tlsf/SB_BITS + i32.const 8 i32.const 1 i32.sub i32.sub local.set $2 local.get $3 - global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 32 i32.const 1 i32.sub i32.lt_u @@ -1099,7 +989,7 @@ else i32.const 0 i32.const 24 - i32.const 342 + i32.const 341 i32.const 16 call $~lib/builtins/abort unreachable @@ -1130,24 +1020,15 @@ i32.load local.set $3 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 367 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u + i32.const 0 + i32.ne if (result i32) local.get $2 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u + i32.const 7 + i32.and + i32.eqz else i32.const 0 end @@ -1155,20 +1036,7 @@ if i32.const 0 i32.const 24 - i32.const 368 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 369 + i32.const 370 i32.const 4 call $~lib/builtins/abort unreachable @@ -1177,7 +1045,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#remove local.get $3 - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and @@ -1185,29 +1053,29 @@ i32.sub local.set $4 local.get $4 - global.get $~lib/allocator/tlsf/Block.INFO - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.const 8 + i32.const 16 i32.add i32.ge_u if local.get $1 local.get $2 local.get $3 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.and i32.or i32.store local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add local.get $2 i32.add local.set $5 local.get $5 local.get $4 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.or i32.store local.get $0 @@ -1216,37 +1084,25 @@ else local.get $1 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.const -1 i32.xor i32.and i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $5 - i32.eqz - if (result i32) - i32.const 0 - i32.const 24 - i32.const 387 - i32.const 25 - call $~lib/builtins/abort - unreachable - else - local.get $5 - end local.set $5 local.get $5 local.get $5 i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.const -1 i32.xor i32.and i32.store end local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add ) (func $~lib/allocator/tlsf/__mem_allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -1273,7 +1129,7 @@ current_memory local.set $3 local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE + i32.const 2916 i32.add i32.const 65535 i32.add @@ -1314,7 +1170,7 @@ local.set $5 loop $repeat|0 local.get $5 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u i32.eqz br_if $break|0 @@ -1328,7 +1184,7 @@ local.set $6 loop $repeat|1 local.get $6 - global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 32 i32.lt_u i32.eqz br_if $break|1 @@ -1358,7 +1214,7 @@ end local.get $1 local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE + i32.const 2916 i32.add i32.const 7 i32.add @@ -1373,7 +1229,7 @@ drop end local.get $0 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.const 1073741824 i32.gt_u if unreachable @@ -1386,7 +1242,7 @@ i32.xor i32.and local.tee $4 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.const 16 local.tee $3 local.get $4 local.get $3 @@ -1453,7 +1309,7 @@ if (result i32) i32.const 0 i32.const 24 - i32.const 502 + i32.const 507 i32.const 12 call $~lib/builtins/abort unreachable @@ -1464,7 +1320,7 @@ end local.get $7 i32.load - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and @@ -1474,7 +1330,7 @@ if i32.const 0 i32.const 24 - i32.const 505 + i32.const 510 i32.const 2 call $~lib/builtins/abort unreachable @@ -1890,38 +1746,51 @@ (local $3 i32) local.get $0 if + local.get $0 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 519 + i32.const 4 + call $~lib/builtins/abort + unreachable + end global.get $~lib/allocator/tlsf/ROOT local.set $1 local.get $1 if local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.set $2 local.get $2 i32.load local.set $3 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and i32.eqz i32.eqz if i32.const 0 i32.const 24 - i32.const 518 + i32.const 524 i32.const 6 call $~lib/builtins/abort unreachable end local.get $2 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.or i32.store local.get $1 local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub call $~lib/allocator/tlsf/Root#insert end diff --git a/tests/compiler/runtime/flags.optimized.wat b/tests/compiler/runtime/flags.optimized.wat index 055591b565..3926438434 100644 --- a/tests/compiler/runtime/flags.optimized.wat +++ b/tests/compiler/runtime/flags.optimized.wat @@ -966,7 +966,7 @@ if i32.const 0 i32.const 72 - i32.const 159 + i32.const 165 i32.const 4 call $~lib/builtins/abort unreachable @@ -980,24 +980,19 @@ i32.store offset=4 ) (func $~lib/allocator/tlsf/Root#setHead (; 40 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 72 - i32.const 184 - i32.const 4 - call $~lib/builtins/abort - unreachable - end local.get $2 i32.const 32 - i32.ge_u + i32.lt_u + i32.const 0 + local.get $1 + i32.const 22 + i32.lt_u + select + i32.eqz if i32.const 0 i32.const 72 - i32.const 185 + i32.const 189 i32.const 4 call $~lib/builtins/abort unreachable @@ -1023,7 +1018,7 @@ if i32.const 0 i32.const 72 - i32.const 104 + i32.const 110 i32.const 4 call $~lib/builtins/abort unreachable @@ -1041,7 +1036,7 @@ if i32.const 0 i32.const 72 - i32.const 105 + i32.const 111 i32.const 11 call $~lib/builtins/abort unreachable @@ -1054,7 +1049,7 @@ if i32.const 0 i32.const 72 - i32.const 447 + i32.const 452 i32.const 2 call $~lib/builtins/abort unreachable @@ -1065,24 +1060,19 @@ i32.sub ) (func $~lib/allocator/tlsf/Root#getHead (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 72 - i32.const 175 - i32.const 4 - call $~lib/builtins/abort - unreachable - end local.get $2 i32.const 32 - i32.ge_u + i32.lt_u + i32.const 0 + local.get $1 + i32.const 22 + i32.lt_u + select + i32.eqz if i32.const 0 i32.const 72 - i32.const 176 + i32.const 181 i32.const 4 call $~lib/builtins/abort unreachable @@ -1105,7 +1095,7 @@ if i32.const 0 i32.const 72 - i32.const 153 + i32.const 159 i32.const 4 call $~lib/builtins/abort unreachable @@ -1131,7 +1121,7 @@ if i32.const 0 i32.const 72 - i32.const 277 + i32.const 276 i32.const 4 call $~lib/builtins/abort unreachable @@ -1153,7 +1143,7 @@ if i32.const 0 i32.const 72 - i32.const 279 + i32.const 278 i32.const 4 call $~lib/builtins/abort unreachable @@ -1254,7 +1244,7 @@ if i32.const 0 i32.const 72 - i32.const 96 + i32.const 102 i32.const 4 call $~lib/builtins/abort unreachable @@ -1268,7 +1258,7 @@ if i32.const 0 i32.const 72 - i32.const 97 + i32.const 103 i32.const 11 call $~lib/builtins/abort unreachable @@ -1280,36 +1270,29 @@ i32.load i32.const 1 i32.and - i32.eqz - if + if (result i32) + local.get $0 + call $~lib/allocator/tlsf/Block#get:right + local.get $1 + i32.eq + else i32.const 0 - i32.const 72 - i32.const 353 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $0 - call $~lib/allocator/tlsf/Block#get:right - local.get $1 - i32.ne - if + if (result i32) + local.get $1 + i32.load + i32.const 2 + i32.and + i32.const 0 + i32.ne + else i32.const 0 - i32.const 72 - i32.const 354 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $1 - i32.load - i32.const 2 - i32.and i32.eqz if i32.const 0 i32.const 72 - i32.const 355 + i32.const 352 i32.const 4 call $~lib/builtins/abort unreachable @@ -1330,7 +1313,7 @@ if i32.const 0 i32.const 72 - i32.const 208 + i32.const 211 i32.const 4 call $~lib/builtins/abort unreachable @@ -1344,54 +1327,21 @@ if i32.const 0 i32.const 72 - i32.const 210 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - i32.const -4 - i32.and - local.tee $3 - i32.const 16 - i32.ge_u - if (result i32) - local.get $3 - i32.const 1073741824 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 72 - i32.const 212 + i32.const 213 i32.const 4 call $~lib/builtins/abort unreachable end local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $3 - i32.eqz - if - i32.const 0 - i32.const 72 - i32.const 216 - i32.const 23 - call $~lib/builtins/abort - unreachable - end - local.get $3 + local.tee $5 i32.load local.tee $4 i32.const 1 i32.and if local.get $0 - local.get $3 + local.get $5 call $~lib/allocator/tlsf/Root#remove local.get $1 local.get $4 @@ -1405,7 +1355,7 @@ i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $3 + local.tee $5 i32.load local.set $4 end @@ -1416,25 +1366,15 @@ local.get $1 call $~lib/allocator/tlsf/Block#get:left local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 72 - i32.const 230 - i32.const 24 - call $~lib/builtins/abort - unreachable - end - local.get $1 i32.load - local.tee $5 + local.tee $3 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 72 - i32.const 232 + i32.const 231 i32.const 6 call $~lib/builtins/abort unreachable @@ -1448,27 +1388,27 @@ i32.and i32.const 8 i32.add - local.get $5 + local.get $3 i32.add local.tee $2 i32.store end - local.get $3 + local.get $5 local.get $4 i32.const 2 i32.or i32.store local.get $1 - local.get $3 + local.get $5 call $~lib/allocator/tlsf/Root#setJump local.get $2 i32.const -4 i32.and - local.tee $2 + local.tee $3 i32.const 16 i32.ge_u if (result i32) - local.get $2 + local.get $3 i32.const 1073741824 i32.lt_u else @@ -1478,72 +1418,72 @@ if i32.const 0 i32.const 72 - i32.const 245 + i32.const 244 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - local.get $2 + local.get $3 i32.const 256 i32.lt_u if (result i32) - local.get $2 + local.get $3 i32.const 8 i32.div_u - local.set $2 + local.set $3 i32.const 0 else - local.get $2 - local.get $2 + local.get $3 + local.get $3 call $~lib/allocator/tlsf/fls - local.tee $3 + local.tee $2 i32.const 5 i32.sub i32.shr_u i32.const 32 i32.xor - local.set $2 - local.get $3 + local.set $3 + local.get $2 i32.const 7 i32.sub end - local.tee $3 - local.get $2 + local.tee $4 + local.get $3 call $~lib/allocator/tlsf/Root#getHead - local.set $4 + local.set $2 local.get $1 i32.const 0 i32.store offset=4 local.get $1 - local.get $4 + local.get $2 i32.store offset=8 - local.get $4 + local.get $2 if - local.get $4 + local.get $2 local.get $1 i32.store offset=4 end local.get $0 + local.get $4 local.get $3 - local.get $2 local.get $1 call $~lib/allocator/tlsf/Root#setHead local.get $0 local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $4 local.get $0 - local.get $3 + local.get $4 call $~lib/allocator/tlsf/Root#getSLMap i32.const 1 - local.get $2 + local.get $3 i32.shl i32.or call $~lib/allocator/tlsf/Root#setSLMap @@ -1551,35 +1491,26 @@ (func $~lib/allocator/tlsf/Root#addMemory (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - local.get $1 local.get $2 - i32.gt_u - if - i32.const 0 - i32.const 72 - i32.const 396 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 i32.const 7 i32.and - if - i32.const 0 - i32.const 72 - i32.const 397 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 + i32.eqz + i32.const 0 + local.get $1 i32.const 7 i32.and + i32.eqz + i32.const 0 + local.get $1 + local.get $2 + i32.le_u + select + select + i32.eqz if i32.const 0 i32.const 72 - i32.const 398 + i32.const 399 i32.const 4 call $~lib/builtins/abort unreachable @@ -1596,7 +1527,7 @@ if i32.const 0 i32.const 72 - i32.const 403 + i32.const 408 i32.const 6 call $~lib/builtins/abort unreachable @@ -1624,7 +1555,7 @@ if i32.const 0 i32.const 72 - i32.const 412 + i32.const 417 i32.const 6 call $~lib/builtins/abort unreachable @@ -1677,7 +1608,7 @@ if i32.const 0 i32.const 72 - i32.const 441 + i32.const 446 i32.const 2 call $~lib/builtins/abort unreachable @@ -1689,23 +1620,6 @@ (local $2 i32) (local $3 i32) local.get $1 - i32.const 1073741824 - i32.lt_u - i32.const 0 - local.get $1 - i32.const 16 - i32.ge_u - select - i32.eqz - if - i32.const 0 - i32.const 72 - i32.const 315 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 i32.const 256 i32.lt_u if (result i32) @@ -1777,7 +1691,7 @@ if i32.const 0 i32.const 72 - i32.const 342 + i32.const 341 i32.const 16 call $~lib/builtins/abort unreachable @@ -1800,39 +1714,19 @@ local.tee $3 i32.const 1 i32.and - i32.eqz - if + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else i32.const 0 - i32.const 72 - i32.const 367 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $2 - i32.const 1073741824 - i32.lt_u - i32.const 0 - local.get $2 - i32.const 16 - i32.ge_u - select i32.eqz if i32.const 0 i32.const 72 - i32.const 368 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - if - i32.const 0 - i32.const 72 - i32.const 369 + i32.const 370 i32.const 4 call $~lib/builtins/abort unreachable @@ -1880,16 +1774,6 @@ local.get $1 call $~lib/allocator/tlsf/Block#get:right local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 72 - i32.const 387 - i32.const 25 - call $~lib/builtins/abort - unreachable - end - local.get $0 local.get $0 i32.load i32.const -3 @@ -2042,7 +1926,7 @@ if i32.const 0 i32.const 72 - i32.const 502 + i32.const 507 i32.const 12 call $~lib/builtins/abort unreachable @@ -2057,7 +1941,7 @@ if i32.const 0 i32.const 72 - i32.const 505 + i32.const 510 i32.const 2 call $~lib/builtins/abort unreachable @@ -2423,6 +2307,17 @@ (local $3 i32) local.get $0 if + local.get $0 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 72 + i32.const 519 + i32.const 4 + call $~lib/builtins/abort + unreachable + end global.get $~lib/allocator/tlsf/ROOT local.tee $1 if @@ -2437,7 +2332,7 @@ if i32.const 0 i32.const 72 - i32.const 518 + i32.const 524 i32.const 6 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/runtime/flags.untouched.wat b/tests/compiler/runtime/flags.untouched.wat index 7d6d5c7fb5..3ebb780a75 100644 --- a/tests/compiler/runtime/flags.untouched.wat +++ b/tests/compiler/runtime/flags.untouched.wat @@ -19,22 +19,6 @@ (global $runtime/flags/KEY_ALIGN_REF i32 (i32.const 8192)) (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) - (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) - (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) - (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) - (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) - (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) - (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) - (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) - (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) - (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) - (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) - (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) - (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) - (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) - (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) - (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) @@ -885,13 +869,13 @@ ) (func $~lib/allocator/tlsf/Root#setSLMap (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u i32.eqz if i32.const 0 i32.const 72 - i32.const 159 + i32.const 165 i32.const 4 call $~lib/builtins/abort unreachable @@ -906,32 +890,27 @@ ) (func $~lib/allocator/tlsf/Root#setHead (; 42 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u - i32.eqz - if + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else i32.const 0 - i32.const 72 - i32.const 184 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $2 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u i32.eqz if i32.const 0 i32.const 72 - i32.const 185 + i32.const 189 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 local.get $1 - global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 32 i32.mul local.get $2 i32.add @@ -949,7 +928,7 @@ (local $1 i32) local.get $0 i32.load - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and @@ -957,17 +936,17 @@ if i32.const 0 i32.const 72 - i32.const 104 + i32.const 110 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add local.get $0 i32.load - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and @@ -977,7 +956,7 @@ if (result i32) i32.const 0 i32.const 72 - i32.const 105 + i32.const 111 i32.const 11 call $~lib/builtins/abort unreachable @@ -993,7 +972,7 @@ if i32.const 0 i32.const 72 - i32.const 447 + i32.const 452 i32.const 2 call $~lib/builtins/abort unreachable @@ -1005,32 +984,27 @@ ) (func $~lib/allocator/tlsf/Root#getHead (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u - i32.eqz - if + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else i32.const 0 - i32.const 72 - i32.const 175 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $2 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u i32.eqz if i32.const 0 i32.const 72 - i32.const 176 + i32.const 181 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 local.get $1 - global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 32 i32.mul local.get $2 i32.add @@ -1041,13 +1015,13 @@ ) (func $~lib/allocator/tlsf/Root#getSLMap (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u i32.eqz if i32.const 0 i32.const 72 - i32.const 153 + i32.const 159 i32.const 4 call $~lib/builtins/abort unreachable @@ -1071,29 +1045,29 @@ i32.load local.set $2 local.get $2 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 72 - i32.const 277 + i32.const 276 i32.const 4 call $~lib/builtins/abort unreachable end local.get $2 - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and local.set $3 local.get $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.const 16 i32.ge_u if (result i32) local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.const 1073741824 i32.lt_u else i32.const 0 @@ -1102,13 +1076,13 @@ if i32.const 0 i32.const 72 - i32.const 279 + i32.const 278 i32.const 4 call $~lib/builtins/abort unreachable end local.get $3 - global.get $~lib/allocator/tlsf/SB_SIZE + i32.const 256 i32.lt_u if i32.const 0 @@ -1123,16 +1097,16 @@ local.set $4 local.get $3 local.get $4 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.sub i32.shr_u i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.shl i32.xor local.set $5 local.get $4 - global.get $~lib/allocator/tlsf/SB_BITS + i32.const 8 i32.const 1 i32.sub i32.sub @@ -1207,13 +1181,13 @@ (local $1 i32) local.get $0 i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.and i32.eqz if i32.const 0 i32.const 72 - i32.const 96 + i32.const 102 i32.const 4 call $~lib/builtins/abort unreachable @@ -1227,7 +1201,7 @@ if (result i32) i32.const 0 i32.const 72 - i32.const 97 + i32.const 103 i32.const 11 call $~lib/builtins/abort unreachable @@ -1238,39 +1212,33 @@ (func $~lib/allocator/tlsf/Root#setJump (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.load - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and - i32.eqz - if + i32.const 0 + i32.ne + if (result i32) + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.get $2 + i32.eq + else i32.const 0 - i32.const 72 - i32.const 353 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.get $2 - i32.eq - i32.eqz - if + if (result i32) + local.get $2 + i32.load + i32.const 2 + i32.and + i32.const 0 + i32.ne + else i32.const 0 - i32.const 72 - i32.const 354 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $2 - i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and i32.eqz if i32.const 0 i32.const 72 - i32.const 355 + i32.const 352 i32.const 4 call $~lib/builtins/abort unreachable @@ -1296,7 +1264,7 @@ if i32.const 0 i32.const 72 - i32.const 208 + i32.const 211 i32.const 4 call $~lib/builtins/abort unreachable @@ -1305,72 +1273,35 @@ i32.load local.set $2 local.get $2 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 72 - i32.const 210 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor + i32.const 1 i32.and - local.tee $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - i32.const 0 - end i32.eqz if i32.const 0 i32.const 72 - i32.const 212 + i32.const 213 i32.const 4 call $~lib/builtins/abort unreachable end local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 72 - i32.const 216 - i32.const 23 - call $~lib/builtins/abort - unreachable - else - local.get $4 - end - local.set $5 - local.get $5 + local.set $3 + local.get $3 i32.load - local.set $6 - local.get $6 - global.get $~lib/allocator/tlsf/FREE + local.set $4 + local.get $4 + i32.const 1 i32.and if local.get $0 - local.get $5 + local.get $3 call $~lib/allocator/tlsf/Root#remove local.get $1 local.get $2 - global.get $~lib/allocator/tlsf/Block.INFO - local.get $6 - global.get $~lib/allocator/tlsf/TAGS + i32.const 8 + local.get $4 + i32.const 3 i32.const -1 i32.xor i32.and @@ -1380,86 +1311,74 @@ i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.set $5 - local.get $5 + local.set $3 + local.get $3 i32.load - local.set $6 + local.set $4 end local.get $2 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.and if local.get $1 call $~lib/allocator/tlsf/Block#get:left - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 72 - i32.const 230 - i32.const 24 - call $~lib/builtins/abort - unreachable - else - local.get $4 - end - local.set $4 - local.get $4 + local.set $5 + local.get $5 i32.load - local.set $7 - local.get $7 - global.get $~lib/allocator/tlsf/FREE + local.set $6 + local.get $6 + i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 72 - i32.const 232 + i32.const 231 i32.const 6 call $~lib/builtins/abort unreachable end local.get $0 - local.get $4 + local.get $5 call $~lib/allocator/tlsf/Root#remove - local.get $4 - local.get $7 - global.get $~lib/allocator/tlsf/Block.INFO + local.get $5 + local.get $6 + i32.const 8 local.get $2 - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and i32.add i32.add - local.tee $7 + local.tee $6 i32.store - local.get $4 + local.get $5 local.set $1 - local.get $7 + local.get $6 local.set $2 end - local.get $5 - local.get $6 - global.get $~lib/allocator/tlsf/LEFT_FREE + local.get $3 + local.get $4 + i32.const 2 i32.or i32.store local.get $0 local.get $1 - local.get $5 + local.get $3 call $~lib/allocator/tlsf/Root#setJump local.get $2 - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + local.set $7 + local.get $7 + i32.const 16 i32.ge_u if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE + local.get $7 + i32.const 1073741824 i32.lt_u else i32.const 0 @@ -1468,37 +1387,37 @@ if i32.const 0 i32.const 72 - i32.const 245 + i32.const 244 i32.const 4 call $~lib/builtins/abort unreachable end - local.get $3 - global.get $~lib/allocator/tlsf/SB_SIZE + local.get $7 + i32.const 256 i32.lt_u if i32.const 0 local.set $8 - local.get $3 + local.get $7 i32.const 8 i32.div_u local.set $9 else - local.get $3 + local.get $7 call $~lib/allocator/tlsf/fls local.set $8 - local.get $3 + local.get $7 local.get $8 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.sub i32.shr_u i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.shl i32.xor local.set $9 local.get $8 - global.get $~lib/allocator/tlsf/SB_BITS + i32.const 8 i32.const 1 i32.sub i32.sub @@ -1555,37 +1474,27 @@ local.get $1 local.get $2 i32.le_u - i32.eqz - if + if (result i32) + local.get $1 + i32.const 7 + i32.and + i32.eqz + else i32.const 0 - i32.const 72 - i32.const 396 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $1 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else i32.const 0 - i32.const 72 - i32.const 397 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $2 - i32.const 7 - i32.and - i32.eqz i32.eqz if i32.const 0 i32.const 72 - i32.const 398 + i32.const 399 i32.const 4 call $~lib/builtins/abort unreachable @@ -1606,19 +1515,19 @@ if i32.const 0 i32.const 72 - i32.const 403 + i32.const 408 i32.const 6 call $~lib/builtins/abort unreachable end local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.get $3 i32.eq if local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.set $1 local.get $3 @@ -1628,14 +1537,14 @@ else local.get $1 local.get $0 - global.get $~lib/allocator/tlsf/Root.SIZE + i32.const 2916 i32.add i32.ge_u i32.eqz if i32.const 0 i32.const 72 - i32.const 412 + i32.const 417 i32.const 6 call $~lib/builtins/abort unreachable @@ -1646,10 +1555,10 @@ i32.sub local.set $5 local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.const 8 + i32.const 16 i32.add - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add i32.lt_u if @@ -1658,7 +1567,7 @@ end local.get $5 i32.const 2 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.mul i32.sub local.set $6 @@ -1666,10 +1575,10 @@ local.set $7 local.get $7 local.get $6 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.or local.get $4 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.and i32.or i32.store @@ -1682,12 +1591,12 @@ local.get $1 local.get $5 i32.add - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.set $8 local.get $8 i32.const 0 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.or i32.store local.get $0 @@ -1706,7 +1615,7 @@ if i32.const 0 i32.const 72 - i32.const 441 + i32.const 446 i32.const 2 call $~lib/builtins/abort unreachable @@ -1722,7 +1631,7 @@ if i32.const 0 i32.const 72 - i32.const 441 + i32.const 446 i32.const 2 call $~lib/builtins/abort unreachable @@ -1738,26 +1647,7 @@ (local $6 i32) (local $7 i32) local.get $1 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - if (result i32) - local.get $1 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 72 - i32.const 315 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $~lib/allocator/tlsf/SB_SIZE + i32.const 256 i32.lt_u if i32.const 0 @@ -1772,22 +1662,22 @@ local.set $2 local.get $1 local.get $2 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.sub i32.shr_u i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.shl i32.xor local.set $3 local.get $2 - global.get $~lib/allocator/tlsf/SB_BITS + i32.const 8 i32.const 1 i32.sub i32.sub local.set $2 local.get $3 - global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 32 i32.const 1 i32.sub i32.lt_u @@ -1847,7 +1737,7 @@ else i32.const 0 i32.const 72 - i32.const 342 + i32.const 341 i32.const 16 call $~lib/builtins/abort unreachable @@ -1878,24 +1768,15 @@ i32.load local.set $3 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and - i32.eqz - if - i32.const 0 - i32.const 72 - i32.const 367 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u + i32.const 0 + i32.ne if (result i32) local.get $2 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u + i32.const 7 + i32.and + i32.eqz else i32.const 0 end @@ -1903,20 +1784,7 @@ if i32.const 0 i32.const 72 - i32.const 368 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 72 - i32.const 369 + i32.const 370 i32.const 4 call $~lib/builtins/abort unreachable @@ -1925,7 +1793,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#remove local.get $3 - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and @@ -1933,29 +1801,29 @@ i32.sub local.set $4 local.get $4 - global.get $~lib/allocator/tlsf/Block.INFO - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.const 8 + i32.const 16 i32.add i32.ge_u if local.get $1 local.get $2 local.get $3 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.and i32.or i32.store local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add local.get $2 i32.add local.set $5 local.get $5 local.get $4 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.or i32.store local.get $0 @@ -1964,37 +1832,25 @@ else local.get $1 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.const -1 i32.xor i32.and i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $5 - i32.eqz - if (result i32) - i32.const 0 - i32.const 72 - i32.const 387 - i32.const 25 - call $~lib/builtins/abort - unreachable - else - local.get $5 - end local.set $5 local.get $5 local.get $5 i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.const -1 i32.xor i32.and i32.store end local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add ) (func $~lib/allocator/tlsf/__mem_allocate (; 57 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -2021,7 +1877,7 @@ current_memory local.set $3 local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE + i32.const 2916 i32.add i32.const 65535 i32.add @@ -2062,7 +1918,7 @@ local.set $5 loop $repeat|0 local.get $5 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u i32.eqz br_if $break|0 @@ -2076,7 +1932,7 @@ local.set $6 loop $repeat|1 local.get $6 - global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 32 i32.lt_u i32.eqz br_if $break|1 @@ -2106,7 +1962,7 @@ end local.get $1 local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE + i32.const 2916 i32.add i32.const 7 i32.add @@ -2121,7 +1977,7 @@ drop end local.get $0 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.const 1073741824 i32.gt_u if unreachable @@ -2134,7 +1990,7 @@ i32.xor i32.and local.tee $4 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.const 16 local.tee $3 local.get $4 local.get $3 @@ -2201,7 +2057,7 @@ if (result i32) i32.const 0 i32.const 72 - i32.const 502 + i32.const 507 i32.const 12 call $~lib/builtins/abort unreachable @@ -2212,7 +2068,7 @@ end local.get $7 i32.load - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and @@ -2222,7 +2078,7 @@ if i32.const 0 i32.const 72 - i32.const 505 + i32.const 510 i32.const 2 call $~lib/builtins/abort unreachable @@ -2638,38 +2494,51 @@ (local $3 i32) local.get $0 if + local.get $0 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 519 + i32.const 4 + call $~lib/builtins/abort + unreachable + end global.get $~lib/allocator/tlsf/ROOT local.set $1 local.get $1 if local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.set $2 local.get $2 i32.load local.set $3 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and i32.eqz i32.eqz if i32.const 0 i32.const 72 - i32.const 518 + i32.const 524 i32.const 6 call $~lib/builtins/abort unreachable end local.get $2 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.or i32.store local.get $1 local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub call $~lib/allocator/tlsf/Root#insert end diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index f4b09ccb1c..c752ce5dd8 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -46,7 +46,7 @@ if i32.const 0 i32.const 168 - i32.const 159 + i32.const 165 i32.const 4 call $~lib/builtins/abort unreachable @@ -60,24 +60,19 @@ i32.store offset=4 ) (func $~lib/allocator/tlsf/Root#setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 168 - i32.const 184 - i32.const 4 - call $~lib/builtins/abort - unreachable - end local.get $2 i32.const 32 - i32.ge_u + i32.lt_u + i32.const 0 + local.get $1 + i32.const 22 + i32.lt_u + select + i32.eqz if i32.const 0 i32.const 168 - i32.const 185 + i32.const 189 i32.const 4 call $~lib/builtins/abort unreachable @@ -103,7 +98,7 @@ if i32.const 0 i32.const 168 - i32.const 104 + i32.const 110 i32.const 4 call $~lib/builtins/abort unreachable @@ -121,7 +116,7 @@ if i32.const 0 i32.const 168 - i32.const 105 + i32.const 111 i32.const 11 call $~lib/builtins/abort unreachable @@ -134,7 +129,7 @@ if i32.const 0 i32.const 168 - i32.const 447 + i32.const 452 i32.const 2 call $~lib/builtins/abort unreachable @@ -145,24 +140,19 @@ i32.sub ) (func $~lib/allocator/tlsf/Root#getHead (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 168 - i32.const 175 - i32.const 4 - call $~lib/builtins/abort - unreachable - end local.get $2 i32.const 32 - i32.ge_u + i32.lt_u + i32.const 0 + local.get $1 + i32.const 22 + i32.lt_u + select + i32.eqz if i32.const 0 i32.const 168 - i32.const 176 + i32.const 181 i32.const 4 call $~lib/builtins/abort unreachable @@ -185,7 +175,7 @@ if i32.const 0 i32.const 168 - i32.const 153 + i32.const 159 i32.const 4 call $~lib/builtins/abort unreachable @@ -211,7 +201,7 @@ if i32.const 0 i32.const 168 - i32.const 277 + i32.const 276 i32.const 4 call $~lib/builtins/abort unreachable @@ -233,7 +223,7 @@ if i32.const 0 i32.const 168 - i32.const 279 + i32.const 278 i32.const 4 call $~lib/builtins/abort unreachable @@ -334,7 +324,7 @@ if i32.const 0 i32.const 168 - i32.const 96 + i32.const 102 i32.const 4 call $~lib/builtins/abort unreachable @@ -348,7 +338,7 @@ if i32.const 0 i32.const 168 - i32.const 97 + i32.const 103 i32.const 11 call $~lib/builtins/abort unreachable @@ -360,36 +350,29 @@ i32.load i32.const 1 i32.and - i32.eqz - if + if (result i32) + local.get $0 + call $~lib/allocator/tlsf/Block#get:right + local.get $1 + i32.eq + else i32.const 0 - i32.const 168 - i32.const 353 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $0 - call $~lib/allocator/tlsf/Block#get:right - local.get $1 - i32.ne - if + if (result i32) + local.get $1 + i32.load + i32.const 2 + i32.and + i32.const 0 + i32.ne + else i32.const 0 - i32.const 168 - i32.const 354 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $1 - i32.load - i32.const 2 - i32.and i32.eqz if i32.const 0 i32.const 168 - i32.const 355 + i32.const 352 i32.const 4 call $~lib/builtins/abort unreachable @@ -410,7 +393,7 @@ if i32.const 0 i32.const 168 - i32.const 208 + i32.const 211 i32.const 4 call $~lib/builtins/abort unreachable @@ -424,54 +407,21 @@ if i32.const 0 i32.const 168 - i32.const 210 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - i32.const -4 - i32.and - local.tee $3 - i32.const 16 - i32.ge_u - if (result i32) - local.get $3 - i32.const 1073741824 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 168 - i32.const 212 + i32.const 213 i32.const 4 call $~lib/builtins/abort unreachable end local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $3 - i32.eqz - if - i32.const 0 - i32.const 168 - i32.const 216 - i32.const 23 - call $~lib/builtins/abort - unreachable - end - local.get $3 + local.tee $5 i32.load local.tee $4 i32.const 1 i32.and if local.get $0 - local.get $3 + local.get $5 call $~lib/allocator/tlsf/Root#remove local.get $1 local.get $4 @@ -485,7 +435,7 @@ i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $3 + local.tee $5 i32.load local.set $4 end @@ -496,25 +446,15 @@ local.get $1 call $~lib/allocator/tlsf/Block#get:left local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 168 - i32.const 230 - i32.const 24 - call $~lib/builtins/abort - unreachable - end - local.get $1 i32.load - local.tee $5 + local.tee $3 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 168 - i32.const 232 + i32.const 231 i32.const 6 call $~lib/builtins/abort unreachable @@ -528,27 +468,27 @@ i32.and i32.const 8 i32.add - local.get $5 + local.get $3 i32.add local.tee $2 i32.store end - local.get $3 + local.get $5 local.get $4 i32.const 2 i32.or i32.store local.get $1 - local.get $3 + local.get $5 call $~lib/allocator/tlsf/Root#setJump local.get $2 i32.const -4 i32.and - local.tee $2 + local.tee $3 i32.const 16 i32.ge_u if (result i32) - local.get $2 + local.get $3 i32.const 1073741824 i32.lt_u else @@ -558,72 +498,72 @@ if i32.const 0 i32.const 168 - i32.const 245 + i32.const 244 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - local.get $2 + local.get $3 i32.const 256 i32.lt_u if (result i32) - local.get $2 + local.get $3 i32.const 8 i32.div_u - local.set $2 + local.set $3 i32.const 0 else - local.get $2 - local.get $2 + local.get $3 + local.get $3 call $~lib/allocator/tlsf/fls - local.tee $3 + local.tee $2 i32.const 5 i32.sub i32.shr_u i32.const 32 i32.xor - local.set $2 - local.get $3 + local.set $3 + local.get $2 i32.const 7 i32.sub end - local.tee $3 - local.get $2 + local.tee $4 + local.get $3 call $~lib/allocator/tlsf/Root#getHead - local.set $4 + local.set $2 local.get $1 i32.const 0 i32.store offset=4 local.get $1 - local.get $4 + local.get $2 i32.store offset=8 - local.get $4 + local.get $2 if - local.get $4 + local.get $2 local.get $1 i32.store offset=4 end local.get $0 + local.get $4 local.get $3 - local.get $2 local.get $1 call $~lib/allocator/tlsf/Root#setHead local.get $0 local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $4 local.get $0 - local.get $3 + local.get $4 call $~lib/allocator/tlsf/Root#getSLMap i32.const 1 - local.get $2 + local.get $3 i32.shl i32.or call $~lib/allocator/tlsf/Root#setSLMap @@ -631,35 +571,26 @@ (func $~lib/allocator/tlsf/Root#addMemory (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - local.get $1 local.get $2 - i32.gt_u - if - i32.const 0 - i32.const 168 - i32.const 396 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 i32.const 7 i32.and - if - i32.const 0 - i32.const 168 - i32.const 397 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 + i32.eqz + i32.const 0 + local.get $1 i32.const 7 i32.and + i32.eqz + i32.const 0 + local.get $1 + local.get $2 + i32.le_u + select + select + i32.eqz if i32.const 0 i32.const 168 - i32.const 398 + i32.const 399 i32.const 4 call $~lib/builtins/abort unreachable @@ -676,7 +607,7 @@ if i32.const 0 i32.const 168 - i32.const 403 + i32.const 408 i32.const 6 call $~lib/builtins/abort unreachable @@ -704,7 +635,7 @@ if i32.const 0 i32.const 168 - i32.const 412 + i32.const 417 i32.const 6 call $~lib/builtins/abort unreachable @@ -757,7 +688,7 @@ if i32.const 0 i32.const 168 - i32.const 441 + i32.const 446 i32.const 2 call $~lib/builtins/abort unreachable @@ -769,23 +700,6 @@ (local $2 i32) (local $3 i32) local.get $1 - i32.const 1073741824 - i32.lt_u - i32.const 0 - local.get $1 - i32.const 16 - i32.ge_u - select - i32.eqz - if - i32.const 0 - i32.const 168 - i32.const 315 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 i32.const 256 i32.lt_u if (result i32) @@ -857,7 +771,7 @@ if i32.const 0 i32.const 168 - i32.const 342 + i32.const 341 i32.const 16 call $~lib/builtins/abort unreachable @@ -880,39 +794,19 @@ local.tee $3 i32.const 1 i32.and - i32.eqz - if + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else i32.const 0 - i32.const 168 - i32.const 367 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $2 - i32.const 1073741824 - i32.lt_u - i32.const 0 - local.get $2 - i32.const 16 - i32.ge_u - select i32.eqz if i32.const 0 i32.const 168 - i32.const 368 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - if - i32.const 0 - i32.const 168 - i32.const 369 + i32.const 370 i32.const 4 call $~lib/builtins/abort unreachable @@ -960,16 +854,6 @@ local.get $1 call $~lib/allocator/tlsf/Block#get:right local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 168 - i32.const 387 - i32.const 25 - call $~lib/builtins/abort - unreachable - end - local.get $0 local.get $0 i32.load i32.const -3 @@ -1122,7 +1006,7 @@ if i32.const 0 i32.const 168 - i32.const 502 + i32.const 507 i32.const 12 call $~lib/builtins/abort unreachable @@ -1137,7 +1021,7 @@ if i32.const 0 i32.const 168 - i32.const 505 + i32.const 510 i32.const 2 call $~lib/builtins/abort unreachable @@ -1562,6 +1446,17 @@ (local $3 i32) local.get $0 if + local.get $0 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 168 + i32.const 519 + i32.const 4 + call $~lib/builtins/abort + unreachable + end global.get $~lib/allocator/tlsf/ROOT local.tee $1 if @@ -1576,7 +1471,7 @@ if i32.const 0 i32.const 168 - i32.const 518 + i32.const 524 i32.const 6 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 436f88bd22..4990b120b8 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -27,22 +27,6 @@ (global $std/runtime/barrier2 (mut i32) (i32.const 0)) (global $std/runtime/barrier3 (mut i32) (i32.const 0)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) - (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) - (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) - (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) - (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) - (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) - (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) - (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) - (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) - (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) - (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) - (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) - (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) - (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) - (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) - (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $std/runtime/ref1 (mut i32) (i32.const 0)) (global $std/runtime/header1 (mut i32) (i32.const 0)) @@ -92,13 +76,13 @@ ) (func $~lib/allocator/tlsf/Root#setSLMap (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u i32.eqz if i32.const 0 i32.const 168 - i32.const 159 + i32.const 165 i32.const 4 call $~lib/builtins/abort unreachable @@ -113,32 +97,27 @@ ) (func $~lib/allocator/tlsf/Root#setHead (; 6 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u - i32.eqz - if + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else i32.const 0 - i32.const 168 - i32.const 184 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $2 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u i32.eqz if i32.const 0 i32.const 168 - i32.const 185 + i32.const 189 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 local.get $1 - global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 32 i32.mul local.get $2 i32.add @@ -156,7 +135,7 @@ (local $1 i32) local.get $0 i32.load - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and @@ -164,17 +143,17 @@ if i32.const 0 i32.const 168 - i32.const 104 + i32.const 110 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add local.get $0 i32.load - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and @@ -184,7 +163,7 @@ if (result i32) i32.const 0 i32.const 168 - i32.const 105 + i32.const 111 i32.const 11 call $~lib/builtins/abort unreachable @@ -200,7 +179,7 @@ if i32.const 0 i32.const 168 - i32.const 447 + i32.const 452 i32.const 2 call $~lib/builtins/abort unreachable @@ -212,32 +191,27 @@ ) (func $~lib/allocator/tlsf/Root#getHead (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u - i32.eqz - if + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else i32.const 0 - i32.const 168 - i32.const 175 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $2 - global.get $~lib/allocator/tlsf/SL_SIZE - i32.lt_u i32.eqz if i32.const 0 i32.const 168 - i32.const 176 + i32.const 181 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 local.get $1 - global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 32 i32.mul local.get $2 i32.add @@ -248,13 +222,13 @@ ) (func $~lib/allocator/tlsf/Root#getSLMap (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u i32.eqz if i32.const 0 i32.const 168 - i32.const 153 + i32.const 159 i32.const 4 call $~lib/builtins/abort unreachable @@ -278,29 +252,29 @@ i32.load local.set $2 local.get $2 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 168 - i32.const 277 + i32.const 276 i32.const 4 call $~lib/builtins/abort unreachable end local.get $2 - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and local.set $3 local.get $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.const 16 i32.ge_u if (result i32) local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.const 1073741824 i32.lt_u else i32.const 0 @@ -309,13 +283,13 @@ if i32.const 0 i32.const 168 - i32.const 279 + i32.const 278 i32.const 4 call $~lib/builtins/abort unreachable end local.get $3 - global.get $~lib/allocator/tlsf/SB_SIZE + i32.const 256 i32.lt_u if i32.const 0 @@ -330,16 +304,16 @@ local.set $4 local.get $3 local.get $4 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.sub i32.shr_u i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.shl i32.xor local.set $5 local.get $4 - global.get $~lib/allocator/tlsf/SB_BITS + i32.const 8 i32.const 1 i32.sub i32.sub @@ -414,13 +388,13 @@ (local $1 i32) local.get $0 i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.and i32.eqz if i32.const 0 i32.const 168 - i32.const 96 + i32.const 102 i32.const 4 call $~lib/builtins/abort unreachable @@ -434,7 +408,7 @@ if (result i32) i32.const 0 i32.const 168 - i32.const 97 + i32.const 103 i32.const 11 call $~lib/builtins/abort unreachable @@ -445,39 +419,33 @@ (func $~lib/allocator/tlsf/Root#setJump (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.load - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and - i32.eqz - if + i32.const 0 + i32.ne + if (result i32) + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.get $2 + i32.eq + else i32.const 0 - i32.const 168 - i32.const 353 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $1 - call $~lib/allocator/tlsf/Block#get:right - local.get $2 - i32.eq - i32.eqz - if + if (result i32) + local.get $2 + i32.load + i32.const 2 + i32.and + i32.const 0 + i32.ne + else i32.const 0 - i32.const 168 - i32.const 354 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $2 - i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE - i32.and i32.eqz if i32.const 0 i32.const 168 - i32.const 355 + i32.const 352 i32.const 4 call $~lib/builtins/abort unreachable @@ -503,7 +471,7 @@ if i32.const 0 i32.const 168 - i32.const 208 + i32.const 211 i32.const 4 call $~lib/builtins/abort unreachable @@ -512,72 +480,35 @@ i32.load local.set $2 local.get $2 - global.get $~lib/allocator/tlsf/FREE - i32.and - i32.eqz - if - i32.const 0 - i32.const 168 - i32.const 210 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - global.get $~lib/allocator/tlsf/TAGS - i32.const -1 - i32.xor + i32.const 1 i32.and - local.tee $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - i32.const 0 - end i32.eqz if i32.const 0 i32.const 168 - i32.const 212 + i32.const 213 i32.const 4 call $~lib/builtins/abort unreachable end local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 168 - i32.const 216 - i32.const 23 - call $~lib/builtins/abort - unreachable - else - local.get $4 - end - local.set $5 - local.get $5 + local.set $3 + local.get $3 i32.load - local.set $6 - local.get $6 - global.get $~lib/allocator/tlsf/FREE + local.set $4 + local.get $4 + i32.const 1 i32.and if local.get $0 - local.get $5 + local.get $3 call $~lib/allocator/tlsf/Root#remove local.get $1 local.get $2 - global.get $~lib/allocator/tlsf/Block.INFO - local.get $6 - global.get $~lib/allocator/tlsf/TAGS + i32.const 8 + local.get $4 + i32.const 3 i32.const -1 i32.xor i32.and @@ -587,86 +518,74 @@ i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.set $5 - local.get $5 + local.set $3 + local.get $3 i32.load - local.set $6 + local.set $4 end local.get $2 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.and if local.get $1 call $~lib/allocator/tlsf/Block#get:left - local.tee $4 - i32.eqz - if (result i32) - i32.const 0 - i32.const 168 - i32.const 230 - i32.const 24 - call $~lib/builtins/abort - unreachable - else - local.get $4 - end - local.set $4 - local.get $4 + local.set $5 + local.get $5 i32.load - local.set $7 - local.get $7 - global.get $~lib/allocator/tlsf/FREE + local.set $6 + local.get $6 + i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 168 - i32.const 232 + i32.const 231 i32.const 6 call $~lib/builtins/abort unreachable end local.get $0 - local.get $4 + local.get $5 call $~lib/allocator/tlsf/Root#remove - local.get $4 - local.get $7 - global.get $~lib/allocator/tlsf/Block.INFO + local.get $5 + local.get $6 + i32.const 8 local.get $2 - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and i32.add i32.add - local.tee $7 + local.tee $6 i32.store - local.get $4 + local.get $5 local.set $1 - local.get $7 + local.get $6 local.set $2 end - local.get $5 - local.get $6 - global.get $~lib/allocator/tlsf/LEFT_FREE + local.get $3 + local.get $4 + i32.const 2 i32.or i32.store local.get $0 local.get $1 - local.get $5 + local.get $3 call $~lib/allocator/tlsf/Root#setJump local.get $2 - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + local.set $7 + local.get $7 + i32.const 16 i32.ge_u if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE + local.get $7 + i32.const 1073741824 i32.lt_u else i32.const 0 @@ -675,37 +594,37 @@ if i32.const 0 i32.const 168 - i32.const 245 + i32.const 244 i32.const 4 call $~lib/builtins/abort unreachable end - local.get $3 - global.get $~lib/allocator/tlsf/SB_SIZE + local.get $7 + i32.const 256 i32.lt_u if i32.const 0 local.set $8 - local.get $3 + local.get $7 i32.const 8 i32.div_u local.set $9 else - local.get $3 + local.get $7 call $~lib/allocator/tlsf/fls local.set $8 - local.get $3 + local.get $7 local.get $8 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.sub i32.shr_u i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.shl i32.xor local.set $9 local.get $8 - global.get $~lib/allocator/tlsf/SB_BITS + i32.const 8 i32.const 1 i32.sub i32.sub @@ -762,37 +681,27 @@ local.get $1 local.get $2 i32.le_u - i32.eqz - if + if (result i32) + local.get $1 + i32.const 7 + i32.and + i32.eqz + else i32.const 0 - i32.const 168 - i32.const 396 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $1 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else i32.const 0 - i32.const 168 - i32.const 397 - i32.const 4 - call $~lib/builtins/abort - unreachable end - local.get $2 - i32.const 7 - i32.and - i32.eqz i32.eqz if i32.const 0 i32.const 168 - i32.const 398 + i32.const 399 i32.const 4 call $~lib/builtins/abort unreachable @@ -813,19 +722,19 @@ if i32.const 0 i32.const 168 - i32.const 403 + i32.const 408 i32.const 6 call $~lib/builtins/abort unreachable end local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.get $3 i32.eq if local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.set $1 local.get $3 @@ -835,14 +744,14 @@ else local.get $1 local.get $0 - global.get $~lib/allocator/tlsf/Root.SIZE + i32.const 2916 i32.add i32.ge_u i32.eqz if i32.const 0 i32.const 168 - i32.const 412 + i32.const 417 i32.const 6 call $~lib/builtins/abort unreachable @@ -853,10 +762,10 @@ i32.sub local.set $5 local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.const 8 + i32.const 16 i32.add - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add i32.lt_u if @@ -865,7 +774,7 @@ end local.get $5 i32.const 2 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.mul i32.sub local.set $6 @@ -873,10 +782,10 @@ local.set $7 local.get $7 local.get $6 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.or local.get $4 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.and i32.or i32.store @@ -889,12 +798,12 @@ local.get $1 local.get $5 i32.add - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.set $8 local.get $8 i32.const 0 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.or i32.store local.get $0 @@ -913,7 +822,7 @@ if i32.const 0 i32.const 168 - i32.const 441 + i32.const 446 i32.const 2 call $~lib/builtins/abort unreachable @@ -929,7 +838,7 @@ if i32.const 0 i32.const 168 - i32.const 441 + i32.const 446 i32.const 2 call $~lib/builtins/abort unreachable @@ -945,26 +854,7 @@ (local $6 i32) (local $7 i32) local.get $1 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u - if (result i32) - local.get $1 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 168 - i32.const 315 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $~lib/allocator/tlsf/SB_SIZE + i32.const 256 i32.lt_u if i32.const 0 @@ -979,22 +869,22 @@ local.set $2 local.get $1 local.get $2 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.sub i32.shr_u i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.shl i32.xor local.set $3 local.get $2 - global.get $~lib/allocator/tlsf/SB_BITS + i32.const 8 i32.const 1 i32.sub i32.sub local.set $2 local.get $3 - global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 32 i32.const 1 i32.sub i32.lt_u @@ -1054,7 +944,7 @@ else i32.const 0 i32.const 168 - i32.const 342 + i32.const 341 i32.const 16 call $~lib/builtins/abort unreachable @@ -1085,24 +975,15 @@ i32.load local.set $3 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and - i32.eqz - if - i32.const 0 - i32.const 168 - i32.const 367 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE - i32.ge_u + i32.const 0 + i32.ne if (result i32) local.get $2 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u + i32.const 7 + i32.and + i32.eqz else i32.const 0 end @@ -1110,20 +991,7 @@ if i32.const 0 i32.const 168 - i32.const 368 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 168 - i32.const 369 + i32.const 370 i32.const 4 call $~lib/builtins/abort unreachable @@ -1132,7 +1000,7 @@ local.get $1 call $~lib/allocator/tlsf/Root#remove local.get $3 - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and @@ -1140,29 +1008,29 @@ i32.sub local.set $4 local.get $4 - global.get $~lib/allocator/tlsf/Block.INFO - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.const 8 + i32.const 16 i32.add i32.ge_u if local.get $1 local.get $2 local.get $3 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.and i32.or i32.store local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add local.get $2 i32.add local.set $5 local.get $5 local.get $4 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.or i32.store local.get $0 @@ -1171,37 +1039,25 @@ else local.get $1 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.const -1 i32.xor i32.and i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $5 - i32.eqz - if (result i32) - i32.const 0 - i32.const 168 - i32.const 387 - i32.const 25 - call $~lib/builtins/abort - unreachable - else - local.get $5 - end local.set $5 local.get $5 local.get $5 i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.const -1 i32.xor i32.and i32.store end local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add ) (func $~lib/allocator/tlsf/__mem_allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -1228,7 +1084,7 @@ current_memory local.set $3 local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE + i32.const 2916 i32.add i32.const 65535 i32.add @@ -1269,7 +1125,7 @@ local.set $5 loop $repeat|0 local.get $5 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u i32.eqz br_if $break|0 @@ -1283,7 +1139,7 @@ local.set $6 loop $repeat|1 local.get $6 - global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 32 i32.lt_u i32.eqz br_if $break|1 @@ -1313,7 +1169,7 @@ end local.get $1 local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE + i32.const 2916 i32.add i32.const 7 i32.add @@ -1328,7 +1184,7 @@ drop end local.get $0 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.const 1073741824 i32.gt_u if unreachable @@ -1341,7 +1197,7 @@ i32.xor i32.and local.tee $4 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.const 16 local.tee $3 local.get $4 local.get $3 @@ -1408,7 +1264,7 @@ if (result i32) i32.const 0 i32.const 168 - i32.const 502 + i32.const 507 i32.const 12 call $~lib/builtins/abort unreachable @@ -1419,7 +1275,7 @@ end local.get $7 i32.load - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and @@ -1429,7 +1285,7 @@ if i32.const 0 i32.const 168 - i32.const 505 + i32.const 510 i32.const 2 call $~lib/builtins/abort unreachable @@ -1938,38 +1794,51 @@ (local $3 i32) local.get $0 if + local.get $0 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 519 + i32.const 4 + call $~lib/builtins/abort + unreachable + end global.get $~lib/allocator/tlsf/ROOT local.set $1 local.get $1 if local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.set $2 local.get $2 i32.load local.set $3 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and i32.eqz i32.eqz if i32.const 0 i32.const 168 - i32.const 518 + i32.const 524 i32.const 6 call $~lib/builtins/abort unreachable end local.get $2 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.or i32.store local.get $1 local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub call $~lib/allocator/tlsf/Root#insert end From 6b256bef47de3dd60fd5d009ed31534586d53627 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 11 Apr 2019 09:07:00 +0200 Subject: [PATCH 105/119] asrt experiment --- tests/compiler/runtime/asrt.optimized.wat | 393 ++++++++++ tests/compiler/runtime/asrt.ts | 263 +++++++ tests/compiler/runtime/asrt.untouched.wat | 835 ++++++++++++++++++++++ 3 files changed, 1491 insertions(+) create mode 100644 tests/compiler/runtime/asrt.optimized.wat create mode 100644 tests/compiler/runtime/asrt.ts create mode 100644 tests/compiler/runtime/asrt.untouched.wat diff --git a/tests/compiler/runtime/asrt.optimized.wat b/tests/compiler/runtime/asrt.optimized.wat new file mode 100644 index 0000000000..ac7771b328 --- /dev/null +++ b/tests/compiler/runtime/asrt.optimized.wat @@ -0,0 +1,393 @@ +(module + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00\1e") + (data (i32.const 24) "r\00u\00n\00t\00i\00m\00e\00/\00a\00s\00r\00t\00.\00t\00s") + (data (i32.const 56) "\10\00\00\00\1c") + (data (i32.const 72) "~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") + (global $runtime/asrt/ROOTS (mut i32) (i32.const 0)) + (global $runtime/asrt/CUR (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "__rt_visit" (func $runtime/asrt/__rt_visit)) + (export "retain" (func $runtime/asrt/increment)) + (export "release" (func $runtime/asrt/decrement)) + (export "collect" (func $runtime/asrt/collectCycles)) + (func $runtime/asrt/decrement (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + i32.const 268435455 + i32.and + local.tee $1 + i32.const 1 + i32.eq + if + unreachable + else + local.get $1 + i32.const 0 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 134 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + drop + unreachable + end + unreachable + ) + (func $runtime/asrt/scan (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const 1879048192 + i32.and + i32.const 268435456 + i32.eq + if + local.get $1 + i32.const 268435455 + i32.and + i32.const 0 + i32.gt_u + if + local.get $0 + local.get $0 + i32.load offset=4 + i32.const -1879048193 + i32.and + i32.store offset=4 + else + local.get $0 + local.get $1 + i32.const -1879048193 + i32.and + i32.const 536870912 + i32.or + i32.store offset=4 + end + unreachable + end + ) + (func $runtime/asrt/collectWhite (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const 1879048192 + i32.and + i32.const 536870912 + i32.eq + if (result i32) + local.get $1 + i32.const -2147483648 + i32.and + i32.eqz + else + i32.const 0 + end + if + local.get $0 + local.get $1 + i32.const -1879048193 + i32.and + i32.store offset=4 + unreachable + end + ) + (func $runtime/asrt/__rt_visit (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + block $break|0 + block $case5|0 + block $case4|0 + block $case3|0 + block $case2|0 + block $case1|0 + local.get $1 + i32.const 1 + i32.ne + if + local.get $1 + i32.const 2 + i32.eq + br_if $case1|0 + block $tablify|0 + local.get $1 + i32.const 3 + i32.sub + br_table $case2|0 $case3|0 $case4|0 $tablify|0 + end + br $case5|0 + end + local.get $0 + call $runtime/asrt/decrement + br $break|0 + end + local.get $0 + i32.load offset=4 + i32.const 268435455 + i32.and + i32.const 0 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 91 + i32.const 17 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $0 + i32.load offset=4 + i32.const 1 + i32.sub + i32.store offset=4 + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const 1879048192 + i32.and + i32.const 268435456 + i32.ne + if + local.get $0 + local.get $1 + i32.const -1879048193 + i32.and + i32.const 268435456 + i32.or + i32.store offset=4 + unreachable + end + br $break|0 + end + local.get $0 + call $runtime/asrt/scan + br $break|0 + end + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 102 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + i32.const 1879048192 + i32.and + if + local.get $0 + local.get $0 + i32.load offset=4 + i32.const -1879048193 + i32.and + i32.store offset=4 + unreachable + end + br $break|0 + end + local.get $0 + call $runtime/asrt/collectWhite + br $break|0 + end + i32.const 0 + i32.const 24 + i32.const 113 + i32.const 24 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/asrt/increment (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 119 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + ) + (func $runtime/asrt/collectCycles (; 6 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + global.get $runtime/asrt/ROOTS + local.tee $4 + local.tee $2 + local.set $3 + global.get $runtime/asrt/CUR + local.set $5 + loop $repeat|0 + local.get $3 + local.get $5 + i32.lt_u + if + local.get $3 + i32.load + local.tee $0 + i32.load offset=4 + local.tee $1 + i32.const 1879048192 + i32.and + i32.const 805306368 + i32.eq + if (result i32) + local.get $1 + i32.const 268435455 + i32.and + i32.const 0 + i32.gt_u + else + i32.const 0 + end + if + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const 1879048192 + i32.and + i32.const 268435456 + i32.ne + if + local.get $0 + local.get $1 + i32.const -1879048193 + i32.and + i32.const 268435456 + i32.or + i32.store offset=4 + unreachable + end + local.get $2 + local.get $0 + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + else + i32.const 0 + local.get $1 + i32.const 268435455 + i32.and + i32.eqz + local.get $1 + i32.const 1879048192 + i32.and + select + if + unreachable + else + local.get $0 + local.get $1 + i32.const 2147483647 + i32.and + i32.store offset=4 + end + end + local.get $3 + i32.const 4 + i32.add + local.set $3 + br $repeat|0 + end + end + local.get $2 + global.set $runtime/asrt/CUR + local.get $4 + local.set $0 + loop $repeat|1 + local.get $0 + local.get $2 + i32.lt_u + if + local.get $0 + i32.load + call $runtime/asrt/scan + local.get $0 + i32.const 4 + i32.add + local.set $0 + br $repeat|1 + end + end + local.get $4 + local.set $0 + loop $repeat|2 + local.get $0 + local.get $2 + i32.lt_u + if + local.get $0 + i32.load + local.tee $1 + local.get $1 + i32.load offset=4 + i32.const 2147483647 + i32.and + i32.store offset=4 + local.get $1 + call $runtime/asrt/collectWhite + local.get $0 + i32.const 4 + i32.add + local.set $0 + br $repeat|2 + end + end + local.get $4 + global.set $runtime/asrt/CUR + ) + (func $null (; 7 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/runtime/asrt.ts b/tests/compiler/runtime/asrt.ts new file mode 100644 index 0000000000..c2e2bb3ac3 --- /dev/null +++ b/tests/compiler/runtime/asrt.ts @@ -0,0 +1,263 @@ +// An experiment on how an ARC runtime could look like. + +// After the paper "A Pure Reference Counting Garbage Collector" by David F. Bacon et al. + +// @ts-ignore: decorator +@inline +const DEBUG = true; + +// TODO: make visitors eat cookies so we can compile direct calls into a switch +function __rt_visit_members(s: Block, cookie: i32): void { unreachable(); } +function __rt_flags(classId: u32): u32 { return unreachable(); } +const ACYCLIC_FLAG: u32 = 0; + +// ╒══════════════════════ GC Info structure ══════════════════════╕ +// 3 2 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits +// ├─┼─┴─┴─┼─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ +// │B│color│ refCount │ +// └─┴─────┴───────────────────────────────────────────────────────┘ +// B: buffered + +// @ts-ignore: decorator +@inline +const BUFFERED_BIT: u32 = 1 << 31; +// @ts-ignore: decorator +@inline +const COLOR_SHIFT: u32 = 28; +// @ts-ignore: decorator +@inline +const COLOR_BITS: u32 = 7 << COLOR_SHIFT; +// @ts-ignore: decorator +@inline +const REFCOUNT_BITS: u32 = (1 << 28) - 1; + +// ╒════════╤════════════ Colors ══════════════════════╕ +// │ Color │ Meaning │ +// ├────────┼──────────────────────────────────────────┤ +// │ BLACK │ In use or free │ +// │ GRAY │ Possible member of cycle │ +// │ WHITE │ Member of garbage cycle │ +// │ PURPLE │ Possible root of cycle │ +// │ RED │ Candidate cycle undergoing Σ-computation │ concurrent only +// │ ORANGE │ Candidate cycle awaiting epoch boundary │ concurrent only +// └────────┴──────────────────────────────────────────┘ +// Acyclic detection has been decoupled, hence no GREEN. + +// @ts-ignore: decorator +@inline +const COLOR_BLACK = 0 << COLOR_SHIFT; +// @ts-ignore: decorator +@inline +const COLOR_GRAY = 1 << COLOR_SHIFT; +// @ts-ignore: decorator +@inline +const COLOR_WHITE = 2 << COLOR_SHIFT; +// @ts-ignore: decorator +@inline +const COLOR_PURPLE = 3 << COLOR_SHIFT; +// @ts-ignore: decorator +@inline +const COLOR_RED = 4 << COLOR_SHIFT; +// @ts-ignore: decorator +@inline +const COLOR_ORANGE = 5 << COLOR_SHIFT; + +// @ts-ignore: decorator +@inline +const VISIT_DECREMENT = 1; +// @ts-ignore: decorator +@inline +const VISIT_MARKGRAY = 2; +// @ts-ignore: decorator +@inline +const VISIT_SCAN = 3; +// @ts-ignore: decorator +@inline +const VISIT_SCANBLACK = 4; +// @ts-ignore: decorator +@inline +const VISIT_COLLECTWHITE = 5; + +// @ts-ignore: decorator +@global +function __rt_visit(s: Block, cookie: i32): void { + switch (cookie) { + case VISIT_DECREMENT: { + decrement(s); + break; + } + case VISIT_MARKGRAY: { + if (DEBUG) assert((s.gcInfo & REFCOUNT_BITS) > 0); + s.gcInfo = s.gcInfo - 1; + markGray(s); + break; + } + case VISIT_SCAN: { + scan(s); + break; + } + case VISIT_SCANBLACK: { + let info = s.gcInfo; + assert((info & ~REFCOUNT_BITS) == ((info + 1) & ~REFCOUNT_BITS)); // overflow + s.gcInfo = info + 1; + if ((info & COLOR_BITS) != COLOR_BLACK) { + scanBlack(s); + } + break; + } + case VISIT_COLLECTWHITE: { + collectWhite(s); + break; + } + default: if (DEBUG) assert(false); + } +} + +function increment(s: Block): void { + var info = s.gcInfo; + assert((info & ~REFCOUNT_BITS) == ((info + 1) & ~REFCOUNT_BITS)); // overflow + s.gcInfo = info + 1; +} + +function decrement(s: Block): void { + var info = s.gcInfo; + var rc = info & REFCOUNT_BITS; + if (rc == 1) { + __rt_visit_members(s, VISIT_DECREMENT); + if (!(info & BUFFERED_BIT)) { + free(s); + } else { + s.gcInfo = BUFFERED_BIT | COLOR_BLACK | 0; + } + } else { + if (DEBUG) assert(rc > 0); + if (!(__rt_flags(s.classId) & ACYCLIC_FLAG)) { + s.gcInfo = BUFFERED_BIT | COLOR_PURPLE | (rc - 1); + if (!(info & BUFFERED_BIT)) { + appendRoot(s); + } + } else { + s.gcInfo = (info & ~REFCOUNT_BITS) | (rc - 1); + } + } +} + +var ROOTS: usize; +var CUR: usize = 0; +var END: usize = 0; + +function appendRoot(s: Block): void { + var cur = CUR; + if (cur >= END) { + growRoots(); // TBD: either that or pick a default and force collection on overflow + cur = CUR; + } + store(cur, s); + CUR = cur + 1; +} + +function growRoots(): void { + var oldRoots = ROOTS; + var oldSize = CUR - oldRoots; + var newSize = max(oldSize * 2, 64 << alignof()); + var newRoots = memory.allocate(newSize); + memory.copy(newRoots, oldRoots, oldSize); + ROOTS = newRoots; + CUR = newRoots + oldSize; + END = newRoots + newSize; +} + +function collectCycles(): void { + + // markRoots + var roots = ROOTS; + var cur = roots; + for (let pos = cur, end = CUR; pos < end; pos += sizeof()) { + let s = load(pos); + let info = s.gcInfo; + if ((info & COLOR_BITS) == COLOR_PURPLE && (info & REFCOUNT_BITS) > 0) { + markGray(s); + store(cur, s); + cur += sizeof(); + } else { + if ((info & COLOR_BITS) == COLOR_BLACK && !(info & REFCOUNT_BITS)) { + free(s); + } else { + s.gcInfo = info & ~BUFFERED_BIT; + } + } + } + CUR = cur; + + // scanRoots + for (let pos = roots; pos < cur; pos += sizeof()) { + scan(load(pos)); + } + + // collectRoots + for (let pos = roots; pos < cur; pos += sizeof()) { + let s = load(pos); + s.gcInfo = s.gcInfo & ~BUFFERED_BIT; + collectWhite(s); + } + CUR = roots; +} + +function markGray(s: Block): void { + var info = s.gcInfo; + if ((info & COLOR_BITS) != COLOR_GRAY) { + s.gcInfo = (info & ~COLOR_BITS) | COLOR_GRAY; + __rt_visit_members(s, VISIT_MARKGRAY); + } +} + +function scan(s: Block): void { + var info = s.gcInfo; + if ((info & COLOR_BITS) == COLOR_GRAY) { + if ((info & REFCOUNT_BITS) > 0) { + scanBlack(s); + } else { + s.gcInfo = (info & ~COLOR_BITS) | COLOR_WHITE; + __rt_visit_members(s, VISIT_SCAN); + } + } +} + +function scanBlack(s: Block): void { + s.gcInfo = (s.gcInfo & ~COLOR_BITS) | COLOR_BLACK; + __rt_visit_members(s, VISIT_SCANBLACK); +} + +function collectWhite(s: Block): void { + var info = s.gcInfo; + if ((info & COLOR_BITS) == COLOR_WHITE && !(info & BUFFERED_BIT)) { + s.gcInfo = (info & ~COLOR_BITS) | COLOR_BLACK; + __rt_visit_members(s, VISIT_COLLECTWHITE); + } +} + +function free(s: Block): void { + unreachable(); // TODO +} + +// TODO: merge with TLSF +@unmanaged +class Block { + /** Memory manager info. */ + mmInfo: usize; // u32 in WASM32. WASM64 might need adaption + /** Garbage collector info. */ + gcInfo: u32; + /** Runtime class id. */ + classId: u32; + /** Runtime object payload size. */ + payloadSize: u32; +} + +// keep alive, everything else is reached from here +export { + __rt_visit, + increment as retain, + decrement as release, + collectCycles as collect +}; diff --git a/tests/compiler/runtime/asrt.untouched.wat b/tests/compiler/runtime/asrt.untouched.wat new file mode 100644 index 0000000000..c61d776c72 --- /dev/null +++ b/tests/compiler/runtime/asrt.untouched.wat @@ -0,0 +1,835 @@ +(module + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00r\00u\00n\00t\00i\00m\00e\00/\00a\00s\00r\00t\00.\00t\00s\00") + (data (i32.const 56) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $runtime/asrt/ACYCLIC_FLAG i32 (i32.const 0)) + (global $runtime/asrt/ROOTS (mut i32) (i32.const 0)) + (global $runtime/asrt/CUR (mut i32) (i32.const 0)) + (global $runtime/asrt/END (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "__rt_visit" (func $runtime/asrt/__rt_visit)) + (export "retain" (func $runtime/asrt/increment)) + (export "release" (func $runtime/asrt/decrement)) + (export "collect" (func $runtime/asrt/collectCycles)) + (func $runtime/asrt/__rt_visit_members (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + unreachable + ) + (func $runtime/asrt/free (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + unreachable + ) + (func $runtime/asrt/__rt_flags (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + i32.const 72 + i32.const 61 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/memory/memory.copy (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 + if + block + block (result i32) + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $5 + end + block (result i32) + local.get $1 + local.tee $5 + i32.const 1 + i32.add + local.set $1 + local.get $5 + end + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + end + br $continue|2 + end + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 + end + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 + end + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end + end + end + ) + (func $runtime/asrt/growRoots (; 6 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + global.get $runtime/asrt/ROOTS + local.set $0 + global.get $runtime/asrt/CUR + local.get $0 + i32.sub + local.set $1 + local.get $1 + i32.const 2 + i32.mul + local.tee $2 + i32.const 64 + i32.const 2 + i32.shl + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + local.set $4 + local.get $4 + call $~lib/memory/memory.allocate + local.set $5 + local.get $5 + local.get $0 + local.get $1 + call $~lib/memory/memory.copy + local.get $5 + global.set $runtime/asrt/ROOTS + local.get $5 + local.get $1 + i32.add + global.set $runtime/asrt/CUR + local.get $5 + local.get $4 + i32.add + global.set $runtime/asrt/END + ) + (func $runtime/asrt/appendRoot (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + global.get $runtime/asrt/CUR + local.set $1 + local.get $1 + global.get $runtime/asrt/END + i32.ge_u + if + call $runtime/asrt/growRoots + global.get $runtime/asrt/CUR + local.set $1 + end + local.get $1 + local.get $0 + i32.store + local.get $1 + i32.const 1 + i32.add + global.set $runtime/asrt/CUR + ) + (func $runtime/asrt/decrement (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + i32.const 268435455 + i32.and + local.set $2 + local.get $2 + i32.const 1 + i32.eq + if + local.get $0 + i32.const 1 + call $runtime/asrt/__rt_visit_members + local.get $1 + i32.const -2147483648 + i32.and + i32.eqz + if + local.get $0 + call $runtime/asrt/free + else + local.get $0 + i32.const -2147483648 + i32.const 0 + i32.or + i32.const 0 + i32.or + i32.store offset=4 + end + else + local.get $2 + i32.const 0 + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 134 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + call $runtime/asrt/__rt_flags + global.get $runtime/asrt/ACYCLIC_FLAG + i32.and + i32.eqz + if + local.get $0 + i32.const -2147483648 + i32.const 805306368 + i32.or + local.get $2 + i32.const 1 + i32.sub + i32.or + i32.store offset=4 + local.get $1 + i32.const -2147483648 + i32.and + i32.eqz + if + local.get $0 + call $runtime/asrt/appendRoot + end + else + local.get $0 + local.get $1 + i32.const 268435455 + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.const 1 + i32.sub + i32.or + i32.store offset=4 + end + end + ) + (func $runtime/asrt/markGray (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + i32.const 1879048192 + i32.and + i32.const 268435456 + i32.ne + if + local.get $0 + local.get $1 + i32.const 1879048192 + i32.const -1 + i32.xor + i32.and + i32.const 268435456 + i32.or + i32.store offset=4 + local.get $0 + i32.const 2 + call $runtime/asrt/__rt_visit_members + end + ) + (func $runtime/asrt/scanBlack (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + local.get $0 + i32.load offset=4 + i32.const 1879048192 + i32.const -1 + i32.xor + i32.and + i32.const 0 + i32.or + i32.store offset=4 + local.get $0 + i32.const 4 + call $runtime/asrt/__rt_visit_members + ) + (func $runtime/asrt/scan (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + i32.const 1879048192 + i32.and + i32.const 268435456 + i32.eq + if + local.get $1 + i32.const 268435455 + i32.and + i32.const 0 + i32.gt_u + if + local.get $0 + call $runtime/asrt/scanBlack + else + local.get $0 + local.get $1 + i32.const 1879048192 + i32.const -1 + i32.xor + i32.and + i32.const 536870912 + i32.or + i32.store offset=4 + local.get $0 + i32.const 3 + call $runtime/asrt/__rt_visit_members + end + end + ) + (func $runtime/asrt/collectWhite (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + i32.const 1879048192 + i32.and + i32.const 536870912 + i32.eq + if (result i32) + local.get $1 + i32.const -2147483648 + i32.and + i32.eqz + else + i32.const 0 + end + if + local.get $0 + local.get $1 + i32.const 1879048192 + i32.const -1 + i32.xor + i32.and + i32.const 0 + i32.or + i32.store offset=4 + local.get $0 + i32.const 5 + call $runtime/asrt/__rt_visit_members + end + ) + (func $runtime/asrt/__rt_visit (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + block $break|0 + block $case5|0 + block $case4|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + local.get $1 + local.set $2 + local.get $2 + i32.const 1 + i32.eq + br_if $case0|0 + local.get $2 + i32.const 2 + i32.eq + br_if $case1|0 + local.get $2 + i32.const 3 + i32.eq + br_if $case2|0 + local.get $2 + i32.const 4 + i32.eq + br_if $case3|0 + local.get $2 + i32.const 5 + i32.eq + br_if $case4|0 + br $case5|0 + end + block + local.get $0 + call $runtime/asrt/decrement + br $break|0 + unreachable + end + unreachable + end + block + local.get $0 + i32.load offset=4 + i32.const 268435455 + i32.and + i32.const 0 + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 91 + i32.const 17 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $0 + i32.load offset=4 + i32.const 1 + i32.sub + i32.store offset=4 + local.get $0 + call $runtime/asrt/markGray + br $break|0 + unreachable + end + unreachable + end + block + local.get $0 + call $runtime/asrt/scan + br $break|0 + unreachable + end + unreachable + end + block + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + i32.const 268435455 + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const 268435455 + i32.const -1 + i32.xor + i32.and + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 102 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $2 + i32.const 1879048192 + i32.and + i32.const 0 + i32.ne + if + local.get $0 + call $runtime/asrt/scanBlack + end + br $break|0 + unreachable + end + unreachable + end + block + local.get $0 + call $runtime/asrt/collectWhite + br $break|0 + unreachable + end + unreachable + end + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 113 + i32.const 24 + call $~lib/builtins/abort + unreachable + end + end + ) + (func $runtime/asrt/increment (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + i32.const 268435455 + i32.const -1 + i32.xor + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const 268435455 + i32.const -1 + i32.xor + i32.and + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 119 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + ) + (func $runtime/asrt/collectCycles (; 15 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + global.get $runtime/asrt/ROOTS + local.set $0 + local.get $0 + local.set $1 + block $break|0 + block + local.get $1 + local.set $2 + global.get $runtime/asrt/CUR + local.set $3 + end + loop $repeat|0 + local.get $2 + local.get $3 + i32.lt_u + i32.eqz + br_if $break|0 + block + local.get $2 + i32.load + local.set $4 + local.get $4 + i32.load offset=4 + local.set $5 + local.get $5 + i32.const 1879048192 + i32.and + i32.const 805306368 + i32.eq + if (result i32) + local.get $5 + i32.const 268435455 + i32.and + i32.const 0 + i32.gt_u + else + i32.const 0 + end + if + local.get $4 + call $runtime/asrt/markGray + local.get $1 + local.get $4 + i32.store + local.get $1 + i32.const 4 + i32.add + local.set $1 + else + local.get $5 + i32.const 1879048192 + i32.and + i32.const 0 + i32.eq + if (result i32) + local.get $5 + i32.const 268435455 + i32.and + i32.eqz + else + i32.const 0 + end + if + local.get $4 + call $runtime/asrt/free + else + local.get $4 + local.get $5 + i32.const -2147483648 + i32.const -1 + i32.xor + i32.and + i32.store offset=4 + end + end + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $repeat|0 + unreachable + end + unreachable + end + local.get $1 + global.set $runtime/asrt/CUR + block $break|1 + local.get $0 + local.set $3 + loop $repeat|1 + local.get $3 + local.get $1 + i32.lt_u + i32.eqz + br_if $break|1 + local.get $3 + i32.load + call $runtime/asrt/scan + local.get $3 + i32.const 4 + i32.add + local.set $3 + br $repeat|1 + unreachable + end + unreachable + end + block $break|2 + local.get $0 + local.set $3 + loop $repeat|2 + local.get $3 + local.get $1 + i32.lt_u + i32.eqz + br_if $break|2 + block + local.get $3 + i32.load + local.set $2 + local.get $2 + local.get $2 + i32.load offset=4 + i32.const -2147483648 + i32.const -1 + i32.xor + i32.and + i32.store offset=4 + local.get $2 + call $runtime/asrt/collectWhite + end + local.get $3 + i32.const 4 + i32.add + local.set $3 + br $repeat|2 + unreachable + end + unreachable + end + local.get $0 + global.set $runtime/asrt/CUR + ) + (func $null (; 16 ;) (type $FUNCSIG$v) + ) +) From 085e2db4c9bcae694c2a2114dedeb52e1cde768e Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 11 Apr 2019 09:36:34 +0200 Subject: [PATCH 106/119] asrt: derive constants --- tests/compiler/runtime/asrt.optimized.wat | 10 ++++----- tests/compiler/runtime/asrt.ts | 25 +++++++++++++---------- tests/compiler/runtime/asrt.untouched.wat | 10 ++++----- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/tests/compiler/runtime/asrt.optimized.wat b/tests/compiler/runtime/asrt.optimized.wat index ac7771b328..4f5c7e1ace 100644 --- a/tests/compiler/runtime/asrt.optimized.wat +++ b/tests/compiler/runtime/asrt.optimized.wat @@ -34,7 +34,7 @@ if i32.const 0 i32.const 24 - i32.const 134 + i32.const 137 i32.const 15 call $~lib/builtins/abort unreachable @@ -142,7 +142,7 @@ if i32.const 0 i32.const 24 - i32.const 91 + i32.const 94 i32.const 17 call $~lib/builtins/abort unreachable @@ -190,7 +190,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 105 i32.const 6 call $~lib/builtins/abort unreachable @@ -220,7 +220,7 @@ end i32.const 0 i32.const 24 - i32.const 113 + i32.const 116 i32.const 24 call $~lib/builtins/abort unreachable @@ -242,7 +242,7 @@ if i32.const 0 i32.const 24 - i32.const 119 + i32.const 122 i32.const 2 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/runtime/asrt.ts b/tests/compiler/runtime/asrt.ts index c2e2bb3ac3..ae26e3b85b 100644 --- a/tests/compiler/runtime/asrt.ts +++ b/tests/compiler/runtime/asrt.ts @@ -21,16 +21,19 @@ const ACYCLIC_FLAG: u32 = 0; // @ts-ignore: decorator @inline -const BUFFERED_BIT: u32 = 1 << 31; +const BUFFERED_BIT: u32 = 1 << (sizeof() * 8 - 1); // @ts-ignore: decorator @inline -const COLOR_SHIFT: u32 = 28; +const COLOR_SIZE = 3; // @ts-ignore: decorator @inline -const COLOR_BITS: u32 = 7 << COLOR_SHIFT; +const COLOR_SHIFT: u32 = ctz(BUFFERED_BIT) - COLOR_SIZE; // @ts-ignore: decorator @inline -const REFCOUNT_BITS: u32 = (1 << 28) - 1; +const COLOR_BITS: u32 = ((1 << COLOR_SIZE) - 1) << COLOR_SHIFT; +// @ts-ignore: decorator +@inline +const REFCOUNT_BITS: u32 = (1 << COLOR_SHIFT) - 1; // ╒════════╤════════════ Colors ══════════════════════╕ // │ Color │ Meaning │ @@ -46,26 +49,26 @@ const REFCOUNT_BITS: u32 = (1 << 28) - 1; // @ts-ignore: decorator @inline -const COLOR_BLACK = 0 << COLOR_SHIFT; +const COLOR_BLACK: u32 = 0 << COLOR_SHIFT; // @ts-ignore: decorator @inline -const COLOR_GRAY = 1 << COLOR_SHIFT; +const COLOR_GRAY: u32 = 1 << COLOR_SHIFT; // @ts-ignore: decorator @inline -const COLOR_WHITE = 2 << COLOR_SHIFT; +const COLOR_WHITE: u32 = 2 << COLOR_SHIFT; // @ts-ignore: decorator @inline -const COLOR_PURPLE = 3 << COLOR_SHIFT; +const COLOR_PURPLE: u32 = 3 << COLOR_SHIFT; // @ts-ignore: decorator @inline -const COLOR_RED = 4 << COLOR_SHIFT; +const COLOR_RED: u32 = 4 << COLOR_SHIFT; // @ts-ignore: decorator @inline -const COLOR_ORANGE = 5 << COLOR_SHIFT; +const COLOR_ORANGE: u32 = 5 << COLOR_SHIFT; // @ts-ignore: decorator @inline -const VISIT_DECREMENT = 1; +const VISIT_DECREMENT = 1; // guard 0 // @ts-ignore: decorator @inline const VISIT_MARKGRAY = 2; diff --git a/tests/compiler/runtime/asrt.untouched.wat b/tests/compiler/runtime/asrt.untouched.wat index c61d776c72..5451f06712 100644 --- a/tests/compiler/runtime/asrt.untouched.wat +++ b/tests/compiler/runtime/asrt.untouched.wat @@ -351,7 +351,7 @@ if i32.const 0 i32.const 24 - i32.const 134 + i32.const 137 i32.const 15 call $~lib/builtins/abort unreachable @@ -555,7 +555,7 @@ if i32.const 0 i32.const 24 - i32.const 91 + i32.const 94 i32.const 17 call $~lib/builtins/abort unreachable @@ -602,7 +602,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 105 i32.const 6 call $~lib/builtins/abort unreachable @@ -639,7 +639,7 @@ if i32.const 0 i32.const 24 - i32.const 113 + i32.const 116 i32.const 24 call $~lib/builtins/abort unreachable @@ -668,7 +668,7 @@ if i32.const 0 i32.const 24 - i32.const 119 + i32.const 122 i32.const 2 call $~lib/builtins/abort unreachable From c13f4db6414d5335a0fb16ecee256bc7dff4cba2 Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 15 Apr 2019 11:32:20 +0200 Subject: [PATCH 107/119] asrt: merge tlsf and purerc --- tests/compiler/runtime/asrt.optimized.wat | 1106 ++++++++++++++++- tests/compiler/runtime/asrt.ts | 639 +++++++++- tests/compiler/runtime/asrt.untouched.wat | 1376 ++++++++++++++++++++- 3 files changed, 2998 insertions(+), 123 deletions(-) diff --git a/tests/compiler/runtime/asrt.optimized.wat b/tests/compiler/runtime/asrt.optimized.wat index 4f5c7e1ace..0b893b008f 100644 --- a/tests/compiler/runtime/asrt.optimized.wat +++ b/tests/compiler/runtime/asrt.optimized.wat @@ -1,7 +1,12 @@ (module + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -9,14 +14,1053 @@ (data (i32.const 24) "r\00u\00n\00t\00i\00m\00e\00/\00a\00s\00r\00t\00.\00t\00s") (data (i32.const 56) "\10\00\00\00\1c") (data (i32.const 72) "~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") + (global $runtime/asrt/ROOT (mut i32) (i32.const 0)) (global $runtime/asrt/ROOTS (mut i32) (i32.const 0)) (global $runtime/asrt/CUR (mut i32) (i32.const 0)) (export "memory" (memory $0)) + (export "__mm_allocate" (func $runtime/asrt/__mm_allocate)) + (export "__mm_free" (func $runtime/asrt/__mm_free)) (export "__rt_visit" (func $runtime/asrt/__rt_visit)) - (export "retain" (func $runtime/asrt/increment)) - (export "release" (func $runtime/asrt/decrement)) - (export "collect" (func $runtime/asrt/collectCycles)) - (func $runtime/asrt/decrement (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + (export "__gc_retain" (func $runtime/asrt/__gc_retain)) + (export "__gc_release" (func $runtime/asrt/__gc_release)) + (export "__gc_collect" (func $runtime/asrt/collectCycles)) + (func $runtime/asrt/setSLMap (; 1 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 167 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $2 + i32.store offset=4 + ) + (func $runtime/asrt/setHead (; 2 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $2 + i32.const 32 + i32.lt_u + i32.const 0 + local.get $1 + i32.const 22 + i32.lt_u + select + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 181 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $3 + i32.store offset=96 + ) + (func $runtime/asrt/getRight (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + local.tee $1 + i32.const -4 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.add + local.get $1 + i32.const -4 + i32.and + i32.add + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 114 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + ) + (func $runtime/asrt/fls (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 467 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $runtime/asrt/getHead (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $2 + i32.const 32 + i32.lt_u + i32.const 0 + local.get $1 + i32.const 22 + i32.lt_u + select + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 172 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load offset=96 + ) + (func $runtime/asrt/getSLMap (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 162 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load offset=4 + ) + (func $runtime/asrt/removeBlock (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.tee $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 262 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and + local.tee $2 + i32.const 16 + i32.ge_u + if (result i32) + local.get $2 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 264 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 256 + i32.lt_u + if (result i32) + local.get $2 + i32.const 8 + i32.div_u + local.set $4 + i32.const 0 + else + local.get $2 + local.get $2 + call $runtime/asrt/fls + local.tee $3 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $4 + local.get $3 + i32.const 7 + i32.sub + end + local.set $3 + local.get $1 + i32.load offset=20 + local.set $2 + local.get $1 + i32.load offset=16 + local.tee $5 + if + local.get $5 + local.get $2 + i32.store offset=20 + end + local.get $2 + if + local.get $2 + local.get $5 + i32.store offset=16 + end + local.get $0 + local.get $3 + local.get $4 + call $runtime/asrt/getHead + local.get $1 + i32.eq + if + local.get $0 + local.get $3 + local.get $4 + local.get $2 + call $runtime/asrt/setHead + local.get $2 + i32.eqz + if + local.get $0 + local.get $3 + local.get $0 + local.get $3 + call $runtime/asrt/getSLMap + i32.const 1 + local.get $4 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $1 + call $runtime/asrt/setSLMap + local.get $1 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $3 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $runtime/asrt/getLeft (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 103 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 105 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + ) + (func $runtime/asrt/insertBlock (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 197 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load + local.tee $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 199 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $runtime/asrt/getRight + local.tee $5 + i32.load + local.tee $4 + i32.const 1 + i32.and + if + local.get $0 + local.get $5 + call $runtime/asrt/removeBlock + local.get $1 + local.get $4 + i32.const -4 + i32.and + i32.const 16 + i32.add + local.get $3 + i32.add + local.tee $3 + i32.store + local.get $1 + call $runtime/asrt/getRight + local.tee $5 + i32.load + local.set $4 + end + local.get $3 + i32.const 2 + i32.and + if + local.get $1 + call $runtime/asrt/getLeft + local.tee $1 + i32.load + local.tee $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 217 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $runtime/asrt/removeBlock + local.get $1 + local.get $3 + i32.const -4 + i32.and + i32.const 16 + i32.add + local.get $2 + i32.add + local.tee $3 + i32.store + end + local.get $5 + local.get $4 + i32.const 2 + i32.or + i32.store + local.get $3 + i32.const -4 + i32.and + local.tee $2 + i32.const 16 + i32.ge_u + if (result i32) + local.get $2 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 230 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $5 + local.get $1 + i32.const 16 + i32.add + local.get $2 + i32.add + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 231 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.const 256 + i32.lt_u + if (result i32) + local.get $2 + i32.const 8 + i32.div_u + local.set $2 + i32.const 0 + else + local.get $2 + local.get $2 + call $runtime/asrt/fls + local.tee $3 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $2 + local.get $3 + i32.const 7 + i32.sub + end + local.tee $4 + local.get $2 + call $runtime/asrt/getHead + local.set $3 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + local.get $3 + i32.store offset=20 + local.get $3 + if + local.get $3 + local.get $1 + i32.store offset=16 + end + local.get $0 + local.get $4 + local.get $2 + local.get $1 + call $runtime/asrt/setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $4 + i32.shl + i32.or + i32.store + local.get $0 + local.get $4 + local.get $0 + local.get $4 + call $runtime/asrt/getSLMap + i32.const 1 + local.get $2 + i32.shl + i32.or + call $runtime/asrt/setSLMap + ) + (func $runtime/asrt/addMemory (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + i32.const 0 + local.get $1 + i32.const 7 + i32.and + i32.eqz + i32.const 0 + local.get $1 + local.get $2 + i32.le_u + select + select + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 374 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=2912 + local.tee $3 + if + local.get $1 + i32.const 16 + i32.sub + local.get $3 + i32.eq + if (result i32) + local.get $3 + i32.load + local.set $4 + local.get $1 + i32.const 16 + i32.sub + else + i32.const 0 + i32.const 24 + i32.const 391 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.set $1 + else + local.get $1 + local.get $0 + i32.const 2916 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 395 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.tee $2 + i32.const 48 + i32.lt_u + if + return + end + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $2 + i32.const 32 + i32.sub + i32.const 1 + i32.or + i32.or + i32.store + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $1 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.tee $2 + i32.const 2 + i32.store + local.get $0 + local.get $2 + i32.store offset=2912 + local.get $0 + local.get $1 + call $runtime/asrt/insertBlock + ) + (func $runtime/asrt/initialize (; 11 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + (local $1 i32) + i32.const 1 + current_memory + local.tee $0 + i32.gt_s + if (result i32) + i32.const 1 + local.get $0 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 104 + i32.const 0 + i32.store + i32.const 3016 + i32.const 0 + i32.store + i32.const 0 + local.set $0 + loop $repeat|0 + local.get $0 + i32.const 22 + i32.lt_u + if + i32.const 104 + local.get $0 + i32.const 0 + call $runtime/asrt/setSLMap + i32.const 0 + local.set $1 + loop $repeat|1 + local.get $1 + i32.const 32 + i32.lt_u + if + i32.const 104 + local.get $0 + local.get $1 + i32.const 0 + call $runtime/asrt/setHead + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $repeat|0 + end + end + i32.const 104 + i32.const 3024 + current_memory + i32.const 16 + i32.shl + call $runtime/asrt/addMemory + i32.const 104 + ) + (func $runtime/asrt/ffs (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 461 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $runtime/asrt/searchBlock (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.const 256 + i32.lt_u + if (result i32) + local.get $1 + i32.const 8 + i32.div_u + else + local.get $1 + call $runtime/asrt/fls + local.tee $3 + i32.const 7 + i32.sub + local.set $2 + local.get $1 + local.get $3 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.tee $1 + i32.const 31 + i32.lt_u + if (result i32) + local.get $1 + i32.const 1 + i32.add + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + i32.const 0 + end + end + local.set $1 + local.get $0 + local.get $2 + call $runtime/asrt/getSLMap + i32.const -1 + local.get $1 + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $2 + local.get $1 + call $runtime/asrt/ffs + call $runtime/asrt/getHead + else + local.get $0 + i32.load + i32.const -1 + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $1 + call $runtime/asrt/ffs + local.tee $1 + call $runtime/asrt/getSLMap + local.tee $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 331 + i32.const 17 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + local.get $2 + call $runtime/asrt/ffs + call $runtime/asrt/getHead + else + i32.const 0 + end + end + ) + (func $runtime/asrt/growMemory (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + current_memory + local.tee $2 + local.get $1 + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $1 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + current_memory + i32.const 16 + i32.shl + call $runtime/asrt/addMemory + ) + (func $runtime/asrt/prepareBlock (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $1 + i32.load + local.tee $3 + i32.const 1 + i32.and + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 346 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $runtime/asrt/removeBlock + local.get $3 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $4 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $3 + i32.const 2 + i32.and + local.get $2 + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.get $2 + i32.add + local.tee $2 + local.get $4 + i32.const 16 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $runtime/asrt/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + call $runtime/asrt/getRight + local.get $1 + call $runtime/asrt/getRight + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 + i32.const 16 + i32.add + ) + (func $runtime/asrt/__mm_allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $runtime/asrt/ROOT + local.tee $1 + i32.eqz + if + call $runtime/asrt/initialize + local.tee $1 + global.set $runtime/asrt/ROOT + end + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + local.get $1 + local.get $0 + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + i32.const 16 + local.get $0 + i32.const 16 + i32.gt_u + select + local.tee $2 + call $runtime/asrt/searchBlock + local.tee $0 + i32.eqz + if + local.get $1 + local.get $2 + call $runtime/asrt/growMemory + local.get $1 + local.get $2 + call $runtime/asrt/searchBlock + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 490 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $0 + i32.load + i32.const -4 + i32.and + local.get $2 + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 492 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + local.get $2 + i32.store offset=12 + local.get $1 + local.get $0 + local.get $2 + call $runtime/asrt/prepareBlock + ) + (func $runtime/asrt/freeBlock (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $1 + i32.load + local.tee $2 + i32.const 1 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 454 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $runtime/asrt/insertBlock + ) + (func $runtime/asrt/__mm_free (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + if + local.get $0 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 503 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/asrt/ROOT + local.tee $1 + if + local.get $1 + local.get $0 + i32.const 16 + i32.sub + call $runtime/asrt/freeBlock + end + end + ) + (func $runtime/asrt/decrement (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -34,7 +1078,7 @@ if i32.const 0 i32.const 24 - i32.const 137 + i32.const 642 i32.const 15 call $~lib/builtins/abort unreachable @@ -46,7 +1090,7 @@ end unreachable ) - (func $runtime/asrt/scan (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $runtime/asrt/scan (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -80,7 +1124,7 @@ unreachable end ) - (func $runtime/asrt/collectWhite (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $runtime/asrt/collectWhite (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -98,15 +1142,13 @@ i32.const 0 end if - local.get $0 - local.get $1 - i32.const -1879048193 - i32.and - i32.store offset=4 unreachable end + global.get $runtime/asrt/ROOT + local.get $0 + call $runtime/asrt/freeBlock ) - (func $runtime/asrt/__rt_visit (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $runtime/asrt/__rt_visit (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $break|0 block $case5|0 block $case4|0 @@ -142,7 +1184,7 @@ if i32.const 0 i32.const 24 - i32.const 94 + i32.const 597 i32.const 17 call $~lib/builtins/abort unreachable @@ -190,7 +1232,7 @@ if i32.const 0 i32.const 24 - i32.const 105 + i32.const 608 i32.const 6 call $~lib/builtins/abort unreachable @@ -220,13 +1262,13 @@ end i32.const 0 i32.const 24 - i32.const 116 + i32.const 619 i32.const 24 call $~lib/builtins/abort unreachable end ) - (func $runtime/asrt/increment (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $runtime/asrt/increment (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -242,7 +1284,7 @@ if i32.const 0 i32.const 24 - i32.const 122 + i32.const 626 i32.const 2 call $~lib/builtins/abort unreachable @@ -253,7 +1295,25 @@ i32.add i32.store offset=4 ) - (func $runtime/asrt/collectCycles (; 6 ;) (type $FUNCSIG$v) + (func $runtime/asrt/__gc_retain (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + if + local.get $0 + i32.const 16 + i32.sub + call $runtime/asrt/increment + end + ) + (func $runtime/asrt/__gc_release (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + if + local.get $0 + i32.const 16 + i32.sub + call $runtime/asrt/decrement + end + ) + (func $runtime/asrt/collectCycles (; 26 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -325,7 +1385,9 @@ i32.and select if - unreachable + global.get $runtime/asrt/ROOT + local.get $0 + call $runtime/asrt/freeBlock else local.get $0 local.get $1 @@ -387,7 +1449,7 @@ local.get $4 global.set $runtime/asrt/CUR ) - (func $null (; 7 ;) (type $FUNCSIG$v) + (func $null (; 27 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/runtime/asrt.ts b/tests/compiler/runtime/asrt.ts index ae26e3b85b..d33b3cf3f8 100644 --- a/tests/compiler/runtime/asrt.ts +++ b/tests/compiler/runtime/asrt.ts @@ -1,19 +1,522 @@ -// An experiment on how an ARC runtime could look like. - -// After the paper "A Pure Reference Counting Garbage Collector" by David F. Bacon et al. +// An experimental standalone AssemblyScript runtime based on TLSF and PureRC. // @ts-ignore: decorator @inline const DEBUG = true; +// Alignment guarantees + +// @ts-ignore: decorator +@inline const AL_BITS: u32 = 3; // 8 bytes +// @ts-ignore: decorator +@inline const AL_SIZE: usize = 1 << AL_BITS; +// @ts-ignore: decorator +@inline const AL_MASK: usize = AL_SIZE - 1; + +/////////////////////// The TLSF (Two-Level Segregate Fit) memory allocator /////////////////////// +// see: http://www.gii.upv.es/tlsf/ + +// ╒══════════════ Block size interpretation (32-bit) ═════════════╕ +// 3 2 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits +// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┴─┴─┴─┴─╫─┴─┴─┤ +// │ | FL │ SB = SL + AL │ ◄─ usize +// └───────────────────────────────────────────────┴─────────╨─────┘ +// FL: first level, SL: second level, AL: alignment, SB: small block + +// @ts-ignore: decorator +@inline const SL_BITS: u32 = 5; +// @ts-ignore: decorator +@inline const SL_SIZE: usize = 1 << SL_BITS; + +// @ts-ignore: decorator +@inline const SB_BITS: usize = (SL_BITS + AL_BITS); +// @ts-ignore: decorator +@inline const SB_SIZE: usize = 1 << SB_BITS; + +// @ts-ignore: decorator +@inline +const FL_BITS: u32 = (sizeof() == sizeof() + ? 30 // ^= up to 1GB per block + : 32 // ^= up to 4GB per block +) - SB_BITS; + +// Tags stored in otherwise unused alignment bits + +// @ts-ignore: decorator +@inline const FREE: usize = 1 << 0; +// @ts-ignore: decorator +@inline const LEFTFREE: usize = 1 << 1; +// @ts-ignore: decorator +@inline const TAGS_MASK: usize = FREE | LEFTFREE; // <= AL_MASK + +// ╒════════════════════ Block layout (32-bit) ════════════════════╕ +// 3 2 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits +// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┼─┼─┤ overhead ┐ +// │ size │0│L│F│ ◄─┐ info +// ├─────────────────────────────────────────────────────────┴─┴─┴─┤ │ +// │ │ │ +// │ ... additional runtime overhead ... │ │ +// │ │ │ +// ╞═══════════════════════════════════════════════════════════════╡ │ ┐ ┘ +// │ if free: ◄ prev │ ◄─┤ usize +// ├───────────────────────────────────────────────────────────────┤ │ +// │ if free: next ► │ ◄─┤ +// ├───────────────────────────────────────────────────────────────┤ │ +// │ ... │ │ = 0 +// ├───────────────────────────────────────────────────────────────┤ │ +// │ if free: back ▲ │ ◄─┘ +// └───────────────────────────────────────────────────────────────┘ payload ┘ >= MIN SIZE +// F: FREE, L: LEFT_FREE +@unmanaged class Block { + + /** Memory manager info. */ + mmInfo: usize; // WASM64 might need adaption + /** Garbage collector info. */ + gcInfo: u32; + /** Runtime class id. */ + rtId: u32; + /** Runtime object size. */ + rtSize: u32; + + /** Previous free block, if any. Only valid if free, otherwise part of payload. */ + prev: Block | null; + /** Next free block, if any. Only valid if free, otherwise part of payload. */ + next: Block | null; + + // If the block is free, there is a backreference at its end pointing at its start. +} + +// Block constants. Overhead is always present, no matter if free or used. Also, a block must have +// a minimum size of three pointers so it can hold `prev`, `next` and `back` if free. + +// @ts-ignore: decorator +@inline const BLOCK_OVERHEAD: usize = (offsetof("prev") + AL_MASK) & ~AL_MASK; +// @ts-ignore: decorator +@inline const BLOCK_MINSIZE: usize = (3 * sizeof() + AL_MASK) & ~AL_MASK;// prev + next + back +// @ts-ignore: decorator +@inline const BLOCK_MAXSIZE: usize = 1 << (FL_BITS + SB_BITS); // 1GB if WASM32, 4GB if WASM64 + +/** Gets the left block of a block. Only valid if the left block is free. */ +function getLeft(block: Block): Block { + if (DEBUG) assert(block.mmInfo & LEFTFREE); // left must be free or it doesn't contain 'back' + var left = load(changetype(block) - sizeof()); + if (DEBUG) assert(left); + return left; +} + +/** Gets the right block of of a block by advancing to the right by its size. */ +function getRight(block: Block): Block { + var mmInfo = block.mmInfo; + if (DEBUG) assert(mmInfo & ~TAGS_MASK); // can't skip beyond the tail block (the only valid empty block) + var right = changetype(changetype(block) + BLOCK_OVERHEAD + (mmInfo & ~TAGS_MASK)); + if (DEBUG) assert(right); + return right; +} + +// ╒════════════════ Root structure layout (32-bit) ═══════════════╕ +// 3 2 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits +// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ ┐ +// │ 0 | flMap S│ ◄────┐ +// ╞═══════════════════════════════════════════════════════════════╡ │ +// │ slMap[0] S │ ◄─┐ │ +// ├───────────────────────────────────────────────────────────────┤ │ │ +// │ slMap[1] │ ◄─┤ │ +// ├───────────────────────────────────────────────────────────────┤ u32 │ +// │ slMap[22] P │ ◄─┘ │ +// ╞═══════════════════════════════════════════════════════════════╡ usize +// │ head[0] │ ◄────┤ +// ├───────────────────────────────────────────────────────────────┤ │ +// │ ... │ ◄────┤ +// ├───────────────────────────────────────────────────────────────┤ │ +// │ head[736] │ ◄────┤ +// ╞═══════════════════════════════════════════════════════════════╡ │ +// │ tailRef │ ◄────┘ +// └───────────────────────────────────────────────────────────────┘ SIZE ┘ +@unmanaged class Root { + /** First level bitmap. */ + flMap: usize; +} + +// Root constants. Where stuff is stored inside of the root structure. + +// @ts-ignore: decorator +@inline const SL_START = sizeof(); +// @ts-ignore: decorator +@inline const SL_END = SL_START + (FL_BITS << alignof()); +// ^ +// FIXME: 22 slMaps, what about SB? is it included in 22 or actually 23? + +// @ts-ignore: decorator +@inline const HL_START = (SL_END + AL_MASK) & ~AL_MASK; +// @ts-ignore: decorator +@inline const HL_END = HL_START + FL_BITS * SL_SIZE * sizeof(); +// @ts-ignore: decorator +@inline const ROOT_SIZE = HL_END + sizeof(); + +var ROOT: Root; + +function getSLMap(root: Root, fl: usize): u32 { + if (DEBUG) assert(fl < FL_BITS); // fl out of range + return load(changetype(root) + (fl << alignof()), SL_START); +} + +function setSLMap(root: Root, fl: usize, value: u32): void { + if (DEBUG) assert(fl < FL_BITS); // fl out of range + store(changetype(root) + (fl << alignof()), value, SL_START); +} + +function getHead(root: Root, fl: usize, sl: u32): Block | null { + if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range + return changetype( + load( + changetype(root) + (fl * SL_SIZE + sl) * sizeof(), + HL_START) + ); +} + +function setHead(root: Root, fl: usize, sl: u32, value: Block | null): void { + if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range + store( + changetype(root) + (fl * SL_SIZE + sl) * sizeof() , changetype(value), + HL_START); +} + +function getTail(root: Root): Block { + return load(changetype(root), HL_END); +} + +function setTail(root: Root, tail: Block): void { + store(changetype(root), tail, HL_END); +} + +/** Inserts a previously used block back into the free list. */ +function insertBlock(root: Root, block: Block): void { + if (DEBUG) assert(block); // cannot be null + var blockInfo = block.mmInfo; + if (DEBUG) assert(blockInfo & FREE); // must be free + + var right = getRight(block); + var rightInfo = right.mmInfo; + + // merge with right block if also free + if (rightInfo & FREE) { + removeBlock(root, right); + block.mmInfo = (blockInfo += BLOCK_OVERHEAD + (rightInfo & ~TAGS_MASK)); + right = getRight(block); + rightInfo = right.mmInfo; + // 'back' is set below + } + + // merge with left block if also free + if (blockInfo & LEFTFREE) { + let left = getLeft(block); + let leftInfo = left.mmInfo; + if (DEBUG) assert(leftInfo & FREE); // must be free according to right tags + removeBlock(root, left); + left.mmInfo = (leftInfo += BLOCK_OVERHEAD + (blockInfo & ~TAGS_MASK)); + block = left; + blockInfo = leftInfo; + // 'back' is set below + } + + right.mmInfo = rightInfo | LEFTFREE; + // right is no longer used now, hence rightInfo is not synced + + // we now know the size of the block + var size = blockInfo & ~TAGS_MASK; + if (DEBUG) assert(size >= BLOCK_MINSIZE && size < BLOCK_MAXSIZE); // must be a valid size + if (DEBUG) assert(changetype(block) + BLOCK_OVERHEAD + size == changetype(right)); // must match + + // set 'back' to itself at the end of block + store(changetype(right) - sizeof(), block); + + // mapping_insert + var fl: usize, sl: u32; + if (size < SB_SIZE) { + fl = 0; + sl = (size / AL_SIZE); + } else { + fl = fls(size); + sl = ((size >> (fl - SL_BITS)) ^ (1 << SL_BITS)); + fl -= SB_BITS - 1; + } + + // perform insertion + var head = getHead(root, fl, sl); + block.prev = null; + block.next = head; + if (head) head.prev = block; + setHead(root, fl, sl, block); + + // update first and second level maps + root.flMap |= (1 << fl); + setSLMap(root, fl, getSLMap(root, fl) | (1 << sl)); +} + +/** Removes a free block from internal lists. */ +function removeBlock(root: Root, block: Block): void { + var blockInfo = block.mmInfo; + if (DEBUG) assert(blockInfo & FREE); // must be free + var size = blockInfo & ~TAGS_MASK; + if (DEBUG) assert(size >= BLOCK_MINSIZE && size < BLOCK_MAXSIZE); // must be valid + + // mapping_insert + var fl: usize, sl: u32; + if (size < SB_SIZE) { + fl = 0; + sl = (size / AL_SIZE); + } else { + fl = fls(size); + sl = ((size >> (fl - SL_BITS)) ^ (1 << SL_BITS)); + fl -= SB_BITS - 1; + } + + // link previous and next free block + var prev = block.prev; + var next = block.next; + if (prev) prev.next = next; + if (next) next.prev = prev; + + // update head if we are removing it + if (block == getHead(root, fl, sl)) { + setHead(root, fl, sl, next); + + // clear second level map if head is empty now + if (!next) { + let slMap = getSLMap(root, fl); + setSLMap(root, fl, slMap &= ~(1 << sl)); + + // clear first level map if second level is empty now + if (!slMap) root.flMap &= ~(1 << fl); + } + } + // note: does not alter left/back because it is likely that splitting + // is performed afterwards, invalidating those changes. so, the caller + // must perform those updates. +} + +/** Searches for a free block of at least the specified size. */ +function searchBlock(root: Root, size: usize): Block | null { + // size was already asserted by caller + + // mapping_search + var fl: usize, sl: u32; + if (size < SB_SIZE) { + fl = 0; + sl = (size / AL_SIZE); + } else { + // (*) size += (1 << (fls(size) - SL_BITS)) - 1; + fl = fls(size); + sl = ((size >> (fl - SL_BITS)) ^ (1 << SL_BITS)); + fl -= SB_BITS - 1; + // (*) instead of rounding up, use next second level list for better fit + if (sl < SL_SIZE - 1) ++sl; + else ++fl, sl = 0; + } + + // search second level + var slMap = getSLMap(root, fl) & (~0 << sl); + var head: Block | null; + if (!slMap) { + // search next larger first level + let flMap = root.flMap & (~0 << (fl + 1)); + if (!flMap) { + head = null; + } else { + fl = ffs(flMap); + slMap = getSLMap(root, fl); + if (DEBUG) assert(slMap); // can't be zero if fl points here + head = getHead(root, fl, ffs(slMap)); + } + } else { + head = getHead(root, fl, ffs(slMap)); + } + return head; +} + +/** Prepares the specified free block for use, possibly splitting it. */ +function prepareBlock(root: Root, block: Block, size: usize): usize { + // size was already asserted by caller + + var blockInfo = block.mmInfo; + if (DEBUG) { + assert( + (blockInfo & FREE) != 0 && // must be free + !(size & AL_MASK) // size must be aligned so the new block is + ); + } + removeBlock(root, block); + + // split if the block can hold another MINSIZE block incl. overhead + var remaining = (blockInfo & ~TAGS_MASK) - size; + if (remaining >= BLOCK_OVERHEAD + BLOCK_MINSIZE) { + block.mmInfo = size | (blockInfo & LEFTFREE); // also discards FREE + + let spare = changetype(changetype(block) + BLOCK_OVERHEAD + size); + spare.mmInfo = (remaining - BLOCK_OVERHEAD) | FREE; // not LEFT_FREE + insertBlock(root, spare); // also sets 'back' + + // otherwise tag block as no longer FREE and right as no longer LEFT_FREE + } else { + block.mmInfo = blockInfo & ~FREE; + getRight(block).mmInfo &= ~LEFTFREE; + } + + return changetype(block) + BLOCK_OVERHEAD; +} + +/** Adds more memory to the pool. */ +function addMemory(root: Root, start: usize, end: usize): bool { + if (DEBUG) { + assert( + start <= end && // must be valid + !(start & AL_MASK) && // must be aligned + !(end & AL_MASK) // must be aligned + ); + } + + var tail = getTail(root); + var tailInfo: usize = 0; + if (tail) { // more memory + // assert(start >= changetype(tail) + BLOCK_OVERHEAD); // starts after tail (zero-sized used block) + + // merge with current tail if adjacent + if (start - BLOCK_OVERHEAD == changetype(tail)) { + start -= BLOCK_OVERHEAD; + tailInfo = tail.mmInfo; + } else if (DEBUG) { + assert(false); // make sure we don't do this, even though possible + } + + } else if (DEBUG) { // first memory + assert(start >= changetype(root) + ROOT_SIZE); // starts after root + } + + // check if size is large enough for a free block and the tail block + var size = end - start; + if (size < BLOCK_OVERHEAD + BLOCK_MINSIZE + BLOCK_OVERHEAD) { + return false; + } + + // left size is total minus its own and the zero-length tail's header + var leftSize = size - 2 * BLOCK_OVERHEAD; + var left = changetype(start); + left.mmInfo = leftSize | FREE | (tailInfo & LEFTFREE); + left.prev = null; + left.next = null; + + // tail is a zero-length used block + tail = changetype(start + size - BLOCK_OVERHEAD); + tail.mmInfo = 0 | LEFTFREE; + setTail(root, tail); + + insertBlock(root, left); // also merges with free left before tail / sets 'back' + + return true; +} + +/** Grows memory to fit at least another block of the specified size. */ +function growMemory(root: Root, size: usize): void { + var pagesBefore = memory.size(); + var pagesNeeded = (((size + 0xffff) & ~0xffff) >>> 16); + var pagesWanted = max(pagesBefore, pagesNeeded); // double memory + if (memory.grow(pagesWanted) < 0) { + if (memory.grow(pagesNeeded) < 0) unreachable(); // out of memory + } + var pagesAfter = memory.size(); + addMemory(root, pagesBefore << 16, pagesAfter << 16); +} + +/** Initilizes the root structure. */ +function initialize(): Root { + var rootOffset = (HEAP_BASE + AL_MASK) & ~AL_MASK; + var pagesBefore = memory.size(); + var pagesNeeded = ((((rootOffset + ROOT_SIZE) + 0xffff) & ~0xffff) >>> 16); + if (pagesNeeded > pagesBefore && memory.grow(pagesNeeded - pagesBefore) < 0) unreachable(); + var root = changetype(rootOffset); + root.flMap = 0; + setTail(root, changetype(0)); + for (let fl: usize = 0; fl < FL_BITS; ++fl) { + setSLMap(root, fl, 0); + for (let sl: u32 = 0; sl < SL_SIZE; ++sl) { + setHead(root, fl, sl, null); + } + } + addMemory(root, (rootOffset + ROOT_SIZE + AL_MASK) & ~AL_MASK, memory.size() << 16); + return root; +} + +function freeBlock(root: Root, block: Block): void { + var blockInfo = block.mmInfo; + if (DEBUG) assert(!(blockInfo & FREE)); // must be used + block.mmInfo = blockInfo | FREE; + insertBlock(root, block); +} + +/** Determines the first (LSB to MSB) set bit's index of a word. */ +function ffs(word: T): T { + if (DEBUG) assert(word != 0); // word cannot be 0 + return ctz(word); // differs from ffs only for 0 +} + +/** Determines the last (LSB to MSB) set bit's index of a word. */ +function fls(word: T): T { + if (DEBUG) assert(word != 0); // word cannot be 0 + // @ts-ignore: type + const inv: T = (sizeof() << 3) - 1; + // @ts-ignore: type + return inv - clz(word); +} + +// Memory manager interface. + +// @ts-ignore: decorator +@global @unsafe +function __mm_allocate(size: usize): usize { + // initialize if necessary + var root = ROOT; + if (!root) ROOT = root = initialize(); + + // search for a suitable block + if (size > BLOCK_MAXSIZE) unreachable(); + size = max((size + AL_MASK) & ~AL_MASK, BLOCK_MINSIZE); // valid + var block = searchBlock(root, size); + if (!block) { + growMemory(root, size); + block = searchBlock(root, size); + if (DEBUG) assert(block); // must be found now + } + if (DEBUG) assert((block.mmInfo & ~TAGS_MASK) >= size); // must fit + block.gcInfo = 0; + block.rtId = 0; // not determined yet + block.rtSize = size; + return prepareBlock(root, block, size); // FIXME: why's still necessary? +} + +// @ts-ignore: decorator +@global @unsafe +function __mm_free(data: usize): void { + if (data) { + assert(!(data & AL_MASK)); // must be aligned + let root = ROOT; + if (root) freeBlock(root, changetype(data - BLOCK_OVERHEAD)); + } +} + +/////////////////////////// A Pure Reference Counting Garbage Collector /////////////////////////// +// see: https://researcher.watson.ibm.com/researcher/files/us-bacon/Bacon03Pure.pdf + // TODO: make visitors eat cookies so we can compile direct calls into a switch function __rt_visit_members(s: Block, cookie: i32): void { unreachable(); } function __rt_flags(classId: u32): u32 { return unreachable(); } const ACYCLIC_FLAG: u32 = 0; // ╒══════════════════════ GC Info structure ══════════════════════╕ -// 3 2 1 -// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits +// │ 3 2 1 │ +// │1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0│ // ├─┼─┴─┴─┼─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ // │B│color│ refCount │ // └─┴─────┴───────────────────────────────────────────────────────┘ @@ -21,30 +524,30 @@ const ACYCLIC_FLAG: u32 = 0; // @ts-ignore: decorator @inline -const BUFFERED_BIT: u32 = 1 << (sizeof() * 8 - 1); +const BUFFERED_MASK: u32 = 1 << (sizeof() * 8 - 1); // @ts-ignore: decorator @inline -const COLOR_SIZE = 3; +const COLOR_BITS = 3; // @ts-ignore: decorator @inline -const COLOR_SHIFT: u32 = ctz(BUFFERED_BIT) - COLOR_SIZE; +const COLOR_SHIFT: u32 = ctz(BUFFERED_MASK) - COLOR_BITS; // @ts-ignore: decorator @inline -const COLOR_BITS: u32 = ((1 << COLOR_SIZE) - 1) << COLOR_SHIFT; +const COLOR_MASK: u32 = ((1 << COLOR_BITS) - 1) << COLOR_SHIFT; // @ts-ignore: decorator @inline -const REFCOUNT_BITS: u32 = (1 << COLOR_SHIFT) - 1; - -// ╒════════╤════════════ Colors ══════════════════════╕ -// │ Color │ Meaning │ -// ├────────┼──────────────────────────────────────────┤ -// │ BLACK │ In use or free │ -// │ GRAY │ Possible member of cycle │ -// │ WHITE │ Member of garbage cycle │ -// │ PURPLE │ Possible root of cycle │ -// │ RED │ Candidate cycle undergoing Σ-computation │ concurrent only -// │ ORANGE │ Candidate cycle awaiting epoch boundary │ concurrent only -// └────────┴──────────────────────────────────────────┘ +const REFCOUNT_MASK: u32 = (1 << COLOR_SHIFT) - 1; + +// ╒════════╤═══════════════════ Colors ═══════════════════════════╕ +// │ Color │ Meaning │ +// ├────────┼──────────────────────────────────────────────────────┤ +// │ BLACK │ In use or free │ +// │ GRAY │ Possible member of cycle │ +// │ WHITE │ Member of garbage cycle │ +// │ PURPLE │ Possible root of cycle │ +// │ RED │ Candidate cycle undergoing Σ-computation *concurrent │ +// │ ORANGE │ Candidate cycle awaiting epoch boundary *concurrent │ +// └────────┴──────────────────────────────────────────────────────┘ // Acyclic detection has been decoupled, hence no GREEN. // @ts-ignore: decorator @@ -91,7 +594,7 @@ function __rt_visit(s: Block, cookie: i32): void { break; } case VISIT_MARKGRAY: { - if (DEBUG) assert((s.gcInfo & REFCOUNT_BITS) > 0); + if (DEBUG) assert((s.gcInfo & REFCOUNT_MASK) > 0); s.gcInfo = s.gcInfo - 1; markGray(s); break; @@ -102,9 +605,9 @@ function __rt_visit(s: Block, cookie: i32): void { } case VISIT_SCANBLACK: { let info = s.gcInfo; - assert((info & ~REFCOUNT_BITS) == ((info + 1) & ~REFCOUNT_BITS)); // overflow + assert((info & ~REFCOUNT_MASK) == ((info + 1) & ~REFCOUNT_MASK)); // overflow s.gcInfo = info + 1; - if ((info & COLOR_BITS) != COLOR_BLACK) { + if ((info & COLOR_MASK) != COLOR_BLACK) { scanBlack(s); } break; @@ -117,39 +620,45 @@ function __rt_visit(s: Block, cookie: i32): void { } } +/** Increments the reference count of the specified block by one.*/ function increment(s: Block): void { var info = s.gcInfo; - assert((info & ~REFCOUNT_BITS) == ((info + 1) & ~REFCOUNT_BITS)); // overflow + assert((info & ~REFCOUNT_MASK) == ((info + 1) & ~REFCOUNT_MASK)); // overflow s.gcInfo = info + 1; } +/** Decrements the reference count of the specified block by one, possibly freeing it. */ function decrement(s: Block): void { var info = s.gcInfo; - var rc = info & REFCOUNT_BITS; + var rc = info & REFCOUNT_MASK; if (rc == 1) { __rt_visit_members(s, VISIT_DECREMENT); - if (!(info & BUFFERED_BIT)) { - free(s); + if (!(info & BUFFERED_MASK)) { + freeBlock(ROOT, s); } else { - s.gcInfo = BUFFERED_BIT | COLOR_BLACK | 0; + s.gcInfo = BUFFERED_MASK | COLOR_BLACK | 0; } } else { if (DEBUG) assert(rc > 0); - if (!(__rt_flags(s.classId) & ACYCLIC_FLAG)) { - s.gcInfo = BUFFERED_BIT | COLOR_PURPLE | (rc - 1); - if (!(info & BUFFERED_BIT)) { + if (!(__rt_flags(s.rtId) & ACYCLIC_FLAG)) { + s.gcInfo = BUFFERED_MASK | COLOR_PURPLE | (rc - 1); + if (!(info & BUFFERED_MASK)) { appendRoot(s); } } else { - s.gcInfo = (info & ~REFCOUNT_BITS) | (rc - 1); + s.gcInfo = (info & ~REFCOUNT_MASK) | (rc - 1); } } } +/** Buffer of possible roots. */ var ROOTS: usize; +/** Current absolute offset into the `ROOTS` buffer. */ var CUR: usize = 0; +/** Current absolute end offset into the `ROOTS` buffer. */ var END: usize = 0; +/** Appends a block to possible roots. */ function appendRoot(s: Block): void { var cur = CUR; if (cur >= END) { @@ -160,6 +669,7 @@ function appendRoot(s: Block): void { CUR = cur + 1; } +/** Grows the roots buffer if it ran full. */ function growRoots(): void { var oldRoots = ROOTS; var oldSize = CUR - oldRoots; @@ -171,6 +681,7 @@ function growRoots(): void { END = newRoots + newSize; } +/** Collects cyclic garbage. */ function collectCycles(): void { // markRoots @@ -179,15 +690,15 @@ function collectCycles(): void { for (let pos = cur, end = CUR; pos < end; pos += sizeof()) { let s = load(pos); let info = s.gcInfo; - if ((info & COLOR_BITS) == COLOR_PURPLE && (info & REFCOUNT_BITS) > 0) { + if ((info & COLOR_MASK) == COLOR_PURPLE && (info & REFCOUNT_MASK) > 0) { markGray(s); store(cur, s); cur += sizeof(); } else { - if ((info & COLOR_BITS) == COLOR_BLACK && !(info & REFCOUNT_BITS)) { - free(s); + if ((info & COLOR_MASK) == COLOR_BLACK && !(info & REFCOUNT_MASK)) { + freeBlock(ROOT, s); } else { - s.gcInfo = info & ~BUFFERED_BIT; + s.gcInfo = info & ~BUFFERED_MASK; } } } @@ -201,66 +712,70 @@ function collectCycles(): void { // collectRoots for (let pos = roots; pos < cur; pos += sizeof()) { let s = load(pos); - s.gcInfo = s.gcInfo & ~BUFFERED_BIT; + s.gcInfo = s.gcInfo & ~BUFFERED_MASK; collectWhite(s); } CUR = roots; } +/** Marks a block as gray (possible member of cycle) during the collection phase. */ function markGray(s: Block): void { var info = s.gcInfo; - if ((info & COLOR_BITS) != COLOR_GRAY) { - s.gcInfo = (info & ~COLOR_BITS) | COLOR_GRAY; + if ((info & COLOR_MASK) != COLOR_GRAY) { + s.gcInfo = (info & ~COLOR_MASK) | COLOR_GRAY; __rt_visit_members(s, VISIT_MARKGRAY); } } +/** Scans a block during the collection phase, determining whether it is garbage or not. */ function scan(s: Block): void { var info = s.gcInfo; - if ((info & COLOR_BITS) == COLOR_GRAY) { - if ((info & REFCOUNT_BITS) > 0) { + if ((info & COLOR_MASK) == COLOR_GRAY) { + if ((info & REFCOUNT_MASK) > 0) { scanBlack(s); } else { - s.gcInfo = (info & ~COLOR_BITS) | COLOR_WHITE; + s.gcInfo = (info & ~COLOR_MASK) | COLOR_WHITE; __rt_visit_members(s, VISIT_SCAN); } } } +/** Marks a block as black (in use) if it was found to be reachable during the collection phase. */ function scanBlack(s: Block): void { - s.gcInfo = (s.gcInfo & ~COLOR_BITS) | COLOR_BLACK; + s.gcInfo = (s.gcInfo & ~COLOR_MASK) | COLOR_BLACK; __rt_visit_members(s, VISIT_SCANBLACK); } +/** Collects all white (member of a garbage cycle) nodes when completing the collection phase. */ function collectWhite(s: Block): void { var info = s.gcInfo; - if ((info & COLOR_BITS) == COLOR_WHITE && !(info & BUFFERED_BIT)) { - s.gcInfo = (info & ~COLOR_BITS) | COLOR_BLACK; + if ((info & COLOR_MASK) == COLOR_WHITE && !(info & BUFFERED_MASK)) { + // s.gcInfo = (info & ~COLOR_MASK) | COLOR_BLACK; __rt_visit_members(s, VISIT_COLLECTWHITE); } + freeBlock(ROOT, s); } -function free(s: Block): void { - unreachable(); // TODO +// Garbage collector interface + +// @ts-ignore: decorator +@global @unsafe +function __gc_retain(ref: usize): void { + if (ref) increment(changetype(ref - BLOCK_OVERHEAD)); } -// TODO: merge with TLSF -@unmanaged -class Block { - /** Memory manager info. */ - mmInfo: usize; // u32 in WASM32. WASM64 might need adaption - /** Garbage collector info. */ - gcInfo: u32; - /** Runtime class id. */ - classId: u32; - /** Runtime object payload size. */ - payloadSize: u32; +// @ts-ignore: decorator +@global @unsafe +function __gc_release(ref: usize): void { + if (ref) decrement(changetype(ref - BLOCK_OVERHEAD)); } // keep alive, everything else is reached from here export { + __mm_allocate, + __mm_free, __rt_visit, - increment as retain, - decrement as release, - collectCycles as collect + __gc_retain, + __gc_release, + collectCycles as __gc_collect }; diff --git a/tests/compiler/runtime/asrt.untouched.wat b/tests/compiler/runtime/asrt.untouched.wat index 5451f06712..9a8638e219 100644 --- a/tests/compiler/runtime/asrt.untouched.wat +++ b/tests/compiler/runtime/asrt.untouched.wat @@ -1,35 +1,1319 @@ (module + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 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$vi (func (param i32))) (type $FUNCSIG$v (func)) - (type $FUNCSIG$viii (func (param i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00r\00u\00n\00t\00i\00m\00e\00/\00a\00s\00r\00t\00.\00t\00s\00") (data (i32.const 56) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $runtime/asrt/ROOT (mut i32) (i32.const 0)) (global $runtime/asrt/ACYCLIC_FLAG i32 (i32.const 0)) (global $runtime/asrt/ROOTS (mut i32) (i32.const 0)) (global $runtime/asrt/CUR (mut i32) (i32.const 0)) (global $runtime/asrt/END (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 100)) (export "memory" (memory $0)) + (export "__mm_allocate" (func $runtime/asrt/__mm_allocate)) + (export "__mm_free" (func $runtime/asrt/__mm_free)) (export "__rt_visit" (func $runtime/asrt/__rt_visit)) - (export "retain" (func $runtime/asrt/increment)) - (export "release" (func $runtime/asrt/decrement)) - (export "collect" (func $runtime/asrt/collectCycles)) - (func $runtime/asrt/__rt_visit_members (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - unreachable + (export "__gc_retain" (func $runtime/asrt/__gc_retain)) + (export "__gc_release" (func $runtime/asrt/__gc_release)) + (export "__gc_collect" (func $runtime/asrt/collectCycles)) + (func $runtime/asrt/setTail (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=2912 + ) + (func $runtime/asrt/setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.const 22 + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 167 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $runtime/asrt/setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 22 + i32.lt_u + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 181 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 32 + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + local.get $3 + i32.store offset=96 + ) + (func $runtime/asrt/getTail (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=2912 + ) + (func $runtime/asrt/getRight (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + local.set $1 + local.get $1 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.add + local.get $1 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + local.set $2 + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 114 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $2 + ) + (func $runtime/asrt/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 467 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $runtime/asrt/getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 22 + i32.lt_u + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 172 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 32 + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + i32.load offset=96 + ) + (func $runtime/asrt/getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + i32.const 22 + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 162 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) + (func $runtime/asrt/removeBlock (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + i32.load + local.set $2 + local.get $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 262 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + i32.const 16 + i32.ge_u + if (result i32) + local.get $3 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 264 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $4 + local.get $3 + i32.const 8 + i32.div_u + local.set $5 + else + local.get $3 + call $runtime/asrt/fls + local.set $4 + local.get $3 + local.get $4 + i32.const 5 + i32.sub + i32.shr_u + i32.const 1 + i32.const 5 + i32.shl + i32.xor + local.set $5 + local.get $4 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $4 + end + local.get $1 + i32.load offset=16 + local.set $6 + local.get $1 + i32.load offset=20 + local.set $7 + local.get $6 + if + local.get $6 + local.get $7 + i32.store offset=20 + end + local.get $7 + if + local.get $7 + local.get $6 + i32.store offset=16 + end + local.get $1 + local.get $0 + local.get $4 + local.get $5 + call $runtime/asrt/getHead + i32.eq + if + local.get $0 + local.get $4 + local.get $5 + local.get $7 + call $runtime/asrt/setHead + local.get $7 + i32.eqz + if + local.get $0 + local.get $4 + call $runtime/asrt/getSLMap + local.set $8 + local.get $0 + local.get $4 + local.get $8 + i32.const 1 + local.get $5 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $8 + call $runtime/asrt/setSLMap + local.get $8 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $4 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $runtime/asrt/getLeft (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 103 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.set $1 + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 105 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + ) + (func $runtime/asrt/insertBlock (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 197 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load + local.set $2 + local.get $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 199 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $runtime/asrt/getRight + local.set $3 + local.get $3 + i32.load + local.set $4 + local.get $4 + i32.const 1 + i32.and + if + local.get $0 + local.get $3 + call $runtime/asrt/removeBlock + local.get $1 + local.get $2 + i32.const 16 + local.get $4 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $2 + i32.store + local.get $1 + call $runtime/asrt/getRight + local.set $3 + local.get $3 + i32.load + local.set $4 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $1 + call $runtime/asrt/getLeft + local.set $5 + local.get $5 + i32.load + local.set $6 + local.get $6 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 217 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $5 + call $runtime/asrt/removeBlock + local.get $5 + local.get $6 + i32.const 16 + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $6 + i32.store + local.get $5 + local.set $1 + local.get $6 + local.set $2 + end + local.get $3 + local.get $4 + i32.const 2 + i32.or + i32.store + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $7 + local.get $7 + i32.const 16 + i32.ge_u + if (result i32) + local.get $7 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 230 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 16 + i32.add + local.get $7 + i32.add + local.get $3 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 231 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $7 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $8 + local.get $7 + i32.const 8 + i32.div_u + local.set $9 + else + local.get $7 + call $runtime/asrt/fls + local.set $8 + local.get $7 + local.get $8 + i32.const 5 + i32.sub + i32.shr_u + i32.const 1 + i32.const 5 + i32.shl + i32.xor + local.set $9 + local.get $8 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $8 + end + local.get $0 + local.get $8 + local.get $9 + call $runtime/asrt/getHead + local.set $10 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + local.get $10 + i32.store offset=20 + local.get $10 + if + local.get $10 + local.get $1 + i32.store offset=16 + end + local.get $0 + local.get $8 + local.get $9 + local.get $1 + call $runtime/asrt/setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $8 + i32.shl + i32.or + i32.store + local.get $0 + local.get $8 + local.get $0 + local.get $8 + call $runtime/asrt/getSLMap + i32.const 1 + local.get $9 + i32.shl + i32.or + call $runtime/asrt/setSLMap + ) + (func $runtime/asrt/addMemory (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $1 + local.get $2 + i32.le_u + if (result i32) + local.get $1 + i32.const 7 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 374 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $runtime/asrt/getTail + local.set $3 + i32.const 0 + local.set $4 + local.get $3 + if + local.get $1 + i32.const 16 + i32.sub + local.get $3 + i32.eq + if + local.get $1 + i32.const 16 + i32.sub + local.set $1 + local.get $3 + i32.load + local.set $4 + else + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 391 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + end + else + local.get $1 + local.get $0 + i32.const 2916 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 395 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.set $5 + local.get $5 + i32.const 16 + i32.const 16 + i32.add + i32.const 16 + i32.add + i32.lt_u + if + i32.const 0 + return + end + local.get $5 + i32.const 2 + i32.const 16 + i32.mul + i32.sub + local.set $6 + local.get $1 + local.set $7 + local.get $7 + local.get $6 + i32.const 1 + i32.or + local.get $4 + i32.const 2 + i32.and + i32.or + i32.store + local.get $7 + i32.const 0 + i32.store offset=16 + local.get $7 + i32.const 0 + i32.store offset=20 + local.get $1 + local.get $5 + i32.add + i32.const 16 + i32.sub + local.set $3 + local.get $3 + i32.const 0 + i32.const 2 + i32.or + i32.store + local.get $0 + local.get $3 + call $runtime/asrt/setTail + local.get $0 + local.get $7 + call $runtime/asrt/insertBlock + i32.const 1 + ) + (func $runtime/asrt/initialize (; 13 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $0 + current_memory + local.set $1 + local.get $0 + i32.const 2916 + i32.add + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $2 + local.get $1 + i32.gt_s + if (result i32) + local.get $2 + local.get $1 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + local.get $0 + local.set $3 + local.get $3 + i32.const 0 + i32.store + local.get $3 + i32.const 0 + call $runtime/asrt/setTail + block $break|0 + i32.const 0 + local.set $4 + loop $repeat|0 + local.get $4 + i32.const 22 + i32.lt_u + i32.eqz + br_if $break|0 + block + local.get $3 + local.get $4 + i32.const 0 + call $runtime/asrt/setSLMap + block $break|1 + i32.const 0 + local.set $5 + loop $repeat|1 + local.get $5 + i32.const 32 + i32.lt_u + i32.eqz + br_if $break|1 + local.get $3 + local.get $4 + local.get $5 + i32.const 0 + call $runtime/asrt/setHead + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $repeat|1 + unreachable + end + unreachable + end + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $repeat|0 + unreachable + end + unreachable + end + local.get $3 + local.get $0 + i32.const 2916 + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + current_memory + i32.const 16 + i32.shl + call $runtime/asrt/addMemory + drop + local.get $3 + ) + (func $runtime/asrt/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 461 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $runtime/asrt/ffs (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 461 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $runtime/asrt/searchBlock (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $1 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $2 + local.get $1 + i32.const 8 + i32.div_u + local.set $3 + else + local.get $1 + call $runtime/asrt/fls + local.set $2 + local.get $1 + local.get $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 1 + i32.const 5 + i32.shl + i32.xor + local.set $3 + local.get $2 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $2 + local.get $3 + i32.const 32 + i32.const 1 + i32.sub + i32.lt_u + if + local.get $3 + i32.const 1 + i32.add + local.set $3 + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + i32.const 0 + local.set $3 + end + end + local.get $0 + local.get $2 + call $runtime/asrt/getSLMap + i32.const 0 + i32.const -1 + i32.xor + local.get $3 + i32.shl + i32.and + local.set $4 + local.get $4 + i32.eqz + if + local.get $0 + i32.load + i32.const 0 + i32.const -1 + i32.xor + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.set $6 + local.get $6 + i32.eqz + if + i32.const 0 + local.set $5 + else + local.get $6 + call $runtime/asrt/ffs + local.set $2 + local.get $0 + local.get $2 + call $runtime/asrt/getSLMap + local.set $4 + local.get $4 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 331 + i32.const 17 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + local.get $4 + call $runtime/asrt/ffs + call $runtime/asrt/getHead + local.set $5 + end + else + local.get $0 + local.get $2 + local.get $4 + call $runtime/asrt/ffs + call $runtime/asrt/getHead + local.set $5 + end + local.get $5 + ) + (func $runtime/asrt/growMemory (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + current_memory + local.set $2 + local.get $1 + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $3 + local.get $2 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + local.set $6 + local.get $6 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + current_memory + local.set $7 + local.get $0 + local.get $2 + i32.const 16 + i32.shl + local.get $7 + i32.const 16 + i32.shl + call $runtime/asrt/addMemory + drop + ) + (func $runtime/asrt/prepareBlock (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.set $3 + local.get $3 + i32.const 1 + i32.and + i32.const 0 + i32.ne + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 346 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $runtime/asrt/removeBlock + local.get $3 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.sub + local.set $4 + local.get $4 + i32.const 16 + i32.const 16 + i32.add + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.get $2 + i32.add + local.set $5 + local.get $5 + local.get $4 + i32.const 16 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $5 + call $runtime/asrt/insertBlock + else + local.get $1 + local.get $3 + i32.const 1 + i32.const -1 + i32.xor + i32.and + i32.store + local.get $1 + call $runtime/asrt/getRight + local.get $1 + call $runtime/asrt/getRight + i32.load + i32.const 2 + i32.const -1 + i32.xor + i32.and + i32.store + end + local.get $1 + i32.const 16 + i32.add + ) + (func $runtime/asrt/__mm_allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + global.get $runtime/asrt/ROOT + local.set $1 + local.get $1 + i32.eqz + if + call $runtime/asrt/initialize + local.tee $1 + global.set $runtime/asrt/ROOT + end + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + local.get $0 + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.tee $2 + i32.const 16 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + local.set $0 + local.get $1 + local.get $0 + call $runtime/asrt/searchBlock + local.set $4 + local.get $4 + i32.eqz + if + local.get $1 + local.get $0 + call $runtime/asrt/growMemory + local.get $1 + local.get $0 + call $runtime/asrt/searchBlock + local.set $4 + local.get $4 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 490 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $4 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $0 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 492 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.const 0 + i32.store offset=4 + local.get $4 + i32.const 0 + i32.store offset=8 + local.get $4 + local.get $0 + i32.store offset=12 + local.get $1 + local.get $4 + local.get $0 + call $runtime/asrt/prepareBlock + ) + (func $runtime/asrt/freeBlock (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $1 + i32.load + local.set $2 + local.get $2 + i32.const 1 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 454 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $runtime/asrt/insertBlock + ) + (func $runtime/asrt/__mm_free (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + if + local.get $0 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 503 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/asrt/ROOT + local.set $1 + local.get $1 + if + local.get $1 + local.get $0 + i32.const 16 + i32.sub + call $runtime/asrt/freeBlock + end + end ) - (func $runtime/asrt/free (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $runtime/asrt/__rt_visit_members (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) unreachable ) - (func $runtime/asrt/__rt_flags (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $runtime/asrt/__rt_flags (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) unreachable ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.const 72 i32.const 61 @@ -37,7 +1321,7 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/memory/memory.copy (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -246,7 +1530,7 @@ end end ) - (func $runtime/asrt/growRoots (; 6 ;) (type $FUNCSIG$v) + (func $runtime/asrt/growRoots (; 26 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -290,7 +1574,7 @@ i32.add global.set $runtime/asrt/END ) - (func $runtime/asrt/appendRoot (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $runtime/asrt/appendRoot (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) global.get $runtime/asrt/CUR local.set $1 @@ -310,7 +1594,7 @@ i32.add global.set $runtime/asrt/CUR ) - (func $runtime/asrt/decrement (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $runtime/asrt/decrement (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -332,8 +1616,9 @@ i32.and i32.eqz if + global.get $runtime/asrt/ROOT local.get $0 - call $runtime/asrt/free + call $runtime/asrt/freeBlock else local.get $0 i32.const -2147483648 @@ -351,7 +1636,7 @@ if i32.const 0 i32.const 24 - i32.const 137 + i32.const 642 i32.const 15 call $~lib/builtins/abort unreachable @@ -395,7 +1680,7 @@ end end ) - (func $runtime/asrt/markGray (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $runtime/asrt/markGray (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -420,7 +1705,7 @@ call $runtime/asrt/__rt_visit_members end ) - (func $runtime/asrt/scanBlack (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $runtime/asrt/scanBlack (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.load offset=4 @@ -435,7 +1720,7 @@ i32.const 4 call $runtime/asrt/__rt_visit_members ) - (func $runtime/asrt/scan (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $runtime/asrt/scan (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -470,7 +1755,7 @@ end end ) - (func $runtime/asrt/collectWhite (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $runtime/asrt/collectWhite (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -489,21 +1774,15 @@ i32.const 0 end if - local.get $0 - local.get $1 - i32.const 1879048192 - i32.const -1 - i32.xor - i32.and - i32.const 0 - i32.or - i32.store offset=4 local.get $0 i32.const 5 call $runtime/asrt/__rt_visit_members end + global.get $runtime/asrt/ROOT + local.get $0 + call $runtime/asrt/freeBlock ) - (func $runtime/asrt/__rt_visit (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $runtime/asrt/__rt_visit (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $break|0 block $case5|0 @@ -555,7 +1834,7 @@ if i32.const 0 i32.const 24 - i32.const 94 + i32.const 597 i32.const 17 call $~lib/builtins/abort unreachable @@ -602,7 +1881,7 @@ if i32.const 0 i32.const 24 - i32.const 105 + i32.const 608 i32.const 6 call $~lib/builtins/abort unreachable @@ -639,14 +1918,14 @@ if i32.const 0 i32.const 24 - i32.const 116 + i32.const 619 i32.const 24 call $~lib/builtins/abort unreachable end end ) - (func $runtime/asrt/increment (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $runtime/asrt/increment (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -668,7 +1947,7 @@ if i32.const 0 i32.const 24 - i32.const 122 + i32.const 626 i32.const 2 call $~lib/builtins/abort unreachable @@ -679,7 +1958,25 @@ i32.add i32.store offset=4 ) - (func $runtime/asrt/collectCycles (; 15 ;) (type $FUNCSIG$v) + (func $runtime/asrt/__gc_retain (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + if + local.get $0 + i32.const 16 + i32.sub + call $runtime/asrt/increment + end + ) + (func $runtime/asrt/__gc_release (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + if + local.get $0 + i32.const 16 + i32.sub + call $runtime/asrt/decrement + end + ) + (func $runtime/asrt/collectCycles (; 37 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -749,8 +2046,9 @@ i32.const 0 end if + global.get $runtime/asrt/ROOT local.get $4 - call $runtime/asrt/free + call $runtime/asrt/freeBlock else local.get $4 local.get $5 @@ -830,6 +2128,6 @@ local.get $0 global.set $runtime/asrt/CUR ) - (func $null (; 16 ;) (type $FUNCSIG$v) + (func $null (; 38 ;) (type $FUNCSIG$v) ) ) From 586ca8b5808299c8d09dfa55967fa13c5fd51a8d Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 15 Apr 2019 12:41:29 +0200 Subject: [PATCH 108/119] backport tlsf fixes, add asrt allocator test --- std/assembly/allocator/tlsf.ts | 6 +- tests/allocators/asrt/assembly/index.ts | 10 + tests/allocators/asrt/assembly/tsconfig.json | 6 + tests/allocators/asrt/optimized.wat | 732 ++++++++++ tests/allocators/asrt/package.json | 8 + tests/allocators/asrt/untouched.wat | 1329 ++++++++++++++++++ tests/allocators/tlsf/optimized.wat | 12 +- tests/allocators/tlsf/untouched.wat | 31 +- tests/compiler/runtime/asrt.optimized.wat | 54 +- tests/compiler/runtime/asrt.ts | 16 +- tests/compiler/runtime/asrt.untouched.wat | 56 +- 11 files changed, 2179 insertions(+), 81 deletions(-) create mode 100644 tests/allocators/asrt/assembly/index.ts create mode 100644 tests/allocators/asrt/assembly/tsconfig.json create mode 100644 tests/allocators/asrt/optimized.wat create mode 100644 tests/allocators/asrt/package.json create mode 100644 tests/allocators/asrt/untouched.wat diff --git a/std/assembly/allocator/tlsf.ts b/std/assembly/allocator/tlsf.ts index 4fd90fe535..9f30d60521 100644 --- a/std/assembly/allocator/tlsf.ts +++ b/std/assembly/allocator/tlsf.ts @@ -198,8 +198,8 @@ const TAGS: usize = FREE | LEFT_FREE; @inline private static readonly HL_END: usize = Root.HL_START + FL_BITS * SL_SIZE * sizeof(); - get tailRef(): usize { return load(0, Root.HL_END); } - set tailRef(value: usize) { store(0, value, Root.HL_END); } + get tailRef(): usize { return load(changetype(this), Root.HL_END); } + set tailRef(value: usize) { store(changetype(this), value, Root.HL_END); } /** Total size of the {@link Root} structure. */ @inline @@ -405,7 +405,7 @@ const TAGS: usize = FREE | LEFT_FREE; var tailRef = this.tailRef; var tailInfo: usize = 0; if (tailRef) { - assert(start >= tailRef + sizeof()); // starts after tail + assert(start >= tailRef + Block.HEADER_SIZE); // starts after tail // merge with current tail if adjacent if (start - Block.HEADER_SIZE == tailRef) { diff --git a/tests/allocators/asrt/assembly/index.ts b/tests/allocators/asrt/assembly/index.ts new file mode 100644 index 0000000000..2f23350184 --- /dev/null +++ b/tests/allocators/asrt/assembly/index.ts @@ -0,0 +1,10 @@ +import "../../../compiler/runtime/asrt"; + +export namespace memory { + export function allocate(size: usize): usize { + return __mm_allocate(size); + } + export function free(ptr: usize): void { + __mm_free(ptr); + } +} diff --git a/tests/allocators/asrt/assembly/tsconfig.json b/tests/allocators/asrt/assembly/tsconfig.json new file mode 100644 index 0000000000..9263ff67b2 --- /dev/null +++ b/tests/allocators/asrt/assembly/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../../../../std/assembly.json", + "include": [ + "./**/*.ts" + ] +} diff --git a/tests/allocators/asrt/optimized.wat b/tests/allocators/asrt/optimized.wat new file mode 100644 index 0000000000..b3af32865f --- /dev/null +++ b/tests/allocators/asrt/optimized.wat @@ -0,0 +1,732 @@ +(module + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) + (memory $0 0) + (global $../../compiler/runtime/asrt/ROOT (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "memory.allocate" (func $assembly/index/memory.allocate)) + (export "memory.free" (func $assembly/index/memory.free)) + (func $../../compiler/runtime/asrt/setTail (; 0 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=2912 + ) + (func $../../compiler/runtime/asrt/setSLMap (; 1 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $../../compiler/runtime/asrt/setHead (; 2 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $../../compiler/runtime/asrt/getRight (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $../../compiler/runtime/asrt/fls (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $../../compiler/runtime/asrt/getHead (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $../../compiler/runtime/asrt/getSLMap (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) + (func $../../compiler/runtime/asrt/removeBlock (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + i32.const -4 + i32.and + local.tee $2 + i32.const 256 + i32.lt_u + if (result i32) + local.get $2 + i32.const 8 + i32.div_u + local.set $4 + i32.const 0 + else + local.get $2 + local.get $2 + call $../../compiler/runtime/asrt/fls + local.tee $3 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $4 + local.get $3 + i32.const 7 + i32.sub + end + local.set $3 + local.get $1 + i32.load offset=20 + local.set $2 + local.get $1 + i32.load offset=16 + local.tee $5 + if + local.get $5 + local.get $2 + i32.store offset=20 + end + local.get $2 + if + local.get $2 + local.get $5 + i32.store offset=16 + end + local.get $0 + local.get $3 + local.get $4 + call $../../compiler/runtime/asrt/getHead + local.get $1 + i32.eq + if + local.get $0 + local.get $3 + local.get $4 + local.get $2 + call $../../compiler/runtime/asrt/setHead + local.get $2 + i32.eqz + if + local.get $0 + local.get $3 + local.get $0 + local.get $3 + call $../../compiler/runtime/asrt/getSLMap + i32.const 1 + local.get $4 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $1 + call $../../compiler/runtime/asrt/setSLMap + local.get $1 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $3 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $../../compiler/runtime/asrt/insertBlock (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.set $2 + local.get $1 + call $../../compiler/runtime/asrt/getRight + local.tee $3 + i32.load + local.tee $4 + i32.const 1 + i32.and + if + local.get $0 + local.get $3 + call $../../compiler/runtime/asrt/removeBlock + local.get $1 + local.get $2 + local.get $4 + i32.const -4 + i32.and + i32.const 16 + i32.add + i32.add + local.tee $2 + i32.store + local.get $1 + call $../../compiler/runtime/asrt/getRight + local.tee $3 + i32.load + local.set $4 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $1 + i32.const 4 + i32.sub + i32.load + local.tee $1 + i32.load + local.set $5 + local.get $0 + local.get $1 + call $../../compiler/runtime/asrt/removeBlock + local.get $1 + local.get $5 + local.get $2 + i32.const -4 + i32.and + i32.const 16 + i32.add + i32.add + local.tee $2 + i32.store + end + local.get $3 + local.get $4 + i32.const 2 + i32.or + i32.store + local.get $3 + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.const -4 + i32.and + local.tee $2 + i32.const 256 + i32.lt_u + if (result i32) + local.get $2 + i32.const 8 + i32.div_u + local.set $2 + i32.const 0 + else + local.get $2 + local.get $2 + call $../../compiler/runtime/asrt/fls + local.tee $3 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $2 + local.get $3 + i32.const 7 + i32.sub + end + local.tee $3 + local.get $2 + call $../../compiler/runtime/asrt/getHead + local.set $4 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + local.get $4 + i32.store offset=20 + local.get $4 + if + local.get $4 + local.get $1 + i32.store offset=16 + end + local.get $0 + local.get $3 + local.get $2 + local.get $1 + call $../../compiler/runtime/asrt/setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $3 + i32.shl + i32.or + i32.store + local.get $0 + local.get $3 + local.get $0 + local.get $3 + call $../../compiler/runtime/asrt/getSLMap + i32.const 1 + local.get $2 + i32.shl + i32.or + call $../../compiler/runtime/asrt/setSLMap + ) + (func $../../compiler/runtime/asrt/addMemory (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + local.get $2 + block (result i32) + local.get $0 + i32.load offset=2912 + local.tee $2 + if + local.get $1 + i32.const 16 + i32.sub + local.get $2 + i32.eq + if + local.get $2 + i32.load + local.set $3 + local.get $1 + i32.const 16 + i32.sub + local.set $1 + end + end + local.get $1 + end + i32.sub + local.tee $2 + i32.const 48 + i32.lt_u + if + return + end + local.get $1 + local.get $3 + i32.const 2 + i32.and + local.get $2 + i32.const 32 + i32.sub + i32.const 1 + i32.or + i32.or + i32.store + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $1 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.tee $2 + i32.const 2 + i32.store + local.get $0 + local.get $2 + call $../../compiler/runtime/asrt/setTail + local.get $0 + local.get $1 + call $../../compiler/runtime/asrt/insertBlock + ) + (func $../../compiler/runtime/asrt/initialize (; 10 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 8 + local.tee $3 + i32.const 68451 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + current_memory + local.tee $0 + i32.gt_s + if (result i32) + local.get $1 + local.get $0 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + local.get $3 + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + call $../../compiler/runtime/asrt/setTail + loop $repeat|0 + block $break|0 + local.get $2 + i32.const 22 + i32.ge_u + br_if $break|0 + local.get $0 + local.get $2 + i32.const 0 + call $../../compiler/runtime/asrt/setSLMap + i32.const 0 + local.set $1 + loop $repeat|1 + block $break|1 + local.get $1 + i32.const 32 + i32.ge_u + br_if $break|1 + local.get $0 + local.get $2 + local.get $1 + i32.const 0 + call $../../compiler/runtime/asrt/setHead + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|1 + end + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + end + end + local.get $0 + local.get $3 + i32.const 2923 + i32.add + i32.const -8 + i32.and + current_memory + i32.const 16 + i32.shl + call $../../compiler/runtime/asrt/addMemory + local.get $0 + ) + (func $../../compiler/runtime/asrt/searchBlock (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $1 + i32.const 256 + i32.lt_u + if (result i32) + local.get $1 + i32.const 8 + i32.div_u + else + local.get $1 + local.get $1 + call $../../compiler/runtime/asrt/fls + local.tee $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $1 + local.get $2 + i32.const 7 + i32.sub + local.set $2 + local.get $1 + i32.const 31 + i32.lt_u + if (result i32) + local.get $1 + i32.const 1 + i32.add + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + i32.const 0 + end + end + local.set $1 + local.get $0 + local.get $2 + call $../../compiler/runtime/asrt/getSLMap + i32.const -1 + local.get $1 + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.ctz + call $../../compiler/runtime/asrt/getHead + else + local.get $0 + i32.load + i32.const -1 + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $1 + i32.ctz + local.tee $1 + local.get $0 + local.get $1 + call $../../compiler/runtime/asrt/getSLMap + i32.ctz + call $../../compiler/runtime/asrt/getHead + else + i32.const 0 + end + end + ) + (func $../../compiler/runtime/asrt/growMemory (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + current_memory + local.tee $2 + local.tee $3 + local.get $1 + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.tee $4 + local.get $3 + local.get $4 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $1 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + current_memory + i32.const 16 + i32.shl + call $../../compiler/runtime/asrt/addMemory + ) + (func $../../compiler/runtime/asrt/prepareBlock (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $1 + i32.load + local.set $3 + local.get $0 + local.get $1 + call $../../compiler/runtime/asrt/removeBlock + local.get $3 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $4 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.get $2 + i32.add + local.tee $2 + local.get $4 + i32.const 16 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $../../compiler/runtime/asrt/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + call $../../compiler/runtime/asrt/getRight + local.get $1 + call $../../compiler/runtime/asrt/getRight + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 + i32.const 16 + i32.add + ) + (func $../../compiler/runtime/asrt/__mm_allocate (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $../../compiler/runtime/asrt/ROOT + local.tee $2 + i32.eqz + if + call $../../compiler/runtime/asrt/initialize + local.tee $2 + global.set $../../compiler/runtime/asrt/ROOT + end + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + local.get $2 + local.get $0 + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + i32.const 16 + local.tee $1 + local.get $0 + local.get $1 + i32.gt_u + select + local.tee $1 + call $../../compiler/runtime/asrt/searchBlock + local.tee $0 + i32.eqz + if + local.get $2 + local.get $1 + call $../../compiler/runtime/asrt/growMemory + local.get $2 + local.get $1 + call $../../compiler/runtime/asrt/searchBlock + local.set $0 + end + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $2 + local.get $0 + local.get $1 + call $../../compiler/runtime/asrt/prepareBlock + ) + (func $assembly/index/memory.allocate (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $../../compiler/runtime/asrt/__mm_allocate + ) + (func $../../compiler/runtime/asrt/__mm_free (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + if + global.get $../../compiler/runtime/asrt/ROOT + local.tee $1 + if + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + local.get $0 + i32.load + i32.const 1 + i32.or + i32.store + local.get $1 + local.get $0 + call $../../compiler/runtime/asrt/insertBlock + end + end + ) + (func $assembly/index/memory.free (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $../../compiler/runtime/asrt/__mm_free + ) + (func $null (; 18 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/allocators/asrt/package.json b/tests/allocators/asrt/package.json new file mode 100644 index 0000000000..dc760bf282 --- /dev/null +++ b/tests/allocators/asrt/package.json @@ -0,0 +1,8 @@ +{ + "private": true, + "scripts": { + "build": "npm run build:untouched && npm run build:optimized", + "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --runtime none --validate --sourceMap --measure", + "build:optimized": "node ../../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --runtime none --validate --sourceMap --measure --noAssert --optimize" + } +} diff --git a/tests/allocators/asrt/untouched.wat b/tests/allocators/asrt/untouched.wat new file mode 100644 index 0000000000..f0e31f7bed --- /dev/null +++ b/tests/allocators/asrt/untouched.wat @@ -0,0 +1,1329 @@ +(module + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00<\00\00\00\00\00\00\00\00\00\00\00.\00.\00/\00.\00.\00/\00c\00o\00m\00p\00i\00l\00e\00r\00/\00r\00u\00n\00t\00i\00m\00e\00/\00a\00s\00r\00t\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $../../compiler/runtime/asrt/ROOT (mut i32) (i32.const 0)) + (global $../../compiler/runtime/asrt/ACYCLIC_FLAG i32 (i32.const 0)) + (global $../../compiler/runtime/asrt/ROOTS (mut i32) (i32.const 0)) + (global $../../compiler/runtime/asrt/CUR (mut i32) (i32.const 0)) + (global $../../compiler/runtime/asrt/END (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 84)) + (export "memory" (memory $0)) + (export "memory.allocate" (func $assembly/index/memory.allocate)) + (export "memory.free" (func $assembly/index/memory.free)) + (func $../../compiler/runtime/asrt/setTail (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=2912 + ) + (func $../../compiler/runtime/asrt/setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.const 22 + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 165 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $../../compiler/runtime/asrt/setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 22 + i32.lt_u + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 179 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 32 + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + local.get $3 + i32.store offset=96 + ) + (func $../../compiler/runtime/asrt/getTail (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=2912 + ) + (func $../../compiler/runtime/asrt/getRight (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + local.set $1 + local.get $1 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.add + local.get $1 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + local.set $2 + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 114 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $2 + ) + (func $../../compiler/runtime/asrt/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 467 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $../../compiler/runtime/asrt/getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 22 + i32.lt_u + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 170 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 32 + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + i32.load offset=96 + ) + (func $../../compiler/runtime/asrt/getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + i32.const 22 + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 160 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) + (func $../../compiler/runtime/asrt/removeBlock (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + i32.load + local.set $2 + local.get $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 260 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + i32.const 16 + i32.ge_u + if (result i32) + local.get $3 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 262 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $4 + local.get $3 + i32.const 8 + i32.div_u + local.set $5 + else + local.get $3 + call $../../compiler/runtime/asrt/fls + local.set $4 + local.get $3 + local.get $4 + i32.const 5 + i32.sub + i32.shr_u + i32.const 1 + i32.const 5 + i32.shl + i32.xor + local.set $5 + local.get $4 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $4 + end + local.get $1 + i32.load offset=16 + local.set $6 + local.get $1 + i32.load offset=20 + local.set $7 + local.get $6 + if + local.get $6 + local.get $7 + i32.store offset=20 + end + local.get $7 + if + local.get $7 + local.get $6 + i32.store offset=16 + end + local.get $1 + local.get $0 + local.get $4 + local.get $5 + call $../../compiler/runtime/asrt/getHead + i32.eq + if + local.get $0 + local.get $4 + local.get $5 + local.get $7 + call $../../compiler/runtime/asrt/setHead + local.get $7 + i32.eqz + if + local.get $0 + local.get $4 + call $../../compiler/runtime/asrt/getSLMap + local.set $8 + local.get $0 + local.get $4 + local.get $8 + i32.const 1 + local.get $5 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $8 + call $../../compiler/runtime/asrt/setSLMap + local.get $8 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $4 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $../../compiler/runtime/asrt/getLeft (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 103 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.set $1 + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 105 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + ) + (func $../../compiler/runtime/asrt/insertBlock (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 195 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load + local.set $2 + local.get $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 197 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $../../compiler/runtime/asrt/getRight + local.set $3 + local.get $3 + i32.load + local.set $4 + local.get $4 + i32.const 1 + i32.and + if + local.get $0 + local.get $3 + call $../../compiler/runtime/asrt/removeBlock + local.get $1 + local.get $2 + i32.const 16 + local.get $4 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $2 + i32.store + local.get $1 + call $../../compiler/runtime/asrt/getRight + local.set $3 + local.get $3 + i32.load + local.set $4 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $1 + call $../../compiler/runtime/asrt/getLeft + local.set $5 + local.get $5 + i32.load + local.set $6 + local.get $6 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 215 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $5 + call $../../compiler/runtime/asrt/removeBlock + local.get $5 + local.get $6 + i32.const 16 + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $6 + i32.store + local.get $5 + local.set $1 + local.get $6 + local.set $2 + end + local.get $3 + local.get $4 + i32.const 2 + i32.or + i32.store + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $7 + local.get $7 + i32.const 16 + i32.ge_u + if (result i32) + local.get $7 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 228 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 16 + i32.add + local.get $7 + i32.add + local.get $3 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 229 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $7 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $8 + local.get $7 + i32.const 8 + i32.div_u + local.set $9 + else + local.get $7 + call $../../compiler/runtime/asrt/fls + local.set $8 + local.get $7 + local.get $8 + i32.const 5 + i32.sub + i32.shr_u + i32.const 1 + i32.const 5 + i32.shl + i32.xor + local.set $9 + local.get $8 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $8 + end + local.get $0 + local.get $8 + local.get $9 + call $../../compiler/runtime/asrt/getHead + local.set $10 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + local.get $10 + i32.store offset=20 + local.get $10 + if + local.get $10 + local.get $1 + i32.store offset=16 + end + local.get $0 + local.get $8 + local.get $9 + local.get $1 + call $../../compiler/runtime/asrt/setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $8 + i32.shl + i32.or + i32.store + local.get $0 + local.get $8 + local.get $0 + local.get $8 + call $../../compiler/runtime/asrt/getSLMap + i32.const 1 + local.get $9 + i32.shl + i32.or + call $../../compiler/runtime/asrt/setSLMap + ) + (func $../../compiler/runtime/asrt/addMemory (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $1 + local.get $2 + i32.le_u + if (result i32) + local.get $1 + i32.const 7 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 372 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $../../compiler/runtime/asrt/getTail + local.set $3 + i32.const 0 + local.set $4 + local.get $3 + if + local.get $1 + local.get $3 + i32.const 16 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 382 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 16 + i32.sub + local.get $3 + i32.eq + if + local.get $1 + i32.const 16 + i32.sub + local.set $1 + local.get $3 + i32.load + local.set $4 + else + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 391 + i32.const 17 + call $~lib/builtins/abort + unreachable + end + end + else + local.get $1 + local.get $0 + i32.const 2916 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 395 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.set $5 + local.get $5 + i32.const 16 + i32.const 16 + i32.add + i32.const 16 + i32.add + i32.lt_u + if + i32.const 0 + return + end + local.get $5 + i32.const 2 + i32.const 16 + i32.mul + i32.sub + local.set $6 + local.get $1 + local.set $7 + local.get $7 + local.get $6 + i32.const 1 + i32.or + local.get $4 + i32.const 2 + i32.and + i32.or + i32.store + local.get $7 + i32.const 0 + i32.store offset=16 + local.get $7 + i32.const 0 + i32.store offset=20 + local.get $1 + local.get $5 + i32.add + i32.const 16 + i32.sub + local.set $3 + local.get $3 + i32.const 0 + i32.const 2 + i32.or + i32.store + local.get $0 + local.get $3 + call $../../compiler/runtime/asrt/setTail + local.get $0 + local.get $7 + call $../../compiler/runtime/asrt/insertBlock + i32.const 1 + ) + (func $../../compiler/runtime/asrt/initialize (; 13 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $0 + current_memory + local.set $1 + local.get $0 + i32.const 2916 + i32.add + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $2 + local.get $2 + local.get $1 + i32.gt_s + if (result i32) + local.get $2 + local.get $1 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + local.get $0 + local.set $3 + local.get $3 + i32.const 0 + i32.store + local.get $3 + i32.const 0 + call $../../compiler/runtime/asrt/setTail + block $break|0 + i32.const 0 + local.set $4 + loop $repeat|0 + local.get $4 + i32.const 22 + i32.lt_u + i32.eqz + br_if $break|0 + block + local.get $3 + local.get $4 + i32.const 0 + call $../../compiler/runtime/asrt/setSLMap + block $break|1 + i32.const 0 + local.set $5 + loop $repeat|1 + local.get $5 + i32.const 32 + i32.lt_u + i32.eqz + br_if $break|1 + local.get $3 + local.get $4 + local.get $5 + i32.const 0 + call $../../compiler/runtime/asrt/setHead + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $repeat|1 + unreachable + end + unreachable + end + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $repeat|0 + unreachable + end + unreachable + end + local.get $3 + local.get $0 + i32.const 2916 + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + current_memory + i32.const 16 + i32.shl + call $../../compiler/runtime/asrt/addMemory + drop + local.get $3 + ) + (func $../../compiler/runtime/asrt/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 461 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $../../compiler/runtime/asrt/ffs (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 461 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $../../compiler/runtime/asrt/searchBlock (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $1 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $2 + local.get $1 + i32.const 8 + i32.div_u + local.set $3 + else + local.get $1 + call $../../compiler/runtime/asrt/fls + local.set $2 + local.get $1 + local.get $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 1 + i32.const 5 + i32.shl + i32.xor + local.set $3 + local.get $2 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $2 + local.get $3 + i32.const 32 + i32.const 1 + i32.sub + i32.lt_u + if + local.get $3 + i32.const 1 + i32.add + local.set $3 + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + i32.const 0 + local.set $3 + end + end + local.get $0 + local.get $2 + call $../../compiler/runtime/asrt/getSLMap + i32.const 0 + i32.const -1 + i32.xor + local.get $3 + i32.shl + i32.and + local.set $4 + local.get $4 + i32.eqz + if + local.get $0 + i32.load + i32.const 0 + i32.const -1 + i32.xor + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.set $6 + local.get $6 + i32.eqz + if + i32.const 0 + local.set $5 + else + local.get $6 + call $../../compiler/runtime/asrt/ffs + local.set $2 + local.get $0 + local.get $2 + call $../../compiler/runtime/asrt/getSLMap + local.set $4 + local.get $4 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 329 + i32.const 17 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + local.get $4 + call $../../compiler/runtime/asrt/ffs + call $../../compiler/runtime/asrt/getHead + local.set $5 + end + else + local.get $0 + local.get $2 + local.get $4 + call $../../compiler/runtime/asrt/ffs + call $../../compiler/runtime/asrt/getHead + local.set $5 + end + local.get $5 + ) + (func $../../compiler/runtime/asrt/growMemory (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + current_memory + local.set $2 + local.get $1 + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $3 + local.get $2 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + local.set $6 + local.get $6 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + current_memory + local.set $7 + local.get $0 + local.get $2 + i32.const 16 + i32.shl + local.get $7 + i32.const 16 + i32.shl + call $../../compiler/runtime/asrt/addMemory + drop + ) + (func $../../compiler/runtime/asrt/prepareBlock (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.set $3 + local.get $3 + i32.const 1 + i32.and + i32.const 0 + i32.ne + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 344 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $../../compiler/runtime/asrt/removeBlock + local.get $3 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.sub + local.set $4 + local.get $4 + i32.const 16 + i32.const 16 + i32.add + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.get $2 + i32.add + local.set $5 + local.get $5 + local.get $4 + i32.const 16 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $5 + call $../../compiler/runtime/asrt/insertBlock + else + local.get $1 + local.get $3 + i32.const 1 + i32.const -1 + i32.xor + i32.and + i32.store + local.get $1 + call $../../compiler/runtime/asrt/getRight + local.get $1 + call $../../compiler/runtime/asrt/getRight + i32.load + i32.const 2 + i32.const -1 + i32.xor + i32.and + i32.store + end + local.get $1 + i32.const 16 + i32.add + ) + (func $../../compiler/runtime/asrt/__mm_allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + global.get $../../compiler/runtime/asrt/ROOT + local.set $1 + local.get $1 + i32.eqz + if + call $../../compiler/runtime/asrt/initialize + local.tee $1 + global.set $../../compiler/runtime/asrt/ROOT + end + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + local.get $0 + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.tee $2 + i32.const 16 + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + local.set $0 + local.get $1 + local.get $0 + call $../../compiler/runtime/asrt/searchBlock + local.set $4 + local.get $4 + i32.eqz + if + local.get $1 + local.get $0 + call $../../compiler/runtime/asrt/growMemory + local.get $1 + local.get $0 + call $../../compiler/runtime/asrt/searchBlock + local.set $4 + local.get $4 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 490 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $4 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $0 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 492 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.const 0 + i32.store offset=4 + local.get $4 + i32.const 0 + i32.store offset=8 + local.get $4 + local.get $0 + i32.store offset=12 + local.get $1 + local.get $4 + local.get $0 + call $../../compiler/runtime/asrt/prepareBlock + ) + (func $assembly/index/memory.allocate (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $../../compiler/runtime/asrt/__mm_allocate + ) + (func $../../compiler/runtime/asrt/freeBlock (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $1 + i32.load + local.set $2 + local.get $2 + i32.const 1 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 454 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $../../compiler/runtime/asrt/insertBlock + ) + (func $../../compiler/runtime/asrt/__mm_free (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + if + local.get $0 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 503 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $../../compiler/runtime/asrt/ROOT + local.set $1 + local.get $1 + if + local.get $1 + local.get $0 + i32.const 16 + i32.sub + call $../../compiler/runtime/asrt/freeBlock + end + end + ) + (func $assembly/index/memory.free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $../../compiler/runtime/asrt/__mm_free + ) + (func $null (; 24 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/allocators/tlsf/optimized.wat b/tests/allocators/tlsf/optimized.wat index 7a3210adb1..e7b764c331 100644 --- a/tests/allocators/tlsf/optimized.wat +++ b/tests/allocators/tlsf/optimized.wat @@ -39,10 +39,10 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 2912 + (func $~lib/allocator/tlsf/Root#set:tailRef (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 - i32.store + local.get $1 + i32.store offset=2912 ) (func $~lib/allocator/tlsf/Root#setSLMap (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 @@ -340,8 +340,8 @@ (local $3 i32) local.get $2 block (result i32) - i32.const 2912 - i32.load + local.get $0 + i32.load offset=2912 local.tee $2 if local.get $1 @@ -393,6 +393,7 @@ local.tee $2 i32.const 2 i32.store + local.get $0 local.get $2 call $~lib/allocator/tlsf/Root#set:tailRef local.get $0 @@ -575,6 +576,7 @@ local.get $4 local.tee $1 global.set $~lib/allocator/tlsf/ROOT + local.get $1 i32.const 0 call $~lib/allocator/tlsf/Root#set:tailRef local.get $1 diff --git a/tests/allocators/tlsf/untouched.wat b/tests/allocators/tlsf/untouched.wat index 6b185db94a..093089a860 100644 --- a/tests/allocators/tlsf/untouched.wat +++ b/tests/allocators/tlsf/untouched.wat @@ -43,7 +43,7 @@ unreachable ) (func $~lib/allocator/tlsf/Root#set:tailRef (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 0 + local.get $0 local.get $1 i32.store offset=2912 ) @@ -101,7 +101,7 @@ i32.store offset=96 ) (func $~lib/allocator/tlsf/Root#get:tailRef (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 + local.get $0 i32.load offset=2912 ) (func $~lib/allocator/tlsf/Block#get:right (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -152,7 +152,7 @@ if i32.const 0 i32.const 72 - i32.const 452 + i32.const 454 i32.const 2 call $~lib/builtins/abort unreachable @@ -713,6 +713,17 @@ local.get $3 i32.load local.set $4 + else + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 415 + i32.const 8 + call $~lib/builtins/abort + unreachable + end end else local.get $1 @@ -724,7 +735,7 @@ if i32.const 0 i32.const 72 - i32.const 417 + i32.const 419 i32.const 6 call $~lib/builtins/abort unreachable @@ -795,7 +806,7 @@ if i32.const 0 i32.const 72 - i32.const 446 + i32.const 448 i32.const 2 call $~lib/builtins/abort unreachable @@ -811,7 +822,7 @@ if i32.const 0 i32.const 72 - i32.const 446 + i32.const 448 i32.const 2 call $~lib/builtins/abort unreachable @@ -1237,7 +1248,7 @@ if (result i32) i32.const 0 i32.const 72 - i32.const 507 + i32.const 509 i32.const 12 call $~lib/builtins/abort unreachable @@ -1258,7 +1269,7 @@ if i32.const 0 i32.const 72 - i32.const 510 + i32.const 512 i32.const 2 call $~lib/builtins/abort unreachable @@ -1287,7 +1298,7 @@ if i32.const 0 i32.const 72 - i32.const 519 + i32.const 521 i32.const 4 call $~lib/builtins/abort unreachable @@ -1311,7 +1322,7 @@ if i32.const 0 i32.const 72 - i32.const 524 + i32.const 526 i32.const 6 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/runtime/asrt.optimized.wat b/tests/compiler/runtime/asrt.optimized.wat index 0b893b008f..0789717420 100644 --- a/tests/compiler/runtime/asrt.optimized.wat +++ b/tests/compiler/runtime/asrt.optimized.wat @@ -31,7 +31,7 @@ if i32.const 0 i32.const 24 - i32.const 167 + i32.const 165 i32.const 13 call $~lib/builtins/abort unreachable @@ -57,7 +57,7 @@ if i32.const 0 i32.const 24 - i32.const 181 + i32.const 179 i32.const 13 call $~lib/builtins/abort unreachable @@ -115,7 +115,7 @@ if i32.const 0 i32.const 24 - i32.const 467 + i32.const 465 i32.const 13 call $~lib/builtins/abort unreachable @@ -138,7 +138,7 @@ if i32.const 0 i32.const 24 - i32.const 172 + i32.const 170 i32.const 13 call $~lib/builtins/abort unreachable @@ -161,7 +161,7 @@ if i32.const 0 i32.const 24 - i32.const 162 + i32.const 160 i32.const 13 call $~lib/builtins/abort unreachable @@ -187,7 +187,7 @@ if i32.const 0 i32.const 24 - i32.const 262 + i32.const 260 i32.const 13 call $~lib/builtins/abort unreachable @@ -209,7 +209,7 @@ if i32.const 0 i32.const 24 - i32.const 264 + i32.const 262 i32.const 13 call $~lib/builtins/abort unreachable @@ -341,7 +341,7 @@ if i32.const 0 i32.const 24 - i32.const 197 + i32.const 195 i32.const 13 call $~lib/builtins/abort unreachable @@ -355,7 +355,7 @@ if i32.const 0 i32.const 24 - i32.const 199 + i32.const 197 i32.const 13 call $~lib/builtins/abort unreachable @@ -402,7 +402,7 @@ if i32.const 0 i32.const 24 - i32.const 217 + i32.const 215 i32.const 15 call $~lib/builtins/abort unreachable @@ -443,7 +443,7 @@ if i32.const 0 i32.const 24 - i32.const 230 + i32.const 228 i32.const 13 call $~lib/builtins/abort unreachable @@ -458,7 +458,7 @@ if i32.const 0 i32.const 24 - i32.const 231 + i32.const 229 i32.const 13 call $~lib/builtins/abort unreachable @@ -555,7 +555,7 @@ if i32.const 0 i32.const 24 - i32.const 374 + i32.const 372 i32.const 4 call $~lib/builtins/abort unreachable @@ -579,7 +579,7 @@ else i32.const 0 i32.const 24 - i32.const 391 + i32.const 389 i32.const 6 call $~lib/builtins/abort unreachable @@ -594,7 +594,7 @@ if i32.const 0 i32.const 24 - i32.const 395 + i32.const 393 i32.const 4 call $~lib/builtins/abort unreachable @@ -718,7 +718,7 @@ if i32.const 0 i32.const 24 - i32.const 461 + i32.const 459 i32.const 13 call $~lib/builtins/abort unreachable @@ -801,7 +801,7 @@ if i32.const 0 i32.const 24 - i32.const 331 + i32.const 329 i32.const 17 call $~lib/builtins/abort unreachable @@ -873,7 +873,7 @@ if i32.const 0 i32.const 24 - i32.const 346 + i32.const 344 i32.const 4 call $~lib/builtins/abort unreachable @@ -976,7 +976,7 @@ if i32.const 0 i32.const 24 - i32.const 490 + i32.const 488 i32.const 15 call $~lib/builtins/abort unreachable @@ -991,7 +991,7 @@ if i32.const 0 i32.const 24 - i32.const 492 + i32.const 490 i32.const 13 call $~lib/builtins/abort unreachable @@ -1020,7 +1020,7 @@ if i32.const 0 i32.const 24 - i32.const 454 + i32.const 452 i32.const 13 call $~lib/builtins/abort unreachable @@ -1044,7 +1044,7 @@ if i32.const 0 i32.const 24 - i32.const 503 + i32.const 501 i32.const 4 call $~lib/builtins/abort unreachable @@ -1078,7 +1078,7 @@ if i32.const 0 i32.const 24 - i32.const 642 + i32.const 640 i32.const 15 call $~lib/builtins/abort unreachable @@ -1184,7 +1184,7 @@ if i32.const 0 i32.const 24 - i32.const 597 + i32.const 595 i32.const 17 call $~lib/builtins/abort unreachable @@ -1232,7 +1232,7 @@ if i32.const 0 i32.const 24 - i32.const 608 + i32.const 606 i32.const 6 call $~lib/builtins/abort unreachable @@ -1262,7 +1262,7 @@ end i32.const 0 i32.const 24 - i32.const 619 + i32.const 617 i32.const 24 call $~lib/builtins/abort unreachable @@ -1284,7 +1284,7 @@ if i32.const 0 i32.const 24 - i32.const 626 + i32.const 624 i32.const 2 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/runtime/asrt.ts b/tests/compiler/runtime/asrt.ts index d33b3cf3f8..88899ab6f4 100644 --- a/tests/compiler/runtime/asrt.ts +++ b/tests/compiler/runtime/asrt.ts @@ -125,16 +125,17 @@ function getRight(block: Block): Block { // ├───────────────────────────────────────────────────────────────┤ │ │ // │ slMap[1] │ ◄─┤ │ // ├───────────────────────────────────────────────────────────────┤ u32 │ -// │ slMap[22] P │ ◄─┘ │ +// │ slMap[21] │ ◄─┘ │ // ╞═══════════════════════════════════════════════════════════════╡ usize // │ head[0] │ ◄────┤ // ├───────────────────────────────────────────────────────────────┤ │ // │ ... │ ◄────┤ // ├───────────────────────────────────────────────────────────────┤ │ -// │ head[736] │ ◄────┤ +// │ head[703] │ ◄────┤ // ╞═══════════════════════════════════════════════════════════════╡ │ // │ tailRef │ ◄────┘ // └───────────────────────────────────────────────────────────────┘ SIZE ┘ +// S: Small blocks map @unmanaged class Root { /** First level bitmap. */ flMap: usize; @@ -146,9 +147,6 @@ function getRight(block: Block): Block { @inline const SL_START = sizeof(); // @ts-ignore: decorator @inline const SL_END = SL_START + (FL_BITS << alignof()); -// ^ -// FIXME: 22 slMaps, what about SB? is it included in 22 or actually 23? - // @ts-ignore: decorator @inline const HL_START = (SL_END + AL_MASK) & ~AL_MASK; // @ts-ignore: decorator @@ -381,14 +379,16 @@ function addMemory(root: Root, start: usize, end: usize): bool { var tail = getTail(root); var tailInfo: usize = 0; if (tail) { // more memory - // assert(start >= changetype(tail) + BLOCK_OVERHEAD); // starts after tail (zero-sized used block) + assert(start >= changetype(tail) + BLOCK_OVERHEAD); // merge with current tail if adjacent if (start - BLOCK_OVERHEAD == changetype(tail)) { start -= BLOCK_OVERHEAD; tailInfo = tail.mmInfo; - } else if (DEBUG) { - assert(false); // make sure we don't do this, even though possible + } else { + // We don't do this, but a user might `memory.grow` manually + // leading to non-adjacent pages managed by TLSF. + if (DEBUG) assert(false); // FIXME: remove me } } else if (DEBUG) { // first memory diff --git a/tests/compiler/runtime/asrt.untouched.wat b/tests/compiler/runtime/asrt.untouched.wat index 9a8638e219..e0de51faac 100644 --- a/tests/compiler/runtime/asrt.untouched.wat +++ b/tests/compiler/runtime/asrt.untouched.wat @@ -40,7 +40,7 @@ if i32.const 0 i32.const 24 - i32.const 167 + i32.const 165 i32.const 13 call $~lib/builtins/abort unreachable @@ -68,7 +68,7 @@ if i32.const 0 i32.const 24 - i32.const 181 + i32.const 179 i32.const 13 call $~lib/builtins/abort unreachable @@ -139,7 +139,7 @@ if i32.const 0 i32.const 24 - i32.const 467 + i32.const 465 i32.const 13 call $~lib/builtins/abort unreachable @@ -164,7 +164,7 @@ if i32.const 0 i32.const 24 - i32.const 172 + i32.const 170 i32.const 13 call $~lib/builtins/abort unreachable @@ -188,7 +188,7 @@ if i32.const 0 i32.const 24 - i32.const 162 + i32.const 160 i32.const 13 call $~lib/builtins/abort unreachable @@ -218,7 +218,7 @@ if i32.const 0 i32.const 24 - i32.const 262 + i32.const 260 i32.const 13 call $~lib/builtins/abort unreachable @@ -243,7 +243,7 @@ if i32.const 0 i32.const 24 - i32.const 264 + i32.const 262 i32.const 13 call $~lib/builtins/abort unreachable @@ -391,7 +391,7 @@ if i32.const 0 i32.const 24 - i32.const 197 + i32.const 195 i32.const 13 call $~lib/builtins/abort unreachable @@ -406,7 +406,7 @@ if i32.const 0 i32.const 24 - i32.const 199 + i32.const 197 i32.const 13 call $~lib/builtins/abort unreachable @@ -460,7 +460,7 @@ if i32.const 0 i32.const 24 - i32.const 217 + i32.const 215 i32.const 15 call $~lib/builtins/abort unreachable @@ -510,7 +510,7 @@ if i32.const 0 i32.const 24 - i32.const 230 + i32.const 228 i32.const 13 call $~lib/builtins/abort unreachable @@ -526,7 +526,7 @@ if i32.const 0 i32.const 24 - i32.const 231 + i32.const 229 i32.const 13 call $~lib/builtins/abort unreachable @@ -637,7 +637,7 @@ if i32.const 0 i32.const 24 - i32.const 374 + i32.const 372 i32.const 4 call $~lib/builtins/abort unreachable @@ -668,7 +668,7 @@ if i32.const 0 i32.const 24 - i32.const 391 + i32.const 389 i32.const 6 call $~lib/builtins/abort unreachable @@ -684,7 +684,7 @@ if i32.const 0 i32.const 24 - i32.const 395 + i32.const 393 i32.const 4 call $~lib/builtins/abort unreachable @@ -872,7 +872,7 @@ if i32.const 0 i32.const 24 - i32.const 461 + i32.const 459 i32.const 13 call $~lib/builtins/abort unreachable @@ -888,7 +888,7 @@ if i32.const 0 i32.const 24 - i32.const 461 + i32.const 459 i32.const 13 call $~lib/builtins/abort unreachable @@ -993,7 +993,7 @@ if i32.const 0 i32.const 24 - i32.const 331 + i32.const 329 i32.const 17 call $~lib/builtins/abort unreachable @@ -1092,7 +1092,7 @@ if i32.const 0 i32.const 24 - i32.const 346 + i32.const 344 i32.const 4 call $~lib/builtins/abort unreachable @@ -1214,7 +1214,7 @@ if i32.const 0 i32.const 24 - i32.const 490 + i32.const 488 i32.const 15 call $~lib/builtins/abort unreachable @@ -1232,7 +1232,7 @@ if i32.const 0 i32.const 24 - i32.const 492 + i32.const 490 i32.const 13 call $~lib/builtins/abort unreachable @@ -1264,7 +1264,7 @@ if i32.const 0 i32.const 24 - i32.const 454 + i32.const 452 i32.const 13 call $~lib/builtins/abort unreachable @@ -1290,7 +1290,7 @@ if i32.const 0 i32.const 24 - i32.const 503 + i32.const 501 i32.const 4 call $~lib/builtins/abort unreachable @@ -1636,7 +1636,7 @@ if i32.const 0 i32.const 24 - i32.const 642 + i32.const 640 i32.const 15 call $~lib/builtins/abort unreachable @@ -1834,7 +1834,7 @@ if i32.const 0 i32.const 24 - i32.const 597 + i32.const 595 i32.const 17 call $~lib/builtins/abort unreachable @@ -1881,7 +1881,7 @@ if i32.const 0 i32.const 24 - i32.const 608 + i32.const 606 i32.const 6 call $~lib/builtins/abort unreachable @@ -1918,7 +1918,7 @@ if i32.const 0 i32.const 24 - i32.const 619 + i32.const 617 i32.const 24 call $~lib/builtins/abort unreachable @@ -1947,7 +1947,7 @@ if i32.const 0 i32.const 24 - i32.const 626 + i32.const 624 i32.const 2 call $~lib/builtins/abort unreachable From aee3a3e3a7a85d497aa000024308be739c98615b Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 15 Apr 2019 13:10:41 +0200 Subject: [PATCH 109/119] 16b alignment, cleanup --- tests/allocators/asrt/optimized.wat | 36 ++--- tests/allocators/asrt/untouched.wat | 130 ++++++++---------- tests/allocators/tlsf/untouched.wat | 29 ++-- tests/compiler/runtime-default.optimized.wat | 12 +- tests/compiler/runtime-default.untouched.wat | 6 +- tests/compiler/runtime/asrt.optimized.wat | 134 ++++++++++--------- tests/compiler/runtime/asrt.ts | 73 ++++------ tests/compiler/runtime/asrt.untouched.wat | 133 +++++++++--------- tests/compiler/runtime/flags.optimized.wat | 12 +- tests/compiler/runtime/flags.untouched.wat | 6 +- tests/compiler/std/runtime.optimized.wat | 12 +- tests/compiler/std/runtime.untouched.wat | 6 +- 12 files changed, 281 insertions(+), 308 deletions(-) diff --git a/tests/allocators/asrt/optimized.wat b/tests/allocators/asrt/optimized.wat index b3af32865f..772326049e 100644 --- a/tests/allocators/asrt/optimized.wat +++ b/tests/allocators/asrt/optimized.wat @@ -16,7 +16,7 @@ (func $../../compiler/runtime/asrt/setTail (; 0 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=2912 + i32.store offset=2784 ) (func $../../compiler/runtime/asrt/setSLMap (; 1 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 @@ -86,11 +86,11 @@ i32.const -4 i32.and local.tee $2 - i32.const 256 + i32.const 512 i32.lt_u if (result i32) local.get $2 - i32.const 8 + i32.const 16 i32.div_u local.set $4 i32.const 0 @@ -106,7 +106,7 @@ i32.xor local.set $4 local.get $3 - i32.const 7 + i32.const 8 i32.sub end local.set $3 @@ -247,11 +247,11 @@ i32.const -4 i32.and local.tee $2 - i32.const 256 + i32.const 512 i32.lt_u if (result i32) local.get $2 - i32.const 8 + i32.const 16 i32.div_u local.set $2 i32.const 0 @@ -267,7 +267,7 @@ i32.xor local.set $2 local.get $3 - i32.const 7 + i32.const 8 i32.sub end local.tee $3 @@ -315,7 +315,7 @@ local.get $2 block (result i32) local.get $0 - i32.load offset=2912 + i32.load offset=2784 local.tee $2 if local.get $1 @@ -379,9 +379,9 @@ (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 8 + i32.const 16 local.tee $3 - i32.const 68451 + i32.const 68323 i32.add i32.const -65536 i32.and @@ -414,7 +414,7 @@ loop $repeat|0 block $break|0 local.get $2 - i32.const 22 + i32.const 21 i32.ge_u br_if $break|0 local.get $0 @@ -450,9 +450,9 @@ end local.get $0 local.get $3 - i32.const 2923 + i32.const 2803 i32.add - i32.const -8 + i32.const -16 i32.and current_memory i32.const 16 @@ -463,11 +463,11 @@ (func $../../compiler/runtime/asrt/searchBlock (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 - i32.const 256 + i32.const 512 i32.lt_u if (result i32) local.get $1 - i32.const 8 + i32.const 16 i32.div_u else local.get $1 @@ -481,7 +481,7 @@ i32.xor local.set $1 local.get $2 - i32.const 7 + i32.const 8 i32.sub local.set $2 local.get $1 @@ -658,9 +658,9 @@ end local.get $2 local.get $0 - i32.const 7 + i32.const 15 i32.add - i32.const -8 + i32.const -16 i32.and local.tee $0 i32.const 16 diff --git a/tests/allocators/asrt/untouched.wat b/tests/allocators/asrt/untouched.wat index f0e31f7bed..151bba4ffc 100644 --- a/tests/allocators/asrt/untouched.wat +++ b/tests/allocators/asrt/untouched.wat @@ -15,9 +15,6 @@ (elem (i32.const 0) $null) (global $../../compiler/runtime/asrt/ROOT (mut i32) (i32.const 0)) (global $../../compiler/runtime/asrt/ACYCLIC_FLAG i32 (i32.const 0)) - (global $../../compiler/runtime/asrt/ROOTS (mut i32) (i32.const 0)) - (global $../../compiler/runtime/asrt/CUR (mut i32) (i32.const 0)) - (global $../../compiler/runtime/asrt/END (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 84)) (export "memory" (memory $0)) (export "memory.allocate" (func $assembly/index/memory.allocate)) @@ -25,17 +22,17 @@ (func $../../compiler/runtime/asrt/setTail (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=2912 + i32.store offset=2784 ) (func $../../compiler/runtime/asrt/setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 - i32.const 22 + i32.const 21 i32.lt_u i32.eqz if i32.const 0 i32.const 24 - i32.const 165 + i32.const 164 i32.const 13 call $~lib/builtins/abort unreachable @@ -50,7 +47,7 @@ ) (func $../../compiler/runtime/asrt/setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 - i32.const 22 + i32.const 21 i32.lt_u if (result i32) local.get $2 @@ -63,7 +60,7 @@ if i32.const 0 i32.const 24 - i32.const 179 + i32.const 178 i32.const 13 call $~lib/builtins/abort unreachable @@ -82,7 +79,7 @@ ) (func $../../compiler/runtime/asrt/getTail (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load offset=2912 + i32.load offset=2784 ) (func $../../compiler/runtime/asrt/getRight (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -99,7 +96,7 @@ if i32.const 0 i32.const 24 - i32.const 112 + i32.const 111 i32.const 13 call $~lib/builtins/abort unreachable @@ -119,7 +116,7 @@ if i32.const 0 i32.const 24 - i32.const 114 + i32.const 113 i32.const 13 call $~lib/builtins/abort unreachable @@ -134,7 +131,7 @@ if i32.const 0 i32.const 24 - i32.const 467 + i32.const 465 i32.const 13 call $~lib/builtins/abort unreachable @@ -146,7 +143,7 @@ ) (func $../../compiler/runtime/asrt/getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 - i32.const 22 + i32.const 21 i32.lt_u if (result i32) local.get $2 @@ -159,7 +156,7 @@ if i32.const 0 i32.const 24 - i32.const 170 + i32.const 169 i32.const 13 call $~lib/builtins/abort unreachable @@ -177,13 +174,13 @@ ) (func $../../compiler/runtime/asrt/getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 - i32.const 22 + i32.const 21 i32.lt_u i32.eqz if i32.const 0 i32.const 24 - i32.const 160 + i32.const 159 i32.const 13 call $~lib/builtins/abort unreachable @@ -213,7 +210,7 @@ if i32.const 0 i32.const 24 - i32.const 260 + i32.const 259 i32.const 13 call $~lib/builtins/abort unreachable @@ -238,19 +235,19 @@ if i32.const 0 i32.const 24 - i32.const 262 + i32.const 261 i32.const 13 call $~lib/builtins/abort unreachable end local.get $3 - i32.const 256 + i32.const 512 i32.lt_u if i32.const 0 local.set $4 local.get $3 - i32.const 8 + i32.const 16 i32.div_u local.set $5 else @@ -268,7 +265,7 @@ i32.xor local.set $5 local.get $4 - i32.const 8 + i32.const 9 i32.const 1 i32.sub i32.sub @@ -349,7 +346,7 @@ if i32.const 0 i32.const 24 - i32.const 103 + i32.const 102 i32.const 13 call $~lib/builtins/abort unreachable @@ -364,7 +361,7 @@ if i32.const 0 i32.const 24 - i32.const 105 + i32.const 104 i32.const 13 call $~lib/builtins/abort unreachable @@ -386,7 +383,7 @@ if i32.const 0 i32.const 24 - i32.const 195 + i32.const 194 i32.const 13 call $~lib/builtins/abort unreachable @@ -401,7 +398,7 @@ if i32.const 0 i32.const 24 - i32.const 197 + i32.const 196 i32.const 13 call $~lib/builtins/abort unreachable @@ -455,7 +452,7 @@ if i32.const 0 i32.const 24 - i32.const 215 + i32.const 214 i32.const 15 call $~lib/builtins/abort unreachable @@ -505,7 +502,7 @@ if i32.const 0 i32.const 24 - i32.const 228 + i32.const 227 i32.const 13 call $~lib/builtins/abort unreachable @@ -521,7 +518,7 @@ if i32.const 0 i32.const 24 - i32.const 229 + i32.const 228 i32.const 13 call $~lib/builtins/abort unreachable @@ -532,13 +529,13 @@ local.get $1 i32.store local.get $7 - i32.const 256 + i32.const 512 i32.lt_u if i32.const 0 local.set $8 local.get $7 - i32.const 8 + i32.const 16 i32.div_u local.set $9 else @@ -556,7 +553,7 @@ i32.xor local.set $9 local.get $8 - i32.const 8 + i32.const 9 i32.const 1 i32.sub i32.sub @@ -614,7 +611,7 @@ i32.le_u if (result i32) local.get $1 - i32.const 7 + i32.const 15 i32.and i32.eqz else @@ -622,7 +619,7 @@ end if (result i32) local.get $2 - i32.const 7 + i32.const 15 i32.and i32.eqz else @@ -632,7 +629,7 @@ if i32.const 0 i32.const 24 - i32.const 372 + i32.const 371 i32.const 4 call $~lib/builtins/abort unreachable @@ -653,8 +650,8 @@ if i32.const 0 i32.const 24 - i32.const 382 - i32.const 4 + i32.const 381 + i32.const 15 call $~lib/builtins/abort unreachable end @@ -672,28 +669,19 @@ i32.load local.set $4 else - i32.const 0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 391 - i32.const 17 - call $~lib/builtins/abort - unreachable - end + nop end else local.get $1 local.get $0 - i32.const 2916 + i32.const 2788 i32.add i32.ge_u i32.eqz if i32.const 0 i32.const 24 - i32.const 395 + i32.const 393 i32.const 4 call $~lib/builtins/abort unreachable @@ -764,9 +752,9 @@ (local $4 i32) (local $5 i32) global.get $~lib/memory/HEAP_BASE - i32.const 7 + i32.const 15 i32.add - i32.const 7 + i32.const 15 i32.const -1 i32.xor i32.and @@ -774,7 +762,7 @@ current_memory local.set $1 local.get $0 - i32.const 2916 + i32.const 2788 i32.add i32.const 65535 i32.add @@ -814,7 +802,7 @@ local.set $4 loop $repeat|0 local.get $4 - i32.const 22 + i32.const 21 i32.lt_u i32.eqz br_if $break|0 @@ -858,11 +846,11 @@ end local.get $3 local.get $0 - i32.const 2916 + i32.const 2788 i32.add - i32.const 7 + i32.const 15 i32.add - i32.const 7 + i32.const 15 i32.const -1 i32.xor i32.and @@ -881,7 +869,7 @@ if i32.const 0 i32.const 24 - i32.const 461 + i32.const 459 i32.const 13 call $~lib/builtins/abort unreachable @@ -897,7 +885,7 @@ if i32.const 0 i32.const 24 - i32.const 461 + i32.const 459 i32.const 13 call $~lib/builtins/abort unreachable @@ -912,13 +900,13 @@ (local $5 i32) (local $6 i32) local.get $1 - i32.const 256 + i32.const 512 i32.lt_u if i32.const 0 local.set $2 local.get $1 - i32.const 8 + i32.const 16 i32.div_u local.set $3 else @@ -936,7 +924,7 @@ i32.xor local.set $3 local.get $2 - i32.const 8 + i32.const 9 i32.const 1 i32.sub i32.sub @@ -1002,7 +990,7 @@ if i32.const 0 i32.const 24 - i32.const 329 + i32.const 328 i32.const 17 call $~lib/builtins/abort unreachable @@ -1091,7 +1079,7 @@ i32.ne if (result i32) local.get $2 - i32.const 7 + i32.const 15 i32.and i32.eqz else @@ -1101,7 +1089,7 @@ if i32.const 0 i32.const 24 - i32.const 344 + i32.const 343 i32.const 4 call $~lib/builtins/abort unreachable @@ -1190,9 +1178,9 @@ unreachable end local.get $0 - i32.const 7 + i32.const 15 i32.add - i32.const 7 + i32.const 15 i32.const -1 i32.xor i32.and @@ -1223,7 +1211,7 @@ if i32.const 0 i32.const 24 - i32.const 490 + i32.const 488 i32.const 15 call $~lib/builtins/abort unreachable @@ -1241,7 +1229,7 @@ if i32.const 0 i32.const 24 - i32.const 492 + i32.const 490 i32.const 13 call $~lib/builtins/abort unreachable @@ -1277,8 +1265,8 @@ if i32.const 0 i32.const 24 - i32.const 454 - i32.const 13 + i32.const 452 + i32.const 2 call $~lib/builtins/abort unreachable end @@ -1296,14 +1284,14 @@ local.get $0 if local.get $0 - i32.const 7 + i32.const 15 i32.and i32.eqz i32.eqz if i32.const 0 i32.const 24 - i32.const 503 + i32.const 501 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/allocators/tlsf/untouched.wat b/tests/allocators/tlsf/untouched.wat index 093089a860..de1a3ea700 100644 --- a/tests/allocators/tlsf/untouched.wat +++ b/tests/allocators/tlsf/untouched.wat @@ -152,7 +152,7 @@ if i32.const 0 i32.const 72 - i32.const 454 + i32.const 452 i32.const 2 call $~lib/builtins/abort unreachable @@ -688,7 +688,7 @@ if local.get $1 local.get $3 - i32.const 4 + i32.const 8 i32.add i32.ge_u i32.eqz @@ -713,17 +713,6 @@ local.get $3 i32.load local.set $4 - else - i32.const 0 - i32.eqz - if - i32.const 0 - i32.const 72 - i32.const 415 - i32.const 8 - call $~lib/builtins/abort - unreachable - end end else local.get $1 @@ -735,7 +724,7 @@ if i32.const 0 i32.const 72 - i32.const 419 + i32.const 417 i32.const 6 call $~lib/builtins/abort unreachable @@ -806,7 +795,7 @@ if i32.const 0 i32.const 72 - i32.const 448 + i32.const 446 i32.const 2 call $~lib/builtins/abort unreachable @@ -822,7 +811,7 @@ if i32.const 0 i32.const 72 - i32.const 448 + i32.const 446 i32.const 2 call $~lib/builtins/abort unreachable @@ -1248,7 +1237,7 @@ if (result i32) i32.const 0 i32.const 72 - i32.const 509 + i32.const 507 i32.const 12 call $~lib/builtins/abort unreachable @@ -1269,7 +1258,7 @@ if i32.const 0 i32.const 72 - i32.const 512 + i32.const 510 i32.const 2 call $~lib/builtins/abort unreachable @@ -1298,7 +1287,7 @@ if i32.const 0 i32.const 72 - i32.const 521 + i32.const 519 i32.const 4 call $~lib/builtins/abort unreachable @@ -1322,7 +1311,7 @@ if i32.const 0 i32.const 72 - i32.const 526 + i32.const 524 i32.const 6 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/runtime-default.optimized.wat b/tests/compiler/runtime-default.optimized.wat index e8b4743a6b..8b2edc44c1 100644 --- a/tests/compiler/runtime-default.optimized.wat +++ b/tests/compiler/runtime-default.optimized.wat @@ -644,13 +644,13 @@ call $~lib/builtins/abort unreachable end - i32.const 2912 - i32.load + local.get $0 + i32.load offset=2912 local.tee $3 if local.get $1 local.get $3 - i32.const 4 + i32.const 8 i32.add i32.lt_u if @@ -724,9 +724,9 @@ local.tee $2 i32.const 2 i32.store - i32.const 2912 + local.get $0 local.get $2 - i32.store + i32.store offset=2912 local.get $0 local.get $1 call $~lib/allocator/tlsf/Root#insert @@ -942,7 +942,7 @@ local.set $2 i32.const 280 global.set $~lib/allocator/tlsf/ROOT - i32.const 2912 + i32.const 3192 i32.const 0 i32.store i32.const 280 diff --git a/tests/compiler/runtime-default.untouched.wat b/tests/compiler/runtime-default.untouched.wat index 2616fb6ccf..23708aa145 100644 --- a/tests/compiler/runtime-default.untouched.wat +++ b/tests/compiler/runtime-default.untouched.wat @@ -115,7 +115,7 @@ i32.shl ) (func $~lib/allocator/tlsf/Root#set:tailRef (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 0 + local.get $0 local.get $1 i32.store offset=2912 ) @@ -173,7 +173,7 @@ i32.store offset=96 ) (func $~lib/allocator/tlsf/Root#get:tailRef (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 + local.get $0 i32.load offset=2912 ) (func $~lib/allocator/tlsf/Block#get:right (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -760,7 +760,7 @@ if local.get $1 local.get $3 - i32.const 4 + i32.const 8 i32.add i32.ge_u i32.eqz diff --git a/tests/compiler/runtime/asrt.optimized.wat b/tests/compiler/runtime/asrt.optimized.wat index 0789717420..045553de45 100644 --- a/tests/compiler/runtime/asrt.optimized.wat +++ b/tests/compiler/runtime/asrt.optimized.wat @@ -15,8 +15,8 @@ (data (i32.const 56) "\10\00\00\00\1c") (data (i32.const 72) "~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") (global $runtime/asrt/ROOT (mut i32) (i32.const 0)) - (global $runtime/asrt/ROOTS (mut i32) (i32.const 0)) (global $runtime/asrt/CUR (mut i32) (i32.const 0)) + (global $runtime/asrt/ROOTS (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "__mm_allocate" (func $runtime/asrt/__mm_allocate)) (export "__mm_free" (func $runtime/asrt/__mm_free)) @@ -26,12 +26,12 @@ (export "__gc_collect" (func $runtime/asrt/collectCycles)) (func $runtime/asrt/setSLMap (; 1 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 - i32.const 22 + i32.const 21 i32.ge_u if i32.const 0 i32.const 24 - i32.const 165 + i32.const 164 i32.const 13 call $~lib/builtins/abort unreachable @@ -50,14 +50,14 @@ i32.lt_u i32.const 0 local.get $1 - i32.const 22 + i32.const 21 i32.lt_u select i32.eqz if i32.const 0 i32.const 24 - i32.const 179 + i32.const 178 i32.const 13 call $~lib/builtins/abort unreachable @@ -85,7 +85,7 @@ if i32.const 0 i32.const 24 - i32.const 112 + i32.const 111 i32.const 13 call $~lib/builtins/abort unreachable @@ -102,7 +102,7 @@ if i32.const 0 i32.const 24 - i32.const 114 + i32.const 113 i32.const 13 call $~lib/builtins/abort unreachable @@ -131,14 +131,14 @@ i32.lt_u i32.const 0 local.get $1 - i32.const 22 + i32.const 21 i32.lt_u select i32.eqz if i32.const 0 i32.const 24 - i32.const 170 + i32.const 169 i32.const 13 call $~lib/builtins/abort unreachable @@ -156,12 +156,12 @@ ) (func $runtime/asrt/getSLMap (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 - i32.const 22 + i32.const 21 i32.ge_u if i32.const 0 i32.const 24 - i32.const 160 + i32.const 159 i32.const 13 call $~lib/builtins/abort unreachable @@ -187,7 +187,7 @@ if i32.const 0 i32.const 24 - i32.const 260 + i32.const 259 i32.const 13 call $~lib/builtins/abort unreachable @@ -209,17 +209,17 @@ if i32.const 0 i32.const 24 - i32.const 262 + i32.const 261 i32.const 13 call $~lib/builtins/abort unreachable end local.get $2 - i32.const 256 + i32.const 512 i32.lt_u if (result i32) local.get $2 - i32.const 8 + i32.const 16 i32.div_u local.set $4 i32.const 0 @@ -235,7 +235,7 @@ i32.xor local.set $4 local.get $3 - i32.const 7 + i32.const 8 i32.sub end local.set $3 @@ -310,7 +310,7 @@ if i32.const 0 i32.const 24 - i32.const 103 + i32.const 102 i32.const 13 call $~lib/builtins/abort unreachable @@ -324,7 +324,7 @@ if i32.const 0 i32.const 24 - i32.const 105 + i32.const 104 i32.const 13 call $~lib/builtins/abort unreachable @@ -341,7 +341,7 @@ if i32.const 0 i32.const 24 - i32.const 195 + i32.const 194 i32.const 13 call $~lib/builtins/abort unreachable @@ -355,7 +355,7 @@ if i32.const 0 i32.const 24 - i32.const 197 + i32.const 196 i32.const 13 call $~lib/builtins/abort unreachable @@ -402,7 +402,7 @@ if i32.const 0 i32.const 24 - i32.const 215 + i32.const 214 i32.const 15 call $~lib/builtins/abort unreachable @@ -443,7 +443,7 @@ if i32.const 0 i32.const 24 - i32.const 228 + i32.const 227 i32.const 13 call $~lib/builtins/abort unreachable @@ -458,7 +458,7 @@ if i32.const 0 i32.const 24 - i32.const 229 + i32.const 228 i32.const 13 call $~lib/builtins/abort unreachable @@ -470,11 +470,11 @@ i32.store local.get $0 local.get $2 - i32.const 256 + i32.const 512 i32.lt_u if (result i32) local.get $2 - i32.const 8 + i32.const 16 i32.div_u local.set $2 i32.const 0 @@ -490,7 +490,7 @@ i32.xor local.set $2 local.get $3 - i32.const 7 + i32.const 8 i32.sub end local.tee $4 @@ -537,12 +537,12 @@ (local $3 i32) (local $4 i32) local.get $2 - i32.const 7 + i32.const 15 i32.and i32.eqz i32.const 0 local.get $1 - i32.const 7 + i32.const 15 i32.and i32.eqz i32.const 0 @@ -555,40 +555,46 @@ if i32.const 0 i32.const 24 - i32.const 372 + i32.const 371 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=2912 + i32.load offset=2784 local.tee $3 if + local.get $1 + local.get $3 + i32.const 16 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 381 + i32.const 15 + call $~lib/builtins/abort + unreachable + end local.get $1 i32.const 16 i32.sub local.get $3 i32.eq - if (result i32) + if local.get $3 i32.load local.set $4 local.get $1 i32.const 16 i32.sub - else - i32.const 0 - i32.const 24 - i32.const 389 - i32.const 6 - call $~lib/builtins/abort - unreachable + local.set $1 end - local.set $1 else local.get $1 local.get $0 - i32.const 2916 + i32.const 2788 i32.add i32.lt_u if @@ -636,7 +642,7 @@ i32.store local.get $0 local.get $2 - i32.store offset=2912 + i32.store offset=2784 local.get $0 local.get $1 call $runtime/asrt/insertBlock @@ -661,20 +667,20 @@ if unreachable end - i32.const 104 + i32.const 112 i32.const 0 i32.store - i32.const 3016 + i32.const 2896 i32.const 0 i32.store i32.const 0 local.set $0 loop $repeat|0 local.get $0 - i32.const 22 + i32.const 21 i32.lt_u if - i32.const 104 + i32.const 112 local.get $0 i32.const 0 call $runtime/asrt/setSLMap @@ -685,7 +691,7 @@ i32.const 32 i32.lt_u if - i32.const 104 + i32.const 112 local.get $0 local.get $1 i32.const 0 @@ -704,13 +710,13 @@ br $repeat|0 end end - i32.const 104 - i32.const 3024 + i32.const 112 + i32.const 2912 current_memory i32.const 16 i32.shl call $runtime/asrt/addMemory - i32.const 104 + i32.const 112 ) (func $runtime/asrt/ffs (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -730,17 +736,17 @@ (local $2 i32) (local $3 i32) local.get $1 - i32.const 256 + i32.const 512 i32.lt_u if (result i32) local.get $1 - i32.const 8 + i32.const 16 i32.div_u else local.get $1 call $runtime/asrt/fls local.tee $3 - i32.const 7 + i32.const 8 i32.sub local.set $2 local.get $1 @@ -801,7 +807,7 @@ if i32.const 0 i32.const 24 - i32.const 329 + i32.const 328 i32.const 17 call $~lib/builtins/abort unreachable @@ -863,7 +869,7 @@ i32.and if (result i32) local.get $2 - i32.const 7 + i32.const 15 i32.and i32.eqz else @@ -873,7 +879,7 @@ if i32.const 0 i32.const 24 - i32.const 344 + i32.const 343 i32.const 4 call $~lib/builtins/abort unreachable @@ -950,9 +956,9 @@ end local.get $1 local.get $0 - i32.const 7 + i32.const 15 i32.add - i32.const -8 + i32.const -16 i32.and local.tee $0 i32.const 16 @@ -1021,7 +1027,7 @@ i32.const 0 i32.const 24 i32.const 452 - i32.const 13 + i32.const 2 call $~lib/builtins/abort unreachable end @@ -1039,7 +1045,7 @@ local.get $0 if local.get $0 - i32.const 7 + i32.const 15 i32.and if i32.const 0 @@ -1078,7 +1084,7 @@ if i32.const 0 i32.const 24 - i32.const 640 + i32.const 624 i32.const 15 call $~lib/builtins/abort unreachable @@ -1184,7 +1190,7 @@ if i32.const 0 i32.const 24 - i32.const 595 + i32.const 579 i32.const 17 call $~lib/builtins/abort unreachable @@ -1232,7 +1238,7 @@ if i32.const 0 i32.const 24 - i32.const 606 + i32.const 590 i32.const 6 call $~lib/builtins/abort unreachable @@ -1262,7 +1268,7 @@ end i32.const 0 i32.const 24 - i32.const 617 + i32.const 601 i32.const 24 call $~lib/builtins/abort unreachable @@ -1284,7 +1290,7 @@ if i32.const 0 i32.const 24 - i32.const 624 + i32.const 608 i32.const 2 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/runtime/asrt.ts b/tests/compiler/runtime/asrt.ts index 88899ab6f4..3ab6111b60 100644 --- a/tests/compiler/runtime/asrt.ts +++ b/tests/compiler/runtime/asrt.ts @@ -1,13 +1,12 @@ // An experimental standalone AssemblyScript runtime based on TLSF and PureRC. // @ts-ignore: decorator -@inline -const DEBUG = true; +@inline const DEBUG = true; // Alignment guarantees // @ts-ignore: decorator -@inline const AL_BITS: u32 = 3; // 8 bytes +@inline const AL_BITS: u32 = 4; // 16 bytes to fit up to v128 // @ts-ignore: decorator @inline const AL_SIZE: usize = 1 << AL_BITS; // @ts-ignore: decorator @@ -115,7 +114,7 @@ function getRight(block: Block): Block { return right; } -// ╒════════════════ Root structure layout (32-bit) ═══════════════╕ +// ╒═════════════════════ Root layout (32-bit) ════════════════════╕ // 3 2 1 // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits // ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ ┐ @@ -133,7 +132,7 @@ function getRight(block: Block): Block { // ├───────────────────────────────────────────────────────────────┤ │ // │ head[703] │ ◄────┤ // ╞═══════════════════════════════════════════════════════════════╡ │ -// │ tailRef │ ◄────┘ +// │ tail │ ◄────┘ // └───────────────────────────────────────────────────────────────┘ SIZE ┘ // S: Small blocks map @unmanaged class Root { @@ -379,7 +378,7 @@ function addMemory(root: Root, start: usize, end: usize): bool { var tail = getTail(root); var tailInfo: usize = 0; if (tail) { // more memory - assert(start >= changetype(tail) + BLOCK_OVERHEAD); + if (DEBUG) assert(start >= changetype(tail) + BLOCK_OVERHEAD); // merge with current tail if adjacent if (start - BLOCK_OVERHEAD == changetype(tail)) { @@ -388,7 +387,6 @@ function addMemory(root: Root, start: usize, end: usize): bool { } else { // We don't do this, but a user might `memory.grow` manually // leading to non-adjacent pages managed by TLSF. - if (DEBUG) assert(false); // FIXME: remove me } } else if (DEBUG) { // first memory @@ -451,7 +449,7 @@ function initialize(): Root { function freeBlock(root: Root, block: Block): void { var blockInfo = block.mmInfo; - if (DEBUG) assert(!(blockInfo & FREE)); // must be used + assert(!(blockInfo & FREE)); // must be used (user might call through to this) block.mmInfo = blockInfo | FREE; insertBlock(root, block); } @@ -500,7 +498,7 @@ function __mm_allocate(size: usize): usize { @global @unsafe function __mm_free(data: usize): void { if (data) { - assert(!(data & AL_MASK)); // must be aligned + assert(!(data & AL_MASK)); // must be aligned (user might call through to this) let root = ROOT; if (root) freeBlock(root, changetype(data - BLOCK_OVERHEAD)); } @@ -523,20 +521,15 @@ const ACYCLIC_FLAG: u32 = 0; // B: buffered // @ts-ignore: decorator -@inline -const BUFFERED_MASK: u32 = 1 << (sizeof() * 8 - 1); +@inline const BUFFERED_MASK: u32 = 1 << (sizeof() * 8 - 1); // @ts-ignore: decorator -@inline -const COLOR_BITS = 3; +@inline const COLOR_BITS = 3; // @ts-ignore: decorator -@inline -const COLOR_SHIFT: u32 = ctz(BUFFERED_MASK) - COLOR_BITS; +@inline const COLOR_SHIFT: u32 = ctz(BUFFERED_MASK) - COLOR_BITS; // @ts-ignore: decorator -@inline -const COLOR_MASK: u32 = ((1 << COLOR_BITS) - 1) << COLOR_SHIFT; +@inline const COLOR_MASK: u32 = ((1 << COLOR_BITS) - 1) << COLOR_SHIFT; // @ts-ignore: decorator -@inline -const REFCOUNT_MASK: u32 = (1 << COLOR_SHIFT) - 1; +@inline const REFCOUNT_MASK: u32 = (1 << COLOR_SHIFT) - 1; // ╒════════╤═══════════════════ Colors ═══════════════════════════╕ // │ Color │ Meaning │ @@ -551,39 +544,28 @@ const REFCOUNT_MASK: u32 = (1 << COLOR_SHIFT) - 1; // Acyclic detection has been decoupled, hence no GREEN. // @ts-ignore: decorator -@inline -const COLOR_BLACK: u32 = 0 << COLOR_SHIFT; +@inline const COLOR_BLACK: u32 = 0 << COLOR_SHIFT; // @ts-ignore: decorator -@inline -const COLOR_GRAY: u32 = 1 << COLOR_SHIFT; +@inline const COLOR_GRAY: u32 = 1 << COLOR_SHIFT; // @ts-ignore: decorator -@inline -const COLOR_WHITE: u32 = 2 << COLOR_SHIFT; +@inline const COLOR_WHITE: u32 = 2 << COLOR_SHIFT; // @ts-ignore: decorator -@inline -const COLOR_PURPLE: u32 = 3 << COLOR_SHIFT; +@inline const COLOR_PURPLE: u32 = 3 << COLOR_SHIFT; // @ts-ignore: decorator -@inline -const COLOR_RED: u32 = 4 << COLOR_SHIFT; +@inline const COLOR_RED: u32 = 4 << COLOR_SHIFT; // @ts-ignore: decorator -@inline -const COLOR_ORANGE: u32 = 5 << COLOR_SHIFT; +@inline const COLOR_ORANGE: u32 = 5 << COLOR_SHIFT; // @ts-ignore: decorator -@inline -const VISIT_DECREMENT = 1; // guard 0 +@inline const VISIT_DECREMENT = 1; // guard 0 // @ts-ignore: decorator -@inline -const VISIT_MARKGRAY = 2; +@inline const VISIT_MARKGRAY = 2; // @ts-ignore: decorator -@inline -const VISIT_SCAN = 3; +@inline const VISIT_SCAN = 3; // @ts-ignore: decorator -@inline -const VISIT_SCANBLACK = 4; +@inline const VISIT_SCANBLACK = 4; // @ts-ignore: decorator -@inline -const VISIT_COLLECTWHITE = 5; +@inline const VISIT_COLLECTWHITE = 5; // @ts-ignore: decorator @global @@ -652,11 +634,14 @@ function decrement(s: Block): void { } /** Buffer of possible roots. */ -var ROOTS: usize; +// @ts-ignore: decorator +@lazy var ROOTS: usize; /** Current absolute offset into the `ROOTS` buffer. */ -var CUR: usize = 0; +// @ts-ignore: decorator +@lazy var CUR: usize = 0; /** Current absolute end offset into the `ROOTS` buffer. */ -var END: usize = 0; +// @ts-ignore: decorator +@lazy var END: usize = 0; /** Appends a block to possible roots. */ function appendRoot(s: Block): void { diff --git a/tests/compiler/runtime/asrt.untouched.wat b/tests/compiler/runtime/asrt.untouched.wat index e0de51faac..00f302ec64 100644 --- a/tests/compiler/runtime/asrt.untouched.wat +++ b/tests/compiler/runtime/asrt.untouched.wat @@ -16,9 +16,9 @@ (elem (i32.const 0) $null) (global $runtime/asrt/ROOT (mut i32) (i32.const 0)) (global $runtime/asrt/ACYCLIC_FLAG i32 (i32.const 0)) - (global $runtime/asrt/ROOTS (mut i32) (i32.const 0)) (global $runtime/asrt/CUR (mut i32) (i32.const 0)) (global $runtime/asrt/END (mut i32) (i32.const 0)) + (global $runtime/asrt/ROOTS (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 100)) (export "memory" (memory $0)) (export "__mm_allocate" (func $runtime/asrt/__mm_allocate)) @@ -30,17 +30,17 @@ (func $runtime/asrt/setTail (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=2912 + i32.store offset=2784 ) (func $runtime/asrt/setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 - i32.const 22 + i32.const 21 i32.lt_u i32.eqz if i32.const 0 i32.const 24 - i32.const 165 + i32.const 164 i32.const 13 call $~lib/builtins/abort unreachable @@ -55,7 +55,7 @@ ) (func $runtime/asrt/setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 - i32.const 22 + i32.const 21 i32.lt_u if (result i32) local.get $2 @@ -68,7 +68,7 @@ if i32.const 0 i32.const 24 - i32.const 179 + i32.const 178 i32.const 13 call $~lib/builtins/abort unreachable @@ -87,7 +87,7 @@ ) (func $runtime/asrt/getTail (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load offset=2912 + i32.load offset=2784 ) (func $runtime/asrt/getRight (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -104,7 +104,7 @@ if i32.const 0 i32.const 24 - i32.const 112 + i32.const 111 i32.const 13 call $~lib/builtins/abort unreachable @@ -124,7 +124,7 @@ if i32.const 0 i32.const 24 - i32.const 114 + i32.const 113 i32.const 13 call $~lib/builtins/abort unreachable @@ -151,7 +151,7 @@ ) (func $runtime/asrt/getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 - i32.const 22 + i32.const 21 i32.lt_u if (result i32) local.get $2 @@ -164,7 +164,7 @@ if i32.const 0 i32.const 24 - i32.const 170 + i32.const 169 i32.const 13 call $~lib/builtins/abort unreachable @@ -182,13 +182,13 @@ ) (func $runtime/asrt/getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 - i32.const 22 + i32.const 21 i32.lt_u i32.eqz if i32.const 0 i32.const 24 - i32.const 160 + i32.const 159 i32.const 13 call $~lib/builtins/abort unreachable @@ -218,7 +218,7 @@ if i32.const 0 i32.const 24 - i32.const 260 + i32.const 259 i32.const 13 call $~lib/builtins/abort unreachable @@ -243,19 +243,19 @@ if i32.const 0 i32.const 24 - i32.const 262 + i32.const 261 i32.const 13 call $~lib/builtins/abort unreachable end local.get $3 - i32.const 256 + i32.const 512 i32.lt_u if i32.const 0 local.set $4 local.get $3 - i32.const 8 + i32.const 16 i32.div_u local.set $5 else @@ -273,7 +273,7 @@ i32.xor local.set $5 local.get $4 - i32.const 8 + i32.const 9 i32.const 1 i32.sub i32.sub @@ -354,7 +354,7 @@ if i32.const 0 i32.const 24 - i32.const 103 + i32.const 102 i32.const 13 call $~lib/builtins/abort unreachable @@ -369,7 +369,7 @@ if i32.const 0 i32.const 24 - i32.const 105 + i32.const 104 i32.const 13 call $~lib/builtins/abort unreachable @@ -391,7 +391,7 @@ if i32.const 0 i32.const 24 - i32.const 195 + i32.const 194 i32.const 13 call $~lib/builtins/abort unreachable @@ -406,7 +406,7 @@ if i32.const 0 i32.const 24 - i32.const 197 + i32.const 196 i32.const 13 call $~lib/builtins/abort unreachable @@ -460,7 +460,7 @@ if i32.const 0 i32.const 24 - i32.const 215 + i32.const 214 i32.const 15 call $~lib/builtins/abort unreachable @@ -510,7 +510,7 @@ if i32.const 0 i32.const 24 - i32.const 228 + i32.const 227 i32.const 13 call $~lib/builtins/abort unreachable @@ -526,7 +526,7 @@ if i32.const 0 i32.const 24 - i32.const 229 + i32.const 228 i32.const 13 call $~lib/builtins/abort unreachable @@ -537,13 +537,13 @@ local.get $1 i32.store local.get $7 - i32.const 256 + i32.const 512 i32.lt_u if i32.const 0 local.set $8 local.get $7 - i32.const 8 + i32.const 16 i32.div_u local.set $9 else @@ -561,7 +561,7 @@ i32.xor local.set $9 local.get $8 - i32.const 8 + i32.const 9 i32.const 1 i32.sub i32.sub @@ -619,7 +619,7 @@ i32.le_u if (result i32) local.get $1 - i32.const 7 + i32.const 15 i32.and i32.eqz else @@ -627,7 +627,7 @@ end if (result i32) local.get $2 - i32.const 7 + i32.const 15 i32.and i32.eqz else @@ -637,7 +637,7 @@ if i32.const 0 i32.const 24 - i32.const 372 + i32.const 371 i32.const 4 call $~lib/builtins/abort unreachable @@ -649,6 +649,20 @@ local.set $4 local.get $3 if + local.get $1 + local.get $3 + i32.const 16 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 381 + i32.const 15 + call $~lib/builtins/abort + unreachable + end local.get $1 i32.const 16 i32.sub @@ -663,21 +677,12 @@ i32.load local.set $4 else - i32.const 0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 389 - i32.const 6 - call $~lib/builtins/abort - unreachable - end + nop end else local.get $1 local.get $0 - i32.const 2916 + i32.const 2788 i32.add i32.ge_u i32.eqz @@ -755,9 +760,9 @@ (local $4 i32) (local $5 i32) global.get $~lib/memory/HEAP_BASE - i32.const 7 + i32.const 15 i32.add - i32.const 7 + i32.const 15 i32.const -1 i32.xor i32.and @@ -765,7 +770,7 @@ current_memory local.set $1 local.get $0 - i32.const 2916 + i32.const 2788 i32.add i32.const 65535 i32.add @@ -805,7 +810,7 @@ local.set $4 loop $repeat|0 local.get $4 - i32.const 22 + i32.const 21 i32.lt_u i32.eqz br_if $break|0 @@ -849,11 +854,11 @@ end local.get $3 local.get $0 - i32.const 2916 + i32.const 2788 i32.add - i32.const 7 + i32.const 15 i32.add - i32.const 7 + i32.const 15 i32.const -1 i32.xor i32.and @@ -903,13 +908,13 @@ (local $5 i32) (local $6 i32) local.get $1 - i32.const 256 + i32.const 512 i32.lt_u if i32.const 0 local.set $2 local.get $1 - i32.const 8 + i32.const 16 i32.div_u local.set $3 else @@ -927,7 +932,7 @@ i32.xor local.set $3 local.get $2 - i32.const 8 + i32.const 9 i32.const 1 i32.sub i32.sub @@ -993,7 +998,7 @@ if i32.const 0 i32.const 24 - i32.const 329 + i32.const 328 i32.const 17 call $~lib/builtins/abort unreachable @@ -1082,7 +1087,7 @@ i32.ne if (result i32) local.get $2 - i32.const 7 + i32.const 15 i32.and i32.eqz else @@ -1092,7 +1097,7 @@ if i32.const 0 i32.const 24 - i32.const 344 + i32.const 343 i32.const 4 call $~lib/builtins/abort unreachable @@ -1181,9 +1186,9 @@ unreachable end local.get $0 - i32.const 7 + i32.const 15 i32.add - i32.const 7 + i32.const 15 i32.const -1 i32.xor i32.and @@ -1265,7 +1270,7 @@ i32.const 0 i32.const 24 i32.const 452 - i32.const 13 + i32.const 2 call $~lib/builtins/abort unreachable end @@ -1283,7 +1288,7 @@ local.get $0 if local.get $0 - i32.const 7 + i32.const 15 i32.and i32.eqz i32.eqz @@ -1636,7 +1641,7 @@ if i32.const 0 i32.const 24 - i32.const 640 + i32.const 624 i32.const 15 call $~lib/builtins/abort unreachable @@ -1834,7 +1839,7 @@ if i32.const 0 i32.const 24 - i32.const 595 + i32.const 579 i32.const 17 call $~lib/builtins/abort unreachable @@ -1881,7 +1886,7 @@ if i32.const 0 i32.const 24 - i32.const 606 + i32.const 590 i32.const 6 call $~lib/builtins/abort unreachable @@ -1918,7 +1923,7 @@ if i32.const 0 i32.const 24 - i32.const 617 + i32.const 601 i32.const 24 call $~lib/builtins/abort unreachable @@ -1947,7 +1952,7 @@ if i32.const 0 i32.const 24 - i32.const 624 + i32.const 608 i32.const 2 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/runtime/flags.optimized.wat b/tests/compiler/runtime/flags.optimized.wat index 3926438434..b72c35d892 100644 --- a/tests/compiler/runtime/flags.optimized.wat +++ b/tests/compiler/runtime/flags.optimized.wat @@ -1515,13 +1515,13 @@ call $~lib/builtins/abort unreachable end - i32.const 2912 - i32.load + local.get $0 + i32.load offset=2912 local.tee $3 if local.get $1 local.get $3 - i32.const 4 + i32.const 8 i32.add i32.lt_u if @@ -1595,9 +1595,9 @@ local.tee $2 i32.const 2 i32.store - i32.const 2912 + local.get $0 local.get $2 - i32.store + i32.store offset=2912 local.get $0 local.get $1 call $~lib/allocator/tlsf/Root#insert @@ -1813,7 +1813,7 @@ local.set $2 i32.const 656 global.set $~lib/allocator/tlsf/ROOT - i32.const 2912 + i32.const 3568 i32.const 0 i32.store i32.const 656 diff --git a/tests/compiler/runtime/flags.untouched.wat b/tests/compiler/runtime/flags.untouched.wat index 3ebb780a75..8f396002f6 100644 --- a/tests/compiler/runtime/flags.untouched.wat +++ b/tests/compiler/runtime/flags.untouched.wat @@ -863,7 +863,7 @@ i32.shl ) (func $~lib/allocator/tlsf/Root#set:tailRef (; 40 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 0 + local.get $0 local.get $1 i32.store offset=2912 ) @@ -921,7 +921,7 @@ i32.store offset=96 ) (func $~lib/allocator/tlsf/Root#get:tailRef (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 + local.get $0 i32.load offset=2912 ) (func $~lib/allocator/tlsf/Block#get:right (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -1508,7 +1508,7 @@ if local.get $1 local.get $3 - i32.const 4 + i32.const 8 i32.add i32.ge_u i32.eqz diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index c752ce5dd8..d2566dc84d 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -595,13 +595,13 @@ call $~lib/builtins/abort unreachable end - i32.const 2912 - i32.load + local.get $0 + i32.load offset=2912 local.tee $3 if local.get $1 local.get $3 - i32.const 4 + i32.const 8 i32.add i32.lt_u if @@ -675,9 +675,9 @@ local.tee $2 i32.const 2 i32.store - i32.const 2912 + local.get $0 local.get $2 - i32.store + i32.store offset=2912 local.get $0 local.get $1 call $~lib/allocator/tlsf/Root#insert @@ -893,7 +893,7 @@ local.set $2 i32.const 272 global.set $~lib/allocator/tlsf/ROOT - i32.const 2912 + i32.const 3184 i32.const 0 i32.store i32.const 272 diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 4990b120b8..7772d33566 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -70,7 +70,7 @@ end ) (func $~lib/allocator/tlsf/Root#set:tailRef (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 0 + local.get $0 local.get $1 i32.store offset=2912 ) @@ -128,7 +128,7 @@ i32.store offset=96 ) (func $~lib/allocator/tlsf/Root#get:tailRef (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 + local.get $0 i32.load offset=2912 ) (func $~lib/allocator/tlsf/Block#get:right (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -715,7 +715,7 @@ if local.get $1 local.get $3 - i32.const 4 + i32.const 8 i32.add i32.ge_u i32.eqz From ceffc18694d7c2fb3bd230f607dfacaec18ce860 Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 15 Apr 2019 13:37:18 +0200 Subject: [PATCH 110/119] implications of 16b alignment --- tests/allocators/asrt/optimized.wat | 42 ++++----- tests/allocators/asrt/untouched.wat | 100 +++++++++++++------- tests/compiler/runtime/asrt.optimized.wat | 80 ++++++++-------- tests/compiler/runtime/asrt.ts | 17 +++- tests/compiler/runtime/asrt.untouched.wat | 110 ++++++++++++++-------- 5 files changed, 206 insertions(+), 143 deletions(-) diff --git a/tests/allocators/asrt/optimized.wat b/tests/allocators/asrt/optimized.wat index 772326049e..adfc94e7ea 100644 --- a/tests/allocators/asrt/optimized.wat +++ b/tests/allocators/asrt/optimized.wat @@ -16,7 +16,7 @@ (func $../../compiler/runtime/asrt/setTail (; 0 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=2784 + i32.store offset=1504 ) (func $../../compiler/runtime/asrt/setSLMap (; 1 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 @@ -30,7 +30,7 @@ (func $../../compiler/runtime/asrt/setHead (; 2 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $1 - i32.const 5 + i32.const 4 i32.shl local.get $2 i32.add @@ -59,7 +59,7 @@ (func $../../compiler/runtime/asrt/getHead (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 - i32.const 5 + i32.const 4 i32.shl local.get $2 i32.add @@ -86,7 +86,7 @@ i32.const -4 i32.and local.tee $2 - i32.const 512 + i32.const 256 i32.lt_u if (result i32) local.get $2 @@ -99,14 +99,14 @@ local.get $2 call $../../compiler/runtime/asrt/fls local.tee $3 - i32.const 5 + i32.const 4 i32.sub i32.shr_u - i32.const 32 + i32.const 16 i32.xor local.set $4 local.get $3 - i32.const 8 + i32.const 7 i32.sub end local.set $3 @@ -247,7 +247,7 @@ i32.const -4 i32.and local.tee $2 - i32.const 512 + i32.const 256 i32.lt_u if (result i32) local.get $2 @@ -260,14 +260,14 @@ local.get $2 call $../../compiler/runtime/asrt/fls local.tee $3 - i32.const 5 + i32.const 4 i32.sub i32.shr_u - i32.const 32 + i32.const 16 i32.xor local.set $2 local.get $3 - i32.const 8 + i32.const 7 i32.sub end local.tee $3 @@ -315,7 +315,7 @@ local.get $2 block (result i32) local.get $0 - i32.load offset=2784 + i32.load offset=1504 local.tee $2 if local.get $1 @@ -381,7 +381,7 @@ (local $3 i32) i32.const 16 local.tee $3 - i32.const 68323 + i32.const 67043 i32.add i32.const -65536 i32.and @@ -414,7 +414,7 @@ loop $repeat|0 block $break|0 local.get $2 - i32.const 21 + i32.const 22 i32.ge_u br_if $break|0 local.get $0 @@ -426,7 +426,7 @@ loop $repeat|1 block $break|1 local.get $1 - i32.const 32 + i32.const 16 i32.ge_u br_if $break|1 local.get $0 @@ -450,7 +450,7 @@ end local.get $0 local.get $3 - i32.const 2803 + i32.const 1523 i32.add i32.const -16 i32.and @@ -463,7 +463,7 @@ (func $../../compiler/runtime/asrt/searchBlock (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 - i32.const 512 + i32.const 256 i32.lt_u if (result i32) local.get $1 @@ -474,18 +474,18 @@ local.get $1 call $../../compiler/runtime/asrt/fls local.tee $2 - i32.const 5 + i32.const 4 i32.sub i32.shr_u - i32.const 32 + i32.const 16 i32.xor local.set $1 local.get $2 - i32.const 8 + i32.const 7 i32.sub local.set $2 local.get $1 - i32.const 31 + i32.const 15 i32.lt_u if (result i32) local.get $1 diff --git a/tests/allocators/asrt/untouched.wat b/tests/allocators/asrt/untouched.wat index 151bba4ffc..b9d111da8d 100644 --- a/tests/allocators/asrt/untouched.wat +++ b/tests/allocators/asrt/untouched.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) @@ -22,11 +22,11 @@ (func $../../compiler/runtime/asrt/setTail (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=2784 + i32.store offset=1504 ) (func $../../compiler/runtime/asrt/setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 - i32.const 21 + i32.const 22 i32.lt_u i32.eqz if @@ -47,11 +47,11 @@ ) (func $../../compiler/runtime/asrt/setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 - i32.const 21 + i32.const 22 i32.lt_u if (result i32) local.get $2 - i32.const 32 + i32.const 16 i32.lt_u else i32.const 0 @@ -67,7 +67,7 @@ end local.get $0 local.get $1 - i32.const 32 + i32.const 16 i32.mul local.get $2 i32.add @@ -79,7 +79,7 @@ ) (func $../../compiler/runtime/asrt/getTail (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load offset=2784 + i32.load offset=1504 ) (func $../../compiler/runtime/asrt/getRight (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -131,7 +131,7 @@ if i32.const 0 i32.const 24 - i32.const 465 + i32.const 472 i32.const 13 call $~lib/builtins/abort unreachable @@ -143,11 +143,11 @@ ) (func $../../compiler/runtime/asrt/getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 - i32.const 21 + i32.const 22 i32.lt_u if (result i32) local.get $2 - i32.const 32 + i32.const 16 i32.lt_u else i32.const 0 @@ -163,7 +163,7 @@ end local.get $0 local.get $1 - i32.const 32 + i32.const 16 i32.mul local.get $2 i32.add @@ -174,7 +174,7 @@ ) (func $../../compiler/runtime/asrt/getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 - i32.const 21 + i32.const 22 i32.lt_u i32.eqz if @@ -241,7 +241,7 @@ unreachable end local.get $3 - i32.const 512 + i32.const 256 i32.lt_u if i32.const 0 @@ -256,16 +256,16 @@ local.set $4 local.get $3 local.get $4 - i32.const 5 + i32.const 4 i32.sub i32.shr_u i32.const 1 - i32.const 5 + i32.const 4 i32.shl i32.xor local.set $5 local.get $4 - i32.const 9 + i32.const 8 i32.const 1 i32.sub i32.sub @@ -529,7 +529,7 @@ local.get $1 i32.store local.get $7 - i32.const 512 + i32.const 256 i32.lt_u if i32.const 0 @@ -544,16 +544,16 @@ local.set $8 local.get $7 local.get $8 - i32.const 5 + i32.const 4 i32.sub i32.shr_u i32.const 1 - i32.const 5 + i32.const 4 i32.shl i32.xor local.set $9 local.get $8 - i32.const 9 + i32.const 8 i32.const 1 i32.sub i32.sub @@ -674,7 +674,7 @@ else local.get $1 local.get $0 - i32.const 2788 + i32.const 1508 i32.add i32.ge_u i32.eqz @@ -751,6 +751,34 @@ (local $3 i32) (local $4 i32) (local $5 i32) + i32.const 256 + i32.const 256 + i32.eq + if (result i32) + i32.const 22 + i32.const 22 + i32.eq + else + i32.const 0 + end + if (result i32) + i32.const 22 + i32.const 16 + i32.mul + i32.const 352 + i32.eq + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 434 + i32.const 4 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/HEAP_BASE i32.const 15 i32.add @@ -762,7 +790,7 @@ current_memory local.set $1 local.get $0 - i32.const 2788 + i32.const 1508 i32.add i32.const 65535 i32.add @@ -802,7 +830,7 @@ local.set $4 loop $repeat|0 local.get $4 - i32.const 21 + i32.const 22 i32.lt_u i32.eqz br_if $break|0 @@ -816,7 +844,7 @@ local.set $5 loop $repeat|1 local.get $5 - i32.const 32 + i32.const 16 i32.lt_u i32.eqz br_if $break|1 @@ -846,7 +874,7 @@ end local.get $3 local.get $0 - i32.const 2788 + i32.const 1508 i32.add i32.const 15 i32.add @@ -869,7 +897,7 @@ if i32.const 0 i32.const 24 - i32.const 459 + i32.const 466 i32.const 13 call $~lib/builtins/abort unreachable @@ -885,7 +913,7 @@ if i32.const 0 i32.const 24 - i32.const 459 + i32.const 466 i32.const 13 call $~lib/builtins/abort unreachable @@ -900,7 +928,7 @@ (local $5 i32) (local $6 i32) local.get $1 - i32.const 512 + i32.const 256 i32.lt_u if i32.const 0 @@ -915,22 +943,22 @@ local.set $2 local.get $1 local.get $2 - i32.const 5 + i32.const 4 i32.sub i32.shr_u i32.const 1 - i32.const 5 + i32.const 4 i32.shl i32.xor local.set $3 local.get $2 - i32.const 9 + i32.const 8 i32.const 1 i32.sub i32.sub local.set $2 local.get $3 - i32.const 32 + i32.const 16 i32.const 1 i32.sub i32.lt_u @@ -1211,7 +1239,7 @@ if i32.const 0 i32.const 24 - i32.const 488 + i32.const 495 i32.const 15 call $~lib/builtins/abort unreachable @@ -1229,7 +1257,7 @@ if i32.const 0 i32.const 24 - i32.const 490 + i32.const 497 i32.const 13 call $~lib/builtins/abort unreachable @@ -1265,7 +1293,7 @@ if i32.const 0 i32.const 24 - i32.const 452 + i32.const 459 i32.const 2 call $~lib/builtins/abort unreachable @@ -1291,7 +1319,7 @@ if i32.const 0 i32.const 24 - i32.const 501 + i32.const 508 i32.const 4 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/runtime/asrt.optimized.wat b/tests/compiler/runtime/asrt.optimized.wat index 045553de45..1a537ab1e4 100644 --- a/tests/compiler/runtime/asrt.optimized.wat +++ b/tests/compiler/runtime/asrt.optimized.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) @@ -26,7 +26,7 @@ (export "__gc_collect" (func $runtime/asrt/collectCycles)) (func $runtime/asrt/setSLMap (; 1 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 - i32.const 21 + i32.const 22 i32.ge_u if i32.const 0 @@ -46,11 +46,11 @@ ) (func $runtime/asrt/setHead (; 2 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $2 - i32.const 32 + i32.const 16 i32.lt_u i32.const 0 local.get $1 - i32.const 21 + i32.const 22 i32.lt_u select i32.eqz @@ -63,7 +63,7 @@ unreachable end local.get $1 - i32.const 5 + i32.const 4 i32.shl local.get $2 i32.add @@ -115,7 +115,7 @@ if i32.const 0 i32.const 24 - i32.const 465 + i32.const 472 i32.const 13 call $~lib/builtins/abort unreachable @@ -127,11 +127,11 @@ ) (func $runtime/asrt/getHead (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 - i32.const 32 + i32.const 16 i32.lt_u i32.const 0 local.get $1 - i32.const 21 + i32.const 22 i32.lt_u select i32.eqz @@ -144,7 +144,7 @@ unreachable end local.get $1 - i32.const 5 + i32.const 4 i32.shl local.get $2 i32.add @@ -156,7 +156,7 @@ ) (func $runtime/asrt/getSLMap (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 - i32.const 21 + i32.const 22 i32.ge_u if i32.const 0 @@ -215,7 +215,7 @@ unreachable end local.get $2 - i32.const 512 + i32.const 256 i32.lt_u if (result i32) local.get $2 @@ -228,14 +228,14 @@ local.get $2 call $runtime/asrt/fls local.tee $3 - i32.const 5 + i32.const 4 i32.sub i32.shr_u - i32.const 32 + i32.const 16 i32.xor local.set $4 local.get $3 - i32.const 8 + i32.const 7 i32.sub end local.set $3 @@ -470,7 +470,7 @@ i32.store local.get $0 local.get $2 - i32.const 512 + i32.const 256 i32.lt_u if (result i32) local.get $2 @@ -483,14 +483,14 @@ local.get $2 call $runtime/asrt/fls local.tee $3 - i32.const 5 + i32.const 4 i32.sub i32.shr_u - i32.const 32 + i32.const 16 i32.xor local.set $2 local.get $3 - i32.const 8 + i32.const 7 i32.sub end local.tee $4 @@ -561,7 +561,7 @@ unreachable end local.get $0 - i32.load offset=2784 + i32.load offset=1504 local.tee $3 if local.get $1 @@ -594,7 +594,7 @@ else local.get $1 local.get $0 - i32.const 2788 + i32.const 1508 i32.add i32.lt_u if @@ -642,7 +642,7 @@ i32.store local.get $0 local.get $2 - i32.store offset=2784 + i32.store offset=1504 local.get $0 local.get $1 call $runtime/asrt/insertBlock @@ -670,14 +670,14 @@ i32.const 112 i32.const 0 i32.store - i32.const 2896 + i32.const 1616 i32.const 0 i32.store i32.const 0 local.set $0 loop $repeat|0 local.get $0 - i32.const 21 + i32.const 22 i32.lt_u if i32.const 112 @@ -688,7 +688,7 @@ local.set $1 loop $repeat|1 local.get $1 - i32.const 32 + i32.const 16 i32.lt_u if i32.const 112 @@ -711,7 +711,7 @@ end end i32.const 112 - i32.const 2912 + i32.const 1632 current_memory i32.const 16 i32.shl @@ -724,7 +724,7 @@ if i32.const 0 i32.const 24 - i32.const 459 + i32.const 466 i32.const 13 call $~lib/builtins/abort unreachable @@ -736,7 +736,7 @@ (local $2 i32) (local $3 i32) local.get $1 - i32.const 512 + i32.const 256 i32.lt_u if (result i32) local.get $1 @@ -746,18 +746,18 @@ local.get $1 call $runtime/asrt/fls local.tee $3 - i32.const 8 + i32.const 7 i32.sub local.set $2 local.get $1 local.get $3 - i32.const 5 + i32.const 4 i32.sub i32.shr_u - i32.const 32 + i32.const 16 i32.xor local.tee $1 - i32.const 31 + i32.const 15 i32.lt_u if (result i32) local.get $1 @@ -982,7 +982,7 @@ if i32.const 0 i32.const 24 - i32.const 488 + i32.const 495 i32.const 15 call $~lib/builtins/abort unreachable @@ -997,7 +997,7 @@ if i32.const 0 i32.const 24 - i32.const 490 + i32.const 497 i32.const 13 call $~lib/builtins/abort unreachable @@ -1026,7 +1026,7 @@ if i32.const 0 i32.const 24 - i32.const 452 + i32.const 459 i32.const 2 call $~lib/builtins/abort unreachable @@ -1050,7 +1050,7 @@ if i32.const 0 i32.const 24 - i32.const 501 + i32.const 508 i32.const 4 call $~lib/builtins/abort unreachable @@ -1084,7 +1084,7 @@ if i32.const 0 i32.const 24 - i32.const 624 + i32.const 631 i32.const 15 call $~lib/builtins/abort unreachable @@ -1190,7 +1190,7 @@ if i32.const 0 i32.const 24 - i32.const 579 + i32.const 586 i32.const 17 call $~lib/builtins/abort unreachable @@ -1238,7 +1238,7 @@ if i32.const 0 i32.const 24 - i32.const 590 + i32.const 597 i32.const 6 call $~lib/builtins/abort unreachable @@ -1268,7 +1268,7 @@ end i32.const 0 i32.const 24 - i32.const 601 + i32.const 608 i32.const 24 call $~lib/builtins/abort unreachable @@ -1290,7 +1290,7 @@ if i32.const 0 i32.const 24 - i32.const 608 + i32.const 615 i32.const 2 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/runtime/asrt.ts b/tests/compiler/runtime/asrt.ts index 3ab6111b60..528df673b7 100644 --- a/tests/compiler/runtime/asrt.ts +++ b/tests/compiler/runtime/asrt.ts @@ -18,13 +18,13 @@ // ╒══════════════ Block size interpretation (32-bit) ═════════════╕ // 3 2 1 // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits -// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┴─┴─┴─┴─╫─┴─┴─┤ -// │ | FL │ SB = SL + AL │ ◄─ usize -// └───────────────────────────────────────────────┴─────────╨─────┘ +// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┴─┴─┴─╫─┴─┴─┴─┤ +// │ | FL │ SB = SL + AL │ ◄─ usize +// └───────────────────────────────────────────────┴───────╨───────┘ // FL: first level, SL: second level, AL: alignment, SB: small block // @ts-ignore: decorator -@inline const SL_BITS: u32 = 5; +@inline const SL_BITS: u32 = 4; // @ts-ignore: decorator @inline const SL_SIZE: usize = 1 << SL_BITS; @@ -130,7 +130,7 @@ function getRight(block: Block): Block { // ├───────────────────────────────────────────────────────────────┤ │ // │ ... │ ◄────┤ // ├───────────────────────────────────────────────────────────────┤ │ -// │ head[703] │ ◄────┤ +// │ head[351] │ ◄────┤ // ╞═══════════════════════════════════════════════════════════════╡ │ // │ tail │ ◄────┘ // └───────────────────────────────────────────────────────────────┘ SIZE ┘ @@ -430,6 +430,13 @@ function growMemory(root: Root, size: usize): void { /** Initilizes the root structure. */ function initialize(): Root { + if (DEBUG) { + assert( + SB_SIZE == 256 && // max size of a small block + FL_BITS == 22 && // number of second level maps + FL_BITS * SL_SIZE == 352 // number of heads + ); + } var rootOffset = (HEAP_BASE + AL_MASK) & ~AL_MASK; var pagesBefore = memory.size(); var pagesNeeded = ((((rootOffset + ROOT_SIZE) + 0xffff) & ~0xffff) >>> 16); diff --git a/tests/compiler/runtime/asrt.untouched.wat b/tests/compiler/runtime/asrt.untouched.wat index 00f302ec64..fc57017406 100644 --- a/tests/compiler/runtime/asrt.untouched.wat +++ b/tests/compiler/runtime/asrt.untouched.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) @@ -30,11 +30,11 @@ (func $runtime/asrt/setTail (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=2784 + i32.store offset=1504 ) (func $runtime/asrt/setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 - i32.const 21 + i32.const 22 i32.lt_u i32.eqz if @@ -55,11 +55,11 @@ ) (func $runtime/asrt/setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 - i32.const 21 + i32.const 22 i32.lt_u if (result i32) local.get $2 - i32.const 32 + i32.const 16 i32.lt_u else i32.const 0 @@ -75,7 +75,7 @@ end local.get $0 local.get $1 - i32.const 32 + i32.const 16 i32.mul local.get $2 i32.add @@ -87,7 +87,7 @@ ) (func $runtime/asrt/getTail (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load offset=2784 + i32.load offset=1504 ) (func $runtime/asrt/getRight (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -139,7 +139,7 @@ if i32.const 0 i32.const 24 - i32.const 465 + i32.const 472 i32.const 13 call $~lib/builtins/abort unreachable @@ -151,11 +151,11 @@ ) (func $runtime/asrt/getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 - i32.const 21 + i32.const 22 i32.lt_u if (result i32) local.get $2 - i32.const 32 + i32.const 16 i32.lt_u else i32.const 0 @@ -171,7 +171,7 @@ end local.get $0 local.get $1 - i32.const 32 + i32.const 16 i32.mul local.get $2 i32.add @@ -182,7 +182,7 @@ ) (func $runtime/asrt/getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 - i32.const 21 + i32.const 22 i32.lt_u i32.eqz if @@ -249,7 +249,7 @@ unreachable end local.get $3 - i32.const 512 + i32.const 256 i32.lt_u if i32.const 0 @@ -264,16 +264,16 @@ local.set $4 local.get $3 local.get $4 - i32.const 5 + i32.const 4 i32.sub i32.shr_u i32.const 1 - i32.const 5 + i32.const 4 i32.shl i32.xor local.set $5 local.get $4 - i32.const 9 + i32.const 8 i32.const 1 i32.sub i32.sub @@ -537,7 +537,7 @@ local.get $1 i32.store local.get $7 - i32.const 512 + i32.const 256 i32.lt_u if i32.const 0 @@ -552,16 +552,16 @@ local.set $8 local.get $7 local.get $8 - i32.const 5 + i32.const 4 i32.sub i32.shr_u i32.const 1 - i32.const 5 + i32.const 4 i32.shl i32.xor local.set $9 local.get $8 - i32.const 9 + i32.const 8 i32.const 1 i32.sub i32.sub @@ -682,7 +682,7 @@ else local.get $1 local.get $0 - i32.const 2788 + i32.const 1508 i32.add i32.ge_u i32.eqz @@ -759,6 +759,34 @@ (local $3 i32) (local $4 i32) (local $5 i32) + i32.const 256 + i32.const 256 + i32.eq + if (result i32) + i32.const 22 + i32.const 22 + i32.eq + else + i32.const 0 + end + if (result i32) + i32.const 22 + i32.const 16 + i32.mul + i32.const 352 + i32.eq + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 434 + i32.const 4 + call $~lib/builtins/abort + unreachable + end global.get $~lib/memory/HEAP_BASE i32.const 15 i32.add @@ -770,7 +798,7 @@ current_memory local.set $1 local.get $0 - i32.const 2788 + i32.const 1508 i32.add i32.const 65535 i32.add @@ -810,7 +838,7 @@ local.set $4 loop $repeat|0 local.get $4 - i32.const 21 + i32.const 22 i32.lt_u i32.eqz br_if $break|0 @@ -824,7 +852,7 @@ local.set $5 loop $repeat|1 local.get $5 - i32.const 32 + i32.const 16 i32.lt_u i32.eqz br_if $break|1 @@ -854,7 +882,7 @@ end local.get $3 local.get $0 - i32.const 2788 + i32.const 1508 i32.add i32.const 15 i32.add @@ -877,7 +905,7 @@ if i32.const 0 i32.const 24 - i32.const 459 + i32.const 466 i32.const 13 call $~lib/builtins/abort unreachable @@ -893,7 +921,7 @@ if i32.const 0 i32.const 24 - i32.const 459 + i32.const 466 i32.const 13 call $~lib/builtins/abort unreachable @@ -908,7 +936,7 @@ (local $5 i32) (local $6 i32) local.get $1 - i32.const 512 + i32.const 256 i32.lt_u if i32.const 0 @@ -923,22 +951,22 @@ local.set $2 local.get $1 local.get $2 - i32.const 5 + i32.const 4 i32.sub i32.shr_u i32.const 1 - i32.const 5 + i32.const 4 i32.shl i32.xor local.set $3 local.get $2 - i32.const 9 + i32.const 8 i32.const 1 i32.sub i32.sub local.set $2 local.get $3 - i32.const 32 + i32.const 16 i32.const 1 i32.sub i32.lt_u @@ -1219,7 +1247,7 @@ if i32.const 0 i32.const 24 - i32.const 488 + i32.const 495 i32.const 15 call $~lib/builtins/abort unreachable @@ -1237,7 +1265,7 @@ if i32.const 0 i32.const 24 - i32.const 490 + i32.const 497 i32.const 13 call $~lib/builtins/abort unreachable @@ -1269,7 +1297,7 @@ if i32.const 0 i32.const 24 - i32.const 452 + i32.const 459 i32.const 2 call $~lib/builtins/abort unreachable @@ -1295,7 +1323,7 @@ if i32.const 0 i32.const 24 - i32.const 501 + i32.const 508 i32.const 4 call $~lib/builtins/abort unreachable @@ -1641,7 +1669,7 @@ if i32.const 0 i32.const 24 - i32.const 624 + i32.const 631 i32.const 15 call $~lib/builtins/abort unreachable @@ -1839,7 +1867,7 @@ if i32.const 0 i32.const 24 - i32.const 579 + i32.const 586 i32.const 17 call $~lib/builtins/abort unreachable @@ -1886,7 +1914,7 @@ if i32.const 0 i32.const 24 - i32.const 590 + i32.const 597 i32.const 6 call $~lib/builtins/abort unreachable @@ -1923,7 +1951,7 @@ if i32.const 0 i32.const 24 - i32.const 601 + i32.const 608 i32.const 24 call $~lib/builtins/abort unreachable @@ -1952,7 +1980,7 @@ if i32.const 0 i32.const 24 - i32.const 608 + i32.const 615 i32.const 2 call $~lib/builtins/abort unreachable From 3e08e5c2d6759c811bc5d20a97b8b1e81a2188dd Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 16 Apr 2019 17:33:33 +0200 Subject: [PATCH 111/119] asrt debugger, fixes --- tests/allocators/arena/optimized.wat | 1102 +------------ tests/allocators/arena/untouched.wat | 1252 +------------- tests/allocators/asrt/assembly/index.ts | 6 +- tests/allocators/asrt/optimized.wat | 527 ++++-- tests/allocators/asrt/untouched.wat | 704 +++++--- tests/allocators/runner.js | 8 +- tests/compiler/runtime/asrt.optimized.wat | 1461 ----------------- .../asrt.ts => runtime/assembly/index.ts} | 73 +- tests/runtime/assembly/tsconfig.json | 6 + tests/runtime/index.html | 196 +++ tests/runtime/optimized.wat | 1067 ++++++++++++ tests/runtime/package-lock.json | 213 +++ tests/runtime/package.json | 12 + .../untouched.wat} | 572 +++---- 14 files changed, 2821 insertions(+), 4378 deletions(-) delete mode 100644 tests/compiler/runtime/asrt.optimized.wat rename tests/{compiler/runtime/asrt.ts => runtime/assembly/index.ts} (94%) create mode 100644 tests/runtime/assembly/tsconfig.json create mode 100644 tests/runtime/index.html create mode 100644 tests/runtime/optimized.wat create mode 100644 tests/runtime/package-lock.json create mode 100644 tests/runtime/package.json rename tests/{compiler/runtime/asrt.untouched.wat => runtime/untouched.wat} (77%) diff --git a/tests/allocators/arena/optimized.wat b/tests/allocators/arena/optimized.wat index 96023e270b..16b995f91a 100644 --- a/tests/allocators/arena/optimized.wat +++ b/tests/allocators/arena/optimized.wat @@ -5,16 +5,14 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$viii (func (param i32 i32 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/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\1c") + (data (i32.const 24) "~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") (global $~lib/memory/memory.implemented i32 (i32.const 1)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "memory.implemented" (global $~lib/memory/memory.implemented)) (export "memory.copy" (func $~lib/memory/memory.copy)) (export "memory.init" (func $~lib/memory/memory.init)) @@ -27,1025 +25,103 @@ (start $start) (func $~lib/memory/memory.init (; 1 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) i32.const 0 - i32.const 16 - i32.const 46 - i32.const 4 - call $~lib/env/abort - unreachable - ) - (func $~lib/memory/memory.drop (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 0 - i32.const 16 - i32.const 53 - i32.const 4 - call $~lib/env/abort - unreachable - ) - (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - local.get $0 - i32.const 1 - local.tee $1 - local.get $0 - local.get $1 - i32.gt_u - select - global.get $~lib/allocator/arena/offset - local.tee $0 - i32.add - i32.const 7 - i32.add - i32.const -8 - i32.and - local.tee $1 - current_memory - local.tee $2 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $2 - local.get $1 - local.get $0 - i32.sub - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $3 - local.tee $4 - local.get $2 - local.get $4 - i32.gt_s - select - grow_memory - i32.const 0 - i32.lt_s - if - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $1 - global.set $~lib/allocator/arena/offset - local.get $0 - ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/arena/__mem_allocate - ) - (func $~lib/memory/memory.free (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/memory/memory.reset (; 6 ;) (type $FUNCSIG$v) - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $~lib/util/memory/memcpy (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $continue|0 - local.get $1 - i32.const 3 - i32.and - local.get $2 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - i32.const 1 - i32.sub - br_table $case0|2 $case1|2 $case2|2 $break|2 - end - local.get $1 - i32.load - local.set $4 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - i32.const 1 - i32.add - local.set $3 - local.get $0 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $0 - i32.const 1 - i32.add - local.set $5 - local.get $0 - i32.load8_u - end - i32.store8 - local.get $3 - i32.const 1 - i32.add - local.set $0 - local.get $5 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $5 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $4 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 13 - i32.add - i32.load - local.tee $4 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $4 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $4 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 - i32.add - i32.load - local.tee $4 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $4 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $4 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 15 - i32.add - i32.load - local.tee $4 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - end - local.get $2 + i32.const 24 + i32.const 46 i32.const 4 - i32.and + call $~lib/builtins/abort + unreachable + ) + (func $~lib/memory/memory.drop (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 0 + i32.const 24 + i32.const 53 + i32.const 4 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741824 + i32.gt_u if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - i32.load8_u - end - i32.store8 + unreachable end - local.get $2 - i32.const 2 + local.get $0 + i32.const 1 + local.tee $1 + local.get $0 + local.get $1 + i32.gt_u + select + global.get $~lib/allocator/arena/offset + local.tee $0 + i32.add + i32.const 7 + i32.add + i32.const -8 i32.and + local.tee $1 + current_memory + local.tee $2 + i32.const 16 + i32.shl + i32.gt_u if - local.get $0 + local.get $2 local.get $1 - i32.load8_u - i32.store8 local.get $0 - i32.const 1 + i32.sub + i32.const 65535 i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - block (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $1 + local.tee $4 + local.get $2 + local.get $4 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if local.get $3 - i32.load8_u + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end end - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 end + local.get $1 + global.set $~lib/allocator/arena/offset + local.get $0 + ) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate + ) + (func $~lib/memory/memory.free (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + nop ) - (func $~lib/memory/memory.copy (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.reset (; 6 ;) (type $FUNCSIG$v) + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + ) + (func $~lib/memory/memory.copy (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 local.get $1 i32.eq br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -1213,7 +289,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 9 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 8 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $2 local.get $3 @@ -1238,8 +314,7 @@ end end ) - (func $~lib/memory/memory.compare (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) + (func $~lib/memory/memory.compare (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.eq @@ -1248,9 +323,6 @@ else loop $continue|0 local.get $2 - i32.const 0 - i32.ne - local.tee $3 if (result i32) local.get $0 i32.load8_u @@ -1258,7 +330,7 @@ i32.load8_u i32.eq else - local.get $3 + i32.const 0 end if local.get $2 @@ -1288,13 +360,13 @@ end end ) - (func $start (; 11 ;) (type $FUNCSIG$v) - i32.const 48 + (func $start (; 10 ;) (type $FUNCSIG$v) + i32.const 56 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 11 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/allocators/arena/untouched.wat b/tests/allocators/arena/untouched.wat index bf627fb60e..e912ce6161 100644 --- a/tests/allocators/arena/untouched.wat +++ b/tests/allocators/arena/untouched.wat @@ -5,17 +5,16 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$viii (func (param i32 i32 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/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/memory/memory.implemented i32 (i32.const 1)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 52)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "memory.implemented" (global $~lib/memory/memory.implemented)) (export "memory.copy" (func $~lib/memory/memory.copy)) (export "memory.init" (func $~lib/memory/memory.init)) @@ -28,18 +27,18 @@ (start $start) (func $~lib/memory/memory.init (; 1 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) i32.const 0 - i32.const 16 + i32.const 24 i32.const 46 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable ) (func $~lib/memory/memory.drop (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) i32.const 0 - i32.const 16 + i32.const 24 i32.const 53 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable ) (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -140,1208 +139,7 @@ (func $~lib/memory/memory.reset (; 8 ;) (type $FUNCSIG$v) call $~lib/allocator/arena/__mem_reset ) - (func $~lib/util/memory/memcpy (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - ) - (func $~lib/memory/memory.copy (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1352,28 +150,6 @@ if br $~lib/util/memory/memmove|inlined.0 end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end local.get $0 local.get $1 i32.lt_u @@ -1572,7 +348,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 11 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 10 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) i32.const 0 @@ -1604,11 +380,10 @@ end end ) - (func $~lib/memory/memory.compare (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.compare (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) block $~lib/util/memory/memcmp|inlined.0 (result i32) local.get $0 local.set $5 @@ -1628,7 +403,6 @@ local.get $3 i32.const 0 i32.ne - local.tee $6 if (result i32) local.get $5 i32.load8_u @@ -1636,7 +410,7 @@ i32.load8_u i32.eq else - local.get $6 + i32.const 0 end if block @@ -1669,7 +443,7 @@ end end ) - (func $start (; 13 ;) (type $FUNCSIG$v) + (func $start (; 12 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE i32.const 7 i32.add @@ -1681,6 +455,6 @@ global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 14 ;) (type $FUNCSIG$v) + (func $null (; 13 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/allocators/asrt/assembly/index.ts b/tests/allocators/asrt/assembly/index.ts index 2f23350184..0aa4ccc01e 100644 --- a/tests/allocators/asrt/assembly/index.ts +++ b/tests/allocators/asrt/assembly/index.ts @@ -1,4 +1,5 @@ -import "../../../compiler/runtime/asrt"; +import "../../../runtime/assembly/index"; +import { memory as builtin_memory } from "memory"; export namespace memory { export function allocate(size: usize): usize { @@ -7,4 +8,7 @@ export namespace memory { export function free(ptr: usize): void { __mm_free(ptr); } + export function fill(dst: usize, c: u8, n: usize): void { + builtin_memory.fill(dst, c, n); + } } diff --git a/tests/allocators/asrt/optimized.wat b/tests/allocators/asrt/optimized.wat index adfc94e7ea..0f7bc5994f 100644 --- a/tests/allocators/asrt/optimized.wat +++ b/tests/allocators/asrt/optimized.wat @@ -8,17 +8,21 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (memory $0 0) - (global $../../compiler/runtime/asrt/ROOT (mut i32) (i32.const 0)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00>") + (data (i32.const 24) ".\00.\00/\00.\00.\00/\00r\00u\00n\00t\00i\00m\00e\00/\00a\00s\00s\00e\00m\00b\00l\00y\00/\00i\00n\00d\00e\00x\00.\00t\00s") + (global $../../runtime/assembly/index/ROOT (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "memory.allocate" (func $assembly/index/memory.allocate)) (export "memory.free" (func $assembly/index/memory.free)) - (func $../../compiler/runtime/asrt/setTail (; 0 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (export "memory.fill" (func $assembly/index/memory.fill)) + (func $../../runtime/assembly/index/setTail (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=1504 + i32.store offset=1568 ) - (func $../../compiler/runtime/asrt/setSLMap (; 1 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $../../runtime/assembly/index/setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 2 @@ -27,7 +31,7 @@ local.get $2 i32.store offset=4 ) - (func $../../compiler/runtime/asrt/setHead (; 2 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $../../runtime/assembly/index/setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $1 i32.const 4 @@ -40,7 +44,7 @@ local.get $3 i32.store offset=96 ) - (func $../../compiler/runtime/asrt/getRight (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $../../runtime/assembly/index/getRight (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.add @@ -50,13 +54,13 @@ i32.and i32.add ) - (func $../../compiler/runtime/asrt/fls (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $../../runtime/assembly/index/fls (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 31 local.get $0 i32.clz i32.sub ) - (func $../../compiler/runtime/asrt/getHead (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $../../runtime/assembly/index/getHead (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 4 @@ -68,7 +72,7 @@ i32.add i32.load offset=96 ) - (func $../../compiler/runtime/asrt/getSLMap (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $../../runtime/assembly/index/getSLMap (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.const 2 @@ -76,7 +80,7 @@ i32.add i32.load offset=4 ) - (func $../../compiler/runtime/asrt/removeBlock (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $../../runtime/assembly/index/removeBlock (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -97,7 +101,7 @@ else local.get $2 local.get $2 - call $../../compiler/runtime/asrt/fls + call $../../runtime/assembly/index/fls local.tee $3 i32.const 4 i32.sub @@ -130,7 +134,7 @@ local.get $0 local.get $3 local.get $4 - call $../../compiler/runtime/asrt/getHead + call $../../runtime/assembly/index/getHead local.get $1 i32.eq if @@ -138,7 +142,7 @@ local.get $3 local.get $4 local.get $2 - call $../../compiler/runtime/asrt/setHead + call $../../runtime/assembly/index/setHead local.get $2 i32.eqz if @@ -146,7 +150,7 @@ local.get $3 local.get $0 local.get $3 - call $../../compiler/runtime/asrt/getSLMap + call $../../runtime/assembly/index/getSLMap i32.const 1 local.get $4 i32.shl @@ -154,7 +158,7 @@ i32.xor i32.and local.tee $1 - call $../../compiler/runtime/asrt/setSLMap + call $../../runtime/assembly/index/setSLMap local.get $1 i32.eqz if @@ -172,42 +176,56 @@ end end ) - (func $../../compiler/runtime/asrt/insertBlock (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $../../runtime/assembly/index/insertBlock (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) + (local $7 i32) local.get $1 i32.load - local.set $2 + local.set $3 local.get $1 - call $../../compiler/runtime/asrt/getRight - local.tee $3 - i32.load + call $../../runtime/assembly/index/getRight local.tee $4 + i32.load + local.tee $5 i32.const 1 i32.and if - local.get $0 local.get $3 - call $../../compiler/runtime/asrt/removeBlock - local.get $1 - local.get $2 - local.get $4 i32.const -4 i32.and i32.const 16 i32.add + local.get $5 + i32.const -4 + i32.and i32.add local.tee $2 - i32.store - local.get $1 - call $../../compiler/runtime/asrt/getRight - local.tee $3 - i32.load - local.set $4 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + local.get $4 + call $../../runtime/assembly/index/removeBlock + local.get $1 + local.get $3 + i32.const 3 + i32.and + local.get $2 + i32.or + local.tee $3 + i32.store + local.get $1 + call $../../runtime/assembly/index/getRight + local.tee $4 + i32.load + local.set $5 + end end - local.get $2 + local.get $3 i32.const 2 i32.and if @@ -215,35 +233,48 @@ i32.const 4 i32.sub i32.load - local.tee $1 + local.tee $2 i32.load - local.set $5 - local.get $0 - local.get $1 - call $../../compiler/runtime/asrt/removeBlock - local.get $1 - local.get $5 - local.get $2 + local.tee $6 i32.const -4 i32.and i32.const 16 i32.add + local.get $3 + i32.const -4 + i32.and i32.add - local.tee $2 - i32.store + local.tee $7 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + local.get $2 + call $../../runtime/assembly/index/removeBlock + local.get $2 + local.get $6 + i32.const 3 + i32.and + local.get $7 + i32.or + local.tee $3 + i32.store + local.get $2 + local.set $1 + end end - local.get $3 local.get $4 + local.get $5 i32.const 2 i32.or i32.store - local.get $3 + local.get $4 i32.const 4 i32.sub local.get $1 i32.store local.get $0 - local.get $2 + local.get $3 i32.const -4 i32.and local.tee $2 @@ -253,26 +284,26 @@ local.get $2 i32.const 16 i32.div_u - local.set $2 + local.set $3 i32.const 0 else local.get $2 local.get $2 - call $../../compiler/runtime/asrt/fls - local.tee $3 + call $../../runtime/assembly/index/fls + local.tee $2 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $2 - local.get $3 + local.set $3 + local.get $2 i32.const 7 i32.sub end - local.tee $3 - local.get $2 - call $../../compiler/runtime/asrt/getHead + local.tee $2 + local.get $3 + call $../../runtime/assembly/index/getHead local.set $4 local.get $1 i32.const 0 @@ -287,35 +318,35 @@ i32.store offset=16 end local.get $0 - local.get $3 local.get $2 + local.get $3 local.get $1 - call $../../compiler/runtime/asrt/setHead + call $../../runtime/assembly/index/setHead local.get $0 local.get $0 i32.load i32.const 1 - local.get $3 + local.get $2 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $2 local.get $0 - local.get $3 - call $../../compiler/runtime/asrt/getSLMap - i32.const 1 local.get $2 + call $../../runtime/assembly/index/getSLMap + i32.const 1 + local.get $3 i32.shl i32.or - call $../../compiler/runtime/asrt/setSLMap + call $../../runtime/assembly/index/setSLMap ) - (func $../../compiler/runtime/asrt/addMemory (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $../../runtime/assembly/index/addMemory (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $2 block (result i32) local.get $0 - i32.load offset=1504 + i32.load offset=1568 local.tee $2 if local.get $1 @@ -369,19 +400,19 @@ i32.store local.get $0 local.get $2 - call $../../compiler/runtime/asrt/setTail + call $../../runtime/assembly/index/setTail local.get $0 local.get $1 - call $../../compiler/runtime/asrt/insertBlock + call $../../runtime/assembly/index/insertBlock ) - (func $../../compiler/runtime/asrt/initialize (; 10 ;) (type $FUNCSIG$i) (result i32) + (func $../../runtime/assembly/index/initialize (; 11 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 16 + i32.const 96 local.tee $3 - i32.const 67043 + i32.const 67107 i32.add i32.const -65536 i32.and @@ -410,17 +441,17 @@ i32.store local.get $0 i32.const 0 - call $../../compiler/runtime/asrt/setTail + call $../../runtime/assembly/index/setTail loop $repeat|0 block $break|0 local.get $2 - i32.const 22 + i32.const 23 i32.ge_u br_if $break|0 local.get $0 local.get $2 i32.const 0 - call $../../compiler/runtime/asrt/setSLMap + call $../../runtime/assembly/index/setSLMap i32.const 0 local.set $1 loop $repeat|1 @@ -433,7 +464,7 @@ local.get $2 local.get $1 i32.const 0 - call $../../compiler/runtime/asrt/setHead + call $../../runtime/assembly/index/setHead local.get $1 i32.const 1 i32.add @@ -450,18 +481,19 @@ end local.get $0 local.get $3 - i32.const 1523 + i32.const 1587 i32.add i32.const -16 i32.and current_memory i32.const 16 i32.shl - call $../../compiler/runtime/asrt/addMemory + call $../../runtime/assembly/index/addMemory local.get $0 ) - (func $../../compiler/runtime/asrt/searchBlock (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $../../runtime/assembly/index/searchBlock (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + local.get $0 local.get $1 i32.const 256 i32.lt_u @@ -469,11 +501,32 @@ local.get $1 i32.const 16 i32.div_u + local.set $1 + i32.const 0 else + block (result i32) + local.get $1 + i32.const 536870912 + i32.lt_u + if + local.get $1 + i32.const 1 + local.get $1 + call $../../runtime/assembly/index/fls + i32.const 4 + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.set $1 + end + local.get $1 + end + call $../../runtime/assembly/index/fls + local.set $2 local.get $1 - local.get $1 - call $../../compiler/runtime/asrt/fls - local.tee $2 + local.get $2 i32.const 4 i32.sub i32.shr_u @@ -483,26 +536,9 @@ local.get $2 i32.const 7 i32.sub - local.set $2 - local.get $1 - i32.const 15 - i32.lt_u - if (result i32) - local.get $1 - i32.const 1 - i32.add - else - local.get $2 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - end end - local.set $1 - local.get $0 - local.get $2 - call $../../compiler/runtime/asrt/getSLMap + local.tee $2 + call $../../runtime/assembly/index/getSLMap i32.const -1 local.get $1 i32.shl @@ -513,7 +549,7 @@ local.get $2 local.get $1 i32.ctz - call $../../compiler/runtime/asrt/getHead + call $../../runtime/assembly/index/getHead else local.get $0 i32.load @@ -531,15 +567,15 @@ local.tee $1 local.get $0 local.get $1 - call $../../compiler/runtime/asrt/getSLMap + call $../../runtime/assembly/index/getSLMap i32.ctz - call $../../compiler/runtime/asrt/getHead + call $../../runtime/assembly/index/getHead else i32.const 0 end end ) - (func $../../compiler/runtime/asrt/growMemory (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $../../runtime/assembly/index/growMemory (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -578,9 +614,9 @@ current_memory i32.const 16 i32.shl - call $../../compiler/runtime/asrt/addMemory + call $../../runtime/assembly/index/addMemory ) - (func $../../compiler/runtime/asrt/prepareBlock (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $../../runtime/assembly/index/prepareBlock (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -588,7 +624,7 @@ local.set $3 local.get $0 local.get $1 - call $../../compiler/runtime/asrt/removeBlock + call $../../runtime/assembly/index/removeBlock local.get $3 i32.const -4 i32.and @@ -619,7 +655,7 @@ i32.store local.get $0 local.get $2 - call $../../compiler/runtime/asrt/insertBlock + call $../../runtime/assembly/index/insertBlock else local.get $1 local.get $3 @@ -627,9 +663,9 @@ i32.and i32.store local.get $1 - call $../../compiler/runtime/asrt/getRight + call $../../runtime/assembly/index/getRight local.get $1 - call $../../compiler/runtime/asrt/getRight + call $../../runtime/assembly/index/getRight i32.load i32.const -3 i32.and @@ -639,21 +675,26 @@ i32.const 16 i32.add ) - (func $../../compiler/runtime/asrt/__mm_allocate (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $../../runtime/assembly/index/__mm_allocate (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - global.get $../../compiler/runtime/asrt/ROOT + global.get $../../runtime/assembly/index/ROOT local.tee $2 i32.eqz if - call $../../compiler/runtime/asrt/initialize + call $../../runtime/assembly/index/initialize local.tee $2 - global.set $../../compiler/runtime/asrt/ROOT + global.set $../../runtime/assembly/index/ROOT end local.get $0 i32.const 1073741824 - i32.gt_u + i32.ge_u if + i32.const 0 + i32.const 24 + i32.const 498 + i32.const 29 + call $~lib/builtins/abort unreachable end local.get $2 @@ -670,16 +711,16 @@ i32.gt_u select local.tee $1 - call $../../compiler/runtime/asrt/searchBlock + call $../../runtime/assembly/index/searchBlock local.tee $0 i32.eqz if local.get $2 local.get $1 - call $../../compiler/runtime/asrt/growMemory + call $../../runtime/assembly/index/growMemory local.get $2 local.get $1 - call $../../compiler/runtime/asrt/searchBlock + call $../../runtime/assembly/index/searchBlock local.set $0 end local.get $0 @@ -694,17 +735,17 @@ local.get $2 local.get $0 local.get $1 - call $../../compiler/runtime/asrt/prepareBlock + call $../../runtime/assembly/index/prepareBlock ) - (func $assembly/index/memory.allocate (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/memory.allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $../../compiler/runtime/asrt/__mm_allocate + call $../../runtime/assembly/index/__mm_allocate ) - (func $../../compiler/runtime/asrt/__mm_free (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $../../runtime/assembly/index/__mm_free (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 if - global.get $../../compiler/runtime/asrt/ROOT + global.get $../../runtime/assembly/index/ROOT local.tee $1 if local.get $0 @@ -718,15 +759,251 @@ i32.store local.get $1 local.get $0 - call $../../compiler/runtime/asrt/insertBlock + call $../../runtime/assembly/index/insertBlock + end + end + ) + (func $assembly/index/memory.free (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $../../runtime/assembly/index/__mm_free + ) + (func $~lib/memory/memory.fill (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i64) + (local $4 i32) + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 1 + i32.add + local.get $1 + i32.store8 + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $4 + local.get $0 + i32.add + local.tee $0 + local.get $1 + i32.const 255 + i32.and + i32.const 16843009 + i32.mul + local.tee $1 + i32.store + local.get $2 + local.get $4 + i32.sub + i32.const -4 + i32.and + local.tee $2 + local.get $0 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $2 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 12 + i32.sub + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.get $1 + i32.store + local.get $2 + i32.const 24 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 24 + i32.sub + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 20 + i32.sub + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.get $1 + i32.store + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $4 + local.get $0 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $1 + i64.extend_i32_u + local.get $1 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $3 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + local.get $0 + local.get $3 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $3 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $3 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $3 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $continue|0 + end end end ) - (func $assembly/index/memory.free (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/memory.fill (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 - call $../../compiler/runtime/asrt/__mm_free + local.get $1 + local.get $2 + call $~lib/memory/memory.fill ) - (func $null (; 18 ;) (type $FUNCSIG$v) + (func $null (; 21 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/allocators/asrt/untouched.wat b/tests/allocators/asrt/untouched.wat index b9d111da8d..6b298ee2f9 100644 --- a/tests/allocators/asrt/untouched.wat +++ b/tests/allocators/asrt/untouched.wat @@ -1,38 +1,39 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00<\00\00\00\00\00\00\00\00\00\00\00.\00.\00/\00.\00.\00/\00c\00o\00m\00p\00i\00l\00e\00r\00/\00r\00u\00n\00t\00i\00m\00e\00/\00a\00s\00r\00t\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00>\00\00\00\00\00\00\00\00\00\00\00.\00.\00/\00.\00.\00/\00r\00u\00n\00t\00i\00m\00e\00/\00a\00s\00s\00e\00m\00b\00l\00y\00/\00i\00n\00d\00e\00x\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $../../compiler/runtime/asrt/ROOT (mut i32) (i32.const 0)) - (global $../../compiler/runtime/asrt/ACYCLIC_FLAG i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 84)) + (global $../../runtime/assembly/index/ROOT (mut i32) (i32.const 0)) + (global $../../runtime/assembly/index/ACYCLIC_FLAG i32 (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 88)) (export "memory" (memory $0)) (export "memory.allocate" (func $assembly/index/memory.allocate)) (export "memory.free" (func $assembly/index/memory.free)) - (func $../../compiler/runtime/asrt/setTail (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (export "memory.fill" (func $assembly/index/memory.fill)) + (func $../../runtime/assembly/index/setTail (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=1504 + i32.store offset=1568 ) - (func $../../compiler/runtime/asrt/setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $../../runtime/assembly/index/setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 - i32.const 22 + i32.const 23 i32.lt_u i32.eqz if i32.const 0 i32.const 24 - i32.const 164 + i32.const 175 i32.const 13 call $~lib/builtins/abort unreachable @@ -45,9 +46,9 @@ local.get $2 i32.store offset=4 ) - (func $../../compiler/runtime/asrt/setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $../../runtime/assembly/index/setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 - i32.const 22 + i32.const 23 i32.lt_u if (result i32) local.get $2 @@ -60,7 +61,7 @@ if i32.const 0 i32.const 24 - i32.const 178 + i32.const 189 i32.const 13 call $~lib/builtins/abort unreachable @@ -77,11 +78,11 @@ local.get $3 i32.store offset=96 ) - (func $../../compiler/runtime/asrt/getTail (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $../../runtime/assembly/index/getTail (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load offset=1504 + i32.load offset=1568 ) - (func $../../compiler/runtime/asrt/getRight (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $../../runtime/assembly/index/getRight (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -96,7 +97,7 @@ if i32.const 0 i32.const 24 - i32.const 111 + i32.const 122 i32.const 13 call $~lib/builtins/abort unreachable @@ -116,14 +117,14 @@ if i32.const 0 i32.const 24 - i32.const 113 + i32.const 124 i32.const 13 call $~lib/builtins/abort unreachable end local.get $2 ) - (func $../../compiler/runtime/asrt/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $../../runtime/assembly/index/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -131,7 +132,7 @@ if i32.const 0 i32.const 24 - i32.const 472 + i32.const 481 i32.const 13 call $~lib/builtins/abort unreachable @@ -141,9 +142,9 @@ i32.clz i32.sub ) - (func $../../compiler/runtime/asrt/getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $../../runtime/assembly/index/getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 - i32.const 22 + i32.const 23 i32.lt_u if (result i32) local.get $2 @@ -156,7 +157,7 @@ if i32.const 0 i32.const 24 - i32.const 169 + i32.const 180 i32.const 13 call $~lib/builtins/abort unreachable @@ -172,15 +173,15 @@ i32.add i32.load offset=96 ) - (func $../../compiler/runtime/asrt/getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $../../runtime/assembly/index/getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 - i32.const 22 + i32.const 23 i32.lt_u i32.eqz if i32.const 0 i32.const 24 - i32.const 159 + i32.const 170 i32.const 13 call $~lib/builtins/abort unreachable @@ -192,7 +193,7 @@ i32.add i32.load offset=4 ) - (func $../../compiler/runtime/asrt/removeBlock (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $../../runtime/assembly/index/removeBlock (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -210,7 +211,7 @@ if i32.const 0 i32.const 24 - i32.const 259 + i32.const 275 i32.const 13 call $~lib/builtins/abort unreachable @@ -235,7 +236,7 @@ if i32.const 0 i32.const 24 - i32.const 261 + i32.const 277 i32.const 13 call $~lib/builtins/abort unreachable @@ -252,7 +253,7 @@ local.set $5 else local.get $3 - call $../../compiler/runtime/asrt/fls + call $../../runtime/assembly/index/fls local.set $4 local.get $3 local.get $4 @@ -293,20 +294,20 @@ local.get $0 local.get $4 local.get $5 - call $../../compiler/runtime/asrt/getHead + call $../../runtime/assembly/index/getHead i32.eq if local.get $0 local.get $4 local.get $5 local.get $7 - call $../../compiler/runtime/asrt/setHead + call $../../runtime/assembly/index/setHead local.get $7 i32.eqz if local.get $0 local.get $4 - call $../../compiler/runtime/asrt/getSLMap + call $../../runtime/assembly/index/getSLMap local.set $8 local.get $0 local.get $4 @@ -318,7 +319,7 @@ i32.xor i32.and local.tee $8 - call $../../compiler/runtime/asrt/setSLMap + call $../../runtime/assembly/index/setSLMap local.get $8 i32.eqz if @@ -336,7 +337,7 @@ end end ) - (func $../../compiler/runtime/asrt/getLeft (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $../../runtime/assembly/index/getLeft (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -346,7 +347,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 113 i32.const 13 call $~lib/builtins/abort unreachable @@ -361,14 +362,14 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 115 i32.const 13 call $~lib/builtins/abort unreachable end local.get $1 ) - (func $../../compiler/runtime/asrt/insertBlock (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $../../runtime/assembly/index/insertBlock (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -378,12 +379,13 @@ (local $8 i32) (local $9 i32) (local $10 i32) + (local $11 i32) local.get $1 i32.eqz if i32.const 0 i32.const 24 - i32.const 194 + i32.const 205 i32.const 13 call $~lib/builtins/abort unreachable @@ -398,13 +400,13 @@ if i32.const 0 i32.const 24 - i32.const 196 + i32.const 207 i32.const 13 call $~lib/builtins/abort unreachable end local.get $1 - call $../../compiler/runtime/asrt/getRight + call $../../runtime/assembly/index/getRight local.set $3 local.get $3 i32.load @@ -413,34 +415,49 @@ i32.const 1 i32.and if - local.get $0 - local.get $3 - call $../../compiler/runtime/asrt/removeBlock - local.get $1 local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and i32.const 16 + i32.add local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - i32.add - local.tee $2 - i32.store - local.get $1 - call $../../compiler/runtime/asrt/getRight - local.set $3 - local.get $3 - i32.load - local.set $4 + local.set $5 + local.get $5 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + local.get $3 + call $../../runtime/assembly/index/removeBlock + local.get $1 + local.get $2 + i32.const 3 + i32.and + local.get $5 + i32.or + local.tee $2 + i32.store + local.get $1 + call $../../runtime/assembly/index/getRight + local.set $3 + local.get $3 + i32.load + local.set $4 + end end local.get $2 i32.const 2 i32.and if local.get $1 - call $../../compiler/runtime/asrt/getLeft + call $../../runtime/assembly/index/getLeft local.set $5 local.get $5 i32.load @@ -452,30 +469,43 @@ if i32.const 0 i32.const 24 - i32.const 214 + i32.const 228 i32.const 15 call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 - call $../../compiler/runtime/asrt/removeBlock - local.get $5 local.get $6 + i32.const 3 + i32.const -1 + i32.xor + i32.and i32.const 16 + i32.add local.get $2 i32.const 3 i32.const -1 i32.xor i32.and i32.add - i32.add - local.tee $6 - i32.store - local.get $5 - local.set $1 - local.get $6 - local.set $2 + local.set $7 + local.get $7 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + local.get $5 + call $../../runtime/assembly/index/removeBlock + local.get $5 + local.get $6 + i32.const 3 + i32.and + local.get $7 + i32.or + local.tee $2 + i32.store + local.get $5 + local.set $1 + end end local.get $3 local.get $4 @@ -487,12 +517,12 @@ i32.const -1 i32.xor i32.and - local.set $7 - local.get $7 + local.set $8 + local.get $8 i32.const 16 i32.ge_u if (result i32) - local.get $7 + local.get $8 i32.const 1073741824 i32.lt_u else @@ -502,7 +532,7 @@ if i32.const 0 i32.const 24 - i32.const 227 + i32.const 243 i32.const 13 call $~lib/builtins/abort unreachable @@ -510,7 +540,7 @@ local.get $1 i32.const 16 i32.add - local.get $7 + local.get $8 i32.add local.get $3 i32.eq @@ -518,7 +548,7 @@ if i32.const 0 i32.const 24 - i32.const 228 + i32.const 244 i32.const 13 call $~lib/builtins/abort unreachable @@ -528,22 +558,22 @@ i32.sub local.get $1 i32.store - local.get $7 + local.get $8 i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $9 + local.get $8 i32.const 16 i32.div_u - local.set $9 + local.set $10 else - local.get $7 - call $../../compiler/runtime/asrt/fls - local.set $8 - local.get $7 local.get $8 + call $../../runtime/assembly/index/fls + local.set $9 + local.get $8 + local.get $9 i32.const 4 i32.sub i32.shr_u @@ -551,56 +581,56 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $10 + local.get $9 i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $9 end local.get $0 - local.get $8 local.get $9 - call $../../compiler/runtime/asrt/getHead - local.set $10 + local.get $10 + call $../../runtime/assembly/index/getHead + local.set $11 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $10 + local.get $11 i32.store offset=20 - local.get $10 + local.get $11 if - local.get $10 + local.get $11 local.get $1 i32.store offset=16 end local.get $0 - local.get $8 local.get $9 + local.get $10 local.get $1 - call $../../compiler/runtime/asrt/setHead + call $../../runtime/assembly/index/setHead local.get $0 local.get $0 i32.load i32.const 1 - local.get $8 + local.get $9 i32.shl i32.or i32.store local.get $0 - local.get $8 + local.get $9 local.get $0 - local.get $8 - call $../../compiler/runtime/asrt/getSLMap - i32.const 1 local.get $9 + call $../../runtime/assembly/index/getSLMap + i32.const 1 + local.get $10 i32.shl i32.or - call $../../compiler/runtime/asrt/setSLMap + call $../../runtime/assembly/index/setSLMap ) - (func $../../compiler/runtime/asrt/addMemory (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $../../runtime/assembly/index/addMemory (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -629,13 +659,13 @@ if i32.const 0 i32.const 24 - i32.const 371 + i32.const 387 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - call $../../compiler/runtime/asrt/getTail + call $../../runtime/assembly/index/getTail local.set $3 i32.const 0 local.set $4 @@ -650,7 +680,7 @@ if i32.const 0 i32.const 24 - i32.const 381 + i32.const 397 i32.const 15 call $~lib/builtins/abort unreachable @@ -674,14 +704,14 @@ else local.get $1 local.get $0 - i32.const 1508 + i32.const 1572 i32.add i32.ge_u i32.eqz if i32.const 0 i32.const 24 - i32.const 393 + i32.const 409 i32.const 4 call $~lib/builtins/abort unreachable @@ -738,47 +768,19 @@ i32.store local.get $0 local.get $3 - call $../../compiler/runtime/asrt/setTail + call $../../runtime/assembly/index/setTail local.get $0 local.get $7 - call $../../compiler/runtime/asrt/insertBlock + call $../../runtime/assembly/index/insertBlock i32.const 1 ) - (func $../../compiler/runtime/asrt/initialize (; 13 ;) (type $FUNCSIG$i) (result i32) + (func $../../runtime/assembly/index/initialize (; 13 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - i32.const 256 - i32.const 256 - i32.eq - if (result i32) - i32.const 22 - i32.const 22 - i32.eq - else - i32.const 0 - end - if (result i32) - i32.const 22 - i32.const 16 - i32.mul - i32.const 352 - i32.eq - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 434 - i32.const 4 - call $~lib/builtins/abort - unreachable - end global.get $~lib/memory/HEAP_BASE i32.const 15 i32.add @@ -790,7 +792,7 @@ current_memory local.set $1 local.get $0 - i32.const 1508 + i32.const 1572 i32.add i32.const 65535 i32.add @@ -824,13 +826,13 @@ i32.store local.get $3 i32.const 0 - call $../../compiler/runtime/asrt/setTail + call $../../runtime/assembly/index/setTail block $break|0 i32.const 0 local.set $4 loop $repeat|0 local.get $4 - i32.const 22 + i32.const 23 i32.lt_u i32.eqz br_if $break|0 @@ -838,7 +840,7 @@ local.get $3 local.get $4 i32.const 0 - call $../../compiler/runtime/asrt/setSLMap + call $../../runtime/assembly/index/setSLMap block $break|1 i32.const 0 local.set $5 @@ -852,7 +854,7 @@ local.get $4 local.get $5 i32.const 0 - call $../../compiler/runtime/asrt/setHead + call $../../runtime/assembly/index/setHead local.get $5 i32.const 1 i32.add @@ -874,7 +876,7 @@ end local.get $3 local.get $0 - i32.const 1508 + i32.const 1572 i32.add i32.const 15 i32.add @@ -885,11 +887,11 @@ current_memory i32.const 16 i32.shl - call $../../compiler/runtime/asrt/addMemory + call $../../runtime/assembly/index/addMemory drop local.get $3 ) - (func $../../compiler/runtime/asrt/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $../../runtime/assembly/index/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -897,7 +899,7 @@ if i32.const 0 i32.const 24 - i32.const 466 + i32.const 475 i32.const 13 call $~lib/builtins/abort unreachable @@ -905,7 +907,7 @@ local.get $0 i32.ctz ) - (func $../../compiler/runtime/asrt/ffs (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $../../runtime/assembly/index/ffs (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -913,7 +915,7 @@ if i32.const 0 i32.const 24 - i32.const 466 + i32.const 475 i32.const 13 call $~lib/builtins/abort unreachable @@ -921,7 +923,7 @@ local.get $0 i32.ctz ) - (func $../../compiler/runtime/asrt/searchBlock (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $../../runtime/assembly/index/searchBlock (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -939,9 +941,27 @@ local.set $3 else local.get $1 - call $../../compiler/runtime/asrt/fls + i32.const 536870912 + i32.lt_u + if (result i32) + local.get $1 + i32.const 1 + local.get $1 + call $../../runtime/assembly/index/fls + i32.const 4 + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + else + local.get $1 + end + local.set $4 + local.get $4 + call $../../runtime/assembly/index/fls local.set $2 - local.get $1 + local.get $4 local.get $2 i32.const 4 i32.sub @@ -957,36 +977,18 @@ i32.sub i32.sub local.set $2 - local.get $3 - i32.const 16 - i32.const 1 - i32.sub - i32.lt_u - if - local.get $3 - i32.const 1 - i32.add - local.set $3 - else - local.get $2 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.set $3 - end end local.get $0 local.get $2 - call $../../compiler/runtime/asrt/getSLMap + call $../../runtime/assembly/index/getSLMap i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $4 - local.get $4 + local.set $5 + local.get $5 i32.eqz if local.get $0 @@ -999,48 +1001,48 @@ i32.add i32.shl i32.and - local.set $6 - local.get $6 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $5 + local.set $6 else - local.get $6 - call $../../compiler/runtime/asrt/ffs + local.get $4 + call $../../runtime/assembly/index/ffs local.set $2 local.get $0 local.get $2 - call $../../compiler/runtime/asrt/getSLMap - local.set $4 - local.get $4 + call $../../runtime/assembly/index/getSLMap + local.set $5 + local.get $5 i32.eqz if i32.const 0 i32.const 24 - i32.const 328 + i32.const 344 i32.const 17 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - local.get $4 - call $../../compiler/runtime/asrt/ffs - call $../../compiler/runtime/asrt/getHead - local.set $5 + local.get $5 + call $../../runtime/assembly/index/ffs + call $../../runtime/assembly/index/getHead + local.set $6 end else local.get $0 local.get $2 - local.get $4 - call $../../compiler/runtime/asrt/ffs - call $../../compiler/runtime/asrt/getHead - local.set $5 + local.get $5 + call $../../runtime/assembly/index/ffs + call $../../runtime/assembly/index/getHead + local.set $6 end - local.get $5 + local.get $6 ) - (func $../../compiler/runtime/asrt/growMemory (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $../../runtime/assembly/index/growMemory (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1090,10 +1092,10 @@ local.get $7 i32.const 16 i32.shl - call $../../compiler/runtime/asrt/addMemory + call $../../runtime/assembly/index/addMemory drop ) - (func $../../compiler/runtime/asrt/prepareBlock (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $../../runtime/assembly/index/prepareBlock (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1117,14 +1119,14 @@ if i32.const 0 i32.const 24 - i32.const 343 + i32.const 359 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 local.get $1 - call $../../compiler/runtime/asrt/removeBlock + call $../../runtime/assembly/index/removeBlock local.get $3 i32.const 3 i32.const -1 @@ -1161,7 +1163,7 @@ i32.store local.get $0 local.get $5 - call $../../compiler/runtime/asrt/insertBlock + call $../../runtime/assembly/index/insertBlock else local.get $1 local.get $3 @@ -1171,9 +1173,9 @@ i32.and i32.store local.get $1 - call $../../compiler/runtime/asrt/getRight + call $../../runtime/assembly/index/getRight local.get $1 - call $../../compiler/runtime/asrt/getRight + call $../../runtime/assembly/index/getRight i32.load i32.const 2 i32.const -1 @@ -1185,24 +1187,29 @@ i32.const 16 i32.add ) - (func $../../compiler/runtime/asrt/__mm_allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $../../runtime/assembly/index/__mm_allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - global.get $../../compiler/runtime/asrt/ROOT + global.get $../../runtime/assembly/index/ROOT local.set $1 local.get $1 i32.eqz if - call $../../compiler/runtime/asrt/initialize + call $../../runtime/assembly/index/initialize local.tee $1 - global.set $../../compiler/runtime/asrt/ROOT + global.set $../../runtime/assembly/index/ROOT end local.get $0 i32.const 1073741824 - i32.gt_u + i32.ge_u if + i32.const 0 + i32.const 24 + i32.const 498 + i32.const 29 + call $~lib/builtins/abort unreachable end local.get $0 @@ -1222,24 +1229,24 @@ local.set $0 local.get $1 local.get $0 - call $../../compiler/runtime/asrt/searchBlock + call $../../runtime/assembly/index/searchBlock local.set $4 local.get $4 i32.eqz if local.get $1 local.get $0 - call $../../compiler/runtime/asrt/growMemory + call $../../runtime/assembly/index/growMemory local.get $1 local.get $0 - call $../../compiler/runtime/asrt/searchBlock + call $../../runtime/assembly/index/searchBlock local.set $4 local.get $4 i32.eqz if i32.const 0 i32.const 24 - i32.const 495 + i32.const 504 i32.const 15 call $~lib/builtins/abort unreachable @@ -1257,7 +1264,7 @@ if i32.const 0 i32.const 24 - i32.const 497 + i32.const 506 i32.const 13 call $~lib/builtins/abort unreachable @@ -1274,13 +1281,13 @@ local.get $1 local.get $4 local.get $0 - call $../../compiler/runtime/asrt/prepareBlock + call $../../runtime/assembly/index/prepareBlock ) (func $assembly/index/memory.allocate (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $../../compiler/runtime/asrt/__mm_allocate + call $../../runtime/assembly/index/__mm_allocate ) - (func $../../compiler/runtime/asrt/freeBlock (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $../../runtime/assembly/index/freeBlock (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 i32.load @@ -1293,7 +1300,7 @@ if i32.const 0 i32.const 24 - i32.const 459 + i32.const 468 i32.const 2 call $~lib/builtins/abort unreachable @@ -1305,9 +1312,9 @@ i32.store local.get $0 local.get $1 - call $../../compiler/runtime/asrt/insertBlock + call $../../runtime/assembly/index/insertBlock ) - (func $../../compiler/runtime/asrt/__mm_free (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $../../runtime/assembly/index/__mm_free (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 if @@ -1319,12 +1326,12 @@ if i32.const 0 i32.const 24 - i32.const 508 + i32.const 517 i32.const 4 call $~lib/builtins/abort unreachable end - global.get $../../compiler/runtime/asrt/ROOT + global.get $../../runtime/assembly/index/ROOT local.set $1 local.get $1 if @@ -1332,14 +1339,277 @@ local.get $0 i32.const 16 i32.sub - call $../../compiler/runtime/asrt/freeBlock + call $../../runtime/assembly/index/freeBlock end end ) (func $assembly/index/memory.free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $../../compiler/runtime/asrt/__mm_free + call $../../runtime/assembly/index/__mm_free + ) + (func $~lib/memory/memory.fill (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 1 + i32.add + local.get $1 + i32.store8 + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $4 + local.get $0 + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 12 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 24 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 20 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.get $4 + i32.store + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + i32.sub + local.set $2 + local.get $4 + i64.extend_i32_u + local.get $4 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $6 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $6 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $6 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + end + br $continue|0 + end + end + end + end + ) + (func $assembly/index/memory.fill (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/memory/memory.fill ) - (func $null (; 24 ;) (type $FUNCSIG$v) + (func $null (; 26 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/allocators/runner.js b/tests/allocators/runner.js index 1a7bdaa5fb..b8d3963723 100644 --- a/tests/allocators/runner.js +++ b/tests/allocators/runner.js @@ -1,5 +1,3 @@ -const useFill = false; - function runner(exports, runs, allocs) { const alloc = exports["memory.allocate"]; const free = exports["memory.free"]; @@ -16,7 +14,7 @@ function runner(exports, runs, allocs) { if (!ptr) throw Error(); if ((ptr & 7) != 0) throw Error("invalid alignment: " + (ptr & 7) + " on " + ptr); if (ptrs.indexOf(ptr) >= 0) throw Error("duplicate pointer"); - if (useFill) fill(ptr, 0xdc, size); + if (fill) fill(ptr, ptr % 8, size); ptrs.push(ptr); return ptr; } @@ -86,14 +84,14 @@ function runner(exports, runs, allocs) { // SL+1 for allocations in TLSF var size = ((exports.memory.buffer.byteLength - base) * 9 / 10) >>> 0; var ptr = alloc(size); - if (useFill) fill(ptr, 0xac, size); + // if (fill) fill(ptr, 0xac, size); if (ptr !== base) throw Error("expected " + base + " but got " + ptr); free(ptr); } testMemChanged(); } } finally { - // mem(allocator.memory, 0, 0x10000); + // mem(exports.memory, 0, 0x800); } } diff --git a/tests/compiler/runtime/asrt.optimized.wat b/tests/compiler/runtime/asrt.optimized.wat deleted file mode 100644 index 1a537ab1e4..0000000000 --- a/tests/compiler/runtime/asrt.optimized.wat +++ /dev/null @@ -1,1461 +0,0 @@ -(module - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1e") - (data (i32.const 24) "r\00u\00n\00t\00i\00m\00e\00/\00a\00s\00r\00t\00.\00t\00s") - (data (i32.const 56) "\10\00\00\00\1c") - (data (i32.const 72) "~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") - (global $runtime/asrt/ROOT (mut i32) (i32.const 0)) - (global $runtime/asrt/CUR (mut i32) (i32.const 0)) - (global $runtime/asrt/ROOTS (mut i32) (i32.const 0)) - (export "memory" (memory $0)) - (export "__mm_allocate" (func $runtime/asrt/__mm_allocate)) - (export "__mm_free" (func $runtime/asrt/__mm_free)) - (export "__rt_visit" (func $runtime/asrt/__rt_visit)) - (export "__gc_retain" (func $runtime/asrt/__gc_retain)) - (export "__gc_release" (func $runtime/asrt/__gc_release)) - (export "__gc_collect" (func $runtime/asrt/collectCycles)) - (func $runtime/asrt/setSLMap (; 1 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 164 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.get $0 - i32.add - local.get $2 - i32.store offset=4 - ) - (func $runtime/asrt/setHead (; 2 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - local.get $2 - i32.const 16 - i32.lt_u - i32.const 0 - local.get $1 - i32.const 22 - i32.lt_u - select - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 178 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl - local.get $0 - i32.add - local.get $3 - i32.store offset=96 - ) - (func $runtime/asrt/getRight (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.load - local.tee $1 - i32.const -4 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 111 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 16 - i32.add - local.get $1 - i32.const -4 - i32.and - i32.add - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 113 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - ) - (func $runtime/asrt/fls (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 472 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - i32.const 31 - local.get $0 - i32.clz - i32.sub - ) - (func $runtime/asrt/getHead (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 - i32.const 16 - i32.lt_u - i32.const 0 - local.get $1 - i32.const 22 - i32.lt_u - select - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 169 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl - local.get $0 - i32.add - i32.load offset=96 - ) - (func $runtime/asrt/getSLMap (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - i32.const 22 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 159 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.get $0 - i32.add - i32.load offset=4 - ) - (func $runtime/asrt/removeBlock (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.load - local.tee $3 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 259 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const -4 - i32.and - local.tee $2 - i32.const 16 - i32.ge_u - if (result i32) - local.get $2 - i32.const 1073741824 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 261 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 256 - i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.div_u - local.set $4 - i32.const 0 - else - local.get $2 - local.get $2 - call $runtime/asrt/fls - local.tee $3 - i32.const 4 - i32.sub - i32.shr_u - i32.const 16 - i32.xor - local.set $4 - local.get $3 - i32.const 7 - i32.sub - end - local.set $3 - local.get $1 - i32.load offset=20 - local.set $2 - local.get $1 - i32.load offset=16 - local.tee $5 - if - local.get $5 - local.get $2 - i32.store offset=20 - end - local.get $2 - if - local.get $2 - local.get $5 - i32.store offset=16 - end - local.get $0 - local.get $3 - local.get $4 - call $runtime/asrt/getHead - local.get $1 - i32.eq - if - local.get $0 - local.get $3 - local.get $4 - local.get $2 - call $runtime/asrt/setHead - local.get $2 - i32.eqz - if - local.get $0 - local.get $3 - local.get $0 - local.get $3 - call $runtime/asrt/getSLMap - i32.const 1 - local.get $4 - i32.shl - i32.const -1 - i32.xor - i32.and - local.tee $1 - call $runtime/asrt/setSLMap - local.get $1 - i32.eqz - if - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $3 - i32.shl - i32.const -1 - i32.xor - i32.and - i32.store - end - end - end - ) - (func $runtime/asrt/getLeft (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const 2 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 102 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 4 - i32.sub - i32.load - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 104 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - ) - (func $runtime/asrt/insertBlock (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 194 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load - local.tee $3 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 196 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $runtime/asrt/getRight - local.tee $5 - i32.load - local.tee $4 - i32.const 1 - i32.and - if - local.get $0 - local.get $5 - call $runtime/asrt/removeBlock - local.get $1 - local.get $4 - i32.const -4 - i32.and - i32.const 16 - i32.add - local.get $3 - i32.add - local.tee $3 - i32.store - local.get $1 - call $runtime/asrt/getRight - local.tee $5 - i32.load - local.set $4 - end - local.get $3 - i32.const 2 - i32.and - if - local.get $1 - call $runtime/asrt/getLeft - local.tee $1 - i32.load - local.tee $2 - i32.const 1 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 214 - i32.const 15 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - call $runtime/asrt/removeBlock - local.get $1 - local.get $3 - i32.const -4 - i32.and - i32.const 16 - i32.add - local.get $2 - i32.add - local.tee $3 - i32.store - end - local.get $5 - local.get $4 - i32.const 2 - i32.or - i32.store - local.get $3 - i32.const -4 - i32.and - local.tee $2 - i32.const 16 - i32.ge_u - if (result i32) - local.get $2 - i32.const 1073741824 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 227 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $5 - local.get $1 - i32.const 16 - i32.add - local.get $2 - i32.add - i32.ne - if - i32.const 0 - i32.const 24 - i32.const 228 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 4 - i32.sub - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.const 256 - i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.div_u - local.set $2 - i32.const 0 - else - local.get $2 - local.get $2 - call $runtime/asrt/fls - local.tee $3 - i32.const 4 - i32.sub - i32.shr_u - i32.const 16 - i32.xor - local.set $2 - local.get $3 - i32.const 7 - i32.sub - end - local.tee $4 - local.get $2 - call $runtime/asrt/getHead - local.set $3 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - local.get $3 - i32.store offset=20 - local.get $3 - if - local.get $3 - local.get $1 - i32.store offset=16 - end - local.get $0 - local.get $4 - local.get $2 - local.get $1 - call $runtime/asrt/setHead - local.get $0 - local.get $0 - i32.load - i32.const 1 - local.get $4 - i32.shl - i32.or - i32.store - local.get $0 - local.get $4 - local.get $0 - local.get $4 - call $runtime/asrt/getSLMap - i32.const 1 - local.get $2 - i32.shl - i32.or - call $runtime/asrt/setSLMap - ) - (func $runtime/asrt/addMemory (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $2 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $1 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $1 - local.get $2 - i32.le_u - select - select - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 371 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=1504 - local.tee $3 - if - local.get $1 - local.get $3 - i32.const 16 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 24 - i32.const 381 - i32.const 15 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 16 - i32.sub - local.get $3 - i32.eq - if - local.get $3 - i32.load - local.set $4 - local.get $1 - i32.const 16 - i32.sub - local.set $1 - end - else - local.get $1 - local.get $0 - i32.const 1508 - i32.add - i32.lt_u - if - i32.const 0 - i32.const 24 - i32.const 393 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - end - local.get $2 - local.get $1 - i32.sub - local.tee $2 - i32.const 48 - i32.lt_u - if - return - end - local.get $1 - local.get $4 - i32.const 2 - i32.and - local.get $2 - i32.const 32 - i32.sub - i32.const 1 - i32.or - i32.or - i32.store - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $1 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.tee $2 - i32.const 2 - i32.store - local.get $0 - local.get $2 - i32.store offset=1504 - local.get $0 - local.get $1 - call $runtime/asrt/insertBlock - ) - (func $runtime/asrt/initialize (; 11 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - (local $1 i32) - i32.const 1 - current_memory - local.tee $0 - i32.gt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - grow_memory - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 112 - i32.const 0 - i32.store - i32.const 1616 - i32.const 0 - i32.store - i32.const 0 - local.set $0 - loop $repeat|0 - local.get $0 - i32.const 22 - i32.lt_u - if - i32.const 112 - local.get $0 - i32.const 0 - call $runtime/asrt/setSLMap - i32.const 0 - local.set $1 - loop $repeat|1 - local.get $1 - i32.const 16 - i32.lt_u - if - i32.const 112 - local.get $0 - local.get $1 - i32.const 0 - call $runtime/asrt/setHead - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $repeat|1 - end - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $repeat|0 - end - end - i32.const 112 - i32.const 1632 - current_memory - i32.const 16 - i32.shl - call $runtime/asrt/addMemory - i32.const 112 - ) - (func $runtime/asrt/ffs (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 466 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.ctz - ) - (func $runtime/asrt/searchBlock (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.const 256 - i32.lt_u - if (result i32) - local.get $1 - i32.const 16 - i32.div_u - else - local.get $1 - call $runtime/asrt/fls - local.tee $3 - i32.const 7 - i32.sub - local.set $2 - local.get $1 - local.get $3 - i32.const 4 - i32.sub - i32.shr_u - i32.const 16 - i32.xor - local.tee $1 - i32.const 15 - i32.lt_u - if (result i32) - local.get $1 - i32.const 1 - i32.add - else - local.get $2 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - end - end - local.set $1 - local.get $0 - local.get $2 - call $runtime/asrt/getSLMap - i32.const -1 - local.get $1 - i32.shl - i32.and - local.tee $1 - if (result i32) - local.get $0 - local.get $2 - local.get $1 - call $runtime/asrt/ffs - call $runtime/asrt/getHead - else - local.get $0 - i32.load - i32.const -1 - local.get $2 - i32.const 1 - i32.add - i32.shl - i32.and - local.tee $1 - if (result i32) - local.get $0 - local.get $1 - call $runtime/asrt/ffs - local.tee $1 - call $runtime/asrt/getSLMap - local.tee $2 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 328 - i32.const 17 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - local.get $2 - call $runtime/asrt/ffs - call $runtime/asrt/getHead - else - i32.const 0 - end - end - ) - (func $runtime/asrt/growMemory (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - current_memory - local.tee $2 - local.get $1 - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - grow_memory - i32.const 0 - i32.lt_s - if - local.get $1 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - current_memory - i32.const 16 - i32.shl - call $runtime/asrt/addMemory - ) - (func $runtime/asrt/prepareBlock (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.tee $3 - i32.const 1 - i32.and - if (result i32) - local.get $2 - i32.const 15 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 343 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - call $runtime/asrt/removeBlock - local.get $3 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $4 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $3 - i32.const 2 - i32.and - local.get $2 - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.get $2 - i32.add - local.tee $2 - local.get $4 - i32.const 16 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $2 - call $runtime/asrt/insertBlock - else - local.get $1 - local.get $3 - i32.const -2 - i32.and - i32.store - local.get $1 - call $runtime/asrt/getRight - local.get $1 - call $runtime/asrt/getRight - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 - i32.const 16 - i32.add - ) - (func $runtime/asrt/__mm_allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $runtime/asrt/ROOT - local.tee $1 - i32.eqz - if - call $runtime/asrt/initialize - local.tee $1 - global.set $runtime/asrt/ROOT - end - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - local.get $1 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $0 - i32.const 16 - local.get $0 - i32.const 16 - i32.gt_u - select - local.tee $2 - call $runtime/asrt/searchBlock - local.tee $0 - i32.eqz - if - local.get $1 - local.get $2 - call $runtime/asrt/growMemory - local.get $1 - local.get $2 - call $runtime/asrt/searchBlock - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 495 - i32.const 15 - call $~lib/builtins/abort - unreachable - end - end - local.get $0 - i32.load - i32.const -4 - i32.and - local.get $2 - i32.lt_u - if - i32.const 0 - i32.const 24 - i32.const 497 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - local.get $2 - i32.store offset=12 - local.get $1 - local.get $0 - local.get $2 - call $runtime/asrt/prepareBlock - ) - (func $runtime/asrt/freeBlock (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $1 - i32.load - local.tee $2 - i32.const 1 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 459 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $runtime/asrt/insertBlock - ) - (func $runtime/asrt/__mm_free (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - if - local.get $0 - i32.const 15 - i32.and - if - i32.const 0 - i32.const 24 - i32.const 508 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - global.get $runtime/asrt/ROOT - local.tee $1 - if - local.get $1 - local.get $0 - i32.const 16 - i32.sub - call $runtime/asrt/freeBlock - end - end - ) - (func $runtime/asrt/decrement (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - i32.const 268435455 - i32.and - local.tee $1 - i32.const 1 - i32.eq - if - unreachable - else - local.get $1 - i32.const 0 - i32.le_u - if - i32.const 0 - i32.const 24 - i32.const 631 - i32.const 15 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=8 - drop - unreachable - end - unreachable - ) - (func $runtime/asrt/scan (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const 1879048192 - i32.and - i32.const 268435456 - i32.eq - if - local.get $1 - i32.const 268435455 - i32.and - i32.const 0 - i32.gt_u - if - local.get $0 - local.get $0 - i32.load offset=4 - i32.const -1879048193 - i32.and - i32.store offset=4 - else - local.get $0 - local.get $1 - i32.const -1879048193 - i32.and - i32.const 536870912 - i32.or - i32.store offset=4 - end - unreachable - end - ) - (func $runtime/asrt/collectWhite (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const 1879048192 - i32.and - i32.const 536870912 - i32.eq - if (result i32) - local.get $1 - i32.const -2147483648 - i32.and - i32.eqz - else - i32.const 0 - end - if - unreachable - end - global.get $runtime/asrt/ROOT - local.get $0 - call $runtime/asrt/freeBlock - ) - (func $runtime/asrt/__rt_visit (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - block $break|0 - block $case5|0 - block $case4|0 - block $case3|0 - block $case2|0 - block $case1|0 - local.get $1 - i32.const 1 - i32.ne - if - local.get $1 - i32.const 2 - i32.eq - br_if $case1|0 - block $tablify|0 - local.get $1 - i32.const 3 - i32.sub - br_table $case2|0 $case3|0 $case4|0 $tablify|0 - end - br $case5|0 - end - local.get $0 - call $runtime/asrt/decrement - br $break|0 - end - local.get $0 - i32.load offset=4 - i32.const 268435455 - i32.and - i32.const 0 - i32.le_u - if - i32.const 0 - i32.const 24 - i32.const 586 - i32.const 17 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $0 - i32.load offset=4 - i32.const 1 - i32.sub - i32.store offset=4 - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const 1879048192 - i32.and - i32.const 268435456 - i32.ne - if - local.get $0 - local.get $1 - i32.const -1879048193 - i32.and - i32.const 268435456 - i32.or - i32.store offset=4 - unreachable - end - br $break|0 - end - local.get $0 - call $runtime/asrt/scan - br $break|0 - end - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 24 - i32.const 597 - i32.const 6 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - i32.const 1879048192 - i32.and - if - local.get $0 - local.get $0 - i32.load offset=4 - i32.const -1879048193 - i32.and - i32.store offset=4 - unreachable - end - br $break|0 - end - local.get $0 - call $runtime/asrt/collectWhite - br $break|0 - end - i32.const 0 - i32.const 24 - i32.const 608 - i32.const 24 - call $~lib/builtins/abort - unreachable - end - ) - (func $runtime/asrt/increment (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 24 - i32.const 615 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - ) - (func $runtime/asrt/__gc_retain (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - if - local.get $0 - i32.const 16 - i32.sub - call $runtime/asrt/increment - end - ) - (func $runtime/asrt/__gc_release (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - if - local.get $0 - i32.const 16 - i32.sub - call $runtime/asrt/decrement - end - ) - (func $runtime/asrt/collectCycles (; 26 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - global.get $runtime/asrt/ROOTS - local.tee $4 - local.tee $2 - local.set $3 - global.get $runtime/asrt/CUR - local.set $5 - loop $repeat|0 - local.get $3 - local.get $5 - i32.lt_u - if - local.get $3 - i32.load - local.tee $0 - i32.load offset=4 - local.tee $1 - i32.const 1879048192 - i32.and - i32.const 805306368 - i32.eq - if (result i32) - local.get $1 - i32.const 268435455 - i32.and - i32.const 0 - i32.gt_u - else - i32.const 0 - end - if - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const 1879048192 - i32.and - i32.const 268435456 - i32.ne - if - local.get $0 - local.get $1 - i32.const -1879048193 - i32.and - i32.const 268435456 - i32.or - i32.store offset=4 - unreachable - end - local.get $2 - local.get $0 - i32.store - local.get $2 - i32.const 4 - i32.add - local.set $2 - else - i32.const 0 - local.get $1 - i32.const 268435455 - i32.and - i32.eqz - local.get $1 - i32.const 1879048192 - i32.and - select - if - global.get $runtime/asrt/ROOT - local.get $0 - call $runtime/asrt/freeBlock - else - local.get $0 - local.get $1 - i32.const 2147483647 - i32.and - i32.store offset=4 - end - end - local.get $3 - i32.const 4 - i32.add - local.set $3 - br $repeat|0 - end - end - local.get $2 - global.set $runtime/asrt/CUR - local.get $4 - local.set $0 - loop $repeat|1 - local.get $0 - local.get $2 - i32.lt_u - if - local.get $0 - i32.load - call $runtime/asrt/scan - local.get $0 - i32.const 4 - i32.add - local.set $0 - br $repeat|1 - end - end - local.get $4 - local.set $0 - loop $repeat|2 - local.get $0 - local.get $2 - i32.lt_u - if - local.get $0 - i32.load - local.tee $1 - local.get $1 - i32.load offset=4 - i32.const 2147483647 - i32.and - i32.store offset=4 - local.get $1 - call $runtime/asrt/collectWhite - local.get $0 - i32.const 4 - i32.add - local.set $0 - br $repeat|2 - end - end - local.get $4 - global.set $runtime/asrt/CUR - ) - (func $null (; 27 ;) (type $FUNCSIG$v) - nop - ) -) diff --git a/tests/compiler/runtime/asrt.ts b/tests/runtime/assembly/index.ts similarity index 94% rename from tests/compiler/runtime/asrt.ts rename to tests/runtime/assembly/index.ts index 528df673b7..1b02f4afae 100644 --- a/tests/compiler/runtime/asrt.ts +++ b/tests/runtime/assembly/index.ts @@ -19,7 +19,7 @@ // 3 2 1 // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits // ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┴─┴─┴─╫─┴─┴─┴─┤ -// │ | FL │ SB = SL + AL │ ◄─ usize +// │ | FL │ SB = SL + AL │ ◄─ usize // └───────────────────────────────────────────────┴───────╨───────┘ // FL: first level, SL: second level, AL: alignment, SB: small block @@ -35,10 +35,21 @@ // @ts-ignore: decorator @inline -const FL_BITS: u32 = (sizeof() == sizeof() - ? 30 // ^= up to 1GB per block - : 32 // ^= up to 4GB per block -) - SB_BITS; +const FL_BITS: u32 = 31 - SB_BITS; + +// [00]: < 256B (SB) [12]: < 1M +// [01]: < 512B [13]: < 2M +// [02]: < 1K [14]: < 4M +// [03]: < 2K [15]: < 8M +// [04]: < 4K [16]: < 16M +// [05]: < 8K [17]: < 32M +// [06]: < 16K [18]: < 64M +// [07]: < 32K [19]: < 128M +// [08]: < 64K [20]: < 256M +// [09]: < 128K [21]: < 512M +// [10]: < 256K [22]: <= 1G - OVERHEAD +// [11]: < 512K +// VMs limit to 2GB total (currently), making one 1G block max (or three 512M etc.) due to block overhead // Tags stored in otherwise unused alignment bits @@ -95,7 +106,7 @@ const FL_BITS: u32 = (sizeof() == sizeof() // @ts-ignore: decorator @inline const BLOCK_MINSIZE: usize = (3 * sizeof() + AL_MASK) & ~AL_MASK;// prev + next + back // @ts-ignore: decorator -@inline const BLOCK_MAXSIZE: usize = 1 << (FL_BITS + SB_BITS); // 1GB if WASM32, 4GB if WASM64 +@inline const BLOCK_MAXSIZE: usize = 1 << (FL_BITS + SB_BITS - 1); // exclusive /** Gets the left block of a block. Only valid if the left block is free. */ function getLeft(block: Block): Block { @@ -200,11 +211,14 @@ function insertBlock(root: Root, block: Block): void { // merge with right block if also free if (rightInfo & FREE) { - removeBlock(root, right); - block.mmInfo = (blockInfo += BLOCK_OVERHEAD + (rightInfo & ~TAGS_MASK)); - right = getRight(block); - rightInfo = right.mmInfo; - // 'back' is set below + let newSize = (blockInfo & ~TAGS_MASK) + BLOCK_OVERHEAD + (rightInfo & ~TAGS_MASK); + if (newSize < BLOCK_MAXSIZE) { + removeBlock(root, right); + block.mmInfo = blockInfo = (blockInfo & TAGS_MASK) | newSize; + right = getRight(block); + rightInfo = right.mmInfo; + // 'back' is set below + } } // merge with left block if also free @@ -212,11 +226,13 @@ function insertBlock(root: Root, block: Block): void { let left = getLeft(block); let leftInfo = left.mmInfo; if (DEBUG) assert(leftInfo & FREE); // must be free according to right tags - removeBlock(root, left); - left.mmInfo = (leftInfo += BLOCK_OVERHEAD + (blockInfo & ~TAGS_MASK)); - block = left; - blockInfo = leftInfo; - // 'back' is set below + let newSize = (leftInfo & ~TAGS_MASK) + BLOCK_OVERHEAD + (blockInfo & ~TAGS_MASK); + if (newSize < BLOCK_MAXSIZE) { + removeBlock(root, left); + left.mmInfo = blockInfo = (leftInfo & TAGS_MASK) | newSize; + block = left; + // 'back' is set below + } } right.mmInfo = rightInfo | LEFTFREE; @@ -305,13 +321,13 @@ function searchBlock(root: Root, size: usize): Block | null { fl = 0; sl = (size / AL_SIZE); } else { - // (*) size += (1 << (fls(size) - SL_BITS)) - 1; - fl = fls(size); - sl = ((size >> (fl - SL_BITS)) ^ (1 << SL_BITS)); + const halfMaxSize = BLOCK_MAXSIZE >> 1; // don't round last fl + let requestSize = size < halfMaxSize + ? size + (1 << fls(size) - SL_BITS) - 1 + : size; + fl = fls(requestSize); + sl = ((requestSize >> (fl - SL_BITS)) ^ (1 << SL_BITS)); fl -= SB_BITS - 1; - // (*) instead of rounding up, use next second level list for better fit - if (sl < SL_SIZE - 1) ++sl; - else ++fl, sl = 0; } // search second level @@ -422,7 +438,7 @@ function growMemory(root: Root, size: usize): void { var pagesNeeded = (((size + 0xffff) & ~0xffff) >>> 16); var pagesWanted = max(pagesBefore, pagesNeeded); // double memory if (memory.grow(pagesWanted) < 0) { - if (memory.grow(pagesNeeded) < 0) unreachable(); // out of memory + if (memory.grow(pagesNeeded) < 0) unreachable(); } var pagesAfter = memory.size(); addMemory(root, pagesBefore << 16, pagesAfter << 16); @@ -430,13 +446,6 @@ function growMemory(root: Root, size: usize): void { /** Initilizes the root structure. */ function initialize(): Root { - if (DEBUG) { - assert( - SB_SIZE == 256 && // max size of a small block - FL_BITS == 22 && // number of second level maps - FL_BITS * SL_SIZE == 352 // number of heads - ); - } var rootOffset = (HEAP_BASE + AL_MASK) & ~AL_MASK; var pagesBefore = memory.size(); var pagesNeeded = ((((rootOffset + ROOT_SIZE) + 0xffff) & ~0xffff) >>> 16); @@ -486,8 +495,8 @@ function __mm_allocate(size: usize): usize { if (!root) ROOT = root = initialize(); // search for a suitable block - if (size > BLOCK_MAXSIZE) unreachable(); - size = max((size + AL_MASK) & ~AL_MASK, BLOCK_MINSIZE); // valid + if (size >= BLOCK_MAXSIZE) throw new Error("allocation too large"); + size = max((size + AL_MASK) & ~AL_MASK, BLOCK_MINSIZE); // align and ensure min size var block = searchBlock(root, size); if (!block) { growMemory(root, size); diff --git a/tests/runtime/assembly/tsconfig.json b/tests/runtime/assembly/tsconfig.json new file mode 100644 index 0000000000..6e52b21c48 --- /dev/null +++ b/tests/runtime/assembly/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../../../std/assembly.json", + "include": [ + "./**/*.ts" + ] +} diff --git a/tests/runtime/index.html b/tests/runtime/index.html new file mode 100644 index 0000000000..9eaabee061 --- /dev/null +++ b/tests/runtime/index.html @@ -0,0 +1,196 @@ + + + + +

AssemblyScript Runtime Visualizer

+

+ Notes: +

    +
  • It is expected that there is exactly one block on initialization. This is the remaining space (< 64K) within the last page after static data.
  • +
  • It is expected that if two adjacent blocks of size K are freed, the merged block doesn't go into the first level list for K*2 because its size is actually larger than that (K + OVERHEAD + K).
  • +
  • It is expected that if memory grows beyond 1GB, that even if all blocks are free'd there are at least two (or even three if the largest block is in the middle) remaining blocks, because a single block must not be larger than 1GB.
  • +
  • It is expected that after other operations have already been performed, being able to allocate 1GB can't be guaranteed anymore, even if there should be enough space left in absolute terms, because prior subdivision prevents it.
  • +
+

+ +

First level bitmap

+

The first level map is a bitmap determining whether free blocks exists in at least one of its respective second levels. In this implementation, the first bit indicates whether a small block (< 256B) exists. Each bit doubles the size.

+
+
+ +

Second level maps

+

Second level maps subdivide each first level into multiple lists of subsizes. Each one works similar to the first level bitmap.

+
+
+ +

Heads

+

The heads of the actual free lists, one per second level per first level. Values here are pointers into memory. Last item is the address of the special zero-size "used" tail block, which is usually the end of WASM memory minus block overhead.

+
+
+ +

Allocator

+

+ Click to allocate: +   + + +   + + + + + +   + +

+ +

Segments

+
+
diff --git a/tests/runtime/optimized.wat b/tests/runtime/optimized.wat new file mode 100644 index 0000000000..7f8383265a --- /dev/null +++ b/tests/runtime/optimized.wat @@ -0,0 +1,1067 @@ +(module + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00\"") + (data (i32.const 24) "a\00s\00s\00e\00m\00b\00l\00y\00/\00i\00n\00d\00e\00x\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00\1c") + (data (i32.const 80) "~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") + (global $assembly/index/ROOT (mut i32) (i32.const 0)) + (global $assembly/index/CUR (mut i32) (i32.const 0)) + (global $assembly/index/ROOTS (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "__mm_allocate" (func $assembly/index/__mm_allocate)) + (export "__mm_free" (func $assembly/index/__mm_free)) + (export "__rt_visit" (func $assembly/index/__rt_visit)) + (export "__gc_retain" (func $assembly/index/__gc_retain)) + (export "__gc_release" (func $assembly/index/__gc_release)) + (export "__gc_collect" (func $assembly/index/collectCycles)) + (func $assembly/index/setTail (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $assembly/index/setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $assembly/index/setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $assembly/index/getRight (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $assembly/index/fls (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $assembly/index/getHead (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $assembly/index/getSLMap (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) + (func $assembly/index/removeBlock (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + i32.const -4 + i32.and + local.tee $2 + i32.const 256 + i32.lt_u + if (result i32) + local.get $2 + i32.const 16 + i32.div_u + local.set $4 + i32.const 0 + else + local.get $2 + local.get $2 + call $assembly/index/fls + local.tee $3 + i32.const 4 + i32.sub + i32.shr_u + i32.const 16 + i32.xor + local.set $4 + local.get $3 + i32.const 7 + i32.sub + end + local.set $3 + local.get $1 + i32.load offset=20 + local.set $2 + local.get $1 + i32.load offset=16 + local.tee $5 + if + local.get $5 + local.get $2 + i32.store offset=20 + end + local.get $2 + if + local.get $2 + local.get $5 + i32.store offset=16 + end + local.get $0 + local.get $3 + local.get $4 + call $assembly/index/getHead + local.get $1 + i32.eq + if + local.get $0 + local.get $3 + local.get $4 + local.get $2 + call $assembly/index/setHead + local.get $2 + i32.eqz + if + local.get $0 + local.get $3 + local.get $0 + local.get $3 + call $assembly/index/getSLMap + i32.const 1 + local.get $4 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $1 + call $assembly/index/setSLMap + local.get $1 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $3 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $assembly/index/insertBlock (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $1 + i32.load + local.set $3 + local.get $1 + call $assembly/index/getRight + local.tee $4 + i32.load + local.tee $5 + i32.const 1 + i32.and + if + local.get $3 + i32.const -4 + i32.and + i32.const 16 + i32.add + local.get $5 + i32.const -4 + i32.and + i32.add + local.tee $2 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + local.get $4 + call $assembly/index/removeBlock + local.get $1 + local.get $3 + i32.const 3 + i32.and + local.get $2 + i32.or + local.tee $3 + i32.store + local.get $1 + call $assembly/index/getRight + local.tee $4 + i32.load + local.set $5 + end + end + local.get $3 + i32.const 2 + i32.and + if + local.get $1 + i32.const 4 + i32.sub + i32.load + local.tee $2 + i32.load + local.tee $6 + i32.const -4 + i32.and + i32.const 16 + i32.add + local.get $3 + i32.const -4 + i32.and + i32.add + local.tee $7 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + local.get $2 + call $assembly/index/removeBlock + local.get $2 + local.get $6 + i32.const 3 + i32.and + local.get $7 + i32.or + local.tee $3 + i32.store + local.get $2 + local.set $1 + end + end + local.get $4 + local.get $5 + i32.const 2 + i32.or + i32.store + local.get $4 + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $0 + local.get $3 + i32.const -4 + i32.and + local.tee $2 + i32.const 256 + i32.lt_u + if (result i32) + local.get $2 + i32.const 16 + i32.div_u + local.set $3 + i32.const 0 + else + local.get $2 + local.get $2 + call $assembly/index/fls + local.tee $2 + i32.const 4 + i32.sub + i32.shr_u + i32.const 16 + i32.xor + local.set $3 + local.get $2 + i32.const 7 + i32.sub + end + local.tee $2 + local.get $3 + call $assembly/index/getHead + local.set $4 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + local.get $4 + i32.store offset=20 + local.get $4 + if + local.get $4 + local.get $1 + i32.store offset=16 + end + local.get $0 + local.get $2 + local.get $3 + local.get $1 + call $assembly/index/setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $2 + i32.shl + i32.or + i32.store + local.get $0 + local.get $2 + local.get $0 + local.get $2 + call $assembly/index/getSLMap + i32.const 1 + local.get $3 + i32.shl + i32.or + call $assembly/index/setSLMap + ) + (func $assembly/index/addMemory (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + local.get $2 + block (result i32) + local.get $0 + i32.load offset=1568 + local.tee $2 + if + local.get $1 + i32.const 16 + i32.sub + local.get $2 + i32.eq + if + local.get $2 + i32.load + local.set $3 + local.get $1 + i32.const 16 + i32.sub + local.set $1 + end + end + local.get $1 + end + i32.sub + local.tee $2 + i32.const 48 + i32.lt_u + if + return + end + local.get $1 + local.get $3 + i32.const 2 + i32.and + local.get $2 + i32.const 32 + i32.sub + i32.const 1 + i32.or + i32.or + i32.store + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $1 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.tee $2 + i32.const 2 + i32.store + local.get $0 + local.get $2 + call $assembly/index/setTail + local.get $0 + local.get $1 + call $assembly/index/insertBlock + ) + (func $assembly/index/initialize (; 11 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 112 + local.tee $3 + i32.const 67107 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + current_memory + local.tee $0 + i32.gt_s + if (result i32) + local.get $1 + local.get $0 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + local.get $3 + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + call $assembly/index/setTail + loop $repeat|0 + block $break|0 + local.get $2 + i32.const 23 + i32.ge_u + br_if $break|0 + local.get $0 + local.get $2 + i32.const 0 + call $assembly/index/setSLMap + i32.const 0 + local.set $1 + loop $repeat|1 + block $break|1 + local.get $1 + i32.const 16 + i32.ge_u + br_if $break|1 + local.get $0 + local.get $2 + local.get $1 + i32.const 0 + call $assembly/index/setHead + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|1 + end + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + end + end + local.get $0 + local.get $3 + i32.const 1587 + i32.add + i32.const -16 + i32.and + current_memory + i32.const 16 + i32.shl + call $assembly/index/addMemory + local.get $0 + ) + (func $assembly/index/searchBlock (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.const 256 + i32.lt_u + if (result i32) + local.get $1 + i32.const 16 + i32.div_u + local.set $1 + i32.const 0 + else + block (result i32) + local.get $1 + i32.const 536870912 + i32.lt_u + if + local.get $1 + i32.const 1 + local.get $1 + call $assembly/index/fls + i32.const 4 + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.set $1 + end + local.get $1 + end + call $assembly/index/fls + local.set $2 + local.get $1 + local.get $2 + i32.const 4 + i32.sub + i32.shr_u + i32.const 16 + i32.xor + local.set $1 + local.get $2 + i32.const 7 + i32.sub + end + local.tee $2 + call $assembly/index/getSLMap + i32.const -1 + local.get $1 + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.ctz + call $assembly/index/getHead + else + local.get $0 + i32.load + i32.const -1 + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $1 + i32.ctz + local.tee $1 + local.get $0 + local.get $1 + call $assembly/index/getSLMap + i32.ctz + call $assembly/index/getHead + else + i32.const 0 + end + end + ) + (func $assembly/index/growMemory (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + current_memory + local.tee $2 + local.tee $3 + local.get $1 + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.tee $4 + local.get $3 + local.get $4 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $1 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + current_memory + i32.const 16 + i32.shl + call $assembly/index/addMemory + ) + (func $assembly/index/prepareBlock (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $1 + i32.load + local.set $3 + local.get $0 + local.get $1 + call $assembly/index/removeBlock + local.get $3 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $4 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.get $2 + i32.add + local.tee $2 + local.get $4 + i32.const 16 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $assembly/index/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + call $assembly/index/getRight + local.get $1 + call $assembly/index/getRight + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 + i32.const 16 + i32.add + ) + (func $assembly/index/__mm_allocate (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $assembly/index/ROOT + local.tee $2 + i32.eqz + if + call $assembly/index/initialize + local.tee $2 + global.set $assembly/index/ROOT + end + local.get $0 + i32.const 1073741824 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 498 + i32.const 29 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $0 + i32.const 16 + local.tee $1 + local.get $0 + local.get $1 + i32.gt_u + select + local.tee $1 + call $assembly/index/searchBlock + local.tee $0 + i32.eqz + if + local.get $2 + local.get $1 + call $assembly/index/growMemory + local.get $2 + local.get $1 + call $assembly/index/searchBlock + local.set $0 + end + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $2 + local.get $0 + local.get $1 + call $assembly/index/prepareBlock + ) + (func $assembly/index/freeBlock (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $assembly/index/insertBlock + ) + (func $assembly/index/__mm_free (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + if + global.get $assembly/index/ROOT + local.tee $1 + if + local.get $1 + local.get $0 + i32.const 16 + i32.sub + call $assembly/index/freeBlock + end + end + ) + (func $assembly/index/decrement (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.load offset=4 + i32.const 268435455 + i32.and + i32.const 1 + i32.eq + i32.eqz + if + local.get $0 + i32.load offset=8 + drop + end + unreachable + ) + (func $assembly/index/markGray (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const 1879048192 + i32.and + i32.const 268435456 + i32.ne + if + local.get $0 + local.get $1 + i32.const -1879048193 + i32.and + i32.const 268435456 + i32.or + i32.store offset=4 + unreachable + end + ) + (func $assembly/index/scanBlack (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + local.get $0 + i32.load offset=4 + i32.const -1879048193 + i32.and + i32.store offset=4 + unreachable + ) + (func $assembly/index/scan (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const 1879048192 + i32.and + i32.const 268435456 + i32.eq + if + local.get $1 + i32.const 268435455 + i32.and + i32.const 0 + i32.gt_u + if + local.get $0 + call $assembly/index/scanBlack + else + local.get $0 + local.get $1 + i32.const -1879048193 + i32.and + i32.const 536870912 + i32.or + i32.store offset=4 + unreachable + end + end + ) + (func $assembly/index/collectWhite (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -2147483648 + i32.and + i32.eqz + i32.const 0 + local.get $1 + i32.const 1879048192 + i32.and + i32.const 536870912 + i32.eq + select + if + unreachable + end + global.get $assembly/index/ROOT + local.get $0 + call $assembly/index/freeBlock + ) + (func $assembly/index/__rt_visit (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + block $break|0 + block $case4|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + local.get $1 + i32.const 1 + i32.sub + br_table $case0|0 $case1|0 $case2|0 $case3|0 $case4|0 $break|0 + end + local.get $0 + call $assembly/index/decrement + br $break|0 + end + local.get $0 + local.get $0 + i32.load offset=4 + i32.const 1 + i32.sub + i32.store offset=4 + local.get $0 + call $assembly/index/markGray + br $break|0 + end + local.get $0 + call $assembly/index/scan + br $break|0 + end + local.get $0 + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + i32.const 1879048192 + i32.and + if + local.get $0 + call $assembly/index/scanBlack + end + br $break|0 + end + local.get $0 + call $assembly/index/collectWhite + end + ) + (func $assembly/index/__gc_retain (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + if + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + local.get $0 + i32.load offset=4 + i32.const 1 + i32.add + i32.store offset=4 + end + ) + (func $assembly/index/__gc_release (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + if + local.get $0 + i32.const 16 + i32.sub + call $assembly/index/decrement + end + ) + (func $assembly/index/collectCycles (; 26 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + global.get $assembly/index/ROOTS + local.tee $5 + local.tee $2 + local.set $3 + global.get $assembly/index/CUR + local.set $0 + loop $repeat|0 + block $break|0 + local.get $3 + local.get $0 + i32.ge_u + br_if $break|0 + local.get $3 + i32.load + local.tee $4 + i32.load offset=4 + local.tee $1 + i32.const 268435455 + i32.and + i32.const 0 + i32.gt_u + i32.const 0 + local.get $1 + i32.const 1879048192 + i32.and + i32.const 805306368 + i32.eq + select + if + local.get $4 + call $assembly/index/markGray + local.get $2 + local.get $4 + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + else + i32.const 0 + local.get $1 + i32.const 268435455 + i32.and + i32.eqz + local.get $1 + i32.const 1879048192 + i32.and + select + if + global.get $assembly/index/ROOT + local.get $4 + call $assembly/index/freeBlock + else + local.get $4 + local.get $1 + i32.const 2147483647 + i32.and + i32.store offset=4 + end + end + local.get $3 + i32.const 4 + i32.add + local.set $3 + br $repeat|0 + end + end + local.get $2 + global.set $assembly/index/CUR + local.get $5 + local.set $0 + loop $repeat|1 + block $break|1 + local.get $0 + local.get $2 + i32.ge_u + br_if $break|1 + local.get $0 + i32.load + call $assembly/index/scan + local.get $0 + i32.const 4 + i32.add + local.set $0 + br $repeat|1 + end + end + local.get $5 + local.set $0 + loop $repeat|2 + block $break|2 + local.get $0 + local.get $2 + i32.ge_u + br_if $break|2 + local.get $0 + i32.load + local.tee $1 + local.get $1 + i32.load offset=4 + i32.const 2147483647 + i32.and + i32.store offset=4 + local.get $1 + call $assembly/index/collectWhite + local.get $0 + i32.const 4 + i32.add + local.set $0 + br $repeat|2 + end + end + local.get $5 + global.set $assembly/index/CUR + ) + (func $null (; 27 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/runtime/package-lock.json b/tests/runtime/package-lock.json new file mode 100644 index 0000000000..166100d470 --- /dev/null +++ b/tests/runtime/package-lock.json @@ -0,0 +1,213 @@ +{ + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", + "dev": true + }, + "corser": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz", + "integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=", + "dev": true + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ecstatic": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/ecstatic/-/ecstatic-3.3.1.tgz", + "integrity": "sha512-/rrctvxZ78HMI/tPIsqdvFKHHscxR3IJuKrZI2ZoUgkt2SiufyLFBmcco+aqQBIu6P1qBsUNG3drAAGLx80vTQ==", + "dev": true, + "requires": { + "he": "^1.1.1", + "mime": "^1.6.0", + "minimist": "^1.1.0", + "url-join": "^2.0.5" + } + }, + "eventemitter3": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", + "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==", + "dev": true + }, + "follow-redirects": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz", + "integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==", + "dev": true, + "requires": { + "debug": "^3.2.6" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "http-proxy": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", + "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", + "dev": true, + "requires": { + "eventemitter3": "^3.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + } + }, + "http-server": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/http-server/-/http-server-0.11.1.tgz", + "integrity": "sha512-6JeGDGoujJLmhjiRGlt8yK8Z9Kl0vnl/dQoQZlc4oeqaUoAKQg94NILLfrY3oWzSyFaQCVNTcKE5PZ3cH8VP9w==", + "dev": true, + "requires": { + "colors": "1.0.3", + "corser": "~2.0.0", + "ecstatic": "^3.0.0", + "http-proxy": "^1.8.1", + "opener": "~1.4.0", + "optimist": "0.6.x", + "portfinder": "^1.0.13", + "union": "~0.4.3" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "opener": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.4.3.tgz", + "integrity": "sha1-XG2ixdflgx6P+jlklQ+NZnSskLg=", + "dev": true + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + } + } + }, + "portfinder": { + "version": "1.0.20", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.20.tgz", + "integrity": "sha512-Yxe4mTyDzTd59PZJY4ojZR8F+E5e97iq2ZOHPz3HDgSvYC5siNad2tLooQ5y5QHyQhc3xVqvyk/eNA3wuoa7Sw==", + "dev": true, + "requires": { + "async": "^1.5.2", + "debug": "^2.2.0", + "mkdirp": "0.5.x" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "qs": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz", + "integrity": "sha1-6eha2+ddoLvkyOBHaghikPhjtAQ=", + "dev": true + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true + }, + "union": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/union/-/union-0.4.6.tgz", + "integrity": "sha1-GY+9rrolTniLDvy2MLwR8kopWeA=", + "dev": true, + "requires": { + "qs": "~2.3.3" + } + }, + "url-join": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz", + "integrity": "sha1-WvIvGMBSoACkjXuCxenC4v7tpyg=", + "dev": true + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + } + } +} diff --git a/tests/runtime/package.json b/tests/runtime/package.json new file mode 100644 index 0000000000..e82de9a00c --- /dev/null +++ b/tests/runtime/package.json @@ -0,0 +1,12 @@ +{ + "private": true, + "scripts": { + "server": "http-server . -o -c-1", + "build": "npm run build:untouched && npm run build:optimized", + "build:untouched": "node ../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --runtime none --validate --sourceMap --measure", + "build:optimized": "node ../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --runtime none --validate --sourceMap --measure --noAssert --optimize" + }, + "devDependencies": { + "http-server": "^0.11.1" + } +} diff --git a/tests/compiler/runtime/asrt.untouched.wat b/tests/runtime/untouched.wat similarity index 77% rename from tests/compiler/runtime/asrt.untouched.wat rename to tests/runtime/untouched.wat index fc57017406..b825141090 100644 --- a/tests/compiler/runtime/asrt.untouched.wat +++ b/tests/runtime/untouched.wat @@ -1,46 +1,46 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00r\00u\00n\00t\00i\00m\00e\00/\00a\00s\00r\00t\00.\00t\00s\00") - (data (i32.const 56) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00i\00n\00d\00e\00x\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $runtime/asrt/ROOT (mut i32) (i32.const 0)) - (global $runtime/asrt/ACYCLIC_FLAG i32 (i32.const 0)) - (global $runtime/asrt/CUR (mut i32) (i32.const 0)) - (global $runtime/asrt/END (mut i32) (i32.const 0)) - (global $runtime/asrt/ROOTS (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 100)) + (global $assembly/index/ROOT (mut i32) (i32.const 0)) + (global $assembly/index/ACYCLIC_FLAG i32 (i32.const 0)) + (global $assembly/index/CUR (mut i32) (i32.const 0)) + (global $assembly/index/END (mut i32) (i32.const 0)) + (global $assembly/index/ROOTS (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 108)) (export "memory" (memory $0)) - (export "__mm_allocate" (func $runtime/asrt/__mm_allocate)) - (export "__mm_free" (func $runtime/asrt/__mm_free)) - (export "__rt_visit" (func $runtime/asrt/__rt_visit)) - (export "__gc_retain" (func $runtime/asrt/__gc_retain)) - (export "__gc_release" (func $runtime/asrt/__gc_release)) - (export "__gc_collect" (func $runtime/asrt/collectCycles)) - (func $runtime/asrt/setTail (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (export "__mm_allocate" (func $assembly/index/__mm_allocate)) + (export "__mm_free" (func $assembly/index/__mm_free)) + (export "__rt_visit" (func $assembly/index/__rt_visit)) + (export "__gc_retain" (func $assembly/index/__gc_retain)) + (export "__gc_release" (func $assembly/index/__gc_release)) + (export "__gc_collect" (func $assembly/index/collectCycles)) + (func $assembly/index/setTail (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=1504 + i32.store offset=1568 ) - (func $runtime/asrt/setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $assembly/index/setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 - i32.const 22 + i32.const 23 i32.lt_u i32.eqz if i32.const 0 i32.const 24 - i32.const 164 + i32.const 175 i32.const 13 call $~lib/builtins/abort unreachable @@ -53,9 +53,9 @@ local.get $2 i32.store offset=4 ) - (func $runtime/asrt/setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/index/setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 - i32.const 22 + i32.const 23 i32.lt_u if (result i32) local.get $2 @@ -68,7 +68,7 @@ if i32.const 0 i32.const 24 - i32.const 178 + i32.const 189 i32.const 13 call $~lib/builtins/abort unreachable @@ -85,11 +85,11 @@ local.get $3 i32.store offset=96 ) - (func $runtime/asrt/getTail (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/getTail (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load offset=1504 + i32.load offset=1568 ) - (func $runtime/asrt/getRight (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/getRight (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -104,7 +104,7 @@ if i32.const 0 i32.const 24 - i32.const 111 + i32.const 122 i32.const 13 call $~lib/builtins/abort unreachable @@ -124,14 +124,14 @@ if i32.const 0 i32.const 24 - i32.const 113 + i32.const 124 i32.const 13 call $~lib/builtins/abort unreachable end local.get $2 ) - (func $runtime/asrt/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -139,7 +139,7 @@ if i32.const 0 i32.const 24 - i32.const 472 + i32.const 481 i32.const 13 call $~lib/builtins/abort unreachable @@ -149,9 +149,9 @@ i32.clz i32.sub ) - (func $runtime/asrt/getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $assembly/index/getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 - i32.const 22 + i32.const 23 i32.lt_u if (result i32) local.get $2 @@ -164,7 +164,7 @@ if i32.const 0 i32.const 24 - i32.const 169 + i32.const 180 i32.const 13 call $~lib/builtins/abort unreachable @@ -180,15 +180,15 @@ i32.add i32.load offset=96 ) - (func $runtime/asrt/getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $assembly/index/getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 - i32.const 22 + i32.const 23 i32.lt_u i32.eqz if i32.const 0 i32.const 24 - i32.const 159 + i32.const 170 i32.const 13 call $~lib/builtins/abort unreachable @@ -200,7 +200,7 @@ i32.add i32.load offset=4 ) - (func $runtime/asrt/removeBlock (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/removeBlock (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -218,7 +218,7 @@ if i32.const 0 i32.const 24 - i32.const 259 + i32.const 275 i32.const 13 call $~lib/builtins/abort unreachable @@ -243,7 +243,7 @@ if i32.const 0 i32.const 24 - i32.const 261 + i32.const 277 i32.const 13 call $~lib/builtins/abort unreachable @@ -260,7 +260,7 @@ local.set $5 else local.get $3 - call $runtime/asrt/fls + call $assembly/index/fls local.set $4 local.get $3 local.get $4 @@ -301,20 +301,20 @@ local.get $0 local.get $4 local.get $5 - call $runtime/asrt/getHead + call $assembly/index/getHead i32.eq if local.get $0 local.get $4 local.get $5 local.get $7 - call $runtime/asrt/setHead + call $assembly/index/setHead local.get $7 i32.eqz if local.get $0 local.get $4 - call $runtime/asrt/getSLMap + call $assembly/index/getSLMap local.set $8 local.get $0 local.get $4 @@ -326,7 +326,7 @@ i32.xor i32.and local.tee $8 - call $runtime/asrt/setSLMap + call $assembly/index/setSLMap local.get $8 i32.eqz if @@ -344,7 +344,7 @@ end end ) - (func $runtime/asrt/getLeft (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/getLeft (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -354,7 +354,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 113 i32.const 13 call $~lib/builtins/abort unreachable @@ -369,14 +369,14 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 115 i32.const 13 call $~lib/builtins/abort unreachable end local.get $1 ) - (func $runtime/asrt/insertBlock (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/insertBlock (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -386,12 +386,13 @@ (local $8 i32) (local $9 i32) (local $10 i32) + (local $11 i32) local.get $1 i32.eqz if i32.const 0 i32.const 24 - i32.const 194 + i32.const 205 i32.const 13 call $~lib/builtins/abort unreachable @@ -406,13 +407,13 @@ if i32.const 0 i32.const 24 - i32.const 196 + i32.const 207 i32.const 13 call $~lib/builtins/abort unreachable end local.get $1 - call $runtime/asrt/getRight + call $assembly/index/getRight local.set $3 local.get $3 i32.load @@ -421,34 +422,49 @@ i32.const 1 i32.and if - local.get $0 - local.get $3 - call $runtime/asrt/removeBlock - local.get $1 local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and i32.const 16 + i32.add local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - i32.add - local.tee $2 - i32.store - local.get $1 - call $runtime/asrt/getRight - local.set $3 - local.get $3 - i32.load - local.set $4 + local.set $5 + local.get $5 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + local.get $3 + call $assembly/index/removeBlock + local.get $1 + local.get $2 + i32.const 3 + i32.and + local.get $5 + i32.or + local.tee $2 + i32.store + local.get $1 + call $assembly/index/getRight + local.set $3 + local.get $3 + i32.load + local.set $4 + end end local.get $2 i32.const 2 i32.and if local.get $1 - call $runtime/asrt/getLeft + call $assembly/index/getLeft local.set $5 local.get $5 i32.load @@ -460,30 +476,43 @@ if i32.const 0 i32.const 24 - i32.const 214 + i32.const 228 i32.const 15 call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 - call $runtime/asrt/removeBlock - local.get $5 local.get $6 + i32.const 3 + i32.const -1 + i32.xor + i32.and i32.const 16 + i32.add local.get $2 i32.const 3 i32.const -1 i32.xor i32.and i32.add - i32.add - local.tee $6 - i32.store - local.get $5 - local.set $1 - local.get $6 - local.set $2 + local.set $7 + local.get $7 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + local.get $5 + call $assembly/index/removeBlock + local.get $5 + local.get $6 + i32.const 3 + i32.and + local.get $7 + i32.or + local.tee $2 + i32.store + local.get $5 + local.set $1 + end end local.get $3 local.get $4 @@ -495,12 +524,12 @@ i32.const -1 i32.xor i32.and - local.set $7 - local.get $7 + local.set $8 + local.get $8 i32.const 16 i32.ge_u if (result i32) - local.get $7 + local.get $8 i32.const 1073741824 i32.lt_u else @@ -510,7 +539,7 @@ if i32.const 0 i32.const 24 - i32.const 227 + i32.const 243 i32.const 13 call $~lib/builtins/abort unreachable @@ -518,7 +547,7 @@ local.get $1 i32.const 16 i32.add - local.get $7 + local.get $8 i32.add local.get $3 i32.eq @@ -526,7 +555,7 @@ if i32.const 0 i32.const 24 - i32.const 228 + i32.const 244 i32.const 13 call $~lib/builtins/abort unreachable @@ -536,22 +565,22 @@ i32.sub local.get $1 i32.store - local.get $7 + local.get $8 i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $9 + local.get $8 i32.const 16 i32.div_u - local.set $9 + local.set $10 else - local.get $7 - call $runtime/asrt/fls - local.set $8 - local.get $7 local.get $8 + call $assembly/index/fls + local.set $9 + local.get $8 + local.get $9 i32.const 4 i32.sub i32.shr_u @@ -559,56 +588,56 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $10 + local.get $9 i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $9 end local.get $0 - local.get $8 local.get $9 - call $runtime/asrt/getHead - local.set $10 + local.get $10 + call $assembly/index/getHead + local.set $11 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $10 + local.get $11 i32.store offset=20 - local.get $10 + local.get $11 if - local.get $10 + local.get $11 local.get $1 i32.store offset=16 end local.get $0 - local.get $8 local.get $9 + local.get $10 local.get $1 - call $runtime/asrt/setHead + call $assembly/index/setHead local.get $0 local.get $0 i32.load i32.const 1 - local.get $8 + local.get $9 i32.shl i32.or i32.store local.get $0 - local.get $8 + local.get $9 local.get $0 - local.get $8 - call $runtime/asrt/getSLMap - i32.const 1 local.get $9 + call $assembly/index/getSLMap + i32.const 1 + local.get $10 i32.shl i32.or - call $runtime/asrt/setSLMap + call $assembly/index/setSLMap ) - (func $runtime/asrt/addMemory (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $assembly/index/addMemory (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -637,13 +666,13 @@ if i32.const 0 i32.const 24 - i32.const 371 + i32.const 387 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 - call $runtime/asrt/getTail + call $assembly/index/getTail local.set $3 i32.const 0 local.set $4 @@ -658,7 +687,7 @@ if i32.const 0 i32.const 24 - i32.const 381 + i32.const 397 i32.const 15 call $~lib/builtins/abort unreachable @@ -682,14 +711,14 @@ else local.get $1 local.get $0 - i32.const 1508 + i32.const 1572 i32.add i32.ge_u i32.eqz if i32.const 0 i32.const 24 - i32.const 393 + i32.const 409 i32.const 4 call $~lib/builtins/abort unreachable @@ -746,47 +775,19 @@ i32.store local.get $0 local.get $3 - call $runtime/asrt/setTail + call $assembly/index/setTail local.get $0 local.get $7 - call $runtime/asrt/insertBlock + call $assembly/index/insertBlock i32.const 1 ) - (func $runtime/asrt/initialize (; 13 ;) (type $FUNCSIG$i) (result i32) + (func $assembly/index/initialize (; 13 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - i32.const 256 - i32.const 256 - i32.eq - if (result i32) - i32.const 22 - i32.const 22 - i32.eq - else - i32.const 0 - end - if (result i32) - i32.const 22 - i32.const 16 - i32.mul - i32.const 352 - i32.eq - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 434 - i32.const 4 - call $~lib/builtins/abort - unreachable - end global.get $~lib/memory/HEAP_BASE i32.const 15 i32.add @@ -798,7 +799,7 @@ current_memory local.set $1 local.get $0 - i32.const 1508 + i32.const 1572 i32.add i32.const 65535 i32.add @@ -832,13 +833,13 @@ i32.store local.get $3 i32.const 0 - call $runtime/asrt/setTail + call $assembly/index/setTail block $break|0 i32.const 0 local.set $4 loop $repeat|0 local.get $4 - i32.const 22 + i32.const 23 i32.lt_u i32.eqz br_if $break|0 @@ -846,7 +847,7 @@ local.get $3 local.get $4 i32.const 0 - call $runtime/asrt/setSLMap + call $assembly/index/setSLMap block $break|1 i32.const 0 local.set $5 @@ -860,7 +861,7 @@ local.get $4 local.get $5 i32.const 0 - call $runtime/asrt/setHead + call $assembly/index/setHead local.get $5 i32.const 1 i32.add @@ -882,7 +883,7 @@ end local.get $3 local.get $0 - i32.const 1508 + i32.const 1572 i32.add i32.const 15 i32.add @@ -893,11 +894,11 @@ current_memory i32.const 16 i32.shl - call $runtime/asrt/addMemory + call $assembly/index/addMemory drop local.get $3 ) - (func $runtime/asrt/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -905,7 +906,7 @@ if i32.const 0 i32.const 24 - i32.const 466 + i32.const 475 i32.const 13 call $~lib/builtins/abort unreachable @@ -913,7 +914,7 @@ local.get $0 i32.ctz ) - (func $runtime/asrt/ffs (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/ffs (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -921,7 +922,7 @@ if i32.const 0 i32.const 24 - i32.const 466 + i32.const 475 i32.const 13 call $~lib/builtins/abort unreachable @@ -929,7 +930,7 @@ local.get $0 i32.ctz ) - (func $runtime/asrt/searchBlock (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $assembly/index/searchBlock (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -947,9 +948,27 @@ local.set $3 else local.get $1 - call $runtime/asrt/fls + i32.const 536870912 + i32.lt_u + if (result i32) + local.get $1 + i32.const 1 + local.get $1 + call $assembly/index/fls + i32.const 4 + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + else + local.get $1 + end + local.set $4 + local.get $4 + call $assembly/index/fls local.set $2 - local.get $1 + local.get $4 local.get $2 i32.const 4 i32.sub @@ -965,36 +984,18 @@ i32.sub i32.sub local.set $2 - local.get $3 - i32.const 16 - i32.const 1 - i32.sub - i32.lt_u - if - local.get $3 - i32.const 1 - i32.add - local.set $3 - else - local.get $2 - i32.const 1 - i32.add - local.set $2 - i32.const 0 - local.set $3 - end end local.get $0 local.get $2 - call $runtime/asrt/getSLMap + call $assembly/index/getSLMap i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $4 - local.get $4 + local.set $5 + local.get $5 i32.eqz if local.get $0 @@ -1007,48 +1008,48 @@ i32.add i32.shl i32.and - local.set $6 - local.get $6 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $5 + local.set $6 else - local.get $6 - call $runtime/asrt/ffs + local.get $4 + call $assembly/index/ffs local.set $2 local.get $0 local.get $2 - call $runtime/asrt/getSLMap - local.set $4 - local.get $4 + call $assembly/index/getSLMap + local.set $5 + local.get $5 i32.eqz if i32.const 0 i32.const 24 - i32.const 328 + i32.const 344 i32.const 17 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - local.get $4 - call $runtime/asrt/ffs - call $runtime/asrt/getHead - local.set $5 + local.get $5 + call $assembly/index/ffs + call $assembly/index/getHead + local.set $6 end else local.get $0 local.get $2 - local.get $4 - call $runtime/asrt/ffs - call $runtime/asrt/getHead - local.set $5 + local.get $5 + call $assembly/index/ffs + call $assembly/index/getHead + local.set $6 end - local.get $5 + local.get $6 ) - (func $runtime/asrt/growMemory (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/growMemory (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1098,10 +1099,10 @@ local.get $7 i32.const 16 i32.shl - call $runtime/asrt/addMemory + call $assembly/index/addMemory drop ) - (func $runtime/asrt/prepareBlock (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $assembly/index/prepareBlock (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1125,14 +1126,14 @@ if i32.const 0 i32.const 24 - i32.const 343 + i32.const 359 i32.const 4 call $~lib/builtins/abort unreachable end local.get $0 local.get $1 - call $runtime/asrt/removeBlock + call $assembly/index/removeBlock local.get $3 i32.const 3 i32.const -1 @@ -1169,7 +1170,7 @@ i32.store local.get $0 local.get $5 - call $runtime/asrt/insertBlock + call $assembly/index/insertBlock else local.get $1 local.get $3 @@ -1179,9 +1180,9 @@ i32.and i32.store local.get $1 - call $runtime/asrt/getRight + call $assembly/index/getRight local.get $1 - call $runtime/asrt/getRight + call $assembly/index/getRight i32.load i32.const 2 i32.const -1 @@ -1193,24 +1194,29 @@ i32.const 16 i32.add ) - (func $runtime/asrt/__mm_allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/__mm_allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - global.get $runtime/asrt/ROOT + global.get $assembly/index/ROOT local.set $1 local.get $1 i32.eqz if - call $runtime/asrt/initialize + call $assembly/index/initialize local.tee $1 - global.set $runtime/asrt/ROOT + global.set $assembly/index/ROOT end local.get $0 i32.const 1073741824 - i32.gt_u + i32.ge_u if + i32.const 0 + i32.const 24 + i32.const 498 + i32.const 29 + call $~lib/builtins/abort unreachable end local.get $0 @@ -1230,24 +1236,24 @@ local.set $0 local.get $1 local.get $0 - call $runtime/asrt/searchBlock + call $assembly/index/searchBlock local.set $4 local.get $4 i32.eqz if local.get $1 local.get $0 - call $runtime/asrt/growMemory + call $assembly/index/growMemory local.get $1 local.get $0 - call $runtime/asrt/searchBlock + call $assembly/index/searchBlock local.set $4 local.get $4 i32.eqz if i32.const 0 i32.const 24 - i32.const 495 + i32.const 504 i32.const 15 call $~lib/builtins/abort unreachable @@ -1265,7 +1271,7 @@ if i32.const 0 i32.const 24 - i32.const 497 + i32.const 506 i32.const 13 call $~lib/builtins/abort unreachable @@ -1282,9 +1288,9 @@ local.get $1 local.get $4 local.get $0 - call $runtime/asrt/prepareBlock + call $assembly/index/prepareBlock ) - (func $runtime/asrt/freeBlock (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/freeBlock (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 i32.load @@ -1297,7 +1303,7 @@ if i32.const 0 i32.const 24 - i32.const 459 + i32.const 468 i32.const 2 call $~lib/builtins/abort unreachable @@ -1309,9 +1315,9 @@ i32.store local.get $0 local.get $1 - call $runtime/asrt/insertBlock + call $assembly/index/insertBlock ) - (func $runtime/asrt/__mm_free (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/__mm_free (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 if @@ -1323,12 +1329,12 @@ if i32.const 0 i32.const 24 - i32.const 508 + i32.const 517 i32.const 4 call $~lib/builtins/abort unreachable end - global.get $runtime/asrt/ROOT + global.get $assembly/index/ROOT local.set $1 local.get $1 if @@ -1336,19 +1342,19 @@ local.get $0 i32.const 16 i32.sub - call $runtime/asrt/freeBlock + call $assembly/index/freeBlock end end ) - (func $runtime/asrt/__rt_visit_members (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/__rt_visit_members (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) unreachable ) - (func $runtime/asrt/__rt_flags (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/__rt_flags (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) unreachable ) (func $~lib/memory/memory.allocate (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 - i32.const 72 + i32.const 80 i32.const 61 i32.const 9 call $~lib/builtins/abort @@ -1563,16 +1569,16 @@ end end ) - (func $runtime/asrt/growRoots (; 26 ;) (type $FUNCSIG$v) + (func $assembly/index/growRoots (; 26 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - global.get $runtime/asrt/ROOTS + global.get $assembly/index/ROOTS local.set $0 - global.get $runtime/asrt/CUR + global.get $assembly/index/CUR local.get $0 i32.sub local.set $1 @@ -1597,26 +1603,26 @@ local.get $1 call $~lib/memory/memory.copy local.get $5 - global.set $runtime/asrt/ROOTS + global.set $assembly/index/ROOTS local.get $5 local.get $1 i32.add - global.set $runtime/asrt/CUR + global.set $assembly/index/CUR local.get $5 local.get $4 i32.add - global.set $runtime/asrt/END + global.set $assembly/index/END ) - (func $runtime/asrt/appendRoot (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/appendRoot (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) - global.get $runtime/asrt/CUR + global.get $assembly/index/CUR local.set $1 local.get $1 - global.get $runtime/asrt/END + global.get $assembly/index/END i32.ge_u if - call $runtime/asrt/growRoots - global.get $runtime/asrt/CUR + call $assembly/index/growRoots + global.get $assembly/index/CUR local.set $1 end local.get $1 @@ -1625,9 +1631,9 @@ local.get $1 i32.const 1 i32.add - global.set $runtime/asrt/CUR + global.set $assembly/index/CUR ) - (func $runtime/asrt/decrement (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/decrement (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1643,15 +1649,15 @@ if local.get $0 i32.const 1 - call $runtime/asrt/__rt_visit_members + call $assembly/index/__rt_visit_members local.get $1 i32.const -2147483648 i32.and i32.eqz if - global.get $runtime/asrt/ROOT + global.get $assembly/index/ROOT local.get $0 - call $runtime/asrt/freeBlock + call $assembly/index/freeBlock else local.get $0 i32.const -2147483648 @@ -1669,15 +1675,15 @@ if i32.const 0 i32.const 24 - i32.const 631 + i32.const 640 i32.const 15 call $~lib/builtins/abort unreachable end local.get $0 i32.load offset=8 - call $runtime/asrt/__rt_flags - global.get $runtime/asrt/ACYCLIC_FLAG + call $assembly/index/__rt_flags + global.get $assembly/index/ACYCLIC_FLAG i32.and i32.eqz if @@ -1696,7 +1702,7 @@ i32.eqz if local.get $0 - call $runtime/asrt/appendRoot + call $assembly/index/appendRoot end else local.get $0 @@ -1713,7 +1719,7 @@ end end ) - (func $runtime/asrt/markGray (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/markGray (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1735,10 +1741,10 @@ i32.store offset=4 local.get $0 i32.const 2 - call $runtime/asrt/__rt_visit_members + call $assembly/index/__rt_visit_members end ) - (func $runtime/asrt/scanBlack (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/scanBlack (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.load offset=4 @@ -1751,9 +1757,9 @@ i32.store offset=4 local.get $0 i32.const 4 - call $runtime/asrt/__rt_visit_members + call $assembly/index/__rt_visit_members ) - (func $runtime/asrt/scan (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/scan (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1771,7 +1777,7 @@ i32.gt_u if local.get $0 - call $runtime/asrt/scanBlack + call $assembly/index/scanBlack else local.get $0 local.get $1 @@ -1784,11 +1790,11 @@ i32.store offset=4 local.get $0 i32.const 3 - call $runtime/asrt/__rt_visit_members + call $assembly/index/__rt_visit_members end end ) - (func $runtime/asrt/collectWhite (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/collectWhite (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1809,13 +1815,13 @@ if local.get $0 i32.const 5 - call $runtime/asrt/__rt_visit_members + call $assembly/index/__rt_visit_members end - global.get $runtime/asrt/ROOT + global.get $assembly/index/ROOT local.get $0 - call $runtime/asrt/freeBlock + call $assembly/index/freeBlock ) - (func $runtime/asrt/__rt_visit (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/__rt_visit (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $break|0 block $case5|0 @@ -1850,7 +1856,7 @@ end block local.get $0 - call $runtime/asrt/decrement + call $assembly/index/decrement br $break|0 unreachable end @@ -1867,7 +1873,7 @@ if i32.const 0 i32.const 24 - i32.const 586 + i32.const 595 i32.const 17 call $~lib/builtins/abort unreachable @@ -1879,7 +1885,7 @@ i32.sub i32.store offset=4 local.get $0 - call $runtime/asrt/markGray + call $assembly/index/markGray br $break|0 unreachable end @@ -1887,7 +1893,7 @@ end block local.get $0 - call $runtime/asrt/scan + call $assembly/index/scan br $break|0 unreachable end @@ -1914,7 +1920,7 @@ if i32.const 0 i32.const 24 - i32.const 597 + i32.const 606 i32.const 6 call $~lib/builtins/abort unreachable @@ -1931,7 +1937,7 @@ i32.ne if local.get $0 - call $runtime/asrt/scanBlack + call $assembly/index/scanBlack end br $break|0 unreachable @@ -1940,7 +1946,7 @@ end block local.get $0 - call $runtime/asrt/collectWhite + call $assembly/index/collectWhite br $break|0 unreachable end @@ -1951,14 +1957,14 @@ if i32.const 0 i32.const 24 - i32.const 608 + i32.const 617 i32.const 24 call $~lib/builtins/abort unreachable end end ) - (func $runtime/asrt/increment (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/increment (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1980,7 +1986,7 @@ if i32.const 0 i32.const 24 - i32.const 615 + i32.const 624 i32.const 2 call $~lib/builtins/abort unreachable @@ -1991,32 +1997,32 @@ i32.add i32.store offset=4 ) - (func $runtime/asrt/__gc_retain (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/__gc_retain (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 if local.get $0 i32.const 16 i32.sub - call $runtime/asrt/increment + call $assembly/index/increment end ) - (func $runtime/asrt/__gc_release (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/__gc_release (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 if local.get $0 i32.const 16 i32.sub - call $runtime/asrt/decrement + call $assembly/index/decrement end ) - (func $runtime/asrt/collectCycles (; 37 ;) (type $FUNCSIG$v) + (func $assembly/index/collectCycles (; 37 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - global.get $runtime/asrt/ROOTS + global.get $assembly/index/ROOTS local.set $0 local.get $0 local.set $1 @@ -2024,7 +2030,7 @@ block local.get $1 local.set $2 - global.get $runtime/asrt/CUR + global.get $assembly/index/CUR local.set $3 end loop $repeat|0 @@ -2056,7 +2062,7 @@ end if local.get $4 - call $runtime/asrt/markGray + call $assembly/index/markGray local.get $1 local.get $4 i32.store @@ -2079,9 +2085,9 @@ i32.const 0 end if - global.get $runtime/asrt/ROOT + global.get $assembly/index/ROOT local.get $4 - call $runtime/asrt/freeBlock + call $assembly/index/freeBlock else local.get $4 local.get $5 @@ -2103,7 +2109,7 @@ unreachable end local.get $1 - global.set $runtime/asrt/CUR + global.set $assembly/index/CUR block $break|1 local.get $0 local.set $3 @@ -2115,7 +2121,7 @@ br_if $break|1 local.get $3 i32.load - call $runtime/asrt/scan + call $assembly/index/scan local.get $3 i32.const 4 i32.add @@ -2147,7 +2153,7 @@ i32.and i32.store offset=4 local.get $2 - call $runtime/asrt/collectWhite + call $assembly/index/collectWhite end local.get $3 i32.const 4 @@ -2159,7 +2165,7 @@ unreachable end local.get $0 - global.set $runtime/asrt/CUR + global.set $assembly/index/CUR ) (func $null (; 38 ;) (type $FUNCSIG$v) ) From 0ba0d8ae7a12843e02ab05e47a5d2d3ad57d4d34 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 16 Apr 2019 19:15:08 +0200 Subject: [PATCH 112/119] crunch functions seems useful to keep the number of runtime functions in a user's binary to a minimum --- tests/runtime/assembly/index.ts | 69 ++- tests/runtime/optimized.wat | 342 ++++++----- tests/runtime/untouched.wat | 976 ++++++++++++++++++-------------- 3 files changed, 767 insertions(+), 620 deletions(-) diff --git a/tests/runtime/assembly/index.ts b/tests/runtime/assembly/index.ts index 1b02f4afae..1323056628 100644 --- a/tests/runtime/assembly/index.ts +++ b/tests/runtime/assembly/index.ts @@ -15,6 +15,23 @@ /////////////////////// The TLSF (Two-Level Segregate Fit) memory allocator /////////////////////// // see: http://www.gii.upv.es/tlsf/ +/** Determines the first (LSB to MSB) set bit's index of a word. */ +// @ts-ignore: decorator +@inline +function ffs(word: T): T { + return ctz(word); // for word != 0 +} + +/** Determines the last (LSB to MSB) set bit's index of a word. */ +// @ts-ignore: decorator +@inline +function fls(word: T): T { + // @ts-ignore: type + const inv: T = sizeof() * 8 - 1; + // @ts-ignore: type + return inv - clz(word); +} + // ╒══════════════ Block size interpretation (32-bit) ═════════════╕ // 3 2 1 // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits @@ -34,8 +51,7 @@ @inline const SB_SIZE: usize = 1 << SB_BITS; // @ts-ignore: decorator -@inline -const FL_BITS: u32 = 31 - SB_BITS; +@inline const FL_BITS: u32 = 31 - SB_BITS; // [00]: < 256B (SB) [12]: < 1M // [01]: < 512B [13]: < 2M @@ -109,20 +125,17 @@ const FL_BITS: u32 = 31 - SB_BITS; @inline const BLOCK_MAXSIZE: usize = 1 << (FL_BITS + SB_BITS - 1); // exclusive /** Gets the left block of a block. Only valid if the left block is free. */ +// @ts-ignore: decorator +@inline function getLeft(block: Block): Block { - if (DEBUG) assert(block.mmInfo & LEFTFREE); // left must be free or it doesn't contain 'back' - var left = load(changetype(block) - sizeof()); - if (DEBUG) assert(left); - return left; + return load(changetype(block) - sizeof()); } /** Gets the right block of of a block by advancing to the right by its size. */ +// @ts-ignore: decorator +@inline function getRight(block: Block): Block { - var mmInfo = block.mmInfo; - if (DEBUG) assert(mmInfo & ~TAGS_MASK); // can't skip beyond the tail block (the only valid empty block) - var right = changetype(changetype(block) + BLOCK_OVERHEAD + (mmInfo & ~TAGS_MASK)); - if (DEBUG) assert(right); - return right; + return changetype(changetype(block) + BLOCK_OVERHEAD + (block.mmInfo & ~TAGS_MASK)); } // ╒═════════════════════ Root layout (32-bit) ════════════════════╕ @@ -166,18 +179,21 @@ function getRight(block: Block): Block { var ROOT: Root; +// @ts-ignore: decorator +@inline function getSLMap(root: Root, fl: usize): u32 { - if (DEBUG) assert(fl < FL_BITS); // fl out of range return load(changetype(root) + (fl << alignof()), SL_START); } +// @ts-ignore: decorator +@inline function setSLMap(root: Root, fl: usize, value: u32): void { - if (DEBUG) assert(fl < FL_BITS); // fl out of range store(changetype(root) + (fl << alignof()), value, SL_START); } +// @ts-ignore: decorator +@inline function getHead(root: Root, fl: usize, sl: u32): Block | null { - if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range return changetype( load( changetype(root) + (fl * SL_SIZE + sl) * sizeof(), @@ -185,17 +201,22 @@ function getHead(root: Root, fl: usize, sl: u32): Block | null { ); } +// @ts-ignore: decorator +@inline function setHead(root: Root, fl: usize, sl: u32, value: Block | null): void { - if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range store( changetype(root) + (fl * SL_SIZE + sl) * sizeof() , changetype(value), HL_START); } +// @ts-ignore: decorator +@inline function getTail(root: Root): Block { return load(changetype(root), HL_END); } +// @ts-ignore: decorator +@inline function setTail(root: Root, tail: Block): void { store(changetype(root), tail, HL_END); } @@ -256,6 +277,7 @@ function insertBlock(root: Root, block: Block): void { sl = ((size >> (fl - SL_BITS)) ^ (1 << SL_BITS)); fl -= SB_BITS - 1; } + if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range // perform insertion var head = getHead(root, fl, sl); @@ -286,6 +308,7 @@ function removeBlock(root: Root, block: Block): void { sl = ((size >> (fl - SL_BITS)) ^ (1 << SL_BITS)); fl -= SB_BITS - 1; } + if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range // link previous and next free block var prev = block.prev; @@ -329,6 +352,7 @@ function searchBlock(root: Root, size: usize): Block | null { sl = ((requestSize >> (fl - SL_BITS)) ^ (1 << SL_BITS)); fl -= SB_BITS - 1; } + if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range // search second level var slMap = getSLMap(root, fl) & (~0 << sl); @@ -470,21 +494,6 @@ function freeBlock(root: Root, block: Block): void { insertBlock(root, block); } -/** Determines the first (LSB to MSB) set bit's index of a word. */ -function ffs(word: T): T { - if (DEBUG) assert(word != 0); // word cannot be 0 - return ctz(word); // differs from ffs only for 0 -} - -/** Determines the last (LSB to MSB) set bit's index of a word. */ -function fls(word: T): T { - if (DEBUG) assert(word != 0); // word cannot be 0 - // @ts-ignore: type - const inv: T = (sizeof() << 3) - 1; - // @ts-ignore: type - return inv - clz(word); -} - // Memory manager interface. // @ts-ignore: decorator diff --git a/tests/runtime/optimized.wat b/tests/runtime/optimized.wat index 7f8383265a..143fac1fe0 100644 --- a/tests/runtime/optimized.wat +++ b/tests/runtime/optimized.wat @@ -1,13 +1,13 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\10\00\00\00\"") @@ -24,70 +24,7 @@ (export "__gc_retain" (func $assembly/index/__gc_retain)) (export "__gc_release" (func $assembly/index/__gc_release)) (export "__gc_collect" (func $assembly/index/collectCycles)) - (func $assembly/index/setTail (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=1568 - ) - (func $assembly/index/setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) - (func $assembly/index/setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - local.get $0 - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - ) - (func $assembly/index/getRight (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) - (func $assembly/index/fls (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 31 - local.get $0 - i32.clz - i32.sub - ) - (func $assembly/index/getHead (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - ) - (func $assembly/index/getSLMap (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) - (func $assembly/index/removeBlock (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/removeBlock (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -107,8 +44,10 @@ i32.const 0 else local.get $2 + i32.const 31 local.get $2 - call $assembly/index/fls + i32.clz + i32.sub local.tee $3 i32.const 4 i32.sub @@ -138,26 +77,44 @@ local.get $5 i32.store offset=16 end + local.get $1 local.get $0 local.get $3 + i32.const 4 + i32.shl local.get $4 - call $assembly/index/getHead - local.get $1 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 i32.eq if local.get $0 local.get $3 + i32.const 4 + i32.shl local.get $4 + i32.add + i32.const 2 + i32.shl + i32.add local.get $2 - call $assembly/index/setHead + i32.store offset=96 local.get $2 i32.eqz if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $assembly/index/getSLMap + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $4 i32.shl @@ -165,7 +122,7 @@ i32.xor i32.and local.tee $1 - call $assembly/index/setSLMap + i32.store offset=4 local.get $1 i32.eqz if @@ -183,7 +140,7 @@ end end ) - (func $assembly/index/insertBlock (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/insertBlock (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -192,16 +149,22 @@ (local $7 i32) local.get $1 i32.load - local.set $3 + local.set $2 local.get $1 - call $assembly/index/getRight + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $4 i32.load local.tee $5 i32.const 1 i32.and if - local.get $3 + local.get $2 i32.const -4 i32.and i32.const 16 @@ -210,7 +173,7 @@ i32.const -4 i32.and i32.add - local.tee $2 + local.tee $3 i32.const 1073741824 i32.lt_u if @@ -218,21 +181,27 @@ local.get $4 call $assembly/index/removeBlock local.get $1 - local.get $3 + local.get $2 i32.const 3 i32.and - local.get $2 + local.get $3 i32.or - local.tee $3 + local.tee $2 i32.store local.get $1 - call $assembly/index/getRight + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $4 i32.load local.set $5 end end - local.get $3 + local.get $2 i32.const 2 i32.and if @@ -240,14 +209,14 @@ i32.const 4 i32.sub i32.load - local.tee $2 + local.tee $3 i32.load local.tee $6 i32.const -4 i32.and i32.const 16 i32.add - local.get $3 + local.get $2 i32.const -4 i32.and i32.add @@ -256,17 +225,17 @@ i32.lt_u if local.get $0 - local.get $2 + local.get $3 call $assembly/index/removeBlock - local.get $2 + local.get $3 local.get $6 i32.const 3 i32.and local.get $7 i32.or - local.tee $3 + local.tee $2 i32.store - local.get $2 + local.get $3 local.set $1 end end @@ -280,8 +249,7 @@ i32.sub local.get $1 i32.store - local.get $0 - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -291,26 +259,36 @@ local.get $2 i32.const 16 i32.div_u - local.set $3 + local.set $2 i32.const 0 else local.get $2 + i32.const 31 local.get $2 - call $assembly/index/fls - local.tee $2 + i32.clz + i32.sub + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $3 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end - local.tee $2 + local.set $3 + local.get $0 local.get $3 - call $assembly/index/getHead + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 local.set $4 local.get $1 i32.const 0 @@ -325,30 +303,42 @@ i32.store offset=16 end local.get $0 - local.get $2 local.get $3 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add local.get $1 - call $assembly/index/setHead + i32.store offset=96 local.get $0 local.get $0 i32.load i32.const 1 - local.get $2 + local.get $3 i32.shl i32.or i32.store local.get $0 - local.get $2 + local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 - local.get $2 - call $assembly/index/getSLMap - i32.const 1 local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + i32.const 1 + local.get $2 i32.shl i32.or - call $assembly/index/setSLMap + i32.store offset=4 ) - (func $assembly/index/addMemory (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $assembly/index/addMemory (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $2 block (result i32) @@ -407,12 +397,12 @@ i32.store local.get $0 local.get $2 - call $assembly/index/setTail + i32.store offset=1568 local.get $0 local.get $1 call $assembly/index/insertBlock ) - (func $assembly/index/initialize (; 11 ;) (type $FUNCSIG$i) (result i32) + (func $assembly/index/initialize (; 4 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -448,7 +438,7 @@ i32.store local.get $0 i32.const 0 - call $assembly/index/setTail + i32.store offset=1568 loop $repeat|0 block $break|0 local.get $2 @@ -457,8 +447,11 @@ br_if $break|0 local.get $0 local.get $2 + i32.const 2 + i32.shl + i32.add i32.const 0 - call $assembly/index/setSLMap + i32.store offset=4 i32.const 0 local.set $1 loop $repeat|1 @@ -469,9 +462,15 @@ br_if $break|1 local.get $0 local.get $2 + i32.const 4 + i32.shl local.get $1 + i32.add + i32.const 2 + i32.shl + i32.add i32.const 0 - call $assembly/index/setHead + i32.store offset=96 local.get $1 i32.const 1 i32.add @@ -498,7 +497,7 @@ call $assembly/index/addMemory local.get $0 ) - (func $assembly/index/searchBlock (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $assembly/index/searchBlock (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -511,26 +510,25 @@ local.set $1 i32.const 0 else - block (result i32) - local.get $1 - i32.const 536870912 - i32.lt_u - if - local.get $1 - i32.const 1 - local.get $1 - call $assembly/index/fls - i32.const 4 - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 - end - call $assembly/index/fls + i32.const 31 + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 + local.get $1 + i32.const 536870912 + i32.lt_u + select + local.tee $1 + i32.clz + i32.sub local.set $2 local.get $1 local.get $2 @@ -545,7 +543,10 @@ i32.sub end local.tee $2 - call $assembly/index/getSLMap + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -553,10 +554,16 @@ local.tee $1 if (result i32) local.get $0 - local.get $2 local.get $1 i32.ctz - call $assembly/index/getHead + local.get $2 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 else local.get $0 i32.load @@ -568,21 +575,30 @@ i32.and local.tee $1 if (result i32) + local.get $0 local.get $0 local.get $1 i32.ctz local.tee $1 - local.get $0 - local.get $1 - call $assembly/index/getSLMap + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.ctz - call $assembly/index/getHead + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 else i32.const 0 end end ) - (func $assembly/index/growMemory (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/growMemory (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -623,7 +639,7 @@ i32.shl call $assembly/index/addMemory ) - (func $assembly/index/prepareBlock (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $assembly/index/prepareBlock (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -670,9 +686,21 @@ i32.and i32.store local.get $1 - call $assembly/index/getRight + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.get $1 - call $assembly/index/getRight + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add i32.load i32.const -3 i32.and @@ -682,7 +710,7 @@ i32.const 16 i32.add ) - (func $assembly/index/__mm_allocate (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/__mm_allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) global.get $assembly/index/ROOT @@ -699,7 +727,7 @@ if i32.const 0 i32.const 24 - i32.const 498 + i32.const 507 i32.const 29 call $~lib/builtins/abort unreachable @@ -744,7 +772,7 @@ local.get $1 call $assembly/index/prepareBlock ) - (func $assembly/index/freeBlock (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/freeBlock (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -755,7 +783,7 @@ local.get $1 call $assembly/index/insertBlock ) - (func $assembly/index/__mm_free (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/__mm_free (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 if @@ -770,7 +798,7 @@ end end ) - (func $assembly/index/decrement (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/decrement (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load offset=4 i32.const 268435455 @@ -785,7 +813,7 @@ end unreachable ) - (func $assembly/index/markGray (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/markGray (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -805,7 +833,7 @@ unreachable end ) - (func $assembly/index/scanBlack (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/scanBlack (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.load offset=4 @@ -814,7 +842,7 @@ i32.store offset=4 unreachable ) - (func $assembly/index/scan (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/scan (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -844,7 +872,7 @@ end end ) - (func $assembly/index/collectWhite (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/collectWhite (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -866,7 +894,7 @@ local.get $0 call $assembly/index/freeBlock ) - (func $assembly/index/__rt_visit (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/__rt_visit (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $break|0 block $case4|0 block $case3|0 @@ -916,7 +944,7 @@ call $assembly/index/collectWhite end ) - (func $assembly/index/__gc_retain (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/__gc_retain (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 if local.get $0 @@ -930,7 +958,7 @@ i32.store offset=4 end ) - (func $assembly/index/__gc_release (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/__gc_release (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 if local.get $0 @@ -939,7 +967,7 @@ call $assembly/index/decrement end ) - (func $assembly/index/collectCycles (; 26 ;) (type $FUNCSIG$v) + (func $assembly/index/collectCycles (; 19 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1061,7 +1089,7 @@ local.get $5 global.set $assembly/index/CUR ) - (func $null (; 27 ;) (type $FUNCSIG$v) + (func $null (; 20 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/runtime/untouched.wat b/tests/runtime/untouched.wat index b825141090..43c3a7e141 100644 --- a/tests/runtime/untouched.wat +++ b/tests/runtime/untouched.wat @@ -1,13 +1,13 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\10\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00i\00n\00d\00e\00x\00.\00t\00s\00") @@ -27,180 +27,7 @@ (export "__gc_retain" (func $assembly/index/__gc_retain)) (export "__gc_release" (func $assembly/index/__gc_release)) (export "__gc_collect" (func $assembly/index/collectCycles)) - (func $assembly/index/setTail (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=1568 - ) - (func $assembly/index/setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - i32.const 23 - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 175 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) - (func $assembly/index/setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - local.get $1 - i32.const 23 - i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 189 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 16 - i32.mul - local.get $2 - i32.add - i32.const 4 - i32.mul - i32.add - local.get $3 - i32.store offset=96 - ) - (func $assembly/index/getTail (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=1568 - ) - (func $assembly/index/getRight (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load - local.set $1 - local.get $1 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 122 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 16 - i32.add - local.get $1 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $2 - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 124 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $2 - ) - (func $assembly/index/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 481 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - i32.const 31 - local.get $0 - i32.clz - i32.sub - ) - (func $assembly/index/getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $1 - i32.const 23 - i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 180 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 16 - i32.mul - local.get $2 - i32.add - i32.const 4 - i32.mul - i32.add - i32.load offset=96 - ) - (func $assembly/index/getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - i32.const 23 - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 170 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) - (func $assembly/index/removeBlock (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/removeBlock (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -208,6 +35,9 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) local.get $1 i32.load local.set $2 @@ -218,7 +48,7 @@ if i32.const 0 i32.const 24 - i32.const 275 + i32.const 297 i32.const 13 call $~lib/builtins/abort unreachable @@ -243,7 +73,7 @@ if i32.const 0 i32.const 24 - i32.const 277 + i32.const 299 i32.const 13 call $~lib/builtins/abort unreachable @@ -259,8 +89,14 @@ i32.div_u local.set $5 else - local.get $3 - call $assembly/index/fls + block $assembly/index/fls|inlined.0 (result i32) + local.get $3 + local.set $6 + i32.const 31 + local.get $6 + i32.clz + i32.sub + end local.set $4 local.get $3 local.get $4 @@ -279,55 +115,124 @@ i32.sub local.set $4 end + local.get $4 + i32.const 23 + i32.lt_u + if (result i32) + local.get $5 + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 311 + i32.const 13 + call $~lib/builtins/abort + unreachable + end local.get $1 i32.load offset=16 - local.set $6 + local.set $7 local.get $1 i32.load offset=20 - local.set $7 - local.get $6 + local.set $8 + local.get $7 if - local.get $6 local.get $7 + local.get $8 i32.store offset=20 end - local.get $7 + local.get $8 if + local.get $8 local.get $7 - local.get $6 i32.store offset=16 end local.get $1 - local.get $0 - local.get $4 - local.get $5 - call $assembly/index/getHead - i32.eq - if + block $assembly/index/getHead|inlined.1 (result i32) local.get $0 + local.set $10 local.get $4 + local.set $9 local.get $5 - local.get $7 - call $assembly/index/setHead - local.get $7 - i32.eqz - if - local.get $0 - local.get $4 - call $assembly/index/getSLMap - local.set $8 + local.set $6 + local.get $10 + local.get $9 + i32.const 16 + i32.mul + local.get $6 + i32.add + i32.const 4 + i32.mul + i32.add + i32.load offset=96 + end + i32.eq + if + block $assembly/index/setHead|inlined.1 local.get $0 + local.set $11 local.get $4 - local.get $8 - i32.const 1 + local.set $10 local.get $5 - i32.shl - i32.const -1 - i32.xor - i32.and - local.tee $8 - call $assembly/index/setSLMap + local.set $9 local.get $8 + local.set $6 + local.get $11 + local.get $10 + i32.const 16 + i32.mul + local.get $9 + i32.add + i32.const 4 + i32.mul + i32.add + local.get $6 + i32.store offset=96 + end + local.get $8 + i32.eqz + if + block $assembly/index/getSLMap|inlined.0 (result i32) + local.get $0 + local.set $9 + local.get $4 + local.set $6 + local.get $9 + local.get $6 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + end + local.set $6 + block $assembly/index/setSLMap|inlined.1 + local.get $0 + local.set $11 + local.get $4 + local.set $10 + local.get $6 + i32.const 1 + local.get $5 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $6 + local.set $9 + local.get $11 + local.get $10 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store offset=4 + end + local.get $6 i32.eqz if local.get $0 @@ -344,39 +249,7 @@ end end ) - (func $assembly/index/getLeft (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.load - i32.const 2 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 113 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 4 - i32.sub - i32.load - local.set $1 - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 115 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $1 - ) - (func $assembly/index/insertBlock (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/insertBlock (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -387,12 +260,14 @@ (local $9 i32) (local $10 i32) (local $11 i32) + (local $12 i32) + (local $13 i32) local.get $1 i32.eqz if i32.const 0 i32.const 24 - i32.const 205 + i32.const 226 i32.const 13 call $~lib/builtins/abort unreachable @@ -407,18 +282,30 @@ if i32.const 0 i32.const 24 - i32.const 207 + i32.const 228 i32.const 13 call $~lib/builtins/abort unreachable end - local.get $1 - call $assembly/index/getRight - local.set $3 - local.get $3 - i32.load + block $assembly/index/getRight|inlined.0 (result i32) + local.get $1 + local.set $3 + local.get $3 + i32.const 16 + i32.add + local.get $3 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + end local.set $4 local.get $4 + i32.load + local.set $5 + local.get $5 i32.const 1 i32.and if @@ -429,44 +316,62 @@ i32.and i32.const 16 i32.add - local.get $4 + local.get $5 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $5 - local.get $5 + local.set $3 + local.get $3 i32.const 1073741824 i32.lt_u if local.get $0 - local.get $3 + local.get $4 call $assembly/index/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $5 + local.get $3 i32.or local.tee $2 i32.store - local.get $1 - call $assembly/index/getRight - local.set $3 - local.get $3 - i32.load + block $assembly/index/getRight|inlined.1 (result i32) + local.get $1 + local.set $6 + local.get $6 + i32.const 16 + i32.add + local.get $6 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + end local.set $4 + local.get $4 + i32.load + local.set $5 end end local.get $2 i32.const 2 i32.and if - local.get $1 - call $assembly/index/getLeft - local.set $5 - local.get $5 + block $assembly/index/getLeft|inlined.0 (result i32) + local.get $1 + local.set $3 + local.get $3 + i32.const 4 + i32.sub + i32.load + end + local.set $3 + local.get $3 i32.load local.set $6 local.get $6 @@ -476,7 +381,7 @@ if i32.const 0 i32.const 24 - i32.const 228 + i32.const 249 i32.const 15 call $~lib/builtins/abort unreachable @@ -500,9 +405,9 @@ i32.lt_u if local.get $0 - local.get $5 + local.get $3 call $assembly/index/removeBlock - local.get $5 + local.get $3 local.get $6 i32.const 3 i32.and @@ -510,12 +415,12 @@ i32.or local.tee $2 i32.store - local.get $5 + local.get $3 local.set $1 end end - local.get $3 local.get $4 + local.get $5 i32.const 2 i32.or i32.store @@ -539,7 +444,7 @@ if i32.const 0 i32.const 24 - i32.const 243 + i32.const 264 i32.const 13 call $~lib/builtins/abort unreachable @@ -549,18 +454,18 @@ i32.add local.get $8 i32.add - local.get $3 + local.get $4 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 244 + i32.const 265 i32.const 13 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 4 i32.sub local.get $1 @@ -576,8 +481,14 @@ i32.div_u local.set $10 else - local.get $8 - call $assembly/index/fls + block $assembly/index/fls|inlined.1 (result i32) + local.get $8 + local.set $7 + i32.const 31 + local.get $7 + i32.clz + i32.sub + end local.set $9 local.get $8 local.get $9 @@ -596,10 +507,43 @@ i32.sub local.set $9 end - local.get $0 local.get $9 - local.get $10 - call $assembly/index/getHead + i32.const 23 + i32.lt_u + if (result i32) + local.get $10 + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 280 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + block $assembly/index/getHead|inlined.2 (result i32) + local.get $0 + local.set $3 + local.get $9 + local.set $6 + local.get $10 + local.set $7 + local.get $3 + local.get $6 + i32.const 16 + i32.mul + local.get $7 + i32.add + i32.const 4 + i32.mul + i32.add + i32.load offset=96 + end local.set $11 local.get $1 i32.const 0 @@ -613,12 +557,28 @@ local.get $1 i32.store offset=16 end + block $assembly/index/setHead|inlined.2 + local.get $0 + local.set $12 + local.get $9 + local.set $3 + local.get $10 + local.set $6 + local.get $1 + local.set $7 + local.get $12 + local.get $3 + i32.const 16 + i32.mul + local.get $6 + i32.add + i32.const 4 + i32.mul + i32.add + local.get $7 + i32.store offset=96 + end local.get $0 - local.get $9 - local.get $10 - local.get $1 - call $assembly/index/setHead - local.get $0 local.get $0 i32.load i32.const 1 @@ -626,23 +586,41 @@ i32.shl i32.or i32.store - local.get $0 - local.get $9 - local.get $0 - local.get $9 - call $assembly/index/getSLMap - i32.const 1 - local.get $10 - i32.shl - i32.or - call $assembly/index/setSLMap + block $assembly/index/setSLMap|inlined.2 + block $assembly/index/getSLMap|inlined.1 (result i32) + local.get $0 + local.set $13 + local.get $9 + local.set $12 + local.get $13 + local.get $12 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + end + i32.const 1 + local.get $10 + i32.shl + i32.or + local.set $3 + local.get $0 + local.get $9 + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=4 + end ) - (func $assembly/index/addMemory (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $assembly/index/addMemory (; 3 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + (local $9 i32) local.get $1 local.get $2 i32.le_u @@ -666,20 +644,24 @@ if i32.const 0 i32.const 24 - i32.const 387 + i32.const 411 i32.const 4 call $~lib/builtins/abort unreachable end - local.get $0 - call $assembly/index/getTail - local.set $3 - i32.const 0 + block $assembly/index/getTail|inlined.0 (result i32) + local.get $0 + local.set $3 + local.get $3 + i32.load offset=1568 + end local.set $4 - local.get $3 + i32.const 0 + local.set $5 + local.get $4 if local.get $1 - local.get $3 + local.get $4 i32.const 16 i32.add i32.ge_u @@ -687,7 +669,7 @@ if i32.const 0 i32.const 24 - i32.const 397 + i32.const 421 i32.const 15 call $~lib/builtins/abort unreachable @@ -695,16 +677,16 @@ local.get $1 i32.const 16 i32.sub - local.get $3 + local.get $4 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $3 + local.get $4 i32.load - local.set $4 + local.set $5 else nop end @@ -718,7 +700,7 @@ if i32.const 0 i32.const 24 - i32.const 409 + i32.const 433 i32.const 4 call $~lib/builtins/abort unreachable @@ -727,8 +709,8 @@ local.get $2 local.get $1 i32.sub - local.set $5 - local.get $5 + local.set $6 + local.get $6 i32.const 16 i32.const 16 i32.add @@ -739,55 +721,65 @@ i32.const 0 return end - local.get $5 + local.get $6 i32.const 2 i32.const 16 i32.mul i32.sub - local.set $6 - local.get $1 local.set $7 + local.get $1 + local.set $8 + local.get $8 local.get $7 - local.get $6 i32.const 1 i32.or - local.get $4 + local.get $5 i32.const 2 i32.and i32.or i32.store - local.get $7 + local.get $8 i32.const 0 i32.store offset=16 - local.get $7 + local.get $8 i32.const 0 i32.store offset=20 local.get $1 - local.get $5 + local.get $6 i32.add i32.const 16 i32.sub - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 0 i32.const 2 i32.or i32.store + block $assembly/index/setTail|inlined.1 + local.get $0 + local.set $9 + local.get $4 + local.set $3 + local.get $9 + local.get $3 + i32.store offset=1568 + end local.get $0 - local.get $3 - call $assembly/index/setTail - local.get $0 - local.get $7 + local.get $8 call $assembly/index/insertBlock i32.const 1 ) - (func $assembly/index/initialize (; 13 ;) (type $FUNCSIG$i) (result i32) + (func $assembly/index/initialize (; 4 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) global.get $~lib/memory/HEAP_BASE i32.const 15 i32.add @@ -831,9 +823,15 @@ local.get $3 i32.const 0 i32.store - local.get $3 - i32.const 0 - call $assembly/index/setTail + block $assembly/index/setTail|inlined.0 + local.get $3 + local.set $5 + i32.const 0 + local.set $4 + local.get $5 + local.get $4 + i32.store offset=1568 + end block $break|0 i32.const 0 local.set $4 @@ -844,10 +842,21 @@ i32.eqz br_if $break|0 block - local.get $3 - local.get $4 - i32.const 0 - call $assembly/index/setSLMap + block $assembly/index/setSLMap|inlined.0 + local.get $3 + local.set $7 + local.get $4 + local.set $6 + i32.const 0 + local.set $5 + local.get $7 + local.get $6 + i32.const 2 + i32.shl + i32.add + local.get $5 + i32.store offset=4 + end block $break|1 i32.const 0 local.set $5 @@ -857,11 +866,27 @@ i32.lt_u i32.eqz br_if $break|1 - local.get $3 - local.get $4 - local.get $5 - i32.const 0 - call $assembly/index/setHead + block $assembly/index/setHead|inlined.0 + local.get $3 + local.set $9 + local.get $4 + local.set $8 + local.get $5 + local.set $7 + i32.const 0 + local.set $6 + local.get $9 + local.get $8 + i32.const 16 + i32.mul + local.get $7 + i32.add + i32.const 4 + i32.mul + i32.add + local.get $6 + i32.store offset=96 + end local.get $5 i32.const 1 i32.add @@ -898,44 +923,16 @@ drop local.get $3 ) - (func $assembly/index/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 475 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.ctz - ) - (func $assembly/index/ffs (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 475 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.ctz - ) - (func $assembly/index/searchBlock (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $assembly/index/searchBlock (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) local.get $1 i32.const 256 i32.lt_u @@ -953,8 +950,14 @@ if (result i32) local.get $1 i32.const 1 - local.get $1 - call $assembly/index/fls + block $assembly/index/fls|inlined.2 (result i32) + local.get $1 + local.set $4 + i32.const 31 + local.get $4 + i32.clz + i32.sub + end i32.const 4 i32.sub i32.shl @@ -965,8 +968,14 @@ local.get $1 end local.set $4 - local.get $4 - call $assembly/index/fls + block $assembly/index/fls|inlined.3 (result i32) + local.get $4 + local.set $5 + i32.const 31 + local.get $5 + i32.clz + i32.sub + end local.set $2 local.get $4 local.get $2 @@ -985,17 +994,45 @@ i32.sub local.set $2 end - local.get $0 local.get $2 - call $assembly/index/getSLMap + i32.const 23 + i32.lt_u + if (result i32) + local.get $3 + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 355 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + block $assembly/index/getSLMap|inlined.2 (result i32) + local.get $0 + local.set $5 + local.get $2 + local.set $4 + local.get $5 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + end i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $5 - local.get $5 + local.set $6 + local.get $6 i32.eqz if local.get $0 @@ -1013,43 +1050,92 @@ i32.eqz if i32.const 0 - local.set $6 + local.set $7 else - local.get $4 - call $assembly/index/ffs + block $assembly/index/ffs|inlined.0 (result i32) + local.get $4 + local.set $5 + local.get $5 + i32.ctz + end local.set $2 - local.get $0 - local.get $2 - call $assembly/index/getSLMap - local.set $5 - local.get $5 + block $assembly/index/getSLMap|inlined.3 (result i32) + local.get $0 + local.set $8 + local.get $2 + local.set $5 + local.get $8 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + end + local.set $6 + local.get $6 i32.eqz if i32.const 0 i32.const 24 - i32.const 344 + i32.const 368 i32.const 17 call $~lib/builtins/abort unreachable end + block $assembly/index/getHead|inlined.3 (result i32) + local.get $0 + local.set $9 + local.get $2 + local.set $8 + block $assembly/index/ffs|inlined.0 (result i32) + local.get $6 + local.set $10 + local.get $10 + i32.ctz + end + local.set $5 + local.get $9 + local.get $8 + i32.const 16 + i32.mul + local.get $5 + i32.add + i32.const 4 + i32.mul + i32.add + i32.load offset=96 + end + local.set $7 + end + else + block $assembly/index/getHead|inlined.4 (result i32) local.get $0 + local.set $8 local.get $2 + local.set $5 + block $assembly/index/ffs|inlined.1 (result i32) + local.get $6 + local.set $9 + local.get $9 + i32.ctz + end + local.set $4 + local.get $8 local.get $5 - call $assembly/index/ffs - call $assembly/index/getHead - local.set $6 + i32.const 16 + i32.mul + local.get $4 + i32.add + i32.const 4 + i32.mul + i32.add + i32.load offset=96 end - else - local.get $0 - local.get $2 - local.get $5 - call $assembly/index/ffs - call $assembly/index/getHead - local.set $6 + local.set $7 end - local.get $6 + local.get $7 ) - (func $assembly/index/growMemory (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/growMemory (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1102,7 +1188,7 @@ call $assembly/index/addMemory drop ) - (func $assembly/index/prepareBlock (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $assembly/index/prepareBlock (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1126,7 +1212,7 @@ if i32.const 0 i32.const 24 - i32.const 359 + i32.const 383 i32.const 4 call $~lib/builtins/abort unreachable @@ -1179,10 +1265,34 @@ i32.xor i32.and i32.store - local.get $1 - call $assembly/index/getRight - local.get $1 - call $assembly/index/getRight + block $assembly/index/getRight|inlined.3 (result i32) + local.get $1 + local.set $5 + local.get $5 + i32.const 16 + i32.add + local.get $5 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + end + block $assembly/index/getRight|inlined.2 (result i32) + local.get $1 + local.set $5 + local.get $5 + i32.const 16 + i32.add + local.get $5 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + end i32.load i32.const 2 i32.const -1 @@ -1194,7 +1304,7 @@ i32.const 16 i32.add ) - (func $assembly/index/__mm_allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/__mm_allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1214,7 +1324,7 @@ if i32.const 0 i32.const 24 - i32.const 498 + i32.const 507 i32.const 29 call $~lib/builtins/abort unreachable @@ -1253,7 +1363,7 @@ if i32.const 0 i32.const 24 - i32.const 504 + i32.const 513 i32.const 15 call $~lib/builtins/abort unreachable @@ -1271,7 +1381,7 @@ if i32.const 0 i32.const 24 - i32.const 506 + i32.const 515 i32.const 13 call $~lib/builtins/abort unreachable @@ -1290,7 +1400,7 @@ local.get $0 call $assembly/index/prepareBlock ) - (func $assembly/index/freeBlock (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/freeBlock (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 i32.load @@ -1303,7 +1413,7 @@ if i32.const 0 i32.const 24 - i32.const 468 + i32.const 492 i32.const 2 call $~lib/builtins/abort unreachable @@ -1317,7 +1427,7 @@ local.get $1 call $assembly/index/insertBlock ) - (func $assembly/index/__mm_free (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/__mm_free (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 if @@ -1329,7 +1439,7 @@ if i32.const 0 i32.const 24 - i32.const 517 + i32.const 526 i32.const 4 call $~lib/builtins/abort unreachable @@ -1346,13 +1456,13 @@ end end ) - (func $assembly/index/__rt_visit_members (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/__rt_visit_members (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) unreachable ) - (func $assembly/index/__rt_flags (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/__rt_flags (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) unreachable ) - (func $~lib/memory/memory.allocate (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.const 80 i32.const 61 @@ -1360,7 +1470,7 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/memory/memory.copy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1569,7 +1679,7 @@ end end ) - (func $assembly/index/growRoots (; 26 ;) (type $FUNCSIG$v) + (func $assembly/index/growRoots (; 15 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1613,7 +1723,7 @@ i32.add global.set $assembly/index/END ) - (func $assembly/index/appendRoot (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/appendRoot (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) global.get $assembly/index/CUR local.set $1 @@ -1633,7 +1743,7 @@ i32.add global.set $assembly/index/CUR ) - (func $assembly/index/decrement (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/decrement (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1675,7 +1785,7 @@ if i32.const 0 i32.const 24 - i32.const 640 + i32.const 649 i32.const 15 call $~lib/builtins/abort unreachable @@ -1719,7 +1829,7 @@ end end ) - (func $assembly/index/markGray (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/markGray (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1744,7 +1854,7 @@ call $assembly/index/__rt_visit_members end ) - (func $assembly/index/scanBlack (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/scanBlack (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.load offset=4 @@ -1759,7 +1869,7 @@ i32.const 4 call $assembly/index/__rt_visit_members ) - (func $assembly/index/scan (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/scan (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1794,7 +1904,7 @@ end end ) - (func $assembly/index/collectWhite (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/collectWhite (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1821,7 +1931,7 @@ local.get $0 call $assembly/index/freeBlock ) - (func $assembly/index/__rt_visit (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/__rt_visit (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $break|0 block $case5|0 @@ -1873,7 +1983,7 @@ if i32.const 0 i32.const 24 - i32.const 595 + i32.const 604 i32.const 17 call $~lib/builtins/abort unreachable @@ -1920,7 +2030,7 @@ if i32.const 0 i32.const 24 - i32.const 606 + i32.const 615 i32.const 6 call $~lib/builtins/abort unreachable @@ -1957,14 +2067,14 @@ if i32.const 0 i32.const 24 - i32.const 617 + i32.const 626 i32.const 24 call $~lib/builtins/abort unreachable end end ) - (func $assembly/index/increment (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/increment (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1986,7 +2096,7 @@ if i32.const 0 i32.const 24 - i32.const 624 + i32.const 633 i32.const 2 call $~lib/builtins/abort unreachable @@ -1997,7 +2107,7 @@ i32.add i32.store offset=4 ) - (func $assembly/index/__gc_retain (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/__gc_retain (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 if local.get $0 @@ -2006,7 +2116,7 @@ call $assembly/index/increment end ) - (func $assembly/index/__gc_release (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/__gc_release (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 if local.get $0 @@ -2015,7 +2125,7 @@ call $assembly/index/decrement end ) - (func $assembly/index/collectCycles (; 37 ;) (type $FUNCSIG$v) + (func $assembly/index/collectCycles (; 26 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2167,6 +2277,6 @@ local.get $0 global.set $assembly/index/CUR ) - (func $null (; 38 ;) (type $FUNCSIG$v) + (func $null (; 27 ;) (type $FUNCSIG$v) ) ) From 504e20718403253923e3b41f5781180f237c2773 Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 17 Apr 2019 06:12:02 +0200 Subject: [PATCH 113/119] polish --- tests/allocators/asrt/optimized.wat | 330 ++++++----- tests/allocators/asrt/untouched.wat | 891 +++++++++++++++------------- tests/runtime/.gitignore | 1 + tests/runtime/assembly/index.ts | 104 ++-- tests/runtime/index.html | 66 ++- tests/runtime/optimized.wasm | Bin 0 -> 2343 bytes tests/runtime/optimized.wat | 2 +- tests/runtime/untouched.wat | 203 +++---- 8 files changed, 845 insertions(+), 752 deletions(-) create mode 100644 tests/runtime/.gitignore create mode 100644 tests/runtime/optimized.wasm diff --git a/tests/allocators/asrt/optimized.wat b/tests/allocators/asrt/optimized.wat index 0f7bc5994f..8bd7534f7a 100644 --- a/tests/allocators/asrt/optimized.wat +++ b/tests/allocators/asrt/optimized.wat @@ -1,12 +1,12 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -17,70 +17,7 @@ (export "memory.allocate" (func $assembly/index/memory.allocate)) (export "memory.free" (func $assembly/index/memory.free)) (export "memory.fill" (func $assembly/index/memory.fill)) - (func $../../runtime/assembly/index/setTail (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=1568 - ) - (func $../../runtime/assembly/index/setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) - (func $../../runtime/assembly/index/setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - local.get $0 - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - ) - (func $../../runtime/assembly/index/getRight (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) - (func $../../runtime/assembly/index/fls (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 31 - local.get $0 - i32.clz - i32.sub - ) - (func $../../runtime/assembly/index/getHead (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - ) - (func $../../runtime/assembly/index/getSLMap (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) - (func $../../runtime/assembly/index/removeBlock (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $../../runtime/assembly/index/removeBlock (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -100,8 +37,10 @@ i32.const 0 else local.get $2 + i32.const 31 local.get $2 - call $../../runtime/assembly/index/fls + i32.clz + i32.sub local.tee $3 i32.const 4 i32.sub @@ -131,26 +70,44 @@ local.get $5 i32.store offset=16 end + local.get $1 local.get $0 local.get $3 + i32.const 4 + i32.shl local.get $4 - call $../../runtime/assembly/index/getHead - local.get $1 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 i32.eq if local.get $0 local.get $3 + i32.const 4 + i32.shl local.get $4 + i32.add + i32.const 2 + i32.shl + i32.add local.get $2 - call $../../runtime/assembly/index/setHead + i32.store offset=96 local.get $2 i32.eqz if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $../../runtime/assembly/index/getSLMap + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $4 i32.shl @@ -158,7 +115,7 @@ i32.xor i32.and local.tee $1 - call $../../runtime/assembly/index/setSLMap + i32.store offset=4 local.get $1 i32.eqz if @@ -176,7 +133,7 @@ end end ) - (func $../../runtime/assembly/index/insertBlock (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $../../runtime/assembly/index/insertBlock (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -185,16 +142,22 @@ (local $7 i32) local.get $1 i32.load - local.set $3 + local.set $2 local.get $1 - call $../../runtime/assembly/index/getRight + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $4 i32.load local.tee $5 i32.const 1 i32.and if - local.get $3 + local.get $2 i32.const -4 i32.and i32.const 16 @@ -203,7 +166,7 @@ i32.const -4 i32.and i32.add - local.tee $2 + local.tee $3 i32.const 1073741824 i32.lt_u if @@ -211,21 +174,27 @@ local.get $4 call $../../runtime/assembly/index/removeBlock local.get $1 - local.get $3 + local.get $2 i32.const 3 i32.and - local.get $2 + local.get $3 i32.or - local.tee $3 + local.tee $2 i32.store local.get $1 - call $../../runtime/assembly/index/getRight + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $4 i32.load local.set $5 end end - local.get $3 + local.get $2 i32.const 2 i32.and if @@ -233,14 +202,14 @@ i32.const 4 i32.sub i32.load - local.tee $2 + local.tee $3 i32.load local.tee $6 i32.const -4 i32.and i32.const 16 i32.add - local.get $3 + local.get $2 i32.const -4 i32.and i32.add @@ -249,17 +218,17 @@ i32.lt_u if local.get $0 - local.get $2 + local.get $3 call $../../runtime/assembly/index/removeBlock - local.get $2 + local.get $3 local.get $6 i32.const 3 i32.and local.get $7 i32.or - local.tee $3 + local.tee $2 i32.store - local.get $2 + local.get $3 local.set $1 end end @@ -273,8 +242,7 @@ i32.sub local.get $1 i32.store - local.get $0 - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -284,26 +252,36 @@ local.get $2 i32.const 16 i32.div_u - local.set $3 + local.set $2 i32.const 0 else local.get $2 + i32.const 31 local.get $2 - call $../../runtime/assembly/index/fls - local.tee $2 + i32.clz + i32.sub + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $3 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end - local.tee $2 + local.set $3 + local.get $0 local.get $3 - call $../../runtime/assembly/index/getHead + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 local.set $4 local.get $1 i32.const 0 @@ -318,30 +296,42 @@ i32.store offset=16 end local.get $0 - local.get $2 local.get $3 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add local.get $1 - call $../../runtime/assembly/index/setHead + i32.store offset=96 local.get $0 local.get $0 i32.load i32.const 1 - local.get $2 + local.get $3 i32.shl i32.or i32.store local.get $0 - local.get $2 + local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 - local.get $2 - call $../../runtime/assembly/index/getSLMap - i32.const 1 local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + i32.const 1 + local.get $2 i32.shl i32.or - call $../../runtime/assembly/index/setSLMap + i32.store offset=4 ) - (func $../../runtime/assembly/index/addMemory (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $../../runtime/assembly/index/addMemory (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $2 block (result i32) @@ -400,12 +390,12 @@ i32.store local.get $0 local.get $2 - call $../../runtime/assembly/index/setTail + i32.store offset=1568 local.get $0 local.get $1 call $../../runtime/assembly/index/insertBlock ) - (func $../../runtime/assembly/index/initialize (; 11 ;) (type $FUNCSIG$i) (result i32) + (func $../../runtime/assembly/index/initialize (; 4 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -441,7 +431,7 @@ i32.store local.get $0 i32.const 0 - call $../../runtime/assembly/index/setTail + i32.store offset=1568 loop $repeat|0 block $break|0 local.get $2 @@ -450,8 +440,11 @@ br_if $break|0 local.get $0 local.get $2 + i32.const 2 + i32.shl + i32.add i32.const 0 - call $../../runtime/assembly/index/setSLMap + i32.store offset=4 i32.const 0 local.set $1 loop $repeat|1 @@ -462,9 +455,15 @@ br_if $break|1 local.get $0 local.get $2 + i32.const 4 + i32.shl local.get $1 + i32.add + i32.const 2 + i32.shl + i32.add i32.const 0 - call $../../runtime/assembly/index/setHead + i32.store offset=96 local.get $1 i32.const 1 i32.add @@ -491,7 +490,7 @@ call $../../runtime/assembly/index/addMemory local.get $0 ) - (func $../../runtime/assembly/index/searchBlock (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $../../runtime/assembly/index/searchBlock (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -504,26 +503,25 @@ local.set $1 i32.const 0 else - block (result i32) - local.get $1 - i32.const 536870912 - i32.lt_u - if - local.get $1 - i32.const 1 - local.get $1 - call $../../runtime/assembly/index/fls - i32.const 4 - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 - end - call $../../runtime/assembly/index/fls + i32.const 31 + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 + local.get $1 + i32.const 536870912 + i32.lt_u + select + local.tee $1 + i32.clz + i32.sub local.set $2 local.get $1 local.get $2 @@ -538,7 +536,10 @@ i32.sub end local.tee $2 - call $../../runtime/assembly/index/getSLMap + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -546,10 +547,16 @@ local.tee $1 if (result i32) local.get $0 - local.get $2 local.get $1 i32.ctz - call $../../runtime/assembly/index/getHead + local.get $2 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 else local.get $0 i32.load @@ -561,21 +568,30 @@ i32.and local.tee $1 if (result i32) + local.get $0 local.get $0 local.get $1 i32.ctz local.tee $1 - local.get $0 - local.get $1 - call $../../runtime/assembly/index/getSLMap + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.ctz - call $../../runtime/assembly/index/getHead + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 else i32.const 0 end end ) - (func $../../runtime/assembly/index/growMemory (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $../../runtime/assembly/index/growMemory (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -616,7 +632,7 @@ i32.shl call $../../runtime/assembly/index/addMemory ) - (func $../../runtime/assembly/index/prepareBlock (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $../../runtime/assembly/index/prepareBlock (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -663,9 +679,21 @@ i32.and i32.store local.get $1 - call $../../runtime/assembly/index/getRight + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.get $1 - call $../../runtime/assembly/index/getRight + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add i32.load i32.const -3 i32.and @@ -675,7 +703,7 @@ i32.const 16 i32.add ) - (func $../../runtime/assembly/index/__mm_allocate (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $../../runtime/assembly/index/__mm_allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) global.get $../../runtime/assembly/index/ROOT @@ -692,7 +720,7 @@ if i32.const 0 i32.const 24 - i32.const 498 + i32.const 495 i32.const 29 call $~lib/builtins/abort unreachable @@ -737,11 +765,11 @@ local.get $1 call $../../runtime/assembly/index/prepareBlock ) - (func $assembly/index/memory.allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/memory.allocate (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $../../runtime/assembly/index/__mm_allocate ) - (func $../../runtime/assembly/index/__mm_free (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $../../runtime/assembly/index/__mm_free (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 if @@ -763,11 +791,11 @@ end end ) - (func $assembly/index/memory.free (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/memory.free (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $../../runtime/assembly/index/__mm_free ) - (func $~lib/memory/memory.fill (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i64) (local $4 i32) block $~lib/util/memory/memset|inlined.0 @@ -997,13 +1025,13 @@ end end ) - (func $assembly/index/memory.fill (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $assembly/index/memory.fill (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 local.get $2 call $~lib/memory/memory.fill ) - (func $null (; 21 ;) (type $FUNCSIG$v) + (func $null (; 14 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/allocators/asrt/untouched.wat b/tests/allocators/asrt/untouched.wat index 6b298ee2f9..3167815ed5 100644 --- a/tests/allocators/asrt/untouched.wat +++ b/tests/allocators/asrt/untouched.wat @@ -1,12 +1,12 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -20,180 +20,7 @@ (export "memory.allocate" (func $assembly/index/memory.allocate)) (export "memory.free" (func $assembly/index/memory.free)) (export "memory.fill" (func $assembly/index/memory.fill)) - (func $../../runtime/assembly/index/setTail (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=1568 - ) - (func $../../runtime/assembly/index/setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - i32.const 23 - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 175 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) - (func $../../runtime/assembly/index/setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - local.get $1 - i32.const 23 - i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 189 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 16 - i32.mul - local.get $2 - i32.add - i32.const 4 - i32.mul - i32.add - local.get $3 - i32.store offset=96 - ) - (func $../../runtime/assembly/index/getTail (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load offset=1568 - ) - (func $../../runtime/assembly/index/getRight (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load - local.set $1 - local.get $1 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 122 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 16 - i32.add - local.get $1 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $2 - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 124 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $2 - ) - (func $../../runtime/assembly/index/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 481 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - i32.const 31 - local.get $0 - i32.clz - i32.sub - ) - (func $../../runtime/assembly/index/getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $1 - i32.const 23 - i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 180 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 16 - i32.mul - local.get $2 - i32.add - i32.const 4 - i32.mul - i32.add - i32.load offset=96 - ) - (func $../../runtime/assembly/index/getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - i32.const 23 - i32.lt_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 170 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) - (func $../../runtime/assembly/index/removeBlock (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $../../runtime/assembly/index/removeBlock (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -201,6 +28,9 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) local.get $1 i32.load local.set $2 @@ -211,7 +41,7 @@ if i32.const 0 i32.const 24 - i32.const 275 + i32.const 282 i32.const 13 call $~lib/builtins/abort unreachable @@ -236,7 +66,7 @@ if i32.const 0 i32.const 24 - i32.const 277 + i32.const 284 i32.const 13 call $~lib/builtins/abort unreachable @@ -252,8 +82,10 @@ i32.div_u local.set $5 else + i32.const 31 local.get $3 - call $../../runtime/assembly/index/fls + i32.clz + i32.sub local.set $4 local.get $3 local.get $4 @@ -272,6 +104,25 @@ i32.sub local.set $4 end + local.get $4 + i32.const 23 + i32.lt_u + if (result i32) + local.get $5 + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 297 + i32.const 13 + call $~lib/builtins/abort + unreachable + end local.get $1 i32.load offset=16 local.set $6 @@ -291,35 +142,85 @@ i32.store offset=16 end local.get $1 - local.get $0 - local.get $4 - local.get $5 - call $../../runtime/assembly/index/getHead - i32.eq - if + block $../../runtime/assembly/index/GETHEAD|inlined.1 (result i32) local.get $0 + local.set $10 local.get $4 + local.set $9 local.get $5 - local.get $7 - call $../../runtime/assembly/index/setHead - local.get $7 - i32.eqz - if + local.set $8 + local.get $10 + local.get $9 + i32.const 16 + i32.mul + local.get $8 + i32.add + i32.const 4 + i32.mul + i32.add + i32.load offset=96 + end + i32.eq + if + block $../../runtime/assembly/index/SETHEAD|inlined.1 local.get $0 + local.set $11 local.get $4 - call $../../runtime/assembly/index/getSLMap + local.set $10 + local.get $5 + local.set $9 + local.get $7 local.set $8 - local.get $0 - local.get $4 + local.get $11 + local.get $10 + i32.const 16 + i32.mul + local.get $9 + i32.add + i32.const 4 + i32.mul + i32.add local.get $8 - i32.const 1 - local.get $5 - i32.shl - i32.const -1 - i32.xor - i32.and - local.tee $8 - call $../../runtime/assembly/index/setSLMap + i32.store offset=96 + end + local.get $7 + i32.eqz + if + block $../../runtime/assembly/index/GETSL|inlined.0 (result i32) + local.get $0 + local.set $9 + local.get $4 + local.set $8 + local.get $9 + local.get $8 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + end + local.set $8 + block $../../runtime/assembly/index/SETSL|inlined.1 + local.get $0 + local.set $11 + local.get $4 + local.set $10 + local.get $8 + i32.const 1 + local.get $5 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $8 + local.set $9 + local.get $11 + local.get $10 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store offset=4 + end local.get $8 i32.eqz if @@ -337,39 +238,7 @@ end end ) - (func $../../runtime/assembly/index/getLeft (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.load - i32.const 2 - i32.and - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 113 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 4 - i32.sub - i32.load - local.set $1 - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 115 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $1 - ) - (func $../../runtime/assembly/index/insertBlock (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $../../runtime/assembly/index/insertBlock (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -380,12 +249,14 @@ (local $9 i32) (local $10 i32) (local $11 i32) + (local $12 i32) + (local $13 i32) local.get $1 i32.eqz if i32.const 0 i32.const 24 - i32.const 205 + i32.const 210 i32.const 13 call $~lib/builtins/abort unreachable @@ -400,18 +271,30 @@ if i32.const 0 i32.const 24 - i32.const 207 + i32.const 212 i32.const 13 call $~lib/builtins/abort unreachable end - local.get $1 - call $../../runtime/assembly/index/getRight - local.set $3 - local.get $3 - i32.load + block $../../runtime/assembly/index/GETRIGHT|inlined.0 (result i32) + local.get $1 + local.set $3 + local.get $3 + i32.const 16 + i32.add + local.get $3 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + end local.set $4 local.get $4 + i32.load + local.set $5 + local.get $5 i32.const 1 i32.and if @@ -422,44 +305,62 @@ i32.and i32.const 16 i32.add - local.get $4 + local.get $5 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $5 - local.get $5 + local.set $3 + local.get $3 i32.const 1073741824 i32.lt_u if local.get $0 - local.get $3 + local.get $4 call $../../runtime/assembly/index/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $5 + local.get $3 i32.or local.tee $2 i32.store - local.get $1 - call $../../runtime/assembly/index/getRight - local.set $3 - local.get $3 - i32.load + block $../../runtime/assembly/index/GETRIGHT|inlined.1 (result i32) + local.get $1 + local.set $6 + local.get $6 + i32.const 16 + i32.add + local.get $6 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + end local.set $4 + local.get $4 + i32.load + local.set $5 end end local.get $2 i32.const 2 i32.and if - local.get $1 - call $../../runtime/assembly/index/getLeft - local.set $5 - local.get $5 + block $../../runtime/assembly/index/GETLEFT|inlined.0 (result i32) + local.get $1 + local.set $3 + local.get $3 + i32.const 4 + i32.sub + i32.load + end + local.set $3 + local.get $3 i32.load local.set $6 local.get $6 @@ -469,7 +370,7 @@ if i32.const 0 i32.const 24 - i32.const 228 + i32.const 233 i32.const 15 call $~lib/builtins/abort unreachable @@ -493,9 +394,9 @@ i32.lt_u if local.get $0 - local.get $5 + local.get $3 call $../../runtime/assembly/index/removeBlock - local.get $5 + local.get $3 local.get $6 i32.const 3 i32.and @@ -503,12 +404,12 @@ i32.or local.tee $2 i32.store - local.get $5 + local.get $3 local.set $1 end end - local.get $3 local.get $4 + local.get $5 i32.const 2 i32.or i32.store @@ -532,7 +433,7 @@ if i32.const 0 i32.const 24 - i32.const 243 + i32.const 248 i32.const 13 call $~lib/builtins/abort unreachable @@ -542,18 +443,18 @@ i32.add local.get $8 i32.add - local.get $3 + local.get $4 i32.eq i32.eqz if i32.const 0 i32.const 24 - i32.const 244 + i32.const 249 i32.const 13 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 4 i32.sub local.get $1 @@ -569,8 +470,10 @@ i32.div_u local.set $10 else + i32.const 31 local.get $8 - call $../../runtime/assembly/index/fls + i32.clz + i32.sub local.set $9 local.get $8 local.get $9 @@ -589,10 +492,43 @@ i32.sub local.set $9 end - local.get $0 - local.get $9 - local.get $10 - call $../../runtime/assembly/index/getHead + local.get $9 + i32.const 23 + i32.lt_u + if (result i32) + local.get $10 + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 265 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + block $../../runtime/assembly/index/GETHEAD|inlined.2 (result i32) + local.get $0 + local.set $3 + local.get $9 + local.set $6 + local.get $10 + local.set $7 + local.get $3 + local.get $6 + i32.const 16 + i32.mul + local.get $7 + i32.add + i32.const 4 + i32.mul + i32.add + i32.load offset=96 + end local.set $11 local.get $1 i32.const 0 @@ -606,11 +542,27 @@ local.get $1 i32.store offset=16 end - local.get $0 - local.get $9 - local.get $10 - local.get $1 - call $../../runtime/assembly/index/setHead + block $../../runtime/assembly/index/SETHEAD|inlined.2 + local.get $0 + local.set $12 + local.get $9 + local.set $3 + local.get $10 + local.set $6 + local.get $1 + local.set $7 + local.get $12 + local.get $3 + i32.const 16 + i32.mul + local.get $6 + i32.add + i32.const 4 + i32.mul + i32.add + local.get $7 + i32.store offset=96 + end local.get $0 local.get $0 i32.load @@ -619,23 +571,41 @@ i32.shl i32.or i32.store - local.get $0 - local.get $9 - local.get $0 - local.get $9 - call $../../runtime/assembly/index/getSLMap - i32.const 1 - local.get $10 - i32.shl - i32.or - call $../../runtime/assembly/index/setSLMap + block $../../runtime/assembly/index/SETSL|inlined.2 + block $../../runtime/assembly/index/GETSL|inlined.1 (result i32) + local.get $0 + local.set $13 + local.get $9 + local.set $12 + local.get $13 + local.get $12 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + end + i32.const 1 + local.get $10 + i32.shl + i32.or + local.set $3 + local.get $0 + local.get $9 + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=4 + end ) - (func $../../runtime/assembly/index/addMemory (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $../../runtime/assembly/index/addMemory (; 3 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + (local $9 i32) local.get $1 local.get $2 i32.le_u @@ -659,20 +629,24 @@ if i32.const 0 i32.const 24 - i32.const 387 + i32.const 399 i32.const 4 call $~lib/builtins/abort unreachable end - local.get $0 - call $../../runtime/assembly/index/getTail - local.set $3 - i32.const 0 + block $../../runtime/assembly/index/GETTAIL|inlined.0 (result i32) + local.get $0 + local.set $3 + local.get $3 + i32.load offset=1568 + end local.set $4 - local.get $3 + i32.const 0 + local.set $5 + local.get $4 if local.get $1 - local.get $3 + local.get $4 i32.const 16 i32.add i32.ge_u @@ -680,7 +654,7 @@ if i32.const 0 i32.const 24 - i32.const 397 + i32.const 409 i32.const 15 call $~lib/builtins/abort unreachable @@ -688,16 +662,16 @@ local.get $1 i32.const 16 i32.sub - local.get $3 + local.get $4 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $3 + local.get $4 i32.load - local.set $4 + local.set $5 else nop end @@ -711,7 +685,7 @@ if i32.const 0 i32.const 24 - i32.const 409 + i32.const 421 i32.const 4 call $~lib/builtins/abort unreachable @@ -720,8 +694,8 @@ local.get $2 local.get $1 i32.sub - local.set $5 - local.get $5 + local.set $6 + local.get $6 i32.const 16 i32.const 16 i32.add @@ -732,55 +706,65 @@ i32.const 0 return end - local.get $5 + local.get $6 i32.const 2 i32.const 16 i32.mul i32.sub - local.set $6 - local.get $1 local.set $7 + local.get $1 + local.set $8 + local.get $8 local.get $7 - local.get $6 i32.const 1 i32.or - local.get $4 + local.get $5 i32.const 2 i32.and i32.or i32.store - local.get $7 + local.get $8 i32.const 0 i32.store offset=16 - local.get $7 + local.get $8 i32.const 0 i32.store offset=20 local.get $1 - local.get $5 + local.get $6 i32.add i32.const 16 i32.sub - local.set $3 - local.get $3 + local.set $4 + local.get $4 i32.const 0 i32.const 2 i32.or i32.store + block $../../runtime/assembly/index/SETTAIL|inlined.1 + local.get $0 + local.set $9 + local.get $4 + local.set $3 + local.get $9 + local.get $3 + i32.store offset=1568 + end local.get $0 - local.get $3 - call $../../runtime/assembly/index/setTail - local.get $0 - local.get $7 + local.get $8 call $../../runtime/assembly/index/insertBlock i32.const 1 ) - (func $../../runtime/assembly/index/initialize (; 13 ;) (type $FUNCSIG$i) (result i32) + (func $../../runtime/assembly/index/initialize (; 4 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) global.get $~lib/memory/HEAP_BASE i32.const 15 i32.add @@ -824,9 +808,15 @@ local.get $3 i32.const 0 i32.store - local.get $3 - i32.const 0 - call $../../runtime/assembly/index/setTail + block $../../runtime/assembly/index/SETTAIL|inlined.0 + local.get $3 + local.set $5 + i32.const 0 + local.set $4 + local.get $5 + local.get $4 + i32.store offset=1568 + end block $break|0 i32.const 0 local.set $4 @@ -837,10 +827,21 @@ i32.eqz br_if $break|0 block - local.get $3 - local.get $4 - i32.const 0 - call $../../runtime/assembly/index/setSLMap + block $../../runtime/assembly/index/SETSL|inlined.0 + local.get $3 + local.set $7 + local.get $4 + local.set $6 + i32.const 0 + local.set $5 + local.get $7 + local.get $6 + i32.const 2 + i32.shl + i32.add + local.get $5 + i32.store offset=4 + end block $break|1 i32.const 0 local.set $5 @@ -850,11 +851,27 @@ i32.lt_u i32.eqz br_if $break|1 - local.get $3 - local.get $4 - local.get $5 - i32.const 0 - call $../../runtime/assembly/index/setHead + block $../../runtime/assembly/index/SETHEAD|inlined.0 + local.get $3 + local.set $9 + local.get $4 + local.set $8 + local.get $5 + local.set $7 + i32.const 0 + local.set $6 + local.get $9 + local.get $8 + i32.const 16 + i32.mul + local.get $7 + i32.add + i32.const 4 + i32.mul + i32.add + local.get $6 + i32.store offset=96 + end local.get $5 i32.const 1 i32.add @@ -891,44 +908,15 @@ drop local.get $3 ) - (func $../../runtime/assembly/index/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 475 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.ctz - ) - (func $../../runtime/assembly/index/ffs (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 475 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.ctz - ) - (func $../../runtime/assembly/index/searchBlock (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $../../runtime/assembly/index/searchBlock (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -946,9 +934,9 @@ if (result i32) local.get $1 i32.const 1 + i32.const 27 local.get $1 - call $../../runtime/assembly/index/fls - i32.const 4 + i32.clz i32.sub i32.shl i32.add @@ -958,8 +946,10 @@ local.get $1 end local.set $4 + i32.const 31 local.get $4 - call $../../runtime/assembly/index/fls + i32.clz + i32.sub local.set $2 local.get $4 local.get $2 @@ -978,17 +968,45 @@ i32.sub local.set $2 end - local.get $0 local.get $2 - call $../../runtime/assembly/index/getSLMap + i32.const 23 + i32.lt_u + if (result i32) + local.get $3 + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 343 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + block $../../runtime/assembly/index/GETSL|inlined.2 (result i32) + local.get $0 + local.set $5 + local.get $2 + local.set $4 + local.get $5 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + end i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $5 - local.get $5 + local.set $6 + local.get $6 i32.eqz if local.get $0 @@ -1006,43 +1024,80 @@ i32.eqz if i32.const 0 - local.set $6 + local.set $7 else local.get $4 - call $../../runtime/assembly/index/ffs + i32.ctz local.set $2 - local.get $0 - local.get $2 - call $../../runtime/assembly/index/getSLMap - local.set $5 - local.get $5 + block $../../runtime/assembly/index/GETSL|inlined.3 (result i32) + local.get $0 + local.set $8 + local.get $2 + local.set $5 + local.get $8 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + end + local.set $6 + local.get $6 i32.eqz if i32.const 0 i32.const 24 - i32.const 344 + i32.const 356 i32.const 17 call $~lib/builtins/abort unreachable end + block $../../runtime/assembly/index/GETHEAD|inlined.3 (result i32) + local.get $0 + local.set $9 + local.get $2 + local.set $8 + local.get $6 + i32.ctz + local.set $5 + local.get $9 + local.get $8 + i32.const 16 + i32.mul + local.get $5 + i32.add + i32.const 4 + i32.mul + i32.add + i32.load offset=96 + end + local.set $7 + end + else + block $../../runtime/assembly/index/GETHEAD|inlined.4 (result i32) local.get $0 + local.set $8 local.get $2 + local.set $5 + local.get $6 + i32.ctz + local.set $4 + local.get $8 local.get $5 - call $../../runtime/assembly/index/ffs - call $../../runtime/assembly/index/getHead - local.set $6 + i32.const 16 + i32.mul + local.get $4 + i32.add + i32.const 4 + i32.mul + i32.add + i32.load offset=96 end - else - local.get $0 - local.get $2 - local.get $5 - call $../../runtime/assembly/index/ffs - call $../../runtime/assembly/index/getHead - local.set $6 + local.set $7 end - local.get $6 + local.get $7 ) - (func $../../runtime/assembly/index/growMemory (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $../../runtime/assembly/index/growMemory (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1095,7 +1150,7 @@ call $../../runtime/assembly/index/addMemory drop ) - (func $../../runtime/assembly/index/prepareBlock (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $../../runtime/assembly/index/prepareBlock (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1119,7 +1174,7 @@ if i32.const 0 i32.const 24 - i32.const 359 + i32.const 371 i32.const 4 call $~lib/builtins/abort unreachable @@ -1172,10 +1227,34 @@ i32.xor i32.and i32.store - local.get $1 - call $../../runtime/assembly/index/getRight - local.get $1 - call $../../runtime/assembly/index/getRight + block $../../runtime/assembly/index/GETRIGHT|inlined.3 (result i32) + local.get $1 + local.set $5 + local.get $5 + i32.const 16 + i32.add + local.get $5 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + end + block $../../runtime/assembly/index/GETRIGHT|inlined.2 (result i32) + local.get $1 + local.set $5 + local.get $5 + i32.const 16 + i32.add + local.get $5 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + end i32.load i32.const 2 i32.const -1 @@ -1187,7 +1266,7 @@ i32.const 16 i32.add ) - (func $../../runtime/assembly/index/__mm_allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $../../runtime/assembly/index/__mm_allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1207,7 +1286,7 @@ if i32.const 0 i32.const 24 - i32.const 498 + i32.const 495 i32.const 29 call $~lib/builtins/abort unreachable @@ -1246,7 +1325,7 @@ if i32.const 0 i32.const 24 - i32.const 504 + i32.const 501 i32.const 15 call $~lib/builtins/abort unreachable @@ -1264,7 +1343,7 @@ if i32.const 0 i32.const 24 - i32.const 506 + i32.const 503 i32.const 13 call $~lib/builtins/abort unreachable @@ -1283,11 +1362,11 @@ local.get $0 call $../../runtime/assembly/index/prepareBlock ) - (func $assembly/index/memory.allocate (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/memory.allocate (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $../../runtime/assembly/index/__mm_allocate ) - (func $../../runtime/assembly/index/freeBlock (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $../../runtime/assembly/index/freeBlock (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 i32.load @@ -1300,7 +1379,7 @@ if i32.const 0 i32.const 24 - i32.const 468 + i32.const 480 i32.const 2 call $~lib/builtins/abort unreachable @@ -1314,7 +1393,7 @@ local.get $1 call $../../runtime/assembly/index/insertBlock ) - (func $../../runtime/assembly/index/__mm_free (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $../../runtime/assembly/index/__mm_free (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 if @@ -1326,7 +1405,7 @@ if i32.const 0 i32.const 24 - i32.const 517 + i32.const 514 i32.const 4 call $~lib/builtins/abort unreachable @@ -1343,11 +1422,11 @@ end end ) - (func $assembly/index/memory.free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/memory.free (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $../../runtime/assembly/index/__mm_free ) - (func $~lib/memory/memory.fill (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1604,12 +1683,12 @@ end end ) - (func $assembly/index/memory.fill (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $assembly/index/memory.fill (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 local.get $2 call $~lib/memory/memory.fill ) - (func $null (; 26 ;) (type $FUNCSIG$v) + (func $null (; 15 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/runtime/.gitignore b/tests/runtime/.gitignore new file mode 100644 index 0000000000..cec7a80f40 --- /dev/null +++ b/tests/runtime/.gitignore @@ -0,0 +1 @@ +!optimized.wasm diff --git a/tests/runtime/assembly/index.ts b/tests/runtime/assembly/index.ts index 1323056628..d4936bc625 100644 --- a/tests/runtime/assembly/index.ts +++ b/tests/runtime/assembly/index.ts @@ -15,22 +15,8 @@ /////////////////////// The TLSF (Two-Level Segregate Fit) memory allocator /////////////////////// // see: http://www.gii.upv.es/tlsf/ -/** Determines the first (LSB to MSB) set bit's index of a word. */ -// @ts-ignore: decorator -@inline -function ffs(word: T): T { - return ctz(word); // for word != 0 -} - -/** Determines the last (LSB to MSB) set bit's index of a word. */ -// @ts-ignore: decorator -@inline -function fls(word: T): T { - // @ts-ignore: type - const inv: T = sizeof() * 8 - 1; - // @ts-ignore: type - return inv - clz(word); -} +// - `ffs(x)` is equivalent to `ctz(x)` with x != 0 +// - `fls(x)` is equivalent to `sizeof(x) * 8 - clz(x) - 1` // ╒══════════════ Block size interpretation (32-bit) ═════════════╕ // 3 2 1 @@ -126,15 +112,13 @@ function fls(word: T): T { /** Gets the left block of a block. Only valid if the left block is free. */ // @ts-ignore: decorator -@inline -function getLeft(block: Block): Block { +@inline function GETLEFT(block: Block): Block { return load(changetype(block) - sizeof()); } /** Gets the right block of of a block by advancing to the right by its size. */ // @ts-ignore: decorator -@inline -function getRight(block: Block): Block { +@inline function GETRIGHT(block: Block): Block { return changetype(changetype(block) + BLOCK_OVERHEAD + (block.mmInfo & ~TAGS_MASK)); } @@ -179,21 +163,21 @@ function getRight(block: Block): Block { var ROOT: Root; +/** Gets the second level map of the specified first level. */ // @ts-ignore: decorator -@inline -function getSLMap(root: Root, fl: usize): u32 { +@inline function GETSL(root: Root, fl: usize): u32 { return load(changetype(root) + (fl << alignof()), SL_START); } +/** Sets the second level map of the specified first level. */ // @ts-ignore: decorator -@inline -function setSLMap(root: Root, fl: usize, value: u32): void { +@inline function SETSL(root: Root, fl: usize, value: u32): void { store(changetype(root) + (fl << alignof()), value, SL_START); } +/** Gets the head of the free list for the specified combination of first and second level. */ // @ts-ignore: decorator -@inline -function getHead(root: Root, fl: usize, sl: u32): Block | null { +@inline function GETHEAD(root: Root, fl: usize, sl: u32): Block | null { return changetype( load( changetype(root) + (fl * SL_SIZE + sl) * sizeof(), @@ -201,23 +185,23 @@ function getHead(root: Root, fl: usize, sl: u32): Block | null { ); } +/** Sets the head of the free list for the specified combination of first and second level. */ // @ts-ignore: decorator -@inline -function setHead(root: Root, fl: usize, sl: u32, value: Block | null): void { +@inline function SETHEAD(root: Root, fl: usize, sl: u32, head: Block | null): void { store( - changetype(root) + (fl * SL_SIZE + sl) * sizeof() , changetype(value), + changetype(root) + (fl * SL_SIZE + sl) * sizeof() , changetype(head), HL_START); } +/** Gets the tail block.. */ // @ts-ignore: decorator -@inline -function getTail(root: Root): Block { +@inline function GETTAIL(root: Root): Block { return load(changetype(root), HL_END); } +/** Sets the tail block. */ // @ts-ignore: decorator -@inline -function setTail(root: Root, tail: Block): void { +@inline function SETTAIL(root: Root, tail: Block): void { store(changetype(root), tail, HL_END); } @@ -227,7 +211,7 @@ function insertBlock(root: Root, block: Block): void { var blockInfo = block.mmInfo; if (DEBUG) assert(blockInfo & FREE); // must be free - var right = getRight(block); + var right = GETRIGHT(block); var rightInfo = right.mmInfo; // merge with right block if also free @@ -236,7 +220,7 @@ function insertBlock(root: Root, block: Block): void { if (newSize < BLOCK_MAXSIZE) { removeBlock(root, right); block.mmInfo = blockInfo = (blockInfo & TAGS_MASK) | newSize; - right = getRight(block); + right = GETRIGHT(block); rightInfo = right.mmInfo; // 'back' is set below } @@ -244,7 +228,7 @@ function insertBlock(root: Root, block: Block): void { // merge with left block if also free if (blockInfo & LEFTFREE) { - let left = getLeft(block); + let left = GETLEFT(block); let leftInfo = left.mmInfo; if (DEBUG) assert(leftInfo & FREE); // must be free according to right tags let newSize = (leftInfo & ~TAGS_MASK) + BLOCK_OVERHEAD + (blockInfo & ~TAGS_MASK); @@ -273,22 +257,23 @@ function insertBlock(root: Root, block: Block): void { fl = 0; sl = (size / AL_SIZE); } else { - fl = fls(size); + const inv: usize = sizeof() * 8 - 1; + fl = inv - clz(size); sl = ((size >> (fl - SL_BITS)) ^ (1 << SL_BITS)); fl -= SB_BITS - 1; } if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range // perform insertion - var head = getHead(root, fl, sl); + var head = GETHEAD(root, fl, sl); block.prev = null; block.next = head; if (head) head.prev = block; - setHead(root, fl, sl, block); + SETHEAD(root, fl, sl, block); // update first and second level maps root.flMap |= (1 << fl); - setSLMap(root, fl, getSLMap(root, fl) | (1 << sl)); + SETSL(root, fl, GETSL(root, fl) | (1 << sl)); } /** Removes a free block from internal lists. */ @@ -304,7 +289,8 @@ function removeBlock(root: Root, block: Block): void { fl = 0; sl = (size / AL_SIZE); } else { - fl = fls(size); + const inv: usize = sizeof() * 8 - 1; + fl = inv - clz(size); sl = ((size >> (fl - SL_BITS)) ^ (1 << SL_BITS)); fl -= SB_BITS - 1; } @@ -317,13 +303,13 @@ function removeBlock(root: Root, block: Block): void { if (next) next.prev = prev; // update head if we are removing it - if (block == getHead(root, fl, sl)) { - setHead(root, fl, sl, next); + if (block == GETHEAD(root, fl, sl)) { + SETHEAD(root, fl, sl, next); // clear second level map if head is empty now if (!next) { - let slMap = getSLMap(root, fl); - setSLMap(root, fl, slMap &= ~(1 << sl)); + let slMap = GETSL(root, fl); + SETSL(root, fl, slMap &= ~(1 << sl)); // clear first level map if second level is empty now if (!slMap) root.flMap &= ~(1 << fl); @@ -345,17 +331,19 @@ function searchBlock(root: Root, size: usize): Block | null { sl = (size / AL_SIZE); } else { const halfMaxSize = BLOCK_MAXSIZE >> 1; // don't round last fl + const inv: usize = sizeof() * 8 - 1; + const invRound = inv - SL_BITS; let requestSize = size < halfMaxSize - ? size + (1 << fls(size) - SL_BITS) - 1 + ? size + (1 << (invRound - clz(size))) - 1 : size; - fl = fls(requestSize); + fl = inv - clz(requestSize); sl = ((requestSize >> (fl - SL_BITS)) ^ (1 << SL_BITS)); fl -= SB_BITS - 1; } if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range // search second level - var slMap = getSLMap(root, fl) & (~0 << sl); + var slMap = GETSL(root, fl) & (~0 << sl); var head: Block | null; if (!slMap) { // search next larger first level @@ -363,13 +351,13 @@ function searchBlock(root: Root, size: usize): Block | null { if (!flMap) { head = null; } else { - fl = ffs(flMap); - slMap = getSLMap(root, fl); + fl = ctz(flMap); + slMap = GETSL(root, fl); if (DEBUG) assert(slMap); // can't be zero if fl points here - head = getHead(root, fl, ffs(slMap)); + head = GETHEAD(root, fl, ctz(slMap)); } } else { - head = getHead(root, fl, ffs(slMap)); + head = GETHEAD(root, fl, ctz(slMap)); } return head; } @@ -399,7 +387,7 @@ function prepareBlock(root: Root, block: Block, size: usize): usize { // otherwise tag block as no longer FREE and right as no longer LEFT_FREE } else { block.mmInfo = blockInfo & ~FREE; - getRight(block).mmInfo &= ~LEFTFREE; + GETRIGHT(block).mmInfo &= ~LEFTFREE; } return changetype(block) + BLOCK_OVERHEAD; @@ -415,7 +403,7 @@ function addMemory(root: Root, start: usize, end: usize): bool { ); } - var tail = getTail(root); + var tail = GETTAIL(root); var tailInfo: usize = 0; if (tail) { // more memory if (DEBUG) assert(start >= changetype(tail) + BLOCK_OVERHEAD); @@ -449,7 +437,7 @@ function addMemory(root: Root, start: usize, end: usize): bool { // tail is a zero-length used block tail = changetype(start + size - BLOCK_OVERHEAD); tail.mmInfo = 0 | LEFTFREE; - setTail(root, tail); + SETTAIL(root, tail); insertBlock(root, left); // also merges with free left before tail / sets 'back' @@ -476,11 +464,11 @@ function initialize(): Root { if (pagesNeeded > pagesBefore && memory.grow(pagesNeeded - pagesBefore) < 0) unreachable(); var root = changetype(rootOffset); root.flMap = 0; - setTail(root, changetype(0)); + SETTAIL(root, changetype(0)); for (let fl: usize = 0; fl < FL_BITS; ++fl) { - setSLMap(root, fl, 0); + SETSL(root, fl, 0); for (let sl: u32 = 0; sl < SL_SIZE; ++sl) { - setHead(root, fl, sl, null); + SETHEAD(root, fl, sl, null); } } addMemory(root, (rootOffset + ROOT_SIZE + AL_MASK) & ~AL_MASK, memory.size() << 16); diff --git a/tests/runtime/index.html b/tests/runtime/index.html index 9eaabee061..6858828ab8 100644 --- a/tests/runtime/index.html +++ b/tests/runtime/index.html @@ -12,7 +12,7 @@ var exports; var ROOT; var U32; -fetch("untouched.wasm").then(result => +fetch("optimized.wasm").then(result => result.arrayBuffer() ).then(buffer => WebAssembly.instantiate(buffer, { @@ -62,6 +62,11 @@ } function init() { + document.getElementById("albits").innerText = AL_BITS; + document.getElementById("flbits").innerText = FL_BITS; + document.getElementById("slbits").innerText = SL_BITS; + document.getElementById("overhead").innerText = OVERHEAD; + var fls = document.getElementById("fl"); var sls = document.getElementById("sl"); var hls = document.getElementById("hl"); @@ -133,8 +138,8 @@ -

AssemblyScript Runtime Visualizer

+

AssemblyScript Runtime Visualizer / TLSF

Notes:

  • It is expected that there is exactly one block on initialization. This is the remaining space (< 64K) within the last page after static data.
  • It is expected that if two adjacent blocks of size K are freed, the merged block doesn't go into the first level list for K*2 because its size is actually larger than that (K + OVERHEAD + K).
  • It is expected that if memory grows beyond 1GB, that even if all blocks are free'd there are at least two (or even three if the largest block is in the middle) remaining blocks, because a single block must not be larger than 1GB.
  • -
  • It is expected that after other operations have already been performed, being able to allocate 1GB can't be guaranteed anymore, even if there should be enough space left in absolute terms, because prior subdivision prevents it.
  • +
  • It is expected that after other operations have already been performed, being able to allocate 1GB can't be guaranteed anymore, even if there should be enough space left in absolute terms, if prior subdivision prevents it.
  • +
  • It is expected that the second level 0 in first level 0 isn't ever used due to alignment guarantees. Smallest block is 32 bytes (16 bytes overhead + 16 bytes payload if used, respectively linking information if free) in this implementation.

+

Implementation constants: ? bits alignment, ? bits first level, ? bits second level, ? B overhead

First level bitmap

-

The first level map is a bitmap determining whether free blocks exists in at least one of its respective second levels. In this implementation, the first bit indicates whether a small block (< 256B) exists. Each bit doubles the size.

+

The first level map is a bitmap determining whether free blocks exist in at least one of its respective second levels. In this implementation, the first bit indicates whether a small block (< 256B) exists. Each bit doubles the size.

@@ -176,21 +184,41 @@

Heads

Allocator

+

Chose a size to allocate. Annotated list indexes depend on implementation constants but match those of this implementation.

+

+   +

+

+ Small blocks: + + + + + + ... + + (δ ≙ block overhead) +

+

+ Common blocks: + + + + + + (e.g. allocate 3, free middle, check second level) +

- Click to allocate: -   - - -   - - - - - -   - + Large blocks: + + + + + +

Segments

+

Allocations performed above are tracked here so you can free them again. Note that TLSF alone does not keep track of used blocks (unless free'd and put in a free list again). It is expected that adjacent free blocks become merged automatically.

diff --git a/tests/runtime/optimized.wasm b/tests/runtime/optimized.wasm new file mode 100644 index 0000000000000000000000000000000000000000..a09173be1c0fac09918fd71951f51c6365755952 GIT binary patch literal 2343 zcmZ`*&2Aev5S}5qk{!x6n>uJxrzm&rgHMjpgRe1x#;xNP0Sfe3NQ$#@w6ZKq+Bi

Tli(()@j5j7Hq~OZoGMvdmY8i1ry~1AkWJ@{g*%S0l=}i$-S*)wh4x~5E z#H!=fqxu|LQ69BTU~kGWos2TxQpR(oMdB`d9VJ_eES|p=H>yCyr{IcNP(@~-o+W`t z;uyjdVS=?lROfiiZoJz#hQBK4k=Nr4UeO0|(!?UdpahG-i9l=lYSh4TL6J4D18V?l z-w@zt4XjfJj)5C$EEgF-d4x#O!JBzdAIyWg%tOtlnlX$Np^!j7qA|#bH}Dl_F(EgU z<*Wm?FZqnVh{}Jmpi0P$eZ`FGP*X8^)5;{(;JWXXq*Z|jsS6y$@Ywbd$tKucl1c#T z2;upD;BmZY=A}5hEYugUghiwtOl;u_c*joJ-=s{#J8&I-{ROpjelBS|$@n2<^jIp` zQ-7NReVw3(%r;rCGrS6;ae33y+X^m*Po6B`NK#l9A~%6jjxzW?lc8Wa(kU7pM8rkP zElHV@t%_UW>5oN^ewY!qx zP^uQ_b(hH&T_$8m*O-6^OEdu@1^5e51WJ^3k}7}FwOm{(iCV_B`3u~2%>Wcx`z7ls z*i)Hg?BYUSBQ-;ld-HfD5-KUKH!zFTxw4Mfo-t}crU&wl8>P@u|6cVo6Z{h~#VC-( z*9k}GsUlOTcPC{K)8my>2^4iW8_5AUyK3H>Z@4J@EJ~;+XxW#zeibobEI5;?HJnq` zdAK`JxEub_;WI}#SCA}8vQQQ-WASzm#JeOT87g4kHR5-YMieOxm|&R`-7VD;2xv9! z9W2#!nMEKadM{?)Y{MUpf#aUOn+MbPV}}`#d~rdez&mk@t*g0DE!i)k8B&a7NjWq} zapA9kfqSCSX?-Rwh#V|S0iyvc#8dEr)1Cjpk;bf0a5e1-s#`$G+=P}XB+z#AJ($zc zqaeE1TvIzM(qOCb0paDOwy!?W|BU& zc2VV~MV~=&$=Z8>kTV$&Gc+-8S{`$yri@09F8zcmcrb20kqH|?o01PS3V!yAR98b|jXlaL zx&pj7Wl+j)5dlGoqS6NxP^RduD$NlV<+pUhW{s^T%%vX;g*ls`(lHOiU7L1kf=^BZ zdP;}%njTP(j_4UqPHBTm$ikmg8QiDv7ul6F==Gre05)Pbq%rI&-8DBEz8vr8-*%6W ddq)S~fA`Jp;c?j;^nT2rZM?$2M;n9g@xM(Rp)ddd literal 0 HcmV?d00001 diff --git a/tests/runtime/optimized.wat b/tests/runtime/optimized.wat index 143fac1fe0..ef509453d9 100644 --- a/tests/runtime/optimized.wat +++ b/tests/runtime/optimized.wat @@ -727,7 +727,7 @@ if i32.const 0 i32.const 24 - i32.const 507 + i32.const 495 i32.const 29 call $~lib/builtins/abort unreachable diff --git a/tests/runtime/untouched.wat b/tests/runtime/untouched.wat index 43c3a7e141..16c44551fc 100644 --- a/tests/runtime/untouched.wat +++ b/tests/runtime/untouched.wat @@ -48,7 +48,7 @@ if i32.const 0 i32.const 24 - i32.const 297 + i32.const 282 i32.const 13 call $~lib/builtins/abort unreachable @@ -73,7 +73,7 @@ if i32.const 0 i32.const 24 - i32.const 299 + i32.const 284 i32.const 13 call $~lib/builtins/abort unreachable @@ -89,14 +89,10 @@ i32.div_u local.set $5 else - block $assembly/index/fls|inlined.0 (result i32) - local.get $3 - local.set $6 - i32.const 31 - local.get $6 - i32.clz - i32.sub - end + i32.const 31 + local.get $3 + i32.clz + i32.sub local.set $4 local.get $3 local.get $4 @@ -129,42 +125,42 @@ if i32.const 0 i32.const 24 - i32.const 311 + i32.const 297 i32.const 13 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=16 - local.set $7 + local.set $6 local.get $1 i32.load offset=20 - local.set $8 - local.get $7 + local.set $7 + local.get $6 if + local.get $6 local.get $7 - local.get $8 i32.store offset=20 end - local.get $8 + local.get $7 if - local.get $8 local.get $7 + local.get $6 i32.store offset=16 end local.get $1 - block $assembly/index/getHead|inlined.1 (result i32) + block $assembly/index/GETHEAD|inlined.1 (result i32) local.get $0 local.set $10 local.get $4 local.set $9 local.get $5 - local.set $6 + local.set $8 local.get $10 local.get $9 i32.const 16 i32.mul - local.get $6 + local.get $8 i32.add i32.const 4 i32.mul @@ -173,15 +169,15 @@ end i32.eq if - block $assembly/index/setHead|inlined.1 + block $assembly/index/SETHEAD|inlined.1 local.get $0 local.set $11 local.get $4 local.set $10 local.get $5 local.set $9 - local.get $8 - local.set $6 + local.get $7 + local.set $8 local.get $11 local.get $10 i32.const 16 @@ -191,38 +187,38 @@ i32.const 4 i32.mul i32.add - local.get $6 + local.get $8 i32.store offset=96 end - local.get $8 + local.get $7 i32.eqz if - block $assembly/index/getSLMap|inlined.0 (result i32) + block $assembly/index/GETSL|inlined.0 (result i32) local.get $0 local.set $9 local.get $4 - local.set $6 + local.set $8 local.get $9 - local.get $6 + local.get $8 i32.const 2 i32.shl i32.add i32.load offset=4 end - local.set $6 - block $assembly/index/setSLMap|inlined.1 + local.set $8 + block $assembly/index/SETSL|inlined.1 local.get $0 local.set $11 local.get $4 local.set $10 - local.get $6 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $6 + local.tee $8 local.set $9 local.get $11 local.get $10 @@ -232,7 +228,7 @@ local.get $9 i32.store offset=4 end - local.get $6 + local.get $8 i32.eqz if local.get $0 @@ -267,7 +263,7 @@ if i32.const 0 i32.const 24 - i32.const 226 + i32.const 210 i32.const 13 call $~lib/builtins/abort unreachable @@ -282,12 +278,12 @@ if i32.const 0 i32.const 24 - i32.const 228 + i32.const 212 i32.const 13 call $~lib/builtins/abort unreachable end - block $assembly/index/getRight|inlined.0 (result i32) + block $assembly/index/GETRIGHT|inlined.0 (result i32) local.get $1 local.set $3 local.get $3 @@ -338,7 +334,7 @@ i32.or local.tee $2 i32.store - block $assembly/index/getRight|inlined.1 (result i32) + block $assembly/index/GETRIGHT|inlined.1 (result i32) local.get $1 local.set $6 local.get $6 @@ -362,7 +358,7 @@ i32.const 2 i32.and if - block $assembly/index/getLeft|inlined.0 (result i32) + block $assembly/index/GETLEFT|inlined.0 (result i32) local.get $1 local.set $3 local.get $3 @@ -381,7 +377,7 @@ if i32.const 0 i32.const 24 - i32.const 249 + i32.const 233 i32.const 15 call $~lib/builtins/abort unreachable @@ -444,7 +440,7 @@ if i32.const 0 i32.const 24 - i32.const 264 + i32.const 248 i32.const 13 call $~lib/builtins/abort unreachable @@ -460,7 +456,7 @@ if i32.const 0 i32.const 24 - i32.const 265 + i32.const 249 i32.const 13 call $~lib/builtins/abort unreachable @@ -481,14 +477,10 @@ i32.div_u local.set $10 else - block $assembly/index/fls|inlined.1 (result i32) - local.get $8 - local.set $7 - i32.const 31 - local.get $7 - i32.clz - i32.sub - end + i32.const 31 + local.get $8 + i32.clz + i32.sub local.set $9 local.get $8 local.get $9 @@ -521,12 +513,12 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 265 i32.const 13 call $~lib/builtins/abort unreachable end - block $assembly/index/getHead|inlined.2 (result i32) + block $assembly/index/GETHEAD|inlined.2 (result i32) local.get $0 local.set $3 local.get $9 @@ -557,7 +549,7 @@ local.get $1 i32.store offset=16 end - block $assembly/index/setHead|inlined.2 + block $assembly/index/SETHEAD|inlined.2 local.get $0 local.set $12 local.get $9 @@ -586,8 +578,8 @@ i32.shl i32.or i32.store - block $assembly/index/setSLMap|inlined.2 - block $assembly/index/getSLMap|inlined.1 (result i32) + block $assembly/index/SETSL|inlined.2 + block $assembly/index/GETSL|inlined.1 (result i32) local.get $0 local.set $13 local.get $9 @@ -644,12 +636,12 @@ if i32.const 0 i32.const 24 - i32.const 411 + i32.const 399 i32.const 4 call $~lib/builtins/abort unreachable end - block $assembly/index/getTail|inlined.0 (result i32) + block $assembly/index/GETTAIL|inlined.0 (result i32) local.get $0 local.set $3 local.get $3 @@ -669,7 +661,7 @@ if i32.const 0 i32.const 24 - i32.const 421 + i32.const 409 i32.const 15 call $~lib/builtins/abort unreachable @@ -700,7 +692,7 @@ if i32.const 0 i32.const 24 - i32.const 433 + i32.const 421 i32.const 4 call $~lib/builtins/abort unreachable @@ -755,7 +747,7 @@ i32.const 2 i32.or i32.store - block $assembly/index/setTail|inlined.1 + block $assembly/index/SETTAIL|inlined.1 local.get $0 local.set $9 local.get $4 @@ -823,7 +815,7 @@ local.get $3 i32.const 0 i32.store - block $assembly/index/setTail|inlined.0 + block $assembly/index/SETTAIL|inlined.0 local.get $3 local.set $5 i32.const 0 @@ -842,7 +834,7 @@ i32.eqz br_if $break|0 block - block $assembly/index/setSLMap|inlined.0 + block $assembly/index/SETSL|inlined.0 local.get $3 local.set $7 local.get $4 @@ -866,7 +858,7 @@ i32.lt_u i32.eqz br_if $break|1 - block $assembly/index/setHead|inlined.0 + block $assembly/index/SETHEAD|inlined.0 local.get $3 local.set $9 local.get $4 @@ -932,7 +924,6 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) local.get $1 i32.const 256 i32.lt_u @@ -950,15 +941,9 @@ if (result i32) local.get $1 i32.const 1 - block $assembly/index/fls|inlined.2 (result i32) - local.get $1 - local.set $4 - i32.const 31 - local.get $4 - i32.clz - i32.sub - end - i32.const 4 + i32.const 27 + local.get $1 + i32.clz i32.sub i32.shl i32.add @@ -968,14 +953,10 @@ local.get $1 end local.set $4 - block $assembly/index/fls|inlined.3 (result i32) - local.get $4 - local.set $5 - i32.const 31 - local.get $5 - i32.clz - i32.sub - end + i32.const 31 + local.get $4 + i32.clz + i32.sub local.set $2 local.get $4 local.get $2 @@ -1008,12 +989,12 @@ if i32.const 0 i32.const 24 - i32.const 355 + i32.const 343 i32.const 13 call $~lib/builtins/abort unreachable end - block $assembly/index/getSLMap|inlined.2 (result i32) + block $assembly/index/GETSL|inlined.2 (result i32) local.get $0 local.set $5 local.get $2 @@ -1052,14 +1033,10 @@ i32.const 0 local.set $7 else - block $assembly/index/ffs|inlined.0 (result i32) - local.get $4 - local.set $5 - local.get $5 - i32.ctz - end + local.get $4 + i32.ctz local.set $2 - block $assembly/index/getSLMap|inlined.3 (result i32) + block $assembly/index/GETSL|inlined.3 (result i32) local.get $0 local.set $8 local.get $2 @@ -1077,22 +1054,18 @@ if i32.const 0 i32.const 24 - i32.const 368 + i32.const 356 i32.const 17 call $~lib/builtins/abort unreachable end - block $assembly/index/getHead|inlined.3 (result i32) + block $assembly/index/GETHEAD|inlined.3 (result i32) local.get $0 local.set $9 local.get $2 local.set $8 - block $assembly/index/ffs|inlined.0 (result i32) - local.get $6 - local.set $10 - local.get $10 - i32.ctz - end + local.get $6 + i32.ctz local.set $5 local.get $9 local.get $8 @@ -1108,17 +1081,13 @@ local.set $7 end else - block $assembly/index/getHead|inlined.4 (result i32) + block $assembly/index/GETHEAD|inlined.4 (result i32) local.get $0 local.set $8 local.get $2 local.set $5 - block $assembly/index/ffs|inlined.1 (result i32) - local.get $6 - local.set $9 - local.get $9 - i32.ctz - end + local.get $6 + i32.ctz local.set $4 local.get $8 local.get $5 @@ -1212,7 +1181,7 @@ if i32.const 0 i32.const 24 - i32.const 383 + i32.const 371 i32.const 4 call $~lib/builtins/abort unreachable @@ -1265,7 +1234,7 @@ i32.xor i32.and i32.store - block $assembly/index/getRight|inlined.3 (result i32) + block $assembly/index/GETRIGHT|inlined.3 (result i32) local.get $1 local.set $5 local.get $5 @@ -1279,7 +1248,7 @@ i32.and i32.add end - block $assembly/index/getRight|inlined.2 (result i32) + block $assembly/index/GETRIGHT|inlined.2 (result i32) local.get $1 local.set $5 local.get $5 @@ -1324,7 +1293,7 @@ if i32.const 0 i32.const 24 - i32.const 507 + i32.const 495 i32.const 29 call $~lib/builtins/abort unreachable @@ -1363,7 +1332,7 @@ if i32.const 0 i32.const 24 - i32.const 513 + i32.const 501 i32.const 15 call $~lib/builtins/abort unreachable @@ -1381,7 +1350,7 @@ if i32.const 0 i32.const 24 - i32.const 515 + i32.const 503 i32.const 13 call $~lib/builtins/abort unreachable @@ -1413,7 +1382,7 @@ if i32.const 0 i32.const 24 - i32.const 492 + i32.const 480 i32.const 2 call $~lib/builtins/abort unreachable @@ -1439,7 +1408,7 @@ if i32.const 0 i32.const 24 - i32.const 526 + i32.const 514 i32.const 4 call $~lib/builtins/abort unreachable @@ -1785,7 +1754,7 @@ if i32.const 0 i32.const 24 - i32.const 649 + i32.const 637 i32.const 15 call $~lib/builtins/abort unreachable @@ -1983,7 +1952,7 @@ if i32.const 0 i32.const 24 - i32.const 604 + i32.const 592 i32.const 17 call $~lib/builtins/abort unreachable @@ -2030,7 +1999,7 @@ if i32.const 0 i32.const 24 - i32.const 615 + i32.const 603 i32.const 6 call $~lib/builtins/abort unreachable @@ -2067,7 +2036,7 @@ if i32.const 0 i32.const 24 - i32.const 626 + i32.const 614 i32.const 24 call $~lib/builtins/abort unreachable @@ -2096,7 +2065,7 @@ if i32.const 0 i32.const 24 - i32.const 633 + i32.const 621 i32.const 2 call $~lib/builtins/abort unreachable From ffdda4b69517fe25f71074b1ecc0f6f29ef045ed Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 17 Apr 2019 17:48:26 +0200 Subject: [PATCH 114/119] realloc on mm level --- tests/allocators/asrt/optimized.wat | 155 ++++---- tests/allocators/asrt/untouched.wat | 251 ++++++------- tests/runtime/.gitignore | 2 +- tests/runtime/assembly/index.ts | 142 +++++--- tests/runtime/index.html | 23 +- tests/runtime/optimized.wasm | Bin 2343 -> 0 bytes tests/runtime/optimized.wat | 441 +++++++++++++++++++---- tests/runtime/untouched.wasm | Bin 0 -> 4702 bytes tests/runtime/untouched.wat | 533 +++++++++++++++++++--------- 9 files changed, 1037 insertions(+), 510 deletions(-) delete mode 100644 tests/runtime/optimized.wasm create mode 100644 tests/runtime/untouched.wasm diff --git a/tests/allocators/asrt/optimized.wat b/tests/allocators/asrt/optimized.wat index 8bd7534f7a..315ac962ff 100644 --- a/tests/allocators/asrt/optimized.wat +++ b/tests/allocators/asrt/optimized.wat @@ -1,12 +1,11 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -490,7 +489,33 @@ call $../../runtime/assembly/index/addMemory local.get $0 ) - (func $../../runtime/assembly/index/searchBlock (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $../../runtime/assembly/index/prepareSize (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 1073741824 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 466 + i32.const 29 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $0 + i32.const 16 + local.tee $1 + local.get $0 + local.get $1 + i32.gt_u + select + ) + (func $../../runtime/assembly/index/searchBlock (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -591,7 +616,7 @@ end end ) - (func $../../runtime/assembly/index/growMemory (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $../../runtime/assembly/index/growMemory (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -632,16 +657,12 @@ i32.shl call $../../runtime/assembly/index/addMemory ) - (func $../../runtime/assembly/index/prepareBlock (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $../../runtime/assembly/index/prepareBlock (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 i32.load - local.set $3 - local.get $0 - local.get $1 - call $../../runtime/assembly/index/removeBlock - local.get $3 + local.tee $3 i32.const -4 i32.and local.get $2 @@ -662,7 +683,7 @@ i32.add local.get $2 i32.add - local.tee $2 + local.tee $1 local.get $4 i32.const 16 i32.sub @@ -670,7 +691,7 @@ i32.or i32.store local.get $0 - local.get $2 + local.get $1 call $../../runtime/assembly/index/insertBlock else local.get $1 @@ -699,101 +720,73 @@ i32.and i32.store end - local.get $1 - i32.const 16 - i32.add ) - (func $../../runtime/assembly/index/__mm_allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $../../runtime/assembly/index/allocateBlock (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - global.get $../../runtime/assembly/index/ROOT - local.tee $2 - i32.eqz - if - call $../../runtime/assembly/index/initialize - local.tee $2 - global.set $../../runtime/assembly/index/ROOT - end - local.get $0 - i32.const 1073741824 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 495 - i32.const 29 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $0 - i32.const 16 - local.tee $1 + (local $3 i32) local.get $0 local.get $1 - i32.gt_u - select - local.tee $1 + call $../../runtime/assembly/index/prepareSize + local.tee $3 call $../../runtime/assembly/index/searchBlock - local.tee $0 + local.tee $2 i32.eqz if - local.get $2 - local.get $1 + local.get $0 + local.get $3 call $../../runtime/assembly/index/growMemory - local.get $2 - local.get $1 + local.get $0 + local.get $3 call $../../runtime/assembly/index/searchBlock - local.set $0 + local.set $2 end - local.get $0 + local.get $2 i32.const 0 i32.store offset=4 - local.get $0 + local.get $2 i32.const 0 i32.store offset=8 - local.get $0 + local.get $2 local.get $1 i32.store offset=12 + local.get $0 local.get $2 + call $../../runtime/assembly/index/removeBlock local.get $0 - local.get $1 + local.get $2 + local.get $3 call $../../runtime/assembly/index/prepareBlock + local.get $2 ) - (func $assembly/index/memory.allocate (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $../../runtime/assembly/index/__mm_allocate - ) - (func $../../runtime/assembly/index/__mm_free (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/memory.allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - local.get $0 + global.get $../../runtime/assembly/index/ROOT + local.tee $1 + i32.eqz if - global.get $../../runtime/assembly/index/ROOT + call $../../runtime/assembly/index/initialize local.tee $1 - if - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store - local.get $1 - local.get $0 - call $../../runtime/assembly/index/insertBlock - end + global.set $../../runtime/assembly/index/ROOT end + local.get $1 + local.get $0 + call $../../runtime/assembly/index/allocateBlock + i32.const 16 + i32.add ) (func $assembly/index/memory.free (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $../../runtime/assembly/index/__mm_free + i32.const 16 + i32.sub + local.tee $0 + local.get $0 + i32.load + i32.const 1 + i32.or + i32.store + global.get $../../runtime/assembly/index/ROOT + local.get $0 + call $../../runtime/assembly/index/insertBlock ) (func $~lib/memory/memory.fill (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i64) diff --git a/tests/allocators/asrt/untouched.wat b/tests/allocators/asrt/untouched.wat index 3167815ed5..201974bda1 100644 --- a/tests/allocators/asrt/untouched.wat +++ b/tests/allocators/asrt/untouched.wat @@ -5,8 +5,8 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -41,7 +41,7 @@ if i32.const 0 i32.const 24 - i32.const 282 + i32.const 276 i32.const 13 call $~lib/builtins/abort unreachable @@ -66,7 +66,7 @@ if i32.const 0 i32.const 24 - i32.const 284 + i32.const 278 i32.const 13 call $~lib/builtins/abort unreachable @@ -118,7 +118,7 @@ if i32.const 0 i32.const 24 - i32.const 297 + i32.const 291 i32.const 13 call $~lib/builtins/abort unreachable @@ -256,7 +256,7 @@ if i32.const 0 i32.const 24 - i32.const 210 + i32.const 204 i32.const 13 call $~lib/builtins/abort unreachable @@ -271,7 +271,7 @@ if i32.const 0 i32.const 24 - i32.const 212 + i32.const 206 i32.const 13 call $~lib/builtins/abort unreachable @@ -351,7 +351,7 @@ i32.const 2 i32.and if - block $../../runtime/assembly/index/GETLEFT|inlined.0 (result i32) + block $../../runtime/assembly/index/GETFREELEFT|inlined.0 (result i32) local.get $1 local.set $3 local.get $3 @@ -370,7 +370,7 @@ if i32.const 0 i32.const 24 - i32.const 233 + i32.const 227 i32.const 15 call $~lib/builtins/abort unreachable @@ -433,7 +433,7 @@ if i32.const 0 i32.const 24 - i32.const 248 + i32.const 242 i32.const 13 call $~lib/builtins/abort unreachable @@ -449,7 +449,7 @@ if i32.const 0 i32.const 24 - i32.const 249 + i32.const 243 i32.const 13 call $~lib/builtins/abort unreachable @@ -506,7 +506,7 @@ if i32.const 0 i32.const 24 - i32.const 265 + i32.const 259 i32.const 13 call $~lib/builtins/abort unreachable @@ -629,7 +629,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 385 i32.const 4 call $~lib/builtins/abort unreachable @@ -654,7 +654,7 @@ if i32.const 0 i32.const 24 - i32.const 409 + i32.const 395 i32.const 15 call $~lib/builtins/abort unreachable @@ -685,7 +685,7 @@ if i32.const 0 i32.const 24 - i32.const 421 + i32.const 407 i32.const 4 call $~lib/builtins/abort unreachable @@ -908,7 +908,36 @@ drop local.get $3 ) - (func $../../runtime/assembly/index/searchBlock (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $../../runtime/assembly/index/prepareSize (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.const 1073741824 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 466 + i32.const 29 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 15 + i32.add + i32.const 15 + i32.const -1 + i32.xor + i32.and + local.tee $1 + i32.const 16 + local.tee $2 + local.get $1 + local.get $2 + i32.gt_u + select + ) + (func $../../runtime/assembly/index/searchBlock (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -982,7 +1011,7 @@ if i32.const 0 i32.const 24 - i32.const 343 + i32.const 337 i32.const 13 call $~lib/builtins/abort unreachable @@ -1047,7 +1076,7 @@ if i32.const 0 i32.const 24 - i32.const 356 + i32.const 350 i32.const 17 call $~lib/builtins/abort unreachable @@ -1097,7 +1126,7 @@ end local.get $7 ) - (func $../../runtime/assembly/index/growMemory (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $../../runtime/assembly/index/growMemory (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1150,38 +1179,26 @@ call $../../runtime/assembly/index/addMemory drop ) - (func $../../runtime/assembly/index/prepareBlock (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $../../runtime/assembly/index/prepareBlock (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $1 i32.load local.set $3 - local.get $3 - i32.const 1 + local.get $2 + i32.const 15 i32.and - i32.const 0 - i32.ne - if (result i32) - local.get $2 - i32.const 15 - i32.and - i32.eqz - else - i32.const 0 - end + i32.eqz i32.eqz if i32.const 0 i32.const 24 - i32.const 371 - i32.const 4 + i32.const 364 + i32.const 13 call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 - call $../../runtime/assembly/index/removeBlock local.get $3 i32.const 3 i32.const -1 @@ -1262,111 +1279,95 @@ i32.and i32.store end - local.get $1 - i32.const 16 - i32.add ) - (func $../../runtime/assembly/index/__mm_allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $../../runtime/assembly/index/allocateBlock (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - global.get $../../runtime/assembly/index/ROOT - local.set $1 local.get $1 - i32.eqz - if - call $../../runtime/assembly/index/initialize - local.tee $1 - global.set $../../runtime/assembly/index/ROOT - end - local.get $0 - i32.const 1073741824 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 495 - i32.const 29 - call $~lib/builtins/abort - unreachable - end + call $../../runtime/assembly/index/prepareSize + local.set $2 local.get $0 - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - local.tee $2 - i32.const 16 - local.tee $3 local.get $2 - local.get $3 - i32.gt_u - select - local.set $0 - local.get $1 - local.get $0 call $../../runtime/assembly/index/searchBlock - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if - local.get $1 local.get $0 + local.get $2 call $../../runtime/assembly/index/growMemory - local.get $1 local.get $0 + local.get $2 call $../../runtime/assembly/index/searchBlock - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if i32.const 0 i32.const 24 - i32.const 501 + i32.const 477 i32.const 15 call $~lib/builtins/abort unreachable end end - local.get $4 + local.get $3 i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $0 + local.get $2 i32.ge_u i32.eqz if i32.const 0 i32.const 24 - i32.const 503 + i32.const 479 i32.const 13 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.store offset=4 - local.get $4 + local.get $3 i32.const 0 i32.store offset=8 - local.get $4 - local.get $0 - i32.store offset=12 + local.get $3 local.get $1 - local.get $4 + i32.store offset=12 + local.get $0 + local.get $3 + call $../../runtime/assembly/index/removeBlock local.get $0 + local.get $3 + local.get $2 call $../../runtime/assembly/index/prepareBlock + local.get $3 + ) + (func $../../runtime/assembly/index/__mm_allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $../../runtime/assembly/index/ROOT + local.set $1 + local.get $1 + i32.eqz + if + call $../../runtime/assembly/index/initialize + local.tee $1 + global.set $../../runtime/assembly/index/ROOT + end + local.get $1 + local.get $0 + call $../../runtime/assembly/index/allocateBlock + i32.const 16 + i32.add ) - (func $assembly/index/memory.allocate (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/memory.allocate (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $../../runtime/assembly/index/__mm_allocate ) - (func $../../runtime/assembly/index/freeBlock (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $../../runtime/assembly/index/freeBlock (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 i32.load @@ -1379,7 +1380,7 @@ if i32.const 0 i32.const 24 - i32.const 480 + i32.const 530 i32.const 2 call $~lib/builtins/abort unreachable @@ -1393,40 +1394,48 @@ local.get $1 call $../../runtime/assembly/index/insertBlock ) - (func $../../runtime/assembly/index/__mm_free (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 + (func $../../runtime/assembly/index/__mm_free (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + global.get $../../runtime/assembly/index/ROOT + i32.eqz if + i32.const 0 + i32.const 24 + i32.const 556 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 0 + i32.ne + if (result i32) local.get $0 i32.const 15 i32.and i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 514 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - global.get $../../runtime/assembly/index/ROOT - local.set $1 - local.get $1 - if - local.get $1 - local.get $0 - i32.const 16 - i32.sub - call $../../runtime/assembly/index/freeBlock - end + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 557 + i32.const 2 + call $~lib/builtins/abort + unreachable end + global.get $../../runtime/assembly/index/ROOT + local.get $0 + i32.const 16 + i32.sub + call $../../runtime/assembly/index/freeBlock ) - (func $assembly/index/memory.free (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/memory.free (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $../../runtime/assembly/index/__mm_free ) - (func $~lib/memory/memory.fill (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1683,12 +1692,12 @@ end end ) - (func $assembly/index/memory.fill (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $assembly/index/memory.fill (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 local.get $2 call $~lib/memory/memory.fill ) - (func $null (; 15 ;) (type $FUNCSIG$v) + (func $null (; 17 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/runtime/.gitignore b/tests/runtime/.gitignore index cec7a80f40..4ef75906ec 100644 --- a/tests/runtime/.gitignore +++ b/tests/runtime/.gitignore @@ -1 +1 @@ -!optimized.wasm +!untouched.wasm diff --git a/tests/runtime/assembly/index.ts b/tests/runtime/assembly/index.ts index d4936bc625..3129d0702f 100644 --- a/tests/runtime/assembly/index.ts +++ b/tests/runtime/assembly/index.ts @@ -80,7 +80,7 @@ // ├───────────────────────────────────────────────────────────────┤ │ // │ if free: back ▲ │ ◄─┘ // └───────────────────────────────────────────────────────────────┘ payload ┘ >= MIN SIZE -// F: FREE, L: LEFT_FREE +// F: FREE, L: LEFTFREE @unmanaged class Block { /** Memory manager info. */ @@ -97,7 +97,7 @@ /** Next free block, if any. Only valid if free, otherwise part of payload. */ next: Block | null; - // If the block is free, there is a backreference at its end pointing at its start. + // If the block is free, there is a 'back'reference at its end pointing at its start. } // Block constants. Overhead is always present, no matter if free or used. Also, a block must have @@ -112,7 +112,7 @@ /** Gets the left block of a block. Only valid if the left block is free. */ // @ts-ignore: decorator -@inline function GETLEFT(block: Block): Block { +@inline function GETFREELEFT(block: Block): Block { return load(changetype(block) - sizeof()); } @@ -132,13 +132,13 @@ // ├───────────────────────────────────────────────────────────────┤ │ │ // │ slMap[1] │ ◄─┤ │ // ├───────────────────────────────────────────────────────────────┤ u32 │ -// │ slMap[21] │ ◄─┘ │ +// │ slMap[22] │ ◄─┘ │ // ╞═══════════════════════════════════════════════════════════════╡ usize // │ head[0] │ ◄────┤ // ├───────────────────────────────────────────────────────────────┤ │ // │ ... │ ◄────┤ // ├───────────────────────────────────────────────────────────────┤ │ -// │ head[351] │ ◄────┤ +// │ head[367] │ ◄────┤ // ╞═══════════════════════════════════════════════════════════════╡ │ // │ tail │ ◄────┘ // └───────────────────────────────────────────────────────────────┘ SIZE ┘ @@ -171,26 +171,20 @@ var ROOT: Root; /** Sets the second level map of the specified first level. */ // @ts-ignore: decorator -@inline function SETSL(root: Root, fl: usize, value: u32): void { - store(changetype(root) + (fl << alignof()), value, SL_START); +@inline function SETSL(root: Root, fl: usize, slMap: u32): void { + store(changetype(root) + (fl << alignof()), slMap, SL_START); } /** Gets the head of the free list for the specified combination of first and second level. */ // @ts-ignore: decorator @inline function GETHEAD(root: Root, fl: usize, sl: u32): Block | null { - return changetype( - load( - changetype(root) + (fl * SL_SIZE + sl) * sizeof(), - HL_START) - ); + return changetype(load(changetype(root) + (fl * SL_SIZE + sl) * sizeof(), HL_START)); } /** Sets the head of the free list for the specified combination of first and second level. */ // @ts-ignore: decorator @inline function SETHEAD(root: Root, fl: usize, sl: u32, head: Block | null): void { - store( - changetype(root) + (fl * SL_SIZE + sl) * sizeof() , changetype(head), - HL_START); + store(changetype(root) + (fl * SL_SIZE + sl) * sizeof() , changetype(head), HL_START); } /** Gets the tail block.. */ @@ -228,7 +222,7 @@ function insertBlock(root: Root, block: Block): void { // merge with left block if also free if (blockInfo & LEFTFREE) { - let left = GETLEFT(block); + let left = GETFREELEFT(block); let leftInfo = left.mmInfo; if (DEBUG) assert(leftInfo & FREE); // must be free according to right tags let newSize = (leftInfo & ~TAGS_MASK) + BLOCK_OVERHEAD + (blockInfo & ~TAGS_MASK); @@ -362,18 +356,12 @@ function searchBlock(root: Root, size: usize): Block | null { return head; } -/** Prepares the specified free block for use, possibly splitting it. */ -function prepareBlock(root: Root, block: Block, size: usize): usize { +/** Prepares the specified block before (re-)use, possibly splitting it. */ +function prepareBlock(root: Root, block: Block, size: usize): void { // size was already asserted by caller var blockInfo = block.mmInfo; - if (DEBUG) { - assert( - (blockInfo & FREE) != 0 && // must be free - !(size & AL_MASK) // size must be aligned so the new block is - ); - } - removeBlock(root, block); + if (DEBUG) assert(!(size & AL_MASK)); // size must be aligned so the new block is // split if the block can hold another MINSIZE block incl. overhead var remaining = (blockInfo & ~TAGS_MASK) - size; @@ -381,16 +369,14 @@ function prepareBlock(root: Root, block: Block, size: usize): usize { block.mmInfo = size | (blockInfo & LEFTFREE); // also discards FREE let spare = changetype(changetype(block) + BLOCK_OVERHEAD + size); - spare.mmInfo = (remaining - BLOCK_OVERHEAD) | FREE; // not LEFT_FREE + spare.mmInfo = (remaining - BLOCK_OVERHEAD) | FREE; // not LEFTFREE insertBlock(root, spare); // also sets 'back' - // otherwise tag block as no longer FREE and right as no longer LEFT_FREE + // otherwise tag block as no longer FREE and right as no longer LEFTFREE } else { block.mmInfo = blockInfo & ~FREE; GETRIGHT(block).mmInfo &= ~LEFTFREE; } - - return changetype(block) + BLOCK_OVERHEAD; } /** Adds more memory to the pool. */ @@ -475,6 +461,70 @@ function initialize(): Root { return root; } +/** Prepares and checks an allocation size. */ +function prepareSize(size: usize): usize { + if (size >= BLOCK_MAXSIZE) throw new Error("allocation too large"); + return max((size + AL_MASK) & ~AL_MASK, BLOCK_MINSIZE); // align and ensure min size +} + +/** Allocates a block of the specified size. */ +function allocateBlock(root: Root, size: usize): Block { + var payloadSize = prepareSize(size); + var block = searchBlock(root, payloadSize); + if (!block) { + growMemory(root, payloadSize); + block = searchBlock(root, payloadSize); + if (DEBUG) assert(block); // must be found now + } + if (DEBUG) assert((block.mmInfo & ~TAGS_MASK) >= payloadSize); // must fit + block.gcInfo = 0; + block.rtId = 0; // not determined yet + block.rtSize = size; + removeBlock(root, block); + prepareBlock(root, block, payloadSize); + return block; +} + +/** Reallocates a block to the specified size. */ +function reallocateBlock(root: Root, block: Block, size: usize): Block { + var payloadSize = prepareSize(size); + var blockInfo = block.mmInfo; + if (DEBUG) assert(!(blockInfo & FREE)); // must be used + + // possibly split and update runtime size if it still fits + if (payloadSize <= (blockInfo & ~TAGS_MASK)) { + prepareBlock(root, block, payloadSize); + block.rtSize = size; + return block; + } + + // merge with right free block if merger is large enough + var right = GETRIGHT(block); + var rightInfo = right.mmInfo; + if (rightInfo & FREE) { + let mergeSize = (blockInfo & ~TAGS_MASK) + BLOCK_OVERHEAD + (rightInfo & ~TAGS_MASK); + if (mergeSize >= payloadSize) { + removeBlock(root, right); + // TODO: this can yield an intermediate block larger than BLOCK_MAXSIZE, which + // is immediately split though. does this trigger any assertions / issues? + block.mmInfo = (blockInfo & TAGS_MASK) | mergeSize; + block.rtSize = size; + prepareBlock(root, block, payloadSize); + return block; + } + } + + // otherwise move the block + var newBlock = allocateBlock(root, size); + newBlock.gcInfo = block.gcInfo; + newBlock.rtId = block.rtId; + memory.copy(changetype(newBlock) + BLOCK_OVERHEAD, changetype(block) + BLOCK_OVERHEAD, size); + block.mmInfo = blockInfo | FREE; + insertBlock(root, block); + return newBlock; +} + +/** Frees a block. */ function freeBlock(root: Root, block: Block): void { var blockInfo = block.mmInfo; assert(!(blockInfo & FREE)); // must be used (user might call through to this) @@ -487,34 +537,25 @@ function freeBlock(root: Root, block: Block): void { // @ts-ignore: decorator @global @unsafe function __mm_allocate(size: usize): usize { - // initialize if necessary var root = ROOT; if (!root) ROOT = root = initialize(); + return changetype(allocateBlock(root, size)) + BLOCK_OVERHEAD; +} - // search for a suitable block - if (size >= BLOCK_MAXSIZE) throw new Error("allocation too large"); - size = max((size + AL_MASK) & ~AL_MASK, BLOCK_MINSIZE); // align and ensure min size - var block = searchBlock(root, size); - if (!block) { - growMemory(root, size); - block = searchBlock(root, size); - if (DEBUG) assert(block); // must be found now - } - if (DEBUG) assert((block.mmInfo & ~TAGS_MASK) >= size); // must fit - block.gcInfo = 0; - block.rtId = 0; // not determined yet - block.rtSize = size; - return prepareBlock(root, block, size); // FIXME: why's still necessary? +// @ts-ignore: decorator +@global @unsafe +function __mm_reallocate(data: usize, size: usize): usize { + if (DEBUG) assert(ROOT); // must be initialized + assert(data != 0 && !(data & AL_MASK)); // must exist and be aligned + return changetype(reallocateBlock(ROOT, changetype(data - BLOCK_OVERHEAD), size)) + BLOCK_OVERHEAD; } // @ts-ignore: decorator @global @unsafe function __mm_free(data: usize): void { - if (data) { - assert(!(data & AL_MASK)); // must be aligned (user might call through to this) - let root = ROOT; - if (root) freeBlock(root, changetype(data - BLOCK_OVERHEAD)); - } + if (DEBUG) assert(ROOT); // must be initialized + assert(data != 0 && !(data & AL_MASK)); // must exist and be aligned + freeBlock(ROOT, changetype(data - BLOCK_OVERHEAD)); } /////////////////////////// A Pure Reference Counting Garbage Collector /////////////////////////// @@ -771,9 +812,12 @@ function __gc_release(ref: usize): void { // keep alive, everything else is reached from here export { __mm_allocate, + __mm_reallocate, __mm_free, __rt_visit, __gc_retain, __gc_release, collectCycles as __gc_collect }; + +// @start export function main(): void {} diff --git a/tests/runtime/index.html b/tests/runtime/index.html index 6858828ab8..d6c79dbbd1 100644 --- a/tests/runtime/index.html +++ b/tests/runtime/index.html @@ -12,7 +12,7 @@ var exports; var ROOT; var U32; -fetch("optimized.wasm").then(result => +fetch("untouched.wasm").then(result => result.arrayBuffer() ).then(buffer => WebAssembly.instantiate(buffer, { @@ -55,8 +55,8 @@ var hlValue; var tailValue; -function toBits(n, l) { - var s = n.toString(2); +function toBits(n, l, radix = 2) { + var s = n.toString(radix); while (s.length < l) s = "0" + s; return s; } @@ -108,21 +108,29 @@ hl.forEach((el, i) => { var ptr = U32[(ROOT + 4 + fl.length * 4 + i * 4) >> 2]; el.className = ptr ? "hl set" : "hl"; - el.innerHTML = '' + (i == hl.length - 1 ? "tail" : i) + '' + " " + ptr.toString(16); + el.innerHTML = '' + (i == hl.length - 1 ? "tail" : i) + '' + " " + toBits(ptr, 6, 16); }); } function allocate(size) { var ptr = exports.__mm_allocate(size); if (!ptr) { - alert("allocation failed"); + alert("should not happen"); return; } var el = document.createElement("div"); el.className = "seg"; - var es = document.createElement("span"); - es.innerText = size; + var es = document.createElement("input"); + es.size = 10; + es.value = size; el.appendChild(es); + var er = document.createElement("button"); + er.innerText = "realloc"; + er.onclick = function() { + ptr = exports.__mm_reallocate(ptr, es.value >>> 0); + update(); + }; + el.appendChild(er); var ef = document.createElement("button"); ef.innerText = "free"; el.appendChild(ef); @@ -132,7 +140,6 @@ update(); }; document.getElementById("segs").appendChild(el); - } diff --git a/tests/runtime/optimized.wasm b/tests/runtime/optimized.wasm deleted file mode 100644 index a09173be1c0fac09918fd71951f51c6365755952..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2343 zcmZ`*&2Aev5S}5qk{!x6n>uJxrzm&rgHMjpgRe1x#;xNP0Sfe3NQ$#@w6ZKq+Bi

Tli(()@j5j7Hq~OZoGMvdmY8i1ry~1AkWJ@{g*%S0l=}i$-S*)wh4x~5E z#H!=fqxu|LQ69BTU~kGWos2TxQpR(oMdB`d9VJ_eES|p=H>yCyr{IcNP(@~-o+W`t z;uyjdVS=?lROfiiZoJz#hQBK4k=Nr4UeO0|(!?UdpahG-i9l=lYSh4TL6J4D18V?l z-w@zt4XjfJj)5C$EEgF-d4x#O!JBzdAIyWg%tOtlnlX$Np^!j7qA|#bH}Dl_F(EgU z<*Wm?FZqnVh{}Jmpi0P$eZ`FGP*X8^)5;{(;JWXXq*Z|jsS6y$@Ywbd$tKucl1c#T z2;upD;BmZY=A}5hEYugUghiwtOl;u_c*joJ-=s{#J8&I-{ROpjelBS|$@n2<^jIp` zQ-7NReVw3(%r;rCGrS6;ae33y+X^m*Po6B`NK#l9A~%6jjxzW?lc8Wa(kU7pM8rkP zElHV@t%_UW>5oN^ewY!qx zP^uQ_b(hH&T_$8m*O-6^OEdu@1^5e51WJ^3k}7}FwOm{(iCV_B`3u~2%>Wcx`z7ls z*i)Hg?BYUSBQ-;ld-HfD5-KUKH!zFTxw4Mfo-t}crU&wl8>P@u|6cVo6Z{h~#VC-( z*9k}GsUlOTcPC{K)8my>2^4iW8_5AUyK3H>Z@4J@EJ~;+XxW#zeibobEI5;?HJnq` zdAK`JxEub_;WI}#SCA}8vQQQ-WASzm#JeOT87g4kHR5-YMieOxm|&R`-7VD;2xv9! z9W2#!nMEKadM{?)Y{MUpf#aUOn+MbPV}}`#d~rdez&mk@t*g0DE!i)k8B&a7NjWq} zapA9kfqSCSX?-Rwh#V|S0iyvc#8dEr)1Cjpk;bf0a5e1-s#`$G+=P}XB+z#AJ($zc zqaeE1TvIzM(qOCb0paDOwy!?W|BU& zc2VV~MV~=&$=Z8>kTV$&Gc+-8S{`$yri@09F8zcmcrb20kqH|?o01PS3V!yAR98b|jXlaL zx&pj7Wl+j)5dlGoqS6NxP^RduD$NlV<+pUhW{s^T%%vX;g*ls`(lHOiU7L1kf=^BZ zdP;}%njTP(j_4UqPHBTm$ikmg8QiDv7ul6F==Gre05)Pbq%rI&-8DBEz8vr8-*%6W ddq)S~fA`Jp;c?j;^nT2rZM?$2M;n9g@xM(Rp)ddd diff --git a/tests/runtime/optimized.wat b/tests/runtime/optimized.wat index ef509453d9..5b8b447700 100644 --- a/tests/runtime/optimized.wat +++ b/tests/runtime/optimized.wat @@ -3,11 +3,11 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (type $FUNCSIG$viii (func (param i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\10\00\00\00\"") @@ -19,6 +19,7 @@ (global $assembly/index/ROOTS (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "__mm_allocate" (func $assembly/index/__mm_allocate)) + (export "__mm_reallocate" (func $assembly/index/__mm_reallocate)) (export "__mm_free" (func $assembly/index/__mm_free)) (export "__rt_visit" (func $assembly/index/__rt_visit)) (export "__gc_retain" (func $assembly/index/__gc_retain)) @@ -497,7 +498,33 @@ call $assembly/index/addMemory local.get $0 ) - (func $assembly/index/searchBlock (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $assembly/index/prepareSize (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 1073741824 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 466 + i32.const 29 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $0 + i32.const 16 + local.tee $1 + local.get $0 + local.get $1 + i32.gt_u + select + ) + (func $assembly/index/searchBlock (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -598,7 +625,7 @@ end end ) - (func $assembly/index/growMemory (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/growMemory (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -639,16 +666,12 @@ i32.shl call $assembly/index/addMemory ) - (func $assembly/index/prepareBlock (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $assembly/index/prepareBlock (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 i32.load - local.set $3 - local.get $0 - local.get $1 - call $assembly/index/removeBlock - local.get $3 + local.tee $3 i32.const -4 i32.and local.get $2 @@ -669,7 +692,7 @@ i32.add local.get $2 i32.add - local.tee $2 + local.tee $1 local.get $4 i32.const 16 i32.sub @@ -677,7 +700,7 @@ i32.or i32.store local.get $0 - local.get $2 + local.get $1 call $assembly/index/insertBlock else local.get $1 @@ -706,73 +729,347 @@ i32.and i32.store end + ) + (func $assembly/index/allocateBlock (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 local.get $1 - i32.const 16 - i32.add + call $assembly/index/prepareSize + local.tee $3 + call $assembly/index/searchBlock + local.tee $2 + i32.eqz + if + local.get $0 + local.get $3 + call $assembly/index/growMemory + local.get $0 + local.get $3 + call $assembly/index/searchBlock + local.set $2 + end + local.get $2 + i32.const 0 + i32.store offset=4 + local.get $2 + i32.const 0 + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=12 + local.get $0 + local.get $2 + call $assembly/index/removeBlock + local.get $0 + local.get $2 + local.get $3 + call $assembly/index/prepareBlock + local.get $2 ) - (func $assembly/index/__mm_allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/__mm_allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $assembly/index/ROOT - local.tee $2 + local.tee $1 i32.eqz if call $assembly/index/initialize - local.tee $2 + local.tee $1 global.set $assembly/index/ROOT end + local.get $1 local.get $0 - i32.const 1073741824 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 495 - i32.const 29 - call $~lib/builtins/abort - unreachable + call $assembly/index/allocateBlock + i32.const 16 + i32.add + ) + (func $~lib/memory/memory.copy (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + br $continue|0 + end + end + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 + end + end + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end + end + end + loop $continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 + end + end + end end + ) + (func $assembly/index/reallocateBlock (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $2 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $0 - i32.const 16 - local.tee $1 - local.get $0 + call $assembly/index/prepareSize + local.tee $3 local.get $1 - i32.gt_u - select - local.tee $1 - call $assembly/index/searchBlock - local.tee $0 - i32.eqz + i32.load + local.tee $4 + i32.const -4 + i32.and + i32.le_u if - local.get $2 + local.get $0 + local.get $1 + local.get $3 + call $assembly/index/prepareBlock local.get $1 - call $assembly/index/growMemory local.get $2 + i32.store offset=12 local.get $1 - call $assembly/index/searchBlock - local.set $0 + return + end + local.get $1 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $6 + i32.load + local.tee $5 + i32.const 1 + i32.and + if + local.get $4 + i32.const -4 + i32.and + i32.const 16 + i32.add + local.get $5 + i32.const -4 + i32.and + i32.add + local.tee $5 + local.get $3 + i32.ge_u + if + local.get $0 + local.get $6 + call $assembly/index/removeBlock + local.get $1 + local.get $4 + i32.const 3 + i32.and + local.get $5 + i32.or + i32.store + local.get $1 + local.get $2 + i32.store offset=12 + local.get $0 + local.get $1 + local.get $3 + call $assembly/index/prepareBlock + local.get $1 + return + end end local.get $0 - i32.const 0 + local.get $2 + call $assembly/index/allocateBlock + local.tee $3 + local.get $1 + i32.load offset=4 i32.store offset=4 - local.get $0 - i32.const 0 + local.get $3 + local.get $1 + i32.load offset=8 i32.store offset=8 - local.get $0 + local.get $3 + i32.const 16 + i32.add local.get $1 - i32.store offset=12 + i32.const 16 + i32.add local.get $2 + call $~lib/memory/memory.copy + local.get $1 + local.get $4 + i32.const 1 + i32.or + i32.store local.get $0 local.get $1 - call $assembly/index/prepareBlock + call $assembly/index/insertBlock + local.get $3 ) - (func $assembly/index/freeBlock (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/__mm_reallocate (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + global.get $assembly/index/ROOT + local.get $0 + i32.const 16 + i32.sub + local.get $1 + call $assembly/index/reallocateBlock + i32.const 16 + i32.add + ) + (func $assembly/index/freeBlock (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -783,22 +1080,14 @@ local.get $1 call $assembly/index/insertBlock ) - (func $assembly/index/__mm_free (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) + (func $assembly/index/__mm_free (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + global.get $assembly/index/ROOT local.get $0 - if - global.get $assembly/index/ROOT - local.tee $1 - if - local.get $1 - local.get $0 - i32.const 16 - i32.sub - call $assembly/index/freeBlock - end - end + i32.const 16 + i32.sub + call $assembly/index/freeBlock ) - (func $assembly/index/decrement (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/decrement (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load offset=4 i32.const 268435455 @@ -813,7 +1102,7 @@ end unreachable ) - (func $assembly/index/markGray (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/markGray (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -833,7 +1122,7 @@ unreachable end ) - (func $assembly/index/scanBlack (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/scanBlack (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.load offset=4 @@ -842,7 +1131,7 @@ i32.store offset=4 unreachable ) - (func $assembly/index/scan (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/scan (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -872,7 +1161,7 @@ end end ) - (func $assembly/index/collectWhite (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/collectWhite (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -894,7 +1183,7 @@ local.get $0 call $assembly/index/freeBlock ) - (func $assembly/index/__rt_visit (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/__rt_visit (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $break|0 block $case4|0 block $case3|0 @@ -944,7 +1233,7 @@ call $assembly/index/collectWhite end ) - (func $assembly/index/__gc_retain (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/__gc_retain (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 if local.get $0 @@ -958,7 +1247,7 @@ i32.store offset=4 end ) - (func $assembly/index/__gc_release (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/__gc_release (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 if local.get $0 @@ -967,7 +1256,7 @@ call $assembly/index/decrement end ) - (func $assembly/index/collectCycles (; 19 ;) (type $FUNCSIG$v) + (func $assembly/index/collectCycles (; 24 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1089,7 +1378,7 @@ local.get $5 global.set $assembly/index/CUR ) - (func $null (; 20 ;) (type $FUNCSIG$v) + (func $null (; 25 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/runtime/untouched.wasm b/tests/runtime/untouched.wasm new file mode 100644 index 0000000000000000000000000000000000000000..d5fdae909ee19350115441eb9b248249b6b39d27 GIT binary patch literal 4702 zcmai2&2L;+6+idm&3iL+6dC_5yU`~e67dtlKnDf_yAwNQ&)!auWE@TJAC1?}qkqkciKqg^6BP-b-WFxz|mcs3_v!kV>O zQD!?Cb#!KPOH}0YWARxO)~frYGNVX!LT8~OxdriuT%CSU{D53OEjovz!{gbTng%;N zhle|RlgaV^-h4#86}g{{+9!jqJo(yeG@_N>&dzMU^YGy0U{24wot?Y;JG0Sz@8F1D z=+}3X(ca03uBF@kUTLkr@rcwtT)%1qliWINLAL=;p zL=F#4T%1fx6HN4X>;k{Og&%t}Ly*S$?Zz4}^-T^@TDCtbvn;L!b9c=5!A3iN7*(|M zlQP3y5!D!P94@ciMCdH~Ghu()ghheA>~Niz%RF@KR_KI$Q(tx=$2Fd8YVU&5i$G;B z*s>e4vIxD0t*P)obeeJh{lm%7P^}-3OHqDl*`J@2WwBJAm;3OHX>*QsDS$Ru9Fb@L&WCi>V{0$Be;2G0bXw`?W zfiJiY|2}JI5;}>QAUv4a5~@3AY;>aO0Dk>22>phpU|erLLo7ng%t^zXbl=q~2a$rl z4Y{F7(;F;fT!tKXv+1odetoYAhV`2#UWlLslH{(?DPhEEIPi%uzF@#Z-7vBrN6EWkd&1 zNC`n;gb8y5Qq@#b!Rf zc*V3?3l`ea5Vc;?mcd=pmge~)+5+XzXzLHl+RB1X=(ap3v?!SQl-UC^rg19|(c}ux zK?fmenWHK9N-cyg5GMnlK&5)DCwJNV{;cCuE%m#wEJEiV%wNcOi#4R3J@s?1ck}f zS3D&YW)QlSPa&avDn|z>ldt6zp;381XVzkJ38{vnL!c&bq&plB+{cJshBgt^LE(r2 z&Z7q@-A4?4+HhM7RtLqRDv_FhspL_+usu`le2rsYpM##4NHJR2MpnD3@49F7+~dM#=-s+4 zX&o%(ZCyn@8S3~O2z)+-%7VGI%Cpu#Ef51kK$30nR;a2C&7-B-Fm8i&sM&v=yWl^> zH=;xyIoLX2>wc+ZZvx(u=rMk13VC3ie6XOXJWf!u<2>STEDV{yl;H&*avw#S;V*Bf z*e)X7Y7qN5HhW$Q?-7N6YF*B&trNSN8RrO1pVYz=tu+L(Kf^sj&{Qr5 z%BNC_dNmPPZgO@@k0k++^WM2N6fe$8Mp8X0voQG56N9HiRze5Mc$LM`g(i7bTr!o?v~vi@V=C7 z4{RS(k?VV=-{E5lUjwfM=X9w@|FUWCZ7@+|DcwKY&l*2}wQrki#+);qX$zm+z!+YB z`xW3jS?r|V!&+4wR42fZUApA2xV~xP`se!iazie*`u%{kqR0K|}qalCf~Q=beqk2(mBA>b`pTAui2 zxRKc@xOFS7f0l<-5}L&hv*bq0E_LtGbjz~hFJeLpMwIK9FM|l6>rQMte>LEQUzH}=owvcge0M|x16E_tB*EBy4mLwcPi^d`MT2XsVl;K?JpPIJ5?j4St1_Isgm!tZaw`T#yJ!IQm@X$J4wW5b^u pKbY;0ZtvZ{e{gj7t6%=&(+`g3#}D@Jjo!Hab^Nc=^~1gU{{eLe`;`Cy literal 0 HcmV?d00001 diff --git a/tests/runtime/untouched.wat b/tests/runtime/untouched.wat index 16c44551fc..5b5a1d4c04 100644 --- a/tests/runtime/untouched.wat +++ b/tests/runtime/untouched.wat @@ -5,9 +5,9 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) - (type $FUNCSIG$viii (func (param i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\10\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00i\00n\00d\00e\00x\00.\00t\00s\00") @@ -22,6 +22,7 @@ (global $~lib/memory/HEAP_BASE i32 (i32.const 108)) (export "memory" (memory $0)) (export "__mm_allocate" (func $assembly/index/__mm_allocate)) + (export "__mm_reallocate" (func $assembly/index/__mm_reallocate)) (export "__mm_free" (func $assembly/index/__mm_free)) (export "__rt_visit" (func $assembly/index/__rt_visit)) (export "__gc_retain" (func $assembly/index/__gc_retain)) @@ -48,7 +49,7 @@ if i32.const 0 i32.const 24 - i32.const 282 + i32.const 276 i32.const 13 call $~lib/builtins/abort unreachable @@ -73,7 +74,7 @@ if i32.const 0 i32.const 24 - i32.const 284 + i32.const 278 i32.const 13 call $~lib/builtins/abort unreachable @@ -125,7 +126,7 @@ if i32.const 0 i32.const 24 - i32.const 297 + i32.const 291 i32.const 13 call $~lib/builtins/abort unreachable @@ -263,7 +264,7 @@ if i32.const 0 i32.const 24 - i32.const 210 + i32.const 204 i32.const 13 call $~lib/builtins/abort unreachable @@ -278,7 +279,7 @@ if i32.const 0 i32.const 24 - i32.const 212 + i32.const 206 i32.const 13 call $~lib/builtins/abort unreachable @@ -358,7 +359,7 @@ i32.const 2 i32.and if - block $assembly/index/GETLEFT|inlined.0 (result i32) + block $assembly/index/GETFREELEFT|inlined.0 (result i32) local.get $1 local.set $3 local.get $3 @@ -377,7 +378,7 @@ if i32.const 0 i32.const 24 - i32.const 233 + i32.const 227 i32.const 15 call $~lib/builtins/abort unreachable @@ -440,7 +441,7 @@ if i32.const 0 i32.const 24 - i32.const 248 + i32.const 242 i32.const 13 call $~lib/builtins/abort unreachable @@ -456,7 +457,7 @@ if i32.const 0 i32.const 24 - i32.const 249 + i32.const 243 i32.const 13 call $~lib/builtins/abort unreachable @@ -513,7 +514,7 @@ if i32.const 0 i32.const 24 - i32.const 265 + i32.const 259 i32.const 13 call $~lib/builtins/abort unreachable @@ -636,7 +637,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 385 i32.const 4 call $~lib/builtins/abort unreachable @@ -661,7 +662,7 @@ if i32.const 0 i32.const 24 - i32.const 409 + i32.const 395 i32.const 15 call $~lib/builtins/abort unreachable @@ -692,7 +693,7 @@ if i32.const 0 i32.const 24 - i32.const 421 + i32.const 407 i32.const 4 call $~lib/builtins/abort unreachable @@ -915,7 +916,36 @@ drop local.get $3 ) - (func $assembly/index/searchBlock (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $assembly/index/prepareSize (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.const 1073741824 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 466 + i32.const 29 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 15 + i32.add + i32.const 15 + i32.const -1 + i32.xor + i32.and + local.tee $1 + i32.const 16 + local.tee $2 + local.get $1 + local.get $2 + i32.gt_u + select + ) + (func $assembly/index/searchBlock (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -989,7 +1019,7 @@ if i32.const 0 i32.const 24 - i32.const 343 + i32.const 337 i32.const 13 call $~lib/builtins/abort unreachable @@ -1054,7 +1084,7 @@ if i32.const 0 i32.const 24 - i32.const 356 + i32.const 350 i32.const 17 call $~lib/builtins/abort unreachable @@ -1104,7 +1134,7 @@ end local.get $7 ) - (func $assembly/index/growMemory (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/growMemory (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1157,38 +1187,26 @@ call $assembly/index/addMemory drop ) - (func $assembly/index/prepareBlock (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $assembly/index/prepareBlock (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $1 i32.load local.set $3 - local.get $3 - i32.const 1 + local.get $2 + i32.const 15 i32.and - i32.const 0 - i32.ne - if (result i32) - local.get $2 - i32.const 15 - i32.and - i32.eqz - else - i32.const 0 - end + i32.eqz i32.eqz if i32.const 0 i32.const 24 - i32.const 371 - i32.const 4 + i32.const 364 + i32.const 13 call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 - call $assembly/index/removeBlock local.get $3 i32.const 3 i32.const -1 @@ -1269,177 +1287,91 @@ i32.and i32.store end - local.get $1 - i32.const 16 - i32.add ) - (func $assembly/index/__mm_allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $assembly/index/allocateBlock (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - global.get $assembly/index/ROOT - local.set $1 local.get $1 - i32.eqz - if - call $assembly/index/initialize - local.tee $1 - global.set $assembly/index/ROOT - end - local.get $0 - i32.const 1073741824 - i32.ge_u - if - i32.const 0 - i32.const 24 - i32.const 495 - i32.const 29 - call $~lib/builtins/abort - unreachable - end + call $assembly/index/prepareSize + local.set $2 local.get $0 - i32.const 15 - i32.add - i32.const 15 - i32.const -1 - i32.xor - i32.and - local.tee $2 - i32.const 16 - local.tee $3 local.get $2 - local.get $3 - i32.gt_u - select - local.set $0 - local.get $1 - local.get $0 call $assembly/index/searchBlock - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if - local.get $1 local.get $0 + local.get $2 call $assembly/index/growMemory - local.get $1 local.get $0 + local.get $2 call $assembly/index/searchBlock - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if i32.const 0 i32.const 24 - i32.const 501 + i32.const 477 i32.const 15 call $~lib/builtins/abort unreachable end end - local.get $4 + local.get $3 i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $0 + local.get $2 i32.ge_u i32.eqz if i32.const 0 i32.const 24 - i32.const 503 + i32.const 479 i32.const 13 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.store offset=4 - local.get $4 + local.get $3 i32.const 0 i32.store offset=8 - local.get $4 - local.get $0 - i32.store offset=12 + local.get $3 local.get $1 - local.get $4 + i32.store offset=12 + local.get $0 + local.get $3 + call $assembly/index/removeBlock local.get $0 + local.get $3 + local.get $2 call $assembly/index/prepareBlock + local.get $3 ) - (func $assembly/index/freeBlock (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $assembly/index/__mm_allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $assembly/index/ROOT + local.set $1 local.get $1 - i32.load - local.set $2 - local.get $2 - i32.const 1 - i32.and - i32.eqz i32.eqz if - i32.const 0 - i32.const 24 - i32.const 480 - i32.const 2 - call $~lib/builtins/abort - unreachable + call $assembly/index/initialize + local.tee $1 + global.set $assembly/index/ROOT end local.get $1 - local.get $2 - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $assembly/index/insertBlock - ) - (func $assembly/index/__mm_free (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) local.get $0 - if - local.get $0 - i32.const 15 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 514 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - global.get $assembly/index/ROOT - local.set $1 - local.get $1 - if - local.get $1 - local.get $0 - i32.const 16 - i32.sub - call $assembly/index/freeBlock - end - end - ) - (func $assembly/index/__rt_visit_members (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - unreachable - ) - (func $assembly/index/__rt_flags (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - unreachable - ) - (func $~lib/memory/memory.allocate (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 - i32.const 80 - i32.const 61 - i32.const 9 - call $~lib/builtins/abort - unreachable + call $assembly/index/allocateBlock + i32.const 16 + i32.add ) - (func $~lib/memory/memory.copy (; 14 ;) (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 $4 i32) (local $5 i32) @@ -1648,7 +1580,260 @@ end end ) - (func $assembly/index/growRoots (; 15 ;) (type $FUNCSIG$v) + (func $assembly/index/reallocateBlock (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $2 + call $assembly/index/prepareSize + local.set $3 + local.get $1 + i32.load + local.set $4 + local.get $4 + i32.const 1 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 492 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $4 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.le_u + if + local.get $0 + local.get $1 + local.get $3 + call $assembly/index/prepareBlock + local.get $1 + local.get $2 + i32.store offset=12 + local.get $1 + return + end + block $assembly/index/GETRIGHT|inlined.4 (result i32) + local.get $1 + local.set $5 + local.get $5 + i32.const 16 + i32.add + local.get $5 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + end + local.set $6 + local.get $6 + i32.load + local.set $7 + local.get $7 + i32.const 1 + i32.and + if + local.get $4 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.add + local.get $7 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + local.set $5 + local.get $5 + local.get $3 + i32.ge_u + if + local.get $0 + local.get $6 + call $assembly/index/removeBlock + local.get $1 + local.get $4 + i32.const 3 + i32.and + local.get $5 + i32.or + i32.store + local.get $1 + local.get $2 + i32.store offset=12 + local.get $0 + local.get $1 + local.get $3 + call $assembly/index/prepareBlock + local.get $1 + return + end + end + local.get $0 + local.get $2 + call $assembly/index/allocateBlock + local.set $8 + local.get $8 + local.get $1 + i32.load offset=4 + i32.store offset=4 + local.get $8 + local.get $1 + i32.load offset=8 + i32.store offset=8 + local.get $8 + i32.const 16 + i32.add + local.get $1 + i32.const 16 + i32.add + local.get $2 + call $~lib/memory/memory.copy + local.get $1 + local.get $4 + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $assembly/index/insertBlock + local.get $8 + ) + (func $assembly/index/__mm_reallocate (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + global.get $assembly/index/ROOT + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 548 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 0 + i32.ne + if (result i32) + local.get $0 + i32.const 15 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 549 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $assembly/index/ROOT + local.get $0 + i32.const 16 + i32.sub + local.get $1 + call $assembly/index/reallocateBlock + i32.const 16 + i32.add + ) + (func $assembly/index/freeBlock (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $1 + i32.load + local.set $2 + local.get $2 + i32.const 1 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 530 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $assembly/index/insertBlock + ) + (func $assembly/index/__mm_free (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + global.get $assembly/index/ROOT + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 556 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 0 + i32.ne + if (result i32) + local.get $0 + i32.const 15 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 557 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $assembly/index/ROOT + local.get $0 + i32.const 16 + i32.sub + call $assembly/index/freeBlock + ) + (func $assembly/index/__rt_visit_members (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + unreachable + ) + (func $assembly/index/__rt_flags (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $~lib/memory/memory.allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + i32.const 80 + i32.const 61 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $assembly/index/growRoots (; 19 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1692,7 +1877,7 @@ i32.add global.set $assembly/index/END ) - (func $assembly/index/appendRoot (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/appendRoot (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) global.get $assembly/index/CUR local.set $1 @@ -1712,7 +1897,7 @@ i32.add global.set $assembly/index/CUR ) - (func $assembly/index/decrement (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/decrement (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1754,7 +1939,7 @@ if i32.const 0 i32.const 24 - i32.const 637 + i32.const 678 i32.const 15 call $~lib/builtins/abort unreachable @@ -1798,7 +1983,7 @@ end end ) - (func $assembly/index/markGray (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/markGray (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1823,7 +2008,7 @@ call $assembly/index/__rt_visit_members end ) - (func $assembly/index/scanBlack (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/scanBlack (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.load offset=4 @@ -1838,7 +2023,7 @@ i32.const 4 call $assembly/index/__rt_visit_members ) - (func $assembly/index/scan (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/scan (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1873,7 +2058,7 @@ end end ) - (func $assembly/index/collectWhite (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/collectWhite (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1900,7 +2085,7 @@ local.get $0 call $assembly/index/freeBlock ) - (func $assembly/index/__rt_visit (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/__rt_visit (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) block $break|0 block $case5|0 @@ -1952,7 +2137,7 @@ if i32.const 0 i32.const 24 - i32.const 592 + i32.const 633 i32.const 17 call $~lib/builtins/abort unreachable @@ -1999,7 +2184,7 @@ if i32.const 0 i32.const 24 - i32.const 603 + i32.const 644 i32.const 6 call $~lib/builtins/abort unreachable @@ -2036,14 +2221,14 @@ if i32.const 0 i32.const 24 - i32.const 614 + i32.const 655 i32.const 24 call $~lib/builtins/abort unreachable end end ) - (func $assembly/index/increment (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/increment (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2065,7 +2250,7 @@ if i32.const 0 i32.const 24 - i32.const 621 + i32.const 662 i32.const 2 call $~lib/builtins/abort unreachable @@ -2076,7 +2261,7 @@ i32.add i32.store offset=4 ) - (func $assembly/index/__gc_retain (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/__gc_retain (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 if local.get $0 @@ -2085,7 +2270,7 @@ call $assembly/index/increment end ) - (func $assembly/index/__gc_release (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/__gc_release (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 if local.get $0 @@ -2094,7 +2279,7 @@ call $assembly/index/decrement end ) - (func $assembly/index/collectCycles (; 26 ;) (type $FUNCSIG$v) + (func $assembly/index/collectCycles (; 30 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2246,6 +2431,6 @@ local.get $0 global.set $assembly/index/CUR ) - (func $null (; 27 ;) (type $FUNCSIG$v) + (func $null (; 31 ;) (type $FUNCSIG$v) ) ) From 8216cf3361c3e2b7cf52e8cedb97b2dadd58af38 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 18 Apr 2019 11:51:07 +0200 Subject: [PATCH 115/119] refactor into stdlib --- src/compiler.ts | 60 ++ std/assembly/rt/README.md | 6 + std/assembly/rt/common.ts | 13 + std/assembly/rt/index.ts | 52 ++ std/assembly/rt/pure.ts | 239 +++++++ std/assembly/rt/tlsf.ts | 522 +++++++++++++++ tests/allocators/asrt/assembly/index.ts | 2 +- tests/allocators/asrt/optimized.wat | 75 ++- tests/allocators/asrt/untouched.wat | 173 ++--- tests/runtime/assembly/index.ts | 817 +----------------------- tests/runtime/index.html | 5 + tests/runtime/optimized.wat | 298 ++++----- tests/runtime/untouched.wasm | Bin 4702 -> 4567 bytes tests/runtime/untouched.wat | 582 +++++++---------- 14 files changed, 1378 insertions(+), 1466 deletions(-) create mode 100644 std/assembly/rt/README.md create mode 100644 std/assembly/rt/common.ts create mode 100644 std/assembly/rt/index.ts create mode 100644 std/assembly/rt/pure.ts create mode 100644 std/assembly/rt/tlsf.ts diff --git a/src/compiler.ts b/src/compiler.ts index 5520d0eb97..7d2b0f5963 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -8378,6 +8378,66 @@ export class Compiler extends DiagnosticEmitter { return stmts; } + /** Wraps a reference in a `retain` call. Returns the reference if `tempLocal` is specified. */ + makeRetain(valueExpr: ExpressionRef, tempIndex: i32 = -1): ExpressionRef { + var module = this.module; + var program = this.program; + var retainFn = assert(program.retainRef); + this.compileFunction(retainFn); + if (tempIndex >= 0) { + let nativeSizeType = this.options.nativeSizeType; + return module.createBlock(null, [ + module.createCall(retainFn.internalName, [ + module.createTeeLocal(tempIndex, valueExpr) + ], NativeType.None), + module.createGetLocal(tempIndex, nativeSizeType) + ], nativeSizeType); + } else { + return module.createCall(retainFn.internalName, [ valueExpr ], NativeType.None); + } + } + + /** Wraps a reference in `release` call. Returns the reference if `tempLocal` is specified. */ + makeRelease(valueExpr: ExpressionRef, tempIndex: i32 = -1): ExpressionRef { + var module = this.module; + var program = this.program; + var releaseFn = assert(program.releaseRef); + this.compileFunction(releaseFn); + if (tempIndex >= 0) { + let nativeSizeType = this.options.nativeSizeType; + return module.createBlock(null, [ + module.createCall(releaseFn.internalName, [ + module.createTeeLocal(tempIndex, valueExpr) + ], NativeType.None), + module.createGetLocal(tempIndex, nativeSizeType) + ], nativeSizeType); + } else { + return module.createCall(releaseFn.internalName, [ valueExpr ], NativeType.None); + } + } + + /** Wraps a new and an old reference in a sequence of `retain` and `release` calls. */ + makeRetainRelease(newValueExpr: ExpressionRef, oldValueExpr: ExpressionRef, tempIndex: i32 = -1): ExpressionRef { + // TODO: checking `newValue != oldValue` significantly reduces strain on the roots buffer + // when cyclic structures may be immediately released but also requires a tempIndex. might + // be worth to require a temp here. furthermore it might be worth to require it for retain + // and release as well so we can emit != null checks where necessary only? + var module = this.module; + if (tempIndex >= 0) { + let nativeSizeType = this.options.nativeSizeType; + return module.createBlock(null, [ + this.makeRetain(module.createTeeLocal(tempIndex, newValueExpr)), + this.makeRelease(oldValueExpr), + module.createGetLocal(tempIndex, nativeSizeType) + ], nativeSizeType); + } else { + return module.createBlock(null, [ + this.makeRetain(newValueExpr), + this.makeRelease(oldValueExpr) + ]); + } + } + /** Prepares the insertion of a reference into an _uninitialized_ parent using the GC interface. */ makeInsertRef( valueExpr: ExpressionRef, diff --git a/std/assembly/rt/README.md b/std/assembly/rt/README.md new file mode 100644 index 0000000000..c930576e76 --- /dev/null +++ b/std/assembly/rt/README.md @@ -0,0 +1,6 @@ +The AssemblyScript Runtime +========================== + +The runtime provides the functionality necessary to dynamically allocate and deallocate memory of objects, arrays and buffers, as well as keep track of references that are no longer used. + +It is based on [the TLSF memory manager](./tlsf.ts) and [a pure reference counting garbage collector](./pure.ts). diff --git a/std/assembly/rt/common.ts b/std/assembly/rt/common.ts new file mode 100644 index 0000000000..e806263553 --- /dev/null +++ b/std/assembly/rt/common.ts @@ -0,0 +1,13 @@ +// Alignment guarantees + +// @ts-ignore: decorator +@inline export const AL_BITS: u32 = 4; // 16 bytes to fit up to v128 +// @ts-ignore: decorator +@inline export const AL_SIZE: usize = 1 << AL_BITS; +// @ts-ignore: decorator +@inline export const AL_MASK: usize = AL_SIZE - 1; + +// Extra debugging + +// @ts-ignore: decorator +@inline export const DEBUG = true; diff --git a/std/assembly/rt/index.ts b/std/assembly/rt/index.ts new file mode 100644 index 0000000000..cdd952445b --- /dev/null +++ b/std/assembly/rt/index.ts @@ -0,0 +1,52 @@ +import { AL_MASK, DEBUG } from "./common"; +import { ROOT, Block, BLOCK_OVERHEAD, initializeRoot, allocateBlock, reallocateBlock, freeBlock } from "./tlsf"; +import { increment, decrement, collectCycles } from "./pure"; + +//////////////////////////////////// Memory manager interface ///////////////////////////////////// + +// @ts-ignore: decorator +@global @unsafe +function __mm_allocate(size: usize): usize { + var root = ROOT; + if (!root) { + initializeRoot(); + root = ROOT; + } + return changetype(allocateBlock(root, size)) + BLOCK_OVERHEAD; +} + +// @ts-ignore: decorator +@global @unsafe +function __mm_reallocate(data: usize, size: usize): usize { + if (DEBUG) assert(ROOT); // must be initialized + assert(data != 0 && !(data & AL_MASK)); // must exist and be aligned + return changetype(reallocateBlock(ROOT, changetype(data - BLOCK_OVERHEAD), size)) + BLOCK_OVERHEAD; +} + +// @ts-ignore: decorator +@global @unsafe +function __mm_free(data: usize): void { + if (DEBUG) assert(ROOT); // must be initialized + assert(data != 0 && !(data & AL_MASK)); // must exist and be aligned + freeBlock(ROOT, changetype(data - BLOCK_OVERHEAD)); +} + +/////////////////////////////////// Garbage collector interface /////////////////////////////////// + +// @ts-ignore: decorator +@global @unsafe +function __gc_retain(ref: usize): void { + if (ref) increment(changetype(ref - BLOCK_OVERHEAD)); +} + +// @ts-ignore: decorator +@global @unsafe +function __gc_release(ref: usize): void { + if (ref) decrement(changetype(ref - BLOCK_OVERHEAD)); +} + +// @ts-ignore: decorator +@global @unsafe +function __gc_collect(): void { + collectCycles(); +} diff --git a/std/assembly/rt/pure.ts b/std/assembly/rt/pure.ts new file mode 100644 index 0000000000..80c90dcf05 --- /dev/null +++ b/std/assembly/rt/pure.ts @@ -0,0 +1,239 @@ +import { DEBUG } from "./common"; +import { Block, freeBlock, ROOT } from "./tlsf"; + +/////////////////////////// A Pure Reference Counting Garbage Collector /////////////////////////// +// see: https://researcher.watson.ibm.com/researcher/files/us-bacon/Bacon03Pure.pdf + +// TODO: make visitors eat cookies so we can compile direct calls into a switch +function __rt_visit_members(s: Block, cookie: i32): void { unreachable(); } +function __rt_flags(classId: u32): u32 { return unreachable(); } +const ACYCLIC_FLAG: u32 = 0; + +// ╒══════════════════════ GC Info structure ══════════════════════╕ +// │ 3 2 1 │ +// │1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0│ +// ├─┼─┴─┴─┼─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ +// │B│color│ refCount │ +// └─┴─────┴───────────────────────────────────────────────────────┘ +// B: buffered + +// @ts-ignore: decorator +@inline const BUFFERED_MASK: u32 = 1 << (sizeof() * 8 - 1); +// @ts-ignore: decorator +@inline const COLOR_BITS = 3; +// @ts-ignore: decorator +@inline const COLOR_SHIFT: u32 = ctz(BUFFERED_MASK) - COLOR_BITS; +// @ts-ignore: decorator +@inline const COLOR_MASK: u32 = ((1 << COLOR_BITS) - 1) << COLOR_SHIFT; +// @ts-ignore: decorator +@inline const REFCOUNT_MASK: u32 = (1 << COLOR_SHIFT) - 1; + +// ╒════════╤═══════════════════ Colors ═══════════════════════════╕ +// │ Color │ Meaning │ +// ├────────┼──────────────────────────────────────────────────────┤ +// │ BLACK │ In use or free │ +// │ GRAY │ Possible member of cycle │ +// │ WHITE │ Member of garbage cycle │ +// │ PURPLE │ Possible root of cycle │ +// │ RED │ Candidate cycle undergoing Σ-computation *concurrent │ +// │ ORANGE │ Candidate cycle awaiting epoch boundary *concurrent │ +// └────────┴──────────────────────────────────────────────────────┘ +// Acyclic detection has been decoupled, hence no GREEN. + +// @ts-ignore: decorator +@inline const COLOR_BLACK: u32 = 0 << COLOR_SHIFT; +// @ts-ignore: decorator +@inline const COLOR_GRAY: u32 = 1 << COLOR_SHIFT; +// @ts-ignore: decorator +@inline const COLOR_WHITE: u32 = 2 << COLOR_SHIFT; +// @ts-ignore: decorator +@inline const COLOR_PURPLE: u32 = 3 << COLOR_SHIFT; +// @ts-ignore: decorator +@inline const COLOR_RED: u32 = 4 << COLOR_SHIFT; +// @ts-ignore: decorator +@inline const COLOR_ORANGE: u32 = 5 << COLOR_SHIFT; + +// @ts-ignore: decorator +@inline const VISIT_DECREMENT = 1; // guard 0 +// @ts-ignore: decorator +@inline const VISIT_MARKGRAY = 2; +// @ts-ignore: decorator +@inline const VISIT_SCAN = 3; +// @ts-ignore: decorator +@inline const VISIT_SCANBLACK = 4; +// @ts-ignore: decorator +@inline const VISIT_COLLECTWHITE = 5; + +// @ts-ignore: decorator +@global +function __rt_visit(s: Block, cookie: i32): void { + switch (cookie) { + case VISIT_DECREMENT: { + decrement(s); + break; + } + case VISIT_MARKGRAY: { + if (DEBUG) assert((s.gcInfo & REFCOUNT_MASK) > 0); + s.gcInfo = s.gcInfo - 1; + markGray(s); + break; + } + case VISIT_SCAN: { + scan(s); + break; + } + case VISIT_SCANBLACK: { + let info = s.gcInfo; + assert((info & ~REFCOUNT_MASK) == ((info + 1) & ~REFCOUNT_MASK)); // overflow + s.gcInfo = info + 1; + if ((info & COLOR_MASK) != COLOR_BLACK) { + scanBlack(s); + } + break; + } + case VISIT_COLLECTWHITE: { + collectWhite(s); + break; + } + default: if (DEBUG) assert(false); + } +} + +/** Increments the reference count of the specified block by one.*/ +export function increment(s: Block): void { + var info = s.gcInfo; + assert((info & ~REFCOUNT_MASK) == ((info + 1) & ~REFCOUNT_MASK)); // overflow + s.gcInfo = info + 1; +} + +/** Decrements the reference count of the specified block by one, possibly freeing it. */ +export function decrement(s: Block): void { + var info = s.gcInfo; + var rc = info & REFCOUNT_MASK; + if (rc == 1) { + __rt_visit_members(s, VISIT_DECREMENT); + if (!(info & BUFFERED_MASK)) { + freeBlock(ROOT, s); + } else { + s.gcInfo = BUFFERED_MASK | COLOR_BLACK | 0; + } + } else { + if (DEBUG) assert(rc > 0); + if (!(__rt_flags(s.rtId) & ACYCLIC_FLAG)) { + s.gcInfo = BUFFERED_MASK | COLOR_PURPLE | (rc - 1); + if (!(info & BUFFERED_MASK)) { + appendRoot(s); + } + } else { + s.gcInfo = (info & ~REFCOUNT_MASK) | (rc - 1); + } + } +} + +/** Buffer of possible roots. */ +// @ts-ignore: decorator +@lazy var ROOTS: usize; +/** Current absolute offset into the `ROOTS` buffer. */ +// @ts-ignore: decorator +@lazy var CUR: usize = 0; +/** Current absolute end offset into the `ROOTS` buffer. */ +// @ts-ignore: decorator +@lazy var END: usize = 0; + +/** Appends a block to possible roots. */ +function appendRoot(s: Block): void { + var cur = CUR; + if (cur >= END) { + growRoots(); // TBD: either that or pick a default and force collection on overflow + cur = CUR; + } + store(cur, s); + CUR = cur + 1; +} + +/** Grows the roots buffer if it ran full. */ +function growRoots(): void { + var oldRoots = ROOTS; + var oldSize = CUR - oldRoots; + var newSize = max(oldSize * 2, 64 << alignof()); + var newRoots = memory.allocate(newSize); + memory.copy(newRoots, oldRoots, oldSize); + ROOTS = newRoots; + CUR = newRoots + oldSize; + END = newRoots + newSize; +} + +/** Collects cyclic garbage. */ +export function collectCycles(): void { + + // markRoots + var roots = ROOTS; + var cur = roots; + for (let pos = cur, end = CUR; pos < end; pos += sizeof()) { + let s = load(pos); + let info = s.gcInfo; + if ((info & COLOR_MASK) == COLOR_PURPLE && (info & REFCOUNT_MASK) > 0) { + markGray(s); + store(cur, s); + cur += sizeof(); + } else { + if ((info & COLOR_MASK) == COLOR_BLACK && !(info & REFCOUNT_MASK)) { + freeBlock(ROOT, s); + } else { + s.gcInfo = info & ~BUFFERED_MASK; + } + } + } + CUR = cur; + + // scanRoots + for (let pos = roots; pos < cur; pos += sizeof()) { + scan(load(pos)); + } + + // collectRoots + for (let pos = roots; pos < cur; pos += sizeof()) { + let s = load(pos); + s.gcInfo = s.gcInfo & ~BUFFERED_MASK; + collectWhite(s); + } + CUR = roots; +} + +/** Marks a block as gray (possible member of cycle) during the collection phase. */ +function markGray(s: Block): void { + var info = s.gcInfo; + if ((info & COLOR_MASK) != COLOR_GRAY) { + s.gcInfo = (info & ~COLOR_MASK) | COLOR_GRAY; + __rt_visit_members(s, VISIT_MARKGRAY); + } +} + +/** Scans a block during the collection phase, determining whether it is garbage or not. */ +function scan(s: Block): void { + var info = s.gcInfo; + if ((info & COLOR_MASK) == COLOR_GRAY) { + if ((info & REFCOUNT_MASK) > 0) { + scanBlack(s); + } else { + s.gcInfo = (info & ~COLOR_MASK) | COLOR_WHITE; + __rt_visit_members(s, VISIT_SCAN); + } + } +} + +/** Marks a block as black (in use) if it was found to be reachable during the collection phase. */ +function scanBlack(s: Block): void { + s.gcInfo = (s.gcInfo & ~COLOR_MASK) | COLOR_BLACK; + __rt_visit_members(s, VISIT_SCANBLACK); +} + +/** Collects all white (member of a garbage cycle) nodes when completing the collection phase. */ +function collectWhite(s: Block): void { + var info = s.gcInfo; + if ((info & COLOR_MASK) == COLOR_WHITE && !(info & BUFFERED_MASK)) { + // s.gcInfo = (info & ~COLOR_MASK) | COLOR_BLACK; + __rt_visit_members(s, VISIT_COLLECTWHITE); + } + freeBlock(ROOT, s); +} diff --git a/std/assembly/rt/tlsf.ts b/std/assembly/rt/tlsf.ts new file mode 100644 index 0000000000..8b9bfbeaac --- /dev/null +++ b/std/assembly/rt/tlsf.ts @@ -0,0 +1,522 @@ +import { AL_BITS, AL_SIZE, AL_MASK, DEBUG } from "./common"; + +/////////////////////// The TLSF (Two-Level Segregate Fit) memory allocator /////////////////////// +// see: http://www.gii.upv.es/tlsf/ + +// - `ffs(x)` is equivalent to `ctz(x)` with x != 0 +// - `fls(x)` is equivalent to `sizeof(x) * 8 - clz(x) - 1` + +// ╒══════════════ Block size interpretation (32-bit) ═════════════╕ +// 3 2 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits +// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┴─┴─┴─╫─┴─┴─┴─┤ +// │ | FL │ SB = SL + AL │ ◄─ usize +// └───────────────────────────────────────────────┴───────╨───────┘ +// FL: first level, SL: second level, AL: alignment, SB: small block + +// @ts-ignore: decorator +@inline const SL_BITS: u32 = 4; +// @ts-ignore: decorator +@inline const SL_SIZE: usize = 1 << SL_BITS; + +// @ts-ignore: decorator +@inline const SB_BITS: usize = (SL_BITS + AL_BITS); +// @ts-ignore: decorator +@inline const SB_SIZE: usize = 1 << SB_BITS; + +// @ts-ignore: decorator +@inline const FL_BITS: u32 = 31 - SB_BITS; + +// [00]: < 256B (SB) [12]: < 1M +// [01]: < 512B [13]: < 2M +// [02]: < 1K [14]: < 4M +// [03]: < 2K [15]: < 8M +// [04]: < 4K [16]: < 16M +// [05]: < 8K [17]: < 32M +// [06]: < 16K [18]: < 64M +// [07]: < 32K [19]: < 128M +// [08]: < 64K [20]: < 256M +// [09]: < 128K [21]: < 512M +// [10]: < 256K [22]: <= 1G - OVERHEAD +// [11]: < 512K +// VMs limit to 2GB total (currently), making one 1G block max (or three 512M etc.) due to block overhead + +// Tags stored in otherwise unused alignment bits + +// @ts-ignore: decorator +@inline const FREE: usize = 1 << 0; +// @ts-ignore: decorator +@inline const LEFTFREE: usize = 1 << 1; +// @ts-ignore: decorator +@inline const TAGS_MASK: usize = FREE | LEFTFREE; // <= AL_MASK + +// ╒════════════════════ Block layout (32-bit) ════════════════════╕ +// 3 2 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits +// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┼─┼─┤ overhead ┐ +// │ size │0│L│F│ ◄─┐ info +// ├─────────────────────────────────────────────────────────┴─┴─┴─┤ │ +// │ │ │ +// │ ... additional runtime overhead ... │ │ +// │ │ │ +// ╞═══════════════════════════════════════════════════════════════╡ │ ┐ ┘ +// │ if free: ◄ prev │ ◄─┤ usize +// ├───────────────────────────────────────────────────────────────┤ │ +// │ if free: next ► │ ◄─┤ +// ├───────────────────────────────────────────────────────────────┤ │ +// │ ... │ │ = 0 +// ├───────────────────────────────────────────────────────────────┤ │ +// │ if free: back ▲ │ ◄─┘ +// └───────────────────────────────────────────────────────────────┘ payload ┘ >= MIN SIZE +// F: FREE, L: LEFTFREE +@unmanaged export class Block { + + /** Memory manager info. */ + mmInfo: usize; // WASM64 might need adaption + /** Garbage collector info. */ + gcInfo: u32; + /** Runtime class id. */ + rtId: u32; + /** Runtime object size. */ + rtSize: u32; + + /** Previous free block, if any. Only valid if free, otherwise part of payload. */ + prev: Block | null; + /** Next free block, if any. Only valid if free, otherwise part of payload. */ + next: Block | null; + + // If the block is free, there is a 'back'reference at its end pointing at its start. +} + +// Block constants. Overhead is always present, no matter if free or used. Also, a block must have +// a minimum size of three pointers so it can hold `prev`, `next` and `back` if free. + +// @ts-ignore: decorator +@inline export const BLOCK_OVERHEAD: usize = (offsetof("prev") + AL_MASK) & ~AL_MASK; +// @ts-ignore: decorator +@inline const BLOCK_MINSIZE: usize = (3 * sizeof() + AL_MASK) & ~AL_MASK;// prev + next + back +// @ts-ignore: decorator +@inline const BLOCK_MAXSIZE: usize = 1 << (FL_BITS + SB_BITS - 1); // exclusive + +/** Gets the left block of a block. Only valid if the left block is free. */ +// @ts-ignore: decorator +@inline function GETFREELEFT(block: Block): Block { + return load(changetype(block) - sizeof()); +} + +/** Gets the right block of of a block by advancing to the right by its size. */ +// @ts-ignore: decorator +@inline function GETRIGHT(block: Block): Block { + return changetype(changetype(block) + BLOCK_OVERHEAD + (block.mmInfo & ~TAGS_MASK)); +} + +// ╒═════════════════════ Root layout (32-bit) ════════════════════╕ +// 3 2 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits +// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ ┐ +// │ 0 | flMap S│ ◄────┐ +// ╞═══════════════════════════════════════════════════════════════╡ │ +// │ slMap[0] S │ ◄─┐ │ +// ├───────────────────────────────────────────────────────────────┤ │ │ +// │ slMap[1] │ ◄─┤ │ +// ├───────────────────────────────────────────────────────────────┤ u32 │ +// │ slMap[22] │ ◄─┘ │ +// ╞═══════════════════════════════════════════════════════════════╡ usize +// │ head[0] │ ◄────┤ +// ├───────────────────────────────────────────────────────────────┤ │ +// │ ... │ ◄────┤ +// ├───────────────────────────────────────────────────────────────┤ │ +// │ head[367] │ ◄────┤ +// ╞═══════════════════════════════════════════════════════════════╡ │ +// │ tail │ ◄────┘ +// └───────────────────────────────────────────────────────────────┘ SIZE ┘ +// S: Small blocks map +@unmanaged class Root { + /** First level bitmap. */ + flMap: usize; +} + +// Root constants. Where stuff is stored inside of the root structure. + +// @ts-ignore: decorator +@inline const SL_START = sizeof(); +// @ts-ignore: decorator +@inline const SL_END = SL_START + (FL_BITS << alignof()); +// @ts-ignore: decorator +@inline const HL_START = (SL_END + AL_MASK) & ~AL_MASK; +// @ts-ignore: decorator +@inline const HL_END = HL_START + FL_BITS * SL_SIZE * sizeof(); +// @ts-ignore: decorator +@inline const ROOT_SIZE = HL_END + sizeof(); + +// @ts-ignore: decorator +@lazy export var ROOT: Root; + +/** Gets the second level map of the specified first level. */ +// @ts-ignore: decorator +@inline function GETSL(root: Root, fl: usize): u32 { + return load(changetype(root) + (fl << alignof()), SL_START); +} + +/** Sets the second level map of the specified first level. */ +// @ts-ignore: decorator +@inline function SETSL(root: Root, fl: usize, slMap: u32): void { + store(changetype(root) + (fl << alignof()), slMap, SL_START); +} + +/** Gets the head of the free list for the specified combination of first and second level. */ +// @ts-ignore: decorator +@inline function GETHEAD(root: Root, fl: usize, sl: u32): Block | null { + return changetype(load(changetype(root) + (fl * SL_SIZE + sl) * sizeof(), HL_START)); +} + +/** Sets the head of the free list for the specified combination of first and second level. */ +// @ts-ignore: decorator +@inline function SETHEAD(root: Root, fl: usize, sl: u32, head: Block | null): void { + store(changetype(root) + (fl * SL_SIZE + sl) * sizeof() , changetype(head), HL_START); +} + +/** Gets the tail block.. */ +// @ts-ignore: decorator +@inline function GETTAIL(root: Root): Block { + return load(changetype(root), HL_END); +} + +/** Sets the tail block. */ +// @ts-ignore: decorator +@inline function SETTAIL(root: Root, tail: Block): void { + store(changetype(root), tail, HL_END); +} + +/** Inserts a previously used block back into the free list. */ +function insertBlock(root: Root, block: Block): void { + if (DEBUG) assert(block); // cannot be null + var blockInfo = block.mmInfo; + if (DEBUG) assert(blockInfo & FREE); // must be free + + var right = GETRIGHT(block); + var rightInfo = right.mmInfo; + + // merge with right block if also free + if (rightInfo & FREE) { + let newSize = (blockInfo & ~TAGS_MASK) + BLOCK_OVERHEAD + (rightInfo & ~TAGS_MASK); + if (newSize < BLOCK_MAXSIZE) { + removeBlock(root, right); + block.mmInfo = blockInfo = (blockInfo & TAGS_MASK) | newSize; + right = GETRIGHT(block); + rightInfo = right.mmInfo; + // 'back' is set below + } + } + + // merge with left block if also free + if (blockInfo & LEFTFREE) { + let left = GETFREELEFT(block); + let leftInfo = left.mmInfo; + if (DEBUG) assert(leftInfo & FREE); // must be free according to right tags + let newSize = (leftInfo & ~TAGS_MASK) + BLOCK_OVERHEAD + (blockInfo & ~TAGS_MASK); + if (newSize < BLOCK_MAXSIZE) { + removeBlock(root, left); + left.mmInfo = blockInfo = (leftInfo & TAGS_MASK) | newSize; + block = left; + // 'back' is set below + } + } + + right.mmInfo = rightInfo | LEFTFREE; + // right is no longer used now, hence rightInfo is not synced + + // we now know the size of the block + var size = blockInfo & ~TAGS_MASK; + if (DEBUG) assert(size >= BLOCK_MINSIZE && size < BLOCK_MAXSIZE); // must be a valid size + if (DEBUG) assert(changetype(block) + BLOCK_OVERHEAD + size == changetype(right)); // must match + + // set 'back' to itself at the end of block + store(changetype(right) - sizeof(), block); + + // mapping_insert + var fl: usize, sl: u32; + if (size < SB_SIZE) { + fl = 0; + sl = (size / AL_SIZE); + } else { + const inv: usize = sizeof() * 8 - 1; + fl = inv - clz(size); + sl = ((size >> (fl - SL_BITS)) ^ (1 << SL_BITS)); + fl -= SB_BITS - 1; + } + if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range + + // perform insertion + var head = GETHEAD(root, fl, sl); + block.prev = null; + block.next = head; + if (head) head.prev = block; + SETHEAD(root, fl, sl, block); + + // update first and second level maps + root.flMap |= (1 << fl); + SETSL(root, fl, GETSL(root, fl) | (1 << sl)); +} + +/** Removes a free block from internal lists. */ +function removeBlock(root: Root, block: Block): void { + var blockInfo = block.mmInfo; + if (DEBUG) assert(blockInfo & FREE); // must be free + var size = blockInfo & ~TAGS_MASK; + if (DEBUG) assert(size >= BLOCK_MINSIZE && size < BLOCK_MAXSIZE); // must be valid + + // mapping_insert + var fl: usize, sl: u32; + if (size < SB_SIZE) { + fl = 0; + sl = (size / AL_SIZE); + } else { + const inv: usize = sizeof() * 8 - 1; + fl = inv - clz(size); + sl = ((size >> (fl - SL_BITS)) ^ (1 << SL_BITS)); + fl -= SB_BITS - 1; + } + if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range + + // link previous and next free block + var prev = block.prev; + var next = block.next; + if (prev) prev.next = next; + if (next) next.prev = prev; + + // update head if we are removing it + if (block == GETHEAD(root, fl, sl)) { + SETHEAD(root, fl, sl, next); + + // clear second level map if head is empty now + if (!next) { + let slMap = GETSL(root, fl); + SETSL(root, fl, slMap &= ~(1 << sl)); + + // clear first level map if second level is empty now + if (!slMap) root.flMap &= ~(1 << fl); + } + } + // note: does not alter left/back because it is likely that splitting + // is performed afterwards, invalidating those changes. so, the caller + // must perform those updates. +} + +/** Searches for a free block of at least the specified size. */ +function searchBlock(root: Root, size: usize): Block | null { + // size was already asserted by caller + + // mapping_search + var fl: usize, sl: u32; + if (size < SB_SIZE) { + fl = 0; + sl = (size / AL_SIZE); + } else { + const halfMaxSize = BLOCK_MAXSIZE >> 1; // don't round last fl + const inv: usize = sizeof() * 8 - 1; + const invRound = inv - SL_BITS; + let requestSize = size < halfMaxSize + ? size + (1 << (invRound - clz(size))) - 1 + : size; + fl = inv - clz(requestSize); + sl = ((requestSize >> (fl - SL_BITS)) ^ (1 << SL_BITS)); + fl -= SB_BITS - 1; + } + if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range + + // search second level + var slMap = GETSL(root, fl) & (~0 << sl); + var head: Block | null; + if (!slMap) { + // search next larger first level + let flMap = root.flMap & (~0 << (fl + 1)); + if (!flMap) { + head = null; + } else { + fl = ctz(flMap); + slMap = GETSL(root, fl); + if (DEBUG) assert(slMap); // can't be zero if fl points here + head = GETHEAD(root, fl, ctz(slMap)); + } + } else { + head = GETHEAD(root, fl, ctz(slMap)); + } + return head; +} + +/** Prepares the specified block before (re-)use, possibly splitting it. */ +function prepareBlock(root: Root, block: Block, size: usize): void { + // size was already asserted by caller + + var blockInfo = block.mmInfo; + if (DEBUG) assert(!(size & AL_MASK)); // size must be aligned so the new block is + + // split if the block can hold another MINSIZE block incl. overhead + var remaining = (blockInfo & ~TAGS_MASK) - size; + if (remaining >= BLOCK_OVERHEAD + BLOCK_MINSIZE) { + block.mmInfo = size | (blockInfo & LEFTFREE); // also discards FREE + + let spare = changetype(changetype(block) + BLOCK_OVERHEAD + size); + spare.mmInfo = (remaining - BLOCK_OVERHEAD) | FREE; // not LEFTFREE + insertBlock(root, spare); // also sets 'back' + + // otherwise tag block as no longer FREE and right as no longer LEFTFREE + } else { + block.mmInfo = blockInfo & ~FREE; + GETRIGHT(block).mmInfo &= ~LEFTFREE; + } +} + +/** Adds more memory to the pool. */ +function addMemory(root: Root, start: usize, end: usize): bool { + if (DEBUG) { + assert( + start <= end && // must be valid + !(start & AL_MASK) && // must be aligned + !(end & AL_MASK) // must be aligned + ); + } + + var tail = GETTAIL(root); + var tailInfo: usize = 0; + if (tail) { // more memory + if (DEBUG) assert(start >= changetype(tail) + BLOCK_OVERHEAD); + + // merge with current tail if adjacent + if (start - BLOCK_OVERHEAD == changetype(tail)) { + start -= BLOCK_OVERHEAD; + tailInfo = tail.mmInfo; + } else { + // We don't do this, but a user might `memory.grow` manually + // leading to non-adjacent pages managed by TLSF. + } + + } else if (DEBUG) { // first memory + assert(start >= changetype(root) + ROOT_SIZE); // starts after root + } + + // check if size is large enough for a free block and the tail block + var size = end - start; + if (size < BLOCK_OVERHEAD + BLOCK_MINSIZE + BLOCK_OVERHEAD) { + return false; + } + + // left size is total minus its own and the zero-length tail's header + var leftSize = size - 2 * BLOCK_OVERHEAD; + var left = changetype(start); + left.mmInfo = leftSize | FREE | (tailInfo & LEFTFREE); + left.prev = null; + left.next = null; + + // tail is a zero-length used block + tail = changetype(start + size - BLOCK_OVERHEAD); + tail.mmInfo = 0 | LEFTFREE; + SETTAIL(root, tail); + + insertBlock(root, left); // also merges with free left before tail / sets 'back' + + return true; +} + +/** Grows memory to fit at least another block of the specified size. */ +function growMemory(root: Root, size: usize): void { + var pagesBefore = memory.size(); + var pagesNeeded = (((size + 0xffff) & ~0xffff) >>> 16); + var pagesWanted = max(pagesBefore, pagesNeeded); // double memory + if (memory.grow(pagesWanted) < 0) { + if (memory.grow(pagesNeeded) < 0) unreachable(); + } + var pagesAfter = memory.size(); + addMemory(root, pagesBefore << 16, pagesAfter << 16); +} + +/** Prepares and checks an allocation size. */ +function prepareSize(size: usize): usize { + if (size >= BLOCK_MAXSIZE) throw new Error("allocation too large"); + return max((size + AL_MASK) & ~AL_MASK, BLOCK_MINSIZE); // align and ensure min size +} + +/** Initilizes the root structure. */ +export function initializeRoot(): void { + var rootOffset = (HEAP_BASE + AL_MASK) & ~AL_MASK; + var pagesBefore = memory.size(); + var pagesNeeded = ((((rootOffset + ROOT_SIZE) + 0xffff) & ~0xffff) >>> 16); + if (pagesNeeded > pagesBefore && memory.grow(pagesNeeded - pagesBefore) < 0) unreachable(); + var root = changetype(rootOffset); + root.flMap = 0; + SETTAIL(root, changetype(0)); + for (let fl: usize = 0; fl < FL_BITS; ++fl) { + SETSL(root, fl, 0); + for (let sl: u32 = 0; sl < SL_SIZE; ++sl) { + SETHEAD(root, fl, sl, null); + } + } + addMemory(root, (rootOffset + ROOT_SIZE + AL_MASK) & ~AL_MASK, memory.size() << 16); + ROOT = root; +} + +/** Allocates a block of the specified size. */ +export function allocateBlock(root: Root, size: usize): Block { + var payloadSize = prepareSize(size); + var block = searchBlock(root, payloadSize); + if (!block) { + growMemory(root, payloadSize); + block = searchBlock(root, payloadSize); + if (DEBUG) assert(block); // must be found now + } + if (DEBUG) assert((block.mmInfo & ~TAGS_MASK) >= payloadSize); // must fit + block.gcInfo = 0; + block.rtId = 0; // not determined yet + block.rtSize = size; + removeBlock(root, block); + prepareBlock(root, block, payloadSize); + return block; +} + +/** Reallocates a block to the specified size. */ +export function reallocateBlock(root: Root, block: Block, size: usize): Block { + var payloadSize = prepareSize(size); + var blockInfo = block.mmInfo; + if (DEBUG) assert(!(blockInfo & FREE)); // must be used + + // possibly split and update runtime size if it still fits + if (payloadSize <= (blockInfo & ~TAGS_MASK)) { + prepareBlock(root, block, payloadSize); + block.rtSize = size; + return block; + } + + // merge with right free block if merger is large enough + var right = GETRIGHT(block); + var rightInfo = right.mmInfo; + if (rightInfo & FREE) { + let mergeSize = (blockInfo & ~TAGS_MASK) + BLOCK_OVERHEAD + (rightInfo & ~TAGS_MASK); + if (mergeSize >= payloadSize) { + removeBlock(root, right); + // TODO: this can yield an intermediate block larger than BLOCK_MAXSIZE, which + // is immediately split though. does this trigger any assertions / issues? + block.mmInfo = (blockInfo & TAGS_MASK) | mergeSize; + block.rtSize = size; + prepareBlock(root, block, payloadSize); + return block; + } + } + + // otherwise move the block + var newBlock = allocateBlock(root, size); + newBlock.gcInfo = block.gcInfo; + newBlock.rtId = block.rtId; + memory.copy(changetype(newBlock) + BLOCK_OVERHEAD, changetype(block) + BLOCK_OVERHEAD, size); + block.mmInfo = blockInfo | FREE; + insertBlock(root, block); + return newBlock; +} + +/** Frees a block. */ +export function freeBlock(root: Root, block: Block): void { + var blockInfo = block.mmInfo; + assert(!(blockInfo & FREE)); // must be used (user might call through to this) + block.mmInfo = blockInfo | FREE; + insertBlock(root, block); +} diff --git a/tests/allocators/asrt/assembly/index.ts b/tests/allocators/asrt/assembly/index.ts index 0aa4ccc01e..f2af0bf0cd 100644 --- a/tests/allocators/asrt/assembly/index.ts +++ b/tests/allocators/asrt/assembly/index.ts @@ -1,4 +1,4 @@ -import "../../../runtime/assembly/index"; +import "rt"; import { memory as builtin_memory } from "memory"; export namespace memory { diff --git a/tests/allocators/asrt/optimized.wat b/tests/allocators/asrt/optimized.wat index 315ac962ff..40afeeef71 100644 --- a/tests/allocators/asrt/optimized.wat +++ b/tests/allocators/asrt/optimized.wat @@ -1,22 +1,21 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00>") - (data (i32.const 24) ".\00.\00/\00.\00.\00/\00r\00u\00n\00t\00i\00m\00e\00/\00a\00s\00s\00e\00m\00b\00l\00y\00/\00i\00n\00d\00e\00x\00.\00t\00s") - (global $../../runtime/assembly/index/ROOT (mut i32) (i32.const 0)) + (data (i32.const 8) "\10\00\00\00\1e") + (data (i32.const 24) "~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") + (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "memory.allocate" (func $assembly/index/memory.allocate)) (export "memory.free" (func $assembly/index/memory.free)) (export "memory.fill" (func $assembly/index/memory.fill)) - (func $../../runtime/assembly/index/removeBlock (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -132,7 +131,7 @@ end end ) - (func $../../runtime/assembly/index/insertBlock (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -171,7 +170,7 @@ if local.get $0 local.get $4 - call $../../runtime/assembly/index/removeBlock + call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 @@ -218,7 +217,7 @@ if local.get $0 local.get $3 - call $../../runtime/assembly/index/removeBlock + call $~lib/rt/tlsf/removeBlock local.get $3 local.get $6 i32.const 3 @@ -330,7 +329,7 @@ i32.or i32.store offset=4 ) - (func $../../runtime/assembly/index/addMemory (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $2 block (result i32) @@ -392,14 +391,14 @@ i32.store offset=1568 local.get $0 local.get $1 - call $../../runtime/assembly/index/insertBlock + call $~lib/rt/tlsf/insertBlock ) - (func $../../runtime/assembly/index/initialize (; 4 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/rt/tlsf/initializeRoot (; 4 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 96 + i32.const 64 local.tee $3 i32.const 67107 i32.add @@ -486,10 +485,11 @@ current_memory i32.const 16 i32.shl - call $../../runtime/assembly/index/addMemory + call $~lib/rt/tlsf/addMemory local.get $0 + global.set $~lib/rt/tlsf/ROOT ) - (func $../../runtime/assembly/index/prepareSize (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/prepareSize (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741824 @@ -497,7 +497,7 @@ if i32.const 0 i32.const 24 - i32.const 466 + i32.const 436 i32.const 29 call $~lib/builtins/abort unreachable @@ -515,7 +515,7 @@ i32.gt_u select ) - (func $../../runtime/assembly/index/searchBlock (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -616,7 +616,7 @@ end end ) - (func $../../runtime/assembly/index/growMemory (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -655,9 +655,9 @@ current_memory i32.const 16 i32.shl - call $../../runtime/assembly/index/addMemory + call $~lib/rt/tlsf/addMemory ) - (func $../../runtime/assembly/index/prepareBlock (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -692,7 +692,7 @@ i32.store local.get $0 local.get $1 - call $../../runtime/assembly/index/insertBlock + call $~lib/rt/tlsf/insertBlock else local.get $1 local.get $3 @@ -721,23 +721,23 @@ i32.store end ) - (func $../../runtime/assembly/index/allocateBlock (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 - call $../../runtime/assembly/index/prepareSize + call $~lib/rt/tlsf/prepareSize local.tee $3 - call $../../runtime/assembly/index/searchBlock + call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz if local.get $0 local.get $3 - call $../../runtime/assembly/index/growMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $3 - call $../../runtime/assembly/index/searchBlock + call $~lib/rt/tlsf/searchBlock local.set $2 end local.get $2 @@ -751,26 +751,25 @@ i32.store offset=12 local.get $0 local.get $2 - call $../../runtime/assembly/index/removeBlock + call $~lib/rt/tlsf/removeBlock local.get $0 local.get $2 local.get $3 - call $../../runtime/assembly/index/prepareBlock + call $~lib/rt/tlsf/prepareBlock local.get $2 ) (func $assembly/index/memory.allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - global.get $../../runtime/assembly/index/ROOT + global.get $~lib/rt/tlsf/ROOT local.tee $1 - i32.eqz - if - call $../../runtime/assembly/index/initialize - local.tee $1 - global.set $../../runtime/assembly/index/ROOT + if (result i32) + local.get $1 + else + call $~lib/rt/tlsf/initializeRoot + global.get $~lib/rt/tlsf/ROOT end - local.get $1 local.get $0 - call $../../runtime/assembly/index/allocateBlock + call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add ) @@ -784,9 +783,9 @@ i32.const 1 i32.or i32.store - global.get $../../runtime/assembly/index/ROOT + global.get $~lib/rt/tlsf/ROOT local.get $0 - call $../../runtime/assembly/index/insertBlock + call $~lib/rt/tlsf/insertBlock ) (func $~lib/memory/memory.fill (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i64) diff --git a/tests/allocators/asrt/untouched.wat b/tests/allocators/asrt/untouched.wat index 201974bda1..5e0390d1bf 100644 --- a/tests/allocators/asrt/untouched.wat +++ b/tests/allocators/asrt/untouched.wat @@ -1,26 +1,26 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00>\00\00\00\00\00\00\00\00\00\00\00.\00.\00/\00.\00.\00/\00r\00u\00n\00t\00i\00m\00e\00/\00a\00s\00s\00e\00m\00b\00l\00y\00/\00i\00n\00d\00e\00x\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 56) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00n\00d\00e\00x\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $../../runtime/assembly/index/ROOT (mut i32) (i32.const 0)) - (global $../../runtime/assembly/index/ACYCLIC_FLAG i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 88)) + (global $~lib/rt/pure/ACYCLIC_FLAG i32 (i32.const 0)) + (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 104)) (export "memory" (memory $0)) (export "memory.allocate" (func $assembly/index/memory.allocate)) (export "memory.free" (func $assembly/index/memory.free)) (export "memory.fill" (func $assembly/index/memory.fill)) - (func $../../runtime/assembly/index/removeBlock (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -41,7 +41,7 @@ if i32.const 0 i32.const 24 - i32.const 276 + i32.const 265 i32.const 13 call $~lib/builtins/abort unreachable @@ -66,7 +66,7 @@ if i32.const 0 i32.const 24 - i32.const 278 + i32.const 267 i32.const 13 call $~lib/builtins/abort unreachable @@ -118,7 +118,7 @@ if i32.const 0 i32.const 24 - i32.const 291 + i32.const 280 i32.const 13 call $~lib/builtins/abort unreachable @@ -142,7 +142,7 @@ i32.store offset=16 end local.get $1 - block $../../runtime/assembly/index/GETHEAD|inlined.1 (result i32) + block $~lib/rt/tlsf/GETHEAD|inlined.1 (result i32) local.get $0 local.set $10 local.get $4 @@ -162,7 +162,7 @@ end i32.eq if - block $../../runtime/assembly/index/SETHEAD|inlined.1 + block $~lib/rt/tlsf/SETHEAD|inlined.1 local.get $0 local.set $11 local.get $4 @@ -186,7 +186,7 @@ local.get $7 i32.eqz if - block $../../runtime/assembly/index/GETSL|inlined.0 (result i32) + block $~lib/rt/tlsf/GETSL|inlined.0 (result i32) local.get $0 local.set $9 local.get $4 @@ -199,7 +199,7 @@ i32.load offset=4 end local.set $8 - block $../../runtime/assembly/index/SETSL|inlined.1 + block $~lib/rt/tlsf/SETSL|inlined.1 local.get $0 local.set $11 local.get $4 @@ -238,7 +238,7 @@ end end ) - (func $../../runtime/assembly/index/insertBlock (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -256,7 +256,7 @@ if i32.const 0 i32.const 24 - i32.const 204 + i32.const 193 i32.const 13 call $~lib/builtins/abort unreachable @@ -271,12 +271,12 @@ if i32.const 0 i32.const 24 - i32.const 206 + i32.const 195 i32.const 13 call $~lib/builtins/abort unreachable end - block $../../runtime/assembly/index/GETRIGHT|inlined.0 (result i32) + block $~lib/rt/tlsf/GETRIGHT|inlined.0 (result i32) local.get $1 local.set $3 local.get $3 @@ -318,7 +318,7 @@ if local.get $0 local.get $4 - call $../../runtime/assembly/index/removeBlock + call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 @@ -327,7 +327,7 @@ i32.or local.tee $2 i32.store - block $../../runtime/assembly/index/GETRIGHT|inlined.1 (result i32) + block $~lib/rt/tlsf/GETRIGHT|inlined.1 (result i32) local.get $1 local.set $6 local.get $6 @@ -351,7 +351,7 @@ i32.const 2 i32.and if - block $../../runtime/assembly/index/GETFREELEFT|inlined.0 (result i32) + block $~lib/rt/tlsf/GETFREELEFT|inlined.0 (result i32) local.get $1 local.set $3 local.get $3 @@ -370,7 +370,7 @@ if i32.const 0 i32.const 24 - i32.const 227 + i32.const 216 i32.const 15 call $~lib/builtins/abort unreachable @@ -395,7 +395,7 @@ if local.get $0 local.get $3 - call $../../runtime/assembly/index/removeBlock + call $~lib/rt/tlsf/removeBlock local.get $3 local.get $6 i32.const 3 @@ -433,7 +433,7 @@ if i32.const 0 i32.const 24 - i32.const 242 + i32.const 231 i32.const 13 call $~lib/builtins/abort unreachable @@ -449,7 +449,7 @@ if i32.const 0 i32.const 24 - i32.const 243 + i32.const 232 i32.const 13 call $~lib/builtins/abort unreachable @@ -506,12 +506,12 @@ if i32.const 0 i32.const 24 - i32.const 259 + i32.const 248 i32.const 13 call $~lib/builtins/abort unreachable end - block $../../runtime/assembly/index/GETHEAD|inlined.2 (result i32) + block $~lib/rt/tlsf/GETHEAD|inlined.2 (result i32) local.get $0 local.set $3 local.get $9 @@ -542,7 +542,7 @@ local.get $1 i32.store offset=16 end - block $../../runtime/assembly/index/SETHEAD|inlined.2 + block $~lib/rt/tlsf/SETHEAD|inlined.2 local.get $0 local.set $12 local.get $9 @@ -571,8 +571,8 @@ i32.shl i32.or i32.store - block $../../runtime/assembly/index/SETSL|inlined.2 - block $../../runtime/assembly/index/GETSL|inlined.1 (result i32) + block $~lib/rt/tlsf/SETSL|inlined.2 + block $~lib/rt/tlsf/GETSL|inlined.1 (result i32) local.get $0 local.set $13 local.get $9 @@ -598,7 +598,7 @@ i32.store offset=4 end ) - (func $../../runtime/assembly/index/addMemory (; 3 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/addMemory (; 3 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -629,12 +629,12 @@ if i32.const 0 i32.const 24 - i32.const 385 + i32.const 374 i32.const 4 call $~lib/builtins/abort unreachable end - block $../../runtime/assembly/index/GETTAIL|inlined.0 (result i32) + block $~lib/rt/tlsf/GETTAIL|inlined.0 (result i32) local.get $0 local.set $3 local.get $3 @@ -654,7 +654,7 @@ if i32.const 0 i32.const 24 - i32.const 395 + i32.const 384 i32.const 15 call $~lib/builtins/abort unreachable @@ -685,7 +685,7 @@ if i32.const 0 i32.const 24 - i32.const 407 + i32.const 396 i32.const 4 call $~lib/builtins/abort unreachable @@ -740,7 +740,7 @@ i32.const 2 i32.or i32.store - block $../../runtime/assembly/index/SETTAIL|inlined.1 + block $~lib/rt/tlsf/SETTAIL|inlined.1 local.get $0 local.set $9 local.get $4 @@ -751,10 +751,10 @@ end local.get $0 local.get $8 - call $../../runtime/assembly/index/insertBlock + call $~lib/rt/tlsf/insertBlock i32.const 1 ) - (func $../../runtime/assembly/index/initialize (; 4 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/rt/tlsf/initializeRoot (; 4 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -808,7 +808,7 @@ local.get $3 i32.const 0 i32.store - block $../../runtime/assembly/index/SETTAIL|inlined.0 + block $~lib/rt/tlsf/SETTAIL|inlined.0 local.get $3 local.set $5 i32.const 0 @@ -827,7 +827,7 @@ i32.eqz br_if $break|0 block - block $../../runtime/assembly/index/SETSL|inlined.0 + block $~lib/rt/tlsf/SETSL|inlined.0 local.get $3 local.set $7 local.get $4 @@ -851,7 +851,7 @@ i32.lt_u i32.eqz br_if $break|1 - block $../../runtime/assembly/index/SETHEAD|inlined.0 + block $~lib/rt/tlsf/SETHEAD|inlined.0 local.get $3 local.set $9 local.get $4 @@ -904,11 +904,12 @@ current_memory i32.const 16 i32.shl - call $../../runtime/assembly/index/addMemory + call $~lib/rt/tlsf/addMemory drop local.get $3 + global.set $~lib/rt/tlsf/ROOT ) - (func $../../runtime/assembly/index/prepareSize (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/prepareSize (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -917,7 +918,7 @@ if i32.const 0 i32.const 24 - i32.const 466 + i32.const 436 i32.const 29 call $~lib/builtins/abort unreachable @@ -937,7 +938,7 @@ i32.gt_u select ) - (func $../../runtime/assembly/index/searchBlock (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1011,12 +1012,12 @@ if i32.const 0 i32.const 24 - i32.const 337 + i32.const 326 i32.const 13 call $~lib/builtins/abort unreachable end - block $../../runtime/assembly/index/GETSL|inlined.2 (result i32) + block $~lib/rt/tlsf/GETSL|inlined.2 (result i32) local.get $0 local.set $5 local.get $2 @@ -1058,7 +1059,7 @@ local.get $4 i32.ctz local.set $2 - block $../../runtime/assembly/index/GETSL|inlined.3 (result i32) + block $~lib/rt/tlsf/GETSL|inlined.3 (result i32) local.get $0 local.set $8 local.get $2 @@ -1076,12 +1077,12 @@ if i32.const 0 i32.const 24 - i32.const 350 + i32.const 339 i32.const 17 call $~lib/builtins/abort unreachable end - block $../../runtime/assembly/index/GETHEAD|inlined.3 (result i32) + block $~lib/rt/tlsf/GETHEAD|inlined.3 (result i32) local.get $0 local.set $9 local.get $2 @@ -1103,7 +1104,7 @@ local.set $7 end else - block $../../runtime/assembly/index/GETHEAD|inlined.4 (result i32) + block $~lib/rt/tlsf/GETHEAD|inlined.4 (result i32) local.get $0 local.set $8 local.get $2 @@ -1126,7 +1127,7 @@ end local.get $7 ) - (func $../../runtime/assembly/index/growMemory (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1176,10 +1177,10 @@ local.get $7 i32.const 16 i32.shl - call $../../runtime/assembly/index/addMemory + call $~lib/rt/tlsf/addMemory drop ) - (func $../../runtime/assembly/index/prepareBlock (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1194,7 +1195,7 @@ if i32.const 0 i32.const 24 - i32.const 364 + i32.const 353 i32.const 13 call $~lib/builtins/abort unreachable @@ -1235,7 +1236,7 @@ i32.store local.get $0 local.get $5 - call $../../runtime/assembly/index/insertBlock + call $~lib/rt/tlsf/insertBlock else local.get $1 local.get $3 @@ -1244,7 +1245,7 @@ i32.xor i32.and i32.store - block $../../runtime/assembly/index/GETRIGHT|inlined.3 (result i32) + block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) local.get $1 local.set $5 local.get $5 @@ -1258,7 +1259,7 @@ i32.and i32.add end - block $../../runtime/assembly/index/GETRIGHT|inlined.2 (result i32) + block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $1 local.set $5 local.get $5 @@ -1280,32 +1281,32 @@ i32.store end ) - (func $../../runtime/assembly/index/allocateBlock (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 - call $../../runtime/assembly/index/prepareSize + call $~lib/rt/tlsf/prepareSize local.set $2 local.get $0 local.get $2 - call $../../runtime/assembly/index/searchBlock + call $~lib/rt/tlsf/searchBlock local.set $3 local.get $3 i32.eqz if local.get $0 local.get $2 - call $../../runtime/assembly/index/growMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $2 - call $../../runtime/assembly/index/searchBlock + call $~lib/rt/tlsf/searchBlock local.set $3 local.get $3 i32.eqz if i32.const 0 i32.const 24 - i32.const 477 + i32.const 466 i32.const 15 call $~lib/builtins/abort unreachable @@ -1323,7 +1324,7 @@ if i32.const 0 i32.const 24 - i32.const 479 + i32.const 468 i32.const 13 call $~lib/builtins/abort unreachable @@ -1339,35 +1340,35 @@ i32.store offset=12 local.get $0 local.get $3 - call $../../runtime/assembly/index/removeBlock + call $~lib/rt/tlsf/removeBlock local.get $0 local.get $3 local.get $2 - call $../../runtime/assembly/index/prepareBlock + call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $../../runtime/assembly/index/__mm_allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/rt/index/__mm_allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - global.get $../../runtime/assembly/index/ROOT + global.get $~lib/rt/tlsf/ROOT local.set $1 local.get $1 i32.eqz if - call $../../runtime/assembly/index/initialize - local.tee $1 - global.set $../../runtime/assembly/index/ROOT + call $~lib/rt/tlsf/initializeRoot + global.get $~lib/rt/tlsf/ROOT + local.set $1 end local.get $1 local.get $0 - call $../../runtime/assembly/index/allocateBlock + call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add ) (func $assembly/index/memory.allocate (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $../../runtime/assembly/index/__mm_allocate + call $~lib/rt/index/__mm_allocate ) - (func $../../runtime/assembly/index/freeBlock (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 i32.load @@ -1380,7 +1381,7 @@ if i32.const 0 i32.const 24 - i32.const 530 + i32.const 519 i32.const 2 call $~lib/builtins/abort unreachable @@ -1392,15 +1393,15 @@ i32.store local.get $0 local.get $1 - call $../../runtime/assembly/index/insertBlock + call $~lib/rt/tlsf/insertBlock ) - (func $../../runtime/assembly/index/__mm_free (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) - global.get $../../runtime/assembly/index/ROOT + (func $~lib/rt/index/__mm_free (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + global.get $~lib/rt/tlsf/ROOT i32.eqz if i32.const 0 - i32.const 24 - i32.const 556 + i32.const 72 + i32.const 29 i32.const 13 call $~lib/builtins/abort unreachable @@ -1419,21 +1420,21 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 557 + i32.const 72 + i32.const 30 i32.const 2 call $~lib/builtins/abort unreachable end - global.get $../../runtime/assembly/index/ROOT + global.get $~lib/rt/tlsf/ROOT local.get $0 i32.const 16 i32.sub - call $../../runtime/assembly/index/freeBlock + call $~lib/rt/tlsf/freeBlock ) (func $assembly/index/memory.free (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $../../runtime/assembly/index/__mm_free + call $~lib/rt/index/__mm_free ) (func $~lib/memory/memory.fill (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) diff --git a/tests/runtime/assembly/index.ts b/tests/runtime/assembly/index.ts index 3129d0702f..e10336b783 100644 --- a/tests/runtime/assembly/index.ts +++ b/tests/runtime/assembly/index.ts @@ -1,823 +1,12 @@ -// An experimental standalone AssemblyScript runtime based on TLSF and PureRC. +import "rt"; -// @ts-ignore: decorator -@inline const DEBUG = true; - -// Alignment guarantees - -// @ts-ignore: decorator -@inline const AL_BITS: u32 = 4; // 16 bytes to fit up to v128 -// @ts-ignore: decorator -@inline const AL_SIZE: usize = 1 << AL_BITS; -// @ts-ignore: decorator -@inline const AL_MASK: usize = AL_SIZE - 1; - -/////////////////////// The TLSF (Two-Level Segregate Fit) memory allocator /////////////////////// -// see: http://www.gii.upv.es/tlsf/ - -// - `ffs(x)` is equivalent to `ctz(x)` with x != 0 -// - `fls(x)` is equivalent to `sizeof(x) * 8 - clz(x) - 1` - -// ╒══════════════ Block size interpretation (32-bit) ═════════════╕ -// 3 2 1 -// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits -// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┴─┴─┴─╫─┴─┴─┴─┤ -// │ | FL │ SB = SL + AL │ ◄─ usize -// └───────────────────────────────────────────────┴───────╨───────┘ -// FL: first level, SL: second level, AL: alignment, SB: small block - -// @ts-ignore: decorator -@inline const SL_BITS: u32 = 4; -// @ts-ignore: decorator -@inline const SL_SIZE: usize = 1 << SL_BITS; - -// @ts-ignore: decorator -@inline const SB_BITS: usize = (SL_BITS + AL_BITS); -// @ts-ignore: decorator -@inline const SB_SIZE: usize = 1 << SB_BITS; - -// @ts-ignore: decorator -@inline const FL_BITS: u32 = 31 - SB_BITS; - -// [00]: < 256B (SB) [12]: < 1M -// [01]: < 512B [13]: < 2M -// [02]: < 1K [14]: < 4M -// [03]: < 2K [15]: < 8M -// [04]: < 4K [16]: < 16M -// [05]: < 8K [17]: < 32M -// [06]: < 16K [18]: < 64M -// [07]: < 32K [19]: < 128M -// [08]: < 64K [20]: < 256M -// [09]: < 128K [21]: < 512M -// [10]: < 256K [22]: <= 1G - OVERHEAD -// [11]: < 512K -// VMs limit to 2GB total (currently), making one 1G block max (or three 512M etc.) due to block overhead - -// Tags stored in otherwise unused alignment bits - -// @ts-ignore: decorator -@inline const FREE: usize = 1 << 0; -// @ts-ignore: decorator -@inline const LEFTFREE: usize = 1 << 1; -// @ts-ignore: decorator -@inline const TAGS_MASK: usize = FREE | LEFTFREE; // <= AL_MASK - -// ╒════════════════════ Block layout (32-bit) ════════════════════╕ -// 3 2 1 -// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits -// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┼─┼─┤ overhead ┐ -// │ size │0│L│F│ ◄─┐ info -// ├─────────────────────────────────────────────────────────┴─┴─┴─┤ │ -// │ │ │ -// │ ... additional runtime overhead ... │ │ -// │ │ │ -// ╞═══════════════════════════════════════════════════════════════╡ │ ┐ ┘ -// │ if free: ◄ prev │ ◄─┤ usize -// ├───────────────────────────────────────────────────────────────┤ │ -// │ if free: next ► │ ◄─┤ -// ├───────────────────────────────────────────────────────────────┤ │ -// │ ... │ │ = 0 -// ├───────────────────────────────────────────────────────────────┤ │ -// │ if free: back ▲ │ ◄─┘ -// └───────────────────────────────────────────────────────────────┘ payload ┘ >= MIN SIZE -// F: FREE, L: LEFTFREE -@unmanaged class Block { - - /** Memory manager info. */ - mmInfo: usize; // WASM64 might need adaption - /** Garbage collector info. */ - gcInfo: u32; - /** Runtime class id. */ - rtId: u32; - /** Runtime object size. */ - rtSize: u32; - - /** Previous free block, if any. Only valid if free, otherwise part of payload. */ - prev: Block | null; - /** Next free block, if any. Only valid if free, otherwise part of payload. */ - next: Block | null; - - // If the block is free, there is a 'back'reference at its end pointing at its start. -} - -// Block constants. Overhead is always present, no matter if free or used. Also, a block must have -// a minimum size of three pointers so it can hold `prev`, `next` and `back` if free. - -// @ts-ignore: decorator -@inline const BLOCK_OVERHEAD: usize = (offsetof("prev") + AL_MASK) & ~AL_MASK; -// @ts-ignore: decorator -@inline const BLOCK_MINSIZE: usize = (3 * sizeof() + AL_MASK) & ~AL_MASK;// prev + next + back -// @ts-ignore: decorator -@inline const BLOCK_MAXSIZE: usize = 1 << (FL_BITS + SB_BITS - 1); // exclusive - -/** Gets the left block of a block. Only valid if the left block is free. */ -// @ts-ignore: decorator -@inline function GETFREELEFT(block: Block): Block { - return load(changetype(block) - sizeof()); -} - -/** Gets the right block of of a block by advancing to the right by its size. */ -// @ts-ignore: decorator -@inline function GETRIGHT(block: Block): Block { - return changetype(changetype(block) + BLOCK_OVERHEAD + (block.mmInfo & ~TAGS_MASK)); -} - -// ╒═════════════════════ Root layout (32-bit) ════════════════════╕ -// 3 2 1 -// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits -// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ ┐ -// │ 0 | flMap S│ ◄────┐ -// ╞═══════════════════════════════════════════════════════════════╡ │ -// │ slMap[0] S │ ◄─┐ │ -// ├───────────────────────────────────────────────────────────────┤ │ │ -// │ slMap[1] │ ◄─┤ │ -// ├───────────────────────────────────────────────────────────────┤ u32 │ -// │ slMap[22] │ ◄─┘ │ -// ╞═══════════════════════════════════════════════════════════════╡ usize -// │ head[0] │ ◄────┤ -// ├───────────────────────────────────────────────────────────────┤ │ -// │ ... │ ◄────┤ -// ├───────────────────────────────────────────────────────────────┤ │ -// │ head[367] │ ◄────┤ -// ╞═══════════════════════════════════════════════════════════════╡ │ -// │ tail │ ◄────┘ -// └───────────────────────────────────────────────────────────────┘ SIZE ┘ -// S: Small blocks map -@unmanaged class Root { - /** First level bitmap. */ - flMap: usize; -} - -// Root constants. Where stuff is stored inside of the root structure. - -// @ts-ignore: decorator -@inline const SL_START = sizeof(); -// @ts-ignore: decorator -@inline const SL_END = SL_START + (FL_BITS << alignof()); -// @ts-ignore: decorator -@inline const HL_START = (SL_END + AL_MASK) & ~AL_MASK; -// @ts-ignore: decorator -@inline const HL_END = HL_START + FL_BITS * SL_SIZE * sizeof(); -// @ts-ignore: decorator -@inline const ROOT_SIZE = HL_END + sizeof(); - -var ROOT: Root; - -/** Gets the second level map of the specified first level. */ -// @ts-ignore: decorator -@inline function GETSL(root: Root, fl: usize): u32 { - return load(changetype(root) + (fl << alignof()), SL_START); -} - -/** Sets the second level map of the specified first level. */ -// @ts-ignore: decorator -@inline function SETSL(root: Root, fl: usize, slMap: u32): void { - store(changetype(root) + (fl << alignof()), slMap, SL_START); -} - -/** Gets the head of the free list for the specified combination of first and second level. */ -// @ts-ignore: decorator -@inline function GETHEAD(root: Root, fl: usize, sl: u32): Block | null { - return changetype(load(changetype(root) + (fl * SL_SIZE + sl) * sizeof(), HL_START)); -} - -/** Sets the head of the free list for the specified combination of first and second level. */ -// @ts-ignore: decorator -@inline function SETHEAD(root: Root, fl: usize, sl: u32, head: Block | null): void { - store(changetype(root) + (fl * SL_SIZE + sl) * sizeof() , changetype(head), HL_START); -} - -/** Gets the tail block.. */ -// @ts-ignore: decorator -@inline function GETTAIL(root: Root): Block { - return load(changetype(root), HL_END); -} - -/** Sets the tail block. */ -// @ts-ignore: decorator -@inline function SETTAIL(root: Root, tail: Block): void { - store(changetype(root), tail, HL_END); -} - -/** Inserts a previously used block back into the free list. */ -function insertBlock(root: Root, block: Block): void { - if (DEBUG) assert(block); // cannot be null - var blockInfo = block.mmInfo; - if (DEBUG) assert(blockInfo & FREE); // must be free - - var right = GETRIGHT(block); - var rightInfo = right.mmInfo; - - // merge with right block if also free - if (rightInfo & FREE) { - let newSize = (blockInfo & ~TAGS_MASK) + BLOCK_OVERHEAD + (rightInfo & ~TAGS_MASK); - if (newSize < BLOCK_MAXSIZE) { - removeBlock(root, right); - block.mmInfo = blockInfo = (blockInfo & TAGS_MASK) | newSize; - right = GETRIGHT(block); - rightInfo = right.mmInfo; - // 'back' is set below - } - } - - // merge with left block if also free - if (blockInfo & LEFTFREE) { - let left = GETFREELEFT(block); - let leftInfo = left.mmInfo; - if (DEBUG) assert(leftInfo & FREE); // must be free according to right tags - let newSize = (leftInfo & ~TAGS_MASK) + BLOCK_OVERHEAD + (blockInfo & ~TAGS_MASK); - if (newSize < BLOCK_MAXSIZE) { - removeBlock(root, left); - left.mmInfo = blockInfo = (leftInfo & TAGS_MASK) | newSize; - block = left; - // 'back' is set below - } - } - - right.mmInfo = rightInfo | LEFTFREE; - // right is no longer used now, hence rightInfo is not synced - - // we now know the size of the block - var size = blockInfo & ~TAGS_MASK; - if (DEBUG) assert(size >= BLOCK_MINSIZE && size < BLOCK_MAXSIZE); // must be a valid size - if (DEBUG) assert(changetype(block) + BLOCK_OVERHEAD + size == changetype(right)); // must match - - // set 'back' to itself at the end of block - store(changetype(right) - sizeof(), block); - - // mapping_insert - var fl: usize, sl: u32; - if (size < SB_SIZE) { - fl = 0; - sl = (size / AL_SIZE); - } else { - const inv: usize = sizeof() * 8 - 1; - fl = inv - clz(size); - sl = ((size >> (fl - SL_BITS)) ^ (1 << SL_BITS)); - fl -= SB_BITS - 1; - } - if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range - - // perform insertion - var head = GETHEAD(root, fl, sl); - block.prev = null; - block.next = head; - if (head) head.prev = block; - SETHEAD(root, fl, sl, block); - - // update first and second level maps - root.flMap |= (1 << fl); - SETSL(root, fl, GETSL(root, fl) | (1 << sl)); -} - -/** Removes a free block from internal lists. */ -function removeBlock(root: Root, block: Block): void { - var blockInfo = block.mmInfo; - if (DEBUG) assert(blockInfo & FREE); // must be free - var size = blockInfo & ~TAGS_MASK; - if (DEBUG) assert(size >= BLOCK_MINSIZE && size < BLOCK_MAXSIZE); // must be valid - - // mapping_insert - var fl: usize, sl: u32; - if (size < SB_SIZE) { - fl = 0; - sl = (size / AL_SIZE); - } else { - const inv: usize = sizeof() * 8 - 1; - fl = inv - clz(size); - sl = ((size >> (fl - SL_BITS)) ^ (1 << SL_BITS)); - fl -= SB_BITS - 1; - } - if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range - - // link previous and next free block - var prev = block.prev; - var next = block.next; - if (prev) prev.next = next; - if (next) next.prev = prev; - - // update head if we are removing it - if (block == GETHEAD(root, fl, sl)) { - SETHEAD(root, fl, sl, next); - - // clear second level map if head is empty now - if (!next) { - let slMap = GETSL(root, fl); - SETSL(root, fl, slMap &= ~(1 << sl)); - - // clear first level map if second level is empty now - if (!slMap) root.flMap &= ~(1 << fl); - } - } - // note: does not alter left/back because it is likely that splitting - // is performed afterwards, invalidating those changes. so, the caller - // must perform those updates. -} - -/** Searches for a free block of at least the specified size. */ -function searchBlock(root: Root, size: usize): Block | null { - // size was already asserted by caller - - // mapping_search - var fl: usize, sl: u32; - if (size < SB_SIZE) { - fl = 0; - sl = (size / AL_SIZE); - } else { - const halfMaxSize = BLOCK_MAXSIZE >> 1; // don't round last fl - const inv: usize = sizeof() * 8 - 1; - const invRound = inv - SL_BITS; - let requestSize = size < halfMaxSize - ? size + (1 << (invRound - clz(size))) - 1 - : size; - fl = inv - clz(requestSize); - sl = ((requestSize >> (fl - SL_BITS)) ^ (1 << SL_BITS)); - fl -= SB_BITS - 1; - } - if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range - - // search second level - var slMap = GETSL(root, fl) & (~0 << sl); - var head: Block | null; - if (!slMap) { - // search next larger first level - let flMap = root.flMap & (~0 << (fl + 1)); - if (!flMap) { - head = null; - } else { - fl = ctz(flMap); - slMap = GETSL(root, fl); - if (DEBUG) assert(slMap); // can't be zero if fl points here - head = GETHEAD(root, fl, ctz(slMap)); - } - } else { - head = GETHEAD(root, fl, ctz(slMap)); - } - return head; -} - -/** Prepares the specified block before (re-)use, possibly splitting it. */ -function prepareBlock(root: Root, block: Block, size: usize): void { - // size was already asserted by caller - - var blockInfo = block.mmInfo; - if (DEBUG) assert(!(size & AL_MASK)); // size must be aligned so the new block is - - // split if the block can hold another MINSIZE block incl. overhead - var remaining = (blockInfo & ~TAGS_MASK) - size; - if (remaining >= BLOCK_OVERHEAD + BLOCK_MINSIZE) { - block.mmInfo = size | (blockInfo & LEFTFREE); // also discards FREE - - let spare = changetype(changetype(block) + BLOCK_OVERHEAD + size); - spare.mmInfo = (remaining - BLOCK_OVERHEAD) | FREE; // not LEFTFREE - insertBlock(root, spare); // also sets 'back' - - // otherwise tag block as no longer FREE and right as no longer LEFTFREE - } else { - block.mmInfo = blockInfo & ~FREE; - GETRIGHT(block).mmInfo &= ~LEFTFREE; - } -} - -/** Adds more memory to the pool. */ -function addMemory(root: Root, start: usize, end: usize): bool { - if (DEBUG) { - assert( - start <= end && // must be valid - !(start & AL_MASK) && // must be aligned - !(end & AL_MASK) // must be aligned - ); - } - - var tail = GETTAIL(root); - var tailInfo: usize = 0; - if (tail) { // more memory - if (DEBUG) assert(start >= changetype(tail) + BLOCK_OVERHEAD); - - // merge with current tail if adjacent - if (start - BLOCK_OVERHEAD == changetype(tail)) { - start -= BLOCK_OVERHEAD; - tailInfo = tail.mmInfo; - } else { - // We don't do this, but a user might `memory.grow` manually - // leading to non-adjacent pages managed by TLSF. - } - - } else if (DEBUG) { // first memory - assert(start >= changetype(root) + ROOT_SIZE); // starts after root - } - - // check if size is large enough for a free block and the tail block - var size = end - start; - if (size < BLOCK_OVERHEAD + BLOCK_MINSIZE + BLOCK_OVERHEAD) { - return false; - } - - // left size is total minus its own and the zero-length tail's header - var leftSize = size - 2 * BLOCK_OVERHEAD; - var left = changetype(start); - left.mmInfo = leftSize | FREE | (tailInfo & LEFTFREE); - left.prev = null; - left.next = null; - - // tail is a zero-length used block - tail = changetype(start + size - BLOCK_OVERHEAD); - tail.mmInfo = 0 | LEFTFREE; - SETTAIL(root, tail); - - insertBlock(root, left); // also merges with free left before tail / sets 'back' - - return true; -} - -/** Grows memory to fit at least another block of the specified size. */ -function growMemory(root: Root, size: usize): void { - var pagesBefore = memory.size(); - var pagesNeeded = (((size + 0xffff) & ~0xffff) >>> 16); - var pagesWanted = max(pagesBefore, pagesNeeded); // double memory - if (memory.grow(pagesWanted) < 0) { - if (memory.grow(pagesNeeded) < 0) unreachable(); - } - var pagesAfter = memory.size(); - addMemory(root, pagesBefore << 16, pagesAfter << 16); -} - -/** Initilizes the root structure. */ -function initialize(): Root { - var rootOffset = (HEAP_BASE + AL_MASK) & ~AL_MASK; - var pagesBefore = memory.size(); - var pagesNeeded = ((((rootOffset + ROOT_SIZE) + 0xffff) & ~0xffff) >>> 16); - if (pagesNeeded > pagesBefore && memory.grow(pagesNeeded - pagesBefore) < 0) unreachable(); - var root = changetype(rootOffset); - root.flMap = 0; - SETTAIL(root, changetype(0)); - for (let fl: usize = 0; fl < FL_BITS; ++fl) { - SETSL(root, fl, 0); - for (let sl: u32 = 0; sl < SL_SIZE; ++sl) { - SETHEAD(root, fl, sl, null); - } - } - addMemory(root, (rootOffset + ROOT_SIZE + AL_MASK) & ~AL_MASK, memory.size() << 16); - return root; -} - -/** Prepares and checks an allocation size. */ -function prepareSize(size: usize): usize { - if (size >= BLOCK_MAXSIZE) throw new Error("allocation too large"); - return max((size + AL_MASK) & ~AL_MASK, BLOCK_MINSIZE); // align and ensure min size -} - -/** Allocates a block of the specified size. */ -function allocateBlock(root: Root, size: usize): Block { - var payloadSize = prepareSize(size); - var block = searchBlock(root, payloadSize); - if (!block) { - growMemory(root, payloadSize); - block = searchBlock(root, payloadSize); - if (DEBUG) assert(block); // must be found now - } - if (DEBUG) assert((block.mmInfo & ~TAGS_MASK) >= payloadSize); // must fit - block.gcInfo = 0; - block.rtId = 0; // not determined yet - block.rtSize = size; - removeBlock(root, block); - prepareBlock(root, block, payloadSize); - return block; -} - -/** Reallocates a block to the specified size. */ -function reallocateBlock(root: Root, block: Block, size: usize): Block { - var payloadSize = prepareSize(size); - var blockInfo = block.mmInfo; - if (DEBUG) assert(!(blockInfo & FREE)); // must be used - - // possibly split and update runtime size if it still fits - if (payloadSize <= (blockInfo & ~TAGS_MASK)) { - prepareBlock(root, block, payloadSize); - block.rtSize = size; - return block; - } - - // merge with right free block if merger is large enough - var right = GETRIGHT(block); - var rightInfo = right.mmInfo; - if (rightInfo & FREE) { - let mergeSize = (blockInfo & ~TAGS_MASK) + BLOCK_OVERHEAD + (rightInfo & ~TAGS_MASK); - if (mergeSize >= payloadSize) { - removeBlock(root, right); - // TODO: this can yield an intermediate block larger than BLOCK_MAXSIZE, which - // is immediately split though. does this trigger any assertions / issues? - block.mmInfo = (blockInfo & TAGS_MASK) | mergeSize; - block.rtSize = size; - prepareBlock(root, block, payloadSize); - return block; - } - } - - // otherwise move the block - var newBlock = allocateBlock(root, size); - newBlock.gcInfo = block.gcInfo; - newBlock.rtId = block.rtId; - memory.copy(changetype(newBlock) + BLOCK_OVERHEAD, changetype(block) + BLOCK_OVERHEAD, size); - block.mmInfo = blockInfo | FREE; - insertBlock(root, block); - return newBlock; -} - -/** Frees a block. */ -function freeBlock(root: Root, block: Block): void { - var blockInfo = block.mmInfo; - assert(!(blockInfo & FREE)); // must be used (user might call through to this) - block.mmInfo = blockInfo | FREE; - insertBlock(root, block); -} - -// Memory manager interface. - -// @ts-ignore: decorator -@global @unsafe -function __mm_allocate(size: usize): usize { - var root = ROOT; - if (!root) ROOT = root = initialize(); - return changetype(allocateBlock(root, size)) + BLOCK_OVERHEAD; -} - -// @ts-ignore: decorator -@global @unsafe -function __mm_reallocate(data: usize, size: usize): usize { - if (DEBUG) assert(ROOT); // must be initialized - assert(data != 0 && !(data & AL_MASK)); // must exist and be aligned - return changetype(reallocateBlock(ROOT, changetype(data - BLOCK_OVERHEAD), size)) + BLOCK_OVERHEAD; -} - -// @ts-ignore: decorator -@global @unsafe -function __mm_free(data: usize): void { - if (DEBUG) assert(ROOT); // must be initialized - assert(data != 0 && !(data & AL_MASK)); // must exist and be aligned - freeBlock(ROOT, changetype(data - BLOCK_OVERHEAD)); -} - -/////////////////////////// A Pure Reference Counting Garbage Collector /////////////////////////// -// see: https://researcher.watson.ibm.com/researcher/files/us-bacon/Bacon03Pure.pdf - -// TODO: make visitors eat cookies so we can compile direct calls into a switch -function __rt_visit_members(s: Block, cookie: i32): void { unreachable(); } -function __rt_flags(classId: u32): u32 { return unreachable(); } -const ACYCLIC_FLAG: u32 = 0; - -// ╒══════════════════════ GC Info structure ══════════════════════╕ -// │ 3 2 1 │ -// │1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0│ -// ├─┼─┴─┴─┼─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ -// │B│color│ refCount │ -// └─┴─────┴───────────────────────────────────────────────────────┘ -// B: buffered - -// @ts-ignore: decorator -@inline const BUFFERED_MASK: u32 = 1 << (sizeof() * 8 - 1); -// @ts-ignore: decorator -@inline const COLOR_BITS = 3; -// @ts-ignore: decorator -@inline const COLOR_SHIFT: u32 = ctz(BUFFERED_MASK) - COLOR_BITS; -// @ts-ignore: decorator -@inline const COLOR_MASK: u32 = ((1 << COLOR_BITS) - 1) << COLOR_SHIFT; -// @ts-ignore: decorator -@inline const REFCOUNT_MASK: u32 = (1 << COLOR_SHIFT) - 1; - -// ╒════════╤═══════════════════ Colors ═══════════════════════════╕ -// │ Color │ Meaning │ -// ├────────┼──────────────────────────────────────────────────────┤ -// │ BLACK │ In use or free │ -// │ GRAY │ Possible member of cycle │ -// │ WHITE │ Member of garbage cycle │ -// │ PURPLE │ Possible root of cycle │ -// │ RED │ Candidate cycle undergoing Σ-computation *concurrent │ -// │ ORANGE │ Candidate cycle awaiting epoch boundary *concurrent │ -// └────────┴──────────────────────────────────────────────────────┘ -// Acyclic detection has been decoupled, hence no GREEN. - -// @ts-ignore: decorator -@inline const COLOR_BLACK: u32 = 0 << COLOR_SHIFT; -// @ts-ignore: decorator -@inline const COLOR_GRAY: u32 = 1 << COLOR_SHIFT; -// @ts-ignore: decorator -@inline const COLOR_WHITE: u32 = 2 << COLOR_SHIFT; -// @ts-ignore: decorator -@inline const COLOR_PURPLE: u32 = 3 << COLOR_SHIFT; -// @ts-ignore: decorator -@inline const COLOR_RED: u32 = 4 << COLOR_SHIFT; -// @ts-ignore: decorator -@inline const COLOR_ORANGE: u32 = 5 << COLOR_SHIFT; - -// @ts-ignore: decorator -@inline const VISIT_DECREMENT = 1; // guard 0 -// @ts-ignore: decorator -@inline const VISIT_MARKGRAY = 2; -// @ts-ignore: decorator -@inline const VISIT_SCAN = 3; -// @ts-ignore: decorator -@inline const VISIT_SCANBLACK = 4; -// @ts-ignore: decorator -@inline const VISIT_COLLECTWHITE = 5; - -// @ts-ignore: decorator -@global -function __rt_visit(s: Block, cookie: i32): void { - switch (cookie) { - case VISIT_DECREMENT: { - decrement(s); - break; - } - case VISIT_MARKGRAY: { - if (DEBUG) assert((s.gcInfo & REFCOUNT_MASK) > 0); - s.gcInfo = s.gcInfo - 1; - markGray(s); - break; - } - case VISIT_SCAN: { - scan(s); - break; - } - case VISIT_SCANBLACK: { - let info = s.gcInfo; - assert((info & ~REFCOUNT_MASK) == ((info + 1) & ~REFCOUNT_MASK)); // overflow - s.gcInfo = info + 1; - if ((info & COLOR_MASK) != COLOR_BLACK) { - scanBlack(s); - } - break; - } - case VISIT_COLLECTWHITE: { - collectWhite(s); - break; - } - default: if (DEBUG) assert(false); - } -} - -/** Increments the reference count of the specified block by one.*/ -function increment(s: Block): void { - var info = s.gcInfo; - assert((info & ~REFCOUNT_MASK) == ((info + 1) & ~REFCOUNT_MASK)); // overflow - s.gcInfo = info + 1; -} - -/** Decrements the reference count of the specified block by one, possibly freeing it. */ -function decrement(s: Block): void { - var info = s.gcInfo; - var rc = info & REFCOUNT_MASK; - if (rc == 1) { - __rt_visit_members(s, VISIT_DECREMENT); - if (!(info & BUFFERED_MASK)) { - freeBlock(ROOT, s); - } else { - s.gcInfo = BUFFERED_MASK | COLOR_BLACK | 0; - } - } else { - if (DEBUG) assert(rc > 0); - if (!(__rt_flags(s.rtId) & ACYCLIC_FLAG)) { - s.gcInfo = BUFFERED_MASK | COLOR_PURPLE | (rc - 1); - if (!(info & BUFFERED_MASK)) { - appendRoot(s); - } - } else { - s.gcInfo = (info & ~REFCOUNT_MASK) | (rc - 1); - } - } -} - -/** Buffer of possible roots. */ -// @ts-ignore: decorator -@lazy var ROOTS: usize; -/** Current absolute offset into the `ROOTS` buffer. */ -// @ts-ignore: decorator -@lazy var CUR: usize = 0; -/** Current absolute end offset into the `ROOTS` buffer. */ -// @ts-ignore: decorator -@lazy var END: usize = 0; - -/** Appends a block to possible roots. */ -function appendRoot(s: Block): void { - var cur = CUR; - if (cur >= END) { - growRoots(); // TBD: either that or pick a default and force collection on overflow - cur = CUR; - } - store(cur, s); - CUR = cur + 1; -} - -/** Grows the roots buffer if it ran full. */ -function growRoots(): void { - var oldRoots = ROOTS; - var oldSize = CUR - oldRoots; - var newSize = max(oldSize * 2, 64 << alignof()); - var newRoots = memory.allocate(newSize); - memory.copy(newRoots, oldRoots, oldSize); - ROOTS = newRoots; - CUR = newRoots + oldSize; - END = newRoots + newSize; -} - -/** Collects cyclic garbage. */ -function collectCycles(): void { - - // markRoots - var roots = ROOTS; - var cur = roots; - for (let pos = cur, end = CUR; pos < end; pos += sizeof()) { - let s = load(pos); - let info = s.gcInfo; - if ((info & COLOR_MASK) == COLOR_PURPLE && (info & REFCOUNT_MASK) > 0) { - markGray(s); - store(cur, s); - cur += sizeof(); - } else { - if ((info & COLOR_MASK) == COLOR_BLACK && !(info & REFCOUNT_MASK)) { - freeBlock(ROOT, s); - } else { - s.gcInfo = info & ~BUFFERED_MASK; - } - } - } - CUR = cur; - - // scanRoots - for (let pos = roots; pos < cur; pos += sizeof()) { - scan(load(pos)); - } - - // collectRoots - for (let pos = roots; pos < cur; pos += sizeof()) { - let s = load(pos); - s.gcInfo = s.gcInfo & ~BUFFERED_MASK; - collectWhite(s); - } - CUR = roots; -} - -/** Marks a block as gray (possible member of cycle) during the collection phase. */ -function markGray(s: Block): void { - var info = s.gcInfo; - if ((info & COLOR_MASK) != COLOR_GRAY) { - s.gcInfo = (info & ~COLOR_MASK) | COLOR_GRAY; - __rt_visit_members(s, VISIT_MARKGRAY); - } -} - -/** Scans a block during the collection phase, determining whether it is garbage or not. */ -function scan(s: Block): void { - var info = s.gcInfo; - if ((info & COLOR_MASK) == COLOR_GRAY) { - if ((info & REFCOUNT_MASK) > 0) { - scanBlack(s); - } else { - s.gcInfo = (info & ~COLOR_MASK) | COLOR_WHITE; - __rt_visit_members(s, VISIT_SCAN); - } - } -} - -/** Marks a block as black (in use) if it was found to be reachable during the collection phase. */ -function scanBlack(s: Block): void { - s.gcInfo = (s.gcInfo & ~COLOR_MASK) | COLOR_BLACK; - __rt_visit_members(s, VISIT_SCANBLACK); -} - -/** Collects all white (member of a garbage cycle) nodes when completing the collection phase. */ -function collectWhite(s: Block): void { - var info = s.gcInfo; - if ((info & COLOR_MASK) == COLOR_WHITE && !(info & BUFFERED_MASK)) { - // s.gcInfo = (info & ~COLOR_MASK) | COLOR_BLACK; - __rt_visit_members(s, VISIT_COLLECTWHITE); - } - freeBlock(ROOT, s); -} - -// Garbage collector interface - -// @ts-ignore: decorator -@global @unsafe -function __gc_retain(ref: usize): void { - if (ref) increment(changetype(ref - BLOCK_OVERHEAD)); -} - -// @ts-ignore: decorator -@global @unsafe -function __gc_release(ref: usize): void { - if (ref) decrement(changetype(ref - BLOCK_OVERHEAD)); -} - -// keep alive, everything else is reached from here export { __mm_allocate, __mm_reallocate, __mm_free, - __rt_visit, __gc_retain, __gc_release, - collectCycles as __gc_collect + __gc_collect }; -// @start export function main(): void {} +@start export function main(): void {} diff --git a/tests/runtime/index.html b/tests/runtime/index.html index d6c79dbbd1..d029c22352 100644 --- a/tests/runtime/index.html +++ b/tests/runtime/index.html @@ -133,6 +133,7 @@ el.appendChild(er); var ef = document.createElement("button"); ef.innerText = "free"; + ef.className = "free"; el.appendChild(ef); ef.onclick = function() { exports.__mm_free(ptr); @@ -154,12 +155,16 @@ .clear { clear: both; } /* Lists */ .fl, .sl, .hl, .seg { float: left; padding: 0.4em; margin: 0.2em; border: 1px solid #ddd; border-radius: 3px; } +.fl { min-width: 1.3em; text-align: center; } .sl { min-width: 12em; } .hl { min-width: 7em; font-size: 0.8em; } .num { color: #fff; background: rgba(0, 0, 0, 0.3); padding: 0.4em; margin-left: -0.4em; border-radius: 0.2em; } .set { background: #7f7; } +.seg { border-top: 0.3em solid #333; } .seg button { margin-left: 0.5em; } .sub { vertical-align: sub; font-size: 0.8em; } +.free { background: #f77; border-color: #c33; } +.free:hover { background: #c33; color: #fff; }

AssemblyScript Runtime Visualizer / TLSF

diff --git a/tests/runtime/optimized.wat b/tests/runtime/optimized.wat index 5b8b447700..f35cbe3e32 100644 --- a/tests/runtime/optimized.wat +++ b/tests/runtime/optimized.wat @@ -1,31 +1,39 @@ (module + (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\"") - (data (i32.const 24) "a\00s\00s\00e\00m\00b\00l\00y\00/\00i\00n\00d\00e\00x\00.\00t\00s") - (data (i32.const 64) "\10\00\00\00\1c") - (data (i32.const 80) "~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") - (global $assembly/index/ROOT (mut i32) (i32.const 0)) - (global $assembly/index/CUR (mut i32) (i32.const 0)) - (global $assembly/index/ROOTS (mut i32) (i32.const 0)) + (data (i32.const 8) "\10\00\00\00\1e") + (data (i32.const 24) "~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 56) "\10\00\00\00\1c") + (data (i32.const 72) "~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/rt/pure/CUR (mut i32) (i32.const 0)) + (global $~lib/rt/pure/ROOTS (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "__mm_allocate" (func $assembly/index/__mm_allocate)) - (export "__mm_reallocate" (func $assembly/index/__mm_reallocate)) - (export "__mm_free" (func $assembly/index/__mm_free)) - (export "__rt_visit" (func $assembly/index/__rt_visit)) - (export "__gc_retain" (func $assembly/index/__gc_retain)) - (export "__gc_release" (func $assembly/index/__gc_release)) - (export "__gc_collect" (func $assembly/index/collectCycles)) - (func $assembly/index/removeBlock (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (export "main" (func $assembly/index/main)) + (export "__mm_allocate" (func $~lib/rt/index/__mm_allocate)) + (export "__mm_reallocate" (func $~lib/rt/index/__mm_reallocate)) + (export "__mm_free" (func $~lib/rt/index/__mm_free)) + (export "__gc_retain" (func $~lib/rt/index/__gc_retain)) + (export "__gc_release" (func $~lib/rt/index/__gc_release)) + (export "__gc_collect" (func $~lib/rt/index/__gc_collect)) + (func $assembly/index/main (; 1 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + i32.const 1 + global.set $~lib/started + end + ) + (func $~lib/rt/tlsf/removeBlock (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -141,7 +149,7 @@ end end ) - (func $assembly/index/insertBlock (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -180,7 +188,7 @@ if local.get $0 local.get $4 - call $assembly/index/removeBlock + call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 @@ -227,7 +235,7 @@ if local.get $0 local.get $3 - call $assembly/index/removeBlock + call $~lib/rt/tlsf/removeBlock local.get $3 local.get $6 i32.const 3 @@ -339,7 +347,7 @@ i32.or i32.store offset=4 ) - (func $assembly/index/addMemory (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $2 block (result i32) @@ -401,9 +409,9 @@ i32.store offset=1568 local.get $0 local.get $1 - call $assembly/index/insertBlock + call $~lib/rt/tlsf/insertBlock ) - (func $assembly/index/initialize (; 4 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/rt/tlsf/initializeRoot (; 5 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -495,10 +503,11 @@ current_memory i32.const 16 i32.shl - call $assembly/index/addMemory + call $~lib/rt/tlsf/addMemory local.get $0 + global.set $~lib/rt/tlsf/ROOT ) - (func $assembly/index/prepareSize (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/prepareSize (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741824 @@ -506,7 +515,7 @@ if i32.const 0 i32.const 24 - i32.const 466 + i32.const 436 i32.const 29 call $~lib/builtins/abort unreachable @@ -524,7 +533,7 @@ i32.gt_u select ) - (func $assembly/index/searchBlock (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -625,7 +634,7 @@ end end ) - (func $assembly/index/growMemory (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -664,9 +673,9 @@ current_memory i32.const 16 i32.shl - call $assembly/index/addMemory + call $~lib/rt/tlsf/addMemory ) - (func $assembly/index/prepareBlock (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -701,7 +710,7 @@ i32.store local.get $0 local.get $1 - call $assembly/index/insertBlock + call $~lib/rt/tlsf/insertBlock else local.get $1 local.get $3 @@ -730,23 +739,23 @@ i32.store end ) - (func $assembly/index/allocateBlock (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 - call $assembly/index/prepareSize + call $~lib/rt/tlsf/prepareSize local.tee $3 - call $assembly/index/searchBlock + call $~lib/rt/tlsf/searchBlock local.tee $2 i32.eqz if local.get $0 local.get $3 - call $assembly/index/growMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $3 - call $assembly/index/searchBlock + call $~lib/rt/tlsf/searchBlock local.set $2 end local.get $2 @@ -760,30 +769,29 @@ i32.store offset=12 local.get $0 local.get $2 - call $assembly/index/removeBlock + call $~lib/rt/tlsf/removeBlock local.get $0 local.get $2 local.get $3 - call $assembly/index/prepareBlock + call $~lib/rt/tlsf/prepareBlock local.get $2 ) - (func $assembly/index/__mm_allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/rt/index/__mm_allocate (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - global.get $assembly/index/ROOT + global.get $~lib/rt/tlsf/ROOT local.tee $1 - i32.eqz - if - call $assembly/index/initialize - local.tee $1 - global.set $assembly/index/ROOT + if (result i32) + local.get $1 + else + call $~lib/rt/tlsf/initializeRoot + global.get $~lib/rt/tlsf/ROOT end - local.get $1 local.get $0 - call $assembly/index/allocateBlock + call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add ) - (func $~lib/memory/memory.copy (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) block $~lib/util/memory/memmove|inlined.0 local.get $0 @@ -957,13 +965,13 @@ end end ) - (func $assembly/index/reallocateBlock (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $2 - call $assembly/index/prepareSize + call $~lib/rt/tlsf/prepareSize local.tee $3 local.get $1 i32.load @@ -975,7 +983,7 @@ local.get $0 local.get $1 local.get $3 - call $assembly/index/prepareBlock + call $~lib/rt/tlsf/prepareBlock local.get $1 local.get $2 i32.store offset=12 @@ -1011,7 +1019,7 @@ if local.get $0 local.get $6 - call $assembly/index/removeBlock + call $~lib/rt/tlsf/removeBlock local.get $1 local.get $4 i32.const 3 @@ -1025,14 +1033,14 @@ local.get $0 local.get $1 local.get $3 - call $assembly/index/prepareBlock + call $~lib/rt/tlsf/prepareBlock local.get $1 return end end local.get $0 local.get $2 - call $assembly/index/allocateBlock + call $~lib/rt/tlsf/allocateBlock local.tee $3 local.get $1 i32.load offset=4 @@ -1056,20 +1064,20 @@ i32.store local.get $0 local.get $1 - call $assembly/index/insertBlock + call $~lib/rt/tlsf/insertBlock local.get $3 ) - (func $assembly/index/__mm_reallocate (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - global.get $assembly/index/ROOT + (func $~lib/rt/index/__mm_reallocate (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/rt/tlsf/ROOT local.get $0 i32.const 16 i32.sub local.get $1 - call $assembly/index/reallocateBlock + call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add ) - (func $assembly/index/freeBlock (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -1078,31 +1086,50 @@ i32.store local.get $0 local.get $1 - call $assembly/index/insertBlock + call $~lib/rt/tlsf/insertBlock ) - (func $assembly/index/__mm_free (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) - global.get $assembly/index/ROOT + (func $~lib/rt/index/__mm_free (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + global.get $~lib/rt/tlsf/ROOT local.get $0 i32.const 16 i32.sub - call $assembly/index/freeBlock + call $~lib/rt/tlsf/freeBlock ) - (func $assembly/index/decrement (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/index/__gc_retain (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + if + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + local.get $0 + i32.load offset=4 + i32.const 1 + i32.add + i32.store offset=4 + end + ) + (func $~lib/rt/index/__gc_release (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.load offset=4 - i32.const 268435455 - i32.and - i32.const 1 - i32.eq - i32.eqz if local.get $0 - i32.load offset=8 - drop + i32.const 16 + i32.sub + local.tee $0 + i32.load offset=4 + i32.const 268435455 + i32.and + i32.const 1 + i32.ne + if + local.get $0 + i32.load offset=8 + drop + end + unreachable end - unreachable ) - (func $assembly/index/markGray (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/pure/markGray (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1122,16 +1149,7 @@ unreachable end ) - (func $assembly/index/scanBlack (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - local.get $0 - i32.load offset=4 - i32.const -1879048193 - i32.and - i32.store offset=4 - unreachable - ) - (func $assembly/index/scan (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/pure/scan (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1148,7 +1166,11 @@ i32.gt_u if local.get $0 - call $assembly/index/scanBlack + local.get $0 + i32.load offset=4 + i32.const -1879048193 + i32.and + i32.store offset=4 else local.get $0 local.get $1 @@ -1157,11 +1179,11 @@ i32.const 536870912 i32.or i32.store offset=4 - unreachable end + unreachable end ) - (func $assembly/index/collectWhite (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/pure/collectWhite (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1179,95 +1201,22 @@ if unreachable end - global.get $assembly/index/ROOT - local.get $0 - call $assembly/index/freeBlock - ) - (func $assembly/index/__rt_visit (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - block $break|0 - block $case4|0 - block $case3|0 - block $case2|0 - block $case1|0 - block $case0|0 - local.get $1 - i32.const 1 - i32.sub - br_table $case0|0 $case1|0 $case2|0 $case3|0 $case4|0 $break|0 - end - local.get $0 - call $assembly/index/decrement - br $break|0 - end - local.get $0 - local.get $0 - i32.load offset=4 - i32.const 1 - i32.sub - i32.store offset=4 - local.get $0 - call $assembly/index/markGray - br $break|0 - end - local.get $0 - call $assembly/index/scan - br $break|0 - end - local.get $0 - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - i32.const 1879048192 - i32.and - if - local.get $0 - call $assembly/index/scanBlack - end - br $break|0 - end - local.get $0 - call $assembly/index/collectWhite - end - ) - (func $assembly/index/__gc_retain (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + global.get $~lib/rt/tlsf/ROOT local.get $0 - if - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - local.get $0 - i32.load offset=4 - i32.const 1 - i32.add - i32.store offset=4 - end + call $~lib/rt/tlsf/freeBlock ) - (func $assembly/index/__gc_release (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - if - local.get $0 - i32.const 16 - i32.sub - call $assembly/index/decrement - end - ) - (func $assembly/index/collectCycles (; 24 ;) (type $FUNCSIG$v) + (func $~lib/rt/pure/collectCycles (; 22 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - global.get $assembly/index/ROOTS + global.get $~lib/rt/pure/ROOTS local.tee $5 local.tee $2 local.set $3 - global.get $assembly/index/CUR + global.get $~lib/rt/pure/CUR local.set $0 loop $repeat|0 block $break|0 @@ -1293,7 +1242,7 @@ select if local.get $4 - call $assembly/index/markGray + call $~lib/rt/pure/markGray local.get $2 local.get $4 i32.store @@ -1312,9 +1261,9 @@ i32.and select if - global.get $assembly/index/ROOT + global.get $~lib/rt/tlsf/ROOT local.get $4 - call $assembly/index/freeBlock + call $~lib/rt/tlsf/freeBlock else local.get $4 local.get $1 @@ -1331,7 +1280,7 @@ end end local.get $2 - global.set $assembly/index/CUR + global.set $~lib/rt/pure/CUR local.get $5 local.set $0 loop $repeat|1 @@ -1342,7 +1291,7 @@ br_if $break|1 local.get $0 i32.load - call $assembly/index/scan + call $~lib/rt/pure/scan local.get $0 i32.const 4 i32.add @@ -1367,7 +1316,7 @@ i32.and i32.store offset=4 local.get $1 - call $assembly/index/collectWhite + call $~lib/rt/pure/collectWhite local.get $0 i32.const 4 i32.add @@ -1376,9 +1325,12 @@ end end local.get $5 - global.set $assembly/index/CUR + global.set $~lib/rt/pure/CUR + ) + (func $~lib/rt/index/__gc_collect (; 23 ;) (type $FUNCSIG$v) + call $~lib/rt/pure/collectCycles ) - (func $null (; 25 ;) (type $FUNCSIG$v) + (func $start (; 24 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/runtime/untouched.wasm b/tests/runtime/untouched.wasm index d5fdae909ee19350115441eb9b248249b6b39d27..b84c7aa06cca01c958b3a4c08a2f317350943de2 100644 GIT binary patch delta 1361 zcmY*YO=w(I6h7zP`{wV?&znq>=67;m-oyrNqSg}ptLADG1q~Ja0YN&M##d=Flb@L= zaUqkPh$57;up;P6a3ftPxUid25y6G16jog$Vp| zgO~Gn++u)4z|?fQ3l?-22;xXs@z*kSt?9m83Cn^y1zyg*;zb-YX;i7~uF zUyA2ZP+6YFUua9ta{QrO9KVjX-~(ub)?YK3HKUgLR5$3BToE^s8tQxTkD%k;Ebh@6 z?>N3g?|HjgTGV^4jxa@|slUe6sF5|H??cfwVE1^aQ@yG_rQi2&tJ&ZVN5y;jStIoXVmA~4n%Gy*h3tX>Klj;Ku8o+YclF^T*JRHhX;ebG z9M^zGG7B0pFY*RUbUHgizv*K$f^!VqHeP#PKp)_O7+>Q0oSGaxnh&RVC4(_WGQ^iA zqaTM*Bt?G%c98zdPrS&%kQGi`$O5dt&d>rMm%f)J9B6{R+Ba2#cl+<>*N^OHpK$Dh z%w9df?w9mqwCo@CZi4+C=na3OR@Peb_UFL7c$-%%g z9xFsYZ@ij|ajho#rPgXn*PP|jSsuF9@Q2(aHa+&rI;_4(7YkEM6>dn^Lc6ZBoov6v zyh+MJo3DAHw8!$`sYEqb`!6ItU|>dM{6itoQ1Pxi4>OD_vbT6Z(iRri57;p#5 zuKL6DQt@G|(ECLrEBYC#7f0x);vpQPKZ;eaqP2dIbHg-U8ZnjlEZC|KM9%>O0g45& zU@#Eu#ufi0j#8#P=Lw_y57%Q6n<}h>~&_>J8qlSNt$FFyC{XW{D?-VYEeeijw)0Y2^9&1aNJ-}96P~| zRZ#r}7YrnC)3J1gOUAx&>Z^GnYyR_DB zH<$V_mCK^92d78AElvN!a3nD}%b>&zv)HYQc?-5^KVmj=79YmTu8l9?756>70r^F)LWUeFbuy?qdmq+nEw<@2+Puvx` zp(u&^4=HO|x`#4<3qEeRGucu6$<1XQ-f=gwUA*f~23M!}xVnzWx9j6nU)-$@3*2(| zf(2x5A@_VDsdz9d?;3V)81h$cBmdfP3v)~i z9)aNo=U7P5xJExyA~LE;#H0)*G^iCZ-YH$b3T0yGf7#Lpv>I0X!`V?k~EUwpjJj!1g)`EVe}BK3Re|RGV>&t z`8i^FuivCBr^HzAtG;$|ex|Ao+P7(Jcny1uI!|#2CJR0K(Kl6+u)woJh+oKoAPmg1 zKo`pB-poHTv5&l{AbXDn3^ZbKB|YwL=1-z_xtP9{dd~frA9K}sA0BWo#Zyu%rB0Bo z=su3e5}guFJZv%o!RB{f21&6*YAvGgXjv`t6!Ti-jiMHLsmod&D|0LnbZ~zthX-{r6vH+7r1^INY(2nR8}jq6w3+R|RBg*Q z1xp#tQu+n2T75u;d>B`ch0L!liLWsDA9-KeqK}}Ibtj@DqG&Hmw-QYro=_wV13m_c zQI9J1Dce?tp|0|58Dfc4aw|TK``uoBOo9 Seh2D^KX=fX!l?VK@YMej^cmIw diff --git a/tests/runtime/untouched.wat b/tests/runtime/untouched.wat index 5b5a1d4c04..e3f7464817 100644 --- a/tests/runtime/untouched.wat +++ b/tests/runtime/untouched.wat @@ -1,34 +1,45 @@ (module + (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00i\00n\00d\00e\00x\00.\00t\00s\00") - (data (i32.const 64) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 56) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00n\00d\00e\00x\00.\00t\00s\00") + (data (i32.const 104) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s\00") + (data (i32.const 152) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $assembly/index/ROOT (mut i32) (i32.const 0)) - (global $assembly/index/ACYCLIC_FLAG i32 (i32.const 0)) - (global $assembly/index/CUR (mut i32) (i32.const 0)) - (global $assembly/index/END (mut i32) (i32.const 0)) - (global $assembly/index/ROOTS (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 108)) + (global $~lib/rt/pure/ACYCLIC_FLAG i32 (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/rt/pure/CUR (mut i32) (i32.const 0)) + (global $~lib/rt/pure/END (mut i32) (i32.const 0)) + (global $~lib/rt/pure/ROOTS (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 196)) (export "memory" (memory $0)) - (export "__mm_allocate" (func $assembly/index/__mm_allocate)) - (export "__mm_reallocate" (func $assembly/index/__mm_reallocate)) - (export "__mm_free" (func $assembly/index/__mm_free)) - (export "__rt_visit" (func $assembly/index/__rt_visit)) - (export "__gc_retain" (func $assembly/index/__gc_retain)) - (export "__gc_release" (func $assembly/index/__gc_release)) - (export "__gc_collect" (func $assembly/index/collectCycles)) - (func $assembly/index/removeBlock (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (export "main" (func $assembly/index/main)) + (export "__mm_allocate" (func $~lib/rt/index/__mm_allocate)) + (export "__mm_reallocate" (func $~lib/rt/index/__mm_reallocate)) + (export "__mm_free" (func $~lib/rt/index/__mm_free)) + (export "__gc_retain" (func $~lib/rt/index/__gc_retain)) + (export "__gc_release" (func $~lib/rt/index/__gc_release)) + (export "__gc_collect" (func $~lib/rt/index/__gc_collect)) + (func $assembly/index/main (; 1 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started + end + ) + (func $~lib/rt/tlsf/removeBlock (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -49,7 +60,7 @@ if i32.const 0 i32.const 24 - i32.const 276 + i32.const 265 i32.const 13 call $~lib/builtins/abort unreachable @@ -74,7 +85,7 @@ if i32.const 0 i32.const 24 - i32.const 278 + i32.const 267 i32.const 13 call $~lib/builtins/abort unreachable @@ -126,7 +137,7 @@ if i32.const 0 i32.const 24 - i32.const 291 + i32.const 280 i32.const 13 call $~lib/builtins/abort unreachable @@ -150,7 +161,7 @@ i32.store offset=16 end local.get $1 - block $assembly/index/GETHEAD|inlined.1 (result i32) + block $~lib/rt/tlsf/GETHEAD|inlined.1 (result i32) local.get $0 local.set $10 local.get $4 @@ -170,7 +181,7 @@ end i32.eq if - block $assembly/index/SETHEAD|inlined.1 + block $~lib/rt/tlsf/SETHEAD|inlined.1 local.get $0 local.set $11 local.get $4 @@ -194,7 +205,7 @@ local.get $7 i32.eqz if - block $assembly/index/GETSL|inlined.0 (result i32) + block $~lib/rt/tlsf/GETSL|inlined.0 (result i32) local.get $0 local.set $9 local.get $4 @@ -207,7 +218,7 @@ i32.load offset=4 end local.set $8 - block $assembly/index/SETSL|inlined.1 + block $~lib/rt/tlsf/SETSL|inlined.1 local.get $0 local.set $11 local.get $4 @@ -246,7 +257,7 @@ end end ) - (func $assembly/index/insertBlock (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -264,7 +275,7 @@ if i32.const 0 i32.const 24 - i32.const 204 + i32.const 193 i32.const 13 call $~lib/builtins/abort unreachable @@ -279,12 +290,12 @@ if i32.const 0 i32.const 24 - i32.const 206 + i32.const 195 i32.const 13 call $~lib/builtins/abort unreachable end - block $assembly/index/GETRIGHT|inlined.0 (result i32) + block $~lib/rt/tlsf/GETRIGHT|inlined.0 (result i32) local.get $1 local.set $3 local.get $3 @@ -326,7 +337,7 @@ if local.get $0 local.get $4 - call $assembly/index/removeBlock + call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 @@ -335,7 +346,7 @@ i32.or local.tee $2 i32.store - block $assembly/index/GETRIGHT|inlined.1 (result i32) + block $~lib/rt/tlsf/GETRIGHT|inlined.1 (result i32) local.get $1 local.set $6 local.get $6 @@ -359,7 +370,7 @@ i32.const 2 i32.and if - block $assembly/index/GETFREELEFT|inlined.0 (result i32) + block $~lib/rt/tlsf/GETFREELEFT|inlined.0 (result i32) local.get $1 local.set $3 local.get $3 @@ -378,7 +389,7 @@ if i32.const 0 i32.const 24 - i32.const 227 + i32.const 216 i32.const 15 call $~lib/builtins/abort unreachable @@ -403,7 +414,7 @@ if local.get $0 local.get $3 - call $assembly/index/removeBlock + call $~lib/rt/tlsf/removeBlock local.get $3 local.get $6 i32.const 3 @@ -441,7 +452,7 @@ if i32.const 0 i32.const 24 - i32.const 242 + i32.const 231 i32.const 13 call $~lib/builtins/abort unreachable @@ -457,7 +468,7 @@ if i32.const 0 i32.const 24 - i32.const 243 + i32.const 232 i32.const 13 call $~lib/builtins/abort unreachable @@ -514,12 +525,12 @@ if i32.const 0 i32.const 24 - i32.const 259 + i32.const 248 i32.const 13 call $~lib/builtins/abort unreachable end - block $assembly/index/GETHEAD|inlined.2 (result i32) + block $~lib/rt/tlsf/GETHEAD|inlined.2 (result i32) local.get $0 local.set $3 local.get $9 @@ -550,7 +561,7 @@ local.get $1 i32.store offset=16 end - block $assembly/index/SETHEAD|inlined.2 + block $~lib/rt/tlsf/SETHEAD|inlined.2 local.get $0 local.set $12 local.get $9 @@ -579,8 +590,8 @@ i32.shl i32.or i32.store - block $assembly/index/SETSL|inlined.2 - block $assembly/index/GETSL|inlined.1 (result i32) + block $~lib/rt/tlsf/SETSL|inlined.2 + block $~lib/rt/tlsf/GETSL|inlined.1 (result i32) local.get $0 local.set $13 local.get $9 @@ -606,7 +617,7 @@ i32.store offset=4 end ) - (func $assembly/index/addMemory (; 3 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/addMemory (; 4 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -637,12 +648,12 @@ if i32.const 0 i32.const 24 - i32.const 385 + i32.const 374 i32.const 4 call $~lib/builtins/abort unreachable end - block $assembly/index/GETTAIL|inlined.0 (result i32) + block $~lib/rt/tlsf/GETTAIL|inlined.0 (result i32) local.get $0 local.set $3 local.get $3 @@ -662,7 +673,7 @@ if i32.const 0 i32.const 24 - i32.const 395 + i32.const 384 i32.const 15 call $~lib/builtins/abort unreachable @@ -693,7 +704,7 @@ if i32.const 0 i32.const 24 - i32.const 407 + i32.const 396 i32.const 4 call $~lib/builtins/abort unreachable @@ -748,7 +759,7 @@ i32.const 2 i32.or i32.store - block $assembly/index/SETTAIL|inlined.1 + block $~lib/rt/tlsf/SETTAIL|inlined.1 local.get $0 local.set $9 local.get $4 @@ -759,10 +770,10 @@ end local.get $0 local.get $8 - call $assembly/index/insertBlock + call $~lib/rt/tlsf/insertBlock i32.const 1 ) - (func $assembly/index/initialize (; 4 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/rt/tlsf/initializeRoot (; 5 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -816,7 +827,7 @@ local.get $3 i32.const 0 i32.store - block $assembly/index/SETTAIL|inlined.0 + block $~lib/rt/tlsf/SETTAIL|inlined.0 local.get $3 local.set $5 i32.const 0 @@ -835,7 +846,7 @@ i32.eqz br_if $break|0 block - block $assembly/index/SETSL|inlined.0 + block $~lib/rt/tlsf/SETSL|inlined.0 local.get $3 local.set $7 local.get $4 @@ -859,7 +870,7 @@ i32.lt_u i32.eqz br_if $break|1 - block $assembly/index/SETHEAD|inlined.0 + block $~lib/rt/tlsf/SETHEAD|inlined.0 local.get $3 local.set $9 local.get $4 @@ -912,11 +923,12 @@ current_memory i32.const 16 i32.shl - call $assembly/index/addMemory + call $~lib/rt/tlsf/addMemory drop local.get $3 + global.set $~lib/rt/tlsf/ROOT ) - (func $assembly/index/prepareSize (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/prepareSize (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -925,7 +937,7 @@ if i32.const 0 i32.const 24 - i32.const 466 + i32.const 436 i32.const 29 call $~lib/builtins/abort unreachable @@ -945,7 +957,7 @@ i32.gt_u select ) - (func $assembly/index/searchBlock (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1019,12 +1031,12 @@ if i32.const 0 i32.const 24 - i32.const 337 + i32.const 326 i32.const 13 call $~lib/builtins/abort unreachable end - block $assembly/index/GETSL|inlined.2 (result i32) + block $~lib/rt/tlsf/GETSL|inlined.2 (result i32) local.get $0 local.set $5 local.get $2 @@ -1066,7 +1078,7 @@ local.get $4 i32.ctz local.set $2 - block $assembly/index/GETSL|inlined.3 (result i32) + block $~lib/rt/tlsf/GETSL|inlined.3 (result i32) local.get $0 local.set $8 local.get $2 @@ -1084,12 +1096,12 @@ if i32.const 0 i32.const 24 - i32.const 350 + i32.const 339 i32.const 17 call $~lib/builtins/abort unreachable end - block $assembly/index/GETHEAD|inlined.3 (result i32) + block $~lib/rt/tlsf/GETHEAD|inlined.3 (result i32) local.get $0 local.set $9 local.get $2 @@ -1111,7 +1123,7 @@ local.set $7 end else - block $assembly/index/GETHEAD|inlined.4 (result i32) + block $~lib/rt/tlsf/GETHEAD|inlined.4 (result i32) local.get $0 local.set $8 local.get $2 @@ -1134,7 +1146,7 @@ end local.get $7 ) - (func $assembly/index/growMemory (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1184,10 +1196,10 @@ local.get $7 i32.const 16 i32.shl - call $assembly/index/addMemory + call $~lib/rt/tlsf/addMemory drop ) - (func $assembly/index/prepareBlock (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1202,7 +1214,7 @@ if i32.const 0 i32.const 24 - i32.const 364 + i32.const 353 i32.const 13 call $~lib/builtins/abort unreachable @@ -1243,7 +1255,7 @@ i32.store local.get $0 local.get $5 - call $assembly/index/insertBlock + call $~lib/rt/tlsf/insertBlock else local.get $1 local.get $3 @@ -1252,7 +1264,7 @@ i32.xor i32.and i32.store - block $assembly/index/GETRIGHT|inlined.3 (result i32) + block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) local.get $1 local.set $5 local.get $5 @@ -1266,7 +1278,7 @@ i32.and i32.add end - block $assembly/index/GETRIGHT|inlined.2 (result i32) + block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $1 local.set $5 local.get $5 @@ -1288,32 +1300,32 @@ i32.store end ) - (func $assembly/index/allocateBlock (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 - call $assembly/index/prepareSize + call $~lib/rt/tlsf/prepareSize local.set $2 local.get $0 local.get $2 - call $assembly/index/searchBlock + call $~lib/rt/tlsf/searchBlock local.set $3 local.get $3 i32.eqz if local.get $0 local.get $2 - call $assembly/index/growMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $2 - call $assembly/index/searchBlock + call $~lib/rt/tlsf/searchBlock local.set $3 local.get $3 i32.eqz if i32.const 0 i32.const 24 - i32.const 477 + i32.const 466 i32.const 15 call $~lib/builtins/abort unreachable @@ -1331,7 +1343,7 @@ if i32.const 0 i32.const 24 - i32.const 479 + i32.const 468 i32.const 13 call $~lib/builtins/abort unreachable @@ -1347,31 +1359,31 @@ i32.store offset=12 local.get $0 local.get $3 - call $assembly/index/removeBlock + call $~lib/rt/tlsf/removeBlock local.get $0 local.get $3 local.get $2 - call $assembly/index/prepareBlock + call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $assembly/index/__mm_allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/rt/index/__mm_allocate (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - global.get $assembly/index/ROOT + global.get $~lib/rt/tlsf/ROOT local.set $1 local.get $1 i32.eqz if - call $assembly/index/initialize - local.tee $1 - global.set $assembly/index/ROOT + call $~lib/rt/tlsf/initializeRoot + global.get $~lib/rt/tlsf/ROOT + local.set $1 end local.get $1 local.get $0 - call $assembly/index/allocateBlock + call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add ) - (func $~lib/memory/memory.copy (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1580,7 +1592,7 @@ end end ) - (func $assembly/index/reallocateBlock (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1588,7 +1600,7 @@ (local $7 i32) (local $8 i32) local.get $2 - call $assembly/index/prepareSize + call $~lib/rt/tlsf/prepareSize local.set $3 local.get $1 i32.load @@ -1601,7 +1613,7 @@ if i32.const 0 i32.const 24 - i32.const 492 + i32.const 481 i32.const 13 call $~lib/builtins/abort unreachable @@ -1617,14 +1629,14 @@ local.get $0 local.get $1 local.get $3 - call $assembly/index/prepareBlock + call $~lib/rt/tlsf/prepareBlock local.get $1 local.get $2 i32.store offset=12 local.get $1 return end - block $assembly/index/GETRIGHT|inlined.4 (result i32) + block $~lib/rt/tlsf/GETRIGHT|inlined.4 (result i32) local.get $1 local.set $5 local.get $5 @@ -1666,7 +1678,7 @@ if local.get $0 local.get $6 - call $assembly/index/removeBlock + call $~lib/rt/tlsf/removeBlock local.get $1 local.get $4 i32.const 3 @@ -1680,14 +1692,14 @@ local.get $0 local.get $1 local.get $3 - call $assembly/index/prepareBlock + call $~lib/rt/tlsf/prepareBlock local.get $1 return end end local.get $0 local.get $2 - call $assembly/index/allocateBlock + call $~lib/rt/tlsf/allocateBlock local.set $8 local.get $8 local.get $1 @@ -1712,16 +1724,16 @@ i32.store local.get $0 local.get $1 - call $assembly/index/insertBlock + call $~lib/rt/tlsf/insertBlock local.get $8 ) - (func $assembly/index/__mm_reallocate (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - global.get $assembly/index/ROOT + (func $~lib/rt/index/__mm_reallocate (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/rt/tlsf/ROOT i32.eqz if i32.const 0 - i32.const 24 - i32.const 548 + i32.const 72 + i32.const 21 i32.const 13 call $~lib/builtins/abort unreachable @@ -1740,22 +1752,22 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 549 + i32.const 72 + i32.const 22 i32.const 2 call $~lib/builtins/abort unreachable end - global.get $assembly/index/ROOT + global.get $~lib/rt/tlsf/ROOT local.get $0 i32.const 16 i32.sub local.get $1 - call $assembly/index/reallocateBlock + call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add ) - (func $assembly/index/freeBlock (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 i32.load @@ -1768,7 +1780,7 @@ if i32.const 0 i32.const 24 - i32.const 530 + i32.const 519 i32.const 2 call $~lib/builtins/abort unreachable @@ -1780,15 +1792,15 @@ i32.store local.get $0 local.get $1 - call $assembly/index/insertBlock + call $~lib/rt/tlsf/insertBlock ) - (func $assembly/index/__mm_free (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) - global.get $assembly/index/ROOT + (func $~lib/rt/index/__mm_free (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + global.get $~lib/rt/tlsf/ROOT i32.eqz if i32.const 0 - i32.const 24 - i32.const 556 + i32.const 72 + i32.const 29 i32.const 13 call $~lib/builtins/abort unreachable @@ -1807,42 +1819,84 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 557 + i32.const 72 + i32.const 30 i32.const 2 call $~lib/builtins/abort unreachable end - global.get $assembly/index/ROOT + global.get $~lib/rt/tlsf/ROOT local.get $0 i32.const 16 i32.sub - call $assembly/index/freeBlock + call $~lib/rt/tlsf/freeBlock + ) + (func $~lib/rt/pure/increment (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + i32.const 268435455 + i32.const -1 + i32.xor + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const 268435455 + i32.const -1 + i32.xor + i32.and + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 105 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + ) + (func $~lib/rt/index/__gc_retain (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/increment + end ) - (func $assembly/index/__rt_visit_members (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/rt/pure/__rt_visit_members (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) unreachable ) - (func $assembly/index/__rt_flags (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/rt/pure/__rt_flags (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) unreachable ) - (func $~lib/memory/memory.allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 - i32.const 80 + i32.const 168 i32.const 61 i32.const 9 call $~lib/builtins/abort unreachable ) - (func $assembly/index/growRoots (; 19 ;) (type $FUNCSIG$v) + (func $~lib/rt/pure/growRoots (; 22 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - global.get $assembly/index/ROOTS + global.get $~lib/rt/pure/ROOTS local.set $0 - global.get $assembly/index/CUR + global.get $~lib/rt/pure/CUR local.get $0 i32.sub local.set $1 @@ -1867,26 +1921,26 @@ local.get $1 call $~lib/memory/memory.copy local.get $5 - global.set $assembly/index/ROOTS + global.set $~lib/rt/pure/ROOTS local.get $5 local.get $1 i32.add - global.set $assembly/index/CUR + global.set $~lib/rt/pure/CUR local.get $5 local.get $4 i32.add - global.set $assembly/index/END + global.set $~lib/rt/pure/END ) - (func $assembly/index/appendRoot (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/pure/appendRoot (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) - global.get $assembly/index/CUR + global.get $~lib/rt/pure/CUR local.set $1 local.get $1 - global.get $assembly/index/END + global.get $~lib/rt/pure/END i32.ge_u if - call $assembly/index/growRoots - global.get $assembly/index/CUR + call $~lib/rt/pure/growRoots + global.get $~lib/rt/pure/CUR local.set $1 end local.get $1 @@ -1895,9 +1949,9 @@ local.get $1 i32.const 1 i32.add - global.set $assembly/index/CUR + global.set $~lib/rt/pure/CUR ) - (func $assembly/index/decrement (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/pure/decrement (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1913,15 +1967,15 @@ if local.get $0 i32.const 1 - call $assembly/index/__rt_visit_members + call $~lib/rt/pure/__rt_visit_members local.get $1 i32.const -2147483648 i32.and i32.eqz if - global.get $assembly/index/ROOT + global.get $~lib/rt/tlsf/ROOT local.get $0 - call $assembly/index/freeBlock + call $~lib/rt/tlsf/freeBlock else local.get $0 i32.const -2147483648 @@ -1938,16 +1992,16 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 678 + i32.const 120 + i32.const 121 i32.const 15 call $~lib/builtins/abort unreachable end local.get $0 i32.load offset=8 - call $assembly/index/__rt_flags - global.get $assembly/index/ACYCLIC_FLAG + call $~lib/rt/pure/__rt_flags + global.get $~lib/rt/pure/ACYCLIC_FLAG i32.and i32.eqz if @@ -1966,7 +2020,7 @@ i32.eqz if local.get $0 - call $assembly/index/appendRoot + call $~lib/rt/pure/appendRoot end else local.get $0 @@ -1983,7 +2037,16 @@ end end ) - (func $assembly/index/markGray (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/index/__gc_release (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/rt/pure/markGray (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2005,10 +2068,10 @@ i32.store offset=4 local.get $0 i32.const 2 - call $assembly/index/__rt_visit_members + call $~lib/rt/pure/__rt_visit_members end ) - (func $assembly/index/scanBlack (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/pure/scanBlack (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.load offset=4 @@ -2021,9 +2084,9 @@ i32.store offset=4 local.get $0 i32.const 4 - call $assembly/index/__rt_visit_members + call $~lib/rt/pure/__rt_visit_members ) - (func $assembly/index/scan (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/pure/scan (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2041,7 +2104,7 @@ i32.gt_u if local.get $0 - call $assembly/index/scanBlack + call $~lib/rt/pure/scanBlack else local.get $0 local.get $1 @@ -2054,11 +2117,11 @@ i32.store offset=4 local.get $0 i32.const 3 - call $assembly/index/__rt_visit_members + call $~lib/rt/pure/__rt_visit_members end end ) - (func $assembly/index/collectWhite (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/pure/collectWhite (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2079,214 +2142,20 @@ if local.get $0 i32.const 5 - call $assembly/index/__rt_visit_members - end - global.get $assembly/index/ROOT - local.get $0 - call $assembly/index/freeBlock - ) - (func $assembly/index/__rt_visit (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - block $break|0 - block $case5|0 - block $case4|0 - block $case3|0 - block $case2|0 - block $case1|0 - block $case0|0 - local.get $1 - local.set $2 - local.get $2 - i32.const 1 - i32.eq - br_if $case0|0 - local.get $2 - i32.const 2 - i32.eq - br_if $case1|0 - local.get $2 - i32.const 3 - i32.eq - br_if $case2|0 - local.get $2 - i32.const 4 - i32.eq - br_if $case3|0 - local.get $2 - i32.const 5 - i32.eq - br_if $case4|0 - br $case5|0 - end - block - local.get $0 - call $assembly/index/decrement - br $break|0 - unreachable - end - unreachable - end - block - local.get $0 - i32.load offset=4 - i32.const 268435455 - i32.and - i32.const 0 - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 633 - i32.const 17 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $0 - i32.load offset=4 - i32.const 1 - i32.sub - i32.store offset=4 - local.get $0 - call $assembly/index/markGray - br $break|0 - unreachable - end - unreachable - end - block - local.get $0 - call $assembly/index/scan - br $break|0 - unreachable - end - unreachable - end - block - local.get $0 - i32.load offset=4 - local.set $2 - local.get $2 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - i32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 644 - i32.const 6 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $2 - i32.const 1879048192 - i32.and - i32.const 0 - i32.ne - if - local.get $0 - call $assembly/index/scanBlack - end - br $break|0 - unreachable - end - unreachable - end - block - local.get $0 - call $assembly/index/collectWhite - br $break|0 - unreachable - end - unreachable - end - i32.const 0 - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 655 - i32.const 24 - call $~lib/builtins/abort - unreachable - end - end - ) - (func $assembly/index/increment (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - i32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 662 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - ) - (func $assembly/index/__gc_retain (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - if - local.get $0 - i32.const 16 - i32.sub - call $assembly/index/increment + call $~lib/rt/pure/__rt_visit_members end - ) - (func $assembly/index/__gc_release (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + global.get $~lib/rt/tlsf/ROOT local.get $0 - if - local.get $0 - i32.const 16 - i32.sub - call $assembly/index/decrement - end + call $~lib/rt/tlsf/freeBlock ) - (func $assembly/index/collectCycles (; 30 ;) (type $FUNCSIG$v) + (func $~lib/rt/pure/collectCycles (; 30 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - global.get $assembly/index/ROOTS + global.get $~lib/rt/pure/ROOTS local.set $0 local.get $0 local.set $1 @@ -2294,7 +2163,7 @@ block local.get $1 local.set $2 - global.get $assembly/index/CUR + global.get $~lib/rt/pure/CUR local.set $3 end loop $repeat|0 @@ -2326,7 +2195,7 @@ end if local.get $4 - call $assembly/index/markGray + call $~lib/rt/pure/markGray local.get $1 local.get $4 i32.store @@ -2349,9 +2218,9 @@ i32.const 0 end if - global.get $assembly/index/ROOT + global.get $~lib/rt/tlsf/ROOT local.get $4 - call $assembly/index/freeBlock + call $~lib/rt/tlsf/freeBlock else local.get $4 local.get $5 @@ -2373,7 +2242,7 @@ unreachable end local.get $1 - global.set $assembly/index/CUR + global.set $~lib/rt/pure/CUR block $break|1 local.get $0 local.set $3 @@ -2385,7 +2254,7 @@ br_if $break|1 local.get $3 i32.load - call $assembly/index/scan + call $~lib/rt/pure/scan local.get $3 i32.const 4 i32.add @@ -2417,7 +2286,7 @@ i32.and i32.store offset=4 local.get $2 - call $assembly/index/collectWhite + call $~lib/rt/pure/collectWhite end local.get $3 i32.const 4 @@ -2429,8 +2298,13 @@ unreachable end local.get $0 - global.set $assembly/index/CUR + global.set $~lib/rt/pure/CUR + ) + (func $~lib/rt/index/__gc_collect (; 31 ;) (type $FUNCSIG$v) + call $~lib/rt/pure/collectCycles + ) + (func $start (; 32 ;) (type $FUNCSIG$v) ) - (func $null (; 31 ;) (type $FUNCSIG$v) + (func $null (; 33 ;) (type $FUNCSIG$v) ) ) From 18c3f0c5554936df3d76dec4080066d78b1e1fb8 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 18 Apr 2019 12:53:48 +0200 Subject: [PATCH 116/119] unify, stub impl --- std/assembly/rt/README.md | 27 ++++ std/assembly/rt/common.ts | 26 ++++ std/assembly/rt/index.ts | 30 +++-- std/assembly/rt/stub.ts | 77 +++++++++++ std/assembly/rt/tlsf.ts | 13 +- .../allocators/{asrt => rt}/assembly/index.ts | 4 +- .../{asrt => rt}/assembly/tsconfig.json | 0 tests/allocators/{asrt => rt}/optimized.wat | 22 ++- tests/allocators/{asrt => rt}/package.json | 0 tests/allocators/{asrt => rt}/untouched.wat | 69 +++++----- tests/runtime/assembly/index.ts | 13 +- tests/runtime/index.html | 10 +- tests/runtime/optimized.wat | 70 +++++++--- tests/runtime/untouched.wasm | Bin 4567 -> 4786 bytes tests/runtime/untouched.wat | 126 +++++++++++------- 15 files changed, 346 insertions(+), 141 deletions(-) create mode 100644 std/assembly/rt/stub.ts rename tests/allocators/{asrt => rt}/assembly/index.ts (84%) rename tests/allocators/{asrt => rt}/assembly/tsconfig.json (100%) rename tests/allocators/{asrt => rt}/optimized.wat (96%) rename tests/allocators/{asrt => rt}/package.json (100%) rename tests/allocators/{asrt => rt}/untouched.wat (97%) diff --git a/std/assembly/rt/README.md b/std/assembly/rt/README.md index c930576e76..1fb78f5761 100644 --- a/std/assembly/rt/README.md +++ b/std/assembly/rt/README.md @@ -4,3 +4,30 @@ The AssemblyScript Runtime The runtime provides the functionality necessary to dynamically allocate and deallocate memory of objects, arrays and buffers, as well as keep track of references that are no longer used. It is based on [the TLSF memory manager](./tlsf.ts) and [a pure reference counting garbage collector](./pure.ts). + +Interface +--------- + +* **__rt_allocate**(size: `usize`, id: `u32` = 0): `usize`
+ Dynamically allocates a chunk of memory of at least the specified size and returns its address. + Alignment is guaranteed to be 16 bytes to fit up to v128 values naturally. + +* **__rt_free**(ref: `usize`): `void`
+ Frees a dynamically allocated chunk of memory by its address. + +* **__rt_retain**(ref: `usize`): `void`
+ Retains a reference. + +* **__rt_release**(ref: `usize`): `void`
+ Releases a reference. + +* **__rt_collect**(): `void`
+ Forces a full garbage collection cycle. + +* **__rt_typeinfo**(id: `u32`): `void`
+ Obtains the runtime type information for objects of the kind represented by the specified id. + +Stub +---- + +The fully functional yet minimal [stub implementation](./stub.ts) provides dynamic memory allocation only but doesn't include sophisticated support to deallocate objects. Useful for prototyping or very short-lived programs with hardly any memory footprint. diff --git a/std/assembly/rt/common.ts b/std/assembly/rt/common.ts index e806263553..97af07d6b8 100644 --- a/std/assembly/rt/common.ts +++ b/std/assembly/rt/common.ts @@ -11,3 +11,29 @@ // @ts-ignore: decorator @inline export const DEBUG = true; + +/** Common block structure. */ +@unmanaged export class CommonBlock { + /** Memory manager info. */ + mmInfo: usize; // WASM64 might need adaption + /** Garbage collector info. */ + gcInfo: u32; + /** Runtime class id. */ + rtId: u32; + /** Runtime object size. */ + rtSize: u32; +} + +/////////////////////////////////// Type information interface //////////////////////////////////// + +import { RTTI_BASE } from "../runtime"; +import { RTTIData } from "../common/rtti"; + +// @ts-ignore: decorator +@global @unsafe +function __rt_typeinfo(id: u32): u32 { + var ptr: usize = RTTI_BASE; + return !id || id > load(ptr) + ? unreachable() + : changetype(ptr + id * offsetof()).flags; +} diff --git a/std/assembly/rt/index.ts b/std/assembly/rt/index.ts index cdd952445b..a37cf8876b 100644 --- a/std/assembly/rt/index.ts +++ b/std/assembly/rt/index.ts @@ -1,52 +1,56 @@ import { AL_MASK, DEBUG } from "./common"; -import { ROOT, Block, BLOCK_OVERHEAD, initializeRoot, allocateBlock, reallocateBlock, freeBlock } from "./tlsf"; -import { increment, decrement, collectCycles } from "./pure"; //////////////////////////////////// Memory manager interface ///////////////////////////////////// +import { ROOT, Block, BLOCK_OVERHEAD, initializeRoot, allocateBlock, reallocateBlock, freeBlock } from "./tlsf"; + // @ts-ignore: decorator @global @unsafe -function __mm_allocate(size: usize): usize { +function __rt_allocate(size: usize, id: u32): usize { var root = ROOT; if (!root) { initializeRoot(); root = ROOT; } - return changetype(allocateBlock(root, size)) + BLOCK_OVERHEAD; + var block = allocateBlock(root, size); + block.rtId = id; + return changetype(block) + BLOCK_OVERHEAD; } // @ts-ignore: decorator @global @unsafe -function __mm_reallocate(data: usize, size: usize): usize { +function __rt_reallocate(ref: usize, size: usize): usize { if (DEBUG) assert(ROOT); // must be initialized - assert(data != 0 && !(data & AL_MASK)); // must exist and be aligned - return changetype(reallocateBlock(ROOT, changetype(data - BLOCK_OVERHEAD), size)) + BLOCK_OVERHEAD; + assert(ref != 0 && !(ref & AL_MASK)); // must exist and be aligned + return changetype(reallocateBlock(ROOT, changetype(ref - BLOCK_OVERHEAD), size)) + BLOCK_OVERHEAD; } // @ts-ignore: decorator @global @unsafe -function __mm_free(data: usize): void { +function __rt_free(ref: usize): void { if (DEBUG) assert(ROOT); // must be initialized - assert(data != 0 && !(data & AL_MASK)); // must exist and be aligned - freeBlock(ROOT, changetype(data - BLOCK_OVERHEAD)); + assert(ref != 0 && !(ref & AL_MASK)); // must exist and be aligned + freeBlock(ROOT, changetype(ref - BLOCK_OVERHEAD)); } /////////////////////////////////// Garbage collector interface /////////////////////////////////// +import { increment, decrement, collectCycles } from "./pure"; + // @ts-ignore: decorator @global @unsafe -function __gc_retain(ref: usize): void { +function __rt_retain(ref: usize): void { if (ref) increment(changetype(ref - BLOCK_OVERHEAD)); } // @ts-ignore: decorator @global @unsafe -function __gc_release(ref: usize): void { +function __rt_release(ref: usize): void { if (ref) decrement(changetype(ref - BLOCK_OVERHEAD)); } // @ts-ignore: decorator @global @unsafe -function __gc_collect(): void { +function __rt_collect(): void { collectCycles(); } diff --git a/std/assembly/rt/stub.ts b/std/assembly/rt/stub.ts new file mode 100644 index 0000000000..da02be7752 --- /dev/null +++ b/std/assembly/rt/stub.ts @@ -0,0 +1,77 @@ +import { AL_MASK, CommonBlock } from "./common"; + +// @ts-ignore: decorator +@inline +const BLOCK_OVERHEAD = offsetof(); + +// @ts-ignore: decorator +@inline +const BLOCK_MAXSIZE: usize = (1 << 30) - BLOCK_OVERHEAD; // match TLSF + +// @ts-ignore: decorator +@lazy +var startOffset: usize = (HEAP_BASE + AL_MASK) & ~AL_MASK; + +// @ts-ignore: decorator +@lazy +var offset: usize = startOffset; + +//////////////////////////////////// Memory manager interface ///////////////////////////////////// + +// @ts-ignore: decorator +@unsafe @global +function __rt_allocate(size: usize, id: u32): usize { + if (size > BLOCK_MAXSIZE) unreachable(); + var ptr = offset + BLOCK_OVERHEAD; + var newPtr = (ptr + max(size, 1) + AL_MASK) & ~AL_MASK; + var pagesBefore = memory.size(); + if (newPtr > pagesBefore << 16) { + let pagesNeeded = ((newPtr - ptr + 0xffff) & ~0xffff) >>> 16; + let pagesWanted = max(pagesBefore, pagesNeeded); // double memory + if (memory.grow(pagesWanted) < 0) { + if (memory.grow(pagesNeeded) < 0) unreachable(); // out of memory + } + } + offset = newPtr; + var block = changetype(ptr - BLOCK_OVERHEAD); + block.rtId = id; + block.rtSize = size; + return ptr; +} + +// @ts-ignore: decorator +@unsafe @global +function __rt_reallocate(ref: usize, size: usize): usize { + var block = changetype(ref - BLOCK_OVERHEAD); + var newRef = __rt_allocate(size, block.rtId); + memory.copy(newRef, ref, block.rtSize); + return newRef; +} + +// @ts-ignore: decorator +@unsafe @global +function __rt_free(ref: usize): void { +} + +// @ts-ignore: decorator +@unsafe @global +function __rt_reset(): void { // special + offset = startOffset; +} + +/////////////////////////////////// Garbage collector interface /////////////////////////////////// + +// @ts-ignore: decorator +@global @unsafe +function __rt_retain(ref: usize): void { +} + +// @ts-ignore: decorator +@global @unsafe +function __rt_release(ref: usize): void { +} + +// @ts-ignore: decorator +@global @unsafe +function __rt_collect(): void { +} diff --git a/std/assembly/rt/tlsf.ts b/std/assembly/rt/tlsf.ts index 8b9bfbeaac..518908a271 100644 --- a/std/assembly/rt/tlsf.ts +++ b/std/assembly/rt/tlsf.ts @@ -1,4 +1,4 @@ -import { AL_BITS, AL_SIZE, AL_MASK, DEBUG } from "./common"; +import { AL_BITS, AL_SIZE, AL_MASK, DEBUG, CommonBlock } from "./common"; /////////////////////// The TLSF (Two-Level Segregate Fit) memory allocator /////////////////////// // see: http://www.gii.upv.es/tlsf/ @@ -69,16 +69,7 @@ import { AL_BITS, AL_SIZE, AL_MASK, DEBUG } from "./common"; // │ if free: back ▲ │ ◄─┘ // └───────────────────────────────────────────────────────────────┘ payload ┘ >= MIN SIZE // F: FREE, L: LEFTFREE -@unmanaged export class Block { - - /** Memory manager info. */ - mmInfo: usize; // WASM64 might need adaption - /** Garbage collector info. */ - gcInfo: u32; - /** Runtime class id. */ - rtId: u32; - /** Runtime object size. */ - rtSize: u32; +@unmanaged export class Block extends CommonBlock { /** Previous free block, if any. Only valid if free, otherwise part of payload. */ prev: Block | null; diff --git a/tests/allocators/asrt/assembly/index.ts b/tests/allocators/rt/assembly/index.ts similarity index 84% rename from tests/allocators/asrt/assembly/index.ts rename to tests/allocators/rt/assembly/index.ts index f2af0bf0cd..07ddc5a54e 100644 --- a/tests/allocators/asrt/assembly/index.ts +++ b/tests/allocators/rt/assembly/index.ts @@ -3,10 +3,10 @@ import { memory as builtin_memory } from "memory"; export namespace memory { export function allocate(size: usize): usize { - return __mm_allocate(size); + return __rt_allocate(size, 0); } export function free(ptr: usize): void { - __mm_free(ptr); + __rt_free(ptr); } export function fill(dst: usize, c: u8, n: usize): void { builtin_memory.fill(dst, c, n); diff --git a/tests/allocators/asrt/assembly/tsconfig.json b/tests/allocators/rt/assembly/tsconfig.json similarity index 100% rename from tests/allocators/asrt/assembly/tsconfig.json rename to tests/allocators/rt/assembly/tsconfig.json diff --git a/tests/allocators/asrt/optimized.wat b/tests/allocators/rt/optimized.wat similarity index 96% rename from tests/allocators/asrt/optimized.wat rename to tests/allocators/rt/optimized.wat index 40afeeef71..7b5eb5cee9 100644 --- a/tests/allocators/asrt/optimized.wat +++ b/tests/allocators/rt/optimized.wat @@ -1,8 +1,8 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) @@ -497,7 +497,7 @@ if i32.const 0 i32.const 24 - i32.const 436 + i32.const 427 i32.const 29 call $~lib/builtins/abort unreachable @@ -758,7 +758,7 @@ call $~lib/rt/tlsf/prepareBlock local.get $2 ) - (func $assembly/index/memory.allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/rt/index/__rt_allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) global.get $~lib/rt/tlsf/ROOT local.tee $1 @@ -770,10 +770,18 @@ end local.get $0 call $~lib/rt/tlsf/allocateBlock + local.tee $0 + i32.const 0 + i32.store offset=8 + local.get $0 i32.const 16 i32.add ) - (func $assembly/index/memory.free (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/memory.allocate (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/rt/index/__rt_allocate + ) + (func $assembly/index/memory.free (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 16 i32.sub @@ -787,7 +795,7 @@ local.get $0 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/memory/memory.fill (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i64) (local $4 i32) block $~lib/util/memory/memset|inlined.0 @@ -1017,13 +1025,13 @@ end end ) - (func $assembly/index/memory.fill (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $assembly/index/memory.fill (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 local.get $2 call $~lib/memory/memory.fill ) - (func $null (; 14 ;) (type $FUNCSIG$v) + (func $null (; 15 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/allocators/asrt/package.json b/tests/allocators/rt/package.json similarity index 100% rename from tests/allocators/asrt/package.json rename to tests/allocators/rt/package.json diff --git a/tests/allocators/asrt/untouched.wat b/tests/allocators/rt/untouched.wat similarity index 97% rename from tests/allocators/asrt/untouched.wat rename to tests/allocators/rt/untouched.wat index 5e0390d1bf..1667756b2f 100644 --- a/tests/allocators/asrt/untouched.wat +++ b/tests/allocators/rt/untouched.wat @@ -1,10 +1,10 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -41,7 +41,7 @@ if i32.const 0 i32.const 24 - i32.const 265 + i32.const 256 i32.const 13 call $~lib/builtins/abort unreachable @@ -66,7 +66,7 @@ if i32.const 0 i32.const 24 - i32.const 267 + i32.const 258 i32.const 13 call $~lib/builtins/abort unreachable @@ -118,7 +118,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 271 i32.const 13 call $~lib/builtins/abort unreachable @@ -256,7 +256,7 @@ if i32.const 0 i32.const 24 - i32.const 193 + i32.const 184 i32.const 13 call $~lib/builtins/abort unreachable @@ -271,7 +271,7 @@ if i32.const 0 i32.const 24 - i32.const 195 + i32.const 186 i32.const 13 call $~lib/builtins/abort unreachable @@ -370,7 +370,7 @@ if i32.const 0 i32.const 24 - i32.const 216 + i32.const 207 i32.const 15 call $~lib/builtins/abort unreachable @@ -433,7 +433,7 @@ if i32.const 0 i32.const 24 - i32.const 231 + i32.const 222 i32.const 13 call $~lib/builtins/abort unreachable @@ -449,7 +449,7 @@ if i32.const 0 i32.const 24 - i32.const 232 + i32.const 223 i32.const 13 call $~lib/builtins/abort unreachable @@ -506,7 +506,7 @@ if i32.const 0 i32.const 24 - i32.const 248 + i32.const 239 i32.const 13 call $~lib/builtins/abort unreachable @@ -629,7 +629,7 @@ if i32.const 0 i32.const 24 - i32.const 374 + i32.const 365 i32.const 4 call $~lib/builtins/abort unreachable @@ -654,7 +654,7 @@ if i32.const 0 i32.const 24 - i32.const 384 + i32.const 375 i32.const 15 call $~lib/builtins/abort unreachable @@ -685,7 +685,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 387 i32.const 4 call $~lib/builtins/abort unreachable @@ -918,7 +918,7 @@ if i32.const 0 i32.const 24 - i32.const 436 + i32.const 427 i32.const 29 call $~lib/builtins/abort unreachable @@ -1012,7 +1012,7 @@ if i32.const 0 i32.const 24 - i32.const 326 + i32.const 317 i32.const 13 call $~lib/builtins/abort unreachable @@ -1077,7 +1077,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 330 i32.const 17 call $~lib/builtins/abort unreachable @@ -1195,7 +1195,7 @@ if i32.const 0 i32.const 24 - i32.const 353 + i32.const 344 i32.const 13 call $~lib/builtins/abort unreachable @@ -1306,7 +1306,7 @@ if i32.const 0 i32.const 24 - i32.const 466 + i32.const 457 i32.const 15 call $~lib/builtins/abort unreachable @@ -1324,7 +1324,7 @@ if i32.const 0 i32.const 24 - i32.const 468 + i32.const 459 i32.const 13 call $~lib/builtins/abort unreachable @@ -1347,26 +1347,33 @@ call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $~lib/rt/index/__mm_allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/index/__rt_allocate (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/ROOT - local.set $1 - local.get $1 + local.set $2 + local.get $2 i32.eqz if call $~lib/rt/tlsf/initializeRoot global.get $~lib/rt/tlsf/ROOT - local.set $1 + local.set $2 end - local.get $1 + local.get $2 local.get $0 call $~lib/rt/tlsf/allocateBlock + local.set $3 + local.get $3 + local.get $1 + i32.store offset=8 + local.get $3 i32.const 16 i32.add ) (func $assembly/index/memory.allocate (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/rt/index/__mm_allocate + i32.const 0 + call $~lib/rt/index/__rt_allocate ) (func $~lib/rt/tlsf/freeBlock (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) @@ -1381,7 +1388,7 @@ if i32.const 0 i32.const 24 - i32.const 519 + i32.const 510 i32.const 2 call $~lib/builtins/abort unreachable @@ -1395,13 +1402,13 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/index/__mm_free (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/index/__rt_free (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if i32.const 0 i32.const 72 - i32.const 29 + i32.const 31 i32.const 13 call $~lib/builtins/abort unreachable @@ -1421,7 +1428,7 @@ if i32.const 0 i32.const 72 - i32.const 30 + i32.const 32 i32.const 2 call $~lib/builtins/abort unreachable @@ -1434,7 +1441,7 @@ ) (func $assembly/index/memory.free (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $~lib/rt/index/__mm_free + call $~lib/rt/index/__rt_free ) (func $~lib/memory/memory.fill (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) diff --git a/tests/runtime/assembly/index.ts b/tests/runtime/assembly/index.ts index e10336b783..18f2db537e 100644 --- a/tests/runtime/assembly/index.ts +++ b/tests/runtime/assembly/index.ts @@ -1,12 +1,13 @@ import "rt"; export { - __mm_allocate, - __mm_reallocate, - __mm_free, - __gc_retain, - __gc_release, - __gc_collect + __rt_allocate, + __rt_reallocate, + __rt_free, + __rt_retain, + __rt_release, + __rt_collect, + __rt_typeinfo }; @start export function main(): void {} diff --git a/tests/runtime/index.html b/tests/runtime/index.html index d029c22352..f7f8b46c0c 100644 --- a/tests/runtime/index.html +++ b/tests/runtime/index.html @@ -28,8 +28,8 @@ ).then(result => { exports = result.instance.exports; U32 = new Uint32Array(exports.memory.buffer); - var first = exports.__mm_allocate(255); - exports.__mm_free(first); + var first = exports.__rt_allocate(255); + exports.__rt_free(first); ROOT = first - 17; while (!U32[ROOT >> 2]) --ROOT; // find tail ROOT -= (1 + FL_BITS + HL_SIZE) << 2; @@ -113,7 +113,7 @@ } function allocate(size) { - var ptr = exports.__mm_allocate(size); + var ptr = exports.__rt_allocate(size); if (!ptr) { alert("should not happen"); return; @@ -127,7 +127,7 @@ var er = document.createElement("button"); er.innerText = "realloc"; er.onclick = function() { - ptr = exports.__mm_reallocate(ptr, es.value >>> 0); + ptr = exports.__rt_reallocate(ptr, es.value >>> 0); update(); }; el.appendChild(er); @@ -136,7 +136,7 @@ ef.className = "free"; el.appendChild(ef); ef.onclick = function() { - exports.__mm_free(ptr); + exports.__rt_free(ptr); document.getElementById("segs").removeChild(el); update(); }; diff --git a/tests/runtime/optimized.wat b/tests/runtime/optimized.wat index f35cbe3e32..fb2335427d 100644 --- a/tests/runtime/optimized.wat +++ b/tests/runtime/optimized.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$v (func)) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) @@ -13,18 +13,20 @@ (data (i32.const 24) "~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") (data (i32.const 56) "\10\00\00\00\1c") (data (i32.const 72) "~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") + (data (i32.const 104) "\10\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08") (global $~lib/started (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/rt/pure/CUR (mut i32) (i32.const 0)) (global $~lib/rt/pure/ROOTS (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "main" (func $assembly/index/main)) - (export "__mm_allocate" (func $~lib/rt/index/__mm_allocate)) - (export "__mm_reallocate" (func $~lib/rt/index/__mm_reallocate)) - (export "__mm_free" (func $~lib/rt/index/__mm_free)) - (export "__gc_retain" (func $~lib/rt/index/__gc_retain)) - (export "__gc_release" (func $~lib/rt/index/__gc_release)) - (export "__gc_collect" (func $~lib/rt/index/__gc_collect)) + (export "__rt_allocate" (func $~lib/rt/index/__rt_allocate)) + (export "__rt_reallocate" (func $~lib/rt/index/__rt_reallocate)) + (export "__rt_free" (func $~lib/rt/index/__rt_free)) + (export "__rt_retain" (func $~lib/rt/index/__rt_retain)) + (export "__rt_release" (func $~lib/rt/index/__rt_release)) + (export "__rt_collect" (func $~lib/rt/index/__rt_collect)) + (export "__rt_typeinfo" (func $~lib/rt/common/__rt_typeinfo)) (func $assembly/index/main (; 1 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz @@ -416,7 +418,7 @@ (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 112 + i32.const 240 local.tee $3 i32.const 67107 i32.add @@ -515,7 +517,7 @@ if i32.const 0 i32.const 24 - i32.const 436 + i32.const 427 i32.const 29 call $~lib/builtins/abort unreachable @@ -776,18 +778,22 @@ call $~lib/rt/tlsf/prepareBlock local.get $2 ) - (func $~lib/rt/index/__mm_allocate (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/index/__rt_allocate (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $2 if (result i32) - local.get $1 + local.get $2 else call $~lib/rt/tlsf/initializeRoot global.get $~lib/rt/tlsf/ROOT end local.get $0 call $~lib/rt/tlsf/allocateBlock + local.tee $0 + local.get $1 + i32.store offset=8 + local.get $0 i32.const 16 i32.add ) @@ -1067,7 +1073,7 @@ call $~lib/rt/tlsf/insertBlock local.get $3 ) - (func $~lib/rt/index/__mm_reallocate (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/index/__rt_reallocate (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) global.get $~lib/rt/tlsf/ROOT local.get $0 i32.const 16 @@ -1088,14 +1094,14 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/index/__mm_free (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/index/__rt_free (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) global.get $~lib/rt/tlsf/ROOT local.get $0 i32.const 16 i32.sub call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/index/__gc_retain (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/index/__rt_retain (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 if local.get $0 @@ -1109,7 +1115,7 @@ i32.store offset=4 end ) - (func $~lib/rt/index/__gc_release (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/index/__rt_release (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 if local.get $0 @@ -1327,10 +1333,34 @@ local.get $5 global.set $~lib/rt/pure/CUR ) - (func $~lib/rt/index/__gc_collect (; 23 ;) (type $FUNCSIG$v) + (func $~lib/rt/index/__rt_collect (; 23 ;) (type $FUNCSIG$v) call $~lib/rt/pure/collectCycles ) - (func $start (; 24 ;) (type $FUNCSIG$v) + (func $~lib/rt/common/__rt_typeinfo (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 104 + local.set $1 + local.get $0 + if (result i32) + local.get $0 + local.get $1 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 3 + i32.shl + i32.add + i32.load + end + ) + (func $start (; 25 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/runtime/untouched.wasm b/tests/runtime/untouched.wasm index b84c7aa06cca01c958b3a4c08a2f317350943de2..e6bc7cdd2838344aaae90513763dfe7c6c647137 100644 GIT binary patch delta 688 zcmchUJ#Q015QgX7kGr$ipENNb@Y+s7EJzwqXb^BkDvETp_Q|?PLFYKJ-9#WR3Jsz` z*8BuI(nL4~LZTrB5DE|tGz19>Dg+%JaAzVU{s1HG&c4s=&b-pTYdo4MQ!wa)h;Ytp z6SYM=Dop{S=BW#fIw>VcLpgvWpj_8gT2qqJAkvgvz&b%o5S+7KOrzVC7(SVp{1-^~ zH^R6#Gfp?`_WGNGR5w^%Bjj7H{;(B9QLhsWLo&sQ?uUO#Au}N>{V=4GIjRoRx5siv zDhh)^NXP%kPA`hW&XB74)^yr>xVav#uC4UQW?WEW2=(litrw_)C3Uq_GQb55A-(N z@vKt>c6iZcJmmv-0|$J`dxrP?%iFgvrC%%&8Dr&~AYc0NV8e>##E4IR#ec=0GV?QY z5OG7)gcYelogR%9mP*;0w9;Zxcvg;^*?UO3?wJpmVlQt|;c;$3{FMATH;w89*>N+! zD=#*IxZ%`bX-UOCv?YsV{57Lu(l)`q7u`sJG095Pq0kBA<#L_9^20d&z`IC%Ps01( Mx$y5m-YuW`4NaTK>3Eq9eWCynO1 zAelrfF9>cJCP^5@aibo!HL1ZqZtDL`!Ra&4n_82n!f?4BHg&t_9Uizrv5s1r?p(uq zBaU^wO(n+yWtUMX=f9WA1*%|P&UrpRLJ3>Eh-tjz4J_d!pX1X0ioo@V6wl!ncKMgs z!5MR|b?@><@DX^czP;+pC)u8Wg0bK?Psken@`gObA6_zM#OoYy8nbxMUyL^}yN}I5 zV27VtjD5baUg3zJ+23%%BhD@k`P>=DG5>R>?-qfyBFgalKN`JO`S8ihcNg;8$Q-BY qCvNkU>tlpZ24=)t$%cC$#XdFOU2s3;@`6;B>Hv}-4ju4^;p!E_I&pab diff --git a/tests/runtime/untouched.wat b/tests/runtime/untouched.wat index e3f7464817..267a105689 100644 --- a/tests/runtime/untouched.wat +++ b/tests/runtime/untouched.wat @@ -1,10 +1,10 @@ (module (type $FUNCSIG$v (func)) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -13,6 +13,7 @@ (data (i32.const 56) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00n\00d\00e\00x\00.\00t\00s\00") (data (i32.const 104) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s\00") (data (i32.const 152) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") + (data (i32.const 200) "\10\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/rt/pure/ACYCLIC_FLAG i32 (i32.const 0)) @@ -21,15 +22,17 @@ (global $~lib/rt/pure/CUR (mut i32) (i32.const 0)) (global $~lib/rt/pure/END (mut i32) (i32.const 0)) (global $~lib/rt/pure/ROOTS (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 196)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 200)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 336)) (export "memory" (memory $0)) (export "main" (func $assembly/index/main)) - (export "__mm_allocate" (func $~lib/rt/index/__mm_allocate)) - (export "__mm_reallocate" (func $~lib/rt/index/__mm_reallocate)) - (export "__mm_free" (func $~lib/rt/index/__mm_free)) - (export "__gc_retain" (func $~lib/rt/index/__gc_retain)) - (export "__gc_release" (func $~lib/rt/index/__gc_release)) - (export "__gc_collect" (func $~lib/rt/index/__gc_collect)) + (export "__rt_allocate" (func $~lib/rt/index/__rt_allocate)) + (export "__rt_reallocate" (func $~lib/rt/index/__rt_reallocate)) + (export "__rt_free" (func $~lib/rt/index/__rt_free)) + (export "__rt_retain" (func $~lib/rt/index/__rt_retain)) + (export "__rt_release" (func $~lib/rt/index/__rt_release)) + (export "__rt_collect" (func $~lib/rt/index/__rt_collect)) + (export "__rt_typeinfo" (func $~lib/rt/common/__rt_typeinfo)) (func $assembly/index/main (; 1 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz @@ -60,7 +63,7 @@ if i32.const 0 i32.const 24 - i32.const 265 + i32.const 256 i32.const 13 call $~lib/builtins/abort unreachable @@ -85,7 +88,7 @@ if i32.const 0 i32.const 24 - i32.const 267 + i32.const 258 i32.const 13 call $~lib/builtins/abort unreachable @@ -137,7 +140,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 271 i32.const 13 call $~lib/builtins/abort unreachable @@ -275,7 +278,7 @@ if i32.const 0 i32.const 24 - i32.const 193 + i32.const 184 i32.const 13 call $~lib/builtins/abort unreachable @@ -290,7 +293,7 @@ if i32.const 0 i32.const 24 - i32.const 195 + i32.const 186 i32.const 13 call $~lib/builtins/abort unreachable @@ -389,7 +392,7 @@ if i32.const 0 i32.const 24 - i32.const 216 + i32.const 207 i32.const 15 call $~lib/builtins/abort unreachable @@ -452,7 +455,7 @@ if i32.const 0 i32.const 24 - i32.const 231 + i32.const 222 i32.const 13 call $~lib/builtins/abort unreachable @@ -468,7 +471,7 @@ if i32.const 0 i32.const 24 - i32.const 232 + i32.const 223 i32.const 13 call $~lib/builtins/abort unreachable @@ -525,7 +528,7 @@ if i32.const 0 i32.const 24 - i32.const 248 + i32.const 239 i32.const 13 call $~lib/builtins/abort unreachable @@ -648,7 +651,7 @@ if i32.const 0 i32.const 24 - i32.const 374 + i32.const 365 i32.const 4 call $~lib/builtins/abort unreachable @@ -673,7 +676,7 @@ if i32.const 0 i32.const 24 - i32.const 384 + i32.const 375 i32.const 15 call $~lib/builtins/abort unreachable @@ -704,7 +707,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 387 i32.const 4 call $~lib/builtins/abort unreachable @@ -937,7 +940,7 @@ if i32.const 0 i32.const 24 - i32.const 436 + i32.const 427 i32.const 29 call $~lib/builtins/abort unreachable @@ -1031,7 +1034,7 @@ if i32.const 0 i32.const 24 - i32.const 326 + i32.const 317 i32.const 13 call $~lib/builtins/abort unreachable @@ -1096,7 +1099,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 330 i32.const 17 call $~lib/builtins/abort unreachable @@ -1214,7 +1217,7 @@ if i32.const 0 i32.const 24 - i32.const 353 + i32.const 344 i32.const 13 call $~lib/builtins/abort unreachable @@ -1325,7 +1328,7 @@ if i32.const 0 i32.const 24 - i32.const 466 + i32.const 457 i32.const 15 call $~lib/builtins/abort unreachable @@ -1343,7 +1346,7 @@ if i32.const 0 i32.const 24 - i32.const 468 + i32.const 459 i32.const 13 call $~lib/builtins/abort unreachable @@ -1366,20 +1369,26 @@ call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $~lib/rt/index/__mm_allocate (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/index/__rt_allocate (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/ROOT - local.set $1 - local.get $1 + local.set $2 + local.get $2 i32.eqz if call $~lib/rt/tlsf/initializeRoot global.get $~lib/rt/tlsf/ROOT - local.set $1 + local.set $2 end - local.get $1 + local.get $2 local.get $0 call $~lib/rt/tlsf/allocateBlock + local.set $3 + local.get $3 + local.get $1 + i32.store offset=8 + local.get $3 i32.const 16 i32.add ) @@ -1613,7 +1622,7 @@ if i32.const 0 i32.const 24 - i32.const 481 + i32.const 472 i32.const 13 call $~lib/builtins/abort unreachable @@ -1727,13 +1736,13 @@ call $~lib/rt/tlsf/insertBlock local.get $8 ) - (func $~lib/rt/index/__mm_reallocate (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/index/__rt_reallocate (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if i32.const 0 i32.const 72 - i32.const 21 + i32.const 23 i32.const 13 call $~lib/builtins/abort unreachable @@ -1753,7 +1762,7 @@ if i32.const 0 i32.const 72 - i32.const 22 + i32.const 24 i32.const 2 call $~lib/builtins/abort unreachable @@ -1780,7 +1789,7 @@ if i32.const 0 i32.const 24 - i32.const 519 + i32.const 510 i32.const 2 call $~lib/builtins/abort unreachable @@ -1794,13 +1803,13 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/index/__mm_free (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/index/__rt_free (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if i32.const 0 i32.const 72 - i32.const 29 + i32.const 31 i32.const 13 call $~lib/builtins/abort unreachable @@ -1820,7 +1829,7 @@ if i32.const 0 i32.const 72 - i32.const 30 + i32.const 32 i32.const 2 call $~lib/builtins/abort unreachable @@ -1864,7 +1873,7 @@ i32.add i32.store offset=4 ) - (func $~lib/rt/index/__gc_retain (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/index/__rt_retain (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 if local.get $0 @@ -2037,7 +2046,7 @@ end end ) - (func $~lib/rt/index/__gc_release (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/rt/index/__rt_release (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 if local.get $0 @@ -2300,11 +2309,36 @@ local.get $0 global.set $~lib/rt/pure/CUR ) - (func $~lib/rt/index/__gc_collect (; 31 ;) (type $FUNCSIG$v) + (func $~lib/rt/index/__rt_collect (; 31 ;) (type $FUNCSIG$v) call $~lib/rt/pure/collectCycles ) - (func $start (; 32 ;) (type $FUNCSIG$v) + (func $~lib/rt/common/__rt_typeinfo (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $start (; 33 ;) (type $FUNCSIG$v) ) - (func $null (; 33 ;) (type $FUNCSIG$v) + (func $null (; 34 ;) (type $FUNCSIG$v) ) ) From 2b0a165e7fd45fe87f42e8c3ae73767ef260e8eb Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 18 Apr 2019 13:08:49 +0200 Subject: [PATCH 117/119] more --- std/assembly/rt/README.md | 3 +++ std/assembly/rt/stub.ts | 14 ++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/std/assembly/rt/README.md b/std/assembly/rt/README.md index 1fb78f5761..6e501d92d2 100644 --- a/std/assembly/rt/README.md +++ b/std/assembly/rt/README.md @@ -12,6 +12,9 @@ Interface Dynamically allocates a chunk of memory of at least the specified size and returns its address. Alignment is guaranteed to be 16 bytes to fit up to v128 values naturally. +* **__rt_reallocate**(ref: `usize`, size: `usize`): `usize`
+ Dynamically changes the size of a chunk of memory, possibly moving it to a new address. + * **__rt_free**(ref: `usize`): `void`
Frees a dynamically allocated chunk of memory by its address. diff --git a/std/assembly/rt/stub.ts b/std/assembly/rt/stub.ts index da02be7752..386a202df0 100644 --- a/std/assembly/rt/stub.ts +++ b/std/assembly/rt/stub.ts @@ -2,7 +2,7 @@ import { AL_MASK, CommonBlock } from "./common"; // @ts-ignore: decorator @inline -const BLOCK_OVERHEAD = offsetof(); +const BLOCK_OVERHEAD = (offsetof() + AL_MASK) & ~AL_MASK; // @ts-ignore: decorator @inline @@ -43,9 +43,15 @@ function __rt_allocate(size: usize, id: u32): usize { @unsafe @global function __rt_reallocate(ref: usize, size: usize): usize { var block = changetype(ref - BLOCK_OVERHEAD); - var newRef = __rt_allocate(size, block.rtId); - memory.copy(newRef, ref, block.rtSize); - return newRef; + var oldSize = block.rtSize; + if (size > oldSize) { + let newRef = __rt_allocate(size, block.rtId); + memory.copy(newRef, ref, oldSize); + ref = newRef; + } else { + block.rtSize = size; + } + return ref; } // @ts-ignore: decorator From 2dec52976a585628846829fd4aa26c819d36abee Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 18 Apr 2019 20:36:51 +0200 Subject: [PATCH 118/119] fix export star module exports, shiftify --- src/ast.ts | 19 ++++-- src/compiler.ts | 7 +- std/assembly/rt/index.ts | 14 ++-- std/assembly/rt/stub.ts | 16 +++-- std/assembly/rt/tlsf.ts | 41 +++++++++--- tests/allocators/rt/optimized.wat | 14 ++-- tests/allocators/rt/untouched.wat | 106 ++++++++++++++--------------- tests/runtime/assembly/index.ts | 12 +--- tests/runtime/optimized.wat | 14 ++-- tests/runtime/untouched.wasm | Bin 4786 -> 4786 bytes tests/runtime/untouched.wat | 108 +++++++++++++++--------------- 11 files changed, 192 insertions(+), 159 deletions(-) diff --git a/src/ast.ts b/src/ast.ts index b06912c11f..ca1840920f 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -687,6 +687,9 @@ export abstract class Node { range.source.normalizedPath ); } else { // absolute + if (!normalizedPath.startsWith(LIBRARY_PREFIX)) { + normalizedPath = LIBRARY_PREFIX + normalizedPath; + } stmt.normalizedPath = normalizedPath; } stmt.internalPath = mangleInternalPath(stmt.normalizedPath); @@ -782,10 +785,18 @@ export abstract class Node { stmt.declarations = null; stmt.namespaceName = identifier; stmt.path = path; - stmt.normalizedPath = resolvePath( - normalizePath(path.value), - range.source.normalizedPath - ); + var normalizedPath = normalizePath(path.value); + if (path.value.startsWith(".")) { + stmt.normalizedPath = resolvePath( + normalizedPath, + range.source.normalizedPath + ); + } else { + if (!normalizedPath.startsWith(LIBRARY_PREFIX)) { + normalizedPath = LIBRARY_PREFIX + normalizedPath; + } + stmt.normalizedPath = normalizedPath; + } stmt.internalPath = mangleInternalPath(stmt.normalizedPath); return stmt; } diff --git a/src/compiler.ts b/src/compiler.ts index 7d2b0f5963..81a74e7738 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -716,7 +716,12 @@ export class Compiler extends DiagnosticEmitter { var exports = file.exports; if (exports) for (let element of exports.values()) this.compileElement(element); var exportsStar = file.exportsStar; - if (exportsStar) for (let exportStar of exportsStar) this.compileFile(exportStar); + if (exportsStar) { + for (let exportStar of exportsStar) { + this.compileFile(exportStar); + this.compileExports(exportStar); + } + } } // files diff --git a/std/assembly/rt/index.ts b/std/assembly/rt/index.ts index a37cf8876b..f9baadc79b 100644 --- a/std/assembly/rt/index.ts +++ b/std/assembly/rt/index.ts @@ -6,7 +6,7 @@ import { ROOT, Block, BLOCK_OVERHEAD, initializeRoot, allocateBlock, reallocateB // @ts-ignore: decorator @global @unsafe -function __rt_allocate(size: usize, id: u32): usize { +export function __rt_allocate(size: usize, id: u32): usize { var root = ROOT; if (!root) { initializeRoot(); @@ -19,7 +19,7 @@ function __rt_allocate(size: usize, id: u32): usize { // @ts-ignore: decorator @global @unsafe -function __rt_reallocate(ref: usize, size: usize): usize { +export function __rt_reallocate(ref: usize, size: usize): usize { if (DEBUG) assert(ROOT); // must be initialized assert(ref != 0 && !(ref & AL_MASK)); // must exist and be aligned return changetype(reallocateBlock(ROOT, changetype(ref - BLOCK_OVERHEAD), size)) + BLOCK_OVERHEAD; @@ -27,7 +27,7 @@ function __rt_reallocate(ref: usize, size: usize): usize { // @ts-ignore: decorator @global @unsafe -function __rt_free(ref: usize): void { +export function __rt_free(ref: usize): void { if (DEBUG) assert(ROOT); // must be initialized assert(ref != 0 && !(ref & AL_MASK)); // must exist and be aligned freeBlock(ROOT, changetype(ref - BLOCK_OVERHEAD)); @@ -39,18 +39,20 @@ import { increment, decrement, collectCycles } from "./pure"; // @ts-ignore: decorator @global @unsafe -function __rt_retain(ref: usize): void { +export function __rt_retain(ref: usize): void { if (ref) increment(changetype(ref - BLOCK_OVERHEAD)); } // @ts-ignore: decorator @global @unsafe -function __rt_release(ref: usize): void { +export function __rt_release(ref: usize): void { if (ref) decrement(changetype(ref - BLOCK_OVERHEAD)); } // @ts-ignore: decorator @global @unsafe -function __rt_collect(): void { +export function __rt_collect(): void { collectCycles(); } + +export { __rt_typeinfo }; diff --git a/std/assembly/rt/stub.ts b/std/assembly/rt/stub.ts index 386a202df0..0244d6cdb1 100644 --- a/std/assembly/rt/stub.ts +++ b/std/assembly/rt/stub.ts @@ -20,7 +20,7 @@ var offset: usize = startOffset; // @ts-ignore: decorator @unsafe @global -function __rt_allocate(size: usize, id: u32): usize { +export function __rt_allocate(size: usize, id: u32): usize { if (size > BLOCK_MAXSIZE) unreachable(); var ptr = offset + BLOCK_OVERHEAD; var newPtr = (ptr + max(size, 1) + AL_MASK) & ~AL_MASK; @@ -41,7 +41,7 @@ function __rt_allocate(size: usize, id: u32): usize { // @ts-ignore: decorator @unsafe @global -function __rt_reallocate(ref: usize, size: usize): usize { +export function __rt_reallocate(ref: usize, size: usize): usize { var block = changetype(ref - BLOCK_OVERHEAD); var oldSize = block.rtSize; if (size > oldSize) { @@ -56,12 +56,12 @@ function __rt_reallocate(ref: usize, size: usize): usize { // @ts-ignore: decorator @unsafe @global -function __rt_free(ref: usize): void { +export function __rt_free(ref: usize): void { } // @ts-ignore: decorator @unsafe @global -function __rt_reset(): void { // special +export function __rt_reset(): void { // special offset = startOffset; } @@ -69,15 +69,17 @@ function __rt_reset(): void { // special // @ts-ignore: decorator @global @unsafe -function __rt_retain(ref: usize): void { +export function __rt_retain(ref: usize): void { } // @ts-ignore: decorator @global @unsafe -function __rt_release(ref: usize): void { +export function __rt_release(ref: usize): void { } // @ts-ignore: decorator @global @unsafe -function __rt_collect(): void { +export function __rt_collect(): void { } + +export { __rt_typeinfo }; diff --git a/std/assembly/rt/tlsf.ts b/std/assembly/rt/tlsf.ts index 518908a271..6fecf19d93 100644 --- a/std/assembly/rt/tlsf.ts +++ b/std/assembly/rt/tlsf.ts @@ -146,37 +146,60 @@ import { AL_BITS, AL_SIZE, AL_MASK, DEBUG, CommonBlock } from "./common"; /** Gets the second level map of the specified first level. */ // @ts-ignore: decorator @inline function GETSL(root: Root, fl: usize): u32 { - return load(changetype(root) + (fl << alignof()), SL_START); + return load( + changetype(root) + (fl << alignof()), + SL_START + ); } /** Sets the second level map of the specified first level. */ // @ts-ignore: decorator @inline function SETSL(root: Root, fl: usize, slMap: u32): void { - store(changetype(root) + (fl << alignof()), slMap, SL_START); + store( + changetype(root) + (fl << alignof()), + slMap, + SL_START + ); } /** Gets the head of the free list for the specified combination of first and second level. */ // @ts-ignore: decorator @inline function GETHEAD(root: Root, fl: usize, sl: u32): Block | null { - return changetype(load(changetype(root) + (fl * SL_SIZE + sl) * sizeof(), HL_START)); + return changetype( + load( + changetype(root) + (((fl << SL_BITS) + sl) << alignof()), + HL_START + ) + ); } /** Sets the head of the free list for the specified combination of first and second level. */ // @ts-ignore: decorator @inline function SETHEAD(root: Root, fl: usize, sl: u32, head: Block | null): void { - store(changetype(root) + (fl * SL_SIZE + sl) * sizeof() , changetype(head), HL_START); + store( + changetype(root) + (((fl << SL_BITS) + sl) << alignof()), + changetype(head), + HL_START + ); } /** Gets the tail block.. */ // @ts-ignore: decorator @inline function GETTAIL(root: Root): Block { - return load(changetype(root), HL_END); + return load( + changetype(root), + HL_END + ); } /** Sets the tail block. */ // @ts-ignore: decorator @inline function SETTAIL(root: Root, tail: Block): void { - store(changetype(root), tail, HL_END); + store( + changetype(root), + tail, + HL_END + ); } /** Inserts a previously used block back into the free list. */ @@ -229,7 +252,7 @@ function insertBlock(root: Root, block: Block): void { var fl: usize, sl: u32; if (size < SB_SIZE) { fl = 0; - sl = (size / AL_SIZE); + sl = (size >> AL_BITS); } else { const inv: usize = sizeof() * 8 - 1; fl = inv - clz(size); @@ -261,7 +284,7 @@ function removeBlock(root: Root, block: Block): void { var fl: usize, sl: u32; if (size < SB_SIZE) { fl = 0; - sl = (size / AL_SIZE); + sl = (size >> AL_BITS); } else { const inv: usize = sizeof() * 8 - 1; fl = inv - clz(size); @@ -302,7 +325,7 @@ function searchBlock(root: Root, size: usize): Block | null { var fl: usize, sl: u32; if (size < SB_SIZE) { fl = 0; - sl = (size / AL_SIZE); + sl = (size >> AL_BITS); } else { const halfMaxSize = BLOCK_MAXSIZE >> 1; // don't round last fl const inv: usize = sizeof() * 8 - 1; diff --git a/tests/allocators/rt/optimized.wat b/tests/allocators/rt/optimized.wat index 7b5eb5cee9..be09955c1a 100644 --- a/tests/allocators/rt/optimized.wat +++ b/tests/allocators/rt/optimized.wat @@ -29,8 +29,8 @@ i32.lt_u if (result i32) local.get $2 - i32.const 16 - i32.div_u + i32.const 4 + i32.shr_u local.set $4 i32.const 0 else @@ -248,8 +248,8 @@ i32.lt_u if (result i32) local.get $2 - i32.const 16 - i32.div_u + i32.const 4 + i32.shr_u local.set $2 i32.const 0 else @@ -497,7 +497,7 @@ if i32.const 0 i32.const 24 - i32.const 427 + i32.const 450 i32.const 29 call $~lib/builtins/abort unreachable @@ -523,8 +523,8 @@ i32.lt_u if (result i32) local.get $1 - i32.const 16 - i32.div_u + i32.const 4 + i32.shr_u local.set $1 i32.const 0 else diff --git a/tests/allocators/rt/untouched.wat b/tests/allocators/rt/untouched.wat index 1667756b2f..8e5acb2d9e 100644 --- a/tests/allocators/rt/untouched.wat +++ b/tests/allocators/rt/untouched.wat @@ -41,7 +41,7 @@ if i32.const 0 i32.const 24 - i32.const 256 + i32.const 279 i32.const 13 call $~lib/builtins/abort unreachable @@ -66,7 +66,7 @@ if i32.const 0 i32.const 24 - i32.const 258 + i32.const 281 i32.const 13 call $~lib/builtins/abort unreachable @@ -78,8 +78,8 @@ i32.const 0 local.set $4 local.get $3 - i32.const 16 - i32.div_u + i32.const 4 + i32.shr_u local.set $5 else i32.const 31 @@ -118,7 +118,7 @@ if i32.const 0 i32.const 24 - i32.const 271 + i32.const 294 i32.const 13 call $~lib/builtins/abort unreachable @@ -151,12 +151,12 @@ local.set $8 local.get $10 local.get $9 - i32.const 16 - i32.mul + i32.const 4 + i32.shl local.get $8 i32.add - i32.const 4 - i32.mul + i32.const 2 + i32.shl i32.add i32.load offset=96 end @@ -173,12 +173,12 @@ local.set $8 local.get $11 local.get $10 - i32.const 16 - i32.mul + i32.const 4 + i32.shl local.get $9 i32.add - i32.const 4 - i32.mul + i32.const 2 + i32.shl i32.add local.get $8 i32.store offset=96 @@ -256,7 +256,7 @@ if i32.const 0 i32.const 24 - i32.const 184 + i32.const 207 i32.const 13 call $~lib/builtins/abort unreachable @@ -271,7 +271,7 @@ if i32.const 0 i32.const 24 - i32.const 186 + i32.const 209 i32.const 13 call $~lib/builtins/abort unreachable @@ -370,7 +370,7 @@ if i32.const 0 i32.const 24 - i32.const 207 + i32.const 230 i32.const 15 call $~lib/builtins/abort unreachable @@ -433,7 +433,7 @@ if i32.const 0 i32.const 24 - i32.const 222 + i32.const 245 i32.const 13 call $~lib/builtins/abort unreachable @@ -449,7 +449,7 @@ if i32.const 0 i32.const 24 - i32.const 223 + i32.const 246 i32.const 13 call $~lib/builtins/abort unreachable @@ -466,8 +466,8 @@ i32.const 0 local.set $9 local.get $8 - i32.const 16 - i32.div_u + i32.const 4 + i32.shr_u local.set $10 else i32.const 31 @@ -506,7 +506,7 @@ if i32.const 0 i32.const 24 - i32.const 239 + i32.const 262 i32.const 13 call $~lib/builtins/abort unreachable @@ -520,12 +520,12 @@ local.set $7 local.get $3 local.get $6 - i32.const 16 - i32.mul + i32.const 4 + i32.shl local.get $7 i32.add - i32.const 4 - i32.mul + i32.const 2 + i32.shl i32.add i32.load offset=96 end @@ -553,12 +553,12 @@ local.set $7 local.get $12 local.get $3 - i32.const 16 - i32.mul + i32.const 4 + i32.shl local.get $6 i32.add - i32.const 4 - i32.mul + i32.const 2 + i32.shl i32.add local.get $7 i32.store offset=96 @@ -629,7 +629,7 @@ if i32.const 0 i32.const 24 - i32.const 365 + i32.const 388 i32.const 4 call $~lib/builtins/abort unreachable @@ -654,7 +654,7 @@ if i32.const 0 i32.const 24 - i32.const 375 + i32.const 398 i32.const 15 call $~lib/builtins/abort unreachable @@ -685,7 +685,7 @@ if i32.const 0 i32.const 24 - i32.const 387 + i32.const 410 i32.const 4 call $~lib/builtins/abort unreachable @@ -862,12 +862,12 @@ local.set $6 local.get $9 local.get $8 - i32.const 16 - i32.mul + i32.const 4 + i32.shl local.get $7 i32.add - i32.const 4 - i32.mul + i32.const 2 + i32.shl i32.add local.get $6 i32.store offset=96 @@ -918,7 +918,7 @@ if i32.const 0 i32.const 24 - i32.const 427 + i32.const 450 i32.const 29 call $~lib/builtins/abort unreachable @@ -954,8 +954,8 @@ i32.const 0 local.set $2 local.get $1 - i32.const 16 - i32.div_u + i32.const 4 + i32.shr_u local.set $3 else local.get $1 @@ -1012,7 +1012,7 @@ if i32.const 0 i32.const 24 - i32.const 317 + i32.const 340 i32.const 13 call $~lib/builtins/abort unreachable @@ -1077,7 +1077,7 @@ if i32.const 0 i32.const 24 - i32.const 330 + i32.const 353 i32.const 17 call $~lib/builtins/abort unreachable @@ -1092,12 +1092,12 @@ local.set $5 local.get $9 local.get $8 - i32.const 16 - i32.mul + i32.const 4 + i32.shl local.get $5 i32.add - i32.const 4 - i32.mul + i32.const 2 + i32.shl i32.add i32.load offset=96 end @@ -1114,12 +1114,12 @@ local.set $4 local.get $8 local.get $5 - i32.const 16 - i32.mul + i32.const 4 + i32.shl local.get $4 i32.add - i32.const 4 - i32.mul + i32.const 2 + i32.shl i32.add i32.load offset=96 end @@ -1195,7 +1195,7 @@ if i32.const 0 i32.const 24 - i32.const 344 + i32.const 367 i32.const 13 call $~lib/builtins/abort unreachable @@ -1306,7 +1306,7 @@ if i32.const 0 i32.const 24 - i32.const 457 + i32.const 480 i32.const 15 call $~lib/builtins/abort unreachable @@ -1324,7 +1324,7 @@ if i32.const 0 i32.const 24 - i32.const 459 + i32.const 482 i32.const 13 call $~lib/builtins/abort unreachable @@ -1388,7 +1388,7 @@ if i32.const 0 i32.const 24 - i32.const 510 + i32.const 533 i32.const 2 call $~lib/builtins/abort unreachable diff --git a/tests/runtime/assembly/index.ts b/tests/runtime/assembly/index.ts index 18f2db537e..018c10d965 100644 --- a/tests/runtime/assembly/index.ts +++ b/tests/runtime/assembly/index.ts @@ -1,13 +1,3 @@ -import "rt"; - -export { - __rt_allocate, - __rt_reallocate, - __rt_free, - __rt_retain, - __rt_release, - __rt_collect, - __rt_typeinfo -}; +export * from "rt"; @start export function main(): void {} diff --git a/tests/runtime/optimized.wat b/tests/runtime/optimized.wat index fb2335427d..2c4599d267 100644 --- a/tests/runtime/optimized.wat +++ b/tests/runtime/optimized.wat @@ -49,8 +49,8 @@ i32.lt_u if (result i32) local.get $2 - i32.const 16 - i32.div_u + i32.const 4 + i32.shr_u local.set $4 i32.const 0 else @@ -268,8 +268,8 @@ i32.lt_u if (result i32) local.get $2 - i32.const 16 - i32.div_u + i32.const 4 + i32.shr_u local.set $2 i32.const 0 else @@ -517,7 +517,7 @@ if i32.const 0 i32.const 24 - i32.const 427 + i32.const 450 i32.const 29 call $~lib/builtins/abort unreachable @@ -543,8 +543,8 @@ i32.lt_u if (result i32) local.get $1 - i32.const 16 - i32.div_u + i32.const 4 + i32.shr_u local.set $1 i32.const 0 else diff --git a/tests/runtime/untouched.wasm b/tests/runtime/untouched.wasm index e6bc7cdd2838344aaae90513763dfe7c6c647137..0272a2a4a29134aac07d16b540b731aed1442682 100644 GIT binary patch delta 411 zcmX|-F-rqM5JqqIX76@$1R{uNBeO`rCRhZ5Rk#%m1hI?QiKWCwF{H3jL{i!;BAQw| zL2_1>`U6A|iy&eIZBr@QxqFG}W|+r(Z>E#)K7#4rwz z=9S&Rr!oF+`D-{J(7C$ZOITTQv3gQ}|Bq1P7D0)5Bt}-!*4Anf%QLN^GuyWwK1mf& zMup^4;2gr#;R5G{ZGyDAiw$G&OtBAh3;yabLI;6FhP?#xP9WH#e4T!$yq z3wNqLrpMfO(j-aDUK(sFPN__T_~1LS6{5R9dck)*?fTmf8!b}TwE^?fZT;0Sfi?ySe zt)pGjhBBO)J}fOn4H9+D8ufYH3M(wem>d-nQvq=$$yb6x3be&!ikVeB6gM#3Yhsv$ zt{LDpJQ?F2ln0{$fsX2SFR{u>8mp)E>;H&pwnI=ths4-Q+S*zzv+~^Mh{I#+;gVDy z1iyaXvR#J{~7T$nY#h&H3;Z^Es4 z^Y^O{s3+3zWJ!|HUg~WtPMJ)D`1mWz4|xU&3-J_UB#5UzEK_KUBj}kac?b8VFK6K~ T`H?RGz2rG80RFlO&t39AS;|{% diff --git a/tests/runtime/untouched.wat b/tests/runtime/untouched.wat index 267a105689..0ca5d74d4d 100644 --- a/tests/runtime/untouched.wat +++ b/tests/runtime/untouched.wat @@ -63,7 +63,7 @@ if i32.const 0 i32.const 24 - i32.const 256 + i32.const 279 i32.const 13 call $~lib/builtins/abort unreachable @@ -88,7 +88,7 @@ if i32.const 0 i32.const 24 - i32.const 258 + i32.const 281 i32.const 13 call $~lib/builtins/abort unreachable @@ -100,8 +100,8 @@ i32.const 0 local.set $4 local.get $3 - i32.const 16 - i32.div_u + i32.const 4 + i32.shr_u local.set $5 else i32.const 31 @@ -140,7 +140,7 @@ if i32.const 0 i32.const 24 - i32.const 271 + i32.const 294 i32.const 13 call $~lib/builtins/abort unreachable @@ -173,12 +173,12 @@ local.set $8 local.get $10 local.get $9 - i32.const 16 - i32.mul + i32.const 4 + i32.shl local.get $8 i32.add - i32.const 4 - i32.mul + i32.const 2 + i32.shl i32.add i32.load offset=96 end @@ -195,12 +195,12 @@ local.set $8 local.get $11 local.get $10 - i32.const 16 - i32.mul + i32.const 4 + i32.shl local.get $9 i32.add - i32.const 4 - i32.mul + i32.const 2 + i32.shl i32.add local.get $8 i32.store offset=96 @@ -278,7 +278,7 @@ if i32.const 0 i32.const 24 - i32.const 184 + i32.const 207 i32.const 13 call $~lib/builtins/abort unreachable @@ -293,7 +293,7 @@ if i32.const 0 i32.const 24 - i32.const 186 + i32.const 209 i32.const 13 call $~lib/builtins/abort unreachable @@ -392,7 +392,7 @@ if i32.const 0 i32.const 24 - i32.const 207 + i32.const 230 i32.const 15 call $~lib/builtins/abort unreachable @@ -455,7 +455,7 @@ if i32.const 0 i32.const 24 - i32.const 222 + i32.const 245 i32.const 13 call $~lib/builtins/abort unreachable @@ -471,7 +471,7 @@ if i32.const 0 i32.const 24 - i32.const 223 + i32.const 246 i32.const 13 call $~lib/builtins/abort unreachable @@ -488,8 +488,8 @@ i32.const 0 local.set $9 local.get $8 - i32.const 16 - i32.div_u + i32.const 4 + i32.shr_u local.set $10 else i32.const 31 @@ -528,7 +528,7 @@ if i32.const 0 i32.const 24 - i32.const 239 + i32.const 262 i32.const 13 call $~lib/builtins/abort unreachable @@ -542,12 +542,12 @@ local.set $7 local.get $3 local.get $6 - i32.const 16 - i32.mul + i32.const 4 + i32.shl local.get $7 i32.add - i32.const 4 - i32.mul + i32.const 2 + i32.shl i32.add i32.load offset=96 end @@ -575,12 +575,12 @@ local.set $7 local.get $12 local.get $3 - i32.const 16 - i32.mul + i32.const 4 + i32.shl local.get $6 i32.add - i32.const 4 - i32.mul + i32.const 2 + i32.shl i32.add local.get $7 i32.store offset=96 @@ -651,7 +651,7 @@ if i32.const 0 i32.const 24 - i32.const 365 + i32.const 388 i32.const 4 call $~lib/builtins/abort unreachable @@ -676,7 +676,7 @@ if i32.const 0 i32.const 24 - i32.const 375 + i32.const 398 i32.const 15 call $~lib/builtins/abort unreachable @@ -707,7 +707,7 @@ if i32.const 0 i32.const 24 - i32.const 387 + i32.const 410 i32.const 4 call $~lib/builtins/abort unreachable @@ -884,12 +884,12 @@ local.set $6 local.get $9 local.get $8 - i32.const 16 - i32.mul + i32.const 4 + i32.shl local.get $7 i32.add - i32.const 4 - i32.mul + i32.const 2 + i32.shl i32.add local.get $6 i32.store offset=96 @@ -940,7 +940,7 @@ if i32.const 0 i32.const 24 - i32.const 427 + i32.const 450 i32.const 29 call $~lib/builtins/abort unreachable @@ -976,8 +976,8 @@ i32.const 0 local.set $2 local.get $1 - i32.const 16 - i32.div_u + i32.const 4 + i32.shr_u local.set $3 else local.get $1 @@ -1034,7 +1034,7 @@ if i32.const 0 i32.const 24 - i32.const 317 + i32.const 340 i32.const 13 call $~lib/builtins/abort unreachable @@ -1099,7 +1099,7 @@ if i32.const 0 i32.const 24 - i32.const 330 + i32.const 353 i32.const 17 call $~lib/builtins/abort unreachable @@ -1114,12 +1114,12 @@ local.set $5 local.get $9 local.get $8 - i32.const 16 - i32.mul + i32.const 4 + i32.shl local.get $5 i32.add - i32.const 4 - i32.mul + i32.const 2 + i32.shl i32.add i32.load offset=96 end @@ -1136,12 +1136,12 @@ local.set $4 local.get $8 local.get $5 - i32.const 16 - i32.mul + i32.const 4 + i32.shl local.get $4 i32.add - i32.const 4 - i32.mul + i32.const 2 + i32.shl i32.add i32.load offset=96 end @@ -1217,7 +1217,7 @@ if i32.const 0 i32.const 24 - i32.const 344 + i32.const 367 i32.const 13 call $~lib/builtins/abort unreachable @@ -1328,7 +1328,7 @@ if i32.const 0 i32.const 24 - i32.const 457 + i32.const 480 i32.const 15 call $~lib/builtins/abort unreachable @@ -1346,7 +1346,7 @@ if i32.const 0 i32.const 24 - i32.const 459 + i32.const 482 i32.const 13 call $~lib/builtins/abort unreachable @@ -1622,7 +1622,7 @@ if i32.const 0 i32.const 24 - i32.const 472 + i32.const 495 i32.const 13 call $~lib/builtins/abort unreachable @@ -1789,7 +1789,7 @@ if i32.const 0 i32.const 24 - i32.const 510 + i32.const 533 i32.const 2 call $~lib/builtins/abort unreachable From dd2bdd0383aae1d1e2d76fce6a5442f6cbeecf43 Mon Sep 17 00:00:00 2001 From: dcode Date: Thu, 18 Apr 2019 20:44:22 +0200 Subject: [PATCH 119/119] load/store Block --- std/assembly/rt/tlsf.ts | 12 +++++------ tests/runtime/optimized.wat | 2 +- tests/runtime/untouched.wasm | Bin 4786 -> 4786 bytes tests/runtime/untouched.wat | 40 +++++++++++++++++------------------ 4 files changed, 26 insertions(+), 28 deletions(-) diff --git a/std/assembly/rt/tlsf.ts b/std/assembly/rt/tlsf.ts index 6fecf19d93..8915ded0c0 100644 --- a/std/assembly/rt/tlsf.ts +++ b/std/assembly/rt/tlsf.ts @@ -165,20 +165,18 @@ import { AL_BITS, AL_SIZE, AL_MASK, DEBUG, CommonBlock } from "./common"; /** Gets the head of the free list for the specified combination of first and second level. */ // @ts-ignore: decorator @inline function GETHEAD(root: Root, fl: usize, sl: u32): Block | null { - return changetype( - load( - changetype(root) + (((fl << SL_BITS) + sl) << alignof()), - HL_START - ) + return load( + changetype(root) + (((fl << SL_BITS) + sl) << alignof()), + HL_START ); } /** Sets the head of the free list for the specified combination of first and second level. */ // @ts-ignore: decorator @inline function SETHEAD(root: Root, fl: usize, sl: u32, head: Block | null): void { - store( + store( changetype(root) + (((fl << SL_BITS) + sl) << alignof()), - changetype(head), + head, HL_START ); } diff --git a/tests/runtime/optimized.wat b/tests/runtime/optimized.wat index 2c4599d267..2a9ad39857 100644 --- a/tests/runtime/optimized.wat +++ b/tests/runtime/optimized.wat @@ -517,7 +517,7 @@ if i32.const 0 i32.const 24 - i32.const 450 + i32.const 448 i32.const 29 call $~lib/builtins/abort unreachable diff --git a/tests/runtime/untouched.wasm b/tests/runtime/untouched.wasm index 0272a2a4a29134aac07d16b540b731aed1442682..b20dc4e80dd26e6b321803ee9e77799b86bb20d2 100644 GIT binary patch delta 159 zcmV;Q0AT;JC9);3Q~?2%lT`sN0hg150agK|liC622+aXO4G;hT3zI+r6amkZ-U74% z$G*LG+U%1YiM#lY<1(0fLiO1ug-M zlZ6E|0hqJ81(E>)z>`e}lL69`;RkU6-;+}a!U64*774=v-jmu19s%I9`3c+s0qwKa N3oQWwld}X3t_7b#G}-_F delta 159 zcmV;Q0AT;JC9);3Q~?2(lT`sN0hyD70agK~liC622+sjQ4G;hT3zI+r6amqb-U74% z=97~Ha~$;nK@AW901F@iK@e&n2x=e%MnwcbK>$G*LH3g(1YiM%lY<1(0fduQ1ug-O zlZ6E|0h+VA1(E>)!jnx0lL6F|;RkU6;geGc!U6A-774=v;FH=39s%OB`3c+s0q?Wc N3oQWwm9qp5t_7;uH39$t diff --git a/tests/runtime/untouched.wat b/tests/runtime/untouched.wat index 0ca5d74d4d..ea4746fd41 100644 --- a/tests/runtime/untouched.wat +++ b/tests/runtime/untouched.wat @@ -63,7 +63,7 @@ if i32.const 0 i32.const 24 - i32.const 279 + i32.const 277 i32.const 13 call $~lib/builtins/abort unreachable @@ -88,7 +88,7 @@ if i32.const 0 i32.const 24 - i32.const 281 + i32.const 279 i32.const 13 call $~lib/builtins/abort unreachable @@ -140,7 +140,7 @@ if i32.const 0 i32.const 24 - i32.const 294 + i32.const 292 i32.const 13 call $~lib/builtins/abort unreachable @@ -278,7 +278,7 @@ if i32.const 0 i32.const 24 - i32.const 207 + i32.const 205 i32.const 13 call $~lib/builtins/abort unreachable @@ -293,7 +293,7 @@ if i32.const 0 i32.const 24 - i32.const 209 + i32.const 207 i32.const 13 call $~lib/builtins/abort unreachable @@ -392,7 +392,7 @@ if i32.const 0 i32.const 24 - i32.const 230 + i32.const 228 i32.const 15 call $~lib/builtins/abort unreachable @@ -455,7 +455,7 @@ if i32.const 0 i32.const 24 - i32.const 245 + i32.const 243 i32.const 13 call $~lib/builtins/abort unreachable @@ -471,7 +471,7 @@ if i32.const 0 i32.const 24 - i32.const 246 + i32.const 244 i32.const 13 call $~lib/builtins/abort unreachable @@ -528,7 +528,7 @@ if i32.const 0 i32.const 24 - i32.const 262 + i32.const 260 i32.const 13 call $~lib/builtins/abort unreachable @@ -651,7 +651,7 @@ if i32.const 0 i32.const 24 - i32.const 388 + i32.const 386 i32.const 4 call $~lib/builtins/abort unreachable @@ -676,7 +676,7 @@ if i32.const 0 i32.const 24 - i32.const 398 + i32.const 396 i32.const 15 call $~lib/builtins/abort unreachable @@ -707,7 +707,7 @@ if i32.const 0 i32.const 24 - i32.const 410 + i32.const 408 i32.const 4 call $~lib/builtins/abort unreachable @@ -940,7 +940,7 @@ if i32.const 0 i32.const 24 - i32.const 450 + i32.const 448 i32.const 29 call $~lib/builtins/abort unreachable @@ -1034,7 +1034,7 @@ if i32.const 0 i32.const 24 - i32.const 340 + i32.const 338 i32.const 13 call $~lib/builtins/abort unreachable @@ -1099,7 +1099,7 @@ if i32.const 0 i32.const 24 - i32.const 353 + i32.const 351 i32.const 17 call $~lib/builtins/abort unreachable @@ -1217,7 +1217,7 @@ if i32.const 0 i32.const 24 - i32.const 367 + i32.const 365 i32.const 13 call $~lib/builtins/abort unreachable @@ -1328,7 +1328,7 @@ if i32.const 0 i32.const 24 - i32.const 480 + i32.const 478 i32.const 15 call $~lib/builtins/abort unreachable @@ -1346,7 +1346,7 @@ if i32.const 0 i32.const 24 - i32.const 482 + i32.const 480 i32.const 13 call $~lib/builtins/abort unreachable @@ -1622,7 +1622,7 @@ if i32.const 0 i32.const 24 - i32.const 495 + i32.const 493 i32.const 13 call $~lib/builtins/abort unreachable @@ -1789,7 +1789,7 @@ if i32.const 0 i32.const 24 - i32.const 533 + i32.const 531 i32.const 2 call $~lib/builtins/abort unreachable